- commit
- 21cf7dc429b0b871507da1f336fcad8afed68a15
- parent
- c1c8597bc3c8198ced661ea81d0c5c95faee8aa0
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2021-06-23 19:29
update
Diffstat
| M | babel.js | 82478 | +++++++++++++++++++++++++++++++++++++++---------------------- |
| M | fuzz.js | 109 | ++++++++++++++++++++++++++++++++++++++----------------------- |
| M | package.json | 6 | +++--- |
| M | src/babel.js | 8 | ++++---- |
4 files changed, 52758 insertions, 29843 deletions
diff --git a/babel.js b/babel.js
@@ -1,30783 +1,53450 @@ 1 1 (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){2 -1 // Copyright 2012 Google Inc.3 -1 //4 -1 // Licensed under the Apache License, Version 2.0 (the "License");5 -1 // you may not use this file except in compliance with the License.6 -1 // You may obtain a copy of the License at7 -1 //8 -1 // http://www.apache.org/licenses/LICENSE-2.09 -1 //10 -1 // Unless required by applicable law or agreed to in writing, software11 -1 // distributed under the License is distributed on an "AS IS" BASIS,12 -1 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 -1 // See the License for the specific language governing permissions and14 -1 // limitations under the License.-1 2 'use strict'; 15 316 -1 goog.require('axs.browserUtils');17 -1 goog.require('axs.color');18 -1 goog.require('axs.color.Color');19 -1 goog.require('axs.constants');20 -1 goog.require('axs.dom');-1 4 const asn1 = exports; 21 522 -1 goog.provide('axs.utils');-1 6 asn1.bignum = require('bn.js'); 23 724 -1 /**25 -1 * @const26 -1 * @type {string}27 -1 */28 -1 axs.utils.FOCUSABLE_ELEMENTS_SELECTOR =29 -1 'input:not([type=hidden]):not([disabled]),' +30 -1 'select:not([disabled]),' +31 -1 'textarea:not([disabled]),' +32 -1 'button:not([disabled]),' +33 -1 'a[href],' +34 -1 'iframe,' +35 -1 '[tabindex]';-1 8 asn1.define = require('./asn1/api').define; -1 9 asn1.base = require('./asn1/base'); -1 10 asn1.constants = require('./asn1/constants'); -1 11 asn1.decoders = require('./asn1/decoders'); -1 12 asn1.encoders = require('./asn1/encoders'); 36 1337 -1 /**38 -1 * Elements that can have labels: https://html.spec.whatwg.org/multipage/forms.html#category-label39 -1 * @const40 -1 * @type {string}41 -1 */42 -1 axs.utils.LABELABLE_ELEMENTS_SELECTOR =43 -1 'button,' +44 -1 'input:not([type=hidden]),' +45 -1 'keygen,' +46 -1 'meter,' +47 -1 'output,' +48 -1 'progress,' +49 -1 'select,' +50 -1 'textarea';-1 14 },{"./asn1/api":2,"./asn1/base":4,"./asn1/constants":8,"./asn1/decoders":10,"./asn1/encoders":13,"bn.js":15}],2:[function(require,module,exports){ -1 15 'use strict'; 51 16 -1 17 const encoders = require('./encoders'); -1 18 const decoders = require('./decoders'); -1 19 const inherits = require('inherits'); 52 2053 -1 /**54 -1 * @param {Element} element55 -1 * @return {boolean}56 -1 */57 -1 axs.utils.elementIsTransparent = function(element) {58 -1 return element.style.opacity == '0';59 -1 };-1 21 const api = exports; 60 2261 -1 /**62 -1 * @param {Element} element63 -1 * @return {boolean}64 -1 */65 -1 axs.utils.elementHasZeroArea = function(element) {66 -1 var rect = element.getBoundingClientRect();67 -1 var width = rect.right - rect.left;68 -1 var height = rect.top - rect.bottom;69 -1 if (!width || !height)70 -1 return true;71 -1 return false;-1 23 api.define = function define(name, body) { -1 24 return new Entity(name, body); 72 25 }; 73 2674 -1 /**75 -1 * @param {Element} element76 -1 * @return {boolean}77 -1 */78 -1 axs.utils.elementIsOutsideScrollArea = function(element) {79 -1 var parent = axs.dom.parentElement(element);-1 27 function Entity(name, body) { -1 28 this.name = name; -1 29 this.body = body; 80 3081 -1 var defaultView = element.ownerDocument.defaultView;82 -1 while (parent != defaultView.document.body) {83 -1 if (axs.utils.isClippedBy(element, parent))84 -1 return true;-1 31 this.decoders = {}; -1 32 this.encoders = {}; -1 33 } 85 3486 -1 if (axs.utils.canScrollTo(element, parent) && !axs.utils.elementIsOutsideScrollArea(parent))87 -1 return false;-1 35 Entity.prototype._createNamed = function createNamed(Base) { -1 36 const name = this.name; 88 3789 -1 parent = axs.dom.parentElement(parent);90 -1 }-1 38 function Generated(entity) { -1 39 this._initNamed(entity, name); -1 40 } -1 41 inherits(Generated, Base); -1 42 Generated.prototype._initNamed = function _initNamed(entity, name) { -1 43 Base.call(this, entity, name); -1 44 }; 91 4592 -1 return !axs.utils.canScrollTo(element, defaultView.document.body);-1 46 return new Generated(this); 93 47 }; 94 4895 -1 /**96 -1 * Checks whether it's possible to scroll to the given element within the given container.97 -1 * Assumes that |container| is an ancestor of |element|.98 -1 * If |container| cannot be scrolled, returns True if the element is within its bounding client99 -1 * rect.100 -1 * @param {Element} element101 -1 * @param {Element} container102 -1 * @return {boolean} True iff it's possible to scroll to |element| within |container|.103 -1 */104 -1 axs.utils.canScrollTo = function(element, container) {105 -1 var rect = element.getBoundingClientRect();106 -1 var containerRect = container.getBoundingClientRect();107 -1 if (container == container.ownerDocument.body) {108 -1 var absoluteTop = containerRect.top;109 -1 var absoluteLeft = containerRect.left;110 -1 } else {111 -1 var absoluteTop = containerRect.top - container.scrollTop;112 -1 var absoluteLeft = containerRect.left - container.scrollLeft;113 -1 }114 -1 var containerScrollArea =115 -1 { top: absoluteTop,116 -1 bottom: absoluteTop + container.scrollHeight,117 -1 left: absoluteLeft,118 -1 right: absoluteLeft + container.scrollWidth };119 -1120 -1 if (rect.right < containerScrollArea.left || rect.bottom < containerScrollArea.top ||121 -1 rect.left > containerScrollArea.right || rect.top > containerScrollArea.bottom) {122 -1 return false;123 -1 }124 -1125 -1 var defaultView = element.ownerDocument.defaultView;126 -1 var style = defaultView.getComputedStyle(container);-1 49 Entity.prototype._getDecoder = function _getDecoder(enc) { -1 50 enc = enc || 'der'; -1 51 // Lazily create decoder -1 52 if (!this.decoders.hasOwnProperty(enc)) -1 53 this.decoders[enc] = this._createNamed(decoders[enc]); -1 54 return this.decoders[enc]; -1 55 }; 127 56128 -1 if (rect.left > containerRect.right || rect.top > containerRect.bottom) {129 -1 return (style.overflow == 'scroll' || style.overflow == 'auto' ||130 -1 container instanceof defaultView.HTMLBodyElement);131 -1 }-1 57 Entity.prototype.decode = function decode(data, enc, options) { -1 58 return this._getDecoder(enc).decode(data, options); -1 59 }; 132 60133 -1 return true;-1 61 Entity.prototype._getEncoder = function _getEncoder(enc) { -1 62 enc = enc || 'der'; -1 63 // Lazily create encoder -1 64 if (!this.encoders.hasOwnProperty(enc)) -1 65 this.encoders[enc] = this._createNamed(encoders[enc]); -1 66 return this.encoders[enc]; 134 67 }; 135 68136 -1 /**137 -1 * Checks whether the given element is clipped by the given container.138 -1 * Assumes that |container| is an ancestor of |element|.139 -1 * @param {Element} element140 -1 * @param {Element} container141 -1 * @return {boolean} True iff |element| is clipped by |container|.142 -1 */143 -1 axs.utils.isClippedBy = function(element, container) {144 -1 var rect = element.getBoundingClientRect();145 -1 var containerRect = container.getBoundingClientRect();146 -1 var containerTop = containerRect.top;147 -1 var containerLeft = containerRect.left;148 -1 var containerScrollArea =149 -1 { top: containerTop - container.scrollTop,150 -1 bottom: containerTop - container.scrollTop + container.scrollHeight,151 -1 left: containerLeft - container.scrollLeft,152 -1 right: containerLeft - container.scrollLeft + container.scrollWidth };-1 69 Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) { -1 70 return this._getEncoder(enc).encode(data, reporter); -1 71 }; 153 72154 -1 var defaultView = element.ownerDocument.defaultView;155 -1 var style = defaultView.getComputedStyle(container);-1 73 },{"./decoders":10,"./encoders":13,"inherits":132}],3:[function(require,module,exports){ -1 74 'use strict'; 156 75157 -1 if ((rect.right < containerRect.left || rect.bottom < containerRect.top ||158 -1 rect.left > containerRect.right || rect.top > containerRect.bottom) &&159 -1 style.overflow == 'hidden') {160 -1 return true;161 -1 }-1 76 const inherits = require('inherits'); -1 77 const Reporter = require('../base/reporter').Reporter; -1 78 const Buffer = require('safer-buffer').Buffer; 162 79163 -1 if (rect.right < containerScrollArea.left || rect.bottom < containerScrollArea.top)164 -1 return (style.overflow != 'visible');-1 80 function DecoderBuffer(base, options) { -1 81 Reporter.call(this, options); -1 82 if (!Buffer.isBuffer(base)) { -1 83 this.error('Input not Buffer'); -1 84 return; -1 85 } 165 86166 -1 return false;167 -1 };-1 87 this.base = base; -1 88 this.offset = 0; -1 89 this.length = base.length; -1 90 } -1 91 inherits(DecoderBuffer, Reporter); -1 92 exports.DecoderBuffer = DecoderBuffer; 168 93169 -1 /**170 -1 * @param {Node} ancestor A potential ancestor of |node|.171 -1 * @param {Node} node172 -1 * @return {boolean} true if |ancestor| is an ancestor of |node| (including173 -1 * |ancestor| === |node|).174 -1 */175 -1 axs.utils.isAncestor = function(ancestor, node) {176 -1 if (node == null)177 -1 return false;178 -1 if (node === ancestor)179 -1 return true;-1 94 DecoderBuffer.isDecoderBuffer = function isDecoderBuffer(data) { -1 95 if (data instanceof DecoderBuffer) { -1 96 return true; -1 97 } 180 98181 -1 var parentNode = axs.dom.composedParentNode(node);182 -1 return axs.utils.isAncestor(ancestor, parentNode);-1 99 // Or accept compatible API -1 100 const isCompatible = typeof data === 'object' && -1 101 Buffer.isBuffer(data.base) && -1 102 data.constructor.name === 'DecoderBuffer' && -1 103 typeof data.offset === 'number' && -1 104 typeof data.length === 'number' && -1 105 typeof data.save === 'function' && -1 106 typeof data.restore === 'function' && -1 107 typeof data.isEmpty === 'function' && -1 108 typeof data.readUInt8 === 'function' && -1 109 typeof data.skip === 'function' && -1 110 typeof data.raw === 'function'; -1 111 -1 112 return isCompatible; 183 113 }; 184 114185 -1 /**186 -1 * @param {Element} element187 -1 * @return {Array.<Element>} An array of any non-transparent elements which188 -1 * overlap the given element.189 -1 */190 -1 axs.utils.overlappingElements = function(element) {191 -1 if (axs.utils.elementHasZeroArea(element))192 -1 return null;-1 115 DecoderBuffer.prototype.save = function save() { -1 116 return { offset: this.offset, reporter: Reporter.prototype.save.call(this) }; -1 117 }; 193 118194 -1 var overlappingElements = [];195 -1 var clientRects = element.getClientRects();196 -1 for (var i = 0; i < clientRects.length; i++) {197 -1 var rect = clientRects[i];198 -1 var center_x = (rect.left + rect.right) / 2;199 -1 var center_y = (rect.top + rect.bottom) / 2;200 -1 var elementAtPoint = document.elementFromPoint(center_x, center_y);-1 119 DecoderBuffer.prototype.restore = function restore(save) { -1 120 // Return skipped data -1 121 const res = new DecoderBuffer(this.base); -1 122 res.offset = save.offset; -1 123 res.length = this.offset; 201 124202 -1 if (elementAtPoint == null || elementAtPoint == element ||203 -1 axs.utils.isAncestor(elementAtPoint, element) ||204 -1 axs.utils.isAncestor(element, elementAtPoint)) {205 -1 continue;206 -1 }-1 125 this.offset = save.offset; -1 126 Reporter.prototype.restore.call(this, save.reporter); 207 127208 -1 var overlappingElementStyle = window.getComputedStyle(elementAtPoint, null);209 -1 if (!overlappingElementStyle)210 -1 continue;-1 128 return res; -1 129 }; 211 130212 -1 var overlappingElementBg = axs.utils.getBgColor(overlappingElementStyle,213 -1 elementAtPoint);214 -1 if (overlappingElementBg && overlappingElementBg.alpha > 0 &&215 -1 overlappingElements.indexOf(elementAtPoint) < 0) {216 -1 overlappingElements.push(elementAtPoint);217 -1 }218 -1 }-1 131 DecoderBuffer.prototype.isEmpty = function isEmpty() { -1 132 return this.offset === this.length; -1 133 }; 219 134220 -1 return overlappingElements;-1 135 DecoderBuffer.prototype.readUInt8 = function readUInt8(fail) { -1 136 if (this.offset + 1 <= this.length) -1 137 return this.base.readUInt8(this.offset++, true); -1 138 else -1 139 return this.error(fail || 'DecoderBuffer overrun'); 221 140 }; 222 141223 -1 /**224 -1 * @param {Element} element225 -1 * @return {boolean}226 -1 */227 -1 axs.utils.elementIsHtmlControl = function(element) {228 -1 var defaultView = element.ownerDocument.defaultView;-1 142 DecoderBuffer.prototype.skip = function skip(bytes, fail) { -1 143 if (!(this.offset + bytes <= this.length)) -1 144 return this.error(fail || 'DecoderBuffer overrun'); 229 145230 -1 // HTML control231 -1 if (element instanceof defaultView.HTMLButtonElement)232 -1 return true;233 -1 if (element instanceof defaultView.HTMLInputElement)234 -1 return true;235 -1 if (element instanceof defaultView.HTMLSelectElement)236 -1 return true;237 -1 if (element instanceof defaultView.HTMLTextAreaElement)238 -1 return true;-1 146 const res = new DecoderBuffer(this.base); 239 147240 -1 return false;241 -1 };-1 148 // Share reporter state -1 149 res._reporterState = this._reporterState; 242 150243 -1 /**244 -1 * @param {Element} element245 -1 * @return {boolean}246 -1 */247 -1 axs.utils.elementIsAriaWidget = function(element) {248 -1 if (element.hasAttribute('role')) {249 -1 var roleValue = element.getAttribute('role');250 -1 // TODO is this correct?251 -1 if (roleValue) {252 -1 var role = axs.constants.ARIA_ROLES[roleValue];253 -1 if (role && 'widget' in role['allParentRolesSet'])254 -1 return true;255 -1 }256 -1 }257 -1 return false;-1 151 res.offset = this.offset; -1 152 res.length = this.offset + bytes; -1 153 this.offset += bytes; -1 154 return res; 258 155 }; 259 156260 -1 /**261 -1 * @param {Element} element262 -1 * @return {boolean}263 -1 */264 -1 axs.utils.elementIsVisible = function(element) {265 -1 if (axs.utils.elementIsTransparent(element))266 -1 return false;267 -1 if (axs.utils.elementHasZeroArea(element))268 -1 return false;269 -1 if (axs.utils.elementIsOutsideScrollArea(element))270 -1 return false;-1 157 DecoderBuffer.prototype.raw = function raw(save) { -1 158 return this.base.slice(save ? save.offset : this.offset, this.length); -1 159 }; 271 160272 -1 var overlappingElements = axs.utils.overlappingElements(element);273 -1 if (overlappingElements.length)274 -1 return false;-1 161 function EncoderBuffer(value, reporter) { -1 162 if (Array.isArray(value)) { -1 163 this.length = 0; -1 164 this.value = value.map(function(item) { -1 165 if (!EncoderBuffer.isEncoderBuffer(item)) -1 166 item = new EncoderBuffer(item, reporter); -1 167 this.length += item.length; -1 168 return item; -1 169 }, this); -1 170 } else if (typeof value === 'number') { -1 171 if (!(0 <= value && value <= 0xff)) -1 172 return reporter.error('non-byte EncoderBuffer value'); -1 173 this.value = value; -1 174 this.length = 1; -1 175 } else if (typeof value === 'string') { -1 176 this.value = value; -1 177 this.length = Buffer.byteLength(value); -1 178 } else if (Buffer.isBuffer(value)) { -1 179 this.value = value; -1 180 this.length = value.length; -1 181 } else { -1 182 return reporter.error('Unsupported type: ' + typeof value); -1 183 } -1 184 } -1 185 exports.EncoderBuffer = EncoderBuffer; 275 186 -1 187 EncoderBuffer.isEncoderBuffer = function isEncoderBuffer(data) { -1 188 if (data instanceof EncoderBuffer) { 276 189 return true; -1 190 } -1 191 -1 192 // Or accept compatible API -1 193 const isCompatible = typeof data === 'object' && -1 194 data.constructor.name === 'EncoderBuffer' && -1 195 typeof data.length === 'number' && -1 196 typeof data.join === 'function'; -1 197 -1 198 return isCompatible; 277 199 }; 278 200279 -1 /**280 -1 * @param {CSSStyleDeclaration} style281 -1 * @return {boolean}282 -1 */283 -1 axs.utils.isLargeFont = function(style) {284 -1 var fontSize = style.fontSize;285 -1 var bold = style.fontWeight == 'bold';286 -1 var matches = fontSize.match(/(\d+)px/);287 -1 if (matches) {288 -1 var fontSizePx = parseInt(matches[1], 10);289 -1 var bodyStyle = window.getComputedStyle(document.body, null);290 -1 var bodyFontSize = bodyStyle.fontSize;291 -1 matches = bodyFontSize.match(/(\d+)px/);292 -1 if (matches) {293 -1 var bodyFontSizePx = parseInt(matches[1], 10);294 -1 var boldLarge = bodyFontSizePx * 1.2;295 -1 var large = bodyFontSizePx * 1.5;296 -1 } else {297 -1 var boldLarge = 19.2;298 -1 var large = 24;299 -1 }300 -1 return (bold && fontSizePx >= boldLarge || fontSizePx >= large);301 -1 }302 -1 matches = fontSize.match(/(\d+)em/);303 -1 if (matches) {304 -1 var fontSizeEm = parseInt(matches[1], 10);305 -1 if (bold && fontSizeEm >= 1.2 || fontSizeEm >= 1.5)306 -1 return true;307 -1 return false;308 -1 }309 -1 matches = fontSize.match(/(\d+)%/);310 -1 if (matches) {311 -1 var fontSizePercent = parseInt(matches[1], 10);312 -1 if (bold && fontSizePercent >= 120 || fontSizePercent >= 150)313 -1 return true;314 -1 return false;315 -1 }316 -1 matches = fontSize.match(/(\d+)pt/);317 -1 if (matches) {318 -1 var fontSizePt = parseInt(matches[1], 10);319 -1 if (bold && fontSizePt >= 14 || fontSizePt >= 18)320 -1 return true;321 -1 return false;322 -1 }323 -1 return false;-1 201 EncoderBuffer.prototype.join = function join(out, offset) { -1 202 if (!out) -1 203 out = Buffer.alloc(this.length); -1 204 if (!offset) -1 205 offset = 0; -1 206 -1 207 if (this.length === 0) -1 208 return out; -1 209 -1 210 if (Array.isArray(this.value)) { -1 211 this.value.forEach(function(item) { -1 212 item.join(out, offset); -1 213 offset += item.length; -1 214 }); -1 215 } else { -1 216 if (typeof this.value === 'number') -1 217 out[offset] = this.value; -1 218 else if (typeof this.value === 'string') -1 219 out.write(this.value, offset); -1 220 else if (Buffer.isBuffer(this.value)) -1 221 this.value.copy(out, offset); -1 222 offset += this.length; -1 223 } -1 224 -1 225 return out; 324 226 }; 325 227326 -1 /**327 -1 * @param {CSSStyleDeclaration} style328 -1 * @param {Element} element329 -1 * @return {?axs.color.Color}330 -1 */331 -1 axs.utils.getBgColor = function(style, element) {332 -1 var bgColorString = style.backgroundColor;333 -1 var bgColor = axs.color.parseColor(bgColorString);334 -1 if (!bgColor)335 -1 return null;-1 228 },{"../base/reporter":6,"inherits":132,"safer-buffer":161}],4:[function(require,module,exports){ -1 229 'use strict'; 336 230337 -1 if (style.opacity < 1)338 -1 bgColor.alpha = bgColor.alpha * style.opacity;-1 231 const base = exports; 339 232340 -1 if (bgColor.alpha < 1) {341 -1 var parentBg = axs.utils.getParentBgColor(element);342 -1 if (parentBg == null)343 -1 return null;-1 233 base.Reporter = require('./reporter').Reporter; -1 234 base.DecoderBuffer = require('./buffer').DecoderBuffer; -1 235 base.EncoderBuffer = require('./buffer').EncoderBuffer; -1 236 base.Node = require('./node'); 344 237345 -1 bgColor = axs.color.flattenColors(bgColor, parentBg);346 -1 }347 -1 return bgColor;348 -1 };-1 238 },{"./buffer":3,"./node":5,"./reporter":6}],5:[function(require,module,exports){ -1 239 'use strict'; 349 240350 -1 /**351 -1 * Gets the effective background color of the parent of |element|.352 -1 * @param {Element} element353 -1 * @return {?axs.color.Color}354 -1 */355 -1 axs.utils.getParentBgColor = function(element) {356 -1 /** @type {Element} */ var parent = element;357 -1 var bgStack = [];358 -1 var foundSolidColor = null;359 -1 while ((parent = axs.dom.parentElement(parent))) {360 -1 var computedStyle = window.getComputedStyle(parent, null);361 -1 if (!computedStyle)362 -1 continue;-1 241 const Reporter = require('../base/reporter').Reporter; -1 242 const EncoderBuffer = require('../base/buffer').EncoderBuffer; -1 243 const DecoderBuffer = require('../base/buffer').DecoderBuffer; -1 244 const assert = require('minimalistic-assert'); 363 245364 -1 var parentBg = axs.color.parseColor(computedStyle.backgroundColor);365 -1 if (!parentBg)366 -1 continue;-1 246 // Supported tags -1 247 const tags = [ -1 248 'seq', 'seqof', 'set', 'setof', 'objid', 'bool', -1 249 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc', -1 250 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str', -1 251 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr' -1 252 ]; 367 253368 -1 if (computedStyle.opacity < 1)369 -1 parentBg.alpha = parentBg.alpha * computedStyle.opacity;-1 254 // Public methods list -1 255 const methods = [ -1 256 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice', -1 257 'any', 'contains' -1 258 ].concat(tags); 370 259371 -1 if (parentBg.alpha == 0)372 -1 continue;-1 260 // Overrided methods list -1 261 const overrided = [ -1 262 '_peekTag', '_decodeTag', '_use', -1 263 '_decodeStr', '_decodeObjid', '_decodeTime', -1 264 '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList', 373 265374 -1 bgStack.push(parentBg);-1 266 '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime', -1 267 '_encodeNull', '_encodeInt', '_encodeBool' -1 268 ]; 375 269376 -1 if (parentBg.alpha == 1) {377 -1 foundSolidColor = true;378 -1 break;379 -1 }380 -1 }-1 270 function Node(enc, parent, name) { -1 271 const state = {}; -1 272 this._baseState = state; -1 273 -1 274 state.name = name; -1 275 state.enc = enc; -1 276 -1 277 state.parent = parent || null; -1 278 state.children = null; -1 279 -1 280 // State -1 281 state.tag = null; -1 282 state.args = null; -1 283 state.reverseArgs = null; -1 284 state.choice = null; -1 285 state.optional = false; -1 286 state.any = false; -1 287 state.obj = false; -1 288 state.use = null; -1 289 state.useDecoder = null; -1 290 state.key = null; -1 291 state['default'] = null; -1 292 state.explicit = null; -1 293 state.implicit = null; -1 294 state.contains = null; -1 295 -1 296 // Should create new instance on each method -1 297 if (!state.parent) { -1 298 state.children = []; -1 299 this._wrap(); -1 300 } -1 301 } -1 302 module.exports = Node; 381 303382 -1 if (!foundSolidColor)383 -1 bgStack.push(new axs.color.Color(255, 255, 255, 1));-1 304 const stateProps = [ -1 305 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice', -1 306 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit', -1 307 'implicit', 'contains' -1 308 ]; 384 309385 -1 var bg = bgStack.pop();386 -1 while (bgStack.length) {387 -1 var fg = bgStack.pop();388 -1 bg = axs.color.flattenColors(fg, bg);389 -1 }390 -1 return bg;-1 310 Node.prototype.clone = function clone() { -1 311 const state = this._baseState; -1 312 const cstate = {}; -1 313 stateProps.forEach(function(prop) { -1 314 cstate[prop] = state[prop]; -1 315 }); -1 316 const res = new this.constructor(cstate.parent); -1 317 res._baseState = cstate; -1 318 return res; 391 319 }; 392 320393 -1 /**394 -1 * @param {CSSStyleDeclaration} style395 -1 * @param {Element} element396 -1 * @param {axs.color.Color} bgColor The background color, which may come from397 -1 * another element (such as a parent element), for flattening into the398 -1 * foreground color.399 -1 * @return {?axs.color.Color}400 -1 */401 -1 axs.utils.getFgColor = function(style, element, bgColor) {402 -1 var fgColorString = style.color;403 -1 var fgColor = axs.color.parseColor(fgColorString);404 -1 if (!fgColor)405 -1 return null;-1 321 Node.prototype._wrap = function wrap() { -1 322 const state = this._baseState; -1 323 methods.forEach(function(method) { -1 324 this[method] = function _wrappedMethod() { -1 325 const clone = new this.constructor(this); -1 326 state.children.push(clone); -1 327 return clone[method].apply(clone, arguments); -1 328 }; -1 329 }, this); -1 330 }; 406 331407 -1 if (fgColor.alpha < 1)408 -1 fgColor = axs.color.flattenColors(fgColor, bgColor);-1 332 Node.prototype._init = function init(body) { -1 333 const state = this._baseState; 409 334410 -1 if (style.opacity < 1) {411 -1 var parentBg = axs.utils.getParentBgColor(element);412 -1 fgColor.alpha = fgColor.alpha * style.opacity;413 -1 fgColor = axs.color.flattenColors(fgColor, parentBg);414 -1 }-1 335 assert(state.parent === null); -1 336 body.call(this); 415 337416 -1 return fgColor;-1 338 // Filter children -1 339 state.children = state.children.filter(function(child) { -1 340 return child._baseState.parent === this; -1 341 }, this); -1 342 assert.equal(state.children.length, 1, 'Root node can have only one child'); 417 343 }; 418 344419 -1 /**420 -1 * @param {Element} element421 -1 * @return {?number}422 -1 */423 -1 axs.utils.getContrastRatioForElement = function(element) {424 -1 var style = window.getComputedStyle(element, null);425 -1 return axs.utils.getContrastRatioForElementWithComputedStyle(style, element);-1 345 Node.prototype._useArgs = function useArgs(args) { -1 346 const state = this._baseState; -1 347 -1 348 // Filter children and args -1 349 const children = args.filter(function(arg) { -1 350 return arg instanceof this.constructor; -1 351 }, this); -1 352 args = args.filter(function(arg) { -1 353 return !(arg instanceof this.constructor); -1 354 }, this); -1 355 -1 356 if (children.length !== 0) { -1 357 assert(state.children === null); -1 358 state.children = children; -1 359 -1 360 // Replace parent to maintain backward link -1 361 children.forEach(function(child) { -1 362 child._baseState.parent = this; -1 363 }, this); -1 364 } -1 365 if (args.length !== 0) { -1 366 assert(state.args === null); -1 367 state.args = args; -1 368 state.reverseArgs = args.map(function(arg) { -1 369 if (typeof arg !== 'object' || arg.constructor !== Object) -1 370 return arg; -1 371 -1 372 const res = {}; -1 373 Object.keys(arg).forEach(function(key) { -1 374 if (key == (key | 0)) -1 375 key |= 0; -1 376 const value = arg[key]; -1 377 res[value] = key; -1 378 }); -1 379 return res; -1 380 }); -1 381 } 426 382 }; 427 383428 -1 /**429 -1 * @param {CSSStyleDeclaration} style430 -1 * @param {Element} element431 -1 * @return {?number}432 -1 */433 -1 axs.utils.getContrastRatioForElementWithComputedStyle = function(style, element) {434 -1 if (axs.utils.isElementHidden(element))435 -1 return null;-1 384 // -1 385 // Overrided methods -1 386 // 436 387437 -1 var bgColor = axs.utils.getBgColor(style, element);438 -1 if (!bgColor)439 -1 return null;-1 388 overrided.forEach(function(method) { -1 389 Node.prototype[method] = function _overrided() { -1 390 const state = this._baseState; -1 391 throw new Error(method + ' not implemented for encoding: ' + state.enc); -1 392 }; -1 393 }); 440 394441 -1 var fgColor = axs.utils.getFgColor(style, element, bgColor);442 -1 if (!fgColor)443 -1 return null;-1 395 // -1 396 // Public methods -1 397 // 444 398445 -1 return axs.color.calculateContrastRatio(fgColor, bgColor);446 -1 };-1 399 tags.forEach(function(tag) { -1 400 Node.prototype[tag] = function _tagMethod() { -1 401 const state = this._baseState; -1 402 const args = Array.prototype.slice.call(arguments); 447 403448 -1 /**449 -1 * @param {Element} element450 -1 * @return {boolean}451 -1 */452 -1 axs.utils.isNativeTextElement = function(element) {453 -1 var tagName = element.tagName.toLowerCase();454 -1 var type = element.type ? element.type.toLowerCase() : '';455 -1 if (tagName == 'textarea')456 -1 return true;457 -1 if (tagName != 'input')458 -1 return false;-1 404 assert(state.tag === null); -1 405 state.tag = tag; 459 406460 -1 switch (type) {461 -1 case 'email':462 -1 case 'number':463 -1 case 'password':464 -1 case 'search':465 -1 case 'text':466 -1 case 'tel':467 -1 case 'url':468 -1 case '':469 -1 return true;470 -1 default:471 -1 return false;472 -1 }473 -1 };-1 407 this._useArgs(args); 474 408475 -1 /**476 -1 * @param {number} contrastRatio477 -1 * @param {CSSStyleDeclaration} style478 -1 * @param {boolean=} opt_strict Whether to use AA (false) or AAA (true) level479 -1 * @return {boolean}480 -1 */481 -1 axs.utils.isLowContrast = function(contrastRatio, style, opt_strict) {482 -1 // Round to nearest 0.1483 -1 var roundedContrastRatio = (Math.round(contrastRatio * 10) / 10);484 -1 if (!opt_strict) {485 -1 return roundedContrastRatio < 3.0 ||486 -1 (!axs.utils.isLargeFont(style) && roundedContrastRatio < 4.5);487 -1 } else {488 -1 return roundedContrastRatio < 4.5 ||489 -1 (!axs.utils.isLargeFont(style) && roundedContrastRatio < 7.0);490 -1 }-1 409 return this; -1 410 }; -1 411 }); -1 412 -1 413 Node.prototype.use = function use(item) { -1 414 assert(item); -1 415 const state = this._baseState; -1 416 -1 417 assert(state.use === null); -1 418 state.use = item; -1 419 -1 420 return this; 491 421 }; 492 422493 -1 /**494 -1 * @param {Element} element495 -1 * @return {boolean}496 -1 */497 -1 axs.utils.hasLabel = function(element) {498 -1 var tagName = element.tagName.toLowerCase();499 -1 var type = element.type ? element.type.toLowerCase() : '';-1 423 Node.prototype.optional = function optional() { -1 424 const state = this._baseState; 500 425501 -1 if (element.hasAttribute('aria-label'))502 -1 return true;503 -1 if (element.hasAttribute('title'))504 -1 return true;505 -1 if (tagName == 'img' && element.hasAttribute('alt'))506 -1 return true;507 -1 if (tagName == 'input' && type == 'image' && element.hasAttribute('alt'))508 -1 return true;509 -1 if (tagName == 'input' && (type == 'submit' || type == 'reset'))510 -1 return true;-1 426 state.optional = true; 511 427512 -1 // There's a separate audit that makes sure this points to an actual element or elements.513 -1 if (element.hasAttribute('aria-labelledby'))514 -1 return true;-1 428 return this; -1 429 }; 515 430516 -1 if (element.hasAttribute('id')) {517 -1 var labelsFor = document.querySelectorAll('label[for="' + element.id + '"]');518 -1 if (labelsFor.length > 0)519 -1 return true;520 -1 }-1 431 Node.prototype.def = function def(val) { -1 432 const state = this._baseState; 521 433522 -1 var parent = axs.dom.parentElement(element);523 -1 while (parent) {524 -1 if (parent.tagName.toLowerCase() == 'label') {525 -1 var parentLabel = /** HTMLLabelElement */ parent;526 -1 if (parentLabel.control == element)527 -1 return true;528 -1 }529 -1 parent = axs.dom.parentElement(parent);530 -1 }531 -1 return false;-1 434 assert(state['default'] === null); -1 435 state['default'] = val; -1 436 state.optional = true; -1 437 -1 438 return this; 532 439 }; 533 440534 -1 /**535 -1 * Determine if this element natively supports being disabled (i.e. via the `disabled` attribute.536 -1 * Disabled here means that the element should be considered disabled according to specification.537 -1 * This element may or may not be effectively disabled in practice as this is dependent on implementation.538 -1 *539 -1 * @param {Element} element An element to check.540 -1 * @return {boolean} true If the element supports being natively disabled.541 -1 */542 -1 axs.utils.isNativelyDisableable = function(element) {543 -1 var tagName = element.tagName.toUpperCase();544 -1 return (tagName in axs.constants.NATIVELY_DISABLEABLE);-1 441 Node.prototype.explicit = function explicit(num) { -1 442 const state = this._baseState; -1 443 -1 444 assert(state.explicit === null && state.implicit === null); -1 445 state.explicit = num; -1 446 -1 447 return this; 545 448 }; 546 449547 -1 /**548 -1 * Determine if this element is disabled directly or indirectly by a disabled ancestor.549 -1 * Disabled here means that the element should be considered disabled according to specification.550 -1 * This element may or may not be effectively disabled in practice as this is dependent on implementation.551 -1 *552 -1 * @param {Element} element An element to check.553 -1 * @param {boolean=} ignoreAncestors If true do not check for disabled ancestors.554 -1 * @return {boolean} true if the element or one of its ancestors is disabled.555 -1 */556 -1 axs.utils.isElementDisabled = function(element, ignoreAncestors) {557 -1 var selector = ignoreAncestors ? '[aria-disabled=true]' : '[aria-disabled=true], [aria-disabled=true] *';558 -1 if (axs.browserUtils.matchSelector(element, selector)) {559 -1 return true;-1 450 Node.prototype.implicit = function implicit(num) { -1 451 const state = this._baseState; -1 452 -1 453 assert(state.explicit === null && state.implicit === null); -1 454 state.implicit = num; -1 455 -1 456 return this; -1 457 }; -1 458 -1 459 Node.prototype.obj = function obj() { -1 460 const state = this._baseState; -1 461 const args = Array.prototype.slice.call(arguments); -1 462 -1 463 state.obj = true; -1 464 -1 465 if (args.length !== 0) -1 466 this._useArgs(args); -1 467 -1 468 return this; -1 469 }; -1 470 -1 471 Node.prototype.key = function key(newKey) { -1 472 const state = this._baseState; -1 473 -1 474 assert(state.key === null); -1 475 state.key = newKey; -1 476 -1 477 return this; -1 478 }; -1 479 -1 480 Node.prototype.any = function any() { -1 481 const state = this._baseState; -1 482 -1 483 state.any = true; -1 484 -1 485 return this; -1 486 }; -1 487 -1 488 Node.prototype.choice = function choice(obj) { -1 489 const state = this._baseState; -1 490 -1 491 assert(state.choice === null); -1 492 state.choice = obj; -1 493 this._useArgs(Object.keys(obj).map(function(key) { -1 494 return obj[key]; -1 495 })); -1 496 -1 497 return this; -1 498 }; -1 499 -1 500 Node.prototype.contains = function contains(item) { -1 501 const state = this._baseState; -1 502 -1 503 assert(state.use === null); -1 504 state.contains = item; -1 505 -1 506 return this; -1 507 }; -1 508 -1 509 // -1 510 // Decoding -1 511 // -1 512 -1 513 Node.prototype._decode = function decode(input, options) { -1 514 const state = this._baseState; -1 515 -1 516 // Decode root node -1 517 if (state.parent === null) -1 518 return input.wrapResult(state.children[0]._decode(input, options)); -1 519 -1 520 let result = state['default']; -1 521 let present = true; -1 522 -1 523 let prevKey = null; -1 524 if (state.key !== null) -1 525 prevKey = input.enterKey(state.key); -1 526 -1 527 // Check if tag is there -1 528 if (state.optional) { -1 529 let tag = null; -1 530 if (state.explicit !== null) -1 531 tag = state.explicit; -1 532 else if (state.implicit !== null) -1 533 tag = state.implicit; -1 534 else if (state.tag !== null) -1 535 tag = state.tag; -1 536 -1 537 if (tag === null && !state.any) { -1 538 // Trial and Error -1 539 const save = input.save(); -1 540 try { -1 541 if (state.choice === null) -1 542 this._decodeGeneric(state.tag, input, options); -1 543 else -1 544 this._decodeChoice(input, options); -1 545 present = true; -1 546 } catch (e) { -1 547 present = false; -1 548 } -1 549 input.restore(save); -1 550 } else { -1 551 present = this._peekTag(input, tag, state.any); -1 552 -1 553 if (input.isError(present)) -1 554 return present; 560 555 }561 -1 if (!axs.utils.isNativelyDisableable(element) ||562 -1 axs.browserUtils.matchSelector(element, 'fieldset>legend:first-of-type *')) {563 -1 return false;-1 556 } -1 557 -1 558 // Push object on stack -1 559 let prevObj; -1 560 if (state.obj && present) -1 561 prevObj = input.enterObject(); -1 562 -1 563 if (present) { -1 564 // Unwrap explicit values -1 565 if (state.explicit !== null) { -1 566 const explicit = this._decodeTag(input, state.explicit); -1 567 if (input.isError(explicit)) -1 568 return explicit; -1 569 input = explicit; 564 570 }565 -1 for (var next = element; next !== null; next = axs.dom.parentElement(next)) {566 -1 if (next.hasAttribute('disabled')) {567 -1 return true;568 -1 }569 -1 if (ignoreAncestors) {570 -1 return false;571 -1 }-1 571 -1 572 const start = input.offset; -1 573 -1 574 // Unwrap implicit and normal values -1 575 if (state.use === null && state.choice === null) { -1 576 let save; -1 577 if (state.any) -1 578 save = input.save(); -1 579 const body = this._decodeTag( -1 580 input, -1 581 state.implicit !== null ? state.implicit : state.tag, -1 582 state.any -1 583 ); -1 584 if (input.isError(body)) -1 585 return body; -1 586 -1 587 if (state.any) -1 588 result = input.raw(save); -1 589 else -1 590 input = body; 572 591 }573 -1 return false;574 -1 };575 592576 -1 /**577 -1 * @param {Element} element An element to check.578 -1 * @return {boolean} True if the element is hidden from accessibility.579 -1 */580 -1 axs.utils.isElementHidden = function(element) {581 -1 if (!(element instanceof element.ownerDocument.defaultView.HTMLElement))582 -1 return false;-1 593 if (options && options.track && state.tag !== null) -1 594 options.track(input.path(), start, input.length, 'tagged'); 583 595584 -1 if (element.hasAttribute('chromevoxignoreariahidden'))585 -1 var chromevoxignoreariahidden = true;-1 596 if (options && options.track && state.tag !== null) -1 597 options.track(input.path(), input.offset, input.length, 'content'); 586 598587 -1 var style = window.getComputedStyle(element, null);588 -1 if (style.display == 'none' || style.visibility == 'hidden')589 -1 return true;-1 599 // Select proper method for tag -1 600 if (state.any) { -1 601 // no-op -1 602 } else if (state.choice === null) { -1 603 result = this._decodeGeneric(state.tag, input, options); -1 604 } else { -1 605 result = this._decodeChoice(input, options); -1 606 } 590 607591 -1 if (element.hasAttribute('aria-hidden') &&592 -1 element.getAttribute('aria-hidden').toLowerCase() == 'true') {593 -1 return !chromevoxignoreariahidden;-1 608 if (input.isError(result)) -1 609 return result; -1 610 -1 611 // Decode children -1 612 if (!state.any && state.choice === null && state.children !== null) { -1 613 state.children.forEach(function decodeChildren(child) { -1 614 // NOTE: We are ignoring errors here, to let parser continue with other -1 615 // parts of encoded data -1 616 child._decode(input, options); -1 617 }); 594 618 } 595 619596 -1 return false;-1 620 // Decode contained/encoded by schema, only in bit or octet strings -1 621 if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) { -1 622 const data = new DecoderBuffer(result); -1 623 result = this._getUse(state.contains, input._reporterState.obj) -1 624 ._decode(data, options); -1 625 } -1 626 } -1 627 -1 628 // Pop object -1 629 if (state.obj && present) -1 630 result = input.leaveObject(prevObj); -1 631 -1 632 // Set key -1 633 if (state.key !== null && (result !== null || present === true)) -1 634 input.leaveKey(prevKey, state.key, result); -1 635 else if (prevKey !== null) -1 636 input.exitKey(prevKey); -1 637 -1 638 return result; 597 639 }; 598 640599 -1 /**600 -1 * @param {Element} element An element to check.601 -1 * @return {boolean} True if the element or one of its ancestors is602 -1 * hidden from accessibility.603 -1 */604 -1 axs.utils.isElementOrAncestorHidden = function(element) {605 -1 if (axs.utils.isElementHidden(element))606 -1 return true;-1 641 Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) { -1 642 const state = this._baseState; 607 643608 -1 if (axs.dom.parentElement(element))609 -1 return axs.utils.isElementOrAncestorHidden(axs.dom.parentElement(element));610 -1 else611 -1 return false;-1 644 if (tag === 'seq' || tag === 'set') -1 645 return null; -1 646 if (tag === 'seqof' || tag === 'setof') -1 647 return this._decodeList(input, tag, state.args[0], options); -1 648 else if (/str$/.test(tag)) -1 649 return this._decodeStr(input, tag, options); -1 650 else if (tag === 'objid' && state.args) -1 651 return this._decodeObjid(input, state.args[0], state.args[1], options); -1 652 else if (tag === 'objid') -1 653 return this._decodeObjid(input, null, null, options); -1 654 else if (tag === 'gentime' || tag === 'utctime') -1 655 return this._decodeTime(input, tag, options); -1 656 else if (tag === 'null_') -1 657 return this._decodeNull(input, options); -1 658 else if (tag === 'bool') -1 659 return this._decodeBool(input, options); -1 660 else if (tag === 'objDesc') -1 661 return this._decodeStr(input, tag, options); -1 662 else if (tag === 'int' || tag === 'enum') -1 663 return this._decodeInt(input, state.args && state.args[0], options); -1 664 -1 665 if (state.use !== null) { -1 666 return this._getUse(state.use, input._reporterState.obj) -1 667 ._decode(input, options); -1 668 } else { -1 669 return input.error('unknown tag: ' + tag); -1 670 } 612 671 }; 613 672614 -1 /**615 -1 * @param {Element} element An element to check616 -1 * @return {boolean} True if the given element is an inline element, false617 -1 * otherwise.618 -1 */619 -1 axs.utils.isInlineElement = function(element) {620 -1 var tagName = element.tagName.toUpperCase();621 -1 return axs.constants.InlineElements[tagName];-1 673 Node.prototype._getUse = function _getUse(entity, obj) { -1 674 -1 675 const state = this._baseState; -1 676 // Create altered use decoder if implicit is set -1 677 state.useDecoder = this._use(entity, obj); -1 678 assert(state.useDecoder._baseState.parent === null); -1 679 state.useDecoder = state.useDecoder._baseState.children[0]; -1 680 if (state.implicit !== state.useDecoder._baseState.implicit) { -1 681 state.useDecoder = state.useDecoder.clone(); -1 682 state.useDecoder._baseState.implicit = state.implicit; -1 683 } -1 684 return state.useDecoder; 622 685 }; 623 686624 -1 /**625 -1 *626 -1 * Gets role details from an element.627 -1 * @param {Element} element The DOM element whose role we want.628 -1 * @param {boolean=} implicit if true then implicit semantics will be considered if there is no role attribute.629 -1 *630 -1 * @return {Object}631 -1 */632 -1 axs.utils.getRoles = function(element, implicit) {633 -1 if (!element || element.nodeType !== Node.ELEMENT_NODE || (!element.hasAttribute('role') && !implicit))634 -1 return null;635 -1 var roleValue = element.getAttribute('role');636 -1 if (!roleValue && implicit)637 -1 roleValue = axs.properties.getImplicitRole(element);638 -1 if (!roleValue) // role='' or implicit role came up empty639 -1 return null;640 -1 var roleNames = roleValue.split(' ');641 -1 var result = { roles: [], valid: false };642 -1 for (var i = 0; i < roleNames.length; i++) {643 -1 var role = roleNames[i];644 -1 var ariaRole = axs.constants.ARIA_ROLES[role];645 -1 var roleObject = { 'name': role };646 -1 if (ariaRole && !ariaRole.abstract) {647 -1 roleObject.details = ariaRole;648 -1 if (!result.applied) {649 -1 result.applied = roleObject;650 -1 }651 -1 roleObject.valid = result.valid = true;652 -1 } else {653 -1 roleObject.valid = false;654 -1 }655 -1 result.roles.push(roleObject);-1 687 Node.prototype._decodeChoice = function decodeChoice(input, options) { -1 688 const state = this._baseState; -1 689 let result = null; -1 690 let match = false; -1 691 -1 692 Object.keys(state.choice).some(function(key) { -1 693 const save = input.save(); -1 694 const node = state.choice[key]; -1 695 try { -1 696 const value = node._decode(input, options); -1 697 if (input.isError(value)) -1 698 return false; -1 699 -1 700 result = { type: key, value: value }; -1 701 match = true; -1 702 } catch (e) { -1 703 input.restore(save); -1 704 return false; 656 705 } -1 706 return true; -1 707 }, this); 657 708658 -1 return result;-1 709 if (!match) -1 710 return input.error('Choice not matched'); -1 711 -1 712 return result; 659 713 }; 660 714661 -1 /**662 -1 * @param {!string} propertyName663 -1 * @param {!string} value664 -1 * @param {!Element} element665 -1 * @return {!Object}666 -1 */667 -1 axs.utils.getAriaPropertyValue = function(propertyName, value, element) {668 -1 var propertyKey = propertyName.replace(/^aria-/, '');669 -1 var property = axs.constants.ARIA_PROPERTIES[propertyKey];670 -1 var result = { 'name': propertyName, 'rawValue': value };671 -1 if (!property) {672 -1 result.valid = false;673 -1 result.reason = '"' + propertyName + '" is not a valid ARIA property';674 -1 return result;-1 715 // -1 716 // Encoding -1 717 // -1 718 -1 719 Node.prototype._createEncoderBuffer = function createEncoderBuffer(data) { -1 720 return new EncoderBuffer(data, this.reporter); -1 721 }; -1 722 -1 723 Node.prototype._encode = function encode(data, reporter, parent) { -1 724 const state = this._baseState; -1 725 if (state['default'] !== null && state['default'] === data) -1 726 return; -1 727 -1 728 const result = this._encodeValue(data, reporter, parent); -1 729 if (result === undefined) -1 730 return; -1 731 -1 732 if (this._skipDefault(result, reporter, parent)) -1 733 return; -1 734 -1 735 return result; -1 736 }; -1 737 -1 738 Node.prototype._encodeValue = function encode(data, reporter, parent) { -1 739 const state = this._baseState; -1 740 -1 741 // Decode root node -1 742 if (state.parent === null) -1 743 return state.children[0]._encode(data, reporter || new Reporter()); -1 744 -1 745 let result = null; -1 746 -1 747 // Set reporter to share it with a child class -1 748 this.reporter = reporter; -1 749 -1 750 // Check if data is there -1 751 if (state.optional && data === undefined) { -1 752 if (state['default'] !== null) -1 753 data = state['default']; -1 754 else -1 755 return; -1 756 } -1 757 -1 758 // Encode children first -1 759 let content = null; -1 760 let primitive = false; -1 761 if (state.any) { -1 762 // Anything that was given is translated to buffer -1 763 result = this._createEncoderBuffer(data); -1 764 } else if (state.choice) { -1 765 result = this._encodeChoice(data, reporter); -1 766 } else if (state.contains) { -1 767 content = this._getUse(state.contains, parent)._encode(data, reporter); -1 768 primitive = true; -1 769 } else if (state.children) { -1 770 content = state.children.map(function(child) { -1 771 if (child._baseState.tag === 'null_') -1 772 return child._encode(null, reporter, data); -1 773 -1 774 if (child._baseState.key === null) -1 775 return reporter.error('Child should have a key'); -1 776 const prevKey = reporter.enterKey(child._baseState.key); -1 777 -1 778 if (typeof data !== 'object') -1 779 return reporter.error('Child expected, but input is not object'); -1 780 -1 781 const res = child._encode(data[child._baseState.key], reporter, data); -1 782 reporter.leaveKey(prevKey); -1 783 -1 784 return res; -1 785 }, this).filter(function(child) { -1 786 return child; -1 787 }); -1 788 content = this._createEncoderBuffer(content); -1 789 } else { -1 790 if (state.tag === 'seqof' || state.tag === 'setof') { -1 791 // TODO(indutny): this should be thrown on DSL level -1 792 if (!(state.args && state.args.length === 1)) -1 793 return reporter.error('Too many args for : ' + state.tag); -1 794 -1 795 if (!Array.isArray(data)) -1 796 return reporter.error('seqof/setof, but data is not Array'); -1 797 -1 798 const child = this.clone(); -1 799 child._baseState.implicit = null; -1 800 content = this._createEncoderBuffer(data.map(function(item) { -1 801 const state = this._baseState; -1 802 -1 803 return this._getUse(state.args[0], data)._encode(item, reporter); -1 804 }, child)); -1 805 } else if (state.use !== null) { -1 806 result = this._getUse(state.use, parent)._encode(data, reporter); -1 807 } else { -1 808 content = this._encodePrimitive(state.tag, data); -1 809 primitive = true; 675 810 } -1 811 } 676 812677 -1 var propertyType = property.valueType;678 -1 if (!propertyType) {679 -1 result.valid = false;680 -1 result.reason = '"' + propertyName + '" is not a valid ARIA property';681 -1 return result;-1 813 // Encode data itself -1 814 if (!state.any && state.choice === null) { -1 815 const tag = state.implicit !== null ? state.implicit : state.tag; -1 816 const cls = state.implicit === null ? 'universal' : 'context'; -1 817 -1 818 if (tag === null) { -1 819 if (state.use === null) -1 820 reporter.error('Tag could be omitted only for .use()'); -1 821 } else { -1 822 if (state.use === null) -1 823 result = this._encodeComposite(tag, primitive, cls, content); 682 824 } -1 825 } 683 826684 -1 switch (propertyType) {685 -1 case "idref":686 -1 var isValid = axs.utils.isValidIDRefValue(value, element);687 -1 result.valid = isValid.valid;688 -1 result.reason = isValid.reason;689 -1 result.idref = isValid.idref;690 -1 // falls through691 -1 case "idref_list":692 -1 var idrefValues = value.split(/\s+/);693 -1 result.valid = true;694 -1 for (var i = 0; i < idrefValues.length; i++) {695 -1 var refIsValid = axs.utils.isValidIDRefValue(idrefValues[i], element);696 -1 if (!refIsValid.valid)697 -1 result.valid = false;698 -1 if (result.values)699 -1 result.values.push(refIsValid);700 -1 else701 -1 result.values = [refIsValid];702 -1 }703 -1 return result;704 -1 case "integer":705 -1 var validNumber = axs.utils.isValidNumber(value);706 -1 if (!validNumber.valid) {707 -1 result.valid = false;708 -1 result.reason = validNumber.reason;709 -1 return result;710 -1 }711 -1 if (Math.floor(validNumber.value) !== validNumber.value) {712 -1 result.valid = false;713 -1 result.reason = '' + value + ' is not a whole integer';714 -1 } else {715 -1 result.valid = true;716 -1 result.value = validNumber.value;717 -1 }718 -1 return result;719 -1 case "decimal":720 -1 case "number":721 -1 var validNumber = axs.utils.isValidNumber(value);722 -1 result.valid = validNumber.valid;723 -1 if (!validNumber.valid) {724 -1 result.reason = validNumber.reason;725 -1 return result;726 -1 }727 -1 result.value = validNumber.value;728 -1 return result;729 -1 case "string":730 -1 result.valid = true;731 -1 result.value = value;732 -1 return result;733 -1 case "token":734 -1 var validTokenValue = axs.utils.isValidTokenValue(propertyName, value.toLowerCase());735 -1 if (validTokenValue.valid) {736 -1 result.valid = true;737 -1 result.value = validTokenValue.value;738 -1 return result;739 -1 } else {740 -1 result.valid = false;741 -1 result.value = value;742 -1 result.reason = validTokenValue.reason;743 -1 return result;744 -1 }745 -1 // falls through746 -1 case "token_list":747 -1 var tokenValues = value.split(/\s+/);748 -1 result.valid = true;749 -1 for (var i = 0; i < tokenValues.length; i++) {750 -1 var validTokenValue = axs.utils.isValidTokenValue(propertyName, tokenValues[i].toLowerCase());751 -1 if (!validTokenValue.valid) {752 -1 result.valid = false;753 -1 if (result.reason) {754 -1 result.reason = [ result.reason ];755 -1 result.reason.push(validTokenValue.reason);756 -1 } else {757 -1 result.reason = validTokenValue.reason;758 -1 result.possibleValues = validTokenValue.possibleValues;759 -1 }760 -1 }761 -1 // TODO (more structured result)762 -1 if (result.values)763 -1 result.values.push(validTokenValue.value);764 -1 else765 -1 result.values = [validTokenValue.value];766 -1 }767 -1 return result;768 -1 case "tristate":769 -1 var validTristate = axs.utils.isPossibleValue(value.toLowerCase(), axs.constants.MIXED_VALUES, propertyName);770 -1 if (validTristate.valid) {771 -1 result.valid = true;772 -1 result.value = validTristate.value;773 -1 } else {774 -1 result.valid = false;775 -1 result.value = value;776 -1 result.reason = validTristate.reason;777 -1 }778 -1 return result;779 -1 case "boolean":780 -1 var validBoolean = axs.utils.isValidBoolean(value);781 -1 if (validBoolean.valid) {782 -1 result.valid = true;783 -1 result.value = validBoolean.value;784 -1 } else {785 -1 result.valid = false;786 -1 result.value = value;787 -1 result.reason = validBoolean.reason;788 -1 }789 -1 return result;790 -1 }791 -1 result.valid = false;792 -1 result.reason = 'Not a valid ARIA property';793 -1 return result;-1 827 // Wrap in explicit -1 828 if (state.explicit !== null) -1 829 result = this._encodeComposite(state.explicit, false, 'context', result); -1 830 -1 831 return result; 794 832 }; 795 833796 -1 /**797 -1 * @param {string} propertyName The name of the property.798 -1 * @param {string} value The value to check.799 -1 * @return {!Object}800 -1 */801 -1 axs.utils.isValidTokenValue = function(propertyName, value) {802 -1 var propertyKey = propertyName.replace(/^aria-/, '');803 -1 var propertyDetails = axs.constants.ARIA_PROPERTIES[propertyKey];804 -1 var possibleValues = propertyDetails.valuesSet;805 -1 return axs.utils.isPossibleValue(value, possibleValues, propertyName);-1 834 Node.prototype._encodeChoice = function encodeChoice(data, reporter) { -1 835 const state = this._baseState; -1 836 -1 837 const node = state.choice[data.type]; -1 838 if (!node) { -1 839 assert( -1 840 false, -1 841 data.type + ' not found in ' + -1 842 JSON.stringify(Object.keys(state.choice))); -1 843 } -1 844 return node._encode(data.value, reporter); 806 845 }; 807 846808 -1 /**809 -1 * @param {string} value810 -1 * @param {Object.<string, boolean>} possibleValues811 -1 * @param {string} propertyName The name of the property.812 -1 * @return {!Object}813 -1 */814 -1 axs.utils.isPossibleValue = function(value, possibleValues, propertyName) {815 -1 if (!possibleValues[value])816 -1 return { 'valid': false,817 -1 'value': value,818 -1 'reason': '"' + value + '" is not a valid value for ' + propertyName,819 -1 'possibleValues': Object.keys(possibleValues) };820 -1 return { 'valid': true, 'value': value };-1 847 Node.prototype._encodePrimitive = function encodePrimitive(tag, data) { -1 848 const state = this._baseState; -1 849 -1 850 if (/str$/.test(tag)) -1 851 return this._encodeStr(data, tag); -1 852 else if (tag === 'objid' && state.args) -1 853 return this._encodeObjid(data, state.reverseArgs[0], state.args[1]); -1 854 else if (tag === 'objid') -1 855 return this._encodeObjid(data, null, null); -1 856 else if (tag === 'gentime' || tag === 'utctime') -1 857 return this._encodeTime(data, tag); -1 858 else if (tag === 'null_') -1 859 return this._encodeNull(); -1 860 else if (tag === 'int' || tag === 'enum') -1 861 return this._encodeInt(data, state.args && state.reverseArgs[0]); -1 862 else if (tag === 'bool') -1 863 return this._encodeBool(data); -1 864 else if (tag === 'objDesc') -1 865 return this._encodeStr(data, tag); -1 866 else -1 867 throw new Error('Unsupported tag: ' + tag); 821 868 }; 822 869823 -1 /**824 -1 * @param {string} value825 -1 * @return {!Object}826 -1 */827 -1 axs.utils.isValidBoolean = function(value) {828 -1 try {829 -1 var parsedValue = JSON.parse(value);830 -1 } catch (e) {831 -1 parsedValue = '';832 -1 }833 -1 if (typeof(parsedValue) != 'boolean')834 -1 return { 'valid': false,835 -1 'value': value,836 -1 'reason': '"' + value + '" is not a true/false value' };837 -1 return { 'valid': true, 'value': parsedValue };-1 870 Node.prototype._isNumstr = function isNumstr(str) { -1 871 return /^[0-9 ]*$/.test(str); 838 872 }; 839 873840 -1 /**841 -1 * @param {string} value842 -1 * @param {!Element} element843 -1 * @return {!Object}844 -1 */845 -1 axs.utils.isValidIDRefValue = function(value, element) {846 -1 if (value.length == 0)847 -1 return { 'valid': true, 'idref': value };848 -1 if (!element.ownerDocument.getElementById(value))849 -1 return { 'valid': false,850 -1 'idref': value,851 -1 'reason': 'No element with ID "' + value + '"' };852 -1 return { 'valid': true, 'idref': value };-1 874 Node.prototype._isPrintstr = function isPrintstr(str) { -1 875 return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str); 853 876 }; 854 877855 -1 /**856 -1 * Tests if a number is real number for a11y purposes.857 -1 * Must be a real, numerical, decimal value; heavily inspired by858 -1 * http://www.w3.org/TR/wai-aria/states_and_properties#valuetype_number859 -1 * @param {string} value860 -1 * @return {!Object}861 -1 */862 -1 axs.utils.isValidNumber = function(value) {863 -1 var failResult = {864 -1 'valid': false,865 -1 'value': value,866 -1 'reason': '"' + value + '" is not a number'867 -1 };868 -1 if (!value) {869 -1 return failResult;870 -1 }871 -1 if (/^0x/i.test(value)) {872 -1 failResult.reason = '"' + value + '" is not a decimal number'; // hex is not accepted873 -1 return failResult;874 -1 }875 -1 var parsedValue = value * 1;876 -1 if (!isFinite(parsedValue)) {877 -1 return failResult;878 -1 }879 -1 return { 'valid': true, 'value': parsedValue };-1 878 },{"../base/buffer":3,"../base/reporter":6,"minimalistic-assert":136}],6:[function(require,module,exports){ -1 879 'use strict'; -1 880 -1 881 const inherits = require('inherits'); -1 882 -1 883 function Reporter(options) { -1 884 this._reporterState = { -1 885 obj: null, -1 886 path: [], -1 887 options: options || {}, -1 888 errors: [] -1 889 }; -1 890 } -1 891 exports.Reporter = Reporter; -1 892 -1 893 Reporter.prototype.isError = function isError(obj) { -1 894 return obj instanceof ReporterError; 880 895 }; 881 896882 -1 /**883 -1 * @param {Element} element884 -1 * @return {boolean}885 -1 */886 -1 axs.utils.isElementImplicitlyFocusable = function(element) {887 -1 var defaultView = element.ownerDocument.defaultView;-1 897 Reporter.prototype.save = function save() { -1 898 const state = this._reporterState; 888 899889 -1 if (element instanceof defaultView.HTMLAnchorElement ||890 -1 element instanceof defaultView.HTMLAreaElement)891 -1 return element.hasAttribute('href');892 -1 if (element instanceof defaultView.HTMLInputElement ||893 -1 element instanceof defaultView.HTMLSelectElement ||894 -1 element instanceof defaultView.HTMLTextAreaElement ||895 -1 element instanceof defaultView.HTMLButtonElement ||896 -1 element instanceof defaultView.HTMLIFrameElement)897 -1 return !element.disabled;898 -1 return false;-1 900 return { obj: state.obj, pathLen: state.path.length }; 899 901 }; 900 902901 -1 /**902 -1 * Returns an array containing the values of the given JSON-compatible object.903 -1 * (Simply ignores any function values.)904 -1 * @param {Object} obj905 -1 * @return {Array}906 -1 */907 -1 axs.utils.values = function(obj) {908 -1 var values = [];909 -1 for (var key in obj) {910 -1 if (obj.hasOwnProperty(key) && typeof obj[key] != 'function')911 -1 values.push(obj[key]);912 -1 }913 -1 return values;-1 903 Reporter.prototype.restore = function restore(data) { -1 904 const state = this._reporterState; -1 905 -1 906 state.obj = data.obj; -1 907 state.path = state.path.slice(0, data.pathLen); 914 908 }; 915 909916 -1 /**917 -1 * Returns an object containing the same keys and values as the given918 -1 * JSON-compatible object. (Simply ignores any function values.)919 -1 * @param {Object} obj920 -1 * @return {Object}921 -1 */922 -1 axs.utils.namedValues = function(obj) {923 -1 var values = {};924 -1 for (var key in obj) {925 -1 if (obj.hasOwnProperty(key) && typeof obj[key] != 'function')926 -1 values[key] = obj[key];927 -1 }928 -1 return values;-1 910 Reporter.prototype.enterKey = function enterKey(key) { -1 911 return this._reporterState.path.push(key); 929 912 }; 930 913931 -1 /**932 -1 * Escapes a given ID to be used in a CSS selector933 -1 *934 -1 * @private935 -1 * @param {!string} id The ID to be escaped936 -1 * @return {string} The escaped ID937 -1 */938 -1 function escapeId(id) {939 -1 return id.replace(/[^a-zA-Z0-9_-]/g,function(match) { return '\\' + match; });940 -1 }-1 914 Reporter.prototype.exitKey = function exitKey(index) { -1 915 const state = this._reporterState; 941 916942 -1 /** Gets a CSS selector text for a DOM object.943 -1 * @param {Node} obj The DOM object.944 -1 * @return {string} CSS selector text for the DOM object.945 -1 */946 -1 axs.utils.getQuerySelectorText = function(obj) {947 -1 if (obj == null || obj.tagName == 'HTML') {948 -1 return 'html';949 -1 } else if (obj.tagName == 'BODY') {950 -1 return 'body';951 -1 }-1 917 state.path = state.path.slice(0, index - 1); -1 918 }; 952 919953 -1 if (obj.hasAttribute) {954 -1 if (obj.id) {955 -1 return '#' + escapeId(obj.id);956 -1 }-1 920 Reporter.prototype.leaveKey = function leaveKey(index, key, value) { -1 921 const state = this._reporterState; 957 922958 -1 if (obj.className) {959 -1 var selector = '';960 -1 for (var i = 0; i < obj.classList.length; i++)961 -1 selector += '.' + obj.classList[i];-1 923 this.exitKey(index); -1 924 if (state.obj !== null) -1 925 state.obj[key] = value; -1 926 }; 962 927963 -1 var total = 0;964 -1 if (obj.parentNode) {965 -1 for (i = 0; i < obj.parentNode.children.length; i++) {966 -1 var similar = obj.parentNode.children[i];967 -1 if (axs.browserUtils.matchSelector(similar, selector))968 -1 total++;969 -1 if (similar === obj)970 -1 break;971 -1 }972 -1 } else {973 -1 total = 1;974 -1 }-1 928 Reporter.prototype.path = function path() { -1 929 return this._reporterState.path.join('/'); -1 930 }; 975 931976 -1 if (total == 1) {977 -1 return axs.utils.getQuerySelectorText(obj.parentNode) +978 -1 ' > ' + selector;979 -1 }980 -1 }-1 932 Reporter.prototype.enterObject = function enterObject() { -1 933 const state = this._reporterState; 981 934982 -1 if (obj.parentNode) {983 -1 var similarTags = obj.parentNode.children;984 -1 var total = 1;985 -1 var i = 0;986 -1 while (similarTags[i] !== obj) {987 -1 if (similarTags[i].tagName == obj.tagName) {988 -1 total++;989 -1 }990 -1 i++;991 -1 }-1 935 const prev = state.obj; -1 936 state.obj = {}; -1 937 return prev; -1 938 }; 992 939993 -1 var next = '';994 -1 if (obj.parentNode.tagName != 'BODY') {995 -1 next = axs.utils.getQuerySelectorText(obj.parentNode) +996 -1 ' > ';997 -1 }-1 940 Reporter.prototype.leaveObject = function leaveObject(prev) { -1 941 const state = this._reporterState; 998 942999 -1 if (total == 1) {1000 -1 return next +1001 -1 obj.tagName;1002 -1 } else {1003 -1 return next +1004 -1 obj.tagName +1005 -1 ':nth-of-type(' + total + ')';1006 -1 }1007 -1 }-1 943 const now = state.obj; -1 944 state.obj = prev; -1 945 return now; -1 946 }; 1008 9471009 -1 } else if (obj.selectorText) {1010 -1 return obj.selectorText;-1 948 Reporter.prototype.error = function error(msg) { -1 949 let err; -1 950 const state = this._reporterState; -1 951 -1 952 const inherited = msg instanceof ReporterError; -1 953 if (inherited) { -1 954 err = msg; -1 955 } else { -1 956 err = new ReporterError(state.path.map(function(elem) { -1 957 return '[' + JSON.stringify(elem) + ']'; -1 958 }).join(''), msg.message || msg, msg.stack); 1011 959 } 1012 9601013 -1 return '';1014 -1 };-1 961 if (!state.options.partial) -1 962 throw err; 1015 9631016 -1 /**1017 -1 * Gets elements that refer to this element in an ARIA attribute that takes an ID reference list or1018 -1 * single ID reference.1019 -1 * @param {Element} element a potential referent.1020 -1 * @param {string=} opt_attributeName Name of an ARIA attribute to limit the results to, e.g. 'aria-owns'.1021 -1 * @return {NodeList} The elements that refer to this element or null.1022 -1 */1023 -1 axs.utils.getAriaIdReferrers = function(element, opt_attributeName) {1024 -1 var propertyToSelector = function(propertyKey) {1025 -1 var propertyDetails = axs.constants.ARIA_PROPERTIES[propertyKey];1026 -1 if (propertyDetails) {1027 -1 if (propertyDetails.valueType === ('idref')) {1028 -1 return '[aria-' + propertyKey + '=\'' + id + '\']';1029 -1 } else if (propertyDetails.valueType === ('idref_list')) {1030 -1 return '[aria-' + propertyKey + '~=\'' + id + '\']';1031 -1 }1032 -1 }1033 -1 return '';1034 -1 };1035 -1 if (!element)1036 -1 return null;1037 -1 var id = element.id;1038 -1 if (!id)1039 -1 return null;1040 -1 id = id.replace(/'/g, "\\'"); // make it safe to use in a selector1041 -11042 -1 if (opt_attributeName) {1043 -1 var propertyKey = opt_attributeName.replace(/^aria-/, '');1044 -1 var referrerQuery = propertyToSelector(propertyKey);1045 -1 if (referrerQuery) {1046 -1 return element.ownerDocument.querySelectorAll(referrerQuery);1047 -1 }1048 -1 } else {1049 -1 var selectors = [];1050 -1 for (var propertyKey in axs.constants.ARIA_PROPERTIES) {1051 -1 var referrerQuery = propertyToSelector(propertyKey);1052 -1 if (referrerQuery) {1053 -1 selectors.push(referrerQuery);1054 -1 }1055 -1 }1056 -1 return element.ownerDocument.querySelectorAll(selectors.join(','));1057 -1 }1058 -1 return null;1059 -1 };-1 964 if (!inherited) -1 965 state.errors.push(err); 1060 9661061 -1 /**1062 -1 * Gets elements that refer to this element in an HTML attribute that takes an ID reference list or1063 -1 * single ID reference.1064 -1 * @param {Element} element a potential referent.1065 -1 * @return {NodeList} The elements that refer to this element.1066 -1 */1067 -1 axs.utils.getHtmlIdReferrers = function(element) {1068 -1 if (!element)1069 -1 return null;1070 -1 var id = element.id;1071 -1 if (!id)1072 -1 return null;1073 -1 id = id.replace(/'/g, "\\'"); // make it safe to use in a selector1074 -1 var selectorTemplates = [1075 -1 '[contextmenu=\'{id}\']',1076 -1 '[itemref~=\'{id}\']',1077 -1 'button[form=\'{id}\']',1078 -1 'button[menu=\'{id}\']',1079 -1 'fieldset[form=\'{id}\']',1080 -1 'input[form=\'{id}\']',1081 -1 'input[list=\'{id}\']',1082 -1 'keygen[form=\'{id}\']',1083 -1 'label[for=\'{id}\']',1084 -1 'label[form=\'{id}\']',1085 -1 'menuitem[command=\'{id}\']',1086 -1 'object[form=\'{id}\']',1087 -1 'output[for~=\'{id}\']',1088 -1 'output[form=\'{id}\']',1089 -1 'select[form=\'{id}\']',1090 -1 'td[headers~=\'{id}\']',1091 -1 'textarea[form=\'{id}\']',1092 -1 'tr[headers~=\'{id}\']'];1093 -1 var selectors = selectorTemplates.map(function(selector) {1094 -1 return selector.replace('\{id\}', id);1095 -1 });1096 -1 return element.ownerDocument.querySelectorAll(selectors.join(','));-1 967 return err; 1097 968 }; 1098 9691099 -1 /**1100 -1 * Gets a list of all IDs this element references in either ARIA or HTML attributes.1101 -1 *1102 -1 * @param {Element} element The element to check for idref attributes.1103 -1 * @returns {Array.<string>} Any IDs this element references.1104 -1 */1105 -1 axs.utils.getReferencedIds = function(element) {1106 -1 var result = [];1107 -1 var addResult = function(ids) {1108 -1 if (ids) {1109 -1 if (ids.indexOf(' ') > 0) {1110 -1 result = result.concat(attrib.value.split(' '));1111 -1 } else {1112 -1 result.push(ids);1113 -1 }1114 -1 }1115 -1 };1116 -1 for (var i = 0; i < element.attributes.length; i++) {1117 -1 var tagName = element.tagName.toLowerCase();1118 -1 var attrib = element.attributes[i];1119 -1 if (attrib.specified) {1120 -1 var attribName = attrib.name;1121 -1 var ariaAttr = attribName.match(/aria-(.+)/);1122 -1 if (ariaAttr) {1123 -1 var details = axs.constants.ARIA_PROPERTIES[ariaAttr[1]];1124 -1 if (details && (details.valueType === ('idref') || details.valueType === ('idref_list'))) {1125 -1 addResult(attrib.value);1126 -1 }1127 -1 continue;1128 -1 }1129 -1 switch (attribName) {1130 -1 case 'contextmenu':1131 -1 case 'itemref':1132 -1 addResult(attrib.value);1133 -1 break;1134 -1 case 'form':1135 -1 if (tagName == 'button' || tagName == 'fieldset' || tagName == 'input' ||1136 -1 tagName == 'keygen' || tagName == 'label' || tagName == 'object' ||1137 -1 tagName == 'output' || tagName == 'select' || tagName == 'textarea') {1138 -1 addResult(attrib.value);1139 -1 }1140 -1 break;1141 -1 case 'for':1142 -1 if (tagName == 'label' || tagName == 'output') {1143 -1 addResult(attrib.value);1144 -1 }1145 -1 break;1146 -1 case 'menu':1147 -1 if (tagName == 'button') {1148 -1 addResult(attrib.value);1149 -1 }1150 -1 break;1151 -1 case 'list':1152 -1 if (tagName == 'input') {1153 -1 addResult(attrib.value);1154 -1 }1155 -1 break;1156 -1 case 'command':1157 -1 if (tagName == 'menuitem') {1158 -1 addResult(attrib.value);1159 -1 }1160 -1 break;1161 -1 case 'headers':1162 -1 if (tagName == 'td' || tagName == 'tr') {1163 -1 addResult(attrib.value);1164 -1 }1165 -1 break;1166 -1 }1167 -1 }1168 -1 }-1 970 Reporter.prototype.wrapResult = function wrapResult(result) { -1 971 const state = this._reporterState; -1 972 if (!state.options.partial) 1169 973 return result; -1 974 -1 975 return { -1 976 result: this.isError(result) ? null : result, -1 977 errors: state.errors -1 978 }; 1170 979 }; 1171 9801172 -1 /**1173 -1 * Gets elements that refer to this element in an attribute that takes an ID reference list or1174 -1 * single ID reference.1175 -1 * @param {Element} element a potential referent.1176 -1 * @return {Array<Element>} The elements that refer to this element.1177 -1 */1178 -1 axs.utils.getIdReferrers = function(element) {1179 -1 var result = [];1180 -1 var referrers = axs.utils.getHtmlIdReferrers(element);1181 -1 if (referrers) {1182 -1 result = result.concat(Array.prototype.slice.call(referrers));1183 -1 }1184 -1 referrers = axs.utils.getAriaIdReferrers(element);1185 -1 if (referrers) {1186 -1 result = result.concat(Array.prototype.slice.call(referrers));-1 981 function ReporterError(path, msg) { -1 982 this.path = path; -1 983 this.rethrow(msg); -1 984 } -1 985 inherits(ReporterError, Error); -1 986 -1 987 ReporterError.prototype.rethrow = function rethrow(msg) { -1 988 this.message = msg + ' at: ' + (this.path || '(shallow)'); -1 989 if (Error.captureStackTrace) -1 990 Error.captureStackTrace(this, ReporterError); -1 991 -1 992 if (!this.stack) { -1 993 try { -1 994 // IE only adds stack when thrown -1 995 throw new Error(this.message); -1 996 } catch (e) { -1 997 this.stack = e.stack; 1187 998 }1188 -1 return result;-1 999 } -1 1000 return this; 1189 1001 }; 1190 10021191 -1 /**1192 -1 * Gets elements which this element refers to in the given attribute.1193 -1 * @param {!string} attributeName Name of an ARIA attribute, e.g. 'aria-owns'.1194 -1 * @param {Element} element The DOM element which has the ARIA attribute.1195 -1 * @return {!Array.<Element>} An array of elements that are referred to by this element.1196 -1 * @example1197 -1 * var owner = document.body.appendChild(document.createElement("div"));1198 -1 * var owned = document.body.appendChild(document.createElement("div"));1199 -1 * owner.setAttribute("aria-owns", "kungfu");1200 -1 * owned.setAttribute("id", "kungfu");1201 -1 * console.log(axs.utils.getIdReferents("aria-owns", owner)[0] === owned); // This will log 'true'1202 -1 */1203 -1 axs.utils.getIdReferents = function(attributeName, element) {1204 -1 var result = [];1205 -1 var propertyKey = attributeName.replace(/^aria-/, '');1206 -1 var property = axs.constants.ARIA_PROPERTIES[propertyKey];1207 -1 if (!property || !element.hasAttribute(attributeName))1208 -1 return result;1209 -1 var propertyType = property.valueType;1210 -1 if (propertyType === 'idref_list' || propertyType === 'idref') {1211 -1 var ownerDocument = element.ownerDocument;1212 -1 var ids = element.getAttribute(attributeName);1213 -1 ids = ids.split(/\s+/);1214 -1 for (var i = 0, len = ids.length; i < len; i++) {1215 -1 var next = ownerDocument.getElementById(ids[i]);1216 -1 if (next) {1217 -1 result[result.length] = next;1218 -1 }1219 -1 }1220 -1 }1221 -1 return result;-1 1003 },{"inherits":132}],7:[function(require,module,exports){ -1 1004 'use strict'; -1 1005 -1 1006 // Helper -1 1007 function reverse(map) { -1 1008 const res = {}; -1 1009 -1 1010 Object.keys(map).forEach(function(key) { -1 1011 // Convert key to integer if it is stringified -1 1012 if ((key | 0) == key) -1 1013 key = key | 0; -1 1014 -1 1015 const value = map[key]; -1 1016 res[value] = key; -1 1017 }); -1 1018 -1 1019 return res; -1 1020 } -1 1021 -1 1022 exports.tagClass = { -1 1023 0: 'universal', -1 1024 1: 'application', -1 1025 2: 'context', -1 1026 3: 'private' 1222 1027 }; -1 1028 exports.tagClassByName = reverse(exports.tagClass); -1 1029 -1 1030 exports.tag = { -1 1031 0x00: 'end', -1 1032 0x01: 'bool', -1 1033 0x02: 'int', -1 1034 0x03: 'bitstr', -1 1035 0x04: 'octstr', -1 1036 0x05: 'null_', -1 1037 0x06: 'objid', -1 1038 0x07: 'objDesc', -1 1039 0x08: 'external', -1 1040 0x09: 'real', -1 1041 0x0a: 'enum', -1 1042 0x0b: 'embed', -1 1043 0x0c: 'utf8str', -1 1044 0x0d: 'relativeOid', -1 1045 0x10: 'seq', -1 1046 0x11: 'set', -1 1047 0x12: 'numstr', -1 1048 0x13: 'printstr', -1 1049 0x14: 't61str', -1 1050 0x15: 'videostr', -1 1051 0x16: 'ia5str', -1 1052 0x17: 'utctime', -1 1053 0x18: 'gentime', -1 1054 0x19: 'graphstr', -1 1055 0x1a: 'iso646str', -1 1056 0x1b: 'genstr', -1 1057 0x1c: 'unistr', -1 1058 0x1d: 'charstr', -1 1059 0x1e: 'bmpstr' -1 1060 }; -1 1061 exports.tagByName = reverse(exports.tag); 1223 10621224 -1 /**1225 -1 * Gets a subset of 'axs.constants.ARIA_PROPERTIES' filtered by 'valueType'.1226 -1 * @param {!Array.<string>} valueTypes Types to match, e.g. ['idref_list'].1227 -1 * @return {Object.<string, Object>} axs.constants.ARIA_PROPERTIES which match.1228 -1 */1229 -1 axs.utils.getAriaPropertiesByValueType = function(valueTypes) {1230 -1 var result = {};1231 -1 for (var propertyName in axs.constants.ARIA_PROPERTIES) {1232 -1 var property = axs.constants.ARIA_PROPERTIES[propertyName];1233 -1 if (property && valueTypes.indexOf(property.valueType) >= 0) {1234 -1 result[propertyName] = property;1235 -1 }1236 -1 }1237 -1 return result;-1 1063 },{}],8:[function(require,module,exports){ -1 1064 'use strict'; -1 1065 -1 1066 const constants = exports; -1 1067 -1 1068 // Helper -1 1069 constants._reverse = function reverse(map) { -1 1070 const res = {}; -1 1071 -1 1072 Object.keys(map).forEach(function(key) { -1 1073 // Convert key to integer if it is stringified -1 1074 if ((key | 0) == key) -1 1075 key = key | 0; -1 1076 -1 1077 const value = map[key]; -1 1078 res[value] = key; -1 1079 }); -1 1080 -1 1081 return res; 1238 1082 }; 1239 10831240 -1 /**1241 -1 * Builds a selector that matches an element with any of these ARIA properties.1242 -1 * @param {Object.<string, Object>} ariaProperties axs.constants.ARIA_PROPERTIES1243 -1 * @return {!string} The selector.1244 -1 */1245 -1 axs.utils.getSelectorForAriaProperties = function(ariaProperties) {1246 -1 var propertyNames = Object.keys(/** @type {!Object} */(ariaProperties));1247 -1 var result = propertyNames.map(function(propertyName) {1248 -1 return '[aria-' + propertyName + ']';1249 -1 });1250 -1 result.sort(); // facilitates reading long selectors and unit testing1251 -1 return result.join(',');-1 1084 constants.der = require('./der'); -1 1085 -1 1086 },{"./der":7}],9:[function(require,module,exports){ -1 1087 'use strict'; -1 1088 -1 1089 const inherits = require('inherits'); -1 1090 -1 1091 const bignum = require('bn.js'); -1 1092 const DecoderBuffer = require('../base/buffer').DecoderBuffer; -1 1093 const Node = require('../base/node'); -1 1094 -1 1095 // Import DER constants -1 1096 const der = require('../constants/der'); -1 1097 -1 1098 function DERDecoder(entity) { -1 1099 this.enc = 'der'; -1 1100 this.name = entity.name; -1 1101 this.entity = entity; -1 1102 -1 1103 // Construct base tree -1 1104 this.tree = new DERNode(); -1 1105 this.tree._init(entity.body); -1 1106 } -1 1107 module.exports = DERDecoder; -1 1108 -1 1109 DERDecoder.prototype.decode = function decode(data, options) { -1 1110 if (!DecoderBuffer.isDecoderBuffer(data)) { -1 1111 data = new DecoderBuffer(data, options); -1 1112 } -1 1113 -1 1114 return this.tree._decode(data, options); 1252 1115 }; 1253 11161254 -1 /**1255 -1 * Finds descendants of this element which implement the given ARIA role.1256 -1 * Will look for descendants with implicit or explicit role.1257 -1 * @param {Element} element an HTML DOM element.1258 -1 * @param {string} role The role you seek.1259 -1 * @return {!Array.<Element>} An array of matching elements.1260 -1 * @example1261 -1 * var container = document.createElement("div");1262 -1 * var button = document.createElement("button");1263 -1 * var span = document.createElement("span");1264 -1 * span.setAttribute("role", "button");1265 -1 * container.appendChild(button);1266 -1 * container.appendChild(span);1267 -1 * var result = axs.utils.findDescendantsWithRole(container, "button"); // result is an array containing both 'button' and 'span'1268 -1 */1269 -1 axs.utils.findDescendantsWithRole = function(element, role) {1270 -1 if (!(element && role))1271 -1 return [];1272 -1 var selector = axs.properties.getSelectorForRole(role);1273 -1 if (!selector)1274 -1 return [];1275 -1 var result = element.querySelectorAll(selector);1276 -1 if (result) { // Convert NodeList to Array; methinks 80/20 that's what callers want.1277 -1 result = Array.prototype.map.call(result, function(item) { return item; });1278 -1 } else {1279 -1 return [];1280 -1 }1281 -1 return result;1282 -1 };1283 -11284 -1 },{}],2:[function(require,module,exports){1285 -1 // Copyright 2013 Google Inc.1286 -1 //1287 -1 // Licensed under the Apache License, Version 2.0 (the "License");1288 -1 // you may not use this file except in compliance with the License.1289 -1 // You may obtain a copy of the License at1290 -1 //1291 -1 // http://www.apache.org/licenses/LICENSE-2.01292 -1 //1293 -1 // Unless required by applicable law or agreed to in writing, software1294 -1 // distributed under the License is distributed on an "AS IS" BASIS,1295 -1 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.1296 -1 // See the License for the specific language governing permissions and1297 -1 // limitations under the License.-1 1117 // Tree methods 1298 11181299 -1 goog.provide('axs.browserUtils');-1 1119 function DERNode(parent) { -1 1120 Node.call(this, 'der', parent); -1 1121 } -1 1122 inherits(DERNode, Node); 1300 11231301 -1 /**1302 -1 * Use Webkit matcher when matches() is not supported.1303 -1 * Use Firefox matcher when Webkit is not supported.1304 -1 * Use IE matcher when neither webkit nor Firefox supported.1305 -1 * @param {Element} element1306 -1 * @param {string} selector1307 -1 * @return {boolean} true if the element matches the selector1308 -1 */1309 -1 axs.browserUtils.matchSelector = function(element, selector) {1310 -1 if (element.matches)1311 -1 return element.matches(selector);1312 -1 if (element.webkitMatchesSelector)1313 -1 return element.webkitMatchesSelector(selector);1314 -1 if (element.mozMatchesSelector)1315 -1 return element.mozMatchesSelector(selector);1316 -1 if (element.msMatchesSelector)1317 -1 return element.msMatchesSelector(selector);-1 1124 DERNode.prototype._peekTag = function peekTag(buffer, tag, any) { -1 1125 if (buffer.isEmpty()) 1318 1126 return false;1319 -1 };1320 11271321 -1 },{}],3:[function(require,module,exports){1322 -1 // Copyright 2015 Google Inc.1323 -1 //1324 -1 // Licensed under the Apache License, Version 2.0 (the "License");1325 -1 // you may not use this file except in compliance with the License.1326 -1 // You may obtain a copy of the License at1327 -1 //1328 -1 // http://www.apache.org/licenses/LICENSE-2.01329 -1 //1330 -1 // Unless required by applicable law or agreed to in writing, software1331 -1 // distributed under the License is distributed on an "AS IS" BASIS,1332 -1 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.1333 -1 // See the License for the specific language governing permissions and1334 -1 // limitations under the License.-1 1128 const state = buffer.save(); -1 1129 const decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"'); -1 1130 if (buffer.isError(decodedTag)) -1 1131 return decodedTag; 1335 11321336 -1 goog.provide('axs.color');1337 -1 goog.provide('axs.color.Color');-1 1133 buffer.restore(state); 1338 11341339 -1 /**1340 -1 * @constructor1341 -1 * @param {number} red1342 -1 * @param {number} green1343 -1 * @param {number} blue1344 -1 * @param {number} alpha1345 -1 */1346 -1 axs.color.Color = function(red, green, blue, alpha) {1347 -1 /** @type {number} */1348 -1 this.red = red;-1 1135 return decodedTag.tag === tag || decodedTag.tagStr === tag || -1 1136 (decodedTag.tagStr + 'of') === tag || any; -1 1137 }; 1349 11381350 -1 /** @type {number} */1351 -1 this.green = green;-1 1139 DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) { -1 1140 const decodedTag = derDecodeTag(buffer, -1 1141 'Failed to decode tag of "' + tag + '"'); -1 1142 if (buffer.isError(decodedTag)) -1 1143 return decodedTag; -1 1144 -1 1145 let len = derDecodeLen(buffer, -1 1146 decodedTag.primitive, -1 1147 'Failed to get length of "' + tag + '"'); -1 1148 -1 1149 // Failure -1 1150 if (buffer.isError(len)) -1 1151 return len; -1 1152 -1 1153 if (!any && -1 1154 decodedTag.tag !== tag && -1 1155 decodedTag.tagStr !== tag && -1 1156 decodedTag.tagStr + 'of' !== tag) { -1 1157 return buffer.error('Failed to match tag: "' + tag + '"'); -1 1158 } 1352 11591353 -1 /** @type {number} */1354 -1 this.blue = blue;-1 1160 if (decodedTag.primitive || len !== null) -1 1161 return buffer.skip(len, 'Failed to match body of: "' + tag + '"'); 1355 11621356 -1 /** @type {number} */1357 -1 this.alpha = alpha;-1 1163 // Indefinite length... find END tag -1 1164 const state = buffer.save(); -1 1165 const res = this._skipUntilEnd( -1 1166 buffer, -1 1167 'Failed to skip indefinite length body: "' + this.tag + '"'); -1 1168 if (buffer.isError(res)) -1 1169 return res; -1 1170 -1 1171 len = buffer.offset - state.offset; -1 1172 buffer.restore(state); -1 1173 return buffer.skip(len, 'Failed to match body of: "' + tag + '"'); 1358 1174 }; 1359 11751360 -1 /**1361 -1 * @constructor1362 -1 * See https://en.wikipedia.org/wiki/YCbCr for more information.1363 -1 * @param {Array.<number>} coords The YCbCr values as a 3 element array, in the order [luma, Cb, Cr].1364 -1 * All numbers are in the range [0, 1].1365 -1 */1366 -1 axs.color.YCbCr = function(coords) {1367 -1 /** @type {number} */1368 -1 this.luma = this.z = coords[0];-1 1176 DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) { -1 1177 for (;;) { -1 1178 const tag = derDecodeTag(buffer, fail); -1 1179 if (buffer.isError(tag)) -1 1180 return tag; -1 1181 const len = derDecodeLen(buffer, tag.primitive, fail); -1 1182 if (buffer.isError(len)) -1 1183 return len; -1 1184 -1 1185 let res; -1 1186 if (tag.primitive || len !== null) -1 1187 res = buffer.skip(len); -1 1188 else -1 1189 res = this._skipUntilEnd(buffer, fail); 1369 11901370 -1 /** @type {number} */1371 -1 this.Cb = this.x = coords[1];-1 1191 // Failure -1 1192 if (buffer.isError(res)) -1 1193 return res; 1372 11941373 -1 /** @type {number} */1374 -1 this.Cr = this.y = coords[2];-1 1195 if (tag.tagStr === 'end') -1 1196 break; -1 1197 } 1375 1198 }; 1376 11991377 -1 axs.color.YCbCr.prototype = {1378 -1 /**1379 -1 * @param {number} scalar1380 -1 * @return {axs.color.YCbCr} This color multiplied by the given scalar1381 -1 */1382 -1 multiply: function(scalar) {1383 -1 var result = [ this.luma * scalar, this.Cb * scalar, this.Cr * scalar ];1384 -1 return new axs.color.YCbCr(result);1385 -1 },-1 1200 DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder, -1 1201 options) { -1 1202 const result = []; -1 1203 while (!buffer.isEmpty()) { -1 1204 const possibleEnd = this._peekTag(buffer, 'end'); -1 1205 if (buffer.isError(possibleEnd)) -1 1206 return possibleEnd; 1386 12071387 -1 /**1388 -1 * @param {axs.color.YCbCr} other1389 -1 * @return {axs.color.YCbCr} This plus other1390 -1 */1391 -1 add: function(other) {1392 -1 var result = [ this.luma + other.luma, this.Cb + other.Cb, this.Cr + other.Cr ];1393 -1 return new axs.color.YCbCr(result);1394 -1 },-1 1208 const res = decoder.decode(buffer, 'der', options); -1 1209 if (buffer.isError(res) && possibleEnd) -1 1210 break; -1 1211 result.push(res); -1 1212 } -1 1213 return result; -1 1214 }; 1395 12151396 -1 /**1397 -1 * @param {axs.color.YCbCr} other1398 -1 * @return {axs.color.YCbCr} This minus other1399 -1 */1400 -1 subtract: function(other) {1401 -1 var result = [ this.luma - other.luma, this.Cb - other.Cb, this.Cr - other.Cr ];1402 -1 return new axs.color.YCbCr(result);-1 1216 DERNode.prototype._decodeStr = function decodeStr(buffer, tag) { -1 1217 if (tag === 'bitstr') { -1 1218 const unused = buffer.readUInt8(); -1 1219 if (buffer.isError(unused)) -1 1220 return unused; -1 1221 return { unused: unused, data: buffer.raw() }; -1 1222 } else if (tag === 'bmpstr') { -1 1223 const raw = buffer.raw(); -1 1224 if (raw.length % 2 === 1) -1 1225 return buffer.error('Decoding of string type: bmpstr length mismatch'); -1 1226 -1 1227 let str = ''; -1 1228 for (let i = 0; i < raw.length / 2; i++) { -1 1229 str += String.fromCharCode(raw.readUInt16BE(i * 2)); -1 1230 } -1 1231 return str; -1 1232 } else if (tag === 'numstr') { -1 1233 const numstr = buffer.raw().toString('ascii'); -1 1234 if (!this._isNumstr(numstr)) { -1 1235 return buffer.error('Decoding of string type: ' + -1 1236 'numstr unsupported characters'); -1 1237 } -1 1238 return numstr; -1 1239 } else if (tag === 'octstr') { -1 1240 return buffer.raw(); -1 1241 } else if (tag === 'objDesc') { -1 1242 return buffer.raw(); -1 1243 } else if (tag === 'printstr') { -1 1244 const printstr = buffer.raw().toString('ascii'); -1 1245 if (!this._isPrintstr(printstr)) { -1 1246 return buffer.error('Decoding of string type: ' + -1 1247 'printstr unsupported characters'); -1 1248 } -1 1249 return printstr; -1 1250 } else if (/str$/.test(tag)) { -1 1251 return buffer.raw().toString(); -1 1252 } else { -1 1253 return buffer.error('Decoding of string type: ' + tag + ' unsupported'); -1 1254 } -1 1255 }; -1 1256 -1 1257 DERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) { -1 1258 let result; -1 1259 const identifiers = []; -1 1260 let ident = 0; -1 1261 let subident = 0; -1 1262 while (!buffer.isEmpty()) { -1 1263 subident = buffer.readUInt8(); -1 1264 ident <<= 7; -1 1265 ident |= subident & 0x7f; -1 1266 if ((subident & 0x80) === 0) { -1 1267 identifiers.push(ident); -1 1268 ident = 0; 1403 1269 } -1 1270 } -1 1271 if (subident & 0x80) -1 1272 identifiers.push(ident); -1 1273 -1 1274 const first = (identifiers[0] / 40) | 0; -1 1275 const second = identifiers[0] % 40; -1 1276 -1 1277 if (relative) -1 1278 result = identifiers; -1 1279 else -1 1280 result = [first, second].concat(identifiers.slice(1)); -1 1281 -1 1282 if (values) { -1 1283 let tmp = values[result.join(' ')]; -1 1284 if (tmp === undefined) -1 1285 tmp = values[result.join('.')]; -1 1286 if (tmp !== undefined) -1 1287 result = tmp; -1 1288 } 1404 1289 -1 1290 return result; 1405 1291 }; 1406 1292 -1 1293 DERNode.prototype._decodeTime = function decodeTime(buffer, tag) { -1 1294 const str = buffer.raw().toString(); -1 1295 -1 1296 let year; -1 1297 let mon; -1 1298 let day; -1 1299 let hour; -1 1300 let min; -1 1301 let sec; -1 1302 if (tag === 'gentime') { -1 1303 year = str.slice(0, 4) | 0; -1 1304 mon = str.slice(4, 6) | 0; -1 1305 day = str.slice(6, 8) | 0; -1 1306 hour = str.slice(8, 10) | 0; -1 1307 min = str.slice(10, 12) | 0; -1 1308 sec = str.slice(12, 14) | 0; -1 1309 } else if (tag === 'utctime') { -1 1310 year = str.slice(0, 2) | 0; -1 1311 mon = str.slice(2, 4) | 0; -1 1312 day = str.slice(4, 6) | 0; -1 1313 hour = str.slice(6, 8) | 0; -1 1314 min = str.slice(8, 10) | 0; -1 1315 sec = str.slice(10, 12) | 0; -1 1316 if (year < 70) -1 1317 year = 2000 + year; -1 1318 else -1 1319 year = 1900 + year; -1 1320 } else { -1 1321 return buffer.error('Decoding ' + tag + ' time is not supported yet'); -1 1322 } 1407 13231408 -1 /**1409 -1 * Calculate the contrast ratio between the two given colors. Returns the ratio1410 -1 * to 1, for example for two two colors with a contrast ratio of 21:1, this1411 -1 * function will return 21.1412 -1 * @param {axs.color.Color} fgColor1413 -1 * @param {axs.color.Color} bgColor1414 -1 * @return {!number}1415 -1 */1416 -1 axs.color.calculateContrastRatio = function(fgColor, bgColor) {1417 -1 if (fgColor.alpha < 1)1418 -1 fgColor = axs.color.flattenColors(fgColor, bgColor);-1 1324 return Date.UTC(year, mon - 1, day, hour, min, sec, 0); -1 1325 }; 1419 13261420 -1 var fgLuminance = axs.color.calculateLuminance(fgColor);1421 -1 var bgLuminance = axs.color.calculateLuminance(bgColor);1422 -1 var contrastRatio = (Math.max(fgLuminance, bgLuminance) + 0.05) /1423 -1 (Math.min(fgLuminance, bgLuminance) + 0.05);1424 -1 return contrastRatio;-1 1327 DERNode.prototype._decodeNull = function decodeNull() { -1 1328 return null; 1425 1329 }; 1426 13301427 -1 /**1428 -1 * Calculate the luminance of the given color using the WCAG algorithm.1429 -1 * @param {axs.color.Color} color1430 -1 * @return {number}1431 -1 */1432 -1 axs.color.calculateLuminance = function(color) {1433 -1 /* var rSRGB = color.red / 255;1434 -1 var gSRGB = color.green / 255;1435 -1 var bSRGB = color.blue / 255;-1 1331 DERNode.prototype._decodeBool = function decodeBool(buffer) { -1 1332 const res = buffer.readUInt8(); -1 1333 if (buffer.isError(res)) -1 1334 return res; -1 1335 else -1 1336 return res !== 0; -1 1337 }; 1436 13381437 -1 var r = rSRGB <= 0.03928 ? rSRGB / 12.92 : Math.pow(((rSRGB + 0.055)/1.055), 2.4);1438 -1 var g = gSRGB <= 0.03928 ? gSRGB / 12.92 : Math.pow(((gSRGB + 0.055)/1.055), 2.4);1439 -1 var b = bSRGB <= 0.03928 ? bSRGB / 12.92 : Math.pow(((bSRGB + 0.055)/1.055), 2.4);-1 1339 DERNode.prototype._decodeInt = function decodeInt(buffer, values) { -1 1340 // Bigint, return as it is (assume big endian) -1 1341 const raw = buffer.raw(); -1 1342 let res = new bignum(raw); 1440 13431441 -1 return 0.2126 * r + 0.7152 * g + 0.0722 * b; */1442 -1 var ycc = axs.color.toYCbCr(color);1443 -1 return ycc.luma;-1 1344 if (values) -1 1345 res = values[res.toString(10)] || res; -1 1346 -1 1347 return res; 1444 1348 }; 1445 13491446 -1 /**1447 -1 * Compute the luminance ratio between two luminance values.1448 -1 * @param {number} luminance11449 -1 * @param {number} luminance21450 -1 */1451 -1 axs.color.luminanceRatio = function(luminance1, luminance2) {1452 -1 return (Math.max(luminance1, luminance2) + 0.05) /1453 -1 (Math.min(luminance1, luminance2) + 0.05);-1 1350 DERNode.prototype._use = function use(entity, obj) { -1 1351 if (typeof entity === 'function') -1 1352 entity = entity(obj); -1 1353 return entity._getDecoder('der').tree; 1454 1354 }; 1455 13551456 -1 /**1457 -1 * @param {string} colorString The color string from CSS.1458 -1 * @return {?axs.color.Color}1459 -1 */1460 -1 axs.color.parseColor = function(colorString) {1461 -1 if (colorString === "transparent") {1462 -1 return new axs.color.Color(0, 0, 0, 0);1463 -1 }1464 -1 var rgbRegex = /^rgb\((\d+), (\d+), (\d+)\)$/;1465 -1 var match = colorString.match(rgbRegex);-1 1356 // Utility methods 1466 13571467 -1 if (match) {1468 -1 var r = parseInt(match[1], 10);1469 -1 var g = parseInt(match[2], 10);1470 -1 var b = parseInt(match[3], 10);1471 -1 var a = 1;1472 -1 return new axs.color.Color(r, g, b, a);1473 -1 }-1 1358 function derDecodeTag(buf, fail) { -1 1359 let tag = buf.readUInt8(fail); -1 1360 if (buf.isError(tag)) -1 1361 return tag; 1474 13621475 -1 var rgbaRegex = /^rgba\((\d+), (\d+), (\d+), (\d*(\.\d+)?)\)/;1476 -1 match = colorString.match(rgbaRegex);1477 -1 if (match) {1478 -1 var r = parseInt(match[1], 10);1479 -1 var g = parseInt(match[2], 10);1480 -1 var b = parseInt(match[3], 10);1481 -1 var a = parseFloat(match[4]);1482 -1 return new axs.color.Color(r, g, b, a);-1 1363 const cls = der.tagClass[tag >> 6]; -1 1364 const primitive = (tag & 0x20) === 0; -1 1365 -1 1366 // Multi-octet tag - load -1 1367 if ((tag & 0x1f) === 0x1f) { -1 1368 let oct = tag; -1 1369 tag = 0; -1 1370 while ((oct & 0x80) === 0x80) { -1 1371 oct = buf.readUInt8(fail); -1 1372 if (buf.isError(oct)) -1 1373 return oct; -1 1374 -1 1375 tag <<= 7; -1 1376 tag |= oct & 0x7f; 1483 1377 } -1 1378 } else { -1 1379 tag &= 0x1f; -1 1380 } -1 1381 const tagStr = der.tag[tag]; -1 1382 -1 1383 return { -1 1384 cls: cls, -1 1385 primitive: primitive, -1 1386 tag: tag, -1 1387 tagStr: tagStr -1 1388 }; -1 1389 } -1 1390 -1 1391 function derDecodeLen(buf, primitive, fail) { -1 1392 let len = buf.readUInt8(fail); -1 1393 if (buf.isError(len)) -1 1394 return len; 1484 1395 -1 1396 // Indefinite form -1 1397 if (!primitive && len === 0x80) 1485 1398 return null;1486 -1 };1487 13991488 -1 /**1489 -1 * @param {number} value The value of a color channel, 0 <= value <= 0xFF1490 -1 * @return {!string}1491 -1 */1492 -1 axs.color.colorChannelToString = function(value) {1493 -1 value = Math.round(value);1494 -1 if (value <= 0xF)1495 -1 return '0' + value.toString(16);1496 -1 return value.toString(16);1497 -1 };-1 1400 // Definite form -1 1401 if ((len & 0x80) === 0) { -1 1402 // Short form -1 1403 return len; -1 1404 } 1498 14051499 -1 /**1500 -1 * @param {axs.color.Color} color1501 -1 * @return {!string}1502 -1 */1503 -1 axs.color.colorToString = function(color) {1504 -1 if (color.alpha == 1) {1505 -1 return '#' + axs.color.colorChannelToString(color.red) +1506 -1 axs.color.colorChannelToString(color.green) + axs.color.colorChannelToString(color.blue);1507 -1 }1508 -1 else1509 -1 return 'rgba(' + [color.red, color.green, color.blue, color.alpha].join(',') + ')';1510 -1 };-1 1406 // Long form -1 1407 const num = len & 0x7f; -1 1408 if (num > 4) -1 1409 return buf.error('length octect is too long'); -1 1410 -1 1411 len = 0; -1 1412 for (let i = 0; i < num; i++) { -1 1413 len <<= 8; -1 1414 const j = buf.readUInt8(fail); -1 1415 if (buf.isError(j)) -1 1416 return j; -1 1417 len |= j; -1 1418 } 1511 14191512 -1 /**1513 -1 * Compute a desired luminance given a given luminance and a desired contrast ratio.1514 -1 * @param {number} luminance The given luminance.1515 -1 * @param {number} contrast The desired contrast ratio.1516 -1 * @param {boolean} higher Whether the desired luminance is higher or lower than the given luminance.1517 -1 * @return {number} The desired luminance.1518 -1 */1519 -1 axs.color.luminanceFromContrastRatio = function(luminance, contrast, higher) {1520 -1 if (higher) {1521 -1 var newLuminance = (luminance + 0.05) * contrast - 0.05;1522 -1 return newLuminance;1523 -1 } else {1524 -1 var newLuminance = (luminance + 0.05) / contrast - 0.05;1525 -1 return newLuminance;1526 -1 }1527 -1 };-1 1420 return len; -1 1421 } 1528 14221529 -1 /**1530 -1 * Given a color in YCbCr format and a desired luminance, pick a new color with the desired luminance which is1531 -1 * as close as possible to the original color.1532 -1 * @param {axs.color.YCbCr} ycc The original color in YCbCr form.1533 -1 * @param {number} luma The desired luminance1534 -1 * @return {!axs.color.Color} A new color in RGB.1535 -1 */1536 -1 axs.color.translateColor = function(ycc, luma) {1537 -1 var endpoint = (luma > ycc.luma) ? axs.color.WHITE_YCC : axs.color.BLACK_YCC;1538 -1 var cubeFaces = (endpoint == axs.color.WHITE_YCC) ? axs.color.YCC_CUBE_FACES_WHITE1539 -1 : axs.color.YCC_CUBE_FACES_BLACK;-1 1423 },{"../base/buffer":3,"../base/node":5,"../constants/der":7,"bn.js":15,"inherits":132}],10:[function(require,module,exports){ -1 1424 'use strict'; 1540 14251541 -1 var a = new axs.color.YCbCr([0, ycc.Cb, ycc.Cr]);1542 -1 var b = new axs.color.YCbCr([1, ycc.Cb, ycc.Cr]);1543 -1 var line = { a: a, b: b };-1 1426 const decoders = exports; 1544 14271545 -1 var intersection = null;1546 -1 for (var i = 0; i < cubeFaces.length; i++) {1547 -1 var cubeFace = cubeFaces[i];1548 -1 intersection = axs.color.findIntersection(line, cubeFace);1549 -1 // If intersection within [0, 1] in Z axis, it is within the cube.1550 -1 if (intersection.z >= 0 && intersection.z <= 1)1551 -1 break;1552 -1 }1553 -1 if (!intersection) {1554 -1 // Should never happen1555 -1 throw "Couldn't find intersection with YCbCr color cube for Cb=" + ycc.Cb + ", Cr=" + ycc.Cr + ".";1556 -1 }1557 -1 if (intersection.x != ycc.x || intersection.y != ycc.y) {1558 -1 // Should never happen1559 -1 throw "Intersection has wrong Cb/Cr values.";1560 -1 }-1 1428 decoders.der = require('./der'); -1 1429 decoders.pem = require('./pem'); 1561 14301562 -1 // If intersection.luma is closer to endpoint than desired luma, then luma is inside cube1563 -1 // and we can immediately return new value.1564 -1 if (Math.abs(endpoint.luma - intersection.luma) < Math.abs(endpoint.luma - luma)) {1565 -1 var translatedColor = [luma, ycc.Cb, ycc.Cr];1566 -1 return axs.color.fromYCbCrArray(translatedColor);1567 -1 }-1 1431 },{"./der":9,"./pem":11}],11:[function(require,module,exports){ -1 1432 'use strict'; 1568 14331569 -1 // Otherwise, translate from intersection towards white/black such that luma is correct.1570 -1 var dLuma = luma - intersection.luma;1571 -1 var scale = dLuma / (endpoint.luma - intersection.luma);1572 -1 var translatedColor = [ luma,1573 -1 intersection.Cb - (intersection.Cb * scale),1574 -1 intersection.Cr - (intersection.Cr * scale) ];-1 1434 const inherits = require('inherits'); -1 1435 const Buffer = require('safer-buffer').Buffer; 1575 14361576 -1 return axs.color.fromYCbCrArray(translatedColor);1577 -1 };-1 1437 const DERDecoder = require('./der'); 1578 14381579 -1 /** @typedef {{fg: string, bg: string, contrast: string}} */1580 -1 axs.color.SuggestedColors;-1 1439 function PEMDecoder(entity) { -1 1440 DERDecoder.call(this, entity); -1 1441 this.enc = 'pem'; -1 1442 } -1 1443 inherits(PEMDecoder, DERDecoder); -1 1444 module.exports = PEMDecoder; 1581 14451582 -1 /**1583 -1 * @param {axs.color.Color} bgColor1584 -1 * @param {axs.color.Color} fgColor1585 -1 * @param {Object.<string, number>} desiredContrastRatios A map of label to desired contrast ratio.1586 -1 * @return {Object.<string, axs.color.SuggestedColors>}1587 -1 */1588 -1 axs.color.suggestColors = function(bgColor, fgColor, desiredContrastRatios) {1589 -1 var colors = {};1590 -1 var bgLuminance = axs.color.calculateLuminance(bgColor);1591 -1 var fgLuminance = axs.color.calculateLuminance(fgColor);-1 1446 PEMDecoder.prototype.decode = function decode(data, options) { -1 1447 const lines = data.toString().split(/[\r\n]+/g); 1592 14481593 -1 var fgLuminanceIsHigher = fgLuminance > bgLuminance;1594 -1 var fgYCbCr = axs.color.toYCbCr(fgColor);1595 -1 var bgYCbCr = axs.color.toYCbCr(bgColor);1596 -1 for (var desiredLabel in desiredContrastRatios) {1597 -1 var desiredContrast = desiredContrastRatios[desiredLabel];-1 1449 const label = options.label.toUpperCase(); 1598 14501599 -1 var desiredFgLuminance = axs.color.luminanceFromContrastRatio(bgLuminance, desiredContrast + 0.02, fgLuminanceIsHigher);1600 -1 if (desiredFgLuminance <= 1 && desiredFgLuminance >= 0) {1601 -1 var newFgColor = axs.color.translateColor(fgYCbCr, desiredFgLuminance);1602 -1 var newContrastRatio = axs.color.calculateContrastRatio(newFgColor, bgColor);1603 -1 var suggestedColors = {};1604 -1 suggestedColors.fg = /** @type {!string} */ (axs.color.colorToString(newFgColor));1605 -1 suggestedColors.bg = /** @type {!string} */ (axs.color.colorToString(bgColor));1606 -1 suggestedColors.contrast = /** @type {!string} */ (newContrastRatio.toFixed(2));1607 -1 colors[desiredLabel] = /** @type {axs.color.SuggestedColors} */ (suggestedColors);1608 -1 continue;1609 -1 }-1 1451 const re = /^-----(BEGIN|END) ([^-]+)-----$/; -1 1452 let start = -1; -1 1453 let end = -1; -1 1454 for (let i = 0; i < lines.length; i++) { -1 1455 const match = lines[i].match(re); -1 1456 if (match === null) -1 1457 continue; 1610 14581611 -1 var desiredBgLuminance = axs.color.luminanceFromContrastRatio(fgLuminance, desiredContrast + 0.02, !fgLuminanceIsHigher);1612 -1 if (desiredBgLuminance <= 1 && desiredBgLuminance >= 0) {1613 -1 var newBgColor = axs.color.translateColor(bgYCbCr, desiredBgLuminance);1614 -1 var newContrastRatio = axs.color.calculateContrastRatio(fgColor, newBgColor);1615 -1 var suggestedColors = {};1616 -1 suggestedColors.bg = /** @type {!string} */ (axs.color.colorToString(newBgColor));1617 -1 suggestedColors.fg = /** @type {!string} */ (axs.color.colorToString(fgColor));1618 -1 suggestedColors.contrast = /** @type {!string} */ (newContrastRatio.toFixed(2));1619 -1 colors[desiredLabel] = /** @type {axs.color.SuggestedColors} */ (suggestedColors);1620 -1 }-1 1459 if (match[2] !== label) -1 1460 continue; -1 1461 -1 1462 if (start === -1) { -1 1463 if (match[1] !== 'BEGIN') -1 1464 break; -1 1465 start = i; -1 1466 } else { -1 1467 if (match[1] !== 'END') -1 1468 break; -1 1469 end = i; -1 1470 break; 1621 1471 }1622 -1 return colors;1623 -1 };-1 1472 } -1 1473 if (start === -1 || end === -1) -1 1474 throw new Error('PEM section not found for: ' + label); 1624 14751625 -1 /**1626 -1 * Combine the two given color according to alpha blending.1627 -1 * @param {axs.color.Color} fgColor1628 -1 * @param {axs.color.Color} bgColor1629 -1 * @return {axs.color.Color}1630 -1 */1631 -1 axs.color.flattenColors = function(fgColor, bgColor) {1632 -1 var alpha = fgColor.alpha;1633 -1 var r = ((1 - alpha) * bgColor.red) + (alpha * fgColor.red);1634 -1 var g = ((1 - alpha) * bgColor.green) + (alpha * fgColor.green);1635 -1 var b = ((1 - alpha) * bgColor.blue) + (alpha * fgColor.blue);1636 -1 var a = fgColor.alpha + (bgColor.alpha * (1 - fgColor.alpha));-1 1476 const base64 = lines.slice(start + 1, end).join(''); -1 1477 // Remove excessive symbols -1 1478 base64.replace(/[^a-z0-9+/=]+/gi, ''); 1637 14791638 -1 return new axs.color.Color(r, g, b, a);-1 1480 const input = Buffer.from(base64, 'base64'); -1 1481 return DERDecoder.prototype.decode.call(this, input, options); 1639 1482 }; 1640 14831641 -1 /**1642 -1 * Multiply the given vector by the given matrix.1643 -1 * @param {Array.<Array.<number>>} matrix A 3x3 matrix1644 -1 * @param {Array.<number>} vector A 3-element vector1645 -1 * @return {Array.<number>} A 3-element vector1646 -1 */1647 -1 axs.color.multiplyMatrixVector = function(matrix, vector) {1648 -1 var a = matrix[0][0];1649 -1 var b = matrix[0][1];1650 -1 var c = matrix[0][2];1651 -1 var d = matrix[1][0];1652 -1 var e = matrix[1][1];1653 -1 var f = matrix[1][2];1654 -1 var g = matrix[2][0];1655 -1 var h = matrix[2][1];1656 -1 var k = matrix[2][2];-1 1484 },{"./der":9,"inherits":132,"safer-buffer":161}],12:[function(require,module,exports){ -1 1485 'use strict'; 1657 14861658 -1 var x = vector[0];1659 -1 var y = vector[1];1660 -1 var z = vector[2];-1 1487 const inherits = require('inherits'); -1 1488 const Buffer = require('safer-buffer').Buffer; -1 1489 const Node = require('../base/node'); 1661 14901662 -1 return [1663 -1 a*x + b*y + c*z,1664 -1 d*x + e*y + f*z,1665 -1 g*x + h*y + k*z1666 -1 ];1667 -1 };-1 1491 // Import DER constants -1 1492 const der = require('../constants/der'); 1668 14931669 -1 /**1670 -1 * Convert a given RGB color to YCbCr.1671 -1 * @param {axs.color.Color} color1672 -1 * @return {axs.color.YCbCr}1673 -1 */1674 -1 axs.color.toYCbCr = function(color) {1675 -1 var rSRGB = color.red / 255;1676 -1 var gSRGB = color.green / 255;1677 -1 var bSRGB = color.blue / 255;-1 1494 function DEREncoder(entity) { -1 1495 this.enc = 'der'; -1 1496 this.name = entity.name; -1 1497 this.entity = entity; 1678 14981679 -1 var r = rSRGB <= 0.03928 ? rSRGB / 12.92 : Math.pow(((rSRGB + 0.055)/1.055), 2.4);1680 -1 var g = gSRGB <= 0.03928 ? gSRGB / 12.92 : Math.pow(((gSRGB + 0.055)/1.055), 2.4);1681 -1 var b = bSRGB <= 0.03928 ? bSRGB / 12.92 : Math.pow(((bSRGB + 0.055)/1.055), 2.4);-1 1499 // Construct base tree -1 1500 this.tree = new DERNode(); -1 1501 this.tree._init(entity.body); -1 1502 } -1 1503 module.exports = DEREncoder; 1682 15041683 -1 return new axs.color.YCbCr(axs.color.multiplyMatrixVector(axs.color.YCC_MATRIX, [r, g, b]));-1 1505 DEREncoder.prototype.encode = function encode(data, reporter) { -1 1506 return this.tree._encode(data, reporter).join(); 1684 1507 }; 1685 15081686 -1 /**1687 -1 * @param {axs.color.YCbCr} ycc1688 -1 * @return {!axs.color.Color}1689 -1 */1690 -1 axs.color.fromYCbCr = function(ycc) {1691 -1 return axs.color.fromYCbCrArray([ycc.luma, ycc.Cb, ycc.Cr]);1692 -1 };-1 1509 // Tree methods 1693 15101694 -1 /**1695 -1 * Convert a color from a YCbCr color (as a vector) to an RGB color1696 -1 * @param {Array.<number>} yccArray1697 -1 * @return {!axs.color.Color}1698 -1 */1699 -1 axs.color.fromYCbCrArray = function(yccArray) {1700 -1 var rgb = axs.color.multiplyMatrixVector(axs.color.INVERTED_YCC_MATRIX, yccArray);-1 1511 function DERNode(parent) { -1 1512 Node.call(this, 'der', parent); -1 1513 } -1 1514 inherits(DERNode, Node); -1 1515 -1 1516 DERNode.prototype._encodeComposite = function encodeComposite(tag, -1 1517 primitive, -1 1518 cls, -1 1519 content) { -1 1520 const encodedTag = encodeTag(tag, primitive, cls, this.reporter); -1 1521 -1 1522 // Short form -1 1523 if (content.length < 0x80) { -1 1524 const header = Buffer.alloc(2); -1 1525 header[0] = encodedTag; -1 1526 header[1] = content.length; -1 1527 return this._createEncoderBuffer([ header, content ]); -1 1528 } 1701 15291702 -1 var r = rgb[0];1703 -1 var g = rgb[1];1704 -1 var b = rgb[2];1705 -1 var rSRGB = r <= 0.00303949 ? (r * 12.92) : (Math.pow(r, (1/2.4)) * 1.055) - 0.055;1706 -1 var gSRGB = g <= 0.00303949 ? (g * 12.92) : (Math.pow(g, (1/2.4)) * 1.055) - 0.055;1707 -1 var bSRGB = b <= 0.00303949 ? (b * 12.92) : (Math.pow(b, (1/2.4)) * 1.055) - 0.055;-1 1530 // Long form -1 1531 // Count octets required to store length -1 1532 let lenOctets = 1; -1 1533 for (let i = content.length; i >= 0x100; i >>= 8) -1 1534 lenOctets++; 1708 15351709 -1 var red = Math.min(Math.max(Math.round(rSRGB * 255), 0), 255);1710 -1 var green = Math.min(Math.max(Math.round(gSRGB * 255), 0), 255);1711 -1 var blue = Math.min(Math.max(Math.round(bSRGB * 255), 0), 255);-1 1536 const header = Buffer.alloc(1 + 1 + lenOctets); -1 1537 header[0] = encodedTag; -1 1538 header[1] = 0x80 | lenOctets; 1712 15391713 -1 return new axs.color.Color(red, green, blue, 1);-1 1540 for (let i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8) -1 1541 header[i] = j & 0xff; -1 1542 -1 1543 return this._createEncoderBuffer([ header, content ]); 1714 1544 }; 1715 15451716 -1 /**1717 -1 * Returns an RGB to YCbCr conversion matrix for the given kR, kB constants.1718 -1 * @param {number} kR1719 -1 * @param {number} kB1720 -1 * @return {Array.<Array.<number>>}1721 -1 */1722 -1 axs.color.RGBToYCbCrMatrix = function(kR, kB) {1723 -1 return [1724 -1 [1725 -1 kR,1726 -1 (1 - kR - kB),1727 -1 kB1728 -1 ],1729 -1 [1730 -1 -kR/(2 - 2*kB),1731 -1 (kR + kB - 1)/(2 - 2*kB),1732 -1 (1 - kB)/(2 - 2*kB)1733 -1 ],1734 -1 [1735 -1 (1 - kR)/(2 - 2*kR),1736 -1 (kR + kB - 1)/(2 - 2*kR),1737 -1 -kB/(2 - 2*kR)1738 -1 ]1739 -1 ];-1 1546 DERNode.prototype._encodeStr = function encodeStr(str, tag) { -1 1547 if (tag === 'bitstr') { -1 1548 return this._createEncoderBuffer([ str.unused | 0, str.data ]); -1 1549 } else if (tag === 'bmpstr') { -1 1550 const buf = Buffer.alloc(str.length * 2); -1 1551 for (let i = 0; i < str.length; i++) { -1 1552 buf.writeUInt16BE(str.charCodeAt(i), i * 2); -1 1553 } -1 1554 return this._createEncoderBuffer(buf); -1 1555 } else if (tag === 'numstr') { -1 1556 if (!this._isNumstr(str)) { -1 1557 return this.reporter.error('Encoding of string type: numstr supports ' + -1 1558 'only digits and space'); -1 1559 } -1 1560 return this._createEncoderBuffer(str); -1 1561 } else if (tag === 'printstr') { -1 1562 if (!this._isPrintstr(str)) { -1 1563 return this.reporter.error('Encoding of string type: printstr supports ' + -1 1564 'only latin upper and lower case letters, ' + -1 1565 'digits, space, apostrophe, left and rigth ' + -1 1566 'parenthesis, plus sign, comma, hyphen, ' + -1 1567 'dot, slash, colon, equal sign, ' + -1 1568 'question mark'); -1 1569 } -1 1570 return this._createEncoderBuffer(str); -1 1571 } else if (/str$/.test(tag)) { -1 1572 return this._createEncoderBuffer(str); -1 1573 } else if (tag === 'objDesc') { -1 1574 return this._createEncoderBuffer(str); -1 1575 } else { -1 1576 return this.reporter.error('Encoding of string type: ' + tag + -1 1577 ' unsupported'); -1 1578 } 1740 1579 }; 1741 15801742 -1 /**1743 -1 * Return the inverse of the given 3x3 matrix.1744 -1 * @param {Array.<Array.<number>>} matrix1745 -1 * @return Array.<Array.<number>> The inverse of the given matrix.1746 -1 */1747 -1 axs.color.invert3x3Matrix = function(matrix) {1748 -1 var a = matrix[0][0];1749 -1 var b = matrix[0][1];1750 -1 var c = matrix[0][2];1751 -1 var d = matrix[1][0];1752 -1 var e = matrix[1][1];1753 -1 var f = matrix[1][2];1754 -1 var g = matrix[2][0];1755 -1 var h = matrix[2][1];1756 -1 var k = matrix[2][2];-1 1581 DERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) { -1 1582 if (typeof id === 'string') { -1 1583 if (!values) -1 1584 return this.reporter.error('string objid given, but no values map found'); -1 1585 if (!values.hasOwnProperty(id)) -1 1586 return this.reporter.error('objid not found in values map'); -1 1587 id = values[id].split(/[\s.]+/g); -1 1588 for (let i = 0; i < id.length; i++) -1 1589 id[i] |= 0; -1 1590 } else if (Array.isArray(id)) { -1 1591 id = id.slice(); -1 1592 for (let i = 0; i < id.length; i++) -1 1593 id[i] |= 0; -1 1594 } 1757 15951758 -1 var A = (e*k - f*h);1759 -1 var B = (f*g - d*k);1760 -1 var C = (d*h - e*g);1761 -1 var D = (c*h - b*k);1762 -1 var E = (a*k - c*g);1763 -1 var F = (g*b - a*h);1764 -1 var G = (b*f - c*e);1765 -1 var H = (c*d - a*f);1766 -1 var K = (a*e - b*d);-1 1596 if (!Array.isArray(id)) { -1 1597 return this.reporter.error('objid() should be either array or string, ' + -1 1598 'got: ' + JSON.stringify(id)); -1 1599 } 1767 16001768 -1 var det = a * (e*k - f*h) - b * (k*d - f*g) + c * (d*h - e*g);1769 -1 var z = 1/det;-1 1601 if (!relative) { -1 1602 if (id[1] >= 40) -1 1603 return this.reporter.error('Second objid identifier OOB'); -1 1604 id.splice(0, 2, id[0] * 40 + id[1]); -1 1605 } 1770 16061771 -1 return axs.color.scalarMultiplyMatrix([1772 -1 [ A, D, G ],1773 -1 [ B, E, H ],1774 -1 [ C, F, K ]1775 -1 ], z);-1 1607 // Count number of octets -1 1608 let size = 0; -1 1609 for (let i = 0; i < id.length; i++) { -1 1610 let ident = id[i]; -1 1611 for (size++; ident >= 0x80; ident >>= 7) -1 1612 size++; -1 1613 } -1 1614 -1 1615 const objid = Buffer.alloc(size); -1 1616 let offset = objid.length - 1; -1 1617 for (let i = id.length - 1; i >= 0; i--) { -1 1618 let ident = id[i]; -1 1619 objid[offset--] = ident & 0x7f; -1 1620 while ((ident >>= 7) > 0) -1 1621 objid[offset--] = 0x80 | (ident & 0x7f); -1 1622 } -1 1623 -1 1624 return this._createEncoderBuffer(objid); 1776 1625 }; 1777 16261778 -1 /** @typedef {{ a: axs.color.YCbCr, b: axs.color.YCbCr }} */1779 -1 axs.color.Line;-1 1627 function two(num) { -1 1628 if (num < 10) -1 1629 return '0' + num; -1 1630 else -1 1631 return num; -1 1632 } 1780 16331781 -1 /** @typedef {{ p0: axs.color.YCbCr, p1: axs.color.YCbCr, p2: axs.color.YCbCr }} */1782 -1 axs.color.Plane;-1 1634 DERNode.prototype._encodeTime = function encodeTime(time, tag) { -1 1635 let str; -1 1636 const date = new Date(time); -1 1637 -1 1638 if (tag === 'gentime') { -1 1639 str = [ -1 1640 two(date.getUTCFullYear()), -1 1641 two(date.getUTCMonth() + 1), -1 1642 two(date.getUTCDate()), -1 1643 two(date.getUTCHours()), -1 1644 two(date.getUTCMinutes()), -1 1645 two(date.getUTCSeconds()), -1 1646 'Z' -1 1647 ].join(''); -1 1648 } else if (tag === 'utctime') { -1 1649 str = [ -1 1650 two(date.getUTCFullYear() % 100), -1 1651 two(date.getUTCMonth() + 1), -1 1652 two(date.getUTCDate()), -1 1653 two(date.getUTCHours()), -1 1654 two(date.getUTCMinutes()), -1 1655 two(date.getUTCSeconds()), -1 1656 'Z' -1 1657 ].join(''); -1 1658 } else { -1 1659 this.reporter.error('Encoding ' + tag + ' time is not supported yet'); -1 1660 } 1783 16611784 -1 /**1785 -1 * Find the intersection between a line and a plane using1786 -1 * http://en.wikipedia.org/wiki/Line%E2%80%93plane_intersection#Parametric_form1787 -1 * @param {axs.color.Line} l1788 -1 * @param {axs.color.Plane} p1789 -1 * @return {axs.color.YCbCr}1790 -1 */1791 -1 axs.color.findIntersection = function(l, p) {1792 -1 var lhs = [ l.a.x - p.p0.x, l.a.y - p.p0.y, l.a.z - p.p0.z ];-1 1662 return this._encodeStr(str, 'octstr'); -1 1663 }; 1793 16641794 -1 var matrix = [ [ l.a.x - l.b.x, p.p1.x - p.p0.x, p.p2.x - p.p0.x ],1795 -1 [ l.a.y - l.b.y, p.p1.y - p.p0.y, p.p2.y - p.p0.y ],1796 -1 [ l.a.z - l.b.z, p.p1.z - p.p0.z, p.p2.z - p.p0.z ] ];1797 -1 var invertedMatrix = axs.color.invert3x3Matrix(matrix);-1 1665 DERNode.prototype._encodeNull = function encodeNull() { -1 1666 return this._createEncoderBuffer(''); -1 1667 }; 1798 16681799 -1 var tuv = axs.color.multiplyMatrixVector(invertedMatrix, lhs);1800 -1 var t = tuv[0];-1 1669 DERNode.prototype._encodeInt = function encodeInt(num, values) { -1 1670 if (typeof num === 'string') { -1 1671 if (!values) -1 1672 return this.reporter.error('String int or enum given, but no values map'); -1 1673 if (!values.hasOwnProperty(num)) { -1 1674 return this.reporter.error('Values map doesn\'t contain: ' + -1 1675 JSON.stringify(num)); -1 1676 } -1 1677 num = values[num]; -1 1678 } 1801 16791802 -1 var result = l.a.add(l.b.subtract(l.a).multiply(t));1803 -1 return result;-1 1680 // Bignum, assume big endian -1 1681 if (typeof num !== 'number' && !Buffer.isBuffer(num)) { -1 1682 const numArray = num.toArray(); -1 1683 if (!num.sign && numArray[0] & 0x80) { -1 1684 numArray.unshift(0); -1 1685 } -1 1686 num = Buffer.from(numArray); -1 1687 } -1 1688 -1 1689 if (Buffer.isBuffer(num)) { -1 1690 let size = num.length; -1 1691 if (num.length === 0) -1 1692 size++; -1 1693 -1 1694 const out = Buffer.alloc(size); -1 1695 num.copy(out); -1 1696 if (num.length === 0) -1 1697 out[0] = 0; -1 1698 return this._createEncoderBuffer(out); -1 1699 } -1 1700 -1 1701 if (num < 0x80) -1 1702 return this._createEncoderBuffer(num); -1 1703 -1 1704 if (num < 0x100) -1 1705 return this._createEncoderBuffer([0, num]); -1 1706 -1 1707 let size = 1; -1 1708 for (let i = num; i >= 0x100; i >>= 8) -1 1709 size++; -1 1710 -1 1711 const out = new Array(size); -1 1712 for (let i = out.length - 1; i >= 0; i--) { -1 1713 out[i] = num & 0xff; -1 1714 num >>= 8; -1 1715 } -1 1716 if(out[0] & 0x80) { -1 1717 out.unshift(0); -1 1718 } -1 1719 -1 1720 return this._createEncoderBuffer(Buffer.from(out)); 1804 1721 }; 1805 17221806 -1 /**1807 -1 * Multiply a matrix by a scalar.1808 -1 * @param {Array.<Array.<number>>} matrix A 3x3 matrix.1809 -1 * @param {number} scalar1810 -1 * @return {Array.<Array.<number>>}1811 -1 */1812 -1 axs.color.scalarMultiplyMatrix = function(matrix, scalar) {1813 -1 var result = [];-1 1723 DERNode.prototype._encodeBool = function encodeBool(value) { -1 1724 return this._createEncoderBuffer(value ? 0xff : 0); -1 1725 }; 1814 17261815 -1 for (var i = 0; i < 3; i++)1816 -1 result[i] = axs.color.scalarMultiplyVector(matrix[i], scalar);-1 1727 DERNode.prototype._use = function use(entity, obj) { -1 1728 if (typeof entity === 'function') -1 1729 entity = entity(obj); -1 1730 return entity._getEncoder('der').tree; -1 1731 }; 1817 17321818 -1 return result;-1 1733 DERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) { -1 1734 const state = this._baseState; -1 1735 let i; -1 1736 if (state['default'] === null) -1 1737 return false; -1 1738 -1 1739 const data = dataBuffer.join(); -1 1740 if (state.defaultBuffer === undefined) -1 1741 state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join(); -1 1742 -1 1743 if (data.length !== state.defaultBuffer.length) -1 1744 return false; -1 1745 -1 1746 for (i=0; i < data.length; i++) -1 1747 if (data[i] !== state.defaultBuffer[i]) -1 1748 return false; -1 1749 -1 1750 return true; 1819 1751 }; 1820 17521821 -1 /**1822 -1 * Multiply a vector by a scalar.1823 -1 * @param {Array.<number>} vector1824 -1 * @param {number} scalar1825 -1 * @return {Array.<number>} vector1826 -1 */1827 -1 axs.color.scalarMultiplyVector = function(vector, scalar) {1828 -1 var result = [];1829 -1 for (var i = 0; i < vector.length; i++)1830 -1 result[i] = vector[i] * scalar;1831 -1 return result;-1 1753 // Utility methods -1 1754 -1 1755 function encodeTag(tag, primitive, cls, reporter) { -1 1756 let res; -1 1757 -1 1758 if (tag === 'seqof') -1 1759 tag = 'seq'; -1 1760 else if (tag === 'setof') -1 1761 tag = 'set'; -1 1762 -1 1763 if (der.tagByName.hasOwnProperty(tag)) -1 1764 res = der.tagByName[tag]; -1 1765 else if (typeof tag === 'number' && (tag | 0) === tag) -1 1766 res = tag; -1 1767 else -1 1768 return reporter.error('Unknown tag: ' + tag); -1 1769 -1 1770 if (res >= 0x1f) -1 1771 return reporter.error('Multi-octet tag encoding unsupported'); -1 1772 -1 1773 if (!primitive) -1 1774 res |= 0x20; -1 1775 -1 1776 res |= (der.tagClassByName[cls || 'universal'] << 6); -1 1777 -1 1778 return res; -1 1779 } -1 1780 -1 1781 },{"../base/node":5,"../constants/der":7,"inherits":132,"safer-buffer":161}],13:[function(require,module,exports){ -1 1782 'use strict'; -1 1783 -1 1784 const encoders = exports; -1 1785 -1 1786 encoders.der = require('./der'); -1 1787 encoders.pem = require('./pem'); -1 1788 -1 1789 },{"./der":12,"./pem":14}],14:[function(require,module,exports){ -1 1790 'use strict'; -1 1791 -1 1792 const inherits = require('inherits'); -1 1793 -1 1794 const DEREncoder = require('./der'); -1 1795 -1 1796 function PEMEncoder(entity) { -1 1797 DEREncoder.call(this, entity); -1 1798 this.enc = 'pem'; -1 1799 } -1 1800 inherits(PEMEncoder, DEREncoder); -1 1801 module.exports = PEMEncoder; -1 1802 -1 1803 PEMEncoder.prototype.encode = function encode(data, options) { -1 1804 const buf = DEREncoder.prototype.encode.call(this, data); -1 1805 -1 1806 const p = buf.toString('base64'); -1 1807 const out = [ '-----BEGIN ' + options.label + '-----' ]; -1 1808 for (let i = 0; i < p.length; i += 64) -1 1809 out.push(p.slice(i, i + 64)); -1 1810 out.push('-----END ' + options.label + '-----'); -1 1811 return out.join('\n'); 1832 1812 }; 1833 18131834 -1 axs.color.kR = 0.2126;1835 -1 axs.color.kB = 0.0722;1836 -1 axs.color.YCC_MATRIX = axs.color.RGBToYCbCrMatrix(axs.color.kR, axs.color.kB);1837 -1 axs.color.INVERTED_YCC_MATRIX = axs.color.invert3x3Matrix(axs.color.YCC_MATRIX);-1 1814 },{"./der":12,"inherits":132}],15:[function(require,module,exports){ -1 1815 (function (module, exports) { -1 1816 'use strict'; 1838 18171839 -1 axs.color.BLACK = new axs.color.Color(0, 0, 0, 1.0);1840 -1 axs.color.BLACK_YCC = axs.color.toYCbCr(axs.color.BLACK);1841 -1 axs.color.WHITE = new axs.color.Color(255, 255, 255, 1.0);1842 -1 axs.color.WHITE_YCC = axs.color.toYCbCr(axs.color.WHITE);1843 -1 axs.color.RED = new axs.color.Color(255, 0, 0, 1.0);1844 -1 axs.color.RED_YCC = axs.color.toYCbCr(axs.color.RED);1845 -1 axs.color.GREEN = new axs.color.Color(0, 255, 0, 1.0);1846 -1 axs.color.GREEN_YCC = axs.color.toYCbCr(axs.color.GREEN);1847 -1 axs.color.BLUE = new axs.color.Color(0, 0, 255, 1.0);1848 -1 axs.color.BLUE_YCC = axs.color.toYCbCr(axs.color.BLUE);1849 -1 axs.color.CYAN = new axs.color.Color(0, 255, 255, 1.0);1850 -1 axs.color.CYAN_YCC = axs.color.toYCbCr(axs.color.CYAN);1851 -1 axs.color.MAGENTA = new axs.color.Color(255, 0, 255, 1.0);1852 -1 axs.color.MAGENTA_YCC = axs.color.toYCbCr(axs.color.MAGENTA);1853 -1 axs.color.YELLOW = new axs.color.Color(255, 255, 0, 1.0);1854 -1 axs.color.YELLOW_YCC = axs.color.toYCbCr(axs.color.YELLOW);-1 1818 // Utils -1 1819 function assert (val, msg) { -1 1820 if (!val) throw new Error(msg || 'Assertion failed'); -1 1821 } 1855 18221856 -1 axs.color.YCC_CUBE_FACES_BLACK = [ { p0: axs.color.BLACK_YCC, p1: axs.color.RED_YCC, p2: axs.color.GREEN_YCC },1857 -1 { p0: axs.color.BLACK_YCC, p1: axs.color.GREEN_YCC, p2: axs.color.BLUE_YCC },1858 -1 { p0: axs.color.BLACK_YCC, p1: axs.color.BLUE_YCC, p2: axs.color.RED_YCC } ];1859 -1 axs.color.YCC_CUBE_FACES_WHITE = [ { p0: axs.color.WHITE_YCC, p1: axs.color.CYAN_YCC, p2: axs.color.MAGENTA_YCC },1860 -1 { p0: axs.color.WHITE_YCC, p1: axs.color.MAGENTA_YCC, p2: axs.color.YELLOW_YCC },1861 -1 { p0: axs.color.WHITE_YCC, p1: axs.color.YELLOW_YCC, p2: axs.color.CYAN_YCC } ];-1 1823 // Could use `inherits` module, but don't want to move from single file -1 1824 // architecture yet. -1 1825 function inherits (ctor, superCtor) { -1 1826 ctor.super_ = superCtor; -1 1827 var TempCtor = function () {}; -1 1828 TempCtor.prototype = superCtor.prototype; -1 1829 ctor.prototype = new TempCtor(); -1 1830 ctor.prototype.constructor = ctor; -1 1831 } 1862 18321863 -1 },{}],4:[function(require,module,exports){1864 -1 // Copyright 2012 Google Inc.1865 -1 //1866 -1 // Licensed under the Apache License, Version 2.0 (the "License");1867 -1 // you may not use this file except in compliance with the License.1868 -1 // You may obtain a copy of the License at1869 -1 //1870 -1 // http://www.apache.org/licenses/LICENSE-2.01871 -1 //1872 -1 // Unless required by applicable law or agreed to in writing, software1873 -1 // distributed under the License is distributed on an "AS IS" BASIS,1874 -1 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.1875 -1 // See the License for the specific language governing permissions and1876 -1 // limitations under the License.-1 1833 // BN 1877 18341878 -1 goog.provide('axs.constants');1879 -1 goog.provide('axs.constants.AuditResult');1880 -1 goog.provide('axs.constants.Severity');-1 1835 function BN (number, base, endian) { -1 1836 if (BN.isBN(number)) { -1 1837 return number; -1 1838 } 1881 18391882 -1 /** @type {Object.<string, Object>} */1883 -1 axs.constants.ARIA_ROLES = {1884 -1 "alert": {1885 -1 "namefrom": [ "author" ],1886 -1 "parent": [ "region" ]1887 -1 },1888 -1 "alertdialog": {1889 -1 "namefrom": [ "author" ],1890 -1 "namerequired": true,1891 -1 "parent": [ "alert", "dialog" ]1892 -1 },1893 -1 "application": {1894 -1 "namefrom": [ "author" ],1895 -1 "namerequired": true,1896 -1 "parent": [ "landmark" ]1897 -1 },1898 -1 "article": {1899 -1 "namefrom": [ "author" ],1900 -1 "parent": [ "document", "region" ]1901 -1 },1902 -1 "banner": {1903 -1 "namefrom": [ "author" ],1904 -1 "parent": [ "landmark" ]1905 -1 },1906 -1 "button": {1907 -1 "childpresentational": true,1908 -1 "namefrom": [ "contents", "author" ],1909 -1 "namerequired": true,1910 -1 "parent": [ "command" ],1911 -1 "properties": [ "aria-expanded", "aria-pressed" ]1912 -1 },1913 -1 "checkbox": {1914 -1 "namefrom": [ "contents", "author" ],1915 -1 "namerequired": true,1916 -1 "parent": [ "input" ],1917 -1 "requiredProperties": [ "aria-checked" ],1918 -1 "properties": [ "aria-checked" ]1919 -1 },1920 -1 "columnheader": {1921 -1 "namefrom": [ "contents", "author" ],1922 -1 "namerequired": true,1923 -1 "parent": [ "gridcell", "sectionhead", "widget" ],1924 -1 "properties": [ "aria-sort" ],1925 -1 "scope": [ "row" ]1926 -1 },1927 -1 "combobox": {1928 -1 "mustcontain": [ "listbox", "textbox" ],1929 -1 "namefrom": [ "author" ],1930 -1 "namerequired": true,1931 -1 "parent": [ "select" ],1932 -1 "requiredProperties": [ "aria-expanded" ],1933 -1 "properties": [ "aria-expanded", "aria-autocomplete", "aria-required" ]1934 -1 },1935 -1 "command": {1936 -1 "abstract": true,1937 -1 "namefrom": [ "author" ],1938 -1 "parent": [ "widget" ]1939 -1 },1940 -1 "complementary": {1941 -1 "namefrom": [ "author" ],1942 -1 "parent": [ "landmark" ]1943 -1 },1944 -1 "composite": {1945 -1 "abstract": true,1946 -1 "childpresentational": false,1947 -1 "namefrom": [ "author" ],1948 -1 "parent": [ "widget" ],1949 -1 "properties": [ "aria-activedescendant" ]1950 -1 },1951 -1 "contentinfo": {1952 -1 "namefrom": [ "author" ],1953 -1 "parent": [ "landmark" ]1954 -1 },1955 -1 "definition": {1956 -1 "namefrom": [ "author" ],1957 -1 "parent": [ "section" ]1958 -1 },1959 -1 "dialog": {1960 -1 "namefrom": [ "author" ],1961 -1 "namerequired": true,1962 -1 "parent": [ "window" ]1963 -1 },1964 -1 "directory": {1965 -1 "namefrom": [ "contents", "author" ],1966 -1 "parent": [ "list" ]1967 -1 },1968 -1 "document": {1969 -1 "namefrom": [ " author" ],1970 -1 "namerequired": true,1971 -1 "parent": [ "structure" ],1972 -1 "properties": [ "aria-expanded" ]1973 -1 },1974 -1 "form": {1975 -1 "namefrom": [ "author" ],1976 -1 "parent": [ "landmark" ]1977 -1 },1978 -1 "grid": {1979 -1 "mustcontain": [ "row", "rowgroup" ],1980 -1 "namefrom": [ "author" ],1981 -1 "namerequired": true,1982 -1 "parent": [ "composite", "region" ],1983 -1 "properties": [ "aria-level", "aria-multiselectable", "aria-readonly" ]1984 -1 },1985 -1 "gridcell": {1986 -1 "namefrom": [ "contents", "author" ],1987 -1 "namerequired": true,1988 -1 "parent": [ "section", "widget" ],1989 -1 "properties": [ "aria-readonly", "aria-required", "aria-selected" ],1990 -1 "scope": [ "row" ]1991 -1 },1992 -1 "group": {1993 -1 "namefrom": [ " author" ],1994 -1 "parent": [ "section" ],1995 -1 "properties": [ "aria-activedescendant" ]1996 -1 },1997 -1 "heading": {1998 -1 "namerequired": true,1999 -1 "parent": [ "sectionhead" ],2000 -1 "properties": [ "aria-level" ]2001 -1 },2002 -1 "img": {2003 -1 "childpresentational": true,2004 -1 "namefrom": [ "author" ],2005 -1 "namerequired": true,2006 -1 "parent": [ "section" ]2007 -1 },2008 -1 "input": {2009 -1 "abstract": true,2010 -1 "namefrom": [ "author" ],2011 -1 "parent": [ "widget" ]2012 -1 },2013 -1 "landmark": {2014 -1 "abstract": true,2015 -1 "namefrom": [ "contents", "author" ],2016 -1 "namerequired": false,2017 -1 "parent": [ "region" ]2018 -1 },2019 -1 "link": {2020 -1 "namefrom": [ "contents", "author" ],2021 -1 "namerequired": true,2022 -1 "parent": [ "command" ],2023 -1 "properties": [ "aria-expanded" ]2024 -1 },2025 -1 "list": {2026 -1 "mustcontain": [ "group", "listitem" ],2027 -1 "namefrom": [ "author" ],2028 -1 "parent": [ "region" ]2029 -1 },2030 -1 "listbox": {2031 -1 "mustcontain": [ "option" ],2032 -1 "namefrom": [ "author" ],2033 -1 "namerequired": true,2034 -1 "parent": [ "list", "select" ],2035 -1 "properties": [ "aria-multiselectable", "aria-required" ]2036 -1 },2037 -1 "listitem": {2038 -1 "namefrom": [ "contents", "author" ],2039 -1 "namerequired": true,2040 -1 "parent": [ "section" ],2041 -1 "properties": [ "aria-level", "aria-posinset", "aria-setsize" ],2042 -1 "scope": [ "list" ]2043 -1 },2044 -1 "log": {2045 -1 "namefrom": [ " author" ],2046 -1 "namerequired": true,2047 -1 "parent": [ "region" ]2048 -1 },2049 -1 "main": {2050 -1 "namefrom": [ "author" ],2051 -1 "parent": [ "landmark" ]2052 -1 },2053 -1 "marquee": {2054 -1 "namerequired": true,2055 -1 "parent": [ "section" ]2056 -1 },2057 -1 "math": {2058 -1 "childpresentational": true,2059 -1 "namefrom": [ "author" ],2060 -1 "parent": [ "section" ]2061 -1 },2062 -1 "menu": {2063 -1 "mustcontain": [2064 -1 "group",2065 -1 "menuitemradio",2066 -1 "menuitem",2067 -1 "menuitemcheckbox"2068 -1 ],2069 -1 "namefrom": [ "author" ],2070 -1 "namerequired": true,2071 -1 "parent": [ "list", "select" ]2072 -1 },2073 -1 "menubar": {2074 -1 "namefrom": [ "author" ],2075 -1 "parent": [ "menu" ]2076 -1 },2077 -1 "menuitem": {2078 -1 "namefrom": [ "contents", "author" ],2079 -1 "namerequired": true,2080 -1 "parent": [ "command" ],2081 -1 "scope": [ "menu", "menubar" ]2082 -1 },2083 -1 "menuitemcheckbox": {2084 -1 "namefrom": [ "contents", "author" ],2085 -1 "namerequired": true,2086 -1 "parent": [ "checkbox", "menuitem" ],2087 -1 "scope": [ "menu", "menubar" ]2088 -1 },2089 -1 "menuitemradio": {2090 -1 "namefrom": [ "contents", "author" ],2091 -1 "namerequired": true,2092 -1 "parent": [ "menuitemcheckbox", "radio" ],2093 -1 "scope": [ "menu", "menubar" ]2094 -1 },2095 -1 "navigation": {2096 -1 "namefrom": [ "author" ],2097 -1 "parent": [ "landmark" ]2098 -1 },2099 -1 "note": {2100 -1 "namefrom": [ "author" ],2101 -1 "parent": [ "section" ]2102 -1 },2103 -1 "option": {2104 -1 "namefrom": [ "contents", "author" ],2105 -1 "namerequired": true,2106 -1 "parent": [ "input" ],2107 -1 "properties": [2108 -1 "aria-checked",2109 -1 "aria-posinset",2110 -1 "aria-selected",2111 -1 "aria-setsize"2112 -1 ]2113 -1 },2114 -1 "presentation": {2115 -1 "parent": [ "structure" ]2116 -1 },2117 -1 "progressbar": {2118 -1 "childpresentational": true,2119 -1 "namefrom": [ "author" ],2120 -1 "namerequired": true,2121 -1 "parent": [ "range" ]2122 -1 },2123 -1 "radio": {2124 -1 "namefrom": [ "contents", "author" ],2125 -1 "namerequired": true,2126 -1 "parent": [ "checkbox", "option" ]2127 -1 },2128 -1 "radiogroup": {2129 -1 "mustcontain": [ "radio" ],2130 -1 "namefrom": [ "author" ],2131 -1 "namerequired": true,2132 -1 "parent": [ "select" ],2133 -1 "properties": [ "aria-required" ]2134 -1 },2135 -1 "range": {2136 -1 "abstract": true,2137 -1 "namefrom": [ "author" ],2138 -1 "parent": [ "widget" ],2139 -1 "properties": [2140 -1 "aria-valuemax",2141 -1 "aria-valuemin",2142 -1 "aria-valuenow",2143 -1 "aria-valuetext"2144 -1 ]2145 -1 },2146 -1 "region": {2147 -1 "namefrom": [ " author" ],2148 -1 "parent": [ "section" ]2149 -1 },2150 -1 "roletype": {2151 -1 "abstract": true,2152 -1 "properties": [2153 -1 "aria-atomic",2154 -1 "aria-busy",2155 -1 "aria-controls",2156 -1 "aria-describedby",2157 -1 "aria-disabled",2158 -1 "aria-dropeffect",2159 -1 "aria-flowto",2160 -1 "aria-grabbed",2161 -1 "aria-haspopup",2162 -1 "aria-hidden",2163 -1 "aria-invalid",2164 -1 "aria-label",2165 -1 "aria-labelledby",2166 -1 "aria-live",2167 -1 "aria-owns",2168 -1 "aria-relevant"2169 -1 ]2170 -1 },2171 -1 "row": {2172 -1 "mustcontain": [ "columnheader", "gridcell", "rowheader" ],2173 -1 "namefrom": [ "contents", "author" ],2174 -1 "parent": [ "group", "widget" ],2175 -1 "properties": [ "aria-level", "aria-selected" ],2176 -1 "scope": [ "grid", "rowgroup", "treegrid" ]2177 -1 },2178 -1 "rowgroup": {2179 -1 "mustcontain": [ "row" ],2180 -1 "namefrom": [ "contents", "author" ],2181 -1 "parent": [ "group" ],2182 -1 "scope": [ "grid" ]2183 -1 },2184 -1 "rowheader": {2185 -1 "namefrom": [ "contents", "author" ],2186 -1 "namerequired": true,2187 -1 "parent": [ "gridcell", "sectionhead", "widget" ],2188 -1 "properties": [ "aria-sort" ],2189 -1 "scope": [ "row" ]2190 -1 },2191 -1 "search": {2192 -1 "namefrom": [ "author" ],2193 -1 "parent": [ "landmark" ]2194 -1 },2195 -1 "section": {2196 -1 "abstract": true,2197 -1 "namefrom": [ "contents", "author" ],2198 -1 "parent": [ "structure" ],2199 -1 "properties": [ "aria-expanded" ]2200 -1 },2201 -1 "sectionhead": {2202 -1 "abstract": true,2203 -1 "namefrom": [ "contents", "author" ],2204 -1 "parent": [ "structure" ],2205 -1 "properties": [ "aria-expanded" ]2206 -1 },2207 -1 "select": {2208 -1 "abstract": true,2209 -1 "namefrom": [ "author" ],2210 -1 "parent": [ "composite", "group", "input" ]2211 -1 },2212 -1 "separator": {2213 -1 "childpresentational": true,2214 -1 "namefrom": [ "author" ],2215 -1 "parent": [ "structure" ],2216 -1 "properties": [ "aria-expanded", "aria-orientation" ]2217 -1 },2218 -1 "scrollbar": {2219 -1 "childpresentational": true,2220 -1 "namefrom": [ "author" ],2221 -1 "namerequired": false,2222 -1 "parent": [ "input", "range" ],2223 -1 "requiredProperties": [2224 -1 "aria-controls",2225 -1 "aria-orientation",2226 -1 "aria-valuemax",2227 -1 "aria-valuemin",2228 -1 "aria-valuenow"2229 -1 ],2230 -1 "properties": [2231 -1 "aria-controls",2232 -1 "aria-orientation",2233 -1 "aria-valuemax",2234 -1 "aria-valuemin",2235 -1 "aria-valuenow"2236 -1 ]2237 -1 },2238 -1 "slider": {2239 -1 "childpresentational": true,2240 -1 "namefrom": [ "author" ],2241 -1 "namerequired": true,2242 -1 "parent": [ "input", "range" ],2243 -1 "requiredProperties": [ "aria-valuemax", "aria-valuemin", "aria-valuenow" ],2244 -1 "properties": [2245 -1 "aria-valuemax",2246 -1 "aria-valuemin",2247 -1 "aria-valuenow",2248 -1 "aria-orientation"2249 -1 ]2250 -1 },2251 -1 "spinbutton": {2252 -1 "namefrom": [ "author" ],2253 -1 "namerequired": true,2254 -1 "parent": [ "input", "range" ],2255 -1 "requiredProperties": [ "aria-valuemax", "aria-valuemin", "aria-valuenow" ],2256 -1 "properties": [2257 -1 "aria-valuemax",2258 -1 "aria-valuemin",2259 -1 "aria-valuenow",2260 -1 "aria-required"2261 -1 ]2262 -1 },2263 -1 "status": {2264 -1 "parent": [ "region" ]2265 -1 },2266 -1 "structure": {2267 -1 "abstract": true,2268 -1 "parent": [ "roletype" ]2269 -1 },2270 -1 "tab": {2271 -1 "namefrom": [ "contents", "author" ],2272 -1 "parent": [ "sectionhead", "widget" ],2273 -1 "properties": [ "aria-selected" ],2274 -1 "scope": [ "tablist" ]2275 -1 },2276 -1 "tablist": {2277 -1 "mustcontain": [ "tab" ],2278 -1 "namefrom": [ "author" ],2279 -1 "parent": [ "composite", "directory" ],2280 -1 "properties": [ "aria-level" ]2281 -1 },2282 -1 "tabpanel": {2283 -1 "namefrom": [ "author" ],2284 -1 "namerequired": true,2285 -1 "parent": [ "region" ]2286 -1 },2287 -1 "textbox": {2288 -1 "namefrom": [ "author" ],2289 -1 "namerequired": true,2290 -1 "parent": [ "input" ],2291 -1 "properties": [2292 -1 "aria-activedescendant",2293 -1 "aria-autocomplete",2294 -1 "aria-multiline",2295 -1 "aria-readonly",2296 -1 "aria-required"2297 -1 ]2298 -1 },2299 -1 "timer": {2300 -1 "namefrom": [ "author" ],2301 -1 "namerequired": true,2302 -1 "parent": [ "status" ]2303 -1 },2304 -1 "toolbar": {2305 -1 "namefrom": [ "author" ],2306 -1 "parent": [ "group" ]2307 -1 },2308 -1 "tooltip": {2309 -1 "namerequired": true,2310 -1 "parent": [ "section" ]2311 -1 },2312 -1 "tree": {2313 -1 "mustcontain": [ "group", "treeitem" ],2314 -1 "namefrom": [ "author" ],2315 -1 "namerequired": true,2316 -1 "parent": [ "select" ],2317 -1 "properties": [ "aria-multiselectable", "aria-required" ]2318 -1 },2319 -1 "treegrid": {2320 -1 "mustcontain": [ "row" ],2321 -1 "namefrom": [ "author" ],2322 -1 "namerequired": true,2323 -1 "parent": [ "grid", "tree" ]2324 -1 },2325 -1 "treeitem": {2326 -1 "namefrom": [ "contents", "author" ],2327 -1 "namerequired": true,2328 -1 "parent": [ "listitem", "option" ],2329 -1 "scope": [ "group", "tree" ]2330 -1 },2331 -1 "widget": {2332 -1 "abstract": true,2333 -1 "parent": [ "roletype" ]2334 -1 },2335 -1 "window": {2336 -1 "abstract": true,2337 -1 "namefrom": [ " author" ],2338 -1 "parent": [ "roletype" ],2339 -1 "properties": [ "aria-expanded" ]2340 -1 }2341 -1 };2342 -12343 -1 axs.constants.WIDGET_ROLES = {};2344 -12345 -1 /**2346 -1 * Squashes the parent hierarchy on to role object.2347 -1 * @param {Object} role2348 -1 * @param {Object} set2349 -1 * @private2350 -1 */2351 -1 axs.constants.addAllParentRolesToSet_ = function(role, set) {2352 -1 if (!role['parent'])2353 -1 return;2354 -1 var parents = role['parent'];2355 -1 for (var j = 0; j < parents.length; j++) {2356 -1 var parentRoleName = parents[j];2357 -1 set[parentRoleName] = true;2358 -1 axs.constants.addAllParentRolesToSet_(2359 -1 axs.constants.ARIA_ROLES[parentRoleName], set);2360 -1 }2361 -1 };2362 -12363 -1 /**2364 -1 * Adds all properties and requiredProperties from parent hierarchy.2365 -1 * @param {Object} role2366 -1 * @param {string} propertiesName2367 -1 * @param {Object} propertiesSet2368 -1 * @private2369 -1 */2370 -1 axs.constants.addAllPropertiesToSet_ = function(role, propertiesName,2371 -1 propertiesSet) {2372 -1 var properties = role[propertiesName];2373 -1 if (properties) {2374 -1 for (var i = 0; i < properties.length; i++)2375 -1 propertiesSet[properties[i]] = true;2376 -1 }2377 -1 if (role['parent']) {2378 -1 var parents = role['parent'];2379 -1 for (var j = 0; j < parents.length; j++) {2380 -1 var parentRoleName = parents[j];2381 -1 axs.constants.addAllPropertiesToSet_(2382 -1 axs.constants.ARIA_ROLES[parentRoleName], propertiesName,2383 -1 propertiesSet);2384 -1 }2385 -1 }2386 -1 };2387 -12388 -1 // TODO make a AriaRole object etc.2389 -1 for (var roleName in axs.constants.ARIA_ROLES) {2390 -1 var role = axs.constants.ARIA_ROLES[roleName];2391 -12392 -1 var propertiesSet = {};2393 -1 axs.constants.addAllPropertiesToSet_(role, 'properties', propertiesSet);2394 -1 role['propertiesSet'] = propertiesSet;2395 -12396 -1 var requiredPropertiesSet = {};2397 -1 axs.constants.addAllPropertiesToSet_(role, 'requiredProperties', requiredPropertiesSet);2398 -1 role['requiredPropertiesSet'] = requiredPropertiesSet;2399 -1 var parentRolesSet = {};2400 -1 axs.constants.addAllParentRolesToSet_(role, parentRolesSet);2401 -1 role['allParentRolesSet'] = parentRolesSet;2402 -1 if ('widget' in parentRolesSet)2403 -1 axs.constants.WIDGET_ROLES[roleName] = role;2404 -1 }2405 -12406 -1 // BEGIN ARIA_PROPERTIES_AUTOGENERATED2407 -1 /** @type {Object.<string, Object>} */2408 -1 axs.constants.ARIA_PROPERTIES = {2409 -1 "activedescendant": {2410 -1 "type": "property",2411 -1 "valueType": "idref"2412 -1 },2413 -1 "atomic": {2414 -1 "defaultValue": "false",2415 -1 "type": "property",2416 -1 "valueType": "boolean"2417 -1 },2418 -1 "autocomplete": {2419 -1 "defaultValue": "none",2420 -1 "type": "property",2421 -1 "valueType": "token",2422 -1 "values": [2423 -1 "inline",2424 -1 "list",2425 -1 "both",2426 -1 "none"2427 -1 ]2428 -1 },2429 -1 "busy": {2430 -1 "defaultValue": "false",2431 -1 "type": "state",2432 -1 "valueType": "boolean"2433 -1 },2434 -1 "checked": {2435 -1 "defaultValue": "undefined",2436 -1 "type": "state",2437 -1 "valueType": "token",2438 -1 "values": [2439 -1 "true",2440 -1 "false",2441 -1 "mixed",2442 -1 "undefined"2443 -1 ]2444 -1 },2445 -1 "controls": {2446 -1 "type": "property",2447 -1 "valueType": "idref_list"2448 -1 },2449 -1 "describedby": {2450 -1 "type": "property",2451 -1 "valueType": "idref_list"2452 -1 },2453 -1 "disabled": {2454 -1 "defaultValue": "false",2455 -1 "type": "state",2456 -1 "valueType": "boolean"2457 -1 },2458 -1 "dropeffect": {2459 -1 "defaultValue": "none",2460 -1 "type": "property",2461 -1 "valueType": "token_list",2462 -1 "values": [2463 -1 "copy",2464 -1 "move",2465 -1 "link",2466 -1 "execute",2467 -1 "popup",2468 -1 "none"2469 -1 ]2470 -1 },2471 -1 "expanded": {2472 -1 "defaultValue": "undefined",2473 -1 "type": "state",2474 -1 "valueType": "token",2475 -1 "values": [2476 -1 "true",2477 -1 "false",2478 -1 "undefined"2479 -1 ]2480 -1 },2481 -1 "flowto": {2482 -1 "type": "property",2483 -1 "valueType": "idref_list"2484 -1 },2485 -1 "grabbed": {2486 -1 "defaultValue": "undefined",2487 -1 "type": "state",2488 -1 "valueType": "token",2489 -1 "values": [2490 -1 "true",2491 -1 "false",2492 -1 "undefined"2493 -1 ]2494 -1 },2495 -1 "haspopup": {2496 -1 "defaultValue": "false",2497 -1 "type": "property",2498 -1 "valueType": "boolean"2499 -1 },2500 -1 "hidden": {2501 -1 "defaultValue": "false",2502 -1 "type": "state",2503 -1 "valueType": "boolean"2504 -1 },2505 -1 "invalid": {2506 -1 "defaultValue": "false",2507 -1 "type": "state",2508 -1 "valueType": "token",2509 -1 "values": [2510 -1 "grammar",2511 -1 "false",2512 -1 "spelling",2513 -1 "true"2514 -1 ]2515 -1 },2516 -1 "label": {2517 -1 "type": "property",2518 -1 "valueType": "string"2519 -1 },2520 -1 "labelledby": {2521 -1 "type": "property",2522 -1 "valueType": "idref_list"2523 -1 },2524 -1 "level": {2525 -1 "type": "property",2526 -1 "valueType": "integer"2527 -1 },2528 -1 "live": {2529 -1 "defaultValue": "off",2530 -1 "type": "property",2531 -1 "valueType": "token",2532 -1 "values": [2533 -1 "off",2534 -1 "polite",2535 -1 "assertive"2536 -1 ]2537 -1 },2538 -1 "multiline": {2539 -1 "defaultValue": "false",2540 -1 "type": "property",2541 -1 "valueType": "boolean"2542 -1 },2543 -1 "multiselectable": {2544 -1 "defaultValue": "false",2545 -1 "type": "property",2546 -1 "valueType": "boolean"2547 -1 },2548 -1 "orientation": {2549 -1 "defaultValue": "vertical",2550 -1 "type": "property",2551 -1 "valueType": "token",2552 -1 "values": [2553 -1 "horizontal",2554 -1 "vertical"2555 -1 ]2556 -1 },2557 -1 "owns": {2558 -1 "type": "property",2559 -1 "valueType": "idref_list"2560 -1 },2561 -1 "posinset": {2562 -1 "type": "property",2563 -1 "valueType": "integer"2564 -1 },2565 -1 "pressed": {2566 -1 "defaultValue": "undefined",2567 -1 "type": "state",2568 -1 "valueType": "token",2569 -1 "values": [2570 -1 "true",2571 -1 "false",2572 -1 "mixed",2573 -1 "undefined"2574 -1 ]2575 -1 },2576 -1 "readonly": {2577 -1 "defaultValue": "false",2578 -1 "type": "property",2579 -1 "valueType": "boolean"2580 -1 },2581 -1 "relevant": {2582 -1 "defaultValue": "additions text",2583 -1 "type": "property",2584 -1 "valueType": "token_list",2585 -1 "values": [2586 -1 "additions",2587 -1 "removals",2588 -1 "text",2589 -1 "all"2590 -1 ]2591 -1 },2592 -1 "required": {2593 -1 "defaultValue": "false",2594 -1 "type": "property",2595 -1 "valueType": "boolean"2596 -1 },2597 -1 "selected": {2598 -1 "defaultValue": "undefined",2599 -1 "type": "state",2600 -1 "valueType": "token",2601 -1 "values": [2602 -1 "true",2603 -1 "false",2604 -1 "undefined"2605 -1 ]2606 -1 },2607 -1 "setsize": {2608 -1 "type": "property",2609 -1 "valueType": "integer"2610 -1 },2611 -1 "sort": {2612 -1 "defaultValue": "none",2613 -1 "type": "property",2614 -1 "valueType": "token",2615 -1 "values": [2616 -1 "ascending",2617 -1 "descending",2618 -1 "none",2619 -1 "other"2620 -1 ]2621 -1 },2622 -1 "valuemax": {2623 -1 "type": "property",2624 -1 "valueType": "decimal"2625 -1 },2626 -1 "valuemin": {2627 -1 "type": "property",2628 -1 "valueType": "decimal"2629 -1 },2630 -1 "valuenow": {2631 -1 "type": "property",2632 -1 "valueType": "decimal"2633 -1 },2634 -1 "valuetext": {2635 -1 "type": "property",2636 -1 "valueType": "string"2637 -1 }2638 -1 };2639 -1 // END ARIA_PROPERTIES_AUTOGENERATED2640 -12641 -1 (function() {2642 -1 // pull values lists into sets2643 -1 for (var propertyName in axs.constants.ARIA_PROPERTIES) {2644 -1 var propertyDetails = axs.constants.ARIA_PROPERTIES[propertyName];2645 -1 if (!propertyDetails.values)2646 -1 continue;2647 -1 var valuesSet = {};2648 -1 for (var i = 0; i < propertyDetails.values.length; i++)2649 -1 valuesSet[propertyDetails.values[i]] = true;2650 -1 propertyDetails.valuesSet = valuesSet;2651 -1 }2652 -1 })();2653 -12654 -1 /**2655 -1 * All of the states and properties which apply globally.2656 -1 * @type {Object<!string, !boolean>}2657 -1 */2658 -1 axs.constants.GLOBAL_PROPERTIES = axs.constants.ARIA_ROLES['roletype'].propertiesSet;2659 -12660 -1 /**2661 -1 * A constant indicating no role name.2662 -1 * @type {string}2663 -1 */2664 -1 axs.constants.NO_ROLE_NAME = ' ';2665 -12666 -1 /**2667 -1 * A mapping from ARIA role names to their message ids.2668 -1 * Copied from ChromeVox:2669 -1 * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/aria_util.js2670 -1 * @type {Object.<string, string>}2671 -1 */2672 -1 axs.constants.WIDGET_ROLE_TO_NAME = {2673 -1 'alert' : 'aria_role_alert',2674 -1 'alertdialog' : 'aria_role_alertdialog',2675 -1 'button' : 'aria_role_button',2676 -1 'checkbox' : 'aria_role_checkbox',2677 -1 'columnheader' : 'aria_role_columnheader',2678 -1 'combobox' : 'aria_role_combobox',2679 -1 'dialog' : 'aria_role_dialog',2680 -1 'grid' : 'aria_role_grid',2681 -1 'gridcell' : 'aria_role_gridcell',2682 -1 'link' : 'aria_role_link',2683 -1 'listbox' : 'aria_role_listbox',2684 -1 'log' : 'aria_role_log',2685 -1 'marquee' : 'aria_role_marquee',2686 -1 'menu' : 'aria_role_menu',2687 -1 'menubar' : 'aria_role_menubar',2688 -1 'menuitem' : 'aria_role_menuitem',2689 -1 'menuitemcheckbox' : 'aria_role_menuitemcheckbox',2690 -1 'menuitemradio' : 'aria_role_menuitemradio',2691 -1 'option' : axs.constants.NO_ROLE_NAME,2692 -1 'progressbar' : 'aria_role_progressbar',2693 -1 'radio' : 'aria_role_radio',2694 -1 'radiogroup' : 'aria_role_radiogroup',2695 -1 'rowheader' : 'aria_role_rowheader',2696 -1 'scrollbar' : 'aria_role_scrollbar',2697 -1 'slider' : 'aria_role_slider',2698 -1 'spinbutton' : 'aria_role_spinbutton',2699 -1 'status' : 'aria_role_status',2700 -1 'tab' : 'aria_role_tab',2701 -1 'tabpanel' : 'aria_role_tabpanel',2702 -1 'textbox' : 'aria_role_textbox',2703 -1 'timer' : 'aria_role_timer',2704 -1 'toolbar' : 'aria_role_toolbar',2705 -1 'tooltip' : 'aria_role_tooltip',2706 -1 'treeitem' : 'aria_role_treeitem'2707 -1 };2708 -12709 -12710 -1 /**2711 -1 * @type {Object.<string, string>}2712 -1 * Copied from ChromeVox:2713 -1 * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/aria_util.js2714 -1 */2715 -1 axs.constants.STRUCTURE_ROLE_TO_NAME = {2716 -1 'article' : 'aria_role_article',2717 -1 'application' : 'aria_role_application',2718 -1 'banner' : 'aria_role_banner',2719 -1 'columnheader' : 'aria_role_columnheader',2720 -1 'complementary' : 'aria_role_complementary',2721 -1 'contentinfo' : 'aria_role_contentinfo',2722 -1 'definition' : 'aria_role_definition',2723 -1 'directory' : 'aria_role_directory',2724 -1 'document' : 'aria_role_document',2725 -1 'form' : 'aria_role_form',2726 -1 'group' : 'aria_role_group',2727 -1 'heading' : 'aria_role_heading',2728 -1 'img' : 'aria_role_img',2729 -1 'list' : 'aria_role_list',2730 -1 'listitem' : 'aria_role_listitem',2731 -1 'main' : 'aria_role_main',2732 -1 'math' : 'aria_role_math',2733 -1 'navigation' : 'aria_role_navigation',2734 -1 'note' : 'aria_role_note',2735 -1 'region' : 'aria_role_region',2736 -1 'rowheader' : 'aria_role_rowheader',2737 -1 'search' : 'aria_role_search',2738 -1 'separator' : 'aria_role_separator'2739 -1 };2740 -12741 -12742 -1 /**2743 -1 * @type {Array.<Object>}2744 -1 * Copied from ChromeVox:2745 -1 * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/aria_util.js2746 -1 */2747 -1 axs.constants.ATTRIBUTE_VALUE_TO_STATUS = [2748 -1 { name: 'aria-autocomplete', values:2749 -1 {'inline' : 'aria_autocomplete_inline',2750 -1 'list' : 'aria_autocomplete_list',2751 -1 'both' : 'aria_autocomplete_both'} },2752 -1 { name: 'aria-checked', values:2753 -1 {'true' : 'aria_checked_true',2754 -1 'false' : 'aria_checked_false',2755 -1 'mixed' : 'aria_checked_mixed'} },2756 -1 { name: 'aria-disabled', values:2757 -1 {'true' : 'aria_disabled_true'} },2758 -1 { name: 'aria-expanded', values:2759 -1 {'true' : 'aria_expanded_true',2760 -1 'false' : 'aria_expanded_false'} },2761 -1 { name: 'aria-invalid', values:2762 -1 {'true' : 'aria_invalid_true',2763 -1 'grammar' : 'aria_invalid_grammar',2764 -1 'spelling' : 'aria_invalid_spelling'} },2765 -1 { name: 'aria-multiline', values:2766 -1 {'true' : 'aria_multiline_true'} },2767 -1 { name: 'aria-multiselectable', values:2768 -1 {'true' : 'aria_multiselectable_true'} },2769 -1 { name: 'aria-pressed', values:2770 -1 {'true' : 'aria_pressed_true',2771 -1 'false' : 'aria_pressed_false',2772 -1 'mixed' : 'aria_pressed_mixed'} },2773 -1 { name: 'aria-readonly', values:2774 -1 {'true' : 'aria_readonly_true'} },2775 -1 { name: 'aria-required', values:2776 -1 {'true' : 'aria_required_true'} },2777 -1 { name: 'aria-selected', values:2778 -1 {'true' : 'aria_selected_true',2779 -1 'false' : 'aria_selected_false'} }2780 -1 ];2781 -12782 -1 /**2783 -1 * Copied from ChromeVox:2784 -1 * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/dom_util.js2785 -1 * @type {Object}2786 -1 */2787 -1 axs.constants.INPUT_TYPE_TO_INFORMATION_TABLE_MSG = {2788 -1 'button' : 'input_type_button',2789 -1 'checkbox' : 'input_type_checkbox',2790 -1 'color' : 'input_type_color',2791 -1 'datetime' : 'input_type_datetime',2792 -1 'datetime-local' : 'input_type_datetime_local',2793 -1 'date' : 'input_type_date',2794 -1 'email' : 'input_type_email',2795 -1 'file' : 'input_type_file',2796 -1 'image' : 'input_type_image',2797 -1 'month' : 'input_type_month',2798 -1 'number' : 'input_type_number',2799 -1 'password' : 'input_type_password',2800 -1 'radio' : 'input_type_radio',2801 -1 'range' : 'input_type_range',2802 -1 'reset' : 'input_type_reset',2803 -1 'search' : 'input_type_search',2804 -1 'submit' : 'input_type_submit',2805 -1 'tel' : 'input_type_tel',2806 -1 'text' : 'input_type_text',2807 -1 'url' : 'input_type_url',2808 -1 'week' : 'input_type_week'2809 -1 };2810 -12811 -12812 -1 /**2813 -1 * Copied from ChromeVox:2814 -1 * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/dom_util.js2815 -1 * @type {Object}2816 -1 */2817 -1 axs.constants.TAG_TO_INFORMATION_TABLE_VERBOSE_MSG = {2818 -1 'A' : 'tag_link',2819 -1 'BUTTON' : 'tag_button',2820 -1 'H1' : 'tag_h1',2821 -1 'H2' : 'tag_h2',2822 -1 'H3' : 'tag_h3',2823 -1 'H4' : 'tag_h4',2824 -1 'H5' : 'tag_h5',2825 -1 'H6' : 'tag_h6',2826 -1 'LI' : 'tag_li',2827 -1 'OL' : 'tag_ol',2828 -1 'SELECT' : 'tag_select',2829 -1 'TEXTAREA' : 'tag_textarea',2830 -1 'UL' : 'tag_ul',2831 -1 'SECTION' : 'tag_section',2832 -1 'NAV' : 'tag_nav',2833 -1 'ARTICLE' : 'tag_article',2834 -1 'ASIDE' : 'tag_aside',2835 -1 'HGROUP' : 'tag_hgroup',2836 -1 'HEADER' : 'tag_header',2837 -1 'FOOTER' : 'tag_footer',2838 -1 'TIME' : 'tag_time',2839 -1 'MARK' : 'tag_mark'2840 -1 };2841 -12842 -1 /**2843 -1 * Copied from ChromeVox:2844 -1 * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/dom_util.js2845 -1 * @type {Object}2846 -1 */2847 -1 axs.constants.TAG_TO_INFORMATION_TABLE_BRIEF_MSG = {2848 -1 'BUTTON' : 'tag_button',2849 -1 'SELECT' : 'tag_select',2850 -1 'TEXTAREA' : 'tag_textarea'2851 -1 };2852 -12853 -1 axs.constants.MIXED_VALUES = {2854 -1 "true": true,2855 -1 "false": true,2856 -1 "mixed": true2857 -1 };2858 -12859 -1 /** @enum {string} */2860 -1 axs.constants.Severity = {2861 -1 INFO: 'Info',2862 -1 WARNING: 'Warning',2863 -1 SEVERE: 'Severe'2864 -1 };2865 -12866 -1 /** @enum {string} */2867 -1 axs.constants.AuditResult = {2868 -1 PASS: 'PASS',2869 -1 FAIL: 'FAIL',2870 -1 NA: 'NA'2871 -1 };2872 -12873 -1 /** @enum {boolean} */2874 -1 axs.constants.InlineElements = {2875 -1 // fontstyle2876 -1 'TT': true,2877 -1 'I': true,2878 -1 'B': true,2879 -1 'BIG': true,2880 -1 'SMALL': true,2881 -12882 -1 // phrase2883 -1 'EM': true,2884 -1 'STRONG': true,2885 -1 'DFN': true,2886 -1 'CODE': true,2887 -1 'SAMP': true,2888 -1 'KBD': true,2889 -1 'VAR': true,2890 -1 'CITE': true,2891 -1 'ABBR': true,2892 -1 'ACRONYM': true,2893 -12894 -1 // special2895 -1 'A': true,2896 -1 'IMG': true,2897 -1 'OBJECT': true,2898 -1 'BR': true,2899 -1 'SCRIPT': true,2900 -1 'MAP': true,2901 -1 'Q': true,2902 -1 'SUB': true,2903 -1 'SUP': true,2904 -1 'SPAN': true,2905 -1 'BDO': true,2906 -12907 -1 // formctrl2908 -1 'INPUT': true,2909 -1 'SELECT': true,2910 -1 'TEXTAREA': true,2911 -1 'LABEL': true,2912 -1 'BUTTON': true2913 -1 };2914 -12915 -1 /** @enum {boolean} */2916 -1 axs.constants.NATIVELY_DISABLEABLE = {2917 -1 // W3C and WHATWG https://html.spec.whatwg.org/#enabling-and-disabling-form-controls:-the-disabled-attribute2918 -1 'BUTTON': true,2919 -1 'INPUT': true,2920 -1 'SELECT': true,2921 -1 'TEXTAREA': true,2922 -1 'FIELDSET': true,2923 -12924 -1 // W3C http://www.w3.org/TR/html5/disabled-elements.html#disabled-elements2925 -1 'OPTGROUP': true,2926 -1 'OPTION': true2927 -1 };2928 -12929 -1 /**2930 -1 * Maps ARIA attributes to their exactly equivalent HTML attributes.2931 -1 * @type {Object.<string, string>}2932 -1 */2933 -1 axs.constants.ARIA_TO_HTML_ATTRIBUTE = {2934 -1 'aria-checked' : 'checked',2935 -1 'aria-disabled' : 'disabled',2936 -1 'aria-hidden' : 'hidden',2937 -1 'aria-expanded' : 'open',2938 -1 'aria-valuemax' : 'max',2939 -1 'aria-valuemin' : 'min',2940 -1 'aria-readonly' : 'readonly',2941 -1 'aria-required' : 'required',2942 -1 'aria-selected' : 'selected',2943 -1 'aria-valuenow' : 'value'2944 -1 };2945 -12946 -1 /**2947 -1 * Holds information about implicit ARIA semantics for a given HTML element type.2948 -1 * This object has the following properties:2949 -1 * <ul>2950 -1 * <li>`role` will contain the implicit role if it exists, otherwise empty string.</li>2951 -1 * <li>`allowed` contains the roles that can reasonably be applied to this element.2952 -1 * Note: A tag that can take any role is signified by a '*' wildcard in the array. It is not2953 -1 * an error if the array contains other roles but currently this has no meaning. In future it may2954 -1 * be used to indicate recommended roles.2955 -1 * </li>2956 -1 * <li>`selector` is present if this is a 'subclass' of the base HTML element, i.e. its semantics are2957 -1 * modified by context or attributes. It can be used with the selectors API to find and/or match2958 -1 * elements.2959 -1 * </li>2960 -1 * <li>`reserved` will be true if this is a semantically strong element that you may not modify with any2961 -1 * ARIA attributes, including role or global attributes.2962 -1 * </li>2963 -1 * </ul>2964 -1 *2965 -1 * @typedef {{ role: string,2966 -1 * allowed: Array.<string>,2967 -1 * selector: string,2968 -1 * reserved: boolean }}2969 -1 */2970 -1 axs.constants.HtmlInfo;2971 -1 /**2972 -1 * A lookup table which maps uppercase tagName to information about implicit ARIA semantics.2973 -1 * This table is based on the document: http://w3c.github.io/aria-in-html/2974 -1 * It is not complete and never can be. Complex scenarios require specific handling not provided here.2975 -1 * Any element not listed here:2976 -1 * - has no implicit role2977 -1 * - can take any role2978 -1 * e.g. em,strong,small,s,cite,q,dfn,abbr,time,code,var,samp,kbd,sub and sup,i,b,u,mark ,ruby,rt,rp,bdi,bdo,br,wbr2979 -1 *2980 -1 * Where there is any ambiguity this table will endeavor to provide for the most broad case (to avoid2981 -1 * false failures in conformance checking).2982 -1 *2983 -1 * For example 'table' can take any role however in practice it should only be given the role 'grid' when2984 -1 * being used as a data grid or 'presentation' when used for layout. This lookup ignores these nuances and2985 -1 * allows all roles.2986 -1 *2987 -1 * @type {Object.<string, Array.<axs.constants.HtmlInfo>>}2988 -1 */2989 -1 axs.constants.TAG_TO_IMPLICIT_SEMANTIC_INFO = {2990 -1 'A': [{2991 -1 role: 'link',2992 -1 allowed: [2993 -1 'button',2994 -1 'checkbox',2995 -1 'menuitem',2996 -1 'menuitemcheckbox',2997 -1 'menuitemradio',2998 -1 'tab',2999 -1 'treeitem'],3000 -1 selector: 'a[href]'3001 -1 }],3002 -1 'ADDRESS': [{3003 -1 role: '',3004 -1 allowed: [3005 -1 'contentinfo',3006 -1 'presentation']3007 -1 }],3008 -1 'AREA': [{3009 -1 role: 'link',3010 -1 selector: 'area[href]'3011 -1 }],3012 -1 'ARTICLE': [{3013 -1 role: 'article',3014 -1 allowed: [3015 -1 'presentation',3016 -1 'article',3017 -1 'document',3018 -1 'application',3019 -1 'main']3020 -1 }],3021 -1 'ASIDE': [{3022 -1 role: 'complementary',3023 -1 allowed: [3024 -1 'note',3025 -1 'complementary',3026 -1 'search',3027 -1 'presentation']3028 -1 }],3029 -1 'AUDIO': [{3030 -1 role: '',3031 -1 allowed: ['application', 'presentation']3032 -1 }],3033 -1 'BASE': [{3034 -1 role: '',3035 -1 reserved: true3036 -1 }],3037 -1 'BODY': [{3038 -1 role: 'document',3039 -1 allowed: ['presentation']3040 -1 }],3041 -1 'BUTTON': [{3042 -1 role: 'button',3043 -1 allowed: [3044 -1 'link',3045 -1 'menuitem',3046 -1 'menuitemcheckbox',3047 -1 'menuitemradio',3048 -1 'radio'],3049 -1 selector: 'button:not([aria-pressed]):not([type="menu"])'3050 -1 }, {3051 -1 role: 'button',3052 -1 allowed: ['button'],3053 -1 selector: 'button[aria-pressed]'3054 -1 }, {3055 -1 role: 'button',3056 -1 attributes: {3057 -1 'aria-haspopup': true3058 -1 },3059 -1 allowed: [3060 -1 'link',3061 -1 'menuitem',3062 -1 'menuitemcheckbox',3063 -1 'menuitemradio',3064 -1 'radio'],3065 -1 selector: 'button[type="menu"]'3066 -1 }],3067 -1 'CAPTION': [{3068 -1 role: '',3069 -1 allowed: ['presentation']3070 -1 }],3071 -1 'COL': [{3072 -1 role: '',3073 -1 reserved: true3074 -1 }],3075 -1 'COLGROUP': [{3076 -1 role: '',3077 -1 reserved: true3078 -1 }],3079 -1 'DATALIST': [{3080 -1 role: 'listbox',3081 -1 attributes: {3082 -1 'aria-multiselectable': false3083 -1 },3084 -1 allowed: ['presentation']3085 -1 }],3086 -1 'DEL': [{3087 -1 role: '',3088 -1 allowed: ['*']3089 -1 }],3090 -1 'DD': [{3091 -1 role: '',3092 -1 allowed: ['presentation']3093 -1 }],3094 -1 'DT': [{3095 -1 role: '',3096 -1 allowed: ['presentation']3097 -1 }],3098 -1 'DETAILS': [{3099 -1 role: 'group',3100 -1 allowed: [3101 -1 'group',3102 -1 'presentation']3103 -1 }],3104 -1 'DIALOG': [{ // updated 'allowed' from: http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#the-dialog-element3105 -1 role: 'dialog',3106 -1 allowed: ['dialog', 'alert', 'alertdialog', 'application', 'log', 'marquee', 'status'],3107 -1 selector: 'dialog[open]'3108 -1 }, {3109 -1 role: 'dialog',3110 -1 attributes: {3111 -1 'aria-hidden': true3112 -1 },3113 -1 allowed: ['dialog', 'alert', 'alertdialog', 'application', 'log', 'marquee', 'status'],3114 -1 selector: 'dialog:not([open])'3115 -1 }],3116 -1 'DIV': [{3117 -1 role: '',3118 -1 allowed: ['*']3119 -1 }],3120 -1 'DL': [{3121 -1 role: 'list',3122 -1 allowed: ['presentation']3123 -1 }],3124 -1 'EMBED': [{3125 -1 role: '',3126 -1 allowed: [3127 -1 'application',3128 -1 'document',3129 -1 'img',3130 -1 'presentation']3131 -1 }],3132 -1 'FIGURE': [{3133 -1 role: '',3134 -1 allowed: ['*']3135 -1 }],3136 -1 'FOOTER': [{3137 -1 role: '',3138 -1 allowed: ['contentinfo', 'presentation']3139 -1 }],3140 -1 'FORM': [{3141 -1 role: 'form',3142 -1 allowed: ['presentation']3143 -1 }],3144 -1 'P': [{3145 -1 role: '',3146 -1 allowed: ['*']3147 -1 }],3148 -1 'PRE': [{3149 -1 role: '',3150 -1 allowed: ['*']3151 -1 }],3152 -1 'BLOCKQUOTE': [{3153 -1 role: '',3154 -1 allowed: ['*']3155 -1 }],3156 -1 H1: [{3157 -1 role: 'heading'3158 -1 }],3159 -1 H2: [{3160 -1 role: 'heading'3161 -1 }],3162 -1 H3: [{3163 -1 role: 'heading'3164 -1 }],3165 -1 H4: [{3166 -1 role: 'heading'3167 -1 }],3168 -1 H5: [{3169 -1 role: 'heading'3170 -1 }],3171 -1 H6: [{3172 -1 role: 'heading'3173 -1 }],3174 -1 'HEAD': [{3175 -1 role: '',3176 -1 reserved: true3177 -1 }],3178 -1 'HEADER': [{3179 -1 role: '',3180 -1 allowed: [3181 -1 'banner',3182 -1 'presentation']3183 -1 }],3184 -1 'HR': [{3185 -1 role: 'separator',3186 -1 allowed: ['presentation']3187 -1 }],3188 -1 'HTML': [{3189 -1 role: '',3190 -1 reserved: true3191 -1 }],3192 -1 'IFRAME': [{3193 -1 role: '',3194 -1 allowed: [3195 -1 'application',3196 -1 'document',3197 -1 'img',3198 -1 'presentation'],3199 -1 selector: 'iframe:not([seamless])'3200 -1 }, {3201 -1 role: '',3202 -1 allowed: [3203 -1 'application',3204 -1 'document',3205 -1 'img',3206 -1 'presentation',3207 -1 'group'],3208 -1 selector: 'iframe[seamless]'3209 -1 }],3210 -1 'IMG': [{3211 -1 role: 'presentation',3212 -1 reserved: true,3213 -1 selector: 'img[alt=""]'3214 -1 }, {3215 -1 role: 'img',3216 -1 allowed: ['*'],3217 -1 selector: 'img[alt]:not([alt=""])'3218 -1 }],3219 -1 'INPUT': [{3220 -1 role: 'button',3221 -1 allowed: [3222 -1 'link',3223 -1 'menuitem',3224 -1 'menuitemcheckbox',3225 -1 'menuitemradio',3226 -1 'radio'],3227 -1 selector: 'input[type="button"]:not([aria-pressed])'3228 -1 }, {3229 -1 role: 'button',3230 -1 allowed: ['button'],3231 -1 selector: 'input[type="button"][aria-pressed]'3232 -1 }, {3233 -1 role: 'checkbox',3234 -1 allowed: ['checkbox'],3235 -1 selector: 'input[type="checkbox"]'3236 -1 }, {3237 -1 role: '',3238 -1 selector: 'input[type="color"]'3239 -1 }, {3240 -1 role: '',3241 -1 selector: 'input[type="date"]'3242 -1 }, {3243 -1 role: '',3244 -1 selector: 'input[type="datetime"]'3245 -1 }, {3246 -1 role: 'textbox',3247 -1 selector: 'input[type="email"]:not([list])'3248 -1 }, {3249 -1 role: '',3250 -1 selector: 'input[type="file"]'3251 -1 }, {3252 -1 role: '',3253 -1 reserved: true,3254 -1 selector: 'input[type="hidden"]'3255 -1 }, {3256 -1 role: 'button',3257 -1 allowed: ['button'],3258 -1 selector: 'input[type="image"][aria-pressed]'3259 -1 }, {3260 -1 role: 'button',3261 -1 allowed: [3262 -1 'link',3263 -1 'menuitem',3264 -1 'menuitemcheckbox',3265 -1 'menuitemradio',3266 -1 'radio'],3267 -1 selector: 'input[type="image"]:not([aria-pressed])'3268 -1 }, {3269 -1 role: '',3270 -1 selector: 'input[type="month"]'3271 -1 }, {3272 -1 role: '',3273 -1 selector: 'input[type="number"]'3274 -1 }, {3275 -1 role: 'textbox',3276 -1 selector: 'input[type="password"]'3277 -1 }, {3278 -1 role: 'radio',3279 -1 allowed: ['menuitemradio'],3280 -1 selector: 'input[type="radio"]'3281 -1 }, {3282 -1 role: 'slider',3283 -1 selector: 'input[type="range"]'3284 -1 }, {3285 -1 role: 'button',3286 -1 selector: 'input[type="reset"]'3287 -1 }, {3288 -1 role: 'combobox', // aria-owns is set to the same value as the list attribute3289 -1 selector: 'input[type="search"][list]'3290 -1 }, {3291 -1 role: 'textbox',3292 -1 selector: 'input[type="search"]:not([list])'3293 -1 }, {3294 -1 role: 'button',3295 -1 selector: 'input[type="submit"]'3296 -1 }, {3297 -1 role: 'combobox', // aria-owns is set to the same value as the list attribute3298 -1 selector: 'input[type="tel"][list]'3299 -1 }, {3300 -1 role: 'textbox',3301 -1 selector: 'input[type="tel"]:not([list])'3302 -1 }, {3303 -1 role: 'combobox', // aria-owns is set to the same value as the list attribute3304 -1 selector: 'input[type="text"][list]'3305 -1 }, {3306 -1 role: 'textbox',3307 -1 selector: 'input[type="text"]:not([list])'3308 -1 }, {3309 -1 role: 'textbox',3310 -1 selector: 'input:not([type])'3311 -1 }, {3312 -1 role: '',3313 -1 selector: 'input[type="time"]'3314 -1 }, {3315 -1 role: 'combobox', // aria-owns is set to the same value as the list attribute3316 -1 selector: 'input[type="url"][list]'3317 -1 }, {3318 -1 role: 'textbox',3319 -1 selector: 'input[type="url"]:not([list])'3320 -1 }, {3321 -1 role: '',3322 -1 selector: 'input[type="week"]'3323 -1 }],3324 -1 'INS': [{3325 -1 role: '',3326 -1 allowed: ['*']3327 -1 }],3328 -1 'KEYGEN': [{3329 -1 role: ''3330 -1 }],3331 -1 'LABEL': [{3332 -1 role: '',3333 -1 allowed: ['presentation']3334 -1 }],3335 -1 'LI': [{3336 -1 role: 'listitem',3337 -1 allowed: [3338 -1 'menuitem',3339 -1 'menuitemcheckbox',3340 -1 'menuitemradio',3341 -1 'option',3342 -1 'tab',3343 -1 'treeitem',3344 -1 'presentation'],3345 -1 selector: 'ol:not([role="presentation"])>li, ul:not([role="presentation"])>li'3346 -1 }, {3347 -1 role: 'listitem',3348 -1 allowed: [3349 -1 'listitem',3350 -1 'menuitem',3351 -1 'menuitemcheckbox',3352 -1 'menuitemradio',3353 -1 'option',3354 -1 'tab',3355 -1 'treeitem',3356 -1 'presentation'],3357 -1 selector: 'ol[role="presentation"]>li, ul[role="presentation"]>li'3358 -1 }],3359 -1 'LINK': [{3360 -1 role: 'link',3361 -1 reserved: true,3362 -1 selector: 'link[href]'3363 -1 }],3364 -1 'MAIN': [{3365 -1 role: '',3366 -1 allowed: [3367 -1 'main',3368 -1 'presentation']3369 -1 }],3370 -1 'MAP': [{3371 -1 role: '',3372 -1 reserved: true3373 -1 }],3374 -1 'MATH': [{3375 -1 role: '',3376 -1 allowed: ['presentation']3377 -1 }],3378 -1 'MENU': [{3379 -1 role: 'toolbar',3380 -1 selector: 'menu[type="toolbar"]'3381 -1 }],3382 -1 'MENUITEM': [{3383 -1 role: 'menuitem',3384 -1 selector: 'menuitem[type="command"]'3385 -1 }, {3386 -1 role: 'menuitemcheckbox',3387 -1 selector: 'menuitem[type="checkbox"]'3388 -1 }, {3389 -1 role: 'menuitemradio',3390 -1 selector: 'menuitem[type="radio"]'3391 -1 }],3392 -1 'META': [{3393 -1 role: '',3394 -1 reserved: true3395 -1 }],3396 -1 'METER': [{3397 -1 role: 'progressbar',3398 -1 allowed: ['presentation']3399 -1 }],3400 -1 'NAV': [{3401 -1 role: 'navigation',3402 -1 allowed: ['navigation', 'presentation']3403 -1 }],3404 -1 'NOSCRIPT': [{3405 -1 role: '',3406 -1 reserved: true3407 -1 }],3408 -1 'OBJECT': [{3409 -1 role: '',3410 -1 allowed: ['application', 'document', 'img', 'presentation']3411 -1 }],3412 -1 'OL': [{3413 -1 role: 'list',3414 -1 allowed: ['directory', 'group', 'listbox', 'menu', 'menubar', 'tablist', 'toolbar', 'tree', 'presentation']3415 -1 }],3416 -1 'OPTGROUP': [{3417 -1 role: '',3418 -1 allowed: ['presentation']3419 -1 }],3420 -1 'OPTION': [{3421 -1 role: 'option'3422 -1 }],3423 -1 'OUTPUT': [{3424 -1 role: 'status',3425 -1 allowed: ['*']3426 -1 }],3427 -1 'PARAM': [{3428 -1 role: '',3429 -1 reserved: true3430 -1 }],3431 -1 'PICTURE': [{3432 -1 role: '',3433 -1 reserved: true3434 -1 }],3435 -1 'PROGRESS': [{3436 -1 role: 'progressbar',3437 -1 allowed: ['presentation']3438 -1 }],3439 -1 'SCRIPT': [{3440 -1 role: '',3441 -1 reserved: true3442 -1 }],3443 -1 'SECTION': [{3444 -1 role: 'region',3445 -1 allowed: [3446 -1 'alert',3447 -1 'alertdialog',3448 -1 'application',3449 -1 'contentinfo',3450 -1 'dialog',3451 -1 'document',3452 -1 'log',3453 -1 'marquee',3454 -1 'search',3455 -1 'status',3456 -1 'presentation']3457 -1 }],3458 -1 'SELECT': [{3459 -1 role: 'listbox'3460 -1 }],3461 -1 'SOURCE': [{3462 -1 role: '',3463 -1 reserved: true3464 -1 }],3465 -1 'SPAN': [{3466 -1 role: '',3467 -1 allowed: ['*']3468 -1 }],3469 -1 'STYLE': [{3470 -1 role: '',3471 -1 reserved: true3472 -1 }],3473 -1 'SVG': [{3474 -1 role: '',3475 -1 allowed: [3476 -1 'application',3477 -1 'document',3478 -1 'img',3479 -1 'presentation']3480 -1 }],3481 -1 'SUMMARY': [{3482 -1 role: '',3483 -1 allowed: ['presentation']3484 -1 }],3485 -1 'TABLE': [{3486 -1 role: '',3487 -1 allowed: ['*']3488 -1 }],3489 -1 'TEMPLATE': [{3490 -1 role: '',3491 -1 reserved: true3492 -1 }],3493 -1 'TEXTAREA': [{3494 -1 role: 'textbox'3495 -1 }],3496 -1 'TBODY': [{3497 -1 role: 'rowgroup',3498 -1 allowed: ['*']3499 -1 }],3500 -1 'THEAD': [{3501 -1 role: 'rowgroup',3502 -1 allowed: ['*']3503 -1 }],3504 -1 'TFOOT': [{3505 -1 role: 'rowgroup',3506 -1 allowed: ['*']3507 -1 }],3508 -1 'TITLE': [{3509 -1 role: '',3510 -1 reserved: true3511 -1 }],3512 -1 'TD': [{3513 -1 role: '',3514 -1 allowed: ['*']3515 -1 }],3516 -1 'TH': [{3517 -1 role: '',3518 -1 allowed: ['*']3519 -1 }],3520 -1 'TR': [{3521 -1 role: '',3522 -1 allowed: ['*']3523 -1 }],3524 -1 'TRACK': [{3525 -1 role: '',3526 -1 reserved: true3527 -1 }],3528 -1 'UL': [{3529 -1 role: 'list',3530 -1 allowed: [3531 -1 'directory',3532 -1 'group',3533 -1 'listbox',3534 -1 'menu',3535 -1 'menubar',3536 -1 'tablist',3537 -1 'toolbar',3538 -1 'tree',3539 -1 'presentation']3540 -1 }],3541 -1 'VIDEO': [{3542 -1 role: '',3543 -1 allowed: ['application', 'presentation']3544 -1 }]3545 -1 };3546 -13547 -1 },{}],5:[function(require,module,exports){3548 -1 // Copyright 2015 Google Inc.3549 -1 //3550 -1 // Licensed under the Apache License, Version 2.0 (the "License");3551 -1 // you may not use this file except in compliance with the License.3552 -1 // You may obtain a copy of the License at3553 -1 //3554 -1 // http://www.apache.org/licenses/LICENSE-2.03555 -1 //3556 -1 // Unless required by applicable law or agreed to in writing, software3557 -1 // distributed under the License is distributed on an "AS IS" BASIS,3558 -1 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.3559 -1 // See the License for the specific language governing permissions and3560 -1 // limitations under the License.3561 -13562 -1 goog.provide('axs.dom');3563 -13564 -1 /**3565 -1 * Returns the nearest ancestor which is an Element.3566 -1 * @param {Node} node3567 -1 * @return {?Element}3568 -1 */3569 -1 axs.dom.parentElement = function(node) {3570 -1 if (!node)3571 -1 return null;3572 -13573 -1 var parentNode = axs.dom.composedParentNode(node);3574 -1 if (!parentNode)3575 -1 return null;3576 -13577 -1 switch (parentNode.nodeType) {3578 -1 case Node.ELEMENT_NODE:3579 -1 return /** @type {Element} */ (parentNode);3580 -1 default:3581 -1 return axs.dom.parentElement(parentNode);3582 -1 }3583 -1 };3584 -13585 -1 /**3586 -1 * Returns the shadow host of a document fragment if it is a Shadow DOM fragment3587 -1 * otherwise returns `null`.3588 -1 * @param {DocumentFragment} fragment3589 -1 * @return {?Element}3590 -1 */3591 -1 axs.dom.shadowHost = function(fragment) {3592 -1 // If host exists, this is a Shadow DOM fragment.3593 -1 if ('host' in fragment)3594 -1 return fragment.host;3595 -1 else3596 -1 return null;3597 -1 };3598 -13599 -1 /**3600 -1 * Returns the given Node's parent in the composed tree.3601 -1 * @param {Node} node3602 -1 * @return {?Node}3603 -1 */3604 -1 axs.dom.composedParentNode = function(node) {3605 -1 if (!node)3606 -1 return null;3607 -1 if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE)3608 -1 return axs.dom.shadowHost(/** @type {DocumentFragment} */ (node));3609 -13610 -1 var parentNode = node.parentNode;3611 -1 if (!parentNode)3612 -1 return null;3613 -13614 -1 if (parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE)3615 -1 return axs.dom.shadowHost(/** @type {DocumentFragment} */ (parentNode));3616 -13617 -1 if (!parentNode.shadowRoot)3618 -1 return parentNode;3619 -13620 -1 // Shadow DOM v13621 -1 if (node.nodeType === Node.ELEMENT_NODE || node.nodeType === Node.TEXT_NODE) {3622 -1 var assignedSlot = node.assignedSlot;3623 -1 if (HTMLSlotElement && assignedSlot instanceof HTMLSlotElement)3624 -1 return axs.dom.composedParentNode(assignedSlot);3625 -1 }3626 -13627 -1 // Shadow DOM v03628 -1 if (typeof node.getDestinationInsertionPoints === 'function') {3629 -1 var insertionPoints = node.getDestinationInsertionPoints();3630 -1 if (insertionPoints.length > 0)3631 -1 return axs.dom.composedParentNode(insertionPoints[insertionPoints.length - 1]);3632 -1 }3633 -13634 -1 return null;3635 -1 };3636 -13637 -1 /**3638 -1 * Return the corresponding element for the given node.3639 -1 * @param {Node} node3640 -1 * @return {Element}3641 -1 * @suppress {checkTypes}3642 -1 */3643 -1 axs.dom.asElement = function(node) {3644 -1 /** @type {Element} */ var element;3645 -1 switch (node.nodeType) {3646 -1 case Node.COMMENT_NODE:3647 -1 return null; // Skip comments3648 -1 case Node.ELEMENT_NODE:3649 -1 element = /** (@type {Element}) */ node;3650 -1 if (element.localName == 'script' ||3651 -1 element.localName == 'template')3652 -1 return null; // Skip script-supporting elements3653 -1 return element;3654 -1 case Node.DOCUMENT_FRAGMENT_NODE:3655 -1 return node.host;3656 -1 case Node.TEXT_NODE:3657 -1 return axs.dom.parentElement(node);3658 -1 default:3659 -1 console.warn('Unhandled node type: ', node.nodeType);3660 -1 }3661 -1 return null;3662 -1 };3663 -13664 -1 /**3665 -1 * Recursively walk the composed tree from |node|, aborting if |end| is encountered.3666 -1 * @param {Node} node3667 -1 * @param {?Node} end3668 -1 * @param {{preorder: (function (Node, Object):boolean|undefined),3669 -1 * postorder: (function (Node, Object)|undefined)}} callbacks3670 -1 * Callbacks to be called for each element traversed, excluding3671 -1 * |end|. Possible callbacks are |preorder|, called before descending into3672 -1 * child nodes, and |postorder| called after all child nodes have been3673 -1 * traversed. If |preorder| returns false, its child nodes will not be3674 -1 * traversed.3675 -1 * @param {Object} parentFlags3676 -1 * @param {ShadowRoot=} opt_shadowRoot The nearest ShadowRoot ancestor, if any.3677 -1 * @return {boolean} Whether |end| was found, if provided.3678 -1 */3679 -1 axs.dom.composedTreeSearch = function(node, end, callbacks, parentFlags, opt_shadowRoot) {3680 -1 if (node === end)3681 -1 return true;3682 -13683 -1 if (node.nodeType == Node.ELEMENT_NODE)3684 -1 var element = /** @type {Element} */ (node);3685 -13686 -1 var found = false;3687 -1 var flags = Object.create(parentFlags);3688 -13689 -1 // Descend into node:3690 -1 // If it has a ShadowRoot, ignore all child elements - these will be picked3691 -1 // up by the <content> or <shadow> elements. Descend straight into the3692 -1 // ShadowRoot.3693 -1 if (element) {3694 -1 var localName = element.localName;3695 -1 if (flags.collectIdRefs) {3696 -1 flags.idrefs = axs.utils.getReferencedIds(element);3697 -1 }3698 -1 if (!flags.disabled || (localName === 'legend') && axs.browserUtils.matchSelector(element, 'fieldset>legend:first-of-type')) {3699 -1 flags.disabled = axs.utils.isElementDisabled(element, true);3700 -1 }3701 -1 if (!flags.hidden) {3702 -1 flags.hidden = axs.utils.isElementHidden(element);3703 -1 }3704 -1 if (callbacks.preorder) {3705 -1 if (!callbacks.preorder(element, flags))3706 -1 return found;3707 -1 }3708 -1 // NOTE: grunt qunit DOES NOT support Shadow DOM, so if changing this3709 -1 // code, be sure to run the tests in the browser before committing.3710 -1 var shadowRoot = element.shadowRoot || element.webkitShadowRoot;3711 -1 if (shadowRoot) {3712 -1 flags.level++;3713 -1 found = axs.dom.composedTreeSearch(shadowRoot,3714 -1 end,3715 -1 callbacks,3716 -1 flags,3717 -1 shadowRoot);3718 -1 if (element && callbacks.postorder && !found)3719 -1 callbacks.postorder(element, flags);3720 -1 return found;3721 -1 }3722 -13723 -1 // If it is a <content> element, descend into distributed elements - these3724 -1 // are elements from outside the shadow root which are rendered inside the3725 -1 // shadow DOM.3726 -1 if (localName == 'content' && typeof element.getDistributedNodes === 'function') {3727 -1 var content = /** @type {HTMLContentElement} */ (element);3728 -1 var distributedNodes = content.getDistributedNodes();3729 -1 for (var i = 0; i < distributedNodes.length && !found; i++) {3730 -1 found = axs.dom.composedTreeSearch(distributedNodes[i],3731 -1 end,3732 -1 callbacks,3733 -1 flags,3734 -1 opt_shadowRoot);3735 -1 }3736 -1 if (callbacks.postorder && !found)3737 -1 callbacks.postorder.call(null, element, flags);3738 -1 return found;3739 -1 }3740 -1 }3741 -13742 -13743 -13744 -1 // If it is neither the parent of a ShadowRoot, a <content> element, nor3745 -1 // a <shadow> element recurse normally.3746 -1 var child = node.firstChild;3747 -1 while (child != null && !found) {3748 -1 found = axs.dom.composedTreeSearch(child,3749 -1 end,3750 -1 callbacks,3751 -1 flags,3752 -1 opt_shadowRoot);3753 -1 child = child.nextSibling;3754 -1 }3755 -13756 -1 if (element && callbacks.postorder && !found)3757 -1 callbacks.postorder.call(null, element, flags);3758 -1 return found;3759 -1 };3760 -13761 -1 },{}],6:[function(require,module,exports){3762 -1 // Copyright 2012 Google Inc.3763 -1 //3764 -1 // Licensed under the Apache License, Version 2.0 (the "License");3765 -1 // you may not use this file except in compliance with the License.3766 -1 // You may obtain a copy of the License at3767 -1 //3768 -1 // http://www.apache.org/licenses/LICENSE-2.03769 -1 //3770 -1 // Unless required by applicable law or agreed to in writing, software3771 -1 // distributed under the License is distributed on an "AS IS" BASIS,3772 -1 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.3773 -1 // See the License for the specific language governing permissions and3774 -1 // limitations under the License.3775 -13776 -1 goog.require('axs.browserUtils');3777 -1 goog.require('axs.color');3778 -1 goog.require('axs.dom');3779 -1 goog.require('axs.utils');3780 -13781 -1 goog.provide('axs.properties');3782 -13783 -1 /**3784 -1 * @const3785 -1 * @type {string}3786 -1 */3787 -1 axs.properties.TEXT_CONTENT_XPATH = './/text()[normalize-space(.)!=""]/parent::*[name()!="script"]';3788 -13789 -1 /**3790 -1 * @param {Element} element3791 -1 * @return {Object.<string, Object>}3792 -1 */3793 -1 axs.properties.getFocusProperties = function(element) {3794 -1 var focusProperties = {};3795 -1 var tabindex = element.getAttribute('tabindex');3796 -1 if (tabindex != undefined) {3797 -1 focusProperties['tabindex'] = { value: tabindex, valid: true };3798 -1 } else {3799 -1 if (axs.utils.isElementImplicitlyFocusable(element))3800 -1 focusProperties['implicitlyFocusable'] = { value: true, valid: true };3801 -1 }3802 -1 if (Object.keys(focusProperties).length == 0)3803 -1 return null;3804 -1 var transparent = axs.utils.elementIsTransparent(element);3805 -1 var zeroArea = axs.utils.elementHasZeroArea(element);3806 -1 var outsideScrollArea = axs.utils.elementIsOutsideScrollArea(element);3807 -1 var overlappingElements = axs.utils.overlappingElements(element);3808 -1 if (transparent || zeroArea || outsideScrollArea || overlappingElements.length > 0) {3809 -1 var hidden = axs.utils.isElementOrAncestorHidden(element);3810 -1 var visibleProperties = { value: false,3811 -1 valid: hidden };3812 -1 if (transparent)3813 -1 visibleProperties['transparent'] = true;3814 -1 if (zeroArea)3815 -1 visibleProperties['zeroArea'] = true;3816 -1 if (outsideScrollArea)3817 -1 visibleProperties['outsideScrollArea'] = true;3818 -1 if (overlappingElements && overlappingElements.length > 0)3819 -1 visibleProperties['overlappingElements'] = overlappingElements;3820 -1 var hiddenProperties = { value: hidden, valid: hidden };3821 -1 if (hidden)3822 -1 hiddenProperties['reason'] = axs.properties.getHiddenReason(element);3823 -1 visibleProperties['hidden'] = hiddenProperties;3824 -1 focusProperties['visible'] = visibleProperties;3825 -1 } else {3826 -1 focusProperties['visible'] = { value: true, valid: true };3827 -1 }3828 -13829 -1 return focusProperties;3830 -1 };3831 -13832 -1 /**3833 -1 * @typedef {{ property: string,3834 -1 * on: Element }}3835 -1 *3836 -1 * property examples: 'display: none', 'visibility: hidden', 'aria-hidden'3837 -1 */3838 -1 axs.properties.hiddenReason;3839 -13840 -1 /**3841 -1 * Determine the reason an element is not visible.3842 -1 * Will give the CSS rule or attribute and the element/ancestor it is set on.3843 -1 * @param {Element} element3844 -1 * @return {?axs.properties.hiddenReason}3845 -1 */3846 -1 axs.properties.getHiddenReason = function(element) {3847 -1 if (!element || !(element instanceof element.ownerDocument.defaultView.HTMLElement))3848 -1 return null;3849 -13850 -1 if (element.hasAttribute('chromevoxignoreariahidden'))3851 -1 var chromevoxignoreariahidden = true;3852 -13853 -1 var style = window.getComputedStyle(element, null);3854 -1 if (style.display == 'none')3855 -1 return { 'property': 'display: none',3856 -1 'on': element };3857 -13858 -1 if (style.visibility == 'hidden')3859 -1 return { 'property': 'visibility: hidden',3860 -1 'on': element };3861 -13862 -1 if (element.hasAttribute('aria-hidden') &&3863 -1 element.getAttribute('aria-hidden').toLowerCase() == 'true') {3864 -1 if (!chromevoxignoreariahidden)3865 -1 return { 'property': 'aria-hidden',3866 -1 'on': element };3867 -1 }3868 -13869 -1 return axs.properties.getHiddenReason(axs.dom.parentElement(element));3870 -1 };3871 -13872 -13873 -1 /**3874 -1 * @param {Element} element3875 -1 * @return {Object.<string, Object>}3876 -1 */3877 -1 axs.properties.getColorProperties = function(element) {3878 -1 var colorProperties = {};3879 -1 var contrastRatioProperties =3880 -1 axs.properties.getContrastRatioProperties(element);3881 -1 if (contrastRatioProperties)3882 -1 colorProperties['contrastRatio'] = contrastRatioProperties;3883 -1 if (Object.keys(colorProperties).length == 0)3884 -1 return null;3885 -1 return colorProperties;3886 -1 };3887 -13888 -1 /**3889 -1 * Determines whether the given element has a text node as a direct descendant.3890 -1 * @param {Element} element3891 -1 * @return {boolean}3892 -1 */3893 -1 axs.properties.hasDirectTextDescendant = function(element) {3894 -1 var ownerDocument;3895 -1 if (element.nodeType == Node.DOCUMENT_NODE)3896 -1 ownerDocument = element;3897 -1 else3898 -1 ownerDocument = element.ownerDocument;3899 -1 if (ownerDocument.evaluate) {3900 -1 return hasDirectTextDescendantXpath();3901 -1 }3902 -1 return hasDirectTextDescendantTreeWalker();3903 -13904 -1 /**3905 -1 * Determines whether element has a text node as a direct descendant.3906 -1 * This method uses XPath on HTML DOM which is not universally supported.3907 -1 * @return {boolean}3908 -1 */3909 -1 function hasDirectTextDescendantXpath() {3910 -1 var selectorResults = ownerDocument.evaluate(axs.properties.TEXT_CONTENT_XPATH,3911 -1 element,3912 -1 null,3913 -1 XPathResult.ANY_TYPE,3914 -1 null);3915 -1 for (var resultElement = selectorResults.iterateNext();3916 -1 resultElement != null;3917 -1 resultElement = selectorResults.iterateNext()) {3918 -1 if (resultElement !== element)3919 -1 continue;3920 -1 return true;3921 -1 }3922 -1 return false;3923 -1 }3924 -13925 -1 /**3926 -1 * Determines whether element has a text node as a direct descendant.3927 -1 * This method uses TreeWalker as a fallback (at time of writing no version3928 -1 * of IE (including IE11) supports XPath in the HTML DOM).3929 -1 * @return {boolean}3930 -1 */3931 -1 function hasDirectTextDescendantTreeWalker() {3932 -1 var treeWalker = ownerDocument.createTreeWalker(element,3933 -1 NodeFilter.SHOW_TEXT,3934 -1 null,3935 -1 false);3936 -1 while (treeWalker.nextNode()) {3937 -1 var resultElement = treeWalker.currentNode;3938 -1 var parent = resultElement.parentNode;3939 -1 // Handle elements hosted in <template>.content.3940 -1 parent = parent.host || parent;3941 -1 var tagName = parent.tagName.toLowerCase();3942 -1 var value = resultElement.nodeValue.trim();3943 -1 if (value && tagName !== 'script' && element !== resultElement)3944 -1 return true;3945 -1 }3946 -1 return false;3947 -1 }3948 -1 };3949 -13950 -1 /**3951 -1 * @param {Element} element3952 -1 * @return {Object.<string, Object>}3953 -1 */3954 -1 axs.properties.getContrastRatioProperties = function(element) {3955 -1 if (!axs.properties.hasDirectTextDescendant(element))3956 -1 return null;3957 -13958 -1 var contrastRatioProperties = {};3959 -1 var style = window.getComputedStyle(element, null);3960 -1 var bgColor = axs.utils.getBgColor(style, element);3961 -1 if (!bgColor)3962 -1 return null;3963 -13964 -1 contrastRatioProperties['backgroundColor'] = axs.color.colorToString(bgColor);3965 -1 var fgColor = axs.utils.getFgColor(style, element, bgColor);3966 -1 contrastRatioProperties['foregroundColor'] = axs.color.colorToString(fgColor);3967 -1 var contrast = axs.utils.getContrastRatioForElementWithComputedStyle(style, element);3968 -1 if (!contrast)3969 -1 return null;3970 -1 contrastRatioProperties['value'] = contrast.toFixed(2);3971 -1 if (axs.utils.isLowContrast(contrast, style))3972 -1 contrastRatioProperties['alert'] = true;3973 -13974 -1 var levelAAContrast = axs.utils.isLargeFont(style) ? 3.0 : 4.5;3975 -1 var levelAAAContrast = axs.utils.isLargeFont(style) ? 4.5 : 7.0;3976 -1 var desiredContrastRatios = {};3977 -1 if (levelAAContrast > contrast)3978 -1 desiredContrastRatios['AA'] = levelAAContrast;3979 -1 if (levelAAAContrast > contrast)3980 -1 desiredContrastRatios['AAA'] = levelAAAContrast;3981 -13982 -1 if (!Object.keys(desiredContrastRatios).length)3983 -1 return contrastRatioProperties;3984 -13985 -1 var suggestedColors = axs.color.suggestColors(bgColor, fgColor, desiredContrastRatios);3986 -1 if (suggestedColors && Object.keys(suggestedColors).length)3987 -1 contrastRatioProperties['suggestedColors'] = suggestedColors;3988 -1 return contrastRatioProperties;3989 -1 };3990 -13991 -1 /**3992 -1 * @param {Node} node3993 -1 * @param {!Object} textAlternatives The properties object to fill in3994 -1 * @param {boolean=} opt_recursive Whether this is a recursive call or not3995 -1 * @param {boolean=} opt_force Whether to return text alternatives for this3996 -1 * element regardless of its hidden state.3997 -1 * @return {?string} The calculated text alternative for the given element3998 -1 */3999 -1 axs.properties.findTextAlternatives = function(node, textAlternatives, opt_recursive, opt_force) {4000 -1 var recursive = opt_recursive || false;4001 -14002 -1 /** @type {Element} */ var element = axs.dom.asElement(node);4003 -1 if (!element)4004 -1 return null;4005 -14006 -1 // 1. Skip hidden elements unless the author specifies to use them via an aria-labelledby or4007 -1 // aria-describedby being used in the current computation.4008 -1 if (!opt_force && axs.utils.isElementOrAncestorHidden(element))4009 -1 return null;4010 -14011 -1 // if this is a text node, just return text content.4012 -1 if (node.nodeType == Node.TEXT_NODE) {4013 -1 var textContentValue = {};4014 -1 textContentValue.type = 'text';4015 -1 textContentValue.text = node.textContent;4016 -1 textContentValue.lastWord = axs.properties.getLastWord(textContentValue.text);4017 -1 textAlternatives['content'] = textContentValue;4018 -14019 -1 return node.textContent;4020 -1 }4021 -14022 -1 var computedName = null;4023 -14024 -1 if (!recursive) {4025 -1 // 2A. The aria-labelledby attribute takes precedence as the element's text alternative4026 -1 // unless this computation is already occurring as the result of a recursive aria-labelledby4027 -1 // declaration.4028 -1 computedName = axs.properties.getTextFromAriaLabelledby(element, textAlternatives);4029 -1 }4030 -14031 -1 // 2A. If aria-labelledby is empty or undefined, the aria-label attribute, which defines an4032 -1 // explicit text string, is used.4033 -1 if (element.hasAttribute('aria-label')) {4034 -1 var ariaLabelValue = {};4035 -1 ariaLabelValue.type = 'text';4036 -1 ariaLabelValue.text = element.getAttribute('aria-label');4037 -1 ariaLabelValue.lastWord = axs.properties.getLastWord(ariaLabelValue.text);4038 -1 if (computedName)4039 -1 ariaLabelValue.unused = true;4040 -1 else if (!(recursive && axs.utils.elementIsHtmlControl(element)))4041 -1 computedName = ariaLabelValue.text;4042 -1 textAlternatives['ariaLabel'] = ariaLabelValue;4043 -1 }4044 -14045 -1 // 2A. If aria-labelledby and aria-label are both empty or undefined, and if the element is not4046 -1 // marked as presentational (role="presentation", check for the presence of an equivalent host4047 -1 // language attribute or element for associating a label, and use those mechanisms to determine4048 -1 // a text alternative.4049 -1 if (!element.hasAttribute('role') || element.getAttribute('role') != 'presentation') {4050 -1 computedName = axs.properties.getTextFromHostLanguageAttributes(element,4051 -1 textAlternatives,4052 -1 computedName,4053 -1 recursive);4054 -1 }4055 -14056 -1 // 2B (HTML version).4057 -1 if (recursive && axs.utils.elementIsHtmlControl(element)) {4058 -1 var defaultView = element.ownerDocument.defaultView;4059 -14060 -1 // include the value of the embedded control as part of the text alternative in the4061 -1 // following manner:4062 -1 if (element instanceof defaultView.HTMLInputElement) {4063 -1 // If the embedded control is a text field, use its value.4064 -1 var inputElement = /** @type {HTMLInputElement} */ (element);4065 -1 if (inputElement.type == 'text') {4066 -1 if (inputElement.value && inputElement.value.length > 0)4067 -1 textAlternatives['controlValue'] = { 'text': inputElement.value };4068 -1 }4069 -1 // If the embedded control is a range (e.g. a spinbutton or slider), use the value of the4070 -1 // aria-valuetext attribute if available, or otherwise the value of the aria-valuenow4071 -1 // attribute.4072 -1 if (inputElement.type == 'range')4073 -1 textAlternatives['controlValue'] = { 'text': inputElement.value };4074 -1 }4075 -1 // If the embedded control is a menu, use the text alternative of the chosen menu item.4076 -1 // If the embedded control is a select or combobox, use the chosen option.4077 -1 if (element instanceof defaultView.HTMLSelectElement) {4078 -1 var inputElement = /** @type {HTMLSelectElement} */ (element);4079 -1 textAlternatives['controlValue'] = { 'text': inputElement.value };4080 -1 }4081 -14082 -1 if (textAlternatives['controlValue']) {4083 -1 var controlValue = textAlternatives['controlValue'];4084 -1 if (computedName)4085 -1 controlValue.unused = true;4086 -1 else4087 -1 computedName = controlValue.text;4088 -1 }4089 -1 }4090 -14091 -1 // 2B (ARIA version).4092 -1 if (recursive && axs.utils.elementIsAriaWidget(element)) {4093 -1 var role = element.getAttribute('role');4094 -1 // If the embedded control is a text field, use its value.4095 -1 if (role == 'textbox') {4096 -1 if (element.textContent && element.textContent.length > 0)4097 -1 textAlternatives['controlValue'] = { 'text': element.textContent };4098 -1 }4099 -1 // If the embedded control is a range (e.g. a spinbutton or slider), use the value of the4100 -1 // aria-valuetext attribute if available, or otherwise the value of the aria-valuenow4101 -1 // attribute.4102 -1 if (role == 'slider' || role == 'spinbutton') {4103 -1 if (element.hasAttribute('aria-valuetext'))4104 -1 textAlternatives['controlValue'] = { 'text': element.getAttribute('aria-valuetext') };4105 -1 else if (element.hasAttribute('aria-valuenow'))4106 -1 textAlternatives['controlValue'] = { 'value': element.getAttribute('aria-valuenow'),4107 -1 'text': '' + element.getAttribute('aria-valuenow') };4108 -1 }4109 -1 // If the embedded control is a menu, use the text alternative of the chosen menu item.4110 -1 if (role == 'menu') {4111 -1 var menuitems = element.querySelectorAll('[role=menuitemcheckbox], [role=menuitemradio]');4112 -1 var selectedMenuitems = [];4113 -1 for (var i = 0; i < menuitems.length; i++) {4114 -1 if (menuitems[i].getAttribute('aria-checked') == 'true')4115 -1 selectedMenuitems.push(menuitems[i]);4116 -1 }4117 -1 if (selectedMenuitems.length > 0) {4118 -1 var selectedMenuText = '';4119 -1 for (var i = 0; i < selectedMenuitems.length; i++) {4120 -1 selectedMenuText += axs.properties.findTextAlternatives(selectedMenuitems[i], {}, true);4121 -1 if (i < selectedMenuitems.length - 1)4122 -1 selectedMenuText += ', ';4123 -1 }4124 -1 textAlternatives['controlValue'] = { 'text': selectedMenuText };4125 -1 }4126 -1 }4127 -1 // If the embedded control is a select or combobox, use the chosen option.4128 -1 if (role == 'combobox' || role == 'select') {4129 -1 // TODO4130 -1 textAlternatives['controlValue'] = { 'text': 'TODO' };4131 -1 }4132 -14133 -1 if (textAlternatives['controlValue']) {4134 -1 var controlValue = textAlternatives['controlValue'];4135 -1 if (computedName)4136 -1 controlValue.unused = true;4137 -1 else4138 -1 computedName = controlValue.text;4139 -1 }4140 -1 }4141 -14142 -1 // 2C. Otherwise, if the attributes checked in rules A and B didn't provide results, text is4143 -1 // collected from descendant content if the current element's role allows "Name From: contents."4144 -1 var hasRole = element.hasAttribute('role');4145 -1 var canGetNameFromContents = true;4146 -1 if (hasRole) {4147 -1 var roleName = element.getAttribute('role');4148 -1 // if element has a role, check that it allows "Name From: contents"4149 -1 var role = axs.constants.ARIA_ROLES[roleName];4150 -1 if (role && (!role.namefrom || role.namefrom.indexOf('contents') < 0))4151 -1 canGetNameFromContents = false;4152 -1 }4153 -1 var textFromContent = axs.properties.getTextFromDescendantContent(element, opt_force);4154 -1 if (textFromContent && canGetNameFromContents) {4155 -1 var textFromContentValue = {};4156 -1 textFromContentValue.type = 'text';4157 -1 textFromContentValue.text = textFromContent;4158 -1 textFromContentValue.lastWord = axs.properties.getLastWord(textFromContentValue.text);4159 -1 if (computedName)4160 -1 textFromContentValue.unused = true;4161 -1 else4162 -1 computedName = textFromContent;4163 -1 textAlternatives['content'] = textFromContentValue;4164 -1 }4165 -14166 -1 // 2D. The last resort is to use text from a tooltip attribute (such as the title attribute in4167 -1 // HTML). This is used only if nothing else, including subtree content, has provided results.4168 -1 if (element.hasAttribute('title')) {4169 -1 var titleValue = {};4170 -1 titleValue.type = 'string';4171 -1 titleValue.valid = true;4172 -1 titleValue.text = element.getAttribute('title');4173 -1 titleValue.lastWord = axs.properties.getLastWord(titleValue.lastWord);4174 -1 if (computedName)4175 -1 titleValue.unused = true;4176 -1 else4177 -1 computedName = titleValue.text;4178 -1 textAlternatives['title'] = titleValue;4179 -1 }4180 -14181 -1 if (Object.keys(textAlternatives).length == 0 && computedName == null)4182 -1 return null;4183 -14184 -1 return computedName;4185 -1 };4186 -14187 -1 /**4188 -1 * @param {Element} element4189 -1 * @param {boolean=} opt_force Whether to return text alternatives for this4190 -1 * element regardless of its hidden state.4191 -1 * @return {?string}4192 -1 */4193 -1 axs.properties.getTextFromDescendantContent = function(element, opt_force) {4194 -1 var children = element.childNodes;4195 -1 var childrenTextContent = [];4196 -1 for (var i = 0; i < children.length; i++) {4197 -1 var childTextContent = axs.properties.findTextAlternatives(children[i], {}, true, opt_force);4198 -1 if (childTextContent)4199 -1 childrenTextContent.push(childTextContent.trim());4200 -1 }4201 -1 if (childrenTextContent.length) {4202 -1 var result = '';4203 -1 // Empty children are allowed, but collapse all of them4204 -1 for (var i = 0; i < childrenTextContent.length; i++)4205 -1 result = [result, childrenTextContent[i]].join(' ').trim();4206 -1 return result;4207 -1 }4208 -1 return null;4209 -1 };4210 -14211 -1 /**4212 -1 * @param {Element} element4213 -1 * @param {Object} textAlternatives4214 -1 * @return {?string}4215 -1 */4216 -1 axs.properties.getTextFromAriaLabelledby = function(element, textAlternatives) {4217 -1 var computedName = null;4218 -1 if (!element.hasAttribute('aria-labelledby'))4219 -1 return computedName;4220 -14221 -1 var labelledbyAttr = element.getAttribute('aria-labelledby');4222 -1 var labelledbyIds = labelledbyAttr.split(/\s+/);4223 -1 var labelledbyValue = {};4224 -1 labelledbyValue.valid = true;4225 -1 var labelledbyText = [];4226 -1 var labelledbyValues = [];4227 -1 for (var i = 0; i < labelledbyIds.length; i++) {4228 -1 var labelledby = {};4229 -1 labelledby.type = 'element';4230 -1 var labelledbyId = labelledbyIds[i];4231 -1 labelledby.value = labelledbyId;4232 -1 var labelledbyElement = document.getElementById(labelledbyId);4233 -1 if (!labelledbyElement) {4234 -1 labelledby.valid = false;4235 -1 labelledbyValue.valid = false;4236 -1 labelledby.errorMessage = { 'messageKey': 'noElementWithId', 'args': [labelledbyId] };4237 -1 } else {4238 -1 labelledby.valid = true;4239 -1 labelledby.text = axs.properties.findTextAlternatives(labelledbyElement, {}, true, true);4240 -1 labelledby.lastWord = axs.properties.getLastWord(labelledby.text);4241 -1 labelledbyText.push(labelledby.text);4242 -1 labelledby.element = labelledbyElement;4243 -1 }4244 -1 labelledbyValues.push(labelledby);4245 -1 }4246 -1 if (labelledbyValues.length > 0) {4247 -1 labelledbyValues[labelledbyValues.length - 1].last = true;4248 -1 labelledbyValue.values = labelledbyValues;4249 -1 labelledbyValue.text = labelledbyText.join(' ');4250 -1 labelledbyValue.lastWord = axs.properties.getLastWord(labelledbyValue.text);4251 -1 computedName = labelledbyValue.text;4252 -1 textAlternatives['ariaLabelledby'] = labelledbyValue;4253 -1 }4254 -14255 -1 return computedName;4256 -1 };4257 -14258 -14259 -1 /**4260 -1 * Determine the text description/label for an element.4261 -1 * For example will attempt to find the alt text for an image or label text for a form control.4262 -1 * @param {!Element} element4263 -1 * @param {!Object} textAlternatives An object that will be updated with information.4264 -1 * @param {?string} existingComputedname4265 -1 * @param {boolean} recursive Whether this method is being called recursively as described in4266 -1 * http://www.w3.org/TR/wai-aria/roles#textalternativecomputation section 2A.4267 -1 * @return {Object}4268 -1 */4269 -1 axs.properties.getTextFromHostLanguageAttributes = function(element,4270 -1 textAlternatives,4271 -1 existingComputedname,4272 -1 recursive) {4273 -1 var computedName = existingComputedname;4274 -1 if (axs.browserUtils.matchSelector(element, 'img') && element.hasAttribute('alt')) {4275 -1 var altValue = {};4276 -1 altValue.type = 'string';4277 -1 altValue.valid = true;4278 -1 altValue.text = element.getAttribute('alt');4279 -1 if (computedName)4280 -1 altValue.unused = true;4281 -1 else4282 -1 computedName = altValue.text;4283 -1 textAlternatives['alt'] = altValue;4284 -1 }4285 -14286 -1 var controlsSelector = ['input:not([type="hidden"]):not([disabled])',4287 -1 'select:not([disabled])',4288 -1 'textarea:not([disabled])',4289 -1 'button:not([disabled])',4290 -1 'video:not([disabled])'].join(', ');4291 -1 if (axs.browserUtils.matchSelector(element, controlsSelector) && !recursive) {4292 -1 if (element.hasAttribute('id')) {4293 -1 var labelForQuerySelector = 'label[for="' + element.id + '"]';4294 -1 var labelsFor = document.querySelectorAll(labelForQuerySelector);4295 -1 var labelForValue = {};4296 -1 var labelForValues = [];4297 -1 var labelForText = [];4298 -1 for (var i = 0; i < labelsFor.length; i++) {4299 -1 var labelFor = {};4300 -1 labelFor.type = 'element';4301 -1 var label = labelsFor[i];4302 -1 var labelText = axs.properties.findTextAlternatives(label, {}, true);4303 -1 if (labelText && labelText.trim().length > 0) {4304 -1 labelFor.text = labelText.trim();4305 -1 labelForText.push(labelText.trim());4306 -1 }4307 -1 labelFor.element = label;4308 -1 labelForValues.push(labelFor);4309 -1 }4310 -1 if (labelForValues.length > 0) {4311 -1 labelForValues[labelForValues.length - 1].last = true;4312 -1 labelForValue.values = labelForValues;4313 -1 labelForValue.text = labelForText.join(' ');4314 -1 labelForValue.lastWord = axs.properties.getLastWord(labelForValue.text);4315 -1 if (computedName)4316 -1 labelForValue.unused = true;4317 -1 else4318 -1 computedName = labelForValue.text;4319 -1 textAlternatives['labelFor'] = labelForValue;4320 -1 }4321 -1 }4322 -14323 -1 var parent = axs.dom.parentElement(element);4324 -1 var labelWrappedValue = {};4325 -1 while (parent) {4326 -1 if (parent.tagName.toLowerCase() == 'label') {4327 -1 var parentLabel = /** @type {HTMLLabelElement} */ (parent);4328 -1 if (parentLabel.control == element) {4329 -1 labelWrappedValue.type = 'element';4330 -1 labelWrappedValue.text = axs.properties.findTextAlternatives(parentLabel, {}, true);4331 -1 labelWrappedValue.lastWord = axs.properties.getLastWord(labelWrappedValue.text);4332 -1 labelWrappedValue.element = parentLabel;4333 -1 break;4334 -1 }4335 -1 }4336 -1 parent = axs.dom.parentElement(parent);4337 -1 }4338 -1 if (labelWrappedValue.text) {4339 -1 if (computedName)4340 -1 labelWrappedValue.unused = true;4341 -1 else4342 -1 computedName = labelWrappedValue.text;4343 -1 textAlternatives['labelWrapped'] = labelWrappedValue;4344 -1 }4345 -1 // If all else fails input of type image can fall back to its alt text4346 -1 if (axs.browserUtils.matchSelector(element, 'input[type="image"]') && element.hasAttribute('alt')) {4347 -1 var altValue = {};4348 -1 altValue.type = 'string';4349 -1 altValue.valid = true;4350 -1 altValue.text = element.getAttribute('alt');4351 -1 if (computedName)4352 -1 altValue.unused = true;4353 -1 else4354 -1 computedName = altValue.text;4355 -1 textAlternatives['alt'] = altValue;4356 -1 }4357 -1 if (!Object.keys(textAlternatives).length)4358 -1 textAlternatives['noLabel'] = true;4359 -1 }4360 -1 return computedName;4361 -1 };4362 -14363 -1 /**4364 -1 * @param {?string} text4365 -1 * @return {?string}4366 -1 */4367 -1 axs.properties.getLastWord = function(text) {4368 -1 if (!text)4369 -1 return null;4370 -14371 -1 // TODO: this makes a lot of assumptions.4372 -1 var lastSpace = text.lastIndexOf(' ') + 1;4373 -1 var MAXLENGTH = 10;4374 -1 var cutoff = text.length - MAXLENGTH;4375 -1 var wordStart = lastSpace > cutoff ? lastSpace : cutoff;4376 -1 return text.substring(wordStart);4377 -1 };4378 -14379 -1 /**4380 -1 * @param {Node} node4381 -1 * @return {Object}4382 -1 */4383 -1 axs.properties.getTextProperties = function(node) {4384 -1 var textProperties = {};4385 -1 var computedName = axs.properties.findTextAlternatives(node, textProperties, false, true);4386 -14387 -1 if (Object.keys(textProperties).length == 0) {4388 -1 /** @type {Element} */ var element = axs.dom.asElement(node);4389 -1 if (element && axs.browserUtils.matchSelector(element, 'img')) {4390 -1 var altValue = {};4391 -1 altValue.valid = false;4392 -1 altValue.errorMessage = 'No alt value provided';4393 -1 textProperties['alt'] = altValue;4394 -14395 -1 var src = element.src;4396 -1 if (typeof src == 'string') {4397 -1 var parts = src.split('/');4398 -1 var filename = parts.pop();4399 -1 var filenameValue = { text: filename };4400 -1 textProperties['filename'] = filenameValue;4401 -1 computedName = filename;4402 -1 }4403 -1 }4404 -14405 -1 if (!computedName)4406 -1 return null;4407 -1 }4408 -14409 -1 textProperties.hasProperties = Boolean(Object.keys(textProperties).length);4410 -1 textProperties.computedText = computedName;4411 -1 textProperties.lastWord = axs.properties.getLastWord(computedName);4412 -1 return textProperties;4413 -1 };4414 -14415 -1 /**4416 -1 * Finds any ARIA attributes (roles, states and properties) explicitly set on this element.4417 -1 * @param {Element} element4418 -1 * @return {Object}4419 -1 */4420 -1 axs.properties.getAriaProperties = function(element) {4421 -1 var ariaProperties = {};4422 -1 var statesAndProperties = axs.properties.getGlobalAriaProperties(element);4423 -14424 -1 for (var property in axs.constants.ARIA_PROPERTIES) {4425 -1 var attributeName = 'aria-' + property;4426 -1 if (element.hasAttribute(attributeName)) {4427 -1 var propertyValue = element.getAttribute(attributeName);4428 -1 statesAndProperties[attributeName] =4429 -1 axs.utils.getAriaPropertyValue(attributeName, propertyValue, element);4430 -1 }4431 -1 }4432 -1 if (Object.keys(statesAndProperties).length > 0)4433 -1 ariaProperties['properties'] = axs.utils.values(statesAndProperties);4434 -14435 -1 var roles = axs.utils.getRoles(element);4436 -1 if (!roles) {4437 -1 if (Object.keys(ariaProperties).length)4438 -1 return ariaProperties;4439 -1 return null;4440 -1 }4441 -1 ariaProperties['roles'] = roles;4442 -1 if (!roles.valid || !roles['roles'])4443 -1 return ariaProperties;4444 -14445 -1 var roleDetails = roles['roles'];4446 -1 for (var i = 0; i < roleDetails.length; i++) {4447 -1 var role = roleDetails[i];4448 -1 if (!role.details || !role.details.propertiesSet)4449 -1 continue;4450 -1 for (var property in role.details.propertiesSet) {4451 -1 if (property in statesAndProperties)4452 -1 continue;4453 -1 if (element.hasAttribute(property)) {4454 -1 var propertyValue = element.getAttribute(property);4455 -1 statesAndProperties[property] =4456 -1 axs.utils.getAriaPropertyValue(property, propertyValue, element);4457 -1 if ('values' in statesAndProperties[property]) {4458 -1 var values = statesAndProperties[property].values;4459 -1 values[values.length - 1].isLast = true;4460 -1 }4461 -1 } else if (role.details.requiredPropertiesSet[property]) {4462 -1 statesAndProperties[property] =4463 -1 { 'name': property, 'valid': false, 'reason': 'Required property not set' };4464 -1 }4465 -1 }4466 -1 }4467 -1 if (Object.keys(statesAndProperties).length > 0)4468 -1 ariaProperties['properties'] = axs.utils.values(statesAndProperties);4469 -1 if (Object.keys(ariaProperties).length > 0)4470 -1 return ariaProperties;4471 -1 return null;4472 -1 };4473 -14474 -1 /**4475 -1 * Gets the ARIA properties found on this element which apply to all elements, not just elements with ARIA roles.4476 -1 * @param {Element} element4477 -1 * @return {!Object}4478 -1 */4479 -1 axs.properties.getGlobalAriaProperties = function(element) {4480 -1 var globalProperties = {};4481 -1 for (var property in axs.constants.GLOBAL_PROPERTIES) {4482 -1 if (element.hasAttribute(property)) {4483 -1 var propertyValue = element.getAttribute(property);4484 -1 globalProperties[property] =4485 -1 axs.utils.getAriaPropertyValue(property, propertyValue, element);4486 -1 }4487 -1 }4488 -1 return globalProperties;4489 -1 };4490 -14491 -1 /**4492 -1 * @param {Element} element4493 -1 * @return {Object.<string, Object>}4494 -1 */4495 -1 axs.properties.getVideoProperties = function(element) {4496 -1 var videoSelector = 'video';4497 -1 if (!axs.browserUtils.matchSelector(element, videoSelector))4498 -1 return null;4499 -1 var videoProperties = {};4500 -1 videoProperties['captionTracks'] = axs.properties.getTrackElements(element, 'captions');4501 -1 videoProperties['descriptionTracks'] = axs.properties.getTrackElements(element, 'descriptions');4502 -1 videoProperties['chapterTracks'] = axs.properties.getTrackElements(element, 'chapters');4503 -1 // error if no text alternatives?4504 -1 return videoProperties;4505 -1 };4506 -14507 -1 /**4508 -1 * @param {Element} element4509 -1 * @param {string} kind4510 -1 * @return {Object}4511 -1 */4512 -1 axs.properties.getTrackElements = function(element, kind) {4513 -1 // error if resource is not available4514 -1 var trackElements = element.querySelectorAll('track[kind=' + kind + ']');4515 -1 var result = {};4516 -1 if (!trackElements.length) {4517 -1 result.valid = false;4518 -1 result.reason = { 'messageKey': 'noTracksProvided', 'args': [[kind]] };4519 -1 return result;4520 -1 }4521 -1 result.valid = true;4522 -1 var values = [];4523 -1 for (var i = 0; i < trackElements.length; i++) {4524 -1 var trackElement = {};4525 -1 var src = trackElements[i].getAttribute('src');4526 -1 var srcLang = trackElements[i].getAttribute('srcLang');4527 -1 var label = trackElements[i].getAttribute('label');4528 -1 if (!src) {4529 -1 trackElement.valid = false;4530 -1 trackElement.reason = { 'messageKey': 'noSrcProvided' };4531 -1 } else {4532 -1 trackElement.valid = true;4533 -1 trackElement.src = src;4534 -1 }4535 -1 var name = '';4536 -1 if (label) {4537 -1 name += label;4538 -1 if (srcLang)4539 -1 name += ' ';4540 -1 }4541 -1 if (srcLang)4542 -1 name += '(' + srcLang + ')';4543 -1 if (name == '')4544 -1 name = '[' + { 'messageKey': 'unnamed' } + ']';4545 -1 trackElement.name = name;4546 -1 values.push(trackElement);4547 -1 }4548 -1 result.values = values;4549 -1 return result;4550 -1 };4551 -14552 -1 /**4553 -1 * @param {Node} node4554 -1 * @return {Object.<string, Object>}4555 -1 */4556 -1 axs.properties.getAllProperties = function(node) {4557 -1 /** @type {Element} */ var element = axs.dom.asElement(node);4558 -1 if (!element)4559 -1 return {};4560 -14561 -1 var allProperties = {};4562 -1 allProperties['ariaProperties'] = axs.properties.getAriaProperties(element);4563 -1 allProperties['colorProperties'] = axs.properties.getColorProperties(element);4564 -1 allProperties['focusProperties'] = axs.properties.getFocusProperties(element);4565 -1 allProperties['textProperties'] = axs.properties.getTextProperties(node);4566 -1 allProperties['videoProperties'] = axs.properties.getVideoProperties(element);4567 -1 return allProperties;4568 -1 };4569 -14570 -1 (function() {4571 -1 /**4572 -1 * Helper for implicit semantic functionality.4573 -1 * Can be made part of the public API if need be.4574 -1 * @param {Element} element4575 -1 * @return {?axs.constants.HtmlInfo}4576 -1 */4577 -1 function getHtmlInfo(element) {4578 -1 if (!element)4579 -1 return null;4580 -1 var tagName = element.tagName;4581 -1 if (!tagName)4582 -1 return null;4583 -1 tagName = tagName.toUpperCase();4584 -1 var infos = axs.constants.TAG_TO_IMPLICIT_SEMANTIC_INFO[tagName];4585 -1 if (!infos || !infos.length)4586 -1 return null;4587 -1 var defaultInfo = null; // will contain the info with no specific selector if no others match4588 -1 for (var i = 0, len = infos.length; i < len; i++) {4589 -1 var htmlInfo = infos[i];4590 -1 if (htmlInfo.selector) {4591 -1 if (axs.browserUtils.matchSelector(element, htmlInfo.selector))4592 -1 return htmlInfo;4593 -1 } else {4594 -1 defaultInfo = htmlInfo;4595 -1 }4596 -1 }4597 -1 return defaultInfo;4598 -1 }4599 -14600 -1 /**4601 -1 * @param {Element} element4602 -1 * @return {string} role4603 -1 */4604 -1 axs.properties.getImplicitRole = function(element) {4605 -1 var htmlInfo = getHtmlInfo(element);4606 -1 if (htmlInfo)4607 -1 return htmlInfo.role;4608 -1 return '';4609 -1 };4610 -14611 -1 /**4612 -1 * Determine if this element can take ANY ARIA attributes including roles, state and properties.4613 -1 * If false then even global attributes should not be used.4614 -1 * @param {Element} element4615 -1 * @return {boolean}4616 -1 */4617 -1 axs.properties.canTakeAriaAttributes = function(element) {4618 -1 var htmlInfo = getHtmlInfo(element);4619 -1 if (htmlInfo)4620 -1 return !htmlInfo.reserved;4621 -1 return true;4622 -1 };4623 -1 })();4624 -14625 -1 /**4626 -1 * This lists the ARIA attributes that are supported implicitly by native properties of this element.4627 -1 *4628 -1 * @param {Element} element The element to check.4629 -1 * @return {!Array.<string>} An array of ARIA attributes.4630 -1 *4631 -1 * example:4632 -1 * var element = document.createElement("input");4633 -1 * element.setAttribute("type", "range");4634 -1 * var supported = axs.properties.getNativelySupportedAttributes(element); // an array of ARIA attributes4635 -1 * console.log(supported.indexOf("aria-valuemax") >=0); // logs 'true'4636 -1 */4637 -1 axs.properties.getNativelySupportedAttributes = function(element) {4638 -1 var result = [];4639 -1 if (!element) {4640 -1 return result;4641 -1 }4642 -1 var testElement = element.cloneNode(false); // gets rid of expandos4643 -1 var ariaAttributes = Object.keys(/** @type {!Object} */(axs.constants.ARIA_TO_HTML_ATTRIBUTE));4644 -1 for (var i = 0; i < ariaAttributes.length; i++) {4645 -1 var ariaAttribute = ariaAttributes[i];4646 -1 var nativeAttribute = axs.constants.ARIA_TO_HTML_ATTRIBUTE[ariaAttribute];4647 -1 if (nativeAttribute in testElement) {4648 -1 result[result.length] = ariaAttribute;4649 -1 }4650 -1 }4651 -1 return result;4652 -1 };4653 -14654 -1 (function() {4655 -1 var roleToSelectorCache = {}; // performance optimization, cache results from getSelectorForRole4656 -14657 -1 /**4658 -1 * Build a selector that will match elements which implicity or explicitly have this role.4659 -1 * Note that the selector will probably not look elegant but it will work.4660 -1 * @param {string} role4661 -1 * @return {string} selector4662 -1 */4663 -1 axs.properties.getSelectorForRole = function(role) {4664 -1 if (!role)4665 -1 return '';4666 -1 if (roleToSelectorCache[role] && roleToSelectorCache.hasOwnProperty(role))4667 -1 return roleToSelectorCache[role];4668 -1 var selectors = ['[role="' + role + '"]'];4669 -1 var tagNames = Object.keys(/** @type {!Object} */(axs.constants.TAG_TO_IMPLICIT_SEMANTIC_INFO));4670 -1 tagNames.forEach(function(tagName) {4671 -1 var htmlInfos = axs.constants.TAG_TO_IMPLICIT_SEMANTIC_INFO[tagName];4672 -1 if (htmlInfos && htmlInfos.length) {4673 -1 for (var i = 0; i < htmlInfos.length; i++) {4674 -1 var htmlInfo = htmlInfos[i];4675 -1 if (htmlInfo.role === role) {4676 -1 if (htmlInfo.selector) {4677 -1 selectors[selectors.length] = htmlInfo.selector;4678 -1 } else {4679 -1 selectors[selectors.length] = tagName; // Selectors API is not case sensitive.4680 -1 break; // No need to continue adding selectors since we will match the tag itself.4681 -1 }4682 -1 }4683 -1 }4684 -1 }4685 -1 });4686 -1 return (roleToSelectorCache[role] = selectors.join(','));4687 -1 };4688 -1 })();4689 -14690 -1 },{}],7:[function(require,module,exports){4691 -1 var query = require('./lib/query.js');4692 -1 var name = require('./lib/name.js');4693 -1 var atree = require('./lib/atree.js');4694 -14695 -1 module.exports = {4696 -1 getRole: query.getRole,4697 -1 getAttribute: query.getAttribute,4698 -1 getName: name.getName,4699 -1 getDescription: name.getDescription,4700 -14701 -1 matches: query.matches,4702 -1 querySelector: query.querySelector,4703 -1 querySelectorAll: query.querySelectorAll,4704 -1 closest: query.closest,4705 -14706 -1 getParentNode: atree.getParentNode,4707 -1 getChildNodes: atree.getChildNodes,4708 -1 };4709 -14710 -1 },{"./lib/atree.js":8,"./lib/name.js":11,"./lib/query.js":12}],8:[function(require,module,exports){4711 -1 var attrs = require('./attrs');4712 -14713 -1 var _getOwner = function(node) {4714 -1 if (node.nodeType === node.ELEMENT_NODE && node.id) {4715 -1 var owner = document.querySelector('[aria-owns~="' + node.id + '"]');4716 -1 if (owner) {4717 -1 return owner;4718 -1 }4719 -1 }4720 -1 };4721 -14722 -1 var _getParentNode = function(node) {4723 -1 return _getOwner(node) || node.parentNode;4724 -1 };4725 -14726 -1 var detectLoop = function(node) {4727 -1 var tmp = _getParentNode(node);4728 -1 while (tmp) {4729 -1 if (tmp === node) {4730 -1 return true;4731 -1 }4732 -1 tmp = _getParentNode(tmp);4733 -1 }4734 -1 };4735 -14736 -1 var getOwner = function(node) {4737 -1 if (node.nodeType === node.ELEMENT_NODE && node.id) {4738 -1 var owner = document.querySelector('[aria-owns~="' + node.id + '"]');4739 -1 if (owner && !detectLoop(node)) {4740 -1 return owner;4741 -1 }4742 -1 }4743 -1 };4744 -14745 -1 var getParentNode = function(node) {4746 -1 return getOwner(node) || node.parentNode;4747 -1 };4748 -14749 -1 var isHidden = function(node) {4750 -1 return node.nodeType === node.ELEMENT_NODE && attrs.getAttribute(node, 'hidden');4751 -1 };4752 -14753 -1 var getChildNodes = function(node) {4754 -1 var childNodes = [];4755 -14756 -1 for (var i = 0; i < node.childNodes.length; i++) {4757 -1 var child = node.childNodes[i];4758 -1 if (!getOwner(child) && !isHidden(child)) {4759 -1 childNodes.push(child);4760 -1 }4761 -1 }4762 -14763 -1 if (node.nodeType === node.ELEMENT_NODE) {4764 -1 var owns = attrs.getAttribute(node, 'owns') || [];4765 -1 for (var i = 0; i < owns.length; i++) {4766 -1 var child = document.getElementById(owns[i]);4767 -1 // double check with getOwner for consistency4768 -1 if (child && getOwner(child) === node && !isHidden(child)) {4769 -1 childNodes.push(child);4770 -1 }4771 -1 }4772 -1 }4773 -14774 -1 return childNodes;4775 -1 };4776 -14777 -1 var walk = function(root, fn) {4778 -1 fn(root);4779 -1 getChildNodes(root).forEach(function(child) {4780 -1 walk(child, fn);4781 -1 });4782 -1 };4783 -14784 -1 var searchUp = function(node, test) {4785 -1 var candidate = getParentNode(node);4786 -1 if (candidate) {4787 -1 if (test(candidate)) {4788 -1 return candidate;4789 -1 } else {4790 -1 return searchUp(candidate, test);4791 -1 }4792 -1 }4793 -1 };4794 -14795 -1 module.exports = {4796 -1 'getParentNode': getParentNode,4797 -1 'getChildNodes': getChildNodes,4798 -1 'walk': walk,4799 -1 'searchUp': searchUp,4800 -1 };4801 -14802 -1 },{"./attrs":9}],9:[function(require,module,exports){4803 -1 var constants = require('./constants.js');4804 -14805 -1 // candidates can be passed for performance optimization4806 -1 var getRole = function(el, candidates) {4807 -1 if (el.hasAttribute('role')) {4808 -1 return el.getAttribute('role');4809 -1 }4810 -1 for (var role in constants.roles) {4811 -1 var selector = (constants.roles[role].selectors || []).join(',');4812 -1 if (selector && (!candidates || candidates.includes(role)) && el.matches(selector)) {4813 -1 return role;4814 -1 }4815 -1 }4816 -14817 -1 if (!candidates ||4818 -1 candidates.includes('banner') ||4819 -1 candidates.includes('contentinfo')) {4820 -1 if (!el.matches(constants.scoped)) {4821 -1 if (el.matches('header')) {4822 -1 return 'banner';4823 -1 }4824 -1 if (el.matches('footer')) {4825 -1 return 'contentinfo';4826 -1 }4827 -1 }4828 -1 }4829 -1 };4830 -14831 -1 var hasRole = function(el, roles) {4832 -1 var candidates = [].concat.apply([], roles.map(function(role) {4833 -1 return (constants.roles[role] || {}).subRoles || [role];4834 -1 }));4835 -1 var actual = getRole(el, candidates);4836 -1 return candidates.includes(actual);4837 -1 };4838 -14839 -1 var getAttribute = function(el, key) {4840 -1 if (constants.attributeStrongMapping.hasOwnProperty(key)) {4841 -1 var value = el[constants.attributeStrongMapping[key]];4842 -1 if (value) {4843 -1 return value;4844 -1 }4845 -1 }4846 -1 if (key === 'readonly' && el.contentEditable) {4847 -1 return false;4848 -1 } else if (key === 'invalid' && el.checkValidity) {4849 -1 return !el.checkValidity();4850 -1 } else if (key === 'hidden') {4851 -1 var style = window.getComputedStyle(el);4852 -1 if (style.display === 'none' || style.visibility === 'hidden') {4853 -1 return true;4854 -1 }4855 -1 }4856 -14857 -1 var type = constants.attributes[key];4858 -1 var raw = el.getAttribute('aria-' + key);4859 -14860 -1 if (raw) {4861 -1 if (type === 'bool') {4862 -1 return raw === 'true';4863 -1 } else if (type === 'tristate') {4864 -1 return raw === 'true' ? true : raw === 'false' ? false : 'mixed';4865 -1 } else if (type === 'bool-undefined') {4866 -1 return raw === 'true' ? true : raw === 'false' ? false : undefined;4867 -1 } else if (type === 'id-list') {4868 -1 return raw.split(/\s+/);4869 -1 } else if (type === 'integer') {4870 -1 return parseInt(raw, 10);4871 -1 } else if (type === 'number') {4872 -1 return parseFloat(raw);4873 -1 } else if (type === 'token-list') {4874 -1 return raw.split(/\s+/);4875 -1 } else {4876 -1 return raw;4877 -1 }4878 -1 }4879 -14880 -1 // TODO4881 -1 // autocomplete4882 -1 // contextmenu -> aria-haspopup4883 -1 // indeterminate -> aria-checked="mixed"4884 -1 // list -> aria-controls4885 -14886 -1 if (key === 'level') {4887 -1 for (var i = 1; i <= 6; i++) {4888 -1 if (el.tagName.toLowerCase() === 'h' + i) {4889 -1 return i;4890 -1 }4891 -1 }4892 -1 } else if (constants.attributeWeakMapping.hasOwnProperty(key)) {4893 -1 return el[constants.attributeWeakMapping[key]];4894 -1 }4895 -14896 -1 if (key in constants.attrsWithDefaults) {4897 -1 var role = getRole(el);4898 -1 var defaults = (constants.roles[role] || {}).defaults;4899 -1 if (defaults && defaults.hasOwnProperty(key)) {4900 -1 return defaults[key];4901 -1 }4902 -1 }4903 -14904 -1 if (type === 'bool' || type === 'tristate') {4905 -1 return false;4906 -1 }4907 -1 };4908 -14909 -1 module.exports = {4910 -1 getRole: getRole,4911 -1 hasRole: hasRole,4912 -1 getAttribute: getAttribute,4913 -1 };4914 -14915 -1 },{"./constants.js":10}],10:[function(require,module,exports){4916 -1 exports.attributes = {4917 -1 // widget4918 -1 'autocomplete': 'token',4919 -1 'checked': 'tristate',4920 -1 'current': 'token',4921 -1 'disabled': 'bool',4922 -1 'expanded': 'bool-undefined',4923 -1 'haspopup': 'token',4924 -1 'hidden': 'bool', // !4925 -1 'invalid': 'token',4926 -1 'keyshortcuts': 'string',4927 -1 'label': 'string',4928 -1 'level': 'int',4929 -1 'modal': 'bool',4930 -1 'multiline': 'bool',4931 -1 'multiselectable': 'bool',4932 -1 'orientation': 'token',4933 -1 'placeholder': 'string',4934 -1 'pressed': 'tristate',4935 -1 'readonly': 'bool',4936 -1 'required': 'bool',4937 -1 'roledescription': 'string',4938 -1 'selected': 'bool-undefined',4939 -1 'valuemax': 'number',4940 -1 'valuemin': 'number',4941 -1 'valuenow': 'number',4942 -1 'valuetext': 'string',4943 -14944 -1 // live4945 -1 'atomic': 'bool',4946 -1 'busy': 'bool',4947 -1 'live': 'token',4948 -1 'relevant': 'token-list',4949 -14950 -1 // dragndrop4951 -1 'dropeffect': 'token-list',4952 -1 'grabbed': 'bool-undefined',4953 -14954 -1 // relationship4955 -1 'activedescendant': 'id',4956 -1 'colcount': 'int',4957 -1 'colindex': 'int',4958 -1 'colspan': 'int',4959 -1 'controls': 'id-list',4960 -1 'describedby': 'id-list',4961 -1 'details': 'id',4962 -1 'errormessage': 'id',4963 -1 'flowto': 'id-list',4964 -1 'labelledby': 'id-list',4965 -1 'owns': 'id-list',4966 -1 'posinset': 'int',4967 -1 'rowcount': 'int',4968 -1 'rowindex': 'int',4969 -1 'rowspan': 'int',4970 -1 'setsize': 'int',4971 -1 'sort': 'token',4972 -1 };4973 -14974 -1 exports.attributeStrongMapping = {4975 -1 'disabled': 'disabled',4976 -1 'placeholder': 'placeholder',4977 -1 'readonly': 'readOnly',4978 -1 'required': 'required',4979 -1 };4980 -14981 -1 exports.attributeWeakMapping = {4982 -1 'checked': 'checked',4983 -1 'colspan': 'colSpan',4984 -1 'expanded': 'open',4985 -1 'multiselectable': 'multiple',4986 -1 'rowspan': 'rowSpan',4987 -1 'selected': 'selected',4988 -1 };4989 -14990 -1 // https://www.w3.org/TR/html-aam-1.0/#html-element-role-mappings4991 -1 // https://www.w3.org/TR/wai-aria/roles4992 -1 exports.roles = {4993 -1 alert: {4994 -1 childRoles: ['alertdialog'],4995 -1 defaults: {4996 -1 'live': 'assertive',4997 -1 'atomic': true,4998 -1 },4999 -1 },5000 -1 article: {5001 -1 selectors: ['article'],5002 -1 },5003 -1 button: {5004 -1 selectors: [5005 -1 'button',5006 -1 'input[type="button"]',5007 -1 'input[type="image"]',5008 -1 'input[type="reset"]',5009 -1 'input[type="submit"]',5010 -1 'summary',5011 -1 ],5012 -1 nameFromContents: true,5013 -1 },5014 -1 cell: {5015 -1 selectors: ['td'],5016 -1 childRoles: ['gridcell', 'rowheader'],5017 -1 },5018 -1 checkbox: {5019 -1 selectors: ['input[type="checkbox"]'],5020 -1 childRoles: ['menuitemcheckbox', 'switch'],5021 -1 nameFromContents: true,5022 -1 defaults: {5023 -1 'checked': 'false',5024 -1 },5025 -1 },5026 -1 columnheader: {5027 -1 selectors: ['th[scope="col"]'],5028 -1 nameFromContents: true,5029 -1 },5030 -1 combobox: {5031 -1 selectors: [5032 -1 'input:not([type])[list]',5033 -1 'input[type="email"][list]',5034 -1 'input[type="search"][list]',5035 -1 'input[type="tel"][list]',5036 -1 'input[type="text"][list]',5037 -1 'input[type="url"][list]',5038 -1 'select:not([size]):not([multiple])',5039 -1 'select[size="0"]:not([multiple])',5040 -1 'select[size="1"]:not([multiple])',5041 -1 ],5042 -1 defaults: {5043 -1 'expanded': false,5044 -1 'haspopup': 'listbox',5045 -1 },5046 -1 },5047 -1 command: {5048 -1 childRoles: ['button', 'link', 'menuitem'],5049 -1 },5050 -1 complementary: {5051 -1 selectors: ['aside'],5052 -1 },5053 -1 composite: {5054 -1 childRoles: ['grid', 'select', 'spinbutton', 'tablist'],5055 -1 },5056 -1 definition: {5057 -1 selectors: ['dd'],5058 -1 },5059 -1 dialog: {5060 -1 selectors: ['dialog'],5061 -1 childRoles: ['alertdialog'],5062 -1 },5063 -1 'doc-backlink': {5064 -1 nameFromContents: true,5065 -1 },5066 -1 'doc-biblioref': {5067 -1 nameFromContents: true,5068 -1 },5069 -1 'doc-glossref': {5070 -1 nameFromContents: true,5071 -1 },5072 -1 'doc-noteref': {5073 -1 nameFromContents: true,5074 -1 },5075 -1 document: {5076 -1 selectors: ['body'],5077 -1 childRoles: ['article', 'graphics-document'],5078 -1 },5079 -1 figure: {5080 -1 selectors: ['figure'],5081 -1 },5082 -1 form: {5083 -1 selectors: ['form[aria-label]', 'form[aria-labelledby]', 'form[title]'],5084 -1 },5085 -1 grid: {5086 -1 childRoles: ['treegrid'],5087 -1 },5088 -1 gridcell: {5089 -1 childRoles: ['columnheader', 'rowheader'],5090 -1 nameFromContents: true,5091 -1 },5092 -1 group: {5093 -1 selectors: ['details', 'optgroup'],5094 -1 childRoles: ['row', 'select', 'toolbar', 'graphics-object'],5095 -1 },5096 -1 heading: {5097 -1 selectors: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],5098 -1 nameFromContents: true,5099 -1 defaults: {5100 -1 'level': 2,5101 -1 },5102 -1 },5103 -1 img: {5104 -1 selectors: ['img:not([alt=""])', 'graphics-symbol'],5105 -1 childRoles: ['doc-cover'],5106 -1 },5107 -1 input: {5108 -1 childRoles: ['checkbox', 'option', 'radio', 'slider', 'spinbutton', 'textbox'],5109 -1 },5110 -1 landmark: {5111 -1 childRoles: [5112 -1 'banner',5113 -1 'complementary',5114 -1 'contentinfo',5115 -1 'doc-acknowledgments',5116 -1 'doc-afterword',5117 -1 'doc-appendix',5118 -1 'doc-bibliography',5119 -1 'doc-chapter',5120 -1 'doc-conclusion',5121 -1 'doc-credits',5122 -1 'doc-endnotes',5123 -1 'doc-epilogue',5124 -1 'doc-errata',5125 -1 'doc-foreword',5126 -1 'doc-glossary',5127 -1 'doc-introduction',5128 -1 'doc-part',5129 -1 'doc-preface',5130 -1 'doc-prologue',5131 -1 'form',5132 -1 'main',5133 -1 'navigation',5134 -1 'region',5135 -1 'search',5136 -1 ],5137 -1 },5138 -1 link: {5139 -1 selectors: ['a[href]', 'area[href]', 'link[href]'],5140 -1 childRoles: ['doc-backlink', 'doc-biblioref', 'doc-glossref', 'doc-noteref'],5141 -1 nameFromContents: true,5142 -1 },5143 -1 list: {5144 -1 selectors: ['dl', 'ol', 'ul'],5145 -1 childRoles: ['directory', 'feed'],5146 -1 },5147 -1 listbox: {5148 -1 selectors: [5149 -1 'select[multiple]',5150 -1 'select[size]:not([size="0"]):not([size="1"])',5151 -1 ],5152 -1 defaults: {5153 -1 'orientation': 'vertical',5154 -1 },5155 -1 },5156 -1 listitem: {5157 -1 selectors: ['dt', 'ul > li', 'ol > li'],5158 -1 childRoles: ['doc-biblioentry', 'doc-endnote', 'treeitem'],5159 -1 },5160 -1 log: {5161 -1 defaults: {5162 -1 'live': 'polite',5163 -1 },5164 -1 },5165 -1 main: {5166 -1 selectors: ['main'],5167 -1 },5168 -1 math: {5169 -1 selectors: ['math'],5170 -1 },5171 -1 menu: {5172 -1 selectors: ['menu[type="context"]'],5173 -1 childRoles: ['menubar'],5174 -1 defaults: {5175 -1 'orientation': 'vertical',5176 -1 },5177 -1 },5178 -1 menubar: {5179 -1 defaults: {5180 -1 'orientation': 'horizontal',5181 -1 },5182 -1 },5183 -1 menuitem: {5184 -1 selectors: ['menuitem[type="command"]'],5185 -1 childRoles: ['menuitemcheckbox'],5186 -1 nameFromContents: true,5187 -1 },5188 -1 menuitemcheckbox: {5189 -1 selectors: ['menuitem[type="checkbox"]'],5190 -1 childRoles: ['menuitemradio'],5191 -1 nameFromContents: true,5192 -1 defaults: {5193 -1 'checked': 'false',5194 -1 },5195 -1 },5196 -1 menuitemradio: {5197 -1 selectors: ['menuitem[type="radio"]'],5198 -1 nameFromContents: true,5199 -1 defaults: {5200 -1 'checked': 'false',5201 -1 },5202 -1 },5203 -1 navigation: {5204 -1 selectors: ['nav'],5205 -1 childRoles: ['doc-index', 'doc-pagelist', 'doc-toc'],5206 -1 },5207 -1 note: {5208 -1 childRoles: ['doc-notice', 'doc-tip'],5209 -1 },5210 -1 option: {5211 -1 selectors: ['option'],5212 -1 childRoles: ['treeitem'],5213 -1 nameFromContents: true,5214 -1 defaults: {5215 -1 'selected': 'false',5216 -1 },5217 -1 },5218 -1 progressbar: {5219 -1 selectors: ['progress'],5220 -1 },5221 -1 radio: {5222 -1 selectors: ['input[type="radio"]'],5223 -1 childRoles: ['menuitemradio'],5224 -1 nameFromContents: true,5225 -1 defaults: {5226 -1 'checked': 'false',5227 -1 },5228 -1 },5229 -1 range: {5230 -1 childRoles: ['progressbar', 'scrollbar', 'slider', 'spinbutton'],5231 -1 },5232 -1 region: {5233 -1 selectors: ['section[aria-label]', 'section[aria-labelledby]', 'section[title]'],5234 -1 },5235 -1 roletype: {5236 -1 childRoles: ['structure', 'widget', 'window'],5237 -1 },5238 -1 row: {5239 -1 selectors: ['tr'],5240 -1 nameFromContents: true,5241 -1 },5242 -1 rowheader: {5243 -1 selectors: ['th[scope="row"]'],5244 -1 nameFromContents: true,5245 -1 },5246 -1 rowgroup: {5247 -1 selectors: ['tbody', 'thead', 'tfoot'],5248 -1 nameFromContents: true,5249 -1 },5250 -1 scrollbar: {5251 -1 defaults: {5252 -1 'orientation': 'vertical',5253 -1 'valuemin': 0,5254 -1 'valuemax': 100,5255 -1 // FIXME: halfway between actual valuemin and valuemax5256 -1 'valuenow': 50,5257 -1 },5258 -1 },5259 -1 searchbox: {5260 -1 selectors: ['input[type="search"]:not([list])'],5261 -1 },5262 -1 section: {5263 -1 childRoles: [5264 -1 'alert',5265 -1 'cell',5266 -1 'definition',5267 -1 'doc-abstract',5268 -1 'doc-colophon',5269 -1 'doc-credit',5270 -1 'doc-dedication',5271 -1 'doc-epigraph',5272 -1 'doc-example',5273 -1 'doc-footnote',5274 -1 'doc-qna',5275 -1 'figure',5276 -1 'group',5277 -1 'img',5278 -1 'landmark',5279 -1 'list',5280 -1 'listitem',5281 -1 'log',5282 -1 'marquee',5283 -1 'math',5284 -1 'note',5285 -1 'status',5286 -1 'table',5287 -1 'tabpanel',5288 -1 'term',5289 -1 'tooltip',5290 -1 ],5291 -1 },5292 -1 sectionhead: {5293 -1 childRoles: [5294 -1 'columnheader',5295 -1 'doc-subtitle',5296 -1 'heading',5297 -1 'rowheader',5298 -1 'tab',5299 -1 ],5300 -1 nameFromContents: true,5301 -1 },5302 -1 select: {5303 -1 childRoles: ['combobox', 'listbox', 'menu', 'radiogroup', 'tree'],5304 -1 },5305 -1 separator: {5306 -1 selectors: ['hr'],5307 -1 childRoles: ['doc-pagebreak'],5308 -1 defaults: {5309 -1 'orientation': 'horizontal',5310 -1 'valuemin': 0,5311 -1 'valuemax': 100,5312 -1 'valuenow': 50,5313 -1 },5314 -1 },5315 -1 slider: {5316 -1 selectors: ['input[type="range"]'],5317 -1 defaults: {5318 -1 'orientation': 'horizontal',5319 -1 'valuemin': 0,5320 -1 'valuemax': 100,5321 -1 // FIXME: halfway between actual valuemin and valuemax5322 -1 'valuenow': 50,5323 -1 },5324 -1 },5325 -1 spinbutton: {5326 -1 selectors: ['input[type="number"]'],5327 -1 defaults: {5328 -1 // FIXME: no valuemin/valuemax5329 -1 'valuenow': 0,5330 -1 },5331 -1 },5332 -1 status: {5333 -1 selectors: ['output'],5334 -1 childRoles: ['timer'],5335 -1 defaults: {5336 -1 'live': 'polite',5337 -1 'atomic': true,5338 -1 },5339 -1 },5340 -1 switch: {5341 -1 nameFromContents: true,5342 -1 defaults: {5343 -1 'checked': false,5344 -1 },5345 -1 },5346 -1 structure: {5347 -1 childRoles: [5348 -1 'application',5349 -1 'document',5350 -1 'none',5351 -1 'presentation',5352 -1 'rowgroup',5353 -1 'section',5354 -1 'sectionhead',5355 -1 'separator',5356 -1 ],5357 -1 },5358 -1 tab: {5359 -1 nameFromContents: true,5360 -1 defaults: {5361 -1 'selected': false,5362 -1 },5363 -1 },5364 -1 table: {5365 -1 selectors: ['table'],5366 -1 childRoles: ['grid'],5367 -1 },5368 -1 tablist: {5369 -1 defaults: {5370 -1 'orientation': 'horizontal',5371 -1 },5372 -1 },5373 -1 term: {5374 -1 selectors: ['dfn', 'dt'],5375 -1 },5376 -1 textbox: {5377 -1 selectors: [5378 -1 'input:not([type]):not([list])',5379 -1 'input[type="email"]:not([list])',5380 -1 'input[type="tel"]:not([list])',5381 -1 'input[type="text"]:not([list])',5382 -1 'input[type="url"]:not([list])',5383 -1 'textarea',5384 -1 ],5385 -1 childRoles: ['searchbox'],5386 -1 },5387 -1 toolbar: {5388 -1 defaults: {5389 -1 'orientation': 'horizontal',5390 -1 },5391 -1 },5392 -1 tooltip: {5393 -1 nameFromContents: true,5394 -1 },5395 -1 tree: {5396 -1 childRoles: ['treegrid'],5397 -1 defaults: {5398 -1 'orientation': 'vertical',5399 -1 },5400 -1 },5401 -1 treeitem: {5402 -1 nameFromContents: true,5403 -1 },5404 -1 widget: {5405 -1 childRoles: [5406 -1 'command',5407 -1 'composite',5408 -1 'gridcell',5409 -1 'input',5410 -1 'range',5411 -1 'row',5412 -1 'separator',5413 -1 'tab',5414 -1 ],5415 -1 },5416 -1 window: {5417 -1 childRoles: ['dialog'],5418 -1 },-1 1840 this.negative = 0; -1 1841 this.words = null; -1 1842 this.length = 0; -1 1843 -1 1844 // Reduction context -1 1845 this.red = null; -1 1846 -1 1847 if (number !== null) { -1 1848 if (base === 'le' || base === 'be') { -1 1849 endian = base; -1 1850 base = 10; -1 1851 } -1 1852 -1 1853 this._init(number || 0, base || 10, endian || 'be'); -1 1854 } -1 1855 } -1 1856 if (typeof module === 'object') { -1 1857 module.exports = BN; -1 1858 } else { -1 1859 exports.BN = BN; -1 1860 } -1 1861 -1 1862 BN.BN = BN; -1 1863 BN.wordSize = 26; -1 1864 -1 1865 var Buffer; -1 1866 try { -1 1867 if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') { -1 1868 Buffer = window.Buffer; -1 1869 } else { -1 1870 Buffer = require('buffer').Buffer; -1 1871 } -1 1872 } catch (e) { -1 1873 } -1 1874 -1 1875 BN.isBN = function isBN (num) { -1 1876 if (num instanceof BN) { -1 1877 return true; -1 1878 } -1 1879 -1 1880 return num !== null && typeof num === 'object' && -1 1881 num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); -1 1882 }; -1 1883 -1 1884 BN.max = function max (left, right) { -1 1885 if (left.cmp(right) > 0) return left; -1 1886 return right; -1 1887 }; -1 1888 -1 1889 BN.min = function min (left, right) { -1 1890 if (left.cmp(right) < 0) return left; -1 1891 return right; -1 1892 }; -1 1893 -1 1894 BN.prototype._init = function init (number, base, endian) { -1 1895 if (typeof number === 'number') { -1 1896 return this._initNumber(number, base, endian); -1 1897 } -1 1898 -1 1899 if (typeof number === 'object') { -1 1900 return this._initArray(number, base, endian); -1 1901 } -1 1902 -1 1903 if (base === 'hex') { -1 1904 base = 16; -1 1905 } -1 1906 assert(base === (base | 0) && base >= 2 && base <= 36); -1 1907 -1 1908 number = number.toString().replace(/\s+/g, ''); -1 1909 var start = 0; -1 1910 if (number[0] === '-') { -1 1911 start++; -1 1912 this.negative = 1; -1 1913 } -1 1914 -1 1915 if (start < number.length) { -1 1916 if (base === 16) { -1 1917 this._parseHex(number, start, endian); -1 1918 } else { -1 1919 this._parseBase(number, base, start); -1 1920 if (endian === 'le') { -1 1921 this._initArray(this.toArray(), base, endian); -1 1922 } -1 1923 } -1 1924 } -1 1925 }; -1 1926 -1 1927 BN.prototype._initNumber = function _initNumber (number, base, endian) { -1 1928 if (number < 0) { -1 1929 this.negative = 1; -1 1930 number = -number; -1 1931 } -1 1932 if (number < 0x4000000) { -1 1933 this.words = [ number & 0x3ffffff ]; -1 1934 this.length = 1; -1 1935 } else if (number < 0x10000000000000) { -1 1936 this.words = [ -1 1937 number & 0x3ffffff, -1 1938 (number / 0x4000000) & 0x3ffffff -1 1939 ]; -1 1940 this.length = 2; -1 1941 } else { -1 1942 assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) -1 1943 this.words = [ -1 1944 number & 0x3ffffff, -1 1945 (number / 0x4000000) & 0x3ffffff, -1 1946 1 -1 1947 ]; -1 1948 this.length = 3; -1 1949 } -1 1950 -1 1951 if (endian !== 'le') return; -1 1952 -1 1953 // Reverse the bytes -1 1954 this._initArray(this.toArray(), base, endian); -1 1955 }; -1 1956 -1 1957 BN.prototype._initArray = function _initArray (number, base, endian) { -1 1958 // Perhaps a Uint8Array -1 1959 assert(typeof number.length === 'number'); -1 1960 if (number.length <= 0) { -1 1961 this.words = [ 0 ]; -1 1962 this.length = 1; -1 1963 return this; -1 1964 } -1 1965 -1 1966 this.length = Math.ceil(number.length / 3); -1 1967 this.words = new Array(this.length); -1 1968 for (var i = 0; i < this.length; i++) { -1 1969 this.words[i] = 0; -1 1970 } -1 1971 -1 1972 var j, w; -1 1973 var off = 0; -1 1974 if (endian === 'be') { -1 1975 for (i = number.length - 1, j = 0; i >= 0; i -= 3) { -1 1976 w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); -1 1977 this.words[j] |= (w << off) & 0x3ffffff; -1 1978 this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; -1 1979 off += 24; -1 1980 if (off >= 26) { -1 1981 off -= 26; -1 1982 j++; -1 1983 } -1 1984 } -1 1985 } else if (endian === 'le') { -1 1986 for (i = 0, j = 0; i < number.length; i += 3) { -1 1987 w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); -1 1988 this.words[j] |= (w << off) & 0x3ffffff; -1 1989 this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; -1 1990 off += 24; -1 1991 if (off >= 26) { -1 1992 off -= 26; -1 1993 j++; -1 1994 } -1 1995 } -1 1996 } -1 1997 return this.strip(); -1 1998 }; -1 1999 -1 2000 function parseHex4Bits (string, index) { -1 2001 var c = string.charCodeAt(index); -1 2002 // 'A' - 'F' -1 2003 if (c >= 65 && c <= 70) { -1 2004 return c - 55; -1 2005 // 'a' - 'f' -1 2006 } else if (c >= 97 && c <= 102) { -1 2007 return c - 87; -1 2008 // '0' - '9' -1 2009 } else { -1 2010 return (c - 48) & 0xf; -1 2011 } -1 2012 } -1 2013 -1 2014 function parseHexByte (string, lowerBound, index) { -1 2015 var r = parseHex4Bits(string, index); -1 2016 if (index - 1 >= lowerBound) { -1 2017 r |= parseHex4Bits(string, index - 1) << 4; -1 2018 } -1 2019 return r; -1 2020 } -1 2021 -1 2022 BN.prototype._parseHex = function _parseHex (number, start, endian) { -1 2023 // Create possibly bigger array to ensure that it fits the number -1 2024 this.length = Math.ceil((number.length - start) / 6); -1 2025 this.words = new Array(this.length); -1 2026 for (var i = 0; i < this.length; i++) { -1 2027 this.words[i] = 0; -1 2028 } -1 2029 -1 2030 // 24-bits chunks -1 2031 var off = 0; -1 2032 var j = 0; -1 2033 -1 2034 var w; -1 2035 if (endian === 'be') { -1 2036 for (i = number.length - 1; i >= start; i -= 2) { -1 2037 w = parseHexByte(number, start, i) << off; -1 2038 this.words[j] |= w & 0x3ffffff; -1 2039 if (off >= 18) { -1 2040 off -= 18; -1 2041 j += 1; -1 2042 this.words[j] |= w >>> 26; -1 2043 } else { -1 2044 off += 8; -1 2045 } -1 2046 } -1 2047 } else { -1 2048 var parseLength = number.length - start; -1 2049 for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) { -1 2050 w = parseHexByte(number, start, i) << off; -1 2051 this.words[j] |= w & 0x3ffffff; -1 2052 if (off >= 18) { -1 2053 off -= 18; -1 2054 j += 1; -1 2055 this.words[j] |= w >>> 26; -1 2056 } else { -1 2057 off += 8; -1 2058 } -1 2059 } -1 2060 } -1 2061 -1 2062 this.strip(); -1 2063 }; -1 2064 -1 2065 function parseBase (str, start, end, mul) { -1 2066 var r = 0; -1 2067 var len = Math.min(str.length, end); -1 2068 for (var i = start; i < len; i++) { -1 2069 var c = str.charCodeAt(i) - 48; -1 2070 -1 2071 r *= mul; -1 2072 -1 2073 // 'a' -1 2074 if (c >= 49) { -1 2075 r += c - 49 + 0xa; -1 2076 -1 2077 // 'A' -1 2078 } else if (c >= 17) { -1 2079 r += c - 17 + 0xa; -1 2080 -1 2081 // '0' - '9' -1 2082 } else { -1 2083 r += c; -1 2084 } -1 2085 } -1 2086 return r; -1 2087 } -1 2088 -1 2089 BN.prototype._parseBase = function _parseBase (number, base, start) { -1 2090 // Initialize as zero -1 2091 this.words = [ 0 ]; -1 2092 this.length = 1; -1 2093 -1 2094 // Find length of limb in base -1 2095 for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { -1 2096 limbLen++; -1 2097 } -1 2098 limbLen--; -1 2099 limbPow = (limbPow / base) | 0; -1 2100 -1 2101 var total = number.length - start; -1 2102 var mod = total % limbLen; -1 2103 var end = Math.min(total, total - mod) + start; -1 2104 -1 2105 var word = 0; -1 2106 for (var i = start; i < end; i += limbLen) { -1 2107 word = parseBase(number, i, i + limbLen, base); -1 2108 -1 2109 this.imuln(limbPow); -1 2110 if (this.words[0] + word < 0x4000000) { -1 2111 this.words[0] += word; -1 2112 } else { -1 2113 this._iaddn(word); -1 2114 } -1 2115 } -1 2116 -1 2117 if (mod !== 0) { -1 2118 var pow = 1; -1 2119 word = parseBase(number, i, number.length, base); -1 2120 -1 2121 for (i = 0; i < mod; i++) { -1 2122 pow *= base; -1 2123 } -1 2124 -1 2125 this.imuln(pow); -1 2126 if (this.words[0] + word < 0x4000000) { -1 2127 this.words[0] += word; -1 2128 } else { -1 2129 this._iaddn(word); -1 2130 } -1 2131 } -1 2132 -1 2133 this.strip(); -1 2134 }; -1 2135 -1 2136 BN.prototype.copy = function copy (dest) { -1 2137 dest.words = new Array(this.length); -1 2138 for (var i = 0; i < this.length; i++) { -1 2139 dest.words[i] = this.words[i]; -1 2140 } -1 2141 dest.length = this.length; -1 2142 dest.negative = this.negative; -1 2143 dest.red = this.red; -1 2144 }; -1 2145 -1 2146 BN.prototype.clone = function clone () { -1 2147 var r = new BN(null); -1 2148 this.copy(r); -1 2149 return r; -1 2150 }; -1 2151 -1 2152 BN.prototype._expand = function _expand (size) { -1 2153 while (this.length < size) { -1 2154 this.words[this.length++] = 0; -1 2155 } -1 2156 return this; -1 2157 }; -1 2158 -1 2159 // Remove leading `0` from `this` -1 2160 BN.prototype.strip = function strip () { -1 2161 while (this.length > 1 && this.words[this.length - 1] === 0) { -1 2162 this.length--; -1 2163 } -1 2164 return this._normSign(); -1 2165 }; -1 2166 -1 2167 BN.prototype._normSign = function _normSign () { -1 2168 // -0 = 0 -1 2169 if (this.length === 1 && this.words[0] === 0) { -1 2170 this.negative = 0; -1 2171 } -1 2172 return this; -1 2173 }; -1 2174 -1 2175 BN.prototype.inspect = function inspect () { -1 2176 return (this.red ? '<BN-R: ' : '<BN: ') + this.toString(16) + '>'; -1 2177 }; -1 2178 -1 2179 /* -1 2180 -1 2181 var zeros = []; -1 2182 var groupSizes = []; -1 2183 var groupBases = []; -1 2184 -1 2185 var s = ''; -1 2186 var i = -1; -1 2187 while (++i < BN.wordSize) { -1 2188 zeros[i] = s; -1 2189 s += '0'; -1 2190 } -1 2191 groupSizes[0] = 0; -1 2192 groupSizes[1] = 0; -1 2193 groupBases[0] = 0; -1 2194 groupBases[1] = 0; -1 2195 var base = 2 - 1; -1 2196 while (++base < 36 + 1) { -1 2197 var groupSize = 0; -1 2198 var groupBase = 1; -1 2199 while (groupBase < (1 << BN.wordSize) / base) { -1 2200 groupBase *= base; -1 2201 groupSize += 1; -1 2202 } -1 2203 groupSizes[base] = groupSize; -1 2204 groupBases[base] = groupBase; -1 2205 } -1 2206 -1 2207 */ -1 2208 -1 2209 var zeros = [ -1 2210 '', -1 2211 '0', -1 2212 '00', -1 2213 '000', -1 2214 '0000', -1 2215 '00000', -1 2216 '000000', -1 2217 '0000000', -1 2218 '00000000', -1 2219 '000000000', -1 2220 '0000000000', -1 2221 '00000000000', -1 2222 '000000000000', -1 2223 '0000000000000', -1 2224 '00000000000000', -1 2225 '000000000000000', -1 2226 '0000000000000000', -1 2227 '00000000000000000', -1 2228 '000000000000000000', -1 2229 '0000000000000000000', -1 2230 '00000000000000000000', -1 2231 '000000000000000000000', -1 2232 '0000000000000000000000', -1 2233 '00000000000000000000000', -1 2234 '000000000000000000000000', -1 2235 '0000000000000000000000000' -1 2236 ]; -1 2237 -1 2238 var groupSizes = [ -1 2239 0, 0, -1 2240 25, 16, 12, 11, 10, 9, 8, -1 2241 8, 7, 7, 7, 7, 6, 6, -1 2242 6, 6, 6, 6, 6, 5, 5, -1 2243 5, 5, 5, 5, 5, 5, 5, -1 2244 5, 5, 5, 5, 5, 5, 5 -1 2245 ]; -1 2246 -1 2247 var groupBases = [ -1 2248 0, 0, -1 2249 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, -1 2250 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, -1 2251 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, -1 2252 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, -1 2253 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 -1 2254 ]; -1 2255 -1 2256 BN.prototype.toString = function toString (base, padding) { -1 2257 base = base || 10; -1 2258 padding = padding | 0 || 1; -1 2259 -1 2260 var out; -1 2261 if (base === 16 || base === 'hex') { -1 2262 out = ''; -1 2263 var off = 0; -1 2264 var carry = 0; -1 2265 for (var i = 0; i < this.length; i++) { -1 2266 var w = this.words[i]; -1 2267 var word = (((w << off) | carry) & 0xffffff).toString(16); -1 2268 carry = (w >>> (24 - off)) & 0xffffff; -1 2269 if (carry !== 0 || i !== this.length - 1) { -1 2270 out = zeros[6 - word.length] + word + out; -1 2271 } else { -1 2272 out = word + out; -1 2273 } -1 2274 off += 2; -1 2275 if (off >= 26) { -1 2276 off -= 26; -1 2277 i--; -1 2278 } -1 2279 } -1 2280 if (carry !== 0) { -1 2281 out = carry.toString(16) + out; -1 2282 } -1 2283 while (out.length % padding !== 0) { -1 2284 out = '0' + out; -1 2285 } -1 2286 if (this.negative !== 0) { -1 2287 out = '-' + out; -1 2288 } -1 2289 return out; -1 2290 } -1 2291 -1 2292 if (base === (base | 0) && base >= 2 && base <= 36) { -1 2293 // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); -1 2294 var groupSize = groupSizes[base]; -1 2295 // var groupBase = Math.pow(base, groupSize); -1 2296 var groupBase = groupBases[base]; -1 2297 out = ''; -1 2298 var c = this.clone(); -1 2299 c.negative = 0; -1 2300 while (!c.isZero()) { -1 2301 var r = c.modn(groupBase).toString(base); -1 2302 c = c.idivn(groupBase); -1 2303 -1 2304 if (!c.isZero()) { -1 2305 out = zeros[groupSize - r.length] + r + out; -1 2306 } else { -1 2307 out = r + out; -1 2308 } -1 2309 } -1 2310 if (this.isZero()) { -1 2311 out = '0' + out; -1 2312 } -1 2313 while (out.length % padding !== 0) { -1 2314 out = '0' + out; -1 2315 } -1 2316 if (this.negative !== 0) { -1 2317 out = '-' + out; -1 2318 } -1 2319 return out; -1 2320 } -1 2321 -1 2322 assert(false, 'Base should be between 2 and 36'); -1 2323 }; -1 2324 -1 2325 BN.prototype.toNumber = function toNumber () { -1 2326 var ret = this.words[0]; -1 2327 if (this.length === 2) { -1 2328 ret += this.words[1] * 0x4000000; -1 2329 } else if (this.length === 3 && this.words[2] === 0x01) { -1 2330 // NOTE: at this stage it is known that the top bit is set -1 2331 ret += 0x10000000000000 + (this.words[1] * 0x4000000); -1 2332 } else if (this.length > 2) { -1 2333 assert(false, 'Number can only safely store up to 53 bits'); -1 2334 } -1 2335 return (this.negative !== 0) ? -ret : ret; -1 2336 }; -1 2337 -1 2338 BN.prototype.toJSON = function toJSON () { -1 2339 return this.toString(16); -1 2340 }; -1 2341 -1 2342 BN.prototype.toBuffer = function toBuffer (endian, length) { -1 2343 assert(typeof Buffer !== 'undefined'); -1 2344 return this.toArrayLike(Buffer, endian, length); -1 2345 }; -1 2346 -1 2347 BN.prototype.toArray = function toArray (endian, length) { -1 2348 return this.toArrayLike(Array, endian, length); -1 2349 }; -1 2350 -1 2351 BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { -1 2352 var byteLength = this.byteLength(); -1 2353 var reqLength = length || Math.max(1, byteLength); -1 2354 assert(byteLength <= reqLength, 'byte array longer than desired length'); -1 2355 assert(reqLength > 0, 'Requested array length <= 0'); -1 2356 -1 2357 this.strip(); -1 2358 var littleEndian = endian === 'le'; -1 2359 var res = new ArrayType(reqLength); -1 2360 -1 2361 var b, i; -1 2362 var q = this.clone(); -1 2363 if (!littleEndian) { -1 2364 // Assume big-endian -1 2365 for (i = 0; i < reqLength - byteLength; i++) { -1 2366 res[i] = 0; -1 2367 } -1 2368 -1 2369 for (i = 0; !q.isZero(); i++) { -1 2370 b = q.andln(0xff); -1 2371 q.iushrn(8); -1 2372 -1 2373 res[reqLength - i - 1] = b; -1 2374 } -1 2375 } else { -1 2376 for (i = 0; !q.isZero(); i++) { -1 2377 b = q.andln(0xff); -1 2378 q.iushrn(8); -1 2379 -1 2380 res[i] = b; -1 2381 } -1 2382 -1 2383 for (; i < reqLength; i++) { -1 2384 res[i] = 0; -1 2385 } -1 2386 } -1 2387 -1 2388 return res; -1 2389 }; -1 2390 -1 2391 if (Math.clz32) { -1 2392 BN.prototype._countBits = function _countBits (w) { -1 2393 return 32 - Math.clz32(w); -1 2394 }; -1 2395 } else { -1 2396 BN.prototype._countBits = function _countBits (w) { -1 2397 var t = w; -1 2398 var r = 0; -1 2399 if (t >= 0x1000) { -1 2400 r += 13; -1 2401 t >>>= 13; -1 2402 } -1 2403 if (t >= 0x40) { -1 2404 r += 7; -1 2405 t >>>= 7; -1 2406 } -1 2407 if (t >= 0x8) { -1 2408 r += 4; -1 2409 t >>>= 4; -1 2410 } -1 2411 if (t >= 0x02) { -1 2412 r += 2; -1 2413 t >>>= 2; -1 2414 } -1 2415 return r + t; -1 2416 }; -1 2417 } -1 2418 -1 2419 BN.prototype._zeroBits = function _zeroBits (w) { -1 2420 // Short-cut -1 2421 if (w === 0) return 26; -1 2422 -1 2423 var t = w; -1 2424 var r = 0; -1 2425 if ((t & 0x1fff) === 0) { -1 2426 r += 13; -1 2427 t >>>= 13; -1 2428 } -1 2429 if ((t & 0x7f) === 0) { -1 2430 r += 7; -1 2431 t >>>= 7; -1 2432 } -1 2433 if ((t & 0xf) === 0) { -1 2434 r += 4; -1 2435 t >>>= 4; -1 2436 } -1 2437 if ((t & 0x3) === 0) { -1 2438 r += 2; -1 2439 t >>>= 2; -1 2440 } -1 2441 if ((t & 0x1) === 0) { -1 2442 r++; -1 2443 } -1 2444 return r; -1 2445 }; -1 2446 -1 2447 // Return number of used bits in a BN -1 2448 BN.prototype.bitLength = function bitLength () { -1 2449 var w = this.words[this.length - 1]; -1 2450 var hi = this._countBits(w); -1 2451 return (this.length - 1) * 26 + hi; -1 2452 }; -1 2453 -1 2454 function toBitArray (num) { -1 2455 var w = new Array(num.bitLength()); -1 2456 -1 2457 for (var bit = 0; bit < w.length; bit++) { -1 2458 var off = (bit / 26) | 0; -1 2459 var wbit = bit % 26; -1 2460 -1 2461 w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; -1 2462 } -1 2463 -1 2464 return w; -1 2465 } -1 2466 -1 2467 // Number of trailing zero bits -1 2468 BN.prototype.zeroBits = function zeroBits () { -1 2469 if (this.isZero()) return 0; -1 2470 -1 2471 var r = 0; -1 2472 for (var i = 0; i < this.length; i++) { -1 2473 var b = this._zeroBits(this.words[i]); -1 2474 r += b; -1 2475 if (b !== 26) break; -1 2476 } -1 2477 return r; -1 2478 }; -1 2479 -1 2480 BN.prototype.byteLength = function byteLength () { -1 2481 return Math.ceil(this.bitLength() / 8); -1 2482 }; -1 2483 -1 2484 BN.prototype.toTwos = function toTwos (width) { -1 2485 if (this.negative !== 0) { -1 2486 return this.abs().inotn(width).iaddn(1); -1 2487 } -1 2488 return this.clone(); -1 2489 }; -1 2490 -1 2491 BN.prototype.fromTwos = function fromTwos (width) { -1 2492 if (this.testn(width - 1)) { -1 2493 return this.notn(width).iaddn(1).ineg(); -1 2494 } -1 2495 return this.clone(); -1 2496 }; -1 2497 -1 2498 BN.prototype.isNeg = function isNeg () { -1 2499 return this.negative !== 0; -1 2500 }; -1 2501 -1 2502 // Return negative clone of `this` -1 2503 BN.prototype.neg = function neg () { -1 2504 return this.clone().ineg(); -1 2505 }; -1 2506 -1 2507 BN.prototype.ineg = function ineg () { -1 2508 if (!this.isZero()) { -1 2509 this.negative ^= 1; -1 2510 } -1 2511 -1 2512 return this; -1 2513 }; -1 2514 -1 2515 // Or `num` with `this` in-place -1 2516 BN.prototype.iuor = function iuor (num) { -1 2517 while (this.length < num.length) { -1 2518 this.words[this.length++] = 0; -1 2519 } -1 2520 -1 2521 for (var i = 0; i < num.length; i++) { -1 2522 this.words[i] = this.words[i] | num.words[i]; -1 2523 } -1 2524 -1 2525 return this.strip(); -1 2526 }; -1 2527 -1 2528 BN.prototype.ior = function ior (num) { -1 2529 assert((this.negative | num.negative) === 0); -1 2530 return this.iuor(num); -1 2531 }; -1 2532 -1 2533 // Or `num` with `this` -1 2534 BN.prototype.or = function or (num) { -1 2535 if (this.length > num.length) return this.clone().ior(num); -1 2536 return num.clone().ior(this); -1 2537 }; -1 2538 -1 2539 BN.prototype.uor = function uor (num) { -1 2540 if (this.length > num.length) return this.clone().iuor(num); -1 2541 return num.clone().iuor(this); -1 2542 }; -1 2543 -1 2544 // And `num` with `this` in-place -1 2545 BN.prototype.iuand = function iuand (num) { -1 2546 // b = min-length(num, this) -1 2547 var b; -1 2548 if (this.length > num.length) { -1 2549 b = num; -1 2550 } else { -1 2551 b = this; -1 2552 } -1 2553 -1 2554 for (var i = 0; i < b.length; i++) { -1 2555 this.words[i] = this.words[i] & num.words[i]; -1 2556 } -1 2557 -1 2558 this.length = b.length; -1 2559 -1 2560 return this.strip(); -1 2561 }; -1 2562 -1 2563 BN.prototype.iand = function iand (num) { -1 2564 assert((this.negative | num.negative) === 0); -1 2565 return this.iuand(num); -1 2566 }; -1 2567 -1 2568 // And `num` with `this` -1 2569 BN.prototype.and = function and (num) { -1 2570 if (this.length > num.length) return this.clone().iand(num); -1 2571 return num.clone().iand(this); -1 2572 }; -1 2573 -1 2574 BN.prototype.uand = function uand (num) { -1 2575 if (this.length > num.length) return this.clone().iuand(num); -1 2576 return num.clone().iuand(this); -1 2577 }; -1 2578 -1 2579 // Xor `num` with `this` in-place -1 2580 BN.prototype.iuxor = function iuxor (num) { -1 2581 // a.length > b.length -1 2582 var a; -1 2583 var b; -1 2584 if (this.length > num.length) { -1 2585 a = this; -1 2586 b = num; -1 2587 } else { -1 2588 a = num; -1 2589 b = this; -1 2590 } -1 2591 -1 2592 for (var i = 0; i < b.length; i++) { -1 2593 this.words[i] = a.words[i] ^ b.words[i]; -1 2594 } -1 2595 -1 2596 if (this !== a) { -1 2597 for (; i < a.length; i++) { -1 2598 this.words[i] = a.words[i]; -1 2599 } -1 2600 } -1 2601 -1 2602 this.length = a.length; -1 2603 -1 2604 return this.strip(); -1 2605 }; -1 2606 -1 2607 BN.prototype.ixor = function ixor (num) { -1 2608 assert((this.negative | num.negative) === 0); -1 2609 return this.iuxor(num); -1 2610 }; -1 2611 -1 2612 // Xor `num` with `this` -1 2613 BN.prototype.xor = function xor (num) { -1 2614 if (this.length > num.length) return this.clone().ixor(num); -1 2615 return num.clone().ixor(this); -1 2616 }; -1 2617 -1 2618 BN.prototype.uxor = function uxor (num) { -1 2619 if (this.length > num.length) return this.clone().iuxor(num); -1 2620 return num.clone().iuxor(this); -1 2621 }; -1 2622 -1 2623 // Not ``this`` with ``width`` bitwidth -1 2624 BN.prototype.inotn = function inotn (width) { -1 2625 assert(typeof width === 'number' && width >= 0); -1 2626 -1 2627 var bytesNeeded = Math.ceil(width / 26) | 0; -1 2628 var bitsLeft = width % 26; -1 2629 -1 2630 // Extend the buffer with leading zeroes -1 2631 this._expand(bytesNeeded); -1 2632 -1 2633 if (bitsLeft > 0) { -1 2634 bytesNeeded--; -1 2635 } -1 2636 -1 2637 // Handle complete words -1 2638 for (var i = 0; i < bytesNeeded; i++) { -1 2639 this.words[i] = ~this.words[i] & 0x3ffffff; -1 2640 } -1 2641 -1 2642 // Handle the residue -1 2643 if (bitsLeft > 0) { -1 2644 this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); -1 2645 } -1 2646 -1 2647 // And remove leading zeroes -1 2648 return this.strip(); -1 2649 }; -1 2650 -1 2651 BN.prototype.notn = function notn (width) { -1 2652 return this.clone().inotn(width); -1 2653 }; -1 2654 -1 2655 // Set `bit` of `this` -1 2656 BN.prototype.setn = function setn (bit, val) { -1 2657 assert(typeof bit === 'number' && bit >= 0); -1 2658 -1 2659 var off = (bit / 26) | 0; -1 2660 var wbit = bit % 26; -1 2661 -1 2662 this._expand(off + 1); -1 2663 -1 2664 if (val) { -1 2665 this.words[off] = this.words[off] | (1 << wbit); -1 2666 } else { -1 2667 this.words[off] = this.words[off] & ~(1 << wbit); -1 2668 } -1 2669 -1 2670 return this.strip(); -1 2671 }; -1 2672 -1 2673 // Add `num` to `this` in-place -1 2674 BN.prototype.iadd = function iadd (num) { -1 2675 var r; -1 2676 -1 2677 // negative + positive -1 2678 if (this.negative !== 0 && num.negative === 0) { -1 2679 this.negative = 0; -1 2680 r = this.isub(num); -1 2681 this.negative ^= 1; -1 2682 return this._normSign(); -1 2683 -1 2684 // positive + negative -1 2685 } else if (this.negative === 0 && num.negative !== 0) { -1 2686 num.negative = 0; -1 2687 r = this.isub(num); -1 2688 num.negative = 1; -1 2689 return r._normSign(); -1 2690 } -1 2691 -1 2692 // a.length > b.length -1 2693 var a, b; -1 2694 if (this.length > num.length) { -1 2695 a = this; -1 2696 b = num; -1 2697 } else { -1 2698 a = num; -1 2699 b = this; -1 2700 } -1 2701 -1 2702 var carry = 0; -1 2703 for (var i = 0; i < b.length; i++) { -1 2704 r = (a.words[i] | 0) + (b.words[i] | 0) + carry; -1 2705 this.words[i] = r & 0x3ffffff; -1 2706 carry = r >>> 26; -1 2707 } -1 2708 for (; carry !== 0 && i < a.length; i++) { -1 2709 r = (a.words[i] | 0) + carry; -1 2710 this.words[i] = r & 0x3ffffff; -1 2711 carry = r >>> 26; -1 2712 } -1 2713 -1 2714 this.length = a.length; -1 2715 if (carry !== 0) { -1 2716 this.words[this.length] = carry; -1 2717 this.length++; -1 2718 // Copy the rest of the words -1 2719 } else if (a !== this) { -1 2720 for (; i < a.length; i++) { -1 2721 this.words[i] = a.words[i]; -1 2722 } -1 2723 } -1 2724 -1 2725 return this; -1 2726 }; -1 2727 -1 2728 // Add `num` to `this` -1 2729 BN.prototype.add = function add (num) { -1 2730 var res; -1 2731 if (num.negative !== 0 && this.negative === 0) { -1 2732 num.negative = 0; -1 2733 res = this.sub(num); -1 2734 num.negative ^= 1; -1 2735 return res; -1 2736 } else if (num.negative === 0 && this.negative !== 0) { -1 2737 this.negative = 0; -1 2738 res = num.sub(this); -1 2739 this.negative = 1; -1 2740 return res; -1 2741 } -1 2742 -1 2743 if (this.length > num.length) return this.clone().iadd(num); -1 2744 -1 2745 return num.clone().iadd(this); -1 2746 }; -1 2747 -1 2748 // Subtract `num` from `this` in-place -1 2749 BN.prototype.isub = function isub (num) { -1 2750 // this - (-num) = this + num -1 2751 if (num.negative !== 0) { -1 2752 num.negative = 0; -1 2753 var r = this.iadd(num); -1 2754 num.negative = 1; -1 2755 return r._normSign(); -1 2756 -1 2757 // -this - num = -(this + num) -1 2758 } else if (this.negative !== 0) { -1 2759 this.negative = 0; -1 2760 this.iadd(num); -1 2761 this.negative = 1; -1 2762 return this._normSign(); -1 2763 } -1 2764 -1 2765 // At this point both numbers are positive -1 2766 var cmp = this.cmp(num); -1 2767 -1 2768 // Optimization - zeroify -1 2769 if (cmp === 0) { -1 2770 this.negative = 0; -1 2771 this.length = 1; -1 2772 this.words[0] = 0; -1 2773 return this; -1 2774 } -1 2775 -1 2776 // a > b -1 2777 var a, b; -1 2778 if (cmp > 0) { -1 2779 a = this; -1 2780 b = num; -1 2781 } else { -1 2782 a = num; -1 2783 b = this; -1 2784 } -1 2785 -1 2786 var carry = 0; -1 2787 for (var i = 0; i < b.length; i++) { -1 2788 r = (a.words[i] | 0) - (b.words[i] | 0) + carry; -1 2789 carry = r >> 26; -1 2790 this.words[i] = r & 0x3ffffff; -1 2791 } -1 2792 for (; carry !== 0 && i < a.length; i++) { -1 2793 r = (a.words[i] | 0) + carry; -1 2794 carry = r >> 26; -1 2795 this.words[i] = r & 0x3ffffff; -1 2796 } -1 2797 -1 2798 // Copy rest of the words -1 2799 if (carry === 0 && i < a.length && a !== this) { -1 2800 for (; i < a.length; i++) { -1 2801 this.words[i] = a.words[i]; -1 2802 } -1 2803 } -1 2804 -1 2805 this.length = Math.max(this.length, i); -1 2806 -1 2807 if (a !== this) { -1 2808 this.negative = 1; -1 2809 } -1 2810 -1 2811 return this.strip(); -1 2812 }; -1 2813 -1 2814 // Subtract `num` from `this` -1 2815 BN.prototype.sub = function sub (num) { -1 2816 return this.clone().isub(num); -1 2817 }; -1 2818 -1 2819 function smallMulTo (self, num, out) { -1 2820 out.negative = num.negative ^ self.negative; -1 2821 var len = (self.length + num.length) | 0; -1 2822 out.length = len; -1 2823 len = (len - 1) | 0; -1 2824 -1 2825 // Peel one iteration (compiler can't do it, because of code complexity) -1 2826 var a = self.words[0] | 0; -1 2827 var b = num.words[0] | 0; -1 2828 var r = a * b; -1 2829 -1 2830 var lo = r & 0x3ffffff; -1 2831 var carry = (r / 0x4000000) | 0; -1 2832 out.words[0] = lo; -1 2833 -1 2834 for (var k = 1; k < len; k++) { -1 2835 // Sum all words with the same `i + j = k` and accumulate `ncarry`, -1 2836 // note that ncarry could be >= 0x3ffffff -1 2837 var ncarry = carry >>> 26; -1 2838 var rword = carry & 0x3ffffff; -1 2839 var maxJ = Math.min(k, num.length - 1); -1 2840 for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { -1 2841 var i = (k - j) | 0; -1 2842 a = self.words[i] | 0; -1 2843 b = num.words[j] | 0; -1 2844 r = a * b + rword; -1 2845 ncarry += (r / 0x4000000) | 0; -1 2846 rword = r & 0x3ffffff; -1 2847 } -1 2848 out.words[k] = rword | 0; -1 2849 carry = ncarry | 0; -1 2850 } -1 2851 if (carry !== 0) { -1 2852 out.words[k] = carry | 0; -1 2853 } else { -1 2854 out.length--; -1 2855 } -1 2856 -1 2857 return out.strip(); -1 2858 } -1 2859 -1 2860 // TODO(indutny): it may be reasonable to omit it for users who don't need -1 2861 // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit -1 2862 // multiplication (like elliptic secp256k1). -1 2863 var comb10MulTo = function comb10MulTo (self, num, out) { -1 2864 var a = self.words; -1 2865 var b = num.words; -1 2866 var o = out.words; -1 2867 var c = 0; -1 2868 var lo; -1 2869 var mid; -1 2870 var hi; -1 2871 var a0 = a[0] | 0; -1 2872 var al0 = a0 & 0x1fff; -1 2873 var ah0 = a0 >>> 13; -1 2874 var a1 = a[1] | 0; -1 2875 var al1 = a1 & 0x1fff; -1 2876 var ah1 = a1 >>> 13; -1 2877 var a2 = a[2] | 0; -1 2878 var al2 = a2 & 0x1fff; -1 2879 var ah2 = a2 >>> 13; -1 2880 var a3 = a[3] | 0; -1 2881 var al3 = a3 & 0x1fff; -1 2882 var ah3 = a3 >>> 13; -1 2883 var a4 = a[4] | 0; -1 2884 var al4 = a4 & 0x1fff; -1 2885 var ah4 = a4 >>> 13; -1 2886 var a5 = a[5] | 0; -1 2887 var al5 = a5 & 0x1fff; -1 2888 var ah5 = a5 >>> 13; -1 2889 var a6 = a[6] | 0; -1 2890 var al6 = a6 & 0x1fff; -1 2891 var ah6 = a6 >>> 13; -1 2892 var a7 = a[7] | 0; -1 2893 var al7 = a7 & 0x1fff; -1 2894 var ah7 = a7 >>> 13; -1 2895 var a8 = a[8] | 0; -1 2896 var al8 = a8 & 0x1fff; -1 2897 var ah8 = a8 >>> 13; -1 2898 var a9 = a[9] | 0; -1 2899 var al9 = a9 & 0x1fff; -1 2900 var ah9 = a9 >>> 13; -1 2901 var b0 = b[0] | 0; -1 2902 var bl0 = b0 & 0x1fff; -1 2903 var bh0 = b0 >>> 13; -1 2904 var b1 = b[1] | 0; -1 2905 var bl1 = b1 & 0x1fff; -1 2906 var bh1 = b1 >>> 13; -1 2907 var b2 = b[2] | 0; -1 2908 var bl2 = b2 & 0x1fff; -1 2909 var bh2 = b2 >>> 13; -1 2910 var b3 = b[3] | 0; -1 2911 var bl3 = b3 & 0x1fff; -1 2912 var bh3 = b3 >>> 13; -1 2913 var b4 = b[4] | 0; -1 2914 var bl4 = b4 & 0x1fff; -1 2915 var bh4 = b4 >>> 13; -1 2916 var b5 = b[5] | 0; -1 2917 var bl5 = b5 & 0x1fff; -1 2918 var bh5 = b5 >>> 13; -1 2919 var b6 = b[6] | 0; -1 2920 var bl6 = b6 & 0x1fff; -1 2921 var bh6 = b6 >>> 13; -1 2922 var b7 = b[7] | 0; -1 2923 var bl7 = b7 & 0x1fff; -1 2924 var bh7 = b7 >>> 13; -1 2925 var b8 = b[8] | 0; -1 2926 var bl8 = b8 & 0x1fff; -1 2927 var bh8 = b8 >>> 13; -1 2928 var b9 = b[9] | 0; -1 2929 var bl9 = b9 & 0x1fff; -1 2930 var bh9 = b9 >>> 13; -1 2931 -1 2932 out.negative = self.negative ^ num.negative; -1 2933 out.length = 19; -1 2934 /* k = 0 */ -1 2935 lo = Math.imul(al0, bl0); -1 2936 mid = Math.imul(al0, bh0); -1 2937 mid = (mid + Math.imul(ah0, bl0)) | 0; -1 2938 hi = Math.imul(ah0, bh0); -1 2939 var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 2940 c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; -1 2941 w0 &= 0x3ffffff; -1 2942 /* k = 1 */ -1 2943 lo = Math.imul(al1, bl0); -1 2944 mid = Math.imul(al1, bh0); -1 2945 mid = (mid + Math.imul(ah1, bl0)) | 0; -1 2946 hi = Math.imul(ah1, bh0); -1 2947 lo = (lo + Math.imul(al0, bl1)) | 0; -1 2948 mid = (mid + Math.imul(al0, bh1)) | 0; -1 2949 mid = (mid + Math.imul(ah0, bl1)) | 0; -1 2950 hi = (hi + Math.imul(ah0, bh1)) | 0; -1 2951 var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 2952 c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; -1 2953 w1 &= 0x3ffffff; -1 2954 /* k = 2 */ -1 2955 lo = Math.imul(al2, bl0); -1 2956 mid = Math.imul(al2, bh0); -1 2957 mid = (mid + Math.imul(ah2, bl0)) | 0; -1 2958 hi = Math.imul(ah2, bh0); -1 2959 lo = (lo + Math.imul(al1, bl1)) | 0; -1 2960 mid = (mid + Math.imul(al1, bh1)) | 0; -1 2961 mid = (mid + Math.imul(ah1, bl1)) | 0; -1 2962 hi = (hi + Math.imul(ah1, bh1)) | 0; -1 2963 lo = (lo + Math.imul(al0, bl2)) | 0; -1 2964 mid = (mid + Math.imul(al0, bh2)) | 0; -1 2965 mid = (mid + Math.imul(ah0, bl2)) | 0; -1 2966 hi = (hi + Math.imul(ah0, bh2)) | 0; -1 2967 var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 2968 c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; -1 2969 w2 &= 0x3ffffff; -1 2970 /* k = 3 */ -1 2971 lo = Math.imul(al3, bl0); -1 2972 mid = Math.imul(al3, bh0); -1 2973 mid = (mid + Math.imul(ah3, bl0)) | 0; -1 2974 hi = Math.imul(ah3, bh0); -1 2975 lo = (lo + Math.imul(al2, bl1)) | 0; -1 2976 mid = (mid + Math.imul(al2, bh1)) | 0; -1 2977 mid = (mid + Math.imul(ah2, bl1)) | 0; -1 2978 hi = (hi + Math.imul(ah2, bh1)) | 0; -1 2979 lo = (lo + Math.imul(al1, bl2)) | 0; -1 2980 mid = (mid + Math.imul(al1, bh2)) | 0; -1 2981 mid = (mid + Math.imul(ah1, bl2)) | 0; -1 2982 hi = (hi + Math.imul(ah1, bh2)) | 0; -1 2983 lo = (lo + Math.imul(al0, bl3)) | 0; -1 2984 mid = (mid + Math.imul(al0, bh3)) | 0; -1 2985 mid = (mid + Math.imul(ah0, bl3)) | 0; -1 2986 hi = (hi + Math.imul(ah0, bh3)) | 0; -1 2987 var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 2988 c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; -1 2989 w3 &= 0x3ffffff; -1 2990 /* k = 4 */ -1 2991 lo = Math.imul(al4, bl0); -1 2992 mid = Math.imul(al4, bh0); -1 2993 mid = (mid + Math.imul(ah4, bl0)) | 0; -1 2994 hi = Math.imul(ah4, bh0); -1 2995 lo = (lo + Math.imul(al3, bl1)) | 0; -1 2996 mid = (mid + Math.imul(al3, bh1)) | 0; -1 2997 mid = (mid + Math.imul(ah3, bl1)) | 0; -1 2998 hi = (hi + Math.imul(ah3, bh1)) | 0; -1 2999 lo = (lo + Math.imul(al2, bl2)) | 0; -1 3000 mid = (mid + Math.imul(al2, bh2)) | 0; -1 3001 mid = (mid + Math.imul(ah2, bl2)) | 0; -1 3002 hi = (hi + Math.imul(ah2, bh2)) | 0; -1 3003 lo = (lo + Math.imul(al1, bl3)) | 0; -1 3004 mid = (mid + Math.imul(al1, bh3)) | 0; -1 3005 mid = (mid + Math.imul(ah1, bl3)) | 0; -1 3006 hi = (hi + Math.imul(ah1, bh3)) | 0; -1 3007 lo = (lo + Math.imul(al0, bl4)) | 0; -1 3008 mid = (mid + Math.imul(al0, bh4)) | 0; -1 3009 mid = (mid + Math.imul(ah0, bl4)) | 0; -1 3010 hi = (hi + Math.imul(ah0, bh4)) | 0; -1 3011 var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3012 c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; -1 3013 w4 &= 0x3ffffff; -1 3014 /* k = 5 */ -1 3015 lo = Math.imul(al5, bl0); -1 3016 mid = Math.imul(al5, bh0); -1 3017 mid = (mid + Math.imul(ah5, bl0)) | 0; -1 3018 hi = Math.imul(ah5, bh0); -1 3019 lo = (lo + Math.imul(al4, bl1)) | 0; -1 3020 mid = (mid + Math.imul(al4, bh1)) | 0; -1 3021 mid = (mid + Math.imul(ah4, bl1)) | 0; -1 3022 hi = (hi + Math.imul(ah4, bh1)) | 0; -1 3023 lo = (lo + Math.imul(al3, bl2)) | 0; -1 3024 mid = (mid + Math.imul(al3, bh2)) | 0; -1 3025 mid = (mid + Math.imul(ah3, bl2)) | 0; -1 3026 hi = (hi + Math.imul(ah3, bh2)) | 0; -1 3027 lo = (lo + Math.imul(al2, bl3)) | 0; -1 3028 mid = (mid + Math.imul(al2, bh3)) | 0; -1 3029 mid = (mid + Math.imul(ah2, bl3)) | 0; -1 3030 hi = (hi + Math.imul(ah2, bh3)) | 0; -1 3031 lo = (lo + Math.imul(al1, bl4)) | 0; -1 3032 mid = (mid + Math.imul(al1, bh4)) | 0; -1 3033 mid = (mid + Math.imul(ah1, bl4)) | 0; -1 3034 hi = (hi + Math.imul(ah1, bh4)) | 0; -1 3035 lo = (lo + Math.imul(al0, bl5)) | 0; -1 3036 mid = (mid + Math.imul(al0, bh5)) | 0; -1 3037 mid = (mid + Math.imul(ah0, bl5)) | 0; -1 3038 hi = (hi + Math.imul(ah0, bh5)) | 0; -1 3039 var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3040 c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; -1 3041 w5 &= 0x3ffffff; -1 3042 /* k = 6 */ -1 3043 lo = Math.imul(al6, bl0); -1 3044 mid = Math.imul(al6, bh0); -1 3045 mid = (mid + Math.imul(ah6, bl0)) | 0; -1 3046 hi = Math.imul(ah6, bh0); -1 3047 lo = (lo + Math.imul(al5, bl1)) | 0; -1 3048 mid = (mid + Math.imul(al5, bh1)) | 0; -1 3049 mid = (mid + Math.imul(ah5, bl1)) | 0; -1 3050 hi = (hi + Math.imul(ah5, bh1)) | 0; -1 3051 lo = (lo + Math.imul(al4, bl2)) | 0; -1 3052 mid = (mid + Math.imul(al4, bh2)) | 0; -1 3053 mid = (mid + Math.imul(ah4, bl2)) | 0; -1 3054 hi = (hi + Math.imul(ah4, bh2)) | 0; -1 3055 lo = (lo + Math.imul(al3, bl3)) | 0; -1 3056 mid = (mid + Math.imul(al3, bh3)) | 0; -1 3057 mid = (mid + Math.imul(ah3, bl3)) | 0; -1 3058 hi = (hi + Math.imul(ah3, bh3)) | 0; -1 3059 lo = (lo + Math.imul(al2, bl4)) | 0; -1 3060 mid = (mid + Math.imul(al2, bh4)) | 0; -1 3061 mid = (mid + Math.imul(ah2, bl4)) | 0; -1 3062 hi = (hi + Math.imul(ah2, bh4)) | 0; -1 3063 lo = (lo + Math.imul(al1, bl5)) | 0; -1 3064 mid = (mid + Math.imul(al1, bh5)) | 0; -1 3065 mid = (mid + Math.imul(ah1, bl5)) | 0; -1 3066 hi = (hi + Math.imul(ah1, bh5)) | 0; -1 3067 lo = (lo + Math.imul(al0, bl6)) | 0; -1 3068 mid = (mid + Math.imul(al0, bh6)) | 0; -1 3069 mid = (mid + Math.imul(ah0, bl6)) | 0; -1 3070 hi = (hi + Math.imul(ah0, bh6)) | 0; -1 3071 var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3072 c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; -1 3073 w6 &= 0x3ffffff; -1 3074 /* k = 7 */ -1 3075 lo = Math.imul(al7, bl0); -1 3076 mid = Math.imul(al7, bh0); -1 3077 mid = (mid + Math.imul(ah7, bl0)) | 0; -1 3078 hi = Math.imul(ah7, bh0); -1 3079 lo = (lo + Math.imul(al6, bl1)) | 0; -1 3080 mid = (mid + Math.imul(al6, bh1)) | 0; -1 3081 mid = (mid + Math.imul(ah6, bl1)) | 0; -1 3082 hi = (hi + Math.imul(ah6, bh1)) | 0; -1 3083 lo = (lo + Math.imul(al5, bl2)) | 0; -1 3084 mid = (mid + Math.imul(al5, bh2)) | 0; -1 3085 mid = (mid + Math.imul(ah5, bl2)) | 0; -1 3086 hi = (hi + Math.imul(ah5, bh2)) | 0; -1 3087 lo = (lo + Math.imul(al4, bl3)) | 0; -1 3088 mid = (mid + Math.imul(al4, bh3)) | 0; -1 3089 mid = (mid + Math.imul(ah4, bl3)) | 0; -1 3090 hi = (hi + Math.imul(ah4, bh3)) | 0; -1 3091 lo = (lo + Math.imul(al3, bl4)) | 0; -1 3092 mid = (mid + Math.imul(al3, bh4)) | 0; -1 3093 mid = (mid + Math.imul(ah3, bl4)) | 0; -1 3094 hi = (hi + Math.imul(ah3, bh4)) | 0; -1 3095 lo = (lo + Math.imul(al2, bl5)) | 0; -1 3096 mid = (mid + Math.imul(al2, bh5)) | 0; -1 3097 mid = (mid + Math.imul(ah2, bl5)) | 0; -1 3098 hi = (hi + Math.imul(ah2, bh5)) | 0; -1 3099 lo = (lo + Math.imul(al1, bl6)) | 0; -1 3100 mid = (mid + Math.imul(al1, bh6)) | 0; -1 3101 mid = (mid + Math.imul(ah1, bl6)) | 0; -1 3102 hi = (hi + Math.imul(ah1, bh6)) | 0; -1 3103 lo = (lo + Math.imul(al0, bl7)) | 0; -1 3104 mid = (mid + Math.imul(al0, bh7)) | 0; -1 3105 mid = (mid + Math.imul(ah0, bl7)) | 0; -1 3106 hi = (hi + Math.imul(ah0, bh7)) | 0; -1 3107 var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3108 c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; -1 3109 w7 &= 0x3ffffff; -1 3110 /* k = 8 */ -1 3111 lo = Math.imul(al8, bl0); -1 3112 mid = Math.imul(al8, bh0); -1 3113 mid = (mid + Math.imul(ah8, bl0)) | 0; -1 3114 hi = Math.imul(ah8, bh0); -1 3115 lo = (lo + Math.imul(al7, bl1)) | 0; -1 3116 mid = (mid + Math.imul(al7, bh1)) | 0; -1 3117 mid = (mid + Math.imul(ah7, bl1)) | 0; -1 3118 hi = (hi + Math.imul(ah7, bh1)) | 0; -1 3119 lo = (lo + Math.imul(al6, bl2)) | 0; -1 3120 mid = (mid + Math.imul(al6, bh2)) | 0; -1 3121 mid = (mid + Math.imul(ah6, bl2)) | 0; -1 3122 hi = (hi + Math.imul(ah6, bh2)) | 0; -1 3123 lo = (lo + Math.imul(al5, bl3)) | 0; -1 3124 mid = (mid + Math.imul(al5, bh3)) | 0; -1 3125 mid = (mid + Math.imul(ah5, bl3)) | 0; -1 3126 hi = (hi + Math.imul(ah5, bh3)) | 0; -1 3127 lo = (lo + Math.imul(al4, bl4)) | 0; -1 3128 mid = (mid + Math.imul(al4, bh4)) | 0; -1 3129 mid = (mid + Math.imul(ah4, bl4)) | 0; -1 3130 hi = (hi + Math.imul(ah4, bh4)) | 0; -1 3131 lo = (lo + Math.imul(al3, bl5)) | 0; -1 3132 mid = (mid + Math.imul(al3, bh5)) | 0; -1 3133 mid = (mid + Math.imul(ah3, bl5)) | 0; -1 3134 hi = (hi + Math.imul(ah3, bh5)) | 0; -1 3135 lo = (lo + Math.imul(al2, bl6)) | 0; -1 3136 mid = (mid + Math.imul(al2, bh6)) | 0; -1 3137 mid = (mid + Math.imul(ah2, bl6)) | 0; -1 3138 hi = (hi + Math.imul(ah2, bh6)) | 0; -1 3139 lo = (lo + Math.imul(al1, bl7)) | 0; -1 3140 mid = (mid + Math.imul(al1, bh7)) | 0; -1 3141 mid = (mid + Math.imul(ah1, bl7)) | 0; -1 3142 hi = (hi + Math.imul(ah1, bh7)) | 0; -1 3143 lo = (lo + Math.imul(al0, bl8)) | 0; -1 3144 mid = (mid + Math.imul(al0, bh8)) | 0; -1 3145 mid = (mid + Math.imul(ah0, bl8)) | 0; -1 3146 hi = (hi + Math.imul(ah0, bh8)) | 0; -1 3147 var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3148 c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; -1 3149 w8 &= 0x3ffffff; -1 3150 /* k = 9 */ -1 3151 lo = Math.imul(al9, bl0); -1 3152 mid = Math.imul(al9, bh0); -1 3153 mid = (mid + Math.imul(ah9, bl0)) | 0; -1 3154 hi = Math.imul(ah9, bh0); -1 3155 lo = (lo + Math.imul(al8, bl1)) | 0; -1 3156 mid = (mid + Math.imul(al8, bh1)) | 0; -1 3157 mid = (mid + Math.imul(ah8, bl1)) | 0; -1 3158 hi = (hi + Math.imul(ah8, bh1)) | 0; -1 3159 lo = (lo + Math.imul(al7, bl2)) | 0; -1 3160 mid = (mid + Math.imul(al7, bh2)) | 0; -1 3161 mid = (mid + Math.imul(ah7, bl2)) | 0; -1 3162 hi = (hi + Math.imul(ah7, bh2)) | 0; -1 3163 lo = (lo + Math.imul(al6, bl3)) | 0; -1 3164 mid = (mid + Math.imul(al6, bh3)) | 0; -1 3165 mid = (mid + Math.imul(ah6, bl3)) | 0; -1 3166 hi = (hi + Math.imul(ah6, bh3)) | 0; -1 3167 lo = (lo + Math.imul(al5, bl4)) | 0; -1 3168 mid = (mid + Math.imul(al5, bh4)) | 0; -1 3169 mid = (mid + Math.imul(ah5, bl4)) | 0; -1 3170 hi = (hi + Math.imul(ah5, bh4)) | 0; -1 3171 lo = (lo + Math.imul(al4, bl5)) | 0; -1 3172 mid = (mid + Math.imul(al4, bh5)) | 0; -1 3173 mid = (mid + Math.imul(ah4, bl5)) | 0; -1 3174 hi = (hi + Math.imul(ah4, bh5)) | 0; -1 3175 lo = (lo + Math.imul(al3, bl6)) | 0; -1 3176 mid = (mid + Math.imul(al3, bh6)) | 0; -1 3177 mid = (mid + Math.imul(ah3, bl6)) | 0; -1 3178 hi = (hi + Math.imul(ah3, bh6)) | 0; -1 3179 lo = (lo + Math.imul(al2, bl7)) | 0; -1 3180 mid = (mid + Math.imul(al2, bh7)) | 0; -1 3181 mid = (mid + Math.imul(ah2, bl7)) | 0; -1 3182 hi = (hi + Math.imul(ah2, bh7)) | 0; -1 3183 lo = (lo + Math.imul(al1, bl8)) | 0; -1 3184 mid = (mid + Math.imul(al1, bh8)) | 0; -1 3185 mid = (mid + Math.imul(ah1, bl8)) | 0; -1 3186 hi = (hi + Math.imul(ah1, bh8)) | 0; -1 3187 lo = (lo + Math.imul(al0, bl9)) | 0; -1 3188 mid = (mid + Math.imul(al0, bh9)) | 0; -1 3189 mid = (mid + Math.imul(ah0, bl9)) | 0; -1 3190 hi = (hi + Math.imul(ah0, bh9)) | 0; -1 3191 var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3192 c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; -1 3193 w9 &= 0x3ffffff; -1 3194 /* k = 10 */ -1 3195 lo = Math.imul(al9, bl1); -1 3196 mid = Math.imul(al9, bh1); -1 3197 mid = (mid + Math.imul(ah9, bl1)) | 0; -1 3198 hi = Math.imul(ah9, bh1); -1 3199 lo = (lo + Math.imul(al8, bl2)) | 0; -1 3200 mid = (mid + Math.imul(al8, bh2)) | 0; -1 3201 mid = (mid + Math.imul(ah8, bl2)) | 0; -1 3202 hi = (hi + Math.imul(ah8, bh2)) | 0; -1 3203 lo = (lo + Math.imul(al7, bl3)) | 0; -1 3204 mid = (mid + Math.imul(al7, bh3)) | 0; -1 3205 mid = (mid + Math.imul(ah7, bl3)) | 0; -1 3206 hi = (hi + Math.imul(ah7, bh3)) | 0; -1 3207 lo = (lo + Math.imul(al6, bl4)) | 0; -1 3208 mid = (mid + Math.imul(al6, bh4)) | 0; -1 3209 mid = (mid + Math.imul(ah6, bl4)) | 0; -1 3210 hi = (hi + Math.imul(ah6, bh4)) | 0; -1 3211 lo = (lo + Math.imul(al5, bl5)) | 0; -1 3212 mid = (mid + Math.imul(al5, bh5)) | 0; -1 3213 mid = (mid + Math.imul(ah5, bl5)) | 0; -1 3214 hi = (hi + Math.imul(ah5, bh5)) | 0; -1 3215 lo = (lo + Math.imul(al4, bl6)) | 0; -1 3216 mid = (mid + Math.imul(al4, bh6)) | 0; -1 3217 mid = (mid + Math.imul(ah4, bl6)) | 0; -1 3218 hi = (hi + Math.imul(ah4, bh6)) | 0; -1 3219 lo = (lo + Math.imul(al3, bl7)) | 0; -1 3220 mid = (mid + Math.imul(al3, bh7)) | 0; -1 3221 mid = (mid + Math.imul(ah3, bl7)) | 0; -1 3222 hi = (hi + Math.imul(ah3, bh7)) | 0; -1 3223 lo = (lo + Math.imul(al2, bl8)) | 0; -1 3224 mid = (mid + Math.imul(al2, bh8)) | 0; -1 3225 mid = (mid + Math.imul(ah2, bl8)) | 0; -1 3226 hi = (hi + Math.imul(ah2, bh8)) | 0; -1 3227 lo = (lo + Math.imul(al1, bl9)) | 0; -1 3228 mid = (mid + Math.imul(al1, bh9)) | 0; -1 3229 mid = (mid + Math.imul(ah1, bl9)) | 0; -1 3230 hi = (hi + Math.imul(ah1, bh9)) | 0; -1 3231 var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3232 c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; -1 3233 w10 &= 0x3ffffff; -1 3234 /* k = 11 */ -1 3235 lo = Math.imul(al9, bl2); -1 3236 mid = Math.imul(al9, bh2); -1 3237 mid = (mid + Math.imul(ah9, bl2)) | 0; -1 3238 hi = Math.imul(ah9, bh2); -1 3239 lo = (lo + Math.imul(al8, bl3)) | 0; -1 3240 mid = (mid + Math.imul(al8, bh3)) | 0; -1 3241 mid = (mid + Math.imul(ah8, bl3)) | 0; -1 3242 hi = (hi + Math.imul(ah8, bh3)) | 0; -1 3243 lo = (lo + Math.imul(al7, bl4)) | 0; -1 3244 mid = (mid + Math.imul(al7, bh4)) | 0; -1 3245 mid = (mid + Math.imul(ah7, bl4)) | 0; -1 3246 hi = (hi + Math.imul(ah7, bh4)) | 0; -1 3247 lo = (lo + Math.imul(al6, bl5)) | 0; -1 3248 mid = (mid + Math.imul(al6, bh5)) | 0; -1 3249 mid = (mid + Math.imul(ah6, bl5)) | 0; -1 3250 hi = (hi + Math.imul(ah6, bh5)) | 0; -1 3251 lo = (lo + Math.imul(al5, bl6)) | 0; -1 3252 mid = (mid + Math.imul(al5, bh6)) | 0; -1 3253 mid = (mid + Math.imul(ah5, bl6)) | 0; -1 3254 hi = (hi + Math.imul(ah5, bh6)) | 0; -1 3255 lo = (lo + Math.imul(al4, bl7)) | 0; -1 3256 mid = (mid + Math.imul(al4, bh7)) | 0; -1 3257 mid = (mid + Math.imul(ah4, bl7)) | 0; -1 3258 hi = (hi + Math.imul(ah4, bh7)) | 0; -1 3259 lo = (lo + Math.imul(al3, bl8)) | 0; -1 3260 mid = (mid + Math.imul(al3, bh8)) | 0; -1 3261 mid = (mid + Math.imul(ah3, bl8)) | 0; -1 3262 hi = (hi + Math.imul(ah3, bh8)) | 0; -1 3263 lo = (lo + Math.imul(al2, bl9)) | 0; -1 3264 mid = (mid + Math.imul(al2, bh9)) | 0; -1 3265 mid = (mid + Math.imul(ah2, bl9)) | 0; -1 3266 hi = (hi + Math.imul(ah2, bh9)) | 0; -1 3267 var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3268 c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; -1 3269 w11 &= 0x3ffffff; -1 3270 /* k = 12 */ -1 3271 lo = Math.imul(al9, bl3); -1 3272 mid = Math.imul(al9, bh3); -1 3273 mid = (mid + Math.imul(ah9, bl3)) | 0; -1 3274 hi = Math.imul(ah9, bh3); -1 3275 lo = (lo + Math.imul(al8, bl4)) | 0; -1 3276 mid = (mid + Math.imul(al8, bh4)) | 0; -1 3277 mid = (mid + Math.imul(ah8, bl4)) | 0; -1 3278 hi = (hi + Math.imul(ah8, bh4)) | 0; -1 3279 lo = (lo + Math.imul(al7, bl5)) | 0; -1 3280 mid = (mid + Math.imul(al7, bh5)) | 0; -1 3281 mid = (mid + Math.imul(ah7, bl5)) | 0; -1 3282 hi = (hi + Math.imul(ah7, bh5)) | 0; -1 3283 lo = (lo + Math.imul(al6, bl6)) | 0; -1 3284 mid = (mid + Math.imul(al6, bh6)) | 0; -1 3285 mid = (mid + Math.imul(ah6, bl6)) | 0; -1 3286 hi = (hi + Math.imul(ah6, bh6)) | 0; -1 3287 lo = (lo + Math.imul(al5, bl7)) | 0; -1 3288 mid = (mid + Math.imul(al5, bh7)) | 0; -1 3289 mid = (mid + Math.imul(ah5, bl7)) | 0; -1 3290 hi = (hi + Math.imul(ah5, bh7)) | 0; -1 3291 lo = (lo + Math.imul(al4, bl8)) | 0; -1 3292 mid = (mid + Math.imul(al4, bh8)) | 0; -1 3293 mid = (mid + Math.imul(ah4, bl8)) | 0; -1 3294 hi = (hi + Math.imul(ah4, bh8)) | 0; -1 3295 lo = (lo + Math.imul(al3, bl9)) | 0; -1 3296 mid = (mid + Math.imul(al3, bh9)) | 0; -1 3297 mid = (mid + Math.imul(ah3, bl9)) | 0; -1 3298 hi = (hi + Math.imul(ah3, bh9)) | 0; -1 3299 var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3300 c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; -1 3301 w12 &= 0x3ffffff; -1 3302 /* k = 13 */ -1 3303 lo = Math.imul(al9, bl4); -1 3304 mid = Math.imul(al9, bh4); -1 3305 mid = (mid + Math.imul(ah9, bl4)) | 0; -1 3306 hi = Math.imul(ah9, bh4); -1 3307 lo = (lo + Math.imul(al8, bl5)) | 0; -1 3308 mid = (mid + Math.imul(al8, bh5)) | 0; -1 3309 mid = (mid + Math.imul(ah8, bl5)) | 0; -1 3310 hi = (hi + Math.imul(ah8, bh5)) | 0; -1 3311 lo = (lo + Math.imul(al7, bl6)) | 0; -1 3312 mid = (mid + Math.imul(al7, bh6)) | 0; -1 3313 mid = (mid + Math.imul(ah7, bl6)) | 0; -1 3314 hi = (hi + Math.imul(ah7, bh6)) | 0; -1 3315 lo = (lo + Math.imul(al6, bl7)) | 0; -1 3316 mid = (mid + Math.imul(al6, bh7)) | 0; -1 3317 mid = (mid + Math.imul(ah6, bl7)) | 0; -1 3318 hi = (hi + Math.imul(ah6, bh7)) | 0; -1 3319 lo = (lo + Math.imul(al5, bl8)) | 0; -1 3320 mid = (mid + Math.imul(al5, bh8)) | 0; -1 3321 mid = (mid + Math.imul(ah5, bl8)) | 0; -1 3322 hi = (hi + Math.imul(ah5, bh8)) | 0; -1 3323 lo = (lo + Math.imul(al4, bl9)) | 0; -1 3324 mid = (mid + Math.imul(al4, bh9)) | 0; -1 3325 mid = (mid + Math.imul(ah4, bl9)) | 0; -1 3326 hi = (hi + Math.imul(ah4, bh9)) | 0; -1 3327 var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3328 c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; -1 3329 w13 &= 0x3ffffff; -1 3330 /* k = 14 */ -1 3331 lo = Math.imul(al9, bl5); -1 3332 mid = Math.imul(al9, bh5); -1 3333 mid = (mid + Math.imul(ah9, bl5)) | 0; -1 3334 hi = Math.imul(ah9, bh5); -1 3335 lo = (lo + Math.imul(al8, bl6)) | 0; -1 3336 mid = (mid + Math.imul(al8, bh6)) | 0; -1 3337 mid = (mid + Math.imul(ah8, bl6)) | 0; -1 3338 hi = (hi + Math.imul(ah8, bh6)) | 0; -1 3339 lo = (lo + Math.imul(al7, bl7)) | 0; -1 3340 mid = (mid + Math.imul(al7, bh7)) | 0; -1 3341 mid = (mid + Math.imul(ah7, bl7)) | 0; -1 3342 hi = (hi + Math.imul(ah7, bh7)) | 0; -1 3343 lo = (lo + Math.imul(al6, bl8)) | 0; -1 3344 mid = (mid + Math.imul(al6, bh8)) | 0; -1 3345 mid = (mid + Math.imul(ah6, bl8)) | 0; -1 3346 hi = (hi + Math.imul(ah6, bh8)) | 0; -1 3347 lo = (lo + Math.imul(al5, bl9)) | 0; -1 3348 mid = (mid + Math.imul(al5, bh9)) | 0; -1 3349 mid = (mid + Math.imul(ah5, bl9)) | 0; -1 3350 hi = (hi + Math.imul(ah5, bh9)) | 0; -1 3351 var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3352 c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; -1 3353 w14 &= 0x3ffffff; -1 3354 /* k = 15 */ -1 3355 lo = Math.imul(al9, bl6); -1 3356 mid = Math.imul(al9, bh6); -1 3357 mid = (mid + Math.imul(ah9, bl6)) | 0; -1 3358 hi = Math.imul(ah9, bh6); -1 3359 lo = (lo + Math.imul(al8, bl7)) | 0; -1 3360 mid = (mid + Math.imul(al8, bh7)) | 0; -1 3361 mid = (mid + Math.imul(ah8, bl7)) | 0; -1 3362 hi = (hi + Math.imul(ah8, bh7)) | 0; -1 3363 lo = (lo + Math.imul(al7, bl8)) | 0; -1 3364 mid = (mid + Math.imul(al7, bh8)) | 0; -1 3365 mid = (mid + Math.imul(ah7, bl8)) | 0; -1 3366 hi = (hi + Math.imul(ah7, bh8)) | 0; -1 3367 lo = (lo + Math.imul(al6, bl9)) | 0; -1 3368 mid = (mid + Math.imul(al6, bh9)) | 0; -1 3369 mid = (mid + Math.imul(ah6, bl9)) | 0; -1 3370 hi = (hi + Math.imul(ah6, bh9)) | 0; -1 3371 var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3372 c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; -1 3373 w15 &= 0x3ffffff; -1 3374 /* k = 16 */ -1 3375 lo = Math.imul(al9, bl7); -1 3376 mid = Math.imul(al9, bh7); -1 3377 mid = (mid + Math.imul(ah9, bl7)) | 0; -1 3378 hi = Math.imul(ah9, bh7); -1 3379 lo = (lo + Math.imul(al8, bl8)) | 0; -1 3380 mid = (mid + Math.imul(al8, bh8)) | 0; -1 3381 mid = (mid + Math.imul(ah8, bl8)) | 0; -1 3382 hi = (hi + Math.imul(ah8, bh8)) | 0; -1 3383 lo = (lo + Math.imul(al7, bl9)) | 0; -1 3384 mid = (mid + Math.imul(al7, bh9)) | 0; -1 3385 mid = (mid + Math.imul(ah7, bl9)) | 0; -1 3386 hi = (hi + Math.imul(ah7, bh9)) | 0; -1 3387 var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3388 c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; -1 3389 w16 &= 0x3ffffff; -1 3390 /* k = 17 */ -1 3391 lo = Math.imul(al9, bl8); -1 3392 mid = Math.imul(al9, bh8); -1 3393 mid = (mid + Math.imul(ah9, bl8)) | 0; -1 3394 hi = Math.imul(ah9, bh8); -1 3395 lo = (lo + Math.imul(al8, bl9)) | 0; -1 3396 mid = (mid + Math.imul(al8, bh9)) | 0; -1 3397 mid = (mid + Math.imul(ah8, bl9)) | 0; -1 3398 hi = (hi + Math.imul(ah8, bh9)) | 0; -1 3399 var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3400 c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; -1 3401 w17 &= 0x3ffffff; -1 3402 /* k = 18 */ -1 3403 lo = Math.imul(al9, bl9); -1 3404 mid = Math.imul(al9, bh9); -1 3405 mid = (mid + Math.imul(ah9, bl9)) | 0; -1 3406 hi = Math.imul(ah9, bh9); -1 3407 var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 3408 c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; -1 3409 w18 &= 0x3ffffff; -1 3410 o[0] = w0; -1 3411 o[1] = w1; -1 3412 o[2] = w2; -1 3413 o[3] = w3; -1 3414 o[4] = w4; -1 3415 o[5] = w5; -1 3416 o[6] = w6; -1 3417 o[7] = w7; -1 3418 o[8] = w8; -1 3419 o[9] = w9; -1 3420 o[10] = w10; -1 3421 o[11] = w11; -1 3422 o[12] = w12; -1 3423 o[13] = w13; -1 3424 o[14] = w14; -1 3425 o[15] = w15; -1 3426 o[16] = w16; -1 3427 o[17] = w17; -1 3428 o[18] = w18; -1 3429 if (c !== 0) { -1 3430 o[19] = c; -1 3431 out.length++; -1 3432 } -1 3433 return out; -1 3434 }; -1 3435 -1 3436 // Polyfill comb -1 3437 if (!Math.imul) { -1 3438 comb10MulTo = smallMulTo; -1 3439 } -1 3440 -1 3441 function bigMulTo (self, num, out) { -1 3442 out.negative = num.negative ^ self.negative; -1 3443 out.length = self.length + num.length; -1 3444 -1 3445 var carry = 0; -1 3446 var hncarry = 0; -1 3447 for (var k = 0; k < out.length - 1; k++) { -1 3448 // Sum all words with the same `i + j = k` and accumulate `ncarry`, -1 3449 // note that ncarry could be >= 0x3ffffff -1 3450 var ncarry = hncarry; -1 3451 hncarry = 0; -1 3452 var rword = carry & 0x3ffffff; -1 3453 var maxJ = Math.min(k, num.length - 1); -1 3454 for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { -1 3455 var i = k - j; -1 3456 var a = self.words[i] | 0; -1 3457 var b = num.words[j] | 0; -1 3458 var r = a * b; -1 3459 -1 3460 var lo = r & 0x3ffffff; -1 3461 ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; -1 3462 lo = (lo + rword) | 0; -1 3463 rword = lo & 0x3ffffff; -1 3464 ncarry = (ncarry + (lo >>> 26)) | 0; -1 3465 -1 3466 hncarry += ncarry >>> 26; -1 3467 ncarry &= 0x3ffffff; -1 3468 } -1 3469 out.words[k] = rword; -1 3470 carry = ncarry; -1 3471 ncarry = hncarry; -1 3472 } -1 3473 if (carry !== 0) { -1 3474 out.words[k] = carry; -1 3475 } else { -1 3476 out.length--; -1 3477 } -1 3478 -1 3479 return out.strip(); -1 3480 } -1 3481 -1 3482 function jumboMulTo (self, num, out) { -1 3483 var fftm = new FFTM(); -1 3484 return fftm.mulp(self, num, out); -1 3485 } -1 3486 -1 3487 BN.prototype.mulTo = function mulTo (num, out) { -1 3488 var res; -1 3489 var len = this.length + num.length; -1 3490 if (this.length === 10 && num.length === 10) { -1 3491 res = comb10MulTo(this, num, out); -1 3492 } else if (len < 63) { -1 3493 res = smallMulTo(this, num, out); -1 3494 } else if (len < 1024) { -1 3495 res = bigMulTo(this, num, out); -1 3496 } else { -1 3497 res = jumboMulTo(this, num, out); -1 3498 } -1 3499 -1 3500 return res; -1 3501 }; -1 3502 -1 3503 // Cooley-Tukey algorithm for FFT -1 3504 // slightly revisited to rely on looping instead of recursion -1 3505 -1 3506 function FFTM (x, y) { -1 3507 this.x = x; -1 3508 this.y = y; -1 3509 } -1 3510 -1 3511 FFTM.prototype.makeRBT = function makeRBT (N) { -1 3512 var t = new Array(N); -1 3513 var l = BN.prototype._countBits(N) - 1; -1 3514 for (var i = 0; i < N; i++) { -1 3515 t[i] = this.revBin(i, l, N); -1 3516 } -1 3517 -1 3518 return t; -1 3519 }; -1 3520 -1 3521 // Returns binary-reversed representation of `x` -1 3522 FFTM.prototype.revBin = function revBin (x, l, N) { -1 3523 if (x === 0 || x === N - 1) return x; -1 3524 -1 3525 var rb = 0; -1 3526 for (var i = 0; i < l; i++) { -1 3527 rb |= (x & 1) << (l - i - 1); -1 3528 x >>= 1; -1 3529 } -1 3530 -1 3531 return rb; -1 3532 }; -1 3533 -1 3534 // Performs "tweedling" phase, therefore 'emulating' -1 3535 // behaviour of the recursive algorithm -1 3536 FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { -1 3537 for (var i = 0; i < N; i++) { -1 3538 rtws[i] = rws[rbt[i]]; -1 3539 itws[i] = iws[rbt[i]]; -1 3540 } -1 3541 }; -1 3542 -1 3543 FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { -1 3544 this.permute(rbt, rws, iws, rtws, itws, N); -1 3545 -1 3546 for (var s = 1; s < N; s <<= 1) { -1 3547 var l = s << 1; -1 3548 -1 3549 var rtwdf = Math.cos(2 * Math.PI / l); -1 3550 var itwdf = Math.sin(2 * Math.PI / l); -1 3551 -1 3552 for (var p = 0; p < N; p += l) { -1 3553 var rtwdf_ = rtwdf; -1 3554 var itwdf_ = itwdf; -1 3555 -1 3556 for (var j = 0; j < s; j++) { -1 3557 var re = rtws[p + j]; -1 3558 var ie = itws[p + j]; -1 3559 -1 3560 var ro = rtws[p + j + s]; -1 3561 var io = itws[p + j + s]; -1 3562 -1 3563 var rx = rtwdf_ * ro - itwdf_ * io; -1 3564 -1 3565 io = rtwdf_ * io + itwdf_ * ro; -1 3566 ro = rx; -1 3567 -1 3568 rtws[p + j] = re + ro; -1 3569 itws[p + j] = ie + io; -1 3570 -1 3571 rtws[p + j + s] = re - ro; -1 3572 itws[p + j + s] = ie - io; -1 3573 -1 3574 /* jshint maxdepth : false */ -1 3575 if (j !== l) { -1 3576 rx = rtwdf * rtwdf_ - itwdf * itwdf_; -1 3577 -1 3578 itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; -1 3579 rtwdf_ = rx; -1 3580 } -1 3581 } -1 3582 } -1 3583 } -1 3584 }; -1 3585 -1 3586 FFTM.prototype.guessLen13b = function guessLen13b (n, m) { -1 3587 var N = Math.max(m, n) | 1; -1 3588 var odd = N & 1; -1 3589 var i = 0; -1 3590 for (N = N / 2 | 0; N; N = N >>> 1) { -1 3591 i++; -1 3592 } -1 3593 -1 3594 return 1 << i + 1 + odd; -1 3595 }; -1 3596 -1 3597 FFTM.prototype.conjugate = function conjugate (rws, iws, N) { -1 3598 if (N <= 1) return; -1 3599 -1 3600 for (var i = 0; i < N / 2; i++) { -1 3601 var t = rws[i]; -1 3602 -1 3603 rws[i] = rws[N - i - 1]; -1 3604 rws[N - i - 1] = t; -1 3605 -1 3606 t = iws[i]; -1 3607 -1 3608 iws[i] = -iws[N - i - 1]; -1 3609 iws[N - i - 1] = -t; -1 3610 } -1 3611 }; -1 3612 -1 3613 FFTM.prototype.normalize13b = function normalize13b (ws, N) { -1 3614 var carry = 0; -1 3615 for (var i = 0; i < N / 2; i++) { -1 3616 var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + -1 3617 Math.round(ws[2 * i] / N) + -1 3618 carry; -1 3619 -1 3620 ws[i] = w & 0x3ffffff; -1 3621 -1 3622 if (w < 0x4000000) { -1 3623 carry = 0; -1 3624 } else { -1 3625 carry = w / 0x4000000 | 0; -1 3626 } -1 3627 } -1 3628 -1 3629 return ws; -1 3630 }; -1 3631 -1 3632 FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { -1 3633 var carry = 0; -1 3634 for (var i = 0; i < len; i++) { -1 3635 carry = carry + (ws[i] | 0); -1 3636 -1 3637 rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; -1 3638 rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; -1 3639 } -1 3640 -1 3641 // Pad with zeroes -1 3642 for (i = 2 * len; i < N; ++i) { -1 3643 rws[i] = 0; -1 3644 } -1 3645 -1 3646 assert(carry === 0); -1 3647 assert((carry & ~0x1fff) === 0); -1 3648 }; -1 3649 -1 3650 FFTM.prototype.stub = function stub (N) { -1 3651 var ph = new Array(N); -1 3652 for (var i = 0; i < N; i++) { -1 3653 ph[i] = 0; -1 3654 } -1 3655 -1 3656 return ph; -1 3657 }; -1 3658 -1 3659 FFTM.prototype.mulp = function mulp (x, y, out) { -1 3660 var N = 2 * this.guessLen13b(x.length, y.length); -1 3661 -1 3662 var rbt = this.makeRBT(N); -1 3663 -1 3664 var _ = this.stub(N); -1 3665 -1 3666 var rws = new Array(N); -1 3667 var rwst = new Array(N); -1 3668 var iwst = new Array(N); -1 3669 -1 3670 var nrws = new Array(N); -1 3671 var nrwst = new Array(N); -1 3672 var niwst = new Array(N); -1 3673 -1 3674 var rmws = out.words; -1 3675 rmws.length = N; -1 3676 -1 3677 this.convert13b(x.words, x.length, rws, N); -1 3678 this.convert13b(y.words, y.length, nrws, N); -1 3679 -1 3680 this.transform(rws, _, rwst, iwst, N, rbt); -1 3681 this.transform(nrws, _, nrwst, niwst, N, rbt); -1 3682 -1 3683 for (var i = 0; i < N; i++) { -1 3684 var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; -1 3685 iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; -1 3686 rwst[i] = rx; -1 3687 } -1 3688 -1 3689 this.conjugate(rwst, iwst, N); -1 3690 this.transform(rwst, iwst, rmws, _, N, rbt); -1 3691 this.conjugate(rmws, _, N); -1 3692 this.normalize13b(rmws, N); -1 3693 -1 3694 out.negative = x.negative ^ y.negative; -1 3695 out.length = x.length + y.length; -1 3696 return out.strip(); -1 3697 }; -1 3698 -1 3699 // Multiply `this` by `num` -1 3700 BN.prototype.mul = function mul (num) { -1 3701 var out = new BN(null); -1 3702 out.words = new Array(this.length + num.length); -1 3703 return this.mulTo(num, out); -1 3704 }; -1 3705 -1 3706 // Multiply employing FFT -1 3707 BN.prototype.mulf = function mulf (num) { -1 3708 var out = new BN(null); -1 3709 out.words = new Array(this.length + num.length); -1 3710 return jumboMulTo(this, num, out); -1 3711 }; -1 3712 -1 3713 // In-place Multiplication -1 3714 BN.prototype.imul = function imul (num) { -1 3715 return this.clone().mulTo(num, this); -1 3716 }; -1 3717 -1 3718 BN.prototype.imuln = function imuln (num) { -1 3719 assert(typeof num === 'number'); -1 3720 assert(num < 0x4000000); -1 3721 -1 3722 // Carry -1 3723 var carry = 0; -1 3724 for (var i = 0; i < this.length; i++) { -1 3725 var w = (this.words[i] | 0) * num; -1 3726 var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); -1 3727 carry >>= 26; -1 3728 carry += (w / 0x4000000) | 0; -1 3729 // NOTE: lo is 27bit maximum -1 3730 carry += lo >>> 26; -1 3731 this.words[i] = lo & 0x3ffffff; -1 3732 } -1 3733 -1 3734 if (carry !== 0) { -1 3735 this.words[i] = carry; -1 3736 this.length++; -1 3737 } -1 3738 -1 3739 return this; -1 3740 }; -1 3741 -1 3742 BN.prototype.muln = function muln (num) { -1 3743 return this.clone().imuln(num); -1 3744 }; -1 3745 -1 3746 // `this` * `this` -1 3747 BN.prototype.sqr = function sqr () { -1 3748 return this.mul(this); -1 3749 }; -1 3750 -1 3751 // `this` * `this` in-place -1 3752 BN.prototype.isqr = function isqr () { -1 3753 return this.imul(this.clone()); -1 3754 }; -1 3755 -1 3756 // Math.pow(`this`, `num`) -1 3757 BN.prototype.pow = function pow (num) { -1 3758 var w = toBitArray(num); -1 3759 if (w.length === 0) return new BN(1); -1 3760 -1 3761 // Skip leading zeroes -1 3762 var res = this; -1 3763 for (var i = 0; i < w.length; i++, res = res.sqr()) { -1 3764 if (w[i] !== 0) break; -1 3765 } -1 3766 -1 3767 if (++i < w.length) { -1 3768 for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { -1 3769 if (w[i] === 0) continue; -1 3770 -1 3771 res = res.mul(q); -1 3772 } -1 3773 } -1 3774 -1 3775 return res; -1 3776 }; -1 3777 -1 3778 // Shift-left in-place -1 3779 BN.prototype.iushln = function iushln (bits) { -1 3780 assert(typeof bits === 'number' && bits >= 0); -1 3781 var r = bits % 26; -1 3782 var s = (bits - r) / 26; -1 3783 var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); -1 3784 var i; -1 3785 -1 3786 if (r !== 0) { -1 3787 var carry = 0; -1 3788 -1 3789 for (i = 0; i < this.length; i++) { -1 3790 var newCarry = this.words[i] & carryMask; -1 3791 var c = ((this.words[i] | 0) - newCarry) << r; -1 3792 this.words[i] = c | carry; -1 3793 carry = newCarry >>> (26 - r); -1 3794 } -1 3795 -1 3796 if (carry) { -1 3797 this.words[i] = carry; -1 3798 this.length++; -1 3799 } -1 3800 } -1 3801 -1 3802 if (s !== 0) { -1 3803 for (i = this.length - 1; i >= 0; i--) { -1 3804 this.words[i + s] = this.words[i]; -1 3805 } -1 3806 -1 3807 for (i = 0; i < s; i++) { -1 3808 this.words[i] = 0; -1 3809 } -1 3810 -1 3811 this.length += s; -1 3812 } -1 3813 -1 3814 return this.strip(); -1 3815 }; -1 3816 -1 3817 BN.prototype.ishln = function ishln (bits) { -1 3818 // TODO(indutny): implement me -1 3819 assert(this.negative === 0); -1 3820 return this.iushln(bits); -1 3821 }; -1 3822 -1 3823 // Shift-right in-place -1 3824 // NOTE: `hint` is a lowest bit before trailing zeroes -1 3825 // NOTE: if `extended` is present - it will be filled with destroyed bits -1 3826 BN.prototype.iushrn = function iushrn (bits, hint, extended) { -1 3827 assert(typeof bits === 'number' && bits >= 0); -1 3828 var h; -1 3829 if (hint) { -1 3830 h = (hint - (hint % 26)) / 26; -1 3831 } else { -1 3832 h = 0; -1 3833 } -1 3834 -1 3835 var r = bits % 26; -1 3836 var s = Math.min((bits - r) / 26, this.length); -1 3837 var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); -1 3838 var maskedWords = extended; -1 3839 -1 3840 h -= s; -1 3841 h = Math.max(0, h); -1 3842 -1 3843 // Extended mode, copy masked part -1 3844 if (maskedWords) { -1 3845 for (var i = 0; i < s; i++) { -1 3846 maskedWords.words[i] = this.words[i]; -1 3847 } -1 3848 maskedWords.length = s; -1 3849 } -1 3850 -1 3851 if (s === 0) { -1 3852 // No-op, we should not move anything at all -1 3853 } else if (this.length > s) { -1 3854 this.length -= s; -1 3855 for (i = 0; i < this.length; i++) { -1 3856 this.words[i] = this.words[i + s]; -1 3857 } -1 3858 } else { -1 3859 this.words[0] = 0; -1 3860 this.length = 1; -1 3861 } -1 3862 -1 3863 var carry = 0; -1 3864 for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { -1 3865 var word = this.words[i] | 0; -1 3866 this.words[i] = (carry << (26 - r)) | (word >>> r); -1 3867 carry = word & mask; -1 3868 } -1 3869 -1 3870 // Push carried bits as a mask -1 3871 if (maskedWords && carry !== 0) { -1 3872 maskedWords.words[maskedWords.length++] = carry; -1 3873 } -1 3874 -1 3875 if (this.length === 0) { -1 3876 this.words[0] = 0; -1 3877 this.length = 1; -1 3878 } -1 3879 -1 3880 return this.strip(); -1 3881 }; -1 3882 -1 3883 BN.prototype.ishrn = function ishrn (bits, hint, extended) { -1 3884 // TODO(indutny): implement me -1 3885 assert(this.negative === 0); -1 3886 return this.iushrn(bits, hint, extended); -1 3887 }; -1 3888 -1 3889 // Shift-left -1 3890 BN.prototype.shln = function shln (bits) { -1 3891 return this.clone().ishln(bits); -1 3892 }; -1 3893 -1 3894 BN.prototype.ushln = function ushln (bits) { -1 3895 return this.clone().iushln(bits); -1 3896 }; -1 3897 -1 3898 // Shift-right -1 3899 BN.prototype.shrn = function shrn (bits) { -1 3900 return this.clone().ishrn(bits); -1 3901 }; -1 3902 -1 3903 BN.prototype.ushrn = function ushrn (bits) { -1 3904 return this.clone().iushrn(bits); -1 3905 }; -1 3906 -1 3907 // Test if n bit is set -1 3908 BN.prototype.testn = function testn (bit) { -1 3909 assert(typeof bit === 'number' && bit >= 0); -1 3910 var r = bit % 26; -1 3911 var s = (bit - r) / 26; -1 3912 var q = 1 << r; -1 3913 -1 3914 // Fast case: bit is much higher than all existing words -1 3915 if (this.length <= s) return false; -1 3916 -1 3917 // Check bit and return -1 3918 var w = this.words[s]; -1 3919 -1 3920 return !!(w & q); -1 3921 }; -1 3922 -1 3923 // Return only lowers bits of number (in-place) -1 3924 BN.prototype.imaskn = function imaskn (bits) { -1 3925 assert(typeof bits === 'number' && bits >= 0); -1 3926 var r = bits % 26; -1 3927 var s = (bits - r) / 26; -1 3928 -1 3929 assert(this.negative === 0, 'imaskn works only with positive numbers'); -1 3930 -1 3931 if (this.length <= s) { -1 3932 return this; -1 3933 } -1 3934 -1 3935 if (r !== 0) { -1 3936 s++; -1 3937 } -1 3938 this.length = Math.min(s, this.length); -1 3939 -1 3940 if (r !== 0) { -1 3941 var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); -1 3942 this.words[this.length - 1] &= mask; -1 3943 } -1 3944 -1 3945 return this.strip(); -1 3946 }; -1 3947 -1 3948 // Return only lowers bits of number -1 3949 BN.prototype.maskn = function maskn (bits) { -1 3950 return this.clone().imaskn(bits); -1 3951 }; -1 3952 -1 3953 // Add plain number `num` to `this` -1 3954 BN.prototype.iaddn = function iaddn (num) { -1 3955 assert(typeof num === 'number'); -1 3956 assert(num < 0x4000000); -1 3957 if (num < 0) return this.isubn(-num); -1 3958 -1 3959 // Possible sign change -1 3960 if (this.negative !== 0) { -1 3961 if (this.length === 1 && (this.words[0] | 0) < num) { -1 3962 this.words[0] = num - (this.words[0] | 0); -1 3963 this.negative = 0; -1 3964 return this; -1 3965 } -1 3966 -1 3967 this.negative = 0; -1 3968 this.isubn(num); -1 3969 this.negative = 1; -1 3970 return this; -1 3971 } -1 3972 -1 3973 // Add without checks -1 3974 return this._iaddn(num); -1 3975 }; -1 3976 -1 3977 BN.prototype._iaddn = function _iaddn (num) { -1 3978 this.words[0] += num; -1 3979 -1 3980 // Carry -1 3981 for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { -1 3982 this.words[i] -= 0x4000000; -1 3983 if (i === this.length - 1) { -1 3984 this.words[i + 1] = 1; -1 3985 } else { -1 3986 this.words[i + 1]++; -1 3987 } -1 3988 } -1 3989 this.length = Math.max(this.length, i + 1); -1 3990 -1 3991 return this; -1 3992 }; -1 3993 -1 3994 // Subtract plain number `num` from `this` -1 3995 BN.prototype.isubn = function isubn (num) { -1 3996 assert(typeof num === 'number'); -1 3997 assert(num < 0x4000000); -1 3998 if (num < 0) return this.iaddn(-num); -1 3999 -1 4000 if (this.negative !== 0) { -1 4001 this.negative = 0; -1 4002 this.iaddn(num); -1 4003 this.negative = 1; -1 4004 return this; -1 4005 } -1 4006 -1 4007 this.words[0] -= num; -1 4008 -1 4009 if (this.length === 1 && this.words[0] < 0) { -1 4010 this.words[0] = -this.words[0]; -1 4011 this.negative = 1; -1 4012 } else { -1 4013 // Carry -1 4014 for (var i = 0; i < this.length && this.words[i] < 0; i++) { -1 4015 this.words[i] += 0x4000000; -1 4016 this.words[i + 1] -= 1; -1 4017 } -1 4018 } -1 4019 -1 4020 return this.strip(); -1 4021 }; -1 4022 -1 4023 BN.prototype.addn = function addn (num) { -1 4024 return this.clone().iaddn(num); -1 4025 }; -1 4026 -1 4027 BN.prototype.subn = function subn (num) { -1 4028 return this.clone().isubn(num); -1 4029 }; -1 4030 -1 4031 BN.prototype.iabs = function iabs () { -1 4032 this.negative = 0; -1 4033 -1 4034 return this; -1 4035 }; -1 4036 -1 4037 BN.prototype.abs = function abs () { -1 4038 return this.clone().iabs(); -1 4039 }; -1 4040 -1 4041 BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { -1 4042 var len = num.length + shift; -1 4043 var i; -1 4044 -1 4045 this._expand(len); -1 4046 -1 4047 var w; -1 4048 var carry = 0; -1 4049 for (i = 0; i < num.length; i++) { -1 4050 w = (this.words[i + shift] | 0) + carry; -1 4051 var right = (num.words[i] | 0) * mul; -1 4052 w -= right & 0x3ffffff; -1 4053 carry = (w >> 26) - ((right / 0x4000000) | 0); -1 4054 this.words[i + shift] = w & 0x3ffffff; -1 4055 } -1 4056 for (; i < this.length - shift; i++) { -1 4057 w = (this.words[i + shift] | 0) + carry; -1 4058 carry = w >> 26; -1 4059 this.words[i + shift] = w & 0x3ffffff; -1 4060 } -1 4061 -1 4062 if (carry === 0) return this.strip(); -1 4063 -1 4064 // Subtraction overflow -1 4065 assert(carry === -1); -1 4066 carry = 0; -1 4067 for (i = 0; i < this.length; i++) { -1 4068 w = -(this.words[i] | 0) + carry; -1 4069 carry = w >> 26; -1 4070 this.words[i] = w & 0x3ffffff; -1 4071 } -1 4072 this.negative = 1; -1 4073 -1 4074 return this.strip(); -1 4075 }; -1 4076 -1 4077 BN.prototype._wordDiv = function _wordDiv (num, mode) { -1 4078 var shift = this.length - num.length; -1 4079 -1 4080 var a = this.clone(); -1 4081 var b = num; -1 4082 -1 4083 // Normalize -1 4084 var bhi = b.words[b.length - 1] | 0; -1 4085 var bhiBits = this._countBits(bhi); -1 4086 shift = 26 - bhiBits; -1 4087 if (shift !== 0) { -1 4088 b = b.ushln(shift); -1 4089 a.iushln(shift); -1 4090 bhi = b.words[b.length - 1] | 0; -1 4091 } -1 4092 -1 4093 // Initialize quotient -1 4094 var m = a.length - b.length; -1 4095 var q; -1 4096 -1 4097 if (mode !== 'mod') { -1 4098 q = new BN(null); -1 4099 q.length = m + 1; -1 4100 q.words = new Array(q.length); -1 4101 for (var i = 0; i < q.length; i++) { -1 4102 q.words[i] = 0; -1 4103 } -1 4104 } -1 4105 -1 4106 var diff = a.clone()._ishlnsubmul(b, 1, m); -1 4107 if (diff.negative === 0) { -1 4108 a = diff; -1 4109 if (q) { -1 4110 q.words[m] = 1; -1 4111 } -1 4112 } -1 4113 -1 4114 for (var j = m - 1; j >= 0; j--) { -1 4115 var qj = (a.words[b.length + j] | 0) * 0x4000000 + -1 4116 (a.words[b.length + j - 1] | 0); -1 4117 -1 4118 // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max -1 4119 // (0x7ffffff) -1 4120 qj = Math.min((qj / bhi) | 0, 0x3ffffff); -1 4121 -1 4122 a._ishlnsubmul(b, qj, j); -1 4123 while (a.negative !== 0) { -1 4124 qj--; -1 4125 a.negative = 0; -1 4126 a._ishlnsubmul(b, 1, j); -1 4127 if (!a.isZero()) { -1 4128 a.negative ^= 1; -1 4129 } -1 4130 } -1 4131 if (q) { -1 4132 q.words[j] = qj; -1 4133 } -1 4134 } -1 4135 if (q) { -1 4136 q.strip(); -1 4137 } -1 4138 a.strip(); -1 4139 -1 4140 // Denormalize -1 4141 if (mode !== 'div' && shift !== 0) { -1 4142 a.iushrn(shift); -1 4143 } -1 4144 -1 4145 return { -1 4146 div: q || null, -1 4147 mod: a -1 4148 }; -1 4149 }; -1 4150 -1 4151 // NOTE: 1) `mode` can be set to `mod` to request mod only, -1 4152 // to `div` to request div only, or be absent to -1 4153 // request both div & mod -1 4154 // 2) `positive` is true if unsigned mod is requested -1 4155 BN.prototype.divmod = function divmod (num, mode, positive) { -1 4156 assert(!num.isZero()); -1 4157 -1 4158 if (this.isZero()) { -1 4159 return { -1 4160 div: new BN(0), -1 4161 mod: new BN(0) -1 4162 }; -1 4163 } -1 4164 -1 4165 var div, mod, res; -1 4166 if (this.negative !== 0 && num.negative === 0) { -1 4167 res = this.neg().divmod(num, mode); -1 4168 -1 4169 if (mode !== 'mod') { -1 4170 div = res.div.neg(); -1 4171 } -1 4172 -1 4173 if (mode !== 'div') { -1 4174 mod = res.mod.neg(); -1 4175 if (positive && mod.negative !== 0) { -1 4176 mod.iadd(num); -1 4177 } -1 4178 } -1 4179 -1 4180 return { -1 4181 div: div, -1 4182 mod: mod -1 4183 }; -1 4184 } -1 4185 -1 4186 if (this.negative === 0 && num.negative !== 0) { -1 4187 res = this.divmod(num.neg(), mode); -1 4188 -1 4189 if (mode !== 'mod') { -1 4190 div = res.div.neg(); -1 4191 } -1 4192 -1 4193 return { -1 4194 div: div, -1 4195 mod: res.mod -1 4196 }; -1 4197 } -1 4198 -1 4199 if ((this.negative & num.negative) !== 0) { -1 4200 res = this.neg().divmod(num.neg(), mode); -1 4201 -1 4202 if (mode !== 'div') { -1 4203 mod = res.mod.neg(); -1 4204 if (positive && mod.negative !== 0) { -1 4205 mod.isub(num); -1 4206 } -1 4207 } -1 4208 -1 4209 return { -1 4210 div: res.div, -1 4211 mod: mod -1 4212 }; -1 4213 } -1 4214 -1 4215 // Both numbers are positive at this point -1 4216 -1 4217 // Strip both numbers to approximate shift value -1 4218 if (num.length > this.length || this.cmp(num) < 0) { -1 4219 return { -1 4220 div: new BN(0), -1 4221 mod: this -1 4222 }; -1 4223 } -1 4224 -1 4225 // Very short reduction -1 4226 if (num.length === 1) { -1 4227 if (mode === 'div') { -1 4228 return { -1 4229 div: this.divn(num.words[0]), -1 4230 mod: null -1 4231 }; -1 4232 } -1 4233 -1 4234 if (mode === 'mod') { -1 4235 return { -1 4236 div: null, -1 4237 mod: new BN(this.modn(num.words[0])) -1 4238 }; -1 4239 } -1 4240 -1 4241 return { -1 4242 div: this.divn(num.words[0]), -1 4243 mod: new BN(this.modn(num.words[0])) -1 4244 }; -1 4245 } -1 4246 -1 4247 return this._wordDiv(num, mode); -1 4248 }; -1 4249 -1 4250 // Find `this` / `num` -1 4251 BN.prototype.div = function div (num) { -1 4252 return this.divmod(num, 'div', false).div; -1 4253 }; -1 4254 -1 4255 // Find `this` % `num` -1 4256 BN.prototype.mod = function mod (num) { -1 4257 return this.divmod(num, 'mod', false).mod; -1 4258 }; -1 4259 -1 4260 BN.prototype.umod = function umod (num) { -1 4261 return this.divmod(num, 'mod', true).mod; -1 4262 }; -1 4263 -1 4264 // Find Round(`this` / `num`) -1 4265 BN.prototype.divRound = function divRound (num) { -1 4266 var dm = this.divmod(num); -1 4267 -1 4268 // Fast case - exact division -1 4269 if (dm.mod.isZero()) return dm.div; -1 4270 -1 4271 var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; -1 4272 -1 4273 var half = num.ushrn(1); -1 4274 var r2 = num.andln(1); -1 4275 var cmp = mod.cmp(half); -1 4276 -1 4277 // Round down -1 4278 if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; -1 4279 -1 4280 // Round up -1 4281 return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); -1 4282 }; -1 4283 -1 4284 BN.prototype.modn = function modn (num) { -1 4285 assert(num <= 0x3ffffff); -1 4286 var p = (1 << 26) % num; -1 4287 -1 4288 var acc = 0; -1 4289 for (var i = this.length - 1; i >= 0; i--) { -1 4290 acc = (p * acc + (this.words[i] | 0)) % num; -1 4291 } -1 4292 -1 4293 return acc; -1 4294 }; -1 4295 -1 4296 // In-place division by number -1 4297 BN.prototype.idivn = function idivn (num) { -1 4298 assert(num <= 0x3ffffff); -1 4299 -1 4300 var carry = 0; -1 4301 for (var i = this.length - 1; i >= 0; i--) { -1 4302 var w = (this.words[i] | 0) + carry * 0x4000000; -1 4303 this.words[i] = (w / num) | 0; -1 4304 carry = w % num; -1 4305 } -1 4306 -1 4307 return this.strip(); -1 4308 }; -1 4309 -1 4310 BN.prototype.divn = function divn (num) { -1 4311 return this.clone().idivn(num); -1 4312 }; -1 4313 -1 4314 BN.prototype.egcd = function egcd (p) { -1 4315 assert(p.negative === 0); -1 4316 assert(!p.isZero()); -1 4317 -1 4318 var x = this; -1 4319 var y = p.clone(); -1 4320 -1 4321 if (x.negative !== 0) { -1 4322 x = x.umod(p); -1 4323 } else { -1 4324 x = x.clone(); -1 4325 } -1 4326 -1 4327 // A * x + B * y = x -1 4328 var A = new BN(1); -1 4329 var B = new BN(0); -1 4330 -1 4331 // C * x + D * y = y -1 4332 var C = new BN(0); -1 4333 var D = new BN(1); -1 4334 -1 4335 var g = 0; -1 4336 -1 4337 while (x.isEven() && y.isEven()) { -1 4338 x.iushrn(1); -1 4339 y.iushrn(1); -1 4340 ++g; -1 4341 } -1 4342 -1 4343 var yp = y.clone(); -1 4344 var xp = x.clone(); -1 4345 -1 4346 while (!x.isZero()) { -1 4347 for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); -1 4348 if (i > 0) { -1 4349 x.iushrn(i); -1 4350 while (i-- > 0) { -1 4351 if (A.isOdd() || B.isOdd()) { -1 4352 A.iadd(yp); -1 4353 B.isub(xp); -1 4354 } -1 4355 -1 4356 A.iushrn(1); -1 4357 B.iushrn(1); -1 4358 } -1 4359 } -1 4360 -1 4361 for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); -1 4362 if (j > 0) { -1 4363 y.iushrn(j); -1 4364 while (j-- > 0) { -1 4365 if (C.isOdd() || D.isOdd()) { -1 4366 C.iadd(yp); -1 4367 D.isub(xp); -1 4368 } -1 4369 -1 4370 C.iushrn(1); -1 4371 D.iushrn(1); -1 4372 } -1 4373 } -1 4374 -1 4375 if (x.cmp(y) >= 0) { -1 4376 x.isub(y); -1 4377 A.isub(C); -1 4378 B.isub(D); -1 4379 } else { -1 4380 y.isub(x); -1 4381 C.isub(A); -1 4382 D.isub(B); -1 4383 } -1 4384 } -1 4385 -1 4386 return { -1 4387 a: C, -1 4388 b: D, -1 4389 gcd: y.iushln(g) -1 4390 }; -1 4391 }; -1 4392 -1 4393 // This is reduced incarnation of the binary EEA -1 4394 // above, designated to invert members of the -1 4395 // _prime_ fields F(p) at a maximal speed -1 4396 BN.prototype._invmp = function _invmp (p) { -1 4397 assert(p.negative === 0); -1 4398 assert(!p.isZero()); -1 4399 -1 4400 var a = this; -1 4401 var b = p.clone(); -1 4402 -1 4403 if (a.negative !== 0) { -1 4404 a = a.umod(p); -1 4405 } else { -1 4406 a = a.clone(); -1 4407 } -1 4408 -1 4409 var x1 = new BN(1); -1 4410 var x2 = new BN(0); -1 4411 -1 4412 var delta = b.clone(); -1 4413 -1 4414 while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { -1 4415 for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); -1 4416 if (i > 0) { -1 4417 a.iushrn(i); -1 4418 while (i-- > 0) { -1 4419 if (x1.isOdd()) { -1 4420 x1.iadd(delta); -1 4421 } -1 4422 -1 4423 x1.iushrn(1); -1 4424 } -1 4425 } -1 4426 -1 4427 for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); -1 4428 if (j > 0) { -1 4429 b.iushrn(j); -1 4430 while (j-- > 0) { -1 4431 if (x2.isOdd()) { -1 4432 x2.iadd(delta); -1 4433 } -1 4434 -1 4435 x2.iushrn(1); -1 4436 } -1 4437 } -1 4438 -1 4439 if (a.cmp(b) >= 0) { -1 4440 a.isub(b); -1 4441 x1.isub(x2); -1 4442 } else { -1 4443 b.isub(a); -1 4444 x2.isub(x1); -1 4445 } -1 4446 } -1 4447 -1 4448 var res; -1 4449 if (a.cmpn(1) === 0) { -1 4450 res = x1; -1 4451 } else { -1 4452 res = x2; -1 4453 } -1 4454 -1 4455 if (res.cmpn(0) < 0) { -1 4456 res.iadd(p); -1 4457 } -1 4458 -1 4459 return res; -1 4460 }; -1 4461 -1 4462 BN.prototype.gcd = function gcd (num) { -1 4463 if (this.isZero()) return num.abs(); -1 4464 if (num.isZero()) return this.abs(); -1 4465 -1 4466 var a = this.clone(); -1 4467 var b = num.clone(); -1 4468 a.negative = 0; -1 4469 b.negative = 0; -1 4470 -1 4471 // Remove common factor of two -1 4472 for (var shift = 0; a.isEven() && b.isEven(); shift++) { -1 4473 a.iushrn(1); -1 4474 b.iushrn(1); -1 4475 } -1 4476 -1 4477 do { -1 4478 while (a.isEven()) { -1 4479 a.iushrn(1); -1 4480 } -1 4481 while (b.isEven()) { -1 4482 b.iushrn(1); -1 4483 } -1 4484 -1 4485 var r = a.cmp(b); -1 4486 if (r < 0) { -1 4487 // Swap `a` and `b` to make `a` always bigger than `b` -1 4488 var t = a; -1 4489 a = b; -1 4490 b = t; -1 4491 } else if (r === 0 || b.cmpn(1) === 0) { -1 4492 break; -1 4493 } -1 4494 -1 4495 a.isub(b); -1 4496 } while (true); -1 4497 -1 4498 return b.iushln(shift); -1 4499 }; -1 4500 -1 4501 // Invert number in the field F(num) -1 4502 BN.prototype.invm = function invm (num) { -1 4503 return this.egcd(num).a.umod(num); -1 4504 }; -1 4505 -1 4506 BN.prototype.isEven = function isEven () { -1 4507 return (this.words[0] & 1) === 0; -1 4508 }; -1 4509 -1 4510 BN.prototype.isOdd = function isOdd () { -1 4511 return (this.words[0] & 1) === 1; -1 4512 }; -1 4513 -1 4514 // And first word and num -1 4515 BN.prototype.andln = function andln (num) { -1 4516 return this.words[0] & num; -1 4517 }; -1 4518 -1 4519 // Increment at the bit position in-line -1 4520 BN.prototype.bincn = function bincn (bit) { -1 4521 assert(typeof bit === 'number'); -1 4522 var r = bit % 26; -1 4523 var s = (bit - r) / 26; -1 4524 var q = 1 << r; -1 4525 -1 4526 // Fast case: bit is much higher than all existing words -1 4527 if (this.length <= s) { -1 4528 this._expand(s + 1); -1 4529 this.words[s] |= q; -1 4530 return this; -1 4531 } -1 4532 -1 4533 // Add bit and propagate, if needed -1 4534 var carry = q; -1 4535 for (var i = s; carry !== 0 && i < this.length; i++) { -1 4536 var w = this.words[i] | 0; -1 4537 w += carry; -1 4538 carry = w >>> 26; -1 4539 w &= 0x3ffffff; -1 4540 this.words[i] = w; -1 4541 } -1 4542 if (carry !== 0) { -1 4543 this.words[i] = carry; -1 4544 this.length++; -1 4545 } -1 4546 return this; -1 4547 }; -1 4548 -1 4549 BN.prototype.isZero = function isZero () { -1 4550 return this.length === 1 && this.words[0] === 0; -1 4551 }; -1 4552 -1 4553 BN.prototype.cmpn = function cmpn (num) { -1 4554 var negative = num < 0; -1 4555 -1 4556 if (this.negative !== 0 && !negative) return -1; -1 4557 if (this.negative === 0 && negative) return 1; -1 4558 -1 4559 this.strip(); -1 4560 -1 4561 var res; -1 4562 if (this.length > 1) { -1 4563 res = 1; -1 4564 } else { -1 4565 if (negative) { -1 4566 num = -num; -1 4567 } -1 4568 -1 4569 assert(num <= 0x3ffffff, 'Number is too big'); -1 4570 -1 4571 var w = this.words[0] | 0; -1 4572 res = w === num ? 0 : w < num ? -1 : 1; -1 4573 } -1 4574 if (this.negative !== 0) return -res | 0; -1 4575 return res; -1 4576 }; -1 4577 -1 4578 // Compare two numbers and return: -1 4579 // 1 - if `this` > `num` -1 4580 // 0 - if `this` == `num` -1 4581 // -1 - if `this` < `num` -1 4582 BN.prototype.cmp = function cmp (num) { -1 4583 if (this.negative !== 0 && num.negative === 0) return -1; -1 4584 if (this.negative === 0 && num.negative !== 0) return 1; -1 4585 -1 4586 var res = this.ucmp(num); -1 4587 if (this.negative !== 0) return -res | 0; -1 4588 return res; -1 4589 }; -1 4590 -1 4591 // Unsigned comparison -1 4592 BN.prototype.ucmp = function ucmp (num) { -1 4593 // At this point both numbers have the same sign -1 4594 if (this.length > num.length) return 1; -1 4595 if (this.length < num.length) return -1; -1 4596 -1 4597 var res = 0; -1 4598 for (var i = this.length - 1; i >= 0; i--) { -1 4599 var a = this.words[i] | 0; -1 4600 var b = num.words[i] | 0; -1 4601 -1 4602 if (a === b) continue; -1 4603 if (a < b) { -1 4604 res = -1; -1 4605 } else if (a > b) { -1 4606 res = 1; -1 4607 } -1 4608 break; -1 4609 } -1 4610 return res; -1 4611 }; -1 4612 -1 4613 BN.prototype.gtn = function gtn (num) { -1 4614 return this.cmpn(num) === 1; -1 4615 }; -1 4616 -1 4617 BN.prototype.gt = function gt (num) { -1 4618 return this.cmp(num) === 1; -1 4619 }; -1 4620 -1 4621 BN.prototype.gten = function gten (num) { -1 4622 return this.cmpn(num) >= 0; -1 4623 }; -1 4624 -1 4625 BN.prototype.gte = function gte (num) { -1 4626 return this.cmp(num) >= 0; -1 4627 }; -1 4628 -1 4629 BN.prototype.ltn = function ltn (num) { -1 4630 return this.cmpn(num) === -1; -1 4631 }; -1 4632 -1 4633 BN.prototype.lt = function lt (num) { -1 4634 return this.cmp(num) === -1; -1 4635 }; -1 4636 -1 4637 BN.prototype.lten = function lten (num) { -1 4638 return this.cmpn(num) <= 0; -1 4639 }; -1 4640 -1 4641 BN.prototype.lte = function lte (num) { -1 4642 return this.cmp(num) <= 0; -1 4643 }; -1 4644 -1 4645 BN.prototype.eqn = function eqn (num) { -1 4646 return this.cmpn(num) === 0; -1 4647 }; -1 4648 -1 4649 BN.prototype.eq = function eq (num) { -1 4650 return this.cmp(num) === 0; -1 4651 }; -1 4652 -1 4653 // -1 4654 // A reduce context, could be using montgomery or something better, depending -1 4655 // on the `m` itself. -1 4656 // -1 4657 BN.red = function red (num) { -1 4658 return new Red(num); -1 4659 }; -1 4660 -1 4661 BN.prototype.toRed = function toRed (ctx) { -1 4662 assert(!this.red, 'Already a number in reduction context'); -1 4663 assert(this.negative === 0, 'red works only with positives'); -1 4664 return ctx.convertTo(this)._forceRed(ctx); -1 4665 }; -1 4666 -1 4667 BN.prototype.fromRed = function fromRed () { -1 4668 assert(this.red, 'fromRed works only with numbers in reduction context'); -1 4669 return this.red.convertFrom(this); -1 4670 }; -1 4671 -1 4672 BN.prototype._forceRed = function _forceRed (ctx) { -1 4673 this.red = ctx; -1 4674 return this; -1 4675 }; -1 4676 -1 4677 BN.prototype.forceRed = function forceRed (ctx) { -1 4678 assert(!this.red, 'Already a number in reduction context'); -1 4679 return this._forceRed(ctx); -1 4680 }; -1 4681 -1 4682 BN.prototype.redAdd = function redAdd (num) { -1 4683 assert(this.red, 'redAdd works only with red numbers'); -1 4684 return this.red.add(this, num); -1 4685 }; -1 4686 -1 4687 BN.prototype.redIAdd = function redIAdd (num) { -1 4688 assert(this.red, 'redIAdd works only with red numbers'); -1 4689 return this.red.iadd(this, num); -1 4690 }; -1 4691 -1 4692 BN.prototype.redSub = function redSub (num) { -1 4693 assert(this.red, 'redSub works only with red numbers'); -1 4694 return this.red.sub(this, num); -1 4695 }; -1 4696 -1 4697 BN.prototype.redISub = function redISub (num) { -1 4698 assert(this.red, 'redISub works only with red numbers'); -1 4699 return this.red.isub(this, num); -1 4700 }; -1 4701 -1 4702 BN.prototype.redShl = function redShl (num) { -1 4703 assert(this.red, 'redShl works only with red numbers'); -1 4704 return this.red.shl(this, num); -1 4705 }; -1 4706 -1 4707 BN.prototype.redMul = function redMul (num) { -1 4708 assert(this.red, 'redMul works only with red numbers'); -1 4709 this.red._verify2(this, num); -1 4710 return this.red.mul(this, num); -1 4711 }; -1 4712 -1 4713 BN.prototype.redIMul = function redIMul (num) { -1 4714 assert(this.red, 'redMul works only with red numbers'); -1 4715 this.red._verify2(this, num); -1 4716 return this.red.imul(this, num); -1 4717 }; -1 4718 -1 4719 BN.prototype.redSqr = function redSqr () { -1 4720 assert(this.red, 'redSqr works only with red numbers'); -1 4721 this.red._verify1(this); -1 4722 return this.red.sqr(this); -1 4723 }; -1 4724 -1 4725 BN.prototype.redISqr = function redISqr () { -1 4726 assert(this.red, 'redISqr works only with red numbers'); -1 4727 this.red._verify1(this); -1 4728 return this.red.isqr(this); -1 4729 }; -1 4730 -1 4731 // Square root over p -1 4732 BN.prototype.redSqrt = function redSqrt () { -1 4733 assert(this.red, 'redSqrt works only with red numbers'); -1 4734 this.red._verify1(this); -1 4735 return this.red.sqrt(this); -1 4736 }; -1 4737 -1 4738 BN.prototype.redInvm = function redInvm () { -1 4739 assert(this.red, 'redInvm works only with red numbers'); -1 4740 this.red._verify1(this); -1 4741 return this.red.invm(this); -1 4742 }; -1 4743 -1 4744 // Return negative clone of `this` % `red modulo` -1 4745 BN.prototype.redNeg = function redNeg () { -1 4746 assert(this.red, 'redNeg works only with red numbers'); -1 4747 this.red._verify1(this); -1 4748 return this.red.neg(this); -1 4749 }; -1 4750 -1 4751 BN.prototype.redPow = function redPow (num) { -1 4752 assert(this.red && !num.red, 'redPow(normalNum)'); -1 4753 this.red._verify1(this); -1 4754 return this.red.pow(this, num); -1 4755 }; -1 4756 -1 4757 // Prime numbers with efficient reduction -1 4758 var primes = { -1 4759 k256: null, -1 4760 p224: null, -1 4761 p192: null, -1 4762 p25519: null -1 4763 }; -1 4764 -1 4765 // Pseudo-Mersenne prime -1 4766 function MPrime (name, p) { -1 4767 // P = 2 ^ N - K -1 4768 this.name = name; -1 4769 this.p = new BN(p, 16); -1 4770 this.n = this.p.bitLength(); -1 4771 this.k = new BN(1).iushln(this.n).isub(this.p); -1 4772 -1 4773 this.tmp = this._tmp(); -1 4774 } -1 4775 -1 4776 MPrime.prototype._tmp = function _tmp () { -1 4777 var tmp = new BN(null); -1 4778 tmp.words = new Array(Math.ceil(this.n / 13)); -1 4779 return tmp; -1 4780 }; -1 4781 -1 4782 MPrime.prototype.ireduce = function ireduce (num) { -1 4783 // Assumes that `num` is less than `P^2` -1 4784 // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) -1 4785 var r = num; -1 4786 var rlen; -1 4787 -1 4788 do { -1 4789 this.split(r, this.tmp); -1 4790 r = this.imulK(r); -1 4791 r = r.iadd(this.tmp); -1 4792 rlen = r.bitLength(); -1 4793 } while (rlen > this.n); -1 4794 -1 4795 var cmp = rlen < this.n ? -1 : r.ucmp(this.p); -1 4796 if (cmp === 0) { -1 4797 r.words[0] = 0; -1 4798 r.length = 1; -1 4799 } else if (cmp > 0) { -1 4800 r.isub(this.p); -1 4801 } else { -1 4802 if (r.strip !== undefined) { -1 4803 // r is BN v4 instance -1 4804 r.strip(); -1 4805 } else { -1 4806 // r is BN v5 instance -1 4807 r._strip(); -1 4808 } -1 4809 } -1 4810 -1 4811 return r; -1 4812 }; -1 4813 -1 4814 MPrime.prototype.split = function split (input, out) { -1 4815 input.iushrn(this.n, 0, out); -1 4816 }; -1 4817 -1 4818 MPrime.prototype.imulK = function imulK (num) { -1 4819 return num.imul(this.k); -1 4820 }; -1 4821 -1 4822 function K256 () { -1 4823 MPrime.call( -1 4824 this, -1 4825 'k256', -1 4826 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); -1 4827 } -1 4828 inherits(K256, MPrime); -1 4829 -1 4830 K256.prototype.split = function split (input, output) { -1 4831 // 256 = 9 * 26 + 22 -1 4832 var mask = 0x3fffff; -1 4833 -1 4834 var outLen = Math.min(input.length, 9); -1 4835 for (var i = 0; i < outLen; i++) { -1 4836 output.words[i] = input.words[i]; -1 4837 } -1 4838 output.length = outLen; -1 4839 -1 4840 if (input.length <= 9) { -1 4841 input.words[0] = 0; -1 4842 input.length = 1; -1 4843 return; -1 4844 } -1 4845 -1 4846 // Shift by 9 limbs -1 4847 var prev = input.words[9]; -1 4848 output.words[output.length++] = prev & mask; -1 4849 -1 4850 for (i = 10; i < input.length; i++) { -1 4851 var next = input.words[i] | 0; -1 4852 input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); -1 4853 prev = next; -1 4854 } -1 4855 prev >>>= 22; -1 4856 input.words[i - 10] = prev; -1 4857 if (prev === 0 && input.length > 10) { -1 4858 input.length -= 10; -1 4859 } else { -1 4860 input.length -= 9; -1 4861 } -1 4862 }; -1 4863 -1 4864 K256.prototype.imulK = function imulK (num) { -1 4865 // K = 0x1000003d1 = [ 0x40, 0x3d1 ] -1 4866 num.words[num.length] = 0; -1 4867 num.words[num.length + 1] = 0; -1 4868 num.length += 2; -1 4869 -1 4870 // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 -1 4871 var lo = 0; -1 4872 for (var i = 0; i < num.length; i++) { -1 4873 var w = num.words[i] | 0; -1 4874 lo += w * 0x3d1; -1 4875 num.words[i] = lo & 0x3ffffff; -1 4876 lo = w * 0x40 + ((lo / 0x4000000) | 0); -1 4877 } -1 4878 -1 4879 // Fast length reduction -1 4880 if (num.words[num.length - 1] === 0) { -1 4881 num.length--; -1 4882 if (num.words[num.length - 1] === 0) { -1 4883 num.length--; -1 4884 } -1 4885 } -1 4886 return num; -1 4887 }; -1 4888 -1 4889 function P224 () { -1 4890 MPrime.call( -1 4891 this, -1 4892 'p224', -1 4893 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); -1 4894 } -1 4895 inherits(P224, MPrime); -1 4896 -1 4897 function P192 () { -1 4898 MPrime.call( -1 4899 this, -1 4900 'p192', -1 4901 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); -1 4902 } -1 4903 inherits(P192, MPrime); -1 4904 -1 4905 function P25519 () { -1 4906 // 2 ^ 255 - 19 -1 4907 MPrime.call( -1 4908 this, -1 4909 '25519', -1 4910 '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); -1 4911 } -1 4912 inherits(P25519, MPrime); -1 4913 -1 4914 P25519.prototype.imulK = function imulK (num) { -1 4915 // K = 0x13 -1 4916 var carry = 0; -1 4917 for (var i = 0; i < num.length; i++) { -1 4918 var hi = (num.words[i] | 0) * 0x13 + carry; -1 4919 var lo = hi & 0x3ffffff; -1 4920 hi >>>= 26; -1 4921 -1 4922 num.words[i] = lo; -1 4923 carry = hi; -1 4924 } -1 4925 if (carry !== 0) { -1 4926 num.words[num.length++] = carry; -1 4927 } -1 4928 return num; -1 4929 }; -1 4930 -1 4931 // Exported mostly for testing purposes, use plain name instead -1 4932 BN._prime = function prime (name) { -1 4933 // Cached version of prime -1 4934 if (primes[name]) return primes[name]; -1 4935 -1 4936 var prime; -1 4937 if (name === 'k256') { -1 4938 prime = new K256(); -1 4939 } else if (name === 'p224') { -1 4940 prime = new P224(); -1 4941 } else if (name === 'p192') { -1 4942 prime = new P192(); -1 4943 } else if (name === 'p25519') { -1 4944 prime = new P25519(); -1 4945 } else { -1 4946 throw new Error('Unknown prime ' + name); -1 4947 } -1 4948 primes[name] = prime; -1 4949 -1 4950 return prime; -1 4951 }; -1 4952 -1 4953 // -1 4954 // Base reduction engine -1 4955 // -1 4956 function Red (m) { -1 4957 if (typeof m === 'string') { -1 4958 var prime = BN._prime(m); -1 4959 this.m = prime.p; -1 4960 this.prime = prime; -1 4961 } else { -1 4962 assert(m.gtn(1), 'modulus must be greater than 1'); -1 4963 this.m = m; -1 4964 this.prime = null; -1 4965 } -1 4966 } -1 4967 -1 4968 Red.prototype._verify1 = function _verify1 (a) { -1 4969 assert(a.negative === 0, 'red works only with positives'); -1 4970 assert(a.red, 'red works only with red numbers'); -1 4971 }; -1 4972 -1 4973 Red.prototype._verify2 = function _verify2 (a, b) { -1 4974 assert((a.negative | b.negative) === 0, 'red works only with positives'); -1 4975 assert(a.red && a.red === b.red, -1 4976 'red works only with red numbers'); -1 4977 }; -1 4978 -1 4979 Red.prototype.imod = function imod (a) { -1 4980 if (this.prime) return this.prime.ireduce(a)._forceRed(this); -1 4981 return a.umod(this.m)._forceRed(this); -1 4982 }; -1 4983 -1 4984 Red.prototype.neg = function neg (a) { -1 4985 if (a.isZero()) { -1 4986 return a.clone(); -1 4987 } -1 4988 -1 4989 return this.m.sub(a)._forceRed(this); -1 4990 }; -1 4991 -1 4992 Red.prototype.add = function add (a, b) { -1 4993 this._verify2(a, b); -1 4994 -1 4995 var res = a.add(b); -1 4996 if (res.cmp(this.m) >= 0) { -1 4997 res.isub(this.m); -1 4998 } -1 4999 return res._forceRed(this); -1 5000 }; -1 5001 -1 5002 Red.prototype.iadd = function iadd (a, b) { -1 5003 this._verify2(a, b); -1 5004 -1 5005 var res = a.iadd(b); -1 5006 if (res.cmp(this.m) >= 0) { -1 5007 res.isub(this.m); -1 5008 } -1 5009 return res; -1 5010 }; -1 5011 -1 5012 Red.prototype.sub = function sub (a, b) { -1 5013 this._verify2(a, b); -1 5014 -1 5015 var res = a.sub(b); -1 5016 if (res.cmpn(0) < 0) { -1 5017 res.iadd(this.m); -1 5018 } -1 5019 return res._forceRed(this); -1 5020 }; -1 5021 -1 5022 Red.prototype.isub = function isub (a, b) { -1 5023 this._verify2(a, b); -1 5024 -1 5025 var res = a.isub(b); -1 5026 if (res.cmpn(0) < 0) { -1 5027 res.iadd(this.m); -1 5028 } -1 5029 return res; -1 5030 }; -1 5031 -1 5032 Red.prototype.shl = function shl (a, num) { -1 5033 this._verify1(a); -1 5034 return this.imod(a.ushln(num)); -1 5035 }; -1 5036 -1 5037 Red.prototype.imul = function imul (a, b) { -1 5038 this._verify2(a, b); -1 5039 return this.imod(a.imul(b)); -1 5040 }; -1 5041 -1 5042 Red.prototype.mul = function mul (a, b) { -1 5043 this._verify2(a, b); -1 5044 return this.imod(a.mul(b)); -1 5045 }; -1 5046 -1 5047 Red.prototype.isqr = function isqr (a) { -1 5048 return this.imul(a, a.clone()); -1 5049 }; -1 5050 -1 5051 Red.prototype.sqr = function sqr (a) { -1 5052 return this.mul(a, a); -1 5053 }; -1 5054 -1 5055 Red.prototype.sqrt = function sqrt (a) { -1 5056 if (a.isZero()) return a.clone(); -1 5057 -1 5058 var mod3 = this.m.andln(3); -1 5059 assert(mod3 % 2 === 1); -1 5060 -1 5061 // Fast case -1 5062 if (mod3 === 3) { -1 5063 var pow = this.m.add(new BN(1)).iushrn(2); -1 5064 return this.pow(a, pow); -1 5065 } -1 5066 -1 5067 // Tonelli-Shanks algorithm (Totally unoptimized and slow) -1 5068 // -1 5069 // Find Q and S, that Q * 2 ^ S = (P - 1) -1 5070 var q = this.m.subn(1); -1 5071 var s = 0; -1 5072 while (!q.isZero() && q.andln(1) === 0) { -1 5073 s++; -1 5074 q.iushrn(1); -1 5075 } -1 5076 assert(!q.isZero()); -1 5077 -1 5078 var one = new BN(1).toRed(this); -1 5079 var nOne = one.redNeg(); -1 5080 -1 5081 // Find quadratic non-residue -1 5082 // NOTE: Max is such because of generalized Riemann hypothesis. -1 5083 var lpow = this.m.subn(1).iushrn(1); -1 5084 var z = this.m.bitLength(); -1 5085 z = new BN(2 * z * z).toRed(this); -1 5086 -1 5087 while (this.pow(z, lpow).cmp(nOne) !== 0) { -1 5088 z.redIAdd(nOne); -1 5089 } -1 5090 -1 5091 var c = this.pow(z, q); -1 5092 var r = this.pow(a, q.addn(1).iushrn(1)); -1 5093 var t = this.pow(a, q); -1 5094 var m = s; -1 5095 while (t.cmp(one) !== 0) { -1 5096 var tmp = t; -1 5097 for (var i = 0; tmp.cmp(one) !== 0; i++) { -1 5098 tmp = tmp.redSqr(); -1 5099 } -1 5100 assert(i < m); -1 5101 var b = this.pow(c, new BN(1).iushln(m - i - 1)); -1 5102 -1 5103 r = r.redMul(b); -1 5104 c = b.redSqr(); -1 5105 t = t.redMul(c); -1 5106 m = i; -1 5107 } -1 5108 -1 5109 return r; -1 5110 }; -1 5111 -1 5112 Red.prototype.invm = function invm (a) { -1 5113 var inv = a._invmp(this.m); -1 5114 if (inv.negative !== 0) { -1 5115 inv.negative = 0; -1 5116 return this.imod(inv).redNeg(); -1 5117 } else { -1 5118 return this.imod(inv); -1 5119 } -1 5120 }; -1 5121 -1 5122 Red.prototype.pow = function pow (a, num) { -1 5123 if (num.isZero()) return new BN(1).toRed(this); -1 5124 if (num.cmpn(1) === 0) return a.clone(); -1 5125 -1 5126 var windowSize = 4; -1 5127 var wnd = new Array(1 << windowSize); -1 5128 wnd[0] = new BN(1).toRed(this); -1 5129 wnd[1] = a; -1 5130 for (var i = 2; i < wnd.length; i++) { -1 5131 wnd[i] = this.mul(wnd[i - 1], a); -1 5132 } -1 5133 -1 5134 var res = wnd[0]; -1 5135 var current = 0; -1 5136 var currentLen = 0; -1 5137 var start = num.bitLength() % 26; -1 5138 if (start === 0) { -1 5139 start = 26; -1 5140 } -1 5141 -1 5142 for (i = num.length - 1; i >= 0; i--) { -1 5143 var word = num.words[i]; -1 5144 for (var j = start - 1; j >= 0; j--) { -1 5145 var bit = (word >> j) & 1; -1 5146 if (res !== wnd[0]) { -1 5147 res = this.sqr(res); -1 5148 } -1 5149 -1 5150 if (bit === 0 && current === 0) { -1 5151 currentLen = 0; -1 5152 continue; -1 5153 } -1 5154 -1 5155 current <<= 1; -1 5156 current |= bit; -1 5157 currentLen++; -1 5158 if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; -1 5159 -1 5160 res = this.mul(res, wnd[current]); -1 5161 currentLen = 0; -1 5162 current = 0; -1 5163 } -1 5164 start = 26; -1 5165 } -1 5166 -1 5167 return res; -1 5168 }; -1 5169 -1 5170 Red.prototype.convertTo = function convertTo (num) { -1 5171 var r = num.umod(this.m); -1 5172 -1 5173 return r === num ? r.clone() : r; -1 5174 }; -1 5175 -1 5176 Red.prototype.convertFrom = function convertFrom (num) { -1 5177 var res = num.clone(); -1 5178 res.red = null; -1 5179 return res; -1 5180 }; -1 5181 -1 5182 // -1 5183 // Montgomery method engine -1 5184 // -1 5185 -1 5186 BN.mont = function mont (num) { -1 5187 return new Mont(num); -1 5188 }; -1 5189 -1 5190 function Mont (m) { -1 5191 Red.call(this, m); -1 5192 -1 5193 this.shift = this.m.bitLength(); -1 5194 if (this.shift % 26 !== 0) { -1 5195 this.shift += 26 - (this.shift % 26); -1 5196 } -1 5197 -1 5198 this.r = new BN(1).iushln(this.shift); -1 5199 this.r2 = this.imod(this.r.sqr()); -1 5200 this.rinv = this.r._invmp(this.m); -1 5201 -1 5202 this.minv = this.rinv.mul(this.r).isubn(1).div(this.m); -1 5203 this.minv = this.minv.umod(this.r); -1 5204 this.minv = this.r.sub(this.minv); -1 5205 } -1 5206 inherits(Mont, Red); -1 5207 -1 5208 Mont.prototype.convertTo = function convertTo (num) { -1 5209 return this.imod(num.ushln(this.shift)); -1 5210 }; -1 5211 -1 5212 Mont.prototype.convertFrom = function convertFrom (num) { -1 5213 var r = this.imod(num.mul(this.rinv)); -1 5214 r.red = null; -1 5215 return r; -1 5216 }; -1 5217 -1 5218 Mont.prototype.imul = function imul (a, b) { -1 5219 if (a.isZero() || b.isZero()) { -1 5220 a.words[0] = 0; -1 5221 a.length = 1; -1 5222 return a; -1 5223 } -1 5224 -1 5225 var t = a.imul(b); -1 5226 var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); -1 5227 var u = t.isub(c).iushrn(this.shift); -1 5228 var res = u; -1 5229 -1 5230 if (u.cmp(this.m) >= 0) { -1 5231 res = u.isub(this.m); -1 5232 } else if (u.cmpn(0) < 0) { -1 5233 res = u.iadd(this.m); -1 5234 } -1 5235 -1 5236 return res._forceRed(this); -1 5237 }; -1 5238 -1 5239 Mont.prototype.mul = function mul (a, b) { -1 5240 if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); -1 5241 -1 5242 var t = a.mul(b); -1 5243 var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); -1 5244 var u = t.isub(c).iushrn(this.shift); -1 5245 var res = u; -1 5246 if (u.cmp(this.m) >= 0) { -1 5247 res = u.isub(this.m); -1 5248 } else if (u.cmpn(0) < 0) { -1 5249 res = u.iadd(this.m); -1 5250 } -1 5251 -1 5252 return res._forceRed(this); -1 5253 }; -1 5254 -1 5255 Mont.prototype.invm = function invm (a) { -1 5256 // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R -1 5257 var res = this.imod(a._invmp(this.m).mul(this.r2)); -1 5258 return res._forceRed(this); -1 5259 }; -1 5260 })(typeof module === 'undefined' || module, this); -1 5261 -1 5262 },{"buffer":19}],16:[function(require,module,exports){ -1 5263 'use strict' -1 5264 -1 5265 exports.byteLength = byteLength -1 5266 exports.toByteArray = toByteArray -1 5267 exports.fromByteArray = fromByteArray -1 5268 -1 5269 var lookup = [] -1 5270 var revLookup = [] -1 5271 var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array -1 5272 -1 5273 var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' -1 5274 for (var i = 0, len = code.length; i < len; ++i) { -1 5275 lookup[i] = code[i] -1 5276 revLookup[code.charCodeAt(i)] = i -1 5277 } -1 5278 -1 5279 // Support decoding URL-safe base64 strings, as Node.js does. -1 5280 // See: https://en.wikipedia.org/wiki/Base64#URL_applications -1 5281 revLookup['-'.charCodeAt(0)] = 62 -1 5282 revLookup['_'.charCodeAt(0)] = 63 -1 5283 -1 5284 function getLens (b64) { -1 5285 var len = b64.length -1 5286 -1 5287 if (len % 4 > 0) { -1 5288 throw new Error('Invalid string. Length must be a multiple of 4') -1 5289 } -1 5290 -1 5291 // Trim off extra bytes after placeholder bytes are found -1 5292 // See: https://github.com/beatgammit/base64-js/issues/42 -1 5293 var validLen = b64.indexOf('=') -1 5294 if (validLen === -1) validLen = len -1 5295 -1 5296 var placeHoldersLen = validLen === len -1 5297 ? 0 -1 5298 : 4 - (validLen % 4) -1 5299 -1 5300 return [validLen, placeHoldersLen] -1 5301 } -1 5302 -1 5303 // base64 is 4/3 + up to two characters of the original data -1 5304 function byteLength (b64) { -1 5305 var lens = getLens(b64) -1 5306 var validLen = lens[0] -1 5307 var placeHoldersLen = lens[1] -1 5308 return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -1 5309 } -1 5310 -1 5311 function _byteLength (b64, validLen, placeHoldersLen) { -1 5312 return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -1 5313 } -1 5314 -1 5315 function toByteArray (b64) { -1 5316 var tmp -1 5317 var lens = getLens(b64) -1 5318 var validLen = lens[0] -1 5319 var placeHoldersLen = lens[1] -1 5320 -1 5321 var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) -1 5322 -1 5323 var curByte = 0 -1 5324 -1 5325 // if there are placeholders, only get up to the last complete 4 chars -1 5326 var len = placeHoldersLen > 0 -1 5327 ? validLen - 4 -1 5328 : validLen -1 5329 -1 5330 var i -1 5331 for (i = 0; i < len; i += 4) { -1 5332 tmp = -1 5333 (revLookup[b64.charCodeAt(i)] << 18) | -1 5334 (revLookup[b64.charCodeAt(i + 1)] << 12) | -1 5335 (revLookup[b64.charCodeAt(i + 2)] << 6) | -1 5336 revLookup[b64.charCodeAt(i + 3)] -1 5337 arr[curByte++] = (tmp >> 16) & 0xFF -1 5338 arr[curByte++] = (tmp >> 8) & 0xFF -1 5339 arr[curByte++] = tmp & 0xFF -1 5340 } -1 5341 -1 5342 if (placeHoldersLen === 2) { -1 5343 tmp = -1 5344 (revLookup[b64.charCodeAt(i)] << 2) | -1 5345 (revLookup[b64.charCodeAt(i + 1)] >> 4) -1 5346 arr[curByte++] = tmp & 0xFF -1 5347 } -1 5348 -1 5349 if (placeHoldersLen === 1) { -1 5350 tmp = -1 5351 (revLookup[b64.charCodeAt(i)] << 10) | -1 5352 (revLookup[b64.charCodeAt(i + 1)] << 4) | -1 5353 (revLookup[b64.charCodeAt(i + 2)] >> 2) -1 5354 arr[curByte++] = (tmp >> 8) & 0xFF -1 5355 arr[curByte++] = tmp & 0xFF -1 5356 } -1 5357 -1 5358 return arr -1 5359 } -1 5360 -1 5361 function tripletToBase64 (num) { -1 5362 return lookup[num >> 18 & 0x3F] + -1 5363 lookup[num >> 12 & 0x3F] + -1 5364 lookup[num >> 6 & 0x3F] + -1 5365 lookup[num & 0x3F] -1 5366 } -1 5367 -1 5368 function encodeChunk (uint8, start, end) { -1 5369 var tmp -1 5370 var output = [] -1 5371 for (var i = start; i < end; i += 3) { -1 5372 tmp = -1 5373 ((uint8[i] << 16) & 0xFF0000) + -1 5374 ((uint8[i + 1] << 8) & 0xFF00) + -1 5375 (uint8[i + 2] & 0xFF) -1 5376 output.push(tripletToBase64(tmp)) -1 5377 } -1 5378 return output.join('') -1 5379 } -1 5380 -1 5381 function fromByteArray (uint8) { -1 5382 var tmp -1 5383 var len = uint8.length -1 5384 var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes -1 5385 var parts = [] -1 5386 var maxChunkLength = 16383 // must be multiple of 3 -1 5387 -1 5388 // go through the array every three bytes, we'll deal with trailing stuff later -1 5389 for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { -1 5390 parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) -1 5391 } -1 5392 -1 5393 // pad the end with zeros, but make sure to not forget the extra bytes -1 5394 if (extraBytes === 1) { -1 5395 tmp = uint8[len - 1] -1 5396 parts.push( -1 5397 lookup[tmp >> 2] + -1 5398 lookup[(tmp << 4) & 0x3F] + -1 5399 '==' -1 5400 ) -1 5401 } else if (extraBytes === 2) { -1 5402 tmp = (uint8[len - 2] << 8) + uint8[len - 1] -1 5403 parts.push( -1 5404 lookup[tmp >> 10] + -1 5405 lookup[(tmp >> 4) & 0x3F] + -1 5406 lookup[(tmp << 2) & 0x3F] + -1 5407 '=' -1 5408 ) -1 5409 } -1 5410 -1 5411 return parts.join('') -1 5412 } -1 5413 -1 5414 },{}],17:[function(require,module,exports){ -1 5415 (function (module, exports) { -1 5416 'use strict'; -1 5417 -1 5418 // Utils -1 5419 function assert (val, msg) { -1 5420 if (!val) throw new Error(msg || 'Assertion failed'); -1 5421 } -1 5422 -1 5423 // Could use `inherits` module, but don't want to move from single file -1 5424 // architecture yet. -1 5425 function inherits (ctor, superCtor) { -1 5426 ctor.super_ = superCtor; -1 5427 var TempCtor = function () {}; -1 5428 TempCtor.prototype = superCtor.prototype; -1 5429 ctor.prototype = new TempCtor(); -1 5430 ctor.prototype.constructor = ctor; -1 5431 } -1 5432 -1 5433 // BN -1 5434 -1 5435 function BN (number, base, endian) { -1 5436 if (BN.isBN(number)) { -1 5437 return number; -1 5438 } -1 5439 -1 5440 this.negative = 0; -1 5441 this.words = null; -1 5442 this.length = 0; -1 5443 -1 5444 // Reduction context -1 5445 this.red = null; -1 5446 -1 5447 if (number !== null) { -1 5448 if (base === 'le' || base === 'be') { -1 5449 endian = base; -1 5450 base = 10; -1 5451 } -1 5452 -1 5453 this._init(number || 0, base || 10, endian || 'be'); -1 5454 } -1 5455 } -1 5456 if (typeof module === 'object') { -1 5457 module.exports = BN; -1 5458 } else { -1 5459 exports.BN = BN; -1 5460 } -1 5461 -1 5462 BN.BN = BN; -1 5463 BN.wordSize = 26; -1 5464 -1 5465 var Buffer; -1 5466 try { -1 5467 if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') { -1 5468 Buffer = window.Buffer; -1 5469 } else { -1 5470 Buffer = require('buffer').Buffer; -1 5471 } -1 5472 } catch (e) { -1 5473 } -1 5474 -1 5475 BN.isBN = function isBN (num) { -1 5476 if (num instanceof BN) { -1 5477 return true; -1 5478 } -1 5479 -1 5480 return num !== null && typeof num === 'object' && -1 5481 num.constructor.wordSize === BN.wordSize && Array.isArray(num.words); -1 5482 }; -1 5483 -1 5484 BN.max = function max (left, right) { -1 5485 if (left.cmp(right) > 0) return left; -1 5486 return right; -1 5487 }; -1 5488 -1 5489 BN.min = function min (left, right) { -1 5490 if (left.cmp(right) < 0) return left; -1 5491 return right; -1 5492 }; -1 5493 -1 5494 BN.prototype._init = function init (number, base, endian) { -1 5495 if (typeof number === 'number') { -1 5496 return this._initNumber(number, base, endian); -1 5497 } -1 5498 -1 5499 if (typeof number === 'object') { -1 5500 return this._initArray(number, base, endian); -1 5501 } -1 5502 -1 5503 if (base === 'hex') { -1 5504 base = 16; -1 5505 } -1 5506 assert(base === (base | 0) && base >= 2 && base <= 36); -1 5507 -1 5508 number = number.toString().replace(/\s+/g, ''); -1 5509 var start = 0; -1 5510 if (number[0] === '-') { -1 5511 start++; -1 5512 this.negative = 1; -1 5513 } -1 5514 -1 5515 if (start < number.length) { -1 5516 if (base === 16) { -1 5517 this._parseHex(number, start, endian); -1 5518 } else { -1 5519 this._parseBase(number, base, start); -1 5520 if (endian === 'le') { -1 5521 this._initArray(this.toArray(), base, endian); -1 5522 } -1 5523 } -1 5524 } -1 5525 }; -1 5526 -1 5527 BN.prototype._initNumber = function _initNumber (number, base, endian) { -1 5528 if (number < 0) { -1 5529 this.negative = 1; -1 5530 number = -number; -1 5531 } -1 5532 if (number < 0x4000000) { -1 5533 this.words = [number & 0x3ffffff]; -1 5534 this.length = 1; -1 5535 } else if (number < 0x10000000000000) { -1 5536 this.words = [ -1 5537 number & 0x3ffffff, -1 5538 (number / 0x4000000) & 0x3ffffff -1 5539 ]; -1 5540 this.length = 2; -1 5541 } else { -1 5542 assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) -1 5543 this.words = [ -1 5544 number & 0x3ffffff, -1 5545 (number / 0x4000000) & 0x3ffffff, -1 5546 1 -1 5547 ]; -1 5548 this.length = 3; -1 5549 } -1 5550 -1 5551 if (endian !== 'le') return; -1 5552 -1 5553 // Reverse the bytes -1 5554 this._initArray(this.toArray(), base, endian); -1 5555 }; -1 5556 -1 5557 BN.prototype._initArray = function _initArray (number, base, endian) { -1 5558 // Perhaps a Uint8Array -1 5559 assert(typeof number.length === 'number'); -1 5560 if (number.length <= 0) { -1 5561 this.words = [0]; -1 5562 this.length = 1; -1 5563 return this; -1 5564 } -1 5565 -1 5566 this.length = Math.ceil(number.length / 3); -1 5567 this.words = new Array(this.length); -1 5568 for (var i = 0; i < this.length; i++) { -1 5569 this.words[i] = 0; -1 5570 } -1 5571 -1 5572 var j, w; -1 5573 var off = 0; -1 5574 if (endian === 'be') { -1 5575 for (i = number.length - 1, j = 0; i >= 0; i -= 3) { -1 5576 w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); -1 5577 this.words[j] |= (w << off) & 0x3ffffff; -1 5578 this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; -1 5579 off += 24; -1 5580 if (off >= 26) { -1 5581 off -= 26; -1 5582 j++; -1 5583 } -1 5584 } -1 5585 } else if (endian === 'le') { -1 5586 for (i = 0, j = 0; i < number.length; i += 3) { -1 5587 w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); -1 5588 this.words[j] |= (w << off) & 0x3ffffff; -1 5589 this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; -1 5590 off += 24; -1 5591 if (off >= 26) { -1 5592 off -= 26; -1 5593 j++; -1 5594 } -1 5595 } -1 5596 } -1 5597 return this._strip(); -1 5598 }; -1 5599 -1 5600 function parseHex4Bits (string, index) { -1 5601 var c = string.charCodeAt(index); -1 5602 // '0' - '9' -1 5603 if (c >= 48 && c <= 57) { -1 5604 return c - 48; -1 5605 // 'A' - 'F' -1 5606 } else if (c >= 65 && c <= 70) { -1 5607 return c - 55; -1 5608 // 'a' - 'f' -1 5609 } else if (c >= 97 && c <= 102) { -1 5610 return c - 87; -1 5611 } else { -1 5612 assert(false, 'Invalid character in ' + string); -1 5613 } -1 5614 } -1 5615 -1 5616 function parseHexByte (string, lowerBound, index) { -1 5617 var r = parseHex4Bits(string, index); -1 5618 if (index - 1 >= lowerBound) { -1 5619 r |= parseHex4Bits(string, index - 1) << 4; -1 5620 } -1 5621 return r; -1 5622 } -1 5623 -1 5624 BN.prototype._parseHex = function _parseHex (number, start, endian) { -1 5625 // Create possibly bigger array to ensure that it fits the number -1 5626 this.length = Math.ceil((number.length - start) / 6); -1 5627 this.words = new Array(this.length); -1 5628 for (var i = 0; i < this.length; i++) { -1 5629 this.words[i] = 0; -1 5630 } -1 5631 -1 5632 // 24-bits chunks -1 5633 var off = 0; -1 5634 var j = 0; -1 5635 -1 5636 var w; -1 5637 if (endian === 'be') { -1 5638 for (i = number.length - 1; i >= start; i -= 2) { -1 5639 w = parseHexByte(number, start, i) << off; -1 5640 this.words[j] |= w & 0x3ffffff; -1 5641 if (off >= 18) { -1 5642 off -= 18; -1 5643 j += 1; -1 5644 this.words[j] |= w >>> 26; -1 5645 } else { -1 5646 off += 8; -1 5647 } -1 5648 } -1 5649 } else { -1 5650 var parseLength = number.length - start; -1 5651 for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) { -1 5652 w = parseHexByte(number, start, i) << off; -1 5653 this.words[j] |= w & 0x3ffffff; -1 5654 if (off >= 18) { -1 5655 off -= 18; -1 5656 j += 1; -1 5657 this.words[j] |= w >>> 26; -1 5658 } else { -1 5659 off += 8; -1 5660 } -1 5661 } -1 5662 } -1 5663 -1 5664 this._strip(); -1 5665 }; -1 5666 -1 5667 function parseBase (str, start, end, mul) { -1 5668 var r = 0; -1 5669 var b = 0; -1 5670 var len = Math.min(str.length, end); -1 5671 for (var i = start; i < len; i++) { -1 5672 var c = str.charCodeAt(i) - 48; -1 5673 -1 5674 r *= mul; -1 5675 -1 5676 // 'a' -1 5677 if (c >= 49) { -1 5678 b = c - 49 + 0xa; -1 5679 -1 5680 // 'A' -1 5681 } else if (c >= 17) { -1 5682 b = c - 17 + 0xa; -1 5683 -1 5684 // '0' - '9' -1 5685 } else { -1 5686 b = c; -1 5687 } -1 5688 assert(c >= 0 && b < mul, 'Invalid character'); -1 5689 r += b; -1 5690 } -1 5691 return r; -1 5692 } -1 5693 -1 5694 BN.prototype._parseBase = function _parseBase (number, base, start) { -1 5695 // Initialize as zero -1 5696 this.words = [0]; -1 5697 this.length = 1; -1 5698 -1 5699 // Find length of limb in base -1 5700 for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { -1 5701 limbLen++; -1 5702 } -1 5703 limbLen--; -1 5704 limbPow = (limbPow / base) | 0; -1 5705 -1 5706 var total = number.length - start; -1 5707 var mod = total % limbLen; -1 5708 var end = Math.min(total, total - mod) + start; -1 5709 -1 5710 var word = 0; -1 5711 for (var i = start; i < end; i += limbLen) { -1 5712 word = parseBase(number, i, i + limbLen, base); -1 5713 -1 5714 this.imuln(limbPow); -1 5715 if (this.words[0] + word < 0x4000000) { -1 5716 this.words[0] += word; -1 5717 } else { -1 5718 this._iaddn(word); -1 5719 } -1 5720 } -1 5721 -1 5722 if (mod !== 0) { -1 5723 var pow = 1; -1 5724 word = parseBase(number, i, number.length, base); -1 5725 -1 5726 for (i = 0; i < mod; i++) { -1 5727 pow *= base; -1 5728 } -1 5729 -1 5730 this.imuln(pow); -1 5731 if (this.words[0] + word < 0x4000000) { -1 5732 this.words[0] += word; -1 5733 } else { -1 5734 this._iaddn(word); -1 5735 } -1 5736 } -1 5737 -1 5738 this._strip(); -1 5739 }; -1 5740 -1 5741 BN.prototype.copy = function copy (dest) { -1 5742 dest.words = new Array(this.length); -1 5743 for (var i = 0; i < this.length; i++) { -1 5744 dest.words[i] = this.words[i]; -1 5745 } -1 5746 dest.length = this.length; -1 5747 dest.negative = this.negative; -1 5748 dest.red = this.red; -1 5749 }; -1 5750 -1 5751 function move (dest, src) { -1 5752 dest.words = src.words; -1 5753 dest.length = src.length; -1 5754 dest.negative = src.negative; -1 5755 dest.red = src.red; -1 5756 } -1 5757 -1 5758 BN.prototype._move = function _move (dest) { -1 5759 move(dest, this); -1 5760 }; -1 5761 -1 5762 BN.prototype.clone = function clone () { -1 5763 var r = new BN(null); -1 5764 this.copy(r); -1 5765 return r; -1 5766 }; -1 5767 -1 5768 BN.prototype._expand = function _expand (size) { -1 5769 while (this.length < size) { -1 5770 this.words[this.length++] = 0; -1 5771 } -1 5772 return this; -1 5773 }; -1 5774 -1 5775 // Remove leading `0` from `this` -1 5776 BN.prototype._strip = function strip () { -1 5777 while (this.length > 1 && this.words[this.length - 1] === 0) { -1 5778 this.length--; -1 5779 } -1 5780 return this._normSign(); -1 5781 }; -1 5782 -1 5783 BN.prototype._normSign = function _normSign () { -1 5784 // -0 = 0 -1 5785 if (this.length === 1 && this.words[0] === 0) { -1 5786 this.negative = 0; -1 5787 } -1 5788 return this; -1 5789 }; -1 5790 -1 5791 // Check Symbol.for because not everywhere where Symbol defined -1 5792 // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility -1 5793 if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') { -1 5794 try { -1 5795 BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect; -1 5796 } catch (e) { -1 5797 BN.prototype.inspect = inspect; -1 5798 } -1 5799 } else { -1 5800 BN.prototype.inspect = inspect; -1 5801 } -1 5802 -1 5803 function inspect () { -1 5804 return (this.red ? '<BN-R: ' : '<BN: ') + this.toString(16) + '>'; -1 5805 } -1 5806 -1 5807 /* -1 5808 -1 5809 var zeros = []; -1 5810 var groupSizes = []; -1 5811 var groupBases = []; -1 5812 -1 5813 var s = ''; -1 5814 var i = -1; -1 5815 while (++i < BN.wordSize) { -1 5816 zeros[i] = s; -1 5817 s += '0'; -1 5818 } -1 5819 groupSizes[0] = 0; -1 5820 groupSizes[1] = 0; -1 5821 groupBases[0] = 0; -1 5822 groupBases[1] = 0; -1 5823 var base = 2 - 1; -1 5824 while (++base < 36 + 1) { -1 5825 var groupSize = 0; -1 5826 var groupBase = 1; -1 5827 while (groupBase < (1 << BN.wordSize) / base) { -1 5828 groupBase *= base; -1 5829 groupSize += 1; -1 5830 } -1 5831 groupSizes[base] = groupSize; -1 5832 groupBases[base] = groupBase; -1 5833 } -1 5834 -1 5835 */ -1 5836 -1 5837 var zeros = [ -1 5838 '', -1 5839 '0', -1 5840 '00', -1 5841 '000', -1 5842 '0000', -1 5843 '00000', -1 5844 '000000', -1 5845 '0000000', -1 5846 '00000000', -1 5847 '000000000', -1 5848 '0000000000', -1 5849 '00000000000', -1 5850 '000000000000', -1 5851 '0000000000000', -1 5852 '00000000000000', -1 5853 '000000000000000', -1 5854 '0000000000000000', -1 5855 '00000000000000000', -1 5856 '000000000000000000', -1 5857 '0000000000000000000', -1 5858 '00000000000000000000', -1 5859 '000000000000000000000', -1 5860 '0000000000000000000000', -1 5861 '00000000000000000000000', -1 5862 '000000000000000000000000', -1 5863 '0000000000000000000000000' -1 5864 ]; -1 5865 -1 5866 var groupSizes = [ -1 5867 0, 0, -1 5868 25, 16, 12, 11, 10, 9, 8, -1 5869 8, 7, 7, 7, 7, 6, 6, -1 5870 6, 6, 6, 6, 6, 5, 5, -1 5871 5, 5, 5, 5, 5, 5, 5, -1 5872 5, 5, 5, 5, 5, 5, 5 -1 5873 ]; -1 5874 -1 5875 var groupBases = [ -1 5876 0, 0, -1 5877 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, -1 5878 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, -1 5879 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, -1 5880 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, -1 5881 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 -1 5882 ]; -1 5883 -1 5884 BN.prototype.toString = function toString (base, padding) { -1 5885 base = base || 10; -1 5886 padding = padding | 0 || 1; -1 5887 -1 5888 var out; -1 5889 if (base === 16 || base === 'hex') { -1 5890 out = ''; -1 5891 var off = 0; -1 5892 var carry = 0; -1 5893 for (var i = 0; i < this.length; i++) { -1 5894 var w = this.words[i]; -1 5895 var word = (((w << off) | carry) & 0xffffff).toString(16); -1 5896 carry = (w >>> (24 - off)) & 0xffffff; -1 5897 if (carry !== 0 || i !== this.length - 1) { -1 5898 out = zeros[6 - word.length] + word + out; -1 5899 } else { -1 5900 out = word + out; -1 5901 } -1 5902 off += 2; -1 5903 if (off >= 26) { -1 5904 off -= 26; -1 5905 i--; -1 5906 } -1 5907 } -1 5908 if (carry !== 0) { -1 5909 out = carry.toString(16) + out; -1 5910 } -1 5911 while (out.length % padding !== 0) { -1 5912 out = '0' + out; -1 5913 } -1 5914 if (this.negative !== 0) { -1 5915 out = '-' + out; -1 5916 } -1 5917 return out; -1 5918 } -1 5919 -1 5920 if (base === (base | 0) && base >= 2 && base <= 36) { -1 5921 // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); -1 5922 var groupSize = groupSizes[base]; -1 5923 // var groupBase = Math.pow(base, groupSize); -1 5924 var groupBase = groupBases[base]; -1 5925 out = ''; -1 5926 var c = this.clone(); -1 5927 c.negative = 0; -1 5928 while (!c.isZero()) { -1 5929 var r = c.modrn(groupBase).toString(base); -1 5930 c = c.idivn(groupBase); -1 5931 -1 5932 if (!c.isZero()) { -1 5933 out = zeros[groupSize - r.length] + r + out; -1 5934 } else { -1 5935 out = r + out; -1 5936 } -1 5937 } -1 5938 if (this.isZero()) { -1 5939 out = '0' + out; -1 5940 } -1 5941 while (out.length % padding !== 0) { -1 5942 out = '0' + out; -1 5943 } -1 5944 if (this.negative !== 0) { -1 5945 out = '-' + out; -1 5946 } -1 5947 return out; -1 5948 } -1 5949 -1 5950 assert(false, 'Base should be between 2 and 36'); -1 5951 }; -1 5952 -1 5953 BN.prototype.toNumber = function toNumber () { -1 5954 var ret = this.words[0]; -1 5955 if (this.length === 2) { -1 5956 ret += this.words[1] * 0x4000000; -1 5957 } else if (this.length === 3 && this.words[2] === 0x01) { -1 5958 // NOTE: at this stage it is known that the top bit is set -1 5959 ret += 0x10000000000000 + (this.words[1] * 0x4000000); -1 5960 } else if (this.length > 2) { -1 5961 assert(false, 'Number can only safely store up to 53 bits'); -1 5962 } -1 5963 return (this.negative !== 0) ? -ret : ret; -1 5964 }; -1 5965 -1 5966 BN.prototype.toJSON = function toJSON () { -1 5967 return this.toString(16, 2); -1 5968 }; -1 5969 -1 5970 if (Buffer) { -1 5971 BN.prototype.toBuffer = function toBuffer (endian, length) { -1 5972 return this.toArrayLike(Buffer, endian, length); -1 5973 }; -1 5974 } -1 5975 -1 5976 BN.prototype.toArray = function toArray (endian, length) { -1 5977 return this.toArrayLike(Array, endian, length); -1 5978 }; -1 5979 -1 5980 var allocate = function allocate (ArrayType, size) { -1 5981 if (ArrayType.allocUnsafe) { -1 5982 return ArrayType.allocUnsafe(size); -1 5983 } -1 5984 return new ArrayType(size); -1 5985 }; -1 5986 -1 5987 BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { -1 5988 this._strip(); -1 5989 -1 5990 var byteLength = this.byteLength(); -1 5991 var reqLength = length || Math.max(1, byteLength); -1 5992 assert(byteLength <= reqLength, 'byte array longer than desired length'); -1 5993 assert(reqLength > 0, 'Requested array length <= 0'); -1 5994 -1 5995 var res = allocate(ArrayType, reqLength); -1 5996 var postfix = endian === 'le' ? 'LE' : 'BE'; -1 5997 this['_toArrayLike' + postfix](res, byteLength); -1 5998 return res; -1 5999 }; -1 6000 -1 6001 BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) { -1 6002 var position = 0; -1 6003 var carry = 0; -1 6004 -1 6005 for (var i = 0, shift = 0; i < this.length; i++) { -1 6006 var word = (this.words[i] << shift) | carry; -1 6007 -1 6008 res[position++] = word & 0xff; -1 6009 if (position < res.length) { -1 6010 res[position++] = (word >> 8) & 0xff; -1 6011 } -1 6012 if (position < res.length) { -1 6013 res[position++] = (word >> 16) & 0xff; -1 6014 } -1 6015 -1 6016 if (shift === 6) { -1 6017 if (position < res.length) { -1 6018 res[position++] = (word >> 24) & 0xff; -1 6019 } -1 6020 carry = 0; -1 6021 shift = 0; -1 6022 } else { -1 6023 carry = word >>> 24; -1 6024 shift += 2; -1 6025 } -1 6026 } -1 6027 -1 6028 if (position < res.length) { -1 6029 res[position++] = carry; -1 6030 -1 6031 while (position < res.length) { -1 6032 res[position++] = 0; -1 6033 } -1 6034 } -1 6035 }; -1 6036 -1 6037 BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) { -1 6038 var position = res.length - 1; -1 6039 var carry = 0; -1 6040 -1 6041 for (var i = 0, shift = 0; i < this.length; i++) { -1 6042 var word = (this.words[i] << shift) | carry; -1 6043 -1 6044 res[position--] = word & 0xff; -1 6045 if (position >= 0) { -1 6046 res[position--] = (word >> 8) & 0xff; -1 6047 } -1 6048 if (position >= 0) { -1 6049 res[position--] = (word >> 16) & 0xff; -1 6050 } -1 6051 -1 6052 if (shift === 6) { -1 6053 if (position >= 0) { -1 6054 res[position--] = (word >> 24) & 0xff; -1 6055 } -1 6056 carry = 0; -1 6057 shift = 0; -1 6058 } else { -1 6059 carry = word >>> 24; -1 6060 shift += 2; -1 6061 } -1 6062 } -1 6063 -1 6064 if (position >= 0) { -1 6065 res[position--] = carry; -1 6066 -1 6067 while (position >= 0) { -1 6068 res[position--] = 0; -1 6069 } -1 6070 } -1 6071 }; -1 6072 -1 6073 if (Math.clz32) { -1 6074 BN.prototype._countBits = function _countBits (w) { -1 6075 return 32 - Math.clz32(w); -1 6076 }; -1 6077 } else { -1 6078 BN.prototype._countBits = function _countBits (w) { -1 6079 var t = w; -1 6080 var r = 0; -1 6081 if (t >= 0x1000) { -1 6082 r += 13; -1 6083 t >>>= 13; -1 6084 } -1 6085 if (t >= 0x40) { -1 6086 r += 7; -1 6087 t >>>= 7; -1 6088 } -1 6089 if (t >= 0x8) { -1 6090 r += 4; -1 6091 t >>>= 4; -1 6092 } -1 6093 if (t >= 0x02) { -1 6094 r += 2; -1 6095 t >>>= 2; -1 6096 } -1 6097 return r + t; -1 6098 }; -1 6099 } -1 6100 -1 6101 BN.prototype._zeroBits = function _zeroBits (w) { -1 6102 // Short-cut -1 6103 if (w === 0) return 26; -1 6104 -1 6105 var t = w; -1 6106 var r = 0; -1 6107 if ((t & 0x1fff) === 0) { -1 6108 r += 13; -1 6109 t >>>= 13; -1 6110 } -1 6111 if ((t & 0x7f) === 0) { -1 6112 r += 7; -1 6113 t >>>= 7; -1 6114 } -1 6115 if ((t & 0xf) === 0) { -1 6116 r += 4; -1 6117 t >>>= 4; -1 6118 } -1 6119 if ((t & 0x3) === 0) { -1 6120 r += 2; -1 6121 t >>>= 2; -1 6122 } -1 6123 if ((t & 0x1) === 0) { -1 6124 r++; -1 6125 } -1 6126 return r; -1 6127 }; -1 6128 -1 6129 // Return number of used bits in a BN -1 6130 BN.prototype.bitLength = function bitLength () { -1 6131 var w = this.words[this.length - 1]; -1 6132 var hi = this._countBits(w); -1 6133 return (this.length - 1) * 26 + hi; -1 6134 }; -1 6135 -1 6136 function toBitArray (num) { -1 6137 var w = new Array(num.bitLength()); -1 6138 -1 6139 for (var bit = 0; bit < w.length; bit++) { -1 6140 var off = (bit / 26) | 0; -1 6141 var wbit = bit % 26; -1 6142 -1 6143 w[bit] = (num.words[off] >>> wbit) & 0x01; -1 6144 } -1 6145 -1 6146 return w; -1 6147 } -1 6148 -1 6149 // Number of trailing zero bits -1 6150 BN.prototype.zeroBits = function zeroBits () { -1 6151 if (this.isZero()) return 0; -1 6152 -1 6153 var r = 0; -1 6154 for (var i = 0; i < this.length; i++) { -1 6155 var b = this._zeroBits(this.words[i]); -1 6156 r += b; -1 6157 if (b !== 26) break; -1 6158 } -1 6159 return r; -1 6160 }; -1 6161 -1 6162 BN.prototype.byteLength = function byteLength () { -1 6163 return Math.ceil(this.bitLength() / 8); -1 6164 }; -1 6165 -1 6166 BN.prototype.toTwos = function toTwos (width) { -1 6167 if (this.negative !== 0) { -1 6168 return this.abs().inotn(width).iaddn(1); -1 6169 } -1 6170 return this.clone(); -1 6171 }; -1 6172 -1 6173 BN.prototype.fromTwos = function fromTwos (width) { -1 6174 if (this.testn(width - 1)) { -1 6175 return this.notn(width).iaddn(1).ineg(); -1 6176 } -1 6177 return this.clone(); -1 6178 }; -1 6179 -1 6180 BN.prototype.isNeg = function isNeg () { -1 6181 return this.negative !== 0; -1 6182 }; -1 6183 -1 6184 // Return negative clone of `this` -1 6185 BN.prototype.neg = function neg () { -1 6186 return this.clone().ineg(); -1 6187 }; -1 6188 -1 6189 BN.prototype.ineg = function ineg () { -1 6190 if (!this.isZero()) { -1 6191 this.negative ^= 1; -1 6192 } -1 6193 -1 6194 return this; -1 6195 }; -1 6196 -1 6197 // Or `num` with `this` in-place -1 6198 BN.prototype.iuor = function iuor (num) { -1 6199 while (this.length < num.length) { -1 6200 this.words[this.length++] = 0; -1 6201 } -1 6202 -1 6203 for (var i = 0; i < num.length; i++) { -1 6204 this.words[i] = this.words[i] | num.words[i]; -1 6205 } -1 6206 -1 6207 return this._strip(); -1 6208 }; -1 6209 -1 6210 BN.prototype.ior = function ior (num) { -1 6211 assert((this.negative | num.negative) === 0); -1 6212 return this.iuor(num); -1 6213 }; -1 6214 -1 6215 // Or `num` with `this` -1 6216 BN.prototype.or = function or (num) { -1 6217 if (this.length > num.length) return this.clone().ior(num); -1 6218 return num.clone().ior(this); -1 6219 }; -1 6220 -1 6221 BN.prototype.uor = function uor (num) { -1 6222 if (this.length > num.length) return this.clone().iuor(num); -1 6223 return num.clone().iuor(this); -1 6224 }; -1 6225 -1 6226 // And `num` with `this` in-place -1 6227 BN.prototype.iuand = function iuand (num) { -1 6228 // b = min-length(num, this) -1 6229 var b; -1 6230 if (this.length > num.length) { -1 6231 b = num; -1 6232 } else { -1 6233 b = this; -1 6234 } -1 6235 -1 6236 for (var i = 0; i < b.length; i++) { -1 6237 this.words[i] = this.words[i] & num.words[i]; -1 6238 } -1 6239 -1 6240 this.length = b.length; -1 6241 -1 6242 return this._strip(); -1 6243 }; -1 6244 -1 6245 BN.prototype.iand = function iand (num) { -1 6246 assert((this.negative | num.negative) === 0); -1 6247 return this.iuand(num); -1 6248 }; -1 6249 -1 6250 // And `num` with `this` -1 6251 BN.prototype.and = function and (num) { -1 6252 if (this.length > num.length) return this.clone().iand(num); -1 6253 return num.clone().iand(this); -1 6254 }; -1 6255 -1 6256 BN.prototype.uand = function uand (num) { -1 6257 if (this.length > num.length) return this.clone().iuand(num); -1 6258 return num.clone().iuand(this); -1 6259 }; -1 6260 -1 6261 // Xor `num` with `this` in-place -1 6262 BN.prototype.iuxor = function iuxor (num) { -1 6263 // a.length > b.length -1 6264 var a; -1 6265 var b; -1 6266 if (this.length > num.length) { -1 6267 a = this; -1 6268 b = num; -1 6269 } else { -1 6270 a = num; -1 6271 b = this; -1 6272 } -1 6273 -1 6274 for (var i = 0; i < b.length; i++) { -1 6275 this.words[i] = a.words[i] ^ b.words[i]; -1 6276 } -1 6277 -1 6278 if (this !== a) { -1 6279 for (; i < a.length; i++) { -1 6280 this.words[i] = a.words[i]; -1 6281 } -1 6282 } -1 6283 -1 6284 this.length = a.length; -1 6285 -1 6286 return this._strip(); -1 6287 }; -1 6288 -1 6289 BN.prototype.ixor = function ixor (num) { -1 6290 assert((this.negative | num.negative) === 0); -1 6291 return this.iuxor(num); -1 6292 }; -1 6293 -1 6294 // Xor `num` with `this` -1 6295 BN.prototype.xor = function xor (num) { -1 6296 if (this.length > num.length) return this.clone().ixor(num); -1 6297 return num.clone().ixor(this); -1 6298 }; -1 6299 -1 6300 BN.prototype.uxor = function uxor (num) { -1 6301 if (this.length > num.length) return this.clone().iuxor(num); -1 6302 return num.clone().iuxor(this); -1 6303 }; -1 6304 -1 6305 // Not ``this`` with ``width`` bitwidth -1 6306 BN.prototype.inotn = function inotn (width) { -1 6307 assert(typeof width === 'number' && width >= 0); -1 6308 -1 6309 var bytesNeeded = Math.ceil(width / 26) | 0; -1 6310 var bitsLeft = width % 26; -1 6311 -1 6312 // Extend the buffer with leading zeroes -1 6313 this._expand(bytesNeeded); -1 6314 -1 6315 if (bitsLeft > 0) { -1 6316 bytesNeeded--; -1 6317 } -1 6318 -1 6319 // Handle complete words -1 6320 for (var i = 0; i < bytesNeeded; i++) { -1 6321 this.words[i] = ~this.words[i] & 0x3ffffff; -1 6322 } -1 6323 -1 6324 // Handle the residue -1 6325 if (bitsLeft > 0) { -1 6326 this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); -1 6327 } -1 6328 -1 6329 // And remove leading zeroes -1 6330 return this._strip(); -1 6331 }; -1 6332 -1 6333 BN.prototype.notn = function notn (width) { -1 6334 return this.clone().inotn(width); -1 6335 }; -1 6336 -1 6337 // Set `bit` of `this` -1 6338 BN.prototype.setn = function setn (bit, val) { -1 6339 assert(typeof bit === 'number' && bit >= 0); -1 6340 -1 6341 var off = (bit / 26) | 0; -1 6342 var wbit = bit % 26; -1 6343 -1 6344 this._expand(off + 1); -1 6345 -1 6346 if (val) { -1 6347 this.words[off] = this.words[off] | (1 << wbit); -1 6348 } else { -1 6349 this.words[off] = this.words[off] & ~(1 << wbit); -1 6350 } -1 6351 -1 6352 return this._strip(); -1 6353 }; -1 6354 -1 6355 // Add `num` to `this` in-place -1 6356 BN.prototype.iadd = function iadd (num) { -1 6357 var r; -1 6358 -1 6359 // negative + positive -1 6360 if (this.negative !== 0 && num.negative === 0) { -1 6361 this.negative = 0; -1 6362 r = this.isub(num); -1 6363 this.negative ^= 1; -1 6364 return this._normSign(); -1 6365 -1 6366 // positive + negative -1 6367 } else if (this.negative === 0 && num.negative !== 0) { -1 6368 num.negative = 0; -1 6369 r = this.isub(num); -1 6370 num.negative = 1; -1 6371 return r._normSign(); -1 6372 } -1 6373 -1 6374 // a.length > b.length -1 6375 var a, b; -1 6376 if (this.length > num.length) { -1 6377 a = this; -1 6378 b = num; -1 6379 } else { -1 6380 a = num; -1 6381 b = this; -1 6382 } -1 6383 -1 6384 var carry = 0; -1 6385 for (var i = 0; i < b.length; i++) { -1 6386 r = (a.words[i] | 0) + (b.words[i] | 0) + carry; -1 6387 this.words[i] = r & 0x3ffffff; -1 6388 carry = r >>> 26; -1 6389 } -1 6390 for (; carry !== 0 && i < a.length; i++) { -1 6391 r = (a.words[i] | 0) + carry; -1 6392 this.words[i] = r & 0x3ffffff; -1 6393 carry = r >>> 26; -1 6394 } -1 6395 -1 6396 this.length = a.length; -1 6397 if (carry !== 0) { -1 6398 this.words[this.length] = carry; -1 6399 this.length++; -1 6400 // Copy the rest of the words -1 6401 } else if (a !== this) { -1 6402 for (; i < a.length; i++) { -1 6403 this.words[i] = a.words[i]; -1 6404 } -1 6405 } -1 6406 -1 6407 return this; -1 6408 }; -1 6409 -1 6410 // Add `num` to `this` -1 6411 BN.prototype.add = function add (num) { -1 6412 var res; -1 6413 if (num.negative !== 0 && this.negative === 0) { -1 6414 num.negative = 0; -1 6415 res = this.sub(num); -1 6416 num.negative ^= 1; -1 6417 return res; -1 6418 } else if (num.negative === 0 && this.negative !== 0) { -1 6419 this.negative = 0; -1 6420 res = num.sub(this); -1 6421 this.negative = 1; -1 6422 return res; -1 6423 } -1 6424 -1 6425 if (this.length > num.length) return this.clone().iadd(num); -1 6426 -1 6427 return num.clone().iadd(this); -1 6428 }; -1 6429 -1 6430 // Subtract `num` from `this` in-place -1 6431 BN.prototype.isub = function isub (num) { -1 6432 // this - (-num) = this + num -1 6433 if (num.negative !== 0) { -1 6434 num.negative = 0; -1 6435 var r = this.iadd(num); -1 6436 num.negative = 1; -1 6437 return r._normSign(); -1 6438 -1 6439 // -this - num = -(this + num) -1 6440 } else if (this.negative !== 0) { -1 6441 this.negative = 0; -1 6442 this.iadd(num); -1 6443 this.negative = 1; -1 6444 return this._normSign(); -1 6445 } -1 6446 -1 6447 // At this point both numbers are positive -1 6448 var cmp = this.cmp(num); -1 6449 -1 6450 // Optimization - zeroify -1 6451 if (cmp === 0) { -1 6452 this.negative = 0; -1 6453 this.length = 1; -1 6454 this.words[0] = 0; -1 6455 return this; -1 6456 } -1 6457 -1 6458 // a > b -1 6459 var a, b; -1 6460 if (cmp > 0) { -1 6461 a = this; -1 6462 b = num; -1 6463 } else { -1 6464 a = num; -1 6465 b = this; -1 6466 } -1 6467 -1 6468 var carry = 0; -1 6469 for (var i = 0; i < b.length; i++) { -1 6470 r = (a.words[i] | 0) - (b.words[i] | 0) + carry; -1 6471 carry = r >> 26; -1 6472 this.words[i] = r & 0x3ffffff; -1 6473 } -1 6474 for (; carry !== 0 && i < a.length; i++) { -1 6475 r = (a.words[i] | 0) + carry; -1 6476 carry = r >> 26; -1 6477 this.words[i] = r & 0x3ffffff; -1 6478 } -1 6479 -1 6480 // Copy rest of the words -1 6481 if (carry === 0 && i < a.length && a !== this) { -1 6482 for (; i < a.length; i++) { -1 6483 this.words[i] = a.words[i]; -1 6484 } -1 6485 } -1 6486 -1 6487 this.length = Math.max(this.length, i); -1 6488 -1 6489 if (a !== this) { -1 6490 this.negative = 1; -1 6491 } -1 6492 -1 6493 return this._strip(); -1 6494 }; -1 6495 -1 6496 // Subtract `num` from `this` -1 6497 BN.prototype.sub = function sub (num) { -1 6498 return this.clone().isub(num); -1 6499 }; -1 6500 -1 6501 function smallMulTo (self, num, out) { -1 6502 out.negative = num.negative ^ self.negative; -1 6503 var len = (self.length + num.length) | 0; -1 6504 out.length = len; -1 6505 len = (len - 1) | 0; -1 6506 -1 6507 // Peel one iteration (compiler can't do it, because of code complexity) -1 6508 var a = self.words[0] | 0; -1 6509 var b = num.words[0] | 0; -1 6510 var r = a * b; -1 6511 -1 6512 var lo = r & 0x3ffffff; -1 6513 var carry = (r / 0x4000000) | 0; -1 6514 out.words[0] = lo; -1 6515 -1 6516 for (var k = 1; k < len; k++) { -1 6517 // Sum all words with the same `i + j = k` and accumulate `ncarry`, -1 6518 // note that ncarry could be >= 0x3ffffff -1 6519 var ncarry = carry >>> 26; -1 6520 var rword = carry & 0x3ffffff; -1 6521 var maxJ = Math.min(k, num.length - 1); -1 6522 for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { -1 6523 var i = (k - j) | 0; -1 6524 a = self.words[i] | 0; -1 6525 b = num.words[j] | 0; -1 6526 r = a * b + rword; -1 6527 ncarry += (r / 0x4000000) | 0; -1 6528 rword = r & 0x3ffffff; -1 6529 } -1 6530 out.words[k] = rword | 0; -1 6531 carry = ncarry | 0; -1 6532 } -1 6533 if (carry !== 0) { -1 6534 out.words[k] = carry | 0; -1 6535 } else { -1 6536 out.length--; -1 6537 } -1 6538 -1 6539 return out._strip(); -1 6540 } -1 6541 -1 6542 // TODO(indutny): it may be reasonable to omit it for users who don't need -1 6543 // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit -1 6544 // multiplication (like elliptic secp256k1). -1 6545 var comb10MulTo = function comb10MulTo (self, num, out) { -1 6546 var a = self.words; -1 6547 var b = num.words; -1 6548 var o = out.words; -1 6549 var c = 0; -1 6550 var lo; -1 6551 var mid; -1 6552 var hi; -1 6553 var a0 = a[0] | 0; -1 6554 var al0 = a0 & 0x1fff; -1 6555 var ah0 = a0 >>> 13; -1 6556 var a1 = a[1] | 0; -1 6557 var al1 = a1 & 0x1fff; -1 6558 var ah1 = a1 >>> 13; -1 6559 var a2 = a[2] | 0; -1 6560 var al2 = a2 & 0x1fff; -1 6561 var ah2 = a2 >>> 13; -1 6562 var a3 = a[3] | 0; -1 6563 var al3 = a3 & 0x1fff; -1 6564 var ah3 = a3 >>> 13; -1 6565 var a4 = a[4] | 0; -1 6566 var al4 = a4 & 0x1fff; -1 6567 var ah4 = a4 >>> 13; -1 6568 var a5 = a[5] | 0; -1 6569 var al5 = a5 & 0x1fff; -1 6570 var ah5 = a5 >>> 13; -1 6571 var a6 = a[6] | 0; -1 6572 var al6 = a6 & 0x1fff; -1 6573 var ah6 = a6 >>> 13; -1 6574 var a7 = a[7] | 0; -1 6575 var al7 = a7 & 0x1fff; -1 6576 var ah7 = a7 >>> 13; -1 6577 var a8 = a[8] | 0; -1 6578 var al8 = a8 & 0x1fff; -1 6579 var ah8 = a8 >>> 13; -1 6580 var a9 = a[9] | 0; -1 6581 var al9 = a9 & 0x1fff; -1 6582 var ah9 = a9 >>> 13; -1 6583 var b0 = b[0] | 0; -1 6584 var bl0 = b0 & 0x1fff; -1 6585 var bh0 = b0 >>> 13; -1 6586 var b1 = b[1] | 0; -1 6587 var bl1 = b1 & 0x1fff; -1 6588 var bh1 = b1 >>> 13; -1 6589 var b2 = b[2] | 0; -1 6590 var bl2 = b2 & 0x1fff; -1 6591 var bh2 = b2 >>> 13; -1 6592 var b3 = b[3] | 0; -1 6593 var bl3 = b3 & 0x1fff; -1 6594 var bh3 = b3 >>> 13; -1 6595 var b4 = b[4] | 0; -1 6596 var bl4 = b4 & 0x1fff; -1 6597 var bh4 = b4 >>> 13; -1 6598 var b5 = b[5] | 0; -1 6599 var bl5 = b5 & 0x1fff; -1 6600 var bh5 = b5 >>> 13; -1 6601 var b6 = b[6] | 0; -1 6602 var bl6 = b6 & 0x1fff; -1 6603 var bh6 = b6 >>> 13; -1 6604 var b7 = b[7] | 0; -1 6605 var bl7 = b7 & 0x1fff; -1 6606 var bh7 = b7 >>> 13; -1 6607 var b8 = b[8] | 0; -1 6608 var bl8 = b8 & 0x1fff; -1 6609 var bh8 = b8 >>> 13; -1 6610 var b9 = b[9] | 0; -1 6611 var bl9 = b9 & 0x1fff; -1 6612 var bh9 = b9 >>> 13; -1 6613 -1 6614 out.negative = self.negative ^ num.negative; -1 6615 out.length = 19; -1 6616 /* k = 0 */ -1 6617 lo = Math.imul(al0, bl0); -1 6618 mid = Math.imul(al0, bh0); -1 6619 mid = (mid + Math.imul(ah0, bl0)) | 0; -1 6620 hi = Math.imul(ah0, bh0); -1 6621 var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 6622 c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; -1 6623 w0 &= 0x3ffffff; -1 6624 /* k = 1 */ -1 6625 lo = Math.imul(al1, bl0); -1 6626 mid = Math.imul(al1, bh0); -1 6627 mid = (mid + Math.imul(ah1, bl0)) | 0; -1 6628 hi = Math.imul(ah1, bh0); -1 6629 lo = (lo + Math.imul(al0, bl1)) | 0; -1 6630 mid = (mid + Math.imul(al0, bh1)) | 0; -1 6631 mid = (mid + Math.imul(ah0, bl1)) | 0; -1 6632 hi = (hi + Math.imul(ah0, bh1)) | 0; -1 6633 var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 6634 c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; -1 6635 w1 &= 0x3ffffff; -1 6636 /* k = 2 */ -1 6637 lo = Math.imul(al2, bl0); -1 6638 mid = Math.imul(al2, bh0); -1 6639 mid = (mid + Math.imul(ah2, bl0)) | 0; -1 6640 hi = Math.imul(ah2, bh0); -1 6641 lo = (lo + Math.imul(al1, bl1)) | 0; -1 6642 mid = (mid + Math.imul(al1, bh1)) | 0; -1 6643 mid = (mid + Math.imul(ah1, bl1)) | 0; -1 6644 hi = (hi + Math.imul(ah1, bh1)) | 0; -1 6645 lo = (lo + Math.imul(al0, bl2)) | 0; -1 6646 mid = (mid + Math.imul(al0, bh2)) | 0; -1 6647 mid = (mid + Math.imul(ah0, bl2)) | 0; -1 6648 hi = (hi + Math.imul(ah0, bh2)) | 0; -1 6649 var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 6650 c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; -1 6651 w2 &= 0x3ffffff; -1 6652 /* k = 3 */ -1 6653 lo = Math.imul(al3, bl0); -1 6654 mid = Math.imul(al3, bh0); -1 6655 mid = (mid + Math.imul(ah3, bl0)) | 0; -1 6656 hi = Math.imul(ah3, bh0); -1 6657 lo = (lo + Math.imul(al2, bl1)) | 0; -1 6658 mid = (mid + Math.imul(al2, bh1)) | 0; -1 6659 mid = (mid + Math.imul(ah2, bl1)) | 0; -1 6660 hi = (hi + Math.imul(ah2, bh1)) | 0; -1 6661 lo = (lo + Math.imul(al1, bl2)) | 0; -1 6662 mid = (mid + Math.imul(al1, bh2)) | 0; -1 6663 mid = (mid + Math.imul(ah1, bl2)) | 0; -1 6664 hi = (hi + Math.imul(ah1, bh2)) | 0; -1 6665 lo = (lo + Math.imul(al0, bl3)) | 0; -1 6666 mid = (mid + Math.imul(al0, bh3)) | 0; -1 6667 mid = (mid + Math.imul(ah0, bl3)) | 0; -1 6668 hi = (hi + Math.imul(ah0, bh3)) | 0; -1 6669 var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 6670 c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; -1 6671 w3 &= 0x3ffffff; -1 6672 /* k = 4 */ -1 6673 lo = Math.imul(al4, bl0); -1 6674 mid = Math.imul(al4, bh0); -1 6675 mid = (mid + Math.imul(ah4, bl0)) | 0; -1 6676 hi = Math.imul(ah4, bh0); -1 6677 lo = (lo + Math.imul(al3, bl1)) | 0; -1 6678 mid = (mid + Math.imul(al3, bh1)) | 0; -1 6679 mid = (mid + Math.imul(ah3, bl1)) | 0; -1 6680 hi = (hi + Math.imul(ah3, bh1)) | 0; -1 6681 lo = (lo + Math.imul(al2, bl2)) | 0; -1 6682 mid = (mid + Math.imul(al2, bh2)) | 0; -1 6683 mid = (mid + Math.imul(ah2, bl2)) | 0; -1 6684 hi = (hi + Math.imul(ah2, bh2)) | 0; -1 6685 lo = (lo + Math.imul(al1, bl3)) | 0; -1 6686 mid = (mid + Math.imul(al1, bh3)) | 0; -1 6687 mid = (mid + Math.imul(ah1, bl3)) | 0; -1 6688 hi = (hi + Math.imul(ah1, bh3)) | 0; -1 6689 lo = (lo + Math.imul(al0, bl4)) | 0; -1 6690 mid = (mid + Math.imul(al0, bh4)) | 0; -1 6691 mid = (mid + Math.imul(ah0, bl4)) | 0; -1 6692 hi = (hi + Math.imul(ah0, bh4)) | 0; -1 6693 var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 6694 c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; -1 6695 w4 &= 0x3ffffff; -1 6696 /* k = 5 */ -1 6697 lo = Math.imul(al5, bl0); -1 6698 mid = Math.imul(al5, bh0); -1 6699 mid = (mid + Math.imul(ah5, bl0)) | 0; -1 6700 hi = Math.imul(ah5, bh0); -1 6701 lo = (lo + Math.imul(al4, bl1)) | 0; -1 6702 mid = (mid + Math.imul(al4, bh1)) | 0; -1 6703 mid = (mid + Math.imul(ah4, bl1)) | 0; -1 6704 hi = (hi + Math.imul(ah4, bh1)) | 0; -1 6705 lo = (lo + Math.imul(al3, bl2)) | 0; -1 6706 mid = (mid + Math.imul(al3, bh2)) | 0; -1 6707 mid = (mid + Math.imul(ah3, bl2)) | 0; -1 6708 hi = (hi + Math.imul(ah3, bh2)) | 0; -1 6709 lo = (lo + Math.imul(al2, bl3)) | 0; -1 6710 mid = (mid + Math.imul(al2, bh3)) | 0; -1 6711 mid = (mid + Math.imul(ah2, bl3)) | 0; -1 6712 hi = (hi + Math.imul(ah2, bh3)) | 0; -1 6713 lo = (lo + Math.imul(al1, bl4)) | 0; -1 6714 mid = (mid + Math.imul(al1, bh4)) | 0; -1 6715 mid = (mid + Math.imul(ah1, bl4)) | 0; -1 6716 hi = (hi + Math.imul(ah1, bh4)) | 0; -1 6717 lo = (lo + Math.imul(al0, bl5)) | 0; -1 6718 mid = (mid + Math.imul(al0, bh5)) | 0; -1 6719 mid = (mid + Math.imul(ah0, bl5)) | 0; -1 6720 hi = (hi + Math.imul(ah0, bh5)) | 0; -1 6721 var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 6722 c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; -1 6723 w5 &= 0x3ffffff; -1 6724 /* k = 6 */ -1 6725 lo = Math.imul(al6, bl0); -1 6726 mid = Math.imul(al6, bh0); -1 6727 mid = (mid + Math.imul(ah6, bl0)) | 0; -1 6728 hi = Math.imul(ah6, bh0); -1 6729 lo = (lo + Math.imul(al5, bl1)) | 0; -1 6730 mid = (mid + Math.imul(al5, bh1)) | 0; -1 6731 mid = (mid + Math.imul(ah5, bl1)) | 0; -1 6732 hi = (hi + Math.imul(ah5, bh1)) | 0; -1 6733 lo = (lo + Math.imul(al4, bl2)) | 0; -1 6734 mid = (mid + Math.imul(al4, bh2)) | 0; -1 6735 mid = (mid + Math.imul(ah4, bl2)) | 0; -1 6736 hi = (hi + Math.imul(ah4, bh2)) | 0; -1 6737 lo = (lo + Math.imul(al3, bl3)) | 0; -1 6738 mid = (mid + Math.imul(al3, bh3)) | 0; -1 6739 mid = (mid + Math.imul(ah3, bl3)) | 0; -1 6740 hi = (hi + Math.imul(ah3, bh3)) | 0; -1 6741 lo = (lo + Math.imul(al2, bl4)) | 0; -1 6742 mid = (mid + Math.imul(al2, bh4)) | 0; -1 6743 mid = (mid + Math.imul(ah2, bl4)) | 0; -1 6744 hi = (hi + Math.imul(ah2, bh4)) | 0; -1 6745 lo = (lo + Math.imul(al1, bl5)) | 0; -1 6746 mid = (mid + Math.imul(al1, bh5)) | 0; -1 6747 mid = (mid + Math.imul(ah1, bl5)) | 0; -1 6748 hi = (hi + Math.imul(ah1, bh5)) | 0; -1 6749 lo = (lo + Math.imul(al0, bl6)) | 0; -1 6750 mid = (mid + Math.imul(al0, bh6)) | 0; -1 6751 mid = (mid + Math.imul(ah0, bl6)) | 0; -1 6752 hi = (hi + Math.imul(ah0, bh6)) | 0; -1 6753 var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 6754 c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; -1 6755 w6 &= 0x3ffffff; -1 6756 /* k = 7 */ -1 6757 lo = Math.imul(al7, bl0); -1 6758 mid = Math.imul(al7, bh0); -1 6759 mid = (mid + Math.imul(ah7, bl0)) | 0; -1 6760 hi = Math.imul(ah7, bh0); -1 6761 lo = (lo + Math.imul(al6, bl1)) | 0; -1 6762 mid = (mid + Math.imul(al6, bh1)) | 0; -1 6763 mid = (mid + Math.imul(ah6, bl1)) | 0; -1 6764 hi = (hi + Math.imul(ah6, bh1)) | 0; -1 6765 lo = (lo + Math.imul(al5, bl2)) | 0; -1 6766 mid = (mid + Math.imul(al5, bh2)) | 0; -1 6767 mid = (mid + Math.imul(ah5, bl2)) | 0; -1 6768 hi = (hi + Math.imul(ah5, bh2)) | 0; -1 6769 lo = (lo + Math.imul(al4, bl3)) | 0; -1 6770 mid = (mid + Math.imul(al4, bh3)) | 0; -1 6771 mid = (mid + Math.imul(ah4, bl3)) | 0; -1 6772 hi = (hi + Math.imul(ah4, bh3)) | 0; -1 6773 lo = (lo + Math.imul(al3, bl4)) | 0; -1 6774 mid = (mid + Math.imul(al3, bh4)) | 0; -1 6775 mid = (mid + Math.imul(ah3, bl4)) | 0; -1 6776 hi = (hi + Math.imul(ah3, bh4)) | 0; -1 6777 lo = (lo + Math.imul(al2, bl5)) | 0; -1 6778 mid = (mid + Math.imul(al2, bh5)) | 0; -1 6779 mid = (mid + Math.imul(ah2, bl5)) | 0; -1 6780 hi = (hi + Math.imul(ah2, bh5)) | 0; -1 6781 lo = (lo + Math.imul(al1, bl6)) | 0; -1 6782 mid = (mid + Math.imul(al1, bh6)) | 0; -1 6783 mid = (mid + Math.imul(ah1, bl6)) | 0; -1 6784 hi = (hi + Math.imul(ah1, bh6)) | 0; -1 6785 lo = (lo + Math.imul(al0, bl7)) | 0; -1 6786 mid = (mid + Math.imul(al0, bh7)) | 0; -1 6787 mid = (mid + Math.imul(ah0, bl7)) | 0; -1 6788 hi = (hi + Math.imul(ah0, bh7)) | 0; -1 6789 var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 6790 c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; -1 6791 w7 &= 0x3ffffff; -1 6792 /* k = 8 */ -1 6793 lo = Math.imul(al8, bl0); -1 6794 mid = Math.imul(al8, bh0); -1 6795 mid = (mid + Math.imul(ah8, bl0)) | 0; -1 6796 hi = Math.imul(ah8, bh0); -1 6797 lo = (lo + Math.imul(al7, bl1)) | 0; -1 6798 mid = (mid + Math.imul(al7, bh1)) | 0; -1 6799 mid = (mid + Math.imul(ah7, bl1)) | 0; -1 6800 hi = (hi + Math.imul(ah7, bh1)) | 0; -1 6801 lo = (lo + Math.imul(al6, bl2)) | 0; -1 6802 mid = (mid + Math.imul(al6, bh2)) | 0; -1 6803 mid = (mid + Math.imul(ah6, bl2)) | 0; -1 6804 hi = (hi + Math.imul(ah6, bh2)) | 0; -1 6805 lo = (lo + Math.imul(al5, bl3)) | 0; -1 6806 mid = (mid + Math.imul(al5, bh3)) | 0; -1 6807 mid = (mid + Math.imul(ah5, bl3)) | 0; -1 6808 hi = (hi + Math.imul(ah5, bh3)) | 0; -1 6809 lo = (lo + Math.imul(al4, bl4)) | 0; -1 6810 mid = (mid + Math.imul(al4, bh4)) | 0; -1 6811 mid = (mid + Math.imul(ah4, bl4)) | 0; -1 6812 hi = (hi + Math.imul(ah4, bh4)) | 0; -1 6813 lo = (lo + Math.imul(al3, bl5)) | 0; -1 6814 mid = (mid + Math.imul(al3, bh5)) | 0; -1 6815 mid = (mid + Math.imul(ah3, bl5)) | 0; -1 6816 hi = (hi + Math.imul(ah3, bh5)) | 0; -1 6817 lo = (lo + Math.imul(al2, bl6)) | 0; -1 6818 mid = (mid + Math.imul(al2, bh6)) | 0; -1 6819 mid = (mid + Math.imul(ah2, bl6)) | 0; -1 6820 hi = (hi + Math.imul(ah2, bh6)) | 0; -1 6821 lo = (lo + Math.imul(al1, bl7)) | 0; -1 6822 mid = (mid + Math.imul(al1, bh7)) | 0; -1 6823 mid = (mid + Math.imul(ah1, bl7)) | 0; -1 6824 hi = (hi + Math.imul(ah1, bh7)) | 0; -1 6825 lo = (lo + Math.imul(al0, bl8)) | 0; -1 6826 mid = (mid + Math.imul(al0, bh8)) | 0; -1 6827 mid = (mid + Math.imul(ah0, bl8)) | 0; -1 6828 hi = (hi + Math.imul(ah0, bh8)) | 0; -1 6829 var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 6830 c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; -1 6831 w8 &= 0x3ffffff; -1 6832 /* k = 9 */ -1 6833 lo = Math.imul(al9, bl0); -1 6834 mid = Math.imul(al9, bh0); -1 6835 mid = (mid + Math.imul(ah9, bl0)) | 0; -1 6836 hi = Math.imul(ah9, bh0); -1 6837 lo = (lo + Math.imul(al8, bl1)) | 0; -1 6838 mid = (mid + Math.imul(al8, bh1)) | 0; -1 6839 mid = (mid + Math.imul(ah8, bl1)) | 0; -1 6840 hi = (hi + Math.imul(ah8, bh1)) | 0; -1 6841 lo = (lo + Math.imul(al7, bl2)) | 0; -1 6842 mid = (mid + Math.imul(al7, bh2)) | 0; -1 6843 mid = (mid + Math.imul(ah7, bl2)) | 0; -1 6844 hi = (hi + Math.imul(ah7, bh2)) | 0; -1 6845 lo = (lo + Math.imul(al6, bl3)) | 0; -1 6846 mid = (mid + Math.imul(al6, bh3)) | 0; -1 6847 mid = (mid + Math.imul(ah6, bl3)) | 0; -1 6848 hi = (hi + Math.imul(ah6, bh3)) | 0; -1 6849 lo = (lo + Math.imul(al5, bl4)) | 0; -1 6850 mid = (mid + Math.imul(al5, bh4)) | 0; -1 6851 mid = (mid + Math.imul(ah5, bl4)) | 0; -1 6852 hi = (hi + Math.imul(ah5, bh4)) | 0; -1 6853 lo = (lo + Math.imul(al4, bl5)) | 0; -1 6854 mid = (mid + Math.imul(al4, bh5)) | 0; -1 6855 mid = (mid + Math.imul(ah4, bl5)) | 0; -1 6856 hi = (hi + Math.imul(ah4, bh5)) | 0; -1 6857 lo = (lo + Math.imul(al3, bl6)) | 0; -1 6858 mid = (mid + Math.imul(al3, bh6)) | 0; -1 6859 mid = (mid + Math.imul(ah3, bl6)) | 0; -1 6860 hi = (hi + Math.imul(ah3, bh6)) | 0; -1 6861 lo = (lo + Math.imul(al2, bl7)) | 0; -1 6862 mid = (mid + Math.imul(al2, bh7)) | 0; -1 6863 mid = (mid + Math.imul(ah2, bl7)) | 0; -1 6864 hi = (hi + Math.imul(ah2, bh7)) | 0; -1 6865 lo = (lo + Math.imul(al1, bl8)) | 0; -1 6866 mid = (mid + Math.imul(al1, bh8)) | 0; -1 6867 mid = (mid + Math.imul(ah1, bl8)) | 0; -1 6868 hi = (hi + Math.imul(ah1, bh8)) | 0; -1 6869 lo = (lo + Math.imul(al0, bl9)) | 0; -1 6870 mid = (mid + Math.imul(al0, bh9)) | 0; -1 6871 mid = (mid + Math.imul(ah0, bl9)) | 0; -1 6872 hi = (hi + Math.imul(ah0, bh9)) | 0; -1 6873 var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 6874 c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; -1 6875 w9 &= 0x3ffffff; -1 6876 /* k = 10 */ -1 6877 lo = Math.imul(al9, bl1); -1 6878 mid = Math.imul(al9, bh1); -1 6879 mid = (mid + Math.imul(ah9, bl1)) | 0; -1 6880 hi = Math.imul(ah9, bh1); -1 6881 lo = (lo + Math.imul(al8, bl2)) | 0; -1 6882 mid = (mid + Math.imul(al8, bh2)) | 0; -1 6883 mid = (mid + Math.imul(ah8, bl2)) | 0; -1 6884 hi = (hi + Math.imul(ah8, bh2)) | 0; -1 6885 lo = (lo + Math.imul(al7, bl3)) | 0; -1 6886 mid = (mid + Math.imul(al7, bh3)) | 0; -1 6887 mid = (mid + Math.imul(ah7, bl3)) | 0; -1 6888 hi = (hi + Math.imul(ah7, bh3)) | 0; -1 6889 lo = (lo + Math.imul(al6, bl4)) | 0; -1 6890 mid = (mid + Math.imul(al6, bh4)) | 0; -1 6891 mid = (mid + Math.imul(ah6, bl4)) | 0; -1 6892 hi = (hi + Math.imul(ah6, bh4)) | 0; -1 6893 lo = (lo + Math.imul(al5, bl5)) | 0; -1 6894 mid = (mid + Math.imul(al5, bh5)) | 0; -1 6895 mid = (mid + Math.imul(ah5, bl5)) | 0; -1 6896 hi = (hi + Math.imul(ah5, bh5)) | 0; -1 6897 lo = (lo + Math.imul(al4, bl6)) | 0; -1 6898 mid = (mid + Math.imul(al4, bh6)) | 0; -1 6899 mid = (mid + Math.imul(ah4, bl6)) | 0; -1 6900 hi = (hi + Math.imul(ah4, bh6)) | 0; -1 6901 lo = (lo + Math.imul(al3, bl7)) | 0; -1 6902 mid = (mid + Math.imul(al3, bh7)) | 0; -1 6903 mid = (mid + Math.imul(ah3, bl7)) | 0; -1 6904 hi = (hi + Math.imul(ah3, bh7)) | 0; -1 6905 lo = (lo + Math.imul(al2, bl8)) | 0; -1 6906 mid = (mid + Math.imul(al2, bh8)) | 0; -1 6907 mid = (mid + Math.imul(ah2, bl8)) | 0; -1 6908 hi = (hi + Math.imul(ah2, bh8)) | 0; -1 6909 lo = (lo + Math.imul(al1, bl9)) | 0; -1 6910 mid = (mid + Math.imul(al1, bh9)) | 0; -1 6911 mid = (mid + Math.imul(ah1, bl9)) | 0; -1 6912 hi = (hi + Math.imul(ah1, bh9)) | 0; -1 6913 var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 6914 c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; -1 6915 w10 &= 0x3ffffff; -1 6916 /* k = 11 */ -1 6917 lo = Math.imul(al9, bl2); -1 6918 mid = Math.imul(al9, bh2); -1 6919 mid = (mid + Math.imul(ah9, bl2)) | 0; -1 6920 hi = Math.imul(ah9, bh2); -1 6921 lo = (lo + Math.imul(al8, bl3)) | 0; -1 6922 mid = (mid + Math.imul(al8, bh3)) | 0; -1 6923 mid = (mid + Math.imul(ah8, bl3)) | 0; -1 6924 hi = (hi + Math.imul(ah8, bh3)) | 0; -1 6925 lo = (lo + Math.imul(al7, bl4)) | 0; -1 6926 mid = (mid + Math.imul(al7, bh4)) | 0; -1 6927 mid = (mid + Math.imul(ah7, bl4)) | 0; -1 6928 hi = (hi + Math.imul(ah7, bh4)) | 0; -1 6929 lo = (lo + Math.imul(al6, bl5)) | 0; -1 6930 mid = (mid + Math.imul(al6, bh5)) | 0; -1 6931 mid = (mid + Math.imul(ah6, bl5)) | 0; -1 6932 hi = (hi + Math.imul(ah6, bh5)) | 0; -1 6933 lo = (lo + Math.imul(al5, bl6)) | 0; -1 6934 mid = (mid + Math.imul(al5, bh6)) | 0; -1 6935 mid = (mid + Math.imul(ah5, bl6)) | 0; -1 6936 hi = (hi + Math.imul(ah5, bh6)) | 0; -1 6937 lo = (lo + Math.imul(al4, bl7)) | 0; -1 6938 mid = (mid + Math.imul(al4, bh7)) | 0; -1 6939 mid = (mid + Math.imul(ah4, bl7)) | 0; -1 6940 hi = (hi + Math.imul(ah4, bh7)) | 0; -1 6941 lo = (lo + Math.imul(al3, bl8)) | 0; -1 6942 mid = (mid + Math.imul(al3, bh8)) | 0; -1 6943 mid = (mid + Math.imul(ah3, bl8)) | 0; -1 6944 hi = (hi + Math.imul(ah3, bh8)) | 0; -1 6945 lo = (lo + Math.imul(al2, bl9)) | 0; -1 6946 mid = (mid + Math.imul(al2, bh9)) | 0; -1 6947 mid = (mid + Math.imul(ah2, bl9)) | 0; -1 6948 hi = (hi + Math.imul(ah2, bh9)) | 0; -1 6949 var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 6950 c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; -1 6951 w11 &= 0x3ffffff; -1 6952 /* k = 12 */ -1 6953 lo = Math.imul(al9, bl3); -1 6954 mid = Math.imul(al9, bh3); -1 6955 mid = (mid + Math.imul(ah9, bl3)) | 0; -1 6956 hi = Math.imul(ah9, bh3); -1 6957 lo = (lo + Math.imul(al8, bl4)) | 0; -1 6958 mid = (mid + Math.imul(al8, bh4)) | 0; -1 6959 mid = (mid + Math.imul(ah8, bl4)) | 0; -1 6960 hi = (hi + Math.imul(ah8, bh4)) | 0; -1 6961 lo = (lo + Math.imul(al7, bl5)) | 0; -1 6962 mid = (mid + Math.imul(al7, bh5)) | 0; -1 6963 mid = (mid + Math.imul(ah7, bl5)) | 0; -1 6964 hi = (hi + Math.imul(ah7, bh5)) | 0; -1 6965 lo = (lo + Math.imul(al6, bl6)) | 0; -1 6966 mid = (mid + Math.imul(al6, bh6)) | 0; -1 6967 mid = (mid + Math.imul(ah6, bl6)) | 0; -1 6968 hi = (hi + Math.imul(ah6, bh6)) | 0; -1 6969 lo = (lo + Math.imul(al5, bl7)) | 0; -1 6970 mid = (mid + Math.imul(al5, bh7)) | 0; -1 6971 mid = (mid + Math.imul(ah5, bl7)) | 0; -1 6972 hi = (hi + Math.imul(ah5, bh7)) | 0; -1 6973 lo = (lo + Math.imul(al4, bl8)) | 0; -1 6974 mid = (mid + Math.imul(al4, bh8)) | 0; -1 6975 mid = (mid + Math.imul(ah4, bl8)) | 0; -1 6976 hi = (hi + Math.imul(ah4, bh8)) | 0; -1 6977 lo = (lo + Math.imul(al3, bl9)) | 0; -1 6978 mid = (mid + Math.imul(al3, bh9)) | 0; -1 6979 mid = (mid + Math.imul(ah3, bl9)) | 0; -1 6980 hi = (hi + Math.imul(ah3, bh9)) | 0; -1 6981 var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 6982 c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; -1 6983 w12 &= 0x3ffffff; -1 6984 /* k = 13 */ -1 6985 lo = Math.imul(al9, bl4); -1 6986 mid = Math.imul(al9, bh4); -1 6987 mid = (mid + Math.imul(ah9, bl4)) | 0; -1 6988 hi = Math.imul(ah9, bh4); -1 6989 lo = (lo + Math.imul(al8, bl5)) | 0; -1 6990 mid = (mid + Math.imul(al8, bh5)) | 0; -1 6991 mid = (mid + Math.imul(ah8, bl5)) | 0; -1 6992 hi = (hi + Math.imul(ah8, bh5)) | 0; -1 6993 lo = (lo + Math.imul(al7, bl6)) | 0; -1 6994 mid = (mid + Math.imul(al7, bh6)) | 0; -1 6995 mid = (mid + Math.imul(ah7, bl6)) | 0; -1 6996 hi = (hi + Math.imul(ah7, bh6)) | 0; -1 6997 lo = (lo + Math.imul(al6, bl7)) | 0; -1 6998 mid = (mid + Math.imul(al6, bh7)) | 0; -1 6999 mid = (mid + Math.imul(ah6, bl7)) | 0; -1 7000 hi = (hi + Math.imul(ah6, bh7)) | 0; -1 7001 lo = (lo + Math.imul(al5, bl8)) | 0; -1 7002 mid = (mid + Math.imul(al5, bh8)) | 0; -1 7003 mid = (mid + Math.imul(ah5, bl8)) | 0; -1 7004 hi = (hi + Math.imul(ah5, bh8)) | 0; -1 7005 lo = (lo + Math.imul(al4, bl9)) | 0; -1 7006 mid = (mid + Math.imul(al4, bh9)) | 0; -1 7007 mid = (mid + Math.imul(ah4, bl9)) | 0; -1 7008 hi = (hi + Math.imul(ah4, bh9)) | 0; -1 7009 var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 7010 c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; -1 7011 w13 &= 0x3ffffff; -1 7012 /* k = 14 */ -1 7013 lo = Math.imul(al9, bl5); -1 7014 mid = Math.imul(al9, bh5); -1 7015 mid = (mid + Math.imul(ah9, bl5)) | 0; -1 7016 hi = Math.imul(ah9, bh5); -1 7017 lo = (lo + Math.imul(al8, bl6)) | 0; -1 7018 mid = (mid + Math.imul(al8, bh6)) | 0; -1 7019 mid = (mid + Math.imul(ah8, bl6)) | 0; -1 7020 hi = (hi + Math.imul(ah8, bh6)) | 0; -1 7021 lo = (lo + Math.imul(al7, bl7)) | 0; -1 7022 mid = (mid + Math.imul(al7, bh7)) | 0; -1 7023 mid = (mid + Math.imul(ah7, bl7)) | 0; -1 7024 hi = (hi + Math.imul(ah7, bh7)) | 0; -1 7025 lo = (lo + Math.imul(al6, bl8)) | 0; -1 7026 mid = (mid + Math.imul(al6, bh8)) | 0; -1 7027 mid = (mid + Math.imul(ah6, bl8)) | 0; -1 7028 hi = (hi + Math.imul(ah6, bh8)) | 0; -1 7029 lo = (lo + Math.imul(al5, bl9)) | 0; -1 7030 mid = (mid + Math.imul(al5, bh9)) | 0; -1 7031 mid = (mid + Math.imul(ah5, bl9)) | 0; -1 7032 hi = (hi + Math.imul(ah5, bh9)) | 0; -1 7033 var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 7034 c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; -1 7035 w14 &= 0x3ffffff; -1 7036 /* k = 15 */ -1 7037 lo = Math.imul(al9, bl6); -1 7038 mid = Math.imul(al9, bh6); -1 7039 mid = (mid + Math.imul(ah9, bl6)) | 0; -1 7040 hi = Math.imul(ah9, bh6); -1 7041 lo = (lo + Math.imul(al8, bl7)) | 0; -1 7042 mid = (mid + Math.imul(al8, bh7)) | 0; -1 7043 mid = (mid + Math.imul(ah8, bl7)) | 0; -1 7044 hi = (hi + Math.imul(ah8, bh7)) | 0; -1 7045 lo = (lo + Math.imul(al7, bl8)) | 0; -1 7046 mid = (mid + Math.imul(al7, bh8)) | 0; -1 7047 mid = (mid + Math.imul(ah7, bl8)) | 0; -1 7048 hi = (hi + Math.imul(ah7, bh8)) | 0; -1 7049 lo = (lo + Math.imul(al6, bl9)) | 0; -1 7050 mid = (mid + Math.imul(al6, bh9)) | 0; -1 7051 mid = (mid + Math.imul(ah6, bl9)) | 0; -1 7052 hi = (hi + Math.imul(ah6, bh9)) | 0; -1 7053 var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 7054 c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; -1 7055 w15 &= 0x3ffffff; -1 7056 /* k = 16 */ -1 7057 lo = Math.imul(al9, bl7); -1 7058 mid = Math.imul(al9, bh7); -1 7059 mid = (mid + Math.imul(ah9, bl7)) | 0; -1 7060 hi = Math.imul(ah9, bh7); -1 7061 lo = (lo + Math.imul(al8, bl8)) | 0; -1 7062 mid = (mid + Math.imul(al8, bh8)) | 0; -1 7063 mid = (mid + Math.imul(ah8, bl8)) | 0; -1 7064 hi = (hi + Math.imul(ah8, bh8)) | 0; -1 7065 lo = (lo + Math.imul(al7, bl9)) | 0; -1 7066 mid = (mid + Math.imul(al7, bh9)) | 0; -1 7067 mid = (mid + Math.imul(ah7, bl9)) | 0; -1 7068 hi = (hi + Math.imul(ah7, bh9)) | 0; -1 7069 var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 7070 c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; -1 7071 w16 &= 0x3ffffff; -1 7072 /* k = 17 */ -1 7073 lo = Math.imul(al9, bl8); -1 7074 mid = Math.imul(al9, bh8); -1 7075 mid = (mid + Math.imul(ah9, bl8)) | 0; -1 7076 hi = Math.imul(ah9, bh8); -1 7077 lo = (lo + Math.imul(al8, bl9)) | 0; -1 7078 mid = (mid + Math.imul(al8, bh9)) | 0; -1 7079 mid = (mid + Math.imul(ah8, bl9)) | 0; -1 7080 hi = (hi + Math.imul(ah8, bh9)) | 0; -1 7081 var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 7082 c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; -1 7083 w17 &= 0x3ffffff; -1 7084 /* k = 18 */ -1 7085 lo = Math.imul(al9, bl9); -1 7086 mid = Math.imul(al9, bh9); -1 7087 mid = (mid + Math.imul(ah9, bl9)) | 0; -1 7088 hi = Math.imul(ah9, bh9); -1 7089 var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; -1 7090 c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; -1 7091 w18 &= 0x3ffffff; -1 7092 o[0] = w0; -1 7093 o[1] = w1; -1 7094 o[2] = w2; -1 7095 o[3] = w3; -1 7096 o[4] = w4; -1 7097 o[5] = w5; -1 7098 o[6] = w6; -1 7099 o[7] = w7; -1 7100 o[8] = w8; -1 7101 o[9] = w9; -1 7102 o[10] = w10; -1 7103 o[11] = w11; -1 7104 o[12] = w12; -1 7105 o[13] = w13; -1 7106 o[14] = w14; -1 7107 o[15] = w15; -1 7108 o[16] = w16; -1 7109 o[17] = w17; -1 7110 o[18] = w18; -1 7111 if (c !== 0) { -1 7112 o[19] = c; -1 7113 out.length++; -1 7114 } -1 7115 return out; -1 7116 }; -1 7117 -1 7118 // Polyfill comb -1 7119 if (!Math.imul) { -1 7120 comb10MulTo = smallMulTo; -1 7121 } -1 7122 -1 7123 function bigMulTo (self, num, out) { -1 7124 out.negative = num.negative ^ self.negative; -1 7125 out.length = self.length + num.length; -1 7126 -1 7127 var carry = 0; -1 7128 var hncarry = 0; -1 7129 for (var k = 0; k < out.length - 1; k++) { -1 7130 // Sum all words with the same `i + j = k` and accumulate `ncarry`, -1 7131 // note that ncarry could be >= 0x3ffffff -1 7132 var ncarry = hncarry; -1 7133 hncarry = 0; -1 7134 var rword = carry & 0x3ffffff; -1 7135 var maxJ = Math.min(k, num.length - 1); -1 7136 for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { -1 7137 var i = k - j; -1 7138 var a = self.words[i] | 0; -1 7139 var b = num.words[j] | 0; -1 7140 var r = a * b; -1 7141 -1 7142 var lo = r & 0x3ffffff; -1 7143 ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; -1 7144 lo = (lo + rword) | 0; -1 7145 rword = lo & 0x3ffffff; -1 7146 ncarry = (ncarry + (lo >>> 26)) | 0; -1 7147 -1 7148 hncarry += ncarry >>> 26; -1 7149 ncarry &= 0x3ffffff; -1 7150 } -1 7151 out.words[k] = rword; -1 7152 carry = ncarry; -1 7153 ncarry = hncarry; -1 7154 } -1 7155 if (carry !== 0) { -1 7156 out.words[k] = carry; -1 7157 } else { -1 7158 out.length--; -1 7159 } -1 7160 -1 7161 return out._strip(); -1 7162 } -1 7163 -1 7164 function jumboMulTo (self, num, out) { -1 7165 // Temporary disable, see https://github.com/indutny/bn.js/issues/211 -1 7166 // var fftm = new FFTM(); -1 7167 // return fftm.mulp(self, num, out); -1 7168 return bigMulTo(self, num, out); -1 7169 } -1 7170 -1 7171 BN.prototype.mulTo = function mulTo (num, out) { -1 7172 var res; -1 7173 var len = this.length + num.length; -1 7174 if (this.length === 10 && num.length === 10) { -1 7175 res = comb10MulTo(this, num, out); -1 7176 } else if (len < 63) { -1 7177 res = smallMulTo(this, num, out); -1 7178 } else if (len < 1024) { -1 7179 res = bigMulTo(this, num, out); -1 7180 } else { -1 7181 res = jumboMulTo(this, num, out); -1 7182 } -1 7183 -1 7184 return res; -1 7185 }; -1 7186 -1 7187 // Cooley-Tukey algorithm for FFT -1 7188 // slightly revisited to rely on looping instead of recursion -1 7189 -1 7190 function FFTM (x, y) { -1 7191 this.x = x; -1 7192 this.y = y; -1 7193 } -1 7194 -1 7195 FFTM.prototype.makeRBT = function makeRBT (N) { -1 7196 var t = new Array(N); -1 7197 var l = BN.prototype._countBits(N) - 1; -1 7198 for (var i = 0; i < N; i++) { -1 7199 t[i] = this.revBin(i, l, N); -1 7200 } -1 7201 -1 7202 return t; -1 7203 }; -1 7204 -1 7205 // Returns binary-reversed representation of `x` -1 7206 FFTM.prototype.revBin = function revBin (x, l, N) { -1 7207 if (x === 0 || x === N - 1) return x; -1 7208 -1 7209 var rb = 0; -1 7210 for (var i = 0; i < l; i++) { -1 7211 rb |= (x & 1) << (l - i - 1); -1 7212 x >>= 1; -1 7213 } -1 7214 -1 7215 return rb; -1 7216 }; -1 7217 -1 7218 // Performs "tweedling" phase, therefore 'emulating' -1 7219 // behaviour of the recursive algorithm -1 7220 FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { -1 7221 for (var i = 0; i < N; i++) { -1 7222 rtws[i] = rws[rbt[i]]; -1 7223 itws[i] = iws[rbt[i]]; -1 7224 } -1 7225 }; -1 7226 -1 7227 FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { -1 7228 this.permute(rbt, rws, iws, rtws, itws, N); -1 7229 -1 7230 for (var s = 1; s < N; s <<= 1) { -1 7231 var l = s << 1; -1 7232 -1 7233 var rtwdf = Math.cos(2 * Math.PI / l); -1 7234 var itwdf = Math.sin(2 * Math.PI / l); -1 7235 -1 7236 for (var p = 0; p < N; p += l) { -1 7237 var rtwdf_ = rtwdf; -1 7238 var itwdf_ = itwdf; -1 7239 -1 7240 for (var j = 0; j < s; j++) { -1 7241 var re = rtws[p + j]; -1 7242 var ie = itws[p + j]; -1 7243 -1 7244 var ro = rtws[p + j + s]; -1 7245 var io = itws[p + j + s]; -1 7246 -1 7247 var rx = rtwdf_ * ro - itwdf_ * io; -1 7248 -1 7249 io = rtwdf_ * io + itwdf_ * ro; -1 7250 ro = rx; -1 7251 -1 7252 rtws[p + j] = re + ro; -1 7253 itws[p + j] = ie + io; -1 7254 -1 7255 rtws[p + j + s] = re - ro; -1 7256 itws[p + j + s] = ie - io; -1 7257 -1 7258 /* jshint maxdepth : false */ -1 7259 if (j !== l) { -1 7260 rx = rtwdf * rtwdf_ - itwdf * itwdf_; -1 7261 -1 7262 itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; -1 7263 rtwdf_ = rx; -1 7264 } -1 7265 } -1 7266 } -1 7267 } -1 7268 }; -1 7269 -1 7270 FFTM.prototype.guessLen13b = function guessLen13b (n, m) { -1 7271 var N = Math.max(m, n) | 1; -1 7272 var odd = N & 1; -1 7273 var i = 0; -1 7274 for (N = N / 2 | 0; N; N = N >>> 1) { -1 7275 i++; -1 7276 } -1 7277 -1 7278 return 1 << i + 1 + odd; -1 7279 }; -1 7280 -1 7281 FFTM.prototype.conjugate = function conjugate (rws, iws, N) { -1 7282 if (N <= 1) return; -1 7283 -1 7284 for (var i = 0; i < N / 2; i++) { -1 7285 var t = rws[i]; -1 7286 -1 7287 rws[i] = rws[N - i - 1]; -1 7288 rws[N - i - 1] = t; -1 7289 -1 7290 t = iws[i]; -1 7291 -1 7292 iws[i] = -iws[N - i - 1]; -1 7293 iws[N - i - 1] = -t; -1 7294 } -1 7295 }; -1 7296 -1 7297 FFTM.prototype.normalize13b = function normalize13b (ws, N) { -1 7298 var carry = 0; -1 7299 for (var i = 0; i < N / 2; i++) { -1 7300 var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + -1 7301 Math.round(ws[2 * i] / N) + -1 7302 carry; -1 7303 -1 7304 ws[i] = w & 0x3ffffff; -1 7305 -1 7306 if (w < 0x4000000) { -1 7307 carry = 0; -1 7308 } else { -1 7309 carry = w / 0x4000000 | 0; -1 7310 } -1 7311 } -1 7312 -1 7313 return ws; -1 7314 }; -1 7315 -1 7316 FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { -1 7317 var carry = 0; -1 7318 for (var i = 0; i < len; i++) { -1 7319 carry = carry + (ws[i] | 0); -1 7320 -1 7321 rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; -1 7322 rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; -1 7323 } -1 7324 -1 7325 // Pad with zeroes -1 7326 for (i = 2 * len; i < N; ++i) { -1 7327 rws[i] = 0; -1 7328 } -1 7329 -1 7330 assert(carry === 0); -1 7331 assert((carry & ~0x1fff) === 0); -1 7332 }; -1 7333 -1 7334 FFTM.prototype.stub = function stub (N) { -1 7335 var ph = new Array(N); -1 7336 for (var i = 0; i < N; i++) { -1 7337 ph[i] = 0; -1 7338 } -1 7339 -1 7340 return ph; -1 7341 }; -1 7342 -1 7343 FFTM.prototype.mulp = function mulp (x, y, out) { -1 7344 var N = 2 * this.guessLen13b(x.length, y.length); -1 7345 -1 7346 var rbt = this.makeRBT(N); -1 7347 -1 7348 var _ = this.stub(N); -1 7349 -1 7350 var rws = new Array(N); -1 7351 var rwst = new Array(N); -1 7352 var iwst = new Array(N); -1 7353 -1 7354 var nrws = new Array(N); -1 7355 var nrwst = new Array(N); -1 7356 var niwst = new Array(N); -1 7357 -1 7358 var rmws = out.words; -1 7359 rmws.length = N; -1 7360 -1 7361 this.convert13b(x.words, x.length, rws, N); -1 7362 this.convert13b(y.words, y.length, nrws, N); -1 7363 -1 7364 this.transform(rws, _, rwst, iwst, N, rbt); -1 7365 this.transform(nrws, _, nrwst, niwst, N, rbt); -1 7366 -1 7367 for (var i = 0; i < N; i++) { -1 7368 var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; -1 7369 iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; -1 7370 rwst[i] = rx; -1 7371 } -1 7372 -1 7373 this.conjugate(rwst, iwst, N); -1 7374 this.transform(rwst, iwst, rmws, _, N, rbt); -1 7375 this.conjugate(rmws, _, N); -1 7376 this.normalize13b(rmws, N); -1 7377 -1 7378 out.negative = x.negative ^ y.negative; -1 7379 out.length = x.length + y.length; -1 7380 return out._strip(); -1 7381 }; -1 7382 -1 7383 // Multiply `this` by `num` -1 7384 BN.prototype.mul = function mul (num) { -1 7385 var out = new BN(null); -1 7386 out.words = new Array(this.length + num.length); -1 7387 return this.mulTo(num, out); -1 7388 }; -1 7389 -1 7390 // Multiply employing FFT -1 7391 BN.prototype.mulf = function mulf (num) { -1 7392 var out = new BN(null); -1 7393 out.words = new Array(this.length + num.length); -1 7394 return jumboMulTo(this, num, out); -1 7395 }; -1 7396 -1 7397 // In-place Multiplication -1 7398 BN.prototype.imul = function imul (num) { -1 7399 return this.clone().mulTo(num, this); -1 7400 }; -1 7401 -1 7402 BN.prototype.imuln = function imuln (num) { -1 7403 var isNegNum = num < 0; -1 7404 if (isNegNum) num = -num; -1 7405 -1 7406 assert(typeof num === 'number'); -1 7407 assert(num < 0x4000000); -1 7408 -1 7409 // Carry -1 7410 var carry = 0; -1 7411 for (var i = 0; i < this.length; i++) { -1 7412 var w = (this.words[i] | 0) * num; -1 7413 var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); -1 7414 carry >>= 26; -1 7415 carry += (w / 0x4000000) | 0; -1 7416 // NOTE: lo is 27bit maximum -1 7417 carry += lo >>> 26; -1 7418 this.words[i] = lo & 0x3ffffff; -1 7419 } -1 7420 -1 7421 if (carry !== 0) { -1 7422 this.words[i] = carry; -1 7423 this.length++; -1 7424 } -1 7425 -1 7426 return isNegNum ? this.ineg() : this; -1 7427 }; -1 7428 -1 7429 BN.prototype.muln = function muln (num) { -1 7430 return this.clone().imuln(num); -1 7431 }; -1 7432 -1 7433 // `this` * `this` -1 7434 BN.prototype.sqr = function sqr () { -1 7435 return this.mul(this); -1 7436 }; -1 7437 -1 7438 // `this` * `this` in-place -1 7439 BN.prototype.isqr = function isqr () { -1 7440 return this.imul(this.clone()); -1 7441 }; -1 7442 -1 7443 // Math.pow(`this`, `num`) -1 7444 BN.prototype.pow = function pow (num) { -1 7445 var w = toBitArray(num); -1 7446 if (w.length === 0) return new BN(1); -1 7447 -1 7448 // Skip leading zeroes -1 7449 var res = this; -1 7450 for (var i = 0; i < w.length; i++, res = res.sqr()) { -1 7451 if (w[i] !== 0) break; -1 7452 } -1 7453 -1 7454 if (++i < w.length) { -1 7455 for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { -1 7456 if (w[i] === 0) continue; -1 7457 -1 7458 res = res.mul(q); -1 7459 } -1 7460 } -1 7461 -1 7462 return res; -1 7463 }; -1 7464 -1 7465 // Shift-left in-place -1 7466 BN.prototype.iushln = function iushln (bits) { -1 7467 assert(typeof bits === 'number' && bits >= 0); -1 7468 var r = bits % 26; -1 7469 var s = (bits - r) / 26; -1 7470 var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); -1 7471 var i; -1 7472 -1 7473 if (r !== 0) { -1 7474 var carry = 0; -1 7475 -1 7476 for (i = 0; i < this.length; i++) { -1 7477 var newCarry = this.words[i] & carryMask; -1 7478 var c = ((this.words[i] | 0) - newCarry) << r; -1 7479 this.words[i] = c | carry; -1 7480 carry = newCarry >>> (26 - r); -1 7481 } -1 7482 -1 7483 if (carry) { -1 7484 this.words[i] = carry; -1 7485 this.length++; -1 7486 } -1 7487 } -1 7488 -1 7489 if (s !== 0) { -1 7490 for (i = this.length - 1; i >= 0; i--) { -1 7491 this.words[i + s] = this.words[i]; -1 7492 } -1 7493 -1 7494 for (i = 0; i < s; i++) { -1 7495 this.words[i] = 0; -1 7496 } -1 7497 -1 7498 this.length += s; -1 7499 } -1 7500 -1 7501 return this._strip(); -1 7502 }; -1 7503 -1 7504 BN.prototype.ishln = function ishln (bits) { -1 7505 // TODO(indutny): implement me -1 7506 assert(this.negative === 0); -1 7507 return this.iushln(bits); -1 7508 }; -1 7509 -1 7510 // Shift-right in-place -1 7511 // NOTE: `hint` is a lowest bit before trailing zeroes -1 7512 // NOTE: if `extended` is present - it will be filled with destroyed bits -1 7513 BN.prototype.iushrn = function iushrn (bits, hint, extended) { -1 7514 assert(typeof bits === 'number' && bits >= 0); -1 7515 var h; -1 7516 if (hint) { -1 7517 h = (hint - (hint % 26)) / 26; -1 7518 } else { -1 7519 h = 0; -1 7520 } -1 7521 -1 7522 var r = bits % 26; -1 7523 var s = Math.min((bits - r) / 26, this.length); -1 7524 var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); -1 7525 var maskedWords = extended; -1 7526 -1 7527 h -= s; -1 7528 h = Math.max(0, h); -1 7529 -1 7530 // Extended mode, copy masked part -1 7531 if (maskedWords) { -1 7532 for (var i = 0; i < s; i++) { -1 7533 maskedWords.words[i] = this.words[i]; -1 7534 } -1 7535 maskedWords.length = s; -1 7536 } -1 7537 -1 7538 if (s === 0) { -1 7539 // No-op, we should not move anything at all -1 7540 } else if (this.length > s) { -1 7541 this.length -= s; -1 7542 for (i = 0; i < this.length; i++) { -1 7543 this.words[i] = this.words[i + s]; -1 7544 } -1 7545 } else { -1 7546 this.words[0] = 0; -1 7547 this.length = 1; -1 7548 } -1 7549 -1 7550 var carry = 0; -1 7551 for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { -1 7552 var word = this.words[i] | 0; -1 7553 this.words[i] = (carry << (26 - r)) | (word >>> r); -1 7554 carry = word & mask; -1 7555 } -1 7556 -1 7557 // Push carried bits as a mask -1 7558 if (maskedWords && carry !== 0) { -1 7559 maskedWords.words[maskedWords.length++] = carry; -1 7560 } -1 7561 -1 7562 if (this.length === 0) { -1 7563 this.words[0] = 0; -1 7564 this.length = 1; -1 7565 } -1 7566 -1 7567 return this._strip(); -1 7568 }; -1 7569 -1 7570 BN.prototype.ishrn = function ishrn (bits, hint, extended) { -1 7571 // TODO(indutny): implement me -1 7572 assert(this.negative === 0); -1 7573 return this.iushrn(bits, hint, extended); -1 7574 }; -1 7575 -1 7576 // Shift-left -1 7577 BN.prototype.shln = function shln (bits) { -1 7578 return this.clone().ishln(bits); -1 7579 }; -1 7580 -1 7581 BN.prototype.ushln = function ushln (bits) { -1 7582 return this.clone().iushln(bits); -1 7583 }; -1 7584 -1 7585 // Shift-right -1 7586 BN.prototype.shrn = function shrn (bits) { -1 7587 return this.clone().ishrn(bits); -1 7588 }; -1 7589 -1 7590 BN.prototype.ushrn = function ushrn (bits) { -1 7591 return this.clone().iushrn(bits); -1 7592 }; -1 7593 -1 7594 // Test if n bit is set -1 7595 BN.prototype.testn = function testn (bit) { -1 7596 assert(typeof bit === 'number' && bit >= 0); -1 7597 var r = bit % 26; -1 7598 var s = (bit - r) / 26; -1 7599 var q = 1 << r; -1 7600 -1 7601 // Fast case: bit is much higher than all existing words -1 7602 if (this.length <= s) return false; -1 7603 -1 7604 // Check bit and return -1 7605 var w = this.words[s]; -1 7606 -1 7607 return !!(w & q); -1 7608 }; -1 7609 -1 7610 // Return only lowers bits of number (in-place) -1 7611 BN.prototype.imaskn = function imaskn (bits) { -1 7612 assert(typeof bits === 'number' && bits >= 0); -1 7613 var r = bits % 26; -1 7614 var s = (bits - r) / 26; -1 7615 -1 7616 assert(this.negative === 0, 'imaskn works only with positive numbers'); -1 7617 -1 7618 if (this.length <= s) { -1 7619 return this; -1 7620 } -1 7621 -1 7622 if (r !== 0) { -1 7623 s++; -1 7624 } -1 7625 this.length = Math.min(s, this.length); -1 7626 -1 7627 if (r !== 0) { -1 7628 var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); -1 7629 this.words[this.length - 1] &= mask; -1 7630 } -1 7631 -1 7632 return this._strip(); -1 7633 }; -1 7634 -1 7635 // Return only lowers bits of number -1 7636 BN.prototype.maskn = function maskn (bits) { -1 7637 return this.clone().imaskn(bits); -1 7638 }; -1 7639 -1 7640 // Add plain number `num` to `this` -1 7641 BN.prototype.iaddn = function iaddn (num) { -1 7642 assert(typeof num === 'number'); -1 7643 assert(num < 0x4000000); -1 7644 if (num < 0) return this.isubn(-num); -1 7645 -1 7646 // Possible sign change -1 7647 if (this.negative !== 0) { -1 7648 if (this.length === 1 && (this.words[0] | 0) <= num) { -1 7649 this.words[0] = num - (this.words[0] | 0); -1 7650 this.negative = 0; -1 7651 return this; -1 7652 } -1 7653 -1 7654 this.negative = 0; -1 7655 this.isubn(num); -1 7656 this.negative = 1; -1 7657 return this; -1 7658 } -1 7659 -1 7660 // Add without checks -1 7661 return this._iaddn(num); -1 7662 }; -1 7663 -1 7664 BN.prototype._iaddn = function _iaddn (num) { -1 7665 this.words[0] += num; -1 7666 -1 7667 // Carry -1 7668 for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { -1 7669 this.words[i] -= 0x4000000; -1 7670 if (i === this.length - 1) { -1 7671 this.words[i + 1] = 1; -1 7672 } else { -1 7673 this.words[i + 1]++; -1 7674 } -1 7675 } -1 7676 this.length = Math.max(this.length, i + 1); -1 7677 -1 7678 return this; -1 7679 }; -1 7680 -1 7681 // Subtract plain number `num` from `this` -1 7682 BN.prototype.isubn = function isubn (num) { -1 7683 assert(typeof num === 'number'); -1 7684 assert(num < 0x4000000); -1 7685 if (num < 0) return this.iaddn(-num); -1 7686 -1 7687 if (this.negative !== 0) { -1 7688 this.negative = 0; -1 7689 this.iaddn(num); -1 7690 this.negative = 1; -1 7691 return this; -1 7692 } -1 7693 -1 7694 this.words[0] -= num; -1 7695 -1 7696 if (this.length === 1 && this.words[0] < 0) { -1 7697 this.words[0] = -this.words[0]; -1 7698 this.negative = 1; -1 7699 } else { -1 7700 // Carry -1 7701 for (var i = 0; i < this.length && this.words[i] < 0; i++) { -1 7702 this.words[i] += 0x4000000; -1 7703 this.words[i + 1] -= 1; -1 7704 } -1 7705 } -1 7706 -1 7707 return this._strip(); -1 7708 }; -1 7709 -1 7710 BN.prototype.addn = function addn (num) { -1 7711 return this.clone().iaddn(num); -1 7712 }; -1 7713 -1 7714 BN.prototype.subn = function subn (num) { -1 7715 return this.clone().isubn(num); -1 7716 }; -1 7717 -1 7718 BN.prototype.iabs = function iabs () { -1 7719 this.negative = 0; -1 7720 -1 7721 return this; -1 7722 }; -1 7723 -1 7724 BN.prototype.abs = function abs () { -1 7725 return this.clone().iabs(); -1 7726 }; -1 7727 -1 7728 BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { -1 7729 var len = num.length + shift; -1 7730 var i; -1 7731 -1 7732 this._expand(len); -1 7733 -1 7734 var w; -1 7735 var carry = 0; -1 7736 for (i = 0; i < num.length; i++) { -1 7737 w = (this.words[i + shift] | 0) + carry; -1 7738 var right = (num.words[i] | 0) * mul; -1 7739 w -= right & 0x3ffffff; -1 7740 carry = (w >> 26) - ((right / 0x4000000) | 0); -1 7741 this.words[i + shift] = w & 0x3ffffff; -1 7742 } -1 7743 for (; i < this.length - shift; i++) { -1 7744 w = (this.words[i + shift] | 0) + carry; -1 7745 carry = w >> 26; -1 7746 this.words[i + shift] = w & 0x3ffffff; -1 7747 } -1 7748 -1 7749 if (carry === 0) return this._strip(); -1 7750 -1 7751 // Subtraction overflow -1 7752 assert(carry === -1); -1 7753 carry = 0; -1 7754 for (i = 0; i < this.length; i++) { -1 7755 w = -(this.words[i] | 0) + carry; -1 7756 carry = w >> 26; -1 7757 this.words[i] = w & 0x3ffffff; -1 7758 } -1 7759 this.negative = 1; -1 7760 -1 7761 return this._strip(); -1 7762 }; -1 7763 -1 7764 BN.prototype._wordDiv = function _wordDiv (num, mode) { -1 7765 var shift = this.length - num.length; -1 7766 -1 7767 var a = this.clone(); -1 7768 var b = num; -1 7769 -1 7770 // Normalize -1 7771 var bhi = b.words[b.length - 1] | 0; -1 7772 var bhiBits = this._countBits(bhi); -1 7773 shift = 26 - bhiBits; -1 7774 if (shift !== 0) { -1 7775 b = b.ushln(shift); -1 7776 a.iushln(shift); -1 7777 bhi = b.words[b.length - 1] | 0; -1 7778 } -1 7779 -1 7780 // Initialize quotient -1 7781 var m = a.length - b.length; -1 7782 var q; -1 7783 -1 7784 if (mode !== 'mod') { -1 7785 q = new BN(null); -1 7786 q.length = m + 1; -1 7787 q.words = new Array(q.length); -1 7788 for (var i = 0; i < q.length; i++) { -1 7789 q.words[i] = 0; -1 7790 } -1 7791 } -1 7792 -1 7793 var diff = a.clone()._ishlnsubmul(b, 1, m); -1 7794 if (diff.negative === 0) { -1 7795 a = diff; -1 7796 if (q) { -1 7797 q.words[m] = 1; -1 7798 } -1 7799 } -1 7800 -1 7801 for (var j = m - 1; j >= 0; j--) { -1 7802 var qj = (a.words[b.length + j] | 0) * 0x4000000 + -1 7803 (a.words[b.length + j - 1] | 0); -1 7804 -1 7805 // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max -1 7806 // (0x7ffffff) -1 7807 qj = Math.min((qj / bhi) | 0, 0x3ffffff); -1 7808 -1 7809 a._ishlnsubmul(b, qj, j); -1 7810 while (a.negative !== 0) { -1 7811 qj--; -1 7812 a.negative = 0; -1 7813 a._ishlnsubmul(b, 1, j); -1 7814 if (!a.isZero()) { -1 7815 a.negative ^= 1; -1 7816 } -1 7817 } -1 7818 if (q) { -1 7819 q.words[j] = qj; -1 7820 } -1 7821 } -1 7822 if (q) { -1 7823 q._strip(); -1 7824 } -1 7825 a._strip(); -1 7826 -1 7827 // Denormalize -1 7828 if (mode !== 'div' && shift !== 0) { -1 7829 a.iushrn(shift); -1 7830 } -1 7831 -1 7832 return { -1 7833 div: q || null, -1 7834 mod: a -1 7835 }; -1 7836 }; -1 7837 -1 7838 // NOTE: 1) `mode` can be set to `mod` to request mod only, -1 7839 // to `div` to request div only, or be absent to -1 7840 // request both div & mod -1 7841 // 2) `positive` is true if unsigned mod is requested -1 7842 BN.prototype.divmod = function divmod (num, mode, positive) { -1 7843 assert(!num.isZero()); -1 7844 -1 7845 if (this.isZero()) { -1 7846 return { -1 7847 div: new BN(0), -1 7848 mod: new BN(0) -1 7849 }; -1 7850 } -1 7851 -1 7852 var div, mod, res; -1 7853 if (this.negative !== 0 && num.negative === 0) { -1 7854 res = this.neg().divmod(num, mode); -1 7855 -1 7856 if (mode !== 'mod') { -1 7857 div = res.div.neg(); -1 7858 } -1 7859 -1 7860 if (mode !== 'div') { -1 7861 mod = res.mod.neg(); -1 7862 if (positive && mod.negative !== 0) { -1 7863 mod.iadd(num); -1 7864 } -1 7865 } -1 7866 -1 7867 return { -1 7868 div: div, -1 7869 mod: mod -1 7870 }; -1 7871 } -1 7872 -1 7873 if (this.negative === 0 && num.negative !== 0) { -1 7874 res = this.divmod(num.neg(), mode); -1 7875 -1 7876 if (mode !== 'mod') { -1 7877 div = res.div.neg(); -1 7878 } -1 7879 -1 7880 return { -1 7881 div: div, -1 7882 mod: res.mod -1 7883 }; -1 7884 } -1 7885 -1 7886 if ((this.negative & num.negative) !== 0) { -1 7887 res = this.neg().divmod(num.neg(), mode); -1 7888 -1 7889 if (mode !== 'div') { -1 7890 mod = res.mod.neg(); -1 7891 if (positive && mod.negative !== 0) { -1 7892 mod.isub(num); -1 7893 } -1 7894 } -1 7895 -1 7896 return { -1 7897 div: res.div, -1 7898 mod: mod -1 7899 }; -1 7900 } -1 7901 -1 7902 // Both numbers are positive at this point -1 7903 -1 7904 // Strip both numbers to approximate shift value -1 7905 if (num.length > this.length || this.cmp(num) < 0) { -1 7906 return { -1 7907 div: new BN(0), -1 7908 mod: this -1 7909 }; -1 7910 } -1 7911 -1 7912 // Very short reduction -1 7913 if (num.length === 1) { -1 7914 if (mode === 'div') { -1 7915 return { -1 7916 div: this.divn(num.words[0]), -1 7917 mod: null -1 7918 }; -1 7919 } -1 7920 -1 7921 if (mode === 'mod') { -1 7922 return { -1 7923 div: null, -1 7924 mod: new BN(this.modrn(num.words[0])) -1 7925 }; -1 7926 } -1 7927 -1 7928 return { -1 7929 div: this.divn(num.words[0]), -1 7930 mod: new BN(this.modrn(num.words[0])) -1 7931 }; -1 7932 } -1 7933 -1 7934 return this._wordDiv(num, mode); -1 7935 }; -1 7936 -1 7937 // Find `this` / `num` -1 7938 BN.prototype.div = function div (num) { -1 7939 return this.divmod(num, 'div', false).div; -1 7940 }; -1 7941 -1 7942 // Find `this` % `num` -1 7943 BN.prototype.mod = function mod (num) { -1 7944 return this.divmod(num, 'mod', false).mod; -1 7945 }; -1 7946 -1 7947 BN.prototype.umod = function umod (num) { -1 7948 return this.divmod(num, 'mod', true).mod; -1 7949 }; -1 7950 -1 7951 // Find Round(`this` / `num`) -1 7952 BN.prototype.divRound = function divRound (num) { -1 7953 var dm = this.divmod(num); -1 7954 -1 7955 // Fast case - exact division -1 7956 if (dm.mod.isZero()) return dm.div; -1 7957 -1 7958 var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; -1 7959 -1 7960 var half = num.ushrn(1); -1 7961 var r2 = num.andln(1); -1 7962 var cmp = mod.cmp(half); -1 7963 -1 7964 // Round down -1 7965 if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div; -1 7966 -1 7967 // Round up -1 7968 return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); -1 7969 }; -1 7970 -1 7971 BN.prototype.modrn = function modrn (num) { -1 7972 var isNegNum = num < 0; -1 7973 if (isNegNum) num = -num; -1 7974 -1 7975 assert(num <= 0x3ffffff); -1 7976 var p = (1 << 26) % num; -1 7977 -1 7978 var acc = 0; -1 7979 for (var i = this.length - 1; i >= 0; i--) { -1 7980 acc = (p * acc + (this.words[i] | 0)) % num; -1 7981 } -1 7982 -1 7983 return isNegNum ? -acc : acc; -1 7984 }; -1 7985 -1 7986 // WARNING: DEPRECATED -1 7987 BN.prototype.modn = function modn (num) { -1 7988 return this.modrn(num); -1 7989 }; -1 7990 -1 7991 // In-place division by number -1 7992 BN.prototype.idivn = function idivn (num) { -1 7993 var isNegNum = num < 0; -1 7994 if (isNegNum) num = -num; -1 7995 -1 7996 assert(num <= 0x3ffffff); -1 7997 -1 7998 var carry = 0; -1 7999 for (var i = this.length - 1; i >= 0; i--) { -1 8000 var w = (this.words[i] | 0) + carry * 0x4000000; -1 8001 this.words[i] = (w / num) | 0; -1 8002 carry = w % num; -1 8003 } -1 8004 -1 8005 this._strip(); -1 8006 return isNegNum ? this.ineg() : this; -1 8007 }; -1 8008 -1 8009 BN.prototype.divn = function divn (num) { -1 8010 return this.clone().idivn(num); -1 8011 }; -1 8012 -1 8013 BN.prototype.egcd = function egcd (p) { -1 8014 assert(p.negative === 0); -1 8015 assert(!p.isZero()); -1 8016 -1 8017 var x = this; -1 8018 var y = p.clone(); -1 8019 -1 8020 if (x.negative !== 0) { -1 8021 x = x.umod(p); -1 8022 } else { -1 8023 x = x.clone(); -1 8024 } -1 8025 -1 8026 // A * x + B * y = x -1 8027 var A = new BN(1); -1 8028 var B = new BN(0); -1 8029 -1 8030 // C * x + D * y = y -1 8031 var C = new BN(0); -1 8032 var D = new BN(1); -1 8033 -1 8034 var g = 0; -1 8035 -1 8036 while (x.isEven() && y.isEven()) { -1 8037 x.iushrn(1); -1 8038 y.iushrn(1); -1 8039 ++g; -1 8040 } -1 8041 -1 8042 var yp = y.clone(); -1 8043 var xp = x.clone(); -1 8044 -1 8045 while (!x.isZero()) { -1 8046 for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); -1 8047 if (i > 0) { -1 8048 x.iushrn(i); -1 8049 while (i-- > 0) { -1 8050 if (A.isOdd() || B.isOdd()) { -1 8051 A.iadd(yp); -1 8052 B.isub(xp); -1 8053 } -1 8054 -1 8055 A.iushrn(1); -1 8056 B.iushrn(1); -1 8057 } -1 8058 } -1 8059 -1 8060 for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); -1 8061 if (j > 0) { -1 8062 y.iushrn(j); -1 8063 while (j-- > 0) { -1 8064 if (C.isOdd() || D.isOdd()) { -1 8065 C.iadd(yp); -1 8066 D.isub(xp); -1 8067 } -1 8068 -1 8069 C.iushrn(1); -1 8070 D.iushrn(1); -1 8071 } -1 8072 } -1 8073 -1 8074 if (x.cmp(y) >= 0) { -1 8075 x.isub(y); -1 8076 A.isub(C); -1 8077 B.isub(D); -1 8078 } else { -1 8079 y.isub(x); -1 8080 C.isub(A); -1 8081 D.isub(B); -1 8082 } -1 8083 } -1 8084 -1 8085 return { -1 8086 a: C, -1 8087 b: D, -1 8088 gcd: y.iushln(g) -1 8089 }; -1 8090 }; -1 8091 -1 8092 // This is reduced incarnation of the binary EEA -1 8093 // above, designated to invert members of the -1 8094 // _prime_ fields F(p) at a maximal speed -1 8095 BN.prototype._invmp = function _invmp (p) { -1 8096 assert(p.negative === 0); -1 8097 assert(!p.isZero()); -1 8098 -1 8099 var a = this; -1 8100 var b = p.clone(); -1 8101 -1 8102 if (a.negative !== 0) { -1 8103 a = a.umod(p); -1 8104 } else { -1 8105 a = a.clone(); -1 8106 } -1 8107 -1 8108 var x1 = new BN(1); -1 8109 var x2 = new BN(0); -1 8110 -1 8111 var delta = b.clone(); -1 8112 -1 8113 while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { -1 8114 for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); -1 8115 if (i > 0) { -1 8116 a.iushrn(i); -1 8117 while (i-- > 0) { -1 8118 if (x1.isOdd()) { -1 8119 x1.iadd(delta); -1 8120 } -1 8121 -1 8122 x1.iushrn(1); -1 8123 } -1 8124 } -1 8125 -1 8126 for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); -1 8127 if (j > 0) { -1 8128 b.iushrn(j); -1 8129 while (j-- > 0) { -1 8130 if (x2.isOdd()) { -1 8131 x2.iadd(delta); -1 8132 } -1 8133 -1 8134 x2.iushrn(1); -1 8135 } -1 8136 } -1 8137 -1 8138 if (a.cmp(b) >= 0) { -1 8139 a.isub(b); -1 8140 x1.isub(x2); -1 8141 } else { -1 8142 b.isub(a); -1 8143 x2.isub(x1); -1 8144 } -1 8145 } -1 8146 -1 8147 var res; -1 8148 if (a.cmpn(1) === 0) { -1 8149 res = x1; -1 8150 } else { -1 8151 res = x2; -1 8152 } -1 8153 -1 8154 if (res.cmpn(0) < 0) { -1 8155 res.iadd(p); -1 8156 } -1 8157 -1 8158 return res; -1 8159 }; -1 8160 -1 8161 BN.prototype.gcd = function gcd (num) { -1 8162 if (this.isZero()) return num.abs(); -1 8163 if (num.isZero()) return this.abs(); -1 8164 -1 8165 var a = this.clone(); -1 8166 var b = num.clone(); -1 8167 a.negative = 0; -1 8168 b.negative = 0; -1 8169 -1 8170 // Remove common factor of two -1 8171 for (var shift = 0; a.isEven() && b.isEven(); shift++) { -1 8172 a.iushrn(1); -1 8173 b.iushrn(1); -1 8174 } -1 8175 -1 8176 do { -1 8177 while (a.isEven()) { -1 8178 a.iushrn(1); -1 8179 } -1 8180 while (b.isEven()) { -1 8181 b.iushrn(1); -1 8182 } -1 8183 -1 8184 var r = a.cmp(b); -1 8185 if (r < 0) { -1 8186 // Swap `a` and `b` to make `a` always bigger than `b` -1 8187 var t = a; -1 8188 a = b; -1 8189 b = t; -1 8190 } else if (r === 0 || b.cmpn(1) === 0) { -1 8191 break; -1 8192 } -1 8193 -1 8194 a.isub(b); -1 8195 } while (true); -1 8196 -1 8197 return b.iushln(shift); -1 8198 }; -1 8199 -1 8200 // Invert number in the field F(num) -1 8201 BN.prototype.invm = function invm (num) { -1 8202 return this.egcd(num).a.umod(num); -1 8203 }; -1 8204 -1 8205 BN.prototype.isEven = function isEven () { -1 8206 return (this.words[0] & 1) === 0; -1 8207 }; -1 8208 -1 8209 BN.prototype.isOdd = function isOdd () { -1 8210 return (this.words[0] & 1) === 1; -1 8211 }; -1 8212 -1 8213 // And first word and num -1 8214 BN.prototype.andln = function andln (num) { -1 8215 return this.words[0] & num; -1 8216 }; -1 8217 -1 8218 // Increment at the bit position in-line -1 8219 BN.prototype.bincn = function bincn (bit) { -1 8220 assert(typeof bit === 'number'); -1 8221 var r = bit % 26; -1 8222 var s = (bit - r) / 26; -1 8223 var q = 1 << r; -1 8224 -1 8225 // Fast case: bit is much higher than all existing words -1 8226 if (this.length <= s) { -1 8227 this._expand(s + 1); -1 8228 this.words[s] |= q; -1 8229 return this; -1 8230 } -1 8231 -1 8232 // Add bit and propagate, if needed -1 8233 var carry = q; -1 8234 for (var i = s; carry !== 0 && i < this.length; i++) { -1 8235 var w = this.words[i] | 0; -1 8236 w += carry; -1 8237 carry = w >>> 26; -1 8238 w &= 0x3ffffff; -1 8239 this.words[i] = w; -1 8240 } -1 8241 if (carry !== 0) { -1 8242 this.words[i] = carry; -1 8243 this.length++; -1 8244 } -1 8245 return this; -1 8246 }; -1 8247 -1 8248 BN.prototype.isZero = function isZero () { -1 8249 return this.length === 1 && this.words[0] === 0; -1 8250 }; -1 8251 -1 8252 BN.prototype.cmpn = function cmpn (num) { -1 8253 var negative = num < 0; -1 8254 -1 8255 if (this.negative !== 0 && !negative) return -1; -1 8256 if (this.negative === 0 && negative) return 1; -1 8257 -1 8258 this._strip(); -1 8259 -1 8260 var res; -1 8261 if (this.length > 1) { -1 8262 res = 1; -1 8263 } else { -1 8264 if (negative) { -1 8265 num = -num; -1 8266 } -1 8267 -1 8268 assert(num <= 0x3ffffff, 'Number is too big'); -1 8269 -1 8270 var w = this.words[0] | 0; -1 8271 res = w === num ? 0 : w < num ? -1 : 1; -1 8272 } -1 8273 if (this.negative !== 0) return -res | 0; -1 8274 return res; -1 8275 }; -1 8276 -1 8277 // Compare two numbers and return: -1 8278 // 1 - if `this` > `num` -1 8279 // 0 - if `this` == `num` -1 8280 // -1 - if `this` < `num` -1 8281 BN.prototype.cmp = function cmp (num) { -1 8282 if (this.negative !== 0 && num.negative === 0) return -1; -1 8283 if (this.negative === 0 && num.negative !== 0) return 1; -1 8284 -1 8285 var res = this.ucmp(num); -1 8286 if (this.negative !== 0) return -res | 0; -1 8287 return res; -1 8288 }; -1 8289 -1 8290 // Unsigned comparison -1 8291 BN.prototype.ucmp = function ucmp (num) { -1 8292 // At this point both numbers have the same sign -1 8293 if (this.length > num.length) return 1; -1 8294 if (this.length < num.length) return -1; -1 8295 -1 8296 var res = 0; -1 8297 for (var i = this.length - 1; i >= 0; i--) { -1 8298 var a = this.words[i] | 0; -1 8299 var b = num.words[i] | 0; -1 8300 -1 8301 if (a === b) continue; -1 8302 if (a < b) { -1 8303 res = -1; -1 8304 } else if (a > b) { -1 8305 res = 1; -1 8306 } -1 8307 break; -1 8308 } -1 8309 return res; -1 8310 }; -1 8311 -1 8312 BN.prototype.gtn = function gtn (num) { -1 8313 return this.cmpn(num) === 1; -1 8314 }; -1 8315 -1 8316 BN.prototype.gt = function gt (num) { -1 8317 return this.cmp(num) === 1; -1 8318 }; -1 8319 -1 8320 BN.prototype.gten = function gten (num) { -1 8321 return this.cmpn(num) >= 0; -1 8322 }; -1 8323 -1 8324 BN.prototype.gte = function gte (num) { -1 8325 return this.cmp(num) >= 0; -1 8326 }; -1 8327 -1 8328 BN.prototype.ltn = function ltn (num) { -1 8329 return this.cmpn(num) === -1; -1 8330 }; -1 8331 -1 8332 BN.prototype.lt = function lt (num) { -1 8333 return this.cmp(num) === -1; -1 8334 }; -1 8335 -1 8336 BN.prototype.lten = function lten (num) { -1 8337 return this.cmpn(num) <= 0; -1 8338 }; -1 8339 -1 8340 BN.prototype.lte = function lte (num) { -1 8341 return this.cmp(num) <= 0; -1 8342 }; -1 8343 -1 8344 BN.prototype.eqn = function eqn (num) { -1 8345 return this.cmpn(num) === 0; -1 8346 }; -1 8347 -1 8348 BN.prototype.eq = function eq (num) { -1 8349 return this.cmp(num) === 0; -1 8350 }; -1 8351 -1 8352 // -1 8353 // A reduce context, could be using montgomery or something better, depending -1 8354 // on the `m` itself. -1 8355 // -1 8356 BN.red = function red (num) { -1 8357 return new Red(num); -1 8358 }; -1 8359 -1 8360 BN.prototype.toRed = function toRed (ctx) { -1 8361 assert(!this.red, 'Already a number in reduction context'); -1 8362 assert(this.negative === 0, 'red works only with positives'); -1 8363 return ctx.convertTo(this)._forceRed(ctx); -1 8364 }; -1 8365 -1 8366 BN.prototype.fromRed = function fromRed () { -1 8367 assert(this.red, 'fromRed works only with numbers in reduction context'); -1 8368 return this.red.convertFrom(this); -1 8369 }; -1 8370 -1 8371 BN.prototype._forceRed = function _forceRed (ctx) { -1 8372 this.red = ctx; -1 8373 return this; -1 8374 }; -1 8375 -1 8376 BN.prototype.forceRed = function forceRed (ctx) { -1 8377 assert(!this.red, 'Already a number in reduction context'); -1 8378 return this._forceRed(ctx); -1 8379 }; -1 8380 -1 8381 BN.prototype.redAdd = function redAdd (num) { -1 8382 assert(this.red, 'redAdd works only with red numbers'); -1 8383 return this.red.add(this, num); -1 8384 }; -1 8385 -1 8386 BN.prototype.redIAdd = function redIAdd (num) { -1 8387 assert(this.red, 'redIAdd works only with red numbers'); -1 8388 return this.red.iadd(this, num); -1 8389 }; -1 8390 -1 8391 BN.prototype.redSub = function redSub (num) { -1 8392 assert(this.red, 'redSub works only with red numbers'); -1 8393 return this.red.sub(this, num); -1 8394 }; -1 8395 -1 8396 BN.prototype.redISub = function redISub (num) { -1 8397 assert(this.red, 'redISub works only with red numbers'); -1 8398 return this.red.isub(this, num); -1 8399 }; -1 8400 -1 8401 BN.prototype.redShl = function redShl (num) { -1 8402 assert(this.red, 'redShl works only with red numbers'); -1 8403 return this.red.shl(this, num); -1 8404 }; -1 8405 -1 8406 BN.prototype.redMul = function redMul (num) { -1 8407 assert(this.red, 'redMul works only with red numbers'); -1 8408 this.red._verify2(this, num); -1 8409 return this.red.mul(this, num); -1 8410 }; -1 8411 -1 8412 BN.prototype.redIMul = function redIMul (num) { -1 8413 assert(this.red, 'redMul works only with red numbers'); -1 8414 this.red._verify2(this, num); -1 8415 return this.red.imul(this, num); -1 8416 }; -1 8417 -1 8418 BN.prototype.redSqr = function redSqr () { -1 8419 assert(this.red, 'redSqr works only with red numbers'); -1 8420 this.red._verify1(this); -1 8421 return this.red.sqr(this); -1 8422 }; -1 8423 -1 8424 BN.prototype.redISqr = function redISqr () { -1 8425 assert(this.red, 'redISqr works only with red numbers'); -1 8426 this.red._verify1(this); -1 8427 return this.red.isqr(this); -1 8428 }; -1 8429 -1 8430 // Square root over p -1 8431 BN.prototype.redSqrt = function redSqrt () { -1 8432 assert(this.red, 'redSqrt works only with red numbers'); -1 8433 this.red._verify1(this); -1 8434 return this.red.sqrt(this); -1 8435 }; -1 8436 -1 8437 BN.prototype.redInvm = function redInvm () { -1 8438 assert(this.red, 'redInvm works only with red numbers'); -1 8439 this.red._verify1(this); -1 8440 return this.red.invm(this); -1 8441 }; -1 8442 -1 8443 // Return negative clone of `this` % `red modulo` -1 8444 BN.prototype.redNeg = function redNeg () { -1 8445 assert(this.red, 'redNeg works only with red numbers'); -1 8446 this.red._verify1(this); -1 8447 return this.red.neg(this); -1 8448 }; -1 8449 -1 8450 BN.prototype.redPow = function redPow (num) { -1 8451 assert(this.red && !num.red, 'redPow(normalNum)'); -1 8452 this.red._verify1(this); -1 8453 return this.red.pow(this, num); -1 8454 }; -1 8455 -1 8456 // Prime numbers with efficient reduction -1 8457 var primes = { -1 8458 k256: null, -1 8459 p224: null, -1 8460 p192: null, -1 8461 p25519: null -1 8462 }; -1 8463 -1 8464 // Pseudo-Mersenne prime -1 8465 function MPrime (name, p) { -1 8466 // P = 2 ^ N - K -1 8467 this.name = name; -1 8468 this.p = new BN(p, 16); -1 8469 this.n = this.p.bitLength(); -1 8470 this.k = new BN(1).iushln(this.n).isub(this.p); -1 8471 -1 8472 this.tmp = this._tmp(); -1 8473 } -1 8474 -1 8475 MPrime.prototype._tmp = function _tmp () { -1 8476 var tmp = new BN(null); -1 8477 tmp.words = new Array(Math.ceil(this.n / 13)); -1 8478 return tmp; -1 8479 }; -1 8480 -1 8481 MPrime.prototype.ireduce = function ireduce (num) { -1 8482 // Assumes that `num` is less than `P^2` -1 8483 // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) -1 8484 var r = num; -1 8485 var rlen; -1 8486 -1 8487 do { -1 8488 this.split(r, this.tmp); -1 8489 r = this.imulK(r); -1 8490 r = r.iadd(this.tmp); -1 8491 rlen = r.bitLength(); -1 8492 } while (rlen > this.n); -1 8493 -1 8494 var cmp = rlen < this.n ? -1 : r.ucmp(this.p); -1 8495 if (cmp === 0) { -1 8496 r.words[0] = 0; -1 8497 r.length = 1; -1 8498 } else if (cmp > 0) { -1 8499 r.isub(this.p); -1 8500 } else { -1 8501 if (r.strip !== undefined) { -1 8502 // r is a BN v4 instance -1 8503 r.strip(); -1 8504 } else { -1 8505 // r is a BN v5 instance -1 8506 r._strip(); -1 8507 } -1 8508 } -1 8509 -1 8510 return r; -1 8511 }; -1 8512 -1 8513 MPrime.prototype.split = function split (input, out) { -1 8514 input.iushrn(this.n, 0, out); -1 8515 }; -1 8516 -1 8517 MPrime.prototype.imulK = function imulK (num) { -1 8518 return num.imul(this.k); -1 8519 }; -1 8520 -1 8521 function K256 () { -1 8522 MPrime.call( -1 8523 this, -1 8524 'k256', -1 8525 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); -1 8526 } -1 8527 inherits(K256, MPrime); -1 8528 -1 8529 K256.prototype.split = function split (input, output) { -1 8530 // 256 = 9 * 26 + 22 -1 8531 var mask = 0x3fffff; -1 8532 -1 8533 var outLen = Math.min(input.length, 9); -1 8534 for (var i = 0; i < outLen; i++) { -1 8535 output.words[i] = input.words[i]; -1 8536 } -1 8537 output.length = outLen; -1 8538 -1 8539 if (input.length <= 9) { -1 8540 input.words[0] = 0; -1 8541 input.length = 1; -1 8542 return; -1 8543 } -1 8544 -1 8545 // Shift by 9 limbs -1 8546 var prev = input.words[9]; -1 8547 output.words[output.length++] = prev & mask; -1 8548 -1 8549 for (i = 10; i < input.length; i++) { -1 8550 var next = input.words[i] | 0; -1 8551 input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); -1 8552 prev = next; -1 8553 } -1 8554 prev >>>= 22; -1 8555 input.words[i - 10] = prev; -1 8556 if (prev === 0 && input.length > 10) { -1 8557 input.length -= 10; -1 8558 } else { -1 8559 input.length -= 9; -1 8560 } -1 8561 }; -1 8562 -1 8563 K256.prototype.imulK = function imulK (num) { -1 8564 // K = 0x1000003d1 = [ 0x40, 0x3d1 ] -1 8565 num.words[num.length] = 0; -1 8566 num.words[num.length + 1] = 0; -1 8567 num.length += 2; -1 8568 -1 8569 // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 -1 8570 var lo = 0; -1 8571 for (var i = 0; i < num.length; i++) { -1 8572 var w = num.words[i] | 0; -1 8573 lo += w * 0x3d1; -1 8574 num.words[i] = lo & 0x3ffffff; -1 8575 lo = w * 0x40 + ((lo / 0x4000000) | 0); -1 8576 } -1 8577 -1 8578 // Fast length reduction -1 8579 if (num.words[num.length - 1] === 0) { -1 8580 num.length--; -1 8581 if (num.words[num.length - 1] === 0) { -1 8582 num.length--; -1 8583 } -1 8584 } -1 8585 return num; -1 8586 }; -1 8587 -1 8588 function P224 () { -1 8589 MPrime.call( -1 8590 this, -1 8591 'p224', -1 8592 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); -1 8593 } -1 8594 inherits(P224, MPrime); -1 8595 -1 8596 function P192 () { -1 8597 MPrime.call( -1 8598 this, -1 8599 'p192', -1 8600 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); -1 8601 } -1 8602 inherits(P192, MPrime); -1 8603 -1 8604 function P25519 () { -1 8605 // 2 ^ 255 - 19 -1 8606 MPrime.call( -1 8607 this, -1 8608 '25519', -1 8609 '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); -1 8610 } -1 8611 inherits(P25519, MPrime); -1 8612 -1 8613 P25519.prototype.imulK = function imulK (num) { -1 8614 // K = 0x13 -1 8615 var carry = 0; -1 8616 for (var i = 0; i < num.length; i++) { -1 8617 var hi = (num.words[i] | 0) * 0x13 + carry; -1 8618 var lo = hi & 0x3ffffff; -1 8619 hi >>>= 26; -1 8620 -1 8621 num.words[i] = lo; -1 8622 carry = hi; -1 8623 } -1 8624 if (carry !== 0) { -1 8625 num.words[num.length++] = carry; -1 8626 } -1 8627 return num; -1 8628 }; -1 8629 -1 8630 // Exported mostly for testing purposes, use plain name instead -1 8631 BN._prime = function prime (name) { -1 8632 // Cached version of prime -1 8633 if (primes[name]) return primes[name]; -1 8634 -1 8635 var prime; -1 8636 if (name === 'k256') { -1 8637 prime = new K256(); -1 8638 } else if (name === 'p224') { -1 8639 prime = new P224(); -1 8640 } else if (name === 'p192') { -1 8641 prime = new P192(); -1 8642 } else if (name === 'p25519') { -1 8643 prime = new P25519(); -1 8644 } else { -1 8645 throw new Error('Unknown prime ' + name); -1 8646 } -1 8647 primes[name] = prime; -1 8648 -1 8649 return prime; -1 8650 }; -1 8651 -1 8652 // -1 8653 // Base reduction engine -1 8654 // -1 8655 function Red (m) { -1 8656 if (typeof m === 'string') { -1 8657 var prime = BN._prime(m); -1 8658 this.m = prime.p; -1 8659 this.prime = prime; -1 8660 } else { -1 8661 assert(m.gtn(1), 'modulus must be greater than 1'); -1 8662 this.m = m; -1 8663 this.prime = null; -1 8664 } -1 8665 } -1 8666 -1 8667 Red.prototype._verify1 = function _verify1 (a) { -1 8668 assert(a.negative === 0, 'red works only with positives'); -1 8669 assert(a.red, 'red works only with red numbers'); -1 8670 }; -1 8671 -1 8672 Red.prototype._verify2 = function _verify2 (a, b) { -1 8673 assert((a.negative | b.negative) === 0, 'red works only with positives'); -1 8674 assert(a.red && a.red === b.red, -1 8675 'red works only with red numbers'); -1 8676 }; -1 8677 -1 8678 Red.prototype.imod = function imod (a) { -1 8679 if (this.prime) return this.prime.ireduce(a)._forceRed(this); -1 8680 -1 8681 move(a, a.umod(this.m)._forceRed(this)); -1 8682 return a; -1 8683 }; -1 8684 -1 8685 Red.prototype.neg = function neg (a) { -1 8686 if (a.isZero()) { -1 8687 return a.clone(); -1 8688 } -1 8689 -1 8690 return this.m.sub(a)._forceRed(this); -1 8691 }; -1 8692 -1 8693 Red.prototype.add = function add (a, b) { -1 8694 this._verify2(a, b); -1 8695 -1 8696 var res = a.add(b); -1 8697 if (res.cmp(this.m) >= 0) { -1 8698 res.isub(this.m); -1 8699 } -1 8700 return res._forceRed(this); -1 8701 }; -1 8702 -1 8703 Red.prototype.iadd = function iadd (a, b) { -1 8704 this._verify2(a, b); -1 8705 -1 8706 var res = a.iadd(b); -1 8707 if (res.cmp(this.m) >= 0) { -1 8708 res.isub(this.m); -1 8709 } -1 8710 return res; -1 8711 }; -1 8712 -1 8713 Red.prototype.sub = function sub (a, b) { -1 8714 this._verify2(a, b); -1 8715 -1 8716 var res = a.sub(b); -1 8717 if (res.cmpn(0) < 0) { -1 8718 res.iadd(this.m); -1 8719 } -1 8720 return res._forceRed(this); -1 8721 }; -1 8722 -1 8723 Red.prototype.isub = function isub (a, b) { -1 8724 this._verify2(a, b); -1 8725 -1 8726 var res = a.isub(b); -1 8727 if (res.cmpn(0) < 0) { -1 8728 res.iadd(this.m); -1 8729 } -1 8730 return res; -1 8731 }; -1 8732 -1 8733 Red.prototype.shl = function shl (a, num) { -1 8734 this._verify1(a); -1 8735 return this.imod(a.ushln(num)); -1 8736 }; -1 8737 -1 8738 Red.prototype.imul = function imul (a, b) { -1 8739 this._verify2(a, b); -1 8740 return this.imod(a.imul(b)); -1 8741 }; -1 8742 -1 8743 Red.prototype.mul = function mul (a, b) { -1 8744 this._verify2(a, b); -1 8745 return this.imod(a.mul(b)); -1 8746 }; -1 8747 -1 8748 Red.prototype.isqr = function isqr (a) { -1 8749 return this.imul(a, a.clone()); -1 8750 }; -1 8751 -1 8752 Red.prototype.sqr = function sqr (a) { -1 8753 return this.mul(a, a); -1 8754 }; -1 8755 -1 8756 Red.prototype.sqrt = function sqrt (a) { -1 8757 if (a.isZero()) return a.clone(); -1 8758 -1 8759 var mod3 = this.m.andln(3); -1 8760 assert(mod3 % 2 === 1); -1 8761 -1 8762 // Fast case -1 8763 if (mod3 === 3) { -1 8764 var pow = this.m.add(new BN(1)).iushrn(2); -1 8765 return this.pow(a, pow); -1 8766 } -1 8767 -1 8768 // Tonelli-Shanks algorithm (Totally unoptimized and slow) -1 8769 // -1 8770 // Find Q and S, that Q * 2 ^ S = (P - 1) -1 8771 var q = this.m.subn(1); -1 8772 var s = 0; -1 8773 while (!q.isZero() && q.andln(1) === 0) { -1 8774 s++; -1 8775 q.iushrn(1); -1 8776 } -1 8777 assert(!q.isZero()); -1 8778 -1 8779 var one = new BN(1).toRed(this); -1 8780 var nOne = one.redNeg(); -1 8781 -1 8782 // Find quadratic non-residue -1 8783 // NOTE: Max is such because of generalized Riemann hypothesis. -1 8784 var lpow = this.m.subn(1).iushrn(1); -1 8785 var z = this.m.bitLength(); -1 8786 z = new BN(2 * z * z).toRed(this); -1 8787 -1 8788 while (this.pow(z, lpow).cmp(nOne) !== 0) { -1 8789 z.redIAdd(nOne); -1 8790 } -1 8791 -1 8792 var c = this.pow(z, q); -1 8793 var r = this.pow(a, q.addn(1).iushrn(1)); -1 8794 var t = this.pow(a, q); -1 8795 var m = s; -1 8796 while (t.cmp(one) !== 0) { -1 8797 var tmp = t; -1 8798 for (var i = 0; tmp.cmp(one) !== 0; i++) { -1 8799 tmp = tmp.redSqr(); -1 8800 } -1 8801 assert(i < m); -1 8802 var b = this.pow(c, new BN(1).iushln(m - i - 1)); -1 8803 -1 8804 r = r.redMul(b); -1 8805 c = b.redSqr(); -1 8806 t = t.redMul(c); -1 8807 m = i; -1 8808 } -1 8809 -1 8810 return r; -1 8811 }; -1 8812 -1 8813 Red.prototype.invm = function invm (a) { -1 8814 var inv = a._invmp(this.m); -1 8815 if (inv.negative !== 0) { -1 8816 inv.negative = 0; -1 8817 return this.imod(inv).redNeg(); -1 8818 } else { -1 8819 return this.imod(inv); -1 8820 } -1 8821 }; -1 8822 -1 8823 Red.prototype.pow = function pow (a, num) { -1 8824 if (num.isZero()) return new BN(1).toRed(this); -1 8825 if (num.cmpn(1) === 0) return a.clone(); -1 8826 -1 8827 var windowSize = 4; -1 8828 var wnd = new Array(1 << windowSize); -1 8829 wnd[0] = new BN(1).toRed(this); -1 8830 wnd[1] = a; -1 8831 for (var i = 2; i < wnd.length; i++) { -1 8832 wnd[i] = this.mul(wnd[i - 1], a); -1 8833 } -1 8834 -1 8835 var res = wnd[0]; -1 8836 var current = 0; -1 8837 var currentLen = 0; -1 8838 var start = num.bitLength() % 26; -1 8839 if (start === 0) { -1 8840 start = 26; -1 8841 } -1 8842 -1 8843 for (i = num.length - 1; i >= 0; i--) { -1 8844 var word = num.words[i]; -1 8845 for (var j = start - 1; j >= 0; j--) { -1 8846 var bit = (word >> j) & 1; -1 8847 if (res !== wnd[0]) { -1 8848 res = this.sqr(res); -1 8849 } -1 8850 -1 8851 if (bit === 0 && current === 0) { -1 8852 currentLen = 0; -1 8853 continue; -1 8854 } -1 8855 -1 8856 current <<= 1; -1 8857 current |= bit; -1 8858 currentLen++; -1 8859 if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; -1 8860 -1 8861 res = this.mul(res, wnd[current]); -1 8862 currentLen = 0; -1 8863 current = 0; -1 8864 } -1 8865 start = 26; -1 8866 } -1 8867 -1 8868 return res; -1 8869 }; -1 8870 -1 8871 Red.prototype.convertTo = function convertTo (num) { -1 8872 var r = num.umod(this.m); -1 8873 -1 8874 return r === num ? r.clone() : r; -1 8875 }; -1 8876 -1 8877 Red.prototype.convertFrom = function convertFrom (num) { -1 8878 var res = num.clone(); -1 8879 res.red = null; -1 8880 return res; -1 8881 }; -1 8882 -1 8883 // -1 8884 // Montgomery method engine -1 8885 // -1 8886 -1 8887 BN.mont = function mont (num) { -1 8888 return new Mont(num); -1 8889 }; -1 8890 -1 8891 function Mont (m) { -1 8892 Red.call(this, m); -1 8893 -1 8894 this.shift = this.m.bitLength(); -1 8895 if (this.shift % 26 !== 0) { -1 8896 this.shift += 26 - (this.shift % 26); -1 8897 } -1 8898 -1 8899 this.r = new BN(1).iushln(this.shift); -1 8900 this.r2 = this.imod(this.r.sqr()); -1 8901 this.rinv = this.r._invmp(this.m); -1 8902 -1 8903 this.minv = this.rinv.mul(this.r).isubn(1).div(this.m); -1 8904 this.minv = this.minv.umod(this.r); -1 8905 this.minv = this.r.sub(this.minv); -1 8906 } -1 8907 inherits(Mont, Red); -1 8908 -1 8909 Mont.prototype.convertTo = function convertTo (num) { -1 8910 return this.imod(num.ushln(this.shift)); -1 8911 }; -1 8912 -1 8913 Mont.prototype.convertFrom = function convertFrom (num) { -1 8914 var r = this.imod(num.mul(this.rinv)); -1 8915 r.red = null; -1 8916 return r; -1 8917 }; -1 8918 -1 8919 Mont.prototype.imul = function imul (a, b) { -1 8920 if (a.isZero() || b.isZero()) { -1 8921 a.words[0] = 0; -1 8922 a.length = 1; -1 8923 return a; -1 8924 } -1 8925 -1 8926 var t = a.imul(b); -1 8927 var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); -1 8928 var u = t.isub(c).iushrn(this.shift); -1 8929 var res = u; -1 8930 -1 8931 if (u.cmp(this.m) >= 0) { -1 8932 res = u.isub(this.m); -1 8933 } else if (u.cmpn(0) < 0) { -1 8934 res = u.iadd(this.m); -1 8935 } -1 8936 -1 8937 return res._forceRed(this); -1 8938 }; -1 8939 -1 8940 Mont.prototype.mul = function mul (a, b) { -1 8941 if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); -1 8942 -1 8943 var t = a.mul(b); -1 8944 var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); -1 8945 var u = t.isub(c).iushrn(this.shift); -1 8946 var res = u; -1 8947 if (u.cmp(this.m) >= 0) { -1 8948 res = u.isub(this.m); -1 8949 } else if (u.cmpn(0) < 0) { -1 8950 res = u.iadd(this.m); -1 8951 } -1 8952 -1 8953 return res._forceRed(this); -1 8954 }; -1 8955 -1 8956 Mont.prototype.invm = function invm (a) { -1 8957 // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R -1 8958 var res = this.imod(a._invmp(this.m).mul(this.r2)); -1 8959 return res._forceRed(this); -1 8960 }; -1 8961 })(typeof module === 'undefined' || module, this); -1 8962 -1 8963 },{"buffer":19}],18:[function(require,module,exports){ -1 8964 var r; -1 8965 -1 8966 module.exports = function rand(len) { -1 8967 if (!r) -1 8968 r = new Rand(null); -1 8969 -1 8970 return r.generate(len); -1 8971 }; -1 8972 -1 8973 function Rand(rand) { -1 8974 this.rand = rand; -1 8975 } -1 8976 module.exports.Rand = Rand; -1 8977 -1 8978 Rand.prototype.generate = function generate(len) { -1 8979 return this._rand(len); -1 8980 }; -1 8981 -1 8982 // Emulate crypto API using randy -1 8983 Rand.prototype._rand = function _rand(n) { -1 8984 if (this.rand.getBytes) -1 8985 return this.rand.getBytes(n); -1 8986 -1 8987 var res = new Uint8Array(n); -1 8988 for (var i = 0; i < res.length; i++) -1 8989 res[i] = this.rand.getByte(); -1 8990 return res; -1 8991 }; -1 8992 -1 8993 if (typeof self === 'object') { -1 8994 if (self.crypto && self.crypto.getRandomValues) { -1 8995 // Modern browsers -1 8996 Rand.prototype._rand = function _rand(n) { -1 8997 var arr = new Uint8Array(n); -1 8998 self.crypto.getRandomValues(arr); -1 8999 return arr; -1 9000 }; -1 9001 } else if (self.msCrypto && self.msCrypto.getRandomValues) { -1 9002 // IE -1 9003 Rand.prototype._rand = function _rand(n) { -1 9004 var arr = new Uint8Array(n); -1 9005 self.msCrypto.getRandomValues(arr); -1 9006 return arr; -1 9007 }; -1 9008 -1 9009 // Safari's WebWorkers do not have `crypto` -1 9010 } else if (typeof window === 'object') { -1 9011 // Old junk -1 9012 Rand.prototype._rand = function() { -1 9013 throw new Error('Not implemented yet'); -1 9014 }; -1 9015 } -1 9016 } else { -1 9017 // Node.js or Web worker with no crypto support -1 9018 try { -1 9019 var crypto = require('crypto'); -1 9020 if (typeof crypto.randomBytes !== 'function') -1 9021 throw new Error('Not supported'); -1 9022 -1 9023 Rand.prototype._rand = function _rand(n) { -1 9024 return crypto.randomBytes(n); -1 9025 }; -1 9026 } catch (e) { -1 9027 } -1 9028 } -1 9029 -1 9030 },{"crypto":19}],19:[function(require,module,exports){ -1 9031 -1 9032 },{}],20:[function(require,module,exports){ -1 9033 // based on the aes implimentation in triple sec -1 9034 // https://github.com/keybase/triplesec -1 9035 // which is in turn based on the one from crypto-js -1 9036 // https://code.google.com/p/crypto-js/ -1 9037 -1 9038 var Buffer = require('safe-buffer').Buffer -1 9039 -1 9040 function asUInt32Array (buf) { -1 9041 if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf) -1 9042 -1 9043 var len = (buf.length / 4) | 0 -1 9044 var out = new Array(len) -1 9045 -1 9046 for (var i = 0; i < len; i++) { -1 9047 out[i] = buf.readUInt32BE(i * 4) -1 9048 } -1 9049 -1 9050 return out -1 9051 } -1 9052 -1 9053 function scrubVec (v) { -1 9054 for (var i = 0; i < v.length; v++) { -1 9055 v[i] = 0 -1 9056 } -1 9057 } -1 9058 -1 9059 function cryptBlock (M, keySchedule, SUB_MIX, SBOX, nRounds) { -1 9060 var SUB_MIX0 = SUB_MIX[0] -1 9061 var SUB_MIX1 = SUB_MIX[1] -1 9062 var SUB_MIX2 = SUB_MIX[2] -1 9063 var SUB_MIX3 = SUB_MIX[3] -1 9064 -1 9065 var s0 = M[0] ^ keySchedule[0] -1 9066 var s1 = M[1] ^ keySchedule[1] -1 9067 var s2 = M[2] ^ keySchedule[2] -1 9068 var s3 = M[3] ^ keySchedule[3] -1 9069 var t0, t1, t2, t3 -1 9070 var ksRow = 4 -1 9071 -1 9072 for (var round = 1; round < nRounds; round++) { -1 9073 t0 = SUB_MIX0[s0 >>> 24] ^ SUB_MIX1[(s1 >>> 16) & 0xff] ^ SUB_MIX2[(s2 >>> 8) & 0xff] ^ SUB_MIX3[s3 & 0xff] ^ keySchedule[ksRow++] -1 9074 t1 = SUB_MIX0[s1 >>> 24] ^ SUB_MIX1[(s2 >>> 16) & 0xff] ^ SUB_MIX2[(s3 >>> 8) & 0xff] ^ SUB_MIX3[s0 & 0xff] ^ keySchedule[ksRow++] -1 9075 t2 = SUB_MIX0[s2 >>> 24] ^ SUB_MIX1[(s3 >>> 16) & 0xff] ^ SUB_MIX2[(s0 >>> 8) & 0xff] ^ SUB_MIX3[s1 & 0xff] ^ keySchedule[ksRow++] -1 9076 t3 = SUB_MIX0[s3 >>> 24] ^ SUB_MIX1[(s0 >>> 16) & 0xff] ^ SUB_MIX2[(s1 >>> 8) & 0xff] ^ SUB_MIX3[s2 & 0xff] ^ keySchedule[ksRow++] -1 9077 s0 = t0 -1 9078 s1 = t1 -1 9079 s2 = t2 -1 9080 s3 = t3 -1 9081 } -1 9082 -1 9083 t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++] -1 9084 t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++] -1 9085 t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++] -1 9086 t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++] -1 9087 t0 = t0 >>> 0 -1 9088 t1 = t1 >>> 0 -1 9089 t2 = t2 >>> 0 -1 9090 t3 = t3 >>> 0 -1 9091 -1 9092 return [t0, t1, t2, t3] -1 9093 } -1 9094 -1 9095 // AES constants -1 9096 var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36] -1 9097 var G = (function () { -1 9098 // Compute double table -1 9099 var d = new Array(256) -1 9100 for (var j = 0; j < 256; j++) { -1 9101 if (j < 128) { -1 9102 d[j] = j << 1 -1 9103 } else { -1 9104 d[j] = (j << 1) ^ 0x11b -1 9105 } -1 9106 } -1 9107 -1 9108 var SBOX = [] -1 9109 var INV_SBOX = [] -1 9110 var SUB_MIX = [[], [], [], []] -1 9111 var INV_SUB_MIX = [[], [], [], []] -1 9112 -1 9113 // Walk GF(2^8) -1 9114 var x = 0 -1 9115 var xi = 0 -1 9116 for (var i = 0; i < 256; ++i) { -1 9117 // Compute sbox -1 9118 var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4) -1 9119 sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63 -1 9120 SBOX[x] = sx -1 9121 INV_SBOX[sx] = x -1 9122 -1 9123 // Compute multiplication -1 9124 var x2 = d[x] -1 9125 var x4 = d[x2] -1 9126 var x8 = d[x4] -1 9127 -1 9128 // Compute sub bytes, mix columns tables -1 9129 var t = (d[sx] * 0x101) ^ (sx * 0x1010100) -1 9130 SUB_MIX[0][x] = (t << 24) | (t >>> 8) -1 9131 SUB_MIX[1][x] = (t << 16) | (t >>> 16) -1 9132 SUB_MIX[2][x] = (t << 8) | (t >>> 24) -1 9133 SUB_MIX[3][x] = t -1 9134 -1 9135 // Compute inv sub bytes, inv mix columns tables -1 9136 t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100) -1 9137 INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8) -1 9138 INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16) -1 9139 INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24) -1 9140 INV_SUB_MIX[3][sx] = t -1 9141 -1 9142 if (x === 0) { -1 9143 x = xi = 1 -1 9144 } else { -1 9145 x = x2 ^ d[d[d[x8 ^ x2]]] -1 9146 xi ^= d[d[xi]] -1 9147 } -1 9148 } -1 9149 -1 9150 return { -1 9151 SBOX: SBOX, -1 9152 INV_SBOX: INV_SBOX, -1 9153 SUB_MIX: SUB_MIX, -1 9154 INV_SUB_MIX: INV_SUB_MIX -1 9155 } -1 9156 })() -1 9157 -1 9158 function AES (key) { -1 9159 this._key = asUInt32Array(key) -1 9160 this._reset() -1 9161 } -1 9162 -1 9163 AES.blockSize = 4 * 4 -1 9164 AES.keySize = 256 / 8 -1 9165 AES.prototype.blockSize = AES.blockSize -1 9166 AES.prototype.keySize = AES.keySize -1 9167 AES.prototype._reset = function () { -1 9168 var keyWords = this._key -1 9169 var keySize = keyWords.length -1 9170 var nRounds = keySize + 6 -1 9171 var ksRows = (nRounds + 1) * 4 -1 9172 -1 9173 var keySchedule = [] -1 9174 for (var k = 0; k < keySize; k++) { -1 9175 keySchedule[k] = keyWords[k] -1 9176 } -1 9177 -1 9178 for (k = keySize; k < ksRows; k++) { -1 9179 var t = keySchedule[k - 1] -1 9180 -1 9181 if (k % keySize === 0) { -1 9182 t = (t << 8) | (t >>> 24) -1 9183 t = -1 9184 (G.SBOX[t >>> 24] << 24) | -1 9185 (G.SBOX[(t >>> 16) & 0xff] << 16) | -1 9186 (G.SBOX[(t >>> 8) & 0xff] << 8) | -1 9187 (G.SBOX[t & 0xff]) -1 9188 -1 9189 t ^= RCON[(k / keySize) | 0] << 24 -1 9190 } else if (keySize > 6 && k % keySize === 4) { -1 9191 t = -1 9192 (G.SBOX[t >>> 24] << 24) | -1 9193 (G.SBOX[(t >>> 16) & 0xff] << 16) | -1 9194 (G.SBOX[(t >>> 8) & 0xff] << 8) | -1 9195 (G.SBOX[t & 0xff]) -1 9196 } -1 9197 -1 9198 keySchedule[k] = keySchedule[k - keySize] ^ t -1 9199 } -1 9200 -1 9201 var invKeySchedule = [] -1 9202 for (var ik = 0; ik < ksRows; ik++) { -1 9203 var ksR = ksRows - ik -1 9204 var tt = keySchedule[ksR - (ik % 4 ? 0 : 4)] -1 9205 -1 9206 if (ik < 4 || ksR <= 4) { -1 9207 invKeySchedule[ik] = tt -1 9208 } else { -1 9209 invKeySchedule[ik] = -1 9210 G.INV_SUB_MIX[0][G.SBOX[tt >>> 24]] ^ -1 9211 G.INV_SUB_MIX[1][G.SBOX[(tt >>> 16) & 0xff]] ^ -1 9212 G.INV_SUB_MIX[2][G.SBOX[(tt >>> 8) & 0xff]] ^ -1 9213 G.INV_SUB_MIX[3][G.SBOX[tt & 0xff]] -1 9214 } -1 9215 } -1 9216 -1 9217 this._nRounds = nRounds -1 9218 this._keySchedule = keySchedule -1 9219 this._invKeySchedule = invKeySchedule -1 9220 } -1 9221 -1 9222 AES.prototype.encryptBlockRaw = function (M) { -1 9223 M = asUInt32Array(M) -1 9224 return cryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX, this._nRounds) -1 9225 } -1 9226 -1 9227 AES.prototype.encryptBlock = function (M) { -1 9228 var out = this.encryptBlockRaw(M) -1 9229 var buf = Buffer.allocUnsafe(16) -1 9230 buf.writeUInt32BE(out[0], 0) -1 9231 buf.writeUInt32BE(out[1], 4) -1 9232 buf.writeUInt32BE(out[2], 8) -1 9233 buf.writeUInt32BE(out[3], 12) -1 9234 return buf -1 9235 } -1 9236 -1 9237 AES.prototype.decryptBlock = function (M) { -1 9238 M = asUInt32Array(M) -1 9239 -1 9240 // swap -1 9241 var m1 = M[1] -1 9242 M[1] = M[3] -1 9243 M[3] = m1 -1 9244 -1 9245 var out = cryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX, this._nRounds) -1 9246 var buf = Buffer.allocUnsafe(16) -1 9247 buf.writeUInt32BE(out[0], 0) -1 9248 buf.writeUInt32BE(out[3], 4) -1 9249 buf.writeUInt32BE(out[2], 8) -1 9250 buf.writeUInt32BE(out[1], 12) -1 9251 return buf -1 9252 } -1 9253 -1 9254 AES.prototype.scrub = function () { -1 9255 scrubVec(this._keySchedule) -1 9256 scrubVec(this._invKeySchedule) -1 9257 scrubVec(this._key) -1 9258 } -1 9259 -1 9260 module.exports.AES = AES -1 9261 -1 9262 },{"safe-buffer":160}],21:[function(require,module,exports){ -1 9263 var aes = require('./aes') -1 9264 var Buffer = require('safe-buffer').Buffer -1 9265 var Transform = require('cipher-base') -1 9266 var inherits = require('inherits') -1 9267 var GHASH = require('./ghash') -1 9268 var xor = require('buffer-xor') -1 9269 var incr32 = require('./incr32') -1 9270 -1 9271 function xorTest (a, b) { -1 9272 var out = 0 -1 9273 if (a.length !== b.length) out++ -1 9274 -1 9275 var len = Math.min(a.length, b.length) -1 9276 for (var i = 0; i < len; ++i) { -1 9277 out += (a[i] ^ b[i]) -1 9278 } -1 9279 -1 9280 return out -1 9281 } -1 9282 -1 9283 function calcIv (self, iv, ck) { -1 9284 if (iv.length === 12) { -1 9285 self._finID = Buffer.concat([iv, Buffer.from([0, 0, 0, 1])]) -1 9286 return Buffer.concat([iv, Buffer.from([0, 0, 0, 2])]) -1 9287 } -1 9288 var ghash = new GHASH(ck) -1 9289 var len = iv.length -1 9290 var toPad = len % 16 -1 9291 ghash.update(iv) -1 9292 if (toPad) { -1 9293 toPad = 16 - toPad -1 9294 ghash.update(Buffer.alloc(toPad, 0)) -1 9295 } -1 9296 ghash.update(Buffer.alloc(8, 0)) -1 9297 var ivBits = len * 8 -1 9298 var tail = Buffer.alloc(8) -1 9299 tail.writeUIntBE(ivBits, 0, 8) -1 9300 ghash.update(tail) -1 9301 self._finID = ghash.state -1 9302 var out = Buffer.from(self._finID) -1 9303 incr32(out) -1 9304 return out -1 9305 } -1 9306 function StreamCipher (mode, key, iv, decrypt) { -1 9307 Transform.call(this) -1 9308 -1 9309 var h = Buffer.alloc(4, 0) -1 9310 -1 9311 this._cipher = new aes.AES(key) -1 9312 var ck = this._cipher.encryptBlock(h) -1 9313 this._ghash = new GHASH(ck) -1 9314 iv = calcIv(this, iv, ck) -1 9315 -1 9316 this._prev = Buffer.from(iv) -1 9317 this._cache = Buffer.allocUnsafe(0) -1 9318 this._secCache = Buffer.allocUnsafe(0) -1 9319 this._decrypt = decrypt -1 9320 this._alen = 0 -1 9321 this._len = 0 -1 9322 this._mode = mode -1 9323 -1 9324 this._authTag = null -1 9325 this._called = false -1 9326 } -1 9327 -1 9328 inherits(StreamCipher, Transform) -1 9329 -1 9330 StreamCipher.prototype._update = function (chunk) { -1 9331 if (!this._called && this._alen) { -1 9332 var rump = 16 - (this._alen % 16) -1 9333 if (rump < 16) { -1 9334 rump = Buffer.alloc(rump, 0) -1 9335 this._ghash.update(rump) -1 9336 } -1 9337 } -1 9338 -1 9339 this._called = true -1 9340 var out = this._mode.encrypt(this, chunk) -1 9341 if (this._decrypt) { -1 9342 this._ghash.update(chunk) -1 9343 } else { -1 9344 this._ghash.update(out) -1 9345 } -1 9346 this._len += chunk.length -1 9347 return out -1 9348 } -1 9349 -1 9350 StreamCipher.prototype._final = function () { -1 9351 if (this._decrypt && !this._authTag) throw new Error('Unsupported state or unable to authenticate data') -1 9352 -1 9353 var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID)) -1 9354 if (this._decrypt && xorTest(tag, this._authTag)) throw new Error('Unsupported state or unable to authenticate data') -1 9355 -1 9356 this._authTag = tag -1 9357 this._cipher.scrub() -1 9358 } -1 9359 -1 9360 StreamCipher.prototype.getAuthTag = function getAuthTag () { -1 9361 if (this._decrypt || !Buffer.isBuffer(this._authTag)) throw new Error('Attempting to get auth tag in unsupported state') -1 9362 -1 9363 return this._authTag -1 9364 } -1 9365 -1 9366 StreamCipher.prototype.setAuthTag = function setAuthTag (tag) { -1 9367 if (!this._decrypt) throw new Error('Attempting to set auth tag in unsupported state') -1 9368 -1 9369 this._authTag = tag -1 9370 } -1 9371 -1 9372 StreamCipher.prototype.setAAD = function setAAD (buf) { -1 9373 if (this._called) throw new Error('Attempting to set AAD in unsupported state') -1 9374 -1 9375 this._ghash.update(buf) -1 9376 this._alen += buf.length -1 9377 } -1 9378 -1 9379 module.exports = StreamCipher -1 9380 -1 9381 },{"./aes":20,"./ghash":25,"./incr32":26,"buffer-xor":62,"cipher-base":64,"inherits":132,"safe-buffer":160}],22:[function(require,module,exports){ -1 9382 var ciphers = require('./encrypter') -1 9383 var deciphers = require('./decrypter') -1 9384 var modes = require('./modes/list.json') -1 9385 -1 9386 function getCiphers () { -1 9387 return Object.keys(modes) -1 9388 } -1 9389 -1 9390 exports.createCipher = exports.Cipher = ciphers.createCipher -1 9391 exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv -1 9392 exports.createDecipher = exports.Decipher = deciphers.createDecipher -1 9393 exports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv -1 9394 exports.listCiphers = exports.getCiphers = getCiphers -1 9395 -1 9396 },{"./decrypter":23,"./encrypter":24,"./modes/list.json":34}],23:[function(require,module,exports){ -1 9397 var AuthCipher = require('./authCipher') -1 9398 var Buffer = require('safe-buffer').Buffer -1 9399 var MODES = require('./modes') -1 9400 var StreamCipher = require('./streamCipher') -1 9401 var Transform = require('cipher-base') -1 9402 var aes = require('./aes') -1 9403 var ebtk = require('evp_bytestokey') -1 9404 var inherits = require('inherits') -1 9405 -1 9406 function Decipher (mode, key, iv) { -1 9407 Transform.call(this) -1 9408 -1 9409 this._cache = new Splitter() -1 9410 this._last = void 0 -1 9411 this._cipher = new aes.AES(key) -1 9412 this._prev = Buffer.from(iv) -1 9413 this._mode = mode -1 9414 this._autopadding = true -1 9415 } -1 9416 -1 9417 inherits(Decipher, Transform) -1 9418 -1 9419 Decipher.prototype._update = function (data) { -1 9420 this._cache.add(data) -1 9421 var chunk -1 9422 var thing -1 9423 var out = [] -1 9424 while ((chunk = this._cache.get(this._autopadding))) { -1 9425 thing = this._mode.decrypt(this, chunk) -1 9426 out.push(thing) -1 9427 } -1 9428 return Buffer.concat(out) -1 9429 } -1 9430 -1 9431 Decipher.prototype._final = function () { -1 9432 var chunk = this._cache.flush() -1 9433 if (this._autopadding) { -1 9434 return unpad(this._mode.decrypt(this, chunk)) -1 9435 } else if (chunk) { -1 9436 throw new Error('data not multiple of block length') -1 9437 } -1 9438 } -1 9439 -1 9440 Decipher.prototype.setAutoPadding = function (setTo) { -1 9441 this._autopadding = !!setTo -1 9442 return this -1 9443 } -1 9444 -1 9445 function Splitter () { -1 9446 this.cache = Buffer.allocUnsafe(0) -1 9447 } -1 9448 -1 9449 Splitter.prototype.add = function (data) { -1 9450 this.cache = Buffer.concat([this.cache, data]) -1 9451 } -1 9452 -1 9453 Splitter.prototype.get = function (autoPadding) { -1 9454 var out -1 9455 if (autoPadding) { -1 9456 if (this.cache.length > 16) { -1 9457 out = this.cache.slice(0, 16) -1 9458 this.cache = this.cache.slice(16) -1 9459 return out -1 9460 } -1 9461 } else { -1 9462 if (this.cache.length >= 16) { -1 9463 out = this.cache.slice(0, 16) -1 9464 this.cache = this.cache.slice(16) -1 9465 return out -1 9466 } -1 9467 } -1 9468 -1 9469 return null -1 9470 } -1 9471 -1 9472 Splitter.prototype.flush = function () { -1 9473 if (this.cache.length) return this.cache -1 9474 } -1 9475 -1 9476 function unpad (last) { -1 9477 var padded = last[15] -1 9478 if (padded < 1 || padded > 16) { -1 9479 throw new Error('unable to decrypt data') -1 9480 } -1 9481 var i = -1 -1 9482 while (++i < padded) { -1 9483 if (last[(i + (16 - padded))] !== padded) { -1 9484 throw new Error('unable to decrypt data') -1 9485 } -1 9486 } -1 9487 if (padded === 16) return -1 9488 -1 9489 return last.slice(0, 16 - padded) -1 9490 } -1 9491 -1 9492 function createDecipheriv (suite, password, iv) { -1 9493 var config = MODES[suite.toLowerCase()] -1 9494 if (!config) throw new TypeError('invalid suite type') -1 9495 -1 9496 if (typeof iv === 'string') iv = Buffer.from(iv) -1 9497 if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length) -1 9498 -1 9499 if (typeof password === 'string') password = Buffer.from(password) -1 9500 if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length) -1 9501 -1 9502 if (config.type === 'stream') { -1 9503 return new StreamCipher(config.module, password, iv, true) -1 9504 } else if (config.type === 'auth') { -1 9505 return new AuthCipher(config.module, password, iv, true) -1 9506 } -1 9507 -1 9508 return new Decipher(config.module, password, iv) -1 9509 } -1 9510 -1 9511 function createDecipher (suite, password) { -1 9512 var config = MODES[suite.toLowerCase()] -1 9513 if (!config) throw new TypeError('invalid suite type') -1 9514 -1 9515 var keys = ebtk(password, false, config.key, config.iv) -1 9516 return createDecipheriv(suite, keys.key, keys.iv) -1 9517 } -1 9518 -1 9519 exports.createDecipher = createDecipher -1 9520 exports.createDecipheriv = createDecipheriv -1 9521 -1 9522 },{"./aes":20,"./authCipher":21,"./modes":33,"./streamCipher":36,"cipher-base":64,"evp_bytestokey":101,"inherits":132,"safe-buffer":160}],24:[function(require,module,exports){ -1 9523 var MODES = require('./modes') -1 9524 var AuthCipher = require('./authCipher') -1 9525 var Buffer = require('safe-buffer').Buffer -1 9526 var StreamCipher = require('./streamCipher') -1 9527 var Transform = require('cipher-base') -1 9528 var aes = require('./aes') -1 9529 var ebtk = require('evp_bytestokey') -1 9530 var inherits = require('inherits') -1 9531 -1 9532 function Cipher (mode, key, iv) { -1 9533 Transform.call(this) -1 9534 -1 9535 this._cache = new Splitter() -1 9536 this._cipher = new aes.AES(key) -1 9537 this._prev = Buffer.from(iv) -1 9538 this._mode = mode -1 9539 this._autopadding = true -1 9540 } -1 9541 -1 9542 inherits(Cipher, Transform) -1 9543 -1 9544 Cipher.prototype._update = function (data) { -1 9545 this._cache.add(data) -1 9546 var chunk -1 9547 var thing -1 9548 var out = [] -1 9549 -1 9550 while ((chunk = this._cache.get())) { -1 9551 thing = this._mode.encrypt(this, chunk) -1 9552 out.push(thing) -1 9553 } -1 9554 -1 9555 return Buffer.concat(out) -1 9556 } -1 9557 -1 9558 var PADDING = Buffer.alloc(16, 0x10) -1 9559 -1 9560 Cipher.prototype._final = function () { -1 9561 var chunk = this._cache.flush() -1 9562 if (this._autopadding) { -1 9563 chunk = this._mode.encrypt(this, chunk) -1 9564 this._cipher.scrub() -1 9565 return chunk -1 9566 } -1 9567 -1 9568 if (!chunk.equals(PADDING)) { -1 9569 this._cipher.scrub() -1 9570 throw new Error('data not multiple of block length') -1 9571 } -1 9572 } -1 9573 -1 9574 Cipher.prototype.setAutoPadding = function (setTo) { -1 9575 this._autopadding = !!setTo -1 9576 return this -1 9577 } -1 9578 -1 9579 function Splitter () { -1 9580 this.cache = Buffer.allocUnsafe(0) -1 9581 } -1 9582 -1 9583 Splitter.prototype.add = function (data) { -1 9584 this.cache = Buffer.concat([this.cache, data]) -1 9585 } -1 9586 -1 9587 Splitter.prototype.get = function () { -1 9588 if (this.cache.length > 15) { -1 9589 var out = this.cache.slice(0, 16) -1 9590 this.cache = this.cache.slice(16) -1 9591 return out -1 9592 } -1 9593 return null -1 9594 } -1 9595 -1 9596 Splitter.prototype.flush = function () { -1 9597 var len = 16 - this.cache.length -1 9598 var padBuff = Buffer.allocUnsafe(len) -1 9599 -1 9600 var i = -1 -1 9601 while (++i < len) { -1 9602 padBuff.writeUInt8(len, i) -1 9603 } -1 9604 -1 9605 return Buffer.concat([this.cache, padBuff]) -1 9606 } -1 9607 -1 9608 function createCipheriv (suite, password, iv) { -1 9609 var config = MODES[suite.toLowerCase()] -1 9610 if (!config) throw new TypeError('invalid suite type') -1 9611 -1 9612 if (typeof password === 'string') password = Buffer.from(password) -1 9613 if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length) -1 9614 -1 9615 if (typeof iv === 'string') iv = Buffer.from(iv) -1 9616 if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length) -1 9617 -1 9618 if (config.type === 'stream') { -1 9619 return new StreamCipher(config.module, password, iv) -1 9620 } else if (config.type === 'auth') { -1 9621 return new AuthCipher(config.module, password, iv) -1 9622 } -1 9623 -1 9624 return new Cipher(config.module, password, iv) -1 9625 } -1 9626 -1 9627 function createCipher (suite, password) { -1 9628 var config = MODES[suite.toLowerCase()] -1 9629 if (!config) throw new TypeError('invalid suite type') -1 9630 -1 9631 var keys = ebtk(password, false, config.key, config.iv) -1 9632 return createCipheriv(suite, keys.key, keys.iv) -1 9633 } -1 9634 -1 9635 exports.createCipheriv = createCipheriv -1 9636 exports.createCipher = createCipher -1 9637 -1 9638 },{"./aes":20,"./authCipher":21,"./modes":33,"./streamCipher":36,"cipher-base":64,"evp_bytestokey":101,"inherits":132,"safe-buffer":160}],25:[function(require,module,exports){ -1 9639 var Buffer = require('safe-buffer').Buffer -1 9640 var ZEROES = Buffer.alloc(16, 0) -1 9641 -1 9642 function toArray (buf) { -1 9643 return [ -1 9644 buf.readUInt32BE(0), -1 9645 buf.readUInt32BE(4), -1 9646 buf.readUInt32BE(8), -1 9647 buf.readUInt32BE(12) -1 9648 ] -1 9649 } -1 9650 -1 9651 function fromArray (out) { -1 9652 var buf = Buffer.allocUnsafe(16) -1 9653 buf.writeUInt32BE(out[0] >>> 0, 0) -1 9654 buf.writeUInt32BE(out[1] >>> 0, 4) -1 9655 buf.writeUInt32BE(out[2] >>> 0, 8) -1 9656 buf.writeUInt32BE(out[3] >>> 0, 12) -1 9657 return buf -1 9658 } -1 9659 -1 9660 function GHASH (key) { -1 9661 this.h = key -1 9662 this.state = Buffer.alloc(16, 0) -1 9663 this.cache = Buffer.allocUnsafe(0) -1 9664 } -1 9665 -1 9666 // from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html -1 9667 // by Juho Vähä-Herttua -1 9668 GHASH.prototype.ghash = function (block) { -1 9669 var i = -1 -1 9670 while (++i < block.length) { -1 9671 this.state[i] ^= block[i] -1 9672 } -1 9673 this._multiply() -1 9674 } -1 9675 -1 9676 GHASH.prototype._multiply = function () { -1 9677 var Vi = toArray(this.h) -1 9678 var Zi = [0, 0, 0, 0] -1 9679 var j, xi, lsbVi -1 9680 var i = -1 -1 9681 while (++i < 128) { -1 9682 xi = (this.state[~~(i / 8)] & (1 << (7 - (i % 8)))) !== 0 -1 9683 if (xi) { -1 9684 // Z_i+1 = Z_i ^ V_i -1 9685 Zi[0] ^= Vi[0] -1 9686 Zi[1] ^= Vi[1] -1 9687 Zi[2] ^= Vi[2] -1 9688 Zi[3] ^= Vi[3] -1 9689 } -1 9690 -1 9691 // Store the value of LSB(V_i) -1 9692 lsbVi = (Vi[3] & 1) !== 0 -1 9693 -1 9694 // V_i+1 = V_i >> 1 -1 9695 for (j = 3; j > 0; j--) { -1 9696 Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31) -1 9697 } -1 9698 Vi[0] = Vi[0] >>> 1 -1 9699 -1 9700 // If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R -1 9701 if (lsbVi) { -1 9702 Vi[0] = Vi[0] ^ (0xe1 << 24) -1 9703 } -1 9704 } -1 9705 this.state = fromArray(Zi) -1 9706 } -1 9707 -1 9708 GHASH.prototype.update = function (buf) { -1 9709 this.cache = Buffer.concat([this.cache, buf]) -1 9710 var chunk -1 9711 while (this.cache.length >= 16) { -1 9712 chunk = this.cache.slice(0, 16) -1 9713 this.cache = this.cache.slice(16) -1 9714 this.ghash(chunk) -1 9715 } -1 9716 } -1 9717 -1 9718 GHASH.prototype.final = function (abl, bl) { -1 9719 if (this.cache.length) { -1 9720 this.ghash(Buffer.concat([this.cache, ZEROES], 16)) -1 9721 } -1 9722 -1 9723 this.ghash(fromArray([0, abl, 0, bl])) -1 9724 return this.state -1 9725 } -1 9726 -1 9727 module.exports = GHASH -1 9728 -1 9729 },{"safe-buffer":160}],26:[function(require,module,exports){ -1 9730 function incr32 (iv) { -1 9731 var len = iv.length -1 9732 var item -1 9733 while (len--) { -1 9734 item = iv.readUInt8(len) -1 9735 if (item === 255) { -1 9736 iv.writeUInt8(0, len) -1 9737 } else { -1 9738 item++ -1 9739 iv.writeUInt8(item, len) -1 9740 break -1 9741 } -1 9742 } -1 9743 } -1 9744 module.exports = incr32 -1 9745 -1 9746 },{}],27:[function(require,module,exports){ -1 9747 var xor = require('buffer-xor') -1 9748 -1 9749 exports.encrypt = function (self, block) { -1 9750 var data = xor(block, self._prev) -1 9751 -1 9752 self._prev = self._cipher.encryptBlock(data) -1 9753 return self._prev -1 9754 } -1 9755 -1 9756 exports.decrypt = function (self, block) { -1 9757 var pad = self._prev -1 9758 -1 9759 self._prev = block -1 9760 var out = self._cipher.decryptBlock(block) -1 9761 -1 9762 return xor(out, pad) -1 9763 } -1 9764 -1 9765 },{"buffer-xor":62}],28:[function(require,module,exports){ -1 9766 var Buffer = require('safe-buffer').Buffer -1 9767 var xor = require('buffer-xor') -1 9768 -1 9769 function encryptStart (self, data, decrypt) { -1 9770 var len = data.length -1 9771 var out = xor(data, self._cache) -1 9772 self._cache = self._cache.slice(len) -1 9773 self._prev = Buffer.concat([self._prev, decrypt ? data : out]) -1 9774 return out -1 9775 } -1 9776 -1 9777 exports.encrypt = function (self, data, decrypt) { -1 9778 var out = Buffer.allocUnsafe(0) -1 9779 var len -1 9780 -1 9781 while (data.length) { -1 9782 if (self._cache.length === 0) { -1 9783 self._cache = self._cipher.encryptBlock(self._prev) -1 9784 self._prev = Buffer.allocUnsafe(0) -1 9785 } -1 9786 -1 9787 if (self._cache.length <= data.length) { -1 9788 len = self._cache.length -1 9789 out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)]) -1 9790 data = data.slice(len) -1 9791 } else { -1 9792 out = Buffer.concat([out, encryptStart(self, data, decrypt)]) -1 9793 break -1 9794 } -1 9795 } -1 9796 -1 9797 return out -1 9798 } -1 9799 -1 9800 },{"buffer-xor":62,"safe-buffer":160}],29:[function(require,module,exports){ -1 9801 var Buffer = require('safe-buffer').Buffer -1 9802 -1 9803 function encryptByte (self, byteParam, decrypt) { -1 9804 var pad -1 9805 var i = -1 -1 9806 var len = 8 -1 9807 var out = 0 -1 9808 var bit, value -1 9809 while (++i < len) { -1 9810 pad = self._cipher.encryptBlock(self._prev) -1 9811 bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0 -1 9812 value = pad[0] ^ bit -1 9813 out += ((value & 0x80) >> (i % 8)) -1 9814 self._prev = shiftIn(self._prev, decrypt ? bit : value) -1 9815 } -1 9816 return out -1 9817 } -1 9818 -1 9819 function shiftIn (buffer, value) { -1 9820 var len = buffer.length -1 9821 var i = -1 -1 9822 var out = Buffer.allocUnsafe(buffer.length) -1 9823 buffer = Buffer.concat([buffer, Buffer.from([value])]) -1 9824 -1 9825 while (++i < len) { -1 9826 out[i] = buffer[i] << 1 | buffer[i + 1] >> (7) -1 9827 } -1 9828 -1 9829 return out -1 9830 } -1 9831 -1 9832 exports.encrypt = function (self, chunk, decrypt) { -1 9833 var len = chunk.length -1 9834 var out = Buffer.allocUnsafe(len) -1 9835 var i = -1 -1 9836 -1 9837 while (++i < len) { -1 9838 out[i] = encryptByte(self, chunk[i], decrypt) -1 9839 } -1 9840 -1 9841 return out -1 9842 } -1 9843 -1 9844 },{"safe-buffer":160}],30:[function(require,module,exports){ -1 9845 var Buffer = require('safe-buffer').Buffer -1 9846 -1 9847 function encryptByte (self, byteParam, decrypt) { -1 9848 var pad = self._cipher.encryptBlock(self._prev) -1 9849 var out = pad[0] ^ byteParam -1 9850 -1 9851 self._prev = Buffer.concat([ -1 9852 self._prev.slice(1), -1 9853 Buffer.from([decrypt ? byteParam : out]) -1 9854 ]) -1 9855 -1 9856 return out -1 9857 } -1 9858 -1 9859 exports.encrypt = function (self, chunk, decrypt) { -1 9860 var len = chunk.length -1 9861 var out = Buffer.allocUnsafe(len) -1 9862 var i = -1 -1 9863 -1 9864 while (++i < len) { -1 9865 out[i] = encryptByte(self, chunk[i], decrypt) -1 9866 } -1 9867 -1 9868 return out -1 9869 } -1 9870 -1 9871 },{"safe-buffer":160}],31:[function(require,module,exports){ -1 9872 var xor = require('buffer-xor') -1 9873 var Buffer = require('safe-buffer').Buffer -1 9874 var incr32 = require('../incr32') -1 9875 -1 9876 function getBlock (self) { -1 9877 var out = self._cipher.encryptBlockRaw(self._prev) -1 9878 incr32(self._prev) -1 9879 return out -1 9880 } -1 9881 -1 9882 var blockSize = 16 -1 9883 exports.encrypt = function (self, chunk) { -1 9884 var chunkNum = Math.ceil(chunk.length / blockSize) -1 9885 var start = self._cache.length -1 9886 self._cache = Buffer.concat([ -1 9887 self._cache, -1 9888 Buffer.allocUnsafe(chunkNum * blockSize) -1 9889 ]) -1 9890 for (var i = 0; i < chunkNum; i++) { -1 9891 var out = getBlock(self) -1 9892 var offset = start + i * blockSize -1 9893 self._cache.writeUInt32BE(out[0], offset + 0) -1 9894 self._cache.writeUInt32BE(out[1], offset + 4) -1 9895 self._cache.writeUInt32BE(out[2], offset + 8) -1 9896 self._cache.writeUInt32BE(out[3], offset + 12) -1 9897 } -1 9898 var pad = self._cache.slice(0, chunk.length) -1 9899 self._cache = self._cache.slice(chunk.length) -1 9900 return xor(chunk, pad) -1 9901 } -1 9902 -1 9903 },{"../incr32":26,"buffer-xor":62,"safe-buffer":160}],32:[function(require,module,exports){ -1 9904 exports.encrypt = function (self, block) { -1 9905 return self._cipher.encryptBlock(block) -1 9906 } -1 9907 -1 9908 exports.decrypt = function (self, block) { -1 9909 return self._cipher.decryptBlock(block) -1 9910 } -1 9911 -1 9912 },{}],33:[function(require,module,exports){ -1 9913 var modeModules = { -1 9914 ECB: require('./ecb'), -1 9915 CBC: require('./cbc'), -1 9916 CFB: require('./cfb'), -1 9917 CFB8: require('./cfb8'), -1 9918 CFB1: require('./cfb1'), -1 9919 OFB: require('./ofb'), -1 9920 CTR: require('./ctr'), -1 9921 GCM: require('./ctr') -1 9922 } -1 9923 -1 9924 var modes = require('./list.json') -1 9925 -1 9926 for (var key in modes) { -1 9927 modes[key].module = modeModules[modes[key].mode] -1 9928 } -1 9929 -1 9930 module.exports = modes -1 9931 -1 9932 },{"./cbc":27,"./cfb":28,"./cfb1":29,"./cfb8":30,"./ctr":31,"./ecb":32,"./list.json":34,"./ofb":35}],34:[function(require,module,exports){ -1 9933 module.exports={ -1 9934 "aes-128-ecb": { -1 9935 "cipher": "AES", -1 9936 "key": 128, -1 9937 "iv": 0, -1 9938 "mode": "ECB", -1 9939 "type": "block" -1 9940 }, -1 9941 "aes-192-ecb": { -1 9942 "cipher": "AES", -1 9943 "key": 192, -1 9944 "iv": 0, -1 9945 "mode": "ECB", -1 9946 "type": "block" -1 9947 }, -1 9948 "aes-256-ecb": { -1 9949 "cipher": "AES", -1 9950 "key": 256, -1 9951 "iv": 0, -1 9952 "mode": "ECB", -1 9953 "type": "block" -1 9954 }, -1 9955 "aes-128-cbc": { -1 9956 "cipher": "AES", -1 9957 "key": 128, -1 9958 "iv": 16, -1 9959 "mode": "CBC", -1 9960 "type": "block" -1 9961 }, -1 9962 "aes-192-cbc": { -1 9963 "cipher": "AES", -1 9964 "key": 192, -1 9965 "iv": 16, -1 9966 "mode": "CBC", -1 9967 "type": "block" -1 9968 }, -1 9969 "aes-256-cbc": { -1 9970 "cipher": "AES", -1 9971 "key": 256, -1 9972 "iv": 16, -1 9973 "mode": "CBC", -1 9974 "type": "block" -1 9975 }, -1 9976 "aes128": { -1 9977 "cipher": "AES", -1 9978 "key": 128, -1 9979 "iv": 16, -1 9980 "mode": "CBC", -1 9981 "type": "block" -1 9982 }, -1 9983 "aes192": { -1 9984 "cipher": "AES", -1 9985 "key": 192, -1 9986 "iv": 16, -1 9987 "mode": "CBC", -1 9988 "type": "block" -1 9989 }, -1 9990 "aes256": { -1 9991 "cipher": "AES", -1 9992 "key": 256, -1 9993 "iv": 16, -1 9994 "mode": "CBC", -1 9995 "type": "block" -1 9996 }, -1 9997 "aes-128-cfb": { -1 9998 "cipher": "AES", -1 9999 "key": 128, -1 10000 "iv": 16, -1 10001 "mode": "CFB", -1 10002 "type": "stream" -1 10003 }, -1 10004 "aes-192-cfb": { -1 10005 "cipher": "AES", -1 10006 "key": 192, -1 10007 "iv": 16, -1 10008 "mode": "CFB", -1 10009 "type": "stream" -1 10010 }, -1 10011 "aes-256-cfb": { -1 10012 "cipher": "AES", -1 10013 "key": 256, -1 10014 "iv": 16, -1 10015 "mode": "CFB", -1 10016 "type": "stream" -1 10017 }, -1 10018 "aes-128-cfb8": { -1 10019 "cipher": "AES", -1 10020 "key": 128, -1 10021 "iv": 16, -1 10022 "mode": "CFB8", -1 10023 "type": "stream" -1 10024 }, -1 10025 "aes-192-cfb8": { -1 10026 "cipher": "AES", -1 10027 "key": 192, -1 10028 "iv": 16, -1 10029 "mode": "CFB8", -1 10030 "type": "stream" -1 10031 }, -1 10032 "aes-256-cfb8": { -1 10033 "cipher": "AES", -1 10034 "key": 256, -1 10035 "iv": 16, -1 10036 "mode": "CFB8", -1 10037 "type": "stream" -1 10038 }, -1 10039 "aes-128-cfb1": { -1 10040 "cipher": "AES", -1 10041 "key": 128, -1 10042 "iv": 16, -1 10043 "mode": "CFB1", -1 10044 "type": "stream" -1 10045 }, -1 10046 "aes-192-cfb1": { -1 10047 "cipher": "AES", -1 10048 "key": 192, -1 10049 "iv": 16, -1 10050 "mode": "CFB1", -1 10051 "type": "stream" -1 10052 }, -1 10053 "aes-256-cfb1": { -1 10054 "cipher": "AES", -1 10055 "key": 256, -1 10056 "iv": 16, -1 10057 "mode": "CFB1", -1 10058 "type": "stream" -1 10059 }, -1 10060 "aes-128-ofb": { -1 10061 "cipher": "AES", -1 10062 "key": 128, -1 10063 "iv": 16, -1 10064 "mode": "OFB", -1 10065 "type": "stream" -1 10066 }, -1 10067 "aes-192-ofb": { -1 10068 "cipher": "AES", -1 10069 "key": 192, -1 10070 "iv": 16, -1 10071 "mode": "OFB", -1 10072 "type": "stream" -1 10073 }, -1 10074 "aes-256-ofb": { -1 10075 "cipher": "AES", -1 10076 "key": 256, -1 10077 "iv": 16, -1 10078 "mode": "OFB", -1 10079 "type": "stream" -1 10080 }, -1 10081 "aes-128-ctr": { -1 10082 "cipher": "AES", -1 10083 "key": 128, -1 10084 "iv": 16, -1 10085 "mode": "CTR", -1 10086 "type": "stream" -1 10087 }, -1 10088 "aes-192-ctr": { -1 10089 "cipher": "AES", -1 10090 "key": 192, -1 10091 "iv": 16, -1 10092 "mode": "CTR", -1 10093 "type": "stream" -1 10094 }, -1 10095 "aes-256-ctr": { -1 10096 "cipher": "AES", -1 10097 "key": 256, -1 10098 "iv": 16, -1 10099 "mode": "CTR", -1 10100 "type": "stream" -1 10101 }, -1 10102 "aes-128-gcm": { -1 10103 "cipher": "AES", -1 10104 "key": 128, -1 10105 "iv": 12, -1 10106 "mode": "GCM", -1 10107 "type": "auth" -1 10108 }, -1 10109 "aes-192-gcm": { -1 10110 "cipher": "AES", -1 10111 "key": 192, -1 10112 "iv": 12, -1 10113 "mode": "GCM", -1 10114 "type": "auth" -1 10115 }, -1 10116 "aes-256-gcm": { -1 10117 "cipher": "AES", -1 10118 "key": 256, -1 10119 "iv": 12, -1 10120 "mode": "GCM", -1 10121 "type": "auth" -1 10122 } -1 10123 } -1 10124 -1 10125 },{}],35:[function(require,module,exports){ -1 10126 (function (Buffer){(function (){ -1 10127 var xor = require('buffer-xor') -1 10128 -1 10129 function getBlock (self) { -1 10130 self._prev = self._cipher.encryptBlock(self._prev) -1 10131 return self._prev -1 10132 } -1 10133 -1 10134 exports.encrypt = function (self, chunk) { -1 10135 while (self._cache.length < chunk.length) { -1 10136 self._cache = Buffer.concat([self._cache, getBlock(self)]) -1 10137 } -1 10138 -1 10139 var pad = self._cache.slice(0, chunk.length) -1 10140 self._cache = self._cache.slice(chunk.length) -1 10141 return xor(chunk, pad) -1 10142 } -1 10143 -1 10144 }).call(this)}).call(this,require("buffer").Buffer) -1 10145 },{"buffer":63,"buffer-xor":62}],36:[function(require,module,exports){ -1 10146 var aes = require('./aes') -1 10147 var Buffer = require('safe-buffer').Buffer -1 10148 var Transform = require('cipher-base') -1 10149 var inherits = require('inherits') -1 10150 -1 10151 function StreamCipher (mode, key, iv, decrypt) { -1 10152 Transform.call(this) -1 10153 -1 10154 this._cipher = new aes.AES(key) -1 10155 this._prev = Buffer.from(iv) -1 10156 this._cache = Buffer.allocUnsafe(0) -1 10157 this._secCache = Buffer.allocUnsafe(0) -1 10158 this._decrypt = decrypt -1 10159 this._mode = mode -1 10160 } -1 10161 -1 10162 inherits(StreamCipher, Transform) -1 10163 -1 10164 StreamCipher.prototype._update = function (chunk) { -1 10165 return this._mode.encrypt(this, chunk, this._decrypt) -1 10166 } -1 10167 -1 10168 StreamCipher.prototype._final = function () { -1 10169 this._cipher.scrub() -1 10170 } -1 10171 -1 10172 module.exports = StreamCipher -1 10173 -1 10174 },{"./aes":20,"cipher-base":64,"inherits":132,"safe-buffer":160}],37:[function(require,module,exports){ -1 10175 var DES = require('browserify-des') -1 10176 var aes = require('browserify-aes/browser') -1 10177 var aesModes = require('browserify-aes/modes') -1 10178 var desModes = require('browserify-des/modes') -1 10179 var ebtk = require('evp_bytestokey') -1 10180 -1 10181 function createCipher (suite, password) { -1 10182 suite = suite.toLowerCase() -1 10183 -1 10184 var keyLen, ivLen -1 10185 if (aesModes[suite]) { -1 10186 keyLen = aesModes[suite].key -1 10187 ivLen = aesModes[suite].iv -1 10188 } else if (desModes[suite]) { -1 10189 keyLen = desModes[suite].key * 8 -1 10190 ivLen = desModes[suite].iv -1 10191 } else { -1 10192 throw new TypeError('invalid suite type') -1 10193 } -1 10194 -1 10195 var keys = ebtk(password, false, keyLen, ivLen) -1 10196 return createCipheriv(suite, keys.key, keys.iv) -1 10197 } -1 10198 -1 10199 function createDecipher (suite, password) { -1 10200 suite = suite.toLowerCase() -1 10201 -1 10202 var keyLen, ivLen -1 10203 if (aesModes[suite]) { -1 10204 keyLen = aesModes[suite].key -1 10205 ivLen = aesModes[suite].iv -1 10206 } else if (desModes[suite]) { -1 10207 keyLen = desModes[suite].key * 8 -1 10208 ivLen = desModes[suite].iv -1 10209 } else { -1 10210 throw new TypeError('invalid suite type') -1 10211 } -1 10212 -1 10213 var keys = ebtk(password, false, keyLen, ivLen) -1 10214 return createDecipheriv(suite, keys.key, keys.iv) -1 10215 } -1 10216 -1 10217 function createCipheriv (suite, key, iv) { -1 10218 suite = suite.toLowerCase() -1 10219 if (aesModes[suite]) return aes.createCipheriv(suite, key, iv) -1 10220 if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite }) -1 10221 -1 10222 throw new TypeError('invalid suite type') -1 10223 } -1 10224 -1 10225 function createDecipheriv (suite, key, iv) { -1 10226 suite = suite.toLowerCase() -1 10227 if (aesModes[suite]) return aes.createDecipheriv(suite, key, iv) -1 10228 if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite, decrypt: true }) -1 10229 -1 10230 throw new TypeError('invalid suite type') -1 10231 } -1 10232 -1 10233 function getCiphers () { -1 10234 return Object.keys(desModes).concat(aes.getCiphers()) -1 10235 } -1 10236 -1 10237 exports.createCipher = exports.Cipher = createCipher -1 10238 exports.createCipheriv = exports.Cipheriv = createCipheriv -1 10239 exports.createDecipher = exports.Decipher = createDecipher -1 10240 exports.createDecipheriv = exports.Decipheriv = createDecipheriv -1 10241 exports.listCiphers = exports.getCiphers = getCiphers -1 10242 -1 10243 },{"browserify-aes/browser":22,"browserify-aes/modes":33,"browserify-des":38,"browserify-des/modes":39,"evp_bytestokey":101}],38:[function(require,module,exports){ -1 10244 var CipherBase = require('cipher-base') -1 10245 var des = require('des.js') -1 10246 var inherits = require('inherits') -1 10247 var Buffer = require('safe-buffer').Buffer -1 10248 -1 10249 var modes = { -1 10250 'des-ede3-cbc': des.CBC.instantiate(des.EDE), -1 10251 'des-ede3': des.EDE, -1 10252 'des-ede-cbc': des.CBC.instantiate(des.EDE), -1 10253 'des-ede': des.EDE, -1 10254 'des-cbc': des.CBC.instantiate(des.DES), -1 10255 'des-ecb': des.DES -1 10256 } -1 10257 modes.des = modes['des-cbc'] -1 10258 modes.des3 = modes['des-ede3-cbc'] -1 10259 module.exports = DES -1 10260 inherits(DES, CipherBase) -1 10261 function DES (opts) { -1 10262 CipherBase.call(this) -1 10263 var modeName = opts.mode.toLowerCase() -1 10264 var mode = modes[modeName] -1 10265 var type -1 10266 if (opts.decrypt) { -1 10267 type = 'decrypt' -1 10268 } else { -1 10269 type = 'encrypt' -1 10270 } -1 10271 var key = opts.key -1 10272 if (!Buffer.isBuffer(key)) { -1 10273 key = Buffer.from(key) -1 10274 } -1 10275 if (modeName === 'des-ede' || modeName === 'des-ede-cbc') { -1 10276 key = Buffer.concat([key, key.slice(0, 8)]) -1 10277 } -1 10278 var iv = opts.iv -1 10279 if (!Buffer.isBuffer(iv)) { -1 10280 iv = Buffer.from(iv) -1 10281 } -1 10282 this._des = mode.create({ -1 10283 key: key, -1 10284 iv: iv, -1 10285 type: type -1 10286 }) -1 10287 } -1 10288 DES.prototype._update = function (data) { -1 10289 return Buffer.from(this._des.update(data)) -1 10290 } -1 10291 DES.prototype._final = function () { -1 10292 return Buffer.from(this._des.final()) -1 10293 } -1 10294 -1 10295 },{"cipher-base":64,"des.js":72,"inherits":132,"safe-buffer":160}],39:[function(require,module,exports){ -1 10296 exports['des-ecb'] = { -1 10297 key: 8, -1 10298 iv: 0 -1 10299 } -1 10300 exports['des-cbc'] = exports.des = { -1 10301 key: 8, -1 10302 iv: 8 -1 10303 } -1 10304 exports['des-ede3-cbc'] = exports.des3 = { -1 10305 key: 24, -1 10306 iv: 8 -1 10307 } -1 10308 exports['des-ede3'] = { -1 10309 key: 24, -1 10310 iv: 0 -1 10311 } -1 10312 exports['des-ede-cbc'] = { -1 10313 key: 16, -1 10314 iv: 8 -1 10315 } -1 10316 exports['des-ede'] = { -1 10317 key: 16, -1 10318 iv: 0 -1 10319 } -1 10320 -1 10321 },{}],40:[function(require,module,exports){ -1 10322 (function (Buffer){(function (){ -1 10323 var BN = require('bn.js') -1 10324 var randomBytes = require('randombytes') -1 10325 -1 10326 function blind (priv) { -1 10327 var r = getr(priv) -1 10328 var blinder = r.toRed(BN.mont(priv.modulus)).redPow(new BN(priv.publicExponent)).fromRed() -1 10329 return { blinder: blinder, unblinder: r.invm(priv.modulus) } -1 10330 } -1 10331 -1 10332 function getr (priv) { -1 10333 var len = priv.modulus.byteLength() -1 10334 var r -1 10335 do { -1 10336 r = new BN(randomBytes(len)) -1 10337 } while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2)) -1 10338 return r -1 10339 } -1 10340 -1 10341 function crt (msg, priv) { -1 10342 var blinds = blind(priv) -1 10343 var len = priv.modulus.byteLength() -1 10344 var blinded = new BN(msg).mul(blinds.blinder).umod(priv.modulus) -1 10345 var c1 = blinded.toRed(BN.mont(priv.prime1)) -1 10346 var c2 = blinded.toRed(BN.mont(priv.prime2)) -1 10347 var qinv = priv.coefficient -1 10348 var p = priv.prime1 -1 10349 var q = priv.prime2 -1 10350 var m1 = c1.redPow(priv.exponent1).fromRed() -1 10351 var m2 = c2.redPow(priv.exponent2).fromRed() -1 10352 var h = m1.isub(m2).imul(qinv).umod(p).imul(q) -1 10353 return m2.iadd(h).imul(blinds.unblinder).umod(priv.modulus).toArrayLike(Buffer, 'be', len) -1 10354 } -1 10355 crt.getr = getr -1 10356 -1 10357 module.exports = crt -1 10358 -1 10359 }).call(this)}).call(this,require("buffer").Buffer) -1 10360 },{"bn.js":17,"buffer":63,"randombytes":157}],41:[function(require,module,exports){ -1 10361 module.exports = require('./browser/algorithms.json') -1 10362 -1 10363 },{"./browser/algorithms.json":42}],42:[function(require,module,exports){ -1 10364 module.exports={ -1 10365 "sha224WithRSAEncryption": { -1 10366 "sign": "rsa", -1 10367 "hash": "sha224", -1 10368 "id": "302d300d06096086480165030402040500041c" -1 10369 }, -1 10370 "RSA-SHA224": { -1 10371 "sign": "ecdsa/rsa", -1 10372 "hash": "sha224", -1 10373 "id": "302d300d06096086480165030402040500041c" -1 10374 }, -1 10375 "sha256WithRSAEncryption": { -1 10376 "sign": "rsa", -1 10377 "hash": "sha256", -1 10378 "id": "3031300d060960864801650304020105000420" -1 10379 }, -1 10380 "RSA-SHA256": { -1 10381 "sign": "ecdsa/rsa", -1 10382 "hash": "sha256", -1 10383 "id": "3031300d060960864801650304020105000420" -1 10384 }, -1 10385 "sha384WithRSAEncryption": { -1 10386 "sign": "rsa", -1 10387 "hash": "sha384", -1 10388 "id": "3041300d060960864801650304020205000430" -1 10389 }, -1 10390 "RSA-SHA384": { -1 10391 "sign": "ecdsa/rsa", -1 10392 "hash": "sha384", -1 10393 "id": "3041300d060960864801650304020205000430" -1 10394 }, -1 10395 "sha512WithRSAEncryption": { -1 10396 "sign": "rsa", -1 10397 "hash": "sha512", -1 10398 "id": "3051300d060960864801650304020305000440" -1 10399 }, -1 10400 "RSA-SHA512": { -1 10401 "sign": "ecdsa/rsa", -1 10402 "hash": "sha512", -1 10403 "id": "3051300d060960864801650304020305000440" -1 10404 }, -1 10405 "RSA-SHA1": { -1 10406 "sign": "rsa", -1 10407 "hash": "sha1", -1 10408 "id": "3021300906052b0e03021a05000414" -1 10409 }, -1 10410 "ecdsa-with-SHA1": { -1 10411 "sign": "ecdsa", -1 10412 "hash": "sha1", -1 10413 "id": "" -1 10414 }, -1 10415 "sha256": { -1 10416 "sign": "ecdsa", -1 10417 "hash": "sha256", -1 10418 "id": "" -1 10419 }, -1 10420 "sha224": { -1 10421 "sign": "ecdsa", -1 10422 "hash": "sha224", -1 10423 "id": "" -1 10424 }, -1 10425 "sha384": { -1 10426 "sign": "ecdsa", -1 10427 "hash": "sha384", -1 10428 "id": "" -1 10429 }, -1 10430 "sha512": { -1 10431 "sign": "ecdsa", -1 10432 "hash": "sha512", -1 10433 "id": "" -1 10434 }, -1 10435 "DSA-SHA": { -1 10436 "sign": "dsa", -1 10437 "hash": "sha1", -1 10438 "id": "" -1 10439 }, -1 10440 "DSA-SHA1": { -1 10441 "sign": "dsa", -1 10442 "hash": "sha1", -1 10443 "id": "" -1 10444 }, -1 10445 "DSA": { -1 10446 "sign": "dsa", -1 10447 "hash": "sha1", -1 10448 "id": "" -1 10449 }, -1 10450 "DSA-WITH-SHA224": { -1 10451 "sign": "dsa", -1 10452 "hash": "sha224", -1 10453 "id": "" -1 10454 }, -1 10455 "DSA-SHA224": { -1 10456 "sign": "dsa", -1 10457 "hash": "sha224", -1 10458 "id": "" -1 10459 }, -1 10460 "DSA-WITH-SHA256": { -1 10461 "sign": "dsa", -1 10462 "hash": "sha256", -1 10463 "id": "" -1 10464 }, -1 10465 "DSA-SHA256": { -1 10466 "sign": "dsa", -1 10467 "hash": "sha256", -1 10468 "id": "" -1 10469 }, -1 10470 "DSA-WITH-SHA384": { -1 10471 "sign": "dsa", -1 10472 "hash": "sha384", -1 10473 "id": "" -1 10474 }, -1 10475 "DSA-SHA384": { -1 10476 "sign": "dsa", -1 10477 "hash": "sha384", -1 10478 "id": "" -1 10479 }, -1 10480 "DSA-WITH-SHA512": { -1 10481 "sign": "dsa", -1 10482 "hash": "sha512", -1 10483 "id": "" -1 10484 }, -1 10485 "DSA-SHA512": { -1 10486 "sign": "dsa", -1 10487 "hash": "sha512", -1 10488 "id": "" -1 10489 }, -1 10490 "DSA-RIPEMD160": { -1 10491 "sign": "dsa", -1 10492 "hash": "rmd160", -1 10493 "id": "" -1 10494 }, -1 10495 "ripemd160WithRSA": { -1 10496 "sign": "rsa", -1 10497 "hash": "rmd160", -1 10498 "id": "3021300906052b2403020105000414" -1 10499 }, -1 10500 "RSA-RIPEMD160": { -1 10501 "sign": "rsa", -1 10502 "hash": "rmd160", -1 10503 "id": "3021300906052b2403020105000414" -1 10504 }, -1 10505 "md5WithRSAEncryption": { -1 10506 "sign": "rsa", -1 10507 "hash": "md5", -1 10508 "id": "3020300c06082a864886f70d020505000410" -1 10509 }, -1 10510 "RSA-MD5": { -1 10511 "sign": "rsa", -1 10512 "hash": "md5", -1 10513 "id": "3020300c06082a864886f70d020505000410" -1 10514 } -1 10515 } -1 10516 -1 10517 },{}],43:[function(require,module,exports){ -1 10518 module.exports={ -1 10519 "1.3.132.0.10": "secp256k1", -1 10520 "1.3.132.0.33": "p224", -1 10521 "1.2.840.10045.3.1.1": "p192", -1 10522 "1.2.840.10045.3.1.7": "p256", -1 10523 "1.3.132.0.34": "p384", -1 10524 "1.3.132.0.35": "p521" -1 10525 } -1 10526 -1 10527 },{}],44:[function(require,module,exports){ -1 10528 var Buffer = require('safe-buffer').Buffer -1 10529 var createHash = require('create-hash') -1 10530 var stream = require('readable-stream') -1 10531 var inherits = require('inherits') -1 10532 var sign = require('./sign') -1 10533 var verify = require('./verify') -1 10534 -1 10535 var algorithms = require('./algorithms.json') -1 10536 Object.keys(algorithms).forEach(function (key) { -1 10537 algorithms[key].id = Buffer.from(algorithms[key].id, 'hex') -1 10538 algorithms[key.toLowerCase()] = algorithms[key] -1 10539 }) -1 10540 -1 10541 function Sign (algorithm) { -1 10542 stream.Writable.call(this) -1 10543 -1 10544 var data = algorithms[algorithm] -1 10545 if (!data) throw new Error('Unknown message digest') -1 10546 -1 10547 this._hashType = data.hash -1 10548 this._hash = createHash(data.hash) -1 10549 this._tag = data.id -1 10550 this._signType = data.sign -1 10551 } -1 10552 inherits(Sign, stream.Writable) -1 10553 -1 10554 Sign.prototype._write = function _write (data, _, done) { -1 10555 this._hash.update(data) -1 10556 done() -1 10557 } -1 10558 -1 10559 Sign.prototype.update = function update (data, enc) { -1 10560 if (typeof data === 'string') data = Buffer.from(data, enc) -1 10561 -1 10562 this._hash.update(data) -1 10563 return this -1 10564 } -1 10565 -1 10566 Sign.prototype.sign = function signMethod (key, enc) { -1 10567 this.end() -1 10568 var hash = this._hash.digest() -1 10569 var sig = sign(hash, key, this._hashType, this._signType, this._tag) -1 10570 -1 10571 return enc ? sig.toString(enc) : sig -1 10572 } -1 10573 -1 10574 function Verify (algorithm) { -1 10575 stream.Writable.call(this) -1 10576 -1 10577 var data = algorithms[algorithm] -1 10578 if (!data) throw new Error('Unknown message digest') -1 10579 -1 10580 this._hash = createHash(data.hash) -1 10581 this._tag = data.id -1 10582 this._signType = data.sign -1 10583 } -1 10584 inherits(Verify, stream.Writable) -1 10585 -1 10586 Verify.prototype._write = function _write (data, _, done) { -1 10587 this._hash.update(data) -1 10588 done() -1 10589 } -1 10590 -1 10591 Verify.prototype.update = function update (data, enc) { -1 10592 if (typeof data === 'string') data = Buffer.from(data, enc) -1 10593 -1 10594 this._hash.update(data) -1 10595 return this -1 10596 } -1 10597 -1 10598 Verify.prototype.verify = function verifyMethod (key, sig, enc) { -1 10599 if (typeof sig === 'string') sig = Buffer.from(sig, enc) -1 10600 -1 10601 this.end() -1 10602 var hash = this._hash.digest() -1 10603 return verify(sig, hash, key, this._signType, this._tag) -1 10604 } -1 10605 -1 10606 function createSign (algorithm) { -1 10607 return new Sign(algorithm) -1 10608 } -1 10609 -1 10610 function createVerify (algorithm) { -1 10611 return new Verify(algorithm) -1 10612 } -1 10613 -1 10614 module.exports = { -1 10615 Sign: createSign, -1 10616 Verify: createVerify, -1 10617 createSign: createSign, -1 10618 createVerify: createVerify -1 10619 } -1 10620 -1 10621 },{"./algorithms.json":42,"./sign":45,"./verify":46,"create-hash":67,"inherits":132,"readable-stream":61,"safe-buffer":160}],45:[function(require,module,exports){ -1 10622 // much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js -1 10623 var Buffer = require('safe-buffer').Buffer -1 10624 var createHmac = require('create-hmac') -1 10625 var crt = require('browserify-rsa') -1 10626 var EC = require('elliptic').ec -1 10627 var BN = require('bn.js') -1 10628 var parseKeys = require('parse-asn1') -1 10629 var curves = require('./curves.json') -1 10630 -1 10631 function sign (hash, key, hashType, signType, tag) { -1 10632 var priv = parseKeys(key) -1 10633 if (priv.curve) { -1 10634 // rsa keys can be interpreted as ecdsa ones in openssl -1 10635 if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') throw new Error('wrong private key type') -1 10636 return ecSign(hash, priv) -1 10637 } else if (priv.type === 'dsa') { -1 10638 if (signType !== 'dsa') throw new Error('wrong private key type') -1 10639 return dsaSign(hash, priv, hashType) -1 10640 } else { -1 10641 if (signType !== 'rsa' && signType !== 'ecdsa/rsa') throw new Error('wrong private key type') -1 10642 } -1 10643 hash = Buffer.concat([tag, hash]) -1 10644 var len = priv.modulus.byteLength() -1 10645 var pad = [0, 1] -1 10646 while (hash.length + pad.length + 1 < len) pad.push(0xff) -1 10647 pad.push(0x00) -1 10648 var i = -1 -1 10649 while (++i < hash.length) pad.push(hash[i]) -1 10650 -1 10651 var out = crt(pad, priv) -1 10652 return out -1 10653 } -1 10654 -1 10655 function ecSign (hash, priv) { -1 10656 var curveId = curves[priv.curve.join('.')] -1 10657 if (!curveId) throw new Error('unknown curve ' + priv.curve.join('.')) -1 10658 -1 10659 var curve = new EC(curveId) -1 10660 var key = curve.keyFromPrivate(priv.privateKey) -1 10661 var out = key.sign(hash) -1 10662 -1 10663 return Buffer.from(out.toDER()) -1 10664 } -1 10665 -1 10666 function dsaSign (hash, priv, algo) { -1 10667 var x = priv.params.priv_key -1 10668 var p = priv.params.p -1 10669 var q = priv.params.q -1 10670 var g = priv.params.g -1 10671 var r = new BN(0) -1 10672 var k -1 10673 var H = bits2int(hash, q).mod(q) -1 10674 var s = false -1 10675 var kv = getKey(x, q, hash, algo) -1 10676 while (s === false) { -1 10677 k = makeKey(q, kv, algo) -1 10678 r = makeR(g, k, p, q) -1 10679 s = k.invm(q).imul(H.add(x.mul(r))).mod(q) -1 10680 if (s.cmpn(0) === 0) { -1 10681 s = false -1 10682 r = new BN(0) -1 10683 } -1 10684 } -1 10685 return toDER(r, s) -1 10686 } -1 10687 -1 10688 function toDER (r, s) { -1 10689 r = r.toArray() -1 10690 s = s.toArray() -1 10691 -1 10692 // Pad values -1 10693 if (r[0] & 0x80) r = [0].concat(r) -1 10694 if (s[0] & 0x80) s = [0].concat(s) -1 10695 -1 10696 var total = r.length + s.length + 4 -1 10697 var res = [0x30, total, 0x02, r.length] -1 10698 res = res.concat(r, [0x02, s.length], s) -1 10699 return Buffer.from(res) -1 10700 } -1 10701 -1 10702 function getKey (x, q, hash, algo) { -1 10703 x = Buffer.from(x.toArray()) -1 10704 if (x.length < q.byteLength()) { -1 10705 var zeros = Buffer.alloc(q.byteLength() - x.length) -1 10706 x = Buffer.concat([zeros, x]) -1 10707 } -1 10708 var hlen = hash.length -1 10709 var hbits = bits2octets(hash, q) -1 10710 var v = Buffer.alloc(hlen) -1 10711 v.fill(1) -1 10712 var k = Buffer.alloc(hlen) -1 10713 k = createHmac(algo, k).update(v).update(Buffer.from([0])).update(x).update(hbits).digest() -1 10714 v = createHmac(algo, k).update(v).digest() -1 10715 k = createHmac(algo, k).update(v).update(Buffer.from([1])).update(x).update(hbits).digest() -1 10716 v = createHmac(algo, k).update(v).digest() -1 10717 return { k: k, v: v } -1 10718 } -1 10719 -1 10720 function bits2int (obits, q) { -1 10721 var bits = new BN(obits) -1 10722 var shift = (obits.length << 3) - q.bitLength() -1 10723 if (shift > 0) bits.ishrn(shift) -1 10724 return bits -1 10725 } -1 10726 -1 10727 function bits2octets (bits, q) { -1 10728 bits = bits2int(bits, q) -1 10729 bits = bits.mod(q) -1 10730 var out = Buffer.from(bits.toArray()) -1 10731 if (out.length < q.byteLength()) { -1 10732 var zeros = Buffer.alloc(q.byteLength() - out.length) -1 10733 out = Buffer.concat([zeros, out]) -1 10734 } -1 10735 return out -1 10736 } -1 10737 -1 10738 function makeKey (q, kv, algo) { -1 10739 var t -1 10740 var k -1 10741 -1 10742 do { -1 10743 t = Buffer.alloc(0) -1 10744 -1 10745 while (t.length * 8 < q.bitLength()) { -1 10746 kv.v = createHmac(algo, kv.k).update(kv.v).digest() -1 10747 t = Buffer.concat([t, kv.v]) -1 10748 } -1 10749 -1 10750 k = bits2int(t, q) -1 10751 kv.k = createHmac(algo, kv.k).update(kv.v).update(Buffer.from([0])).digest() -1 10752 kv.v = createHmac(algo, kv.k).update(kv.v).digest() -1 10753 } while (k.cmp(q) !== -1) -1 10754 -1 10755 return k -1 10756 } -1 10757 -1 10758 function makeR (g, k, p, q) { -1 10759 return g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q) -1 10760 } -1 10761 -1 10762 module.exports = sign -1 10763 module.exports.getKey = getKey -1 10764 module.exports.makeKey = makeKey -1 10765 -1 10766 },{"./curves.json":43,"bn.js":17,"browserify-rsa":40,"create-hmac":69,"elliptic":83,"parse-asn1":142,"safe-buffer":160}],46:[function(require,module,exports){ -1 10767 // much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js -1 10768 var Buffer = require('safe-buffer').Buffer -1 10769 var BN = require('bn.js') -1 10770 var EC = require('elliptic').ec -1 10771 var parseKeys = require('parse-asn1') -1 10772 var curves = require('./curves.json') -1 10773 -1 10774 function verify (sig, hash, key, signType, tag) { -1 10775 var pub = parseKeys(key) -1 10776 if (pub.type === 'ec') { -1 10777 // rsa keys can be interpreted as ecdsa ones in openssl -1 10778 if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') throw new Error('wrong public key type') -1 10779 return ecVerify(sig, hash, pub) -1 10780 } else if (pub.type === 'dsa') { -1 10781 if (signType !== 'dsa') throw new Error('wrong public key type') -1 10782 return dsaVerify(sig, hash, pub) -1 10783 } else { -1 10784 if (signType !== 'rsa' && signType !== 'ecdsa/rsa') throw new Error('wrong public key type') -1 10785 } -1 10786 hash = Buffer.concat([tag, hash]) -1 10787 var len = pub.modulus.byteLength() -1 10788 var pad = [1] -1 10789 var padNum = 0 -1 10790 while (hash.length + pad.length + 2 < len) { -1 10791 pad.push(0xff) -1 10792 padNum++ -1 10793 } -1 10794 pad.push(0x00) -1 10795 var i = -1 -1 10796 while (++i < hash.length) { -1 10797 pad.push(hash[i]) -1 10798 } -1 10799 pad = Buffer.from(pad) -1 10800 var red = BN.mont(pub.modulus) -1 10801 sig = new BN(sig).toRed(red) -1 10802 -1 10803 sig = sig.redPow(new BN(pub.publicExponent)) -1 10804 sig = Buffer.from(sig.fromRed().toArray()) -1 10805 var out = padNum < 8 ? 1 : 0 -1 10806 len = Math.min(sig.length, pad.length) -1 10807 if (sig.length !== pad.length) out = 1 -1 10808 -1 10809 i = -1 -1 10810 while (++i < len) out |= sig[i] ^ pad[i] -1 10811 return out === 0 -1 10812 } -1 10813 -1 10814 function ecVerify (sig, hash, pub) { -1 10815 var curveId = curves[pub.data.algorithm.curve.join('.')] -1 10816 if (!curveId) throw new Error('unknown curve ' + pub.data.algorithm.curve.join('.')) -1 10817 -1 10818 var curve = new EC(curveId) -1 10819 var pubkey = pub.data.subjectPrivateKey.data -1 10820 -1 10821 return curve.verify(hash, sig, pubkey) -1 10822 } -1 10823 -1 10824 function dsaVerify (sig, hash, pub) { -1 10825 var p = pub.data.p -1 10826 var q = pub.data.q -1 10827 var g = pub.data.g -1 10828 var y = pub.data.pub_key -1 10829 var unpacked = parseKeys.signature.decode(sig, 'der') -1 10830 var s = unpacked.s -1 10831 var r = unpacked.r -1 10832 checkValue(s, q) -1 10833 checkValue(r, q) -1 10834 var montp = BN.mont(p) -1 10835 var w = s.invm(q) -1 10836 var v = g.toRed(montp) -1 10837 .redPow(new BN(hash).mul(w).mod(q)) -1 10838 .fromRed() -1 10839 .mul(y.toRed(montp).redPow(r.mul(w).mod(q)).fromRed()) -1 10840 .mod(p) -1 10841 .mod(q) -1 10842 return v.cmp(r) === 0 -1 10843 } -1 10844 -1 10845 function checkValue (b, q) { -1 10846 if (b.cmpn(0) <= 0) throw new Error('invalid sig') -1 10847 if (b.cmp(q) >= q) throw new Error('invalid sig') -1 10848 } -1 10849 -1 10850 module.exports = verify -1 10851 -1 10852 },{"./curves.json":43,"bn.js":17,"elliptic":83,"parse-asn1":142,"safe-buffer":160}],47:[function(require,module,exports){ -1 10853 'use strict'; -1 10854 -1 10855 function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } -1 10856 -1 10857 var codes = {}; -1 10858 -1 10859 function createErrorType(code, message, Base) { -1 10860 if (!Base) { -1 10861 Base = Error; -1 10862 } -1 10863 -1 10864 function getMessage(arg1, arg2, arg3) { -1 10865 if (typeof message === 'string') { -1 10866 return message; -1 10867 } else { -1 10868 return message(arg1, arg2, arg3); -1 10869 } -1 10870 } -1 10871 -1 10872 var NodeError = -1 10873 /*#__PURE__*/ -1 10874 function (_Base) { -1 10875 _inheritsLoose(NodeError, _Base); -1 10876 -1 10877 function NodeError(arg1, arg2, arg3) { -1 10878 return _Base.call(this, getMessage(arg1, arg2, arg3)) || this; -1 10879 } -1 10880 -1 10881 return NodeError; -1 10882 }(Base); -1 10883 -1 10884 NodeError.prototype.name = Base.name; -1 10885 NodeError.prototype.code = code; -1 10886 codes[code] = NodeError; -1 10887 } // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js -1 10888 -1 10889 -1 10890 function oneOf(expected, thing) { -1 10891 if (Array.isArray(expected)) { -1 10892 var len = expected.length; -1 10893 expected = expected.map(function (i) { -1 10894 return String(i); -1 10895 }); -1 10896 -1 10897 if (len > 2) { -1 10898 return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1]; -1 10899 } else if (len === 2) { -1 10900 return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]); -1 10901 } else { -1 10902 return "of ".concat(thing, " ").concat(expected[0]); -1 10903 } -1 10904 } else { -1 10905 return "of ".concat(thing, " ").concat(String(expected)); -1 10906 } -1 10907 } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith -1 10908 -1 10909 -1 10910 function startsWith(str, search, pos) { -1 10911 return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; -1 10912 } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith -1 10913 -1 10914 -1 10915 function endsWith(str, search, this_len) { -1 10916 if (this_len === undefined || this_len > str.length) { -1 10917 this_len = str.length; -1 10918 } -1 10919 -1 10920 return str.substring(this_len - search.length, this_len) === search; -1 10921 } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes -1 10922 -1 10923 -1 10924 function includes(str, search, start) { -1 10925 if (typeof start !== 'number') { -1 10926 start = 0; -1 10927 } -1 10928 -1 10929 if (start + search.length > str.length) { -1 10930 return false; -1 10931 } else { -1 10932 return str.indexOf(search, start) !== -1; -1 10933 } -1 10934 } -1 10935 -1 10936 createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { -1 10937 return 'The value "' + value + '" is invalid for option "' + name + '"'; -1 10938 }, TypeError); -1 10939 createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { -1 10940 // determiner: 'must be' or 'must not be' -1 10941 var determiner; -1 10942 -1 10943 if (typeof expected === 'string' && startsWith(expected, 'not ')) { -1 10944 determiner = 'must not be'; -1 10945 expected = expected.replace(/^not /, ''); -1 10946 } else { -1 10947 determiner = 'must be'; -1 10948 } -1 10949 -1 10950 var msg; -1 10951 -1 10952 if (endsWith(name, ' argument')) { -1 10953 // For cases like 'first argument' -1 10954 msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); -1 10955 } else { -1 10956 var type = includes(name, '.') ? 'property' : 'argument'; -1 10957 msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); -1 10958 } -1 10959 -1 10960 msg += ". Received type ".concat(typeof actual); -1 10961 return msg; -1 10962 }, TypeError); -1 10963 createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); -1 10964 createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { -1 10965 return 'The ' + name + ' method is not implemented'; -1 10966 }); -1 10967 createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); -1 10968 createErrorType('ERR_STREAM_DESTROYED', function (name) { -1 10969 return 'Cannot call ' + name + ' after a stream was destroyed'; -1 10970 }); -1 10971 createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); -1 10972 createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); -1 10973 createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); -1 10974 createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); -1 10975 createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { -1 10976 return 'Unknown encoding: ' + arg; -1 10977 }, TypeError); -1 10978 createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); -1 10979 module.exports.codes = codes; -1 10980 -1 10981 },{}],48:[function(require,module,exports){ -1 10982 (function (process){(function (){ -1 10983 // Copyright Joyent, Inc. and other Node contributors. -1 10984 // -1 10985 // Permission is hereby granted, free of charge, to any person obtaining a -1 10986 // copy of this software and associated documentation files (the -1 10987 // "Software"), to deal in the Software without restriction, including -1 10988 // without limitation the rights to use, copy, modify, merge, publish, -1 10989 // distribute, sublicense, and/or sell copies of the Software, and to permit -1 10990 // persons to whom the Software is furnished to do so, subject to the -1 10991 // following conditions: -1 10992 // -1 10993 // The above copyright notice and this permission notice shall be included -1 10994 // in all copies or substantial portions of the Software. -1 10995 // -1 10996 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -1 10997 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -1 10998 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -1 10999 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -1 11000 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -1 11001 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -1 11002 // USE OR OTHER DEALINGS IN THE SOFTWARE. -1 11003 // a duplex stream is just a stream that is both readable and writable. -1 11004 // Since JS doesn't have multiple prototypal inheritance, this class -1 11005 // prototypally inherits from Readable, and then parasitically from -1 11006 // Writable. -1 11007 'use strict'; -1 11008 /*<replacement>*/ -1 11009 -1 11010 var objectKeys = Object.keys || function (obj) { -1 11011 var keys = []; -1 11012 -1 11013 for (var key in obj) { -1 11014 keys.push(key); -1 11015 } -1 11016 -1 11017 return keys; -1 11018 }; -1 11019 /*</replacement>*/ -1 11020 -1 11021 -1 11022 module.exports = Duplex; -1 11023 -1 11024 var Readable = require('./_stream_readable'); -1 11025 -1 11026 var Writable = require('./_stream_writable'); -1 11027 -1 11028 require('inherits')(Duplex, Readable); -1 11029 -1 11030 { -1 11031 // Allow the keys array to be GC'ed. -1 11032 var keys = objectKeys(Writable.prototype); -1 11033 -1 11034 for (var v = 0; v < keys.length; v++) { -1 11035 var method = keys[v]; -1 11036 if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; -1 11037 } -1 11038 } -1 11039 -1 11040 function Duplex(options) { -1 11041 if (!(this instanceof Duplex)) return new Duplex(options); -1 11042 Readable.call(this, options); -1 11043 Writable.call(this, options); -1 11044 this.allowHalfOpen = true; -1 11045 -1 11046 if (options) { -1 11047 if (options.readable === false) this.readable = false; -1 11048 if (options.writable === false) this.writable = false; -1 11049 -1 11050 if (options.allowHalfOpen === false) { -1 11051 this.allowHalfOpen = false; -1 11052 this.once('end', onend); -1 11053 } -1 11054 } -1 11055 } -1 11056 -1 11057 Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { -1 11058 // making it explicit this property is not enumerable -1 11059 // because otherwise some prototype manipulation in -1 11060 // userland will fail -1 11061 enumerable: false, -1 11062 get: function get() { -1 11063 return this._writableState.highWaterMark; -1 11064 } -1 11065 }); -1 11066 Object.defineProperty(Duplex.prototype, 'writableBuffer', { -1 11067 // making it explicit this property is not enumerable -1 11068 // because otherwise some prototype manipulation in -1 11069 // userland will fail -1 11070 enumerable: false, -1 11071 get: function get() { -1 11072 return this._writableState && this._writableState.getBuffer(); -1 11073 } -1 11074 }); -1 11075 Object.defineProperty(Duplex.prototype, 'writableLength', { -1 11076 // making it explicit this property is not enumerable -1 11077 // because otherwise some prototype manipulation in -1 11078 // userland will fail -1 11079 enumerable: false, -1 11080 get: function get() { -1 11081 return this._writableState.length; -1 11082 } -1 11083 }); // the no-half-open enforcer -1 11084 -1 11085 function onend() { -1 11086 // If the writable side ended, then we're ok. -1 11087 if (this._writableState.ended) return; // no more data can be written. -1 11088 // But allow more writes to happen in this tick. -1 11089 -1 11090 process.nextTick(onEndNT, this); -1 11091 } -1 11092 -1 11093 function onEndNT(self) { -1 11094 self.end(); -1 11095 } -1 11096 -1 11097 Object.defineProperty(Duplex.prototype, 'destroyed', { -1 11098 // making it explicit this property is not enumerable -1 11099 // because otherwise some prototype manipulation in -1 11100 // userland will fail -1 11101 enumerable: false, -1 11102 get: function get() { -1 11103 if (this._readableState === undefined || this._writableState === undefined) { -1 11104 return false; -1 11105 } -1 11106 -1 11107 return this._readableState.destroyed && this._writableState.destroyed; -1 11108 }, -1 11109 set: function set(value) { -1 11110 // we ignore the value if the stream -1 11111 // has not been initialized yet -1 11112 if (this._readableState === undefined || this._writableState === undefined) { -1 11113 return; -1 11114 } // backward compatibility, the user is explicitly -1 11115 // managing destroyed -1 11116 -1 11117 -1 11118 this._readableState.destroyed = value; -1 11119 this._writableState.destroyed = value; -1 11120 } -1 11121 }); -1 11122 }).call(this)}).call(this,require('_process')) -1 11123 },{"./_stream_readable":50,"./_stream_writable":52,"_process":149,"inherits":132}],49:[function(require,module,exports){ -1 11124 // Copyright Joyent, Inc. and other Node contributors. -1 11125 // -1 11126 // Permission is hereby granted, free of charge, to any person obtaining a -1 11127 // copy of this software and associated documentation files (the -1 11128 // "Software"), to deal in the Software without restriction, including -1 11129 // without limitation the rights to use, copy, modify, merge, publish, -1 11130 // distribute, sublicense, and/or sell copies of the Software, and to permit -1 11131 // persons to whom the Software is furnished to do so, subject to the -1 11132 // following conditions: -1 11133 // -1 11134 // The above copyright notice and this permission notice shall be included -1 11135 // in all copies or substantial portions of the Software. -1 11136 // -1 11137 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -1 11138 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -1 11139 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -1 11140 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -1 11141 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -1 11142 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -1 11143 // USE OR OTHER DEALINGS IN THE SOFTWARE. -1 11144 // a passthrough stream. -1 11145 // basically just the most minimal sort of Transform stream. -1 11146 // Every written chunk gets output as-is. -1 11147 'use strict'; -1 11148 -1 11149 module.exports = PassThrough; -1 11150 -1 11151 var Transform = require('./_stream_transform'); -1 11152 -1 11153 require('inherits')(PassThrough, Transform); -1 11154 -1 11155 function PassThrough(options) { -1 11156 if (!(this instanceof PassThrough)) return new PassThrough(options); -1 11157 Transform.call(this, options); -1 11158 } -1 11159 -1 11160 PassThrough.prototype._transform = function (chunk, encoding, cb) { -1 11161 cb(null, chunk); -1 11162 }; -1 11163 },{"./_stream_transform":51,"inherits":132}],50:[function(require,module,exports){ -1 11164 (function (process,global){(function (){ -1 11165 // Copyright Joyent, Inc. and other Node contributors. -1 11166 // -1 11167 // Permission is hereby granted, free of charge, to any person obtaining a -1 11168 // copy of this software and associated documentation files (the -1 11169 // "Software"), to deal in the Software without restriction, including -1 11170 // without limitation the rights to use, copy, modify, merge, publish, -1 11171 // distribute, sublicense, and/or sell copies of the Software, and to permit -1 11172 // persons to whom the Software is furnished to do so, subject to the -1 11173 // following conditions: -1 11174 // -1 11175 // The above copyright notice and this permission notice shall be included -1 11176 // in all copies or substantial portions of the Software. -1 11177 // -1 11178 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -1 11179 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -1 11180 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -1 11181 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -1 11182 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -1 11183 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -1 11184 // USE OR OTHER DEALINGS IN THE SOFTWARE. -1 11185 'use strict'; -1 11186 -1 11187 module.exports = Readable; -1 11188 /*<replacement>*/ -1 11189 -1 11190 var Duplex; -1 11191 /*</replacement>*/ -1 11192 -1 11193 Readable.ReadableState = ReadableState; -1 11194 /*<replacement>*/ -1 11195 -1 11196 var EE = require('events').EventEmitter; -1 11197 -1 11198 var EElistenerCount = function EElistenerCount(emitter, type) { -1 11199 return emitter.listeners(type).length; -1 11200 }; -1 11201 /*</replacement>*/ -1 11202 -1 11203 /*<replacement>*/ -1 11204 -1 11205 -1 11206 var Stream = require('./internal/streams/stream'); -1 11207 /*</replacement>*/ -1 11208 -1 11209 -1 11210 var Buffer = require('buffer').Buffer; -1 11211 -1 11212 var OurUint8Array = global.Uint8Array || function () {}; -1 11213 -1 11214 function _uint8ArrayToBuffer(chunk) { -1 11215 return Buffer.from(chunk); -1 11216 } -1 11217 -1 11218 function _isUint8Array(obj) { -1 11219 return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -1 11220 } -1 11221 /*<replacement>*/ -1 11222 -1 11223 -1 11224 var debugUtil = require('util'); -1 11225 -1 11226 var debug; -1 11227 -1 11228 if (debugUtil && debugUtil.debuglog) { -1 11229 debug = debugUtil.debuglog('stream'); -1 11230 } else { -1 11231 debug = function debug() {}; -1 11232 } -1 11233 /*</replacement>*/ -1 11234 -1 11235 -1 11236 var BufferList = require('./internal/streams/buffer_list'); -1 11237 -1 11238 var destroyImpl = require('./internal/streams/destroy'); -1 11239 -1 11240 var _require = require('./internal/streams/state'), -1 11241 getHighWaterMark = _require.getHighWaterMark; -1 11242 -1 11243 var _require$codes = require('../errors').codes, -1 11244 ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, -1 11245 ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, -1 11246 ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, -1 11247 ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance. -1 11248 -1 11249 -1 11250 var StringDecoder; -1 11251 var createReadableStreamAsyncIterator; -1 11252 var from; -1 11253 -1 11254 require('inherits')(Readable, Stream); -1 11255 -1 11256 var errorOrDestroy = destroyImpl.errorOrDestroy; -1 11257 var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; -1 11258 -1 11259 function prependListener(emitter, event, fn) { -1 11260 // Sadly this is not cacheable as some libraries bundle their own -1 11261 // event emitter implementation with them. -1 11262 if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any -1 11263 // userland ones. NEVER DO THIS. This is here only because this code needs -1 11264 // to continue to work with older versions of Node.js that do not include -1 11265 // the prependListener() method. The goal is to eventually remove this hack. -1 11266 -1 11267 if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -1 11268 } -1 11269 -1 11270 function ReadableState(options, stream, isDuplex) { -1 11271 Duplex = Duplex || require('./_stream_duplex'); -1 11272 options = options || {}; // Duplex streams are both readable and writable, but share -1 11273 // the same options object. -1 11274 // However, some cases require setting options to different -1 11275 // values for the readable and the writable sides of the duplex stream. -1 11276 // These options can be provided separately as readableXXX and writableXXX. -1 11277 -1 11278 if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to -1 11279 // make all the buffer merging and length checks go away -1 11280 -1 11281 this.objectMode = !!options.objectMode; -1 11282 if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer -1 11283 // Note: 0 is a valid value, means "don't call _read preemptively ever" -1 11284 -1 11285 this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the -1 11286 // linked list can remove elements from the beginning faster than -1 11287 // array.shift() -1 11288 -1 11289 this.buffer = new BufferList(); -1 11290 this.length = 0; -1 11291 this.pipes = null; -1 11292 this.pipesCount = 0; -1 11293 this.flowing = null; -1 11294 this.ended = false; -1 11295 this.endEmitted = false; -1 11296 this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted -1 11297 // immediately, or on a later tick. We set this to true at first, because -1 11298 // any actions that shouldn't happen until "later" should generally also -1 11299 // not happen before the first read call. -1 11300 -1 11301 this.sync = true; // whenever we return null, then we set a flag to say -1 11302 // that we're awaiting a 'readable' event emission. -1 11303 -1 11304 this.needReadable = false; -1 11305 this.emittedReadable = false; -1 11306 this.readableListening = false; -1 11307 this.resumeScheduled = false; -1 11308 this.paused = true; // Should close be emitted on destroy. Defaults to true. -1 11309 -1 11310 this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish') -1 11311 -1 11312 this.autoDestroy = !!options.autoDestroy; // has it been destroyed -1 11313 -1 11314 this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string -1 11315 // encoding is 'binary' so we have to make this configurable. -1 11316 // Everything else in the universe uses 'utf8', though. -1 11317 -1 11318 this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s -1 11319 -1 11320 this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled -1 11321 -1 11322 this.readingMore = false; -1 11323 this.decoder = null; -1 11324 this.encoding = null; -1 11325 -1 11326 if (options.encoding) { -1 11327 if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; -1 11328 this.decoder = new StringDecoder(options.encoding); -1 11329 this.encoding = options.encoding; -1 11330 } -1 11331 } -1 11332 -1 11333 function Readable(options) { -1 11334 Duplex = Duplex || require('./_stream_duplex'); -1 11335 if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside -1 11336 // the ReadableState constructor, at least with V8 6.5 -1 11337 -1 11338 var isDuplex = this instanceof Duplex; -1 11339 this._readableState = new ReadableState(options, this, isDuplex); // legacy -1 11340 -1 11341 this.readable = true; -1 11342 -1 11343 if (options) { -1 11344 if (typeof options.read === 'function') this._read = options.read; -1 11345 if (typeof options.destroy === 'function') this._destroy = options.destroy; -1 11346 } -1 11347 -1 11348 Stream.call(this); -1 11349 } -1 11350 -1 11351 Object.defineProperty(Readable.prototype, 'destroyed', { -1 11352 // making it explicit this property is not enumerable -1 11353 // because otherwise some prototype manipulation in -1 11354 // userland will fail -1 11355 enumerable: false, -1 11356 get: function get() { -1 11357 if (this._readableState === undefined) { -1 11358 return false; -1 11359 } -1 11360 -1 11361 return this._readableState.destroyed; -1 11362 }, -1 11363 set: function set(value) { -1 11364 // we ignore the value if the stream -1 11365 // has not been initialized yet -1 11366 if (!this._readableState) { -1 11367 return; -1 11368 } // backward compatibility, the user is explicitly -1 11369 // managing destroyed -1 11370 -1 11371 -1 11372 this._readableState.destroyed = value; -1 11373 } -1 11374 }); -1 11375 Readable.prototype.destroy = destroyImpl.destroy; -1 11376 Readable.prototype._undestroy = destroyImpl.undestroy; -1 11377 -1 11378 Readable.prototype._destroy = function (err, cb) { -1 11379 cb(err); -1 11380 }; // Manually shove something into the read() buffer. -1 11381 // This returns true if the highWaterMark has not been hit yet, -1 11382 // similar to how Writable.write() returns true if you should -1 11383 // write() some more. -1 11384 -1 11385 -1 11386 Readable.prototype.push = function (chunk, encoding) { -1 11387 var state = this._readableState; -1 11388 var skipChunkCheck; -1 11389 -1 11390 if (!state.objectMode) { -1 11391 if (typeof chunk === 'string') { -1 11392 encoding = encoding || state.defaultEncoding; -1 11393 -1 11394 if (encoding !== state.encoding) { -1 11395 chunk = Buffer.from(chunk, encoding); -1 11396 encoding = ''; -1 11397 } -1 11398 -1 11399 skipChunkCheck = true; -1 11400 } -1 11401 } else { -1 11402 skipChunkCheck = true; -1 11403 } -1 11404 -1 11405 return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -1 11406 }; // Unshift should *always* be something directly out of read() -1 11407 -1 11408 -1 11409 Readable.prototype.unshift = function (chunk) { -1 11410 return readableAddChunk(this, chunk, null, true, false); -1 11411 }; -1 11412 -1 11413 function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { -1 11414 debug('readableAddChunk', chunk); -1 11415 var state = stream._readableState; -1 11416 -1 11417 if (chunk === null) { -1 11418 state.reading = false; -1 11419 onEofChunk(stream, state); -1 11420 } else { -1 11421 var er; -1 11422 if (!skipChunkCheck) er = chunkInvalid(state, chunk); -1 11423 -1 11424 if (er) { -1 11425 errorOrDestroy(stream, er); -1 11426 } else if (state.objectMode || chunk && chunk.length > 0) { -1 11427 if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { -1 11428 chunk = _uint8ArrayToBuffer(chunk); -1 11429 } -1 11430 -1 11431 if (addToFront) { -1 11432 if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); -1 11433 } else if (state.ended) { -1 11434 errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); -1 11435 } else if (state.destroyed) { -1 11436 return false; -1 11437 } else { -1 11438 state.reading = false; -1 11439 -1 11440 if (state.decoder && !encoding) { -1 11441 chunk = state.decoder.write(chunk); -1 11442 if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); -1 11443 } else { -1 11444 addChunk(stream, state, chunk, false); -1 11445 } -1 11446 } -1 11447 } else if (!addToFront) { -1 11448 state.reading = false; -1 11449 maybeReadMore(stream, state); -1 11450 } -1 11451 } // We can push more data if we are below the highWaterMark. -1 11452 // Also, if we have no data yet, we can stand some more bytes. -1 11453 // This is to work around cases where hwm=0, such as the repl. -1 11454 -1 11455 -1 11456 return !state.ended && (state.length < state.highWaterMark || state.length === 0); -1 11457 } -1 11458 -1 11459 function addChunk(stream, state, chunk, addToFront) { -1 11460 if (state.flowing && state.length === 0 && !state.sync) { -1 11461 state.awaitDrain = 0; -1 11462 stream.emit('data', chunk); -1 11463 } else { -1 11464 // update the buffer info. -1 11465 state.length += state.objectMode ? 1 : chunk.length; -1 11466 if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); -1 11467 if (state.needReadable) emitReadable(stream); -1 11468 } -1 11469 -1 11470 maybeReadMore(stream, state); -1 11471 } -1 11472 -1 11473 function chunkInvalid(state, chunk) { -1 11474 var er; -1 11475 -1 11476 if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { -1 11477 er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); -1 11478 } -1 11479 -1 11480 return er; -1 11481 } -1 11482 -1 11483 Readable.prototype.isPaused = function () { -1 11484 return this._readableState.flowing === false; -1 11485 }; // backwards compatibility. -1 11486 -1 11487 -1 11488 Readable.prototype.setEncoding = function (enc) { -1 11489 if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; -1 11490 var decoder = new StringDecoder(enc); -1 11491 this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8 -1 11492 -1 11493 this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers: -1 11494 -1 11495 var p = this._readableState.buffer.head; -1 11496 var content = ''; -1 11497 -1 11498 while (p !== null) { -1 11499 content += decoder.write(p.data); -1 11500 p = p.next; -1 11501 } -1 11502 -1 11503 this._readableState.buffer.clear(); -1 11504 -1 11505 if (content !== '') this._readableState.buffer.push(content); -1 11506 this._readableState.length = content.length; -1 11507 return this; -1 11508 }; // Don't raise the hwm > 1GB -1 11509 -1 11510 -1 11511 var MAX_HWM = 0x40000000; -1 11512 -1 11513 function computeNewHighWaterMark(n) { -1 11514 if (n >= MAX_HWM) { -1 11515 // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. -1 11516 n = MAX_HWM; -1 11517 } else { -1 11518 // Get the next highest power of 2 to prevent increasing hwm excessively in -1 11519 // tiny amounts -1 11520 n--; -1 11521 n |= n >>> 1; -1 11522 n |= n >>> 2; -1 11523 n |= n >>> 4; -1 11524 n |= n >>> 8; -1 11525 n |= n >>> 16; -1 11526 n++; -1 11527 } -1 11528 -1 11529 return n; -1 11530 } // This function is designed to be inlinable, so please take care when making -1 11531 // changes to the function body. -1 11532 -1 11533 -1 11534 function howMuchToRead(n, state) { -1 11535 if (n <= 0 || state.length === 0 && state.ended) return 0; -1 11536 if (state.objectMode) return 1; -1 11537 -1 11538 if (n !== n) { -1 11539 // Only flow one buffer at a time -1 11540 if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; -1 11541 } // If we're asking for more than the current hwm, then raise the hwm. -1 11542 -1 11543 -1 11544 if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); -1 11545 if (n <= state.length) return n; // Don't have enough -1 11546 -1 11547 if (!state.ended) { -1 11548 state.needReadable = true; -1 11549 return 0; -1 11550 } -1 11551 -1 11552 return state.length; -1 11553 } // you can override either this method, or the async _read(n) below. -1 11554 -1 11555 -1 11556 Readable.prototype.read = function (n) { -1 11557 debug('read', n); -1 11558 n = parseInt(n, 10); -1 11559 var state = this._readableState; -1 11560 var nOrig = n; -1 11561 if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we -1 11562 // already have a bunch of data in the buffer, then just trigger -1 11563 // the 'readable' event and move on. -1 11564 -1 11565 if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { -1 11566 debug('read: emitReadable', state.length, state.ended); -1 11567 if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); -1 11568 return null; -1 11569 } -1 11570 -1 11571 n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up. -1 11572 -1 11573 if (n === 0 && state.ended) { -1 11574 if (state.length === 0) endReadable(this); -1 11575 return null; -1 11576 } // All the actual chunk generation logic needs to be -1 11577 // *below* the call to _read. The reason is that in certain -1 11578 // synthetic stream cases, such as passthrough streams, _read -1 11579 // may be a completely synchronous operation which may change -1 11580 // the state of the read buffer, providing enough data when -1 11581 // before there was *not* enough. -1 11582 // -1 11583 // So, the steps are: -1 11584 // 1. Figure out what the state of things will be after we do -1 11585 // a read from the buffer. -1 11586 // -1 11587 // 2. If that resulting state will trigger a _read, then call _read. -1 11588 // Note that this may be asynchronous, or synchronous. Yes, it is -1 11589 // deeply ugly to write APIs this way, but that still doesn't mean -1 11590 // that the Readable class should behave improperly, as streams are -1 11591 // designed to be sync/async agnostic. -1 11592 // Take note if the _read call is sync or async (ie, if the read call -1 11593 // has returned yet), so that we know whether or not it's safe to emit -1 11594 // 'readable' etc. -1 11595 // -1 11596 // 3. Actually pull the requested chunks out of the buffer and return. -1 11597 // if we need a readable event, then we need to do some reading. -1 11598 -1 11599 -1 11600 var doRead = state.needReadable; -1 11601 debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some -1 11602 -1 11603 if (state.length === 0 || state.length - n < state.highWaterMark) { -1 11604 doRead = true; -1 11605 debug('length less than watermark', doRead); -1 11606 } // however, if we've ended, then there's no point, and if we're already -1 11607 // reading, then it's unnecessary. -1 11608 -1 11609 -1 11610 if (state.ended || state.reading) { -1 11611 doRead = false; -1 11612 debug('reading or ended', doRead); -1 11613 } else if (doRead) { -1 11614 debug('do read'); -1 11615 state.reading = true; -1 11616 state.sync = true; // if the length is currently zero, then we *need* a readable event. -1 11617 -1 11618 if (state.length === 0) state.needReadable = true; // call internal read method -1 11619 -1 11620 this._read(state.highWaterMark); -1 11621 -1 11622 state.sync = false; // If _read pushed data synchronously, then `reading` will be false, -1 11623 // and we need to re-evaluate how much data we can return to the user. -1 11624 -1 11625 if (!state.reading) n = howMuchToRead(nOrig, state); -1 11626 } -1 11627 -1 11628 var ret; -1 11629 if (n > 0) ret = fromList(n, state);else ret = null; -1 11630 -1 11631 if (ret === null) { -1 11632 state.needReadable = state.length <= state.highWaterMark; -1 11633 n = 0; -1 11634 } else { -1 11635 state.length -= n; -1 11636 state.awaitDrain = 0; -1 11637 } -1 11638 -1 11639 if (state.length === 0) { -1 11640 // If we have nothing in the buffer, then we want to know -1 11641 // as soon as we *do* get something into the buffer. -1 11642 if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick. -1 11643 -1 11644 if (nOrig !== n && state.ended) endReadable(this); -1 11645 } -1 11646 -1 11647 if (ret !== null) this.emit('data', ret); -1 11648 return ret; -1 11649 }; -1 11650 -1 11651 function onEofChunk(stream, state) { -1 11652 debug('onEofChunk'); -1 11653 if (state.ended) return; -1 11654 -1 11655 if (state.decoder) { -1 11656 var chunk = state.decoder.end(); -1 11657 -1 11658 if (chunk && chunk.length) { -1 11659 state.buffer.push(chunk); -1 11660 state.length += state.objectMode ? 1 : chunk.length; -1 11661 } -1 11662 } -1 11663 -1 11664 state.ended = true; -1 11665 -1 11666 if (state.sync) { -1 11667 // if we are sync, wait until next tick to emit the data. -1 11668 // Otherwise we risk emitting data in the flow() -1 11669 // the readable code triggers during a read() call -1 11670 emitReadable(stream); -1 11671 } else { -1 11672 // emit 'readable' now to make sure it gets picked up. -1 11673 state.needReadable = false; -1 11674 -1 11675 if (!state.emittedReadable) { -1 11676 state.emittedReadable = true; -1 11677 emitReadable_(stream); -1 11678 } -1 11679 } -1 11680 } // Don't emit readable right away in sync mode, because this can trigger -1 11681 // another read() call => stack overflow. This way, it might trigger -1 11682 // a nextTick recursion warning, but that's not so bad. -1 11683 -1 11684 -1 11685 function emitReadable(stream) { -1 11686 var state = stream._readableState; -1 11687 debug('emitReadable', state.needReadable, state.emittedReadable); -1 11688 state.needReadable = false; -1 11689 -1 11690 if (!state.emittedReadable) { -1 11691 debug('emitReadable', state.flowing); -1 11692 state.emittedReadable = true; -1 11693 process.nextTick(emitReadable_, stream); -1 11694 } -1 11695 } -1 11696 -1 11697 function emitReadable_(stream) { -1 11698 var state = stream._readableState; -1 11699 debug('emitReadable_', state.destroyed, state.length, state.ended); -1 11700 -1 11701 if (!state.destroyed && (state.length || state.ended)) { -1 11702 stream.emit('readable'); -1 11703 state.emittedReadable = false; -1 11704 } // The stream needs another readable event if -1 11705 // 1. It is not flowing, as the flow mechanism will take -1 11706 // care of it. -1 11707 // 2. It is not ended. -1 11708 // 3. It is below the highWaterMark, so we can schedule -1 11709 // another readable later. -1 11710 -1 11711 -1 11712 state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; -1 11713 flow(stream); -1 11714 } // at this point, the user has presumably seen the 'readable' event, -1 11715 // and called read() to consume some data. that may have triggered -1 11716 // in turn another _read(n) call, in which case reading = true if -1 11717 // it's in progress. -1 11718 // However, if we're not ended, or reading, and the length < hwm, -1 11719 // then go ahead and try to read some more preemptively. -1 11720 -1 11721 -1 11722 function maybeReadMore(stream, state) { -1 11723 if (!state.readingMore) { -1 11724 state.readingMore = true; -1 11725 process.nextTick(maybeReadMore_, stream, state); -1 11726 } -1 11727 } -1 11728 -1 11729 function maybeReadMore_(stream, state) { -1 11730 // Attempt to read more data if we should. -1 11731 // -1 11732 // The conditions for reading more data are (one of): -1 11733 // - Not enough data buffered (state.length < state.highWaterMark). The loop -1 11734 // is responsible for filling the buffer with enough data if such data -1 11735 // is available. If highWaterMark is 0 and we are not in the flowing mode -1 11736 // we should _not_ attempt to buffer any extra data. We'll get more data -1 11737 // when the stream consumer calls read() instead. -1 11738 // - No data in the buffer, and the stream is in flowing mode. In this mode -1 11739 // the loop below is responsible for ensuring read() is called. Failing to -1 11740 // call read here would abort the flow and there's no other mechanism for -1 11741 // continuing the flow if the stream consumer has just subscribed to the -1 11742 // 'data' event. -1 11743 // -1 11744 // In addition to the above conditions to keep reading data, the following -1 11745 // conditions prevent the data from being read: -1 11746 // - The stream has ended (state.ended). -1 11747 // - There is already a pending 'read' operation (state.reading). This is a -1 11748 // case where the the stream has called the implementation defined _read() -1 11749 // method, but they are processing the call asynchronously and have _not_ -1 11750 // called push() with new data. In this case we skip performing more -1 11751 // read()s. The execution ends in this method again after the _read() ends -1 11752 // up calling push() with more data. -1 11753 while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { -1 11754 var len = state.length; -1 11755 debug('maybeReadMore read 0'); -1 11756 stream.read(0); -1 11757 if (len === state.length) // didn't get any data, stop spinning. -1 11758 break; -1 11759 } -1 11760 -1 11761 state.readingMore = false; -1 11762 } // abstract method. to be overridden in specific implementation classes. -1 11763 // call cb(er, data) where data is <= n in length. -1 11764 // for virtual (non-string, non-buffer) streams, "length" is somewhat -1 11765 // arbitrary, and perhaps not very meaningful. -1 11766 -1 11767 -1 11768 Readable.prototype._read = function (n) { -1 11769 errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); -1 11770 }; -1 11771 -1 11772 Readable.prototype.pipe = function (dest, pipeOpts) { -1 11773 var src = this; -1 11774 var state = this._readableState; -1 11775 -1 11776 switch (state.pipesCount) { -1 11777 case 0: -1 11778 state.pipes = dest; -1 11779 break; -1 11780 -1 11781 case 1: -1 11782 state.pipes = [state.pipes, dest]; -1 11783 break; -1 11784 -1 11785 default: -1 11786 state.pipes.push(dest); -1 11787 break; -1 11788 } -1 11789 -1 11790 state.pipesCount += 1; -1 11791 debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); -1 11792 var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; -1 11793 var endFn = doEnd ? onend : unpipe; -1 11794 if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); -1 11795 dest.on('unpipe', onunpipe); -1 11796 -1 11797 function onunpipe(readable, unpipeInfo) { -1 11798 debug('onunpipe'); -1 11799 -1 11800 if (readable === src) { -1 11801 if (unpipeInfo && unpipeInfo.hasUnpiped === false) { -1 11802 unpipeInfo.hasUnpiped = true; -1 11803 cleanup(); -1 11804 } -1 11805 } -1 11806 } -1 11807 -1 11808 function onend() { -1 11809 debug('onend'); -1 11810 dest.end(); -1 11811 } // when the dest drains, it reduces the awaitDrain counter -1 11812 // on the source. This would be more elegant with a .once() -1 11813 // handler in flow(), but adding and removing repeatedly is -1 11814 // too slow. -1 11815 -1 11816 -1 11817 var ondrain = pipeOnDrain(src); -1 11818 dest.on('drain', ondrain); -1 11819 var cleanedUp = false; -1 11820 -1 11821 function cleanup() { -1 11822 debug('cleanup'); // cleanup event handlers once the pipe is broken -1 11823 -1 11824 dest.removeListener('close', onclose); -1 11825 dest.removeListener('finish', onfinish); -1 11826 dest.removeListener('drain', ondrain); -1 11827 dest.removeListener('error', onerror); -1 11828 dest.removeListener('unpipe', onunpipe); -1 11829 src.removeListener('end', onend); -1 11830 src.removeListener('end', unpipe); -1 11831 src.removeListener('data', ondata); -1 11832 cleanedUp = true; // if the reader is waiting for a drain event from this -1 11833 // specific writer, then it would cause it to never start -1 11834 // flowing again. -1 11835 // So, if this is awaiting a drain, then we just call it now. -1 11836 // If we don't know, then assume that we are waiting for one. -1 11837 -1 11838 if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); -1 11839 } -1 11840 -1 11841 src.on('data', ondata); -1 11842 -1 11843 function ondata(chunk) { -1 11844 debug('ondata'); -1 11845 var ret = dest.write(chunk); -1 11846 debug('dest.write', ret); -1 11847 -1 11848 if (ret === false) { -1 11849 // If the user unpiped during `dest.write()`, it is possible -1 11850 // to get stuck in a permanently paused state if that write -1 11851 // also returned false. -1 11852 // => Check whether `dest` is still a piping destination. -1 11853 if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { -1 11854 debug('false write response, pause', state.awaitDrain); -1 11855 state.awaitDrain++; -1 11856 } -1 11857 -1 11858 src.pause(); -1 11859 } -1 11860 } // if the dest has an error, then stop piping into it. -1 11861 // however, don't suppress the throwing behavior for this. -1 11862 -1 11863 -1 11864 function onerror(er) { -1 11865 debug('onerror', er); -1 11866 unpipe(); -1 11867 dest.removeListener('error', onerror); -1 11868 if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); -1 11869 } // Make sure our error handler is attached before userland ones. -1 11870 -1 11871 -1 11872 prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once. -1 11873 -1 11874 function onclose() { -1 11875 dest.removeListener('finish', onfinish); -1 11876 unpipe(); -1 11877 } -1 11878 -1 11879 dest.once('close', onclose); -1 11880 -1 11881 function onfinish() { -1 11882 debug('onfinish'); -1 11883 dest.removeListener('close', onclose); -1 11884 unpipe(); -1 11885 } -1 11886 -1 11887 dest.once('finish', onfinish); -1 11888 -1 11889 function unpipe() { -1 11890 debug('unpipe'); -1 11891 src.unpipe(dest); -1 11892 } // tell the dest that it's being piped to -1 11893 -1 11894 -1 11895 dest.emit('pipe', src); // start the flow if it hasn't been started already. -1 11896 -1 11897 if (!state.flowing) { -1 11898 debug('pipe resume'); -1 11899 src.resume(); -1 11900 } -1 11901 -1 11902 return dest; -1 11903 }; -1 11904 -1 11905 function pipeOnDrain(src) { -1 11906 return function pipeOnDrainFunctionResult() { -1 11907 var state = src._readableState; -1 11908 debug('pipeOnDrain', state.awaitDrain); -1 11909 if (state.awaitDrain) state.awaitDrain--; -1 11910 -1 11911 if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { -1 11912 state.flowing = true; -1 11913 flow(src); -1 11914 } -1 11915 }; -1 11916 } -1 11917 -1 11918 Readable.prototype.unpipe = function (dest) { -1 11919 var state = this._readableState; -1 11920 var unpipeInfo = { -1 11921 hasUnpiped: false -1 11922 }; // if we're not piping anywhere, then do nothing. -1 11923 -1 11924 if (state.pipesCount === 0) return this; // just one destination. most common case. -1 11925 -1 11926 if (state.pipesCount === 1) { -1 11927 // passed in one, but it's not the right one. -1 11928 if (dest && dest !== state.pipes) return this; -1 11929 if (!dest) dest = state.pipes; // got a match. -1 11930 -1 11931 state.pipes = null; -1 11932 state.pipesCount = 0; -1 11933 state.flowing = false; -1 11934 if (dest) dest.emit('unpipe', this, unpipeInfo); -1 11935 return this; -1 11936 } // slow case. multiple pipe destinations. -1 11937 -1 11938 -1 11939 if (!dest) { -1 11940 // remove all. -1 11941 var dests = state.pipes; -1 11942 var len = state.pipesCount; -1 11943 state.pipes = null; -1 11944 state.pipesCount = 0; -1 11945 state.flowing = false; -1 11946 -1 11947 for (var i = 0; i < len; i++) { -1 11948 dests[i].emit('unpipe', this, { -1 11949 hasUnpiped: false -1 11950 }); -1 11951 } -1 11952 -1 11953 return this; -1 11954 } // try to find the right one. -1 11955 -1 11956 -1 11957 var index = indexOf(state.pipes, dest); -1 11958 if (index === -1) return this; -1 11959 state.pipes.splice(index, 1); -1 11960 state.pipesCount -= 1; -1 11961 if (state.pipesCount === 1) state.pipes = state.pipes[0]; -1 11962 dest.emit('unpipe', this, unpipeInfo); -1 11963 return this; -1 11964 }; // set up data events if they are asked for -1 11965 // Ensure readable listeners eventually get something -1 11966 -1 11967 -1 11968 Readable.prototype.on = function (ev, fn) { -1 11969 var res = Stream.prototype.on.call(this, ev, fn); -1 11970 var state = this._readableState; -1 11971 -1 11972 if (ev === 'data') { -1 11973 // update readableListening so that resume() may be a no-op -1 11974 // a few lines down. This is needed to support once('readable'). -1 11975 state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused -1 11976 -1 11977 if (state.flowing !== false) this.resume(); -1 11978 } else if (ev === 'readable') { -1 11979 if (!state.endEmitted && !state.readableListening) { -1 11980 state.readableListening = state.needReadable = true; -1 11981 state.flowing = false; -1 11982 state.emittedReadable = false; -1 11983 debug('on readable', state.length, state.reading); -1 11984 -1 11985 if (state.length) { -1 11986 emitReadable(this); -1 11987 } else if (!state.reading) { -1 11988 process.nextTick(nReadingNextTick, this); -1 11989 } -1 11990 } -1 11991 } -1 11992 -1 11993 return res; -1 11994 }; -1 11995 -1 11996 Readable.prototype.addListener = Readable.prototype.on; -1 11997 -1 11998 Readable.prototype.removeListener = function (ev, fn) { -1 11999 var res = Stream.prototype.removeListener.call(this, ev, fn); -1 12000 -1 12001 if (ev === 'readable') { -1 12002 // We need to check if there is someone still listening to -1 12003 // readable and reset the state. However this needs to happen -1 12004 // after readable has been emitted but before I/O (nextTick) to -1 12005 // support once('readable', fn) cycles. This means that calling -1 12006 // resume within the same tick will have no -1 12007 // effect. -1 12008 process.nextTick(updateReadableListening, this); -1 12009 } -1 12010 -1 12011 return res; -1 12012 }; -1 12013 -1 12014 Readable.prototype.removeAllListeners = function (ev) { -1 12015 var res = Stream.prototype.removeAllListeners.apply(this, arguments); -1 12016 -1 12017 if (ev === 'readable' || ev === undefined) { -1 12018 // We need to check if there is someone still listening to -1 12019 // readable and reset the state. However this needs to happen -1 12020 // after readable has been emitted but before I/O (nextTick) to -1 12021 // support once('readable', fn) cycles. This means that calling -1 12022 // resume within the same tick will have no -1 12023 // effect. -1 12024 process.nextTick(updateReadableListening, this); -1 12025 } -1 12026 -1 12027 return res; -1 12028 }; -1 12029 -1 12030 function updateReadableListening(self) { -1 12031 var state = self._readableState; -1 12032 state.readableListening = self.listenerCount('readable') > 0; -1 12033 -1 12034 if (state.resumeScheduled && !state.paused) { -1 12035 // flowing needs to be set to true now, otherwise -1 12036 // the upcoming resume will not flow. -1 12037 state.flowing = true; // crude way to check if we should resume -1 12038 } else if (self.listenerCount('data') > 0) { -1 12039 self.resume(); -1 12040 } -1 12041 } -1 12042 -1 12043 function nReadingNextTick(self) { -1 12044 debug('readable nexttick read 0'); -1 12045 self.read(0); -1 12046 } // pause() and resume() are remnants of the legacy readable stream API -1 12047 // If the user uses them, then switch into old mode. -1 12048 -1 12049 -1 12050 Readable.prototype.resume = function () { -1 12051 var state = this._readableState; -1 12052 -1 12053 if (!state.flowing) { -1 12054 debug('resume'); // we flow only if there is no one listening -1 12055 // for readable, but we still have to call -1 12056 // resume() -1 12057 -1 12058 state.flowing = !state.readableListening; -1 12059 resume(this, state); -1 12060 } -1 12061 -1 12062 state.paused = false; -1 12063 return this; -1 12064 }; -1 12065 -1 12066 function resume(stream, state) { -1 12067 if (!state.resumeScheduled) { -1 12068 state.resumeScheduled = true; -1 12069 process.nextTick(resume_, stream, state); -1 12070 } -1 12071 } -1 12072 -1 12073 function resume_(stream, state) { -1 12074 debug('resume', state.reading); -1 12075 -1 12076 if (!state.reading) { -1 12077 stream.read(0); -1 12078 } -1 12079 -1 12080 state.resumeScheduled = false; -1 12081 stream.emit('resume'); -1 12082 flow(stream); -1 12083 if (state.flowing && !state.reading) stream.read(0); -1 12084 } -1 12085 -1 12086 Readable.prototype.pause = function () { -1 12087 debug('call pause flowing=%j', this._readableState.flowing); -1 12088 -1 12089 if (this._readableState.flowing !== false) { -1 12090 debug('pause'); -1 12091 this._readableState.flowing = false; -1 12092 this.emit('pause'); -1 12093 } -1 12094 -1 12095 this._readableState.paused = true; -1 12096 return this; -1 12097 }; -1 12098 -1 12099 function flow(stream) { -1 12100 var state = stream._readableState; -1 12101 debug('flow', state.flowing); -1 12102 -1 12103 while (state.flowing && stream.read() !== null) { -1 12104 ; -1 12105 } -1 12106 } // wrap an old-style stream as the async data source. -1 12107 // This is *not* part of the readable stream interface. -1 12108 // It is an ugly unfortunate mess of history. -1 12109 -1 12110 -1 12111 Readable.prototype.wrap = function (stream) { -1 12112 var _this = this; -1 12113 -1 12114 var state = this._readableState; -1 12115 var paused = false; -1 12116 stream.on('end', function () { -1 12117 debug('wrapped end'); -1 12118 -1 12119 if (state.decoder && !state.ended) { -1 12120 var chunk = state.decoder.end(); -1 12121 if (chunk && chunk.length) _this.push(chunk); -1 12122 } -1 12123 -1 12124 _this.push(null); -1 12125 }); -1 12126 stream.on('data', function (chunk) { -1 12127 debug('wrapped data'); -1 12128 if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode -1 12129 -1 12130 if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; -1 12131 -1 12132 var ret = _this.push(chunk); -1 12133 -1 12134 if (!ret) { -1 12135 paused = true; -1 12136 stream.pause(); -1 12137 } -1 12138 }); // proxy all the other methods. -1 12139 // important when wrapping filters and duplexes. -1 12140 -1 12141 for (var i in stream) { -1 12142 if (this[i] === undefined && typeof stream[i] === 'function') { -1 12143 this[i] = function methodWrap(method) { -1 12144 return function methodWrapReturnFunction() { -1 12145 return stream[method].apply(stream, arguments); -1 12146 }; -1 12147 }(i); -1 12148 } -1 12149 } // proxy certain important events. -1 12150 -1 12151 -1 12152 for (var n = 0; n < kProxyEvents.length; n++) { -1 12153 stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); -1 12154 } // when we try to consume some more bytes, simply unpause the -1 12155 // underlying stream. -1 12156 -1 12157 -1 12158 this._read = function (n) { -1 12159 debug('wrapped _read', n); -1 12160 -1 12161 if (paused) { -1 12162 paused = false; -1 12163 stream.resume(); -1 12164 } -1 12165 }; -1 12166 -1 12167 return this; -1 12168 }; -1 12169 -1 12170 if (typeof Symbol === 'function') { -1 12171 Readable.prototype[Symbol.asyncIterator] = function () { -1 12172 if (createReadableStreamAsyncIterator === undefined) { -1 12173 createReadableStreamAsyncIterator = require('./internal/streams/async_iterator'); -1 12174 } -1 12175 -1 12176 return createReadableStreamAsyncIterator(this); -1 12177 }; -1 12178 } -1 12179 -1 12180 Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { -1 12181 // making it explicit this property is not enumerable -1 12182 // because otherwise some prototype manipulation in -1 12183 // userland will fail -1 12184 enumerable: false, -1 12185 get: function get() { -1 12186 return this._readableState.highWaterMark; -1 12187 } -1 12188 }); -1 12189 Object.defineProperty(Readable.prototype, 'readableBuffer', { -1 12190 // making it explicit this property is not enumerable -1 12191 // because otherwise some prototype manipulation in -1 12192 // userland will fail -1 12193 enumerable: false, -1 12194 get: function get() { -1 12195 return this._readableState && this._readableState.buffer; -1 12196 } -1 12197 }); -1 12198 Object.defineProperty(Readable.prototype, 'readableFlowing', { -1 12199 // making it explicit this property is not enumerable -1 12200 // because otherwise some prototype manipulation in -1 12201 // userland will fail -1 12202 enumerable: false, -1 12203 get: function get() { -1 12204 return this._readableState.flowing; -1 12205 }, -1 12206 set: function set(state) { -1 12207 if (this._readableState) { -1 12208 this._readableState.flowing = state; -1 12209 } -1 12210 } -1 12211 }); // exposed for testing purposes only. -1 12212 -1 12213 Readable._fromList = fromList; -1 12214 Object.defineProperty(Readable.prototype, 'readableLength', { -1 12215 // making it explicit this property is not enumerable -1 12216 // because otherwise some prototype manipulation in -1 12217 // userland will fail -1 12218 enumerable: false, -1 12219 get: function get() { -1 12220 return this._readableState.length; -1 12221 } -1 12222 }); // Pluck off n bytes from an array of buffers. -1 12223 // Length is the combined lengths of all the buffers in the list. -1 12224 // This function is designed to be inlinable, so please take care when making -1 12225 // changes to the function body. -1 12226 -1 12227 function fromList(n, state) { -1 12228 // nothing buffered -1 12229 if (state.length === 0) return null; -1 12230 var ret; -1 12231 if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { -1 12232 // read it all, truncate the list -1 12233 if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); -1 12234 state.buffer.clear(); -1 12235 } else { -1 12236 // read part of list -1 12237 ret = state.buffer.consume(n, state.decoder); -1 12238 } -1 12239 return ret; -1 12240 } -1 12241 -1 12242 function endReadable(stream) { -1 12243 var state = stream._readableState; -1 12244 debug('endReadable', state.endEmitted); -1 12245 -1 12246 if (!state.endEmitted) { -1 12247 state.ended = true; -1 12248 process.nextTick(endReadableNT, state, stream); -1 12249 } -1 12250 } -1 12251 -1 12252 function endReadableNT(state, stream) { -1 12253 debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift. -1 12254 -1 12255 if (!state.endEmitted && state.length === 0) { -1 12256 state.endEmitted = true; -1 12257 stream.readable = false; -1 12258 stream.emit('end'); -1 12259 -1 12260 if (state.autoDestroy) { -1 12261 // In case of duplex streams we need a way to detect -1 12262 // if the writable side is ready for autoDestroy as well -1 12263 var wState = stream._writableState; -1 12264 -1 12265 if (!wState || wState.autoDestroy && wState.finished) { -1 12266 stream.destroy(); -1 12267 } -1 12268 } -1 12269 } -1 12270 } -1 12271 -1 12272 if (typeof Symbol === 'function') { -1 12273 Readable.from = function (iterable, opts) { -1 12274 if (from === undefined) { -1 12275 from = require('./internal/streams/from'); -1 12276 } -1 12277 -1 12278 return from(Readable, iterable, opts); -1 12279 }; -1 12280 } -1 12281 -1 12282 function indexOf(xs, x) { -1 12283 for (var i = 0, l = xs.length; i < l; i++) { -1 12284 if (xs[i] === x) return i; -1 12285 } -1 12286 -1 12287 return -1; -1 12288 } -1 12289 }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -1 12290 },{"../errors":47,"./_stream_duplex":48,"./internal/streams/async_iterator":53,"./internal/streams/buffer_list":54,"./internal/streams/destroy":55,"./internal/streams/from":57,"./internal/streams/state":59,"./internal/streams/stream":60,"_process":149,"buffer":63,"events":100,"inherits":132,"string_decoder/":185,"util":19}],51:[function(require,module,exports){ -1 12291 // Copyright Joyent, Inc. and other Node contributors. -1 12292 // -1 12293 // Permission is hereby granted, free of charge, to any person obtaining a -1 12294 // copy of this software and associated documentation files (the -1 12295 // "Software"), to deal in the Software without restriction, including -1 12296 // without limitation the rights to use, copy, modify, merge, publish, -1 12297 // distribute, sublicense, and/or sell copies of the Software, and to permit -1 12298 // persons to whom the Software is furnished to do so, subject to the -1 12299 // following conditions: -1 12300 // -1 12301 // The above copyright notice and this permission notice shall be included -1 12302 // in all copies or substantial portions of the Software. -1 12303 // -1 12304 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -1 12305 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -1 12306 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -1 12307 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -1 12308 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -1 12309 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -1 12310 // USE OR OTHER DEALINGS IN THE SOFTWARE. -1 12311 // a transform stream is a readable/writable stream where you do -1 12312 // something with the data. Sometimes it's called a "filter", -1 12313 // but that's not a great name for it, since that implies a thing where -1 12314 // some bits pass through, and others are simply ignored. (That would -1 12315 // be a valid example of a transform, of course.) -1 12316 // -1 12317 // While the output is causally related to the input, it's not a -1 12318 // necessarily symmetric or synchronous transformation. For example, -1 12319 // a zlib stream might take multiple plain-text writes(), and then -1 12320 // emit a single compressed chunk some time in the future. -1 12321 // -1 12322 // Here's how this works: -1 12323 // -1 12324 // The Transform stream has all the aspects of the readable and writable -1 12325 // stream classes. When you write(chunk), that calls _write(chunk,cb) -1 12326 // internally, and returns false if there's a lot of pending writes -1 12327 // buffered up. When you call read(), that calls _read(n) until -1 12328 // there's enough pending readable data buffered up. -1 12329 // -1 12330 // In a transform stream, the written data is placed in a buffer. When -1 12331 // _read(n) is called, it transforms the queued up data, calling the -1 12332 // buffered _write cb's as it consumes chunks. If consuming a single -1 12333 // written chunk would result in multiple output chunks, then the first -1 12334 // outputted bit calls the readcb, and subsequent chunks just go into -1 12335 // the read buffer, and will cause it to emit 'readable' if necessary. -1 12336 // -1 12337 // This way, back-pressure is actually determined by the reading side, -1 12338 // since _read has to be called to start processing a new chunk. However, -1 12339 // a pathological inflate type of transform can cause excessive buffering -1 12340 // here. For example, imagine a stream where every byte of input is -1 12341 // interpreted as an integer from 0-255, and then results in that many -1 12342 // bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -1 12343 // 1kb of data being output. In this case, you could write a very small -1 12344 // amount of input, and end up with a very large amount of output. In -1 12345 // such a pathological inflating mechanism, there'd be no way to tell -1 12346 // the system to stop doing the transform. A single 4MB write could -1 12347 // cause the system to run out of memory. -1 12348 // -1 12349 // However, even in such a pathological case, only a single written chunk -1 12350 // would be consumed, and then the rest would wait (un-transformed) until -1 12351 // the results of the previous transformed chunk were consumed. -1 12352 'use strict'; -1 12353 -1 12354 module.exports = Transform; -1 12355 -1 12356 var _require$codes = require('../errors').codes, -1 12357 ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, -1 12358 ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, -1 12359 ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, -1 12360 ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; -1 12361 -1 12362 var Duplex = require('./_stream_duplex'); -1 12363 -1 12364 require('inherits')(Transform, Duplex); -1 12365 -1 12366 function afterTransform(er, data) { -1 12367 var ts = this._transformState; -1 12368 ts.transforming = false; -1 12369 var cb = ts.writecb; -1 12370 -1 12371 if (cb === null) { -1 12372 return this.emit('error', new ERR_MULTIPLE_CALLBACK()); -1 12373 } -1 12374 -1 12375 ts.writechunk = null; -1 12376 ts.writecb = null; -1 12377 if (data != null) // single equals check for both `null` and `undefined` -1 12378 this.push(data); -1 12379 cb(er); -1 12380 var rs = this._readableState; -1 12381 rs.reading = false; -1 12382 -1 12383 if (rs.needReadable || rs.length < rs.highWaterMark) { -1 12384 this._read(rs.highWaterMark); -1 12385 } -1 12386 } -1 12387 -1 12388 function Transform(options) { -1 12389 if (!(this instanceof Transform)) return new Transform(options); -1 12390 Duplex.call(this, options); -1 12391 this._transformState = { -1 12392 afterTransform: afterTransform.bind(this), -1 12393 needTransform: false, -1 12394 transforming: false, -1 12395 writecb: null, -1 12396 writechunk: null, -1 12397 writeencoding: null -1 12398 }; // start out asking for a readable event once data is transformed. -1 12399 -1 12400 this._readableState.needReadable = true; // we have implemented the _read method, and done the other things -1 12401 // that Readable wants before the first _read call, so unset the -1 12402 // sync guard flag. -1 12403 -1 12404 this._readableState.sync = false; -1 12405 -1 12406 if (options) { -1 12407 if (typeof options.transform === 'function') this._transform = options.transform; -1 12408 if (typeof options.flush === 'function') this._flush = options.flush; -1 12409 } // When the writable side finishes, then flush out anything remaining. -1 12410 -1 12411 -1 12412 this.on('prefinish', prefinish); -1 12413 } -1 12414 -1 12415 function prefinish() { -1 12416 var _this = this; -1 12417 -1 12418 if (typeof this._flush === 'function' && !this._readableState.destroyed) { -1 12419 this._flush(function (er, data) { -1 12420 done(_this, er, data); -1 12421 }); -1 12422 } else { -1 12423 done(this, null, null); -1 12424 } -1 12425 } -1 12426 -1 12427 Transform.prototype.push = function (chunk, encoding) { -1 12428 this._transformState.needTransform = false; -1 12429 return Duplex.prototype.push.call(this, chunk, encoding); -1 12430 }; // This is the part where you do stuff! -1 12431 // override this function in implementation classes. -1 12432 // 'chunk' is an input chunk. -1 12433 // -1 12434 // Call `push(newChunk)` to pass along transformed output -1 12435 // to the readable side. You may call 'push' zero or more times. -1 12436 // -1 12437 // Call `cb(err)` when you are done with this chunk. If you pass -1 12438 // an error, then that'll put the hurt on the whole operation. If you -1 12439 // never call cb(), then you'll never get another chunk. -1 12440 -1 12441 -1 12442 Transform.prototype._transform = function (chunk, encoding, cb) { -1 12443 cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); -1 12444 }; -1 12445 -1 12446 Transform.prototype._write = function (chunk, encoding, cb) { -1 12447 var ts = this._transformState; -1 12448 ts.writecb = cb; -1 12449 ts.writechunk = chunk; -1 12450 ts.writeencoding = encoding; -1 12451 -1 12452 if (!ts.transforming) { -1 12453 var rs = this._readableState; -1 12454 if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); -1 12455 } -1 12456 }; // Doesn't matter what the args are here. -1 12457 // _transform does all the work. -1 12458 // That we got here means that the readable side wants more data. -1 12459 -1 12460 -1 12461 Transform.prototype._read = function (n) { -1 12462 var ts = this._transformState; -1 12463 -1 12464 if (ts.writechunk !== null && !ts.transforming) { -1 12465 ts.transforming = true; -1 12466 -1 12467 this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); -1 12468 } else { -1 12469 // mark that we need a transform, so that any data that comes in -1 12470 // will get processed, now that we've asked for it. -1 12471 ts.needTransform = true; -1 12472 } -1 12473 }; -1 12474 -1 12475 Transform.prototype._destroy = function (err, cb) { -1 12476 Duplex.prototype._destroy.call(this, err, function (err2) { -1 12477 cb(err2); -1 12478 }); -1 12479 }; -1 12480 -1 12481 function done(stream, er, data) { -1 12482 if (er) return stream.emit('error', er); -1 12483 if (data != null) // single equals check for both `null` and `undefined` -1 12484 stream.push(data); // TODO(BridgeAR): Write a test for these two error cases -1 12485 // if there's nothing in the write buffer, then that means -1 12486 // that nothing more will ever be provided -1 12487 -1 12488 if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); -1 12489 if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); -1 12490 return stream.push(null); -1 12491 } -1 12492 },{"../errors":47,"./_stream_duplex":48,"inherits":132}],52:[function(require,module,exports){ -1 12493 (function (process,global){(function (){ -1 12494 // Copyright Joyent, Inc. and other Node contributors. -1 12495 // -1 12496 // Permission is hereby granted, free of charge, to any person obtaining a -1 12497 // copy of this software and associated documentation files (the -1 12498 // "Software"), to deal in the Software without restriction, including -1 12499 // without limitation the rights to use, copy, modify, merge, publish, -1 12500 // distribute, sublicense, and/or sell copies of the Software, and to permit -1 12501 // persons to whom the Software is furnished to do so, subject to the -1 12502 // following conditions: -1 12503 // -1 12504 // The above copyright notice and this permission notice shall be included -1 12505 // in all copies or substantial portions of the Software. -1 12506 // -1 12507 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -1 12508 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -1 12509 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -1 12510 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -1 12511 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -1 12512 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -1 12513 // USE OR OTHER DEALINGS IN THE SOFTWARE. -1 12514 // A bit simpler than readable streams. -1 12515 // Implement an async ._write(chunk, encoding, cb), and it'll handle all -1 12516 // the drain event emission and buffering. -1 12517 'use strict'; -1 12518 -1 12519 module.exports = Writable; -1 12520 /* <replacement> */ -1 12521 -1 12522 function WriteReq(chunk, encoding, cb) { -1 12523 this.chunk = chunk; -1 12524 this.encoding = encoding; -1 12525 this.callback = cb; -1 12526 this.next = null; -1 12527 } // It seems a linked list but it is not -1 12528 // there will be only 2 of these for each stream -1 12529 -1 12530 -1 12531 function CorkedRequest(state) { -1 12532 var _this = this; -1 12533 -1 12534 this.next = null; -1 12535 this.entry = null; -1 12536 -1 12537 this.finish = function () { -1 12538 onCorkedFinish(_this, state); -1 12539 }; -1 12540 } -1 12541 /* </replacement> */ -1 12542 -1 12543 /*<replacement>*/ -1 12544 -1 12545 -1 12546 var Duplex; -1 12547 /*</replacement>*/ -1 12548 -1 12549 Writable.WritableState = WritableState; -1 12550 /*<replacement>*/ -1 12551 -1 12552 var internalUtil = { -1 12553 deprecate: require('util-deprecate') -1 12554 }; -1 12555 /*</replacement>*/ -1 12556 -1 12557 /*<replacement>*/ -1 12558 -1 12559 var Stream = require('./internal/streams/stream'); -1 12560 /*</replacement>*/ -1 12561 -1 12562 -1 12563 var Buffer = require('buffer').Buffer; -1 12564 -1 12565 var OurUint8Array = global.Uint8Array || function () {}; -1 12566 -1 12567 function _uint8ArrayToBuffer(chunk) { -1 12568 return Buffer.from(chunk); -1 12569 } -1 12570 -1 12571 function _isUint8Array(obj) { -1 12572 return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -1 12573 } -1 12574 -1 12575 var destroyImpl = require('./internal/streams/destroy'); -1 12576 -1 12577 var _require = require('./internal/streams/state'), -1 12578 getHighWaterMark = _require.getHighWaterMark; -1 12579 -1 12580 var _require$codes = require('../errors').codes, -1 12581 ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, -1 12582 ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, -1 12583 ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, -1 12584 ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, -1 12585 ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, -1 12586 ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, -1 12587 ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, -1 12588 ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; -1 12589 -1 12590 var errorOrDestroy = destroyImpl.errorOrDestroy; -1 12591 -1 12592 require('inherits')(Writable, Stream); -1 12593 -1 12594 function nop() {} -1 12595 -1 12596 function WritableState(options, stream, isDuplex) { -1 12597 Duplex = Duplex || require('./_stream_duplex'); -1 12598 options = options || {}; // Duplex streams are both readable and writable, but share -1 12599 // the same options object. -1 12600 // However, some cases require setting options to different -1 12601 // values for the readable and the writable sides of the duplex stream, -1 12602 // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. -1 12603 -1 12604 if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream -1 12605 // contains buffers or objects. -1 12606 -1 12607 this.objectMode = !!options.objectMode; -1 12608 if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false -1 12609 // Note: 0 is a valid value, means that we always return false if -1 12610 // the entire buffer is not flushed immediately on write() -1 12611 -1 12612 this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called -1 12613 -1 12614 this.finalCalled = false; // drain event flag. -1 12615 -1 12616 this.needDrain = false; // at the start of calling end() -1 12617 -1 12618 this.ending = false; // when end() has been called, and returned -1 12619 -1 12620 this.ended = false; // when 'finish' is emitted -1 12621 -1 12622 this.finished = false; // has it been destroyed -1 12623 -1 12624 this.destroyed = false; // should we decode strings into buffers before passing to _write? -1 12625 // this is here so that some node-core streams can optimize string -1 12626 // handling at a lower level. -1 12627 -1 12628 var noDecode = options.decodeStrings === false; -1 12629 this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string -1 12630 // encoding is 'binary' so we have to make this configurable. -1 12631 // Everything else in the universe uses 'utf8', though. -1 12632 -1 12633 this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement -1 12634 // of how much we're waiting to get pushed to some underlying -1 12635 // socket or file. -1 12636 -1 12637 this.length = 0; // a flag to see when we're in the middle of a write. -1 12638 -1 12639 this.writing = false; // when true all writes will be buffered until .uncork() call -1 12640 -1 12641 this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately, -1 12642 // or on a later tick. We set this to true at first, because any -1 12643 // actions that shouldn't happen until "later" should generally also -1 12644 // not happen before the first write call. -1 12645 -1 12646 this.sync = true; // a flag to know if we're processing previously buffered items, which -1 12647 // may call the _write() callback in the same tick, so that we don't -1 12648 // end up in an overlapped onwrite situation. -1 12649 -1 12650 this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb) -1 12651 -1 12652 this.onwrite = function (er) { -1 12653 onwrite(stream, er); -1 12654 }; // the callback that the user supplies to write(chunk,encoding,cb) -1 12655 -1 12656 -1 12657 this.writecb = null; // the amount that is being written when _write is called. -1 12658 -1 12659 this.writelen = 0; -1 12660 this.bufferedRequest = null; -1 12661 this.lastBufferedRequest = null; // number of pending user-supplied write callbacks -1 12662 // this must be 0 before 'finish' can be emitted -1 12663 -1 12664 this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs -1 12665 // This is relevant for synchronous Transform streams -1 12666 -1 12667 this.prefinished = false; // True if the error was already emitted and should not be thrown again -1 12668 -1 12669 this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true. -1 12670 -1 12671 this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end') -1 12672 -1 12673 this.autoDestroy = !!options.autoDestroy; // count buffered requests -1 12674 -1 12675 this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always -1 12676 // one allocated and free to use, and we maintain at most two -1 12677 -1 12678 this.corkedRequestsFree = new CorkedRequest(this); -1 12679 } -1 12680 -1 12681 WritableState.prototype.getBuffer = function getBuffer() { -1 12682 var current = this.bufferedRequest; -1 12683 var out = []; -1 12684 -1 12685 while (current) { -1 12686 out.push(current); -1 12687 current = current.next; -1 12688 } -1 12689 -1 12690 return out; -1 12691 }; -1 12692 -1 12693 (function () { -1 12694 try { -1 12695 Object.defineProperty(WritableState.prototype, 'buffer', { -1 12696 get: internalUtil.deprecate(function writableStateBufferGetter() { -1 12697 return this.getBuffer(); -1 12698 }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') -1 12699 }); -1 12700 } catch (_) {} -1 12701 })(); // Test _writableState for inheritance to account for Duplex streams, -1 12702 // whose prototype chain only points to Readable. -1 12703 -1 12704 -1 12705 var realHasInstance; -1 12706 -1 12707 if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { -1 12708 realHasInstance = Function.prototype[Symbol.hasInstance]; -1 12709 Object.defineProperty(Writable, Symbol.hasInstance, { -1 12710 value: function value(object) { -1 12711 if (realHasInstance.call(this, object)) return true; -1 12712 if (this !== Writable) return false; -1 12713 return object && object._writableState instanceof WritableState; -1 12714 } -1 12715 }); -1 12716 } else { -1 12717 realHasInstance = function realHasInstance(object) { -1 12718 return object instanceof this; -1 12719 }; -1 12720 } -1 12721 -1 12722 function Writable(options) { -1 12723 Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, too. -1 12724 // `realHasInstance` is necessary because using plain `instanceof` -1 12725 // would return false, as no `_writableState` property is attached. -1 12726 // Trying to use the custom `instanceof` for Writable here will also break the -1 12727 // Node.js LazyTransform implementation, which has a non-trivial getter for -1 12728 // `_writableState` that would lead to infinite recursion. -1 12729 // Checking for a Stream.Duplex instance is faster here instead of inside -1 12730 // the WritableState constructor, at least with V8 6.5 -1 12731 -1 12732 var isDuplex = this instanceof Duplex; -1 12733 if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); -1 12734 this._writableState = new WritableState(options, this, isDuplex); // legacy. -1 12735 -1 12736 this.writable = true; -1 12737 -1 12738 if (options) { -1 12739 if (typeof options.write === 'function') this._write = options.write; -1 12740 if (typeof options.writev === 'function') this._writev = options.writev; -1 12741 if (typeof options.destroy === 'function') this._destroy = options.destroy; -1 12742 if (typeof options.final === 'function') this._final = options.final; -1 12743 } -1 12744 -1 12745 Stream.call(this); -1 12746 } // Otherwise people can pipe Writable streams, which is just wrong. -1 12747 -1 12748 -1 12749 Writable.prototype.pipe = function () { -1 12750 errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); -1 12751 }; -1 12752 -1 12753 function writeAfterEnd(stream, cb) { -1 12754 var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb -1 12755 -1 12756 errorOrDestroy(stream, er); -1 12757 process.nextTick(cb, er); -1 12758 } // Checks that a user-supplied chunk is valid, especially for the particular -1 12759 // mode the stream is in. Currently this means that `null` is never accepted -1 12760 // and undefined/non-string values are only allowed in object mode. -1 12761 -1 12762 -1 12763 function validChunk(stream, state, chunk, cb) { -1 12764 var er; -1 12765 -1 12766 if (chunk === null) { -1 12767 er = new ERR_STREAM_NULL_VALUES(); -1 12768 } else if (typeof chunk !== 'string' && !state.objectMode) { -1 12769 er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); -1 12770 } -1 12771 -1 12772 if (er) { -1 12773 errorOrDestroy(stream, er); -1 12774 process.nextTick(cb, er); -1 12775 return false; -1 12776 } -1 12777 -1 12778 return true; -1 12779 } -1 12780 -1 12781 Writable.prototype.write = function (chunk, encoding, cb) { -1 12782 var state = this._writableState; -1 12783 var ret = false; -1 12784 -1 12785 var isBuf = !state.objectMode && _isUint8Array(chunk); -1 12786 -1 12787 if (isBuf && !Buffer.isBuffer(chunk)) { -1 12788 chunk = _uint8ArrayToBuffer(chunk); -1 12789 } -1 12790 -1 12791 if (typeof encoding === 'function') { -1 12792 cb = encoding; -1 12793 encoding = null; -1 12794 } -1 12795 -1 12796 if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; -1 12797 if (typeof cb !== 'function') cb = nop; -1 12798 if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { -1 12799 state.pendingcb++; -1 12800 ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); -1 12801 } -1 12802 return ret; -1 12803 }; -1 12804 -1 12805 Writable.prototype.cork = function () { -1 12806 this._writableState.corked++; -1 12807 }; -1 12808 -1 12809 Writable.prototype.uncork = function () { -1 12810 var state = this._writableState; -1 12811 -1 12812 if (state.corked) { -1 12813 state.corked--; -1 12814 if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); -1 12815 } -1 12816 }; -1 12817 -1 12818 Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { -1 12819 // node::ParseEncoding() requires lower case. -1 12820 if (typeof encoding === 'string') encoding = encoding.toLowerCase(); -1 12821 if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); -1 12822 this._writableState.defaultEncoding = encoding; -1 12823 return this; -1 12824 }; -1 12825 -1 12826 Object.defineProperty(Writable.prototype, 'writableBuffer', { -1 12827 // making it explicit this property is not enumerable -1 12828 // because otherwise some prototype manipulation in -1 12829 // userland will fail -1 12830 enumerable: false, -1 12831 get: function get() { -1 12832 return this._writableState && this._writableState.getBuffer(); -1 12833 } -1 12834 }); -1 12835 -1 12836 function decodeChunk(state, chunk, encoding) { -1 12837 if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { -1 12838 chunk = Buffer.from(chunk, encoding); -1 12839 } -1 12840 -1 12841 return chunk; -1 12842 } -1 12843 -1 12844 Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { -1 12845 // making it explicit this property is not enumerable -1 12846 // because otherwise some prototype manipulation in -1 12847 // userland will fail -1 12848 enumerable: false, -1 12849 get: function get() { -1 12850 return this._writableState.highWaterMark; -1 12851 } -1 12852 }); // if we're already writing something, then just put this -1 12853 // in the queue, and wait our turn. Otherwise, call _write -1 12854 // If we return false, then we need a drain event, so set that flag. -1 12855 -1 12856 function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { -1 12857 if (!isBuf) { -1 12858 var newChunk = decodeChunk(state, chunk, encoding); -1 12859 -1 12860 if (chunk !== newChunk) { -1 12861 isBuf = true; -1 12862 encoding = 'buffer'; -1 12863 chunk = newChunk; -1 12864 } -1 12865 } -1 12866 -1 12867 var len = state.objectMode ? 1 : chunk.length; -1 12868 state.length += len; -1 12869 var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false. -1 12870 -1 12871 if (!ret) state.needDrain = true; -1 12872 -1 12873 if (state.writing || state.corked) { -1 12874 var last = state.lastBufferedRequest; -1 12875 state.lastBufferedRequest = { -1 12876 chunk: chunk, -1 12877 encoding: encoding, -1 12878 isBuf: isBuf, -1 12879 callback: cb, -1 12880 next: null -1 12881 }; -1 12882 -1 12883 if (last) { -1 12884 last.next = state.lastBufferedRequest; -1 12885 } else { -1 12886 state.bufferedRequest = state.lastBufferedRequest; -1 12887 } -1 12888 -1 12889 state.bufferedRequestCount += 1; -1 12890 } else { -1 12891 doWrite(stream, state, false, len, chunk, encoding, cb); -1 12892 } -1 12893 -1 12894 return ret; -1 12895 } -1 12896 -1 12897 function doWrite(stream, state, writev, len, chunk, encoding, cb) { -1 12898 state.writelen = len; -1 12899 state.writecb = cb; -1 12900 state.writing = true; -1 12901 state.sync = true; -1 12902 if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); -1 12903 state.sync = false; -1 12904 } -1 12905 -1 12906 function onwriteError(stream, state, sync, er, cb) { -1 12907 --state.pendingcb; -1 12908 -1 12909 if (sync) { -1 12910 // defer the callback if we are being called synchronously -1 12911 // to avoid piling up things on the stack -1 12912 process.nextTick(cb, er); // this can emit finish, and it will always happen -1 12913 // after error -1 12914 -1 12915 process.nextTick(finishMaybe, stream, state); -1 12916 stream._writableState.errorEmitted = true; -1 12917 errorOrDestroy(stream, er); -1 12918 } else { -1 12919 // the caller expect this to happen before if -1 12920 // it is async -1 12921 cb(er); -1 12922 stream._writableState.errorEmitted = true; -1 12923 errorOrDestroy(stream, er); // this can emit finish, but finish must -1 12924 // always follow error -1 12925 -1 12926 finishMaybe(stream, state); -1 12927 } -1 12928 } -1 12929 -1 12930 function onwriteStateUpdate(state) { -1 12931 state.writing = false; -1 12932 state.writecb = null; -1 12933 state.length -= state.writelen; -1 12934 state.writelen = 0; -1 12935 } -1 12936 -1 12937 function onwrite(stream, er) { -1 12938 var state = stream._writableState; -1 12939 var sync = state.sync; -1 12940 var cb = state.writecb; -1 12941 if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK(); -1 12942 onwriteStateUpdate(state); -1 12943 if (er) onwriteError(stream, state, sync, er, cb);else { -1 12944 // Check if we're actually ready to finish, but don't emit yet -1 12945 var finished = needFinish(state) || stream.destroyed; -1 12946 -1 12947 if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { -1 12948 clearBuffer(stream, state); -1 12949 } -1 12950 -1 12951 if (sync) { -1 12952 process.nextTick(afterWrite, stream, state, finished, cb); -1 12953 } else { -1 12954 afterWrite(stream, state, finished, cb); -1 12955 } -1 12956 } -1 12957 } -1 12958 -1 12959 function afterWrite(stream, state, finished, cb) { -1 12960 if (!finished) onwriteDrain(stream, state); -1 12961 state.pendingcb--; -1 12962 cb(); -1 12963 finishMaybe(stream, state); -1 12964 } // Must force callback to be called on nextTick, so that we don't -1 12965 // emit 'drain' before the write() consumer gets the 'false' return -1 12966 // value, and has a chance to attach a 'drain' listener. -1 12967 -1 12968 -1 12969 function onwriteDrain(stream, state) { -1 12970 if (state.length === 0 && state.needDrain) { -1 12971 state.needDrain = false; -1 12972 stream.emit('drain'); -1 12973 } -1 12974 } // if there's something in the buffer waiting, then process it -1 12975 -1 12976 -1 12977 function clearBuffer(stream, state) { -1 12978 state.bufferProcessing = true; -1 12979 var entry = state.bufferedRequest; -1 12980 -1 12981 if (stream._writev && entry && entry.next) { -1 12982 // Fast case, write everything using _writev() -1 12983 var l = state.bufferedRequestCount; -1 12984 var buffer = new Array(l); -1 12985 var holder = state.corkedRequestsFree; -1 12986 holder.entry = entry; -1 12987 var count = 0; -1 12988 var allBuffers = true; -1 12989 -1 12990 while (entry) { -1 12991 buffer[count] = entry; -1 12992 if (!entry.isBuf) allBuffers = false; -1 12993 entry = entry.next; -1 12994 count += 1; -1 12995 } -1 12996 -1 12997 buffer.allBuffers = allBuffers; -1 12998 doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time -1 12999 // as the hot path ends with doWrite -1 13000 -1 13001 state.pendingcb++; -1 13002 state.lastBufferedRequest = null; -1 13003 -1 13004 if (holder.next) { -1 13005 state.corkedRequestsFree = holder.next; -1 13006 holder.next = null; -1 13007 } else { -1 13008 state.corkedRequestsFree = new CorkedRequest(state); -1 13009 } -1 13010 -1 13011 state.bufferedRequestCount = 0; -1 13012 } else { -1 13013 // Slow case, write chunks one-by-one -1 13014 while (entry) { -1 13015 var chunk = entry.chunk; -1 13016 var encoding = entry.encoding; -1 13017 var cb = entry.callback; -1 13018 var len = state.objectMode ? 1 : chunk.length; -1 13019 doWrite(stream, state, false, len, chunk, encoding, cb); -1 13020 entry = entry.next; -1 13021 state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then -1 13022 // it means that we need to wait until it does. -1 13023 // also, that means that the chunk and cb are currently -1 13024 // being processed, so move the buffer counter past them. -1 13025 -1 13026 if (state.writing) { -1 13027 break; -1 13028 } -1 13029 } -1 13030 -1 13031 if (entry === null) state.lastBufferedRequest = null; -1 13032 } -1 13033 -1 13034 state.bufferedRequest = entry; -1 13035 state.bufferProcessing = false; -1 13036 } -1 13037 -1 13038 Writable.prototype._write = function (chunk, encoding, cb) { -1 13039 cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); -1 13040 }; -1 13041 -1 13042 Writable.prototype._writev = null; -1 13043 -1 13044 Writable.prototype.end = function (chunk, encoding, cb) { -1 13045 var state = this._writableState; -1 13046 -1 13047 if (typeof chunk === 'function') { -1 13048 cb = chunk; -1 13049 chunk = null; -1 13050 encoding = null; -1 13051 } else if (typeof encoding === 'function') { -1 13052 cb = encoding; -1 13053 encoding = null; -1 13054 } -1 13055 -1 13056 if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks -1 13057 -1 13058 if (state.corked) { -1 13059 state.corked = 1; -1 13060 this.uncork(); -1 13061 } // ignore unnecessary end() calls. -1 13062 -1 13063 -1 13064 if (!state.ending) endWritable(this, state, cb); -1 13065 return this; -1 13066 }; -1 13067 -1 13068 Object.defineProperty(Writable.prototype, 'writableLength', { -1 13069 // making it explicit this property is not enumerable -1 13070 // because otherwise some prototype manipulation in -1 13071 // userland will fail -1 13072 enumerable: false, -1 13073 get: function get() { -1 13074 return this._writableState.length; -1 13075 } -1 13076 }); -1 13077 -1 13078 function needFinish(state) { -1 13079 return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -1 13080 } -1 13081 -1 13082 function callFinal(stream, state) { -1 13083 stream._final(function (err) { -1 13084 state.pendingcb--; -1 13085 -1 13086 if (err) { -1 13087 errorOrDestroy(stream, err); -1 13088 } -1 13089 -1 13090 state.prefinished = true; -1 13091 stream.emit('prefinish'); -1 13092 finishMaybe(stream, state); -1 13093 }); -1 13094 } -1 13095 -1 13096 function prefinish(stream, state) { -1 13097 if (!state.prefinished && !state.finalCalled) { -1 13098 if (typeof stream._final === 'function' && !state.destroyed) { -1 13099 state.pendingcb++; -1 13100 state.finalCalled = true; -1 13101 process.nextTick(callFinal, stream, state); -1 13102 } else { -1 13103 state.prefinished = true; -1 13104 stream.emit('prefinish'); -1 13105 } -1 13106 } -1 13107 } -1 13108 -1 13109 function finishMaybe(stream, state) { -1 13110 var need = needFinish(state); -1 13111 -1 13112 if (need) { -1 13113 prefinish(stream, state); -1 13114 -1 13115 if (state.pendingcb === 0) { -1 13116 state.finished = true; -1 13117 stream.emit('finish'); -1 13118 -1 13119 if (state.autoDestroy) { -1 13120 // In case of duplex streams we need a way to detect -1 13121 // if the readable side is ready for autoDestroy as well -1 13122 var rState = stream._readableState; -1 13123 -1 13124 if (!rState || rState.autoDestroy && rState.endEmitted) { -1 13125 stream.destroy(); -1 13126 } -1 13127 } -1 13128 } -1 13129 } -1 13130 -1 13131 return need; -1 13132 } -1 13133 -1 13134 function endWritable(stream, state, cb) { -1 13135 state.ending = true; -1 13136 finishMaybe(stream, state); -1 13137 -1 13138 if (cb) { -1 13139 if (state.finished) process.nextTick(cb);else stream.once('finish', cb); -1 13140 } -1 13141 -1 13142 state.ended = true; -1 13143 stream.writable = false; -1 13144 } -1 13145 -1 13146 function onCorkedFinish(corkReq, state, err) { -1 13147 var entry = corkReq.entry; -1 13148 corkReq.entry = null; -1 13149 -1 13150 while (entry) { -1 13151 var cb = entry.callback; -1 13152 state.pendingcb--; -1 13153 cb(err); -1 13154 entry = entry.next; -1 13155 } // reuse the free corkReq. -1 13156 -1 13157 -1 13158 state.corkedRequestsFree.next = corkReq; -1 13159 } -1 13160 -1 13161 Object.defineProperty(Writable.prototype, 'destroyed', { -1 13162 // making it explicit this property is not enumerable -1 13163 // because otherwise some prototype manipulation in -1 13164 // userland will fail -1 13165 enumerable: false, -1 13166 get: function get() { -1 13167 if (this._writableState === undefined) { -1 13168 return false; -1 13169 } -1 13170 -1 13171 return this._writableState.destroyed; -1 13172 }, -1 13173 set: function set(value) { -1 13174 // we ignore the value if the stream -1 13175 // has not been initialized yet -1 13176 if (!this._writableState) { -1 13177 return; -1 13178 } // backward compatibility, the user is explicitly -1 13179 // managing destroyed -1 13180 -1 13181 -1 13182 this._writableState.destroyed = value; -1 13183 } -1 13184 }); -1 13185 Writable.prototype.destroy = destroyImpl.destroy; -1 13186 Writable.prototype._undestroy = destroyImpl.undestroy; -1 13187 -1 13188 Writable.prototype._destroy = function (err, cb) { -1 13189 cb(err); -1 13190 }; -1 13191 }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -1 13192 },{"../errors":47,"./_stream_duplex":48,"./internal/streams/destroy":55,"./internal/streams/state":59,"./internal/streams/stream":60,"_process":149,"buffer":63,"inherits":132,"util-deprecate":187}],53:[function(require,module,exports){ -1 13193 (function (process){(function (){ -1 13194 'use strict'; -1 13195 -1 13196 var _Object$setPrototypeO; -1 13197 -1 13198 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -1 13199 -1 13200 var finished = require('./end-of-stream'); -1 13201 -1 13202 var kLastResolve = Symbol('lastResolve'); -1 13203 var kLastReject = Symbol('lastReject'); -1 13204 var kError = Symbol('error'); -1 13205 var kEnded = Symbol('ended'); -1 13206 var kLastPromise = Symbol('lastPromise'); -1 13207 var kHandlePromise = Symbol('handlePromise'); -1 13208 var kStream = Symbol('stream'); -1 13209 -1 13210 function createIterResult(value, done) { -1 13211 return { -1 13212 value: value, -1 13213 done: done -1 13214 }; -1 13215 } -1 13216 -1 13217 function readAndResolve(iter) { -1 13218 var resolve = iter[kLastResolve]; -1 13219 -1 13220 if (resolve !== null) { -1 13221 var data = iter[kStream].read(); // we defer if data is null -1 13222 // we can be expecting either 'end' or -1 13223 // 'error' -1 13224 -1 13225 if (data !== null) { -1 13226 iter[kLastPromise] = null; -1 13227 iter[kLastResolve] = null; -1 13228 iter[kLastReject] = null; -1 13229 resolve(createIterResult(data, false)); -1 13230 } -1 13231 } -1 13232 } -1 13233 -1 13234 function onReadable(iter) { -1 13235 // we wait for the next tick, because it might -1 13236 // emit an error with process.nextTick -1 13237 process.nextTick(readAndResolve, iter); -1 13238 } -1 13239 -1 13240 function wrapForNext(lastPromise, iter) { -1 13241 return function (resolve, reject) { -1 13242 lastPromise.then(function () { -1 13243 if (iter[kEnded]) { -1 13244 resolve(createIterResult(undefined, true)); -1 13245 return; -1 13246 } -1 13247 -1 13248 iter[kHandlePromise](resolve, reject); -1 13249 }, reject); -1 13250 }; -1 13251 } -1 13252 -1 13253 var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); -1 13254 var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { -1 13255 get stream() { -1 13256 return this[kStream]; -1 13257 }, -1 13258 -1 13259 next: function next() { -1 13260 var _this = this; -1 13261 -1 13262 // if we have detected an error in the meanwhile -1 13263 // reject straight away -1 13264 var error = this[kError]; -1 13265 -1 13266 if (error !== null) { -1 13267 return Promise.reject(error); -1 13268 } -1 13269 -1 13270 if (this[kEnded]) { -1 13271 return Promise.resolve(createIterResult(undefined, true)); -1 13272 } -1 13273 -1 13274 if (this[kStream].destroyed) { -1 13275 // We need to defer via nextTick because if .destroy(err) is -1 13276 // called, the error will be emitted via nextTick, and -1 13277 // we cannot guarantee that there is no error lingering around -1 13278 // waiting to be emitted. -1 13279 return new Promise(function (resolve, reject) { -1 13280 process.nextTick(function () { -1 13281 if (_this[kError]) { -1 13282 reject(_this[kError]); -1 13283 } else { -1 13284 resolve(createIterResult(undefined, true)); -1 13285 } -1 13286 }); -1 13287 }); -1 13288 } // if we have multiple next() calls -1 13289 // we will wait for the previous Promise to finish -1 13290 // this logic is optimized to support for await loops, -1 13291 // where next() is only called once at a time -1 13292 -1 13293 -1 13294 var lastPromise = this[kLastPromise]; -1 13295 var promise; -1 13296 -1 13297 if (lastPromise) { -1 13298 promise = new Promise(wrapForNext(lastPromise, this)); -1 13299 } else { -1 13300 // fast path needed to support multiple this.push() -1 13301 // without triggering the next() queue -1 13302 var data = this[kStream].read(); -1 13303 -1 13304 if (data !== null) { -1 13305 return Promise.resolve(createIterResult(data, false)); -1 13306 } -1 13307 -1 13308 promise = new Promise(this[kHandlePromise]); -1 13309 } -1 13310 -1 13311 this[kLastPromise] = promise; -1 13312 return promise; -1 13313 } -1 13314 }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () { -1 13315 return this; -1 13316 }), _defineProperty(_Object$setPrototypeO, "return", function _return() { -1 13317 var _this2 = this; -1 13318 -1 13319 // destroy(err, cb) is a private API -1 13320 // we can guarantee we have that here, because we control the -1 13321 // Readable class this is attached to -1 13322 return new Promise(function (resolve, reject) { -1 13323 _this2[kStream].destroy(null, function (err) { -1 13324 if (err) { -1 13325 reject(err); -1 13326 return; -1 13327 } -1 13328 -1 13329 resolve(createIterResult(undefined, true)); -1 13330 }); -1 13331 }); -1 13332 }), _Object$setPrototypeO), AsyncIteratorPrototype); -1 13333 -1 13334 var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { -1 13335 var _Object$create; -1 13336 -1 13337 var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { -1 13338 value: stream, -1 13339 writable: true -1 13340 }), _defineProperty(_Object$create, kLastResolve, { -1 13341 value: null, -1 13342 writable: true -1 13343 }), _defineProperty(_Object$create, kLastReject, { -1 13344 value: null, -1 13345 writable: true -1 13346 }), _defineProperty(_Object$create, kError, { -1 13347 value: null, -1 13348 writable: true -1 13349 }), _defineProperty(_Object$create, kEnded, { -1 13350 value: stream._readableState.endEmitted, -1 13351 writable: true -1 13352 }), _defineProperty(_Object$create, kHandlePromise, { -1 13353 value: function value(resolve, reject) { -1 13354 var data = iterator[kStream].read(); -1 13355 -1 13356 if (data) { -1 13357 iterator[kLastPromise] = null; -1 13358 iterator[kLastResolve] = null; -1 13359 iterator[kLastReject] = null; -1 13360 resolve(createIterResult(data, false)); -1 13361 } else { -1 13362 iterator[kLastResolve] = resolve; -1 13363 iterator[kLastReject] = reject; -1 13364 } -1 13365 }, -1 13366 writable: true -1 13367 }), _Object$create)); -1 13368 iterator[kLastPromise] = null; -1 13369 finished(stream, function (err) { -1 13370 if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { -1 13371 var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise -1 13372 // returned by next() and store the error -1 13373 -1 13374 if (reject !== null) { -1 13375 iterator[kLastPromise] = null; -1 13376 iterator[kLastResolve] = null; -1 13377 iterator[kLastReject] = null; -1 13378 reject(err); -1 13379 } -1 13380 -1 13381 iterator[kError] = err; -1 13382 return; -1 13383 } -1 13384 -1 13385 var resolve = iterator[kLastResolve]; -1 13386 -1 13387 if (resolve !== null) { -1 13388 iterator[kLastPromise] = null; -1 13389 iterator[kLastResolve] = null; -1 13390 iterator[kLastReject] = null; -1 13391 resolve(createIterResult(undefined, true)); -1 13392 } -1 13393 -1 13394 iterator[kEnded] = true; -1 13395 }); -1 13396 stream.on('readable', onReadable.bind(null, iterator)); -1 13397 return iterator; -1 13398 }; -1 13399 -1 13400 module.exports = createReadableStreamAsyncIterator; -1 13401 }).call(this)}).call(this,require('_process')) -1 13402 },{"./end-of-stream":56,"_process":149}],54:[function(require,module,exports){ -1 13403 'use strict'; -1 13404 -1 13405 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } -1 13406 -1 13407 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } -1 13408 -1 13409 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -1 13410 -1 13411 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -1 13412 -1 13413 function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } -1 13414 -1 13415 function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } -1 13416 -1 13417 var _require = require('buffer'), -1 13418 Buffer = _require.Buffer; -1 13419 -1 13420 var _require2 = require('util'), -1 13421 inspect = _require2.inspect; -1 13422 -1 13423 var custom = inspect && inspect.custom || 'inspect'; -1 13424 -1 13425 function copyBuffer(src, target, offset) { -1 13426 Buffer.prototype.copy.call(src, target, offset); -1 13427 } -1 13428 -1 13429 module.exports = -1 13430 /*#__PURE__*/ -1 13431 function () { -1 13432 function BufferList() { -1 13433 _classCallCheck(this, BufferList); -1 13434 -1 13435 this.head = null; -1 13436 this.tail = null; -1 13437 this.length = 0; -1 13438 } -1 13439 -1 13440 _createClass(BufferList, [{ -1 13441 key: "push", -1 13442 value: function push(v) { -1 13443 var entry = { -1 13444 data: v, -1 13445 next: null -1 13446 }; -1 13447 if (this.length > 0) this.tail.next = entry;else this.head = entry; -1 13448 this.tail = entry; -1 13449 ++this.length; -1 13450 } -1 13451 }, { -1 13452 key: "unshift", -1 13453 value: function unshift(v) { -1 13454 var entry = { -1 13455 data: v, -1 13456 next: this.head -1 13457 }; -1 13458 if (this.length === 0) this.tail = entry; -1 13459 this.head = entry; -1 13460 ++this.length; -1 13461 } -1 13462 }, { -1 13463 key: "shift", -1 13464 value: function shift() { -1 13465 if (this.length === 0) return; -1 13466 var ret = this.head.data; -1 13467 if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; -1 13468 --this.length; -1 13469 return ret; -1 13470 } -1 13471 }, { -1 13472 key: "clear", -1 13473 value: function clear() { -1 13474 this.head = this.tail = null; -1 13475 this.length = 0; -1 13476 } -1 13477 }, { -1 13478 key: "join", -1 13479 value: function join(s) { -1 13480 if (this.length === 0) return ''; -1 13481 var p = this.head; -1 13482 var ret = '' + p.data; -1 13483 -1 13484 while (p = p.next) { -1 13485 ret += s + p.data; -1 13486 } -1 13487 -1 13488 return ret; -1 13489 } -1 13490 }, { -1 13491 key: "concat", -1 13492 value: function concat(n) { -1 13493 if (this.length === 0) return Buffer.alloc(0); -1 13494 var ret = Buffer.allocUnsafe(n >>> 0); -1 13495 var p = this.head; -1 13496 var i = 0; -1 13497 -1 13498 while (p) { -1 13499 copyBuffer(p.data, ret, i); -1 13500 i += p.data.length; -1 13501 p = p.next; -1 13502 } -1 13503 -1 13504 return ret; -1 13505 } // Consumes a specified amount of bytes or characters from the buffered data. -1 13506 -1 13507 }, { -1 13508 key: "consume", -1 13509 value: function consume(n, hasStrings) { -1 13510 var ret; -1 13511 -1 13512 if (n < this.head.data.length) { -1 13513 // `slice` is the same for buffers and strings. -1 13514 ret = this.head.data.slice(0, n); -1 13515 this.head.data = this.head.data.slice(n); -1 13516 } else if (n === this.head.data.length) { -1 13517 // First chunk is a perfect match. -1 13518 ret = this.shift(); -1 13519 } else { -1 13520 // Result spans more than one buffer. -1 13521 ret = hasStrings ? this._getString(n) : this._getBuffer(n); -1 13522 } -1 13523 -1 13524 return ret; -1 13525 } -1 13526 }, { -1 13527 key: "first", -1 13528 value: function first() { -1 13529 return this.head.data; -1 13530 } // Consumes a specified amount of characters from the buffered data. -1 13531 -1 13532 }, { -1 13533 key: "_getString", -1 13534 value: function _getString(n) { -1 13535 var p = this.head; -1 13536 var c = 1; -1 13537 var ret = p.data; -1 13538 n -= ret.length; -1 13539 -1 13540 while (p = p.next) { -1 13541 var str = p.data; -1 13542 var nb = n > str.length ? str.length : n; -1 13543 if (nb === str.length) ret += str;else ret += str.slice(0, n); -1 13544 n -= nb; -1 13545 -1 13546 if (n === 0) { -1 13547 if (nb === str.length) { -1 13548 ++c; -1 13549 if (p.next) this.head = p.next;else this.head = this.tail = null; -1 13550 } else { -1 13551 this.head = p; -1 13552 p.data = str.slice(nb); -1 13553 } -1 13554 -1 13555 break; -1 13556 } -1 13557 -1 13558 ++c; -1 13559 } -1 13560 -1 13561 this.length -= c; -1 13562 return ret; -1 13563 } // Consumes a specified amount of bytes from the buffered data. -1 13564 -1 13565 }, { -1 13566 key: "_getBuffer", -1 13567 value: function _getBuffer(n) { -1 13568 var ret = Buffer.allocUnsafe(n); -1 13569 var p = this.head; -1 13570 var c = 1; -1 13571 p.data.copy(ret); -1 13572 n -= p.data.length; -1 13573 -1 13574 while (p = p.next) { -1 13575 var buf = p.data; -1 13576 var nb = n > buf.length ? buf.length : n; -1 13577 buf.copy(ret, ret.length - n, 0, nb); -1 13578 n -= nb; -1 13579 -1 13580 if (n === 0) { -1 13581 if (nb === buf.length) { -1 13582 ++c; -1 13583 if (p.next) this.head = p.next;else this.head = this.tail = null; -1 13584 } else { -1 13585 this.head = p; -1 13586 p.data = buf.slice(nb); -1 13587 } -1 13588 -1 13589 break; -1 13590 } -1 13591 -1 13592 ++c; -1 13593 } -1 13594 -1 13595 this.length -= c; -1 13596 return ret; -1 13597 } // Make sure the linked list only shows the minimal necessary information. -1 13598 -1 13599 }, { -1 13600 key: custom, -1 13601 value: function value(_, options) { -1 13602 return inspect(this, _objectSpread({}, options, { -1 13603 // Only inspect one level. -1 13604 depth: 0, -1 13605 // It should not recurse. -1 13606 customInspect: false -1 13607 })); -1 13608 } -1 13609 }]); -1 13610 -1 13611 return BufferList; -1 13612 }(); -1 13613 },{"buffer":63,"util":19}],55:[function(require,module,exports){ -1 13614 (function (process){(function (){ -1 13615 'use strict'; // undocumented cb() API, needed for core, not for public API -1 13616 -1 13617 function destroy(err, cb) { -1 13618 var _this = this; -1 13619 -1 13620 var readableDestroyed = this._readableState && this._readableState.destroyed; -1 13621 var writableDestroyed = this._writableState && this._writableState.destroyed; -1 13622 -1 13623 if (readableDestroyed || writableDestroyed) { -1 13624 if (cb) { -1 13625 cb(err); -1 13626 } else if (err) { -1 13627 if (!this._writableState) { -1 13628 process.nextTick(emitErrorNT, this, err); -1 13629 } else if (!this._writableState.errorEmitted) { -1 13630 this._writableState.errorEmitted = true; -1 13631 process.nextTick(emitErrorNT, this, err); -1 13632 } -1 13633 } -1 13634 -1 13635 return this; -1 13636 } // we set destroyed to true before firing error callbacks in order -1 13637 // to make it re-entrance safe in case destroy() is called within callbacks -1 13638 -1 13639 -1 13640 if (this._readableState) { -1 13641 this._readableState.destroyed = true; -1 13642 } // if this is a duplex stream mark the writable part as destroyed as well -1 13643 -1 13644 -1 13645 if (this._writableState) { -1 13646 this._writableState.destroyed = true; -1 13647 } -1 13648 -1 13649 this._destroy(err || null, function (err) { -1 13650 if (!cb && err) { -1 13651 if (!_this._writableState) { -1 13652 process.nextTick(emitErrorAndCloseNT, _this, err); -1 13653 } else if (!_this._writableState.errorEmitted) { -1 13654 _this._writableState.errorEmitted = true; -1 13655 process.nextTick(emitErrorAndCloseNT, _this, err); -1 13656 } else { -1 13657 process.nextTick(emitCloseNT, _this); -1 13658 } -1 13659 } else if (cb) { -1 13660 process.nextTick(emitCloseNT, _this); -1 13661 cb(err); -1 13662 } else { -1 13663 process.nextTick(emitCloseNT, _this); -1 13664 } -1 13665 }); -1 13666 -1 13667 return this; -1 13668 } -1 13669 -1 13670 function emitErrorAndCloseNT(self, err) { -1 13671 emitErrorNT(self, err); -1 13672 emitCloseNT(self); -1 13673 } -1 13674 -1 13675 function emitCloseNT(self) { -1 13676 if (self._writableState && !self._writableState.emitClose) return; -1 13677 if (self._readableState && !self._readableState.emitClose) return; -1 13678 self.emit('close'); -1 13679 } -1 13680 -1 13681 function undestroy() { -1 13682 if (this._readableState) { -1 13683 this._readableState.destroyed = false; -1 13684 this._readableState.reading = false; -1 13685 this._readableState.ended = false; -1 13686 this._readableState.endEmitted = false; -1 13687 } -1 13688 -1 13689 if (this._writableState) { -1 13690 this._writableState.destroyed = false; -1 13691 this._writableState.ended = false; -1 13692 this._writableState.ending = false; -1 13693 this._writableState.finalCalled = false; -1 13694 this._writableState.prefinished = false; -1 13695 this._writableState.finished = false; -1 13696 this._writableState.errorEmitted = false; -1 13697 } -1 13698 } -1 13699 -1 13700 function emitErrorNT(self, err) { -1 13701 self.emit('error', err); -1 13702 } -1 13703 -1 13704 function errorOrDestroy(stream, err) { -1 13705 // We have tests that rely on errors being emitted -1 13706 // in the same tick, so changing this is semver major. -1 13707 // For now when you opt-in to autoDestroy we allow -1 13708 // the error to be emitted nextTick. In a future -1 13709 // semver major update we should change the default to this. -1 13710 var rState = stream._readableState; -1 13711 var wState = stream._writableState; -1 13712 if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); -1 13713 } -1 13714 -1 13715 module.exports = { -1 13716 destroy: destroy, -1 13717 undestroy: undestroy, -1 13718 errorOrDestroy: errorOrDestroy -1 13719 }; -1 13720 }).call(this)}).call(this,require('_process')) -1 13721 },{"_process":149}],56:[function(require,module,exports){ -1 13722 // Ported from https://github.com/mafintosh/end-of-stream with -1 13723 // permission from the author, Mathias Buus (@mafintosh). -1 13724 'use strict'; -1 13725 -1 13726 var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE; -1 13727 -1 13728 function once(callback) { -1 13729 var called = false; -1 13730 return function () { -1 13731 if (called) return; -1 13732 called = true; -1 13733 -1 13734 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { -1 13735 args[_key] = arguments[_key]; -1 13736 } -1 13737 -1 13738 callback.apply(this, args); -1 13739 }; -1 13740 } -1 13741 -1 13742 function noop() {} -1 13743 -1 13744 function isRequest(stream) { -1 13745 return stream.setHeader && typeof stream.abort === 'function'; -1 13746 } -1 13747 -1 13748 function eos(stream, opts, callback) { -1 13749 if (typeof opts === 'function') return eos(stream, null, opts); -1 13750 if (!opts) opts = {}; -1 13751 callback = once(callback || noop); -1 13752 var readable = opts.readable || opts.readable !== false && stream.readable; -1 13753 var writable = opts.writable || opts.writable !== false && stream.writable; -1 13754 -1 13755 var onlegacyfinish = function onlegacyfinish() { -1 13756 if (!stream.writable) onfinish(); -1 13757 }; -1 13758 -1 13759 var writableEnded = stream._writableState && stream._writableState.finished; -1 13760 -1 13761 var onfinish = function onfinish() { -1 13762 writable = false; -1 13763 writableEnded = true; -1 13764 if (!readable) callback.call(stream); -1 13765 }; -1 13766 -1 13767 var readableEnded = stream._readableState && stream._readableState.endEmitted; -1 13768 -1 13769 var onend = function onend() { -1 13770 readable = false; -1 13771 readableEnded = true; -1 13772 if (!writable) callback.call(stream); -1 13773 }; -1 13774 -1 13775 var onerror = function onerror(err) { -1 13776 callback.call(stream, err); -1 13777 }; -1 13778 -1 13779 var onclose = function onclose() { -1 13780 var err; -1 13781 -1 13782 if (readable && !readableEnded) { -1 13783 if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); -1 13784 return callback.call(stream, err); -1 13785 } -1 13786 -1 13787 if (writable && !writableEnded) { -1 13788 if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); -1 13789 return callback.call(stream, err); -1 13790 } -1 13791 }; -1 13792 -1 13793 var onrequest = function onrequest() { -1 13794 stream.req.on('finish', onfinish); -1 13795 }; -1 13796 -1 13797 if (isRequest(stream)) { -1 13798 stream.on('complete', onfinish); -1 13799 stream.on('abort', onclose); -1 13800 if (stream.req) onrequest();else stream.on('request', onrequest); -1 13801 } else if (writable && !stream._writableState) { -1 13802 // legacy streams -1 13803 stream.on('end', onlegacyfinish); -1 13804 stream.on('close', onlegacyfinish); -1 13805 } -1 13806 -1 13807 stream.on('end', onend); -1 13808 stream.on('finish', onfinish); -1 13809 if (opts.error !== false) stream.on('error', onerror); -1 13810 stream.on('close', onclose); -1 13811 return function () { -1 13812 stream.removeListener('complete', onfinish); -1 13813 stream.removeListener('abort', onclose); -1 13814 stream.removeListener('request', onrequest); -1 13815 if (stream.req) stream.req.removeListener('finish', onfinish); -1 13816 stream.removeListener('end', onlegacyfinish); -1 13817 stream.removeListener('close', onlegacyfinish); -1 13818 stream.removeListener('finish', onfinish); -1 13819 stream.removeListener('end', onend); -1 13820 stream.removeListener('error', onerror); -1 13821 stream.removeListener('close', onclose); -1 13822 }; -1 13823 } -1 13824 -1 13825 module.exports = eos; -1 13826 },{"../../../errors":47}],57:[function(require,module,exports){ -1 13827 module.exports = function () { -1 13828 throw new Error('Readable.from is not available in the browser') -1 13829 }; -1 13830 -1 13831 },{}],58:[function(require,module,exports){ -1 13832 // Ported from https://github.com/mafintosh/pump with -1 13833 // permission from the author, Mathias Buus (@mafintosh). -1 13834 'use strict'; -1 13835 -1 13836 var eos; -1 13837 -1 13838 function once(callback) { -1 13839 var called = false; -1 13840 return function () { -1 13841 if (called) return; -1 13842 called = true; -1 13843 callback.apply(void 0, arguments); -1 13844 }; -1 13845 } -1 13846 -1 13847 var _require$codes = require('../../../errors').codes, -1 13848 ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, -1 13849 ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; -1 13850 -1 13851 function noop(err) { -1 13852 // Rethrow the error if it exists to avoid swallowing it -1 13853 if (err) throw err; -1 13854 } -1 13855 -1 13856 function isRequest(stream) { -1 13857 return stream.setHeader && typeof stream.abort === 'function'; -1 13858 } -1 13859 -1 13860 function destroyer(stream, reading, writing, callback) { -1 13861 callback = once(callback); -1 13862 var closed = false; -1 13863 stream.on('close', function () { -1 13864 closed = true; -1 13865 }); -1 13866 if (eos === undefined) eos = require('./end-of-stream'); -1 13867 eos(stream, { -1 13868 readable: reading, -1 13869 writable: writing -1 13870 }, function (err) { -1 13871 if (err) return callback(err); -1 13872 closed = true; -1 13873 callback(); -1 13874 }); -1 13875 var destroyed = false; -1 13876 return function (err) { -1 13877 if (closed) return; -1 13878 if (destroyed) return; -1 13879 destroyed = true; // request.destroy just do .end - .abort is what we want -1 13880 -1 13881 if (isRequest(stream)) return stream.abort(); -1 13882 if (typeof stream.destroy === 'function') return stream.destroy(); -1 13883 callback(err || new ERR_STREAM_DESTROYED('pipe')); -1 13884 }; -1 13885 } -1 13886 -1 13887 function call(fn) { -1 13888 fn(); -1 13889 } -1 13890 -1 13891 function pipe(from, to) { -1 13892 return from.pipe(to); -1 13893 } -1 13894 -1 13895 function popCallback(streams) { -1 13896 if (!streams.length) return noop; -1 13897 if (typeof streams[streams.length - 1] !== 'function') return noop; -1 13898 return streams.pop(); -1 13899 } -1 13900 -1 13901 function pipeline() { -1 13902 for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { -1 13903 streams[_key] = arguments[_key]; -1 13904 } -1 13905 -1 13906 var callback = popCallback(streams); -1 13907 if (Array.isArray(streams[0])) streams = streams[0]; -1 13908 -1 13909 if (streams.length < 2) { -1 13910 throw new ERR_MISSING_ARGS('streams'); -1 13911 } -1 13912 -1 13913 var error; -1 13914 var destroys = streams.map(function (stream, i) { -1 13915 var reading = i < streams.length - 1; -1 13916 var writing = i > 0; -1 13917 return destroyer(stream, reading, writing, function (err) { -1 13918 if (!error) error = err; -1 13919 if (err) destroys.forEach(call); -1 13920 if (reading) return; -1 13921 destroys.forEach(call); -1 13922 callback(error); -1 13923 }); -1 13924 }); -1 13925 return streams.reduce(pipe); -1 13926 } -1 13927 -1 13928 module.exports = pipeline; -1 13929 },{"../../../errors":47,"./end-of-stream":56}],59:[function(require,module,exports){ -1 13930 'use strict'; -1 13931 -1 13932 var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE; -1 13933 -1 13934 function highWaterMarkFrom(options, isDuplex, duplexKey) { -1 13935 return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; -1 13936 } -1 13937 -1 13938 function getHighWaterMark(state, options, duplexKey, isDuplex) { -1 13939 var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); -1 13940 -1 13941 if (hwm != null) { -1 13942 if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { -1 13943 var name = isDuplex ? duplexKey : 'highWaterMark'; -1 13944 throw new ERR_INVALID_OPT_VALUE(name, hwm); -1 13945 } -1 13946 -1 13947 return Math.floor(hwm); -1 13948 } // Default value -1 13949 -1 13950 -1 13951 return state.objectMode ? 16 : 16 * 1024; -1 13952 } -1 13953 -1 13954 module.exports = { -1 13955 getHighWaterMark: getHighWaterMark -1 13956 }; -1 13957 },{"../../../errors":47}],60:[function(require,module,exports){ -1 13958 module.exports = require('events').EventEmitter; -1 13959 -1 13960 },{"events":100}],61:[function(require,module,exports){ -1 13961 exports = module.exports = require('./lib/_stream_readable.js'); -1 13962 exports.Stream = exports; -1 13963 exports.Readable = exports; -1 13964 exports.Writable = require('./lib/_stream_writable.js'); -1 13965 exports.Duplex = require('./lib/_stream_duplex.js'); -1 13966 exports.Transform = require('./lib/_stream_transform.js'); -1 13967 exports.PassThrough = require('./lib/_stream_passthrough.js'); -1 13968 exports.finished = require('./lib/internal/streams/end-of-stream.js'); -1 13969 exports.pipeline = require('./lib/internal/streams/pipeline.js'); -1 13970 -1 13971 },{"./lib/_stream_duplex.js":48,"./lib/_stream_passthrough.js":49,"./lib/_stream_readable.js":50,"./lib/_stream_transform.js":51,"./lib/_stream_writable.js":52,"./lib/internal/streams/end-of-stream.js":56,"./lib/internal/streams/pipeline.js":58}],62:[function(require,module,exports){ -1 13972 (function (Buffer){(function (){ -1 13973 module.exports = function xor (a, b) { -1 13974 var length = Math.min(a.length, b.length) -1 13975 var buffer = new Buffer(length) -1 13976 -1 13977 for (var i = 0; i < length; ++i) { -1 13978 buffer[i] = a[i] ^ b[i] -1 13979 } -1 13980 -1 13981 return buffer -1 13982 } -1 13983 -1 13984 }).call(this)}).call(this,require("buffer").Buffer) -1 13985 },{"buffer":63}],63:[function(require,module,exports){ -1 13986 (function (Buffer){(function (){ -1 13987 /*! -1 13988 * The buffer module from node.js, for the browser. -1 13989 * -1 13990 * @author Feross Aboukhadijeh <https://feross.org> -1 13991 * @license MIT -1 13992 */ -1 13993 /* eslint-disable no-proto */ -1 13994 -1 13995 'use strict' -1 13996 -1 13997 var base64 = require('base64-js') -1 13998 var ieee754 = require('ieee754') -1 13999 -1 14000 exports.Buffer = Buffer -1 14001 exports.SlowBuffer = SlowBuffer -1 14002 exports.INSPECT_MAX_BYTES = 50 -1 14003 -1 14004 var K_MAX_LENGTH = 0x7fffffff -1 14005 exports.kMaxLength = K_MAX_LENGTH -1 14006 -1 14007 /** -1 14008 * If `Buffer.TYPED_ARRAY_SUPPORT`: -1 14009 * === true Use Uint8Array implementation (fastest) -1 14010 * === false Print warning and recommend using `buffer` v4.x which has an Object -1 14011 * implementation (most compatible, even IE6) -1 14012 * -1 14013 * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, -1 14014 * Opera 11.6+, iOS 4.2+. -1 14015 * -1 14016 * We report that the browser does not support typed arrays if the are not subclassable -1 14017 * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` -1 14018 * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support -1 14019 * for __proto__ and has a buggy typed array implementation. -1 14020 */ -1 14021 Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() -1 14022 -1 14023 if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && -1 14024 typeof console.error === 'function') { -1 14025 console.error( -1 14026 'This browser lacks typed array (Uint8Array) support which is required by ' + -1 14027 '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' -1 14028 ) -1 14029 } -1 14030 -1 14031 function typedArraySupport () { -1 14032 // Can typed array instances can be augmented? -1 14033 try { -1 14034 var arr = new Uint8Array(1) -1 14035 arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } -1 14036 return arr.foo() === 42 -1 14037 } catch (e) { -1 14038 return false -1 14039 } -1 14040 } -1 14041 -1 14042 Object.defineProperty(Buffer.prototype, 'parent', { -1 14043 enumerable: true, -1 14044 get: function () { -1 14045 if (!Buffer.isBuffer(this)) return undefined -1 14046 return this.buffer -1 14047 } -1 14048 }) -1 14049 -1 14050 Object.defineProperty(Buffer.prototype, 'offset', { -1 14051 enumerable: true, -1 14052 get: function () { -1 14053 if (!Buffer.isBuffer(this)) return undefined -1 14054 return this.byteOffset -1 14055 } -1 14056 }) -1 14057 -1 14058 function createBuffer (length) { -1 14059 if (length > K_MAX_LENGTH) { -1 14060 throw new RangeError('The value "' + length + '" is invalid for option "size"') -1 14061 } -1 14062 // Return an augmented `Uint8Array` instance -1 14063 var buf = new Uint8Array(length) -1 14064 buf.__proto__ = Buffer.prototype -1 14065 return buf -1 14066 } -1 14067 -1 14068 /** -1 14069 * The Buffer constructor returns instances of `Uint8Array` that have their -1 14070 * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of -1 14071 * `Uint8Array`, so the returned instances will have all the node `Buffer` methods -1 14072 * and the `Uint8Array` methods. Square bracket notation works as expected -- it -1 14073 * returns a single octet. -1 14074 * -1 14075 * The `Uint8Array` prototype remains unmodified. -1 14076 */ -1 14077 -1 14078 function Buffer (arg, encodingOrOffset, length) { -1 14079 // Common case. -1 14080 if (typeof arg === 'number') { -1 14081 if (typeof encodingOrOffset === 'string') { -1 14082 throw new TypeError( -1 14083 'The "string" argument must be of type string. Received type number' -1 14084 ) -1 14085 } -1 14086 return allocUnsafe(arg) -1 14087 } -1 14088 return from(arg, encodingOrOffset, length) -1 14089 } -1 14090 -1 14091 // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 -1 14092 if (typeof Symbol !== 'undefined' && Symbol.species != null && -1 14093 Buffer[Symbol.species] === Buffer) { -1 14094 Object.defineProperty(Buffer, Symbol.species, { -1 14095 value: null, -1 14096 configurable: true, -1 14097 enumerable: false, -1 14098 writable: false -1 14099 }) -1 14100 } -1 14101 -1 14102 Buffer.poolSize = 8192 // not used by this implementation -1 14103 -1 14104 function from (value, encodingOrOffset, length) { -1 14105 if (typeof value === 'string') { -1 14106 return fromString(value, encodingOrOffset) -1 14107 } -1 14108 -1 14109 if (ArrayBuffer.isView(value)) { -1 14110 return fromArrayLike(value) -1 14111 } -1 14112 -1 14113 if (value == null) { -1 14114 throw TypeError( -1 14115 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + -1 14116 'or Array-like Object. Received type ' + (typeof value) -1 14117 ) -1 14118 } -1 14119 -1 14120 if (isInstance(value, ArrayBuffer) || -1 14121 (value && isInstance(value.buffer, ArrayBuffer))) { -1 14122 return fromArrayBuffer(value, encodingOrOffset, length) -1 14123 } -1 14124 -1 14125 if (typeof value === 'number') { -1 14126 throw new TypeError( -1 14127 'The "value" argument must not be of type number. Received type number' -1 14128 ) -1 14129 } -1 14130 -1 14131 var valueOf = value.valueOf && value.valueOf() -1 14132 if (valueOf != null && valueOf !== value) { -1 14133 return Buffer.from(valueOf, encodingOrOffset, length) -1 14134 } -1 14135 -1 14136 var b = fromObject(value) -1 14137 if (b) return b -1 14138 -1 14139 if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && -1 14140 typeof value[Symbol.toPrimitive] === 'function') { -1 14141 return Buffer.from( -1 14142 value[Symbol.toPrimitive]('string'), encodingOrOffset, length -1 14143 ) -1 14144 } -1 14145 -1 14146 throw new TypeError( -1 14147 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + -1 14148 'or Array-like Object. Received type ' + (typeof value) -1 14149 ) -1 14150 } -1 14151 -1 14152 /** -1 14153 * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError -1 14154 * if value is a number. -1 14155 * Buffer.from(str[, encoding]) -1 14156 * Buffer.from(array) -1 14157 * Buffer.from(buffer) -1 14158 * Buffer.from(arrayBuffer[, byteOffset[, length]]) -1 14159 **/ -1 14160 Buffer.from = function (value, encodingOrOffset, length) { -1 14161 return from(value, encodingOrOffset, length) -1 14162 } -1 14163 -1 14164 // Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: -1 14165 // https://github.com/feross/buffer/pull/148 -1 14166 Buffer.prototype.__proto__ = Uint8Array.prototype -1 14167 Buffer.__proto__ = Uint8Array -1 14168 -1 14169 function assertSize (size) { -1 14170 if (typeof size !== 'number') { -1 14171 throw new TypeError('"size" argument must be of type number') -1 14172 } else if (size < 0) { -1 14173 throw new RangeError('The value "' + size + '" is invalid for option "size"') -1 14174 } -1 14175 } -1 14176 -1 14177 function alloc (size, fill, encoding) { -1 14178 assertSize(size) -1 14179 if (size <= 0) { -1 14180 return createBuffer(size) -1 14181 } -1 14182 if (fill !== undefined) { -1 14183 // Only pay attention to encoding if it's a string. This -1 14184 // prevents accidentally sending in a number that would -1 14185 // be interpretted as a start offset. -1 14186 return typeof encoding === 'string' -1 14187 ? createBuffer(size).fill(fill, encoding) -1 14188 : createBuffer(size).fill(fill) -1 14189 } -1 14190 return createBuffer(size) -1 14191 } -1 14192 -1 14193 /** -1 14194 * Creates a new filled Buffer instance. -1 14195 * alloc(size[, fill[, encoding]]) -1 14196 **/ -1 14197 Buffer.alloc = function (size, fill, encoding) { -1 14198 return alloc(size, fill, encoding) -1 14199 } -1 14200 -1 14201 function allocUnsafe (size) { -1 14202 assertSize(size) -1 14203 return createBuffer(size < 0 ? 0 : checked(size) | 0) -1 14204 } -1 14205 -1 14206 /** -1 14207 * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. -1 14208 * */ -1 14209 Buffer.allocUnsafe = function (size) { -1 14210 return allocUnsafe(size) -1 14211 } -1 14212 /** -1 14213 * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. -1 14214 */ -1 14215 Buffer.allocUnsafeSlow = function (size) { -1 14216 return allocUnsafe(size) -1 14217 } -1 14218 -1 14219 function fromString (string, encoding) { -1 14220 if (typeof encoding !== 'string' || encoding === '') { -1 14221 encoding = 'utf8' -1 14222 } -1 14223 -1 14224 if (!Buffer.isEncoding(encoding)) { -1 14225 throw new TypeError('Unknown encoding: ' + encoding) -1 14226 } -1 14227 -1 14228 var length = byteLength(string, encoding) | 0 -1 14229 var buf = createBuffer(length) -1 14230 -1 14231 var actual = buf.write(string, encoding) -1 14232 -1 14233 if (actual !== length) { -1 14234 // Writing a hex string, for example, that contains invalid characters will -1 14235 // cause everything after the first invalid character to be ignored. (e.g. -1 14236 // 'abxxcd' will be treated as 'ab') -1 14237 buf = buf.slice(0, actual) -1 14238 } -1 14239 -1 14240 return buf -1 14241 } -1 14242 -1 14243 function fromArrayLike (array) { -1 14244 var length = array.length < 0 ? 0 : checked(array.length) | 0 -1 14245 var buf = createBuffer(length) -1 14246 for (var i = 0; i < length; i += 1) { -1 14247 buf[i] = array[i] & 255 -1 14248 } -1 14249 return buf -1 14250 } -1 14251 -1 14252 function fromArrayBuffer (array, byteOffset, length) { -1 14253 if (byteOffset < 0 || array.byteLength < byteOffset) { -1 14254 throw new RangeError('"offset" is outside of buffer bounds') -1 14255 } -1 14256 -1 14257 if (array.byteLength < byteOffset + (length || 0)) { -1 14258 throw new RangeError('"length" is outside of buffer bounds') -1 14259 } -1 14260 -1 14261 var buf -1 14262 if (byteOffset === undefined && length === undefined) { -1 14263 buf = new Uint8Array(array) -1 14264 } else if (length === undefined) { -1 14265 buf = new Uint8Array(array, byteOffset) -1 14266 } else { -1 14267 buf = new Uint8Array(array, byteOffset, length) -1 14268 } -1 14269 -1 14270 // Return an augmented `Uint8Array` instance -1 14271 buf.__proto__ = Buffer.prototype -1 14272 return buf -1 14273 } -1 14274 -1 14275 function fromObject (obj) { -1 14276 if (Buffer.isBuffer(obj)) { -1 14277 var len = checked(obj.length) | 0 -1 14278 var buf = createBuffer(len) -1 14279 -1 14280 if (buf.length === 0) { -1 14281 return buf -1 14282 } -1 14283 -1 14284 obj.copy(buf, 0, 0, len) -1 14285 return buf -1 14286 } -1 14287 -1 14288 if (obj.length !== undefined) { -1 14289 if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { -1 14290 return createBuffer(0) -1 14291 } -1 14292 return fromArrayLike(obj) -1 14293 } -1 14294 -1 14295 if (obj.type === 'Buffer' && Array.isArray(obj.data)) { -1 14296 return fromArrayLike(obj.data) -1 14297 } -1 14298 } -1 14299 -1 14300 function checked (length) { -1 14301 // Note: cannot use `length < K_MAX_LENGTH` here because that fails when -1 14302 // length is NaN (which is otherwise coerced to zero.) -1 14303 if (length >= K_MAX_LENGTH) { -1 14304 throw new RangeError('Attempt to allocate Buffer larger than maximum ' + -1 14305 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') -1 14306 } -1 14307 return length | 0 -1 14308 } -1 14309 -1 14310 function SlowBuffer (length) { -1 14311 if (+length != length) { // eslint-disable-line eqeqeq -1 14312 length = 0 -1 14313 } -1 14314 return Buffer.alloc(+length) -1 14315 } -1 14316 -1 14317 Buffer.isBuffer = function isBuffer (b) { -1 14318 return b != null && b._isBuffer === true && -1 14319 b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false -1 14320 } -1 14321 -1 14322 Buffer.compare = function compare (a, b) { -1 14323 if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) -1 14324 if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) -1 14325 if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { -1 14326 throw new TypeError( -1 14327 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' -1 14328 ) -1 14329 } -1 14330 -1 14331 if (a === b) return 0 -1 14332 -1 14333 var x = a.length -1 14334 var y = b.length -1 14335 -1 14336 for (var i = 0, len = Math.min(x, y); i < len; ++i) { -1 14337 if (a[i] !== b[i]) { -1 14338 x = a[i] -1 14339 y = b[i] -1 14340 break -1 14341 } -1 14342 } -1 14343 -1 14344 if (x < y) return -1 -1 14345 if (y < x) return 1 -1 14346 return 0 -1 14347 } -1 14348 -1 14349 Buffer.isEncoding = function isEncoding (encoding) { -1 14350 switch (String(encoding).toLowerCase()) { -1 14351 case 'hex': -1 14352 case 'utf8': -1 14353 case 'utf-8': -1 14354 case 'ascii': -1 14355 case 'latin1': -1 14356 case 'binary': -1 14357 case 'base64': -1 14358 case 'ucs2': -1 14359 case 'ucs-2': -1 14360 case 'utf16le': -1 14361 case 'utf-16le': -1 14362 return true -1 14363 default: -1 14364 return false -1 14365 } -1 14366 } -1 14367 -1 14368 Buffer.concat = function concat (list, length) { -1 14369 if (!Array.isArray(list)) { -1 14370 throw new TypeError('"list" argument must be an Array of Buffers') -1 14371 } -1 14372 -1 14373 if (list.length === 0) { -1 14374 return Buffer.alloc(0) -1 14375 } -1 14376 -1 14377 var i -1 14378 if (length === undefined) { -1 14379 length = 0 -1 14380 for (i = 0; i < list.length; ++i) { -1 14381 length += list[i].length -1 14382 } -1 14383 } -1 14384 -1 14385 var buffer = Buffer.allocUnsafe(length) -1 14386 var pos = 0 -1 14387 for (i = 0; i < list.length; ++i) { -1 14388 var buf = list[i] -1 14389 if (isInstance(buf, Uint8Array)) { -1 14390 buf = Buffer.from(buf) -1 14391 } -1 14392 if (!Buffer.isBuffer(buf)) { -1 14393 throw new TypeError('"list" argument must be an Array of Buffers') -1 14394 } -1 14395 buf.copy(buffer, pos) -1 14396 pos += buf.length -1 14397 } -1 14398 return buffer -1 14399 } -1 14400 -1 14401 function byteLength (string, encoding) { -1 14402 if (Buffer.isBuffer(string)) { -1 14403 return string.length -1 14404 } -1 14405 if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { -1 14406 return string.byteLength -1 14407 } -1 14408 if (typeof string !== 'string') { -1 14409 throw new TypeError( -1 14410 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + -1 14411 'Received type ' + typeof string -1 14412 ) -1 14413 } -1 14414 -1 14415 var len = string.length -1 14416 var mustMatch = (arguments.length > 2 && arguments[2] === true) -1 14417 if (!mustMatch && len === 0) return 0 -1 14418 -1 14419 // Use a for loop to avoid recursion -1 14420 var loweredCase = false -1 14421 for (;;) { -1 14422 switch (encoding) { -1 14423 case 'ascii': -1 14424 case 'latin1': -1 14425 case 'binary': -1 14426 return len -1 14427 case 'utf8': -1 14428 case 'utf-8': -1 14429 return utf8ToBytes(string).length -1 14430 case 'ucs2': -1 14431 case 'ucs-2': -1 14432 case 'utf16le': -1 14433 case 'utf-16le': -1 14434 return len * 2 -1 14435 case 'hex': -1 14436 return len >>> 1 -1 14437 case 'base64': -1 14438 return base64ToBytes(string).length -1 14439 default: -1 14440 if (loweredCase) { -1 14441 return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 -1 14442 } -1 14443 encoding = ('' + encoding).toLowerCase() -1 14444 loweredCase = true -1 14445 } -1 14446 } -1 14447 } -1 14448 Buffer.byteLength = byteLength -1 14449 -1 14450 function slowToString (encoding, start, end) { -1 14451 var loweredCase = false -1 14452 -1 14453 // No need to verify that "this.length <= MAX_UINT32" since it's a read-only -1 14454 // property of a typed array. -1 14455 -1 14456 // This behaves neither like String nor Uint8Array in that we set start/end -1 14457 // to their upper/lower bounds if the value passed is out of range. -1 14458 // undefined is handled specially as per ECMA-262 6th Edition, -1 14459 // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. -1 14460 if (start === undefined || start < 0) { -1 14461 start = 0 -1 14462 } -1 14463 // Return early if start > this.length. Done here to prevent potential uint32 -1 14464 // coercion fail below. -1 14465 if (start > this.length) { -1 14466 return '' -1 14467 } -1 14468 -1 14469 if (end === undefined || end > this.length) { -1 14470 end = this.length -1 14471 } -1 14472 -1 14473 if (end <= 0) { -1 14474 return '' -1 14475 } -1 14476 -1 14477 // Force coersion to uint32. This will also coerce falsey/NaN values to 0. -1 14478 end >>>= 0 -1 14479 start >>>= 0 -1 14480 -1 14481 if (end <= start) { -1 14482 return '' -1 14483 } -1 14484 -1 14485 if (!encoding) encoding = 'utf8' -1 14486 -1 14487 while (true) { -1 14488 switch (encoding) { -1 14489 case 'hex': -1 14490 return hexSlice(this, start, end) -1 14491 -1 14492 case 'utf8': -1 14493 case 'utf-8': -1 14494 return utf8Slice(this, start, end) -1 14495 -1 14496 case 'ascii': -1 14497 return asciiSlice(this, start, end) -1 14498 -1 14499 case 'latin1': -1 14500 case 'binary': -1 14501 return latin1Slice(this, start, end) -1 14502 -1 14503 case 'base64': -1 14504 return base64Slice(this, start, end) -1 14505 -1 14506 case 'ucs2': -1 14507 case 'ucs-2': -1 14508 case 'utf16le': -1 14509 case 'utf-16le': -1 14510 return utf16leSlice(this, start, end) -1 14511 -1 14512 default: -1 14513 if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) -1 14514 encoding = (encoding + '').toLowerCase() -1 14515 loweredCase = true -1 14516 } -1 14517 } -1 14518 } -1 14519 -1 14520 // This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) -1 14521 // to detect a Buffer instance. It's not possible to use `instanceof Buffer` -1 14522 // reliably in a browserify context because there could be multiple different -1 14523 // copies of the 'buffer' package in use. This method works even for Buffer -1 14524 // instances that were created from another copy of the `buffer` package. -1 14525 // See: https://github.com/feross/buffer/issues/154 -1 14526 Buffer.prototype._isBuffer = true -1 14527 -1 14528 function swap (b, n, m) { -1 14529 var i = b[n] -1 14530 b[n] = b[m] -1 14531 b[m] = i -1 14532 } -1 14533 -1 14534 Buffer.prototype.swap16 = function swap16 () { -1 14535 var len = this.length -1 14536 if (len % 2 !== 0) { -1 14537 throw new RangeError('Buffer size must be a multiple of 16-bits') -1 14538 } -1 14539 for (var i = 0; i < len; i += 2) { -1 14540 swap(this, i, i + 1) -1 14541 } -1 14542 return this -1 14543 } -1 14544 -1 14545 Buffer.prototype.swap32 = function swap32 () { -1 14546 var len = this.length -1 14547 if (len % 4 !== 0) { -1 14548 throw new RangeError('Buffer size must be a multiple of 32-bits') -1 14549 } -1 14550 for (var i = 0; i < len; i += 4) { -1 14551 swap(this, i, i + 3) -1 14552 swap(this, i + 1, i + 2) -1 14553 } -1 14554 return this -1 14555 } -1 14556 -1 14557 Buffer.prototype.swap64 = function swap64 () { -1 14558 var len = this.length -1 14559 if (len % 8 !== 0) { -1 14560 throw new RangeError('Buffer size must be a multiple of 64-bits') -1 14561 } -1 14562 for (var i = 0; i < len; i += 8) { -1 14563 swap(this, i, i + 7) -1 14564 swap(this, i + 1, i + 6) -1 14565 swap(this, i + 2, i + 5) -1 14566 swap(this, i + 3, i + 4) -1 14567 } -1 14568 return this -1 14569 } -1 14570 -1 14571 Buffer.prototype.toString = function toString () { -1 14572 var length = this.length -1 14573 if (length === 0) return '' -1 14574 if (arguments.length === 0) return utf8Slice(this, 0, length) -1 14575 return slowToString.apply(this, arguments) -1 14576 } -1 14577 -1 14578 Buffer.prototype.toLocaleString = Buffer.prototype.toString -1 14579 -1 14580 Buffer.prototype.equals = function equals (b) { -1 14581 if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') -1 14582 if (this === b) return true -1 14583 return Buffer.compare(this, b) === 0 -1 14584 } -1 14585 -1 14586 Buffer.prototype.inspect = function inspect () { -1 14587 var str = '' -1 14588 var max = exports.INSPECT_MAX_BYTES -1 14589 str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() -1 14590 if (this.length > max) str += ' ... ' -1 14591 return '<Buffer ' + str + '>' -1 14592 } -1 14593 -1 14594 Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { -1 14595 if (isInstance(target, Uint8Array)) { -1 14596 target = Buffer.from(target, target.offset, target.byteLength) -1 14597 } -1 14598 if (!Buffer.isBuffer(target)) { -1 14599 throw new TypeError( -1 14600 'The "target" argument must be one of type Buffer or Uint8Array. ' + -1 14601 'Received type ' + (typeof target) -1 14602 ) -1 14603 } -1 14604 -1 14605 if (start === undefined) { -1 14606 start = 0 -1 14607 } -1 14608 if (end === undefined) { -1 14609 end = target ? target.length : 0 -1 14610 } -1 14611 if (thisStart === undefined) { -1 14612 thisStart = 0 -1 14613 } -1 14614 if (thisEnd === undefined) { -1 14615 thisEnd = this.length -1 14616 } -1 14617 -1 14618 if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { -1 14619 throw new RangeError('out of range index') -1 14620 } -1 14621 -1 14622 if (thisStart >= thisEnd && start >= end) { -1 14623 return 0 -1 14624 } -1 14625 if (thisStart >= thisEnd) { -1 14626 return -1 -1 14627 } -1 14628 if (start >= end) { -1 14629 return 1 -1 14630 } -1 14631 -1 14632 start >>>= 0 -1 14633 end >>>= 0 -1 14634 thisStart >>>= 0 -1 14635 thisEnd >>>= 0 -1 14636 -1 14637 if (this === target) return 0 -1 14638 -1 14639 var x = thisEnd - thisStart -1 14640 var y = end - start -1 14641 var len = Math.min(x, y) -1 14642 -1 14643 var thisCopy = this.slice(thisStart, thisEnd) -1 14644 var targetCopy = target.slice(start, end) -1 14645 -1 14646 for (var i = 0; i < len; ++i) { -1 14647 if (thisCopy[i] !== targetCopy[i]) { -1 14648 x = thisCopy[i] -1 14649 y = targetCopy[i] -1 14650 break -1 14651 } -1 14652 } -1 14653 -1 14654 if (x < y) return -1 -1 14655 if (y < x) return 1 -1 14656 return 0 -1 14657 } -1 14658 -1 14659 // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -1 14660 // OR the last index of `val` in `buffer` at offset <= `byteOffset`. -1 14661 // -1 14662 // Arguments: -1 14663 // - buffer - a Buffer to search -1 14664 // - val - a string, Buffer, or number -1 14665 // - byteOffset - an index into `buffer`; will be clamped to an int32 -1 14666 // - encoding - an optional encoding, relevant is val is a string -1 14667 // - dir - true for indexOf, false for lastIndexOf -1 14668 function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { -1 14669 // Empty buffer means no match -1 14670 if (buffer.length === 0) return -1 -1 14671 -1 14672 // Normalize byteOffset -1 14673 if (typeof byteOffset === 'string') { -1 14674 encoding = byteOffset -1 14675 byteOffset = 0 -1 14676 } else if (byteOffset > 0x7fffffff) { -1 14677 byteOffset = 0x7fffffff -1 14678 } else if (byteOffset < -0x80000000) { -1 14679 byteOffset = -0x80000000 -1 14680 } -1 14681 byteOffset = +byteOffset // Coerce to Number. -1 14682 if (numberIsNaN(byteOffset)) { -1 14683 // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer -1 14684 byteOffset = dir ? 0 : (buffer.length - 1) -1 14685 } -1 14686 -1 14687 // Normalize byteOffset: negative offsets start from the end of the buffer -1 14688 if (byteOffset < 0) byteOffset = buffer.length + byteOffset -1 14689 if (byteOffset >= buffer.length) { -1 14690 if (dir) return -1 -1 14691 else byteOffset = buffer.length - 1 -1 14692 } else if (byteOffset < 0) { -1 14693 if (dir) byteOffset = 0 -1 14694 else return -1 -1 14695 } -1 14696 -1 14697 // Normalize val -1 14698 if (typeof val === 'string') { -1 14699 val = Buffer.from(val, encoding) -1 14700 } -1 14701 -1 14702 // Finally, search either indexOf (if dir is true) or lastIndexOf -1 14703 if (Buffer.isBuffer(val)) { -1 14704 // Special case: looking for empty string/buffer always fails -1 14705 if (val.length === 0) { -1 14706 return -1 -1 14707 } -1 14708 return arrayIndexOf(buffer, val, byteOffset, encoding, dir) -1 14709 } else if (typeof val === 'number') { -1 14710 val = val & 0xFF // Search for a byte value [0-255] -1 14711 if (typeof Uint8Array.prototype.indexOf === 'function') { -1 14712 if (dir) { -1 14713 return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) -1 14714 } else { -1 14715 return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) -1 14716 } -1 14717 } -1 14718 return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) -1 14719 } -1 14720 -1 14721 throw new TypeError('val must be string, number or Buffer') -1 14722 } -1 14723 -1 14724 function arrayIndexOf (arr, val, byteOffset, encoding, dir) { -1 14725 var indexSize = 1 -1 14726 var arrLength = arr.length -1 14727 var valLength = val.length -1 14728 -1 14729 if (encoding !== undefined) { -1 14730 encoding = String(encoding).toLowerCase() -1 14731 if (encoding === 'ucs2' || encoding === 'ucs-2' || -1 14732 encoding === 'utf16le' || encoding === 'utf-16le') { -1 14733 if (arr.length < 2 || val.length < 2) { -1 14734 return -1 -1 14735 } -1 14736 indexSize = 2 -1 14737 arrLength /= 2 -1 14738 valLength /= 2 -1 14739 byteOffset /= 2 -1 14740 } -1 14741 } -1 14742 -1 14743 function read (buf, i) { -1 14744 if (indexSize === 1) { -1 14745 return buf[i] -1 14746 } else { -1 14747 return buf.readUInt16BE(i * indexSize) -1 14748 } -1 14749 } -1 14750 -1 14751 var i -1 14752 if (dir) { -1 14753 var foundIndex = -1 -1 14754 for (i = byteOffset; i < arrLength; i++) { -1 14755 if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { -1 14756 if (foundIndex === -1) foundIndex = i -1 14757 if (i - foundIndex + 1 === valLength) return foundIndex * indexSize -1 14758 } else { -1 14759 if (foundIndex !== -1) i -= i - foundIndex -1 14760 foundIndex = -1 -1 14761 } -1 14762 } -1 14763 } else { -1 14764 if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength -1 14765 for (i = byteOffset; i >= 0; i--) { -1 14766 var found = true -1 14767 for (var j = 0; j < valLength; j++) { -1 14768 if (read(arr, i + j) !== read(val, j)) { -1 14769 found = false -1 14770 break -1 14771 } -1 14772 } -1 14773 if (found) return i -1 14774 } -1 14775 } -1 14776 -1 14777 return -1 -1 14778 } -1 14779 -1 14780 Buffer.prototype.includes = function includes (val, byteOffset, encoding) { -1 14781 return this.indexOf(val, byteOffset, encoding) !== -1 -1 14782 } -1 14783 -1 14784 Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { -1 14785 return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -1 14786 } -1 14787 -1 14788 Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { -1 14789 return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -1 14790 } -1 14791 -1 14792 function hexWrite (buf, string, offset, length) { -1 14793 offset = Number(offset) || 0 -1 14794 var remaining = buf.length - offset -1 14795 if (!length) { -1 14796 length = remaining -1 14797 } else { -1 14798 length = Number(length) -1 14799 if (length > remaining) { -1 14800 length = remaining -1 14801 } -1 14802 } -1 14803 -1 14804 var strLen = string.length -1 14805 -1 14806 if (length > strLen / 2) { -1 14807 length = strLen / 2 -1 14808 } -1 14809 for (var i = 0; i < length; ++i) { -1 14810 var parsed = parseInt(string.substr(i * 2, 2), 16) -1 14811 if (numberIsNaN(parsed)) return i -1 14812 buf[offset + i] = parsed -1 14813 } -1 14814 return i -1 14815 } -1 14816 -1 14817 function utf8Write (buf, string, offset, length) { -1 14818 return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -1 14819 } -1 14820 -1 14821 function asciiWrite (buf, string, offset, length) { -1 14822 return blitBuffer(asciiToBytes(string), buf, offset, length) -1 14823 } -1 14824 -1 14825 function latin1Write (buf, string, offset, length) { -1 14826 return asciiWrite(buf, string, offset, length) -1 14827 } -1 14828 -1 14829 function base64Write (buf, string, offset, length) { -1 14830 return blitBuffer(base64ToBytes(string), buf, offset, length) -1 14831 } -1 14832 -1 14833 function ucs2Write (buf, string, offset, length) { -1 14834 return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -1 14835 } -1 14836 -1 14837 Buffer.prototype.write = function write (string, offset, length, encoding) { -1 14838 // Buffer#write(string) -1 14839 if (offset === undefined) { -1 14840 encoding = 'utf8' -1 14841 length = this.length -1 14842 offset = 0 -1 14843 // Buffer#write(string, encoding) -1 14844 } else if (length === undefined && typeof offset === 'string') { -1 14845 encoding = offset -1 14846 length = this.length -1 14847 offset = 0 -1 14848 // Buffer#write(string, offset[, length][, encoding]) -1 14849 } else if (isFinite(offset)) { -1 14850 offset = offset >>> 0 -1 14851 if (isFinite(length)) { -1 14852 length = length >>> 0 -1 14853 if (encoding === undefined) encoding = 'utf8' -1 14854 } else { -1 14855 encoding = length -1 14856 length = undefined -1 14857 } -1 14858 } else { -1 14859 throw new Error( -1 14860 'Buffer.write(string, encoding, offset[, length]) is no longer supported' -1 14861 ) -1 14862 } -1 14863 -1 14864 var remaining = this.length - offset -1 14865 if (length === undefined || length > remaining) length = remaining -1 14866 -1 14867 if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { -1 14868 throw new RangeError('Attempt to write outside buffer bounds') -1 14869 } -1 14870 -1 14871 if (!encoding) encoding = 'utf8' -1 14872 -1 14873 var loweredCase = false -1 14874 for (;;) { -1 14875 switch (encoding) { -1 14876 case 'hex': -1 14877 return hexWrite(this, string, offset, length) -1 14878 -1 14879 case 'utf8': -1 14880 case 'utf-8': -1 14881 return utf8Write(this, string, offset, length) -1 14882 -1 14883 case 'ascii': -1 14884 return asciiWrite(this, string, offset, length) -1 14885 -1 14886 case 'latin1': -1 14887 case 'binary': -1 14888 return latin1Write(this, string, offset, length) -1 14889 -1 14890 case 'base64': -1 14891 // Warning: maxLength not taken into account in base64Write -1 14892 return base64Write(this, string, offset, length) -1 14893 -1 14894 case 'ucs2': -1 14895 case 'ucs-2': -1 14896 case 'utf16le': -1 14897 case 'utf-16le': -1 14898 return ucs2Write(this, string, offset, length) -1 14899 -1 14900 default: -1 14901 if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) -1 14902 encoding = ('' + encoding).toLowerCase() -1 14903 loweredCase = true -1 14904 } -1 14905 } -1 14906 } -1 14907 -1 14908 Buffer.prototype.toJSON = function toJSON () { -1 14909 return { -1 14910 type: 'Buffer', -1 14911 data: Array.prototype.slice.call(this._arr || this, 0) -1 14912 } -1 14913 } -1 14914 -1 14915 function base64Slice (buf, start, end) { -1 14916 if (start === 0 && end === buf.length) { -1 14917 return base64.fromByteArray(buf) -1 14918 } else { -1 14919 return base64.fromByteArray(buf.slice(start, end)) -1 14920 } -1 14921 } -1 14922 -1 14923 function utf8Slice (buf, start, end) { -1 14924 end = Math.min(buf.length, end) -1 14925 var res = [] -1 14926 -1 14927 var i = start -1 14928 while (i < end) { -1 14929 var firstByte = buf[i] -1 14930 var codePoint = null -1 14931 var bytesPerSequence = (firstByte > 0xEF) ? 4 -1 14932 : (firstByte > 0xDF) ? 3 -1 14933 : (firstByte > 0xBF) ? 2 -1 14934 : 1 -1 14935 -1 14936 if (i + bytesPerSequence <= end) { -1 14937 var secondByte, thirdByte, fourthByte, tempCodePoint -1 14938 -1 14939 switch (bytesPerSequence) { -1 14940 case 1: -1 14941 if (firstByte < 0x80) { -1 14942 codePoint = firstByte -1 14943 } -1 14944 break -1 14945 case 2: -1 14946 secondByte = buf[i + 1] -1 14947 if ((secondByte & 0xC0) === 0x80) { -1 14948 tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) -1 14949 if (tempCodePoint > 0x7F) { -1 14950 codePoint = tempCodePoint -1 14951 } -1 14952 } -1 14953 break -1 14954 case 3: -1 14955 secondByte = buf[i + 1] -1 14956 thirdByte = buf[i + 2] -1 14957 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { -1 14958 tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) -1 14959 if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { -1 14960 codePoint = tempCodePoint -1 14961 } -1 14962 } -1 14963 break -1 14964 case 4: -1 14965 secondByte = buf[i + 1] -1 14966 thirdByte = buf[i + 2] -1 14967 fourthByte = buf[i + 3] -1 14968 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { -1 14969 tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) -1 14970 if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { -1 14971 codePoint = tempCodePoint -1 14972 } -1 14973 } -1 14974 } -1 14975 } -1 14976 -1 14977 if (codePoint === null) { -1 14978 // we did not generate a valid codePoint so insert a -1 14979 // replacement char (U+FFFD) and advance only 1 byte -1 14980 codePoint = 0xFFFD -1 14981 bytesPerSequence = 1 -1 14982 } else if (codePoint > 0xFFFF) { -1 14983 // encode to utf16 (surrogate pair dance) -1 14984 codePoint -= 0x10000 -1 14985 res.push(codePoint >>> 10 & 0x3FF | 0xD800) -1 14986 codePoint = 0xDC00 | codePoint & 0x3FF -1 14987 } -1 14988 -1 14989 res.push(codePoint) -1 14990 i += bytesPerSequence -1 14991 } -1 14992 -1 14993 return decodeCodePointsArray(res) -1 14994 } -1 14995 -1 14996 // Based on http://stackoverflow.com/a/22747272/680742, the browser with -1 14997 // the lowest limit is Chrome, with 0x10000 args. -1 14998 // We go 1 magnitude less, for safety -1 14999 var MAX_ARGUMENTS_LENGTH = 0x1000 -1 15000 -1 15001 function decodeCodePointsArray (codePoints) { -1 15002 var len = codePoints.length -1 15003 if (len <= MAX_ARGUMENTS_LENGTH) { -1 15004 return String.fromCharCode.apply(String, codePoints) // avoid extra slice() -1 15005 } -1 15006 -1 15007 // Decode in chunks to avoid "call stack size exceeded". -1 15008 var res = '' -1 15009 var i = 0 -1 15010 while (i < len) { -1 15011 res += String.fromCharCode.apply( -1 15012 String, -1 15013 codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) -1 15014 ) -1 15015 } -1 15016 return res -1 15017 } -1 15018 -1 15019 function asciiSlice (buf, start, end) { -1 15020 var ret = '' -1 15021 end = Math.min(buf.length, end) -1 15022 -1 15023 for (var i = start; i < end; ++i) { -1 15024 ret += String.fromCharCode(buf[i] & 0x7F) -1 15025 } -1 15026 return ret -1 15027 } -1 15028 -1 15029 function latin1Slice (buf, start, end) { -1 15030 var ret = '' -1 15031 end = Math.min(buf.length, end) -1 15032 -1 15033 for (var i = start; i < end; ++i) { -1 15034 ret += String.fromCharCode(buf[i]) -1 15035 } -1 15036 return ret -1 15037 } -1 15038 -1 15039 function hexSlice (buf, start, end) { -1 15040 var len = buf.length -1 15041 -1 15042 if (!start || start < 0) start = 0 -1 15043 if (!end || end < 0 || end > len) end = len -1 15044 -1 15045 var out = '' -1 15046 for (var i = start; i < end; ++i) { -1 15047 out += toHex(buf[i]) -1 15048 } -1 15049 return out -1 15050 } -1 15051 -1 15052 function utf16leSlice (buf, start, end) { -1 15053 var bytes = buf.slice(start, end) -1 15054 var res = '' -1 15055 for (var i = 0; i < bytes.length; i += 2) { -1 15056 res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) -1 15057 } -1 15058 return res -1 15059 } -1 15060 -1 15061 Buffer.prototype.slice = function slice (start, end) { -1 15062 var len = this.length -1 15063 start = ~~start -1 15064 end = end === undefined ? len : ~~end -1 15065 -1 15066 if (start < 0) { -1 15067 start += len -1 15068 if (start < 0) start = 0 -1 15069 } else if (start > len) { -1 15070 start = len -1 15071 } -1 15072 -1 15073 if (end < 0) { -1 15074 end += len -1 15075 if (end < 0) end = 0 -1 15076 } else if (end > len) { -1 15077 end = len -1 15078 } -1 15079 -1 15080 if (end < start) end = start -1 15081 -1 15082 var newBuf = this.subarray(start, end) -1 15083 // Return an augmented `Uint8Array` instance -1 15084 newBuf.__proto__ = Buffer.prototype -1 15085 return newBuf -1 15086 } -1 15087 -1 15088 /* -1 15089 * Need to make sure that buffer isn't trying to write out of bounds. -1 15090 */ -1 15091 function checkOffset (offset, ext, length) { -1 15092 if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') -1 15093 if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -1 15094 } -1 15095 -1 15096 Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { -1 15097 offset = offset >>> 0 -1 15098 byteLength = byteLength >>> 0 -1 15099 if (!noAssert) checkOffset(offset, byteLength, this.length) -1 15100 -1 15101 var val = this[offset] -1 15102 var mul = 1 -1 15103 var i = 0 -1 15104 while (++i < byteLength && (mul *= 0x100)) { -1 15105 val += this[offset + i] * mul -1 15106 } -1 15107 -1 15108 return val -1 15109 } -1 15110 -1 15111 Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { -1 15112 offset = offset >>> 0 -1 15113 byteLength = byteLength >>> 0 -1 15114 if (!noAssert) { -1 15115 checkOffset(offset, byteLength, this.length) -1 15116 } -1 15117 -1 15118 var val = this[offset + --byteLength] -1 15119 var mul = 1 -1 15120 while (byteLength > 0 && (mul *= 0x100)) { -1 15121 val += this[offset + --byteLength] * mul -1 15122 } -1 15123 -1 15124 return val -1 15125 } -1 15126 -1 15127 Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { -1 15128 offset = offset >>> 0 -1 15129 if (!noAssert) checkOffset(offset, 1, this.length) -1 15130 return this[offset] -1 15131 } -1 15132 -1 15133 Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { -1 15134 offset = offset >>> 0 -1 15135 if (!noAssert) checkOffset(offset, 2, this.length) -1 15136 return this[offset] | (this[offset + 1] << 8) -1 15137 } -1 15138 -1 15139 Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { -1 15140 offset = offset >>> 0 -1 15141 if (!noAssert) checkOffset(offset, 2, this.length) -1 15142 return (this[offset] << 8) | this[offset + 1] -1 15143 } -1 15144 -1 15145 Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { -1 15146 offset = offset >>> 0 -1 15147 if (!noAssert) checkOffset(offset, 4, this.length) -1 15148 -1 15149 return ((this[offset]) | -1 15150 (this[offset + 1] << 8) | -1 15151 (this[offset + 2] << 16)) + -1 15152 (this[offset + 3] * 0x1000000) -1 15153 } -1 15154 -1 15155 Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { -1 15156 offset = offset >>> 0 -1 15157 if (!noAssert) checkOffset(offset, 4, this.length) -1 15158 -1 15159 return (this[offset] * 0x1000000) + -1 15160 ((this[offset + 1] << 16) | -1 15161 (this[offset + 2] << 8) | -1 15162 this[offset + 3]) -1 15163 } -1 15164 -1 15165 Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { -1 15166 offset = offset >>> 0 -1 15167 byteLength = byteLength >>> 0 -1 15168 if (!noAssert) checkOffset(offset, byteLength, this.length) -1 15169 -1 15170 var val = this[offset] -1 15171 var mul = 1 -1 15172 var i = 0 -1 15173 while (++i < byteLength && (mul *= 0x100)) { -1 15174 val += this[offset + i] * mul -1 15175 } -1 15176 mul *= 0x80 -1 15177 -1 15178 if (val >= mul) val -= Math.pow(2, 8 * byteLength) -1 15179 -1 15180 return val -1 15181 } -1 15182 -1 15183 Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { -1 15184 offset = offset >>> 0 -1 15185 byteLength = byteLength >>> 0 -1 15186 if (!noAssert) checkOffset(offset, byteLength, this.length) -1 15187 -1 15188 var i = byteLength -1 15189 var mul = 1 -1 15190 var val = this[offset + --i] -1 15191 while (i > 0 && (mul *= 0x100)) { -1 15192 val += this[offset + --i] * mul -1 15193 } -1 15194 mul *= 0x80 -1 15195 -1 15196 if (val >= mul) val -= Math.pow(2, 8 * byteLength) -1 15197 -1 15198 return val -1 15199 } -1 15200 -1 15201 Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { -1 15202 offset = offset >>> 0 -1 15203 if (!noAssert) checkOffset(offset, 1, this.length) -1 15204 if (!(this[offset] & 0x80)) return (this[offset]) -1 15205 return ((0xff - this[offset] + 1) * -1) -1 15206 } -1 15207 -1 15208 Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { -1 15209 offset = offset >>> 0 -1 15210 if (!noAssert) checkOffset(offset, 2, this.length) -1 15211 var val = this[offset] | (this[offset + 1] << 8) -1 15212 return (val & 0x8000) ? val | 0xFFFF0000 : val -1 15213 } -1 15214 -1 15215 Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { -1 15216 offset = offset >>> 0 -1 15217 if (!noAssert) checkOffset(offset, 2, this.length) -1 15218 var val = this[offset + 1] | (this[offset] << 8) -1 15219 return (val & 0x8000) ? val | 0xFFFF0000 : val -1 15220 } -1 15221 -1 15222 Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { -1 15223 offset = offset >>> 0 -1 15224 if (!noAssert) checkOffset(offset, 4, this.length) -1 15225 -1 15226 return (this[offset]) | -1 15227 (this[offset + 1] << 8) | -1 15228 (this[offset + 2] << 16) | -1 15229 (this[offset + 3] << 24) -1 15230 } -1 15231 -1 15232 Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { -1 15233 offset = offset >>> 0 -1 15234 if (!noAssert) checkOffset(offset, 4, this.length) -1 15235 -1 15236 return (this[offset] << 24) | -1 15237 (this[offset + 1] << 16) | -1 15238 (this[offset + 2] << 8) | -1 15239 (this[offset + 3]) -1 15240 } -1 15241 -1 15242 Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { -1 15243 offset = offset >>> 0 -1 15244 if (!noAssert) checkOffset(offset, 4, this.length) -1 15245 return ieee754.read(this, offset, true, 23, 4) -1 15246 } -1 15247 -1 15248 Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { -1 15249 offset = offset >>> 0 -1 15250 if (!noAssert) checkOffset(offset, 4, this.length) -1 15251 return ieee754.read(this, offset, false, 23, 4) -1 15252 } -1 15253 -1 15254 Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { -1 15255 offset = offset >>> 0 -1 15256 if (!noAssert) checkOffset(offset, 8, this.length) -1 15257 return ieee754.read(this, offset, true, 52, 8) -1 15258 } -1 15259 -1 15260 Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { -1 15261 offset = offset >>> 0 -1 15262 if (!noAssert) checkOffset(offset, 8, this.length) -1 15263 return ieee754.read(this, offset, false, 52, 8) -1 15264 } -1 15265 -1 15266 function checkInt (buf, value, offset, ext, max, min) { -1 15267 if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') -1 15268 if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') -1 15269 if (offset + ext > buf.length) throw new RangeError('Index out of range') -1 15270 } -1 15271 -1 15272 Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { -1 15273 value = +value -1 15274 offset = offset >>> 0 -1 15275 byteLength = byteLength >>> 0 -1 15276 if (!noAssert) { -1 15277 var maxBytes = Math.pow(2, 8 * byteLength) - 1 -1 15278 checkInt(this, value, offset, byteLength, maxBytes, 0) -1 15279 } -1 15280 -1 15281 var mul = 1 -1 15282 var i = 0 -1 15283 this[offset] = value & 0xFF -1 15284 while (++i < byteLength && (mul *= 0x100)) { -1 15285 this[offset + i] = (value / mul) & 0xFF -1 15286 } -1 15287 -1 15288 return offset + byteLength -1 15289 } -1 15290 -1 15291 Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { -1 15292 value = +value -1 15293 offset = offset >>> 0 -1 15294 byteLength = byteLength >>> 0 -1 15295 if (!noAssert) { -1 15296 var maxBytes = Math.pow(2, 8 * byteLength) - 1 -1 15297 checkInt(this, value, offset, byteLength, maxBytes, 0) -1 15298 } -1 15299 -1 15300 var i = byteLength - 1 -1 15301 var mul = 1 -1 15302 this[offset + i] = value & 0xFF -1 15303 while (--i >= 0 && (mul *= 0x100)) { -1 15304 this[offset + i] = (value / mul) & 0xFF -1 15305 } -1 15306 -1 15307 return offset + byteLength -1 15308 } -1 15309 -1 15310 Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { -1 15311 value = +value -1 15312 offset = offset >>> 0 -1 15313 if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) -1 15314 this[offset] = (value & 0xff) -1 15315 return offset + 1 -1 15316 } -1 15317 -1 15318 Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { -1 15319 value = +value -1 15320 offset = offset >>> 0 -1 15321 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) -1 15322 this[offset] = (value & 0xff) -1 15323 this[offset + 1] = (value >>> 8) -1 15324 return offset + 2 -1 15325 } -1 15326 -1 15327 Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { -1 15328 value = +value -1 15329 offset = offset >>> 0 -1 15330 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) -1 15331 this[offset] = (value >>> 8) -1 15332 this[offset + 1] = (value & 0xff) -1 15333 return offset + 2 -1 15334 } -1 15335 -1 15336 Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { -1 15337 value = +value -1 15338 offset = offset >>> 0 -1 15339 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) -1 15340 this[offset + 3] = (value >>> 24) -1 15341 this[offset + 2] = (value >>> 16) -1 15342 this[offset + 1] = (value >>> 8) -1 15343 this[offset] = (value & 0xff) -1 15344 return offset + 4 -1 15345 } -1 15346 -1 15347 Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { -1 15348 value = +value -1 15349 offset = offset >>> 0 -1 15350 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) -1 15351 this[offset] = (value >>> 24) -1 15352 this[offset + 1] = (value >>> 16) -1 15353 this[offset + 2] = (value >>> 8) -1 15354 this[offset + 3] = (value & 0xff) -1 15355 return offset + 4 -1 15356 } -1 15357 -1 15358 Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { -1 15359 value = +value -1 15360 offset = offset >>> 0 -1 15361 if (!noAssert) { -1 15362 var limit = Math.pow(2, (8 * byteLength) - 1) -1 15363 -1 15364 checkInt(this, value, offset, byteLength, limit - 1, -limit) -1 15365 } -1 15366 -1 15367 var i = 0 -1 15368 var mul = 1 -1 15369 var sub = 0 -1 15370 this[offset] = value & 0xFF -1 15371 while (++i < byteLength && (mul *= 0x100)) { -1 15372 if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { -1 15373 sub = 1 -1 15374 } -1 15375 this[offset + i] = ((value / mul) >> 0) - sub & 0xFF -1 15376 } -1 15377 -1 15378 return offset + byteLength -1 15379 } -1 15380 -1 15381 Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { -1 15382 value = +value -1 15383 offset = offset >>> 0 -1 15384 if (!noAssert) { -1 15385 var limit = Math.pow(2, (8 * byteLength) - 1) -1 15386 -1 15387 checkInt(this, value, offset, byteLength, limit - 1, -limit) -1 15388 } -1 15389 -1 15390 var i = byteLength - 1 -1 15391 var mul = 1 -1 15392 var sub = 0 -1 15393 this[offset + i] = value & 0xFF -1 15394 while (--i >= 0 && (mul *= 0x100)) { -1 15395 if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { -1 15396 sub = 1 -1 15397 } -1 15398 this[offset + i] = ((value / mul) >> 0) - sub & 0xFF -1 15399 } -1 15400 -1 15401 return offset + byteLength -1 15402 } -1 15403 -1 15404 Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { -1 15405 value = +value -1 15406 offset = offset >>> 0 -1 15407 if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) -1 15408 if (value < 0) value = 0xff + value + 1 -1 15409 this[offset] = (value & 0xff) -1 15410 return offset + 1 -1 15411 } -1 15412 -1 15413 Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { -1 15414 value = +value -1 15415 offset = offset >>> 0 -1 15416 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) -1 15417 this[offset] = (value & 0xff) -1 15418 this[offset + 1] = (value >>> 8) -1 15419 return offset + 2 -1 15420 } -1 15421 -1 15422 Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { -1 15423 value = +value -1 15424 offset = offset >>> 0 -1 15425 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) -1 15426 this[offset] = (value >>> 8) -1 15427 this[offset + 1] = (value & 0xff) -1 15428 return offset + 2 -1 15429 } -1 15430 -1 15431 Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { -1 15432 value = +value -1 15433 offset = offset >>> 0 -1 15434 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) -1 15435 this[offset] = (value & 0xff) -1 15436 this[offset + 1] = (value >>> 8) -1 15437 this[offset + 2] = (value >>> 16) -1 15438 this[offset + 3] = (value >>> 24) -1 15439 return offset + 4 -1 15440 } -1 15441 -1 15442 Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { -1 15443 value = +value -1 15444 offset = offset >>> 0 -1 15445 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) -1 15446 if (value < 0) value = 0xffffffff + value + 1 -1 15447 this[offset] = (value >>> 24) -1 15448 this[offset + 1] = (value >>> 16) -1 15449 this[offset + 2] = (value >>> 8) -1 15450 this[offset + 3] = (value & 0xff) -1 15451 return offset + 4 -1 15452 } -1 15453 -1 15454 function checkIEEE754 (buf, value, offset, ext, max, min) { -1 15455 if (offset + ext > buf.length) throw new RangeError('Index out of range') -1 15456 if (offset < 0) throw new RangeError('Index out of range') -1 15457 } -1 15458 -1 15459 function writeFloat (buf, value, offset, littleEndian, noAssert) { -1 15460 value = +value -1 15461 offset = offset >>> 0 -1 15462 if (!noAssert) { -1 15463 checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) -1 15464 } -1 15465 ieee754.write(buf, value, offset, littleEndian, 23, 4) -1 15466 return offset + 4 -1 15467 } -1 15468 -1 15469 Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { -1 15470 return writeFloat(this, value, offset, true, noAssert) -1 15471 } -1 15472 -1 15473 Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { -1 15474 return writeFloat(this, value, offset, false, noAssert) -1 15475 } -1 15476 -1 15477 function writeDouble (buf, value, offset, littleEndian, noAssert) { -1 15478 value = +value -1 15479 offset = offset >>> 0 -1 15480 if (!noAssert) { -1 15481 checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) -1 15482 } -1 15483 ieee754.write(buf, value, offset, littleEndian, 52, 8) -1 15484 return offset + 8 -1 15485 } -1 15486 -1 15487 Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { -1 15488 return writeDouble(this, value, offset, true, noAssert) -1 15489 } -1 15490 -1 15491 Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { -1 15492 return writeDouble(this, value, offset, false, noAssert) -1 15493 } -1 15494 -1 15495 // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -1 15496 Buffer.prototype.copy = function copy (target, targetStart, start, end) { -1 15497 if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') -1 15498 if (!start) start = 0 -1 15499 if (!end && end !== 0) end = this.length -1 15500 if (targetStart >= target.length) targetStart = target.length -1 15501 if (!targetStart) targetStart = 0 -1 15502 if (end > 0 && end < start) end = start -1 15503 -1 15504 // Copy 0 bytes; we're done -1 15505 if (end === start) return 0 -1 15506 if (target.length === 0 || this.length === 0) return 0 -1 15507 -1 15508 // Fatal error conditions -1 15509 if (targetStart < 0) { -1 15510 throw new RangeError('targetStart out of bounds') -1 15511 } -1 15512 if (start < 0 || start >= this.length) throw new RangeError('Index out of range') -1 15513 if (end < 0) throw new RangeError('sourceEnd out of bounds') -1 15514 -1 15515 // Are we oob? -1 15516 if (end > this.length) end = this.length -1 15517 if (target.length - targetStart < end - start) { -1 15518 end = target.length - targetStart + start -1 15519 } -1 15520 -1 15521 var len = end - start -1 15522 -1 15523 if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { -1 15524 // Use built-in when available, missing from IE11 -1 15525 this.copyWithin(targetStart, start, end) -1 15526 } else if (this === target && start < targetStart && targetStart < end) { -1 15527 // descending copy from end -1 15528 for (var i = len - 1; i >= 0; --i) { -1 15529 target[i + targetStart] = this[i + start] -1 15530 } -1 15531 } else { -1 15532 Uint8Array.prototype.set.call( -1 15533 target, -1 15534 this.subarray(start, end), -1 15535 targetStart -1 15536 ) -1 15537 } -1 15538 -1 15539 return len -1 15540 } -1 15541 -1 15542 // Usage: -1 15543 // buffer.fill(number[, offset[, end]]) -1 15544 // buffer.fill(buffer[, offset[, end]]) -1 15545 // buffer.fill(string[, offset[, end]][, encoding]) -1 15546 Buffer.prototype.fill = function fill (val, start, end, encoding) { -1 15547 // Handle string cases: -1 15548 if (typeof val === 'string') { -1 15549 if (typeof start === 'string') { -1 15550 encoding = start -1 15551 start = 0 -1 15552 end = this.length -1 15553 } else if (typeof end === 'string') { -1 15554 encoding = end -1 15555 end = this.length -1 15556 } -1 15557 if (encoding !== undefined && typeof encoding !== 'string') { -1 15558 throw new TypeError('encoding must be a string') -1 15559 } -1 15560 if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { -1 15561 throw new TypeError('Unknown encoding: ' + encoding) -1 15562 } -1 15563 if (val.length === 1) { -1 15564 var code = val.charCodeAt(0) -1 15565 if ((encoding === 'utf8' && code < 128) || -1 15566 encoding === 'latin1') { -1 15567 // Fast path: If `val` fits into a single byte, use that numeric value. -1 15568 val = code -1 15569 } -1 15570 } -1 15571 } else if (typeof val === 'number') { -1 15572 val = val & 255 -1 15573 } -1 15574 -1 15575 // Invalid ranges are not set to a default, so can range check early. -1 15576 if (start < 0 || this.length < start || this.length < end) { -1 15577 throw new RangeError('Out of range index') -1 15578 } -1 15579 -1 15580 if (end <= start) { -1 15581 return this -1 15582 } -1 15583 -1 15584 start = start >>> 0 -1 15585 end = end === undefined ? this.length : end >>> 0 -1 15586 -1 15587 if (!val) val = 0 -1 15588 -1 15589 var i -1 15590 if (typeof val === 'number') { -1 15591 for (i = start; i < end; ++i) { -1 15592 this[i] = val -1 15593 } -1 15594 } else { -1 15595 var bytes = Buffer.isBuffer(val) -1 15596 ? val -1 15597 : Buffer.from(val, encoding) -1 15598 var len = bytes.length -1 15599 if (len === 0) { -1 15600 throw new TypeError('The value "' + val + -1 15601 '" is invalid for argument "value"') -1 15602 } -1 15603 for (i = 0; i < end - start; ++i) { -1 15604 this[i + start] = bytes[i % len] -1 15605 } -1 15606 } -1 15607 -1 15608 return this -1 15609 } -1 15610 -1 15611 // HELPER FUNCTIONS -1 15612 // ================ -1 15613 -1 15614 var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g -1 15615 -1 15616 function base64clean (str) { -1 15617 // Node takes equal signs as end of the Base64 encoding -1 15618 str = str.split('=')[0] -1 15619 // Node strips out invalid characters like \n and \t from the string, base64-js does not -1 15620 str = str.trim().replace(INVALID_BASE64_RE, '') -1 15621 // Node converts strings with length < 2 to '' -1 15622 if (str.length < 2) return '' -1 15623 // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not -1 15624 while (str.length % 4 !== 0) { -1 15625 str = str + '=' -1 15626 } -1 15627 return str -1 15628 } -1 15629 -1 15630 function toHex (n) { -1 15631 if (n < 16) return '0' + n.toString(16) -1 15632 return n.toString(16) -1 15633 } -1 15634 -1 15635 function utf8ToBytes (string, units) { -1 15636 units = units || Infinity -1 15637 var codePoint -1 15638 var length = string.length -1 15639 var leadSurrogate = null -1 15640 var bytes = [] -1 15641 -1 15642 for (var i = 0; i < length; ++i) { -1 15643 codePoint = string.charCodeAt(i) -1 15644 -1 15645 // is surrogate component -1 15646 if (codePoint > 0xD7FF && codePoint < 0xE000) { -1 15647 // last char was a lead -1 15648 if (!leadSurrogate) { -1 15649 // no lead yet -1 15650 if (codePoint > 0xDBFF) { -1 15651 // unexpected trail -1 15652 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) -1 15653 continue -1 15654 } else if (i + 1 === length) { -1 15655 // unpaired lead -1 15656 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) -1 15657 continue -1 15658 } -1 15659 -1 15660 // valid lead -1 15661 leadSurrogate = codePoint -1 15662 -1 15663 continue -1 15664 } -1 15665 -1 15666 // 2 leads in a row -1 15667 if (codePoint < 0xDC00) { -1 15668 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) -1 15669 leadSurrogate = codePoint -1 15670 continue -1 15671 } -1 15672 -1 15673 // valid surrogate pair -1 15674 codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 -1 15675 } else if (leadSurrogate) { -1 15676 // valid bmp char, but last char was a lead -1 15677 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) -1 15678 } -1 15679 -1 15680 leadSurrogate = null -1 15681 -1 15682 // encode utf8 -1 15683 if (codePoint < 0x80) { -1 15684 if ((units -= 1) < 0) break -1 15685 bytes.push(codePoint) -1 15686 } else if (codePoint < 0x800) { -1 15687 if ((units -= 2) < 0) break -1 15688 bytes.push( -1 15689 codePoint >> 0x6 | 0xC0, -1 15690 codePoint & 0x3F | 0x80 -1 15691 ) -1 15692 } else if (codePoint < 0x10000) { -1 15693 if ((units -= 3) < 0) break -1 15694 bytes.push( -1 15695 codePoint >> 0xC | 0xE0, -1 15696 codePoint >> 0x6 & 0x3F | 0x80, -1 15697 codePoint & 0x3F | 0x80 -1 15698 ) -1 15699 } else if (codePoint < 0x110000) { -1 15700 if ((units -= 4) < 0) break -1 15701 bytes.push( -1 15702 codePoint >> 0x12 | 0xF0, -1 15703 codePoint >> 0xC & 0x3F | 0x80, -1 15704 codePoint >> 0x6 & 0x3F | 0x80, -1 15705 codePoint & 0x3F | 0x80 -1 15706 ) -1 15707 } else { -1 15708 throw new Error('Invalid code point') -1 15709 } -1 15710 } -1 15711 -1 15712 return bytes -1 15713 } -1 15714 -1 15715 function asciiToBytes (str) { -1 15716 var byteArray = [] -1 15717 for (var i = 0; i < str.length; ++i) { -1 15718 // Node's code seems to be doing this and not & 0x7F.. -1 15719 byteArray.push(str.charCodeAt(i) & 0xFF) -1 15720 } -1 15721 return byteArray -1 15722 } -1 15723 -1 15724 function utf16leToBytes (str, units) { -1 15725 var c, hi, lo -1 15726 var byteArray = [] -1 15727 for (var i = 0; i < str.length; ++i) { -1 15728 if ((units -= 2) < 0) break -1 15729 -1 15730 c = str.charCodeAt(i) -1 15731 hi = c >> 8 -1 15732 lo = c % 256 -1 15733 byteArray.push(lo) -1 15734 byteArray.push(hi) -1 15735 } -1 15736 -1 15737 return byteArray -1 15738 } -1 15739 -1 15740 function base64ToBytes (str) { -1 15741 return base64.toByteArray(base64clean(str)) -1 15742 } -1 15743 -1 15744 function blitBuffer (src, dst, offset, length) { -1 15745 for (var i = 0; i < length; ++i) { -1 15746 if ((i + offset >= dst.length) || (i >= src.length)) break -1 15747 dst[i + offset] = src[i] -1 15748 } -1 15749 return i -1 15750 } -1 15751 -1 15752 // ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass -1 15753 // the `instanceof` check but they should be treated as of that type. -1 15754 // See: https://github.com/feross/buffer/issues/166 -1 15755 function isInstance (obj, type) { -1 15756 return obj instanceof type || -1 15757 (obj != null && obj.constructor != null && obj.constructor.name != null && -1 15758 obj.constructor.name === type.name) -1 15759 } -1 15760 function numberIsNaN (obj) { -1 15761 // For IE11 support -1 15762 return obj !== obj // eslint-disable-line no-self-compare -1 15763 } -1 15764 -1 15765 }).call(this)}).call(this,require("buffer").Buffer) -1 15766 },{"base64-js":16,"buffer":63,"ieee754":131}],64:[function(require,module,exports){ -1 15767 var Buffer = require('safe-buffer').Buffer -1 15768 var Transform = require('stream').Transform -1 15769 var StringDecoder = require('string_decoder').StringDecoder -1 15770 var inherits = require('inherits') -1 15771 -1 15772 function CipherBase (hashMode) { -1 15773 Transform.call(this) -1 15774 this.hashMode = typeof hashMode === 'string' -1 15775 if (this.hashMode) { -1 15776 this[hashMode] = this._finalOrDigest -1 15777 } else { -1 15778 this.final = this._finalOrDigest -1 15779 } -1 15780 if (this._final) { -1 15781 this.__final = this._final -1 15782 this._final = null -1 15783 } -1 15784 this._decoder = null -1 15785 this._encoding = null -1 15786 } -1 15787 inherits(CipherBase, Transform) -1 15788 -1 15789 CipherBase.prototype.update = function (data, inputEnc, outputEnc) { -1 15790 if (typeof data === 'string') { -1 15791 data = Buffer.from(data, inputEnc) -1 15792 } -1 15793 -1 15794 var outData = this._update(data) -1 15795 if (this.hashMode) return this -1 15796 -1 15797 if (outputEnc) { -1 15798 outData = this._toString(outData, outputEnc) -1 15799 } -1 15800 -1 15801 return outData -1 15802 } -1 15803 -1 15804 CipherBase.prototype.setAutoPadding = function () {} -1 15805 CipherBase.prototype.getAuthTag = function () { -1 15806 throw new Error('trying to get auth tag in unsupported state') -1 15807 } -1 15808 -1 15809 CipherBase.prototype.setAuthTag = function () { -1 15810 throw new Error('trying to set auth tag in unsupported state') -1 15811 } -1 15812 -1 15813 CipherBase.prototype.setAAD = function () { -1 15814 throw new Error('trying to set aad in unsupported state') -1 15815 } -1 15816 -1 15817 CipherBase.prototype._transform = function (data, _, next) { -1 15818 var err -1 15819 try { -1 15820 if (this.hashMode) { -1 15821 this._update(data) -1 15822 } else { -1 15823 this.push(this._update(data)) -1 15824 } -1 15825 } catch (e) { -1 15826 err = e -1 15827 } finally { -1 15828 next(err) -1 15829 } -1 15830 } -1 15831 CipherBase.prototype._flush = function (done) { -1 15832 var err -1 15833 try { -1 15834 this.push(this.__final()) -1 15835 } catch (e) { -1 15836 err = e -1 15837 } -1 15838 -1 15839 done(err) -1 15840 } -1 15841 CipherBase.prototype._finalOrDigest = function (outputEnc) { -1 15842 var outData = this.__final() || Buffer.alloc(0) -1 15843 if (outputEnc) { -1 15844 outData = this._toString(outData, outputEnc, true) -1 15845 } -1 15846 return outData -1 15847 } -1 15848 -1 15849 CipherBase.prototype._toString = function (value, enc, fin) { -1 15850 if (!this._decoder) { -1 15851 this._decoder = new StringDecoder(enc) -1 15852 this._encoding = enc -1 15853 } -1 15854 -1 15855 if (this._encoding !== enc) throw new Error('can\'t switch encodings') -1 15856 -1 15857 var out = this._decoder.write(value) -1 15858 if (fin) { -1 15859 out += this._decoder.end() -1 15860 } -1 15861 -1 15862 return out -1 15863 } -1 15864 -1 15865 module.exports = CipherBase -1 15866 -1 15867 },{"inherits":132,"safe-buffer":160,"stream":170,"string_decoder":185}],65:[function(require,module,exports){ -1 15868 (function (Buffer){(function (){ -1 15869 var elliptic = require('elliptic') -1 15870 var BN = require('bn.js') -1 15871 -1 15872 module.exports = function createECDH (curve) { -1 15873 return new ECDH(curve) -1 15874 } -1 15875 -1 15876 var aliases = { -1 15877 secp256k1: { -1 15878 name: 'secp256k1', -1 15879 byteLength: 32 -1 15880 }, -1 15881 secp224r1: { -1 15882 name: 'p224', -1 15883 byteLength: 28 -1 15884 }, -1 15885 prime256v1: { -1 15886 name: 'p256', -1 15887 byteLength: 32 -1 15888 }, -1 15889 prime192v1: { -1 15890 name: 'p192', -1 15891 byteLength: 24 -1 15892 }, -1 15893 ed25519: { -1 15894 name: 'ed25519', -1 15895 byteLength: 32 -1 15896 }, -1 15897 secp384r1: { -1 15898 name: 'p384', -1 15899 byteLength: 48 -1 15900 }, -1 15901 secp521r1: { -1 15902 name: 'p521', -1 15903 byteLength: 66 -1 15904 } -1 15905 } -1 15906 -1 15907 aliases.p224 = aliases.secp224r1 -1 15908 aliases.p256 = aliases.secp256r1 = aliases.prime256v1 -1 15909 aliases.p192 = aliases.secp192r1 = aliases.prime192v1 -1 15910 aliases.p384 = aliases.secp384r1 -1 15911 aliases.p521 = aliases.secp521r1 -1 15912 -1 15913 function ECDH (curve) { -1 15914 this.curveType = aliases[curve] -1 15915 if (!this.curveType) { -1 15916 this.curveType = { -1 15917 name: curve -1 15918 } -1 15919 } -1 15920 this.curve = new elliptic.ec(this.curveType.name) // eslint-disable-line new-cap -1 15921 this.keys = void 0 -1 15922 } -1 15923 -1 15924 ECDH.prototype.generateKeys = function (enc, format) { -1 15925 this.keys = this.curve.genKeyPair() -1 15926 return this.getPublicKey(enc, format) -1 15927 } -1 15928 -1 15929 ECDH.prototype.computeSecret = function (other, inenc, enc) { -1 15930 inenc = inenc || 'utf8' -1 15931 if (!Buffer.isBuffer(other)) { -1 15932 other = new Buffer(other, inenc) -1 15933 } -1 15934 var otherPub = this.curve.keyFromPublic(other).getPublic() -1 15935 var out = otherPub.mul(this.keys.getPrivate()).getX() -1 15936 return formatReturnValue(out, enc, this.curveType.byteLength) -1 15937 } -1 15938 -1 15939 ECDH.prototype.getPublicKey = function (enc, format) { -1 15940 var key = this.keys.getPublic(format === 'compressed', true) -1 15941 if (format === 'hybrid') { -1 15942 if (key[key.length - 1] % 2) { -1 15943 key[0] = 7 -1 15944 } else { -1 15945 key[0] = 6 -1 15946 } -1 15947 } -1 15948 return formatReturnValue(key, enc) -1 15949 } -1 15950 -1 15951 ECDH.prototype.getPrivateKey = function (enc) { -1 15952 return formatReturnValue(this.keys.getPrivate(), enc) -1 15953 } -1 15954 -1 15955 ECDH.prototype.setPublicKey = function (pub, enc) { -1 15956 enc = enc || 'utf8' -1 15957 if (!Buffer.isBuffer(pub)) { -1 15958 pub = new Buffer(pub, enc) -1 15959 } -1 15960 this.keys._importPublic(pub) -1 15961 return this -1 15962 } -1 15963 -1 15964 ECDH.prototype.setPrivateKey = function (priv, enc) { -1 15965 enc = enc || 'utf8' -1 15966 if (!Buffer.isBuffer(priv)) { -1 15967 priv = new Buffer(priv, enc) -1 15968 } -1 15969 -1 15970 var _priv = new BN(priv) -1 15971 _priv = _priv.toString(16) -1 15972 this.keys = this.curve.genKeyPair() -1 15973 this.keys._importPrivate(_priv) -1 15974 return this -1 15975 } -1 15976 -1 15977 function formatReturnValue (bn, enc, len) { -1 15978 if (!Array.isArray(bn)) { -1 15979 bn = bn.toArray() -1 15980 } -1 15981 var buf = new Buffer(bn) -1 15982 if (len && buf.length < len) { -1 15983 var zeros = new Buffer(len - buf.length) -1 15984 zeros.fill(0) -1 15985 buf = Buffer.concat([zeros, buf]) -1 15986 } -1 15987 if (!enc) { -1 15988 return buf -1 15989 } else { -1 15990 return buf.toString(enc) -1 15991 } -1 15992 } -1 15993 -1 15994 }).call(this)}).call(this,require("buffer").Buffer) -1 15995 },{"bn.js":66,"buffer":63,"elliptic":83}],66:[function(require,module,exports){ -1 15996 arguments[4][15][0].apply(exports,arguments) -1 15997 },{"buffer":19,"dup":15}],67:[function(require,module,exports){ -1 15998 'use strict' -1 15999 var inherits = require('inherits') -1 16000 var MD5 = require('md5.js') -1 16001 var RIPEMD160 = require('ripemd160') -1 16002 var sha = require('sha.js') -1 16003 var Base = require('cipher-base') -1 16004 -1 16005 function Hash (hash) { -1 16006 Base.call(this, 'digest') -1 16007 -1 16008 this._hash = hash -1 16009 } -1 16010 -1 16011 inherits(Hash, Base) -1 16012 -1 16013 Hash.prototype._update = function (data) { -1 16014 this._hash.update(data) -1 16015 } -1 16016 -1 16017 Hash.prototype._final = function () { -1 16018 return this._hash.digest() -1 16019 } -1 16020 -1 16021 module.exports = function createHash (alg) { -1 16022 alg = alg.toLowerCase() -1 16023 if (alg === 'md5') return new MD5() -1 16024 if (alg === 'rmd160' || alg === 'ripemd160') return new RIPEMD160() -1 16025 -1 16026 return new Hash(sha(alg)) -1 16027 } -1 16028 -1 16029 },{"cipher-base":64,"inherits":132,"md5.js":133,"ripemd160":159,"sha.js":163}],68:[function(require,module,exports){ -1 16030 var MD5 = require('md5.js') -1 16031 -1 16032 module.exports = function (buffer) { -1 16033 return new MD5().update(buffer).digest() -1 16034 } -1 16035 -1 16036 },{"md5.js":133}],69:[function(require,module,exports){ -1 16037 'use strict' -1 16038 var inherits = require('inherits') -1 16039 var Legacy = require('./legacy') -1 16040 var Base = require('cipher-base') -1 16041 var Buffer = require('safe-buffer').Buffer -1 16042 var md5 = require('create-hash/md5') -1 16043 var RIPEMD160 = require('ripemd160') -1 16044 -1 16045 var sha = require('sha.js') -1 16046 -1 16047 var ZEROS = Buffer.alloc(128) -1 16048 -1 16049 function Hmac (alg, key) { -1 16050 Base.call(this, 'digest') -1 16051 if (typeof key === 'string') { -1 16052 key = Buffer.from(key) -1 16053 } -1 16054 -1 16055 var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64 -1 16056 -1 16057 this._alg = alg -1 16058 this._key = key -1 16059 if (key.length > blocksize) { -1 16060 var hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg) -1 16061 key = hash.update(key).digest() -1 16062 } else if (key.length < blocksize) { -1 16063 key = Buffer.concat([key, ZEROS], blocksize) -1 16064 } -1 16065 -1 16066 var ipad = this._ipad = Buffer.allocUnsafe(blocksize) -1 16067 var opad = this._opad = Buffer.allocUnsafe(blocksize) -1 16068 -1 16069 for (var i = 0; i < blocksize; i++) { -1 16070 ipad[i] = key[i] ^ 0x36 -1 16071 opad[i] = key[i] ^ 0x5C -1 16072 } -1 16073 this._hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg) -1 16074 this._hash.update(ipad) -1 16075 } -1 16076 -1 16077 inherits(Hmac, Base) -1 16078 -1 16079 Hmac.prototype._update = function (data) { -1 16080 this._hash.update(data) -1 16081 } -1 16082 -1 16083 Hmac.prototype._final = function () { -1 16084 var h = this._hash.digest() -1 16085 var hash = this._alg === 'rmd160' ? new RIPEMD160() : sha(this._alg) -1 16086 return hash.update(this._opad).update(h).digest() -1 16087 } -1 16088 -1 16089 module.exports = function createHmac (alg, key) { -1 16090 alg = alg.toLowerCase() -1 16091 if (alg === 'rmd160' || alg === 'ripemd160') { -1 16092 return new Hmac('rmd160', key) -1 16093 } -1 16094 if (alg === 'md5') { -1 16095 return new Legacy(md5, key) -1 16096 } -1 16097 return new Hmac(alg, key) -1 16098 } -1 16099 -1 16100 },{"./legacy":70,"cipher-base":64,"create-hash/md5":68,"inherits":132,"ripemd160":159,"safe-buffer":160,"sha.js":163}],70:[function(require,module,exports){ -1 16101 'use strict' -1 16102 var inherits = require('inherits') -1 16103 var Buffer = require('safe-buffer').Buffer -1 16104 -1 16105 var Base = require('cipher-base') -1 16106 -1 16107 var ZEROS = Buffer.alloc(128) -1 16108 var blocksize = 64 -1 16109 -1 16110 function Hmac (alg, key) { -1 16111 Base.call(this, 'digest') -1 16112 if (typeof key === 'string') { -1 16113 key = Buffer.from(key) -1 16114 } -1 16115 -1 16116 this._alg = alg -1 16117 this._key = key -1 16118 -1 16119 if (key.length > blocksize) { -1 16120 key = alg(key) -1 16121 } else if (key.length < blocksize) { -1 16122 key = Buffer.concat([key, ZEROS], blocksize) -1 16123 } -1 16124 -1 16125 var ipad = this._ipad = Buffer.allocUnsafe(blocksize) -1 16126 var opad = this._opad = Buffer.allocUnsafe(blocksize) -1 16127 -1 16128 for (var i = 0; i < blocksize; i++) { -1 16129 ipad[i] = key[i] ^ 0x36 -1 16130 opad[i] = key[i] ^ 0x5C -1 16131 } -1 16132 -1 16133 this._hash = [ipad] -1 16134 } -1 16135 -1 16136 inherits(Hmac, Base) -1 16137 -1 16138 Hmac.prototype._update = function (data) { -1 16139 this._hash.push(data) -1 16140 } -1 16141 -1 16142 Hmac.prototype._final = function () { -1 16143 var h = this._alg(Buffer.concat(this._hash)) -1 16144 return this._alg(Buffer.concat([this._opad, h])) -1 16145 } -1 16146 module.exports = Hmac -1 16147 -1 16148 },{"cipher-base":64,"inherits":132,"safe-buffer":160}],71:[function(require,module,exports){ -1 16149 'use strict' -1 16150 -1 16151 exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes') -1 16152 exports.createHash = exports.Hash = require('create-hash') -1 16153 exports.createHmac = exports.Hmac = require('create-hmac') -1 16154 -1 16155 var algos = require('browserify-sign/algos') -1 16156 var algoKeys = Object.keys(algos) -1 16157 var hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys) -1 16158 exports.getHashes = function () { -1 16159 return hashes -1 16160 } -1 16161 -1 16162 var p = require('pbkdf2') -1 16163 exports.pbkdf2 = p.pbkdf2 -1 16164 exports.pbkdf2Sync = p.pbkdf2Sync -1 16165 -1 16166 var aes = require('browserify-cipher') -1 16167 -1 16168 exports.Cipher = aes.Cipher -1 16169 exports.createCipher = aes.createCipher -1 16170 exports.Cipheriv = aes.Cipheriv -1 16171 exports.createCipheriv = aes.createCipheriv -1 16172 exports.Decipher = aes.Decipher -1 16173 exports.createDecipher = aes.createDecipher -1 16174 exports.Decipheriv = aes.Decipheriv -1 16175 exports.createDecipheriv = aes.createDecipheriv -1 16176 exports.getCiphers = aes.getCiphers -1 16177 exports.listCiphers = aes.listCiphers -1 16178 -1 16179 var dh = require('diffie-hellman') -1 16180 -1 16181 exports.DiffieHellmanGroup = dh.DiffieHellmanGroup -1 16182 exports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup -1 16183 exports.getDiffieHellman = dh.getDiffieHellman -1 16184 exports.createDiffieHellman = dh.createDiffieHellman -1 16185 exports.DiffieHellman = dh.DiffieHellman -1 16186 -1 16187 var sign = require('browserify-sign') -1 16188 -1 16189 exports.createSign = sign.createSign -1 16190 exports.Sign = sign.Sign -1 16191 exports.createVerify = sign.createVerify -1 16192 exports.Verify = sign.Verify -1 16193 -1 16194 exports.createECDH = require('create-ecdh') -1 16195 -1 16196 var publicEncrypt = require('public-encrypt') -1 16197 -1 16198 exports.publicEncrypt = publicEncrypt.publicEncrypt -1 16199 exports.privateEncrypt = publicEncrypt.privateEncrypt -1 16200 exports.publicDecrypt = publicEncrypt.publicDecrypt -1 16201 exports.privateDecrypt = publicEncrypt.privateDecrypt -1 16202 -1 16203 // the least I can do is make error messages for the rest of the node.js/crypto api. -1 16204 // ;[ -1 16205 // 'createCredentials' -1 16206 // ].forEach(function (name) { -1 16207 // exports[name] = function () { -1 16208 // throw new Error([ -1 16209 // 'sorry, ' + name + ' is not implemented yet', -1 16210 // 'we accept pull requests', -1 16211 // 'https://github.com/crypto-browserify/crypto-browserify' -1 16212 // ].join('\n')) -1 16213 // } -1 16214 // }) -1 16215 -1 16216 var rf = require('randomfill') -1 16217 -1 16218 exports.randomFill = rf.randomFill -1 16219 exports.randomFillSync = rf.randomFillSync -1 16220 -1 16221 exports.createCredentials = function () { -1 16222 throw new Error([ -1 16223 'sorry, createCredentials is not implemented yet', -1 16224 'we accept pull requests', -1 16225 'https://github.com/crypto-browserify/crypto-browserify' -1 16226 ].join('\n')) -1 16227 } -1 16228 -1 16229 exports.constants = { -1 16230 'DH_CHECK_P_NOT_SAFE_PRIME': 2, -1 16231 'DH_CHECK_P_NOT_PRIME': 1, -1 16232 'DH_UNABLE_TO_CHECK_GENERATOR': 4, -1 16233 'DH_NOT_SUITABLE_GENERATOR': 8, -1 16234 'NPN_ENABLED': 1, -1 16235 'ALPN_ENABLED': 1, -1 16236 'RSA_PKCS1_PADDING': 1, -1 16237 'RSA_SSLV23_PADDING': 2, -1 16238 'RSA_NO_PADDING': 3, -1 16239 'RSA_PKCS1_OAEP_PADDING': 4, -1 16240 'RSA_X931_PADDING': 5, -1 16241 'RSA_PKCS1_PSS_PADDING': 6, -1 16242 'POINT_CONVERSION_COMPRESSED': 2, -1 16243 'POINT_CONVERSION_UNCOMPRESSED': 4, -1 16244 'POINT_CONVERSION_HYBRID': 6 -1 16245 } -1 16246 -1 16247 },{"browserify-cipher":37,"browserify-sign":44,"browserify-sign/algos":41,"create-ecdh":65,"create-hash":67,"create-hmac":69,"diffie-hellman":78,"pbkdf2":143,"public-encrypt":150,"randombytes":157,"randomfill":158}],72:[function(require,module,exports){ -1 16248 'use strict'; -1 16249 -1 16250 exports.utils = require('./des/utils'); -1 16251 exports.Cipher = require('./des/cipher'); -1 16252 exports.DES = require('./des/des'); -1 16253 exports.CBC = require('./des/cbc'); -1 16254 exports.EDE = require('./des/ede'); -1 16255 -1 16256 },{"./des/cbc":73,"./des/cipher":74,"./des/des":75,"./des/ede":76,"./des/utils":77}],73:[function(require,module,exports){ -1 16257 'use strict'; -1 16258 -1 16259 var assert = require('minimalistic-assert'); -1 16260 var inherits = require('inherits'); -1 16261 -1 16262 var proto = {}; -1 16263 -1 16264 function CBCState(iv) { -1 16265 assert.equal(iv.length, 8, 'Invalid IV length'); -1 16266 -1 16267 this.iv = new Array(8); -1 16268 for (var i = 0; i < this.iv.length; i++) -1 16269 this.iv[i] = iv[i]; -1 16270 } -1 16271 -1 16272 function instantiate(Base) { -1 16273 function CBC(options) { -1 16274 Base.call(this, options); -1 16275 this._cbcInit(); -1 16276 } -1 16277 inherits(CBC, Base); -1 16278 -1 16279 var keys = Object.keys(proto); -1 16280 for (var i = 0; i < keys.length; i++) { -1 16281 var key = keys[i]; -1 16282 CBC.prototype[key] = proto[key]; -1 16283 } -1 16284 -1 16285 CBC.create = function create(options) { -1 16286 return new CBC(options); -1 16287 }; -1 16288 -1 16289 return CBC; -1 16290 } -1 16291 -1 16292 exports.instantiate = instantiate; -1 16293 -1 16294 proto._cbcInit = function _cbcInit() { -1 16295 var state = new CBCState(this.options.iv); -1 16296 this._cbcState = state; -1 16297 }; -1 16298 -1 16299 proto._update = function _update(inp, inOff, out, outOff) { -1 16300 var state = this._cbcState; -1 16301 var superProto = this.constructor.super_.prototype; -1 16302 -1 16303 var iv = state.iv; -1 16304 if (this.type === 'encrypt') { -1 16305 for (var i = 0; i < this.blockSize; i++) -1 16306 iv[i] ^= inp[inOff + i]; -1 16307 -1 16308 superProto._update.call(this, iv, 0, out, outOff); -1 16309 -1 16310 for (var i = 0; i < this.blockSize; i++) -1 16311 iv[i] = out[outOff + i]; -1 16312 } else { -1 16313 superProto._update.call(this, inp, inOff, out, outOff); -1 16314 -1 16315 for (var i = 0; i < this.blockSize; i++) -1 16316 out[outOff + i] ^= iv[i]; -1 16317 -1 16318 for (var i = 0; i < this.blockSize; i++) -1 16319 iv[i] = inp[inOff + i]; -1 16320 } -1 16321 }; -1 16322 -1 16323 },{"inherits":132,"minimalistic-assert":136}],74:[function(require,module,exports){ -1 16324 'use strict'; -1 16325 -1 16326 var assert = require('minimalistic-assert'); -1 16327 -1 16328 function Cipher(options) { -1 16329 this.options = options; -1 16330 -1 16331 this.type = this.options.type; -1 16332 this.blockSize = 8; -1 16333 this._init(); -1 16334 -1 16335 this.buffer = new Array(this.blockSize); -1 16336 this.bufferOff = 0; -1 16337 } -1 16338 module.exports = Cipher; -1 16339 -1 16340 Cipher.prototype._init = function _init() { -1 16341 // Might be overrided -1 16342 }; -1 16343 -1 16344 Cipher.prototype.update = function update(data) { -1 16345 if (data.length === 0) -1 16346 return []; -1 16347 -1 16348 if (this.type === 'decrypt') -1 16349 return this._updateDecrypt(data); -1 16350 else -1 16351 return this._updateEncrypt(data); -1 16352 }; -1 16353 -1 16354 Cipher.prototype._buffer = function _buffer(data, off) { -1 16355 // Append data to buffer -1 16356 var min = Math.min(this.buffer.length - this.bufferOff, data.length - off); -1 16357 for (var i = 0; i < min; i++) -1 16358 this.buffer[this.bufferOff + i] = data[off + i]; -1 16359 this.bufferOff += min; -1 16360 -1 16361 // Shift next -1 16362 return min; -1 16363 }; -1 16364 -1 16365 Cipher.prototype._flushBuffer = function _flushBuffer(out, off) { -1 16366 this._update(this.buffer, 0, out, off); -1 16367 this.bufferOff = 0; -1 16368 return this.blockSize; -1 16369 }; -1 16370 -1 16371 Cipher.prototype._updateEncrypt = function _updateEncrypt(data) { -1 16372 var inputOff = 0; -1 16373 var outputOff = 0; -1 16374 -1 16375 var count = ((this.bufferOff + data.length) / this.blockSize) | 0; -1 16376 var out = new Array(count * this.blockSize); -1 16377 -1 16378 if (this.bufferOff !== 0) { -1 16379 inputOff += this._buffer(data, inputOff); -1 16380 -1 16381 if (this.bufferOff === this.buffer.length) -1 16382 outputOff += this._flushBuffer(out, outputOff); -1 16383 } -1 16384 -1 16385 // Write blocks -1 16386 var max = data.length - ((data.length - inputOff) % this.blockSize); -1 16387 for (; inputOff < max; inputOff += this.blockSize) { -1 16388 this._update(data, inputOff, out, outputOff); -1 16389 outputOff += this.blockSize; -1 16390 } -1 16391 -1 16392 // Queue rest -1 16393 for (; inputOff < data.length; inputOff++, this.bufferOff++) -1 16394 this.buffer[this.bufferOff] = data[inputOff]; -1 16395 -1 16396 return out; -1 16397 }; -1 16398 -1 16399 Cipher.prototype._updateDecrypt = function _updateDecrypt(data) { -1 16400 var inputOff = 0; -1 16401 var outputOff = 0; -1 16402 -1 16403 var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1; -1 16404 var out = new Array(count * this.blockSize); -1 16405 -1 16406 // TODO(indutny): optimize it, this is far from optimal -1 16407 for (; count > 0; count--) { -1 16408 inputOff += this._buffer(data, inputOff); -1 16409 outputOff += this._flushBuffer(out, outputOff); -1 16410 } -1 16411 -1 16412 // Buffer rest of the input -1 16413 inputOff += this._buffer(data, inputOff); -1 16414 -1 16415 return out; -1 16416 }; -1 16417 -1 16418 Cipher.prototype.final = function final(buffer) { -1 16419 var first; -1 16420 if (buffer) -1 16421 first = this.update(buffer); -1 16422 -1 16423 var last; -1 16424 if (this.type === 'encrypt') -1 16425 last = this._finalEncrypt(); -1 16426 else -1 16427 last = this._finalDecrypt(); -1 16428 -1 16429 if (first) -1 16430 return first.concat(last); -1 16431 else -1 16432 return last; -1 16433 }; -1 16434 -1 16435 Cipher.prototype._pad = function _pad(buffer, off) { -1 16436 if (off === 0) -1 16437 return false; -1 16438 -1 16439 while (off < buffer.length) -1 16440 buffer[off++] = 0; -1 16441 -1 16442 return true; -1 16443 }; -1 16444 -1 16445 Cipher.prototype._finalEncrypt = function _finalEncrypt() { -1 16446 if (!this._pad(this.buffer, this.bufferOff)) -1 16447 return []; -1 16448 -1 16449 var out = new Array(this.blockSize); -1 16450 this._update(this.buffer, 0, out, 0); -1 16451 return out; -1 16452 }; -1 16453 -1 16454 Cipher.prototype._unpad = function _unpad(buffer) { -1 16455 return buffer; -1 16456 }; -1 16457 -1 16458 Cipher.prototype._finalDecrypt = function _finalDecrypt() { -1 16459 assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt'); -1 16460 var out = new Array(this.blockSize); -1 16461 this._flushBuffer(out, 0); -1 16462 -1 16463 return this._unpad(out); -1 16464 }; -1 16465 -1 16466 },{"minimalistic-assert":136}],75:[function(require,module,exports){ -1 16467 'use strict'; -1 16468 -1 16469 var assert = require('minimalistic-assert'); -1 16470 var inherits = require('inherits'); -1 16471 -1 16472 var utils = require('./utils'); -1 16473 var Cipher = require('./cipher'); -1 16474 -1 16475 function DESState() { -1 16476 this.tmp = new Array(2); -1 16477 this.keys = null; -1 16478 } -1 16479 -1 16480 function DES(options) { -1 16481 Cipher.call(this, options); -1 16482 -1 16483 var state = new DESState(); -1 16484 this._desState = state; -1 16485 -1 16486 this.deriveKeys(state, options.key); -1 16487 } -1 16488 inherits(DES, Cipher); -1 16489 module.exports = DES; -1 16490 -1 16491 DES.create = function create(options) { -1 16492 return new DES(options); -1 16493 }; -1 16494 -1 16495 var shiftTable = [ -1 16496 1, 1, 2, 2, 2, 2, 2, 2, -1 16497 1, 2, 2, 2, 2, 2, 2, 1 -1 16498 ]; -1 16499 -1 16500 DES.prototype.deriveKeys = function deriveKeys(state, key) { -1 16501 state.keys = new Array(16 * 2); -1 16502 -1 16503 assert.equal(key.length, this.blockSize, 'Invalid key length'); -1 16504 -1 16505 var kL = utils.readUInt32BE(key, 0); -1 16506 var kR = utils.readUInt32BE(key, 4); -1 16507 -1 16508 utils.pc1(kL, kR, state.tmp, 0); -1 16509 kL = state.tmp[0]; -1 16510 kR = state.tmp[1]; -1 16511 for (var i = 0; i < state.keys.length; i += 2) { -1 16512 var shift = shiftTable[i >>> 1]; -1 16513 kL = utils.r28shl(kL, shift); -1 16514 kR = utils.r28shl(kR, shift); -1 16515 utils.pc2(kL, kR, state.keys, i); -1 16516 } -1 16517 }; -1 16518 -1 16519 DES.prototype._update = function _update(inp, inOff, out, outOff) { -1 16520 var state = this._desState; -1 16521 -1 16522 var l = utils.readUInt32BE(inp, inOff); -1 16523 var r = utils.readUInt32BE(inp, inOff + 4); -1 16524 -1 16525 // Initial Permutation -1 16526 utils.ip(l, r, state.tmp, 0); -1 16527 l = state.tmp[0]; -1 16528 r = state.tmp[1]; -1 16529 -1 16530 if (this.type === 'encrypt') -1 16531 this._encrypt(state, l, r, state.tmp, 0); -1 16532 else -1 16533 this._decrypt(state, l, r, state.tmp, 0); -1 16534 -1 16535 l = state.tmp[0]; -1 16536 r = state.tmp[1]; -1 16537 -1 16538 utils.writeUInt32BE(out, l, outOff); -1 16539 utils.writeUInt32BE(out, r, outOff + 4); -1 16540 }; -1 16541 -1 16542 DES.prototype._pad = function _pad(buffer, off) { -1 16543 var value = buffer.length - off; -1 16544 for (var i = off; i < buffer.length; i++) -1 16545 buffer[i] = value; -1 16546 -1 16547 return true; -1 16548 }; -1 16549 -1 16550 DES.prototype._unpad = function _unpad(buffer) { -1 16551 var pad = buffer[buffer.length - 1]; -1 16552 for (var i = buffer.length - pad; i < buffer.length; i++) -1 16553 assert.equal(buffer[i], pad); -1 16554 -1 16555 return buffer.slice(0, buffer.length - pad); -1 16556 }; -1 16557 -1 16558 DES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) { -1 16559 var l = lStart; -1 16560 var r = rStart; -1 16561 -1 16562 // Apply f() x16 times -1 16563 for (var i = 0; i < state.keys.length; i += 2) { -1 16564 var keyL = state.keys[i]; -1 16565 var keyR = state.keys[i + 1]; -1 16566 -1 16567 // f(r, k) -1 16568 utils.expand(r, state.tmp, 0); -1 16569 -1 16570 keyL ^= state.tmp[0]; -1 16571 keyR ^= state.tmp[1]; -1 16572 var s = utils.substitute(keyL, keyR); -1 16573 var f = utils.permute(s); -1 16574 -1 16575 var t = r; -1 16576 r = (l ^ f) >>> 0; -1 16577 l = t; -1 16578 } -1 16579 -1 16580 // Reverse Initial Permutation -1 16581 utils.rip(r, l, out, off); -1 16582 }; -1 16583 -1 16584 DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) { -1 16585 var l = rStart; -1 16586 var r = lStart; -1 16587 -1 16588 // Apply f() x16 times -1 16589 for (var i = state.keys.length - 2; i >= 0; i -= 2) { -1 16590 var keyL = state.keys[i]; -1 16591 var keyR = state.keys[i + 1]; -1 16592 -1 16593 // f(r, k) -1 16594 utils.expand(l, state.tmp, 0); -1 16595 -1 16596 keyL ^= state.tmp[0]; -1 16597 keyR ^= state.tmp[1]; -1 16598 var s = utils.substitute(keyL, keyR); -1 16599 var f = utils.permute(s); -1 16600 -1 16601 var t = l; -1 16602 l = (r ^ f) >>> 0; -1 16603 r = t; -1 16604 } -1 16605 -1 16606 // Reverse Initial Permutation -1 16607 utils.rip(l, r, out, off); -1 16608 }; -1 16609 -1 16610 },{"./cipher":74,"./utils":77,"inherits":132,"minimalistic-assert":136}],76:[function(require,module,exports){ -1 16611 'use strict'; -1 16612 -1 16613 var assert = require('minimalistic-assert'); -1 16614 var inherits = require('inherits'); -1 16615 -1 16616 var Cipher = require('./cipher'); -1 16617 var DES = require('./des'); -1 16618 -1 16619 function EDEState(type, key) { -1 16620 assert.equal(key.length, 24, 'Invalid key length'); -1 16621 -1 16622 var k1 = key.slice(0, 8); -1 16623 var k2 = key.slice(8, 16); -1 16624 var k3 = key.slice(16, 24); -1 16625 -1 16626 if (type === 'encrypt') { -1 16627 this.ciphers = [ -1 16628 DES.create({ type: 'encrypt', key: k1 }), -1 16629 DES.create({ type: 'decrypt', key: k2 }), -1 16630 DES.create({ type: 'encrypt', key: k3 }) -1 16631 ]; -1 16632 } else { -1 16633 this.ciphers = [ -1 16634 DES.create({ type: 'decrypt', key: k3 }), -1 16635 DES.create({ type: 'encrypt', key: k2 }), -1 16636 DES.create({ type: 'decrypt', key: k1 }) -1 16637 ]; -1 16638 } -1 16639 } -1 16640 -1 16641 function EDE(options) { -1 16642 Cipher.call(this, options); -1 16643 -1 16644 var state = new EDEState(this.type, this.options.key); -1 16645 this._edeState = state; -1 16646 } -1 16647 inherits(EDE, Cipher); -1 16648 -1 16649 module.exports = EDE; -1 16650 -1 16651 EDE.create = function create(options) { -1 16652 return new EDE(options); -1 16653 }; -1 16654 -1 16655 EDE.prototype._update = function _update(inp, inOff, out, outOff) { -1 16656 var state = this._edeState; -1 16657 -1 16658 state.ciphers[0]._update(inp, inOff, out, outOff); -1 16659 state.ciphers[1]._update(out, outOff, out, outOff); -1 16660 state.ciphers[2]._update(out, outOff, out, outOff); -1 16661 }; -1 16662 -1 16663 EDE.prototype._pad = DES.prototype._pad; -1 16664 EDE.prototype._unpad = DES.prototype._unpad; -1 16665 -1 16666 },{"./cipher":74,"./des":75,"inherits":132,"minimalistic-assert":136}],77:[function(require,module,exports){ -1 16667 'use strict'; -1 16668 -1 16669 exports.readUInt32BE = function readUInt32BE(bytes, off) { -1 16670 var res = (bytes[0 + off] << 24) | -1 16671 (bytes[1 + off] << 16) | -1 16672 (bytes[2 + off] << 8) | -1 16673 bytes[3 + off]; -1 16674 return res >>> 0; -1 16675 }; -1 16676 -1 16677 exports.writeUInt32BE = function writeUInt32BE(bytes, value, off) { -1 16678 bytes[0 + off] = value >>> 24; -1 16679 bytes[1 + off] = (value >>> 16) & 0xff; -1 16680 bytes[2 + off] = (value >>> 8) & 0xff; -1 16681 bytes[3 + off] = value & 0xff; -1 16682 }; -1 16683 -1 16684 exports.ip = function ip(inL, inR, out, off) { -1 16685 var outL = 0; -1 16686 var outR = 0; -1 16687 -1 16688 for (var i = 6; i >= 0; i -= 2) { -1 16689 for (var j = 0; j <= 24; j += 8) { -1 16690 outL <<= 1; -1 16691 outL |= (inR >>> (j + i)) & 1; -1 16692 } -1 16693 for (var j = 0; j <= 24; j += 8) { -1 16694 outL <<= 1; -1 16695 outL |= (inL >>> (j + i)) & 1; -1 16696 } -1 16697 } -1 16698 -1 16699 for (var i = 6; i >= 0; i -= 2) { -1 16700 for (var j = 1; j <= 25; j += 8) { -1 16701 outR <<= 1; -1 16702 outR |= (inR >>> (j + i)) & 1; -1 16703 } -1 16704 for (var j = 1; j <= 25; j += 8) { -1 16705 outR <<= 1; -1 16706 outR |= (inL >>> (j + i)) & 1; -1 16707 } -1 16708 } -1 16709 -1 16710 out[off + 0] = outL >>> 0; -1 16711 out[off + 1] = outR >>> 0; -1 16712 }; -1 16713 -1 16714 exports.rip = function rip(inL, inR, out, off) { -1 16715 var outL = 0; -1 16716 var outR = 0; -1 16717 -1 16718 for (var i = 0; i < 4; i++) { -1 16719 for (var j = 24; j >= 0; j -= 8) { -1 16720 outL <<= 1; -1 16721 outL |= (inR >>> (j + i)) & 1; -1 16722 outL <<= 1; -1 16723 outL |= (inL >>> (j + i)) & 1; -1 16724 } -1 16725 } -1 16726 for (var i = 4; i < 8; i++) { -1 16727 for (var j = 24; j >= 0; j -= 8) { -1 16728 outR <<= 1; -1 16729 outR |= (inR >>> (j + i)) & 1; -1 16730 outR <<= 1; -1 16731 outR |= (inL >>> (j + i)) & 1; -1 16732 } -1 16733 } -1 16734 -1 16735 out[off + 0] = outL >>> 0; -1 16736 out[off + 1] = outR >>> 0; -1 16737 }; -1 16738 -1 16739 exports.pc1 = function pc1(inL, inR, out, off) { -1 16740 var outL = 0; -1 16741 var outR = 0; -1 16742 -1 16743 // 7, 15, 23, 31, 39, 47, 55, 63 -1 16744 // 6, 14, 22, 30, 39, 47, 55, 63 -1 16745 // 5, 13, 21, 29, 39, 47, 55, 63 -1 16746 // 4, 12, 20, 28 -1 16747 for (var i = 7; i >= 5; i--) { -1 16748 for (var j = 0; j <= 24; j += 8) { -1 16749 outL <<= 1; -1 16750 outL |= (inR >> (j + i)) & 1; -1 16751 } -1 16752 for (var j = 0; j <= 24; j += 8) { -1 16753 outL <<= 1; -1 16754 outL |= (inL >> (j + i)) & 1; -1 16755 } -1 16756 } -1 16757 for (var j = 0; j <= 24; j += 8) { -1 16758 outL <<= 1; -1 16759 outL |= (inR >> (j + i)) & 1; -1 16760 } -1 16761 -1 16762 // 1, 9, 17, 25, 33, 41, 49, 57 -1 16763 // 2, 10, 18, 26, 34, 42, 50, 58 -1 16764 // 3, 11, 19, 27, 35, 43, 51, 59 -1 16765 // 36, 44, 52, 60 -1 16766 for (var i = 1; i <= 3; i++) { -1 16767 for (var j = 0; j <= 24; j += 8) { -1 16768 outR <<= 1; -1 16769 outR |= (inR >> (j + i)) & 1; -1 16770 } -1 16771 for (var j = 0; j <= 24; j += 8) { -1 16772 outR <<= 1; -1 16773 outR |= (inL >> (j + i)) & 1; -1 16774 } -1 16775 } -1 16776 for (var j = 0; j <= 24; j += 8) { -1 16777 outR <<= 1; -1 16778 outR |= (inL >> (j + i)) & 1; -1 16779 } -1 16780 -1 16781 out[off + 0] = outL >>> 0; -1 16782 out[off + 1] = outR >>> 0; -1 16783 }; -1 16784 -1 16785 exports.r28shl = function r28shl(num, shift) { -1 16786 return ((num << shift) & 0xfffffff) | (num >>> (28 - shift)); -1 16787 }; -1 16788 -1 16789 var pc2table = [ -1 16790 // inL => outL -1 16791 14, 11, 17, 4, 27, 23, 25, 0, -1 16792 13, 22, 7, 18, 5, 9, 16, 24, -1 16793 2, 20, 12, 21, 1, 8, 15, 26, -1 16794 -1 16795 // inR => outR -1 16796 15, 4, 25, 19, 9, 1, 26, 16, -1 16797 5, 11, 23, 8, 12, 7, 17, 0, -1 16798 22, 3, 10, 14, 6, 20, 27, 24 -1 16799 ]; -1 16800 -1 16801 exports.pc2 = function pc2(inL, inR, out, off) { -1 16802 var outL = 0; -1 16803 var outR = 0; -1 16804 -1 16805 var len = pc2table.length >>> 1; -1 16806 for (var i = 0; i < len; i++) { -1 16807 outL <<= 1; -1 16808 outL |= (inL >>> pc2table[i]) & 0x1; -1 16809 } -1 16810 for (var i = len; i < pc2table.length; i++) { -1 16811 outR <<= 1; -1 16812 outR |= (inR >>> pc2table[i]) & 0x1; -1 16813 } -1 16814 -1 16815 out[off + 0] = outL >>> 0; -1 16816 out[off + 1] = outR >>> 0; -1 16817 }; -1 16818 -1 16819 exports.expand = function expand(r, out, off) { -1 16820 var outL = 0; -1 16821 var outR = 0; -1 16822 -1 16823 outL = ((r & 1) << 5) | (r >>> 27); -1 16824 for (var i = 23; i >= 15; i -= 4) { -1 16825 outL <<= 6; -1 16826 outL |= (r >>> i) & 0x3f; -1 16827 } -1 16828 for (var i = 11; i >= 3; i -= 4) { -1 16829 outR |= (r >>> i) & 0x3f; -1 16830 outR <<= 6; -1 16831 } -1 16832 outR |= ((r & 0x1f) << 1) | (r >>> 31); -1 16833 -1 16834 out[off + 0] = outL >>> 0; -1 16835 out[off + 1] = outR >>> 0; -1 16836 }; -1 16837 -1 16838 var sTable = [ -1 16839 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1, -1 16840 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8, -1 16841 4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7, -1 16842 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13, -1 16843 -1 16844 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14, -1 16845 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5, -1 16846 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2, -1 16847 5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9, -1 16848 -1 16849 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10, -1 16850 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1, -1 16851 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7, -1 16852 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12, -1 16853 -1 16854 7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3, -1 16855 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9, -1 16856 10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8, -1 16857 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14, -1 16858 -1 16859 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1, -1 16860 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6, -1 16861 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13, -1 16862 15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3, -1 16863 -1 16864 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5, -1 16865 0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, 11, 5, 3, 11, 8, -1 16866 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10, -1 16867 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13, -1 16868 -1 16869 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10, -1 16870 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6, -1 16871 1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7, -1 16872 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12, -1 16873 -1 16874 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4, -1 16875 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2, -1 16876 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13, -1 16877 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11 -1 16878 ]; -1 16879 -1 16880 exports.substitute = function substitute(inL, inR) { -1 16881 var out = 0; -1 16882 for (var i = 0; i < 4; i++) { -1 16883 var b = (inL >>> (18 - i * 6)) & 0x3f; -1 16884 var sb = sTable[i * 0x40 + b]; -1 16885 -1 16886 out <<= 4; -1 16887 out |= sb; -1 16888 } -1 16889 for (var i = 0; i < 4; i++) { -1 16890 var b = (inR >>> (18 - i * 6)) & 0x3f; -1 16891 var sb = sTable[4 * 0x40 + i * 0x40 + b]; -1 16892 -1 16893 out <<= 4; -1 16894 out |= sb; -1 16895 } -1 16896 return out >>> 0; -1 16897 }; -1 16898 -1 16899 var permuteTable = [ -1 16900 16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22, -1 16901 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7 -1 16902 ]; -1 16903 -1 16904 exports.permute = function permute(num) { -1 16905 var out = 0; -1 16906 for (var i = 0; i < permuteTable.length; i++) { -1 16907 out <<= 1; -1 16908 out |= (num >>> permuteTable[i]) & 0x1; -1 16909 } -1 16910 return out >>> 0; -1 16911 }; -1 16912 -1 16913 exports.padSplit = function padSplit(num, size, group) { -1 16914 var str = num.toString(2); -1 16915 while (str.length < size) -1 16916 str = '0' + str; -1 16917 -1 16918 var out = []; -1 16919 for (var i = 0; i < size; i += group) -1 16920 out.push(str.slice(i, i + group)); -1 16921 return out.join(' '); -1 16922 }; -1 16923 -1 16924 },{}],78:[function(require,module,exports){ -1 16925 (function (Buffer){(function (){ -1 16926 var generatePrime = require('./lib/generatePrime') -1 16927 var primes = require('./lib/primes.json') -1 16928 -1 16929 var DH = require('./lib/dh') -1 16930 -1 16931 function getDiffieHellman (mod) { -1 16932 var prime = new Buffer(primes[mod].prime, 'hex') -1 16933 var gen = new Buffer(primes[mod].gen, 'hex') -1 16934 -1 16935 return new DH(prime, gen) -1 16936 } -1 16937 -1 16938 var ENCODINGS = { -1 16939 'binary': true, 'hex': true, 'base64': true -1 16940 } -1 16941 -1 16942 function createDiffieHellman (prime, enc, generator, genc) { -1 16943 if (Buffer.isBuffer(enc) || ENCODINGS[enc] === undefined) { -1 16944 return createDiffieHellman(prime, 'binary', enc, generator) -1 16945 } -1 16946 -1 16947 enc = enc || 'binary' -1 16948 genc = genc || 'binary' -1 16949 generator = generator || new Buffer([2]) -1 16950 -1 16951 if (!Buffer.isBuffer(generator)) { -1 16952 generator = new Buffer(generator, genc) -1 16953 } -1 16954 -1 16955 if (typeof prime === 'number') { -1 16956 return new DH(generatePrime(prime, generator), generator, true) -1 16957 } -1 16958 -1 16959 if (!Buffer.isBuffer(prime)) { -1 16960 prime = new Buffer(prime, enc) -1 16961 } -1 16962 -1 16963 return new DH(prime, generator, true) -1 16964 } -1 16965 -1 16966 exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffieHellman = getDiffieHellman -1 16967 exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman -1 16968 -1 16969 }).call(this)}).call(this,require("buffer").Buffer) -1 16970 },{"./lib/dh":79,"./lib/generatePrime":80,"./lib/primes.json":81,"buffer":63}],79:[function(require,module,exports){ -1 16971 (function (Buffer){(function (){ -1 16972 var BN = require('bn.js'); -1 16973 var MillerRabin = require('miller-rabin'); -1 16974 var millerRabin = new MillerRabin(); -1 16975 var TWENTYFOUR = new BN(24); -1 16976 var ELEVEN = new BN(11); -1 16977 var TEN = new BN(10); -1 16978 var THREE = new BN(3); -1 16979 var SEVEN = new BN(7); -1 16980 var primes = require('./generatePrime'); -1 16981 var randomBytes = require('randombytes'); -1 16982 module.exports = DH; -1 16983 -1 16984 function setPublicKey(pub, enc) { -1 16985 enc = enc || 'utf8'; -1 16986 if (!Buffer.isBuffer(pub)) { -1 16987 pub = new Buffer(pub, enc); -1 16988 } -1 16989 this._pub = new BN(pub); -1 16990 return this; -1 16991 } -1 16992 -1 16993 function setPrivateKey(priv, enc) { -1 16994 enc = enc || 'utf8'; -1 16995 if (!Buffer.isBuffer(priv)) { -1 16996 priv = new Buffer(priv, enc); -1 16997 } -1 16998 this._priv = new BN(priv); -1 16999 return this; -1 17000 } -1 17001 -1 17002 var primeCache = {}; -1 17003 function checkPrime(prime, generator) { -1 17004 var gen = generator.toString('hex'); -1 17005 var hex = [gen, prime.toString(16)].join('_'); -1 17006 if (hex in primeCache) { -1 17007 return primeCache[hex]; -1 17008 } -1 17009 var error = 0; -1 17010 -1 17011 if (prime.isEven() || -1 17012 !primes.simpleSieve || -1 17013 !primes.fermatTest(prime) || -1 17014 !millerRabin.test(prime)) { -1 17015 //not a prime so +1 -1 17016 error += 1; -1 17017 -1 17018 if (gen === '02' || gen === '05') { -1 17019 // we'd be able to check the generator -1 17020 // it would fail so +8 -1 17021 error += 8; -1 17022 } else { -1 17023 //we wouldn't be able to test the generator -1 17024 // so +4 -1 17025 error += 4; -1 17026 } -1 17027 primeCache[hex] = error; -1 17028 return error; -1 17029 } -1 17030 if (!millerRabin.test(prime.shrn(1))) { -1 17031 //not a safe prime -1 17032 error += 2; -1 17033 } -1 17034 var rem; -1 17035 switch (gen) { -1 17036 case '02': -1 17037 if (prime.mod(TWENTYFOUR).cmp(ELEVEN)) { -1 17038 // unsuidable generator -1 17039 error += 8; -1 17040 } -1 17041 break; -1 17042 case '05': -1 17043 rem = prime.mod(TEN); -1 17044 if (rem.cmp(THREE) && rem.cmp(SEVEN)) { -1 17045 // prime mod 10 needs to equal 3 or 7 -1 17046 error += 8; -1 17047 } -1 17048 break; -1 17049 default: -1 17050 error += 4; -1 17051 } -1 17052 primeCache[hex] = error; -1 17053 return error; -1 17054 } -1 17055 -1 17056 function DH(prime, generator, malleable) { -1 17057 this.setGenerator(generator); -1 17058 this.__prime = new BN(prime); -1 17059 this._prime = BN.mont(this.__prime); -1 17060 this._primeLen = prime.length; -1 17061 this._pub = undefined; -1 17062 this._priv = undefined; -1 17063 this._primeCode = undefined; -1 17064 if (malleable) { -1 17065 this.setPublicKey = setPublicKey; -1 17066 this.setPrivateKey = setPrivateKey; -1 17067 } else { -1 17068 this._primeCode = 8; -1 17069 } -1 17070 } -1 17071 Object.defineProperty(DH.prototype, 'verifyError', { -1 17072 enumerable: true, -1 17073 get: function () { -1 17074 if (typeof this._primeCode !== 'number') { -1 17075 this._primeCode = checkPrime(this.__prime, this.__gen); -1 17076 } -1 17077 return this._primeCode; -1 17078 } -1 17079 }); -1 17080 DH.prototype.generateKeys = function () { -1 17081 if (!this._priv) { -1 17082 this._priv = new BN(randomBytes(this._primeLen)); -1 17083 } -1 17084 this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed(); -1 17085 return this.getPublicKey(); -1 17086 }; -1 17087 -1 17088 DH.prototype.computeSecret = function (other) { -1 17089 other = new BN(other); -1 17090 other = other.toRed(this._prime); -1 17091 var secret = other.redPow(this._priv).fromRed(); -1 17092 var out = new Buffer(secret.toArray()); -1 17093 var prime = this.getPrime(); -1 17094 if (out.length < prime.length) { -1 17095 var front = new Buffer(prime.length - out.length); -1 17096 front.fill(0); -1 17097 out = Buffer.concat([front, out]); -1 17098 } -1 17099 return out; -1 17100 }; -1 17101 -1 17102 DH.prototype.getPublicKey = function getPublicKey(enc) { -1 17103 return formatReturnValue(this._pub, enc); -1 17104 }; -1 17105 -1 17106 DH.prototype.getPrivateKey = function getPrivateKey(enc) { -1 17107 return formatReturnValue(this._priv, enc); -1 17108 }; -1 17109 -1 17110 DH.prototype.getPrime = function (enc) { -1 17111 return formatReturnValue(this.__prime, enc); -1 17112 }; -1 17113 -1 17114 DH.prototype.getGenerator = function (enc) { -1 17115 return formatReturnValue(this._gen, enc); -1 17116 }; -1 17117 -1 17118 DH.prototype.setGenerator = function (gen, enc) { -1 17119 enc = enc || 'utf8'; -1 17120 if (!Buffer.isBuffer(gen)) { -1 17121 gen = new Buffer(gen, enc); -1 17122 } -1 17123 this.__gen = gen; -1 17124 this._gen = new BN(gen); -1 17125 return this; -1 17126 }; -1 17127 -1 17128 function formatReturnValue(bn, enc) { -1 17129 var buf = new Buffer(bn.toArray()); -1 17130 if (!enc) { -1 17131 return buf; -1 17132 } else { -1 17133 return buf.toString(enc); -1 17134 } -1 17135 } -1 17136 -1 17137 }).call(this)}).call(this,require("buffer").Buffer) -1 17138 },{"./generatePrime":80,"bn.js":82,"buffer":63,"miller-rabin":134,"randombytes":157}],80:[function(require,module,exports){ -1 17139 var randomBytes = require('randombytes'); -1 17140 module.exports = findPrime; -1 17141 findPrime.simpleSieve = simpleSieve; -1 17142 findPrime.fermatTest = fermatTest; -1 17143 var BN = require('bn.js'); -1 17144 var TWENTYFOUR = new BN(24); -1 17145 var MillerRabin = require('miller-rabin'); -1 17146 var millerRabin = new MillerRabin(); -1 17147 var ONE = new BN(1); -1 17148 var TWO = new BN(2); -1 17149 var FIVE = new BN(5); -1 17150 var SIXTEEN = new BN(16); -1 17151 var EIGHT = new BN(8); -1 17152 var TEN = new BN(10); -1 17153 var THREE = new BN(3); -1 17154 var SEVEN = new BN(7); -1 17155 var ELEVEN = new BN(11); -1 17156 var FOUR = new BN(4); -1 17157 var TWELVE = new BN(12); -1 17158 var primes = null; -1 17159 -1 17160 function _getPrimes() { -1 17161 if (primes !== null) -1 17162 return primes; -1 17163 -1 17164 var limit = 0x100000; -1 17165 var res = []; -1 17166 res[0] = 2; -1 17167 for (var i = 1, k = 3; k < limit; k += 2) { -1 17168 var sqrt = Math.ceil(Math.sqrt(k)); -1 17169 for (var j = 0; j < i && res[j] <= sqrt; j++) -1 17170 if (k % res[j] === 0) -1 17171 break; -1 17172 -1 17173 if (i !== j && res[j] <= sqrt) -1 17174 continue; -1 17175 -1 17176 res[i++] = k; -1 17177 } -1 17178 primes = res; -1 17179 return res; -1 17180 } -1 17181 -1 17182 function simpleSieve(p) { -1 17183 var primes = _getPrimes(); -1 17184 -1 17185 for (var i = 0; i < primes.length; i++) -1 17186 if (p.modn(primes[i]) === 0) { -1 17187 if (p.cmpn(primes[i]) === 0) { -1 17188 return true; -1 17189 } else { -1 17190 return false; -1 17191 } -1 17192 } -1 17193 -1 17194 return true; -1 17195 } -1 17196 -1 17197 function fermatTest(p) { -1 17198 var red = BN.mont(p); -1 17199 return TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1) === 0; -1 17200 } -1 17201 -1 17202 function findPrime(bits, gen) { -1 17203 if (bits < 16) { -1 17204 // this is what openssl does -1 17205 if (gen === 2 || gen === 5) { -1 17206 return new BN([0x8c, 0x7b]); -1 17207 } else { -1 17208 return new BN([0x8c, 0x27]); -1 17209 } -1 17210 } -1 17211 gen = new BN(gen); -1 17212 -1 17213 var num, n2; -1 17214 -1 17215 while (true) { -1 17216 num = new BN(randomBytes(Math.ceil(bits / 8))); -1 17217 while (num.bitLength() > bits) { -1 17218 num.ishrn(1); -1 17219 } -1 17220 if (num.isEven()) { -1 17221 num.iadd(ONE); -1 17222 } -1 17223 if (!num.testn(1)) { -1 17224 num.iadd(TWO); -1 17225 } -1 17226 if (!gen.cmp(TWO)) { -1 17227 while (num.mod(TWENTYFOUR).cmp(ELEVEN)) { -1 17228 num.iadd(FOUR); -1 17229 } -1 17230 } else if (!gen.cmp(FIVE)) { -1 17231 while (num.mod(TEN).cmp(THREE)) { -1 17232 num.iadd(FOUR); -1 17233 } -1 17234 } -1 17235 n2 = num.shrn(1); -1 17236 if (simpleSieve(n2) && simpleSieve(num) && -1 17237 fermatTest(n2) && fermatTest(num) && -1 17238 millerRabin.test(n2) && millerRabin.test(num)) { -1 17239 return num; -1 17240 } -1 17241 } -1 17242 -1 17243 } -1 17244 -1 17245 },{"bn.js":82,"miller-rabin":134,"randombytes":157}],81:[function(require,module,exports){ -1 17246 module.exports={ -1 17247 "modp1": { -1 17248 "gen": "02", -1 17249 "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff" -1 17250 }, -1 17251 "modp2": { -1 17252 "gen": "02", -1 17253 "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff" -1 17254 }, -1 17255 "modp5": { -1 17256 "gen": "02", -1 17257 "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff" -1 17258 }, -1 17259 "modp14": { -1 17260 "gen": "02", -1 17261 "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff" -1 17262 }, -1 17263 "modp15": { -1 17264 "gen": "02", -1 17265 "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff" -1 17266 }, -1 17267 "modp16": { -1 17268 "gen": "02", -1 17269 "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff" -1 17270 }, -1 17271 "modp17": { -1 17272 "gen": "02", -1 17273 "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff" -1 17274 }, -1 17275 "modp18": { -1 17276 "gen": "02", -1 17277 "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff" -1 17278 } -1 17279 } -1 17280 },{}],82:[function(require,module,exports){ -1 17281 arguments[4][15][0].apply(exports,arguments) -1 17282 },{"buffer":19,"dup":15}],83:[function(require,module,exports){ -1 17283 'use strict'; -1 17284 -1 17285 var elliptic = exports; -1 17286 -1 17287 elliptic.version = require('../package.json').version; -1 17288 elliptic.utils = require('./elliptic/utils'); -1 17289 elliptic.rand = require('brorand'); -1 17290 elliptic.curve = require('./elliptic/curve'); -1 17291 elliptic.curves = require('./elliptic/curves'); -1 17292 -1 17293 // Protocols -1 17294 elliptic.ec = require('./elliptic/ec'); -1 17295 elliptic.eddsa = require('./elliptic/eddsa'); -1 17296 -1 17297 },{"../package.json":99,"./elliptic/curve":86,"./elliptic/curves":89,"./elliptic/ec":90,"./elliptic/eddsa":93,"./elliptic/utils":97,"brorand":18}],84:[function(require,module,exports){ -1 17298 'use strict'; -1 17299 -1 17300 var BN = require('bn.js'); -1 17301 var utils = require('../utils'); -1 17302 var getNAF = utils.getNAF; -1 17303 var getJSF = utils.getJSF; -1 17304 var assert = utils.assert; -1 17305 -1 17306 function BaseCurve(type, conf) { -1 17307 this.type = type; -1 17308 this.p = new BN(conf.p, 16); -1 17309 -1 17310 // Use Montgomery, when there is no fast reduction for the prime -1 17311 this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p); -1 17312 -1 17313 // Useful for many curves -1 17314 this.zero = new BN(0).toRed(this.red); -1 17315 this.one = new BN(1).toRed(this.red); -1 17316 this.two = new BN(2).toRed(this.red); -1 17317 -1 17318 // Curve configuration, optional -1 17319 this.n = conf.n && new BN(conf.n, 16); -1 17320 this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed); -1 17321 -1 17322 // Temporary arrays -1 17323 this._wnafT1 = new Array(4); -1 17324 this._wnafT2 = new Array(4); -1 17325 this._wnafT3 = new Array(4); -1 17326 this._wnafT4 = new Array(4); -1 17327 -1 17328 this._bitLength = this.n ? this.n.bitLength() : 0; -1 17329 -1 17330 // Generalized Greg Maxwell's trick -1 17331 var adjustCount = this.n && this.p.div(this.n); -1 17332 if (!adjustCount || adjustCount.cmpn(100) > 0) { -1 17333 this.redN = null; -1 17334 } else { -1 17335 this._maxwellTrick = true; -1 17336 this.redN = this.n.toRed(this.red); -1 17337 } -1 17338 } -1 17339 module.exports = BaseCurve; -1 17340 -1 17341 BaseCurve.prototype.point = function point() { -1 17342 throw new Error('Not implemented'); -1 17343 }; -1 17344 -1 17345 BaseCurve.prototype.validate = function validate() { -1 17346 throw new Error('Not implemented'); -1 17347 }; -1 17348 -1 17349 BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) { -1 17350 assert(p.precomputed); -1 17351 var doubles = p._getDoubles(); -1 17352 -1 17353 var naf = getNAF(k, 1, this._bitLength); -1 17354 var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1); -1 17355 I /= 3; -1 17356 -1 17357 // Translate into more windowed form -1 17358 var repr = []; -1 17359 var j; -1 17360 var nafW; -1 17361 for (j = 0; j < naf.length; j += doubles.step) { -1 17362 nafW = 0; -1 17363 for (var l = j + doubles.step - 1; l >= j; l--) -1 17364 nafW = (nafW << 1) + naf[l]; -1 17365 repr.push(nafW); -1 17366 } -1 17367 -1 17368 var a = this.jpoint(null, null, null); -1 17369 var b = this.jpoint(null, null, null); -1 17370 for (var i = I; i > 0; i--) { -1 17371 for (j = 0; j < repr.length; j++) { -1 17372 nafW = repr[j]; -1 17373 if (nafW === i) -1 17374 b = b.mixedAdd(doubles.points[j]); -1 17375 else if (nafW === -i) -1 17376 b = b.mixedAdd(doubles.points[j].neg()); -1 17377 } -1 17378 a = a.add(b); -1 17379 } -1 17380 return a.toP(); -1 17381 }; -1 17382 -1 17383 BaseCurve.prototype._wnafMul = function _wnafMul(p, k) { -1 17384 var w = 4; -1 17385 -1 17386 // Precompute window -1 17387 var nafPoints = p._getNAFPoints(w); -1 17388 w = nafPoints.wnd; -1 17389 var wnd = nafPoints.points; -1 17390 -1 17391 // Get NAF form -1 17392 var naf = getNAF(k, w, this._bitLength); -1 17393 -1 17394 // Add `this`*(N+1) for every w-NAF index -1 17395 var acc = this.jpoint(null, null, null); -1 17396 for (var i = naf.length - 1; i >= 0; i--) { -1 17397 // Count zeroes -1 17398 for (var l = 0; i >= 0 && naf[i] === 0; i--) -1 17399 l++; -1 17400 if (i >= 0) -1 17401 l++; -1 17402 acc = acc.dblp(l); -1 17403 -1 17404 if (i < 0) -1 17405 break; -1 17406 var z = naf[i]; -1 17407 assert(z !== 0); -1 17408 if (p.type === 'affine') { -1 17409 // J +- P -1 17410 if (z > 0) -1 17411 acc = acc.mixedAdd(wnd[(z - 1) >> 1]); -1 17412 else -1 17413 acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg()); -1 17414 } else { -1 17415 // J +- J -1 17416 if (z > 0) -1 17417 acc = acc.add(wnd[(z - 1) >> 1]); -1 17418 else -1 17419 acc = acc.add(wnd[(-z - 1) >> 1].neg()); -1 17420 } -1 17421 } -1 17422 return p.type === 'affine' ? acc.toP() : acc; -1 17423 }; -1 17424 -1 17425 BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, -1 17426 points, -1 17427 coeffs, -1 17428 len, -1 17429 jacobianResult) { -1 17430 var wndWidth = this._wnafT1; -1 17431 var wnd = this._wnafT2; -1 17432 var naf = this._wnafT3; -1 17433 -1 17434 // Fill all arrays -1 17435 var max = 0; -1 17436 var i; -1 17437 var j; -1 17438 var p; -1 17439 for (i = 0; i < len; i++) { -1 17440 p = points[i]; -1 17441 var nafPoints = p._getNAFPoints(defW); -1 17442 wndWidth[i] = nafPoints.wnd; -1 17443 wnd[i] = nafPoints.points; -1 17444 } -1 17445 -1 17446 // Comb small window NAFs -1 17447 for (i = len - 1; i >= 1; i -= 2) { -1 17448 var a = i - 1; -1 17449 var b = i; -1 17450 if (wndWidth[a] !== 1 || wndWidth[b] !== 1) { -1 17451 naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength); -1 17452 naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength); -1 17453 max = Math.max(naf[a].length, max); -1 17454 max = Math.max(naf[b].length, max); -1 17455 continue; -1 17456 } -1 17457 -1 17458 var comb = [ -1 17459 points[a], /* 1 */ -1 17460 null, /* 3 */ -1 17461 null, /* 5 */ -1 17462 points[b], /* 7 */ -1 17463 ]; -1 17464 -1 17465 // Try to avoid Projective points, if possible -1 17466 if (points[a].y.cmp(points[b].y) === 0) { -1 17467 comb[1] = points[a].add(points[b]); -1 17468 comb[2] = points[a].toJ().mixedAdd(points[b].neg()); -1 17469 } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) { -1 17470 comb[1] = points[a].toJ().mixedAdd(points[b]); -1 17471 comb[2] = points[a].add(points[b].neg()); -1 17472 } else { -1 17473 comb[1] = points[a].toJ().mixedAdd(points[b]); -1 17474 comb[2] = points[a].toJ().mixedAdd(points[b].neg()); -1 17475 } -1 17476 -1 17477 var index = [ -1 17478 -3, /* -1 -1 */ -1 17479 -1, /* -1 0 */ -1 17480 -5, /* -1 1 */ -1 17481 -7, /* 0 -1 */ -1 17482 0, /* 0 0 */ -1 17483 7, /* 0 1 */ -1 17484 5, /* 1 -1 */ -1 17485 1, /* 1 0 */ -1 17486 3, /* 1 1 */ -1 17487 ]; -1 17488 -1 17489 var jsf = getJSF(coeffs[a], coeffs[b]); -1 17490 max = Math.max(jsf[0].length, max); -1 17491 naf[a] = new Array(max); -1 17492 naf[b] = new Array(max); -1 17493 for (j = 0; j < max; j++) { -1 17494 var ja = jsf[0][j] | 0; -1 17495 var jb = jsf[1][j] | 0; -1 17496 -1 17497 naf[a][j] = index[(ja + 1) * 3 + (jb + 1)]; -1 17498 naf[b][j] = 0; -1 17499 wnd[a] = comb; -1 17500 } -1 17501 } -1 17502 -1 17503 var acc = this.jpoint(null, null, null); -1 17504 var tmp = this._wnafT4; -1 17505 for (i = max; i >= 0; i--) { -1 17506 var k = 0; -1 17507 -1 17508 while (i >= 0) { -1 17509 var zero = true; -1 17510 for (j = 0; j < len; j++) { -1 17511 tmp[j] = naf[j][i] | 0; -1 17512 if (tmp[j] !== 0) -1 17513 zero = false; -1 17514 } -1 17515 if (!zero) -1 17516 break; -1 17517 k++; -1 17518 i--; -1 17519 } -1 17520 if (i >= 0) -1 17521 k++; -1 17522 acc = acc.dblp(k); -1 17523 if (i < 0) -1 17524 break; -1 17525 -1 17526 for (j = 0; j < len; j++) { -1 17527 var z = tmp[j]; -1 17528 p; -1 17529 if (z === 0) -1 17530 continue; -1 17531 else if (z > 0) -1 17532 p = wnd[j][(z - 1) >> 1]; -1 17533 else if (z < 0) -1 17534 p = wnd[j][(-z - 1) >> 1].neg(); -1 17535 -1 17536 if (p.type === 'affine') -1 17537 acc = acc.mixedAdd(p); -1 17538 else -1 17539 acc = acc.add(p); -1 17540 } -1 17541 } -1 17542 // Zeroify references -1 17543 for (i = 0; i < len; i++) -1 17544 wnd[i] = null; -1 17545 -1 17546 if (jacobianResult) -1 17547 return acc; -1 17548 else -1 17549 return acc.toP(); -1 17550 }; -1 17551 -1 17552 function BasePoint(curve, type) { -1 17553 this.curve = curve; -1 17554 this.type = type; -1 17555 this.precomputed = null; -1 17556 } -1 17557 BaseCurve.BasePoint = BasePoint; -1 17558 -1 17559 BasePoint.prototype.eq = function eq(/*other*/) { -1 17560 throw new Error('Not implemented'); -1 17561 }; -1 17562 -1 17563 BasePoint.prototype.validate = function validate() { -1 17564 return this.curve.validate(this); -1 17565 }; -1 17566 -1 17567 BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) { -1 17568 bytes = utils.toArray(bytes, enc); -1 17569 -1 17570 var len = this.p.byteLength(); -1 17571 -1 17572 // uncompressed, hybrid-odd, hybrid-even -1 17573 if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) && -1 17574 bytes.length - 1 === 2 * len) { -1 17575 if (bytes[0] === 0x06) -1 17576 assert(bytes[bytes.length - 1] % 2 === 0); -1 17577 else if (bytes[0] === 0x07) -1 17578 assert(bytes[bytes.length - 1] % 2 === 1); -1 17579 -1 17580 var res = this.point(bytes.slice(1, 1 + len), -1 17581 bytes.slice(1 + len, 1 + 2 * len)); -1 17582 -1 17583 return res; -1 17584 } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) && -1 17585 bytes.length - 1 === len) { -1 17586 return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03); -1 17587 } -1 17588 throw new Error('Unknown point format'); -1 17589 }; -1 17590 -1 17591 BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) { -1 17592 return this.encode(enc, true); -1 17593 }; -1 17594 -1 17595 BasePoint.prototype._encode = function _encode(compact) { -1 17596 var len = this.curve.p.byteLength(); -1 17597 var x = this.getX().toArray('be', len); -1 17598 -1 17599 if (compact) -1 17600 return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x); -1 17601 -1 17602 return [ 0x04 ].concat(x, this.getY().toArray('be', len)); -1 17603 }; -1 17604 -1 17605 BasePoint.prototype.encode = function encode(enc, compact) { -1 17606 return utils.encode(this._encode(compact), enc); -1 17607 }; -1 17608 -1 17609 BasePoint.prototype.precompute = function precompute(power) { -1 17610 if (this.precomputed) -1 17611 return this; -1 17612 -1 17613 var precomputed = { -1 17614 doubles: null, -1 17615 naf: null, -1 17616 beta: null, -1 17617 }; -1 17618 precomputed.naf = this._getNAFPoints(8); -1 17619 precomputed.doubles = this._getDoubles(4, power); -1 17620 precomputed.beta = this._getBeta(); -1 17621 this.precomputed = precomputed; -1 17622 -1 17623 return this; -1 17624 }; -1 17625 -1 17626 BasePoint.prototype._hasDoubles = function _hasDoubles(k) { -1 17627 if (!this.precomputed) -1 17628 return false; -1 17629 -1 17630 var doubles = this.precomputed.doubles; -1 17631 if (!doubles) -1 17632 return false; -1 17633 -1 17634 return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step); -1 17635 }; -1 17636 -1 17637 BasePoint.prototype._getDoubles = function _getDoubles(step, power) { -1 17638 if (this.precomputed && this.precomputed.doubles) -1 17639 return this.precomputed.doubles; -1 17640 -1 17641 var doubles = [ this ]; -1 17642 var acc = this; -1 17643 for (var i = 0; i < power; i += step) { -1 17644 for (var j = 0; j < step; j++) -1 17645 acc = acc.dbl(); -1 17646 doubles.push(acc); -1 17647 } -1 17648 return { -1 17649 step: step, -1 17650 points: doubles, -1 17651 }; -1 17652 }; -1 17653 -1 17654 BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) { -1 17655 if (this.precomputed && this.precomputed.naf) -1 17656 return this.precomputed.naf; -1 17657 -1 17658 var res = [ this ]; -1 17659 var max = (1 << wnd) - 1; -1 17660 var dbl = max === 1 ? null : this.dbl(); -1 17661 for (var i = 1; i < max; i++) -1 17662 res[i] = res[i - 1].add(dbl); -1 17663 return { -1 17664 wnd: wnd, -1 17665 points: res, -1 17666 }; -1 17667 }; -1 17668 -1 17669 BasePoint.prototype._getBeta = function _getBeta() { -1 17670 return null; -1 17671 }; -1 17672 -1 17673 BasePoint.prototype.dblp = function dblp(k) { -1 17674 var r = this; -1 17675 for (var i = 0; i < k; i++) -1 17676 r = r.dbl(); -1 17677 return r; -1 17678 }; -1 17679 -1 17680 },{"../utils":97,"bn.js":98}],85:[function(require,module,exports){ -1 17681 'use strict'; -1 17682 -1 17683 var utils = require('../utils'); -1 17684 var BN = require('bn.js'); -1 17685 var inherits = require('inherits'); -1 17686 var Base = require('./base'); -1 17687 -1 17688 var assert = utils.assert; -1 17689 -1 17690 function EdwardsCurve(conf) { -1 17691 // NOTE: Important as we are creating point in Base.call() -1 17692 this.twisted = (conf.a | 0) !== 1; -1 17693 this.mOneA = this.twisted && (conf.a | 0) === -1; -1 17694 this.extended = this.mOneA; -1 17695 -1 17696 Base.call(this, 'edwards', conf); -1 17697 -1 17698 this.a = new BN(conf.a, 16).umod(this.red.m); -1 17699 this.a = this.a.toRed(this.red); -1 17700 this.c = new BN(conf.c, 16).toRed(this.red); -1 17701 this.c2 = this.c.redSqr(); -1 17702 this.d = new BN(conf.d, 16).toRed(this.red); -1 17703 this.dd = this.d.redAdd(this.d); -1 17704 -1 17705 assert(!this.twisted || this.c.fromRed().cmpn(1) === 0); -1 17706 this.oneC = (conf.c | 0) === 1; -1 17707 } -1 17708 inherits(EdwardsCurve, Base); -1 17709 module.exports = EdwardsCurve; -1 17710 -1 17711 EdwardsCurve.prototype._mulA = function _mulA(num) { -1 17712 if (this.mOneA) -1 17713 return num.redNeg(); -1 17714 else -1 17715 return this.a.redMul(num); -1 17716 }; -1 17717 -1 17718 EdwardsCurve.prototype._mulC = function _mulC(num) { -1 17719 if (this.oneC) -1 17720 return num; -1 17721 else -1 17722 return this.c.redMul(num); -1 17723 }; -1 17724 -1 17725 // Just for compatibility with Short curve -1 17726 EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) { -1 17727 return this.point(x, y, z, t); -1 17728 }; -1 17729 -1 17730 EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) { -1 17731 x = new BN(x, 16); -1 17732 if (!x.red) -1 17733 x = x.toRed(this.red); -1 17734 -1 17735 var x2 = x.redSqr(); -1 17736 var rhs = this.c2.redSub(this.a.redMul(x2)); -1 17737 var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2)); -1 17738 -1 17739 var y2 = rhs.redMul(lhs.redInvm()); -1 17740 var y = y2.redSqrt(); -1 17741 if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) -1 17742 throw new Error('invalid point'); -1 17743 -1 17744 var isOdd = y.fromRed().isOdd(); -1 17745 if (odd && !isOdd || !odd && isOdd) -1 17746 y = y.redNeg(); -1 17747 -1 17748 return this.point(x, y); -1 17749 }; -1 17750 -1 17751 EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) { -1 17752 y = new BN(y, 16); -1 17753 if (!y.red) -1 17754 y = y.toRed(this.red); -1 17755 -1 17756 // x^2 = (y^2 - c^2) / (c^2 d y^2 - a) -1 17757 var y2 = y.redSqr(); -1 17758 var lhs = y2.redSub(this.c2); -1 17759 var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a); -1 17760 var x2 = lhs.redMul(rhs.redInvm()); -1 17761 -1 17762 if (x2.cmp(this.zero) === 0) { -1 17763 if (odd) -1 17764 throw new Error('invalid point'); -1 17765 else -1 17766 return this.point(this.zero, y); -1 17767 } -1 17768 -1 17769 var x = x2.redSqrt(); -1 17770 if (x.redSqr().redSub(x2).cmp(this.zero) !== 0) -1 17771 throw new Error('invalid point'); -1 17772 -1 17773 if (x.fromRed().isOdd() !== odd) -1 17774 x = x.redNeg(); -1 17775 -1 17776 return this.point(x, y); -1 17777 }; -1 17778 -1 17779 EdwardsCurve.prototype.validate = function validate(point) { -1 17780 if (point.isInfinity()) -1 17781 return true; -1 17782 -1 17783 // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2) -1 17784 point.normalize(); -1 17785 -1 17786 var x2 = point.x.redSqr(); -1 17787 var y2 = point.y.redSqr(); -1 17788 var lhs = x2.redMul(this.a).redAdd(y2); -1 17789 var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2))); -1 17790 -1 17791 return lhs.cmp(rhs) === 0; -1 17792 }; -1 17793 -1 17794 function Point(curve, x, y, z, t) { -1 17795 Base.BasePoint.call(this, curve, 'projective'); -1 17796 if (x === null && y === null && z === null) { -1 17797 this.x = this.curve.zero; -1 17798 this.y = this.curve.one; -1 17799 this.z = this.curve.one; -1 17800 this.t = this.curve.zero; -1 17801 this.zOne = true; -1 17802 } else { -1 17803 this.x = new BN(x, 16); -1 17804 this.y = new BN(y, 16); -1 17805 this.z = z ? new BN(z, 16) : this.curve.one; -1 17806 this.t = t && new BN(t, 16); -1 17807 if (!this.x.red) -1 17808 this.x = this.x.toRed(this.curve.red); -1 17809 if (!this.y.red) -1 17810 this.y = this.y.toRed(this.curve.red); -1 17811 if (!this.z.red) -1 17812 this.z = this.z.toRed(this.curve.red); -1 17813 if (this.t && !this.t.red) -1 17814 this.t = this.t.toRed(this.curve.red); -1 17815 this.zOne = this.z === this.curve.one; -1 17816 -1 17817 // Use extended coordinates -1 17818 if (this.curve.extended && !this.t) { -1 17819 this.t = this.x.redMul(this.y); -1 17820 if (!this.zOne) -1 17821 this.t = this.t.redMul(this.z.redInvm()); -1 17822 } -1 17823 } -1 17824 } -1 17825 inherits(Point, Base.BasePoint); -1 17826 -1 17827 EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) { -1 17828 return Point.fromJSON(this, obj); -1 17829 }; -1 17830 -1 17831 EdwardsCurve.prototype.point = function point(x, y, z, t) { -1 17832 return new Point(this, x, y, z, t); -1 17833 }; -1 17834 -1 17835 Point.fromJSON = function fromJSON(curve, obj) { -1 17836 return new Point(curve, obj[0], obj[1], obj[2]); -1 17837 }; -1 17838 -1 17839 Point.prototype.inspect = function inspect() { -1 17840 if (this.isInfinity()) -1 17841 return '<EC Point Infinity>'; -1 17842 return '<EC Point x: ' + this.x.fromRed().toString(16, 2) + -1 17843 ' y: ' + this.y.fromRed().toString(16, 2) + -1 17844 ' z: ' + this.z.fromRed().toString(16, 2) + '>'; -1 17845 }; -1 17846 -1 17847 Point.prototype.isInfinity = function isInfinity() { -1 17848 // XXX This code assumes that zero is always zero in red -1 17849 return this.x.cmpn(0) === 0 && -1 17850 (this.y.cmp(this.z) === 0 || -1 17851 (this.zOne && this.y.cmp(this.curve.c) === 0)); -1 17852 }; -1 17853 -1 17854 Point.prototype._extDbl = function _extDbl() { -1 17855 // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html -1 17856 // #doubling-dbl-2008-hwcd -1 17857 // 4M + 4S -1 17858 -1 17859 // A = X1^2 -1 17860 var a = this.x.redSqr(); -1 17861 // B = Y1^2 -1 17862 var b = this.y.redSqr(); -1 17863 // C = 2 * Z1^2 -1 17864 var c = this.z.redSqr(); -1 17865 c = c.redIAdd(c); -1 17866 // D = a * A -1 17867 var d = this.curve._mulA(a); -1 17868 // E = (X1 + Y1)^2 - A - B -1 17869 var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b); -1 17870 // G = D + B -1 17871 var g = d.redAdd(b); -1 17872 // F = G - C -1 17873 var f = g.redSub(c); -1 17874 // H = D - B -1 17875 var h = d.redSub(b); -1 17876 // X3 = E * F -1 17877 var nx = e.redMul(f); -1 17878 // Y3 = G * H -1 17879 var ny = g.redMul(h); -1 17880 // T3 = E * H -1 17881 var nt = e.redMul(h); -1 17882 // Z3 = F * G -1 17883 var nz = f.redMul(g); -1 17884 return this.curve.point(nx, ny, nz, nt); -1 17885 }; -1 17886 -1 17887 Point.prototype._projDbl = function _projDbl() { -1 17888 // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html -1 17889 // #doubling-dbl-2008-bbjlp -1 17890 // #doubling-dbl-2007-bl -1 17891 // and others -1 17892 // Generally 3M + 4S or 2M + 4S -1 17893 -1 17894 // B = (X1 + Y1)^2 -1 17895 var b = this.x.redAdd(this.y).redSqr(); -1 17896 // C = X1^2 -1 17897 var c = this.x.redSqr(); -1 17898 // D = Y1^2 -1 17899 var d = this.y.redSqr(); -1 17900 -1 17901 var nx; -1 17902 var ny; -1 17903 var nz; -1 17904 var e; -1 17905 var h; -1 17906 var j; -1 17907 if (this.curve.twisted) { -1 17908 // E = a * C -1 17909 e = this.curve._mulA(c); -1 17910 // F = E + D -1 17911 var f = e.redAdd(d); -1 17912 if (this.zOne) { -1 17913 // X3 = (B - C - D) * (F - 2) -1 17914 nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two)); -1 17915 // Y3 = F * (E - D) -1 17916 ny = f.redMul(e.redSub(d)); -1 17917 // Z3 = F^2 - 2 * F -1 17918 nz = f.redSqr().redSub(f).redSub(f); -1 17919 } else { -1 17920 // H = Z1^2 -1 17921 h = this.z.redSqr(); -1 17922 // J = F - 2 * H -1 17923 j = f.redSub(h).redISub(h); -1 17924 // X3 = (B-C-D)*J -1 17925 nx = b.redSub(c).redISub(d).redMul(j); -1 17926 // Y3 = F * (E - D) -1 17927 ny = f.redMul(e.redSub(d)); -1 17928 // Z3 = F * J -1 17929 nz = f.redMul(j); -1 17930 } -1 17931 } else { -1 17932 // E = C + D -1 17933 e = c.redAdd(d); -1 17934 // H = (c * Z1)^2 -1 17935 h = this.curve._mulC(this.z).redSqr(); -1 17936 // J = E - 2 * H -1 17937 j = e.redSub(h).redSub(h); -1 17938 // X3 = c * (B - E) * J -1 17939 nx = this.curve._mulC(b.redISub(e)).redMul(j); -1 17940 // Y3 = c * E * (C - D) -1 17941 ny = this.curve._mulC(e).redMul(c.redISub(d)); -1 17942 // Z3 = E * J -1 17943 nz = e.redMul(j); -1 17944 } -1 17945 return this.curve.point(nx, ny, nz); -1 17946 }; -1 17947 -1 17948 Point.prototype.dbl = function dbl() { -1 17949 if (this.isInfinity()) -1 17950 return this; -1 17951 -1 17952 // Double in extended coordinates -1 17953 if (this.curve.extended) -1 17954 return this._extDbl(); -1 17955 else -1 17956 return this._projDbl(); -1 17957 }; -1 17958 -1 17959 Point.prototype._extAdd = function _extAdd(p) { -1 17960 // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html -1 17961 // #addition-add-2008-hwcd-3 -1 17962 // 8M -1 17963 -1 17964 // A = (Y1 - X1) * (Y2 - X2) -1 17965 var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x)); -1 17966 // B = (Y1 + X1) * (Y2 + X2) -1 17967 var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)); -1 17968 // C = T1 * k * T2 -1 17969 var c = this.t.redMul(this.curve.dd).redMul(p.t); -1 17970 // D = Z1 * 2 * Z2 -1 17971 var d = this.z.redMul(p.z.redAdd(p.z)); -1 17972 // E = B - A -1 17973 var e = b.redSub(a); -1 17974 // F = D - C -1 17975 var f = d.redSub(c); -1 17976 // G = D + C -1 17977 var g = d.redAdd(c); -1 17978 // H = B + A -1 17979 var h = b.redAdd(a); -1 17980 // X3 = E * F -1 17981 var nx = e.redMul(f); -1 17982 // Y3 = G * H -1 17983 var ny = g.redMul(h); -1 17984 // T3 = E * H -1 17985 var nt = e.redMul(h); -1 17986 // Z3 = F * G -1 17987 var nz = f.redMul(g); -1 17988 return this.curve.point(nx, ny, nz, nt); -1 17989 }; -1 17990 -1 17991 Point.prototype._projAdd = function _projAdd(p) { -1 17992 // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html -1 17993 // #addition-add-2008-bbjlp -1 17994 // #addition-add-2007-bl -1 17995 // 10M + 1S -1 17996 -1 17997 // A = Z1 * Z2 -1 17998 var a = this.z.redMul(p.z); -1 17999 // B = A^2 -1 18000 var b = a.redSqr(); -1 18001 // C = X1 * X2 -1 18002 var c = this.x.redMul(p.x); -1 18003 // D = Y1 * Y2 -1 18004 var d = this.y.redMul(p.y); -1 18005 // E = d * C * D -1 18006 var e = this.curve.d.redMul(c).redMul(d); -1 18007 // F = B - E -1 18008 var f = b.redSub(e); -1 18009 // G = B + E -1 18010 var g = b.redAdd(e); -1 18011 // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D) -1 18012 var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d); -1 18013 var nx = a.redMul(f).redMul(tmp); -1 18014 var ny; -1 18015 var nz; -1 18016 if (this.curve.twisted) { -1 18017 // Y3 = A * G * (D - a * C) -1 18018 ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c))); -1 18019 // Z3 = F * G -1 18020 nz = f.redMul(g); -1 18021 } else { -1 18022 // Y3 = A * G * (D - C) -1 18023 ny = a.redMul(g).redMul(d.redSub(c)); -1 18024 // Z3 = c * F * G -1 18025 nz = this.curve._mulC(f).redMul(g); -1 18026 } -1 18027 return this.curve.point(nx, ny, nz); -1 18028 }; -1 18029 -1 18030 Point.prototype.add = function add(p) { -1 18031 if (this.isInfinity()) -1 18032 return p; -1 18033 if (p.isInfinity()) -1 18034 return this; -1 18035 -1 18036 if (this.curve.extended) -1 18037 return this._extAdd(p); -1 18038 else -1 18039 return this._projAdd(p); -1 18040 }; -1 18041 -1 18042 Point.prototype.mul = function mul(k) { -1 18043 if (this._hasDoubles(k)) -1 18044 return this.curve._fixedNafMul(this, k); -1 18045 else -1 18046 return this.curve._wnafMul(this, k); -1 18047 }; -1 18048 -1 18049 Point.prototype.mulAdd = function mulAdd(k1, p, k2) { -1 18050 return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false); -1 18051 }; -1 18052 -1 18053 Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) { -1 18054 return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true); -1 18055 }; -1 18056 -1 18057 Point.prototype.normalize = function normalize() { -1 18058 if (this.zOne) -1 18059 return this; -1 18060 -1 18061 // Normalize coordinates -1 18062 var zi = this.z.redInvm(); -1 18063 this.x = this.x.redMul(zi); -1 18064 this.y = this.y.redMul(zi); -1 18065 if (this.t) -1 18066 this.t = this.t.redMul(zi); -1 18067 this.z = this.curve.one; -1 18068 this.zOne = true; -1 18069 return this; -1 18070 }; -1 18071 -1 18072 Point.prototype.neg = function neg() { -1 18073 return this.curve.point(this.x.redNeg(), -1 18074 this.y, -1 18075 this.z, -1 18076 this.t && this.t.redNeg()); -1 18077 }; -1 18078 -1 18079 Point.prototype.getX = function getX() { -1 18080 this.normalize(); -1 18081 return this.x.fromRed(); -1 18082 }; -1 18083 -1 18084 Point.prototype.getY = function getY() { -1 18085 this.normalize(); -1 18086 return this.y.fromRed(); -1 18087 }; -1 18088 -1 18089 Point.prototype.eq = function eq(other) { -1 18090 return this === other || -1 18091 this.getX().cmp(other.getX()) === 0 && -1 18092 this.getY().cmp(other.getY()) === 0; -1 18093 }; -1 18094 -1 18095 Point.prototype.eqXToP = function eqXToP(x) { -1 18096 var rx = x.toRed(this.curve.red).redMul(this.z); -1 18097 if (this.x.cmp(rx) === 0) -1 18098 return true; -1 18099 -1 18100 var xc = x.clone(); -1 18101 var t = this.curve.redN.redMul(this.z); -1 18102 for (;;) { -1 18103 xc.iadd(this.curve.n); -1 18104 if (xc.cmp(this.curve.p) >= 0) -1 18105 return false; -1 18106 -1 18107 rx.redIAdd(t); -1 18108 if (this.x.cmp(rx) === 0) -1 18109 return true; -1 18110 } -1 18111 }; -1 18112 -1 18113 // Compatibility with BaseCurve -1 18114 Point.prototype.toP = Point.prototype.normalize; -1 18115 Point.prototype.mixedAdd = Point.prototype.add; -1 18116 -1 18117 },{"../utils":97,"./base":84,"bn.js":98,"inherits":132}],86:[function(require,module,exports){ -1 18118 'use strict'; -1 18119 -1 18120 var curve = exports; -1 18121 -1 18122 curve.base = require('./base'); -1 18123 curve.short = require('./short'); -1 18124 curve.mont = require('./mont'); -1 18125 curve.edwards = require('./edwards'); -1 18126 -1 18127 },{"./base":84,"./edwards":85,"./mont":87,"./short":88}],87:[function(require,module,exports){ -1 18128 'use strict'; -1 18129 -1 18130 var BN = require('bn.js'); -1 18131 var inherits = require('inherits'); -1 18132 var Base = require('./base'); -1 18133 -1 18134 var utils = require('../utils'); -1 18135 -1 18136 function MontCurve(conf) { -1 18137 Base.call(this, 'mont', conf); -1 18138 -1 18139 this.a = new BN(conf.a, 16).toRed(this.red); -1 18140 this.b = new BN(conf.b, 16).toRed(this.red); -1 18141 this.i4 = new BN(4).toRed(this.red).redInvm(); -1 18142 this.two = new BN(2).toRed(this.red); -1 18143 this.a24 = this.i4.redMul(this.a.redAdd(this.two)); -1 18144 } -1 18145 inherits(MontCurve, Base); -1 18146 module.exports = MontCurve; -1 18147 -1 18148 MontCurve.prototype.validate = function validate(point) { -1 18149 var x = point.normalize().x; -1 18150 var x2 = x.redSqr(); -1 18151 var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x); -1 18152 var y = rhs.redSqrt(); -1 18153 -1 18154 return y.redSqr().cmp(rhs) === 0; -1 18155 }; -1 18156 -1 18157 function Point(curve, x, z) { -1 18158 Base.BasePoint.call(this, curve, 'projective'); -1 18159 if (x === null && z === null) { -1 18160 this.x = this.curve.one; -1 18161 this.z = this.curve.zero; -1 18162 } else { -1 18163 this.x = new BN(x, 16); -1 18164 this.z = new BN(z, 16); -1 18165 if (!this.x.red) -1 18166 this.x = this.x.toRed(this.curve.red); -1 18167 if (!this.z.red) -1 18168 this.z = this.z.toRed(this.curve.red); -1 18169 } -1 18170 } -1 18171 inherits(Point, Base.BasePoint); -1 18172 -1 18173 MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) { -1 18174 return this.point(utils.toArray(bytes, enc), 1); -1 18175 }; -1 18176 -1 18177 MontCurve.prototype.point = function point(x, z) { -1 18178 return new Point(this, x, z); -1 18179 }; -1 18180 -1 18181 MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) { -1 18182 return Point.fromJSON(this, obj); -1 18183 }; -1 18184 -1 18185 Point.prototype.precompute = function precompute() { -1 18186 // No-op -1 18187 }; -1 18188 -1 18189 Point.prototype._encode = function _encode() { -1 18190 return this.getX().toArray('be', this.curve.p.byteLength()); -1 18191 }; -1 18192 -1 18193 Point.fromJSON = function fromJSON(curve, obj) { -1 18194 return new Point(curve, obj[0], obj[1] || curve.one); -1 18195 }; -1 18196 -1 18197 Point.prototype.inspect = function inspect() { -1 18198 if (this.isInfinity()) -1 18199 return '<EC Point Infinity>'; -1 18200 return '<EC Point x: ' + this.x.fromRed().toString(16, 2) + -1 18201 ' z: ' + this.z.fromRed().toString(16, 2) + '>'; -1 18202 }; -1 18203 -1 18204 Point.prototype.isInfinity = function isInfinity() { -1 18205 // XXX This code assumes that zero is always zero in red -1 18206 return this.z.cmpn(0) === 0; -1 18207 }; -1 18208 -1 18209 Point.prototype.dbl = function dbl() { -1 18210 // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3 -1 18211 // 2M + 2S + 4A -1 18212 -1 18213 // A = X1 + Z1 -1 18214 var a = this.x.redAdd(this.z); -1 18215 // AA = A^2 -1 18216 var aa = a.redSqr(); -1 18217 // B = X1 - Z1 -1 18218 var b = this.x.redSub(this.z); -1 18219 // BB = B^2 -1 18220 var bb = b.redSqr(); -1 18221 // C = AA - BB -1 18222 var c = aa.redSub(bb); -1 18223 // X3 = AA * BB -1 18224 var nx = aa.redMul(bb); -1 18225 // Z3 = C * (BB + A24 * C) -1 18226 var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c))); -1 18227 return this.curve.point(nx, nz); -1 18228 }; -1 18229 -1 18230 Point.prototype.add = function add() { -1 18231 throw new Error('Not supported on Montgomery curve'); -1 18232 }; -1 18233 -1 18234 Point.prototype.diffAdd = function diffAdd(p, diff) { -1 18235 // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3 -1 18236 // 4M + 2S + 6A -1 18237 -1 18238 // A = X2 + Z2 -1 18239 var a = this.x.redAdd(this.z); -1 18240 // B = X2 - Z2 -1 18241 var b = this.x.redSub(this.z); -1 18242 // C = X3 + Z3 -1 18243 var c = p.x.redAdd(p.z); -1 18244 // D = X3 - Z3 -1 18245 var d = p.x.redSub(p.z); -1 18246 // DA = D * A -1 18247 var da = d.redMul(a); -1 18248 // CB = C * B -1 18249 var cb = c.redMul(b); -1 18250 // X5 = Z1 * (DA + CB)^2 -1 18251 var nx = diff.z.redMul(da.redAdd(cb).redSqr()); -1 18252 // Z5 = X1 * (DA - CB)^2 -1 18253 var nz = diff.x.redMul(da.redISub(cb).redSqr()); -1 18254 return this.curve.point(nx, nz); -1 18255 }; -1 18256 -1 18257 Point.prototype.mul = function mul(k) { -1 18258 var t = k.clone(); -1 18259 var a = this; // (N / 2) * Q + Q -1 18260 var b = this.curve.point(null, null); // (N / 2) * Q -1 18261 var c = this; // Q -1 18262 -1 18263 for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1)) -1 18264 bits.push(t.andln(1)); -1 18265 -1 18266 for (var i = bits.length - 1; i >= 0; i--) { -1 18267 if (bits[i] === 0) { -1 18268 // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q -1 18269 a = a.diffAdd(b, c); -1 18270 // N * Q = 2 * ((N / 2) * Q + Q)) -1 18271 b = b.dbl(); -1 18272 } else { -1 18273 // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q) -1 18274 b = a.diffAdd(b, c); -1 18275 // N * Q + Q = 2 * ((N / 2) * Q + Q) -1 18276 a = a.dbl(); -1 18277 } -1 18278 } -1 18279 return b; -1 18280 }; -1 18281 -1 18282 Point.prototype.mulAdd = function mulAdd() { -1 18283 throw new Error('Not supported on Montgomery curve'); -1 18284 }; -1 18285 -1 18286 Point.prototype.jumlAdd = function jumlAdd() { -1 18287 throw new Error('Not supported on Montgomery curve'); -1 18288 }; -1 18289 -1 18290 Point.prototype.eq = function eq(other) { -1 18291 return this.getX().cmp(other.getX()) === 0; -1 18292 }; -1 18293 -1 18294 Point.prototype.normalize = function normalize() { -1 18295 this.x = this.x.redMul(this.z.redInvm()); -1 18296 this.z = this.curve.one; -1 18297 return this; -1 18298 }; -1 18299 -1 18300 Point.prototype.getX = function getX() { -1 18301 // Normalize coordinates -1 18302 this.normalize(); -1 18303 -1 18304 return this.x.fromRed(); -1 18305 }; -1 18306 -1 18307 },{"../utils":97,"./base":84,"bn.js":98,"inherits":132}],88:[function(require,module,exports){ -1 18308 'use strict'; -1 18309 -1 18310 var utils = require('../utils'); -1 18311 var BN = require('bn.js'); -1 18312 var inherits = require('inherits'); -1 18313 var Base = require('./base'); -1 18314 -1 18315 var assert = utils.assert; -1 18316 -1 18317 function ShortCurve(conf) { -1 18318 Base.call(this, 'short', conf); -1 18319 -1 18320 this.a = new BN(conf.a, 16).toRed(this.red); -1 18321 this.b = new BN(conf.b, 16).toRed(this.red); -1 18322 this.tinv = this.two.redInvm(); -1 18323 -1 18324 this.zeroA = this.a.fromRed().cmpn(0) === 0; -1 18325 this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0; -1 18326 -1 18327 // If the curve is endomorphic, precalculate beta and lambda -1 18328 this.endo = this._getEndomorphism(conf); -1 18329 this._endoWnafT1 = new Array(4); -1 18330 this._endoWnafT2 = new Array(4); -1 18331 } -1 18332 inherits(ShortCurve, Base); -1 18333 module.exports = ShortCurve; -1 18334 -1 18335 ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) { -1 18336 // No efficient endomorphism -1 18337 if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1) -1 18338 return; -1 18339 -1 18340 // Compute beta and lambda, that lambda * P = (beta * Px; Py) -1 18341 var beta; -1 18342 var lambda; -1 18343 if (conf.beta) { -1 18344 beta = new BN(conf.beta, 16).toRed(this.red); -1 18345 } else { -1 18346 var betas = this._getEndoRoots(this.p); -1 18347 // Choose the smallest beta -1 18348 beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1]; -1 18349 beta = beta.toRed(this.red); -1 18350 } -1 18351 if (conf.lambda) { -1 18352 lambda = new BN(conf.lambda, 16); -1 18353 } else { -1 18354 // Choose the lambda that is matching selected beta -1 18355 var lambdas = this._getEndoRoots(this.n); -1 18356 if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) { -1 18357 lambda = lambdas[0]; -1 18358 } else { -1 18359 lambda = lambdas[1]; -1 18360 assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0); -1 18361 } -1 18362 } -1 18363 -1 18364 // Get basis vectors, used for balanced length-two representation -1 18365 var basis; -1 18366 if (conf.basis) { -1 18367 basis = conf.basis.map(function(vec) { -1 18368 return { -1 18369 a: new BN(vec.a, 16), -1 18370 b: new BN(vec.b, 16), -1 18371 }; -1 18372 }); -1 18373 } else { -1 18374 basis = this._getEndoBasis(lambda); -1 18375 } -1 18376 -1 18377 return { -1 18378 beta: beta, -1 18379 lambda: lambda, -1 18380 basis: basis, -1 18381 }; -1 18382 }; -1 18383 -1 18384 ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) { -1 18385 // Find roots of for x^2 + x + 1 in F -1 18386 // Root = (-1 +- Sqrt(-3)) / 2 -1 18387 // -1 18388 var red = num === this.p ? this.red : BN.mont(num); -1 18389 var tinv = new BN(2).toRed(red).redInvm(); -1 18390 var ntinv = tinv.redNeg(); -1 18391 -1 18392 var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv); -1 18393 -1 18394 var l1 = ntinv.redAdd(s).fromRed(); -1 18395 var l2 = ntinv.redSub(s).fromRed(); -1 18396 return [ l1, l2 ]; -1 18397 }; -1 18398 -1 18399 ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) { -1 18400 // aprxSqrt >= sqrt(this.n) -1 18401 var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2)); -1 18402 -1 18403 // 3.74 -1 18404 // Run EGCD, until r(L + 1) < aprxSqrt -1 18405 var u = lambda; -1 18406 var v = this.n.clone(); -1 18407 var x1 = new BN(1); -1 18408 var y1 = new BN(0); -1 18409 var x2 = new BN(0); -1 18410 var y2 = new BN(1); -1 18411 -1 18412 // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n) -1 18413 var a0; -1 18414 var b0; -1 18415 // First vector -1 18416 var a1; -1 18417 var b1; -1 18418 // Second vector -1 18419 var a2; -1 18420 var b2; -1 18421 -1 18422 var prevR; -1 18423 var i = 0; -1 18424 var r; -1 18425 var x; -1 18426 while (u.cmpn(0) !== 0) { -1 18427 var q = v.div(u); -1 18428 r = v.sub(q.mul(u)); -1 18429 x = x2.sub(q.mul(x1)); -1 18430 var y = y2.sub(q.mul(y1)); -1 18431 -1 18432 if (!a1 && r.cmp(aprxSqrt) < 0) { -1 18433 a0 = prevR.neg(); -1 18434 b0 = x1; -1 18435 a1 = r.neg(); -1 18436 b1 = x; -1 18437 } else if (a1 && ++i === 2) { -1 18438 break; -1 18439 } -1 18440 prevR = r; -1 18441 -1 18442 v = u; -1 18443 u = r; -1 18444 x2 = x1; -1 18445 x1 = x; -1 18446 y2 = y1; -1 18447 y1 = y; -1 18448 } -1 18449 a2 = r.neg(); -1 18450 b2 = x; -1 18451 -1 18452 var len1 = a1.sqr().add(b1.sqr()); -1 18453 var len2 = a2.sqr().add(b2.sqr()); -1 18454 if (len2.cmp(len1) >= 0) { -1 18455 a2 = a0; -1 18456 b2 = b0; -1 18457 } -1 18458 -1 18459 // Normalize signs -1 18460 if (a1.negative) { -1 18461 a1 = a1.neg(); -1 18462 b1 = b1.neg(); -1 18463 } -1 18464 if (a2.negative) { -1 18465 a2 = a2.neg(); -1 18466 b2 = b2.neg(); -1 18467 } -1 18468 -1 18469 return [ -1 18470 { a: a1, b: b1 }, -1 18471 { a: a2, b: b2 }, -1 18472 ]; -1 18473 }; -1 18474 -1 18475 ShortCurve.prototype._endoSplit = function _endoSplit(k) { -1 18476 var basis = this.endo.basis; -1 18477 var v1 = basis[0]; -1 18478 var v2 = basis[1]; -1 18479 -1 18480 var c1 = v2.b.mul(k).divRound(this.n); -1 18481 var c2 = v1.b.neg().mul(k).divRound(this.n); -1 18482 -1 18483 var p1 = c1.mul(v1.a); -1 18484 var p2 = c2.mul(v2.a); -1 18485 var q1 = c1.mul(v1.b); -1 18486 var q2 = c2.mul(v2.b); -1 18487 -1 18488 // Calculate answer -1 18489 var k1 = k.sub(p1).sub(p2); -1 18490 var k2 = q1.add(q2).neg(); -1 18491 return { k1: k1, k2: k2 }; -1 18492 }; -1 18493 -1 18494 ShortCurve.prototype.pointFromX = function pointFromX(x, odd) { -1 18495 x = new BN(x, 16); -1 18496 if (!x.red) -1 18497 x = x.toRed(this.red); -1 18498 -1 18499 var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b); -1 18500 var y = y2.redSqrt(); -1 18501 if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) -1 18502 throw new Error('invalid point'); -1 18503 -1 18504 // XXX Is there any way to tell if the number is odd without converting it -1 18505 // to non-red form? -1 18506 var isOdd = y.fromRed().isOdd(); -1 18507 if (odd && !isOdd || !odd && isOdd) -1 18508 y = y.redNeg(); -1 18509 -1 18510 return this.point(x, y); -1 18511 }; -1 18512 -1 18513 ShortCurve.prototype.validate = function validate(point) { -1 18514 if (point.inf) -1 18515 return true; -1 18516 -1 18517 var x = point.x; -1 18518 var y = point.y; -1 18519 -1 18520 var ax = this.a.redMul(x); -1 18521 var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b); -1 18522 return y.redSqr().redISub(rhs).cmpn(0) === 0; -1 18523 }; -1 18524 -1 18525 ShortCurve.prototype._endoWnafMulAdd = -1 18526 function _endoWnafMulAdd(points, coeffs, jacobianResult) { -1 18527 var npoints = this._endoWnafT1; -1 18528 var ncoeffs = this._endoWnafT2; -1 18529 for (var i = 0; i < points.length; i++) { -1 18530 var split = this._endoSplit(coeffs[i]); -1 18531 var p = points[i]; -1 18532 var beta = p._getBeta(); -1 18533 -1 18534 if (split.k1.negative) { -1 18535 split.k1.ineg(); -1 18536 p = p.neg(true); -1 18537 } -1 18538 if (split.k2.negative) { -1 18539 split.k2.ineg(); -1 18540 beta = beta.neg(true); -1 18541 } -1 18542 -1 18543 npoints[i * 2] = p; -1 18544 npoints[i * 2 + 1] = beta; -1 18545 ncoeffs[i * 2] = split.k1; -1 18546 ncoeffs[i * 2 + 1] = split.k2; -1 18547 } -1 18548 var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult); -1 18549 -1 18550 // Clean-up references to points and coefficients -1 18551 for (var j = 0; j < i * 2; j++) { -1 18552 npoints[j] = null; -1 18553 ncoeffs[j] = null; -1 18554 } -1 18555 return res; -1 18556 }; -1 18557 -1 18558 function Point(curve, x, y, isRed) { -1 18559 Base.BasePoint.call(this, curve, 'affine'); -1 18560 if (x === null && y === null) { -1 18561 this.x = null; -1 18562 this.y = null; -1 18563 this.inf = true; -1 18564 } else { -1 18565 this.x = new BN(x, 16); -1 18566 this.y = new BN(y, 16); -1 18567 // Force redgomery representation when loading from JSON -1 18568 if (isRed) { -1 18569 this.x.forceRed(this.curve.red); -1 18570 this.y.forceRed(this.curve.red); -1 18571 } -1 18572 if (!this.x.red) -1 18573 this.x = this.x.toRed(this.curve.red); -1 18574 if (!this.y.red) -1 18575 this.y = this.y.toRed(this.curve.red); -1 18576 this.inf = false; -1 18577 } -1 18578 } -1 18579 inherits(Point, Base.BasePoint); -1 18580 -1 18581 ShortCurve.prototype.point = function point(x, y, isRed) { -1 18582 return new Point(this, x, y, isRed); -1 18583 }; -1 18584 -1 18585 ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) { -1 18586 return Point.fromJSON(this, obj, red); -1 18587 }; -1 18588 -1 18589 Point.prototype._getBeta = function _getBeta() { -1 18590 if (!this.curve.endo) -1 18591 return; -1 18592 -1 18593 var pre = this.precomputed; -1 18594 if (pre && pre.beta) -1 18595 return pre.beta; -1 18596 -1 18597 var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); -1 18598 if (pre) { -1 18599 var curve = this.curve; -1 18600 var endoMul = function(p) { -1 18601 return curve.point(p.x.redMul(curve.endo.beta), p.y); -1 18602 }; -1 18603 pre.beta = beta; -1 18604 beta.precomputed = { -1 18605 beta: null, -1 18606 naf: pre.naf && { -1 18607 wnd: pre.naf.wnd, -1 18608 points: pre.naf.points.map(endoMul), -1 18609 }, -1 18610 doubles: pre.doubles && { -1 18611 step: pre.doubles.step, -1 18612 points: pre.doubles.points.map(endoMul), -1 18613 }, -1 18614 }; -1 18615 } -1 18616 return beta; -1 18617 }; -1 18618 -1 18619 Point.prototype.toJSON = function toJSON() { -1 18620 if (!this.precomputed) -1 18621 return [ this.x, this.y ]; -1 18622 -1 18623 return [ this.x, this.y, this.precomputed && { -1 18624 doubles: this.precomputed.doubles && { -1 18625 step: this.precomputed.doubles.step, -1 18626 points: this.precomputed.doubles.points.slice(1), -1 18627 }, -1 18628 naf: this.precomputed.naf && { -1 18629 wnd: this.precomputed.naf.wnd, -1 18630 points: this.precomputed.naf.points.slice(1), -1 18631 }, -1 18632 } ]; -1 18633 }; -1 18634 -1 18635 Point.fromJSON = function fromJSON(curve, obj, red) { -1 18636 if (typeof obj === 'string') -1 18637 obj = JSON.parse(obj); -1 18638 var res = curve.point(obj[0], obj[1], red); -1 18639 if (!obj[2]) -1 18640 return res; -1 18641 -1 18642 function obj2point(obj) { -1 18643 return curve.point(obj[0], obj[1], red); -1 18644 } -1 18645 -1 18646 var pre = obj[2]; -1 18647 res.precomputed = { -1 18648 beta: null, -1 18649 doubles: pre.doubles && { -1 18650 step: pre.doubles.step, -1 18651 points: [ res ].concat(pre.doubles.points.map(obj2point)), -1 18652 }, -1 18653 naf: pre.naf && { -1 18654 wnd: pre.naf.wnd, -1 18655 points: [ res ].concat(pre.naf.points.map(obj2point)), -1 18656 }, -1 18657 }; -1 18658 return res; -1 18659 }; -1 18660 -1 18661 Point.prototype.inspect = function inspect() { -1 18662 if (this.isInfinity()) -1 18663 return '<EC Point Infinity>'; -1 18664 return '<EC Point x: ' + this.x.fromRed().toString(16, 2) + -1 18665 ' y: ' + this.y.fromRed().toString(16, 2) + '>'; -1 18666 }; -1 18667 -1 18668 Point.prototype.isInfinity = function isInfinity() { -1 18669 return this.inf; -1 18670 }; -1 18671 -1 18672 Point.prototype.add = function add(p) { -1 18673 // O + P = P -1 18674 if (this.inf) -1 18675 return p; -1 18676 -1 18677 // P + O = P -1 18678 if (p.inf) -1 18679 return this; -1 18680 -1 18681 // P + P = 2P -1 18682 if (this.eq(p)) -1 18683 return this.dbl(); -1 18684 -1 18685 // P + (-P) = O -1 18686 if (this.neg().eq(p)) -1 18687 return this.curve.point(null, null); -1 18688 -1 18689 // P + Q = O -1 18690 if (this.x.cmp(p.x) === 0) -1 18691 return this.curve.point(null, null); -1 18692 -1 18693 var c = this.y.redSub(p.y); -1 18694 if (c.cmpn(0) !== 0) -1 18695 c = c.redMul(this.x.redSub(p.x).redInvm()); -1 18696 var nx = c.redSqr().redISub(this.x).redISub(p.x); -1 18697 var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); -1 18698 return this.curve.point(nx, ny); -1 18699 }; -1 18700 -1 18701 Point.prototype.dbl = function dbl() { -1 18702 if (this.inf) -1 18703 return this; -1 18704 -1 18705 // 2P = O -1 18706 var ys1 = this.y.redAdd(this.y); -1 18707 if (ys1.cmpn(0) === 0) -1 18708 return this.curve.point(null, null); -1 18709 -1 18710 var a = this.curve.a; -1 18711 -1 18712 var x2 = this.x.redSqr(); -1 18713 var dyinv = ys1.redInvm(); -1 18714 var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv); -1 18715 -1 18716 var nx = c.redSqr().redISub(this.x.redAdd(this.x)); -1 18717 var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); -1 18718 return this.curve.point(nx, ny); -1 18719 }; -1 18720 -1 18721 Point.prototype.getX = function getX() { -1 18722 return this.x.fromRed(); -1 18723 }; -1 18724 -1 18725 Point.prototype.getY = function getY() { -1 18726 return this.y.fromRed(); -1 18727 }; -1 18728 -1 18729 Point.prototype.mul = function mul(k) { -1 18730 k = new BN(k, 16); -1 18731 if (this.isInfinity()) -1 18732 return this; -1 18733 else if (this._hasDoubles(k)) -1 18734 return this.curve._fixedNafMul(this, k); -1 18735 else if (this.curve.endo) -1 18736 return this.curve._endoWnafMulAdd([ this ], [ k ]); -1 18737 else -1 18738 return this.curve._wnafMul(this, k); -1 18739 }; -1 18740 -1 18741 Point.prototype.mulAdd = function mulAdd(k1, p2, k2) { -1 18742 var points = [ this, p2 ]; -1 18743 var coeffs = [ k1, k2 ]; -1 18744 if (this.curve.endo) -1 18745 return this.curve._endoWnafMulAdd(points, coeffs); -1 18746 else -1 18747 return this.curve._wnafMulAdd(1, points, coeffs, 2); -1 18748 }; -1 18749 -1 18750 Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) { -1 18751 var points = [ this, p2 ]; -1 18752 var coeffs = [ k1, k2 ]; -1 18753 if (this.curve.endo) -1 18754 return this.curve._endoWnafMulAdd(points, coeffs, true); -1 18755 else -1 18756 return this.curve._wnafMulAdd(1, points, coeffs, 2, true); -1 18757 }; -1 18758 -1 18759 Point.prototype.eq = function eq(p) { -1 18760 return this === p || -1 18761 this.inf === p.inf && -1 18762 (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0); -1 18763 }; -1 18764 -1 18765 Point.prototype.neg = function neg(_precompute) { -1 18766 if (this.inf) -1 18767 return this; -1 18768 -1 18769 var res = this.curve.point(this.x, this.y.redNeg()); -1 18770 if (_precompute && this.precomputed) { -1 18771 var pre = this.precomputed; -1 18772 var negate = function(p) { -1 18773 return p.neg(); -1 18774 }; -1 18775 res.precomputed = { -1 18776 naf: pre.naf && { -1 18777 wnd: pre.naf.wnd, -1 18778 points: pre.naf.points.map(negate), -1 18779 }, -1 18780 doubles: pre.doubles && { -1 18781 step: pre.doubles.step, -1 18782 points: pre.doubles.points.map(negate), -1 18783 }, -1 18784 }; -1 18785 } -1 18786 return res; -1 18787 }; -1 18788 -1 18789 Point.prototype.toJ = function toJ() { -1 18790 if (this.inf) -1 18791 return this.curve.jpoint(null, null, null); -1 18792 -1 18793 var res = this.curve.jpoint(this.x, this.y, this.curve.one); -1 18794 return res; -1 18795 }; -1 18796 -1 18797 function JPoint(curve, x, y, z) { -1 18798 Base.BasePoint.call(this, curve, 'jacobian'); -1 18799 if (x === null && y === null && z === null) { -1 18800 this.x = this.curve.one; -1 18801 this.y = this.curve.one; -1 18802 this.z = new BN(0); -1 18803 } else { -1 18804 this.x = new BN(x, 16); -1 18805 this.y = new BN(y, 16); -1 18806 this.z = new BN(z, 16); -1 18807 } -1 18808 if (!this.x.red) -1 18809 this.x = this.x.toRed(this.curve.red); -1 18810 if (!this.y.red) -1 18811 this.y = this.y.toRed(this.curve.red); -1 18812 if (!this.z.red) -1 18813 this.z = this.z.toRed(this.curve.red); -1 18814 -1 18815 this.zOne = this.z === this.curve.one; -1 18816 } -1 18817 inherits(JPoint, Base.BasePoint); -1 18818 -1 18819 ShortCurve.prototype.jpoint = function jpoint(x, y, z) { -1 18820 return new JPoint(this, x, y, z); -1 18821 }; -1 18822 -1 18823 JPoint.prototype.toP = function toP() { -1 18824 if (this.isInfinity()) -1 18825 return this.curve.point(null, null); -1 18826 -1 18827 var zinv = this.z.redInvm(); -1 18828 var zinv2 = zinv.redSqr(); -1 18829 var ax = this.x.redMul(zinv2); -1 18830 var ay = this.y.redMul(zinv2).redMul(zinv); -1 18831 -1 18832 return this.curve.point(ax, ay); -1 18833 }; -1 18834 -1 18835 JPoint.prototype.neg = function neg() { -1 18836 return this.curve.jpoint(this.x, this.y.redNeg(), this.z); -1 18837 }; -1 18838 -1 18839 JPoint.prototype.add = function add(p) { -1 18840 // O + P = P -1 18841 if (this.isInfinity()) -1 18842 return p; -1 18843 -1 18844 // P + O = P -1 18845 if (p.isInfinity()) -1 18846 return this; -1 18847 -1 18848 // 12M + 4S + 7A -1 18849 var pz2 = p.z.redSqr(); -1 18850 var z2 = this.z.redSqr(); -1 18851 var u1 = this.x.redMul(pz2); -1 18852 var u2 = p.x.redMul(z2); -1 18853 var s1 = this.y.redMul(pz2.redMul(p.z)); -1 18854 var s2 = p.y.redMul(z2.redMul(this.z)); -1 18855 -1 18856 var h = u1.redSub(u2); -1 18857 var r = s1.redSub(s2); -1 18858 if (h.cmpn(0) === 0) { -1 18859 if (r.cmpn(0) !== 0) -1 18860 return this.curve.jpoint(null, null, null); -1 18861 else -1 18862 return this.dbl(); -1 18863 } -1 18864 -1 18865 var h2 = h.redSqr(); -1 18866 var h3 = h2.redMul(h); -1 18867 var v = u1.redMul(h2); -1 18868 -1 18869 var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); -1 18870 var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); -1 18871 var nz = this.z.redMul(p.z).redMul(h); -1 18872 -1 18873 return this.curve.jpoint(nx, ny, nz); -1 18874 }; -1 18875 -1 18876 JPoint.prototype.mixedAdd = function mixedAdd(p) { -1 18877 // O + P = P -1 18878 if (this.isInfinity()) -1 18879 return p.toJ(); -1 18880 -1 18881 // P + O = P -1 18882 if (p.isInfinity()) -1 18883 return this; -1 18884 -1 18885 // 8M + 3S + 7A -1 18886 var z2 = this.z.redSqr(); -1 18887 var u1 = this.x; -1 18888 var u2 = p.x.redMul(z2); -1 18889 var s1 = this.y; -1 18890 var s2 = p.y.redMul(z2).redMul(this.z); -1 18891 -1 18892 var h = u1.redSub(u2); -1 18893 var r = s1.redSub(s2); -1 18894 if (h.cmpn(0) === 0) { -1 18895 if (r.cmpn(0) !== 0) -1 18896 return this.curve.jpoint(null, null, null); -1 18897 else -1 18898 return this.dbl(); -1 18899 } -1 18900 -1 18901 var h2 = h.redSqr(); -1 18902 var h3 = h2.redMul(h); -1 18903 var v = u1.redMul(h2); -1 18904 -1 18905 var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); -1 18906 var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); -1 18907 var nz = this.z.redMul(h); -1 18908 -1 18909 return this.curve.jpoint(nx, ny, nz); -1 18910 }; -1 18911 -1 18912 JPoint.prototype.dblp = function dblp(pow) { -1 18913 if (pow === 0) -1 18914 return this; -1 18915 if (this.isInfinity()) -1 18916 return this; -1 18917 if (!pow) -1 18918 return this.dbl(); -1 18919 -1 18920 var i; -1 18921 if (this.curve.zeroA || this.curve.threeA) { -1 18922 var r = this; -1 18923 for (i = 0; i < pow; i++) -1 18924 r = r.dbl(); -1 18925 return r; -1 18926 } -1 18927 -1 18928 // 1M + 2S + 1A + N * (4S + 5M + 8A) -1 18929 // N = 1 => 6M + 6S + 9A -1 18930 var a = this.curve.a; -1 18931 var tinv = this.curve.tinv; -1 18932 -1 18933 var jx = this.x; -1 18934 var jy = this.y; -1 18935 var jz = this.z; -1 18936 var jz4 = jz.redSqr().redSqr(); -1 18937 -1 18938 // Reuse results -1 18939 var jyd = jy.redAdd(jy); -1 18940 for (i = 0; i < pow; i++) { -1 18941 var jx2 = jx.redSqr(); -1 18942 var jyd2 = jyd.redSqr(); -1 18943 var jyd4 = jyd2.redSqr(); -1 18944 var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); -1 18945 -1 18946 var t1 = jx.redMul(jyd2); -1 18947 var nx = c.redSqr().redISub(t1.redAdd(t1)); -1 18948 var t2 = t1.redISub(nx); -1 18949 var dny = c.redMul(t2); -1 18950 dny = dny.redIAdd(dny).redISub(jyd4); -1 18951 var nz = jyd.redMul(jz); -1 18952 if (i + 1 < pow) -1 18953 jz4 = jz4.redMul(jyd4); -1 18954 -1 18955 jx = nx; -1 18956 jz = nz; -1 18957 jyd = dny; -1 18958 } -1 18959 -1 18960 return this.curve.jpoint(jx, jyd.redMul(tinv), jz); -1 18961 }; -1 18962 -1 18963 JPoint.prototype.dbl = function dbl() { -1 18964 if (this.isInfinity()) -1 18965 return this; -1 18966 -1 18967 if (this.curve.zeroA) -1 18968 return this._zeroDbl(); -1 18969 else if (this.curve.threeA) -1 18970 return this._threeDbl(); -1 18971 else -1 18972 return this._dbl(); -1 18973 }; -1 18974 -1 18975 JPoint.prototype._zeroDbl = function _zeroDbl() { -1 18976 var nx; -1 18977 var ny; -1 18978 var nz; -1 18979 // Z = 1 -1 18980 if (this.zOne) { -1 18981 // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html -1 18982 // #doubling-mdbl-2007-bl -1 18983 // 1M + 5S + 14A -1 18984 -1 18985 // XX = X1^2 -1 18986 var xx = this.x.redSqr(); -1 18987 // YY = Y1^2 -1 18988 var yy = this.y.redSqr(); -1 18989 // YYYY = YY^2 -1 18990 var yyyy = yy.redSqr(); -1 18991 // S = 2 * ((X1 + YY)^2 - XX - YYYY) -1 18992 var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); -1 18993 s = s.redIAdd(s); -1 18994 // M = 3 * XX + a; a = 0 -1 18995 var m = xx.redAdd(xx).redIAdd(xx); -1 18996 // T = M ^ 2 - 2*S -1 18997 var t = m.redSqr().redISub(s).redISub(s); -1 18998 -1 18999 // 8 * YYYY -1 19000 var yyyy8 = yyyy.redIAdd(yyyy); -1 19001 yyyy8 = yyyy8.redIAdd(yyyy8); -1 19002 yyyy8 = yyyy8.redIAdd(yyyy8); -1 19003 -1 19004 // X3 = T -1 19005 nx = t; -1 19006 // Y3 = M * (S - T) - 8 * YYYY -1 19007 ny = m.redMul(s.redISub(t)).redISub(yyyy8); -1 19008 // Z3 = 2*Y1 -1 19009 nz = this.y.redAdd(this.y); -1 19010 } else { -1 19011 // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html -1 19012 // #doubling-dbl-2009-l -1 19013 // 2M + 5S + 13A -1 19014 -1 19015 // A = X1^2 -1 19016 var a = this.x.redSqr(); -1 19017 // B = Y1^2 -1 19018 var b = this.y.redSqr(); -1 19019 // C = B^2 -1 19020 var c = b.redSqr(); -1 19021 // D = 2 * ((X1 + B)^2 - A - C) -1 19022 var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c); -1 19023 d = d.redIAdd(d); -1 19024 // E = 3 * A -1 19025 var e = a.redAdd(a).redIAdd(a); -1 19026 // F = E^2 -1 19027 var f = e.redSqr(); -1 19028 -1 19029 // 8 * C -1 19030 var c8 = c.redIAdd(c); -1 19031 c8 = c8.redIAdd(c8); -1 19032 c8 = c8.redIAdd(c8); -1 19033 -1 19034 // X3 = F - 2 * D -1 19035 nx = f.redISub(d).redISub(d); -1 19036 // Y3 = E * (D - X3) - 8 * C -1 19037 ny = e.redMul(d.redISub(nx)).redISub(c8); -1 19038 // Z3 = 2 * Y1 * Z1 -1 19039 nz = this.y.redMul(this.z); -1 19040 nz = nz.redIAdd(nz); -1 19041 } -1 19042 -1 19043 return this.curve.jpoint(nx, ny, nz); -1 19044 }; -1 19045 -1 19046 JPoint.prototype._threeDbl = function _threeDbl() { -1 19047 var nx; -1 19048 var ny; -1 19049 var nz; -1 19050 // Z = 1 -1 19051 if (this.zOne) { -1 19052 // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html -1 19053 // #doubling-mdbl-2007-bl -1 19054 // 1M + 5S + 15A -1 19055 -1 19056 // XX = X1^2 -1 19057 var xx = this.x.redSqr(); -1 19058 // YY = Y1^2 -1 19059 var yy = this.y.redSqr(); -1 19060 // YYYY = YY^2 -1 19061 var yyyy = yy.redSqr(); -1 19062 // S = 2 * ((X1 + YY)^2 - XX - YYYY) -1 19063 var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); -1 19064 s = s.redIAdd(s); -1 19065 // M = 3 * XX + a -1 19066 var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a); -1 19067 // T = M^2 - 2 * S -1 19068 var t = m.redSqr().redISub(s).redISub(s); -1 19069 // X3 = T -1 19070 nx = t; -1 19071 // Y3 = M * (S - T) - 8 * YYYY -1 19072 var yyyy8 = yyyy.redIAdd(yyyy); -1 19073 yyyy8 = yyyy8.redIAdd(yyyy8); -1 19074 yyyy8 = yyyy8.redIAdd(yyyy8); -1 19075 ny = m.redMul(s.redISub(t)).redISub(yyyy8); -1 19076 // Z3 = 2 * Y1 -1 19077 nz = this.y.redAdd(this.y); -1 19078 } else { -1 19079 // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b -1 19080 // 3M + 5S -1 19081 -1 19082 // delta = Z1^2 -1 19083 var delta = this.z.redSqr(); -1 19084 // gamma = Y1^2 -1 19085 var gamma = this.y.redSqr(); -1 19086 // beta = X1 * gamma -1 19087 var beta = this.x.redMul(gamma); -1 19088 // alpha = 3 * (X1 - delta) * (X1 + delta) -1 19089 var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta)); -1 19090 alpha = alpha.redAdd(alpha).redIAdd(alpha); -1 19091 // X3 = alpha^2 - 8 * beta -1 19092 var beta4 = beta.redIAdd(beta); -1 19093 beta4 = beta4.redIAdd(beta4); -1 19094 var beta8 = beta4.redAdd(beta4); -1 19095 nx = alpha.redSqr().redISub(beta8); -1 19096 // Z3 = (Y1 + Z1)^2 - gamma - delta -1 19097 nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta); -1 19098 // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2 -1 19099 var ggamma8 = gamma.redSqr(); -1 19100 ggamma8 = ggamma8.redIAdd(ggamma8); -1 19101 ggamma8 = ggamma8.redIAdd(ggamma8); -1 19102 ggamma8 = ggamma8.redIAdd(ggamma8); -1 19103 ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8); -1 19104 } -1 19105 -1 19106 return this.curve.jpoint(nx, ny, nz); -1 19107 }; -1 19108 -1 19109 JPoint.prototype._dbl = function _dbl() { -1 19110 var a = this.curve.a; -1 19111 -1 19112 // 4M + 6S + 10A -1 19113 var jx = this.x; -1 19114 var jy = this.y; -1 19115 var jz = this.z; -1 19116 var jz4 = jz.redSqr().redSqr(); -1 19117 -1 19118 var jx2 = jx.redSqr(); -1 19119 var jy2 = jy.redSqr(); -1 19120 -1 19121 var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); -1 19122 -1 19123 var jxd4 = jx.redAdd(jx); -1 19124 jxd4 = jxd4.redIAdd(jxd4); -1 19125 var t1 = jxd4.redMul(jy2); -1 19126 var nx = c.redSqr().redISub(t1.redAdd(t1)); -1 19127 var t2 = t1.redISub(nx); -1 19128 -1 19129 var jyd8 = jy2.redSqr(); -1 19130 jyd8 = jyd8.redIAdd(jyd8); -1 19131 jyd8 = jyd8.redIAdd(jyd8); -1 19132 jyd8 = jyd8.redIAdd(jyd8); -1 19133 var ny = c.redMul(t2).redISub(jyd8); -1 19134 var nz = jy.redAdd(jy).redMul(jz); -1 19135 -1 19136 return this.curve.jpoint(nx, ny, nz); -1 19137 }; -1 19138 -1 19139 JPoint.prototype.trpl = function trpl() { -1 19140 if (!this.curve.zeroA) -1 19141 return this.dbl().add(this); -1 19142 -1 19143 // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl -1 19144 // 5M + 10S + ... -1 19145 -1 19146 // XX = X1^2 -1 19147 var xx = this.x.redSqr(); -1 19148 // YY = Y1^2 -1 19149 var yy = this.y.redSqr(); -1 19150 // ZZ = Z1^2 -1 19151 var zz = this.z.redSqr(); -1 19152 // YYYY = YY^2 -1 19153 var yyyy = yy.redSqr(); -1 19154 // M = 3 * XX + a * ZZ2; a = 0 -1 19155 var m = xx.redAdd(xx).redIAdd(xx); -1 19156 // MM = M^2 -1 19157 var mm = m.redSqr(); -1 19158 // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM -1 19159 var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); -1 19160 e = e.redIAdd(e); -1 19161 e = e.redAdd(e).redIAdd(e); -1 19162 e = e.redISub(mm); -1 19163 // EE = E^2 -1 19164 var ee = e.redSqr(); -1 19165 // T = 16*YYYY -1 19166 var t = yyyy.redIAdd(yyyy); -1 19167 t = t.redIAdd(t); -1 19168 t = t.redIAdd(t); -1 19169 t = t.redIAdd(t); -1 19170 // U = (M + E)^2 - MM - EE - T -1 19171 var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t); -1 19172 // X3 = 4 * (X1 * EE - 4 * YY * U) -1 19173 var yyu4 = yy.redMul(u); -1 19174 yyu4 = yyu4.redIAdd(yyu4); -1 19175 yyu4 = yyu4.redIAdd(yyu4); -1 19176 var nx = this.x.redMul(ee).redISub(yyu4); -1 19177 nx = nx.redIAdd(nx); -1 19178 nx = nx.redIAdd(nx); -1 19179 // Y3 = 8 * Y1 * (U * (T - U) - E * EE) -1 19180 var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee))); -1 19181 ny = ny.redIAdd(ny); -1 19182 ny = ny.redIAdd(ny); -1 19183 ny = ny.redIAdd(ny); -1 19184 // Z3 = (Z1 + E)^2 - ZZ - EE -1 19185 var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee); -1 19186 -1 19187 return this.curve.jpoint(nx, ny, nz); -1 19188 }; -1 19189 -1 19190 JPoint.prototype.mul = function mul(k, kbase) { -1 19191 k = new BN(k, kbase); -1 19192 -1 19193 return this.curve._wnafMul(this, k); -1 19194 }; -1 19195 -1 19196 JPoint.prototype.eq = function eq(p) { -1 19197 if (p.type === 'affine') -1 19198 return this.eq(p.toJ()); -1 19199 -1 19200 if (this === p) -1 19201 return true; -1 19202 -1 19203 // x1 * z2^2 == x2 * z1^2 -1 19204 var z2 = this.z.redSqr(); -1 19205 var pz2 = p.z.redSqr(); -1 19206 if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0) -1 19207 return false; -1 19208 -1 19209 // y1 * z2^3 == y2 * z1^3 -1 19210 var z3 = z2.redMul(this.z); -1 19211 var pz3 = pz2.redMul(p.z); -1 19212 return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0; -1 19213 }; -1 19214 -1 19215 JPoint.prototype.eqXToP = function eqXToP(x) { -1 19216 var zs = this.z.redSqr(); -1 19217 var rx = x.toRed(this.curve.red).redMul(zs); -1 19218 if (this.x.cmp(rx) === 0) -1 19219 return true; -1 19220 -1 19221 var xc = x.clone(); -1 19222 var t = this.curve.redN.redMul(zs); -1 19223 for (;;) { -1 19224 xc.iadd(this.curve.n); -1 19225 if (xc.cmp(this.curve.p) >= 0) -1 19226 return false; -1 19227 -1 19228 rx.redIAdd(t); -1 19229 if (this.x.cmp(rx) === 0) -1 19230 return true; -1 19231 } -1 19232 }; -1 19233 -1 19234 JPoint.prototype.inspect = function inspect() { -1 19235 if (this.isInfinity()) -1 19236 return '<EC JPoint Infinity>'; -1 19237 return '<EC JPoint x: ' + this.x.toString(16, 2) + -1 19238 ' y: ' + this.y.toString(16, 2) + -1 19239 ' z: ' + this.z.toString(16, 2) + '>'; -1 19240 }; -1 19241 -1 19242 JPoint.prototype.isInfinity = function isInfinity() { -1 19243 // XXX This code assumes that zero is always zero in red -1 19244 return this.z.cmpn(0) === 0; -1 19245 }; -1 19246 -1 19247 },{"../utils":97,"./base":84,"bn.js":98,"inherits":132}],89:[function(require,module,exports){ -1 19248 'use strict'; -1 19249 -1 19250 var curves = exports; -1 19251 -1 19252 var hash = require('hash.js'); -1 19253 var curve = require('./curve'); -1 19254 var utils = require('./utils'); -1 19255 -1 19256 var assert = utils.assert; -1 19257 -1 19258 function PresetCurve(options) { -1 19259 if (options.type === 'short') -1 19260 this.curve = new curve.short(options); -1 19261 else if (options.type === 'edwards') -1 19262 this.curve = new curve.edwards(options); -1 19263 else -1 19264 this.curve = new curve.mont(options); -1 19265 this.g = this.curve.g; -1 19266 this.n = this.curve.n; -1 19267 this.hash = options.hash; -1 19268 -1 19269 assert(this.g.validate(), 'Invalid curve'); -1 19270 assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); -1 19271 } -1 19272 curves.PresetCurve = PresetCurve; -1 19273 -1 19274 function defineCurve(name, options) { -1 19275 Object.defineProperty(curves, name, { -1 19276 configurable: true, -1 19277 enumerable: true, -1 19278 get: function() { -1 19279 var curve = new PresetCurve(options); -1 19280 Object.defineProperty(curves, name, { -1 19281 configurable: true, -1 19282 enumerable: true, -1 19283 value: curve, -1 19284 }); -1 19285 return curve; -1 19286 }, -1 19287 }); -1 19288 } -1 19289 -1 19290 defineCurve('p192', { -1 19291 type: 'short', -1 19292 prime: 'p192', -1 19293 p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff', -1 19294 a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc', -1 19295 b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1', -1 19296 n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831', -1 19297 hash: hash.sha256, -1 19298 gRed: false, -1 19299 g: [ -1 19300 '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', -1 19301 '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811', -1 19302 ], -1 19303 }); -1 19304 -1 19305 defineCurve('p224', { -1 19306 type: 'short', -1 19307 prime: 'p224', -1 19308 p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001', -1 19309 a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe', -1 19310 b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4', -1 19311 n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d', -1 19312 hash: hash.sha256, -1 19313 gRed: false, -1 19314 g: [ -1 19315 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', -1 19316 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34', -1 19317 ], -1 19318 }); -1 19319 -1 19320 defineCurve('p256', { -1 19321 type: 'short', -1 19322 prime: null, -1 19323 p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff', -1 19324 a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc', -1 19325 b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b', -1 19326 n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551', -1 19327 hash: hash.sha256, -1 19328 gRed: false, -1 19329 g: [ -1 19330 '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', -1 19331 '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5', -1 19332 ], -1 19333 }); -1 19334 -1 19335 defineCurve('p384', { -1 19336 type: 'short', -1 19337 prime: null, -1 19338 p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + -1 19339 'fffffffe ffffffff 00000000 00000000 ffffffff', -1 19340 a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + -1 19341 'fffffffe ffffffff 00000000 00000000 fffffffc', -1 19342 b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' + -1 19343 '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef', -1 19344 n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' + -1 19345 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973', -1 19346 hash: hash.sha384, -1 19347 gRed: false, -1 19348 g: [ -1 19349 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' + -1 19350 '5502f25d bf55296c 3a545e38 72760ab7', -1 19351 '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' + -1 19352 '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f', -1 19353 ], -1 19354 }); -1 19355 -1 19356 defineCurve('p521', { -1 19357 type: 'short', -1 19358 prime: null, -1 19359 p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + -1 19360 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + -1 19361 'ffffffff ffffffff ffffffff ffffffff ffffffff', -1 19362 a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + -1 19363 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' + -1 19364 'ffffffff ffffffff ffffffff ffffffff fffffffc', -1 19365 b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' + -1 19366 '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' + -1 19367 '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00', -1 19368 n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' + -1 19369 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' + -1 19370 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409', -1 19371 hash: hash.sha512, -1 19372 gRed: false, -1 19373 g: [ -1 19374 '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' + -1 19375 '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' + -1 19376 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66', -1 19377 '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' + -1 19378 '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' + -1 19379 '3fad0761 353c7086 a272c240 88be9476 9fd16650', -1 19380 ], -1 19381 }); -1 19382 -1 19383 defineCurve('curve25519', { -1 19384 type: 'mont', -1 19385 prime: 'p25519', -1 19386 p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', -1 19387 a: '76d06', -1 19388 b: '1', -1 19389 n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', -1 19390 hash: hash.sha256, -1 19391 gRed: false, -1 19392 g: [ -1 19393 '9', -1 19394 ], -1 19395 }); -1 19396 -1 19397 defineCurve('ed25519', { -1 19398 type: 'edwards', -1 19399 prime: 'p25519', -1 19400 p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', -1 19401 a: '-1', -1 19402 c: '1', -1 19403 // -121665 * (121666^(-1)) (mod P) -1 19404 d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', -1 19405 n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', -1 19406 hash: hash.sha256, -1 19407 gRed: false, -1 19408 g: [ -1 19409 '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', -1 19410 -1 19411 // 4/5 -1 19412 '6666666666666666666666666666666666666666666666666666666666666658', -1 19413 ], -1 19414 }); -1 19415 -1 19416 var pre; -1 19417 try { -1 19418 pre = require('./precomputed/secp256k1'); -1 19419 } catch (e) { -1 19420 pre = undefined; -1 19421 } -1 19422 -1 19423 defineCurve('secp256k1', { -1 19424 type: 'short', -1 19425 prime: 'k256', -1 19426 p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f', -1 19427 a: '0', -1 19428 b: '7', -1 19429 n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141', -1 19430 h: '1', -1 19431 hash: hash.sha256, -1 19432 -1 19433 // Precomputed endomorphism -1 19434 beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', -1 19435 lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', -1 19436 basis: [ -1 19437 { -1 19438 a: '3086d221a7d46bcde86c90e49284eb15', -1 19439 b: '-e4437ed6010e88286f547fa90abfe4c3', -1 19440 }, -1 19441 { -1 19442 a: '114ca50f7a8e2f3f657c1108d9d44cfd8', -1 19443 b: '3086d221a7d46bcde86c90e49284eb15', -1 19444 }, -1 19445 ], -1 19446 -1 19447 gRed: false, -1 19448 g: [ -1 19449 '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', -1 19450 '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', -1 19451 pre, -1 19452 ], -1 19453 }); -1 19454 -1 19455 },{"./curve":86,"./precomputed/secp256k1":96,"./utils":97,"hash.js":118}],90:[function(require,module,exports){ -1 19456 'use strict'; -1 19457 -1 19458 var BN = require('bn.js'); -1 19459 var HmacDRBG = require('hmac-drbg'); -1 19460 var utils = require('../utils'); -1 19461 var curves = require('../curves'); -1 19462 var rand = require('brorand'); -1 19463 var assert = utils.assert; -1 19464 -1 19465 var KeyPair = require('./key'); -1 19466 var Signature = require('./signature'); -1 19467 -1 19468 function EC(options) { -1 19469 if (!(this instanceof EC)) -1 19470 return new EC(options); -1 19471 -1 19472 // Shortcut `elliptic.ec(curve-name)` -1 19473 if (typeof options === 'string') { -1 19474 assert(Object.prototype.hasOwnProperty.call(curves, options), -1 19475 'Unknown curve ' + options); -1 19476 -1 19477 options = curves[options]; -1 19478 } -1 19479 -1 19480 // Shortcut for `elliptic.ec(elliptic.curves.curveName)` -1 19481 if (options instanceof curves.PresetCurve) -1 19482 options = { curve: options }; -1 19483 -1 19484 this.curve = options.curve.curve; -1 19485 this.n = this.curve.n; -1 19486 this.nh = this.n.ushrn(1); -1 19487 this.g = this.curve.g; -1 19488 -1 19489 // Point on curve -1 19490 this.g = options.curve.g; -1 19491 this.g.precompute(options.curve.n.bitLength() + 1); -1 19492 -1 19493 // Hash for function for DRBG -1 19494 this.hash = options.hash || options.curve.hash; -1 19495 } -1 19496 module.exports = EC; -1 19497 -1 19498 EC.prototype.keyPair = function keyPair(options) { -1 19499 return new KeyPair(this, options); -1 19500 }; -1 19501 -1 19502 EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) { -1 19503 return KeyPair.fromPrivate(this, priv, enc); -1 19504 }; -1 19505 -1 19506 EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) { -1 19507 return KeyPair.fromPublic(this, pub, enc); -1 19508 }; -1 19509 -1 19510 EC.prototype.genKeyPair = function genKeyPair(options) { -1 19511 if (!options) -1 19512 options = {}; -1 19513 -1 19514 // Instantiate Hmac_DRBG -1 19515 var drbg = new HmacDRBG({ -1 19516 hash: this.hash, -1 19517 pers: options.pers, -1 19518 persEnc: options.persEnc || 'utf8', -1 19519 entropy: options.entropy || rand(this.hash.hmacStrength), -1 19520 entropyEnc: options.entropy && options.entropyEnc || 'utf8', -1 19521 nonce: this.n.toArray(), -1 19522 }); -1 19523 -1 19524 var bytes = this.n.byteLength(); -1 19525 var ns2 = this.n.sub(new BN(2)); -1 19526 for (;;) { -1 19527 var priv = new BN(drbg.generate(bytes)); -1 19528 if (priv.cmp(ns2) > 0) -1 19529 continue; -1 19530 -1 19531 priv.iaddn(1); -1 19532 return this.keyFromPrivate(priv); -1 19533 } -1 19534 }; -1 19535 -1 19536 EC.prototype._truncateToN = function _truncateToN(msg, truncOnly) { -1 19537 var delta = msg.byteLength() * 8 - this.n.bitLength(); -1 19538 if (delta > 0) -1 19539 msg = msg.ushrn(delta); -1 19540 if (!truncOnly && msg.cmp(this.n) >= 0) -1 19541 return msg.sub(this.n); -1 19542 else -1 19543 return msg; -1 19544 }; -1 19545 -1 19546 EC.prototype.sign = function sign(msg, key, enc, options) { -1 19547 if (typeof enc === 'object') { -1 19548 options = enc; -1 19549 enc = null; -1 19550 } -1 19551 if (!options) -1 19552 options = {}; -1 19553 -1 19554 key = this.keyFromPrivate(key, enc); -1 19555 msg = this._truncateToN(new BN(msg, 16)); -1 19556 -1 19557 // Zero-extend key to provide enough entropy -1 19558 var bytes = this.n.byteLength(); -1 19559 var bkey = key.getPrivate().toArray('be', bytes); -1 19560 -1 19561 // Zero-extend nonce to have the same byte size as N -1 19562 var nonce = msg.toArray('be', bytes); -1 19563 -1 19564 // Instantiate Hmac_DRBG -1 19565 var drbg = new HmacDRBG({ -1 19566 hash: this.hash, -1 19567 entropy: bkey, -1 19568 nonce: nonce, -1 19569 pers: options.pers, -1 19570 persEnc: options.persEnc || 'utf8', -1 19571 }); -1 19572 -1 19573 // Number of bytes to generate -1 19574 var ns1 = this.n.sub(new BN(1)); -1 19575 -1 19576 for (var iter = 0; ; iter++) { -1 19577 var k = options.k ? -1 19578 options.k(iter) : -1 19579 new BN(drbg.generate(this.n.byteLength())); -1 19580 k = this._truncateToN(k, true); -1 19581 if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0) -1 19582 continue; -1 19583 -1 19584 var kp = this.g.mul(k); -1 19585 if (kp.isInfinity()) -1 19586 continue; -1 19587 -1 19588 var kpX = kp.getX(); -1 19589 var r = kpX.umod(this.n); -1 19590 if (r.cmpn(0) === 0) -1 19591 continue; -1 19592 -1 19593 var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); -1 19594 s = s.umod(this.n); -1 19595 if (s.cmpn(0) === 0) -1 19596 continue; -1 19597 -1 19598 var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | -1 19599 (kpX.cmp(r) !== 0 ? 2 : 0); -1 19600 -1 19601 // Use complement of `s`, if it is > `n / 2` -1 19602 if (options.canonical && s.cmp(this.nh) > 0) { -1 19603 s = this.n.sub(s); -1 19604 recoveryParam ^= 1; -1 19605 } -1 19606 -1 19607 return new Signature({ r: r, s: s, recoveryParam: recoveryParam }); -1 19608 } -1 19609 }; -1 19610 -1 19611 EC.prototype.verify = function verify(msg, signature, key, enc) { -1 19612 msg = this._truncateToN(new BN(msg, 16)); -1 19613 key = this.keyFromPublic(key, enc); -1 19614 signature = new Signature(signature, 'hex'); -1 19615 -1 19616 // Perform primitive values validation -1 19617 var r = signature.r; -1 19618 var s = signature.s; -1 19619 if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0) -1 19620 return false; -1 19621 if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) -1 19622 return false; -1 19623 -1 19624 // Validate signature -1 19625 var sinv = s.invm(this.n); -1 19626 var u1 = sinv.mul(msg).umod(this.n); -1 19627 var u2 = sinv.mul(r).umod(this.n); -1 19628 var p; -1 19629 -1 19630 if (!this.curve._maxwellTrick) { -1 19631 p = this.g.mulAdd(u1, key.getPublic(), u2); -1 19632 if (p.isInfinity()) -1 19633 return false; -1 19634 -1 19635 return p.getX().umod(this.n).cmp(r) === 0; -1 19636 } -1 19637 -1 19638 // NOTE: Greg Maxwell's trick, inspired by: -1 19639 // https://git.io/vad3K -1 19640 -1 19641 p = this.g.jmulAdd(u1, key.getPublic(), u2); -1 19642 if (p.isInfinity()) -1 19643 return false; -1 19644 -1 19645 // Compare `p.x` of Jacobian point with `r`, -1 19646 // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the -1 19647 // inverse of `p.z^2` -1 19648 return p.eqXToP(r); -1 19649 }; -1 19650 -1 19651 EC.prototype.recoverPubKey = function(msg, signature, j, enc) { -1 19652 assert((3 & j) === j, 'The recovery param is more than two bits'); -1 19653 signature = new Signature(signature, enc); -1 19654 -1 19655 var n = this.n; -1 19656 var e = new BN(msg); -1 19657 var r = signature.r; -1 19658 var s = signature.s; -1 19659 -1 19660 // A set LSB signifies that the y-coordinate is odd -1 19661 var isYOdd = j & 1; -1 19662 var isSecondKey = j >> 1; -1 19663 if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) -1 19664 throw new Error('Unable to find sencond key candinate'); -1 19665 -1 19666 // 1.1. Let x = r + jn. -1 19667 if (isSecondKey) -1 19668 r = this.curve.pointFromX(r.add(this.curve.n), isYOdd); -1 19669 else -1 19670 r = this.curve.pointFromX(r, isYOdd); -1 19671 -1 19672 var rInv = signature.r.invm(n); -1 19673 var s1 = n.sub(e).mul(rInv).umod(n); -1 19674 var s2 = s.mul(rInv).umod(n); -1 19675 -1 19676 // 1.6.1 Compute Q = r^-1 (sR - eG) -1 19677 // Q = r^-1 (sR + -eG) -1 19678 return this.g.mulAdd(s1, r, s2); -1 19679 }; -1 19680 -1 19681 EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { -1 19682 signature = new Signature(signature, enc); -1 19683 if (signature.recoveryParam !== null) -1 19684 return signature.recoveryParam; -1 19685 -1 19686 for (var i = 0; i < 4; i++) { -1 19687 var Qprime; -1 19688 try { -1 19689 Qprime = this.recoverPubKey(e, signature, i); -1 19690 } catch (e) { -1 19691 continue; -1 19692 } -1 19693 -1 19694 if (Qprime.eq(Q)) -1 19695 return i; -1 19696 } -1 19697 throw new Error('Unable to find valid recovery factor'); -1 19698 }; -1 19699 -1 19700 },{"../curves":89,"../utils":97,"./key":91,"./signature":92,"bn.js":98,"brorand":18,"hmac-drbg":130}],91:[function(require,module,exports){ -1 19701 'use strict'; -1 19702 -1 19703 var BN = require('bn.js'); -1 19704 var utils = require('../utils'); -1 19705 var assert = utils.assert; -1 19706 -1 19707 function KeyPair(ec, options) { -1 19708 this.ec = ec; -1 19709 this.priv = null; -1 19710 this.pub = null; -1 19711 -1 19712 // KeyPair(ec, { priv: ..., pub: ... }) -1 19713 if (options.priv) -1 19714 this._importPrivate(options.priv, options.privEnc); -1 19715 if (options.pub) -1 19716 this._importPublic(options.pub, options.pubEnc); -1 19717 } -1 19718 module.exports = KeyPair; -1 19719 -1 19720 KeyPair.fromPublic = function fromPublic(ec, pub, enc) { -1 19721 if (pub instanceof KeyPair) -1 19722 return pub; -1 19723 -1 19724 return new KeyPair(ec, { -1 19725 pub: pub, -1 19726 pubEnc: enc, -1 19727 }); -1 19728 }; -1 19729 -1 19730 KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) { -1 19731 if (priv instanceof KeyPair) -1 19732 return priv; -1 19733 -1 19734 return new KeyPair(ec, { -1 19735 priv: priv, -1 19736 privEnc: enc, -1 19737 }); -1 19738 }; -1 19739 -1 19740 KeyPair.prototype.validate = function validate() { -1 19741 var pub = this.getPublic(); -1 19742 -1 19743 if (pub.isInfinity()) -1 19744 return { result: false, reason: 'Invalid public key' }; -1 19745 if (!pub.validate()) -1 19746 return { result: false, reason: 'Public key is not a point' }; -1 19747 if (!pub.mul(this.ec.curve.n).isInfinity()) -1 19748 return { result: false, reason: 'Public key * N != O' }; -1 19749 -1 19750 return { result: true, reason: null }; -1 19751 }; -1 19752 -1 19753 KeyPair.prototype.getPublic = function getPublic(compact, enc) { -1 19754 // compact is optional argument -1 19755 if (typeof compact === 'string') { -1 19756 enc = compact; -1 19757 compact = null; -1 19758 } -1 19759 -1 19760 if (!this.pub) -1 19761 this.pub = this.ec.g.mul(this.priv); -1 19762 -1 19763 if (!enc) -1 19764 return this.pub; -1 19765 -1 19766 return this.pub.encode(enc, compact); -1 19767 }; -1 19768 -1 19769 KeyPair.prototype.getPrivate = function getPrivate(enc) { -1 19770 if (enc === 'hex') -1 19771 return this.priv.toString(16, 2); -1 19772 else -1 19773 return this.priv; -1 19774 }; -1 19775 -1 19776 KeyPair.prototype._importPrivate = function _importPrivate(key, enc) { -1 19777 this.priv = new BN(key, enc || 16); -1 19778 -1 19779 // Ensure that the priv won't be bigger than n, otherwise we may fail -1 19780 // in fixed multiplication method -1 19781 this.priv = this.priv.umod(this.ec.curve.n); -1 19782 }; -1 19783 -1 19784 KeyPair.prototype._importPublic = function _importPublic(key, enc) { -1 19785 if (key.x || key.y) { -1 19786 // Montgomery points only have an `x` coordinate. -1 19787 // Weierstrass/Edwards points on the other hand have both `x` and -1 19788 // `y` coordinates. -1 19789 if (this.ec.curve.type === 'mont') { -1 19790 assert(key.x, 'Need x coordinate'); -1 19791 } else if (this.ec.curve.type === 'short' || -1 19792 this.ec.curve.type === 'edwards') { -1 19793 assert(key.x && key.y, 'Need both x and y coordinate'); -1 19794 } -1 19795 this.pub = this.ec.curve.point(key.x, key.y); -1 19796 return; -1 19797 } -1 19798 this.pub = this.ec.curve.decodePoint(key, enc); -1 19799 }; -1 19800 -1 19801 // ECDH -1 19802 KeyPair.prototype.derive = function derive(pub) { -1 19803 if(!pub.validate()) { -1 19804 assert(pub.validate(), 'public point not validated'); -1 19805 } -1 19806 return pub.mul(this.priv).getX(); -1 19807 }; -1 19808 -1 19809 // ECDSA -1 19810 KeyPair.prototype.sign = function sign(msg, enc, options) { -1 19811 return this.ec.sign(msg, this, enc, options); -1 19812 }; -1 19813 -1 19814 KeyPair.prototype.verify = function verify(msg, signature) { -1 19815 return this.ec.verify(msg, signature, this); -1 19816 }; -1 19817 -1 19818 KeyPair.prototype.inspect = function inspect() { -1 19819 return '<Key priv: ' + (this.priv && this.priv.toString(16, 2)) + -1 19820 ' pub: ' + (this.pub && this.pub.inspect()) + ' >'; -1 19821 }; -1 19822 -1 19823 },{"../utils":97,"bn.js":98}],92:[function(require,module,exports){ -1 19824 'use strict'; -1 19825 -1 19826 var BN = require('bn.js'); -1 19827 -1 19828 var utils = require('../utils'); -1 19829 var assert = utils.assert; -1 19830 -1 19831 function Signature(options, enc) { -1 19832 if (options instanceof Signature) -1 19833 return options; -1 19834 -1 19835 if (this._importDER(options, enc)) -1 19836 return; -1 19837 -1 19838 assert(options.r && options.s, 'Signature without r or s'); -1 19839 this.r = new BN(options.r, 16); -1 19840 this.s = new BN(options.s, 16); -1 19841 if (options.recoveryParam === undefined) -1 19842 this.recoveryParam = null; -1 19843 else -1 19844 this.recoveryParam = options.recoveryParam; -1 19845 } -1 19846 module.exports = Signature; -1 19847 -1 19848 function Position() { -1 19849 this.place = 0; -1 19850 } -1 19851 -1 19852 function getLength(buf, p) { -1 19853 var initial = buf[p.place++]; -1 19854 if (!(initial & 0x80)) { -1 19855 return initial; -1 19856 } -1 19857 var octetLen = initial & 0xf; -1 19858 -1 19859 // Indefinite length or overflow -1 19860 if (octetLen === 0 || octetLen > 4) { -1 19861 return false; -1 19862 } -1 19863 -1 19864 var val = 0; -1 19865 for (var i = 0, off = p.place; i < octetLen; i++, off++) { -1 19866 val <<= 8; -1 19867 val |= buf[off]; -1 19868 val >>>= 0; -1 19869 } -1 19870 -1 19871 // Leading zeroes -1 19872 if (val <= 0x7f) { -1 19873 return false; -1 19874 } -1 19875 -1 19876 p.place = off; -1 19877 return val; -1 19878 } -1 19879 -1 19880 function rmPadding(buf) { -1 19881 var i = 0; -1 19882 var len = buf.length - 1; -1 19883 while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) { -1 19884 i++; -1 19885 } -1 19886 if (i === 0) { -1 19887 return buf; -1 19888 } -1 19889 return buf.slice(i); -1 19890 } -1 19891 -1 19892 Signature.prototype._importDER = function _importDER(data, enc) { -1 19893 data = utils.toArray(data, enc); -1 19894 var p = new Position(); -1 19895 if (data[p.place++] !== 0x30) { -1 19896 return false; -1 19897 } -1 19898 var len = getLength(data, p); -1 19899 if (len === false) { -1 19900 return false; -1 19901 } -1 19902 if ((len + p.place) !== data.length) { -1 19903 return false; -1 19904 } -1 19905 if (data[p.place++] !== 0x02) { -1 19906 return false; -1 19907 } -1 19908 var rlen = getLength(data, p); -1 19909 if (rlen === false) { -1 19910 return false; -1 19911 } -1 19912 var r = data.slice(p.place, rlen + p.place); -1 19913 p.place += rlen; -1 19914 if (data[p.place++] !== 0x02) { -1 19915 return false; -1 19916 } -1 19917 var slen = getLength(data, p); -1 19918 if (slen === false) { -1 19919 return false; -1 19920 } -1 19921 if (data.length !== slen + p.place) { -1 19922 return false; -1 19923 } -1 19924 var s = data.slice(p.place, slen + p.place); -1 19925 if (r[0] === 0) { -1 19926 if (r[1] & 0x80) { -1 19927 r = r.slice(1); -1 19928 } else { -1 19929 // Leading zeroes -1 19930 return false; -1 19931 } -1 19932 } -1 19933 if (s[0] === 0) { -1 19934 if (s[1] & 0x80) { -1 19935 s = s.slice(1); -1 19936 } else { -1 19937 // Leading zeroes -1 19938 return false; -1 19939 } -1 19940 } -1 19941 -1 19942 this.r = new BN(r); -1 19943 this.s = new BN(s); -1 19944 this.recoveryParam = null; -1 19945 -1 19946 return true; -1 19947 }; -1 19948 -1 19949 function constructLength(arr, len) { -1 19950 if (len < 0x80) { -1 19951 arr.push(len); -1 19952 return; -1 19953 } -1 19954 var octets = 1 + (Math.log(len) / Math.LN2 >>> 3); -1 19955 arr.push(octets | 0x80); -1 19956 while (--octets) { -1 19957 arr.push((len >>> (octets << 3)) & 0xff); -1 19958 } -1 19959 arr.push(len); -1 19960 } -1 19961 -1 19962 Signature.prototype.toDER = function toDER(enc) { -1 19963 var r = this.r.toArray(); -1 19964 var s = this.s.toArray(); -1 19965 -1 19966 // Pad values -1 19967 if (r[0] & 0x80) -1 19968 r = [ 0 ].concat(r); -1 19969 // Pad values -1 19970 if (s[0] & 0x80) -1 19971 s = [ 0 ].concat(s); -1 19972 -1 19973 r = rmPadding(r); -1 19974 s = rmPadding(s); -1 19975 -1 19976 while (!s[0] && !(s[1] & 0x80)) { -1 19977 s = s.slice(1); -1 19978 } -1 19979 var arr = [ 0x02 ]; -1 19980 constructLength(arr, r.length); -1 19981 arr = arr.concat(r); -1 19982 arr.push(0x02); -1 19983 constructLength(arr, s.length); -1 19984 var backHalf = arr.concat(s); -1 19985 var res = [ 0x30 ]; -1 19986 constructLength(res, backHalf.length); -1 19987 res = res.concat(backHalf); -1 19988 return utils.encode(res, enc); -1 19989 }; -1 19990 -1 19991 },{"../utils":97,"bn.js":98}],93:[function(require,module,exports){ -1 19992 'use strict'; -1 19993 -1 19994 var hash = require('hash.js'); -1 19995 var curves = require('../curves'); -1 19996 var utils = require('../utils'); -1 19997 var assert = utils.assert; -1 19998 var parseBytes = utils.parseBytes; -1 19999 var KeyPair = require('./key'); -1 20000 var Signature = require('./signature'); -1 20001 -1 20002 function EDDSA(curve) { -1 20003 assert(curve === 'ed25519', 'only tested with ed25519 so far'); -1 20004 -1 20005 if (!(this instanceof EDDSA)) -1 20006 return new EDDSA(curve); -1 20007 -1 20008 curve = curves[curve].curve; -1 20009 this.curve = curve; -1 20010 this.g = curve.g; -1 20011 this.g.precompute(curve.n.bitLength() + 1); -1 20012 -1 20013 this.pointClass = curve.point().constructor; -1 20014 this.encodingLength = Math.ceil(curve.n.bitLength() / 8); -1 20015 this.hash = hash.sha512; -1 20016 } -1 20017 -1 20018 module.exports = EDDSA; -1 20019 -1 20020 /** -1 20021 * @param {Array|String} message - message bytes -1 20022 * @param {Array|String|KeyPair} secret - secret bytes or a keypair -1 20023 * @returns {Signature} - signature -1 20024 */ -1 20025 EDDSA.prototype.sign = function sign(message, secret) { -1 20026 message = parseBytes(message); -1 20027 var key = this.keyFromSecret(secret); -1 20028 var r = this.hashInt(key.messagePrefix(), message); -1 20029 var R = this.g.mul(r); -1 20030 var Rencoded = this.encodePoint(R); -1 20031 var s_ = this.hashInt(Rencoded, key.pubBytes(), message) -1 20032 .mul(key.priv()); -1 20033 var S = r.add(s_).umod(this.curve.n); -1 20034 return this.makeSignature({ R: R, S: S, Rencoded: Rencoded }); -1 20035 }; -1 20036 -1 20037 /** -1 20038 * @param {Array} message - message bytes -1 20039 * @param {Array|String|Signature} sig - sig bytes -1 20040 * @param {Array|String|Point|KeyPair} pub - public key -1 20041 * @returns {Boolean} - true if public key matches sig of message -1 20042 */ -1 20043 EDDSA.prototype.verify = function verify(message, sig, pub) { -1 20044 message = parseBytes(message); -1 20045 sig = this.makeSignature(sig); -1 20046 var key = this.keyFromPublic(pub); -1 20047 var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message); -1 20048 var SG = this.g.mul(sig.S()); -1 20049 var RplusAh = sig.R().add(key.pub().mul(h)); -1 20050 return RplusAh.eq(SG); -1 20051 }; -1 20052 -1 20053 EDDSA.prototype.hashInt = function hashInt() { -1 20054 var hash = this.hash(); -1 20055 for (var i = 0; i < arguments.length; i++) -1 20056 hash.update(arguments[i]); -1 20057 return utils.intFromLE(hash.digest()).umod(this.curve.n); -1 20058 }; -1 20059 -1 20060 EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) { -1 20061 return KeyPair.fromPublic(this, pub); -1 20062 }; -1 20063 -1 20064 EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) { -1 20065 return KeyPair.fromSecret(this, secret); -1 20066 }; -1 20067 -1 20068 EDDSA.prototype.makeSignature = function makeSignature(sig) { -1 20069 if (sig instanceof Signature) -1 20070 return sig; -1 20071 return new Signature(this, sig); -1 20072 }; -1 20073 -1 20074 /** -1 20075 * * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2 -1 20076 * -1 20077 * EDDSA defines methods for encoding and decoding points and integers. These are -1 20078 * helper convenience methods, that pass along to utility functions implied -1 20079 * parameters. -1 20080 * -1 20081 */ -1 20082 EDDSA.prototype.encodePoint = function encodePoint(point) { -1 20083 var enc = point.getY().toArray('le', this.encodingLength); -1 20084 enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0; -1 20085 return enc; -1 20086 }; -1 20087 -1 20088 EDDSA.prototype.decodePoint = function decodePoint(bytes) { -1 20089 bytes = utils.parseBytes(bytes); -1 20090 -1 20091 var lastIx = bytes.length - 1; -1 20092 var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80); -1 20093 var xIsOdd = (bytes[lastIx] & 0x80) !== 0; -1 20094 -1 20095 var y = utils.intFromLE(normed); -1 20096 return this.curve.pointFromY(y, xIsOdd); -1 20097 }; -1 20098 -1 20099 EDDSA.prototype.encodeInt = function encodeInt(num) { -1 20100 return num.toArray('le', this.encodingLength); -1 20101 }; -1 20102 -1 20103 EDDSA.prototype.decodeInt = function decodeInt(bytes) { -1 20104 return utils.intFromLE(bytes); -1 20105 }; -1 20106 -1 20107 EDDSA.prototype.isPoint = function isPoint(val) { -1 20108 return val instanceof this.pointClass; -1 20109 }; -1 20110 -1 20111 },{"../curves":89,"../utils":97,"./key":94,"./signature":95,"hash.js":118}],94:[function(require,module,exports){ -1 20112 'use strict'; -1 20113 -1 20114 var utils = require('../utils'); -1 20115 var assert = utils.assert; -1 20116 var parseBytes = utils.parseBytes; -1 20117 var cachedProperty = utils.cachedProperty; -1 20118 -1 20119 /** -1 20120 * @param {EDDSA} eddsa - instance -1 20121 * @param {Object} params - public/private key parameters -1 20122 * -1 20123 * @param {Array<Byte>} [params.secret] - secret seed bytes -1 20124 * @param {Point} [params.pub] - public key point (aka `A` in eddsa terms) -1 20125 * @param {Array<Byte>} [params.pub] - public key point encoded as bytes -1 20126 * -1 20127 */ -1 20128 function KeyPair(eddsa, params) { -1 20129 this.eddsa = eddsa; -1 20130 this._secret = parseBytes(params.secret); -1 20131 if (eddsa.isPoint(params.pub)) -1 20132 this._pub = params.pub; -1 20133 else -1 20134 this._pubBytes = parseBytes(params.pub); -1 20135 } -1 20136 -1 20137 KeyPair.fromPublic = function fromPublic(eddsa, pub) { -1 20138 if (pub instanceof KeyPair) -1 20139 return pub; -1 20140 return new KeyPair(eddsa, { pub: pub }); -1 20141 }; -1 20142 -1 20143 KeyPair.fromSecret = function fromSecret(eddsa, secret) { -1 20144 if (secret instanceof KeyPair) -1 20145 return secret; -1 20146 return new KeyPair(eddsa, { secret: secret }); -1 20147 }; -1 20148 -1 20149 KeyPair.prototype.secret = function secret() { -1 20150 return this._secret; -1 20151 }; -1 20152 -1 20153 cachedProperty(KeyPair, 'pubBytes', function pubBytes() { -1 20154 return this.eddsa.encodePoint(this.pub()); -1 20155 }); -1 20156 -1 20157 cachedProperty(KeyPair, 'pub', function pub() { -1 20158 if (this._pubBytes) -1 20159 return this.eddsa.decodePoint(this._pubBytes); -1 20160 return this.eddsa.g.mul(this.priv()); -1 20161 }); -1 20162 -1 20163 cachedProperty(KeyPair, 'privBytes', function privBytes() { -1 20164 var eddsa = this.eddsa; -1 20165 var hash = this.hash(); -1 20166 var lastIx = eddsa.encodingLength - 1; -1 20167 -1 20168 var a = hash.slice(0, eddsa.encodingLength); -1 20169 a[0] &= 248; -1 20170 a[lastIx] &= 127; -1 20171 a[lastIx] |= 64; -1 20172 -1 20173 return a; -1 20174 }); -1 20175 -1 20176 cachedProperty(KeyPair, 'priv', function priv() { -1 20177 return this.eddsa.decodeInt(this.privBytes()); -1 20178 }); -1 20179 -1 20180 cachedProperty(KeyPair, 'hash', function hash() { -1 20181 return this.eddsa.hash().update(this.secret()).digest(); -1 20182 }); -1 20183 -1 20184 cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() { -1 20185 return this.hash().slice(this.eddsa.encodingLength); -1 20186 }); -1 20187 -1 20188 KeyPair.prototype.sign = function sign(message) { -1 20189 assert(this._secret, 'KeyPair can only verify'); -1 20190 return this.eddsa.sign(message, this); -1 20191 }; -1 20192 -1 20193 KeyPair.prototype.verify = function verify(message, sig) { -1 20194 return this.eddsa.verify(message, sig, this); -1 20195 }; -1 20196 -1 20197 KeyPair.prototype.getSecret = function getSecret(enc) { -1 20198 assert(this._secret, 'KeyPair is public only'); -1 20199 return utils.encode(this.secret(), enc); -1 20200 }; -1 20201 -1 20202 KeyPair.prototype.getPublic = function getPublic(enc) { -1 20203 return utils.encode(this.pubBytes(), enc); -1 20204 }; -1 20205 -1 20206 module.exports = KeyPair; -1 20207 -1 20208 },{"../utils":97}],95:[function(require,module,exports){ -1 20209 'use strict'; -1 20210 -1 20211 var BN = require('bn.js'); -1 20212 var utils = require('../utils'); -1 20213 var assert = utils.assert; -1 20214 var cachedProperty = utils.cachedProperty; -1 20215 var parseBytes = utils.parseBytes; -1 20216 -1 20217 /** -1 20218 * @param {EDDSA} eddsa - eddsa instance -1 20219 * @param {Array<Bytes>|Object} sig - -1 20220 * @param {Array<Bytes>|Point} [sig.R] - R point as Point or bytes -1 20221 * @param {Array<Bytes>|bn} [sig.S] - S scalar as bn or bytes -1 20222 * @param {Array<Bytes>} [sig.Rencoded] - R point encoded -1 20223 * @param {Array<Bytes>} [sig.Sencoded] - S scalar encoded -1 20224 */ -1 20225 function Signature(eddsa, sig) { -1 20226 this.eddsa = eddsa; -1 20227 -1 20228 if (typeof sig !== 'object') -1 20229 sig = parseBytes(sig); -1 20230 -1 20231 if (Array.isArray(sig)) { -1 20232 sig = { -1 20233 R: sig.slice(0, eddsa.encodingLength), -1 20234 S: sig.slice(eddsa.encodingLength), -1 20235 }; -1 20236 } -1 20237 -1 20238 assert(sig.R && sig.S, 'Signature without R or S'); -1 20239 -1 20240 if (eddsa.isPoint(sig.R)) -1 20241 this._R = sig.R; -1 20242 if (sig.S instanceof BN) -1 20243 this._S = sig.S; -1 20244 -1 20245 this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded; -1 20246 this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded; -1 20247 } -1 20248 -1 20249 cachedProperty(Signature, 'S', function S() { -1 20250 return this.eddsa.decodeInt(this.Sencoded()); -1 20251 }); -1 20252 -1 20253 cachedProperty(Signature, 'R', function R() { -1 20254 return this.eddsa.decodePoint(this.Rencoded()); -1 20255 }); -1 20256 -1 20257 cachedProperty(Signature, 'Rencoded', function Rencoded() { -1 20258 return this.eddsa.encodePoint(this.R()); -1 20259 }); -1 20260 -1 20261 cachedProperty(Signature, 'Sencoded', function Sencoded() { -1 20262 return this.eddsa.encodeInt(this.S()); -1 20263 }); -1 20264 -1 20265 Signature.prototype.toBytes = function toBytes() { -1 20266 return this.Rencoded().concat(this.Sencoded()); -1 20267 }; -1 20268 -1 20269 Signature.prototype.toHex = function toHex() { -1 20270 return utils.encode(this.toBytes(), 'hex').toUpperCase(); -1 20271 }; -1 20272 -1 20273 module.exports = Signature; -1 20274 -1 20275 },{"../utils":97,"bn.js":98}],96:[function(require,module,exports){ -1 20276 module.exports = { -1 20277 doubles: { -1 20278 step: 4, -1 20279 points: [ -1 20280 [ -1 20281 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a', -1 20282 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821', -1 20283 ], -1 20284 [ -1 20285 '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508', -1 20286 '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf', -1 20287 ], -1 20288 [ -1 20289 '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739', -1 20290 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695', -1 20291 ], -1 20292 [ -1 20293 '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640', -1 20294 '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9', -1 20295 ], -1 20296 [ -1 20297 '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c', -1 20298 '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36', -1 20299 ], -1 20300 [ -1 20301 '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda', -1 20302 '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f', -1 20303 ], -1 20304 [ -1 20305 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa', -1 20306 '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999', -1 20307 ], -1 20308 [ -1 20309 '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0', -1 20310 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09', -1 20311 ], -1 20312 [ -1 20313 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d', -1 20314 '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d', -1 20315 ], -1 20316 [ -1 20317 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d', -1 20318 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088', -1 20319 ], -1 20320 [ -1 20321 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1', -1 20322 '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d', -1 20323 ], -1 20324 [ -1 20325 '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0', -1 20326 '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8', -1 20327 ], -1 20328 [ -1 20329 '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047', -1 20330 '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a', -1 20331 ], -1 20332 [ -1 20333 '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862', -1 20334 '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453', -1 20335 ], -1 20336 [ -1 20337 '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7', -1 20338 '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160', -1 20339 ], -1 20340 [ -1 20341 '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd', -1 20342 '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0', -1 20343 ], -1 20344 [ -1 20345 '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83', -1 20346 '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6', -1 20347 ], -1 20348 [ -1 20349 '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a', -1 20350 '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589', -1 20351 ], -1 20352 [ -1 20353 '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8', -1 20354 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17', -1 20355 ], -1 20356 [ -1 20357 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d', -1 20358 '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda', -1 20359 ], -1 20360 [ -1 20361 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725', -1 20362 '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd', -1 20363 ], -1 20364 [ -1 20365 '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754', -1 20366 '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2', -1 20367 ], -1 20368 [ -1 20369 '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c', -1 20370 '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6', -1 20371 ], -1 20372 [ -1 20373 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6', -1 20374 '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f', -1 20375 ], -1 20376 [ -1 20377 '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39', -1 20378 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01', -1 20379 ], -1 20380 [ -1 20381 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891', -1 20382 '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3', -1 20383 ], -1 20384 [ -1 20385 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b', -1 20386 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f', -1 20387 ], -1 20388 [ -1 20389 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03', -1 20390 '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7', -1 20391 ], -1 20392 [ -1 20393 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d', -1 20394 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78', -1 20395 ], -1 20396 [ -1 20397 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070', -1 20398 '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1', -1 20399 ], -1 20400 [ -1 20401 '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4', -1 20402 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150', -1 20403 ], -1 20404 [ -1 20405 '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da', -1 20406 '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82', -1 20407 ], -1 20408 [ -1 20409 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11', -1 20410 '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc', -1 20411 ], -1 20412 [ -1 20413 '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e', -1 20414 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b', -1 20415 ], -1 20416 [ -1 20417 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41', -1 20418 '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51', -1 20419 ], -1 20420 [ -1 20421 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef', -1 20422 '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45', -1 20423 ], -1 20424 [ -1 20425 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8', -1 20426 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120', -1 20427 ], -1 20428 [ -1 20429 '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d', -1 20430 '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84', -1 20431 ], -1 20432 [ -1 20433 '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96', -1 20434 '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d', -1 20435 ], -1 20436 [ -1 20437 '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd', -1 20438 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d', -1 20439 ], -1 20440 [ -1 20441 '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5', -1 20442 '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8', -1 20443 ], -1 20444 [ -1 20445 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266', -1 20446 '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8', -1 20447 ], -1 20448 [ -1 20449 '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71', -1 20450 '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac', -1 20451 ], -1 20452 [ -1 20453 '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac', -1 20454 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f', -1 20455 ], -1 20456 [ -1 20457 '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751', -1 20458 '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962', -1 20459 ], -1 20460 [ -1 20461 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e', -1 20462 '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907', -1 20463 ], -1 20464 [ -1 20465 '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241', -1 20466 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec', -1 20467 ], -1 20468 [ -1 20469 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3', -1 20470 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d', -1 20471 ], -1 20472 [ -1 20473 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f', -1 20474 '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414', -1 20475 ], -1 20476 [ -1 20477 '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19', -1 20478 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd', -1 20479 ], -1 20480 [ -1 20481 '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be', -1 20482 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0', -1 20483 ], -1 20484 [ -1 20485 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9', -1 20486 '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811', -1 20487 ], -1 20488 [ -1 20489 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2', -1 20490 '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1', -1 20491 ], -1 20492 [ -1 20493 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13', -1 20494 '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c', -1 20495 ], -1 20496 [ -1 20497 '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c', -1 20498 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73', -1 20499 ], -1 20500 [ -1 20501 '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba', -1 20502 '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd', -1 20503 ], -1 20504 [ -1 20505 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151', -1 20506 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405', -1 20507 ], -1 20508 [ -1 20509 '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073', -1 20510 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589', -1 20511 ], -1 20512 [ -1 20513 '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458', -1 20514 '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e', -1 20515 ], -1 20516 [ -1 20517 '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b', -1 20518 '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27', -1 20519 ], -1 20520 [ -1 20521 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366', -1 20522 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1', -1 20523 ], -1 20524 [ -1 20525 '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa', -1 20526 '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482', -1 20527 ], -1 20528 [ -1 20529 '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0', -1 20530 '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945', -1 20531 ], -1 20532 [ -1 20533 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787', -1 20534 '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573', -1 20535 ], -1 20536 [ -1 20537 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e', -1 20538 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82', -1 20539 ], -1 20540 ], -1 20541 }, -1 20542 naf: { -1 20543 wnd: 7, -1 20544 points: [ -1 20545 [ -1 20546 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9', -1 20547 '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672', -1 20548 ], -1 20549 [ -1 20550 '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4', -1 20551 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6', -1 20552 ], -1 20553 [ -1 20554 '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc', -1 20555 '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da', -1 20556 ], -1 20557 [ -1 20558 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe', -1 20559 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37', -1 20560 ], -1 20561 [ -1 20562 '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb', -1 20563 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b', -1 20564 ], -1 20565 [ -1 20566 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8', -1 20567 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81', -1 20568 ], -1 20569 [ -1 20570 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e', -1 20571 '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58', -1 20572 ], -1 20573 [ -1 20574 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34', -1 20575 '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77', -1 20576 ], -1 20577 [ -1 20578 '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c', -1 20579 '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a', -1 20580 ], -1 20581 [ -1 20582 '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5', -1 20583 '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c', -1 20584 ], -1 20585 [ -1 20586 '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f', -1 20587 '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67', -1 20588 ], -1 20589 [ -1 20590 '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714', -1 20591 '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402', -1 20592 ], -1 20593 [ -1 20594 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729', -1 20595 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55', -1 20596 ], -1 20597 [ -1 20598 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db', -1 20599 '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482', -1 20600 ], -1 20601 [ -1 20602 '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4', -1 20603 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82', -1 20604 ], -1 20605 [ -1 20606 '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5', -1 20607 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396', -1 20608 ], -1 20609 [ -1 20610 '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479', -1 20611 '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49', -1 20612 ], -1 20613 [ -1 20614 '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d', -1 20615 '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf', -1 20616 ], -1 20617 [ -1 20618 '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f', -1 20619 '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a', -1 20620 ], -1 20621 [ -1 20622 '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb', -1 20623 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7', -1 20624 ], -1 20625 [ -1 20626 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9', -1 20627 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933', -1 20628 ], -1 20629 [ -1 20630 '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963', -1 20631 '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a', -1 20632 ], -1 20633 [ -1 20634 '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74', -1 20635 '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6', -1 20636 ], -1 20637 [ -1 20638 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530', -1 20639 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37', -1 20640 ], -1 20641 [ -1 20642 '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b', -1 20643 '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e', -1 20644 ], -1 20645 [ -1 20646 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247', -1 20647 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6', -1 20648 ], -1 20649 [ -1 20650 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1', -1 20651 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476', -1 20652 ], -1 20653 [ -1 20654 '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120', -1 20655 '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40', -1 20656 ], -1 20657 [ -1 20658 '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435', -1 20659 '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61', -1 20660 ], -1 20661 [ -1 20662 '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18', -1 20663 '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683', -1 20664 ], -1 20665 [ -1 20666 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8', -1 20667 '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5', -1 20668 ], -1 20669 [ -1 20670 '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb', -1 20671 '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b', -1 20672 ], -1 20673 [ -1 20674 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f', -1 20675 '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417', -1 20676 ], -1 20677 [ -1 20678 '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143', -1 20679 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868', -1 20680 ], -1 20681 [ -1 20682 '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba', -1 20683 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a', -1 20684 ], -1 20685 [ -1 20686 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45', -1 20687 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6', -1 20688 ], -1 20689 [ -1 20690 '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a', -1 20691 '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996', -1 20692 ], -1 20693 [ -1 20694 '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e', -1 20695 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e', -1 20696 ], -1 20697 [ -1 20698 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8', -1 20699 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d', -1 20700 ], -1 20701 [ -1 20702 '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c', -1 20703 '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2', -1 20704 ], -1 20705 [ -1 20706 '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519', -1 20707 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e', -1 20708 ], -1 20709 [ -1 20710 '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab', -1 20711 '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437', -1 20712 ], -1 20713 [ -1 20714 '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca', -1 20715 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311', -1 20716 ], -1 20717 [ -1 20718 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf', -1 20719 '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4', -1 20720 ], -1 20721 [ -1 20722 '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610', -1 20723 '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575', -1 20724 ], -1 20725 [ -1 20726 '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4', -1 20727 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d', -1 20728 ], -1 20729 [ -1 20730 '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c', -1 20731 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d', -1 20732 ], -1 20733 [ -1 20734 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940', -1 20735 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629', -1 20736 ], -1 20737 [ -1 20738 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980', -1 20739 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06', -1 20740 ], -1 20741 [ -1 20742 '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3', -1 20743 '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374', -1 20744 ], -1 20745 [ -1 20746 '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf', -1 20747 '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee', -1 20748 ], -1 20749 [ -1 20750 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63', -1 20751 '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1', -1 20752 ], -1 20753 [ -1 20754 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448', -1 20755 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b', -1 20756 ], -1 20757 [ -1 20758 '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf', -1 20759 '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661', -1 20760 ], -1 20761 [ -1 20762 '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5', -1 20763 '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6', -1 20764 ], -1 20765 [ -1 20766 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6', -1 20767 '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e', -1 20768 ], -1 20769 [ -1 20770 '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5', -1 20771 '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d', -1 20772 ], -1 20773 [ -1 20774 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99', -1 20775 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc', -1 20776 ], -1 20777 [ -1 20778 '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51', -1 20779 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4', -1 20780 ], -1 20781 [ -1 20782 '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5', -1 20783 '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c', -1 20784 ], -1 20785 [ -1 20786 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5', -1 20787 '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b', -1 20788 ], -1 20789 [ -1 20790 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997', -1 20791 '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913', -1 20792 ], -1 20793 [ -1 20794 '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881', -1 20795 '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154', -1 20796 ], -1 20797 [ -1 20798 '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5', -1 20799 '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865', -1 20800 ], -1 20801 [ -1 20802 '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66', -1 20803 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc', -1 20804 ], -1 20805 [ -1 20806 '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726', -1 20807 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224', -1 20808 ], -1 20809 [ -1 20810 '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede', -1 20811 '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e', -1 20812 ], -1 20813 [ -1 20814 '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94', -1 20815 '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6', -1 20816 ], -1 20817 [ -1 20818 '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31', -1 20819 '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511', -1 20820 ], -1 20821 [ -1 20822 '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51', -1 20823 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b', -1 20824 ], -1 20825 [ -1 20826 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252', -1 20827 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2', -1 20828 ], -1 20829 [ -1 20830 '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5', -1 20831 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c', -1 20832 ], -1 20833 [ -1 20834 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b', -1 20835 '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3', -1 20836 ], -1 20837 [ -1 20838 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4', -1 20839 '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d', -1 20840 ], -1 20841 [ -1 20842 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f', -1 20843 '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700', -1 20844 ], -1 20845 [ -1 20846 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889', -1 20847 '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4', -1 20848 ], -1 20849 [ -1 20850 '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246', -1 20851 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196', -1 20852 ], -1 20853 [ -1 20854 '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984', -1 20855 '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4', -1 20856 ], -1 20857 [ -1 20858 '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a', -1 20859 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257', -1 20860 ], -1 20861 [ -1 20862 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030', -1 20863 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13', -1 20864 ], -1 20865 [ -1 20866 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197', -1 20867 '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096', -1 20868 ], -1 20869 [ -1 20870 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593', -1 20871 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38', -1 20872 ], -1 20873 [ -1 20874 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef', -1 20875 '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f', -1 20876 ], -1 20877 [ -1 20878 '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38', -1 20879 '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448', -1 20880 ], -1 20881 [ -1 20882 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a', -1 20883 '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a', -1 20884 ], -1 20885 [ -1 20886 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111', -1 20887 '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4', -1 20888 ], -1 20889 [ -1 20890 '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502', -1 20891 '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437', -1 20892 ], -1 20893 [ -1 20894 '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea', -1 20895 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7', -1 20896 ], -1 20897 [ -1 20898 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26', -1 20899 '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d', -1 20900 ], -1 20901 [ -1 20902 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986', -1 20903 '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a', -1 20904 ], -1 20905 [ -1 20906 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e', -1 20907 '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54', -1 20908 ], -1 20909 [ -1 20910 '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4', -1 20911 '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77', -1 20912 ], -1 20913 [ -1 20914 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda', -1 20915 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517', -1 20916 ], -1 20917 [ -1 20918 '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859', -1 20919 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10', -1 20920 ], -1 20921 [ -1 20922 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f', -1 20923 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125', -1 20924 ], -1 20925 [ -1 20926 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c', -1 20927 '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e', -1 20928 ], -1 20929 [ -1 20930 '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942', -1 20931 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1', -1 20932 ], -1 20933 [ -1 20934 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a', -1 20935 '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2', -1 20936 ], -1 20937 [ -1 20938 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80', -1 20939 '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423', -1 20940 ], -1 20941 [ -1 20942 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d', -1 20943 '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8', -1 20944 ], -1 20945 [ -1 20946 '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1', -1 20947 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758', -1 20948 ], -1 20949 [ -1 20950 '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63', -1 20951 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375', -1 20952 ], -1 20953 [ -1 20954 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352', -1 20955 '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d', -1 20956 ], -1 20957 [ -1 20958 '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193', -1 20959 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec', -1 20960 ], -1 20961 [ -1 20962 '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00', -1 20963 '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0', -1 20964 ], -1 20965 [ -1 20966 '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58', -1 20967 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c', -1 20968 ], -1 20969 [ -1 20970 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7', -1 20971 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4', -1 20972 ], -1 20973 [ -1 20974 '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8', -1 20975 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f', -1 20976 ], -1 20977 [ -1 20978 '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e', -1 20979 '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649', -1 20980 ], -1 20981 [ -1 20982 '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d', -1 20983 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826', -1 20984 ], -1 20985 [ -1 20986 '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b', -1 20987 '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5', -1 20988 ], -1 20989 [ -1 20990 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f', -1 20991 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87', -1 20992 ], -1 20993 [ -1 20994 '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6', -1 20995 '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b', -1 20996 ], -1 20997 [ -1 20998 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297', -1 20999 '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc', -1 21000 ], -1 21001 [ -1 21002 '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a', -1 21003 '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c', -1 21004 ], -1 21005 [ -1 21006 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c', -1 21007 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f', -1 21008 ], -1 21009 [ -1 21010 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52', -1 21011 '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a', -1 21012 ], -1 21013 [ -1 21014 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb', -1 21015 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46', -1 21016 ], -1 21017 [ -1 21018 '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065', -1 21019 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f', -1 21020 ], -1 21021 [ -1 21022 '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917', -1 21023 '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03', -1 21024 ], -1 21025 [ -1 21026 '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9', -1 21027 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08', -1 21028 ], -1 21029 [ -1 21030 '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3', -1 21031 '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8', -1 21032 ], -1 21033 [ -1 21034 '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57', -1 21035 '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373', -1 21036 ], -1 21037 [ -1 21038 '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66', -1 21039 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3', -1 21040 ], -1 21041 [ -1 21042 '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8', -1 21043 '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8', -1 21044 ], -1 21045 [ -1 21046 '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721', -1 21047 '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1', -1 21048 ], -1 21049 [ -1 21050 '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180', -1 21051 '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9', -1 21052 ], -1 21053 ], -1 21054 }, -1 21055 }; -1 21056 -1 21057 },{}],97:[function(require,module,exports){ -1 21058 'use strict'; -1 21059 -1 21060 var utils = exports; -1 21061 var BN = require('bn.js'); -1 21062 var minAssert = require('minimalistic-assert'); -1 21063 var minUtils = require('minimalistic-crypto-utils'); -1 21064 -1 21065 utils.assert = minAssert; -1 21066 utils.toArray = minUtils.toArray; -1 21067 utils.zero2 = minUtils.zero2; -1 21068 utils.toHex = minUtils.toHex; -1 21069 utils.encode = minUtils.encode; -1 21070 -1 21071 // Represent num in a w-NAF form -1 21072 function getNAF(num, w, bits) { -1 21073 var naf = new Array(Math.max(num.bitLength(), bits) + 1); -1 21074 naf.fill(0); -1 21075 -1 21076 var ws = 1 << (w + 1); -1 21077 var k = num.clone(); -1 21078 -1 21079 for (var i = 0; i < naf.length; i++) { -1 21080 var z; -1 21081 var mod = k.andln(ws - 1); -1 21082 if (k.isOdd()) { -1 21083 if (mod > (ws >> 1) - 1) -1 21084 z = (ws >> 1) - mod; -1 21085 else -1 21086 z = mod; -1 21087 k.isubn(z); -1 21088 } else { -1 21089 z = 0; -1 21090 } -1 21091 -1 21092 naf[i] = z; -1 21093 k.iushrn(1); -1 21094 } -1 21095 -1 21096 return naf; -1 21097 } -1 21098 utils.getNAF = getNAF; -1 21099 -1 21100 // Represent k1, k2 in a Joint Sparse Form -1 21101 function getJSF(k1, k2) { -1 21102 var jsf = [ -1 21103 [], -1 21104 [], -1 21105 ]; -1 21106 -1 21107 k1 = k1.clone(); -1 21108 k2 = k2.clone(); -1 21109 var d1 = 0; -1 21110 var d2 = 0; -1 21111 var m8; -1 21112 while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) { -1 21113 // First phase -1 21114 var m14 = (k1.andln(3) + d1) & 3; -1 21115 var m24 = (k2.andln(3) + d2) & 3; -1 21116 if (m14 === 3) -1 21117 m14 = -1; -1 21118 if (m24 === 3) -1 21119 m24 = -1; -1 21120 var u1; -1 21121 if ((m14 & 1) === 0) { -1 21122 u1 = 0; -1 21123 } else { -1 21124 m8 = (k1.andln(7) + d1) & 7; -1 21125 if ((m8 === 3 || m8 === 5) && m24 === 2) -1 21126 u1 = -m14; -1 21127 else -1 21128 u1 = m14; -1 21129 } -1 21130 jsf[0].push(u1); -1 21131 -1 21132 var u2; -1 21133 if ((m24 & 1) === 0) { -1 21134 u2 = 0; -1 21135 } else { -1 21136 m8 = (k2.andln(7) + d2) & 7; -1 21137 if ((m8 === 3 || m8 === 5) && m14 === 2) -1 21138 u2 = -m24; -1 21139 else -1 21140 u2 = m24; -1 21141 } -1 21142 jsf[1].push(u2); -1 21143 -1 21144 // Second phase -1 21145 if (2 * d1 === u1 + 1) -1 21146 d1 = 1 - d1; -1 21147 if (2 * d2 === u2 + 1) -1 21148 d2 = 1 - d2; -1 21149 k1.iushrn(1); -1 21150 k2.iushrn(1); -1 21151 } -1 21152 -1 21153 return jsf; -1 21154 } -1 21155 utils.getJSF = getJSF; -1 21156 -1 21157 function cachedProperty(obj, name, computer) { -1 21158 var key = '_' + name; -1 21159 obj.prototype[name] = function cachedProperty() { -1 21160 return this[key] !== undefined ? this[key] : -1 21161 this[key] = computer.call(this); -1 21162 }; -1 21163 } -1 21164 utils.cachedProperty = cachedProperty; -1 21165 -1 21166 function parseBytes(bytes) { -1 21167 return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') : -1 21168 bytes; -1 21169 } -1 21170 utils.parseBytes = parseBytes; -1 21171 -1 21172 function intFromLE(bytes) { -1 21173 return new BN(bytes, 'hex', 'le'); -1 21174 } -1 21175 utils.intFromLE = intFromLE; -1 21176 -1 21177 -1 21178 },{"bn.js":98,"minimalistic-assert":136,"minimalistic-crypto-utils":137}],98:[function(require,module,exports){ -1 21179 arguments[4][15][0].apply(exports,arguments) -1 21180 },{"buffer":19,"dup":15}],99:[function(require,module,exports){ -1 21181 module.exports={ -1 21182 "name": "elliptic", -1 21183 "version": "6.5.4", -1 21184 "description": "EC cryptography", -1 21185 "main": "lib/elliptic.js", -1 21186 "files": [ -1 21187 "lib" -1 21188 ], -1 21189 "scripts": { -1 21190 "lint": "eslint lib test", -1 21191 "lint:fix": "npm run lint -- --fix", -1 21192 "unit": "istanbul test _mocha --reporter=spec test/index.js", -1 21193 "test": "npm run lint && npm run unit", -1 21194 "version": "grunt dist && git add dist/" -1 21195 }, -1 21196 "repository": { -1 21197 "type": "git", -1 21198 "url": "git@github.com:indutny/elliptic" -1 21199 }, -1 21200 "keywords": [ -1 21201 "EC", -1 21202 "Elliptic", -1 21203 "curve", -1 21204 "Cryptography" -1 21205 ], -1 21206 "author": "Fedor Indutny <fedor@indutny.com>", -1 21207 "license": "MIT", -1 21208 "bugs": { -1 21209 "url": "https://github.com/indutny/elliptic/issues" -1 21210 }, -1 21211 "homepage": "https://github.com/indutny/elliptic", -1 21212 "devDependencies": { -1 21213 "brfs": "^2.0.2", -1 21214 "coveralls": "^3.1.0", -1 21215 "eslint": "^7.6.0", -1 21216 "grunt": "^1.2.1", -1 21217 "grunt-browserify": "^5.3.0", -1 21218 "grunt-cli": "^1.3.2", -1 21219 "grunt-contrib-connect": "^3.0.0", -1 21220 "grunt-contrib-copy": "^1.0.0", -1 21221 "grunt-contrib-uglify": "^5.0.0", -1 21222 "grunt-mocha-istanbul": "^5.0.2", -1 21223 "grunt-saucelabs": "^9.0.1", -1 21224 "istanbul": "^0.4.5", -1 21225 "mocha": "^8.0.1" -1 21226 }, -1 21227 "dependencies": { -1 21228 "bn.js": "^4.11.9", -1 21229 "brorand": "^1.1.0", -1 21230 "hash.js": "^1.0.0", -1 21231 "hmac-drbg": "^1.0.1", -1 21232 "inherits": "^2.0.4", -1 21233 "minimalistic-assert": "^1.0.1", -1 21234 "minimalistic-crypto-utils": "^1.0.1" -1 21235 } -1 21236 } -1 21237 -1 21238 },{}],100:[function(require,module,exports){ -1 21239 // Copyright Joyent, Inc. and other Node contributors. -1 21240 // -1 21241 // Permission is hereby granted, free of charge, to any person obtaining a -1 21242 // copy of this software and associated documentation files (the -1 21243 // "Software"), to deal in the Software without restriction, including -1 21244 // without limitation the rights to use, copy, modify, merge, publish, -1 21245 // distribute, sublicense, and/or sell copies of the Software, and to permit -1 21246 // persons to whom the Software is furnished to do so, subject to the -1 21247 // following conditions: -1 21248 // -1 21249 // The above copyright notice and this permission notice shall be included -1 21250 // in all copies or substantial portions of the Software. -1 21251 // -1 21252 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -1 21253 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -1 21254 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -1 21255 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -1 21256 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -1 21257 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -1 21258 // USE OR OTHER DEALINGS IN THE SOFTWARE. -1 21259 -1 21260 'use strict'; -1 21261 -1 21262 var R = typeof Reflect === 'object' ? Reflect : null -1 21263 var ReflectApply = R && typeof R.apply === 'function' -1 21264 ? R.apply -1 21265 : function ReflectApply(target, receiver, args) { -1 21266 return Function.prototype.apply.call(target, receiver, args); -1 21267 } -1 21268 -1 21269 var ReflectOwnKeys -1 21270 if (R && typeof R.ownKeys === 'function') { -1 21271 ReflectOwnKeys = R.ownKeys -1 21272 } else if (Object.getOwnPropertySymbols) { -1 21273 ReflectOwnKeys = function ReflectOwnKeys(target) { -1 21274 return Object.getOwnPropertyNames(target) -1 21275 .concat(Object.getOwnPropertySymbols(target)); -1 21276 }; -1 21277 } else { -1 21278 ReflectOwnKeys = function ReflectOwnKeys(target) { -1 21279 return Object.getOwnPropertyNames(target); -1 21280 }; -1 21281 } -1 21282 -1 21283 function ProcessEmitWarning(warning) { -1 21284 if (console && console.warn) console.warn(warning); -1 21285 } -1 21286 -1 21287 var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { -1 21288 return value !== value; -1 21289 } -1 21290 -1 21291 function EventEmitter() { -1 21292 EventEmitter.init.call(this); -1 21293 } -1 21294 module.exports = EventEmitter; -1 21295 module.exports.once = once; -1 21296 -1 21297 // Backwards-compat with node 0.10.x -1 21298 EventEmitter.EventEmitter = EventEmitter; -1 21299 -1 21300 EventEmitter.prototype._events = undefined; -1 21301 EventEmitter.prototype._eventsCount = 0; -1 21302 EventEmitter.prototype._maxListeners = undefined; -1 21303 -1 21304 // By default EventEmitters will print a warning if more than 10 listeners are -1 21305 // added to it. This is a useful default which helps finding memory leaks. -1 21306 var defaultMaxListeners = 10; -1 21307 -1 21308 function checkListener(listener) { -1 21309 if (typeof listener !== 'function') { -1 21310 throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); -1 21311 } -1 21312 } -1 21313 -1 21314 Object.defineProperty(EventEmitter, 'defaultMaxListeners', { -1 21315 enumerable: true, -1 21316 get: function() { -1 21317 return defaultMaxListeners; -1 21318 }, -1 21319 set: function(arg) { -1 21320 if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { -1 21321 throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); -1 21322 } -1 21323 defaultMaxListeners = arg; -1 21324 } -1 21325 }); -1 21326 -1 21327 EventEmitter.init = function() { -1 21328 -1 21329 if (this._events === undefined || -1 21330 this._events === Object.getPrototypeOf(this)._events) { -1 21331 this._events = Object.create(null); -1 21332 this._eventsCount = 0; -1 21333 } -1 21334 -1 21335 this._maxListeners = this._maxListeners || undefined; -1 21336 }; -1 21337 -1 21338 // Obviously not all Emitters should be limited to 10. This function allows -1 21339 // that to be increased. Set to zero for unlimited. -1 21340 EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { -1 21341 if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { -1 21342 throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); -1 21343 } -1 21344 this._maxListeners = n; -1 21345 return this; -1 21346 }; -1 21347 -1 21348 function _getMaxListeners(that) { -1 21349 if (that._maxListeners === undefined) -1 21350 return EventEmitter.defaultMaxListeners; -1 21351 return that._maxListeners; -1 21352 } -1 21353 -1 21354 EventEmitter.prototype.getMaxListeners = function getMaxListeners() { -1 21355 return _getMaxListeners(this); -1 21356 }; -1 21357 -1 21358 EventEmitter.prototype.emit = function emit(type) { -1 21359 var args = []; -1 21360 for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); -1 21361 var doError = (type === 'error'); -1 21362 -1 21363 var events = this._events; -1 21364 if (events !== undefined) -1 21365 doError = (doError && events.error === undefined); -1 21366 else if (!doError) -1 21367 return false; -1 21368 -1 21369 // If there is no 'error' event listener then throw. -1 21370 if (doError) { -1 21371 var er; -1 21372 if (args.length > 0) -1 21373 er = args[0]; -1 21374 if (er instanceof Error) { -1 21375 // Note: The comments on the `throw` lines are intentional, they show -1 21376 // up in Node's output if this results in an unhandled exception. -1 21377 throw er; // Unhandled 'error' event -1 21378 } -1 21379 // At least give some kind of context to the user -1 21380 var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); -1 21381 err.context = er; -1 21382 throw err; // Unhandled 'error' event -1 21383 } -1 21384 -1 21385 var handler = events[type]; -1 21386 -1 21387 if (handler === undefined) -1 21388 return false; -1 21389 -1 21390 if (typeof handler === 'function') { -1 21391 ReflectApply(handler, this, args); -1 21392 } else { -1 21393 var len = handler.length; -1 21394 var listeners = arrayClone(handler, len); -1 21395 for (var i = 0; i < len; ++i) -1 21396 ReflectApply(listeners[i], this, args); -1 21397 } -1 21398 -1 21399 return true; -1 21400 }; -1 21401 -1 21402 function _addListener(target, type, listener, prepend) { -1 21403 var m; -1 21404 var events; -1 21405 var existing; -1 21406 -1 21407 checkListener(listener); -1 21408 -1 21409 events = target._events; -1 21410 if (events === undefined) { -1 21411 events = target._events = Object.create(null); -1 21412 target._eventsCount = 0; -1 21413 } else { -1 21414 // To avoid recursion in the case that type === "newListener"! Before -1 21415 // adding it to the listeners, first emit "newListener". -1 21416 if (events.newListener !== undefined) { -1 21417 target.emit('newListener', type, -1 21418 listener.listener ? listener.listener : listener); -1 21419 -1 21420 // Re-assign `events` because a newListener handler could have caused the -1 21421 // this._events to be assigned to a new object -1 21422 events = target._events; -1 21423 } -1 21424 existing = events[type]; -1 21425 } -1 21426 -1 21427 if (existing === undefined) { -1 21428 // Optimize the case of one listener. Don't need the extra array object. -1 21429 existing = events[type] = listener; -1 21430 ++target._eventsCount; -1 21431 } else { -1 21432 if (typeof existing === 'function') { -1 21433 // Adding the second element, need to change to array. -1 21434 existing = events[type] = -1 21435 prepend ? [listener, existing] : [existing, listener]; -1 21436 // If we've already got an array, just append. -1 21437 } else if (prepend) { -1 21438 existing.unshift(listener); -1 21439 } else { -1 21440 existing.push(listener); -1 21441 } -1 21442 -1 21443 // Check for listener leak -1 21444 m = _getMaxListeners(target); -1 21445 if (m > 0 && existing.length > m && !existing.warned) { -1 21446 existing.warned = true; -1 21447 // No error code for this since it is a Warning -1 21448 // eslint-disable-next-line no-restricted-syntax -1 21449 var w = new Error('Possible EventEmitter memory leak detected. ' + -1 21450 existing.length + ' ' + String(type) + ' listeners ' + -1 21451 'added. Use emitter.setMaxListeners() to ' + -1 21452 'increase limit'); -1 21453 w.name = 'MaxListenersExceededWarning'; -1 21454 w.emitter = target; -1 21455 w.type = type; -1 21456 w.count = existing.length; -1 21457 ProcessEmitWarning(w); -1 21458 } -1 21459 } -1 21460 -1 21461 return target; -1 21462 } -1 21463 -1 21464 EventEmitter.prototype.addListener = function addListener(type, listener) { -1 21465 return _addListener(this, type, listener, false); -1 21466 }; -1 21467 -1 21468 EventEmitter.prototype.on = EventEmitter.prototype.addListener; -1 21469 -1 21470 EventEmitter.prototype.prependListener = -1 21471 function prependListener(type, listener) { -1 21472 return _addListener(this, type, listener, true); -1 21473 }; -1 21474 -1 21475 function onceWrapper() { -1 21476 if (!this.fired) { -1 21477 this.target.removeListener(this.type, this.wrapFn); -1 21478 this.fired = true; -1 21479 if (arguments.length === 0) -1 21480 return this.listener.call(this.target); -1 21481 return this.listener.apply(this.target, arguments); -1 21482 } -1 21483 } -1 21484 -1 21485 function _onceWrap(target, type, listener) { -1 21486 var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; -1 21487 var wrapped = onceWrapper.bind(state); -1 21488 wrapped.listener = listener; -1 21489 state.wrapFn = wrapped; -1 21490 return wrapped; -1 21491 } -1 21492 -1 21493 EventEmitter.prototype.once = function once(type, listener) { -1 21494 checkListener(listener); -1 21495 this.on(type, _onceWrap(this, type, listener)); -1 21496 return this; -1 21497 }; -1 21498 -1 21499 EventEmitter.prototype.prependOnceListener = -1 21500 function prependOnceListener(type, listener) { -1 21501 checkListener(listener); -1 21502 this.prependListener(type, _onceWrap(this, type, listener)); -1 21503 return this; -1 21504 }; -1 21505 -1 21506 // Emits a 'removeListener' event if and only if the listener was removed. -1 21507 EventEmitter.prototype.removeListener = -1 21508 function removeListener(type, listener) { -1 21509 var list, events, position, i, originalListener; -1 21510 -1 21511 checkListener(listener); -1 21512 -1 21513 events = this._events; -1 21514 if (events === undefined) -1 21515 return this; -1 21516 -1 21517 list = events[type]; -1 21518 if (list === undefined) -1 21519 return this; -1 21520 -1 21521 if (list === listener || list.listener === listener) { -1 21522 if (--this._eventsCount === 0) -1 21523 this._events = Object.create(null); -1 21524 else { -1 21525 delete events[type]; -1 21526 if (events.removeListener) -1 21527 this.emit('removeListener', type, list.listener || listener); -1 21528 } -1 21529 } else if (typeof list !== 'function') { -1 21530 position = -1; -1 21531 -1 21532 for (i = list.length - 1; i >= 0; i--) { -1 21533 if (list[i] === listener || list[i].listener === listener) { -1 21534 originalListener = list[i].listener; -1 21535 position = i; -1 21536 break; -1 21537 } -1 21538 } -1 21539 -1 21540 if (position < 0) -1 21541 return this; -1 21542 -1 21543 if (position === 0) -1 21544 list.shift(); -1 21545 else { -1 21546 spliceOne(list, position); -1 21547 } -1 21548 -1 21549 if (list.length === 1) -1 21550 events[type] = list[0]; -1 21551 -1 21552 if (events.removeListener !== undefined) -1 21553 this.emit('removeListener', type, originalListener || listener); -1 21554 } -1 21555 -1 21556 return this; -1 21557 }; -1 21558 -1 21559 EventEmitter.prototype.off = EventEmitter.prototype.removeListener; -1 21560 -1 21561 EventEmitter.prototype.removeAllListeners = -1 21562 function removeAllListeners(type) { -1 21563 var listeners, events, i; -1 21564 -1 21565 events = this._events; -1 21566 if (events === undefined) -1 21567 return this; -1 21568 -1 21569 // not listening for removeListener, no need to emit -1 21570 if (events.removeListener === undefined) { -1 21571 if (arguments.length === 0) { -1 21572 this._events = Object.create(null); -1 21573 this._eventsCount = 0; -1 21574 } else if (events[type] !== undefined) { -1 21575 if (--this._eventsCount === 0) -1 21576 this._events = Object.create(null); -1 21577 else -1 21578 delete events[type]; -1 21579 } -1 21580 return this; -1 21581 } -1 21582 -1 21583 // emit removeListener for all listeners on all events -1 21584 if (arguments.length === 0) { -1 21585 var keys = Object.keys(events); -1 21586 var key; -1 21587 for (i = 0; i < keys.length; ++i) { -1 21588 key = keys[i]; -1 21589 if (key === 'removeListener') continue; -1 21590 this.removeAllListeners(key); -1 21591 } -1 21592 this.removeAllListeners('removeListener'); -1 21593 this._events = Object.create(null); -1 21594 this._eventsCount = 0; -1 21595 return this; -1 21596 } -1 21597 -1 21598 listeners = events[type]; -1 21599 -1 21600 if (typeof listeners === 'function') { -1 21601 this.removeListener(type, listeners); -1 21602 } else if (listeners !== undefined) { -1 21603 // LIFO order -1 21604 for (i = listeners.length - 1; i >= 0; i--) { -1 21605 this.removeListener(type, listeners[i]); -1 21606 } -1 21607 } -1 21608 -1 21609 return this; -1 21610 }; -1 21611 -1 21612 function _listeners(target, type, unwrap) { -1 21613 var events = target._events; -1 21614 -1 21615 if (events === undefined) -1 21616 return []; -1 21617 -1 21618 var evlistener = events[type]; -1 21619 if (evlistener === undefined) -1 21620 return []; -1 21621 -1 21622 if (typeof evlistener === 'function') -1 21623 return unwrap ? [evlistener.listener || evlistener] : [evlistener]; -1 21624 -1 21625 return unwrap ? -1 21626 unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); -1 21627 } -1 21628 -1 21629 EventEmitter.prototype.listeners = function listeners(type) { -1 21630 return _listeners(this, type, true); -1 21631 }; -1 21632 -1 21633 EventEmitter.prototype.rawListeners = function rawListeners(type) { -1 21634 return _listeners(this, type, false); -1 21635 }; -1 21636 -1 21637 EventEmitter.listenerCount = function(emitter, type) { -1 21638 if (typeof emitter.listenerCount === 'function') { -1 21639 return emitter.listenerCount(type); -1 21640 } else { -1 21641 return listenerCount.call(emitter, type); -1 21642 } -1 21643 }; -1 21644 -1 21645 EventEmitter.prototype.listenerCount = listenerCount; -1 21646 function listenerCount(type) { -1 21647 var events = this._events; -1 21648 -1 21649 if (events !== undefined) { -1 21650 var evlistener = events[type]; -1 21651 -1 21652 if (typeof evlistener === 'function') { -1 21653 return 1; -1 21654 } else if (evlistener !== undefined) { -1 21655 return evlistener.length; -1 21656 } -1 21657 } -1 21658 -1 21659 return 0; -1 21660 } -1 21661 -1 21662 EventEmitter.prototype.eventNames = function eventNames() { -1 21663 return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; -1 21664 }; -1 21665 -1 21666 function arrayClone(arr, n) { -1 21667 var copy = new Array(n); -1 21668 for (var i = 0; i < n; ++i) -1 21669 copy[i] = arr[i]; -1 21670 return copy; -1 21671 } -1 21672 -1 21673 function spliceOne(list, index) { -1 21674 for (; index + 1 < list.length; index++) -1 21675 list[index] = list[index + 1]; -1 21676 list.pop(); -1 21677 } -1 21678 -1 21679 function unwrapListeners(arr) { -1 21680 var ret = new Array(arr.length); -1 21681 for (var i = 0; i < ret.length; ++i) { -1 21682 ret[i] = arr[i].listener || arr[i]; -1 21683 } -1 21684 return ret; -1 21685 } -1 21686 -1 21687 function once(emitter, name) { -1 21688 return new Promise(function (resolve, reject) { -1 21689 function eventListener() { -1 21690 if (errorListener !== undefined) { -1 21691 emitter.removeListener('error', errorListener); -1 21692 } -1 21693 resolve([].slice.call(arguments)); -1 21694 }; -1 21695 var errorListener; -1 21696 -1 21697 // Adding an error listener is not optional because -1 21698 // if an error is thrown on an event emitter we cannot -1 21699 // guarantee that the actual event we are waiting will -1 21700 // be fired. The result could be a silent way to create -1 21701 // memory or file descriptor leaks, which is something -1 21702 // we should avoid. -1 21703 if (name !== 'error') { -1 21704 errorListener = function errorListener(err) { -1 21705 emitter.removeListener(name, eventListener); -1 21706 reject(err); -1 21707 }; -1 21708 -1 21709 emitter.once('error', errorListener); -1 21710 } -1 21711 -1 21712 emitter.once(name, eventListener); -1 21713 }); -1 21714 } -1 21715 -1 21716 },{}],101:[function(require,module,exports){ -1 21717 var Buffer = require('safe-buffer').Buffer -1 21718 var MD5 = require('md5.js') -1 21719 -1 21720 /* eslint-disable camelcase */ -1 21721 function EVP_BytesToKey (password, salt, keyBits, ivLen) { -1 21722 if (!Buffer.isBuffer(password)) password = Buffer.from(password, 'binary') -1 21723 if (salt) { -1 21724 if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, 'binary') -1 21725 if (salt.length !== 8) throw new RangeError('salt should be Buffer with 8 byte length') -1 21726 } -1 21727 -1 21728 var keyLen = keyBits / 8 -1 21729 var key = Buffer.alloc(keyLen) -1 21730 var iv = Buffer.alloc(ivLen || 0) -1 21731 var tmp = Buffer.alloc(0) -1 21732 -1 21733 while (keyLen > 0 || ivLen > 0) { -1 21734 var hash = new MD5() -1 21735 hash.update(tmp) -1 21736 hash.update(password) -1 21737 if (salt) hash.update(salt) -1 21738 tmp = hash.digest() -1 21739 -1 21740 var used = 0 -1 21741 -1 21742 if (keyLen > 0) { -1 21743 var keyStart = key.length - keyLen -1 21744 used = Math.min(keyLen, tmp.length) -1 21745 tmp.copy(key, keyStart, 0, used) -1 21746 keyLen -= used -1 21747 } -1 21748 -1 21749 if (used < tmp.length && ivLen > 0) { -1 21750 var ivStart = iv.length - ivLen -1 21751 var length = Math.min(ivLen, tmp.length - used) -1 21752 tmp.copy(iv, ivStart, used, used + length) -1 21753 ivLen -= length -1 21754 } -1 21755 } -1 21756 -1 21757 tmp.fill(0) -1 21758 return { key: key, iv: iv } -1 21759 } -1 21760 -1 21761 module.exports = EVP_BytesToKey -1 21762 -1 21763 },{"md5.js":133,"safe-buffer":160}],102:[function(require,module,exports){ -1 21764 'use strict' -1 21765 var Buffer = require('safe-buffer').Buffer -1 21766 var Transform = require('readable-stream').Transform -1 21767 var inherits = require('inherits') -1 21768 -1 21769 function throwIfNotStringOrBuffer (val, prefix) { -1 21770 if (!Buffer.isBuffer(val) && typeof val !== 'string') { -1 21771 throw new TypeError(prefix + ' must be a string or a buffer') -1 21772 } -1 21773 } -1 21774 -1 21775 function HashBase (blockSize) { -1 21776 Transform.call(this) -1 21777 -1 21778 this._block = Buffer.allocUnsafe(blockSize) -1 21779 this._blockSize = blockSize -1 21780 this._blockOffset = 0 -1 21781 this._length = [0, 0, 0, 0] -1 21782 -1 21783 this._finalized = false -1 21784 } -1 21785 -1 21786 inherits(HashBase, Transform) -1 21787 -1 21788 HashBase.prototype._transform = function (chunk, encoding, callback) { -1 21789 var error = null -1 21790 try { -1 21791 this.update(chunk, encoding) -1 21792 } catch (err) { -1 21793 error = err -1 21794 } -1 21795 -1 21796 callback(error) -1 21797 } -1 21798 -1 21799 HashBase.prototype._flush = function (callback) { -1 21800 var error = null -1 21801 try { -1 21802 this.push(this.digest()) -1 21803 } catch (err) { -1 21804 error = err -1 21805 } -1 21806 -1 21807 callback(error) -1 21808 } -1 21809 -1 21810 HashBase.prototype.update = function (data, encoding) { -1 21811 throwIfNotStringOrBuffer(data, 'Data') -1 21812 if (this._finalized) throw new Error('Digest already called') -1 21813 if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding) -1 21814 -1 21815 // consume data -1 21816 var block = this._block -1 21817 var offset = 0 -1 21818 while (this._blockOffset + data.length - offset >= this._blockSize) { -1 21819 for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++] -1 21820 this._update() -1 21821 this._blockOffset = 0 -1 21822 } -1 21823 while (offset < data.length) block[this._blockOffset++] = data[offset++] -1 21824 -1 21825 // update length -1 21826 for (var j = 0, carry = data.length * 8; carry > 0; ++j) { -1 21827 this._length[j] += carry -1 21828 carry = (this._length[j] / 0x0100000000) | 0 -1 21829 if (carry > 0) this._length[j] -= 0x0100000000 * carry -1 21830 } -1 21831 -1 21832 return this -1 21833 } -1 21834 -1 21835 HashBase.prototype._update = function () { -1 21836 throw new Error('_update is not implemented') -1 21837 } -1 21838 -1 21839 HashBase.prototype.digest = function (encoding) { -1 21840 if (this._finalized) throw new Error('Digest already called') -1 21841 this._finalized = true -1 21842 -1 21843 var digest = this._digest() -1 21844 if (encoding !== undefined) digest = digest.toString(encoding) -1 21845 -1 21846 // reset state -1 21847 this._block.fill(0) -1 21848 this._blockOffset = 0 -1 21849 for (var i = 0; i < 4; ++i) this._length[i] = 0 -1 21850 -1 21851 return digest -1 21852 } -1 21853 -1 21854 HashBase.prototype._digest = function () { -1 21855 throw new Error('_digest is not implemented') -1 21856 } -1 21857 -1 21858 module.exports = HashBase -1 21859 -1 21860 },{"inherits":132,"readable-stream":117,"safe-buffer":160}],103:[function(require,module,exports){ -1 21861 arguments[4][47][0].apply(exports,arguments) -1 21862 },{"dup":47}],104:[function(require,module,exports){ -1 21863 arguments[4][48][0].apply(exports,arguments) -1 21864 },{"./_stream_readable":106,"./_stream_writable":108,"_process":149,"dup":48,"inherits":132}],105:[function(require,module,exports){ -1 21865 arguments[4][49][0].apply(exports,arguments) -1 21866 },{"./_stream_transform":107,"dup":49,"inherits":132}],106:[function(require,module,exports){ -1 21867 arguments[4][50][0].apply(exports,arguments) -1 21868 },{"../errors":103,"./_stream_duplex":104,"./internal/streams/async_iterator":109,"./internal/streams/buffer_list":110,"./internal/streams/destroy":111,"./internal/streams/from":113,"./internal/streams/state":115,"./internal/streams/stream":116,"_process":149,"buffer":63,"dup":50,"events":100,"inherits":132,"string_decoder/":185,"util":19}],107:[function(require,module,exports){ -1 21869 arguments[4][51][0].apply(exports,arguments) -1 21870 },{"../errors":103,"./_stream_duplex":104,"dup":51,"inherits":132}],108:[function(require,module,exports){ -1 21871 arguments[4][52][0].apply(exports,arguments) -1 21872 },{"../errors":103,"./_stream_duplex":104,"./internal/streams/destroy":111,"./internal/streams/state":115,"./internal/streams/stream":116,"_process":149,"buffer":63,"dup":52,"inherits":132,"util-deprecate":187}],109:[function(require,module,exports){ -1 21873 arguments[4][53][0].apply(exports,arguments) -1 21874 },{"./end-of-stream":112,"_process":149,"dup":53}],110:[function(require,module,exports){ -1 21875 arguments[4][54][0].apply(exports,arguments) -1 21876 },{"buffer":63,"dup":54,"util":19}],111:[function(require,module,exports){ -1 21877 arguments[4][55][0].apply(exports,arguments) -1 21878 },{"_process":149,"dup":55}],112:[function(require,module,exports){ -1 21879 arguments[4][56][0].apply(exports,arguments) -1 21880 },{"../../../errors":103,"dup":56}],113:[function(require,module,exports){ -1 21881 arguments[4][57][0].apply(exports,arguments) -1 21882 },{"dup":57}],114:[function(require,module,exports){ -1 21883 arguments[4][58][0].apply(exports,arguments) -1 21884 },{"../../../errors":103,"./end-of-stream":112,"dup":58}],115:[function(require,module,exports){ -1 21885 arguments[4][59][0].apply(exports,arguments) -1 21886 },{"../../../errors":103,"dup":59}],116:[function(require,module,exports){ -1 21887 arguments[4][60][0].apply(exports,arguments) -1 21888 },{"dup":60,"events":100}],117:[function(require,module,exports){ -1 21889 arguments[4][61][0].apply(exports,arguments) -1 21890 },{"./lib/_stream_duplex.js":104,"./lib/_stream_passthrough.js":105,"./lib/_stream_readable.js":106,"./lib/_stream_transform.js":107,"./lib/_stream_writable.js":108,"./lib/internal/streams/end-of-stream.js":112,"./lib/internal/streams/pipeline.js":114,"dup":61}],118:[function(require,module,exports){ -1 21891 var hash = exports; -1 21892 -1 21893 hash.utils = require('./hash/utils'); -1 21894 hash.common = require('./hash/common'); -1 21895 hash.sha = require('./hash/sha'); -1 21896 hash.ripemd = require('./hash/ripemd'); -1 21897 hash.hmac = require('./hash/hmac'); -1 21898 -1 21899 // Proxy hash functions to the main object -1 21900 hash.sha1 = hash.sha.sha1; -1 21901 hash.sha256 = hash.sha.sha256; -1 21902 hash.sha224 = hash.sha.sha224; -1 21903 hash.sha384 = hash.sha.sha384; -1 21904 hash.sha512 = hash.sha.sha512; -1 21905 hash.ripemd160 = hash.ripemd.ripemd160; -1 21906 -1 21907 },{"./hash/common":119,"./hash/hmac":120,"./hash/ripemd":121,"./hash/sha":122,"./hash/utils":129}],119:[function(require,module,exports){ -1 21908 'use strict'; -1 21909 -1 21910 var utils = require('./utils'); -1 21911 var assert = require('minimalistic-assert'); -1 21912 -1 21913 function BlockHash() { -1 21914 this.pending = null; -1 21915 this.pendingTotal = 0; -1 21916 this.blockSize = this.constructor.blockSize; -1 21917 this.outSize = this.constructor.outSize; -1 21918 this.hmacStrength = this.constructor.hmacStrength; -1 21919 this.padLength = this.constructor.padLength / 8; -1 21920 this.endian = 'big'; -1 21921 -1 21922 this._delta8 = this.blockSize / 8; -1 21923 this._delta32 = this.blockSize / 32; -1 21924 } -1 21925 exports.BlockHash = BlockHash; -1 21926 -1 21927 BlockHash.prototype.update = function update(msg, enc) { -1 21928 // Convert message to array, pad it, and join into 32bit blocks -1 21929 msg = utils.toArray(msg, enc); -1 21930 if (!this.pending) -1 21931 this.pending = msg; -1 21932 else -1 21933 this.pending = this.pending.concat(msg); -1 21934 this.pendingTotal += msg.length; -1 21935 -1 21936 // Enough data, try updating -1 21937 if (this.pending.length >= this._delta8) { -1 21938 msg = this.pending; -1 21939 -1 21940 // Process pending data in blocks -1 21941 var r = msg.length % this._delta8; -1 21942 this.pending = msg.slice(msg.length - r, msg.length); -1 21943 if (this.pending.length === 0) -1 21944 this.pending = null; -1 21945 -1 21946 msg = utils.join32(msg, 0, msg.length - r, this.endian); -1 21947 for (var i = 0; i < msg.length; i += this._delta32) -1 21948 this._update(msg, i, i + this._delta32); -1 21949 } -1 21950 -1 21951 return this; -1 21952 }; -1 21953 -1 21954 BlockHash.prototype.digest = function digest(enc) { -1 21955 this.update(this._pad()); -1 21956 assert(this.pending === null); -1 21957 -1 21958 return this._digest(enc); -1 21959 }; -1 21960 -1 21961 BlockHash.prototype._pad = function pad() { -1 21962 var len = this.pendingTotal; -1 21963 var bytes = this._delta8; -1 21964 var k = bytes - ((len + this.padLength) % bytes); -1 21965 var res = new Array(k + this.padLength); -1 21966 res[0] = 0x80; -1 21967 for (var i = 1; i < k; i++) -1 21968 res[i] = 0; -1 21969 -1 21970 // Append length -1 21971 len <<= 3; -1 21972 if (this.endian === 'big') { -1 21973 for (var t = 8; t < this.padLength; t++) -1 21974 res[i++] = 0; -1 21975 -1 21976 res[i++] = 0; -1 21977 res[i++] = 0; -1 21978 res[i++] = 0; -1 21979 res[i++] = 0; -1 21980 res[i++] = (len >>> 24) & 0xff; -1 21981 res[i++] = (len >>> 16) & 0xff; -1 21982 res[i++] = (len >>> 8) & 0xff; -1 21983 res[i++] = len & 0xff; -1 21984 } else { -1 21985 res[i++] = len & 0xff; -1 21986 res[i++] = (len >>> 8) & 0xff; -1 21987 res[i++] = (len >>> 16) & 0xff; -1 21988 res[i++] = (len >>> 24) & 0xff; -1 21989 res[i++] = 0; -1 21990 res[i++] = 0; -1 21991 res[i++] = 0; -1 21992 res[i++] = 0; -1 21993 -1 21994 for (t = 8; t < this.padLength; t++) -1 21995 res[i++] = 0; -1 21996 } -1 21997 -1 21998 return res; -1 21999 }; -1 22000 -1 22001 },{"./utils":129,"minimalistic-assert":136}],120:[function(require,module,exports){ -1 22002 'use strict'; -1 22003 -1 22004 var utils = require('./utils'); -1 22005 var assert = require('minimalistic-assert'); -1 22006 -1 22007 function Hmac(hash, key, enc) { -1 22008 if (!(this instanceof Hmac)) -1 22009 return new Hmac(hash, key, enc); -1 22010 this.Hash = hash; -1 22011 this.blockSize = hash.blockSize / 8; -1 22012 this.outSize = hash.outSize / 8; -1 22013 this.inner = null; -1 22014 this.outer = null; -1 22015 -1 22016 this._init(utils.toArray(key, enc)); -1 22017 } -1 22018 module.exports = Hmac; -1 22019 -1 22020 Hmac.prototype._init = function init(key) { -1 22021 // Shorten key, if needed -1 22022 if (key.length > this.blockSize) -1 22023 key = new this.Hash().update(key).digest(); -1 22024 assert(key.length <= this.blockSize); -1 22025 -1 22026 // Add padding to key -1 22027 for (var i = key.length; i < this.blockSize; i++) -1 22028 key.push(0); -1 22029 -1 22030 for (i = 0; i < key.length; i++) -1 22031 key[i] ^= 0x36; -1 22032 this.inner = new this.Hash().update(key); -1 22033 -1 22034 // 0x36 ^ 0x5c = 0x6a -1 22035 for (i = 0; i < key.length; i++) -1 22036 key[i] ^= 0x6a; -1 22037 this.outer = new this.Hash().update(key); -1 22038 }; -1 22039 -1 22040 Hmac.prototype.update = function update(msg, enc) { -1 22041 this.inner.update(msg, enc); -1 22042 return this; -1 22043 }; -1 22044 -1 22045 Hmac.prototype.digest = function digest(enc) { -1 22046 this.outer.update(this.inner.digest()); -1 22047 return this.outer.digest(enc); -1 22048 }; -1 22049 -1 22050 },{"./utils":129,"minimalistic-assert":136}],121:[function(require,module,exports){ -1 22051 'use strict'; -1 22052 -1 22053 var utils = require('./utils'); -1 22054 var common = require('./common'); -1 22055 -1 22056 var rotl32 = utils.rotl32; -1 22057 var sum32 = utils.sum32; -1 22058 var sum32_3 = utils.sum32_3; -1 22059 var sum32_4 = utils.sum32_4; -1 22060 var BlockHash = common.BlockHash; -1 22061 -1 22062 function RIPEMD160() { -1 22063 if (!(this instanceof RIPEMD160)) -1 22064 return new RIPEMD160(); -1 22065 -1 22066 BlockHash.call(this); -1 22067 -1 22068 this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ]; -1 22069 this.endian = 'little'; -1 22070 } -1 22071 utils.inherits(RIPEMD160, BlockHash); -1 22072 exports.ripemd160 = RIPEMD160; -1 22073 -1 22074 RIPEMD160.blockSize = 512; -1 22075 RIPEMD160.outSize = 160; -1 22076 RIPEMD160.hmacStrength = 192; -1 22077 RIPEMD160.padLength = 64; -1 22078 -1 22079 RIPEMD160.prototype._update = function update(msg, start) { -1 22080 var A = this.h[0]; -1 22081 var B = this.h[1]; -1 22082 var C = this.h[2]; -1 22083 var D = this.h[3]; -1 22084 var E = this.h[4]; -1 22085 var Ah = A; -1 22086 var Bh = B; -1 22087 var Ch = C; -1 22088 var Dh = D; -1 22089 var Eh = E; -1 22090 for (var j = 0; j < 80; j++) { -1 22091 var T = sum32( -1 22092 rotl32( -1 22093 sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)), -1 22094 s[j]), -1 22095 E); -1 22096 A = E; -1 22097 E = D; -1 22098 D = rotl32(C, 10); -1 22099 C = B; -1 22100 B = T; -1 22101 T = sum32( -1 22102 rotl32( -1 22103 sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)), -1 22104 sh[j]), -1 22105 Eh); -1 22106 Ah = Eh; -1 22107 Eh = Dh; -1 22108 Dh = rotl32(Ch, 10); -1 22109 Ch = Bh; -1 22110 Bh = T; -1 22111 } -1 22112 T = sum32_3(this.h[1], C, Dh); -1 22113 this.h[1] = sum32_3(this.h[2], D, Eh); -1 22114 this.h[2] = sum32_3(this.h[3], E, Ah); -1 22115 this.h[3] = sum32_3(this.h[4], A, Bh); -1 22116 this.h[4] = sum32_3(this.h[0], B, Ch); -1 22117 this.h[0] = T; -1 22118 }; -1 22119 -1 22120 RIPEMD160.prototype._digest = function digest(enc) { -1 22121 if (enc === 'hex') -1 22122 return utils.toHex32(this.h, 'little'); -1 22123 else -1 22124 return utils.split32(this.h, 'little'); -1 22125 }; -1 22126 -1 22127 function f(j, x, y, z) { -1 22128 if (j <= 15) -1 22129 return x ^ y ^ z; -1 22130 else if (j <= 31) -1 22131 return (x & y) | ((~x) & z); -1 22132 else if (j <= 47) -1 22133 return (x | (~y)) ^ z; -1 22134 else if (j <= 63) -1 22135 return (x & z) | (y & (~z)); -1 22136 else -1 22137 return x ^ (y | (~z)); -1 22138 } -1 22139 -1 22140 function K(j) { -1 22141 if (j <= 15) -1 22142 return 0x00000000; -1 22143 else if (j <= 31) -1 22144 return 0x5a827999; -1 22145 else if (j <= 47) -1 22146 return 0x6ed9eba1; -1 22147 else if (j <= 63) -1 22148 return 0x8f1bbcdc; -1 22149 else -1 22150 return 0xa953fd4e; -1 22151 } -1 22152 -1 22153 function Kh(j) { -1 22154 if (j <= 15) -1 22155 return 0x50a28be6; -1 22156 else if (j <= 31) -1 22157 return 0x5c4dd124; -1 22158 else if (j <= 47) -1 22159 return 0x6d703ef3; -1 22160 else if (j <= 63) -1 22161 return 0x7a6d76e9; -1 22162 else -1 22163 return 0x00000000; -1 22164 } -1 22165 -1 22166 var r = [ -1 22167 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, -1 22168 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, -1 22169 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, -1 22170 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, -1 22171 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 -1 22172 ]; -1 22173 -1 22174 var rh = [ -1 22175 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, -1 22176 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, -1 22177 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, -1 22178 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, -1 22179 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 -1 22180 ]; -1 22181 -1 22182 var s = [ -1 22183 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, -1 22184 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, -1 22185 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, -1 22186 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, -1 22187 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 -1 22188 ]; -1 22189 -1 22190 var sh = [ -1 22191 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, -1 22192 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, -1 22193 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, -1 22194 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, -1 22195 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 -1 22196 ]; -1 22197 -1 22198 },{"./common":119,"./utils":129}],122:[function(require,module,exports){ -1 22199 'use strict'; -1 22200 -1 22201 exports.sha1 = require('./sha/1'); -1 22202 exports.sha224 = require('./sha/224'); -1 22203 exports.sha256 = require('./sha/256'); -1 22204 exports.sha384 = require('./sha/384'); -1 22205 exports.sha512 = require('./sha/512'); -1 22206 -1 22207 },{"./sha/1":123,"./sha/224":124,"./sha/256":125,"./sha/384":126,"./sha/512":127}],123:[function(require,module,exports){ -1 22208 'use strict'; -1 22209 -1 22210 var utils = require('../utils'); -1 22211 var common = require('../common'); -1 22212 var shaCommon = require('./common'); -1 22213 -1 22214 var rotl32 = utils.rotl32; -1 22215 var sum32 = utils.sum32; -1 22216 var sum32_5 = utils.sum32_5; -1 22217 var ft_1 = shaCommon.ft_1; -1 22218 var BlockHash = common.BlockHash; -1 22219 -1 22220 var sha1_K = [ -1 22221 0x5A827999, 0x6ED9EBA1, -1 22222 0x8F1BBCDC, 0xCA62C1D6 -1 22223 ]; -1 22224 -1 22225 function SHA1() { -1 22226 if (!(this instanceof SHA1)) -1 22227 return new SHA1(); -1 22228 -1 22229 BlockHash.call(this); -1 22230 this.h = [ -1 22231 0x67452301, 0xefcdab89, 0x98badcfe, -1 22232 0x10325476, 0xc3d2e1f0 ]; -1 22233 this.W = new Array(80); -1 22234 } -1 22235 -1 22236 utils.inherits(SHA1, BlockHash); -1 22237 module.exports = SHA1; -1 22238 -1 22239 SHA1.blockSize = 512; -1 22240 SHA1.outSize = 160; -1 22241 SHA1.hmacStrength = 80; -1 22242 SHA1.padLength = 64; -1 22243 -1 22244 SHA1.prototype._update = function _update(msg, start) { -1 22245 var W = this.W; -1 22246 -1 22247 for (var i = 0; i < 16; i++) -1 22248 W[i] = msg[start + i]; -1 22249 -1 22250 for(; i < W.length; i++) -1 22251 W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1); -1 22252 -1 22253 var a = this.h[0]; -1 22254 var b = this.h[1]; -1 22255 var c = this.h[2]; -1 22256 var d = this.h[3]; -1 22257 var e = this.h[4]; -1 22258 -1 22259 for (i = 0; i < W.length; i++) { -1 22260 var s = ~~(i / 20); -1 22261 var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]); -1 22262 e = d; -1 22263 d = c; -1 22264 c = rotl32(b, 30); -1 22265 b = a; -1 22266 a = t; -1 22267 } -1 22268 -1 22269 this.h[0] = sum32(this.h[0], a); -1 22270 this.h[1] = sum32(this.h[1], b); -1 22271 this.h[2] = sum32(this.h[2], c); -1 22272 this.h[3] = sum32(this.h[3], d); -1 22273 this.h[4] = sum32(this.h[4], e); -1 22274 }; -1 22275 -1 22276 SHA1.prototype._digest = function digest(enc) { -1 22277 if (enc === 'hex') -1 22278 return utils.toHex32(this.h, 'big'); -1 22279 else -1 22280 return utils.split32(this.h, 'big'); -1 22281 }; -1 22282 -1 22283 },{"../common":119,"../utils":129,"./common":128}],124:[function(require,module,exports){ -1 22284 'use strict'; -1 22285 -1 22286 var utils = require('../utils'); -1 22287 var SHA256 = require('./256'); -1 22288 -1 22289 function SHA224() { -1 22290 if (!(this instanceof SHA224)) -1 22291 return new SHA224(); -1 22292 -1 22293 SHA256.call(this); -1 22294 this.h = [ -1 22295 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, -1 22296 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ]; -1 22297 } -1 22298 utils.inherits(SHA224, SHA256); -1 22299 module.exports = SHA224; -1 22300 -1 22301 SHA224.blockSize = 512; -1 22302 SHA224.outSize = 224; -1 22303 SHA224.hmacStrength = 192; -1 22304 SHA224.padLength = 64; -1 22305 -1 22306 SHA224.prototype._digest = function digest(enc) { -1 22307 // Just truncate output -1 22308 if (enc === 'hex') -1 22309 return utils.toHex32(this.h.slice(0, 7), 'big'); -1 22310 else -1 22311 return utils.split32(this.h.slice(0, 7), 'big'); -1 22312 }; -1 22313 -1 22314 -1 22315 },{"../utils":129,"./256":125}],125:[function(require,module,exports){ -1 22316 'use strict'; -1 22317 -1 22318 var utils = require('../utils'); -1 22319 var common = require('../common'); -1 22320 var shaCommon = require('./common'); -1 22321 var assert = require('minimalistic-assert'); -1 22322 -1 22323 var sum32 = utils.sum32; -1 22324 var sum32_4 = utils.sum32_4; -1 22325 var sum32_5 = utils.sum32_5; -1 22326 var ch32 = shaCommon.ch32; -1 22327 var maj32 = shaCommon.maj32; -1 22328 var s0_256 = shaCommon.s0_256; -1 22329 var s1_256 = shaCommon.s1_256; -1 22330 var g0_256 = shaCommon.g0_256; -1 22331 var g1_256 = shaCommon.g1_256; -1 22332 -1 22333 var BlockHash = common.BlockHash; -1 22334 -1 22335 var sha256_K = [ -1 22336 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, -1 22337 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, -1 22338 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, -1 22339 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, -1 22340 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, -1 22341 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, -1 22342 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, -1 22343 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, -1 22344 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, -1 22345 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, -1 22346 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, -1 22347 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, -1 22348 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, -1 22349 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, -1 22350 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, -1 22351 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 -1 22352 ]; -1 22353 -1 22354 function SHA256() { -1 22355 if (!(this instanceof SHA256)) -1 22356 return new SHA256(); -1 22357 -1 22358 BlockHash.call(this); -1 22359 this.h = [ -1 22360 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, -1 22361 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 -1 22362 ]; -1 22363 this.k = sha256_K; -1 22364 this.W = new Array(64); -1 22365 } -1 22366 utils.inherits(SHA256, BlockHash); -1 22367 module.exports = SHA256; -1 22368 -1 22369 SHA256.blockSize = 512; -1 22370 SHA256.outSize = 256; -1 22371 SHA256.hmacStrength = 192; -1 22372 SHA256.padLength = 64; -1 22373 -1 22374 SHA256.prototype._update = function _update(msg, start) { -1 22375 var W = this.W; -1 22376 -1 22377 for (var i = 0; i < 16; i++) -1 22378 W[i] = msg[start + i]; -1 22379 for (; i < W.length; i++) -1 22380 W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]); -1 22381 -1 22382 var a = this.h[0]; -1 22383 var b = this.h[1]; -1 22384 var c = this.h[2]; -1 22385 var d = this.h[3]; -1 22386 var e = this.h[4]; -1 22387 var f = this.h[5]; -1 22388 var g = this.h[6]; -1 22389 var h = this.h[7]; -1 22390 -1 22391 assert(this.k.length === W.length); -1 22392 for (i = 0; i < W.length; i++) { -1 22393 var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]); -1 22394 var T2 = sum32(s0_256(a), maj32(a, b, c)); -1 22395 h = g; -1 22396 g = f; -1 22397 f = e; -1 22398 e = sum32(d, T1); -1 22399 d = c; -1 22400 c = b; -1 22401 b = a; -1 22402 a = sum32(T1, T2); -1 22403 } -1 22404 -1 22405 this.h[0] = sum32(this.h[0], a); -1 22406 this.h[1] = sum32(this.h[1], b); -1 22407 this.h[2] = sum32(this.h[2], c); -1 22408 this.h[3] = sum32(this.h[3], d); -1 22409 this.h[4] = sum32(this.h[4], e); -1 22410 this.h[5] = sum32(this.h[5], f); -1 22411 this.h[6] = sum32(this.h[6], g); -1 22412 this.h[7] = sum32(this.h[7], h); -1 22413 }; -1 22414 -1 22415 SHA256.prototype._digest = function digest(enc) { -1 22416 if (enc === 'hex') -1 22417 return utils.toHex32(this.h, 'big'); -1 22418 else -1 22419 return utils.split32(this.h, 'big'); -1 22420 }; -1 22421 -1 22422 },{"../common":119,"../utils":129,"./common":128,"minimalistic-assert":136}],126:[function(require,module,exports){ -1 22423 'use strict'; -1 22424 -1 22425 var utils = require('../utils'); -1 22426 -1 22427 var SHA512 = require('./512'); -1 22428 -1 22429 function SHA384() { -1 22430 if (!(this instanceof SHA384)) -1 22431 return new SHA384(); -1 22432 -1 22433 SHA512.call(this); -1 22434 this.h = [ -1 22435 0xcbbb9d5d, 0xc1059ed8, -1 22436 0x629a292a, 0x367cd507, -1 22437 0x9159015a, 0x3070dd17, -1 22438 0x152fecd8, 0xf70e5939, -1 22439 0x67332667, 0xffc00b31, -1 22440 0x8eb44a87, 0x68581511, -1 22441 0xdb0c2e0d, 0x64f98fa7, -1 22442 0x47b5481d, 0xbefa4fa4 ]; -1 22443 } -1 22444 utils.inherits(SHA384, SHA512); -1 22445 module.exports = SHA384; -1 22446 -1 22447 SHA384.blockSize = 1024; -1 22448 SHA384.outSize = 384; -1 22449 SHA384.hmacStrength = 192; -1 22450 SHA384.padLength = 128; -1 22451 -1 22452 SHA384.prototype._digest = function digest(enc) { -1 22453 if (enc === 'hex') -1 22454 return utils.toHex32(this.h.slice(0, 12), 'big'); -1 22455 else -1 22456 return utils.split32(this.h.slice(0, 12), 'big'); -1 22457 }; -1 22458 -1 22459 },{"../utils":129,"./512":127}],127:[function(require,module,exports){ -1 22460 'use strict'; -1 22461 -1 22462 var utils = require('../utils'); -1 22463 var common = require('../common'); -1 22464 var assert = require('minimalistic-assert'); -1 22465 -1 22466 var rotr64_hi = utils.rotr64_hi; -1 22467 var rotr64_lo = utils.rotr64_lo; -1 22468 var shr64_hi = utils.shr64_hi; -1 22469 var shr64_lo = utils.shr64_lo; -1 22470 var sum64 = utils.sum64; -1 22471 var sum64_hi = utils.sum64_hi; -1 22472 var sum64_lo = utils.sum64_lo; -1 22473 var sum64_4_hi = utils.sum64_4_hi; -1 22474 var sum64_4_lo = utils.sum64_4_lo; -1 22475 var sum64_5_hi = utils.sum64_5_hi; -1 22476 var sum64_5_lo = utils.sum64_5_lo; -1 22477 -1 22478 var BlockHash = common.BlockHash; -1 22479 -1 22480 var sha512_K = [ -1 22481 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, -1 22482 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, -1 22483 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, -1 22484 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, -1 22485 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, -1 22486 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, -1 22487 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, -1 22488 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, -1 22489 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, -1 22490 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, -1 22491 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, -1 22492 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, -1 22493 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, -1 22494 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, -1 22495 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, -1 22496 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, -1 22497 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, -1 22498 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, -1 22499 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, -1 22500 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, -1 22501 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, -1 22502 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, -1 22503 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, -1 22504 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, -1 22505 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, -1 22506 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, -1 22507 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, -1 22508 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, -1 22509 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, -1 22510 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, -1 22511 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, -1 22512 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, -1 22513 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, -1 22514 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, -1 22515 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, -1 22516 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, -1 22517 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, -1 22518 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, -1 22519 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, -1 22520 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -1 22521 ]; -1 22522 -1 22523 function SHA512() { -1 22524 if (!(this instanceof SHA512)) -1 22525 return new SHA512(); -1 22526 -1 22527 BlockHash.call(this); -1 22528 this.h = [ -1 22529 0x6a09e667, 0xf3bcc908, -1 22530 0xbb67ae85, 0x84caa73b, -1 22531 0x3c6ef372, 0xfe94f82b, -1 22532 0xa54ff53a, 0x5f1d36f1, -1 22533 0x510e527f, 0xade682d1, -1 22534 0x9b05688c, 0x2b3e6c1f, -1 22535 0x1f83d9ab, 0xfb41bd6b, -1 22536 0x5be0cd19, 0x137e2179 ]; -1 22537 this.k = sha512_K; -1 22538 this.W = new Array(160); -1 22539 } -1 22540 utils.inherits(SHA512, BlockHash); -1 22541 module.exports = SHA512; -1 22542 -1 22543 SHA512.blockSize = 1024; -1 22544 SHA512.outSize = 512; -1 22545 SHA512.hmacStrength = 192; -1 22546 SHA512.padLength = 128; -1 22547 -1 22548 SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) { -1 22549 var W = this.W; -1 22550 -1 22551 // 32 x 32bit words -1 22552 for (var i = 0; i < 32; i++) -1 22553 W[i] = msg[start + i]; -1 22554 for (; i < W.length; i += 2) { -1 22555 var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2 -1 22556 var c0_lo = g1_512_lo(W[i - 4], W[i - 3]); -1 22557 var c1_hi = W[i - 14]; // i - 7 -1 22558 var c1_lo = W[i - 13]; -1 22559 var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15 -1 22560 var c2_lo = g0_512_lo(W[i - 30], W[i - 29]); -1 22561 var c3_hi = W[i - 32]; // i - 16 -1 22562 var c3_lo = W[i - 31]; -1 22563 -1 22564 W[i] = sum64_4_hi( -1 22565 c0_hi, c0_lo, -1 22566 c1_hi, c1_lo, -1 22567 c2_hi, c2_lo, -1 22568 c3_hi, c3_lo); -1 22569 W[i + 1] = sum64_4_lo( -1 22570 c0_hi, c0_lo, -1 22571 c1_hi, c1_lo, -1 22572 c2_hi, c2_lo, -1 22573 c3_hi, c3_lo); -1 22574 } -1 22575 }; -1 22576 -1 22577 SHA512.prototype._update = function _update(msg, start) { -1 22578 this._prepareBlock(msg, start); -1 22579 -1 22580 var W = this.W; -1 22581 -1 22582 var ah = this.h[0]; -1 22583 var al = this.h[1]; -1 22584 var bh = this.h[2]; -1 22585 var bl = this.h[3]; -1 22586 var ch = this.h[4]; -1 22587 var cl = this.h[5]; -1 22588 var dh = this.h[6]; -1 22589 var dl = this.h[7]; -1 22590 var eh = this.h[8]; -1 22591 var el = this.h[9]; -1 22592 var fh = this.h[10]; -1 22593 var fl = this.h[11]; -1 22594 var gh = this.h[12]; -1 22595 var gl = this.h[13]; -1 22596 var hh = this.h[14]; -1 22597 var hl = this.h[15]; -1 22598 -1 22599 assert(this.k.length === W.length); -1 22600 for (var i = 0; i < W.length; i += 2) { -1 22601 var c0_hi = hh; -1 22602 var c0_lo = hl; -1 22603 var c1_hi = s1_512_hi(eh, el); -1 22604 var c1_lo = s1_512_lo(eh, el); -1 22605 var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl); -1 22606 var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl); -1 22607 var c3_hi = this.k[i]; -1 22608 var c3_lo = this.k[i + 1]; -1 22609 var c4_hi = W[i]; -1 22610 var c4_lo = W[i + 1]; -1 22611 -1 22612 var T1_hi = sum64_5_hi( -1 22613 c0_hi, c0_lo, -1 22614 c1_hi, c1_lo, -1 22615 c2_hi, c2_lo, -1 22616 c3_hi, c3_lo, -1 22617 c4_hi, c4_lo); -1 22618 var T1_lo = sum64_5_lo( -1 22619 c0_hi, c0_lo, -1 22620 c1_hi, c1_lo, -1 22621 c2_hi, c2_lo, -1 22622 c3_hi, c3_lo, -1 22623 c4_hi, c4_lo); -1 22624 -1 22625 c0_hi = s0_512_hi(ah, al); -1 22626 c0_lo = s0_512_lo(ah, al); -1 22627 c1_hi = maj64_hi(ah, al, bh, bl, ch, cl); -1 22628 c1_lo = maj64_lo(ah, al, bh, bl, ch, cl); -1 22629 -1 22630 var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo); -1 22631 var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo); -1 22632 -1 22633 hh = gh; -1 22634 hl = gl; -1 22635 -1 22636 gh = fh; -1 22637 gl = fl; -1 22638 -1 22639 fh = eh; -1 22640 fl = el; -1 22641 -1 22642 eh = sum64_hi(dh, dl, T1_hi, T1_lo); -1 22643 el = sum64_lo(dl, dl, T1_hi, T1_lo); -1 22644 -1 22645 dh = ch; -1 22646 dl = cl; -1 22647 -1 22648 ch = bh; -1 22649 cl = bl; -1 22650 -1 22651 bh = ah; -1 22652 bl = al; -1 22653 -1 22654 ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo); -1 22655 al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo); -1 22656 } -1 22657 -1 22658 sum64(this.h, 0, ah, al); -1 22659 sum64(this.h, 2, bh, bl); -1 22660 sum64(this.h, 4, ch, cl); -1 22661 sum64(this.h, 6, dh, dl); -1 22662 sum64(this.h, 8, eh, el); -1 22663 sum64(this.h, 10, fh, fl); -1 22664 sum64(this.h, 12, gh, gl); -1 22665 sum64(this.h, 14, hh, hl); -1 22666 }; -1 22667 -1 22668 SHA512.prototype._digest = function digest(enc) { -1 22669 if (enc === 'hex') -1 22670 return utils.toHex32(this.h, 'big'); -1 22671 else -1 22672 return utils.split32(this.h, 'big'); -1 22673 }; -1 22674 -1 22675 function ch64_hi(xh, xl, yh, yl, zh) { -1 22676 var r = (xh & yh) ^ ((~xh) & zh); -1 22677 if (r < 0) -1 22678 r += 0x100000000; -1 22679 return r; -1 22680 } -1 22681 -1 22682 function ch64_lo(xh, xl, yh, yl, zh, zl) { -1 22683 var r = (xl & yl) ^ ((~xl) & zl); -1 22684 if (r < 0) -1 22685 r += 0x100000000; -1 22686 return r; -1 22687 } -1 22688 -1 22689 function maj64_hi(xh, xl, yh, yl, zh) { -1 22690 var r = (xh & yh) ^ (xh & zh) ^ (yh & zh); -1 22691 if (r < 0) -1 22692 r += 0x100000000; -1 22693 return r; -1 22694 } -1 22695 -1 22696 function maj64_lo(xh, xl, yh, yl, zh, zl) { -1 22697 var r = (xl & yl) ^ (xl & zl) ^ (yl & zl); -1 22698 if (r < 0) -1 22699 r += 0x100000000; -1 22700 return r; -1 22701 } -1 22702 -1 22703 function s0_512_hi(xh, xl) { -1 22704 var c0_hi = rotr64_hi(xh, xl, 28); -1 22705 var c1_hi = rotr64_hi(xl, xh, 2); // 34 -1 22706 var c2_hi = rotr64_hi(xl, xh, 7); // 39 -1 22707 -1 22708 var r = c0_hi ^ c1_hi ^ c2_hi; -1 22709 if (r < 0) -1 22710 r += 0x100000000; -1 22711 return r; -1 22712 } -1 22713 -1 22714 function s0_512_lo(xh, xl) { -1 22715 var c0_lo = rotr64_lo(xh, xl, 28); -1 22716 var c1_lo = rotr64_lo(xl, xh, 2); // 34 -1 22717 var c2_lo = rotr64_lo(xl, xh, 7); // 39 -1 22718 -1 22719 var r = c0_lo ^ c1_lo ^ c2_lo; -1 22720 if (r < 0) -1 22721 r += 0x100000000; -1 22722 return r; -1 22723 } -1 22724 -1 22725 function s1_512_hi(xh, xl) { -1 22726 var c0_hi = rotr64_hi(xh, xl, 14); -1 22727 var c1_hi = rotr64_hi(xh, xl, 18); -1 22728 var c2_hi = rotr64_hi(xl, xh, 9); // 41 -1 22729 -1 22730 var r = c0_hi ^ c1_hi ^ c2_hi; -1 22731 if (r < 0) -1 22732 r += 0x100000000; -1 22733 return r; -1 22734 } -1 22735 -1 22736 function s1_512_lo(xh, xl) { -1 22737 var c0_lo = rotr64_lo(xh, xl, 14); -1 22738 var c1_lo = rotr64_lo(xh, xl, 18); -1 22739 var c2_lo = rotr64_lo(xl, xh, 9); // 41 -1 22740 -1 22741 var r = c0_lo ^ c1_lo ^ c2_lo; -1 22742 if (r < 0) -1 22743 r += 0x100000000; -1 22744 return r; -1 22745 } -1 22746 -1 22747 function g0_512_hi(xh, xl) { -1 22748 var c0_hi = rotr64_hi(xh, xl, 1); -1 22749 var c1_hi = rotr64_hi(xh, xl, 8); -1 22750 var c2_hi = shr64_hi(xh, xl, 7); -1 22751 -1 22752 var r = c0_hi ^ c1_hi ^ c2_hi; -1 22753 if (r < 0) -1 22754 r += 0x100000000; -1 22755 return r; -1 22756 } -1 22757 -1 22758 function g0_512_lo(xh, xl) { -1 22759 var c0_lo = rotr64_lo(xh, xl, 1); -1 22760 var c1_lo = rotr64_lo(xh, xl, 8); -1 22761 var c2_lo = shr64_lo(xh, xl, 7); -1 22762 -1 22763 var r = c0_lo ^ c1_lo ^ c2_lo; -1 22764 if (r < 0) -1 22765 r += 0x100000000; -1 22766 return r; -1 22767 } -1 22768 -1 22769 function g1_512_hi(xh, xl) { -1 22770 var c0_hi = rotr64_hi(xh, xl, 19); -1 22771 var c1_hi = rotr64_hi(xl, xh, 29); // 61 -1 22772 var c2_hi = shr64_hi(xh, xl, 6); -1 22773 -1 22774 var r = c0_hi ^ c1_hi ^ c2_hi; -1 22775 if (r < 0) -1 22776 r += 0x100000000; -1 22777 return r; -1 22778 } -1 22779 -1 22780 function g1_512_lo(xh, xl) { -1 22781 var c0_lo = rotr64_lo(xh, xl, 19); -1 22782 var c1_lo = rotr64_lo(xl, xh, 29); // 61 -1 22783 var c2_lo = shr64_lo(xh, xl, 6); -1 22784 -1 22785 var r = c0_lo ^ c1_lo ^ c2_lo; -1 22786 if (r < 0) -1 22787 r += 0x100000000; -1 22788 return r; -1 22789 } -1 22790 -1 22791 },{"../common":119,"../utils":129,"minimalistic-assert":136}],128:[function(require,module,exports){ -1 22792 'use strict'; -1 22793 -1 22794 var utils = require('../utils'); -1 22795 var rotr32 = utils.rotr32; -1 22796 -1 22797 function ft_1(s, x, y, z) { -1 22798 if (s === 0) -1 22799 return ch32(x, y, z); -1 22800 if (s === 1 || s === 3) -1 22801 return p32(x, y, z); -1 22802 if (s === 2) -1 22803 return maj32(x, y, z); -1 22804 } -1 22805 exports.ft_1 = ft_1; -1 22806 -1 22807 function ch32(x, y, z) { -1 22808 return (x & y) ^ ((~x) & z); -1 22809 } -1 22810 exports.ch32 = ch32; -1 22811 -1 22812 function maj32(x, y, z) { -1 22813 return (x & y) ^ (x & z) ^ (y & z); -1 22814 } -1 22815 exports.maj32 = maj32; -1 22816 -1 22817 function p32(x, y, z) { -1 22818 return x ^ y ^ z; -1 22819 } -1 22820 exports.p32 = p32; -1 22821 -1 22822 function s0_256(x) { -1 22823 return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22); -1 22824 } -1 22825 exports.s0_256 = s0_256; -1 22826 -1 22827 function s1_256(x) { -1 22828 return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25); -1 22829 } -1 22830 exports.s1_256 = s1_256; -1 22831 -1 22832 function g0_256(x) { -1 22833 return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3); -1 22834 } -1 22835 exports.g0_256 = g0_256; -1 22836 -1 22837 function g1_256(x) { -1 22838 return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10); -1 22839 } -1 22840 exports.g1_256 = g1_256; -1 22841 -1 22842 },{"../utils":129}],129:[function(require,module,exports){ -1 22843 'use strict'; -1 22844 -1 22845 var assert = require('minimalistic-assert'); -1 22846 var inherits = require('inherits'); -1 22847 -1 22848 exports.inherits = inherits; -1 22849 -1 22850 function isSurrogatePair(msg, i) { -1 22851 if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) { -1 22852 return false; -1 22853 } -1 22854 if (i < 0 || i + 1 >= msg.length) { -1 22855 return false; -1 22856 } -1 22857 return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00; -1 22858 } -1 22859 -1 22860 function toArray(msg, enc) { -1 22861 if (Array.isArray(msg)) -1 22862 return msg.slice(); -1 22863 if (!msg) -1 22864 return []; -1 22865 var res = []; -1 22866 if (typeof msg === 'string') { -1 22867 if (!enc) { -1 22868 // Inspired by stringToUtf8ByteArray() in closure-library by Google -1 22869 // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143 -1 22870 // Apache License 2.0 -1 22871 // https://github.com/google/closure-library/blob/master/LICENSE -1 22872 var p = 0; -1 22873 for (var i = 0; i < msg.length; i++) { -1 22874 var c = msg.charCodeAt(i); -1 22875 if (c < 128) { -1 22876 res[p++] = c; -1 22877 } else if (c < 2048) { -1 22878 res[p++] = (c >> 6) | 192; -1 22879 res[p++] = (c & 63) | 128; -1 22880 } else if (isSurrogatePair(msg, i)) { -1 22881 c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF); -1 22882 res[p++] = (c >> 18) | 240; -1 22883 res[p++] = ((c >> 12) & 63) | 128; -1 22884 res[p++] = ((c >> 6) & 63) | 128; -1 22885 res[p++] = (c & 63) | 128; -1 22886 } else { -1 22887 res[p++] = (c >> 12) | 224; -1 22888 res[p++] = ((c >> 6) & 63) | 128; -1 22889 res[p++] = (c & 63) | 128; -1 22890 } -1 22891 } -1 22892 } else if (enc === 'hex') { -1 22893 msg = msg.replace(/[^a-z0-9]+/ig, ''); -1 22894 if (msg.length % 2 !== 0) -1 22895 msg = '0' + msg; -1 22896 for (i = 0; i < msg.length; i += 2) -1 22897 res.push(parseInt(msg[i] + msg[i + 1], 16)); -1 22898 } -1 22899 } else { -1 22900 for (i = 0; i < msg.length; i++) -1 22901 res[i] = msg[i] | 0; -1 22902 } -1 22903 return res; -1 22904 } -1 22905 exports.toArray = toArray; -1 22906 -1 22907 function toHex(msg) { -1 22908 var res = ''; -1 22909 for (var i = 0; i < msg.length; i++) -1 22910 res += zero2(msg[i].toString(16)); -1 22911 return res; -1 22912 } -1 22913 exports.toHex = toHex; -1 22914 -1 22915 function htonl(w) { -1 22916 var res = (w >>> 24) | -1 22917 ((w >>> 8) & 0xff00) | -1 22918 ((w << 8) & 0xff0000) | -1 22919 ((w & 0xff) << 24); -1 22920 return res >>> 0; -1 22921 } -1 22922 exports.htonl = htonl; -1 22923 -1 22924 function toHex32(msg, endian) { -1 22925 var res = ''; -1 22926 for (var i = 0; i < msg.length; i++) { -1 22927 var w = msg[i]; -1 22928 if (endian === 'little') -1 22929 w = htonl(w); -1 22930 res += zero8(w.toString(16)); -1 22931 } -1 22932 return res; -1 22933 } -1 22934 exports.toHex32 = toHex32; -1 22935 -1 22936 function zero2(word) { -1 22937 if (word.length === 1) -1 22938 return '0' + word; -1 22939 else -1 22940 return word; -1 22941 } -1 22942 exports.zero2 = zero2; -1 22943 -1 22944 function zero8(word) { -1 22945 if (word.length === 7) -1 22946 return '0' + word; -1 22947 else if (word.length === 6) -1 22948 return '00' + word; -1 22949 else if (word.length === 5) -1 22950 return '000' + word; -1 22951 else if (word.length === 4) -1 22952 return '0000' + word; -1 22953 else if (word.length === 3) -1 22954 return '00000' + word; -1 22955 else if (word.length === 2) -1 22956 return '000000' + word; -1 22957 else if (word.length === 1) -1 22958 return '0000000' + word; -1 22959 else -1 22960 return word; -1 22961 } -1 22962 exports.zero8 = zero8; -1 22963 -1 22964 function join32(msg, start, end, endian) { -1 22965 var len = end - start; -1 22966 assert(len % 4 === 0); -1 22967 var res = new Array(len / 4); -1 22968 for (var i = 0, k = start; i < res.length; i++, k += 4) { -1 22969 var w; -1 22970 if (endian === 'big') -1 22971 w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3]; -1 22972 else -1 22973 w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k]; -1 22974 res[i] = w >>> 0; -1 22975 } -1 22976 return res; -1 22977 } -1 22978 exports.join32 = join32; -1 22979 -1 22980 function split32(msg, endian) { -1 22981 var res = new Array(msg.length * 4); -1 22982 for (var i = 0, k = 0; i < msg.length; i++, k += 4) { -1 22983 var m = msg[i]; -1 22984 if (endian === 'big') { -1 22985 res[k] = m >>> 24; -1 22986 res[k + 1] = (m >>> 16) & 0xff; -1 22987 res[k + 2] = (m >>> 8) & 0xff; -1 22988 res[k + 3] = m & 0xff; -1 22989 } else { -1 22990 res[k + 3] = m >>> 24; -1 22991 res[k + 2] = (m >>> 16) & 0xff; -1 22992 res[k + 1] = (m >>> 8) & 0xff; -1 22993 res[k] = m & 0xff; -1 22994 } -1 22995 } -1 22996 return res; -1 22997 } -1 22998 exports.split32 = split32; -1 22999 -1 23000 function rotr32(w, b) { -1 23001 return (w >>> b) | (w << (32 - b)); -1 23002 } -1 23003 exports.rotr32 = rotr32; -1 23004 -1 23005 function rotl32(w, b) { -1 23006 return (w << b) | (w >>> (32 - b)); -1 23007 } -1 23008 exports.rotl32 = rotl32; -1 23009 -1 23010 function sum32(a, b) { -1 23011 return (a + b) >>> 0; -1 23012 } -1 23013 exports.sum32 = sum32; -1 23014 -1 23015 function sum32_3(a, b, c) { -1 23016 return (a + b + c) >>> 0; -1 23017 } -1 23018 exports.sum32_3 = sum32_3; -1 23019 -1 23020 function sum32_4(a, b, c, d) { -1 23021 return (a + b + c + d) >>> 0; -1 23022 } -1 23023 exports.sum32_4 = sum32_4; -1 23024 -1 23025 function sum32_5(a, b, c, d, e) { -1 23026 return (a + b + c + d + e) >>> 0; -1 23027 } -1 23028 exports.sum32_5 = sum32_5; -1 23029 -1 23030 function sum64(buf, pos, ah, al) { -1 23031 var bh = buf[pos]; -1 23032 var bl = buf[pos + 1]; -1 23033 -1 23034 var lo = (al + bl) >>> 0; -1 23035 var hi = (lo < al ? 1 : 0) + ah + bh; -1 23036 buf[pos] = hi >>> 0; -1 23037 buf[pos + 1] = lo; -1 23038 } -1 23039 exports.sum64 = sum64; -1 23040 -1 23041 function sum64_hi(ah, al, bh, bl) { -1 23042 var lo = (al + bl) >>> 0; -1 23043 var hi = (lo < al ? 1 : 0) + ah + bh; -1 23044 return hi >>> 0; -1 23045 } -1 23046 exports.sum64_hi = sum64_hi; -1 23047 -1 23048 function sum64_lo(ah, al, bh, bl) { -1 23049 var lo = al + bl; -1 23050 return lo >>> 0; -1 23051 } -1 23052 exports.sum64_lo = sum64_lo; -1 23053 -1 23054 function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) { -1 23055 var carry = 0; -1 23056 var lo = al; -1 23057 lo = (lo + bl) >>> 0; -1 23058 carry += lo < al ? 1 : 0; -1 23059 lo = (lo + cl) >>> 0; -1 23060 carry += lo < cl ? 1 : 0; -1 23061 lo = (lo + dl) >>> 0; -1 23062 carry += lo < dl ? 1 : 0; -1 23063 -1 23064 var hi = ah + bh + ch + dh + carry; -1 23065 return hi >>> 0; -1 23066 } -1 23067 exports.sum64_4_hi = sum64_4_hi; -1 23068 -1 23069 function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) { -1 23070 var lo = al + bl + cl + dl; -1 23071 return lo >>> 0; -1 23072 } -1 23073 exports.sum64_4_lo = sum64_4_lo; -1 23074 -1 23075 function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { -1 23076 var carry = 0; -1 23077 var lo = al; -1 23078 lo = (lo + bl) >>> 0; -1 23079 carry += lo < al ? 1 : 0; -1 23080 lo = (lo + cl) >>> 0; -1 23081 carry += lo < cl ? 1 : 0; -1 23082 lo = (lo + dl) >>> 0; -1 23083 carry += lo < dl ? 1 : 0; -1 23084 lo = (lo + el) >>> 0; -1 23085 carry += lo < el ? 1 : 0; -1 23086 -1 23087 var hi = ah + bh + ch + dh + eh + carry; -1 23088 return hi >>> 0; -1 23089 } -1 23090 exports.sum64_5_hi = sum64_5_hi; -1 23091 -1 23092 function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) { -1 23093 var lo = al + bl + cl + dl + el; -1 23094 -1 23095 return lo >>> 0; -1 23096 } -1 23097 exports.sum64_5_lo = sum64_5_lo; -1 23098 -1 23099 function rotr64_hi(ah, al, num) { -1 23100 var r = (al << (32 - num)) | (ah >>> num); -1 23101 return r >>> 0; -1 23102 } -1 23103 exports.rotr64_hi = rotr64_hi; -1 23104 -1 23105 function rotr64_lo(ah, al, num) { -1 23106 var r = (ah << (32 - num)) | (al >>> num); -1 23107 return r >>> 0; -1 23108 } -1 23109 exports.rotr64_lo = rotr64_lo; -1 23110 -1 23111 function shr64_hi(ah, al, num) { -1 23112 return ah >>> num; -1 23113 } -1 23114 exports.shr64_hi = shr64_hi; -1 23115 -1 23116 function shr64_lo(ah, al, num) { -1 23117 var r = (ah << (32 - num)) | (al >>> num); -1 23118 return r >>> 0; -1 23119 } -1 23120 exports.shr64_lo = shr64_lo; -1 23121 -1 23122 },{"inherits":132,"minimalistic-assert":136}],130:[function(require,module,exports){ -1 23123 'use strict'; -1 23124 -1 23125 var hash = require('hash.js'); -1 23126 var utils = require('minimalistic-crypto-utils'); -1 23127 var assert = require('minimalistic-assert'); -1 23128 -1 23129 function HmacDRBG(options) { -1 23130 if (!(this instanceof HmacDRBG)) -1 23131 return new HmacDRBG(options); -1 23132 this.hash = options.hash; -1 23133 this.predResist = !!options.predResist; -1 23134 -1 23135 this.outLen = this.hash.outSize; -1 23136 this.minEntropy = options.minEntropy || this.hash.hmacStrength; -1 23137 -1 23138 this._reseed = null; -1 23139 this.reseedInterval = null; -1 23140 this.K = null; -1 23141 this.V = null; -1 23142 -1 23143 var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex'); -1 23144 var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex'); -1 23145 var pers = utils.toArray(options.pers, options.persEnc || 'hex'); -1 23146 assert(entropy.length >= (this.minEntropy / 8), -1 23147 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); -1 23148 this._init(entropy, nonce, pers); -1 23149 } -1 23150 module.exports = HmacDRBG; -1 23151 -1 23152 HmacDRBG.prototype._init = function init(entropy, nonce, pers) { -1 23153 var seed = entropy.concat(nonce).concat(pers); -1 23154 -1 23155 this.K = new Array(this.outLen / 8); -1 23156 this.V = new Array(this.outLen / 8); -1 23157 for (var i = 0; i < this.V.length; i++) { -1 23158 this.K[i] = 0x00; -1 23159 this.V[i] = 0x01; -1 23160 } -1 23161 -1 23162 this._update(seed); -1 23163 this._reseed = 1; -1 23164 this.reseedInterval = 0x1000000000000; // 2^48 -1 23165 }; -1 23166 -1 23167 HmacDRBG.prototype._hmac = function hmac() { -1 23168 return new hash.hmac(this.hash, this.K); -1 23169 }; -1 23170 -1 23171 HmacDRBG.prototype._update = function update(seed) { -1 23172 var kmac = this._hmac() -1 23173 .update(this.V) -1 23174 .update([ 0x00 ]); -1 23175 if (seed) -1 23176 kmac = kmac.update(seed); -1 23177 this.K = kmac.digest(); -1 23178 this.V = this._hmac().update(this.V).digest(); -1 23179 if (!seed) -1 23180 return; -1 23181 -1 23182 this.K = this._hmac() -1 23183 .update(this.V) -1 23184 .update([ 0x01 ]) -1 23185 .update(seed) -1 23186 .digest(); -1 23187 this.V = this._hmac().update(this.V).digest(); -1 23188 }; -1 23189 -1 23190 HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { -1 23191 // Optional entropy enc -1 23192 if (typeof entropyEnc !== 'string') { -1 23193 addEnc = add; -1 23194 add = entropyEnc; -1 23195 entropyEnc = null; -1 23196 } -1 23197 -1 23198 entropy = utils.toArray(entropy, entropyEnc); -1 23199 add = utils.toArray(add, addEnc); -1 23200 -1 23201 assert(entropy.length >= (this.minEntropy / 8), -1 23202 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); -1 23203 -1 23204 this._update(entropy.concat(add || [])); -1 23205 this._reseed = 1; -1 23206 }; -1 23207 -1 23208 HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { -1 23209 if (this._reseed > this.reseedInterval) -1 23210 throw new Error('Reseed is required'); -1 23211 -1 23212 // Optional encoding -1 23213 if (typeof enc !== 'string') { -1 23214 addEnc = add; -1 23215 add = enc; -1 23216 enc = null; -1 23217 } -1 23218 -1 23219 // Optional additional data -1 23220 if (add) { -1 23221 add = utils.toArray(add, addEnc || 'hex'); -1 23222 this._update(add); -1 23223 } -1 23224 -1 23225 var temp = []; -1 23226 while (temp.length < len) { -1 23227 this.V = this._hmac().update(this.V).digest(); -1 23228 temp = temp.concat(this.V); -1 23229 } -1 23230 -1 23231 var res = temp.slice(0, len); -1 23232 this._update(add); -1 23233 this._reseed++; -1 23234 return utils.encode(res, enc); -1 23235 }; -1 23236 -1 23237 },{"hash.js":118,"minimalistic-assert":136,"minimalistic-crypto-utils":137}],131:[function(require,module,exports){ -1 23238 /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ -1 23239 exports.read = function (buffer, offset, isLE, mLen, nBytes) { -1 23240 var e, m -1 23241 var eLen = (nBytes * 8) - mLen - 1 -1 23242 var eMax = (1 << eLen) - 1 -1 23243 var eBias = eMax >> 1 -1 23244 var nBits = -7 -1 23245 var i = isLE ? (nBytes - 1) : 0 -1 23246 var d = isLE ? -1 : 1 -1 23247 var s = buffer[offset + i] -1 23248 -1 23249 i += d -1 23250 -1 23251 e = s & ((1 << (-nBits)) - 1) -1 23252 s >>= (-nBits) -1 23253 nBits += eLen -1 23254 for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} -1 23255 -1 23256 m = e & ((1 << (-nBits)) - 1) -1 23257 e >>= (-nBits) -1 23258 nBits += mLen -1 23259 for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} -1 23260 -1 23261 if (e === 0) { -1 23262 e = 1 - eBias -1 23263 } else if (e === eMax) { -1 23264 return m ? NaN : ((s ? -1 : 1) * Infinity) -1 23265 } else { -1 23266 m = m + Math.pow(2, mLen) -1 23267 e = e - eBias -1 23268 } -1 23269 return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -1 23270 } -1 23271 -1 23272 exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { -1 23273 var e, m, c -1 23274 var eLen = (nBytes * 8) - mLen - 1 -1 23275 var eMax = (1 << eLen) - 1 -1 23276 var eBias = eMax >> 1 -1 23277 var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) -1 23278 var i = isLE ? 0 : (nBytes - 1) -1 23279 var d = isLE ? 1 : -1 -1 23280 var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 -1 23281 -1 23282 value = Math.abs(value) -1 23283 -1 23284 if (isNaN(value) || value === Infinity) { -1 23285 m = isNaN(value) ? 1 : 0 -1 23286 e = eMax -1 23287 } else { -1 23288 e = Math.floor(Math.log(value) / Math.LN2) -1 23289 if (value * (c = Math.pow(2, -e)) < 1) { -1 23290 e-- -1 23291 c *= 2 -1 23292 } -1 23293 if (e + eBias >= 1) { -1 23294 value += rt / c -1 23295 } else { -1 23296 value += rt * Math.pow(2, 1 - eBias) -1 23297 } -1 23298 if (value * c >= 2) { -1 23299 e++ -1 23300 c /= 2 -1 23301 } -1 23302 -1 23303 if (e + eBias >= eMax) { -1 23304 m = 0 -1 23305 e = eMax -1 23306 } else if (e + eBias >= 1) { -1 23307 m = ((value * c) - 1) * Math.pow(2, mLen) -1 23308 e = e + eBias -1 23309 } else { -1 23310 m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) -1 23311 e = 0 -1 23312 } -1 23313 } -1 23314 -1 23315 for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} -1 23316 -1 23317 e = (e << mLen) | m -1 23318 eLen += mLen -1 23319 for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} -1 23320 -1 23321 buffer[offset + i - d] |= s * 128 -1 23322 } -1 23323 -1 23324 },{}],132:[function(require,module,exports){ -1 23325 if (typeof Object.create === 'function') { -1 23326 // implementation from standard node.js 'util' module -1 23327 module.exports = function inherits(ctor, superCtor) { -1 23328 if (superCtor) { -1 23329 ctor.super_ = superCtor -1 23330 ctor.prototype = Object.create(superCtor.prototype, { -1 23331 constructor: { -1 23332 value: ctor, -1 23333 enumerable: false, -1 23334 writable: true, -1 23335 configurable: true -1 23336 } -1 23337 }) -1 23338 } -1 23339 }; -1 23340 } else { -1 23341 // old school shim for old browsers -1 23342 module.exports = function inherits(ctor, superCtor) { -1 23343 if (superCtor) { -1 23344 ctor.super_ = superCtor -1 23345 var TempCtor = function () {} -1 23346 TempCtor.prototype = superCtor.prototype -1 23347 ctor.prototype = new TempCtor() -1 23348 ctor.prototype.constructor = ctor -1 23349 } -1 23350 } -1 23351 } -1 23352 -1 23353 },{}],133:[function(require,module,exports){ -1 23354 'use strict' -1 23355 var inherits = require('inherits') -1 23356 var HashBase = require('hash-base') -1 23357 var Buffer = require('safe-buffer').Buffer -1 23358 -1 23359 var ARRAY16 = new Array(16) -1 23360 -1 23361 function MD5 () { -1 23362 HashBase.call(this, 64) -1 23363 -1 23364 // state -1 23365 this._a = 0x67452301 -1 23366 this._b = 0xefcdab89 -1 23367 this._c = 0x98badcfe -1 23368 this._d = 0x10325476 -1 23369 } -1 23370 -1 23371 inherits(MD5, HashBase) -1 23372 -1 23373 MD5.prototype._update = function () { -1 23374 var M = ARRAY16 -1 23375 for (var i = 0; i < 16; ++i) M[i] = this._block.readInt32LE(i * 4) -1 23376 -1 23377 var a = this._a -1 23378 var b = this._b -1 23379 var c = this._c -1 23380 var d = this._d -1 23381 -1 23382 a = fnF(a, b, c, d, M[0], 0xd76aa478, 7) -1 23383 d = fnF(d, a, b, c, M[1], 0xe8c7b756, 12) -1 23384 c = fnF(c, d, a, b, M[2], 0x242070db, 17) -1 23385 b = fnF(b, c, d, a, M[3], 0xc1bdceee, 22) -1 23386 a = fnF(a, b, c, d, M[4], 0xf57c0faf, 7) -1 23387 d = fnF(d, a, b, c, M[5], 0x4787c62a, 12) -1 23388 c = fnF(c, d, a, b, M[6], 0xa8304613, 17) -1 23389 b = fnF(b, c, d, a, M[7], 0xfd469501, 22) -1 23390 a = fnF(a, b, c, d, M[8], 0x698098d8, 7) -1 23391 d = fnF(d, a, b, c, M[9], 0x8b44f7af, 12) -1 23392 c = fnF(c, d, a, b, M[10], 0xffff5bb1, 17) -1 23393 b = fnF(b, c, d, a, M[11], 0x895cd7be, 22) -1 23394 a = fnF(a, b, c, d, M[12], 0x6b901122, 7) -1 23395 d = fnF(d, a, b, c, M[13], 0xfd987193, 12) -1 23396 c = fnF(c, d, a, b, M[14], 0xa679438e, 17) -1 23397 b = fnF(b, c, d, a, M[15], 0x49b40821, 22) -1 23398 -1 23399 a = fnG(a, b, c, d, M[1], 0xf61e2562, 5) -1 23400 d = fnG(d, a, b, c, M[6], 0xc040b340, 9) -1 23401 c = fnG(c, d, a, b, M[11], 0x265e5a51, 14) -1 23402 b = fnG(b, c, d, a, M[0], 0xe9b6c7aa, 20) -1 23403 a = fnG(a, b, c, d, M[5], 0xd62f105d, 5) -1 23404 d = fnG(d, a, b, c, M[10], 0x02441453, 9) -1 23405 c = fnG(c, d, a, b, M[15], 0xd8a1e681, 14) -1 23406 b = fnG(b, c, d, a, M[4], 0xe7d3fbc8, 20) -1 23407 a = fnG(a, b, c, d, M[9], 0x21e1cde6, 5) -1 23408 d = fnG(d, a, b, c, M[14], 0xc33707d6, 9) -1 23409 c = fnG(c, d, a, b, M[3], 0xf4d50d87, 14) -1 23410 b = fnG(b, c, d, a, M[8], 0x455a14ed, 20) -1 23411 a = fnG(a, b, c, d, M[13], 0xa9e3e905, 5) -1 23412 d = fnG(d, a, b, c, M[2], 0xfcefa3f8, 9) -1 23413 c = fnG(c, d, a, b, M[7], 0x676f02d9, 14) -1 23414 b = fnG(b, c, d, a, M[12], 0x8d2a4c8a, 20) -1 23415 -1 23416 a = fnH(a, b, c, d, M[5], 0xfffa3942, 4) -1 23417 d = fnH(d, a, b, c, M[8], 0x8771f681, 11) -1 23418 c = fnH(c, d, a, b, M[11], 0x6d9d6122, 16) -1 23419 b = fnH(b, c, d, a, M[14], 0xfde5380c, 23) -1 23420 a = fnH(a, b, c, d, M[1], 0xa4beea44, 4) -1 23421 d = fnH(d, a, b, c, M[4], 0x4bdecfa9, 11) -1 23422 c = fnH(c, d, a, b, M[7], 0xf6bb4b60, 16) -1 23423 b = fnH(b, c, d, a, M[10], 0xbebfbc70, 23) -1 23424 a = fnH(a, b, c, d, M[13], 0x289b7ec6, 4) -1 23425 d = fnH(d, a, b, c, M[0], 0xeaa127fa, 11) -1 23426 c = fnH(c, d, a, b, M[3], 0xd4ef3085, 16) -1 23427 b = fnH(b, c, d, a, M[6], 0x04881d05, 23) -1 23428 a = fnH(a, b, c, d, M[9], 0xd9d4d039, 4) -1 23429 d = fnH(d, a, b, c, M[12], 0xe6db99e5, 11) -1 23430 c = fnH(c, d, a, b, M[15], 0x1fa27cf8, 16) -1 23431 b = fnH(b, c, d, a, M[2], 0xc4ac5665, 23) -1 23432 -1 23433 a = fnI(a, b, c, d, M[0], 0xf4292244, 6) -1 23434 d = fnI(d, a, b, c, M[7], 0x432aff97, 10) -1 23435 c = fnI(c, d, a, b, M[14], 0xab9423a7, 15) -1 23436 b = fnI(b, c, d, a, M[5], 0xfc93a039, 21) -1 23437 a = fnI(a, b, c, d, M[12], 0x655b59c3, 6) -1 23438 d = fnI(d, a, b, c, M[3], 0x8f0ccc92, 10) -1 23439 c = fnI(c, d, a, b, M[10], 0xffeff47d, 15) -1 23440 b = fnI(b, c, d, a, M[1], 0x85845dd1, 21) -1 23441 a = fnI(a, b, c, d, M[8], 0x6fa87e4f, 6) -1 23442 d = fnI(d, a, b, c, M[15], 0xfe2ce6e0, 10) -1 23443 c = fnI(c, d, a, b, M[6], 0xa3014314, 15) -1 23444 b = fnI(b, c, d, a, M[13], 0x4e0811a1, 21) -1 23445 a = fnI(a, b, c, d, M[4], 0xf7537e82, 6) -1 23446 d = fnI(d, a, b, c, M[11], 0xbd3af235, 10) -1 23447 c = fnI(c, d, a, b, M[2], 0x2ad7d2bb, 15) -1 23448 b = fnI(b, c, d, a, M[9], 0xeb86d391, 21) -1 23449 -1 23450 this._a = (this._a + a) | 0 -1 23451 this._b = (this._b + b) | 0 -1 23452 this._c = (this._c + c) | 0 -1 23453 this._d = (this._d + d) | 0 -1 23454 } -1 23455 -1 23456 MD5.prototype._digest = function () { -1 23457 // create padding and handle blocks -1 23458 this._block[this._blockOffset++] = 0x80 -1 23459 if (this._blockOffset > 56) { -1 23460 this._block.fill(0, this._blockOffset, 64) -1 23461 this._update() -1 23462 this._blockOffset = 0 -1 23463 } -1 23464 -1 23465 this._block.fill(0, this._blockOffset, 56) -1 23466 this._block.writeUInt32LE(this._length[0], 56) -1 23467 this._block.writeUInt32LE(this._length[1], 60) -1 23468 this._update() -1 23469 -1 23470 // produce result -1 23471 var buffer = Buffer.allocUnsafe(16) -1 23472 buffer.writeInt32LE(this._a, 0) -1 23473 buffer.writeInt32LE(this._b, 4) -1 23474 buffer.writeInt32LE(this._c, 8) -1 23475 buffer.writeInt32LE(this._d, 12) -1 23476 return buffer -1 23477 } -1 23478 -1 23479 function rotl (x, n) { -1 23480 return (x << n) | (x >>> (32 - n)) -1 23481 } -1 23482 -1 23483 function fnF (a, b, c, d, m, k, s) { -1 23484 return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + b) | 0 -1 23485 } -1 23486 -1 23487 function fnG (a, b, c, d, m, k, s) { -1 23488 return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + b) | 0 -1 23489 } -1 23490 -1 23491 function fnH (a, b, c, d, m, k, s) { -1 23492 return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + b) | 0 -1 23493 } -1 23494 -1 23495 function fnI (a, b, c, d, m, k, s) { -1 23496 return (rotl((a + ((c ^ (b | (~d)))) + m + k) | 0, s) + b) | 0 -1 23497 } -1 23498 -1 23499 module.exports = MD5 -1 23500 -1 23501 },{"hash-base":102,"inherits":132,"safe-buffer":160}],134:[function(require,module,exports){ -1 23502 var bn = require('bn.js'); -1 23503 var brorand = require('brorand'); -1 23504 -1 23505 function MillerRabin(rand) { -1 23506 this.rand = rand || new brorand.Rand(); -1 23507 } -1 23508 module.exports = MillerRabin; -1 23509 -1 23510 MillerRabin.create = function create(rand) { -1 23511 return new MillerRabin(rand); -1 23512 }; -1 23513 -1 23514 MillerRabin.prototype._randbelow = function _randbelow(n) { -1 23515 var len = n.bitLength(); -1 23516 var min_bytes = Math.ceil(len / 8); -1 23517 -1 23518 // Generage random bytes until a number less than n is found. -1 23519 // This ensures that 0..n-1 have an equal probability of being selected. -1 23520 do -1 23521 var a = new bn(this.rand.generate(min_bytes)); -1 23522 while (a.cmp(n) >= 0); -1 23523 -1 23524 return a; -1 23525 }; -1 23526 -1 23527 MillerRabin.prototype._randrange = function _randrange(start, stop) { -1 23528 // Generate a random number greater than or equal to start and less than stop. -1 23529 var size = stop.sub(start); -1 23530 return start.add(this._randbelow(size)); -1 23531 }; -1 23532 -1 23533 MillerRabin.prototype.test = function test(n, k, cb) { -1 23534 var len = n.bitLength(); -1 23535 var red = bn.mont(n); -1 23536 var rone = new bn(1).toRed(red); -1 23537 -1 23538 if (!k) -1 23539 k = Math.max(1, (len / 48) | 0); -1 23540 -1 23541 // Find d and s, (n - 1) = (2 ^ s) * d; -1 23542 var n1 = n.subn(1); -1 23543 for (var s = 0; !n1.testn(s); s++) {} -1 23544 var d = n.shrn(s); -1 23545 -1 23546 var rn1 = n1.toRed(red); -1 23547 -1 23548 var prime = true; -1 23549 for (; k > 0; k--) { -1 23550 var a = this._randrange(new bn(2), n1); -1 23551 if (cb) -1 23552 cb(a); -1 23553 -1 23554 var x = a.toRed(red).redPow(d); -1 23555 if (x.cmp(rone) === 0 || x.cmp(rn1) === 0) -1 23556 continue; -1 23557 -1 23558 for (var i = 1; i < s; i++) { -1 23559 x = x.redSqr(); -1 23560 -1 23561 if (x.cmp(rone) === 0) -1 23562 return false; -1 23563 if (x.cmp(rn1) === 0) -1 23564 break; -1 23565 } -1 23566 -1 23567 if (i === s) -1 23568 return false; -1 23569 } -1 23570 -1 23571 return prime; -1 23572 }; -1 23573 -1 23574 MillerRabin.prototype.getDivisor = function getDivisor(n, k) { -1 23575 var len = n.bitLength(); -1 23576 var red = bn.mont(n); -1 23577 var rone = new bn(1).toRed(red); -1 23578 -1 23579 if (!k) -1 23580 k = Math.max(1, (len / 48) | 0); -1 23581 -1 23582 // Find d and s, (n - 1) = (2 ^ s) * d; -1 23583 var n1 = n.subn(1); -1 23584 for (var s = 0; !n1.testn(s); s++) {} -1 23585 var d = n.shrn(s); -1 23586 -1 23587 var rn1 = n1.toRed(red); -1 23588 -1 23589 for (; k > 0; k--) { -1 23590 var a = this._randrange(new bn(2), n1); -1 23591 -1 23592 var g = n.gcd(a); -1 23593 if (g.cmpn(1) !== 0) -1 23594 return g; -1 23595 -1 23596 var x = a.toRed(red).redPow(d); -1 23597 if (x.cmp(rone) === 0 || x.cmp(rn1) === 0) -1 23598 continue; -1 23599 -1 23600 for (var i = 1; i < s; i++) { -1 23601 x = x.redSqr(); -1 23602 -1 23603 if (x.cmp(rone) === 0) -1 23604 return x.fromRed().subn(1).gcd(n); -1 23605 if (x.cmp(rn1) === 0) -1 23606 break; -1 23607 } -1 23608 -1 23609 if (i === s) { -1 23610 x = x.redSqr(); -1 23611 return x.fromRed().subn(1).gcd(n); -1 23612 } -1 23613 } -1 23614 -1 23615 return false; -1 23616 }; -1 23617 -1 23618 },{"bn.js":135,"brorand":18}],135:[function(require,module,exports){ -1 23619 arguments[4][15][0].apply(exports,arguments) -1 23620 },{"buffer":19,"dup":15}],136:[function(require,module,exports){ -1 23621 module.exports = assert; -1 23622 -1 23623 function assert(val, msg) { -1 23624 if (!val) -1 23625 throw new Error(msg || 'Assertion failed'); -1 23626 } -1 23627 -1 23628 assert.equal = function assertEqual(l, r, msg) { -1 23629 if (l != r) -1 23630 throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); -1 23631 }; -1 23632 -1 23633 },{}],137:[function(require,module,exports){ -1 23634 'use strict'; -1 23635 -1 23636 var utils = exports; -1 23637 -1 23638 function toArray(msg, enc) { -1 23639 if (Array.isArray(msg)) -1 23640 return msg.slice(); -1 23641 if (!msg) -1 23642 return []; -1 23643 var res = []; -1 23644 if (typeof msg !== 'string') { -1 23645 for (var i = 0; i < msg.length; i++) -1 23646 res[i] = msg[i] | 0; -1 23647 return res; -1 23648 } -1 23649 if (enc === 'hex') { -1 23650 msg = msg.replace(/[^a-z0-9]+/ig, ''); -1 23651 if (msg.length % 2 !== 0) -1 23652 msg = '0' + msg; -1 23653 for (var i = 0; i < msg.length; i += 2) -1 23654 res.push(parseInt(msg[i] + msg[i + 1], 16)); -1 23655 } else { -1 23656 for (var i = 0; i < msg.length; i++) { -1 23657 var c = msg.charCodeAt(i); -1 23658 var hi = c >> 8; -1 23659 var lo = c & 0xff; -1 23660 if (hi) -1 23661 res.push(hi, lo); -1 23662 else -1 23663 res.push(lo); -1 23664 } -1 23665 } -1 23666 return res; -1 23667 } -1 23668 utils.toArray = toArray; -1 23669 -1 23670 function zero2(word) { -1 23671 if (word.length === 1) -1 23672 return '0' + word; -1 23673 else -1 23674 return word; -1 23675 } -1 23676 utils.zero2 = zero2; -1 23677 -1 23678 function toHex(msg) { -1 23679 var res = ''; -1 23680 for (var i = 0; i < msg.length; i++) -1 23681 res += zero2(msg[i].toString(16)); -1 23682 return res; -1 23683 } -1 23684 utils.toHex = toHex; -1 23685 -1 23686 utils.encode = function encode(arr, enc) { -1 23687 if (enc === 'hex') -1 23688 return toHex(arr); -1 23689 else -1 23690 return arr; -1 23691 }; -1 23692 -1 23693 },{}],138:[function(require,module,exports){ -1 23694 module.exports={"2.16.840.1.101.3.4.1.1": "aes-128-ecb", -1 23695 "2.16.840.1.101.3.4.1.2": "aes-128-cbc", -1 23696 "2.16.840.1.101.3.4.1.3": "aes-128-ofb", -1 23697 "2.16.840.1.101.3.4.1.4": "aes-128-cfb", -1 23698 "2.16.840.1.101.3.4.1.21": "aes-192-ecb", -1 23699 "2.16.840.1.101.3.4.1.22": "aes-192-cbc", -1 23700 "2.16.840.1.101.3.4.1.23": "aes-192-ofb", -1 23701 "2.16.840.1.101.3.4.1.24": "aes-192-cfb", -1 23702 "2.16.840.1.101.3.4.1.41": "aes-256-ecb", -1 23703 "2.16.840.1.101.3.4.1.42": "aes-256-cbc", -1 23704 "2.16.840.1.101.3.4.1.43": "aes-256-ofb", -1 23705 "2.16.840.1.101.3.4.1.44": "aes-256-cfb" -1 23706 } -1 23707 },{}],139:[function(require,module,exports){ -1 23708 // from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js -1 23709 // Fedor, you are amazing. -1 23710 'use strict' -1 23711 -1 23712 var asn1 = require('asn1.js') -1 23713 -1 23714 exports.certificate = require('./certificate') -1 23715 -1 23716 var RSAPrivateKey = asn1.define('RSAPrivateKey', function () { -1 23717 this.seq().obj( -1 23718 this.key('version').int(), -1 23719 this.key('modulus').int(), -1 23720 this.key('publicExponent').int(), -1 23721 this.key('privateExponent').int(), -1 23722 this.key('prime1').int(), -1 23723 this.key('prime2').int(), -1 23724 this.key('exponent1').int(), -1 23725 this.key('exponent2').int(), -1 23726 this.key('coefficient').int() -1 23727 ) -1 23728 }) -1 23729 exports.RSAPrivateKey = RSAPrivateKey -1 23730 -1 23731 var RSAPublicKey = asn1.define('RSAPublicKey', function () { -1 23732 this.seq().obj( -1 23733 this.key('modulus').int(), -1 23734 this.key('publicExponent').int() -1 23735 ) -1 23736 }) -1 23737 exports.RSAPublicKey = RSAPublicKey -1 23738 -1 23739 var PublicKey = asn1.define('SubjectPublicKeyInfo', function () { -1 23740 this.seq().obj( -1 23741 this.key('algorithm').use(AlgorithmIdentifier), -1 23742 this.key('subjectPublicKey').bitstr() -1 23743 ) -1 23744 }) -1 23745 exports.PublicKey = PublicKey -1 23746 -1 23747 var AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () { -1 23748 this.seq().obj( -1 23749 this.key('algorithm').objid(), -1 23750 this.key('none').null_().optional(), -1 23751 this.key('curve').objid().optional(), -1 23752 this.key('params').seq().obj( -1 23753 this.key('p').int(), -1 23754 this.key('q').int(), -1 23755 this.key('g').int() -1 23756 ).optional() -1 23757 ) -1 23758 }) -1 23759 -1 23760 var PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () { -1 23761 this.seq().obj( -1 23762 this.key('version').int(), -1 23763 this.key('algorithm').use(AlgorithmIdentifier), -1 23764 this.key('subjectPrivateKey').octstr() -1 23765 ) -1 23766 }) -1 23767 exports.PrivateKey = PrivateKeyInfo -1 23768 var EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () { -1 23769 this.seq().obj( -1 23770 this.key('algorithm').seq().obj( -1 23771 this.key('id').objid(), -1 23772 this.key('decrypt').seq().obj( -1 23773 this.key('kde').seq().obj( -1 23774 this.key('id').objid(), -1 23775 this.key('kdeparams').seq().obj( -1 23776 this.key('salt').octstr(), -1 23777 this.key('iters').int() -1 23778 ) -1 23779 ), -1 23780 this.key('cipher').seq().obj( -1 23781 this.key('algo').objid(), -1 23782 this.key('iv').octstr() -1 23783 ) -1 23784 ) -1 23785 ), -1 23786 this.key('subjectPrivateKey').octstr() -1 23787 ) -1 23788 }) -1 23789 -1 23790 exports.EncryptedPrivateKey = EncryptedPrivateKeyInfo -1 23791 -1 23792 var DSAPrivateKey = asn1.define('DSAPrivateKey', function () { -1 23793 this.seq().obj( -1 23794 this.key('version').int(), -1 23795 this.key('p').int(), -1 23796 this.key('q').int(), -1 23797 this.key('g').int(), -1 23798 this.key('pub_key').int(), -1 23799 this.key('priv_key').int() -1 23800 ) -1 23801 }) -1 23802 exports.DSAPrivateKey = DSAPrivateKey -1 23803 -1 23804 exports.DSAparam = asn1.define('DSAparam', function () { -1 23805 this.int() -1 23806 }) -1 23807 -1 23808 var ECPrivateKey = asn1.define('ECPrivateKey', function () { -1 23809 this.seq().obj( -1 23810 this.key('version').int(), -1 23811 this.key('privateKey').octstr(), -1 23812 this.key('parameters').optional().explicit(0).use(ECParameters), -1 23813 this.key('publicKey').optional().explicit(1).bitstr() -1 23814 ) -1 23815 }) -1 23816 exports.ECPrivateKey = ECPrivateKey -1 23817 -1 23818 var ECParameters = asn1.define('ECParameters', function () { -1 23819 this.choice({ -1 23820 namedCurve: this.objid() -1 23821 }) -1 23822 }) -1 23823 -1 23824 exports.signature = asn1.define('signature', function () { -1 23825 this.seq().obj( -1 23826 this.key('r').int(), -1 23827 this.key('s').int() -1 23828 ) -1 23829 }) -1 23830 -1 23831 },{"./certificate":140,"asn1.js":1}],140:[function(require,module,exports){ -1 23832 // from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js -1 23833 // thanks to @Rantanen -1 23834 -1 23835 'use strict' -1 23836 -1 23837 var asn = require('asn1.js') -1 23838 -1 23839 var Time = asn.define('Time', function () { -1 23840 this.choice({ -1 23841 utcTime: this.utctime(), -1 23842 generalTime: this.gentime() -1 23843 }) -1 23844 }) -1 23845 -1 23846 var AttributeTypeValue = asn.define('AttributeTypeValue', function () { -1 23847 this.seq().obj( -1 23848 this.key('type').objid(), -1 23849 this.key('value').any() -1 23850 ) -1 23851 }) -1 23852 -1 23853 var AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () { -1 23854 this.seq().obj( -1 23855 this.key('algorithm').objid(), -1 23856 this.key('parameters').optional(), -1 23857 this.key('curve').objid().optional() -1 23858 ) -1 23859 }) -1 23860 -1 23861 var SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () { -1 23862 this.seq().obj( -1 23863 this.key('algorithm').use(AlgorithmIdentifier), -1 23864 this.key('subjectPublicKey').bitstr() -1 23865 ) -1 23866 }) -1 23867 -1 23868 var RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () { -1 23869 this.setof(AttributeTypeValue) -1 23870 }) -1 23871 -1 23872 var RDNSequence = asn.define('RDNSequence', function () { -1 23873 this.seqof(RelativeDistinguishedName) -1 23874 }) -1 23875 -1 23876 var Name = asn.define('Name', function () { -1 23877 this.choice({ -1 23878 rdnSequence: this.use(RDNSequence) -1 23879 }) -1 23880 }) -1 23881 -1 23882 var Validity = asn.define('Validity', function () { -1 23883 this.seq().obj( -1 23884 this.key('notBefore').use(Time), -1 23885 this.key('notAfter').use(Time) -1 23886 ) -1 23887 }) -1 23888 -1 23889 var Extension = asn.define('Extension', function () { -1 23890 this.seq().obj( -1 23891 this.key('extnID').objid(), -1 23892 this.key('critical').bool().def(false), -1 23893 this.key('extnValue').octstr() -1 23894 ) -1 23895 }) -1 23896 -1 23897 var TBSCertificate = asn.define('TBSCertificate', function () { -1 23898 this.seq().obj( -1 23899 this.key('version').explicit(0).int().optional(), -1 23900 this.key('serialNumber').int(), -1 23901 this.key('signature').use(AlgorithmIdentifier), -1 23902 this.key('issuer').use(Name), -1 23903 this.key('validity').use(Validity), -1 23904 this.key('subject').use(Name), -1 23905 this.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo), -1 23906 this.key('issuerUniqueID').implicit(1).bitstr().optional(), -1 23907 this.key('subjectUniqueID').implicit(2).bitstr().optional(), -1 23908 this.key('extensions').explicit(3).seqof(Extension).optional() -1 23909 ) -1 23910 }) -1 23911 -1 23912 var X509Certificate = asn.define('X509Certificate', function () { -1 23913 this.seq().obj( -1 23914 this.key('tbsCertificate').use(TBSCertificate), -1 23915 this.key('signatureAlgorithm').use(AlgorithmIdentifier), -1 23916 this.key('signatureValue').bitstr() -1 23917 ) -1 23918 }) -1 23919 -1 23920 module.exports = X509Certificate -1 23921 -1 23922 },{"asn1.js":1}],141:[function(require,module,exports){ -1 23923 // adapted from https://github.com/apatil/pemstrip -1 23924 var findProc = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m -1 23925 var startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m -1 23926 var fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m -1 23927 var evp = require('evp_bytestokey') -1 23928 var ciphers = require('browserify-aes') -1 23929 var Buffer = require('safe-buffer').Buffer -1 23930 module.exports = function (okey, password) { -1 23931 var key = okey.toString() -1 23932 var match = key.match(findProc) -1 23933 var decrypted -1 23934 if (!match) { -1 23935 var match2 = key.match(fullRegex) -1 23936 decrypted = Buffer.from(match2[2].replace(/[\r\n]/g, ''), 'base64') -1 23937 } else { -1 23938 var suite = 'aes' + match[1] -1 23939 var iv = Buffer.from(match[2], 'hex') -1 23940 var cipherText = Buffer.from(match[3].replace(/[\r\n]/g, ''), 'base64') -1 23941 var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key -1 23942 var out = [] -1 23943 var cipher = ciphers.createDecipheriv(suite, cipherKey, iv) -1 23944 out.push(cipher.update(cipherText)) -1 23945 out.push(cipher.final()) -1 23946 decrypted = Buffer.concat(out) -1 23947 } -1 23948 var tag = key.match(startRegex)[1] -1 23949 return { -1 23950 tag: tag, -1 23951 data: decrypted -1 23952 } -1 23953 } -1 23954 -1 23955 },{"browserify-aes":22,"evp_bytestokey":101,"safe-buffer":160}],142:[function(require,module,exports){ -1 23956 var asn1 = require('./asn1') -1 23957 var aesid = require('./aesid.json') -1 23958 var fixProc = require('./fixProc') -1 23959 var ciphers = require('browserify-aes') -1 23960 var compat = require('pbkdf2') -1 23961 var Buffer = require('safe-buffer').Buffer -1 23962 module.exports = parseKeys -1 23963 -1 23964 function parseKeys (buffer) { -1 23965 var password -1 23966 if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) { -1 23967 password = buffer.passphrase -1 23968 buffer = buffer.key -1 23969 } -1 23970 if (typeof buffer === 'string') { -1 23971 buffer = Buffer.from(buffer) -1 23972 } -1 23973 -1 23974 var stripped = fixProc(buffer, password) -1 23975 -1 23976 var type = stripped.tag -1 23977 var data = stripped.data -1 23978 var subtype, ndata -1 23979 switch (type) { -1 23980 case 'CERTIFICATE': -1 23981 ndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo -1 23982 // falls through -1 23983 case 'PUBLIC KEY': -1 23984 if (!ndata) { -1 23985 ndata = asn1.PublicKey.decode(data, 'der') -1 23986 } -1 23987 subtype = ndata.algorithm.algorithm.join('.') -1 23988 switch (subtype) { -1 23989 case '1.2.840.113549.1.1.1': -1 23990 return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der') -1 23991 case '1.2.840.10045.2.1': -1 23992 ndata.subjectPrivateKey = ndata.subjectPublicKey -1 23993 return { -1 23994 type: 'ec', -1 23995 data: ndata -1 23996 } -1 23997 case '1.2.840.10040.4.1': -1 23998 ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der') -1 23999 return { -1 24000 type: 'dsa', -1 24001 data: ndata.algorithm.params -1 24002 } -1 24003 default: throw new Error('unknown key id ' + subtype) -1 24004 } -1 24005 // throw new Error('unknown key type ' + type) -1 24006 case 'ENCRYPTED PRIVATE KEY': -1 24007 data = asn1.EncryptedPrivateKey.decode(data, 'der') -1 24008 data = decrypt(data, password) -1 24009 // falls through -1 24010 case 'PRIVATE KEY': -1 24011 ndata = asn1.PrivateKey.decode(data, 'der') -1 24012 subtype = ndata.algorithm.algorithm.join('.') -1 24013 switch (subtype) { -1 24014 case '1.2.840.113549.1.1.1': -1 24015 return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der') -1 24016 case '1.2.840.10045.2.1': -1 24017 return { -1 24018 curve: ndata.algorithm.curve, -1 24019 privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey -1 24020 } -1 24021 case '1.2.840.10040.4.1': -1 24022 ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der') -1 24023 return { -1 24024 type: 'dsa', -1 24025 params: ndata.algorithm.params -1 24026 } -1 24027 default: throw new Error('unknown key id ' + subtype) -1 24028 } -1 24029 // throw new Error('unknown key type ' + type) -1 24030 case 'RSA PUBLIC KEY': -1 24031 return asn1.RSAPublicKey.decode(data, 'der') -1 24032 case 'RSA PRIVATE KEY': -1 24033 return asn1.RSAPrivateKey.decode(data, 'der') -1 24034 case 'DSA PRIVATE KEY': -1 24035 return { -1 24036 type: 'dsa', -1 24037 params: asn1.DSAPrivateKey.decode(data, 'der') -1 24038 } -1 24039 case 'EC PRIVATE KEY': -1 24040 data = asn1.ECPrivateKey.decode(data, 'der') -1 24041 return { -1 24042 curve: data.parameters.value, -1 24043 privateKey: data.privateKey -1 24044 } -1 24045 default: throw new Error('unknown key type ' + type) -1 24046 } -1 24047 } -1 24048 parseKeys.signature = asn1.signature -1 24049 function decrypt (data, password) { -1 24050 var salt = data.algorithm.decrypt.kde.kdeparams.salt -1 24051 var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10) -1 24052 var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')] -1 24053 var iv = data.algorithm.decrypt.cipher.iv -1 24054 var cipherText = data.subjectPrivateKey -1 24055 var keylen = parseInt(algo.split('-')[1], 10) / 8 -1 24056 var key = compat.pbkdf2Sync(password, salt, iters, keylen, 'sha1') -1 24057 var cipher = ciphers.createDecipheriv(algo, key, iv) -1 24058 var out = [] -1 24059 out.push(cipher.update(cipherText)) -1 24060 out.push(cipher.final()) -1 24061 return Buffer.concat(out) -1 24062 } -1 24063 -1 24064 },{"./aesid.json":138,"./asn1":139,"./fixProc":141,"browserify-aes":22,"pbkdf2":143,"safe-buffer":160}],143:[function(require,module,exports){ -1 24065 exports.pbkdf2 = require('./lib/async') -1 24066 exports.pbkdf2Sync = require('./lib/sync') -1 24067 -1 24068 },{"./lib/async":144,"./lib/sync":147}],144:[function(require,module,exports){ -1 24069 (function (process,global){(function (){ -1 24070 var Buffer = require('safe-buffer').Buffer -1 24071 -1 24072 var checkParameters = require('./precondition') -1 24073 var defaultEncoding = require('./default-encoding') -1 24074 var sync = require('./sync') -1 24075 var toBuffer = require('./to-buffer') -1 24076 -1 24077 var ZERO_BUF -1 24078 var subtle = global.crypto && global.crypto.subtle -1 24079 var toBrowser = { -1 24080 sha: 'SHA-1', -1 24081 'sha-1': 'SHA-1', -1 24082 sha1: 'SHA-1', -1 24083 sha256: 'SHA-256', -1 24084 'sha-256': 'SHA-256', -1 24085 sha384: 'SHA-384', -1 24086 'sha-384': 'SHA-384', -1 24087 'sha-512': 'SHA-512', -1 24088 sha512: 'SHA-512' -1 24089 } -1 24090 var checks = [] -1 24091 function checkNative (algo) { -1 24092 if (global.process && !global.process.browser) { -1 24093 return Promise.resolve(false) -1 24094 } -1 24095 if (!subtle || !subtle.importKey || !subtle.deriveBits) { -1 24096 return Promise.resolve(false) -1 24097 } -1 24098 if (checks[algo] !== undefined) { -1 24099 return checks[algo] -1 24100 } -1 24101 ZERO_BUF = ZERO_BUF || Buffer.alloc(8) -1 24102 var prom = browserPbkdf2(ZERO_BUF, ZERO_BUF, 10, 128, algo) -1 24103 .then(function () { -1 24104 return true -1 24105 }).catch(function () { -1 24106 return false -1 24107 }) -1 24108 checks[algo] = prom -1 24109 return prom -1 24110 } -1 24111 -1 24112 function browserPbkdf2 (password, salt, iterations, length, algo) { -1 24113 return subtle.importKey( -1 24114 'raw', password, { name: 'PBKDF2' }, false, ['deriveBits'] -1 24115 ).then(function (key) { -1 24116 return subtle.deriveBits({ -1 24117 name: 'PBKDF2', -1 24118 salt: salt, -1 24119 iterations: iterations, -1 24120 hash: { -1 24121 name: algo -1 24122 } -1 24123 }, key, length << 3) -1 24124 }).then(function (res) { -1 24125 return Buffer.from(res) -1 24126 }) -1 24127 } -1 24128 -1 24129 function resolvePromise (promise, callback) { -1 24130 promise.then(function (out) { -1 24131 process.nextTick(function () { -1 24132 callback(null, out) -1 24133 }) -1 24134 }, function (e) { -1 24135 process.nextTick(function () { -1 24136 callback(e) -1 24137 }) -1 24138 }) -1 24139 } -1 24140 module.exports = function (password, salt, iterations, keylen, digest, callback) { -1 24141 if (typeof digest === 'function') { -1 24142 callback = digest -1 24143 digest = undefined -1 24144 } -1 24145 -1 24146 digest = digest || 'sha1' -1 24147 var algo = toBrowser[digest.toLowerCase()] -1 24148 -1 24149 if (!algo || typeof global.Promise !== 'function') { -1 24150 return process.nextTick(function () { -1 24151 var out -1 24152 try { -1 24153 out = sync(password, salt, iterations, keylen, digest) -1 24154 } catch (e) { -1 24155 return callback(e) -1 24156 } -1 24157 callback(null, out) -1 24158 }) -1 24159 } -1 24160 -1 24161 checkParameters(iterations, keylen) -1 24162 password = toBuffer(password, defaultEncoding, 'Password') -1 24163 salt = toBuffer(salt, defaultEncoding, 'Salt') -1 24164 if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2') -1 24165 -1 24166 resolvePromise(checkNative(algo).then(function (resp) { -1 24167 if (resp) return browserPbkdf2(password, salt, iterations, keylen, algo) -1 24168 -1 24169 return sync(password, salt, iterations, keylen, digest) -1 24170 }), callback) -1 24171 } -1 24172 -1 24173 }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -1 24174 },{"./default-encoding":145,"./precondition":146,"./sync":147,"./to-buffer":148,"_process":149,"safe-buffer":160}],145:[function(require,module,exports){ -1 24175 (function (process){(function (){ -1 24176 var defaultEncoding -1 24177 /* istanbul ignore next */ -1 24178 if (process.browser) { -1 24179 defaultEncoding = 'utf-8' -1 24180 } else if (process.version) { -1 24181 var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10) -1 24182 -1 24183 defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary' -1 24184 } else { -1 24185 defaultEncoding = 'utf-8' -1 24186 } -1 24187 module.exports = defaultEncoding -1 24188 -1 24189 }).call(this)}).call(this,require('_process')) -1 24190 },{"_process":149}],146:[function(require,module,exports){ -1 24191 var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs -1 24192 -1 24193 module.exports = function (iterations, keylen) { -1 24194 if (typeof iterations !== 'number') { -1 24195 throw new TypeError('Iterations not a number') -1 24196 } -1 24197 -1 24198 if (iterations < 0) { -1 24199 throw new TypeError('Bad iterations') -1 24200 } -1 24201 -1 24202 if (typeof keylen !== 'number') { -1 24203 throw new TypeError('Key length not a number') -1 24204 } -1 24205 -1 24206 if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */ -1 24207 throw new TypeError('Bad key length') -1 24208 } -1 24209 } -1 24210 -1 24211 },{}],147:[function(require,module,exports){ -1 24212 var md5 = require('create-hash/md5') -1 24213 var RIPEMD160 = require('ripemd160') -1 24214 var sha = require('sha.js') -1 24215 var Buffer = require('safe-buffer').Buffer -1 24216 -1 24217 var checkParameters = require('./precondition') -1 24218 var defaultEncoding = require('./default-encoding') -1 24219 var toBuffer = require('./to-buffer') -1 24220 -1 24221 var ZEROS = Buffer.alloc(128) -1 24222 var sizes = { -1 24223 md5: 16, -1 24224 sha1: 20, -1 24225 sha224: 28, -1 24226 sha256: 32, -1 24227 sha384: 48, -1 24228 sha512: 64, -1 24229 rmd160: 20, -1 24230 ripemd160: 20 -1 24231 } -1 24232 -1 24233 function Hmac (alg, key, saltLen) { -1 24234 var hash = getDigest(alg) -1 24235 var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64 -1 24236 -1 24237 if (key.length > blocksize) { -1 24238 key = hash(key) -1 24239 } else if (key.length < blocksize) { -1 24240 key = Buffer.concat([key, ZEROS], blocksize) -1 24241 } -1 24242 -1 24243 var ipad = Buffer.allocUnsafe(blocksize + sizes[alg]) -1 24244 var opad = Buffer.allocUnsafe(blocksize + sizes[alg]) -1 24245 for (var i = 0; i < blocksize; i++) { -1 24246 ipad[i] = key[i] ^ 0x36 -1 24247 opad[i] = key[i] ^ 0x5C -1 24248 } -1 24249 -1 24250 var ipad1 = Buffer.allocUnsafe(blocksize + saltLen + 4) -1 24251 ipad.copy(ipad1, 0, 0, blocksize) -1 24252 this.ipad1 = ipad1 -1 24253 this.ipad2 = ipad -1 24254 this.opad = opad -1 24255 this.alg = alg -1 24256 this.blocksize = blocksize -1 24257 this.hash = hash -1 24258 this.size = sizes[alg] -1 24259 } -1 24260 -1 24261 Hmac.prototype.run = function (data, ipad) { -1 24262 data.copy(ipad, this.blocksize) -1 24263 var h = this.hash(ipad) -1 24264 h.copy(this.opad, this.blocksize) -1 24265 return this.hash(this.opad) -1 24266 } -1 24267 -1 24268 function getDigest (alg) { -1 24269 function shaFunc (data) { -1 24270 return sha(alg).update(data).digest() -1 24271 } -1 24272 function rmd160Func (data) { -1 24273 return new RIPEMD160().update(data).digest() -1 24274 } -1 24275 -1 24276 if (alg === 'rmd160' || alg === 'ripemd160') return rmd160Func -1 24277 if (alg === 'md5') return md5 -1 24278 return shaFunc -1 24279 } -1 24280 -1 24281 function pbkdf2 (password, salt, iterations, keylen, digest) { -1 24282 checkParameters(iterations, keylen) -1 24283 password = toBuffer(password, defaultEncoding, 'Password') -1 24284 salt = toBuffer(salt, defaultEncoding, 'Salt') -1 24285 -1 24286 digest = digest || 'sha1' -1 24287 -1 24288 var hmac = new Hmac(digest, password, salt.length) -1 24289 -1 24290 var DK = Buffer.allocUnsafe(keylen) -1 24291 var block1 = Buffer.allocUnsafe(salt.length + 4) -1 24292 salt.copy(block1, 0, 0, salt.length) -1 24293 -1 24294 var destPos = 0 -1 24295 var hLen = sizes[digest] -1 24296 var l = Math.ceil(keylen / hLen) -1 24297 -1 24298 for (var i = 1; i <= l; i++) { -1 24299 block1.writeUInt32BE(i, salt.length) -1 24300 -1 24301 var T = hmac.run(block1, hmac.ipad1) -1 24302 var U = T -1 24303 -1 24304 for (var j = 1; j < iterations; j++) { -1 24305 U = hmac.run(U, hmac.ipad2) -1 24306 for (var k = 0; k < hLen; k++) T[k] ^= U[k] -1 24307 } -1 24308 -1 24309 T.copy(DK, destPos) -1 24310 destPos += hLen -1 24311 } -1 24312 -1 24313 return DK -1 24314 } -1 24315 -1 24316 module.exports = pbkdf2 -1 24317 -1 24318 },{"./default-encoding":145,"./precondition":146,"./to-buffer":148,"create-hash/md5":68,"ripemd160":159,"safe-buffer":160,"sha.js":163}],148:[function(require,module,exports){ -1 24319 var Buffer = require('safe-buffer').Buffer -1 24320 -1 24321 module.exports = function (thing, encoding, name) { -1 24322 if (Buffer.isBuffer(thing)) { -1 24323 return thing -1 24324 } else if (typeof thing === 'string') { -1 24325 return Buffer.from(thing, encoding) -1 24326 } else if (ArrayBuffer.isView(thing)) { -1 24327 return Buffer.from(thing.buffer) -1 24328 } else { -1 24329 throw new TypeError(name + ' must be a string, a Buffer, a typed array or a DataView') -1 24330 } -1 24331 } -1 24332 -1 24333 },{"safe-buffer":160}],149:[function(require,module,exports){ -1 24334 // shim for using process in browser -1 24335 var process = module.exports = {}; -1 24336 -1 24337 // cached from whatever global is present so that test runners that stub it -1 24338 // don't break things. But we need to wrap it in a try catch in case it is -1 24339 // wrapped in strict mode code which doesn't define any globals. It's inside a -1 24340 // function because try/catches deoptimize in certain engines. -1 24341 -1 24342 var cachedSetTimeout; -1 24343 var cachedClearTimeout; -1 24344 -1 24345 function defaultSetTimout() { -1 24346 throw new Error('setTimeout has not been defined'); -1 24347 } -1 24348 function defaultClearTimeout () { -1 24349 throw new Error('clearTimeout has not been defined'); -1 24350 } -1 24351 (function () { -1 24352 try { -1 24353 if (typeof setTimeout === 'function') { -1 24354 cachedSetTimeout = setTimeout; -1 24355 } else { -1 24356 cachedSetTimeout = defaultSetTimout; -1 24357 } -1 24358 } catch (e) { -1 24359 cachedSetTimeout = defaultSetTimout; -1 24360 } -1 24361 try { -1 24362 if (typeof clearTimeout === 'function') { -1 24363 cachedClearTimeout = clearTimeout; -1 24364 } else { -1 24365 cachedClearTimeout = defaultClearTimeout; -1 24366 } -1 24367 } catch (e) { -1 24368 cachedClearTimeout = defaultClearTimeout; -1 24369 } -1 24370 } ()) -1 24371 function runTimeout(fun) { -1 24372 if (cachedSetTimeout === setTimeout) { -1 24373 //normal enviroments in sane situations -1 24374 return setTimeout(fun, 0); -1 24375 } -1 24376 // if setTimeout wasn't available but was latter defined -1 24377 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { -1 24378 cachedSetTimeout = setTimeout; -1 24379 return setTimeout(fun, 0); -1 24380 } -1 24381 try { -1 24382 // when when somebody has screwed with setTimeout but no I.E. maddness -1 24383 return cachedSetTimeout(fun, 0); -1 24384 } catch(e){ -1 24385 try { -1 24386 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally -1 24387 return cachedSetTimeout.call(null, fun, 0); -1 24388 } catch(e){ -1 24389 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error -1 24390 return cachedSetTimeout.call(this, fun, 0); -1 24391 } -1 24392 } -1 24393 -1 24394 -1 24395 } -1 24396 function runClearTimeout(marker) { -1 24397 if (cachedClearTimeout === clearTimeout) { -1 24398 //normal enviroments in sane situations -1 24399 return clearTimeout(marker); -1 24400 } -1 24401 // if clearTimeout wasn't available but was latter defined -1 24402 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { -1 24403 cachedClearTimeout = clearTimeout; -1 24404 return clearTimeout(marker); -1 24405 } -1 24406 try { -1 24407 // when when somebody has screwed with setTimeout but no I.E. maddness -1 24408 return cachedClearTimeout(marker); -1 24409 } catch (e){ -1 24410 try { -1 24411 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally -1 24412 return cachedClearTimeout.call(null, marker); -1 24413 } catch (e){ -1 24414 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. -1 24415 // Some versions of I.E. have different rules for clearTimeout vs setTimeout -1 24416 return cachedClearTimeout.call(this, marker); -1 24417 } -1 24418 } -1 24419 -1 24420 -1 24421 -1 24422 } -1 24423 var queue = []; -1 24424 var draining = false; -1 24425 var currentQueue; -1 24426 var queueIndex = -1; -1 24427 -1 24428 function cleanUpNextTick() { -1 24429 if (!draining || !currentQueue) { -1 24430 return; -1 24431 } -1 24432 draining = false; -1 24433 if (currentQueue.length) { -1 24434 queue = currentQueue.concat(queue); -1 24435 } else { -1 24436 queueIndex = -1; -1 24437 } -1 24438 if (queue.length) { -1 24439 drainQueue(); -1 24440 } -1 24441 } -1 24442 -1 24443 function drainQueue() { -1 24444 if (draining) { -1 24445 return; -1 24446 } -1 24447 var timeout = runTimeout(cleanUpNextTick); -1 24448 draining = true; -1 24449 -1 24450 var len = queue.length; -1 24451 while(len) { -1 24452 currentQueue = queue; -1 24453 queue = []; -1 24454 while (++queueIndex < len) { -1 24455 if (currentQueue) { -1 24456 currentQueue[queueIndex].run(); -1 24457 } -1 24458 } -1 24459 queueIndex = -1; -1 24460 len = queue.length; -1 24461 } -1 24462 currentQueue = null; -1 24463 draining = false; -1 24464 runClearTimeout(timeout); -1 24465 } -1 24466 -1 24467 process.nextTick = function (fun) { -1 24468 var args = new Array(arguments.length - 1); -1 24469 if (arguments.length > 1) { -1 24470 for (var i = 1; i < arguments.length; i++) { -1 24471 args[i - 1] = arguments[i]; -1 24472 } -1 24473 } -1 24474 queue.push(new Item(fun, args)); -1 24475 if (queue.length === 1 && !draining) { -1 24476 runTimeout(drainQueue); -1 24477 } -1 24478 }; -1 24479 -1 24480 // v8 likes predictible objects -1 24481 function Item(fun, array) { -1 24482 this.fun = fun; -1 24483 this.array = array; -1 24484 } -1 24485 Item.prototype.run = function () { -1 24486 this.fun.apply(null, this.array); 5419 24487 }; -1 24488 process.title = 'browser'; -1 24489 process.browser = true; -1 24490 process.env = {}; -1 24491 process.argv = []; -1 24492 process.version = ''; // empty string to avoid regexp issues -1 24493 process.versions = {}; -1 24494 -1 24495 function noop() {} -1 24496 -1 24497 process.on = noop; -1 24498 process.addListener = noop; -1 24499 process.once = noop; -1 24500 process.off = noop; -1 24501 process.removeListener = noop; -1 24502 process.removeAllListeners = noop; -1 24503 process.emit = noop; -1 24504 process.prependListener = noop; -1 24505 process.prependOnceListener = noop; -1 24506 -1 24507 process.listeners = function (name) { return [] } -1 24508 -1 24509 process.binding = function (name) { -1 24510 throw new Error('process.binding is not supported'); -1 24511 }; -1 24512 -1 24513 process.cwd = function () { return '/' }; -1 24514 process.chdir = function (dir) { -1 24515 throw new Error('process.chdir is not supported'); -1 24516 }; -1 24517 process.umask = function() { return 0; }; -1 24518 -1 24519 },{}],150:[function(require,module,exports){ -1 24520 exports.publicEncrypt = require('./publicEncrypt') -1 24521 exports.privateDecrypt = require('./privateDecrypt') -1 24522 -1 24523 exports.privateEncrypt = function privateEncrypt (key, buf) { -1 24524 return exports.publicEncrypt(key, buf, true) -1 24525 } -1 24526 -1 24527 exports.publicDecrypt = function publicDecrypt (key, buf) { -1 24528 return exports.privateDecrypt(key, buf, true) -1 24529 } -1 24530 -1 24531 },{"./privateDecrypt":153,"./publicEncrypt":154}],151:[function(require,module,exports){ -1 24532 var createHash = require('create-hash') -1 24533 var Buffer = require('safe-buffer').Buffer -1 24534 -1 24535 module.exports = function (seed, len) { -1 24536 var t = Buffer.alloc(0) -1 24537 var i = 0 -1 24538 var c -1 24539 while (t.length < len) { -1 24540 c = i2ops(i++) -1 24541 t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()]) -1 24542 } -1 24543 return t.slice(0, len) -1 24544 } -1 24545 -1 24546 function i2ops (c) { -1 24547 var out = Buffer.allocUnsafe(4) -1 24548 out.writeUInt32BE(c, 0) -1 24549 return out -1 24550 } -1 24551 -1 24552 },{"create-hash":67,"safe-buffer":160}],152:[function(require,module,exports){ -1 24553 arguments[4][15][0].apply(exports,arguments) -1 24554 },{"buffer":19,"dup":15}],153:[function(require,module,exports){ -1 24555 var parseKeys = require('parse-asn1') -1 24556 var mgf = require('./mgf') -1 24557 var xor = require('./xor') -1 24558 var BN = require('bn.js') -1 24559 var crt = require('browserify-rsa') -1 24560 var createHash = require('create-hash') -1 24561 var withPublic = require('./withPublic') -1 24562 var Buffer = require('safe-buffer').Buffer -1 24563 -1 24564 module.exports = function privateDecrypt (privateKey, enc, reverse) { -1 24565 var padding -1 24566 if (privateKey.padding) { -1 24567 padding = privateKey.padding -1 24568 } else if (reverse) { -1 24569 padding = 1 -1 24570 } else { -1 24571 padding = 4 -1 24572 } -1 24573 -1 24574 var key = parseKeys(privateKey) -1 24575 var k = key.modulus.byteLength() -1 24576 if (enc.length > k || new BN(enc).cmp(key.modulus) >= 0) { -1 24577 throw new Error('decryption error') -1 24578 } -1 24579 var msg -1 24580 if (reverse) { -1 24581 msg = withPublic(new BN(enc), key) -1 24582 } else { -1 24583 msg = crt(enc, key) -1 24584 } -1 24585 var zBuffer = Buffer.alloc(k - msg.length) -1 24586 msg = Buffer.concat([zBuffer, msg], k) -1 24587 if (padding === 4) { -1 24588 return oaep(key, msg) -1 24589 } else if (padding === 1) { -1 24590 return pkcs1(key, msg, reverse) -1 24591 } else if (padding === 3) { -1 24592 return msg -1 24593 } else { -1 24594 throw new Error('unknown padding') -1 24595 } -1 24596 } -1 24597 -1 24598 function oaep (key, msg) { -1 24599 var k = key.modulus.byteLength() -1 24600 var iHash = createHash('sha1').update(Buffer.alloc(0)).digest() -1 24601 var hLen = iHash.length -1 24602 if (msg[0] !== 0) { -1 24603 throw new Error('decryption error') -1 24604 } -1 24605 var maskedSeed = msg.slice(1, hLen + 1) -1 24606 var maskedDb = msg.slice(hLen + 1) -1 24607 var seed = xor(maskedSeed, mgf(maskedDb, hLen)) -1 24608 var db = xor(maskedDb, mgf(seed, k - hLen - 1)) -1 24609 if (compare(iHash, db.slice(0, hLen))) { -1 24610 throw new Error('decryption error') -1 24611 } -1 24612 var i = hLen -1 24613 while (db[i] === 0) { -1 24614 i++ -1 24615 } -1 24616 if (db[i++] !== 1) { -1 24617 throw new Error('decryption error') -1 24618 } -1 24619 return db.slice(i) -1 24620 } -1 24621 -1 24622 function pkcs1 (key, msg, reverse) { -1 24623 var p1 = msg.slice(0, 2) -1 24624 var i = 2 -1 24625 var status = 0 -1 24626 while (msg[i++] !== 0) { -1 24627 if (i >= msg.length) { -1 24628 status++ -1 24629 break -1 24630 } -1 24631 } -1 24632 var ps = msg.slice(2, i - 1) -1 24633 -1 24634 if ((p1.toString('hex') !== '0002' && !reverse) || (p1.toString('hex') !== '0001' && reverse)) { -1 24635 status++ -1 24636 } -1 24637 if (ps.length < 8) { -1 24638 status++ -1 24639 } -1 24640 if (status) { -1 24641 throw new Error('decryption error') -1 24642 } -1 24643 return msg.slice(i) -1 24644 } -1 24645 function compare (a, b) { -1 24646 a = Buffer.from(a) -1 24647 b = Buffer.from(b) -1 24648 var dif = 0 -1 24649 var len = a.length -1 24650 if (a.length !== b.length) { -1 24651 dif++ -1 24652 len = Math.min(a.length, b.length) -1 24653 } -1 24654 var i = -1 -1 24655 while (++i < len) { -1 24656 dif += (a[i] ^ b[i]) -1 24657 } -1 24658 return dif -1 24659 } -1 24660 -1 24661 },{"./mgf":151,"./withPublic":155,"./xor":156,"bn.js":152,"browserify-rsa":40,"create-hash":67,"parse-asn1":142,"safe-buffer":160}],154:[function(require,module,exports){ -1 24662 var parseKeys = require('parse-asn1') -1 24663 var randomBytes = require('randombytes') -1 24664 var createHash = require('create-hash') -1 24665 var mgf = require('./mgf') -1 24666 var xor = require('./xor') -1 24667 var BN = require('bn.js') -1 24668 var withPublic = require('./withPublic') -1 24669 var crt = require('browserify-rsa') -1 24670 var Buffer = require('safe-buffer').Buffer -1 24671 -1 24672 module.exports = function publicEncrypt (publicKey, msg, reverse) { -1 24673 var padding -1 24674 if (publicKey.padding) { -1 24675 padding = publicKey.padding -1 24676 } else if (reverse) { -1 24677 padding = 1 -1 24678 } else { -1 24679 padding = 4 -1 24680 } -1 24681 var key = parseKeys(publicKey) -1 24682 var paddedMsg -1 24683 if (padding === 4) { -1 24684 paddedMsg = oaep(key, msg) -1 24685 } else if (padding === 1) { -1 24686 paddedMsg = pkcs1(key, msg, reverse) -1 24687 } else if (padding === 3) { -1 24688 paddedMsg = new BN(msg) -1 24689 if (paddedMsg.cmp(key.modulus) >= 0) { -1 24690 throw new Error('data too long for modulus') -1 24691 } -1 24692 } else { -1 24693 throw new Error('unknown padding') -1 24694 } -1 24695 if (reverse) { -1 24696 return crt(paddedMsg, key) -1 24697 } else { -1 24698 return withPublic(paddedMsg, key) -1 24699 } -1 24700 } -1 24701 -1 24702 function oaep (key, msg) { -1 24703 var k = key.modulus.byteLength() -1 24704 var mLen = msg.length -1 24705 var iHash = createHash('sha1').update(Buffer.alloc(0)).digest() -1 24706 var hLen = iHash.length -1 24707 var hLen2 = 2 * hLen -1 24708 if (mLen > k - hLen2 - 2) { -1 24709 throw new Error('message too long') -1 24710 } -1 24711 var ps = Buffer.alloc(k - mLen - hLen2 - 2) -1 24712 var dblen = k - hLen - 1 -1 24713 var seed = randomBytes(hLen) -1 24714 var maskedDb = xor(Buffer.concat([iHash, ps, Buffer.alloc(1, 1), msg], dblen), mgf(seed, dblen)) -1 24715 var maskedSeed = xor(seed, mgf(maskedDb, hLen)) -1 24716 return new BN(Buffer.concat([Buffer.alloc(1), maskedSeed, maskedDb], k)) -1 24717 } -1 24718 function pkcs1 (key, msg, reverse) { -1 24719 var mLen = msg.length -1 24720 var k = key.modulus.byteLength() -1 24721 if (mLen > k - 11) { -1 24722 throw new Error('message too long') -1 24723 } -1 24724 var ps -1 24725 if (reverse) { -1 24726 ps = Buffer.alloc(k - mLen - 3, 0xff) -1 24727 } else { -1 24728 ps = nonZero(k - mLen - 3) -1 24729 } -1 24730 return new BN(Buffer.concat([Buffer.from([0, reverse ? 1 : 2]), ps, Buffer.alloc(1), msg], k)) -1 24731 } -1 24732 function nonZero (len) { -1 24733 var out = Buffer.allocUnsafe(len) -1 24734 var i = 0 -1 24735 var cache = randomBytes(len * 2) -1 24736 var cur = 0 -1 24737 var num -1 24738 while (i < len) { -1 24739 if (cur === cache.length) { -1 24740 cache = randomBytes(len * 2) -1 24741 cur = 0 -1 24742 } -1 24743 num = cache[cur++] -1 24744 if (num) { -1 24745 out[i++] = num -1 24746 } -1 24747 } -1 24748 return out -1 24749 } -1 24750 -1 24751 },{"./mgf":151,"./withPublic":155,"./xor":156,"bn.js":152,"browserify-rsa":40,"create-hash":67,"parse-asn1":142,"randombytes":157,"safe-buffer":160}],155:[function(require,module,exports){ -1 24752 var BN = require('bn.js') -1 24753 var Buffer = require('safe-buffer').Buffer -1 24754 -1 24755 function withPublic (paddedMsg, key) { -1 24756 return Buffer.from(paddedMsg -1 24757 .toRed(BN.mont(key.modulus)) -1 24758 .redPow(new BN(key.publicExponent)) -1 24759 .fromRed() -1 24760 .toArray()) -1 24761 } -1 24762 -1 24763 module.exports = withPublic -1 24764 -1 24765 },{"bn.js":152,"safe-buffer":160}],156:[function(require,module,exports){ -1 24766 module.exports = function xor (a, b) { -1 24767 var len = a.length -1 24768 var i = -1 -1 24769 while (++i < len) { -1 24770 a[i] ^= b[i] -1 24771 } -1 24772 return a -1 24773 } -1 24774 -1 24775 },{}],157:[function(require,module,exports){ -1 24776 (function (process,global){(function (){ -1 24777 'use strict' -1 24778 -1 24779 // limit of Crypto.getRandomValues() -1 24780 // https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues -1 24781 var MAX_BYTES = 65536 -1 24782 -1 24783 // Node supports requesting up to this number of bytes -1 24784 // https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48 -1 24785 var MAX_UINT32 = 4294967295 -1 24786 -1 24787 function oldBrowser () { -1 24788 throw new Error('Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11') -1 24789 } -1 24790 -1 24791 var Buffer = require('safe-buffer').Buffer -1 24792 var crypto = global.crypto || global.msCrypto -1 24793 -1 24794 if (crypto && crypto.getRandomValues) { -1 24795 module.exports = randomBytes -1 24796 } else { -1 24797 module.exports = oldBrowser -1 24798 } -1 24799 -1 24800 function randomBytes (size, cb) { -1 24801 // phantomjs needs to throw -1 24802 if (size > MAX_UINT32) throw new RangeError('requested too many random bytes') -1 24803 -1 24804 var bytes = Buffer.allocUnsafe(size) -1 24805 -1 24806 if (size > 0) { // getRandomValues fails on IE if size == 0 -1 24807 if (size > MAX_BYTES) { // this is the max bytes crypto.getRandomValues -1 24808 // can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues -1 24809 for (var generated = 0; generated < size; generated += MAX_BYTES) { -1 24810 // buffer.slice automatically checks if the end is past the end of -1 24811 // the buffer so we don't have to here -1 24812 crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES)) -1 24813 } -1 24814 } else { -1 24815 crypto.getRandomValues(bytes) -1 24816 } -1 24817 } -1 24818 -1 24819 if (typeof cb === 'function') { -1 24820 return process.nextTick(function () { -1 24821 cb(null, bytes) -1 24822 }) -1 24823 } -1 24824 -1 24825 return bytes -1 24826 } -1 24827 -1 24828 }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -1 24829 },{"_process":149,"safe-buffer":160}],158:[function(require,module,exports){ -1 24830 (function (process,global){(function (){ -1 24831 'use strict' -1 24832 -1 24833 function oldBrowser () { -1 24834 throw new Error('secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11') -1 24835 } -1 24836 var safeBuffer = require('safe-buffer') -1 24837 var randombytes = require('randombytes') -1 24838 var Buffer = safeBuffer.Buffer -1 24839 var kBufferMaxLength = safeBuffer.kMaxLength -1 24840 var crypto = global.crypto || global.msCrypto -1 24841 var kMaxUint32 = Math.pow(2, 32) - 1 -1 24842 function assertOffset (offset, length) { -1 24843 if (typeof offset !== 'number' || offset !== offset) { // eslint-disable-line no-self-compare -1 24844 throw new TypeError('offset must be a number') -1 24845 } -1 24846 -1 24847 if (offset > kMaxUint32 || offset < 0) { -1 24848 throw new TypeError('offset must be a uint32') -1 24849 } -1 24850 -1 24851 if (offset > kBufferMaxLength || offset > length) { -1 24852 throw new RangeError('offset out of range') -1 24853 } -1 24854 } -1 24855 -1 24856 function assertSize (size, offset, length) { -1 24857 if (typeof size !== 'number' || size !== size) { // eslint-disable-line no-self-compare -1 24858 throw new TypeError('size must be a number') -1 24859 } -1 24860 -1 24861 if (size > kMaxUint32 || size < 0) { -1 24862 throw new TypeError('size must be a uint32') -1 24863 } -1 24864 -1 24865 if (size + offset > length || size > kBufferMaxLength) { -1 24866 throw new RangeError('buffer too small') -1 24867 } -1 24868 } -1 24869 if ((crypto && crypto.getRandomValues) || !process.browser) { -1 24870 exports.randomFill = randomFill -1 24871 exports.randomFillSync = randomFillSync -1 24872 } else { -1 24873 exports.randomFill = oldBrowser -1 24874 exports.randomFillSync = oldBrowser -1 24875 } -1 24876 function randomFill (buf, offset, size, cb) { -1 24877 if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) { -1 24878 throw new TypeError('"buf" argument must be a Buffer or Uint8Array') -1 24879 } -1 24880 -1 24881 if (typeof offset === 'function') { -1 24882 cb = offset -1 24883 offset = 0 -1 24884 size = buf.length -1 24885 } else if (typeof size === 'function') { -1 24886 cb = size -1 24887 size = buf.length - offset -1 24888 } else if (typeof cb !== 'function') { -1 24889 throw new TypeError('"cb" argument must be a function') -1 24890 } -1 24891 assertOffset(offset, buf.length) -1 24892 assertSize(size, offset, buf.length) -1 24893 return actualFill(buf, offset, size, cb) -1 24894 } -1 24895 -1 24896 function actualFill (buf, offset, size, cb) { -1 24897 if (process.browser) { -1 24898 var ourBuf = buf.buffer -1 24899 var uint = new Uint8Array(ourBuf, offset, size) -1 24900 crypto.getRandomValues(uint) -1 24901 if (cb) { -1 24902 process.nextTick(function () { -1 24903 cb(null, buf) -1 24904 }) -1 24905 return -1 24906 } -1 24907 return buf -1 24908 } -1 24909 if (cb) { -1 24910 randombytes(size, function (err, bytes) { -1 24911 if (err) { -1 24912 return cb(err) -1 24913 } -1 24914 bytes.copy(buf, offset) -1 24915 cb(null, buf) -1 24916 }) -1 24917 return -1 24918 } -1 24919 var bytes = randombytes(size) -1 24920 bytes.copy(buf, offset) -1 24921 return buf -1 24922 } -1 24923 function randomFillSync (buf, offset, size) { -1 24924 if (typeof offset === 'undefined') { -1 24925 offset = 0 -1 24926 } -1 24927 if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) { -1 24928 throw new TypeError('"buf" argument must be a Buffer or Uint8Array') -1 24929 } -1 24930 -1 24931 assertOffset(offset, buf.length) -1 24932 -1 24933 if (size === undefined) size = buf.length - offset -1 24934 -1 24935 assertSize(size, offset, buf.length) -1 24936 -1 24937 return actualFill(buf, offset, size) -1 24938 } -1 24939 -1 24940 }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -1 24941 },{"_process":149,"randombytes":157,"safe-buffer":160}],159:[function(require,module,exports){ -1 24942 'use strict' -1 24943 var Buffer = require('buffer').Buffer -1 24944 var inherits = require('inherits') -1 24945 var HashBase = require('hash-base') -1 24946 -1 24947 var ARRAY16 = new Array(16) -1 24948 -1 24949 var zl = [ -1 24950 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, -1 24951 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, -1 24952 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, -1 24953 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, -1 24954 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 -1 24955 ] -1 24956 -1 24957 var zr = [ -1 24958 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, -1 24959 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, -1 24960 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, -1 24961 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, -1 24962 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 -1 24963 ] -1 24964 -1 24965 var sl = [ -1 24966 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, -1 24967 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, -1 24968 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, -1 24969 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, -1 24970 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 -1 24971 ] -1 24972 -1 24973 var sr = [ -1 24974 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, -1 24975 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, -1 24976 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, -1 24977 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, -1 24978 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 -1 24979 ] -1 24980 -1 24981 var hl = [0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e] -1 24982 var hr = [0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000] -1 24983 -1 24984 function RIPEMD160 () { -1 24985 HashBase.call(this, 64) -1 24986 -1 24987 // state -1 24988 this._a = 0x67452301 -1 24989 this._b = 0xefcdab89 -1 24990 this._c = 0x98badcfe -1 24991 this._d = 0x10325476 -1 24992 this._e = 0xc3d2e1f0 -1 24993 } -1 24994 -1 24995 inherits(RIPEMD160, HashBase) -1 24996 -1 24997 RIPEMD160.prototype._update = function () { -1 24998 var words = ARRAY16 -1 24999 for (var j = 0; j < 16; ++j) words[j] = this._block.readInt32LE(j * 4) -1 25000 -1 25001 var al = this._a | 0 -1 25002 var bl = this._b | 0 -1 25003 var cl = this._c | 0 -1 25004 var dl = this._d | 0 -1 25005 var el = this._e | 0 -1 25006 -1 25007 var ar = this._a | 0 -1 25008 var br = this._b | 0 -1 25009 var cr = this._c | 0 -1 25010 var dr = this._d | 0 -1 25011 var er = this._e | 0 -1 25012 -1 25013 // computation -1 25014 for (var i = 0; i < 80; i += 1) { -1 25015 var tl -1 25016 var tr -1 25017 if (i < 16) { -1 25018 tl = fn1(al, bl, cl, dl, el, words[zl[i]], hl[0], sl[i]) -1 25019 tr = fn5(ar, br, cr, dr, er, words[zr[i]], hr[0], sr[i]) -1 25020 } else if (i < 32) { -1 25021 tl = fn2(al, bl, cl, dl, el, words[zl[i]], hl[1], sl[i]) -1 25022 tr = fn4(ar, br, cr, dr, er, words[zr[i]], hr[1], sr[i]) -1 25023 } else if (i < 48) { -1 25024 tl = fn3(al, bl, cl, dl, el, words[zl[i]], hl[2], sl[i]) -1 25025 tr = fn3(ar, br, cr, dr, er, words[zr[i]], hr[2], sr[i]) -1 25026 } else if (i < 64) { -1 25027 tl = fn4(al, bl, cl, dl, el, words[zl[i]], hl[3], sl[i]) -1 25028 tr = fn2(ar, br, cr, dr, er, words[zr[i]], hr[3], sr[i]) -1 25029 } else { // if (i<80) { -1 25030 tl = fn5(al, bl, cl, dl, el, words[zl[i]], hl[4], sl[i]) -1 25031 tr = fn1(ar, br, cr, dr, er, words[zr[i]], hr[4], sr[i]) -1 25032 } -1 25033 -1 25034 al = el -1 25035 el = dl -1 25036 dl = rotl(cl, 10) -1 25037 cl = bl -1 25038 bl = tl -1 25039 -1 25040 ar = er -1 25041 er = dr -1 25042 dr = rotl(cr, 10) -1 25043 cr = br -1 25044 br = tr -1 25045 } -1 25046 -1 25047 // update state -1 25048 var t = (this._b + cl + dr) | 0 -1 25049 this._b = (this._c + dl + er) | 0 -1 25050 this._c = (this._d + el + ar) | 0 -1 25051 this._d = (this._e + al + br) | 0 -1 25052 this._e = (this._a + bl + cr) | 0 -1 25053 this._a = t -1 25054 } -1 25055 -1 25056 RIPEMD160.prototype._digest = function () { -1 25057 // create padding and handle blocks -1 25058 this._block[this._blockOffset++] = 0x80 -1 25059 if (this._blockOffset > 56) { -1 25060 this._block.fill(0, this._blockOffset, 64) -1 25061 this._update() -1 25062 this._blockOffset = 0 -1 25063 } -1 25064 -1 25065 this._block.fill(0, this._blockOffset, 56) -1 25066 this._block.writeUInt32LE(this._length[0], 56) -1 25067 this._block.writeUInt32LE(this._length[1], 60) -1 25068 this._update() -1 25069 -1 25070 // produce result -1 25071 var buffer = Buffer.alloc ? Buffer.alloc(20) : new Buffer(20) -1 25072 buffer.writeInt32LE(this._a, 0) -1 25073 buffer.writeInt32LE(this._b, 4) -1 25074 buffer.writeInt32LE(this._c, 8) -1 25075 buffer.writeInt32LE(this._d, 12) -1 25076 buffer.writeInt32LE(this._e, 16) -1 25077 return buffer -1 25078 } -1 25079 -1 25080 function rotl (x, n) { -1 25081 return (x << n) | (x >>> (32 - n)) -1 25082 } -1 25083 -1 25084 function fn1 (a, b, c, d, e, m, k, s) { -1 25085 return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0 -1 25086 } -1 25087 -1 25088 function fn2 (a, b, c, d, e, m, k, s) { -1 25089 return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + e) | 0 -1 25090 } -1 25091 -1 25092 function fn3 (a, b, c, d, e, m, k, s) { -1 25093 return (rotl((a + ((b | (~c)) ^ d) + m + k) | 0, s) + e) | 0 -1 25094 } -1 25095 -1 25096 function fn4 (a, b, c, d, e, m, k, s) { -1 25097 return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + e) | 0 -1 25098 } -1 25099 -1 25100 function fn5 (a, b, c, d, e, m, k, s) { -1 25101 return (rotl((a + (b ^ (c | (~d))) + m + k) | 0, s) + e) | 0 -1 25102 } -1 25103 -1 25104 module.exports = RIPEMD160 -1 25105 -1 25106 },{"buffer":63,"hash-base":102,"inherits":132}],160:[function(require,module,exports){ -1 25107 /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ -1 25108 /* eslint-disable node/no-deprecated-api */ -1 25109 var buffer = require('buffer') -1 25110 var Buffer = buffer.Buffer -1 25111 -1 25112 // alternative to using Object.keys for old browsers -1 25113 function copyProps (src, dst) { -1 25114 for (var key in src) { -1 25115 dst[key] = src[key] -1 25116 } -1 25117 } -1 25118 if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { -1 25119 module.exports = buffer -1 25120 } else { -1 25121 // Copy properties from require('buffer') -1 25122 copyProps(buffer, exports) -1 25123 exports.Buffer = SafeBuffer -1 25124 } -1 25125 -1 25126 function SafeBuffer (arg, encodingOrOffset, length) { -1 25127 return Buffer(arg, encodingOrOffset, length) -1 25128 } -1 25129 -1 25130 SafeBuffer.prototype = Object.create(Buffer.prototype) -1 25131 -1 25132 // Copy static methods from Buffer -1 25133 copyProps(Buffer, SafeBuffer) -1 25134 -1 25135 SafeBuffer.from = function (arg, encodingOrOffset, length) { -1 25136 if (typeof arg === 'number') { -1 25137 throw new TypeError('Argument must not be a number') -1 25138 } -1 25139 return Buffer(arg, encodingOrOffset, length) -1 25140 } -1 25141 -1 25142 SafeBuffer.alloc = function (size, fill, encoding) { -1 25143 if (typeof size !== 'number') { -1 25144 throw new TypeError('Argument must be a number') -1 25145 } -1 25146 var buf = Buffer(size) -1 25147 if (fill !== undefined) { -1 25148 if (typeof encoding === 'string') { -1 25149 buf.fill(fill, encoding) -1 25150 } else { -1 25151 buf.fill(fill) -1 25152 } -1 25153 } else { -1 25154 buf.fill(0) -1 25155 } -1 25156 return buf -1 25157 } -1 25158 -1 25159 SafeBuffer.allocUnsafe = function (size) { -1 25160 if (typeof size !== 'number') { -1 25161 throw new TypeError('Argument must be a number') -1 25162 } -1 25163 return Buffer(size) -1 25164 } -1 25165 -1 25166 SafeBuffer.allocUnsafeSlow = function (size) { -1 25167 if (typeof size !== 'number') { -1 25168 throw new TypeError('Argument must be a number') -1 25169 } -1 25170 return buffer.SlowBuffer(size) -1 25171 } -1 25172 -1 25173 },{"buffer":63}],161:[function(require,module,exports){ -1 25174 (function (process){(function (){ -1 25175 /* eslint-disable node/no-deprecated-api */ -1 25176 -1 25177 'use strict' -1 25178 -1 25179 var buffer = require('buffer') -1 25180 var Buffer = buffer.Buffer -1 25181 -1 25182 var safer = {} -1 25183 -1 25184 var key -1 25185 -1 25186 for (key in buffer) { -1 25187 if (!buffer.hasOwnProperty(key)) continue -1 25188 if (key === 'SlowBuffer' || key === 'Buffer') continue -1 25189 safer[key] = buffer[key] -1 25190 } -1 25191 -1 25192 var Safer = safer.Buffer = {} -1 25193 for (key in Buffer) { -1 25194 if (!Buffer.hasOwnProperty(key)) continue -1 25195 if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue -1 25196 Safer[key] = Buffer[key] -1 25197 } -1 25198 -1 25199 safer.Buffer.prototype = Buffer.prototype -1 25200 -1 25201 if (!Safer.from || Safer.from === Uint8Array.from) { -1 25202 Safer.from = function (value, encodingOrOffset, length) { -1 25203 if (typeof value === 'number') { -1 25204 throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) -1 25205 } -1 25206 if (value && typeof value.length === 'undefined') { -1 25207 throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) -1 25208 } -1 25209 return Buffer(value, encodingOrOffset, length) -1 25210 } -1 25211 } -1 25212 -1 25213 if (!Safer.alloc) { -1 25214 Safer.alloc = function (size, fill, encoding) { -1 25215 if (typeof size !== 'number') { -1 25216 throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) -1 25217 } -1 25218 if (size < 0 || size >= 2 * (1 << 30)) { -1 25219 throw new RangeError('The value "' + size + '" is invalid for option "size"') -1 25220 } -1 25221 var buf = Buffer(size) -1 25222 if (!fill || fill.length === 0) { -1 25223 buf.fill(0) -1 25224 } else if (typeof encoding === 'string') { -1 25225 buf.fill(fill, encoding) -1 25226 } else { -1 25227 buf.fill(fill) -1 25228 } -1 25229 return buf -1 25230 } -1 25231 } -1 25232 -1 25233 if (!safer.kStringMaxLength) { -1 25234 try { -1 25235 safer.kStringMaxLength = process.binding('buffer').kStringMaxLength -1 25236 } catch (e) { -1 25237 // we can't determine kStringMaxLength in environments where process.binding -1 25238 // is unsupported, so let's not set it -1 25239 } -1 25240 } -1 25241 -1 25242 if (!safer.constants) { -1 25243 safer.constants = { -1 25244 MAX_LENGTH: safer.kMaxLength -1 25245 } -1 25246 if (safer.kStringMaxLength) { -1 25247 safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength -1 25248 } -1 25249 } -1 25250 -1 25251 module.exports = safer -1 25252 -1 25253 }).call(this)}).call(this,require('_process')) -1 25254 },{"_process":149,"buffer":63}],162:[function(require,module,exports){ -1 25255 var Buffer = require('safe-buffer').Buffer -1 25256 -1 25257 // prototype class for hash functions -1 25258 function Hash (blockSize, finalSize) { -1 25259 this._block = Buffer.alloc(blockSize) -1 25260 this._finalSize = finalSize -1 25261 this._blockSize = blockSize -1 25262 this._len = 0 -1 25263 } -1 25264 -1 25265 Hash.prototype.update = function (data, enc) { -1 25266 if (typeof data === 'string') { -1 25267 enc = enc || 'utf8' -1 25268 data = Buffer.from(data, enc) -1 25269 } -1 25270 -1 25271 var block = this._block -1 25272 var blockSize = this._blockSize -1 25273 var length = data.length -1 25274 var accum = this._len -1 25275 -1 25276 for (var offset = 0; offset < length;) { -1 25277 var assigned = accum % blockSize -1 25278 var remainder = Math.min(length - offset, blockSize - assigned) -1 25279 -1 25280 for (var i = 0; i < remainder; i++) { -1 25281 block[assigned + i] = data[offset + i] -1 25282 } -1 25283 -1 25284 accum += remainder -1 25285 offset += remainder -1 25286 -1 25287 if ((accum % blockSize) === 0) { -1 25288 this._update(block) -1 25289 } -1 25290 } -1 25291 -1 25292 this._len += length -1 25293 return this -1 25294 } -1 25295 -1 25296 Hash.prototype.digest = function (enc) { -1 25297 var rem = this._len % this._blockSize -1 25298 -1 25299 this._block[rem] = 0x80 -1 25300 -1 25301 // zero (rem + 1) trailing bits, where (rem + 1) is the smallest -1 25302 // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize -1 25303 this._block.fill(0, rem + 1) -1 25304 -1 25305 if (rem >= this._finalSize) { -1 25306 this._update(this._block) -1 25307 this._block.fill(0) -1 25308 } -1 25309 -1 25310 var bits = this._len * 8 -1 25311 -1 25312 // uint32 -1 25313 if (bits <= 0xffffffff) { -1 25314 this._block.writeUInt32BE(bits, this._blockSize - 4) -1 25315 -1 25316 // uint64 -1 25317 } else { -1 25318 var lowBits = (bits & 0xffffffff) >>> 0 -1 25319 var highBits = (bits - lowBits) / 0x100000000 -1 25320 -1 25321 this._block.writeUInt32BE(highBits, this._blockSize - 8) -1 25322 this._block.writeUInt32BE(lowBits, this._blockSize - 4) -1 25323 } -1 25324 -1 25325 this._update(this._block) -1 25326 var hash = this._hash() -1 25327 -1 25328 return enc ? hash.toString(enc) : hash -1 25329 } -1 25330 -1 25331 Hash.prototype._update = function () { -1 25332 throw new Error('_update must be implemented by subclass') -1 25333 } -1 25334 -1 25335 module.exports = Hash -1 25336 -1 25337 },{"safe-buffer":160}],163:[function(require,module,exports){ -1 25338 var exports = module.exports = function SHA (algorithm) { -1 25339 algorithm = algorithm.toLowerCase() -1 25340 -1 25341 var Algorithm = exports[algorithm] -1 25342 if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)') -1 25343 -1 25344 return new Algorithm() -1 25345 } -1 25346 -1 25347 exports.sha = require('./sha') -1 25348 exports.sha1 = require('./sha1') -1 25349 exports.sha224 = require('./sha224') -1 25350 exports.sha256 = require('./sha256') -1 25351 exports.sha384 = require('./sha384') -1 25352 exports.sha512 = require('./sha512') -1 25353 -1 25354 },{"./sha":164,"./sha1":165,"./sha224":166,"./sha256":167,"./sha384":168,"./sha512":169}],164:[function(require,module,exports){ -1 25355 /* -1 25356 * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined -1 25357 * in FIPS PUB 180-1 -1 25358 * This source code is derived from sha1.js of the same repository. -1 25359 * The difference between SHA-0 and SHA-1 is just a bitwise rotate left -1 25360 * operation was added. -1 25361 */ -1 25362 -1 25363 var inherits = require('inherits') -1 25364 var Hash = require('./hash') -1 25365 var Buffer = require('safe-buffer').Buffer -1 25366 -1 25367 var K = [ -1 25368 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 -1 25369 ] -1 25370 -1 25371 var W = new Array(80) -1 25372 -1 25373 function Sha () { -1 25374 this.init() -1 25375 this._w = W -1 25376 -1 25377 Hash.call(this, 64, 56) -1 25378 } -1 25379 -1 25380 inherits(Sha, Hash) -1 25381 -1 25382 Sha.prototype.init = function () { -1 25383 this._a = 0x67452301 -1 25384 this._b = 0xefcdab89 -1 25385 this._c = 0x98badcfe -1 25386 this._d = 0x10325476 -1 25387 this._e = 0xc3d2e1f0 -1 25388 -1 25389 return this -1 25390 } -1 25391 -1 25392 function rotl5 (num) { -1 25393 return (num << 5) | (num >>> 27) -1 25394 } -1 25395 -1 25396 function rotl30 (num) { -1 25397 return (num << 30) | (num >>> 2) -1 25398 } -1 25399 -1 25400 function ft (s, b, c, d) { -1 25401 if (s === 0) return (b & c) | ((~b) & d) -1 25402 if (s === 2) return (b & c) | (b & d) | (c & d) -1 25403 return b ^ c ^ d -1 25404 } 5420 254055421 -1 exports.scoped = [5422 -1 'main *',5423 -1 // https://www.w3.org/TR/html/dom.html#sectioning-content-25424 -1 'article *', 'aside *', 'nav *', 'section *',5425 -1 // https://www.w3.org/TR/html/sections.html#sectioning-roots5426 -1 'blockquote *', 'details *', 'dialog *', 'fieldset *', 'figure *', 'td *',5427 -1 ].join(',');-1 25406 Sha.prototype._update = function (M) { -1 25407 var W = this._w 5428 254085429 -1 var getSubRoles = function(role) {5430 -1 var children = (exports.roles[role] || {}).childRoles || [];5431 -1 var descendents = children.map(getSubRoles);-1 25409 var a = this._a | 0 -1 25410 var b = this._b | 0 -1 25411 var c = this._c | 0 -1 25412 var d = this._d | 0 -1 25413 var e = this._e | 0 5432 254145433 -1 var result = [role];-1 25415 for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) -1 25416 for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16] 5434 254175435 -1 descendents.forEach(function(list) {5436 -1 list.forEach(function(r) {5437 -1 if (!result.includes(r)) {5438 -1 result.push(r);5439 -1 }5440 -1 });5441 -1 });-1 25418 for (var j = 0; j < 80; ++j) { -1 25419 var s = ~~(j / 20) -1 25420 var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 5442 254215443 -1 return result;5444 -1 };-1 25422 e = d -1 25423 d = c -1 25424 c = rotl30(b) -1 25425 b = a -1 25426 a = t -1 25427 } 5445 254285446 -1 exports.attrsWithDefaults = [];-1 25429 this._a = (a + this._a) | 0 -1 25430 this._b = (b + this._b) | 0 -1 25431 this._c = (c + this._c) | 0 -1 25432 this._d = (d + this._d) | 0 -1 25433 this._e = (e + this._e) | 0 -1 25434 } 5447 254355448 -1 for (var role in exports.roles) {5449 -1 exports.roles[role].subRoles = getSubRoles(role);5450 -1 for (var key in exports.roles[role].defaults) {5451 -1 if (!exports.attrsWithDefaults.includes(key)) {5452 -1 exports.attrsWithDefaults.push(key);5453 -1 }5454 -1 }-1 25436 Sha.prototype._hash = function () { -1 25437 var H = Buffer.allocUnsafe(20) -1 25438 -1 25439 H.writeInt32BE(this._a | 0, 0) -1 25440 H.writeInt32BE(this._b | 0, 4) -1 25441 H.writeInt32BE(this._c | 0, 8) -1 25442 H.writeInt32BE(this._d | 0, 12) -1 25443 H.writeInt32BE(this._e | 0, 16) -1 25444 -1 25445 return H 5455 25446 }5456 -1 exports.roles['none'] = exports.roles['none'] || {};5457 -1 exports.roles['none'].subRoles = ['none', 'presentation'];5458 -1 exports.roles['presentation'] = exports.roles['presentation'] || {};5459 -1 exports.roles['presentation'].subRoles = ['presentation', 'none'];5460 254475461 -1 exports.nameFromDescendant = {5462 -1 'figure': 'figcaption',5463 -1 'table': 'caption',5464 -1 'fieldset': 'legend',5465 -1 };-1 25448 module.exports = Sha 5466 254495467 -1 exports.nameDefaults = {5468 -1 'input[type="submit"]': 'Submit',5469 -1 'input[type="reset"]': 'Reset',5470 -1 'summary': 'Details',5471 -1 };-1 25450 },{"./hash":162,"inherits":132,"safe-buffer":160}],165:[function(require,module,exports){ -1 25451 /* -1 25452 * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined -1 25453 * in FIPS PUB 180-1 -1 25454 * Version 2.1a Copyright Paul Johnston 2000 - 2002. -1 25455 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet -1 25456 * Distributed under the BSD License -1 25457 * See http://pajhome.org.uk/crypt/md5 for details. -1 25458 */ 5472 254595473 -1 exports.labelable = [5474 -1 'button',5475 -1 'input:not([type="hidden"])',5476 -1 'keygen',5477 -1 'meter',5478 -1 'output',5479 -1 'progress',5480 -1 'select',5481 -1 'textarea',5482 -1 ];-1 25460 var inherits = require('inherits') -1 25461 var Hash = require('./hash') -1 25462 var Buffer = require('safe-buffer').Buffer 5483 254635484 -1 },{}],11:[function(require,module,exports){5485 -1 var constants = require('./constants.js');5486 -1 var atree = require('./atree.js');5487 -1 var query = require('./query.js');-1 25464 var K = [ -1 25465 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0 -1 25466 ] 5488 254675489 -1 var getPseudoContent = function(node, selector) {5490 -1 var styles = window.getComputedStyle(node, selector);5491 -1 var ret = styles.getPropertyValue('content');5492 -1 var inline = styles.display.substr(0, 6) === 'inline';5493 -1 if (!ret) {5494 -1 return '';5495 -1 }5496 -1 if (ret.substr(0, 1) !== '"') {5497 -1 return '';5498 -1 } else {5499 -1 if (inline) {5500 -1 return ret.slice(1, -1);5501 -1 } else {5502 -1 return ' ' + ret.slice(1, -1) + ' ';5503 -1 }5504 -1 }5505 -1 };-1 25468 var W = new Array(80) 5506 254695507 -1 var getContent = function(root, visited) {5508 -1 var children = atree.getChildNodes(root);-1 25470 function Sha1 () { -1 25471 this.init() -1 25472 this._w = W 5509 254735510 -1 var ret = '';5511 -1 for (var i = 0; i < children.length; i++) {5512 -1 var node = children[i];5513 -1 if (node.nodeType === node.TEXT_NODE) {5514 -1 ret += node.textContent;5515 -1 } else if (node.nodeType === node.ELEMENT_NODE) {5516 -1 if (node.tagName.toLowerCase() === 'br') {5517 -1 ret += '\n';5518 -1 } else if (window.getComputedStyle(node).display.substr(0, 6) === 'inline' &&5519 -1 node.tagName.toLowerCase() !== 'input' &&5520 -1 node.tagName.toLowerCase() !== 'img') { // https://github.com/w3c/accname/issues/35521 -1 ret += getName(node, true, visited);5522 -1 } else {5523 -1 ret += ' ' + getName(node, true, visited) + ' ';5524 -1 }5525 -1 }5526 -1 }-1 25474 Hash.call(this, 64, 56) -1 25475 } 5527 254765528 -1 return ret;5529 -1 };-1 25477 inherits(Sha1, Hash) 5530 254785531 -1 var allowNameFromContent = function(el) {5532 -1 var role = query.getRole(el);5533 -1 return (constants.roles[role] || {}).nameFromContents;5534 -1 };-1 25479 Sha1.prototype.init = function () { -1 25480 this._a = 0x67452301 -1 25481 this._b = 0xefcdab89 -1 25482 this._c = 0x98badcfe -1 25483 this._d = 0x10325476 -1 25484 this._e = 0xc3d2e1f0 5535 254855536 -1 var isLabelable = function(el) {5537 -1 var selector = constants.labelable.join(',');5538 -1 return el.matches(selector);5539 -1 };-1 25486 return this -1 25487 } 5540 254885541 -1 var isInLabelForOtherWidget = function(el) {5542 -1 var label = el.parentElement.closest('label');5543 -1 return label && !Array.prototype.includes.call(el.labels, label);5544 -1 };-1 25489 function rotl1 (num) { -1 25490 return (num << 1) | (num >>> 31) -1 25491 } 5545 254925546 -1 var getName = function(el, recursive, visited, directReference) {5547 -1 var ret = '';-1 25493 function rotl5 (num) { -1 25494 return (num << 5) | (num >>> 27) -1 25495 } 5548 254965549 -1 visited = visited || [];5550 -1 if (visited.includes(el)) {5551 -1 if (!directReference) {5552 -1 return '';5553 -1 }5554 -1 } else {5555 -1 visited.push(el);5556 -1 }-1 25497 function rotl30 (num) { -1 25498 return (num << 30) | (num >>> 2) -1 25499 } 5557 255005558 -1 // A5559 -1 // handled in atree-1 25501 function ft (s, b, c, d) { -1 25502 if (s === 0) return (b & c) | ((~b) & d) -1 25503 if (s === 2) return (b & c) | (b & d) | (c & d) -1 25504 return b ^ c ^ d -1 25505 } -1 25506 -1 25507 Sha1.prototype._update = function (M) { -1 25508 var W = this._w -1 25509 -1 25510 var a = this._a | 0 -1 25511 var b = this._b | 0 -1 25512 var c = this._c | 0 -1 25513 var d = this._d | 0 -1 25514 var e = this._e | 0 -1 25515 -1 25516 for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) -1 25517 for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]) -1 25518 -1 25519 for (var j = 0; j < 80; ++j) { -1 25520 var s = ~~(j / 20) -1 25521 var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0 -1 25522 -1 25523 e = d -1 25524 d = c -1 25525 c = rotl30(b) -1 25526 b = a -1 25527 a = t -1 25528 } -1 25529 -1 25530 this._a = (a + this._a) | 0 -1 25531 this._b = (b + this._b) | 0 -1 25532 this._c = (c + this._c) | 0 -1 25533 this._d = (d + this._d) | 0 -1 25534 this._e = (e + this._e) | 0 -1 25535 } -1 25536 -1 25537 Sha1.prototype._hash = function () { -1 25538 var H = Buffer.allocUnsafe(20) -1 25539 -1 25540 H.writeInt32BE(this._a | 0, 0) -1 25541 H.writeInt32BE(this._b | 0, 4) -1 25542 H.writeInt32BE(this._c | 0, 8) -1 25543 H.writeInt32BE(this._d | 0, 12) -1 25544 H.writeInt32BE(this._e | 0, 16) -1 25545 -1 25546 return H -1 25547 } -1 25548 -1 25549 module.exports = Sha1 -1 25550 -1 25551 },{"./hash":162,"inherits":132,"safe-buffer":160}],166:[function(require,module,exports){ -1 25552 /** -1 25553 * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined -1 25554 * in FIPS 180-2 -1 25555 * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. -1 25556 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet -1 25557 * -1 25558 */ -1 25559 -1 25560 var inherits = require('inherits') -1 25561 var Sha256 = require('./sha256') -1 25562 var Hash = require('./hash') -1 25563 var Buffer = require('safe-buffer').Buffer -1 25564 -1 25565 var W = new Array(64) -1 25566 -1 25567 function Sha224 () { -1 25568 this.init() -1 25569 -1 25570 this._w = W // new Array(64) -1 25571 -1 25572 Hash.call(this, 64, 56) -1 25573 } -1 25574 -1 25575 inherits(Sha224, Sha256) -1 25576 -1 25577 Sha224.prototype.init = function () { -1 25578 this._a = 0xc1059ed8 -1 25579 this._b = 0x367cd507 -1 25580 this._c = 0x3070dd17 -1 25581 this._d = 0xf70e5939 -1 25582 this._e = 0xffc00b31 -1 25583 this._f = 0x68581511 -1 25584 this._g = 0x64f98fa7 -1 25585 this._h = 0xbefa4fa4 -1 25586 -1 25587 return this -1 25588 } -1 25589 -1 25590 Sha224.prototype._hash = function () { -1 25591 var H = Buffer.allocUnsafe(28) -1 25592 -1 25593 H.writeInt32BE(this._a, 0) -1 25594 H.writeInt32BE(this._b, 4) -1 25595 H.writeInt32BE(this._c, 8) -1 25596 H.writeInt32BE(this._d, 12) -1 25597 H.writeInt32BE(this._e, 16) -1 25598 H.writeInt32BE(this._f, 20) -1 25599 H.writeInt32BE(this._g, 24) -1 25600 -1 25601 return H -1 25602 } -1 25603 -1 25604 module.exports = Sha224 -1 25605 -1 25606 },{"./hash":162,"./sha256":167,"inherits":132,"safe-buffer":160}],167:[function(require,module,exports){ -1 25607 /** -1 25608 * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined -1 25609 * in FIPS 180-2 -1 25610 * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. -1 25611 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet -1 25612 * -1 25613 */ -1 25614 -1 25615 var inherits = require('inherits') -1 25616 var Hash = require('./hash') -1 25617 var Buffer = require('safe-buffer').Buffer -1 25618 -1 25619 var K = [ -1 25620 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, -1 25621 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, -1 25622 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, -1 25623 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, -1 25624 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, -1 25625 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, -1 25626 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, -1 25627 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, -1 25628 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, -1 25629 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, -1 25630 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, -1 25631 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, -1 25632 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, -1 25633 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, -1 25634 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, -1 25635 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 -1 25636 ] -1 25637 -1 25638 var W = new Array(64) -1 25639 -1 25640 function Sha256 () { -1 25641 this.init() -1 25642 -1 25643 this._w = W // new Array(64) -1 25644 -1 25645 Hash.call(this, 64, 56) -1 25646 } -1 25647 -1 25648 inherits(Sha256, Hash) -1 25649 -1 25650 Sha256.prototype.init = function () { -1 25651 this._a = 0x6a09e667 -1 25652 this._b = 0xbb67ae85 -1 25653 this._c = 0x3c6ef372 -1 25654 this._d = 0xa54ff53a -1 25655 this._e = 0x510e527f -1 25656 this._f = 0x9b05688c -1 25657 this._g = 0x1f83d9ab -1 25658 this._h = 0x5be0cd19 -1 25659 -1 25660 return this -1 25661 } -1 25662 -1 25663 function ch (x, y, z) { -1 25664 return z ^ (x & (y ^ z)) -1 25665 } -1 25666 -1 25667 function maj (x, y, z) { -1 25668 return (x & y) | (z & (x | y)) -1 25669 } -1 25670 -1 25671 function sigma0 (x) { -1 25672 return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10) -1 25673 } -1 25674 -1 25675 function sigma1 (x) { -1 25676 return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7) -1 25677 } -1 25678 -1 25679 function gamma0 (x) { -1 25680 return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3) -1 25681 } -1 25682 -1 25683 function gamma1 (x) { -1 25684 return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10) -1 25685 } -1 25686 -1 25687 Sha256.prototype._update = function (M) { -1 25688 var W = this._w -1 25689 -1 25690 var a = this._a | 0 -1 25691 var b = this._b | 0 -1 25692 var c = this._c | 0 -1 25693 var d = this._d | 0 -1 25694 var e = this._e | 0 -1 25695 var f = this._f | 0 -1 25696 var g = this._g | 0 -1 25697 var h = this._h | 0 -1 25698 -1 25699 for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4) -1 25700 for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0 -1 25701 -1 25702 for (var j = 0; j < 64; ++j) { -1 25703 var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0 -1 25704 var T2 = (sigma0(a) + maj(a, b, c)) | 0 -1 25705 -1 25706 h = g -1 25707 g = f -1 25708 f = e -1 25709 e = (d + T1) | 0 -1 25710 d = c -1 25711 c = b -1 25712 b = a -1 25713 a = (T1 + T2) | 0 -1 25714 } -1 25715 -1 25716 this._a = (a + this._a) | 0 -1 25717 this._b = (b + this._b) | 0 -1 25718 this._c = (c + this._c) | 0 -1 25719 this._d = (d + this._d) | 0 -1 25720 this._e = (e + this._e) | 0 -1 25721 this._f = (f + this._f) | 0 -1 25722 this._g = (g + this._g) | 0 -1 25723 this._h = (h + this._h) | 0 -1 25724 } -1 25725 -1 25726 Sha256.prototype._hash = function () { -1 25727 var H = Buffer.allocUnsafe(32) -1 25728 -1 25729 H.writeInt32BE(this._a, 0) -1 25730 H.writeInt32BE(this._b, 4) -1 25731 H.writeInt32BE(this._c, 8) -1 25732 H.writeInt32BE(this._d, 12) -1 25733 H.writeInt32BE(this._e, 16) -1 25734 H.writeInt32BE(this._f, 20) -1 25735 H.writeInt32BE(this._g, 24) -1 25736 H.writeInt32BE(this._h, 28) -1 25737 -1 25738 return H -1 25739 } -1 25740 -1 25741 module.exports = Sha256 -1 25742 -1 25743 },{"./hash":162,"inherits":132,"safe-buffer":160}],168:[function(require,module,exports){ -1 25744 var inherits = require('inherits') -1 25745 var SHA512 = require('./sha512') -1 25746 var Hash = require('./hash') -1 25747 var Buffer = require('safe-buffer').Buffer -1 25748 -1 25749 var W = new Array(160) -1 25750 -1 25751 function Sha384 () { -1 25752 this.init() -1 25753 this._w = W -1 25754 -1 25755 Hash.call(this, 128, 112) -1 25756 } -1 25757 -1 25758 inherits(Sha384, SHA512) -1 25759 -1 25760 Sha384.prototype.init = function () { -1 25761 this._ah = 0xcbbb9d5d -1 25762 this._bh = 0x629a292a -1 25763 this._ch = 0x9159015a -1 25764 this._dh = 0x152fecd8 -1 25765 this._eh = 0x67332667 -1 25766 this._fh = 0x8eb44a87 -1 25767 this._gh = 0xdb0c2e0d -1 25768 this._hh = 0x47b5481d -1 25769 -1 25770 this._al = 0xc1059ed8 -1 25771 this._bl = 0x367cd507 -1 25772 this._cl = 0x3070dd17 -1 25773 this._dl = 0xf70e5939 -1 25774 this._el = 0xffc00b31 -1 25775 this._fl = 0x68581511 -1 25776 this._gl = 0x64f98fa7 -1 25777 this._hl = 0xbefa4fa4 -1 25778 -1 25779 return this -1 25780 } -1 25781 -1 25782 Sha384.prototype._hash = function () { -1 25783 var H = Buffer.allocUnsafe(48) -1 25784 -1 25785 function writeInt64BE (h, l, offset) { -1 25786 H.writeInt32BE(h, offset) -1 25787 H.writeInt32BE(l, offset + 4) -1 25788 } -1 25789 -1 25790 writeInt64BE(this._ah, this._al, 0) -1 25791 writeInt64BE(this._bh, this._bl, 8) -1 25792 writeInt64BE(this._ch, this._cl, 16) -1 25793 writeInt64BE(this._dh, this._dl, 24) -1 25794 writeInt64BE(this._eh, this._el, 32) -1 25795 writeInt64BE(this._fh, this._fl, 40) -1 25796 -1 25797 return H -1 25798 } -1 25799 -1 25800 module.exports = Sha384 -1 25801 -1 25802 },{"./hash":162,"./sha512":169,"inherits":132,"safe-buffer":160}],169:[function(require,module,exports){ -1 25803 var inherits = require('inherits') -1 25804 var Hash = require('./hash') -1 25805 var Buffer = require('safe-buffer').Buffer -1 25806 -1 25807 var K = [ -1 25808 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, -1 25809 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, -1 25810 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, -1 25811 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, -1 25812 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, -1 25813 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, -1 25814 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, -1 25815 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, -1 25816 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, -1 25817 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, -1 25818 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, -1 25819 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, -1 25820 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, -1 25821 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, -1 25822 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, -1 25823 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, -1 25824 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, -1 25825 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, -1 25826 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, -1 25827 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, -1 25828 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, -1 25829 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, -1 25830 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, -1 25831 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, -1 25832 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, -1 25833 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, -1 25834 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, -1 25835 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, -1 25836 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, -1 25837 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, -1 25838 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, -1 25839 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, -1 25840 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, -1 25841 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, -1 25842 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, -1 25843 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, -1 25844 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, -1 25845 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, -1 25846 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, -1 25847 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 -1 25848 ] -1 25849 -1 25850 var W = new Array(160) -1 25851 -1 25852 function Sha512 () { -1 25853 this.init() -1 25854 this._w = W -1 25855 -1 25856 Hash.call(this, 128, 112) -1 25857 } -1 25858 -1 25859 inherits(Sha512, Hash) -1 25860 -1 25861 Sha512.prototype.init = function () { -1 25862 this._ah = 0x6a09e667 -1 25863 this._bh = 0xbb67ae85 -1 25864 this._ch = 0x3c6ef372 -1 25865 this._dh = 0xa54ff53a -1 25866 this._eh = 0x510e527f -1 25867 this._fh = 0x9b05688c -1 25868 this._gh = 0x1f83d9ab -1 25869 this._hh = 0x5be0cd19 -1 25870 -1 25871 this._al = 0xf3bcc908 -1 25872 this._bl = 0x84caa73b -1 25873 this._cl = 0xfe94f82b -1 25874 this._dl = 0x5f1d36f1 -1 25875 this._el = 0xade682d1 -1 25876 this._fl = 0x2b3e6c1f -1 25877 this._gl = 0xfb41bd6b -1 25878 this._hl = 0x137e2179 -1 25879 -1 25880 return this -1 25881 } -1 25882 -1 25883 function Ch (x, y, z) { -1 25884 return z ^ (x & (y ^ z)) -1 25885 } -1 25886 -1 25887 function maj (x, y, z) { -1 25888 return (x & y) | (z & (x | y)) -1 25889 } -1 25890 -1 25891 function sigma0 (x, xl) { -1 25892 return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25) -1 25893 } -1 25894 -1 25895 function sigma1 (x, xl) { -1 25896 return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23) -1 25897 } -1 25898 -1 25899 function Gamma0 (x, xl) { -1 25900 return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7) -1 25901 } -1 25902 -1 25903 function Gamma0l (x, xl) { -1 25904 return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25) -1 25905 } -1 25906 -1 25907 function Gamma1 (x, xl) { -1 25908 return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6) -1 25909 } -1 25910 -1 25911 function Gamma1l (x, xl) { -1 25912 return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26) -1 25913 } -1 25914 -1 25915 function getCarry (a, b) { -1 25916 return (a >>> 0) < (b >>> 0) ? 1 : 0 -1 25917 } -1 25918 -1 25919 Sha512.prototype._update = function (M) { -1 25920 var W = this._w -1 25921 -1 25922 var ah = this._ah | 0 -1 25923 var bh = this._bh | 0 -1 25924 var ch = this._ch | 0 -1 25925 var dh = this._dh | 0 -1 25926 var eh = this._eh | 0 -1 25927 var fh = this._fh | 0 -1 25928 var gh = this._gh | 0 -1 25929 var hh = this._hh | 0 -1 25930 -1 25931 var al = this._al | 0 -1 25932 var bl = this._bl | 0 -1 25933 var cl = this._cl | 0 -1 25934 var dl = this._dl | 0 -1 25935 var el = this._el | 0 -1 25936 var fl = this._fl | 0 -1 25937 var gl = this._gl | 0 -1 25938 var hl = this._hl | 0 -1 25939 -1 25940 for (var i = 0; i < 32; i += 2) { -1 25941 W[i] = M.readInt32BE(i * 4) -1 25942 W[i + 1] = M.readInt32BE(i * 4 + 4) -1 25943 } -1 25944 for (; i < 160; i += 2) { -1 25945 var xh = W[i - 15 * 2] -1 25946 var xl = W[i - 15 * 2 + 1] -1 25947 var gamma0 = Gamma0(xh, xl) -1 25948 var gamma0l = Gamma0l(xl, xh) -1 25949 -1 25950 xh = W[i - 2 * 2] -1 25951 xl = W[i - 2 * 2 + 1] -1 25952 var gamma1 = Gamma1(xh, xl) -1 25953 var gamma1l = Gamma1l(xl, xh) -1 25954 -1 25955 // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] -1 25956 var Wi7h = W[i - 7 * 2] -1 25957 var Wi7l = W[i - 7 * 2 + 1] -1 25958 -1 25959 var Wi16h = W[i - 16 * 2] -1 25960 var Wi16l = W[i - 16 * 2 + 1] -1 25961 -1 25962 var Wil = (gamma0l + Wi7l) | 0 -1 25963 var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0 -1 25964 Wil = (Wil + gamma1l) | 0 -1 25965 Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0 -1 25966 Wil = (Wil + Wi16l) | 0 -1 25967 Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0 -1 25968 -1 25969 W[i] = Wih -1 25970 W[i + 1] = Wil -1 25971 } -1 25972 -1 25973 for (var j = 0; j < 160; j += 2) { -1 25974 Wih = W[j] -1 25975 Wil = W[j + 1] -1 25976 -1 25977 var majh = maj(ah, bh, ch) -1 25978 var majl = maj(al, bl, cl) -1 25979 -1 25980 var sigma0h = sigma0(ah, al) -1 25981 var sigma0l = sigma0(al, ah) -1 25982 var sigma1h = sigma1(eh, el) -1 25983 var sigma1l = sigma1(el, eh) -1 25984 -1 25985 // t1 = h + sigma1 + ch + K[j] + W[j] -1 25986 var Kih = K[j] -1 25987 var Kil = K[j + 1] -1 25988 -1 25989 var chh = Ch(eh, fh, gh) -1 25990 var chl = Ch(el, fl, gl) -1 25991 -1 25992 var t1l = (hl + sigma1l) | 0 -1 25993 var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0 -1 25994 t1l = (t1l + chl) | 0 -1 25995 t1h = (t1h + chh + getCarry(t1l, chl)) | 0 -1 25996 t1l = (t1l + Kil) | 0 -1 25997 t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0 -1 25998 t1l = (t1l + Wil) | 0 -1 25999 t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0 -1 26000 -1 26001 // t2 = sigma0 + maj -1 26002 var t2l = (sigma0l + majl) | 0 -1 26003 var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0 -1 26004 -1 26005 hh = gh -1 26006 hl = gl -1 26007 gh = fh -1 26008 gl = fl -1 26009 fh = eh -1 26010 fl = el -1 26011 el = (dl + t1l) | 0 -1 26012 eh = (dh + t1h + getCarry(el, dl)) | 0 -1 26013 dh = ch -1 26014 dl = cl -1 26015 ch = bh -1 26016 cl = bl -1 26017 bh = ah -1 26018 bl = al -1 26019 al = (t1l + t2l) | 0 -1 26020 ah = (t1h + t2h + getCarry(al, t1l)) | 0 -1 26021 } -1 26022 -1 26023 this._al = (this._al + al) | 0 -1 26024 this._bl = (this._bl + bl) | 0 -1 26025 this._cl = (this._cl + cl) | 0 -1 26026 this._dl = (this._dl + dl) | 0 -1 26027 this._el = (this._el + el) | 0 -1 26028 this._fl = (this._fl + fl) | 0 -1 26029 this._gl = (this._gl + gl) | 0 -1 26030 this._hl = (this._hl + hl) | 0 -1 26031 -1 26032 this._ah = (this._ah + ah + getCarry(this._al, al)) | 0 -1 26033 this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0 -1 26034 this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0 -1 26035 this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0 -1 26036 this._eh = (this._eh + eh + getCarry(this._el, el)) | 0 -1 26037 this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0 -1 26038 this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0 -1 26039 this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0 -1 26040 } -1 26041 -1 26042 Sha512.prototype._hash = function () { -1 26043 var H = Buffer.allocUnsafe(64) -1 26044 -1 26045 function writeInt64BE (h, l, offset) { -1 26046 H.writeInt32BE(h, offset) -1 26047 H.writeInt32BE(l, offset + 4) -1 26048 } -1 26049 -1 26050 writeInt64BE(this._ah, this._al, 0) -1 26051 writeInt64BE(this._bh, this._bl, 8) -1 26052 writeInt64BE(this._ch, this._cl, 16) -1 26053 writeInt64BE(this._dh, this._dl, 24) -1 26054 writeInt64BE(this._eh, this._el, 32) -1 26055 writeInt64BE(this._fh, this._fl, 40) -1 26056 writeInt64BE(this._gh, this._gl, 48) -1 26057 writeInt64BE(this._hh, this._hl, 56) -1 26058 -1 26059 return H -1 26060 } -1 26061 -1 26062 module.exports = Sha512 -1 26063 -1 26064 },{"./hash":162,"inherits":132,"safe-buffer":160}],170:[function(require,module,exports){ -1 26065 // Copyright Joyent, Inc. and other Node contributors. -1 26066 // -1 26067 // Permission is hereby granted, free of charge, to any person obtaining a -1 26068 // copy of this software and associated documentation files (the -1 26069 // "Software"), to deal in the Software without restriction, including -1 26070 // without limitation the rights to use, copy, modify, merge, publish, -1 26071 // distribute, sublicense, and/or sell copies of the Software, and to permit -1 26072 // persons to whom the Software is furnished to do so, subject to the -1 26073 // following conditions: -1 26074 // -1 26075 // The above copyright notice and this permission notice shall be included -1 26076 // in all copies or substantial portions of the Software. -1 26077 // -1 26078 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -1 26079 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -1 26080 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -1 26081 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -1 26082 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -1 26083 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -1 26084 // USE OR OTHER DEALINGS IN THE SOFTWARE. -1 26085 -1 26086 module.exports = Stream; -1 26087 -1 26088 var EE = require('events').EventEmitter; -1 26089 var inherits = require('inherits'); -1 26090 -1 26091 inherits(Stream, EE); -1 26092 Stream.Readable = require('readable-stream/lib/_stream_readable.js'); -1 26093 Stream.Writable = require('readable-stream/lib/_stream_writable.js'); -1 26094 Stream.Duplex = require('readable-stream/lib/_stream_duplex.js'); -1 26095 Stream.Transform = require('readable-stream/lib/_stream_transform.js'); -1 26096 Stream.PassThrough = require('readable-stream/lib/_stream_passthrough.js'); -1 26097 Stream.finished = require('readable-stream/lib/internal/streams/end-of-stream.js') -1 26098 Stream.pipeline = require('readable-stream/lib/internal/streams/pipeline.js') -1 26099 -1 26100 // Backwards-compat with node 0.4.x -1 26101 Stream.Stream = Stream; -1 26102 -1 26103 -1 26104 -1 26105 // old-style streams. Note that the pipe method (the only relevant -1 26106 // part of this class) is overridden in the Readable class. -1 26107 -1 26108 function Stream() { -1 26109 EE.call(this); -1 26110 } -1 26111 -1 26112 Stream.prototype.pipe = function(dest, options) { -1 26113 var source = this; -1 26114 -1 26115 function ondata(chunk) { -1 26116 if (dest.writable) { -1 26117 if (false === dest.write(chunk) && source.pause) { -1 26118 source.pause(); -1 26119 } -1 26120 } -1 26121 } 5560 261225561 -1 // B5562 -1 if (!recursive && el.matches('[aria-labelledby]')) {5563 -1 var ids = el.getAttribute('aria-labelledby').split(/\s+/);5564 -1 var strings = ids.map(function(id) {5565 -1 var label = document.getElementById(id);5566 -1 return label ? getName(label, true, visited, true) : '';5567 -1 });5568 -1 ret = strings.join(' ');5569 -1 }-1 26123 source.on('data', ondata); 5570 261245571 -1 // C5572 -1 if (!ret.trim() && el.matches('[aria-label]')) {5573 -1 // FIXME: may skip to 2E5574 -1 ret = el.getAttribute('aria-label');5575 -1 }-1 26125 function ondrain() { -1 26126 if (source.readable && source.resume) { -1 26127 source.resume(); -1 26128 } -1 26129 } 5576 261305577 -1 // D5578 -1 if (!ret.trim() && !recursive && isLabelable(el)) {5579 -1 var strings = Array.prototype.map.call(el.labels, function(label) {5580 -1 return getName(label, true, visited);5581 -1 });5582 -1 ret = strings.join(' ');5583 -1 }5584 -1 if (!ret.trim()) {5585 -1 ret = el.placeholder || '';5586 -1 }5587 -1 if (!ret.trim()) {5588 -1 ret = el.alt || '';5589 -1 }5590 -1 if (!ret.trim() && el.matches('abbr,acronym') && el.title) {5591 -1 ret = el.title;5592 -1 }5593 -1 if (!ret.trim()) {5594 -1 for (var selector in constants.nameFromDescendant) {5595 -1 if (el.matches(selector)) {5596 -1 var descendant = el.querySelector(constants.nameFromDescendant[selector]);5597 -1 if (descendant) {5598 -1 ret = getName(descendant, true, visited);5599 -1 }5600 -1 }5601 -1 }5602 -1 }-1 26131 dest.on('drain', ondrain); 5603 261325604 -1 // E5605 -1 if (!ret.trim() && (recursive || isInLabelForOtherWidget(el) || query.matches(el, 'button'))) {5606 -1 if (query.matches(el, 'textbox,button,combobox,listbox,range')) {5607 -1 if (query.matches(el, 'textbox,button')) {5608 -1 ret = el.value || el.textContent;5609 -1 } else if (query.matches(el, 'combobox,listbox')) {5610 -1 var selected = query.querySelector(el, ':selected') || query.querySelector(el, 'option');5611 -1 if (selected) {5612 -1 ret = getName(selected, recursive, visited);5613 -1 } else {5614 -1 ret = el.value || '';5615 -1 }5616 -1 } else if (query.matches(el, 'range')) {5617 -1 ret = '' + (query.getAttribute(el, 'valuetext') || query.getAttribute(el, 'valuenow') || el.value);5618 -1 }5619 -1 }5620 -1 }-1 26133 // If the 'end' option is not supplied, dest.end() will be called when -1 26134 // source gets the 'end' or 'close' events. Only dest.end() once. -1 26135 if (!dest._isStdio && (!options || options.end !== false)) { -1 26136 source.on('end', onend); -1 26137 source.on('close', onclose); -1 26138 } 5621 261395622 -1 // F5623 -1 // FIXME: menu is not mentioned in the spec5624 -1 if (!ret.trim() && (recursive || allowNameFromContent(el) || el.closest('label')) && !query.matches(el, 'menu')) {5625 -1 ret = getContent(el, visited);5626 -1 }-1 26140 var didOnEnd = false; -1 26141 function onend() { -1 26142 if (didOnEnd) return; -1 26143 didOnEnd = true; 5627 261445628 -1 if (!ret.trim()) {5629 -1 for (var selector in constants.nameDefaults) {5630 -1 if (el.matches(selector)) {5631 -1 ret = constants.nameDefaults[selector];5632 -1 }5633 -1 }5634 -1 }-1 26145 dest.end(); -1 26146 } 5635 261475636 -1 // G/H5637 -1 // handled in getContent5638 261485639 -1 // I5640 -1 // FIXME: presentation not mentioned in the spec5641 -1 if (!ret.trim() && !query.matches(el, 'presentation')) {5642 -1 ret = el.title || '';5643 -1 }-1 26149 function onclose() { -1 26150 if (didOnEnd) return; -1 26151 didOnEnd = true; 5644 261525645 -1 var before = getPseudoContent(el, ':before');5646 -1 var after = getPseudoContent(el, ':after');5647 -1 return before + ret + after;5648 -1 };-1 26153 if (typeof dest.destroy === 'function') dest.destroy(); -1 26154 } 5649 261555650 -1 var getNameTrimmed = function(el) {5651 -1 return getName(el).replace(/\s+/g, ' ').trim();5652 -1 };-1 26156 // don't leave dangling pipes when there are errors. -1 26157 function onerror(er) { -1 26158 cleanup(); -1 26159 if (EE.listenerCount(this, 'error') === 0) { -1 26160 throw er; // Unhandled stream error in pipe. -1 26161 } -1 26162 } 5653 261635654 -1 var getDescription = function(el) {5655 -1 var ret = '';-1 26164 source.on('error', onerror); -1 26165 dest.on('error', onerror); 5656 261665657 -1 if (el.matches('[aria-describedby]')) {5658 -1 var ids = el.getAttribute('aria-describedby').split(/\s+/);5659 -1 var strings = ids.map(function(id) {5660 -1 var label = document.getElementById(id);5661 -1 return label ? getName(label, true) : '';5662 -1 });5663 -1 ret = strings.join(' ');5664 -1 } else if (el.title) {5665 -1 ret = el.title;5666 -1 } else if (el.placeholder) {5667 -1 ret = el.placeholder;5668 -1 }-1 26167 // remove all the event listeners that were added. -1 26168 function cleanup() { -1 26169 source.removeListener('data', ondata); -1 26170 dest.removeListener('drain', ondrain); 5669 261715670 -1 ret = (ret || '').trim().replace(/\s+/g, ' ');-1 26172 source.removeListener('end', onend); -1 26173 source.removeListener('close', onclose); 5671 261745672 -1 if (ret === getNameTrimmed(el)) {5673 -1 ret = '';5674 -1 }-1 26175 source.removeListener('error', onerror); -1 26176 dest.removeListener('error', onerror); 5675 261775676 -1 return ret;5677 -1 };-1 26178 source.removeListener('end', cleanup); -1 26179 source.removeListener('close', cleanup); 5678 261805679 -1 module.exports = {5680 -1 getName: getNameTrimmed,5681 -1 getDescription: getDescription,5682 -1 };-1 26181 dest.removeListener('close', cleanup); -1 26182 } 5683 261835684 -1 },{"./atree.js":8,"./constants.js":10,"./query.js":12}],12:[function(require,module,exports){5685 -1 var attrs = require('./attrs.js');5686 -1 var atree = require('./atree.js');-1 26184 source.on('end', cleanup); -1 26185 source.on('close', cleanup); 5687 26186 -1 26187 dest.on('close', cleanup); 5688 261885689 -1 var matches = function(el, selector) {5690 -1 var actual;-1 26189 dest.emit('pipe', source); 5691 261905692 -1 if (selector.substr(0, 1) === ':') {5693 -1 var attr = selector.substr(1);5694 -1 return attrs.getAttribute(el, attr);5695 -1 } else if (selector.substr(0, 1) === '[') {5696 -1 var match = /\[([a-z]+)="(.*)"\]/.exec(selector);5697 -1 actual = attrs.getAttribute(el, match[1]);5698 -1 var rawValue = match[2];5699 -1 return actual.toString() === rawValue;5700 -1 } else {5701 -1 return attrs.hasRole(el, selector.split(','));5702 -1 }-1 26191 // Allow for unix-like usage: A.pipe(B).pipe(C) -1 26192 return dest; 5703 26193 }; 5704 261945705 -1 var _querySelector = function(all) {5706 -1 return function(root, role) {5707 -1 var results = [];5708 -1 try {5709 -1 atree.walk(root, function(node) {5710 -1 if (node.nodeType === node.ELEMENT_NODE) {5711 -1 // FIXME: skip hidden elements5712 -1 if (matches(node, role)) {5713 -1 results.push(node);5714 -1 if (!all) {5715 -1 throw 'StopIteration';5716 -1 }5717 -1 }5718 -1 }5719 -1 });5720 -1 } catch (e) {5721 -1 if (e !== 'StopIteration') {5722 -1 throw e;5723 -1 }5724 -1 }5725 -1 return all ? results : results[0];5726 -1 };5727 -1 };-1 26195 },{"events":100,"inherits":132,"readable-stream/lib/_stream_duplex.js":172,"readable-stream/lib/_stream_passthrough.js":173,"readable-stream/lib/_stream_readable.js":174,"readable-stream/lib/_stream_transform.js":175,"readable-stream/lib/_stream_writable.js":176,"readable-stream/lib/internal/streams/end-of-stream.js":180,"readable-stream/lib/internal/streams/pipeline.js":182}],171:[function(require,module,exports){ -1 26196 arguments[4][47][0].apply(exports,arguments) -1 26197 },{"dup":47}],172:[function(require,module,exports){ -1 26198 arguments[4][48][0].apply(exports,arguments) -1 26199 },{"./_stream_readable":174,"./_stream_writable":176,"_process":149,"dup":48,"inherits":132}],173:[function(require,module,exports){ -1 26200 arguments[4][49][0].apply(exports,arguments) -1 26201 },{"./_stream_transform":175,"dup":49,"inherits":132}],174:[function(require,module,exports){ -1 26202 arguments[4][50][0].apply(exports,arguments) -1 26203 },{"../errors":171,"./_stream_duplex":172,"./internal/streams/async_iterator":177,"./internal/streams/buffer_list":178,"./internal/streams/destroy":179,"./internal/streams/from":181,"./internal/streams/state":183,"./internal/streams/stream":184,"_process":149,"buffer":63,"dup":50,"events":100,"inherits":132,"string_decoder/":185,"util":19}],175:[function(require,module,exports){ -1 26204 arguments[4][51][0].apply(exports,arguments) -1 26205 },{"../errors":171,"./_stream_duplex":172,"dup":51,"inherits":132}],176:[function(require,module,exports){ -1 26206 arguments[4][52][0].apply(exports,arguments) -1 26207 },{"../errors":171,"./_stream_duplex":172,"./internal/streams/destroy":179,"./internal/streams/state":183,"./internal/streams/stream":184,"_process":149,"buffer":63,"dup":52,"inherits":132,"util-deprecate":187}],177:[function(require,module,exports){ -1 26208 arguments[4][53][0].apply(exports,arguments) -1 26209 },{"./end-of-stream":180,"_process":149,"dup":53}],178:[function(require,module,exports){ -1 26210 arguments[4][54][0].apply(exports,arguments) -1 26211 },{"buffer":63,"dup":54,"util":19}],179:[function(require,module,exports){ -1 26212 arguments[4][55][0].apply(exports,arguments) -1 26213 },{"_process":149,"dup":55}],180:[function(require,module,exports){ -1 26214 arguments[4][56][0].apply(exports,arguments) -1 26215 },{"../../../errors":171,"dup":56}],181:[function(require,module,exports){ -1 26216 arguments[4][57][0].apply(exports,arguments) -1 26217 },{"dup":57}],182:[function(require,module,exports){ -1 26218 arguments[4][58][0].apply(exports,arguments) -1 26219 },{"../../../errors":171,"./end-of-stream":180,"dup":58}],183:[function(require,module,exports){ -1 26220 arguments[4][59][0].apply(exports,arguments) -1 26221 },{"../../../errors":171,"dup":59}],184:[function(require,module,exports){ -1 26222 arguments[4][60][0].apply(exports,arguments) -1 26223 },{"dup":60,"events":100}],185:[function(require,module,exports){ -1 26224 // Copyright Joyent, Inc. and other Node contributors. -1 26225 // -1 26226 // Permission is hereby granted, free of charge, to any person obtaining a -1 26227 // copy of this software and associated documentation files (the -1 26228 // "Software"), to deal in the Software without restriction, including -1 26229 // without limitation the rights to use, copy, modify, merge, publish, -1 26230 // distribute, sublicense, and/or sell copies of the Software, and to permit -1 26231 // persons to whom the Software is furnished to do so, subject to the -1 26232 // following conditions: -1 26233 // -1 26234 // The above copyright notice and this permission notice shall be included -1 26235 // in all copies or substantial portions of the Software. -1 26236 // -1 26237 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -1 26238 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -1 26239 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -1 26240 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -1 26241 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -1 26242 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -1 26243 // USE OR OTHER DEALINGS IN THE SOFTWARE. 5728 262445729 -1 var closest = function(el, selector) {5730 -1 return atree.searchUp(el, function(candidate) {5731 -1 if (candidate.nodeType === candidate.ELEMENT_NODE) {5732 -1 return matches(candidate, selector);5733 -1 }5734 -1 });5735 -1 };-1 26245 'use strict'; 5736 262465737 -1 module.exports = {5738 -1 getRole: function(el) {5739 -1 return attrs.getRole(el);5740 -1 },5741 -1 getAttribute: attrs.getAttribute,5742 -1 matches: matches,5743 -1 querySelector: _querySelector(),5744 -1 querySelectorAll: _querySelector(true),5745 -1 closest: closest,-1 26247 /*<replacement>*/ -1 26248 -1 26249 var Buffer = require('safe-buffer').Buffer; -1 26250 /*</replacement>*/ -1 26251 -1 26252 var isEncoding = Buffer.isEncoding || function (encoding) { -1 26253 encoding = '' + encoding; -1 26254 switch (encoding && encoding.toLowerCase()) { -1 26255 case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': -1 26256 return true; -1 26257 default: -1 26258 return false; -1 26259 } 5746 26260 }; 5747 262615748 -1 },{"./atree.js":8,"./attrs.js":9}],13:[function(require,module,exports){5749 -1 /*! axe v4.0.25750 -1 * Copyright (c) 2020 Deque Systems, Inc.5751 -1 *5752 -1 * Your use of this Source Code Form is subject to the terms of the Mozilla Public5753 -1 * License, v. 2.0. If a copy of the MPL was not distributed with this5754 -1 * file, You can obtain one at http://mozilla.org/MPL/2.0/.5755 -1 *5756 -1 * This entire copyright notice must appear in every copy of this file you5757 -1 * distribute or in any file that contains substantial portions of this source5758 -1 * code.5759 -1 */5760 -1 (function axeFunction(window) {5761 -1 var global = window;5762 -1 var document = window.document;5763 -1 'use strict';5764 -1 function _typeof(obj) {5765 -1 '@babel/helpers - typeof';5766 -1 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {5767 -1 _typeof = function _typeof(obj) {5768 -1 return typeof obj;5769 -1 };5770 -1 } else {5771 -1 _typeof = function _typeof(obj) {5772 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;5773 -1 };-1 26262 function _normalizeEncoding(enc) { -1 26263 if (!enc) return 'utf8'; -1 26264 var retried; -1 26265 while (true) { -1 26266 switch (enc) { -1 26267 case 'utf8': -1 26268 case 'utf-8': -1 26269 return 'utf8'; -1 26270 case 'ucs2': -1 26271 case 'ucs-2': -1 26272 case 'utf16le': -1 26273 case 'utf-16le': -1 26274 return 'utf16le'; -1 26275 case 'latin1': -1 26276 case 'binary': -1 26277 return 'latin1'; -1 26278 case 'base64': -1 26279 case 'ascii': -1 26280 case 'hex': -1 26281 return enc; -1 26282 default: -1 26283 if (retried) return; // undefined -1 26284 enc = ('' + enc).toLowerCase(); -1 26285 retried = true; 5774 26286 }5775 -1 return _typeof(obj);5776 -1 }5777 -1 var axe = axe || {};5778 -1 axe.version = '4.0.2';5779 -1 if (typeof define === 'function' && define.amd) {5780 -1 define('axe-core', [], function() {5781 -1 'use strict';5782 -1 return axe;5783 -1 });5784 26287 }5785 -1 if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object' && module.exports && typeof axeFunction.toString === 'function') {5786 -1 axe.source = '(' + axeFunction.toString() + ')(typeof window === "object" ? window : this);';5787 -1 module.exports = axe;-1 26288 }; -1 26289 -1 26290 // Do not cache `Buffer.isEncoding` when checking encoding names as some -1 26291 // modules monkey-patch it to support additional encodings -1 26292 function normalizeEncoding(enc) { -1 26293 var nenc = _normalizeEncoding(enc); -1 26294 if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); -1 26295 return nenc || enc; -1 26296 } -1 26297 -1 26298 // StringDecoder provides an interface for efficiently splitting a series of -1 26299 // buffers into a series of JS strings without breaking apart multi-byte -1 26300 // characters. -1 26301 exports.StringDecoder = StringDecoder; -1 26302 function StringDecoder(encoding) { -1 26303 this.encoding = normalizeEncoding(encoding); -1 26304 var nb; -1 26305 switch (this.encoding) { -1 26306 case 'utf16le': -1 26307 this.text = utf16Text; -1 26308 this.end = utf16End; -1 26309 nb = 4; -1 26310 break; -1 26311 case 'utf8': -1 26312 this.fillLast = utf8FillLast; -1 26313 nb = 4; -1 26314 break; -1 26315 case 'base64': -1 26316 this.text = base64Text; -1 26317 this.end = base64End; -1 26318 nb = 3; -1 26319 break; -1 26320 default: -1 26321 this.write = simpleWrite; -1 26322 this.end = simpleEnd; -1 26323 return; 5788 26324 }5789 -1 if (typeof window.getComputedStyle === 'function') {5790 -1 window.axe = axe;-1 26325 this.lastNeed = 0; -1 26326 this.lastTotal = 0; -1 26327 this.lastChar = Buffer.allocUnsafe(nb); -1 26328 } -1 26329 -1 26330 StringDecoder.prototype.write = function (buf) { -1 26331 if (buf.length === 0) return ''; -1 26332 var r; -1 26333 var i; -1 26334 if (this.lastNeed) { -1 26335 r = this.fillLast(buf); -1 26336 if (r === undefined) return ''; -1 26337 i = this.lastNeed; -1 26338 this.lastNeed = 0; -1 26339 } else { -1 26340 i = 0; 5791 26341 }5792 -1 var commons;5793 -1 function SupportError(error) {5794 -1 this.name = 'SupportError';5795 -1 this.cause = error.cause;5796 -1 this.message = '`'.concat(error.cause, '` - feature unsupported in your environment.');5797 -1 if (error.ruleId) {5798 -1 this.ruleId = error.ruleId;5799 -1 this.message += ' Skipping '.concat(this.ruleId, ' rule.');5800 -1 }5801 -1 this.stack = new Error().stack;-1 26342 if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); -1 26343 return r || ''; -1 26344 }; -1 26345 -1 26346 StringDecoder.prototype.end = utf8End; -1 26347 -1 26348 // Returns only complete characters in a Buffer -1 26349 StringDecoder.prototype.text = utf8Text; -1 26350 -1 26351 // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -1 26352 StringDecoder.prototype.fillLast = function (buf) { -1 26353 if (this.lastNeed <= buf.length) { -1 26354 buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); -1 26355 return this.lastChar.toString(this.encoding, 0, this.lastTotal); 5802 26356 }5803 -1 SupportError.prototype = Object.create(Error.prototype);5804 -1 SupportError.prototype.constructor = SupportError;5805 -1 'use strict';5806 -1 function _defineProperty(obj, key, value) {5807 -1 if (key in obj) {5808 -1 Object.defineProperty(obj, key, {5809 -1 value: value,5810 -1 enumerable: true,5811 -1 configurable: true,5812 -1 writable: true5813 -1 });5814 -1 } else {5815 -1 obj[key] = value;-1 26357 buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); -1 26358 this.lastNeed -= buf.length; -1 26359 }; -1 26360 -1 26361 // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -1 26362 // continuation byte. If an invalid byte is detected, -2 is returned. -1 26363 function utf8CheckByte(byte) { -1 26364 if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; -1 26365 return byte >> 6 === 0x02 ? -1 : -2; -1 26366 } -1 26367 -1 26368 // Checks at most 3 bytes at the end of a Buffer in order to detect an -1 26369 // incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -1 26370 // needed to complete the UTF-8 character (if applicable) are returned. -1 26371 function utf8CheckIncomplete(self, buf, i) { -1 26372 var j = buf.length - 1; -1 26373 if (j < i) return 0; -1 26374 var nb = utf8CheckByte(buf[j]); -1 26375 if (nb >= 0) { -1 26376 if (nb > 0) self.lastNeed = nb - 1; -1 26377 return nb; -1 26378 } -1 26379 if (--j < i || nb === -2) return 0; -1 26380 nb = utf8CheckByte(buf[j]); -1 26381 if (nb >= 0) { -1 26382 if (nb > 0) self.lastNeed = nb - 2; -1 26383 return nb; -1 26384 } -1 26385 if (--j < i || nb === -2) return 0; -1 26386 nb = utf8CheckByte(buf[j]); -1 26387 if (nb >= 0) { -1 26388 if (nb > 0) { -1 26389 if (nb === 2) nb = 0;else self.lastNeed = nb - 3; 5816 26390 }5817 -1 return obj;-1 26391 return nb; 5818 26392 }5819 -1 function _inherits(subClass, superClass) {5820 -1 if (typeof superClass !== 'function' && superClass !== null) {5821 -1 throw new TypeError('Super expression must either be null or a function');-1 26393 return 0; -1 26394 } -1 26395 -1 26396 // Validates as many continuation bytes for a multi-byte UTF-8 character as -1 26397 // needed or are available. If we see a non-continuation byte where we expect -1 26398 // one, we "replace" the validated continuation bytes we've seen so far with -1 26399 // a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -1 26400 // behavior. The continuation byte check is included three times in the case -1 26401 // where all of the continuation bytes for a character exist in the same buffer. -1 26402 // It is also done this way as a slight performance increase instead of using a -1 26403 // loop. -1 26404 function utf8CheckExtraBytes(self, buf, p) { -1 26405 if ((buf[0] & 0xC0) !== 0x80) { -1 26406 self.lastNeed = 0; -1 26407 return '\ufffd'; -1 26408 } -1 26409 if (self.lastNeed > 1 && buf.length > 1) { -1 26410 if ((buf[1] & 0xC0) !== 0x80) { -1 26411 self.lastNeed = 1; -1 26412 return '\ufffd'; 5822 26413 }5823 -1 subClass.prototype = Object.create(superClass && superClass.prototype, {5824 -1 constructor: {5825 -1 value: subClass,5826 -1 writable: true,5827 -1 configurable: true-1 26414 if (self.lastNeed > 2 && buf.length > 2) { -1 26415 if ((buf[2] & 0xC0) !== 0x80) { -1 26416 self.lastNeed = 2; -1 26417 return '\ufffd'; 5828 26418 }5829 -1 });5830 -1 if (superClass) {5831 -1 _setPrototypeOf(subClass, superClass);5832 26419 } 5833 26420 }5834 -1 function _setPrototypeOf(o, p) {5835 -1 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {5836 -1 o.__proto__ = p;5837 -1 return o;5838 -1 };5839 -1 return _setPrototypeOf(o, p);-1 26421 } -1 26422 -1 26423 // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -1 26424 function utf8FillLast(buf) { -1 26425 var p = this.lastTotal - this.lastNeed; -1 26426 var r = utf8CheckExtraBytes(this, buf, p); -1 26427 if (r !== undefined) return r; -1 26428 if (this.lastNeed <= buf.length) { -1 26429 buf.copy(this.lastChar, p, 0, this.lastNeed); -1 26430 return this.lastChar.toString(this.encoding, 0, this.lastTotal); 5840 26431 }5841 -1 function _createSuper(Derived) {5842 -1 var hasNativeReflectConstruct = _isNativeReflectConstruct();5843 -1 return function _createSuperInternal() {5844 -1 var Super = _getPrototypeOf(Derived), result;5845 -1 if (hasNativeReflectConstruct) {5846 -1 var NewTarget = _getPrototypeOf(this).constructor;5847 -1 result = Reflect.construct(Super, arguments, NewTarget);5848 -1 } else {5849 -1 result = Super.apply(this, arguments);-1 26432 buf.copy(this.lastChar, p, 0, buf.length); -1 26433 this.lastNeed -= buf.length; -1 26434 } -1 26435 -1 26436 // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -1 26437 // partial character, the character's bytes are buffered until the required -1 26438 // number of bytes are available. -1 26439 function utf8Text(buf, i) { -1 26440 var total = utf8CheckIncomplete(this, buf, i); -1 26441 if (!this.lastNeed) return buf.toString('utf8', i); -1 26442 this.lastTotal = total; -1 26443 var end = buf.length - (total - this.lastNeed); -1 26444 buf.copy(this.lastChar, 0, end); -1 26445 return buf.toString('utf8', i, end); -1 26446 } -1 26447 -1 26448 // For UTF-8, a replacement character is added when ending on a partial -1 26449 // character. -1 26450 function utf8End(buf) { -1 26451 var r = buf && buf.length ? this.write(buf) : ''; -1 26452 if (this.lastNeed) return r + '\ufffd'; -1 26453 return r; -1 26454 } -1 26455 -1 26456 // UTF-16LE typically needs two bytes per character, but even if we have an even -1 26457 // number of bytes available, we need to check if we end on a leading/high -1 26458 // surrogate. In that case, we need to wait for the next two bytes in order to -1 26459 // decode the last character properly. -1 26460 function utf16Text(buf, i) { -1 26461 if ((buf.length - i) % 2 === 0) { -1 26462 var r = buf.toString('utf16le', i); -1 26463 if (r) { -1 26464 var c = r.charCodeAt(r.length - 1); -1 26465 if (c >= 0xD800 && c <= 0xDBFF) { -1 26466 this.lastNeed = 2; -1 26467 this.lastTotal = 4; -1 26468 this.lastChar[0] = buf[buf.length - 2]; -1 26469 this.lastChar[1] = buf[buf.length - 1]; -1 26470 return r.slice(0, -1); 5850 26471 }5851 -1 return _possibleConstructorReturn(this, result);5852 -1 };5853 -1 }5854 -1 function _possibleConstructorReturn(self, call) {5855 -1 if (call && (_typeof(call) === 'object' || typeof call === 'function')) {5856 -1 return call;5857 26472 }5858 -1 return _assertThisInitialized(self);-1 26473 return r; 5859 26474 }5860 -1 function _assertThisInitialized(self) {5861 -1 if (self === void 0) {5862 -1 throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');5863 -1 }5864 -1 return self;-1 26475 this.lastNeed = 1; -1 26476 this.lastTotal = 2; -1 26477 this.lastChar[0] = buf[buf.length - 1]; -1 26478 return buf.toString('utf16le', i, buf.length - 1); -1 26479 } -1 26480 -1 26481 // For UTF-16LE we do not explicitly append special replacement characters if we -1 26482 // end on a partial character, we simply let v8 handle that. -1 26483 function utf16End(buf) { -1 26484 var r = buf && buf.length ? this.write(buf) : ''; -1 26485 if (this.lastNeed) { -1 26486 var end = this.lastTotal - this.lastNeed; -1 26487 return r + this.lastChar.toString('utf16le', 0, end); 5865 26488 }5866 -1 function _isNativeReflectConstruct() {5867 -1 if (typeof Reflect === 'undefined' || !Reflect.construct) {5868 -1 return false;5869 -1 }5870 -1 if (Reflect.construct.sham) {5871 -1 return false;5872 -1 }5873 -1 if (typeof Proxy === 'function') {5874 -1 return true;5875 -1 }5876 -1 try {5877 -1 Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));5878 -1 return true;5879 -1 } catch (e) {5880 -1 return false;5881 -1 }-1 26489 return r; -1 26490 } -1 26491 -1 26492 function base64Text(buf, i) { -1 26493 var n = (buf.length - i) % 3; -1 26494 if (n === 0) return buf.toString('base64', i); -1 26495 this.lastNeed = 3 - n; -1 26496 this.lastTotal = 3; -1 26497 if (n === 1) { -1 26498 this.lastChar[0] = buf[buf.length - 1]; -1 26499 } else { -1 26500 this.lastChar[0] = buf[buf.length - 2]; -1 26501 this.lastChar[1] = buf[buf.length - 1]; 5882 26502 }5883 -1 function _getPrototypeOf(o) {5884 -1 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {5885 -1 return o.__proto__ || Object.getPrototypeOf(o);5886 -1 };5887 -1 return _getPrototypeOf(o);-1 26503 return buf.toString('base64', i, buf.length - n); -1 26504 } -1 26505 -1 26506 function base64End(buf) { -1 26507 var r = buf && buf.length ? this.write(buf) : ''; -1 26508 if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); -1 26509 return r; -1 26510 } -1 26511 -1 26512 // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -1 26513 function simpleWrite(buf) { -1 26514 return buf.toString(this.encoding); -1 26515 } -1 26516 -1 26517 function simpleEnd(buf) { -1 26518 return buf && buf.length ? this.write(buf) : ''; -1 26519 } -1 26520 },{"safe-buffer":160}],186:[function(require,module,exports){ -1 26521 (function (setImmediate,clearImmediate){(function (){ -1 26522 var nextTick = require('process/browser.js').nextTick; -1 26523 var apply = Function.prototype.apply; -1 26524 var slice = Array.prototype.slice; -1 26525 var immediateIds = {}; -1 26526 var nextImmediateId = 0; -1 26527 -1 26528 // DOM APIs, for completeness -1 26529 -1 26530 exports.setTimeout = function() { -1 26531 return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout); -1 26532 }; -1 26533 exports.setInterval = function() { -1 26534 return new Timeout(apply.call(setInterval, window, arguments), clearInterval); -1 26535 }; -1 26536 exports.clearTimeout = -1 26537 exports.clearInterval = function(timeout) { timeout.close(); }; -1 26538 -1 26539 function Timeout(id, clearFn) { -1 26540 this._id = id; -1 26541 this._clearFn = clearFn; -1 26542 } -1 26543 Timeout.prototype.unref = Timeout.prototype.ref = function() {}; -1 26544 Timeout.prototype.close = function() { -1 26545 this._clearFn.call(window, this._id); -1 26546 }; -1 26547 -1 26548 // Does not start the time, just sets up the members needed. -1 26549 exports.enroll = function(item, msecs) { -1 26550 clearTimeout(item._idleTimeoutId); -1 26551 item._idleTimeout = msecs; -1 26552 }; -1 26553 -1 26554 exports.unenroll = function(item) { -1 26555 clearTimeout(item._idleTimeoutId); -1 26556 item._idleTimeout = -1; -1 26557 }; -1 26558 -1 26559 exports._unrefActive = exports.active = function(item) { -1 26560 clearTimeout(item._idleTimeoutId); -1 26561 -1 26562 var msecs = item._idleTimeout; -1 26563 if (msecs >= 0) { -1 26564 item._idleTimeoutId = setTimeout(function onTimeout() { -1 26565 if (item._onTimeout) -1 26566 item._onTimeout(); -1 26567 }, msecs); 5888 26568 }5889 -1 function _classCallCheck(instance, Constructor) {5890 -1 if (!(instance instanceof Constructor)) {5891 -1 throw new TypeError('Cannot call a class as a function');-1 26569 }; -1 26570 -1 26571 // That's not how node.js implements it but the exposed api is the same. -1 26572 exports.setImmediate = typeof setImmediate === "function" ? setImmediate : function(fn) { -1 26573 var id = nextImmediateId++; -1 26574 var args = arguments.length < 2 ? false : slice.call(arguments, 1); -1 26575 -1 26576 immediateIds[id] = true; -1 26577 -1 26578 nextTick(function onNextTick() { -1 26579 if (immediateIds[id]) { -1 26580 // fn.call() is faster so we optimize for the common use-case -1 26581 // @see http://jsperf.com/call-apply-segu -1 26582 if (args) { -1 26583 fn.apply(null, args); -1 26584 } else { -1 26585 fn.call(null); -1 26586 } -1 26587 // Prevent ids from leaking -1 26588 exports.clearImmediate(id); 5892 26589 } -1 26590 }); -1 26591 -1 26592 return id; -1 26593 }; -1 26594 -1 26595 exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : function(id) { -1 26596 delete immediateIds[id]; -1 26597 }; -1 26598 }).call(this)}).call(this,require("timers").setImmediate,require("timers").clearImmediate) -1 26599 },{"process/browser.js":149,"timers":186}],187:[function(require,module,exports){ -1 26600 (function (global){(function (){ -1 26601 -1 26602 /** -1 26603 * Module exports. -1 26604 */ -1 26605 -1 26606 module.exports = deprecate; -1 26607 -1 26608 /** -1 26609 * Mark that a method should not be used. -1 26610 * Returns a modified function which warns once by default. -1 26611 * -1 26612 * If `localStorage.noDeprecation = true` is set, then it is a no-op. -1 26613 * -1 26614 * If `localStorage.throwDeprecation = true` is set, then deprecated functions -1 26615 * will throw an Error when invoked. -1 26616 * -1 26617 * If `localStorage.traceDeprecation = true` is set, then deprecated functions -1 26618 * will invoke `console.trace()` instead of `console.error()`. -1 26619 * -1 26620 * @param {Function} fn - the function to deprecate -1 26621 * @param {String} msg - the string to print to the console when `fn` is invoked -1 26622 * @returns {Function} a new "deprecated" version of `fn` -1 26623 * @api public -1 26624 */ -1 26625 -1 26626 function deprecate (fn, msg) { -1 26627 if (config('noDeprecation')) { -1 26628 return fn; 5893 26629 }5894 -1 function _defineProperties(target, props) {5895 -1 for (var i = 0; i < props.length; i++) {5896 -1 var descriptor = props[i];5897 -1 descriptor.enumerable = descriptor.enumerable || false;5898 -1 descriptor.configurable = true;5899 -1 if ('value' in descriptor) {5900 -1 descriptor.writable = true;-1 26630 -1 26631 var warned = false; -1 26632 function deprecated() { -1 26633 if (!warned) { -1 26634 if (config('throwDeprecation')) { -1 26635 throw new Error(msg); -1 26636 } else if (config('traceDeprecation')) { -1 26637 console.trace(msg); -1 26638 } else { -1 26639 console.warn(msg); 5901 26640 }5902 -1 Object.defineProperty(target, descriptor.key, descriptor);-1 26641 warned = true; 5903 26642 } -1 26643 return fn.apply(this, arguments); 5904 26644 }5905 -1 function _createClass(Constructor, protoProps, staticProps) {5906 -1 if (protoProps) {5907 -1 _defineProperties(Constructor.prototype, protoProps);-1 26645 -1 26646 return deprecated; -1 26647 } -1 26648 -1 26649 /** -1 26650 * Checks `localStorage` for boolean values for the given `name`. -1 26651 * -1 26652 * @param {String} name -1 26653 * @returns {Boolean} -1 26654 * @api private -1 26655 */ -1 26656 -1 26657 function config (name) { -1 26658 // accessing global.localStorage can trigger a DOMException in sandboxed iframes -1 26659 try { -1 26660 if (!global.localStorage) return false; -1 26661 } catch (_) { -1 26662 return false; -1 26663 } -1 26664 var val = global.localStorage[name]; -1 26665 if (null == val) return false; -1 26666 return String(val).toLowerCase() === 'true'; -1 26667 } -1 26668 -1 26669 }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -1 26670 },{}],188:[function(require,module,exports){ -1 26671 // Copyright 2012 Google Inc. -1 26672 // -1 26673 // Licensed under the Apache License, Version 2.0 (the "License"); -1 26674 // you may not use this file except in compliance with the License. -1 26675 // You may obtain a copy of the License at -1 26676 // -1 26677 // http://www.apache.org/licenses/LICENSE-2.0 -1 26678 // -1 26679 // Unless required by applicable law or agreed to in writing, software -1 26680 // distributed under the License is distributed on an "AS IS" BASIS, -1 26681 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -1 26682 // See the License for the specific language governing permissions and -1 26683 // limitations under the License. -1 26684 -1 26685 goog.require('axs.browserUtils'); -1 26686 goog.require('axs.color'); -1 26687 goog.require('axs.color.Color'); -1 26688 goog.require('axs.constants'); -1 26689 goog.require('axs.dom'); -1 26690 -1 26691 goog.provide('axs.utils'); -1 26692 -1 26693 /** -1 26694 * @const -1 26695 * @type {string} -1 26696 */ -1 26697 axs.utils.FOCUSABLE_ELEMENTS_SELECTOR = -1 26698 'input:not([type=hidden]):not([disabled]),' + -1 26699 'select:not([disabled]),' + -1 26700 'textarea:not([disabled]),' + -1 26701 'button:not([disabled]),' + -1 26702 'a[href],' + -1 26703 'iframe,' + -1 26704 '[tabindex]'; -1 26705 -1 26706 /** -1 26707 * Elements that can have labels: https://html.spec.whatwg.org/multipage/forms.html#category-label -1 26708 * @const -1 26709 * @type {string} -1 26710 */ -1 26711 axs.utils.LABELABLE_ELEMENTS_SELECTOR = -1 26712 'button,' + -1 26713 'input:not([type=hidden]),' + -1 26714 'keygen,' + -1 26715 'meter,' + -1 26716 'output,' + -1 26717 'progress,' + -1 26718 'select,' + -1 26719 'textarea'; -1 26720 -1 26721 -1 26722 /** -1 26723 * @param {Element} element -1 26724 * @return {boolean} -1 26725 */ -1 26726 axs.utils.elementIsTransparent = function(element) { -1 26727 return element.style.opacity == '0'; -1 26728 }; -1 26729 -1 26730 /** -1 26731 * @param {Element} element -1 26732 * @return {boolean} -1 26733 */ -1 26734 axs.utils.elementHasZeroArea = function(element) { -1 26735 var rect = element.getBoundingClientRect(); -1 26736 var width = rect.right - rect.left; -1 26737 var height = rect.top - rect.bottom; -1 26738 if (!width || !height) -1 26739 return true; -1 26740 return false; -1 26741 }; -1 26742 -1 26743 /** -1 26744 * @param {Element} element -1 26745 * @return {boolean} -1 26746 */ -1 26747 axs.utils.elementIsOutsideScrollArea = function(element) { -1 26748 var parent = axs.dom.parentElement(element); -1 26749 -1 26750 var defaultView = element.ownerDocument.defaultView; -1 26751 while (parent != defaultView.document.body) { -1 26752 if (axs.utils.isClippedBy(element, parent)) -1 26753 return true; -1 26754 -1 26755 if (axs.utils.canScrollTo(element, parent) && !axs.utils.elementIsOutsideScrollArea(parent)) -1 26756 return false; -1 26757 -1 26758 parent = axs.dom.parentElement(parent); -1 26759 } -1 26760 -1 26761 return !axs.utils.canScrollTo(element, defaultView.document.body); -1 26762 }; -1 26763 -1 26764 /** -1 26765 * Checks whether it's possible to scroll to the given element within the given container. -1 26766 * Assumes that |container| is an ancestor of |element|. -1 26767 * If |container| cannot be scrolled, returns True if the element is within its bounding client -1 26768 * rect. -1 26769 * @param {Element} element -1 26770 * @param {Element} container -1 26771 * @return {boolean} True iff it's possible to scroll to |element| within |container|. -1 26772 */ -1 26773 axs.utils.canScrollTo = function(element, container) { -1 26774 var rect = element.getBoundingClientRect(); -1 26775 var containerRect = container.getBoundingClientRect(); -1 26776 if (container == container.ownerDocument.body) { -1 26777 var absoluteTop = containerRect.top; -1 26778 var absoluteLeft = containerRect.left; -1 26779 } else { -1 26780 var absoluteTop = containerRect.top - container.scrollTop; -1 26781 var absoluteLeft = containerRect.left - container.scrollLeft; 5908 26782 }5909 -1 if (staticProps) {5910 -1 _defineProperties(Constructor, staticProps);-1 26783 var containerScrollArea = -1 26784 { top: absoluteTop, -1 26785 bottom: absoluteTop + container.scrollHeight, -1 26786 left: absoluteLeft, -1 26787 right: absoluteLeft + container.scrollWidth }; -1 26788 -1 26789 if (rect.right < containerScrollArea.left || rect.bottom < containerScrollArea.top || -1 26790 rect.left > containerScrollArea.right || rect.top > containerScrollArea.bottom) { -1 26791 return false; 5911 26792 }5912 -1 return Constructor;5913 -1 }5914 -1 function _objectWithoutProperties(source, excluded) {5915 -1 if (source == null) {5916 -1 return {};-1 26793 -1 26794 var defaultView = element.ownerDocument.defaultView; -1 26795 var style = defaultView.getComputedStyle(container); -1 26796 -1 26797 if (rect.left > containerRect.right || rect.top > containerRect.bottom) { -1 26798 return (style.overflow == 'scroll' || style.overflow == 'auto' || -1 26799 container instanceof defaultView.HTMLBodyElement); 5917 26800 }5918 -1 var target = _objectWithoutPropertiesLoose(source, excluded);5919 -1 var key, i;5920 -1 if (Object.getOwnPropertySymbols) {5921 -1 var sourceSymbolKeys = Object.getOwnPropertySymbols(source);5922 -1 for (i = 0; i < sourceSymbolKeys.length; i++) {5923 -1 key = sourceSymbolKeys[i];5924 -1 if (excluded.indexOf(key) >= 0) {5925 -1 continue;-1 26801 -1 26802 return true; -1 26803 }; -1 26804 -1 26805 /** -1 26806 * Checks whether the given element is clipped by the given container. -1 26807 * Assumes that |container| is an ancestor of |element|. -1 26808 * @param {Element} element -1 26809 * @param {Element} container -1 26810 * @return {boolean} True iff |element| is clipped by |container|. -1 26811 */ -1 26812 axs.utils.isClippedBy = function(element, container) { -1 26813 var rect = element.getBoundingClientRect(); -1 26814 var containerRect = container.getBoundingClientRect(); -1 26815 var containerTop = containerRect.top; -1 26816 var containerLeft = containerRect.left; -1 26817 var containerScrollArea = -1 26818 { top: containerTop - container.scrollTop, -1 26819 bottom: containerTop - container.scrollTop + container.scrollHeight, -1 26820 left: containerLeft - container.scrollLeft, -1 26821 right: containerLeft - container.scrollLeft + container.scrollWidth }; -1 26822 -1 26823 var defaultView = element.ownerDocument.defaultView; -1 26824 var style = defaultView.getComputedStyle(container); -1 26825 -1 26826 if ((rect.right < containerRect.left || rect.bottom < containerRect.top || -1 26827 rect.left > containerRect.right || rect.top > containerRect.bottom) && -1 26828 style.overflow == 'hidden') { -1 26829 return true; -1 26830 } -1 26831 -1 26832 if (rect.right < containerScrollArea.left || rect.bottom < containerScrollArea.top) -1 26833 return (style.overflow != 'visible'); -1 26834 -1 26835 return false; -1 26836 }; -1 26837 -1 26838 /** -1 26839 * @param {Node} ancestor A potential ancestor of |node|. -1 26840 * @param {Node} node -1 26841 * @return {boolean} true if |ancestor| is an ancestor of |node| (including -1 26842 * |ancestor| === |node|). -1 26843 */ -1 26844 axs.utils.isAncestor = function(ancestor, node) { -1 26845 if (node == null) -1 26846 return false; -1 26847 if (node === ancestor) -1 26848 return true; -1 26849 -1 26850 var parentNode = axs.dom.composedParentNode(node); -1 26851 return axs.utils.isAncestor(ancestor, parentNode); -1 26852 }; -1 26853 -1 26854 /** -1 26855 * @param {Element} element -1 26856 * @return {Array.<Element>} An array of any non-transparent elements which -1 26857 * overlap the given element. -1 26858 */ -1 26859 axs.utils.overlappingElements = function(element) { -1 26860 if (axs.utils.elementHasZeroArea(element)) -1 26861 return null; -1 26862 -1 26863 var overlappingElements = []; -1 26864 var clientRects = element.getClientRects(); -1 26865 for (var i = 0; i < clientRects.length; i++) { -1 26866 var rect = clientRects[i]; -1 26867 var center_x = (rect.left + rect.right) / 2; -1 26868 var center_y = (rect.top + rect.bottom) / 2; -1 26869 var elementAtPoint = document.elementFromPoint(center_x, center_y); -1 26870 -1 26871 if (elementAtPoint == null || elementAtPoint == element || -1 26872 axs.utils.isAncestor(elementAtPoint, element) || -1 26873 axs.utils.isAncestor(element, elementAtPoint)) { -1 26874 continue; 5926 26875 }5927 -1 if (!Object.prototype.propertyIsEnumerable.call(source, key)) {5928 -1 continue;-1 26876 -1 26877 var overlappingElementStyle = window.getComputedStyle(elementAtPoint, null); -1 26878 if (!overlappingElementStyle) -1 26879 continue; -1 26880 -1 26881 var overlappingElementBg = axs.utils.getBgColor(overlappingElementStyle, -1 26882 elementAtPoint); -1 26883 if (overlappingElementBg && overlappingElementBg.alpha > 0 && -1 26884 overlappingElements.indexOf(elementAtPoint) < 0) { -1 26885 overlappingElements.push(elementAtPoint); 5929 26886 }5930 -1 target[key] = source[key];5931 -1 }5932 -1 }5933 -1 return target;5934 -1 }5935 -1 function _objectWithoutPropertiesLoose(source, excluded) {5936 -1 if (source == null) {5937 -1 return {};5938 -1 }5939 -1 var target = {};5940 -1 var sourceKeys = Object.keys(source);5941 -1 var key, i;5942 -1 for (i = 0; i < sourceKeys.length; i++) {5943 -1 key = sourceKeys[i];5944 -1 if (excluded.indexOf(key) >= 0) {5945 -1 continue;5946 -1 }5947 -1 target[key] = source[key];5948 26887 }5949 -1 return target;5950 -1 }5951 -1 function _extends() {5952 -1 _extends = Object.assign || function(target) {5953 -1 for (var i = 1; i < arguments.length; i++) {5954 -1 var source = arguments[i];5955 -1 for (var key in source) {5956 -1 if (Object.prototype.hasOwnProperty.call(source, key)) {5957 -1 target[key] = source[key];5958 -1 }-1 26888 -1 26889 return overlappingElements; -1 26890 }; -1 26891 -1 26892 /** -1 26893 * @param {Element} element -1 26894 * @return {boolean} -1 26895 */ -1 26896 axs.utils.elementIsHtmlControl = function(element) { -1 26897 var defaultView = element.ownerDocument.defaultView; -1 26898 -1 26899 // HTML control -1 26900 if (element instanceof defaultView.HTMLButtonElement) -1 26901 return true; -1 26902 if (element instanceof defaultView.HTMLInputElement) -1 26903 return true; -1 26904 if (element instanceof defaultView.HTMLSelectElement) -1 26905 return true; -1 26906 if (element instanceof defaultView.HTMLTextAreaElement) -1 26907 return true; -1 26908 -1 26909 return false; -1 26910 }; -1 26911 -1 26912 /** -1 26913 * @param {Element} element -1 26914 * @return {boolean} -1 26915 */ -1 26916 axs.utils.elementIsAriaWidget = function(element) { -1 26917 if (element.hasAttribute('role')) { -1 26918 var roleValue = element.getAttribute('role'); -1 26919 // TODO is this correct? -1 26920 if (roleValue) { -1 26921 var role = axs.constants.ARIA_ROLES[roleValue]; -1 26922 if (role && 'widget' in role['allParentRolesSet']) -1 26923 return true; 5959 26924 }5960 -1 }5961 -1 return target;5962 -1 };5963 -1 return _extends.apply(this, arguments);5964 -1 }5965 -1 function _slicedToArray(arr, i) {5966 -1 return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();5967 -1 }5968 -1 function _nonIterableRest() {5969 -1 throw new TypeError('Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');5970 -1 }5971 -1 function _iterableToArrayLimit(arr, i) {5972 -1 if (typeof Symbol === 'undefined' || !(Symbol.iterator in Object(arr))) {5973 -1 return;5974 26925 }5975 -1 var _arr = [];5976 -1 var _n = true;5977 -1 var _d = false;5978 -1 var _e = undefined;5979 -1 try {5980 -1 for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {5981 -1 _arr.push(_s.value);5982 -1 if (i && _arr.length === i) {5983 -1 break;5984 -1 }5985 -1 }5986 -1 } catch (err) {5987 -1 _d = true;5988 -1 _e = err;5989 -1 } finally {5990 -1 try {5991 -1 if (!_n && _i['return'] != null) {5992 -1 _i['return']();5993 -1 }5994 -1 } finally {5995 -1 if (_d) {5996 -1 throw _e;-1 26926 return false; -1 26927 }; -1 26928 -1 26929 /** -1 26930 * @param {Element} element -1 26931 * @return {boolean} -1 26932 */ -1 26933 axs.utils.elementIsVisible = function(element) { -1 26934 if (axs.utils.elementIsTransparent(element)) -1 26935 return false; -1 26936 if (axs.utils.elementHasZeroArea(element)) -1 26937 return false; -1 26938 if (axs.utils.elementIsOutsideScrollArea(element)) -1 26939 return false; -1 26940 -1 26941 var overlappingElements = axs.utils.overlappingElements(element); -1 26942 if (overlappingElements.length) -1 26943 return false; -1 26944 -1 26945 return true; -1 26946 }; -1 26947 -1 26948 /** -1 26949 * @param {CSSStyleDeclaration} style -1 26950 * @return {boolean} -1 26951 */ -1 26952 axs.utils.isLargeFont = function(style) { -1 26953 var fontSize = style.fontSize; -1 26954 var bold = style.fontWeight == 'bold'; -1 26955 var matches = fontSize.match(/(\d+)px/); -1 26956 if (matches) { -1 26957 var fontSizePx = parseInt(matches[1], 10); -1 26958 var bodyStyle = window.getComputedStyle(document.body, null); -1 26959 var bodyFontSize = bodyStyle.fontSize; -1 26960 matches = bodyFontSize.match(/(\d+)px/); -1 26961 if (matches) { -1 26962 var bodyFontSizePx = parseInt(matches[1], 10); -1 26963 var boldLarge = bodyFontSizePx * 1.2; -1 26964 var large = bodyFontSizePx * 1.5; -1 26965 } else { -1 26966 var boldLarge = 19.2; -1 26967 var large = 24; 5997 26968 }5998 -1 }5999 -1 }6000 -1 return _arr;6001 -1 }6002 -1 function _arrayWithHoles(arr) {6003 -1 if (Array.isArray(arr)) {6004 -1 return arr;6005 -1 }6006 -1 }6007 -1 function _toConsumableArray(arr) {6008 -1 return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();6009 -1 }6010 -1 function _nonIterableSpread() {6011 -1 throw new TypeError('Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');6012 -1 }6013 -1 function _unsupportedIterableToArray(o, minLen) {6014 -1 if (!o) {6015 -1 return;-1 26969 return (bold && fontSizePx >= boldLarge || fontSizePx >= large); 6016 26970 }6017 -1 if (typeof o === 'string') {6018 -1 return _arrayLikeToArray(o, minLen);-1 26971 matches = fontSize.match(/(\d+)em/); -1 26972 if (matches) { -1 26973 var fontSizeEm = parseInt(matches[1], 10); -1 26974 if (bold && fontSizeEm >= 1.2 || fontSizeEm >= 1.5) -1 26975 return true; -1 26976 return false; 6019 26977 }6020 -1 var n = Object.prototype.toString.call(o).slice(8, -1);6021 -1 if (n === 'Object' && o.constructor) {6022 -1 n = o.constructor.name;-1 26978 matches = fontSize.match(/(\d+)%/); -1 26979 if (matches) { -1 26980 var fontSizePercent = parseInt(matches[1], 10); -1 26981 if (bold && fontSizePercent >= 120 || fontSizePercent >= 150) -1 26982 return true; -1 26983 return false; 6023 26984 }6024 -1 if (n === 'Map' || n === 'Set') {6025 -1 return Array.from(o);-1 26985 matches = fontSize.match(/(\d+)pt/); -1 26986 if (matches) { -1 26987 var fontSizePt = parseInt(matches[1], 10); -1 26988 if (bold && fontSizePt >= 14 || fontSizePt >= 18) -1 26989 return true; -1 26990 return false; 6026 26991 }6027 -1 if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) {6028 -1 return _arrayLikeToArray(o, minLen);-1 26992 return false; -1 26993 }; -1 26994 -1 26995 /** -1 26996 * @param {CSSStyleDeclaration} style -1 26997 * @param {Element} element -1 26998 * @return {?axs.color.Color} -1 26999 */ -1 27000 axs.utils.getBgColor = function(style, element) { -1 27001 var bgColorString = style.backgroundColor; -1 27002 var bgColor = axs.color.parseColor(bgColorString); -1 27003 if (!bgColor) -1 27004 return null; -1 27005 -1 27006 if (style.opacity < 1) -1 27007 bgColor.alpha = bgColor.alpha * style.opacity; -1 27008 -1 27009 if (bgColor.alpha < 1) { -1 27010 var parentBg = axs.utils.getParentBgColor(element); -1 27011 if (parentBg == null) -1 27012 return null; -1 27013 -1 27014 bgColor = axs.color.flattenColors(bgColor, parentBg); 6029 27015 }6030 -1 }6031 -1 function _iterableToArray(iter) {6032 -1 if (typeof Symbol !== 'undefined' && Symbol.iterator in Object(iter)) {6033 -1 return Array.from(iter);-1 27016 return bgColor; -1 27017 }; -1 27018 -1 27019 /** -1 27020 * Gets the effective background color of the parent of |element|. -1 27021 * @param {Element} element -1 27022 * @return {?axs.color.Color} -1 27023 */ -1 27024 axs.utils.getParentBgColor = function(element) { -1 27025 /** @type {Element} */ var parent = element; -1 27026 var bgStack = []; -1 27027 var foundSolidColor = null; -1 27028 while ((parent = axs.dom.parentElement(parent))) { -1 27029 var computedStyle = window.getComputedStyle(parent, null); -1 27030 if (!computedStyle) -1 27031 continue; -1 27032 -1 27033 var parentBg = axs.color.parseColor(computedStyle.backgroundColor); -1 27034 if (!parentBg) -1 27035 continue; -1 27036 -1 27037 if (computedStyle.opacity < 1) -1 27038 parentBg.alpha = parentBg.alpha * computedStyle.opacity; -1 27039 -1 27040 if (parentBg.alpha == 0) -1 27041 continue; -1 27042 -1 27043 bgStack.push(parentBg); -1 27044 -1 27045 if (parentBg.alpha == 1) { -1 27046 foundSolidColor = true; -1 27047 break; -1 27048 } 6034 27049 }6035 -1 }6036 -1 function _arrayWithoutHoles(arr) {6037 -1 if (Array.isArray(arr)) {6038 -1 return _arrayLikeToArray(arr);-1 27050 -1 27051 if (!foundSolidColor) -1 27052 bgStack.push(new axs.color.Color(255, 255, 255, 1)); -1 27053 -1 27054 var bg = bgStack.pop(); -1 27055 while (bgStack.length) { -1 27056 var fg = bgStack.pop(); -1 27057 bg = axs.color.flattenColors(fg, bg); 6039 27058 }6040 -1 }6041 -1 function _arrayLikeToArray(arr, len) {6042 -1 if (len == null || len > arr.length) {6043 -1 len = arr.length;-1 27059 return bg; -1 27060 }; -1 27061 -1 27062 /** -1 27063 * @param {CSSStyleDeclaration} style -1 27064 * @param {Element} element -1 27065 * @param {axs.color.Color} bgColor The background color, which may come from -1 27066 * another element (such as a parent element), for flattening into the -1 27067 * foreground color. -1 27068 * @return {?axs.color.Color} -1 27069 */ -1 27070 axs.utils.getFgColor = function(style, element, bgColor) { -1 27071 var fgColorString = style.color; -1 27072 var fgColor = axs.color.parseColor(fgColorString); -1 27073 if (!fgColor) -1 27074 return null; -1 27075 -1 27076 if (fgColor.alpha < 1) -1 27077 fgColor = axs.color.flattenColors(fgColor, bgColor); -1 27078 -1 27079 if (style.opacity < 1) { -1 27080 var parentBg = axs.utils.getParentBgColor(element); -1 27081 fgColor.alpha = fgColor.alpha * style.opacity; -1 27082 fgColor = axs.color.flattenColors(fgColor, parentBg); 6044 27083 }6045 -1 for (var i = 0, arr2 = new Array(len); i < len; i++) {6046 -1 arr2[i] = arr[i];-1 27084 -1 27085 return fgColor; -1 27086 }; -1 27087 -1 27088 /** -1 27089 * @param {Element} element -1 27090 * @return {?number} -1 27091 */ -1 27092 axs.utils.getContrastRatioForElement = function(element) { -1 27093 var style = window.getComputedStyle(element, null); -1 27094 return axs.utils.getContrastRatioForElementWithComputedStyle(style, element); -1 27095 }; -1 27096 -1 27097 /** -1 27098 * @param {CSSStyleDeclaration} style -1 27099 * @param {Element} element -1 27100 * @return {?number} -1 27101 */ -1 27102 axs.utils.getContrastRatioForElementWithComputedStyle = function(style, element) { -1 27103 if (axs.utils.isElementHidden(element)) -1 27104 return null; -1 27105 -1 27106 var bgColor = axs.utils.getBgColor(style, element); -1 27107 if (!bgColor) -1 27108 return null; -1 27109 -1 27110 var fgColor = axs.utils.getFgColor(style, element, bgColor); -1 27111 if (!fgColor) -1 27112 return null; -1 27113 -1 27114 return axs.color.calculateContrastRatio(fgColor, bgColor); -1 27115 }; -1 27116 -1 27117 /** -1 27118 * @param {Element} element -1 27119 * @return {boolean} -1 27120 */ -1 27121 axs.utils.isNativeTextElement = function(element) { -1 27122 var tagName = element.tagName.toLowerCase(); -1 27123 var type = element.type ? element.type.toLowerCase() : ''; -1 27124 if (tagName == 'textarea') -1 27125 return true; -1 27126 if (tagName != 'input') -1 27127 return false; -1 27128 -1 27129 switch (type) { -1 27130 case 'email': -1 27131 case 'number': -1 27132 case 'password': -1 27133 case 'search': -1 27134 case 'text': -1 27135 case 'tel': -1 27136 case 'url': -1 27137 case '': -1 27138 return true; -1 27139 default: -1 27140 return false; 6047 27141 }6048 -1 return arr2;6049 -1 }6050 -1 function _typeof(obj) {6051 -1 '@babel/helpers - typeof';6052 -1 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {6053 -1 _typeof = function _typeof(obj) {6054 -1 return typeof obj;6055 -1 };-1 27142 }; -1 27143 -1 27144 /** -1 27145 * @param {number} contrastRatio -1 27146 * @param {CSSStyleDeclaration} style -1 27147 * @param {boolean=} opt_strict Whether to use AA (false) or AAA (true) level -1 27148 * @return {boolean} -1 27149 */ -1 27150 axs.utils.isLowContrast = function(contrastRatio, style, opt_strict) { -1 27151 // Round to nearest 0.1 -1 27152 var roundedContrastRatio = (Math.round(contrastRatio * 10) / 10); -1 27153 if (!opt_strict) { -1 27154 return roundedContrastRatio < 3.0 || -1 27155 (!axs.utils.isLargeFont(style) && roundedContrastRatio < 4.5); 6056 27156 } else {6057 -1 _typeof = function _typeof(obj) {6058 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;6059 -1 };-1 27157 return roundedContrastRatio < 4.5 || -1 27158 (!axs.utils.isLargeFont(style) && roundedContrastRatio < 7.0); -1 27159 } -1 27160 }; -1 27161 -1 27162 /** -1 27163 * @param {Element} element -1 27164 * @return {boolean} -1 27165 */ -1 27166 axs.utils.hasLabel = function(element) { -1 27167 var tagName = element.tagName.toLowerCase(); -1 27168 var type = element.type ? element.type.toLowerCase() : ''; -1 27169 -1 27170 if (element.hasAttribute('aria-label')) -1 27171 return true; -1 27172 if (element.hasAttribute('title')) -1 27173 return true; -1 27174 if (tagName == 'img' && element.hasAttribute('alt')) -1 27175 return true; -1 27176 if (tagName == 'input' && type == 'image' && element.hasAttribute('alt')) -1 27177 return true; -1 27178 if (tagName == 'input' && (type == 'submit' || type == 'reset')) -1 27179 return true; -1 27180 -1 27181 // There's a separate audit that makes sure this points to an actual element or elements. -1 27182 if (element.hasAttribute('aria-labelledby')) -1 27183 return true; -1 27184 -1 27185 if (element.hasAttribute('id')) { -1 27186 var labelsFor = document.querySelectorAll('label[for="' + element.id + '"]'); -1 27187 if (labelsFor.length > 0) -1 27188 return true; 6060 27189 }6061 -1 return _typeof(obj);6062 -1 }6063 -1 (function(modules) {6064 -1 var installedModules = {};6065 -1 function __webpack_require__(moduleId) {6066 -1 if (installedModules[moduleId]) {6067 -1 return installedModules[moduleId].exports;6068 -1 }6069 -1 var module = installedModules[moduleId] = {6070 -1 i: moduleId,6071 -1 l: false,6072 -1 exports: {}6073 -1 };6074 -1 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);6075 -1 module.l = true;6076 -1 return module.exports;6077 -1 }6078 -1 __webpack_require__.m = modules;6079 -1 __webpack_require__.c = installedModules;6080 -1 __webpack_require__.d = function(exports, name, getter) {6081 -1 if (!__webpack_require__.o(exports, name)) {6082 -1 Object.defineProperty(exports, name, {6083 -1 enumerable: true,6084 -1 get: getter6085 -1 });6086 -1 }6087 -1 };6088 -1 __webpack_require__.r = function(exports) {6089 -1 if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {6090 -1 Object.defineProperty(exports, Symbol.toStringTag, {6091 -1 value: 'Module'6092 -1 });6093 -1 }6094 -1 Object.defineProperty(exports, '__esModule', {6095 -1 value: true6096 -1 });6097 -1 };6098 -1 __webpack_require__.t = function(value, mode) {6099 -1 if (mode & 1) {6100 -1 value = __webpack_require__(value);6101 -1 }6102 -1 if (mode & 8) {6103 -1 return value;6104 -1 }6105 -1 if (mode & 4 && _typeof(value) === 'object' && value && value.__esModule) {6106 -1 return value;6107 -1 }6108 -1 var ns = Object.create(null);6109 -1 __webpack_require__.r(ns);6110 -1 Object.defineProperty(ns, 'default', {6111 -1 enumerable: true,6112 -1 value: value6113 -1 });6114 -1 if (mode & 2 && typeof value != 'string') {6115 -1 for (var key in value) {6116 -1 __webpack_require__.d(ns, key, function(key) {6117 -1 return value[key];6118 -1 }.bind(null, key));6119 -1 }6120 -1 }6121 -1 return ns;6122 -1 };6123 -1 __webpack_require__.n = function(module) {6124 -1 var getter = module && module.__esModule ? function getDefault() {6125 -1 return module['default'];6126 -1 } : function getModuleExports() {6127 -1 return module;6128 -1 };6129 -1 __webpack_require__.d(getter, 'a', getter);6130 -1 return getter;6131 -1 };6132 -1 __webpack_require__.o = function(object, property) {6133 -1 return Object.prototype.hasOwnProperty.call(object, property);6134 -1 };6135 -1 __webpack_require__.p = '';6136 -1 return __webpack_require__(__webpack_require__.s = './lib/core/core.js');6137 -1 })({6138 -1 './lib/checks/aria/abstractrole-evaluate.js': function libChecksAriaAbstractroleEvaluateJs(module, __webpack_exports__, __webpack_require__) {6139 -1 'use strict';6140 -1 __webpack_require__.r(__webpack_exports__);6141 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');6142 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/index.js');6143 -1 function abstractroleEvaluate(node, options, virtualNode) {6144 -1 var abstractRoles = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['tokenList'])(virtualNode.attr('role')).filter(function(role) {6145 -1 return Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['getRoleType'])(role) === 'abstract';6146 -1 });6147 -1 if (abstractRoles.length > 0) {6148 -1 this.data(abstractRoles);6149 -1 return true;6150 -1 }6151 -1 return false;6152 -1 }6153 -1 __webpack_exports__['default'] = abstractroleEvaluate;6154 -1 },6155 -1 './lib/checks/aria/aria-allowed-attr-evaluate.js': function libChecksAriaAriaAllowedAttrEvaluateJs(module, __webpack_exports__, __webpack_require__) {6156 -1 'use strict';6157 -1 __webpack_require__.r(__webpack_exports__);6158 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');6159 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/index.js');6160 -1 function ariaAllowedAttrEvaluate(node, options) {6161 -1 var invalid = [];6162 -1 var role = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['getRole'])(node);6163 -1 var attrs = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['getNodeAttributes'])(node);6164 -1 var allowed = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['allowedAttr'])(role);6165 -1 if (Array.isArray(options[role])) {6166 -1 allowed = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['uniqueArray'])(options[role].concat(allowed));6167 -1 }6168 -1 if (role && allowed) {6169 -1 for (var i = 0; i < attrs.length; i++) {6170 -1 var attr = attrs[i];6171 -1 var attrName = attr.name;6172 -1 if (Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['validateAttr'])(attrName) && !allowed.includes(attrName)) {6173 -1 invalid.push(attrName + '="' + attr.nodeValue + '"');6174 -1 }6175 -1 }6176 -1 }6177 -1 if (invalid.length) {6178 -1 this.data(invalid);6179 -1 return false;-1 27190 -1 27191 var parent = axs.dom.parentElement(element); -1 27192 while (parent) { -1 27193 if (parent.tagName.toLowerCase() == 'label') { -1 27194 var parentLabel = /** HTMLLabelElement */ parent; -1 27195 if (parentLabel.control == element) -1 27196 return true; 6180 27197 } -1 27198 parent = axs.dom.parentElement(parent); -1 27199 } -1 27200 return false; -1 27201 }; -1 27202 -1 27203 /** -1 27204 * Determine if this element natively supports being disabled (i.e. via the `disabled` attribute. -1 27205 * Disabled here means that the element should be considered disabled according to specification. -1 27206 * This element may or may not be effectively disabled in practice as this is dependent on implementation. -1 27207 * -1 27208 * @param {Element} element An element to check. -1 27209 * @return {boolean} true If the element supports being natively disabled. -1 27210 */ -1 27211 axs.utils.isNativelyDisableable = function(element) { -1 27212 var tagName = element.tagName.toUpperCase(); -1 27213 return (tagName in axs.constants.NATIVELY_DISABLEABLE); -1 27214 }; -1 27215 -1 27216 /** -1 27217 * Determine if this element is disabled directly or indirectly by a disabled ancestor. -1 27218 * Disabled here means that the element should be considered disabled according to specification. -1 27219 * This element may or may not be effectively disabled in practice as this is dependent on implementation. -1 27220 * -1 27221 * @param {Element} element An element to check. -1 27222 * @param {boolean=} ignoreAncestors If true do not check for disabled ancestors. -1 27223 * @return {boolean} true if the element or one of its ancestors is disabled. -1 27224 */ -1 27225 axs.utils.isElementDisabled = function(element, ignoreAncestors) { -1 27226 var selector = ignoreAncestors ? '[aria-disabled=true]' : '[aria-disabled=true], [aria-disabled=true] *'; -1 27227 if (axs.browserUtils.matchSelector(element, selector)) { 6181 27228 return true;6182 -1 }6183 -1 __webpack_exports__['default'] = ariaAllowedAttrEvaluate;6184 -1 },6185 -1 './lib/checks/aria/aria-allowed-role-evaluate.js': function libChecksAriaAriaAllowedRoleEvaluateJs(module, __webpack_exports__, __webpack_require__) {6186 -1 'use strict';6187 -1 __webpack_require__.r(__webpack_exports__);6188 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');6189 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/index.js');6190 -1 function ariaAllowedRoledEvaluate(node) {6191 -1 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};6192 -1 var _options$allowImplici = options.allowImplicit, allowImplicit = _options$allowImplici === void 0 ? true : _options$allowImplici, _options$ignoredTags = options.ignoredTags, ignoredTags = _options$ignoredTags === void 0 ? [] : _options$ignoredTags;6193 -1 var tagName = node.nodeName.toUpperCase();6194 -1 if (ignoredTags.map(function(t) {6195 -1 return t.toUpperCase();6196 -1 }).includes(tagName)) {6197 -1 return true;6198 -1 }6199 -1 var unallowedRoles = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['getElementUnallowedRoles'])(node, allowImplicit);6200 -1 if (unallowedRoles.length) {6201 -1 this.data(unallowedRoles);6202 -1 if (!Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isVisible'])(node, true)) {6203 -1 return undefined;6204 -1 }6205 -1 return false;-1 27229 } -1 27230 if (!axs.utils.isNativelyDisableable(element) || -1 27231 axs.browserUtils.matchSelector(element, 'fieldset>legend:first-of-type *')) { -1 27232 return false; -1 27233 } -1 27234 for (var next = element; next !== null; next = axs.dom.parentElement(next)) { -1 27235 if (next.hasAttribute('disabled')) { -1 27236 return true; 6206 27237 }6207 -1 return true;6208 -1 }6209 -1 __webpack_exports__['default'] = ariaAllowedRoledEvaluate;6210 -1 },6211 -1 './lib/checks/aria/aria-errormessage-evaluate.js': function libChecksAriaAriaErrormessageEvaluateJs(module, __webpack_exports__, __webpack_require__) {6212 -1 'use strict';6213 -1 __webpack_require__.r(__webpack_exports__);6214 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');6215 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/index.js');6216 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');6217 -1 function ariaErrormessageEvaluate(node, options) {6218 -1 options = Array.isArray(options) ? options : [];6219 -1 var attr = node.getAttribute('aria-errormessage');6220 -1 var hasAttr = node.hasAttribute('aria-errormessage');6221 -1 var doc = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_1__['getRootNode'])(node);6222 -1 function validateAttrValue(attr) {6223 -1 if (attr.trim() === '') {6224 -1 return _standards__WEBPACK_IMPORTED_MODULE_0__['default'].ariaAttrs['aria-errormessage'].allowEmpty;6225 -1 }6226 -1 var idref = attr && doc.getElementById(attr);6227 -1 if (idref) {6228 -1 return idref.getAttribute('role') === 'alert' || idref.getAttribute('aria-live') === 'assertive' || Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['tokenList'])(node.getAttribute('aria-describedby') || '').indexOf(attr) > -1;6229 -1 }6230 -1 }6231 -1 if (options.indexOf(attr) === -1 && hasAttr) {6232 -1 if (!validateAttrValue(attr)) {6233 -1 this.data(Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['tokenList'])(attr));-1 27238 if (ignoreAncestors) { 6234 27239 return false;6235 -1 }6236 27240 } -1 27241 } -1 27242 return false; -1 27243 }; -1 27244 -1 27245 /** -1 27246 * @param {Element} element An element to check. -1 27247 * @return {boolean} True if the element is hidden from accessibility. -1 27248 */ -1 27249 axs.utils.isElementHidden = function(element) { -1 27250 if (!(element instanceof element.ownerDocument.defaultView.HTMLElement)) -1 27251 return false; -1 27252 -1 27253 if (element.hasAttribute('chromevoxignoreariahidden')) -1 27254 var chromevoxignoreariahidden = true; -1 27255 -1 27256 var style = window.getComputedStyle(element, null); -1 27257 if (style.display == 'none' || style.visibility == 'hidden') 6237 27258 return true;6238 -1 }6239 -1 __webpack_exports__['default'] = ariaErrormessageEvaluate;6240 -1 },6241 -1 './lib/checks/aria/aria-hidden-body-evaluate.js': function libChecksAriaAriaHiddenBodyEvaluateJs(module, __webpack_exports__, __webpack_require__) {6242 -1 'use strict';6243 -1 __webpack_require__.r(__webpack_exports__);6244 -1 function ariaHiddenBodyEvaluate(node, options, virtualNode) {6245 -1 return virtualNode.attr('aria-hidden') !== 'true';6246 -1 }6247 -1 __webpack_exports__['default'] = ariaHiddenBodyEvaluate;6248 -1 },6249 -1 './lib/checks/aria/aria-required-attr-evaluate.js': function libChecksAriaAriaRequiredAttrEvaluateJs(module, __webpack_exports__, __webpack_require__) {6250 -1 'use strict';6251 -1 __webpack_require__.r(__webpack_exports__);6252 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');6253 -1 var _commons_standards__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/standards/index.js');6254 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');6255 -1 function ariaRequiredAttrEvaluate(node) {6256 -1 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};6257 -1 var vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getNodeFromTree'])(node);6258 -1 var missing = [];6259 -1 if (node.hasAttributes()) {6260 -1 var role = node.getAttribute('role');6261 -1 var required = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['requiredAttr'])(role);6262 -1 var elmSpec = Object(_commons_standards__WEBPACK_IMPORTED_MODULE_1__['getElementSpec'])(vNode);6263 -1 if (Array.isArray(options[role])) {6264 -1 required = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['uniqueArray'])(options[role], required);6265 -1 }6266 -1 if (role && required) {6267 -1 for (var i = 0, l = required.length; i < l; i++) {6268 -1 var attr = required[i];6269 -1 if (!node.getAttribute(attr) && !(elmSpec.implicitAttrs && typeof elmSpec.implicitAttrs[attr] !== 'undefined')) {6270 -1 missing.push(attr);6271 -1 }6272 -1 }6273 -1 }6274 -1 }6275 -1 if (missing.length) {6276 -1 this.data(missing);6277 -1 return false;6278 -1 }-1 27259 -1 27260 if (element.hasAttribute('aria-hidden') && -1 27261 element.getAttribute('aria-hidden').toLowerCase() == 'true') { -1 27262 return !chromevoxignoreariahidden; -1 27263 } -1 27264 -1 27265 return false; -1 27266 }; -1 27267 -1 27268 /** -1 27269 * @param {Element} element An element to check. -1 27270 * @return {boolean} True if the element or one of its ancestors is -1 27271 * hidden from accessibility. -1 27272 */ -1 27273 axs.utils.isElementOrAncestorHidden = function(element) { -1 27274 if (axs.utils.isElementHidden(element)) 6279 27275 return true;6280 -1 }6281 -1 __webpack_exports__['default'] = ariaRequiredAttrEvaluate;6282 -1 },6283 -1 './lib/checks/aria/aria-required-children-evaluate.js': function libChecksAriaAriaRequiredChildrenEvaluateJs(module, __webpack_exports__, __webpack_require__) {6284 -1 'use strict';6285 -1 __webpack_require__.r(__webpack_exports__);6286 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');6287 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/index.js');6288 -1 function getOwnedRoles(virtualNode) {6289 -1 var ownedRoles = [];6290 -1 var ownedElements = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['getOwnedVirtual'])(virtualNode);6291 -1 for (var i = 0; i < ownedElements.length; i++) {6292 -1 var ownedElement = ownedElements[i];6293 -1 var role = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['getRole'])(ownedElement);6294 -1 if ([ 'presentation', 'none', null ].includes(role)) {6295 -1 ownedElements.push.apply(ownedElements, _toConsumableArray(ownedElement.children));6296 -1 } else if (role) {6297 -1 ownedRoles.push(role);6298 -1 }6299 -1 }6300 -1 return ownedRoles;6301 -1 }6302 -1 function missingRequiredChildren(virtualNode, role, required, ownedRoles) {6303 -1 var isCombobox = role === 'combobox';6304 -1 if (isCombobox) {6305 -1 var textTypeInputs = [ 'text', 'search', 'email', 'url', 'tel' ];6306 -1 if (virtualNode.props.nodeName === 'input' && textTypeInputs.includes(virtualNode.props.type) || ownedRoles.includes('searchbox')) {6307 -1 required = required.filter(function(requiredRole) {6308 -1 return requiredRole !== 'textbox';6309 -1 });6310 -1 }6311 -1 var expandedChildRoles = [ 'listbox', 'tree', 'grid', 'dialog' ];6312 -1 var expandedValue = virtualNode.attr('aria-expanded');6313 -1 var expanded = expandedValue && expandedValue.toLowerCase() !== 'false';6314 -1 var popupRole = (virtualNode.attr('aria-haspopup') || 'listbox').toLowerCase();6315 -1 required = required.filter(function(requiredRole) {6316 -1 return !expandedChildRoles.includes(requiredRole) || expanded && requiredRole === popupRole;6317 -1 });6318 -1 }6319 -1 for (var i = 0; i < ownedRoles.length; i++) {6320 -1 var ownedRole = ownedRoles[i];6321 -1 if (required.includes(ownedRole)) {6322 -1 required = required.filter(function(requiredRole) {6323 -1 return requiredRole !== ownedRole;6324 -1 });6325 -1 if (!isCombobox) {6326 -1 return null;-1 27276 -1 27277 if (axs.dom.parentElement(element)) -1 27278 return axs.utils.isElementOrAncestorHidden(axs.dom.parentElement(element)); -1 27279 else -1 27280 return false; -1 27281 }; -1 27282 -1 27283 /** -1 27284 * @param {Element} element An element to check -1 27285 * @return {boolean} True if the given element is an inline element, false -1 27286 * otherwise. -1 27287 */ -1 27288 axs.utils.isInlineElement = function(element) { -1 27289 var tagName = element.tagName.toUpperCase(); -1 27290 return axs.constants.InlineElements[tagName]; -1 27291 }; -1 27292 -1 27293 /** -1 27294 * -1 27295 * Gets role details from an element. -1 27296 * @param {Element} element The DOM element whose role we want. -1 27297 * @param {boolean=} implicit if true then implicit semantics will be considered if there is no role attribute. -1 27298 * -1 27299 * @return {Object} -1 27300 */ -1 27301 axs.utils.getRoles = function(element, implicit) { -1 27302 if (!element || element.nodeType !== Node.ELEMENT_NODE || (!element.hasAttribute('role') && !implicit)) -1 27303 return null; -1 27304 var roleValue = element.getAttribute('role'); -1 27305 if (!roleValue && implicit) -1 27306 roleValue = axs.properties.getImplicitRole(element); -1 27307 if (!roleValue) // role='' or implicit role came up empty -1 27308 return null; -1 27309 var roleNames = roleValue.split(' '); -1 27310 var result = { roles: [], valid: false }; -1 27311 for (var i = 0; i < roleNames.length; i++) { -1 27312 var role = roleNames[i]; -1 27313 var ariaRole = axs.constants.ARIA_ROLES[role]; -1 27314 var roleObject = { 'name': role }; -1 27315 if (ariaRole && !ariaRole.abstract) { -1 27316 roleObject.details = ariaRole; -1 27317 if (!result.applied) { -1 27318 result.applied = roleObject; 6327 27319 }6328 -1 }-1 27320 roleObject.valid = result.valid = true; -1 27321 } else { -1 27322 roleObject.valid = false; -1 27323 } -1 27324 result.roles.push(roleObject); -1 27325 } -1 27326 -1 27327 return result; -1 27328 }; -1 27329 -1 27330 /** -1 27331 * @param {!string} propertyName -1 27332 * @param {!string} value -1 27333 * @param {!Element} element -1 27334 * @return {!Object} -1 27335 */ -1 27336 axs.utils.getAriaPropertyValue = function(propertyName, value, element) { -1 27337 var propertyKey = propertyName.replace(/^aria-/, ''); -1 27338 var property = axs.constants.ARIA_PROPERTIES[propertyKey]; -1 27339 var result = { 'name': propertyName, 'rawValue': value }; -1 27340 if (!property) { -1 27341 result.valid = false; -1 27342 result.reason = '"' + propertyName + '" is not a valid ARIA property'; -1 27343 return result; -1 27344 } -1 27345 -1 27346 var propertyType = property.valueType; -1 27347 if (!propertyType) { -1 27348 result.valid = false; -1 27349 result.reason = '"' + propertyName + '" is not a valid ARIA property'; -1 27350 return result; -1 27351 } -1 27352 -1 27353 switch (propertyType) { -1 27354 case "idref": -1 27355 var isValid = axs.utils.isValidIDRefValue(value, element); -1 27356 result.valid = isValid.valid; -1 27357 result.reason = isValid.reason; -1 27358 result.idref = isValid.idref; -1 27359 // falls through -1 27360 case "idref_list": -1 27361 var idrefValues = value.split(/\s+/); -1 27362 result.valid = true; -1 27363 for (var i = 0; i < idrefValues.length; i++) { -1 27364 var refIsValid = axs.utils.isValidIDRefValue(idrefValues[i], element); -1 27365 if (!refIsValid.valid) -1 27366 result.valid = false; -1 27367 if (result.values) -1 27368 result.values.push(refIsValid); -1 27369 else -1 27370 result.values = [refIsValid]; 6329 27371 }6330 -1 if (required.length) {6331 -1 return required;-1 27372 return result; -1 27373 case "integer": -1 27374 var validNumber = axs.utils.isValidNumber(value); -1 27375 if (!validNumber.valid) { -1 27376 result.valid = false; -1 27377 result.reason = validNumber.reason; -1 27378 return result; 6332 27379 }6333 -1 return null;6334 -1 }6335 -1 function ariaRequiredChildrenEvaluate(node, options, virtualNode) {6336 -1 var reviewEmpty = options && Array.isArray(options.reviewEmpty) ? options.reviewEmpty : [];6337 -1 var role = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['getExplicitRole'])(virtualNode, {6338 -1 dpub: true6339 -1 });6340 -1 var required = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['requiredOwned'])(role);6341 -1 if (!required) {6342 -1 return true;-1 27380 if (Math.floor(validNumber.value) !== validNumber.value) { -1 27381 result.valid = false; -1 27382 result.reason = '' + value + ' is not a whole integer'; -1 27383 } else { -1 27384 result.valid = true; -1 27385 result.value = validNumber.value; 6343 27386 }6344 -1 var ownedRoles = getOwnedRoles(virtualNode);6345 -1 var missing = missingRequiredChildren(virtualNode, role, required, ownedRoles);6346 -1 if (!missing) {6347 -1 return true;-1 27387 return result; -1 27388 case "decimal": -1 27389 case "number": -1 27390 var validNumber = axs.utils.isValidNumber(value); -1 27391 result.valid = validNumber.valid; -1 27392 if (!validNumber.valid) { -1 27393 result.reason = validNumber.reason; -1 27394 return result; 6348 27395 }6349 -1 this.data(missing);6350 -1 if (reviewEmpty.includes(role) && !Object(_commons_dom__WEBPACK_IMPORTED_MODULE_1__['hasContentVirtual'])(virtualNode, false, true) && !ownedRoles.length && (!virtualNode.hasAttr('aria-owns') || !Object(_commons_dom__WEBPACK_IMPORTED_MODULE_1__['idrefs'])(node, 'aria-owns').length)) {6351 -1 return undefined;-1 27396 result.value = validNumber.value; -1 27397 return result; -1 27398 case "string": -1 27399 result.valid = true; -1 27400 result.value = value; -1 27401 return result; -1 27402 case "token": -1 27403 var validTokenValue = axs.utils.isValidTokenValue(propertyName, value.toLowerCase()); -1 27404 if (validTokenValue.valid) { -1 27405 result.valid = true; -1 27406 result.value = validTokenValue.value; -1 27407 return result; -1 27408 } else { -1 27409 result.valid = false; -1 27410 result.value = value; -1 27411 result.reason = validTokenValue.reason; -1 27412 return result; 6352 27413 }6353 -1 return false;6354 -1 }6355 -1 __webpack_exports__['default'] = ariaRequiredChildrenEvaluate;6356 -1 },6357 -1 './lib/checks/aria/aria-required-parent-evaluate.js': function libChecksAriaAriaRequiredParentEvaluateJs(module, __webpack_exports__, __webpack_require__) {6358 -1 'use strict';6359 -1 __webpack_require__.r(__webpack_exports__);6360 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');6361 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/index.js');6362 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');6363 -1 function getMissingContext(virtualNode, reqContext, includeElement) {6364 -1 var explicitRole = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['getExplicitRole'])(virtualNode);6365 -1 if (!reqContext) {6366 -1 reqContext = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['requiredContext'])(explicitRole);6367 -1 }6368 -1 if (!reqContext) {6369 -1 return null;-1 27414 // falls through -1 27415 case "token_list": -1 27416 var tokenValues = value.split(/\s+/); -1 27417 result.valid = true; -1 27418 for (var i = 0; i < tokenValues.length; i++) { -1 27419 var validTokenValue = axs.utils.isValidTokenValue(propertyName, tokenValues[i].toLowerCase()); -1 27420 if (!validTokenValue.valid) { -1 27421 result.valid = false; -1 27422 if (result.reason) { -1 27423 result.reason = [ result.reason ]; -1 27424 result.reason.push(validTokenValue.reason); -1 27425 } else { -1 27426 result.reason = validTokenValue.reason; -1 27427 result.possibleValues = validTokenValue.possibleValues; -1 27428 } -1 27429 } -1 27430 // TODO (more structured result) -1 27431 if (result.values) -1 27432 result.values.push(validTokenValue.value); -1 27433 else -1 27434 result.values = [validTokenValue.value]; 6370 27435 }6371 -1 var vNode = includeElement ? virtualNode : virtualNode.parent;6372 -1 while (vNode) {6373 -1 var parentRole = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['getRole'])(vNode);6374 -1 if (reqContext.includes(parentRole)) {6375 -1 return null;6376 -1 } else if (parentRole && ![ 'presentation', 'none' ].includes(parentRole)) {6377 -1 return reqContext;6378 -1 }6379 -1 vNode = vNode.parent;-1 27436 return result; -1 27437 case "tristate": -1 27438 var validTristate = axs.utils.isPossibleValue(value.toLowerCase(), axs.constants.MIXED_VALUES, propertyName); -1 27439 if (validTristate.valid) { -1 27440 result.valid = true; -1 27441 result.value = validTristate.value; -1 27442 } else { -1 27443 result.valid = false; -1 27444 result.value = value; -1 27445 result.reason = validTristate.reason; 6380 27446 }6381 -1 return reqContext;6382 -1 }6383 -1 function getAriaOwners(element) {6384 -1 var owners = [], o = null;6385 -1 while (element) {6386 -1 if (element.getAttribute('id')) {6387 -1 var id = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['escapeSelector'])(element.getAttribute('id'));6388 -1 var doc = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_1__['getRootNode'])(element);6389 -1 o = doc.querySelector('[aria-owns~='.concat(id, ']'));6390 -1 if (o) {6391 -1 owners.push(o);6392 -1 }6393 -1 }6394 -1 element = element.parentElement;-1 27447 return result; -1 27448 case "boolean": -1 27449 var validBoolean = axs.utils.isValidBoolean(value); -1 27450 if (validBoolean.valid) { -1 27451 result.valid = true; -1 27452 result.value = validBoolean.value; -1 27453 } else { -1 27454 result.valid = false; -1 27455 result.value = value; -1 27456 result.reason = validBoolean.reason; -1 27457 } -1 27458 return result; -1 27459 } -1 27460 result.valid = false; -1 27461 result.reason = 'Not a valid ARIA property'; -1 27462 return result; -1 27463 }; -1 27464 -1 27465 /** -1 27466 * @param {string} propertyName The name of the property. -1 27467 * @param {string} value The value to check. -1 27468 * @return {!Object} -1 27469 */ -1 27470 axs.utils.isValidTokenValue = function(propertyName, value) { -1 27471 var propertyKey = propertyName.replace(/^aria-/, ''); -1 27472 var propertyDetails = axs.constants.ARIA_PROPERTIES[propertyKey]; -1 27473 var possibleValues = propertyDetails.valuesSet; -1 27474 return axs.utils.isPossibleValue(value, possibleValues, propertyName); -1 27475 }; -1 27476 -1 27477 /** -1 27478 * @param {string} value -1 27479 * @param {Object.<string, boolean>} possibleValues -1 27480 * @param {string} propertyName The name of the property. -1 27481 * @return {!Object} -1 27482 */ -1 27483 axs.utils.isPossibleValue = function(value, possibleValues, propertyName) { -1 27484 if (!possibleValues[value]) -1 27485 return { 'valid': false, -1 27486 'value': value, -1 27487 'reason': '"' + value + '" is not a valid value for ' + propertyName, -1 27488 'possibleValues': Object.keys(possibleValues) }; -1 27489 return { 'valid': true, 'value': value }; -1 27490 }; -1 27491 -1 27492 /** -1 27493 * @param {string} value -1 27494 * @return {!Object} -1 27495 */ -1 27496 axs.utils.isValidBoolean = function(value) { -1 27497 try { -1 27498 var parsedValue = JSON.parse(value); -1 27499 } catch (e) { -1 27500 parsedValue = ''; -1 27501 } -1 27502 if (typeof(parsedValue) != 'boolean') -1 27503 return { 'valid': false, -1 27504 'value': value, -1 27505 'reason': '"' + value + '" is not a true/false value' }; -1 27506 return { 'valid': true, 'value': parsedValue }; -1 27507 }; -1 27508 -1 27509 /** -1 27510 * @param {string} value -1 27511 * @param {!Element} element -1 27512 * @return {!Object} -1 27513 */ -1 27514 axs.utils.isValidIDRefValue = function(value, element) { -1 27515 if (value.length == 0) -1 27516 return { 'valid': true, 'idref': value }; -1 27517 if (!element.ownerDocument.getElementById(value)) -1 27518 return { 'valid': false, -1 27519 'idref': value, -1 27520 'reason': 'No element with ID "' + value + '"' }; -1 27521 return { 'valid': true, 'idref': value }; -1 27522 }; -1 27523 -1 27524 /** -1 27525 * Tests if a number is real number for a11y purposes. -1 27526 * Must be a real, numerical, decimal value; heavily inspired by -1 27527 * http://www.w3.org/TR/wai-aria/states_and_properties#valuetype_number -1 27528 * @param {string} value -1 27529 * @return {!Object} -1 27530 */ -1 27531 axs.utils.isValidNumber = function(value) { -1 27532 var failResult = { -1 27533 'valid': false, -1 27534 'value': value, -1 27535 'reason': '"' + value + '" is not a number' -1 27536 }; -1 27537 if (!value) { -1 27538 return failResult; -1 27539 } -1 27540 if (/^0x/i.test(value)) { -1 27541 failResult.reason = '"' + value + '" is not a decimal number'; // hex is not accepted -1 27542 return failResult; -1 27543 } -1 27544 var parsedValue = value * 1; -1 27545 if (!isFinite(parsedValue)) { -1 27546 return failResult; -1 27547 } -1 27548 return { 'valid': true, 'value': parsedValue }; -1 27549 }; -1 27550 -1 27551 /** -1 27552 * @param {Element} element -1 27553 * @return {boolean} -1 27554 */ -1 27555 axs.utils.isElementImplicitlyFocusable = function(element) { -1 27556 var defaultView = element.ownerDocument.defaultView; -1 27557 -1 27558 if (element instanceof defaultView.HTMLAnchorElement || -1 27559 element instanceof defaultView.HTMLAreaElement) -1 27560 return element.hasAttribute('href'); -1 27561 if (element instanceof defaultView.HTMLInputElement || -1 27562 element instanceof defaultView.HTMLSelectElement || -1 27563 element instanceof defaultView.HTMLTextAreaElement || -1 27564 element instanceof defaultView.HTMLButtonElement || -1 27565 element instanceof defaultView.HTMLIFrameElement) -1 27566 return !element.disabled; -1 27567 return false; -1 27568 }; -1 27569 -1 27570 /** -1 27571 * Returns an array containing the values of the given JSON-compatible object. -1 27572 * (Simply ignores any function values.) -1 27573 * @param {Object} obj -1 27574 * @return {Array} -1 27575 */ -1 27576 axs.utils.values = function(obj) { -1 27577 var values = []; -1 27578 for (var key in obj) { -1 27579 if (obj.hasOwnProperty(key) && typeof obj[key] != 'function') -1 27580 values.push(obj[key]); -1 27581 } -1 27582 return values; -1 27583 }; -1 27584 -1 27585 /** -1 27586 * Returns an object containing the same keys and values as the given -1 27587 * JSON-compatible object. (Simply ignores any function values.) -1 27588 * @param {Object} obj -1 27589 * @return {Object} -1 27590 */ -1 27591 axs.utils.namedValues = function(obj) { -1 27592 var values = {}; -1 27593 for (var key in obj) { -1 27594 if (obj.hasOwnProperty(key) && typeof obj[key] != 'function') -1 27595 values[key] = obj[key]; -1 27596 } -1 27597 return values; -1 27598 }; -1 27599 -1 27600 /** -1 27601 * Escapes a given ID to be used in a CSS selector -1 27602 * -1 27603 * @private -1 27604 * @param {!string} id The ID to be escaped -1 27605 * @return {string} The escaped ID -1 27606 */ -1 27607 function escapeId(id) { -1 27608 return id.replace(/[^a-zA-Z0-9_-]/g,function(match) { return '\\' + match; }); -1 27609 } -1 27610 -1 27611 /** Gets a CSS selector text for a DOM object. -1 27612 * @param {Node} obj The DOM object. -1 27613 * @return {string} CSS selector text for the DOM object. -1 27614 */ -1 27615 axs.utils.getQuerySelectorText = function(obj) { -1 27616 if (obj == null || obj.tagName == 'HTML') { -1 27617 return 'html'; -1 27618 } else if (obj.tagName == 'BODY') { -1 27619 return 'body'; -1 27620 } -1 27621 -1 27622 if (obj.hasAttribute) { -1 27623 if (obj.id) { -1 27624 return '#' + escapeId(obj.id); -1 27625 } -1 27626 -1 27627 if (obj.className) { -1 27628 var selector = ''; -1 27629 for (var i = 0; i < obj.classList.length; i++) -1 27630 selector += '.' + obj.classList[i]; -1 27631 -1 27632 var total = 0; -1 27633 if (obj.parentNode) { -1 27634 for (i = 0; i < obj.parentNode.children.length; i++) { -1 27635 var similar = obj.parentNode.children[i]; -1 27636 if (axs.browserUtils.matchSelector(similar, selector)) -1 27637 total++; -1 27638 if (similar === obj) -1 27639 break; 6395 27640 }6396 -1 return owners.length ? owners : null;-1 27641 } else { -1 27642 total = 1; 6397 27643 }6398 -1 function ariaRequiredParentEvaluate(node, options, virtualNode) {6399 -1 var missingParents = getMissingContext(virtualNode);6400 -1 if (!missingParents) {6401 -1 return true;6402 -1 }6403 -1 var owners = getAriaOwners(node);6404 -1 if (owners) {6405 -1 for (var i = 0, l = owners.length; i < l; i++) {6406 -1 missingParents = getMissingContext(Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getNodeFromTree'])(owners[i]), missingParents, true);6407 -1 if (!missingParents) {6408 -1 return true;6409 -1 }6410 -1 }6411 -1 }6412 -1 this.data(missingParents);6413 -1 return false;-1 27644 -1 27645 if (total == 1) { -1 27646 return axs.utils.getQuerySelectorText(obj.parentNode) + -1 27647 ' > ' + selector; 6414 27648 }6415 -1 __webpack_exports__['default'] = ariaRequiredParentEvaluate;6416 -1 },6417 -1 './lib/checks/aria/aria-roledescription-evaluate.js': function libChecksAriaAriaRoledescriptionEvaluateJs(module, __webpack_exports__, __webpack_require__) {6418 -1 'use strict';6419 -1 __webpack_require__.r(__webpack_exports__);6420 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');6421 -1 function ariaRoledescriptionEvaluate(node) {6422 -1 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};6423 -1 var role = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['getRole'])(node);6424 -1 var supportedRoles = options.supportedRoles || [];6425 -1 if (supportedRoles.includes(role)) {6426 -1 return true;6427 -1 }6428 -1 if (role && role !== 'presentation' && role !== 'none') {6429 -1 return undefined;-1 27649 } -1 27650 -1 27651 if (obj.parentNode) { -1 27652 var similarTags = obj.parentNode.children; -1 27653 var total = 1; -1 27654 var i = 0; -1 27655 while (similarTags[i] !== obj) { -1 27656 if (similarTags[i].tagName == obj.tagName) { -1 27657 total++; 6430 27658 }6431 -1 return false;-1 27659 i++; 6432 27660 }6433 -1 __webpack_exports__['default'] = ariaRoledescriptionEvaluate;6434 -1 },6435 -1 './lib/checks/aria/aria-unsupported-attr-evaluate.js': function libChecksAriaAriaUnsupportedAttrEvaluateJs(module, __webpack_exports__, __webpack_require__) {6436 -1 'use strict';6437 -1 __webpack_require__.r(__webpack_exports__);6438 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');6439 -1 var _standards__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/standards/index.js');6440 -1 var _commons_matches__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/matches/index.js');6441 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/index.js');6442 -1 function ariaUnsupportedAttrEvaluate(node) {6443 -1 var unsupportedAttrs = Array.from(Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['getNodeAttributes'])(node)).filter(function(_ref) {6444 -1 var name = _ref.name;6445 -1 var attribute = _standards__WEBPACK_IMPORTED_MODULE_1__['default'].ariaAttrs[name];6446 -1 if (!Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['validateAttr'])(name)) {6447 -1 return false;6448 -1 }6449 -1 var unsupported = attribute.unsupported;6450 -1 if (_typeof(unsupported) !== 'object') {6451 -1 return !!unsupported;6452 -1 }6453 -1 return !Object(_commons_matches__WEBPACK_IMPORTED_MODULE_2__['default'])(node, unsupported.exceptions);6454 -1 }).map(function(candidate) {6455 -1 return candidate.name.toString();6456 -1 });6457 -1 if (unsupportedAttrs.length) {6458 -1 this.data(unsupportedAttrs);6459 -1 return true;6460 -1 }6461 -1 return false;-1 27661 -1 27662 var next = ''; -1 27663 if (obj.parentNode.tagName != 'BODY') { -1 27664 next = axs.utils.getQuerySelectorText(obj.parentNode) + -1 27665 ' > '; 6462 27666 }6463 -1 __webpack_exports__['default'] = ariaUnsupportedAttrEvaluate;6464 -1 },6465 -1 './lib/checks/aria/aria-valid-attr-evaluate.js': function libChecksAriaAriaValidAttrEvaluateJs(module, __webpack_exports__, __webpack_require__) {6466 -1 'use strict';6467 -1 __webpack_require__.r(__webpack_exports__);6468 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');6469 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');6470 -1 function ariaValidAttrEvaluate(node, options) {6471 -1 options = Array.isArray(options.value) ? options.value : [];6472 -1 var invalid = [], aria = /^aria-/;6473 -1 var attr, attrs = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeAttributes'])(node);6474 -1 for (var i = 0, l = attrs.length; i < l; i++) {6475 -1 attr = attrs[i].name;6476 -1 if (options.indexOf(attr) === -1 && aria.test(attr) && !Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['validateAttr'])(attr)) {6477 -1 invalid.push(attr);6478 -1 }6479 -1 }6480 -1 if (invalid.length) {6481 -1 this.data(invalid);6482 -1 return false;6483 -1 }6484 -1 return true;-1 27667 -1 27668 if (total == 1) { -1 27669 return next + -1 27670 obj.tagName; -1 27671 } else { -1 27672 return next + -1 27673 obj.tagName + -1 27674 ':nth-of-type(' + total + ')'; 6485 27675 }6486 -1 __webpack_exports__['default'] = ariaValidAttrEvaluate;6487 -1 },6488 -1 './lib/checks/aria/aria-valid-attr-value-evaluate.js': function libChecksAriaAriaValidAttrValueEvaluateJs(module, __webpack_exports__, __webpack_require__) {6489 -1 'use strict';6490 -1 __webpack_require__.r(__webpack_exports__);6491 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');6492 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');6493 -1 function ariaValidAttrValueEvaluate(node, options) {6494 -1 options = Array.isArray(options.value) ? options.value : [];6495 -1 var needsReview = '';6496 -1 var messageKey = '';6497 -1 var invalid = [];6498 -1 var aria = /^aria-/;6499 -1 var attrs = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeAttributes'])(node);6500 -1 var skipAttrs = [ 'aria-errormessage' ];6501 -1 var preChecks = {6502 -1 'aria-controls': function ariaControls() {6503 -1 return node.getAttribute('aria-expanded') !== 'false' && node.getAttribute('aria-selected') !== 'false';6504 -1 },6505 -1 'aria-current': function ariaCurrent() {6506 -1 if (!Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['validateAttrValue'])(node, 'aria-current')) {6507 -1 needsReview = 'aria-current="'.concat(node.getAttribute('aria-current'), '"');6508 -1 messageKey = 'ariaCurrent';6509 -1 }6510 -1 return;6511 -1 },6512 -1 'aria-owns': function ariaOwns() {6513 -1 return node.getAttribute('aria-expanded') !== 'false';6514 -1 },6515 -1 'aria-describedby': function ariaDescribedby() {6516 -1 if (!Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['validateAttrValue'])(node, 'aria-describedby')) {6517 -1 needsReview = 'aria-describedby="'.concat(node.getAttribute('aria-describedby'), '"');6518 -1 messageKey = 'noId';-1 27676 } -1 27677 -1 27678 } else if (obj.selectorText) { -1 27679 return obj.selectorText; -1 27680 } -1 27681 -1 27682 return ''; -1 27683 }; -1 27684 -1 27685 /** -1 27686 * Gets elements that refer to this element in an ARIA attribute that takes an ID reference list or -1 27687 * single ID reference. -1 27688 * @param {Element} element a potential referent. -1 27689 * @param {string=} opt_attributeName Name of an ARIA attribute to limit the results to, e.g. 'aria-owns'. -1 27690 * @return {NodeList} The elements that refer to this element or null. -1 27691 */ -1 27692 axs.utils.getAriaIdReferrers = function(element, opt_attributeName) { -1 27693 var propertyToSelector = function(propertyKey) { -1 27694 var propertyDetails = axs.constants.ARIA_PROPERTIES[propertyKey]; -1 27695 if (propertyDetails) { -1 27696 if (propertyDetails.valueType === ('idref')) { -1 27697 return '[aria-' + propertyKey + '=\'' + id + '\']'; -1 27698 } else if (propertyDetails.valueType === ('idref_list')) { -1 27699 return '[aria-' + propertyKey + '~=\'' + id + '\']'; 6519 27700 }6520 -1 return;6521 -1 }6522 -1 };6523 -1 for (var i = 0, l = attrs.length; i < l; i++) {6524 -1 var attr = attrs[i];6525 -1 var attrName = attr.name;6526 -1 if (!skipAttrs.includes(attrName) && options.indexOf(attrName) === -1 && aria.test(attrName) && (preChecks[attrName] ? preChecks[attrName]() : true) && !Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['validateAttrValue'])(node, attrName)) {6527 -1 invalid.push(''.concat(attrName, '="').concat(attr.nodeValue, '"'));6528 -1 }6529 -1 }6530 -1 if (needsReview) {6531 -1 this.data({6532 -1 messageKey: messageKey,6533 -1 needsReview: needsReview6534 -1 });6535 -1 return undefined;6536 -1 }6537 -1 if (invalid.length) {6538 -1 this.data(invalid);6539 -1 return false;6540 -1 }6541 -1 return true;6542 -1 }6543 -1 __webpack_exports__['default'] = ariaValidAttrValueEvaluate;6544 -1 },6545 -1 './lib/checks/aria/fallbackrole-evaluate.js': function libChecksAriaFallbackroleEvaluateJs(module, __webpack_exports__, __webpack_require__) {6546 -1 'use strict';6547 -1 __webpack_require__.r(__webpack_exports__);6548 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');6549 -1 function fallbackroleEvaluate(node, options, virtualNode) {6550 -1 return Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['tokenList'])(virtualNode.attr('role')).length > 1;6551 -1 }6552 -1 __webpack_exports__['default'] = fallbackroleEvaluate;6553 -1 },6554 -1 './lib/checks/aria/has-widget-role-evaluate.js': function libChecksAriaHasWidgetRoleEvaluateJs(module, __webpack_exports__, __webpack_require__) {6555 -1 'use strict';6556 -1 __webpack_require__.r(__webpack_exports__);6557 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');6558 -1 function hasWidgetRoleEvaluate(node) {6559 -1 var role = node.getAttribute('role');6560 -1 if (role === null) {6561 -1 return false;6562 27701 }6563 -1 var roleType = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['getRoleType'])(role);6564 -1 return roleType === 'widget' || roleType === 'composite';6565 -1 }6566 -1 __webpack_exports__['default'] = hasWidgetRoleEvaluate;6567 -1 },6568 -1 './lib/checks/aria/invalidrole-evaluate.js': function libChecksAriaInvalidroleEvaluateJs(module, __webpack_exports__, __webpack_require__) {6569 -1 'use strict';6570 -1 __webpack_require__.r(__webpack_exports__);6571 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');6572 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');6573 -1 function invalidroleEvaluate(node, options, virtualNode) {6574 -1 var allRoles = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['tokenList'])(virtualNode.attr('role'));6575 -1 var allInvalid = allRoles.every(function(role) {6576 -1 return !Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['isValidRole'])(role, {6577 -1 allowAbstract: true6578 -1 });6579 -1 });6580 -1 if (allInvalid) {6581 -1 this.data(allRoles);6582 -1 return true;6583 -1 }6584 -1 return false;6585 -1 }6586 -1 __webpack_exports__['default'] = invalidroleEvaluate;6587 -1 },6588 -1 './lib/checks/aria/no-implicit-explicit-label-evaluate.js': function libChecksAriaNoImplicitExplicitLabelEvaluateJs(module, __webpack_exports__, __webpack_require__) {6589 -1 'use strict';6590 -1 __webpack_require__.r(__webpack_exports__);6591 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');6592 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/index.js');6593 -1 function noImplicitExplicitLabelEvaluate(node, options, virtualNode) {6594 -1 var role = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['getRole'])(virtualNode, {6595 -1 noImplicit: true6596 -1 });6597 -1 this.data(role);6598 -1 try {6599 -1 var label = Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['sanitize'])(Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['labelText'])(virtualNode)).toLowerCase();6600 -1 var accText = Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['sanitize'])(Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['accessibleTextVirtual'])(virtualNode)).toLowerCase();6601 -1 if (!accText && !label) {6602 -1 return false;6603 -1 }6604 -1 if (!accText && label) {6605 -1 return undefined;6606 -1 }6607 -1 if (!accText.includes(label)) {6608 -1 return undefined;6609 -1 }6610 -1 return false;6611 -1 } catch (e) {6612 -1 return undefined;6613 -1 }6614 -1 }6615 -1 __webpack_exports__['default'] = noImplicitExplicitLabelEvaluate;6616 -1 },6617 -1 './lib/checks/aria/unsupportedrole-evaluate.js': function libChecksAriaUnsupportedroleEvaluateJs(module, __webpack_exports__, __webpack_require__) {6618 -1 'use strict';6619 -1 __webpack_require__.r(__webpack_exports__);6620 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');6621 -1 function unsupportedroleEvaluate(node) {6622 -1 return Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['isUnsupportedRole'])(Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['getRole'])(node));6623 -1 }6624 -1 __webpack_exports__['default'] = unsupportedroleEvaluate;6625 -1 },6626 -1 './lib/checks/aria/valid-scrollable-semantics-evaluate.js': function libChecksAriaValidScrollableSemanticsEvaluateJs(module, __webpack_exports__, __webpack_require__) {6627 -1 'use strict';6628 -1 __webpack_require__.r(__webpack_exports__);6629 -1 var VALID_TAG_NAMES_FOR_SCROLLABLE_REGIONS = {6630 -1 ARTICLE: true,6631 -1 ASIDE: true,6632 -1 NAV: true,6633 -1 SECTION: true6634 -1 };6635 -1 var VALID_ROLES_FOR_SCROLLABLE_REGIONS = {6636 -1 application: true,6637 -1 banner: false,6638 -1 complementary: true,6639 -1 contentinfo: true,6640 -1 form: true,6641 -1 main: true,6642 -1 navigation: true,6643 -1 region: true,6644 -1 search: false6645 -1 };6646 -1 function validScrollableTagName(node) {6647 -1 var nodeName = node.nodeName.toUpperCase();6648 -1 return VALID_TAG_NAMES_FOR_SCROLLABLE_REGIONS[nodeName] || false;6649 -1 }6650 -1 function validScrollableRole(node) {6651 -1 var role = node.getAttribute('role');6652 -1 if (!role) {6653 -1 return false;6654 -1 }6655 -1 return VALID_ROLES_FOR_SCROLLABLE_REGIONS[role.toLowerCase()] || false;6656 -1 }6657 -1 function validScrollableSemanticsEvaluate(node) {6658 -1 return validScrollableRole(node) || validScrollableTagName(node);6659 -1 }6660 -1 __webpack_exports__['default'] = validScrollableSemanticsEvaluate;6661 -1 },6662 -1 './lib/checks/color/color-contrast-evaluate.js': function libChecksColorColorContrastEvaluateJs(module, __webpack_exports__, __webpack_require__) {6663 -1 'use strict';6664 -1 __webpack_require__.r(__webpack_exports__);6665 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');6666 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/index.js');6667 -1 var _commons_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/color/index.js');6668 -1 function colorContrastEvaluate(node, options, virtualNode) {6669 -1 if (!Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isVisible'])(node, false)) {6670 -1 return true;6671 -1 }6672 -1 var ignoreUnicode = options.ignoreUnicode, ignoreLength = options.ignoreLength, boldValue = options.boldValue, boldTextPt = options.boldTextPt, largeTextPt = options.largeTextPt, contrastRatio = options.contrastRatio;6673 -1 var visibleText = Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['visibleVirtual'])(virtualNode, false, true);6674 -1 var textContainsOnlyUnicode = Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['hasUnicode'])(visibleText, {6675 -1 nonBmp: true6676 -1 }) && Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['sanitize'])(Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['removeUnicode'])(visibleText, {6677 -1 nonBmp: true6678 -1 })) === '';6679 -1 if (textContainsOnlyUnicode && ignoreUnicode) {6680 -1 this.data({6681 -1 messageKey: 'nonBmp'6682 -1 });6683 -1 return undefined;6684 -1 }6685 -1 var bgNodes = [];6686 -1 var bgColor = Object(_commons_color__WEBPACK_IMPORTED_MODULE_2__['getBackgroundColor'])(node, bgNodes);6687 -1 var fgColor = Object(_commons_color__WEBPACK_IMPORTED_MODULE_2__['getForegroundColor'])(node, false, bgColor);6688 -1 var nodeStyle = window.getComputedStyle(node);6689 -1 var fontSize = parseFloat(nodeStyle.getPropertyValue('font-size'));6690 -1 var fontWeight = nodeStyle.getPropertyValue('font-weight');6691 -1 var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold';6692 -1 var contrast = Object(_commons_color__WEBPACK_IMPORTED_MODULE_2__['getContrast'])(bgColor, fgColor);6693 -1 var ptSize = Math.ceil(fontSize * 72) / 96;6694 -1 var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;6695 -1 var _ref2 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref2.expected, minThreshold = _ref2.minThreshold, maxThreshold = _ref2.maxThreshold;6696 -1 var isValid = contrast > expected;6697 -1 if (typeof minThreshold === 'number' && contrast < minThreshold || typeof maxThreshold === 'number' && contrast > maxThreshold) {6698 -1 return true;6699 -1 }6700 -1 var truncatedResult = Math.floor(contrast * 100) / 100;6701 -1 var missing;6702 -1 if (bgColor === null) {6703 -1 missing = _commons_color__WEBPACK_IMPORTED_MODULE_2__['incompleteData'].get('bgColor');6704 -1 }6705 -1 var equalRatio = truncatedResult === 1;6706 -1 var shortTextContent = visibleText.length === 1;6707 -1 if (equalRatio) {6708 -1 missing = _commons_color__WEBPACK_IMPORTED_MODULE_2__['incompleteData'].set('bgColor', 'equalRatio');6709 -1 } else if (shortTextContent && !ignoreLength) {6710 -1 missing = 'shortTextContent';6711 -1 }6712 -1 var data = {6713 -1 fgColor: fgColor ? fgColor.toHexString() : undefined,6714 -1 bgColor: bgColor ? bgColor.toHexString() : undefined,6715 -1 contrastRatio: truncatedResult,6716 -1 fontSize: ''.concat((fontSize * 72 / 96).toFixed(1), 'pt (').concat(fontSize, 'px)'),6717 -1 fontWeight: bold ? 'bold' : 'normal',6718 -1 messageKey: missing,6719 -1 expectedContrastRatio: expected + ':1'6720 -1 };6721 -1 this.data(data);6722 -1 if (fgColor === null || bgColor === null || equalRatio || shortTextContent && !ignoreLength && !isValid) {6723 -1 missing = null;6724 -1 _commons_color__WEBPACK_IMPORTED_MODULE_2__['incompleteData'].clear();6725 -1 this.relatedNodes(bgNodes);6726 -1 return undefined;6727 -1 }6728 -1 if (!isValid) {6729 -1 this.relatedNodes(bgNodes);6730 -1 }6731 -1 return isValid;6732 -1 }6733 -1 __webpack_exports__['default'] = colorContrastEvaluate;6734 -1 },6735 -1 './lib/checks/color/link-in-text-block-evaluate.js': function libChecksColorLinkInTextBlockEvaluateJs(module, __webpack_exports__, __webpack_require__) {6736 -1 'use strict';6737 -1 __webpack_require__.r(__webpack_exports__);6738 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');6739 -1 var _commons_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/color/index.js');6740 -1 function getContrast(color1, color2) {6741 -1 var c1lum = color1.getRelativeLuminance();6742 -1 var c2lum = color2.getRelativeLuminance();6743 -1 return (Math.max(c1lum, c2lum) + .05) / (Math.min(c1lum, c2lum) + .05);6744 -1 }6745 -1 var blockLike = [ 'block', 'list-item', 'table', 'flex', 'grid', 'inline-block' ];6746 -1 function isBlock(elm) {6747 -1 var display = window.getComputedStyle(elm).getPropertyValue('display');6748 -1 return blockLike.indexOf(display) !== -1 || display.substr(0, 6) === 'table-';6749 -1 }6750 -1 function linkInTextBlockEvaluate(node) {6751 -1 if (isBlock(node)) {6752 -1 return false;-1 27702 return ''; -1 27703 }; -1 27704 if (!element) -1 27705 return null; -1 27706 var id = element.id; -1 27707 if (!id) -1 27708 return null; -1 27709 id = id.replace(/'/g, "\\'"); // make it safe to use in a selector -1 27710 -1 27711 if (opt_attributeName) { -1 27712 var propertyKey = opt_attributeName.replace(/^aria-/, ''); -1 27713 var referrerQuery = propertyToSelector(propertyKey); -1 27714 if (referrerQuery) { -1 27715 return element.ownerDocument.querySelectorAll(referrerQuery); 6753 27716 }6754 -1 var parentBlock = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getComposedParent'])(node);6755 -1 while (parentBlock.nodeType === 1 && !isBlock(parentBlock)) {6756 -1 parentBlock = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getComposedParent'])(parentBlock);-1 27717 } else { -1 27718 var selectors = []; -1 27719 for (var propertyKey in axs.constants.ARIA_PROPERTIES) { -1 27720 var referrerQuery = propertyToSelector(propertyKey); -1 27721 if (referrerQuery) { -1 27722 selectors.push(referrerQuery); -1 27723 } 6757 27724 }6758 -1 this.relatedNodes([ parentBlock ]);6759 -1 if (Object(_commons_color__WEBPACK_IMPORTED_MODULE_1__['elementIsDistinct'])(node, parentBlock)) {6760 -1 return true;6761 -1 } else {6762 -1 var nodeColor, parentColor;6763 -1 nodeColor = Object(_commons_color__WEBPACK_IMPORTED_MODULE_1__['getForegroundColor'])(node);6764 -1 parentColor = Object(_commons_color__WEBPACK_IMPORTED_MODULE_1__['getForegroundColor'])(parentBlock);6765 -1 if (!nodeColor || !parentColor) {6766 -1 return undefined;6767 -1 }6768 -1 var contrast = getContrast(nodeColor, parentColor);6769 -1 if (contrast === 1) {6770 -1 return true;6771 -1 } else if (contrast >= 3) {6772 -1 _commons_color__WEBPACK_IMPORTED_MODULE_1__['incompleteData'].set('fgColor', 'bgContrast');6773 -1 this.data({6774 -1 messageKey: _commons_color__WEBPACK_IMPORTED_MODULE_1__['incompleteData'].get('fgColor')6775 -1 });6776 -1 _commons_color__WEBPACK_IMPORTED_MODULE_1__['incompleteData'].clear();6777 -1 return undefined;6778 -1 }6779 -1 nodeColor = Object(_commons_color__WEBPACK_IMPORTED_MODULE_1__['getBackgroundColor'])(node);6780 -1 parentColor = Object(_commons_color__WEBPACK_IMPORTED_MODULE_1__['getBackgroundColor'])(parentBlock);6781 -1 if (!nodeColor || !parentColor || getContrast(nodeColor, parentColor) >= 3) {6782 -1 var reason;6783 -1 if (!nodeColor || !parentColor) {6784 -1 reason = _commons_color__WEBPACK_IMPORTED_MODULE_1__['incompleteData'].get('bgColor');6785 -1 } else {6786 -1 reason = 'bgContrast';-1 27725 return element.ownerDocument.querySelectorAll(selectors.join(',')); -1 27726 } -1 27727 return null; -1 27728 }; -1 27729 -1 27730 /** -1 27731 * Gets elements that refer to this element in an HTML attribute that takes an ID reference list or -1 27732 * single ID reference. -1 27733 * @param {Element} element a potential referent. -1 27734 * @return {NodeList} The elements that refer to this element. -1 27735 */ -1 27736 axs.utils.getHtmlIdReferrers = function(element) { -1 27737 if (!element) -1 27738 return null; -1 27739 var id = element.id; -1 27740 if (!id) -1 27741 return null; -1 27742 id = id.replace(/'/g, "\\'"); // make it safe to use in a selector -1 27743 var selectorTemplates = [ -1 27744 '[contextmenu=\'{id}\']', -1 27745 '[itemref~=\'{id}\']', -1 27746 'button[form=\'{id}\']', -1 27747 'button[menu=\'{id}\']', -1 27748 'fieldset[form=\'{id}\']', -1 27749 'input[form=\'{id}\']', -1 27750 'input[list=\'{id}\']', -1 27751 'keygen[form=\'{id}\']', -1 27752 'label[for=\'{id}\']', -1 27753 'label[form=\'{id}\']', -1 27754 'menuitem[command=\'{id}\']', -1 27755 'object[form=\'{id}\']', -1 27756 'output[for~=\'{id}\']', -1 27757 'output[form=\'{id}\']', -1 27758 'select[form=\'{id}\']', -1 27759 'td[headers~=\'{id}\']', -1 27760 'textarea[form=\'{id}\']', -1 27761 'tr[headers~=\'{id}\']']; -1 27762 var selectors = selectorTemplates.map(function(selector) { -1 27763 return selector.replace('\{id\}', id); -1 27764 }); -1 27765 return element.ownerDocument.querySelectorAll(selectors.join(',')); -1 27766 }; -1 27767 -1 27768 /** -1 27769 * Gets a list of all IDs this element references in either ARIA or HTML attributes. -1 27770 * -1 27771 * @param {Element} element The element to check for idref attributes. -1 27772 * @returns {Array.<string>} Any IDs this element references. -1 27773 */ -1 27774 axs.utils.getReferencedIds = function(element) { -1 27775 var result = []; -1 27776 var addResult = function(ids) { -1 27777 if (ids) { -1 27778 if (ids.indexOf(' ') > 0) { -1 27779 result = result.concat(attrib.value.split(' ')); -1 27780 } else { -1 27781 result.push(ids); -1 27782 } 6787 27783 }6788 -1 _commons_color__WEBPACK_IMPORTED_MODULE_1__['incompleteData'].set('fgColor', reason);6789 -1 this.data({6790 -1 messageKey: _commons_color__WEBPACK_IMPORTED_MODULE_1__['incompleteData'].get('fgColor')6791 -1 });6792 -1 _commons_color__WEBPACK_IMPORTED_MODULE_1__['incompleteData'].clear();6793 -1 return undefined;6794 -1 }6795 -1 }6796 -1 return false;6797 -1 }6798 -1 __webpack_exports__['default'] = linkInTextBlockEvaluate;6799 -1 },6800 -1 './lib/checks/forms/autocomplete-appropriate-evaluate.js': function libChecksFormsAutocompleteAppropriateEvaluateJs(module, __webpack_exports__, __webpack_require__) {6801 -1 'use strict';6802 -1 __webpack_require__.r(__webpack_exports__);6803 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');6804 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');6805 -1 function autocompleteAppropriateEvaluate(node, options, virtualNode) {6806 -1 if (virtualNode.props.nodeName !== 'input') {6807 -1 return true;6808 -1 }6809 -1 var number = [ 'text', 'search', 'number' ];6810 -1 var url = [ 'text', 'search', 'url' ];6811 -1 var allowedTypesMap = {6812 -1 bday: [ 'text', 'search', 'date' ],6813 -1 email: [ 'text', 'search', 'email' ],6814 -1 'cc-exp': [ 'text', 'search', 'month' ],6815 -1 'street-address': [ 'text' ],6816 -1 tel: [ 'text', 'search', 'tel' ],6817 -1 'tel-country-code': [ 'text', 'search', 'tel' ],6818 -1 'tel-national': [ 'text', 'search', 'tel' ],6819 -1 'tel-area-code': [ 'text', 'search', 'tel' ],6820 -1 'tel-local': [ 'text', 'search', 'tel' ],6821 -1 'tel-local-prefix': [ 'text', 'search', 'tel' ],6822 -1 'tel-local-suffix': [ 'text', 'search', 'tel' ],6823 -1 'tel-extension': [ 'text', 'search', 'tel' ],6824 -1 'cc-exp-month': number,6825 -1 'cc-exp-year': number,6826 -1 'transaction-amount': number,6827 -1 'bday-day': number,6828 -1 'bday-month': number,6829 -1 'bday-year': number,6830 -1 'new-password': [ 'text', 'search', 'password' ],6831 -1 'current-password': [ 'text', 'search', 'password' ],6832 -1 url: url,6833 -1 photo: url,6834 -1 impp: url6835 27784 };6836 -1 if (_typeof(options) === 'object') {6837 -1 Object.keys(options).forEach(function(key) {6838 -1 if (!allowedTypesMap[key]) {6839 -1 allowedTypesMap[key] = [];-1 27785 for (var i = 0; i < element.attributes.length; i++) { -1 27786 var tagName = element.tagName.toLowerCase(); -1 27787 var attrib = element.attributes[i]; -1 27788 if (attrib.specified) { -1 27789 var attribName = attrib.name; -1 27790 var ariaAttr = attribName.match(/aria-(.+)/); -1 27791 if (ariaAttr) { -1 27792 var details = axs.constants.ARIA_PROPERTIES[ariaAttr[1]]; -1 27793 if (details && (details.valueType === ('idref') || details.valueType === ('idref_list'))) { -1 27794 addResult(attrib.value); -1 27795 } -1 27796 continue; -1 27797 } -1 27798 switch (attribName) { -1 27799 case 'contextmenu': -1 27800 case 'itemref': -1 27801 addResult(attrib.value); -1 27802 break; -1 27803 case 'form': -1 27804 if (tagName == 'button' || tagName == 'fieldset' || tagName == 'input' || -1 27805 tagName == 'keygen' || tagName == 'label' || tagName == 'object' || -1 27806 tagName == 'output' || tagName == 'select' || tagName == 'textarea') { -1 27807 addResult(attrib.value); -1 27808 } -1 27809 break; -1 27810 case 'for': -1 27811 if (tagName == 'label' || tagName == 'output') { -1 27812 addResult(attrib.value); -1 27813 } -1 27814 break; -1 27815 case 'menu': -1 27816 if (tagName == 'button') { -1 27817 addResult(attrib.value); -1 27818 } -1 27819 break; -1 27820 case 'list': -1 27821 if (tagName == 'input') { -1 27822 addResult(attrib.value); -1 27823 } -1 27824 break; -1 27825 case 'command': -1 27826 if (tagName == 'menuitem') { -1 27827 addResult(attrib.value); -1 27828 } -1 27829 break; -1 27830 case 'headers': -1 27831 if (tagName == 'td' || tagName == 'tr') { -1 27832 addResult(attrib.value); -1 27833 } -1 27834 break; 6840 27835 }6841 -1 allowedTypesMap[key] = allowedTypesMap[key].concat(options[key]);6842 -1 });6843 -1 }6844 -1 var autocompleteAttr = virtualNode.attr('autocomplete');6845 -1 var autocompleteTerms = autocompleteAttr.split(/\s+/g).map(function(term) {6846 -1 return term.toLowerCase();6847 -1 });6848 -1 var purposeTerm = autocompleteTerms[autocompleteTerms.length - 1];6849 -1 if (_commons_text__WEBPACK_IMPORTED_MODULE_0__['autocomplete'].stateTerms.includes(purposeTerm)) {6850 -1 return true;6851 -1 }6852 -1 var allowedTypes = allowedTypesMap[purposeTerm];6853 -1 var type = virtualNode.hasAttr('type') ? Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['sanitize'])(virtualNode.attr('type')).toLowerCase() : 'text';6854 -1 type = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['validInputTypes'])().includes(type) ? type : 'text';6855 -1 if (typeof allowedTypes === 'undefined') {6856 -1 return type === 'text';6857 -1 }6858 -1 return allowedTypes.includes(type);6859 -1 }6860 -1 __webpack_exports__['default'] = autocompleteAppropriateEvaluate;6861 -1 },6862 -1 './lib/checks/forms/autocomplete-valid-evaluate.js': function libChecksFormsAutocompleteValidEvaluateJs(module, __webpack_exports__, __webpack_require__) {6863 -1 'use strict';6864 -1 __webpack_require__.r(__webpack_exports__);6865 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');6866 -1 function autocompleteValidEvaluate(node, options, virtualNode) {6867 -1 var autocomplete = virtualNode.attr('autocomplete') || '';6868 -1 return Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['isValidAutocomplete'])(autocomplete, options);6869 -1 }6870 -1 __webpack_exports__['default'] = autocompleteValidEvaluate;6871 -1 },6872 -1 './lib/checks/generic/attr-non-space-content-evaluate.js': function libChecksGenericAttrNonSpaceContentEvaluateJs(module, __webpack_exports__, __webpack_require__) {6873 -1 'use strict';6874 -1 __webpack_require__.r(__webpack_exports__);6875 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');6876 -1 function attrNonSpaceContentEvaluate(node) {6877 -1 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};6878 -1 var vNode = arguments.length > 2 ? arguments[2] : undefined;6879 -1 if (!options.attribute || typeof options.attribute !== 'string') {6880 -1 throw new TypeError('attr-non-space-content requires options.attribute to be a string');6881 -1 }6882 -1 var attribute = vNode.attr(options.attribute) || '';6883 -1 return !!Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['sanitize'])(attribute.trim());6884 -1 }6885 -1 __webpack_exports__['default'] = attrNonSpaceContentEvaluate;6886 -1 },6887 -1 './lib/checks/generic/has-descendant-after.js': function libChecksGenericHasDescendantAfterJs(module, __webpack_exports__, __webpack_require__) {6888 -1 'use strict';6889 -1 __webpack_require__.r(__webpack_exports__);6890 -1 function pageHasElmAfter(results) {6891 -1 var elmUsedAnywhere = results.some(function(frameResult) {6892 -1 return frameResult.result === true;6893 -1 });6894 -1 if (elmUsedAnywhere) {6895 -1 results.forEach(function(result) {6896 -1 result.result = true;6897 -1 });6898 -1 }6899 -1 return results;6900 -1 }6901 -1 __webpack_exports__['default'] = pageHasElmAfter;6902 -1 },6903 -1 './lib/checks/generic/has-descendant-evaluate.js': function libChecksGenericHasDescendantEvaluateJs(module, __webpack_exports__, __webpack_require__) {6904 -1 'use strict';6905 -1 __webpack_require__.r(__webpack_exports__);6906 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');6907 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/index.js');6908 -1 function hasDescendant(node, options, virtualNode) {6909 -1 if (!options || !options.selector || typeof options.selector !== 'string') {6910 -1 throw new TypeError('has-descendant requires options.selector to be a string');6911 -1 }6912 -1 var matchingElms = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['querySelectorAllFilter'])(virtualNode, options.selector, function(vNode) {6913 -1 return Object(_commons_dom__WEBPACK_IMPORTED_MODULE_1__['isVisible'])(vNode.actualNode, true);6914 -1 });6915 -1 this.relatedNodes(matchingElms.map(function(vNode) {6916 -1 return vNode.actualNode;6917 -1 }));6918 -1 return matchingElms.length > 0;6919 -1 }6920 -1 __webpack_exports__['default'] = hasDescendant;6921 -1 },6922 -1 './lib/checks/generic/has-text-content-evaluate.js': function libChecksGenericHasTextContentEvaluateJs(module, __webpack_exports__, __webpack_require__) {6923 -1 'use strict';6924 -1 __webpack_require__.r(__webpack_exports__);6925 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');6926 -1 function hasTextContentEvaluate(node, options, virtualNode) {6927 -1 try {6928 -1 return Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['sanitize'])(Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['subtreeText'])(virtualNode)) !== '';6929 -1 } catch (e) {6930 -1 return undefined;6931 27836 }6932 -1 }6933 -1 __webpack_exports__['default'] = hasTextContentEvaluate;6934 -1 },6935 -1 './lib/checks/generic/matches-definition-evaluate.js': function libChecksGenericMatchesDefinitionEvaluateJs(module, __webpack_exports__, __webpack_require__) {6936 -1 'use strict';6937 -1 __webpack_require__.r(__webpack_exports__);6938 -1 var _commons_matches__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/matches/index.js');6939 -1 function matchesDefinitionEvaluate(_, options, virtualNode) {6940 -1 return Object(_commons_matches__WEBPACK_IMPORTED_MODULE_0__['default'])(virtualNode, options.matcher);6941 -1 }6942 -1 __webpack_exports__['default'] = matchesDefinitionEvaluate;6943 -1 },6944 -1 './lib/checks/generic/page-no-duplicate-after.js': function libChecksGenericPageNoDuplicateAfterJs(module, __webpack_exports__, __webpack_require__) {6945 -1 'use strict';6946 -1 __webpack_require__.r(__webpack_exports__);6947 -1 function pageNoDuplicateAfter(results) {6948 -1 return results.filter(function(checkResult) {6949 -1 return checkResult.data !== 'ignored';6950 -1 });6951 -1 }6952 -1 __webpack_exports__['default'] = pageNoDuplicateAfter;6953 -1 },6954 -1 './lib/checks/generic/page-no-duplicate-evaluate.js': function libChecksGenericPageNoDuplicateEvaluateJs(module, __webpack_exports__, __webpack_require__) {6955 -1 'use strict';6956 -1 __webpack_require__.r(__webpack_exports__);6957 -1 var _core_base_cache__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/cache.js');6958 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');6959 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/dom/index.js');6960 -1 function pageNoDuplicateEvaluate(node, options, virtualNode) {6961 -1 if (!options || !options.selector || typeof options.selector !== 'string') {6962 -1 throw new TypeError('page-no-duplicate requires options.selector to be a string');6963 -1 }6964 -1 var key = 'page-no-duplicate;' + options.selector;6965 -1 if (_core_base_cache__WEBPACK_IMPORTED_MODULE_0__['default'].get(key)) {6966 -1 this.data('ignored');6967 -1 return;-1 27837 } -1 27838 return result; -1 27839 }; -1 27840 -1 27841 /** -1 27842 * Gets elements that refer to this element in an attribute that takes an ID reference list or -1 27843 * single ID reference. -1 27844 * @param {Element} element a potential referent. -1 27845 * @return {Array<Element>} The elements that refer to this element. -1 27846 */ -1 27847 axs.utils.getIdReferrers = function(element) { -1 27848 var result = []; -1 27849 var referrers = axs.utils.getHtmlIdReferrers(element); -1 27850 if (referrers) { -1 27851 result = result.concat(Array.prototype.slice.call(referrers)); -1 27852 } -1 27853 referrers = axs.utils.getAriaIdReferrers(element); -1 27854 if (referrers) { -1 27855 result = result.concat(Array.prototype.slice.call(referrers)); -1 27856 } -1 27857 return result; -1 27858 }; -1 27859 -1 27860 /** -1 27861 * Gets elements which this element refers to in the given attribute. -1 27862 * @param {!string} attributeName Name of an ARIA attribute, e.g. 'aria-owns'. -1 27863 * @param {Element} element The DOM element which has the ARIA attribute. -1 27864 * @return {!Array.<Element>} An array of elements that are referred to by this element. -1 27865 * @example -1 27866 * var owner = document.body.appendChild(document.createElement("div")); -1 27867 * var owned = document.body.appendChild(document.createElement("div")); -1 27868 * owner.setAttribute("aria-owns", "kungfu"); -1 27869 * owned.setAttribute("id", "kungfu"); -1 27870 * console.log(axs.utils.getIdReferents("aria-owns", owner)[0] === owned); // This will log 'true' -1 27871 */ -1 27872 axs.utils.getIdReferents = function(attributeName, element) { -1 27873 var result = []; -1 27874 var propertyKey = attributeName.replace(/^aria-/, ''); -1 27875 var property = axs.constants.ARIA_PROPERTIES[propertyKey]; -1 27876 if (!property || !element.hasAttribute(attributeName)) -1 27877 return result; -1 27878 var propertyType = property.valueType; -1 27879 if (propertyType === 'idref_list' || propertyType === 'idref') { -1 27880 var ownerDocument = element.ownerDocument; -1 27881 var ids = element.getAttribute(attributeName); -1 27882 ids = ids.split(/\s+/); -1 27883 for (var i = 0, len = ids.length; i < len; i++) { -1 27884 var next = ownerDocument.getElementById(ids[i]); -1 27885 if (next) { -1 27886 result[result.length] = next; -1 27887 } 6968 27888 }6969 -1 _core_base_cache__WEBPACK_IMPORTED_MODULE_0__['default'].set(key, true);6970 -1 var elms = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['querySelectorAllFilter'])(axe._tree[0], options.selector, function(elm) {6971 -1 return Object(_commons_dom__WEBPACK_IMPORTED_MODULE_2__['isVisible'])(elm.actualNode);6972 -1 });6973 -1 if (typeof options.nativeScopeFilter === 'string') {6974 -1 elms = elms.filter(function(elm) {6975 -1 return elm.actualNode.hasAttribute('role') || !Object(_commons_dom__WEBPACK_IMPORTED_MODULE_2__['findUpVirtual'])(elm, options.nativeScopeFilter);6976 -1 });-1 27889 } -1 27890 return result; -1 27891 }; -1 27892 -1 27893 /** -1 27894 * Gets a subset of 'axs.constants.ARIA_PROPERTIES' filtered by 'valueType'. -1 27895 * @param {!Array.<string>} valueTypes Types to match, e.g. ['idref_list']. -1 27896 * @return {Object.<string, Object>} axs.constants.ARIA_PROPERTIES which match. -1 27897 */ -1 27898 axs.utils.getAriaPropertiesByValueType = function(valueTypes) { -1 27899 var result = {}; -1 27900 for (var propertyName in axs.constants.ARIA_PROPERTIES) { -1 27901 var property = axs.constants.ARIA_PROPERTIES[propertyName]; -1 27902 if (property && valueTypes.indexOf(property.valueType) >= 0) { -1 27903 result[propertyName] = property; 6977 27904 }6978 -1 this.relatedNodes(elms.filter(function(elm) {6979 -1 return elm !== virtualNode;6980 -1 }).map(function(elm) {6981 -1 return elm.actualNode;6982 -1 }));6983 -1 return elms.length <= 1;6984 -1 }6985 -1 __webpack_exports__['default'] = pageNoDuplicateEvaluate;-1 27905 } -1 27906 return result; -1 27907 }; -1 27908 -1 27909 /** -1 27910 * Builds a selector that matches an element with any of these ARIA properties. -1 27911 * @param {Object.<string, Object>} ariaProperties axs.constants.ARIA_PROPERTIES -1 27912 * @return {!string} The selector. -1 27913 */ -1 27914 axs.utils.getSelectorForAriaProperties = function(ariaProperties) { -1 27915 var propertyNames = Object.keys(/** @type {!Object} */(ariaProperties)); -1 27916 var result = propertyNames.map(function(propertyName) { -1 27917 return '[aria-' + propertyName + ']'; -1 27918 }); -1 27919 result.sort(); // facilitates reading long selectors and unit testing -1 27920 return result.join(','); -1 27921 }; -1 27922 -1 27923 /** -1 27924 * Finds descendants of this element which implement the given ARIA role. -1 27925 * Will look for descendants with implicit or explicit role. -1 27926 * @param {Element} element an HTML DOM element. -1 27927 * @param {string} role The role you seek. -1 27928 * @return {!Array.<Element>} An array of matching elements. -1 27929 * @example -1 27930 * var container = document.createElement("div"); -1 27931 * var button = document.createElement("button"); -1 27932 * var span = document.createElement("span"); -1 27933 * span.setAttribute("role", "button"); -1 27934 * container.appendChild(button); -1 27935 * container.appendChild(span); -1 27936 * var result = axs.utils.findDescendantsWithRole(container, "button"); // result is an array containing both 'button' and 'span' -1 27937 */ -1 27938 axs.utils.findDescendantsWithRole = function(element, role) { -1 27939 if (!(element && role)) -1 27940 return []; -1 27941 var selector = axs.properties.getSelectorForRole(role); -1 27942 if (!selector) -1 27943 return []; -1 27944 var result = element.querySelectorAll(selector); -1 27945 if (result) { // Convert NodeList to Array; methinks 80/20 that's what callers want. -1 27946 result = Array.prototype.map.call(result, function(item) { return item; }); -1 27947 } else { -1 27948 return []; -1 27949 } -1 27950 return result; -1 27951 }; -1 27952 -1 27953 },{}],189:[function(require,module,exports){ -1 27954 // Copyright 2013 Google Inc. -1 27955 // -1 27956 // Licensed under the Apache License, Version 2.0 (the "License"); -1 27957 // you may not use this file except in compliance with the License. -1 27958 // You may obtain a copy of the License at -1 27959 // -1 27960 // http://www.apache.org/licenses/LICENSE-2.0 -1 27961 // -1 27962 // Unless required by applicable law or agreed to in writing, software -1 27963 // distributed under the License is distributed on an "AS IS" BASIS, -1 27964 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -1 27965 // See the License for the specific language governing permissions and -1 27966 // limitations under the License. -1 27967 -1 27968 goog.provide('axs.browserUtils'); -1 27969 -1 27970 /** -1 27971 * Use Webkit matcher when matches() is not supported. -1 27972 * Use Firefox matcher when Webkit is not supported. -1 27973 * Use IE matcher when neither webkit nor Firefox supported. -1 27974 * @param {Element} element -1 27975 * @param {string} selector -1 27976 * @return {boolean} true if the element matches the selector -1 27977 */ -1 27978 axs.browserUtils.matchSelector = function(element, selector) { -1 27979 if (element.matches) -1 27980 return element.matches(selector); -1 27981 if (element.webkitMatchesSelector) -1 27982 return element.webkitMatchesSelector(selector); -1 27983 if (element.mozMatchesSelector) -1 27984 return element.mozMatchesSelector(selector); -1 27985 if (element.msMatchesSelector) -1 27986 return element.msMatchesSelector(selector); -1 27987 return false; -1 27988 }; -1 27989 -1 27990 },{}],190:[function(require,module,exports){ -1 27991 // Copyright 2015 Google Inc. -1 27992 // -1 27993 // Licensed under the Apache License, Version 2.0 (the "License"); -1 27994 // you may not use this file except in compliance with the License. -1 27995 // You may obtain a copy of the License at -1 27996 // -1 27997 // http://www.apache.org/licenses/LICENSE-2.0 -1 27998 // -1 27999 // Unless required by applicable law or agreed to in writing, software -1 28000 // distributed under the License is distributed on an "AS IS" BASIS, -1 28001 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -1 28002 // See the License for the specific language governing permissions and -1 28003 // limitations under the License. -1 28004 -1 28005 goog.provide('axs.color'); -1 28006 goog.provide('axs.color.Color'); -1 28007 -1 28008 /** -1 28009 * @constructor -1 28010 * @param {number} red -1 28011 * @param {number} green -1 28012 * @param {number} blue -1 28013 * @param {number} alpha -1 28014 */ -1 28015 axs.color.Color = function(red, green, blue, alpha) { -1 28016 /** @type {number} */ -1 28017 this.red = red; -1 28018 -1 28019 /** @type {number} */ -1 28020 this.green = green; -1 28021 -1 28022 /** @type {number} */ -1 28023 this.blue = blue; -1 28024 -1 28025 /** @type {number} */ -1 28026 this.alpha = alpha; -1 28027 }; -1 28028 -1 28029 /** -1 28030 * @constructor -1 28031 * See https://en.wikipedia.org/wiki/YCbCr for more information. -1 28032 * @param {Array.<number>} coords The YCbCr values as a 3 element array, in the order [luma, Cb, Cr]. -1 28033 * All numbers are in the range [0, 1]. -1 28034 */ -1 28035 axs.color.YCbCr = function(coords) { -1 28036 /** @type {number} */ -1 28037 this.luma = this.z = coords[0]; -1 28038 -1 28039 /** @type {number} */ -1 28040 this.Cb = this.x = coords[1]; -1 28041 -1 28042 /** @type {number} */ -1 28043 this.Cr = this.y = coords[2]; -1 28044 }; -1 28045 -1 28046 axs.color.YCbCr.prototype = { -1 28047 /** -1 28048 * @param {number} scalar -1 28049 * @return {axs.color.YCbCr} This color multiplied by the given scalar -1 28050 */ -1 28051 multiply: function(scalar) { -1 28052 var result = [ this.luma * scalar, this.Cb * scalar, this.Cr * scalar ]; -1 28053 return new axs.color.YCbCr(result); 6986 28054 },6987 -1 './lib/checks/keyboard/accesskeys-after.js': function libChecksKeyboardAccesskeysAfterJs(module, __webpack_exports__, __webpack_require__) {6988 -1 'use strict';6989 -1 __webpack_require__.r(__webpack_exports__);6990 -1 function accesskeysAfter(results) {6991 -1 var seen = {};6992 -1 return results.filter(function(r) {6993 -1 if (!r.data) {6994 -1 return false;6995 -1 }6996 -1 var key = r.data.toUpperCase();6997 -1 if (!seen[key]) {6998 -1 seen[key] = r;6999 -1 r.relatedNodes = [];7000 -1 return true;7001 -1 }7002 -1 seen[key].relatedNodes.push(r.relatedNodes[0]);7003 -1 return false;7004 -1 }).map(function(r) {7005 -1 r.result = !!r.relatedNodes.length;7006 -1 return r;7007 -1 });7008 -1 }7009 -1 __webpack_exports__['default'] = accesskeysAfter;-1 28055 -1 28056 /** -1 28057 * @param {axs.color.YCbCr} other -1 28058 * @return {axs.color.YCbCr} This plus other -1 28059 */ -1 28060 add: function(other) { -1 28061 var result = [ this.luma + other.luma, this.Cb + other.Cb, this.Cr + other.Cr ]; -1 28062 return new axs.color.YCbCr(result); 7010 28063 },7011 -1 './lib/checks/keyboard/accesskeys-evaluate.js': function libChecksKeyboardAccesskeysEvaluateJs(module, __webpack_exports__, __webpack_require__) {7012 -1 'use strict';7013 -1 __webpack_require__.r(__webpack_exports__);7014 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');7015 -1 function accesskeysEvaluate(node) {7016 -1 if (Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isVisible'])(node, false)) {7017 -1 this.data(node.getAttribute('accesskey'));7018 -1 this.relatedNodes([ node ]);-1 28064 -1 28065 /** -1 28066 * @param {axs.color.YCbCr} other -1 28067 * @return {axs.color.YCbCr} This minus other -1 28068 */ -1 28069 subtract: function(other) { -1 28070 var result = [ this.luma - other.luma, this.Cb - other.Cb, this.Cr - other.Cr ]; -1 28071 return new axs.color.YCbCr(result); -1 28072 } -1 28073 -1 28074 }; -1 28075 -1 28076 -1 28077 /** -1 28078 * Calculate the contrast ratio between the two given colors. Returns the ratio -1 28079 * to 1, for example for two two colors with a contrast ratio of 21:1, this -1 28080 * function will return 21. -1 28081 * @param {axs.color.Color} fgColor -1 28082 * @param {axs.color.Color} bgColor -1 28083 * @return {!number} -1 28084 */ -1 28085 axs.color.calculateContrastRatio = function(fgColor, bgColor) { -1 28086 if (fgColor.alpha < 1) -1 28087 fgColor = axs.color.flattenColors(fgColor, bgColor); -1 28088 -1 28089 var fgLuminance = axs.color.calculateLuminance(fgColor); -1 28090 var bgLuminance = axs.color.calculateLuminance(bgColor); -1 28091 var contrastRatio = (Math.max(fgLuminance, bgLuminance) + 0.05) / -1 28092 (Math.min(fgLuminance, bgLuminance) + 0.05); -1 28093 return contrastRatio; -1 28094 }; -1 28095 -1 28096 /** -1 28097 * Calculate the luminance of the given color using the WCAG algorithm. -1 28098 * @param {axs.color.Color} color -1 28099 * @return {number} -1 28100 */ -1 28101 axs.color.calculateLuminance = function(color) { -1 28102 /* var rSRGB = color.red / 255; -1 28103 var gSRGB = color.green / 255; -1 28104 var bSRGB = color.blue / 255; -1 28105 -1 28106 var r = rSRGB <= 0.03928 ? rSRGB / 12.92 : Math.pow(((rSRGB + 0.055)/1.055), 2.4); -1 28107 var g = gSRGB <= 0.03928 ? gSRGB / 12.92 : Math.pow(((gSRGB + 0.055)/1.055), 2.4); -1 28108 var b = bSRGB <= 0.03928 ? bSRGB / 12.92 : Math.pow(((bSRGB + 0.055)/1.055), 2.4); -1 28109 -1 28110 return 0.2126 * r + 0.7152 * g + 0.0722 * b; */ -1 28111 var ycc = axs.color.toYCbCr(color); -1 28112 return ycc.luma; -1 28113 }; -1 28114 -1 28115 /** -1 28116 * Compute the luminance ratio between two luminance values. -1 28117 * @param {number} luminance1 -1 28118 * @param {number} luminance2 -1 28119 */ -1 28120 axs.color.luminanceRatio = function(luminance1, luminance2) { -1 28121 return (Math.max(luminance1, luminance2) + 0.05) / -1 28122 (Math.min(luminance1, luminance2) + 0.05); -1 28123 }; -1 28124 -1 28125 /** -1 28126 * @param {string} colorString The color string from CSS. -1 28127 * @return {?axs.color.Color} -1 28128 */ -1 28129 axs.color.parseColor = function(colorString) { -1 28130 if (colorString === "transparent") { -1 28131 return new axs.color.Color(0, 0, 0, 0); -1 28132 } -1 28133 var rgbRegex = /^rgb\((\d+), (\d+), (\d+)\)$/; -1 28134 var match = colorString.match(rgbRegex); -1 28135 -1 28136 if (match) { -1 28137 var r = parseInt(match[1], 10); -1 28138 var g = parseInt(match[2], 10); -1 28139 var b = parseInt(match[3], 10); -1 28140 var a = 1; -1 28141 return new axs.color.Color(r, g, b, a); -1 28142 } -1 28143 -1 28144 var rgbaRegex = /^rgba\((\d+), (\d+), (\d+), (\d*(\.\d+)?)\)/; -1 28145 match = colorString.match(rgbaRegex); -1 28146 if (match) { -1 28147 var r = parseInt(match[1], 10); -1 28148 var g = parseInt(match[2], 10); -1 28149 var b = parseInt(match[3], 10); -1 28150 var a = parseFloat(match[4]); -1 28151 return new axs.color.Color(r, g, b, a); -1 28152 } -1 28153 -1 28154 return null; -1 28155 }; -1 28156 -1 28157 /** -1 28158 * @param {number} value The value of a color channel, 0 <= value <= 0xFF -1 28159 * @return {!string} -1 28160 */ -1 28161 axs.color.colorChannelToString = function(value) { -1 28162 value = Math.round(value); -1 28163 if (value <= 0xF) -1 28164 return '0' + value.toString(16); -1 28165 return value.toString(16); -1 28166 }; -1 28167 -1 28168 /** -1 28169 * @param {axs.color.Color} color -1 28170 * @return {!string} -1 28171 */ -1 28172 axs.color.colorToString = function(color) { -1 28173 if (color.alpha == 1) { -1 28174 return '#' + axs.color.colorChannelToString(color.red) + -1 28175 axs.color.colorChannelToString(color.green) + axs.color.colorChannelToString(color.blue); -1 28176 } -1 28177 else -1 28178 return 'rgba(' + [color.red, color.green, color.blue, color.alpha].join(',') + ')'; -1 28179 }; -1 28180 -1 28181 /** -1 28182 * Compute a desired luminance given a given luminance and a desired contrast ratio. -1 28183 * @param {number} luminance The given luminance. -1 28184 * @param {number} contrast The desired contrast ratio. -1 28185 * @param {boolean} higher Whether the desired luminance is higher or lower than the given luminance. -1 28186 * @return {number} The desired luminance. -1 28187 */ -1 28188 axs.color.luminanceFromContrastRatio = function(luminance, contrast, higher) { -1 28189 if (higher) { -1 28190 var newLuminance = (luminance + 0.05) * contrast - 0.05; -1 28191 return newLuminance; -1 28192 } else { -1 28193 var newLuminance = (luminance + 0.05) / contrast - 0.05; -1 28194 return newLuminance; -1 28195 } -1 28196 }; -1 28197 -1 28198 /** -1 28199 * Given a color in YCbCr format and a desired luminance, pick a new color with the desired luminance which is -1 28200 * as close as possible to the original color. -1 28201 * @param {axs.color.YCbCr} ycc The original color in YCbCr form. -1 28202 * @param {number} luma The desired luminance -1 28203 * @return {!axs.color.Color} A new color in RGB. -1 28204 */ -1 28205 axs.color.translateColor = function(ycc, luma) { -1 28206 var endpoint = (luma > ycc.luma) ? axs.color.WHITE_YCC : axs.color.BLACK_YCC; -1 28207 var cubeFaces = (endpoint == axs.color.WHITE_YCC) ? axs.color.YCC_CUBE_FACES_WHITE -1 28208 : axs.color.YCC_CUBE_FACES_BLACK; -1 28209 -1 28210 var a = new axs.color.YCbCr([0, ycc.Cb, ycc.Cr]); -1 28211 var b = new axs.color.YCbCr([1, ycc.Cb, ycc.Cr]); -1 28212 var line = { a: a, b: b }; -1 28213 -1 28214 var intersection = null; -1 28215 for (var i = 0; i < cubeFaces.length; i++) { -1 28216 var cubeFace = cubeFaces[i]; -1 28217 intersection = axs.color.findIntersection(line, cubeFace); -1 28218 // If intersection within [0, 1] in Z axis, it is within the cube. -1 28219 if (intersection.z >= 0 && intersection.z <= 1) -1 28220 break; -1 28221 } -1 28222 if (!intersection) { -1 28223 // Should never happen -1 28224 throw "Couldn't find intersection with YCbCr color cube for Cb=" + ycc.Cb + ", Cr=" + ycc.Cr + "."; -1 28225 } -1 28226 if (intersection.x != ycc.x || intersection.y != ycc.y) { -1 28227 // Should never happen -1 28228 throw "Intersection has wrong Cb/Cr values."; -1 28229 } -1 28230 -1 28231 // If intersection.luma is closer to endpoint than desired luma, then luma is inside cube -1 28232 // and we can immediately return new value. -1 28233 if (Math.abs(endpoint.luma - intersection.luma) < Math.abs(endpoint.luma - luma)) { -1 28234 var translatedColor = [luma, ycc.Cb, ycc.Cr]; -1 28235 return axs.color.fromYCbCrArray(translatedColor); -1 28236 } -1 28237 -1 28238 // Otherwise, translate from intersection towards white/black such that luma is correct. -1 28239 var dLuma = luma - intersection.luma; -1 28240 var scale = dLuma / (endpoint.luma - intersection.luma); -1 28241 var translatedColor = [ luma, -1 28242 intersection.Cb - (intersection.Cb * scale), -1 28243 intersection.Cr - (intersection.Cr * scale) ]; -1 28244 -1 28245 return axs.color.fromYCbCrArray(translatedColor); -1 28246 }; -1 28247 -1 28248 /** @typedef {{fg: string, bg: string, contrast: string}} */ -1 28249 axs.color.SuggestedColors; -1 28250 -1 28251 /** -1 28252 * @param {axs.color.Color} bgColor -1 28253 * @param {axs.color.Color} fgColor -1 28254 * @param {Object.<string, number>} desiredContrastRatios A map of label to desired contrast ratio. -1 28255 * @return {Object.<string, axs.color.SuggestedColors>} -1 28256 */ -1 28257 axs.color.suggestColors = function(bgColor, fgColor, desiredContrastRatios) { -1 28258 var colors = {}; -1 28259 var bgLuminance = axs.color.calculateLuminance(bgColor); -1 28260 var fgLuminance = axs.color.calculateLuminance(fgColor); -1 28261 -1 28262 var fgLuminanceIsHigher = fgLuminance > bgLuminance; -1 28263 var fgYCbCr = axs.color.toYCbCr(fgColor); -1 28264 var bgYCbCr = axs.color.toYCbCr(bgColor); -1 28265 for (var desiredLabel in desiredContrastRatios) { -1 28266 var desiredContrast = desiredContrastRatios[desiredLabel]; -1 28267 -1 28268 var desiredFgLuminance = axs.color.luminanceFromContrastRatio(bgLuminance, desiredContrast + 0.02, fgLuminanceIsHigher); -1 28269 if (desiredFgLuminance <= 1 && desiredFgLuminance >= 0) { -1 28270 var newFgColor = axs.color.translateColor(fgYCbCr, desiredFgLuminance); -1 28271 var newContrastRatio = axs.color.calculateContrastRatio(newFgColor, bgColor); -1 28272 var suggestedColors = {}; -1 28273 suggestedColors.fg = /** @type {!string} */ (axs.color.colorToString(newFgColor)); -1 28274 suggestedColors.bg = /** @type {!string} */ (axs.color.colorToString(bgColor)); -1 28275 suggestedColors.contrast = /** @type {!string} */ (newContrastRatio.toFixed(2)); -1 28276 colors[desiredLabel] = /** @type {axs.color.SuggestedColors} */ (suggestedColors); -1 28277 continue; 7019 28278 }7020 -1 return true;7021 -1 }7022 -1 __webpack_exports__['default'] = accesskeysEvaluate;7023 -1 },7024 -1 './lib/checks/keyboard/focusable-content-evaluate.js': function libChecksKeyboardFocusableContentEvaluateJs(module, __webpack_exports__, __webpack_require__) {7025 -1 'use strict';7026 -1 __webpack_require__.r(__webpack_exports__);7027 -1 function focusableContentEvaluate(node, options, virtualNode) {7028 -1 var tabbableElements = virtualNode.tabbableElements;7029 -1 if (!tabbableElements) {7030 -1 return false;-1 28279 -1 28280 var desiredBgLuminance = axs.color.luminanceFromContrastRatio(fgLuminance, desiredContrast + 0.02, !fgLuminanceIsHigher); -1 28281 if (desiredBgLuminance <= 1 && desiredBgLuminance >= 0) { -1 28282 var newBgColor = axs.color.translateColor(bgYCbCr, desiredBgLuminance); -1 28283 var newContrastRatio = axs.color.calculateContrastRatio(fgColor, newBgColor); -1 28284 var suggestedColors = {}; -1 28285 suggestedColors.bg = /** @type {!string} */ (axs.color.colorToString(newBgColor)); -1 28286 suggestedColors.fg = /** @type {!string} */ (axs.color.colorToString(fgColor)); -1 28287 suggestedColors.contrast = /** @type {!string} */ (newContrastRatio.toFixed(2)); -1 28288 colors[desiredLabel] = /** @type {axs.color.SuggestedColors} */ (suggestedColors); 7031 28289 }7032 -1 var tabbableContentElements = tabbableElements.filter(function(el) {7033 -1 return el !== virtualNode;7034 -1 });7035 -1 return tabbableContentElements.length > 0;7036 -1 }7037 -1 __webpack_exports__['default'] = focusableContentEvaluate;-1 28290 } -1 28291 return colors; -1 28292 }; -1 28293 -1 28294 /** -1 28295 * Combine the two given color according to alpha blending. -1 28296 * @param {axs.color.Color} fgColor -1 28297 * @param {axs.color.Color} bgColor -1 28298 * @return {axs.color.Color} -1 28299 */ -1 28300 axs.color.flattenColors = function(fgColor, bgColor) { -1 28301 var alpha = fgColor.alpha; -1 28302 var r = ((1 - alpha) * bgColor.red) + (alpha * fgColor.red); -1 28303 var g = ((1 - alpha) * bgColor.green) + (alpha * fgColor.green); -1 28304 var b = ((1 - alpha) * bgColor.blue) + (alpha * fgColor.blue); -1 28305 var a = fgColor.alpha + (bgColor.alpha * (1 - fgColor.alpha)); -1 28306 -1 28307 return new axs.color.Color(r, g, b, a); -1 28308 }; -1 28309 -1 28310 /** -1 28311 * Multiply the given vector by the given matrix. -1 28312 * @param {Array.<Array.<number>>} matrix A 3x3 matrix -1 28313 * @param {Array.<number>} vector A 3-element vector -1 28314 * @return {Array.<number>} A 3-element vector -1 28315 */ -1 28316 axs.color.multiplyMatrixVector = function(matrix, vector) { -1 28317 var a = matrix[0][0]; -1 28318 var b = matrix[0][1]; -1 28319 var c = matrix[0][2]; -1 28320 var d = matrix[1][0]; -1 28321 var e = matrix[1][1]; -1 28322 var f = matrix[1][2]; -1 28323 var g = matrix[2][0]; -1 28324 var h = matrix[2][1]; -1 28325 var k = matrix[2][2]; -1 28326 -1 28327 var x = vector[0]; -1 28328 var y = vector[1]; -1 28329 var z = vector[2]; -1 28330 -1 28331 return [ -1 28332 a*x + b*y + c*z, -1 28333 d*x + e*y + f*z, -1 28334 g*x + h*y + k*z -1 28335 ]; -1 28336 }; -1 28337 -1 28338 /** -1 28339 * Convert a given RGB color to YCbCr. -1 28340 * @param {axs.color.Color} color -1 28341 * @return {axs.color.YCbCr} -1 28342 */ -1 28343 axs.color.toYCbCr = function(color) { -1 28344 var rSRGB = color.red / 255; -1 28345 var gSRGB = color.green / 255; -1 28346 var bSRGB = color.blue / 255; -1 28347 -1 28348 var r = rSRGB <= 0.03928 ? rSRGB / 12.92 : Math.pow(((rSRGB + 0.055)/1.055), 2.4); -1 28349 var g = gSRGB <= 0.03928 ? gSRGB / 12.92 : Math.pow(((gSRGB + 0.055)/1.055), 2.4); -1 28350 var b = bSRGB <= 0.03928 ? bSRGB / 12.92 : Math.pow(((bSRGB + 0.055)/1.055), 2.4); -1 28351 -1 28352 return new axs.color.YCbCr(axs.color.multiplyMatrixVector(axs.color.YCC_MATRIX, [r, g, b])); -1 28353 }; -1 28354 -1 28355 /** -1 28356 * @param {axs.color.YCbCr} ycc -1 28357 * @return {!axs.color.Color} -1 28358 */ -1 28359 axs.color.fromYCbCr = function(ycc) { -1 28360 return axs.color.fromYCbCrArray([ycc.luma, ycc.Cb, ycc.Cr]); -1 28361 }; -1 28362 -1 28363 /** -1 28364 * Convert a color from a YCbCr color (as a vector) to an RGB color -1 28365 * @param {Array.<number>} yccArray -1 28366 * @return {!axs.color.Color} -1 28367 */ -1 28368 axs.color.fromYCbCrArray = function(yccArray) { -1 28369 var rgb = axs.color.multiplyMatrixVector(axs.color.INVERTED_YCC_MATRIX, yccArray); -1 28370 -1 28371 var r = rgb[0]; -1 28372 var g = rgb[1]; -1 28373 var b = rgb[2]; -1 28374 var rSRGB = r <= 0.00303949 ? (r * 12.92) : (Math.pow(r, (1/2.4)) * 1.055) - 0.055; -1 28375 var gSRGB = g <= 0.00303949 ? (g * 12.92) : (Math.pow(g, (1/2.4)) * 1.055) - 0.055; -1 28376 var bSRGB = b <= 0.00303949 ? (b * 12.92) : (Math.pow(b, (1/2.4)) * 1.055) - 0.055; -1 28377 -1 28378 var red = Math.min(Math.max(Math.round(rSRGB * 255), 0), 255); -1 28379 var green = Math.min(Math.max(Math.round(gSRGB * 255), 0), 255); -1 28380 var blue = Math.min(Math.max(Math.round(bSRGB * 255), 0), 255); -1 28381 -1 28382 return new axs.color.Color(red, green, blue, 1); -1 28383 }; -1 28384 -1 28385 /** -1 28386 * Returns an RGB to YCbCr conversion matrix for the given kR, kB constants. -1 28387 * @param {number} kR -1 28388 * @param {number} kB -1 28389 * @return {Array.<Array.<number>>} -1 28390 */ -1 28391 axs.color.RGBToYCbCrMatrix = function(kR, kB) { -1 28392 return [ -1 28393 [ -1 28394 kR, -1 28395 (1 - kR - kB), -1 28396 kB -1 28397 ], -1 28398 [ -1 28399 -kR/(2 - 2*kB), -1 28400 (kR + kB - 1)/(2 - 2*kB), -1 28401 (1 - kB)/(2 - 2*kB) -1 28402 ], -1 28403 [ -1 28404 (1 - kR)/(2 - 2*kR), -1 28405 (kR + kB - 1)/(2 - 2*kR), -1 28406 -kB/(2 - 2*kR) -1 28407 ] -1 28408 ]; -1 28409 }; -1 28410 -1 28411 /** -1 28412 * Return the inverse of the given 3x3 matrix. -1 28413 * @param {Array.<Array.<number>>} matrix -1 28414 * @return Array.<Array.<number>> The inverse of the given matrix. -1 28415 */ -1 28416 axs.color.invert3x3Matrix = function(matrix) { -1 28417 var a = matrix[0][0]; -1 28418 var b = matrix[0][1]; -1 28419 var c = matrix[0][2]; -1 28420 var d = matrix[1][0]; -1 28421 var e = matrix[1][1]; -1 28422 var f = matrix[1][2]; -1 28423 var g = matrix[2][0]; -1 28424 var h = matrix[2][1]; -1 28425 var k = matrix[2][2]; -1 28426 -1 28427 var A = (e*k - f*h); -1 28428 var B = (f*g - d*k); -1 28429 var C = (d*h - e*g); -1 28430 var D = (c*h - b*k); -1 28431 var E = (a*k - c*g); -1 28432 var F = (g*b - a*h); -1 28433 var G = (b*f - c*e); -1 28434 var H = (c*d - a*f); -1 28435 var K = (a*e - b*d); -1 28436 -1 28437 var det = a * (e*k - f*h) - b * (k*d - f*g) + c * (d*h - e*g); -1 28438 var z = 1/det; -1 28439 -1 28440 return axs.color.scalarMultiplyMatrix([ -1 28441 [ A, D, G ], -1 28442 [ B, E, H ], -1 28443 [ C, F, K ] -1 28444 ], z); -1 28445 }; -1 28446 -1 28447 /** @typedef {{ a: axs.color.YCbCr, b: axs.color.YCbCr }} */ -1 28448 axs.color.Line; -1 28449 -1 28450 /** @typedef {{ p0: axs.color.YCbCr, p1: axs.color.YCbCr, p2: axs.color.YCbCr }} */ -1 28451 axs.color.Plane; -1 28452 -1 28453 /** -1 28454 * Find the intersection between a line and a plane using -1 28455 * http://en.wikipedia.org/wiki/Line%E2%80%93plane_intersection#Parametric_form -1 28456 * @param {axs.color.Line} l -1 28457 * @param {axs.color.Plane} p -1 28458 * @return {axs.color.YCbCr} -1 28459 */ -1 28460 axs.color.findIntersection = function(l, p) { -1 28461 var lhs = [ l.a.x - p.p0.x, l.a.y - p.p0.y, l.a.z - p.p0.z ]; -1 28462 -1 28463 var matrix = [ [ l.a.x - l.b.x, p.p1.x - p.p0.x, p.p2.x - p.p0.x ], -1 28464 [ l.a.y - l.b.y, p.p1.y - p.p0.y, p.p2.y - p.p0.y ], -1 28465 [ l.a.z - l.b.z, p.p1.z - p.p0.z, p.p2.z - p.p0.z ] ]; -1 28466 var invertedMatrix = axs.color.invert3x3Matrix(matrix); -1 28467 -1 28468 var tuv = axs.color.multiplyMatrixVector(invertedMatrix, lhs); -1 28469 var t = tuv[0]; -1 28470 -1 28471 var result = l.a.add(l.b.subtract(l.a).multiply(t)); -1 28472 return result; -1 28473 }; -1 28474 -1 28475 /** -1 28476 * Multiply a matrix by a scalar. -1 28477 * @param {Array.<Array.<number>>} matrix A 3x3 matrix. -1 28478 * @param {number} scalar -1 28479 * @return {Array.<Array.<number>>} -1 28480 */ -1 28481 axs.color.scalarMultiplyMatrix = function(matrix, scalar) { -1 28482 var result = []; -1 28483 -1 28484 for (var i = 0; i < 3; i++) -1 28485 result[i] = axs.color.scalarMultiplyVector(matrix[i], scalar); -1 28486 -1 28487 return result; -1 28488 }; -1 28489 -1 28490 /** -1 28491 * Multiply a vector by a scalar. -1 28492 * @param {Array.<number>} vector -1 28493 * @param {number} scalar -1 28494 * @return {Array.<number>} vector -1 28495 */ -1 28496 axs.color.scalarMultiplyVector = function(vector, scalar) { -1 28497 var result = []; -1 28498 for (var i = 0; i < vector.length; i++) -1 28499 result[i] = vector[i] * scalar; -1 28500 return result; -1 28501 }; -1 28502 -1 28503 axs.color.kR = 0.2126; -1 28504 axs.color.kB = 0.0722; -1 28505 axs.color.YCC_MATRIX = axs.color.RGBToYCbCrMatrix(axs.color.kR, axs.color.kB); -1 28506 axs.color.INVERTED_YCC_MATRIX = axs.color.invert3x3Matrix(axs.color.YCC_MATRIX); -1 28507 -1 28508 axs.color.BLACK = new axs.color.Color(0, 0, 0, 1.0); -1 28509 axs.color.BLACK_YCC = axs.color.toYCbCr(axs.color.BLACK); -1 28510 axs.color.WHITE = new axs.color.Color(255, 255, 255, 1.0); -1 28511 axs.color.WHITE_YCC = axs.color.toYCbCr(axs.color.WHITE); -1 28512 axs.color.RED = new axs.color.Color(255, 0, 0, 1.0); -1 28513 axs.color.RED_YCC = axs.color.toYCbCr(axs.color.RED); -1 28514 axs.color.GREEN = new axs.color.Color(0, 255, 0, 1.0); -1 28515 axs.color.GREEN_YCC = axs.color.toYCbCr(axs.color.GREEN); -1 28516 axs.color.BLUE = new axs.color.Color(0, 0, 255, 1.0); -1 28517 axs.color.BLUE_YCC = axs.color.toYCbCr(axs.color.BLUE); -1 28518 axs.color.CYAN = new axs.color.Color(0, 255, 255, 1.0); -1 28519 axs.color.CYAN_YCC = axs.color.toYCbCr(axs.color.CYAN); -1 28520 axs.color.MAGENTA = new axs.color.Color(255, 0, 255, 1.0); -1 28521 axs.color.MAGENTA_YCC = axs.color.toYCbCr(axs.color.MAGENTA); -1 28522 axs.color.YELLOW = new axs.color.Color(255, 255, 0, 1.0); -1 28523 axs.color.YELLOW_YCC = axs.color.toYCbCr(axs.color.YELLOW); -1 28524 -1 28525 axs.color.YCC_CUBE_FACES_BLACK = [ { p0: axs.color.BLACK_YCC, p1: axs.color.RED_YCC, p2: axs.color.GREEN_YCC }, -1 28526 { p0: axs.color.BLACK_YCC, p1: axs.color.GREEN_YCC, p2: axs.color.BLUE_YCC }, -1 28527 { p0: axs.color.BLACK_YCC, p1: axs.color.BLUE_YCC, p2: axs.color.RED_YCC } ]; -1 28528 axs.color.YCC_CUBE_FACES_WHITE = [ { p0: axs.color.WHITE_YCC, p1: axs.color.CYAN_YCC, p2: axs.color.MAGENTA_YCC }, -1 28529 { p0: axs.color.WHITE_YCC, p1: axs.color.MAGENTA_YCC, p2: axs.color.YELLOW_YCC }, -1 28530 { p0: axs.color.WHITE_YCC, p1: axs.color.YELLOW_YCC, p2: axs.color.CYAN_YCC } ]; -1 28531 -1 28532 },{}],191:[function(require,module,exports){ -1 28533 // Copyright 2012 Google Inc. -1 28534 // -1 28535 // Licensed under the Apache License, Version 2.0 (the "License"); -1 28536 // you may not use this file except in compliance with the License. -1 28537 // You may obtain a copy of the License at -1 28538 // -1 28539 // http://www.apache.org/licenses/LICENSE-2.0 -1 28540 // -1 28541 // Unless required by applicable law or agreed to in writing, software -1 28542 // distributed under the License is distributed on an "AS IS" BASIS, -1 28543 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -1 28544 // See the License for the specific language governing permissions and -1 28545 // limitations under the License. -1 28546 -1 28547 goog.provide('axs.constants'); -1 28548 goog.provide('axs.constants.AuditResult'); -1 28549 goog.provide('axs.constants.Severity'); -1 28550 -1 28551 /** @type {Object.<string, Object>} */ -1 28552 axs.constants.ARIA_ROLES = { -1 28553 "alert": { -1 28554 "namefrom": [ "author" ], -1 28555 "parent": [ "region" ] 7038 28556 },7039 -1 './lib/checks/keyboard/focusable-disabled-evaluate.js': function libChecksKeyboardFocusableDisabledEvaluateJs(module, __webpack_exports__, __webpack_require__) {7040 -1 'use strict';7041 -1 __webpack_require__.r(__webpack_exports__);7042 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');7043 -1 function focusableDisabledEvaluate(node, options, virtualNode) {7044 -1 var elementsThatCanBeDisabled = [ 'BUTTON', 'FIELDSET', 'INPUT', 'SELECT', 'TEXTAREA' ];7045 -1 var tabbableElements = virtualNode.tabbableElements;7046 -1 if (!tabbableElements || !tabbableElements.length) {7047 -1 return true;7048 -1 }7049 -1 var relatedNodes = tabbableElements.reduce(function(out, _ref3) {7050 -1 var el = _ref3.actualNode;7051 -1 var nodeName = el.nodeName.toUpperCase();7052 -1 if (elementsThatCanBeDisabled.includes(nodeName)) {7053 -1 out.push(el);7054 -1 }7055 -1 return out;7056 -1 }, []);7057 -1 this.relatedNodes(relatedNodes);7058 -1 if (relatedNodes.length && Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isModalOpen'])()) {7059 -1 return true;7060 -1 }7061 -1 return relatedNodes.length === 0;7062 -1 }7063 -1 __webpack_exports__['default'] = focusableDisabledEvaluate;-1 28557 "alertdialog": { -1 28558 "namefrom": [ "author" ], -1 28559 "namerequired": true, -1 28560 "parent": [ "alert", "dialog" ] 7064 28561 },7065 -1 './lib/checks/keyboard/focusable-element-evaluate.js': function libChecksKeyboardFocusableElementEvaluateJs(module, __webpack_exports__, __webpack_require__) {7066 -1 'use strict';7067 -1 __webpack_require__.r(__webpack_exports__);7068 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');7069 -1 function focusableElementEvaluate(node, options, virtualNode) {7070 -1 if (virtualNode.hasAttr('contenteditable') && isContenteditable(virtualNode)) {7071 -1 return true;7072 -1 }7073 -1 var isFocusable = virtualNode.isFocusable;7074 -1 var tabIndex = parseInt(virtualNode.attr('tabindex'), 10);7075 -1 tabIndex = !isNaN(tabIndex) ? tabIndex : null;7076 -1 return tabIndex ? isFocusable && tabIndex >= 0 : isFocusable;7077 -1 function isContenteditable(vNode) {7078 -1 var contenteditable = vNode.attr('contenteditable');7079 -1 if (contenteditable === 'true' || contenteditable === '') {7080 -1 return true;7081 -1 }7082 -1 if (contenteditable === 'false') {7083 -1 return false;7084 -1 }7085 -1 var ancestor = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['closest'])(virtualNode.parent, '[contenteditable]');7086 -1 if (!ancestor) {7087 -1 return false;7088 -1 }7089 -1 return isContenteditable(ancestor);7090 -1 }7091 -1 }7092 -1 __webpack_exports__['default'] = focusableElementEvaluate;-1 28562 "application": { -1 28563 "namefrom": [ "author" ], -1 28564 "namerequired": true, -1 28565 "parent": [ "landmark" ] 7093 28566 },7094 -1 './lib/checks/keyboard/focusable-modal-open-evaluate.js': function libChecksKeyboardFocusableModalOpenEvaluateJs(module, __webpack_exports__, __webpack_require__) {7095 -1 'use strict';7096 -1 __webpack_require__.r(__webpack_exports__);7097 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');7098 -1 function focusableModalOpenEvaluate(node, options, virtualNode) {7099 -1 var tabbableElements = virtualNode.tabbableElements.map(function(_ref4) {7100 -1 var actualNode = _ref4.actualNode;7101 -1 return actualNode;7102 -1 });7103 -1 if (!tabbableElements || !tabbableElements.length) {7104 -1 return true;7105 -1 }7106 -1 if (Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isModalOpen'])()) {7107 -1 this.relatedNodes(tabbableElements);7108 -1 return undefined;7109 -1 }7110 -1 return true;7111 -1 }7112 -1 __webpack_exports__['default'] = focusableModalOpenEvaluate;-1 28567 "article": { -1 28568 "namefrom": [ "author" ], -1 28569 "parent": [ "document", "region" ] 7113 28570 },7114 -1 './lib/checks/keyboard/focusable-no-name-evaluate.js': function libChecksKeyboardFocusableNoNameEvaluateJs(module, __webpack_exports__, __webpack_require__) {7115 -1 'use strict';7116 -1 __webpack_require__.r(__webpack_exports__);7117 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');7118 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/index.js');7119 -1 function focusableNoNameEvaluate(node, options, virtualNode) {7120 -1 var tabIndex = virtualNode.attr('tabindex');7121 -1 var inFocusOrder = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isFocusable'])(virtualNode) && tabIndex > -1;7122 -1 if (!inFocusOrder) {7123 -1 return false;7124 -1 }7125 -1 try {7126 -1 return !Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['accessibleTextVirtual'])(virtualNode);7127 -1 } catch (e) {7128 -1 return undefined;7129 -1 }7130 -1 }7131 -1 __webpack_exports__['default'] = focusableNoNameEvaluate;-1 28571 "banner": { -1 28572 "namefrom": [ "author" ], -1 28573 "parent": [ "landmark" ] 7132 28574 },7133 -1 './lib/checks/keyboard/focusable-not-tabbable-evaluate.js': function libChecksKeyboardFocusableNotTabbableEvaluateJs(module, __webpack_exports__, __webpack_require__) {7134 -1 'use strict';7135 -1 __webpack_require__.r(__webpack_exports__);7136 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');7137 -1 function focusableNotTabbableEvaluate(node, options, virtualNode) {7138 -1 var elementsThatCanBeDisabled = [ 'BUTTON', 'FIELDSET', 'INPUT', 'SELECT', 'TEXTAREA' ];7139 -1 var tabbableElements = virtualNode.tabbableElements;7140 -1 if (!tabbableElements || !tabbableElements.length) {7141 -1 return true;7142 -1 }7143 -1 var relatedNodes = tabbableElements.reduce(function(out, _ref5) {7144 -1 var el = _ref5.actualNode;7145 -1 var nodeName = el.nodeName.toUpperCase();7146 -1 if (!elementsThatCanBeDisabled.includes(nodeName)) {7147 -1 out.push(el);7148 -1 }7149 -1 return out;7150 -1 }, []);7151 -1 this.relatedNodes(relatedNodes);7152 -1 if (relatedNodes.length > 0 && Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isModalOpen'])()) {7153 -1 return true;7154 -1 }7155 -1 return relatedNodes.length === 0;7156 -1 }7157 -1 __webpack_exports__['default'] = focusableNotTabbableEvaluate;-1 28575 "button": { -1 28576 "childpresentational": true, -1 28577 "namefrom": [ "contents", "author" ], -1 28578 "namerequired": true, -1 28579 "parent": [ "command" ], -1 28580 "properties": [ "aria-expanded", "aria-pressed" ] 7158 28581 },7159 -1 './lib/checks/keyboard/landmark-is-top-level-evaluate.js': function libChecksKeyboardLandmarkIsTopLevelEvaluateJs(module, __webpack_exports__, __webpack_require__) {7160 -1 'use strict';7161 -1 __webpack_require__.r(__webpack_exports__);7162 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');7163 -1 var _commons_standards__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/standards/index.js');7164 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/dom/index.js');7165 -1 function landmarkIsTopLevelEvaluate(node) {7166 -1 var landmarks = Object(_commons_standards__WEBPACK_IMPORTED_MODULE_1__['getAriaRolesByType'])('landmark');7167 -1 var parent = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_2__['getComposedParent'])(node);7168 -1 this.data({7169 -1 role: node.getAttribute('role') || Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['implicitRole'])(node)7170 -1 });7171 -1 while (parent) {7172 -1 var role = parent.getAttribute('role');7173 -1 if (!role && parent.nodeName.toUpperCase() !== 'FORM') {7174 -1 role = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['implicitRole'])(parent);7175 -1 }7176 -1 if (role && landmarks.includes(role)) {7177 -1 return false;7178 -1 }7179 -1 parent = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_2__['getComposedParent'])(parent);7180 -1 }7181 -1 return true;7182 -1 }7183 -1 __webpack_exports__['default'] = landmarkIsTopLevelEvaluate;-1 28582 "checkbox": { -1 28583 "namefrom": [ "contents", "author" ], -1 28584 "namerequired": true, -1 28585 "parent": [ "input" ], -1 28586 "requiredProperties": [ "aria-checked" ], -1 28587 "properties": [ "aria-checked" ] 7184 28588 },7185 -1 './lib/checks/keyboard/tabindex-evaluate.js': function libChecksKeyboardTabindexEvaluateJs(module, __webpack_exports__, __webpack_require__) {7186 -1 'use strict';7187 -1 __webpack_require__.r(__webpack_exports__);7188 -1 function tabindexEvaluate(node, options, virtualNode) {7189 -1 var tabIndex = parseInt(virtualNode.attr('tabindex'), 10);7190 -1 return isNaN(tabIndex) ? true : tabIndex <= 0;7191 -1 }7192 -1 __webpack_exports__['default'] = tabindexEvaluate;-1 28589 "columnheader": { -1 28590 "namefrom": [ "contents", "author" ], -1 28591 "namerequired": true, -1 28592 "parent": [ "gridcell", "sectionhead", "widget" ], -1 28593 "properties": [ "aria-sort" ], -1 28594 "scope": [ "row" ] 7193 28595 },7194 -1 './lib/checks/label/alt-space-value-evaluate.js': function libChecksLabelAltSpaceValueEvaluateJs(module, __webpack_exports__, __webpack_require__) {7195 -1 'use strict';7196 -1 __webpack_require__.r(__webpack_exports__);7197 -1 function altSpaceValueEvaluate(node, options, virtualNode) {7198 -1 var alt = virtualNode.attr('alt');7199 -1 var isOnlySpace = /^\s+$/;7200 -1 return typeof alt === 'string' && isOnlySpace.test(alt);7201 -1 }7202 -1 __webpack_exports__['default'] = altSpaceValueEvaluate;-1 28596 "combobox": { -1 28597 "mustcontain": [ "listbox", "textbox" ], -1 28598 "namefrom": [ "author" ], -1 28599 "namerequired": true, -1 28600 "parent": [ "select" ], -1 28601 "requiredProperties": [ "aria-expanded" ], -1 28602 "properties": [ "aria-expanded", "aria-autocomplete", "aria-required" ] 7203 28603 },7204 -1 './lib/checks/label/duplicate-img-label-evaluate.js': function libChecksLabelDuplicateImgLabelEvaluateJs(module, __webpack_exports__, __webpack_require__) {7205 -1 'use strict';7206 -1 __webpack_require__.r(__webpack_exports__);7207 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');7208 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/index.js');7209 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');7210 -1 function duplicateImgLabelEvaluate(node, options, virtualNode) {7211 -1 if ([ 'none', 'presentation' ].includes(Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['getRole'])(virtualNode))) {7212 -1 return false;7213 -1 }7214 -1 var parentVNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['closest'])(virtualNode, options.parentSelector);7215 -1 if (!parentVNode) {7216 -1 return false;7217 -1 }7218 -1 var visibleText = Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['visibleVirtual'])(parentVNode, true).toLowerCase();7219 -1 if (visibleText === '') {7220 -1 return false;7221 -1 }7222 -1 return visibleText === Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['accessibleTextVirtual'])(virtualNode).toLowerCase();7223 -1 }7224 -1 __webpack_exports__['default'] = duplicateImgLabelEvaluate;-1 28604 "command": { -1 28605 "abstract": true, -1 28606 "namefrom": [ "author" ], -1 28607 "parent": [ "widget" ] 7225 28608 },7226 -1 './lib/checks/label/explicit-evaluate.js': function libChecksLabelExplicitEvaluateJs(module, __webpack_exports__, __webpack_require__) {7227 -1 'use strict';7228 -1 __webpack_require__.r(__webpack_exports__);7229 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');7230 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/index.js');7231 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');7232 -1 function explicitEvaluate(node, options, virtualNode) {7233 -1 try {7234 -1 if (virtualNode.attr('id')) {7235 -1 var root = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getRootNode'])(virtualNode.actualNode);7236 -1 var id = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['escapeSelector'])(virtualNode.attr('id'));7237 -1 var label = root.querySelector('label[for="'.concat(id, '"]'));7238 -1 if (label) {7239 -1 if (!Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isVisible'])(label)) {7240 -1 return true;7241 -1 } else {7242 -1 return !!Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['accessibleText'])(label);7243 -1 }7244 -1 }7245 -1 }7246 -1 return false;7247 -1 } catch (e) {7248 -1 return undefined;7249 -1 }7250 -1 }7251 -1 __webpack_exports__['default'] = explicitEvaluate;-1 28609 "complementary": { -1 28610 "namefrom": [ "author" ], -1 28611 "parent": [ "landmark" ] 7252 28612 },7253 -1 './lib/checks/label/help-same-as-label-evaluate.js': function libChecksLabelHelpSameAsLabelEvaluateJs(module, __webpack_exports__, __webpack_require__) {7254 -1 'use strict';7255 -1 __webpack_require__.r(__webpack_exports__);7256 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');7257 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/index.js');7258 -1 function helpSameAsLabelEvaluate(node, options, virtualNode) {7259 -1 var labelText = Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['labelVirtual'])(virtualNode), check = node.getAttribute('title');7260 -1 if (!labelText) {7261 -1 return false;7262 -1 }7263 -1 if (!check) {7264 -1 check = '';7265 -1 if (node.getAttribute('aria-describedby')) {7266 -1 var ref = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_1__['idrefs'])(node, 'aria-describedby');7267 -1 check = ref.map(function(thing) {7268 -1 return thing ? Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['accessibleText'])(thing) : '';7269 -1 }).join('');7270 -1 }7271 -1 }7272 -1 return Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['sanitize'])(check) === Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['sanitize'])(labelText);7273 -1 }7274 -1 __webpack_exports__['default'] = helpSameAsLabelEvaluate;-1 28613 "composite": { -1 28614 "abstract": true, -1 28615 "childpresentational": false, -1 28616 "namefrom": [ "author" ], -1 28617 "parent": [ "widget" ], -1 28618 "properties": [ "aria-activedescendant" ] 7275 28619 },7276 -1 './lib/checks/label/hidden-explicit-label-evaluate.js': function libChecksLabelHiddenExplicitLabelEvaluateJs(module, __webpack_exports__, __webpack_require__) {7277 -1 'use strict';7278 -1 __webpack_require__.r(__webpack_exports__);7279 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');7280 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/index.js');7281 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');7282 -1 function hiddenExplicitLabelEvaluate(node, options, virtualNode) {7283 -1 try {7284 -1 if (virtualNode.hasAttr('id')) {7285 -1 var root = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getRootNode'])(node);7286 -1 var id = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['escapeSelector'])(node.getAttribute('id'));7287 -1 var label = root.querySelector('label[for="'.concat(id, '"]'));7288 -1 if (label && !Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isVisible'])(label, true)) {7289 -1 var name = Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['accessibleTextVirtual'])(virtualNode).trim();7290 -1 var isNameEmpty = name === '';7291 -1 return isNameEmpty;7292 -1 }7293 -1 }7294 -1 return false;7295 -1 } catch (e) {7296 -1 return undefined;7297 -1 }7298 -1 }7299 -1 __webpack_exports__['default'] = hiddenExplicitLabelEvaluate;-1 28620 "contentinfo": { -1 28621 "namefrom": [ "author" ], -1 28622 "parent": [ "landmark" ] 7300 28623 },7301 -1 './lib/checks/label/implicit-evaluate.js': function libChecksLabelImplicitEvaluateJs(module, __webpack_exports__, __webpack_require__) {7302 -1 'use strict';7303 -1 __webpack_require__.r(__webpack_exports__);7304 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');7305 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/index.js');7306 -1 function implicitEvaluate(node, options, virtualNode) {7307 -1 try {7308 -1 var label = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['closest'])(virtualNode, 'label');7309 -1 if (label) {7310 -1 return !!Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['accessibleTextVirtual'])(label, {7311 -1 inControlContext: true7312 -1 });7313 -1 }7314 -1 return false;7315 -1 } catch (e) {7316 -1 return undefined;7317 -1 }7318 -1 }7319 -1 __webpack_exports__['default'] = implicitEvaluate;-1 28624 "definition": { -1 28625 "namefrom": [ "author" ], -1 28626 "parent": [ "section" ] 7320 28627 },7321 -1 './lib/checks/label/label-content-name-mismatch-evaluate.js': function libChecksLabelLabelContentNameMismatchEvaluateJs(module, __webpack_exports__, __webpack_require__) {7322 -1 'use strict';7323 -1 __webpack_require__.r(__webpack_exports__);7324 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');7325 -1 function isStringContained(compare, compareWith) {7326 -1 var curatedCompareWith = curateString(compareWith);7327 -1 var curatedCompare = curateString(compare);7328 -1 if (!curatedCompareWith || !curatedCompare) {7329 -1 return false;7330 -1 }7331 -1 return curatedCompareWith.includes(curatedCompare);7332 -1 }7333 -1 function curateString(str) {7334 -1 var noUnicodeStr = Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['removeUnicode'])(str, {7335 -1 emoji: true,7336 -1 nonBmp: true,7337 -1 punctuations: true7338 -1 });7339 -1 return Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['sanitize'])(noUnicodeStr);7340 -1 }7341 -1 function labelContentNameMismatchEvaluate(node, options, virtualNode) {7342 -1 var _ref6 = options || {}, pixelThreshold = _ref6.pixelThreshold, occuranceThreshold = _ref6.occuranceThreshold;7343 -1 var accText = Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['accessibleText'])(node).toLowerCase();7344 -1 if (Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['isHumanInterpretable'])(accText) < 1) {7345 -1 return undefined;7346 -1 }7347 -1 var textVNodes = Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['visibleTextNodes'])(virtualNode);7348 -1 var nonLigatureText = textVNodes.filter(function(textVNode) {7349 -1 return !Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['isIconLigature'])(textVNode, pixelThreshold, occuranceThreshold);7350 -1 }).map(function(textVNode) {7351 -1 return textVNode.actualNode.nodeValue;7352 -1 }).join('');7353 -1 var visibleText = Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['sanitize'])(nonLigatureText).toLowerCase();7354 -1 if (!visibleText) {7355 -1 return true;7356 -1 }7357 -1 if (Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['isHumanInterpretable'])(visibleText) < 1) {7358 -1 if (isStringContained(visibleText, accText)) {7359 -1 return true;7360 -1 }7361 -1 return undefined;7362 -1 }7363 -1 return isStringContained(visibleText, accText);7364 -1 }7365 -1 __webpack_exports__['default'] = labelContentNameMismatchEvaluate;-1 28628 "dialog": { -1 28629 "namefrom": [ "author" ], -1 28630 "namerequired": true, -1 28631 "parent": [ "window" ] 7366 28632 },7367 -1 './lib/checks/label/multiple-label-evaluate.js': function libChecksLabelMultipleLabelEvaluateJs(module, __webpack_exports__, __webpack_require__) {7368 -1 'use strict';7369 -1 __webpack_require__.r(__webpack_exports__);7370 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');7371 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');7372 -1 function multipleLabelEvaluate(node) {7373 -1 var id = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['escapeSelector'])(node.getAttribute('id'));7374 -1 var parent = node.parentNode;7375 -1 var root = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getRootNode'])(node);7376 -1 root = root.documentElement || root;7377 -1 var labels = Array.from(root.querySelectorAll('label[for="'.concat(id, '"]')));7378 -1 if (labels.length) {7379 -1 labels = labels.filter(function(label) {7380 -1 return Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isVisible'])(label);7381 -1 });7382 -1 }7383 -1 while (parent) {7384 -1 if (parent.nodeName.toUpperCase() === 'LABEL' && labels.indexOf(parent) === -1) {7385 -1 labels.push(parent);7386 -1 }7387 -1 parent = parent.parentNode;7388 -1 }7389 -1 this.relatedNodes(labels);7390 -1 if (labels.length > 1) {7391 -1 var ATVisibleLabels = labels.filter(function(label) {7392 -1 return Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isVisible'])(label, true);7393 -1 });7394 -1 if (ATVisibleLabels.length > 1) {7395 -1 return undefined;7396 -1 }7397 -1 var labelledby = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['idrefs'])(node, 'aria-labelledby');7398 -1 return !labelledby.includes(ATVisibleLabels[0]) ? undefined : false;7399 -1 }7400 -1 return false;7401 -1 }7402 -1 __webpack_exports__['default'] = multipleLabelEvaluate;-1 28633 "directory": { -1 28634 "namefrom": [ "contents", "author" ], -1 28635 "parent": [ "list" ] 7403 28636 },7404 -1 './lib/checks/label/title-only-evaluate.js': function libChecksLabelTitleOnlyEvaluateJs(module, __webpack_exports__, __webpack_require__) {7405 -1 'use strict';7406 -1 __webpack_require__.r(__webpack_exports__);7407 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');7408 -1 function titleOnlyEvaluate(node, options, virtualNode) {7409 -1 var labelText = Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['labelVirtual'])(virtualNode);7410 -1 var title = Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['titleText'])(virtualNode);7411 -1 var ariaDescribedBy = virtualNode.attr('aria-describedby');7412 -1 return !labelText && !!(title || ariaDescribedBy);7413 -1 }7414 -1 __webpack_exports__['default'] = titleOnlyEvaluate;-1 28637 "document": { -1 28638 "namefrom": [ " author" ], -1 28639 "namerequired": true, -1 28640 "parent": [ "structure" ], -1 28641 "properties": [ "aria-expanded" ] 7415 28642 },7416 -1 './lib/checks/landmarks/landmark-is-unique-after.js': function libChecksLandmarksLandmarkIsUniqueAfterJs(module, __webpack_exports__, __webpack_require__) {7417 -1 'use strict';7418 -1 __webpack_require__.r(__webpack_exports__);7419 -1 function landmarkIsUniqueAfter(results) {7420 -1 var uniqueLandmarks = [];7421 -1 return results.filter(function(currentResult) {7422 -1 var findMatch = function findMatch(someResult) {7423 -1 return currentResult.data.role === someResult.data.role && currentResult.data.accessibleText === someResult.data.accessibleText;7424 -1 };7425 -1 var matchedResult = uniqueLandmarks.find(findMatch);7426 -1 if (matchedResult) {7427 -1 matchedResult.result = false;7428 -1 matchedResult.relatedNodes.push(currentResult.relatedNodes[0]);7429 -1 return false;7430 -1 }7431 -1 uniqueLandmarks.push(currentResult);7432 -1 currentResult.relatedNodes = [];7433 -1 return true;7434 -1 });7435 -1 }7436 -1 __webpack_exports__['default'] = landmarkIsUniqueAfter;-1 28643 "form": { -1 28644 "namefrom": [ "author" ], -1 28645 "parent": [ "landmark" ] 7437 28646 },7438 -1 './lib/checks/landmarks/landmark-is-unique-evaluate.js': function libChecksLandmarksLandmarkIsUniqueEvaluateJs(module, __webpack_exports__, __webpack_require__) {7439 -1 'use strict';7440 -1 __webpack_require__.r(__webpack_exports__);7441 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');7442 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/index.js');7443 -1 function landmarkIsUniqueEvaluate(node, options, virtualNode) {7444 -1 var role = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['getRole'])(node);7445 -1 var accessibleText = Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['accessibleTextVirtual'])(virtualNode);7446 -1 accessibleText = accessibleText ? accessibleText.toLowerCase() : null;7447 -1 this.data({7448 -1 role: role,7449 -1 accessibleText: accessibleText7450 -1 });7451 -1 this.relatedNodes([ node ]);7452 -1 return true;7453 -1 }7454 -1 __webpack_exports__['default'] = landmarkIsUniqueEvaluate;-1 28647 "grid": { -1 28648 "mustcontain": [ "row", "rowgroup" ], -1 28649 "namefrom": [ "author" ], -1 28650 "namerequired": true, -1 28651 "parent": [ "composite", "region" ], -1 28652 "properties": [ "aria-level", "aria-multiselectable", "aria-readonly" ] 7455 28653 },7456 -1 './lib/checks/language/has-lang-evaluate.js': function libChecksLanguageHasLangEvaluateJs(module, __webpack_exports__, __webpack_require__) {7457 -1 'use strict';7458 -1 __webpack_require__.r(__webpack_exports__);7459 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');7460 -1 function hasValue(value) {7461 -1 return (value || '').trim() !== '';7462 -1 }7463 -1 function hasLangEvaluate(node, options, virtualNode) {7464 -1 if (options.attributes.includes('xml:lang') && options.attributes.includes('lang') && hasValue(virtualNode.attr('xml:lang')) && !hasValue(virtualNode.attr('lang')) && !Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['isXHTML'])(document)) {7465 -1 this.data({7466 -1 messageKey: 'noXHTML'7467 -1 });7468 -1 return false;7469 -1 }7470 -1 var hasLang = options.attributes.some(function(name) {7471 -1 return hasValue(virtualNode.attr(name));7472 -1 });7473 -1 if (!hasLang) {7474 -1 this.data({7475 -1 messageKey: 'noLang'7476 -1 });7477 -1 return false;7478 -1 }7479 -1 return true;7480 -1 }7481 -1 __webpack_exports__['default'] = hasLangEvaluate;-1 28654 "gridcell": { -1 28655 "namefrom": [ "contents", "author" ], -1 28656 "namerequired": true, -1 28657 "parent": [ "section", "widget" ], -1 28658 "properties": [ "aria-readonly", "aria-required", "aria-selected" ], -1 28659 "scope": [ "row" ] 7482 28660 },7483 -1 './lib/checks/language/valid-lang-evaluate.js': function libChecksLanguageValidLangEvaluateJs(module, __webpack_exports__, __webpack_require__) {7484 -1 'use strict';7485 -1 __webpack_require__.r(__webpack_exports__);7486 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');7487 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/index.js');7488 -1 function validLangEvaluate(node, options, virtualNode) {7489 -1 var langs = (options.value ? options.value : Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['validLangs'])()).map(_core_utils__WEBPACK_IMPORTED_MODULE_0__['getBaseLang']);7490 -1 var invalid = [];7491 -1 options.attributes.forEach(function(langAttr) {7492 -1 var langVal = virtualNode.attr(langAttr);7493 -1 if (typeof langVal !== 'string') {7494 -1 return;7495 -1 }7496 -1 var baselangVal = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['getBaseLang'])(langVal);7497 -1 if (baselangVal !== '' && langs.indexOf(baselangVal) === -1 || langVal !== '' && !Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['sanitize'])(langVal)) {7498 -1 invalid.push(langAttr + '="' + virtualNode.attr(langAttr) + '"');7499 -1 }7500 -1 });7501 -1 if (invalid.length) {7502 -1 this.data(invalid);7503 -1 return true;7504 -1 }7505 -1 return false;7506 -1 }7507 -1 __webpack_exports__['default'] = validLangEvaluate;-1 28661 "group": { -1 28662 "namefrom": [ " author" ], -1 28663 "parent": [ "section" ], -1 28664 "properties": [ "aria-activedescendant" ] 7508 28665 },7509 -1 './lib/checks/language/xml-lang-mismatch-evaluate.js': function libChecksLanguageXmlLangMismatchEvaluateJs(module, __webpack_exports__, __webpack_require__) {7510 -1 'use strict';7511 -1 __webpack_require__.r(__webpack_exports__);7512 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');7513 -1 function xmlLangMismatchEvaluate(node, options, vNode) {7514 -1 var primaryLangValue = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['getBaseLang'])(vNode.attr('lang'));7515 -1 var primaryXmlLangValue = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['getBaseLang'])(vNode.attr('xml:lang'));7516 -1 return primaryLangValue === primaryXmlLangValue;7517 -1 }7518 -1 __webpack_exports__['default'] = xmlLangMismatchEvaluate;-1 28666 "heading": { -1 28667 "namerequired": true, -1 28668 "parent": [ "sectionhead" ], -1 28669 "properties": [ "aria-level" ] 7519 28670 },7520 -1 './lib/checks/lists/dlitem-evaluate.js': function libChecksListsDlitemEvaluateJs(module, __webpack_exports__, __webpack_require__) {7521 -1 'use strict';7522 -1 __webpack_require__.r(__webpack_exports__);7523 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');7524 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/index.js');7525 -1 function dlitemEvaluate(node) {7526 -1 var parent = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getComposedParent'])(node);7527 -1 var parentTagName = parent.nodeName.toUpperCase();7528 -1 var parentRole = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['getExplicitRole'])(parent);7529 -1 if (parentTagName === 'DIV' && [ 'presentation', 'none', null ].includes(parentRole)) {7530 -1 parent = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getComposedParent'])(parent);7531 -1 parentTagName = parent.nodeName.toUpperCase();7532 -1 parentRole = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['getExplicitRole'])(parent);7533 -1 }7534 -1 if (parentTagName !== 'DL') {7535 -1 return false;7536 -1 }7537 -1 if (!parentRole || [ 'presentation', 'none', 'list' ].includes(parentRole)) {7538 -1 return true;7539 -1 }7540 -1 return false;7541 -1 }7542 -1 __webpack_exports__['default'] = dlitemEvaluate;-1 28671 "img": { -1 28672 "childpresentational": true, -1 28673 "namefrom": [ "author" ], -1 28674 "namerequired": true, -1 28675 "parent": [ "section" ] 7543 28676 },7544 -1 './lib/checks/lists/listitem-evaluate.js': function libChecksListsListitemEvaluateJs(module, __webpack_exports__, __webpack_require__) {7545 -1 'use strict';7546 -1 __webpack_require__.r(__webpack_exports__);7547 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');7548 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/index.js');7549 -1 function listitemEvaluate(node) {7550 -1 var parent = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getComposedParent'])(node);7551 -1 if (!parent) {7552 -1 return undefined;7553 -1 }7554 -1 var parentTagName = parent.nodeName.toUpperCase();7555 -1 var parentRole = (parent.getAttribute('role') || '').toLowerCase();7556 -1 if ([ 'presentation', 'none', 'list' ].includes(parentRole)) {7557 -1 return true;7558 -1 }7559 -1 if (parentRole && Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['isValidRole'])(parentRole)) {7560 -1 this.data({7561 -1 messageKey: 'roleNotValid'7562 -1 });7563 -1 return false;7564 -1 }7565 -1 return [ 'UL', 'OL' ].includes(parentTagName);7566 -1 }7567 -1 __webpack_exports__['default'] = listitemEvaluate;-1 28677 "input": { -1 28678 "abstract": true, -1 28679 "namefrom": [ "author" ], -1 28680 "parent": [ "widget" ] 7568 28681 },7569 -1 './lib/checks/lists/only-dlitems-evaluate.js': function libChecksListsOnlyDlitemsEvaluateJs(module, __webpack_exports__, __webpack_require__) {7570 -1 'use strict';7571 -1 __webpack_require__.r(__webpack_exports__);7572 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');7573 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/index.js');7574 -1 function onlyDlitemsEvaluate(node, options, virtualNode) {7575 -1 var ALLOWED_ROLES = [ 'definition', 'term', 'list' ];7576 -1 var base = {7577 -1 badNodes: [],7578 -1 hasNonEmptyTextNode: false7579 -1 };7580 -1 var content = virtualNode.children.reduce(function(content, child) {7581 -1 var actualNode = child.actualNode;7582 -1 if (actualNode.nodeName.toUpperCase() === 'DIV' && Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['getRole'])(actualNode) === null) {7583 -1 return content.concat(child.children);7584 -1 }7585 -1 return content.concat(child);7586 -1 }, []);7587 -1 var result = content.reduce(function(out, childNode) {7588 -1 var actualNode = childNode.actualNode;7589 -1 var tagName = actualNode.nodeName.toUpperCase();7590 -1 if (actualNode.nodeType === 1 && Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isVisible'])(actualNode, true, false)) {7591 -1 var explicitRole = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['getExplicitRole'])(actualNode);7592 -1 if (tagName !== 'DT' && tagName !== 'DD' || explicitRole) {7593 -1 if (!ALLOWED_ROLES.includes(explicitRole)) {7594 -1 out.badNodes.push(actualNode);7595 -1 }7596 -1 }7597 -1 } else if (actualNode.nodeType === 3 && actualNode.nodeValue.trim() !== '') {7598 -1 out.hasNonEmptyTextNode = true;7599 -1 }7600 -1 return out;7601 -1 }, base);7602 -1 if (result.badNodes.length) {7603 -1 this.relatedNodes(result.badNodes);7604 -1 }7605 -1 return !!result.badNodes.length || result.hasNonEmptyTextNode;7606 -1 }7607 -1 __webpack_exports__['default'] = onlyDlitemsEvaluate;-1 28682 "landmark": { -1 28683 "abstract": true, -1 28684 "namefrom": [ "contents", "author" ], -1 28685 "namerequired": false, -1 28686 "parent": [ "region" ] 7608 28687 },7609 -1 './lib/checks/lists/only-listitems-evaluate.js': function libChecksListsOnlyListitemsEvaluateJs(module, __webpack_exports__, __webpack_require__) {7610 -1 'use strict';7611 -1 __webpack_require__.r(__webpack_exports__);7612 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');7613 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/index.js');7614 -1 function onlyListitemsEvaluate(node, options, virtualNode) {7615 -1 var hasNonEmptyTextNode = false;7616 -1 var atLeastOneListitem = false;7617 -1 var isEmpty = true;7618 -1 var badNodes = [];7619 -1 var badRoleNodes = [];7620 -1 var badRoles = [];7621 -1 virtualNode.children.forEach(function(vNode) {7622 -1 var actualNode = vNode.actualNode;7623 -1 if (actualNode.nodeType === 3 && actualNode.nodeValue.trim() !== '') {7624 -1 hasNonEmptyTextNode = true;7625 -1 return;7626 -1 }7627 -1 if (actualNode.nodeType !== 1 || !Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isVisible'])(actualNode, true, false)) {7628 -1 return;7629 -1 }7630 -1 isEmpty = false;7631 -1 var isLi = actualNode.nodeName.toUpperCase() === 'LI';7632 -1 var role = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['getRole'])(vNode);7633 -1 var isListItemRole = role === 'listitem';7634 -1 if (!isLi && !isListItemRole) {7635 -1 badNodes.push(actualNode);7636 -1 }7637 -1 if (isLi && !isListItemRole) {7638 -1 badRoleNodes.push(actualNode);7639 -1 if (!badRoles.includes(role)) {7640 -1 badRoles.push(role);7641 -1 }7642 -1 }7643 -1 if (isListItemRole) {7644 -1 atLeastOneListitem = true;7645 -1 }7646 -1 });7647 -1 if (hasNonEmptyTextNode || badNodes.length) {7648 -1 this.relatedNodes(badNodes);7649 -1 return true;7650 -1 }7651 -1 if (isEmpty || atLeastOneListitem) {7652 -1 return false;7653 -1 }7654 -1 this.relatedNodes(badRoleNodes);7655 -1 this.data({7656 -1 messageKey: 'roleNotValid',7657 -1 roles: badRoles.join(', ')7658 -1 });7659 -1 return true;7660 -1 }7661 -1 __webpack_exports__['default'] = onlyListitemsEvaluate;-1 28688 "link": { -1 28689 "namefrom": [ "contents", "author" ], -1 28690 "namerequired": true, -1 28691 "parent": [ "command" ], -1 28692 "properties": [ "aria-expanded" ] 7662 28693 },7663 -1 './lib/checks/lists/structured-dlitems-evaluate.js': function libChecksListsStructuredDlitemsEvaluateJs(module, __webpack_exports__, __webpack_require__) {7664 -1 'use strict';7665 -1 __webpack_require__.r(__webpack_exports__);7666 -1 function structuredDlitemsEvaluate(node, options, virtualNode) {7667 -1 var children = virtualNode.children;7668 -1 if (!children || !children.length) {7669 -1 return false;7670 -1 }7671 -1 var hasDt = false, hasDd = false, nodeName;7672 -1 for (var i = 0; i < children.length; i++) {7673 -1 nodeName = children[i].props.nodeName.toUpperCase();7674 -1 if (nodeName === 'DT') {7675 -1 hasDt = true;7676 -1 }7677 -1 if (hasDt && nodeName === 'DD') {7678 -1 return false;7679 -1 }7680 -1 if (nodeName === 'DD') {7681 -1 hasDd = true;7682 -1 }7683 -1 }7684 -1 return hasDt || hasDd;7685 -1 }7686 -1 __webpack_exports__['default'] = structuredDlitemsEvaluate;-1 28694 "list": { -1 28695 "mustcontain": [ "group", "listitem" ], -1 28696 "namefrom": [ "author" ], -1 28697 "parent": [ "region" ] 7687 28698 },7688 -1 './lib/checks/media/caption-evaluate.js': function libChecksMediaCaptionEvaluateJs(module, __webpack_exports__, __webpack_require__) {7689 -1 'use strict';7690 -1 __webpack_require__.r(__webpack_exports__);7691 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');7692 -1 function captionEvaluate(node, options, virtualNode) {7693 -1 var tracks = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['querySelectorAll'])(virtualNode, 'track');7694 -1 var hasCaptions = tracks.some(function(vNode) {7695 -1 return (vNode.attr('kind') || '').toLowerCase() === 'captions';7696 -1 });7697 -1 return hasCaptions ? false : undefined;7698 -1 }7699 -1 __webpack_exports__['default'] = captionEvaluate;-1 28699 "listbox": { -1 28700 "mustcontain": [ "option" ], -1 28701 "namefrom": [ "author" ], -1 28702 "namerequired": true, -1 28703 "parent": [ "list", "select" ], -1 28704 "properties": [ "aria-multiselectable", "aria-required" ] 7700 28705 },7701 -1 './lib/checks/media/frame-tested-evaluate.js': function libChecksMediaFrameTestedEvaluateJs(module, __webpack_exports__, __webpack_require__) {7702 -1 'use strict';7703 -1 __webpack_require__.r(__webpack_exports__);7704 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');7705 -1 function frameTestedEvaluate(node, options) {7706 -1 var resolve = this.async();7707 -1 var _Object$assign = Object.assign({7708 -1 isViolation: false,7709 -1 timeout: 5007710 -1 }, options), isViolation = _Object$assign.isViolation, timeout = _Object$assign.timeout;7711 -1 var timer = setTimeout(function() {7712 -1 timer = setTimeout(function() {7713 -1 timer = null;7714 -1 resolve(isViolation ? false : undefined);7715 -1 }, 0);7716 -1 }, timeout);7717 -1 Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['respondable'])(node.contentWindow, 'axe.ping', null, undefined, function() {7718 -1 if (timer !== null) {7719 -1 clearTimeout(timer);7720 -1 resolve(true);7721 -1 }7722 -1 });7723 -1 }7724 -1 __webpack_exports__['default'] = frameTestedEvaluate;-1 28706 "listitem": { -1 28707 "namefrom": [ "contents", "author" ], -1 28708 "namerequired": true, -1 28709 "parent": [ "section" ], -1 28710 "properties": [ "aria-level", "aria-posinset", "aria-setsize" ], -1 28711 "scope": [ "list" ] 7725 28712 },7726 -1 './lib/checks/media/no-autoplay-audio-evaluate.js': function libChecksMediaNoAutoplayAudioEvaluateJs(module, __webpack_exports__, __webpack_require__) {7727 -1 'use strict';7728 -1 __webpack_require__.r(__webpack_exports__);7729 -1 function noAutoplayAudioEvaluate(node, options) {7730 -1 if (!node.duration) {7731 -1 console.warn('axe.utils.preloadMedia did not load metadata');7732 -1 return undefined;7733 -1 }7734 -1 var _options$allowedDurat = options.allowedDuration, allowedDuration = _options$allowedDurat === void 0 ? 3 : _options$allowedDurat;7735 -1 var playableDuration = getPlayableDuration(node);7736 -1 if (playableDuration <= allowedDuration && !node.hasAttribute('loop')) {7737 -1 return true;7738 -1 }7739 -1 if (!node.hasAttribute('controls')) {7740 -1 return false;7741 -1 }7742 -1 return true;7743 -1 function getPlayableDuration(elm) {7744 -1 if (!elm.currentSrc) {7745 -1 return 0;7746 -1 }7747 -1 var playbackRange = getPlaybackRange(elm.currentSrc);7748 -1 if (!playbackRange) {7749 -1 return Math.abs(elm.duration - (elm.currentTime || 0));7750 -1 }7751 -1 if (playbackRange.length === 1) {7752 -1 return Math.abs(elm.duration - playbackRange[0]);7753 -1 }7754 -1 return Math.abs(playbackRange[1] - playbackRange[0]);7755 -1 }7756 -1 function getPlaybackRange(src) {7757 -1 var match = src.match(/#t=(.*)/);7758 -1 if (!match) {7759 -1 return;7760 -1 }7761 -1 var _match = _slicedToArray(match, 2), value = _match[1];7762 -1 var ranges = value.split(',');7763 -1 return ranges.map(function(range) {7764 -1 if (/:/.test(range)) {7765 -1 return convertHourMinSecToSeconds(range);7766 -1 }7767 -1 return parseFloat(range);7768 -1 });7769 -1 }7770 -1 function convertHourMinSecToSeconds(hhMmSs) {7771 -1 var parts = hhMmSs.split(':');7772 -1 var secs = 0;7773 -1 var mins = 1;7774 -1 while (parts.length > 0) {7775 -1 secs += mins * parseInt(parts.pop(), 10);7776 -1 mins *= 60;7777 -1 }7778 -1 return parseFloat(secs);7779 -1 }7780 -1 }7781 -1 __webpack_exports__['default'] = noAutoplayAudioEvaluate;-1 28713 "log": { -1 28714 "namefrom": [ " author" ], -1 28715 "namerequired": true, -1 28716 "parent": [ "region" ] 7782 28717 },7783 -1 './lib/checks/mobile/css-orientation-lock-evaluate.js': function libChecksMobileCssOrientationLockEvaluateJs(module, __webpack_exports__, __webpack_require__) {7784 -1 'use strict';7785 -1 __webpack_require__.r(__webpack_exports__);7786 -1 function cssOrientationLockEvaluate(node, options, virtualNode, context) {7787 -1 var _ref7 = context || {}, _ref7$cssom = _ref7.cssom, cssom = _ref7$cssom === void 0 ? undefined : _ref7$cssom;7788 -1 var _ref8 = options || {}, _ref8$degreeThreshold = _ref8.degreeThreshold, degreeThreshold = _ref8$degreeThreshold === void 0 ? 0 : _ref8$degreeThreshold;7789 -1 if (!cssom || !cssom.length) {7790 -1 return undefined;7791 -1 }7792 -1 var isLocked = false;7793 -1 var relatedElements = [];7794 -1 var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);7795 -1 var _loop = function _loop() {7796 -1 var key = _Object$keys[_i2];7797 -1 var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;7798 -1 var orientationRules = rules.filter(isMediaRuleWithOrientation);7799 -1 if (!orientationRules.length) {7800 -1 return 'continue';7801 -1 }7802 -1 orientationRules.forEach(function(_ref9) {7803 -1 var cssRules = _ref9.cssRules;7804 -1 Array.from(cssRules).forEach(function(cssRule) {7805 -1 var locked = getIsOrientationLocked(cssRule);7806 -1 if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {7807 -1 var elms = Array.from(root.querySelectorAll(cssRule.selectorText)) || [];7808 -1 relatedElements = relatedElements.concat(elms);7809 -1 }7810 -1 isLocked = isLocked || locked;7811 -1 });7812 -1 });7813 -1 };7814 -1 for (var _i2 = 0, _Object$keys = Object.keys(rulesGroupByDocumentFragment); _i2 < _Object$keys.length; _i2++) {7815 -1 var _ret = _loop();7816 -1 if (_ret === 'continue') {7817 -1 continue;7818 -1 }7819 -1 }7820 -1 if (!isLocked) {7821 -1 return true;7822 -1 }7823 -1 if (relatedElements.length) {7824 -1 this.relatedNodes(relatedElements);7825 -1 }7826 -1 return false;7827 -1 function groupCssomByDocument(cssObjectModel) {7828 -1 return cssObjectModel.reduce(function(out, _ref10) {7829 -1 var sheet = _ref10.sheet, root = _ref10.root, shadowId = _ref10.shadowId;7830 -1 var key = shadowId ? shadowId : 'topDocument';7831 -1 if (!out[key]) {7832 -1 out[key] = {7833 -1 root: root,7834 -1 rules: []7835 -1 };7836 -1 }7837 -1 if (!sheet || !sheet.cssRules) {7838 -1 return out;7839 -1 }7840 -1 var rules = Array.from(sheet.cssRules);7841 -1 out[key].rules = out[key].rules.concat(rules);7842 -1 return out;7843 -1 }, {});7844 -1 }7845 -1 function isMediaRuleWithOrientation(_ref11) {7846 -1 var type = _ref11.type, cssText = _ref11.cssText;7847 -1 if (type !== 4) {7848 -1 return false;7849 -1 }7850 -1 return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);7851 -1 }7852 -1 function getIsOrientationLocked(_ref12) {7853 -1 var selectorText = _ref12.selectorText, style = _ref12.style;7854 -1 if (!selectorText || style.length <= 0) {7855 -1 return false;7856 -1 }7857 -1 var transformStyle = style.transform || style.webkitTransform || style.msTransform || false;7858 -1 if (!transformStyle) {7859 -1 return false;7860 -1 }7861 -1 var matches = transformStyle.match(/(rotate|rotateZ|rotate3d|matrix|matrix3d)\(([^)]+)\)(?!.*(rotate|rotateZ|rotate3d|matrix|matrix3d))/);7862 -1 if (!matches) {7863 -1 return false;7864 -1 }7865 -1 var _matches = _slicedToArray(matches, 3), transformFn = _matches[1], transformFnValue = _matches[2];7866 -1 var degrees = getRotationInDegrees(transformFn, transformFnValue);7867 -1 if (!degrees) {7868 -1 return false;7869 -1 }7870 -1 degrees = Math.abs(degrees);7871 -1 if (Math.abs(degrees - 180) % 180 <= degreeThreshold) {7872 -1 return false;7873 -1 }7874 -1 return Math.abs(degrees - 90) % 90 <= degreeThreshold;7875 -1 }7876 -1 function getRotationInDegrees(transformFunction, transformFnValue) {7877 -1 switch (transformFunction) {7878 -1 case 'rotate':7879 -1 case 'rotateZ':7880 -1 return getAngleInDegrees(transformFnValue);7881 -17882 -1 case 'rotate3d':7883 -1 var _transformFnValue$spl = transformFnValue.split(',').map(function(value) {7884 -1 return value.trim();7885 -1 }), _transformFnValue$spl2 = _slicedToArray(_transformFnValue$spl, 4), z = _transformFnValue$spl2[2], angleWithUnit = _transformFnValue$spl2[3];7886 -1 if (parseInt(z) === 0) {7887 -1 return;7888 -1 }7889 -1 return getAngleInDegrees(angleWithUnit);7890 -17891 -1 case 'matrix':7892 -1 case 'matrix3d':7893 -1 return getAngleInDegreesFromMatrixTransform(transformFnValue);7894 -17895 -1 default:7896 -1 return;7897 -1 }7898 -1 }7899 -1 function getAngleInDegrees(angleWithUnit) {7900 -1 var _ref13 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref14 = _slicedToArray(_ref13, 1), unit = _ref14[0];7901 -1 if (!unit) {7902 -1 return;7903 -1 }7904 -1 var angle = parseFloat(angleWithUnit.replace(unit, ''));7905 -1 switch (unit) {7906 -1 case 'rad':7907 -1 return convertRadToDeg(angle);7908 -17909 -1 case 'grad':7910 -1 return convertGradToDeg(angle);7911 -17912 -1 case 'turn':7913 -1 return convertTurnToDeg(angle);7914 -17915 -1 case 'deg':7916 -1 default:7917 -1 return parseInt(angle);7918 -1 }7919 -1 }7920 -1 function getAngleInDegreesFromMatrixTransform(transformFnValue) {7921 -1 var values = transformFnValue.split(',');7922 -1 if (values.length <= 6) {7923 -1 var _values = _slicedToArray(values, 2), a = _values[0], _b = _values[1];7924 -1 var radians = Math.atan2(parseFloat(_b), parseFloat(a));7925 -1 return convertRadToDeg(radians);7926 -1 }7927 -1 var sinB = parseFloat(values[8]);7928 -1 var b = Math.asin(sinB);7929 -1 var cosB = Math.cos(b);7930 -1 var rotateZRadians = Math.acos(parseFloat(values[0]) / cosB);7931 -1 return convertRadToDeg(rotateZRadians);7932 -1 }7933 -1 function convertRadToDeg(radians) {7934 -1 return Math.round(radians * (180 / Math.PI));7935 -1 }7936 -1 function convertGradToDeg(grad) {7937 -1 grad = grad % 400;7938 -1 if (grad < 0) {7939 -1 grad += 400;7940 -1 }7941 -1 return Math.round(grad / 400 * 360);7942 -1 }7943 -1 function convertTurnToDeg(turn) {7944 -1 return Math.round(360 / (1 / turn));7945 -1 }7946 -1 }7947 -1 __webpack_exports__['default'] = cssOrientationLockEvaluate;-1 28718 "main": { -1 28719 "namefrom": [ "author" ], -1 28720 "parent": [ "landmark" ] -1 28721 }, -1 28722 "marquee": { -1 28723 "namerequired": true, -1 28724 "parent": [ "section" ] -1 28725 }, -1 28726 "math": { -1 28727 "childpresentational": true, -1 28728 "namefrom": [ "author" ], -1 28729 "parent": [ "section" ] -1 28730 }, -1 28731 "menu": { -1 28732 "mustcontain": [ -1 28733 "group", -1 28734 "menuitemradio", -1 28735 "menuitem", -1 28736 "menuitemcheckbox" -1 28737 ], -1 28738 "namefrom": [ "author" ], -1 28739 "namerequired": true, -1 28740 "parent": [ "list", "select" ] 7948 28741 },7949 -1 './lib/checks/mobile/meta-viewport-scale-evaluate.js': function libChecksMobileMetaViewportScaleEvaluateJs(module, __webpack_exports__, __webpack_require__) {7950 -1 'use strict';7951 -1 __webpack_require__.r(__webpack_exports__);7952 -1 function metaViewportScaleEvaluate(node, options) {7953 -1 var _ref15 = options || {}, _ref15$scaleMinimum = _ref15.scaleMinimum, scaleMinimum = _ref15$scaleMinimum === void 0 ? 2 : _ref15$scaleMinimum, _ref15$lowerBound = _ref15.lowerBound, lowerBound = _ref15$lowerBound === void 0 ? false : _ref15$lowerBound;7954 -1 var content = node.getAttribute('content') || '';7955 -1 if (!content) {7956 -1 return true;7957 -1 }7958 -1 var result = content.split(/[;,]/).reduce(function(out, item) {7959 -1 var contentValue = item.trim();7960 -1 if (!contentValue) {7961 -1 return out;7962 -1 }7963 -1 var _contentValue$split = contentValue.split('='), _contentValue$split2 = _slicedToArray(_contentValue$split, 2), key = _contentValue$split2[0], value = _contentValue$split2[1];7964 -1 if (!key || !value) {7965 -1 return out;7966 -1 }7967 -1 var curatedKey = key.toLowerCase().trim();7968 -1 var curatedValue = value.toLowerCase().trim();7969 -1 if (curatedKey === 'maximum-scale' && curatedValue === 'yes') {7970 -1 curatedValue = 1;7971 -1 }7972 -1 if (curatedKey === 'maximum-scale' && parseFloat(curatedValue) < 0) {7973 -1 return out;7974 -1 }7975 -1 out[curatedKey] = curatedValue;7976 -1 return out;7977 -1 }, {});7978 -1 if (lowerBound && result['maximum-scale'] && parseFloat(result['maximum-scale']) < lowerBound) {7979 -1 return true;7980 -1 }7981 -1 if (!lowerBound && result['user-scalable'] === 'no') {7982 -1 this.data('user-scalable=no');7983 -1 return false;7984 -1 }7985 -1 if (result['maximum-scale'] && parseFloat(result['maximum-scale']) < scaleMinimum) {7986 -1 this.data('maximum-scale');7987 -1 return false;7988 -1 }7989 -1 return true;7990 -1 }7991 -1 __webpack_exports__['default'] = metaViewportScaleEvaluate;-1 28742 "menubar": { -1 28743 "namefrom": [ "author" ], -1 28744 "parent": [ "menu" ] 7992 28745 },7993 -1 './lib/checks/navigation/heading-order-after.js': function libChecksNavigationHeadingOrderAfterJs(module, __webpack_exports__, __webpack_require__) {7994 -1 'use strict';7995 -1 __webpack_require__.r(__webpack_exports__);7996 -1 function headingOrderAfter(results) {7997 -1 if (results.length < 2) {7998 -1 return results;7999 -1 }8000 -1 var prevLevel = results[0].data;8001 -1 for (var i = 1; i < results.length; i++) {8002 -1 if (results[i].result && results[i].data > prevLevel + 1) {8003 -1 results[i].result = false;8004 -1 }8005 -1 prevLevel = results[i].data;8006 -1 }8007 -1 return results;8008 -1 }8009 -1 __webpack_exports__['default'] = headingOrderAfter;-1 28746 "menuitem": { -1 28747 "namefrom": [ "contents", "author" ], -1 28748 "namerequired": true, -1 28749 "parent": [ "command" ], -1 28750 "scope": [ "menu", "menubar" ] 8010 28751 },8011 -1 './lib/checks/navigation/heading-order-evaluate.js': function libChecksNavigationHeadingOrderEvaluateJs(module, __webpack_exports__, __webpack_require__) {8012 -1 'use strict';8013 -1 __webpack_require__.r(__webpack_exports__);8014 -1 function headingOrderEvaluate(node, options, virtualNode) {8015 -1 var ariaHeadingLevel = virtualNode.attr('aria-level');8016 -1 var nodeName = virtualNode.props.nodeName;8017 -1 if (ariaHeadingLevel !== null) {8018 -1 this.data(parseInt(ariaHeadingLevel, 10));8019 -1 return true;8020 -1 }8021 -1 var headingLevel = nodeName.toUpperCase().match(/H(\d)/);8022 -1 if (headingLevel) {8023 -1 this.data(parseInt(headingLevel[1], 10));8024 -1 return true;8025 -1 }8026 -1 return true;8027 -1 }8028 -1 __webpack_exports__['default'] = headingOrderEvaluate;-1 28752 "menuitemcheckbox": { -1 28753 "namefrom": [ "contents", "author" ], -1 28754 "namerequired": true, -1 28755 "parent": [ "checkbox", "menuitem" ], -1 28756 "scope": [ "menu", "menubar" ] 8029 28757 },8030 -1 './lib/checks/navigation/identical-links-same-purpose-after.js': function libChecksNavigationIdenticalLinksSamePurposeAfterJs(module, __webpack_exports__, __webpack_require__) {8031 -1 'use strict';8032 -1 __webpack_require__.r(__webpack_exports__);8033 -1 function isIdenticalObject(a, b) {8034 -1 if (!a || !b) {8035 -1 return false;8036 -1 }8037 -1 var aProps = Object.getOwnPropertyNames(a);8038 -1 var bProps = Object.getOwnPropertyNames(b);8039 -1 if (aProps.length !== bProps.length) {8040 -1 return false;8041 -1 }8042 -1 var result = aProps.every(function(propName) {8043 -1 var aValue = a[propName];8044 -1 var bValue = b[propName];8045 -1 if (_typeof(aValue) !== _typeof(bValue)) {8046 -1 return false;8047 -1 }8048 -1 if (typeof aValue === 'object' || typeof bValue === 'object') {8049 -1 return isIdenticalObject(aValue, bValue);8050 -1 }8051 -1 return aValue === bValue;8052 -1 });8053 -1 return result;8054 -1 }8055 -1 function identicalLinksSamePurposeAfter(results) {8056 -1 if (results.length < 2) {8057 -1 return results;8058 -1 }8059 -1 var incompleteResults = results.filter(function(_ref16) {8060 -1 var result = _ref16.result;8061 -1 return result !== undefined;8062 -1 });8063 -1 var uniqueResults = [];8064 -1 var nameMap = {};8065 -1 var _loop2 = function _loop2(index) {8066 -1 var _currentResult$relate;8067 -1 var currentResult = incompleteResults[index];8068 -1 var _currentResult$data = currentResult.data, name = _currentResult$data.name, urlProps = _currentResult$data.urlProps;8069 -1 if (nameMap[name]) {8070 -1 return 'continue';8071 -1 }8072 -1 var sameNameResults = incompleteResults.filter(function(_ref17, resultNum) {8073 -1 var data = _ref17.data;8074 -1 return data.name === name && resultNum !== index;8075 -1 });8076 -1 var isSameUrl = sameNameResults.every(function(_ref18) {8077 -1 var data = _ref18.data;8078 -1 return isIdenticalObject(data.urlProps, urlProps);8079 -1 });8080 -1 if (sameNameResults.length && !isSameUrl) {8081 -1 currentResult.result = undefined;8082 -1 }8083 -1 currentResult.relatedNodes = [];8084 -1 (_currentResult$relate = currentResult.relatedNodes).push.apply(_currentResult$relate, _toConsumableArray(sameNameResults.map(function(node) {8085 -1 return node.relatedNodes[0];8086 -1 })));8087 -1 nameMap[name] = sameNameResults;8088 -1 uniqueResults.push(currentResult);8089 -1 };8090 -1 for (var index = 0; index < incompleteResults.length; index++) {8091 -1 var _ret2 = _loop2(index);8092 -1 if (_ret2 === 'continue') {8093 -1 continue;8094 -1 }8095 -1 }8096 -1 return uniqueResults;8097 -1 }8098 -1 __webpack_exports__['default'] = identicalLinksSamePurposeAfter;-1 28758 "menuitemradio": { -1 28759 "namefrom": [ "contents", "author" ], -1 28760 "namerequired": true, -1 28761 "parent": [ "menuitemcheckbox", "radio" ], -1 28762 "scope": [ "menu", "menubar" ] 8099 28763 },8100 -1 './lib/checks/navigation/identical-links-same-purpose-evaluate.js': function libChecksNavigationIdenticalLinksSamePurposeEvaluateJs(module, __webpack_exports__, __webpack_require__) {8101 -1 'use strict';8102 -1 __webpack_require__.r(__webpack_exports__);8103 -1 var _commons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/index.js');8104 -1 function identicalLinksSamePurposeEvaluate(node, options, virtualNode) {8105 -1 var accText = _commons__WEBPACK_IMPORTED_MODULE_0__['text'].accessibleTextVirtual(virtualNode);8106 -1 var name = _commons__WEBPACK_IMPORTED_MODULE_0__['text'].sanitize(_commons__WEBPACK_IMPORTED_MODULE_0__['text'].removeUnicode(accText, {8107 -1 emoji: true,8108 -1 nonBmp: true,8109 -1 punctuations: true8110 -1 })).toLowerCase();8111 -1 if (!name) {8112 -1 return undefined;8113 -1 }8114 -1 var afterData = {8115 -1 name: name,8116 -1 urlProps: _commons__WEBPACK_IMPORTED_MODULE_0__['dom'].urlPropsFromAttribute(node, 'href')8117 -1 };8118 -1 this.data(afterData);8119 -1 this.relatedNodes([ node ]);8120 -1 return true;8121 -1 }8122 -1 __webpack_exports__['default'] = identicalLinksSamePurposeEvaluate;-1 28764 "navigation": { -1 28765 "namefrom": [ "author" ], -1 28766 "parent": [ "landmark" ] 8123 28767 },8124 -1 './lib/checks/navigation/internal-link-present-evaluate.js': function libChecksNavigationInternalLinkPresentEvaluateJs(module, __webpack_exports__, __webpack_require__) {8125 -1 'use strict';8126 -1 __webpack_require__.r(__webpack_exports__);8127 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');8128 -1 function internalLinkPresentEvaluate(node, options, virtualNode) {8129 -1 var links = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['querySelectorAll'])(virtualNode, 'a[href]');8130 -1 return links.some(function(vLink) {8131 -1 return /^#[^/!]/.test(vLink.actualNode.getAttribute('href'));8132 -1 });8133 -1 }8134 -1 __webpack_exports__['default'] = internalLinkPresentEvaluate;-1 28768 "note": { -1 28769 "namefrom": [ "author" ], -1 28770 "parent": [ "section" ] 8135 28771 },8136 -1 './lib/checks/navigation/meta-refresh-evaluate.js': function libChecksNavigationMetaRefreshEvaluateJs(module, __webpack_exports__, __webpack_require__) {8137 -1 'use strict';8138 -1 __webpack_require__.r(__webpack_exports__);8139 -1 function metaRefreshEvaluate(node, options, virtualNode) {8140 -1 var content = virtualNode.attr('content') || '', parsedParams = content.split(/[;,]/);8141 -1 return content === '' || parsedParams[0] === '0';8142 -1 }8143 -1 __webpack_exports__['default'] = metaRefreshEvaluate;-1 28772 "option": { -1 28773 "namefrom": [ "contents", "author" ], -1 28774 "namerequired": true, -1 28775 "parent": [ "input" ], -1 28776 "properties": [ -1 28777 "aria-checked", -1 28778 "aria-posinset", -1 28779 "aria-selected", -1 28780 "aria-setsize" -1 28781 ] 8144 28782 },8145 -1 './lib/checks/navigation/p-as-heading-evaluate.js': function libChecksNavigationPAsHeadingEvaluateJs(module, __webpack_exports__, __webpack_require__) {8146 -1 'use strict';8147 -1 __webpack_require__.r(__webpack_exports__);8148 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');8149 -1 function normalizeFontWeight(weight) {8150 -1 switch (weight) {8151 -1 case 'lighter':8152 -1 return 100;8153 -18154 -1 case 'normal':8155 -1 return 400;8156 -18157 -1 case 'bold':8158 -1 return 700;8159 -18160 -1 case 'bolder':8161 -1 return 900;8162 -1 }8163 -1 weight = parseInt(weight);8164 -1 return !isNaN(weight) ? weight : 400;8165 -1 }8166 -1 function getTextContainer(elm) {8167 -1 var nextNode = elm;8168 -1 var outerText = elm.textContent.trim();8169 -1 var innerText = outerText;8170 -1 while (innerText === outerText && nextNode !== undefined) {8171 -1 var i = -1;8172 -1 elm = nextNode;8173 -1 if (elm.children.length === 0) {8174 -1 return elm;8175 -1 }8176 -1 do {8177 -1 i++;8178 -1 innerText = elm.children[i].textContent.trim();8179 -1 } while (innerText === '' && i + 1 < elm.children.length);8180 -1 nextNode = elm.children[i];8181 -1 }8182 -1 return elm;8183 -1 }8184 -1 function getStyleValues(node) {8185 -1 var style = window.getComputedStyle(getTextContainer(node));8186 -1 return {8187 -1 fontWeight: normalizeFontWeight(style.getPropertyValue('font-weight')),8188 -1 fontSize: parseInt(style.getPropertyValue('font-size')),8189 -1 isItalic: style.getPropertyValue('font-style') === 'italic'8190 -1 };8191 -1 }8192 -1 function isHeaderStyle(styleA, styleB, margins) {8193 -1 return margins.reduce(function(out, margin) {8194 -1 return out || (!margin.size || styleA.fontSize / margin.size > styleB.fontSize) && (!margin.weight || styleA.fontWeight - margin.weight > styleB.fontWeight) && (!margin.italic || styleA.isItalic && !styleB.isItalic);8195 -1 }, false);8196 -1 }8197 -1 function pAsHeadingEvaluate(node, options, virtualNode) {8198 -1 var siblings = Array.from(node.parentNode.children);8199 -1 var currentIndex = siblings.indexOf(node);8200 -1 options = options || {};8201 -1 var margins = options.margins || [];8202 -1 var nextSibling = siblings.slice(currentIndex + 1).find(function(elm) {8203 -1 return elm.nodeName.toUpperCase() === 'P';8204 -1 });8205 -1 var prevSibling = siblings.slice(0, currentIndex).reverse().find(function(elm) {8206 -1 return elm.nodeName.toUpperCase() === 'P';8207 -1 });8208 -1 var currStyle = getStyleValues(node);8209 -1 var nextStyle = nextSibling ? getStyleValues(nextSibling) : null;8210 -1 var prevStyle = prevSibling ? getStyleValues(prevSibling) : null;8211 -1 if (!nextStyle || !isHeaderStyle(currStyle, nextStyle, margins)) {8212 -1 return true;8213 -1 }8214 -1 var blockquote = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['findUpVirtual'])(virtualNode, 'blockquote');8215 -1 if (blockquote && blockquote.nodeName.toUpperCase() === 'BLOCKQUOTE') {8216 -1 return undefined;8217 -1 }8218 -1 if (prevStyle && !isHeaderStyle(currStyle, prevStyle, margins)) {8219 -1 return undefined;8220 -1 }8221 -1 return false;8222 -1 }8223 -1 __webpack_exports__['default'] = pAsHeadingEvaluate;-1 28783 "presentation": { -1 28784 "parent": [ "structure" ] 8224 28785 },8225 -1 './lib/checks/navigation/region-evaluate.js': function libChecksNavigationRegionEvaluateJs(module, __webpack_exports__, __webpack_require__) {8226 -1 'use strict';8227 -1 __webpack_require__.r(__webpack_exports__);8228 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');8229 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/index.js');8230 -1 var _commons_standards__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/standards/index.js');8231 -1 var _commons_matches__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/matches/index.js');8232 -1 var _core_base_cache__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/core/base/cache.js');8233 -1 var landmarkRoles = _commons_standards__WEBPACK_IMPORTED_MODULE_2__['getAriaRolesByType']('landmark');8234 -1 var implicitAriaLiveRoles = [ 'alert', 'log', 'status' ];8235 -1 function isRegion(virtualNode, options) {8236 -1 var node = virtualNode.actualNode;8237 -1 var role = _commons_aria__WEBPACK_IMPORTED_MODULE_1__['getRole'](virtualNode);8238 -1 var ariaLive = (node.getAttribute('aria-live') || '').toLowerCase().trim();8239 -1 if ([ 'assertive', 'polite' ].includes(ariaLive) || implicitAriaLiveRoles.includes(role)) {8240 -1 return true;8241 -1 }8242 -1 if (landmarkRoles.includes(role)) {8243 -1 return true;8244 -1 }8245 -1 if (options.regionMatcher && Object(_commons_matches__WEBPACK_IMPORTED_MODULE_3__['default'])(virtualNode, options.regionMatcher)) {8246 -1 return true;8247 -1 }8248 -1 return false;8249 -1 }8250 -1 function findRegionlessElms(virtualNode, options) {8251 -1 var node = virtualNode.actualNode;8252 -1 if (isRegion(virtualNode, options) || _commons_dom__WEBPACK_IMPORTED_MODULE_0__['isSkipLink'](virtualNode.actualNode) && _commons_dom__WEBPACK_IMPORTED_MODULE_0__['getElementByReference'](virtualNode.actualNode, 'href') || !_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isVisible'](node, true)) {8253 -1 var vNode = virtualNode;8254 -1 while (vNode) {8255 -1 vNode._hasRegionDescendant = true;8256 -1 vNode = vNode.parent;8257 -1 }8258 -1 return [];8259 -1 } else if (node !== document.body && _commons_dom__WEBPACK_IMPORTED_MODULE_0__['hasContent'](node, true)) {8260 -1 return [ virtualNode ];8261 -1 } else {8262 -1 return virtualNode.children.filter(function(_ref19) {8263 -1 var actualNode = _ref19.actualNode;8264 -1 return actualNode.nodeType === 1;8265 -1 }).map(function(vNode) {8266 -1 return findRegionlessElms(vNode, options);8267 -1 }).reduce(function(a, b) {8268 -1 return a.concat(b);8269 -1 }, []);8270 -1 }8271 -1 }8272 -1 function regionEvaluate(node, options, virtualNode) {8273 -1 var regionlessNodes = _core_base_cache__WEBPACK_IMPORTED_MODULE_4__['default'].get('regionlessNodes');8274 -1 if (regionlessNodes) {8275 -1 return !regionlessNodes.includes(virtualNode);8276 -1 }8277 -1 var tree = axe._tree;8278 -1 regionlessNodes = findRegionlessElms(tree[0], options).map(function(vNode) {8279 -1 while (vNode.parent && !vNode.parent._hasRegionDescendant && vNode.parent.actualNode !== document.body) {8280 -1 vNode = vNode.parent;8281 -1 }8282 -1 return vNode;8283 -1 }).filter(function(vNode, index, array) {8284 -1 return array.indexOf(vNode) === index;8285 -1 });8286 -1 _core_base_cache__WEBPACK_IMPORTED_MODULE_4__['default'].set('regionlessNodes', regionlessNodes);8287 -1 return !regionlessNodes.includes(virtualNode);8288 -1 }8289 -1 __webpack_exports__['default'] = regionEvaluate;-1 28786 "progressbar": { -1 28787 "childpresentational": true, -1 28788 "namefrom": [ "author" ], -1 28789 "namerequired": true, -1 28790 "parent": [ "range" ] 8290 28791 },8291 -1 './lib/checks/navigation/skip-link-evaluate.js': function libChecksNavigationSkipLinkEvaluateJs(module, __webpack_exports__, __webpack_require__) {8292 -1 'use strict';8293 -1 __webpack_require__.r(__webpack_exports__);8294 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');8295 -1 function skipLinkEvaluate(node) {8296 -1 var target = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getElementByReference'])(node, 'href');8297 -1 if (target) {8298 -1 return Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isVisible'])(target, true) || undefined;8299 -1 }8300 -1 return false;8301 -1 }8302 -1 __webpack_exports__['default'] = skipLinkEvaluate;-1 28792 "radio": { -1 28793 "namefrom": [ "contents", "author" ], -1 28794 "namerequired": true, -1 28795 "parent": [ "checkbox", "option" ] 8303 28796 },8304 -1 './lib/checks/navigation/unique-frame-title-after.js': function libChecksNavigationUniqueFrameTitleAfterJs(module, __webpack_exports__, __webpack_require__) {8305 -1 'use strict';8306 -1 __webpack_require__.r(__webpack_exports__);8307 -1 function uniqueFrameTitleAfter(results) {8308 -1 var titles = {};8309 -1 results.forEach(function(r) {8310 -1 titles[r.data] = titles[r.data] !== undefined ? ++titles[r.data] : 0;8311 -1 });8312 -1 results.forEach(function(r) {8313 -1 r.result = !!titles[r.data];8314 -1 });8315 -1 return results;8316 -1 }8317 -1 __webpack_exports__['default'] = uniqueFrameTitleAfter;-1 28797 "radiogroup": { -1 28798 "mustcontain": [ "radio" ], -1 28799 "namefrom": [ "author" ], -1 28800 "namerequired": true, -1 28801 "parent": [ "select" ], -1 28802 "properties": [ "aria-required" ] 8318 28803 },8319 -1 './lib/checks/navigation/unique-frame-title-evaluate.js': function libChecksNavigationUniqueFrameTitleEvaluateJs(module, __webpack_exports__, __webpack_require__) {8320 -1 'use strict';8321 -1 __webpack_require__.r(__webpack_exports__);8322 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');8323 -1 function uniqueFrameTitleEvaluate(node, options, vNode) {8324 -1 var title = Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['sanitize'])(vNode.attr('title') || '').trim().toLowerCase();8325 -1 this.data(title);8326 -1 return true;8327 -1 }8328 -1 __webpack_exports__['default'] = uniqueFrameTitleEvaluate;-1 28804 "range": { -1 28805 "abstract": true, -1 28806 "namefrom": [ "author" ], -1 28807 "parent": [ "widget" ], -1 28808 "properties": [ -1 28809 "aria-valuemax", -1 28810 "aria-valuemin", -1 28811 "aria-valuenow", -1 28812 "aria-valuetext" -1 28813 ] 8329 28814 },8330 -1 './lib/checks/parsing/duplicate-id-after.js': function libChecksParsingDuplicateIdAfterJs(module, __webpack_exports__, __webpack_require__) {8331 -1 'use strict';8332 -1 __webpack_require__.r(__webpack_exports__);8333 -1 function duplicateIdAfter(results) {8334 -1 var uniqueIds = [];8335 -1 return results.filter(function(r) {8336 -1 if (uniqueIds.indexOf(r.data) === -1) {8337 -1 uniqueIds.push(r.data);8338 -1 return true;8339 -1 }8340 -1 return false;8341 -1 });8342 -1 }8343 -1 __webpack_exports__['default'] = duplicateIdAfter;-1 28815 "region": { -1 28816 "namefrom": [ " author" ], -1 28817 "parent": [ "section" ] 8344 28818 },8345 -1 './lib/checks/parsing/duplicate-id-evaluate.js': function libChecksParsingDuplicateIdEvaluateJs(module, __webpack_exports__, __webpack_require__) {8346 -1 'use strict';8347 -1 __webpack_require__.r(__webpack_exports__);8348 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');8349 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');8350 -1 function duplicateIdEvaluate(node) {8351 -1 var id = node.getAttribute('id').trim();8352 -1 if (!id) {8353 -1 return true;8354 -1 }8355 -1 var root = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getRootNode'])(node);8356 -1 var matchingNodes = Array.from(root.querySelectorAll('[id="'.concat(Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['escapeSelector'])(id), '"]'))).filter(function(foundNode) {8357 -1 return foundNode !== node;8358 -1 });8359 -1 if (matchingNodes.length) {8360 -1 this.relatedNodes(matchingNodes);8361 -1 }8362 -1 this.data(id);8363 -1 return matchingNodes.length === 0;8364 -1 }8365 -1 __webpack_exports__['default'] = duplicateIdEvaluate;-1 28819 "roletype": { -1 28820 "abstract": true, -1 28821 "properties": [ -1 28822 "aria-atomic", -1 28823 "aria-busy", -1 28824 "aria-controls", -1 28825 "aria-describedby", -1 28826 "aria-disabled", -1 28827 "aria-dropeffect", -1 28828 "aria-flowto", -1 28829 "aria-grabbed", -1 28830 "aria-haspopup", -1 28831 "aria-hidden", -1 28832 "aria-invalid", -1 28833 "aria-label", -1 28834 "aria-labelledby", -1 28835 "aria-live", -1 28836 "aria-owns", -1 28837 "aria-relevant" -1 28838 ] 8366 28839 },8367 -1 './lib/checks/shared/aria-label-evaluate.js': function libChecksSharedAriaLabelEvaluateJs(module, __webpack_exports__, __webpack_require__) {8368 -1 'use strict';8369 -1 __webpack_require__.r(__webpack_exports__);8370 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');8371 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/index.js');8372 -1 function ariaLabelEvaluate(node, options, virtualNode) {8373 -1 return !!Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['sanitize'])(Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['arialabelText'])(virtualNode));8374 -1 }8375 -1 __webpack_exports__['default'] = ariaLabelEvaluate;-1 28840 "row": { -1 28841 "mustcontain": [ "columnheader", "gridcell", "rowheader" ], -1 28842 "namefrom": [ "contents", "author" ], -1 28843 "parent": [ "group", "widget" ], -1 28844 "properties": [ "aria-level", "aria-selected" ], -1 28845 "scope": [ "grid", "rowgroup", "treegrid" ] 8376 28846 },8377 -1 './lib/checks/shared/aria-labelledby-evaluate.js': function libChecksSharedAriaLabelledbyEvaluateJs(module, __webpack_exports__, __webpack_require__) {8378 -1 'use strict';8379 -1 __webpack_require__.r(__webpack_exports__);8380 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');8381 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/index.js');8382 -1 function ariaLabelledbyEvaluate(node, options, virtualNode) {8383 -1 try {8384 -1 return !!Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['sanitize'])(Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['arialabelledbyText'])(virtualNode));8385 -1 } catch (e) {8386 -1 return undefined;8387 -1 }8388 -1 }8389 -1 __webpack_exports__['default'] = ariaLabelledbyEvaluate;-1 28847 "rowgroup": { -1 28848 "mustcontain": [ "row" ], -1 28849 "namefrom": [ "contents", "author" ], -1 28850 "parent": [ "group" ], -1 28851 "scope": [ "grid" ] 8390 28852 },8391 -1 './lib/checks/shared/avoid-inline-spacing-evaluate.js': function libChecksSharedAvoidInlineSpacingEvaluateJs(module, __webpack_exports__, __webpack_require__) {8392 -1 'use strict';8393 -1 __webpack_require__.r(__webpack_exports__);8394 -1 function avoidInlineSpacingEvaluate(node, options) {8395 -1 var overriddenProperties = options.cssProperties.filter(function(property) {8396 -1 if (node.style.getPropertyPriority(property) === 'important') {8397 -1 return property;8398 -1 }8399 -1 });8400 -1 if (overriddenProperties.length > 0) {8401 -1 this.data(overriddenProperties);8402 -1 return false;8403 -1 }8404 -1 return true;8405 -1 }8406 -1 __webpack_exports__['default'] = avoidInlineSpacingEvaluate;-1 28853 "rowheader": { -1 28854 "namefrom": [ "contents", "author" ], -1 28855 "namerequired": true, -1 28856 "parent": [ "gridcell", "sectionhead", "widget" ], -1 28857 "properties": [ "aria-sort" ], -1 28858 "scope": [ "row" ] -1 28859 }, -1 28860 "search": { -1 28861 "namefrom": [ "author" ], -1 28862 "parent": [ "landmark" ] -1 28863 }, -1 28864 "section": { -1 28865 "abstract": true, -1 28866 "namefrom": [ "contents", "author" ], -1 28867 "parent": [ "structure" ], -1 28868 "properties": [ "aria-expanded" ] 8407 28869 },8408 -1 './lib/checks/shared/doc-has-title-evaluate.js': function libChecksSharedDocHasTitleEvaluateJs(module, __webpack_exports__, __webpack_require__) {8409 -1 'use strict';8410 -1 __webpack_require__.r(__webpack_exports__);8411 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');8412 -1 function docHasTitleEvaluate() {8413 -1 var title = document.title;8414 -1 return !!(title ? Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['sanitize'])(title).trim() : '');8415 -1 }8416 -1 __webpack_exports__['default'] = docHasTitleEvaluate;-1 28870 "sectionhead": { -1 28871 "abstract": true, -1 28872 "namefrom": [ "contents", "author" ], -1 28873 "parent": [ "structure" ], -1 28874 "properties": [ "aria-expanded" ] 8417 28875 },8418 -1 './lib/checks/shared/exists-evaluate.js': function libChecksSharedExistsEvaluateJs(module, __webpack_exports__, __webpack_require__) {8419 -1 'use strict';8420 -1 __webpack_require__.r(__webpack_exports__);8421 -1 function existsEvaluate() {8422 -1 return undefined;8423 -1 }8424 -1 __webpack_exports__['default'] = existsEvaluate;-1 28876 "select": { -1 28877 "abstract": true, -1 28878 "namefrom": [ "author" ], -1 28879 "parent": [ "composite", "group", "input" ] 8425 28880 },8426 -1 './lib/checks/shared/has-alt-evaluate.js': function libChecksSharedHasAltEvaluateJs(module, __webpack_exports__, __webpack_require__) {8427 -1 'use strict';8428 -1 __webpack_require__.r(__webpack_exports__);8429 -1 function hasAltEvaluate(node, options, virtualNode) {8430 -1 var nodeName = virtualNode.props.nodeName;8431 -1 if (![ 'img', 'input', 'area' ].includes(nodeName)) {8432 -1 return false;8433 -1 }8434 -1 return virtualNode.hasAttr('alt');8435 -1 }8436 -1 __webpack_exports__['default'] = hasAltEvaluate;-1 28881 "separator": { -1 28882 "childpresentational": true, -1 28883 "namefrom": [ "author" ], -1 28884 "parent": [ "structure" ], -1 28885 "properties": [ "aria-expanded", "aria-orientation" ] 8437 28886 },8438 -1 './lib/checks/shared/is-on-screen-evaluate.js': function libChecksSharedIsOnScreenEvaluateJs(module, __webpack_exports__, __webpack_require__) {8439 -1 'use strict';8440 -1 __webpack_require__.r(__webpack_exports__);8441 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');8442 -1 function isOnScreenEvaluate(node) {8443 -1 return Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isVisible'])(node, false) && !Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isOffscreen'])(node);8444 -1 }8445 -1 __webpack_exports__['default'] = isOnScreenEvaluate;-1 28887 "scrollbar": { -1 28888 "childpresentational": true, -1 28889 "namefrom": [ "author" ], -1 28890 "namerequired": false, -1 28891 "parent": [ "input", "range" ], -1 28892 "requiredProperties": [ -1 28893 "aria-controls", -1 28894 "aria-orientation", -1 28895 "aria-valuemax", -1 28896 "aria-valuemin", -1 28897 "aria-valuenow" -1 28898 ], -1 28899 "properties": [ -1 28900 "aria-controls", -1 28901 "aria-orientation", -1 28902 "aria-valuemax", -1 28903 "aria-valuemin", -1 28904 "aria-valuenow" -1 28905 ] 8446 28906 },8447 -1 './lib/checks/shared/non-empty-if-present-evaluate.js': function libChecksSharedNonEmptyIfPresentEvaluateJs(module, __webpack_exports__, __webpack_require__) {8448 -1 'use strict';8449 -1 __webpack_require__.r(__webpack_exports__);8450 -1 function nonEmptyIfPresentEvaluate(node, options, virtualNode) {8451 -1 var nodeName = virtualNode.props.nodeName;8452 -1 var type = (virtualNode.attr('type') || '').toLowerCase();8453 -1 var label = virtualNode.attr('value');8454 -1 if (label) {8455 -1 this.data({8456 -1 messageKey: 'has-label'8457 -1 });8458 -1 }8459 -1 if (nodeName === 'input' && [ 'submit', 'reset' ].includes(type)) {8460 -1 return label === null;8461 -1 }8462 -1 return false;8463 -1 }8464 -1 __webpack_exports__['default'] = nonEmptyIfPresentEvaluate;-1 28907 "slider": { -1 28908 "childpresentational": true, -1 28909 "namefrom": [ "author" ], -1 28910 "namerequired": true, -1 28911 "parent": [ "input", "range" ], -1 28912 "requiredProperties": [ "aria-valuemax", "aria-valuemin", "aria-valuenow" ], -1 28913 "properties": [ -1 28914 "aria-valuemax", -1 28915 "aria-valuemin", -1 28916 "aria-valuenow", -1 28917 "aria-orientation" -1 28918 ] 8465 28919 },8466 -1 './lib/checks/shared/svg-non-empty-title-evaluate.js': function libChecksSharedSvgNonEmptyTitleEvaluateJs(module, __webpack_exports__, __webpack_require__) {8467 -1 'use strict';8468 -1 __webpack_require__.r(__webpack_exports__);8469 -1 var _commons_text_visible_virtual__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/visible-virtual.js');8470 -1 function svgNonEmptyTitleEvaluate(node, options, virtualNode) {8471 -1 try {8472 -1 var titleNode = virtualNode.children.find(function(_ref20) {8473 -1 var props = _ref20.props;8474 -1 return props.nodeName === 'title';8475 -1 });8476 -1 if (!titleNode) {8477 -1 this.data({8478 -1 messageKey: 'noTitle'8479 -1 });8480 -1 return false;8481 -1 }8482 -1 if (Object(_commons_text_visible_virtual__WEBPACK_IMPORTED_MODULE_0__['default'])(titleNode) === '') {8483 -1 this.data({8484 -1 messageKey: 'emptyTitle'8485 -1 });8486 -1 return false;8487 -1 }8488 -1 return true;8489 -1 } catch (e) {8490 -1 return undefined;8491 -1 }8492 -1 }8493 -1 __webpack_exports__['default'] = svgNonEmptyTitleEvaluate;-1 28920 "spinbutton": { -1 28921 "namefrom": [ "author" ], -1 28922 "namerequired": true, -1 28923 "parent": [ "input", "range" ], -1 28924 "requiredProperties": [ "aria-valuemax", "aria-valuemin", "aria-valuenow" ], -1 28925 "properties": [ -1 28926 "aria-valuemax", -1 28927 "aria-valuemin", -1 28928 "aria-valuenow", -1 28929 "aria-required" -1 28930 ] 8494 28931 },8495 -1 './lib/checks/tables/caption-faked-evaluate.js': function libChecksTablesCaptionFakedEvaluateJs(module, __webpack_exports__, __webpack_require__) {8496 -1 'use strict';8497 -1 __webpack_require__.r(__webpack_exports__);8498 -1 var _commons_table__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/table/index.js');8499 -1 function captionFakedEvaluate(node) {8500 -1 var table = Object(_commons_table__WEBPACK_IMPORTED_MODULE_0__['toGrid'])(node);8501 -1 var firstRow = table[0];8502 -1 if (table.length <= 1 || firstRow.length <= 1 || node.rows.length <= 1) {8503 -1 return true;8504 -1 }8505 -1 return firstRow.reduce(function(out, curr, i) {8506 -1 return out || curr !== firstRow[i + 1] && firstRow[i + 1] !== undefined;8507 -1 }, false);8508 -1 }8509 -1 __webpack_exports__['default'] = captionFakedEvaluate;-1 28932 "status": { -1 28933 "parent": [ "region" ] 8510 28934 },8511 -1 './lib/checks/tables/html5-scope-evaluate.js': function libChecksTablesHtml5ScopeEvaluateJs(module, __webpack_exports__, __webpack_require__) {8512 -1 'use strict';8513 -1 __webpack_require__.r(__webpack_exports__);8514 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');8515 -1 function html5ScopeEvaluate(node) {8516 -1 if (!Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isHTML5'])(document)) {8517 -1 return true;8518 -1 }8519 -1 return node.nodeName.toUpperCase() === 'TH';8520 -1 }8521 -1 __webpack_exports__['default'] = html5ScopeEvaluate;-1 28935 "structure": { -1 28936 "abstract": true, -1 28937 "parent": [ "roletype" ] 8522 28938 },8523 -1 './lib/checks/tables/same-caption-summary-evaluate.js': function libChecksTablesSameCaptionSummaryEvaluateJs(module, __webpack_exports__, __webpack_require__) {8524 -1 'use strict';8525 -1 __webpack_require__.r(__webpack_exports__);8526 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');8527 -1 function sameCaptionSummaryEvaluate(node) {8528 -1 return !!(node.summary && node.caption) && node.summary.toLowerCase() === Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['accessibleText'])(node.caption).toLowerCase();8529 -1 }8530 -1 __webpack_exports__['default'] = sameCaptionSummaryEvaluate;-1 28939 "tab": { -1 28940 "namefrom": [ "contents", "author" ], -1 28941 "parent": [ "sectionhead", "widget" ], -1 28942 "properties": [ "aria-selected" ], -1 28943 "scope": [ "tablist" ] 8531 28944 },8532 -1 './lib/checks/tables/scope-value-evaluate.js': function libChecksTablesScopeValueEvaluateJs(module, __webpack_exports__, __webpack_require__) {8533 -1 'use strict';8534 -1 __webpack_require__.r(__webpack_exports__);8535 -1 function scopeValueEvaluate(node, options) {8536 -1 var value = node.getAttribute('scope').toLowerCase();8537 -1 return options.values.indexOf(value) !== -1;8538 -1 }8539 -1 __webpack_exports__['default'] = scopeValueEvaluate;-1 28945 "tablist": { -1 28946 "mustcontain": [ "tab" ], -1 28947 "namefrom": [ "author" ], -1 28948 "parent": [ "composite", "directory" ], -1 28949 "properties": [ "aria-level" ] 8540 28950 },8541 -1 './lib/checks/tables/td-has-header-evaluate.js': function libChecksTablesTdHasHeaderEvaluateJs(module, __webpack_exports__, __webpack_require__) {8542 -1 'use strict';8543 -1 __webpack_require__.r(__webpack_exports__);8544 -1 var _commons_table__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/table/index.js');8545 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/index.js');8546 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/aria/index.js');8547 -1 function tdHasHeaderEvaluate(node) {8548 -1 var badCells = [];8549 -1 var cells = _commons_table__WEBPACK_IMPORTED_MODULE_0__['getAllCells'](node);8550 -1 var tableGrid = _commons_table__WEBPACK_IMPORTED_MODULE_0__['toGrid'](node);8551 -1 cells.forEach(function(cell) {8552 -1 if (Object(_commons_dom__WEBPACK_IMPORTED_MODULE_1__['hasContent'])(cell) && _commons_table__WEBPACK_IMPORTED_MODULE_0__['isDataCell'](cell) && !Object(_commons_aria__WEBPACK_IMPORTED_MODULE_2__['label'])(cell)) {8553 -1 var hasHeaders = _commons_table__WEBPACK_IMPORTED_MODULE_0__['getHeaders'](cell, tableGrid).some(function(header) {8554 -1 return header !== null && !!Object(_commons_dom__WEBPACK_IMPORTED_MODULE_1__['hasContent'])(header);8555 -1 });8556 -1 if (!hasHeaders) {8557 -1 badCells.push(cell);8558 -1 }8559 -1 }8560 -1 });8561 -1 if (badCells.length) {8562 -1 this.relatedNodes(badCells);8563 -1 return false;8564 -1 }8565 -1 return true;8566 -1 }8567 -1 __webpack_exports__['default'] = tdHasHeaderEvaluate;-1 28951 "tabpanel": { -1 28952 "namefrom": [ "author" ], -1 28953 "namerequired": true, -1 28954 "parent": [ "region" ] 8568 28955 },8569 -1 './lib/checks/tables/td-headers-attr-evaluate.js': function libChecksTablesTdHeadersAttrEvaluateJs(module, __webpack_exports__, __webpack_require__) {8570 -1 'use strict';8571 -1 __webpack_require__.r(__webpack_exports__);8572 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');8573 -1 function tdHeadersAttrEvaluate(node) {8574 -1 var cells = [];8575 -1 var reviewCells = [];8576 -1 var badCells = [];8577 -1 for (var rowIndex = 0; rowIndex < node.rows.length; rowIndex++) {8578 -1 var row = node.rows[rowIndex];8579 -1 for (var cellIndex = 0; cellIndex < row.cells.length; cellIndex++) {8580 -1 cells.push(row.cells[cellIndex]);8581 -1 }8582 -1 }8583 -1 var ids = cells.reduce(function(ids, cell) {8584 -1 if (cell.getAttribute('id')) {8585 -1 ids.push(cell.getAttribute('id'));8586 -1 }8587 -1 return ids;8588 -1 }, []);8589 -1 cells.forEach(function(cell) {8590 -1 var isSelf = false;8591 -1 var notOfTable = false;8592 -1 if (!cell.hasAttribute('headers')) {8593 -1 return;8594 -1 }8595 -1 var headersAttr = cell.getAttribute('headers').trim();8596 -1 if (!headersAttr) {8597 -1 return reviewCells.push(cell);8598 -1 }8599 -1 var headers = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['tokenList'])(headersAttr);8600 -1 if (headers.length !== 0) {8601 -1 if (cell.getAttribute('id')) {8602 -1 isSelf = headers.indexOf(cell.getAttribute('id').trim()) !== -1;8603 -1 }8604 -1 notOfTable = headers.some(function(header) {8605 -1 return !ids.includes(header);8606 -1 });8607 -1 if (isSelf || notOfTable) {8608 -1 badCells.push(cell);8609 -1 }8610 -1 }8611 -1 });8612 -1 if (badCells.length > 0) {8613 -1 this.relatedNodes(badCells);8614 -1 return false;8615 -1 }8616 -1 if (reviewCells.length) {8617 -1 this.relatedNodes(reviewCells);8618 -1 return undefined;8619 -1 }8620 -1 return true;8621 -1 }8622 -1 __webpack_exports__['default'] = tdHeadersAttrEvaluate;-1 28956 "textbox": { -1 28957 "namefrom": [ "author" ], -1 28958 "namerequired": true, -1 28959 "parent": [ "input" ], -1 28960 "properties": [ -1 28961 "aria-activedescendant", -1 28962 "aria-autocomplete", -1 28963 "aria-multiline", -1 28964 "aria-readonly", -1 28965 "aria-required" -1 28966 ] 8623 28967 },8624 -1 './lib/checks/tables/th-has-data-cells-evaluate.js': function libChecksTablesThHasDataCellsEvaluateJs(module, __webpack_exports__, __webpack_require__) {8625 -1 'use strict';8626 -1 __webpack_require__.r(__webpack_exports__);8627 -1 var _commons_table__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/table/index.js');8628 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/index.js');8629 -1 function thHasDataCellsEvaluate(node) {8630 -1 var cells = _commons_table__WEBPACK_IMPORTED_MODULE_0__['getAllCells'](node);8631 -1 var checkResult = this;8632 -1 var reffedHeaders = [];8633 -1 cells.forEach(function(cell) {8634 -1 var headers = cell.getAttribute('headers');8635 -1 if (headers) {8636 -1 reffedHeaders = reffedHeaders.concat(headers.split(/\s+/));8637 -1 }8638 -1 var ariaLabel = cell.getAttribute('aria-labelledby');8639 -1 if (ariaLabel) {8640 -1 reffedHeaders = reffedHeaders.concat(ariaLabel.split(/\s+/));8641 -1 }8642 -1 });8643 -1 var headers = cells.filter(function(cell) {8644 -1 if (Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['sanitize'])(cell.textContent) === '') {8645 -1 return false;8646 -1 }8647 -1 return cell.nodeName.toUpperCase() === 'TH' || [ 'rowheader', 'columnheader' ].indexOf(cell.getAttribute('role')) !== -1;8648 -1 });8649 -1 var tableGrid = _commons_table__WEBPACK_IMPORTED_MODULE_0__['toGrid'](node);8650 -1 var out = true;8651 -1 headers.forEach(function(header) {8652 -1 if (header.getAttribute('id') && reffedHeaders.includes(header.getAttribute('id'))) {8653 -1 return;8654 -1 }8655 -1 var pos = _commons_table__WEBPACK_IMPORTED_MODULE_0__['getCellPosition'](header, tableGrid);8656 -1 var hasCell = false;8657 -1 if (_commons_table__WEBPACK_IMPORTED_MODULE_0__['isColumnHeader'](header)) {8658 -1 hasCell = _commons_table__WEBPACK_IMPORTED_MODULE_0__['traverse']('down', pos, tableGrid).find(function(cell) {8659 -1 return !_commons_table__WEBPACK_IMPORTED_MODULE_0__['isColumnHeader'](cell) && _commons_table__WEBPACK_IMPORTED_MODULE_0__['getHeaders'](cell, tableGrid).includes(header);8660 -1 });8661 -1 }8662 -1 if (!hasCell && _commons_table__WEBPACK_IMPORTED_MODULE_0__['isRowHeader'](header)) {8663 -1 hasCell = _commons_table__WEBPACK_IMPORTED_MODULE_0__['traverse']('right', pos, tableGrid).find(function(cell) {8664 -1 return !_commons_table__WEBPACK_IMPORTED_MODULE_0__['isRowHeader'](cell) && _commons_table__WEBPACK_IMPORTED_MODULE_0__['getHeaders'](cell, tableGrid).includes(header);8665 -1 });8666 -1 }8667 -1 if (!hasCell) {8668 -1 checkResult.relatedNodes(header);8669 -1 }8670 -1 out = out && hasCell;8671 -1 });8672 -1 return out ? true : undefined;8673 -1 }8674 -1 __webpack_exports__['default'] = thHasDataCellsEvaluate;-1 28968 "timer": { -1 28969 "namefrom": [ "author" ], -1 28970 "namerequired": true, -1 28971 "parent": [ "status" ] 8675 28972 },8676 -1 './lib/checks/visibility/hidden-content-evaluate.js': function libChecksVisibilityHiddenContentEvaluateJs(module, __webpack_exports__, __webpack_require__) {8677 -1 'use strict';8678 -1 __webpack_require__.r(__webpack_exports__);8679 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');8680 -1 function hiddenContentEvaluate(node, options, virtualNode) {8681 -1 var whitelist = [ 'SCRIPT', 'HEAD', 'TITLE', 'NOSCRIPT', 'STYLE', 'TEMPLATE' ];8682 -1 if (!whitelist.includes(node.nodeName.toUpperCase()) && Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['hasContentVirtual'])(virtualNode)) {8683 -1 var styles = window.getComputedStyle(node);8684 -1 if (styles.getPropertyValue('display') === 'none') {8685 -1 return undefined;8686 -1 } else if (styles.getPropertyValue('visibility') === 'hidden') {8687 -1 var parent = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getComposedParent'])(node);8688 -1 var parentStyle = parent && window.getComputedStyle(parent);8689 -1 if (!parentStyle || parentStyle.getPropertyValue('visibility') !== 'hidden') {8690 -1 return undefined;8691 -1 }8692 -1 }8693 -1 }8694 -1 return true;8695 -1 }8696 -1 __webpack_exports__['default'] = hiddenContentEvaluate;-1 28973 "toolbar": { -1 28974 "namefrom": [ "author" ], -1 28975 "parent": [ "group" ] 8697 28976 },8698 -1 './lib/commons/aria/allowed-attr.js': function libCommonsAriaAllowedAttrJs(module, __webpack_exports__, __webpack_require__) {8699 -1 'use strict';8700 -1 __webpack_require__.r(__webpack_exports__);8701 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');8702 -1 var _standards_get_global_aria_attrs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/standards/get-global-aria-attrs.js');8703 -1 function allowedAttr(role) {8704 -1 var roleDef = _standards__WEBPACK_IMPORTED_MODULE_0__['default'].ariaRoles[role];8705 -1 var attrs = _toConsumableArray(Object(_standards_get_global_aria_attrs__WEBPACK_IMPORTED_MODULE_1__['default'])());8706 -1 if (!roleDef) {8707 -1 return attrs;8708 -1 }8709 -1 if (roleDef.allowedAttrs) {8710 -1 attrs.push.apply(attrs, _toConsumableArray(roleDef.allowedAttrs));8711 -1 }8712 -1 if (roleDef.requiredAttrs) {8713 -1 attrs.push.apply(attrs, _toConsumableArray(roleDef.requiredAttrs));8714 -1 }8715 -1 return attrs;8716 -1 }8717 -1 __webpack_exports__['default'] = allowedAttr;-1 28977 "tooltip": { -1 28978 "namerequired": true, -1 28979 "parent": [ "section" ] 8718 28980 },8719 -1 './lib/commons/aria/arialabel-text.js': function libCommonsAriaArialabelTextJs(module, __webpack_exports__, __webpack_require__) {8720 -1 'use strict';8721 -1 __webpack_require__.r(__webpack_exports__);8722 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');8723 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');8724 -1 function arialabelText(vNode) {8725 -1 if (!(vNode instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_0__['default'])) {8726 -1 if (vNode.nodeType !== 1) {8727 -1 return '';8728 -1 }8729 -1 vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeFromTree'])(vNode);8730 -1 }8731 -1 return vNode.attr('aria-label') || '';8732 -1 }8733 -1 __webpack_exports__['default'] = arialabelText;-1 28981 "tree": { -1 28982 "mustcontain": [ "group", "treeitem" ], -1 28983 "namefrom": [ "author" ], -1 28984 "namerequired": true, -1 28985 "parent": [ "select" ], -1 28986 "properties": [ "aria-multiselectable", "aria-required" ] 8734 28987 },8735 -1 './lib/commons/aria/arialabelledby-text.js': function libCommonsAriaArialabelledbyTextJs(module, __webpack_exports__, __webpack_require__) {8736 -1 'use strict';8737 -1 __webpack_require__.r(__webpack_exports__);8738 -1 var _dom_idrefs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/idrefs.js');8739 -1 var _text_accessible_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/accessible-text.js');8740 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');8741 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/index.js');8742 -1 function arialabelledbyText(vNode) {8743 -1 var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};8744 -1 if (!(vNode instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_2__['default'])) {8745 -1 if (vNode.nodeType !== 1) {8746 -1 return '';8747 -1 }8748 -1 vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['getNodeFromTree'])(vNode);8749 -1 }8750 -1 if (vNode.props.nodeType !== 1 || context.inLabelledByContext || context.inControlContext || !vNode.attr('aria-labelledby')) {8751 -1 return '';8752 -1 }8753 -1 var refs = Object(_dom_idrefs__WEBPACK_IMPORTED_MODULE_0__['default'])(vNode, 'aria-labelledby').filter(function(elm) {8754 -1 return elm;8755 -1 });8756 -1 return refs.reduce(function(accessibleName, elm) {8757 -1 var accessibleNameAdd = Object(_text_accessible_text__WEBPACK_IMPORTED_MODULE_1__['default'])(elm, _extends({8758 -1 inLabelledByContext: true,8759 -1 startNode: context.startNode || vNode8760 -1 }, context));8761 -1 if (!accessibleName) {8762 -1 return accessibleNameAdd;8763 -1 } else {8764 -1 return ''.concat(accessibleName, ' ').concat(accessibleNameAdd);8765 -1 }8766 -1 }, '');8767 -1 }8768 -1 __webpack_exports__['default'] = arialabelledbyText;-1 28988 "treegrid": { -1 28989 "mustcontain": [ "row" ], -1 28990 "namefrom": [ "author" ], -1 28991 "namerequired": true, -1 28992 "parent": [ "grid", "tree" ] 8769 28993 },8770 -1 './lib/commons/aria/get-element-unallowed-roles.js': function libCommonsAriaGetElementUnallowedRolesJs(module, __webpack_exports__, __webpack_require__) {8771 -1 'use strict';8772 -1 __webpack_require__.r(__webpack_exports__);8773 -1 var _is_valid_role__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/is-valid-role.js');8774 -1 var _implicit_role__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/implicit-role.js');8775 -1 var _get_role_type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/aria/get-role-type.js');8776 -1 var _is_aria_role_allowed_on_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/aria/is-aria-role-allowed-on-element.js');8777 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/core/utils/index.js');8778 -1 var dpubRoles = [ 'doc-backlink', 'doc-biblioentry', 'doc-biblioref', 'doc-cover', 'doc-endnote', 'doc-glossref', 'doc-noteref' ];8779 -1 function getRoleSegments(node) {8780 -1 var roles = [];8781 -1 if (!node) {8782 -1 return roles;8783 -1 }8784 -1 if (node.hasAttribute('role')) {8785 -1 var nodeRoles = Object(_core_utils__WEBPACK_IMPORTED_MODULE_4__['tokenList'])(node.getAttribute('role').toLowerCase());8786 -1 roles = roles.concat(nodeRoles);8787 -1 }8788 -1 if (node.hasAttributeNS('http://www.idpf.org/2007/ops', 'type')) {8789 -1 var epubRoles = Object(_core_utils__WEBPACK_IMPORTED_MODULE_4__['tokenList'])(node.getAttributeNS('http://www.idpf.org/2007/ops', 'type').toLowerCase()).map(function(role) {8790 -1 return 'doc-'.concat(role);8791 -1 });8792 -1 roles = roles.concat(epubRoles);8793 -1 }8794 -1 roles = roles.filter(function(role) {8795 -1 return Object(_is_valid_role__WEBPACK_IMPORTED_MODULE_0__['default'])(role);8796 -1 });8797 -1 return roles;8798 -1 }8799 -1 function getElementUnallowedRoles(node) {8800 -1 var allowImplicit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;8801 -1 var tagName = node.nodeName.toUpperCase();8802 -1 if (!Object(_core_utils__WEBPACK_IMPORTED_MODULE_4__['isHtmlElement'])(node)) {8803 -1 return [];8804 -1 }8805 -1 var roleSegments = getRoleSegments(node);8806 -1 var implicitRole = Object(_implicit_role__WEBPACK_IMPORTED_MODULE_1__['default'])(node);8807 -1 var unallowedRoles = roleSegments.filter(function(role) {8808 -1 if (allowImplicit && role === implicitRole) {8809 -1 return false;8810 -1 }8811 -1 if (allowImplicit && dpubRoles.includes(role)) {8812 -1 var roleType = Object(_get_role_type__WEBPACK_IMPORTED_MODULE_2__['default'])(role);8813 -1 if (implicitRole !== roleType) {8814 -1 return true;8815 -1 }8816 -1 }8817 -1 if (!allowImplicit && !(role === 'row' && tagName === 'TR' && Object(_core_utils__WEBPACK_IMPORTED_MODULE_4__['matchesSelector'])(node, 'table[role="grid"] > tr'))) {8818 -1 return true;8819 -1 }8820 -1 return !Object(_is_aria_role_allowed_on_element__WEBPACK_IMPORTED_MODULE_3__['default'])(node, role);8821 -1 });8822 -1 return unallowedRoles;8823 -1 }8824 -1 __webpack_exports__['default'] = getElementUnallowedRoles;-1 28994 "treeitem": { -1 28995 "namefrom": [ "contents", "author" ], -1 28996 "namerequired": true, -1 28997 "parent": [ "listitem", "option" ], -1 28998 "scope": [ "group", "tree" ] 8825 28999 },8826 -1 './lib/commons/aria/get-explicit-role.js': function libCommonsAriaGetExplicitRoleJs(module, __webpack_exports__, __webpack_require__) {8827 -1 'use strict';8828 -1 __webpack_require__.r(__webpack_exports__);8829 -1 var _is_valid_role__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/is-valid-role.js');8830 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');8831 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');8832 -1 function getExplicitRole(vNode) {8833 -1 var _ref21 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, fallback = _ref21.fallback, abstracts = _ref21.abstracts, dpub = _ref21.dpub;8834 -1 vNode = vNode instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_2__['default'] ? vNode : Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeFromTree'])(vNode);8835 -1 if (vNode.props.nodeType !== 1) {8836 -1 return null;8837 -1 }8838 -1 var roleAttr = (vNode.attr('role') || '').trim().toLowerCase();8839 -1 var roleList = fallback ? Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['tokenList'])(roleAttr) : [ roleAttr ];8840 -1 var firstValidRole = roleList.find(function(role) {8841 -1 if (!dpub && role.substr(0, 4) === 'doc-') {8842 -1 return false;8843 -1 }8844 -1 return Object(_is_valid_role__WEBPACK_IMPORTED_MODULE_0__['default'])(role, {8845 -1 allowAbstract: abstracts8846 -1 });8847 -1 });8848 -1 return firstValidRole || null;8849 -1 }8850 -1 __webpack_exports__['default'] = getExplicitRole;-1 29000 "widget": { -1 29001 "abstract": true, -1 29002 "parent": [ "roletype" ] 8851 29003 },8852 -1 './lib/commons/aria/get-owned-virtual.js': function libCommonsAriaGetOwnedVirtualJs(module, __webpack_exports__, __webpack_require__) {8853 -1 'use strict';8854 -1 __webpack_require__.r(__webpack_exports__);8855 -1 var _dom_idrefs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/idrefs.js');8856 -1 function getOwnedVirtual(virtualNode) {8857 -1 var actualNode = virtualNode.actualNode, children = virtualNode.children;8858 -1 if (!children) {8859 -1 throw new Error('getOwnedVirtual requires a virtual node');8860 -1 }8861 -1 if (virtualNode.hasAttr('aria-owns')) {8862 -1 var owns = Object(_dom_idrefs__WEBPACK_IMPORTED_MODULE_0__['default'])(actualNode, 'aria-owns').filter(function(element) {8863 -1 return !!element;8864 -1 }).map(function(element) {8865 -1 return axe.utils.getNodeFromTree(element);8866 -1 });8867 -1 return [].concat(_toConsumableArray(children), _toConsumableArray(owns));8868 -1 }8869 -1 return _toConsumableArray(children);8870 -1 }8871 -1 __webpack_exports__['default'] = getOwnedVirtual;-1 29004 "window": { -1 29005 "abstract": true, -1 29006 "namefrom": [ " author" ], -1 29007 "parent": [ "roletype" ], -1 29008 "properties": [ "aria-expanded" ] -1 29009 } -1 29010 }; -1 29011 -1 29012 axs.constants.WIDGET_ROLES = {}; -1 29013 -1 29014 /** -1 29015 * Squashes the parent hierarchy on to role object. -1 29016 * @param {Object} role -1 29017 * @param {Object} set -1 29018 * @private -1 29019 */ -1 29020 axs.constants.addAllParentRolesToSet_ = function(role, set) { -1 29021 if (!role['parent']) -1 29022 return; -1 29023 var parents = role['parent']; -1 29024 for (var j = 0; j < parents.length; j++) { -1 29025 var parentRoleName = parents[j]; -1 29026 set[parentRoleName] = true; -1 29027 axs.constants.addAllParentRolesToSet_( -1 29028 axs.constants.ARIA_ROLES[parentRoleName], set); -1 29029 } -1 29030 }; -1 29031 -1 29032 /** -1 29033 * Adds all properties and requiredProperties from parent hierarchy. -1 29034 * @param {Object} role -1 29035 * @param {string} propertiesName -1 29036 * @param {Object} propertiesSet -1 29037 * @private -1 29038 */ -1 29039 axs.constants.addAllPropertiesToSet_ = function(role, propertiesName, -1 29040 propertiesSet) { -1 29041 var properties = role[propertiesName]; -1 29042 if (properties) { -1 29043 for (var i = 0; i < properties.length; i++) -1 29044 propertiesSet[properties[i]] = true; -1 29045 } -1 29046 if (role['parent']) { -1 29047 var parents = role['parent']; -1 29048 for (var j = 0; j < parents.length; j++) { -1 29049 var parentRoleName = parents[j]; -1 29050 axs.constants.addAllPropertiesToSet_( -1 29051 axs.constants.ARIA_ROLES[parentRoleName], propertiesName, -1 29052 propertiesSet); -1 29053 } -1 29054 } -1 29055 }; -1 29056 -1 29057 // TODO make a AriaRole object etc. -1 29058 for (var roleName in axs.constants.ARIA_ROLES) { -1 29059 var role = axs.constants.ARIA_ROLES[roleName]; -1 29060 -1 29061 var propertiesSet = {}; -1 29062 axs.constants.addAllPropertiesToSet_(role, 'properties', propertiesSet); -1 29063 role['propertiesSet'] = propertiesSet; -1 29064 -1 29065 var requiredPropertiesSet = {}; -1 29066 axs.constants.addAllPropertiesToSet_(role, 'requiredProperties', requiredPropertiesSet); -1 29067 role['requiredPropertiesSet'] = requiredPropertiesSet; -1 29068 var parentRolesSet = {}; -1 29069 axs.constants.addAllParentRolesToSet_(role, parentRolesSet); -1 29070 role['allParentRolesSet'] = parentRolesSet; -1 29071 if ('widget' in parentRolesSet) -1 29072 axs.constants.WIDGET_ROLES[roleName] = role; -1 29073 } -1 29074 -1 29075 // BEGIN ARIA_PROPERTIES_AUTOGENERATED -1 29076 /** @type {Object.<string, Object>} */ -1 29077 axs.constants.ARIA_PROPERTIES = { -1 29078 "activedescendant": { -1 29079 "type": "property", -1 29080 "valueType": "idref" 8872 29081 },8873 -1 './lib/commons/aria/get-role-type.js': function libCommonsAriaGetRoleTypeJs(module, __webpack_exports__, __webpack_require__) {8874 -1 'use strict';8875 -1 __webpack_require__.r(__webpack_exports__);8876 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');8877 -1 function getRoleType(role) {8878 -1 var roleDef = _standards__WEBPACK_IMPORTED_MODULE_0__['default'].ariaRoles[role];8879 -1 if (!roleDef) {8880 -1 return null;8881 -1 }8882 -1 return roleDef.type;8883 -1 }8884 -1 __webpack_exports__['default'] = getRoleType;-1 29082 "atomic": { -1 29083 "defaultValue": "false", -1 29084 "type": "property", -1 29085 "valueType": "boolean" 8885 29086 },8886 -1 './lib/commons/aria/get-role.js': function libCommonsAriaGetRoleJs(module, __webpack_exports__, __webpack_require__) {8887 -1 'use strict';8888 -1 __webpack_require__.r(__webpack_exports__);8889 -1 var _get_explicit_role__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/get-explicit-role.js');8890 -1 var _implicit_role__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/implicit-role.js');8891 -1 var _standards_get_global_aria_attrs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/standards/get-global-aria-attrs.js');8892 -1 var _dom_is_focusable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/dom/is-focusable.js');8893 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/core/utils/index.js');8894 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');8895 -1 var inheritsPresentationChain = {8896 -1 td: [ 'tr' ],8897 -1 th: [ 'tr' ],8898 -1 tr: [ 'thead', 'tbody', 'tfoot', 'table' ],8899 -1 thead: [ 'table' ],8900 -1 tbody: [ 'table' ],8901 -1 tfoot: [ 'table' ],8902 -1 li: [ 'ol', 'ul' ],8903 -1 dt: [ 'dl', 'div' ],8904 -1 dd: [ 'dl', 'div' ],8905 -1 div: [ 'dl' ]8906 -1 };8907 -1 function getInheritedRole(vNode, explicitRoleOptions) {8908 -1 var parentNodeNames = inheritsPresentationChain[vNode.props.nodeName];8909 -1 if (!parentNodeNames) {8910 -1 return null;8911 -1 }8912 -1 if (!vNode.parent) {8913 -1 throw new ReferenceError('Cannot determine role presentational inheritance of a required parent outside the current scope.');8914 -1 }8915 -1 if (!parentNodeNames.includes(vNode.parent.props.nodeName)) {8916 -1 return null;8917 -1 }8918 -1 var parentRole = Object(_get_explicit_role__WEBPACK_IMPORTED_MODULE_0__['default'])(vNode.parent, explicitRoleOptions);8919 -1 if ([ 'none', 'presentation' ].includes(parentRole) && !hasConflictResolution(vNode.parent)) {8920 -1 return parentRole;8921 -1 }8922 -1 if (parentRole) {8923 -1 return null;8924 -1 }8925 -1 return getInheritedRole(vNode.parent, explicitRoleOptions);8926 -1 }8927 -1 function resolveImplicitRole(vNode, explicitRoleOptions) {8928 -1 var implicitRole = Object(_implicit_role__WEBPACK_IMPORTED_MODULE_1__['default'])(vNode);8929 -1 if (!implicitRole) {8930 -1 return null;8931 -1 }8932 -1 var presentationalRole = getInheritedRole(vNode, explicitRoleOptions);8933 -1 if (presentationalRole) {8934 -1 return presentationalRole;8935 -1 }8936 -1 return implicitRole;8937 -1 }8938 -1 function hasConflictResolution(vNode) {8939 -1 var hasGlobalAria = Object(_standards_get_global_aria_attrs__WEBPACK_IMPORTED_MODULE_2__['default'])().some(function(attr) {8940 -1 return vNode.hasAttr(attr);8941 -1 });8942 -1 return hasGlobalAria || Object(_dom_is_focusable__WEBPACK_IMPORTED_MODULE_3__['default'])(vNode);8943 -1 }8944 -1 function getRole(node) {8945 -1 var _ref22 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};8946 -1 var noImplicit = _ref22.noImplicit, explicitRoleOptions = _objectWithoutProperties(_ref22, [ 'noImplicit' ]);8947 -1 var vNode = node instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_5__['default'] ? node : Object(_core_utils__WEBPACK_IMPORTED_MODULE_4__['getNodeFromTree'])(node);8948 -1 if (vNode.props.nodeType !== 1) {8949 -1 return null;8950 -1 }8951 -1 var explicitRole = Object(_get_explicit_role__WEBPACK_IMPORTED_MODULE_0__['default'])(vNode, explicitRoleOptions);8952 -1 if (!explicitRole) {8953 -1 return noImplicit ? null : resolveImplicitRole(vNode, explicitRoleOptions);8954 -1 }8955 -1 if (![ 'presentation', 'none' ].includes(explicitRole)) {8956 -1 return explicitRole;8957 -1 }8958 -1 if (hasConflictResolution(vNode)) {8959 -1 return noImplicit ? null : resolveImplicitRole(vNode, explicitRoleOptions);8960 -1 }8961 -1 return explicitRole;8962 -1 }8963 -1 __webpack_exports__['default'] = getRole;-1 29087 "autocomplete": { -1 29088 "defaultValue": "none", -1 29089 "type": "property", -1 29090 "valueType": "token", -1 29091 "values": [ -1 29092 "inline", -1 29093 "list", -1 29094 "both", -1 29095 "none" -1 29096 ] 8964 29097 },8965 -1 './lib/commons/aria/get-roles-by-type.js': function libCommonsAriaGetRolesByTypeJs(module, __webpack_exports__, __webpack_require__) {8966 -1 'use strict';8967 -1 __webpack_require__.r(__webpack_exports__);8968 -1 var _standards_get_aria_roles_by_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/standards/get-aria-roles-by-type.js');8969 -1 function getRolesByType(roleType) {8970 -1 return Object(_standards_get_aria_roles_by_type__WEBPACK_IMPORTED_MODULE_0__['default'])(roleType);8971 -1 }8972 -1 __webpack_exports__['default'] = getRolesByType;-1 29098 "busy": { -1 29099 "defaultValue": "false", -1 29100 "type": "state", -1 29101 "valueType": "boolean" 8973 29102 },8974 -1 './lib/commons/aria/get-roles-with-name-from-contents.js': function libCommonsAriaGetRolesWithNameFromContentsJs(module, __webpack_exports__, __webpack_require__) {8975 -1 'use strict';8976 -1 __webpack_require__.r(__webpack_exports__);8977 -1 var _standards_get_aria_roles_supporting_name_from_content__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/standards/get-aria-roles-supporting-name-from-content.js');8978 -1 function getRolesWithNameFromContents() {8979 -1 return Object(_standards_get_aria_roles_supporting_name_from_content__WEBPACK_IMPORTED_MODULE_0__['default'])();8980 -1 }8981 -1 __webpack_exports__['default'] = getRolesWithNameFromContents;-1 29103 "checked": { -1 29104 "defaultValue": "undefined", -1 29105 "type": "state", -1 29106 "valueType": "token", -1 29107 "values": [ -1 29108 "true", -1 29109 "false", -1 29110 "mixed", -1 29111 "undefined" -1 29112 ] 8982 29113 },8983 -1 './lib/commons/aria/implicit-nodes.js': function libCommonsAriaImplicitNodesJs(module, __webpack_exports__, __webpack_require__) {8984 -1 'use strict';8985 -1 __webpack_require__.r(__webpack_exports__);8986 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');8987 -1 var _lookup_table__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/lookup-table.js');8988 -1 function implicitNodes(role) {8989 -1 'use strict';8990 -1 var implicit = null;8991 -1 var roles = _lookup_table__WEBPACK_IMPORTED_MODULE_1__['default'].role[role];8992 -1 if (roles && roles.implicit) {8993 -1 implicit = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['clone'])(roles.implicit);8994 -1 }8995 -1 return implicit;8996 -1 }8997 -1 __webpack_exports__['default'] = implicitNodes;-1 29114 "controls": { -1 29115 "type": "property", -1 29116 "valueType": "idref_list" 8998 29117 },8999 -1 './lib/commons/aria/implicit-role.js': function libCommonsAriaImplicitRoleJs(module, __webpack_exports__, __webpack_require__) {9000 -1 'use strict';9001 -1 __webpack_require__.r(__webpack_exports__);9002 -1 var _standards_implicit_html_roles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/standards/implicit-html-roles.js');9003 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');9004 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');9005 -1 function implicitRole(node) {9006 -1 var vNode = node instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_2__['default'] ? node : Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeFromTree'])(node);9007 -1 node = vNode.actualNode;9008 -1 if (!vNode) {9009 -1 throw new ReferenceError('Cannot get implicit role of a node outside the current scope.');9010 -1 }9011 -1 if (node && node.namespaceURI === 'http://www.w3.org/2000/svg') {9012 -1 return null;9013 -1 }9014 -1 var nodeName = vNode.props.nodeName;9015 -1 var role = _standards_implicit_html_roles__WEBPACK_IMPORTED_MODULE_0__['default'][nodeName];9016 -1 if (!role) {9017 -1 return null;9018 -1 }9019 -1 if (typeof role === 'function') {9020 -1 return role(vNode);9021 -1 }9022 -1 return role;9023 -1 }9024 -1 __webpack_exports__['default'] = implicitRole;-1 29118 "describedby": { -1 29119 "type": "property", -1 29120 "valueType": "idref_list" 9025 29121 },9026 -1 './lib/commons/aria/index.js': function libCommonsAriaIndexJs(module, __webpack_exports__, __webpack_require__) {9027 -1 'use strict';9028 -1 __webpack_require__.r(__webpack_exports__);9029 -1 var _allowed_attr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/allowed-attr.js');9030 -1 __webpack_require__.d(__webpack_exports__, 'allowedAttr', function() {9031 -1 return _allowed_attr__WEBPACK_IMPORTED_MODULE_0__['default'];9032 -1 });9033 -1 var _arialabel_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/arialabel-text.js');9034 -1 __webpack_require__.d(__webpack_exports__, 'arialabelText', function() {9035 -1 return _arialabel_text__WEBPACK_IMPORTED_MODULE_1__['default'];9036 -1 });9037 -1 var _arialabelledby_text__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/aria/arialabelledby-text.js');9038 -1 __webpack_require__.d(__webpack_exports__, 'arialabelledbyText', function() {9039 -1 return _arialabelledby_text__WEBPACK_IMPORTED_MODULE_2__['default'];9040 -1 });9041 -1 var _get_element_unallowed_roles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/aria/get-element-unallowed-roles.js');9042 -1 __webpack_require__.d(__webpack_exports__, 'getElementUnallowedRoles', function() {9043 -1 return _get_element_unallowed_roles__WEBPACK_IMPORTED_MODULE_3__['default'];9044 -1 });9045 -1 var _get_explicit_role__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/aria/get-explicit-role.js');9046 -1 __webpack_require__.d(__webpack_exports__, 'getExplicitRole', function() {9047 -1 return _get_explicit_role__WEBPACK_IMPORTED_MODULE_4__['default'];9048 -1 });9049 -1 var _get_owned_virtual__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/aria/get-owned-virtual.js');9050 -1 __webpack_require__.d(__webpack_exports__, 'getOwnedVirtual', function() {9051 -1 return _get_owned_virtual__WEBPACK_IMPORTED_MODULE_5__['default'];9052 -1 });9053 -1 var _get_role_type__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/commons/aria/get-role-type.js');9054 -1 __webpack_require__.d(__webpack_exports__, 'getRoleType', function() {9055 -1 return _get_role_type__WEBPACK_IMPORTED_MODULE_6__['default'];9056 -1 });9057 -1 var _get_role__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/commons/aria/get-role.js');9058 -1 __webpack_require__.d(__webpack_exports__, 'getRole', function() {9059 -1 return _get_role__WEBPACK_IMPORTED_MODULE_7__['default'];9060 -1 });9061 -1 var _get_roles_by_type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__('./lib/commons/aria/get-roles-by-type.js');9062 -1 __webpack_require__.d(__webpack_exports__, 'getRolesByType', function() {9063 -1 return _get_roles_by_type__WEBPACK_IMPORTED_MODULE_8__['default'];9064 -1 });9065 -1 var _get_roles_with_name_from_contents__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__('./lib/commons/aria/get-roles-with-name-from-contents.js');9066 -1 __webpack_require__.d(__webpack_exports__, 'getRolesWithNameFromContents', function() {9067 -1 return _get_roles_with_name_from_contents__WEBPACK_IMPORTED_MODULE_9__['default'];9068 -1 });9069 -1 var _implicit_nodes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__('./lib/commons/aria/implicit-nodes.js');9070 -1 __webpack_require__.d(__webpack_exports__, 'implicitNodes', function() {9071 -1 return _implicit_nodes__WEBPACK_IMPORTED_MODULE_10__['default'];9072 -1 });9073 -1 var _implicit_role__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__('./lib/commons/aria/implicit-role.js');9074 -1 __webpack_require__.d(__webpack_exports__, 'implicitRole', function() {9075 -1 return _implicit_role__WEBPACK_IMPORTED_MODULE_11__['default'];9076 -1 });9077 -1 var _is_accessible_ref__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__('./lib/commons/aria/is-accessible-ref.js');9078 -1 __webpack_require__.d(__webpack_exports__, 'isAccessibleRef', function() {9079 -1 return _is_accessible_ref__WEBPACK_IMPORTED_MODULE_12__['default'];9080 -1 });9081 -1 var _is_aria_role_allowed_on_element__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__('./lib/commons/aria/is-aria-role-allowed-on-element.js');9082 -1 __webpack_require__.d(__webpack_exports__, 'isAriaRoleAllowedOnElement', function() {9083 -1 return _is_aria_role_allowed_on_element__WEBPACK_IMPORTED_MODULE_13__['default'];9084 -1 });9085 -1 var _is_unsupported_role__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__('./lib/commons/aria/is-unsupported-role.js');9086 -1 __webpack_require__.d(__webpack_exports__, 'isUnsupportedRole', function() {9087 -1 return _is_unsupported_role__WEBPACK_IMPORTED_MODULE_14__['default'];9088 -1 });9089 -1 var _is_valid_role__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__('./lib/commons/aria/is-valid-role.js');9090 -1 __webpack_require__.d(__webpack_exports__, 'isValidRole', function() {9091 -1 return _is_valid_role__WEBPACK_IMPORTED_MODULE_15__['default'];9092 -1 });9093 -1 var _label_virtual__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__('./lib/commons/aria/label-virtual.js');9094 -1 __webpack_require__.d(__webpack_exports__, 'labelVirtual', function() {9095 -1 return _label_virtual__WEBPACK_IMPORTED_MODULE_16__['default'];9096 -1 });9097 -1 var _label__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__('./lib/commons/aria/label.js');9098 -1 __webpack_require__.d(__webpack_exports__, 'label', function() {9099 -1 return _label__WEBPACK_IMPORTED_MODULE_17__['default'];9100 -1 });9101 -1 var _lookup_table__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__('./lib/commons/aria/lookup-table.js');9102 -1 __webpack_require__.d(__webpack_exports__, 'lookupTable', function() {9103 -1 return _lookup_table__WEBPACK_IMPORTED_MODULE_18__['default'];9104 -1 });9105 -1 var _named_from_contents__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__('./lib/commons/aria/named-from-contents.js');9106 -1 __webpack_require__.d(__webpack_exports__, 'namedFromContents', function() {9107 -1 return _named_from_contents__WEBPACK_IMPORTED_MODULE_19__['default'];9108 -1 });9109 -1 var _required_attr__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__('./lib/commons/aria/required-attr.js');9110 -1 __webpack_require__.d(__webpack_exports__, 'requiredAttr', function() {9111 -1 return _required_attr__WEBPACK_IMPORTED_MODULE_20__['default'];9112 -1 });9113 -1 var _required_context__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__('./lib/commons/aria/required-context.js');9114 -1 __webpack_require__.d(__webpack_exports__, 'requiredContext', function() {9115 -1 return _required_context__WEBPACK_IMPORTED_MODULE_21__['default'];9116 -1 });9117 -1 var _required_owned__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__('./lib/commons/aria/required-owned.js');9118 -1 __webpack_require__.d(__webpack_exports__, 'requiredOwned', function() {9119 -1 return _required_owned__WEBPACK_IMPORTED_MODULE_22__['default'];9120 -1 });9121 -1 var _validate_attr_value__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__('./lib/commons/aria/validate-attr-value.js');9122 -1 __webpack_require__.d(__webpack_exports__, 'validateAttrValue', function() {9123 -1 return _validate_attr_value__WEBPACK_IMPORTED_MODULE_23__['default'];9124 -1 });9125 -1 var _validate_attr__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__('./lib/commons/aria/validate-attr.js');9126 -1 __webpack_require__.d(__webpack_exports__, 'validateAttr', function() {9127 -1 return _validate_attr__WEBPACK_IMPORTED_MODULE_24__['default'];9128 -1 });-1 29122 "disabled": { -1 29123 "defaultValue": "false", -1 29124 "type": "state", -1 29125 "valueType": "boolean" 9129 29126 },9130 -1 './lib/commons/aria/is-accessible-ref.js': function libCommonsAriaIsAccessibleRefJs(module, __webpack_exports__, __webpack_require__) {9131 -1 'use strict';9132 -1 __webpack_require__.r(__webpack_exports__);9133 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');9134 -1 var _dom_get_root_node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/get-root-node.js');9135 -1 var _core_base_cache__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/base/cache.js');9136 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/index.js');9137 -1 var idRefsRegex = /^idrefs?$/;9138 -1 function cacheIdRefs(node, refAttrs) {9139 -1 if (node.hasAttribute) {9140 -1 var idRefs = _core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].get('idRefs');9141 -1 if (node.nodeName.toUpperCase() === 'LABEL' && node.hasAttribute('for')) {9142 -1 idRefs[node.getAttribute('for')] = true;9143 -1 }9144 -1 for (var i = 0; i < refAttrs.length; ++i) {9145 -1 var attr = refAttrs[i];9146 -1 if (!node.hasAttribute(attr)) {9147 -1 continue;9148 -1 }9149 -1 var attrValue = node.getAttribute(attr);9150 -1 var tokens = Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['tokenList'])(attrValue);9151 -1 for (var k = 0; k < tokens.length; ++k) {9152 -1 idRefs[tokens[k]] = true;9153 -1 }9154 -1 }9155 -1 }9156 -1 for (var _i3 = 0; _i3 < node.children.length; _i3++) {9157 -1 cacheIdRefs(node.children[_i3], refAttrs);9158 -1 }9159 -1 }9160 -1 function isAccessibleRef(node) {9161 -1 node = node.actualNode || node;9162 -1 var root = Object(_dom_get_root_node__WEBPACK_IMPORTED_MODULE_1__['default'])(node);9163 -1 root = root.documentElement || root;9164 -1 var id = node.id;9165 -1 if (!_core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].get('idRefs')) {9166 -1 _core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].set('idRefs', {});9167 -1 var refAttrs = Object.keys(_standards__WEBPACK_IMPORTED_MODULE_0__['default'].ariaAttrs).filter(function(attr) {9168 -1 var type = _standards__WEBPACK_IMPORTED_MODULE_0__['default'].ariaAttrs[attr].type;9169 -1 return idRefsRegex.test(type);9170 -1 });9171 -1 cacheIdRefs(root, refAttrs);9172 -1 }9173 -1 return _core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].get('idRefs')[id] === true;9174 -1 }9175 -1 __webpack_exports__['default'] = isAccessibleRef;-1 29127 "dropeffect": { -1 29128 "defaultValue": "none", -1 29129 "type": "property", -1 29130 "valueType": "token_list", -1 29131 "values": [ -1 29132 "copy", -1 29133 "move", -1 29134 "link", -1 29135 "execute", -1 29136 "popup", -1 29137 "none" -1 29138 ] 9176 29139 },9177 -1 './lib/commons/aria/is-aria-role-allowed-on-element.js': function libCommonsAriaIsAriaRoleAllowedOnElementJs(module, __webpack_exports__, __webpack_require__) {9178 -1 'use strict';9179 -1 __webpack_require__.r(__webpack_exports__);9180 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');9181 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');9182 -1 var _implicit_role__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/aria/implicit-role.js');9183 -1 var _standards_get_element_spec__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/standards/get-element-spec.js');9184 -1 function isAriaRoleAllowedOnElement(node, role) {9185 -1 var vNode = node instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_1__['default'] ? node : Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['getNodeFromTree'])(node);9186 -1 var implicitRole = Object(_implicit_role__WEBPACK_IMPORTED_MODULE_2__['default'])(vNode);9187 -1 if (role === implicitRole) {9188 -1 return true;9189 -1 }9190 -1 var spec = Object(_standards_get_element_spec__WEBPACK_IMPORTED_MODULE_3__['default'])(vNode);9191 -1 if (Array.isArray(spec.allowedRoles)) {9192 -1 return spec.allowedRoles.includes(role);9193 -1 }9194 -1 return !!spec.allowedRoles;9195 -1 }9196 -1 __webpack_exports__['default'] = isAriaRoleAllowedOnElement;-1 29140 "expanded": { -1 29141 "defaultValue": "undefined", -1 29142 "type": "state", -1 29143 "valueType": "token", -1 29144 "values": [ -1 29145 "true", -1 29146 "false", -1 29147 "undefined" -1 29148 ] 9197 29149 },9198 -1 './lib/commons/aria/is-unsupported-role.js': function libCommonsAriaIsUnsupportedRoleJs(module, __webpack_exports__, __webpack_require__) {9199 -1 'use strict';9200 -1 __webpack_require__.r(__webpack_exports__);9201 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');9202 -1 function isUnsupportedRole(role) {9203 -1 var roleDefinition = _standards__WEBPACK_IMPORTED_MODULE_0__['default'].ariaRoles[role];9204 -1 return roleDefinition ? !!roleDefinition.unsupported : false;9205 -1 }9206 -1 __webpack_exports__['default'] = isUnsupportedRole;-1 29150 "flowto": { -1 29151 "type": "property", -1 29152 "valueType": "idref_list" 9207 29153 },9208 -1 './lib/commons/aria/is-valid-role.js': function libCommonsAriaIsValidRoleJs(module, __webpack_exports__, __webpack_require__) {9209 -1 'use strict';9210 -1 __webpack_require__.r(__webpack_exports__);9211 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');9212 -1 var _is_unsupported_role__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/is-unsupported-role.js');9213 -1 function isValidRole(role) {9214 -1 var _ref23 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref23.allowAbstract, _ref23$flagUnsupporte = _ref23.flagUnsupported, flagUnsupported = _ref23$flagUnsupporte === void 0 ? false : _ref23$flagUnsupporte;9215 -1 var roleDefinition = _standards__WEBPACK_IMPORTED_MODULE_0__['default'].ariaRoles[role];9216 -1 var isRoleUnsupported = Object(_is_unsupported_role__WEBPACK_IMPORTED_MODULE_1__['default'])(role);9217 -1 if (!roleDefinition || flagUnsupported && isRoleUnsupported) {9218 -1 return false;9219 -1 }9220 -1 return allowAbstract ? true : roleDefinition.type !== 'abstract';9221 -1 }9222 -1 __webpack_exports__['default'] = isValidRole;-1 29154 "grabbed": { -1 29155 "defaultValue": "undefined", -1 29156 "type": "state", -1 29157 "valueType": "token", -1 29158 "values": [ -1 29159 "true", -1 29160 "false", -1 29161 "undefined" -1 29162 ] 9223 29163 },9224 -1 './lib/commons/aria/label-virtual.js': function libCommonsAriaLabelVirtualJs(module, __webpack_exports__, __webpack_require__) {9225 -1 'use strict';9226 -1 __webpack_require__.r(__webpack_exports__);9227 -1 var _dom_idrefs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/idrefs.js');9228 -1 var _text_visible_virtual__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/visible-virtual.js');9229 -1 var _text_sanitize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/text/sanitize.js');9230 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/index.js');9231 -1 function labelVirtual(virtualNode) {9232 -1 var ref, candidate;9233 -1 if (virtualNode.attr('aria-labelledby')) {9234 -1 ref = Object(_dom_idrefs__WEBPACK_IMPORTED_MODULE_0__['default'])(virtualNode.actualNode, 'aria-labelledby');9235 -1 candidate = ref.map(function(thing) {9236 -1 var vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['getNodeFromTree'])(thing);9237 -1 return vNode ? Object(_text_visible_virtual__WEBPACK_IMPORTED_MODULE_1__['default'])(vNode, true) : '';9238 -1 }).join(' ').trim();9239 -1 if (candidate) {9240 -1 return candidate;9241 -1 }9242 -1 }9243 -1 candidate = virtualNode.attr('aria-label');9244 -1 if (candidate) {9245 -1 candidate = Object(_text_sanitize__WEBPACK_IMPORTED_MODULE_2__['default'])(candidate).trim();9246 -1 if (candidate) {9247 -1 return candidate;9248 -1 }9249 -1 }9250 -1 return null;9251 -1 }9252 -1 __webpack_exports__['default'] = labelVirtual;-1 29164 "haspopup": { -1 29165 "defaultValue": "false", -1 29166 "type": "property", -1 29167 "valueType": "boolean" 9253 29168 },9254 -1 './lib/commons/aria/label.js': function libCommonsAriaLabelJs(module, __webpack_exports__, __webpack_require__) {9255 -1 'use strict';9256 -1 __webpack_require__.r(__webpack_exports__);9257 -1 var _label_virtual__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/label-virtual.js');9258 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');9259 -1 function label(node) {9260 -1 node = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeFromTree'])(node);9261 -1 return Object(_label_virtual__WEBPACK_IMPORTED_MODULE_0__['default'])(node);9262 -1 }9263 -1 __webpack_exports__['default'] = label;-1 29169 "hidden": { -1 29170 "defaultValue": "false", -1 29171 "type": "state", -1 29172 "valueType": "boolean" 9264 29173 },9265 -1 './lib/commons/aria/lookup-table.js': function libCommonsAriaLookupTableJs(module, __webpack_exports__, __webpack_require__) {9266 -1 'use strict';9267 -1 __webpack_require__.r(__webpack_exports__);9268 -1 var _standards_implicit_html_roles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/standards/implicit-html-roles.js');9269 -1 var isNull = function isNull(value) {9270 -1 return value === null;9271 -1 };9272 -1 var isNotNull = function isNotNull(value) {9273 -1 return value !== null;9274 -1 };9275 -1 var lookupTable = {};9276 -1 lookupTable.attributes = {9277 -1 'aria-activedescendant': {9278 -1 type: 'idref',9279 -1 allowEmpty: true,9280 -1 unsupported: false9281 -1 },9282 -1 'aria-atomic': {9283 -1 type: 'boolean',9284 -1 values: [ 'true', 'false' ],9285 -1 unsupported: false9286 -1 },9287 -1 'aria-autocomplete': {9288 -1 type: 'nmtoken',9289 -1 values: [ 'inline', 'list', 'both', 'none' ],9290 -1 unsupported: false9291 -1 },9292 -1 'aria-busy': {9293 -1 type: 'boolean',9294 -1 values: [ 'true', 'false' ],9295 -1 unsupported: false9296 -1 },9297 -1 'aria-checked': {9298 -1 type: 'nmtoken',9299 -1 values: [ 'true', 'false', 'mixed', 'undefined' ],9300 -1 unsupported: false9301 -1 },9302 -1 'aria-colcount': {9303 -1 type: 'int',9304 -1 unsupported: false9305 -1 },9306 -1 'aria-colindex': {9307 -1 type: 'int',9308 -1 unsupported: false9309 -1 },9310 -1 'aria-colspan': {9311 -1 type: 'int',9312 -1 unsupported: false9313 -1 },9314 -1 'aria-controls': {9315 -1 type: 'idrefs',9316 -1 allowEmpty: true,9317 -1 unsupported: false9318 -1 },9319 -1 'aria-current': {9320 -1 type: 'nmtoken',9321 -1 allowEmpty: true,9322 -1 values: [ 'page', 'step', 'location', 'date', 'time', 'true', 'false' ],9323 -1 unsupported: false9324 -1 },9325 -1 'aria-describedby': {9326 -1 type: 'idrefs',9327 -1 allowEmpty: true,9328 -1 unsupported: false9329 -1 },9330 -1 'aria-describedat': {9331 -1 unsupported: true,9332 -1 unstandardized: true9333 -1 },9334 -1 'aria-details': {9335 -1 type: 'idref',9336 -1 allowEmpty: true,9337 -1 unsupported: false9338 -1 },9339 -1 'aria-disabled': {9340 -1 type: 'boolean',9341 -1 values: [ 'true', 'false' ],9342 -1 unsupported: false9343 -1 },9344 -1 'aria-dropeffect': {9345 -1 type: 'nmtokens',9346 -1 values: [ 'copy', 'move', 'reference', 'execute', 'popup', 'none' ],9347 -1 unsupported: false9348 -1 },9349 -1 'aria-errormessage': {9350 -1 type: 'idref',9351 -1 allowEmpty: true,9352 -1 unsupported: false9353 -1 },9354 -1 'aria-expanded': {9355 -1 type: 'nmtoken',9356 -1 values: [ 'true', 'false', 'undefined' ],9357 -1 unsupported: false9358 -1 },9359 -1 'aria-flowto': {9360 -1 type: 'idrefs',9361 -1 allowEmpty: true,9362 -1 unsupported: false9363 -1 },9364 -1 'aria-grabbed': {9365 -1 type: 'nmtoken',9366 -1 values: [ 'true', 'false', 'undefined' ],9367 -1 unsupported: false9368 -1 },9369 -1 'aria-haspopup': {9370 -1 type: 'nmtoken',9371 -1 allowEmpty: true,9372 -1 values: [ 'true', 'false', 'menu', 'listbox', 'tree', 'grid', 'dialog' ],9373 -1 unsupported: false9374 -1 },9375 -1 'aria-hidden': {9376 -1 type: 'boolean',9377 -1 values: [ 'true', 'false' ],9378 -1 unsupported: false9379 -1 },9380 -1 'aria-invalid': {9381 -1 type: 'nmtoken',9382 -1 allowEmpty: true,9383 -1 values: [ 'true', 'false', 'spelling', 'grammar' ],9384 -1 unsupported: false9385 -1 },9386 -1 'aria-keyshortcuts': {9387 -1 type: 'string',9388 -1 allowEmpty: true,9389 -1 unsupported: false9390 -1 },9391 -1 'aria-label': {9392 -1 type: 'string',9393 -1 allowEmpty: true,9394 -1 unsupported: false9395 -1 },9396 -1 'aria-labelledby': {9397 -1 type: 'idrefs',9398 -1 allowEmpty: true,9399 -1 unsupported: false9400 -1 },9401 -1 'aria-level': {9402 -1 type: 'int',9403 -1 unsupported: false9404 -1 },9405 -1 'aria-live': {9406 -1 type: 'nmtoken',9407 -1 values: [ 'off', 'polite', 'assertive' ],9408 -1 unsupported: false9409 -1 },9410 -1 'aria-modal': {9411 -1 type: 'boolean',9412 -1 values: [ 'true', 'false' ],9413 -1 unsupported: false9414 -1 },9415 -1 'aria-multiline': {9416 -1 type: 'boolean',9417 -1 values: [ 'true', 'false' ],9418 -1 unsupported: false9419 -1 },9420 -1 'aria-multiselectable': {9421 -1 type: 'boolean',9422 -1 values: [ 'true', 'false' ],9423 -1 unsupported: false9424 -1 },9425 -1 'aria-orientation': {9426 -1 type: 'nmtoken',9427 -1 values: [ 'horizontal', 'vertical' ],9428 -1 unsupported: false9429 -1 },9430 -1 'aria-owns': {9431 -1 type: 'idrefs',9432 -1 allowEmpty: true,9433 -1 unsupported: false9434 -1 },9435 -1 'aria-placeholder': {9436 -1 type: 'string',9437 -1 allowEmpty: true,9438 -1 unsupported: false9439 -1 },9440 -1 'aria-posinset': {9441 -1 type: 'int',9442 -1 unsupported: false9443 -1 },9444 -1 'aria-pressed': {9445 -1 type: 'nmtoken',9446 -1 values: [ 'true', 'false', 'mixed', 'undefined' ],9447 -1 unsupported: false9448 -1 },9449 -1 'aria-readonly': {9450 -1 type: 'boolean',9451 -1 values: [ 'true', 'false' ],9452 -1 unsupported: false9453 -1 },9454 -1 'aria-relevant': {9455 -1 type: 'nmtokens',9456 -1 values: [ 'additions', 'removals', 'text', 'all' ],9457 -1 unsupported: false9458 -1 },9459 -1 'aria-required': {9460 -1 type: 'boolean',9461 -1 values: [ 'true', 'false' ],9462 -1 unsupported: false9463 -1 },9464 -1 'aria-roledescription': {9465 -1 type: 'string',9466 -1 allowEmpty: true,9467 -1 unsupported: false9468 -1 },9469 -1 'aria-rowcount': {9470 -1 type: 'int',9471 -1 unsupported: false9472 -1 },9473 -1 'aria-rowindex': {9474 -1 type: 'int',9475 -1 unsupported: false9476 -1 },9477 -1 'aria-rowspan': {9478 -1 type: 'int',9479 -1 unsupported: false9480 -1 },9481 -1 'aria-selected': {9482 -1 type: 'nmtoken',9483 -1 values: [ 'true', 'false', 'undefined' ],9484 -1 unsupported: false9485 -1 },9486 -1 'aria-setsize': {9487 -1 type: 'int',9488 -1 unsupported: false9489 -1 },9490 -1 'aria-sort': {9491 -1 type: 'nmtoken',9492 -1 values: [ 'ascending', 'descending', 'other', 'none' ],9493 -1 unsupported: false9494 -1 },9495 -1 'aria-valuemax': {9496 -1 type: 'decimal',9497 -1 unsupported: false9498 -1 },9499 -1 'aria-valuemin': {9500 -1 type: 'decimal',9501 -1 unsupported: false9502 -1 },9503 -1 'aria-valuenow': {9504 -1 type: 'decimal',9505 -1 unsupported: false9506 -1 },9507 -1 'aria-valuetext': {9508 -1 type: 'string',9509 -1 unsupported: false9510 -1 }9511 -1 };9512 -1 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' ];9513 -1 lookupTable.role = {9514 -1 alert: {9515 -1 type: 'widget',9516 -1 attributes: {9517 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9518 -1 },9519 -1 owned: null,9520 -1 nameFrom: [ 'author' ],9521 -1 context: null,9522 -1 unsupported: false,9523 -1 allowedElements: [ 'section' ]9524 -1 },9525 -1 alertdialog: {9526 -1 type: 'widget',9527 -1 attributes: {9528 -1 allowed: [ 'aria-expanded', 'aria-modal', 'aria-errormessage' ]9529 -1 },9530 -1 owned: null,9531 -1 nameFrom: [ 'author' ],9532 -1 context: null,9533 -1 unsupported: false,9534 -1 allowedElements: [ 'dialog', 'section' ]9535 -1 },9536 -1 application: {9537 -1 type: 'landmark',9538 -1 attributes: {9539 -1 allowed: [ 'aria-expanded', 'aria-errormessage', 'aria-activedescendant' ]9540 -1 },9541 -1 owned: null,9542 -1 nameFrom: [ 'author' ],9543 -1 context: null,9544 -1 unsupported: false,9545 -1 allowedElements: [ 'article', 'audio', 'embed', 'iframe', 'object', 'section', 'svg', 'video' ]9546 -1 },9547 -1 article: {9548 -1 type: 'structure',9549 -1 attributes: {9550 -1 allowed: [ 'aria-expanded', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]9551 -1 },9552 -1 owned: null,9553 -1 nameFrom: [ 'author' ],9554 -1 context: null,9555 -1 implicit: [ 'article' ],9556 -1 unsupported: false9557 -1 },9558 -1 banner: {9559 -1 type: 'landmark',9560 -1 attributes: {9561 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9562 -1 },9563 -1 owned: null,9564 -1 nameFrom: [ 'author' ],9565 -1 context: null,9566 -1 implicit: [ 'header' ],9567 -1 unsupported: false,9568 -1 allowedElements: [ 'section' ]9569 -1 },9570 -1 button: {9571 -1 type: 'widget',9572 -1 attributes: {9573 -1 allowed: [ 'aria-expanded', 'aria-pressed', 'aria-errormessage' ]9574 -1 },9575 -1 owned: null,9576 -1 nameFrom: [ 'author', 'contents' ],9577 -1 context: null,9578 -1 implicit: [ 'button', 'input[type="button"]', 'input[type="image"]', 'input[type="reset"]', 'input[type="submit"]', 'summary' ],9579 -1 unsupported: false,9580 -1 allowedElements: [ {9581 -1 nodeName: 'a',9582 -1 attributes: {9583 -1 href: isNotNull9584 -1 }9585 -1 } ]9586 -1 },9587 -1 cell: {9588 -1 type: 'structure',9589 -1 attributes: {9590 -1 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-rowindex', 'aria-rowspan', 'aria-errormessage' ]9591 -1 },9592 -1 owned: null,9593 -1 nameFrom: [ 'author', 'contents' ],9594 -1 context: [ 'row' ],9595 -1 implicit: [ 'td', 'th' ],9596 -1 unsupported: false9597 -1 },9598 -1 checkbox: {9599 -1 type: 'widget',9600 -1 attributes: {9601 -1 allowed: [ 'aria-checked', 'aria-required', 'aria-readonly', 'aria-errormessage' ]9602 -1 },9603 -1 owned: null,9604 -1 nameFrom: [ 'author', 'contents' ],9605 -1 context: null,9606 -1 implicit: [ 'input[type="checkbox"]' ],9607 -1 unsupported: false,9608 -1 allowedElements: [ 'button' ]9609 -1 },9610 -1 columnheader: {9611 -1 type: 'structure',9612 -1 attributes: {9613 -1 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort', 'aria-errormessage' ]9614 -1 },9615 -1 owned: null,9616 -1 nameFrom: [ 'author', 'contents' ],9617 -1 context: [ 'row' ],9618 -1 implicit: [ 'th' ],9619 -1 unsupported: false9620 -1 },9621 -1 combobox: {9622 -1 type: 'composite',9623 -1 attributes: {9624 -1 allowed: [ 'aria-autocomplete', 'aria-required', 'aria-activedescendant', 'aria-orientation', 'aria-errormessage' ],9625 -1 required: [ 'aria-expanded' ]9626 -1 },9627 -1 owned: {9628 -1 all: [ 'listbox', 'tree', 'grid', 'dialog', 'textbox' ]9629 -1 },9630 -1 nameFrom: [ 'author' ],9631 -1 context: null,9632 -1 unsupported: false,9633 -1 allowedElements: [ {9634 -1 nodeName: 'input',9635 -1 properties: {9636 -1 type: [ 'text', 'search', 'tel', 'url', 'email' ]9637 -1 }9638 -1 } ]9639 -1 },9640 -1 command: {9641 -1 nameFrom: [ 'author' ],9642 -1 type: 'abstract',9643 -1 unsupported: false9644 -1 },9645 -1 complementary: {9646 -1 type: 'landmark',9647 -1 attributes: {9648 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9649 -1 },9650 -1 owned: null,9651 -1 nameFrom: [ 'author' ],9652 -1 context: null,9653 -1 implicit: [ 'aside' ],9654 -1 unsupported: false,9655 -1 allowedElements: [ 'section' ]9656 -1 },9657 -1 composite: {9658 -1 nameFrom: [ 'author' ],9659 -1 type: 'abstract',9660 -1 unsupported: false9661 -1 },9662 -1 contentinfo: {9663 -1 type: 'landmark',9664 -1 attributes: {9665 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9666 -1 },9667 -1 owned: null,9668 -1 nameFrom: [ 'author' ],9669 -1 context: null,9670 -1 implicit: [ 'footer' ],9671 -1 unsupported: false,9672 -1 allowedElements: [ 'section' ]9673 -1 },9674 -1 definition: {9675 -1 type: 'structure',9676 -1 attributes: {9677 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9678 -1 },9679 -1 owned: null,9680 -1 nameFrom: [ 'author' ],9681 -1 context: null,9682 -1 implicit: [ 'dd', 'dfn' ],9683 -1 unsupported: false9684 -1 },9685 -1 dialog: {9686 -1 type: 'widget',9687 -1 attributes: {9688 -1 allowed: [ 'aria-expanded', 'aria-modal', 'aria-errormessage' ]9689 -1 },9690 -1 owned: null,9691 -1 nameFrom: [ 'author' ],9692 -1 context: null,9693 -1 implicit: [ 'dialog' ],9694 -1 unsupported: false,9695 -1 allowedElements: [ 'section' ]9696 -1 },9697 -1 directory: {9698 -1 type: 'structure',9699 -1 attributes: {9700 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9701 -1 },9702 -1 owned: null,9703 -1 nameFrom: [ 'author', 'contents' ],9704 -1 context: null,9705 -1 unsupported: false,9706 -1 allowedElements: [ 'ol', 'ul' ]9707 -1 },9708 -1 document: {9709 -1 type: 'structure',9710 -1 attributes: {9711 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9712 -1 },9713 -1 owned: null,9714 -1 nameFrom: [ 'author' ],9715 -1 context: null,9716 -1 implicit: [ 'body' ],9717 -1 unsupported: false,9718 -1 allowedElements: [ 'article', 'embed', 'iframe', 'object', 'section', 'svg' ]9719 -1 },9720 -1 'doc-abstract': {9721 -1 type: 'section',9722 -1 attributes: {9723 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9724 -1 },9725 -1 owned: null,9726 -1 nameFrom: [ 'author' ],9727 -1 context: null,9728 -1 unsupported: false,9729 -1 allowedElements: [ 'section' ]9730 -1 },9731 -1 'doc-acknowledgments': {9732 -1 type: 'landmark',9733 -1 attributes: {9734 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9735 -1 },9736 -1 owned: null,9737 -1 nameFrom: [ 'author' ],9738 -1 context: null,9739 -1 unsupported: false,9740 -1 allowedElements: [ 'section' ]9741 -1 },9742 -1 'doc-afterword': {9743 -1 type: 'landmark',9744 -1 attributes: {9745 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9746 -1 },9747 -1 owned: null,9748 -1 nameFrom: [ 'author' ],9749 -1 context: null,9750 -1 unsupported: false,9751 -1 allowedElements: [ 'section' ]9752 -1 },9753 -1 'doc-appendix': {9754 -1 type: 'landmark',9755 -1 attributes: {9756 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9757 -1 },9758 -1 owned: null,9759 -1 nameFrom: [ 'author' ],9760 -1 context: null,9761 -1 unsupported: false,9762 -1 allowedElements: [ 'section' ]9763 -1 },9764 -1 'doc-backlink': {9765 -1 type: 'link',9766 -1 attributes: {9767 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9768 -1 },9769 -1 owned: null,9770 -1 nameFrom: [ 'author', 'contents' ],9771 -1 context: null,9772 -1 unsupported: false,9773 -1 allowedElements: [ {9774 -1 nodeName: 'a',9775 -1 attributes: {9776 -1 href: isNotNull9777 -1 }9778 -1 } ]9779 -1 },9780 -1 'doc-biblioentry': {9781 -1 type: 'listitem',9782 -1 attributes: {9783 -1 allowed: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]9784 -1 },9785 -1 owned: null,9786 -1 nameFrom: [ 'author' ],9787 -1 context: [ 'doc-bibliography' ],9788 -1 unsupported: false,9789 -1 allowedElements: [ 'li' ]9790 -1 },9791 -1 'doc-bibliography': {9792 -1 type: 'landmark',9793 -1 attributes: {9794 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9795 -1 },9796 -1 owned: {9797 -1 one: [ 'doc-biblioentry' ]9798 -1 },9799 -1 nameFrom: [ 'author' ],9800 -1 context: null,9801 -1 unsupported: false,9802 -1 allowedElements: [ 'section' ]9803 -1 },9804 -1 'doc-biblioref': {9805 -1 type: 'link',9806 -1 attributes: {9807 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9808 -1 },9809 -1 owned: null,9810 -1 nameFrom: [ 'author', 'contents' ],9811 -1 context: null,9812 -1 unsupported: false,9813 -1 allowedElements: [ {9814 -1 nodeName: 'a',9815 -1 attributes: {9816 -1 href: isNotNull9817 -1 }9818 -1 } ]9819 -1 },9820 -1 'doc-chapter': {9821 -1 type: 'landmark',9822 -1 attributes: {9823 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9824 -1 },9825 -1 owned: null,9826 -1 namefrom: [ 'author' ],9827 -1 context: null,9828 -1 unsupported: false,9829 -1 allowedElements: [ 'section' ]9830 -1 },9831 -1 'doc-colophon': {9832 -1 type: 'section',9833 -1 attributes: {9834 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9835 -1 },9836 -1 owned: null,9837 -1 namefrom: [ 'author' ],9838 -1 context: null,9839 -1 unsupported: false,9840 -1 allowedElements: [ 'section' ]9841 -1 },9842 -1 'doc-conclusion': {9843 -1 type: 'landmark',9844 -1 attributes: {9845 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9846 -1 },9847 -1 owned: null,9848 -1 namefrom: [ 'author' ],9849 -1 context: null,9850 -1 unsupported: false,9851 -1 allowedElements: [ 'section' ]9852 -1 },9853 -1 'doc-cover': {9854 -1 type: 'img',9855 -1 attributes: {9856 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9857 -1 },9858 -1 owned: null,9859 -1 namefrom: [ 'author' ],9860 -1 context: null,9861 -1 unsupported: false9862 -1 },9863 -1 'doc-credit': {9864 -1 type: 'section',9865 -1 attributes: {9866 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9867 -1 },9868 -1 owned: null,9869 -1 namefrom: [ 'author' ],9870 -1 context: null,9871 -1 unsupported: false,9872 -1 allowedElements: [ 'section' ]9873 -1 },9874 -1 'doc-credits': {9875 -1 type: 'landmark',9876 -1 attributes: {9877 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9878 -1 },9879 -1 owned: null,9880 -1 namefrom: [ 'author' ],9881 -1 context: null,9882 -1 unsupported: false,9883 -1 allowedElements: [ 'section' ]9884 -1 },9885 -1 'doc-dedication': {9886 -1 type: 'section',9887 -1 attributes: {9888 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9889 -1 },9890 -1 owned: null,9891 -1 namefrom: [ 'author' ],9892 -1 context: null,9893 -1 unsupported: false,9894 -1 allowedElements: [ 'section' ]9895 -1 },9896 -1 'doc-endnote': {9897 -1 type: 'listitem',9898 -1 attributes: {9899 -1 allowed: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]9900 -1 },9901 -1 owned: null,9902 -1 namefrom: [ 'author' ],9903 -1 context: [ 'doc-endnotes' ],9904 -1 unsupported: false,9905 -1 allowedElements: [ 'li' ]9906 -1 },9907 -1 'doc-endnotes': {9908 -1 type: 'landmark',9909 -1 attributes: {9910 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9911 -1 },9912 -1 owned: {9913 -1 one: [ 'doc-endnote' ]9914 -1 },9915 -1 namefrom: [ 'author' ],9916 -1 context: null,9917 -1 unsupported: false,9918 -1 allowedElements: [ 'section' ]9919 -1 },9920 -1 'doc-epigraph': {9921 -1 type: 'section',9922 -1 attributes: {9923 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9924 -1 },9925 -1 owned: null,9926 -1 namefrom: [ 'author' ],9927 -1 context: null,9928 -1 unsupported: false9929 -1 },9930 -1 'doc-epilogue': {9931 -1 type: 'landmark',9932 -1 attributes: {9933 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9934 -1 },9935 -1 owned: null,9936 -1 namefrom: [ 'author' ],9937 -1 context: null,9938 -1 unsupported: false,9939 -1 allowedElements: [ 'section' ]9940 -1 },9941 -1 'doc-errata': {9942 -1 type: 'landmark',9943 -1 attributes: {9944 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9945 -1 },9946 -1 owned: null,9947 -1 namefrom: [ 'author' ],9948 -1 context: null,9949 -1 unsupported: false,9950 -1 allowedElements: [ 'section' ]9951 -1 },9952 -1 'doc-example': {9953 -1 type: 'section',9954 -1 attributes: {9955 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9956 -1 },9957 -1 owned: null,9958 -1 namefrom: [ 'author' ],9959 -1 context: null,9960 -1 unsupported: false,9961 -1 allowedElements: [ 'aside', 'section' ]9962 -1 },9963 -1 'doc-footnote': {9964 -1 type: 'section',9965 -1 attributes: {9966 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9967 -1 },9968 -1 owned: null,9969 -1 namefrom: [ 'author' ],9970 -1 context: null,9971 -1 unsupported: false,9972 -1 allowedElements: [ 'aside', 'footer', 'header' ]9973 -1 },9974 -1 'doc-foreword': {9975 -1 type: 'landmark',9976 -1 attributes: {9977 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9978 -1 },9979 -1 owned: null,9980 -1 namefrom: [ 'author' ],9981 -1 context: null,9982 -1 unsupported: false,9983 -1 allowedElements: [ 'section' ]9984 -1 },9985 -1 'doc-glossary': {9986 -1 type: 'landmark',9987 -1 attributes: {9988 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]9989 -1 },9990 -1 owned: [ 'term', 'definition' ],9991 -1 namefrom: [ 'author' ],9992 -1 context: null,9993 -1 unsupported: false,9994 -1 allowedElements: [ 'dl' ]9995 -1 },9996 -1 'doc-glossref': {9997 -1 type: 'link',9998 -1 attributes: {9999 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10000 -1 },10001 -1 owned: null,10002 -1 namefrom: [ 'author', 'contents' ],10003 -1 context: null,10004 -1 unsupported: false,10005 -1 allowedElements: [ {10006 -1 nodeName: 'a',10007 -1 attributes: {10008 -1 href: isNotNull10009 -1 }10010 -1 } ]10011 -1 },10012 -1 'doc-index': {10013 -1 type: 'navigation',10014 -1 attributes: {10015 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10016 -1 },10017 -1 owned: null,10018 -1 namefrom: [ 'author' ],10019 -1 context: null,10020 -1 unsupported: false,10021 -1 allowedElements: [ 'nav', 'section' ]10022 -1 },10023 -1 'doc-introduction': {10024 -1 type: 'landmark',10025 -1 attributes: {10026 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10027 -1 },10028 -1 owned: null,10029 -1 namefrom: [ 'author' ],10030 -1 context: null,10031 -1 unsupported: false,10032 -1 allowedElements: [ 'section' ]10033 -1 },10034 -1 'doc-noteref': {10035 -1 type: 'link',10036 -1 attributes: {10037 -1 allowed: [ 'aria-expanded' ]10038 -1 },10039 -1 owned: null,10040 -1 namefrom: [ 'author', 'contents' ],10041 -1 context: null,10042 -1 unsupported: false,10043 -1 allowedElements: [ {10044 -1 nodeName: 'a',10045 -1 attributes: {10046 -1 href: isNotNull10047 -1 }10048 -1 } ]10049 -1 },10050 -1 'doc-notice': {10051 -1 type: 'note',10052 -1 attributes: {10053 -1 allowed: [ 'aria-expanded' ]10054 -1 },10055 -1 owned: null,10056 -1 namefrom: [ 'author' ],10057 -1 context: null,10058 -1 unsupported: false,10059 -1 allowedElements: [ 'section' ]10060 -1 },10061 -1 'doc-pagebreak': {10062 -1 type: 'separator',10063 -1 attributes: {10064 -1 allowed: [ 'aria-expanded' ]10065 -1 },10066 -1 owned: null,10067 -1 namefrom: [ 'author' ],10068 -1 context: null,10069 -1 unsupported: false,10070 -1 allowedElements: [ 'hr' ]10071 -1 },10072 -1 'doc-pagelist': {10073 -1 type: 'navigation',10074 -1 attributes: {10075 -1 allowed: [ 'aria-expanded' ]10076 -1 },10077 -1 owned: null,10078 -1 namefrom: [ 'author' ],10079 -1 context: null,10080 -1 unsupported: false,10081 -1 allowedElements: [ 'nav', 'section' ]10082 -1 },10083 -1 'doc-part': {10084 -1 type: 'landmark',10085 -1 attributes: {10086 -1 allowed: [ 'aria-expanded' ]10087 -1 },10088 -1 owned: null,10089 -1 namefrom: [ 'author' ],10090 -1 context: null,10091 -1 unsupported: false,10092 -1 allowedElements: [ 'section' ]10093 -1 },10094 -1 'doc-preface': {10095 -1 type: 'landmark',10096 -1 attributes: {10097 -1 allowed: [ 'aria-expanded' ]10098 -1 },10099 -1 owned: null,10100 -1 namefrom: [ 'author' ],10101 -1 context: null,10102 -1 unsupported: false,10103 -1 allowedElements: [ 'section' ]10104 -1 },10105 -1 'doc-prologue': {10106 -1 type: 'landmark',10107 -1 attributes: {10108 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10109 -1 },10110 -1 owned: null,10111 -1 namefrom: [ 'author' ],10112 -1 context: null,10113 -1 unsupported: false,10114 -1 allowedElements: [ 'section' ]10115 -1 },10116 -1 'doc-pullquote': {10117 -1 type: 'none',10118 -1 attributes: {10119 -1 allowed: [ 'aria-expanded' ]10120 -1 },10121 -1 owned: null,10122 -1 namefrom: [ 'author' ],10123 -1 context: null,10124 -1 unsupported: false,10125 -1 allowedElements: [ 'aside', 'section' ]10126 -1 },10127 -1 'doc-qna': {10128 -1 type: 'section',10129 -1 attributes: {10130 -1 allowed: [ 'aria-expanded' ]10131 -1 },10132 -1 owned: null,10133 -1 namefrom: [ 'author' ],10134 -1 context: null,10135 -1 unsupported: false,10136 -1 allowedElements: [ 'section' ]10137 -1 },10138 -1 'doc-subtitle': {10139 -1 type: 'sectionhead',10140 -1 attributes: {10141 -1 allowed: [ 'aria-expanded' ]10142 -1 },10143 -1 owned: null,10144 -1 namefrom: [ 'author' ],10145 -1 context: null,10146 -1 unsupported: false,10147 -1 allowedElements: {10148 -1 nodeName: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ]10149 -1 }10150 -1 },10151 -1 'doc-tip': {10152 -1 type: 'note',10153 -1 attributes: {10154 -1 allowed: [ 'aria-expanded' ]10155 -1 },10156 -1 owned: null,10157 -1 namefrom: [ 'author' ],10158 -1 context: null,10159 -1 unsupported: false,10160 -1 allowedElements: [ 'aside' ]10161 -1 },10162 -1 'doc-toc': {10163 -1 type: 'navigation',10164 -1 attributes: {10165 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10166 -1 },10167 -1 owned: null,10168 -1 namefrom: [ 'author' ],10169 -1 context: null,10170 -1 unsupported: false,10171 -1 allowedElements: [ 'nav', 'section' ]10172 -1 },10173 -1 feed: {10174 -1 type: 'structure',10175 -1 attributes: {10176 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10177 -1 },10178 -1 owned: {10179 -1 one: [ 'article' ]10180 -1 },10181 -1 nameFrom: [ 'author' ],10182 -1 context: null,10183 -1 unsupported: false,10184 -1 allowedElements: [ 'article', 'aside', 'section' ]10185 -1 },10186 -1 figure: {10187 -1 type: 'structure',10188 -1 attributes: {10189 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10190 -1 },10191 -1 owned: null,10192 -1 nameFrom: [ 'author', 'contents' ],10193 -1 context: null,10194 -1 implicit: [ 'figure' ],10195 -1 unsupported: false10196 -1 },10197 -1 form: {10198 -1 type: 'landmark',10199 -1 attributes: {10200 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10201 -1 },10202 -1 owned: null,10203 -1 nameFrom: [ 'author' ],10204 -1 context: null,10205 -1 implicit: [ 'form' ],10206 -1 unsupported: false10207 -1 },10208 -1 grid: {10209 -1 type: 'composite',10210 -1 attributes: {10211 -1 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-colcount', 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-rowcount', 'aria-errormessage' ]10212 -1 },10213 -1 owned: {10214 -1 one: [ 'rowgroup', 'row' ]10215 -1 },10216 -1 nameFrom: [ 'author' ],10217 -1 context: null,10218 -1 implicit: [ 'table' ],10219 -1 unsupported: false10220 -1 },10221 -1 gridcell: {10222 -1 type: 'widget',10223 -1 attributes: {10224 -1 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-selected', 'aria-readonly', 'aria-required', 'aria-errormessage' ]10225 -1 },10226 -1 owned: null,10227 -1 nameFrom: [ 'author', 'contents' ],10228 -1 context: [ 'row' ],10229 -1 implicit: [ 'td', 'th' ],10230 -1 unsupported: false10231 -1 },10232 -1 group: {10233 -1 type: 'structure',10234 -1 attributes: {10235 -1 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-errormessage' ]10236 -1 },10237 -1 owned: null,10238 -1 nameFrom: [ 'author' ],10239 -1 context: null,10240 -1 implicit: [ 'details', 'optgroup' ],10241 -1 unsupported: false,10242 -1 allowedElements: [ 'dl', 'figcaption', 'fieldset', 'figure', 'footer', 'header', 'ol', 'ul' ]10243 -1 },10244 -1 heading: {10245 -1 type: 'structure',10246 -1 attributes: {10247 -1 required: [ 'aria-level' ],10248 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10249 -1 },10250 -1 owned: null,10251 -1 nameFrom: [ 'author', 'contents' ],10252 -1 context: null,10253 -1 implicit: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ],10254 -1 unsupported: false10255 -1 },10256 -1 img: {10257 -1 type: 'structure',10258 -1 attributes: {10259 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10260 -1 },10261 -1 owned: null,10262 -1 nameFrom: [ 'author' ],10263 -1 context: null,10264 -1 implicit: [ 'img' ],10265 -1 unsupported: false,10266 -1 allowedElements: [ 'embed', 'iframe', 'object', 'svg' ]10267 -1 },10268 -1 input: {10269 -1 nameFrom: [ 'author' ],10270 -1 type: 'abstract',10271 -1 unsupported: false10272 -1 },10273 -1 landmark: {10274 -1 nameFrom: [ 'author' ],10275 -1 type: 'abstract',10276 -1 unsupported: false10277 -1 },10278 -1 link: {10279 -1 type: 'widget',10280 -1 attributes: {10281 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10282 -1 },10283 -1 owned: null,10284 -1 nameFrom: [ 'author', 'contents' ],10285 -1 context: null,10286 -1 implicit: [ 'a[href]', 'area[href]' ],10287 -1 unsupported: false,10288 -1 allowedElements: [ 'button', {10289 -1 nodeName: 'input',10290 -1 properties: {10291 -1 type: [ 'image', 'button' ]10292 -1 }10293 -1 } ]10294 -1 },10295 -1 list: {10296 -1 type: 'structure',10297 -1 attributes: {10298 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10299 -1 },10300 -1 owned: {10301 -1 all: [ 'listitem' ]10302 -1 },10303 -1 nameFrom: [ 'author' ],10304 -1 context: null,10305 -1 implicit: [ 'ol', 'ul', 'dl' ],10306 -1 unsupported: false10307 -1 },10308 -1 listbox: {10309 -1 type: 'composite',10310 -1 attributes: {10311 -1 allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]10312 -1 },10313 -1 owned: {10314 -1 all: [ 'option' ]10315 -1 },10316 -1 nameFrom: [ 'author' ],10317 -1 context: null,10318 -1 implicit: [ 'select' ],10319 -1 unsupported: false,10320 -1 allowedElements: [ 'ol', 'ul' ]10321 -1 },10322 -1 listitem: {10323 -1 type: 'structure',10324 -1 attributes: {10325 -1 allowed: [ 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-errormessage' ]10326 -1 },10327 -1 owned: null,10328 -1 nameFrom: [ 'author', 'contents' ],10329 -1 context: [ 'list' ],10330 -1 implicit: [ 'li', 'dt' ],10331 -1 unsupported: false10332 -1 },10333 -1 log: {10334 -1 type: 'widget',10335 -1 attributes: {10336 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10337 -1 },10338 -1 owned: null,10339 -1 nameFrom: [ 'author' ],10340 -1 context: null,10341 -1 unsupported: false,10342 -1 allowedElements: [ 'section' ]10343 -1 },10344 -1 main: {10345 -1 type: 'landmark',10346 -1 attributes: {10347 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10348 -1 },10349 -1 owned: null,10350 -1 nameFrom: [ 'author' ],10351 -1 context: null,10352 -1 implicit: [ 'main' ],10353 -1 unsupported: false,10354 -1 allowedElements: [ 'article', 'section' ]10355 -1 },10356 -1 marquee: {10357 -1 type: 'widget',10358 -1 attributes: {10359 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10360 -1 },10361 -1 owned: null,10362 -1 nameFrom: [ 'author' ],10363 -1 context: null,10364 -1 unsupported: false,10365 -1 allowedElements: [ 'section' ]10366 -1 },10367 -1 math: {10368 -1 type: 'structure',10369 -1 attributes: {10370 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10371 -1 },10372 -1 owned: null,10373 -1 nameFrom: [ 'author' ],10374 -1 context: null,10375 -1 implicit: [ 'math' ],10376 -1 unsupported: false10377 -1 },10378 -1 menu: {10379 -1 type: 'composite',10380 -1 attributes: {10381 -1 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]10382 -1 },10383 -1 owned: {10384 -1 one: [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ]10385 -1 },10386 -1 nameFrom: [ 'author' ],10387 -1 context: null,10388 -1 implicit: [ 'menu[type="context"]' ],10389 -1 unsupported: false,10390 -1 allowedElements: [ 'ol', 'ul' ]10391 -1 },10392 -1 menubar: {10393 -1 type: 'composite',10394 -1 attributes: {10395 -1 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]10396 -1 },10397 -1 owned: {10398 -1 one: [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ]10399 -1 },10400 -1 nameFrom: [ 'author' ],10401 -1 context: null,10402 -1 unsupported: false,10403 -1 allowedElements: [ 'ol', 'ul' ]10404 -1 },10405 -1 menuitem: {10406 -1 type: 'widget',10407 -1 attributes: {10408 -1 allowed: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-errormessage' ]10409 -1 },10410 -1 owned: null,10411 -1 nameFrom: [ 'author', 'contents' ],10412 -1 context: [ 'menu', 'menubar' ],10413 -1 implicit: [ 'menuitem[type="command"]' ],10414 -1 unsupported: false,10415 -1 allowedElements: [ 'button', 'li', {10416 -1 nodeName: 'iput',10417 -1 properties: {10418 -1 type: [ 'image', 'button' ]10419 -1 }10420 -1 }, {10421 -1 nodeName: 'a',10422 -1 attributes: {10423 -1 href: isNotNull10424 -1 }10425 -1 } ]10426 -1 },10427 -1 menuitemcheckbox: {10428 -1 type: 'widget',10429 -1 attributes: {10430 -1 allowed: [ 'aria-checked', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]10431 -1 },10432 -1 owned: null,10433 -1 nameFrom: [ 'author', 'contents' ],10434 -1 context: [ 'menu', 'menubar' ],10435 -1 implicit: [ 'menuitem[type="checkbox"]' ],10436 -1 unsupported: false,10437 -1 allowedElements: [ {10438 -1 nodeName: [ 'button', 'li' ]10439 -1 }, {10440 -1 nodeName: 'input',10441 -1 properties: {10442 -1 type: [ 'checkbox', 'image', 'button' ]10443 -1 }10444 -1 }, {10445 -1 nodeName: 'a',10446 -1 attributes: {10447 -1 href: isNotNull10448 -1 }10449 -1 } ]10450 -1 },10451 -1 menuitemradio: {10452 -1 type: 'widget',10453 -1 attributes: {10454 -1 allowed: [ 'aria-checked', 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]10455 -1 },10456 -1 owned: null,10457 -1 nameFrom: [ 'author', 'contents' ],10458 -1 context: [ 'menu', 'menubar' ],10459 -1 implicit: [ 'menuitem[type="radio"]' ],10460 -1 unsupported: false,10461 -1 allowedElements: [ {10462 -1 nodeName: [ 'button', 'li' ]10463 -1 }, {10464 -1 nodeName: 'input',10465 -1 properties: {10466 -1 type: [ 'image', 'button', 'radio' ]10467 -1 }10468 -1 }, {10469 -1 nodeName: 'a',10470 -1 attributes: {10471 -1 href: isNotNull10472 -1 }10473 -1 } ]10474 -1 },10475 -1 navigation: {10476 -1 type: 'landmark',10477 -1 attributes: {10478 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10479 -1 },10480 -1 owned: null,10481 -1 nameFrom: [ 'author' ],10482 -1 context: null,10483 -1 implicit: [ 'nav' ],10484 -1 unsupported: false,10485 -1 allowedElements: [ 'section' ]10486 -1 },10487 -1 none: {10488 -1 type: 'structure',10489 -1 attributes: null,10490 -1 owned: null,10491 -1 nameFrom: [ 'author' ],10492 -1 context: null,10493 -1 unsupported: false,10494 -1 allowedElements: [ {10495 -1 nodeName: [ 'article', 'aside', 'dl', 'embed', 'figcaption', 'fieldset', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'iframe', 'li', 'ol', 'section', 'ul' ]10496 -1 }, {10497 -1 nodeName: 'img',10498 -1 attributes: {10499 -1 alt: isNotNull10500 -1 }10501 -1 } ]-1 29174 "invalid": { -1 29175 "defaultValue": "false", -1 29176 "type": "state", -1 29177 "valueType": "token", -1 29178 "values": [ -1 29179 "grammar", -1 29180 "false", -1 29181 "spelling", -1 29182 "true" -1 29183 ] -1 29184 }, -1 29185 "label": { -1 29186 "type": "property", -1 29187 "valueType": "string" -1 29188 }, -1 29189 "labelledby": { -1 29190 "type": "property", -1 29191 "valueType": "idref_list" -1 29192 }, -1 29193 "level": { -1 29194 "type": "property", -1 29195 "valueType": "integer" -1 29196 }, -1 29197 "live": { -1 29198 "defaultValue": "off", -1 29199 "type": "property", -1 29200 "valueType": "token", -1 29201 "values": [ -1 29202 "off", -1 29203 "polite", -1 29204 "assertive" -1 29205 ] -1 29206 }, -1 29207 "multiline": { -1 29208 "defaultValue": "false", -1 29209 "type": "property", -1 29210 "valueType": "boolean" -1 29211 }, -1 29212 "multiselectable": { -1 29213 "defaultValue": "false", -1 29214 "type": "property", -1 29215 "valueType": "boolean" -1 29216 }, -1 29217 "orientation": { -1 29218 "defaultValue": "vertical", -1 29219 "type": "property", -1 29220 "valueType": "token", -1 29221 "values": [ -1 29222 "horizontal", -1 29223 "vertical" -1 29224 ] -1 29225 }, -1 29226 "owns": { -1 29227 "type": "property", -1 29228 "valueType": "idref_list" -1 29229 }, -1 29230 "posinset": { -1 29231 "type": "property", -1 29232 "valueType": "integer" -1 29233 }, -1 29234 "pressed": { -1 29235 "defaultValue": "undefined", -1 29236 "type": "state", -1 29237 "valueType": "token", -1 29238 "values": [ -1 29239 "true", -1 29240 "false", -1 29241 "mixed", -1 29242 "undefined" -1 29243 ] -1 29244 }, -1 29245 "readonly": { -1 29246 "defaultValue": "false", -1 29247 "type": "property", -1 29248 "valueType": "boolean" -1 29249 }, -1 29250 "relevant": { -1 29251 "defaultValue": "additions text", -1 29252 "type": "property", -1 29253 "valueType": "token_list", -1 29254 "values": [ -1 29255 "additions", -1 29256 "removals", -1 29257 "text", -1 29258 "all" -1 29259 ] -1 29260 }, -1 29261 "required": { -1 29262 "defaultValue": "false", -1 29263 "type": "property", -1 29264 "valueType": "boolean" -1 29265 }, -1 29266 "selected": { -1 29267 "defaultValue": "undefined", -1 29268 "type": "state", -1 29269 "valueType": "token", -1 29270 "values": [ -1 29271 "true", -1 29272 "false", -1 29273 "undefined" -1 29274 ] -1 29275 }, -1 29276 "setsize": { -1 29277 "type": "property", -1 29278 "valueType": "integer" -1 29279 }, -1 29280 "sort": { -1 29281 "defaultValue": "none", -1 29282 "type": "property", -1 29283 "valueType": "token", -1 29284 "values": [ -1 29285 "ascending", -1 29286 "descending", -1 29287 "none", -1 29288 "other" -1 29289 ] -1 29290 }, -1 29291 "valuemax": { -1 29292 "type": "property", -1 29293 "valueType": "decimal" -1 29294 }, -1 29295 "valuemin": { -1 29296 "type": "property", -1 29297 "valueType": "decimal" -1 29298 }, -1 29299 "valuenow": { -1 29300 "type": "property", -1 29301 "valueType": "decimal" -1 29302 }, -1 29303 "valuetext": { -1 29304 "type": "property", -1 29305 "valueType": "string" -1 29306 } -1 29307 }; -1 29308 // END ARIA_PROPERTIES_AUTOGENERATED -1 29309 -1 29310 (function() { -1 29311 // pull values lists into sets -1 29312 for (var propertyName in axs.constants.ARIA_PROPERTIES) { -1 29313 var propertyDetails = axs.constants.ARIA_PROPERTIES[propertyName]; -1 29314 if (!propertyDetails.values) -1 29315 continue; -1 29316 var valuesSet = {}; -1 29317 for (var i = 0; i < propertyDetails.values.length; i++) -1 29318 valuesSet[propertyDetails.values[i]] = true; -1 29319 propertyDetails.valuesSet = valuesSet; -1 29320 } -1 29321 })(); -1 29322 -1 29323 /** -1 29324 * All of the states and properties which apply globally. -1 29325 * @type {Object<!string, !boolean>} -1 29326 */ -1 29327 axs.constants.GLOBAL_PROPERTIES = axs.constants.ARIA_ROLES['roletype'].propertiesSet; -1 29328 -1 29329 /** -1 29330 * A constant indicating no role name. -1 29331 * @type {string} -1 29332 */ -1 29333 axs.constants.NO_ROLE_NAME = ' '; -1 29334 -1 29335 /** -1 29336 * A mapping from ARIA role names to their message ids. -1 29337 * Copied from ChromeVox: -1 29338 * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/aria_util.js -1 29339 * @type {Object.<string, string>} -1 29340 */ -1 29341 axs.constants.WIDGET_ROLE_TO_NAME = { -1 29342 'alert' : 'aria_role_alert', -1 29343 'alertdialog' : 'aria_role_alertdialog', -1 29344 'button' : 'aria_role_button', -1 29345 'checkbox' : 'aria_role_checkbox', -1 29346 'columnheader' : 'aria_role_columnheader', -1 29347 'combobox' : 'aria_role_combobox', -1 29348 'dialog' : 'aria_role_dialog', -1 29349 'grid' : 'aria_role_grid', -1 29350 'gridcell' : 'aria_role_gridcell', -1 29351 'link' : 'aria_role_link', -1 29352 'listbox' : 'aria_role_listbox', -1 29353 'log' : 'aria_role_log', -1 29354 'marquee' : 'aria_role_marquee', -1 29355 'menu' : 'aria_role_menu', -1 29356 'menubar' : 'aria_role_menubar', -1 29357 'menuitem' : 'aria_role_menuitem', -1 29358 'menuitemcheckbox' : 'aria_role_menuitemcheckbox', -1 29359 'menuitemradio' : 'aria_role_menuitemradio', -1 29360 'option' : axs.constants.NO_ROLE_NAME, -1 29361 'progressbar' : 'aria_role_progressbar', -1 29362 'radio' : 'aria_role_radio', -1 29363 'radiogroup' : 'aria_role_radiogroup', -1 29364 'rowheader' : 'aria_role_rowheader', -1 29365 'scrollbar' : 'aria_role_scrollbar', -1 29366 'slider' : 'aria_role_slider', -1 29367 'spinbutton' : 'aria_role_spinbutton', -1 29368 'status' : 'aria_role_status', -1 29369 'tab' : 'aria_role_tab', -1 29370 'tabpanel' : 'aria_role_tabpanel', -1 29371 'textbox' : 'aria_role_textbox', -1 29372 'timer' : 'aria_role_timer', -1 29373 'toolbar' : 'aria_role_toolbar', -1 29374 'tooltip' : 'aria_role_tooltip', -1 29375 'treeitem' : 'aria_role_treeitem' -1 29376 }; -1 29377 -1 29378 -1 29379 /** -1 29380 * @type {Object.<string, string>} -1 29381 * Copied from ChromeVox: -1 29382 * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/aria_util.js -1 29383 */ -1 29384 axs.constants.STRUCTURE_ROLE_TO_NAME = { -1 29385 'article' : 'aria_role_article', -1 29386 'application' : 'aria_role_application', -1 29387 'banner' : 'aria_role_banner', -1 29388 'columnheader' : 'aria_role_columnheader', -1 29389 'complementary' : 'aria_role_complementary', -1 29390 'contentinfo' : 'aria_role_contentinfo', -1 29391 'definition' : 'aria_role_definition', -1 29392 'directory' : 'aria_role_directory', -1 29393 'document' : 'aria_role_document', -1 29394 'form' : 'aria_role_form', -1 29395 'group' : 'aria_role_group', -1 29396 'heading' : 'aria_role_heading', -1 29397 'img' : 'aria_role_img', -1 29398 'list' : 'aria_role_list', -1 29399 'listitem' : 'aria_role_listitem', -1 29400 'main' : 'aria_role_main', -1 29401 'math' : 'aria_role_math', -1 29402 'navigation' : 'aria_role_navigation', -1 29403 'note' : 'aria_role_note', -1 29404 'region' : 'aria_role_region', -1 29405 'rowheader' : 'aria_role_rowheader', -1 29406 'search' : 'aria_role_search', -1 29407 'separator' : 'aria_role_separator' -1 29408 }; -1 29409 -1 29410 -1 29411 /** -1 29412 * @type {Array.<Object>} -1 29413 * Copied from ChromeVox: -1 29414 * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/aria_util.js -1 29415 */ -1 29416 axs.constants.ATTRIBUTE_VALUE_TO_STATUS = [ -1 29417 { name: 'aria-autocomplete', values: -1 29418 {'inline' : 'aria_autocomplete_inline', -1 29419 'list' : 'aria_autocomplete_list', -1 29420 'both' : 'aria_autocomplete_both'} }, -1 29421 { name: 'aria-checked', values: -1 29422 {'true' : 'aria_checked_true', -1 29423 'false' : 'aria_checked_false', -1 29424 'mixed' : 'aria_checked_mixed'} }, -1 29425 { name: 'aria-disabled', values: -1 29426 {'true' : 'aria_disabled_true'} }, -1 29427 { name: 'aria-expanded', values: -1 29428 {'true' : 'aria_expanded_true', -1 29429 'false' : 'aria_expanded_false'} }, -1 29430 { name: 'aria-invalid', values: -1 29431 {'true' : 'aria_invalid_true', -1 29432 'grammar' : 'aria_invalid_grammar', -1 29433 'spelling' : 'aria_invalid_spelling'} }, -1 29434 { name: 'aria-multiline', values: -1 29435 {'true' : 'aria_multiline_true'} }, -1 29436 { name: 'aria-multiselectable', values: -1 29437 {'true' : 'aria_multiselectable_true'} }, -1 29438 { name: 'aria-pressed', values: -1 29439 {'true' : 'aria_pressed_true', -1 29440 'false' : 'aria_pressed_false', -1 29441 'mixed' : 'aria_pressed_mixed'} }, -1 29442 { name: 'aria-readonly', values: -1 29443 {'true' : 'aria_readonly_true'} }, -1 29444 { name: 'aria-required', values: -1 29445 {'true' : 'aria_required_true'} }, -1 29446 { name: 'aria-selected', values: -1 29447 {'true' : 'aria_selected_true', -1 29448 'false' : 'aria_selected_false'} } -1 29449 ]; -1 29450 -1 29451 /** -1 29452 * Copied from ChromeVox: -1 29453 * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/dom_util.js -1 29454 * @type {Object} -1 29455 */ -1 29456 axs.constants.INPUT_TYPE_TO_INFORMATION_TABLE_MSG = { -1 29457 'button' : 'input_type_button', -1 29458 'checkbox' : 'input_type_checkbox', -1 29459 'color' : 'input_type_color', -1 29460 'datetime' : 'input_type_datetime', -1 29461 'datetime-local' : 'input_type_datetime_local', -1 29462 'date' : 'input_type_date', -1 29463 'email' : 'input_type_email', -1 29464 'file' : 'input_type_file', -1 29465 'image' : 'input_type_image', -1 29466 'month' : 'input_type_month', -1 29467 'number' : 'input_type_number', -1 29468 'password' : 'input_type_password', -1 29469 'radio' : 'input_type_radio', -1 29470 'range' : 'input_type_range', -1 29471 'reset' : 'input_type_reset', -1 29472 'search' : 'input_type_search', -1 29473 'submit' : 'input_type_submit', -1 29474 'tel' : 'input_type_tel', -1 29475 'text' : 'input_type_text', -1 29476 'url' : 'input_type_url', -1 29477 'week' : 'input_type_week' -1 29478 }; -1 29479 -1 29480 -1 29481 /** -1 29482 * Copied from ChromeVox: -1 29483 * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/dom_util.js -1 29484 * @type {Object} -1 29485 */ -1 29486 axs.constants.TAG_TO_INFORMATION_TABLE_VERBOSE_MSG = { -1 29487 'A' : 'tag_link', -1 29488 'BUTTON' : 'tag_button', -1 29489 'H1' : 'tag_h1', -1 29490 'H2' : 'tag_h2', -1 29491 'H3' : 'tag_h3', -1 29492 'H4' : 'tag_h4', -1 29493 'H5' : 'tag_h5', -1 29494 'H6' : 'tag_h6', -1 29495 'LI' : 'tag_li', -1 29496 'OL' : 'tag_ol', -1 29497 'SELECT' : 'tag_select', -1 29498 'TEXTAREA' : 'tag_textarea', -1 29499 'UL' : 'tag_ul', -1 29500 'SECTION' : 'tag_section', -1 29501 'NAV' : 'tag_nav', -1 29502 'ARTICLE' : 'tag_article', -1 29503 'ASIDE' : 'tag_aside', -1 29504 'HGROUP' : 'tag_hgroup', -1 29505 'HEADER' : 'tag_header', -1 29506 'FOOTER' : 'tag_footer', -1 29507 'TIME' : 'tag_time', -1 29508 'MARK' : 'tag_mark' -1 29509 }; -1 29510 -1 29511 /** -1 29512 * Copied from ChromeVox: -1 29513 * http://code.google.com/p/google-axs-chrome/source/browse/trunk/chromevox/common/dom_util.js -1 29514 * @type {Object} -1 29515 */ -1 29516 axs.constants.TAG_TO_INFORMATION_TABLE_BRIEF_MSG = { -1 29517 'BUTTON' : 'tag_button', -1 29518 'SELECT' : 'tag_select', -1 29519 'TEXTAREA' : 'tag_textarea' -1 29520 }; -1 29521 -1 29522 axs.constants.MIXED_VALUES = { -1 29523 "true": true, -1 29524 "false": true, -1 29525 "mixed": true -1 29526 }; -1 29527 -1 29528 /** @enum {string} */ -1 29529 axs.constants.Severity = { -1 29530 INFO: 'Info', -1 29531 WARNING: 'Warning', -1 29532 SEVERE: 'Severe' -1 29533 }; -1 29534 -1 29535 /** @enum {string} */ -1 29536 axs.constants.AuditResult = { -1 29537 PASS: 'PASS', -1 29538 FAIL: 'FAIL', -1 29539 NA: 'NA' -1 29540 }; -1 29541 -1 29542 /** @enum {boolean} */ -1 29543 axs.constants.InlineElements = { -1 29544 // fontstyle -1 29545 'TT': true, -1 29546 'I': true, -1 29547 'B': true, -1 29548 'BIG': true, -1 29549 'SMALL': true, -1 29550 -1 29551 // phrase -1 29552 'EM': true, -1 29553 'STRONG': true, -1 29554 'DFN': true, -1 29555 'CODE': true, -1 29556 'SAMP': true, -1 29557 'KBD': true, -1 29558 'VAR': true, -1 29559 'CITE': true, -1 29560 'ABBR': true, -1 29561 'ACRONYM': true, -1 29562 -1 29563 // special -1 29564 'A': true, -1 29565 'IMG': true, -1 29566 'OBJECT': true, -1 29567 'BR': true, -1 29568 'SCRIPT': true, -1 29569 'MAP': true, -1 29570 'Q': true, -1 29571 'SUB': true, -1 29572 'SUP': true, -1 29573 'SPAN': true, -1 29574 'BDO': true, -1 29575 -1 29576 // formctrl -1 29577 'INPUT': true, -1 29578 'SELECT': true, -1 29579 'TEXTAREA': true, -1 29580 'LABEL': true, -1 29581 'BUTTON': true -1 29582 }; -1 29583 -1 29584 /** @enum {boolean} */ -1 29585 axs.constants.NATIVELY_DISABLEABLE = { -1 29586 // W3C and WHATWG https://html.spec.whatwg.org/#enabling-and-disabling-form-controls:-the-disabled-attribute -1 29587 'BUTTON': true, -1 29588 'INPUT': true, -1 29589 'SELECT': true, -1 29590 'TEXTAREA': true, -1 29591 'FIELDSET': true, -1 29592 -1 29593 // W3C http://www.w3.org/TR/html5/disabled-elements.html#disabled-elements -1 29594 'OPTGROUP': true, -1 29595 'OPTION': true -1 29596 }; -1 29597 -1 29598 /** -1 29599 * Maps ARIA attributes to their exactly equivalent HTML attributes. -1 29600 * @type {Object.<string, string>} -1 29601 */ -1 29602 axs.constants.ARIA_TO_HTML_ATTRIBUTE = { -1 29603 'aria-checked' : 'checked', -1 29604 'aria-disabled' : 'disabled', -1 29605 'aria-hidden' : 'hidden', -1 29606 'aria-expanded' : 'open', -1 29607 'aria-valuemax' : 'max', -1 29608 'aria-valuemin' : 'min', -1 29609 'aria-readonly' : 'readonly', -1 29610 'aria-required' : 'required', -1 29611 'aria-selected' : 'selected', -1 29612 'aria-valuenow' : 'value' -1 29613 }; -1 29614 -1 29615 /** -1 29616 * Holds information about implicit ARIA semantics for a given HTML element type. -1 29617 * This object has the following properties: -1 29618 * <ul> -1 29619 * <li>`role` will contain the implicit role if it exists, otherwise empty string.</li> -1 29620 * <li>`allowed` contains the roles that can reasonably be applied to this element. -1 29621 * Note: A tag that can take any role is signified by a '*' wildcard in the array. It is not -1 29622 * an error if the array contains other roles but currently this has no meaning. In future it may -1 29623 * be used to indicate recommended roles. -1 29624 * </li> -1 29625 * <li>`selector` is present if this is a 'subclass' of the base HTML element, i.e. its semantics are -1 29626 * modified by context or attributes. It can be used with the selectors API to find and/or match -1 29627 * elements. -1 29628 * </li> -1 29629 * <li>`reserved` will be true if this is a semantically strong element that you may not modify with any -1 29630 * ARIA attributes, including role or global attributes. -1 29631 * </li> -1 29632 * </ul> -1 29633 * -1 29634 * @typedef {{ role: string, -1 29635 * allowed: Array.<string>, -1 29636 * selector: string, -1 29637 * reserved: boolean }} -1 29638 */ -1 29639 axs.constants.HtmlInfo; -1 29640 /** -1 29641 * A lookup table which maps uppercase tagName to information about implicit ARIA semantics. -1 29642 * This table is based on the document: http://w3c.github.io/aria-in-html/ -1 29643 * It is not complete and never can be. Complex scenarios require specific handling not provided here. -1 29644 * Any element not listed here: -1 29645 * - has no implicit role -1 29646 * - can take any role -1 29647 * e.g. em,strong,small,s,cite,q,dfn,abbr,time,code,var,samp,kbd,sub and sup,i,b,u,mark ,ruby,rt,rp,bdi,bdo,br,wbr -1 29648 * -1 29649 * Where there is any ambiguity this table will endeavor to provide for the most broad case (to avoid -1 29650 * false failures in conformance checking). -1 29651 * -1 29652 * For example 'table' can take any role however in practice it should only be given the role 'grid' when -1 29653 * being used as a data grid or 'presentation' when used for layout. This lookup ignores these nuances and -1 29654 * allows all roles. -1 29655 * -1 29656 * @type {Object.<string, Array.<axs.constants.HtmlInfo>>} -1 29657 */ -1 29658 axs.constants.TAG_TO_IMPLICIT_SEMANTIC_INFO = { -1 29659 'A': [{ -1 29660 role: 'link', -1 29661 allowed: [ -1 29662 'button', -1 29663 'checkbox', -1 29664 'menuitem', -1 29665 'menuitemcheckbox', -1 29666 'menuitemradio', -1 29667 'tab', -1 29668 'treeitem'], -1 29669 selector: 'a[href]' -1 29670 }], -1 29671 'ADDRESS': [{ -1 29672 role: '', -1 29673 allowed: [ -1 29674 'contentinfo', -1 29675 'presentation'] -1 29676 }], -1 29677 'AREA': [{ -1 29678 role: 'link', -1 29679 selector: 'area[href]' -1 29680 }], -1 29681 'ARTICLE': [{ -1 29682 role: 'article', -1 29683 allowed: [ -1 29684 'presentation', -1 29685 'article', -1 29686 'document', -1 29687 'application', -1 29688 'main'] -1 29689 }], -1 29690 'ASIDE': [{ -1 29691 role: 'complementary', -1 29692 allowed: [ -1 29693 'note', -1 29694 'complementary', -1 29695 'search', -1 29696 'presentation'] -1 29697 }], -1 29698 'AUDIO': [{ -1 29699 role: '', -1 29700 allowed: ['application', 'presentation'] -1 29701 }], -1 29702 'BASE': [{ -1 29703 role: '', -1 29704 reserved: true -1 29705 }], -1 29706 'BODY': [{ -1 29707 role: 'document', -1 29708 allowed: ['presentation'] -1 29709 }], -1 29710 'BUTTON': [{ -1 29711 role: 'button', -1 29712 allowed: [ -1 29713 'link', -1 29714 'menuitem', -1 29715 'menuitemcheckbox', -1 29716 'menuitemradio', -1 29717 'radio'], -1 29718 selector: 'button:not([aria-pressed]):not([type="menu"])' -1 29719 }, { -1 29720 role: 'button', -1 29721 allowed: ['button'], -1 29722 selector: 'button[aria-pressed]' -1 29723 }, { -1 29724 role: 'button', -1 29725 attributes: { -1 29726 'aria-haspopup': true 10502 29727 },10503 -1 note: {10504 -1 type: 'structure',10505 -1 attributes: {10506 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10507 -1 },10508 -1 owned: null,10509 -1 nameFrom: [ 'author' ],10510 -1 context: null,10511 -1 unsupported: false,10512 -1 allowedElements: [ 'aside' ]10513 -1 },10514 -1 option: {10515 -1 type: 'widget',10516 -1 attributes: {10517 -1 allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-checked', 'aria-errormessage' ]10518 -1 },10519 -1 owned: null,10520 -1 nameFrom: [ 'author', 'contents' ],10521 -1 context: [ 'listbox' ],10522 -1 implicit: [ 'option' ],10523 -1 unsupported: false,10524 -1 allowedElements: [ {10525 -1 nodeName: [ 'button', 'li' ]10526 -1 }, {10527 -1 nodeName: 'input',10528 -1 properties: {10529 -1 type: [ 'checkbox', 'button' ]10530 -1 }10531 -1 }, {10532 -1 nodeName: 'a',10533 -1 attributes: {10534 -1 href: isNotNull10535 -1 }10536 -1 } ]-1 29728 allowed: [ -1 29729 'link', -1 29730 'menuitem', -1 29731 'menuitemcheckbox', -1 29732 'menuitemradio', -1 29733 'radio'], -1 29734 selector: 'button[type="menu"]' -1 29735 }], -1 29736 'CAPTION': [{ -1 29737 role: '', -1 29738 allowed: ['presentation'] -1 29739 }], -1 29740 'COL': [{ -1 29741 role: '', -1 29742 reserved: true -1 29743 }], -1 29744 'COLGROUP': [{ -1 29745 role: '', -1 29746 reserved: true -1 29747 }], -1 29748 'DATALIST': [{ -1 29749 role: 'listbox', -1 29750 attributes: { -1 29751 'aria-multiselectable': false 10537 29752 },10538 -1 presentation: {10539 -1 type: 'structure',10540 -1 attributes: null,10541 -1 owned: null,10542 -1 nameFrom: [ 'author' ],10543 -1 context: null,10544 -1 unsupported: false,10545 -1 allowedElements: [ {10546 -1 nodeName: [ 'article', 'aside', 'dl', 'embed', 'figcaption', 'fieldset', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'iframe', 'li', 'ol', 'section', 'ul' ]10547 -1 }, {10548 -1 nodeName: 'img',10549 -1 attributes: {10550 -1 alt: isNotNull10551 -1 }10552 -1 } ]-1 29753 allowed: ['presentation'] -1 29754 }], -1 29755 'DEL': [{ -1 29756 role: '', -1 29757 allowed: ['*'] -1 29758 }], -1 29759 'DD': [{ -1 29760 role: '', -1 29761 allowed: ['presentation'] -1 29762 }], -1 29763 'DT': [{ -1 29764 role: '', -1 29765 allowed: ['presentation'] -1 29766 }], -1 29767 'DETAILS': [{ -1 29768 role: 'group', -1 29769 allowed: [ -1 29770 'group', -1 29771 'presentation'] -1 29772 }], -1 29773 'DIALOG': [{ // updated 'allowed' from: http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#the-dialog-element -1 29774 role: 'dialog', -1 29775 allowed: ['dialog', 'alert', 'alertdialog', 'application', 'log', 'marquee', 'status'], -1 29776 selector: 'dialog[open]' -1 29777 }, { -1 29778 role: 'dialog', -1 29779 attributes: { -1 29780 'aria-hidden': true 10553 29781 },10554 -1 progressbar: {10555 -1 type: 'widget',10556 -1 attributes: {10557 -1 allowed: [ 'aria-valuetext', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin', 'aria-expanded', 'aria-errormessage' ]10558 -1 },10559 -1 owned: null,10560 -1 nameFrom: [ 'author' ],10561 -1 context: null,10562 -1 implicit: [ 'progress' ],10563 -1 unsupported: false10564 -1 },10565 -1 radio: {10566 -1 type: 'widget',10567 -1 attributes: {10568 -1 allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-required', 'aria-errormessage', 'aria-checked' ]10569 -1 },10570 -1 owned: null,10571 -1 nameFrom: [ 'author', 'contents' ],10572 -1 context: null,10573 -1 implicit: [ 'input[type="radio"]' ],10574 -1 unsupported: false,10575 -1 allowedElements: [ {10576 -1 nodeName: [ 'button', 'li' ]10577 -1 }, {10578 -1 nodeName: 'input',10579 -1 properties: {10580 -1 type: [ 'image', 'button' ]-1 29782 allowed: ['dialog', 'alert', 'alertdialog', 'application', 'log', 'marquee', 'status'], -1 29783 selector: 'dialog:not([open])' -1 29784 }], -1 29785 'DIV': [{ -1 29786 role: '', -1 29787 allowed: ['*'] -1 29788 }], -1 29789 'DL': [{ -1 29790 role: 'list', -1 29791 allowed: ['presentation'] -1 29792 }], -1 29793 'EMBED': [{ -1 29794 role: '', -1 29795 allowed: [ -1 29796 'application', -1 29797 'document', -1 29798 'img', -1 29799 'presentation'] -1 29800 }], -1 29801 'FIGURE': [{ -1 29802 role: '', -1 29803 allowed: ['*'] -1 29804 }], -1 29805 'FOOTER': [{ -1 29806 role: '', -1 29807 allowed: ['contentinfo', 'presentation'] -1 29808 }], -1 29809 'FORM': [{ -1 29810 role: 'form', -1 29811 allowed: ['presentation'] -1 29812 }], -1 29813 'P': [{ -1 29814 role: '', -1 29815 allowed: ['*'] -1 29816 }], -1 29817 'PRE': [{ -1 29818 role: '', -1 29819 allowed: ['*'] -1 29820 }], -1 29821 'BLOCKQUOTE': [{ -1 29822 role: '', -1 29823 allowed: ['*'] -1 29824 }], -1 29825 H1: [{ -1 29826 role: 'heading' -1 29827 }], -1 29828 H2: [{ -1 29829 role: 'heading' -1 29830 }], -1 29831 H3: [{ -1 29832 role: 'heading' -1 29833 }], -1 29834 H4: [{ -1 29835 role: 'heading' -1 29836 }], -1 29837 H5: [{ -1 29838 role: 'heading' -1 29839 }], -1 29840 H6: [{ -1 29841 role: 'heading' -1 29842 }], -1 29843 'HEAD': [{ -1 29844 role: '', -1 29845 reserved: true -1 29846 }], -1 29847 'HEADER': [{ -1 29848 role: '', -1 29849 allowed: [ -1 29850 'banner', -1 29851 'presentation'] -1 29852 }], -1 29853 'HR': [{ -1 29854 role: 'separator', -1 29855 allowed: ['presentation'] -1 29856 }], -1 29857 'HTML': [{ -1 29858 role: '', -1 29859 reserved: true -1 29860 }], -1 29861 'IFRAME': [{ -1 29862 role: '', -1 29863 allowed: [ -1 29864 'application', -1 29865 'document', -1 29866 'img', -1 29867 'presentation'], -1 29868 selector: 'iframe:not([seamless])' -1 29869 }, { -1 29870 role: '', -1 29871 allowed: [ -1 29872 'application', -1 29873 'document', -1 29874 'img', -1 29875 'presentation', -1 29876 'group'], -1 29877 selector: 'iframe[seamless]' -1 29878 }], -1 29879 'IMG': [{ -1 29880 role: 'presentation', -1 29881 reserved: true, -1 29882 selector: 'img[alt=""]' -1 29883 }, { -1 29884 role: 'img', -1 29885 allowed: ['*'], -1 29886 selector: 'img[alt]:not([alt=""])' -1 29887 }], -1 29888 'INPUT': [{ -1 29889 role: 'button', -1 29890 allowed: [ -1 29891 'link', -1 29892 'menuitem', -1 29893 'menuitemcheckbox', -1 29894 'menuitemradio', -1 29895 'radio'], -1 29896 selector: 'input[type="button"]:not([aria-pressed])' -1 29897 }, { -1 29898 role: 'button', -1 29899 allowed: ['button'], -1 29900 selector: 'input[type="button"][aria-pressed]' -1 29901 }, { -1 29902 role: 'checkbox', -1 29903 allowed: ['checkbox'], -1 29904 selector: 'input[type="checkbox"]' -1 29905 }, { -1 29906 role: '', -1 29907 selector: 'input[type="color"]' -1 29908 }, { -1 29909 role: '', -1 29910 selector: 'input[type="date"]' -1 29911 }, { -1 29912 role: '', -1 29913 selector: 'input[type="datetime"]' -1 29914 }, { -1 29915 role: 'textbox', -1 29916 selector: 'input[type="email"]:not([list])' -1 29917 }, { -1 29918 role: '', -1 29919 selector: 'input[type="file"]' -1 29920 }, { -1 29921 role: '', -1 29922 reserved: true, -1 29923 selector: 'input[type="hidden"]' -1 29924 }, { -1 29925 role: 'button', -1 29926 allowed: ['button'], -1 29927 selector: 'input[type="image"][aria-pressed]' -1 29928 }, { -1 29929 role: 'button', -1 29930 allowed: [ -1 29931 'link', -1 29932 'menuitem', -1 29933 'menuitemcheckbox', -1 29934 'menuitemradio', -1 29935 'radio'], -1 29936 selector: 'input[type="image"]:not([aria-pressed])' -1 29937 }, { -1 29938 role: '', -1 29939 selector: 'input[type="month"]' -1 29940 }, { -1 29941 role: '', -1 29942 selector: 'input[type="number"]' -1 29943 }, { -1 29944 role: 'textbox', -1 29945 selector: 'input[type="password"]' -1 29946 }, { -1 29947 role: 'radio', -1 29948 allowed: ['menuitemradio'], -1 29949 selector: 'input[type="radio"]' -1 29950 }, { -1 29951 role: 'slider', -1 29952 selector: 'input[type="range"]' -1 29953 }, { -1 29954 role: 'button', -1 29955 selector: 'input[type="reset"]' -1 29956 }, { -1 29957 role: 'combobox', // aria-owns is set to the same value as the list attribute -1 29958 selector: 'input[type="search"][list]' -1 29959 }, { -1 29960 role: 'textbox', -1 29961 selector: 'input[type="search"]:not([list])' -1 29962 }, { -1 29963 role: 'button', -1 29964 selector: 'input[type="submit"]' -1 29965 }, { -1 29966 role: 'combobox', // aria-owns is set to the same value as the list attribute -1 29967 selector: 'input[type="tel"][list]' -1 29968 }, { -1 29969 role: 'textbox', -1 29970 selector: 'input[type="tel"]:not([list])' -1 29971 }, { -1 29972 role: 'combobox', // aria-owns is set to the same value as the list attribute -1 29973 selector: 'input[type="text"][list]' -1 29974 }, { -1 29975 role: 'textbox', -1 29976 selector: 'input[type="text"]:not([list])' -1 29977 }, { -1 29978 role: 'textbox', -1 29979 selector: 'input:not([type])' -1 29980 }, { -1 29981 role: '', -1 29982 selector: 'input[type="time"]' -1 29983 }, { -1 29984 role: 'combobox', // aria-owns is set to the same value as the list attribute -1 29985 selector: 'input[type="url"][list]' -1 29986 }, { -1 29987 role: 'textbox', -1 29988 selector: 'input[type="url"]:not([list])' -1 29989 }, { -1 29990 role: '', -1 29991 selector: 'input[type="week"]' -1 29992 }], -1 29993 'INS': [{ -1 29994 role: '', -1 29995 allowed: ['*'] -1 29996 }], -1 29997 'KEYGEN': [{ -1 29998 role: '' -1 29999 }], -1 30000 'LABEL': [{ -1 30001 role: '', -1 30002 allowed: ['presentation'] -1 30003 }], -1 30004 'LI': [{ -1 30005 role: 'listitem', -1 30006 allowed: [ -1 30007 'menuitem', -1 30008 'menuitemcheckbox', -1 30009 'menuitemradio', -1 30010 'option', -1 30011 'tab', -1 30012 'treeitem', -1 30013 'presentation'], -1 30014 selector: 'ol:not([role="presentation"])>li, ul:not([role="presentation"])>li' -1 30015 }, { -1 30016 role: 'listitem', -1 30017 allowed: [ -1 30018 'listitem', -1 30019 'menuitem', -1 30020 'menuitemcheckbox', -1 30021 'menuitemradio', -1 30022 'option', -1 30023 'tab', -1 30024 'treeitem', -1 30025 'presentation'], -1 30026 selector: 'ol[role="presentation"]>li, ul[role="presentation"]>li' -1 30027 }], -1 30028 'LINK': [{ -1 30029 role: 'link', -1 30030 reserved: true, -1 30031 selector: 'link[href]' -1 30032 }], -1 30033 'MAIN': [{ -1 30034 role: '', -1 30035 allowed: [ -1 30036 'main', -1 30037 'presentation'] -1 30038 }], -1 30039 'MAP': [{ -1 30040 role: '', -1 30041 reserved: true -1 30042 }], -1 30043 'MATH': [{ -1 30044 role: '', -1 30045 allowed: ['presentation'] -1 30046 }], -1 30047 'MENU': [{ -1 30048 role: 'toolbar', -1 30049 selector: 'menu[type="toolbar"]' -1 30050 }], -1 30051 'MENUITEM': [{ -1 30052 role: 'menuitem', -1 30053 selector: 'menuitem[type="command"]' -1 30054 }, { -1 30055 role: 'menuitemcheckbox', -1 30056 selector: 'menuitem[type="checkbox"]' -1 30057 }, { -1 30058 role: 'menuitemradio', -1 30059 selector: 'menuitem[type="radio"]' -1 30060 }], -1 30061 'META': [{ -1 30062 role: '', -1 30063 reserved: true -1 30064 }], -1 30065 'METER': [{ -1 30066 role: 'progressbar', -1 30067 allowed: ['presentation'] -1 30068 }], -1 30069 'NAV': [{ -1 30070 role: 'navigation', -1 30071 allowed: ['navigation', 'presentation'] -1 30072 }], -1 30073 'NOSCRIPT': [{ -1 30074 role: '', -1 30075 reserved: true -1 30076 }], -1 30077 'OBJECT': [{ -1 30078 role: '', -1 30079 allowed: ['application', 'document', 'img', 'presentation'] -1 30080 }], -1 30081 'OL': [{ -1 30082 role: 'list', -1 30083 allowed: ['directory', 'group', 'listbox', 'menu', 'menubar', 'tablist', 'toolbar', 'tree', 'presentation'] -1 30084 }], -1 30085 'OPTGROUP': [{ -1 30086 role: '', -1 30087 allowed: ['presentation'] -1 30088 }], -1 30089 'OPTION': [{ -1 30090 role: 'option' -1 30091 }], -1 30092 'OUTPUT': [{ -1 30093 role: 'status', -1 30094 allowed: ['*'] -1 30095 }], -1 30096 'PARAM': [{ -1 30097 role: '', -1 30098 reserved: true -1 30099 }], -1 30100 'PICTURE': [{ -1 30101 role: '', -1 30102 reserved: true -1 30103 }], -1 30104 'PROGRESS': [{ -1 30105 role: 'progressbar', -1 30106 allowed: ['presentation'] -1 30107 }], -1 30108 'SCRIPT': [{ -1 30109 role: '', -1 30110 reserved: true -1 30111 }], -1 30112 'SECTION': [{ -1 30113 role: 'region', -1 30114 allowed: [ -1 30115 'alert', -1 30116 'alertdialog', -1 30117 'application', -1 30118 'contentinfo', -1 30119 'dialog', -1 30120 'document', -1 30121 'log', -1 30122 'marquee', -1 30123 'search', -1 30124 'status', -1 30125 'presentation'] -1 30126 }], -1 30127 'SELECT': [{ -1 30128 role: 'listbox' -1 30129 }], -1 30130 'SOURCE': [{ -1 30131 role: '', -1 30132 reserved: true -1 30133 }], -1 30134 'SPAN': [{ -1 30135 role: '', -1 30136 allowed: ['*'] -1 30137 }], -1 30138 'STYLE': [{ -1 30139 role: '', -1 30140 reserved: true -1 30141 }], -1 30142 'SVG': [{ -1 30143 role: '', -1 30144 allowed: [ -1 30145 'application', -1 30146 'document', -1 30147 'img', -1 30148 'presentation'] -1 30149 }], -1 30150 'SUMMARY': [{ -1 30151 role: '', -1 30152 allowed: ['presentation'] -1 30153 }], -1 30154 'TABLE': [{ -1 30155 role: '', -1 30156 allowed: ['*'] -1 30157 }], -1 30158 'TEMPLATE': [{ -1 30159 role: '', -1 30160 reserved: true -1 30161 }], -1 30162 'TEXTAREA': [{ -1 30163 role: 'textbox' -1 30164 }], -1 30165 'TBODY': [{ -1 30166 role: 'rowgroup', -1 30167 allowed: ['*'] -1 30168 }], -1 30169 'THEAD': [{ -1 30170 role: 'rowgroup', -1 30171 allowed: ['*'] -1 30172 }], -1 30173 'TFOOT': [{ -1 30174 role: 'rowgroup', -1 30175 allowed: ['*'] -1 30176 }], -1 30177 'TITLE': [{ -1 30178 role: '', -1 30179 reserved: true -1 30180 }], -1 30181 'TD': [{ -1 30182 role: '', -1 30183 allowed: ['*'] -1 30184 }], -1 30185 'TH': [{ -1 30186 role: '', -1 30187 allowed: ['*'] -1 30188 }], -1 30189 'TR': [{ -1 30190 role: '', -1 30191 allowed: ['*'] -1 30192 }], -1 30193 'TRACK': [{ -1 30194 role: '', -1 30195 reserved: true -1 30196 }], -1 30197 'UL': [{ -1 30198 role: 'list', -1 30199 allowed: [ -1 30200 'directory', -1 30201 'group', -1 30202 'listbox', -1 30203 'menu', -1 30204 'menubar', -1 30205 'tablist', -1 30206 'toolbar', -1 30207 'tree', -1 30208 'presentation'] -1 30209 }], -1 30210 'VIDEO': [{ -1 30211 role: '', -1 30212 allowed: ['application', 'presentation'] -1 30213 }] -1 30214 }; -1 30215 -1 30216 },{}],192:[function(require,module,exports){ -1 30217 // Copyright 2015 Google Inc. -1 30218 // -1 30219 // Licensed under the Apache License, Version 2.0 (the "License"); -1 30220 // you may not use this file except in compliance with the License. -1 30221 // You may obtain a copy of the License at -1 30222 // -1 30223 // http://www.apache.org/licenses/LICENSE-2.0 -1 30224 // -1 30225 // Unless required by applicable law or agreed to in writing, software -1 30226 // distributed under the License is distributed on an "AS IS" BASIS, -1 30227 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -1 30228 // See the License for the specific language governing permissions and -1 30229 // limitations under the License. -1 30230 -1 30231 goog.provide('axs.dom'); -1 30232 -1 30233 /** -1 30234 * Returns the nearest ancestor which is an Element. -1 30235 * @param {Node} node -1 30236 * @return {?Element} -1 30237 */ -1 30238 axs.dom.parentElement = function(node) { -1 30239 if (!node) -1 30240 return null; -1 30241 -1 30242 var parentNode = axs.dom.composedParentNode(node); -1 30243 if (!parentNode) -1 30244 return null; -1 30245 -1 30246 switch (parentNode.nodeType) { -1 30247 case Node.ELEMENT_NODE: -1 30248 return /** @type {Element} */ (parentNode); -1 30249 default: -1 30250 return axs.dom.parentElement(parentNode); -1 30251 } -1 30252 }; -1 30253 -1 30254 /** -1 30255 * Returns the shadow host of a document fragment if it is a Shadow DOM fragment -1 30256 * otherwise returns `null`. -1 30257 * @param {DocumentFragment} fragment -1 30258 * @return {?Element} -1 30259 */ -1 30260 axs.dom.shadowHost = function(fragment) { -1 30261 // If host exists, this is a Shadow DOM fragment. -1 30262 if ('host' in fragment) -1 30263 return fragment.host; -1 30264 else -1 30265 return null; -1 30266 }; -1 30267 -1 30268 /** -1 30269 * Returns the given Node's parent in the composed tree. -1 30270 * @param {Node} node -1 30271 * @return {?Node} -1 30272 */ -1 30273 axs.dom.composedParentNode = function(node) { -1 30274 if (!node) -1 30275 return null; -1 30276 if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) -1 30277 return axs.dom.shadowHost(/** @type {DocumentFragment} */ (node)); -1 30278 -1 30279 var parentNode = node.parentNode; -1 30280 if (!parentNode) -1 30281 return null; -1 30282 -1 30283 if (parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) -1 30284 return axs.dom.shadowHost(/** @type {DocumentFragment} */ (parentNode)); -1 30285 -1 30286 if (!parentNode.shadowRoot) -1 30287 return parentNode; -1 30288 -1 30289 // Shadow DOM v1 -1 30290 if (node.nodeType === Node.ELEMENT_NODE || node.nodeType === Node.TEXT_NODE) { -1 30291 var assignedSlot = node.assignedSlot; -1 30292 if (HTMLSlotElement && assignedSlot instanceof HTMLSlotElement) -1 30293 return axs.dom.composedParentNode(assignedSlot); -1 30294 } -1 30295 -1 30296 // Shadow DOM v0 -1 30297 if (typeof node.getDestinationInsertionPoints === 'function') { -1 30298 var insertionPoints = node.getDestinationInsertionPoints(); -1 30299 if (insertionPoints.length > 0) -1 30300 return axs.dom.composedParentNode(insertionPoints[insertionPoints.length - 1]); -1 30301 } -1 30302 -1 30303 return null; -1 30304 }; -1 30305 -1 30306 /** -1 30307 * Return the corresponding element for the given node. -1 30308 * @param {Node} node -1 30309 * @return {Element} -1 30310 * @suppress {checkTypes} -1 30311 */ -1 30312 axs.dom.asElement = function(node) { -1 30313 /** @type {Element} */ var element; -1 30314 switch (node.nodeType) { -1 30315 case Node.COMMENT_NODE: -1 30316 return null; // Skip comments -1 30317 case Node.ELEMENT_NODE: -1 30318 element = /** (@type {Element}) */ node; -1 30319 if (element.localName == 'script' || -1 30320 element.localName == 'template') -1 30321 return null; // Skip script-supporting elements -1 30322 return element; -1 30323 case Node.DOCUMENT_FRAGMENT_NODE: -1 30324 return node.host; -1 30325 case Node.TEXT_NODE: -1 30326 return axs.dom.parentElement(node); -1 30327 default: -1 30328 console.warn('Unhandled node type: ', node.nodeType); -1 30329 } -1 30330 return null; -1 30331 }; -1 30332 -1 30333 /** -1 30334 * Recursively walk the composed tree from |node|, aborting if |end| is encountered. -1 30335 * @param {Node} node -1 30336 * @param {?Node} end -1 30337 * @param {{preorder: (function (Node, Object):boolean|undefined), -1 30338 * postorder: (function (Node, Object)|undefined)}} callbacks -1 30339 * Callbacks to be called for each element traversed, excluding -1 30340 * |end|. Possible callbacks are |preorder|, called before descending into -1 30341 * child nodes, and |postorder| called after all child nodes have been -1 30342 * traversed. If |preorder| returns false, its child nodes will not be -1 30343 * traversed. -1 30344 * @param {Object} parentFlags -1 30345 * @param {ShadowRoot=} opt_shadowRoot The nearest ShadowRoot ancestor, if any. -1 30346 * @return {boolean} Whether |end| was found, if provided. -1 30347 */ -1 30348 axs.dom.composedTreeSearch = function(node, end, callbacks, parentFlags, opt_shadowRoot) { -1 30349 if (node === end) -1 30350 return true; -1 30351 -1 30352 if (node.nodeType == Node.ELEMENT_NODE) -1 30353 var element = /** @type {Element} */ (node); -1 30354 -1 30355 var found = false; -1 30356 var flags = Object.create(parentFlags); -1 30357 -1 30358 // Descend into node: -1 30359 // If it has a ShadowRoot, ignore all child elements - these will be picked -1 30360 // up by the <content> or <shadow> elements. Descend straight into the -1 30361 // ShadowRoot. -1 30362 if (element) { -1 30363 var localName = element.localName; -1 30364 if (flags.collectIdRefs) { -1 30365 flags.idrefs = axs.utils.getReferencedIds(element); -1 30366 } -1 30367 if (!flags.disabled || (localName === 'legend') && axs.browserUtils.matchSelector(element, 'fieldset>legend:first-of-type')) { -1 30368 flags.disabled = axs.utils.isElementDisabled(element, true); -1 30369 } -1 30370 if (!flags.hidden) { -1 30371 flags.hidden = axs.utils.isElementHidden(element); -1 30372 } -1 30373 if (callbacks.preorder) { -1 30374 if (!callbacks.preorder(element, flags)) -1 30375 return found; -1 30376 } -1 30377 // NOTE: grunt qunit DOES NOT support Shadow DOM, so if changing this -1 30378 // code, be sure to run the tests in the browser before committing. -1 30379 var shadowRoot = element.shadowRoot || element.webkitShadowRoot; -1 30380 if (shadowRoot) { -1 30381 flags.level++; -1 30382 found = axs.dom.composedTreeSearch(shadowRoot, -1 30383 end, -1 30384 callbacks, -1 30385 flags, -1 30386 shadowRoot); -1 30387 if (element && callbacks.postorder && !found) -1 30388 callbacks.postorder(element, flags); -1 30389 return found; -1 30390 } -1 30391 -1 30392 // If it is a <content> element, descend into distributed elements - these -1 30393 // are elements from outside the shadow root which are rendered inside the -1 30394 // shadow DOM. -1 30395 if (localName == 'content' && typeof element.getDistributedNodes === 'function') { -1 30396 var content = /** @type {HTMLContentElement} */ (element); -1 30397 var distributedNodes = content.getDistributedNodes(); -1 30398 for (var i = 0; i < distributedNodes.length && !found; i++) { -1 30399 found = axs.dom.composedTreeSearch(distributedNodes[i], -1 30400 end, -1 30401 callbacks, -1 30402 flags, -1 30403 opt_shadowRoot); 10581 30404 }10582 -1 } ]10583 -1 },10584 -1 radiogroup: {10585 -1 type: 'composite',10586 -1 attributes: {10587 -1 allowed: [ 'aria-activedescendant', 'aria-required', 'aria-expanded', 'aria-readonly', 'aria-errormessage', 'aria-orientation' ]10588 -1 },10589 -1 owned: {10590 -1 all: [ 'radio' ]10591 -1 },10592 -1 nameFrom: [ 'author' ],10593 -1 context: null,10594 -1 unsupported: false,10595 -1 allowedElements: {10596 -1 nodeName: [ 'ol', 'ul', 'fieldset' ]10597 -1 }10598 -1 },10599 -1 range: {10600 -1 nameFrom: [ 'author' ],10601 -1 type: 'abstract',10602 -1 unsupported: false10603 -1 },10604 -1 region: {10605 -1 type: 'landmark',10606 -1 attributes: {10607 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10608 -1 },10609 -1 owned: null,10610 -1 nameFrom: [ 'author' ],10611 -1 context: null,10612 -1 implicit: [ 'section[aria-label]', 'section[aria-labelledby]', 'section[title]' ],10613 -1 unsupported: false,10614 -1 allowedElements: {10615 -1 nodeName: [ 'article', 'aside' ]10616 -1 }10617 -1 },10618 -1 roletype: {10619 -1 type: 'abstract',10620 -1 unsupported: false10621 -1 },10622 -1 row: {10623 -1 type: 'structure',10624 -1 attributes: {10625 -1 allowed: [ 'aria-activedescendant', 'aria-colindex', 'aria-expanded', 'aria-level', 'aria-selected', 'aria-rowindex', 'aria-errormessage' ]10626 -1 },10627 -1 owned: {10628 -1 one: [ 'cell', 'columnheader', 'rowheader', 'gridcell' ]10629 -1 },10630 -1 nameFrom: [ 'author', 'contents' ],10631 -1 context: [ 'rowgroup', 'grid', 'treegrid', 'table' ],10632 -1 implicit: [ 'tr' ],10633 -1 unsupported: false10634 -1 },10635 -1 rowgroup: {10636 -1 type: 'structure',10637 -1 attributes: {10638 -1 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-errormessage' ]10639 -1 },10640 -1 owned: {10641 -1 all: [ 'row' ]10642 -1 },10643 -1 nameFrom: [ 'author', 'contents' ],10644 -1 context: [ 'grid', 'table', 'treegrid' ],10645 -1 implicit: [ 'tbody', 'thead', 'tfoot' ],10646 -1 unsupported: false10647 -1 },10648 -1 rowheader: {10649 -1 type: 'structure',10650 -1 attributes: {10651 -1 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort', 'aria-errormessage' ]10652 -1 },10653 -1 owned: null,10654 -1 nameFrom: [ 'author', 'contents' ],10655 -1 context: [ 'row' ],10656 -1 implicit: [ 'th' ],10657 -1 unsupported: false10658 -1 },10659 -1 scrollbar: {10660 -1 type: 'widget',10661 -1 attributes: {10662 -1 required: [ 'aria-controls', 'aria-valuenow' ],10663 -1 allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ]10664 -1 },10665 -1 owned: null,10666 -1 nameFrom: [ 'author' ],10667 -1 context: null,10668 -1 unsupported: false10669 -1 },10670 -1 search: {10671 -1 type: 'landmark',10672 -1 attributes: {10673 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10674 -1 },10675 -1 owned: null,10676 -1 nameFrom: [ 'author' ],10677 -1 context: null,10678 -1 unsupported: false,10679 -1 allowedElements: {10680 -1 nodeName: [ 'aside', 'form', 'section' ]10681 -1 }10682 -1 },10683 -1 searchbox: {10684 -1 type: 'widget',10685 -1 attributes: {10686 -1 allowed: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required', 'aria-placeholder', 'aria-errormessage' ]10687 -1 },10688 -1 owned: null,10689 -1 nameFrom: [ 'author' ],10690 -1 context: null,10691 -1 implicit: [ 'input[type="search"]' ],10692 -1 unsupported: false,10693 -1 allowedElements: {10694 -1 nodeName: 'input',10695 -1 properties: {10696 -1 type: 'text'10697 -1 }10698 -1 }10699 -1 },10700 -1 section: {10701 -1 nameFrom: [ 'author', 'contents' ],10702 -1 type: 'abstract',10703 -1 unsupported: false10704 -1 },10705 -1 sectionhead: {10706 -1 nameFrom: [ 'author', 'contents' ],10707 -1 type: 'abstract',10708 -1 unsupported: false10709 -1 },10710 -1 select: {10711 -1 nameFrom: [ 'author' ],10712 -1 type: 'abstract',10713 -1 unsupported: false10714 -1 },10715 -1 separator: {10716 -1 type: 'structure',10717 -1 attributes: {10718 -1 allowed: [ 'aria-expanded', 'aria-orientation', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin', 'aria-valuetext', 'aria-errormessage' ]10719 -1 },10720 -1 owned: null,10721 -1 nameFrom: [ 'author' ],10722 -1 context: null,10723 -1 implicit: [ 'hr' ],10724 -1 unsupported: false,10725 -1 allowedElements: [ 'li' ]10726 -1 },10727 -1 slider: {10728 -1 type: 'widget',10729 -1 attributes: {10730 -1 allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-readonly', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ],10731 -1 required: [ 'aria-valuenow' ]10732 -1 },10733 -1 owned: null,10734 -1 nameFrom: [ 'author' ],10735 -1 context: null,10736 -1 implicit: [ 'input[type="range"]' ],10737 -1 unsupported: false10738 -1 },10739 -1 spinbutton: {10740 -1 type: 'widget',10741 -1 attributes: {10742 -1 allowed: [ 'aria-valuetext', 'aria-required', 'aria-readonly', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ],10743 -1 required: [ 'aria-valuenow' ]10744 -1 },10745 -1 owned: null,10746 -1 nameFrom: [ 'author' ],10747 -1 context: null,10748 -1 implicit: [ 'input[type="number"]' ],10749 -1 unsupported: false,10750 -1 allowedElements: {10751 -1 nodeName: 'input',10752 -1 properties: {10753 -1 type: [ 'text', 'tel' ]-1 30405 if (callbacks.postorder && !found) -1 30406 callbacks.postorder.call(null, element, flags); -1 30407 return found; -1 30408 } -1 30409 } -1 30410 -1 30411 -1 30412 -1 30413 // If it is neither the parent of a ShadowRoot, a <content> element, nor -1 30414 // a <shadow> element recurse normally. -1 30415 var child = node.firstChild; -1 30416 while (child != null && !found) { -1 30417 found = axs.dom.composedTreeSearch(child, -1 30418 end, -1 30419 callbacks, -1 30420 flags, -1 30421 opt_shadowRoot); -1 30422 child = child.nextSibling; -1 30423 } -1 30424 -1 30425 if (element && callbacks.postorder && !found) -1 30426 callbacks.postorder.call(null, element, flags); -1 30427 return found; -1 30428 }; -1 30429 -1 30430 },{}],193:[function(require,module,exports){ -1 30431 // Copyright 2012 Google Inc. -1 30432 // -1 30433 // Licensed under the Apache License, Version 2.0 (the "License"); -1 30434 // you may not use this file except in compliance with the License. -1 30435 // You may obtain a copy of the License at -1 30436 // -1 30437 // http://www.apache.org/licenses/LICENSE-2.0 -1 30438 // -1 30439 // Unless required by applicable law or agreed to in writing, software -1 30440 // distributed under the License is distributed on an "AS IS" BASIS, -1 30441 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -1 30442 // See the License for the specific language governing permissions and -1 30443 // limitations under the License. -1 30444 -1 30445 goog.require('axs.browserUtils'); -1 30446 goog.require('axs.color'); -1 30447 goog.require('axs.dom'); -1 30448 goog.require('axs.utils'); -1 30449 -1 30450 goog.provide('axs.properties'); -1 30451 -1 30452 /** -1 30453 * @const -1 30454 * @type {string} -1 30455 */ -1 30456 axs.properties.TEXT_CONTENT_XPATH = './/text()[normalize-space(.)!=""]/parent::*[name()!="script"]'; -1 30457 -1 30458 /** -1 30459 * @param {Element} element -1 30460 * @return {Object.<string, Object>} -1 30461 */ -1 30462 axs.properties.getFocusProperties = function(element) { -1 30463 var focusProperties = {}; -1 30464 var tabindex = element.getAttribute('tabindex'); -1 30465 if (tabindex != undefined) { -1 30466 focusProperties['tabindex'] = { value: tabindex, valid: true }; -1 30467 } else { -1 30468 if (axs.utils.isElementImplicitlyFocusable(element)) -1 30469 focusProperties['implicitlyFocusable'] = { value: true, valid: true }; -1 30470 } -1 30471 if (Object.keys(focusProperties).length == 0) -1 30472 return null; -1 30473 var transparent = axs.utils.elementIsTransparent(element); -1 30474 var zeroArea = axs.utils.elementHasZeroArea(element); -1 30475 var outsideScrollArea = axs.utils.elementIsOutsideScrollArea(element); -1 30476 var overlappingElements = axs.utils.overlappingElements(element); -1 30477 if (transparent || zeroArea || outsideScrollArea || overlappingElements.length > 0) { -1 30478 var hidden = axs.utils.isElementOrAncestorHidden(element); -1 30479 var visibleProperties = { value: false, -1 30480 valid: hidden }; -1 30481 if (transparent) -1 30482 visibleProperties['transparent'] = true; -1 30483 if (zeroArea) -1 30484 visibleProperties['zeroArea'] = true; -1 30485 if (outsideScrollArea) -1 30486 visibleProperties['outsideScrollArea'] = true; -1 30487 if (overlappingElements && overlappingElements.length > 0) -1 30488 visibleProperties['overlappingElements'] = overlappingElements; -1 30489 var hiddenProperties = { value: hidden, valid: hidden }; -1 30490 if (hidden) -1 30491 hiddenProperties['reason'] = axs.properties.getHiddenReason(element); -1 30492 visibleProperties['hidden'] = hiddenProperties; -1 30493 focusProperties['visible'] = visibleProperties; -1 30494 } else { -1 30495 focusProperties['visible'] = { value: true, valid: true }; -1 30496 } -1 30497 -1 30498 return focusProperties; -1 30499 }; -1 30500 -1 30501 /** -1 30502 * @typedef {{ property: string, -1 30503 * on: Element }} -1 30504 * -1 30505 * property examples: 'display: none', 'visibility: hidden', 'aria-hidden' -1 30506 */ -1 30507 axs.properties.hiddenReason; -1 30508 -1 30509 /** -1 30510 * Determine the reason an element is not visible. -1 30511 * Will give the CSS rule or attribute and the element/ancestor it is set on. -1 30512 * @param {Element} element -1 30513 * @return {?axs.properties.hiddenReason} -1 30514 */ -1 30515 axs.properties.getHiddenReason = function(element) { -1 30516 if (!element || !(element instanceof element.ownerDocument.defaultView.HTMLElement)) -1 30517 return null; -1 30518 -1 30519 if (element.hasAttribute('chromevoxignoreariahidden')) -1 30520 var chromevoxignoreariahidden = true; -1 30521 -1 30522 var style = window.getComputedStyle(element, null); -1 30523 if (style.display == 'none') -1 30524 return { 'property': 'display: none', -1 30525 'on': element }; -1 30526 -1 30527 if (style.visibility == 'hidden') -1 30528 return { 'property': 'visibility: hidden', -1 30529 'on': element }; -1 30530 -1 30531 if (element.hasAttribute('aria-hidden') && -1 30532 element.getAttribute('aria-hidden').toLowerCase() == 'true') { -1 30533 if (!chromevoxignoreariahidden) -1 30534 return { 'property': 'aria-hidden', -1 30535 'on': element }; -1 30536 } -1 30537 -1 30538 return axs.properties.getHiddenReason(axs.dom.parentElement(element)); -1 30539 }; -1 30540 -1 30541 -1 30542 /** -1 30543 * @param {Element} element -1 30544 * @return {Object.<string, Object>} -1 30545 */ -1 30546 axs.properties.getColorProperties = function(element) { -1 30547 var colorProperties = {}; -1 30548 var contrastRatioProperties = -1 30549 axs.properties.getContrastRatioProperties(element); -1 30550 if (contrastRatioProperties) -1 30551 colorProperties['contrastRatio'] = contrastRatioProperties; -1 30552 if (Object.keys(colorProperties).length == 0) -1 30553 return null; -1 30554 return colorProperties; -1 30555 }; -1 30556 -1 30557 /** -1 30558 * Determines whether the given element has a text node as a direct descendant. -1 30559 * @param {Element} element -1 30560 * @return {boolean} -1 30561 */ -1 30562 axs.properties.hasDirectTextDescendant = function(element) { -1 30563 var ownerDocument; -1 30564 if (element.nodeType == Node.DOCUMENT_NODE) -1 30565 ownerDocument = element; -1 30566 else -1 30567 ownerDocument = element.ownerDocument; -1 30568 if (ownerDocument.evaluate) { -1 30569 return hasDirectTextDescendantXpath(); -1 30570 } -1 30571 return hasDirectTextDescendantTreeWalker(); -1 30572 -1 30573 /** -1 30574 * Determines whether element has a text node as a direct descendant. -1 30575 * This method uses XPath on HTML DOM which is not universally supported. -1 30576 * @return {boolean} -1 30577 */ -1 30578 function hasDirectTextDescendantXpath() { -1 30579 var selectorResults = ownerDocument.evaluate(axs.properties.TEXT_CONTENT_XPATH, -1 30580 element, -1 30581 null, -1 30582 XPathResult.ANY_TYPE, -1 30583 null); -1 30584 for (var resultElement = selectorResults.iterateNext(); -1 30585 resultElement != null; -1 30586 resultElement = selectorResults.iterateNext()) { -1 30587 if (resultElement !== element) -1 30588 continue; -1 30589 return true; -1 30590 } -1 30591 return false; -1 30592 } -1 30593 -1 30594 /** -1 30595 * Determines whether element has a text node as a direct descendant. -1 30596 * This method uses TreeWalker as a fallback (at time of writing no version -1 30597 * of IE (including IE11) supports XPath in the HTML DOM). -1 30598 * @return {boolean} -1 30599 */ -1 30600 function hasDirectTextDescendantTreeWalker() { -1 30601 var treeWalker = ownerDocument.createTreeWalker(element, -1 30602 NodeFilter.SHOW_TEXT, -1 30603 null, -1 30604 false); -1 30605 while (treeWalker.nextNode()) { -1 30606 var resultElement = treeWalker.currentNode; -1 30607 var parent = resultElement.parentNode; -1 30608 // Handle elements hosted in <template>.content. -1 30609 parent = parent.host || parent; -1 30610 var tagName = parent.tagName.toLowerCase(); -1 30611 var value = resultElement.nodeValue.trim(); -1 30612 if (value && tagName !== 'script' && element !== resultElement) -1 30613 return true; -1 30614 } -1 30615 return false; -1 30616 } -1 30617 }; -1 30618 -1 30619 /** -1 30620 * @param {Element} element -1 30621 * @return {Object.<string, Object>} -1 30622 */ -1 30623 axs.properties.getContrastRatioProperties = function(element) { -1 30624 if (!axs.properties.hasDirectTextDescendant(element)) -1 30625 return null; -1 30626 -1 30627 var contrastRatioProperties = {}; -1 30628 var style = window.getComputedStyle(element, null); -1 30629 var bgColor = axs.utils.getBgColor(style, element); -1 30630 if (!bgColor) -1 30631 return null; -1 30632 -1 30633 contrastRatioProperties['backgroundColor'] = axs.color.colorToString(bgColor); -1 30634 var fgColor = axs.utils.getFgColor(style, element, bgColor); -1 30635 contrastRatioProperties['foregroundColor'] = axs.color.colorToString(fgColor); -1 30636 var contrast = axs.utils.getContrastRatioForElementWithComputedStyle(style, element); -1 30637 if (!contrast) -1 30638 return null; -1 30639 contrastRatioProperties['value'] = contrast.toFixed(2); -1 30640 if (axs.utils.isLowContrast(contrast, style)) -1 30641 contrastRatioProperties['alert'] = true; -1 30642 -1 30643 var levelAAContrast = axs.utils.isLargeFont(style) ? 3.0 : 4.5; -1 30644 var levelAAAContrast = axs.utils.isLargeFont(style) ? 4.5 : 7.0; -1 30645 var desiredContrastRatios = {}; -1 30646 if (levelAAContrast > contrast) -1 30647 desiredContrastRatios['AA'] = levelAAContrast; -1 30648 if (levelAAAContrast > contrast) -1 30649 desiredContrastRatios['AAA'] = levelAAAContrast; -1 30650 -1 30651 if (!Object.keys(desiredContrastRatios).length) -1 30652 return contrastRatioProperties; -1 30653 -1 30654 var suggestedColors = axs.color.suggestColors(bgColor, fgColor, desiredContrastRatios); -1 30655 if (suggestedColors && Object.keys(suggestedColors).length) -1 30656 contrastRatioProperties['suggestedColors'] = suggestedColors; -1 30657 return contrastRatioProperties; -1 30658 }; -1 30659 -1 30660 /** -1 30661 * @param {Node} node -1 30662 * @param {!Object} textAlternatives The properties object to fill in -1 30663 * @param {boolean=} opt_recursive Whether this is a recursive call or not -1 30664 * @param {boolean=} opt_force Whether to return text alternatives for this -1 30665 * element regardless of its hidden state. -1 30666 * @return {?string} The calculated text alternative for the given element -1 30667 */ -1 30668 axs.properties.findTextAlternatives = function(node, textAlternatives, opt_recursive, opt_force) { -1 30669 var recursive = opt_recursive || false; -1 30670 -1 30671 /** @type {Element} */ var element = axs.dom.asElement(node); -1 30672 if (!element) -1 30673 return null; -1 30674 -1 30675 // 1. Skip hidden elements unless the author specifies to use them via an aria-labelledby or -1 30676 // aria-describedby being used in the current computation. -1 30677 if (!opt_force && axs.utils.isElementOrAncestorHidden(element)) -1 30678 return null; -1 30679 -1 30680 // if this is a text node, just return text content. -1 30681 if (node.nodeType == Node.TEXT_NODE) { -1 30682 var textContentValue = {}; -1 30683 textContentValue.type = 'text'; -1 30684 textContentValue.text = node.textContent; -1 30685 textContentValue.lastWord = axs.properties.getLastWord(textContentValue.text); -1 30686 textAlternatives['content'] = textContentValue; -1 30687 -1 30688 return node.textContent; -1 30689 } -1 30690 -1 30691 var computedName = null; -1 30692 -1 30693 if (!recursive) { -1 30694 // 2A. The aria-labelledby attribute takes precedence as the element's text alternative -1 30695 // unless this computation is already occurring as the result of a recursive aria-labelledby -1 30696 // declaration. -1 30697 computedName = axs.properties.getTextFromAriaLabelledby(element, textAlternatives); -1 30698 } -1 30699 -1 30700 // 2A. If aria-labelledby is empty or undefined, the aria-label attribute, which defines an -1 30701 // explicit text string, is used. -1 30702 if (element.hasAttribute('aria-label')) { -1 30703 var ariaLabelValue = {}; -1 30704 ariaLabelValue.type = 'text'; -1 30705 ariaLabelValue.text = element.getAttribute('aria-label'); -1 30706 ariaLabelValue.lastWord = axs.properties.getLastWord(ariaLabelValue.text); -1 30707 if (computedName) -1 30708 ariaLabelValue.unused = true; -1 30709 else if (!(recursive && axs.utils.elementIsHtmlControl(element))) -1 30710 computedName = ariaLabelValue.text; -1 30711 textAlternatives['ariaLabel'] = ariaLabelValue; -1 30712 } -1 30713 -1 30714 // 2A. If aria-labelledby and aria-label are both empty or undefined, and if the element is not -1 30715 // marked as presentational (role="presentation", check for the presence of an equivalent host -1 30716 // language attribute or element for associating a label, and use those mechanisms to determine -1 30717 // a text alternative. -1 30718 if (!element.hasAttribute('role') || element.getAttribute('role') != 'presentation') { -1 30719 computedName = axs.properties.getTextFromHostLanguageAttributes(element, -1 30720 textAlternatives, -1 30721 computedName, -1 30722 recursive); -1 30723 } -1 30724 -1 30725 // 2B (HTML version). -1 30726 if (recursive && axs.utils.elementIsHtmlControl(element)) { -1 30727 var defaultView = element.ownerDocument.defaultView; -1 30728 -1 30729 // include the value of the embedded control as part of the text alternative in the -1 30730 // following manner: -1 30731 if (element instanceof defaultView.HTMLInputElement) { -1 30732 // If the embedded control is a text field, use its value. -1 30733 var inputElement = /** @type {HTMLInputElement} */ (element); -1 30734 if (inputElement.type == 'text') { -1 30735 if (inputElement.value && inputElement.value.length > 0) -1 30736 textAlternatives['controlValue'] = { 'text': inputElement.value }; 10754 30737 }10755 -1 }10756 -1 },10757 -1 status: {10758 -1 type: 'widget',10759 -1 attributes: {10760 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10761 -1 },10762 -1 owned: null,10763 -1 nameFrom: [ 'author' ],10764 -1 context: null,10765 -1 implicit: [ 'output' ],10766 -1 unsupported: false,10767 -1 allowedElements: [ 'section' ]10768 -1 },10769 -1 structure: {10770 -1 type: 'abstract',10771 -1 unsupported: false10772 -1 },10773 -1 switch: {10774 -1 type: 'widget',10775 -1 attributes: {10776 -1 allowed: [ 'aria-errormessage' ],10777 -1 required: [ 'aria-checked' ]10778 -1 },10779 -1 owned: null,10780 -1 nameFrom: [ 'author', 'contents' ],10781 -1 context: null,10782 -1 unsupported: false,10783 -1 allowedElements: [ 'button', {10784 -1 nodeName: 'input',10785 -1 properties: {10786 -1 type: [ 'checkbox', 'image', 'button' ]-1 30738 // If the embedded control is a range (e.g. a spinbutton or slider), use the value of the -1 30739 // aria-valuetext attribute if available, or otherwise the value of the aria-valuenow -1 30740 // attribute. -1 30741 if (inputElement.type == 'range') -1 30742 textAlternatives['controlValue'] = { 'text': inputElement.value }; -1 30743 } -1 30744 // If the embedded control is a menu, use the text alternative of the chosen menu item. -1 30745 // If the embedded control is a select or combobox, use the chosen option. -1 30746 if (element instanceof defaultView.HTMLSelectElement) { -1 30747 var inputElement = /** @type {HTMLSelectElement} */ (element); -1 30748 textAlternatives['controlValue'] = { 'text': inputElement.value }; -1 30749 } -1 30750 -1 30751 if (textAlternatives['controlValue']) { -1 30752 var controlValue = textAlternatives['controlValue']; -1 30753 if (computedName) -1 30754 controlValue.unused = true; -1 30755 else -1 30756 computedName = controlValue.text; -1 30757 } -1 30758 } -1 30759 -1 30760 // 2B (ARIA version). -1 30761 if (recursive && axs.utils.elementIsAriaWidget(element)) { -1 30762 var role = element.getAttribute('role'); -1 30763 // If the embedded control is a text field, use its value. -1 30764 if (role == 'textbox') { -1 30765 if (element.textContent && element.textContent.length > 0) -1 30766 textAlternatives['controlValue'] = { 'text': element.textContent }; -1 30767 } -1 30768 // If the embedded control is a range (e.g. a spinbutton or slider), use the value of the -1 30769 // aria-valuetext attribute if available, or otherwise the value of the aria-valuenow -1 30770 // attribute. -1 30771 if (role == 'slider' || role == 'spinbutton') { -1 30772 if (element.hasAttribute('aria-valuetext')) -1 30773 textAlternatives['controlValue'] = { 'text': element.getAttribute('aria-valuetext') }; -1 30774 else if (element.hasAttribute('aria-valuenow')) -1 30775 textAlternatives['controlValue'] = { 'value': element.getAttribute('aria-valuenow'), -1 30776 'text': '' + element.getAttribute('aria-valuenow') }; -1 30777 } -1 30778 // If the embedded control is a menu, use the text alternative of the chosen menu item. -1 30779 if (role == 'menu') { -1 30780 var menuitems = element.querySelectorAll('[role=menuitemcheckbox], [role=menuitemradio]'); -1 30781 var selectedMenuitems = []; -1 30782 for (var i = 0; i < menuitems.length; i++) { -1 30783 if (menuitems[i].getAttribute('aria-checked') == 'true') -1 30784 selectedMenuitems.push(menuitems[i]); 10787 30785 }10788 -1 }, {10789 -1 nodeName: 'a',10790 -1 attributes: {10791 -1 href: isNotNull-1 30786 if (selectedMenuitems.length > 0) { -1 30787 var selectedMenuText = ''; -1 30788 for (var i = 0; i < selectedMenuitems.length; i++) { -1 30789 selectedMenuText += axs.properties.findTextAlternatives(selectedMenuitems[i], {}, true); -1 30790 if (i < selectedMenuitems.length - 1) -1 30791 selectedMenuText += ', '; -1 30792 } -1 30793 textAlternatives['controlValue'] = { 'text': selectedMenuText }; 10792 30794 }10793 -1 } ]10794 -1 },10795 -1 tab: {10796 -1 type: 'widget',10797 -1 attributes: {10798 -1 allowed: [ 'aria-selected', 'aria-expanded', 'aria-setsize', 'aria-posinset', 'aria-errormessage' ]10799 -1 },10800 -1 owned: null,10801 -1 nameFrom: [ 'author', 'contents' ],10802 -1 context: [ 'tablist' ],10803 -1 unsupported: false,10804 -1 allowedElements: [ {10805 -1 nodeName: [ 'button', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'li' ]10806 -1 }, {10807 -1 nodeName: 'input',10808 -1 properties: {10809 -1 type: 'button'-1 30795 } -1 30796 // If the embedded control is a select or combobox, use the chosen option. -1 30797 if (role == 'combobox' || role == 'select') { -1 30798 // TODO -1 30799 textAlternatives['controlValue'] = { 'text': 'TODO' }; -1 30800 } -1 30801 -1 30802 if (textAlternatives['controlValue']) { -1 30803 var controlValue = textAlternatives['controlValue']; -1 30804 if (computedName) -1 30805 controlValue.unused = true; -1 30806 else -1 30807 computedName = controlValue.text; -1 30808 } -1 30809 } -1 30810 -1 30811 // 2C. Otherwise, if the attributes checked in rules A and B didn't provide results, text is -1 30812 // collected from descendant content if the current element's role allows "Name From: contents." -1 30813 var hasRole = element.hasAttribute('role'); -1 30814 var canGetNameFromContents = true; -1 30815 if (hasRole) { -1 30816 var roleName = element.getAttribute('role'); -1 30817 // if element has a role, check that it allows "Name From: contents" -1 30818 var role = axs.constants.ARIA_ROLES[roleName]; -1 30819 if (role && (!role.namefrom || role.namefrom.indexOf('contents') < 0)) -1 30820 canGetNameFromContents = false; -1 30821 } -1 30822 var textFromContent = axs.properties.getTextFromDescendantContent(element, opt_force); -1 30823 if (textFromContent && canGetNameFromContents) { -1 30824 var textFromContentValue = {}; -1 30825 textFromContentValue.type = 'text'; -1 30826 textFromContentValue.text = textFromContent; -1 30827 textFromContentValue.lastWord = axs.properties.getLastWord(textFromContentValue.text); -1 30828 if (computedName) -1 30829 textFromContentValue.unused = true; -1 30830 else -1 30831 computedName = textFromContent; -1 30832 textAlternatives['content'] = textFromContentValue; -1 30833 } -1 30834 -1 30835 // 2D. The last resort is to use text from a tooltip attribute (such as the title attribute in -1 30836 // HTML). This is used only if nothing else, including subtree content, has provided results. -1 30837 if (element.hasAttribute('title')) { -1 30838 var titleValue = {}; -1 30839 titleValue.type = 'string'; -1 30840 titleValue.valid = true; -1 30841 titleValue.text = element.getAttribute('title'); -1 30842 titleValue.lastWord = axs.properties.getLastWord(titleValue.lastWord); -1 30843 if (computedName) -1 30844 titleValue.unused = true; -1 30845 else -1 30846 computedName = titleValue.text; -1 30847 textAlternatives['title'] = titleValue; -1 30848 } -1 30849 -1 30850 if (Object.keys(textAlternatives).length == 0 && computedName == null) -1 30851 return null; -1 30852 -1 30853 return computedName; -1 30854 }; -1 30855 -1 30856 /** -1 30857 * @param {Element} element -1 30858 * @param {boolean=} opt_force Whether to return text alternatives for this -1 30859 * element regardless of its hidden state. -1 30860 * @return {?string} -1 30861 */ -1 30862 axs.properties.getTextFromDescendantContent = function(element, opt_force) { -1 30863 var children = element.childNodes; -1 30864 var childrenTextContent = []; -1 30865 for (var i = 0; i < children.length; i++) { -1 30866 var childTextContent = axs.properties.findTextAlternatives(children[i], {}, true, opt_force); -1 30867 if (childTextContent) -1 30868 childrenTextContent.push(childTextContent.trim()); -1 30869 } -1 30870 if (childrenTextContent.length) { -1 30871 var result = ''; -1 30872 // Empty children are allowed, but collapse all of them -1 30873 for (var i = 0; i < childrenTextContent.length; i++) -1 30874 result = [result, childrenTextContent[i]].join(' ').trim(); -1 30875 return result; -1 30876 } -1 30877 return null; -1 30878 }; -1 30879 -1 30880 /** -1 30881 * @param {Element} element -1 30882 * @param {Object} textAlternatives -1 30883 * @return {?string} -1 30884 */ -1 30885 axs.properties.getTextFromAriaLabelledby = function(element, textAlternatives) { -1 30886 var computedName = null; -1 30887 if (!element.hasAttribute('aria-labelledby')) -1 30888 return computedName; -1 30889 -1 30890 var labelledbyAttr = element.getAttribute('aria-labelledby'); -1 30891 var labelledbyIds = labelledbyAttr.split(/\s+/); -1 30892 var labelledbyValue = {}; -1 30893 labelledbyValue.valid = true; -1 30894 var labelledbyText = []; -1 30895 var labelledbyValues = []; -1 30896 for (var i = 0; i < labelledbyIds.length; i++) { -1 30897 var labelledby = {}; -1 30898 labelledby.type = 'element'; -1 30899 var labelledbyId = labelledbyIds[i]; -1 30900 labelledby.value = labelledbyId; -1 30901 var labelledbyElement = document.getElementById(labelledbyId); -1 30902 if (!labelledbyElement) { -1 30903 labelledby.valid = false; -1 30904 labelledbyValue.valid = false; -1 30905 labelledby.errorMessage = { 'messageKey': 'noElementWithId', 'args': [labelledbyId] }; -1 30906 } else { -1 30907 labelledby.valid = true; -1 30908 labelledby.text = axs.properties.findTextAlternatives(labelledbyElement, {}, true, true); -1 30909 labelledby.lastWord = axs.properties.getLastWord(labelledby.text); -1 30910 labelledbyText.push(labelledby.text); -1 30911 labelledby.element = labelledbyElement; -1 30912 } -1 30913 labelledbyValues.push(labelledby); -1 30914 } -1 30915 if (labelledbyValues.length > 0) { -1 30916 labelledbyValues[labelledbyValues.length - 1].last = true; -1 30917 labelledbyValue.values = labelledbyValues; -1 30918 labelledbyValue.text = labelledbyText.join(' '); -1 30919 labelledbyValue.lastWord = axs.properties.getLastWord(labelledbyValue.text); -1 30920 computedName = labelledbyValue.text; -1 30921 textAlternatives['ariaLabelledby'] = labelledbyValue; -1 30922 } -1 30923 -1 30924 return computedName; -1 30925 }; -1 30926 -1 30927 -1 30928 /** -1 30929 * Determine the text description/label for an element. -1 30930 * For example will attempt to find the alt text for an image or label text for a form control. -1 30931 * @param {!Element} element -1 30932 * @param {!Object} textAlternatives An object that will be updated with information. -1 30933 * @param {?string} existingComputedname -1 30934 * @param {boolean} recursive Whether this method is being called recursively as described in -1 30935 * http://www.w3.org/TR/wai-aria/roles#textalternativecomputation section 2A. -1 30936 * @return {Object} -1 30937 */ -1 30938 axs.properties.getTextFromHostLanguageAttributes = function(element, -1 30939 textAlternatives, -1 30940 existingComputedname, -1 30941 recursive) { -1 30942 var computedName = existingComputedname; -1 30943 if (axs.browserUtils.matchSelector(element, 'img') && element.hasAttribute('alt')) { -1 30944 var altValue = {}; -1 30945 altValue.type = 'string'; -1 30946 altValue.valid = true; -1 30947 altValue.text = element.getAttribute('alt'); -1 30948 if (computedName) -1 30949 altValue.unused = true; -1 30950 else -1 30951 computedName = altValue.text; -1 30952 textAlternatives['alt'] = altValue; -1 30953 } -1 30954 -1 30955 var controlsSelector = ['input:not([type="hidden"]):not([disabled])', -1 30956 'select:not([disabled])', -1 30957 'textarea:not([disabled])', -1 30958 'button:not([disabled])', -1 30959 'video:not([disabled])'].join(', '); -1 30960 if (axs.browserUtils.matchSelector(element, controlsSelector) && !recursive) { -1 30961 if (element.hasAttribute('id')) { -1 30962 var labelForQuerySelector = 'label[for="' + element.id + '"]'; -1 30963 var labelsFor = document.querySelectorAll(labelForQuerySelector); -1 30964 var labelForValue = {}; -1 30965 var labelForValues = []; -1 30966 var labelForText = []; -1 30967 for (var i = 0; i < labelsFor.length; i++) { -1 30968 var labelFor = {}; -1 30969 labelFor.type = 'element'; -1 30970 var label = labelsFor[i]; -1 30971 var labelText = axs.properties.findTextAlternatives(label, {}, true); -1 30972 if (labelText && labelText.trim().length > 0) { -1 30973 labelFor.text = labelText.trim(); -1 30974 labelForText.push(labelText.trim()); -1 30975 } -1 30976 labelFor.element = label; -1 30977 labelForValues.push(labelFor); 10810 30978 }10811 -1 }, {10812 -1 nodeName: 'a',10813 -1 attributes: {10814 -1 href: isNotNull-1 30979 if (labelForValues.length > 0) { -1 30980 labelForValues[labelForValues.length - 1].last = true; -1 30981 labelForValue.values = labelForValues; -1 30982 labelForValue.text = labelForText.join(' '); -1 30983 labelForValue.lastWord = axs.properties.getLastWord(labelForValue.text); -1 30984 if (computedName) -1 30985 labelForValue.unused = true; -1 30986 else -1 30987 computedName = labelForValue.text; -1 30988 textAlternatives['labelFor'] = labelForValue; 10815 30989 }10816 -1 } ]10817 -1 },10818 -1 table: {10819 -1 type: 'structure',10820 -1 attributes: {10821 -1 allowed: [ 'aria-colcount', 'aria-rowcount', 'aria-errormessage' ]10822 -1 },10823 -1 owned: {10824 -1 one: [ 'rowgroup', 'row' ]10825 -1 },10826 -1 nameFrom: [ 'author', 'contents' ],10827 -1 context: null,10828 -1 implicit: [ 'table' ],10829 -1 unsupported: false10830 -1 },10831 -1 tablist: {10832 -1 type: 'composite',10833 -1 attributes: {10834 -1 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-errormessage' ]10835 -1 },10836 -1 owned: {10837 -1 all: [ 'tab' ]10838 -1 },10839 -1 nameFrom: [ 'author' ],10840 -1 context: null,10841 -1 unsupported: false,10842 -1 allowedElements: [ 'ol', 'ul' ]10843 -1 },10844 -1 tabpanel: {10845 -1 type: 'widget',10846 -1 attributes: {10847 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10848 -1 },10849 -1 owned: null,10850 -1 nameFrom: [ 'author' ],10851 -1 context: null,10852 -1 unsupported: false,10853 -1 allowedElements: [ 'section' ]10854 -1 },10855 -1 term: {10856 -1 type: 'structure',10857 -1 attributes: {10858 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10859 -1 },10860 -1 owned: null,10861 -1 nameFrom: [ 'author', 'contents' ],10862 -1 context: null,10863 -1 implicit: [ 'dt' ],10864 -1 unsupported: false10865 -1 },10866 -1 textbox: {10867 -1 type: 'widget',10868 -1 attributes: {10869 -1 allowed: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required', 'aria-placeholder', 'aria-errormessage' ]10870 -1 },10871 -1 owned: null,10872 -1 nameFrom: [ 'author' ],10873 -1 context: null,10874 -1 implicit: [ 'input[type="text"]', 'input[type="email"]', 'input[type="password"]', 'input[type="tel"]', 'input[type="url"]', 'input:not([type])', 'textarea' ],10875 -1 unsupported: false10876 -1 },10877 -1 timer: {10878 -1 type: 'widget',10879 -1 attributes: {10880 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10881 -1 },10882 -1 owned: null,10883 -1 nameFrom: [ 'author' ],10884 -1 context: null,10885 -1 unsupported: false10886 -1 },10887 -1 toolbar: {10888 -1 type: 'structure',10889 -1 attributes: {10890 -1 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]10891 -1 },10892 -1 owned: null,10893 -1 nameFrom: [ 'author' ],10894 -1 context: null,10895 -1 implicit: [ 'menu[type="toolbar"]' ],10896 -1 unsupported: false,10897 -1 allowedElements: [ 'ol', 'ul' ]10898 -1 },10899 -1 tooltip: {10900 -1 type: 'structure',10901 -1 attributes: {10902 -1 allowed: [ 'aria-expanded', 'aria-errormessage' ]10903 -1 },10904 -1 owned: null,10905 -1 nameFrom: [ 'author', 'contents' ],10906 -1 context: null,10907 -1 unsupported: false10908 -1 },10909 -1 tree: {10910 -1 type: 'composite',10911 -1 attributes: {10912 -1 allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-required', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]10913 -1 },10914 -1 owned: {10915 -1 all: [ 'treeitem' ]10916 -1 },10917 -1 nameFrom: [ 'author' ],10918 -1 context: null,10919 -1 unsupported: false,10920 -1 allowedElements: [ 'ol', 'ul' ]10921 -1 },10922 -1 treegrid: {10923 -1 type: 'composite',10924 -1 attributes: {10925 -1 allowed: [ 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-rowcount', 'aria-orientation', 'aria-errormessage' ]10926 -1 },10927 -1 owned: {10928 -1 one: [ 'rowgroup', 'row' ]10929 -1 },10930 -1 nameFrom: [ 'author' ],10931 -1 context: null,10932 -1 unsupported: false10933 -1 },10934 -1 treeitem: {10935 -1 type: 'widget',10936 -1 attributes: {10937 -1 allowed: [ 'aria-checked', 'aria-selected', 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]10938 -1 },10939 -1 owned: null,10940 -1 nameFrom: [ 'author', 'contents' ],10941 -1 context: [ 'group', 'tree' ],10942 -1 unsupported: false,10943 -1 allowedElements: [ 'li', {10944 -1 nodeName: 'a',10945 -1 attributes: {10946 -1 href: isNotNull-1 30990 } -1 30991 -1 30992 var parent = axs.dom.parentElement(element); -1 30993 var labelWrappedValue = {}; -1 30994 while (parent) { -1 30995 if (parent.tagName.toLowerCase() == 'label') { -1 30996 var parentLabel = /** @type {HTMLLabelElement} */ (parent); -1 30997 if (parentLabel.control == element) { -1 30998 labelWrappedValue.type = 'element'; -1 30999 labelWrappedValue.text = axs.properties.findTextAlternatives(parentLabel, {}, true); -1 31000 labelWrappedValue.lastWord = axs.properties.getLastWord(labelWrappedValue.text); -1 31001 labelWrappedValue.element = parentLabel; -1 31002 break; -1 31003 } 10947 31004 }10948 -1 } ]10949 -1 },10950 -1 widget: {10951 -1 type: 'abstract',10952 -1 unsupported: false10953 -1 },10954 -1 window: {10955 -1 nameFrom: [ 'author' ],10956 -1 type: 'abstract',10957 -1 unsupported: false-1 31005 parent = axs.dom.parentElement(parent); 10958 31006 }10959 -1 };10960 -1 lookupTable.implicitHtmlRole = _standards_implicit_html_roles__WEBPACK_IMPORTED_MODULE_0__['default'];10961 -1 lookupTable.elementsAllowedNoRole = [ {10962 -1 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' ]10963 -1 }, {10964 -1 nodeName: 'area',10965 -1 attributes: {10966 -1 href: isNotNull-1 31007 if (labelWrappedValue.text) { -1 31008 if (computedName) -1 31009 labelWrappedValue.unused = true; -1 31010 else -1 31011 computedName = labelWrappedValue.text; -1 31012 textAlternatives['labelWrapped'] = labelWrappedValue; 10967 31013 }10968 -1 }, {10969 -1 nodeName: 'input',10970 -1 properties: {10971 -1 type: [ 'color', 'data', 'datatime', 'file', 'hidden', 'month', 'number', 'password', 'range', 'reset', 'submit', 'time', 'week' ]-1 31014 // If all else fails input of type image can fall back to its alt text -1 31015 if (axs.browserUtils.matchSelector(element, 'input[type="image"]') && element.hasAttribute('alt')) { -1 31016 var altValue = {}; -1 31017 altValue.type = 'string'; -1 31018 altValue.valid = true; -1 31019 altValue.text = element.getAttribute('alt'); -1 31020 if (computedName) -1 31021 altValue.unused = true; -1 31022 else -1 31023 computedName = altValue.text; -1 31024 textAlternatives['alt'] = altValue; 10972 31025 }10973 -1 }, {10974 -1 nodeName: 'link',10975 -1 attributes: {10976 -1 href: isNotNull-1 31026 if (!Object.keys(textAlternatives).length) -1 31027 textAlternatives['noLabel'] = true; -1 31028 } -1 31029 return computedName; -1 31030 }; -1 31031 -1 31032 /** -1 31033 * @param {?string} text -1 31034 * @return {?string} -1 31035 */ -1 31036 axs.properties.getLastWord = function(text) { -1 31037 if (!text) -1 31038 return null; -1 31039 -1 31040 // TODO: this makes a lot of assumptions. -1 31041 var lastSpace = text.lastIndexOf(' ') + 1; -1 31042 var MAXLENGTH = 10; -1 31043 var cutoff = text.length - MAXLENGTH; -1 31044 var wordStart = lastSpace > cutoff ? lastSpace : cutoff; -1 31045 return text.substring(wordStart); -1 31046 }; -1 31047 -1 31048 /** -1 31049 * @param {Node} node -1 31050 * @return {Object} -1 31051 */ -1 31052 axs.properties.getTextProperties = function(node) { -1 31053 var textProperties = {}; -1 31054 var computedName = axs.properties.findTextAlternatives(node, textProperties, false, true); -1 31055 -1 31056 if (Object.keys(textProperties).length == 0) { -1 31057 /** @type {Element} */ var element = axs.dom.asElement(node); -1 31058 if (element && axs.browserUtils.matchSelector(element, 'img')) { -1 31059 var altValue = {}; -1 31060 altValue.valid = false; -1 31061 altValue.errorMessage = 'No alt value provided'; -1 31062 textProperties['alt'] = altValue; -1 31063 -1 31064 var src = element.src; -1 31065 if (typeof src == 'string') { -1 31066 var parts = src.split('/'); -1 31067 var filename = parts.pop(); -1 31068 var filenameValue = { text: filename }; -1 31069 textProperties['filename'] = filenameValue; -1 31070 computedName = filename; -1 31071 } -1 31072 } -1 31073 -1 31074 if (!computedName) -1 31075 return null; -1 31076 } -1 31077 -1 31078 textProperties.hasProperties = Boolean(Object.keys(textProperties).length); -1 31079 textProperties.computedText = computedName; -1 31080 textProperties.lastWord = axs.properties.getLastWord(computedName); -1 31081 return textProperties; -1 31082 }; -1 31083 -1 31084 /** -1 31085 * Finds any ARIA attributes (roles, states and properties) explicitly set on this element. -1 31086 * @param {Element} element -1 31087 * @return {Object} -1 31088 */ -1 31089 axs.properties.getAriaProperties = function(element) { -1 31090 var ariaProperties = {}; -1 31091 var statesAndProperties = axs.properties.getGlobalAriaProperties(element); -1 31092 -1 31093 for (var property in axs.constants.ARIA_PROPERTIES) { -1 31094 var attributeName = 'aria-' + property; -1 31095 if (element.hasAttribute(attributeName)) { -1 31096 var propertyValue = element.getAttribute(attributeName); -1 31097 statesAndProperties[attributeName] = -1 31098 axs.utils.getAriaPropertyValue(attributeName, propertyValue, element); -1 31099 } -1 31100 } -1 31101 if (Object.keys(statesAndProperties).length > 0) -1 31102 ariaProperties['properties'] = axs.utils.values(statesAndProperties); -1 31103 -1 31104 var roles = axs.utils.getRoles(element); -1 31105 if (!roles) { -1 31106 if (Object.keys(ariaProperties).length) -1 31107 return ariaProperties; -1 31108 return null; -1 31109 } -1 31110 ariaProperties['roles'] = roles; -1 31111 if (!roles.valid || !roles['roles']) -1 31112 return ariaProperties; -1 31113 -1 31114 var roleDetails = roles['roles']; -1 31115 for (var i = 0; i < roleDetails.length; i++) { -1 31116 var role = roleDetails[i]; -1 31117 if (!role.details || !role.details.propertiesSet) -1 31118 continue; -1 31119 for (var property in role.details.propertiesSet) { -1 31120 if (property in statesAndProperties) -1 31121 continue; -1 31122 if (element.hasAttribute(property)) { -1 31123 var propertyValue = element.getAttribute(property); -1 31124 statesAndProperties[property] = -1 31125 axs.utils.getAriaPropertyValue(property, propertyValue, element); -1 31126 if ('values' in statesAndProperties[property]) { -1 31127 var values = statesAndProperties[property].values; -1 31128 values[values.length - 1].isLast = true; -1 31129 } -1 31130 } else if (role.details.requiredPropertiesSet[property]) { -1 31131 statesAndProperties[property] = -1 31132 { 'name': property, 'valid': false, 'reason': 'Required property not set' }; -1 31133 } 10977 31134 }10978 -1 }, {10979 -1 nodeName: 'menu',10980 -1 attributes: {10981 -1 type: 'context'-1 31135 } -1 31136 if (Object.keys(statesAndProperties).length > 0) -1 31137 ariaProperties['properties'] = axs.utils.values(statesAndProperties); -1 31138 if (Object.keys(ariaProperties).length > 0) -1 31139 return ariaProperties; -1 31140 return null; -1 31141 }; -1 31142 -1 31143 /** -1 31144 * Gets the ARIA properties found on this element which apply to all elements, not just elements with ARIA roles. -1 31145 * @param {Element} element -1 31146 * @return {!Object} -1 31147 */ -1 31148 axs.properties.getGlobalAriaProperties = function(element) { -1 31149 var globalProperties = {}; -1 31150 for (var property in axs.constants.GLOBAL_PROPERTIES) { -1 31151 if (element.hasAttribute(property)) { -1 31152 var propertyValue = element.getAttribute(property); -1 31153 globalProperties[property] = -1 31154 axs.utils.getAriaPropertyValue(property, propertyValue, element); 10982 31155 }10983 -1 }, {10984 -1 nodeName: 'menuitem',10985 -1 attributes: {10986 -1 type: [ 'command', 'checkbox', 'radio' ]-1 31156 } -1 31157 return globalProperties; -1 31158 }; -1 31159 -1 31160 /** -1 31161 * @param {Element} element -1 31162 * @return {Object.<string, Object>} -1 31163 */ -1 31164 axs.properties.getVideoProperties = function(element) { -1 31165 var videoSelector = 'video'; -1 31166 if (!axs.browserUtils.matchSelector(element, videoSelector)) -1 31167 return null; -1 31168 var videoProperties = {}; -1 31169 videoProperties['captionTracks'] = axs.properties.getTrackElements(element, 'captions'); -1 31170 videoProperties['descriptionTracks'] = axs.properties.getTrackElements(element, 'descriptions'); -1 31171 videoProperties['chapterTracks'] = axs.properties.getTrackElements(element, 'chapters'); -1 31172 // error if no text alternatives? -1 31173 return videoProperties; -1 31174 }; -1 31175 -1 31176 /** -1 31177 * @param {Element} element -1 31178 * @param {string} kind -1 31179 * @return {Object} -1 31180 */ -1 31181 axs.properties.getTrackElements = function(element, kind) { -1 31182 // error if resource is not available -1 31183 var trackElements = element.querySelectorAll('track[kind=' + kind + ']'); -1 31184 var result = {}; -1 31185 if (!trackElements.length) { -1 31186 result.valid = false; -1 31187 result.reason = { 'messageKey': 'noTracksProvided', 'args': [[kind]] }; -1 31188 return result; -1 31189 } -1 31190 result.valid = true; -1 31191 var values = []; -1 31192 for (var i = 0; i < trackElements.length; i++) { -1 31193 var trackElement = {}; -1 31194 var src = trackElements[i].getAttribute('src'); -1 31195 var srcLang = trackElements[i].getAttribute('srcLang'); -1 31196 var label = trackElements[i].getAttribute('label'); -1 31197 if (!src) { -1 31198 trackElement.valid = false; -1 31199 trackElement.reason = { 'messageKey': 'noSrcProvided' }; -1 31200 } else { -1 31201 trackElement.valid = true; -1 31202 trackElement.src = src; 10987 31203 }10988 -1 }, {10989 -1 nodeName: 'select',10990 -1 condition: function condition(vNode) {10991 -1 if (!(vNode instanceof axe.AbstractVirtualNode)) {10992 -1 vNode = axe.utils.getNodeFromTree(vNode);10993 -1 }10994 -1 return Number(vNode.attr('size')) > 1;10995 -1 },10996 -1 properties: {10997 -1 multiple: true-1 31204 var name = ''; -1 31205 if (label) { -1 31206 name += label; -1 31207 if (srcLang) -1 31208 name += ' '; 10998 31209 }10999 -1 }, {11000 -1 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' ]11001 -1 } ];11002 -1 lookupTable.elementsAllowedAnyRole = [ {11003 -1 nodeName: 'a',11004 -1 attributes: {11005 -1 href: isNull-1 31210 if (srcLang) -1 31211 name += '(' + srcLang + ')'; -1 31212 if (name == '') -1 31213 name = '[' + { 'messageKey': 'unnamed' } + ']'; -1 31214 trackElement.name = name; -1 31215 values.push(trackElement); -1 31216 } -1 31217 result.values = values; -1 31218 return result; -1 31219 }; -1 31220 -1 31221 /** -1 31222 * @param {Node} node -1 31223 * @return {Object.<string, Object>} -1 31224 */ -1 31225 axs.properties.getAllProperties = function(node) { -1 31226 /** @type {Element} */ var element = axs.dom.asElement(node); -1 31227 if (!element) -1 31228 return {}; -1 31229 -1 31230 var allProperties = {}; -1 31231 allProperties['ariaProperties'] = axs.properties.getAriaProperties(element); -1 31232 allProperties['colorProperties'] = axs.properties.getColorProperties(element); -1 31233 allProperties['focusProperties'] = axs.properties.getFocusProperties(element); -1 31234 allProperties['textProperties'] = axs.properties.getTextProperties(node); -1 31235 allProperties['videoProperties'] = axs.properties.getVideoProperties(element); -1 31236 return allProperties; -1 31237 }; -1 31238 -1 31239 (function() { -1 31240 /** -1 31241 * Helper for implicit semantic functionality. -1 31242 * Can be made part of the public API if need be. -1 31243 * @param {Element} element -1 31244 * @return {?axs.constants.HtmlInfo} -1 31245 */ -1 31246 function getHtmlInfo(element) { -1 31247 if (!element) -1 31248 return null; -1 31249 var tagName = element.tagName; -1 31250 if (!tagName) -1 31251 return null; -1 31252 tagName = tagName.toUpperCase(); -1 31253 var infos = axs.constants.TAG_TO_IMPLICIT_SEMANTIC_INFO[tagName]; -1 31254 if (!infos || !infos.length) -1 31255 return null; -1 31256 var defaultInfo = null; // will contain the info with no specific selector if no others match -1 31257 for (var i = 0, len = infos.length; i < len; i++) { -1 31258 var htmlInfo = infos[i]; -1 31259 if (htmlInfo.selector) { -1 31260 if (axs.browserUtils.matchSelector(element, htmlInfo.selector)) -1 31261 return htmlInfo; -1 31262 } else { -1 31263 defaultInfo = htmlInfo; -1 31264 } 11006 31265 }11007 -1 }, {11008 -1 nodeName: 'img',11009 -1 attributes: {11010 -1 alt: isNull-1 31266 return defaultInfo; -1 31267 } -1 31268 -1 31269 /** -1 31270 * @param {Element} element -1 31271 * @return {string} role -1 31272 */ -1 31273 axs.properties.getImplicitRole = function(element) { -1 31274 var htmlInfo = getHtmlInfo(element); -1 31275 if (htmlInfo) -1 31276 return htmlInfo.role; -1 31277 return ''; -1 31278 }; -1 31279 -1 31280 /** -1 31281 * Determine if this element can take ANY ARIA attributes including roles, state and properties. -1 31282 * If false then even global attributes should not be used. -1 31283 * @param {Element} element -1 31284 * @return {boolean} -1 31285 */ -1 31286 axs.properties.canTakeAriaAttributes = function(element) { -1 31287 var htmlInfo = getHtmlInfo(element); -1 31288 if (htmlInfo) -1 31289 return !htmlInfo.reserved; -1 31290 return true; -1 31291 }; -1 31292 })(); -1 31293 -1 31294 /** -1 31295 * This lists the ARIA attributes that are supported implicitly by native properties of this element. -1 31296 * -1 31297 * @param {Element} element The element to check. -1 31298 * @return {!Array.<string>} An array of ARIA attributes. -1 31299 * -1 31300 * example: -1 31301 * var element = document.createElement("input"); -1 31302 * element.setAttribute("type", "range"); -1 31303 * var supported = axs.properties.getNativelySupportedAttributes(element); // an array of ARIA attributes -1 31304 * console.log(supported.indexOf("aria-valuemax") >=0); // logs 'true' -1 31305 */ -1 31306 axs.properties.getNativelySupportedAttributes = function(element) { -1 31307 var result = []; -1 31308 if (!element) { -1 31309 return result; -1 31310 } -1 31311 var testElement = element.cloneNode(false); // gets rid of expandos -1 31312 var ariaAttributes = Object.keys(/** @type {!Object} */(axs.constants.ARIA_TO_HTML_ATTRIBUTE)); -1 31313 for (var i = 0; i < ariaAttributes.length; i++) { -1 31314 var ariaAttribute = ariaAttributes[i]; -1 31315 var nativeAttribute = axs.constants.ARIA_TO_HTML_ATTRIBUTE[ariaAttribute]; -1 31316 if (nativeAttribute in testElement) { -1 31317 result[result.length] = ariaAttribute; 11011 31318 }11012 -1 }, {11013 -1 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' ]11014 -1 } ];11015 -1 lookupTable.evaluateRoleForElement = {11016 -1 A: function A(_ref24) {11017 -1 var node = _ref24.node, out = _ref24.out;11018 -1 if (node.namespaceURI === 'http://www.w3.org/2000/svg') {11019 -1 return true;11020 -1 }11021 -1 if (node.href.length) {11022 -1 return out;11023 -1 }11024 -1 return true;11025 -1 },11026 -1 AREA: function AREA(_ref25) {11027 -1 var node = _ref25.node;11028 -1 return !node.href;11029 -1 },11030 -1 BUTTON: function BUTTON(_ref26) {11031 -1 var node = _ref26.node, role = _ref26.role, out = _ref26.out;11032 -1 if (node.getAttribute('type') === 'menu') {11033 -1 return role === 'menuitem';11034 -1 }11035 -1 return out;11036 -1 },11037 -1 IMG: function IMG(_ref27) {11038 -1 var node = _ref27.node, role = _ref27.role, out = _ref27.out;11039 -1 switch (node.alt) {11040 -1 case null:11041 -1 return out;-1 31319 } -1 31320 return result; -1 31321 }; -1 31322 -1 31323 (function() { -1 31324 var roleToSelectorCache = {}; // performance optimization, cache results from getSelectorForRole -1 31325 -1 31326 /** -1 31327 * Build a selector that will match elements which implicity or explicitly have this role. -1 31328 * Note that the selector will probably not look elegant but it will work. -1 31329 * @param {string} role -1 31330 * @return {string} selector -1 31331 */ -1 31332 axs.properties.getSelectorForRole = function(role) { -1 31333 if (!role) -1 31334 return ''; -1 31335 if (roleToSelectorCache[role] && roleToSelectorCache.hasOwnProperty(role)) -1 31336 return roleToSelectorCache[role]; -1 31337 var selectors = ['[role="' + role + '"]']; -1 31338 var tagNames = Object.keys(/** @type {!Object} */(axs.constants.TAG_TO_IMPLICIT_SEMANTIC_INFO)); -1 31339 tagNames.forEach(function(tagName) { -1 31340 var htmlInfos = axs.constants.TAG_TO_IMPLICIT_SEMANTIC_INFO[tagName]; -1 31341 if (htmlInfos && htmlInfos.length) { -1 31342 for (var i = 0; i < htmlInfos.length; i++) { -1 31343 var htmlInfo = htmlInfos[i]; -1 31344 if (htmlInfo.role === role) { -1 31345 if (htmlInfo.selector) { -1 31346 selectors[selectors.length] = htmlInfo.selector; -1 31347 } else { -1 31348 selectors[selectors.length] = tagName; // Selectors API is not case sensitive. -1 31349 break; // No need to continue adding selectors since we will match the tag itself. -1 31350 } -1 31351 } -1 31352 } -1 31353 } -1 31354 }); -1 31355 return (roleToSelectorCache[role] = selectors.join(',')); -1 31356 }; -1 31357 })(); -1 31358 -1 31359 },{}],194:[function(require,module,exports){ -1 31360 var query = require('./lib/query.js'); -1 31361 var name = require('./lib/name.js'); -1 31362 var atree = require('./lib/atree.js'); -1 31363 -1 31364 module.exports = { -1 31365 getRole: query.getRole, -1 31366 getAttribute: query.getAttribute, -1 31367 getName: name.getName, -1 31368 getDescription: name.getDescription, -1 31369 -1 31370 matches: query.matches, -1 31371 querySelector: query.querySelector, -1 31372 querySelectorAll: query.querySelectorAll, -1 31373 closest: query.closest, -1 31374 -1 31375 getParentNode: atree.getParentNode, -1 31376 getChildNodes: atree.getChildNodes, -1 31377 }; -1 31378 -1 31379 },{"./lib/atree.js":195,"./lib/name.js":198,"./lib/query.js":199}],195:[function(require,module,exports){ -1 31380 var attrs = require('./attrs'); -1 31381 -1 31382 var _getOwner = function(node) { -1 31383 if (node.nodeType === node.ELEMENT_NODE && node.id) { -1 31384 var owner = document.querySelector('[aria-owns~="' + node.id + '"]'); -1 31385 if (owner) { -1 31386 return owner; -1 31387 } -1 31388 } -1 31389 }; -1 31390 -1 31391 var _getParentNode = function(node) { -1 31392 return _getOwner(node) || node.parentNode; -1 31393 }; -1 31394 -1 31395 var detectLoop = function(node) { -1 31396 var tmp = _getParentNode(node); -1 31397 while (tmp) { -1 31398 if (tmp === node) { -1 31399 return true; -1 31400 } -1 31401 tmp = _getParentNode(tmp); -1 31402 } -1 31403 }; -1 31404 -1 31405 var getOwner = function(node) { -1 31406 if (node.nodeType === node.ELEMENT_NODE && node.id) { -1 31407 var owner = document.querySelector('[aria-owns~="' + node.id + '"]'); -1 31408 if (owner && !detectLoop(node)) { -1 31409 return owner; -1 31410 } -1 31411 } -1 31412 }; -1 31413 -1 31414 var getParentNode = function(node) { -1 31415 return getOwner(node) || node.parentNode; -1 31416 }; -1 31417 -1 31418 var isHidden = function(node) { -1 31419 return node.nodeType === node.ELEMENT_NODE && attrs.getAttribute(node, 'hidden'); -1 31420 }; -1 31421 -1 31422 var getChildNodes = function(node) { -1 31423 var childNodes = []; -1 31424 -1 31425 for (var i = 0; i < node.childNodes.length; i++) { -1 31426 var child = node.childNodes[i]; -1 31427 if (!getOwner(child) && !isHidden(child)) { -1 31428 childNodes.push(child); -1 31429 } -1 31430 } -1 31431 -1 31432 if (node.nodeType === node.ELEMENT_NODE) { -1 31433 var owns = attrs.getAttribute(node, 'owns') || []; -1 31434 for (var i = 0; i < owns.length; i++) { -1 31435 var child = document.getElementById(owns[i]); -1 31436 // double check with getOwner for consistency -1 31437 if (child && getOwner(child) === node && !isHidden(child)) { -1 31438 childNodes.push(child); -1 31439 } -1 31440 } -1 31441 } -1 31442 -1 31443 return childNodes; -1 31444 }; -1 31445 -1 31446 var walk = function(root, fn) { -1 31447 fn(root); -1 31448 getChildNodes(root).forEach(function(child) { -1 31449 walk(child, fn); -1 31450 }); -1 31451 }; -1 31452 -1 31453 var searchUp = function(node, test) { -1 31454 var candidate = getParentNode(node); -1 31455 if (candidate) { -1 31456 if (test(candidate)) { -1 31457 return candidate; -1 31458 } else { -1 31459 return searchUp(candidate, test); -1 31460 } -1 31461 } -1 31462 }; -1 31463 -1 31464 module.exports = { -1 31465 'getParentNode': getParentNode, -1 31466 'getChildNodes': getChildNodes, -1 31467 'walk': walk, -1 31468 'searchUp': searchUp, -1 31469 }; -1 31470 -1 31471 },{"./attrs":196}],196:[function(require,module,exports){ -1 31472 var constants = require('./constants.js'); -1 31473 -1 31474 // candidates can be passed for performance optimization -1 31475 var getRole = function(el, candidates) { -1 31476 if (el.hasAttribute('role')) { -1 31477 return el.getAttribute('role'); -1 31478 } -1 31479 for (var role in constants.roles) { -1 31480 var selector = (constants.roles[role].selectors || []).join(','); -1 31481 if (selector && (!candidates || candidates.includes(role)) && el.matches(selector)) { -1 31482 return role; -1 31483 } -1 31484 } -1 31485 -1 31486 if (!candidates || -1 31487 candidates.includes('banner') || -1 31488 candidates.includes('contentinfo')) { -1 31489 if (!el.matches(constants.scoped)) { -1 31490 if (el.matches('header')) { -1 31491 return 'banner'; -1 31492 } -1 31493 if (el.matches('footer')) { -1 31494 return 'contentinfo'; -1 31495 } -1 31496 } -1 31497 } -1 31498 }; -1 31499 -1 31500 var hasRole = function(el, roles) { -1 31501 var candidates = [].concat.apply([], roles.map(function(role) { -1 31502 return (constants.roles[role] || {}).subRoles || [role]; -1 31503 })); -1 31504 var actual = getRole(el, candidates); -1 31505 return candidates.includes(actual); -1 31506 }; -1 31507 -1 31508 var getAttribute = function(el, key) { -1 31509 if (constants.attributeStrongMapping.hasOwnProperty(key)) { -1 31510 var value = el[constants.attributeStrongMapping[key]]; -1 31511 if (value) { -1 31512 return value; -1 31513 } -1 31514 } -1 31515 if (key === 'readonly' && el.contentEditable) { -1 31516 return false; -1 31517 } else if (key === 'invalid' && el.checkValidity) { -1 31518 return !el.checkValidity(); -1 31519 } else if (key === 'hidden') { -1 31520 // workaround for chromium -1 31521 if (el.matches('noscript')) { -1 31522 return true; -1 31523 } -1 31524 var style = window.getComputedStyle(el); -1 31525 if (style.display === 'none' || style.visibility === 'hidden') { -1 31526 return true; -1 31527 } -1 31528 } -1 31529 -1 31530 var type = constants.attributes[key]; -1 31531 var raw = el.getAttribute('aria-' + key); -1 31532 -1 31533 if (raw) { -1 31534 if (type === 'bool') { -1 31535 return raw === 'true'; -1 31536 } else if (type === 'tristate') { -1 31537 return raw === 'true' ? true : raw === 'false' ? false : 'mixed'; -1 31538 } else if (type === 'bool-undefined') { -1 31539 return raw === 'true' ? true : raw === 'false' ? false : undefined; -1 31540 } else if (type === 'id-list') { -1 31541 return raw.split(/\s+/); -1 31542 } else if (type === 'integer') { -1 31543 return parseInt(raw, 10); -1 31544 } else if (type === 'number') { -1 31545 return parseFloat(raw); -1 31546 } else if (type === 'token-list') { -1 31547 return raw.split(/\s+/); -1 31548 } else { -1 31549 return raw; -1 31550 } -1 31551 } -1 31552 -1 31553 // TODO -1 31554 // autocomplete -1 31555 // contextmenu -> aria-haspopup -1 31556 // indeterminate -> aria-checked="mixed" -1 31557 // list -> aria-controls -1 31558 -1 31559 if (key === 'level') { -1 31560 for (var i = 1; i <= 6; i++) { -1 31561 if (el.tagName.toLowerCase() === 'h' + i) { -1 31562 return i; -1 31563 } -1 31564 } -1 31565 } else if (constants.attributeWeakMapping.hasOwnProperty(key)) { -1 31566 return el[constants.attributeWeakMapping[key]]; -1 31567 } -1 31568 -1 31569 if (key in constants.attrsWithDefaults) { -1 31570 var role = getRole(el); -1 31571 var defaults = (constants.roles[role] || {}).defaults; -1 31572 if (defaults && defaults.hasOwnProperty(key)) { -1 31573 return defaults[key]; -1 31574 } -1 31575 } -1 31576 -1 31577 if (type === 'bool' || type === 'tristate') { -1 31578 return false; -1 31579 } -1 31580 }; -1 31581 -1 31582 module.exports = { -1 31583 getRole: getRole, -1 31584 hasRole: hasRole, -1 31585 getAttribute: getAttribute, -1 31586 }; -1 31587 -1 31588 },{"./constants.js":197}],197:[function(require,module,exports){ -1 31589 exports.attributes = { -1 31590 // widget -1 31591 'autocomplete': 'token', -1 31592 'checked': 'tristate', -1 31593 'current': 'token', -1 31594 'disabled': 'bool', -1 31595 'expanded': 'bool-undefined', -1 31596 'haspopup': 'token', -1 31597 'hidden': 'bool', // ! -1 31598 'invalid': 'token', -1 31599 'keyshortcuts': 'string', -1 31600 'label': 'string', -1 31601 'level': 'int', -1 31602 'modal': 'bool', -1 31603 'multiline': 'bool', -1 31604 'multiselectable': 'bool', -1 31605 'orientation': 'token', -1 31606 'placeholder': 'string', -1 31607 'pressed': 'tristate', -1 31608 'readonly': 'bool', -1 31609 'required': 'bool', -1 31610 'roledescription': 'string', -1 31611 'selected': 'bool-undefined', -1 31612 'valuemax': 'number', -1 31613 'valuemin': 'number', -1 31614 'valuenow': 'number', -1 31615 'valuetext': 'string', -1 31616 -1 31617 // live -1 31618 'atomic': 'bool', -1 31619 'busy': 'bool', -1 31620 'live': 'token', -1 31621 'relevant': 'token-list', -1 31622 -1 31623 // dragndrop -1 31624 'dropeffect': 'token-list', -1 31625 'grabbed': 'bool-undefined', -1 31626 -1 31627 // relationship -1 31628 'activedescendant': 'id', -1 31629 'colcount': 'int', -1 31630 'colindex': 'int', -1 31631 'colspan': 'int', -1 31632 'controls': 'id-list', -1 31633 'describedby': 'id-list', -1 31634 'details': 'id', -1 31635 'errormessage': 'id', -1 31636 'flowto': 'id-list', -1 31637 'labelledby': 'id-list', -1 31638 'owns': 'id-list', -1 31639 'posinset': 'int', -1 31640 'rowcount': 'int', -1 31641 'rowindex': 'int', -1 31642 'rowspan': 'int', -1 31643 'setsize': 'int', -1 31644 'sort': 'token', -1 31645 }; -1 31646 -1 31647 exports.attributeStrongMapping = { -1 31648 'disabled': 'disabled', -1 31649 'placeholder': 'placeholder', -1 31650 'readonly': 'readOnly', -1 31651 'required': 'required', -1 31652 }; -1 31653 -1 31654 exports.attributeWeakMapping = { -1 31655 'checked': 'checked', -1 31656 'colspan': 'colSpan', -1 31657 'expanded': 'open', -1 31658 'multiselectable': 'multiple', -1 31659 'rowspan': 'rowSpan', -1 31660 'selected': 'selected', -1 31661 }; -1 31662 -1 31663 // https://www.w3.org/TR/html-aam-1.0/#html-element-role-mappings -1 31664 // https://www.w3.org/TR/wai-aria/roles -1 31665 exports.roles = { -1 31666 alert: { -1 31667 childRoles: ['alertdialog'], -1 31668 defaults: { -1 31669 'live': 'assertive', -1 31670 'atomic': true, -1 31671 }, -1 31672 }, -1 31673 article: { -1 31674 selectors: ['article'], -1 31675 }, -1 31676 button: { -1 31677 selectors: [ -1 31678 'button', -1 31679 'input[type="button"]', -1 31680 'input[type="image"]', -1 31681 'input[type="reset"]', -1 31682 'input[type="submit"]', -1 31683 'summary', -1 31684 ], -1 31685 nameFromContents: true, -1 31686 }, -1 31687 cell: { -1 31688 selectors: ['td'], -1 31689 childRoles: ['gridcell', 'rowheader'], -1 31690 }, -1 31691 checkbox: { -1 31692 selectors: ['input[type="checkbox"]'], -1 31693 childRoles: ['menuitemcheckbox', 'switch'], -1 31694 nameFromContents: true, -1 31695 defaults: { -1 31696 'checked': 'false', -1 31697 }, -1 31698 }, -1 31699 columnheader: { -1 31700 selectors: ['th[scope="col"]'], -1 31701 nameFromContents: true, -1 31702 }, -1 31703 combobox: { -1 31704 selectors: [ -1 31705 'input:not([type])[list]', -1 31706 'input[type="email"][list]', -1 31707 'input[type="search"][list]', -1 31708 'input[type="tel"][list]', -1 31709 'input[type="text"][list]', -1 31710 'input[type="url"][list]', -1 31711 'select:not([size]):not([multiple])', -1 31712 'select[size="0"]:not([multiple])', -1 31713 'select[size="1"]:not([multiple])', -1 31714 ], -1 31715 defaults: { -1 31716 'expanded': false, -1 31717 'haspopup': 'listbox', -1 31718 }, -1 31719 }, -1 31720 command: { -1 31721 childRoles: ['button', 'link', 'menuitem'], -1 31722 }, -1 31723 complementary: { -1 31724 selectors: ['aside'], -1 31725 }, -1 31726 composite: { -1 31727 childRoles: ['grid', 'select', 'spinbutton', 'tablist'], -1 31728 }, -1 31729 definition: { -1 31730 selectors: ['dd'], -1 31731 }, -1 31732 dialog: { -1 31733 selectors: ['dialog'], -1 31734 childRoles: ['alertdialog'], -1 31735 }, -1 31736 'doc-backlink': { -1 31737 nameFromContents: true, -1 31738 }, -1 31739 'doc-biblioref': { -1 31740 nameFromContents: true, -1 31741 }, -1 31742 'doc-glossref': { -1 31743 nameFromContents: true, -1 31744 }, -1 31745 'doc-noteref': { -1 31746 nameFromContents: true, -1 31747 }, -1 31748 document: { -1 31749 selectors: ['body'], -1 31750 childRoles: ['article', 'graphics-document'], -1 31751 }, -1 31752 figure: { -1 31753 selectors: ['figure'], -1 31754 }, -1 31755 form: { -1 31756 selectors: ['form[aria-label]', 'form[aria-labelledby]', 'form[title]'], -1 31757 }, -1 31758 grid: { -1 31759 childRoles: ['treegrid'], -1 31760 }, -1 31761 gridcell: { -1 31762 childRoles: ['columnheader', 'rowheader'], -1 31763 nameFromContents: true, -1 31764 }, -1 31765 group: { -1 31766 selectors: ['details', 'optgroup'], -1 31767 childRoles: ['row', 'select', 'toolbar', 'graphics-object'], -1 31768 }, -1 31769 heading: { -1 31770 selectors: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'], -1 31771 nameFromContents: true, -1 31772 defaults: { -1 31773 'level': 2, -1 31774 }, -1 31775 }, -1 31776 img: { -1 31777 selectors: ['img:not([alt=""])', 'graphics-symbol'], -1 31778 childRoles: ['doc-cover'], -1 31779 }, -1 31780 input: { -1 31781 childRoles: ['checkbox', 'option', 'radio', 'slider', 'spinbutton', 'textbox'], -1 31782 }, -1 31783 landmark: { -1 31784 childRoles: [ -1 31785 'banner', -1 31786 'complementary', -1 31787 'contentinfo', -1 31788 'doc-acknowledgments', -1 31789 'doc-afterword', -1 31790 'doc-appendix', -1 31791 'doc-bibliography', -1 31792 'doc-chapter', -1 31793 'doc-conclusion', -1 31794 'doc-credits', -1 31795 'doc-endnotes', -1 31796 'doc-epilogue', -1 31797 'doc-errata', -1 31798 'doc-foreword', -1 31799 'doc-glossary', -1 31800 'doc-introduction', -1 31801 'doc-part', -1 31802 'doc-preface', -1 31803 'doc-prologue', -1 31804 'form', -1 31805 'main', -1 31806 'navigation', -1 31807 'region', -1 31808 'search', -1 31809 ], -1 31810 }, -1 31811 link: { -1 31812 selectors: ['a[href]', 'area[href]', 'link[href]'], -1 31813 childRoles: ['doc-backlink', 'doc-biblioref', 'doc-glossref', 'doc-noteref'], -1 31814 nameFromContents: true, -1 31815 }, -1 31816 list: { -1 31817 selectors: ['dl', 'ol', 'ul'], -1 31818 childRoles: ['directory', 'feed'], -1 31819 }, -1 31820 listbox: { -1 31821 selectors: [ -1 31822 'select[multiple]', -1 31823 'select[size]:not([size="0"]):not([size="1"])', -1 31824 ], -1 31825 defaults: { -1 31826 'orientation': 'vertical', -1 31827 }, -1 31828 }, -1 31829 listitem: { -1 31830 selectors: ['dt', 'ul > li', 'ol > li'], -1 31831 childRoles: ['doc-biblioentry', 'doc-endnote', 'treeitem'], -1 31832 }, -1 31833 log: { -1 31834 defaults: { -1 31835 'live': 'polite', -1 31836 }, -1 31837 }, -1 31838 main: { -1 31839 selectors: ['main'], -1 31840 }, -1 31841 math: { -1 31842 selectors: ['math'], -1 31843 }, -1 31844 menu: { -1 31845 selectors: ['menu[type="context"]'], -1 31846 childRoles: ['menubar'], -1 31847 defaults: { -1 31848 'orientation': 'vertical', -1 31849 }, -1 31850 }, -1 31851 menubar: { -1 31852 defaults: { -1 31853 'orientation': 'horizontal', -1 31854 }, -1 31855 }, -1 31856 menuitem: { -1 31857 selectors: ['menuitem[type="command"]'], -1 31858 childRoles: ['menuitemcheckbox'], -1 31859 nameFromContents: true, -1 31860 }, -1 31861 menuitemcheckbox: { -1 31862 selectors: ['menuitem[type="checkbox"]'], -1 31863 childRoles: ['menuitemradio'], -1 31864 nameFromContents: true, -1 31865 defaults: { -1 31866 'checked': 'false', -1 31867 }, -1 31868 }, -1 31869 menuitemradio: { -1 31870 selectors: ['menuitem[type="radio"]'], -1 31871 nameFromContents: true, -1 31872 defaults: { -1 31873 'checked': 'false', -1 31874 }, -1 31875 }, -1 31876 navigation: { -1 31877 selectors: ['nav'], -1 31878 childRoles: ['doc-index', 'doc-pagelist', 'doc-toc'], -1 31879 }, -1 31880 note: { -1 31881 childRoles: ['doc-notice', 'doc-tip'], -1 31882 }, -1 31883 option: { -1 31884 selectors: ['option'], -1 31885 childRoles: ['treeitem'], -1 31886 nameFromContents: true, -1 31887 defaults: { -1 31888 'selected': 'false', -1 31889 }, -1 31890 }, -1 31891 progressbar: { -1 31892 selectors: ['progress'], -1 31893 }, -1 31894 radio: { -1 31895 selectors: ['input[type="radio"]'], -1 31896 childRoles: ['menuitemradio'], -1 31897 nameFromContents: true, -1 31898 defaults: { -1 31899 'checked': 'false', -1 31900 }, -1 31901 }, -1 31902 range: { -1 31903 childRoles: ['progressbar', 'scrollbar', 'slider', 'spinbutton'], -1 31904 }, -1 31905 region: { -1 31906 selectors: ['section[aria-label]', 'section[aria-labelledby]', 'section[title]'], -1 31907 }, -1 31908 roletype: { -1 31909 childRoles: ['structure', 'widget', 'window'], -1 31910 }, -1 31911 row: { -1 31912 selectors: ['tr'], -1 31913 nameFromContents: true, -1 31914 }, -1 31915 rowheader: { -1 31916 selectors: ['th[scope="row"]'], -1 31917 nameFromContents: true, -1 31918 }, -1 31919 rowgroup: { -1 31920 selectors: ['tbody', 'thead', 'tfoot'], -1 31921 nameFromContents: true, -1 31922 }, -1 31923 scrollbar: { -1 31924 defaults: { -1 31925 'orientation': 'vertical', -1 31926 'valuemin': 0, -1 31927 'valuemax': 100, -1 31928 // FIXME: halfway between actual valuemin and valuemax -1 31929 'valuenow': 50, -1 31930 }, -1 31931 }, -1 31932 searchbox: { -1 31933 selectors: ['input[type="search"]:not([list])'], -1 31934 }, -1 31935 section: { -1 31936 childRoles: [ -1 31937 'alert', -1 31938 'cell', -1 31939 'definition', -1 31940 'doc-abstract', -1 31941 'doc-colophon', -1 31942 'doc-credit', -1 31943 'doc-dedication', -1 31944 'doc-epigraph', -1 31945 'doc-example', -1 31946 'doc-footnote', -1 31947 'doc-qna', -1 31948 'figure', -1 31949 'group', -1 31950 'img', -1 31951 'landmark', -1 31952 'list', -1 31953 'listitem', -1 31954 'log', -1 31955 'marquee', -1 31956 'math', -1 31957 'note', -1 31958 'status', -1 31959 'table', -1 31960 'tabpanel', -1 31961 'term', -1 31962 'tooltip', -1 31963 ], -1 31964 }, -1 31965 sectionhead: { -1 31966 childRoles: [ -1 31967 'columnheader', -1 31968 'doc-subtitle', -1 31969 'heading', -1 31970 'rowheader', -1 31971 'tab', -1 31972 ], -1 31973 nameFromContents: true, -1 31974 }, -1 31975 select: { -1 31976 childRoles: ['combobox', 'listbox', 'menu', 'radiogroup', 'tree'], -1 31977 }, -1 31978 separator: { -1 31979 selectors: ['hr'], -1 31980 childRoles: ['doc-pagebreak'], -1 31981 defaults: { -1 31982 'orientation': 'horizontal', -1 31983 'valuemin': 0, -1 31984 'valuemax': 100, -1 31985 'valuenow': 50, -1 31986 }, -1 31987 }, -1 31988 slider: { -1 31989 selectors: ['input[type="range"]'], -1 31990 defaults: { -1 31991 'orientation': 'horizontal', -1 31992 'valuemin': 0, -1 31993 'valuemax': 100, -1 31994 // FIXME: halfway between actual valuemin and valuemax -1 31995 'valuenow': 50, -1 31996 }, -1 31997 }, -1 31998 spinbutton: { -1 31999 selectors: ['input[type="number"]'], -1 32000 defaults: { -1 32001 // FIXME: no valuemin/valuemax -1 32002 'valuenow': 0, -1 32003 }, -1 32004 }, -1 32005 status: { -1 32006 selectors: ['output'], -1 32007 childRoles: ['timer'], -1 32008 defaults: { -1 32009 'live': 'polite', -1 32010 'atomic': true, -1 32011 }, -1 32012 }, -1 32013 switch: { -1 32014 nameFromContents: true, -1 32015 defaults: { -1 32016 'checked': false, -1 32017 }, -1 32018 }, -1 32019 structure: { -1 32020 childRoles: [ -1 32021 'application', -1 32022 'document', -1 32023 'none', -1 32024 'presentation', -1 32025 'rowgroup', -1 32026 'section', -1 32027 'sectionhead', -1 32028 'separator', -1 32029 ], -1 32030 }, -1 32031 tab: { -1 32032 nameFromContents: true, -1 32033 defaults: { -1 32034 'selected': false, -1 32035 }, -1 32036 }, -1 32037 table: { -1 32038 selectors: ['table'], -1 32039 childRoles: ['grid'], -1 32040 }, -1 32041 tablist: { -1 32042 defaults: { -1 32043 'orientation': 'horizontal', -1 32044 }, -1 32045 }, -1 32046 term: { -1 32047 selectors: ['dfn', 'dt'], -1 32048 }, -1 32049 textbox: { -1 32050 selectors: [ -1 32051 'input:not([type]):not([list])', -1 32052 'input[type="email"]:not([list])', -1 32053 'input[type="tel"]:not([list])', -1 32054 'input[type="text"]:not([list])', -1 32055 'input[type="url"]:not([list])', -1 32056 'textarea', -1 32057 ], -1 32058 childRoles: ['searchbox'], -1 32059 }, -1 32060 toolbar: { -1 32061 defaults: { -1 32062 'orientation': 'horizontal', -1 32063 }, -1 32064 }, -1 32065 tooltip: { -1 32066 nameFromContents: true, -1 32067 }, -1 32068 tree: { -1 32069 childRoles: ['treegrid'], -1 32070 defaults: { -1 32071 'orientation': 'vertical', -1 32072 }, -1 32073 }, -1 32074 treeitem: { -1 32075 nameFromContents: true, -1 32076 }, -1 32077 widget: { -1 32078 childRoles: [ -1 32079 'command', -1 32080 'composite', -1 32081 'gridcell', -1 32082 'input', -1 32083 'range', -1 32084 'row', -1 32085 'separator', -1 32086 'tab', -1 32087 ], -1 32088 }, -1 32089 window: { -1 32090 childRoles: ['dialog'], -1 32091 }, -1 32092 }; -1 32093 -1 32094 exports.scoped = [ -1 32095 'main *', -1 32096 // https://www.w3.org/TR/html/dom.html#sectioning-content-2 -1 32097 'article *', 'aside *', 'nav *', 'section *', -1 32098 // https://www.w3.org/TR/html/sections.html#sectioning-roots -1 32099 'blockquote *', 'details *', 'dialog *', 'fieldset *', 'figure *', 'td *', -1 32100 ].join(','); -1 32101 -1 32102 var getSubRoles = function(role) { -1 32103 var children = (exports.roles[role] || {}).childRoles || []; -1 32104 var descendents = children.map(getSubRoles); -1 32105 -1 32106 var result = [role]; -1 32107 -1 32108 descendents.forEach(function(list) { -1 32109 list.forEach(function(r) { -1 32110 if (!result.includes(r)) { -1 32111 result.push(r); -1 32112 } -1 32113 }); -1 32114 }); -1 32115 -1 32116 return result; -1 32117 }; -1 32118 -1 32119 exports.attrsWithDefaults = []; -1 32120 -1 32121 for (var role in exports.roles) { -1 32122 exports.roles[role].subRoles = getSubRoles(role); -1 32123 for (var key in exports.roles[role].defaults) { -1 32124 if (!exports.attrsWithDefaults.includes(key)) { -1 32125 exports.attrsWithDefaults.push(key); -1 32126 } -1 32127 } -1 32128 } -1 32129 exports.roles['none'] = exports.roles['none'] || {}; -1 32130 exports.roles['none'].subRoles = ['none', 'presentation']; -1 32131 exports.roles['presentation'] = exports.roles['presentation'] || {}; -1 32132 exports.roles['presentation'].subRoles = ['presentation', 'none']; -1 32133 -1 32134 exports.nameFromDescendant = { -1 32135 'figure': 'figcaption', -1 32136 'table': 'caption', -1 32137 'fieldset': 'legend', -1 32138 }; 11042 3213911043 -1 case '':11044 -1 return role === 'presentation' || role === 'none';-1 32140 exports.nameDefaults = { -1 32141 'input[type="submit"]': 'Submit', -1 32142 'input[type="reset"]': 'Reset', -1 32143 'summary': 'Details', -1 32144 }; 11045 3214511046 -1 default:11047 -1 return role !== 'presentation' && role !== 'none';11048 -1 }11049 -1 },11050 -1 INPUT: function INPUT(_ref28) {11051 -1 var node = _ref28.node, role = _ref28.role, out = _ref28.out;11052 -1 switch (node.type) {11053 -1 case 'button':11054 -1 case 'image':11055 -1 return out;-1 32146 exports.labelable = [ -1 32147 'button', -1 32148 'input:not([type="hidden"])', -1 32149 'keygen', -1 32150 'meter', -1 32151 'output', -1 32152 'progress', -1 32153 'select', -1 32154 'textarea', -1 32155 ]; 11056 3215611057 -1 case 'checkbox':11058 -1 if (role === 'button' && node.hasAttribute('aria-pressed')) {11059 -1 return true;11060 -1 }11061 -1 return out;-1 32157 },{}],198:[function(require,module,exports){ -1 32158 var constants = require('./constants.js'); -1 32159 var atree = require('./atree.js'); -1 32160 var query = require('./query.js'); -1 32161 -1 32162 var getPseudoContent = function(node, selector) { -1 32163 var styles = window.getComputedStyle(node, selector); -1 32164 var ret = styles.getPropertyValue('content'); -1 32165 var inline = styles.display.substr(0, 6) === 'inline'; -1 32166 if (!ret) { -1 32167 return ''; -1 32168 } -1 32169 if (ret.substr(0, 1) !== '"') { -1 32170 return ''; -1 32171 } else { -1 32172 if (inline) { -1 32173 return ret.slice(1, -1); -1 32174 } else { -1 32175 return ' ' + ret.slice(1, -1) + ' '; -1 32176 } -1 32177 } -1 32178 }; -1 32179 -1 32180 var getContent = function(root, visited) { -1 32181 var children = atree.getChildNodes(root); -1 32182 -1 32183 var ret = ''; -1 32184 for (var i = 0; i < children.length; i++) { -1 32185 var node = children[i]; -1 32186 if (node.nodeType === node.TEXT_NODE) { -1 32187 ret += node.textContent; -1 32188 } else if (node.nodeType === node.ELEMENT_NODE) { -1 32189 if (node.tagName.toLowerCase() === 'br') { -1 32190 ret += '\n'; -1 32191 } else if (window.getComputedStyle(node).display.substr(0, 6) === 'inline' && -1 32192 node.tagName.toLowerCase() !== 'input' && -1 32193 node.tagName.toLowerCase() !== 'img') { // https://github.com/w3c/accname/issues/3 -1 32194 ret += getName(node, true, visited); -1 32195 } else { -1 32196 ret += ' ' + getName(node, true, visited) + ' '; -1 32197 } -1 32198 } -1 32199 } -1 32200 -1 32201 return ret; -1 32202 }; -1 32203 -1 32204 var allowNameFromContent = function(el) { -1 32205 var role = query.getRole(el); -1 32206 return (constants.roles[role] || {}).nameFromContents; -1 32207 }; -1 32208 -1 32209 var isLabelable = function(el) { -1 32210 var selector = constants.labelable.join(','); -1 32211 return el.matches(selector); -1 32212 }; -1 32213 -1 32214 var isInLabelForOtherWidget = function(el) { -1 32215 var label = el.parentElement.closest('label'); -1 32216 return label && !Array.prototype.includes.call(el.labels, label); -1 32217 }; -1 32218 -1 32219 var getName = function(el, recursive, visited, directReference) { -1 32220 var ret = ''; -1 32221 -1 32222 visited = visited || []; -1 32223 if (visited.includes(el)) { -1 32224 if (!directReference) { -1 32225 return ''; -1 32226 } -1 32227 } else { -1 32228 visited.push(el); -1 32229 } -1 32230 -1 32231 // A -1 32232 // handled in atree -1 32233 -1 32234 // B -1 32235 if (!recursive && el.matches('[aria-labelledby]')) { -1 32236 var ids = el.getAttribute('aria-labelledby').split(/\s+/); -1 32237 var strings = ids.map(function(id) { -1 32238 var label = document.getElementById(id); -1 32239 return label ? getName(label, true, visited, true) : ''; -1 32240 }); -1 32241 ret = strings.join(' '); -1 32242 } -1 32243 -1 32244 // C -1 32245 if (!ret.trim() && el.matches('[aria-label]')) { -1 32246 // FIXME: may skip to 2E -1 32247 ret = el.getAttribute('aria-label'); -1 32248 } -1 32249 -1 32250 // D -1 32251 if (!ret.trim() && !recursive && isLabelable(el)) { -1 32252 var strings = Array.prototype.map.call(el.labels, function(label) { -1 32253 return getName(label, true, visited); -1 32254 }); -1 32255 ret = strings.join(' '); -1 32256 } -1 32257 if (!ret.trim()) { -1 32258 ret = el.placeholder || ''; -1 32259 } -1 32260 if (!ret.trim()) { -1 32261 ret = el.alt || ''; -1 32262 } -1 32263 if (!ret.trim() && el.matches('abbr,acronym') && el.title) { -1 32264 ret = el.title; -1 32265 } -1 32266 if (!ret.trim()) { -1 32267 for (var selector in constants.nameFromDescendant) { -1 32268 if (el.matches(selector)) { -1 32269 var descendant = el.querySelector(constants.nameFromDescendant[selector]); -1 32270 if (descendant) { -1 32271 ret = getName(descendant, true, visited); -1 32272 } -1 32273 } -1 32274 } -1 32275 } -1 32276 -1 32277 // E -1 32278 if (!ret.trim() && (recursive || isInLabelForOtherWidget(el) || query.matches(el, 'button'))) { -1 32279 if (query.matches(el, 'textbox,button,combobox,listbox,range')) { -1 32280 if (query.matches(el, 'textbox,button')) { -1 32281 ret = el.value || el.textContent; -1 32282 } else if (query.matches(el, 'combobox,listbox')) { -1 32283 var selected = query.querySelector(el, ':selected') || query.querySelector(el, 'option'); -1 32284 if (selected) { -1 32285 ret = getName(selected, recursive, visited); -1 32286 } else { -1 32287 ret = el.value || ''; -1 32288 } -1 32289 } else if (query.matches(el, 'range')) { -1 32290 ret = '' + (query.getAttribute(el, 'valuetext') || query.getAttribute(el, 'valuenow') || el.value); -1 32291 } -1 32292 } -1 32293 } -1 32294 -1 32295 // F -1 32296 // FIXME: menu is not mentioned in the spec -1 32297 if (!ret.trim() && (recursive || allowNameFromContent(el) || el.closest('label')) && !query.matches(el, 'menu')) { -1 32298 ret = getContent(el, visited); -1 32299 } -1 32300 -1 32301 if (!ret.trim()) { -1 32302 for (var selector in constants.nameDefaults) { -1 32303 if (el.matches(selector)) { -1 32304 ret = constants.nameDefaults[selector]; -1 32305 } -1 32306 } -1 32307 } -1 32308 -1 32309 // G/H -1 32310 // handled in getContent -1 32311 -1 32312 // I -1 32313 // FIXME: presentation not mentioned in the spec -1 32314 if (!ret.trim() && !query.matches(el, 'presentation')) { -1 32315 ret = el.title || ''; -1 32316 } -1 32317 -1 32318 var before = getPseudoContent(el, ':before'); -1 32319 var after = getPseudoContent(el, ':after'); -1 32320 return before + ret + after; -1 32321 }; -1 32322 -1 32323 var getNameTrimmed = function(el) { -1 32324 return getName(el).replace(/\s+/g, ' ').trim(); -1 32325 }; 11062 3232611063 -1 case 'radio':11064 -1 return role === 'menuitemradio';-1 32327 var getDescription = function(el) { -1 32328 var ret = ''; -1 32329 -1 32330 if (el.matches('[aria-describedby]')) { -1 32331 var ids = el.getAttribute('aria-describedby').split(/\s+/); -1 32332 var strings = ids.map(function(id) { -1 32333 var label = document.getElementById(id); -1 32334 return label ? getName(label, true) : ''; -1 32335 }); -1 32336 ret = strings.join(' '); -1 32337 } else if (el.title) { -1 32338 ret = el.title; -1 32339 } else if (el.placeholder) { -1 32340 ret = el.placeholder; -1 32341 } -1 32342 -1 32343 ret = (ret || '').trim().replace(/\s+/g, ' '); -1 32344 -1 32345 if (ret === getNameTrimmed(el)) { -1 32346 ret = ''; -1 32347 } -1 32348 -1 32349 return ret; -1 32350 }; -1 32351 -1 32352 module.exports = { -1 32353 getName: getNameTrimmed, -1 32354 getDescription: getDescription, -1 32355 }; -1 32356 -1 32357 },{"./atree.js":195,"./constants.js":197,"./query.js":199}],199:[function(require,module,exports){ -1 32358 var attrs = require('./attrs.js'); -1 32359 var atree = require('./atree.js'); 11065 3236011066 -1 case 'text':11067 -1 return role === 'combobox' || role === 'searchbox' || role === 'spinbutton';11068 3236111069 -1 case 'tel':11070 -1 return role === 'combobox' || role === 'spinbutton';-1 32362 var matches = function(el, selector) { -1 32363 var actual; -1 32364 -1 32365 if (selector.substr(0, 1) === ':') { -1 32366 var attr = selector.substr(1); -1 32367 return attrs.getAttribute(el, attr); -1 32368 } else if (selector.substr(0, 1) === '[') { -1 32369 var match = /\[([a-z]+)="(.*)"\]/.exec(selector); -1 32370 actual = attrs.getAttribute(el, match[1]); -1 32371 var rawValue = match[2]; -1 32372 return actual.toString() === rawValue; -1 32373 } else { -1 32374 return attrs.hasRole(el, selector.split(',')); -1 32375 } -1 32376 }; -1 32377 -1 32378 var _querySelector = function(all) { -1 32379 return function(root, role) { -1 32380 var results = []; -1 32381 try { -1 32382 atree.walk(root, function(node) { -1 32383 if (node.nodeType === node.ELEMENT_NODE) { -1 32384 // FIXME: skip hidden elements -1 32385 if (matches(node, role)) { -1 32386 results.push(node); -1 32387 if (!all) { -1 32388 throw 'StopIteration'; -1 32389 } -1 32390 } -1 32391 } -1 32392 }); -1 32393 } catch (e) { -1 32394 if (e !== 'StopIteration') { -1 32395 throw e; -1 32396 } -1 32397 } -1 32398 return all ? results : results[0]; -1 32399 }; -1 32400 }; -1 32401 -1 32402 var closest = function(el, selector) { -1 32403 return atree.searchUp(el, function(candidate) { -1 32404 if (candidate.nodeType === candidate.ELEMENT_NODE) { -1 32405 return matches(candidate, selector); -1 32406 } -1 32407 }); -1 32408 }; 11071 3240911072 -1 case 'url':11073 -1 case 'search':11074 -1 case 'email':11075 -1 return role === 'combobox';-1 32410 module.exports = { -1 32411 getRole: function(el) { -1 32412 return attrs.getRole(el); -1 32413 }, -1 32414 getAttribute: attrs.getAttribute, -1 32415 matches: matches, -1 32416 querySelector: _querySelector(), -1 32417 querySelectorAll: _querySelector(true), -1 32418 closest: closest, -1 32419 }; 11076 3242011077 -1 default:11078 -1 return false;11079 -1 }11080 -1 },11081 -1 LI: function LI(_ref29) {11082 -1 var node = _ref29.node, out = _ref29.out;11083 -1 var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');11084 -1 if (hasImplicitListitemRole) {11085 -1 return out;11086 -1 }11087 -1 return true;11088 -1 },11089 -1 MENU: function MENU(_ref30) {11090 -1 var node = _ref30.node;11091 -1 if (node.getAttribute('type') === 'context') {11092 -1 return false;11093 -1 }11094 -1 return true;11095 -1 },11096 -1 OPTION: function OPTION(_ref31) {11097 -1 var node = _ref31.node;11098 -1 var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');11099 -1 return !withinOptionList;11100 -1 },11101 -1 SELECT: function SELECT(_ref32) {11102 -1 var node = _ref32.node, role = _ref32.role;11103 -1 return !node.multiple && node.size <= 1 && role === 'menu';11104 -1 },11105 -1 SVG: function SVG(_ref33) {11106 -1 var node = _ref33.node, out = _ref33.out;11107 -1 if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {11108 -1 return true;11109 -1 }11110 -1 return out;11111 -1 }-1 32421 },{"./atree.js":195,"./attrs.js":196}],200:[function(require,module,exports){ -1 32422 (function (process,setImmediate){(function (){ -1 32423 /*! axe v4.2.3 -1 32424 * Copyright (c) 2021 Deque Systems, Inc. -1 32425 * -1 32426 * Your use of this Source Code Form is subject to the terms of the Mozilla Public -1 32427 * License, v. 2.0. If a copy of the MPL was not distributed with this -1 32428 * file, You can obtain one at http://mozilla.org/MPL/2.0/. -1 32429 * -1 32430 * This entire copyright notice must appear in every copy of this file you -1 32431 * distribute or in any file that contains substantial portions of this source -1 32432 * code. -1 32433 */ -1 32434 (function axeFunction(window) { -1 32435 var global = window; -1 32436 var document = window.document; -1 32437 'use strict'; -1 32438 function _typeof(obj) { -1 32439 '@babel/helpers - typeof'; -1 32440 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') { -1 32441 _typeof = function _typeof(obj) { -1 32442 return typeof obj; 11112 32443 };11113 -1 lookupTable.rolesOfType = {11114 -1 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' ]-1 32444 } else { -1 32445 _typeof = function _typeof(obj) { -1 32446 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj; 11115 32447 };11116 -1 __webpack_exports__['default'] = lookupTable;11117 -1 },11118 -1 './lib/commons/aria/named-from-contents.js': function libCommonsAriaNamedFromContentsJs(module, __webpack_exports__, __webpack_require__) {11119 -1 'use strict';11120 -1 __webpack_require__.r(__webpack_exports__);11121 -1 var _get_role__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/get-role.js');11122 -1 var _standards__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/standards/index.js');11123 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');11124 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');11125 -1 function namedFromContents(vNode) {11126 -1 var _ref34 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref34.strict;11127 -1 vNode = vNode instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_3__['default'] ? vNode : Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getNodeFromTree'])(vNode);11128 -1 if (vNode.props.nodeType !== 1) {11129 -1 return false;11130 -1 }11131 -1 var role = Object(_get_role__WEBPACK_IMPORTED_MODULE_0__['default'])(vNode);11132 -1 var roleDef = _standards__WEBPACK_IMPORTED_MODULE_1__['default'].ariaRoles[role];11133 -1 if (roleDef && roleDef.nameFromContent) {11134 -1 return true;-1 32448 } -1 32449 return _typeof(obj); -1 32450 } -1 32451 var axe = axe || {}; -1 32452 axe.version = '4.2.3'; -1 32453 if (typeof define === 'function' && define.amd) { -1 32454 define('axe-core', [], function() { -1 32455 return axe; -1 32456 }); -1 32457 } -1 32458 if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object' && module.exports && typeof axeFunction.toString === 'function') { -1 32459 axe.source = '(' + axeFunction.toString() + ')(typeof window === "object" ? window : this);'; -1 32460 module.exports = axe; -1 32461 } -1 32462 if (typeof window.getComputedStyle === 'function') { -1 32463 window.axe = axe; -1 32464 } -1 32465 var commons; -1 32466 function SupportError(error) { -1 32467 this.name = 'SupportError'; -1 32468 this.cause = error.cause; -1 32469 this.message = '`'.concat(error.cause, '` - feature unsupported in your environment.'); -1 32470 if (error.ruleId) { -1 32471 this.ruleId = error.ruleId; -1 32472 this.message += ' Skipping '.concat(this.ruleId, ' rule.'); -1 32473 } -1 32474 this.stack = new Error().stack; -1 32475 } -1 32476 SupportError.prototype = Object.create(Error.prototype); -1 32477 SupportError.prototype.constructor = SupportError; -1 32478 'use strict'; -1 32479 var _excluded = [ 'variant' ], _excluded2 = [ 'matches' ], _excluded3 = [ 'chromium' ], _excluded4 = [ 'noImplicit' ], _excluded5 = [ 'noPresentational' ]; -1 32480 function _objectWithoutProperties(source, excluded) { -1 32481 if (source == null) { -1 32482 return {}; -1 32483 } -1 32484 var target = _objectWithoutPropertiesLoose(source, excluded); -1 32485 var key, i; -1 32486 if (Object.getOwnPropertySymbols) { -1 32487 var sourceSymbolKeys = Object.getOwnPropertySymbols(source); -1 32488 for (i = 0; i < sourceSymbolKeys.length; i++) { -1 32489 key = sourceSymbolKeys[i]; -1 32490 if (excluded.indexOf(key) >= 0) { -1 32491 continue; 11135 32492 }11136 -1 if (strict) {11137 -1 return false;-1 32493 if (!Object.prototype.propertyIsEnumerable.call(source, key)) { -1 32494 continue; 11138 32495 }11139 -1 return !roleDef || [ 'presentation', 'none' ].includes(role);-1 32496 target[key] = source[key]; 11140 32497 }11141 -1 __webpack_exports__['default'] = namedFromContents;11142 -1 },11143 -1 './lib/commons/aria/required-attr.js': function libCommonsAriaRequiredAttrJs(module, __webpack_exports__, __webpack_require__) {11144 -1 'use strict';11145 -1 __webpack_require__.r(__webpack_exports__);11146 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');11147 -1 function requiredAttr(role) {11148 -1 var roleDef = _standards__WEBPACK_IMPORTED_MODULE_0__['default'].ariaRoles[role];11149 -1 if (!roleDef || !Array.isArray(roleDef.requiredAttrs)) {11150 -1 return [];11151 -1 }11152 -1 return _toConsumableArray(roleDef.requiredAttrs);-1 32498 } -1 32499 return target; -1 32500 } -1 32501 function _objectWithoutPropertiesLoose(source, excluded) { -1 32502 if (source == null) { -1 32503 return {}; -1 32504 } -1 32505 var target = {}; -1 32506 var sourceKeys = Object.keys(source); -1 32507 var key, i; -1 32508 for (i = 0; i < sourceKeys.length; i++) { -1 32509 key = sourceKeys[i]; -1 32510 if (excluded.indexOf(key) >= 0) { -1 32511 continue; 11153 32512 }11154 -1 __webpack_exports__['default'] = requiredAttr;11155 -1 },11156 -1 './lib/commons/aria/required-context.js': function libCommonsAriaRequiredContextJs(module, __webpack_exports__, __webpack_require__) {11157 -1 'use strict';11158 -1 __webpack_require__.r(__webpack_exports__);11159 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');11160 -1 function requiredContext(role) {11161 -1 var roleDef = _standards__WEBPACK_IMPORTED_MODULE_0__['default'].ariaRoles[role];11162 -1 if (!roleDef || !Array.isArray(roleDef.requiredContext)) {11163 -1 return null;11164 -1 }11165 -1 return _toConsumableArray(roleDef.requiredContext);-1 32513 target[key] = source[key]; -1 32514 } -1 32515 return target; -1 32516 } -1 32517 function _defineProperty(obj, key, value) { -1 32518 if (key in obj) { -1 32519 Object.defineProperty(obj, key, { -1 32520 value: value, -1 32521 enumerable: true, -1 32522 configurable: true, -1 32523 writable: true -1 32524 }); -1 32525 } else { -1 32526 obj[key] = value; -1 32527 } -1 32528 return obj; -1 32529 } -1 32530 function _inherits(subClass, superClass) { -1 32531 if (typeof superClass !== 'function' && superClass !== null) { -1 32532 throw new TypeError('Super expression must either be null or a function'); -1 32533 } -1 32534 subClass.prototype = Object.create(superClass && superClass.prototype, { -1 32535 constructor: { -1 32536 value: subClass, -1 32537 writable: true, -1 32538 configurable: true 11166 32539 }11167 -1 __webpack_exports__['default'] = requiredContext;11168 -1 },11169 -1 './lib/commons/aria/required-owned.js': function libCommonsAriaRequiredOwnedJs(module, __webpack_exports__, __webpack_require__) {11170 -1 'use strict';11171 -1 __webpack_require__.r(__webpack_exports__);11172 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');11173 -1 function requiredOwned(role) {11174 -1 var roleDef = _standards__WEBPACK_IMPORTED_MODULE_0__['default'].ariaRoles[role];11175 -1 if (!roleDef || !Array.isArray(roleDef.requiredOwned)) {11176 -1 return null;11177 -1 }11178 -1 return _toConsumableArray(roleDef.requiredOwned);-1 32540 }); -1 32541 if (superClass) { -1 32542 _setPrototypeOf(subClass, superClass); -1 32543 } -1 32544 } -1 32545 function _setPrototypeOf(o, p) { -1 32546 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { -1 32547 o.__proto__ = p; -1 32548 return o; -1 32549 }; -1 32550 return _setPrototypeOf(o, p); -1 32551 } -1 32552 function _createSuper(Derived) { -1 32553 var hasNativeReflectConstruct = _isNativeReflectConstruct(); -1 32554 return function _createSuperInternal() { -1 32555 var Super = _getPrototypeOf(Derived), result; -1 32556 if (hasNativeReflectConstruct) { -1 32557 var NewTarget = _getPrototypeOf(this).constructor; -1 32558 result = Reflect.construct(Super, arguments, NewTarget); -1 32559 } else { -1 32560 result = Super.apply(this, arguments); 11179 32561 }11180 -1 __webpack_exports__['default'] = requiredOwned;11181 -1 },11182 -1 './lib/commons/aria/validate-attr-value.js': function libCommonsAriaValidateAttrValueJs(module, __webpack_exports__, __webpack_require__) {11183 -1 'use strict';11184 -1 __webpack_require__.r(__webpack_exports__);11185 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');11186 -1 var _dom_get_root_node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/get-root-node.js');11187 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');11188 -1 function validateAttrValue(node, attr) {11189 -1 'use strict';11190 -1 var matches;11191 -1 var list;11192 -1 var value = node.getAttribute(attr);11193 -1 var attrInfo = _standards__WEBPACK_IMPORTED_MODULE_0__['default'].ariaAttrs[attr];11194 -1 var doc = Object(_dom_get_root_node__WEBPACK_IMPORTED_MODULE_1__['default'])(node);11195 -1 if (!attrInfo) {11196 -1 return true;11197 -1 }11198 -1 if (attrInfo.allowEmpty && (!value || value.trim() === '')) {11199 -1 return true;11200 -1 }11201 -1 switch (attrInfo.type) {11202 -1 case 'boolean':11203 -1 return [ 'true', 'false' ].includes(value.toLowerCase());11204 -111205 -1 case 'nmtoken':11206 -1 return typeof value === 'string' && attrInfo.values.includes(value.toLowerCase());11207 -111208 -1 case 'nmtokens':11209 -1 list = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['tokenList'])(value);11210 -1 return list.reduce(function(result, token) {11211 -1 return result && attrInfo.values.includes(token);11212 -1 }, list.length !== 0);11213 -111214 -1 case 'idref':11215 -1 return !!(value && doc.getElementById(value));11216 -111217 -1 case 'idrefs':11218 -1 list = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['tokenList'])(value);11219 -1 return list.some(function(token) {11220 -1 return doc.getElementById(token);11221 -1 });11222 -111223 -1 case 'string':11224 -1 return value.trim() !== '';11225 -111226 -1 case 'decimal':11227 -1 matches = value.match(/^[-+]?([0-9]*)\.?([0-9]*)$/);11228 -1 return !!(matches && (matches[1] || matches[2]));11229 -111230 -1 case 'int':11231 -1 return /^[-+]?[0-9]+$/.test(value);-1 32562 return _possibleConstructorReturn(this, result); -1 32563 }; -1 32564 } -1 32565 function _possibleConstructorReturn(self, call) { -1 32566 if (call && (_typeof(call) === 'object' || typeof call === 'function')) { -1 32567 return call; -1 32568 } -1 32569 return _assertThisInitialized(self); -1 32570 } -1 32571 function _assertThisInitialized(self) { -1 32572 if (self === void 0) { -1 32573 throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called'); -1 32574 } -1 32575 return self; -1 32576 } -1 32577 function _isNativeReflectConstruct() { -1 32578 if (typeof Reflect === 'undefined' || !Reflect.construct) { -1 32579 return false; -1 32580 } -1 32581 if (Reflect.construct.sham) { -1 32582 return false; -1 32583 } -1 32584 if (typeof Proxy === 'function') { -1 32585 return true; -1 32586 } -1 32587 try { -1 32588 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); -1 32589 return true; -1 32590 } catch (e) { -1 32591 return false; -1 32592 } -1 32593 } -1 32594 function _getPrototypeOf(o) { -1 32595 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { -1 32596 return o.__proto__ || Object.getPrototypeOf(o); -1 32597 }; -1 32598 return _getPrototypeOf(o); -1 32599 } -1 32600 function _toConsumableArray(arr) { -1 32601 return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); -1 32602 } -1 32603 function _nonIterableSpread() { -1 32604 throw new TypeError('Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); -1 32605 } -1 32606 function _iterableToArray(iter) { -1 32607 if (typeof Symbol !== 'undefined' && iter[Symbol.iterator] != null || iter['@@iterator'] != null) { -1 32608 return Array.from(iter); -1 32609 } -1 32610 } -1 32611 function _arrayWithoutHoles(arr) { -1 32612 if (Array.isArray(arr)) { -1 32613 return _arrayLikeToArray(arr); -1 32614 } -1 32615 } -1 32616 function _slicedToArray(arr, i) { -1 32617 return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); -1 32618 } -1 32619 function _nonIterableRest() { -1 32620 throw new TypeError('Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); -1 32621 } -1 32622 function _iterableToArrayLimit(arr, i) { -1 32623 var _i = arr == null ? null : typeof Symbol !== 'undefined' && arr[Symbol.iterator] || arr['@@iterator']; -1 32624 if (_i == null) { -1 32625 return; -1 32626 } -1 32627 var _arr = []; -1 32628 var _n = true; -1 32629 var _d = false; -1 32630 var _s, _e; -1 32631 try { -1 32632 for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { -1 32633 _arr.push(_s.value); -1 32634 if (i && _arr.length === i) { -1 32635 break; 11232 32636 } 11233 32637 }11234 -1 __webpack_exports__['default'] = validateAttrValue;11235 -1 },11236 -1 './lib/commons/aria/validate-attr.js': function libCommonsAriaValidateAttrJs(module, __webpack_exports__, __webpack_require__) {11237 -1 'use strict';11238 -1 __webpack_require__.r(__webpack_exports__);11239 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');11240 -1 function validateAttr(att) {11241 -1 var attrDefinition = _standards__WEBPACK_IMPORTED_MODULE_0__['default'].ariaAttrs[att];11242 -1 return !!attrDefinition;11243 -1 }11244 -1 __webpack_exports__['default'] = validateAttr;11245 -1 },11246 -1 './lib/commons/color/center-point-of-rect.js': function libCommonsColorCenterPointOfRectJs(module, __webpack_exports__, __webpack_require__) {11247 -1 'use strict';11248 -1 __webpack_require__.r(__webpack_exports__);11249 -1 function centerPointOfRect(rect) {11250 -1 if (rect.left > window.innerWidth) {11251 -1 return undefined;-1 32638 } catch (err) { -1 32639 _d = true; -1 32640 _e = err; -1 32641 } finally { -1 32642 try { -1 32643 if (!_n && _i['return'] != null) { -1 32644 _i['return'](); 11252 32645 }11253 -1 if (rect.top > window.innerHeight) {11254 -1 return undefined;-1 32646 } finally { -1 32647 if (_d) { -1 32648 throw _e; 11255 32649 }11256 -1 var x = Math.min(Math.ceil(rect.left + rect.width / 2), window.innerWidth - 1);11257 -1 var y = Math.min(Math.ceil(rect.top + rect.height / 2), window.innerHeight - 1);11258 -1 return {11259 -1 x: x,11260 -1 y: y11261 -1 };11262 32650 }11263 -1 __webpack_exports__['default'] = centerPointOfRect;11264 -1 },11265 -1 './lib/commons/color/color.js': function libCommonsColorColorJs(module, __webpack_exports__, __webpack_require__) {11266 -1 'use strict';11267 -1 __webpack_require__.r(__webpack_exports__);11268 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');11269 -1 function convertColorVal(colorFunc, value, index) {11270 -1 if (/%$/.test(value)) {11271 -1 if (index === 3) {11272 -1 return parseFloat(value) / 100;11273 -1 }11274 -1 return parseFloat(value) * 255 / 100;11275 -1 }11276 -1 if (colorFunc[index] === 'h') {11277 -1 if (/turn$/.test(value)) {11278 -1 return parseFloat(value) * 360;11279 -1 }11280 -1 if (/rad$/.test(value)) {11281 -1 return parseFloat(value) * 57.3;11282 -1 }11283 -1 }11284 -1 return parseFloat(value);11285 -1 }11286 -1 function hslToRgb(_ref35) {11287 -1 var _ref36 = _slicedToArray(_ref35, 4), hue = _ref36[0], saturation = _ref36[1], lightness = _ref36[2], alpha = _ref36[3];11288 -1 saturation /= 255;11289 -1 lightness /= 255;11290 -1 var high = (1 - Math.abs(2 * lightness - 1)) * saturation;11291 -1 var low = high * (1 - Math.abs(hue / 60 % 2 - 1));11292 -1 var base = lightness - high / 2;11293 -1 var colors;11294 -1 if (hue < 60) {11295 -1 colors = [ high, low, 0 ];11296 -1 } else if (hue < 120) {11297 -1 colors = [ low, high, 0 ];11298 -1 } else if (hue < 180) {11299 -1 colors = [ 0, high, low ];11300 -1 } else if (hue < 240) {11301 -1 colors = [ 0, low, high ];11302 -1 } else if (hue < 300) {11303 -1 colors = [ low, 0, high ];11304 -1 } else {11305 -1 colors = [ high, 0, low ];11306 -1 }11307 -1 return colors.map(function(color) {11308 -1 return Math.round((color + base) * 255);11309 -1 }).concat(alpha);11310 -1 }11311 -1 function Color(red, green, blue, alpha) {11312 -1 this.red = red;11313 -1 this.green = green;11314 -1 this.blue = blue;11315 -1 this.alpha = alpha;11316 -1 this.toHexString = function() {11317 -1 var redString = Math.round(this.red).toString(16);11318 -1 var greenString = Math.round(this.green).toString(16);11319 -1 var blueString = Math.round(this.blue).toString(16);11320 -1 return '#' + (this.red > 15.5 ? redString : '0' + redString) + (this.green > 15.5 ? greenString : '0' + greenString) + (this.blue > 15.5 ? blueString : '0' + blueString);11321 -1 };11322 -1 var hexRegex = /^#[0-9a-f]{3,8}$/i;11323 -1 var colorFnRegex = /^((?:rgb|hsl)a?)\s*\(([^\)]*)\)/i;11324 -1 this.parseString = function(colorString) {11325 -1 if (_standards__WEBPACK_IMPORTED_MODULE_0__['default'].cssColors[colorString] || colorString === 'transparent') {11326 -1 var _ref37 = _standards__WEBPACK_IMPORTED_MODULE_0__['default'].cssColors[colorString] || [ 0, 0, 0 ], _ref38 = _slicedToArray(_ref37, 3), _red = _ref38[0], _green = _ref38[1], _blue = _ref38[2];11327 -1 this.red = _red;11328 -1 this.green = _green;11329 -1 this.blue = _blue;11330 -1 this.alpha = colorString === 'transparent' ? 0 : 1;11331 -1 return;11332 -1 }11333 -1 if (colorString.match(colorFnRegex)) {11334 -1 this.parseColorFnString(colorString);11335 -1 return;11336 -1 }11337 -1 if (colorString.match(hexRegex)) {11338 -1 this.parseHexString(colorString);11339 -1 return;11340 -1 }11341 -1 throw new Error('Unable to parse color "'.concat(colorString, '"'));11342 -1 };11343 -1 this.parseRgbString = function(colorString) {11344 -1 if (colorString === 'transparent') {11345 -1 this.red = 0;11346 -1 this.green = 0;11347 -1 this.blue = 0;11348 -1 this.alpha = 0;11349 -1 return;11350 -1 }11351 -1 this.parseColorFnString(colorString);11352 -1 };11353 -1 this.parseHexString = function(colorString) {11354 -1 if (!colorString.match(hexRegex) || [ 6, 8 ].includes(colorString.length)) {11355 -1 return;11356 -1 }11357 -1 colorString = colorString.replace('#', '');11358 -1 if (colorString.length < 6) {11359 -1 var _colorString = colorString, _colorString2 = _slicedToArray(_colorString, 4), r = _colorString2[0], g = _colorString2[1], b = _colorString2[2], a = _colorString2[3];11360 -1 colorString = r + r + g + g + b + b;11361 -1 if (a) {11362 -1 colorString += a + a;11363 -1 }11364 -1 }11365 -1 var aRgbHex = colorString.match(/.{1,2}/g);11366 -1 this.red = parseInt(aRgbHex[0], 16);11367 -1 this.green = parseInt(aRgbHex[1], 16);11368 -1 this.blue = parseInt(aRgbHex[2], 16);11369 -1 if (aRgbHex[3]) {11370 -1 this.alpha = parseInt(aRgbHex[3], 16) / 255;11371 -1 } else {11372 -1 this.alpha = 1;11373 -1 }11374 -1 };11375 -1 this.parseColorFnString = function parseColorFnString(colorString) {11376 -1 var _ref39 = colorString.match(colorFnRegex) || [], _ref40 = _slicedToArray(_ref39, 3), colorFunc = _ref40[1], colorValStr = _ref40[2];11377 -1 if (!colorFunc || !colorValStr) {11378 -1 return;11379 -1 }11380 -1 var colorVals = colorValStr.split(/\s*[,\/\s]\s*/).map(function(str) {11381 -1 return str.replace(',', '').trim();11382 -1 }).filter(function(str) {11383 -1 return str !== '';11384 -1 });11385 -1 var colorNums = colorVals.map(function(val, index) {11386 -1 return convertColorVal(colorFunc, val, index);11387 -1 });11388 -1 if (colorFunc.substr(0, 3) === 'hsl') {11389 -1 colorNums = hslToRgb(colorNums);-1 32651 } -1 32652 return _arr; -1 32653 } -1 32654 function _arrayWithHoles(arr) { -1 32655 if (Array.isArray(arr)) { -1 32656 return arr; -1 32657 } -1 32658 } -1 32659 function _extends() { -1 32660 _extends = Object.assign || function(target) { -1 32661 for (var i = 1; i < arguments.length; i++) { -1 32662 var source = arguments[i]; -1 32663 for (var key in source) { -1 32664 if (Object.prototype.hasOwnProperty.call(source, key)) { -1 32665 target[key] = source[key]; 11390 32666 }11391 -1 this.red = colorNums[0];11392 -1 this.green = colorNums[1];11393 -1 this.blue = colorNums[2];11394 -1 this.alpha = typeof colorNums[3] === 'number' ? colorNums[3] : 1;11395 -1 };11396 -1 this.getRelativeLuminance = function() {11397 -1 var rSRGB = this.red / 255;11398 -1 var gSRGB = this.green / 255;11399 -1 var bSRGB = this.blue / 255;11400 -1 var r = rSRGB <= .03928 ? rSRGB / 12.92 : Math.pow((rSRGB + .055) / 1.055, 2.4);11401 -1 var g = gSRGB <= .03928 ? gSRGB / 12.92 : Math.pow((gSRGB + .055) / 1.055, 2.4);11402 -1 var b = bSRGB <= .03928 ? bSRGB / 12.92 : Math.pow((bSRGB + .055) / 1.055, 2.4);11403 -1 return .2126 * r + .7152 * g + .0722 * b;11404 -1 };11405 -1 }11406 -1 __webpack_exports__['default'] = Color;11407 -1 },11408 -1 './lib/commons/color/element-has-image.js': function libCommonsColorElementHasImageJs(module, __webpack_exports__, __webpack_require__) {11409 -1 'use strict';11410 -1 __webpack_require__.r(__webpack_exports__);11411 -1 var _incomplete_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/color/incomplete-data.js');11412 -1 function elementHasImage(elm, style) {11413 -1 var graphicNodes = [ 'IMG', 'CANVAS', 'OBJECT', 'IFRAME', 'VIDEO', 'SVG' ];11414 -1 var nodeName = elm.nodeName.toUpperCase();11415 -1 if (graphicNodes.includes(nodeName)) {11416 -1 _incomplete_data__WEBPACK_IMPORTED_MODULE_0__['default'].set('bgColor', 'imgNode');11417 -1 return true;11418 -1 }11419 -1 style = style || window.getComputedStyle(elm);11420 -1 var bgImageStyle = style.getPropertyValue('background-image');11421 -1 var hasBgImage = bgImageStyle !== 'none';11422 -1 if (hasBgImage) {11423 -1 var hasGradient = /gradient/.test(bgImageStyle);11424 -1 _incomplete_data__WEBPACK_IMPORTED_MODULE_0__['default'].set('bgColor', hasGradient ? 'bgGradient' : 'bgImage');11425 -1 }11426 -1 return hasBgImage;11427 -1 }11428 -1 __webpack_exports__['default'] = elementHasImage;11429 -1 },11430 -1 './lib/commons/color/element-is-distinct.js': function libCommonsColorElementIsDistinctJs(module, __webpack_exports__, __webpack_require__) {11431 -1 'use strict';11432 -1 __webpack_require__.r(__webpack_exports__);11433 -1 var _color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/color/color.js');11434 -1 function _getFonts(style) {11435 -1 return style.getPropertyValue('font-family').split(/[,;]/g).map(function(font) {11436 -1 return font.trim().toLowerCase();11437 -1 });11438 -1 }11439 -1 function elementIsDistinct(node, ancestorNode) {11440 -1 var nodeStyle = window.getComputedStyle(node);11441 -1 if (nodeStyle.getPropertyValue('background-image') !== 'none') {11442 -1 return true;11443 -1 }11444 -1 var hasBorder = [ 'border-bottom', 'border-top', 'outline' ].reduce(function(result, edge) {11445 -1 var borderClr = new _color__WEBPACK_IMPORTED_MODULE_0__['default']();11446 -1 borderClr.parseString(nodeStyle.getPropertyValue(edge + '-color'));11447 -1 return result || nodeStyle.getPropertyValue(edge + '-style') !== 'none' && parseFloat(nodeStyle.getPropertyValue(edge + '-width')) > 0 && borderClr.alpha !== 0;11448 -1 }, false);11449 -1 if (hasBorder) {11450 -1 return true;11451 32667 }11452 -1 var parentStyle = window.getComputedStyle(ancestorNode);11453 -1 if (_getFonts(nodeStyle)[0] !== _getFonts(parentStyle)[0]) {11454 -1 return true;11455 -1 }11456 -1 var hasStyle = [ 'text-decoration-line', 'text-decoration-style', 'font-weight', 'font-style', 'font-size' ].reduce(function(result, cssProp) {11457 -1 return result || nodeStyle.getPropertyValue(cssProp) !== parentStyle.getPropertyValue(cssProp);11458 -1 }, false);11459 -1 var tDec = nodeStyle.getPropertyValue('text-decoration');11460 -1 if (tDec.split(' ').length < 3) {11461 -1 hasStyle = hasStyle || tDec !== parentStyle.getPropertyValue('text-decoration');11462 -1 }11463 -1 return hasStyle;11464 32668 }11465 -1 __webpack_exports__['default'] = elementIsDistinct;11466 -1 },11467 -1 './lib/commons/color/filtered-rect-stack.js': function libCommonsColorFilteredRectStackJs(module, __webpack_exports__, __webpack_require__) {11468 -1 'use strict';11469 -1 __webpack_require__.r(__webpack_exports__);11470 -1 var _get_rect_stack__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/color/get-rect-stack.js');11471 -1 var _incomplete_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/color/incomplete-data.js');11472 -1 function filteredRectStack(elm) {11473 -1 var rectStack = Object(_get_rect_stack__WEBPACK_IMPORTED_MODULE_0__['default'])(elm);11474 -1 if (rectStack && rectStack.length === 1) {11475 -1 return rectStack[0];11476 -1 }11477 -1 if (rectStack && rectStack.length > 1) {11478 -1 var boundingStack = rectStack.shift();11479 -1 var isSame;11480 -1 rectStack.forEach(function(rectList, index) {11481 -1 if (index === 0) {11482 -1 return;11483 -1 }11484 -1 var rectA = rectStack[index - 1], rectB = rectStack[index];11485 -1 isSame = rectA.every(function(element, elementIndex) {11486 -1 return element === rectB[elementIndex];11487 -1 }) || boundingStack.includes(elm);11488 -1 });11489 -1 if (!isSame) {11490 -1 _incomplete_data__WEBPACK_IMPORTED_MODULE_1__['default'].set('bgColor', 'elmPartiallyObscuring');11491 -1 return null;11492 -1 }11493 -1 return rectStack[0];11494 -1 }11495 -1 _incomplete_data__WEBPACK_IMPORTED_MODULE_1__['default'].set('bgColor', 'outsideViewport');11496 -1 return null;-1 32669 return target; -1 32670 }; -1 32671 return _extends.apply(this, arguments); -1 32672 } -1 32673 function _classCallCheck(instance, Constructor) { -1 32674 if (!(instance instanceof Constructor)) { -1 32675 throw new TypeError('Cannot call a class as a function'); -1 32676 } -1 32677 } -1 32678 function _defineProperties(target, props) { -1 32679 for (var i = 0; i < props.length; i++) { -1 32680 var descriptor = props[i]; -1 32681 descriptor.enumerable = descriptor.enumerable || false; -1 32682 descriptor.configurable = true; -1 32683 if ('value' in descriptor) { -1 32684 descriptor.writable = true; 11497 32685 }11498 -1 __webpack_exports__['default'] = filteredRectStack;11499 -1 },11500 -1 './lib/commons/color/flatten-colors.js': function libCommonsColorFlattenColorsJs(module, __webpack_exports__, __webpack_require__) {11501 -1 'use strict';11502 -1 __webpack_require__.r(__webpack_exports__);11503 -1 var _color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/color/color.js');11504 -1 function flattenColors(fgColor, bgColor) {11505 -1 var alpha = fgColor.alpha;11506 -1 var r = (1 - alpha) * bgColor.red + alpha * fgColor.red;11507 -1 var g = (1 - alpha) * bgColor.green + alpha * fgColor.green;11508 -1 var b = (1 - alpha) * bgColor.blue + alpha * fgColor.blue;11509 -1 var a = fgColor.alpha + bgColor.alpha * (1 - fgColor.alpha);11510 -1 return new _color__WEBPACK_IMPORTED_MODULE_0__['default'](r, g, b, a);11511 -1 }11512 -1 __webpack_exports__['default'] = flattenColors;11513 -1 },11514 -1 './lib/commons/color/get-background-color.js': function libCommonsColorGetBackgroundColorJs(module, __webpack_exports__, __webpack_require__) {11515 -1 'use strict';11516 -1 __webpack_require__.r(__webpack_exports__);11517 -1 var _incomplete_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/color/incomplete-data.js');11518 -1 var _get_background_stack__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/color/get-background-stack.js');11519 -1 var _get_own_background_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/color/get-own-background-color.js');11520 -1 var _element_has_image__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/color/element-has-image.js');11521 -1 var _color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/color/color.js');11522 -1 var _flatten_colors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/color/flatten-colors.js');11523 -1 var _get_text_shadow_colors__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/commons/color/get-text-shadow-colors.js');11524 -1 var _dom_visually_contains__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/commons/dom/visually-contains.js');11525 -1 function elmPartiallyObscured(elm, bgElm, bgColor) {11526 -1 var obscured = elm !== bgElm && !Object(_dom_visually_contains__WEBPACK_IMPORTED_MODULE_7__['default'])(elm, bgElm) && bgColor.alpha !== 0;11527 -1 if (obscured) {11528 -1 _incomplete_data__WEBPACK_IMPORTED_MODULE_0__['default'].set('bgColor', 'elmPartiallyObscured');11529 -1 }11530 -1 return obscured;11531 -1 }11532 -1 function getBackgroundColor(elm) {11533 -1 var bgElms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];11534 -1 var bgColors = Object(_get_text_shadow_colors__WEBPACK_IMPORTED_MODULE_6__['default'])(elm);11535 -1 var elmStack = Object(_get_background_stack__WEBPACK_IMPORTED_MODULE_1__['default'])(elm);11536 -1 (elmStack || []).some(function(bgElm) {11537 -1 var bgElmStyle = window.getComputedStyle(bgElm);11538 -1 var bgColor = Object(_get_own_background_color__WEBPACK_IMPORTED_MODULE_2__['default'])(bgElmStyle);11539 -1 if (elmPartiallyObscured(elm, bgElm, bgColor) || Object(_element_has_image__WEBPACK_IMPORTED_MODULE_3__['default'])(bgElm, bgElmStyle)) {11540 -1 bgColors = null;11541 -1 bgElms.push(bgElm);11542 -1 return true;11543 -1 }11544 -1 if (bgColor.alpha !== 0) {11545 -1 bgElms.push(bgElm);11546 -1 bgColors.push(bgColor);11547 -1 return bgColor.alpha === 1;11548 -1 } else {11549 -1 return false;11550 -1 }11551 -1 });11552 -1 if (bgColors === null || elmStack === null) {11553 -1 return null;-1 32686 Object.defineProperty(target, descriptor.key, descriptor); -1 32687 } -1 32688 } -1 32689 function _createClass(Constructor, protoProps, staticProps) { -1 32690 if (protoProps) { -1 32691 _defineProperties(Constructor.prototype, protoProps); -1 32692 } -1 32693 if (staticProps) { -1 32694 _defineProperties(Constructor, staticProps); -1 32695 } -1 32696 return Constructor; -1 32697 } -1 32698 function _createForOfIteratorHelper(o, allowArrayLike) { -1 32699 var it = typeof Symbol !== 'undefined' && o[Symbol.iterator] || o['@@iterator']; -1 32700 if (!it) { -1 32701 if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === 'number') { -1 32702 if (it) { -1 32703 o = it; 11554 32704 }11555 -1 bgColors.push(new _color__WEBPACK_IMPORTED_MODULE_4__['default'](255, 255, 255, 1));11556 -1 var colors = bgColors.reduce(_flatten_colors__WEBPACK_IMPORTED_MODULE_5__['default']);11557 -1 return colors;11558 -1 }11559 -1 __webpack_exports__['default'] = getBackgroundColor;11560 -1 },11561 -1 './lib/commons/color/get-background-stack.js': function libCommonsColorGetBackgroundStackJs(module, __webpack_exports__, __webpack_require__) {11562 -1 'use strict';11563 -1 __webpack_require__.r(__webpack_exports__);11564 -1 var _filtered_rect_stack__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/color/filtered-rect-stack.js');11565 -1 var _element_has_image__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/color/element-has-image.js');11566 -1 var _get_own_background_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/color/get-own-background-color.js');11567 -1 var _incomplete_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/color/incomplete-data.js');11568 -1 var _dom_shadow_elements_from_point__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/dom/shadow-elements-from-point.js');11569 -1 var _dom_reduce_to_elements_below_floating__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/dom/reduce-to-elements-below-floating.js');11570 -1 function contentOverlapping(targetElement, bgNode) {11571 -1 var targetRect = targetElement.getClientRects()[0];11572 -1 var obscuringElements = Object(_dom_shadow_elements_from_point__WEBPACK_IMPORTED_MODULE_4__['default'])(targetRect.left, targetRect.top);11573 -1 if (obscuringElements) {11574 -1 for (var i = 0; i < obscuringElements.length; i++) {11575 -1 if (obscuringElements[i] !== targetElement && obscuringElements[i] === bgNode) {11576 -1 return true;-1 32705 var i = 0; -1 32706 var F = function F() {}; -1 32707 return { -1 32708 s: F, -1 32709 n: function n() { -1 32710 if (i >= o.length) { -1 32711 return { -1 32712 done: true -1 32713 }; 11577 32714 }11578 -1 }11579 -1 }11580 -1 return false;-1 32715 return { -1 32716 done: false, -1 32717 value: o[i++] -1 32718 }; -1 32719 }, -1 32720 e: function e(_e2) { -1 32721 throw _e2; -1 32722 }, -1 32723 f: F -1 32724 }; 11581 32725 }11582 -1 function calculateObscuringElement(elmIndex, elmStack, originalElm) {11583 -1 if (elmIndex > 0) {11584 -1 for (var i = elmIndex - 1; i >= 0; i--) {11585 -1 var bgElm = elmStack[i];11586 -1 if (contentOverlapping(originalElm, bgElm)) {11587 -1 return true;11588 -1 } else {11589 -1 elmStack.splice(i, 1);11590 -1 }-1 32726 throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); -1 32727 } -1 32728 var normalCompletion = true, didErr = false, err; -1 32729 return { -1 32730 s: function s() { -1 32731 it = it.call(o); -1 32732 }, -1 32733 n: function n() { -1 32734 var step = it.next(); -1 32735 normalCompletion = step.done; -1 32736 return step; -1 32737 }, -1 32738 e: function e(_e3) { -1 32739 didErr = true; -1 32740 err = _e3; -1 32741 }, -1 32742 f: function f() { -1 32743 try { -1 32744 if (!normalCompletion && it['return'] != null) { -1 32745 it['return'](); 11591 32746 }11592 -1 }11593 -1 return false;11594 -1 }11595 -1 function sortPageBackground(elmStack) {11596 -1 var bodyIndex = elmStack.indexOf(document.body);11597 -1 var bgNodes = elmStack;11598 -1 var sortBodyElement = bodyIndex > 1 || bodyIndex === -1;11599 -1 if (sortBodyElement && !Object(_element_has_image__WEBPACK_IMPORTED_MODULE_1__['default'])(document.documentElement) && Object(_get_own_background_color__WEBPACK_IMPORTED_MODULE_2__['default'])(window.getComputedStyle(document.documentElement)).alpha === 0) {11600 -1 if (bodyIndex > 1) {11601 -1 bgNodes.splice(bodyIndex, 1);-1 32747 } finally { -1 32748 if (didErr) { -1 32749 throw err; 11602 32750 }11603 -1 bgNodes.splice(elmStack.indexOf(document.documentElement), 1);11604 -1 bgNodes.push(document.body);11605 -1 }11606 -1 return bgNodes;11607 -1 }11608 -1 function getBackgroundStack(elm) {11609 -1 var elmStack = Object(_filtered_rect_stack__WEBPACK_IMPORTED_MODULE_0__['default'])(elm);11610 -1 if (elmStack === null) {11611 -1 return null;11612 -1 }11613 -1 elmStack = Object(_dom_reduce_to_elements_below_floating__WEBPACK_IMPORTED_MODULE_5__['default'])(elmStack, elm);11614 -1 elmStack = sortPageBackground(elmStack);11615 -1 var elmIndex = elmStack.indexOf(elm);11616 -1 if (calculateObscuringElement(elmIndex, elmStack, elm)) {11617 -1 _incomplete_data__WEBPACK_IMPORTED_MODULE_3__['default'].set('bgColor', 'bgOverlap');11618 -1 return null;11619 -1 }11620 -1 return elmIndex !== -1 ? elmStack : null;11621 -1 }11622 -1 __webpack_exports__['default'] = getBackgroundStack;11623 -1 },11624 -1 './lib/commons/color/get-contrast.js': function libCommonsColorGetContrastJs(module, __webpack_exports__, __webpack_require__) {11625 -1 'use strict';11626 -1 __webpack_require__.r(__webpack_exports__);11627 -1 var _flatten_colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/color/flatten-colors.js');11628 -1 function getContrast(bgColor, fgColor) {11629 -1 if (!fgColor || !bgColor) {11630 -1 return null;11631 -1 }11632 -1 if (fgColor.alpha < 1) {11633 -1 fgColor = Object(_flatten_colors__WEBPACK_IMPORTED_MODULE_0__['default'])(fgColor, bgColor);11634 -1 }11635 -1 var bL = bgColor.getRelativeLuminance();11636 -1 var fL = fgColor.getRelativeLuminance();11637 -1 return (Math.max(fL, bL) + .05) / (Math.min(fL, bL) + .05);11638 -1 }11639 -1 __webpack_exports__['default'] = getContrast;11640 -1 },11641 -1 './lib/commons/color/get-foreground-color.js': function libCommonsColorGetForegroundColorJs(module, __webpack_exports__, __webpack_require__) {11642 -1 'use strict';11643 -1 __webpack_require__.r(__webpack_exports__);11644 -1 var _color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/color/color.js');11645 -1 var _get_background_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/color/get-background-color.js');11646 -1 var _incomplete_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/color/incomplete-data.js');11647 -1 var _flatten_colors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/color/flatten-colors.js');11648 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/core/utils/index.js');11649 -1 function getOpacity(node) {11650 -1 if (!node) {11651 -1 return 1;11652 -1 }11653 -1 var vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_4__['getNodeFromTree'])(node);11654 -1 if (vNode && vNode._opacity !== undefined && vNode._opacity !== null) {11655 -1 return vNode._opacity;11656 -1 }11657 -1 var nodeStyle = window.getComputedStyle(node);11658 -1 var opacity = nodeStyle.getPropertyValue('opacity');11659 -1 var finalOpacity = opacity * getOpacity(node.parentElement);11660 -1 if (vNode) {11661 -1 vNode._opacity = finalOpacity;11662 -1 }11663 -1 return finalOpacity;11664 -1 }11665 -1 function getForegroundColor(node, _, bgColor) {11666 -1 var nodeStyle = window.getComputedStyle(node);11667 -1 var fgColor = new _color__WEBPACK_IMPORTED_MODULE_0__['default']();11668 -1 fgColor.parseString(nodeStyle.getPropertyValue('color'));11669 -1 var opacity = getOpacity(node);11670 -1 fgColor.alpha = fgColor.alpha * opacity;11671 -1 if (fgColor.alpha === 1) {11672 -1 return fgColor;11673 -1 }11674 -1 if (!bgColor) {11675 -1 bgColor = Object(_get_background_color__WEBPACK_IMPORTED_MODULE_1__['default'])(node, []);11676 -1 }11677 -1 if (bgColor === null) {11678 -1 var reason = _incomplete_data__WEBPACK_IMPORTED_MODULE_2__['default'].get('bgColor');11679 -1 _incomplete_data__WEBPACK_IMPORTED_MODULE_2__['default'].set('fgColor', reason);11680 -1 return null;11681 -1 }11682 -1 return Object(_flatten_colors__WEBPACK_IMPORTED_MODULE_3__['default'])(fgColor, bgColor);11683 -1 }11684 -1 __webpack_exports__['default'] = getForegroundColor;11685 -1 },11686 -1 './lib/commons/color/get-own-background-color.js': function libCommonsColorGetOwnBackgroundColorJs(module, __webpack_exports__, __webpack_require__) {11687 -1 'use strict';11688 -1 __webpack_require__.r(__webpack_exports__);11689 -1 var _color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/color/color.js');11690 -1 function getOwnBackgroundColor(elmStyle) {11691 -1 var bgColor = new _color__WEBPACK_IMPORTED_MODULE_0__['default']();11692 -1 bgColor.parseString(elmStyle.getPropertyValue('background-color'));11693 -1 if (bgColor.alpha !== 0) {11694 -1 var opacity = elmStyle.getPropertyValue('opacity');11695 -1 bgColor.alpha = bgColor.alpha * opacity;11696 -1 }11697 -1 return bgColor;11698 -1 }11699 -1 __webpack_exports__['default'] = getOwnBackgroundColor;11700 -1 },11701 -1 './lib/commons/color/get-rect-stack.js': function libCommonsColorGetRectStackJs(module, __webpack_exports__, __webpack_require__) {11702 -1 'use strict';11703 -1 __webpack_require__.r(__webpack_exports__);11704 -1 var _dom_get_element_stack__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/get-element-stack.js');11705 -1 var _dom_get_text_element_stack__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/get-text-element-stack.js');11706 -1 function getRectStack(elm) {11707 -1 var boundingStack = Object(_dom_get_element_stack__WEBPACK_IMPORTED_MODULE_0__['default'])(elm);11708 -1 var filteredArr = Object(_dom_get_text_element_stack__WEBPACK_IMPORTED_MODULE_1__['default'])(elm);11709 -1 if (!filteredArr || filteredArr.length <= 1) {11710 -1 return [ boundingStack ];11711 -1 }11712 -1 if (filteredArr.some(function(stack) {11713 -1 return stack === undefined;11714 -1 })) {11715 -1 return null;11716 32751 }11717 -1 filteredArr.splice(0, 0, boundingStack);11718 -1 return filteredArr;11719 -1 }11720 -1 __webpack_exports__['default'] = getRectStack;11721 -1 },11722 -1 './lib/commons/color/get-text-shadow-colors.js': function libCommonsColorGetTextShadowColorsJs(module, __webpack_exports__, __webpack_require__) {11723 -1 'use strict';11724 -1 __webpack_require__.r(__webpack_exports__);11725 -1 var _color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/color/color.js');11726 -1 var _core_utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/assert.js');11727 -1 function getTextShadowColors(node) {11728 -1 var style = window.getComputedStyle(node);11729 -1 var textShadow = style.getPropertyValue('text-shadow');11730 -1 if (textShadow === 'none') {11731 -1 return [];11732 -1 }11733 -1 var shadows = parseTextShadows(textShadow);11734 -1 return shadows.map(function(_ref41) {11735 -1 var colorStr = _ref41.colorStr, pixels = _ref41.pixels;11736 -1 colorStr = colorStr || style.getPropertyValue('color');11737 -1 var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;11738 -1 return textShadowColor({11739 -1 colorStr: colorStr,11740 -1 offsetY: offsetY,11741 -1 offsetX: offsetX,11742 -1 blurRadius: blurRadius11743 -1 });11744 -1 });11745 32752 }11746 -1 function parseTextShadows(textShadow) {11747 -1 var current = {11748 -1 pixels: []11749 -1 };11750 -1 var str = textShadow.trim();11751 -1 var shadows = [ current ];11752 -1 if (!str) {11753 -1 return [];11754 -1 }11755 -1 while (str) {11756 -1 var colorMatch = str.match(/^rgba?\([0-9,.\s]+\)/i) || str.match(/^[a-z]+/i) || str.match(/^#[0-9a-f]+/i);11757 -1 var pixelMatch = str.match(/^([0-9.-]+)px/i) || str.match(/^(0)/);11758 -1 if (colorMatch) {11759 -1 Object(_core_utils_assert__WEBPACK_IMPORTED_MODULE_1__['default'])(!current.colorStr, 'Multiple colors identified in text-shadow: '.concat(textShadow));11760 -1 str = str.replace(colorMatch[0], '').trim();11761 -1 current.colorStr = colorMatch[0];11762 -1 } else if (pixelMatch) {11763 -1 Object(_core_utils_assert__WEBPACK_IMPORTED_MODULE_1__['default'])(current.pixels.length < 3, 'Too many pixel units in text-shadow: '.concat(textShadow));11764 -1 str = str.replace(pixelMatch[0], '').trim();11765 -1 var pixelUnit = parseFloat((pixelMatch[1][0] === '.' ? '0' : '') + pixelMatch[1]);11766 -1 current.pixels.push(pixelUnit);11767 -1 } else if (str[0] === ',') {11768 -1 Object(_core_utils_assert__WEBPACK_IMPORTED_MODULE_1__['default'])(current.pixels.length >= 2, 'Missing pixel value in text-shadow: '.concat(textShadow));11769 -1 current = {11770 -1 pixels: []11771 -1 };11772 -1 shadows.push(current);11773 -1 str = str.substr(1).trim();11774 -1 } else {11775 -1 throw new Error('Unable to process text-shadows: '.concat(textShadow));11776 -1 }-1 32753 }; -1 32754 } -1 32755 function _unsupportedIterableToArray(o, minLen) { -1 32756 if (!o) { -1 32757 return; -1 32758 } -1 32759 if (typeof o === 'string') { -1 32760 return _arrayLikeToArray(o, minLen); -1 32761 } -1 32762 var n = Object.prototype.toString.call(o).slice(8, -1); -1 32763 if (n === 'Object' && o.constructor) { -1 32764 n = o.constructor.name; -1 32765 } -1 32766 if (n === 'Map' || n === 'Set') { -1 32767 return Array.from(o); -1 32768 } -1 32769 if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) { -1 32770 return _arrayLikeToArray(o, minLen); -1 32771 } -1 32772 } -1 32773 function _arrayLikeToArray(arr, len) { -1 32774 if (len == null || len > arr.length) { -1 32775 len = arr.length; -1 32776 } -1 32777 for (var i = 0, arr2 = new Array(len); i < len; i++) { -1 32778 arr2[i] = arr[i]; -1 32779 } -1 32780 return arr2; -1 32781 } -1 32782 function _typeof(obj) { -1 32783 '@babel/helpers - typeof'; -1 32784 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') { -1 32785 _typeof = function _typeof(obj) { -1 32786 return typeof obj; -1 32787 }; -1 32788 } else { -1 32789 _typeof = function _typeof(obj) { -1 32790 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj; -1 32791 }; -1 32792 } -1 32793 return _typeof(obj); -1 32794 } -1 32795 (function() { -1 32796 var __create = Object.create; -1 32797 var __defProp = Object.defineProperty; -1 32798 var __getProtoOf = Object.getPrototypeOf; -1 32799 var __hasOwnProp = Object.prototype.hasOwnProperty; -1 32800 var __getOwnPropNames = Object.getOwnPropertyNames; -1 32801 var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -1 32802 var __markAsModule = function __markAsModule(target) { -1 32803 return __defProp(target, '__esModule', { -1 32804 value: true -1 32805 }); -1 32806 }; -1 32807 var __commonJS = function __commonJS(callback, module) { -1 32808 return function() { -1 32809 if (!module) { -1 32810 module = { -1 32811 exports: {} -1 32812 }; -1 32813 callback(module.exports, module); 11777 32814 }11778 -1 return shadows;-1 32815 return module.exports; -1 32816 }; -1 32817 }; -1 32818 var __export = function __export(target, all) { -1 32819 __markAsModule(target); -1 32820 for (var name in all) { -1 32821 __defProp(target, name, { -1 32822 get: all[name], -1 32823 enumerable: true -1 32824 }); 11779 32825 }11780 -1 function textShadowColor(_ref42) {11781 -1 var colorStr = _ref42.colorStr, offsetX = _ref42.offsetX, offsetY = _ref42.offsetY, blurRadius = _ref42.blurRadius;11782 -1 if (offsetX > blurRadius || offsetY > blurRadius) {11783 -1 return new _color__WEBPACK_IMPORTED_MODULE_0__['default'](0, 0, 0, 0);-1 32826 }; -1 32827 var __exportStar = function __exportStar(target, module, desc) { -1 32828 __markAsModule(target); -1 32829 if (_typeof(module) === 'object' || typeof module === 'function') { -1 32830 var _iterator = _createForOfIteratorHelper(__getOwnPropNames(module)), _step; -1 32831 try { -1 32832 var _loop = function _loop() { -1 32833 var key = _step.value; -1 32834 if (!__hasOwnProp.call(target, key) && key !== 'default') { -1 32835 __defProp(target, key, { -1 32836 get: function get() { -1 32837 return module[key]; -1 32838 }, -1 32839 enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable -1 32840 }); -1 32841 } -1 32842 }; -1 32843 for (_iterator.s(); !(_step = _iterator.n()).done; ) { -1 32844 _loop(); -1 32845 } -1 32846 } catch (err) { -1 32847 _iterator.e(err); -1 32848 } finally { -1 32849 _iterator.f(); 11784 32850 }11785 -1 var shadowColor = new _color__WEBPACK_IMPORTED_MODULE_0__['default']();11786 -1 shadowColor.parseString(colorStr);11787 -1 shadowColor.alpha *= blurRadiusToAlpha(blurRadius);11788 -1 return shadowColor;11789 32851 }11790 -1 function blurRadiusToAlpha(blurRadius) {11791 -1 return 3.7 / (blurRadius + 8);11792 -1 }11793 -1 __webpack_exports__['default'] = getTextShadowColors;11794 -1 },11795 -1 './lib/commons/color/has-valid-contrast-ratio.js': function libCommonsColorHasValidContrastRatioJs(module, __webpack_exports__, __webpack_require__) {11796 -1 'use strict';11797 -1 __webpack_require__.r(__webpack_exports__);11798 -1 var _get_contrast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/color/get-contrast.js');11799 -1 function hasValidContrastRatio(bg, fg, fontSize, isBold) {11800 -1 var contrast = Object(_get_contrast__WEBPACK_IMPORTED_MODULE_0__['default'])(bg, fg);11801 -1 var isSmallFont = isBold && Math.ceil(fontSize * 72) / 96 < 14 || !isBold && Math.ceil(fontSize * 72) / 96 < 18;11802 -1 var expectedContrastRatio = isSmallFont ? 4.5 : 3;11803 -1 return {11804 -1 isValid: contrast > expectedContrastRatio,11805 -1 contrastRatio: contrast,11806 -1 expectedContrastRatio: expectedContrastRatio11807 -1 };-1 32852 return target; -1 32853 }; -1 32854 var __toModule = function __toModule(module) { -1 32855 if (module && module.__esModule) { -1 32856 return module; 11808 32857 }11809 -1 __webpack_exports__['default'] = hasValidContrastRatio;11810 -1 },11811 -1 './lib/commons/color/incomplete-data.js': function libCommonsColorIncompleteDataJs(module, __webpack_exports__, __webpack_require__) {11812 -1 'use strict';11813 -1 __webpack_require__.r(__webpack_exports__);11814 -1 var data = {};11815 -1 var incompleteData = {11816 -1 set: function set(key, reason) {11817 -1 if (typeof key !== 'string') {11818 -1 throw new Error('Incomplete data: key must be a string');11819 -1 }11820 -1 if (reason) {11821 -1 data[key] = reason;11822 -1 }11823 -1 return data[key];11824 -1 },11825 -1 get: function get(key) {11826 -1 return data[key];11827 -1 },11828 -1 clear: function clear() {11829 -1 data = {};11830 -1 }11831 -1 };11832 -1 __webpack_exports__['default'] = incompleteData;11833 -1 },11834 -1 './lib/commons/color/index.js': function libCommonsColorIndexJs(module, __webpack_exports__, __webpack_require__) {-1 32858 return __exportStar(__defProp(__create(__getProtoOf(module)), 'default', { -1 32859 value: module, -1 32860 enumerable: true -1 32861 }), module); -1 32862 }; -1 32863 var require_utils = __commonJS(function(exports) { 11835 32864 'use strict';11836 -1 __webpack_require__.r(__webpack_exports__);11837 -1 var _center_point_of_rect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/color/center-point-of-rect.js');11838 -1 __webpack_require__.d(__webpack_exports__, 'centerPointOfRect', function() {11839 -1 return _center_point_of_rect__WEBPACK_IMPORTED_MODULE_0__['default'];11840 -1 });11841 -1 var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/color/color.js');11842 -1 __webpack_require__.d(__webpack_exports__, 'Color', function() {11843 -1 return _color__WEBPACK_IMPORTED_MODULE_1__['default'];11844 -1 });11845 -1 var _element_has_image__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/color/element-has-image.js');11846 -1 __webpack_require__.d(__webpack_exports__, 'elementHasImage', function() {11847 -1 return _element_has_image__WEBPACK_IMPORTED_MODULE_2__['default'];11848 -1 });11849 -1 var _element_is_distinct__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/color/element-is-distinct.js');11850 -1 __webpack_require__.d(__webpack_exports__, 'elementIsDistinct', function() {11851 -1 return _element_is_distinct__WEBPACK_IMPORTED_MODULE_3__['default'];11852 -1 });11853 -1 var _filtered_rect_stack__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/color/filtered-rect-stack.js');11854 -1 __webpack_require__.d(__webpack_exports__, 'filteredRectStack', function() {11855 -1 return _filtered_rect_stack__WEBPACK_IMPORTED_MODULE_4__['default'];11856 -1 });11857 -1 var _flatten_colors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/color/flatten-colors.js');11858 -1 __webpack_require__.d(__webpack_exports__, 'flattenColors', function() {11859 -1 return _flatten_colors__WEBPACK_IMPORTED_MODULE_5__['default'];11860 -1 });11861 -1 var _get_background_color__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/commons/color/get-background-color.js');11862 -1 __webpack_require__.d(__webpack_exports__, 'getBackgroundColor', function() {11863 -1 return _get_background_color__WEBPACK_IMPORTED_MODULE_6__['default'];11864 -1 });11865 -1 var _get_background_stack__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/commons/color/get-background-stack.js');11866 -1 __webpack_require__.d(__webpack_exports__, 'getBackgroundStack', function() {11867 -1 return _get_background_stack__WEBPACK_IMPORTED_MODULE_7__['default'];11868 -1 });11869 -1 var _get_contrast__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__('./lib/commons/color/get-contrast.js');11870 -1 __webpack_require__.d(__webpack_exports__, 'getContrast', function() {11871 -1 return _get_contrast__WEBPACK_IMPORTED_MODULE_8__['default'];11872 -1 });11873 -1 var _get_foreground_color__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__('./lib/commons/color/get-foreground-color.js');11874 -1 __webpack_require__.d(__webpack_exports__, 'getForegroundColor', function() {11875 -1 return _get_foreground_color__WEBPACK_IMPORTED_MODULE_9__['default'];11876 -1 });11877 -1 var _get_own_background_color__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__('./lib/commons/color/get-own-background-color.js');11878 -1 __webpack_require__.d(__webpack_exports__, 'getOwnBackgroundColor', function() {11879 -1 return _get_own_background_color__WEBPACK_IMPORTED_MODULE_10__['default'];11880 -1 });11881 -1 var _get_rect_stack__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__('./lib/commons/color/get-rect-stack.js');11882 -1 __webpack_require__.d(__webpack_exports__, 'getRectStack', function() {11883 -1 return _get_rect_stack__WEBPACK_IMPORTED_MODULE_11__['default'];11884 -1 });11885 -1 var _has_valid_contrast_ratio__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__('./lib/commons/color/has-valid-contrast-ratio.js');11886 -1 __webpack_require__.d(__webpack_exports__, 'hasValidContrastRatio', function() {11887 -1 return _has_valid_contrast_ratio__WEBPACK_IMPORTED_MODULE_12__['default'];11888 -1 });11889 -1 var _incomplete_data__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__('./lib/commons/color/incomplete-data.js');11890 -1 __webpack_require__.d(__webpack_exports__, 'incompleteData', function() {11891 -1 return _incomplete_data__WEBPACK_IMPORTED_MODULE_13__['default'];11892 -1 });11893 -1 var _get_text_shadow_colors__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__('./lib/commons/color/get-text-shadow-colors.js');11894 -1 __webpack_require__.d(__webpack_exports__, 'getTextShadowColors', function() {11895 -1 return _get_text_shadow_colors__WEBPACK_IMPORTED_MODULE_14__['default'];-1 32865 Object.defineProperty(exports, '__esModule', { -1 32866 value: true 11896 32867 });11897 -1 },11898 -1 './lib/commons/dom/find-elms-in-context.js': function libCommonsDomFindElmsInContextJs(module, __webpack_exports__, __webpack_require__) {11899 -1 'use strict';11900 -1 __webpack_require__.r(__webpack_exports__);11901 -1 var _get_root_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/get-root-node.js');11902 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');11903 -1 function findElmsInContext(_ref43) {11904 -1 var context = _ref43.context, value = _ref43.value, attr = _ref43.attr, _ref43$elm = _ref43.elm, elm = _ref43$elm === void 0 ? '' : _ref43$elm;11905 -1 var root;11906 -1 var escapedValue = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['escapeSelector'])(value);11907 -1 if (context.nodeType === 9 || context.nodeType === 11) {11908 -1 root = context;11909 -1 } else {11910 -1 root = Object(_get_root_node__WEBPACK_IMPORTED_MODULE_0__['default'])(context);11911 -1 }11912 -1 return Array.from(root.querySelectorAll(elm + '[' + attr + '=' + escapedValue + ']'));-1 32868 function isIdentStart(c) { -1 32869 return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c === '-' || c === '_'; 11913 32870 }11914 -1 __webpack_exports__['default'] = findElmsInContext;11915 -1 },11916 -1 './lib/commons/dom/find-up-virtual.js': function libCommonsDomFindUpVirtualJs(module, __webpack_exports__, __webpack_require__) {11917 -1 'use strict';11918 -1 __webpack_require__.r(__webpack_exports__);11919 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');11920 -1 function findUpVirtual(element, target) {11921 -1 var parent;11922 -1 parent = element.actualNode;11923 -1 if (!element.shadowId && typeof element.actualNode.closest === 'function') {11924 -1 var match = element.actualNode.closest(target);11925 -1 if (match) {11926 -1 return match;11927 -1 }11928 -1 return null;11929 -1 }11930 -1 do {11931 -1 parent = parent.assignedSlot ? parent.assignedSlot : parent.parentNode;11932 -1 if (parent && parent.nodeType === 11) {11933 -1 parent = parent.host;11934 -1 }11935 -1 } while (parent && !Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['matchesSelector'])(parent, target) && parent !== document.documentElement);11936 -1 if (!parent) {11937 -1 return null;11938 -1 }11939 -1 if (!Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['matchesSelector'])(parent, target)) {11940 -1 return null;11941 -1 }11942 -1 return parent;-1 32871 exports.isIdentStart = isIdentStart; -1 32872 function isIdent(c) { -1 32873 return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c === '-' || c === '_'; 11943 32874 }11944 -1 __webpack_exports__['default'] = findUpVirtual;11945 -1 },11946 -1 './lib/commons/dom/find-up.js': function libCommonsDomFindUpJs(module, __webpack_exports__, __webpack_require__) {11947 -1 'use strict';11948 -1 __webpack_require__.r(__webpack_exports__);11949 -1 var _find_up_virtual__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/find-up-virtual.js');11950 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');11951 -1 function findUp(element, target) {11952 -1 return Object(_find_up_virtual__WEBPACK_IMPORTED_MODULE_0__['default'])(Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeFromTree'])(element), target);-1 32875 exports.isIdent = isIdent; -1 32876 function isHex(c) { -1 32877 return c >= 'a' && c <= 'f' || c >= 'A' && c <= 'F' || c >= '0' && c <= '9'; 11953 32878 }11954 -1 __webpack_exports__['default'] = findUp;11955 -1 },11956 -1 './lib/commons/dom/focus-disabled.js': function libCommonsDomFocusDisabledJs(module, __webpack_exports__, __webpack_require__) {11957 -1 'use strict';11958 -1 __webpack_require__.r(__webpack_exports__);11959 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');11960 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');11961 -1 var _is_hidden_with_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/dom/is-hidden-with-css.js');11962 -1 function focusDisabled(el) {11963 -1 var vNode = el instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_0__['default'] ? el : Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeFromTree'])(el);11964 -1 if (vNode.hasAttr('disabled')) {11965 -1 return true;11966 -1 }11967 -1 if (vNode.props.nodeName !== 'area') {11968 -1 if (!vNode.actualNode) {11969 -1 return false;-1 32879 exports.isHex = isHex; -1 32880 function escapeIdentifier(s) { -1 32881 var len = s.length; -1 32882 var result = ''; -1 32883 var i = 0; -1 32884 while (i < len) { -1 32885 var chr = s.charAt(i); -1 32886 if (exports.identSpecialChars[chr]) { -1 32887 result += '\\' + chr; -1 32888 } else { -1 32889 if (!(chr === '_' || chr === '-' || chr >= 'A' && chr <= 'Z' || chr >= 'a' && chr <= 'z' || i !== 0 && chr >= '0' && chr <= '9')) { -1 32890 var charCode = chr.charCodeAt(0); -1 32891 if ((charCode & 63488) === 55296) { -1 32892 var extraCharCode = s.charCodeAt(i++); -1 32893 if ((charCode & 64512) !== 55296 || (extraCharCode & 64512) !== 56320) { -1 32894 throw Error('UCS-2(decode): illegal sequence'); -1 32895 } -1 32896 charCode = ((charCode & 1023) << 10) + (extraCharCode & 1023) + 65536; -1 32897 } -1 32898 result += '\\' + charCode.toString(16) + ' '; -1 32899 } else { -1 32900 result += chr; -1 32901 } 11970 32902 }11971 -1 return Object(_is_hidden_with_css__WEBPACK_IMPORTED_MODULE_2__['default'])(vNode.actualNode);-1 32903 i++; 11972 32904 }11973 -1 return false;-1 32905 return result; 11974 32906 }11975 -1 __webpack_exports__['default'] = focusDisabled;11976 -1 },11977 -1 './lib/commons/dom/get-composed-parent.js': function libCommonsDomGetComposedParentJs(module, __webpack_exports__, __webpack_require__) {11978 -1 'use strict';11979 -1 __webpack_require__.r(__webpack_exports__);11980 -1 function getComposedParent(element) {11981 -1 if (element.assignedSlot) {11982 -1 return getComposedParent(element.assignedSlot);11983 -1 } else if (element.parentNode) {11984 -1 var parentNode = element.parentNode;11985 -1 if (parentNode.nodeType === 1) {11986 -1 return parentNode;11987 -1 } else if (parentNode.host) {11988 -1 return parentNode.host;-1 32907 exports.escapeIdentifier = escapeIdentifier; -1 32908 function escapeStr(s) { -1 32909 var len = s.length; -1 32910 var result = ''; -1 32911 var i = 0; -1 32912 var replacement; -1 32913 while (i < len) { -1 32914 var chr = s.charAt(i); -1 32915 if (chr === '"') { -1 32916 chr = '\\"'; -1 32917 } else if (chr === '\\') { -1 32918 chr = '\\\\'; -1 32919 } else if ((replacement = exports.strReplacementsRev[chr]) !== void 0) { -1 32920 chr = replacement; 11989 32921 } -1 32922 result += chr; -1 32923 i++; 11990 32924 }11991 -1 return null;11992 -1 }11993 -1 __webpack_exports__['default'] = getComposedParent;11994 -1 },11995 -1 './lib/commons/dom/get-element-by-reference.js': function libCommonsDomGetElementByReferenceJs(module, __webpack_exports__, __webpack_require__) {11996 -1 'use strict';11997 -1 __webpack_require__.r(__webpack_exports__);11998 -1 function getElementByReference(node, attr) {11999 -1 var fragment = node.getAttribute(attr);12000 -1 if (!fragment) {12001 -1 return null;12002 -1 }12003 -1 if (fragment.charAt(0) === '#') {12004 -1 fragment = decodeURIComponent(fragment.substring(1));12005 -1 } else if (fragment.substr(0, 2) === '/#') {12006 -1 fragment = decodeURIComponent(fragment.substring(2));12007 -1 }12008 -1 var candidate = document.getElementById(fragment);12009 -1 if (candidate) {12010 -1 return candidate;12011 -1 }12012 -1 candidate = document.getElementsByName(fragment);12013 -1 if (candidate.length) {12014 -1 return candidate[0];12015 -1 }12016 -1 return null;12017 -1 }12018 -1 __webpack_exports__['default'] = getElementByReference;12019 -1 },12020 -1 './lib/commons/dom/get-element-coordinates.js': function libCommonsDomGetElementCoordinatesJs(module, __webpack_exports__, __webpack_require__) {12021 -1 'use strict';12022 -1 __webpack_require__.r(__webpack_exports__);12023 -1 var _get_scroll_offset__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/get-scroll-offset.js');12024 -1 function getElementCoordinates(element) {12025 -1 'use strict';12026 -1 var scrollOffset = Object(_get_scroll_offset__WEBPACK_IMPORTED_MODULE_0__['default'])(document), xOffset = scrollOffset.left, yOffset = scrollOffset.top, coords = element.getBoundingClientRect();12027 -1 return {12028 -1 top: coords.top + yOffset,12029 -1 right: coords.right + xOffset,12030 -1 bottom: coords.bottom + yOffset,12031 -1 left: coords.left + xOffset,12032 -1 width: coords.right - coords.left,12033 -1 height: coords.bottom - coords.top12034 -1 };-1 32925 return '"' + result + '"'; 12035 32926 }12036 -1 __webpack_exports__['default'] = getElementCoordinates;12037 -1 },12038 -1 './lib/commons/dom/get-element-stack.js': function libCommonsDomGetElementStackJs(module, __webpack_exports__, __webpack_require__) {12039 -1 'use strict';12040 -1 __webpack_require__.r(__webpack_exports__);12041 -1 var _get_rect_stack__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/get-rect-stack.js');12042 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');12043 -1 var _core_base_cache__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/base/cache.js');12044 -1 function getElementStack(node) {12045 -1 if (!_core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].get('gridCreated')) {12046 -1 Object(_get_rect_stack__WEBPACK_IMPORTED_MODULE_0__['createGrid'])();12047 -1 _core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].set('gridCreated', true);12048 -1 }12049 -1 var vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeFromTree'])(node);12050 -1 var grid = vNode._grid;12051 -1 if (!grid) {12052 -1 return [];12053 -1 }12054 -1 return Object(_get_rect_stack__WEBPACK_IMPORTED_MODULE_0__['getRectStack'])(grid, vNode.boundingClientRect);12055 -1 }12056 -1 __webpack_exports__['default'] = getElementStack;12057 -1 },12058 -1 './lib/commons/dom/get-rect-stack.js': function libCommonsDomGetRectStackJs(module, __webpack_exports__, __webpack_require__) {-1 32927 exports.escapeStr = escapeStr; -1 32928 exports.identSpecialChars = { -1 32929 '!': true, -1 32930 '"': true, -1 32931 '#': true, -1 32932 $: true, -1 32933 '%': true, -1 32934 '&': true, -1 32935 '\'': true, -1 32936 '(': true, -1 32937 ')': true, -1 32938 '*': true, -1 32939 '+': true, -1 32940 ',': true, -1 32941 '.': true, -1 32942 '/': true, -1 32943 ';': true, -1 32944 '<': true, -1 32945 '=': true, -1 32946 '>': true, -1 32947 '?': true, -1 32948 '@': true, -1 32949 '[': true, -1 32950 '\\': true, -1 32951 ']': true, -1 32952 '^': true, -1 32953 '`': true, -1 32954 '{': true, -1 32955 '|': true, -1 32956 '}': true, -1 32957 '~': true -1 32958 }; -1 32959 exports.strReplacementsRev = { -1 32960 '\n': '\\n', -1 32961 '\r': '\\r', -1 32962 '\t': '\\t', -1 32963 '\f': '\\f', -1 32964 '\v': '\\v' -1 32965 }; -1 32966 exports.singleQuoteEscapeChars = { -1 32967 n: '\n', -1 32968 r: '\r', -1 32969 t: '\t', -1 32970 f: '\f', -1 32971 '\\': '\\', -1 32972 '\'': '\'' -1 32973 }; -1 32974 exports.doubleQuotesEscapeChars = { -1 32975 n: '\n', -1 32976 r: '\r', -1 32977 t: '\t', -1 32978 f: '\f', -1 32979 '\\': '\\', -1 32980 '"': '"' -1 32981 }; -1 32982 }); -1 32983 var require_parser_context = __commonJS(function(exports) { 12059 32984 'use strict';12060 -1 __webpack_require__.r(__webpack_exports__);12061 -1 __webpack_require__.d(__webpack_exports__, 'createGrid', function() {12062 -1 return createGrid;12063 -1 });12064 -1 __webpack_require__.d(__webpack_exports__, 'getRectStack', function() {12065 -1 return getRectStack;-1 32985 Object.defineProperty(exports, '__esModule', { -1 32986 value: true 12066 32987 });12067 -1 var _is_visible__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/is-visible.js');12068 -1 var _core_base_virtual_node_virtual_node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/virtual-node/virtual-node.js');12069 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');12070 -1 var gridSize = 200;12071 -1 function isStackingContext(vNode, parentVNode) {12072 -1 var position = vNode.getComputedStylePropertyValue('position');12073 -1 var zIndex = vNode.getComputedStylePropertyValue('z-index');12074 -1 if (position === 'fixed' || position === 'sticky') {12075 -1 return true;12076 -1 }12077 -1 if (zIndex !== 'auto' && position !== 'static') {12078 -1 return true;12079 -1 }12080 -1 if (vNode.getComputedStylePropertyValue('opacity') !== '1') {12081 -1 return true;12082 -1 }12083 -1 var transform = vNode.getComputedStylePropertyValue('-webkit-transform') || vNode.getComputedStylePropertyValue('-ms-transform') || vNode.getComputedStylePropertyValue('transform') || 'none';12084 -1 if (transform !== 'none') {12085 -1 return true;12086 -1 }12087 -1 var mixBlendMode = vNode.getComputedStylePropertyValue('mix-blend-mode');12088 -1 if (mixBlendMode && mixBlendMode !== 'normal') {12089 -1 return true;12090 -1 }12091 -1 var filter = vNode.getComputedStylePropertyValue('filter');12092 -1 if (filter && filter !== 'none') {12093 -1 return true;12094 -1 }12095 -1 var perspective = vNode.getComputedStylePropertyValue('perspective');12096 -1 if (perspective && perspective !== 'none') {12097 -1 return true;12098 -1 }12099 -1 var clipPath = vNode.getComputedStylePropertyValue('clip-path');12100 -1 if (clipPath && clipPath !== 'none') {12101 -1 return true;12102 -1 }12103 -1 var mask = vNode.getComputedStylePropertyValue('-webkit-mask') || vNode.getComputedStylePropertyValue('mask') || 'none';12104 -1 if (mask !== 'none') {12105 -1 return true;12106 -1 }12107 -1 var maskImage = vNode.getComputedStylePropertyValue('-webkit-mask-image') || vNode.getComputedStylePropertyValue('mask-image') || 'none';12108 -1 if (maskImage !== 'none') {12109 -1 return true;12110 -1 }12111 -1 var maskBorder = vNode.getComputedStylePropertyValue('-webkit-mask-border') || vNode.getComputedStylePropertyValue('mask-border') || 'none';12112 -1 if (maskBorder !== 'none') {12113 -1 return true;12114 -1 }12115 -1 if (vNode.getComputedStylePropertyValue('isolation') === 'isolate') {12116 -1 return true;12117 -1 }12118 -1 var willChange = vNode.getComputedStylePropertyValue('will-change');12119 -1 if (willChange === 'transform' || willChange === 'opacity') {12120 -1 return true;12121 -1 }12122 -1 if (vNode.getComputedStylePropertyValue('-webkit-overflow-scrolling') === 'touch') {12123 -1 return true;12124 -1 }12125 -1 var contain = vNode.getComputedStylePropertyValue('contain');12126 -1 if ([ 'layout', 'paint', 'strict', 'content' ].includes(contain)) {12127 -1 return true;-1 32988 var utils_1 = require_utils(); -1 32989 function parseCssSelector(str, pos, pseudos, attrEqualityMods, ruleNestingOperators, substitutesEnabled) { -1 32990 var l = str.length; -1 32991 var chr = ''; -1 32992 function getStr(quote, escapeTable) { -1 32993 var result = ''; -1 32994 pos++; -1 32995 chr = str.charAt(pos); -1 32996 while (pos < l) { -1 32997 if (chr === quote) { -1 32998 pos++; -1 32999 return result; -1 33000 } else if (chr === '\\') { -1 33001 pos++; -1 33002 chr = str.charAt(pos); -1 33003 var esc = void 0; -1 33004 if (chr === quote) { -1 33005 result += quote; -1 33006 } else if ((esc = escapeTable[chr]) !== void 0) { -1 33007 result += esc; -1 33008 } else if (utils_1.isHex(chr)) { -1 33009 var hex = chr; -1 33010 pos++; -1 33011 chr = str.charAt(pos); -1 33012 while (utils_1.isHex(chr)) { -1 33013 hex += chr; -1 33014 pos++; -1 33015 chr = str.charAt(pos); -1 33016 } -1 33017 if (chr === ' ') { -1 33018 pos++; -1 33019 chr = str.charAt(pos); -1 33020 } -1 33021 result += String.fromCharCode(parseInt(hex, 16)); -1 33022 continue; -1 33023 } else { -1 33024 result += chr; -1 33025 } -1 33026 } else { -1 33027 result += chr; -1 33028 } -1 33029 pos++; -1 33030 chr = str.charAt(pos); -1 33031 } -1 33032 return result; 12128 33033 }12129 -1 if (zIndex !== 'auto' && parentVNode) {12130 -1 var parentDsiplay = parentVNode.getComputedStylePropertyValue('display');12131 -1 if ([ 'flex', 'inline-flex', 'inline flex', 'grid', 'inline-grid', 'inline grid' ].includes(parentDsiplay)) {12132 -1 return true;-1 33034 function getIdent() { -1 33035 var result = ''; -1 33036 chr = str.charAt(pos); -1 33037 while (pos < l) { -1 33038 if (utils_1.isIdent(chr)) { -1 33039 result += chr; -1 33040 } else if (chr === '\\') { -1 33041 pos++; -1 33042 if (pos >= l) { -1 33043 throw Error('Expected symbol but end of file reached.'); -1 33044 } -1 33045 chr = str.charAt(pos); -1 33046 if (utils_1.identSpecialChars[chr]) { -1 33047 result += chr; -1 33048 } else if (utils_1.isHex(chr)) { -1 33049 var hex = chr; -1 33050 pos++; -1 33051 chr = str.charAt(pos); -1 33052 while (utils_1.isHex(chr)) { -1 33053 hex += chr; -1 33054 pos++; -1 33055 chr = str.charAt(pos); -1 33056 } -1 33057 if (chr === ' ') { -1 33058 pos++; -1 33059 chr = str.charAt(pos); -1 33060 } -1 33061 result += String.fromCharCode(parseInt(hex, 16)); -1 33062 continue; -1 33063 } else { -1 33064 result += chr; -1 33065 } -1 33066 } else { -1 33067 return result; -1 33068 } -1 33069 pos++; -1 33070 chr = str.charAt(pos); 12133 33071 } -1 33072 return result; 12134 33073 }12135 -1 return false;12136 -1 }12137 -1 function isFloated(vNode) {12138 -1 if (!vNode) {12139 -1 return false;-1 33074 function skipWhitespace() { -1 33075 chr = str.charAt(pos); -1 33076 var result = false; -1 33077 while (chr === ' ' || chr === '\t' || chr === '\n' || chr === '\r' || chr === '\f') { -1 33078 result = true; -1 33079 pos++; -1 33080 chr = str.charAt(pos); -1 33081 } -1 33082 return result; 12140 33083 }12141 -1 if (vNode._isFloated !== undefined) {12142 -1 return vNode._isFloated;-1 33084 function parse2() { -1 33085 var res = parseSelector(); -1 33086 if (pos < l) { -1 33087 throw Error('Rule expected but "' + str.charAt(pos) + '" found.'); -1 33088 } -1 33089 return res; 12143 33090 }12144 -1 var floatStyle = vNode.getComputedStylePropertyValue('float');12145 -1 if (floatStyle !== 'none') {12146 -1 vNode._isFloated = true;12147 -1 return true;-1 33091 function parseSelector() { -1 33092 var selector = parseSingleSelector(); -1 33093 if (!selector) { -1 33094 return null; -1 33095 } -1 33096 var res = selector; -1 33097 chr = str.charAt(pos); -1 33098 while (chr === ',') { -1 33099 pos++; -1 33100 skipWhitespace(); -1 33101 if (res.type !== 'selectors') { -1 33102 res = { -1 33103 type: 'selectors', -1 33104 selectors: [ selector ] -1 33105 }; -1 33106 } -1 33107 selector = parseSingleSelector(); -1 33108 if (!selector) { -1 33109 throw Error('Rule expected after ",".'); -1 33110 } -1 33111 res.selectors.push(selector); -1 33112 } -1 33113 return res; 12148 33114 }12149 -1 var floated = isFloated(vNode.parent);12150 -1 vNode._isFloated = floated;12151 -1 return floated;12152 -1 }12153 -1 function getPositionOrder(vNode) {12154 -1 if (vNode.getComputedStylePropertyValue('position') === 'static') {12155 -1 if (vNode.getComputedStylePropertyValue('display').indexOf('inline') !== -1) {12156 -1 return 2;-1 33115 function parseSingleSelector() { -1 33116 skipWhitespace(); -1 33117 var selector = { -1 33118 type: 'ruleSet' -1 33119 }; -1 33120 var rule3 = parseRule(); -1 33121 if (!rule3) { -1 33122 return null; 12157 33123 }12158 -1 if (isFloated(vNode)) {12159 -1 return 1;-1 33124 var currentRule = selector; -1 33125 while (rule3) { -1 33126 rule3.type = 'rule'; -1 33127 currentRule.rule = rule3; -1 33128 currentRule = rule3; -1 33129 skipWhitespace(); -1 33130 chr = str.charAt(pos); -1 33131 if (pos >= l || chr === ',' || chr === ')') { -1 33132 break; -1 33133 } -1 33134 if (ruleNestingOperators[chr]) { -1 33135 var op = chr; -1 33136 pos++; -1 33137 skipWhitespace(); -1 33138 rule3 = parseRule(); -1 33139 if (!rule3) { -1 33140 throw Error('Rule expected after "' + op + '".'); -1 33141 } -1 33142 rule3.nestingOperator = op; -1 33143 } else { -1 33144 rule3 = parseRule(); -1 33145 if (rule3) { -1 33146 rule3.nestingOperator = null; -1 33147 } -1 33148 } 12160 33149 }12161 -1 return 0;-1 33150 return selector; -1 33151 } -1 33152 function parseRule() { -1 33153 var rule3 = null; -1 33154 while (pos < l) { -1 33155 chr = str.charAt(pos); -1 33156 if (chr === '*') { -1 33157 pos++; -1 33158 (rule3 = rule3 || {}).tagName = '*'; -1 33159 } else if (utils_1.isIdentStart(chr) || chr === '\\') { -1 33160 (rule3 = rule3 || {}).tagName = getIdent(); -1 33161 } else if (chr === '.') { -1 33162 pos++; -1 33163 rule3 = rule3 || {}; -1 33164 (rule3.classNames = rule3.classNames || []).push(getIdent()); -1 33165 } else if (chr === '#') { -1 33166 pos++; -1 33167 (rule3 = rule3 || {}).id = getIdent(); -1 33168 } else if (chr === '[') { -1 33169 pos++; -1 33170 skipWhitespace(); -1 33171 var attr = { -1 33172 name: getIdent() -1 33173 }; -1 33174 skipWhitespace(); -1 33175 if (chr === ']') { -1 33176 pos++; -1 33177 } else { -1 33178 var operator = ''; -1 33179 if (attrEqualityMods[chr]) { -1 33180 operator = chr; -1 33181 pos++; -1 33182 chr = str.charAt(pos); -1 33183 } -1 33184 if (pos >= l) { -1 33185 throw Error('Expected "=" but end of file reached.'); -1 33186 } -1 33187 if (chr !== '=') { -1 33188 throw Error('Expected "=" but "' + chr + '" found.'); -1 33189 } -1 33190 attr.operator = operator + '='; -1 33191 pos++; -1 33192 skipWhitespace(); -1 33193 var attrValue = ''; -1 33194 attr.valueType = 'string'; -1 33195 if (chr === '"') { -1 33196 attrValue = getStr('"', utils_1.doubleQuotesEscapeChars); -1 33197 } else if (chr === '\'') { -1 33198 attrValue = getStr('\'', utils_1.singleQuoteEscapeChars); -1 33199 } else if (substitutesEnabled && chr === '$') { -1 33200 pos++; -1 33201 attrValue = getIdent(); -1 33202 attr.valueType = 'substitute'; -1 33203 } else { -1 33204 while (pos < l) { -1 33205 if (chr === ']') { -1 33206 break; -1 33207 } -1 33208 attrValue += chr; -1 33209 pos++; -1 33210 chr = str.charAt(pos); -1 33211 } -1 33212 attrValue = attrValue.trim(); -1 33213 } -1 33214 skipWhitespace(); -1 33215 if (pos >= l) { -1 33216 throw Error('Expected "]" but end of file reached.'); -1 33217 } -1 33218 if (chr !== ']') { -1 33219 throw Error('Expected "]" but "' + chr + '" found.'); -1 33220 } -1 33221 pos++; -1 33222 attr.value = attrValue; -1 33223 } -1 33224 rule3 = rule3 || {}; -1 33225 (rule3.attrs = rule3.attrs || []).push(attr); -1 33226 } else if (chr === ':') { -1 33227 pos++; -1 33228 var pseudoName = getIdent(); -1 33229 var pseudo = { -1 33230 name: pseudoName -1 33231 }; -1 33232 if (chr === '(') { -1 33233 pos++; -1 33234 var value = ''; -1 33235 skipWhitespace(); -1 33236 if (pseudos[pseudoName] === 'selector') { -1 33237 pseudo.valueType = 'selector'; -1 33238 value = parseSelector(); -1 33239 } else { -1 33240 pseudo.valueType = pseudos[pseudoName] || 'string'; -1 33241 if (chr === '"') { -1 33242 value = getStr('"', utils_1.doubleQuotesEscapeChars); -1 33243 } else if (chr === '\'') { -1 33244 value = getStr('\'', utils_1.singleQuoteEscapeChars); -1 33245 } else if (substitutesEnabled && chr === '$') { -1 33246 pos++; -1 33247 value = getIdent(); -1 33248 pseudo.valueType = 'substitute'; -1 33249 } else { -1 33250 while (pos < l) { -1 33251 if (chr === ')') { -1 33252 break; -1 33253 } -1 33254 value += chr; -1 33255 pos++; -1 33256 chr = str.charAt(pos); -1 33257 } -1 33258 value = value.trim(); -1 33259 } -1 33260 skipWhitespace(); -1 33261 } -1 33262 if (pos >= l) { -1 33263 throw Error('Expected ")" but end of file reached.'); -1 33264 } -1 33265 if (chr !== ')') { -1 33266 throw Error('Expected ")" but "' + chr + '" found.'); -1 33267 } -1 33268 pos++; -1 33269 pseudo.value = value; -1 33270 } -1 33271 rule3 = rule3 || {}; -1 33272 (rule3.pseudos = rule3.pseudos || []).push(pseudo); -1 33273 } else { -1 33274 break; -1 33275 } -1 33276 } -1 33277 return rule3; 12162 33278 }12163 -1 return 3;-1 33279 return parse2(); 12164 33280 }12165 -1 function visuallySort(a, b) {12166 -1 for (var i = 0; i < a._stackingOrder.length; i++) {12167 -1 if (typeof b._stackingOrder[i] === 'undefined') {12168 -1 return -1;-1 33281 exports.parseCssSelector = parseCssSelector; -1 33282 }); -1 33283 var require_render = __commonJS(function(exports) { -1 33284 'use strict'; -1 33285 Object.defineProperty(exports, '__esModule', { -1 33286 value: true -1 33287 }); -1 33288 var utils_1 = require_utils(); -1 33289 function renderEntity(entity) { -1 33290 var res = ''; -1 33291 switch (entity.type) { -1 33292 case 'ruleSet': -1 33293 var currentEntity = entity.rule; -1 33294 var parts = []; -1 33295 while (currentEntity) { -1 33296 if (currentEntity.nestingOperator) { -1 33297 parts.push(currentEntity.nestingOperator); -1 33298 } -1 33299 parts.push(renderEntity(currentEntity)); -1 33300 currentEntity = currentEntity.rule; 12169 33301 }12170 -1 if (b._stackingOrder[i] > a._stackingOrder[i]) {12171 -1 return 1;-1 33302 res = parts.join(' '); -1 33303 break; -1 33304 -1 33305 case 'selectors': -1 33306 res = entity.selectors.map(renderEntity).join(', '); -1 33307 break; -1 33308 -1 33309 case 'rule': -1 33310 if (entity.tagName) { -1 33311 if (entity.tagName === '*') { -1 33312 res = '*'; -1 33313 } else { -1 33314 res = utils_1.escapeIdentifier(entity.tagName); -1 33315 } 12172 33316 }12173 -1 if (b._stackingOrder[i] < a._stackingOrder[i]) {12174 -1 return -1;-1 33317 if (entity.id) { -1 33318 res += '#' + utils_1.escapeIdentifier(entity.id); 12175 33319 }12176 -1 }12177 -1 var aNode = a.actualNode;12178 -1 var bNode = b.actualNode;12179 -1 if (aNode.getRootNode && aNode.getRootNode() !== bNode.getRootNode()) {12180 -1 var boundaries = [];12181 -1 while (aNode) {12182 -1 boundaries.push({12183 -1 root: aNode.getRootNode(),12184 -1 node: aNode12185 -1 });12186 -1 aNode = aNode.getRootNode().host;12187 -1 }12188 -1 while (bNode && !boundaries.find(function(boundary) {12189 -1 return boundary.root === bNode.getRootNode();12190 -1 })) {12191 -1 bNode = bNode.getRootNode().host;12192 -1 }12193 -1 aNode = boundaries.find(function(boundary) {12194 -1 return boundary.root === bNode.getRootNode();12195 -1 }).node;12196 -1 if (aNode === bNode) {12197 -1 return a.actualNode.getRootNode() !== aNode.getRootNode() ? -1 : 1;12198 -1 }12199 -1 }12200 -1 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;12201 -1 var docPosition = aNode.compareDocumentPosition(bNode);12202 -1 var DOMOrder = docPosition & DOCUMENT_POSITION_FOLLOWING ? 1 : -1;12203 -1 var isDescendant = docPosition & DOCUMENT_POSITION_CONTAINS || docPosition & DOCUMENT_POSITION_CONTAINED_BY;12204 -1 var aPosition = getPositionOrder(a);12205 -1 var bPosition = getPositionOrder(b);12206 -1 if (aPosition === bPosition || isDescendant) {12207 -1 return DOMOrder;12208 -1 }12209 -1 return bPosition - aPosition;12210 -1 }12211 -1 function getStackingOrder(vNode, parentVNode) {12212 -1 var stackingOrder = parentVNode._stackingOrder.slice();12213 -1 var zIndex = vNode.getComputedStylePropertyValue('z-index');12214 -1 if (zIndex !== 'auto') {12215 -1 stackingOrder[stackingOrder.length - 1] = parseInt(zIndex);12216 -1 }12217 -1 if (isStackingContext(vNode, parentVNode)) {12218 -1 stackingOrder.push(0);12219 -1 }12220 -1 return stackingOrder;12221 -1 }12222 -1 function findScrollRegionParent(vNode, parentVNode) {12223 -1 var scrollRegionParent = null;12224 -1 var checkedNodes = [ vNode ];12225 -1 while (parentVNode) {12226 -1 if (parentVNode._scrollRegionParent) {12227 -1 scrollRegionParent = parentVNode._scrollRegionParent;12228 -1 break;-1 33320 if (entity.classNames) { -1 33321 res += entity.classNames.map(function(cn) { -1 33322 return '.' + utils_1.escapeIdentifier(cn); -1 33323 }).join(''); 12229 33324 }12230 -1 if (Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getScroll'])(parentVNode.actualNode)) {12231 -1 scrollRegionParent = parentVNode;12232 -1 break;-1 33325 if (entity.attrs) { -1 33326 res += entity.attrs.map(function(attr) { -1 33327 if ('operator' in attr) { -1 33328 if (attr.valueType === 'substitute') { -1 33329 return '[' + utils_1.escapeIdentifier(attr.name) + attr.operator + '$' + attr.value + ']'; -1 33330 } else { -1 33331 return '[' + utils_1.escapeIdentifier(attr.name) + attr.operator + utils_1.escapeStr(attr.value) + ']'; -1 33332 } -1 33333 } else { -1 33334 return '[' + utils_1.escapeIdentifier(attr.name) + ']'; -1 33335 } -1 33336 }).join(''); 12233 33337 }12234 -1 checkedNodes.push(parentVNode);12235 -1 parentVNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getNodeFromTree'])(parentVNode.actualNode.parentElement || parentVNode.actualNode.parentNode);12236 -1 }12237 -1 checkedNodes.forEach(function(vNode) {12238 -1 return vNode._scrollRegionParent = scrollRegionParent;12239 -1 });12240 -1 return scrollRegionParent;12241 -1 }12242 -1 function addNodeToGrid(grid, vNode) {12243 -1 vNode._grid = grid;12244 -1 vNode.clientRects.forEach(function(rect) {12245 -1 var x = rect.left;12246 -1 var y = rect.top;12247 -1 var startRow = y / gridSize | 0;12248 -1 var startCol = x / gridSize | 0;12249 -1 var endRow = (y + rect.height) / gridSize | 0;12250 -1 var endCol = (x + rect.width) / gridSize | 0;12251 -1 for (var row = startRow; row <= endRow; row++) {12252 -1 grid.cells[row] = grid.cells[row] || [];12253 -1 for (var col = startCol; col <= endCol; col++) {12254 -1 grid.cells[row][col] = grid.cells[row][col] || [];12255 -1 if (!grid.cells[row][col].includes(vNode)) {12256 -1 grid.cells[row][col].push(vNode);-1 33338 if (entity.pseudos) { -1 33339 res += entity.pseudos.map(function(pseudo) { -1 33340 if (pseudo.valueType) { -1 33341 if (pseudo.valueType === 'selector') { -1 33342 return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + renderEntity(pseudo.value) + ')'; -1 33343 } else if (pseudo.valueType === 'substitute') { -1 33344 return ':' + utils_1.escapeIdentifier(pseudo.name) + '($' + pseudo.value + ')'; -1 33345 } else if (pseudo.valueType === 'numeric') { -1 33346 return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + pseudo.value + ')'; -1 33347 } else { -1 33348 return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + utils_1.escapeIdentifier(pseudo.value) + ')'; -1 33349 } -1 33350 } else { -1 33351 return ':' + utils_1.escapeIdentifier(pseudo.name); 12257 33352 }12258 -1 }-1 33353 }).join(''); 12259 33354 }12260 -1 });-1 33355 break; -1 33356 -1 33357 default: -1 33358 throw Error('Unknown entity type: "' + entity.type + '".'); -1 33359 } -1 33360 return res; 12261 33361 }12262 -1 function createGrid() {12263 -1 var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;12264 -1 var rootGrid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {12265 -1 container: null,12266 -1 cells: []-1 33362 exports.renderEntity = renderEntity; -1 33363 }); -1 33364 var require_lib = __commonJS(function(exports) { -1 33365 'use strict'; -1 33366 Object.defineProperty(exports, '__esModule', { -1 33367 value: true -1 33368 }); -1 33369 var parser_context_1 = require_parser_context(); -1 33370 var render_1 = require_render(); -1 33371 var CssSelectorParser3 = function() { -1 33372 function CssSelectorParser4() { -1 33373 this.pseudos = {}; -1 33374 this.attrEqualityMods = {}; -1 33375 this.ruleNestingOperators = {}; -1 33376 this.substitutesEnabled = false; -1 33377 } -1 33378 CssSelectorParser4.prototype.registerSelectorPseudos = function() { -1 33379 var pseudos = []; -1 33380 for (var _i = 0; _i < arguments.length; _i++) { -1 33381 pseudos[_i] = arguments[_i]; -1 33382 } -1 33383 for (var _a = 0, pseudos_1 = pseudos; _a < pseudos_1.length; _a++) { -1 33384 var pseudo = pseudos_1[_a]; -1 33385 this.pseudos[pseudo] = 'selector'; -1 33386 } -1 33387 return this; 12267 33388 };12268 -1 var parentVNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;12269 -1 if (!parentVNode) {12270 -1 var vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getNodeFromTree'])(document.documentElement);12271 -1 if (!vNode) {12272 -1 vNode = new _core_base_virtual_node_virtual_node__WEBPACK_IMPORTED_MODULE_1__['default'](document.documentElement);12273 -1 }12274 -1 vNode._stackingOrder = [ 0 ];12275 -1 addNodeToGrid(rootGrid, vNode);12276 -1 if (Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getScroll'])(vNode.actualNode)) {12277 -1 var subGrid = {12278 -1 container: vNode,12279 -1 cells: []12280 -1 };12281 -1 vNode._subGrid = subGrid;-1 33389 CssSelectorParser4.prototype.unregisterSelectorPseudos = function() { -1 33390 var pseudos = []; -1 33391 for (var _i = 0; _i < arguments.length; _i++) { -1 33392 pseudos[_i] = arguments[_i]; 12282 33393 }12283 -1 }12284 -1 var treeWalker = document.createTreeWalker(root, window.NodeFilter.SHOW_ELEMENT, null, false);12285 -1 var node = parentVNode ? treeWalker.nextNode() : treeWalker.currentNode;12286 -1 while (node) {12287 -1 var _vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getNodeFromTree'])(node);12288 -1 if (node.parentElement) {12289 -1 parentVNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getNodeFromTree'])(node.parentElement);12290 -1 } else if (node.parentNode && Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getNodeFromTree'])(node.parentNode)) {12291 -1 parentVNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getNodeFromTree'])(node.parentNode);12292 -1 }12293 -1 if (!_vNode) {12294 -1 _vNode = new axe.VirtualNode(node, parentVNode);12295 -1 }12296 -1 _vNode._stackingOrder = getStackingOrder(_vNode, parentVNode);12297 -1 var scrollRegionParent = findScrollRegionParent(_vNode, parentVNode);12298 -1 var grid = scrollRegionParent ? scrollRegionParent._subGrid : rootGrid;12299 -1 if (Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getScroll'])(_vNode.actualNode)) {12300 -1 var _subGrid = {12301 -1 container: _vNode,12302 -1 cells: []12303 -1 };12304 -1 _vNode._subGrid = _subGrid;-1 33394 for (var _a = 0, pseudos_2 = pseudos; _a < pseudos_2.length; _a++) { -1 33395 var pseudo = pseudos_2[_a]; -1 33396 delete this.pseudos[pseudo]; 12305 33397 }12306 -1 var rect = _vNode.boundingClientRect;12307 -1 if (rect.width !== 0 && rect.height !== 0 && Object(_is_visible__WEBPACK_IMPORTED_MODULE_0__['default'])(node)) {12308 -1 addNodeToGrid(grid, _vNode);-1 33398 return this; -1 33399 }; -1 33400 CssSelectorParser4.prototype.registerNumericPseudos = function() { -1 33401 var pseudos = []; -1 33402 for (var _i = 0; _i < arguments.length; _i++) { -1 33403 pseudos[_i] = arguments[_i]; 12309 33404 }12310 -1 if (Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['isShadowRoot'])(node)) {12311 -1 createGrid(node.shadowRoot, grid, _vNode);-1 33405 for (var _a = 0, pseudos_3 = pseudos; _a < pseudos_3.length; _a++) { -1 33406 var pseudo = pseudos_3[_a]; -1 33407 this.pseudos[pseudo] = 'numeric'; 12312 33408 }12313 -1 node = treeWalker.nextNode();12314 -1 }12315 -1 }12316 -1 function getRectStack(grid, rect) {12317 -1 var recursed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;12318 -1 var x = rect.left + rect.width / 2;12319 -1 var y = rect.top + rect.height / 2;12320 -1 var row = y / gridSize | 0;12321 -1 var col = x / gridSize | 0;12322 -1 var stack = grid.cells[row][col].filter(function(gridCellNode) {12323 -1 return gridCellNode.clientRects.find(function(clientRect) {12324 -1 var rectX = clientRect.left;12325 -1 var rectY = clientRect.top;12326 -1 return x <= rectX + clientRect.width && x >= rectX && y <= rectY + clientRect.height && y >= rectY;12327 -1 });12328 -1 });12329 -1 var gridContainer = grid.container;12330 -1 if (gridContainer) {12331 -1 stack = getRectStack(gridContainer._grid, gridContainer.boundingClientRect, true).concat(stack);12332 -1 }12333 -1 if (!recursed) {12334 -1 stack = stack.sort(visuallySort).map(function(vNode) {12335 -1 return vNode.actualNode;12336 -1 }).concat(document.documentElement).filter(function(node, index, array) {12337 -1 return array.indexOf(node) === index;12338 -1 });12339 -1 }12340 -1 return stack;12341 -1 }12342 -1 },12343 -1 './lib/commons/dom/get-root-node.js': function libCommonsDomGetRootNodeJs(module, __webpack_exports__, __webpack_require__) {12344 -1 'use strict';12345 -1 __webpack_require__.r(__webpack_exports__);12346 -1 var _core_utils_get_root_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/get-root-node.js');12347 -1 __webpack_exports__['default'] = _core_utils_get_root_node__WEBPACK_IMPORTED_MODULE_0__['default'];12348 -1 },12349 -1 './lib/commons/dom/get-scroll-offset.js': function libCommonsDomGetScrollOffsetJs(module, __webpack_exports__, __webpack_require__) {12350 -1 'use strict';12351 -1 __webpack_require__.r(__webpack_exports__);12352 -1 function getScrollOffset(element) {12353 -1 'use strict';12354 -1 if (!element.nodeType && element.document) {12355 -1 element = element.document;12356 -1 }12357 -1 if (element.nodeType === 9) {12358 -1 var docElement = element.documentElement, body = element.body;12359 -1 return {12360 -1 left: docElement && docElement.scrollLeft || body && body.scrollLeft || 0,12361 -1 top: docElement && docElement.scrollTop || body && body.scrollTop || 012362 -1 };12363 -1 }12364 -1 return {12365 -1 left: element.scrollLeft,12366 -1 top: element.scrollTop-1 33409 return this; 12367 33410 };12368 -1 }12369 -1 __webpack_exports__['default'] = getScrollOffset;12370 -1 },12371 -1 './lib/commons/dom/get-tabbable-elements.js': function libCommonsDomGetTabbableElementsJs(module, __webpack_exports__, __webpack_require__) {12372 -1 'use strict';12373 -1 __webpack_require__.r(__webpack_exports__);12374 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');12375 -1 function getTabbableElements(virtualNode) {12376 -1 var nodeAndDescendents = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['querySelectorAll'])(virtualNode, '*');12377 -1 var tabbableElements = nodeAndDescendents.filter(function(vNode) {12378 -1 var isFocusable = vNode.isFocusable;12379 -1 var tabIndex = vNode.actualNode.getAttribute('tabindex');12380 -1 tabIndex = tabIndex && !isNaN(parseInt(tabIndex, 10)) ? parseInt(tabIndex) : null;12381 -1 return tabIndex ? isFocusable && tabIndex >= 0 : isFocusable;12382 -1 });12383 -1 return tabbableElements;12384 -1 }12385 -1 __webpack_exports__['default'] = getTabbableElements;12386 -1 },12387 -1 './lib/commons/dom/get-text-element-stack.js': function libCommonsDomGetTextElementStackJs(module, __webpack_exports__, __webpack_require__) {12388 -1 'use strict';12389 -1 __webpack_require__.r(__webpack_exports__);12390 -1 var _get_element_stack__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/get-element-stack.js');12391 -1 var _get_rect_stack__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/get-rect-stack.js');12392 -1 var _text_sanitize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/text/sanitize.js');12393 -1 var _core_base_cache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/base/cache.js');12394 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/core/utils/index.js');12395 -1 function getTextElementStack(node) {12396 -1 if (!_core_base_cache__WEBPACK_IMPORTED_MODULE_3__['default'].get('gridCreated')) {12397 -1 Object(_get_rect_stack__WEBPACK_IMPORTED_MODULE_1__['createGrid'])();12398 -1 _core_base_cache__WEBPACK_IMPORTED_MODULE_3__['default'].set('gridCreated', true);12399 -1 }12400 -1 var vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_4__['getNodeFromTree'])(node);12401 -1 var grid = vNode._grid;12402 -1 if (!grid) {12403 -1 return [];12404 -1 }12405 -1 var whiteSpace = vNode.getComputedStylePropertyValue('white-space');12406 -1 var overflow = vNode.getComputedStylePropertyValue('overflow');12407 -1 if (whiteSpace === 'nowrap' && overflow === 'hidden') {12408 -1 return [ Object(_get_element_stack__WEBPACK_IMPORTED_MODULE_0__['default'])(node) ];12409 -1 }12410 -1 var clientRects = [];12411 -1 Array.from(node.childNodes).forEach(function(elm) {12412 -1 if (elm.nodeType === 3 && Object(_text_sanitize__WEBPACK_IMPORTED_MODULE_2__['default'])(elm.textContent) !== '') {12413 -1 var range = document.createRange();12414 -1 range.selectNodeContents(elm);12415 -1 var rects = range.getClientRects();12416 -1 for (var i = 0; i < rects.length; i++) {12417 -1 var rect = rects[i];12418 -1 if (rect.width >= 1 && rect.height >= 1) {12419 -1 clientRects.push(rect);12420 -1 }12421 -1 }-1 33411 CssSelectorParser4.prototype.unregisterNumericPseudos = function() { -1 33412 var pseudos = []; -1 33413 for (var _i = 0; _i < arguments.length; _i++) { -1 33414 pseudos[_i] = arguments[_i]; 12422 33415 }12423 -1 });12424 -1 return clientRects.map(function(rect) {12425 -1 return Object(_get_rect_stack__WEBPACK_IMPORTED_MODULE_1__['getRectStack'])(grid, rect);12426 -1 });12427 -1 }12428 -1 __webpack_exports__['default'] = getTextElementStack;12429 -1 },12430 -1 './lib/commons/dom/get-viewport-size.js': function libCommonsDomGetViewportSizeJs(module, __webpack_exports__, __webpack_require__) {12431 -1 'use strict';12432 -1 __webpack_require__.r(__webpack_exports__);12433 -1 function getViewportSize(win) {12434 -1 'use strict';12435 -1 var doc = win.document;12436 -1 var docElement = doc.documentElement;12437 -1 if (win.innerWidth) {12438 -1 return {12439 -1 width: win.innerWidth,12440 -1 height: win.innerHeight12441 -1 };12442 -1 }12443 -1 if (docElement) {12444 -1 return {12445 -1 width: docElement.clientWidth,12446 -1 height: docElement.clientHeight12447 -1 };12448 -1 }12449 -1 var body = doc.body;12450 -1 return {12451 -1 width: body.clientWidth,12452 -1 height: body.clientHeight-1 33416 for (var _a = 0, pseudos_4 = pseudos; _a < pseudos_4.length; _a++) { -1 33417 var pseudo = pseudos_4[_a]; -1 33418 delete this.pseudos[pseudo]; -1 33419 } -1 33420 return this; 12453 33421 };12454 -1 }12455 -1 __webpack_exports__['default'] = getViewportSize;12456 -1 },12457 -1 './lib/commons/dom/has-content-virtual.js': function libCommonsDomHasContentVirtualJs(module, __webpack_exports__, __webpack_require__) {12458 -1 'use strict';12459 -1 __webpack_require__.r(__webpack_exports__);12460 -1 var _is_visual_content__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/is-visual-content.js');12461 -1 var _aria_label_virtual__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/label-virtual.js');12462 -1 var hiddenTextElms = [ 'HEAD', 'TITLE', 'TEMPLATE', 'SCRIPT', 'STYLE', 'IFRAME', 'OBJECT', 'VIDEO', 'AUDIO', 'NOSCRIPT' ];12463 -1 function hasChildTextNodes(elm) {12464 -1 if (!hiddenTextElms.includes(elm.actualNode.nodeName.toUpperCase())) {12465 -1 return elm.children.some(function(_ref44) {12466 -1 var actualNode = _ref44.actualNode;12467 -1 return actualNode.nodeType === 3 && actualNode.nodeValue.trim();12468 -1 });12469 -1 }12470 -1 }12471 -1 function hasContentVirtual(elm, noRecursion, ignoreAria) {12472 -1 return hasChildTextNodes(elm) || Object(_is_visual_content__WEBPACK_IMPORTED_MODULE_0__['default'])(elm.actualNode) || !ignoreAria && !!Object(_aria_label_virtual__WEBPACK_IMPORTED_MODULE_1__['default'])(elm) || !noRecursion && elm.children.some(function(child) {12473 -1 return child.actualNode.nodeType === 1 && hasContentVirtual(child);12474 -1 });12475 -1 }12476 -1 __webpack_exports__['default'] = hasContentVirtual;12477 -1 },12478 -1 './lib/commons/dom/has-content.js': function libCommonsDomHasContentJs(module, __webpack_exports__, __webpack_require__) {12479 -1 'use strict';12480 -1 __webpack_require__.r(__webpack_exports__);12481 -1 var _has_content_virtual__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/has-content-virtual.js');12482 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');12483 -1 function hasContent(elm, noRecursion, ignoreAria) {12484 -1 elm = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeFromTree'])(elm);12485 -1 return Object(_has_content_virtual__WEBPACK_IMPORTED_MODULE_0__['default'])(elm, noRecursion, ignoreAria);12486 -1 }12487 -1 __webpack_exports__['default'] = hasContent;12488 -1 },12489 -1 './lib/commons/dom/idrefs.js': function libCommonsDomIdrefsJs(module, __webpack_exports__, __webpack_require__) {12490 -1 'use strict';12491 -1 __webpack_require__.r(__webpack_exports__);12492 -1 var _get_root_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/get-root-node.js');12493 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');12494 -1 function idrefs(node, attr) {12495 -1 node = node.actualNode || node;12496 -1 try {12497 -1 var doc = Object(_get_root_node__WEBPACK_IMPORTED_MODULE_0__['default'])(node);12498 -1 var result = [];12499 -1 var attrValue = node.getAttribute(attr);12500 -1 if (attrValue) {12501 -1 attrValue = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['tokenList'])(attrValue);12502 -1 for (var index = 0; index < attrValue.length; index++) {12503 -1 result.push(doc.getElementById(attrValue[index]));12504 -1 }-1 33422 CssSelectorParser4.prototype.registerNestingOperators = function() { -1 33423 var operators = []; -1 33424 for (var _i = 0; _i < arguments.length; _i++) { -1 33425 operators[_i] = arguments[_i]; 12505 33426 }12506 -1 return result;12507 -1 } catch (e) {12508 -1 throw new TypeError('Cannot resolve id references for non-DOM nodes');12509 -1 }12510 -1 }12511 -1 __webpack_exports__['default'] = idrefs;12512 -1 },12513 -1 './lib/commons/dom/index.js': function libCommonsDomIndexJs(module, __webpack_exports__, __webpack_require__) {12514 -1 'use strict';12515 -1 __webpack_require__.r(__webpack_exports__);12516 -1 var _find_elms_in_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/find-elms-in-context.js');12517 -1 __webpack_require__.d(__webpack_exports__, 'findElmsInContext', function() {12518 -1 return _find_elms_in_context__WEBPACK_IMPORTED_MODULE_0__['default'];12519 -1 });12520 -1 var _find_up_virtual__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/find-up-virtual.js');12521 -1 __webpack_require__.d(__webpack_exports__, 'findUpVirtual', function() {12522 -1 return _find_up_virtual__WEBPACK_IMPORTED_MODULE_1__['default'];12523 -1 });12524 -1 var _find_up__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/dom/find-up.js');12525 -1 __webpack_require__.d(__webpack_exports__, 'findUp', function() {12526 -1 return _find_up__WEBPACK_IMPORTED_MODULE_2__['default'];12527 -1 });12528 -1 var _get_composed_parent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/dom/get-composed-parent.js');12529 -1 __webpack_require__.d(__webpack_exports__, 'getComposedParent', function() {12530 -1 return _get_composed_parent__WEBPACK_IMPORTED_MODULE_3__['default'];12531 -1 });12532 -1 var _get_element_by_reference__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/dom/get-element-by-reference.js');12533 -1 __webpack_require__.d(__webpack_exports__, 'getElementByReference', function() {12534 -1 return _get_element_by_reference__WEBPACK_IMPORTED_MODULE_4__['default'];12535 -1 });12536 -1 var _get_element_coordinates__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/dom/get-element-coordinates.js');12537 -1 __webpack_require__.d(__webpack_exports__, 'getElementCoordinates', function() {12538 -1 return _get_element_coordinates__WEBPACK_IMPORTED_MODULE_5__['default'];12539 -1 });12540 -1 var _get_element_stack__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/commons/dom/get-element-stack.js');12541 -1 __webpack_require__.d(__webpack_exports__, 'getElementStack', function() {12542 -1 return _get_element_stack__WEBPACK_IMPORTED_MODULE_6__['default'];12543 -1 });12544 -1 var _get_root_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/commons/dom/get-root-node.js');12545 -1 __webpack_require__.d(__webpack_exports__, 'getRootNode', function() {12546 -1 return _get_root_node__WEBPACK_IMPORTED_MODULE_7__['default'];12547 -1 });12548 -1 var _get_scroll_offset__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__('./lib/commons/dom/get-scroll-offset.js');12549 -1 __webpack_require__.d(__webpack_exports__, 'getScrollOffset', function() {12550 -1 return _get_scroll_offset__WEBPACK_IMPORTED_MODULE_8__['default'];12551 -1 });12552 -1 var _get_tabbable_elements__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__('./lib/commons/dom/get-tabbable-elements.js');12553 -1 __webpack_require__.d(__webpack_exports__, 'getTabbableElements', function() {12554 -1 return _get_tabbable_elements__WEBPACK_IMPORTED_MODULE_9__['default'];12555 -1 });12556 -1 var _get_text_element_stack__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__('./lib/commons/dom/get-text-element-stack.js');12557 -1 __webpack_require__.d(__webpack_exports__, 'getTextElementStack', function() {12558 -1 return _get_text_element_stack__WEBPACK_IMPORTED_MODULE_10__['default'];12559 -1 });12560 -1 var _get_viewport_size__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__('./lib/commons/dom/get-viewport-size.js');12561 -1 __webpack_require__.d(__webpack_exports__, 'getViewportSize', function() {12562 -1 return _get_viewport_size__WEBPACK_IMPORTED_MODULE_11__['default'];12563 -1 });12564 -1 var _has_content_virtual__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__('./lib/commons/dom/has-content-virtual.js');12565 -1 __webpack_require__.d(__webpack_exports__, 'hasContentVirtual', function() {12566 -1 return _has_content_virtual__WEBPACK_IMPORTED_MODULE_12__['default'];12567 -1 });12568 -1 var _has_content__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__('./lib/commons/dom/has-content.js');12569 -1 __webpack_require__.d(__webpack_exports__, 'hasContent', function() {12570 -1 return _has_content__WEBPACK_IMPORTED_MODULE_13__['default'];12571 -1 });12572 -1 var _idrefs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__('./lib/commons/dom/idrefs.js');12573 -1 __webpack_require__.d(__webpack_exports__, 'idrefs', function() {12574 -1 return _idrefs__WEBPACK_IMPORTED_MODULE_14__['default'];12575 -1 });12576 -1 var _inserted_into_focus_order__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__('./lib/commons/dom/inserted-into-focus-order.js');12577 -1 __webpack_require__.d(__webpack_exports__, 'insertedIntoFocusOrder', function() {12578 -1 return _inserted_into_focus_order__WEBPACK_IMPORTED_MODULE_15__['default'];12579 -1 });12580 -1 var _is_focusable__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__('./lib/commons/dom/is-focusable.js');12581 -1 __webpack_require__.d(__webpack_exports__, 'isFocusable', function() {12582 -1 return _is_focusable__WEBPACK_IMPORTED_MODULE_16__['default'];12583 -1 });12584 -1 var _is_hidden_with_css__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__('./lib/commons/dom/is-hidden-with-css.js');12585 -1 __webpack_require__.d(__webpack_exports__, 'isHiddenWithCSS', function() {12586 -1 return _is_hidden_with_css__WEBPACK_IMPORTED_MODULE_17__['default'];12587 -1 });12588 -1 var _is_html5__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__('./lib/commons/dom/is-html5.js');12589 -1 __webpack_require__.d(__webpack_exports__, 'isHTML5', function() {12590 -1 return _is_html5__WEBPACK_IMPORTED_MODULE_18__['default'];12591 -1 });12592 -1 var _is_in_text_block__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__('./lib/commons/dom/is-in-text-block.js');12593 -1 __webpack_require__.d(__webpack_exports__, 'isInTextBlock', function() {12594 -1 return _is_in_text_block__WEBPACK_IMPORTED_MODULE_19__['default'];12595 -1 });12596 -1 var _is_modal_open__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__('./lib/commons/dom/is-modal-open.js');12597 -1 __webpack_require__.d(__webpack_exports__, 'isModalOpen', function() {12598 -1 return _is_modal_open__WEBPACK_IMPORTED_MODULE_20__['default'];12599 -1 });12600 -1 var _is_natively_focusable__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__('./lib/commons/dom/is-natively-focusable.js');12601 -1 __webpack_require__.d(__webpack_exports__, 'isNativelyFocusable', function() {12602 -1 return _is_natively_focusable__WEBPACK_IMPORTED_MODULE_21__['default'];12603 -1 });12604 -1 var _is_node__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__('./lib/commons/dom/is-node.js');12605 -1 __webpack_require__.d(__webpack_exports__, 'isNode', function() {12606 -1 return _is_node__WEBPACK_IMPORTED_MODULE_22__['default'];12607 -1 });12608 -1 var _is_offscreen__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__('./lib/commons/dom/is-offscreen.js');12609 -1 __webpack_require__.d(__webpack_exports__, 'isOffscreen', function() {12610 -1 return _is_offscreen__WEBPACK_IMPORTED_MODULE_23__['default'];12611 -1 });12612 -1 var _is_opaque__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__('./lib/commons/dom/is-opaque.js');12613 -1 __webpack_require__.d(__webpack_exports__, 'isOpaque', function() {12614 -1 return _is_opaque__WEBPACK_IMPORTED_MODULE_24__['default'];12615 -1 });12616 -1 var _is_skip_link__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__('./lib/commons/dom/is-skip-link.js');12617 -1 __webpack_require__.d(__webpack_exports__, 'isSkipLink', function() {12618 -1 return _is_skip_link__WEBPACK_IMPORTED_MODULE_25__['default'];12619 -1 });12620 -1 var _is_visible__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__('./lib/commons/dom/is-visible.js');12621 -1 __webpack_require__.d(__webpack_exports__, 'isVisible', function() {12622 -1 return _is_visible__WEBPACK_IMPORTED_MODULE_26__['default'];12623 -1 });12624 -1 var _is_visual_content__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__('./lib/commons/dom/is-visual-content.js');12625 -1 __webpack_require__.d(__webpack_exports__, 'isVisualContent', function() {12626 -1 return _is_visual_content__WEBPACK_IMPORTED_MODULE_27__['default'];12627 -1 });12628 -1 var _reduce_to_elements_below_floating__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__('./lib/commons/dom/reduce-to-elements-below-floating.js');12629 -1 __webpack_require__.d(__webpack_exports__, 'reduceToElementsBelowFloating', function() {12630 -1 return _reduce_to_elements_below_floating__WEBPACK_IMPORTED_MODULE_28__['default'];12631 -1 });12632 -1 var _shadow_elements_from_point__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__('./lib/commons/dom/shadow-elements-from-point.js');12633 -1 __webpack_require__.d(__webpack_exports__, 'shadowElementsFromPoint', function() {12634 -1 return _shadow_elements_from_point__WEBPACK_IMPORTED_MODULE_29__['default'];12635 -1 });12636 -1 var _url_props_from_attribute__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__('./lib/commons/dom/url-props-from-attribute.js');12637 -1 __webpack_require__.d(__webpack_exports__, 'urlPropsFromAttribute', function() {12638 -1 return _url_props_from_attribute__WEBPACK_IMPORTED_MODULE_30__['default'];12639 -1 });12640 -1 var _visually_contains__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__('./lib/commons/dom/visually-contains.js');12641 -1 __webpack_require__.d(__webpack_exports__, 'visuallyContains', function() {12642 -1 return _visually_contains__WEBPACK_IMPORTED_MODULE_31__['default'];12643 -1 });12644 -1 var _visually_overlaps__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__('./lib/commons/dom/visually-overlaps.js');12645 -1 __webpack_require__.d(__webpack_exports__, 'visuallyOverlaps', function() {12646 -1 return _visually_overlaps__WEBPACK_IMPORTED_MODULE_32__['default'];12647 -1 });12648 -1 },12649 -1 './lib/commons/dom/inserted-into-focus-order.js': function libCommonsDomInsertedIntoFocusOrderJs(module, __webpack_exports__, __webpack_require__) {12650 -1 'use strict';12651 -1 __webpack_require__.r(__webpack_exports__);12652 -1 var _is_focusable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/is-focusable.js');12653 -1 var _is_natively_focusable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/is-natively-focusable.js');12654 -1 function insertedIntoFocusOrder(el) {12655 -1 var tabIndex = parseInt(el.getAttribute('tabindex'), 10);12656 -1 return tabIndex > -1 && Object(_is_focusable__WEBPACK_IMPORTED_MODULE_0__['default'])(el) && !Object(_is_natively_focusable__WEBPACK_IMPORTED_MODULE_1__['default'])(el);12657 -1 }12658 -1 __webpack_exports__['default'] = insertedIntoFocusOrder;12659 -1 },12660 -1 './lib/commons/dom/is-focusable.js': function libCommonsDomIsFocusableJs(module, __webpack_exports__, __webpack_require__) {12661 -1 'use strict';12662 -1 __webpack_require__.r(__webpack_exports__);12663 -1 var _focus_disabled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/focus-disabled.js');12664 -1 var _is_natively_focusable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/is-natively-focusable.js');12665 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');12666 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/index.js');12667 -1 function isFocusable(el) {12668 -1 var vNode = el instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_2__['default'] ? el : Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['getNodeFromTree'])(el);12669 -1 if (Object(_focus_disabled__WEBPACK_IMPORTED_MODULE_0__['default'])(vNode)) {12670 -1 return false;12671 -1 } else if (Object(_is_natively_focusable__WEBPACK_IMPORTED_MODULE_1__['default'])(vNode)) {12672 -1 return true;12673 -1 }12674 -1 var tabindex = vNode.attr('tabindex');12675 -1 if (tabindex && !isNaN(parseInt(tabindex, 10))) {12676 -1 return true;12677 -1 }12678 -1 return false;12679 -1 }12680 -1 __webpack_exports__['default'] = isFocusable;12681 -1 },12682 -1 './lib/commons/dom/is-hidden-with-css.js': function libCommonsDomIsHiddenWithCssJs(module, __webpack_exports__, __webpack_require__) {12683 -1 'use strict';12684 -1 __webpack_require__.r(__webpack_exports__);12685 -1 var _get_composed_parent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/get-composed-parent.js');12686 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');12687 -1 function isHiddenWithCSS(el, descendentVisibilityValue) {12688 -1 var vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeFromTree'])(el);12689 -1 if (!vNode) {12690 -1 return _isHiddenWithCSS(el, descendentVisibilityValue);12691 -1 }12692 -1 if (vNode._isHiddenWithCSS === void 0) {12693 -1 vNode._isHiddenWithCSS = _isHiddenWithCSS(el, descendentVisibilityValue);12694 -1 }12695 -1 return vNode._isHiddenWithCSS;12696 -1 }12697 -1 function _isHiddenWithCSS(el, descendentVisibilityValue) {12698 -1 if (el.nodeType === 9) {12699 -1 return false;12700 -1 }12701 -1 if (el.nodeType === 11) {12702 -1 el = el.host;12703 -1 }12704 -1 if ([ 'STYLE', 'SCRIPT' ].includes(el.nodeName.toUpperCase())) {12705 -1 return false;12706 -1 }12707 -1 var style = window.getComputedStyle(el, null);12708 -1 if (!style) {12709 -1 throw new Error('Style does not exist for the given element.');12710 -1 }12711 -1 var displayValue = style.getPropertyValue('display');12712 -1 if (displayValue === 'none') {12713 -1 return true;12714 -1 }12715 -1 var HIDDEN_VISIBILITY_VALUES = [ 'hidden', 'collapse' ];12716 -1 var visibilityValue = style.getPropertyValue('visibility');12717 -1 if (HIDDEN_VISIBILITY_VALUES.includes(visibilityValue) && !descendentVisibilityValue) {12718 -1 return true;12719 -1 }12720 -1 if (HIDDEN_VISIBILITY_VALUES.includes(visibilityValue) && descendentVisibilityValue && HIDDEN_VISIBILITY_VALUES.includes(descendentVisibilityValue)) {12721 -1 return true;12722 -1 }12723 -1 var parent = Object(_get_composed_parent__WEBPACK_IMPORTED_MODULE_0__['default'])(el);12724 -1 if (parent && !HIDDEN_VISIBILITY_VALUES.includes(visibilityValue)) {12725 -1 return isHiddenWithCSS(parent, visibilityValue);12726 -1 }12727 -1 return false;12728 -1 }12729 -1 __webpack_exports__['default'] = isHiddenWithCSS;12730 -1 },12731 -1 './lib/commons/dom/is-html5.js': function libCommonsDomIsHtml5Js(module, __webpack_exports__, __webpack_require__) {12732 -1 'use strict';12733 -1 __webpack_require__.r(__webpack_exports__);12734 -1 function isHTML5(doc) {12735 -1 var node = doc.doctype;12736 -1 if (node === null) {12737 -1 return false;12738 -1 }12739 -1 return node.name === 'html' && !node.publicId && !node.systemId;12740 -1 }12741 -1 __webpack_exports__['default'] = isHTML5;12742 -1 },12743 -1 './lib/commons/dom/is-in-text-block.js': function libCommonsDomIsInTextBlockJs(module, __webpack_exports__, __webpack_require__) {12744 -1 'use strict';12745 -1 __webpack_require__.r(__webpack_exports__);12746 -1 var _get_composed_parent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/get-composed-parent.js');12747 -1 var _text_sanitize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/sanitize.js');12748 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');12749 -1 function walkDomNode(node, functor) {12750 -1 if (functor(node.actualNode) !== false) {12751 -1 node.children.forEach(function(child) {12752 -1 return walkDomNode(child, functor);12753 -1 });12754 -1 }12755 -1 }12756 -1 var blockLike = [ 'block', 'list-item', 'table', 'flex', 'grid', 'inline-block' ];12757 -1 function isBlock(elm) {12758 -1 var display = window.getComputedStyle(elm).getPropertyValue('display');12759 -1 return blockLike.includes(display) || display.substr(0, 6) === 'table-';12760 -1 }12761 -1 function getBlockParent(node) {12762 -1 var parentBlock = Object(_get_composed_parent__WEBPACK_IMPORTED_MODULE_0__['default'])(node);12763 -1 while (parentBlock && !isBlock(parentBlock)) {12764 -1 parentBlock = Object(_get_composed_parent__WEBPACK_IMPORTED_MODULE_0__['default'])(parentBlock);12765 -1 }12766 -1 return Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getNodeFromTree'])(parentBlock);12767 -1 }12768 -1 function isInTextBlock(node) {12769 -1 if (isBlock(node)) {12770 -1 return false;12771 -1 }12772 -1 var virtualParent = getBlockParent(node);12773 -1 var parentText = '';12774 -1 var linkText = '';12775 -1 var inBrBlock = 0;12776 -1 walkDomNode(virtualParent, function(currNode) {12777 -1 if (inBrBlock === 2) {12778 -1 return false;-1 33427 for (var _a = 0, operators_1 = operators; _a < operators_1.length; _a++) { -1 33428 var operator = operators_1[_a]; -1 33429 this.ruleNestingOperators[operator] = true; 12779 33430 }12780 -1 if (currNode.nodeType === 3) {12781 -1 parentText += currNode.nodeValue;-1 33431 return this; -1 33432 }; -1 33433 CssSelectorParser4.prototype.unregisterNestingOperators = function() { -1 33434 var operators = []; -1 33435 for (var _i = 0; _i < arguments.length; _i++) { -1 33436 operators[_i] = arguments[_i]; 12782 33437 }12783 -1 if (currNode.nodeType !== 1) {12784 -1 return;-1 33438 for (var _a = 0, operators_2 = operators; _a < operators_2.length; _a++) { -1 33439 var operator = operators_2[_a]; -1 33440 delete this.ruleNestingOperators[operator]; 12785 33441 }12786 -1 var nodeName = (currNode.nodeName || '').toUpperCase();12787 -1 if ([ 'BR', 'HR' ].includes(nodeName)) {12788 -1 if (inBrBlock === 0) {12789 -1 parentText = '';12790 -1 linkText = '';12791 -1 } else {12792 -1 inBrBlock = 2;12793 -1 }12794 -1 } else if (currNode.style.display === 'none' || currNode.style.overflow === 'hidden' || ![ '', null, 'none' ].includes(currNode.style['float']) || ![ '', null, 'relative' ].includes(currNode.style.position)) {12795 -1 return false;12796 -1 } else if (nodeName === 'A' && currNode.href || (currNode.getAttribute('role') || '').toLowerCase() === 'link') {12797 -1 if (currNode === node) {12798 -1 inBrBlock = 1;12799 -1 }12800 -1 linkText += currNode.textContent;12801 -1 return false;-1 33442 return this; -1 33443 }; -1 33444 CssSelectorParser4.prototype.registerAttrEqualityMods = function() { -1 33445 var mods = []; -1 33446 for (var _i = 0; _i < arguments.length; _i++) { -1 33447 mods[_i] = arguments[_i]; 12802 33448 }12803 -1 });12804 -1 parentText = Object(_text_sanitize__WEBPACK_IMPORTED_MODULE_1__['default'])(parentText);12805 -1 linkText = Object(_text_sanitize__WEBPACK_IMPORTED_MODULE_1__['default'])(linkText);12806 -1 return parentText.length > linkText.length;12807 -1 }12808 -1 __webpack_exports__['default'] = isInTextBlock;12809 -1 },12810 -1 './lib/commons/dom/is-modal-open.js': function libCommonsDomIsModalOpenJs(module, __webpack_exports__, __webpack_require__) {12811 -1 'use strict';12812 -1 __webpack_require__.r(__webpack_exports__);12813 -1 var _is_visible__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/is-visible.js');12814 -1 var _get_viewport_size__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/get-viewport-size.js');12815 -1 var _core_base_cache__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/base/cache.js');12816 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/index.js');12817 -1 function isModalOpen(options) {12818 -1 options = options || {};12819 -1 var modalPercent = options.modalPercent || .75;12820 -1 if (_core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].get('isModalOpen')) {12821 -1 return _core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].get('isModalOpen');12822 -1 }12823 -1 var definiteModals = Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['querySelectorAllFilter'])(axe._tree[0], 'dialog, [role=dialog], [aria-modal=true]', function(vNode) {12824 -1 return Object(_is_visible__WEBPACK_IMPORTED_MODULE_0__['default'])(vNode.actualNode);12825 -1 });12826 -1 if (definiteModals.length) {12827 -1 _core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].set('isModalOpen', true);12828 -1 return true;12829 -1 }12830 -1 var viewport = Object(_get_viewport_size__WEBPACK_IMPORTED_MODULE_1__['default'])(window);12831 -1 var percentWidth = viewport.width * modalPercent;12832 -1 var percentHeight = viewport.height * modalPercent;12833 -1 var x = (viewport.width - percentWidth) / 2;12834 -1 var y = (viewport.height - percentHeight) / 2;12835 -1 var points = [ {12836 -1 x: x,12837 -1 y: y12838 -1 }, {12839 -1 x: viewport.width - x,12840 -1 y: y12841 -1 }, {12842 -1 x: viewport.width / 2,12843 -1 y: viewport.height / 212844 -1 }, {12845 -1 x: x,12846 -1 y: viewport.height - y12847 -1 }, {12848 -1 x: viewport.width - x,12849 -1 y: viewport.height - y12850 -1 } ];12851 -1 var stacks = points.map(function(point) {12852 -1 return Array.from(document.elementsFromPoint(point.x, point.y));12853 -1 });12854 -1 var _loop3 = function _loop3(i) {12855 -1 var modalElement = stacks[i].find(function(elm) {12856 -1 var style = window.getComputedStyle(elm);12857 -1 return parseInt(style.width, 10) >= percentWidth && parseInt(style.height, 10) >= percentHeight && style.getPropertyValue('pointer-events') !== 'none' && (style.position === 'absolute' || style.position === 'fixed');12858 -1 });12859 -1 if (modalElement && stacks.every(function(stack) {12860 -1 return stack.includes(modalElement);12861 -1 })) {12862 -1 _core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].set('isModalOpen', true);12863 -1 return {12864 -1 v: true12865 -1 };-1 33449 for (var _a = 0, mods_1 = mods; _a < mods_1.length; _a++) { -1 33450 var mod = mods_1[_a]; -1 33451 this.attrEqualityMods[mod] = true; 12866 33452 } -1 33453 return this; 12867 33454 };12868 -1 for (var i = 0; i < stacks.length; i++) {12869 -1 var _ret3 = _loop3(i);12870 -1 if (_typeof(_ret3) === 'object') {12871 -1 return _ret3.v;-1 33455 CssSelectorParser4.prototype.unregisterAttrEqualityMods = function() { -1 33456 var mods = []; -1 33457 for (var _i = 0; _i < arguments.length; _i++) { -1 33458 mods[_i] = arguments[_i]; 12872 33459 }12873 -1 }12874 -1 _core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].set('isModalOpen', undefined);12875 -1 return undefined;12876 -1 }12877 -1 __webpack_exports__['default'] = isModalOpen;12878 -1 },12879 -1 './lib/commons/dom/is-natively-focusable.js': function libCommonsDomIsNativelyFocusableJs(module, __webpack_exports__, __webpack_require__) {12880 -1 'use strict';12881 -1 __webpack_require__.r(__webpack_exports__);12882 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');12883 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');12884 -1 var _focus_disabled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/dom/focus-disabled.js');12885 -1 function isNativelyFocusable(el) {12886 -1 var vNode = el instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_0__['default'] ? el : Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeFromTree'])(el);12887 -1 if (!vNode || Object(_focus_disabled__WEBPACK_IMPORTED_MODULE_2__['default'])(vNode)) {12888 -1 return false;12889 -1 }12890 -1 switch (vNode.props.nodeName) {12891 -1 case 'a':12892 -1 case 'area':12893 -1 if (vNode.hasAttr('href')) {12894 -1 return true;-1 33460 for (var _a = 0, mods_2 = mods; _a < mods_2.length; _a++) { -1 33461 var mod = mods_2[_a]; -1 33462 delete this.attrEqualityMods[mod]; 12895 33463 }12896 -1 break;12897 -112898 -1 case 'input':12899 -1 return vNode.props.type !== 'hidden';12900 -112901 -1 case 'textarea':12902 -1 case 'select':12903 -1 case 'summary':12904 -1 case 'button':12905 -1 return true;12906 -112907 -1 case 'details':12908 -1 return !Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['querySelectorAll'])(vNode, 'summary').length;12909 -1 }12910 -1 return false;12911 -1 }12912 -1 __webpack_exports__['default'] = isNativelyFocusable;12913 -1 },12914 -1 './lib/commons/dom/is-node.js': function libCommonsDomIsNodeJs(module, __webpack_exports__, __webpack_require__) {-1 33464 return this; -1 33465 }; -1 33466 CssSelectorParser4.prototype.enableSubstitutes = function() { -1 33467 this.substitutesEnabled = true; -1 33468 return this; -1 33469 }; -1 33470 CssSelectorParser4.prototype.disableSubstitutes = function() { -1 33471 this.substitutesEnabled = false; -1 33472 return this; -1 33473 }; -1 33474 CssSelectorParser4.prototype.parse = function(str) { -1 33475 return parser_context_1.parseCssSelector(str, 0, this.pseudos, this.attrEqualityMods, this.ruleNestingOperators, this.substitutesEnabled); -1 33476 }; -1 33477 CssSelectorParser4.prototype.render = function(path) { -1 33478 return render_1.renderEntity(path).trim(); -1 33479 }; -1 33480 return CssSelectorParser4; -1 33481 }(); -1 33482 exports.CssSelectorParser = CssSelectorParser3; -1 33483 }); -1 33484 var require_noop = __commonJS(function(exports, module) { 12915 33485 'use strict';12916 -1 __webpack_require__.r(__webpack_exports__);12917 -1 function isNode(element) {12918 -1 'use strict';12919 -1 return element instanceof window.Node;12920 -1 }12921 -1 __webpack_exports__['default'] = isNode;12922 -1 },12923 -1 './lib/commons/dom/is-offscreen.js': function libCommonsDomIsOffscreenJs(module, __webpack_exports__, __webpack_require__) {-1 33486 module.exports = function() {}; -1 33487 }); -1 33488 var require_is_value = __commonJS(function(exports, module) { 12924 33489 'use strict';12925 -1 __webpack_require__.r(__webpack_exports__);12926 -1 var _get_composed_parent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/get-composed-parent.js');12927 -1 var _get_element_coordinates__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/get-element-coordinates.js');12928 -1 var _get_viewport_size__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/dom/get-viewport-size.js');12929 -1 function noParentScrolled(element, offset) {12930 -1 element = Object(_get_composed_parent__WEBPACK_IMPORTED_MODULE_0__['default'])(element);12931 -1 while (element && element.nodeName.toLowerCase() !== 'html') {12932 -1 if (element.scrollTop) {12933 -1 offset += element.scrollTop;12934 -1 if (offset >= 0) {12935 -1 return false;12936 -1 }12937 -1 }12938 -1 element = Object(_get_composed_parent__WEBPACK_IMPORTED_MODULE_0__['default'])(element);12939 -1 }12940 -1 return true;12941 -1 }12942 -1 function isOffscreen(element) {12943 -1 var leftBoundary;12944 -1 var docElement = document.documentElement;12945 -1 var styl = window.getComputedStyle(element);12946 -1 var dir = window.getComputedStyle(document.body || docElement).getPropertyValue('direction');12947 -1 var coords = Object(_get_element_coordinates__WEBPACK_IMPORTED_MODULE_1__['default'])(element);12948 -1 if (coords.bottom < 0 && (noParentScrolled(element, coords.bottom) || styl.position === 'absolute')) {12949 -1 return true;-1 33490 var _undefined = require_noop()(); -1 33491 module.exports = function(val) { -1 33492 return val !== _undefined && val !== null; -1 33493 }; -1 33494 }); -1 33495 var require_normalize_options = __commonJS(function(exports, module) { -1 33496 'use strict'; -1 33497 var isValue = require_is_value(); -1 33498 var forEach = Array.prototype.forEach; -1 33499 var create = Object.create; -1 33500 var process2 = function process2(src, obj) { -1 33501 var key; -1 33502 for (key in src) { -1 33503 obj[key] = src[key]; 12950 33504 }12951 -1 if (coords.left === 0 && coords.right === 0) {-1 33505 }; -1 33506 module.exports = function(opts1) { -1 33507 var result = create(null); -1 33508 forEach.call(arguments, function(options) { -1 33509 if (!isValue(options)) { -1 33510 return; -1 33511 } -1 33512 process2(Object(options), result); -1 33513 }); -1 33514 return result; -1 33515 }; -1 33516 }); -1 33517 var require_is_implemented = __commonJS(function(exports, module) { -1 33518 'use strict'; -1 33519 module.exports = function() { -1 33520 var sign = Math.sign; -1 33521 if (typeof sign !== 'function') { 12952 33522 return false; 12953 33523 }12954 -1 if (dir === 'ltr') {12955 -1 if (coords.right <= 0) {12956 -1 return true;12957 -1 }12958 -1 } else {12959 -1 leftBoundary = Math.max(docElement.scrollWidth, Object(_get_viewport_size__WEBPACK_IMPORTED_MODULE_2__['default'])(window).width);12960 -1 if (coords.left >= leftBoundary) {12961 -1 return true;12962 -1 }-1 33524 return sign(10) === 1 && sign(-20) === -1; -1 33525 }; -1 33526 }); -1 33527 var require_shim = __commonJS(function(exports, module) { -1 33528 'use strict'; -1 33529 module.exports = function(value) { -1 33530 value = Number(value); -1 33531 if (isNaN(value) || value === 0) { -1 33532 return value; 12963 33533 }12964 -1 return false;12965 -1 }12966 -1 __webpack_exports__['default'] = isOffscreen;12967 -1 },12968 -1 './lib/commons/dom/is-opaque.js': function libCommonsDomIsOpaqueJs(module, __webpack_exports__, __webpack_require__) {-1 33534 return value > 0 ? 1 : -1; -1 33535 }; -1 33536 }); -1 33537 var require_sign = __commonJS(function(exports, module) { 12969 33538 'use strict';12970 -1 __webpack_require__.r(__webpack_exports__);12971 -1 var _color_element_has_image__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/color/element-has-image.js');12972 -1 var _color_get_own_background_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/color/get-own-background-color.js');12973 -1 function isOpaque(node) {12974 -1 var style = window.getComputedStyle(node);12975 -1 return Object(_color_element_has_image__WEBPACK_IMPORTED_MODULE_0__['default'])(node, style) || Object(_color_get_own_background_color__WEBPACK_IMPORTED_MODULE_1__['default'])(style).alpha === 1;12976 -1 }12977 -1 __webpack_exports__['default'] = isOpaque;12978 -1 },12979 -1 './lib/commons/dom/is-skip-link.js': function libCommonsDomIsSkipLinkJs(module, __webpack_exports__, __webpack_require__) {-1 33539 module.exports = require_is_implemented()() ? Math.sign : require_shim(); -1 33540 }); -1 33541 var require_to_integer = __commonJS(function(exports, module) { 12980 33542 'use strict';12981 -1 __webpack_require__.r(__webpack_exports__);12982 -1 var _core_base_cache__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/cache.js');12983 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');12984 -1 var isInternalLinkRegex = /^\/?#[^/!]/;12985 -1 function isSkipLink(element) {12986 -1 if (!isInternalLinkRegex.test(element.getAttribute('href'))) {12987 -1 return false;12988 -1 }12989 -1 var firstPageLink;12990 -1 if (typeof _core_base_cache__WEBPACK_IMPORTED_MODULE_0__['default'].get('firstPageLink') !== 'undefined') {12991 -1 firstPageLink = _core_base_cache__WEBPACK_IMPORTED_MODULE_0__['default'].get('firstPageLink');12992 -1 } else {12993 -1 firstPageLink = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['querySelectorAll'])(axe._tree, 'a:not([href^="#"]):not([href^="/#"]):not([href^="javascript"])')[0];12994 -1 _core_base_cache__WEBPACK_IMPORTED_MODULE_0__['default'].set('firstPageLink', firstPageLink || null);-1 33543 var sign = require_sign(); -1 33544 var abs = Math.abs; -1 33545 var floor = Math.floor; -1 33546 module.exports = function(value) { -1 33547 if (isNaN(value)) { -1 33548 return 0; 12995 33549 }12996 -1 if (!firstPageLink) {12997 -1 return true;-1 33550 value = Number(value); -1 33551 if (value === 0 || !isFinite(value)) { -1 33552 return value; 12998 33553 }12999 -1 return element.compareDocumentPosition(firstPageLink.actualNode) === element.DOCUMENT_POSITION_FOLLOWING;13000 -1 }13001 -1 __webpack_exports__['default'] = isSkipLink;13002 -1 },13003 -1 './lib/commons/dom/is-visible.js': function libCommonsDomIsVisibleJs(module, __webpack_exports__, __webpack_require__) {-1 33554 return sign(value) * floor(abs(value)); -1 33555 }; -1 33556 }); -1 33557 var require_to_pos_integer = __commonJS(function(exports, module) { 13004 33558 'use strict';13005 -1 __webpack_require__.r(__webpack_exports__);13006 -1 var _get_root_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/get-root-node.js');13007 -1 var _is_offscreen__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/is-offscreen.js');13008 -1 var _find_up__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/dom/find-up.js');13009 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/index.js');13010 -1 var clipRegex = /rect\s*\(([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px\s*\)/;13011 -1 var clipPathRegex = /(\w+)\((\d+)/;13012 -1 function isClipped(style) {13013 -1 'use strict';13014 -1 var matchesClip = style.getPropertyValue('clip').match(clipRegex);13015 -1 var matchesClipPath = style.getPropertyValue('clip-path').match(clipPathRegex);13016 -1 if (matchesClip && matchesClip.length === 5) {13017 -1 return matchesClip[3] - matchesClip[1] <= 0 && matchesClip[2] - matchesClip[4] <= 0;13018 -1 }13019 -1 if (matchesClipPath) {13020 -1 var type = matchesClipPath[1];13021 -1 var value = parseInt(matchesClipPath[2], 10);13022 -1 switch (type) {13023 -1 case 'inset':13024 -1 return value >= 50;13025 -113026 -1 case 'circle':13027 -1 return value === 0;13028 -113029 -1 default:-1 33559 var toInteger = require_to_integer(); -1 33560 var max = Math.max; -1 33561 module.exports = function(value) { -1 33562 return max(0, toInteger(value)); -1 33563 }; -1 33564 }); -1 33565 var require_resolve_length = __commonJS(function(exports, module) { -1 33566 'use strict'; -1 33567 var toPosInt = require_to_pos_integer(); -1 33568 module.exports = function(optsLength, fnLength, isAsync) { -1 33569 var length; -1 33570 if (isNaN(optsLength)) { -1 33571 length = fnLength; -1 33572 if (!(length >= 0)) { -1 33573 return 1; -1 33574 } -1 33575 if (isAsync && length) { -1 33576 return length - 1; 13030 33577 } -1 33578 return length; 13031 33579 }13032 -1 return false;13033 -1 }13034 -1 function isAreaVisible(el, screenReader, recursed) {13035 -1 var mapEl = Object(_find_up__WEBPACK_IMPORTED_MODULE_2__['default'])(el, 'map');13036 -1 if (!mapEl) {-1 33580 if (optsLength === false) { 13037 33581 return false; 13038 33582 }13039 -1 var mapElName = mapEl.getAttribute('name');13040 -1 if (!mapElName) {13041 -1 return false;-1 33583 return toPosInt(optsLength); -1 33584 }; -1 33585 }); -1 33586 var require_valid_callable = __commonJS(function(exports, module) { -1 33587 'use strict'; -1 33588 module.exports = function(fn) { -1 33589 if (typeof fn !== 'function') { -1 33590 throw new TypeError(fn + ' is not a function'); 13042 33591 }13043 -1 var mapElRootNode = Object(_get_root_node__WEBPACK_IMPORTED_MODULE_0__['default'])(el);13044 -1 if (!mapElRootNode || mapElRootNode.nodeType !== 9) {13045 -1 return false;-1 33592 return fn; -1 33593 }; -1 33594 }); -1 33595 var require_valid_value = __commonJS(function(exports, module) { -1 33596 'use strict'; -1 33597 var isValue = require_is_value(); -1 33598 module.exports = function(value) { -1 33599 if (!isValue(value)) { -1 33600 throw new TypeError('Cannot use null or undefined'); 13046 33601 }13047 -1 var refs = Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['querySelectorAll'])(axe._tree, 'img[usemap="#'.concat(Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['escapeSelector'])(mapElName), '"]'));13048 -1 if (!refs || !refs.length) {-1 33602 return value; -1 33603 }; -1 33604 }); -1 33605 var require_iterate = __commonJS(function(exports, module) { -1 33606 'use strict'; -1 33607 var callable = require_valid_callable(); -1 33608 var value = require_valid_value(); -1 33609 var bind = Function.prototype.bind; -1 33610 var call = Function.prototype.call; -1 33611 var keys = Object.keys; -1 33612 var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable; -1 33613 module.exports = function(method, defVal) { -1 33614 return function(obj, cb) { -1 33615 var list, thisArg = arguments[2], compareFn = arguments[3]; -1 33616 obj = Object(value(obj)); -1 33617 callable(cb); -1 33618 list = keys(obj); -1 33619 if (compareFn) { -1 33620 list.sort(typeof compareFn === 'function' ? bind.call(compareFn, obj) : void 0); -1 33621 } -1 33622 if (typeof method !== 'function') { -1 33623 method = list[method]; -1 33624 } -1 33625 return call.call(method, list, function(key, index) { -1 33626 if (!objPropertyIsEnumerable.call(obj, key)) { -1 33627 return defVal; -1 33628 } -1 33629 return call.call(cb, thisArg, obj[key], key, obj, index); -1 33630 }); -1 33631 }; -1 33632 }; -1 33633 }); -1 33634 var require_for_each = __commonJS(function(exports, module) { -1 33635 'use strict'; -1 33636 module.exports = require_iterate()('forEach'); -1 33637 }); -1 33638 var require_registered_extensions = __commonJS(function() { -1 33639 'use strict'; -1 33640 }); -1 33641 var require_is_implemented2 = __commonJS(function(exports, module) { -1 33642 'use strict'; -1 33643 module.exports = function() { -1 33644 var assign = Object.assign, obj; -1 33645 if (typeof assign !== 'function') { 13049 33646 return false; 13050 33647 }13051 -1 return refs.some(function(_ref45) {13052 -1 var actualNode = _ref45.actualNode;13053 -1 return isVisible(actualNode, screenReader, recursed);-1 33648 obj = { -1 33649 foo: 'raz' -1 33650 }; -1 33651 assign(obj, { -1 33652 bar: 'dwa' -1 33653 }, { -1 33654 trzy: 'trzy' 13054 33655 });13055 -1 }13056 -1 function isVisible(el, screenReader, recursed) {13057 -1 if (!el) {13058 -1 throw new TypeError('Cannot determine if element is visible for non-DOM nodes');13059 -1 }13060 -1 var vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['getNodeFromTree'])(el);13061 -1 var cacheName = '_isVisible' + (screenReader ? 'ScreenReader' : '');13062 -1 if (el.nodeType === 9) {13063 -1 return true;13064 -1 }13065 -1 if (el.nodeType === 11) {13066 -1 el = el.host;13067 -1 }13068 -1 if (vNode && typeof vNode[cacheName] !== 'undefined') {13069 -1 return vNode[cacheName];13070 -1 }13071 -1 var style = window.getComputedStyle(el, null);13072 -1 if (style === null) {13073 -1 return false;13074 -1 }13075 -1 var nodeName = el.nodeName.toUpperCase();13076 -1 if (nodeName === 'AREA') {13077 -1 return isAreaVisible(el, screenReader, recursed);13078 -1 }13079 -1 if (style.getPropertyValue('display') === 'none' || [ 'STYLE', 'SCRIPT', 'NOSCRIPT', 'TEMPLATE' ].includes(nodeName)) {13080 -1 return false;13081 -1 }13082 -1 if (screenReader && el.getAttribute('aria-hidden') === 'true') {13083 -1 return false;13084 -1 }13085 -1 if (!screenReader && (isClipped(style) || style.getPropertyValue('opacity') === '0' || Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['getScroll'])(el) && parseInt(style.getPropertyValue('height')) === 0)) {13086 -1 return false;13087 -1 }13088 -1 if (!recursed && (style.getPropertyValue('visibility') === 'hidden' || !screenReader && Object(_is_offscreen__WEBPACK_IMPORTED_MODULE_1__['default'])(el))) {13089 -1 return false;13090 -1 }13091 -1 var parent = el.assignedSlot ? el.assignedSlot : el.parentNode;13092 -1 var visible = false;13093 -1 if (parent) {13094 -1 visible = isVisible(parent, screenReader, true);13095 -1 }13096 -1 if (vNode) {13097 -1 vNode[cacheName] = visible;13098 -1 }13099 -1 return visible;13100 -1 }13101 -1 __webpack_exports__['default'] = isVisible;13102 -1 },13103 -1 './lib/commons/dom/is-visual-content.js': function libCommonsDomIsVisualContentJs(module, __webpack_exports__, __webpack_require__) {-1 33656 return obj.foo + obj.bar + obj.trzy === 'razdwatrzy'; -1 33657 }; -1 33658 }); -1 33659 var require_is_implemented3 = __commonJS(function(exports, module) { 13104 33660 'use strict';13105 -1 __webpack_require__.r(__webpack_exports__);13106 -1 var visualRoles = [ 'checkbox', 'img', 'radio', 'range', 'slider', 'spinbutton', 'textbox' ];13107 -1 function isVisualContent(element) {13108 -1 var role = element.getAttribute('role');13109 -1 if (role) {13110 -1 return visualRoles.indexOf(role) !== -1;13111 -1 }13112 -1 switch (element.nodeName.toUpperCase()) {13113 -1 case 'IMG':13114 -1 case 'IFRAME':13115 -1 case 'OBJECT':13116 -1 case 'VIDEO':13117 -1 case 'AUDIO':13118 -1 case 'CANVAS':13119 -1 case 'SVG':13120 -1 case 'MATH':13121 -1 case 'BUTTON':13122 -1 case 'SELECT':13123 -1 case 'TEXTAREA':13124 -1 case 'KEYGEN':13125 -1 case 'PROGRESS':13126 -1 case 'METER':-1 33661 module.exports = function() { -1 33662 try { -1 33663 Object.keys('primitive'); 13127 33664 return true;13128 -113129 -1 case 'INPUT':13130 -1 return element.type !== 'hidden';13131 -113132 -1 default:-1 33665 } catch (e) { 13133 33666 return false; 13134 33667 }13135 -1 }13136 -1 __webpack_exports__['default'] = isVisualContent;13137 -1 },13138 -1 './lib/commons/dom/reduce-to-elements-below-floating.js': function libCommonsDomReduceToElementsBelowFloatingJs(module, __webpack_exports__, __webpack_require__) {-1 33668 }; -1 33669 }); -1 33670 var require_shim2 = __commonJS(function(exports, module) { 13139 33671 'use strict';13140 -1 __webpack_require__.r(__webpack_exports__);13141 -1 function reduceToElementsBelowFloating(elements, targetNode) {13142 -1 var floatingPositions = [ 'fixed', 'sticky' ];13143 -1 var finalElements = [];13144 -1 var targetFound = false;13145 -1 for (var index = 0; index < elements.length; ++index) {13146 -1 var currentNode = elements[index];13147 -1 if (currentNode === targetNode) {13148 -1 targetFound = true;13149 -1 }13150 -1 var style = window.getComputedStyle(currentNode);13151 -1 if (!targetFound && floatingPositions.indexOf(style.position) !== -1) {13152 -1 finalElements = [];13153 -1 continue;13154 -1 }13155 -1 finalElements.push(currentNode);13156 -1 }13157 -1 return finalElements;13158 -1 }13159 -1 __webpack_exports__['default'] = reduceToElementsBelowFloating;13160 -1 },13161 -1 './lib/commons/dom/shadow-elements-from-point.js': function libCommonsDomShadowElementsFromPointJs(module, __webpack_exports__, __webpack_require__) {-1 33672 var isValue = require_is_value(); -1 33673 var keys = Object.keys; -1 33674 module.exports = function(object) { -1 33675 return keys(isValue(object) ? Object(object) : object); -1 33676 }; -1 33677 }); -1 33678 var require_keys = __commonJS(function(exports, module) { -1 33679 'use strict'; -1 33680 module.exports = require_is_implemented3()() ? Object.keys : require_shim2(); -1 33681 }); -1 33682 var require_shim3 = __commonJS(function(exports, module) { 13162 33683 'use strict';13163 -1 __webpack_require__.r(__webpack_exports__);13164 -1 var _get_root_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/get-root-node.js');13165 -1 var _visually_contains__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/visually-contains.js');13166 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');13167 -1 function shadowElementsFromPoint(nodeX, nodeY) {13168 -1 var root = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document;13169 -1 var i = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;13170 -1 if (i > 999) {13171 -1 throw new Error('Infinite loop detected');13172 -1 }13173 -1 return Array.from(root.elementsFromPoint(nodeX, nodeY) || []).filter(function(nodes) {13174 -1 return Object(_get_root_node__WEBPACK_IMPORTED_MODULE_0__['default'])(nodes) === root;13175 -1 }).reduce(function(stack, elm) {13176 -1 if (Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['isShadowRoot'])(elm)) {13177 -1 var shadowStack = shadowElementsFromPoint(nodeX, nodeY, elm.shadowRoot, i + 1);13178 -1 stack = stack.concat(shadowStack);13179 -1 if (stack.length && Object(_visually_contains__WEBPACK_IMPORTED_MODULE_1__['default'])(stack[0], elm)) {13180 -1 stack.push(elm);-1 33684 var keys = require_keys(); -1 33685 var value = require_valid_value(); -1 33686 var max = Math.max; -1 33687 module.exports = function(dest, src) { -1 33688 var error, i, length = max(arguments.length, 2), assign; -1 33689 dest = Object(value(dest)); -1 33690 assign = function assign(key) { -1 33691 try { -1 33692 dest[key] = src[key]; -1 33693 } catch (e) { -1 33694 if (!error) { -1 33695 error = e; 13181 33696 }13182 -1 } else {13183 -1 stack.push(elm);13184 33697 }13185 -1 return stack;13186 -1 }, []);13187 -1 }13188 -1 __webpack_exports__['default'] = shadowElementsFromPoint;13189 -1 },13190 -1 './lib/commons/dom/url-props-from-attribute.js': function libCommonsDomUrlPropsFromAttributeJs(module, __webpack_exports__, __webpack_require__) {13191 -1 'use strict';13192 -1 __webpack_require__.r(__webpack_exports__);13193 -1 function urlPropsFromAttribute(node, attribute) {13194 -1 if (!node.hasAttribute(attribute)) {13195 -1 return undefined;13196 -1 }13197 -1 var nodeName = node.nodeName.toUpperCase();13198 -1 var parser = node;13199 -1 if (![ 'A', 'AREA' ].includes(nodeName) || node.ownerSVGElement) {13200 -1 parser = document.createElement('a');13201 -1 parser.href = node.getAttribute(attribute);13202 -1 }13203 -1 var protocol = [ 'https:', 'ftps:' ].includes(parser.protocol) ? parser.protocol.replace(/s:$/, ':') : parser.protocol;13204 -1 var parserPathname = /^\//.test(parser.pathname) ? parser.pathname : '/'.concat(parser.pathname);13205 -1 var _getPathnameOrFilenam = getPathnameOrFilename(parserPathname), pathname = _getPathnameOrFilenam.pathname, filename = _getPathnameOrFilenam.filename;13206 -1 return {13207 -1 protocol: protocol,13208 -1 hostname: parser.hostname,13209 -1 port: getPort(parser.port),13210 -1 pathname: /\/$/.test(pathname) ? pathname : ''.concat(pathname, '/'),13211 -1 search: getSearchPairs(parser.search),13212 -1 hash: getHashRoute(parser.hash),13213 -1 filename: filename13214 33698 };13215 -1 }13216 -1 function getPort(port) {13217 -1 var excludePorts = [ '443', '80' ];13218 -1 return !excludePorts.includes(port) ? port : '';13219 -1 }13220 -1 function getPathnameOrFilename(pathname) {13221 -1 var filename = pathname.split('/').pop();13222 -1 if (!filename || filename.indexOf('.') === -1) {13223 -1 return {13224 -1 pathname: pathname,13225 -1 filename: ''13226 -1 };-1 33699 for (i = 1; i < length; ++i) { -1 33700 src = arguments[i]; -1 33701 keys(src).forEach(assign); 13227 33702 }13228 -1 return {13229 -1 pathname: pathname.replace(filename, ''),13230 -1 filename: /index./.test(filename) ? '' : filename13231 -1 };13232 -1 }13233 -1 function getSearchPairs(searchStr) {13234 -1 var query = {};13235 -1 if (!searchStr || !searchStr.length) {13236 -1 return query;-1 33703 if (error !== void 0) { -1 33704 throw error; -1 33705 } -1 33706 return dest; -1 33707 }; -1 33708 }); -1 33709 var require_assign = __commonJS(function(exports, module) { -1 33710 'use strict'; -1 33711 module.exports = require_is_implemented2()() ? Object.assign : require_shim3(); -1 33712 }); -1 33713 var require_is_object = __commonJS(function(exports, module) { -1 33714 'use strict'; -1 33715 var isValue = require_is_value(); -1 33716 var map = { -1 33717 function: true, -1 33718 object: true -1 33719 }; -1 33720 module.exports = function(value) { -1 33721 return isValue(value) && map[_typeof(value)] || false; -1 33722 }; -1 33723 }); -1 33724 var require_custom = __commonJS(function(exports, module) { -1 33725 'use strict'; -1 33726 var assign = require_assign(); -1 33727 var isObject = require_is_object(); -1 33728 var isValue = require_is_value(); -1 33729 var captureStackTrace = Error.captureStackTrace; -1 33730 module.exports = function(message) { -1 33731 var err2 = new Error(message), code = arguments[1], ext = arguments[2]; -1 33732 if (!isValue(ext)) { -1 33733 if (isObject(code)) { -1 33734 ext = code; -1 33735 code = null; -1 33736 } 13237 33737 }13238 -1 var pairs = searchStr.substring(1).split('&');13239 -1 if (!pairs || !pairs.length) {13240 -1 return query;-1 33738 if (isValue(ext)) { -1 33739 assign(err2, ext); 13241 33740 }13242 -1 for (var index = 0; index < pairs.length; index++) {13243 -1 var pair = pairs[index];13244 -1 var _pair$split = pair.split('='), _pair$split2 = _slicedToArray(_pair$split, 2), key = _pair$split2[0], _pair$split2$ = _pair$split2[1], value = _pair$split2$ === void 0 ? '' : _pair$split2$;13245 -1 query[decodeURIComponent(key)] = decodeURIComponent(value);-1 33741 if (isValue(code)) { -1 33742 err2.code = code; 13246 33743 }13247 -1 return query;13248 -1 }13249 -1 function getHashRoute(hash) {13250 -1 if (!hash) {13251 -1 return '';-1 33744 if (captureStackTrace) { -1 33745 captureStackTrace(err2, module.exports); 13252 33746 }13253 -1 var hashRegex = /#!?\/?/g;13254 -1 var hasMatch = hash.match(hashRegex);13255 -1 if (!hasMatch) {13256 -1 return '';-1 33747 return err2; -1 33748 }; -1 33749 }); -1 33750 var require_mixin = __commonJS(function(exports, module) { -1 33751 'use strict'; -1 33752 var value = require_valid_value(); -1 33753 var defineProperty = Object.defineProperty; -1 33754 var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; -1 33755 var getOwnPropertyNames = Object.getOwnPropertyNames; -1 33756 var getOwnPropertySymbols = Object.getOwnPropertySymbols; -1 33757 module.exports = function(target, source) { -1 33758 var error, sourceObject = Object(value(source)); -1 33759 target = Object(value(target)); -1 33760 getOwnPropertyNames(sourceObject).forEach(function(name) { -1 33761 try { -1 33762 defineProperty(target, name, getOwnPropertyDescriptor(source, name)); -1 33763 } catch (e) { -1 33764 error = e; -1 33765 } -1 33766 }); -1 33767 if (typeof getOwnPropertySymbols === 'function') { -1 33768 getOwnPropertySymbols(sourceObject).forEach(function(symbol) { -1 33769 try { -1 33770 defineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol)); -1 33771 } catch (e) { -1 33772 error = e; -1 33773 } -1 33774 }); 13257 33775 }13258 -1 var _hasMatch = _slicedToArray(hasMatch, 1), matchedStr = _hasMatch[0];13259 -1 if (matchedStr === '#') {13260 -1 return '';-1 33776 if (error !== void 0) { -1 33777 throw error; 13261 33778 }13262 -1 return hash;13263 -1 }13264 -1 __webpack_exports__['default'] = urlPropsFromAttribute;13265 -1 },13266 -1 './lib/commons/dom/visually-contains.js': function libCommonsDomVisuallyContainsJs(module, __webpack_exports__, __webpack_require__) {-1 33779 return target; -1 33780 }; -1 33781 }); -1 33782 var require_define_length = __commonJS(function(exports, module) { 13267 33783 'use strict';13268 -1 __webpack_require__.r(__webpack_exports__);13269 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');13270 -1 function getScrollAncestor(node) {13271 -1 var vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['getNodeFromTree'])(node);13272 -1 var ancestor = vNode.parent;13273 -1 while (ancestor) {13274 -1 if (Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['getScroll'])(ancestor.actualNode)) {13275 -1 return ancestor.actualNode;13276 -1 }13277 -1 ancestor = ancestor.parent;13278 -1 }13279 -1 }13280 -1 function contains(node, parent) {13281 -1 var rectBound = node.getBoundingClientRect();13282 -1 var margin = .01;13283 -1 var rect = {13284 -1 top: rectBound.top + margin,13285 -1 bottom: rectBound.bottom - margin,13286 -1 left: rectBound.left + margin,13287 -1 right: rectBound.right - margin-1 33784 var toPosInt = require_to_pos_integer(); -1 33785 var test = function test(arg1, arg2) { -1 33786 return arg2; -1 33787 }; -1 33788 var desc; -1 33789 var defineProperty; -1 33790 var generate; -1 33791 var mixin; -1 33792 try { -1 33793 Object.defineProperty(test, 'length', { -1 33794 configurable: true, -1 33795 writable: false, -1 33796 enumerable: false, -1 33797 value: 1 -1 33798 }); -1 33799 } catch (ignore) {} -1 33800 if (test.length === 1) { -1 33801 desc = { -1 33802 configurable: true, -1 33803 writable: false, -1 33804 enumerable: false -1 33805 }; -1 33806 defineProperty = Object.defineProperty; -1 33807 module.exports = function(fn, length) { -1 33808 length = toPosInt(length); -1 33809 if (fn.length === length) { -1 33810 return fn; -1 33811 } -1 33812 desc.value = length; -1 33813 return defineProperty(fn, 'length', desc); 13288 33814 };13289 -1 var parentRect = parent.getBoundingClientRect();13290 -1 var parentTop = parentRect.top;13291 -1 var parentLeft = parentRect.left;13292 -1 var parentScrollArea = {13293 -1 top: parentTop - parent.scrollTop,13294 -1 bottom: parentTop - parent.scrollTop + parent.scrollHeight,13295 -1 left: parentLeft - parent.scrollLeft,13296 -1 right: parentLeft - parent.scrollLeft + parent.scrollWidth-1 33815 } else { -1 33816 mixin = require_mixin(); -1 33817 generate = function() { -1 33818 var cache20 = []; -1 33819 return function(length) { -1 33820 var args, i = 0; -1 33821 if (cache20[length]) { -1 33822 return cache20[length]; -1 33823 } -1 33824 args = []; -1 33825 while (length--) { -1 33826 args.push('a' + (++i).toString(36)); -1 33827 } -1 33828 return new Function('fn', 'return function (' + args.join(', ') + ') { return fn.apply(this, arguments); };'); -1 33829 }; -1 33830 }(); -1 33831 module.exports = function(src, length) { -1 33832 var target; -1 33833 length = toPosInt(length); -1 33834 if (src.length === length) { -1 33835 return src; -1 33836 } -1 33837 target = generate(length)(src); -1 33838 try { -1 33839 mixin(target, src); -1 33840 } catch (ignore) {} -1 33841 return target; 13297 33842 };13298 -1 var style = window.getComputedStyle(parent);13299 -1 if (style.getPropertyValue('display') === 'inline') {13300 -1 return true;13301 -1 }13302 -1 if (rect.left < parentScrollArea.left && rect.left < parentRect.left || rect.top < parentScrollArea.top && rect.top < parentRect.top || rect.right > parentScrollArea.right && rect.right > parentRect.right || rect.bottom > parentScrollArea.bottom && rect.bottom > parentRect.bottom) {-1 33843 } -1 33844 }); -1 33845 var require_is = __commonJS(function(exports, module) { -1 33846 'use strict'; -1 33847 var _undefined = void 0; -1 33848 module.exports = function(value) { -1 33849 return value !== _undefined && value !== null; -1 33850 }; -1 33851 }); -1 33852 var require_is2 = __commonJS(function(exports, module) { -1 33853 'use strict'; -1 33854 var isValue = require_is(); -1 33855 var possibleTypes = { -1 33856 object: true, -1 33857 function: true, -1 33858 undefined: true -1 33859 }; -1 33860 module.exports = function(value) { -1 33861 if (!isValue(value)) { 13303 33862 return false; 13304 33863 }13305 -1 if (rect.right > parentRect.right || rect.bottom > parentRect.bottom) {13306 -1 return style.overflow === 'scroll' || style.overflow === 'auto' || style.overflow === 'hidden' || parent instanceof window.HTMLBodyElement || parent instanceof window.HTMLHtmlElement;13307 -1 }13308 -1 return true;13309 -1 }13310 -1 function visuallyContains(node, parent) {13311 -1 var parentScrollAncestor = getScrollAncestor(parent);13312 -1 do {13313 -1 var nextScrollAncestor = getScrollAncestor(node);13314 -1 if (nextScrollAncestor === parentScrollAncestor || nextScrollAncestor === parent) {13315 -1 return contains(node, parent);13316 -1 }13317 -1 node = nextScrollAncestor;13318 -1 } while (node);13319 -1 return false;13320 -1 }13321 -1 __webpack_exports__['default'] = visuallyContains;13322 -1 },13323 -1 './lib/commons/dom/visually-overlaps.js': function libCommonsDomVisuallyOverlapsJs(module, __webpack_exports__, __webpack_require__) {-1 33864 return hasOwnProperty.call(possibleTypes, _typeof(value)); -1 33865 }; -1 33866 }); -1 33867 var require_is3 = __commonJS(function(exports, module) { 13324 33868 'use strict';13325 -1 __webpack_require__.r(__webpack_exports__);13326 -1 function visuallyOverlaps(rect, parent) {13327 -1 var parentRect = parent.getBoundingClientRect();13328 -1 var parentTop = parentRect.top;13329 -1 var parentLeft = parentRect.left;13330 -1 var parentScrollArea = {13331 -1 top: parentTop - parent.scrollTop,13332 -1 bottom: parentTop - parent.scrollTop + parent.scrollHeight,13333 -1 left: parentLeft - parent.scrollLeft,13334 -1 right: parentLeft - parent.scrollLeft + parent.scrollWidth13335 -1 };13336 -1 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) {-1 33869 var isObject = require_is2(); -1 33870 module.exports = function(value) { -1 33871 if (!isObject(value)) { 13337 33872 return false; 13338 33873 }13339 -1 var style = window.getComputedStyle(parent);13340 -1 if (rect.left > parentRect.right || rect.top > parentRect.bottom) {13341 -1 return style.overflow === 'scroll' || style.overflow === 'auto' || parent instanceof window.HTMLBodyElement || parent instanceof window.HTMLHtmlElement;-1 33874 try { -1 33875 if (!value.constructor) { -1 33876 return false; -1 33877 } -1 33878 return value.constructor.prototype === value; -1 33879 } catch (error) { -1 33880 return false; 13342 33881 }13343 -1 return true;13344 -1 }13345 -1 __webpack_exports__['default'] = visuallyOverlaps;13346 -1 },13347 -1 './lib/commons/forms/index.js': function libCommonsFormsIndexJs(module, __webpack_exports__, __webpack_require__) {13348 -1 'use strict';13349 -1 __webpack_require__.r(__webpack_exports__);13350 -1 var _is_aria_combobox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/forms/is-aria-combobox.js');13351 -1 __webpack_require__.d(__webpack_exports__, 'isAriaCombobox', function() {13352 -1 return _is_aria_combobox__WEBPACK_IMPORTED_MODULE_0__['default'];13353 -1 });13354 -1 var _is_aria_listbox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/forms/is-aria-listbox.js');13355 -1 __webpack_require__.d(__webpack_exports__, 'isAriaListbox', function() {13356 -1 return _is_aria_listbox__WEBPACK_IMPORTED_MODULE_1__['default'];13357 -1 });13358 -1 var _is_aria_range__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/forms/is-aria-range.js');13359 -1 __webpack_require__.d(__webpack_exports__, 'isAriaRange', function() {13360 -1 return _is_aria_range__WEBPACK_IMPORTED_MODULE_2__['default'];13361 -1 });13362 -1 var _is_aria_textbox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/forms/is-aria-textbox.js');13363 -1 __webpack_require__.d(__webpack_exports__, 'isAriaTextbox', function() {13364 -1 return _is_aria_textbox__WEBPACK_IMPORTED_MODULE_3__['default'];13365 -1 });13366 -1 var _is_native_select__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/forms/is-native-select.js');13367 -1 __webpack_require__.d(__webpack_exports__, 'isNativeSelect', function() {13368 -1 return _is_native_select__WEBPACK_IMPORTED_MODULE_4__['default'];13369 -1 });13370 -1 var _is_native_textbox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/forms/is-native-textbox.js');13371 -1 __webpack_require__.d(__webpack_exports__, 'isNativeTextbox', function() {13372 -1 return _is_native_textbox__WEBPACK_IMPORTED_MODULE_5__['default'];13373 -1 });13374 -1 var _is_disabled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/commons/forms/is-disabled.js');13375 -1 __webpack_require__.d(__webpack_exports__, 'isDisabled', function() {13376 -1 return _is_disabled__WEBPACK_IMPORTED_MODULE_6__['default'];13377 -1 });13378 -1 },13379 -1 './lib/commons/forms/is-aria-combobox.js': function libCommonsFormsIsAriaComboboxJs(module, __webpack_exports__, __webpack_require__) {13380 -1 'use strict';13381 -1 __webpack_require__.r(__webpack_exports__);13382 -1 var _aria_get_explicit_role__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/get-explicit-role.js');13383 -1 function isAriaCombobox(node) {13384 -1 var role = Object(_aria_get_explicit_role__WEBPACK_IMPORTED_MODULE_0__['default'])(node);13385 -1 return role === 'combobox';13386 -1 }13387 -1 __webpack_exports__['default'] = isAriaCombobox;13388 -1 },13389 -1 './lib/commons/forms/is-aria-listbox.js': function libCommonsFormsIsAriaListboxJs(module, __webpack_exports__, __webpack_require__) {13390 -1 'use strict';13391 -1 __webpack_require__.r(__webpack_exports__);13392 -1 var _aria_get_explicit_role__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/get-explicit-role.js');13393 -1 function isAriaListbox(node) {13394 -1 var role = Object(_aria_get_explicit_role__WEBPACK_IMPORTED_MODULE_0__['default'])(node);13395 -1 return role === 'listbox';13396 -1 }13397 -1 __webpack_exports__['default'] = isAriaListbox;13398 -1 },13399 -1 './lib/commons/forms/is-aria-range.js': function libCommonsFormsIsAriaRangeJs(module, __webpack_exports__, __webpack_require__) {13400 -1 'use strict';13401 -1 __webpack_require__.r(__webpack_exports__);13402 -1 var _aria_get_explicit_role__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/get-explicit-role.js');13403 -1 var rangeRoles = [ 'progressbar', 'scrollbar', 'slider', 'spinbutton' ];13404 -1 function isAriaRange(node) {13405 -1 var role = Object(_aria_get_explicit_role__WEBPACK_IMPORTED_MODULE_0__['default'])(node);13406 -1 return rangeRoles.includes(role);13407 -1 }13408 -1 __webpack_exports__['default'] = isAriaRange;13409 -1 },13410 -1 './lib/commons/forms/is-aria-textbox.js': function libCommonsFormsIsAriaTextboxJs(module, __webpack_exports__, __webpack_require__) {13411 -1 'use strict';13412 -1 __webpack_require__.r(__webpack_exports__);13413 -1 var _aria_get_explicit_role__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/get-explicit-role.js');13414 -1 function isAriaTextbox(node) {13415 -1 var role = Object(_aria_get_explicit_role__WEBPACK_IMPORTED_MODULE_0__['default'])(node);13416 -1 return role === 'textbox';13417 -1 }13418 -1 __webpack_exports__['default'] = isAriaTextbox;13419 -1 },13420 -1 './lib/commons/forms/is-disabled.js': function libCommonsFormsIsDisabledJs(module, __webpack_exports__, __webpack_require__) {-1 33882 }; -1 33883 }); -1 33884 var require_is4 = __commonJS(function(exports, module) { 13421 33885 'use strict';13422 -1 __webpack_require__.r(__webpack_exports__);13423 -1 var disabledNodeNames = [ 'fieldset', 'button', 'select', 'input', 'textarea' ];13424 -1 function isDisabled(virtualNode) {13425 -1 var disabledState = virtualNode._isDisabled;13426 -1 if (typeof disabledState === 'boolean') {13427 -1 return disabledState;13428 -1 }13429 -1 var nodeName = virtualNode.props.nodeName;13430 -1 var ariaDisabled = virtualNode.attr('aria-disabled');13431 -1 if (disabledNodeNames.includes(nodeName) && virtualNode.hasAttr('disabled')) {13432 -1 disabledState = true;13433 -1 } else if (ariaDisabled) {13434 -1 disabledState = ariaDisabled.toLowerCase() === 'true';13435 -1 } else if (virtualNode.parent) {13436 -1 disabledState = isDisabled(virtualNode.parent);13437 -1 } else {13438 -1 disabledState = false;-1 33886 var isPrototype = require_is3(); -1 33887 module.exports = function(value) { -1 33888 if (typeof value !== 'function') { -1 33889 return false; 13439 33890 }13440 -1 virtualNode._isDisabled = disabledState;13441 -1 return disabledState;13442 -1 }13443 -1 __webpack_exports__['default'] = isDisabled;13444 -1 },13445 -1 './lib/commons/forms/is-native-select.js': function libCommonsFormsIsNativeSelectJs(module, __webpack_exports__, __webpack_require__) {13446 -1 'use strict';13447 -1 __webpack_require__.r(__webpack_exports__);13448 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');13449 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');13450 -1 function isNativeSelect(node) {13451 -1 node = node instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_1__['default'] ? node : Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['getNodeFromTree'])(node);13452 -1 var nodeName = node.props.nodeName;13453 -1 return nodeName === 'select';13454 -1 }13455 -1 __webpack_exports__['default'] = isNativeSelect;13456 -1 },13457 -1 './lib/commons/forms/is-native-textbox.js': function libCommonsFormsIsNativeTextboxJs(module, __webpack_exports__, __webpack_require__) {13458 -1 'use strict';13459 -1 __webpack_require__.r(__webpack_exports__);13460 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');13461 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');13462 -1 var nonTextInputTypes = [ 'button', 'checkbox', 'color', 'file', 'hidden', 'image', 'password', 'radio', 'reset', 'submit' ];13463 -1 function isNativeTextbox(node) {13464 -1 node = node instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_1__['default'] ? node : Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['getNodeFromTree'])(node);13465 -1 var nodeName = node.props.nodeName;13466 -1 return nodeName === 'textarea' || nodeName === 'input' && !nonTextInputTypes.includes((node.attr('type') || '').toLowerCase());13467 -1 }13468 -1 __webpack_exports__['default'] = isNativeTextbox;13469 -1 },13470 -1 './lib/commons/index.js': function libCommonsIndexJs(module, __webpack_exports__, __webpack_require__) {13471 -1 'use strict';13472 -1 __webpack_require__.r(__webpack_exports__);13473 -1 var _aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');13474 -1 __webpack_require__.d(__webpack_exports__, 'aria', function() {13475 -1 return _aria__WEBPACK_IMPORTED_MODULE_0__;13476 -1 });13477 -1 var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/color/index.js');13478 -1 __webpack_require__.d(__webpack_exports__, 'color', function() {13479 -1 return _color__WEBPACK_IMPORTED_MODULE_1__;13480 -1 });13481 -1 var _dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/dom/index.js');13482 -1 __webpack_require__.d(__webpack_exports__, 'dom', function() {13483 -1 return _dom__WEBPACK_IMPORTED_MODULE_2__;13484 -1 });13485 -1 var _forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/forms/index.js');13486 -1 __webpack_require__.d(__webpack_exports__, 'forms', function() {13487 -1 return _forms__WEBPACK_IMPORTED_MODULE_3__;13488 -1 });13489 -1 var _matches__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/matches/index.js');13490 -1 __webpack_require__.d(__webpack_exports__, 'matches', function() {13491 -1 return _matches__WEBPACK_IMPORTED_MODULE_4__['default'];13492 -1 });13493 -1 var _standards__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/standards/index.js');13494 -1 __webpack_require__.d(__webpack_exports__, 'standards', function() {13495 -1 return _standards__WEBPACK_IMPORTED_MODULE_5__;13496 -1 });13497 -1 var _table__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/commons/table/index.js');13498 -1 __webpack_require__.d(__webpack_exports__, 'table', function() {13499 -1 return _table__WEBPACK_IMPORTED_MODULE_6__;13500 -1 });13501 -1 var _text__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/commons/text/index.js');13502 -1 __webpack_require__.d(__webpack_exports__, 'text', function() {13503 -1 return _text__WEBPACK_IMPORTED_MODULE_7__;13504 -1 });13505 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__('./lib/core/utils/index.js');13506 -1 __webpack_require__.d(__webpack_exports__, 'utils', function() {13507 -1 return _core_utils__WEBPACK_IMPORTED_MODULE_8__;13508 -1 });13509 -1 var commons = {13510 -1 aria: _aria__WEBPACK_IMPORTED_MODULE_0__,13511 -1 color: _color__WEBPACK_IMPORTED_MODULE_1__,13512 -1 dom: _dom__WEBPACK_IMPORTED_MODULE_2__,13513 -1 forms: _forms__WEBPACK_IMPORTED_MODULE_3__,13514 -1 matches: _matches__WEBPACK_IMPORTED_MODULE_4__['default'],13515 -1 standards: _standards__WEBPACK_IMPORTED_MODULE_5__,13516 -1 table: _table__WEBPACK_IMPORTED_MODULE_6__,13517 -1 text: _text__WEBPACK_IMPORTED_MODULE_7__,13518 -1 utils: _core_utils__WEBPACK_IMPORTED_MODULE_8__-1 33891 if (!hasOwnProperty.call(value, 'length')) { -1 33892 return false; -1 33893 } -1 33894 try { -1 33895 if (typeof value.length !== 'number') { -1 33896 return false; -1 33897 } -1 33898 if (typeof value.call !== 'function') { -1 33899 return false; -1 33900 } -1 33901 if (typeof value.apply !== 'function') { -1 33902 return false; -1 33903 } -1 33904 } catch (error) { -1 33905 return false; -1 33906 } -1 33907 return !isPrototype(value); 13519 33908 };13520 -1 },13521 -1 './lib/commons/matches/attributes.js': function libCommonsMatchesAttributesJs(module, __webpack_exports__, __webpack_require__) {-1 33909 }); -1 33910 var require_is5 = __commonJS(function(exports, module) { 13522 33911 'use strict';13523 -1 __webpack_require__.r(__webpack_exports__);13524 -1 var _from_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/matches/from-function.js');13525 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');13526 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');13527 -1 function attributes(vNode, matcher) {13528 -1 if (!(vNode instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_1__['default'])) {13529 -1 vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getNodeFromTree'])(vNode);13530 -1 }13531 -1 return Object(_from_function__WEBPACK_IMPORTED_MODULE_0__['default'])(function(attrName) {13532 -1 return vNode.attr(attrName);13533 -1 }, matcher);13534 -1 }13535 -1 __webpack_exports__['default'] = attributes;13536 -1 },13537 -1 './lib/commons/matches/condition.js': function libCommonsMatchesConditionJs(module, __webpack_exports__, __webpack_require__) {-1 33912 var isFunction = require_is4(); -1 33913 var classRe = /^\s*class[\s{/}]/; -1 33914 var functionToString = Function.prototype.toString; -1 33915 module.exports = function(value) { -1 33916 if (!isFunction(value)) { -1 33917 return false; -1 33918 } -1 33919 if (classRe.test(functionToString.call(value))) { -1 33920 return false; -1 33921 } -1 33922 return true; -1 33923 }; -1 33924 }); -1 33925 var require_is_implemented4 = __commonJS(function(exports, module) { 13538 33926 'use strict';13539 -1 __webpack_require__.r(__webpack_exports__);13540 -1 function condition(arg, condition) {13541 -1 return !!condition(arg);13542 -1 }13543 -1 __webpack_exports__['default'] = condition;13544 -1 },13545 -1 './lib/commons/matches/explicit-role.js': function libCommonsMatchesExplicitRoleJs(module, __webpack_exports__, __webpack_require__) {-1 33927 var str = 'razdwatrzy'; -1 33928 module.exports = function() { -1 33929 if (typeof str.contains !== 'function') { -1 33930 return false; -1 33931 } -1 33932 return str.contains('dwa') === true && str.contains('foo') === false; -1 33933 }; -1 33934 }); -1 33935 var require_shim4 = __commonJS(function(exports, module) { 13546 33936 'use strict';13547 -1 __webpack_require__.r(__webpack_exports__);13548 -1 var _from_primative__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/matches/from-primative.js');13549 -1 var _aria_get_explicit_role__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/get-explicit-role.js');13550 -1 function explicitRole(vNode, matcher) {13551 -1 return Object(_from_primative__WEBPACK_IMPORTED_MODULE_0__['default'])(Object(_aria_get_explicit_role__WEBPACK_IMPORTED_MODULE_1__['default'])(vNode), matcher);13552 -1 }13553 -1 __webpack_exports__['default'] = explicitRole;13554 -1 },13555 -1 './lib/commons/matches/from-definition.js': function libCommonsMatchesFromDefinitionJs(module, __webpack_exports__, __webpack_require__) {-1 33937 var indexOf = String.prototype.indexOf; -1 33938 module.exports = function(searchString) { -1 33939 return indexOf.call(this, searchString, arguments[1]) > -1; -1 33940 }; -1 33941 }); -1 33942 var require_contains = __commonJS(function(exports, module) { -1 33943 'use strict'; -1 33944 module.exports = require_is_implemented4()() ? String.prototype.contains : require_shim4(); -1 33945 }); -1 33946 var require_d = __commonJS(function(exports, module) { 13556 33947 'use strict';13557 -1 __webpack_require__.r(__webpack_exports__);13558 -1 var _attributes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/matches/attributes.js');13559 -1 var _condition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/matches/condition.js');13560 -1 var _explicit_role__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/matches/explicit-role.js');13561 -1 var _implicit_role__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/matches/implicit-role.js');13562 -1 var _node_name__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/matches/node-name.js');13563 -1 var _properties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/matches/properties.js');13564 -1 var _semantic_role__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/commons/matches/semantic-role.js');13565 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');13566 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__('./lib/core/utils/index.js');13567 -1 var matchers = {13568 -1 attributes: _attributes__WEBPACK_IMPORTED_MODULE_0__['default'],13569 -1 condition: _condition__WEBPACK_IMPORTED_MODULE_1__['default'],13570 -1 explicitRole: _explicit_role__WEBPACK_IMPORTED_MODULE_2__['default'],13571 -1 implicitRole: _implicit_role__WEBPACK_IMPORTED_MODULE_3__['default'],13572 -1 nodeName: _node_name__WEBPACK_IMPORTED_MODULE_4__['default'],13573 -1 properties: _properties__WEBPACK_IMPORTED_MODULE_5__['default'],13574 -1 semanticRole: _semantic_role__WEBPACK_IMPORTED_MODULE_6__['default']-1 33948 var isValue = require_is(); -1 33949 var isPlainFunction = require_is5(); -1 33950 var assign = require_assign(); -1 33951 var normalizeOpts = require_normalize_options(); -1 33952 var contains6 = require_contains(); -1 33953 var d = module.exports = function(dscr, value) { -1 33954 var c, e, w, options, desc; -1 33955 if (arguments.length < 2 || typeof dscr !== 'string') { -1 33956 options = value; -1 33957 value = dscr; -1 33958 dscr = null; -1 33959 } else { -1 33960 options = arguments[2]; -1 33961 } -1 33962 if (isValue(dscr)) { -1 33963 c = contains6.call(dscr, 'c'); -1 33964 e = contains6.call(dscr, 'e'); -1 33965 w = contains6.call(dscr, 'w'); -1 33966 } else { -1 33967 c = w = true; -1 33968 e = false; -1 33969 } -1 33970 desc = { -1 33971 value: value, -1 33972 configurable: c, -1 33973 enumerable: e, -1 33974 writable: w -1 33975 }; -1 33976 return !options ? desc : assign(normalizeOpts(options), desc); 13575 33977 };13576 -1 function fromDefinition(vNode, definition) {13577 -1 if (!(vNode instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_7__['default'])) {13578 -1 vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_8__['getNodeFromTree'])(vNode);-1 33978 d.gs = function(dscr, get, set) { -1 33979 var c, e, options, desc; -1 33980 if (typeof dscr !== 'string') { -1 33981 options = set; -1 33982 set = get; -1 33983 get = dscr; -1 33984 dscr = null; -1 33985 } else { -1 33986 options = arguments[3]; 13579 33987 }13580 -1 if (Array.isArray(definition)) {13581 -1 return definition.some(function(definitionItem) {13582 -1 return fromDefinition(vNode, definitionItem);13583 -1 });-1 33988 if (!isValue(get)) { -1 33989 get = void 0; -1 33990 } else if (!isPlainFunction(get)) { -1 33991 options = get; -1 33992 get = set = void 0; -1 33993 } else if (!isValue(set)) { -1 33994 set = void 0; -1 33995 } else if (!isPlainFunction(set)) { -1 33996 options = set; -1 33997 set = void 0; 13584 33998 }13585 -1 if (typeof definition === 'string') {13586 -1 return Object(_core_utils__WEBPACK_IMPORTED_MODULE_8__['matches'])(vNode, definition);-1 33999 if (isValue(dscr)) { -1 34000 c = contains6.call(dscr, 'c'); -1 34001 e = contains6.call(dscr, 'e'); -1 34002 } else { -1 34003 c = true; -1 34004 e = false; 13587 34005 }13588 -1 return Object.keys(definition).every(function(matcherName) {13589 -1 if (!matchers[matcherName]) {13590 -1 throw new Error('Unknown matcher type "'.concat(matcherName, '"'));13591 -1 }13592 -1 var matchMethod = matchers[matcherName];13593 -1 var matcher = definition[matcherName];13594 -1 return matchMethod(vNode, matcher);13595 -1 });13596 -1 }13597 -1 __webpack_exports__['default'] = fromDefinition;13598 -1 },13599 -1 './lib/commons/matches/from-function.js': function libCommonsMatchesFromFunctionJs(module, __webpack_exports__, __webpack_require__) {-1 34006 desc = { -1 34007 get: get, -1 34008 set: set, -1 34009 configurable: c, -1 34010 enumerable: e -1 34011 }; -1 34012 return !options ? desc : assign(normalizeOpts(options), desc); -1 34013 }; -1 34014 }); -1 34015 var require_event_emitter = __commonJS(function(exports, module) { 13600 34016 'use strict';13601 -1 __webpack_require__.r(__webpack_exports__);13602 -1 var _from_primative__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/matches/from-primative.js');13603 -1 function fromFunction(getValue, matcher) {13604 -1 var matcherType = _typeof(matcher);13605 -1 if (matcherType !== 'object' || Array.isArray(matcher) || matcher instanceof RegExp) {13606 -1 throw new Error('Expect matcher to be an object');13607 -1 }13608 -1 return Object.keys(matcher).every(function(propName) {13609 -1 return Object(_from_primative__WEBPACK_IMPORTED_MODULE_0__['default'])(getValue(propName), matcher[propName]);-1 34017 var d = require_d(); -1 34018 var callable = require_valid_callable(); -1 34019 var apply = Function.prototype.apply; -1 34020 var call = Function.prototype.call; -1 34021 var create = Object.create; -1 34022 var defineProperty = Object.defineProperty; -1 34023 var defineProperties = Object.defineProperties; -1 34024 var hasOwnProperty2 = Object.prototype.hasOwnProperty; -1 34025 var descriptor = { -1 34026 configurable: true, -1 34027 enumerable: false, -1 34028 writable: true -1 34029 }; -1 34030 var on; -1 34031 var once; -1 34032 var off; -1 34033 var emit; -1 34034 var methods; -1 34035 var descriptors; -1 34036 var base; -1 34037 on = function on(type, listener) { -1 34038 var data2; -1 34039 callable(listener); -1 34040 if (!hasOwnProperty2.call(this, '__ee__')) { -1 34041 data2 = descriptor.value = create(null); -1 34042 defineProperty(this, '__ee__', descriptor); -1 34043 descriptor.value = null; -1 34044 } else { -1 34045 data2 = this.__ee__; -1 34046 } -1 34047 if (!data2[type]) { -1 34048 data2[type] = listener; -1 34049 } else if (_typeof(data2[type]) === 'object') { -1 34050 data2[type].push(listener); -1 34051 } else { -1 34052 data2[type] = [ data2[type], listener ]; -1 34053 } -1 34054 return this; -1 34055 }; -1 34056 once = function once(type, listener) { -1 34057 var _once, self2; -1 34058 callable(listener); -1 34059 self2 = this; -1 34060 on.call(this, type, _once = function once2() { -1 34061 off.call(self2, type, _once); -1 34062 apply.call(listener, this, arguments); 13610 34063 });13611 -1 }13612 -1 __webpack_exports__['default'] = fromFunction;13613 -1 },13614 -1 './lib/commons/matches/from-primative.js': function libCommonsMatchesFromPrimativeJs(module, __webpack_exports__, __webpack_require__) {13615 -1 'use strict';13616 -1 __webpack_require__.r(__webpack_exports__);13617 -1 function fromPrimative(someString, matcher) {13618 -1 var matcherType = _typeof(matcher);13619 -1 if (Array.isArray(matcher) && typeof someString !== 'undefined') {13620 -1 return matcher.includes(someString);-1 34064 _once.__eeOnceListener__ = listener; -1 34065 return this; -1 34066 }; -1 34067 off = function off(type, listener) { -1 34068 var data2, listeners, candidate, i; -1 34069 callable(listener); -1 34070 if (!hasOwnProperty2.call(this, '__ee__')) { -1 34071 return this; 13621 34072 }13622 -1 if (matcherType === 'function') {13623 -1 return !!matcher(someString);-1 34073 data2 = this.__ee__; -1 34074 if (!data2[type]) { -1 34075 return this; 13624 34076 }13625 -1 if (someString !== null && someString !== undefined) {13626 -1 if (matcher instanceof RegExp) {13627 -1 return matcher.test(someString);-1 34077 listeners = data2[type]; -1 34078 if (_typeof(listeners) === 'object') { -1 34079 for (i = 0; candidate = listeners[i]; ++i) { -1 34080 if (candidate === listener || candidate.__eeOnceListener__ === listener) { -1 34081 if (listeners.length === 2) { -1 34082 data2[type] = listeners[i ? 0 : 1]; -1 34083 } else { -1 34084 listeners.splice(i, 1); -1 34085 } -1 34086 } 13628 34087 }13629 -1 if (/^\/.*\/$/.test(matcher)) {13630 -1 var pattern = matcher.substring(1, matcher.length - 1);13631 -1 return new RegExp(pattern).test(someString);-1 34088 } else { -1 34089 if (listeners === listener || listeners.__eeOnceListener__ === listener) { -1 34090 delete data2[type]; 13632 34091 } 13633 34092 }13634 -1 return matcher === someString;13635 -1 }13636 -1 __webpack_exports__['default'] = fromPrimative;13637 -1 },13638 -1 './lib/commons/matches/implicit-role.js': function libCommonsMatchesImplicitRoleJs(module, __webpack_exports__, __webpack_require__) {13639 -1 'use strict';13640 -1 __webpack_require__.r(__webpack_exports__);13641 -1 var _from_primative__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/matches/from-primative.js');13642 -1 var _aria_implicit_role__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/implicit-role.js');13643 -1 function implicitRole(vNode, matcher) {13644 -1 return Object(_from_primative__WEBPACK_IMPORTED_MODULE_0__['default'])(Object(_aria_implicit_role__WEBPACK_IMPORTED_MODULE_1__['default'])(vNode), matcher);13645 -1 }13646 -1 __webpack_exports__['default'] = implicitRole;13647 -1 },13648 -1 './lib/commons/matches/index.js': function libCommonsMatchesIndexJs(module, __webpack_exports__, __webpack_require__) {13649 -1 'use strict';13650 -1 __webpack_require__.r(__webpack_exports__);13651 -1 var _attributes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/matches/attributes.js');13652 -1 var _condition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/matches/condition.js');13653 -1 var _explicit_role__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/matches/explicit-role.js');13654 -1 var _from_definition__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/matches/from-definition.js');13655 -1 var _from_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/matches/from-function.js');13656 -1 var _from_primative__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/matches/from-primative.js');13657 -1 var _implicit_role__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/commons/matches/implicit-role.js');13658 -1 var _matches__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/commons/matches/matches.js');13659 -1 var _node_name__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__('./lib/commons/matches/node-name.js');13660 -1 var _properties__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__('./lib/commons/matches/properties.js');13661 -1 var _semantic_role__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__('./lib/commons/matches/semantic-role.js');13662 -1 _matches__WEBPACK_IMPORTED_MODULE_7__['default'].attributes = _attributes__WEBPACK_IMPORTED_MODULE_0__['default'];13663 -1 _matches__WEBPACK_IMPORTED_MODULE_7__['default'].condition = _condition__WEBPACK_IMPORTED_MODULE_1__['default'];13664 -1 _matches__WEBPACK_IMPORTED_MODULE_7__['default'].explicitRole = _explicit_role__WEBPACK_IMPORTED_MODULE_2__['default'];13665 -1 _matches__WEBPACK_IMPORTED_MODULE_7__['default'].fromDefinition = _from_definition__WEBPACK_IMPORTED_MODULE_3__['default'];13666 -1 _matches__WEBPACK_IMPORTED_MODULE_7__['default'].fromFunction = _from_function__WEBPACK_IMPORTED_MODULE_4__['default'];13667 -1 _matches__WEBPACK_IMPORTED_MODULE_7__['default'].fromPrimative = _from_primative__WEBPACK_IMPORTED_MODULE_5__['default'];13668 -1 _matches__WEBPACK_IMPORTED_MODULE_7__['default'].implicitRole = _implicit_role__WEBPACK_IMPORTED_MODULE_6__['default'];13669 -1 _matches__WEBPACK_IMPORTED_MODULE_7__['default'].nodeName = _node_name__WEBPACK_IMPORTED_MODULE_8__['default'];13670 -1 _matches__WEBPACK_IMPORTED_MODULE_7__['default'].properties = _properties__WEBPACK_IMPORTED_MODULE_9__['default'];13671 -1 _matches__WEBPACK_IMPORTED_MODULE_7__['default'].semanticRole = _semantic_role__WEBPACK_IMPORTED_MODULE_10__['default'];13672 -1 __webpack_exports__['default'] = _matches__WEBPACK_IMPORTED_MODULE_7__['default'];13673 -1 },13674 -1 './lib/commons/matches/matches.js': function libCommonsMatchesMatchesJs(module, __webpack_exports__, __webpack_require__) {13675 -1 'use strict';13676 -1 __webpack_require__.r(__webpack_exports__);13677 -1 var _from_definition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/matches/from-definition.js');13678 -1 function matches(vNode, definition) {13679 -1 return Object(_from_definition__WEBPACK_IMPORTED_MODULE_0__['default'])(vNode, definition);13680 -1 }13681 -1 __webpack_exports__['default'] = matches;13682 -1 },13683 -1 './lib/commons/matches/node-name.js': function libCommonsMatchesNodeNameJs(module, __webpack_exports__, __webpack_require__) {13684 -1 'use strict';13685 -1 __webpack_require__.r(__webpack_exports__);13686 -1 var _from_primative__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/matches/from-primative.js');13687 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');13688 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');13689 -1 function nodeName(vNode, matcher) {13690 -1 if (!(vNode instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_1__['default'])) {13691 -1 vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getNodeFromTree'])(vNode);-1 34093 return this; -1 34094 }; -1 34095 emit = function emit(type) { -1 34096 var i, l, listener, listeners, args; -1 34097 if (!hasOwnProperty2.call(this, '__ee__')) { -1 34098 return; 13692 34099 }13693 -1 return Object(_from_primative__WEBPACK_IMPORTED_MODULE_0__['default'])(vNode.props.nodeName, matcher);13694 -1 }13695 -1 __webpack_exports__['default'] = nodeName;13696 -1 },13697 -1 './lib/commons/matches/properties.js': function libCommonsMatchesPropertiesJs(module, __webpack_exports__, __webpack_require__) {13698 -1 'use strict';13699 -1 __webpack_require__.r(__webpack_exports__);13700 -1 var _from_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/matches/from-function.js');13701 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');13702 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');13703 -1 function properties(vNode, matcher) {13704 -1 if (!(vNode instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_1__['default'])) {13705 -1 vNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['getNodeFromTree'])(vNode);13706 -1 }13707 -1 return Object(_from_function__WEBPACK_IMPORTED_MODULE_0__['default'])(function(propName) {13708 -1 return vNode.props[propName];13709 -1 }, matcher);13710 -1 }13711 -1 __webpack_exports__['default'] = properties;13712 -1 },13713 -1 './lib/commons/matches/semantic-role.js': function libCommonsMatchesSemanticRoleJs(module, __webpack_exports__, __webpack_require__) {13714 -1 'use strict';13715 -1 __webpack_require__.r(__webpack_exports__);13716 -1 var _from_primative__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/matches/from-primative.js');13717 -1 var _aria_get_role__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/get-role.js');13718 -1 function semanticRole(vNode, matcher) {13719 -1 return Object(_from_primative__WEBPACK_IMPORTED_MODULE_0__['default'])(Object(_aria_get_role__WEBPACK_IMPORTED_MODULE_1__['default'])(vNode), matcher);13720 -1 }13721 -1 __webpack_exports__['default'] = semanticRole;13722 -1 },13723 -1 './lib/commons/standards/get-aria-roles-by-type.js': function libCommonsStandardsGetAriaRolesByTypeJs(module, __webpack_exports__, __webpack_require__) {13724 -1 'use strict';13725 -1 __webpack_require__.r(__webpack_exports__);13726 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');13727 -1 function getAriaRolesByType(type) {13728 -1 return Object.keys(_standards__WEBPACK_IMPORTED_MODULE_0__['default'].ariaRoles).filter(function(roleName) {13729 -1 return _standards__WEBPACK_IMPORTED_MODULE_0__['default'].ariaRoles[roleName].type === type;13730 -1 });13731 -1 }13732 -1 __webpack_exports__['default'] = getAriaRolesByType;13733 -1 },13734 -1 './lib/commons/standards/get-aria-roles-supporting-name-from-content.js': function libCommonsStandardsGetAriaRolesSupportingNameFromContentJs(module, __webpack_exports__, __webpack_require__) {13735 -1 'use strict';13736 -1 __webpack_require__.r(__webpack_exports__);13737 -1 var _core_base_cache__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/cache.js');13738 -1 var _standards__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/standards/index.js');13739 -1 function getAriaRolesSupportingNameFromContent() {13740 -1 if (_core_base_cache__WEBPACK_IMPORTED_MODULE_0__['default'].get('ariaRolesNameFromContent')) {13741 -1 return _core_base_cache__WEBPACK_IMPORTED_MODULE_0__['default'].get('ariaRolesNameFromContent');13742 -1 }13743 -1 var contentRoles = Object.keys(_standards__WEBPACK_IMPORTED_MODULE_1__['default'].ariaRoles).filter(function(roleName) {13744 -1 return _standards__WEBPACK_IMPORTED_MODULE_1__['default'].ariaRoles[roleName].nameFromContent;13745 -1 });13746 -1 _core_base_cache__WEBPACK_IMPORTED_MODULE_0__['default'].set('ariaRolesNameFromContent', contentRoles);13747 -1 return contentRoles;13748 -1 }13749 -1 __webpack_exports__['default'] = getAriaRolesSupportingNameFromContent;13750 -1 },13751 -1 './lib/commons/standards/get-element-spec.js': function libCommonsStandardsGetElementSpecJs(module, __webpack_exports__, __webpack_require__) {13752 -1 'use strict';13753 -1 __webpack_require__.r(__webpack_exports__);13754 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');13755 -1 var _commons_matches__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/matches/index.js');13756 -1 function getElementSpec(vNode) {13757 -1 var standard = _standards__WEBPACK_IMPORTED_MODULE_0__['default'].htmlElms[vNode.props.nodeName];13758 -1 if (!standard) {13759 -1 return {};13760 -1 }13761 -1 if (!standard.variant) {13762 -1 return standard;13763 -1 }13764 -1 var variant = standard.variant, spec = _objectWithoutProperties(standard, [ 'variant' ]);13765 -1 for (var variantName in variant) {13766 -1 if (!variant.hasOwnProperty(variantName) || variantName === 'default') {13767 -1 continue;-1 34100 listeners = this.__ee__[type]; -1 34101 if (!listeners) { -1 34102 return; -1 34103 } -1 34104 if (_typeof(listeners) === 'object') { -1 34105 l = arguments.length; -1 34106 args = new Array(l - 1); -1 34107 for (i = 1; i < l; ++i) { -1 34108 args[i - 1] = arguments[i]; 13768 34109 }13769 -1 var _variant$variantName = variant[variantName], matches = _variant$variantName.matches, props = _objectWithoutProperties(_variant$variantName, [ 'matches' ]);13770 -1 if (Object(_commons_matches__WEBPACK_IMPORTED_MODULE_1__['default'])(vNode, matches)) {13771 -1 for (var propName in props) {13772 -1 if (props.hasOwnProperty(propName)) {13773 -1 spec[propName] = props[propName];13774 -1 }-1 34110 listeners = listeners.slice(); -1 34111 for (i = 0; listener = listeners[i]; ++i) { -1 34112 apply.call(listener, this, args); -1 34113 } -1 34114 } else { -1 34115 switch (arguments.length) { -1 34116 case 1: -1 34117 call.call(listeners, this); -1 34118 break; -1 34119 -1 34120 case 2: -1 34121 call.call(listeners, this, arguments[1]); -1 34122 break; -1 34123 -1 34124 case 3: -1 34125 call.call(listeners, this, arguments[1], arguments[2]); -1 34126 break; -1 34127 -1 34128 default: -1 34129 l = arguments.length; -1 34130 args = new Array(l - 1); -1 34131 for (i = 1; i < l; ++i) { -1 34132 args[i - 1] = arguments[i]; 13775 34133 } -1 34134 apply.call(listeners, this, args); 13776 34135 } 13777 34136 }13778 -1 for (var _propName in variant['default']) {13779 -1 if (variant['default'].hasOwnProperty(_propName) && typeof spec[_propName] === 'undefined') {13780 -1 spec[_propName] = variant['default'][_propName];-1 34137 }; -1 34138 methods = { -1 34139 on: on, -1 34140 once: once, -1 34141 off: off, -1 34142 emit: emit -1 34143 }; -1 34144 descriptors = { -1 34145 on: d(on), -1 34146 once: d(once), -1 34147 off: d(off), -1 34148 emit: d(emit) -1 34149 }; -1 34150 base = defineProperties({}, descriptors); -1 34151 module.exports = exports = function exports(o) { -1 34152 return o == null ? create(base) : defineProperties(Object(o), descriptors); -1 34153 }; -1 34154 exports.methods = methods; -1 34155 }); -1 34156 var require_is_implemented5 = __commonJS(function(exports, module) { -1 34157 'use strict'; -1 34158 module.exports = function() { -1 34159 var from = Array.from, arr, result; -1 34160 if (typeof from !== 'function') { -1 34161 return false; -1 34162 } -1 34163 arr = [ 'raz', 'dwa' ]; -1 34164 result = from(arr); -1 34165 return Boolean(result && result !== arr && result[1] === 'dwa'); -1 34166 }; -1 34167 }); -1 34168 var require_is_implemented6 = __commonJS(function(exports, module) { -1 34169 'use strict'; -1 34170 module.exports = function() { -1 34171 if ((typeof globalThis === 'undefined' ? 'undefined' : _typeof(globalThis)) !== 'object') { -1 34172 return false; -1 34173 } -1 34174 if (!globalThis) { -1 34175 return false; -1 34176 } -1 34177 return globalThis.Array === Array; -1 34178 }; -1 34179 }); -1 34180 var require_implementation = __commonJS(function(exports, module) { -1 34181 var naiveFallback = function naiveFallback() { -1 34182 if ((typeof self === 'undefined' ? 'undefined' : _typeof(self)) === 'object' && self) { -1 34183 return self; -1 34184 } -1 34185 if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window) { -1 34186 return window; -1 34187 } -1 34188 throw new Error('Unable to resolve global `this`'); -1 34189 }; -1 34190 module.exports = function() { -1 34191 if (this) { -1 34192 return this; -1 34193 } -1 34194 try { -1 34195 Object.defineProperty(Object.prototype, '__global__', { -1 34196 get: function get() { -1 34197 return this; -1 34198 }, -1 34199 configurable: true -1 34200 }); -1 34201 } catch (error) { -1 34202 return naiveFallback(); -1 34203 } -1 34204 try { -1 34205 if (!__global__) { -1 34206 return naiveFallback(); 13781 34207 } -1 34208 return __global__; -1 34209 } finally { -1 34210 delete Object.prototype.__global__; 13782 34211 }13783 -1 return spec;13784 -1 }13785 -1 __webpack_exports__['default'] = getElementSpec;13786 -1 },13787 -1 './lib/commons/standards/get-elements-by-content-type.js': function libCommonsStandardsGetElementsByContentTypeJs(module, __webpack_exports__, __webpack_require__) {13788 -1 'use strict';13789 -1 __webpack_require__.r(__webpack_exports__);13790 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');13791 -1 function getElementsByContentType(type) {13792 -1 return Object.keys(_standards__WEBPACK_IMPORTED_MODULE_0__['default'].htmlElms).filter(function(nodeName) {13793 -1 var elm = _standards__WEBPACK_IMPORTED_MODULE_0__['default'].htmlElms[nodeName];13794 -1 if (elm.contentTypes) {13795 -1 return elm.contentTypes.includes(type);13796 -1 }13797 -1 if (!elm.variant) {13798 -1 return false;13799 -1 }13800 -1 if (elm.variant['default'] && elm.variant['default'].contentTypes) {13801 -1 return elm.variant['default'].contentTypes.includes(type);13802 -1 }13803 -1 return false;13804 -1 });13805 -1 }13806 -1 __webpack_exports__['default'] = getElementsByContentType;13807 -1 },13808 -1 './lib/commons/standards/get-global-aria-attrs.js': function libCommonsStandardsGetGlobalAriaAttrsJs(module, __webpack_exports__, __webpack_require__) {-1 34212 }(); -1 34213 }); -1 34214 var require_global_this = __commonJS(function(exports, module) { 13809 34215 'use strict';13810 -1 __webpack_require__.r(__webpack_exports__);13811 -1 var _core_base_cache__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/cache.js');13812 -1 var _standards__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/standards/index.js');13813 -1 function getGlobalAriaAttrs() {13814 -1 if (_core_base_cache__WEBPACK_IMPORTED_MODULE_0__['default'].get('globalAriaAttrs')) {13815 -1 return _core_base_cache__WEBPACK_IMPORTED_MODULE_0__['default'].get('globalAriaAttrs');13816 -1 }13817 -1 var globalAttrs = Object.keys(_standards__WEBPACK_IMPORTED_MODULE_1__['default'].ariaAttrs).filter(function(attrName) {13818 -1 return _standards__WEBPACK_IMPORTED_MODULE_1__['default'].ariaAttrs[attrName].global;13819 -1 });13820 -1 _core_base_cache__WEBPACK_IMPORTED_MODULE_0__['default'].set('globalAriaAttrs', globalAttrs);13821 -1 return globalAttrs;13822 -1 }13823 -1 __webpack_exports__['default'] = getGlobalAriaAttrs;13824 -1 },13825 -1 './lib/commons/standards/implicit-html-roles.js': function libCommonsStandardsImplicitHtmlRolesJs(module, __webpack_exports__, __webpack_require__) {-1 34216 module.exports = require_is_implemented6()() ? globalThis : require_implementation(); -1 34217 }); -1 34218 var require_is_implemented7 = __commonJS(function(exports, module) { 13826 34219 'use strict';13827 -1 __webpack_require__.r(__webpack_exports__);13828 -1 var _get_elements_by_content_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/standards/get-elements-by-content-type.js');13829 -1 var _get_global_aria_attrs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/standards/get-global-aria-attrs.js');13830 -1 var _aria_arialabelledby_text__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/aria/arialabelledby-text.js');13831 -1 var _aria_arialabel_text__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/aria/arialabel-text.js');13832 -1 var _dom_idrefs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/dom/idrefs.js');13833 -1 var _table_is_column_header__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/table/is-column-header.js');13834 -1 var _table_is_row_header__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/commons/table/is-row-header.js');13835 -1 var _text_sanitize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/commons/text/sanitize.js');13836 -1 var _dom_is_focusable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__('./lib/commons/dom/is-focusable.js');13837 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__('./lib/core/utils/index.js');13838 -1 var _aria_get_explicit_role__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__('./lib/commons/aria/get-explicit-role.js');13839 -1 var sectioningElementSelector = Object(_get_elements_by_content_type__WEBPACK_IMPORTED_MODULE_0__['default'])('sectioning').map(function(nodeName) {13840 -1 return ''.concat(nodeName, ':not([role])');13841 -1 }).join(', ') + ' , main:not([role]), [role=article], [role=complementary], [role=main], [role=navigation], [role=region]';13842 -1 function hasAccessibleName(vNode) {13843 -1 var ariaLabelledby = Object(_text_sanitize__WEBPACK_IMPORTED_MODULE_7__['default'])(Object(_aria_arialabelledby_text__WEBPACK_IMPORTED_MODULE_2__['default'])(vNode));13844 -1 var ariaLabel = Object(_text_sanitize__WEBPACK_IMPORTED_MODULE_7__['default'])(Object(_aria_arialabel_text__WEBPACK_IMPORTED_MODULE_3__['default'])(vNode));13845 -1 return !!(ariaLabelledby || ariaLabel);13846 -1 }13847 -1 var implicitHtmlRoles = {13848 -1 a: function a(vNode) {13849 -1 return vNode.hasAttr('href') ? 'link' : null;13850 -1 },13851 -1 area: function area(vNode) {13852 -1 return vNode.hasAttr('href') ? 'link' : null;13853 -1 },13854 -1 article: 'article',13855 -1 aside: 'complementary',13856 -1 body: 'document',13857 -1 button: 'button',13858 -1 datalist: 'listbox',13859 -1 dd: 'definition',13860 -1 dfn: 'term',13861 -1 details: 'group',13862 -1 dialog: 'dialog',13863 -1 dt: 'term',13864 -1 fieldset: 'group',13865 -1 figure: 'figure',13866 -1 footer: function footer(vNode) {13867 -1 var sectioningElement = Object(_core_utils__WEBPACK_IMPORTED_MODULE_9__['closest'])(vNode, sectioningElementSelector);13868 -1 return !sectioningElement ? 'contentinfo' : null;13869 -1 },13870 -1 form: function form(vNode) {13871 -1 return hasAccessibleName(vNode) ? 'form' : null;13872 -1 },13873 -1 h1: 'heading',13874 -1 h2: 'heading',13875 -1 h3: 'heading',13876 -1 h4: 'heading',13877 -1 h5: 'heading',13878 -1 h6: 'heading',13879 -1 header: function header(vNode) {13880 -1 var sectioningElement = Object(_core_utils__WEBPACK_IMPORTED_MODULE_9__['closest'])(vNode, sectioningElementSelector);13881 -1 return !sectioningElement ? 'banner' : null;13882 -1 },13883 -1 hr: 'separator',13884 -1 img: function img(vNode) {13885 -1 var emptyAlt = vNode.hasAttr('alt') && !vNode.attr('alt');13886 -1 var hasGlobalAria = Object(_get_global_aria_attrs__WEBPACK_IMPORTED_MODULE_1__['default'])().find(function(attr) {13887 -1 return vNode.hasAttr(attr);13888 -1 });13889 -1 return emptyAlt && !hasGlobalAria && !Object(_dom_is_focusable__WEBPACK_IMPORTED_MODULE_8__['default'])(vNode) ? 'presentation' : 'img';13890 -1 },13891 -1 input: function input(vNode) {13892 -1 var suggestionsSourceElement;13893 -1 if (vNode.hasAttr('list')) {13894 -1 var listElement = Object(_dom_idrefs__WEBPACK_IMPORTED_MODULE_4__['default'])(vNode.actualNode, 'list').filter(function(node) {13895 -1 return !!node;13896 -1 })[0];13897 -1 suggestionsSourceElement = listElement && listElement.nodeName.toLowerCase() === 'datalist';13898 -1 }13899 -1 switch ((vNode.attr('type') || '').toLowerCase()) {13900 -1 case 'button':13901 -1 case 'image':13902 -1 case 'reset':13903 -1 case 'submit':13904 -1 return 'button';13905 -113906 -1 case 'checkbox':13907 -1 return 'checkbox';13908 -113909 -1 case 'email':13910 -1 case 'tel':13911 -1 case 'text':13912 -1 case 'url':13913 -1 case '':13914 -1 return !suggestionsSourceElement ? 'textbox' : 'combobox';13915 -113916 -1 case 'number':13917 -1 return 'spinbutton';13918 -113919 -1 case 'radio':13920 -1 return 'radio';13921 -113922 -1 case 'range':13923 -1 return 'slider';13924 -113925 -1 case 'search':13926 -1 return !suggestionsSourceElement ? 'searchbox' : 'combobox';13927 -1 }13928 -1 },13929 -1 li: 'listitem',13930 -1 main: 'main',13931 -1 math: 'math',13932 -1 menu: 'list',13933 -1 nav: 'navigation',13934 -1 ol: 'list',13935 -1 optgroup: 'group',13936 -1 option: 'option',13937 -1 output: 'status',13938 -1 progress: 'progressbar',13939 -1 section: function section(vNode) {13940 -1 return hasAccessibleName(vNode) ? 'region' : null;13941 -1 },13942 -1 select: function select(vNode) {13943 -1 return vNode.hasAttr('multiple') || parseInt(vNode.attr('size')) > 1 ? 'listbox' : 'combobox';13944 -1 },13945 -1 summary: 'button',13946 -1 table: 'table',13947 -1 tbody: 'rowgroup',13948 -1 td: function td(vNode) {13949 -1 var table = Object(_core_utils__WEBPACK_IMPORTED_MODULE_9__['closest'])(vNode, 'table');13950 -1 var role = Object(_aria_get_explicit_role__WEBPACK_IMPORTED_MODULE_10__['default'])(table);13951 -1 return [ 'grid', 'treegrid' ].includes(role) ? 'gridcell' : 'cell';13952 -1 },13953 -1 textarea: 'textbox',13954 -1 tfoot: 'rowgroup',13955 -1 th: function th(vNode) {13956 -1 if (Object(_table_is_column_header__WEBPACK_IMPORTED_MODULE_5__['default'])(vNode.actualNode)) {13957 -1 return 'columnheader';13958 -1 }13959 -1 if (Object(_table_is_row_header__WEBPACK_IMPORTED_MODULE_6__['default'])(vNode.actualNode)) {13960 -1 return 'rowheader';13961 -1 }13962 -1 },13963 -1 thead: 'rowgroup',13964 -1 tr: 'row',13965 -1 ul: 'list'-1 34220 var global2 = require_global_this(); -1 34221 var validTypes = { -1 34222 object: true, -1 34223 symbol: true 13966 34224 };13967 -1 __webpack_exports__['default'] = implicitHtmlRoles;13968 -1 },13969 -1 './lib/commons/standards/index.js': function libCommonsStandardsIndexJs(module, __webpack_exports__, __webpack_require__) {13970 -1 'use strict';13971 -1 __webpack_require__.r(__webpack_exports__);13972 -1 var _get_aria_roles_by_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/standards/get-aria-roles-by-type.js');13973 -1 __webpack_require__.d(__webpack_exports__, 'getAriaRolesByType', function() {13974 -1 return _get_aria_roles_by_type__WEBPACK_IMPORTED_MODULE_0__['default'];13975 -1 });13976 -1 var _get_aria_roles_supporting_name_from_content__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/standards/get-aria-roles-supporting-name-from-content.js');13977 -1 __webpack_require__.d(__webpack_exports__, 'getAriaRolesSupportingNameFromContent', function() {13978 -1 return _get_aria_roles_supporting_name_from_content__WEBPACK_IMPORTED_MODULE_1__['default'];13979 -1 });13980 -1 var _get_global_aria_attrs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/standards/get-global-aria-attrs.js');13981 -1 __webpack_require__.d(__webpack_exports__, 'getGlobalAriaAttrs', function() {13982 -1 return _get_global_aria_attrs__WEBPACK_IMPORTED_MODULE_2__['default'];13983 -1 });13984 -1 var _get_element_spec__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/standards/get-element-spec.js');13985 -1 __webpack_require__.d(__webpack_exports__, 'getElementSpec', function() {13986 -1 return _get_element_spec__WEBPACK_IMPORTED_MODULE_3__['default'];13987 -1 });13988 -1 var _get_elements_by_content_type__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/standards/get-elements-by-content-type.js');13989 -1 __webpack_require__.d(__webpack_exports__, 'getElementsByContentType', function() {13990 -1 return _get_elements_by_content_type__WEBPACK_IMPORTED_MODULE_4__['default'];13991 -1 });13992 -1 var _implicit_html_roles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/standards/implicit-html-roles.js');13993 -1 __webpack_require__.d(__webpack_exports__, 'implicitHtmlRoles', function() {13994 -1 return _implicit_html_roles__WEBPACK_IMPORTED_MODULE_5__['default'];13995 -1 });13996 -1 },13997 -1 './lib/commons/table/get-all-cells.js': function libCommonsTableGetAllCellsJs(module, __webpack_exports__, __webpack_require__) {13998 -1 'use strict';13999 -1 __webpack_require__.r(__webpack_exports__);14000 -1 function getAllCells(tableElm) {14001 -1 var rowIndex, cellIndex, rowLength, cellLength;14002 -1 var cells = [];14003 -1 for (rowIndex = 0, rowLength = tableElm.rows.length; rowIndex < rowLength; rowIndex++) {14004 -1 for (cellIndex = 0, cellLength = tableElm.rows[rowIndex].cells.length; cellIndex < cellLength; cellIndex++) {14005 -1 cells.push(tableElm.rows[rowIndex].cells[cellIndex]);14006 -1 }-1 34225 module.exports = function() { -1 34226 var _Symbol = global2.Symbol; -1 34227 var symbol; -1 34228 if (typeof _Symbol !== 'function') { -1 34229 return false; 14007 34230 }14008 -1 return cells;14009 -1 }14010 -1 __webpack_exports__['default'] = getAllCells;14011 -1 },14012 -1 './lib/commons/table/get-cell-position.js': function libCommonsTableGetCellPositionJs(module, __webpack_exports__, __webpack_require__) {14013 -1 'use strict';14014 -1 __webpack_require__.r(__webpack_exports__);14015 -1 var _to_grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/table/to-grid.js');14016 -1 var _dom_find_up__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/find-up.js');14017 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');14018 -1 function getCellPosition(cell, tableGrid) {14019 -1 var rowIndex, index;14020 -1 if (!tableGrid) {14021 -1 tableGrid = Object(_to_grid__WEBPACK_IMPORTED_MODULE_0__['default'])(Object(_dom_find_up__WEBPACK_IMPORTED_MODULE_1__['default'])(cell, 'table'));14022 -1 }14023 -1 for (rowIndex = 0; rowIndex < tableGrid.length; rowIndex++) {14024 -1 if (tableGrid[rowIndex]) {14025 -1 index = tableGrid[rowIndex].indexOf(cell);14026 -1 if (index !== -1) {14027 -1 return {14028 -1 x: index,14029 -1 y: rowIndex14030 -1 };14031 -1 }14032 -1 }-1 34231 symbol = _Symbol('test symbol'); -1 34232 try { -1 34233 String(symbol); -1 34234 } catch (e) { -1 34235 return false; 14033 34236 }14034 -1 }14035 -1 __webpack_exports__['default'] = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['memoize'])(getCellPosition);14036 -1 },14037 -1 './lib/commons/table/get-headers.js': function libCommonsTableGetHeadersJs(module, __webpack_exports__, __webpack_require__) {14038 -1 'use strict';14039 -1 __webpack_require__.r(__webpack_exports__);14040 -1 var _is_row_header__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/table/is-row-header.js');14041 -1 var _is_column_header__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/table/is-column-header.js');14042 -1 var _to_grid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/table/to-grid.js');14043 -1 var _get_cell_position__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/table/get-cell-position.js');14044 -1 var _dom_idrefs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/dom/idrefs.js');14045 -1 var _dom_find_up__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/dom/find-up.js');14046 -1 function traverseForHeaders(headerType, position, tableGrid) {14047 -1 var property = headerType === 'row' ? '_rowHeaders' : '_colHeaders';14048 -1 var predicate = headerType === 'row' ? _is_row_header__WEBPACK_IMPORTED_MODULE_0__['default'] : _is_column_header__WEBPACK_IMPORTED_MODULE_1__['default'];14049 -1 var rowEnd = headerType === 'row' ? position.y : 0;14050 -1 var colEnd = headerType === 'row' ? 0 : position.x;14051 -1 var headers;14052 -1 var cells = [];14053 -1 for (var row = position.y; row >= rowEnd && !headers; row--) {14054 -1 for (var col = position.x; col >= colEnd; col--) {14055 -1 var cell = tableGrid[row] ? tableGrid[row][col] : undefined;14056 -1 if (!cell) {14057 -1 continue;14058 -1 }14059 -1 var vNode = axe.utils.getNodeFromTree(cell);14060 -1 if (vNode[property]) {14061 -1 headers = vNode[property];14062 -1 break;14063 -1 }14064 -1 cells.push(cell);14065 -1 }-1 34237 if (!validTypes[_typeof(_Symbol.iterator)]) { -1 34238 return false; 14066 34239 }14067 -1 headers = (headers || []).concat(cells.filter(predicate));14068 -1 cells.forEach(function(tableCell) {14069 -1 var vNode = axe.utils.getNodeFromTree(tableCell);14070 -1 vNode[property] = headers;14071 -1 });14072 -1 return headers;14073 -1 }14074 -1 function getHeaders(cell, tableGrid) {14075 -1 if (cell.getAttribute('headers')) {14076 -1 var headers = Object(_dom_idrefs__WEBPACK_IMPORTED_MODULE_4__['default'])(cell, 'headers');14077 -1 if (headers.filter(function(header) {14078 -1 return header;14079 -1 }).length) {14080 -1 return headers;14081 -1 }-1 34240 if (!validTypes[_typeof(_Symbol.toPrimitive)]) { -1 34241 return false; 14082 34242 }14083 -1 if (!tableGrid) {14084 -1 tableGrid = Object(_to_grid__WEBPACK_IMPORTED_MODULE_2__['default'])(Object(_dom_find_up__WEBPACK_IMPORTED_MODULE_5__['default'])(cell, 'table'));-1 34243 if (!validTypes[_typeof(_Symbol.toStringTag)]) { -1 34244 return false; 14085 34245 }14086 -1 var position = Object(_get_cell_position__WEBPACK_IMPORTED_MODULE_3__['default'])(cell, tableGrid);14087 -1 var rowHeaders = traverseForHeaders('row', position, tableGrid);14088 -1 var colHeaders = traverseForHeaders('col', position, tableGrid);14089 -1 return [].concat(rowHeaders, colHeaders).reverse();14090 -1 }14091 -1 __webpack_exports__['default'] = getHeaders;14092 -1 },14093 -1 './lib/commons/table/get-scope.js': function libCommonsTableGetScopeJs(module, __webpack_exports__, __webpack_require__) {-1 34246 return true; -1 34247 }; -1 34248 }); -1 34249 var require_is_symbol = __commonJS(function(exports, module) { 14094 34250 'use strict';14095 -1 __webpack_require__.r(__webpack_exports__);14096 -1 var _to_grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/table/to-grid.js');14097 -1 var _get_cell_position__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/table/get-cell-position.js');14098 -1 var _dom_find_up__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/dom/find-up.js');14099 -1 function getScope(cell) {14100 -1 var scope = cell.getAttribute('scope');14101 -1 var role = cell.getAttribute('role');14102 -1 if (cell instanceof window.Element === false || [ 'TD', 'TH' ].indexOf(cell.nodeName.toUpperCase()) === -1) {14103 -1 throw new TypeError('Expected TD or TH element');14104 -1 }14105 -1 if (role === 'columnheader') {14106 -1 return 'col';14107 -1 } else if (role === 'rowheader') {14108 -1 return 'row';14109 -1 } else if (scope === 'col' || scope === 'row') {14110 -1 return scope;14111 -1 } else if (cell.nodeName.toUpperCase() !== 'TH') {-1 34251 module.exports = function(value) { -1 34252 if (!value) { 14112 34253 return false; 14113 34254 }14114 -1 var tableGrid = Object(_to_grid__WEBPACK_IMPORTED_MODULE_0__['default'])(Object(_dom_find_up__WEBPACK_IMPORTED_MODULE_2__['default'])(cell, 'table'));14115 -1 var pos = Object(_get_cell_position__WEBPACK_IMPORTED_MODULE_1__['default'])(cell, tableGrid);14116 -1 var headerRow = tableGrid[pos.y].reduce(function(headerRow, cell) {14117 -1 return headerRow && cell.nodeName.toUpperCase() === 'TH';14118 -1 }, true);14119 -1 if (headerRow) {14120 -1 return 'col';14121 -1 }14122 -1 var headerCol = tableGrid.map(function(col) {14123 -1 return col[pos.x];14124 -1 }).reduce(function(headerCol, cell) {14125 -1 return headerCol && cell && cell.nodeName.toUpperCase() === 'TH';14126 -1 }, true);14127 -1 if (headerCol) {14128 -1 return 'row';-1 34255 if (_typeof(value) === 'symbol') { -1 34256 return true; 14129 34257 }14130 -1 return 'auto';14131 -1 }14132 -1 __webpack_exports__['default'] = getScope;14133 -1 },14134 -1 './lib/commons/table/index.js': function libCommonsTableIndexJs(module, __webpack_exports__, __webpack_require__) {14135 -1 'use strict';14136 -1 __webpack_require__.r(__webpack_exports__);14137 -1 var _get_all_cells__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/table/get-all-cells.js');14138 -1 __webpack_require__.d(__webpack_exports__, 'getAllCells', function() {14139 -1 return _get_all_cells__WEBPACK_IMPORTED_MODULE_0__['default'];14140 -1 });14141 -1 var _get_cell_position__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/table/get-cell-position.js');14142 -1 __webpack_require__.d(__webpack_exports__, 'getCellPosition', function() {14143 -1 return _get_cell_position__WEBPACK_IMPORTED_MODULE_1__['default'];14144 -1 });14145 -1 var _get_headers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/table/get-headers.js');14146 -1 __webpack_require__.d(__webpack_exports__, 'getHeaders', function() {14147 -1 return _get_headers__WEBPACK_IMPORTED_MODULE_2__['default'];14148 -1 });14149 -1 var _get_scope__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/table/get-scope.js');14150 -1 __webpack_require__.d(__webpack_exports__, 'getScope', function() {14151 -1 return _get_scope__WEBPACK_IMPORTED_MODULE_3__['default'];14152 -1 });14153 -1 var _is_column_header__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/table/is-column-header.js');14154 -1 __webpack_require__.d(__webpack_exports__, 'isColumnHeader', function() {14155 -1 return _is_column_header__WEBPACK_IMPORTED_MODULE_4__['default'];14156 -1 });14157 -1 var _is_data_cell__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/table/is-data-cell.js');14158 -1 __webpack_require__.d(__webpack_exports__, 'isDataCell', function() {14159 -1 return _is_data_cell__WEBPACK_IMPORTED_MODULE_5__['default'];14160 -1 });14161 -1 var _is_data_table__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/commons/table/is-data-table.js');14162 -1 __webpack_require__.d(__webpack_exports__, 'isDataTable', function() {14163 -1 return _is_data_table__WEBPACK_IMPORTED_MODULE_6__['default'];14164 -1 });14165 -1 var _is_header__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/commons/table/is-header.js');14166 -1 __webpack_require__.d(__webpack_exports__, 'isHeader', function() {14167 -1 return _is_header__WEBPACK_IMPORTED_MODULE_7__['default'];14168 -1 });14169 -1 var _is_row_header__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__('./lib/commons/table/is-row-header.js');14170 -1 __webpack_require__.d(__webpack_exports__, 'isRowHeader', function() {14171 -1 return _is_row_header__WEBPACK_IMPORTED_MODULE_8__['default'];14172 -1 });14173 -1 var _to_grid__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__('./lib/commons/table/to-grid.js');14174 -1 __webpack_require__.d(__webpack_exports__, 'toGrid', function() {14175 -1 return _to_grid__WEBPACK_IMPORTED_MODULE_9__['default'];14176 -1 });14177 -1 var _traverse__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__('./lib/commons/table/traverse.js');14178 -1 __webpack_require__.d(__webpack_exports__, 'traverse', function() {14179 -1 return _traverse__WEBPACK_IMPORTED_MODULE_10__['default'];14180 -1 });14181 -1 __webpack_require__.d(__webpack_exports__, 'toArray', function() {14182 -1 return _to_grid__WEBPACK_IMPORTED_MODULE_9__['default'];14183 -1 });14184 -1 },14185 -1 './lib/commons/table/is-column-header.js': function libCommonsTableIsColumnHeaderJs(module, __webpack_exports__, __webpack_require__) {14186 -1 'use strict';14187 -1 __webpack_require__.r(__webpack_exports__);14188 -1 var _get_scope__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/table/get-scope.js');14189 -1 function isColumnHeader(element) {14190 -1 return [ 'col', 'auto' ].indexOf(Object(_get_scope__WEBPACK_IMPORTED_MODULE_0__['default'])(element)) !== -1;14191 -1 }14192 -1 __webpack_exports__['default'] = isColumnHeader;14193 -1 },14194 -1 './lib/commons/table/is-data-cell.js': function libCommonsTableIsDataCellJs(module, __webpack_exports__, __webpack_require__) {14195 -1 'use strict';14196 -1 __webpack_require__.r(__webpack_exports__);14197 -1 var _aria_is_valid_role__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/is-valid-role.js');14198 -1 function isDataCell(cell) {14199 -1 if (!cell.children.length && !cell.textContent.trim()) {-1 34258 if (!value.constructor) { 14200 34259 return false; 14201 34260 }14202 -1 var role = cell.getAttribute('role');14203 -1 if (Object(_aria_is_valid_role__WEBPACK_IMPORTED_MODULE_0__['default'])(role)) {14204 -1 return [ 'cell', 'gridcell' ].includes(role);14205 -1 } else {14206 -1 return cell.nodeName.toUpperCase() === 'TD';14207 -1 }14208 -1 }14209 -1 __webpack_exports__['default'] = isDataCell;14210 -1 },14211 -1 './lib/commons/table/is-data-table.js': function libCommonsTableIsDataTableJs(module, __webpack_exports__, __webpack_require__) {14212 -1 'use strict';14213 -1 __webpack_require__.r(__webpack_exports__);14214 -1 var _aria_get_role_type__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/get-role-type.js');14215 -1 var _dom_is_focusable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/is-focusable.js');14216 -1 var _dom_find_up__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/dom/find-up.js');14217 -1 var _dom_get_element_coordinates__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/dom/get-element-coordinates.js');14218 -1 var _dom_get_viewport_size__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/dom/get-viewport-size.js');14219 -1 function isDataTable(node) {14220 -1 var role = (node.getAttribute('role') || '').toLowerCase();14221 -1 if ((role === 'presentation' || role === 'none') && !Object(_dom_is_focusable__WEBPACK_IMPORTED_MODULE_1__['default'])(node)) {-1 34261 if (value.constructor.name !== 'Symbol') { 14222 34262 return false; 14223 34263 }14224 -1 if (node.getAttribute('contenteditable') === 'true' || Object(_dom_find_up__WEBPACK_IMPORTED_MODULE_2__['default'])(node, '[contenteditable="true"]')) {14225 -1 return true;-1 34264 return value[value.constructor.toStringTag] === 'Symbol'; -1 34265 }; -1 34266 }); -1 34267 var require_validate_symbol = __commonJS(function(exports, module) { -1 34268 'use strict'; -1 34269 var isSymbol = require_is_symbol(); -1 34270 module.exports = function(value) { -1 34271 if (!isSymbol(value)) { -1 34272 throw new TypeError(value + ' is not a symbol'); 14226 34273 }14227 -1 if (role === 'grid' || role === 'treegrid' || role === 'table') {14228 -1 return true;-1 34274 return value; -1 34275 }; -1 34276 }); -1 34277 var require_generate_name = __commonJS(function(exports, module) { -1 34278 'use strict'; -1 34279 var d = require_d(); -1 34280 var create = Object.create; -1 34281 var defineProperty = Object.defineProperty; -1 34282 var objPrototype = Object.prototype; -1 34283 var created = create(null); -1 34284 module.exports = function(desc) { -1 34285 var postfix = 0, name, ie11BugWorkaround; -1 34286 while (created[desc + (postfix || '')]) { -1 34287 ++postfix; 14229 34288 }14230 -1 if (Object(_aria_get_role_type__WEBPACK_IMPORTED_MODULE_0__['default'])(role) === 'landmark') {14231 -1 return true;-1 34289 desc += postfix || ''; -1 34290 created[desc] = true; -1 34291 name = '@@' + desc; -1 34292 defineProperty(objPrototype, name, d.gs(null, function(value) { -1 34293 if (ie11BugWorkaround) { -1 34294 return; -1 34295 } -1 34296 ie11BugWorkaround = true; -1 34297 defineProperty(this, name, d(value)); -1 34298 ie11BugWorkaround = false; -1 34299 })); -1 34300 return name; -1 34301 }; -1 34302 }); -1 34303 var require_standard_symbols = __commonJS(function(exports, module) { -1 34304 'use strict'; -1 34305 var d = require_d(); -1 34306 var NativeSymbol = require_global_this().Symbol; -1 34307 module.exports = function(SymbolPolyfill) { -1 34308 return Object.defineProperties(SymbolPolyfill, { -1 34309 hasInstance: d('', NativeSymbol && NativeSymbol.hasInstance || SymbolPolyfill('hasInstance')), -1 34310 isConcatSpreadable: d('', NativeSymbol && NativeSymbol.isConcatSpreadable || SymbolPolyfill('isConcatSpreadable')), -1 34311 iterator: d('', NativeSymbol && NativeSymbol.iterator || SymbolPolyfill('iterator')), -1 34312 match: d('', NativeSymbol && NativeSymbol.match || SymbolPolyfill('match')), -1 34313 replace: d('', NativeSymbol && NativeSymbol.replace || SymbolPolyfill('replace')), -1 34314 search: d('', NativeSymbol && NativeSymbol.search || SymbolPolyfill('search')), -1 34315 species: d('', NativeSymbol && NativeSymbol.species || SymbolPolyfill('species')), -1 34316 split: d('', NativeSymbol && NativeSymbol.split || SymbolPolyfill('split')), -1 34317 toPrimitive: d('', NativeSymbol && NativeSymbol.toPrimitive || SymbolPolyfill('toPrimitive')), -1 34318 toStringTag: d('', NativeSymbol && NativeSymbol.toStringTag || SymbolPolyfill('toStringTag')), -1 34319 unscopables: d('', NativeSymbol && NativeSymbol.unscopables || SymbolPolyfill('unscopables')) -1 34320 }); -1 34321 }; -1 34322 }); -1 34323 var require_symbol_registry = __commonJS(function(exports, module) { -1 34324 'use strict'; -1 34325 var d = require_d(); -1 34326 var validateSymbol = require_validate_symbol(); -1 34327 var registry = Object.create(null); -1 34328 module.exports = function(SymbolPolyfill) { -1 34329 return Object.defineProperties(SymbolPolyfill, { -1 34330 for: d(function(key) { -1 34331 if (registry[key]) { -1 34332 return registry[key]; -1 34333 } -1 34334 return registry[key] = SymbolPolyfill(String(key)); -1 34335 }), -1 34336 keyFor: d(function(symbol) { -1 34337 var key; -1 34338 validateSymbol(symbol); -1 34339 for (key in registry) { -1 34340 if (registry[key] === symbol) { -1 34341 return key; -1 34342 } -1 34343 } -1 34344 return void 0; -1 34345 }) -1 34346 }); -1 34347 }; -1 34348 }); -1 34349 var require_polyfill = __commonJS(function(exports, module) { -1 34350 'use strict'; -1 34351 var d = require_d(); -1 34352 var validateSymbol = require_validate_symbol(); -1 34353 var NativeSymbol = require_global_this().Symbol; -1 34354 var generateName = require_generate_name(); -1 34355 var setupStandardSymbols = require_standard_symbols(); -1 34356 var setupSymbolRegistry = require_symbol_registry(); -1 34357 var create = Object.create; -1 34358 var defineProperties = Object.defineProperties; -1 34359 var defineProperty = Object.defineProperty; -1 34360 var SymbolPolyfill; -1 34361 var HiddenSymbol; -1 34362 var isNativeSafe; -1 34363 if (typeof NativeSymbol === 'function') { -1 34364 try { -1 34365 String(NativeSymbol()); -1 34366 isNativeSafe = true; -1 34367 } catch (ignore) {} -1 34368 } else { -1 34369 NativeSymbol = null; -1 34370 } -1 34371 HiddenSymbol = function _Symbol2(description) { -1 34372 if (this instanceof HiddenSymbol) { -1 34373 throw new TypeError('Symbol is not a constructor'); 14232 34374 }14233 -1 if (node.getAttribute('datatable') === '0') {14234 -1 return false;-1 34375 return SymbolPolyfill(description); -1 34376 }; -1 34377 module.exports = SymbolPolyfill = function _Symbol3(description) { -1 34378 var symbol; -1 34379 if (this instanceof _Symbol3) { -1 34380 throw new TypeError('Symbol is not a constructor'); 14235 34381 }14236 -1 if (node.getAttribute('summary')) {14237 -1 return true;-1 34382 if (isNativeSafe) { -1 34383 return NativeSymbol(description); 14238 34384 }14239 -1 if (node.tHead || node.tFoot || node.caption) {14240 -1 return true;-1 34385 symbol = create(HiddenSymbol.prototype); -1 34386 description = description === void 0 ? '' : String(description); -1 34387 return defineProperties(symbol, { -1 34388 __description__: d('', description), -1 34389 __name__: d('', generateName(description)) -1 34390 }); -1 34391 }; -1 34392 setupStandardSymbols(SymbolPolyfill); -1 34393 setupSymbolRegistry(SymbolPolyfill); -1 34394 defineProperties(HiddenSymbol.prototype, { -1 34395 constructor: d(SymbolPolyfill), -1 34396 toString: d('', function() { -1 34397 return this.__name__; -1 34398 }) -1 34399 }); -1 34400 defineProperties(SymbolPolyfill.prototype, { -1 34401 toString: d(function() { -1 34402 return 'Symbol (' + validateSymbol(this).__description__ + ')'; -1 34403 }), -1 34404 valueOf: d(function() { -1 34405 return validateSymbol(this); -1 34406 }) -1 34407 }); -1 34408 defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('', function() { -1 34409 var symbol = validateSymbol(this); -1 34410 if (_typeof(symbol) === 'symbol') { -1 34411 return symbol; 14241 34412 }14242 -1 for (var childIndex = 0, childLength = node.children.length; childIndex < childLength; childIndex++) {14243 -1 if (node.children[childIndex].nodeName.toUpperCase() === 'COLGROUP') {14244 -1 return true;14245 -1 }-1 34413 return symbol.toString(); -1 34414 })); -1 34415 defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol')); -1 34416 defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])); -1 34417 defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])); -1 34418 }); -1 34419 var require_es6_symbol = __commonJS(function(exports, module) { -1 34420 'use strict'; -1 34421 module.exports = require_is_implemented7()() ? require_global_this().Symbol : require_polyfill(); -1 34422 }); -1 34423 var require_is_arguments = __commonJS(function(exports, module) { -1 34424 'use strict'; -1 34425 var objToString = Object.prototype.toString; -1 34426 var id = objToString.call(function() { -1 34427 return arguments; -1 34428 }()); -1 34429 module.exports = function(value) { -1 34430 return objToString.call(value) === id; -1 34431 }; -1 34432 }); -1 34433 var require_is_function = __commonJS(function(exports, module) { -1 34434 'use strict'; -1 34435 var objToString = Object.prototype.toString; -1 34436 var isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/); -1 34437 module.exports = function(value) { -1 34438 return typeof value === 'function' && isFunctionStringTag(objToString.call(value)); -1 34439 }; -1 34440 }); -1 34441 var require_is_string = __commonJS(function(exports, module) { -1 34442 'use strict'; -1 34443 var objToString = Object.prototype.toString; -1 34444 var id = objToString.call(''); -1 34445 module.exports = function(value) { -1 34446 return typeof value === 'string' || value && _typeof(value) === 'object' && (value instanceof String || objToString.call(value) === id) || false; -1 34447 }; -1 34448 }); -1 34449 var require_shim5 = __commonJS(function(exports, module) { -1 34450 'use strict'; -1 34451 var iteratorSymbol = require_es6_symbol().iterator; -1 34452 var isArguments = require_is_arguments(); -1 34453 var isFunction = require_is_function(); -1 34454 var toPosInt = require_to_pos_integer(); -1 34455 var callable = require_valid_callable(); -1 34456 var validValue = require_valid_value(); -1 34457 var isValue = require_is_value(); -1 34458 var isString = require_is_string(); -1 34459 var isArray = Array.isArray; -1 34460 var call = Function.prototype.call; -1 34461 var desc = { -1 34462 configurable: true, -1 34463 enumerable: true, -1 34464 writable: true, -1 34465 value: null -1 34466 }; -1 34467 var defineProperty = Object.defineProperty; -1 34468 module.exports = function(arrayLike) { -1 34469 var mapFn = arguments[1], thisArg = arguments[2], Context2, i, j, arr, length, code, iterator, result, getIterator, value; -1 34470 arrayLike = Object(validValue(arrayLike)); -1 34471 if (isValue(mapFn)) { -1 34472 callable(mapFn); 14246 34473 }14247 -1 var cells = 0;14248 -1 var rowLength = node.rows.length;14249 -1 var row, cell;14250 -1 var hasBorder = false;14251 -1 for (var rowIndex = 0; rowIndex < rowLength; rowIndex++) {14252 -1 row = node.rows[rowIndex];14253 -1 for (var cellIndex = 0, cellLength = row.cells.length; cellIndex < cellLength; cellIndex++) {14254 -1 cell = row.cells[cellIndex];14255 -1 if (cell.nodeName.toUpperCase() === 'TH') {14256 -1 return true;-1 34474 if (!this || this === Array || !isFunction(this)) { -1 34475 if (!mapFn) { -1 34476 if (isArguments(arrayLike)) { -1 34477 length = arrayLike.length; -1 34478 if (length !== 1) { -1 34479 return Array.apply(null, arrayLike); -1 34480 } -1 34481 arr = new Array(1); -1 34482 arr[0] = arrayLike[0]; -1 34483 return arr; 14257 34484 }14258 -1 if (!hasBorder && (cell.offsetWidth !== cell.clientWidth || cell.offsetHeight !== cell.clientHeight)) {14259 -1 hasBorder = true;-1 34485 if (isArray(arrayLike)) { -1 34486 arr = new Array(length = arrayLike.length); -1 34487 for (i = 0; i < length; ++i) { -1 34488 arr[i] = arrayLike[i]; -1 34489 } -1 34490 return arr; 14260 34491 }14261 -1 if (cell.getAttribute('scope') || cell.getAttribute('headers') || cell.getAttribute('abbr')) {14262 -1 return true;-1 34492 } -1 34493 arr = []; -1 34494 } else { -1 34495 Context2 = this; -1 34496 } -1 34497 if (!isArray(arrayLike)) { -1 34498 if ((getIterator = arrayLike[iteratorSymbol]) !== void 0) { -1 34499 iterator = callable(getIterator).call(arrayLike); -1 34500 if (Context2) { -1 34501 arr = new Context2(); 14263 34502 }14264 -1 if ([ 'columnheader', 'rowheader' ].includes((cell.getAttribute('role') || '').toLowerCase())) {14265 -1 return true;-1 34503 result = iterator.next(); -1 34504 i = 0; -1 34505 while (!result.done) { -1 34506 value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value; -1 34507 if (Context2) { -1 34508 desc.value = value; -1 34509 defineProperty(arr, i, desc); -1 34510 } else { -1 34511 arr[i] = value; -1 34512 } -1 34513 result = iterator.next(); -1 34514 ++i; 14266 34515 }14267 -1 if (cell.children.length === 1 && cell.children[0].nodeName.toUpperCase() === 'ABBR') {14268 -1 return true;-1 34516 length = i; -1 34517 } else if (isString(arrayLike)) { -1 34518 length = arrayLike.length; -1 34519 if (Context2) { -1 34520 arr = new Context2(); 14269 34521 }14270 -1 cells++;14271 -1 }14272 -1 }14273 -1 if (node.getElementsByTagName('table').length) {14274 -1 return false;14275 -1 }14276 -1 if (rowLength < 2) {14277 -1 return false;14278 -1 }14279 -1 var sampleRow = node.rows[Math.ceil(rowLength / 2)];14280 -1 if (sampleRow.cells.length === 1 && sampleRow.cells[0].colSpan === 1) {14281 -1 return false;14282 -1 }14283 -1 if (sampleRow.cells.length >= 5) {14284 -1 return true;14285 -1 }14286 -1 if (hasBorder) {14287 -1 return true;14288 -1 }14289 -1 var bgColor, bgImage;14290 -1 for (rowIndex = 0; rowIndex < rowLength; rowIndex++) {14291 -1 row = node.rows[rowIndex];14292 -1 if (bgColor && bgColor !== window.getComputedStyle(row).getPropertyValue('background-color')) {14293 -1 return true;14294 -1 } else {14295 -1 bgColor = window.getComputedStyle(row).getPropertyValue('background-color');14296 -1 }14297 -1 if (bgImage && bgImage !== window.getComputedStyle(row).getPropertyValue('background-image')) {14298 -1 return true;14299 -1 } else {14300 -1 bgImage = window.getComputedStyle(row).getPropertyValue('background-image');14301 -1 }14302 -1 }14303 -1 if (rowLength >= 20) {14304 -1 return true;14305 -1 }14306 -1 if (Object(_dom_get_element_coordinates__WEBPACK_IMPORTED_MODULE_3__['default'])(node).width > Object(_dom_get_viewport_size__WEBPACK_IMPORTED_MODULE_4__['default'])(window).width * .95) {14307 -1 return false;14308 -1 }14309 -1 if (cells < 10) {14310 -1 return false;14311 -1 }14312 -1 if (node.querySelector('object, embed, iframe, applet')) {14313 -1 return false;14314 -1 }14315 -1 return true;14316 -1 }14317 -1 __webpack_exports__['default'] = isDataTable;14318 -1 },14319 -1 './lib/commons/table/is-header.js': function libCommonsTableIsHeaderJs(module, __webpack_exports__, __webpack_require__) {14320 -1 'use strict';14321 -1 __webpack_require__.r(__webpack_exports__);14322 -1 var _is_column_header__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/table/is-column-header.js');14323 -1 var _is_row_header__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/table/is-row-header.js');14324 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');14325 -1 function isHeader(cell) {14326 -1 if (Object(_is_column_header__WEBPACK_IMPORTED_MODULE_0__['default'])(cell) || Object(_is_row_header__WEBPACK_IMPORTED_MODULE_1__['default'])(cell)) {14327 -1 return true;14328 -1 }14329 -1 if (cell.getAttribute('id')) {14330 -1 var id = Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['escapeSelector'])(cell.getAttribute('id'));14331 -1 return !!document.querySelector('[headers~="'.concat(id, '"]'));14332 -1 }14333 -1 return false;14334 -1 }14335 -1 __webpack_exports__['default'] = isHeader;14336 -1 },14337 -1 './lib/commons/table/is-row-header.js': function libCommonsTableIsRowHeaderJs(module, __webpack_exports__, __webpack_require__) {14338 -1 'use strict';14339 -1 __webpack_require__.r(__webpack_exports__);14340 -1 var _get_scope__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/table/get-scope.js');14341 -1 function isRowHeader(cell) {14342 -1 return [ 'row', 'auto' ].includes(Object(_get_scope__WEBPACK_IMPORTED_MODULE_0__['default'])(cell));14343 -1 }14344 -1 __webpack_exports__['default'] = isRowHeader;14345 -1 },14346 -1 './lib/commons/table/to-grid.js': function libCommonsTableToGridJs(module, __webpack_exports__, __webpack_require__) {14347 -1 'use strict';14348 -1 __webpack_require__.r(__webpack_exports__);14349 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');14350 -1 function toGrid(node) {14351 -1 var table = [];14352 -1 var rows = node.rows;14353 -1 for (var i = 0, rowLength = rows.length; i < rowLength; i++) {14354 -1 var cells = rows[i].cells;14355 -1 table[i] = table[i] || [];14356 -1 var columnIndex = 0;14357 -1 for (var j = 0, cellLength = cells.length; j < cellLength; j++) {14358 -1 for (var colSpan = 0; colSpan < cells[j].colSpan; colSpan++) {14359 -1 for (var rowSpan = 0; rowSpan < cells[j].rowSpan; rowSpan++) {14360 -1 table[i + rowSpan] = table[i + rowSpan] || [];14361 -1 while (table[i + rowSpan][columnIndex]) {14362 -1 columnIndex++;-1 34522 for (i = 0, j = 0; i < length; ++i) { -1 34523 value = arrayLike[i]; -1 34524 if (i + 1 < length) { -1 34525 code = value.charCodeAt(0); -1 34526 if (code >= 55296 && code <= 56319) { -1 34527 value += arrayLike[++i]; 14363 34528 }14364 -1 table[i + rowSpan][columnIndex] = cells[j];14365 34529 }14366 -1 columnIndex++;-1 34530 value = mapFn ? call.call(mapFn, thisArg, value, j) : value; -1 34531 if (Context2) { -1 34532 desc.value = value; -1 34533 defineProperty(arr, j, desc); -1 34534 } else { -1 34535 arr[j] = value; -1 34536 } -1 34537 ++j; 14367 34538 } -1 34539 length = j; 14368 34540 } 14369 34541 }14370 -1 return table;14371 -1 }14372 -1 __webpack_exports__['default'] = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['memoize'])(toGrid);14373 -1 },14374 -1 './lib/commons/table/traverse.js': function libCommonsTableTraverseJs(module, __webpack_exports__, __webpack_require__) {14375 -1 'use strict';14376 -1 __webpack_require__.r(__webpack_exports__);14377 -1 function traverseTable(dir, position, tableGrid, callback) {14378 -1 var result;14379 -1 var cell = tableGrid[position.y] ? tableGrid[position.y][position.x] : undefined;14380 -1 if (!cell) {14381 -1 return [];14382 -1 }14383 -1 if (typeof callback === 'function') {14384 -1 result = callback(cell, position, tableGrid);14385 -1 if (result === true) {14386 -1 return [ cell ];14387 -1 }14388 -1 }14389 -1 result = traverseTable(dir, {14390 -1 x: position.x + dir.x,14391 -1 y: position.y + dir.y14392 -1 }, tableGrid, callback);14393 -1 result.unshift(cell);14394 -1 return result;14395 -1 }14396 -1 function traverse(dir, startPos, tableGrid, callback) {14397 -1 if (Array.isArray(startPos)) {14398 -1 callback = tableGrid;14399 -1 tableGrid = startPos;14400 -1 startPos = {14401 -1 x: 0,14402 -1 y: 014403 -1 };14404 -1 }14405 -1 if (typeof dir === 'string') {14406 -1 switch (dir) {14407 -1 case 'left':14408 -1 dir = {14409 -1 x: -1,14410 -1 y: 014411 -1 };14412 -1 break;14413 -114414 -1 case 'up':14415 -1 dir = {14416 -1 x: 0,14417 -1 y: -114418 -1 };14419 -1 break;14420 -114421 -1 case 'right':14422 -1 dir = {14423 -1 x: 1,14424 -1 y: 014425 -1 };14426 -1 break;14427 -114428 -1 case 'down':14429 -1 dir = {14430 -1 x: 0,14431 -1 y: 114432 -1 };14433 -1 break;14434 -1 }14435 -1 }14436 -1 return traverseTable(dir, {14437 -1 x: startPos.x + dir.x,14438 -1 y: startPos.y + dir.y14439 -1 }, tableGrid, callback);14440 -1 }14441 -1 __webpack_exports__['default'] = traverse;14442 -1 },14443 -1 './lib/commons/text/accessible-text-virtual.js': function libCommonsTextAccessibleTextVirtualJs(module, __webpack_exports__, __webpack_require__) {14444 -1 'use strict';14445 -1 __webpack_require__.r(__webpack_exports__);14446 -1 var _aria_arialabelledby_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/arialabelledby-text.js');14447 -1 var _aria_arialabel_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/arialabel-text.js');14448 -1 var _native_text_alternative__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/text/native-text-alternative.js');14449 -1 var _form_control_value__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/text/form-control-value.js');14450 -1 var _subtree_text__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/text/subtree-text.js');14451 -1 var _title_text__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/text/title-text.js');14452 -1 var _sanitize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/commons/text/sanitize.js');14453 -1 var _dom_is_visible__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/commons/dom/is-visible.js');14454 -1 function accessibleTextVirtual(virtualNode) {14455 -1 var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};14456 -1 var actualNode = virtualNode.actualNode;14457 -1 context = prepareContext(virtualNode, context);14458 -1 if (shouldIgnoreHidden(virtualNode, context)) {14459 -1 return '';14460 -1 }14461 -1 var computationSteps = [ _aria_arialabelledby_text__WEBPACK_IMPORTED_MODULE_0__['default'], _aria_arialabel_text__WEBPACK_IMPORTED_MODULE_1__['default'], _native_text_alternative__WEBPACK_IMPORTED_MODULE_2__['default'], _form_control_value__WEBPACK_IMPORTED_MODULE_3__['default'], _subtree_text__WEBPACK_IMPORTED_MODULE_4__['default'], textNodeValue, _title_text__WEBPACK_IMPORTED_MODULE_5__['default'] ];14462 -1 var accName = computationSteps.reduce(function(accName, step) {14463 -1 if (context.startNode === virtualNode) {14464 -1 accName = Object(_sanitize__WEBPACK_IMPORTED_MODULE_6__['default'])(accName);-1 34542 if (length === void 0) { -1 34543 length = toPosInt(arrayLike.length); -1 34544 if (Context2) { -1 34545 arr = new Context2(length); 14465 34546 }14466 -1 if (accName !== '') {14467 -1 return accName;-1 34547 for (i = 0; i < length; ++i) { -1 34548 value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i]; -1 34549 if (Context2) { -1 34550 desc.value = value; -1 34551 defineProperty(arr, i, desc); -1 34552 } else { -1 34553 arr[i] = value; -1 34554 } 14468 34555 }14469 -1 return step(virtualNode, context);14470 -1 }, '');14471 -1 if (context.debug) {14472 -1 axe.log(accName || '{empty-value}', actualNode, context);14473 -1 }14474 -1 return accName;14475 -1 }14476 -1 function textNodeValue(virtualNode) {14477 -1 if (virtualNode.props.nodeType !== 3) {14478 -1 return '';14479 -1 }14480 -1 return virtualNode.props.nodeValue;14481 -1 }14482 -1 function shouldIgnoreHidden(_ref46, context) {14483 -1 var actualNode = _ref46.actualNode;14484 -1 if (!actualNode) {14485 -1 return false;14486 34556 }14487 -1 if (actualNode.nodeType !== 1 || context.includeHidden) {14488 -1 return false;14489 -1 }14490 -1 return !Object(_dom_is_visible__WEBPACK_IMPORTED_MODULE_7__['default'])(actualNode, true);14491 -1 }14492 -1 function prepareContext(virtualNode, context) {14493 -1 var actualNode = virtualNode.actualNode;14494 -1 if (!context.startNode) {14495 -1 context = _extends({14496 -1 startNode: virtualNode14497 -1 }, context);14498 -1 }14499 -1 if (!actualNode) {14500 -1 return context;14501 -1 }14502 -1 if (actualNode.nodeType === 1 && context.inLabelledByContext && context.includeHidden === undefined) {14503 -1 context = _extends({14504 -1 includeHidden: !Object(_dom_is_visible__WEBPACK_IMPORTED_MODULE_7__['default'])(actualNode, true)14505 -1 }, context);14506 -1 }14507 -1 return context;14508 -1 }14509 -1 accessibleTextVirtual.alreadyProcessed = function alreadyProcessed(virtualnode, context) {14510 -1 context.processed = context.processed || [];14511 -1 if (context.processed.includes(virtualnode)) {14512 -1 return true;-1 34557 if (Context2) { -1 34558 desc.value = null; -1 34559 arr.length = length; 14513 34560 }14514 -1 context.processed.push(virtualnode);14515 -1 return false;-1 34561 return arr; 14516 34562 };14517 -1 __webpack_exports__['default'] = accessibleTextVirtual;14518 -1 },14519 -1 './lib/commons/text/accessible-text.js': function libCommonsTextAccessibleTextJs(module, __webpack_exports__, __webpack_require__) {-1 34563 }); -1 34564 var require_from = __commonJS(function(exports, module) { 14520 34565 'use strict';14521 -1 __webpack_require__.r(__webpack_exports__);14522 -1 var _accessible_text_virtual__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/accessible-text-virtual.js');14523 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');14524 -1 function accessibleText(element, context) {14525 -1 var virtualNode = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeFromTree'])(element);14526 -1 return Object(_accessible_text_virtual__WEBPACK_IMPORTED_MODULE_0__['default'])(virtualNode, context);14527 -1 }14528 -1 __webpack_exports__['default'] = accessibleText;14529 -1 },14530 -1 './lib/commons/text/form-control-value.js': function libCommonsTextFormControlValueJs(module, __webpack_exports__, __webpack_require__) {-1 34566 module.exports = require_is_implemented5()() ? Array.from : require_shim5(); -1 34567 }); -1 34568 var require_to_array = __commonJS(function(exports, module) { 14531 34569 'use strict';14532 -1 __webpack_require__.r(__webpack_exports__);14533 -1 __webpack_require__.d(__webpack_exports__, 'formControlValueMethods', function() {14534 -1 return formControlValueMethods;14535 -1 });14536 -1 var _aria_get_role__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/get-role.js');14537 -1 var _unsupported__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/unsupported.js');14538 -1 var _visible_virtual__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/text/visible-virtual.js');14539 -1 var _accessible_text_virtual__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/text/accessible-text-virtual.js');14540 -1 var _forms_is_native_textbox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/forms/is-native-textbox.js');14541 -1 var _forms_is_native_select__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/forms/is-native-select.js');14542 -1 var _forms_is_aria_textbox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/commons/forms/is-aria-textbox.js');14543 -1 var _forms_is_aria_listbox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/commons/forms/is-aria-listbox.js');14544 -1 var _forms_is_aria_combobox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__('./lib/commons/forms/is-aria-combobox.js');14545 -1 var _forms_is_aria_range__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__('./lib/commons/forms/is-aria-range.js');14546 -1 var _aria_get_owned_virtual__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__('./lib/commons/aria/get-owned-virtual.js');14547 -1 var _dom_is_hidden_with_css__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__('./lib/commons/dom/is-hidden-with-css.js');14548 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');14549 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__('./lib/core/utils/index.js');14550 -1 var _core_log__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__('./lib/core/log.js');14551 -1 var controlValueRoles = [ 'textbox', 'progressbar', 'scrollbar', 'slider', 'spinbutton', 'combobox', 'listbox' ];14552 -1 var formControlValueMethods = {14553 -1 nativeTextboxValue: nativeTextboxValue,14554 -1 nativeSelectValue: nativeSelectValue,14555 -1 ariaTextboxValue: ariaTextboxValue,14556 -1 ariaListboxValue: ariaListboxValue,14557 -1 ariaComboboxValue: ariaComboboxValue,14558 -1 ariaRangeValue: ariaRangeValue-1 34570 var from = require_from(); -1 34571 var isArray = Array.isArray; -1 34572 module.exports = function(arrayLike) { -1 34573 return isArray(arrayLike) ? arrayLike : from(arrayLike); 14559 34574 };14560 -1 function formControlValue(virtualNode) {14561 -1 var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};14562 -1 var actualNode = virtualNode.actualNode;14563 -1 var unsupportedRoles = _unsupported__WEBPACK_IMPORTED_MODULE_1__['default'].accessibleNameFromFieldValue || [];14564 -1 var role = Object(_aria_get_role__WEBPACK_IMPORTED_MODULE_0__['default'])(virtualNode);14565 -1 if (context.startNode === virtualNode || !controlValueRoles.includes(role) || unsupportedRoles.includes(role)) {14566 -1 return '';14567 -1 }14568 -1 var valueMethods = Object.keys(formControlValueMethods).map(function(name) {14569 -1 return formControlValueMethods[name];14570 -1 });14571 -1 var valueString = valueMethods.reduce(function(accName, step) {14572 -1 return accName || step(virtualNode, context);14573 -1 }, '');14574 -1 if (context.debug) {14575 -1 Object(_core_log__WEBPACK_IMPORTED_MODULE_14__['default'])(valueString || '{empty-value}', actualNode, context);14576 -1 }14577 -1 return valueString;14578 -1 }14579 -1 function nativeTextboxValue(node) {14580 -1 var vNode = node instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_12__['default'] ? node : Object(_core_utils__WEBPACK_IMPORTED_MODULE_13__['getNodeFromTree'])(node);14581 -1 if (Object(_forms_is_native_textbox__WEBPACK_IMPORTED_MODULE_4__['default'])(vNode)) {14582 -1 return vNode.props.value || '';14583 -1 }14584 -1 return '';14585 -1 }14586 -1 function nativeSelectValue(node) {14587 -1 var vNode = node instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_12__['default'] ? node : Object(_core_utils__WEBPACK_IMPORTED_MODULE_13__['getNodeFromTree'])(node);14588 -1 if (!Object(_forms_is_native_select__WEBPACK_IMPORTED_MODULE_5__['default'])(vNode)) {14589 -1 return '';14590 -1 }14591 -1 var options = Object(_core_utils__WEBPACK_IMPORTED_MODULE_13__['querySelectorAll'])(vNode, 'option');14592 -1 var selectedOptions = options.filter(function(option) {14593 -1 return option.hasAttr('selected');14594 -1 });14595 -1 if (!selectedOptions.length) {14596 -1 selectedOptions.push(options[0]);14597 -1 }14598 -1 return selectedOptions.map(function(option) {14599 -1 return Object(_visible_virtual__WEBPACK_IMPORTED_MODULE_2__['default'])(option);14600 -1 }).join(' ') || '';14601 -1 }14602 -1 function ariaTextboxValue(node) {14603 -1 var vNode = node instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_12__['default'] ? node : Object(_core_utils__WEBPACK_IMPORTED_MODULE_13__['getNodeFromTree'])(node);14604 -1 var actualNode = vNode.actualNode;14605 -1 if (!Object(_forms_is_aria_textbox__WEBPACK_IMPORTED_MODULE_6__['default'])(vNode)) {14606 -1 return '';14607 -1 }14608 -1 if (!actualNode || actualNode && !Object(_dom_is_hidden_with_css__WEBPACK_IMPORTED_MODULE_11__['default'])(actualNode)) {14609 -1 return Object(_visible_virtual__WEBPACK_IMPORTED_MODULE_2__['default'])(vNode, true);14610 -1 } else {14611 -1 return actualNode.textContent;14612 -1 }14613 -1 }14614 -1 function ariaListboxValue(node, context) {14615 -1 var vNode = node instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_12__['default'] ? node : Object(_core_utils__WEBPACK_IMPORTED_MODULE_13__['getNodeFromTree'])(node);14616 -1 if (!Object(_forms_is_aria_listbox__WEBPACK_IMPORTED_MODULE_7__['default'])(vNode)) {14617 -1 return '';14618 -1 }14619 -1 var selected = Object(_aria_get_owned_virtual__WEBPACK_IMPORTED_MODULE_10__['default'])(vNode).filter(function(owned) {14620 -1 return Object(_aria_get_role__WEBPACK_IMPORTED_MODULE_0__['default'])(owned) === 'option' && owned.attr('aria-selected') === 'true';14621 -1 });14622 -1 if (selected.length === 0) {14623 -1 return '';14624 -1 }14625 -1 return Object(_accessible_text_virtual__WEBPACK_IMPORTED_MODULE_3__['default'])(selected[0], context);14626 -1 }14627 -1 function ariaComboboxValue(node, context) {14628 -1 var vNode = node instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_12__['default'] ? node : Object(_core_utils__WEBPACK_IMPORTED_MODULE_13__['getNodeFromTree'])(node);14629 -1 var listbox;14630 -1 if (!Object(_forms_is_aria_combobox__WEBPACK_IMPORTED_MODULE_8__['default'])(vNode)) {14631 -1 return '';14632 -1 }14633 -1 listbox = Object(_aria_get_owned_virtual__WEBPACK_IMPORTED_MODULE_10__['default'])(vNode).filter(function(elm) {14634 -1 return Object(_aria_get_role__WEBPACK_IMPORTED_MODULE_0__['default'])(elm) === 'listbox';14635 -1 })[0];14636 -1 return listbox ? ariaListboxValue(listbox, context) : '';14637 -1 }14638 -1 function ariaRangeValue(node) {14639 -1 var vNode = node instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_12__['default'] ? node : Object(_core_utils__WEBPACK_IMPORTED_MODULE_13__['getNodeFromTree'])(node);14640 -1 if (!Object(_forms_is_aria_range__WEBPACK_IMPORTED_MODULE_9__['default'])(vNode) || !vNode.hasAttr('aria-valuenow')) {14641 -1 return '';14642 -1 }14643 -1 var valueNow = +vNode.attr('aria-valuenow');14644 -1 return !isNaN(valueNow) ? String(valueNow) : '0';14645 -1 }14646 -1 __webpack_exports__['default'] = formControlValue;14647 -1 },14648 -1 './lib/commons/text/has-unicode.js': function libCommonsTextHasUnicodeJs(module, __webpack_exports__, __webpack_require__) {14649 -1 'use strict';14650 -1 __webpack_require__.r(__webpack_exports__);14651 -1 var _unicode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/unicode.js');14652 -1 var emoji_regex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./node_modules/emoji-regex/index.js');14653 -1 var emoji_regex__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(emoji_regex__WEBPACK_IMPORTED_MODULE_1__);14654 -1 function hasUnicode(str, options) {14655 -1 var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;14656 -1 if (emoji) {14657 -1 return emoji_regex__WEBPACK_IMPORTED_MODULE_1___default()().test(str);14658 -1 }14659 -1 if (nonBmp) {14660 -1 return Object(_unicode__WEBPACK_IMPORTED_MODULE_0__['getUnicodeNonBmpRegExp'])().test(str) || Object(_unicode__WEBPACK_IMPORTED_MODULE_0__['getSupplementaryPrivateUseRegExp'])().test(str);14661 -1 }14662 -1 if (punctuations) {14663 -1 return Object(_unicode__WEBPACK_IMPORTED_MODULE_0__['getPunctuationRegExp'])().test(str);14664 -1 }14665 -1 return false;14666 -1 }14667 -1 __webpack_exports__['default'] = hasUnicode;14668 -1 },14669 -1 './lib/commons/text/index.js': function libCommonsTextIndexJs(module, __webpack_exports__, __webpack_require__) {14670 -1 'use strict';14671 -1 __webpack_require__.r(__webpack_exports__);14672 -1 var _accessible_text_virtual__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/accessible-text-virtual.js');14673 -1 __webpack_require__.d(__webpack_exports__, 'accessibleTextVirtual', function() {14674 -1 return _accessible_text_virtual__WEBPACK_IMPORTED_MODULE_0__['default'];14675 -1 });14676 -1 var _accessible_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/accessible-text.js');14677 -1 __webpack_require__.d(__webpack_exports__, 'accessibleText', function() {14678 -1 return _accessible_text__WEBPACK_IMPORTED_MODULE_1__['default'];14679 -1 });14680 -1 var _form_control_value__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/text/form-control-value.js');14681 -1 __webpack_require__.d(__webpack_exports__, 'formControlValue', function() {14682 -1 return _form_control_value__WEBPACK_IMPORTED_MODULE_2__['default'];14683 -1 });14684 -1 __webpack_require__.d(__webpack_exports__, 'formControlValueMethods', function() {14685 -1 return _form_control_value__WEBPACK_IMPORTED_MODULE_2__['formControlValueMethods'];14686 -1 });14687 -1 var _has_unicode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/text/has-unicode.js');14688 -1 __webpack_require__.d(__webpack_exports__, 'hasUnicode', function() {14689 -1 return _has_unicode__WEBPACK_IMPORTED_MODULE_3__['default'];14690 -1 });14691 -1 var _is_human_interpretable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/commons/text/is-human-interpretable.js');14692 -1 __webpack_require__.d(__webpack_exports__, 'isHumanInterpretable', function() {14693 -1 return _is_human_interpretable__WEBPACK_IMPORTED_MODULE_4__['default'];14694 -1 });14695 -1 var _is_icon_ligature__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/commons/text/is-icon-ligature.js');14696 -1 __webpack_require__.d(__webpack_exports__, 'isIconLigature', function() {14697 -1 return _is_icon_ligature__WEBPACK_IMPORTED_MODULE_5__['default'];14698 -1 });14699 -1 var _is_valid_autocomplete__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/commons/text/is-valid-autocomplete.js');14700 -1 __webpack_require__.d(__webpack_exports__, 'isValidAutocomplete', function() {14701 -1 return _is_valid_autocomplete__WEBPACK_IMPORTED_MODULE_6__['default'];14702 -1 });14703 -1 __webpack_require__.d(__webpack_exports__, 'autocomplete', function() {14704 -1 return _is_valid_autocomplete__WEBPACK_IMPORTED_MODULE_6__['autocomplete'];14705 -1 });14706 -1 var _label_text__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/commons/text/label-text.js');14707 -1 __webpack_require__.d(__webpack_exports__, 'labelText', function() {14708 -1 return _label_text__WEBPACK_IMPORTED_MODULE_7__['default'];14709 -1 });14710 -1 var _label_virtual__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__('./lib/commons/text/label-virtual.js');14711 -1 __webpack_require__.d(__webpack_exports__, 'labelVirtual', function() {14712 -1 return _label_virtual__WEBPACK_IMPORTED_MODULE_8__['default'];14713 -1 });14714 -1 var _label__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__('./lib/commons/text/label.js');14715 -1 __webpack_require__.d(__webpack_exports__, 'label', function() {14716 -1 return _label__WEBPACK_IMPORTED_MODULE_9__['default'];14717 -1 });14718 -1 var _native_element_type__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__('./lib/commons/text/native-element-type.js');14719 -1 __webpack_require__.d(__webpack_exports__, 'nativeElementType', function() {14720 -1 return _native_element_type__WEBPACK_IMPORTED_MODULE_10__['default'];14721 -1 });14722 -1 var _native_text_alternative__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__('./lib/commons/text/native-text-alternative.js');14723 -1 __webpack_require__.d(__webpack_exports__, 'nativeTextAlternative', function() {14724 -1 return _native_text_alternative__WEBPACK_IMPORTED_MODULE_11__['default'];14725 -1 });14726 -1 var _native_text_methods__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__('./lib/commons/text/native-text-methods.js');14727 -1 __webpack_require__.d(__webpack_exports__, 'nativeTextMethods', function() {14728 -1 return _native_text_methods__WEBPACK_IMPORTED_MODULE_12__['default'];14729 -1 });14730 -1 var _remove_unicode__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__('./lib/commons/text/remove-unicode.js');14731 -1 __webpack_require__.d(__webpack_exports__, 'removeUnicode', function() {14732 -1 return _remove_unicode__WEBPACK_IMPORTED_MODULE_13__['default'];14733 -1 });14734 -1 var _sanitize__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__('./lib/commons/text/sanitize.js');14735 -1 __webpack_require__.d(__webpack_exports__, 'sanitize', function() {14736 -1 return _sanitize__WEBPACK_IMPORTED_MODULE_14__['default'];14737 -1 });14738 -1 var _subtree_text__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__('./lib/commons/text/subtree-text.js');14739 -1 __webpack_require__.d(__webpack_exports__, 'subtreeText', function() {14740 -1 return _subtree_text__WEBPACK_IMPORTED_MODULE_15__['default'];14741 -1 });14742 -1 var _title_text__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__('./lib/commons/text/title-text.js');14743 -1 __webpack_require__.d(__webpack_exports__, 'titleText', function() {14744 -1 return _title_text__WEBPACK_IMPORTED_MODULE_16__['default'];14745 -1 });14746 -1 var _unsupported__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__('./lib/commons/text/unsupported.js');14747 -1 __webpack_require__.d(__webpack_exports__, 'unsupported', function() {14748 -1 return _unsupported__WEBPACK_IMPORTED_MODULE_17__['default'];14749 -1 });14750 -1 var _visible_text_nodes__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__('./lib/commons/text/visible-text-nodes.js');14751 -1 __webpack_require__.d(__webpack_exports__, 'visibleTextNodes', function() {14752 -1 return _visible_text_nodes__WEBPACK_IMPORTED_MODULE_18__['default'];14753 -1 });14754 -1 var _visible_virtual__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__('./lib/commons/text/visible-virtual.js');14755 -1 __webpack_require__.d(__webpack_exports__, 'visibleVirtual', function() {14756 -1 return _visible_virtual__WEBPACK_IMPORTED_MODULE_19__['default'];14757 -1 });14758 -1 var _visible__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__('./lib/commons/text/visible.js');14759 -1 __webpack_require__.d(__webpack_exports__, 'visible', function() {14760 -1 return _visible__WEBPACK_IMPORTED_MODULE_20__['default'];14761 -1 });14762 -1 },14763 -1 './lib/commons/text/is-human-interpretable.js': function libCommonsTextIsHumanInterpretableJs(module, __webpack_exports__, __webpack_require__) {-1 34575 }); -1 34576 var require_resolve_resolve = __commonJS(function(exports, module) { 14764 34577 'use strict';14765 -1 __webpack_require__.r(__webpack_exports__);14766 -1 var _remove_unicode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/remove-unicode.js');14767 -1 var _sanitize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/sanitize.js');14768 -1 function isHumanInterpretable(str) {14769 -1 if (!str.length) {14770 -1 return 0;14771 -1 }14772 -1 var alphaNumericIconMap = [ 'x', 'i' ];14773 -1 if (alphaNumericIconMap.includes(str)) {14774 -1 return 0;14775 -1 }14776 -1 var noUnicodeStr = Object(_remove_unicode__WEBPACK_IMPORTED_MODULE_0__['default'])(str, {14777 -1 emoji: true,14778 -1 nonBmp: true,14779 -1 punctuations: true-1 34578 var toArray2 = require_to_array(); -1 34579 var isValue = require_is_value(); -1 34580 var callable = require_valid_callable(); -1 34581 var slice = Array.prototype.slice; -1 34582 var resolveArgs; -1 34583 resolveArgs = function resolveArgs(args) { -1 34584 return this.map(function(resolve, i) { -1 34585 return resolve ? resolve(args[i]) : args[i]; -1 34586 }).concat(slice.call(args, this.length)); -1 34587 }; -1 34588 module.exports = function(resolvers) { -1 34589 resolvers = toArray2(resolvers); -1 34590 resolvers.forEach(function(resolve) { -1 34591 if (isValue(resolve)) { -1 34592 callable(resolve); -1 34593 } 14780 34594 });14781 -1 if (!Object(_sanitize__WEBPACK_IMPORTED_MODULE_1__['default'])(noUnicodeStr)) {14782 -1 return 0;14783 -1 }14784 -1 return 1;14785 -1 }14786 -1 __webpack_exports__['default'] = isHumanInterpretable;14787 -1 },14788 -1 './lib/commons/text/is-icon-ligature.js': function libCommonsTextIsIconLigatureJs(module, __webpack_exports__, __webpack_require__) {-1 34595 return resolveArgs.bind(resolvers); -1 34596 }; -1 34597 }); -1 34598 var require_resolve_normalize = __commonJS(function(exports, module) { 14789 34599 'use strict';14790 -1 __webpack_require__.r(__webpack_exports__);14791 -1 var _sanitize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/sanitize.js');14792 -1 var _has_unicode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/has-unicode.js');14793 -1 var _core_base_cache__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/base/cache.js');14794 -1 function isIconLigature(textVNode) {14795 -1 var differenceThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .15;14796 -1 var occuranceThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;14797 -1 var nodeValue = textVNode.actualNode.nodeValue.trim();14798 -1 if (!Object(_sanitize__WEBPACK_IMPORTED_MODULE_0__['default'])(nodeValue) || Object(_has_unicode__WEBPACK_IMPORTED_MODULE_1__['default'])(nodeValue, {14799 -1 emoji: true,14800 -1 nonBmp: true14801 -1 })) {14802 -1 return false;14803 -1 }14804 -1 if (!_core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].get('canvasContext')) {14805 -1 _core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].set('canvasContext', document.createElement('canvas').getContext('2d'));14806 -1 }14807 -1 var canvasContext = _core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].get('canvasContext');14808 -1 var canvas = canvasContext.canvas;14809 -1 if (!_core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].get('fonts')) {14810 -1 _core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].set('fonts', {});14811 -1 }14812 -1 var fonts = _core_base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].get('fonts');14813 -1 var style = window.getComputedStyle(textVNode.parent.actualNode);14814 -1 var fontFamily = style.getPropertyValue('font-family');14815 -1 if (!fonts[fontFamily]) {14816 -1 fonts[fontFamily] = {14817 -1 occurances: 0,14818 -1 numLigatures: 0-1 34600 var callable = require_valid_callable(); -1 34601 module.exports = function(userNormalizer) { -1 34602 var normalizer; -1 34603 if (typeof userNormalizer === 'function') { -1 34604 return { -1 34605 set: userNormalizer, -1 34606 get: userNormalizer 14819 34607 }; 14820 34608 }14821 -1 var font = fonts[fontFamily];14822 -1 if (font.occurances >= occuranceThreshold) {14823 -1 if (font.numLigatures / font.occurances === 1) {14824 -1 return true;14825 -1 } else if (font.numLigatures === 0) {14826 -1 return false;14827 -1 }14828 -1 }14829 -1 font.occurances++;14830 -1 var fontSize = 30;14831 -1 var fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);14832 -1 canvasContext.font = fontStyle;14833 -1 var firstChar = nodeValue.charAt(0);14834 -1 var width = canvasContext.measureText(firstChar).width;14835 -1 if (width < 30) {14836 -1 var diff = 30 / width;14837 -1 width *= diff;14838 -1 fontSize *= diff;14839 -1 fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);14840 -1 }14841 -1 canvas.width = width;14842 -1 canvas.height = fontSize;14843 -1 canvasContext.font = fontStyle;14844 -1 canvasContext.textAlign = 'left';14845 -1 canvasContext.textBaseline = 'top';14846 -1 canvasContext.fillText(firstChar, 0, 0);14847 -1 var compareData = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);14848 -1 if (!compareData.some(function(pixel) {14849 -1 return pixel;14850 -1 })) {14851 -1 font.numLigatures++;14852 -1 return true;14853 -1 }14854 -1 canvasContext.clearRect(0, 0, width, fontSize);14855 -1 canvasContext.fillText(nodeValue, 0, 0);14856 -1 var compareWith = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);14857 -1 var differences = compareData.reduce(function(diff, pixel, i) {14858 -1 if (pixel === 0 && compareWith[i] === 0) {14859 -1 return diff;-1 34609 normalizer = { -1 34610 get: callable(userNormalizer.get) -1 34611 }; -1 34612 if (userNormalizer.set !== void 0) { -1 34613 normalizer.set = callable(userNormalizer.set); -1 34614 if (userNormalizer['delete']) { -1 34615 normalizer['delete'] = callable(userNormalizer['delete']); 14860 34616 }14861 -1 if (pixel !== 0 && compareWith[i] !== 0) {14862 -1 return diff;-1 34617 if (userNormalizer.clear) { -1 34618 normalizer.clear = callable(userNormalizer.clear); 14863 34619 }14864 -1 return ++diff;14865 -1 }, 0);14866 -1 var expectedWidth = nodeValue.split('').reduce(function(width, _char) {14867 -1 return width + canvasContext.measureText(_char).width;14868 -1 }, 0);14869 -1 var actualWidth = canvasContext.measureText(nodeValue).width;14870 -1 var pixelDifference = differences / compareData.length;14871 -1 var sizeDifference = 1 - actualWidth / expectedWidth;14872 -1 if (pixelDifference >= differenceThreshold && sizeDifference >= differenceThreshold) {14873 -1 font.numLigatures++;14874 -1 return true;-1 34620 return normalizer; 14875 34621 }14876 -1 return false;14877 -1 }14878 -1 __webpack_exports__['default'] = isIconLigature;14879 -1 },14880 -1 './lib/commons/text/is-valid-autocomplete.js': function libCommonsTextIsValidAutocompleteJs(module, __webpack_exports__, __webpack_require__) {14881 -1 'use strict';14882 -1 __webpack_require__.r(__webpack_exports__);14883 -1 __webpack_require__.d(__webpack_exports__, 'autocomplete', function() {14884 -1 return autocomplete;14885 -1 });14886 -1 var autocomplete = {14887 -1 stateTerms: [ 'on', 'off' ],14888 -1 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' ],14889 -1 qualifiers: [ 'home', 'work', 'mobile', 'fax', 'pager' ],14890 -1 qualifiedTerms: [ 'tel', 'tel-country-code', 'tel-national', 'tel-area-code', 'tel-local', 'tel-local-prefix', 'tel-local-suffix', 'tel-extension', 'email', 'impp' ],14891 -1 locations: [ 'billing', 'shipping' ]-1 34622 normalizer.set = normalizer.get; -1 34623 return normalizer; 14892 34624 };14893 -1 function isValidAutocomplete(autocompleteValue) {14894 -1 var _ref47 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref47$looseTyped = _ref47.looseTyped, looseTyped = _ref47$looseTyped === void 0 ? false : _ref47$looseTyped, _ref47$stateTerms = _ref47.stateTerms, stateTerms = _ref47$stateTerms === void 0 ? [] : _ref47$stateTerms, _ref47$locations = _ref47.locations, locations = _ref47$locations === void 0 ? [] : _ref47$locations, _ref47$qualifiers = _ref47.qualifiers, qualifiers = _ref47$qualifiers === void 0 ? [] : _ref47$qualifiers, _ref47$standaloneTerm = _ref47.standaloneTerms, standaloneTerms = _ref47$standaloneTerm === void 0 ? [] : _ref47$standaloneTerm, _ref47$qualifiedTerms = _ref47.qualifiedTerms, qualifiedTerms = _ref47$qualifiedTerms === void 0 ? [] : _ref47$qualifiedTerms;14895 -1 autocompleteValue = autocompleteValue.toLowerCase().trim();14896 -1 stateTerms = stateTerms.concat(autocomplete.stateTerms);14897 -1 if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {14898 -1 return true;-1 34625 }); -1 34626 var require_configure_map = __commonJS(function(exports, module) { -1 34627 'use strict'; -1 34628 var customError = require_custom(); -1 34629 var defineLength = require_define_length(); -1 34630 var d = require_d(); -1 34631 var ee = require_event_emitter().methods; -1 34632 var resolveResolve = require_resolve_resolve(); -1 34633 var resolveNormalize = require_resolve_normalize(); -1 34634 var apply = Function.prototype.apply; -1 34635 var call = Function.prototype.call; -1 34636 var create = Object.create; -1 34637 var defineProperties = Object.defineProperties; -1 34638 var _on = ee.on; -1 34639 var emit = ee.emit; -1 34640 module.exports = function(original, length, options) { -1 34641 var cache20 = create(null), conf, memLength, _get, set, del, _clear, extDel, extGet, extHas, normalizer, getListeners, setListeners, deleteListeners, memoized, resolve; -1 34642 if (length !== false) { -1 34643 memLength = length; -1 34644 } else if (isNaN(original.length)) { -1 34645 memLength = 1; -1 34646 } else { -1 34647 memLength = original.length; 14899 34648 }14900 -1 qualifiers = qualifiers.concat(autocomplete.qualifiers);14901 -1 locations = locations.concat(autocomplete.locations);14902 -1 standaloneTerms = standaloneTerms.concat(autocomplete.standaloneTerms);14903 -1 qualifiedTerms = qualifiedTerms.concat(autocomplete.qualifiedTerms);14904 -1 var autocompleteTerms = autocompleteValue.split(/\s+/g);14905 -1 if (!looseTyped) {14906 -1 if (autocompleteTerms[0].length > 8 && autocompleteTerms[0].substr(0, 8) === 'section-') {14907 -1 autocompleteTerms.shift();14908 -1 }14909 -1 if (locations.includes(autocompleteTerms[0])) {14910 -1 autocompleteTerms.shift();14911 -1 }14912 -1 if (qualifiers.includes(autocompleteTerms[0])) {14913 -1 autocompleteTerms.shift();14914 -1 standaloneTerms = [];14915 -1 }14916 -1 if (autocompleteTerms.length !== 1) {14917 -1 return false;14918 -1 }-1 34649 if (options.normalizer) { -1 34650 normalizer = resolveNormalize(options.normalizer); -1 34651 _get = normalizer.get; -1 34652 set = normalizer.set; -1 34653 del = normalizer['delete']; -1 34654 _clear = normalizer.clear; 14919 34655 }14920 -1 var purposeTerm = autocompleteTerms[autocompleteTerms.length - 1];14921 -1 return standaloneTerms.includes(purposeTerm) || qualifiedTerms.includes(purposeTerm);14922 -1 }14923 -1 __webpack_exports__['default'] = isValidAutocomplete;14924 -1 },14925 -1 './lib/commons/text/label-text.js': function libCommonsTextLabelTextJs(module, __webpack_exports__, __webpack_require__) {14926 -1 'use strict';14927 -1 __webpack_require__.r(__webpack_exports__);14928 -1 var _accessible_text_virtual__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/accessible-text-virtual.js');14929 -1 var _accessible_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/accessible-text.js');14930 -1 var _dom_find_elms_in_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/dom/find-elms-in-context.js');14931 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/index.js');14932 -1 function labelText(virtualNode) {14933 -1 var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};14934 -1 var alreadyProcessed = _accessible_text_virtual__WEBPACK_IMPORTED_MODULE_0__['default'].alreadyProcessed;14935 -1 if (context.inControlContext || context.inLabelledByContext || alreadyProcessed(virtualNode, context)) {14936 -1 return '';-1 34656 if (options.resolvers != null) { -1 34657 resolve = resolveResolve(options.resolvers); 14937 34658 }14938 -1 if (!context.startNode) {14939 -1 context.startNode = virtualNode;14940 -1 }14941 -1 var labelContext = _extends({14942 -1 inControlContext: true14943 -1 }, context);14944 -1 var explicitLabels = getExplicitLabels(virtualNode);14945 -1 var implicitLabel = Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['closest'])(virtualNode, 'label');14946 -1 var labels;14947 -1 if (implicitLabel) {14948 -1 labels = [].concat(_toConsumableArray(explicitLabels), [ implicitLabel.actualNode ]);14949 -1 labels.sort(_core_utils__WEBPACK_IMPORTED_MODULE_3__['nodeSorter']);-1 34659 if (_get) { -1 34660 memoized = defineLength(function(arg) { -1 34661 var id, result, args = arguments; -1 34662 if (resolve) { -1 34663 args = resolve(args); -1 34664 } -1 34665 id = _get(args); -1 34666 if (id !== null) { -1 34667 if (hasOwnProperty.call(cache20, id)) { -1 34668 if (getListeners) { -1 34669 conf.emit('get', id, args, this); -1 34670 } -1 34671 return cache20[id]; -1 34672 } -1 34673 } -1 34674 if (args.length === 1) { -1 34675 result = call.call(original, this, args[0]); -1 34676 } else { -1 34677 result = apply.call(original, this, args); -1 34678 } -1 34679 if (id === null) { -1 34680 id = _get(args); -1 34681 if (id !== null) { -1 34682 throw customError('Circular invocation', 'CIRCULAR_INVOCATION'); -1 34683 } -1 34684 id = set(args); -1 34685 } else if (hasOwnProperty.call(cache20, id)) { -1 34686 throw customError('Circular invocation', 'CIRCULAR_INVOCATION'); -1 34687 } -1 34688 cache20[id] = result; -1 34689 if (setListeners) { -1 34690 conf.emit('set', id, null, result); -1 34691 } -1 34692 return result; -1 34693 }, memLength); -1 34694 } else if (length === 0) { -1 34695 memoized = function memoized() { -1 34696 var result; -1 34697 if (hasOwnProperty.call(cache20, 'data')) { -1 34698 if (getListeners) { -1 34699 conf.emit('get', 'data', arguments, this); -1 34700 } -1 34701 return cache20.data; -1 34702 } -1 34703 if (arguments.length) { -1 34704 result = apply.call(original, this, arguments); -1 34705 } else { -1 34706 result = call.call(original, this); -1 34707 } -1 34708 if (hasOwnProperty.call(cache20, 'data')) { -1 34709 throw customError('Circular invocation', 'CIRCULAR_INVOCATION'); -1 34710 } -1 34711 cache20.data = result; -1 34712 if (setListeners) { -1 34713 conf.emit('set', 'data', null, result); -1 34714 } -1 34715 return result; -1 34716 }; 14950 34717 } else {14951 -1 labels = explicitLabels;14952 -1 }14953 -1 return labels.map(function(label) {14954 -1 return Object(_accessible_text__WEBPACK_IMPORTED_MODULE_1__['default'])(label, labelContext);14955 -1 }).filter(function(text) {14956 -1 return text !== '';14957 -1 }).join(' ');14958 -1 }14959 -1 function getExplicitLabels(virtualNode) {14960 -1 if (!virtualNode.attr('id')) {14961 -1 return [];14962 -1 }14963 -1 if (!virtualNode.actualNode) {14964 -1 throw new TypeError('Cannot resolve explicit label reference for non-DOM nodes');-1 34718 memoized = function memoized(arg) { -1 34719 var result, args = arguments, id; -1 34720 if (resolve) { -1 34721 args = resolve(arguments); -1 34722 } -1 34723 id = String(args[0]); -1 34724 if (hasOwnProperty.call(cache20, id)) { -1 34725 if (getListeners) { -1 34726 conf.emit('get', id, args, this); -1 34727 } -1 34728 return cache20[id]; -1 34729 } -1 34730 if (args.length === 1) { -1 34731 result = call.call(original, this, args[0]); -1 34732 } else { -1 34733 result = apply.call(original, this, args); -1 34734 } -1 34735 if (hasOwnProperty.call(cache20, id)) { -1 34736 throw customError('Circular invocation', 'CIRCULAR_INVOCATION'); -1 34737 } -1 34738 cache20[id] = result; -1 34739 if (setListeners) { -1 34740 conf.emit('set', id, null, result); -1 34741 } -1 34742 return result; -1 34743 }; 14965 34744 }14966 -1 return Object(_dom_find_elms_in_context__WEBPACK_IMPORTED_MODULE_2__['default'])({14967 -1 elm: 'label',14968 -1 attr: 'for',14969 -1 value: virtualNode.attr('id'),14970 -1 context: virtualNode.actualNode14971 -1 });14972 -1 }14973 -1 __webpack_exports__['default'] = labelText;14974 -1 },14975 -1 './lib/commons/text/label-virtual.js': function libCommonsTextLabelVirtualJs(module, __webpack_exports__, __webpack_require__) {14976 -1 'use strict';14977 -1 __webpack_require__.r(__webpack_exports__);14978 -1 var _aria_label_virtual__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/label-virtual.js');14979 -1 var _visible__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/visible.js');14980 -1 var _visible_virtual__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/text/visible-virtual.js');14981 -1 var _dom_get_root_node__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/dom/get-root-node.js');14982 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/core/utils/index.js');14983 -1 function labelVirtual(virtualNode) {14984 -1 var ref, candidate, doc;14985 -1 candidate = Object(_aria_label_virtual__WEBPACK_IMPORTED_MODULE_0__['default'])(virtualNode);14986 -1 if (candidate) {14987 -1 return candidate;-1 34745 conf = { -1 34746 original: original, -1 34747 memoized: memoized, -1 34748 profileName: options.profileName, -1 34749 get: function get(args) { -1 34750 if (resolve) { -1 34751 args = resolve(args); -1 34752 } -1 34753 if (_get) { -1 34754 return _get(args); -1 34755 } -1 34756 return String(args[0]); -1 34757 }, -1 34758 has: function has(id) { -1 34759 return hasOwnProperty.call(cache20, id); -1 34760 }, -1 34761 delete: function _delete(id) { -1 34762 var result; -1 34763 if (!hasOwnProperty.call(cache20, id)) { -1 34764 return; -1 34765 } -1 34766 if (del) { -1 34767 del(id); -1 34768 } -1 34769 result = cache20[id]; -1 34770 delete cache20[id]; -1 34771 if (deleteListeners) { -1 34772 conf.emit('delete', id, result); -1 34773 } -1 34774 }, -1 34775 clear: function clear() { -1 34776 var oldCache = cache20; -1 34777 if (_clear) { -1 34778 _clear(); -1 34779 } -1 34780 cache20 = create(null); -1 34781 conf.emit('clear', oldCache); -1 34782 }, -1 34783 on: function on(type, listener) { -1 34784 if (type === 'get') { -1 34785 getListeners = true; -1 34786 } else if (type === 'set') { -1 34787 setListeners = true; -1 34788 } else if (type === 'delete') { -1 34789 deleteListeners = true; -1 34790 } -1 34791 return _on.call(this, type, listener); -1 34792 }, -1 34793 emit: emit, -1 34794 updateEnv: function updateEnv() { -1 34795 original = conf.original; -1 34796 } -1 34797 }; -1 34798 if (_get) { -1 34799 extDel = defineLength(function(arg) { -1 34800 var id, args = arguments; -1 34801 if (resolve) { -1 34802 args = resolve(args); -1 34803 } -1 34804 id = _get(args); -1 34805 if (id === null) { -1 34806 return; -1 34807 } -1 34808 conf['delete'](id); -1 34809 }, memLength); -1 34810 } else if (length === 0) { -1 34811 extDel = function extDel() { -1 34812 return conf['delete']('data'); -1 34813 }; -1 34814 } else { -1 34815 extDel = function extDel(arg) { -1 34816 if (resolve) { -1 34817 arg = resolve(arguments)[0]; -1 34818 } -1 34819 return conf['delete'](arg); -1 34820 }; 14988 34821 }14989 -1 if (virtualNode.attr('id')) {14990 -1 if (!virtualNode.actualNode) {14991 -1 throw new TypeError('Cannot resolve explicit label reference for non-DOM nodes');-1 34822 extGet = defineLength(function() { -1 34823 var id, args = arguments; -1 34824 if (length === 0) { -1 34825 return cache20.data; 14992 34826 }14993 -1 var id = Object(_core_utils__WEBPACK_IMPORTED_MODULE_4__['escapeSelector'])(virtualNode.attr('id'));14994 -1 doc = Object(_dom_get_root_node__WEBPACK_IMPORTED_MODULE_3__['default'])(virtualNode.actualNode);14995 -1 ref = doc.querySelector('label[for="' + id + '"]');14996 -1 candidate = ref && Object(_visible__WEBPACK_IMPORTED_MODULE_1__['default'])(ref, true);14997 -1 if (candidate) {14998 -1 return candidate;-1 34827 if (resolve) { -1 34828 args = resolve(args); 14999 34829 }15000 -1 }15001 -1 ref = Object(_core_utils__WEBPACK_IMPORTED_MODULE_4__['closest'])(virtualNode, 'label');15002 -1 candidate = ref && Object(_visible_virtual__WEBPACK_IMPORTED_MODULE_2__['default'])(ref, true);15003 -1 if (candidate) {15004 -1 return candidate;15005 -1 }15006 -1 return null;15007 -1 }15008 -1 __webpack_exports__['default'] = labelVirtual;15009 -1 },15010 -1 './lib/commons/text/label.js': function libCommonsTextLabelJs(module, __webpack_exports__, __webpack_require__) {15011 -1 'use strict';15012 -1 __webpack_require__.r(__webpack_exports__);15013 -1 var _label_virtual__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/label-virtual.js');15014 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');15015 -1 function label(node) {15016 -1 node = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeFromTree'])(node);15017 -1 return Object(_label_virtual__WEBPACK_IMPORTED_MODULE_0__['default'])(node);15018 -1 }15019 -1 __webpack_exports__['default'] = label;15020 -1 },15021 -1 './lib/commons/text/native-element-type.js': function libCommonsTextNativeElementTypeJs(module, __webpack_exports__, __webpack_require__) {15022 -1 'use strict';15023 -1 __webpack_require__.r(__webpack_exports__);15024 -1 var nativeElementType = [ {15025 -1 matches: [ {15026 -1 nodeName: 'textarea'15027 -1 }, {15028 -1 nodeName: 'input',15029 -1 properties: {15030 -1 type: [ 'text', 'password', 'search', 'tel', 'email', 'url' ]-1 34830 if (_get) { -1 34831 id = _get(args); -1 34832 } else { -1 34833 id = String(args[0]); 15031 34834 }15032 -1 } ],15033 -1 namingMethods: 'labelText'15034 -1 }, {15035 -1 matches: {15036 -1 nodeName: 'input',15037 -1 properties: {15038 -1 type: [ 'button', 'submit', 'reset' ]-1 34835 return cache20[id]; -1 34836 }); -1 34837 extHas = defineLength(function() { -1 34838 var id, args = arguments; -1 34839 if (length === 0) { -1 34840 return conf.has('data'); 15039 34841 }15040 -1 },15041 -1 namingMethods: [ 'valueText', 'titleText', 'buttonDefaultText' ]15042 -1 }, {15043 -1 matches: {15044 -1 nodeName: 'input',15045 -1 properties: {15046 -1 type: 'image'-1 34842 if (resolve) { -1 34843 args = resolve(args); 15047 34844 }15048 -1 },15049 -1 namingMethods: [ 'altText', 'valueText', 'labelText', 'titleText', 'buttonDefaultText' ]15050 -1 }, {15051 -1 matches: 'button',15052 -1 namingMethods: 'subtreeText'15053 -1 }, {15054 -1 matches: 'fieldset',15055 -1 namingMethods: 'fieldsetLegendText'15056 -1 }, {15057 -1 matches: 'OUTPUT',15058 -1 namingMethods: 'subtreeText'15059 -1 }, {15060 -1 matches: [ {15061 -1 nodeName: 'select'15062 -1 }, {15063 -1 nodeName: 'input',15064 -1 properties: {15065 -1 type: /^(?!text|password|search|tel|email|url|button|submit|reset)/-1 34845 if (_get) { -1 34846 id = _get(args); -1 34847 } else { -1 34848 id = String(args[0]); 15066 34849 }15067 -1 } ],15068 -1 namingMethods: 'labelText'15069 -1 }, {15070 -1 matches: 'summary',15071 -1 namingMethods: 'subtreeText'15072 -1 }, {15073 -1 matches: 'figure',15074 -1 namingMethods: [ 'figureText', 'titleText' ]15075 -1 }, {15076 -1 matches: 'img',15077 -1 namingMethods: 'altText'15078 -1 }, {15079 -1 matches: 'table',15080 -1 namingMethods: [ 'tableCaptionText', 'tableSummaryText' ]15081 -1 }, {15082 -1 matches: [ 'hr', 'br' ],15083 -1 namingMethods: [ 'titleText', 'singleSpace' ]15084 -1 } ];15085 -1 __webpack_exports__['default'] = nativeElementType;15086 -1 },15087 -1 './lib/commons/text/native-text-alternative.js': function libCommonsTextNativeTextAlternativeJs(module, __webpack_exports__, __webpack_require__) {15088 -1 'use strict';15089 -1 __webpack_require__.r(__webpack_exports__);15090 -1 var _aria_get_role__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/get-role.js');15091 -1 var _standards_get_element_spec__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/standards/get-element-spec.js');15092 -1 var _native_text_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/text/native-text-methods.js');15093 -1 function nativeTextAlternative(virtualNode) {15094 -1 var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};15095 -1 var actualNode = virtualNode.actualNode;15096 -1 if (virtualNode.props.nodeType !== 1 || [ 'presentation', 'none' ].includes(Object(_aria_get_role__WEBPACK_IMPORTED_MODULE_0__['default'])(virtualNode))) {15097 -1 return '';15098 -1 }15099 -1 var textMethods = findTextMethods(virtualNode);15100 -1 var accName = textMethods.reduce(function(accName, step) {15101 -1 return accName || step(virtualNode, context);15102 -1 }, '');15103 -1 if (context.debug) {15104 -1 axe.log(accName || '{empty-value}', actualNode, context);15105 -1 }15106 -1 return accName;15107 -1 }15108 -1 function findTextMethods(virtualNode) {15109 -1 var elmSpec = Object(_standards_get_element_spec__WEBPACK_IMPORTED_MODULE_1__['default'])(virtualNode);15110 -1 var methods = elmSpec.namingMethods || [];15111 -1 return methods.map(function(methodName) {15112 -1 return _native_text_methods__WEBPACK_IMPORTED_MODULE_2__['default'][methodName];-1 34850 if (id === null) { -1 34851 return false; -1 34852 } -1 34853 return conf.has(id); 15113 34854 });15114 -1 }15115 -1 __webpack_exports__['default'] = nativeTextAlternative;15116 -1 },15117 -1 './lib/commons/text/native-text-methods.js': function libCommonsTextNativeTextMethodsJs(module, __webpack_exports__, __webpack_require__) {15118 -1 'use strict';15119 -1 __webpack_require__.r(__webpack_exports__);15120 -1 var _title_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/title-text.js');15121 -1 var _subtree_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/subtree-text.js');15122 -1 var _label_text__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/text/label-text.js');15123 -1 var _accessible_text__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/text/accessible-text.js');15124 -1 var defaultButtonValues = {15125 -1 submit: 'Submit',15126 -1 image: 'Submit',15127 -1 reset: 'Reset',15128 -1 button: ''15129 -1 };15130 -1 var nativeTextMethods = {15131 -1 valueText: function valueText(_ref48) {15132 -1 var actualNode = _ref48.actualNode;15133 -1 return actualNode.value || '';15134 -1 },15135 -1 buttonDefaultText: function buttonDefaultText(_ref49) {15136 -1 var actualNode = _ref49.actualNode;15137 -1 return defaultButtonValues[actualNode.type] || '';15138 -1 },15139 -1 tableCaptionText: descendantText.bind(null, 'caption'),15140 -1 figureText: descendantText.bind(null, 'figcaption'),15141 -1 fieldsetLegendText: descendantText.bind(null, 'legend'),15142 -1 altText: attrText.bind(null, 'alt'),15143 -1 tableSummaryText: attrText.bind(null, 'summary'),15144 -1 titleText: _title_text__WEBPACK_IMPORTED_MODULE_0__['default'],15145 -1 subtreeText: _subtree_text__WEBPACK_IMPORTED_MODULE_1__['default'],15146 -1 labelText: _label_text__WEBPACK_IMPORTED_MODULE_2__['default'],15147 -1 singleSpace: function singleSpace() {15148 -1 return ' ';15149 -1 }-1 34855 defineProperties(memoized, { -1 34856 __memoized__: d(true), -1 34857 delete: d(extDel), -1 34858 clear: d(conf.clear), -1 34859 _get: d(extGet), -1 34860 _has: d(extHas) -1 34861 }); -1 34862 return conf; 15150 34863 };15151 -1 function attrText(attr, _ref50) {15152 -1 var actualNode = _ref50.actualNode;15153 -1 return actualNode.getAttribute(attr) || '';15154 -1 }15155 -1 function descendantText(nodeName, _ref51, context) {15156 -1 var actualNode = _ref51.actualNode;15157 -1 nodeName = nodeName.toLowerCase();15158 -1 var nodeNames = [ nodeName, actualNode.nodeName.toLowerCase() ].join(',');15159 -1 var candidate = actualNode.querySelector(nodeNames);15160 -1 if (!candidate || candidate.nodeName.toLowerCase() !== nodeName) {15161 -1 return '';15162 -1 }15163 -1 return Object(_accessible_text__WEBPACK_IMPORTED_MODULE_3__['default'])(candidate, context);15164 -1 }15165 -1 __webpack_exports__['default'] = nativeTextMethods;15166 -1 },15167 -1 './lib/commons/text/remove-unicode.js': function libCommonsTextRemoveUnicodeJs(module, __webpack_exports__, __webpack_require__) {15168 -1 'use strict';15169 -1 __webpack_require__.r(__webpack_exports__);15170 -1 var _unicode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/unicode.js');15171 -1 var emoji_regex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./node_modules/emoji-regex/index.js');15172 -1 var emoji_regex__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(emoji_regex__WEBPACK_IMPORTED_MODULE_1__);15173 -1 function removeUnicode(str, options) {15174 -1 var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;15175 -1 if (emoji) {15176 -1 str = str.replace(emoji_regex__WEBPACK_IMPORTED_MODULE_1___default()(), '');15177 -1 }15178 -1 if (nonBmp) {15179 -1 str = str.replace(Object(_unicode_js__WEBPACK_IMPORTED_MODULE_0__['getUnicodeNonBmpRegExp'])(), '');15180 -1 str = str.replace(Object(_unicode_js__WEBPACK_IMPORTED_MODULE_0__['getSupplementaryPrivateUseRegExp'])(), '');15181 -1 }15182 -1 if (punctuations) {15183 -1 str = str.replace(Object(_unicode_js__WEBPACK_IMPORTED_MODULE_0__['getPunctuationRegExp'])(), '');15184 -1 }15185 -1 return str;15186 -1 }15187 -1 __webpack_exports__['default'] = removeUnicode;15188 -1 },15189 -1 './lib/commons/text/sanitize.js': function libCommonsTextSanitizeJs(module, __webpack_exports__, __webpack_require__) {15190 -1 'use strict';15191 -1 __webpack_require__.r(__webpack_exports__);15192 -1 function sanitize(str) {15193 -1 'use strict';15194 -1 return str.replace(/\r\n/g, '\n').replace(/\u00A0/g, ' ').replace(/[\s]{2,}/g, ' ').trim();15195 -1 }15196 -1 __webpack_exports__['default'] = sanitize;15197 -1 },15198 -1 './lib/commons/text/subtree-text.js': function libCommonsTextSubtreeTextJs(module, __webpack_exports__, __webpack_require__) {15199 -1 'use strict';15200 -1 __webpack_require__.r(__webpack_exports__);15201 -1 var _accessible_text_virtual__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/accessible-text-virtual.js');15202 -1 var _aria_named_from_contents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/named-from-contents.js');15203 -1 var _aria_get_owned_virtual__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/aria/get-owned-virtual.js');15204 -1 function subtreeText(virtualNode) {15205 -1 var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};15206 -1 var alreadyProcessed = _accessible_text_virtual__WEBPACK_IMPORTED_MODULE_0__['default'].alreadyProcessed;15207 -1 context.startNode = context.startNode || virtualNode;15208 -1 var strict = context.strict;15209 -1 if (alreadyProcessed(virtualNode, context) || !Object(_aria_named_from_contents__WEBPACK_IMPORTED_MODULE_1__['default'])(virtualNode, {15210 -1 strict: strict15211 -1 })) {15212 -1 return '';-1 34864 }); -1 34865 var require_plain = __commonJS(function(exports, module) { -1 34866 'use strict'; -1 34867 var callable = require_valid_callable(); -1 34868 var forEach = require_for_each(); -1 34869 var extensions = require_registered_extensions(); -1 34870 var configure5 = require_configure_map(); -1 34871 var resolveLength = require_resolve_length(); -1 34872 module.exports = function self2(fn) { -1 34873 var options, length, conf; -1 34874 callable(fn); -1 34875 options = Object(arguments[1]); -1 34876 if (options.async && options.promise) { -1 34877 throw new Error('Options \'async\' and \'promise\' cannot be used together'); 15213 34878 }15214 -1 return Object(_aria_get_owned_virtual__WEBPACK_IMPORTED_MODULE_2__['default'])(virtualNode).reduce(function(contentText, child) {15215 -1 return appendAccessibleText(contentText, child, context);15216 -1 }, '');15217 -1 }15218 -1 var phrasingElements = [ '#text', 'a', 'abbr', 'area', 'b', 'bdi', 'bdo', 'button', 'canvas', 'cite', 'code', 'command', 'datalist', 'del', 'dfn', 'em', 'i', 'ins', 'kbd', 'keygen', 'label', 'map', 'mark', 'meter', 'noscript', 'output', 'progress', 'q', 'ruby', 's', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'time', 'u', 'var', 'wbr' ];15219 -1 function appendAccessibleText(contentText, virtualNode, context) {15220 -1 var nodeName = virtualNode.props.nodeName;15221 -1 var contentTextAdd = Object(_accessible_text_virtual__WEBPACK_IMPORTED_MODULE_0__['default'])(virtualNode, context);15222 -1 if (!contentTextAdd) {15223 -1 return contentText;-1 34879 if (hasOwnProperty.call(fn, '__memoized__') && !options.force) { -1 34880 return fn; 15224 34881 }15225 -1 if (!phrasingElements.includes(nodeName)) {15226 -1 if (contentTextAdd[0] !== ' ') {15227 -1 contentTextAdd += ' ';15228 -1 }15229 -1 if (contentText && contentText[contentText.length - 1] !== ' ') {15230 -1 contentTextAdd = ' ' + contentTextAdd;-1 34882 length = resolveLength(options.length, fn.length, options.async && extensions.async); -1 34883 conf = configure5(fn, length, options); -1 34884 forEach(extensions, function(extFn, name) { -1 34885 if (options[name]) { -1 34886 extFn(options[name], conf, options); 15231 34887 } -1 34888 }); -1 34889 if (self2.__profiler__) { -1 34890 self2.__profiler__(conf); 15232 34891 }15233 -1 return contentText + contentTextAdd;15234 -1 }15235 -1 __webpack_exports__['default'] = subtreeText;15236 -1 },15237 -1 './lib/commons/text/title-text.js': function libCommonsTextTitleTextJs(module, __webpack_exports__, __webpack_require__) {-1 34892 conf.updateEnv(); -1 34893 return conf.memoized; -1 34894 }; -1 34895 }); -1 34896 var require_primitive = __commonJS(function(exports, module) { 15238 34897 'use strict';15239 -1 __webpack_require__.r(__webpack_exports__);15240 -1 var _matches_matches__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/matches/matches.js');15241 -1 var _aria_get_role__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/get-role.js');15242 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');15243 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/index.js');15244 -1 var alwaysTitleElements = [ 'iframe' ];15245 -1 function titleText(node) {15246 -1 var vNode = node instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_2__['default'] ? node : Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['getNodeFromTree'])(node);15247 -1 if (vNode.props.nodeType !== 1 || !node.hasAttr('title')) {15248 -1 return '';-1 34898 module.exports = function(args) { -1 34899 var id, i, length = args.length; -1 34900 if (!length) { -1 34901 return '\x02'; 15249 34902 }15250 -1 if (!Object(_matches_matches__WEBPACK_IMPORTED_MODULE_0__['default'])(vNode, alwaysTitleElements) && [ 'none', 'presentation' ].includes(Object(_aria_get_role__WEBPACK_IMPORTED_MODULE_1__['default'])(vNode))) {15251 -1 return '';-1 34903 id = String(args[i = 0]); -1 34904 while (--length) { -1 34905 id += '\x01' + args[++i]; 15252 34906 }15253 -1 return vNode.attr('title');15254 -1 }15255 -1 __webpack_exports__['default'] = titleText;15256 -1 },15257 -1 './lib/commons/text/unicode.js': function libCommonsTextUnicodeJs(module, __webpack_exports__, __webpack_require__) {15258 -1 'use strict';15259 -1 __webpack_require__.r(__webpack_exports__);15260 -1 __webpack_require__.d(__webpack_exports__, 'getUnicodeNonBmpRegExp', function() {15261 -1 return getUnicodeNonBmpRegExp;15262 -1 });15263 -1 __webpack_require__.d(__webpack_exports__, 'getPunctuationRegExp', function() {15264 -1 return getPunctuationRegExp;15265 -1 });15266 -1 __webpack_require__.d(__webpack_exports__, 'getSupplementaryPrivateUseRegExp', function() {15267 -1 return getSupplementaryPrivateUseRegExp;15268 -1 });15269 -1 function getUnicodeNonBmpRegExp() {15270 -1 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;15271 -1 }15272 -1 function getPunctuationRegExp() {15273 -1 return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&\xa3\xa2\xa5\xa7\u20ac()*+,\-.\/:;<=>?@\[\]^_`{|}~\xb1]/g;15274 -1 }15275 -1 function getSupplementaryPrivateUseRegExp() {15276 -1 return /[\uDB80-\uDBBF][\uDC00-\uDFFF]/g;15277 -1 }15278 -1 },15279 -1 './lib/commons/text/unsupported.js': function libCommonsTextUnsupportedJs(module, __webpack_exports__, __webpack_require__) {15280 -1 'use strict';15281 -1 __webpack_require__.r(__webpack_exports__);15282 -1 var unsupported = {15283 -1 accessibleNameFromFieldValue: [ 'combobox', 'listbox', 'progressbar' ]-1 34907 return id; 15284 34908 };15285 -1 __webpack_exports__['default'] = unsupported;15286 -1 },15287 -1 './lib/commons/text/visible-text-nodes.js': function libCommonsTextVisibleTextNodesJs(module, __webpack_exports__, __webpack_require__) {15288 -1 'use strict';15289 -1 __webpack_require__.r(__webpack_exports__);15290 -1 var _dom_is_visible__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/is-visible.js');15291 -1 function visibleTextNodes(vNode) {15292 -1 var parentVisible = Object(_dom_is_visible__WEBPACK_IMPORTED_MODULE_0__['default'])(vNode.actualNode);15293 -1 var nodes = [];15294 -1 vNode.children.forEach(function(child) {15295 -1 if (child.actualNode.nodeType === 3) {15296 -1 if (parentVisible) {15297 -1 nodes.push(child);15298 -1 }15299 -1 } else {15300 -1 nodes = nodes.concat(visibleTextNodes(child));15301 -1 }15302 -1 });15303 -1 return nodes;15304 -1 }15305 -1 __webpack_exports__['default'] = visibleTextNodes;15306 -1 },15307 -1 './lib/commons/text/visible-virtual.js': function libCommonsTextVisibleVirtualJs(module, __webpack_exports__, __webpack_require__) {15308 -1 'use strict';15309 -1 __webpack_require__.r(__webpack_exports__);15310 -1 var _sanitize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/sanitize.js');15311 -1 var _dom_is_visible__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/is-visible.js');15312 -1 var _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');15313 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/index.js');15314 -1 function visibleVirtual(element, screenReader, noRecursing) {15315 -1 var vNode = element instanceof _core_base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_2__['default'] ? element : Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['getNodeFromTree'])(element);15316 -1 var visible = !element.actualNode || element.actualNode && Object(_dom_is_visible__WEBPACK_IMPORTED_MODULE_1__['default'])(element.actualNode, screenReader);15317 -1 var result = vNode.children.map(function(child) {15318 -1 var _child$props = child.props, nodeType = _child$props.nodeType, nodeValue = _child$props.nodeValue;15319 -1 if (nodeType === 3) {15320 -1 if (nodeValue && visible) {15321 -1 return nodeValue;15322 -1 }15323 -1 } else if (!noRecursing) {15324 -1 return visibleVirtual(child, screenReader);15325 -1 }15326 -1 }).join('');15327 -1 return Object(_sanitize__WEBPACK_IMPORTED_MODULE_0__['default'])(result);15328 -1 }15329 -1 __webpack_exports__['default'] = visibleVirtual;15330 -1 },15331 -1 './lib/commons/text/visible.js': function libCommonsTextVisibleJs(module, __webpack_exports__, __webpack_require__) {15332 -1 'use strict';15333 -1 __webpack_require__.r(__webpack_exports__);15334 -1 var _visible_virtual__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/visible-virtual.js');15335 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');15336 -1 function visible(element, screenReader, noRecursing) {15337 -1 element = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getNodeFromTree'])(element);15338 -1 return Object(_visible_virtual__WEBPACK_IMPORTED_MODULE_0__['default'])(element, screenReader, noRecursing);15339 -1 }15340 -1 __webpack_exports__['default'] = visible;15341 -1 },15342 -1 './lib/core/base/audit.js': function libCoreBaseAuditJs(module, __webpack_exports__, __webpack_require__) {-1 34909 }); -1 34910 var require_get_primitive_fixed = __commonJS(function(exports, module) { 15343 34911 'use strict';15344 -1 __webpack_require__.r(__webpack_exports__);15345 -1 var _rule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/rule.js');15346 -1 var _check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/check.js');15347 -1 var _standards__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/standards/index.js');15348 -1 var _rule_result__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/base/rule-result.js');15349 -1 var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/core/utils/index.js');15350 -1 var _deque_dot__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./node_modules/@deque/dot/doT.js');15351 -1 var _deque_dot__WEBPACK_IMPORTED_MODULE_5___default = __webpack_require__.n(_deque_dot__WEBPACK_IMPORTED_MODULE_5__);15352 -1 var _log__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/core/log.js');15353 -1 var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/core/constants.js');15354 -1 var dotRegex = /\{\{.+?\}\}/g;15355 -1 function getDefaultConfiguration(audit) {15356 -1 var config;15357 -1 if (audit) {15358 -1 config = Object(_utils__WEBPACK_IMPORTED_MODULE_4__['clone'])(audit);15359 -1 config.commons = audit.commons;15360 -1 } else {15361 -1 config = {};15362 -1 }15363 -1 config.reporter = config.reporter || null;15364 -1 config.rules = config.rules || [];15365 -1 config.checks = config.checks || [];15366 -1 config.data = _extends({15367 -1 checks: {},15368 -1 rules: {}15369 -1 }, config.data);15370 -1 return config;15371 -1 }15372 -1 function unpackToObject(collection, audit, method) {15373 -1 var i, l;15374 -1 for (i = 0, l = collection.length; i < l; i++) {15375 -1 audit[method](collection[i]);15376 -1 }15377 -1 }15378 -1 var mergeCheckLocale = function mergeCheckLocale(a, b) {15379 -1 var pass = b.pass, fail = b.fail;15380 -1 if (typeof pass === 'string' && dotRegex.test(pass)) {15381 -1 pass = _deque_dot__WEBPACK_IMPORTED_MODULE_5___default.a.compile(pass);15382 -1 }15383 -1 if (typeof fail === 'string' && dotRegex.test(fail)) {15384 -1 fail = _deque_dot__WEBPACK_IMPORTED_MODULE_5___default.a.compile(fail);-1 34912 module.exports = function(length) { -1 34913 if (!length) { -1 34914 return function() { -1 34915 return ''; -1 34916 }; 15385 34917 }15386 -1 return _extends({}, a, {15387 -1 messages: {15388 -1 pass: pass || a.messages.pass,15389 -1 fail: fail || a.messages.fail,15390 -1 incomplete: _typeof(a.messages.incomplete) === 'object' ? _extends({}, a.messages.incomplete, b.incomplete) : b.incomplete-1 34918 return function(args) { -1 34919 var id = String(args[0]), i = 0, currentLength = length; -1 34920 while (--currentLength) { -1 34921 id += '\x01' + args[++i]; 15391 34922 }15392 -1 });-1 34923 return id; -1 34924 }; 15393 34925 };15394 -1 var mergeRuleLocale = function mergeRuleLocale(a, b) {15395 -1 var help = b.help, description = b.description;15396 -1 if (typeof help === 'string' && dotRegex.test(help)) {15397 -1 help = _deque_dot__WEBPACK_IMPORTED_MODULE_5___default.a.compile(help);15398 -1 }15399 -1 if (typeof description === 'string' && dotRegex.test(description)) {15400 -1 description = _deque_dot__WEBPACK_IMPORTED_MODULE_5___default.a.compile(description);-1 34926 }); -1 34927 var require_is_implemented8 = __commonJS(function(exports, module) { -1 34928 'use strict'; -1 34929 module.exports = function() { -1 34930 var numberIsNaN = Number.isNaN; -1 34931 if (typeof numberIsNaN !== 'function') { -1 34932 return false; 15401 34933 }15402 -1 return _extends({}, a, {15403 -1 help: help || a.help,15404 -1 description: description || a.description15405 -1 });-1 34934 return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34); 15406 34935 };15407 -1 var mergeFailureMessage = function mergeFailureMessage(a, b) {15408 -1 var failureMessage = b.failureMessage;15409 -1 if (typeof failureMessage === 'string' && dotRegex.test(failureMessage)) {15410 -1 failureMessage = _deque_dot__WEBPACK_IMPORTED_MODULE_5___default.a.compile(failureMessage);15411 -1 }15412 -1 return _extends({}, a, {15413 -1 failureMessage: failureMessage || a.failureMessage15414 -1 });-1 34936 }); -1 34937 var require_shim6 = __commonJS(function(exports, module) { -1 34938 'use strict'; -1 34939 module.exports = function(value) { -1 34940 return value !== value; 15415 34941 };15416 -1 var mergeFallbackMessage = function mergeFallbackMessage(a, b) {15417 -1 if (typeof b === 'string' && dotRegex.test(b)) {15418 -1 b = _deque_dot__WEBPACK_IMPORTED_MODULE_5___default.a.compile(b);-1 34942 }); -1 34943 var require_is_nan = __commonJS(function(exports, module) { -1 34944 'use strict'; -1 34945 module.exports = require_is_implemented8()() ? Number.isNaN : require_shim6(); -1 34946 }); -1 34947 var require_e_index_of = __commonJS(function(exports, module) { -1 34948 'use strict'; -1 34949 var numberIsNaN = require_is_nan(); -1 34950 var toPosInt = require_to_pos_integer(); -1 34951 var value = require_valid_value(); -1 34952 var indexOf = Array.prototype.indexOf; -1 34953 var objHasOwnProperty = Object.prototype.hasOwnProperty; -1 34954 var abs = Math.abs; -1 34955 var floor = Math.floor; -1 34956 module.exports = function(searchElement) { -1 34957 var i, length, fromIndex, val; -1 34958 if (!numberIsNaN(searchElement)) { -1 34959 return indexOf.apply(this, arguments); 15419 34960 }15420 -1 return b || a;15421 -1 };15422 -1 var Audit = function() {15423 -1 function Audit(audit) {15424 -1 _classCallCheck(this, Audit);15425 -1 this.brand = 'axe';15426 -1 this.application = 'axeAPI';15427 -1 this.tagExclude = [ 'experimental' ];15428 -1 this.lang = 'en';15429 -1 this.defaultConfig = audit;15430 -1 this.standards = _standards__WEBPACK_IMPORTED_MODULE_2__['default'];15431 -1 this._init();15432 -1 this._defaultLocale = null;-1 34961 length = toPosInt(value(this).length); -1 34962 fromIndex = arguments[1]; -1 34963 if (isNaN(fromIndex)) { -1 34964 fromIndex = 0; -1 34965 } else if (fromIndex >= 0) { -1 34966 fromIndex = floor(fromIndex); -1 34967 } else { -1 34968 fromIndex = toPosInt(this.length) - floor(abs(fromIndex)); 15433 34969 }15434 -1 _createClass(Audit, [ {15435 -1 key: '_setDefaultLocale',15436 -1 value: function _setDefaultLocale() {15437 -1 if (this._defaultLocale) {15438 -1 return;15439 -1 }15440 -1 var locale = {15441 -1 checks: {},15442 -1 rules: {},15443 -1 failureSummaries: {},15444 -1 incompleteFallbackMessage: '',15445 -1 lang: this.lang15446 -1 };15447 -1 var checkIDs = Object.keys(this.data.checks);15448 -1 for (var i = 0; i < checkIDs.length; i++) {15449 -1 var id = checkIDs[i];15450 -1 var check = this.data.checks[id];15451 -1 var _check$messages = check.messages, pass = _check$messages.pass, fail = _check$messages.fail, incomplete = _check$messages.incomplete;15452 -1 locale.checks[id] = {15453 -1 pass: pass,15454 -1 fail: fail,15455 -1 incomplete: incomplete15456 -1 };15457 -1 }15458 -1 var ruleIDs = Object.keys(this.data.rules);15459 -1 for (var _i4 = 0; _i4 < ruleIDs.length; _i4++) {15460 -1 var _id = ruleIDs[_i4];15461 -1 var rule = this.data.rules[_id];15462 -1 var description = rule.description, help = rule.help;15463 -1 locale.rules[_id] = {15464 -1 description: description,15465 -1 help: help15466 -1 };15467 -1 }15468 -1 var failureSummaries = Object.keys(this.data.failureSummaries);15469 -1 for (var _i5 = 0; _i5 < failureSummaries.length; _i5++) {15470 -1 var type = failureSummaries[_i5];15471 -1 var failureSummary = this.data.failureSummaries[type];15472 -1 var failureMessage = failureSummary.failureMessage;15473 -1 locale.failureSummaries[type] = {15474 -1 failureMessage: failureMessage15475 -1 };15476 -1 }15477 -1 locale.incompleteFallbackMessage = this.data.incompleteFallbackMessage;15478 -1 this._defaultLocale = locale;15479 -1 }15480 -1 }, {15481 -1 key: '_resetLocale',15482 -1 value: function _resetLocale() {15483 -1 var defaultLocale = this._defaultLocale;15484 -1 if (!defaultLocale) {15485 -1 return;-1 34970 for (i = fromIndex; i < length; ++i) { -1 34971 if (objHasOwnProperty.call(this, i)) { -1 34972 val = this[i]; -1 34973 if (numberIsNaN(val)) { -1 34974 return i; 15486 34975 }15487 -1 this.applyLocale(defaultLocale);15488 34976 }15489 -1 }, {15490 -1 key: '_applyCheckLocale',15491 -1 value: function _applyCheckLocale(checks) {15492 -1 var keys = Object.keys(checks);15493 -1 for (var i = 0; i < keys.length; i++) {15494 -1 var id = keys[i];15495 -1 if (!this.data.checks[id]) {15496 -1 throw new Error('Locale provided for unknown check: "'.concat(id, '"'));15497 -1 }15498 -1 this.data.checks[id] = mergeCheckLocale(this.data.checks[id], checks[id]);-1 34977 } -1 34978 return -1; -1 34979 }; -1 34980 }); -1 34981 var require_get = __commonJS(function(exports, module) { -1 34982 'use strict'; -1 34983 var indexOf = require_e_index_of(); -1 34984 var create = Object.create; -1 34985 module.exports = function() { -1 34986 var lastId = 0, map = [], cache20 = create(null); -1 34987 return { -1 34988 get: function get(args) { -1 34989 var index = 0, set = map, i, length = args.length; -1 34990 if (length === 0) { -1 34991 return set[length] || null; 15499 34992 }15500 -1 }15501 -1 }, {15502 -1 key: '_applyRuleLocale',15503 -1 value: function _applyRuleLocale(rules) {15504 -1 var keys = Object.keys(rules);15505 -1 for (var i = 0; i < keys.length; i++) {15506 -1 var id = keys[i];15507 -1 if (!this.data.rules[id]) {15508 -1 throw new Error('Locale provided for unknown rule: "'.concat(id, '"'));-1 34993 if (set = set[length]) { -1 34994 while (index < length - 1) { -1 34995 i = indexOf.call(set[0], args[index]); -1 34996 if (i === -1) { -1 34997 return null; -1 34998 } -1 34999 set = set[1][i]; -1 35000 ++index; 15509 35001 }15510 -1 this.data.rules[id] = mergeRuleLocale(this.data.rules[id], rules[id]);15511 -1 }15512 -1 }15513 -1 }, {15514 -1 key: '_applyFailureSummaries',15515 -1 value: function _applyFailureSummaries(messages) {15516 -1 var keys = Object.keys(messages);15517 -1 for (var i = 0; i < keys.length; i++) {15518 -1 var key = keys[i];15519 -1 if (!this.data.failureSummaries[key]) {15520 -1 throw new Error('Locale provided for unknown failureMessage: "'.concat(key, '"'));-1 35002 i = indexOf.call(set[0], args[index]); -1 35003 if (i === -1) { -1 35004 return null; 15521 35005 }15522 -1 this.data.failureSummaries[key] = mergeFailureMessage(this.data.failureSummaries[key], messages[key]);15523 -1 }15524 -1 }15525 -1 }, {15526 -1 key: 'applyLocale',15527 -1 value: function applyLocale(locale) {15528 -1 this._setDefaultLocale();15529 -1 if (locale.checks) {15530 -1 this._applyCheckLocale(locale.checks);15531 -1 }15532 -1 if (locale.rules) {15533 -1 this._applyRuleLocale(locale.rules);15534 -1 }15535 -1 if (locale.failureSummaries) {15536 -1 this._applyFailureSummaries(locale.failureSummaries, 'failureSummaries');15537 -1 }15538 -1 if (locale.incompleteFallbackMessage) {15539 -1 this.data.incompleteFallbackMessage = mergeFallbackMessage(this.data.incompleteFallbackMessage, locale.incompleteFallbackMessage);15540 -1 }15541 -1 if (locale.lang) {15542 -1 this.lang = locale.lang;-1 35006 return set[1][i] || null; 15543 35007 }15544 -1 }15545 -1 }, {15546 -1 key: '_init',15547 -1 value: function _init() {15548 -1 var audit = getDefaultConfiguration(this.defaultConfig);15549 -1 this.lang = audit.lang || 'en';15550 -1 this.reporter = audit.reporter;15551 -1 this.commands = {};15552 -1 this.rules = [];15553 -1 this.checks = {};15554 -1 unpackToObject(audit.rules, this, 'addRule');15555 -1 unpackToObject(audit.checks, this, 'addCheck');15556 -1 this.data = {};15557 -1 this.data.checks = audit.data && audit.data.checks || {};15558 -1 this.data.rules = audit.data && audit.data.rules || {};15559 -1 this.data.failureSummaries = audit.data && audit.data.failureSummaries || {};15560 -1 this.data.incompleteFallbackMessage = audit.data && audit.data.incompleteFallbackMessage || '';15561 -1 this._constructHelpUrls();15562 -1 }15563 -1 }, {15564 -1 key: 'registerCommand',15565 -1 value: function registerCommand(command) {15566 -1 this.commands[command.id] = command.callback;15567 -1 }15568 -1 }, {15569 -1 key: 'addRule',15570 -1 value: function addRule(spec) {15571 -1 if (spec.metadata) {15572 -1 this.data.rules[spec.id] = spec.metadata;15573 -1 }15574 -1 var rule = this.getRule(spec.id);15575 -1 if (rule) {15576 -1 rule.configure(spec);-1 35008 return null; -1 35009 }, -1 35010 set: function set(args) { -1 35011 var index = 0, set = map, i, length = args.length; -1 35012 if (length === 0) { -1 35013 set[length] = ++lastId; 15577 35014 } else {15578 -1 this.rules.push(new _rule__WEBPACK_IMPORTED_MODULE_0__['default'](spec, this));15579 -1 }15580 -1 }15581 -1 }, {15582 -1 key: 'addCheck',15583 -1 value: function addCheck(spec) {15584 -1 var metadata = spec.metadata;15585 -1 if (_typeof(metadata) === 'object') {15586 -1 this.data.checks[spec.id] = metadata;15587 -1 if (_typeof(metadata.messages) === 'object') {15588 -1 Object.keys(metadata.messages).filter(function(prop) {15589 -1 return metadata.messages.hasOwnProperty(prop) && typeof metadata.messages[prop] === 'string';15590 -1 }).forEach(function(prop) {15591 -1 if (metadata.messages[prop].indexOf('function') === 0) {15592 -1 metadata.messages[prop] = new Function('return ' + metadata.messages[prop] + ';')();15593 -1 }15594 -1 });-1 35015 if (!set[length]) { -1 35016 set[length] = [ [], [] ]; 15595 35017 } -1 35018 set = set[length]; -1 35019 while (index < length - 1) { -1 35020 i = indexOf.call(set[0], args[index]); -1 35021 if (i === -1) { -1 35022 i = set[0].push(args[index]) - 1; -1 35023 set[1].push([ [], [] ]); -1 35024 } -1 35025 set = set[1][i]; -1 35026 ++index; -1 35027 } -1 35028 i = indexOf.call(set[0], args[index]); -1 35029 if (i === -1) { -1 35030 i = set[0].push(args[index]) - 1; -1 35031 } -1 35032 set[1][i] = ++lastId; 15596 35033 }15597 -1 if (this.checks[spec.id]) {15598 -1 this.checks[spec.id].configure(spec);15599 -1 } else {15600 -1 this.checks[spec.id] = new _check__WEBPACK_IMPORTED_MODULE_1__['default'](spec);15601 -1 }15602 -1 }15603 -1 }, {15604 -1 key: 'run',15605 -1 value: function run(context, options, resolve, reject) {15606 -1 this.normalizeOptions(options);15607 -1 axe._selectCache = [];15608 -1 var allRulesToRun = getRulesToRun(this.rules, context, options);15609 -1 var runNowRules = allRulesToRun.now;15610 -1 var runLaterRules = allRulesToRun.later;15611 -1 var nowRulesQueue = Object(_utils__WEBPACK_IMPORTED_MODULE_4__['queue'])();15612 -1 runNowRules.forEach(function(rule) {15613 -1 nowRulesQueue.defer(getDefferedRule(rule, context, options));15614 -1 });15615 -1 var preloaderQueue = Object(_utils__WEBPACK_IMPORTED_MODULE_4__['queue'])();15616 -1 if (runLaterRules.length) {15617 -1 preloaderQueue.defer(function(resolve) {15618 -1 Object(_utils__WEBPACK_IMPORTED_MODULE_4__['preload'])(options).then(function(assets) {15619 -1 return resolve(assets);15620 -1 })['catch'](function(err) {15621 -1 console.warn('Couldn\'t load preload assets: ', err);15622 -1 resolve(undefined);15623 -1 });15624 -1 });15625 -1 }15626 -1 var queueForNowRulesAndPreloader = Object(_utils__WEBPACK_IMPORTED_MODULE_4__['queue'])();15627 -1 queueForNowRulesAndPreloader.defer(nowRulesQueue);15628 -1 queueForNowRulesAndPreloader.defer(preloaderQueue);15629 -1 queueForNowRulesAndPreloader.then(function(nowRulesAndPreloaderResults) {15630 -1 var assetsFromQueue = nowRulesAndPreloaderResults.pop();15631 -1 if (assetsFromQueue && assetsFromQueue.length) {15632 -1 var assets = assetsFromQueue[0];15633 -1 if (assets) {15634 -1 context = _extends({}, context, assets);-1 35034 cache20[lastId] = args; -1 35035 return lastId; -1 35036 }, -1 35037 delete: function _delete(id) { -1 35038 var index = 0, set = map, i, args = cache20[id], length = args.length, path = []; -1 35039 if (length === 0) { -1 35040 delete set[length]; -1 35041 } else if (set = set[length]) { -1 35042 while (index < length - 1) { -1 35043 i = indexOf.call(set[0], args[index]); -1 35044 if (i === -1) { -1 35045 return; 15635 35046 } -1 35047 path.push(set, i); -1 35048 set = set[1][i]; -1 35049 ++index; 15636 35050 }15637 -1 var nowRulesResults = nowRulesAndPreloaderResults[0];15638 -1 if (!runLaterRules.length) {15639 -1 axe._selectCache = undefined;15640 -1 resolve(nowRulesResults.filter(function(result) {15641 -1 return !!result;15642 -1 }));-1 35051 i = indexOf.call(set[0], args[index]); -1 35052 if (i === -1) { 15643 35053 return; 15644 35054 }15645 -1 var laterRulesQueue = Object(_utils__WEBPACK_IMPORTED_MODULE_4__['queue'])();15646 -1 runLaterRules.forEach(function(rule) {15647 -1 var deferredRule = getDefferedRule(rule, context, options);15648 -1 laterRulesQueue.defer(deferredRule);15649 -1 });15650 -1 laterRulesQueue.then(function(laterRuleResults) {15651 -1 axe._selectCache = undefined;15652 -1 resolve(nowRulesResults.concat(laterRuleResults).filter(function(result) {15653 -1 return !!result;15654 -1 }));15655 -1 })['catch'](reject);15656 -1 })['catch'](reject);15657 -1 }15658 -1 }, {15659 -1 key: 'after',15660 -1 value: function after(results, options) {15661 -1 var rules = this.rules;15662 -1 return results.map(function(ruleResult) {15663 -1 var rule = Object(_utils__WEBPACK_IMPORTED_MODULE_4__['findBy'])(rules, 'id', ruleResult.id);15664 -1 if (!rule) {15665 -1 throw new Error('Result for unknown rule. You may be running mismatch axe-core versions');-1 35055 id = set[1][i]; -1 35056 set[0].splice(i, 1); -1 35057 set[1].splice(i, 1); -1 35058 while (!set[0].length && path.length) { -1 35059 i = path.pop(); -1 35060 set = path.pop(); -1 35061 set[0].splice(i, 1); -1 35062 set[1].splice(i, 1); 15666 35063 }15667 -1 return rule.after(ruleResult, options);15668 -1 });-1 35064 } -1 35065 delete cache20[id]; -1 35066 }, -1 35067 clear: function clear() { -1 35068 map = []; -1 35069 cache20 = create(null); 15669 35070 }15670 -1 }, {15671 -1 key: 'getRule',15672 -1 value: function getRule(ruleId) {15673 -1 return this.rules.find(function(rule) {15674 -1 return rule.id === ruleId;15675 -1 });-1 35071 }; -1 35072 }; -1 35073 }); -1 35074 var require_get_1 = __commonJS(function(exports, module) { -1 35075 'use strict'; -1 35076 var indexOf = require_e_index_of(); -1 35077 module.exports = function() { -1 35078 var lastId = 0, argsMap = [], cache20 = []; -1 35079 return { -1 35080 get: function get(args) { -1 35081 var index = indexOf.call(argsMap, args[0]); -1 35082 return index === -1 ? null : cache20[index]; -1 35083 }, -1 35084 set: function set(args) { -1 35085 argsMap.push(args[0]); -1 35086 cache20.push(++lastId); -1 35087 return lastId; -1 35088 }, -1 35089 delete: function _delete(id) { -1 35090 var index = indexOf.call(cache20, id); -1 35091 if (index !== -1) { -1 35092 argsMap.splice(index, 1); -1 35093 cache20.splice(index, 1); -1 35094 } -1 35095 }, -1 35096 clear: function clear() { -1 35097 argsMap = []; -1 35098 cache20 = []; 15676 35099 }15677 -1 }, {15678 -1 key: 'normalizeOptions',15679 -1 value: function normalizeOptions(options) {15680 -1 var audit = this;15681 -1 var tags = [];15682 -1 var ruleIds = [];15683 -1 audit.rules.forEach(function(rule) {15684 -1 ruleIds.push(rule.id);15685 -1 rule.tags.forEach(function(tag) {15686 -1 if (!tags.includes(tag)) {15687 -1 tags.push(tag);15688 -1 }15689 -1 });15690 -1 });15691 -1 if (_typeof(options.runOnly) === 'object') {15692 -1 if (Array.isArray(options.runOnly)) {15693 -1 var hasTag = options.runOnly.find(function(value) {15694 -1 return tags.includes(value);15695 -1 });15696 -1 var hasRule = options.runOnly.find(function(value) {15697 -1 return ruleIds.includes(value);15698 -1 });15699 -1 if (hasTag && hasRule) {15700 -1 throw new Error('runOnly cannot be both rules and tags');15701 -1 }15702 -1 if (hasRule) {15703 -1 options.runOnly = {15704 -1 type: 'rule',15705 -1 values: options.runOnly15706 -1 };15707 -1 } else {15708 -1 options.runOnly = {15709 -1 type: 'tag',15710 -1 values: options.runOnly15711 -1 };15712 -1 }15713 -1 }15714 -1 var only = options.runOnly;15715 -1 if (only.value && !only.values) {15716 -1 only.values = only.value;15717 -1 delete only.value;15718 -1 }15719 -1 if (!Array.isArray(only.values) || only.values.length === 0) {15720 -1 throw new Error('runOnly.values must be a non-empty array');15721 -1 }15722 -1 if ([ 'rule', 'rules' ].includes(only.type)) {15723 -1 only.type = 'rule';15724 -1 only.values.forEach(function(ruleId) {15725 -1 if (!ruleIds.includes(ruleId)) {15726 -1 throw new Error('unknown rule `' + ruleId + '` in options.runOnly');15727 -1 }15728 -1 });15729 -1 } else if ([ 'tag', 'tags', undefined ].includes(only.type)) {15730 -1 only.type = 'tag';15731 -1 var unmatchedTags = only.values.filter(function(tag) {15732 -1 return !tags.includes(tag);15733 -1 });15734 -1 if (unmatchedTags.length !== 0) {15735 -1 Object(_log__WEBPACK_IMPORTED_MODULE_6__['default'])('Could not find tags `' + unmatchedTags.join('`, `') + '`');15736 -1 }15737 -1 } else {15738 -1 throw new Error('Unknown runOnly type \''.concat(only.type, '\''));-1 35100 }; -1 35101 }; -1 35102 }); -1 35103 var require_get_fixed = __commonJS(function(exports, module) { -1 35104 'use strict'; -1 35105 var indexOf = require_e_index_of(); -1 35106 var create = Object.create; -1 35107 module.exports = function(length) { -1 35108 var lastId = 0, map = [ [], [] ], cache20 = create(null); -1 35109 return { -1 35110 get: function get(args) { -1 35111 var index = 0, set = map, i; -1 35112 while (index < length - 1) { -1 35113 i = indexOf.call(set[0], args[index]); -1 35114 if (i === -1) { -1 35115 return null; 15739 35116 } -1 35117 set = set[1][i]; -1 35118 ++index; 15740 35119 }15741 -1 if (_typeof(options.rules) === 'object') {15742 -1 Object.keys(options.rules).forEach(function(ruleId) {15743 -1 if (!ruleIds.includes(ruleId)) {15744 -1 throw new Error('unknown rule `' + ruleId + '` in options.rules');15745 -1 }15746 -1 });-1 35120 i = indexOf.call(set[0], args[index]); -1 35121 if (i === -1) { -1 35122 return null; 15747 35123 }15748 -1 return options;15749 -1 }15750 -1 }, {15751 -1 key: 'setBranding',15752 -1 value: function setBranding(branding) {15753 -1 var previous = {15754 -1 brand: this.brand,15755 -1 application: this.application15756 -1 };15757 -1 if (branding && branding.hasOwnProperty('brand') && branding.brand && typeof branding.brand === 'string') {15758 -1 this.brand = branding.brand;-1 35124 return set[1][i] || null; -1 35125 }, -1 35126 set: function set(args) { -1 35127 var index = 0, set = map, i; -1 35128 while (index < length - 1) { -1 35129 i = indexOf.call(set[0], args[index]); -1 35130 if (i === -1) { -1 35131 i = set[0].push(args[index]) - 1; -1 35132 set[1].push([ [], [] ]); -1 35133 } -1 35134 set = set[1][i]; -1 35135 ++index; 15759 35136 }15760 -1 if (branding && branding.hasOwnProperty('application') && branding.application && typeof branding.application === 'string') {15761 -1 this.application = branding.application;-1 35137 i = indexOf.call(set[0], args[index]); -1 35138 if (i === -1) { -1 35139 i = set[0].push(args[index]) - 1; 15762 35140 }15763 -1 this._constructHelpUrls(previous);15764 -1 }15765 -1 }, {15766 -1 key: '_constructHelpUrls',15767 -1 value: function _constructHelpUrls() {15768 -1 var _this = this;15769 -1 var previous = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;15770 -1 var version = (axe.version.match(/^[1-9][0-9]*\.[0-9]+/) || [ 'x.y' ])[0];15771 -1 this.rules.forEach(function(rule) {15772 -1 if (!_this.data.rules[rule.id]) {15773 -1 _this.data.rules[rule.id] = {};15774 -1 }15775 -1 var metaData = _this.data.rules[rule.id];15776 -1 if (typeof metaData.helpUrl !== 'string' || previous && metaData.helpUrl === getHelpUrl(previous, rule.id, version)) {15777 -1 metaData.helpUrl = getHelpUrl(_this, rule.id, version);-1 35141 set[1][i] = ++lastId; -1 35142 cache20[lastId] = args; -1 35143 return lastId; -1 35144 }, -1 35145 delete: function _delete(id) { -1 35146 var index = 0, set = map, i, path = [], args = cache20[id]; -1 35147 while (index < length - 1) { -1 35148 i = indexOf.call(set[0], args[index]); -1 35149 if (i === -1) { -1 35150 return; 15778 35151 }15779 -1 });15780 -1 }15781 -1 }, {15782 -1 key: 'resetRulesAndChecks',15783 -1 value: function resetRulesAndChecks() {15784 -1 this._init();15785 -1 this._resetLocale();15786 -1 }15787 -1 } ]);15788 -1 return Audit;15789 -1 }();15790 -1 function getRulesToRun(rules, context, options) {15791 -1 var base = {15792 -1 now: [],15793 -1 later: []15794 -1 };15795 -1 var splitRules = rules.reduce(function(out, rule) {15796 -1 if (!Object(_utils__WEBPACK_IMPORTED_MODULE_4__['ruleShouldRun'])(rule, context, options)) {15797 -1 return out;15798 -1 }15799 -1 if (rule.preload) {15800 -1 out.later.push(rule);15801 -1 return out;15802 -1 }15803 -1 out.now.push(rule);15804 -1 return out;15805 -1 }, base);15806 -1 return splitRules;15807 -1 }15808 -1 function getDefferedRule(rule, context, options) {15809 -1 if (options.performanceTimer) {15810 -1 _utils__WEBPACK_IMPORTED_MODULE_4__['performanceTimer'].mark('mark_rule_start_' + rule.id);15811 -1 }15812 -1 return function(resolve, reject) {15813 -1 rule.run(context, options, function(ruleResult) {15814 -1 resolve(ruleResult);15815 -1 }, function(err) {15816 -1 if (!options.debug) {15817 -1 var errResult = Object.assign(new _rule_result__WEBPACK_IMPORTED_MODULE_3__['default'](rule), {15818 -1 result: _constants__WEBPACK_IMPORTED_MODULE_7__['default'].CANTTELL,15819 -1 description: 'An error occured while running this rule',15820 -1 message: err.message,15821 -1 stack: err.stack,15822 -1 error: err,15823 -1 errorNode: err.errorNode15824 -1 });15825 -1 resolve(errResult);15826 -1 } else {15827 -1 reject(err);-1 35152 path.push(set, i); -1 35153 set = set[1][i]; -1 35154 ++index; 15828 35155 }15829 -1 });-1 35156 i = indexOf.call(set[0], args[index]); -1 35157 if (i === -1) { -1 35158 return; -1 35159 } -1 35160 id = set[1][i]; -1 35161 set[0].splice(i, 1); -1 35162 set[1].splice(i, 1); -1 35163 while (!set[0].length && path.length) { -1 35164 i = path.pop(); -1 35165 set = path.pop(); -1 35166 set[0].splice(i, 1); -1 35167 set[1].splice(i, 1); -1 35168 } -1 35169 delete cache20[id]; -1 35170 }, -1 35171 clear: function clear() { -1 35172 map = [ [], [] ]; -1 35173 cache20 = create(null); -1 35174 } 15830 35175 };15831 -1 }15832 -1 function getHelpUrl(_ref52, ruleId, version) {15833 -1 var brand = _ref52.brand, application = _ref52.application, lang = _ref52.lang;15834 -1 return _constants__WEBPACK_IMPORTED_MODULE_7__['default'].helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');15835 -1 }15836 -1 __webpack_exports__['default'] = Audit;15837 -1 },15838 -1 './lib/core/base/cache.js': function libCoreBaseCacheJs(module, __webpack_exports__, __webpack_require__) {15839 -1 'use strict';15840 -1 __webpack_require__.r(__webpack_exports__);15841 -1 var _cache = {};15842 -1 var cache = {15843 -1 set: function set(key, value) {15844 -1 _cache[key] = value;15845 -1 },15846 -1 get: function get(key) {15847 -1 return _cache[key];15848 -1 },15849 -1 clear: function clear() {15850 -1 _cache = {};15851 -1 }15852 35176 };15853 -1 __webpack_exports__['default'] = cache;15854 -1 },15855 -1 './lib/core/base/check-result.js': function libCoreBaseCheckResultJs(module, __webpack_exports__, __webpack_require__) {-1 35177 }); -1 35178 var require_map = __commonJS(function(exports, module) { 15856 35179 'use strict';15857 -1 __webpack_require__.r(__webpack_exports__);15858 -1 function CheckResult(check) {15859 -1 this.id = check.id;15860 -1 this.data = null;15861 -1 this.relatedNodes = [];15862 -1 this.result = null;15863 -1 }15864 -1 __webpack_exports__['default'] = CheckResult;15865 -1 },15866 -1 './lib/core/base/check.js': function libCoreBaseCheckJs(module, __webpack_exports__, __webpack_require__) {-1 35180 var callable = require_valid_callable(); -1 35181 var forEach = require_for_each(); -1 35182 var call = Function.prototype.call; -1 35183 module.exports = function(obj, cb) { -1 35184 var result = {}, thisArg = arguments[2]; -1 35185 callable(cb); -1 35186 forEach(obj, function(value, key, targetObj, index) { -1 35187 result[key] = call.call(cb, thisArg, value, key, targetObj, index); -1 35188 }); -1 35189 return result; -1 35190 }; -1 35191 }); -1 35192 var require_next_tick = __commonJS(function(exports, module) { 15867 35193 'use strict';15868 -1 __webpack_require__.r(__webpack_exports__);15869 -1 __webpack_require__.d(__webpack_exports__, 'createExecutionContext', function() {15870 -1 return createExecutionContext;15871 -1 });15872 -1 var _metadata_function_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/metadata-function-map.js');15873 -1 var _check_result__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/check-result.js');15874 -1 var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');15875 -1 function createExecutionContext(spec) {15876 -1 if (typeof spec === 'string') {15877 -1 if (_metadata_function_map__WEBPACK_IMPORTED_MODULE_0__['default'][spec]) {15878 -1 return _metadata_function_map__WEBPACK_IMPORTED_MODULE_0__['default'][spec];15879 -1 }15880 -1 if (/^\s*function[\s\w]*\(/.test(spec)) {15881 -1 return new Function('return ' + spec + ';')();15882 -1 }15883 -1 throw new ReferenceError('Function ID does not exist in the metadata-function-map: '.concat(spec));15884 -1 }15885 -1 return spec;15886 -1 }15887 -1 function normalizeOptions() {15888 -1 var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};15889 -1 if (Array.isArray(options) || _typeof(options) !== 'object') {15890 -1 options = {15891 -1 value: options15892 -1 };15893 -1 }15894 -1 return options;15895 -1 }15896 -1 function Check(spec) {15897 -1 if (spec) {15898 -1 this.id = spec.id;15899 -1 this.configure(spec);-1 35194 var ensureCallable = function ensureCallable(fn) { -1 35195 if (typeof fn !== 'function') { -1 35196 throw new TypeError(fn + ' is not a function'); 15900 35197 }15901 -1 }15902 -1 Check.prototype.enabled = true;15903 -1 Check.prototype.run = function(node, options, context, resolve, reject) {15904 -1 'use strict';15905 -1 options = options || {};15906 -1 var enabled = options.hasOwnProperty('enabled') ? options.enabled : this.enabled;15907 -1 var checkOptions = this.getOptions(options.options);15908 -1 if (enabled) {15909 -1 var checkResult = new _check_result__WEBPACK_IMPORTED_MODULE_1__['default'](this);15910 -1 var helper = Object(_utils__WEBPACK_IMPORTED_MODULE_2__['checkHelper'])(checkResult, options, resolve, reject);15911 -1 var result;15912 -1 try {15913 -1 result = this.evaluate.call(helper, node.actualNode, checkOptions, node, context);15914 -1 } catch (e) {15915 -1 if (node && node.actualNode) {15916 -1 e.errorNode = new _utils__WEBPACK_IMPORTED_MODULE_2__['DqElement'](node.actualNode).toJSON();-1 35198 return fn; -1 35199 }; -1 35200 var byObserver = function byObserver(Observer) { -1 35201 var node = document.createTextNode(''), queue4, currentQueue, i = 0; -1 35202 new Observer(function() { -1 35203 var callback; -1 35204 if (!queue4) { -1 35205 if (!currentQueue) { -1 35206 return; 15917 35207 }15918 -1 reject(e);-1 35208 queue4 = currentQueue; -1 35209 } else if (currentQueue) { -1 35210 queue4 = currentQueue.concat(queue4); -1 35211 } -1 35212 currentQueue = queue4; -1 35213 queue4 = null; -1 35214 if (typeof currentQueue === 'function') { -1 35215 callback = currentQueue; -1 35216 currentQueue = null; -1 35217 callback(); 15919 35218 return; 15920 35219 }15921 -1 if (!helper.isAsync) {15922 -1 checkResult.result = result;15923 -1 resolve(checkResult);-1 35220 node.data = i = ++i % 2; -1 35221 while (currentQueue) { -1 35222 callback = currentQueue.shift(); -1 35223 if (!currentQueue.length) { -1 35224 currentQueue = null; -1 35225 } -1 35226 callback(); 15924 35227 }15925 -1 } else {15926 -1 resolve(null);15927 -1 }15928 -1 };15929 -1 Check.prototype.runSync = function(node, options, context) {15930 -1 options = options || {};15931 -1 var _options = options, _options$enabled = _options.enabled, enabled = _options$enabled === void 0 ? this.enabled : _options$enabled;15932 -1 if (!enabled) {15933 -1 return null;15934 -1 }15935 -1 var checkOptions = this.getOptions(options.options);15936 -1 var checkResult = new _check_result__WEBPACK_IMPORTED_MODULE_1__['default'](this);15937 -1 var helper = Object(_utils__WEBPACK_IMPORTED_MODULE_2__['checkHelper'])(checkResult, options);15938 -1 helper.async = function() {15939 -1 throw new Error('Cannot run async check while in a synchronous run');15940 -1 };15941 -1 var result;15942 -1 try {15943 -1 result = this.evaluate.call(helper, node.actualNode, checkOptions, node, context);15944 -1 } catch (e) {15945 -1 if (node && node.actualNode) {15946 -1 e.errorNode = new _utils__WEBPACK_IMPORTED_MODULE_2__['DqElement'](node.actualNode).toJSON();-1 35228 }).observe(node, { -1 35229 characterData: true -1 35230 }); -1 35231 return function(fn) { -1 35232 ensureCallable(fn); -1 35233 if (queue4) { -1 35234 if (typeof queue4 === 'function') { -1 35235 queue4 = [ queue4, fn ]; -1 35236 } else { -1 35237 queue4.push(fn); -1 35238 } -1 35239 return; 15947 35240 }15948 -1 throw e;15949 -1 }15950 -1 checkResult.result = result;15951 -1 return checkResult;-1 35241 queue4 = fn; -1 35242 node.data = i = ++i % 2; -1 35243 }; 15952 35244 };15953 -1 Check.prototype.configure = function(spec) {15954 -1 var _this2 = this;15955 -1 if (!spec.evaluate || _metadata_function_map__WEBPACK_IMPORTED_MODULE_0__['default'][spec.evaluate]) {15956 -1 this._internalCheck = true;-1 35245 module.exports = function() { -1 35246 if ((typeof process === 'undefined' ? 'undefined' : _typeof(process)) === 'object' && process && typeof process.nextTick === 'function') { -1 35247 return process.nextTick; 15957 35248 }15958 -1 if (spec.hasOwnProperty('enabled')) {15959 -1 this.enabled = spec.enabled;-1 35249 if (typeof queueMicrotask === 'function') { -1 35250 return function(cb) { -1 35251 queueMicrotask(ensureCallable(cb)); -1 35252 }; 15960 35253 }15961 -1 if (spec.hasOwnProperty('options')) {15962 -1 if (this._internalCheck) {15963 -1 this.options = normalizeOptions(spec.options);15964 -1 } else {15965 -1 this.options = spec.options;-1 35254 if ((typeof document === 'undefined' ? 'undefined' : _typeof(document)) === 'object' && document) { -1 35255 if (typeof MutationObserver === 'function') { -1 35256 return byObserver(MutationObserver); -1 35257 } -1 35258 if (typeof WebKitMutationObserver === 'function') { -1 35259 return byObserver(WebKitMutationObserver); 15966 35260 } 15967 35261 }15968 -1 [ 'evaluate', 'after' ].filter(function(prop) {15969 -1 return spec.hasOwnProperty(prop);15970 -1 }).forEach(function(prop) {15971 -1 return _this2[prop] = createExecutionContext(spec[prop]);15972 -1 });15973 -1 };15974 -1 Check.prototype.getOptions = function getOptions(options) {15975 -1 if (this._internalCheck) {15976 -1 return Object(_utils__WEBPACK_IMPORTED_MODULE_2__['deepMerge'])(this.options, normalizeOptions(options || {}));15977 -1 } else {15978 -1 return options || this.options;15979 -1 }15980 -1 };15981 -1 __webpack_exports__['default'] = Check;15982 -1 },15983 -1 './lib/core/base/context.js': function libCoreBaseContextJs(module, __webpack_exports__, __webpack_require__) {15984 -1 'use strict';15985 -1 __webpack_require__.r(__webpack_exports__);15986 -1 var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');15987 -1 function pushUniqueFrame(collection, frame) {15988 -1 if (Object(_utils__WEBPACK_IMPORTED_MODULE_0__['isHidden'])(frame)) {15989 -1 return;15990 -1 }15991 -1 var fr = Object(_utils__WEBPACK_IMPORTED_MODULE_0__['findBy'])(collection, 'node', frame);15992 -1 if (!fr) {15993 -1 collection.push({15994 -1 node: frame,15995 -1 include: [],15996 -1 exclude: []15997 -1 });-1 35262 if (typeof setImmediate === 'function') { -1 35263 return function(cb) { -1 35264 setImmediate(ensureCallable(cb)); -1 35265 }; 15998 35266 }15999 -1 }16000 -1 function pushUniqueFrameSelector(context, type, selectorArray) {16001 -1 context.frames = context.frames || [];16002 -1 var result, frame;16003 -1 var frames = document.querySelectorAll(selectorArray.shift());16004 -1 frameloop: for (var i = 0, l = frames.length; i < l; i++) {16005 -1 frame = frames[i];16006 -1 for (var j = 0, l2 = context.frames.length; j < l2; j++) {16007 -1 if (context.frames[j].node === frame) {16008 -1 context.frames[j][type].push(selectorArray);16009 -1 break frameloop;16010 -1 }16011 -1 }16012 -1 result = {16013 -1 node: frame,16014 -1 include: [],16015 -1 exclude: []-1 35267 if (typeof setTimeout === 'function' || (typeof setTimeout === 'undefined' ? 'undefined' : _typeof(setTimeout)) === 'object') { -1 35268 return function(cb) { -1 35269 setTimeout(ensureCallable(cb), 0); 16016 35270 };16017 -1 if (selectorArray) {16018 -1 result[type].push(selectorArray);16019 -1 }16020 -1 context.frames.push(result);16021 35271 }16022 -1 }16023 -1 function normalizeContext(context) {16024 -1 if (context && _typeof(context) === 'object' || context instanceof window.NodeList) {16025 -1 if (context instanceof window.Node) {16026 -1 return {16027 -1 include: [ context ],16028 -1 exclude: []16029 -1 };16030 -1 }16031 -1 if (context.hasOwnProperty('include') || context.hasOwnProperty('exclude')) {16032 -1 return {16033 -1 include: context.include && +context.include.length ? context.include : [ document ],16034 -1 exclude: context.exclude || []16035 -1 };-1 35272 return null; -1 35273 }(); -1 35274 }); -1 35275 var require_async = __commonJS(function() { -1 35276 'use strict'; -1 35277 var aFrom = require_from(); -1 35278 var objectMap = require_map(); -1 35279 var mixin = require_mixin(); -1 35280 var defineLength = require_define_length(); -1 35281 var nextTick = require_next_tick(); -1 35282 var slice = Array.prototype.slice; -1 35283 var apply = Function.prototype.apply; -1 35284 var create = Object.create; -1 35285 require_registered_extensions().async = function(tbi, conf) { -1 35286 var waiting = create(null), cache20 = create(null), base = conf.memoized, original = conf.original, currentCallback, currentContext, currentArgs; -1 35287 conf.memoized = defineLength(function(arg) { -1 35288 var args = arguments, last = args[args.length - 1]; -1 35289 if (typeof last === 'function') { -1 35290 currentCallback = last; -1 35291 args = slice.call(args, 0, -1); 16036 35292 }16037 -1 if (context.length === +context.length) {16038 -1 return {16039 -1 include: context,16040 -1 exclude: []16041 -1 };-1 35293 return base.apply(currentContext = this, currentArgs = args); -1 35294 }, base); -1 35295 try { -1 35296 mixin(conf.memoized, base); -1 35297 } catch (ignore) {} -1 35298 conf.on('get', function(id) { -1 35299 var cb, context3, args; -1 35300 if (!currentCallback) { -1 35301 return; 16042 35302 }16043 -1 }16044 -1 if (typeof context === 'string') {16045 -1 return {16046 -1 include: [ context ],16047 -1 exclude: []16048 -1 };16049 -1 }16050 -1 return {16051 -1 include: [ document ],16052 -1 exclude: []16053 -1 };16054 -1 }16055 -1 function parseSelectorArray(context, type) {16056 -1 var item, result = [], nodeList;16057 -1 for (var i = 0, l = context[type].length; i < l; i++) {16058 -1 item = context[type][i];16059 -1 if (typeof item === 'string') {16060 -1 nodeList = Array.from(document.querySelectorAll(item));16061 -1 result = result.concat(nodeList.map(function(node) {16062 -1 return Object(_utils__WEBPACK_IMPORTED_MODULE_0__['getNodeFromTree'])(node);16063 -1 }));16064 -1 break;16065 -1 } else if (item && item.length && !(item instanceof window.Node)) {16066 -1 if (item.length > 1) {16067 -1 pushUniqueFrameSelector(context, type, item);-1 35303 if (waiting[id]) { -1 35304 if (typeof waiting[id] === 'function') { -1 35305 waiting[id] = [ waiting[id], currentCallback ]; 16068 35306 } else {16069 -1 nodeList = Array.from(document.querySelectorAll(item[0]));16070 -1 result = result.concat(nodeList.map(function(node) {16071 -1 return Object(_utils__WEBPACK_IMPORTED_MODULE_0__['getNodeFromTree'])(node);16072 -1 }));-1 35307 waiting[id].push(currentCallback); 16073 35308 }16074 -1 } else if (item instanceof window.Node) {16075 -1 if (item.documentElement instanceof window.Node) {16076 -1 result.push(context.flatTree[0]);-1 35309 currentCallback = null; -1 35310 return; -1 35311 } -1 35312 cb = currentCallback; -1 35313 context3 = currentContext; -1 35314 args = currentArgs; -1 35315 currentCallback = currentContext = currentArgs = null; -1 35316 nextTick(function() { -1 35317 var data2; -1 35318 if (hasOwnProperty.call(cache20, id)) { -1 35319 data2 = cache20[id]; -1 35320 conf.emit('getasync', id, args, context3); -1 35321 apply.call(cb, data2.context, data2.args); 16077 35322 } else {16078 -1 result.push(Object(_utils__WEBPACK_IMPORTED_MODULE_0__['getNodeFromTree'])(item));-1 35323 currentCallback = cb; -1 35324 currentContext = context3; -1 35325 currentArgs = args; -1 35326 base.apply(context3, args); 16079 35327 }16080 -1 }16081 -1 }16082 -1 return result.filter(function(r) {16083 -1 return r;-1 35328 }); 16084 35329 });16085 -1 }16086 -1 function validateContext(context) {16087 -1 if (context.include.length === 0) {16088 -1 if (context.frames.length === 0) {16089 -1 var env = _utils__WEBPACK_IMPORTED_MODULE_0__['respondable'].isInFrame() ? 'frame' : 'page';16090 -1 return new Error('No elements found for include in ' + env + ' Context');-1 35330 conf.original = function() { -1 35331 var args, cb, origCb, result; -1 35332 if (!currentCallback) { -1 35333 return apply.call(original, this, arguments); 16091 35334 }16092 -1 context.frames.forEach(function(frame, i) {16093 -1 if (frame.include.length === 0) {16094 -1 return new Error('No elements found for include in Context of frame ' + i);-1 35335 args = aFrom(arguments); -1 35336 cb = function self2(err2) { -1 35337 var cb2, args2, id = self2.id; -1 35338 if (id == null) { -1 35339 nextTick(apply.bind(self2, this, arguments)); -1 35340 return void 0; 16095 35341 }16096 -1 });16097 -1 }16098 -1 }16099 -1 function getRootNode(_ref53) {16100 -1 var include = _ref53.include, exclude = _ref53.exclude;16101 -1 var selectors = Array.from(include).concat(Array.from(exclude));16102 -1 for (var i = 0; i < selectors.length; ++i) {16103 -1 var item = selectors[i];16104 -1 if (item instanceof window.Element) {16105 -1 return item.ownerDocument.documentElement;-1 35342 delete self2.id; -1 35343 cb2 = waiting[id]; -1 35344 delete waiting[id]; -1 35345 if (!cb2) { -1 35346 return void 0; -1 35347 } -1 35348 args2 = aFrom(arguments); -1 35349 if (conf.has(id)) { -1 35350 if (err2) { -1 35351 conf['delete'](id); -1 35352 } else { -1 35353 cache20[id] = { -1 35354 context: this, -1 35355 args: args2 -1 35356 }; -1 35357 conf.emit('setasync', id, typeof cb2 === 'function' ? 1 : cb2.length); -1 35358 } -1 35359 } -1 35360 if (typeof cb2 === 'function') { -1 35361 result = apply.call(cb2, this, args2); -1 35362 } else { -1 35363 cb2.forEach(function(cb3) { -1 35364 result = apply.call(cb3, this, args2); -1 35365 }, this); -1 35366 } -1 35367 return result; -1 35368 }; -1 35369 origCb = currentCallback; -1 35370 currentCallback = currentContext = currentArgs = null; -1 35371 args.push(cb); -1 35372 result = apply.call(original, this, args); -1 35373 cb.cb = origCb; -1 35374 currentCallback = cb; -1 35375 return result; -1 35376 }; -1 35377 conf.on('set', function(id) { -1 35378 if (!currentCallback) { -1 35379 conf['delete'](id); -1 35380 return; 16106 35381 }16107 -1 if (item instanceof window.Document) {16108 -1 return item.documentElement;-1 35382 if (waiting[id]) { -1 35383 if (typeof waiting[id] === 'function') { -1 35384 waiting[id] = [ waiting[id], currentCallback.cb ]; -1 35385 } else { -1 35386 waiting[id].push(currentCallback.cb); -1 35387 } -1 35388 } else { -1 35389 waiting[id] = currentCallback.cb; 16109 35390 }16110 -1 }16111 -1 return document.documentElement;16112 -1 }16113 -1 function Context(spec) {16114 -1 var _this3 = this;16115 -1 this.frames = [];16116 -1 this.initiator = spec && typeof spec.initiator === 'boolean' ? spec.initiator : true;16117 -1 this.page = false;16118 -1 spec = normalizeContext(spec);16119 -1 this.flatTree = Object(_utils__WEBPACK_IMPORTED_MODULE_0__['getFlattenedTree'])(getRootNode(spec));16120 -1 this.exclude = spec.exclude;16121 -1 this.include = spec.include;16122 -1 this.include = parseSelectorArray(this, 'include');16123 -1 this.exclude = parseSelectorArray(this, 'exclude');16124 -1 Object(_utils__WEBPACK_IMPORTED_MODULE_0__['select'])('frame, iframe', this).forEach(function(frame) {16125 -1 if (Object(_utils__WEBPACK_IMPORTED_MODULE_0__['isNodeInContext'])(frame, _this3)) {16126 -1 pushUniqueFrame(_this3.frames, frame.actualNode);-1 35391 delete currentCallback.cb; -1 35392 currentCallback.id = id; -1 35393 currentCallback = null; -1 35394 }); -1 35395 conf.on('delete', function(id) { -1 35396 var result; -1 35397 if (hasOwnProperty.call(waiting, id)) { -1 35398 return; -1 35399 } -1 35400 if (!cache20[id]) { -1 35401 return; 16127 35402 } -1 35403 result = cache20[id]; -1 35404 delete cache20[id]; -1 35405 conf.emit('deleteasync', id, slice.call(result.args, 1)); -1 35406 }); -1 35407 conf.on('clear', function() { -1 35408 var oldCache = cache20; -1 35409 cache20 = create(null); -1 35410 conf.emit('clearasync', objectMap(oldCache, function(data2) { -1 35411 return slice.call(data2.args, 1); -1 35412 })); 16128 35413 });16129 -1 if (this.include.length === 1 && this.include[0].actualNode === document.documentElement) {16130 -1 this.page = true;16131 -1 }16132 -1 var err = validateContext(this);16133 -1 if (err instanceof Error) {16134 -1 throw err;16135 -1 }16136 -1 if (!Array.isArray(this.include)) {16137 -1 this.include = Array.from(this.include);16138 -1 }16139 -1 this.include.sort(_utils__WEBPACK_IMPORTED_MODULE_0__['nodeSorter']);16140 -1 }16141 -1 __webpack_exports__['default'] = Context;16142 -1 },16143 -1 './lib/core/base/metadata-function-map.js': function libCoreBaseMetadataFunctionMapJs(module, __webpack_exports__, __webpack_require__) {16144 -1 'use strict';16145 -1 __webpack_require__.r(__webpack_exports__);16146 -1 var _checks_aria_abstractrole_evaluate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/checks/aria/abstractrole-evaluate.js');16147 -1 var _checks_aria_aria_allowed_attr_evaluate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/checks/aria/aria-allowed-attr-evaluate.js');16148 -1 var _checks_aria_aria_allowed_role_evaluate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/checks/aria/aria-allowed-role-evaluate.js');16149 -1 var _checks_aria_aria_errormessage_evaluate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/checks/aria/aria-errormessage-evaluate.js');16150 -1 var _checks_aria_aria_hidden_body_evaluate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/checks/aria/aria-hidden-body-evaluate.js');16151 -1 var _checks_aria_aria_required_attr_evaluate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/checks/aria/aria-required-attr-evaluate.js');16152 -1 var _checks_aria_aria_required_children_evaluate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/checks/aria/aria-required-children-evaluate.js');16153 -1 var _checks_aria_aria_required_parent_evaluate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/checks/aria/aria-required-parent-evaluate.js');16154 -1 var _checks_aria_aria_roledescription_evaluate__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__('./lib/checks/aria/aria-roledescription-evaluate.js');16155 -1 var _checks_aria_aria_unsupported_attr_evaluate__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__('./lib/checks/aria/aria-unsupported-attr-evaluate.js');16156 -1 var _checks_aria_aria_valid_attr_evaluate__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__('./lib/checks/aria/aria-valid-attr-evaluate.js');16157 -1 var _checks_aria_aria_valid_attr_value_evaluate__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__('./lib/checks/aria/aria-valid-attr-value-evaluate.js');16158 -1 var _checks_aria_fallbackrole_evaluate__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__('./lib/checks/aria/fallbackrole-evaluate.js');16159 -1 var _checks_aria_has_widget_role_evaluate__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__('./lib/checks/aria/has-widget-role-evaluate.js');16160 -1 var _checks_aria_invalidrole_evaluate__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__('./lib/checks/aria/invalidrole-evaluate.js');16161 -1 var _checks_aria_no_implicit_explicit_label_evaluate__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__('./lib/checks/aria/no-implicit-explicit-label-evaluate.js');16162 -1 var _checks_aria_unsupportedrole_evaluate__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__('./lib/checks/aria/unsupportedrole-evaluate.js');16163 -1 var _checks_aria_valid_scrollable_semantics_evaluate__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__('./lib/checks/aria/valid-scrollable-semantics-evaluate.js');16164 -1 var _checks_tables_caption_faked_evaluate__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__('./lib/checks/tables/caption-faked-evaluate.js');16165 -1 var _checks_tables_html5_scope_evaluate__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__('./lib/checks/tables/html5-scope-evaluate.js');16166 -1 var _checks_tables_same_caption_summary_evaluate__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__('./lib/checks/tables/same-caption-summary-evaluate.js');16167 -1 var _checks_tables_scope_value_evaluate__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__('./lib/checks/tables/scope-value-evaluate.js');16168 -1 var _checks_tables_td_has_header_evaluate__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__('./lib/checks/tables/td-has-header-evaluate.js');16169 -1 var _checks_tables_td_headers_attr_evaluate__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__('./lib/checks/tables/td-headers-attr-evaluate.js');16170 -1 var _checks_tables_th_has_data_cells_evaluate__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__('./lib/checks/tables/th-has-data-cells-evaluate.js');16171 -1 var _checks_visibility_hidden_content_evaluate__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__('./lib/checks/visibility/hidden-content-evaluate.js');16172 -1 var _checks_color_color_contrast_evaluate__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__('./lib/checks/color/color-contrast-evaluate.js');16173 -1 var _checks_color_link_in_text_block_evaluate__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__('./lib/checks/color/link-in-text-block-evaluate.js');16174 -1 var _checks_forms_autocomplete_appropriate_evaluate__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__('./lib/checks/forms/autocomplete-appropriate-evaluate.js');16175 -1 var _checks_forms_autocomplete_valid_evaluate__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__('./lib/checks/forms/autocomplete-valid-evaluate.js');16176 -1 var _checks_generic_attr_non_space_content_evaluate__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__('./lib/checks/generic/attr-non-space-content-evaluate.js');16177 -1 var _checks_generic_has_descendant_after__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__('./lib/checks/generic/has-descendant-after.js');16178 -1 var _checks_generic_has_descendant_evaluate__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__('./lib/checks/generic/has-descendant-evaluate.js');16179 -1 var _checks_generic_has_text_content_evaluate__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__('./lib/checks/generic/has-text-content-evaluate.js');16180 -1 var _checks_generic_matches_definition_evaluate__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__('./lib/checks/generic/matches-definition-evaluate.js');16181 -1 var _checks_generic_page_no_duplicate_after__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__('./lib/checks/generic/page-no-duplicate-after.js');16182 -1 var _checks_generic_page_no_duplicate_evaluate__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__('./lib/checks/generic/page-no-duplicate-evaluate.js');16183 -1 var _checks_navigation_heading_order_after__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__('./lib/checks/navigation/heading-order-after.js');16184 -1 var _checks_navigation_heading_order_evaluate__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__('./lib/checks/navigation/heading-order-evaluate.js');16185 -1 var _checks_navigation_identical_links_same_purpose_after__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__('./lib/checks/navigation/identical-links-same-purpose-after.js');16186 -1 var _checks_navigation_identical_links_same_purpose_evaluate__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__('./lib/checks/navigation/identical-links-same-purpose-evaluate.js');16187 -1 var _checks_navigation_internal_link_present_evaluate__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__('./lib/checks/navigation/internal-link-present-evaluate.js');16188 -1 var _checks_navigation_meta_refresh_evaluate__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__('./lib/checks/navigation/meta-refresh-evaluate.js');16189 -1 var _checks_navigation_p_as_heading_evaluate__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__('./lib/checks/navigation/p-as-heading-evaluate.js');16190 -1 var _checks_navigation_region_evaluate__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__('./lib/checks/navigation/region-evaluate.js');16191 -1 var _checks_navigation_skip_link_evaluate__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__('./lib/checks/navigation/skip-link-evaluate.js');16192 -1 var _checks_navigation_unique_frame_title_after__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__('./lib/checks/navigation/unique-frame-title-after.js');16193 -1 var _checks_navigation_unique_frame_title_evaluate__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__('./lib/checks/navigation/unique-frame-title-evaluate.js');16194 -1 var _checks_shared_aria_label_evaluate__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__('./lib/checks/shared/aria-label-evaluate.js');16195 -1 var _checks_shared_aria_labelledby_evaluate__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__('./lib/checks/shared/aria-labelledby-evaluate.js');16196 -1 var _checks_shared_avoid_inline_spacing_evaluate__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__('./lib/checks/shared/avoid-inline-spacing-evaluate.js');16197 -1 var _checks_shared_doc_has_title_evaluate__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__('./lib/checks/shared/doc-has-title-evaluate.js');16198 -1 var _checks_shared_exists_evaluate__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__('./lib/checks/shared/exists-evaluate.js');16199 -1 var _checks_shared_has_alt_evaluate__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__('./lib/checks/shared/has-alt-evaluate.js');16200 -1 var _checks_shared_is_on_screen_evaluate__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__('./lib/checks/shared/is-on-screen-evaluate.js');16201 -1 var _checks_shared_non_empty_if_present_evaluate__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__('./lib/checks/shared/non-empty-if-present-evaluate.js');16202 -1 var _checks_shared_svg_non_empty_title_evaluate__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__('./lib/checks/shared/svg-non-empty-title-evaluate.js');16203 -1 var _checks_mobile_css_orientation_lock_evaluate__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__('./lib/checks/mobile/css-orientation-lock-evaluate.js');16204 -1 var _checks_mobile_meta_viewport_scale_evaluate__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__('./lib/checks/mobile/meta-viewport-scale-evaluate.js');16205 -1 var _checks_parsing_duplicate_id_after__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__('./lib/checks/parsing/duplicate-id-after.js');16206 -1 var _checks_parsing_duplicate_id_evaluate__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__('./lib/checks/parsing/duplicate-id-evaluate.js');16207 -1 var _checks_keyboard_accesskeys_after__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__('./lib/checks/keyboard/accesskeys-after.js');16208 -1 var _checks_keyboard_accesskeys_evaluate__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__('./lib/checks/keyboard/accesskeys-evaluate.js');16209 -1 var _checks_keyboard_focusable_content_evaluate__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__('./lib/checks/keyboard/focusable-content-evaluate.js');16210 -1 var _checks_keyboard_focusable_disabled_evaluate__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__('./lib/checks/keyboard/focusable-disabled-evaluate.js');16211 -1 var _checks_keyboard_focusable_element_evaluate__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__('./lib/checks/keyboard/focusable-element-evaluate.js');16212 -1 var _checks_keyboard_focusable_modal_open_evaluate__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__('./lib/checks/keyboard/focusable-modal-open-evaluate.js');16213 -1 var _checks_keyboard_focusable_no_name_evaluate__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__('./lib/checks/keyboard/focusable-no-name-evaluate.js');16214 -1 var _checks_keyboard_focusable_not_tabbable_evaluate__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__('./lib/checks/keyboard/focusable-not-tabbable-evaluate.js');16215 -1 var _checks_keyboard_landmark_is_top_level_evaluate__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__('./lib/checks/keyboard/landmark-is-top-level-evaluate.js');16216 -1 var _checks_keyboard_tabindex_evaluate__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__('./lib/checks/keyboard/tabindex-evaluate.js');16217 -1 var _checks_label_alt_space_value_evaluate__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__('./lib/checks/label/alt-space-value-evaluate.js');16218 -1 var _checks_label_duplicate_img_label_evaluate__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__('./lib/checks/label/duplicate-img-label-evaluate.js');16219 -1 var _checks_label_explicit_evaluate__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__('./lib/checks/label/explicit-evaluate.js');16220 -1 var _checks_label_help_same_as_label_evaluate__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__('./lib/checks/label/help-same-as-label-evaluate.js');16221 -1 var _checks_label_hidden_explicit_label_evaluate__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__('./lib/checks/label/hidden-explicit-label-evaluate.js');16222 -1 var _checks_label_implicit_evaluate__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__('./lib/checks/label/implicit-evaluate.js');16223 -1 var _checks_label_label_content_name_mismatch_evaluate__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__('./lib/checks/label/label-content-name-mismatch-evaluate.js');16224 -1 var _checks_label_multiple_label_evaluate__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__('./lib/checks/label/multiple-label-evaluate.js');16225 -1 var _checks_label_title_only_evaluate__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__('./lib/checks/label/title-only-evaluate.js');16226 -1 var _checks_landmarks_landmark_is_unique_after__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__('./lib/checks/landmarks/landmark-is-unique-after.js');16227 -1 var _checks_landmarks_landmark_is_unique_evaluate__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__('./lib/checks/landmarks/landmark-is-unique-evaluate.js');16228 -1 var _checks_language_has_lang_evaluate__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__('./lib/checks/language/has-lang-evaluate.js');16229 -1 var _checks_language_valid_lang_evaluate__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__('./lib/checks/language/valid-lang-evaluate.js');16230 -1 var _checks_language_xml_lang_mismatch_evaluate__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__('./lib/checks/language/xml-lang-mismatch-evaluate.js');16231 -1 var _checks_lists_dlitem_evaluate__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__('./lib/checks/lists/dlitem-evaluate.js');16232 -1 var _checks_lists_listitem_evaluate__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__('./lib/checks/lists/listitem-evaluate.js');16233 -1 var _checks_lists_only_dlitems_evaluate__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__('./lib/checks/lists/only-dlitems-evaluate.js');16234 -1 var _checks_lists_only_listitems_evaluate__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__('./lib/checks/lists/only-listitems-evaluate.js');16235 -1 var _checks_lists_structured_dlitems_evaluate__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__('./lib/checks/lists/structured-dlitems-evaluate.js');16236 -1 var _checks_media_caption_evaluate__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__('./lib/checks/media/caption-evaluate.js');16237 -1 var _checks_media_frame_tested_evaluate__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__('./lib/checks/media/frame-tested-evaluate.js');16238 -1 var _checks_media_no_autoplay_audio_evaluate__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__('./lib/checks/media/no-autoplay-audio-evaluate.js');16239 -1 var _rules_aria_allowed_attr_matches__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__('./lib/rules/aria-allowed-attr-matches.js');16240 -1 var _rules_aria_allowed_role_matches__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__('./lib/rules/aria-allowed-role-matches.js');16241 -1 var _rules_aria_form_field_name_matches__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__('./lib/rules/aria-form-field-name-matches.js');16242 -1 var _rules_aria_has_attr_matches__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__('./lib/rules/aria-has-attr-matches.js');16243 -1 var _rules_aria_hidden_focus_matches__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__('./lib/rules/aria-hidden-focus-matches.js');16244 -1 var _rules_autocomplete_matches__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__('./lib/rules/autocomplete-matches.js');16245 -1 var _rules_bypass_matches__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__('./lib/rules/bypass-matches.js');16246 -1 var _rules_color_contrast_matches__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__('./lib/rules/color-contrast-matches.js');16247 -1 var _rules_data_table_large_matches__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__('./lib/rules/data-table-large-matches.js');16248 -1 var _rules_data_table_matches__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__('./lib/rules/data-table-matches.js');16249 -1 var _rules_duplicate_id_active_matches__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__('./lib/rules/duplicate-id-active-matches.js');16250 -1 var _rules_duplicate_id_aria_matches__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__('./lib/rules/duplicate-id-aria-matches.js');16251 -1 var _rules_duplicate_id_misc_matches__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__('./lib/rules/duplicate-id-misc-matches.js');16252 -1 var _rules_frame_title_has_text_matches__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__('./lib/rules/frame-title-has-text-matches.js');16253 -1 var _rules_heading_matches__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__('./lib/rules/heading-matches.js');16254 -1 var _rules_html_namespace_matches__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__('./lib/rules/html-namespace-matches.js');16255 -1 var _rules_identical_links_same_purpose_matches__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__('./lib/rules/identical-links-same-purpose-matches.js');16256 -1 var _rules_inserted_into_focus_order_matches__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__('./lib/rules/inserted-into-focus-order-matches.js');16257 -1 var _rules_label_content_name_mismatch_matches__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__('./lib/rules/label-content-name-mismatch-matches.js');16258 -1 var _rules_label_matches__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__('./lib/rules/label-matches.js');16259 -1 var _rules_landmark_has_body_context_matches__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__('./lib/rules/landmark-has-body-context-matches.js');16260 -1 var _rules_landmark_unique_matches__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__('./lib/rules/landmark-unique-matches.js');16261 -1 var _rules_layout_table_matches__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__('./lib/rules/layout-table-matches.js');16262 -1 var _rules_link_in_text_block_matches__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__('./lib/rules/link-in-text-block-matches.js');16263 -1 var _rules_no_autoplay_audio_matches__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__('./lib/rules/no-autoplay-audio-matches.js');16264 -1 var _rules_no_empty_role_matches__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__('./lib/rules/no-empty-role-matches.js');16265 -1 var _rules_no_role_matches__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__('./lib/rules/no-role-matches.js');16266 -1 var _rules_not_html_matches__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__('./lib/rules/not-html-matches.js');16267 -1 var _rules_p_as_heading_matches__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__('./lib/rules/p-as-heading-matches.js');16268 -1 var _rules_scrollable_region_focusable_matches__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__('./lib/rules/scrollable-region-focusable-matches.js');16269 -1 var _rules_skip_link_matches__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__('./lib/rules/skip-link-matches.js');16270 -1 var _rules_svg_namespace_matches__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__('./lib/rules/svg-namespace-matches.js');16271 -1 var _rules_window_is_top_matches__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__('./lib/rules/window-is-top-matches.js');16272 -1 var _rules_xml_lang_mismatch_matches__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__('./lib/rules/xml-lang-mismatch-matches.js');16273 -1 var metadataFunctionMap = {16274 -1 'abstractrole-evaluate': _checks_aria_abstractrole_evaluate__WEBPACK_IMPORTED_MODULE_0__['default'],16275 -1 'aria-allowed-attr-evaluate': _checks_aria_aria_allowed_attr_evaluate__WEBPACK_IMPORTED_MODULE_1__['default'],16276 -1 'aria-allowed-role-evaluate': _checks_aria_aria_allowed_role_evaluate__WEBPACK_IMPORTED_MODULE_2__['default'],16277 -1 'aria-errormessage-evaluate': _checks_aria_aria_errormessage_evaluate__WEBPACK_IMPORTED_MODULE_3__['default'],16278 -1 'aria-hidden-body-evaluate': _checks_aria_aria_hidden_body_evaluate__WEBPACK_IMPORTED_MODULE_4__['default'],16279 -1 'aria-required-attr-evaluate': _checks_aria_aria_required_attr_evaluate__WEBPACK_IMPORTED_MODULE_5__['default'],16280 -1 'aria-required-children-evaluate': _checks_aria_aria_required_children_evaluate__WEBPACK_IMPORTED_MODULE_6__['default'],16281 -1 'aria-required-parent-evaluate': _checks_aria_aria_required_parent_evaluate__WEBPACK_IMPORTED_MODULE_7__['default'],16282 -1 'aria-roledescription-evaluate': _checks_aria_aria_roledescription_evaluate__WEBPACK_IMPORTED_MODULE_8__['default'],16283 -1 'aria-unsupported-attr-evaluate': _checks_aria_aria_unsupported_attr_evaluate__WEBPACK_IMPORTED_MODULE_9__['default'],16284 -1 'aria-valid-attr-evaluate': _checks_aria_aria_valid_attr_evaluate__WEBPACK_IMPORTED_MODULE_10__['default'],16285 -1 'aria-valid-attr-value-evaluate': _checks_aria_aria_valid_attr_value_evaluate__WEBPACK_IMPORTED_MODULE_11__['default'],16286 -1 'fallbackrole-evaluate': _checks_aria_fallbackrole_evaluate__WEBPACK_IMPORTED_MODULE_12__['default'],16287 -1 'has-widget-role-evaluate': _checks_aria_has_widget_role_evaluate__WEBPACK_IMPORTED_MODULE_13__['default'],16288 -1 'invalidrole-evaluate': _checks_aria_invalidrole_evaluate__WEBPACK_IMPORTED_MODULE_14__['default'],16289 -1 'no-implicit-explicit-label-evaluate': _checks_aria_no_implicit_explicit_label_evaluate__WEBPACK_IMPORTED_MODULE_15__['default'],16290 -1 'unsupportedrole-evaluate': _checks_aria_unsupportedrole_evaluate__WEBPACK_IMPORTED_MODULE_16__['default'],16291 -1 'valid-scrollable-semantics-evaluate': _checks_aria_valid_scrollable_semantics_evaluate__WEBPACK_IMPORTED_MODULE_17__['default'],16292 -1 'caption-faked-evaluate': _checks_tables_caption_faked_evaluate__WEBPACK_IMPORTED_MODULE_18__['default'],16293 -1 'html5-scope-evaluate': _checks_tables_html5_scope_evaluate__WEBPACK_IMPORTED_MODULE_19__['default'],16294 -1 'same-caption-summary-evaluate': _checks_tables_same_caption_summary_evaluate__WEBPACK_IMPORTED_MODULE_20__['default'],16295 -1 'scope-value-evaluate': _checks_tables_scope_value_evaluate__WEBPACK_IMPORTED_MODULE_21__['default'],16296 -1 'td-has-header-evaluate': _checks_tables_td_has_header_evaluate__WEBPACK_IMPORTED_MODULE_22__['default'],16297 -1 'td-headers-attr-evaluate': _checks_tables_td_headers_attr_evaluate__WEBPACK_IMPORTED_MODULE_23__['default'],16298 -1 'th-has-data-cells-evaluate': _checks_tables_th_has_data_cells_evaluate__WEBPACK_IMPORTED_MODULE_24__['default'],16299 -1 'hidden-content-evaluate': _checks_visibility_hidden_content_evaluate__WEBPACK_IMPORTED_MODULE_25__['default'],16300 -1 'color-contrast-evaluate': _checks_color_color_contrast_evaluate__WEBPACK_IMPORTED_MODULE_26__['default'],16301 -1 'link-in-text-block-evaluate': _checks_color_link_in_text_block_evaluate__WEBPACK_IMPORTED_MODULE_27__['default'],16302 -1 'autocomplete-appropriate-evaluate': _checks_forms_autocomplete_appropriate_evaluate__WEBPACK_IMPORTED_MODULE_28__['default'],16303 -1 'autocomplete-valid-evaluate': _checks_forms_autocomplete_valid_evaluate__WEBPACK_IMPORTED_MODULE_29__['default'],16304 -1 'attr-non-space-content-evaluate': _checks_generic_attr_non_space_content_evaluate__WEBPACK_IMPORTED_MODULE_30__['default'],16305 -1 'has-descendant-after': _checks_generic_has_descendant_after__WEBPACK_IMPORTED_MODULE_31__['default'],16306 -1 'has-descendant-evaluate': _checks_generic_has_descendant_evaluate__WEBPACK_IMPORTED_MODULE_32__['default'],16307 -1 'has-text-content-evaluate': _checks_generic_has_text_content_evaluate__WEBPACK_IMPORTED_MODULE_33__['default'],16308 -1 'matches-definition-evaluate': _checks_generic_matches_definition_evaluate__WEBPACK_IMPORTED_MODULE_34__['default'],16309 -1 'page-no-duplicate-after': _checks_generic_page_no_duplicate_after__WEBPACK_IMPORTED_MODULE_35__['default'],16310 -1 'page-no-duplicate-evaluate': _checks_generic_page_no_duplicate_evaluate__WEBPACK_IMPORTED_MODULE_36__['default'],16311 -1 'heading-order-after': _checks_navigation_heading_order_after__WEBPACK_IMPORTED_MODULE_37__['default'],16312 -1 'heading-order-evaluate': _checks_navigation_heading_order_evaluate__WEBPACK_IMPORTED_MODULE_38__['default'],16313 -1 'identical-links-same-purpose-after': _checks_navigation_identical_links_same_purpose_after__WEBPACK_IMPORTED_MODULE_39__['default'],16314 -1 'identical-links-same-purpose-evaluate': _checks_navigation_identical_links_same_purpose_evaluate__WEBPACK_IMPORTED_MODULE_40__['default'],16315 -1 'internal-link-present-evaluate': _checks_navigation_internal_link_present_evaluate__WEBPACK_IMPORTED_MODULE_41__['default'],16316 -1 'meta-refresh-evaluate': _checks_navigation_meta_refresh_evaluate__WEBPACK_IMPORTED_MODULE_42__['default'],16317 -1 'p-as-heading-evaluate': _checks_navigation_p_as_heading_evaluate__WEBPACK_IMPORTED_MODULE_43__['default'],16318 -1 'region-evaluate': _checks_navigation_region_evaluate__WEBPACK_IMPORTED_MODULE_44__['default'],16319 -1 'skip-link-evaluate': _checks_navigation_skip_link_evaluate__WEBPACK_IMPORTED_MODULE_45__['default'],16320 -1 'unique-frame-title-after': _checks_navigation_unique_frame_title_after__WEBPACK_IMPORTED_MODULE_46__['default'],16321 -1 'unique-frame-title-evaluate': _checks_navigation_unique_frame_title_evaluate__WEBPACK_IMPORTED_MODULE_47__['default'],16322 -1 'aria-label-evaluate': _checks_shared_aria_label_evaluate__WEBPACK_IMPORTED_MODULE_48__['default'],16323 -1 'aria-labelledby-evaluate': _checks_shared_aria_labelledby_evaluate__WEBPACK_IMPORTED_MODULE_49__['default'],16324 -1 'avoid-inline-spacing-evaluate': _checks_shared_avoid_inline_spacing_evaluate__WEBPACK_IMPORTED_MODULE_50__['default'],16325 -1 'doc-has-title-evaluate': _checks_shared_doc_has_title_evaluate__WEBPACK_IMPORTED_MODULE_51__['default'],16326 -1 'exists-evaluate': _checks_shared_exists_evaluate__WEBPACK_IMPORTED_MODULE_52__['default'],16327 -1 'has-alt-evaluate': _checks_shared_has_alt_evaluate__WEBPACK_IMPORTED_MODULE_53__['default'],16328 -1 'is-on-screen-evaluate': _checks_shared_is_on_screen_evaluate__WEBPACK_IMPORTED_MODULE_54__['default'],16329 -1 'non-empty-if-present-evaluate': _checks_shared_non_empty_if_present_evaluate__WEBPACK_IMPORTED_MODULE_55__['default'],16330 -1 'svg-non-empty-title-evaluate': _checks_shared_svg_non_empty_title_evaluate__WEBPACK_IMPORTED_MODULE_56__['default'],16331 -1 'css-orientation-lock-evaluate': _checks_mobile_css_orientation_lock_evaluate__WEBPACK_IMPORTED_MODULE_57__['default'],16332 -1 'meta-viewport-scale-evaluate': _checks_mobile_meta_viewport_scale_evaluate__WEBPACK_IMPORTED_MODULE_58__['default'],16333 -1 'duplicate-id-after': _checks_parsing_duplicate_id_after__WEBPACK_IMPORTED_MODULE_59__['default'],16334 -1 'duplicate-id-evaluate': _checks_parsing_duplicate_id_evaluate__WEBPACK_IMPORTED_MODULE_60__['default'],16335 -1 'accesskeys-after': _checks_keyboard_accesskeys_after__WEBPACK_IMPORTED_MODULE_61__['default'],16336 -1 'accesskeys-evaluate': _checks_keyboard_accesskeys_evaluate__WEBPACK_IMPORTED_MODULE_62__['default'],16337 -1 'focusable-content-evaluate': _checks_keyboard_focusable_content_evaluate__WEBPACK_IMPORTED_MODULE_63__['default'],16338 -1 'focusable-disabled-evaluate': _checks_keyboard_focusable_disabled_evaluate__WEBPACK_IMPORTED_MODULE_64__['default'],16339 -1 'focusable-element-evaluate': _checks_keyboard_focusable_element_evaluate__WEBPACK_IMPORTED_MODULE_65__['default'],16340 -1 'focusable-modal-open-evaluate': _checks_keyboard_focusable_modal_open_evaluate__WEBPACK_IMPORTED_MODULE_66__['default'],16341 -1 'focusable-no-name-evaluate': _checks_keyboard_focusable_no_name_evaluate__WEBPACK_IMPORTED_MODULE_67__['default'],16342 -1 'focusable-not-tabbable-evaluate': _checks_keyboard_focusable_not_tabbable_evaluate__WEBPACK_IMPORTED_MODULE_68__['default'],16343 -1 'landmark-is-top-level-evaluate': _checks_keyboard_landmark_is_top_level_evaluate__WEBPACK_IMPORTED_MODULE_69__['default'],16344 -1 'tabindex-evaluate': _checks_keyboard_tabindex_evaluate__WEBPACK_IMPORTED_MODULE_70__['default'],16345 -1 'alt-space-value-evaluate': _checks_label_alt_space_value_evaluate__WEBPACK_IMPORTED_MODULE_71__['default'],16346 -1 'duplicate-img-label-evaluate': _checks_label_duplicate_img_label_evaluate__WEBPACK_IMPORTED_MODULE_72__['default'],16347 -1 'explicit-evaluate': _checks_label_explicit_evaluate__WEBPACK_IMPORTED_MODULE_73__['default'],16348 -1 'help-same-as-label-evaluate': _checks_label_help_same_as_label_evaluate__WEBPACK_IMPORTED_MODULE_74__['default'],16349 -1 'hidden-explicit-label-evaluate': _checks_label_hidden_explicit_label_evaluate__WEBPACK_IMPORTED_MODULE_75__['default'],16350 -1 'implicit-evaluate': _checks_label_implicit_evaluate__WEBPACK_IMPORTED_MODULE_76__['default'],16351 -1 'label-content-name-mismatch-evaluate': _checks_label_label_content_name_mismatch_evaluate__WEBPACK_IMPORTED_MODULE_77__['default'],16352 -1 'multiple-label-evaluate': _checks_label_multiple_label_evaluate__WEBPACK_IMPORTED_MODULE_78__['default'],16353 -1 'title-only-evaluate': _checks_label_title_only_evaluate__WEBPACK_IMPORTED_MODULE_79__['default'],16354 -1 'landmark-is-unique-after': _checks_landmarks_landmark_is_unique_after__WEBPACK_IMPORTED_MODULE_80__['default'],16355 -1 'landmark-is-unique-evaluate': _checks_landmarks_landmark_is_unique_evaluate__WEBPACK_IMPORTED_MODULE_81__['default'],16356 -1 'has-lang-evaluate': _checks_language_has_lang_evaluate__WEBPACK_IMPORTED_MODULE_82__['default'],16357 -1 'valid-lang-evaluate': _checks_language_valid_lang_evaluate__WEBPACK_IMPORTED_MODULE_83__['default'],16358 -1 'xml-lang-mismatch-evaluate': _checks_language_xml_lang_mismatch_evaluate__WEBPACK_IMPORTED_MODULE_84__['default'],16359 -1 'dlitem-evaluate': _checks_lists_dlitem_evaluate__WEBPACK_IMPORTED_MODULE_85__['default'],16360 -1 'listitem-evaluate': _checks_lists_listitem_evaluate__WEBPACK_IMPORTED_MODULE_86__['default'],16361 -1 'only-dlitems-evaluate': _checks_lists_only_dlitems_evaluate__WEBPACK_IMPORTED_MODULE_87__['default'],16362 -1 'only-listitems-evaluate': _checks_lists_only_listitems_evaluate__WEBPACK_IMPORTED_MODULE_88__['default'],16363 -1 'structured-dlitems-evaluate': _checks_lists_structured_dlitems_evaluate__WEBPACK_IMPORTED_MODULE_89__['default'],16364 -1 'caption-evaluate': _checks_media_caption_evaluate__WEBPACK_IMPORTED_MODULE_90__['default'],16365 -1 'frame-tested-evaluate': _checks_media_frame_tested_evaluate__WEBPACK_IMPORTED_MODULE_91__['default'],16366 -1 'no-autoplay-audio-evaluate': _checks_media_no_autoplay_audio_evaluate__WEBPACK_IMPORTED_MODULE_92__['default'],16367 -1 'aria-allowed-attr-matches': _rules_aria_allowed_attr_matches__WEBPACK_IMPORTED_MODULE_93__['default'],16368 -1 'aria-allowed-role-matches': _rules_aria_allowed_role_matches__WEBPACK_IMPORTED_MODULE_94__['default'],16369 -1 'aria-form-field-name-matches': _rules_aria_form_field_name_matches__WEBPACK_IMPORTED_MODULE_95__['default'],16370 -1 'aria-has-attr-matches': _rules_aria_has_attr_matches__WEBPACK_IMPORTED_MODULE_96__['default'],16371 -1 'aria-hidden-focus-matches': _rules_aria_hidden_focus_matches__WEBPACK_IMPORTED_MODULE_97__['default'],16372 -1 'autocomplete-matches': _rules_autocomplete_matches__WEBPACK_IMPORTED_MODULE_98__['default'],16373 -1 'bypass-matches': _rules_bypass_matches__WEBPACK_IMPORTED_MODULE_99__['default'],16374 -1 'color-contrast-matches': _rules_color_contrast_matches__WEBPACK_IMPORTED_MODULE_100__['default'],16375 -1 'data-table-large-matches': _rules_data_table_large_matches__WEBPACK_IMPORTED_MODULE_101__['default'],16376 -1 'data-table-matches': _rules_data_table_matches__WEBPACK_IMPORTED_MODULE_102__['default'],16377 -1 'duplicate-id-active-matches': _rules_duplicate_id_active_matches__WEBPACK_IMPORTED_MODULE_103__['default'],16378 -1 'duplicate-id-aria-matches': _rules_duplicate_id_aria_matches__WEBPACK_IMPORTED_MODULE_104__['default'],16379 -1 'duplicate-id-misc-matches': _rules_duplicate_id_misc_matches__WEBPACK_IMPORTED_MODULE_105__['default'],16380 -1 'frame-title-has-text-matches': _rules_frame_title_has_text_matches__WEBPACK_IMPORTED_MODULE_106__['default'],16381 -1 'heading-matches': _rules_heading_matches__WEBPACK_IMPORTED_MODULE_107__['default'],16382 -1 'html-namespace-matches': _rules_html_namespace_matches__WEBPACK_IMPORTED_MODULE_108__['default'],16383 -1 'identical-links-same-purpose-matches': _rules_identical_links_same_purpose_matches__WEBPACK_IMPORTED_MODULE_109__['default'],16384 -1 'inserted-into-focus-order-matches': _rules_inserted_into_focus_order_matches__WEBPACK_IMPORTED_MODULE_110__['default'],16385 -1 'label-content-name-mismatch-matches': _rules_label_content_name_mismatch_matches__WEBPACK_IMPORTED_MODULE_111__['default'],16386 -1 'label-matches': _rules_label_matches__WEBPACK_IMPORTED_MODULE_112__['default'],16387 -1 'landmark-has-body-context-matches': _rules_landmark_has_body_context_matches__WEBPACK_IMPORTED_MODULE_113__['default'],16388 -1 'landmark-unique-matches': _rules_landmark_unique_matches__WEBPACK_IMPORTED_MODULE_114__['default'],16389 -1 'layout-table-matches': _rules_layout_table_matches__WEBPACK_IMPORTED_MODULE_115__['default'],16390 -1 'link-in-text-block-matches': _rules_link_in_text_block_matches__WEBPACK_IMPORTED_MODULE_116__['default'],16391 -1 'no-autoplay-audio-matches': _rules_no_autoplay_audio_matches__WEBPACK_IMPORTED_MODULE_117__['default'],16392 -1 'no-empty-role-matches': _rules_no_empty_role_matches__WEBPACK_IMPORTED_MODULE_118__['default'],16393 -1 'no-role-matches': _rules_no_role_matches__WEBPACK_IMPORTED_MODULE_119__['default'],16394 -1 'not-html-matches': _rules_not_html_matches__WEBPACK_IMPORTED_MODULE_120__['default'],16395 -1 'p-as-heading-matches': _rules_p_as_heading_matches__WEBPACK_IMPORTED_MODULE_121__['default'],16396 -1 'scrollable-region-focusable-matches': _rules_scrollable_region_focusable_matches__WEBPACK_IMPORTED_MODULE_122__['default'],16397 -1 'skip-link-matches': _rules_skip_link_matches__WEBPACK_IMPORTED_MODULE_123__['default'],16398 -1 'svg-namespace-matches': _rules_svg_namespace_matches__WEBPACK_IMPORTED_MODULE_124__['default'],16399 -1 'window-is-top-matches': _rules_window_is_top_matches__WEBPACK_IMPORTED_MODULE_125__['default'],16400 -1 'xml-lang-mismatch-matches': _rules_xml_lang_mismatch_matches__WEBPACK_IMPORTED_MODULE_126__['default']16401 35414 };16402 -1 __webpack_exports__['default'] = metadataFunctionMap;16403 -1 },16404 -1 './lib/core/base/rule-result.js': function libCoreBaseRuleResultJs(module, __webpack_exports__, __webpack_require__) {-1 35415 }); -1 35416 var require_primitive_set = __commonJS(function(exports, module) { 16405 35417 'use strict';16406 -1 __webpack_require__.r(__webpack_exports__);16407 -1 var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/constants.js');16408 -1 function RuleResult(rule) {16409 -1 this.id = rule.id;16410 -1 this.result = _constants__WEBPACK_IMPORTED_MODULE_0__['default'].NA;16411 -1 this.pageLevel = rule.pageLevel;16412 -1 this.impact = null;16413 -1 this.nodes = [];16414 -1 }16415 -1 __webpack_exports__['default'] = RuleResult;16416 -1 },16417 -1 './lib/core/base/rule.js': function libCoreBaseRuleJs(module, __webpack_exports__, __webpack_require__) {-1 35418 var forEach = Array.prototype.forEach; -1 35419 var create = Object.create; -1 35420 module.exports = function(arg) { -1 35421 var set = create(null); -1 35422 forEach.call(arguments, function(name) { -1 35423 set[name] = true; -1 35424 }); -1 35425 return set; -1 35426 }; -1 35427 }); -1 35428 var require_is_callable = __commonJS(function(exports, module) { 16418 35429 'use strict';16419 -1 __webpack_require__.r(__webpack_exports__);16420 -1 var _check__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/check.js');16421 -1 var _rule_result__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/rule-result.js');16422 -1 var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');16423 -1 var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/constants.js');16424 -1 var _log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/core/log.js');16425 -1 function Rule(spec, parentAudit) {16426 -1 this._audit = parentAudit;16427 -1 this.id = spec.id;16428 -1 this.selector = spec.selector || '*';16429 -1 if (spec.impact) {16430 -1 Object(_utils__WEBPACK_IMPORTED_MODULE_2__['assert'])(_constants__WEBPACK_IMPORTED_MODULE_3__['default'].impact.includes(spec.impact), 'Impact '.concat(spec.impact, ' is not a valid impact'));16431 -1 this.impact = spec.impact;16432 -1 }16433 -1 this.excludeHidden = typeof spec.excludeHidden === 'boolean' ? spec.excludeHidden : true;16434 -1 this.enabled = typeof spec.enabled === 'boolean' ? spec.enabled : true;16435 -1 this.pageLevel = typeof spec.pageLevel === 'boolean' ? spec.pageLevel : false;16436 -1 this.reviewOnFail = typeof spec.reviewOnFail === 'boolean' ? spec.reviewOnFail : false;16437 -1 this.any = spec.any || [];16438 -1 this.all = spec.all || [];16439 -1 this.none = spec.none || [];16440 -1 this.tags = spec.tags || [];16441 -1 this.preload = spec.preload ? true : false;16442 -1 if (spec.matches) {16443 -1 this.matches = Object(_check__WEBPACK_IMPORTED_MODULE_0__['createExecutionContext'])(spec.matches);16444 -1 }16445 -1 }16446 -1 Rule.prototype.matches = function() {16447 -1 return true;-1 35430 module.exports = function(obj) { -1 35431 return typeof obj === 'function'; 16448 35432 };16449 -1 Rule.prototype.gather = function(context) {16450 -1 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};16451 -1 var markStart = 'mark_gather_start_' + this.id;16452 -1 var markEnd = 'mark_gather_end_' + this.id;16453 -1 var markHiddenStart = 'mark_isHidden_start_' + this.id;16454 -1 var markHiddenEnd = 'mark_isHidden_end_' + this.id;16455 -1 if (options.performanceTimer) {16456 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].mark(markStart);16457 -1 }16458 -1 var elements = Object(_utils__WEBPACK_IMPORTED_MODULE_2__['select'])(this.selector, context);16459 -1 if (this.excludeHidden) {16460 -1 if (options.performanceTimer) {16461 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].mark(markHiddenStart);16462 -1 }16463 -1 elements = elements.filter(function(element) {16464 -1 return !Object(_utils__WEBPACK_IMPORTED_MODULE_2__['isHidden'])(element.actualNode);16465 -1 });16466 -1 if (options.performanceTimer) {16467 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].mark(markHiddenEnd);16468 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].measure('rule_' + this.id + '#gather_axe.utils.isHidden', markHiddenStart, markHiddenEnd);-1 35433 }); -1 35434 var require_validate_stringifiable = __commonJS(function(exports, module) { -1 35435 'use strict'; -1 35436 var isCallable = require_is_callable(); -1 35437 module.exports = function(stringifiable) { -1 35438 try { -1 35439 if (stringifiable && isCallable(stringifiable.toString)) { -1 35440 return stringifiable.toString(); 16469 35441 } -1 35442 return String(stringifiable); -1 35443 } catch (e) { -1 35444 throw new TypeError('Passed argument cannot be stringifed'); 16470 35445 }16471 -1 if (options.performanceTimer) {16472 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].mark(markEnd);16473 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].measure('rule_' + this.id + '#gather', markStart, markEnd);16474 -1 }16475 -1 return elements;16476 -1 };16477 -1 Rule.prototype.runChecks = function(type, node, options, context, resolve, reject) {16478 -1 var self = this;16479 -1 var checkQueue = Object(_utils__WEBPACK_IMPORTED_MODULE_2__['queue'])();16480 -1 this[type].forEach(function(c) {16481 -1 var check = self._audit.checks[c.id || c];16482 -1 var option = Object(_utils__WEBPACK_IMPORTED_MODULE_2__['getCheckOption'])(check, self.id, options);16483 -1 checkQueue.defer(function(res, rej) {16484 -1 check.run(node, option, context, res, rej);16485 -1 });16486 -1 });16487 -1 checkQueue.then(function(results) {16488 -1 results = results.filter(function(check) {16489 -1 return check;16490 -1 });16491 -1 resolve({16492 -1 type: type,16493 -1 results: results16494 -1 });16495 -1 })['catch'](reject);16496 35446 };16497 -1 Rule.prototype.runChecksSync = function(type, node, options, context) {16498 -1 var self = this;16499 -1 var results = [];16500 -1 this[type].forEach(function(c) {16501 -1 var check = self._audit.checks[c.id || c];16502 -1 var option = Object(_utils__WEBPACK_IMPORTED_MODULE_2__['getCheckOption'])(check, self.id, options);16503 -1 results.push(check.runSync(node, option, context));16504 -1 });16505 -1 results = results.filter(function(check) {16506 -1 return check;16507 -1 });16508 -1 return {16509 -1 type: type,16510 -1 results: results16511 -1 };-1 35447 }); -1 35448 var require_validate_stringifiable_value = __commonJS(function(exports, module) { -1 35449 'use strict'; -1 35450 var ensureValue = require_valid_value(); -1 35451 var stringifiable = require_validate_stringifiable(); -1 35452 module.exports = function(value) { -1 35453 return stringifiable(ensureValue(value)); 16512 35454 };16513 -1 Rule.prototype.run = function(context) {16514 -1 var _this4 = this;16515 -1 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};16516 -1 var resolve = arguments.length > 2 ? arguments[2] : undefined;16517 -1 var reject = arguments.length > 3 ? arguments[3] : undefined;16518 -1 if (options.performanceTimer) {16519 -1 this._trackPerformance();16520 -1 }16521 -1 var q = Object(_utils__WEBPACK_IMPORTED_MODULE_2__['queue'])();16522 -1 var ruleResult = new _rule_result__WEBPACK_IMPORTED_MODULE_1__['default'](this);16523 -1 var nodes;-1 35455 }); -1 35456 var require_safe_to_string = __commonJS(function(exports, module) { -1 35457 'use strict'; -1 35458 var isCallable = require_is_callable(); -1 35459 module.exports = function(value) { 16524 35460 try {16525 -1 nodes = this.gatherAndMatchNodes(context, options);16526 -1 } catch (error) {16527 -1 reject(new SupportError({16528 -1 cause: error,16529 -1 ruleId: this.id16530 -1 }));16531 -1 return;-1 35461 if (value && isCallable(value.toString)) { -1 35462 return value.toString(); -1 35463 } -1 35464 return String(value); -1 35465 } catch (e) { -1 35466 return '<Non-coercible to string value>'; 16532 35467 }16533 -1 if (options.performanceTimer) {16534 -1 this._logGatherPerformance(nodes);16535 -1 }16536 -1 nodes.forEach(function(node) {16537 -1 q.defer(function(resolveNode, rejectNode) {16538 -1 var checkQueue = Object(_utils__WEBPACK_IMPORTED_MODULE_2__['queue'])();16539 -1 [ 'any', 'all', 'none' ].forEach(function(type) {16540 -1 checkQueue.defer(function(res, rej) {16541 -1 _this4.runChecks(type, node, options, context, res, rej);16542 -1 });16543 -1 });16544 -1 checkQueue.then(function(results) {16545 -1 var result = getResult(results);16546 -1 if (result) {16547 -1 result.node = new _utils__WEBPACK_IMPORTED_MODULE_2__['DqElement'](node.actualNode, options);16548 -1 ruleResult.nodes.push(result);16549 -1 if (_this4.reviewOnFail) {16550 -1 [ 'any', 'all' ].forEach(function(type) {16551 -1 result[type].forEach(function(checkResult) {16552 -1 if (checkResult.result === false) {16553 -1 checkResult.result = undefined;16554 -1 }16555 -1 });16556 -1 });16557 -1 result.none.forEach(function(checkResult) {16558 -1 if (checkResult.result === true) {16559 -1 checkResult.result = undefined;16560 -1 }16561 -1 });16562 -1 }16563 -1 }16564 -1 resolveNode();16565 -1 })['catch'](function(err) {16566 -1 return rejectNode(err);16567 -1 });16568 -1 });16569 -1 });16570 -1 q.defer(function(resolve) {16571 -1 return setTimeout(resolve, 0);-1 35468 }; -1 35469 }); -1 35470 var require_to_short_string_representation = __commonJS(function(exports, module) { -1 35471 'use strict'; -1 35472 var safeToString = require_safe_to_string(); -1 35473 var reNewLine = /[\n\r\u2028\u2029]/g; -1 35474 module.exports = function(value) { -1 35475 var string = safeToString(value); -1 35476 if (string.length > 100) { -1 35477 string = string.slice(0, 99) + '\u2026'; -1 35478 } -1 35479 string = string.replace(reNewLine, function(_char) { -1 35480 return JSON.stringify(_char).slice(1, -1); 16572 35481 });16573 -1 if (options.performanceTimer) {16574 -1 this._logRulePerformance();-1 35482 return string; -1 35483 }; -1 35484 }); -1 35485 var require_is_promise = __commonJS(function(exports, module) { -1 35486 module.exports = isPromise; -1 35487 module.exports['default'] = isPromise; -1 35488 function isPromise(obj) { -1 35489 return !!obj && (_typeof(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; -1 35490 } -1 35491 }); -1 35492 var require_promise = __commonJS(function() { -1 35493 'use strict'; -1 35494 var objectMap = require_map(); -1 35495 var primitiveSet = require_primitive_set(); -1 35496 var ensureString = require_validate_stringifiable_value(); -1 35497 var toShortString = require_to_short_string_representation(); -1 35498 var isPromise = require_is_promise(); -1 35499 var nextTick = require_next_tick(); -1 35500 var create = Object.create; -1 35501 var supportedModes = primitiveSet('then', 'then:finally', 'done', 'done:finally'); -1 35502 require_registered_extensions().promise = function(mode, conf) { -1 35503 var waiting = create(null), cache20 = create(null), promises = create(null); -1 35504 if (mode === true) { -1 35505 mode = null; -1 35506 } else { -1 35507 mode = ensureString(mode); -1 35508 if (!supportedModes[mode]) { -1 35509 throw new TypeError('\'' + toShortString(mode) + '\' is not valid promise mode'); -1 35510 } 16575 35511 }16576 -1 q.then(function() {16577 -1 return resolve(ruleResult);16578 -1 })['catch'](function(error) {16579 -1 return reject(error);-1 35512 conf.on('set', function(id, ignore, promise) { -1 35513 var isFailed = false; -1 35514 if (!isPromise(promise)) { -1 35515 cache20[id] = promise; -1 35516 conf.emit('setasync', id, 1); -1 35517 return; -1 35518 } -1 35519 waiting[id] = 1; -1 35520 promises[id] = promise; -1 35521 var onSuccess = function onSuccess(result) { -1 35522 var count = waiting[id]; -1 35523 if (isFailed) { -1 35524 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.'); -1 35525 } -1 35526 if (!count) { -1 35527 return; -1 35528 } -1 35529 delete waiting[id]; -1 35530 cache20[id] = result; -1 35531 conf.emit('setasync', id, count); -1 35532 }; -1 35533 var onFailure = function onFailure() { -1 35534 isFailed = true; -1 35535 if (!waiting[id]) { -1 35536 return; -1 35537 } -1 35538 delete waiting[id]; -1 35539 delete promises[id]; -1 35540 conf['delete'](id); -1 35541 }; -1 35542 var resolvedMode = mode; -1 35543 if (!resolvedMode) { -1 35544 resolvedMode = 'then'; -1 35545 } -1 35546 if (resolvedMode === 'then') { -1 35547 var nextTickFailure = function nextTickFailure() { -1 35548 nextTick(onFailure); -1 35549 }; -1 35550 promise = promise.then(function(result) { -1 35551 nextTick(onSuccess.bind(this, result)); -1 35552 }, nextTickFailure); -1 35553 if (typeof promise['finally'] === 'function') { -1 35554 promise['finally'](nextTickFailure); -1 35555 } -1 35556 } else if (resolvedMode === 'done') { -1 35557 if (typeof promise.done !== 'function') { -1 35558 throw new Error('Memoizee error: Retrieved promise does not implement \'done\' in \'done\' mode'); -1 35559 } -1 35560 promise.done(onSuccess, onFailure); -1 35561 } else if (resolvedMode === 'done:finally') { -1 35562 if (typeof promise.done !== 'function') { -1 35563 throw new Error('Memoizee error: Retrieved promise does not implement \'done\' in \'done:finally\' mode'); -1 35564 } -1 35565 if (typeof promise['finally'] !== 'function') { -1 35566 throw new Error('Memoizee error: Retrieved promise does not implement \'finally\' in \'done:finally\' mode'); -1 35567 } -1 35568 promise.done(onSuccess); -1 35569 promise['finally'](onFailure); -1 35570 } 16580 35571 });16581 -1 };16582 -1 Rule.prototype.runSync = function(context) {16583 -1 var _this5 = this;16584 -1 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};16585 -1 if (options.performanceTimer) {16586 -1 this._trackPerformance();16587 -1 }16588 -1 var ruleResult = new _rule_result__WEBPACK_IMPORTED_MODULE_1__['default'](this);16589 -1 var nodes;16590 -1 try {16591 -1 nodes = this.gatherAndMatchNodes(context, options);16592 -1 } catch (error) {16593 -1 throw new SupportError({16594 -1 cause: error,16595 -1 ruleId: this.id16596 -1 });16597 -1 }16598 -1 if (options.performanceTimer) {16599 -1 this._logGatherPerformance(nodes);16600 -1 }16601 -1 nodes.forEach(function(node) {16602 -1 var results = [];16603 -1 [ 'any', 'all', 'none' ].forEach(function(type) {16604 -1 results.push(_this5.runChecksSync(type, node, options, context));16605 -1 });16606 -1 var result = getResult(results);16607 -1 if (result) {16608 -1 result.node = node.actualNode ? new _utils__WEBPACK_IMPORTED_MODULE_2__['DqElement'](node.actualNode, options) : null;16609 -1 ruleResult.nodes.push(result);16610 -1 if (_this5.reviewOnFail) {16611 -1 [ 'any', 'all' ].forEach(function(type) {16612 -1 result[type].forEach(function(checkResult) {16613 -1 if (checkResult.result === false) {16614 -1 checkResult.result = undefined;16615 -1 }16616 -1 });16617 -1 });16618 -1 result.none.forEach(function(checkResult) {16619 -1 if (checkResult.result === true) {16620 -1 checkResult.result = undefined;16621 -1 }-1 35572 conf.on('get', function(id, args, context3) { -1 35573 var promise; -1 35574 if (waiting[id]) { -1 35575 ++waiting[id]; -1 35576 return; -1 35577 } -1 35578 promise = promises[id]; -1 35579 var emit = function emit() { -1 35580 conf.emit('getasync', id, args, context3); -1 35581 }; -1 35582 if (isPromise(promise)) { -1 35583 if (typeof promise.done === 'function') { -1 35584 promise.done(emit); -1 35585 } else { -1 35586 promise.then(function() { -1 35587 nextTick(emit); 16622 35588 }); 16623 35589 } -1 35590 } else { -1 35591 emit(); 16624 35592 } 16625 35593 });16626 -1 if (options.performanceTimer) {16627 -1 this._logRulePerformance();16628 -1 }16629 -1 return ruleResult;16630 -1 };16631 -1 Rule.prototype._trackPerformance = function() {16632 -1 this._markStart = 'mark_rule_start_' + this.id;16633 -1 this._markEnd = 'mark_rule_end_' + this.id;16634 -1 this._markChecksStart = 'mark_runchecks_start_' + this.id;16635 -1 this._markChecksEnd = 'mark_runchecks_end_' + this.id;16636 -1 };16637 -1 Rule.prototype._logGatherPerformance = function(nodes) {16638 -1 Object(_log__WEBPACK_IMPORTED_MODULE_4__['default'])('gather (', nodes.length, '):', _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].timeElapsed() + 'ms');16639 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].mark(this._markChecksStart);16640 -1 };16641 -1 Rule.prototype._logRulePerformance = function() {16642 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].mark(this._markChecksEnd);16643 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].mark(this._markEnd);16644 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].measure('runchecks_' + this.id, this._markChecksStart, this._markChecksEnd);16645 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].measure('rule_' + this.id, this._markStart, this._markEnd);16646 -1 };16647 -1 function getResult(results) {16648 -1 if (results.length) {16649 -1 var hasResults = false, result = {};16650 -1 results.forEach(function(r) {16651 -1 var res = r.results.filter(function(result) {16652 -1 return result;16653 -1 });16654 -1 result[r.type] = res;16655 -1 if (res.length) {16656 -1 hasResults = true;16657 -1 }16658 -1 });16659 -1 if (hasResults) {16660 -1 return result;-1 35594 conf.on('delete', function(id) { -1 35595 delete promises[id]; -1 35596 if (waiting[id]) { -1 35597 delete waiting[id]; -1 35598 return; 16661 35599 }16662 -1 return null;16663 -1 }16664 -1 }16665 -1 Rule.prototype.gatherAndMatchNodes = function(context, options) {16666 -1 var _this6 = this;16667 -1 var markMatchesStart = 'mark_matches_start_' + this.id;16668 -1 var markMatchesEnd = 'mark_matches_end_' + this.id;16669 -1 var nodes = this.gather(context, options);16670 -1 if (options.performanceTimer) {16671 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].mark(markMatchesStart);16672 -1 }16673 -1 nodes = nodes.filter(function(node) {16674 -1 return _this6.matches(node.actualNode, node, context);-1 35600 if (!hasOwnProperty.call(cache20, id)) { -1 35601 return; -1 35602 } -1 35603 var result = cache20[id]; -1 35604 delete cache20[id]; -1 35605 conf.emit('deleteasync', id, [ result ]); -1 35606 }); -1 35607 conf.on('clear', function() { -1 35608 var oldCache = cache20; -1 35609 cache20 = create(null); -1 35610 waiting = create(null); -1 35611 promises = create(null); -1 35612 conf.emit('clearasync', objectMap(oldCache, function(data2) { -1 35613 return [ data2 ]; -1 35614 })); 16675 35615 });16676 -1 if (options.performanceTimer) {16677 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].mark(markMatchesEnd);16678 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].measure('rule_' + this.id + '#matches', markMatchesStart, markMatchesEnd);16679 -1 }16680 -1 return nodes;16681 35616 };16682 -1 function findAfterChecks(rule) {16683 -1 return Object(_utils__WEBPACK_IMPORTED_MODULE_2__['getAllChecks'])(rule).map(function(c) {16684 -1 var check = rule._audit.checks[c.id || c];16685 -1 return check && typeof check.after === 'function' ? check : null;16686 -1 }).filter(Boolean);16687 -1 }16688 -1 function findCheckResults(nodes, checkID) {16689 -1 var checkResults = [];16690 -1 nodes.forEach(function(nodeResult) {16691 -1 var checks = Object(_utils__WEBPACK_IMPORTED_MODULE_2__['getAllChecks'])(nodeResult);16692 -1 checks.forEach(function(checkResult) {16693 -1 if (checkResult.id === checkID) {16694 -1 checkResults.push(checkResult);16695 -1 }-1 35617 }); -1 35618 var require_dispose = __commonJS(function() { -1 35619 'use strict'; -1 35620 var callable = require_valid_callable(); -1 35621 var forEach = require_for_each(); -1 35622 var extensions = require_registered_extensions(); -1 35623 var apply = Function.prototype.apply; -1 35624 extensions.dispose = function(dispose, conf, options) { -1 35625 var del; -1 35626 callable(dispose); -1 35627 if (options.async && extensions.async || options.promise && extensions.promise) { -1 35628 conf.on('deleteasync', del = function del(id, resultArray) { -1 35629 apply.call(dispose, null, resultArray); 16696 35630 });16697 -1 });16698 -1 return checkResults;16699 -1 }16700 -1 function filterChecks(checks) {16701 -1 return checks.filter(function(check) {16702 -1 return check.filtered !== true;16703 -1 });16704 -1 }16705 -1 function sanitizeNodes(result) {16706 -1 var checkTypes = [ 'any', 'all', 'none' ];16707 -1 var nodes = result.nodes.filter(function(detail) {16708 -1 var length = 0;16709 -1 checkTypes.forEach(function(type) {16710 -1 detail[type] = filterChecks(detail[type]);16711 -1 length += detail[type].length;-1 35631 conf.on('clearasync', function(cache20) { -1 35632 forEach(cache20, function(result, id) { -1 35633 del(id, result); -1 35634 }); 16712 35635 });16713 -1 return length > 0;16714 -1 });16715 -1 if (result.pageLevel && nodes.length) {16716 -1 nodes = [ nodes.reduce(function(a, b) {16717 -1 if (a) {16718 -1 checkTypes.forEach(function(type) {16719 -1 a[type].push.apply(a[type], b[type]);16720 -1 });16721 -1 return a;16722 -1 }16723 -1 }) ];-1 35636 return; 16724 35637 }16725 -1 return nodes;16726 -1 }16727 -1 Rule.prototype.after = function(result, options) {16728 -1 var afterChecks = findAfterChecks(this);16729 -1 var ruleID = this.id;16730 -1 afterChecks.forEach(function(check) {16731 -1 var beforeResults = findCheckResults(result.nodes, check.id);16732 -1 var option = Object(_utils__WEBPACK_IMPORTED_MODULE_2__['getCheckOption'])(check, ruleID, options);16733 -1 var afterResults = check.after(beforeResults, option);16734 -1 beforeResults.forEach(function(item) {16735 -1 if (afterResults.indexOf(item) === -1) {16736 -1 item.filtered = true;16737 -1 }-1 35638 conf.on('delete', del = function del(id, result) { -1 35639 dispose(result); -1 35640 }); -1 35641 conf.on('clear', function(cache20) { -1 35642 forEach(cache20, function(result, id) { -1 35643 del(id, result); 16738 35644 }); 16739 35645 });16740 -1 result.nodes = sanitizeNodes(result);16741 -1 return result;16742 35646 };16743 -1 Rule.prototype.configure = function(spec) {16744 -1 if (spec.hasOwnProperty('selector')) {16745 -1 this.selector = spec.selector;16746 -1 }16747 -1 if (spec.hasOwnProperty('excludeHidden')) {16748 -1 this.excludeHidden = typeof spec.excludeHidden === 'boolean' ? spec.excludeHidden : true;16749 -1 }16750 -1 if (spec.hasOwnProperty('enabled')) {16751 -1 this.enabled = typeof spec.enabled === 'boolean' ? spec.enabled : true;16752 -1 }16753 -1 if (spec.hasOwnProperty('pageLevel')) {16754 -1 this.pageLevel = typeof spec.pageLevel === 'boolean' ? spec.pageLevel : false;16755 -1 }16756 -1 if (spec.hasOwnProperty('reviewOnFail')) {16757 -1 this.reviewOnFail = typeof spec.reviewOnFail === 'boolean' ? spec.reviewOnFail : false;16758 -1 }16759 -1 if (spec.hasOwnProperty('any')) {16760 -1 this.any = spec.any;16761 -1 }16762 -1 if (spec.hasOwnProperty('all')) {16763 -1 this.all = spec.all;16764 -1 }16765 -1 if (spec.hasOwnProperty('none')) {16766 -1 this.none = spec.none;16767 -1 }16768 -1 if (spec.hasOwnProperty('tags')) {16769 -1 this.tags = spec.tags;16770 -1 }16771 -1 if (spec.hasOwnProperty('matches')) {16772 -1 this.matches = Object(_check__WEBPACK_IMPORTED_MODULE_0__['createExecutionContext'])(spec.matches);16773 -1 }16774 -1 if (spec.impact) {16775 -1 Object(_utils__WEBPACK_IMPORTED_MODULE_2__['assert'])(_constants__WEBPACK_IMPORTED_MODULE_3__['default'].impact.includes(spec.impact), 'Impact '.concat(spec.impact, ' is not a valid impact'));16776 -1 this.impact = spec.impact;16777 -1 }16778 -1 };16779 -1 __webpack_exports__['default'] = Rule;16780 -1 },16781 -1 './lib/core/base/virtual-node/abstract-virtual-node.js': function libCoreBaseVirtualNodeAbstractVirtualNodeJs(module, __webpack_exports__, __webpack_require__) {-1 35647 }); -1 35648 var require_max_timeout = __commonJS(function(exports, module) { 16782 35649 'use strict';16783 -1 __webpack_require__.r(__webpack_exports__);16784 -1 var whitespaceRegex = /[\t\r\n\f]/g;16785 -1 var AbstractVirtualNode = function() {16786 -1 function AbstractVirtualNode() {16787 -1 _classCallCheck(this, AbstractVirtualNode);16788 -1 this.parent = undefined;16789 -1 }16790 -1 _createClass(AbstractVirtualNode, [ {16791 -1 key: 'attr',16792 -1 value: function attr() {16793 -1 throw new Error('VirtualNode class must have a "attr" function');16794 -1 }16795 -1 }, {16796 -1 key: 'hasAttr',16797 -1 value: function hasAttr() {16798 -1 throw new Error('VirtualNode class must have a "hasAttr" function');16799 -1 }16800 -1 }, {16801 -1 key: 'hasClass',16802 -1 value: function hasClass(className) {16803 -1 var classAttr = this.attr('class');16804 -1 if (!classAttr) {16805 -1 return false;16806 -1 }16807 -1 var selector = ' ' + className + ' ';16808 -1 return (' ' + classAttr + ' ').replace(whitespaceRegex, ' ').indexOf(selector) >= 0;16809 -1 }16810 -1 }, {16811 -1 key: 'props',16812 -1 get: function get() {16813 -1 throw new Error('VirtualNode class must have a "props" object consisting ' + 'of "nodeType" and "nodeName" properties');16814 -1 }16815 -1 } ]);16816 -1 return AbstractVirtualNode;16817 -1 }();16818 -1 __webpack_exports__['default'] = AbstractVirtualNode;16819 -1 },16820 -1 './lib/core/base/virtual-node/serial-virtual-node.js': function libCoreBaseVirtualNodeSerialVirtualNodeJs(module, __webpack_exports__, __webpack_require__) {-1 35650 module.exports = 2147483647; -1 35651 }); -1 35652 var require_valid_timeout = __commonJS(function(exports, module) { 16821 35653 'use strict';16822 -1 __webpack_require__.r(__webpack_exports__);16823 -1 var _abstract_virtual_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');16824 -1 var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');16825 -1 var SerialVirtualNode = function(_abstract_virtual_nod) {16826 -1 _inherits(SerialVirtualNode, _abstract_virtual_nod);16827 -1 var _super = _createSuper(SerialVirtualNode);16828 -1 function SerialVirtualNode(serialNode) {16829 -1 var _this7;16830 -1 _classCallCheck(this, SerialVirtualNode);16831 -1 _this7 = _super.call(this);16832 -1 _this7._props = normaliseProps(serialNode);16833 -1 _this7._attrs = normaliseAttrs(serialNode);16834 -1 return _this7;16835 -1 }16836 -1 _createClass(SerialVirtualNode, [ {16837 -1 key: 'attr',16838 -1 value: function attr(attrName) {16839 -1 return this._attrs[attrName] || null;16840 -1 }16841 -1 }, {16842 -1 key: 'hasAttr',16843 -1 value: function hasAttr(attrName) {16844 -1 return this._attrs[attrName] !== undefined;16845 -1 }16846 -1 }, {16847 -1 key: 'props',16848 -1 get: function get() {16849 -1 return this._props;16850 -1 }16851 -1 } ]);16852 -1 return SerialVirtualNode;16853 -1 }(_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_0__['default']);16854 -1 function normaliseProps(serialNode) {16855 -1 var nodeName = serialNode.nodeName, _serialNode$nodeType = serialNode.nodeType, nodeType = _serialNode$nodeType === void 0 ? 1 : _serialNode$nodeType;16856 -1 Object(_utils__WEBPACK_IMPORTED_MODULE_1__['assert'])(typeof nodeType === 'number', 'nodeType has to be a number, got \''.concat(nodeType, '\''));16857 -1 Object(_utils__WEBPACK_IMPORTED_MODULE_1__['assert'])(typeof nodeName === 'string', 'nodeName has to be a string, got \''.concat(nodeName, '\''));16858 -1 nodeName = nodeName.toLowerCase();16859 -1 var type = null;16860 -1 if (nodeName === 'input') {16861 -1 type = (serialNode.type || serialNode.attributes && serialNode.attributes.type || '').toLowerCase();16862 -1 if (!Object(_utils__WEBPACK_IMPORTED_MODULE_1__['validInputTypes'])().includes(type)) {16863 -1 type = 'text';16864 -1 }-1 35654 var toPosInt = require_to_pos_integer(); -1 35655 var maxTimeout = require_max_timeout(); -1 35656 module.exports = function(value) { -1 35657 value = toPosInt(value); -1 35658 if (value > maxTimeout) { -1 35659 throw new TypeError(value + ' exceeds maximum possible timeout'); 16865 35660 }16866 -1 var props = _extends({}, serialNode, {16867 -1 nodeType: nodeType,16868 -1 nodeName: nodeName16869 -1 });16870 -1 if (type) {16871 -1 props.type = type;-1 35661 return value; -1 35662 }; -1 35663 }); -1 35664 var require_max_age = __commonJS(function() { -1 35665 'use strict'; -1 35666 var aFrom = require_from(); -1 35667 var forEach = require_for_each(); -1 35668 var nextTick = require_next_tick(); -1 35669 var isPromise = require_is_promise(); -1 35670 var timeout = require_valid_timeout(); -1 35671 var extensions = require_registered_extensions(); -1 35672 var noop4 = Function.prototype; -1 35673 var max = Math.max; -1 35674 var min = Math.min; -1 35675 var create = Object.create; -1 35676 extensions.maxAge = function(maxAge, conf, options) { -1 35677 var timeouts, postfix, preFetchAge, preFetchTimeouts; -1 35678 maxAge = timeout(maxAge); -1 35679 if (!maxAge) { -1 35680 return; 16872 35681 }16873 -1 delete props.attributes;16874 -1 return Object.freeze(props);16875 -1 }16876 -1 function normaliseAttrs(_ref54) {16877 -1 var _ref54$attributes = _ref54.attributes, attributes = _ref54$attributes === void 0 ? {} : _ref54$attributes;16878 -1 var attrMap = {16879 -1 htmlFor: 'for',16880 -1 className: 'class'16881 -1 };16882 -1 return Object.keys(attributes).reduce(function(attrs, attrName) {16883 -1 var value = attributes[attrName];16884 -1 Object(_utils__WEBPACK_IMPORTED_MODULE_1__['assert'])(_typeof(value) !== 'object' || value === null, 'expects attributes not to be an object, \''.concat(attrName, '\' was'));16885 -1 if (value !== undefined) {16886 -1 var mappedName = attrMap[attrName] || attrName;16887 -1 attrs[mappedName] = value !== null ? String(value) : null;16888 -1 }16889 -1 return attrs;16890 -1 }, {});16891 -1 }16892 -1 __webpack_exports__['default'] = SerialVirtualNode;16893 -1 },16894 -1 './lib/core/base/virtual-node/virtual-node.js': function libCoreBaseVirtualNodeVirtualNodeJs(module, __webpack_exports__, __webpack_require__) {16895 -1 'use strict';16896 -1 __webpack_require__.r(__webpack_exports__);16897 -1 var _abstract_virtual_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');16898 -1 var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');16899 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/dom/index.js');16900 -1 var _cache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/base/cache.js');16901 -1 var isXHTMLGlobal;16902 -1 var VirtualNode = function(_abstract_virtual_nod2) {16903 -1 _inherits(VirtualNode, _abstract_virtual_nod2);16904 -1 var _super2 = _createSuper(VirtualNode);16905 -1 function VirtualNode(node, parent, shadowId) {16906 -1 var _this8;16907 -1 _classCallCheck(this, VirtualNode);16908 -1 _this8 = _super2.call(this);16909 -1 _this8.shadowId = shadowId;16910 -1 _this8.children = [];16911 -1 _this8.actualNode = node;16912 -1 _this8.parent = parent;16913 -1 _this8._isHidden = null;16914 -1 _this8._cache = {};16915 -1 if (typeof isXHTMLGlobal === 'undefined') {16916 -1 isXHTMLGlobal = Object(_utils__WEBPACK_IMPORTED_MODULE_1__['isXHTML'])(node.ownerDocument);16917 -1 }16918 -1 _this8._isXHTML = isXHTMLGlobal;16919 -1 if (node.nodeName.toLowerCase() === 'input') {16920 -1 var type = node.getAttribute('type');16921 -1 type = _this8._isXHTML ? type : (type || '').toLowerCase();16922 -1 if (!Object(_utils__WEBPACK_IMPORTED_MODULE_1__['validInputTypes'])().includes(type)) {16923 -1 type = 'text';16924 -1 }16925 -1 _this8._type = type;16926 -1 }16927 -1 if (_cache__WEBPACK_IMPORTED_MODULE_3__['default'].get('nodeMap')) {16928 -1 _cache__WEBPACK_IMPORTED_MODULE_3__['default'].get('nodeMap').set(node, _assertThisInitialized(_this8));16929 -1 }16930 -1 return _this8;16931 -1 }16932 -1 _createClass(VirtualNode, [ {16933 -1 key: 'attr',16934 -1 value: function attr(attrName) {16935 -1 if (typeof this.actualNode.getAttribute !== 'function') {16936 -1 return null;16937 -1 }16938 -1 return this.actualNode.getAttribute(attrName);-1 35682 timeouts = create(null); -1 35683 postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : ''; -1 35684 conf.on('set' + postfix, function(id) { -1 35685 timeouts[id] = setTimeout(function() { -1 35686 conf['delete'](id); -1 35687 }, maxAge); -1 35688 if (typeof timeouts[id].unref === 'function') { -1 35689 timeouts[id].unref(); 16939 35690 }16940 -1 }, {16941 -1 key: 'hasAttr',16942 -1 value: function hasAttr(attrName) {16943 -1 if (typeof this.actualNode.hasAttribute !== 'function') {16944 -1 return false;16945 -1 }16946 -1 return this.actualNode.hasAttribute(attrName);-1 35691 if (!preFetchTimeouts) { -1 35692 return; 16947 35693 }16948 -1 }, {16949 -1 key: 'getComputedStylePropertyValue',16950 -1 value: function getComputedStylePropertyValue(property) {16951 -1 var key = 'computedStyle_' + property;16952 -1 if (!this._cache.hasOwnProperty(key)) {16953 -1 if (!this._cache.hasOwnProperty('computedStyle')) {16954 -1 this._cache.computedStyle = window.getComputedStyle(this.actualNode);16955 -1 }16956 -1 this._cache[key] = this._cache.computedStyle.getPropertyValue(property);-1 35694 if (preFetchTimeouts[id]) { -1 35695 if (preFetchTimeouts[id] !== 'nextTick') { -1 35696 clearTimeout(preFetchTimeouts[id]); 16957 35697 }16958 -1 return this._cache[key];16959 -1 }16960 -1 }, {16961 -1 key: 'props',16962 -1 get: function get() {16963 -1 var _this$actualNode = this.actualNode, nodeType = _this$actualNode.nodeType, nodeName = _this$actualNode.nodeName, id = _this$actualNode.id, multiple = _this$actualNode.multiple, nodeValue = _this$actualNode.nodeValue, value = _this$actualNode.value;16964 -1 return {16965 -1 nodeType: nodeType,16966 -1 nodeName: this._isXHTML ? nodeName : nodeName.toLowerCase(),16967 -1 id: id,16968 -1 type: this._type,16969 -1 multiple: multiple,16970 -1 nodeValue: nodeValue,16971 -1 value: value16972 -1 };16973 35698 }16974 -1 }, {16975 -1 key: 'isFocusable',16976 -1 get: function get() {16977 -1 if (!this._cache.hasOwnProperty('isFocusable')) {16978 -1 this._cache.isFocusable = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_2__['isFocusable'])(this.actualNode);16979 -1 }16980 -1 return this._cache.isFocusable;-1 35699 preFetchTimeouts[id] = setTimeout(function() { -1 35700 delete preFetchTimeouts[id]; -1 35701 }, preFetchAge); -1 35702 if (typeof preFetchTimeouts[id].unref === 'function') { -1 35703 preFetchTimeouts[id].unref(); 16981 35704 }16982 -1 }, {16983 -1 key: 'tabbableElements',16984 -1 get: function get() {16985 -1 if (!this._cache.hasOwnProperty('tabbableElements')) {16986 -1 this._cache.tabbableElements = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_2__['getTabbableElements'])(this);16987 -1 }16988 -1 return this._cache.tabbableElements;-1 35705 }); -1 35706 conf.on('delete' + postfix, function(id) { -1 35707 clearTimeout(timeouts[id]); -1 35708 delete timeouts[id]; -1 35709 if (!preFetchTimeouts) { -1 35710 return; 16989 35711 }16990 -1 }, {16991 -1 key: 'clientRects',16992 -1 get: function get() {16993 -1 if (!this._cache.hasOwnProperty('clientRects')) {16994 -1 this._cache.clientRects = Array.from(this.actualNode.getClientRects()).filter(function(rect) {16995 -1 return rect.width > 0;16996 -1 });16997 -1 }16998 -1 return this._cache.clientRects;-1 35712 if (preFetchTimeouts[id] !== 'nextTick') { -1 35713 clearTimeout(preFetchTimeouts[id]); 16999 35714 }17000 -1 }, {17001 -1 key: 'boundingClientRect',17002 -1 get: function get() {17003 -1 if (!this._cache.hasOwnProperty('boundingClientRect')) {17004 -1 this._cache.boundingClientRect = this.actualNode.getBoundingClientRect();17005 -1 }17006 -1 return this._cache.boundingClientRect;-1 35715 delete preFetchTimeouts[id]; -1 35716 }); -1 35717 if (options.preFetch) { -1 35718 if (options.preFetch === true || isNaN(options.preFetch)) { -1 35719 preFetchAge = .333; -1 35720 } else { -1 35721 preFetchAge = max(min(Number(options.preFetch), 1), 0); -1 35722 } -1 35723 if (preFetchAge) { -1 35724 preFetchTimeouts = {}; -1 35725 preFetchAge = (1 - preFetchAge) * maxAge; -1 35726 conf.on('get' + postfix, function(id, args, context3) { -1 35727 if (!preFetchTimeouts[id]) { -1 35728 preFetchTimeouts[id] = 'nextTick'; -1 35729 nextTick(function() { -1 35730 var result; -1 35731 if (preFetchTimeouts[id] !== 'nextTick') { -1 35732 return; -1 35733 } -1 35734 delete preFetchTimeouts[id]; -1 35735 conf['delete'](id); -1 35736 if (options.async) { -1 35737 args = aFrom(args); -1 35738 args.push(noop4); -1 35739 } -1 35740 result = conf.memoized.apply(context3, args); -1 35741 if (options.promise) { -1 35742 if (isPromise(result)) { -1 35743 if (typeof result.done === 'function') { -1 35744 result.done(noop4, noop4); -1 35745 } else { -1 35746 result.then(noop4, noop4); -1 35747 } -1 35748 } -1 35749 } -1 35750 }); -1 35751 } -1 35752 }); 17007 35753 }17008 -1 } ]);17009 -1 return VirtualNode;17010 -1 }(_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_0__['default']);17011 -1 __webpack_exports__['default'] = VirtualNode;17012 -1 },17013 -1 './lib/core/constants.js': function libCoreConstantsJs(module, __webpack_exports__, __webpack_require__) {17014 -1 'use strict';17015 -1 __webpack_require__.r(__webpack_exports__);17016 -1 var definitions = [ {17017 -1 name: 'NA',17018 -1 value: 'inapplicable',17019 -1 priority: 0,17020 -1 group: 'inapplicable'17021 -1 }, {17022 -1 name: 'PASS',17023 -1 value: 'passed',17024 -1 priority: 1,17025 -1 group: 'passes'17026 -1 }, {17027 -1 name: 'CANTTELL',17028 -1 value: 'cantTell',17029 -1 priority: 2,17030 -1 group: 'incomplete'17031 -1 }, {17032 -1 name: 'FAIL',17033 -1 value: 'failed',17034 -1 priority: 3,17035 -1 group: 'violations'17036 -1 } ];17037 -1 var constants = {17038 -1 helpUrlBase: 'https://dequeuniversity.com/rules/',17039 -1 results: [],17040 -1 resultGroups: [],17041 -1 resultGroupMap: {},17042 -1 impact: Object.freeze([ 'minor', 'moderate', 'serious', 'critical' ]),17043 -1 preload: Object.freeze({17044 -1 assets: [ 'cssom', 'media' ],17045 -1 timeout: 1e417046 -1 })17047 -1 };17048 -1 definitions.forEach(function(definition) {17049 -1 var name = definition.name;17050 -1 var value = definition.value;17051 -1 var priority = definition.priority;17052 -1 var group = definition.group;17053 -1 constants[name] = value;17054 -1 constants[name + '_PRIO'] = priority;17055 -1 constants[name + '_GROUP'] = group;17056 -1 constants.results[priority] = value;17057 -1 constants.resultGroups[priority] = group;17058 -1 constants.resultGroupMap[value] = group;17059 -1 });17060 -1 Object.freeze(constants.results);17061 -1 Object.freeze(constants.resultGroups);17062 -1 Object.freeze(constants.resultGroupMap);17063 -1 Object.freeze(constants);17064 -1 __webpack_exports__['default'] = constants;17065 -1 },17066 -1 './lib/core/core.js': function libCoreCoreJs(module, __webpack_exports__, __webpack_require__) {17067 -1 'use strict';17068 -1 __webpack_require__.r(__webpack_exports__);17069 -1 var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/constants.js');17070 -1 var _log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/log.js');17071 -1 var _base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');17072 -1 var _base_virtual_node_serial_virtual_node__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/base/virtual-node/serial-virtual-node.js');17073 -1 var _base_virtual_node_virtual_node__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/core/base/virtual-node/virtual-node.js');17074 -1 var _base_cache__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/core/base/cache.js');17075 -1 var _base_audit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/core/base/audit.js');17076 -1 var _base_check_result__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/core/base/check-result.js');17077 -1 var _base_check__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__('./lib/core/base/check.js');17078 -1 var _base_context__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__('./lib/core/base/context.js');17079 -1 var _base_metadata_function_map__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__('./lib/core/base/metadata-function-map.js');17080 -1 var _base_rule_result__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__('./lib/core/base/rule-result.js');17081 -1 var _base_rule__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__('./lib/core/base/rule.js');17082 -1 var _imports__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__('./lib/core/imports/index.js');17083 -1 var _public_cleanup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__('./lib/core/public/cleanup.js');17084 -1 var _public_configure__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__('./lib/core/public/configure.js');17085 -1 var _public_get_rules__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__('./lib/core/public/get-rules.js');17086 -1 var _public_load__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__('./lib/core/public/load.js');17087 -1 var _public_plugins__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__('./lib/core/public/plugins.js');17088 -1 var _public_reporter__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__('./lib/core/public/reporter.js');17089 -1 var _public_reset__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__('./lib/core/public/reset.js');17090 -1 var _public_run_rules__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__('./lib/core/public/run-rules.js');17091 -1 var _public_run_virtual_rule__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__('./lib/core/public/run-virtual-rule.js');17092 -1 var _public_run__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__('./lib/core/public/run.js');17093 -1 var _reporters_na__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__('./lib/core/reporters/na.js');17094 -1 var _reporters_no_passes__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__('./lib/core/reporters/no-passes.js');17095 -1 var _reporters_raw_env__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__('./lib/core/reporters/raw-env.js');17096 -1 var _reporters_raw__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__('./lib/core/reporters/raw.js');17097 -1 var _reporters_v1__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__('./lib/core/reporters/v1.js');17098 -1 var _reporters_v2__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__('./lib/core/reporters/v2.js');17099 -1 var _commons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__('./lib/commons/index.js');17100 -1 var _utils__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__('./lib/core/utils/index.js');17101 -1 axe.constants = _constants__WEBPACK_IMPORTED_MODULE_0__['default'];17102 -1 axe.log = _log__WEBPACK_IMPORTED_MODULE_1__['default'];17103 -1 axe.AbstractVirtualNode = _base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_2__['default'];17104 -1 axe.SerialVirtualNode = _base_virtual_node_serial_virtual_node__WEBPACK_IMPORTED_MODULE_3__['default'];17105 -1 axe.VirtualNode = _base_virtual_node_virtual_node__WEBPACK_IMPORTED_MODULE_4__['default'];17106 -1 axe._cache = _base_cache__WEBPACK_IMPORTED_MODULE_5__['default'];17107 -1 axe._thisWillBeDeletedDoNotUse = axe._thisWillBeDeletedDoNotUse || {};17108 -1 axe._thisWillBeDeletedDoNotUse.base = {17109 -1 Audit: _base_audit__WEBPACK_IMPORTED_MODULE_6__['default'],17110 -1 CheckResult: _base_check_result__WEBPACK_IMPORTED_MODULE_7__['default'],17111 -1 Check: _base_check__WEBPACK_IMPORTED_MODULE_8__['default'],17112 -1 Context: _base_context__WEBPACK_IMPORTED_MODULE_9__['default'],17113 -1 RuleResult: _base_rule_result__WEBPACK_IMPORTED_MODULE_11__['default'],17114 -1 Rule: _base_rule__WEBPACK_IMPORTED_MODULE_12__['default'],17115 -1 metadataFunctionMap: _base_metadata_function_map__WEBPACK_IMPORTED_MODULE_10__['default']17116 -1 };17117 -1 axe.imports = _imports__WEBPACK_IMPORTED_MODULE_13__;17118 -1 axe.cleanup = _public_cleanup__WEBPACK_IMPORTED_MODULE_14__['default'];17119 -1 axe.configure = _public_configure__WEBPACK_IMPORTED_MODULE_15__['default'];17120 -1 axe.getRules = _public_get_rules__WEBPACK_IMPORTED_MODULE_16__['default'];17121 -1 axe._load = _public_load__WEBPACK_IMPORTED_MODULE_17__['default'];17122 -1 axe.plugins = {};17123 -1 axe.registerPlugin = _public_plugins__WEBPACK_IMPORTED_MODULE_18__['default'];17124 -1 axe.hasReporter = _public_reporter__WEBPACK_IMPORTED_MODULE_19__['hasReporter'];17125 -1 axe.getReporter = _public_reporter__WEBPACK_IMPORTED_MODULE_19__['getReporter'];17126 -1 axe.addReporter = _public_reporter__WEBPACK_IMPORTED_MODULE_19__['addReporter'];17127 -1 axe.reset = _public_reset__WEBPACK_IMPORTED_MODULE_20__['default'];17128 -1 axe._runRules = _public_run_rules__WEBPACK_IMPORTED_MODULE_21__['default'];17129 -1 axe.runVirtualRule = _public_run_virtual_rule__WEBPACK_IMPORTED_MODULE_22__['default'];17130 -1 axe.run = _public_run__WEBPACK_IMPORTED_MODULE_23__['default'];17131 -1 axe.commons = _commons__WEBPACK_IMPORTED_MODULE_30__;17132 -1 axe.utils = _utils__WEBPACK_IMPORTED_MODULE_31__;17133 -1 axe.addReporter('na', _reporters_na__WEBPACK_IMPORTED_MODULE_24__['default']);17134 -1 axe.addReporter('no-passes', _reporters_no_passes__WEBPACK_IMPORTED_MODULE_25__['default']);17135 -1 axe.addReporter('rawEnv', _reporters_raw_env__WEBPACK_IMPORTED_MODULE_26__['default']);17136 -1 axe.addReporter('raw', _reporters_raw__WEBPACK_IMPORTED_MODULE_27__['default']);17137 -1 axe.addReporter('v1', _reporters_v1__WEBPACK_IMPORTED_MODULE_28__['default']);17138 -1 axe.addReporter('v2', _reporters_v2__WEBPACK_IMPORTED_MODULE_29__['default'], true);17139 -1 },17140 -1 './lib/core/imports/index.js': function libCoreImportsIndexJs(module, __webpack_exports__, __webpack_require__) {17141 -1 'use strict';17142 -1 __webpack_require__.r(__webpack_exports__);17143 -1 var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./node_modules/axios/index.js');17144 -1 var axios__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);17145 -1 __webpack_require__.d(__webpack_exports__, 'axios', function() {17146 -1 return axios__WEBPACK_IMPORTED_MODULE_0___default.a;17147 -1 });17148 -1 var css_selector_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./node_modules/css-selector-parser/lib/index.js');17149 -1 var css_selector_parser__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(css_selector_parser__WEBPACK_IMPORTED_MODULE_1__);17150 -1 __webpack_require__.d(__webpack_exports__, 'CssSelectorParser', function() {17151 -1 return css_selector_parser__WEBPACK_IMPORTED_MODULE_1__['CssSelectorParser'];17152 -1 });17153 -1 var _deque_dot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./node_modules/@deque/dot/doT.js');17154 -1 var _deque_dot__WEBPACK_IMPORTED_MODULE_2___default = __webpack_require__.n(_deque_dot__WEBPACK_IMPORTED_MODULE_2__);17155 -1 __webpack_require__.d(__webpack_exports__, 'doT', function() {17156 -1 return _deque_dot__WEBPACK_IMPORTED_MODULE_2___default.a;17157 -1 });17158 -1 var emoji_regex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./node_modules/emoji-regex/index.js');17159 -1 var emoji_regex__WEBPACK_IMPORTED_MODULE_3___default = __webpack_require__.n(emoji_regex__WEBPACK_IMPORTED_MODULE_3__);17160 -1 __webpack_require__.d(__webpack_exports__, 'emojiRegexText', function() {17161 -1 return emoji_regex__WEBPACK_IMPORTED_MODULE_3___default.a;17162 -1 });17163 -1 var memoizee__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./node_modules/memoizee/index.js');17164 -1 var memoizee__WEBPACK_IMPORTED_MODULE_4___default = __webpack_require__.n(memoizee__WEBPACK_IMPORTED_MODULE_4__);17165 -1 __webpack_require__.d(__webpack_exports__, 'memoize', function() {17166 -1 return memoizee__WEBPACK_IMPORTED_MODULE_4___default.a;17167 -1 });17168 -1 var core_js_pure_features_promise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./node_modules/core-js-pure/features/promise/index.js');17169 -1 var core_js_pure_features_promise__WEBPACK_IMPORTED_MODULE_5___default = __webpack_require__.n(core_js_pure_features_promise__WEBPACK_IMPORTED_MODULE_5__);17170 -1 var core_js_pure_features_typed_array_uint32_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./node_modules/core-js-pure/features/typed-array/uint32-array.js');17171 -1 var core_js_pure_features_typed_array_uint32_array__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(core_js_pure_features_typed_array_uint32_array__WEBPACK_IMPORTED_MODULE_6__);17172 -1 var core_js_pure_es_weak_map__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./node_modules/core-js-pure/es/weak-map/index.js');17173 -1 var core_js_pure_es_weak_map__WEBPACK_IMPORTED_MODULE_7___default = __webpack_require__.n(core_js_pure_es_weak_map__WEBPACK_IMPORTED_MODULE_7__);17174 -1 if (!('WeakMap' in window)) {17175 -1 window.WeakMap = core_js_pure_es_weak_map__WEBPACK_IMPORTED_MODULE_7___default.a;17176 -1 }17177 -1 if (!('Promise' in window)) {17178 -1 window.Promise = core_js_pure_features_promise__WEBPACK_IMPORTED_MODULE_5___default.a;17179 -1 }17180 -1 if (!('Uint32Array' in window)) {17181 -1 window.Uint32Array = core_js_pure_features_typed_array_uint32_array__WEBPACK_IMPORTED_MODULE_6___default.a;17182 -1 }17183 -1 if (window.Uint32Array) {17184 -1 if (!('some' in window.Uint32Array.prototype)) {17185 -1 Object.defineProperty(window.Uint32Array.prototype, 'some', {17186 -1 value: Array.prototype.some17187 -1 });17188 -1 }17189 -1 if (!('reduce' in window.Uint32Array.prototype)) {17190 -1 Object.defineProperty(window.Uint32Array.prototype, 'reduce', {17191 -1 value: Array.prototype.reduce17192 -1 });17193 -1 }17194 -1 }17195 -1 },17196 -1 './lib/core/log.js': function libCoreLogJs(module, __webpack_exports__, __webpack_require__) {17197 -1 'use strict';17198 -1 __webpack_require__.r(__webpack_exports__);17199 -1 function log() {17200 -1 'use strict';17201 -1 if ((typeof console === 'undefined' ? 'undefined' : _typeof(console)) === 'object' && console.log) {17202 -1 Function.prototype.apply.call(console.log, console, arguments);17203 35754 }17204 -1 }17205 -1 __webpack_exports__['default'] = log;17206 -1 },17207 -1 './lib/core/public/cleanup.js': function libCorePublicCleanupJs(module, __webpack_exports__, __webpack_require__) {17208 -1 'use strict';17209 -1 __webpack_require__.r(__webpack_exports__);17210 -1 function cleanup(resolve, reject) {17211 -1 'use strict';17212 -1 resolve = resolve || function() {};17213 -1 reject = reject || axe.log;17214 -1 if (!axe._audit) {17215 -1 throw new Error('No audit configured');17216 -1 }17217 -1 var q = axe.utils.queue();17218 -1 var cleanupErrors = [];17219 -1 Object.keys(axe.plugins).forEach(function(key) {17220 -1 q.defer(function(res) {17221 -1 var rej = function rej(err) {17222 -1 cleanupErrors.push(err);17223 -1 res();17224 -1 };17225 -1 try {17226 -1 axe.plugins[key].cleanup(res, rej);17227 -1 } catch (err) {17228 -1 rej(err);17229 -1 }17230 -1 });17231 -1 });17232 -1 var flattenedTree = axe.utils.getFlattenedTree(document.body);17233 -1 axe.utils.querySelectorAll(flattenedTree, 'iframe, frame').forEach(function(node) {17234 -1 q.defer(function(res, rej) {17235 -1 return axe.utils.sendCommandToFrame(node.actualNode, {17236 -1 command: 'cleanup-plugin'17237 -1 }, res, rej);-1 35755 conf.on('clear' + postfix, function() { -1 35756 forEach(timeouts, function(id) { -1 35757 clearTimeout(id); 17238 35758 });17239 -1 });17240 -1 q.then(function(results) {17241 -1 if (cleanupErrors.length === 0) {17242 -1 resolve(results);17243 -1 } else {17244 -1 reject(cleanupErrors);-1 35759 timeouts = {}; -1 35760 if (preFetchTimeouts) { -1 35761 forEach(preFetchTimeouts, function(id) { -1 35762 if (id !== 'nextTick') { -1 35763 clearTimeout(id); -1 35764 } -1 35765 }); -1 35766 preFetchTimeouts = {}; 17245 35767 }17246 -1 })['catch'](reject);17247 -1 }17248 -1 __webpack_exports__['default'] = cleanup;17249 -1 },17250 -1 './lib/core/public/configure.js': function libCorePublicConfigureJs(module, __webpack_exports__, __webpack_require__) {-1 35768 }); -1 35769 }; -1 35770 }); -1 35771 var require_lru_queue = __commonJS(function(exports, module) { 17251 35772 'use strict';17252 -1 __webpack_require__.r(__webpack_exports__);17253 -1 var _reporter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/public/reporter.js');17254 -1 var _standards__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/standards/index.js');17255 -1 function configure(spec) {17256 -1 'use strict';17257 -1 var audit;17258 -1 audit = axe._audit;17259 -1 if (!audit) {17260 -1 throw new Error('No audit configured');17261 -1 }17262 -1 if (spec.axeVersion || spec.ver) {17263 -1 var specVersion = spec.axeVersion || spec.ver;17264 -1 if (!/^\d+\.\d+\.\d+(-canary)?/.test(specVersion)) {17265 -1 throw new Error('Invalid configured version '.concat(specVersion));17266 -1 }17267 -1 var _specVersion$split = specVersion.split('-'), _specVersion$split2 = _slicedToArray(_specVersion$split, 2), version = _specVersion$split2[0], canary = _specVersion$split2[1];17268 -1 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];17269 -1 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];17270 -1 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];17271 -1 if (major !== axeMajor || axeMinor < minor || axeMinor === minor && axePatch < patch || major === axeMajor && minor === axeMinor && patch === axePatch && canary && canary !== axeCanary) {17272 -1 throw new Error('Configured version '.concat(specVersion, ' is not compatible with current axe version ').concat(axe.version));17273 -1 }17274 -1 }17275 -1 if (spec.reporter && (typeof spec.reporter === 'function' || Object(_reporter__WEBPACK_IMPORTED_MODULE_0__['hasReporter'])(spec.reporter))) {17276 -1 audit.reporter = spec.reporter;17277 -1 }17278 -1 if (spec.checks) {17279 -1 if (!Array.isArray(spec.checks)) {17280 -1 throw new TypeError('Checks property must be an array');17281 -1 }17282 -1 spec.checks.forEach(function(check) {17283 -1 if (!check.id) {17284 -1 throw new TypeError('Configured check '.concat(JSON.stringify(check), ' is invalid. Checks must be an object with at least an id property'));-1 35773 var toPosInt = require_to_pos_integer(); -1 35774 var create = Object.create; -1 35775 var hasOwnProperty2 = Object.prototype.hasOwnProperty; -1 35776 module.exports = function(limit) { -1 35777 var size = 0, base = 1, queue4 = create(null), map = create(null), index = 0, del; -1 35778 limit = toPosInt(limit); -1 35779 return { -1 35780 hit: function hit(id) { -1 35781 var oldIndex = map[id], nuIndex = ++index; -1 35782 queue4[nuIndex] = id; -1 35783 map[id] = nuIndex; -1 35784 if (!oldIndex) { -1 35785 ++size; -1 35786 if (size <= limit) { -1 35787 return; -1 35788 } -1 35789 id = queue4[base]; -1 35790 del(id); -1 35791 return id; 17285 35792 }17286 -1 audit.addCheck(check);17287 -1 });17288 -1 }17289 -1 var modifiedRules = [];17290 -1 if (spec.rules) {17291 -1 if (!Array.isArray(spec.rules)) {17292 -1 throw new TypeError('Rules property must be an array');17293 -1 }17294 -1 spec.rules.forEach(function(rule) {17295 -1 if (!rule.id) {17296 -1 throw new TypeError('Configured rule '.concat(JSON.stringify(rule), ' is invalid. Rules must be an object with at least an id property'));-1 35793 delete queue4[oldIndex]; -1 35794 if (base !== oldIndex) { -1 35795 return; 17297 35796 }17298 -1 modifiedRules.push(rule.id);17299 -1 audit.addRule(rule);17300 -1 });17301 -1 }17302 -1 if (spec.disableOtherRules) {17303 -1 audit.rules.forEach(function(rule) {17304 -1 if (modifiedRules.includes(rule.id) === false) {17305 -1 rule.enabled = false;-1 35797 while (!hasOwnProperty2.call(queue4, ++base)) { -1 35798 continue; 17306 35799 }17307 -1 });17308 -1 }17309 -1 if (typeof spec.branding !== 'undefined') {17310 -1 audit.setBranding(spec.branding);17311 -1 } else {17312 -1 audit._constructHelpUrls();17313 -1 }17314 -1 if (spec.tagExclude) {17315 -1 audit.tagExclude = spec.tagExclude;17316 -1 }17317 -1 if (spec.locale) {17318 -1 audit.applyLocale(spec.locale);17319 -1 }17320 -1 if (spec.standards) {17321 -1 Object(_standards__WEBPACK_IMPORTED_MODULE_1__['configureStandards'])(spec.standards);17322 -1 }17323 -1 }17324 -1 __webpack_exports__['default'] = configure;17325 -1 },17326 -1 './lib/core/public/get-rules.js': function libCorePublicGetRulesJs(module, __webpack_exports__, __webpack_require__) {17327 -1 'use strict';17328 -1 __webpack_require__.r(__webpack_exports__);17329 -1 function getRules(tags) {17330 -1 'use strict';17331 -1 tags = tags || [];17332 -1 var matchingRules = !tags.length ? axe._audit.rules : axe._audit.rules.filter(function(item) {17333 -1 return !!tags.filter(function(tag) {17334 -1 return item.tags.indexOf(tag) !== -1;17335 -1 }).length;17336 -1 });17337 -1 var ruleData = axe._audit.data.rules || {};17338 -1 return matchingRules.map(function(matchingRule) {17339 -1 var rd = ruleData[matchingRule.id] || {};17340 -1 return {17341 -1 ruleId: matchingRule.id,17342 -1 description: rd.description,17343 -1 help: rd.help,17344 -1 helpUrl: rd.helpUrl,17345 -1 tags: matchingRule.tags17346 -1 };17347 -1 });17348 -1 }17349 -1 __webpack_exports__['default'] = getRules;17350 -1 },17351 -1 './lib/core/public/load.js': function libCorePublicLoadJs(module, __webpack_exports__, __webpack_require__) {17352 -1 'use strict';17353 -1 __webpack_require__.r(__webpack_exports__);17354 -1 var _base_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/audit.js');17355 -1 var _cleanup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/public/cleanup.js');17356 -1 var _run_rules__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/public/run-rules.js');17357 -1 function runCommand(data, keepalive, callback) {17358 -1 'use strict';17359 -1 var resolve = callback;17360 -1 var reject = function reject(err) {17361 -1 if (err instanceof Error === false) {17362 -1 err = new Error(err);-1 35800 }, -1 35801 delete: del = function del(id) { -1 35802 var oldIndex = map[id]; -1 35803 if (!oldIndex) { -1 35804 return; -1 35805 } -1 35806 delete queue4[oldIndex]; -1 35807 delete map[id]; -1 35808 --size; -1 35809 if (base !== oldIndex) { -1 35810 return; -1 35811 } -1 35812 if (!size) { -1 35813 index = 0; -1 35814 base = 1; -1 35815 return; -1 35816 } -1 35817 while (!hasOwnProperty2.call(queue4, ++base)) { -1 35818 continue; -1 35819 } -1 35820 }, -1 35821 clear: function clear() { -1 35822 size = 0; -1 35823 base = 1; -1 35824 queue4 = create(null); -1 35825 map = create(null); -1 35826 index = 0; 17363 35827 }17364 -1 callback(err);17365 35828 };17366 -1 var context = data && data.context || {};17367 -1 if (context.hasOwnProperty('include') && !context.include.length) {17368 -1 context.include = [ document ];-1 35829 }; -1 35830 }); -1 35831 var require_max = __commonJS(function() { -1 35832 'use strict'; -1 35833 var toPosInteger = require_to_pos_integer(); -1 35834 var lruQueue = require_lru_queue(); -1 35835 var extensions = require_registered_extensions(); -1 35836 extensions.max = function(max, conf, options) { -1 35837 var postfix, queue4, hit; -1 35838 max = toPosInteger(max); -1 35839 if (!max) { -1 35840 return; 17369 35841 }17370 -1 var options = data && data.options || {};17371 -1 switch (data.command) {17372 -1 case 'rules':17373 -1 return Object(_run_rules__WEBPACK_IMPORTED_MODULE_2__['default'])(context, options, function(results, cleanup) {17374 -1 resolve(results);17375 -1 cleanup();17376 -1 }, reject);17377 -117378 -1 case 'cleanup-plugin':17379 -1 return Object(_cleanup__WEBPACK_IMPORTED_MODULE_1__['default'])(resolve, reject);17380 -117381 -1 default:17382 -1 if (axe._audit && axe._audit.commands && axe._audit.commands[data.command]) {17383 -1 return axe._audit.commands[data.command](data, callback);-1 35842 queue4 = lruQueue(max); -1 35843 postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : ''; -1 35844 conf.on('set' + postfix, hit = function hit(id) { -1 35845 id = queue4.hit(id); -1 35846 if (id === void 0) { -1 35847 return; 17384 35848 }17385 -1 }17386 -1 }17387 -1 function load(audit) {17388 -1 'use strict';17389 -1 axe.utils.respondable.subscribe('axe.ping', function(data, keepalive, respond) {17390 -1 respond({17391 -1 axe: true17392 -1 });17393 -1 });17394 -1 axe.utils.respondable.subscribe('axe.start', runCommand);17395 -1 axe._audit = new _base_audit__WEBPACK_IMPORTED_MODULE_0__['default'](audit);17396 -1 }17397 -1 __webpack_exports__['default'] = load;17398 -1 },17399 -1 './lib/core/public/plugins.js': function libCorePublicPluginsJs(module, __webpack_exports__, __webpack_require__) {17400 -1 'use strict';17401 -1 __webpack_require__.r(__webpack_exports__);17402 -1 function Plugin(spec) {17403 -1 'use strict';17404 -1 this._run = spec.run;17405 -1 this._collect = spec.collect;17406 -1 this._registry = {};17407 -1 spec.commands.forEach(function(command) {17408 -1 axe._audit.registerCommand(command);-1 35849 conf['delete'](id); 17409 35850 });17410 -1 }17411 -1 Plugin.prototype.run = function() {17412 -1 'use strict';17413 -1 return this._run.apply(this, arguments);17414 -1 };17415 -1 Plugin.prototype.collect = function() {17416 -1 'use strict';17417 -1 return this._collect.apply(this, arguments);-1 35851 conf.on('get' + postfix, hit); -1 35852 conf.on('delete' + postfix, queue4['delete']); -1 35853 conf.on('clear' + postfix, queue4.clear); 17418 35854 };17419 -1 Plugin.prototype.cleanup = function(done) {17420 -1 'use strict';17421 -1 var q = axe.utils.queue();17422 -1 var that = this;17423 -1 Object.keys(this._registry).forEach(function(key) {17424 -1 q.defer(function(done) {17425 -1 that._registry[key].cleanup(done);17426 -1 });-1 35855 }); -1 35856 var require_ref_counter = __commonJS(function() { -1 35857 'use strict'; -1 35858 var d = require_d(); -1 35859 var extensions = require_registered_extensions(); -1 35860 var create = Object.create; -1 35861 var defineProperties = Object.defineProperties; -1 35862 extensions.refCounter = function(ignore, conf, options) { -1 35863 var cache20, postfix; -1 35864 cache20 = create(null); -1 35865 postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : ''; -1 35866 conf.on('set' + postfix, function(id, length) { -1 35867 cache20[id] = length || 1; 17427 35868 });17428 -1 q.then(function() {17429 -1 done();-1 35869 conf.on('get' + postfix, function(id) { -1 35870 ++cache20[id]; 17430 35871 });17431 -1 };17432 -1 Plugin.prototype.add = function(impl) {17433 -1 'use strict';17434 -1 this._registry[impl.id] = impl;17435 -1 };17436 -1 function registerPlugin(plugin) {17437 -1 'use strict';17438 -1 axe.plugins[plugin.id] = new Plugin(plugin);17439 -1 }17440 -1 __webpack_exports__['default'] = registerPlugin;17441 -1 },17442 -1 './lib/core/public/reporter.js': function libCorePublicReporterJs(module, __webpack_exports__, __webpack_require__) {17443 -1 'use strict';17444 -1 __webpack_require__.r(__webpack_exports__);17445 -1 __webpack_require__.d(__webpack_exports__, 'hasReporter', function() {17446 -1 return hasReporter;17447 -1 });17448 -1 __webpack_require__.d(__webpack_exports__, 'getReporter', function() {17449 -1 return getReporter;17450 -1 });17451 -1 __webpack_require__.d(__webpack_exports__, 'addReporter', function() {17452 -1 return addReporter;17453 -1 });17454 -1 var reporters = {};17455 -1 var defaultReporter;17456 -1 function hasReporter(reporterName) {17457 -1 return reporters.hasOwnProperty(reporterName);17458 -1 }17459 -1 function getReporter(reporter) {17460 -1 'use strict';17461 -1 if (typeof reporter === 'string' && reporters[reporter]) {17462 -1 return reporters[reporter];17463 -1 }17464 -1 if (typeof reporter === 'function') {17465 -1 return reporter;17466 -1 }17467 -1 return defaultReporter;17468 -1 }17469 -1 function addReporter(name, cb, isDefault) {17470 -1 'use strict';17471 -1 reporters[name] = cb;17472 -1 if (isDefault) {17473 -1 defaultReporter = cb;17474 -1 }17475 -1 }17476 -1 },17477 -1 './lib/core/public/reset.js': function libCorePublicResetJs(module, __webpack_exports__, __webpack_require__) {17478 -1 'use strict';17479 -1 __webpack_require__.r(__webpack_exports__);17480 -1 var _standards__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/index.js');17481 -1 function reset() {17482 -1 'use strict';17483 -1 var audit = axe._audit;17484 -1 if (!audit) {17485 -1 throw new Error('No audit configured');17486 -1 }17487 -1 audit.resetRulesAndChecks();17488 -1 Object(_standards__WEBPACK_IMPORTED_MODULE_0__['resetStandards'])();17489 -1 }17490 -1 __webpack_exports__['default'] = reset;17491 -1 },17492 -1 './lib/core/public/run-rules.js': function libCorePublicRunRulesJs(module, __webpack_exports__, __webpack_require__) {17493 -1 'use strict';17494 -1 __webpack_require__.r(__webpack_exports__);17495 -1 var _base_context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/context.js');17496 -1 var _base_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/cache.js');17497 -1 var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');17498 -1 var _log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/log.js');17499 -1 function cleanup() {17500 -1 if (_base_cache__WEBPACK_IMPORTED_MODULE_1__['default'].get('globalDocumentSet')) {17501 -1 document = null;17502 -1 }17503 -1 if (_base_cache__WEBPACK_IMPORTED_MODULE_1__['default'].get('globalWindowSet')) {17504 -1 window = null;17505 -1 }17506 -1 axe._memoizedFns.forEach(function(fn) {17507 -1 return fn.clear();-1 35872 conf.on('delete' + postfix, function(id) { -1 35873 delete cache20[id]; 17508 35874 });17509 -1 _base_cache__WEBPACK_IMPORTED_MODULE_1__['default'].clear();17510 -1 axe._tree = undefined;17511 -1 axe._selectorData = undefined;17512 -1 }17513 -1 function runRules(context, options, resolve, reject) {17514 -1 'use strict';17515 -1 try {17516 -1 context = new _base_context__WEBPACK_IMPORTED_MODULE_0__['default'](context);17517 -1 axe._tree = context.flatTree;17518 -1 axe._selectorData = Object(_utils__WEBPACK_IMPORTED_MODULE_2__['getSelectorData'])(context.flatTree);17519 -1 } catch (e) {17520 -1 cleanup();17521 -1 return reject(e);17522 -1 }17523 -1 var q = Object(_utils__WEBPACK_IMPORTED_MODULE_2__['queue'])();17524 -1 var audit = axe._audit;17525 -1 if (options.performanceTimer) {17526 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].auditStart();17527 -1 }17528 -1 if (context.frames.length && options.iframes !== false) {17529 -1 q.defer(function(res, rej) {17530 -1 Object(_utils__WEBPACK_IMPORTED_MODULE_2__['collectResultsFromFrames'])(context, options, 'rules', null, res, rej);17531 -1 });17532 -1 }17533 -1 q.defer(function(res, rej) {17534 -1 audit.run(context, options, res, rej);-1 35875 conf.on('clear' + postfix, function() { -1 35876 cache20 = {}; 17535 35877 });17536 -1 q.then(function(data) {17537 -1 try {17538 -1 if (options.performanceTimer) {17539 -1 _utils__WEBPACK_IMPORTED_MODULE_2__['performanceTimer'].auditEnd();-1 35878 defineProperties(conf.memoized, { -1 35879 deleteRef: d(function() { -1 35880 var id = conf.get(arguments); -1 35881 if (id === null) { -1 35882 return null; 17540 35883 }17541 -1 var results = Object(_utils__WEBPACK_IMPORTED_MODULE_2__['mergeResults'])(data.map(function(results) {17542 -1 return {17543 -1 results: results17544 -1 };17545 -1 }));17546 -1 if (context.initiator) {17547 -1 results = audit.after(results, options);17548 -1 results.forEach(_utils__WEBPACK_IMPORTED_MODULE_2__['publishMetaData']);17549 -1 results = results.map(_utils__WEBPACK_IMPORTED_MODULE_2__['finalizeRuleResult']);-1 35884 if (!cache20[id]) { -1 35885 return null; 17550 35886 }17551 -1 try {17552 -1 resolve(results, cleanup);17553 -1 } catch (e) {17554 -1 cleanup();17555 -1 Object(_log__WEBPACK_IMPORTED_MODULE_3__['default'])(e);-1 35887 if (!--cache20[id]) { -1 35888 conf['delete'](id); -1 35889 return true; 17556 35890 }17557 -1 } catch (e) {17558 -1 cleanup();17559 -1 reject(e);17560 -1 }17561 -1 })['catch'](function(e) {17562 -1 cleanup();17563 -1 reject(e);-1 35891 return false; -1 35892 }), -1 35893 getRefCount: d(function() { -1 35894 var id = conf.get(arguments); -1 35895 if (id === null) { -1 35896 return 0; -1 35897 } -1 35898 if (!cache20[id]) { -1 35899 return 0; -1 35900 } -1 35901 return cache20[id]; -1 35902 }) 17564 35903 });17565 -1 }17566 -1 __webpack_exports__['default'] = runRules;17567 -1 },17568 -1 './lib/core/public/run-virtual-rule.js': function libCorePublicRunVirtualRuleJs(module, __webpack_exports__, __webpack_require__) {-1 35904 }; -1 35905 }); -1 35906 var require_memoizee = __commonJS(function(exports, module) { 17569 35907 'use strict';17570 -1 __webpack_require__.r(__webpack_exports__);17571 -1 var _base_virtual_node_serial_virtual_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/virtual-node/serial-virtual-node.js');17572 -1 var _base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/virtual-node/abstract-virtual-node.js');17573 -1 var _reporters_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/reporters/helpers/index.js');17574 -1 var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/index.js');17575 -1 function runVirtualRule(ruleId, vNode) {17576 -1 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};17577 -1 options.reporter = options.reporter || axe._audit.reporter || 'v1';17578 -1 axe._selectorData = {};17579 -1 if (!(vNode instanceof _base_virtual_node_abstract_virtual_node__WEBPACK_IMPORTED_MODULE_1__['default'])) {17580 -1 vNode = new _base_virtual_node_serial_virtual_node__WEBPACK_IMPORTED_MODULE_0__['default'](vNode);17581 -1 }17582 -1 var rule = axe._audit.rules.find(function(rule) {17583 -1 return rule.id === ruleId;17584 -1 });17585 -1 if (!rule) {17586 -1 throw new Error('unknown rule `' + ruleId + '`');17587 -1 }17588 -1 rule = Object.create(rule, {17589 -1 excludeHidden: {17590 -1 value: false-1 35908 var normalizeOpts = require_normalize_options(); -1 35909 var resolveLength = require_resolve_length(); -1 35910 var plain = require_plain(); -1 35911 module.exports = function(fn) { -1 35912 var options = normalizeOpts(arguments[1]), length; -1 35913 if (!options.normalizer) { -1 35914 length = options.length = resolveLength(options.length, fn.length, options.async); -1 35915 if (length !== 0) { -1 35916 if (options.primitive) { -1 35917 if (length === false) { -1 35918 options.normalizer = require_primitive(); -1 35919 } else if (length > 1) { -1 35920 options.normalizer = require_get_primitive_fixed()(length); -1 35921 } -1 35922 } else if (length === false) { -1 35923 options.normalizer = require_get()(); -1 35924 } else if (length === 1) { -1 35925 options.normalizer = require_get_1()(); -1 35926 } else { -1 35927 options.normalizer = require_get_fixed()(length); -1 35928 } 17591 35929 }17592 -1 });17593 -1 var context = {17594 -1 include: [ vNode ]17595 -1 };17596 -1 var rawResults = rule.runSync(context, options);17597 -1 Object(_utils__WEBPACK_IMPORTED_MODULE_3__['publishMetaData'])(rawResults);17598 -1 Object(_utils__WEBPACK_IMPORTED_MODULE_3__['finalizeRuleResult'])(rawResults);17599 -1 var results = Object(_utils__WEBPACK_IMPORTED_MODULE_3__['aggregateResult'])([ rawResults ]);17600 -1 results.violations.forEach(function(result) {17601 -1 return result.nodes.forEach(function(nodeResult) {17602 -1 nodeResult.failureSummary = _reporters_helpers__WEBPACK_IMPORTED_MODULE_2__['failureSummary'](nodeResult);17603 -1 });17604 -1 });17605 -1 return _extends({}, _reporters_helpers__WEBPACK_IMPORTED_MODULE_2__['getEnvironmentData'](), results, {17606 -1 toolOptions: options17607 -1 });17608 -1 }17609 -1 __webpack_exports__['default'] = runVirtualRule;17610 -1 },17611 -1 './lib/core/public/run.js': function libCorePublicRunJs(module, __webpack_exports__, __webpack_require__) {17612 -1 'use strict';17613 -1 __webpack_require__.r(__webpack_exports__);17614 -1 var _reporter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/public/reporter.js');17615 -1 var _base_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/cache.js');17616 -1 function isContext(potential) {17617 -1 'use strict';17618 -1 switch (true) {17619 -1 case typeof potential === 'string':17620 -1 case Array.isArray(potential):17621 -1 case window.Node && potential instanceof window.Node:17622 -1 case window.NodeList && potential instanceof window.NodeList:17623 -1 return true;17624 -117625 -1 case _typeof(potential) !== 'object':17626 -1 return false;17627 -117628 -1 case potential.include !== undefined:17629 -1 case potential.exclude !== undefined:17630 -1 case typeof potential.length === 'number':17631 -1 return true;17632 -117633 -1 default:17634 -1 return false;17635 35930 }17636 -1 }17637 -1 var noop = function noop() {};17638 -1 function normalizeRunParams(context, options, callback) {17639 -1 'use strict';17640 -1 var typeErr = new TypeError('axe.run arguments are invalid');17641 -1 if (!isContext(context)) {17642 -1 if (callback !== undefined) {17643 -1 throw typeErr;17644 -1 }17645 -1 callback = options;17646 -1 options = context;17647 -1 context = document;-1 35931 if (options.async) { -1 35932 require_async(); 17648 35933 }17649 -1 if (_typeof(options) !== 'object') {17650 -1 if (callback !== undefined) {17651 -1 throw typeErr;17652 -1 }17653 -1 callback = options;17654 -1 options = {};-1 35934 if (options.promise) { -1 35935 require_promise(); 17655 35936 }17656 -1 if (typeof callback !== 'function' && callback !== undefined) {17657 -1 throw typeErr;-1 35937 if (options.dispose) { -1 35938 require_dispose(); 17658 35939 }17659 -1 return {17660 -1 context: context,17661 -1 options: options,17662 -1 callback: callback || noop17663 -1 };17664 -1 }17665 -1 function run(context, options, callback) {17666 -1 'use strict';17667 -1 if (!axe._audit) {17668 -1 throw new Error('No audit configured');-1 35940 if (options.maxAge) { -1 35941 require_max_age(); 17669 35942 }17670 -1 var hasWindow = window && 'Node' in window && 'NodeList' in window;17671 -1 var hasDoc = !!document;17672 -1 if (!hasWindow || !hasDoc) {17673 -1 if (!context || !context.ownerDocument) {17674 -1 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.');17675 -1 }17676 -1 if (!hasDoc) {17677 -1 _base_cache__WEBPACK_IMPORTED_MODULE_1__['default'].set('globalDocumentSet', true);17678 -1 document = context.ownerDocument;17679 -1 }17680 -1 if (!hasWindow) {17681 -1 _base_cache__WEBPACK_IMPORTED_MODULE_1__['default'].set('globalWindowSet', true);17682 -1 window = document.defaultView;17683 -1 }-1 35943 if (options.max) { -1 35944 require_max(); 17684 35945 }17685 -1 var args = normalizeRunParams(context, options, callback);17686 -1 context = args.context;17687 -1 options = args.options;17688 -1 callback = args.callback;17689 -1 options.reporter = options.reporter || axe._audit.reporter || 'v1';17690 -1 if (options.performanceTimer) {17691 -1 axe.utils.performanceTimer.start();17692 -1 }17693 -1 var p;17694 -1 var reject = noop;17695 -1 var resolve = noop;17696 -1 if (typeof Promise === 'function' && callback === noop) {17697 -1 p = new Promise(function(_resolve, _reject) {17698 -1 reject = _reject;17699 -1 resolve = _resolve;17700 -1 });-1 35946 if (options.refCounter) { -1 35947 require_ref_counter(); 17701 35948 }17702 -1 if (axe._running) {17703 -1 var err = 'Axe is already running. Use `await axe.run()` to wait ' + 'for the previous run to finish before starting a new run.';17704 -1 callback(err);17705 -1 reject(err);17706 -1 return p;17707 -1 }17708 -1 axe._running = true;17709 -1 axe._runRules(context, options, function(rawResults, cleanup) {17710 -1 var respond = function respond(results) {17711 -1 axe._running = false;17712 -1 cleanup();17713 -1 try {17714 -1 callback(null, results);17715 -1 } catch (e) {17716 -1 axe.log(e);17717 -1 }17718 -1 resolve(results);17719 -1 };17720 -1 if (options.performanceTimer) {17721 -1 axe.utils.performanceTimer.end();17722 -1 }17723 -1 try {17724 -1 var reporter = Object(_reporter__WEBPACK_IMPORTED_MODULE_0__['getReporter'])(options.reporter);17725 -1 var results = reporter(rawResults, options, respond);17726 -1 if (results !== undefined) {17727 -1 respond(results);17728 -1 }17729 -1 } catch (err) {17730 -1 axe._running = false;17731 -1 cleanup();17732 -1 callback(err);17733 -1 reject(err);17734 -1 }17735 -1 }, function(err) {17736 -1 axe._running = false;17737 -1 callback(err);17738 -1 reject(err);17739 -1 });17740 -1 return p;17741 -1 }17742 -1 __webpack_exports__['default'] = run;17743 -1 },17744 -1 './lib/core/reporters/helpers/failure-summary.js': function libCoreReportersHelpersFailureSummaryJs(module, __webpack_exports__, __webpack_require__) {17745 -1 'use strict';17746 -1 __webpack_require__.r(__webpack_exports__);17747 -1 function failureSummary(nodeData) {17748 -1 var failingChecks = {};17749 -1 failingChecks.none = nodeData.none.concat(nodeData.all);17750 -1 failingChecks.any = nodeData.any;17751 -1 return Object.keys(failingChecks).map(function(key) {17752 -1 if (!failingChecks[key].length) {17753 -1 return;17754 -1 }17755 -1 var sum = axe._audit.data.failureSummaries[key];17756 -1 if (sum && typeof sum.failureMessage === 'function') {17757 -1 return sum.failureMessage(failingChecks[key].map(function(check) {17758 -1 return check.message || '';17759 -1 }));17760 -1 }17761 -1 }).filter(function(i) {17762 -1 return i !== undefined;17763 -1 }).join('\n\n');17764 -1 }17765 -1 __webpack_exports__['default'] = failureSummary;17766 -1 },17767 -1 './lib/core/reporters/helpers/get-environment-data.js': function libCoreReportersHelpersGetEnvironmentDataJs(module, __webpack_exports__, __webpack_require__) {-1 35949 return plain(fn, options); -1 35950 }; -1 35951 }); -1 35952 var require_emoji_regex = __commonJS(function(exports, module) { 17768 35953 'use strict';17769 -1 __webpack_require__.r(__webpack_exports__);17770 -1 function getEnvironmentData() {17771 -1 var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;17772 -1 var _win$screen = win.screen, screen = _win$screen === void 0 ? {} : _win$screen, _win$navigator = win.navigator, navigator = _win$navigator === void 0 ? {} : _win$navigator, _win$location = win.location, location = _win$location === void 0 ? {} : _win$location, innerHeight = win.innerHeight, innerWidth = win.innerWidth;17773 -1 var orientation = screen.msOrientation || screen.orientation || screen.mozOrientation || {};17774 -1 return {17775 -1 testEngine: {17776 -1 name: 'axe-core',17777 -1 version: axe.version17778 -1 },17779 -1 testRunner: {17780 -1 name: axe._audit.brand17781 -1 },17782 -1 testEnvironment: {17783 -1 userAgent: navigator.userAgent,17784 -1 windowWidth: innerWidth,17785 -1 windowHeight: innerHeight,17786 -1 orientationAngle: orientation.angle,17787 -1 orientationType: orientation.type-1 35954 module.exports = function() { -1 35955 return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -1 35956 }; -1 35957 }); -1 35958 var require_doT = __commonJS(function(exports, module) { -1 35959 (function() { -1 35960 'use strict'; -1 35961 var doT3 = { -1 35962 name: 'doT', -1 35963 version: '1.1.1', -1 35964 templateSettings: { -1 35965 evaluate: /\{\{([\s\S]+?(\}?)+)\}\}/g, -1 35966 interpolate: /\{\{=([\s\S]+?)\}\}/g, -1 35967 encode: /\{\{!([\s\S]+?)\}\}/g, -1 35968 use: /\{\{#([\s\S]+?)\}\}/g, -1 35969 useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g, -1 35970 define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g, -1 35971 defineParams: /^\s*([\w$]+):([\s\S]+)/, -1 35972 conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g, -1 35973 iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g, -1 35974 varname: 'it', -1 35975 strip: true, -1 35976 append: true, -1 35977 selfcontained: false, -1 35978 doNotSkipEncoded: false 17788 35979 },17789 -1 timestamp: new Date().toISOString(),17790 -1 url: location.href-1 35980 template: void 0, -1 35981 compile: void 0, -1 35982 log: true 17791 35983 };17792 -1 }17793 -1 __webpack_exports__['default'] = getEnvironmentData;17794 -1 },17795 -1 './lib/core/reporters/helpers/incomplete-fallback-msg.js': function libCoreReportersHelpersIncompleteFallbackMsgJs(module, __webpack_exports__, __webpack_require__) {17796 -1 'use strict';17797 -1 __webpack_require__.r(__webpack_exports__);17798 -1 function incompleteFallbackMessage() {17799 -1 return typeof axe._audit.data.incompleteFallbackMessage === 'function' ? axe._audit.data.incompleteFallbackMessage() : axe._audit.data.incompleteFallbackMessage;17800 -1 }17801 -1 __webpack_exports__['default'] = incompleteFallbackMessage;17802 -1 },17803 -1 './lib/core/reporters/helpers/index.js': function libCoreReportersHelpersIndexJs(module, __webpack_exports__, __webpack_require__) {17804 -1 'use strict';17805 -1 __webpack_require__.r(__webpack_exports__);17806 -1 var _failure_summary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/reporters/helpers/failure-summary.js');17807 -1 __webpack_require__.d(__webpack_exports__, 'failureSummary', function() {17808 -1 return _failure_summary__WEBPACK_IMPORTED_MODULE_0__['default'];17809 -1 });17810 -1 var _get_environment_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/reporters/helpers/get-environment-data.js');17811 -1 __webpack_require__.d(__webpack_exports__, 'getEnvironmentData', function() {17812 -1 return _get_environment_data__WEBPACK_IMPORTED_MODULE_1__['default'];17813 -1 });17814 -1 var _incomplete_fallback_msg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/reporters/helpers/incomplete-fallback-msg.js');17815 -1 __webpack_require__.d(__webpack_exports__, 'incompleteFallbackMessage', function() {17816 -1 return _incomplete_fallback_msg__WEBPACK_IMPORTED_MODULE_2__['default'];17817 -1 });17818 -1 var _process_aggregate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/reporters/helpers/process-aggregate.js');17819 -1 __webpack_require__.d(__webpack_exports__, 'processAggregate', function() {17820 -1 return _process_aggregate__WEBPACK_IMPORTED_MODULE_3__['default'];17821 -1 });17822 -1 axe._thisWillBeDeletedDoNotUse = axe._thisWillBeDeletedDoNotUse || {};17823 -1 axe._thisWillBeDeletedDoNotUse.helpers = {17824 -1 failureSummary: _failure_summary__WEBPACK_IMPORTED_MODULE_0__['default'],17825 -1 getEnvironmentData: _get_environment_data__WEBPACK_IMPORTED_MODULE_1__['default'],17826 -1 incompleteFallbackMessage: _incomplete_fallback_msg__WEBPACK_IMPORTED_MODULE_2__['default'],17827 -1 processAggregate: _process_aggregate__WEBPACK_IMPORTED_MODULE_3__['default']17828 -1 };17829 -1 },17830 -1 './lib/core/reporters/helpers/process-aggregate.js': function libCoreReportersHelpersProcessAggregateJs(module, __webpack_exports__, __webpack_require__) {17831 -1 'use strict';17832 -1 __webpack_require__.r(__webpack_exports__);17833 -1 var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/constants.js');17834 -1 function normalizeRelatedNodes(node, options) {17835 -1 [ 'any', 'all', 'none' ].forEach(function(type) {17836 -1 if (!Array.isArray(node[type])) {-1 35984 (function() { -1 35985 if ((typeof globalThis === 'undefined' ? 'undefined' : _typeof(globalThis)) === 'object') { 17837 35986 return; 17838 35987 }17839 -1 node[type].filter(function(checkRes) {17840 -1 return Array.isArray(checkRes.relatedNodes);17841 -1 }).forEach(function(checkRes) {17842 -1 checkRes.relatedNodes = checkRes.relatedNodes.map(function(relatedNode) {17843 -1 var res = {17844 -1 html: relatedNode.source17845 -1 };17846 -1 if (options.elementRef && !relatedNode.fromFrame) {17847 -1 res.element = relatedNode.element;-1 35988 try { -1 35989 Object.defineProperty(Object.prototype, '__magic__', { -1 35990 get: function get() { -1 35991 return this; -1 35992 }, -1 35993 configurable: true -1 35994 }); -1 35995 __magic__.globalThis = __magic__; -1 35996 delete Object.prototype.__magic__; -1 35997 } catch (e) { -1 35998 window.globalThis = function() { -1 35999 if (typeof self !== 'undefined') { -1 36000 return self; 17848 36001 }17849 -1 if (options.selectors !== false || relatedNode.fromFrame) {17850 -1 res.target = relatedNode.selector;-1 36002 if (typeof window !== 'undefined') { -1 36003 return window; 17851 36004 }17852 -1 if (options.ancestry) {17853 -1 res.ancestry = relatedNode.ancestry;-1 36005 if (typeof global !== 'undefined') { -1 36006 return global; 17854 36007 }17855 -1 if (options.xpath) {17856 -1 res.xpath = relatedNode.xpath;-1 36008 if (typeof this !== 'undefined') { -1 36009 return this; 17857 36010 }17858 -1 return res;17859 -1 });-1 36011 throw new Error('Unable to locate global `this`'); -1 36012 }(); -1 36013 } -1 36014 })(); -1 36015 doT3.encodeHTMLSource = function(doNotSkipEncoded) { -1 36016 var encodeHTMLRules = { -1 36017 '&': '&', -1 36018 '<': '<', -1 36019 '>': '>', -1 36020 '"': '"', -1 36021 '\'': ''', -1 36022 '/': '/' -1 36023 }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g; -1 36024 return function(code) { -1 36025 return code ? code.toString().replace(matchHTML, function(m) { -1 36026 return encodeHTMLRules[m] || m; -1 36027 }) : ''; -1 36028 }; -1 36029 }; -1 36030 if (typeof module !== 'undefined' && module.exports) { -1 36031 module.exports = doT3; -1 36032 } else if (typeof define === 'function' && define.amd) { -1 36033 define(function() { -1 36034 return doT3; 17860 36035 });17861 -1 });17862 -1 }17863 -1 var resultKeys = _constants__WEBPACK_IMPORTED_MODULE_0__['default'].resultGroups;17864 -1 function processAggregate(results, options) {17865 -1 var resultObject = axe.utils.aggregateResult(results);17866 -1 resultKeys.forEach(function(key) {17867 -1 if (options.resultTypes && !options.resultTypes.includes(key)) {17868 -1 (resultObject[key] || []).forEach(function(ruleResult) {17869 -1 if (Array.isArray(ruleResult.nodes) && ruleResult.nodes.length > 0) {17870 -1 ruleResult.nodes = [ ruleResult.nodes[0] ];-1 36036 } else { -1 36037 globalThis.doT = doT3; -1 36038 } -1 36039 var startend = { -1 36040 append: { -1 36041 start: '\'+(', -1 36042 end: ')+\'', -1 36043 startencode: '\'+encodeHTML(' -1 36044 }, -1 36045 split: { -1 36046 start: '\';out+=(', -1 36047 end: ');out+=\'', -1 36048 startencode: '\';out+=encodeHTML(' -1 36049 } -1 36050 }, skip = /$^/; -1 36051 function resolveDefs(c, block, def) { -1 36052 return (typeof block === 'string' ? block : block.toString()).replace(c.define || skip, function(m, code, assign, value) { -1 36053 if (code.indexOf('def.') === 0) { -1 36054 code = code.substring(4); -1 36055 } -1 36056 if (!(code in def)) { -1 36057 if (assign === ':') { -1 36058 if (c.defineParams) { -1 36059 value.replace(c.defineParams, function(m2, param, v) { -1 36060 def[code] = { -1 36061 arg: param, -1 36062 text: v -1 36063 }; -1 36064 }); -1 36065 } -1 36066 if (!(code in def)) { -1 36067 def[code] = value; -1 36068 } -1 36069 } else { -1 36070 new Function('def', 'def[\'' + code + '\']=' + value)(def); 17871 36071 }17872 -1 });17873 -1 }17874 -1 resultObject[key] = (resultObject[key] || []).map(function(ruleResult) {17875 -1 ruleResult = Object.assign({}, ruleResult);17876 -1 if (Array.isArray(ruleResult.nodes) && ruleResult.nodes.length > 0) {17877 -1 ruleResult.nodes = ruleResult.nodes.map(function(subResult) {17878 -1 if (_typeof(subResult.node) === 'object') {17879 -1 subResult.html = subResult.node.source;17880 -1 if (options.elementRef && !subResult.node.fromFrame) {17881 -1 subResult.element = subResult.node.element;17882 -1 }17883 -1 if (options.selectors !== false || subResult.node.fromFrame) {17884 -1 subResult.target = subResult.node.selector;17885 -1 }17886 -1 if (options.ancestry) {17887 -1 subResult.ancestry = subResult.node.ancestry;17888 -1 }17889 -1 if (options.xpath) {17890 -1 subResult.xpath = subResult.node.xpath;17891 -1 }-1 36072 } -1 36073 return ''; -1 36074 }).replace(c.use || skip, function(m, code) { -1 36075 if (c.useParams) { -1 36076 code = code.replace(c.useParams, function(m2, s, d, param) { -1 36077 if (def[d] && def[d].arg && param) { -1 36078 var rw = (d + ':' + param).replace(/'|\\/g, '_'); -1 36079 def.__exp = def.__exp || {}; -1 36080 def.__exp[rw] = def[d].text.replace(new RegExp('(^|[^\\w$])' + def[d].arg + '([^\\w$])', 'g'), '$1' + param + '$2'); -1 36081 return s + 'def.__exp[\'' + rw + '\']'; 17892 36082 }17893 -1 delete subResult.result;17894 -1 delete subResult.node;17895 -1 normalizeRelatedNodes(subResult, options);17896 -1 return subResult;17897 36083 }); 17898 36084 }17899 -1 resultKeys.forEach(function(key) {17900 -1 return delete ruleResult[key];17901 -1 });17902 -1 delete ruleResult.pageLevel;17903 -1 delete ruleResult.result;17904 -1 return ruleResult;17905 -1 });17906 -1 });17907 -1 return resultObject;17908 -1 }17909 -1 __webpack_exports__['default'] = processAggregate;17910 -1 },17911 -1 './lib/core/reporters/na.js': function libCoreReportersNaJs(module, __webpack_exports__, __webpack_require__) {17912 -1 'use strict';17913 -1 __webpack_require__.r(__webpack_exports__);17914 -1 var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/reporters/helpers/index.js');17915 -1 var naReporter = function naReporter(results, options, callback) {17916 -1 console.warn('"na" reporter will be deprecated in axe v4.0. Use the "v2" reporter instead.');17917 -1 if (typeof options === 'function') {17918 -1 callback = options;17919 -1 options = {};17920 -1 }17921 -1 var out = Object(_helpers__WEBPACK_IMPORTED_MODULE_0__['processAggregate'])(results, options);17922 -1 callback(_extends({}, Object(_helpers__WEBPACK_IMPORTED_MODULE_0__['getEnvironmentData'])(), {17923 -1 toolOptions: options,17924 -1 violations: out.violations,17925 -1 passes: out.passes,17926 -1 incomplete: out.incomplete,17927 -1 inapplicable: out.inapplicable17928 -1 }));17929 -1 };17930 -1 __webpack_exports__['default'] = naReporter;17931 -1 },17932 -1 './lib/core/reporters/no-passes.js': function libCoreReportersNoPassesJs(module, __webpack_exports__, __webpack_require__) {17933 -1 'use strict';17934 -1 __webpack_require__.r(__webpack_exports__);17935 -1 var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/reporters/helpers/index.js');17936 -1 var noPassesReporter = function noPassesReporter(results, options, callback) {17937 -1 if (typeof options === 'function') {17938 -1 callback = options;17939 -1 options = {};17940 -1 }17941 -1 options.resultTypes = [ 'violations' ];17942 -1 var out = Object(_helpers__WEBPACK_IMPORTED_MODULE_0__['processAggregate'])(results, options);17943 -1 callback(_extends({}, Object(_helpers__WEBPACK_IMPORTED_MODULE_0__['getEnvironmentData'])(), {17944 -1 toolOptions: options,17945 -1 violations: out.violations17946 -1 }));17947 -1 };17948 -1 __webpack_exports__['default'] = noPassesReporter;17949 -1 },17950 -1 './lib/core/reporters/raw-env.js': function libCoreReportersRawEnvJs(module, __webpack_exports__, __webpack_require__) {17951 -1 'use strict';17952 -1 __webpack_require__.r(__webpack_exports__);17953 -1 var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/reporters/helpers/index.js');17954 -1 var _raw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/reporters/raw.js');17955 -1 var rawEnvReporter = function rawEnvReporter(results, options, callback) {17956 -1 if (typeof options === 'function') {17957 -1 callback = options;17958 -1 options = {};17959 -1 }17960 -1 function rawCallback(raw) {17961 -1 var env = Object(_helpers__WEBPACK_IMPORTED_MODULE_0__['getEnvironmentData'])();17962 -1 callback({17963 -1 raw: raw,17964 -1 env: env-1 36085 var v = new Function('def', 'return ' + code)(def); -1 36086 return v ? resolveDefs(c, v, def) : v; 17965 36087 }); 17966 36088 }17967 -1 Object(_raw__WEBPACK_IMPORTED_MODULE_1__['default'])(results, options, rawCallback);17968 -1 };17969 -1 __webpack_exports__['default'] = rawEnvReporter;17970 -1 },17971 -1 './lib/core/reporters/raw.js': function libCoreReportersRawJs(module, __webpack_exports__, __webpack_require__) {17972 -1 'use strict';17973 -1 __webpack_require__.r(__webpack_exports__);17974 -1 var rawReporter = function rawReporter(results, options, callback) {17975 -1 if (typeof options === 'function') {17976 -1 callback = options;17977 -1 options = {};17978 -1 }17979 -1 if (!results || !Array.isArray(results)) {17980 -1 return callback(results);17981 -1 }17982 -1 var transformedResults = results.map(function(result) {17983 -1 var transformedResult = _extends({}, result);17984 -1 var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ];17985 -1 for (var _i6 = 0, _types = types; _i6 < _types.length; _i6++) {17986 -1 var type = _types[_i6];17987 -1 if (transformedResult[type] && Array.isArray(transformedResult[type])) {17988 -1 transformedResult[type] = transformedResult[type].map(function(typeResult) {17989 -1 return _extends({}, typeResult, {17990 -1 node: typeResult.node.toJSON()17991 -1 });17992 -1 });-1 36089 function unescape(code) { -1 36090 return code.replace(/\\('|\\)/g, '$1').replace(/[\r\t\n]/g, ' '); -1 36091 } -1 36092 doT3.template = function(tmpl, c, def) { -1 36093 c = c || doT3.templateSettings; -1 36094 var cse = c.append ? startend.append : startend.split, needhtmlencode, sid = 0, indv, str = c.use || c.define ? resolveDefs(c, tmpl, def || {}) : tmpl; -1 36095 str = ('var out=\'' + (c.strip ? str.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g, ' ').replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g, '') : str).replace(/'|\\/g, '\\$&').replace(c.interpolate || skip, function(m, code) { -1 36096 return cse.start + unescape(code) + cse.end; -1 36097 }).replace(c.encode || skip, function(m, code) { -1 36098 needhtmlencode = true; -1 36099 return cse.startencode + unescape(code) + cse.end; -1 36100 }).replace(c.conditional || skip, function(m, elsecase, code) { -1 36101 return elsecase ? code ? '\';}else if(' + unescape(code) + '){out+=\'' : '\';}else{out+=\'' : code ? '\';if(' + unescape(code) + '){out+=\'' : '\';}out+=\''; -1 36102 }).replace(c.iterate || skip, function(m, iterate, vname, iname) { -1 36103 if (!iterate) { -1 36104 return '\';} } out+=\''; -1 36105 } -1 36106 sid += 1; -1 36107 indv = iname || 'i' + sid; -1 36108 iterate = unescape(iterate); -1 36109 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+=\''; -1 36110 }).replace(c.evaluate || skip, function(m, code) { -1 36111 return '\';' + unescape(code) + 'out+=\''; -1 36112 }) + '\';return out;').replace(/\n/g, '\\n').replace(/\t/g, '\\t').replace(/\r/g, '\\r').replace(/(\s|;|\}|^|\{)out\+='';/g, '$1').replace(/\+''/g, ''); -1 36113 if (needhtmlencode) { -1 36114 if (!c.selfcontained && globalThis && !globalThis._encodeHTML) { -1 36115 globalThis._encodeHTML = doT3.encodeHTMLSource(c.doNotSkipEncoded); -1 36116 } -1 36117 str = 'var encodeHTML = typeof _encodeHTML !== \'undefined\' ? _encodeHTML : (' + doT3.encodeHTMLSource.toString() + '(' + (c.doNotSkipEncoded || '') + '));' + str; -1 36118 } -1 36119 try { -1 36120 return new Function(c.varname, str); -1 36121 } catch (e) { -1 36122 if (typeof console !== 'undefined') { -1 36123 console.log('Could not create a template function: ' + str); 17993 36124 } -1 36125 throw e; 17994 36126 }17995 -1 return transformedResult;17996 -1 });17997 -1 callback(transformedResults);17998 -1 };17999 -1 __webpack_exports__['default'] = rawReporter;18000 -1 },18001 -1 './lib/core/reporters/v1.js': function libCoreReportersV1Js(module, __webpack_exports__, __webpack_require__) {18002 -1 'use strict';18003 -1 __webpack_require__.r(__webpack_exports__);18004 -1 var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/reporters/helpers/index.js');18005 -1 var v1Reporter = function v1Reporter(results, options, callback) {18006 -1 if (typeof options === 'function') {18007 -1 callback = options;18008 -1 options = {};18009 -1 }18010 -1 var out = Object(_helpers__WEBPACK_IMPORTED_MODULE_0__['processAggregate'])(results, options);18011 -1 var addFailureSummaries = function addFailureSummaries(result) {18012 -1 result.nodes.forEach(function(nodeResult) {18013 -1 nodeResult.failureSummary = Object(_helpers__WEBPACK_IMPORTED_MODULE_0__['failureSummary'])(nodeResult);18014 -1 });18015 36127 };18016 -1 out.incomplete.forEach(addFailureSummaries);18017 -1 out.violations.forEach(addFailureSummaries);18018 -1 callback(_extends({}, Object(_helpers__WEBPACK_IMPORTED_MODULE_0__['getEnvironmentData'])(), {18019 -1 toolOptions: options,18020 -1 violations: out.violations,18021 -1 passes: out.passes,18022 -1 incomplete: out.incomplete,18023 -1 inapplicable: out.inapplicable18024 -1 }));18025 -1 };18026 -1 __webpack_exports__['default'] = v1Reporter;18027 -1 },18028 -1 './lib/core/reporters/v2.js': function libCoreReportersV2Js(module, __webpack_exports__, __webpack_require__) {18029 -1 'use strict';18030 -1 __webpack_require__.r(__webpack_exports__);18031 -1 var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/reporters/helpers/index.js');18032 -1 var v2Reporter = function v2Reporter(results, options, callback) {18033 -1 if (typeof options === 'function') {18034 -1 callback = options;18035 -1 options = {};18036 -1 }18037 -1 var out = Object(_helpers__WEBPACK_IMPORTED_MODULE_0__['processAggregate'])(results, options);18038 -1 callback(_extends({}, Object(_helpers__WEBPACK_IMPORTED_MODULE_0__['getEnvironmentData'])(), {18039 -1 toolOptions: options,18040 -1 violations: out.violations,18041 -1 passes: out.passes,18042 -1 incomplete: out.incomplete,18043 -1 inapplicable: out.inapplicable18044 -1 }));18045 -1 };18046 -1 __webpack_exports__['default'] = v2Reporter;18047 -1 },18048 -1 './lib/core/utils/aggregate-checks.js': function libCoreUtilsAggregateChecksJs(module, __webpack_exports__, __webpack_require__) {18049 -1 'use strict';18050 -1 __webpack_require__.r(__webpack_exports__);18051 -1 var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/constants.js');18052 -1 var _aggregate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/aggregate.js');18053 -1 var _constants__WEBPACK_I = _constants__WEBPACK_IMPORTED_MODULE_0__['default'], CANTTELL_PRIO = _constants__WEBPACK_I.CANTTELL_PRIO, FAIL_PRIO = _constants__WEBPACK_I.FAIL_PRIO;18054 -1 var checkMap = [];18055 -1 checkMap[_constants__WEBPACK_IMPORTED_MODULE_0__['default'].PASS_PRIO] = true;18056 -1 checkMap[_constants__WEBPACK_IMPORTED_MODULE_0__['default'].CANTTELL_PRIO] = null;18057 -1 checkMap[_constants__WEBPACK_IMPORTED_MODULE_0__['default'].FAIL_PRIO] = false;18058 -1 var checkTypes = [ 'any', 'all', 'none' ];18059 -1 function anyAllNone(obj, functor) {18060 -1 return checkTypes.reduce(function(out, type) {18061 -1 out[type] = (obj[type] || []).map(function(val) {18062 -1 return functor(val, type);18063 -1 });18064 -1 return out;18065 -1 }, {});18066 -1 }18067 -1 function aggregateChecks(nodeResOriginal) {18068 -1 var nodeResult = Object.assign({}, nodeResOriginal);18069 -1 anyAllNone(nodeResult, function(check, type) {18070 -1 var i = typeof check.result === 'undefined' ? -1 : checkMap.indexOf(check.result);18071 -1 check.priority = i !== -1 ? i : _constants__WEBPACK_IMPORTED_MODULE_0__['default'].CANTTELL_PRIO;18072 -1 if (type === 'none') {18073 -1 if (check.priority === _constants__WEBPACK_IMPORTED_MODULE_0__['default'].PASS_PRIO) {18074 -1 check.priority = _constants__WEBPACK_IMPORTED_MODULE_0__['default'].FAIL_PRIO;18075 -1 } else if (check.priority === _constants__WEBPACK_IMPORTED_MODULE_0__['default'].FAIL_PRIO) {18076 -1 check.priority = _constants__WEBPACK_IMPORTED_MODULE_0__['default'].PASS_PRIO;-1 36128 doT3.compile = function(tmpl, def) { -1 36129 return doT3.template(tmpl, null, def); -1 36130 }; -1 36131 })(); -1 36132 }); -1 36133 var require_es6_promise = __commonJS(function(exports, module) { -1 36134 (function(global2, factory) { -1 36135 _typeof(exports) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global2.ES6Promise = factory(); -1 36136 })(exports, function() { -1 36137 'use strict'; -1 36138 function objectOrFunction(x) { -1 36139 var type = _typeof(x); -1 36140 return x !== null && (type === 'object' || type === 'function'); -1 36141 } -1 36142 function isFunction(x) { -1 36143 return typeof x === 'function'; -1 36144 } -1 36145 var _isArray = void 0; -1 36146 if (Array.isArray) { -1 36147 _isArray = Array.isArray; -1 36148 } else { -1 36149 _isArray = function _isArray(x) { -1 36150 return Object.prototype.toString.call(x) === '[object Array]'; -1 36151 }; -1 36152 } -1 36153 var isArray = _isArray; -1 36154 var len = 0; -1 36155 var vertxNext = void 0; -1 36156 var customSchedulerFn = void 0; -1 36157 var asap = function asap2(callback, arg) { -1 36158 queue4[len] = callback; -1 36159 queue4[len + 1] = arg; -1 36160 len += 2; -1 36161 if (len === 2) { -1 36162 if (customSchedulerFn) { -1 36163 customSchedulerFn(flush); -1 36164 } else { -1 36165 scheduleFlush(); 18077 36166 } 18078 36167 }18079 -1 });18080 -1 var priorities = {18081 -1 all: nodeResult.all.reduce(function(a, b) {18082 -1 return Math.max(a, b.priority);18083 -1 }, 0),18084 -1 none: nodeResult.none.reduce(function(a, b) {18085 -1 return Math.max(a, b.priority);18086 -1 }, 0),18087 -1 any: nodeResult.any.reduce(function(a, b) {18088 -1 return Math.min(a, b.priority);18089 -1 }, 4) % 418090 36168 };18091 -1 nodeResult.priority = Math.max(priorities.all, priorities.none, priorities.any);18092 -1 var impacts = [];18093 -1 checkTypes.forEach(function(type) {18094 -1 nodeResult[type] = nodeResult[type].filter(function(check) {18095 -1 return check.priority === nodeResult.priority && check.priority === priorities[type];18096 -1 });18097 -1 nodeResult[type].forEach(function(check) {18098 -1 return impacts.push(check.impact);18099 -1 });18100 -1 });18101 -1 if ([ CANTTELL_PRIO, FAIL_PRIO ].includes(nodeResult.priority)) {18102 -1 nodeResult.impact = Object(_aggregate__WEBPACK_IMPORTED_MODULE_1__['default'])(_constants__WEBPACK_IMPORTED_MODULE_0__['default'].impact, impacts);18103 -1 } else {18104 -1 nodeResult.impact = null;-1 36169 function setScheduler(scheduleFn) { -1 36170 customSchedulerFn = scheduleFn; -1 36171 } -1 36172 function setAsap(asapFn) { -1 36173 asap = asapFn; -1 36174 } -1 36175 var browserWindow = typeof window !== 'undefined' ? window : void 0; -1 36176 var browserGlobal = browserWindow || {}; -1 36177 var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; -1 36178 var isNode2 = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; -1 36179 var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined'; -1 36180 function useNextTick() { -1 36181 return function() { -1 36182 return process.nextTick(flush); -1 36183 }; 18105 36184 }18106 -1 anyAllNone(nodeResult, function(c) {18107 -1 delete c.result;18108 -1 delete c.priority;18109 -1 });18110 -1 nodeResult.result = _constants__WEBPACK_IMPORTED_MODULE_0__['default'].results[nodeResult.priority];18111 -1 delete nodeResult.priority;18112 -1 return nodeResult;18113 -1 }18114 -1 __webpack_exports__['default'] = aggregateChecks;18115 -1 },18116 -1 './lib/core/utils/aggregate-node-results.js': function libCoreUtilsAggregateNodeResultsJs(module, __webpack_exports__, __webpack_require__) {18117 -1 'use strict';18118 -1 __webpack_require__.r(__webpack_exports__);18119 -1 var _aggregate_checks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/aggregate-checks.js');18120 -1 var _aggregate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/aggregate.js');18121 -1 var _finalize_result__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/finalize-result.js');18122 -1 var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/constants.js');18123 -1 function aggregateNodeResults(nodeResults) {18124 -1 var ruleResult = {};18125 -1 nodeResults = nodeResults.map(function(nodeResult) {18126 -1 if (nodeResult.any && nodeResult.all && nodeResult.none) {18127 -1 return Object(_aggregate_checks__WEBPACK_IMPORTED_MODULE_0__['default'])(nodeResult);18128 -1 } else if (Array.isArray(nodeResult.node)) {18129 -1 return Object(_finalize_result__WEBPACK_IMPORTED_MODULE_2__['default'])(nodeResult);18130 -1 } else {18131 -1 throw new TypeError('Invalid Result type');-1 36185 function useVertxTimer() { -1 36186 if (typeof vertxNext !== 'undefined') { -1 36187 return function() { -1 36188 vertxNext(flush); -1 36189 }; 18132 36190 }18133 -1 });18134 -1 if (nodeResults && nodeResults.length) {18135 -1 var resultList = nodeResults.map(function(node) {18136 -1 return node.result;-1 36191 return useSetTimeout(); -1 36192 } -1 36193 function useMutationObserver() { -1 36194 var iterations = 0; -1 36195 var observer = new BrowserMutationObserver(flush); -1 36196 var node = document.createTextNode(''); -1 36197 observer.observe(node, { -1 36198 characterData: true 18137 36199 });18138 -1 ruleResult.result = Object(_aggregate__WEBPACK_IMPORTED_MODULE_1__['default'])(_constants__WEBPACK_IMPORTED_MODULE_3__['default'].results, resultList, ruleResult.result);18139 -1 } else {18140 -1 ruleResult.result = 'inapplicable';-1 36200 return function() { -1 36201 node.data = iterations = ++iterations % 2; -1 36202 }; 18141 36203 }18142 -1 _constants__WEBPACK_IMPORTED_MODULE_3__['default'].resultGroups.forEach(function(group) {18143 -1 return ruleResult[group] = [];18144 -1 });18145 -1 nodeResults.forEach(function(nodeResult) {18146 -1 var groupName = _constants__WEBPACK_IMPORTED_MODULE_3__['default'].resultGroupMap[nodeResult.result];18147 -1 ruleResult[groupName].push(nodeResult);18148 -1 });18149 -1 var impactGroup = _constants__WEBPACK_IMPORTED_MODULE_3__['default'].FAIL_GROUP;18150 -1 if (ruleResult[impactGroup].length === 0) {18151 -1 impactGroup = _constants__WEBPACK_IMPORTED_MODULE_3__['default'].CANTTELL_GROUP;-1 36204 function useMessageChannel() { -1 36205 var channel = new MessageChannel(); -1 36206 channel.port1.onmessage = flush; -1 36207 return function() { -1 36208 return channel.port2.postMessage(0); -1 36209 }; 18152 36210 }18153 -1 if (ruleResult[impactGroup].length > 0) {18154 -1 var impactList = ruleResult[impactGroup].map(function(failure) {18155 -1 return failure.impact;18156 -1 });18157 -1 ruleResult.impact = Object(_aggregate__WEBPACK_IMPORTED_MODULE_1__['default'])(_constants__WEBPACK_IMPORTED_MODULE_3__['default'].impact, impactList) || null;18158 -1 } else {18159 -1 ruleResult.impact = null;-1 36211 function useSetTimeout() { -1 36212 var globalSetTimeout = setTimeout; -1 36213 return function() { -1 36214 return globalSetTimeout(flush, 1); -1 36215 }; 18160 36216 }18161 -1 return ruleResult;18162 -1 }18163 -1 __webpack_exports__['default'] = aggregateNodeResults;18164 -1 },18165 -1 './lib/core/utils/aggregate-result.js': function libCoreUtilsAggregateResultJs(module, __webpack_exports__, __webpack_require__) {18166 -1 'use strict';18167 -1 __webpack_require__.r(__webpack_exports__);18168 -1 var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/constants.js');18169 -1 function copyToGroup(resultObject, subResult, group) {18170 -1 var resultCopy = Object.assign({}, subResult);18171 -1 resultCopy.nodes = (resultCopy[group] || []).concat();18172 -1 _constants__WEBPACK_IMPORTED_MODULE_0__['default'].resultGroups.forEach(function(group) {18173 -1 delete resultCopy[group];18174 -1 });18175 -1 resultObject[group].push(resultCopy);18176 -1 }18177 -1 function aggregateResult(results) {18178 -1 var resultObject = {};18179 -1 _constants__WEBPACK_IMPORTED_MODULE_0__['default'].resultGroups.forEach(function(groupName) {18180 -1 return resultObject[groupName] = [];18181 -1 });18182 -1 results.forEach(function(subResult) {18183 -1 if (subResult.error) {18184 -1 copyToGroup(resultObject, subResult, _constants__WEBPACK_IMPORTED_MODULE_0__['default'].CANTTELL_GROUP);18185 -1 } else if (subResult.result === _constants__WEBPACK_IMPORTED_MODULE_0__['default'].NA) {18186 -1 copyToGroup(resultObject, subResult, _constants__WEBPACK_IMPORTED_MODULE_0__['default'].NA_GROUP);18187 -1 } else {18188 -1 _constants__WEBPACK_IMPORTED_MODULE_0__['default'].resultGroups.forEach(function(group) {18189 -1 if (Array.isArray(subResult[group]) && subResult[group].length > 0) {18190 -1 copyToGroup(resultObject, subResult, group);18191 -1 }-1 36217 var queue4 = new Array(1e3); -1 36218 function flush() { -1 36219 for (var i = 0; i < len; i += 2) { -1 36220 var callback = queue4[i]; -1 36221 var arg = queue4[i + 1]; -1 36222 callback(arg); -1 36223 queue4[i] = void 0; -1 36224 queue4[i + 1] = void 0; -1 36225 } -1 36226 len = 0; -1 36227 } -1 36228 function attemptVertx() { -1 36229 try { -1 36230 var vertx = Function('return this')().require('vertx'); -1 36231 vertxNext = vertx.runOnLoop || vertx.runOnContext; -1 36232 return useVertxTimer(); -1 36233 } catch (e) { -1 36234 return useSetTimeout(); -1 36235 } -1 36236 } -1 36237 var scheduleFlush = void 0; -1 36238 if (isNode2) { -1 36239 scheduleFlush = useNextTick(); -1 36240 } else if (BrowserMutationObserver) { -1 36241 scheduleFlush = useMutationObserver(); -1 36242 } else if (isWorker) { -1 36243 scheduleFlush = useMessageChannel(); -1 36244 } else if (browserWindow === void 0 && true) { -1 36245 scheduleFlush = attemptVertx(); -1 36246 } else { -1 36247 scheduleFlush = useSetTimeout(); -1 36248 } -1 36249 function then(onFulfillment, onRejection) { -1 36250 var parent = this; -1 36251 var child = new this.constructor(noop4); -1 36252 if (child[PROMISE_ID] === void 0) { -1 36253 makePromise(child); -1 36254 } -1 36255 var _state = parent._state; -1 36256 if (_state) { -1 36257 var callback = arguments[_state - 1]; -1 36258 asap(function() { -1 36259 return invokeCallback(_state, child, callback, parent._result); 18192 36260 }); -1 36261 } else { -1 36262 subscribe2(parent, child, onFulfillment, onRejection); 18193 36263 }18194 -1 });18195 -1 return resultObject;18196 -1 }18197 -1 __webpack_exports__['default'] = aggregateResult;18198 -1 },18199 -1 './lib/core/utils/aggregate.js': function libCoreUtilsAggregateJs(module, __webpack_exports__, __webpack_require__) {18200 -1 'use strict';18201 -1 __webpack_require__.r(__webpack_exports__);18202 -1 function aggregate(map, values, initial) {18203 -1 values = values.slice();18204 -1 if (initial) {18205 -1 values.push(initial);18206 -1 }18207 -1 var sorting = values.map(function(val) {18208 -1 return map.indexOf(val);18209 -1 }).sort();18210 -1 return map[sorting.pop()];18211 -1 }18212 -1 __webpack_exports__['default'] = aggregate;18213 -1 },18214 -1 './lib/core/utils/are-styles-set.js': function libCoreUtilsAreStylesSetJs(module, __webpack_exports__, __webpack_require__) {18215 -1 'use strict';18216 -1 __webpack_require__.r(__webpack_exports__);18217 -1 function areStylesSet(el, styles, stopAt) {18218 -1 var styl = window.getComputedStyle(el, null);18219 -1 if (!styl) {18220 -1 return false;-1 36264 return child; 18221 36265 }18222 -1 for (var i = 0; i < styles.length; ++i) {18223 -1 var att = styles[i];18224 -1 if (styl.getPropertyValue(att.property) === att.value) {18225 -1 return true;-1 36266 function resolve$1(object) { -1 36267 var Constructor = this; -1 36268 if (object && _typeof(object) === 'object' && object.constructor === Constructor) { -1 36269 return object; 18226 36270 } -1 36271 var promise = new Constructor(noop4); -1 36272 resolve(promise, object); -1 36273 return promise; 18227 36274 }18228 -1 if (!el.parentNode || el.nodeName.toUpperCase() === stopAt.toUpperCase()) {18229 -1 return false;-1 36275 var PROMISE_ID = Math.random().toString(36).substring(2); -1 36276 function noop4() {} -1 36277 var PENDING = void 0; -1 36278 var FULFILLED = 1; -1 36279 var REJECTED = 2; -1 36280 function selfFulfillment() { -1 36281 return new TypeError('You cannot resolve a promise with itself'); 18230 36282 }18231 -1 return areStylesSet(el.parentNode, styles, stopAt);18232 -1 }18233 -1 __webpack_exports__['default'] = areStylesSet;18234 -1 },18235 -1 './lib/core/utils/assert.js': function libCoreUtilsAssertJs(module, __webpack_exports__, __webpack_require__) {18236 -1 'use strict';18237 -1 __webpack_require__.r(__webpack_exports__);18238 -1 function assert(bool, message) {18239 -1 if (!bool) {18240 -1 throw new Error(message);-1 36283 function cannotReturnOwn() { -1 36284 return new TypeError('A promises callback cannot return that same promise.'); 18241 36285 }18242 -1 }18243 -1 __webpack_exports__['default'] = assert;18244 -1 },18245 -1 './lib/core/utils/check-helper.js': function libCoreUtilsCheckHelperJs(module, __webpack_exports__, __webpack_require__) {18246 -1 'use strict';18247 -1 __webpack_require__.r(__webpack_exports__);18248 -1 var _to_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/to-array.js');18249 -1 var _dq_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/dq-element.js');18250 -1 function checkHelper(checkResult, options, resolve, reject) {18251 -1 return {18252 -1 isAsync: false,18253 -1 async: function async() {18254 -1 this.isAsync = true;18255 -1 return function(result) {18256 -1 if (result instanceof Error === false) {18257 -1 checkResult.result = result;18258 -1 resolve(checkResult);-1 36286 function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) { -1 36287 try { -1 36288 then$$1.call(value, fulfillmentHandler, rejectionHandler); -1 36289 } catch (e) { -1 36290 return e; -1 36291 } -1 36292 } -1 36293 function handleForeignThenable(promise, thenable, then$$1) { -1 36294 asap(function(promise2) { -1 36295 var sealed = false; -1 36296 var error = tryThen(then$$1, thenable, function(value) { -1 36297 if (sealed) { -1 36298 return; -1 36299 } -1 36300 sealed = true; -1 36301 if (thenable !== value) { -1 36302 resolve(promise2, value); 18259 36303 } else {18260 -1 reject(result);-1 36304 fulfill(promise2, value); 18261 36305 }18262 -1 };18263 -1 },18264 -1 data: function data(_data) {18265 -1 checkResult.data = _data;18266 -1 },18267 -1 relatedNodes: function relatedNodes(nodes) {18268 -1 nodes = nodes instanceof window.Node ? [ nodes ] : Object(_to_array__WEBPACK_IMPORTED_MODULE_0__['default'])(nodes);18269 -1 checkResult.relatedNodes = nodes.map(function(element) {18270 -1 return new _dq_element__WEBPACK_IMPORTED_MODULE_1__['default'](element, options);-1 36306 }, function(reason) { -1 36307 if (sealed) { -1 36308 return; -1 36309 } -1 36310 sealed = true; -1 36311 reject(promise2, reason); -1 36312 }, 'Settle: ' + (promise2._label || ' unknown promise')); -1 36313 if (!sealed && error) { -1 36314 sealed = true; -1 36315 reject(promise2, error); -1 36316 } -1 36317 }, promise); -1 36318 } -1 36319 function handleOwnThenable(promise, thenable) { -1 36320 if (thenable._state === FULFILLED) { -1 36321 fulfill(promise, thenable._result); -1 36322 } else if (thenable._state === REJECTED) { -1 36323 reject(promise, thenable._result); -1 36324 } else { -1 36325 subscribe2(thenable, void 0, function(value) { -1 36326 return resolve(promise, value); -1 36327 }, function(reason) { -1 36328 return reject(promise, reason); 18271 36329 }); 18272 36330 }18273 -1 };18274 -1 }18275 -1 __webpack_exports__['default'] = checkHelper;18276 -1 },18277 -1 './lib/core/utils/clone.js': function libCoreUtilsCloneJs(module, __webpack_exports__, __webpack_require__) {18278 -1 'use strict';18279 -1 __webpack_require__.r(__webpack_exports__);18280 -1 function clone(obj) {18281 -1 var index, length, out = obj;18282 -1 if (obj !== null && _typeof(obj) === 'object') {18283 -1 if (Array.isArray(obj)) {18284 -1 out = [];18285 -1 for (index = 0, length = obj.length; index < length; index++) {18286 -1 out[index] = clone(obj[index]);-1 36331 } -1 36332 function handleMaybeThenable(promise, maybeThenable, then$$1) { -1 36333 if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) { -1 36334 handleOwnThenable(promise, maybeThenable); -1 36335 } else { -1 36336 if (then$$1 === void 0) { -1 36337 fulfill(promise, maybeThenable); -1 36338 } else if (isFunction(then$$1)) { -1 36339 handleForeignThenable(promise, maybeThenable, then$$1); -1 36340 } else { -1 36341 fulfill(promise, maybeThenable); -1 36342 } -1 36343 } -1 36344 } -1 36345 function resolve(promise, value) { -1 36346 if (promise === value) { -1 36347 reject(promise, selfFulfillment()); -1 36348 } else if (objectOrFunction(value)) { -1 36349 var then$$1 = void 0; -1 36350 try { -1 36351 then$$1 = value.then; -1 36352 } catch (error) { -1 36353 reject(promise, error); -1 36354 return; 18287 36355 } -1 36356 handleMaybeThenable(promise, value, then$$1); 18288 36357 } else {18289 -1 out = {};18290 -1 for (index in obj) {18291 -1 out[index] = clone(obj[index]);-1 36358 fulfill(promise, value); -1 36359 } -1 36360 } -1 36361 function publishRejection(promise) { -1 36362 if (promise._onerror) { -1 36363 promise._onerror(promise._result); -1 36364 } -1 36365 publish(promise); -1 36366 } -1 36367 function fulfill(promise, value) { -1 36368 if (promise._state !== PENDING) { -1 36369 return; -1 36370 } -1 36371 promise._result = value; -1 36372 promise._state = FULFILLED; -1 36373 if (promise._subscribers.length !== 0) { -1 36374 asap(publish, promise); -1 36375 } -1 36376 } -1 36377 function reject(promise, reason) { -1 36378 if (promise._state !== PENDING) { -1 36379 return; -1 36380 } -1 36381 promise._state = REJECTED; -1 36382 promise._result = reason; -1 36383 asap(publishRejection, promise); -1 36384 } -1 36385 function subscribe2(parent, child, onFulfillment, onRejection) { -1 36386 var _subscribers = parent._subscribers; -1 36387 var length = _subscribers.length; -1 36388 parent._onerror = null; -1 36389 _subscribers[length] = child; -1 36390 _subscribers[length + FULFILLED] = onFulfillment; -1 36391 _subscribers[length + REJECTED] = onRejection; -1 36392 if (length === 0 && parent._state) { -1 36393 asap(publish, parent); -1 36394 } -1 36395 } -1 36396 function publish(promise) { -1 36397 var subscribers = promise._subscribers; -1 36398 var settled = promise._state; -1 36399 if (subscribers.length === 0) { -1 36400 return; -1 36401 } -1 36402 var child = void 0, callback = void 0, detail = promise._result; -1 36403 for (var i = 0; i < subscribers.length; i += 3) { -1 36404 child = subscribers[i]; -1 36405 callback = subscribers[i + settled]; -1 36406 if (child) { -1 36407 invokeCallback(settled, child, callback, detail); -1 36408 } else { -1 36409 callback(detail); 18292 36410 } 18293 36411 } -1 36412 promise._subscribers.length = 0; 18294 36413 }18295 -1 return out;18296 -1 }18297 -1 __webpack_exports__['default'] = clone;18298 -1 },18299 -1 './lib/core/utils/closest.js': function libCoreUtilsClosestJs(module, __webpack_exports__, __webpack_require__) {18300 -1 'use strict';18301 -1 __webpack_require__.r(__webpack_exports__);18302 -1 var _matches__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/matches.js');18303 -1 function closest(vNode, selector) {18304 -1 while (vNode) {18305 -1 if (Object(_matches__WEBPACK_IMPORTED_MODULE_0__['default'])(vNode, selector)) {18306 -1 return vNode;-1 36414 function invokeCallback(settled, promise, callback, detail) { -1 36415 var hasCallback = isFunction(callback), value = void 0, error = void 0, succeeded = true; -1 36416 if (hasCallback) { -1 36417 try { -1 36418 value = callback(detail); -1 36419 } catch (e) { -1 36420 succeeded = false; -1 36421 error = e; -1 36422 } -1 36423 if (promise === value) { -1 36424 reject(promise, cannotReturnOwn()); -1 36425 return; -1 36426 } -1 36427 } else { -1 36428 value = detail; 18307 36429 }18308 -1 if (typeof vNode.parent === 'undefined') {18309 -1 throw new TypeError('Cannot resolve parent for non-DOM nodes');-1 36430 if (promise._state !== PENDING) {} else if (hasCallback && succeeded) { -1 36431 resolve(promise, value); -1 36432 } else if (succeeded === false) { -1 36433 reject(promise, error); -1 36434 } else if (settled === FULFILLED) { -1 36435 fulfill(promise, value); -1 36436 } else if (settled === REJECTED) { -1 36437 reject(promise, value); 18310 36438 }18311 -1 vNode = vNode.parent;18312 36439 }18313 -1 return null;18314 -1 }18315 -1 __webpack_exports__['default'] = closest;18316 -1 },18317 -1 './lib/core/utils/collect-results-from-frames.js': function libCoreUtilsCollectResultsFromFramesJs(module, __webpack_exports__, __webpack_require__) {18318 -1 'use strict';18319 -1 __webpack_require__.r(__webpack_exports__);18320 -1 var _queue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/queue.js');18321 -1 var _send_command_to_frame__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/send-command-to-frame.js');18322 -1 var _merge_results__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/merge-results.js');18323 -1 var _get_selector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/get-selector.js');18324 -1 function collectResultsFromFrames(context, options, command, parameter, resolve, reject) {18325 -1 var q = Object(_queue__WEBPACK_IMPORTED_MODULE_0__['default'])();18326 -1 var frames = context.frames;18327 -1 frames.forEach(function(frame) {18328 -1 var params = {18329 -1 options: options,18330 -1 command: command,18331 -1 parameter: parameter,18332 -1 context: {18333 -1 initiator: false,18334 -1 page: context.page,18335 -1 include: frame.include || [],18336 -1 exclude: frame.exclude || []-1 36440 function initializePromise(promise, resolver) { -1 36441 try { -1 36442 resolver(function resolvePromise(value) { -1 36443 resolve(promise, value); -1 36444 }, function rejectPromise(reason) { -1 36445 reject(promise, reason); -1 36446 }); -1 36447 } catch (e) { -1 36448 reject(promise, e); -1 36449 } -1 36450 } -1 36451 var id = 0; -1 36452 function nextId() { -1 36453 return id++; -1 36454 } -1 36455 function makePromise(promise) { -1 36456 promise[PROMISE_ID] = id++; -1 36457 promise._state = void 0; -1 36458 promise._result = void 0; -1 36459 promise._subscribers = []; -1 36460 } -1 36461 function validationError() { -1 36462 return new Error('Array Methods must be provided an Array'); -1 36463 } -1 36464 var Enumerator = function() { -1 36465 function Enumerator2(Constructor, input) { -1 36466 this._instanceConstructor = Constructor; -1 36467 this.promise = new Constructor(noop4); -1 36468 if (!this.promise[PROMISE_ID]) { -1 36469 makePromise(this.promise); -1 36470 } -1 36471 if (isArray(input)) { -1 36472 this.length = input.length; -1 36473 this._remaining = input.length; -1 36474 this._result = new Array(this.length); -1 36475 if (this.length === 0) { -1 36476 fulfill(this.promise, this._result); -1 36477 } else { -1 36478 this.length = this.length || 0; -1 36479 this._enumerate(input); -1 36480 if (this._remaining === 0) { -1 36481 fulfill(this.promise, this._result); -1 36482 } -1 36483 } -1 36484 } else { -1 36485 reject(this.promise, validationError()); -1 36486 } -1 36487 } -1 36488 Enumerator2.prototype._enumerate = function _enumerate(input) { -1 36489 for (var i = 0; this._state === PENDING && i < input.length; i++) { -1 36490 this._eachEntry(input[i], i); -1 36491 } -1 36492 }; -1 36493 Enumerator2.prototype._eachEntry = function _eachEntry(entry, i) { -1 36494 var c = this._instanceConstructor; -1 36495 var resolve$$1 = c.resolve; -1 36496 if (resolve$$1 === resolve$1) { -1 36497 var _then = void 0; -1 36498 var error = void 0; -1 36499 var didError = false; -1 36500 try { -1 36501 _then = entry.then; -1 36502 } catch (e) { -1 36503 didError = true; -1 36504 error = e; -1 36505 } -1 36506 if (_then === then && entry._state !== PENDING) { -1 36507 this._settledAt(entry._state, i, entry._result); -1 36508 } else if (typeof _then !== 'function') { -1 36509 this._remaining--; -1 36510 this._result[i] = entry; -1 36511 } else if (c === Promise$1) { -1 36512 var promise = new c(noop4); -1 36513 if (didError) { -1 36514 reject(promise, error); -1 36515 } else { -1 36516 handleMaybeThenable(promise, entry, _then); -1 36517 } -1 36518 this._willSettleAt(promise, i); -1 36519 } else { -1 36520 this._willSettleAt(new c(function(resolve$$12) { -1 36521 return resolve$$12(entry); -1 36522 }), i); -1 36523 } -1 36524 } else { -1 36525 this._willSettleAt(resolve$$1(entry), i); 18337 36526 } 18338 36527 };18339 -1 q.defer(function(res, rej) {18340 -1 var node = frame.node;18341 -1 Object(_send_command_to_frame__WEBPACK_IMPORTED_MODULE_1__['default'])(node, params, function(data) {18342 -1 if (data) {18343 -1 return res({18344 -1 results: data,18345 -1 frameElement: node,18346 -1 frame: Object(_get_selector__WEBPACK_IMPORTED_MODULE_3__['default'])(node)18347 -1 });-1 36528 Enumerator2.prototype._settledAt = function _settledAt(state, i, value) { -1 36529 var promise = this.promise; -1 36530 if (promise._state === PENDING) { -1 36531 this._remaining--; -1 36532 if (state === REJECTED) { -1 36533 reject(promise, value); -1 36534 } else { -1 36535 this._result[i] = value; 18348 36536 }18349 -1 res(null);18350 -1 }, rej);18351 -1 });18352 -1 });18353 -1 q.then(function(data) {18354 -1 resolve(Object(_merge_results__WEBPACK_IMPORTED_MODULE_2__['default'])(data, options));18355 -1 })['catch'](reject);18356 -1 }18357 -1 __webpack_exports__['default'] = collectResultsFromFrames;18358 -1 },18359 -1 './lib/core/utils/contains.js': function libCoreUtilsContainsJs(module, __webpack_exports__, __webpack_require__) {18360 -1 'use strict';18361 -1 __webpack_require__.r(__webpack_exports__);18362 -1 function contains(vNode, otherVNode) {18363 -1 function containsShadowChild(vNode, otherVNode) {18364 -1 if (vNode.shadowId === otherVNode.shadowId) {18365 -1 return true;-1 36537 } -1 36538 if (this._remaining === 0) { -1 36539 fulfill(promise, this._result); -1 36540 } -1 36541 }; -1 36542 Enumerator2.prototype._willSettleAt = function _willSettleAt(promise, i) { -1 36543 var enumerator = this; -1 36544 subscribe2(promise, void 0, function(value) { -1 36545 return enumerator._settledAt(FULFILLED, i, value); -1 36546 }, function(reason) { -1 36547 return enumerator._settledAt(REJECTED, i, reason); -1 36548 }); -1 36549 }; -1 36550 return Enumerator2; -1 36551 }(); -1 36552 function all(entries) { -1 36553 return new Enumerator(this, entries).promise; -1 36554 } -1 36555 function race(entries) { -1 36556 var Constructor = this; -1 36557 if (!isArray(entries)) { -1 36558 return new Constructor(function(_, reject2) { -1 36559 return reject2(new TypeError('You must pass an array to race.')); -1 36560 }); -1 36561 } else { -1 36562 return new Constructor(function(resolve2, reject2) { -1 36563 var length = entries.length; -1 36564 for (var i = 0; i < length; i++) { -1 36565 Constructor.resolve(entries[i]).then(resolve2, reject2); -1 36566 } -1 36567 }); 18366 36568 }18367 -1 return !!vNode.children.find(function(child) {18368 -1 return containsShadowChild(child, otherVNode);18369 -1 });18370 36569 }18371 -1 if (vNode.shadowId || otherVNode.shadowId) {18372 -1 return containsShadowChild(vNode, otherVNode);-1 36570 function reject$1(reason) { -1 36571 var Constructor = this; -1 36572 var promise = new Constructor(noop4); -1 36573 reject(promise, reason); -1 36574 return promise; 18373 36575 }18374 -1 if (vNode.actualNode) {18375 -1 if (typeof vNode.actualNode.contains === 'function') {18376 -1 return vNode.actualNode.contains(otherVNode.actualNode);18377 -1 }18378 -1 return !!(vNode.actualNode.compareDocumentPosition(otherVNode.actualNode) & 16);18379 -1 } else {18380 -1 do {18381 -1 if (otherVNode === vNode) {18382 -1 return true;18383 -1 }18384 -1 } while (otherVNode = otherVNode && otherVNode.parent);-1 36576 function needsResolver() { -1 36577 throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); 18385 36578 }18386 -1 return false;18387 -1 }18388 -1 __webpack_exports__['default'] = contains;18389 -1 },18390 -1 './lib/core/utils/css-parser.js': function libCoreUtilsCssParserJs(module, __webpack_exports__, __webpack_require__) {18391 -1 'use strict';18392 -1 __webpack_require__.r(__webpack_exports__);18393 -1 var css_selector_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./node_modules/css-selector-parser/lib/index.js');18394 -1 var css_selector_parser__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(css_selector_parser__WEBPACK_IMPORTED_MODULE_0__);18395 -1 var parser = new css_selector_parser__WEBPACK_IMPORTED_MODULE_0__['CssSelectorParser']();18396 -1 parser.registerSelectorPseudos('not');18397 -1 parser.registerNestingOperators('>');18398 -1 parser.registerAttrEqualityMods('^', '$', '*');18399 -1 __webpack_exports__['default'] = parser;18400 -1 },18401 -1 './lib/core/utils/deep-merge.js': function libCoreUtilsDeepMergeJs(module, __webpack_exports__, __webpack_require__) {18402 -1 'use strict';18403 -1 __webpack_require__.r(__webpack_exports__);18404 -1 function deepMerge() {18405 -1 var target = {};18406 -1 for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {18407 -1 sources[_key] = arguments[_key];18408 -1 }18409 -1 sources.forEach(function(source) {18410 -1 if (!source || _typeof(source) !== 'object' || Array.isArray(source)) {18411 -1 return;18412 -1 }18413 -1 for (var _i7 = 0, _Object$keys2 = Object.keys(source); _i7 < _Object$keys2.length; _i7++) {18414 -1 var key = _Object$keys2[_i7];18415 -1 if (!target.hasOwnProperty(key) || _typeof(source[key]) !== 'object' || Array.isArray(target[key])) {18416 -1 target[key] = source[key];18417 -1 } else {18418 -1 target[key] = deepMerge(target[key], source[key]);-1 36579 function needsNew() { -1 36580 throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.'); -1 36581 } -1 36582 var Promise$1 = function() { -1 36583 function Promise2(resolver) { -1 36584 this[PROMISE_ID] = nextId(); -1 36585 this._result = this._state = void 0; -1 36586 this._subscribers = []; -1 36587 if (noop4 !== resolver) { -1 36588 typeof resolver !== 'function' && needsResolver(); -1 36589 this instanceof Promise2 ? initializePromise(this, resolver) : needsNew(); 18419 36590 } 18420 36591 }18421 -1 });18422 -1 return target;18423 -1 }18424 -1 __webpack_exports__['default'] = deepMerge;18425 -1 },18426 -1 './lib/core/utils/dq-element.js': function libCoreUtilsDqElementJs(module, __webpack_exports__, __webpack_require__) {18427 -1 'use strict';18428 -1 __webpack_require__.r(__webpack_exports__);18429 -1 var _get_selector__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/get-selector.js');18430 -1 var _get_ancestry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/get-ancestry.js');18431 -1 var _get_xpath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/get-xpath.js');18432 -1 function truncate(str, maxLength) {18433 -1 maxLength = maxLength || 300;18434 -1 if (str.length > maxLength) {18435 -1 var index = str.indexOf('>');18436 -1 str = str.substring(0, index + 1);18437 -1 }18438 -1 return str;18439 -1 }18440 -1 function getSource(element) {18441 -1 var source = element.outerHTML;18442 -1 if (!source && typeof XMLSerializer === 'function') {18443 -1 source = new XMLSerializer().serializeToString(element);18444 -1 }18445 -1 return truncate(source || '');18446 -1 }18447 -1 function DqElement(element, options, spec) {18448 -1 this._fromFrame = !!spec;18449 -1 this.spec = spec || {};18450 -1 if (options && options.absolutePaths) {18451 -1 this._options = {18452 -1 toRoot: true-1 36592 Promise2.prototype['catch'] = function _catch(onRejection) { -1 36593 return this.then(null, onRejection); 18453 36594 };18454 -1 }18455 -1 this.source = this.spec.source !== undefined ? this.spec.source : getSource(element);18456 -1 this._element = element;18457 -1 }18458 -1 DqElement.prototype = {18459 -1 get selector() {18460 -1 return this.spec.selector || [ Object(_get_selector__WEBPACK_IMPORTED_MODULE_0__['default'])(this.element, this._options) ];18461 -1 },18462 -1 get ancestry() {18463 -1 return this.spec.ancestry || [ Object(_get_ancestry__WEBPACK_IMPORTED_MODULE_1__['default'])(this.element) ];18464 -1 },18465 -1 get xpath() {18466 -1 return this.spec.xpath || [ Object(_get_xpath__WEBPACK_IMPORTED_MODULE_2__['default'])(this.element) ];18467 -1 },18468 -1 get element() {18469 -1 return this._element;18470 -1 },18471 -1 get fromFrame() {18472 -1 return this._fromFrame;18473 -1 },18474 -1 toJSON: function toJSON() {18475 -1 'use strict';18476 -1 return {18477 -1 selector: this.selector,18478 -1 source: this.source,18479 -1 xpath: this.xpath,18480 -1 ancestry: this.ancestry-1 36595 Promise2.prototype['finally'] = function _finally(callback) { -1 36596 var promise = this; -1 36597 var constructor = promise.constructor; -1 36598 if (isFunction(callback)) { -1 36599 return promise.then(function(value) { -1 36600 return constructor.resolve(callback()).then(function() { -1 36601 return value; -1 36602 }); -1 36603 }, function(reason) { -1 36604 return constructor.resolve(callback()).then(function() { -1 36605 throw reason; -1 36606 }); -1 36607 }); -1 36608 } -1 36609 return promise.then(callback, callback); 18481 36610 };18482 -1 }18483 -1 };18484 -1 DqElement.fromFrame = function(node, options, frame) {18485 -1 var spec = _extends({}, node, {18486 -1 selector: [].concat(_toConsumableArray(frame.selector), _toConsumableArray(node.selector)),18487 -1 ancestry: [].concat(_toConsumableArray(frame.ancestry), _toConsumableArray(node.ancestry)),18488 -1 xpath: [].concat(_toConsumableArray(frame.xpath), _toConsumableArray(node.xpath))18489 -1 });18490 -1 return new DqElement(frame.element, options, spec);18491 -1 };18492 -1 __webpack_exports__['default'] = DqElement;18493 -1 },18494 -1 './lib/core/utils/element-matches.js': function libCoreUtilsElementMatchesJs(module, __webpack_exports__, __webpack_require__) {18495 -1 'use strict';18496 -1 __webpack_require__.r(__webpack_exports__);18497 -1 var matchesSelector = function() {18498 -1 var method;18499 -1 function getMethod(node) {18500 -1 var index, candidate, candidates = [ 'matches', 'matchesSelector', 'mozMatchesSelector', 'webkitMatchesSelector', 'msMatchesSelector' ], length = candidates.length;18501 -1 for (index = 0; index < length; index++) {18502 -1 candidate = candidates[index];18503 -1 if (node[candidate]) {18504 -1 return candidate;-1 36611 return Promise2; -1 36612 }(); -1 36613 Promise$1.prototype.then = then; -1 36614 Promise$1.all = all; -1 36615 Promise$1.race = race; -1 36616 Promise$1.resolve = resolve$1; -1 36617 Promise$1.reject = reject$1; -1 36618 Promise$1._setScheduler = setScheduler; -1 36619 Promise$1._setAsap = setAsap; -1 36620 Promise$1._asap = asap; -1 36621 function polyfill() { -1 36622 var local = void 0; -1 36623 if (typeof global !== 'undefined') { -1 36624 local = global; -1 36625 } else if (typeof self !== 'undefined') { -1 36626 local = self; -1 36627 } else { -1 36628 try { -1 36629 local = Function('return this')(); -1 36630 } catch (e) { -1 36631 throw new Error('polyfill failed because global object is unavailable in this environment'); 18505 36632 } 18506 36633 }18507 -1 }18508 -1 return function(node, selector) {18509 -1 if (!method || !node[method]) {18510 -1 method = getMethod(node);-1 36634 var P = local.Promise; -1 36635 if (P) { -1 36636 var promiseToString = null; -1 36637 try { -1 36638 promiseToString = Object.prototype.toString.call(P.resolve()); -1 36639 } catch (e) {} -1 36640 if (promiseToString === '[object Promise]' && !P.cast) { -1 36641 return; -1 36642 } 18511 36643 }18512 -1 if (node[method]) {18513 -1 return node[method](selector);-1 36644 local.Promise = Promise$1; -1 36645 } -1 36646 Promise$1.polyfill = polyfill; -1 36647 Promise$1.Promise = Promise$1; -1 36648 return Promise$1; -1 36649 }); -1 36650 }); -1 36651 var require_typedarray = __commonJS(function(exports) { -1 36652 var undefined2 = void 0; -1 36653 var MAX_ARRAY_LENGTH = 1e5; -1 36654 var ECMAScript = function() { -1 36655 var opts = Object.prototype.toString, ophop = Object.prototype.hasOwnProperty; -1 36656 return { -1 36657 Class: function Class(v) { -1 36658 return opts.call(v).replace(/^\[object *|\]$/g, ''); -1 36659 }, -1 36660 HasProperty: function HasProperty(o, p) { -1 36661 return p in o; -1 36662 }, -1 36663 HasOwnProperty: function HasOwnProperty(o, p) { -1 36664 return ophop.call(o, p); -1 36665 }, -1 36666 IsCallable: function IsCallable(o) { -1 36667 return typeof o === 'function'; -1 36668 }, -1 36669 ToInt32: function ToInt32(v) { -1 36670 return v >> 0; -1 36671 }, -1 36672 ToUint32: function ToUint32(v) { -1 36673 return v >>> 0; 18514 36674 }18515 -1 return false;18516 36675 }; 18517 36676 }();18518 -1 __webpack_exports__['default'] = matchesSelector;18519 -1 },18520 -1 './lib/core/utils/escape-selector.js': function libCoreUtilsEscapeSelectorJs(module, __webpack_exports__, __webpack_require__) {18521 -1 'use strict';18522 -1 __webpack_require__.r(__webpack_exports__);18523 -1 function escapeSelector(value) {18524 -1 var string = String(value);18525 -1 var length = string.length;18526 -1 var index = -1;18527 -1 var codeUnit;18528 -1 var result = '';18529 -1 var firstCodeUnit = string.charCodeAt(0);18530 -1 while (++index < length) {18531 -1 codeUnit = string.charCodeAt(index);18532 -1 if (codeUnit == 0) {18533 -1 result += '\ufffd';18534 -1 continue;18535 -1 }18536 -1 if (codeUnit >= 1 && codeUnit <= 31 || codeUnit == 127 || index == 0 && codeUnit >= 48 && codeUnit <= 57 || index == 1 && codeUnit >= 48 && codeUnit <= 57 && firstCodeUnit == 45) {18537 -1 result += '\\' + codeUnit.toString(16) + ' ';18538 -1 continue;18539 -1 }18540 -1 if (index == 0 && length == 1 && codeUnit == 45) {18541 -1 result += '\\' + string.charAt(index);18542 -1 continue;18543 -1 }18544 -1 if (codeUnit >= 128 || codeUnit == 45 || codeUnit == 95 || codeUnit >= 48 && codeUnit <= 57 || codeUnit >= 65 && codeUnit <= 90 || codeUnit >= 97 && codeUnit <= 122) {18545 -1 result += string.charAt(index);18546 -1 continue;18547 -1 }18548 -1 result += '\\' + string.charAt(index);18549 -1 }18550 -1 return result;18551 -1 }18552 -1 __webpack_exports__['default'] = escapeSelector;18553 -1 },18554 -1 './lib/core/utils/extend-meta-data.js': function libCoreUtilsExtendMetaDataJs(module, __webpack_exports__, __webpack_require__) {18555 -1 'use strict';18556 -1 __webpack_require__.r(__webpack_exports__);18557 -1 function extendMetaData(to, from) {18558 -1 Object.assign(to, from);18559 -1 Object.keys(from).filter(function(prop) {18560 -1 return typeof from[prop] === 'function';18561 -1 }).forEach(function(prop) {18562 -1 to[prop] = null;18563 -1 try {18564 -1 to[prop] = from[prop](to);18565 -1 } catch (e) {}18566 -1 });18567 -1 }18568 -1 __webpack_exports__['default'] = extendMetaData;18569 -1 },18570 -1 './lib/core/utils/finalize-result.js': function libCoreUtilsFinalizeResultJs(module, __webpack_exports__, __webpack_require__) {18571 -1 'use strict';18572 -1 __webpack_require__.r(__webpack_exports__);18573 -1 var _aggregate_node_results__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/aggregate-node-results.js');18574 -1 function finalizeRuleResult(ruleResult) {18575 -1 var rule = axe._audit.rules.find(function(rule) {18576 -1 return rule.id === ruleResult.id;18577 -1 });18578 -1 if (rule && rule.impact) {18579 -1 ruleResult.nodes.forEach(function(node) {18580 -1 [ 'any', 'all', 'none' ].forEach(function(checkType) {18581 -1 (node[checkType] || []).forEach(function(checkResult) {18582 -1 checkResult.impact = rule.impact;18583 -1 });-1 36677 var LN2 = Math.LN2; -1 36678 var abs = Math.abs; -1 36679 var floor = Math.floor; -1 36680 var log10 = Math.log; -1 36681 var min = Math.min; -1 36682 var pow = Math.pow; -1 36683 var round = Math.round; -1 36684 function configureProperties(obj) { -1 36685 if (getOwnPropNames && defineProp) { -1 36686 var props = getOwnPropNames(obj), i; -1 36687 for (i = 0; i < props.length; i += 1) { -1 36688 defineProp(obj, props[i], { -1 36689 value: obj[props[i]], -1 36690 writable: false, -1 36691 enumerable: false, -1 36692 configurable: false 18584 36693 });18585 -1 });18586 -1 }18587 -1 Object.assign(ruleResult, Object(_aggregate_node_results__WEBPACK_IMPORTED_MODULE_0__['default'])(ruleResult.nodes));18588 -1 delete ruleResult.nodes;18589 -1 return ruleResult;18590 -1 }18591 -1 __webpack_exports__['default'] = finalizeRuleResult;18592 -1 },18593 -1 './lib/core/utils/find-by.js': function libCoreUtilsFindByJs(module, __webpack_exports__, __webpack_require__) {18594 -1 'use strict';18595 -1 __webpack_require__.r(__webpack_exports__);18596 -1 function findBy(array, key, value) {18597 -1 if (Array.isArray(array)) {18598 -1 return array.find(function(obj) {18599 -1 return _typeof(obj) === 'object' && obj[key] === value;18600 -1 });18601 -1 }18602 -1 }18603 -1 __webpack_exports__['default'] = findBy;18604 -1 },18605 -1 './lib/core/utils/get-all-checks.js': function libCoreUtilsGetAllChecksJs(module, __webpack_exports__, __webpack_require__) {18606 -1 'use strict';18607 -1 __webpack_require__.r(__webpack_exports__);18608 -1 function getAllChecks(object) {18609 -1 var result = [];18610 -1 return result.concat(object.any || []).concat(object.all || []).concat(object.none || []);18611 -1 }18612 -1 __webpack_exports__['default'] = getAllChecks;18613 -1 },18614 -1 './lib/core/utils/get-ancestry.js': function libCoreUtilsGetAncestryJs(module, __webpack_exports__, __webpack_require__) {18615 -1 'use strict';18616 -1 __webpack_require__.r(__webpack_exports__);18617 -1 __webpack_require__.d(__webpack_exports__, 'default', function() {18618 -1 return getAncestry;18619 -1 });18620 -1 var _get_shadow_selector__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/get-shadow-selector.js');18621 -1 function generateAncestry(node) {18622 -1 var nodeName = node.nodeName.toLowerCase();18623 -1 var parent = node.parentElement;18624 -1 if (!parent) {18625 -1 return nodeName;18626 -1 }18627 -1 var nthChild = '';18628 -1 if (nodeName !== 'head' && nodeName !== 'body' && parent.children.length > 1) {18629 -1 var index = Array.prototype.indexOf.call(parent.children, node) + 1;18630 -1 nthChild = ':nth-child('.concat(index, ')');18631 -1 }18632 -1 return generateAncestry(parent) + ' > ' + nodeName + nthChild;18633 -1 }18634 -1 function getAncestry(elm, options) {18635 -1 return Object(_get_shadow_selector__WEBPACK_IMPORTED_MODULE_0__['default'])(generateAncestry, elm, options);18636 -1 }18637 -1 },18638 -1 './lib/core/utils/get-base-lang.js': function libCoreUtilsGetBaseLangJs(module, __webpack_exports__, __webpack_require__) {18639 -1 'use strict';18640 -1 __webpack_require__.r(__webpack_exports__);18641 -1 function getBaseLang(lang) {18642 -1 if (!lang) {18643 -1 return '';-1 36694 } 18644 36695 }18645 -1 return lang.trim().split('-')[0].toLowerCase();18646 36696 }18647 -1 __webpack_exports__['default'] = getBaseLang;18648 -1 },18649 -1 './lib/core/utils/get-check-message.js': function libCoreUtilsGetCheckMessageJs(module, __webpack_exports__, __webpack_require__) {18650 -1 'use strict';18651 -1 __webpack_require__.r(__webpack_exports__);18652 -1 var _process_message__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/process-message.js');18653 -1 function getCheckMessage(checkId, type, data) {18654 -1 var check = axe._audit.data.checks[checkId];18655 -1 if (!check) {18656 -1 throw new Error('Cannot get message for unknown check: '.concat(checkId, '.'));18657 -1 }18658 -1 if (!check.messages[type]) {18659 -1 throw new Error('Check "'.concat(checkId, '"" does not have a "').concat(type, '" message.'));-1 36697 var defineProp; -1 36698 if (Object.defineProperty && function() { -1 36699 try { -1 36700 Object.defineProperty({}, 'x', {}); -1 36701 return true; -1 36702 } catch (e) { -1 36703 return false; 18660 36704 }18661 -1 return Object(_process_message__WEBPACK_IMPORTED_MODULE_0__['default'])(check.messages[type], data);18662 -1 }18663 -1 __webpack_exports__['default'] = getCheckMessage;18664 -1 },18665 -1 './lib/core/utils/get-check-option.js': function libCoreUtilsGetCheckOptionJs(module, __webpack_exports__, __webpack_require__) {18666 -1 'use strict';18667 -1 __webpack_require__.r(__webpack_exports__);18668 -1 function getCheckOption(check, ruleID, options) {18669 -1 var ruleCheckOption = ((options.rules && options.rules[ruleID] || {}).checks || {})[check.id];18670 -1 var checkOption = (options.checks || {})[check.id];18671 -1 var enabled = check.enabled;18672 -1 var opts = check.options;18673 -1 if (checkOption) {18674 -1 if (checkOption.hasOwnProperty('enabled')) {18675 -1 enabled = checkOption.enabled;-1 36705 }()) { -1 36706 defineProp = Object.defineProperty; -1 36707 } else { -1 36708 defineProp = function defineProp(o, p, desc) { -1 36709 if (!o === Object(o)) { -1 36710 throw new TypeError('Object.defineProperty called on non-object'); 18676 36711 }18677 -1 if (checkOption.hasOwnProperty('options')) {18678 -1 opts = checkOption.options;-1 36712 if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) { -1 36713 Object.prototype.__defineGetter__.call(o, p, desc.get); 18679 36714 }18680 -1 }18681 -1 if (ruleCheckOption) {18682 -1 if (ruleCheckOption.hasOwnProperty('enabled')) {18683 -1 enabled = ruleCheckOption.enabled;-1 36715 if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) { -1 36716 Object.prototype.__defineSetter__.call(o, p, desc.set); 18684 36717 }18685 -1 if (ruleCheckOption.hasOwnProperty('options')) {18686 -1 opts = ruleCheckOption.options;-1 36718 if (ECMAScript.HasProperty(desc, 'value')) { -1 36719 o[p] = desc.value; 18687 36720 }18688 -1 }18689 -1 return {18690 -1 enabled: enabled,18691 -1 options: opts,18692 -1 absolutePaths: options.absolutePaths-1 36721 return o; 18693 36722 }; 18694 36723 }18695 -1 __webpack_exports__['default'] = getCheckOption;18696 -1 },18697 -1 './lib/core/utils/get-flattened-tree.js': function libCoreUtilsGetFlattenedTreeJs(module, __webpack_exports__, __webpack_require__) {18698 -1 'use strict';18699 -1 __webpack_require__.r(__webpack_exports__);18700 -1 var _is_shadow_root__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/is-shadow-root.js');18701 -1 var _base_virtual_node_virtual_node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/virtual-node/virtual-node.js');18702 -1 var _base_cache__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/base/cache.js');18703 -1 function getSlotChildren(node) {18704 -1 var retVal = [];18705 -1 node = node.firstChild;18706 -1 while (node) {18707 -1 retVal.push(node);18708 -1 node = node.nextSibling;18709 -1 }18710 -1 return retVal;18711 -1 }18712 -1 function flattenTree(node, shadowId, parent) {18713 -1 var retVal, realArray, nodeName;18714 -1 function reduceShadowDOM(res, child, parent) {18715 -1 var replacements = flattenTree(child, shadowId, parent);18716 -1 if (replacements) {18717 -1 res = res.concat(replacements);18718 -1 }18719 -1 return res;18720 -1 }18721 -1 if (node.documentElement) {18722 -1 node = node.documentElement;-1 36724 var getOwnPropNames = Object.getOwnPropertyNames || function(o) { -1 36725 if (o !== Object(o)) { -1 36726 throw new TypeError('Object.getOwnPropertyNames called on non-object'); 18723 36727 }18724 -1 nodeName = node.nodeName.toLowerCase();18725 -1 if (Object(_is_shadow_root__WEBPACK_IMPORTED_MODULE_0__['default'])(node)) {18726 -1 retVal = new _base_virtual_node_virtual_node__WEBPACK_IMPORTED_MODULE_1__['default'](node, parent, shadowId);18727 -1 shadowId = 'a' + Math.random().toString().substring(2);18728 -1 realArray = Array.from(node.shadowRoot.childNodes);18729 -1 retVal.children = realArray.reduce(function(res, child) {18730 -1 return reduceShadowDOM(res, child, retVal);18731 -1 }, []);18732 -1 return [ retVal ];18733 -1 } else {18734 -1 if (nodeName === 'content' && typeof node.getDistributedNodes === 'function') {18735 -1 realArray = Array.from(node.getDistributedNodes());18736 -1 return realArray.reduce(function(res, child) {18737 -1 return reduceShadowDOM(res, child, parent);18738 -1 }, []);18739 -1 } else if (nodeName === 'slot' && typeof node.assignedNodes === 'function') {18740 -1 realArray = Array.from(node.assignedNodes());18741 -1 if (!realArray.length) {18742 -1 realArray = getSlotChildren(node);18743 -1 }18744 -1 var styl = window.getComputedStyle(node);18745 -1 if (false) {} else {18746 -1 return realArray.reduce(function(res, child) {18747 -1 return reduceShadowDOM(res, child, parent);18748 -1 }, []);18749 -1 }18750 -1 } else {18751 -1 if (node.nodeType === 1) {18752 -1 retVal = new _base_virtual_node_virtual_node__WEBPACK_IMPORTED_MODULE_1__['default'](node, parent, shadowId);18753 -1 realArray = Array.from(node.childNodes);18754 -1 retVal.children = realArray.reduce(function(res, child) {18755 -1 return reduceShadowDOM(res, child, retVal);18756 -1 }, []);18757 -1 return [ retVal ];18758 -1 } else if (node.nodeType === 3) {18759 -1 return [ new _base_virtual_node_virtual_node__WEBPACK_IMPORTED_MODULE_1__['default'](node, parent) ];18760 -1 }18761 -1 return undefined;-1 36728 var props = [], p; -1 36729 for (p in o) { -1 36730 if (ECMAScript.HasOwnProperty(o, p)) { -1 36731 props.push(p); 18762 36732 } 18763 36733 }18764 -1 }18765 -1 function getFlattenedTree() {18766 -1 var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.documentElement;18767 -1 var shadowId = arguments.length > 1 ? arguments[1] : undefined;18768 -1 _base_cache__WEBPACK_IMPORTED_MODULE_2__['default'].set('nodeMap', new WeakMap());18769 -1 return flattenTree(node, shadowId, null);18770 -1 }18771 -1 __webpack_exports__['default'] = getFlattenedTree;18772 -1 },18773 -1 './lib/core/utils/get-friendly-uri-end.js': function libCoreUtilsGetFriendlyUriEndJs(module, __webpack_exports__, __webpack_require__) {18774 -1 'use strict';18775 -1 __webpack_require__.r(__webpack_exports__);18776 -1 function isMostlyNumbers() {18777 -1 var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';18778 -1 return str.length !== 0 && (str.match(/[0-9]/g) || '').length >= str.length / 2;18779 -1 }18780 -1 function splitString(str, splitIndex) {18781 -1 return [ str.substring(0, splitIndex), str.substring(splitIndex) ];18782 -1 }18783 -1 function trimRight(str) {18784 -1 return str.replace(/\s+$/, '');18785 -1 }18786 -1 function uriParser(url) {18787 -1 var original = url;18788 -1 var protocol = '', domain = '', port = '', path = '', query = '', hash = '';18789 -1 if (url.includes('#')) {18790 -1 var _splitString = splitString(url, url.indexOf('#'));18791 -1 var _splitString2 = _slicedToArray(_splitString, 2);18792 -1 url = _splitString2[0];18793 -1 hash = _splitString2[1];18794 -1 }18795 -1 if (url.includes('?')) {18796 -1 var _splitString3 = splitString(url, url.indexOf('?'));18797 -1 var _splitString4 = _slicedToArray(_splitString3, 2);18798 -1 url = _splitString4[0];18799 -1 query = _splitString4[1];18800 -1 }18801 -1 if (url.includes('://')) {18802 -1 var _url$split = url.split('://');18803 -1 var _url$split2 = _slicedToArray(_url$split, 2);18804 -1 protocol = _url$split2[0];18805 -1 url = _url$split2[1];18806 -1 var _splitString5 = splitString(url, url.indexOf('/'));18807 -1 var _splitString6 = _slicedToArray(_splitString5, 2);18808 -1 domain = _splitString6[0];18809 -1 url = _splitString6[1];18810 -1 } else if (url.substr(0, 2) === '//') {18811 -1 url = url.substr(2);18812 -1 var _splitString7 = splitString(url, url.indexOf('/'));18813 -1 var _splitString8 = _slicedToArray(_splitString7, 2);18814 -1 domain = _splitString8[0];18815 -1 url = _splitString8[1];18816 -1 }18817 -1 if (domain.substr(0, 4) === 'www.') {18818 -1 domain = domain.substr(4);18819 -1 }18820 -1 if (domain && domain.includes(':')) {18821 -1 var _splitString9 = splitString(domain, domain.indexOf(':'));18822 -1 var _splitString10 = _slicedToArray(_splitString9, 2);18823 -1 domain = _splitString10[0];18824 -1 port = _splitString10[1];18825 -1 }18826 -1 path = url;18827 -1 return {18828 -1 original: original,18829 -1 protocol: protocol,18830 -1 domain: domain,18831 -1 port: port,18832 -1 path: path,18833 -1 query: query,18834 -1 hash: hash18835 -1 };18836 -1 }18837 -1 function getFriendlyUriEnd() {18838 -1 var uri = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';18839 -1 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};18840 -1 if (uri.length <= 1 || uri.substr(0, 5) === 'data:' || uri.substr(0, 11) === 'javascript:' || uri.includes('?')) {-1 36734 return props; -1 36735 }; -1 36736 function makeArrayAccessors(obj) { -1 36737 if (!defineProp) { 18841 36738 return; 18842 36739 }18843 -1 var currentDomain = options.currentDomain, _options$maxLength = options.maxLength, maxLength = _options$maxLength === void 0 ? 25 : _options$maxLength;18844 -1 var _uriParser = uriParser(uri), path = _uriParser.path, domain = _uriParser.domain, hash = _uriParser.hash;18845 -1 var pathEnd = path.substr(path.substr(0, path.length - 2).lastIndexOf('/') + 1);18846 -1 if (hash) {18847 -1 if (pathEnd && (pathEnd + hash).length <= maxLength) {18848 -1 return trimRight(pathEnd + hash);18849 -1 } else if (pathEnd.length < 2 && hash.length > 2 && hash.length <= maxLength) {18850 -1 return trimRight(hash);18851 -1 } else {18852 -1 return;18853 -1 }18854 -1 } else if (domain && domain.length < maxLength && path.length <= 1) {18855 -1 return trimRight(domain + path);-1 36740 if (obj.length > MAX_ARRAY_LENGTH) { -1 36741 throw new RangeError('Array too large for polyfill'); 18856 36742 }18857 -1 if (path === '/' + pathEnd && domain && currentDomain && domain !== currentDomain && (domain + path).length <= maxLength) {18858 -1 return trimRight(domain + path);-1 36743 function makeArrayAccessor(index) { -1 36744 defineProp(obj, index, { -1 36745 get: function get() { -1 36746 return obj._getter(index); -1 36747 }, -1 36748 set: function set(v) { -1 36749 obj._setter(index, v); -1 36750 }, -1 36751 enumerable: true, -1 36752 configurable: false -1 36753 }); 18859 36754 }18860 -1 var lastDotIndex = pathEnd.lastIndexOf('.');18861 -1 if ((lastDotIndex === -1 || lastDotIndex > 1) && (lastDotIndex !== -1 || pathEnd.length > 2) && pathEnd.length <= maxLength && !pathEnd.match(/index(\.[a-zA-Z]{2-4})?/) && !isMostlyNumbers(pathEnd)) {18862 -1 return trimRight(pathEnd);-1 36755 var i; -1 36756 for (i = 0; i < obj.length; i += 1) { -1 36757 makeArrayAccessor(i); 18863 36758 } 18864 36759 }18865 -1 __webpack_exports__['default'] = getFriendlyUriEnd;18866 -1 },18867 -1 './lib/core/utils/get-node-attributes.js': function libCoreUtilsGetNodeAttributesJs(module, __webpack_exports__, __webpack_require__) {18868 -1 'use strict';18869 -1 __webpack_require__.r(__webpack_exports__);18870 -1 function getNodeAttributes(node) {18871 -1 if (node.attributes instanceof window.NamedNodeMap) {18872 -1 return node.attributes;18873 -1 }18874 -1 return node.cloneNode(false).attributes;-1 36760 function as_signed(value, bits) { -1 36761 var s = 32 - bits; -1 36762 return value << s >> s; 18875 36763 }18876 -1 __webpack_exports__['default'] = getNodeAttributes;18877 -1 },18878 -1 './lib/core/utils/get-node-from-tree.js': function libCoreUtilsGetNodeFromTreeJs(module, __webpack_exports__, __webpack_require__) {18879 -1 'use strict';18880 -1 __webpack_require__.r(__webpack_exports__);18881 -1 var _base_cache__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/base/cache.js');18882 -1 function getNodeFromTree(vNode, node) {18883 -1 var el = node || vNode;18884 -1 return _base_cache__WEBPACK_IMPORTED_MODULE_0__['default'].get('nodeMap') ? _base_cache__WEBPACK_IMPORTED_MODULE_0__['default'].get('nodeMap').get(el) : null;-1 36764 function as_unsigned(value, bits) { -1 36765 var s = 32 - bits; -1 36766 return value << s >>> s; 18885 36767 }18886 -1 __webpack_exports__['default'] = getNodeFromTree;18887 -1 },18888 -1 './lib/core/utils/get-root-node.js': function libCoreUtilsGetRootNodeJs(module, __webpack_exports__, __webpack_require__) {18889 -1 'use strict';18890 -1 __webpack_require__.r(__webpack_exports__);18891 -1 function getRootNode(node) {18892 -1 var doc = node.getRootNode && node.getRootNode() || document;18893 -1 if (doc === node) {18894 -1 doc = document;18895 -1 }18896 -1 return doc;-1 36768 function packI8(n) { -1 36769 return [ n & 255 ]; 18897 36770 }18898 -1 __webpack_exports__['default'] = getRootNode;18899 -1 },18900 -1 './lib/core/utils/get-scroll-state.js': function libCoreUtilsGetScrollStateJs(module, __webpack_exports__, __webpack_require__) {18901 -1 'use strict';18902 -1 __webpack_require__.r(__webpack_exports__);18903 -1 var _get_scroll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/get-scroll.js');18904 -1 function getElmScrollRecursive(root) {18905 -1 return Array.from(root.children || root.childNodes || []).reduce(function(scrolls, elm) {18906 -1 var scroll = Object(_get_scroll__WEBPACK_IMPORTED_MODULE_0__['default'])(elm);18907 -1 if (scroll) {18908 -1 scrolls.push(scroll);18909 -1 }18910 -1 return scrolls.concat(getElmScrollRecursive(elm));18911 -1 }, []);-1 36771 function unpackI8(bytes) { -1 36772 return as_signed(bytes[0], 8); 18912 36773 }18913 -1 function getScrollState() {18914 -1 var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;18915 -1 var root = win.document.documentElement;18916 -1 var windowScroll = [ win.pageXOffset !== undefined ? {18917 -1 elm: win,18918 -1 top: win.pageYOffset,18919 -1 left: win.pageXOffset18920 -1 } : {18921 -1 elm: root,18922 -1 top: root.scrollTop,18923 -1 left: root.scrollLeft18924 -1 } ];18925 -1 return windowScroll.concat(getElmScrollRecursive(document.body));-1 36774 function packU8(n) { -1 36775 return [ n & 255 ]; 18926 36776 }18927 -1 __webpack_exports__['default'] = getScrollState;18928 -1 },18929 -1 './lib/core/utils/get-scroll.js': function libCoreUtilsGetScrollJs(module, __webpack_exports__, __webpack_require__) {18930 -1 'use strict';18931 -1 __webpack_require__.r(__webpack_exports__);18932 -1 function getScroll(elm) {18933 -1 var buffer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;18934 -1 var overflowX = elm.scrollWidth > elm.clientWidth + buffer;18935 -1 var overflowY = elm.scrollHeight > elm.clientHeight + buffer;18936 -1 if (!(overflowX || overflowY)) {18937 -1 return;18938 -1 }18939 -1 var style = window.getComputedStyle(elm);18940 -1 var overflowXStyle = style.getPropertyValue('overflow-x');18941 -1 var overflowYStyle = style.getPropertyValue('overflow-y');18942 -1 var scrollableX = overflowXStyle !== 'visible' && overflowXStyle !== 'hidden';18943 -1 var scrollableY = overflowYStyle !== 'visible' && overflowYStyle !== 'hidden';18944 -1 if (overflowX && scrollableX || overflowY && scrollableY) {18945 -1 return {18946 -1 elm: elm,18947 -1 top: elm.scrollTop,18948 -1 left: elm.scrollLeft18949 -1 };18950 -1 }-1 36777 function unpackU8(bytes) { -1 36778 return as_unsigned(bytes[0], 8); 18951 36779 }18952 -1 __webpack_exports__['default'] = getScroll;18953 -1 },18954 -1 './lib/core/utils/get-selector.js': function libCoreUtilsGetSelectorJs(module, __webpack_exports__, __webpack_require__) {18955 -1 'use strict';18956 -1 __webpack_require__.r(__webpack_exports__);18957 -1 __webpack_require__.d(__webpack_exports__, 'getSelectorData', function() {18958 -1 return getSelectorData;18959 -1 });18960 -1 __webpack_require__.d(__webpack_exports__, 'default', function() {18961 -1 return getSelector;18962 -1 });18963 -1 var _escape_selector__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/escape-selector.js');18964 -1 var _get_friendly_uri_end__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/get-friendly-uri-end.js');18965 -1 var _get_node_attributes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/get-node-attributes.js');18966 -1 var _element_matches__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/element-matches.js');18967 -1 var _is_xhtml__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/core/utils/is-xhtml.js');18968 -1 var _get_shadow_selector__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/core/utils/get-shadow-selector.js');18969 -1 var xhtml;18970 -1 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' ];18971 -1 var MAXATTRIBUTELENGTH = 31;18972 -1 function getAttributeNameValue(node, at) {18973 -1 var name = at.name;18974 -1 var atnv;18975 -1 if (name.indexOf('href') !== -1 || name.indexOf('src') !== -1) {18976 -1 var friendly = Object(_get_friendly_uri_end__WEBPACK_IMPORTED_MODULE_1__['default'])(node.getAttribute(name));18977 -1 if (friendly) {18978 -1 var value = encodeURI(friendly);18979 -1 if (value) {18980 -1 atnv = Object(_escape_selector__WEBPACK_IMPORTED_MODULE_0__['default'])(at.name) + '$="' + Object(_escape_selector__WEBPACK_IMPORTED_MODULE_0__['default'])(value) + '"';-1 36780 function packU8Clamped(n) { -1 36781 n = round(Number(n)); -1 36782 return [ n < 0 ? 0 : n > 255 ? 255 : n & 255 ]; -1 36783 } -1 36784 function packI16(n) { -1 36785 return [ n >> 8 & 255, n & 255 ]; -1 36786 } -1 36787 function unpackI16(bytes) { -1 36788 return as_signed(bytes[0] << 8 | bytes[1], 16); -1 36789 } -1 36790 function packU16(n) { -1 36791 return [ n >> 8 & 255, n & 255 ]; -1 36792 } -1 36793 function unpackU16(bytes) { -1 36794 return as_unsigned(bytes[0] << 8 | bytes[1], 16); -1 36795 } -1 36796 function packI32(n) { -1 36797 return [ n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, n & 255 ]; -1 36798 } -1 36799 function unpackI32(bytes) { -1 36800 return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); -1 36801 } -1 36802 function packU32(n) { -1 36803 return [ n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, n & 255 ]; -1 36804 } -1 36805 function unpackU32(bytes) { -1 36806 return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); -1 36807 } -1 36808 function packIEEE754(v, ebits, fbits) { -1 36809 var bias = (1 << ebits - 1) - 1, s, e, f, ln, i, bits, str, bytes; -1 36810 function roundToEven(n) { -1 36811 var w = floor(n), f2 = n - w; -1 36812 if (f2 < .5) { -1 36813 return w; -1 36814 } -1 36815 if (f2 > .5) { -1 36816 return w + 1; -1 36817 } -1 36818 return w % 2 ? w + 1 : w; -1 36819 } -1 36820 if (v !== v) { -1 36821 e = (1 << ebits) - 1; -1 36822 f = pow(2, fbits - 1); -1 36823 s = 0; -1 36824 } else if (v === Infinity || v === -Infinity) { -1 36825 e = (1 << ebits) - 1; -1 36826 f = 0; -1 36827 s = v < 0 ? 1 : 0; -1 36828 } else if (v === 0) { -1 36829 e = 0; -1 36830 f = 0; -1 36831 s = 1 / v === -Infinity ? 1 : 0; -1 36832 } else { -1 36833 s = v < 0; -1 36834 v = abs(v); -1 36835 if (v >= pow(2, 1 - bias)) { -1 36836 e = min(floor(log10(v) / LN2), 1023); -1 36837 f = roundToEven(v / pow(2, e) * pow(2, fbits)); -1 36838 if (f / pow(2, fbits) >= 2) { -1 36839 e = e + 1; -1 36840 f = 1; -1 36841 } -1 36842 if (e > bias) { -1 36843 e = (1 << ebits) - 1; -1 36844 f = 0; 18981 36845 } else {18982 -1 return;-1 36846 e = e + bias; -1 36847 f = f - pow(2, fbits); 18983 36848 } 18984 36849 } else {18985 -1 atnv = Object(_escape_selector__WEBPACK_IMPORTED_MODULE_0__['default'])(at.name) + '="' + Object(_escape_selector__WEBPACK_IMPORTED_MODULE_0__['default'])(node.getAttribute(name)) + '"';18986 -1 }-1 36850 e = 0; -1 36851 f = roundToEven(v / pow(2, 1 - bias - fbits)); -1 36852 } -1 36853 } -1 36854 bits = []; -1 36855 for (i = fbits; i; i -= 1) { -1 36856 bits.push(f % 2 ? 1 : 0); -1 36857 f = floor(f / 2); -1 36858 } -1 36859 for (i = ebits; i; i -= 1) { -1 36860 bits.push(e % 2 ? 1 : 0); -1 36861 e = floor(e / 2); -1 36862 } -1 36863 bits.push(s ? 1 : 0); -1 36864 bits.reverse(); -1 36865 str = bits.join(''); -1 36866 bytes = []; -1 36867 while (str.length) { -1 36868 bytes.push(parseInt(str.substring(0, 8), 2)); -1 36869 str = str.substring(8); -1 36870 } -1 36871 return bytes; -1 36872 } -1 36873 function unpackIEEE754(bytes, ebits, fbits) { -1 36874 var bits = [], i, j, b, str, bias, s, e, f; -1 36875 for (i = bytes.length; i; i -= 1) { -1 36876 b = bytes[i - 1]; -1 36877 for (j = 8; j; j -= 1) { -1 36878 bits.push(b % 2 ? 1 : 0); -1 36879 b = b >> 1; -1 36880 } -1 36881 } -1 36882 bits.reverse(); -1 36883 str = bits.join(''); -1 36884 bias = (1 << ebits - 1) - 1; -1 36885 s = parseInt(str.substring(0, 1), 2) ? -1 : 1; -1 36886 e = parseInt(str.substring(1, 1 + ebits), 2); -1 36887 f = parseInt(str.substring(1 + ebits), 2); -1 36888 if (e === (1 << ebits) - 1) { -1 36889 return f !== 0 ? NaN : s * Infinity; -1 36890 } else if (e > 0) { -1 36891 return s * pow(2, e - bias) * (1 + f / pow(2, fbits)); -1 36892 } else if (f !== 0) { -1 36893 return s * pow(2, -(bias - 1)) * (f / pow(2, fbits)); 18987 36894 } else {18988 -1 atnv = Object(_escape_selector__WEBPACK_IMPORTED_MODULE_0__['default'])(name) + '="' + Object(_escape_selector__WEBPACK_IMPORTED_MODULE_0__['default'])(at.value) + '"';-1 36895 return s < 0 ? -0 : 0; 18989 36896 }18990 -1 return atnv;18991 36897 }18992 -1 function countSort(a, b) {18993 -1 return a.count < b.count ? -1 : a.count === b.count ? 0 : 1;-1 36898 function unpackF64(b) { -1 36899 return unpackIEEE754(b, 11, 52); 18994 36900 }18995 -1 function filterAttributes(at) {18996 -1 return !ignoredAttributes.includes(at.name) && at.name.indexOf(':') === -1 && (!at.value || at.value.length < MAXATTRIBUTELENGTH);-1 36901 function packF64(v) { -1 36902 return packIEEE754(v, 11, 52); 18997 36903 }18998 -1 function getSelectorData(domTree) {18999 -1 var data = {19000 -1 classes: {},19001 -1 tags: {},19002 -1 attributes: {}-1 36904 function unpackF32(b) { -1 36905 return unpackIEEE754(b, 8, 23); -1 36906 } -1 36907 function packF32(v) { -1 36908 return packIEEE754(v, 8, 23); -1 36909 } -1 36910 (function() { -1 36911 var ArrayBuffer = function ArrayBuffer2(length) { -1 36912 length = ECMAScript.ToInt32(length); -1 36913 if (length < 0) { -1 36914 throw new RangeError('ArrayBuffer size is not a small enough positive integer'); -1 36915 } -1 36916 this.byteLength = length; -1 36917 this._bytes = []; -1 36918 this._bytes.length = length; -1 36919 var i; -1 36920 for (i = 0; i < this.byteLength; i += 1) { -1 36921 this._bytes[i] = 0; -1 36922 } -1 36923 configureProperties(this); 19003 36924 };19004 -1 domTree = Array.isArray(domTree) ? domTree : [ domTree ];19005 -1 var currentLevel = domTree.slice();19006 -1 var stack = [];19007 -1 var _loop4 = function _loop4() {19008 -1 var current = currentLevel.pop();19009 -1 var node = current.actualNode;19010 -1 if (!!node.querySelectorAll) {19011 -1 var tag = node.nodeName;19012 -1 if (data.tags[tag]) {19013 -1 data.tags[tag]++;-1 36925 exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer; -1 36926 var ArrayBufferView = function ArrayBufferView2() {}; -1 36927 function makeConstructor(bytesPerElement, pack, unpack) { -1 36928 var _ctor; -1 36929 _ctor = function ctor(buffer, byteOffset, length) { -1 36930 var array, sequence, i, s; -1 36931 if (!arguments.length || typeof arguments[0] === 'number') { -1 36932 this.length = ECMAScript.ToInt32(arguments[0]); -1 36933 if (length < 0) { -1 36934 throw new RangeError('ArrayBufferView size is not a small enough positive integer'); -1 36935 } -1 36936 this.byteLength = this.length * this.BYTES_PER_ELEMENT; -1 36937 this.buffer = new ArrayBuffer(this.byteLength); -1 36938 this.byteOffset = 0; -1 36939 } else if (_typeof(arguments[0]) === 'object' && arguments[0].constructor === _ctor) { -1 36940 array = arguments[0]; -1 36941 this.length = array.length; -1 36942 this.byteLength = this.length * this.BYTES_PER_ELEMENT; -1 36943 this.buffer = new ArrayBuffer(this.byteLength); -1 36944 this.byteOffset = 0; -1 36945 for (i = 0; i < this.length; i += 1) { -1 36946 this._setter(i, array._getter(i)); -1 36947 } -1 36948 } else if (_typeof(arguments[0]) === 'object' && !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) { -1 36949 sequence = arguments[0]; -1 36950 this.length = ECMAScript.ToUint32(sequence.length); -1 36951 this.byteLength = this.length * this.BYTES_PER_ELEMENT; -1 36952 this.buffer = new ArrayBuffer(this.byteLength); -1 36953 this.byteOffset = 0; -1 36954 for (i = 0; i < this.length; i += 1) { -1 36955 s = sequence[i]; -1 36956 this._setter(i, Number(s)); -1 36957 } -1 36958 } else if (_typeof(arguments[0]) === 'object' && (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) { -1 36959 this.buffer = buffer; -1 36960 this.byteOffset = ECMAScript.ToUint32(byteOffset); -1 36961 if (this.byteOffset > this.buffer.byteLength) { -1 36962 throw new RangeError('byteOffset out of range'); -1 36963 } -1 36964 if (this.byteOffset % this.BYTES_PER_ELEMENT) { -1 36965 throw new RangeError('ArrayBuffer length minus the byteOffset is not a multiple of the element size.'); -1 36966 } -1 36967 if (arguments.length < 3) { -1 36968 this.byteLength = this.buffer.byteLength - this.byteOffset; -1 36969 if (this.byteLength % this.BYTES_PER_ELEMENT) { -1 36970 throw new RangeError('length of buffer minus byteOffset not a multiple of the element size'); -1 36971 } -1 36972 this.length = this.byteLength / this.BYTES_PER_ELEMENT; -1 36973 } else { -1 36974 this.length = ECMAScript.ToUint32(length); -1 36975 this.byteLength = this.length * this.BYTES_PER_ELEMENT; -1 36976 } -1 36977 if (this.byteOffset + this.byteLength > this.buffer.byteLength) { -1 36978 throw new RangeError('byteOffset and length reference an area beyond the end of the buffer'); -1 36979 } 19014 36980 } else {19015 -1 data.tags[tag] = 1;-1 36981 throw new TypeError('Unexpected argument type(s)'); 19016 36982 }19017 -1 if (node.classList) {19018 -1 Array.from(node.classList).forEach(function(cl) {19019 -1 var ind = Object(_escape_selector__WEBPACK_IMPORTED_MODULE_0__['default'])(cl);19020 -1 if (data.classes[ind]) {19021 -1 data.classes[ind]++;19022 -1 } else {19023 -1 data.classes[ind] = 1;19024 -1 }19025 -1 });-1 36983 this.constructor = _ctor; -1 36984 configureProperties(this); -1 36985 makeArrayAccessors(this); -1 36986 }; -1 36987 _ctor.prototype = new ArrayBufferView(); -1 36988 _ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement; -1 36989 _ctor.prototype._pack = pack; -1 36990 _ctor.prototype._unpack = unpack; -1 36991 _ctor.BYTES_PER_ELEMENT = bytesPerElement; -1 36992 _ctor.prototype._getter = function(index) { -1 36993 if (arguments.length < 1) { -1 36994 throw new SyntaxError('Not enough arguments'); -1 36995 } -1 36996 index = ECMAScript.ToUint32(index); -1 36997 if (index >= this.length) { -1 36998 return undefined2; -1 36999 } -1 37000 var bytes = [], i, o; -1 37001 for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1, -1 37002 o += 1) { -1 37003 bytes.push(this.buffer._bytes[o]); -1 37004 } -1 37005 return this._unpack(bytes); -1 37006 }; -1 37007 _ctor.prototype.get = _ctor.prototype._getter; -1 37008 _ctor.prototype._setter = function(index, value) { -1 37009 if (arguments.length < 2) { -1 37010 throw new SyntaxError('Not enough arguments'); 19026 37011 }19027 -1 if (node.hasAttributes()) {19028 -1 Array.from(Object(_get_node_attributes__WEBPACK_IMPORTED_MODULE_2__['default'])(node)).filter(filterAttributes).forEach(function(at) {19029 -1 var atnv = getAttributeNameValue(node, at);19030 -1 if (atnv) {19031 -1 if (data.attributes[atnv]) {19032 -1 data.attributes[atnv]++;19033 -1 } else {19034 -1 data.attributes[atnv] = 1;19035 -1 }-1 37012 index = ECMAScript.ToUint32(index); -1 37013 if (index >= this.length) { -1 37014 return undefined2; -1 37015 } -1 37016 var bytes = this._pack(value), i, o; -1 37017 for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1, -1 37018 o += 1) { -1 37019 this.buffer._bytes[o] = bytes[i]; -1 37020 } -1 37021 }; -1 37022 _ctor.prototype.set = function(index, value) { -1 37023 if (arguments.length < 1) { -1 37024 throw new SyntaxError('Not enough arguments'); -1 37025 } -1 37026 var array, sequence, offset, len, i, s, d, byteOffset, byteLength, tmp; -1 37027 if (_typeof(arguments[0]) === 'object' && arguments[0].constructor === this.constructor) { -1 37028 array = arguments[0]; -1 37029 offset = ECMAScript.ToUint32(arguments[1]); -1 37030 if (offset + array.length > this.length) { -1 37031 throw new RangeError('Offset plus length of array is out of range'); -1 37032 } -1 37033 byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT; -1 37034 byteLength = array.length * this.BYTES_PER_ELEMENT; -1 37035 if (array.buffer === this.buffer) { -1 37036 tmp = []; -1 37037 for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) { -1 37038 tmp[i] = array.buffer._bytes[s]; 19036 37039 }19037 -1 });-1 37040 for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) { -1 37041 this.buffer._bytes[d] = tmp[i]; -1 37042 } -1 37043 } else { -1 37044 for (i = 0, s = array.byteOffset, d = byteOffset; i < byteLength; i += 1, s += 1, -1 37045 d += 1) { -1 37046 this.buffer._bytes[d] = array.buffer._bytes[s]; -1 37047 } -1 37048 } -1 37049 } else if (_typeof(arguments[0]) === 'object' && typeof arguments[0].length !== 'undefined') { -1 37050 sequence = arguments[0]; -1 37051 len = ECMAScript.ToUint32(sequence.length); -1 37052 offset = ECMAScript.ToUint32(arguments[1]); -1 37053 if (offset + len > this.length) { -1 37054 throw new RangeError('Offset plus length of array is out of range'); -1 37055 } -1 37056 for (i = 0; i < len; i += 1) { -1 37057 s = sequence[i]; -1 37058 this._setter(offset + i, Number(s)); -1 37059 } -1 37060 } else { -1 37061 throw new TypeError('Unexpected argument type(s)'); -1 37062 } -1 37063 }; -1 37064 _ctor.prototype.subarray = function(start, end) { -1 37065 function clamp(v, min2, max) { -1 37066 return v < min2 ? min2 : v > max ? max : v; -1 37067 } -1 37068 start = ECMAScript.ToInt32(start); -1 37069 end = ECMAScript.ToInt32(end); -1 37070 if (arguments.length < 1) { -1 37071 start = 0; -1 37072 } -1 37073 if (arguments.length < 2) { -1 37074 end = this.length; -1 37075 } -1 37076 if (start < 0) { -1 37077 start = this.length + start; 19038 37078 }19039 -1 }19040 -1 if (current.children.length) {19041 -1 stack.push(currentLevel);19042 -1 currentLevel = current.children.slice();19043 -1 }19044 -1 while (!currentLevel.length && stack.length) {19045 -1 currentLevel = stack.pop();19046 -1 }19047 -1 };19048 -1 while (currentLevel.length) {19049 -1 _loop4();19050 -1 }19051 -1 return data;19052 -1 }19053 -1 function uncommonClasses(node, selectorData) {19054 -1 var retVal = [];19055 -1 var classData = selectorData.classes;19056 -1 var tagData = selectorData.tags;19057 -1 if (node.classList) {19058 -1 Array.from(node.classList).forEach(function(cl) {19059 -1 var ind = Object(_escape_selector__WEBPACK_IMPORTED_MODULE_0__['default'])(cl);19060 -1 if (classData[ind] < tagData[node.nodeName]) {19061 -1 retVal.push({19062 -1 name: ind,19063 -1 count: classData[ind],19064 -1 species: 'class'19065 -1 });-1 37079 if (end < 0) { -1 37080 end = this.length + end; 19066 37081 }19067 -1 });19068 -1 }19069 -1 return retVal.sort(countSort);19070 -1 }19071 -1 function getNthChildString(elm, selector) {19072 -1 var siblings = elm.parentNode && Array.from(elm.parentNode.children || '') || [];19073 -1 var hasMatchingSiblings = siblings.find(function(sibling) {19074 -1 return sibling !== elm && Object(_element_matches__WEBPACK_IMPORTED_MODULE_3__['default'])(sibling, selector);19075 -1 });19076 -1 if (hasMatchingSiblings) {19077 -1 var nthChild = 1 + siblings.indexOf(elm);19078 -1 return ':nth-child(' + nthChild + ')';19079 -1 } else {19080 -1 return '';19081 -1 }19082 -1 }19083 -1 function getElmId(elm) {19084 -1 if (!elm.getAttribute('id')) {19085 -1 return;19086 -1 }19087 -1 var doc = elm.getRootNode && elm.getRootNode() || document;19088 -1 var id = '#' + Object(_escape_selector__WEBPACK_IMPORTED_MODULE_0__['default'])(elm.getAttribute('id') || '');19089 -1 if (!id.match(/player_uid_/) && doc.querySelectorAll(id).length === 1) {19090 -1 return id;19091 -1 }19092 -1 }19093 -1 function getBaseSelector(elm) {19094 -1 if (typeof xhtml === 'undefined') {19095 -1 xhtml = Object(_is_xhtml__WEBPACK_IMPORTED_MODULE_4__['default'])(document);19096 -1 }19097 -1 return Object(_escape_selector__WEBPACK_IMPORTED_MODULE_0__['default'])(xhtml ? elm.localName : elm.nodeName.toLowerCase());19098 -1 }19099 -1 function uncommonAttributes(node, selectorData) {19100 -1 var retVal = [];19101 -1 var attData = selectorData.attributes;19102 -1 var tagData = selectorData.tags;19103 -1 if (node.hasAttributes()) {19104 -1 Array.from(Object(_get_node_attributes__WEBPACK_IMPORTED_MODULE_2__['default'])(node)).filter(filterAttributes).forEach(function(at) {19105 -1 var atnv = getAttributeNameValue(node, at);19106 -1 if (atnv && attData[atnv] < tagData[node.nodeName]) {19107 -1 retVal.push({19108 -1 name: atnv,19109 -1 count: attData[atnv],19110 -1 species: 'attribute'19111 -1 });-1 37082 start = clamp(start, 0, this.length); -1 37083 end = clamp(end, 0, this.length); -1 37084 var len = end - start; -1 37085 if (len < 0) { -1 37086 len = 0; 19112 37087 }19113 -1 });19114 -1 }19115 -1 return retVal.sort(countSort);19116 -1 }19117 -1 function getThreeLeastCommonFeatures(elm, selectorData) {19118 -1 var selector = '';19119 -1 var features;19120 -1 var clss = uncommonClasses(elm, selectorData);19121 -1 var atts = uncommonAttributes(elm, selectorData);19122 -1 if (clss.length && clss[0].count === 1) {19123 -1 features = [ clss[0] ];19124 -1 } else if (atts.length && atts[0].count === 1) {19125 -1 features = [ atts[0] ];19126 -1 selector = getBaseSelector(elm);19127 -1 } else {19128 -1 features = clss.concat(atts);19129 -1 features.sort(countSort);19130 -1 features = features.slice(0, 3);19131 -1 if (!features.some(function(feat) {19132 -1 return feat.species === 'class';19133 -1 })) {19134 -1 selector = getBaseSelector(elm);19135 -1 } else {19136 -1 features.sort(function(a, b) {19137 -1 return a.species !== b.species && a.species === 'class' ? -1 : a.species === b.species ? 0 : 1;19138 -1 });19139 -1 }19140 -1 }19141 -1 return selector += features.reduce(function(val, feat) {19142 -1 switch (feat.species) {19143 -1 case 'class':19144 -1 return val + '.' + feat.name;19145 -119146 -1 case 'attribute':19147 -1 return val + '[' + feat.name + ']';19148 -1 }19149 -1 return val;19150 -1 }, '');19151 -1 }19152 -1 function generateSelector(elm, options, doc) {19153 -1 if (!axe._selectorData) {19154 -1 throw new Error('Expect axe._selectorData to be set up');-1 37088 return new this.constructor(this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len); -1 37089 }; -1 37090 return _ctor; -1 37091 } -1 37092 var Int8Array = makeConstructor(1, packI8, unpackI8); -1 37093 var Uint8Array2 = makeConstructor(1, packU8, unpackU8); -1 37094 var Uint8ClampedArray2 = makeConstructor(1, packU8Clamped, unpackU8); -1 37095 var Int16Array = makeConstructor(2, packI16, unpackI16); -1 37096 var Uint16Array = makeConstructor(2, packU16, unpackU16); -1 37097 var Int32Array = makeConstructor(4, packI32, unpackI32); -1 37098 var Uint32Array3 = makeConstructor(4, packU32, unpackU32); -1 37099 var Float32Array = makeConstructor(4, packF32, unpackF32); -1 37100 var Float64Array = makeConstructor(8, packF64, unpackF64); -1 37101 exports.Int8Array = exports.Int8Array || Int8Array; -1 37102 exports.Uint8Array = exports.Uint8Array || Uint8Array2; -1 37103 exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray2; -1 37104 exports.Int16Array = exports.Int16Array || Int16Array; -1 37105 exports.Uint16Array = exports.Uint16Array || Uint16Array; -1 37106 exports.Int32Array = exports.Int32Array || Int32Array; -1 37107 exports.Uint32Array = exports.Uint32Array || Uint32Array3; -1 37108 exports.Float32Array = exports.Float32Array || Float32Array; -1 37109 exports.Float64Array = exports.Float64Array || Float64Array; -1 37110 })(); -1 37111 (function() { -1 37112 function r(array, index) { -1 37113 return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index]; 19155 37114 }19156 -1 var _options$toRoot = options.toRoot, toRoot = _options$toRoot === void 0 ? false : _options$toRoot;19157 -1 var selector;19158 -1 var similar;19159 -1 do {19160 -1 var features = getElmId(elm);19161 -1 if (!features) {19162 -1 features = getThreeLeastCommonFeatures(elm, axe._selectorData);19163 -1 features += getNthChildString(elm, features);19164 -1 }19165 -1 if (selector) {19166 -1 selector = features + ' > ' + selector;-1 37115 var IS_BIG_ENDIAN = function() { -1 37116 var u16array = new exports.Uint16Array([ 4660 ]), u8array = new exports.Uint8Array(u16array.buffer); -1 37117 return r(u8array, 0) === 18; -1 37118 }(); -1 37119 var DataView = function DataView2(buffer, byteOffset, byteLength) { -1 37120 if (arguments.length === 0) { -1 37121 buffer = new exports.ArrayBuffer(0); -1 37122 } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) { -1 37123 throw new TypeError('TypeError'); -1 37124 } -1 37125 this.buffer = buffer || new exports.ArrayBuffer(0); -1 37126 this.byteOffset = ECMAScript.ToUint32(byteOffset); -1 37127 if (this.byteOffset > this.buffer.byteLength) { -1 37128 throw new RangeError('byteOffset out of range'); -1 37129 } -1 37130 if (arguments.length < 3) { -1 37131 this.byteLength = this.buffer.byteLength - this.byteOffset; 19167 37132 } else {19168 -1 selector = features;-1 37133 this.byteLength = ECMAScript.ToUint32(byteLength); 19169 37134 }19170 -1 if (!similar) {19171 -1 similar = Array.from(doc.querySelectorAll(selector));19172 -1 } else {19173 -1 similar = similar.filter(function(item) {19174 -1 return Object(_element_matches__WEBPACK_IMPORTED_MODULE_3__['default'])(item, selector);19175 -1 });-1 37135 if (this.byteOffset + this.byteLength > this.buffer.byteLength) { -1 37136 throw new RangeError('byteOffset and length reference an area beyond the end of the buffer'); 19176 37137 }19177 -1 elm = elm.parentElement;19178 -1 } while ((similar.length > 1 || toRoot) && elm && elm.nodeType !== 11);19179 -1 if (similar.length === 1) {19180 -1 return selector;19181 -1 } else if (selector.indexOf(' > ') !== -1) {19182 -1 return ':root' + selector.substring(selector.indexOf(' > '));19183 -1 }19184 -1 return ':root';19185 -1 }19186 -1 function getSelector(elm, options) {19187 -1 return Object(_get_shadow_selector__WEBPACK_IMPORTED_MODULE_5__['default'])(generateSelector, elm, options);19188 -1 }19189 -1 },19190 -1 './lib/core/utils/get-shadow-selector.js': function libCoreUtilsGetShadowSelectorJs(module, __webpack_exports__, __webpack_require__) {19191 -1 'use strict';19192 -1 __webpack_require__.r(__webpack_exports__);19193 -1 function getShadowSelector(generateSelector, elm) {19194 -1 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};19195 -1 if (!elm) {19196 -1 return '';-1 37138 configureProperties(this); -1 37139 }; -1 37140 function makeGetter(arrayType) { -1 37141 return function(byteOffset, littleEndian) { -1 37142 byteOffset = ECMAScript.ToUint32(byteOffset); -1 37143 if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { -1 37144 throw new RangeError('Array index out of range'); -1 37145 } -1 37146 byteOffset += this.byteOffset; -1 37147 var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), bytes = [], i; -1 37148 for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { -1 37149 bytes.push(r(uint8Array, i)); -1 37150 } -1 37151 if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { -1 37152 bytes.reverse(); -1 37153 } -1 37154 return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0); -1 37155 }; 19197 37156 }19198 -1 var doc = elm.getRootNode && elm.getRootNode() || document;19199 -1 if (doc.nodeType !== 11) {19200 -1 return generateSelector(elm, options, doc);-1 37157 DataView.prototype.getUint8 = makeGetter(exports.Uint8Array); -1 37158 DataView.prototype.getInt8 = makeGetter(exports.Int8Array); -1 37159 DataView.prototype.getUint16 = makeGetter(exports.Uint16Array); -1 37160 DataView.prototype.getInt16 = makeGetter(exports.Int16Array); -1 37161 DataView.prototype.getUint32 = makeGetter(exports.Uint32Array); -1 37162 DataView.prototype.getInt32 = makeGetter(exports.Int32Array); -1 37163 DataView.prototype.getFloat32 = makeGetter(exports.Float32Array); -1 37164 DataView.prototype.getFloat64 = makeGetter(exports.Float64Array); -1 37165 function makeSetter(arrayType) { -1 37166 return function(byteOffset, value, littleEndian) { -1 37167 byteOffset = ECMAScript.ToUint32(byteOffset); -1 37168 if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { -1 37169 throw new RangeError('Array index out of range'); -1 37170 } -1 37171 var typeArray = new arrayType([ value ]), byteArray = new exports.Uint8Array(typeArray.buffer), bytes = [], i, byteView; -1 37172 for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { -1 37173 bytes.push(r(byteArray, i)); -1 37174 } -1 37175 if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { -1 37176 bytes.reverse(); -1 37177 } -1 37178 byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT); -1 37179 byteView.set(bytes); -1 37180 }; 19201 37181 }19202 -1 var stack = [];19203 -1 while (doc.nodeType === 11) {19204 -1 if (!doc.host) {19205 -1 return '';19206 -1 }19207 -1 stack.unshift({19208 -1 elm: elm,19209 -1 doc: doc19210 -1 });19211 -1 elm = doc.host;19212 -1 doc = elm.getRootNode();-1 37182 DataView.prototype.setUint8 = makeSetter(exports.Uint8Array); -1 37183 DataView.prototype.setInt8 = makeSetter(exports.Int8Array); -1 37184 DataView.prototype.setUint16 = makeSetter(exports.Uint16Array); -1 37185 DataView.prototype.setInt16 = makeSetter(exports.Int16Array); -1 37186 DataView.prototype.setUint32 = makeSetter(exports.Uint32Array); -1 37187 DataView.prototype.setInt32 = makeSetter(exports.Int32Array); -1 37188 DataView.prototype.setFloat32 = makeSetter(exports.Float32Array); -1 37189 DataView.prototype.setFloat64 = makeSetter(exports.Float64Array); -1 37190 exports.DataView = exports.DataView || DataView; -1 37191 })(); -1 37192 }); -1 37193 var require_weakmap_polyfill = __commonJS(function(exports) { -1 37194 (function(self2) { -1 37195 'use strict'; -1 37196 if (self2.WeakMap) { -1 37197 return; 19213 37198 }19214 -1 stack.unshift({19215 -1 elm: elm,19216 -1 doc: doc19217 -1 });19218 -1 return stack.map(function(_ref55) {19219 -1 var elm = _ref55.elm, doc = _ref55.doc;19220 -1 return generateSelector(elm, options, doc);19221 -1 });19222 -1 }19223 -1 __webpack_exports__['default'] = getShadowSelector;19224 -1 },19225 -1 './lib/core/utils/get-stylesheet-factory.js': function libCoreUtilsGetStylesheetFactoryJs(module, __webpack_exports__, __webpack_require__) {19226 -1 'use strict';19227 -1 __webpack_require__.r(__webpack_exports__);19228 -1 function getStyleSheetFactory(dynamicDoc) {19229 -1 if (!dynamicDoc) {19230 -1 throw new Error('axe.utils.getStyleSheetFactory should be invoked with an argument');19231 -1 }19232 -1 return function(options) {19233 -1 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;19234 -1 var style = dynamicDoc.createElement('style');19235 -1 if (isLink) {19236 -1 var text = dynamicDoc.createTextNode('@import "'.concat(data.href, '"'));19237 -1 style.appendChild(text);-1 37199 var hasOwnProperty2 = Object.prototype.hasOwnProperty; -1 37200 var hasDefine = Object.defineProperty && function() { -1 37201 try { -1 37202 return Object.defineProperty({}, 'x', { -1 37203 value: 1 -1 37204 }).x === 1; -1 37205 } catch (e) {} -1 37206 }(); -1 37207 var defineProperty = function defineProperty(object, name, value) { -1 37208 if (hasDefine) { -1 37209 Object.defineProperty(object, name, { -1 37210 configurable: true, -1 37211 writable: true, -1 37212 value: value -1 37213 }); 19238 37214 } else {19239 -1 style.appendChild(dynamicDoc.createTextNode(data));-1 37215 object[name] = value; 19240 37216 }19241 -1 dynamicDoc.head.appendChild(style);19242 -1 return {19243 -1 sheet: style.sheet,19244 -1 isCrossOrigin: isCrossOrigin,19245 -1 shadowId: shadowId,19246 -1 root: root,19247 -1 priority: priority19248 -1 };19249 37217 };19250 -1 }19251 -1 __webpack_exports__['default'] = getStyleSheetFactory;19252 -1 },19253 -1 './lib/core/utils/get-xpath.js': function libCoreUtilsGetXpathJs(module, __webpack_exports__, __webpack_require__) {19254 -1 'use strict';19255 -1 __webpack_require__.r(__webpack_exports__);19256 -1 var _escape_selector__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/escape-selector.js');19257 -1 function getXPathArray(node, path) {19258 -1 var sibling, count;19259 -1 if (!node) {19260 -1 return [];19261 -1 }19262 -1 if (!path && node.nodeType === 9) {19263 -1 path = [ {19264 -1 str: 'html'19265 -1 } ];19266 -1 return path;19267 -1 }19268 -1 path = path || [];19269 -1 if (node.parentNode && node.parentNode !== node) {19270 -1 path = getXPathArray(node.parentNode, path);19271 -1 }19272 -1 if (node.previousSibling) {19273 -1 count = 1;19274 -1 sibling = node.previousSibling;19275 -1 do {19276 -1 if (sibling.nodeType === 1 && sibling.nodeName === node.nodeName) {19277 -1 count++;-1 37218 self2.WeakMap = function() { -1 37219 function WeakMap2() { -1 37220 if (this === void 0) { -1 37221 throw new TypeError('Constructor WeakMap requires \'new\''); -1 37222 } -1 37223 defineProperty(this, '_id', genId('_WeakMap')); -1 37224 if (arguments.length > 0) { -1 37225 throw new TypeError('WeakMap iterable is not supported'); 19278 37226 }19279 -1 sibling = sibling.previousSibling;19280 -1 } while (sibling);19281 -1 if (count === 1) {19282 -1 count = null;19283 37227 }19284 -1 } else if (node.nextSibling) {19285 -1 sibling = node.nextSibling;19286 -1 do {19287 -1 if (sibling.nodeType === 1 && sibling.nodeName === node.nodeName) {19288 -1 count = 1;19289 -1 sibling = null;19290 -1 } else {19291 -1 count = null;19292 -1 sibling = sibling.previousSibling;-1 37228 defineProperty(WeakMap2.prototype, 'delete', function(key) { -1 37229 checkInstance(this, 'delete'); -1 37230 if (!isObject(key)) { -1 37231 return false; -1 37232 } -1 37233 var entry = key[this._id]; -1 37234 if (entry && entry[0] === key) { -1 37235 delete key[this._id]; -1 37236 return true; -1 37237 } -1 37238 return false; -1 37239 }); -1 37240 defineProperty(WeakMap2.prototype, 'get', function(key) { -1 37241 checkInstance(this, 'get'); -1 37242 if (!isObject(key)) { -1 37243 return void 0; -1 37244 } -1 37245 var entry = key[this._id]; -1 37246 if (entry && entry[0] === key) { -1 37247 return entry[1]; -1 37248 } -1 37249 return void 0; -1 37250 }); -1 37251 defineProperty(WeakMap2.prototype, 'has', function(key) { -1 37252 checkInstance(this, 'has'); -1 37253 if (!isObject(key)) { -1 37254 return false; -1 37255 } -1 37256 var entry = key[this._id]; -1 37257 if (entry && entry[0] === key) { -1 37258 return true; -1 37259 } -1 37260 return false; -1 37261 }); -1 37262 defineProperty(WeakMap2.prototype, 'set', function(key, value) { -1 37263 checkInstance(this, 'set'); -1 37264 if (!isObject(key)) { -1 37265 throw new TypeError('Invalid value used as weak map key'); -1 37266 } -1 37267 var entry = key[this._id]; -1 37268 if (entry && entry[0] === key) { -1 37269 entry[1] = value; -1 37270 return this; -1 37271 } -1 37272 defineProperty(key, this._id, [ key, value ]); -1 37273 return this; -1 37274 }); -1 37275 function checkInstance(x, methodName) { -1 37276 if (!isObject(x) || !hasOwnProperty2.call(x, '_id')) { -1 37277 throw new TypeError(methodName + ' method called on incompatible receiver ' + _typeof(x)); 19293 37278 }19294 -1 } while (sibling);19295 -1 }19296 -1 if (node.nodeType === 1) {19297 -1 var element = {};19298 -1 element.str = node.nodeName.toLowerCase();19299 -1 var id = node.getAttribute && Object(_escape_selector__WEBPACK_IMPORTED_MODULE_0__['default'])(node.getAttribute('id'));19300 -1 if (id && node.ownerDocument.querySelectorAll('#' + id).length === 1) {19301 -1 element.id = node.getAttribute('id');19302 37279 }19303 -1 if (count > 1) {19304 -1 element.count = count;-1 37280 function genId(prefix) { -1 37281 return prefix + '_' + rand() + '.' + rand(); 19305 37282 }19306 -1 path.push(element);19307 -1 }19308 -1 return path;19309 -1 }19310 -1 function xpathToString(xpathArray) {19311 -1 return xpathArray.reduce(function(str, elm) {19312 -1 if (elm.id) {19313 -1 return '/'.concat(elm.str, '[@id=\'').concat(elm.id, '\']');19314 -1 } else {19315 -1 return str + '/'.concat(elm.str) + (elm.count > 0 ? '['.concat(elm.count, ']') : '');-1 37283 function rand() { -1 37284 return Math.random().toString().substring(2); 19316 37285 }19317 -1 }, '');19318 -1 }19319 -1 function getXpath(node) {19320 -1 var xpathArray = getXPathArray(node);19321 -1 return xpathToString(xpathArray);-1 37286 defineProperty(WeakMap2, '_polyfill', true); -1 37287 return WeakMap2; -1 37288 }(); -1 37289 function isObject(x) { -1 37290 return Object(x) === x; -1 37291 } -1 37292 })(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : exports); -1 37293 }); -1 37294 var definitions = [ { -1 37295 name: 'NA', -1 37296 value: 'inapplicable', -1 37297 priority: 0, -1 37298 group: 'inapplicable' -1 37299 }, { -1 37300 name: 'PASS', -1 37301 value: 'passed', -1 37302 priority: 1, -1 37303 group: 'passes' -1 37304 }, { -1 37305 name: 'CANTTELL', -1 37306 value: 'cantTell', -1 37307 priority: 2, -1 37308 group: 'incomplete' -1 37309 }, { -1 37310 name: 'FAIL', -1 37311 value: 'failed', -1 37312 priority: 3, -1 37313 group: 'violations' -1 37314 } ]; -1 37315 var constants = { -1 37316 helpUrlBase: 'https://dequeuniversity.com/rules/', -1 37317 results: [], -1 37318 resultGroups: [], -1 37319 resultGroupMap: {}, -1 37320 impact: Object.freeze([ 'minor', 'moderate', 'serious', 'critical' ]), -1 37321 preload: Object.freeze({ -1 37322 assets: [ 'cssom', 'media' ], -1 37323 timeout: 1e4 -1 37324 }), -1 37325 allOrigins: '<unsafe_all_origins>', -1 37326 sameOrigin: '<same_origin>' -1 37327 }; -1 37328 definitions.forEach(function(definition) { -1 37329 var name = definition.name; -1 37330 var value = definition.value; -1 37331 var priority = definition.priority; -1 37332 var group = definition.group; -1 37333 constants[name] = value; -1 37334 constants[name + '_PRIO'] = priority; -1 37335 constants[name + '_GROUP'] = group; -1 37336 constants.results[priority] = value; -1 37337 constants.resultGroups[priority] = group; -1 37338 constants.resultGroupMap[value] = group; -1 37339 }); -1 37340 Object.freeze(constants.results); -1 37341 Object.freeze(constants.resultGroups); -1 37342 Object.freeze(constants.resultGroupMap); -1 37343 Object.freeze(constants); -1 37344 var constants_default = constants; -1 37345 function log() { -1 37346 if ((typeof console === 'undefined' ? 'undefined' : _typeof(console)) === 'object' && console.log) { -1 37347 Function.prototype.apply.call(console.log, console, arguments); 19322 37348 }19323 -1 __webpack_exports__['default'] = getXpath;19324 -1 },19325 -1 './lib/core/utils/index.js': function libCoreUtilsIndexJs(module, __webpack_exports__, __webpack_require__) {19326 -1 'use strict';19327 -1 __webpack_require__.r(__webpack_exports__);19328 -1 var _aggregate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/aggregate.js');19329 -1 __webpack_require__.d(__webpack_exports__, 'aggregate', function() {19330 -1 return _aggregate__WEBPACK_IMPORTED_MODULE_0__['default'];19331 -1 });19332 -1 var _aggregate_checks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/aggregate-checks.js');19333 -1 __webpack_require__.d(__webpack_exports__, 'aggregateChecks', function() {19334 -1 return _aggregate_checks__WEBPACK_IMPORTED_MODULE_1__['default'];19335 -1 });19336 -1 var _aggregate_node_results__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/aggregate-node-results.js');19337 -1 __webpack_require__.d(__webpack_exports__, 'aggregateNodeResults', function() {19338 -1 return _aggregate_node_results__WEBPACK_IMPORTED_MODULE_2__['default'];19339 -1 });19340 -1 var _aggregate_result__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/aggregate-result.js');19341 -1 __webpack_require__.d(__webpack_exports__, 'aggregateResult', function() {19342 -1 return _aggregate_result__WEBPACK_IMPORTED_MODULE_3__['default'];19343 -1 });19344 -1 var _are_styles_set__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/core/utils/are-styles-set.js');19345 -1 __webpack_require__.d(__webpack_exports__, 'areStylesSet', function() {19346 -1 return _are_styles_set__WEBPACK_IMPORTED_MODULE_4__['default'];19347 -1 });19348 -1 var _assert__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/core/utils/assert.js');19349 -1 __webpack_require__.d(__webpack_exports__, 'assert', function() {19350 -1 return _assert__WEBPACK_IMPORTED_MODULE_5__['default'];19351 -1 });19352 -1 var _check_helper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__('./lib/core/utils/check-helper.js');19353 -1 __webpack_require__.d(__webpack_exports__, 'checkHelper', function() {19354 -1 return _check_helper__WEBPACK_IMPORTED_MODULE_6__['default'];19355 -1 });19356 -1 var _clone__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__('./lib/core/utils/clone.js');19357 -1 __webpack_require__.d(__webpack_exports__, 'clone', function() {19358 -1 return _clone__WEBPACK_IMPORTED_MODULE_7__['default'];19359 -1 });19360 -1 var _closest__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__('./lib/core/utils/closest.js');19361 -1 __webpack_require__.d(__webpack_exports__, 'closest', function() {19362 -1 return _closest__WEBPACK_IMPORTED_MODULE_8__['default'];19363 -1 });19364 -1 var _collect_results_from_frames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__('./lib/core/utils/collect-results-from-frames.js');19365 -1 __webpack_require__.d(__webpack_exports__, 'collectResultsFromFrames', function() {19366 -1 return _collect_results_from_frames__WEBPACK_IMPORTED_MODULE_9__['default'];19367 -1 });19368 -1 var _contains__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__('./lib/core/utils/contains.js');19369 -1 __webpack_require__.d(__webpack_exports__, 'contains', function() {19370 -1 return _contains__WEBPACK_IMPORTED_MODULE_10__['default'];19371 -1 });19372 -1 var _css_parser__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__('./lib/core/utils/css-parser.js');19373 -1 __webpack_require__.d(__webpack_exports__, 'cssParser', function() {19374 -1 return _css_parser__WEBPACK_IMPORTED_MODULE_11__['default'];19375 -1 });19376 -1 var _deep_merge__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__('./lib/core/utils/deep-merge.js');19377 -1 __webpack_require__.d(__webpack_exports__, 'deepMerge', function() {19378 -1 return _deep_merge__WEBPACK_IMPORTED_MODULE_12__['default'];19379 -1 });19380 -1 var _dq_element__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__('./lib/core/utils/dq-element.js');19381 -1 __webpack_require__.d(__webpack_exports__, 'DqElement', function() {19382 -1 return _dq_element__WEBPACK_IMPORTED_MODULE_13__['default'];19383 -1 });19384 -1 var _element_matches__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__('./lib/core/utils/element-matches.js');19385 -1 __webpack_require__.d(__webpack_exports__, 'matchesSelector', function() {19386 -1 return _element_matches__WEBPACK_IMPORTED_MODULE_14__['default'];19387 -1 });19388 -1 var _escape_selector__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__('./lib/core/utils/escape-selector.js');19389 -1 __webpack_require__.d(__webpack_exports__, 'escapeSelector', function() {19390 -1 return _escape_selector__WEBPACK_IMPORTED_MODULE_15__['default'];19391 -1 });19392 -1 var _extend_meta_data__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__('./lib/core/utils/extend-meta-data.js');19393 -1 __webpack_require__.d(__webpack_exports__, 'extendMetaData', function() {19394 -1 return _extend_meta_data__WEBPACK_IMPORTED_MODULE_16__['default'];19395 -1 });19396 -1 var _finalize_result__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__('./lib/core/utils/finalize-result.js');19397 -1 __webpack_require__.d(__webpack_exports__, 'finalizeRuleResult', function() {19398 -1 return _finalize_result__WEBPACK_IMPORTED_MODULE_17__['default'];19399 -1 });19400 -1 var _find_by__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__('./lib/core/utils/find-by.js');19401 -1 __webpack_require__.d(__webpack_exports__, 'findBy', function() {19402 -1 return _find_by__WEBPACK_IMPORTED_MODULE_18__['default'];19403 -1 });19404 -1 var _get_flattened_tree__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__('./lib/core/utils/get-flattened-tree.js');19405 -1 __webpack_require__.d(__webpack_exports__, 'getFlattenedTree', function() {19406 -1 return _get_flattened_tree__WEBPACK_IMPORTED_MODULE_19__['default'];19407 -1 });19408 -1 var _get_all_checks__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__('./lib/core/utils/get-all-checks.js');19409 -1 __webpack_require__.d(__webpack_exports__, 'getAllChecks', function() {19410 -1 return _get_all_checks__WEBPACK_IMPORTED_MODULE_20__['default'];19411 -1 });19412 -1 var _get_base_lang__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__('./lib/core/utils/get-base-lang.js');19413 -1 __webpack_require__.d(__webpack_exports__, 'getBaseLang', function() {19414 -1 return _get_base_lang__WEBPACK_IMPORTED_MODULE_21__['default'];19415 -1 });19416 -1 var _get_check_message__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__('./lib/core/utils/get-check-message.js');19417 -1 __webpack_require__.d(__webpack_exports__, 'getCheckMessage', function() {19418 -1 return _get_check_message__WEBPACK_IMPORTED_MODULE_22__['default'];19419 -1 });19420 -1 var _get_check_option__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__('./lib/core/utils/get-check-option.js');19421 -1 __webpack_require__.d(__webpack_exports__, 'getCheckOption', function() {19422 -1 return _get_check_option__WEBPACK_IMPORTED_MODULE_23__['default'];19423 -1 });19424 -1 var _get_friendly_uri_end__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__('./lib/core/utils/get-friendly-uri-end.js');19425 -1 __webpack_require__.d(__webpack_exports__, 'getFriendlyUriEnd', function() {19426 -1 return _get_friendly_uri_end__WEBPACK_IMPORTED_MODULE_24__['default'];19427 -1 });19428 -1 var _get_node_attributes__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__('./lib/core/utils/get-node-attributes.js');19429 -1 __webpack_require__.d(__webpack_exports__, 'getNodeAttributes', function() {19430 -1 return _get_node_attributes__WEBPACK_IMPORTED_MODULE_25__['default'];19431 -1 });19432 -1 var _get_node_from_tree__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__('./lib/core/utils/get-node-from-tree.js');19433 -1 __webpack_require__.d(__webpack_exports__, 'getNodeFromTree', function() {19434 -1 return _get_node_from_tree__WEBPACK_IMPORTED_MODULE_26__['default'];19435 -1 });19436 -1 var _get_root_node__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__('./lib/core/utils/get-root-node.js');19437 -1 __webpack_require__.d(__webpack_exports__, 'getRootNode', function() {19438 -1 return _get_root_node__WEBPACK_IMPORTED_MODULE_27__['default'];19439 -1 });19440 -1 var _get_scroll_state__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__('./lib/core/utils/get-scroll-state.js');19441 -1 __webpack_require__.d(__webpack_exports__, 'getScrollState', function() {19442 -1 return _get_scroll_state__WEBPACK_IMPORTED_MODULE_28__['default'];19443 -1 });19444 -1 var _get_scroll__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__('./lib/core/utils/get-scroll.js');19445 -1 __webpack_require__.d(__webpack_exports__, 'getScroll', function() {19446 -1 return _get_scroll__WEBPACK_IMPORTED_MODULE_29__['default'];19447 -1 });19448 -1 var _get_shadow_selector__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__('./lib/core/utils/get-shadow-selector.js');19449 -1 __webpack_require__.d(__webpack_exports__, 'getShadowSelector', function() {19450 -1 return _get_shadow_selector__WEBPACK_IMPORTED_MODULE_30__['default'];19451 -1 });19452 -1 var _get_selector__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__('./lib/core/utils/get-selector.js');19453 -1 __webpack_require__.d(__webpack_exports__, 'getSelector', function() {19454 -1 return _get_selector__WEBPACK_IMPORTED_MODULE_31__['default'];19455 -1 });19456 -1 __webpack_require__.d(__webpack_exports__, 'getSelectorData', function() {19457 -1 return _get_selector__WEBPACK_IMPORTED_MODULE_31__['getSelectorData'];19458 -1 });19459 -1 var _get_stylesheet_factory__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__('./lib/core/utils/get-stylesheet-factory.js');19460 -1 __webpack_require__.d(__webpack_exports__, 'getStyleSheetFactory', function() {19461 -1 return _get_stylesheet_factory__WEBPACK_IMPORTED_MODULE_32__['default'];19462 -1 });19463 -1 var _get_xpath__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__('./lib/core/utils/get-xpath.js');19464 -1 __webpack_require__.d(__webpack_exports__, 'getXpath', function() {19465 -1 return _get_xpath__WEBPACK_IMPORTED_MODULE_33__['default'];19466 -1 });19467 -1 var _get_ancestry__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__('./lib/core/utils/get-ancestry.js');19468 -1 __webpack_require__.d(__webpack_exports__, 'getAncestry', function() {19469 -1 return _get_ancestry__WEBPACK_IMPORTED_MODULE_34__['default'];19470 -1 });19471 -1 var _inject_style__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__('./lib/core/utils/inject-style.js');19472 -1 __webpack_require__.d(__webpack_exports__, 'injectStyle', function() {19473 -1 return _inject_style__WEBPACK_IMPORTED_MODULE_35__['default'];19474 -1 });19475 -1 var _is_hidden__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__('./lib/core/utils/is-hidden.js');19476 -1 __webpack_require__.d(__webpack_exports__, 'isHidden', function() {19477 -1 return _is_hidden__WEBPACK_IMPORTED_MODULE_36__['default'];19478 -1 });19479 -1 var _is_html_element__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__('./lib/core/utils/is-html-element.js');19480 -1 __webpack_require__.d(__webpack_exports__, 'isHtmlElement', function() {19481 -1 return _is_html_element__WEBPACK_IMPORTED_MODULE_37__['default'];19482 -1 });19483 -1 var _is_node_in_context__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__('./lib/core/utils/is-node-in-context.js');19484 -1 __webpack_require__.d(__webpack_exports__, 'isNodeInContext', function() {19485 -1 return _is_node_in_context__WEBPACK_IMPORTED_MODULE_38__['default'];19486 -1 });19487 -1 var _is_shadow_root__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__('./lib/core/utils/is-shadow-root.js');19488 -1 __webpack_require__.d(__webpack_exports__, 'isShadowRoot', function() {19489 -1 return _is_shadow_root__WEBPACK_IMPORTED_MODULE_39__['default'];19490 -1 });19491 -1 var _is_xhtml__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__('./lib/core/utils/is-xhtml.js');19492 -1 __webpack_require__.d(__webpack_exports__, 'isXHTML', function() {19493 -1 return _is_xhtml__WEBPACK_IMPORTED_MODULE_40__['default'];19494 -1 });19495 -1 var _matches__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__('./lib/core/utils/matches.js');19496 -1 __webpack_require__.d(__webpack_exports__, 'matches', function() {19497 -1 return _matches__WEBPACK_IMPORTED_MODULE_41__['default'];19498 -1 });19499 -1 __webpack_require__.d(__webpack_exports__, 'matchesExpression', function() {19500 -1 return _matches__WEBPACK_IMPORTED_MODULE_41__['matchesExpression'];19501 -1 });19502 -1 __webpack_require__.d(__webpack_exports__, 'convertSelector', function() {19503 -1 return _matches__WEBPACK_IMPORTED_MODULE_41__['convertSelector'];19504 -1 });19505 -1 var _memoize__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__('./lib/core/utils/memoize.js');19506 -1 __webpack_require__.d(__webpack_exports__, 'memoize', function() {19507 -1 return _memoize__WEBPACK_IMPORTED_MODULE_42__['default'];19508 -1 });19509 -1 var _merge_results__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__('./lib/core/utils/merge-results.js');19510 -1 __webpack_require__.d(__webpack_exports__, 'mergeResults', function() {19511 -1 return _merge_results__WEBPACK_IMPORTED_MODULE_43__['default'];19512 -1 });19513 -1 var _node_sorter__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__('./lib/core/utils/node-sorter.js');19514 -1 __webpack_require__.d(__webpack_exports__, 'nodeSorter', function() {19515 -1 return _node_sorter__WEBPACK_IMPORTED_MODULE_44__['default'];19516 -1 });19517 -1 var _parse_crossorigin_stylesheet__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__('./lib/core/utils/parse-crossorigin-stylesheet.js');19518 -1 __webpack_require__.d(__webpack_exports__, 'parseCrossOriginStylesheet', function() {19519 -1 return _parse_crossorigin_stylesheet__WEBPACK_IMPORTED_MODULE_45__['default'];19520 -1 });19521 -1 var _parse_sameorigin_stylesheet__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__('./lib/core/utils/parse-sameorigin-stylesheet.js');19522 -1 __webpack_require__.d(__webpack_exports__, 'parseSameOriginStylesheet', function() {19523 -1 return _parse_sameorigin_stylesheet__WEBPACK_IMPORTED_MODULE_46__['default'];19524 -1 });19525 -1 var _parse_stylesheet__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__('./lib/core/utils/parse-stylesheet.js');19526 -1 __webpack_require__.d(__webpack_exports__, 'parseStylesheet', function() {19527 -1 return _parse_stylesheet__WEBPACK_IMPORTED_MODULE_47__['default'];19528 -1 });19529 -1 var _performance_timer__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__('./lib/core/utils/performance-timer.js');19530 -1 __webpack_require__.d(__webpack_exports__, 'performanceTimer', function() {19531 -1 return _performance_timer__WEBPACK_IMPORTED_MODULE_48__['default'];19532 -1 });19533 -1 var _pollyfills__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__('./lib/core/utils/pollyfills.js');19534 -1 __webpack_require__.d(__webpack_exports__, 'pollyfillElementsFromPoint', function() {19535 -1 return _pollyfills__WEBPACK_IMPORTED_MODULE_49__['pollyfillElementsFromPoint'];19536 -1 });19537 -1 var _preload_cssom__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__('./lib/core/utils/preload-cssom.js');19538 -1 __webpack_require__.d(__webpack_exports__, 'preloadCssom', function() {19539 -1 return _preload_cssom__WEBPACK_IMPORTED_MODULE_50__['default'];19540 -1 });19541 -1 var _preload_media__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__('./lib/core/utils/preload-media.js');19542 -1 __webpack_require__.d(__webpack_exports__, 'preloadMedia', function() {19543 -1 return _preload_media__WEBPACK_IMPORTED_MODULE_51__['default'];19544 -1 });19545 -1 var _preload__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__('./lib/core/utils/preload.js');19546 -1 __webpack_require__.d(__webpack_exports__, 'preload', function() {19547 -1 return _preload__WEBPACK_IMPORTED_MODULE_52__['default'];19548 -1 });19549 -1 __webpack_require__.d(__webpack_exports__, 'shouldPreload', function() {19550 -1 return _preload__WEBPACK_IMPORTED_MODULE_52__['shouldPreload'];19551 -1 });19552 -1 __webpack_require__.d(__webpack_exports__, 'getPreloadConfig', function() {19553 -1 return _preload__WEBPACK_IMPORTED_MODULE_52__['getPreloadConfig'];19554 -1 });19555 -1 var _process_message__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__('./lib/core/utils/process-message.js');19556 -1 __webpack_require__.d(__webpack_exports__, 'processMessage', function() {19557 -1 return _process_message__WEBPACK_IMPORTED_MODULE_53__['default'];19558 -1 });19559 -1 var _publish_metadata__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__('./lib/core/utils/publish-metadata.js');19560 -1 __webpack_require__.d(__webpack_exports__, 'publishMetaData', function() {19561 -1 return _publish_metadata__WEBPACK_IMPORTED_MODULE_54__['default'];19562 -1 });19563 -1 var _query_selector_all_filter__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__('./lib/core/utils/query-selector-all-filter.js');19564 -1 __webpack_require__.d(__webpack_exports__, 'querySelectorAllFilter', function() {19565 -1 return _query_selector_all_filter__WEBPACK_IMPORTED_MODULE_55__['default'];19566 -1 });19567 -1 var _query_selector_all__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__('./lib/core/utils/query-selector-all.js');19568 -1 __webpack_require__.d(__webpack_exports__, 'querySelectorAll', function() {19569 -1 return _query_selector_all__WEBPACK_IMPORTED_MODULE_56__['default'];19570 -1 });19571 -1 var _queue__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__('./lib/core/utils/queue.js');19572 -1 __webpack_require__.d(__webpack_exports__, 'queue', function() {19573 -1 return _queue__WEBPACK_IMPORTED_MODULE_57__['default'];19574 -1 });19575 -1 var _respondable__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__('./lib/core/utils/respondable.js');19576 -1 __webpack_require__.d(__webpack_exports__, 'respondable', function() {19577 -1 return _respondable__WEBPACK_IMPORTED_MODULE_58__['default'];19578 -1 });19579 -1 var _rule_should_run__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__('./lib/core/utils/rule-should-run.js');19580 -1 __webpack_require__.d(__webpack_exports__, 'ruleShouldRun', function() {19581 -1 return _rule_should_run__WEBPACK_IMPORTED_MODULE_59__['default'];19582 -1 });19583 -1 var _select__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__('./lib/core/utils/select.js');19584 -1 __webpack_require__.d(__webpack_exports__, 'select', function() {19585 -1 return _select__WEBPACK_IMPORTED_MODULE_60__['default'];19586 -1 });19587 -1 var _send_command_to_frame__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__('./lib/core/utils/send-command-to-frame.js');19588 -1 __webpack_require__.d(__webpack_exports__, 'sendCommandToFrame', function() {19589 -1 return _send_command_to_frame__WEBPACK_IMPORTED_MODULE_61__['default'];19590 -1 });19591 -1 var _set_scroll_state__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__('./lib/core/utils/set-scroll-state.js');19592 -1 __webpack_require__.d(__webpack_exports__, 'setScrollState', function() {19593 -1 return _set_scroll_state__WEBPACK_IMPORTED_MODULE_62__['default'];19594 -1 });19595 -1 var _to_array__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__('./lib/core/utils/to-array.js');19596 -1 __webpack_require__.d(__webpack_exports__, 'toArray', function() {19597 -1 return _to_array__WEBPACK_IMPORTED_MODULE_63__['default'];19598 -1 });19599 -1 var _token_list__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__('./lib/core/utils/token-list.js');19600 -1 __webpack_require__.d(__webpack_exports__, 'tokenList', function() {19601 -1 return _token_list__WEBPACK_IMPORTED_MODULE_64__['default'];19602 -1 });19603 -1 var _unique_array__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__('./lib/core/utils/unique-array.js');19604 -1 __webpack_require__.d(__webpack_exports__, 'uniqueArray', function() {19605 -1 return _unique_array__WEBPACK_IMPORTED_MODULE_65__['default'];19606 -1 });19607 -1 var _valid_input_type__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__('./lib/core/utils/valid-input-type.js');19608 -1 __webpack_require__.d(__webpack_exports__, 'validInputTypes', function() {19609 -1 return _valid_input_type__WEBPACK_IMPORTED_MODULE_66__['default'];19610 -1 });19611 -1 var _valid_langs__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__('./lib/core/utils/valid-langs.js');19612 -1 __webpack_require__.d(__webpack_exports__, 'validLangs', function() {19613 -1 return _valid_langs__WEBPACK_IMPORTED_MODULE_67__['default'];19614 -1 });19615 -1 },19616 -1 './lib/core/utils/inject-style.js': function libCoreUtilsInjectStyleJs(module, __webpack_exports__, __webpack_require__) {19617 -1 'use strict';19618 -1 __webpack_require__.r(__webpack_exports__);19619 -1 var styleSheet;19620 -1 function injectStyle(style) {19621 -1 if (styleSheet && styleSheet.parentNode) {19622 -1 if (styleSheet.styleSheet === undefined) {19623 -1 styleSheet.appendChild(document.createTextNode(style));19624 -1 } else {19625 -1 styleSheet.styleSheet.cssText += style;19626 -1 }19627 -1 return styleSheet;-1 37349 } -1 37350 var log_default = log; -1 37351 var whitespaceRegex = /[\t\r\n\f]/g; -1 37352 var AbstractVirtualNode = function() { -1 37353 function AbstractVirtualNode() { -1 37354 _classCallCheck(this, AbstractVirtualNode); -1 37355 this.parent = void 0; -1 37356 } -1 37357 _createClass(AbstractVirtualNode, [ { -1 37358 key: 'props', -1 37359 get: function get() { -1 37360 throw new Error('VirtualNode class must have a "props" object consisting of "nodeType" and "nodeName" properties'); 19628 37361 }19629 -1 if (!style) {19630 -1 return;-1 37362 }, { -1 37363 key: 'attrNames', -1 37364 get: function get() { -1 37365 throw new Error('VirtualNode class must have an "attrNames" property'); 19631 37366 }19632 -1 var head = document.head || document.getElementsByTagName('head')[0];19633 -1 styleSheet = document.createElement('style');19634 -1 styleSheet.type = 'text/css';19635 -1 if (styleSheet.styleSheet === undefined) {19636 -1 styleSheet.appendChild(document.createTextNode(style));19637 -1 } else {19638 -1 styleSheet.styleSheet.cssText = style;-1 37367 }, { -1 37368 key: 'attr', -1 37369 value: function attr() { -1 37370 throw new Error('VirtualNode class must have an "attr" function'); 19639 37371 }19640 -1 head.appendChild(styleSheet);19641 -1 return styleSheet;-1 37372 }, { -1 37373 key: 'hasAttr', -1 37374 value: function hasAttr() { -1 37375 throw new Error('VirtualNode class must have a "hasAttr" function'); -1 37376 } -1 37377 }, { -1 37378 key: 'hasClass', -1 37379 value: function hasClass(className) { -1 37380 var classAttr = this.attr('class'); -1 37381 if (!classAttr) { -1 37382 return false; -1 37383 } -1 37384 var selector = ' ' + className + ' '; -1 37385 return (' ' + classAttr + ' ').replace(whitespaceRegex, ' ').indexOf(selector) >= 0; -1 37386 } -1 37387 } ]); -1 37388 return AbstractVirtualNode; -1 37389 }(); -1 37390 var abstract_virtual_node_default = AbstractVirtualNode; -1 37391 var utils_exports = {}; -1 37392 __export(utils_exports, { -1 37393 DqElement: function DqElement() { -1 37394 return dq_element_default; -1 37395 }, -1 37396 aggregate: function aggregate() { -1 37397 return aggregate_default; -1 37398 }, -1 37399 aggregateChecks: function aggregateChecks() { -1 37400 return aggregate_checks_default; -1 37401 }, -1 37402 aggregateNodeResults: function aggregateNodeResults() { -1 37403 return aggregate_node_results_default; -1 37404 }, -1 37405 aggregateResult: function aggregateResult() { -1 37406 return aggregate_result_default; -1 37407 }, -1 37408 areStylesSet: function areStylesSet() { -1 37409 return are_styles_set_default; -1 37410 }, -1 37411 assert: function assert() { -1 37412 return assert_default; -1 37413 }, -1 37414 checkHelper: function checkHelper() { -1 37415 return check_helper_default; -1 37416 }, -1 37417 clone: function clone() { -1 37418 return clone_default; -1 37419 }, -1 37420 closest: function closest() { -1 37421 return closest_default; -1 37422 }, -1 37423 collectResultsFromFrames: function collectResultsFromFrames() { -1 37424 return collect_results_from_frames_default; -1 37425 }, -1 37426 contains: function contains() { -1 37427 return contains_default; -1 37428 }, -1 37429 convertSelector: function convertSelector() { -1 37430 return _convertSelector; -1 37431 }, -1 37432 cssParser: function cssParser() { -1 37433 return css_parser_default; -1 37434 }, -1 37435 deepMerge: function deepMerge() { -1 37436 return deep_merge_default; -1 37437 }, -1 37438 escapeSelector: function escapeSelector() { -1 37439 return escape_selector_default; -1 37440 }, -1 37441 extendMetaData: function extendMetaData() { -1 37442 return extend_meta_data_default; -1 37443 }, -1 37444 filterHtmlAttrs: function filterHtmlAttrs() { -1 37445 return filter_html_attrs_default; -1 37446 }, -1 37447 finalizeRuleResult: function finalizeRuleResult() { -1 37448 return finalize_result_default; -1 37449 }, -1 37450 findBy: function findBy() { -1 37451 return find_by_default; -1 37452 }, -1 37453 getAllChecks: function getAllChecks() { -1 37454 return get_all_checks_default; -1 37455 }, -1 37456 getAncestry: function getAncestry() { -1 37457 return _getAncestry; -1 37458 }, -1 37459 getBaseLang: function getBaseLang() { -1 37460 return get_base_lang_default; -1 37461 }, -1 37462 getCheckMessage: function getCheckMessage() { -1 37463 return get_check_message_default; -1 37464 }, -1 37465 getCheckOption: function getCheckOption() { -1 37466 return get_check_option_default; -1 37467 }, -1 37468 getFlattenedTree: function getFlattenedTree() { -1 37469 return get_flattened_tree_default; -1 37470 }, -1 37471 getFriendlyUriEnd: function getFriendlyUriEnd() { -1 37472 return get_friendly_uri_end_default; -1 37473 }, -1 37474 getNodeAttributes: function getNodeAttributes() { -1 37475 return get_node_attributes_default; -1 37476 }, -1 37477 getNodeFromTree: function getNodeFromTree() { -1 37478 return get_node_from_tree_default; -1 37479 }, -1 37480 getPreloadConfig: function getPreloadConfig() { -1 37481 return _getPreloadConfig; -1 37482 }, -1 37483 getRootNode: function getRootNode() { -1 37484 return get_root_node_default; -1 37485 }, -1 37486 getRule: function getRule() { -1 37487 return get_rule_default; -1 37488 }, -1 37489 getScroll: function getScroll() { -1 37490 return get_scroll_default; -1 37491 }, -1 37492 getScrollState: function getScrollState() { -1 37493 return get_scroll_state_default; -1 37494 }, -1 37495 getSelector: function getSelector() { -1 37496 return _getSelector; -1 37497 }, -1 37498 getSelectorData: function getSelectorData() { -1 37499 return _getSelectorData; -1 37500 }, -1 37501 getShadowSelector: function getShadowSelector() { -1 37502 return get_shadow_selector_default; -1 37503 }, -1 37504 getStandards: function getStandards() { -1 37505 return _getStandards; -1 37506 }, -1 37507 getStyleSheetFactory: function getStyleSheetFactory() { -1 37508 return get_stylesheet_factory_default; -1 37509 }, -1 37510 getXpath: function getXpath() { -1 37511 return get_xpath_default; -1 37512 }, -1 37513 injectStyle: function injectStyle() { -1 37514 return inject_style_default; -1 37515 }, -1 37516 isHidden: function isHidden() { -1 37517 return is_hidden_default; -1 37518 }, -1 37519 isHtmlElement: function isHtmlElement() { -1 37520 return is_html_element_default; -1 37521 }, -1 37522 isNodeInContext: function isNodeInContext() { -1 37523 return is_node_in_context_default; -1 37524 }, -1 37525 isShadowRoot: function isShadowRoot() { -1 37526 return is_shadow_root_default; -1 37527 }, -1 37528 isValidLang: function isValidLang() { -1 37529 return valid_langs_default; -1 37530 }, -1 37531 isXHTML: function isXHTML() { -1 37532 return is_xhtml_default; -1 37533 }, -1 37534 matches: function matches() { -1 37535 return matches_default; -1 37536 }, -1 37537 matchesExpression: function matchesExpression() { -1 37538 return _matchesExpression; -1 37539 }, -1 37540 matchesSelector: function matchesSelector() { -1 37541 return element_matches_default; -1 37542 }, -1 37543 memoize: function memoize() { -1 37544 return memoize_default; -1 37545 }, -1 37546 mergeResults: function mergeResults() { -1 37547 return merge_results_default; -1 37548 }, -1 37549 nodeSorter: function nodeSorter() { -1 37550 return node_sorter_default; -1 37551 }, -1 37552 parseCrossOriginStylesheet: function parseCrossOriginStylesheet() { -1 37553 return parse_crossorigin_stylesheet_default; -1 37554 }, -1 37555 parseSameOriginStylesheet: function parseSameOriginStylesheet() { -1 37556 return parse_sameorigin_stylesheet_default; -1 37557 }, -1 37558 parseStylesheet: function parseStylesheet() { -1 37559 return parse_stylesheet_default; -1 37560 }, -1 37561 performanceTimer: function performanceTimer() { -1 37562 return performance_timer_default; -1 37563 }, -1 37564 pollyfillElementsFromPoint: function pollyfillElementsFromPoint() { -1 37565 return _pollyfillElementsFromPoint; -1 37566 }, -1 37567 preload: function preload() { -1 37568 return preload_default; -1 37569 }, -1 37570 preloadCssom: function preloadCssom() { -1 37571 return preload_cssom_default; -1 37572 }, -1 37573 preloadMedia: function preloadMedia() { -1 37574 return preload_media_default; -1 37575 }, -1 37576 processMessage: function processMessage() { -1 37577 return process_message_default; -1 37578 }, -1 37579 publishMetaData: function publishMetaData() { -1 37580 return publish_metadata_default; -1 37581 }, -1 37582 querySelectorAll: function querySelectorAll() { -1 37583 return query_selector_all_default; -1 37584 }, -1 37585 querySelectorAllFilter: function querySelectorAllFilter() { -1 37586 return query_selector_all_filter_default; -1 37587 }, -1 37588 queue: function queue() { -1 37589 return queue_default; -1 37590 }, -1 37591 respondable: function respondable() { -1 37592 return _respondable; -1 37593 }, -1 37594 ruleShouldRun: function ruleShouldRun() { -1 37595 return rule_should_run_default; -1 37596 }, -1 37597 select: function select() { -1 37598 return select_default; -1 37599 }, -1 37600 sendCommandToFrame: function sendCommandToFrame() { -1 37601 return send_command_to_frame_default; -1 37602 }, -1 37603 setScrollState: function setScrollState() { -1 37604 return set_scroll_state_default; -1 37605 }, -1 37606 shouldPreload: function shouldPreload() { -1 37607 return _shouldPreload; -1 37608 }, -1 37609 toArray: function toArray() { -1 37610 return to_array_default; -1 37611 }, -1 37612 tokenList: function tokenList() { -1 37613 return token_list_default; -1 37614 }, -1 37615 uniqueArray: function uniqueArray() { -1 37616 return unique_array_default; -1 37617 }, -1 37618 uuid: function uuid() { -1 37619 return uuid_default; -1 37620 }, -1 37621 validInputTypes: function validInputTypes() { -1 37622 return valid_input_type_default; -1 37623 }, -1 37624 validLangs: function validLangs() { -1 37625 return _validLangs; 19642 37626 }19643 -1 __webpack_exports__['default'] = injectStyle;19644 -1 },19645 -1 './lib/core/utils/is-hidden.js': function libCoreUtilsIsHiddenJs(module, __webpack_exports__, __webpack_require__) {19646 -1 'use strict';19647 -1 __webpack_require__.r(__webpack_exports__);19648 -1 var _get_node_from_tree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/get-node-from-tree.js');19649 -1 function isHidden(el, recursed) {19650 -1 var node = Object(_get_node_from_tree__WEBPACK_IMPORTED_MODULE_0__['default'])(el);19651 -1 if (el.nodeType === 9) {19652 -1 return false;19653 -1 }19654 -1 if (el.nodeType === 11) {19655 -1 el = el.host;19656 -1 }19657 -1 if (node && node._isHidden !== null) {19658 -1 return node._isHidden;19659 -1 }19660 -1 var style = window.getComputedStyle(el, null);19661 -1 if (!style || !el.parentNode || style.getPropertyValue('display') === 'none' || !recursed && style.getPropertyValue('visibility') === 'hidden' || el.getAttribute('aria-hidden') === 'true') {19662 -1 return true;19663 -1 }19664 -1 var parent = el.assignedSlot ? el.assignedSlot : el.parentNode;19665 -1 var hidden = isHidden(parent, true);19666 -1 if (node) {19667 -1 node._isHidden = hidden;19668 -1 }19669 -1 return hidden;-1 37627 }); -1 37628 var errorTypes = Object.freeze([ 'EvalError', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError' ]); -1 37629 function stringifyMessage(_ref) { -1 37630 var topic = _ref.topic, channelId = _ref.channelId, message = _ref.message, messageId = _ref.messageId, keepalive = _ref.keepalive; -1 37631 var data2 = { -1 37632 channelId: channelId, -1 37633 topic: topic, -1 37634 messageId: messageId, -1 37635 keepalive: !!keepalive, -1 37636 source: getSource() -1 37637 }; -1 37638 if (message instanceof Error) { -1 37639 data2.error = { -1 37640 name: message.name, -1 37641 message: message.message, -1 37642 stack: message.stack -1 37643 }; -1 37644 } else { -1 37645 data2.payload = message; 19670 37646 }19671 -1 __webpack_exports__['default'] = isHidden;19672 -1 },19673 -1 './lib/core/utils/is-html-element.js': function libCoreUtilsIsHtmlElementJs(module, __webpack_exports__, __webpack_require__) {19674 -1 'use strict';19675 -1 __webpack_require__.r(__webpack_exports__);19676 -1 var htmlTags = [ 'a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'math', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rb', 'rp', 'rt', 'rtc', 'ruby', 's', 'samp', 'script', 'section', 'select', 'slot', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'svg', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr' ];19677 -1 function isHtmlElement(node) {19678 -1 if (node.namespaceURI === 'http://www.w3.org/2000/svg') {19679 -1 return false;19680 -1 }19681 -1 return htmlTags.includes(node.nodeName.toLowerCase());-1 37647 return JSON.stringify(data2); -1 37648 } -1 37649 function parseMessage(dataString) { -1 37650 var data2; -1 37651 try { -1 37652 data2 = JSON.parse(dataString); -1 37653 } catch (e) { -1 37654 return; 19682 37655 }19683 -1 __webpack_exports__['default'] = isHtmlElement;19684 -1 },19685 -1 './lib/core/utils/is-node-in-context.js': function libCoreUtilsIsNodeInContextJs(module, __webpack_exports__, __webpack_require__) {19686 -1 'use strict';19687 -1 __webpack_require__.r(__webpack_exports__);19688 -1 var _contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/contains.js');19689 -1 function getDeepest(collection) {19690 -1 return collection.sort(function(a, b) {19691 -1 if (Object(_contains__WEBPACK_IMPORTED_MODULE_0__['default'])(a, b)) {19692 -1 return 1;19693 -1 }19694 -1 return -1;19695 -1 })[0];-1 37656 if (!isRespondableMessage(data2)) { -1 37657 return; 19696 37658 }19697 -1 function isNodeInContext(node, context) {19698 -1 var include = context.include && getDeepest(context.include.filter(function(candidate) {19699 -1 return Object(_contains__WEBPACK_IMPORTED_MODULE_0__['default'])(candidate, node);19700 -1 }));19701 -1 var exclude = context.exclude && getDeepest(context.exclude.filter(function(candidate) {19702 -1 return Object(_contains__WEBPACK_IMPORTED_MODULE_0__['default'])(candidate, node);19703 -1 }));19704 -1 if (!exclude && include || exclude && Object(_contains__WEBPACK_IMPORTED_MODULE_0__['default'])(exclude, include)) {19705 -1 return true;19706 -1 }19707 -1 return false;-1 37659 var _data = data2, topic = _data.topic, channelId = _data.channelId, messageId = _data.messageId, keepalive = _data.keepalive; -1 37660 var message = _typeof(data2.error) === 'object' ? buildErrorObject(data2.error) : data2.payload; -1 37661 return { -1 37662 topic: topic, -1 37663 message: message, -1 37664 messageId: messageId, -1 37665 channelId: channelId, -1 37666 keepalive: !!keepalive -1 37667 }; -1 37668 } -1 37669 function isRespondableMessage(postedMessage) { -1 37670 return _typeof(postedMessage) === 'object' && typeof postedMessage.channelId === 'string' && postedMessage.source === getSource(); -1 37671 } -1 37672 function buildErrorObject(error) { -1 37673 var msg = error.message || 'Unknown error occurred'; -1 37674 var errorName = errorTypes.includes(error.name) ? error.name : 'Error'; -1 37675 var ErrConstructor = window[errorName] || Error; -1 37676 if (error.stack) { -1 37677 msg += '\n' + error.stack.replace(error.message, ''); -1 37678 } -1 37679 return new ErrConstructor(msg); -1 37680 } -1 37681 function getSource() { -1 37682 var application = 'axeAPI'; -1 37683 var version = ''; -1 37684 if (typeof axe !== 'undefined' && axe._audit && axe._audit.application) { -1 37685 application = axe._audit.application; 19708 37686 }19709 -1 __webpack_exports__['default'] = isNodeInContext;19710 -1 },19711 -1 './lib/core/utils/is-shadow-root.js': function libCoreUtilsIsShadowRootJs(module, __webpack_exports__, __webpack_require__) {19712 -1 'use strict';19713 -1 __webpack_require__.r(__webpack_exports__);19714 -1 var possibleShadowRoots = [ 'article', 'aside', 'blockquote', 'body', 'div', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'main', 'nav', 'p', 'section', 'span' ];19715 -1 function isShadowRoot(node) {19716 -1 if (node.shadowRoot) {19717 -1 var nodeName = node.nodeName.toLowerCase();19718 -1 if (possibleShadowRoots.includes(nodeName) || /^[a-z][a-z0-9_.-]*-[a-z0-9_.-]*$/.test(nodeName)) {19719 -1 return true;-1 37687 if (typeof axe !== 'undefined') { -1 37688 version = axe.version; -1 37689 } -1 37690 return application + '.' + version; -1 37691 } -1 37692 function assert(bool, message) { -1 37693 if (!bool) { -1 37694 throw new Error(message); -1 37695 } -1 37696 } -1 37697 var assert_default = assert; -1 37698 function assertIsParentWindow(win) { -1 37699 assetNotGlobalWindow(win); -1 37700 assert_default(window.parent === win, 'Source of the response must be the parent window.'); -1 37701 } -1 37702 function assertIsFrameWindow(win) { -1 37703 assetNotGlobalWindow(win); -1 37704 assert_default(win.parent === window, 'Respondable target must be a frame in the current window'); -1 37705 } -1 37706 function assetNotGlobalWindow(win) { -1 37707 assert_default(window !== win, 'Messages can not be sent to the same window.'); -1 37708 } -1 37709 var channels = {}; -1 37710 function storeReplyHandler(channelId, replyHandler) { -1 37711 var sendToParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; -1 37712 assert_default(!channels[channelId], 'A replyHandler already exists for this message channel.'); -1 37713 channels[channelId] = { -1 37714 replyHandler: replyHandler, -1 37715 sendToParent: sendToParent -1 37716 }; -1 37717 } -1 37718 function getReplyHandler(channelId) { -1 37719 return channels[channelId]; -1 37720 } -1 37721 function deleteReplyHandler(channelId) { -1 37722 delete channels[channelId]; -1 37723 } -1 37724 var uuid; -1 37725 var _rng; -1 37726 var _crypto = window.crypto || window.msCrypto; -1 37727 if (!_rng && _crypto && _crypto.getRandomValues) { -1 37728 var _rnds8 = new Uint8Array(16); -1 37729 _rng = function whatwgRNG() { -1 37730 _crypto.getRandomValues(_rnds8); -1 37731 return _rnds8; -1 37732 }; -1 37733 } -1 37734 try { -1 37735 if (!_rng) { -1 37736 var nodeCrypto = require('crypto'); -1 37737 _rng = function _rng() { -1 37738 return nodeCrypto.randomBytes(16); -1 37739 }; -1 37740 } -1 37741 } catch (e) {} -1 37742 if (!_rng) { -1 37743 var _rnds = new Array(16); -1 37744 _rng = function _rng() { -1 37745 for (var i = 0, r; i < 16; i++) { -1 37746 if ((i & 3) === 0) { -1 37747 r = Math.random() * 4294967296; 19720 37748 } -1 37749 _rnds[i] = r >>> ((i & 3) << 3) & 255; 19721 37750 }19722 -1 return false;19723 -1 }19724 -1 __webpack_exports__['default'] = isShadowRoot;19725 -1 },19726 -1 './lib/core/utils/is-xhtml.js': function libCoreUtilsIsXhtmlJs(module, __webpack_exports__, __webpack_require__) {19727 -1 'use strict';19728 -1 __webpack_require__.r(__webpack_exports__);19729 -1 function isXHTML(doc) {19730 -1 if (!doc.createElement) {19731 -1 return false;-1 37751 return _rnds; -1 37752 }; -1 37753 } -1 37754 var BufferClass = typeof window.Buffer == 'function' ? window.Buffer : Array; -1 37755 var _byteToHex = []; -1 37756 var _hexToByte = {}; -1 37757 for (var i = 0; i < 256; i++) { -1 37758 _byteToHex[i] = (i + 256).toString(16).substr(1); -1 37759 _hexToByte[_byteToHex[i]] = i; -1 37760 } -1 37761 function parse(s, buf, offset) { -1 37762 var i = buf && offset || 0, ii = 0; -1 37763 buf = buf || []; -1 37764 s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { -1 37765 if (ii < 16) { -1 37766 buf[i + ii++] = _hexToByte[oct]; 19732 37767 }19733 -1 return doc.createElement('A').localName === 'A';19734 -1 }19735 -1 __webpack_exports__['default'] = isXHTML;19736 -1 },19737 -1 './lib/core/utils/matches.js': function libCoreUtilsMatchesJs(module, __webpack_exports__, __webpack_require__) {19738 -1 'use strict';19739 -1 __webpack_require__.r(__webpack_exports__);19740 -1 __webpack_require__.d(__webpack_exports__, 'convertSelector', function() {19741 -1 return convertSelector;19742 37768 });19743 -1 __webpack_require__.d(__webpack_exports__, 'matchesExpression', function() {19744 -1 return matchesExpression;19745 -1 });19746 -1 var _css_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/css-parser.js');19747 -1 function matchesTag(vNode, exp) {19748 -1 return vNode.props.nodeType === 1 && (exp.tag === '*' || vNode.props.nodeName === exp.tag);-1 37769 while (ii < 16) { -1 37770 buf[i + ii++] = 0; 19749 37771 }19750 -1 function matchesClasses(vNode, exp) {19751 -1 return !exp.classes || exp.classes.every(function(cl) {19752 -1 return vNode.hasClass(cl.value);19753 -1 });-1 37772 return buf; -1 37773 } -1 37774 function unparse(buf, offset) { -1 37775 var i = offset || 0, bth = _byteToHex; -1 37776 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++]]; -1 37777 } -1 37778 var _seedBytes = _rng(); -1 37779 var _nodeId = [ _seedBytes[0] | 1, _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] ]; -1 37780 var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 16383; -1 37781 var _lastMSecs = 0; -1 37782 var _lastNSecs = 0; -1 37783 function v1(options, buf, offset) { -1 37784 var i = buf && offset || 0; -1 37785 var b = buf || []; -1 37786 options = options || {}; -1 37787 var clockseq = options.clockseq != null ? options.clockseq : _clockseq; -1 37788 var msecs = options.msecs != null ? options.msecs : new Date().getTime(); -1 37789 var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1; -1 37790 var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; -1 37791 if (dt < 0 && options.clockseq == null) { -1 37792 clockseq = clockseq + 1 & 16383; -1 37793 } -1 37794 if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) { -1 37795 nsecs = 0; -1 37796 } -1 37797 if (nsecs >= 1e4) { -1 37798 throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); -1 37799 } -1 37800 _lastMSecs = msecs; -1 37801 _lastNSecs = nsecs; -1 37802 _clockseq = clockseq; -1 37803 msecs += 122192928e5; -1 37804 var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; -1 37805 b[i++] = tl >>> 24 & 255; -1 37806 b[i++] = tl >>> 16 & 255; -1 37807 b[i++] = tl >>> 8 & 255; -1 37808 b[i++] = tl & 255; -1 37809 var tmh = msecs / 4294967296 * 1e4 & 268435455; -1 37810 b[i++] = tmh >>> 8 & 255; -1 37811 b[i++] = tmh & 255; -1 37812 b[i++] = tmh >>> 24 & 15 | 16; -1 37813 b[i++] = tmh >>> 16 & 255; -1 37814 b[i++] = clockseq >>> 8 | 128; -1 37815 b[i++] = clockseq & 255; -1 37816 var node = options.node || _nodeId; -1 37817 for (var n = 0; n < 6; n++) { -1 37818 b[i + n] = node[n]; -1 37819 } -1 37820 return buf ? buf : unparse(b); -1 37821 } -1 37822 function v4(options, buf, offset) { -1 37823 var i = buf && offset || 0; -1 37824 if (typeof options == 'string') { -1 37825 buf = options == 'binary' ? new BufferClass(16) : null; -1 37826 options = null; -1 37827 } -1 37828 options = options || {}; -1 37829 var rnds = options.random || (options.rng || _rng)(); -1 37830 rnds[6] = rnds[6] & 15 | 64; -1 37831 rnds[8] = rnds[8] & 63 | 128; -1 37832 if (buf) { -1 37833 for (var ii = 0; ii < 16; ii++) { -1 37834 buf[i + ii] = rnds[ii]; -1 37835 } -1 37836 } -1 37837 return buf || unparse(rnds); -1 37838 } -1 37839 uuid = v4; -1 37840 uuid.v1 = v1; -1 37841 uuid.v4 = v4; -1 37842 uuid.parse = parse; -1 37843 uuid.unparse = unparse; -1 37844 uuid.BufferClass = BufferClass; -1 37845 axe._uuid = v1(); -1 37846 var uuid_default = v4; -1 37847 var messageIds = []; -1 37848 function createMessageId() { -1 37849 var uuid5 = ''.concat(v4(), ':').concat(v4()); -1 37850 if (messageIds.includes(uuid5)) { -1 37851 return createMessageId(); -1 37852 } -1 37853 messageIds.push(uuid5); -1 37854 return uuid5; -1 37855 } -1 37856 function isNewMessage(uuid5) { -1 37857 if (messageIds.includes(uuid5)) { -1 37858 return false; 19754 37859 }19755 -1 function matchesAttributes(vNode, exp) {19756 -1 return !exp.attributes || exp.attributes.every(function(att) {19757 -1 var nodeAtt = vNode.attr(att.key);19758 -1 return nodeAtt !== null && (!att.value || att.test(nodeAtt));19759 -1 });-1 37860 messageIds.push(uuid5); -1 37861 return true; -1 37862 } -1 37863 function postMessage(win, data2, sendToParent, replyHandler) { -1 37864 if (typeof replyHandler === 'function') { -1 37865 storeReplyHandler(data2.channelId, replyHandler, sendToParent); -1 37866 } -1 37867 sendToParent ? assertIsParentWindow(win) : assertIsFrameWindow(win); -1 37868 if (data2.message instanceof Error && !sendToParent) { -1 37869 axe.log(data2.message); -1 37870 return false; 19760 37871 }19761 -1 function matchesId(vNode, exp) {19762 -1 return !exp.id || vNode.props.id === exp.id;-1 37872 var dataString = stringifyMessage(_extends({ -1 37873 messageId: createMessageId() -1 37874 }, data2)); -1 37875 var allowedOrigins = axe._audit.allowedOrigins; -1 37876 if (!allowedOrigins || !allowedOrigins.length) { -1 37877 return false; 19763 37878 }19764 -1 function matchesPseudos(target, exp) {19765 -1 if (!exp.pseudos || exp.pseudos.every(function(pseudo) {19766 -1 if (pseudo.name === 'not') {19767 -1 return !matchesExpression(target, pseudo.expressions[0]);-1 37879 allowedOrigins.forEach(function(origin) { -1 37880 try { -1 37881 win.postMessage(dataString, origin); -1 37882 } catch (err2) { -1 37883 if (err2 instanceof win.DOMException) { -1 37884 throw new Error('allowedOrigins value "'.concat(origin, '" is not a valid origin')); 19768 37885 }19769 -1 throw new Error('the pseudo selector ' + pseudo.name + ' has not yet been implemented');19770 -1 })) {19771 -1 return true;-1 37886 throw err2; 19772 37887 }19773 -1 return false;-1 37888 }); -1 37889 return true; -1 37890 } -1 37891 function processError(win, error, channelId) { -1 37892 if (!win.parent !== window) { -1 37893 return axe.log(error); 19774 37894 }19775 -1 function matchExpression(vNode, expression) {19776 -1 return matchesTag(vNode, expression) && matchesClasses(vNode, expression) && matchesAttributes(vNode, expression) && matchesId(vNode, expression) && matchesPseudos(vNode, expression);-1 37895 try { -1 37896 postMessage(win, { -1 37897 topic: null, -1 37898 channelId: channelId, -1 37899 message: error, -1 37900 messageId: createMessageId(), -1 37901 keepalive: true -1 37902 }, true); -1 37903 } catch (err2) { -1 37904 return axe.log(err2); 19777 37905 }19778 -1 var escapeRegExp = function() {19779 -1 var from = /(?=[\-\[\]{}()*+?.\\\^$|,#\s])/g;19780 -1 var to = '\\';19781 -1 return function(string) {19782 -1 return string.replace(from, to);-1 37906 } -1 37907 function createResponder(win, channelId) { -1 37908 var sendToParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; -1 37909 return function respond(message, keepalive, replyHandler) { -1 37910 var data2 = { -1 37911 channelId: channelId, -1 37912 message: message, -1 37913 keepalive: keepalive 19783 37914 };19784 -1 }();19785 -1 var reUnescape = /\\/g;19786 -1 function convertAttributes(atts) {19787 -1 if (!atts) {19788 -1 return;19789 -1 }19790 -1 return atts.map(function(att) {19791 -1 var attributeKey = att.name.replace(reUnescape, '');19792 -1 var attributeValue = (att.value || '').replace(reUnescape, '');19793 -1 var test, regexp;19794 -1 switch (att.operator) {19795 -1 case '^=':19796 -1 regexp = new RegExp('^' + escapeRegExp(attributeValue));19797 -1 break;19798 -119799 -1 case '$=':19800 -1 regexp = new RegExp(escapeRegExp(attributeValue) + '$');19801 -1 break;19802 -119803 -1 case '~=':19804 -1 regexp = new RegExp('(^|\\s)' + escapeRegExp(attributeValue) + '(\\s|$)');19805 -1 break;19806 -119807 -1 case '|=':19808 -1 regexp = new RegExp('^' + escapeRegExp(attributeValue) + '(-|$)');19809 -1 break;19810 -119811 -1 case '=':19812 -1 test = function test(value) {19813 -1 return attributeValue === value;19814 -1 };19815 -1 break;19816 -119817 -1 case '*=':19818 -1 test = function test(value) {19819 -1 return value && value.includes(attributeValue);19820 -1 };19821 -1 break;19822 -119823 -1 case '!=':19824 -1 test = function test(value) {19825 -1 return attributeValue !== value;19826 -1 };19827 -1 break;19828 -119829 -1 default:19830 -1 test = function test(value) {19831 -1 return !!value;19832 -1 };19833 -1 }19834 -1 if (attributeValue === '' && /^[*$^]=$/.test(att.operator)) {19835 -1 test = function test() {19836 -1 return false;19837 -1 };19838 -1 }19839 -1 if (!test) {19840 -1 test = function test(value) {19841 -1 return value && regexp.test(value);19842 -1 };19843 -1 }19844 -1 return {19845 -1 key: attributeKey,19846 -1 value: attributeValue,19847 -1 test: test19848 -1 };19849 -1 });-1 37915 postMessage(win, data2, sendToParent, replyHandler); -1 37916 }; -1 37917 } -1 37918 function originIsAllowed(origin) { -1 37919 var allowedOrigins = axe._audit.allowedOrigins; -1 37920 return allowedOrigins && allowedOrigins.includes('*') || allowedOrigins.includes(origin); -1 37921 } -1 37922 function messageHandler(_ref2, topicHandler) { -1 37923 var origin = _ref2.origin, dataString = _ref2.data, win = _ref2.source; -1 37924 var data2 = parseMessage(dataString) || {}; -1 37925 var channelId = data2.channelId, message = data2.message, messageId = data2.messageId; -1 37926 if (!originIsAllowed(origin) || !isNewMessage(messageId)) { -1 37927 return; -1 37928 } -1 37929 if (message instanceof Error && win.parent !== window) { -1 37930 axe.log(message); -1 37931 return false; 19850 37932 }19851 -1 function convertClasses(classes) {19852 -1 if (!classes) {19853 -1 return;-1 37933 try { -1 37934 if (data2.topic) { -1 37935 var responder = createResponder(win, channelId); -1 37936 assertIsParentWindow(win); -1 37937 topicHandler(data2, responder); -1 37938 } else { -1 37939 callReplyHandler(win, data2); 19854 37940 }19855 -1 return classes.map(function(className) {19856 -1 className = className.replace(reUnescape, '');19857 -1 return {19858 -1 value: className,19859 -1 regexp: new RegExp('(^|\\s)' + escapeRegExp(className) + '(\\s|$)')19860 -1 };19861 -1 });-1 37941 } catch (error) { -1 37942 processError(win, error, channelId); 19862 37943 }19863 -1 function convertPseudos(pseudos) {19864 -1 if (!pseudos) {19865 -1 return;19866 -1 }19867 -1 return pseudos.map(function(p) {19868 -1 var expressions;19869 -1 if (p.name === 'not') {19870 -1 expressions = p.value;19871 -1 expressions = expressions.selectors ? expressions.selectors : [ expressions ];19872 -1 expressions = convertExpressions(expressions);19873 -1 }19874 -1 return {19875 -1 name: p.name,19876 -1 expressions: expressions,19877 -1 value: p.value19878 -1 };19879 -1 });-1 37944 } -1 37945 function callReplyHandler(win, data2) { -1 37946 var channelId = data2.channelId, message = data2.message, keepalive = data2.keepalive; -1 37947 var _ref3 = getReplyHandler(channelId) || {}, replyHandler = _ref3.replyHandler, sendToParent = _ref3.sendToParent; -1 37948 if (!replyHandler) { -1 37949 return; 19880 37950 }19881 -1 function convertExpressions(expressions) {19882 -1 return expressions.map(function(exp) {19883 -1 var newExp = [];19884 -1 var rule = exp.rule;19885 -1 while (rule) {19886 -1 newExp.push({19887 -1 tag: rule.tagName ? rule.tagName.toLowerCase() : '*',19888 -1 combinator: rule.nestingOperator ? rule.nestingOperator : ' ',19889 -1 id: rule.id,19890 -1 attributes: convertAttributes(rule.attrs),19891 -1 classes: convertClasses(rule.classNames),19892 -1 pseudos: convertPseudos(rule.pseudos)19893 -1 });19894 -1 rule = rule.rule;19895 -1 }19896 -1 return newExp;19897 -1 });-1 37951 sendToParent ? assertIsParentWindow(win) : assertIsFrameWindow(win); -1 37952 var responder = createResponder(win, channelId, sendToParent); -1 37953 if (!keepalive && channelId) { -1 37954 deleteReplyHandler(channelId); 19898 37955 }19899 -1 function convertSelector(selector) {19900 -1 var expressions = _css_parser__WEBPACK_IMPORTED_MODULE_0__['default'].parse(selector);19901 -1 expressions = expressions.selectors ? expressions.selectors : [ expressions ];19902 -1 return convertExpressions(expressions);-1 37956 try { -1 37957 replyHandler(message, keepalive, responder); -1 37958 } catch (error) { -1 37959 axe.log(error); -1 37960 responder(error, keepalive); 19903 37961 }19904 -1 function matchesExpression(vNode, expressions, matchAnyParent) {19905 -1 var exps = [].concat(expressions);19906 -1 var expression = exps.pop();19907 -1 var matches = matchExpression(vNode, expression);19908 -1 while (!matches && matchAnyParent && vNode.parent) {19909 -1 vNode = vNode.parent;19910 -1 matches = matchExpression(vNode, expression);-1 37962 } -1 37963 var frameMessenger = { -1 37964 open: function open(topicHandler) { -1 37965 if (typeof window.addEventListener !== 'function') { -1 37966 return; 19911 37967 }19912 -1 if (exps.length) {19913 -1 if ([ ' ', '>' ].includes(expression.combinator) === false) {19914 -1 throw new Error('axe.utils.matchesExpression does not support the combinator: ' + expression.combinator);19915 -1 }19916 -1 matches = matches && matchesExpression(vNode.parent, exps, expression.combinator === ' ');-1 37968 var handler = function handler(messageEvent) { -1 37969 messageHandler(messageEvent, topicHandler); -1 37970 }; -1 37971 window.addEventListener('message', handler, false); -1 37972 return function() { -1 37973 window.removeEventListener('message', handler, false); -1 37974 }; -1 37975 }, -1 37976 post: function post(win, data2, replyHandler) { -1 37977 if (typeof window.addEventListener !== 'function') { -1 37978 return false; 19917 37979 }19918 -1 return matches;-1 37980 return postMessage(win, data2, false, replyHandler); 19919 37981 }19920 -1 function matches(vNode, selector) {19921 -1 var expressions = convertSelector(selector);19922 -1 return expressions.some(function(expression) {19923 -1 return matchesExpression(vNode, expression);-1 37982 }; -1 37983 function setDefaultFrameMessenger(respondable5) { -1 37984 respondable5.updateMessenger(frameMessenger); -1 37985 } -1 37986 function aggregate(map, values, initial) { -1 37987 values = values.slice(); -1 37988 if (initial) { -1 37989 values.push(initial); -1 37990 } -1 37991 var sorting = values.map(function(val) { -1 37992 return map.indexOf(val); -1 37993 }).sort(); -1 37994 return map[sorting.pop()]; -1 37995 } -1 37996 var aggregate_default = aggregate; -1 37997 var CANTTELL_PRIO = constants_default.CANTTELL_PRIO, FAIL_PRIO = constants_default.FAIL_PRIO; -1 37998 var checkMap = []; -1 37999 checkMap[constants_default.PASS_PRIO] = true; -1 38000 checkMap[constants_default.CANTTELL_PRIO] = null; -1 38001 checkMap[constants_default.FAIL_PRIO] = false; -1 38002 var checkTypes = [ 'any', 'all', 'none' ]; -1 38003 function anyAllNone(obj, functor) { -1 38004 return checkTypes.reduce(function(out, type) { -1 38005 out[type] = (obj[type] || []).map(function(val) { -1 38006 return functor(val, type); -1 38007 }); -1 38008 return out; -1 38009 }, {}); -1 38010 } -1 38011 function aggregateChecks(nodeResOriginal) { -1 38012 var nodeResult = Object.assign({}, nodeResOriginal); -1 38013 anyAllNone(nodeResult, function(check4, type) { -1 38014 var i = typeof check4.result === 'undefined' ? -1 : checkMap.indexOf(check4.result); -1 38015 check4.priority = i !== -1 ? i : constants_default.CANTTELL_PRIO; -1 38016 if (type === 'none') { -1 38017 if (check4.priority === constants_default.PASS_PRIO) { -1 38018 check4.priority = constants_default.FAIL_PRIO; -1 38019 } else if (check4.priority === constants_default.FAIL_PRIO) { -1 38020 check4.priority = constants_default.PASS_PRIO; -1 38021 } -1 38022 } -1 38023 }); -1 38024 var priorities = { -1 38025 all: nodeResult.all.reduce(function(a, b) { -1 38026 return Math.max(a, b.priority); -1 38027 }, 0), -1 38028 none: nodeResult.none.reduce(function(a, b) { -1 38029 return Math.max(a, b.priority); -1 38030 }, 0), -1 38031 any: nodeResult.any.reduce(function(a, b) { -1 38032 return Math.min(a, b.priority); -1 38033 }, 4) % 4 -1 38034 }; -1 38035 nodeResult.priority = Math.max(priorities.all, priorities.none, priorities.any); -1 38036 var impacts = []; -1 38037 checkTypes.forEach(function(type) { -1 38038 nodeResult[type] = nodeResult[type].filter(function(check4) { -1 38039 return check4.priority === nodeResult.priority && check4.priority === priorities[type]; 19924 38040 }); -1 38041 nodeResult[type].forEach(function(check4) { -1 38042 return impacts.push(check4.impact); -1 38043 }); -1 38044 }); -1 38045 if ([ CANTTELL_PRIO, FAIL_PRIO ].includes(nodeResult.priority)) { -1 38046 nodeResult.impact = aggregate_default(constants_default.impact, impacts); -1 38047 } else { -1 38048 nodeResult.impact = null; 19925 38049 }19926 -1 __webpack_exports__['default'] = matches;19927 -1 },19928 -1 './lib/core/utils/memoize.js': function libCoreUtilsMemoizeJs(module, __webpack_exports__, __webpack_require__) {19929 -1 'use strict';19930 -1 __webpack_require__.r(__webpack_exports__);19931 -1 var memoizee__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./node_modules/memoizee/index.js');19932 -1 var memoizee__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(memoizee__WEBPACK_IMPORTED_MODULE_0__);19933 -1 axe._memoizedFns = [];19934 -1 function memoizeImplementation(fn) {19935 -1 var memoized = memoizee__WEBPACK_IMPORTED_MODULE_0___default()(fn);19936 -1 axe._memoizedFns.push(memoized);19937 -1 return memoized;19938 -1 }19939 -1 __webpack_exports__['default'] = memoizeImplementation;19940 -1 },19941 -1 './lib/core/utils/merge-results.js': function libCoreUtilsMergeResultsJs(module, __webpack_exports__, __webpack_require__) {19942 -1 'use strict';19943 -1 __webpack_require__.r(__webpack_exports__);19944 -1 var _dq_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/dq-element.js');19945 -1 var _get_all_checks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/get-all-checks.js');19946 -1 var _node_sorter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/node-sorter.js');19947 -1 var _find_by__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/find-by.js');19948 -1 function pushFrame(resultSet, dqFrame, options) {19949 -1 resultSet.forEach(function(res) {19950 -1 res.node = _dq_element__WEBPACK_IMPORTED_MODULE_0__['default'].fromFrame(res.node, options, dqFrame);19951 -1 var checks = Object(_get_all_checks__WEBPACK_IMPORTED_MODULE_1__['default'])(res);19952 -1 checks.forEach(function(check) {19953 -1 check.relatedNodes = check.relatedNodes.map(function(node) {19954 -1 return _dq_element__WEBPACK_IMPORTED_MODULE_0__['default'].fromFrame(node, options, dqFrame);-1 38050 anyAllNone(nodeResult, function(c) { -1 38051 delete c.result; -1 38052 delete c.priority; -1 38053 }); -1 38054 nodeResult.result = constants_default.results[nodeResult.priority]; -1 38055 delete nodeResult.priority; -1 38056 return nodeResult; -1 38057 } -1 38058 var aggregate_checks_default = aggregateChecks; -1 38059 function finalizeRuleResult(ruleResult) { -1 38060 var rule3 = axe._audit.rules.find(function(rule4) { -1 38061 return rule4.id === ruleResult.id; -1 38062 }); -1 38063 if (rule3 && rule3.impact) { -1 38064 ruleResult.nodes.forEach(function(node) { -1 38065 [ 'any', 'all', 'none' ].forEach(function(checkType) { -1 38066 (node[checkType] || []).forEach(function(checkResult) { -1 38067 checkResult.impact = rule3.impact; 19955 38068 }); 19956 38069 }); 19957 38070 }); 19958 38071 }19959 -1 function spliceNodes(target, to) {19960 -1 var firstFromFrame = to[0].node;19961 -1 for (var i = 0; i < target.length; i++) {19962 -1 var node = target[i].node;19963 -1 var sorterResult = Object(_node_sorter__WEBPACK_IMPORTED_MODULE_2__['default'])({19964 -1 actualNode: node.element19965 -1 }, {19966 -1 actualNode: firstFromFrame.element-1 38072 Object.assign(ruleResult, aggregate_node_results_default(ruleResult.nodes)); -1 38073 delete ruleResult.nodes; -1 38074 return ruleResult; -1 38075 } -1 38076 var finalize_result_default = finalizeRuleResult; -1 38077 function aggregateNodeResults(nodeResults) { -1 38078 var ruleResult = {}; -1 38079 nodeResults = nodeResults.map(function(nodeResult) { -1 38080 if (nodeResult.any && nodeResult.all && nodeResult.none) { -1 38081 return aggregate_checks_default(nodeResult); -1 38082 } else if (Array.isArray(nodeResult.node)) { -1 38083 return finalize_result_default(nodeResult); -1 38084 } else { -1 38085 throw new TypeError('Invalid Result type'); -1 38086 } -1 38087 }); -1 38088 if (nodeResults && nodeResults.length) { -1 38089 var resultList = nodeResults.map(function(node) { -1 38090 return node.result; -1 38091 }); -1 38092 ruleResult.result = aggregate_default(constants_default.results, resultList, ruleResult.result); -1 38093 } else { -1 38094 ruleResult.result = 'inapplicable'; -1 38095 } -1 38096 constants_default.resultGroups.forEach(function(group) { -1 38097 return ruleResult[group] = []; -1 38098 }); -1 38099 nodeResults.forEach(function(nodeResult) { -1 38100 var groupName = constants_default.resultGroupMap[nodeResult.result]; -1 38101 ruleResult[groupName].push(nodeResult); -1 38102 }); -1 38103 var impactGroup = constants_default.FAIL_GROUP; -1 38104 if (ruleResult[impactGroup].length === 0) { -1 38105 impactGroup = constants_default.CANTTELL_GROUP; -1 38106 } -1 38107 if (ruleResult[impactGroup].length > 0) { -1 38108 var impactList = ruleResult[impactGroup].map(function(failure) { -1 38109 return failure.impact; -1 38110 }); -1 38111 ruleResult.impact = aggregate_default(constants_default.impact, impactList) || null; -1 38112 } else { -1 38113 ruleResult.impact = null; -1 38114 } -1 38115 return ruleResult; -1 38116 } -1 38117 var aggregate_node_results_default = aggregateNodeResults; -1 38118 function copyToGroup(resultObject, subResult, group) { -1 38119 var resultCopy = Object.assign({}, subResult); -1 38120 resultCopy.nodes = (resultCopy[group] || []).concat(); -1 38121 constants_default.resultGroups.forEach(function(group2) { -1 38122 delete resultCopy[group2]; -1 38123 }); -1 38124 resultObject[group].push(resultCopy); -1 38125 } -1 38126 function aggregateResult(results) { -1 38127 var resultObject = {}; -1 38128 constants_default.resultGroups.forEach(function(groupName) { -1 38129 return resultObject[groupName] = []; -1 38130 }); -1 38131 results.forEach(function(subResult) { -1 38132 if (subResult.error) { -1 38133 copyToGroup(resultObject, subResult, constants_default.CANTTELL_GROUP); -1 38134 } else if (subResult.result === constants_default.NA) { -1 38135 copyToGroup(resultObject, subResult, constants_default.NA_GROUP); -1 38136 } else { -1 38137 constants_default.resultGroups.forEach(function(group) { -1 38138 if (Array.isArray(subResult[group]) && subResult[group].length > 0) { -1 38139 copyToGroup(resultObject, subResult, group); -1 38140 } 19967 38141 });19968 -1 if (sorterResult > 0 || sorterResult === 0 && firstFromFrame.selector.length < node.selector.length) {19969 -1 target.splice.apply(target, [ i, 0 ].concat(to));19970 -1 return;19971 -1 }19972 38142 }19973 -1 target.push.apply(target, to);-1 38143 }); -1 38144 return resultObject; -1 38145 } -1 38146 var aggregate_result_default = aggregateResult; -1 38147 function areStylesSet(el, styles, stopAt) { -1 38148 var styl = window.getComputedStyle(el, null); -1 38149 if (!styl) { -1 38150 return false; -1 38151 } -1 38152 for (var i = 0; i < styles.length; ++i) { -1 38153 var att = styles[i]; -1 38154 if (styl.getPropertyValue(att.property) === att.value) { -1 38155 return true; -1 38156 } 19974 38157 }19975 -1 function normalizeResult(result) {19976 -1 if (!result || !result.results) {19977 -1 return null;-1 38158 if (!el.parentNode || el.nodeName.toUpperCase() === stopAt.toUpperCase()) { -1 38159 return false; -1 38160 } -1 38161 return areStylesSet(el.parentNode, styles, stopAt); -1 38162 } -1 38163 var are_styles_set_default = areStylesSet; -1 38164 function toArray(thing) { -1 38165 return Array.prototype.slice.call(thing); -1 38166 } -1 38167 var to_array_default = toArray; -1 38168 function escapeSelector(value) { -1 38169 var string = String(value); -1 38170 var length = string.length; -1 38171 var index = -1; -1 38172 var codeUnit; -1 38173 var result = ''; -1 38174 var firstCodeUnit = string.charCodeAt(0); -1 38175 while (++index < length) { -1 38176 codeUnit = string.charCodeAt(index); -1 38177 if (codeUnit == 0) { -1 38178 result += '\ufffd'; -1 38179 continue; 19978 38180 }19979 -1 if (!Array.isArray(result.results)) {19980 -1 return [ result.results ];-1 38181 if (codeUnit >= 1 && codeUnit <= 31 || codeUnit == 127 || index == 0 && codeUnit >= 48 && codeUnit <= 57 || index == 1 && codeUnit >= 48 && codeUnit <= 57 && firstCodeUnit == 45) { -1 38182 result += '\\' + codeUnit.toString(16) + ' '; -1 38183 continue; 19981 38184 }19982 -1 if (!result.results.length) {19983 -1 return null;-1 38185 if (index == 0 && length == 1 && codeUnit == 45) { -1 38186 result += '\\' + string.charAt(index); -1 38187 continue; -1 38188 } -1 38189 if (codeUnit >= 128 || codeUnit == 45 || codeUnit == 95 || codeUnit >= 48 && codeUnit <= 57 || codeUnit >= 65 && codeUnit <= 90 || codeUnit >= 97 && codeUnit <= 122) { -1 38190 result += string.charAt(index); -1 38191 continue; 19984 38192 }19985 -1 return result.results;-1 38193 result += '\\' + string.charAt(index); 19986 38194 }19987 -1 function mergeResults(frameResults, options) {19988 -1 var mergedResult = [];19989 -1 frameResults.forEach(function(frameResult) {19990 -1 var results = normalizeResult(frameResult);19991 -1 if (!results || !results.length) {19992 -1 return;19993 -1 }19994 -1 var dqFrame;19995 -1 if (frameResult.frameElement) {19996 -1 var spec = {19997 -1 selector: [ frameResult.frame ]19998 -1 };19999 -1 dqFrame = new _dq_element__WEBPACK_IMPORTED_MODULE_0__['default'](frameResult.frameElement, options, spec);20000 -1 }20001 -1 results.forEach(function(ruleResult) {20002 -1 if (ruleResult.nodes && dqFrame) {20003 -1 pushFrame(ruleResult.nodes, dqFrame, options);20004 -1 }20005 -1 var res = Object(_find_by__WEBPACK_IMPORTED_MODULE_3__['default'])(mergedResult, 'id', ruleResult.id);20006 -1 if (!res) {20007 -1 mergedResult.push(ruleResult);20008 -1 } else {20009 -1 if (ruleResult.nodes.length) {20010 -1 spliceNodes(res.nodes, ruleResult.nodes);20011 -1 }20012 -1 }20013 -1 });20014 -1 });20015 -1 return mergedResult;-1 38195 return result; -1 38196 } -1 38197 var escape_selector_default = escapeSelector; -1 38198 function isMostlyNumbers() { -1 38199 var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; -1 38200 return str.length !== 0 && (str.match(/[0-9]/g) || '').length >= str.length / 2; -1 38201 } -1 38202 function splitString(str, splitIndex) { -1 38203 return [ str.substring(0, splitIndex), str.substring(splitIndex) ]; -1 38204 } -1 38205 function trimRight(str) { -1 38206 return str.replace(/\s+$/, ''); -1 38207 } -1 38208 function uriParser(url) { -1 38209 var original = url; -1 38210 var protocol = '', domain = '', port = '', path = '', query = '', hash = ''; -1 38211 if (url.includes('#')) { -1 38212 var _splitString = splitString(url, url.indexOf('#')); -1 38213 var _splitString2 = _slicedToArray(_splitString, 2); -1 38214 url = _splitString2[0]; -1 38215 hash = _splitString2[1]; -1 38216 } -1 38217 if (url.includes('?')) { -1 38218 var _splitString3 = splitString(url, url.indexOf('?')); -1 38219 var _splitString4 = _slicedToArray(_splitString3, 2); -1 38220 url = _splitString4[0]; -1 38221 query = _splitString4[1]; -1 38222 } -1 38223 if (url.includes('://')) { -1 38224 var _url$split = url.split('://'); -1 38225 var _url$split2 = _slicedToArray(_url$split, 2); -1 38226 protocol = _url$split2[0]; -1 38227 url = _url$split2[1]; -1 38228 var _splitString5 = splitString(url, url.indexOf('/')); -1 38229 var _splitString6 = _slicedToArray(_splitString5, 2); -1 38230 domain = _splitString6[0]; -1 38231 url = _splitString6[1]; -1 38232 } else if (url.substr(0, 2) === '//') { -1 38233 url = url.substr(2); -1 38234 var _splitString7 = splitString(url, url.indexOf('/')); -1 38235 var _splitString8 = _slicedToArray(_splitString7, 2); -1 38236 domain = _splitString8[0]; -1 38237 url = _splitString8[1]; -1 38238 } -1 38239 if (domain.substr(0, 4) === 'www.') { -1 38240 domain = domain.substr(4); -1 38241 } -1 38242 if (domain && domain.includes(':')) { -1 38243 var _splitString9 = splitString(domain, domain.indexOf(':')); -1 38244 var _splitString10 = _slicedToArray(_splitString9, 2); -1 38245 domain = _splitString10[0]; -1 38246 port = _splitString10[1]; -1 38247 } -1 38248 path = url; -1 38249 return { -1 38250 original: original, -1 38251 protocol: protocol, -1 38252 domain: domain, -1 38253 port: port, -1 38254 path: path, -1 38255 query: query, -1 38256 hash: hash -1 38257 }; -1 38258 } -1 38259 function getFriendlyUriEnd() { -1 38260 var uri = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; -1 38261 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 38262 if (uri.length <= 1 || uri.substr(0, 5) === 'data:' || uri.substr(0, 11) === 'javascript:' || uri.includes('?')) { -1 38263 return; -1 38264 } -1 38265 var currentDomain = options.currentDomain, _options$maxLength = options.maxLength, maxLength = _options$maxLength === void 0 ? 25 : _options$maxLength; -1 38266 var _uriParser = uriParser(uri), path = _uriParser.path, domain = _uriParser.domain, hash = _uriParser.hash; -1 38267 var pathEnd = path.substr(path.substr(0, path.length - 2).lastIndexOf('/') + 1); -1 38268 if (hash) { -1 38269 if (pathEnd && (pathEnd + hash).length <= maxLength) { -1 38270 return trimRight(pathEnd + hash); -1 38271 } else if (pathEnd.length < 2 && hash.length > 2 && hash.length <= maxLength) { -1 38272 return trimRight(hash); -1 38273 } else { -1 38274 return; -1 38275 } -1 38276 } else if (domain && domain.length < maxLength && path.length <= 1) { -1 38277 return trimRight(domain + path); -1 38278 } -1 38279 if (path === '/' + pathEnd && domain && currentDomain && domain !== currentDomain && (domain + path).length <= maxLength) { -1 38280 return trimRight(domain + path); -1 38281 } -1 38282 var lastDotIndex = pathEnd.lastIndexOf('.'); -1 38283 if ((lastDotIndex === -1 || lastDotIndex > 1) && (lastDotIndex !== -1 || pathEnd.length > 2) && pathEnd.length <= maxLength && !pathEnd.match(/index(\.[a-zA-Z]{2-4})?/) && !isMostlyNumbers(pathEnd)) { -1 38284 return trimRight(pathEnd); -1 38285 } -1 38286 } -1 38287 var get_friendly_uri_end_default = getFriendlyUriEnd; -1 38288 function getNodeAttributes(node) { -1 38289 if (node.attributes instanceof window.NamedNodeMap) { -1 38290 return node.attributes; -1 38291 } -1 38292 return node.cloneNode(false).attributes; -1 38293 } -1 38294 var get_node_attributes_default = getNodeAttributes; -1 38295 var matchesSelector = function() { -1 38296 var method; -1 38297 function getMethod(node) { -1 38298 var index, candidate, candidates = [ 'matches', 'matchesSelector', 'mozMatchesSelector', 'webkitMatchesSelector', 'msMatchesSelector' ], length = candidates.length; -1 38299 for (index = 0; index < length; index++) { -1 38300 candidate = candidates[index]; -1 38301 if (node[candidate]) { -1 38302 return candidate; -1 38303 } -1 38304 } 20016 38305 }20017 -1 __webpack_exports__['default'] = mergeResults;20018 -1 },20019 -1 './lib/core/utils/node-sorter.js': function libCoreUtilsNodeSorterJs(module, __webpack_exports__, __webpack_require__) {20020 -1 'use strict';20021 -1 __webpack_require__.r(__webpack_exports__);20022 -1 function nodeSorter(nodeA, nodeB) {20023 -1 nodeA = nodeA.actualNode || nodeA;20024 -1 nodeB = nodeB.actualNode || nodeB;20025 -1 if (nodeA === nodeB) {20026 -1 return 0;-1 38306 return function(node, selector) { -1 38307 if (!method || !node[method]) { -1 38308 method = getMethod(node); 20027 38309 }20028 -1 if (nodeA.compareDocumentPosition(nodeB) & 4) {20029 -1 return -1;20030 -1 } else {20031 -1 return 1;-1 38310 if (node[method]) { -1 38311 return node[method](selector); 20032 38312 } -1 38313 return false; -1 38314 }; -1 38315 }(); -1 38316 var element_matches_default = matchesSelector; -1 38317 function isXHTML(doc) { -1 38318 if (!doc.createElement) { -1 38319 return false; 20033 38320 }20034 -1 __webpack_exports__['default'] = nodeSorter;20035 -1 },20036 -1 './lib/core/utils/parse-crossorigin-stylesheet.js': function libCoreUtilsParseCrossoriginStylesheetJs(module, __webpack_exports__, __webpack_require__) {20037 -1 'use strict';20038 -1 __webpack_require__.r(__webpack_exports__);20039 -1 var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./node_modules/axios/index.js');20040 -1 var axios__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);20041 -1 var _parse_stylesheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/parse-stylesheet.js');20042 -1 var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/constants.js');20043 -1 function parseCrossOriginStylesheet(url, options, priority, importedUrls, isCrossOrigin) {20044 -1 var axiosOptions = {20045 -1 method: 'get',20046 -1 timeout: _constants__WEBPACK_IMPORTED_MODULE_2__['default'].preload.timeout,20047 -1 url: url20048 -1 };20049 -1 importedUrls.push(url);20050 -1 return axios__WEBPACK_IMPORTED_MODULE_0___default()(axiosOptions).then(function(_ref56) {20051 -1 var data = _ref56.data;20052 -1 var result = options.convertDataToStylesheet({20053 -1 data: data,20054 -1 isCrossOrigin: isCrossOrigin,20055 -1 priority: priority,20056 -1 root: options.rootNode,20057 -1 shadowId: options.shadowId20058 -1 });20059 -1 return Object(_parse_stylesheet__WEBPACK_IMPORTED_MODULE_1__['default'])(result.sheet, options, priority, importedUrls, result.isCrossOrigin);20060 -1 });-1 38321 return doc.createElement('A').localName === 'A'; -1 38322 } -1 38323 var is_xhtml_default = isXHTML; -1 38324 function getShadowSelector(generateSelector2, elm) { -1 38325 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; -1 38326 if (!elm) { -1 38327 return ''; 20061 38328 }20062 -1 __webpack_exports__['default'] = parseCrossOriginStylesheet;20063 -1 },20064 -1 './lib/core/utils/parse-sameorigin-stylesheet.js': function libCoreUtilsParseSameoriginStylesheetJs(module, __webpack_exports__, __webpack_require__) {20065 -1 'use strict';20066 -1 __webpack_require__.r(__webpack_exports__);20067 -1 var _parse_crossorigin_stylesheet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/parse-crossorigin-stylesheet.js');20068 -1 function parseSameOriginStylesheet(sheet, options, priority, importedUrls) {20069 -1 var isCrossOrigin = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;20070 -1 var rules = Array.from(sheet.cssRules);20071 -1 if (!rules) {20072 -1 return Promise.resolve();20073 -1 }20074 -1 var cssImportRules = rules.filter(function(r) {20075 -1 return r.type === 3;20076 -1 });20077 -1 if (!cssImportRules.length) {20078 -1 return Promise.resolve({20079 -1 isCrossOrigin: isCrossOrigin,20080 -1 priority: priority,20081 -1 root: options.rootNode,20082 -1 shadowId: options.shadowId,20083 -1 sheet: sheet20084 -1 });-1 38329 var doc = elm.getRootNode && elm.getRootNode() || document; -1 38330 if (doc.nodeType !== 11) { -1 38331 return generateSelector2(elm, options, doc); -1 38332 } -1 38333 var stack = []; -1 38334 while (doc.nodeType === 11) { -1 38335 if (!doc.host) { -1 38336 return ''; 20085 38337 }20086 -1 var cssImportUrlsNotAlreadyImported = cssImportRules.filter(function(rule) {20087 -1 return rule.href;20088 -1 }).map(function(rule) {20089 -1 return rule.href;20090 -1 }).filter(function(url) {20091 -1 return !importedUrls.includes(url);20092 -1 });20093 -1 var promises = cssImportUrlsNotAlreadyImported.map(function(importUrl, cssRuleIndex) {20094 -1 var newPriority = [].concat(_toConsumableArray(priority), [ cssRuleIndex ]);20095 -1 var isCrossOriginRequest = /^https?:\/\/|^\/\//i.test(importUrl);20096 -1 return Object(_parse_crossorigin_stylesheet__WEBPACK_IMPORTED_MODULE_0__['default'])(importUrl, options, newPriority, importedUrls, isCrossOriginRequest);20097 -1 });20098 -1 var nonImportCSSRules = rules.filter(function(r) {20099 -1 return r.type !== 3;-1 38338 stack.unshift({ -1 38339 elm: elm, -1 38340 doc: doc 20100 38341 });20101 -1 if (!nonImportCSSRules.length) {20102 -1 return Promise.all(promises);20103 -1 }20104 -1 promises.push(Promise.resolve(options.convertDataToStylesheet({20105 -1 data: nonImportCSSRules.map(function(rule) {20106 -1 return rule.cssText;20107 -1 }).join(),20108 -1 isCrossOrigin: isCrossOrigin,20109 -1 priority: priority,20110 -1 root: options.rootNode,20111 -1 shadowId: options.shadowId20112 -1 })));20113 -1 return Promise.all(promises);-1 38342 elm = doc.host; -1 38343 doc = elm.getRootNode(); 20114 38344 }20115 -1 __webpack_exports__['default'] = parseSameOriginStylesheet;20116 -1 },20117 -1 './lib/core/utils/parse-stylesheet.js': function libCoreUtilsParseStylesheetJs(module, __webpack_exports__, __webpack_require__) {20118 -1 'use strict';20119 -1 __webpack_require__.r(__webpack_exports__);20120 -1 var _parse_sameorigin_stylesheet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/parse-sameorigin-stylesheet.js');20121 -1 var _parse_crossorigin_stylesheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/parse-crossorigin-stylesheet.js');20122 -1 function parseStylesheet(sheet, options, priority, importedUrls) {20123 -1 var isCrossOrigin = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;20124 -1 var isSameOrigin = isSameOriginStylesheet(sheet);20125 -1 if (isSameOrigin) {20126 -1 return Object(_parse_sameorigin_stylesheet__WEBPACK_IMPORTED_MODULE_0__['default'])(sheet, options, priority, importedUrls, isCrossOrigin);20127 -1 }20128 -1 return Object(_parse_crossorigin_stylesheet__WEBPACK_IMPORTED_MODULE_1__['default'])(sheet.href, options, priority, importedUrls, true);20129 -1 }20130 -1 function isSameOriginStylesheet(sheet) {20131 -1 try {20132 -1 var rules = sheet.cssRules;20133 -1 if (!rules && sheet.href) {20134 -1 return false;-1 38345 stack.unshift({ -1 38346 elm: elm, -1 38347 doc: doc -1 38348 }); -1 38349 return stack.map(function(_ref4) { -1 38350 var elm2 = _ref4.elm, doc2 = _ref4.doc; -1 38351 return generateSelector2(elm2, options, doc2); -1 38352 }); -1 38353 } -1 38354 var get_shadow_selector_default = getShadowSelector; -1 38355 var xhtml; -1 38356 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' ]; -1 38357 var MAXATTRIBUTELENGTH = 31; -1 38358 function getAttributeNameValue(node, at) { -1 38359 var name = at.name; -1 38360 var atnv; -1 38361 if (name.indexOf('href') !== -1 || name.indexOf('src') !== -1) { -1 38362 var friendly = get_friendly_uri_end_default(node.getAttribute(name)); -1 38363 if (friendly) { -1 38364 var value = encodeURI(friendly); -1 38365 if (value) { -1 38366 atnv = escape_selector_default(at.name) + '$="' + escape_selector_default(value) + '"'; -1 38367 } else { -1 38368 return; 20135 38369 }20136 -1 return true;20137 -1 } catch (e) {20138 -1 return false;-1 38370 } else { -1 38371 atnv = escape_selector_default(at.name) + '="' + escape_selector_default(node.getAttribute(name)) + '"'; 20139 38372 } -1 38373 } else { -1 38374 atnv = escape_selector_default(name) + '="' + escape_selector_default(at.value) + '"'; 20140 38375 }20141 -1 __webpack_exports__['default'] = parseStylesheet;20142 -1 },20143 -1 './lib/core/utils/performance-timer.js': function libCoreUtilsPerformanceTimerJs(module, __webpack_exports__, __webpack_require__) {20144 -1 'use strict';20145 -1 __webpack_require__.r(__webpack_exports__);20146 -1 var _log__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/log.js');20147 -1 var performanceTimer = function() {20148 -1 'use strict';20149 -1 function now() {20150 -1 if (window.performance && window.performance) {20151 -1 return window.performance.now();-1 38376 return atnv; -1 38377 } -1 38378 function countSort(a, b) { -1 38379 return a.count < b.count ? -1 : a.count === b.count ? 0 : 1; -1 38380 } -1 38381 function filterAttributes(at) { -1 38382 return !ignoredAttributes.includes(at.name) && at.name.indexOf(':') === -1 && (!at.value || at.value.length < MAXATTRIBUTELENGTH); -1 38383 } -1 38384 function _getSelectorData(domTree) { -1 38385 var data2 = { -1 38386 classes: {}, -1 38387 tags: {}, -1 38388 attributes: {} -1 38389 }; -1 38390 domTree = Array.isArray(domTree) ? domTree : [ domTree ]; -1 38391 var currentLevel = domTree.slice(); -1 38392 var stack = []; -1 38393 var _loop2 = function _loop2() { -1 38394 var current = currentLevel.pop(); -1 38395 var node = current.actualNode; -1 38396 if (!!node.querySelectorAll) { -1 38397 var tag = node.nodeName; -1 38398 if (data2.tags[tag]) { -1 38399 data2.tags[tag]++; -1 38400 } else { -1 38401 data2.tags[tag] = 1; 20152 38402 }20153 -1 }20154 -1 var originalTime = null;20155 -1 var lastRecordedTime = now();20156 -1 return {20157 -1 start: function start() {20158 -1 this.mark('mark_axe_start');20159 -1 },20160 -1 end: function end() {20161 -1 this.mark('mark_axe_end');20162 -1 this.measure('axe', 'mark_axe_start', 'mark_axe_end');20163 -1 this.logMeasures('axe');20164 -1 },20165 -1 auditStart: function auditStart() {20166 -1 this.mark('mark_audit_start');20167 -1 },20168 -1 auditEnd: function auditEnd() {20169 -1 this.mark('mark_audit_end');20170 -1 this.measure('audit_start_to_end', 'mark_audit_start', 'mark_audit_end');20171 -1 this.logMeasures();20172 -1 },20173 -1 mark: function mark(markName) {20174 -1 if (window.performance && window.performance.mark !== undefined) {20175 -1 window.performance.mark(markName);20176 -1 }20177 -1 },20178 -1 measure: function measure(measureName, startMark, endMark) {20179 -1 if (window.performance && window.performance.measure !== undefined) {20180 -1 window.performance.measure(measureName, startMark, endMark);20181 -1 }20182 -1 },20183 -1 logMeasures: function logMeasures(measureName) {20184 -1 function logMeasure(req) {20185 -1 Object(_log__WEBPACK_IMPORTED_MODULE_0__['default'])('Measure ' + req.name + ' took ' + req.duration + 'ms');20186 -1 }20187 -1 if (window.performance && window.performance.getEntriesByType !== undefined) {20188 -1 var axeStart = window.performance.getEntriesByName('mark_axe_start')[0];20189 -1 var measures = window.performance.getEntriesByType('measure').filter(function(measure) {20190 -1 return measure.startTime >= axeStart.startTime;20191 -1 });20192 -1 for (var i = 0; i < measures.length; ++i) {20193 -1 var req = measures[i];20194 -1 if (req.name === measureName) {20195 -1 logMeasure(req);20196 -1 return;20197 -1 }20198 -1 logMeasure(req);-1 38403 if (node.classList) { -1 38404 Array.from(node.classList).forEach(function(cl) { -1 38405 var ind = escape_selector_default(cl); -1 38406 if (data2.classes[ind]) { -1 38407 data2.classes[ind]++; -1 38408 } else { -1 38409 data2.classes[ind] = 1; 20199 38410 }20200 -1 }20201 -1 },20202 -1 timeElapsed: function timeElapsed() {20203 -1 return now() - lastRecordedTime;20204 -1 },20205 -1 reset: function reset() {20206 -1 if (!originalTime) {20207 -1 originalTime = now();20208 -1 }20209 -1 lastRecordedTime = now();-1 38411 }); 20210 38412 }20211 -1 };20212 -1 }();20213 -1 __webpack_exports__['default'] = performanceTimer;20214 -1 },20215 -1 './lib/core/utils/pollyfills.js': function libCoreUtilsPollyfillsJs(module, __webpack_exports__, __webpack_require__) {20216 -1 'use strict';20217 -1 __webpack_require__.r(__webpack_exports__);20218 -1 __webpack_require__.d(__webpack_exports__, 'pollyfillElementsFromPoint', function() {20219 -1 return pollyfillElementsFromPoint;20220 -1 });20221 -1 if (typeof Object.assign !== 'function') {20222 -1 (function() {20223 -1 Object.assign = function(target) {20224 -1 if (target === undefined || target === null) {20225 -1 throw new TypeError('Cannot convert undefined or null to object');20226 -1 }20227 -1 var output = Object(target);20228 -1 for (var index = 1; index < arguments.length; index++) {20229 -1 var source = arguments[index];20230 -1 if (source !== undefined && source !== null) {20231 -1 for (var nextKey in source) {20232 -1 if (source.hasOwnProperty(nextKey)) {20233 -1 output[nextKey] = source[nextKey];20234 -1 }-1 38413 if (node.hasAttributes()) { -1 38414 Array.from(get_node_attributes_default(node)).filter(filterAttributes).forEach(function(at) { -1 38415 var atnv = getAttributeNameValue(node, at); -1 38416 if (atnv) { -1 38417 if (data2.attributes[atnv]) { -1 38418 data2.attributes[atnv]++; -1 38419 } else { -1 38420 data2.attributes[atnv] = 1; 20235 38421 } 20236 38422 }20237 -1 }20238 -1 return output;20239 -1 };20240 -1 })();20241 -1 }20242 -1 if (!Array.prototype.find) {20243 -1 Object.defineProperty(Array.prototype, 'find', {20244 -1 value: function value(predicate) {20245 -1 if (this === null) {20246 -1 throw new TypeError('Array.prototype.find called on null or undefined');20247 -1 }20248 -1 if (typeof predicate !== 'function') {20249 -1 throw new TypeError('predicate must be a function');20250 -1 }20251 -1 var list = Object(this);20252 -1 var length = list.length >>> 0;20253 -1 var thisArg = arguments[1];20254 -1 var value;20255 -1 for (var i = 0; i < length; i++) {20256 -1 value = list[i];20257 -1 if (predicate.call(thisArg, value, i, list)) {20258 -1 return value;20259 -1 }20260 -1 }20261 -1 return undefined;-1 38423 }); 20262 38424 }20263 -1 });20264 -1 }20265 -1 function pollyfillElementsFromPoint() {20266 -1 if (document.elementsFromPoint) {20267 -1 return document.elementsFromPoint;20268 38425 }20269 -1 if (document.msElementsFromPoint) {20270 -1 return document.msElementsFromPoint;-1 38426 if (current.children.length) { -1 38427 stack.push(currentLevel); -1 38428 currentLevel = current.children.slice(); 20271 38429 }20272 -1 var usePointer = function() {20273 -1 var element = document.createElement('x');20274 -1 element.style.cssText = 'pointer-events:auto';20275 -1 return element.style.pointerEvents === 'auto';20276 -1 }();20277 -1 var cssProp = usePointer ? 'pointer-events' : 'visibility';20278 -1 var cssDisableVal = usePointer ? 'none' : 'hidden';20279 -1 var style = document.createElement('style');20280 -1 style.innerHTML = usePointer ? '* { pointer-events: all }' : '* { visibility: visible }';20281 -1 return function(x, y) {20282 -1 var current, i, d;20283 -1 var elements = [];20284 -1 var previousPointerEvents = [];20285 -1 document.head.appendChild(style);20286 -1 while ((current = document.elementFromPoint(x, y)) && elements.indexOf(current) === -1) {20287 -1 elements.push(current);20288 -1 previousPointerEvents.push({20289 -1 value: current.style.getPropertyValue(cssProp),20290 -1 priority: current.style.getPropertyPriority(cssProp)20291 -1 });20292 -1 current.style.setProperty(cssProp, cssDisableVal, 'important');20293 -1 }20294 -1 if (elements.indexOf(document.documentElement) < elements.length - 1) {20295 -1 elements.splice(elements.indexOf(document.documentElement), 1);20296 -1 elements.push(document.documentElement);20297 -1 }20298 -1 for (i = previousPointerEvents.length; !!(d = previousPointerEvents[--i]); ) {20299 -1 elements[i].style.setProperty(cssProp, d.value ? d.value : '', d.priority);20300 -1 }20301 -1 document.head.removeChild(style);20302 -1 return elements;20303 -1 };20304 -1 }20305 -1 if (typeof window.addEventListener === 'function') {20306 -1 document.elementsFromPoint = pollyfillElementsFromPoint();-1 38430 while (!currentLevel.length && stack.length) { -1 38431 currentLevel = stack.pop(); -1 38432 } -1 38433 }; -1 38434 while (currentLevel.length) { -1 38435 _loop2(); 20307 38436 }20308 -1 if (!Array.prototype.includes) {20309 -1 Object.defineProperty(Array.prototype, 'includes', {20310 -1 value: function value(searchElement) {20311 -1 var O = Object(this);20312 -1 var len = parseInt(O.length, 10) || 0;20313 -1 if (len === 0) {20314 -1 return false;20315 -1 }20316 -1 var n = parseInt(arguments[1], 10) || 0;20317 -1 var k;20318 -1 if (n >= 0) {20319 -1 k = n;20320 -1 } else {20321 -1 k = len + n;20322 -1 if (k < 0) {20323 -1 k = 0;20324 -1 }20325 -1 }20326 -1 var currentElement;20327 -1 while (k < len) {20328 -1 currentElement = O[k];20329 -1 if (searchElement === currentElement || searchElement !== searchElement && currentElement !== currentElement) {20330 -1 return true;20331 -1 }20332 -1 k++;20333 -1 }20334 -1 return false;-1 38437 return data2; -1 38438 } -1 38439 function uncommonClasses(node, selectorData) { -1 38440 var retVal = []; -1 38441 var classData = selectorData.classes; -1 38442 var tagData = selectorData.tags; -1 38443 if (node.classList) { -1 38444 Array.from(node.classList).forEach(function(cl) { -1 38445 var ind = escape_selector_default(cl); -1 38446 if (classData[ind] < tagData[node.nodeName]) { -1 38447 retVal.push({ -1 38448 name: ind, -1 38449 count: classData[ind], -1 38450 species: 'class' -1 38451 }); 20335 38452 } 20336 38453 }); 20337 38454 }20338 -1 if (!Array.prototype.some) {20339 -1 Object.defineProperty(Array.prototype, 'some', {20340 -1 value: function value(fun) {20341 -1 if (this == null) {20342 -1 throw new TypeError('Array.prototype.some called on null or undefined');20343 -1 }20344 -1 if (typeof fun !== 'function') {20345 -1 throw new TypeError();20346 -1 }20347 -1 var t = Object(this);20348 -1 var len = t.length >>> 0;20349 -1 var thisArg = arguments.length >= 2 ? arguments[1] : void 0;20350 -1 for (var i = 0; i < len; i++) {20351 -1 if (i in t && fun.call(thisArg, t[i], i, t)) {20352 -1 return true;20353 -1 }20354 -1 }20355 -1 return false;20356 -1 }20357 -1 });-1 38455 return retVal.sort(countSort); -1 38456 } -1 38457 function getNthChildString(elm, selector) { -1 38458 var siblings = elm.parentNode && Array.from(elm.parentNode.children || '') || []; -1 38459 var hasMatchingSiblings = siblings.find(function(sibling) { -1 38460 return sibling !== elm && element_matches_default(sibling, selector); -1 38461 }); -1 38462 if (hasMatchingSiblings) { -1 38463 var nthChild = 1 + siblings.indexOf(elm); -1 38464 return ':nth-child(' + nthChild + ')'; -1 38465 } else { -1 38466 return ''; 20358 38467 }20359 -1 if (!Array.from) {20360 -1 Object.defineProperty(Array, 'from', {20361 -1 value: function() {20362 -1 var toStr = Object.prototype.toString;20363 -1 var isCallable = function isCallable(fn) {20364 -1 return typeof fn === 'function' || toStr.call(fn) === '[object Function]';20365 -1 };20366 -1 var toInteger = function toInteger(value) {20367 -1 var number = Number(value);20368 -1 if (isNaN(number)) {20369 -1 return 0;20370 -1 }20371 -1 if (number === 0 || !isFinite(number)) {20372 -1 return number;20373 -1 }20374 -1 return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));20375 -1 };20376 -1 var maxSafeInteger = Math.pow(2, 53) - 1;20377 -1 var toLength = function toLength(value) {20378 -1 var len = toInteger(value);20379 -1 return Math.min(Math.max(len, 0), maxSafeInteger);20380 -1 };20381 -1 return function from(arrayLike) {20382 -1 var C = this;20383 -1 var items = Object(arrayLike);20384 -1 if (arrayLike == null) {20385 -1 throw new TypeError('Array.from requires an array-like object - not null or undefined');20386 -1 }20387 -1 var mapFn = arguments.length > 1 ? arguments[1] : void undefined;20388 -1 var T;20389 -1 if (typeof mapFn !== 'undefined') {20390 -1 if (!isCallable(mapFn)) {20391 -1 throw new TypeError('Array.from: when provided, the second argument must be a function');20392 -1 }20393 -1 if (arguments.length > 2) {20394 -1 T = arguments[2];20395 -1 }20396 -1 }20397 -1 var len = toLength(items.length);20398 -1 var A = isCallable(C) ? Object(new C(len)) : new Array(len);20399 -1 var k = 0;20400 -1 var kValue;20401 -1 while (k < len) {20402 -1 kValue = items[k];20403 -1 if (mapFn) {20404 -1 A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);20405 -1 } else {20406 -1 A[k] = kValue;20407 -1 }20408 -1 k += 1;20409 -1 }20410 -1 A.length = len;20411 -1 return A;20412 -1 };20413 -1 }()20414 -1 });-1 38468 } -1 38469 function getElmId(elm) { -1 38470 if (!elm.getAttribute('id')) { -1 38471 return; 20415 38472 }20416 -1 if (!String.prototype.includes) {20417 -1 String.prototype.includes = function(search, start) {20418 -1 if (typeof start !== 'number') {20419 -1 start = 0;20420 -1 }20421 -1 if (start + search.length > this.length) {20422 -1 return false;20423 -1 } else {20424 -1 return this.indexOf(search, start) !== -1;20425 -1 }20426 -1 };-1 38473 var doc = elm.getRootNode && elm.getRootNode() || document; -1 38474 var id = '#' + escape_selector_default(elm.getAttribute('id') || ''); -1 38475 if (!id.match(/player_uid_/) && doc.querySelectorAll(id).length === 1) { -1 38476 return id; 20427 38477 }20428 -1 },20429 -1 './lib/core/utils/preload-cssom.js': function libCoreUtilsPreloadCssomJs(module, __webpack_exports__, __webpack_require__) {20430 -1 'use strict';20431 -1 __webpack_require__.r(__webpack_exports__);20432 -1 var _get_stylesheet_factory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/get-stylesheet-factory.js');20433 -1 var _unique_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/unique-array.js');20434 -1 var _get_root_node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/get-root-node.js');20435 -1 var _parse_stylesheet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/parse-stylesheet.js');20436 -1 var _query_selector_all_filter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/core/utils/query-selector-all-filter.js');20437 -1 function preloadCssom(_ref57) {20438 -1 var _ref57$treeRoot = _ref57.treeRoot, treeRoot = _ref57$treeRoot === void 0 ? axe._tree[0] : _ref57$treeRoot;20439 -1 var rootNodes = getAllRootNodesInTree(treeRoot);20440 -1 if (!rootNodes.length) {20441 -1 return Promise.resolve();20442 -1 }20443 -1 var dynamicDoc = document.implementation.createHTMLDocument('Dynamic document for loading cssom');20444 -1 var convertDataToStylesheet = Object(_get_stylesheet_factory__WEBPACK_IMPORTED_MODULE_0__['default'])(dynamicDoc);20445 -1 return getCssomForAllRootNodes(rootNodes, convertDataToStylesheet).then(function(assets) {20446 -1 return flattenAssets(assets);20447 -1 });-1 38478 } -1 38479 function getBaseSelector(elm) { -1 38480 if (typeof xhtml === 'undefined') { -1 38481 xhtml = is_xhtml_default(document); 20448 38482 }20449 -1 __webpack_exports__['default'] = preloadCssom;20450 -1 function getAllRootNodesInTree(tree) {20451 -1 var ids = [];20452 -1 var rootNodes = Object(_query_selector_all_filter__WEBPACK_IMPORTED_MODULE_4__['default'])(tree, '*', function(node) {20453 -1 if (ids.includes(node.shadowId)) {20454 -1 return false;-1 38483 return escape_selector_default(xhtml ? elm.localName : elm.nodeName.toLowerCase()); -1 38484 } -1 38485 function uncommonAttributes(node, selectorData) { -1 38486 var retVal = []; -1 38487 var attData = selectorData.attributes; -1 38488 var tagData = selectorData.tags; -1 38489 if (node.hasAttributes()) { -1 38490 Array.from(get_node_attributes_default(node)).filter(filterAttributes).forEach(function(at) { -1 38491 var atnv = getAttributeNameValue(node, at); -1 38492 if (atnv && attData[atnv] < tagData[node.nodeName]) { -1 38493 retVal.push({ -1 38494 name: atnv, -1 38495 count: attData[atnv], -1 38496 species: 'attribute' -1 38497 }); 20455 38498 }20456 -1 ids.push(node.shadowId);20457 -1 return true;20458 -1 }).map(function(node) {20459 -1 return {20460 -1 shadowId: node.shadowId,20461 -1 rootNode: Object(_get_root_node__WEBPACK_IMPORTED_MODULE_2__['default'])(node.actualNode)20462 -1 };20463 -1 });20464 -1 return Object(_unique_array__WEBPACK_IMPORTED_MODULE_1__['default'])(rootNodes, []);20465 -1 }20466 -1 function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) {20467 -1 var promises = [];20468 -1 rootNodes.forEach(function(_ref58, index) {20469 -1 var rootNode = _ref58.rootNode, shadowId = _ref58.shadowId;20470 -1 var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet);20471 -1 if (!sheets) {20472 -1 return Promise.all(promises);20473 -1 }20474 -1 var rootIndex = index + 1;20475 -1 var parseOptions = {20476 -1 rootNode: rootNode,20477 -1 shadowId: shadowId,20478 -1 convertDataToStylesheet: convertDataToStylesheet,20479 -1 rootIndex: rootIndex20480 -1 };20481 -1 var importedUrls = [];20482 -1 var p = Promise.all(sheets.map(function(sheet, sheetIndex) {20483 -1 var priority = [ rootIndex, sheetIndex ];20484 -1 return Object(_parse_stylesheet__WEBPACK_IMPORTED_MODULE_3__['default'])(sheet, parseOptions, priority, importedUrls);20485 -1 }));20486 -1 promises.push(p);20487 38499 });20488 -1 return Promise.all(promises);20489 38500 }20490 -1 function flattenAssets(assets) {20491 -1 return assets.reduce(function(acc, val) {20492 -1 return Array.isArray(val) ? acc.concat(flattenAssets(val)) : acc.concat(val);20493 -1 }, []);-1 38501 return retVal.sort(countSort); -1 38502 } -1 38503 function getThreeLeastCommonFeatures(elm, selectorData) { -1 38504 var selector = ''; -1 38505 var features; -1 38506 var clss = uncommonClasses(elm, selectorData); -1 38507 var atts = uncommonAttributes(elm, selectorData); -1 38508 if (clss.length && clss[0].count === 1) { -1 38509 features = [ clss[0] ]; -1 38510 } else if (atts.length && atts[0].count === 1) { -1 38511 features = [ atts[0] ]; -1 38512 selector = getBaseSelector(elm); -1 38513 } else { -1 38514 features = clss.concat(atts); -1 38515 features.sort(countSort); -1 38516 features = features.slice(0, 3); -1 38517 if (!features.some(function(feat) { -1 38518 return feat.species === 'class'; -1 38519 })) { -1 38520 selector = getBaseSelector(elm); -1 38521 } else { -1 38522 features.sort(function(a, b) { -1 38523 return a.species !== b.species && a.species === 'class' ? -1 : a.species === b.species ? 0 : 1; -1 38524 }); -1 38525 } 20494 38526 }20495 -1 function getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet) {20496 -1 var sheets;20497 -1 if (rootNode.nodeType === 11 && shadowId) {20498 -1 sheets = getStylesheetsFromDocumentFragment(rootNode, convertDataToStylesheet);-1 38527 return selector += features.reduce(function(val, feat) { -1 38528 switch (feat.species) { -1 38529 case 'class': -1 38530 return val + '.' + feat.name; -1 38531 -1 38532 case 'attribute': -1 38533 return val + '[' + feat.name + ']'; -1 38534 } -1 38535 return val; -1 38536 }, ''); -1 38537 } -1 38538 function generateSelector(elm, options, doc) { -1 38539 if (!axe._selectorData) { -1 38540 throw new Error('Expect axe._selectorData to be set up'); -1 38541 } -1 38542 var _options$toRoot = options.toRoot, toRoot = _options$toRoot === void 0 ? false : _options$toRoot; -1 38543 var selector; -1 38544 var similar; -1 38545 do { -1 38546 var features = getElmId(elm); -1 38547 if (!features) { -1 38548 features = getThreeLeastCommonFeatures(elm, axe._selectorData); -1 38549 features += getNthChildString(elm, features); -1 38550 } -1 38551 if (selector) { -1 38552 selector = features + ' > ' + selector; 20499 38553 } else {20500 -1 sheets = getStylesheetsFromDocument(rootNode);20501 -1 }20502 -1 return filterStylesheetsWithSameHref(sheets);20503 -1 }20504 -1 function getStylesheetsFromDocumentFragment(rootNode, convertDataToStylesheet) {20505 -1 return Array.from(rootNode.children).filter(filerStyleAndLinkAttributesInDocumentFragment).reduce(function(out, node) {20506 -1 var nodeName = node.nodeName.toUpperCase();20507 -1 var data = nodeName === 'STYLE' ? node.textContent : node;20508 -1 var isLink = nodeName === 'LINK';20509 -1 var stylesheet = convertDataToStylesheet({20510 -1 data: data,20511 -1 isLink: isLink,20512 -1 root: rootNode-1 38554 selector = features; -1 38555 } -1 38556 if (!similar) { -1 38557 similar = Array.from(doc.querySelectorAll(selector)); -1 38558 } else { -1 38559 similar = similar.filter(function(item) { -1 38560 return element_matches_default(item, selector); 20513 38561 });20514 -1 out.push(stylesheet.sheet);20515 -1 return out;20516 -1 }, []);-1 38562 } -1 38563 elm = elm.parentElement; -1 38564 } while ((similar.length > 1 || toRoot) && elm && elm.nodeType !== 11); -1 38565 if (similar.length === 1) { -1 38566 return selector; -1 38567 } else if (selector.indexOf(' > ') !== -1) { -1 38568 return ':root' + selector.substring(selector.indexOf(' > ')); 20517 38569 }20518 -1 function getStylesheetsFromDocument(rootNode) {20519 -1 return Array.from(rootNode.styleSheets).filter(function(sheet) {20520 -1 return filterMediaIsPrint(sheet.media.mediaText);20521 -1 });-1 38570 return ':root'; -1 38571 } -1 38572 function _getSelector(elm, options) { -1 38573 return get_shadow_selector_default(generateSelector, elm, options); -1 38574 } -1 38575 function generateAncestry(node) { -1 38576 var nodeName2 = node.nodeName.toLowerCase(); -1 38577 var parent = node.parentElement; -1 38578 if (!parent) { -1 38579 return nodeName2; -1 38580 } -1 38581 var nthChild = ''; -1 38582 if (nodeName2 !== 'head' && nodeName2 !== 'body' && parent.children.length > 1) { -1 38583 var index = Array.prototype.indexOf.call(parent.children, node) + 1; -1 38584 nthChild = ':nth-child('.concat(index, ')'); -1 38585 } -1 38586 return generateAncestry(parent) + ' > ' + nodeName2 + nthChild; -1 38587 } -1 38588 function _getAncestry(elm, options) { -1 38589 return get_shadow_selector_default(generateAncestry, elm, options); -1 38590 } -1 38591 function getXPathArray(node, path) { -1 38592 var sibling, count; -1 38593 if (!node) { -1 38594 return []; 20522 38595 }20523 -1 function filerStyleAndLinkAttributesInDocumentFragment(node) {20524 -1 var nodeName = node.nodeName.toUpperCase();20525 -1 var linkHref = node.getAttribute('href');20526 -1 var linkRel = node.getAttribute('rel');20527 -1 var isLink = nodeName === 'LINK' && linkHref && linkRel && node.rel.toUpperCase().includes('STYLESHEET');20528 -1 var isStyle = nodeName === 'STYLE';20529 -1 return isStyle || isLink && filterMediaIsPrint(node.media);-1 38596 if (!path && node.nodeType === 9) { -1 38597 path = [ { -1 38598 str: 'html' -1 38599 } ]; -1 38600 return path; 20530 38601 }20531 -1 function filterMediaIsPrint(media) {20532 -1 if (!media) {20533 -1 return true;20534 -1 }20535 -1 return !media.toUpperCase().includes('PRINT');-1 38602 path = path || []; -1 38603 if (node.parentNode && node.parentNode !== node) { -1 38604 path = getXPathArray(node.parentNode, path); 20536 38605 }20537 -1 function filterStylesheetsWithSameHref(sheets) {20538 -1 var hrefs = [];20539 -1 return sheets.filter(function(sheet) {20540 -1 if (!sheet.href) {20541 -1 return true;-1 38606 if (node.previousSibling) { -1 38607 count = 1; -1 38608 sibling = node.previousSibling; -1 38609 do { -1 38610 if (sibling.nodeType === 1 && sibling.nodeName === node.nodeName) { -1 38611 count++; 20542 38612 }20543 -1 if (hrefs.includes(sheet.href)) {20544 -1 return false;-1 38613 sibling = sibling.previousSibling; -1 38614 } while (sibling); -1 38615 if (count === 1) { -1 38616 count = null; -1 38617 } -1 38618 } else if (node.nextSibling) { -1 38619 sibling = node.nextSibling; -1 38620 do { -1 38621 if (sibling.nodeType === 1 && sibling.nodeName === node.nodeName) { -1 38622 count = 1; -1 38623 sibling = null; -1 38624 } else { -1 38625 count = null; -1 38626 sibling = sibling.previousSibling; 20545 38627 }20546 -1 hrefs.push(sheet.href);20547 -1 return true;20548 -1 });-1 38628 } while (sibling); 20549 38629 }20550 -1 },20551 -1 './lib/core/utils/preload-media.js': function libCoreUtilsPreloadMediaJs(module, __webpack_exports__, __webpack_require__) {20552 -1 'use strict';20553 -1 __webpack_require__.r(__webpack_exports__);20554 -1 var _query_selector_all_filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/query-selector-all-filter.js');20555 -1 function preloadMedia(_ref59) {20556 -1 var _ref59$treeRoot = _ref59.treeRoot, treeRoot = _ref59$treeRoot === void 0 ? axe._tree[0] : _ref59$treeRoot;20557 -1 var mediaVirtualNodes = Object(_query_selector_all_filter__WEBPACK_IMPORTED_MODULE_0__['default'])(treeRoot, 'video, audio', function(_ref60) {20558 -1 var actualNode = _ref60.actualNode;20559 -1 if (actualNode.hasAttribute('src')) {20560 -1 return !!actualNode.getAttribute('src');20561 -1 }20562 -1 var sourceWithSrc = Array.from(actualNode.getElementsByTagName('source')).filter(function(source) {20563 -1 return !!source.getAttribute('src');20564 -1 });20565 -1 if (sourceWithSrc.length <= 0) {20566 -1 return false;20567 -1 }20568 -1 return true;20569 -1 });20570 -1 return Promise.all(mediaVirtualNodes.map(function(_ref61) {20571 -1 var actualNode = _ref61.actualNode;20572 -1 return isMediaElementReady(actualNode);20573 -1 }));-1 38630 if (node.nodeType === 1) { -1 38631 var element = {}; -1 38632 element.str = node.nodeName.toLowerCase(); -1 38633 var id = node.getAttribute && escape_selector_default(node.getAttribute('id')); -1 38634 if (id && node.ownerDocument.querySelectorAll('#' + id).length === 1) { -1 38635 element.id = node.getAttribute('id'); -1 38636 } -1 38637 if (count > 1) { -1 38638 element.count = count; -1 38639 } -1 38640 path.push(element); -1 38641 } -1 38642 return path; -1 38643 } -1 38644 function xpathToString(xpathArray) { -1 38645 return xpathArray.reduce(function(str, elm) { -1 38646 if (elm.id) { -1 38647 return '/'.concat(elm.str, '[@id=\'').concat(elm.id, '\']'); -1 38648 } else { -1 38649 return str + '/'.concat(elm.str) + (elm.count > 0 ? '['.concat(elm.count, ']') : ''); -1 38650 } -1 38651 }, ''); -1 38652 } -1 38653 function getXpath(node) { -1 38654 var xpathArray = getXPathArray(node); -1 38655 return xpathToString(xpathArray); -1 38656 } -1 38657 var get_xpath_default = getXpath; -1 38658 var _cache = {}; -1 38659 var cache = { -1 38660 set: function set(key, value) { -1 38661 _cache[key] = value; -1 38662 }, -1 38663 get: function get(key) { -1 38664 return _cache[key]; -1 38665 }, -1 38666 clear: function clear() { -1 38667 _cache = {}; -1 38668 } -1 38669 }; -1 38670 var cache_default = cache; -1 38671 function getNodeFromTree(vNode, node) { -1 38672 var el = node || vNode; -1 38673 return cache_default.get('nodeMap') ? cache_default.get('nodeMap').get(el) : null; -1 38674 } -1 38675 var get_node_from_tree_default = getNodeFromTree; -1 38676 function truncate(str, maxLength) { -1 38677 maxLength = maxLength || 300; -1 38678 if (str.length > maxLength) { -1 38679 var index = str.indexOf('>'); -1 38680 str = str.substring(0, index + 1); -1 38681 } -1 38682 return str; -1 38683 } -1 38684 function getSource2(element) { -1 38685 if (!(element !== null && element !== void 0 && element.outerHTML)) { -1 38686 return ''; 20574 38687 }20575 -1 __webpack_exports__['default'] = preloadMedia;20576 -1 function isMediaElementReady(elm) {20577 -1 return new Promise(function(resolve) {20578 -1 if (elm.readyState > 0) {20579 -1 resolve(elm);-1 38688 var source = element.outerHTML; -1 38689 if (!source && typeof XMLSerializer === 'function') { -1 38690 source = new XMLSerializer().serializeToString(element); -1 38691 } -1 38692 return truncate(source || ''); -1 38693 } -1 38694 function DqElement(elm) { -1 38695 var _this$spec$selector, _this$_virtualNode; -1 38696 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 38697 var spec = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; -1 38698 this.spec = spec; -1 38699 if (elm instanceof abstract_virtual_node_default) { -1 38700 this._virtualNode = elm; -1 38701 this._element = elm.actualNode; -1 38702 } else { -1 38703 this._element = elm; -1 38704 this._virtualNode = get_node_from_tree_default(elm); -1 38705 } -1 38706 this.fromFrame = ((_this$spec$selector = this.spec.selector) === null || _this$spec$selector === void 0 ? void 0 : _this$spec$selector.length) > 1; -1 38707 if (options.absolutePaths) { -1 38708 this._options = { -1 38709 toRoot: true -1 38710 }; -1 38711 } -1 38712 this.nodeIndexes = []; -1 38713 if (Array.isArray(this.spec.nodeIndexes)) { -1 38714 this.nodeIndexes = this.spec.nodeIndexes; -1 38715 } else if (typeof ((_this$_virtualNode = this._virtualNode) === null || _this$_virtualNode === void 0 ? void 0 : _this$_virtualNode.nodeIndex) === 'number') { -1 38716 this.nodeIndexes = [ this._virtualNode.nodeIndex ]; -1 38717 } -1 38718 this.source = null; -1 38719 if (!axe._audit.noHtml) { -1 38720 var _this$spec$source; -1 38721 this.source = (_this$spec$source = this.spec.source) !== null && _this$spec$source !== void 0 ? _this$spec$source : getSource2(this._element); -1 38722 } -1 38723 } -1 38724 DqElement.prototype = { -1 38725 get selector() { -1 38726 return this.spec.selector || [ _getSelector(this.element, this._options) ]; -1 38727 }, -1 38728 get ancestry() { -1 38729 return this.spec.ancestry || [ _getAncestry(this.element) ]; -1 38730 }, -1 38731 get xpath() { -1 38732 return this.spec.xpath || [ get_xpath_default(this.element) ]; -1 38733 }, -1 38734 get element() { -1 38735 return this._element; -1 38736 }, -1 38737 toJSON: function toJSON() { -1 38738 return { -1 38739 selector: this.selector, -1 38740 source: this.source, -1 38741 xpath: this.xpath, -1 38742 ancestry: this.ancestry, -1 38743 nodeIndexes: this.nodeIndexes -1 38744 }; -1 38745 } -1 38746 }; -1 38747 DqElement.fromFrame = function fromFrame(node, options, frame) { -1 38748 var spec = _extends({}, node, { -1 38749 selector: [].concat(_toConsumableArray(frame.selector), _toConsumableArray(node.selector)), -1 38750 ancestry: [].concat(_toConsumableArray(frame.ancestry), _toConsumableArray(node.ancestry)), -1 38751 xpath: [].concat(_toConsumableArray(frame.xpath), _toConsumableArray(node.xpath)), -1 38752 nodeIndexes: [].concat(_toConsumableArray(frame.nodeIndexes), _toConsumableArray(node.nodeIndexes)) -1 38753 }); -1 38754 return new DqElement(frame.element, options, spec); -1 38755 }; -1 38756 var dq_element_default = DqElement; -1 38757 function checkHelper(checkResult, options, resolve, reject) { -1 38758 return { -1 38759 isAsync: false, -1 38760 async: function async() { -1 38761 this.isAsync = true; -1 38762 return function(result) { -1 38763 if (result instanceof Error === false) { -1 38764 checkResult.result = result; -1 38765 resolve(checkResult); -1 38766 } else { -1 38767 reject(result); -1 38768 } -1 38769 }; -1 38770 }, -1 38771 data: function data(data2) { -1 38772 checkResult.data = data2; -1 38773 }, -1 38774 relatedNodes: function relatedNodes(nodes) { -1 38775 nodes = nodes instanceof window.Node ? [ nodes ] : to_array_default(nodes); -1 38776 checkResult.relatedNodes = nodes.map(function(element) { -1 38777 return new dq_element_default(element, options); -1 38778 }); -1 38779 } -1 38780 }; -1 38781 } -1 38782 var check_helper_default = checkHelper; -1 38783 function clone(obj) { -1 38784 var index, length, out = obj; -1 38785 if (obj !== null && _typeof(obj) === 'object') { -1 38786 if (Array.isArray(obj)) { -1 38787 out = []; -1 38788 for (index = 0, length = obj.length; index < length; index++) { -1 38789 out[index] = clone(obj[index]); 20580 38790 }20581 -1 function onMediaReady() {20582 -1 elm.removeEventListener('loadedmetadata', onMediaReady);20583 -1 resolve(elm);-1 38791 } else { -1 38792 out = {}; -1 38793 for (index in obj) { -1 38794 out[index] = clone(obj[index]); 20584 38795 }20585 -1 elm.addEventListener('loadedmetadata', onMediaReady);20586 -1 });-1 38796 } 20587 38797 }20588 -1 },20589 -1 './lib/core/utils/preload.js': function libCoreUtilsPreloadJs(module, __webpack_exports__, __webpack_require__) {20590 -1 'use strict';20591 -1 __webpack_require__.r(__webpack_exports__);20592 -1 __webpack_require__.d(__webpack_exports__, 'shouldPreload', function() {20593 -1 return shouldPreload;-1 38798 return out; -1 38799 } -1 38800 var clone_default = clone; -1 38801 var css_selector_parser = __toModule(require_lib()); -1 38802 var parser = new css_selector_parser.CssSelectorParser(); -1 38803 parser.registerSelectorPseudos('not'); -1 38804 parser.registerSelectorPseudos('is'); -1 38805 parser.registerNestingOperators('>'); -1 38806 parser.registerAttrEqualityMods('^', '$', '*', '~'); -1 38807 var css_parser_default = parser; -1 38808 function matchesTag(vNode, exp) { -1 38809 return vNode.props.nodeType === 1 && (exp.tag === '*' || vNode.props.nodeName === exp.tag); -1 38810 } -1 38811 function matchesClasses(vNode, exp) { -1 38812 return !exp.classes || exp.classes.every(function(cl) { -1 38813 return vNode.hasClass(cl.value); 20594 38814 });20595 -1 __webpack_require__.d(__webpack_exports__, 'getPreloadConfig', function() {20596 -1 return getPreloadConfig;-1 38815 } -1 38816 function matchesAttributes(vNode, exp) { -1 38817 return !exp.attributes || exp.attributes.every(function(att) { -1 38818 var nodeAtt = vNode.attr(att.key); -1 38819 return nodeAtt !== null && (!att.value || att.test(nodeAtt)); 20597 38820 });20598 -1 var _preload_cssom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/preload-cssom.js');20599 -1 var _preload_media__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/preload-media.js');20600 -1 var _unique_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/unique-array.js');20601 -1 var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/constants.js');20602 -1 function isValidPreloadObject(preload) {20603 -1 return _typeof(preload) === 'object' && Array.isArray(preload.assets);20604 -1 }20605 -1 function shouldPreload(options) {20606 -1 if (!options || options.preload === undefined || options.preload === null) {20607 -1 return true;20608 -1 }20609 -1 if (typeof options.preload === 'boolean') {20610 -1 return options.preload;-1 38821 } -1 38822 function matchesId(vNode, exp) { -1 38823 return !exp.id || vNode.props.id === exp.id; -1 38824 } -1 38825 function matchesPseudos(target, exp) { -1 38826 if (!exp.pseudos || exp.pseudos.every(function(pseudo) { -1 38827 if (pseudo.name === 'not') { -1 38828 return !pseudo.expressions.some(function(expression) { -1 38829 return _matchesExpression(target, expression); -1 38830 }); -1 38831 } else if (pseudo.name === 'is') { -1 38832 return pseudo.expressions.some(function(expression) { -1 38833 return _matchesExpression(target, expression); -1 38834 }); 20611 38835 }20612 -1 return isValidPreloadObject(options.preload);-1 38836 throw new Error('the pseudo selector ' + pseudo.name + ' has not yet been implemented'); -1 38837 })) { -1 38838 return true; 20613 38839 }20614 -1 function getPreloadConfig(options) {20615 -1 var _constants__WEBPACK_I2 = _constants__WEBPACK_IMPORTED_MODULE_3__['default'].preload, assets = _constants__WEBPACK_I2.assets, timeout = _constants__WEBPACK_I2.timeout;20616 -1 var config = {20617 -1 assets: assets,20618 -1 timeout: timeout20619 -1 };20620 -1 if (!options.preload) {20621 -1 return config;20622 -1 }20623 -1 if (typeof options.preload === 'boolean') {20624 -1 return config;-1 38840 return false; -1 38841 } -1 38842 function matchExpression(vNode, expression) { -1 38843 return matchesTag(vNode, expression) && matchesClasses(vNode, expression) && matchesAttributes(vNode, expression) && matchesId(vNode, expression) && matchesPseudos(vNode, expression); -1 38844 } -1 38845 var escapeRegExp = function() { -1 38846 var from = /(?=[\-\[\]{}()*+?.\\\^$|,#\s])/g; -1 38847 var to = '\\'; -1 38848 return function(string) { -1 38849 return string.replace(from, to); -1 38850 }; -1 38851 }(); -1 38852 var reUnescape = /\\/g; -1 38853 function convertAttributes(atts) { -1 38854 if (!atts) { -1 38855 return; -1 38856 } -1 38857 return atts.map(function(att) { -1 38858 var attributeKey = att.name.replace(reUnescape, ''); -1 38859 var attributeValue = (att.value || '').replace(reUnescape, ''); -1 38860 var test, regexp; -1 38861 switch (att.operator) { -1 38862 case '^=': -1 38863 regexp = new RegExp('^' + escapeRegExp(attributeValue)); -1 38864 break; -1 38865 -1 38866 case '$=': -1 38867 regexp = new RegExp(escapeRegExp(attributeValue) + '$'); -1 38868 break; -1 38869 -1 38870 case '~=': -1 38871 regexp = new RegExp('(^|\\s)' + escapeRegExp(attributeValue) + '(\\s|$)'); -1 38872 break; -1 38873 -1 38874 case '|=': -1 38875 regexp = new RegExp('^' + escapeRegExp(attributeValue) + '(-|$)'); -1 38876 break; -1 38877 -1 38878 case '=': -1 38879 test = function test(value) { -1 38880 return attributeValue === value; -1 38881 }; -1 38882 break; -1 38883 -1 38884 case '*=': -1 38885 test = function test(value) { -1 38886 return value && value.includes(attributeValue); -1 38887 }; -1 38888 break; -1 38889 -1 38890 case '!=': -1 38891 test = function test(value) { -1 38892 return attributeValue !== value; -1 38893 }; -1 38894 break; -1 38895 -1 38896 default: -1 38897 test = function test(value) { -1 38898 return !!value; -1 38899 }; 20625 38900 }20626 -1 var areRequestedAssetsValid = options.preload.assets.every(function(a) {20627 -1 return assets.includes(a.toLowerCase());20628 -1 });20629 -1 if (!areRequestedAssetsValid) {20630 -1 throw new Error('Requested assets, not supported. ' + 'Supported assets are: '.concat(assets.join(', '), '.'));-1 38901 if (attributeValue === '' && /^[*$^]=$/.test(att.operator)) { -1 38902 test = function test() { -1 38903 return false; -1 38904 }; 20631 38905 }20632 -1 config.assets = Object(_unique_array__WEBPACK_IMPORTED_MODULE_2__['default'])(options.preload.assets.map(function(a) {20633 -1 return a.toLowerCase();20634 -1 }), []);20635 -1 if (options.preload.timeout && typeof options.preload.timeout === 'number' && !isNaN(options.preload.timeout)) {20636 -1 config.timeout = options.preload.timeout;-1 38906 if (!test) { -1 38907 test = function test(value) { -1 38908 return value && regexp.test(value); -1 38909 }; 20637 38910 }20638 -1 return config;-1 38911 return { -1 38912 key: attributeKey, -1 38913 value: attributeValue, -1 38914 test: test -1 38915 }; -1 38916 }); -1 38917 } -1 38918 function convertClasses(classes) { -1 38919 if (!classes) { -1 38920 return; 20639 38921 }20640 -1 function preload(options) {20641 -1 var preloadFunctionsMap = {20642 -1 cssom: _preload_cssom__WEBPACK_IMPORTED_MODULE_0__['default'],20643 -1 media: _preload_media__WEBPACK_IMPORTED_MODULE_1__['default']-1 38922 return classes.map(function(className) { -1 38923 className = className.replace(reUnescape, ''); -1 38924 return { -1 38925 value: className, -1 38926 regexp: new RegExp('(^|\\s)' + escapeRegExp(className) + '(\\s|$)') 20644 38927 };20645 -1 if (!shouldPreload(options)) {20646 -1 return Promise.resolve();20647 -1 }20648 -1 return new Promise(function(resolve, reject) {20649 -1 var _getPreloadConfig = getPreloadConfig(options), assets = _getPreloadConfig.assets, timeout = _getPreloadConfig.timeout;20650 -1 var preloadTimeout = setTimeout(function() {20651 -1 return reject(new Error('Preload assets timed out.'));20652 -1 }, timeout);20653 -1 Promise.all(assets.map(function(asset) {20654 -1 return preloadFunctionsMap[asset](options).then(function(results) {20655 -1 return _defineProperty({}, asset, results);20656 -1 });20657 -1 })).then(function(results) {20658 -1 var preloadAssets = results.reduce(function(out, result) {20659 -1 return _extends({}, out, result);20660 -1 }, {});20661 -1 clearTimeout(preloadTimeout);20662 -1 resolve(preloadAssets);20663 -1 })['catch'](function(err) {20664 -1 clearTimeout(preloadTimeout);20665 -1 reject(err);20666 -1 });20667 -1 });-1 38928 }); -1 38929 } -1 38930 function convertPseudos(pseudos) { -1 38931 if (!pseudos) { -1 38932 return; 20668 38933 }20669 -1 __webpack_exports__['default'] = preload;20670 -1 },20671 -1 './lib/core/utils/process-message.js': function libCoreUtilsProcessMessageJs(module, __webpack_exports__, __webpack_require__) {20672 -1 'use strict';20673 -1 __webpack_require__.r(__webpack_exports__);20674 -1 var _reporters_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/reporters/helpers/index.js');20675 -1 var dataRegex = /\$\{\s?data\s?\}/g;20676 -1 function substitute(str, data) {20677 -1 if (typeof data === 'string') {20678 -1 return str.replace(dataRegex, data);-1 38934 return pseudos.map(function(p) { -1 38935 var expressions; -1 38936 if ([ 'is', 'not' ].includes(p.name)) { -1 38937 expressions = p.value; -1 38938 expressions = expressions.selectors ? expressions.selectors : [ expressions ]; -1 38939 expressions = convertExpressions(expressions); 20679 38940 }20680 -1 for (var prop in data) {20681 -1 if (data.hasOwnProperty(prop)) {20682 -1 var regex = new RegExp('\\${\\s?data\\.' + prop + '\\s?}', 'g');20683 -1 str = str.replace(regex, data[prop]);20684 -1 }-1 38941 return { -1 38942 name: p.name, -1 38943 expressions: expressions, -1 38944 value: p.value -1 38945 }; -1 38946 }); -1 38947 } -1 38948 function convertExpressions(expressions) { -1 38949 return expressions.map(function(exp) { -1 38950 var newExp = []; -1 38951 var rule3 = exp.rule; -1 38952 while (rule3) { -1 38953 newExp.push({ -1 38954 tag: rule3.tagName ? rule3.tagName.toLowerCase() : '*', -1 38955 combinator: rule3.nestingOperator ? rule3.nestingOperator : ' ', -1 38956 id: rule3.id, -1 38957 attributes: convertAttributes(rule3.attrs), -1 38958 classes: convertClasses(rule3.classNames), -1 38959 pseudos: convertPseudos(rule3.pseudos) -1 38960 }); -1 38961 rule3 = rule3.rule; 20685 38962 }20686 -1 return str;-1 38963 return newExp; -1 38964 }); -1 38965 } -1 38966 function _convertSelector(selector) { -1 38967 var expressions = css_parser_default.parse(selector); -1 38968 expressions = expressions.selectors ? expressions.selectors : [ expressions ]; -1 38969 return convertExpressions(expressions); -1 38970 } -1 38971 function _matchesExpression(vNode, expressions, matchAnyParent) { -1 38972 var exps = [].concat(expressions); -1 38973 var expression = exps.pop(); -1 38974 var matches14 = matchExpression(vNode, expression); -1 38975 while (!matches14 && matchAnyParent && vNode.parent) { -1 38976 vNode = vNode.parent; -1 38977 matches14 = matchExpression(vNode, expression); 20687 38978 }20688 -1 function processMessage(message, data) {20689 -1 if (!message) {20690 -1 return;20691 -1 }20692 -1 if (Array.isArray(data)) {20693 -1 data.values = data.join(', ');20694 -1 if (typeof message.singular === 'string' && typeof message.plural === 'string') {20695 -1 var _str = data.length === 1 ? message.singular : message.plural;20696 -1 return substitute(_str, data);20697 -1 }20698 -1 return substitute(message, data);20699 -1 }20700 -1 if (typeof message === 'string') {20701 -1 return substitute(message, data);-1 38979 if (exps.length) { -1 38980 if ([ ' ', '>' ].includes(expression.combinator) === false) { -1 38981 throw new Error('axe.utils.matchesExpression does not support the combinator: ' + expression.combinator); 20702 38982 }20703 -1 if (typeof data === 'string') {20704 -1 var _str2 = message[data];20705 -1 return substitute(_str2, data);-1 38983 matches14 = matches14 && _matchesExpression(vNode.parent, exps, expression.combinator === ' '); -1 38984 } -1 38985 return matches14; -1 38986 } -1 38987 function matches(vNode, selector) { -1 38988 var expressions = _convertSelector(selector); -1 38989 return expressions.some(function(expression) { -1 38990 return _matchesExpression(vNode, expression); -1 38991 }); -1 38992 } -1 38993 var matches_default = matches; -1 38994 function closest(vNode, selector) { -1 38995 while (vNode) { -1 38996 if (matches_default(vNode, selector)) { -1 38997 return vNode; 20706 38998 }20707 -1 var str = message['default'] || Object(_reporters_helpers__WEBPACK_IMPORTED_MODULE_0__['incompleteFallbackMessage'])();20708 -1 if (data && data.messageKey && message[data.messageKey]) {20709 -1 str = message[data.messageKey];-1 38999 if (typeof vNode.parent === 'undefined') { -1 39000 throw new TypeError('Cannot resolve parent for non-DOM nodes'); 20710 39001 }20711 -1 return processMessage(str, data);-1 39002 vNode = vNode.parent; 20712 39003 }20713 -1 __webpack_exports__['default'] = processMessage;20714 -1 },20715 -1 './lib/core/utils/publish-metadata.js': function libCoreUtilsPublishMetadataJs(module, __webpack_exports__, __webpack_require__) {20716 -1 'use strict';20717 -1 __webpack_require__.r(__webpack_exports__);20718 -1 var _process_message__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/process-message.js');20719 -1 var _clone__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/clone.js');20720 -1 var _find_by__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/find-by.js');20721 -1 var _extend_meta_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/extend-meta-data.js');20722 -1 var _reporters_helpers_incomplete_fallback_msg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/core/reporters/helpers/incomplete-fallback-msg.js');20723 -1 function getIncompleteReason(checkData, messages) {20724 -1 function getDefaultMsg(messages) {20725 -1 if (messages.incomplete && messages.incomplete['default']) {20726 -1 return messages.incomplete['default'];20727 -1 } else {20728 -1 return Object(_reporters_helpers_incomplete_fallback_msg__WEBPACK_IMPORTED_MODULE_4__['default'])();-1 39004 return null; -1 39005 } -1 39006 var closest_default = closest; -1 39007 function noop() {} -1 39008 function funcGuard(f) { -1 39009 if (typeof f !== 'function') { -1 39010 throw new TypeError('Queue methods require functions as arguments'); -1 39011 } -1 39012 } -1 39013 function queue() { -1 39014 var tasks = []; -1 39015 var started = 0; -1 39016 var remaining = 0; -1 39017 var completeQueue = noop; -1 39018 var complete = false; -1 39019 var err2; -1 39020 var defaultFail = function defaultFail(e) { -1 39021 err2 = e; -1 39022 setTimeout(function() { -1 39023 if (err2 !== void 0 && err2 !== null) { -1 39024 log_default('Uncaught error (of queue)', err2); -1 39025 } -1 39026 }, 1); -1 39027 }; -1 39028 var failed = defaultFail; -1 39029 function createResolve(i) { -1 39030 return function(r) { -1 39031 tasks[i] = r; -1 39032 remaining -= 1; -1 39033 if (!remaining && completeQueue !== noop) { -1 39034 complete = true; -1 39035 completeQueue(tasks); 20729 39036 }20730 -1 }20731 -1 if (checkData && checkData.missingData) {-1 39037 }; -1 39038 } -1 39039 function abort(msg) { -1 39040 completeQueue = noop; -1 39041 failed(msg); -1 39042 return tasks; -1 39043 } -1 39044 function pop() { -1 39045 var length = tasks.length; -1 39046 for (;started < length; started++) { -1 39047 var task = tasks[started]; 20732 39048 try {20733 -1 var msg = messages.incomplete[checkData.missingData[0].reason];20734 -1 if (!msg) {20735 -1 throw new Error();20736 -1 }20737 -1 return msg;-1 39049 task.call(null, createResolve(started), abort); 20738 39050 } catch (e) {20739 -1 if (typeof checkData.missingData === 'string') {20740 -1 return messages.incomplete[checkData.missingData];20741 -1 } else {20742 -1 return getDefaultMsg(messages);20743 -1 }-1 39051 abort(e); 20744 39052 }20745 -1 } else if (checkData && checkData.messageKey) {20746 -1 return messages.incomplete[checkData.messageKey];20747 -1 } else {20748 -1 return getDefaultMsg(messages);20749 39053 } 20750 39054 }20751 -1 function extender(checksData, shouldBeTrue) {20752 -1 return function(check) {20753 -1 var sourceData = checksData[check.id] || {};20754 -1 var messages = sourceData.messages || {};20755 -1 var data = Object.assign({}, sourceData);20756 -1 delete data.messages;20757 -1 if (check.result === undefined) {20758 -1 if (_typeof(messages.incomplete) === 'object' && !Array.isArray(check.data)) {20759 -1 data.message = getIncompleteReason(check.data, messages);20760 -1 }20761 -1 if (!data.message) {20762 -1 data.message = messages.incomplete;-1 39055 var q = { -1 39056 defer: function defer(fn) { -1 39057 if (_typeof(fn) === 'object' && fn.then && fn['catch']) { -1 39058 var defer = fn; -1 39059 fn = function fn(resolve, reject) { -1 39060 defer.then(resolve)['catch'](reject); -1 39061 }; -1 39062 } -1 39063 funcGuard(fn); -1 39064 if (err2 !== void 0) { -1 39065 return; -1 39066 } else if (complete) { -1 39067 throw new Error('Queue already completed'); -1 39068 } -1 39069 tasks.push(fn); -1 39070 ++remaining; -1 39071 pop(); -1 39072 return q; -1 39073 }, -1 39074 then: function then(fn) { -1 39075 funcGuard(fn); -1 39076 if (completeQueue !== noop) { -1 39077 throw new Error('queue `then` already set'); -1 39078 } -1 39079 if (!err2) { -1 39080 completeQueue = fn; -1 39081 if (!remaining) { -1 39082 complete = true; -1 39083 completeQueue(tasks); 20763 39084 }20764 -1 } else {20765 -1 data.message = check.result === shouldBeTrue ? messages.pass : messages.fail;20766 39085 }20767 -1 if (typeof data.message !== 'function') {20768 -1 data.message = Object(_process_message__WEBPACK_IMPORTED_MODULE_0__['default'])(data.message, check.data);-1 39086 return q; -1 39087 }, -1 39088 catch: function _catch(fn) { -1 39089 funcGuard(fn); -1 39090 if (failed !== defaultFail) { -1 39091 throw new Error('queue `catch` already set'); -1 39092 } -1 39093 if (!err2) { -1 39094 failed = fn; -1 39095 } else { -1 39096 fn(err2); -1 39097 err2 = null; 20769 39098 }20770 -1 Object(_extend_meta_data__WEBPACK_IMPORTED_MODULE_3__['default'])(check, data);20771 -1 };-1 39099 return q; -1 39100 }, -1 39101 abort: abort -1 39102 }; -1 39103 return q; -1 39104 } -1 39105 var queue_default = queue; -1 39106 var closeHandler; -1 39107 var postMessage2; -1 39108 var topicHandlers = {}; -1 39109 function _respondable(win, topic, message, keepalive, replyHandler) { -1 39110 var data2 = { -1 39111 topic: topic, -1 39112 message: message, -1 39113 channelId: ''.concat(v4(), ':').concat(v4()), -1 39114 keepalive: keepalive -1 39115 }; -1 39116 return postMessage2(win, data2, replyHandler); -1 39117 } -1 39118 function messageListener(data2, responder) { -1 39119 var topic = data2.topic, message = data2.message, keepalive = data2.keepalive; -1 39120 var topicHandler = topicHandlers[topic]; -1 39121 if (!topicHandler) { -1 39122 return; 20772 39123 }20773 -1 function publishMetaData(ruleResult) {20774 -1 var checksData = axe._audit.data.checks || {};20775 -1 var rulesData = axe._audit.data.rules || {};20776 -1 var rule = Object(_find_by__WEBPACK_IMPORTED_MODULE_2__['default'])(axe._audit.rules, 'id', ruleResult.id) || {};20777 -1 ruleResult.tags = Object(_clone__WEBPACK_IMPORTED_MODULE_1__['default'])(rule.tags || []);20778 -1 var shouldBeTrue = extender(checksData, true);20779 -1 var shouldBeFalse = extender(checksData, false);20780 -1 ruleResult.nodes.forEach(function(detail) {20781 -1 detail.any.forEach(shouldBeTrue);20782 -1 detail.all.forEach(shouldBeTrue);20783 -1 detail.none.forEach(shouldBeFalse);20784 -1 });20785 -1 Object(_extend_meta_data__WEBPACK_IMPORTED_MODULE_3__['default'])(ruleResult, Object(_clone__WEBPACK_IMPORTED_MODULE_1__['default'])(rulesData[ruleResult.id] || {}));-1 39124 try { -1 39125 topicHandler(message, keepalive, responder); -1 39126 } catch (error) { -1 39127 axe.log(error); -1 39128 responder(error, keepalive); 20786 39129 }20787 -1 __webpack_exports__['default'] = publishMetaData;20788 -1 },20789 -1 './lib/core/utils/query-selector-all-filter.js': function libCoreUtilsQuerySelectorAllFilterJs(module, __webpack_exports__, __webpack_require__) {20790 -1 'use strict';20791 -1 __webpack_require__.r(__webpack_exports__);20792 -1 var _matches__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/matches.js');20793 -1 function createLocalVariables(vNodes, anyLevel, thisLevel, parentShadowId) {20794 -1 var retVal = {20795 -1 vNodes: vNodes.slice(),20796 -1 anyLevel: anyLevel,20797 -1 thisLevel: thisLevel,20798 -1 parentShadowId: parentShadowId20799 -1 };20800 -1 retVal.vNodes.reverse();20801 -1 return retVal;-1 39130 } -1 39131 _respondable.updateMessenger = function updateMessenger(_ref5) { -1 39132 var open = _ref5.open, post = _ref5.post; -1 39133 assert_default(typeof open === 'function', 'open callback must be a function'); -1 39134 assert_default(typeof post === 'function', 'post callback must be a function'); -1 39135 if (closeHandler) { -1 39136 closeHandler(); -1 39137 } -1 39138 var close = open(messageListener); -1 39139 if (close) { -1 39140 assert_default(typeof close === 'function', 'open callback must return a cleanup function'); -1 39141 closeHandler = close; -1 39142 } else { -1 39143 closeHandler = null; 20802 39144 }20803 -1 function matchExpressions(domTree, expressions, filter) {20804 -1 var stack = [];20805 -1 var vNodes = Array.isArray(domTree) ? domTree : [ domTree ];20806 -1 var currentLevel = createLocalVariables(vNodes, expressions, [], domTree[0].shadowId);20807 -1 var result = [];20808 -1 while (currentLevel.vNodes.length) {20809 -1 var vNode = currentLevel.vNodes.pop();20810 -1 var childOnly = [];20811 -1 var childAny = [];20812 -1 var combined = currentLevel.anyLevel.slice().concat(currentLevel.thisLevel);20813 -1 var added = false;20814 -1 for (var i = 0; i < combined.length; i++) {20815 -1 var exp = combined[i];20816 -1 if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && Object(_matches__WEBPACK_IMPORTED_MODULE_0__['matchesExpression'])(vNode, exp[0])) {20817 -1 if (exp.length === 1) {20818 -1 if (!added && (!filter || filter(vNode))) {20819 -1 result.push(vNode);20820 -1 added = true;20821 -1 }20822 -1 } else {20823 -1 var rest = exp.slice(1);20824 -1 if ([ ' ', '>' ].includes(rest[0].combinator) === false) {20825 -1 throw new Error('axe.utils.querySelectorAll does not support the combinator: ' + exp[1].combinator);20826 -1 }20827 -1 if (rest[0].combinator === '>') {20828 -1 childOnly.push(rest);20829 -1 } else {20830 -1 childAny.push(rest);20831 -1 }20832 -1 }20833 -1 }20834 -1 if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && currentLevel.anyLevel.includes(exp)) {20835 -1 childAny.push(exp);20836 -1 }20837 -1 }20838 -1 if (vNode.children && vNode.children.length) {20839 -1 stack.push(currentLevel);20840 -1 currentLevel = createLocalVariables(vNode.children, childAny, childOnly, vNode.shadowId);-1 39145 postMessage2 = post; -1 39146 }; -1 39147 _respondable.subscribe = function subscribe(topic, topicHandler) { -1 39148 assert_default(typeof topicHandler === 'function', 'Subscriber callback must be a function'); -1 39149 assert_default(!topicHandlers[topic], 'Topic '.concat(topic, ' is already registered to.')); -1 39150 topicHandlers[topic] = topicHandler; -1 39151 }; -1 39152 _respondable.isInFrame = function isInFrame() { -1 39153 var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window; -1 39154 return !!win.frameElement; -1 39155 }; -1 39156 setDefaultFrameMessenger(_respondable); -1 39157 function err(message, node) { -1 39158 var selector; -1 39159 if (axe._tree) { -1 39160 selector = _getSelector(node); -1 39161 } -1 39162 return new Error(message + ': ' + (selector || node)); -1 39163 } -1 39164 function sendCommandToFrame(node, parameters, resolve, reject) { -1 39165 var win = node.contentWindow; -1 39166 if (!win) { -1 39167 log_default('Frame does not have a content window', node); -1 39168 resolve(null); -1 39169 return; -1 39170 } -1 39171 var timeout = setTimeout(function() { -1 39172 timeout = setTimeout(function() { -1 39173 if (!parameters.debug) { -1 39174 resolve(null); -1 39175 } else { -1 39176 reject(err('No response from frame', node)); 20841 39177 }20842 -1 while (!currentLevel.vNodes.length && stack.length) {20843 -1 currentLevel = stack.pop();-1 39178 }, 0); -1 39179 }, 500); -1 39180 _respondable(win, 'axe.ping', null, void 0, function() { -1 39181 clearTimeout(timeout); -1 39182 var frameWaitTime = parameters.options && parameters.options.frameWaitTime || 6e4; -1 39183 timeout = setTimeout(function collectResultFramesTimeout() { -1 39184 reject(err('Axe in frame timed out', node)); -1 39185 }, frameWaitTime); -1 39186 _respondable(win, 'axe.start', parameters, void 0, function(data2) { -1 39187 clearTimeout(timeout); -1 39188 if (data2 instanceof Error === false) { -1 39189 resolve(data2); -1 39190 } else { -1 39191 reject(data2); 20844 39192 } -1 39193 }); -1 39194 }); -1 39195 } -1 39196 var send_command_to_frame_default = sendCommandToFrame; -1 39197 function getAllChecks(object) { -1 39198 var result = []; -1 39199 return result.concat(object.any || []).concat(object.all || []).concat(object.none || []); -1 39200 } -1 39201 var get_all_checks_default = getAllChecks; -1 39202 function findBy(array, key, value) { -1 39203 if (Array.isArray(array)) { -1 39204 return array.find(function(obj) { -1 39205 return _typeof(obj) === 'object' && obj[key] === value; -1 39206 }); -1 39207 } -1 39208 } -1 39209 var find_by_default = findBy; -1 39210 function pushFrame(resultSet, dqFrame, options) { -1 39211 resultSet.forEach(function(res) { -1 39212 res.node = dq_element_default.fromFrame(res.node, options, dqFrame); -1 39213 var checks = get_all_checks_default(res); -1 39214 checks.forEach(function(check4) { -1 39215 check4.relatedNodes = check4.relatedNodes.map(function(node) { -1 39216 return dq_element_default.fromFrame(node, options, dqFrame); -1 39217 }); -1 39218 }); -1 39219 }); -1 39220 } -1 39221 function spliceNodes(target, to) { -1 39222 var firstFromFrame = to[0].node; -1 39223 for (var _i2 = 0; _i2 < target.length; _i2++) { -1 39224 var node = target[_i2].node; -1 39225 var resultSort = nodeIndexSort(node.nodeIndexes, firstFromFrame.nodeIndexes); -1 39226 if (resultSort > 0 || resultSort === 0 && firstFromFrame.selector.length < node.selector.length) { -1 39227 target.splice.apply(target, [ _i2, 0 ].concat(_toConsumableArray(to))); -1 39228 return; 20845 39229 }20846 -1 return result;20847 39230 }20848 -1 function querySelectorAllFilter(domTree, selector, filter) {20849 -1 domTree = Array.isArray(domTree) ? domTree : [ domTree ];20850 -1 var expressions = Object(_matches__WEBPACK_IMPORTED_MODULE_0__['convertSelector'])(selector);20851 -1 return matchExpressions(domTree, expressions, filter);-1 39231 target.push.apply(target, _toConsumableArray(to)); -1 39232 } -1 39233 function normalizeResult(result) { -1 39234 if (!result || !result.results) { -1 39235 return null; 20852 39236 }20853 -1 __webpack_exports__['default'] = querySelectorAllFilter;20854 -1 },20855 -1 './lib/core/utils/query-selector-all.js': function libCoreUtilsQuerySelectorAllJs(module, __webpack_exports__, __webpack_require__) {20856 -1 'use strict';20857 -1 __webpack_require__.r(__webpack_exports__);20858 -1 __webpack_require__.d(__webpack_exports__, 'querySelectorAll', function() {20859 -1 return querySelectorAll;20860 -1 });20861 -1 var _query_selector_all_filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/query-selector-all-filter.js');20862 -1 function querySelectorAll(domTree, selector) {20863 -1 return Object(_query_selector_all_filter__WEBPACK_IMPORTED_MODULE_0__['default'])(domTree, selector);-1 39237 if (!Array.isArray(result.results)) { -1 39238 return [ result.results ]; 20864 39239 }20865 -1 __webpack_exports__['default'] = querySelectorAll;20866 -1 },20867 -1 './lib/core/utils/queue.js': function libCoreUtilsQueueJs(module, __webpack_exports__, __webpack_require__) {20868 -1 'use strict';20869 -1 __webpack_require__.r(__webpack_exports__);20870 -1 var _log__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/log.js');20871 -1 function noop() {}20872 -1 function funcGuard(f) {20873 -1 if (typeof f !== 'function') {20874 -1 throw new TypeError('Queue methods require functions as arguments');20875 -1 }20876 -1 }20877 -1 function queue() {20878 -1 var tasks = [];20879 -1 var started = 0;20880 -1 var remaining = 0;20881 -1 var completeQueue = noop;20882 -1 var complete = false;20883 -1 var err;20884 -1 var defaultFail = function defaultFail(e) {20885 -1 err = e;20886 -1 setTimeout(function() {20887 -1 if (err !== undefined && err !== null) {20888 -1 Object(_log__WEBPACK_IMPORTED_MODULE_0__['default'])('Uncaught error (of queue)', err);20889 -1 }20890 -1 }, 1);20891 -1 };20892 -1 var failed = defaultFail;20893 -1 function createResolve(i) {20894 -1 return function(r) {20895 -1 tasks[i] = r;20896 -1 remaining -= 1;20897 -1 if (!remaining && completeQueue !== noop) {20898 -1 complete = true;20899 -1 completeQueue(tasks);20900 -1 }20901 -1 };-1 39240 if (!result.results.length) { -1 39241 return null; -1 39242 } -1 39243 return result.results; -1 39244 } -1 39245 function mergeResults(frameResults, options) { -1 39246 var mergedResult = []; -1 39247 frameResults.forEach(function(frameResult) { -1 39248 var results = normalizeResult(frameResult); -1 39249 if (!results || !results.length) { -1 39250 return; 20902 39251 }20903 -1 function abort(msg) {20904 -1 completeQueue = noop;20905 -1 failed(msg);20906 -1 return tasks;-1 39252 var dqFrame; -1 39253 if (frameResult.frameElement) { -1 39254 var spec = { -1 39255 selector: [ frameResult.frame ] -1 39256 }; -1 39257 dqFrame = new dq_element_default(frameResult.frameElement, options, spec); 20907 39258 }20908 -1 function pop() {20909 -1 var length = tasks.length;20910 -1 for (;started < length; started++) {20911 -1 var task = tasks[started];20912 -1 try {20913 -1 task.call(null, createResolve(started), abort);20914 -1 } catch (e) {20915 -1 abort(e);-1 39259 results.forEach(function(ruleResult) { -1 39260 if (ruleResult.nodes && dqFrame) { -1 39261 pushFrame(ruleResult.nodes, dqFrame, options); -1 39262 } -1 39263 var res = find_by_default(mergedResult, 'id', ruleResult.id); -1 39264 if (!res) { -1 39265 mergedResult.push(ruleResult); -1 39266 } else { -1 39267 if (ruleResult.nodes.length) { -1 39268 spliceNodes(res.nodes, ruleResult.nodes); 20916 39269 } 20917 39270 } -1 39271 }); -1 39272 }); -1 39273 mergedResult.forEach(function(result) { -1 39274 if (result.nodes) { -1 39275 result.nodes.sort(function(nodeA, nodeB) { -1 39276 return nodeIndexSort(nodeA.node.nodeIndexes, nodeB.node.nodeIndexes); -1 39277 }); 20918 39278 }20919 -1 var q = {20920 -1 defer: function defer(fn) {20921 -1 if (_typeof(fn) === 'object' && fn.then && fn['catch']) {20922 -1 var defer = fn;20923 -1 fn = function fn(resolve, reject) {20924 -1 defer.then(resolve)['catch'](reject);20925 -1 };20926 -1 }20927 -1 funcGuard(fn);20928 -1 if (err !== undefined) {20929 -1 return;20930 -1 } else if (complete) {20931 -1 throw new Error('Queue already completed');20932 -1 }20933 -1 tasks.push(fn);20934 -1 ++remaining;20935 -1 pop();20936 -1 return q;20937 -1 },20938 -1 then: function then(fn) {20939 -1 funcGuard(fn);20940 -1 if (completeQueue !== noop) {20941 -1 throw new Error('queue `then` already set');20942 -1 }20943 -1 if (!err) {20944 -1 completeQueue = fn;20945 -1 if (!remaining) {20946 -1 complete = true;20947 -1 completeQueue(tasks);20948 -1 }20949 -1 }20950 -1 return q;20951 -1 },20952 -1 catch: function _catch(fn) {20953 -1 funcGuard(fn);20954 -1 if (failed !== defaultFail) {20955 -1 throw new Error('queue `catch` already set');20956 -1 }20957 -1 if (!err) {20958 -1 failed = fn;20959 -1 } else {20960 -1 fn(err);20961 -1 err = null;20962 -1 }20963 -1 return q;20964 -1 },20965 -1 abort: abort-1 39279 }); -1 39280 return mergedResult; -1 39281 } -1 39282 function nodeIndexSort() { -1 39283 var nodeIndexesA = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; -1 39284 var nodeIndexesB = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; -1 39285 var length = Math.max(nodeIndexesA === null || nodeIndexesA === void 0 ? void 0 : nodeIndexesA.length, nodeIndexesB === null || nodeIndexesB === void 0 ? void 0 : nodeIndexesB.length); -1 39286 for (var _i3 = 0; _i3 < length; _i3++) { -1 39287 var indexA = nodeIndexesA === null || nodeIndexesA === void 0 ? void 0 : nodeIndexesA[_i3]; -1 39288 var indexB = nodeIndexesB === null || nodeIndexesB === void 0 ? void 0 : nodeIndexesB[_i3]; -1 39289 if (typeof indexA !== 'number' || isNaN(indexA)) { -1 39290 return _i3 === 0 ? 1 : -1; -1 39291 } -1 39292 if (typeof indexB !== 'number' || isNaN(indexB)) { -1 39293 return _i3 === 0 ? -1 : 1; -1 39294 } -1 39295 if (indexA !== indexB) { -1 39296 return indexA - indexB; -1 39297 } -1 39298 } -1 39299 return 0; -1 39300 } -1 39301 var merge_results_default = mergeResults; -1 39302 function collectResultsFromFrames(parentContent, options, command, parameter, resolve, reject) { -1 39303 var q = queue_default(); -1 39304 var frames = parentContent.frames; -1 39305 frames.forEach(function(frame) { -1 39306 var tabindex = parseInt(frame.node.getAttribute('tabindex'), 10); -1 39307 var focusable = isNaN(tabindex) || tabindex >= 0; -1 39308 var rect = frame.node.getBoundingClientRect(); -1 39309 var width = parseInt(frame.node.getAttribute('width'), 10); -1 39310 var height = parseInt(frame.node.getAttribute('height'), 10); -1 39311 width = isNaN(width) ? rect.width : width; -1 39312 height = isNaN(height) ? rect.height : height; -1 39313 var params = { -1 39314 options: options, -1 39315 command: command, -1 39316 parameter: parameter, -1 39317 context: { -1 39318 initiator: false, -1 39319 focusable: parentContent.focusable === false ? false : focusable, -1 39320 boundingClientRect: { -1 39321 width: width, -1 39322 height: height -1 39323 }, -1 39324 page: parentContent.page, -1 39325 include: frame.include || [], -1 39326 exclude: frame.exclude || [] -1 39327 } 20966 39328 };20967 -1 return q;-1 39329 q.defer(function(res, rej) { -1 39330 var node = frame.node; -1 39331 send_command_to_frame_default(node, params, function(data2) { -1 39332 if (data2) { -1 39333 return res({ -1 39334 results: data2, -1 39335 frameElement: node, -1 39336 frame: _getSelector(node) -1 39337 }); -1 39338 } -1 39339 res(null); -1 39340 }, rej); -1 39341 }); -1 39342 }); -1 39343 q.then(function(data2) { -1 39344 resolve(merge_results_default(data2, options)); -1 39345 })['catch'](reject); -1 39346 } -1 39347 var collect_results_from_frames_default = collectResultsFromFrames; -1 39348 function contains(vNode, otherVNode) { -1 39349 function containsShadowChild(vNode2, otherVNode2) { -1 39350 if (vNode2.shadowId === otherVNode2.shadowId) { -1 39351 return true; -1 39352 } -1 39353 return !!vNode2.children.find(function(child) { -1 39354 return containsShadowChild(child, otherVNode2); -1 39355 }); 20968 39356 }20969 -1 __webpack_exports__['default'] = queue;20970 -1 },20971 -1 './lib/core/utils/respondable.js': function libCoreUtilsRespondableJs(module, __webpack_exports__, __webpack_require__) {20972 -1 'use strict';20973 -1 __webpack_require__.r(__webpack_exports__);20974 -1 var _uuid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/uuid.js');20975 -1 var _base_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/base/cache.js');20976 -1 var messages = {};20977 -1 var subscribers = {};20978 -1 var errorTypes = Object.freeze([ 'EvalError', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError' ]);20979 -1 function _getSource() {20980 -1 var application = 'axeAPI', version = '', src;20981 -1 if (typeof axe !== 'undefined' && axe._audit && axe._audit.application) {20982 -1 application = axe._audit.application;20983 -1 }20984 -1 if (typeof axe !== 'undefined') {20985 -1 version = axe.version;20986 -1 }20987 -1 src = application + '.' + version;20988 -1 return src;20989 -1 }20990 -1 function verify(postedMessage) {20991 -1 if (_typeof(postedMessage) === 'object' && typeof postedMessage.uuid === 'string' && postedMessage._respondable === true) {20992 -1 var messageSource = _getSource();20993 -1 return postedMessage._source === messageSource || postedMessage._source === 'axeAPI.x.y.z' || messageSource === 'axeAPI.x.y.z';-1 39357 if (vNode.shadowId || otherVNode.shadowId) { -1 39358 return containsShadowChild(vNode, otherVNode); -1 39359 } -1 39360 if (vNode.actualNode) { -1 39361 if (typeof vNode.actualNode.contains === 'function') { -1 39362 return vNode.actualNode.contains(otherVNode.actualNode); 20994 39363 }20995 -1 return false;-1 39364 return !!(vNode.actualNode.compareDocumentPosition(otherVNode.actualNode) & 16); -1 39365 } else { -1 39366 do { -1 39367 if (otherVNode === vNode) { -1 39368 return true; -1 39369 } -1 39370 } while (otherVNode = otherVNode && otherVNode.parent); -1 39371 } -1 39372 return false; -1 39373 } -1 39374 var contains_default = contains; -1 39375 function deepMerge() { -1 39376 var target = {}; -1 39377 for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) { -1 39378 sources[_key] = arguments[_key]; -1 39379 } -1 39380 sources.forEach(function(source) { -1 39381 if (!source || _typeof(source) !== 'object' || Array.isArray(source)) { -1 39382 return; -1 39383 } -1 39384 for (var _i4 = 0, _Object$keys = Object.keys(source); _i4 < _Object$keys.length; _i4++) { -1 39385 var key = _Object$keys[_i4]; -1 39386 if (!target.hasOwnProperty(key) || _typeof(source[key]) !== 'object' || Array.isArray(target[key])) { -1 39387 target[key] = source[key]; -1 39388 } else { -1 39389 target[key] = deepMerge(target[key], source[key]); -1 39390 } -1 39391 } -1 39392 }); -1 39393 return target; -1 39394 } -1 39395 var deep_merge_default = deepMerge; -1 39396 function extendMetaData(to, from) { -1 39397 Object.assign(to, from); -1 39398 Object.keys(from).filter(function(prop) { -1 39399 return typeof from[prop] === 'function'; -1 39400 }).forEach(function(prop) { -1 39401 to[prop] = null; -1 39402 try { -1 39403 to[prop] = from[prop](to); -1 39404 } catch (e) {} -1 39405 }); -1 39406 } -1 39407 var extend_meta_data_default = extendMetaData; -1 39408 var possibleShadowRoots = [ 'article', 'aside', 'blockquote', 'body', 'div', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'main', 'nav', 'p', 'section', 'span' ]; -1 39409 function isShadowRoot(node) { -1 39410 if (node.shadowRoot) { -1 39411 var nodeName2 = node.nodeName.toLowerCase(); -1 39412 if (possibleShadowRoots.includes(nodeName2) || /^[a-z][a-z0-9_.-]*-[a-z0-9_.-]*$/.test(nodeName2)) { -1 39413 return true; -1 39414 } -1 39415 } -1 39416 return false; -1 39417 } -1 39418 var is_shadow_root_default = isShadowRoot; -1 39419 var dom_exports = {}; -1 39420 __export(dom_exports, { -1 39421 findElmsInContext: function findElmsInContext() { -1 39422 return find_elms_in_context_default; -1 39423 }, -1 39424 findUp: function findUp() { -1 39425 return find_up_default; -1 39426 }, -1 39427 findUpVirtual: function findUpVirtual() { -1 39428 return find_up_virtual_default; -1 39429 }, -1 39430 getComposedParent: function getComposedParent() { -1 39431 return get_composed_parent_default; -1 39432 }, -1 39433 getElementByReference: function getElementByReference() { -1 39434 return get_element_by_reference_default; -1 39435 }, -1 39436 getElementCoordinates: function getElementCoordinates() { -1 39437 return get_element_coordinates_default; -1 39438 }, -1 39439 getElementStack: function getElementStack() { -1 39440 return get_element_stack_default; -1 39441 }, -1 39442 getRootNode: function getRootNode() { -1 39443 return get_root_node_default2; -1 39444 }, -1 39445 getScrollOffset: function getScrollOffset() { -1 39446 return get_scroll_offset_default; -1 39447 }, -1 39448 getTabbableElements: function getTabbableElements() { -1 39449 return get_tabbable_elements_default; -1 39450 }, -1 39451 getTextElementStack: function getTextElementStack() { -1 39452 return get_text_element_stack_default; -1 39453 }, -1 39454 getViewportSize: function getViewportSize() { -1 39455 return get_viewport_size_default; -1 39456 }, -1 39457 hasContent: function hasContent() { -1 39458 return has_content_default; -1 39459 }, -1 39460 hasContentVirtual: function hasContentVirtual() { -1 39461 return has_content_virtual_default; -1 39462 }, -1 39463 idrefs: function idrefs() { -1 39464 return idrefs_default; -1 39465 }, -1 39466 insertedIntoFocusOrder: function insertedIntoFocusOrder() { -1 39467 return inserted_into_focus_order_default; -1 39468 }, -1 39469 isFocusable: function isFocusable() { -1 39470 return is_focusable_default; -1 39471 }, -1 39472 isHTML5: function isHTML5() { -1 39473 return is_html5_default; -1 39474 }, -1 39475 isHiddenWithCSS: function isHiddenWithCSS() { -1 39476 return is_hidden_with_css_default; -1 39477 }, -1 39478 isInTextBlock: function isInTextBlock() { -1 39479 return is_in_text_block_default; -1 39480 }, -1 39481 isModalOpen: function isModalOpen() { -1 39482 return is_modal_open_default; -1 39483 }, -1 39484 isNativelyFocusable: function isNativelyFocusable() { -1 39485 return is_natively_focusable_default; -1 39486 }, -1 39487 isNode: function isNode() { -1 39488 return is_node_default; -1 39489 }, -1 39490 isOffscreen: function isOffscreen() { -1 39491 return is_offscreen_default; -1 39492 }, -1 39493 isOpaque: function isOpaque() { -1 39494 return is_opaque_default; -1 39495 }, -1 39496 isSkipLink: function isSkipLink() { -1 39497 return is_skip_link_default; -1 39498 }, -1 39499 isVisible: function isVisible() { -1 39500 return is_visible_default; -1 39501 }, -1 39502 isVisualContent: function isVisualContent() { -1 39503 return is_visual_content_default; -1 39504 }, -1 39505 reduceToElementsBelowFloating: function reduceToElementsBelowFloating() { -1 39506 return reduce_to_elements_below_floating_default; -1 39507 }, -1 39508 shadowElementsFromPoint: function shadowElementsFromPoint() { -1 39509 return shadow_elements_from_point_default; -1 39510 }, -1 39511 urlPropsFromAttribute: function urlPropsFromAttribute() { -1 39512 return url_props_from_attribute_default; -1 39513 }, -1 39514 visuallyContains: function visuallyContains() { -1 39515 return visually_contains_default; -1 39516 }, -1 39517 visuallyOverlaps: function visuallyOverlaps() { -1 39518 return visually_overlaps_default; -1 39519 } -1 39520 }); -1 39521 function getRootNode(node) { -1 39522 var doc = node.getRootNode && node.getRootNode() || document; -1 39523 if (doc === node) { -1 39524 doc = document; -1 39525 } -1 39526 return doc; -1 39527 } -1 39528 var get_root_node_default = getRootNode; -1 39529 var get_root_node_default2 = get_root_node_default; -1 39530 function findElmsInContext(_ref6) { -1 39531 var context3 = _ref6.context, value = _ref6.value, attr = _ref6.attr, _ref6$elm = _ref6.elm, elm = _ref6$elm === void 0 ? '' : _ref6$elm; -1 39532 var root; -1 39533 var escapedValue = escape_selector_default(value); -1 39534 if (context3.nodeType === 9 || context3.nodeType === 11) { -1 39535 root = context3; -1 39536 } else { -1 39537 root = get_root_node_default2(context3); 20996 39538 }20997 -1 function post(win, topic, message, uuid, keepalive, callback) {20998 -1 var error;20999 -1 if (message instanceof Error) {21000 -1 error = {21001 -1 name: message.name,21002 -1 message: message.message,21003 -1 stack: message.stack21004 -1 };21005 -1 message = undefined;-1 39539 return Array.from(root.querySelectorAll(elm + '[' + attr + '=' + escapedValue + ']')); -1 39540 } -1 39541 var find_elms_in_context_default = findElmsInContext; -1 39542 function findUpVirtual(element, target) { -1 39543 var parent; -1 39544 parent = element.actualNode; -1 39545 if (!element.shadowId && typeof element.actualNode.closest === 'function') { -1 39546 var match = element.actualNode.closest(target); -1 39547 if (match) { -1 39548 return match; 21006 39549 }21007 -1 var data = {21008 -1 uuid: uuid,21009 -1 topic: topic,21010 -1 message: message,21011 -1 error: error,21012 -1 _respondable: true,21013 -1 _source: _getSource(),21014 -1 _axeuuid: axe._uuid,21015 -1 _keepalive: keepalive21016 -1 };21017 -1 var axeRespondables = _base_cache__WEBPACK_IMPORTED_MODULE_1__['default'].get('axeRespondables');21018 -1 if (!axeRespondables) {21019 -1 axeRespondables = {};21020 -1 _base_cache__WEBPACK_IMPORTED_MODULE_1__['default'].set('axeRespondables', axeRespondables);-1 39550 return null; -1 39551 } -1 39552 do { -1 39553 parent = parent.assignedSlot ? parent.assignedSlot : parent.parentNode; -1 39554 if (parent && parent.nodeType === 11) { -1 39555 parent = parent.host; 21021 39556 }21022 -1 axeRespondables[uuid] = true;21023 -1 if (typeof callback === 'function') {21024 -1 messages[uuid] = callback;-1 39557 } while (parent && !element_matches_default(parent, target) && parent !== document.documentElement); -1 39558 if (!parent) { -1 39559 return null; -1 39560 } -1 39561 if (!element_matches_default(parent, target)) { -1 39562 return null; -1 39563 } -1 39564 return parent; -1 39565 } -1 39566 var find_up_virtual_default = findUpVirtual; -1 39567 function findUp(element, target) { -1 39568 return find_up_virtual_default(get_node_from_tree_default(element), target); -1 39569 } -1 39570 var find_up_default = findUp; -1 39571 function getComposedParent(element) { -1 39572 if (element.assignedSlot) { -1 39573 return getComposedParent(element.assignedSlot); -1 39574 } else if (element.parentNode) { -1 39575 var parentNode = element.parentNode; -1 39576 if (parentNode.nodeType === 1) { -1 39577 return parentNode; -1 39578 } else if (parentNode.host) { -1 39579 return parentNode.host; 21025 39580 }21026 -1 win.postMessage(JSON.stringify(data), '*');21027 39581 }21028 -1 function respondable(win, topic, message, keepalive, callback) {21029 -1 var id = Object(_uuid__WEBPACK_IMPORTED_MODULE_0__['v1'])();21030 -1 post(win, topic, message, id, keepalive, callback);-1 39582 return null; -1 39583 } -1 39584 var get_composed_parent_default = getComposedParent; -1 39585 function getElementByReference(node, attr) { -1 39586 var fragment = node.getAttribute(attr); -1 39587 if (!fragment) { -1 39588 return null; -1 39589 } -1 39590 if (fragment.charAt(0) === '#') { -1 39591 fragment = decodeURIComponent(fragment.substring(1)); -1 39592 } else if (fragment.substr(0, 2) === '/#') { -1 39593 fragment = decodeURIComponent(fragment.substring(2)); -1 39594 } -1 39595 var candidate = document.getElementById(fragment); -1 39596 if (candidate) { -1 39597 return candidate; -1 39598 } -1 39599 candidate = document.getElementsByName(fragment); -1 39600 if (candidate.length) { -1 39601 return candidate[0]; -1 39602 } -1 39603 return null; -1 39604 } -1 39605 var get_element_by_reference_default = getElementByReference; -1 39606 function getScrollOffset(element) { -1 39607 if (!element.nodeType && element.document) { -1 39608 element = element.document; -1 39609 } -1 39610 if (element.nodeType === 9) { -1 39611 var docElement = element.documentElement, body = element.body; -1 39612 return { -1 39613 left: docElement && docElement.scrollLeft || body && body.scrollLeft || 0, -1 39614 top: docElement && docElement.scrollTop || body && body.scrollTop || 0 -1 39615 }; 21031 39616 }21032 -1 respondable.subscribe = function subscribe(topic, callback) {21033 -1 subscribers[topic] = callback;-1 39617 return { -1 39618 left: element.scrollLeft, -1 39619 top: element.scrollTop 21034 39620 };21035 -1 respondable.isInFrame = function isInFrame(win) {21036 -1 win = win || window;21037 -1 return !!win.frameElement;-1 39621 } -1 39622 var get_scroll_offset_default = getScrollOffset; -1 39623 function getElementCoordinates(element) { -1 39624 var scrollOffset = get_scroll_offset_default(document), xOffset = scrollOffset.left, yOffset = scrollOffset.top, coords = element.getBoundingClientRect(); -1 39625 return { -1 39626 top: coords.top + yOffset, -1 39627 right: coords.right + xOffset, -1 39628 bottom: coords.bottom + yOffset, -1 39629 left: coords.left + xOffset, -1 39630 width: coords.right - coords.left, -1 39631 height: coords.bottom - coords.top 21038 39632 };21039 -1 function createResponder(source, topic, uuid) {21040 -1 return function(message, keepalive, callback) {21041 -1 post(source, topic, message, uuid, keepalive, callback);-1 39633 } -1 39634 var get_element_coordinates_default = getElementCoordinates; -1 39635 function getViewportSize(win) { -1 39636 var doc = win.document; -1 39637 var docElement = doc.documentElement; -1 39638 if (win.innerWidth) { -1 39639 return { -1 39640 width: win.innerWidth, -1 39641 height: win.innerHeight 21042 39642 }; 21043 39643 }21044 -1 function publish(source, data, keepalive) {21045 -1 var topic = data.topic;21046 -1 var subscriber = subscribers[topic];21047 -1 if (subscriber) {21048 -1 var responder = createResponder(source, null, data.uuid);21049 -1 subscriber(data.message, keepalive, responder);21050 -1 }-1 39644 if (docElement) { -1 39645 return { -1 39646 width: docElement.clientWidth, -1 39647 height: docElement.clientHeight -1 39648 }; 21051 39649 }21052 -1 respondable._publish = publish;21053 -1 function buildErrorObject(error) {21054 -1 var msg = error.message || 'Unknown error occurred';21055 -1 var errorName = errorTypes.includes(error.name) ? error.name : 'Error';21056 -1 var ErrConstructor = window[errorName] || Error;21057 -1 if (error.stack) {21058 -1 msg += '\n' + error.stack.replace(error.message, '');-1 39650 var body = doc.body; -1 39651 return { -1 39652 width: body.clientWidth, -1 39653 height: body.clientHeight -1 39654 }; -1 39655 } -1 39656 var get_viewport_size_default = getViewportSize; -1 39657 function noParentScrolled(element, offset) { -1 39658 element = get_composed_parent_default(element); -1 39659 while (element && element.nodeName.toLowerCase() !== 'html') { -1 39660 if (element.scrollTop) { -1 39661 offset += element.scrollTop; -1 39662 if (offset >= 0) { -1 39663 return false; -1 39664 } 21059 39665 }21060 -1 return new ErrConstructor(msg);-1 39666 element = get_composed_parent_default(element); 21061 39667 }21062 -1 function parseMessage(dataString) {21063 -1 var data;21064 -1 if (typeof dataString !== 'string') {21065 -1 return;21066 -1 }21067 -1 try {21068 -1 data = JSON.parse(dataString);21069 -1 } catch (ex) {}21070 -1 if (!verify(data)) {21071 -1 return;21072 -1 }21073 -1 if (_typeof(data.error) === 'object') {21074 -1 data.error = buildErrorObject(data.error);21075 -1 } else {21076 -1 data.error = undefined;21077 -1 }21078 -1 return data;-1 39668 return true; -1 39669 } -1 39670 function isOffscreen(element) { -1 39671 var leftBoundary; -1 39672 var docElement = document.documentElement; -1 39673 var styl = window.getComputedStyle(element); -1 39674 var dir = window.getComputedStyle(document.body || docElement).getPropertyValue('direction'); -1 39675 var coords = get_element_coordinates_default(element); -1 39676 if (coords.bottom < 0 && (noParentScrolled(element, coords.bottom) || styl.position === 'absolute')) { -1 39677 return true; 21079 39678 }21080 -1 if (typeof window.addEventListener === 'function') {21081 -1 window.addEventListener('message', function(e) {21082 -1 var data = parseMessage(e.data);21083 -1 if (!data || !data._axeuuid) {21084 -1 return;21085 -1 }21086 -1 var uuid = data.uuid;21087 -1 var axeRespondables = _base_cache__WEBPACK_IMPORTED_MODULE_1__['default'].get('axeRespondables') || {};21088 -1 if (axeRespondables[uuid] && data._axeuuid === axe._uuid) {21089 -1 return;21090 -1 }21091 -1 var keepalive = data._keepalive;21092 -1 var callback = messages[uuid];21093 -1 if (callback) {21094 -1 var result = data.error || data.message;21095 -1 var responder = createResponder(e.source, data.topic, uuid);21096 -1 callback(result, keepalive, responder);21097 -1 if (!keepalive) {21098 -1 delete messages[uuid];21099 -1 }21100 -1 }21101 -1 if (!data.error) {21102 -1 try {21103 -1 publish(e.source, data, keepalive);21104 -1 } catch (err) {21105 -1 post(e.source, null, err, uuid, false);21106 -1 }21107 -1 }21108 -1 }, false);-1 39679 if (coords.left === 0 && coords.right === 0) { -1 39680 return false; 21109 39681 }21110 -1 __webpack_exports__['default'] = respondable;21111 -1 },21112 -1 './lib/core/utils/rule-should-run.js': function libCoreUtilsRuleShouldRunJs(module, __webpack_exports__, __webpack_require__) {21113 -1 'use strict';21114 -1 __webpack_require__.r(__webpack_exports__);21115 -1 function matchTags(rule, runOnly) {21116 -1 var include, exclude, matching;21117 -1 var defaultExclude = axe._audit && axe._audit.tagExclude ? axe._audit.tagExclude : [];21118 -1 if (runOnly.hasOwnProperty('include') || runOnly.hasOwnProperty('exclude')) {21119 -1 include = runOnly.include || [];21120 -1 include = Array.isArray(include) ? include : [ include ];21121 -1 exclude = runOnly.exclude || [];21122 -1 exclude = Array.isArray(exclude) ? exclude : [ exclude ];21123 -1 exclude = exclude.concat(defaultExclude.filter(function(tag) {21124 -1 return include.indexOf(tag) === -1;21125 -1 }));21126 -1 } else {21127 -1 include = Array.isArray(runOnly) ? runOnly : [ runOnly ];21128 -1 exclude = defaultExclude.filter(function(tag) {21129 -1 return include.indexOf(tag) === -1;21130 -1 });-1 39682 if (dir === 'ltr') { -1 39683 if (coords.right <= 0) { -1 39684 return true; 21131 39685 }21132 -1 matching = include.some(function(tag) {21133 -1 return rule.tags.indexOf(tag) !== -1;21134 -1 });21135 -1 if (matching || include.length === 0 && rule.enabled !== false) {21136 -1 return exclude.every(function(tag) {21137 -1 return rule.tags.indexOf(tag) === -1;21138 -1 });21139 -1 } else {21140 -1 return false;-1 39686 } else { -1 39687 leftBoundary = Math.max(docElement.scrollWidth, get_viewport_size_default(window).width); -1 39688 if (coords.left >= leftBoundary) { -1 39689 return true; 21141 39690 } 21142 39691 }21143 -1 function ruleShouldRun(rule, context, options) {21144 -1 var runOnly = options.runOnly || {};21145 -1 var ruleOptions = (options.rules || {})[rule.id];21146 -1 if (rule.pageLevel && !context.page) {21147 -1 return false;21148 -1 } else if (runOnly.type === 'rule') {21149 -1 return runOnly.values.indexOf(rule.id) !== -1;21150 -1 } else if (ruleOptions && typeof ruleOptions.enabled === 'boolean') {21151 -1 return ruleOptions.enabled;21152 -1 } else if (runOnly.type === 'tag' && runOnly.values) {21153 -1 return matchTags(rule, runOnly.values);21154 -1 } else {21155 -1 return matchTags(rule, []);-1 39692 return false; -1 39693 } -1 39694 var is_offscreen_default = isOffscreen; -1 39695 var clipRegex = /rect\s*\(([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px\s*\)/; -1 39696 var clipPathRegex = /(\w+)\((\d+)/; -1 39697 function isClipped(style) { -1 39698 var matchesClip = style.getPropertyValue('clip').match(clipRegex); -1 39699 var matchesClipPath = style.getPropertyValue('clip-path').match(clipPathRegex); -1 39700 if (matchesClip && matchesClip.length === 5) { -1 39701 return matchesClip[3] - matchesClip[1] <= 0 && matchesClip[2] - matchesClip[4] <= 0; -1 39702 } -1 39703 if (matchesClipPath) { -1 39704 var type = matchesClipPath[1]; -1 39705 var value = parseInt(matchesClipPath[2], 10); -1 39706 switch (type) { -1 39707 case 'inset': -1 39708 return value >= 50; -1 39709 -1 39710 case 'circle': -1 39711 return value === 0; -1 39712 -1 39713 default: 21156 39714 } 21157 39715 }21158 -1 __webpack_exports__['default'] = ruleShouldRun;21159 -1 },21160 -1 './lib/core/utils/select.js': function libCoreUtilsSelectJs(module, __webpack_exports__, __webpack_require__) {21161 -1 'use strict';21162 -1 __webpack_require__.r(__webpack_exports__);21163 -1 var _contains__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/contains.js');21164 -1 var _query_selector_all_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/query-selector-all-filter.js');21165 -1 var _is_node_in_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/is-node-in-context.js');21166 -1 function pushNode(result, nodes) {21167 -1 var temp;21168 -1 if (result.length === 0) {21169 -1 return nodes;21170 -1 }21171 -1 if (result.length < nodes.length) {21172 -1 temp = result;21173 -1 result = nodes;21174 -1 nodes = temp;21175 -1 }21176 -1 for (var i = 0, l = nodes.length; i < l; i++) {21177 -1 if (!result.includes(nodes[i])) {21178 -1 result.push(nodes[i]);21179 -1 }21180 -1 }21181 -1 return result;-1 39716 return false; -1 39717 } -1 39718 function isAreaVisible(el, screenReader, recursed) { -1 39719 var mapEl = find_up_default(el, 'map'); -1 39720 if (!mapEl) { -1 39721 return false; 21182 39722 }21183 -1 function reduceIncludes(includes) {21184 -1 return includes.reduce(function(res, el) {21185 -1 if (!res.length || !Object(_contains__WEBPACK_IMPORTED_MODULE_0__['default'])(res[res.length - 1], el)) {21186 -1 res.push(el);21187 -1 }21188 -1 return res;21189 -1 }, []);-1 39723 var mapElName = mapEl.getAttribute('name'); -1 39724 if (!mapElName) { -1 39725 return false; 21190 39726 }21191 -1 function select(selector, context) {21192 -1 var result = [];21193 -1 var candidate;21194 -1 if (axe._selectCache) {21195 -1 for (var j = 0, l = axe._selectCache.length; j < l; j++) {21196 -1 var item = axe._selectCache[j];21197 -1 if (item.selector === selector) {21198 -1 return item.result;21199 -1 }21200 -1 }21201 -1 }21202 -1 var curried = function(context) {21203 -1 return function(node) {21204 -1 return Object(_is_node_in_context__WEBPACK_IMPORTED_MODULE_2__['default'])(node, context);21205 -1 };21206 -1 }(context);21207 -1 var reducedIncludes = reduceIncludes(context.include);21208 -1 for (var i = 0; i < reducedIncludes.length; i++) {21209 -1 candidate = reducedIncludes[i];21210 -1 result = pushNode(result, Object(_query_selector_all_filter__WEBPACK_IMPORTED_MODULE_1__['default'])(candidate, selector, curried));21211 -1 }21212 -1 if (axe._selectCache) {21213 -1 axe._selectCache.push({21214 -1 selector: selector,21215 -1 result: result21216 -1 });21217 -1 }21218 -1 return result;-1 39727 var mapElRootNode = get_root_node_default2(el); -1 39728 if (!mapElRootNode || mapElRootNode.nodeType !== 9) { -1 39729 return false; 21219 39730 }21220 -1 __webpack_exports__['default'] = select;21221 -1 },21222 -1 './lib/core/utils/send-command-to-frame.js': function libCoreUtilsSendCommandToFrameJs(module, __webpack_exports__, __webpack_require__) {21223 -1 'use strict';21224 -1 __webpack_require__.r(__webpack_exports__);21225 -1 var _get_selector__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/get-selector.js');21226 -1 var _respondable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/respondable.js');21227 -1 var _log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/log.js');21228 -1 function err(message, node) {21229 -1 var selector;21230 -1 if (axe._tree) {21231 -1 selector = Object(_get_selector__WEBPACK_IMPORTED_MODULE_0__['default'])(node);21232 -1 }21233 -1 return new Error(message + ': ' + (selector || node));21234 -1 }21235 -1 function sendCommandToFrame(node, parameters, resolve, reject) {21236 -1 var win = node.contentWindow;21237 -1 if (!win) {21238 -1 Object(_log__WEBPACK_IMPORTED_MODULE_2__['default'])('Frame does not have a content window', node);21239 -1 resolve(null);21240 -1 return;21241 -1 }21242 -1 var timeout = setTimeout(function() {21243 -1 timeout = setTimeout(function() {21244 -1 if (!parameters.debug) {21245 -1 resolve(null);21246 -1 } else {21247 -1 reject(err('No response from frame', node));21248 -1 }21249 -1 }, 0);21250 -1 }, 500);21251 -1 Object(_respondable__WEBPACK_IMPORTED_MODULE_1__['default'])(win, 'axe.ping', null, undefined, function() {21252 -1 clearTimeout(timeout);21253 -1 var frameWaitTime = parameters.options && parameters.options.frameWaitTime || 6e4;21254 -1 timeout = setTimeout(function collectResultFramesTimeout() {21255 -1 reject(err('Axe in frame timed out', node));21256 -1 }, frameWaitTime);21257 -1 Object(_respondable__WEBPACK_IMPORTED_MODULE_1__['default'])(win, 'axe.start', parameters, undefined, function(data) {21258 -1 clearTimeout(timeout);21259 -1 if (data instanceof Error === false) {21260 -1 resolve(data);21261 -1 } else {21262 -1 reject(data);21263 -1 }21264 -1 });21265 -1 });-1 39731 var refs = query_selector_all_default(axe._tree, 'img[usemap="#'.concat(escape_selector_default(mapElName), '"]')); -1 39732 if (!refs || !refs.length) { -1 39733 return false; 21266 39734 }21267 -1 __webpack_exports__['default'] = sendCommandToFrame;21268 -1 },21269 -1 './lib/core/utils/set-scroll-state.js': function libCoreUtilsSetScrollStateJs(module, __webpack_exports__, __webpack_require__) {21270 -1 'use strict';21271 -1 __webpack_require__.r(__webpack_exports__);21272 -1 __webpack_require__.d(__webpack_exports__, 'setScrollState', function() {21273 -1 return setScrollState;-1 39735 return refs.some(function(_ref7) { -1 39736 var actualNode = _ref7.actualNode; -1 39737 return isVisible(actualNode, screenReader, recursed); 21274 39738 });21275 -1 function setScroll(elm, top, left) {21276 -1 if (elm === window) {21277 -1 return elm.scroll(left, top);21278 -1 } else {21279 -1 elm.scrollTop = top;21280 -1 elm.scrollLeft = left;21281 -1 }21282 -1 }21283 -1 function setScrollState(scrollState) {21284 -1 scrollState.forEach(function(_ref63) {21285 -1 var elm = _ref63.elm, top = _ref63.top, left = _ref63.left;21286 -1 return setScroll(elm, top, left);21287 -1 });-1 39739 } -1 39740 function isVisible(el, screenReader, recursed) { -1 39741 if (!el) { -1 39742 throw new TypeError('Cannot determine if element is visible for non-DOM nodes'); 21288 39743 }21289 -1 __webpack_exports__['default'] = setScrollState;21290 -1 },21291 -1 './lib/core/utils/to-array.js': function libCoreUtilsToArrayJs(module, __webpack_exports__, __webpack_require__) {21292 -1 'use strict';21293 -1 __webpack_require__.r(__webpack_exports__);21294 -1 function toArray(thing) {21295 -1 return Array.prototype.slice.call(thing);-1 39744 var vNode = get_node_from_tree_default(el); -1 39745 var cacheName = '_isVisible' + (screenReader ? 'ScreenReader' : ''); -1 39746 if (el.nodeType === 9) { -1 39747 return true; 21296 39748 }21297 -1 __webpack_exports__['default'] = toArray;21298 -1 },21299 -1 './lib/core/utils/token-list.js': function libCoreUtilsTokenListJs(module, __webpack_exports__, __webpack_require__) {21300 -1 'use strict';21301 -1 __webpack_require__.r(__webpack_exports__);21302 -1 function tokenList(str) {21303 -1 return str.trim().replace(/\s{2,}/g, ' ').split(' ');-1 39749 if (el.nodeType === 11) { -1 39750 el = el.host; 21304 39751 }21305 -1 __webpack_exports__['default'] = tokenList;21306 -1 },21307 -1 './lib/core/utils/unique-array.js': function libCoreUtilsUniqueArrayJs(module, __webpack_exports__, __webpack_require__) {21308 -1 'use strict';21309 -1 __webpack_require__.r(__webpack_exports__);21310 -1 function uniqueArray(arr1, arr2) {21311 -1 return arr1.concat(arr2).filter(function(elem, pos, arr) {21312 -1 return arr.indexOf(elem) === pos;21313 -1 });-1 39752 if (vNode && typeof vNode[cacheName] !== 'undefined') { -1 39753 return vNode[cacheName]; 21314 39754 }21315 -1 __webpack_exports__['default'] = uniqueArray;21316 -1 },21317 -1 './lib/core/utils/uuid.js': function libCoreUtilsUuidJs(module, __webpack_exports__, __webpack_require__) {21318 -1 'use strict';21319 -1 __webpack_require__.r(__webpack_exports__);21320 -1 __webpack_require__.d(__webpack_exports__, 'v1', function() {21321 -1 return v1;21322 -1 });21323 -1 __webpack_require__.d(__webpack_exports__, 'v4', function() {21324 -1 return v4;21325 -1 });21326 -1 __webpack_require__.d(__webpack_exports__, 'parse', function() {21327 -1 return parse;21328 -1 });21329 -1 __webpack_require__.d(__webpack_exports__, 'unparse', function() {21330 -1 return unparse;21331 -1 });21332 -1 __webpack_require__.d(__webpack_exports__, 'BufferClass', function() {21333 -1 return BufferClass;21334 -1 });21335 -1 var uuid;21336 -1 var _rng;21337 -1 var _crypto = window.crypto || window.msCrypto;21338 -1 if (!_rng && _crypto && _crypto.getRandomValues) {21339 -1 var _rnds8 = new Uint8Array(16);21340 -1 _rng = function whatwgRNG() {21341 -1 _crypto.getRandomValues(_rnds8);21342 -1 return _rnds8;21343 -1 };-1 39755 var style = window.getComputedStyle(el, null); -1 39756 if (style === null) { -1 39757 return false; 21344 39758 }21345 -1 if (!_rng) {21346 -1 var _rnds = new Array(16);21347 -1 _rng = function _rng() {21348 -1 for (var i = 0, r; i < 16; i++) {21349 -1 if ((i & 3) === 0) {21350 -1 r = Math.random() * 4294967296;21351 -1 }21352 -1 _rnds[i] = r >>> ((i & 3) << 3) & 255;21353 -1 }21354 -1 return _rnds;21355 -1 };-1 39759 var nodeName2 = el.nodeName.toUpperCase(); -1 39760 if (nodeName2 === 'AREA') { -1 39761 return isAreaVisible(el, screenReader, recursed); 21356 39762 }21357 -1 var BufferClass = typeof window.Buffer == 'function' ? window.Buffer : Array;21358 -1 var _byteToHex = [];21359 -1 var _hexToByte = {};21360 -1 for (var i = 0; i < 256; i++) {21361 -1 _byteToHex[i] = (i + 256).toString(16).substr(1);21362 -1 _hexToByte[_byteToHex[i]] = i;-1 39763 if (style.getPropertyValue('display') === 'none' || [ 'STYLE', 'SCRIPT', 'NOSCRIPT', 'TEMPLATE' ].includes(nodeName2)) { -1 39764 return false; 21363 39765 }21364 -1 function parse(s, buf, offset) {21365 -1 var i = buf && offset || 0, ii = 0;21366 -1 buf = buf || [];21367 -1 s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) {21368 -1 if (ii < 16) {21369 -1 buf[i + ii++] = _hexToByte[oct];21370 -1 }21371 -1 });21372 -1 while (ii < 16) {21373 -1 buf[i + ii++] = 0;21374 -1 }21375 -1 return buf;21376 -1 }21377 -1 function unparse(buf, offset) {21378 -1 var i = offset || 0, bth = _byteToHex;21379 -1 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++]];21380 -1 }21381 -1 var _seedBytes = _rng();21382 -1 var _nodeId = [ _seedBytes[0] | 1, _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] ];21383 -1 var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 16383;21384 -1 var _lastMSecs = 0, _lastNSecs = 0;21385 -1 function v1(options, buf, offset) {21386 -1 var i = buf && offset || 0;21387 -1 var b = buf || [];21388 -1 options = options || {};21389 -1 var clockseq = options.clockseq != null ? options.clockseq : _clockseq;21390 -1 var msecs = options.msecs != null ? options.msecs : new Date().getTime();21391 -1 var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1;21392 -1 var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;21393 -1 if (dt < 0 && options.clockseq == null) {21394 -1 clockseq = clockseq + 1 & 16383;21395 -1 }21396 -1 if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) {21397 -1 nsecs = 0;21398 -1 }21399 -1 if (nsecs >= 1e4) {21400 -1 throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');21401 -1 }21402 -1 _lastMSecs = msecs;21403 -1 _lastNSecs = nsecs;21404 -1 _clockseq = clockseq;21405 -1 msecs += 122192928e5;21406 -1 var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;21407 -1 b[i++] = tl >>> 24 & 255;21408 -1 b[i++] = tl >>> 16 & 255;21409 -1 b[i++] = tl >>> 8 & 255;21410 -1 b[i++] = tl & 255;21411 -1 var tmh = msecs / 4294967296 * 1e4 & 268435455;21412 -1 b[i++] = tmh >>> 8 & 255;21413 -1 b[i++] = tmh & 255;21414 -1 b[i++] = tmh >>> 24 & 15 | 16;21415 -1 b[i++] = tmh >>> 16 & 255;21416 -1 b[i++] = clockseq >>> 8 | 128;21417 -1 b[i++] = clockseq & 255;21418 -1 var node = options.node || _nodeId;21419 -1 for (var n = 0; n < 6; n++) {21420 -1 b[i + n] = node[n];21421 -1 }21422 -1 return buf ? buf : unparse(b);21423 -1 }21424 -1 function v4(options, buf, offset) {21425 -1 var i = buf && offset || 0;21426 -1 if (typeof options == 'string') {21427 -1 buf = options == 'binary' ? new BufferClass(16) : null;21428 -1 options = null;21429 -1 }21430 -1 options = options || {};21431 -1 var rnds = options.random || (options.rng || _rng)();21432 -1 rnds[6] = rnds[6] & 15 | 64;21433 -1 rnds[8] = rnds[8] & 63 | 128;21434 -1 if (buf) {21435 -1 for (var ii = 0; ii < 16; ii++) {21436 -1 buf[i + ii] = rnds[ii];21437 -1 }21438 -1 }21439 -1 return buf || unparse(rnds);21440 -1 }21441 -1 uuid = v4;21442 -1 uuid.v1 = v1;21443 -1 uuid.v4 = v4;21444 -1 uuid.parse = parse;21445 -1 uuid.unparse = unparse;21446 -1 uuid.BufferClass = BufferClass;21447 -1 axe._uuid = v1();21448 -1 __webpack_exports__['default'] = v4;21449 -1 },21450 -1 './lib/core/utils/valid-input-type.js': function libCoreUtilsValidInputTypeJs(module, __webpack_exports__, __webpack_require__) {21451 -1 'use strict';21452 -1 __webpack_require__.r(__webpack_exports__);21453 -1 function validInputTypes() {21454 -1 return [ 'hidden', 'text', 'search', 'tel', 'url', 'email', 'password', 'date', 'month', 'week', 'time', 'datetime-local', 'number', 'range', 'color', 'checkbox', 'radio', 'file', 'submit', 'image', 'reset', 'button' ];-1 39766 if (screenReader && el.getAttribute('aria-hidden') === 'true') { -1 39767 return false; 21455 39768 }21456 -1 __webpack_exports__['default'] = validInputTypes;21457 -1 },21458 -1 './lib/core/utils/valid-langs.js': function libCoreUtilsValidLangsJs(module, __webpack_exports__, __webpack_require__) {21459 -1 'use strict';21460 -1 __webpack_require__.r(__webpack_exports__);21461 -1 var langs = [ 'aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av', 'ay', 'az', 'ba', 'be', 'bg', 'bh', 'bi', 'bm', 'bn', 'bo', 'br', 'bs', 'ca', 'ce', 'ch', 'co', 'cr', 'cs', 'cu', 'cv', 'cy', 'da', 'de', 'dv', 'dz', 'ee', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'ff', 'fi', 'fj', 'fo', 'fr', 'fy', 'ga', 'gd', 'gl', 'gn', 'gu', 'gv', 'ha', 'he', 'hi', 'ho', 'hr', 'ht', 'hu', 'hy', 'hz', 'ia', 'id', 'ie', 'ig', 'ii', 'ik', 'in', 'io', 'is', 'it', 'iu', 'iw', 'ja', 'ji', 'jv', 'jw', 'ka', 'kg', 'ki', 'kj', 'kk', 'kl', 'km', 'kn', 'ko', 'kr', 'ks', 'ku', 'kv', 'kw', 'ky', 'la', 'lb', 'lg', 'li', 'ln', 'lo', 'lt', 'lu', 'lv', 'mg', 'mh', 'mi', 'mk', 'ml', 'mn', 'mo', 'mr', 'ms', 'mt', 'my', 'na', 'nb', 'nd', 'ne', 'ng', 'nl', 'nn', 'no', 'nr', 'nv', 'ny', 'oc', 'oj', 'om', 'or', 'os', 'pa', 'pi', 'pl', 'ps', 'pt', 'qu', 'rm', 'rn', 'ro', 'ru', 'rw', 'sa', 'sc', 'sd', 'se', 'sg', 'sh', 'si', 'sk', 'sl', 'sm', 'sn', 'so', 'sq', 'sr', 'ss', 'st', 'su', 'sv', 'sw', 'ta', 'te', 'tg', 'th', 'ti', 'tk', 'tl', 'tn', 'to', 'tr', 'ts', 'tt', 'tw', 'ty', 'ug', 'uk', 'ur', 'uz', 've', 'vi', 'vo', 'wa', 'wo', 'xh', 'yi', 'yo', 'za', 'zh', 'zu', 'aaa', 'aab', 'aac', 'aad', 'aae', 'aaf', 'aag', 'aah', 'aai', 'aak', 'aal', 'aam', 'aan', 'aao', 'aap', 'aaq', 'aas', 'aat', 'aau', 'aav', 'aaw', 'aax', 'aaz', 'aba', 'abb', 'abc', 'abd', 'abe', 'abf', 'abg', 'abh', 'abi', 'abj', 'abl', 'abm', 'abn', 'abo', 'abp', 'abq', 'abr', 'abs', 'abt', 'abu', 'abv', 'abw', 'abx', 'aby', 'abz', 'aca', 'acb', 'acd', 'ace', 'acf', 'ach', 'aci', 'ack', 'acl', 'acm', 'acn', 'acp', 'acq', 'acr', 'acs', 'act', 'acu', 'acv', 'acw', 'acx', 'acy', 'acz', 'ada', 'adb', 'add', 'ade', 'adf', 'adg', 'adh', 'adi', 'adj', 'adl', 'adn', 'ado', 'adp', 'adq', 'adr', 'ads', 'adt', 'adu', 'adw', 'adx', 'ady', 'adz', 'aea', 'aeb', 'aec', 'aed', 'aee', 'aek', 'ael', 'aem', 'aen', 'aeq', 'aer', 'aes', 'aeu', 'aew', 'aey', 'aez', 'afa', 'afb', 'afd', 'afe', 'afg', 'afh', 'afi', 'afk', 'afn', 'afo', 'afp', 'afs', 'aft', 'afu', 'afz', 'aga', 'agb', 'agc', 'agd', 'age', 'agf', 'agg', 'agh', 'agi', 'agj', 'agk', 'agl', 'agm', 'agn', 'ago', 'agp', 'agq', 'agr', 'ags', 'agt', 'agu', 'agv', 'agw', 'agx', 'agy', 'agz', 'aha', 'ahb', 'ahg', 'ahh', 'ahi', 'ahk', 'ahl', 'ahm', 'ahn', 'aho', 'ahp', 'ahr', 'ahs', 'aht', 'aia', 'aib', 'aic', 'aid', 'aie', 'aif', 'aig', 'aih', 'aii', 'aij', 'aik', 'ail', 'aim', 'ain', 'aio', 'aip', 'aiq', 'air', 'ais', 'ait', 'aiw', 'aix', 'aiy', 'aja', 'ajg', 'aji', 'ajn', 'ajp', 'ajt', 'aju', 'ajw', 'ajz', 'akb', 'akc', 'akd', 'ake', 'akf', 'akg', 'akh', 'aki', 'akj', 'akk', 'akl', 'akm', 'ako', 'akp', 'akq', 'akr', 'aks', 'akt', 'aku', 'akv', 'akw', 'akx', 'aky', 'akz', 'ala', 'alc', 'ald', 'ale', 'alf', 'alg', 'alh', 'ali', 'alj', 'alk', 'all', 'alm', 'aln', 'alo', 'alp', 'alq', 'alr', 'als', 'alt', 'alu', 'alv', 'alw', 'alx', 'aly', 'alz', 'ama', 'amb', 'amc', 'ame', 'amf', 'amg', 'ami', 'amj', 'amk', 'aml', 'amm', 'amn', 'amo', 'amp', 'amq', 'amr', 'ams', 'amt', 'amu', 'amv', 'amw', 'amx', 'amy', 'amz', 'ana', 'anb', 'anc', 'and', 'ane', 'anf', 'ang', 'anh', 'ani', 'anj', 'ank', 'anl', 'anm', 'ann', 'ano', 'anp', 'anq', 'anr', 'ans', 'ant', 'anu', 'anv', 'anw', 'anx', 'any', 'anz', 'aoa', 'aob', 'aoc', 'aod', 'aoe', 'aof', 'aog', 'aoh', 'aoi', 'aoj', 'aok', 'aol', 'aom', 'aon', 'aor', 'aos', 'aot', 'aou', 'aox', 'aoz', 'apa', 'apb', 'apc', 'apd', 'ape', 'apf', 'apg', 'aph', 'api', 'apj', 'apk', 'apl', 'apm', 'apn', 'apo', 'app', 'apq', 'apr', 'aps', 'apt', 'apu', 'apv', 'apw', 'apx', 'apy', 'apz', 'aqa', 'aqc', 'aqd', 'aqg', 'aql', 'aqm', 'aqn', 'aqp', 'aqr', 'aqt', 'aqz', 'arb', 'arc', 'ard', 'are', 'arh', 'ari', 'arj', 'ark', 'arl', 'arn', 'aro', 'arp', 'arq', 'arr', 'ars', 'art', 'aru', 'arv', 'arw', 'arx', 'ary', 'arz', 'asa', 'asb', 'asc', 'asd', 'ase', 'asf', 'asg', 'ash', 'asi', 'asj', 'ask', 'asl', 'asn', 'aso', 'asp', 'asq', 'asr', 'ass', 'ast', 'asu', 'asv', 'asw', 'asx', 'asy', 'asz', 'ata', 'atb', 'atc', 'atd', 'ate', 'atg', 'ath', 'ati', 'atj', 'atk', 'atl', 'atm', 'atn', 'ato', 'atp', 'atq', 'atr', 'ats', 'att', 'atu', 'atv', 'atw', 'atx', 'aty', 'atz', 'aua', 'aub', 'auc', 'aud', 'aue', 'auf', 'aug', 'auh', 'aui', 'auj', 'auk', 'aul', 'aum', 'aun', 'auo', 'aup', 'auq', 'aur', 'aus', 'aut', 'auu', 'auw', 'aux', 'auy', 'auz', 'avb', 'avd', 'avi', 'avk', 'avl', 'avm', 'avn', 'avo', 'avs', 'avt', 'avu', 'avv', 'awa', 'awb', 'awc', 'awd', 'awe', 'awg', 'awh', 'awi', 'awk', 'awm', 'awn', 'awo', 'awr', 'aws', 'awt', 'awu', 'awv', 'aww', 'awx', 'awy', 'axb', 'axe', 'axg', 'axk', 'axl', 'axm', 'axx', 'aya', 'ayb', 'ayc', 'ayd', 'aye', 'ayg', 'ayh', 'ayi', 'ayk', 'ayl', 'ayn', 'ayo', 'ayp', 'ayq', 'ayr', 'ays', 'ayt', 'ayu', 'ayx', 'ayy', 'ayz', 'aza', 'azb', 'azc', 'azd', 'azg', 'azj', 'azm', 'azn', 'azo', 'azt', 'azz', 'baa', 'bab', 'bac', 'bad', 'bae', 'baf', 'bag', 'bah', 'bai', 'baj', 'bal', 'ban', 'bao', 'bap', 'bar', 'bas', 'bat', 'bau', 'bav', 'baw', 'bax', 'bay', 'baz', 'bba', 'bbb', 'bbc', 'bbd', 'bbe', 'bbf', 'bbg', 'bbh', 'bbi', 'bbj', 'bbk', 'bbl', 'bbm', 'bbn', 'bbo', 'bbp', 'bbq', 'bbr', 'bbs', 'bbt', 'bbu', 'bbv', 'bbw', 'bbx', 'bby', 'bbz', 'bca', 'bcb', 'bcc', 'bcd', 'bce', 'bcf', 'bcg', 'bch', 'bci', 'bcj', 'bck', 'bcl', 'bcm', 'bcn', 'bco', 'bcp', 'bcq', 'bcr', 'bcs', 'bct', 'bcu', 'bcv', 'bcw', 'bcy', 'bcz', 'bda', 'bdb', 'bdc', 'bdd', 'bde', 'bdf', 'bdg', 'bdh', 'bdi', 'bdj', 'bdk', 'bdl', 'bdm', 'bdn', 'bdo', 'bdp', 'bdq', 'bdr', 'bds', 'bdt', 'bdu', 'bdv', 'bdw', 'bdx', 'bdy', 'bdz', 'bea', 'beb', 'bec', 'bed', 'bee', 'bef', 'beg', 'beh', 'bei', 'bej', 'bek', 'bem', 'beo', 'bep', 'beq', 'ber', 'bes', 'bet', 'beu', 'bev', 'bew', 'bex', 'bey', 'bez', 'bfa', 'bfb', 'bfc', 'bfd', 'bfe', 'bff', 'bfg', 'bfh', 'bfi', 'bfj', 'bfk', 'bfl', 'bfm', 'bfn', 'bfo', 'bfp', 'bfq', 'bfr', 'bfs', 'bft', 'bfu', 'bfw', 'bfx', 'bfy', 'bfz', 'bga', 'bgb', 'bgc', 'bgd', 'bge', 'bgf', 'bgg', 'bgi', 'bgj', 'bgk', 'bgl', 'bgm', 'bgn', 'bgo', 'bgp', 'bgq', 'bgr', 'bgs', 'bgt', 'bgu', 'bgv', 'bgw', 'bgx', 'bgy', 'bgz', 'bha', 'bhb', 'bhc', 'bhd', 'bhe', 'bhf', 'bhg', 'bhh', 'bhi', 'bhj', 'bhk', 'bhl', 'bhm', 'bhn', 'bho', 'bhp', 'bhq', 'bhr', 'bhs', 'bht', 'bhu', 'bhv', 'bhw', 'bhx', 'bhy', 'bhz', 'bia', 'bib', 'bic', 'bid', 'bie', 'bif', 'big', 'bij', 'bik', 'bil', 'bim', 'bin', 'bio', 'bip', 'biq', 'bir', 'bit', 'biu', 'biv', 'biw', 'bix', 'biy', 'biz', 'bja', 'bjb', 'bjc', 'bjd', 'bje', 'bjf', 'bjg', 'bjh', 'bji', 'bjj', 'bjk', 'bjl', 'bjm', 'bjn', 'bjo', 'bjp', 'bjq', 'bjr', 'bjs', 'bjt', 'bju', 'bjv', 'bjw', 'bjx', 'bjy', 'bjz', 'bka', 'bkb', 'bkc', 'bkd', 'bkf', 'bkg', 'bkh', 'bki', 'bkj', 'bkk', 'bkl', 'bkm', 'bkn', 'bko', 'bkp', 'bkq', 'bkr', 'bks', 'bkt', 'bku', 'bkv', 'bkw', 'bkx', 'bky', 'bkz', 'bla', 'blb', 'blc', 'bld', 'ble', 'blf', 'blg', 'blh', 'bli', 'blj', 'blk', 'bll', 'blm', 'bln', 'blo', 'blp', 'blq', 'blr', 'bls', 'blt', 'blv', 'blw', 'blx', 'bly', 'blz', 'bma', 'bmb', 'bmc', 'bmd', 'bme', 'bmf', 'bmg', 'bmh', 'bmi', 'bmj', 'bmk', 'bml', 'bmm', 'bmn', 'bmo', 'bmp', 'bmq', 'bmr', 'bms', 'bmt', 'bmu', 'bmv', 'bmw', 'bmx', 'bmy', 'bmz', 'bna', 'bnb', 'bnc', 'bnd', 'bne', 'bnf', 'bng', 'bni', 'bnj', 'bnk', 'bnl', 'bnm', 'bnn', 'bno', 'bnp', 'bnq', 'bnr', 'bns', 'bnt', 'bnu', 'bnv', 'bnw', 'bnx', 'bny', 'bnz', 'boa', 'bob', 'boe', 'bof', 'bog', 'boh', 'boi', 'boj', 'bok', 'bol', 'bom', 'bon', 'boo', 'bop', 'boq', 'bor', 'bot', 'bou', 'bov', 'bow', 'box', 'boy', 'boz', 'bpa', 'bpb', 'bpd', 'bpg', 'bph', 'bpi', 'bpj', 'bpk', 'bpl', 'bpm', 'bpn', 'bpo', 'bpp', 'bpq', 'bpr', 'bps', 'bpt', 'bpu', 'bpv', 'bpw', 'bpx', 'bpy', 'bpz', 'bqa', 'bqb', 'bqc', 'bqd', 'bqf', 'bqg', 'bqh', 'bqi', 'bqj', 'bqk', 'bql', 'bqm', 'bqn', 'bqo', 'bqp', 'bqq', 'bqr', 'bqs', 'bqt', 'bqu', 'bqv', 'bqw', 'bqx', 'bqy', 'bqz', 'bra', 'brb', 'brc', 'brd', 'brf', 'brg', 'brh', 'bri', 'brj', 'brk', 'brl', 'brm', 'brn', 'bro', 'brp', 'brq', 'brr', 'brs', 'brt', 'bru', 'brv', 'brw', 'brx', 'bry', 'brz', 'bsa', 'bsb', 'bsc', 'bse', 'bsf', 'bsg', 'bsh', 'bsi', 'bsj', 'bsk', 'bsl', 'bsm', 'bsn', 'bso', 'bsp', 'bsq', 'bsr', 'bss', 'bst', 'bsu', 'bsv', 'bsw', 'bsx', 'bsy', 'bta', 'btb', 'btc', 'btd', 'bte', 'btf', 'btg', 'bth', 'bti', 'btj', 'btk', 'btl', 'btm', 'btn', 'bto', 'btp', 'btq', 'btr', 'bts', 'btt', 'btu', 'btv', 'btw', 'btx', 'bty', 'btz', 'bua', 'bub', 'buc', 'bud', 'bue', 'buf', 'bug', 'buh', 'bui', 'buj', 'buk', 'bum', 'bun', 'buo', 'bup', 'buq', 'bus', 'but', 'buu', 'buv', 'buw', 'bux', 'buy', 'buz', 'bva', 'bvb', 'bvc', 'bvd', 'bve', 'bvf', 'bvg', 'bvh', 'bvi', 'bvj', 'bvk', 'bvl', 'bvm', 'bvn', 'bvo', 'bvp', 'bvq', 'bvr', 'bvt', 'bvu', 'bvv', 'bvw', 'bvx', 'bvy', 'bvz', 'bwa', 'bwb', 'bwc', 'bwd', 'bwe', 'bwf', 'bwg', 'bwh', 'bwi', 'bwj', 'bwk', 'bwl', 'bwm', 'bwn', 'bwo', 'bwp', 'bwq', 'bwr', 'bws', 'bwt', 'bwu', 'bww', 'bwx', 'bwy', 'bwz', 'bxa', 'bxb', 'bxc', 'bxd', 'bxe', 'bxf', 'bxg', 'bxh', 'bxi', 'bxj', 'bxk', 'bxl', 'bxm', 'bxn', 'bxo', 'bxp', 'bxq', 'bxr', 'bxs', 'bxu', 'bxv', 'bxw', 'bxx', 'bxz', 'bya', 'byb', 'byc', 'byd', 'bye', 'byf', 'byg', 'byh', 'byi', 'byj', 'byk', 'byl', 'bym', 'byn', 'byo', 'byp', 'byq', 'byr', 'bys', 'byt', 'byv', 'byw', 'byx', 'byy', 'byz', 'bza', 'bzb', 'bzc', 'bzd', 'bze', 'bzf', 'bzg', 'bzh', 'bzi', 'bzj', 'bzk', 'bzl', 'bzm', 'bzn', 'bzo', 'bzp', 'bzq', 'bzr', 'bzs', 'bzt', 'bzu', 'bzv', 'bzw', 'bzx', 'bzy', 'bzz', 'caa', 'cab', 'cac', 'cad', 'cae', 'caf', 'cag', 'cah', 'cai', 'caj', 'cak', 'cal', 'cam', 'can', 'cao', 'cap', 'caq', 'car', 'cas', 'cau', 'cav', 'caw', 'cax', 'cay', 'caz', 'cba', 'cbb', 'cbc', 'cbd', 'cbe', 'cbg', 'cbh', 'cbi', 'cbj', 'cbk', 'cbl', 'cbn', 'cbo', 'cbq', 'cbr', 'cbs', 'cbt', 'cbu', 'cbv', 'cbw', 'cby', 'cca', 'ccc', 'ccd', 'cce', 'ccg', 'cch', 'ccj', 'ccl', 'ccm', 'ccn', 'cco', 'ccp', 'ccq', 'ccr', 'ccs', 'cda', 'cdc', 'cdd', 'cde', 'cdf', 'cdg', 'cdh', 'cdi', 'cdj', 'cdm', 'cdn', 'cdo', 'cdr', 'cds', 'cdy', 'cdz', 'cea', 'ceb', 'ceg', 'cek', 'cel', 'cen', 'cet', 'cfa', 'cfd', 'cfg', 'cfm', 'cga', 'cgc', 'cgg', 'cgk', 'chb', 'chc', 'chd', 'chf', 'chg', 'chh', 'chj', 'chk', 'chl', 'chm', 'chn', 'cho', 'chp', 'chq', 'chr', 'cht', 'chw', 'chx', 'chy', 'chz', 'cia', 'cib', 'cic', 'cid', 'cie', 'cih', 'cik', 'cim', 'cin', 'cip', 'cir', 'ciw', 'ciy', 'cja', 'cje', 'cjh', 'cji', 'cjk', 'cjm', 'cjn', 'cjo', 'cjp', 'cjr', 'cjs', 'cjv', 'cjy', 'cka', 'ckb', 'ckh', 'ckl', 'ckn', 'cko', 'ckq', 'ckr', 'cks', 'ckt', 'cku', 'ckv', 'ckx', 'cky', 'ckz', 'cla', 'clc', 'cld', 'cle', 'clh', 'cli', 'clj', 'clk', 'cll', 'clm', 'clo', 'clt', 'clu', 'clw', 'cly', 'cma', 'cmc', 'cme', 'cmg', 'cmi', 'cmk', 'cml', 'cmm', 'cmn', 'cmo', 'cmr', 'cms', 'cmt', 'cna', 'cnb', 'cnc', 'cng', 'cnh', 'cni', 'cnk', 'cnl', 'cno', 'cnr', 'cns', 'cnt', 'cnu', 'cnw', 'cnx', 'coa', 'cob', 'coc', 'cod', 'coe', 'cof', 'cog', 'coh', 'coj', 'cok', 'col', 'com', 'con', 'coo', 'cop', 'coq', 'cot', 'cou', 'cov', 'cow', 'cox', 'coy', 'coz', 'cpa', 'cpb', 'cpc', 'cpe', 'cpf', 'cpg', 'cpi', 'cpn', 'cpo', 'cpp', 'cps', 'cpu', 'cpx', 'cpy', 'cqd', 'cqu', 'cra', 'crb', 'crc', 'crd', 'crf', 'crg', 'crh', 'cri', 'crj', 'crk', 'crl', 'crm', 'crn', 'cro', 'crp', 'crq', 'crr', 'crs', 'crt', 'crv', 'crw', 'crx', 'cry', 'crz', 'csa', 'csb', 'csc', 'csd', 'cse', 'csf', 'csg', 'csh', 'csi', 'csj', 'csk', 'csl', 'csm', 'csn', 'cso', 'csq', 'csr', 'css', 'cst', 'csu', 'csv', 'csw', 'csy', 'csz', 'cta', 'ctc', 'ctd', 'cte', 'ctg', 'cth', 'ctl', 'ctm', 'ctn', 'cto', 'ctp', 'cts', 'ctt', 'ctu', 'ctz', 'cua', 'cub', 'cuc', 'cug', 'cuh', 'cui', 'cuj', 'cuk', 'cul', 'cum', 'cuo', 'cup', 'cuq', 'cur', 'cus', 'cut', 'cuu', 'cuv', 'cuw', 'cux', 'cuy', 'cvg', 'cvn', 'cwa', 'cwb', 'cwd', 'cwe', 'cwg', 'cwt', 'cya', 'cyb', 'cyo', 'czh', 'czk', 'czn', 'czo', 'czt', 'daa', 'dac', 'dad', 'dae', 'daf', 'dag', 'dah', 'dai', 'daj', 'dak', 'dal', 'dam', 'dao', 'dap', 'daq', 'dar', 'das', 'dau', 'dav', 'daw', 'dax', 'day', 'daz', 'dba', 'dbb', 'dbd', 'dbe', 'dbf', 'dbg', 'dbi', 'dbj', 'dbl', 'dbm', 'dbn', 'dbo', 'dbp', 'dbq', 'dbr', 'dbt', 'dbu', 'dbv', 'dbw', 'dby', 'dcc', 'dcr', 'dda', 'ddd', 'dde', 'ddg', 'ddi', 'ddj', 'ddn', 'ddo', 'ddr', 'dds', 'ddw', 'dec', 'ded', 'dee', 'def', 'deg', 'deh', 'dei', 'dek', 'del', 'dem', 'den', 'dep', 'deq', 'der', 'des', 'dev', 'dez', 'dga', 'dgb', 'dgc', 'dgd', 'dge', 'dgg', 'dgh', 'dgi', 'dgk', 'dgl', 'dgn', 'dgo', 'dgr', 'dgs', 'dgt', 'dgu', 'dgw', 'dgx', 'dgz', 'dha', 'dhd', 'dhg', 'dhi', 'dhl', 'dhm', 'dhn', 'dho', 'dhr', 'dhs', 'dhu', 'dhv', 'dhw', 'dhx', 'dia', 'dib', 'dic', 'did', 'dif', 'dig', 'dih', 'dii', 'dij', 'dik', 'dil', 'dim', 'din', 'dio', 'dip', 'diq', 'dir', 'dis', 'dit', 'diu', 'diw', 'dix', 'diy', 'diz', 'dja', 'djb', 'djc', 'djd', 'dje', 'djf', 'dji', 'djj', 'djk', 'djl', 'djm', 'djn', 'djo', 'djr', 'dju', 'djw', 'dka', 'dkk', 'dkl', 'dkr', 'dks', 'dkx', 'dlg', 'dlk', 'dlm', 'dln', 'dma', 'dmb', 'dmc', 'dmd', 'dme', 'dmg', 'dmk', 'dml', 'dmm', 'dmn', 'dmo', 'dmr', 'dms', 'dmu', 'dmv', 'dmw', 'dmx', 'dmy', 'dna', 'dnd', 'dne', 'dng', 'dni', 'dnj', 'dnk', 'dnn', 'dnr', 'dnt', 'dnu', 'dnv', 'dnw', 'dny', 'doa', 'dob', 'doc', 'doe', 'dof', 'doh', 'doi', 'dok', 'dol', 'don', 'doo', 'dop', 'doq', 'dor', 'dos', 'dot', 'dov', 'dow', 'dox', 'doy', 'doz', 'dpp', 'dra', 'drb', 'drc', 'drd', 'dre', 'drg', 'drh', 'dri', 'drl', 'drn', 'dro', 'drq', 'drr', 'drs', 'drt', 'dru', 'drw', 'dry', 'dsb', 'dse', 'dsh', 'dsi', 'dsl', 'dsn', 'dso', 'dsq', 'dta', 'dtb', 'dtd', 'dth', 'dti', 'dtk', 'dtm', 'dtn', 'dto', 'dtp', 'dtr', 'dts', 'dtt', 'dtu', 'dty', 'dua', 'dub', 'duc', 'dud', 'due', 'duf', 'dug', 'duh', 'dui', 'duj', 'duk', 'dul', 'dum', 'dun', 'duo', 'dup', 'duq', 'dur', 'dus', 'duu', 'duv', 'duw', 'dux', 'duy', 'duz', 'dva', 'dwa', 'dwl', 'dwr', 'dws', 'dwu', 'dww', 'dwy', 'dya', 'dyb', 'dyd', 'dyg', 'dyi', 'dym', 'dyn', 'dyo', 'dyu', 'dyy', 'dza', 'dzd', 'dze', 'dzg', 'dzl', 'dzn', 'eaa', 'ebg', 'ebk', 'ebo', 'ebr', 'ebu', 'ecr', 'ecs', 'ecy', 'eee', 'efa', 'efe', 'efi', 'ega', 'egl', 'ego', 'egx', 'egy', 'ehu', 'eip', 'eit', 'eiv', 'eja', 'eka', 'ekc', 'eke', 'ekg', 'eki', 'ekk', 'ekl', 'ekm', 'eko', 'ekp', 'ekr', 'eky', 'ele', 'elh', 'eli', 'elk', 'elm', 'elo', 'elp', 'elu', 'elx', 'ema', 'emb', 'eme', 'emg', 'emi', 'emk', 'emm', 'emn', 'emo', 'emp', 'ems', 'emu', 'emw', 'emx', 'emy', 'ena', 'enb', 'enc', 'end', 'enf', 'enh', 'enl', 'enm', 'enn', 'eno', 'enq', 'enr', 'enu', 'env', 'enw', 'enx', 'eot', 'epi', 'era', 'erg', 'erh', 'eri', 'erk', 'ero', 'err', 'ers', 'ert', 'erw', 'ese', 'esg', 'esh', 'esi', 'esk', 'esl', 'esm', 'esn', 'eso', 'esq', 'ess', 'esu', 'esx', 'esy', 'etb', 'etc', 'eth', 'etn', 'eto', 'etr', 'ets', 'ett', 'etu', 'etx', 'etz', 'euq', 'eve', 'evh', 'evn', 'ewo', 'ext', 'eya', 'eyo', 'eza', 'eze', 'faa', 'fab', 'fad', 'faf', 'fag', 'fah', 'fai', 'faj', 'fak', 'fal', 'fam', 'fan', 'fap', 'far', 'fat', 'fau', 'fax', 'fay', 'faz', 'fbl', 'fcs', 'fer', 'ffi', 'ffm', 'fgr', 'fia', 'fie', 'fil', 'fip', 'fir', 'fit', 'fiu', 'fiw', 'fkk', 'fkv', 'fla', 'flh', 'fli', 'fll', 'fln', 'flr', 'fly', 'fmp', 'fmu', 'fnb', 'fng', 'fni', 'fod', 'foi', 'fom', 'fon', 'for', 'fos', 'fox', 'fpe', 'fqs', 'frc', 'frd', 'frk', 'frm', 'fro', 'frp', 'frq', 'frr', 'frs', 'frt', 'fse', 'fsl', 'fss', 'fub', 'fuc', 'fud', 'fue', 'fuf', 'fuh', 'fui', 'fuj', 'fum', 'fun', 'fuq', 'fur', 'fut', 'fuu', 'fuv', 'fuy', 'fvr', 'fwa', 'fwe', 'gaa', 'gab', 'gac', 'gad', 'gae', 'gaf', 'gag', 'gah', 'gai', 'gaj', 'gak', 'gal', 'gam', 'gan', 'gao', 'gap', 'gaq', 'gar', 'gas', 'gat', 'gau', 'gav', 'gaw', 'gax', 'gay', 'gaz', 'gba', 'gbb', 'gbc', 'gbd', 'gbe', 'gbf', 'gbg', 'gbh', 'gbi', 'gbj', 'gbk', 'gbl', 'gbm', 'gbn', 'gbo', 'gbp', 'gbq', 'gbr', 'gbs', 'gbu', 'gbv', 'gbw', 'gbx', 'gby', 'gbz', 'gcc', 'gcd', 'gce', 'gcf', 'gcl', 'gcn', 'gcr', 'gct', 'gda', 'gdb', 'gdc', 'gdd', 'gde', 'gdf', 'gdg', 'gdh', 'gdi', 'gdj', 'gdk', 'gdl', 'gdm', 'gdn', 'gdo', 'gdq', 'gdr', 'gds', 'gdt', 'gdu', 'gdx', 'gea', 'geb', 'gec', 'ged', 'geg', 'geh', 'gei', 'gej', 'gek', 'gel', 'gem', 'geq', 'ges', 'gev', 'gew', 'gex', 'gey', 'gez', 'gfk', 'gft', 'gfx', 'gga', 'ggb', 'ggd', 'gge', 'ggg', 'ggk', 'ggl', 'ggn', 'ggo', 'ggr', 'ggt', 'ggu', 'ggw', 'gha', 'ghc', 'ghe', 'ghh', 'ghk', 'ghl', 'ghn', 'gho', 'ghr', 'ghs', 'ght', 'gia', 'gib', 'gic', 'gid', 'gie', 'gig', 'gih', 'gil', 'gim', 'gin', 'gio', 'gip', 'giq', 'gir', 'gis', 'git', 'giu', 'giw', 'gix', 'giy', 'giz', 'gji', 'gjk', 'gjm', 'gjn', 'gjr', 'gju', 'gka', 'gkd', 'gke', 'gkn', 'gko', 'gkp', 'gku', 'glc', 'gld', 'glh', 'gli', 'glj', 'glk', 'gll', 'glo', 'glr', 'glu', 'glw', 'gly', 'gma', 'gmb', 'gmd', 'gme', 'gmg', 'gmh', 'gml', 'gmm', 'gmn', 'gmq', 'gmu', 'gmv', 'gmw', 'gmx', 'gmy', 'gmz', 'gna', 'gnb', 'gnc', 'gnd', 'gne', 'gng', 'gnh', 'gni', 'gnj', 'gnk', 'gnl', 'gnm', 'gnn', 'gno', 'gnq', 'gnr', 'gnt', 'gnu', 'gnw', 'gnz', 'goa', 'gob', 'goc', 'god', 'goe', 'gof', 'gog', 'goh', 'goi', 'goj', 'gok', 'gol', 'gom', 'gon', 'goo', 'gop', 'goq', 'gor', 'gos', 'got', 'gou', 'gow', 'gox', 'goy', 'goz', 'gpa', 'gpe', 'gpn', 'gqa', 'gqi', 'gqn', 'gqr', 'gqu', 'gra', 'grb', 'grc', 'grd', 'grg', 'grh', 'gri', 'grj', 'grk', 'grm', 'gro', 'grq', 'grr', 'grs', 'grt', 'gru', 'grv', 'grw', 'grx', 'gry', 'grz', 'gse', 'gsg', 'gsl', 'gsm', 'gsn', 'gso', 'gsp', 'gss', 'gsw', 'gta', 'gti', 'gtu', 'gua', 'gub', 'guc', 'gud', 'gue', 'guf', 'gug', 'guh', 'gui', 'guk', 'gul', 'gum', 'gun', 'guo', 'gup', 'guq', 'gur', 'gus', 'gut', 'guu', 'guv', 'guw', 'gux', 'guz', 'gva', 'gvc', 'gve', 'gvf', 'gvj', 'gvl', 'gvm', 'gvn', 'gvo', 'gvp', 'gvr', 'gvs', 'gvy', 'gwa', 'gwb', 'gwc', 'gwd', 'gwe', 'gwf', 'gwg', 'gwi', 'gwj', 'gwm', 'gwn', 'gwr', 'gwt', 'gwu', 'gww', 'gwx', 'gxx', 'gya', 'gyb', 'gyd', 'gye', 'gyf', 'gyg', 'gyi', 'gyl', 'gym', 'gyn', 'gyo', 'gyr', 'gyy', 'gza', 'gzi', 'gzn', 'haa', 'hab', 'hac', 'had', 'hae', 'haf', 'hag', 'hah', 'hai', 'haj', 'hak', 'hal', 'ham', 'han', 'hao', 'hap', 'haq', 'har', 'has', 'hav', 'haw', 'hax', 'hay', 'haz', 'hba', 'hbb', 'hbn', 'hbo', 'hbu', 'hca', 'hch', 'hdn', 'hds', 'hdy', 'hea', 'hed', 'heg', 'heh', 'hei', 'hem', 'hgm', 'hgw', 'hhi', 'hhr', 'hhy', 'hia', 'hib', 'hid', 'hif', 'hig', 'hih', 'hii', 'hij', 'hik', 'hil', 'him', 'hio', 'hir', 'hit', 'hiw', 'hix', 'hji', 'hka', 'hke', 'hkk', 'hkn', 'hks', 'hla', 'hlb', 'hld', 'hle', 'hlt', 'hlu', 'hma', 'hmb', 'hmc', 'hmd', 'hme', 'hmf', 'hmg', 'hmh', 'hmi', 'hmj', 'hmk', 'hml', 'hmm', 'hmn', 'hmp', 'hmq', 'hmr', 'hms', 'hmt', 'hmu', 'hmv', 'hmw', 'hmx', 'hmy', 'hmz', 'hna', 'hnd', 'hne', 'hnh', 'hni', 'hnj', 'hnn', 'hno', 'hns', 'hnu', 'hoa', 'hob', 'hoc', 'hod', 'hoe', 'hoh', 'hoi', 'hoj', 'hok', 'hol', 'hom', 'hoo', 'hop', 'hor', 'hos', 'hot', 'hov', 'how', 'hoy', 'hoz', 'hpo', 'hps', 'hra', 'hrc', 'hre', 'hrk', 'hrm', 'hro', 'hrp', 'hrr', 'hrt', 'hru', 'hrw', 'hrx', 'hrz', 'hsb', 'hsh', 'hsl', 'hsn', 'hss', 'hti', 'hto', 'hts', 'htu', 'htx', 'hub', 'huc', 'hud', 'hue', 'huf', 'hug', 'huh', 'hui', 'huj', 'huk', 'hul', 'hum', 'huo', 'hup', 'huq', 'hur', 'hus', 'hut', 'huu', 'huv', 'huw', 'hux', 'huy', 'huz', 'hvc', 'hve', 'hvk', 'hvn', 'hvv', 'hwa', 'hwc', 'hwo', 'hya', 'hyw', 'hyx', 'iai', 'ian', 'iap', 'iar', 'iba', 'ibb', 'ibd', 'ibe', 'ibg', 'ibh', 'ibi', 'ibl', 'ibm', 'ibn', 'ibr', 'ibu', 'iby', 'ica', 'ich', 'icl', 'icr', 'ida', 'idb', 'idc', 'idd', 'ide', 'idi', 'idr', 'ids', 'idt', 'idu', 'ifa', 'ifb', 'ife', 'iff', 'ifk', 'ifm', 'ifu', 'ify', 'igb', 'ige', 'igg', 'igl', 'igm', 'ign', 'igo', 'igs', 'igw', 'ihb', 'ihi', 'ihp', 'ihw', 'iin', 'iir', 'ijc', 'ije', 'ijj', 'ijn', 'ijo', 'ijs', 'ike', 'iki', 'ikk', 'ikl', 'iko', 'ikp', 'ikr', 'iks', 'ikt', 'ikv', 'ikw', 'ikx', 'ikz', 'ila', 'ilb', 'ilg', 'ili', 'ilk', 'ill', 'ilm', 'ilo', 'ilp', 'ils', 'ilu', 'ilv', 'ilw', 'ima', 'ime', 'imi', 'iml', 'imn', 'imo', 'imr', 'ims', 'imy', 'inb', 'inc', 'ine', 'ing', 'inh', 'inj', 'inl', 'inm', 'inn', 'ino', 'inp', 'ins', 'int', 'inz', 'ior', 'iou', 'iow', 'ipi', 'ipo', 'iqu', 'iqw', 'ira', 'ire', 'irh', 'iri', 'irk', 'irn', 'iro', 'irr', 'iru', 'irx', 'iry', 'isa', 'isc', 'isd', 'ise', 'isg', 'ish', 'isi', 'isk', 'ism', 'isn', 'iso', 'isr', 'ist', 'isu', 'itb', 'itc', 'itd', 'ite', 'iti', 'itk', 'itl', 'itm', 'ito', 'itr', 'its', 'itt', 'itv', 'itw', 'itx', 'ity', 'itz', 'ium', 'ivb', 'ivv', 'iwk', 'iwm', 'iwo', 'iws', 'ixc', 'ixl', 'iya', 'iyo', 'iyx', 'izh', 'izi', 'izr', 'izz', 'jaa', 'jab', 'jac', 'jad', 'jae', 'jaf', 'jah', 'jaj', 'jak', 'jal', 'jam', 'jan', 'jao', 'jaq', 'jar', 'jas', 'jat', 'jau', 'jax', 'jay', 'jaz', 'jbe', 'jbi', 'jbj', 'jbk', 'jbn', 'jbo', 'jbr', 'jbt', 'jbu', 'jbw', 'jcs', 'jct', 'jda', 'jdg', 'jdt', 'jeb', 'jee', 'jeg', 'jeh', 'jei', 'jek', 'jel', 'jen', 'jer', 'jet', 'jeu', 'jgb', 'jge', 'jgk', 'jgo', 'jhi', 'jhs', 'jia', 'jib', 'jic', 'jid', 'jie', 'jig', 'jih', 'jii', 'jil', 'jim', 'jio', 'jiq', 'jit', 'jiu', 'jiv', 'jiy', 'jje', 'jjr', 'jka', 'jkm', 'jko', 'jkp', 'jkr', 'jku', 'jle', 'jls', 'jma', 'jmb', 'jmc', 'jmd', 'jmi', 'jml', 'jmn', 'jmr', 'jms', 'jmw', 'jmx', 'jna', 'jnd', 'jng', 'jni', 'jnj', 'jnl', 'jns', 'job', 'jod', 'jog', 'jor', 'jos', 'jow', 'jpa', 'jpr', 'jpx', 'jqr', 'jra', 'jrb', 'jrr', 'jrt', 'jru', 'jsl', 'jua', 'jub', 'juc', 'jud', 'juh', 'jui', 'juk', 'jul', 'jum', 'jun', 'juo', 'jup', 'jur', 'jus', 'jut', 'juu', 'juw', 'juy', 'jvd', 'jvn', 'jwi', 'jya', 'jye', 'jyy', 'kaa', 'kab', 'kac', 'kad', 'kae', 'kaf', 'kag', 'kah', 'kai', 'kaj', 'kak', 'kam', 'kao', 'kap', 'kaq', 'kar', 'kav', 'kaw', 'kax', 'kay', 'kba', 'kbb', 'kbc', 'kbd', 'kbe', 'kbf', 'kbg', 'kbh', 'kbi', 'kbj', 'kbk', 'kbl', 'kbm', 'kbn', 'kbo', 'kbp', 'kbq', 'kbr', 'kbs', 'kbt', 'kbu', 'kbv', 'kbw', 'kbx', 'kby', 'kbz', 'kca', 'kcb', 'kcc', 'kcd', 'kce', 'kcf', 'kcg', 'kch', 'kci', 'kcj', 'kck', 'kcl', 'kcm', 'kcn', 'kco', 'kcp', 'kcq', 'kcr', 'kcs', 'kct', 'kcu', 'kcv', 'kcw', 'kcx', 'kcy', 'kcz', 'kda', 'kdc', 'kdd', 'kde', 'kdf', 'kdg', 'kdh', 'kdi', 'kdj', 'kdk', 'kdl', 'kdm', 'kdn', 'kdo', 'kdp', 'kdq', 'kdr', 'kdt', 'kdu', 'kdv', 'kdw', 'kdx', 'kdy', 'kdz', 'kea', 'keb', 'kec', 'ked', 'kee', 'kef', 'keg', 'keh', 'kei', 'kej', 'kek', 'kel', 'kem', 'ken', 'keo', 'kep', 'keq', 'ker', 'kes', 'ket', 'keu', 'kev', 'kew', 'kex', 'key', 'kez', 'kfa', 'kfb', 'kfc', 'kfd', 'kfe', 'kff', 'kfg', 'kfh', 'kfi', 'kfj', 'kfk', 'kfl', 'kfm', 'kfn', 'kfo', 'kfp', 'kfq', 'kfr', 'kfs', 'kft', 'kfu', 'kfv', 'kfw', 'kfx', 'kfy', 'kfz', 'kga', 'kgb', 'kgc', 'kgd', 'kge', 'kgf', 'kgg', 'kgh', 'kgi', 'kgj', 'kgk', 'kgl', 'kgm', 'kgn', 'kgo', 'kgp', 'kgq', 'kgr', 'kgs', 'kgt', 'kgu', 'kgv', 'kgw', 'kgx', 'kgy', 'kha', 'khb', 'khc', 'khd', 'khe', 'khf', 'khg', 'khh', 'khi', 'khj', 'khk', 'khl', 'khn', 'kho', 'khp', 'khq', 'khr', 'khs', 'kht', 'khu', 'khv', 'khw', 'khx', 'khy', 'khz', 'kia', 'kib', 'kic', 'kid', 'kie', 'kif', 'kig', 'kih', 'kii', 'kij', 'kil', 'kim', 'kio', 'kip', 'kiq', 'kis', 'kit', 'kiu', 'kiv', 'kiw', 'kix', 'kiy', 'kiz', 'kja', 'kjb', 'kjc', 'kjd', 'kje', 'kjf', 'kjg', 'kjh', 'kji', 'kjj', 'kjk', 'kjl', 'kjm', 'kjn', 'kjo', 'kjp', 'kjq', 'kjr', 'kjs', 'kjt', 'kju', 'kjv', 'kjx', 'kjy', 'kjz', 'kka', 'kkb', 'kkc', 'kkd', 'kke', 'kkf', 'kkg', 'kkh', 'kki', 'kkj', 'kkk', 'kkl', 'kkm', 'kkn', 'kko', 'kkp', 'kkq', 'kkr', 'kks', 'kkt', 'kku', 'kkv', 'kkw', 'kkx', 'kky', 'kkz', 'kla', 'klb', 'klc', 'kld', 'kle', 'klf', 'klg', 'klh', 'kli', 'klj', 'klk', 'kll', 'klm', 'kln', 'klo', 'klp', 'klq', 'klr', 'kls', 'klt', 'klu', 'klv', 'klw', 'klx', 'kly', 'klz', 'kma', 'kmb', 'kmc', 'kmd', 'kme', 'kmf', 'kmg', 'kmh', 'kmi', 'kmj', 'kmk', 'kml', 'kmm', 'kmn', 'kmo', 'kmp', 'kmq', 'kmr', 'kms', 'kmt', 'kmu', 'kmv', 'kmw', 'kmx', 'kmy', 'kmz', 'kna', 'knb', 'knc', 'knd', 'kne', 'knf', 'kng', 'kni', 'knj', 'knk', 'knl', 'knm', 'knn', 'kno', 'knp', 'knq', 'knr', 'kns', 'knt', 'knu', 'knv', 'knw', 'knx', 'kny', 'knz', 'koa', 'koc', 'kod', 'koe', 'kof', 'kog', 'koh', 'koi', 'koj', 'kok', 'kol', 'koo', 'kop', 'koq', 'kos', 'kot', 'kou', 'kov', 'kow', 'kox', 'koy', 'koz', 'kpa', 'kpb', 'kpc', 'kpd', 'kpe', 'kpf', 'kpg', 'kph', 'kpi', 'kpj', 'kpk', 'kpl', 'kpm', 'kpn', 'kpo', 'kpp', 'kpq', 'kpr', 'kps', 'kpt', 'kpu', 'kpv', 'kpw', 'kpx', 'kpy', 'kpz', 'kqa', 'kqb', 'kqc', 'kqd', 'kqe', 'kqf', 'kqg', 'kqh', 'kqi', 'kqj', 'kqk', 'kql', 'kqm', 'kqn', 'kqo', 'kqp', 'kqq', 'kqr', 'kqs', 'kqt', 'kqu', 'kqv', 'kqw', 'kqx', 'kqy', 'kqz', 'kra', 'krb', 'krc', 'krd', 'kre', 'krf', 'krh', 'kri', 'krj', 'krk', 'krl', 'krm', 'krn', 'kro', 'krp', 'krr', 'krs', 'krt', 'kru', 'krv', 'krw', 'krx', 'kry', 'krz', 'ksa', 'ksb', 'ksc', 'ksd', 'kse', 'ksf', 'ksg', 'ksh', 'ksi', 'ksj', 'ksk', 'ksl', 'ksm', 'ksn', 'kso', 'ksp', 'ksq', 'ksr', 'kss', 'kst', 'ksu', 'ksv', 'ksw', 'ksx', 'ksy', 'ksz', 'kta', 'ktb', 'ktc', 'ktd', 'kte', 'ktf', 'ktg', 'kth', 'kti', 'ktj', 'ktk', 'ktl', 'ktm', 'ktn', 'kto', 'ktp', 'ktq', 'ktr', 'kts', 'ktt', 'ktu', 'ktv', 'ktw', 'ktx', 'kty', 'ktz', 'kub', 'kuc', 'kud', 'kue', 'kuf', 'kug', 'kuh', 'kui', 'kuj', 'kuk', 'kul', 'kum', 'kun', 'kuo', 'kup', 'kuq', 'kus', 'kut', 'kuu', 'kuv', 'kuw', 'kux', 'kuy', 'kuz', 'kva', 'kvb', 'kvc', 'kvd', 'kve', 'kvf', 'kvg', 'kvh', 'kvi', 'kvj', 'kvk', 'kvl', 'kvm', 'kvn', 'kvo', 'kvp', 'kvq', 'kvr', 'kvs', 'kvt', 'kvu', 'kvv', 'kvw', 'kvx', 'kvy', 'kvz', 'kwa', 'kwb', 'kwc', 'kwd', 'kwe', 'kwf', 'kwg', 'kwh', 'kwi', 'kwj', 'kwk', 'kwl', 'kwm', 'kwn', 'kwo', 'kwp', 'kwq', 'kwr', 'kws', 'kwt', 'kwu', 'kwv', 'kww', 'kwx', 'kwy', 'kwz', 'kxa', 'kxb', 'kxc', 'kxd', 'kxe', 'kxf', 'kxh', 'kxi', 'kxj', 'kxk', 'kxl', 'kxm', 'kxn', 'kxo', 'kxp', 'kxq', 'kxr', 'kxs', 'kxt', 'kxu', 'kxv', 'kxw', 'kxx', 'kxy', 'kxz', 'kya', 'kyb', 'kyc', 'kyd', 'kye', 'kyf', 'kyg', 'kyh', 'kyi', 'kyj', 'kyk', 'kyl', 'kym', 'kyn', 'kyo', 'kyp', 'kyq', 'kyr', 'kys', 'kyt', 'kyu', 'kyv', 'kyw', 'kyx', 'kyy', 'kyz', 'kza', 'kzb', 'kzc', 'kzd', 'kze', 'kzf', 'kzg', 'kzh', 'kzi', 'kzj', 'kzk', 'kzl', 'kzm', 'kzn', 'kzo', 'kzp', 'kzq', 'kzr', 'kzs', 'kzt', 'kzu', 'kzv', 'kzw', 'kzx', 'kzy', 'kzz', 'laa', 'lab', 'lac', 'lad', 'lae', 'laf', 'lag', 'lah', 'lai', 'laj', 'lak', 'lal', 'lam', 'lan', 'lap', 'laq', 'lar', 'las', 'lau', 'law', 'lax', 'lay', 'laz', 'lba', 'lbb', 'lbc', 'lbe', 'lbf', 'lbg', 'lbi', 'lbj', 'lbk', 'lbl', 'lbm', 'lbn', 'lbo', 'lbq', 'lbr', 'lbs', 'lbt', 'lbu', 'lbv', 'lbw', 'lbx', 'lby', 'lbz', 'lcc', 'lcd', 'lce', 'lcf', 'lch', 'lcl', 'lcm', 'lcp', 'lcq', 'lcs', 'lda', 'ldb', 'ldd', 'ldg', 'ldh', 'ldi', 'ldj', 'ldk', 'ldl', 'ldm', 'ldn', 'ldo', 'ldp', 'ldq', 'lea', 'leb', 'lec', 'led', 'lee', 'lef', 'leg', 'leh', 'lei', 'lej', 'lek', 'lel', 'lem', 'len', 'leo', 'lep', 'leq', 'ler', 'les', 'let', 'leu', 'lev', 'lew', 'lex', 'ley', 'lez', 'lfa', 'lfn', 'lga', 'lgb', 'lgg', 'lgh', 'lgi', 'lgk', 'lgl', 'lgm', 'lgn', 'lgq', 'lgr', 'lgt', 'lgu', 'lgz', 'lha', 'lhh', 'lhi', 'lhl', 'lhm', 'lhn', 'lhp', 'lhs', 'lht', 'lhu', 'lia', 'lib', 'lic', 'lid', 'lie', 'lif', 'lig', 'lih', 'lii', 'lij', 'lik', 'lil', 'lio', 'lip', 'liq', 'lir', 'lis', 'liu', 'liv', 'liw', 'lix', 'liy', 'liz', 'lja', 'lje', 'lji', 'ljl', 'ljp', 'ljw', 'ljx', 'lka', 'lkb', 'lkc', 'lkd', 'lke', 'lkh', 'lki', 'lkj', 'lkl', 'lkm', 'lkn', 'lko', 'lkr', 'lks', 'lkt', 'lku', 'lky', 'lla', 'llb', 'llc', 'lld', 'lle', 'llf', 'llg', 'llh', 'lli', 'llj', 'llk', 'lll', 'llm', 'lln', 'llo', 'llp', 'llq', 'lls', 'llu', 'llx', 'lma', 'lmb', 'lmc', 'lmd', 'lme', 'lmf', 'lmg', 'lmh', 'lmi', 'lmj', 'lmk', 'lml', 'lmm', 'lmn', 'lmo', 'lmp', 'lmq', 'lmr', 'lmu', 'lmv', 'lmw', 'lmx', 'lmy', 'lmz', 'lna', 'lnb', 'lnd', 'lng', 'lnh', 'lni', 'lnj', 'lnl', 'lnm', 'lnn', 'lno', 'lns', 'lnu', 'lnw', 'lnz', 'loa', 'lob', 'loc', 'loe', 'lof', 'log', 'loh', 'loi', 'loj', 'lok', 'lol', 'lom', 'lon', 'loo', 'lop', 'loq', 'lor', 'los', 'lot', 'lou', 'lov', 'low', 'lox', 'loy', 'loz', 'lpa', 'lpe', 'lpn', 'lpo', 'lpx', 'lra', 'lrc', 'lre', 'lrg', 'lri', 'lrk', 'lrl', 'lrm', 'lrn', 'lro', 'lrr', 'lrt', 'lrv', 'lrz', 'lsa', 'lsd', 'lse', 'lsg', 'lsh', 'lsi', 'lsl', 'lsm', 'lso', 'lsp', 'lsr', 'lss', 'lst', 'lsy', 'ltc', 'ltg', 'lth', 'lti', 'ltn', 'lto', 'lts', 'ltu', 'lua', 'luc', 'lud', 'lue', 'luf', 'lui', 'luj', 'luk', 'lul', 'lum', 'lun', 'luo', 'lup', 'luq', 'lur', 'lus', 'lut', 'luu', 'luv', 'luw', 'luy', 'luz', 'lva', 'lvk', 'lvs', 'lvu', 'lwa', 'lwe', 'lwg', 'lwh', 'lwl', 'lwm', 'lwo', 'lws', 'lwt', 'lwu', 'lww', 'lya', 'lyg', 'lyn', 'lzh', 'lzl', 'lzn', 'lzz', 'maa', 'mab', 'mad', 'mae', 'maf', 'mag', 'mai', 'maj', 'mak', 'mam', 'man', 'map', 'maq', 'mas', 'mat', 'mau', 'mav', 'maw', 'max', 'maz', 'mba', 'mbb', 'mbc', 'mbd', 'mbe', 'mbf', 'mbh', 'mbi', 'mbj', 'mbk', 'mbl', 'mbm', 'mbn', 'mbo', 'mbp', 'mbq', 'mbr', 'mbs', 'mbt', 'mbu', 'mbv', 'mbw', 'mbx', 'mby', 'mbz', 'mca', 'mcb', 'mcc', 'mcd', 'mce', 'mcf', 'mcg', 'mch', 'mci', 'mcj', 'mck', 'mcl', 'mcm', 'mcn', 'mco', 'mcp', 'mcq', 'mcr', 'mcs', 'mct', 'mcu', 'mcv', 'mcw', 'mcx', 'mcy', 'mcz', 'mda', 'mdb', 'mdc', 'mdd', 'mde', 'mdf', 'mdg', 'mdh', 'mdi', 'mdj', 'mdk', 'mdl', 'mdm', 'mdn', 'mdp', 'mdq', 'mdr', 'mds', 'mdt', 'mdu', 'mdv', 'mdw', 'mdx', 'mdy', 'mdz', 'mea', 'meb', 'mec', 'med', 'mee', 'mef', 'meg', 'meh', 'mei', 'mej', 'mek', 'mel', 'mem', 'men', 'meo', 'mep', 'meq', 'mer', 'mes', 'met', 'meu', 'mev', 'mew', 'mey', 'mez', 'mfa', 'mfb', 'mfc', 'mfd', 'mfe', 'mff', 'mfg', 'mfh', 'mfi', 'mfj', 'mfk', 'mfl', 'mfm', 'mfn', 'mfo', 'mfp', 'mfq', 'mfr', 'mfs', 'mft', 'mfu', 'mfv', 'mfw', 'mfx', 'mfy', 'mfz', 'mga', 'mgb', 'mgc', 'mgd', 'mge', 'mgf', 'mgg', 'mgh', 'mgi', 'mgj', 'mgk', 'mgl', 'mgm', 'mgn', 'mgo', 'mgp', 'mgq', 'mgr', 'mgs', 'mgt', 'mgu', 'mgv', 'mgw', 'mgx', 'mgy', 'mgz', 'mha', 'mhb', 'mhc', 'mhd', 'mhe', 'mhf', 'mhg', 'mhh', 'mhi', 'mhj', 'mhk', 'mhl', 'mhm', 'mhn', 'mho', 'mhp', 'mhq', 'mhr', 'mhs', 'mht', 'mhu', 'mhw', 'mhx', 'mhy', 'mhz', 'mia', 'mib', 'mic', 'mid', 'mie', 'mif', 'mig', 'mih', 'mii', 'mij', 'mik', 'mil', 'mim', 'min', 'mio', 'mip', 'miq', 'mir', 'mis', 'mit', 'miu', 'miw', 'mix', 'miy', 'miz', 'mja', 'mjb', 'mjc', 'mjd', 'mje', 'mjg', 'mjh', 'mji', 'mjj', 'mjk', 'mjl', 'mjm', 'mjn', 'mjo', 'mjp', 'mjq', 'mjr', 'mjs', 'mjt', 'mju', 'mjv', 'mjw', 'mjx', 'mjy', 'mjz', 'mka', 'mkb', 'mkc', 'mke', 'mkf', 'mkg', 'mkh', 'mki', 'mkj', 'mkk', 'mkl', 'mkm', 'mkn', 'mko', 'mkp', 'mkq', 'mkr', 'mks', 'mkt', 'mku', 'mkv', 'mkw', 'mkx', 'mky', 'mkz', 'mla', 'mlb', 'mlc', 'mld', 'mle', 'mlf', 'mlh', 'mli', 'mlj', 'mlk', 'mll', 'mlm', 'mln', 'mlo', 'mlp', 'mlq', 'mlr', 'mls', 'mlu', 'mlv', 'mlw', 'mlx', 'mlz', 'mma', 'mmb', 'mmc', 'mmd', 'mme', 'mmf', 'mmg', 'mmh', 'mmi', 'mmj', 'mmk', 'mml', 'mmm', 'mmn', 'mmo', 'mmp', 'mmq', 'mmr', 'mmt', 'mmu', 'mmv', 'mmw', 'mmx', 'mmy', 'mmz', 'mna', 'mnb', 'mnc', 'mnd', 'mne', 'mnf', 'mng', 'mnh', 'mni', 'mnj', 'mnk', 'mnl', 'mnm', 'mnn', 'mno', 'mnp', 'mnq', 'mnr', 'mns', 'mnt', 'mnu', 'mnv', 'mnw', 'mnx', 'mny', 'mnz', 'moa', 'moc', 'mod', 'moe', 'mof', 'mog', 'moh', 'moi', 'moj', 'mok', 'mom', 'moo', 'mop', 'moq', 'mor', 'mos', 'mot', 'mou', 'mov', 'mow', 'mox', 'moy', 'moz', 'mpa', 'mpb', 'mpc', 'mpd', 'mpe', 'mpg', 'mph', 'mpi', 'mpj', 'mpk', 'mpl', 'mpm', 'mpn', 'mpo', 'mpp', 'mpq', 'mpr', 'mps', 'mpt', 'mpu', 'mpv', 'mpw', 'mpx', 'mpy', 'mpz', 'mqa', 'mqb', 'mqc', 'mqe', 'mqf', 'mqg', 'mqh', 'mqi', 'mqj', 'mqk', 'mql', 'mqm', 'mqn', 'mqo', 'mqp', 'mqq', 'mqr', 'mqs', 'mqt', 'mqu', 'mqv', 'mqw', 'mqx', 'mqy', 'mqz', 'mra', 'mrb', 'mrc', 'mrd', 'mre', 'mrf', 'mrg', 'mrh', 'mrj', 'mrk', 'mrl', 'mrm', 'mrn', 'mro', 'mrp', 'mrq', 'mrr', 'mrs', 'mrt', 'mru', 'mrv', 'mrw', 'mrx', 'mry', 'mrz', 'msb', 'msc', 'msd', 'mse', 'msf', 'msg', 'msh', 'msi', 'msj', 'msk', 'msl', 'msm', 'msn', 'mso', 'msp', 'msq', 'msr', 'mss', 'mst', 'msu', 'msv', 'msw', 'msx', 'msy', 'msz', 'mta', 'mtb', 'mtc', 'mtd', 'mte', 'mtf', 'mtg', 'mth', 'mti', 'mtj', 'mtk', 'mtl', 'mtm', 'mtn', 'mto', 'mtp', 'mtq', 'mtr', 'mts', 'mtt', 'mtu', 'mtv', 'mtw', 'mtx', 'mty', 'mua', 'mub', 'muc', 'mud', 'mue', 'mug', 'muh', 'mui', 'muj', 'muk', 'mul', 'mum', 'mun', 'muo', 'mup', 'muq', 'mur', 'mus', 'mut', 'muu', 'muv', 'mux', 'muy', 'muz', 'mva', 'mvb', 'mvd', 'mve', 'mvf', 'mvg', 'mvh', 'mvi', 'mvk', 'mvl', 'mvm', 'mvn', 'mvo', 'mvp', 'mvq', 'mvr', 'mvs', 'mvt', 'mvu', 'mvv', 'mvw', 'mvx', 'mvy', 'mvz', 'mwa', 'mwb', 'mwc', 'mwd', 'mwe', 'mwf', 'mwg', 'mwh', 'mwi', 'mwj', 'mwk', 'mwl', 'mwm', 'mwn', 'mwo', 'mwp', 'mwq', 'mwr', 'mws', 'mwt', 'mwu', 'mwv', 'mww', 'mwx', 'mwy', 'mwz', 'mxa', 'mxb', 'mxc', 'mxd', 'mxe', 'mxf', 'mxg', 'mxh', 'mxi', 'mxj', 'mxk', 'mxl', 'mxm', 'mxn', 'mxo', 'mxp', 'mxq', 'mxr', 'mxs', 'mxt', 'mxu', 'mxv', 'mxw', 'mxx', 'mxy', 'mxz', 'myb', 'myc', 'myd', 'mye', 'myf', 'myg', 'myh', 'myi', 'myj', 'myk', 'myl', 'mym', 'myn', 'myo', 'myp', 'myq', 'myr', 'mys', 'myt', 'myu', 'myv', 'myw', 'myx', 'myy', 'myz', 'mza', 'mzb', 'mzc', 'mzd', 'mze', 'mzg', 'mzh', 'mzi', 'mzj', 'mzk', 'mzl', 'mzm', 'mzn', 'mzo', 'mzp', 'mzq', 'mzr', 'mzs', 'mzt', 'mzu', 'mzv', 'mzw', 'mzx', 'mzy', 'mzz', 'naa', 'nab', 'nac', 'nad', 'nae', 'naf', 'nag', 'nah', 'nai', 'naj', 'nak', 'nal', 'nam', 'nan', 'nao', 'nap', 'naq', 'nar', 'nas', 'nat', 'naw', 'nax', 'nay', 'naz', 'nba', 'nbb', 'nbc', 'nbd', 'nbe', 'nbf', 'nbg', 'nbh', 'nbi', 'nbj', 'nbk', 'nbm', 'nbn', 'nbo', 'nbp', 'nbq', 'nbr', 'nbs', 'nbt', 'nbu', 'nbv', 'nbw', 'nbx', 'nby', 'nca', 'ncb', 'ncc', 'ncd', 'nce', 'ncf', 'ncg', 'nch', 'nci', 'ncj', 'nck', 'ncl', 'ncm', 'ncn', 'nco', 'ncp', 'ncq', 'ncr', 'ncs', 'nct', 'ncu', 'ncx', 'ncz', 'nda', 'ndb', 'ndc', 'ndd', 'ndf', 'ndg', 'ndh', 'ndi', 'ndj', 'ndk', 'ndl', 'ndm', 'ndn', 'ndp', 'ndq', 'ndr', 'nds', 'ndt', 'ndu', 'ndv', 'ndw', 'ndx', 'ndy', 'ndz', 'nea', 'neb', 'nec', 'ned', 'nee', 'nef', 'neg', 'neh', 'nei', 'nej', 'nek', 'nem', 'nen', 'neo', 'neq', 'ner', 'nes', 'net', 'neu', 'nev', 'new', 'nex', 'ney', 'nez', 'nfa', 'nfd', 'nfl', 'nfr', 'nfu', 'nga', 'ngb', 'ngc', 'ngd', 'nge', 'ngf', 'ngg', 'ngh', 'ngi', 'ngj', 'ngk', 'ngl', 'ngm', 'ngn', 'ngo', 'ngp', 'ngq', 'ngr', 'ngs', 'ngt', 'ngu', 'ngv', 'ngw', 'ngx', 'ngy', 'ngz', 'nha', 'nhb', 'nhc', 'nhd', 'nhe', 'nhf', 'nhg', 'nhh', 'nhi', 'nhk', 'nhm', 'nhn', 'nho', 'nhp', 'nhq', 'nhr', 'nht', 'nhu', 'nhv', 'nhw', 'nhx', 'nhy', 'nhz', 'nia', 'nib', 'nic', 'nid', 'nie', 'nif', 'nig', 'nih', 'nii', 'nij', 'nik', 'nil', 'nim', 'nin', 'nio', 'niq', 'nir', 'nis', 'nit', 'niu', 'niv', 'niw', 'nix', 'niy', 'niz', 'nja', 'njb', 'njd', 'njh', 'nji', 'njj', 'njl', 'njm', 'njn', 'njo', 'njr', 'njs', 'njt', 'nju', 'njx', 'njy', 'njz', 'nka', 'nkb', 'nkc', 'nkd', 'nke', 'nkf', 'nkg', 'nkh', 'nki', 'nkj', 'nkk', 'nkm', 'nkn', 'nko', 'nkp', 'nkq', 'nkr', 'nks', 'nkt', 'nku', 'nkv', 'nkw', 'nkx', 'nkz', 'nla', 'nlc', 'nle', 'nlg', 'nli', 'nlj', 'nlk', 'nll', 'nlm', 'nln', 'nlo', 'nlq', 'nlr', 'nlu', 'nlv', 'nlw', 'nlx', 'nly', 'nlz', 'nma', 'nmb', 'nmc', 'nmd', 'nme', 'nmf', 'nmg', 'nmh', 'nmi', 'nmj', 'nmk', 'nml', 'nmm', 'nmn', 'nmo', 'nmp', 'nmq', 'nmr', 'nms', 'nmt', 'nmu', 'nmv', 'nmw', 'nmx', 'nmy', 'nmz', 'nna', 'nnb', 'nnc', 'nnd', 'nne', 'nnf', 'nng', 'nnh', 'nni', 'nnj', 'nnk', 'nnl', 'nnm', 'nnn', 'nnp', 'nnq', 'nnr', 'nns', 'nnt', 'nnu', 'nnv', 'nnw', 'nnx', 'nny', 'nnz', 'noa', 'noc', 'nod', 'noe', 'nof', 'nog', 'noh', 'noi', 'noj', 'nok', 'nol', 'nom', 'non', 'noo', 'nop', 'noq', 'nos', 'not', 'nou', 'nov', 'now', 'noy', 'noz', 'npa', 'npb', 'npg', 'nph', 'npi', 'npl', 'npn', 'npo', 'nps', 'npu', 'npx', 'npy', 'nqg', 'nqk', 'nql', 'nqm', 'nqn', 'nqo', 'nqq', 'nqy', 'nra', 'nrb', 'nrc', 'nre', 'nrf', 'nrg', 'nri', 'nrk', 'nrl', 'nrm', 'nrn', 'nrp', 'nrr', 'nrt', 'nru', 'nrx', 'nrz', 'nsa', 'nsc', 'nsd', 'nse', 'nsf', 'nsg', 'nsh', 'nsi', 'nsk', 'nsl', 'nsm', 'nsn', 'nso', 'nsp', 'nsq', 'nsr', 'nss', 'nst', 'nsu', 'nsv', 'nsw', 'nsx', 'nsy', 'nsz', 'ntd', 'nte', 'ntg', 'nti', 'ntj', 'ntk', 'ntm', 'nto', 'ntp', 'ntr', 'nts', 'ntu', 'ntw', 'ntx', 'nty', 'ntz', 'nua', 'nub', 'nuc', 'nud', 'nue', 'nuf', 'nug', 'nuh', 'nui', 'nuj', 'nuk', 'nul', 'num', 'nun', 'nuo', 'nup', 'nuq', 'nur', 'nus', 'nut', 'nuu', 'nuv', 'nuw', 'nux', 'nuy', 'nuz', 'nvh', 'nvm', 'nvo', 'nwa', 'nwb', 'nwc', 'nwe', 'nwg', 'nwi', 'nwm', 'nwo', 'nwr', 'nwx', 'nwy', 'nxa', 'nxd', 'nxe', 'nxg', 'nxi', 'nxk', 'nxl', 'nxm', 'nxn', 'nxo', 'nxq', 'nxr', 'nxu', 'nxx', 'nyb', 'nyc', 'nyd', 'nye', 'nyf', 'nyg', 'nyh', 'nyi', 'nyj', 'nyk', 'nyl', 'nym', 'nyn', 'nyo', 'nyp', 'nyq', 'nyr', 'nys', 'nyt', 'nyu', 'nyv', 'nyw', 'nyx', 'nyy', 'nza', 'nzb', 'nzd', 'nzi', 'nzk', 'nzm', 'nzs', 'nzu', 'nzy', 'nzz', 'oaa', 'oac', 'oar', 'oav', 'obi', 'obk', 'obl', 'obm', 'obo', 'obr', 'obt', 'obu', 'oca', 'och', 'oco', 'ocu', 'oda', 'odk', 'odt', 'odu', 'ofo', 'ofs', 'ofu', 'ogb', 'ogc', 'oge', 'ogg', 'ogo', 'ogu', 'oht', 'ohu', 'oia', 'oin', 'ojb', 'ojc', 'ojg', 'ojp', 'ojs', 'ojv', 'ojw', 'oka', 'okb', 'okd', 'oke', 'okg', 'okh', 'oki', 'okj', 'okk', 'okl', 'okm', 'okn', 'oko', 'okr', 'oks', 'oku', 'okv', 'okx', 'ola', 'old', 'ole', 'olk', 'olm', 'olo', 'olr', 'olt', 'olu', 'oma', 'omb', 'omc', 'ome', 'omg', 'omi', 'omk', 'oml', 'omn', 'omo', 'omp', 'omq', 'omr', 'omt', 'omu', 'omv', 'omw', 'omx', 'ona', 'onb', 'one', 'ong', 'oni', 'onj', 'onk', 'onn', 'ono', 'onp', 'onr', 'ons', 'ont', 'onu', 'onw', 'onx', 'ood', 'oog', 'oon', 'oor', 'oos', 'opa', 'opk', 'opm', 'opo', 'opt', 'opy', 'ora', 'orc', 'ore', 'org', 'orh', 'orn', 'oro', 'orr', 'ors', 'ort', 'oru', 'orv', 'orw', 'orx', 'ory', 'orz', 'osa', 'osc', 'osi', 'oso', 'osp', 'ost', 'osu', 'osx', 'ota', 'otb', 'otd', 'ote', 'oti', 'otk', 'otl', 'otm', 'otn', 'oto', 'otq', 'otr', 'ots', 'ott', 'otu', 'otw', 'otx', 'oty', 'otz', 'oua', 'oub', 'oue', 'oui', 'oum', 'oun', 'ovd', 'owi', 'owl', 'oyb', 'oyd', 'oym', 'oyy', 'ozm', 'paa', 'pab', 'pac', 'pad', 'pae', 'paf', 'pag', 'pah', 'pai', 'pak', 'pal', 'pam', 'pao', 'pap', 'paq', 'par', 'pas', 'pat', 'pau', 'pav', 'paw', 'pax', 'pay', 'paz', 'pbb', 'pbc', 'pbe', 'pbf', 'pbg', 'pbh', 'pbi', 'pbl', 'pbm', 'pbn', 'pbo', 'pbp', 'pbr', 'pbs', 'pbt', 'pbu', 'pbv', 'pby', 'pbz', 'pca', 'pcb', 'pcc', 'pcd', 'pce', 'pcf', 'pcg', 'pch', 'pci', 'pcj', 'pck', 'pcl', 'pcm', 'pcn', 'pcp', 'pcr', 'pcw', 'pda', 'pdc', 'pdi', 'pdn', 'pdo', 'pdt', 'pdu', 'pea', 'peb', 'ped', 'pee', 'pef', 'peg', 'peh', 'pei', 'pej', 'pek', 'pel', 'pem', 'peo', 'pep', 'peq', 'pes', 'pev', 'pex', 'pey', 'pez', 'pfa', 'pfe', 'pfl', 'pga', 'pgd', 'pgg', 'pgi', 'pgk', 'pgl', 'pgn', 'pgs', 'pgu', 'pgy', 'pgz', 'pha', 'phd', 'phg', 'phh', 'phi', 'phk', 'phl', 'phm', 'phn', 'pho', 'phq', 'phr', 'pht', 'phu', 'phv', 'phw', 'pia', 'pib', 'pic', 'pid', 'pie', 'pif', 'pig', 'pih', 'pii', 'pij', 'pil', 'pim', 'pin', 'pio', 'pip', 'pir', 'pis', 'pit', 'piu', 'piv', 'piw', 'pix', 'piy', 'piz', 'pjt', 'pka', 'pkb', 'pkc', 'pkg', 'pkh', 'pkn', 'pko', 'pkp', 'pkr', 'pks', 'pkt', 'pku', 'pla', 'plb', 'plc', 'pld', 'ple', 'plf', 'plg', 'plh', 'plj', 'plk', 'pll', 'pln', 'plo', 'plp', 'plq', 'plr', 'pls', 'plt', 'plu', 'plv', 'plw', 'ply', 'plz', 'pma', 'pmb', 'pmc', 'pmd', 'pme', 'pmf', 'pmh', 'pmi', 'pmj', 'pmk', 'pml', 'pmm', 'pmn', 'pmo', 'pmq', 'pmr', 'pms', 'pmt', 'pmu', 'pmw', 'pmx', 'pmy', 'pmz', 'pna', 'pnb', 'pnc', 'pne', 'png', 'pnh', 'pni', 'pnj', 'pnk', 'pnl', 'pnm', 'pnn', 'pno', 'pnp', 'pnq', 'pnr', 'pns', 'pnt', 'pnu', 'pnv', 'pnw', 'pnx', 'pny', 'pnz', 'poc', 'pod', 'poe', 'pof', 'pog', 'poh', 'poi', 'pok', 'pom', 'pon', 'poo', 'pop', 'poq', 'pos', 'pot', 'pov', 'pow', 'pox', 'poy', 'poz', 'ppa', 'ppe', 'ppi', 'ppk', 'ppl', 'ppm', 'ppn', 'ppo', 'ppp', 'ppq', 'ppr', 'pps', 'ppt', 'ppu', 'pqa', 'pqe', 'pqm', 'pqw', 'pra', 'prb', 'prc', 'prd', 'pre', 'prf', 'prg', 'prh', 'pri', 'prk', 'prl', 'prm', 'prn', 'pro', 'prp', 'prq', 'prr', 'prs', 'prt', 'pru', 'prw', 'prx', 'pry', 'prz', 'psa', 'psc', 'psd', 'pse', 'psg', 'psh', 'psi', 'psl', 'psm', 'psn', 'pso', 'psp', 'psq', 'psr', 'pss', 'pst', 'psu', 'psw', 'psy', 'pta', 'pth', 'pti', 'ptn', 'pto', 'ptp', 'ptq', 'ptr', 'ptt', 'ptu', 'ptv', 'ptw', 'pty', 'pua', 'pub', 'puc', 'pud', 'pue', 'puf', 'pug', 'pui', 'puj', 'puk', 'pum', 'puo', 'pup', 'puq', 'pur', 'put', 'puu', 'puw', 'pux', 'puy', 'puz', 'pwa', 'pwb', 'pwg', 'pwi', 'pwm', 'pwn', 'pwo', 'pwr', 'pww', 'pxm', 'pye', 'pym', 'pyn', 'pys', 'pyu', 'pyx', 'pyy', 'pzn', 'qaa..qtz', 'qua', 'qub', 'quc', 'qud', 'quf', 'qug', 'quh', 'qui', 'quk', 'qul', 'qum', 'qun', 'qup', 'quq', 'qur', 'qus', 'quv', 'quw', 'qux', 'quy', 'quz', 'qva', 'qvc', 'qve', 'qvh', 'qvi', 'qvj', 'qvl', 'qvm', 'qvn', 'qvo', 'qvp', 'qvs', 'qvw', 'qvy', 'qvz', 'qwa', 'qwc', 'qwe', 'qwh', 'qwm', 'qws', 'qwt', 'qxa', 'qxc', 'qxh', 'qxl', 'qxn', 'qxo', 'qxp', 'qxq', 'qxr', 'qxs', 'qxt', 'qxu', 'qxw', 'qya', 'qyp', 'raa', 'rab', 'rac', 'rad', 'raf', 'rag', 'rah', 'rai', 'raj', 'rak', 'ral', 'ram', 'ran', 'rao', 'rap', 'raq', 'rar', 'ras', 'rat', 'rau', 'rav', 'raw', 'rax', 'ray', 'raz', 'rbb', 'rbk', 'rbl', 'rbp', 'rcf', 'rdb', 'rea', 'reb', 'ree', 'reg', 'rei', 'rej', 'rel', 'rem', 'ren', 'rer', 'res', 'ret', 'rey', 'rga', 'rge', 'rgk', 'rgn', 'rgr', 'rgs', 'rgu', 'rhg', 'rhp', 'ria', 'rie', 'rif', 'ril', 'rim', 'rin', 'rir', 'rit', 'riu', 'rjg', 'rji', 'rjs', 'rka', 'rkb', 'rkh', 'rki', 'rkm', 'rkt', 'rkw', 'rma', 'rmb', 'rmc', 'rmd', 'rme', 'rmf', 'rmg', 'rmh', 'rmi', 'rmk', 'rml', 'rmm', 'rmn', 'rmo', 'rmp', 'rmq', 'rmr', 'rms', 'rmt', 'rmu', 'rmv', 'rmw', 'rmx', 'rmy', 'rmz', 'rna', 'rnd', 'rng', 'rnl', 'rnn', 'rnp', 'rnr', 'rnw', 'roa', 'rob', 'roc', 'rod', 'roe', 'rof', 'rog', 'rol', 'rom', 'roo', 'rop', 'ror', 'rou', 'row', 'rpn', 'rpt', 'rri', 'rro', 'rrt', 'rsb', 'rsi', 'rsl', 'rsm', 'rtc', 'rth', 'rtm', 'rts', 'rtw', 'rub', 'ruc', 'rue', 'ruf', 'rug', 'ruh', 'rui', 'ruk', 'ruo', 'rup', 'ruq', 'rut', 'ruu', 'ruy', 'ruz', 'rwa', 'rwk', 'rwm', 'rwo', 'rwr', 'rxd', 'rxw', 'ryn', 'rys', 'ryu', 'rzh', 'saa', 'sab', 'sac', 'sad', 'sae', 'saf', 'sah', 'sai', 'saj', 'sak', 'sal', 'sam', 'sao', 'sap', 'saq', 'sar', 'sas', 'sat', 'sau', 'sav', 'saw', 'sax', 'say', 'saz', 'sba', 'sbb', 'sbc', 'sbd', 'sbe', 'sbf', 'sbg', 'sbh', 'sbi', 'sbj', 'sbk', 'sbl', 'sbm', 'sbn', 'sbo', 'sbp', 'sbq', 'sbr', 'sbs', 'sbt', 'sbu', 'sbv', 'sbw', 'sbx', 'sby', 'sbz', 'sca', 'scb', 'sce', 'scf', 'scg', 'sch', 'sci', 'sck', 'scl', 'scn', 'sco', 'scp', 'scq', 'scs', 'sct', 'scu', 'scv', 'scw', 'scx', 'sda', 'sdb', 'sdc', 'sde', 'sdf', 'sdg', 'sdh', 'sdj', 'sdk', 'sdl', 'sdm', 'sdn', 'sdo', 'sdp', 'sdr', 'sds', 'sdt', 'sdu', 'sdv', 'sdx', 'sdz', 'sea', 'seb', 'sec', 'sed', 'see', 'sef', 'seg', 'seh', 'sei', 'sej', 'sek', 'sel', 'sem', 'sen', 'seo', 'sep', 'seq', 'ser', 'ses', 'set', 'seu', 'sev', 'sew', 'sey', 'sez', 'sfb', 'sfe', 'sfm', 'sfs', 'sfw', 'sga', 'sgb', 'sgc', 'sgd', 'sge', 'sgg', 'sgh', 'sgi', 'sgj', 'sgk', 'sgl', 'sgm', 'sgn', 'sgo', 'sgp', 'sgr', 'sgs', 'sgt', 'sgu', 'sgw', 'sgx', 'sgy', 'sgz', 'sha', 'shb', 'shc', 'shd', 'she', 'shg', 'shh', 'shi', 'shj', 'shk', 'shl', 'shm', 'shn', 'sho', 'shp', 'shq', 'shr', 'shs', 'sht', 'shu', 'shv', 'shw', 'shx', 'shy', 'shz', 'sia', 'sib', 'sid', 'sie', 'sif', 'sig', 'sih', 'sii', 'sij', 'sik', 'sil', 'sim', 'sio', 'sip', 'siq', 'sir', 'sis', 'sit', 'siu', 'siv', 'siw', 'six', 'siy', 'siz', 'sja', 'sjb', 'sjd', 'sje', 'sjg', 'sjk', 'sjl', 'sjm', 'sjn', 'sjo', 'sjp', 'sjr', 'sjs', 'sjt', 'sju', 'sjw', 'ska', 'skb', 'skc', 'skd', 'ske', 'skf', 'skg', 'skh', 'ski', 'skj', 'skk', 'skm', 'skn', 'sko', 'skp', 'skq', 'skr', 'sks', 'skt', 'sku', 'skv', 'skw', 'skx', 'sky', 'skz', 'sla', 'slc', 'sld', 'sle', 'slf', 'slg', 'slh', 'sli', 'slj', 'sll', 'slm', 'sln', 'slp', 'slq', 'slr', 'sls', 'slt', 'slu', 'slw', 'slx', 'sly', 'slz', 'sma', 'smb', 'smc', 'smd', 'smf', 'smg', 'smh', 'smi', 'smj', 'smk', 'sml', 'smm', 'smn', 'smp', 'smq', 'smr', 'sms', 'smt', 'smu', 'smv', 'smw', 'smx', 'smy', 'smz', 'snb', 'snc', 'sne', 'snf', 'sng', 'snh', 'sni', 'snj', 'snk', 'snl', 'snm', 'snn', 'sno', 'snp', 'snq', 'snr', 'sns', 'snu', 'snv', 'snw', 'snx', 'sny', 'snz', 'soa', 'sob', 'soc', 'sod', 'soe', 'sog', 'soh', 'soi', 'soj', 'sok', 'sol', 'son', 'soo', 'sop', 'soq', 'sor', 'sos', 'sou', 'sov', 'sow', 'sox', 'soy', 'soz', 'spb', 'spc', 'spd', 'spe', 'spg', 'spi', 'spk', 'spl', 'spm', 'spn', 'spo', 'spp', 'spq', 'spr', 'sps', 'spt', 'spu', 'spv', 'spx', 'spy', 'sqa', 'sqh', 'sqj', 'sqk', 'sqm', 'sqn', 'sqo', 'sqq', 'sqr', 'sqs', 'sqt', 'squ', 'sra', 'srb', 'src', 'sre', 'srf', 'srg', 'srh', 'sri', 'srk', 'srl', 'srm', 'srn', 'sro', 'srq', 'srr', 'srs', 'srt', 'sru', 'srv', 'srw', 'srx', 'sry', 'srz', 'ssa', 'ssb', 'ssc', 'ssd', 'sse', 'ssf', 'ssg', 'ssh', 'ssi', 'ssj', 'ssk', 'ssl', 'ssm', 'ssn', 'sso', 'ssp', 'ssq', 'ssr', 'sss', 'sst', 'ssu', 'ssv', 'ssx', 'ssy', 'ssz', 'sta', 'stb', 'std', 'ste', 'stf', 'stg', 'sth', 'sti', 'stj', 'stk', 'stl', 'stm', 'stn', 'sto', 'stp', 'stq', 'str', 'sts', 'stt', 'stu', 'stv', 'stw', 'sty', 'sua', 'sub', 'suc', 'sue', 'sug', 'sui', 'suj', 'suk', 'sul', 'sum', 'suq', 'sur', 'sus', 'sut', 'suv', 'suw', 'sux', 'suy', 'suz', 'sva', 'svb', 'svc', 'sve', 'svk', 'svm', 'svr', 'svs', 'svx', 'swb', 'swc', 'swf', 'swg', 'swh', 'swi', 'swj', 'swk', 'swl', 'swm', 'swn', 'swo', 'swp', 'swq', 'swr', 'sws', 'swt', 'swu', 'swv', 'sww', 'swx', 'swy', 'sxb', 'sxc', 'sxe', 'sxg', 'sxk', 'sxl', 'sxm', 'sxn', 'sxo', 'sxr', 'sxs', 'sxu', 'sxw', 'sya', 'syb', 'syc', 'syd', 'syi', 'syk', 'syl', 'sym', 'syn', 'syo', 'syr', 'sys', 'syw', 'syx', 'syy', 'sza', 'szb', 'szc', 'szd', 'sze', 'szg', 'szl', 'szn', 'szp', 'szs', 'szv', 'szw', 'taa', 'tab', 'tac', 'tad', 'tae', 'taf', 'tag', 'tai', 'taj', 'tak', 'tal', 'tan', 'tao', 'tap', 'taq', 'tar', 'tas', 'tau', 'tav', 'taw', 'tax', 'tay', 'taz', 'tba', 'tbb', 'tbc', 'tbd', 'tbe', 'tbf', 'tbg', 'tbh', 'tbi', 'tbj', 'tbk', 'tbl', 'tbm', 'tbn', 'tbo', 'tbp', 'tbq', 'tbr', 'tbs', 'tbt', 'tbu', 'tbv', 'tbw', 'tbx', 'tby', 'tbz', 'tca', 'tcb', 'tcc', 'tcd', 'tce', 'tcf', 'tcg', 'tch', 'tci', 'tck', 'tcl', 'tcm', 'tcn', 'tco', 'tcp', 'tcq', 'tcs', 'tct', 'tcu', 'tcw', 'tcx', 'tcy', 'tcz', 'tda', 'tdb', 'tdc', 'tdd', 'tde', 'tdf', 'tdg', 'tdh', 'tdi', 'tdj', 'tdk', 'tdl', 'tdm', 'tdn', 'tdo', 'tdq', 'tdr', 'tds', 'tdt', 'tdu', 'tdv', 'tdx', 'tdy', 'tea', 'teb', 'tec', 'ted', 'tee', 'tef', 'teg', 'teh', 'tei', 'tek', 'tem', 'ten', 'teo', 'tep', 'teq', 'ter', 'tes', 'tet', 'teu', 'tev', 'tew', 'tex', 'tey', 'tez', 'tfi', 'tfn', 'tfo', 'tfr', 'tft', 'tga', 'tgb', 'tgc', 'tgd', 'tge', 'tgf', 'tgg', 'tgh', 'tgi', 'tgj', 'tgn', 'tgo', 'tgp', 'tgq', 'tgr', 'tgs', 'tgt', 'tgu', 'tgv', 'tgw', 'tgx', 'tgy', 'tgz', 'thc', 'thd', 'the', 'thf', 'thh', 'thi', 'thk', 'thl', 'thm', 'thn', 'thp', 'thq', 'thr', 'ths', 'tht', 'thu', 'thv', 'thw', 'thx', 'thy', 'thz', 'tia', 'tic', 'tid', 'tie', 'tif', 'tig', 'tih', 'tii', 'tij', 'tik', 'til', 'tim', 'tin', 'tio', 'tip', 'tiq', 'tis', 'tit', 'tiu', 'tiv', 'tiw', 'tix', 'tiy', 'tiz', 'tja', 'tjg', 'tji', 'tjl', 'tjm', 'tjn', 'tjo', 'tjs', 'tju', 'tjw', 'tka', 'tkb', 'tkd', 'tke', 'tkf', 'tkg', 'tkk', 'tkl', 'tkm', 'tkn', 'tkp', 'tkq', 'tkr', 'tks', 'tkt', 'tku', 'tkv', 'tkw', 'tkx', 'tkz', 'tla', 'tlb', 'tlc', 'tld', 'tlf', 'tlg', 'tlh', 'tli', 'tlj', 'tlk', 'tll', 'tlm', 'tln', 'tlo', 'tlp', 'tlq', 'tlr', 'tls', 'tlt', 'tlu', 'tlv', 'tlw', 'tlx', 'tly', 'tma', 'tmb', 'tmc', 'tmd', 'tme', 'tmf', 'tmg', 'tmh', 'tmi', 'tmj', 'tmk', 'tml', 'tmm', 'tmn', 'tmo', 'tmp', 'tmq', 'tmr', 'tms', 'tmt', 'tmu', 'tmv', 'tmw', 'tmy', 'tmz', 'tna', 'tnb', 'tnc', 'tnd', 'tne', 'tnf', 'tng', 'tnh', 'tni', 'tnk', 'tnl', 'tnm', 'tnn', 'tno', 'tnp', 'tnq', 'tnr', 'tns', 'tnt', 'tnu', 'tnv', 'tnw', 'tnx', 'tny', 'tnz', 'tob', 'toc', 'tod', 'toe', 'tof', 'tog', 'toh', 'toi', 'toj', 'tol', 'tom', 'too', 'top', 'toq', 'tor', 'tos', 'tou', 'tov', 'tow', 'tox', 'toy', 'toz', 'tpa', 'tpc', 'tpe', 'tpf', 'tpg', 'tpi', 'tpj', 'tpk', 'tpl', 'tpm', 'tpn', 'tpo', 'tpp', 'tpq', 'tpr', 'tpt', 'tpu', 'tpv', 'tpw', 'tpx', 'tpy', 'tpz', 'tqb', 'tql', 'tqm', 'tqn', 'tqo', 'tqp', 'tqq', 'tqr', 'tqt', 'tqu', 'tqw', 'tra', 'trb', 'trc', 'trd', 'tre', 'trf', 'trg', 'trh', 'tri', 'trj', 'trk', 'trl', 'trm', 'trn', 'tro', 'trp', 'trq', 'trr', 'trs', 'trt', 'tru', 'trv', 'trw', 'trx', 'try', 'trz', 'tsa', 'tsb', 'tsc', 'tsd', 'tse', 'tsf', 'tsg', 'tsh', 'tsi', 'tsj', 'tsk', 'tsl', 'tsm', 'tsp', 'tsq', 'tsr', 'tss', 'tst', 'tsu', 'tsv', 'tsw', 'tsx', 'tsy', 'tsz', 'tta', 'ttb', 'ttc', 'ttd', 'tte', 'ttf', 'ttg', 'tth', 'tti', 'ttj', 'ttk', 'ttl', 'ttm', 'ttn', 'tto', 'ttp', 'ttq', 'ttr', 'tts', 'ttt', 'ttu', 'ttv', 'ttw', 'tty', 'ttz', 'tua', 'tub', 'tuc', 'tud', 'tue', 'tuf', 'tug', 'tuh', 'tui', 'tuj', 'tul', 'tum', 'tun', 'tuo', 'tup', 'tuq', 'tus', 'tut', 'tuu', 'tuv', 'tuw', 'tux', 'tuy', 'tuz', 'tva', 'tvd', 'tve', 'tvk', 'tvl', 'tvm', 'tvn', 'tvo', 'tvs', 'tvt', 'tvu', 'tvw', 'tvy', 'twa', 'twb', 'twc', 'twd', 'twe', 'twf', 'twg', 'twh', 'twl', 'twm', 'twn', 'two', 'twp', 'twq', 'twr', 'twt', 'twu', 'tww', 'twx', 'twy', 'txa', 'txb', 'txc', 'txe', 'txg', 'txh', 'txi', 'txj', 'txm', 'txn', 'txo', 'txq', 'txr', 'txs', 'txt', 'txu', 'txx', 'txy', 'tya', 'tye', 'tyh', 'tyi', 'tyj', 'tyl', 'tyn', 'typ', 'tyr', 'tys', 'tyt', 'tyu', 'tyv', 'tyx', 'tyz', 'tza', 'tzh', 'tzj', 'tzl', 'tzm', 'tzn', 'tzo', 'tzx', 'uam', 'uan', 'uar', 'uba', 'ubi', 'ubl', 'ubr', 'ubu', 'uby', 'uda', 'ude', 'udg', 'udi', 'udj', 'udl', 'udm', 'udu', 'ues', 'ufi', 'uga', 'ugb', 'uge', 'ugn', 'ugo', 'ugy', 'uha', 'uhn', 'uis', 'uiv', 'uji', 'uka', 'ukg', 'ukh', 'ukk', 'ukl', 'ukp', 'ukq', 'uks', 'uku', 'ukw', 'uky', 'ula', 'ulb', 'ulc', 'ule', 'ulf', 'uli', 'ulk', 'ull', 'ulm', 'uln', 'ulu', 'ulw', 'uma', 'umb', 'umc', 'umd', 'umg', 'umi', 'umm', 'umn', 'umo', 'ump', 'umr', 'ums', 'umu', 'una', 'und', 'une', 'ung', 'unk', 'unm', 'unn', 'unp', 'unr', 'unu', 'unx', 'unz', 'uok', 'upi', 'upv', 'ura', 'urb', 'urc', 'ure', 'urf', 'urg', 'urh', 'uri', 'urj', 'urk', 'url', 'urm', 'urn', 'uro', 'urp', 'urr', 'urt', 'uru', 'urv', 'urw', 'urx', 'ury', 'urz', 'usa', 'ush', 'usi', 'usk', 'usp', 'usu', 'uta', 'ute', 'utp', 'utr', 'utu', 'uum', 'uun', 'uur', 'uuu', 'uve', 'uvh', 'uvl', 'uwa', 'uya', 'uzn', 'uzs', 'vaa', 'vae', 'vaf', 'vag', 'vah', 'vai', 'vaj', 'val', 'vam', 'van', 'vao', 'vap', 'var', 'vas', 'vau', 'vav', 'vay', 'vbb', 'vbk', 'vec', 'ved', 'vel', 'vem', 'veo', 'vep', 'ver', 'vgr', 'vgt', 'vic', 'vid', 'vif', 'vig', 'vil', 'vin', 'vis', 'vit', 'viv', 'vka', 'vki', 'vkj', 'vkk', 'vkl', 'vkm', 'vko', 'vkp', 'vkt', 'vku', 'vlp', 'vls', 'vma', 'vmb', 'vmc', 'vmd', 'vme', 'vmf', 'vmg', 'vmh', 'vmi', 'vmj', 'vmk', 'vml', 'vmm', 'vmp', 'vmq', 'vmr', 'vms', 'vmu', 'vmv', 'vmw', 'vmx', 'vmy', 'vmz', 'vnk', 'vnm', 'vnp', 'vor', 'vot', 'vra', 'vro', 'vrs', 'vrt', 'vsi', 'vsl', 'vsv', 'vto', 'vum', 'vun', 'vut', 'vwa', 'waa', 'wab', 'wac', 'wad', 'wae', 'waf', 'wag', 'wah', 'wai', 'waj', 'wak', 'wal', 'wam', 'wan', 'wao', 'wap', 'waq', 'war', 'was', 'wat', 'wau', 'wav', 'waw', 'wax', 'way', 'waz', 'wba', 'wbb', 'wbe', 'wbf', 'wbh', 'wbi', 'wbj', 'wbk', 'wbl', 'wbm', 'wbp', 'wbq', 'wbr', 'wbs', 'wbt', 'wbv', 'wbw', 'wca', 'wci', 'wdd', 'wdg', 'wdj', 'wdk', 'wdu', 'wdy', 'wea', 'wec', 'wed', 'weg', 'weh', 'wei', 'wem', 'wen', 'weo', 'wep', 'wer', 'wes', 'wet', 'weu', 'wew', 'wfg', 'wga', 'wgb', 'wgg', 'wgi', 'wgo', 'wgu', 'wgw', 'wgy', 'wha', 'whg', 'whk', 'whu', 'wib', 'wic', 'wie', 'wif', 'wig', 'wih', 'wii', 'wij', 'wik', 'wil', 'wim', 'win', 'wir', 'wit', 'wiu', 'wiv', 'wiw', 'wiy', 'wja', 'wji', 'wka', 'wkb', 'wkd', 'wkl', 'wku', 'wkw', 'wky', 'wla', 'wlc', 'wle', 'wlg', 'wli', 'wlk', 'wll', 'wlm', 'wlo', 'wlr', 'wls', 'wlu', 'wlv', 'wlw', 'wlx', 'wly', 'wma', 'wmb', 'wmc', 'wmd', 'wme', 'wmh', 'wmi', 'wmm', 'wmn', 'wmo', 'wms', 'wmt', 'wmw', 'wmx', 'wnb', 'wnc', 'wnd', 'wne', 'wng', 'wni', 'wnk', 'wnm', 'wnn', 'wno', 'wnp', 'wnu', 'wnw', 'wny', 'woa', 'wob', 'woc', 'wod', 'woe', 'wof', 'wog', 'woi', 'wok', 'wom', 'won', 'woo', 'wor', 'wos', 'wow', 'woy', 'wpc', 'wra', 'wrb', 'wrd', 'wrg', 'wrh', 'wri', 'wrk', 'wrl', 'wrm', 'wrn', 'wro', 'wrp', 'wrr', 'wrs', 'wru', 'wrv', 'wrw', 'wrx', 'wry', 'wrz', 'wsa', 'wsg', 'wsi', 'wsk', 'wsr', 'wss', 'wsu', 'wsv', 'wtf', 'wth', 'wti', 'wtk', 'wtm', 'wtw', 'wua', 'wub', 'wud', 'wuh', 'wul', 'wum', 'wun', 'wur', 'wut', 'wuu', 'wuv', 'wux', 'wuy', 'wwa', 'wwb', 'wwo', 'wwr', 'www', 'wxa', 'wxw', 'wya', 'wyb', 'wyi', 'wym', 'wyr', 'wyy', 'xaa', 'xab', 'xac', 'xad', 'xae', 'xag', 'xai', 'xaj', 'xak', 'xal', 'xam', 'xan', 'xao', 'xap', 'xaq', 'xar', 'xas', 'xat', 'xau', 'xav', 'xaw', 'xay', 'xba', 'xbb', 'xbc', 'xbd', 'xbe', 'xbg', 'xbi', 'xbj', 'xbm', 'xbn', 'xbo', 'xbp', 'xbr', 'xbw', 'xbx', 'xby', 'xcb', 'xcc', 'xce', 'xcg', 'xch', 'xcl', 'xcm', 'xcn', 'xco', 'xcr', 'xct', 'xcu', 'xcv', 'xcw', 'xcy', 'xda', 'xdc', 'xdk', 'xdm', 'xdo', 'xdy', 'xeb', 'xed', 'xeg', 'xel', 'xem', 'xep', 'xer', 'xes', 'xet', 'xeu', 'xfa', 'xga', 'xgb', 'xgd', 'xgf', 'xgg', 'xgi', 'xgl', 'xgm', 'xgn', 'xgr', 'xgu', 'xgw', 'xha', 'xhc', 'xhd', 'xhe', 'xhr', 'xht', 'xhu', 'xhv', 'xia', 'xib', 'xii', 'xil', 'xin', 'xip', 'xir', 'xis', 'xiv', 'xiy', 'xjb', 'xjt', 'xka', 'xkb', 'xkc', 'xkd', 'xke', 'xkf', 'xkg', 'xkh', 'xki', 'xkj', 'xkk', 'xkl', 'xkn', 'xko', 'xkp', 'xkq', 'xkr', 'xks', 'xkt', 'xku', 'xkv', 'xkw', 'xkx', 'xky', 'xkz', 'xla', 'xlb', 'xlc', 'xld', 'xle', 'xlg', 'xli', 'xln', 'xlo', 'xlp', 'xls', 'xlu', 'xly', 'xma', 'xmb', 'xmc', 'xmd', 'xme', 'xmf', 'xmg', 'xmh', 'xmj', 'xmk', 'xml', 'xmm', 'xmn', 'xmo', 'xmp', 'xmq', 'xmr', 'xms', 'xmt', 'xmu', 'xmv', 'xmw', 'xmx', 'xmy', 'xmz', 'xna', 'xnb', 'xnd', 'xng', 'xnh', 'xni', 'xnk', 'xnn', 'xno', 'xnr', 'xns', 'xnt', 'xnu', 'xny', 'xnz', 'xoc', 'xod', 'xog', 'xoi', 'xok', 'xom', 'xon', 'xoo', 'xop', 'xor', 'xow', 'xpa', 'xpc', 'xpe', 'xpg', 'xpi', 'xpj', 'xpk', 'xpm', 'xpn', 'xpo', 'xpp', 'xpq', 'xpr', 'xps', 'xpt', 'xpu', 'xpy', 'xqa', 'xqt', 'xra', 'xrb', 'xrd', 'xre', 'xrg', 'xri', 'xrm', 'xrn', 'xrq', 'xrr', 'xrt', 'xru', 'xrw', 'xsa', 'xsb', 'xsc', 'xsd', 'xse', 'xsh', 'xsi', 'xsj', 'xsl', 'xsm', 'xsn', 'xso', 'xsp', 'xsq', 'xsr', 'xss', 'xsu', 'xsv', 'xsy', 'xta', 'xtb', 'xtc', 'xtd', 'xte', 'xtg', 'xth', 'xti', 'xtj', 'xtl', 'xtm', 'xtn', 'xto', 'xtp', 'xtq', 'xtr', 'xts', 'xtt', 'xtu', 'xtv', 'xtw', 'xty', 'xtz', 'xua', 'xub', 'xud', 'xug', 'xuj', 'xul', 'xum', 'xun', 'xuo', 'xup', 'xur', 'xut', 'xuu', 'xve', 'xvi', 'xvn', 'xvo', 'xvs', 'xwa', 'xwc', 'xwd', 'xwe', 'xwg', 'xwj', 'xwk', 'xwl', 'xwo', 'xwr', 'xwt', 'xww', 'xxb', 'xxk', 'xxm', 'xxr', 'xxt', 'xya', 'xyb', 'xyj', 'xyk', 'xyl', 'xyt', 'xyy', 'xzh', 'xzm', 'xzp', 'yaa', 'yab', 'yac', 'yad', 'yae', 'yaf', 'yag', 'yah', 'yai', 'yaj', 'yak', 'yal', 'yam', 'yan', 'yao', 'yap', 'yaq', 'yar', 'yas', 'yat', 'yau', 'yav', 'yaw', 'yax', 'yay', 'yaz', 'yba', 'ybb', 'ybd', 'ybe', 'ybh', 'ybi', 'ybj', 'ybk', 'ybl', 'ybm', 'ybn', 'ybo', 'ybx', 'yby', 'ych', 'ycl', 'ycn', 'ycp', 'yda', 'ydd', 'yde', 'ydg', 'ydk', 'yds', 'yea', 'yec', 'yee', 'yei', 'yej', 'yel', 'yen', 'yer', 'yes', 'yet', 'yeu', 'yev', 'yey', 'yga', 'ygi', 'ygl', 'ygm', 'ygp', 'ygr', 'ygs', 'ygu', 'ygw', 'yha', 'yhd', 'yhl', 'yhs', 'yia', 'yif', 'yig', 'yih', 'yii', 'yij', 'yik', 'yil', 'yim', 'yin', 'yip', 'yiq', 'yir', 'yis', 'yit', 'yiu', 'yiv', 'yix', 'yiy', 'yiz', 'yka', 'ykg', 'yki', 'ykk', 'ykl', 'ykm', 'ykn', 'yko', 'ykr', 'ykt', 'yku', 'yky', 'yla', 'ylb', 'yle', 'ylg', 'yli', 'yll', 'ylm', 'yln', 'ylo', 'ylr', 'ylu', 'yly', 'yma', 'ymb', 'ymc', 'ymd', 'yme', 'ymg', 'ymh', 'ymi', 'ymk', 'yml', 'ymm', 'ymn', 'ymo', 'ymp', 'ymq', 'ymr', 'yms', 'ymt', 'ymx', 'ymz', 'yna', 'ynd', 'yne', 'yng', 'ynh', 'ynk', 'ynl', 'ynn', 'yno', 'ynq', 'yns', 'ynu', 'yob', 'yog', 'yoi', 'yok', 'yol', 'yom', 'yon', 'yos', 'yot', 'yox', 'yoy', 'ypa', 'ypb', 'ypg', 'yph', 'ypk', 'ypm', 'ypn', 'ypo', 'ypp', 'ypz', 'yra', 'yrb', 'yre', 'yri', 'yrk', 'yrl', 'yrm', 'yrn', 'yro', 'yrs', 'yrw', 'yry', 'ysc', 'ysd', 'ysg', 'ysl', 'ysn', 'yso', 'ysp', 'ysr', 'yss', 'ysy', 'yta', 'ytl', 'ytp', 'ytw', 'yty', 'yua', 'yub', 'yuc', 'yud', 'yue', 'yuf', 'yug', 'yui', 'yuj', 'yuk', 'yul', 'yum', 'yun', 'yup', 'yuq', 'yur', 'yut', 'yuu', 'yuw', 'yux', 'yuy', 'yuz', 'yva', 'yvt', 'ywa', 'ywg', 'ywl', 'ywn', 'ywq', 'ywr', 'ywt', 'ywu', 'yww', 'yxa', 'yxg', 'yxl', 'yxm', 'yxu', 'yxy', 'yyr', 'yyu', 'yyz', 'yzg', 'yzk', 'zaa', 'zab', 'zac', 'zad', 'zae', 'zaf', 'zag', 'zah', 'zai', 'zaj', 'zak', 'zal', 'zam', 'zao', 'zap', 'zaq', 'zar', 'zas', 'zat', 'zau', 'zav', 'zaw', 'zax', 'zay', 'zaz', 'zbc', 'zbe', 'zbl', 'zbt', 'zbw', 'zca', 'zch', 'zdj', 'zea', 'zeg', 'zeh', 'zen', 'zga', 'zgb', 'zgh', 'zgm', 'zgn', 'zgr', 'zhb', 'zhd', 'zhi', 'zhn', 'zhw', 'zhx', 'zia', 'zib', 'zik', 'zil', 'zim', 'zin', 'zir', 'ziw', 'ziz', 'zka', 'zkb', 'zkd', 'zkg', 'zkh', 'zkk', 'zkn', 'zko', 'zkp', 'zkr', 'zkt', 'zku', 'zkv', 'zkz', 'zle', 'zlj', 'zlm', 'zln', 'zlq', 'zls', 'zlw', 'zma', 'zmb', 'zmc', 'zmd', 'zme', 'zmf', 'zmg', 'zmh', 'zmi', 'zmj', 'zmk', 'zml', 'zmm', 'zmn', 'zmo', 'zmp', 'zmq', 'zmr', 'zms', 'zmt', 'zmu', 'zmv', 'zmw', 'zmx', 'zmy', 'zmz', 'zna', 'znd', 'zne', 'zng', 'znk', 'zns', 'zoc', 'zoh', 'zom', 'zoo', 'zoq', 'zor', 'zos', 'zpa', 'zpb', 'zpc', 'zpd', 'zpe', 'zpf', 'zpg', 'zph', 'zpi', 'zpj', 'zpk', 'zpl', 'zpm', 'zpn', 'zpo', 'zpp', 'zpq', 'zpr', 'zps', 'zpt', 'zpu', 'zpv', 'zpw', 'zpx', 'zpy', 'zpz', 'zqe', 'zra', 'zrg', 'zrn', 'zro', 'zrp', 'zrs', 'zsa', 'zsk', 'zsl', 'zsm', 'zsr', 'zsu', 'zte', 'ztg', 'ztl', 'ztm', 'ztn', 'ztp', 'ztq', 'zts', 'ztt', 'ztu', 'ztx', 'zty', 'zua', 'zuh', 'zum', 'zun', 'zuy', 'zwa', 'zxx', 'zyb', 'zyg', 'zyj', 'zyn', 'zyp', 'zza', 'zzj' ];21462 -1 function validLangs() {21463 -1 return langs;-1 39769 var elHeight = parseInt(style.getPropertyValue('height')); -1 39770 var scrollableWithZeroHeight = get_scroll_default(el) && elHeight === 0; -1 39771 var posAbsoluteOverflowHiddenAndSmall = style.getPropertyValue('position') === 'absolute' && elHeight < 2 && style.getPropertyValue('overflow') === 'hidden'; -1 39772 if (!screenReader && (isClipped(style) || style.getPropertyValue('opacity') === '0' || scrollableWithZeroHeight || posAbsoluteOverflowHiddenAndSmall)) { -1 39773 return false; 21464 39774 }21465 -1 __webpack_exports__['default'] = validLangs;21466 -1 },21467 -1 './lib/rules/aria-allowed-attr-matches.js': function libRulesAriaAllowedAttrMatchesJs(module, __webpack_exports__, __webpack_require__) {21468 -1 'use strict';21469 -1 __webpack_require__.r(__webpack_exports__);21470 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');21471 -1 function ariaAllowedAttrMatches(node) {21472 -1 var aria = /^aria-/;21473 -1 if (node.hasAttributes()) {21474 -1 var attrs = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['getNodeAttributes'])(node);21475 -1 for (var i = 0, l = attrs.length; i < l; i++) {21476 -1 if (aria.test(attrs[i].name)) {21477 -1 return true;21478 -1 }21479 -1 }21480 -1 }-1 39775 if (!recursed && (style.getPropertyValue('visibility') === 'hidden' || !screenReader && is_offscreen_default(el))) { 21481 39776 return false; 21482 39777 }21483 -1 __webpack_exports__['default'] = ariaAllowedAttrMatches;21484 -1 },21485 -1 './lib/rules/aria-allowed-role-matches.js': function libRulesAriaAllowedRoleMatchesJs(module, __webpack_exports__, __webpack_require__) {21486 -1 'use strict';21487 -1 __webpack_require__.r(__webpack_exports__);21488 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');21489 -1 function ariaAllowedRoleMatches(node) {21490 -1 return Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['getExplicitRole'])(node, {21491 -1 dpub: true,21492 -1 fallback: true21493 -1 }) !== null;21494 -1 }21495 -1 __webpack_exports__['default'] = ariaAllowedRoleMatches;21496 -1 },21497 -1 './lib/rules/aria-form-field-name-matches.js': function libRulesAriaFormFieldNameMatchesJs(module, __webpack_exports__, __webpack_require__) {21498 -1 'use strict';21499 -1 __webpack_require__.r(__webpack_exports__);21500 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');21501 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');21502 -1 function ariaFormFieldNameMatches(node, virtualNode) {21503 -1 var nodeName = virtualNode.props.nodeName;21504 -1 var role = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['getExplicitRole'])(virtualNode);21505 -1 if (nodeName === 'area' && !!virtualNode.attr('href')) {21506 -1 return false;21507 -1 }21508 -1 if ([ 'input', 'select', 'textarea' ].includes(nodeName)) {21509 -1 return false;21510 -1 }21511 -1 if (nodeName === 'img' || role === 'img' && nodeName !== 'svg') {21512 -1 return false;21513 -1 }21514 -1 if (nodeName === 'button' || role === 'button') {21515 -1 return false;21516 -1 }21517 -1 if (role === 'combobox' && Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['querySelectorAll'])(virtualNode, 'input:not([type="hidden"])').length) {21518 -1 return false;21519 -1 }-1 39778 var parent = el.assignedSlot ? el.assignedSlot : el.parentNode; -1 39779 var visible4 = false; -1 39780 if (parent) { -1 39781 visible4 = isVisible(parent, screenReader, true); -1 39782 } -1 39783 if (vNode) { -1 39784 vNode[cacheName] = visible4; -1 39785 } -1 39786 return visible4; -1 39787 } -1 39788 var is_visible_default = isVisible; -1 39789 var gridSize = 200; -1 39790 function isStackingContext(vNode, parentVNode) { -1 39791 var position = vNode.getComputedStylePropertyValue('position'); -1 39792 var zIndex = vNode.getComputedStylePropertyValue('z-index'); -1 39793 if (position === 'fixed' || position === 'sticky') { 21520 39794 return true; 21521 39795 }21522 -1 __webpack_exports__['default'] = ariaFormFieldNameMatches;21523 -1 },21524 -1 './lib/rules/aria-has-attr-matches.js': function libRulesAriaHasAttrMatchesJs(module, __webpack_exports__, __webpack_require__) {21525 -1 'use strict';21526 -1 __webpack_require__.r(__webpack_exports__);21527 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');21528 -1 function ariaHasAttrMatches(node) {21529 -1 var aria = /^aria-/;21530 -1 if (node.hasAttributes()) {21531 -1 var attrs = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['getNodeAttributes'])(node);21532 -1 for (var i = 0, l = attrs.length; i < l; i++) {21533 -1 if (aria.test(attrs[i].name)) {21534 -1 return true;21535 -1 }21536 -1 }-1 39796 if (zIndex !== 'auto' && position !== 'static') { -1 39797 return true; -1 39798 } -1 39799 if (vNode.getComputedStylePropertyValue('opacity') !== '1') { -1 39800 return true; -1 39801 } -1 39802 var transform = vNode.getComputedStylePropertyValue('-webkit-transform') || vNode.getComputedStylePropertyValue('-ms-transform') || vNode.getComputedStylePropertyValue('transform') || 'none'; -1 39803 if (transform !== 'none') { -1 39804 return true; -1 39805 } -1 39806 var mixBlendMode = vNode.getComputedStylePropertyValue('mix-blend-mode'); -1 39807 if (mixBlendMode && mixBlendMode !== 'normal') { -1 39808 return true; -1 39809 } -1 39810 var filter = vNode.getComputedStylePropertyValue('filter'); -1 39811 if (filter && filter !== 'none') { -1 39812 return true; -1 39813 } -1 39814 var perspective = vNode.getComputedStylePropertyValue('perspective'); -1 39815 if (perspective && perspective !== 'none') { -1 39816 return true; -1 39817 } -1 39818 var clipPath = vNode.getComputedStylePropertyValue('clip-path'); -1 39819 if (clipPath && clipPath !== 'none') { -1 39820 return true; -1 39821 } -1 39822 var mask = vNode.getComputedStylePropertyValue('-webkit-mask') || vNode.getComputedStylePropertyValue('mask') || 'none'; -1 39823 if (mask !== 'none') { -1 39824 return true; -1 39825 } -1 39826 var maskImage = vNode.getComputedStylePropertyValue('-webkit-mask-image') || vNode.getComputedStylePropertyValue('mask-image') || 'none'; -1 39827 if (maskImage !== 'none') { -1 39828 return true; -1 39829 } -1 39830 var maskBorder = vNode.getComputedStylePropertyValue('-webkit-mask-border') || vNode.getComputedStylePropertyValue('mask-border') || 'none'; -1 39831 if (maskBorder !== 'none') { -1 39832 return true; -1 39833 } -1 39834 if (vNode.getComputedStylePropertyValue('isolation') === 'isolate') { -1 39835 return true; -1 39836 } -1 39837 var willChange = vNode.getComputedStylePropertyValue('will-change'); -1 39838 if (willChange === 'transform' || willChange === 'opacity') { -1 39839 return true; -1 39840 } -1 39841 if (vNode.getComputedStylePropertyValue('-webkit-overflow-scrolling') === 'touch') { -1 39842 return true; -1 39843 } -1 39844 var contain = vNode.getComputedStylePropertyValue('contain'); -1 39845 if ([ 'layout', 'paint', 'strict', 'content' ].includes(contain)) { -1 39846 return true; -1 39847 } -1 39848 if (zIndex !== 'auto' && parentVNode) { -1 39849 var parentDsiplay = parentVNode.getComputedStylePropertyValue('display'); -1 39850 if ([ 'flex', 'inline-flex', 'inline flex', 'grid', 'inline-grid', 'inline grid' ].includes(parentDsiplay)) { -1 39851 return true; 21537 39852 } -1 39853 } -1 39854 return false; -1 39855 } -1 39856 function isFloated(vNode) { -1 39857 if (!vNode) { 21538 39858 return false; 21539 39859 }21540 -1 __webpack_exports__['default'] = ariaHasAttrMatches;21541 -1 },21542 -1 './lib/rules/aria-hidden-focus-matches.js': function libRulesAriaHiddenFocusMatchesJs(module, __webpack_exports__, __webpack_require__) {21543 -1 'use strict';21544 -1 __webpack_require__.r(__webpack_exports__);21545 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');21546 -1 function shouldMatchElement(el) {21547 -1 if (!el) {21548 -1 return true;-1 39860 if (vNode._isFloated !== void 0) { -1 39861 return vNode._isFloated; -1 39862 } -1 39863 var floatStyle = vNode.getComputedStylePropertyValue('float'); -1 39864 if (floatStyle !== 'none') { -1 39865 vNode._isFloated = true; -1 39866 return true; -1 39867 } -1 39868 var floated = isFloated(vNode.parent); -1 39869 vNode._isFloated = floated; -1 39870 return floated; -1 39871 } -1 39872 function getPositionOrder(vNode) { -1 39873 if (vNode.getComputedStylePropertyValue('position') === 'static') { -1 39874 if (vNode.getComputedStylePropertyValue('display').indexOf('inline') !== -1) { -1 39875 return 2; 21549 39876 }21550 -1 if (el.getAttribute('aria-hidden') === 'true') {21551 -1 return false;-1 39877 if (isFloated(vNode)) { -1 39878 return 1; 21552 39879 }21553 -1 return shouldMatchElement(Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getComposedParent'])(el));21554 -1 }21555 -1 function ariaHiddenFocusMatches(node) {21556 -1 return shouldMatchElement(Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getComposedParent'])(node));-1 39880 return 0; 21557 39881 }21558 -1 __webpack_exports__['default'] = ariaHiddenFocusMatches;21559 -1 },21560 -1 './lib/rules/autocomplete-matches.js': function libRulesAutocompleteMatchesJs(module, __webpack_exports__, __webpack_require__) {21561 -1 'use strict';21562 -1 __webpack_require__.r(__webpack_exports__);21563 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');21564 -1 var _standards__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/standards/index.js');21565 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/dom/index.js');21566 -1 function autocompleteMatches(node, virtualNode) {21567 -1 var autocomplete = virtualNode.attr('autocomplete');21568 -1 if (!autocomplete || Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['sanitize'])(autocomplete) === '') {21569 -1 return false;-1 39882 return 3; -1 39883 } -1 39884 function visuallySort(a, b) { -1 39885 for (var _i5 = 0; _i5 < a._stackingOrder.length; _i5++) { -1 39886 if (typeof b._stackingOrder[_i5] === 'undefined') { -1 39887 return -1; 21570 39888 }21571 -1 var nodeName = virtualNode.props.nodeName;21572 -1 if ([ 'textarea', 'input', 'select' ].includes(nodeName) === false) {21573 -1 return false;-1 39889 if (b._stackingOrder[_i5] > a._stackingOrder[_i5]) { -1 39890 return 1; 21574 39891 }21575 -1 var excludedInputTypes = [ 'submit', 'reset', 'button', 'hidden' ];21576 -1 if (nodeName === 'input' && excludedInputTypes.includes(virtualNode.props.type)) {21577 -1 return false;-1 39892 if (b._stackingOrder[_i5] < a._stackingOrder[_i5]) { -1 39893 return -1; 21578 39894 }21579 -1 var ariaDisabled = virtualNode.attr('aria-disabled') || 'false';21580 -1 if (virtualNode.hasAttr('disabled') || ariaDisabled.toLowerCase() === 'true') {21581 -1 return false;-1 39895 } -1 39896 var aNode = a.actualNode; -1 39897 var bNode = b.actualNode; -1 39898 if (aNode.getRootNode && aNode.getRootNode() !== bNode.getRootNode()) { -1 39899 var boundaries = []; -1 39900 while (aNode) { -1 39901 boundaries.push({ -1 39902 root: aNode.getRootNode(), -1 39903 node: aNode -1 39904 }); -1 39905 aNode = aNode.getRootNode().host; 21582 39906 }21583 -1 var role = virtualNode.attr('role');21584 -1 var tabIndex = virtualNode.attr('tabindex');21585 -1 if (tabIndex === '-1' && role) {21586 -1 var roleDef = _standards__WEBPACK_IMPORTED_MODULE_1__['default'].ariaRoles[role];21587 -1 if (roleDef === undefined || roleDef.type !== 'widget') {21588 -1 return false;21589 -1 }-1 39907 while (bNode && !boundaries.find(function(boundary) { -1 39908 return boundary.root === bNode.getRootNode(); -1 39909 })) { -1 39910 bNode = bNode.getRootNode().host; 21590 39911 }21591 -1 if (tabIndex === '-1' && virtualNode.actualNode && !Object(_commons_dom__WEBPACK_IMPORTED_MODULE_2__['isVisible'])(virtualNode.actualNode, false) && !Object(_commons_dom__WEBPACK_IMPORTED_MODULE_2__['isVisible'])(virtualNode.actualNode, true)) {21592 -1 return false;-1 39912 aNode = boundaries.find(function(boundary) { -1 39913 return boundary.root === bNode.getRootNode(); -1 39914 }).node; -1 39915 if (aNode === bNode) { -1 39916 return a.actualNode.getRootNode() !== aNode.getRootNode() ? -1 : 1; 21593 39917 }21594 -1 return true;21595 39918 }21596 -1 __webpack_exports__['default'] = autocompleteMatches;21597 -1 },21598 -1 './lib/rules/bypass-matches.js': function libRulesBypassMatchesJs(module, __webpack_exports__, __webpack_require__) {21599 -1 'use strict';21600 -1 __webpack_require__.r(__webpack_exports__);21601 -1 var _window_is_top_matches__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/rules/window-is-top-matches.js');21602 -1 function bypassMatches(node) {21603 -1 if (Object(_window_is_top_matches__WEBPACK_IMPORTED_MODULE_0__['default'])(node)) {21604 -1 return !!node.querySelector('a[href]');21605 -1 }21606 -1 return true;-1 39919 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; -1 39920 var docPosition = aNode.compareDocumentPosition(bNode); -1 39921 var DOMOrder = docPosition & DOCUMENT_POSITION_FOLLOWING ? 1 : -1; -1 39922 var isDescendant = docPosition & DOCUMENT_POSITION_CONTAINS || docPosition & DOCUMENT_POSITION_CONTAINED_BY; -1 39923 var aPosition = getPositionOrder(a); -1 39924 var bPosition = getPositionOrder(b); -1 39925 if (aPosition === bPosition || isDescendant) { -1 39926 return DOMOrder; 21607 39927 }21608 -1 __webpack_exports__['default'] = bypassMatches;21609 -1 },21610 -1 './lib/rules/color-contrast-matches.js': function libRulesColorContrastMatchesJs(module, __webpack_exports__, __webpack_require__) {21611 -1 'use strict';21612 -1 __webpack_require__.r(__webpack_exports__);21613 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');21614 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/text/index.js');21615 -1 var _commons_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/forms/index.js');21616 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/core/utils/index.js');21617 -1 function colorContrastMatches(node, virtualNode) {21618 -1 var _virtualNode$props = virtualNode.props, nodeName = _virtualNode$props.nodeName, inputType = _virtualNode$props.type;21619 -1 if (nodeName === 'option') {21620 -1 return false;-1 39928 return bPosition - aPosition; -1 39929 } -1 39930 function getStackingOrder(vNode, parentVNode) { -1 39931 var stackingOrder = parentVNode._stackingOrder.slice(); -1 39932 var zIndex = vNode.getComputedStylePropertyValue('z-index'); -1 39933 if (zIndex !== 'auto') { -1 39934 stackingOrder[stackingOrder.length - 1] = parseInt(zIndex); -1 39935 } -1 39936 if (isStackingContext(vNode, parentVNode)) { -1 39937 stackingOrder.push(0); -1 39938 } -1 39939 return stackingOrder; -1 39940 } -1 39941 function findScrollRegionParent(vNode, parentVNode) { -1 39942 var scrollRegionParent = null; -1 39943 var checkedNodes = [ vNode ]; -1 39944 while (parentVNode) { -1 39945 if (parentVNode._scrollRegionParent) { -1 39946 scrollRegionParent = parentVNode._scrollRegionParent; -1 39947 break; 21621 39948 }21622 -1 if (nodeName === 'select' && !node.options.length) {21623 -1 return false;-1 39949 if (get_scroll_default(parentVNode.actualNode)) { -1 39950 scrollRegionParent = parentVNode; -1 39951 break; -1 39952 } -1 39953 checkedNodes.push(parentVNode); -1 39954 parentVNode = get_node_from_tree_default(parentVNode.actualNode.parentElement || parentVNode.actualNode.parentNode); -1 39955 } -1 39956 checkedNodes.forEach(function(vNode2) { -1 39957 return vNode2._scrollRegionParent = scrollRegionParent; -1 39958 }); -1 39959 return scrollRegionParent; -1 39960 } -1 39961 function addNodeToGrid(grid, vNode) { -1 39962 vNode._grid = grid; -1 39963 vNode.clientRects.forEach(function(rect) { -1 39964 var x = rect.left; -1 39965 var y = rect.top; -1 39966 var startRow = y / gridSize | 0; -1 39967 var startCol = x / gridSize | 0; -1 39968 var endRow = (y + rect.height) / gridSize | 0; -1 39969 var endCol = (x + rect.width) / gridSize | 0; -1 39970 for (var row = startRow; row <= endRow; row++) { -1 39971 grid.cells[row] = grid.cells[row] || []; -1 39972 for (var col = startCol; col <= endCol; col++) { -1 39973 grid.cells[row][col] = grid.cells[row][col] || []; -1 39974 if (!grid.cells[row][col].includes(vNode)) { -1 39975 grid.cells[row][col].push(vNode); -1 39976 } -1 39977 } 21624 39978 }21625 -1 var nonTextInput = [ 'hidden', 'range', 'color', 'checkbox', 'radio', 'image' ];21626 -1 if (nodeName === 'input' && nonTextInput.includes(inputType)) {21627 -1 return false;-1 39979 }); -1 39980 } -1 39981 function createGrid() { -1 39982 var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body; -1 39983 var rootGrid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { -1 39984 container: null, -1 39985 cells: [] -1 39986 }; -1 39987 var parentVNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; -1 39988 if (!parentVNode) { -1 39989 var vNode = get_node_from_tree_default(document.documentElement); -1 39990 if (!vNode) { -1 39991 vNode = new virtual_node_default(document.documentElement); -1 39992 } -1 39993 vNode._stackingOrder = [ 0 ]; -1 39994 addNodeToGrid(rootGrid, vNode); -1 39995 if (get_scroll_default(vNode.actualNode)) { -1 39996 var subGrid = { -1 39997 container: vNode, -1 39998 cells: [] -1 39999 }; -1 40000 vNode._subGrid = subGrid; -1 40001 } -1 40002 } -1 40003 var treeWalker = document.createTreeWalker(root, window.NodeFilter.SHOW_ELEMENT, null, false); -1 40004 var node = parentVNode ? treeWalker.nextNode() : treeWalker.currentNode; -1 40005 while (node) { -1 40006 var _vNode = get_node_from_tree_default(node); -1 40007 if (node.parentElement) { -1 40008 parentVNode = get_node_from_tree_default(node.parentElement); -1 40009 } else if (node.parentNode && get_node_from_tree_default(node.parentNode)) { -1 40010 parentVNode = get_node_from_tree_default(node.parentNode); -1 40011 } -1 40012 if (!_vNode) { -1 40013 _vNode = new axe.VirtualNode(node, parentVNode); -1 40014 } -1 40015 _vNode._stackingOrder = getStackingOrder(_vNode, parentVNode); -1 40016 var scrollRegionParent = findScrollRegionParent(_vNode, parentVNode); -1 40017 var grid = scrollRegionParent ? scrollRegionParent._subGrid : rootGrid; -1 40018 if (get_scroll_default(_vNode.actualNode)) { -1 40019 var _subGrid = { -1 40020 container: _vNode, -1 40021 cells: [] -1 40022 }; -1 40023 _vNode._subGrid = _subGrid; 21628 40024 }21629 -1 if (Object(_commons_forms__WEBPACK_IMPORTED_MODULE_2__['isDisabled'])(virtualNode)) {21630 -1 return false;-1 40025 var rect = _vNode.boundingClientRect; -1 40026 if (rect.width !== 0 && rect.height !== 0 && is_visible_default(node)) { -1 40027 addNodeToGrid(grid, _vNode); 21631 40028 }21632 -1 var formElements = [ 'input', 'select', 'textarea' ];21633 -1 if (formElements.includes(nodeName)) {21634 -1 var style = window.getComputedStyle(node);21635 -1 var textIndent = parseInt(style.getPropertyValue('text-indent'), 10);21636 -1 if (textIndent) {21637 -1 var rect = node.getBoundingClientRect();21638 -1 rect = {21639 -1 top: rect.top,21640 -1 bottom: rect.bottom,21641 -1 left: rect.left + textIndent,21642 -1 right: rect.right + textIndent21643 -1 };21644 -1 if (!Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['visuallyOverlaps'])(rect, node)) {21645 -1 return false;21646 -1 }21647 -1 }21648 -1 return true;-1 40029 if (is_shadow_root_default(node)) { -1 40030 createGrid(node.shadowRoot, grid, _vNode); 21649 40031 }21650 -1 var nodeParentLabel = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['findUpVirtual'])(virtualNode, 'label');21651 -1 if (nodeName === 'label' || nodeParentLabel) {21652 -1 var labelNode = nodeParentLabel || node;21653 -1 var labelVirtual = nodeParentLabel ? Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['getNodeFromTree'])(nodeParentLabel) : virtualNode;21654 -1 var doc = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getRootNode'])(labelNode);21655 -1 var explicitControl = doc.getElementById(labelNode.htmlFor || '');21656 -1 var explicitControlVirtual = explicitControl && Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['getNodeFromTree'])(explicitControl);21657 -1 if (explicitControlVirtual && Object(_commons_forms__WEBPACK_IMPORTED_MODULE_2__['isDisabled'])(explicitControlVirtual)) {21658 -1 return false;-1 40032 node = treeWalker.nextNode(); -1 40033 } -1 40034 } -1 40035 function getRectStack(grid, rect) { -1 40036 var recursed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; -1 40037 var x = rect.left + rect.width / 2; -1 40038 var y = rect.top + rect.height / 2; -1 40039 var row = y / gridSize | 0; -1 40040 var col = x / gridSize | 0; -1 40041 var stack = grid.cells[row][col].filter(function(gridCellNode) { -1 40042 return gridCellNode.clientRects.find(function(clientRect) { -1 40043 var rectX = clientRect.left; -1 40044 var rectY = clientRect.top; -1 40045 return x <= rectX + clientRect.width && x >= rectX && y <= rectY + clientRect.height && y >= rectY; -1 40046 }); -1 40047 }); -1 40048 var gridContainer = grid.container; -1 40049 if (gridContainer) { -1 40050 stack = getRectStack(gridContainer._grid, gridContainer.boundingClientRect, true).concat(stack); -1 40051 } -1 40052 if (!recursed) { -1 40053 stack = stack.sort(visuallySort).map(function(vNode) { -1 40054 return vNode.actualNode; -1 40055 }).concat(document.documentElement).filter(function(node, index, array) { -1 40056 return array.indexOf(node) === index; -1 40057 }); -1 40058 } -1 40059 return stack; -1 40060 } -1 40061 function getElementStack(node) { -1 40062 if (!cache_default.get('gridCreated')) { -1 40063 createGrid(); -1 40064 cache_default.set('gridCreated', true); -1 40065 } -1 40066 var vNode = get_node_from_tree_default(node); -1 40067 var grid = vNode._grid; -1 40068 if (!grid) { -1 40069 return []; -1 40070 } -1 40071 return getRectStack(grid, vNode.boundingClientRect); -1 40072 } -1 40073 var get_element_stack_default = getElementStack; -1 40074 function getTabbableElements(virtualNode) { -1 40075 var nodeAndDescendents = query_selector_all_default(virtualNode, '*'); -1 40076 var tabbableElements = nodeAndDescendents.filter(function(vNode) { -1 40077 var isFocusable2 = vNode.isFocusable; -1 40078 var tabIndex = vNode.actualNode.getAttribute('tabindex'); -1 40079 tabIndex = tabIndex && !isNaN(parseInt(tabIndex, 10)) ? parseInt(tabIndex) : null; -1 40080 return tabIndex ? isFocusable2 && tabIndex >= 0 : isFocusable2; -1 40081 }); -1 40082 return tabbableElements; -1 40083 } -1 40084 var get_tabbable_elements_default = getTabbableElements; -1 40085 function sanitize(str) { -1 40086 if (!str) { -1 40087 return ''; -1 40088 } -1 40089 return str.replace(/\r\n/g, '\n').replace(/\u00A0/g, ' ').replace(/[\s]{2,}/g, ' ').trim(); -1 40090 } -1 40091 var sanitize_default = sanitize; -1 40092 function getTextElementStack(node) { -1 40093 if (!cache_default.get('gridCreated')) { -1 40094 createGrid(); -1 40095 cache_default.set('gridCreated', true); -1 40096 } -1 40097 var vNode = get_node_from_tree_default(node); -1 40098 var grid = vNode._grid; -1 40099 if (!grid) { -1 40100 return []; -1 40101 } -1 40102 var nodeRect = vNode.boundingClientRect; -1 40103 var clientRects = []; -1 40104 Array.from(node.childNodes).forEach(function(elm) { -1 40105 if (elm.nodeType === 3 && sanitize_default(elm.textContent) !== '') { -1 40106 var range = document.createRange(); -1 40107 range.selectNodeContents(elm); -1 40108 var rects = range.getClientRects(); -1 40109 var outsideRectBounds = Array.from(rects).some(function(rect) { -1 40110 var horizontalMidpoint = rect.left + rect.width / 2; -1 40111 var verticalMidpoint = rect.top + rect.height / 2; -1 40112 return horizontalMidpoint < nodeRect.left || horizontalMidpoint > nodeRect.right || verticalMidpoint < nodeRect.top || verticalMidpoint > nodeRect.bottom; -1 40113 }); -1 40114 if (outsideRectBounds) { -1 40115 return; 21659 40116 }21660 -1 var query = 'input:not([type="hidden"]):not([type="image"])' + ':not([type="button"]):not([type="submit"]):not([type="reset"]), select, textarea';21661 -1 var implicitControl = Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['querySelectorAll'])(labelVirtual, query)[0];21662 -1 if (implicitControl && Object(_commons_forms__WEBPACK_IMPORTED_MODULE_2__['isDisabled'])(implicitControl)) {21663 -1 return false;-1 40117 for (var _i6 = 0; _i6 < rects.length; _i6++) { -1 40118 var rect = rects[_i6]; -1 40119 if (rect.width >= 1 && rect.height >= 1) { -1 40120 clientRects.push(rect); -1 40121 } 21664 40122 } 21665 40123 }21666 -1 var ariaLabelledbyControls = [];21667 -1 var ancestorNode = virtualNode;21668 -1 while (ancestorNode) {21669 -1 if (ancestorNode.props.id) {21670 -1 var _doc = Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getRootNode'])(node);21671 -1 var escapedId = Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['escapeSelector'])(ancestorNode.props.id);21672 -1 var controls = Array.from(_doc.querySelectorAll('[aria-labelledby~="'.concat(escapedId, '"]')));21673 -1 var virtualControls = controls.map(function(control) {21674 -1 return Object(_core_utils__WEBPACK_IMPORTED_MODULE_3__['getNodeFromTree'])(control);21675 -1 });21676 -1 ariaLabelledbyControls.push.apply(ariaLabelledbyControls, _toConsumableArray(virtualControls));-1 40124 }); -1 40125 if (!clientRects.length) { -1 40126 return [ get_element_stack_default(node) ]; -1 40127 } -1 40128 return clientRects.map(function(rect) { -1 40129 return getRectStack(grid, rect); -1 40130 }); -1 40131 } -1 40132 var get_text_element_stack_default = getTextElementStack; -1 40133 var visualRoles = [ 'checkbox', 'img', 'radio', 'range', 'slider', 'spinbutton', 'textbox' ]; -1 40134 function isVisualContent(element) { -1 40135 var role = element.getAttribute('role'); -1 40136 if (role) { -1 40137 return visualRoles.indexOf(role) !== -1; -1 40138 } -1 40139 switch (element.nodeName.toUpperCase()) { -1 40140 case 'IMG': -1 40141 case 'IFRAME': -1 40142 case 'OBJECT': -1 40143 case 'VIDEO': -1 40144 case 'AUDIO': -1 40145 case 'CANVAS': -1 40146 case 'SVG': -1 40147 case 'MATH': -1 40148 case 'BUTTON': -1 40149 case 'SELECT': -1 40150 case 'TEXTAREA': -1 40151 case 'KEYGEN': -1 40152 case 'PROGRESS': -1 40153 case 'METER': -1 40154 return true; -1 40155 -1 40156 case 'INPUT': -1 40157 return element.type !== 'hidden'; -1 40158 -1 40159 default: -1 40160 return false; -1 40161 } -1 40162 } -1 40163 var is_visual_content_default = isVisualContent; -1 40164 function idrefs(node, attr) { -1 40165 node = node.actualNode || node; -1 40166 try { -1 40167 var doc = get_root_node_default2(node); -1 40168 var result = []; -1 40169 var attrValue = node.getAttribute(attr); -1 40170 if (attrValue) { -1 40171 attrValue = token_list_default(attrValue); -1 40172 for (var index = 0; index < attrValue.length; index++) { -1 40173 result.push(doc.getElementById(attrValue[index])); 21677 40174 }21678 -1 ancestorNode = ancestorNode.parent;21679 -1 }21680 -1 if (ariaLabelledbyControls.length > 0 && ariaLabelledbyControls.every(_commons_forms__WEBPACK_IMPORTED_MODULE_2__['isDisabled'])) {21681 -1 return false;21682 -1 }21683 -1 var visibleText = Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['visibleVirtual'])(virtualNode, false, true);21684 -1 var removeUnicodeOptions = {21685 -1 emoji: true,21686 -1 nonBmp: false,21687 -1 punctuations: true21688 -1 };21689 -1 if (!visibleText || !Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['removeUnicode'])(visibleText, removeUnicodeOptions)) {21690 -1 return false;21691 40175 }21692 -1 var range = document.createRange();21693 -1 var childNodes = virtualNode.children;21694 -1 for (var index = 0; index < childNodes.length; index++) {21695 -1 var child = childNodes[index];21696 -1 if (child.actualNode.nodeType === 3 && Object(_commons_text__WEBPACK_IMPORTED_MODULE_1__['sanitize'])(child.actualNode.nodeValue) !== '') {21697 -1 range.selectNodeContents(child.actualNode);21698 -1 }-1 40176 return result; -1 40177 } catch (e) { -1 40178 throw new TypeError('Cannot resolve id references for non-DOM nodes'); -1 40179 } -1 40180 } -1 40181 var idrefs_default = idrefs; -1 40182 function visibleVirtual(element, screenReader, noRecursing) { -1 40183 var vNode = element instanceof abstract_virtual_node_default ? element : get_node_from_tree_default(element); -1 40184 var visible4 = !element.actualNode || element.actualNode && is_visible_default(element.actualNode, screenReader); -1 40185 var result = vNode.children.map(function(child) { -1 40186 var _child$props = child.props, nodeType = _child$props.nodeType, nodeValue = _child$props.nodeValue; -1 40187 if (nodeType === 3) { -1 40188 if (nodeValue && visible4) { -1 40189 return nodeValue; -1 40190 } -1 40191 } else if (!noRecursing) { -1 40192 return visibleVirtual(child, screenReader); -1 40193 } -1 40194 }).join(''); -1 40195 return sanitize_default(result); -1 40196 } -1 40197 var visible_virtual_default = visibleVirtual; -1 40198 function labelVirtual(virtualNode) { -1 40199 var ref, candidate; -1 40200 if (virtualNode.attr('aria-labelledby')) { -1 40201 ref = idrefs_default(virtualNode.actualNode, 'aria-labelledby'); -1 40202 candidate = ref.map(function(thing) { -1 40203 var vNode = get_node_from_tree_default(thing); -1 40204 return vNode ? visible_virtual_default(vNode, true) : ''; -1 40205 }).join(' ').trim(); -1 40206 if (candidate) { -1 40207 return candidate; 21699 40208 }21700 -1 var rects = range.getClientRects();21701 -1 for (var _index = 0; _index < rects.length; _index++) {21702 -1 if (Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['visuallyOverlaps'])(rects[_index], node)) {21703 -1 return true;21704 -1 }-1 40209 } -1 40210 candidate = virtualNode.attr('aria-label'); -1 40211 if (candidate) { -1 40212 candidate = sanitize_default(candidate); -1 40213 if (candidate) { -1 40214 return candidate; 21705 40215 } -1 40216 } -1 40217 return null; -1 40218 } -1 40219 var label_virtual_default = labelVirtual; -1 40220 var hiddenTextElms = [ 'HEAD', 'TITLE', 'TEMPLATE', 'SCRIPT', 'STYLE', 'IFRAME', 'OBJECT', 'VIDEO', 'AUDIO', 'NOSCRIPT' ]; -1 40221 function hasChildTextNodes(elm) { -1 40222 if (!hiddenTextElms.includes(elm.actualNode.nodeName.toUpperCase())) { -1 40223 return elm.children.some(function(_ref8) { -1 40224 var actualNode = _ref8.actualNode; -1 40225 return actualNode.nodeType === 3 && actualNode.nodeValue.trim(); -1 40226 }); -1 40227 } -1 40228 } -1 40229 function hasContentVirtual(elm, noRecursion, ignoreAria) { -1 40230 return hasChildTextNodes(elm) || is_visual_content_default(elm.actualNode) || !ignoreAria && !!label_virtual_default(elm) || !noRecursion && elm.children.some(function(child) { -1 40231 return child.actualNode.nodeType === 1 && hasContentVirtual(child); -1 40232 }); -1 40233 } -1 40234 var has_content_virtual_default = hasContentVirtual; -1 40235 function hasContent(elm, noRecursion, ignoreAria) { -1 40236 elm = get_node_from_tree_default(elm); -1 40237 return has_content_virtual_default(elm, noRecursion, ignoreAria); -1 40238 } -1 40239 var has_content_default = hasContent; -1 40240 function isHiddenWithCSS(el, descendentVisibilityValue) { -1 40241 var vNode = get_node_from_tree_default(el); -1 40242 if (!vNode) { -1 40243 return _isHiddenWithCSS(el, descendentVisibilityValue); -1 40244 } -1 40245 if (vNode._isHiddenWithCSS === void 0) { -1 40246 vNode._isHiddenWithCSS = _isHiddenWithCSS(el, descendentVisibilityValue); -1 40247 } -1 40248 return vNode._isHiddenWithCSS; -1 40249 } -1 40250 function _isHiddenWithCSS(el, descendentVisibilityValue) { -1 40251 if (el.nodeType === 9) { 21706 40252 return false; 21707 40253 }21708 -1 __webpack_exports__['default'] = colorContrastMatches;21709 -1 },21710 -1 './lib/rules/data-table-large-matches.js': function libRulesDataTableLargeMatchesJs(module, __webpack_exports__, __webpack_require__) {21711 -1 'use strict';21712 -1 __webpack_require__.r(__webpack_exports__);21713 -1 var _commons_table__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/table/index.js');21714 -1 function dataTableLargeMatches(node) {21715 -1 if (Object(_commons_table__WEBPACK_IMPORTED_MODULE_0__['isDataTable'])(node)) {21716 -1 var tableArray = Object(_commons_table__WEBPACK_IMPORTED_MODULE_0__['toArray'])(node);21717 -1 return tableArray.length >= 3 && tableArray[0].length >= 3 && tableArray[1].length >= 3 && tableArray[2].length >= 3;21718 -1 }-1 40254 if (el.nodeType === 11) { -1 40255 el = el.host; -1 40256 } -1 40257 if ([ 'STYLE', 'SCRIPT' ].includes(el.nodeName.toUpperCase())) { 21719 40258 return false; 21720 40259 }21721 -1 __webpack_exports__['default'] = dataTableLargeMatches;21722 -1 },21723 -1 './lib/rules/data-table-matches.js': function libRulesDataTableMatchesJs(module, __webpack_exports__, __webpack_require__) {21724 -1 'use strict';21725 -1 __webpack_require__.r(__webpack_exports__);21726 -1 var _commons_table__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/table/index.js');21727 -1 function dataTableMatches(node) {21728 -1 return Object(_commons_table__WEBPACK_IMPORTED_MODULE_0__['isDataTable'])(node);-1 40260 var style = window.getComputedStyle(el, null); -1 40261 if (!style) { -1 40262 throw new Error('Style does not exist for the given element.'); 21729 40263 }21730 -1 __webpack_exports__['default'] = dataTableMatches;21731 -1 },21732 -1 './lib/rules/duplicate-id-active-matches.js': function libRulesDuplicateIdActiveMatchesJs(module, __webpack_exports__, __webpack_require__) {21733 -1 'use strict';21734 -1 __webpack_require__.r(__webpack_exports__);21735 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');21736 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/index.js');21737 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');21738 -1 function duplicateIdActiveMatches(node) {21739 -1 var id = node.getAttribute('id').trim();21740 -1 var idSelector = '*[id="'.concat(Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['escapeSelector'])(id), '"]');21741 -1 var idMatchingElms = Array.from(Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getRootNode'])(node).querySelectorAll(idSelector));21742 -1 return !Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['isAccessibleRef'])(node) && idMatchingElms.some(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isFocusable']);21743 -1 }21744 -1 __webpack_exports__['default'] = duplicateIdActiveMatches;21745 -1 },21746 -1 './lib/rules/duplicate-id-aria-matches.js': function libRulesDuplicateIdAriaMatchesJs(module, __webpack_exports__, __webpack_require__) {21747 -1 'use strict';21748 -1 __webpack_require__.r(__webpack_exports__);21749 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');21750 -1 function duplicateIdAriaMatches(node) {21751 -1 return Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['isAccessibleRef'])(node);-1 40264 var displayValue = style.getPropertyValue('display'); -1 40265 if (displayValue === 'none') { -1 40266 return true; 21752 40267 }21753 -1 __webpack_exports__['default'] = duplicateIdAriaMatches;21754 -1 },21755 -1 './lib/rules/duplicate-id-misc-matches.js': function libRulesDuplicateIdMiscMatchesJs(module, __webpack_exports__, __webpack_require__) {21756 -1 'use strict';21757 -1 __webpack_require__.r(__webpack_exports__);21758 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');21759 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/index.js');21760 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/core/utils/index.js');21761 -1 function duplicateIdMiscMatches(node) {21762 -1 var id = node.getAttribute('id').trim();21763 -1 var idSelector = '*[id="'.concat(Object(_core_utils__WEBPACK_IMPORTED_MODULE_2__['escapeSelector'])(id), '"]');21764 -1 var idMatchingElms = Array.from(Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['getRootNode'])(node).querySelectorAll(idSelector));21765 -1 return !Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['isAccessibleRef'])(node) && idMatchingElms.every(function(elm) {21766 -1 return !Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isFocusable'])(elm);21767 -1 });-1 40268 var HIDDEN_VISIBILITY_VALUES = [ 'hidden', 'collapse' ]; -1 40269 var visibilityValue = style.getPropertyValue('visibility'); -1 40270 if (HIDDEN_VISIBILITY_VALUES.includes(visibilityValue) && !descendentVisibilityValue) { -1 40271 return true; 21768 40272 }21769 -1 __webpack_exports__['default'] = duplicateIdMiscMatches;21770 -1 },21771 -1 './lib/rules/frame-title-has-text-matches.js': function libRulesFrameTitleHasTextMatchesJs(module, __webpack_exports__, __webpack_require__) {21772 -1 'use strict';21773 -1 __webpack_require__.r(__webpack_exports__);21774 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');21775 -1 function frameTitleHasTextMatches(node) {21776 -1 var title = node.getAttribute('title');21777 -1 return !!(title ? Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['sanitize'])(title).trim() : '');-1 40273 if (HIDDEN_VISIBILITY_VALUES.includes(visibilityValue) && descendentVisibilityValue && HIDDEN_VISIBILITY_VALUES.includes(descendentVisibilityValue)) { -1 40274 return true; 21778 40275 }21779 -1 __webpack_exports__['default'] = frameTitleHasTextMatches;21780 -1 },21781 -1 './lib/rules/heading-matches.js': function libRulesHeadingMatchesJs(module, __webpack_exports__, __webpack_require__) {21782 -1 'use strict';21783 -1 __webpack_require__.r(__webpack_exports__);21784 -1 function headingMatches(node) {21785 -1 var explicitRoles;21786 -1 if (node.hasAttribute('role')) {21787 -1 explicitRoles = node.getAttribute('role').split(/\s+/i).filter(axe.commons.aria.isValidRole);21788 -1 }21789 -1 if (explicitRoles && explicitRoles.length > 0) {21790 -1 return explicitRoles.includes('heading');21791 -1 } else {21792 -1 return axe.commons.aria.implicitRole(node) === 'heading';21793 -1 }-1 40276 var parent = get_composed_parent_default(el); -1 40277 if (parent && !HIDDEN_VISIBILITY_VALUES.includes(visibilityValue)) { -1 40278 return isHiddenWithCSS(parent, visibilityValue); 21794 40279 }21795 -1 __webpack_exports__['default'] = headingMatches;21796 -1 },21797 -1 './lib/rules/html-namespace-matches.js': function libRulesHtmlNamespaceMatchesJs(module, __webpack_exports__, __webpack_require__) {21798 -1 'use strict';21799 -1 __webpack_require__.r(__webpack_exports__);21800 -1 var _svg_namespace_matches__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/rules/svg-namespace-matches.js');21801 -1 function htmlNamespaceMatches(node, virtualNode) {21802 -1 return !Object(_svg_namespace_matches__WEBPACK_IMPORTED_MODULE_0__['default'])(node, virtualNode);-1 40280 return false; -1 40281 } -1 40282 var is_hidden_with_css_default = isHiddenWithCSS; -1 40283 function focusDisabled(el) { -1 40284 var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el); -1 40285 if (vNode.hasAttr('disabled')) { -1 40286 return true; 21803 40287 }21804 -1 __webpack_exports__['default'] = htmlNamespaceMatches;21805 -1 },21806 -1 './lib/rules/identical-links-same-purpose-matches.js': function libRulesIdenticalLinksSamePurposeMatchesJs(module, __webpack_exports__, __webpack_require__) {21807 -1 'use strict';21808 -1 __webpack_require__.r(__webpack_exports__);21809 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');21810 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/index.js');21811 -1 function identicalLinksSamePurposeMatches(node, virtualNode) {21812 -1 var hasAccName = !!Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['accessibleTextVirtual'])(virtualNode);21813 -1 if (!hasAccName) {-1 40288 if (vNode.props.nodeName !== 'area') { -1 40289 if (!vNode.actualNode) { 21814 40290 return false; 21815 40291 }21816 -1 var role = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['getRole'])(node);21817 -1 if (role && role !== 'link') {21818 -1 return false;-1 40292 return is_hidden_with_css_default(vNode.actualNode); -1 40293 } -1 40294 return false; -1 40295 } -1 40296 var focus_disabled_default = focusDisabled; -1 40297 function isNativelyFocusable(el) { -1 40298 var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el); -1 40299 if (!vNode || focus_disabled_default(vNode)) { -1 40300 return false; -1 40301 } -1 40302 switch (vNode.props.nodeName) { -1 40303 case 'a': -1 40304 case 'area': -1 40305 if (vNode.hasAttr('href')) { -1 40306 return true; 21819 40307 } -1 40308 break; -1 40309 -1 40310 case 'input': -1 40311 return vNode.props.type !== 'hidden'; -1 40312 -1 40313 case 'textarea': -1 40314 case 'select': -1 40315 case 'summary': -1 40316 case 'button': 21820 40317 return true; -1 40318 -1 40319 case 'details': -1 40320 return !query_selector_all_default(vNode, 'summary').length; 21821 40321 }21822 -1 __webpack_exports__['default'] = identicalLinksSamePurposeMatches;21823 -1 },21824 -1 './lib/rules/inserted-into-focus-order-matches.js': function libRulesInsertedIntoFocusOrderMatchesJs(module, __webpack_exports__, __webpack_require__) {21825 -1 'use strict';21826 -1 __webpack_require__.r(__webpack_exports__);21827 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');21828 -1 function insertedIntoFocusOrderMatches(node) {21829 -1 return Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['insertedIntoFocusOrder'])(node);-1 40322 return false; -1 40323 } -1 40324 var is_natively_focusable_default = isNativelyFocusable; -1 40325 function isFocusable(el) { -1 40326 var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el); -1 40327 if (vNode.props.nodeType !== 1) { -1 40328 return false; 21830 40329 }21831 -1 __webpack_exports__['default'] = insertedIntoFocusOrderMatches;21832 -1 },21833 -1 './lib/rules/label-content-name-mismatch-matches.js': function libRulesLabelContentNameMismatchMatchesJs(module, __webpack_exports__, __webpack_require__) {21834 -1 'use strict';21835 -1 __webpack_require__.r(__webpack_exports__);21836 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/aria/index.js');21837 -1 var _commons_standards__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/standards/index.js');21838 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/text/index.js');21839 -1 function labelContentNameMismatchMatches(node, virtualNode) {21840 -1 var role = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['getRole'])(node);21841 -1 if (!role) {21842 -1 return false;21843 -1 }21844 -1 var widgetRoles = Object(_commons_standards__WEBPACK_IMPORTED_MODULE_1__['getAriaRolesByType'])('widget');21845 -1 var isWidgetType = widgetRoles.includes(role);21846 -1 if (!isWidgetType) {21847 -1 return false;21848 -1 }21849 -1 var rolesWithNameFromContents = Object(_commons_standards__WEBPACK_IMPORTED_MODULE_1__['getAriaRolesSupportingNameFromContent'])();21850 -1 if (!rolesWithNameFromContents.includes(role)) {21851 -1 return false;21852 -1 }21853 -1 if (!Object(_commons_text__WEBPACK_IMPORTED_MODULE_2__['sanitize'])(Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['arialabelText'])(virtualNode)) && !Object(_commons_text__WEBPACK_IMPORTED_MODULE_2__['sanitize'])(Object(_commons_aria__WEBPACK_IMPORTED_MODULE_0__['arialabelledbyText'])(node))) {21854 -1 return false;21855 -1 }21856 -1 if (!Object(_commons_text__WEBPACK_IMPORTED_MODULE_2__['sanitize'])(Object(_commons_text__WEBPACK_IMPORTED_MODULE_2__['visibleVirtual'])(virtualNode))) {21857 -1 return false;21858 -1 }-1 40330 if (focus_disabled_default(vNode)) { -1 40331 return false; -1 40332 } else if (is_natively_focusable_default(vNode)) { 21859 40333 return true; 21860 40334 }21861 -1 __webpack_exports__['default'] = labelContentNameMismatchMatches;21862 -1 },21863 -1 './lib/rules/label-matches.js': function libRulesLabelMatchesJs(module, __webpack_exports__, __webpack_require__) {21864 -1 'use strict';21865 -1 __webpack_require__.r(__webpack_exports__);21866 -1 function labelMatches(node, virtualNode) {21867 -1 if (virtualNode.props.nodeName !== 'input' || virtualNode.hasAttr('type') === false) {21868 -1 return true;21869 -1 }21870 -1 var type = virtualNode.attr('type').toLowerCase();21871 -1 return [ 'hidden', 'image', 'button', 'submit', 'reset' ].includes(type) === false;-1 40335 var tabindex = vNode.attr('tabindex'); -1 40336 if (tabindex && !isNaN(parseInt(tabindex, 10))) { -1 40337 return true; 21872 40338 }21873 -1 __webpack_exports__['default'] = labelMatches;21874 -1 },21875 -1 './lib/rules/landmark-has-body-context-matches.js': function libRulesLandmarkHasBodyContextMatchesJs(module, __webpack_exports__, __webpack_require__) {21876 -1 'use strict';21877 -1 __webpack_require__.r(__webpack_exports__);21878 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');21879 -1 function landmarkHasBodyContextMatches(node, virtualNode) {21880 -1 var nativeScopeFilter = 'article, aside, main, nav, section';21881 -1 return node.hasAttribute('role') || !Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['findUpVirtual'])(virtualNode, nativeScopeFilter);-1 40339 return false; -1 40340 } -1 40341 var is_focusable_default = isFocusable; -1 40342 function insertedIntoFocusOrder(el) { -1 40343 var tabIndex = parseInt(el.getAttribute('tabindex'), 10); -1 40344 return tabIndex > -1 && is_focusable_default(el) && !is_natively_focusable_default(el); -1 40345 } -1 40346 var inserted_into_focus_order_default = insertedIntoFocusOrder; -1 40347 function isHTML5(doc) { -1 40348 var node = doc.doctype; -1 40349 if (node === null) { -1 40350 return false; 21882 40351 }21883 -1 __webpack_exports__['default'] = landmarkHasBodyContextMatches;21884 -1 },21885 -1 './lib/rules/landmark-unique-matches.js': function libRulesLandmarkUniqueMatchesJs(module, __webpack_exports__, __webpack_require__) {21886 -1 'use strict';21887 -1 __webpack_require__.r(__webpack_exports__);21888 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');21889 -1 var _commons_aria__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/aria/index.js');21890 -1 var _commons_standards__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/commons/standards/index.js');21891 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/commons/text/index.js');21892 -1 function landmarkUniqueMatches(node, virtualNode) {21893 -1 var excludedParentsForHeaderFooterLandmarks = [ 'article', 'aside', 'main', 'nav', 'section' ].join(',');21894 -1 function isHeaderFooterLandmark(headerFooterElement) {21895 -1 return !Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['findUpVirtual'])(headerFooterElement, excludedParentsForHeaderFooterLandmarks);21896 -1 }21897 -1 function isLandmarkVirtual(virtualNode) {21898 -1 var actualNode = virtualNode.actualNode;21899 -1 var landmarkRoles = Object(_commons_standards__WEBPACK_IMPORTED_MODULE_2__['getAriaRolesByType'])('landmark');21900 -1 var role = Object(_commons_aria__WEBPACK_IMPORTED_MODULE_1__['getRole'])(actualNode);21901 -1 if (!role) {21902 -1 return false;21903 -1 }21904 -1 var nodeName = actualNode.nodeName.toUpperCase();21905 -1 if (nodeName === 'HEADER' || nodeName === 'FOOTER') {21906 -1 return isHeaderFooterLandmark(virtualNode);21907 -1 }21908 -1 if (nodeName === 'SECTION' || nodeName === 'FORM') {21909 -1 var accessibleText = Object(_commons_text__WEBPACK_IMPORTED_MODULE_3__['accessibleTextVirtual'])(virtualNode);21910 -1 return !!accessibleText;21911 -1 }21912 -1 return landmarkRoles.indexOf(role) >= 0 || role === 'region';21913 -1 }21914 -1 return isLandmarkVirtual(virtualNode) && Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isVisible'])(node, true);-1 40352 return node.name === 'html' && !node.publicId && !node.systemId; -1 40353 } -1 40354 var is_html5_default = isHTML5; -1 40355 function walkDomNode(node, functor) { -1 40356 if (functor(node.actualNode) !== false) { -1 40357 node.children.forEach(function(child) { -1 40358 return walkDomNode(child, functor); -1 40359 }); 21915 40360 }21916 -1 __webpack_exports__['default'] = landmarkUniqueMatches;21917 -1 },21918 -1 './lib/rules/layout-table-matches.js': function libRulesLayoutTableMatchesJs(module, __webpack_exports__, __webpack_require__) {21919 -1 'use strict';21920 -1 __webpack_require__.r(__webpack_exports__);21921 -1 var _commons_table__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/table/index.js');21922 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/index.js');21923 -1 function dataTableMatches(node) {21924 -1 return !Object(_commons_table__WEBPACK_IMPORTED_MODULE_0__['isDataTable'])(node) && !Object(_commons_dom__WEBPACK_IMPORTED_MODULE_1__['isFocusable'])(node);-1 40361 } -1 40362 var blockLike = [ 'block', 'list-item', 'table', 'flex', 'grid', 'inline-block' ]; -1 40363 function isBlock(elm) { -1 40364 var display = window.getComputedStyle(elm).getPropertyValue('display'); -1 40365 return blockLike.includes(display) || display.substr(0, 6) === 'table-'; -1 40366 } -1 40367 function getBlockParent(node) { -1 40368 var parentBlock = get_composed_parent_default(node); -1 40369 while (parentBlock && !isBlock(parentBlock)) { -1 40370 parentBlock = get_composed_parent_default(parentBlock); 21925 40371 }21926 -1 __webpack_exports__['default'] = dataTableMatches;21927 -1 },21928 -1 './lib/rules/link-in-text-block-matches.js': function libRulesLinkInTextBlockMatchesJs(module, __webpack_exports__, __webpack_require__) {21929 -1 'use strict';21930 -1 __webpack_require__.r(__webpack_exports__);21931 -1 var _commons_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/text/index.js');21932 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/commons/dom/index.js');21933 -1 function linkInTextBlockMatches(node) {21934 -1 var text = Object(_commons_text__WEBPACK_IMPORTED_MODULE_0__['sanitize'])(node.textContent);21935 -1 var role = node.getAttribute('role');21936 -1 if (role && role !== 'link') {-1 40372 return get_node_from_tree_default(parentBlock); -1 40373 } -1 40374 function isInTextBlock(node) { -1 40375 if (isBlock(node)) { -1 40376 return false; -1 40377 } -1 40378 var virtualParent = getBlockParent(node); -1 40379 var parentText = ''; -1 40380 var linkText = ''; -1 40381 var inBrBlock = 0; -1 40382 walkDomNode(virtualParent, function(currNode) { -1 40383 if (inBrBlock === 2) { 21937 40384 return false; 21938 40385 }21939 -1 if (!text) {21940 -1 return false;-1 40386 if (currNode.nodeType === 3) { -1 40387 parentText += currNode.nodeValue; 21941 40388 }21942 -1 if (!Object(_commons_dom__WEBPACK_IMPORTED_MODULE_1__['isVisible'])(node, false)) {21943 -1 return false;-1 40389 if (currNode.nodeType !== 1) { -1 40390 return; 21944 40391 }21945 -1 return Object(_commons_dom__WEBPACK_IMPORTED_MODULE_1__['isInTextBlock'])(node);21946 -1 }21947 -1 __webpack_exports__['default'] = linkInTextBlockMatches;21948 -1 },21949 -1 './lib/rules/no-autoplay-audio-matches.js': function libRulesNoAutoplayAudioMatchesJs(module, __webpack_exports__, __webpack_require__) {21950 -1 'use strict';21951 -1 __webpack_require__.r(__webpack_exports__);21952 -1 function noAutoplayAudioMatches(node) {21953 -1 if (!node.currentSrc) {-1 40392 var nodeName2 = (currNode.nodeName || '').toUpperCase(); -1 40393 if ([ 'BR', 'HR' ].includes(nodeName2)) { -1 40394 if (inBrBlock === 0) { -1 40395 parentText = ''; -1 40396 linkText = ''; -1 40397 } else { -1 40398 inBrBlock = 2; -1 40399 } -1 40400 } else if (currNode.style.display === 'none' || currNode.style.overflow === 'hidden' || ![ '', null, 'none' ].includes(currNode.style['float']) || ![ '', null, 'relative' ].includes(currNode.style.position)) { 21954 40401 return false;21955 -1 }21956 -1 if (node.hasAttribute('paused') || node.hasAttribute('muted')) {-1 40402 } else if (nodeName2 === 'A' && currNode.href || (currNode.getAttribute('role') || '').toLowerCase() === 'link') { -1 40403 if (currNode === node) { -1 40404 inBrBlock = 1; -1 40405 } -1 40406 linkText += currNode.textContent; 21957 40407 return false; 21958 40408 } -1 40409 }); -1 40410 parentText = sanitize_default(parentText); -1 40411 linkText = sanitize_default(linkText); -1 40412 return parentText.length > linkText.length; -1 40413 } -1 40414 var is_in_text_block_default = isInTextBlock; -1 40415 function isModalOpen(options) { -1 40416 options = options || {}; -1 40417 var modalPercent = options.modalPercent || .75; -1 40418 if (cache_default.get('isModalOpen')) { -1 40419 return cache_default.get('isModalOpen'); -1 40420 } -1 40421 var definiteModals = query_selector_all_filter_default(axe._tree[0], 'dialog, [role=dialog], [aria-modal=true]', function(vNode) { -1 40422 return is_visible_default(vNode.actualNode); -1 40423 }); -1 40424 if (definiteModals.length) { -1 40425 cache_default.set('isModalOpen', true); 21959 40426 return true; 21960 40427 }21961 -1 __webpack_exports__['default'] = noAutoplayAudioMatches;21962 -1 },21963 -1 './lib/rules/no-empty-role-matches.js': function libRulesNoEmptyRoleMatchesJs(module, __webpack_exports__, __webpack_require__) {21964 -1 'use strict';21965 -1 __webpack_require__.r(__webpack_exports__);21966 -1 function noEmptyRoleMatches(node, virtualNode) {21967 -1 if (!virtualNode.hasAttr('role')) {21968 -1 return false;-1 40428 var viewport = get_viewport_size_default(window); -1 40429 var percentWidth = viewport.width * modalPercent; -1 40430 var percentHeight = viewport.height * modalPercent; -1 40431 var x = (viewport.width - percentWidth) / 2; -1 40432 var y = (viewport.height - percentHeight) / 2; -1 40433 var points = [ { -1 40434 x: x, -1 40435 y: y -1 40436 }, { -1 40437 x: viewport.width - x, -1 40438 y: y -1 40439 }, { -1 40440 x: viewport.width / 2, -1 40441 y: viewport.height / 2 -1 40442 }, { -1 40443 x: x, -1 40444 y: viewport.height - y -1 40445 }, { -1 40446 x: viewport.width - x, -1 40447 y: viewport.height - y -1 40448 } ]; -1 40449 var stacks = points.map(function(point) { -1 40450 return Array.from(document.elementsFromPoint(point.x, point.y)); -1 40451 }); -1 40452 var _loop3 = function _loop3(_i7) { -1 40453 var modalElement = stacks[_i7].find(function(elm) { -1 40454 var style = window.getComputedStyle(elm); -1 40455 return parseInt(style.width, 10) >= percentWidth && parseInt(style.height, 10) >= percentHeight && style.getPropertyValue('pointer-events') !== 'none' && (style.position === 'absolute' || style.position === 'fixed'); -1 40456 }); -1 40457 if (modalElement && stacks.every(function(stack) { -1 40458 return stack.includes(modalElement); -1 40459 })) { -1 40460 cache_default.set('isModalOpen', true); -1 40461 return { -1 40462 v: true -1 40463 }; 21969 40464 }21970 -1 if (!virtualNode.attr('role').trim()) {21971 -1 return false;-1 40465 }; -1 40466 for (var _i7 = 0; _i7 < stacks.length; _i7++) { -1 40467 var _ret = _loop3(_i7); -1 40468 if (_typeof(_ret) === 'object') { -1 40469 return _ret.v; -1 40470 } -1 40471 } -1 40472 cache_default.set('isModalOpen', void 0); -1 40473 return void 0; -1 40474 } -1 40475 var is_modal_open_default = isModalOpen; -1 40476 function isNode(element) { -1 40477 return element instanceof window.Node; -1 40478 } -1 40479 var is_node_default = isNode; -1 40480 var data = {}; -1 40481 var incompleteData = { -1 40482 set: function set(key, reason) { -1 40483 if (typeof key !== 'string') { -1 40484 throw new Error('Incomplete data: key must be a string'); -1 40485 } -1 40486 if (reason) { -1 40487 data[key] = reason; 21972 40488 } -1 40489 return data[key]; -1 40490 }, -1 40491 get: function get(key) { -1 40492 return data[key]; -1 40493 }, -1 40494 clear: function clear() { -1 40495 data = {}; -1 40496 } -1 40497 }; -1 40498 var incomplete_data_default = incompleteData; -1 40499 function elementHasImage(elm, style) { -1 40500 var graphicNodes = [ 'IMG', 'CANVAS', 'OBJECT', 'IFRAME', 'VIDEO', 'SVG' ]; -1 40501 var nodeName2 = elm.nodeName.toUpperCase(); -1 40502 if (graphicNodes.includes(nodeName2)) { -1 40503 incomplete_data_default.set('bgColor', 'imgNode'); 21973 40504 return true; 21974 40505 }21975 -1 __webpack_exports__['default'] = noEmptyRoleMatches;21976 -1 },21977 -1 './lib/rules/no-role-matches.js': function libRulesNoRoleMatchesJs(module, __webpack_exports__, __webpack_require__) {21978 -1 'use strict';21979 -1 __webpack_require__.r(__webpack_exports__);21980 -1 function noRoleMatches(node) {21981 -1 return !node.getAttribute('role');-1 40506 style = style || window.getComputedStyle(elm); -1 40507 var bgImageStyle = style.getPropertyValue('background-image'); -1 40508 var hasBgImage = bgImageStyle !== 'none'; -1 40509 if (hasBgImage) { -1 40510 var hasGradient = /gradient/.test(bgImageStyle); -1 40511 incomplete_data_default.set('bgColor', hasGradient ? 'bgGradient' : 'bgImage'); 21982 40512 }21983 -1 __webpack_exports__['default'] = noRoleMatches;21984 -1 },21985 -1 './lib/rules/not-html-matches.js': function libRulesNotHtmlMatchesJs(module, __webpack_exports__, __webpack_require__) {21986 -1 'use strict';21987 -1 __webpack_require__.r(__webpack_exports__);21988 -1 function notHtmlMatches(node) {21989 -1 return node.nodeName.toLowerCase() !== 'html';-1 40513 return hasBgImage; -1 40514 } -1 40515 var element_has_image_default = elementHasImage; -1 40516 var ariaAttrs = { -1 40517 'aria-activedescendant': { -1 40518 type: 'idref', -1 40519 allowEmpty: true -1 40520 }, -1 40521 'aria-atomic': { -1 40522 type: 'boolean', -1 40523 global: true -1 40524 }, -1 40525 'aria-autocomplete': { -1 40526 type: 'nmtoken', -1 40527 values: [ 'inline', 'list', 'both', 'none' ] -1 40528 }, -1 40529 'aria-busy': { -1 40530 type: 'boolean', -1 40531 global: true -1 40532 }, -1 40533 'aria-checked': { -1 40534 type: 'nmtoken', -1 40535 values: [ 'false', 'mixed', 'true', 'undefined' ] -1 40536 }, -1 40537 'aria-colcount': { -1 40538 type: 'int', -1 40539 minValue: -1 -1 40540 }, -1 40541 'aria-colindex': { -1 40542 type: 'int', -1 40543 minValue: 1 -1 40544 }, -1 40545 'aria-colspan': { -1 40546 type: 'int', -1 40547 minValue: 1 -1 40548 }, -1 40549 'aria-controls': { -1 40550 type: 'idrefs', -1 40551 allowEmpty: true, -1 40552 global: true -1 40553 }, -1 40554 'aria-current': { -1 40555 type: 'nmtoken', -1 40556 allowEmpty: true, -1 40557 values: [ 'page', 'step', 'location', 'date', 'time', 'true', 'false' ], -1 40558 global: true -1 40559 }, -1 40560 'aria-describedby': { -1 40561 type: 'idrefs', -1 40562 allowEmpty: true, -1 40563 global: true -1 40564 }, -1 40565 'aria-details': { -1 40566 type: 'idref', -1 40567 allowEmpty: true, -1 40568 global: true -1 40569 }, -1 40570 'aria-disabled': { -1 40571 type: 'boolean', -1 40572 global: true -1 40573 }, -1 40574 'aria-dropeffect': { -1 40575 type: 'nmtokens', -1 40576 values: [ 'copy', 'execute', 'link', 'move', 'none', 'popup' ], -1 40577 global: true -1 40578 }, -1 40579 'aria-errormessage': { -1 40580 type: 'idref', -1 40581 allowEmpty: true, -1 40582 global: true -1 40583 }, -1 40584 'aria-expanded': { -1 40585 type: 'nmtoken', -1 40586 values: [ 'true', 'false', 'undefined' ] -1 40587 }, -1 40588 'aria-flowto': { -1 40589 type: 'idrefs', -1 40590 allowEmpty: true, -1 40591 global: true -1 40592 }, -1 40593 'aria-grabbed': { -1 40594 type: 'nmtoken', -1 40595 values: [ 'true', 'false', 'undefined' ], -1 40596 global: true -1 40597 }, -1 40598 'aria-haspopup': { -1 40599 type: 'nmtoken', -1 40600 allowEmpty: true, -1 40601 values: [ 'true', 'false', 'menu', 'listbox', 'tree', 'grid', 'dialog' ], -1 40602 global: true -1 40603 }, -1 40604 'aria-hidden': { -1 40605 type: 'nmtoken', -1 40606 values: [ 'true', 'false', 'undefined' ], -1 40607 global: true -1 40608 }, -1 40609 'aria-invalid': { -1 40610 type: 'nmtoken', -1 40611 allowEmpty: true, -1 40612 values: [ 'grammar', 'false', 'spelling', 'true' ], -1 40613 global: true -1 40614 }, -1 40615 'aria-keyshortcuts': { -1 40616 type: 'string', -1 40617 allowEmpty: true, -1 40618 global: true -1 40619 }, -1 40620 'aria-label': { -1 40621 type: 'string', -1 40622 allowEmpty: true, -1 40623 global: true -1 40624 }, -1 40625 'aria-labelledby': { -1 40626 type: 'idrefs', -1 40627 allowEmpty: true, -1 40628 global: true -1 40629 }, -1 40630 'aria-level': { -1 40631 type: 'int', -1 40632 minValue: 1 -1 40633 }, -1 40634 'aria-live': { -1 40635 type: 'nmtoken', -1 40636 values: [ 'assertive', 'off', 'polite' ], -1 40637 global: true -1 40638 }, -1 40639 'aria-modal': { -1 40640 type: 'boolean' -1 40641 }, -1 40642 'aria-multiline': { -1 40643 type: 'boolean' -1 40644 }, -1 40645 'aria-multiselectable': { -1 40646 type: 'boolean' -1 40647 }, -1 40648 'aria-orientation': { -1 40649 type: 'nmtoken', -1 40650 values: [ 'horizontal', 'undefined', 'vertical' ] -1 40651 }, -1 40652 'aria-owns': { -1 40653 type: 'idrefs', -1 40654 allowEmpty: true, -1 40655 global: true -1 40656 }, -1 40657 'aria-placeholder': { -1 40658 type: 'string', -1 40659 allowEmpty: true -1 40660 }, -1 40661 'aria-posinset': { -1 40662 type: 'int', -1 40663 minValue: 1 -1 40664 }, -1 40665 'aria-pressed': { -1 40666 type: 'nmtoken', -1 40667 values: [ 'false', 'mixed', 'true', 'undefined' ] -1 40668 }, -1 40669 'aria-readonly': { -1 40670 type: 'boolean' -1 40671 }, -1 40672 'aria-relevant': { -1 40673 type: 'nmtokens', -1 40674 values: [ 'additions', 'all', 'removals', 'text' ], -1 40675 global: true -1 40676 }, -1 40677 'aria-required': { -1 40678 type: 'boolean' -1 40679 }, -1 40680 'aria-roledescription': { -1 40681 type: 'string', -1 40682 allowEmpty: true, -1 40683 global: true -1 40684 }, -1 40685 'aria-rowcount': { -1 40686 type: 'int', -1 40687 minValue: -1 -1 40688 }, -1 40689 'aria-rowindex': { -1 40690 type: 'int', -1 40691 minValue: 1 -1 40692 }, -1 40693 'aria-rowspan': { -1 40694 type: 'int', -1 40695 minValue: 0 -1 40696 }, -1 40697 'aria-selected': { -1 40698 type: 'nmtoken', -1 40699 values: [ 'false', 'true', 'undefined' ] -1 40700 }, -1 40701 'aria-setsize': { -1 40702 type: 'int', -1 40703 minValue: -1 -1 40704 }, -1 40705 'aria-sort': { -1 40706 type: 'nmtoken', -1 40707 values: [ 'ascending', 'descending', 'none', 'other' ] -1 40708 }, -1 40709 'aria-valuemax': { -1 40710 type: 'decimal' -1 40711 }, -1 40712 'aria-valuemin': { -1 40713 type: 'decimal' -1 40714 }, -1 40715 'aria-valuenow': { -1 40716 type: 'decimal' -1 40717 }, -1 40718 'aria-valuetext': { -1 40719 type: 'string' 21990 40720 }21991 -1 __webpack_exports__['default'] = notHtmlMatches;21992 -1 },21993 -1 './lib/rules/p-as-heading-matches.js': function libRulesPAsHeadingMatchesJs(module, __webpack_exports__, __webpack_require__) {21994 -1 'use strict';21995 -1 __webpack_require__.r(__webpack_exports__);21996 -1 function pAsHeadingMatches(node) {21997 -1 var children = Array.from(node.parentNode.childNodes);21998 -1 var nodeText = node.textContent.trim();21999 -1 var isSentence = /[.!?:;](?![.!?:;])/g;22000 -1 if (nodeText.length === 0 || (nodeText.match(isSentence) || []).length >= 2) {22001 -1 return false;22002 -1 }22003 -1 var siblingsAfter = children.slice(children.indexOf(node) + 1).filter(function(elm) {22004 -1 return elm.nodeName.toUpperCase() === 'P' && elm.textContent.trim() !== '';22005 -1 });22006 -1 return siblingsAfter.length !== 0;-1 40721 }; -1 40722 var aria_attrs_default = ariaAttrs; -1 40723 var ariaRoles = { -1 40724 alert: { -1 40725 type: 'widget', -1 40726 allowedAttrs: [ 'aria-expanded' ], -1 40727 superclassRole: [ 'section' ] -1 40728 }, -1 40729 alertdialog: { -1 40730 type: 'widget', -1 40731 allowedAttrs: [ 'aria-expanded', 'aria-modal' ], -1 40732 superclassRole: [ 'alert', 'dialog' ], -1 40733 accessibleNameRequired: true -1 40734 }, -1 40735 application: { -1 40736 type: 'landmark', -1 40737 allowedAttrs: [ 'aria-activedescendant', 'aria-expanded' ], -1 40738 superclassRole: [ 'structure' ], -1 40739 accessibleNameRequired: true -1 40740 }, -1 40741 article: { -1 40742 type: 'structure', -1 40743 allowedAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded' ], -1 40744 superclassRole: [ 'document' ] -1 40745 }, -1 40746 banner: { -1 40747 type: 'landmark', -1 40748 allowedAttrs: [ 'aria-expanded' ], -1 40749 superclassRole: [ 'landmark' ] -1 40750 }, -1 40751 blockquote: { -1 40752 type: 'structure', -1 40753 superclassRole: [ 'section' ] -1 40754 }, -1 40755 button: { -1 40756 type: 'widget', -1 40757 allowedAttrs: [ 'aria-expanded', 'aria-pressed' ], -1 40758 superclassRole: [ 'command' ], -1 40759 accessibleNameRequired: true, -1 40760 nameFromContent: true, -1 40761 childrenPresentational: true -1 40762 }, -1 40763 caption: { -1 40764 type: 'structure', -1 40765 requiredContext: [ 'figure', 'table', 'grid', 'treegrid' ], -1 40766 superclassRole: [ 'section' ], -1 40767 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ] -1 40768 }, -1 40769 cell: { -1 40770 type: 'structure', -1 40771 requiredContext: [ 'row' ], -1 40772 allowedAttrs: [ 'aria-colindex', 'aria-colspan', 'aria-rowindex', 'aria-rowspan', 'aria-expanded' ], -1 40773 superclassRole: [ 'section' ], -1 40774 nameFromContent: true -1 40775 }, -1 40776 checkbox: { -1 40777 type: 'widget', -1 40778 allowedAttrs: [ 'aria-checked', 'aria-readonly', 'aria-required' ], -1 40779 superclassRole: [ 'input' ], -1 40780 accessibleNameRequired: true, -1 40781 nameFromContent: true, -1 40782 childrenPresentational: true -1 40783 }, -1 40784 code: { -1 40785 type: 'structure', -1 40786 superclassRole: [ 'section' ], -1 40787 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ] -1 40788 }, -1 40789 columnheader: { -1 40790 type: 'structure', -1 40791 requiredContext: [ 'row' ], -1 40792 allowedAttrs: [ 'aria-sort', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-readonly', 'aria-required', 'aria-rowindex', 'aria-rowspan', 'aria-selected' ], -1 40793 superclassRole: [ 'cell', 'gridcell', 'sectionhead' ], -1 40794 accessibleNameRequired: false, -1 40795 nameFromContent: true -1 40796 }, -1 40797 combobox: { -1 40798 type: 'composite', -1 40799 requiredOwned: [ 'listbox', 'tree', 'grid', 'dialog', 'textbox' ], -1 40800 requiredAttrs: [ 'aria-expanded' ], -1 40801 allowedAttrs: [ 'aria-controls', 'aria-autocomplete', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-orientation' ], -1 40802 superclassRole: [ 'select' ], -1 40803 accessibleNameRequired: true -1 40804 }, -1 40805 command: { -1 40806 type: 'abstract', -1 40807 superclassRole: [ 'widget' ] -1 40808 }, -1 40809 complementary: { -1 40810 type: 'landmark', -1 40811 allowedAttrs: [ 'aria-expanded' ], -1 40812 superclassRole: [ 'landmark' ] -1 40813 }, -1 40814 composite: { -1 40815 type: 'abstract', -1 40816 superclassRole: [ 'widget' ] -1 40817 }, -1 40818 contentinfo: { -1 40819 type: 'landmark', -1 40820 allowedAttrs: [ 'aria-expanded' ], -1 40821 superclassRole: [ 'landmark' ] -1 40822 }, -1 40823 definition: { -1 40824 type: 'structure', -1 40825 allowedAttrs: [ 'aria-expanded' ], -1 40826 superclassRole: [ 'section' ] -1 40827 }, -1 40828 deletion: { -1 40829 type: 'structure', -1 40830 superclassRole: [ 'section' ], -1 40831 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ] -1 40832 }, -1 40833 dialog: { -1 40834 type: 'widget', -1 40835 allowedAttrs: [ 'aria-expanded', 'aria-modal' ], -1 40836 superclassRole: [ 'window' ], -1 40837 accessibleNameRequired: true -1 40838 }, -1 40839 directory: { -1 40840 type: 'structure', -1 40841 allowedAttrs: [ 'aria-expanded' ], -1 40842 superclassRole: [ 'list' ], -1 40843 nameFromContent: true -1 40844 }, -1 40845 document: { -1 40846 type: 'structure', -1 40847 allowedAttrs: [ 'aria-expanded' ], -1 40848 superclassRole: [ 'structure' ] -1 40849 }, -1 40850 emphasis: { -1 40851 type: 'structure', -1 40852 superclassRole: [ 'section' ], -1 40853 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ] -1 40854 }, -1 40855 feed: { -1 40856 type: 'structure', -1 40857 requiredOwned: [ 'article' ], -1 40858 allowedAttrs: [ 'aria-expanded' ], -1 40859 superclassRole: [ 'list' ] -1 40860 }, -1 40861 figure: { -1 40862 type: 'structure', -1 40863 allowedAttrs: [ 'aria-expanded' ], -1 40864 superclassRole: [ 'section' ], -1 40865 nameFromContent: true -1 40866 }, -1 40867 form: { -1 40868 type: 'landmark', -1 40869 allowedAttrs: [ 'aria-expanded' ], -1 40870 superclassRole: [ 'landmark' ] -1 40871 }, -1 40872 grid: { -1 40873 type: 'composite', -1 40874 requiredOwned: [ 'rowgroup', 'row' ], -1 40875 allowedAttrs: [ 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-rowcount' ], -1 40876 superclassRole: [ 'composite', 'table' ], -1 40877 accessibleNameRequired: false -1 40878 }, -1 40879 gridcell: { -1 40880 type: 'widget', -1 40881 requiredContext: [ 'row' ], -1 40882 allowedAttrs: [ 'aria-readonly', 'aria-required', 'aria-selected', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan' ], -1 40883 superclassRole: [ 'cell', 'widget' ], -1 40884 nameFromContent: true -1 40885 }, -1 40886 group: { -1 40887 type: 'structure', -1 40888 allowedAttrs: [ 'aria-activedescendant', 'aria-expanded' ], -1 40889 superclassRole: [ 'section' ] -1 40890 }, -1 40891 heading: { -1 40892 type: 'structure', -1 40893 requiredAttrs: [ 'aria-level' ], -1 40894 allowedAttrs: [ 'aria-expanded' ], -1 40895 superclassRole: [ 'sectionhead' ], -1 40896 accessibleNameRequired: false, -1 40897 nameFromContent: true -1 40898 }, -1 40899 img: { -1 40900 type: 'structure', -1 40901 allowedAttrs: [ 'aria-expanded' ], -1 40902 superclassRole: [ 'section' ], -1 40903 accessibleNameRequired: true, -1 40904 childrenPresentational: true -1 40905 }, -1 40906 input: { -1 40907 type: 'abstract', -1 40908 superclassRole: [ 'widget' ] -1 40909 }, -1 40910 insertion: { -1 40911 type: 'structure', -1 40912 superclassRole: [ 'section' ], -1 40913 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ] -1 40914 }, -1 40915 landmark: { -1 40916 type: 'abstract', -1 40917 superclassRole: [ 'section' ] -1 40918 }, -1 40919 link: { -1 40920 type: 'widget', -1 40921 allowedAttrs: [ 'aria-expanded' ], -1 40922 superclassRole: [ 'command' ], -1 40923 accessibleNameRequired: true, -1 40924 nameFromContent: true -1 40925 }, -1 40926 list: { -1 40927 type: 'structure', -1 40928 requiredOwned: [ 'group', 'listitem' ], -1 40929 allowedAttrs: [ 'aria-expanded' ], -1 40930 superclassRole: [ 'section' ] -1 40931 }, -1 40932 listbox: { -1 40933 type: 'composite', -1 40934 requiredOwned: [ 'option' ], -1 40935 allowedAttrs: [ 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ], -1 40936 superclassRole: [ 'select' ], -1 40937 accessibleNameRequired: true -1 40938 }, -1 40939 listitem: { -1 40940 type: 'structure', -1 40941 requiredContext: [ 'list', 'group' ], -1 40942 allowedAttrs: [ 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-expanded' ], -1 40943 superclassRole: [ 'section' ], -1 40944 nameFromContent: true -1 40945 }, -1 40946 log: { -1 40947 type: 'widget', -1 40948 allowedAttrs: [ 'aria-expanded' ], -1 40949 superclassRole: [ 'section' ] -1 40950 }, -1 40951 main: { -1 40952 type: 'landmark', -1 40953 allowedAttrs: [ 'aria-expanded' ], -1 40954 superclassRole: [ 'landmark' ] -1 40955 }, -1 40956 marquee: { -1 40957 type: 'widget', -1 40958 allowedAttrs: [ 'aria-expanded' ], -1 40959 superclassRole: [ 'section' ] -1 40960 }, -1 40961 math: { -1 40962 type: 'structure', -1 40963 allowedAttrs: [ 'aria-expanded' ], -1 40964 superclassRole: [ 'section' ], -1 40965 childrenPresentational: true -1 40966 }, -1 40967 menu: { -1 40968 type: 'composite', -1 40969 requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox' ], -1 40970 allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ], -1 40971 superclassRole: [ 'select' ] -1 40972 }, -1 40973 menubar: { -1 40974 type: 'composite', -1 40975 requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox' ], -1 40976 allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ], -1 40977 superclassRole: [ 'menu' ] -1 40978 }, -1 40979 menuitem: { -1 40980 type: 'widget', -1 40981 requiredContext: [ 'menu', 'menubar', 'group' ], -1 40982 allowedAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded' ], -1 40983 superclassRole: [ 'command' ], -1 40984 accessibleNameRequired: true, -1 40985 nameFromContent: true -1 40986 }, -1 40987 menuitemcheckbox: { -1 40988 type: 'widget', -1 40989 requiredContext: [ 'menu', 'menubar', 'group' ], -1 40990 allowedAttrs: [ 'aria-checked', 'aria-posinset', 'aria-readonly', 'aria-setsize' ], -1 40991 superclassRole: [ 'checkbox', 'menuitem' ], -1 40992 accessibleNameRequired: true, -1 40993 nameFromContent: true, -1 40994 childrenPresentational: true -1 40995 }, -1 40996 menuitemradio: { -1 40997 type: 'widget', -1 40998 requiredContext: [ 'menu', 'menubar', 'group' ], -1 40999 allowedAttrs: [ 'aria-checked', 'aria-posinset', 'aria-readonly', 'aria-setsize' ], -1 41000 superclassRole: [ 'menuitemcheckbox', 'radio' ], -1 41001 accessibleNameRequired: true, -1 41002 nameFromContent: true, -1 41003 childrenPresentational: true -1 41004 }, -1 41005 meter: { -1 41006 type: 'structure', -1 41007 allowedAttrs: [ 'aria-valuetext' ], -1 41008 requiredAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-valuenow' ], -1 41009 superclassRole: [ 'range' ], -1 41010 accessibleNameRequired: true, -1 41011 childrenPresentational: true -1 41012 }, -1 41013 navigation: { -1 41014 type: 'landmark', -1 41015 allowedAttrs: [ 'aria-expanded' ], -1 41016 superclassRole: [ 'landmark' ] -1 41017 }, -1 41018 none: { -1 41019 type: 'structure', -1 41020 superclassRole: [ 'structure' ], -1 41021 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ] -1 41022 }, -1 41023 note: { -1 41024 type: 'structure', -1 41025 allowedAttrs: [ 'aria-expanded' ], -1 41026 superclassRole: [ 'section' ] -1 41027 }, -1 41028 option: { -1 41029 type: 'widget', -1 41030 requiredContext: [ 'listbox' ], -1 41031 allowedAttrs: [ 'aria-selected', 'aria-checked', 'aria-posinset', 'aria-setsize' ], -1 41032 superclassRole: [ 'input' ], -1 41033 accessibleNameRequired: true, -1 41034 nameFromContent: true, -1 41035 childrenPresentational: true -1 41036 }, -1 41037 paragraph: { -1 41038 type: 'structure', -1 41039 superclassRole: [ 'section' ], -1 41040 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ] -1 41041 }, -1 41042 presentation: { -1 41043 type: 'structure', -1 41044 superclassRole: [ 'structure' ], -1 41045 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ] -1 41046 }, -1 41047 progressbar: { -1 41048 type: 'widget', -1 41049 allowedAttrs: [ 'aria-expanded', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext' ], -1 41050 superclassRole: [ 'range' ], -1 41051 accessibleNameRequired: true, -1 41052 childrenPresentational: true -1 41053 }, -1 41054 radio: { -1 41055 type: 'widget', -1 41056 allowedAttrs: [ 'aria-checked', 'aria-posinset', 'aria-setsize', 'aria-required' ], -1 41057 superclassRole: [ 'input' ], -1 41058 accessibleNameRequired: true, -1 41059 nameFromContent: true, -1 41060 childrenPresentational: true -1 41061 }, -1 41062 radiogroup: { -1 41063 type: 'composite', -1 41064 requiredOwned: [ 'radio' ], -1 41065 allowedAttrs: [ 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ], -1 41066 superclassRole: [ 'select' ], -1 41067 accessibleNameRequired: false -1 41068 }, -1 41069 range: { -1 41070 type: 'abstract', -1 41071 superclassRole: [ 'widget' ] -1 41072 }, -1 41073 region: { -1 41074 type: 'landmark', -1 41075 allowedAttrs: [ 'aria-expanded' ], -1 41076 superclassRole: [ 'landmark' ], -1 41077 accessibleNameRequired: false -1 41078 }, -1 41079 roletype: { -1 41080 type: 'abstract', -1 41081 superclassRole: [] -1 41082 }, -1 41083 row: { -1 41084 type: 'structure', -1 41085 requiredContext: [ 'grid', 'rowgroup', 'table', 'treegrid' ], -1 41086 requiredOwned: [ 'cell', 'columnheader', 'gridcell', 'rowheader' ], -1 41087 allowedAttrs: [ 'aria-colindex', 'aria-level', 'aria-rowindex', 'aria-selected', 'aria-activedescendant', 'aria-expanded', 'aria-posinset', 'aria-setsize' ], -1 41088 superclassRole: [ 'group', 'widget' ], -1 41089 nameFromContent: true -1 41090 }, -1 41091 rowgroup: { -1 41092 type: 'structure', -1 41093 requiredContext: [ 'grid', 'table', 'treegrid' ], -1 41094 requiredOwned: [ 'row' ], -1 41095 superclassRole: [ 'structure' ], -1 41096 nameFromContent: true -1 41097 }, -1 41098 rowheader: { -1 41099 type: 'structure', -1 41100 requiredContext: [ 'row' ], -1 41101 allowedAttrs: [ 'aria-sort', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-readonly', 'aria-required', 'aria-rowindex', 'aria-rowspan', 'aria-selected' ], -1 41102 superclassRole: [ 'cell', 'gridcell', 'sectionhead' ], -1 41103 accessibleNameRequired: false, -1 41104 nameFromContent: true -1 41105 }, -1 41106 scrollbar: { -1 41107 type: 'widget', -1 41108 requiredAttrs: [ 'aria-valuenow' ], -1 41109 allowedAttrs: [ 'aria-controls', 'aria-orientation', 'aria-valuemax', 'aria-valuemin', 'aria-valuetext' ], -1 41110 superclassRole: [ 'range' ], -1 41111 childrenPresentational: true -1 41112 }, -1 41113 search: { -1 41114 type: 'landmark', -1 41115 allowedAttrs: [ 'aria-expanded' ], -1 41116 superclassRole: [ 'landmark' ] -1 41117 }, -1 41118 searchbox: { -1 41119 type: 'widget', -1 41120 allowedAttrs: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-placeholder', 'aria-readonly', 'aria-required' ], -1 41121 superclassRole: [ 'textbox' ], -1 41122 accessibleNameRequired: true -1 41123 }, -1 41124 section: { -1 41125 type: 'abstract', -1 41126 superclassRole: [ 'structure' ], -1 41127 nameFromContent: true -1 41128 }, -1 41129 sectionhead: { -1 41130 type: 'abstract', -1 41131 superclassRole: [ 'structure' ], -1 41132 nameFromContent: true -1 41133 }, -1 41134 select: { -1 41135 type: 'abstract', -1 41136 superclassRole: [ 'composite', 'group' ] -1 41137 }, -1 41138 separator: { -1 41139 type: 'structure', -1 41140 allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-orientation', 'aria-valuetext' ], -1 41141 superclassRole: [ 'structure', 'widget' ], -1 41142 childrenPresentational: true -1 41143 }, -1 41144 slider: { -1 41145 type: 'widget', -1 41146 requiredAttrs: [ 'aria-valuenow' ], -1 41147 allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-orientation', 'aria-readonly', 'aria-valuetext' ], -1 41148 superclassRole: [ 'input', 'range' ], -1 41149 accessibleNameRequired: true, -1 41150 childrenPresentational: true -1 41151 }, -1 41152 spinbutton: { -1 41153 type: 'widget', -1 41154 requiredAttrs: [ 'aria-valuenow' ], -1 41155 allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-valuetext' ], -1 41156 superclassRole: [ 'composite', 'input', 'range' ], -1 41157 accessibleNameRequired: true -1 41158 }, -1 41159 status: { -1 41160 type: 'widget', -1 41161 allowedAttrs: [ 'aria-expanded' ], -1 41162 superclassRole: [ 'section' ] -1 41163 }, -1 41164 strong: { -1 41165 type: 'structure', -1 41166 superclassRole: [ 'section' ], -1 41167 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ] -1 41168 }, -1 41169 structure: { -1 41170 type: 'abstract', -1 41171 superclassRole: [ 'roletype' ] -1 41172 }, -1 41173 subscript: { -1 41174 type: 'structure', -1 41175 superclassRole: [ 'section' ], -1 41176 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ] -1 41177 }, -1 41178 superscript: { -1 41179 type: 'structure', -1 41180 superclassRole: [ 'section' ], -1 41181 prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ] -1 41182 }, -1 41183 switch: { -1 41184 type: 'widget', -1 41185 requiredAttrs: [ 'aria-checked' ], -1 41186 allowedAttrs: [ 'aria-readonly' ], -1 41187 superclassRole: [ 'checkbox' ], -1 41188 accessibleNameRequired: true, -1 41189 nameFromContent: true, -1 41190 childrenPresentational: true -1 41191 }, -1 41192 tab: { -1 41193 type: 'widget', -1 41194 requiredContext: [ 'tablist' ], -1 41195 allowedAttrs: [ 'aria-posinset', 'aria-selected', 'aria-setsize', 'aria-expanded' ], -1 41196 superclassRole: [ 'sectionhead', 'widget' ], -1 41197 nameFromContent: true, -1 41198 childrenPresentational: true -1 41199 }, -1 41200 table: { -1 41201 type: 'structure', -1 41202 requiredOwned: [ 'rowgroup', 'row' ], -1 41203 allowedAttrs: [ 'aria-colcount', 'aria-rowcount', 'aria-expanded' ], -1 41204 superclassRole: [ 'section' ], -1 41205 accessibleNameRequired: false, -1 41206 nameFromContent: true -1 41207 }, -1 41208 tablist: { -1 41209 type: 'composite', -1 41210 requiredOwned: [ 'tab' ], -1 41211 allowedAttrs: [ 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-activedescendant', 'aria-expanded' ], -1 41212 superclassRole: [ 'composite' ] -1 41213 }, -1 41214 tabpanel: { -1 41215 type: 'widget', -1 41216 allowedAttrs: [ 'aria-expanded' ], -1 41217 superclassRole: [ 'section' ], -1 41218 accessibleNameRequired: false -1 41219 }, -1 41220 term: { -1 41221 type: 'structure', -1 41222 allowedAttrs: [ 'aria-expanded' ], -1 41223 superclassRole: [ 'section' ], -1 41224 nameFromContent: true -1 41225 }, -1 41226 text: { -1 41227 type: 'structure', -1 41228 superclassRole: [ 'section' ], -1 41229 nameFromContent: true -1 41230 }, -1 41231 textbox: { -1 41232 type: 'widget', -1 41233 allowedAttrs: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-placeholder', 'aria-readonly', 'aria-required' ], -1 41234 superclassRole: [ 'input' ], -1 41235 accessibleNameRequired: true -1 41236 }, -1 41237 time: { -1 41238 type: 'structure', -1 41239 superclassRole: [ 'section' ] -1 41240 }, -1 41241 timer: { -1 41242 type: 'widget', -1 41243 allowedAttrs: [ 'aria-expanded' ], -1 41244 superclassRole: [ 'status' ] -1 41245 }, -1 41246 toolbar: { -1 41247 type: 'structure', -1 41248 allowedAttrs: [ 'aria-orientation', 'aria-activedescendant', 'aria-expanded' ], -1 41249 superclassRole: [ 'group' ], -1 41250 accessibleNameRequired: true -1 41251 }, -1 41252 tooltip: { -1 41253 type: 'structure', -1 41254 allowedAttrs: [ 'aria-expanded' ], -1 41255 superclassRole: [ 'section' ], -1 41256 nameFromContent: true -1 41257 }, -1 41258 tree: { -1 41259 type: 'composite', -1 41260 requiredOwned: [ 'group', 'treeitem' ], -1 41261 allowedAttrs: [ 'aria-multiselectable', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ], -1 41262 superclassRole: [ 'select' ], -1 41263 accessibleNameRequired: false -1 41264 }, -1 41265 treegrid: { -1 41266 type: 'composite', -1 41267 requiredOwned: [ 'rowgroup', 'row' ], -1 41268 allowedAttrs: [ 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-readonly', 'aria-required', 'aria-rowcount' ], -1 41269 superclassRole: [ 'grid', 'tree' ], -1 41270 accessibleNameRequired: false -1 41271 }, -1 41272 treeitem: { -1 41273 type: 'widget', -1 41274 requiredContext: [ 'group', 'tree' ], -1 41275 allowedAttrs: [ 'aria-checked', 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-selected', 'aria-setsize' ], -1 41276 superclassRole: [ 'listitem', 'option' ], -1 41277 accessibleNameRequired: true, -1 41278 nameFromContent: true -1 41279 }, -1 41280 widget: { -1 41281 type: 'abstract', -1 41282 superclassRole: [ 'roletype' ] -1 41283 }, -1 41284 window: { -1 41285 type: 'abstract', -1 41286 superclassRole: [ 'roletype' ] 22007 41287 }22008 -1 __webpack_exports__['default'] = pAsHeadingMatches;22009 -1 },22010 -1 './lib/rules/scrollable-region-focusable-matches.js': function libRulesScrollableRegionFocusableMatchesJs(module, __webpack_exports__, __webpack_require__) {22011 -1 'use strict';22012 -1 __webpack_require__.r(__webpack_exports__);22013 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');22014 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/core/utils/index.js');22015 -1 function scrollableRegionFocusableMatches(node, virtualNode) {22016 -1 if (!!Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['getScroll'])(node, 13) === false) {22017 -1 return false;22018 -1 }22019 -1 var nodeAndDescendents = Object(_core_utils__WEBPACK_IMPORTED_MODULE_1__['querySelectorAll'])(virtualNode, '*');22020 -1 var hasVisibleChildren = nodeAndDescendents.some(function(elm) {22021 -1 return Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['hasContentVirtual'])(elm, true, true);22022 -1 });22023 -1 if (!hasVisibleChildren) {22024 -1 return false;22025 -1 }22026 -1 return true;-1 41288 }; -1 41289 var aria_roles_default = ariaRoles; -1 41290 var dpubRoles = { -1 41291 'doc-abstract': { -1 41292 type: 'section', -1 41293 allowedAttrs: [ 'aria-expanded' ], -1 41294 superclassRole: [ 'section' ] -1 41295 }, -1 41296 'doc-acknowledgments': { -1 41297 type: 'landmark', -1 41298 allowedAttrs: [ 'aria-expanded' ], -1 41299 superclassRole: [ 'landmark' ] -1 41300 }, -1 41301 'doc-afterword': { -1 41302 type: 'landmark', -1 41303 allowedAttrs: [ 'aria-expanded' ], -1 41304 superclassRole: [ 'landmark' ] -1 41305 }, -1 41306 'doc-appendix': { -1 41307 type: 'landmark', -1 41308 allowedAttrs: [ 'aria-expanded' ], -1 41309 superclassRole: [ 'landmark' ] -1 41310 }, -1 41311 'doc-backlink': { -1 41312 type: 'link', -1 41313 allowedAttrs: [ 'aria-expanded' ], -1 41314 nameFromContent: true, -1 41315 superclassRole: [ 'link' ] -1 41316 }, -1 41317 'doc-biblioentry': { -1 41318 type: 'listitem', -1 41319 requiredContext: [ 'doc-bibliography' ], -1 41320 allowedAttrs: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ], -1 41321 superclassRole: [ 'listitem' ] -1 41322 }, -1 41323 'doc-bibliography': { -1 41324 type: 'landmark', -1 41325 requiredOwned: [ 'doc-biblioentry' ], -1 41326 allowedAttrs: [ 'aria-expanded' ], -1 41327 superclassRole: [ 'landmark' ] -1 41328 }, -1 41329 'doc-biblioref': { -1 41330 type: 'link', -1 41331 allowedAttrs: [ 'aria-expanded' ], -1 41332 nameFromContent: true, -1 41333 superclassRole: [ 'link' ] -1 41334 }, -1 41335 'doc-chapter': { -1 41336 type: 'landmark', -1 41337 allowedAttrs: [ 'aria-expanded' ], -1 41338 superclassRole: [ 'landmark' ] -1 41339 }, -1 41340 'doc-colophon': { -1 41341 type: 'section', -1 41342 allowedAttrs: [ 'aria-expanded' ], -1 41343 superclassRole: [ 'section' ] -1 41344 }, -1 41345 'doc-conclusion': { -1 41346 type: 'landmark', -1 41347 allowedAttrs: [ 'aria-expanded' ], -1 41348 superclassRole: [ 'landmark' ] -1 41349 }, -1 41350 'doc-cover': { -1 41351 type: 'img', -1 41352 allowedAttrs: [ 'aria-expanded' ], -1 41353 superclassRole: [ 'img' ] -1 41354 }, -1 41355 'doc-credit': { -1 41356 type: 'section', -1 41357 allowedAttrs: [ 'aria-expanded' ], -1 41358 superclassRole: [ 'section' ] -1 41359 }, -1 41360 'doc-credits': { -1 41361 type: 'landmark', -1 41362 allowedAttrs: [ 'aria-expanded' ], -1 41363 superclassRole: [ 'landmark' ] -1 41364 }, -1 41365 'doc-dedication': { -1 41366 type: 'section', -1 41367 allowedAttrs: [ 'aria-expanded' ], -1 41368 superclassRole: [ 'section' ] -1 41369 }, -1 41370 'doc-endnote': { -1 41371 type: 'listitem', -1 41372 requiredContext: [ 'doc-endnotes' ], -1 41373 allowedAttrs: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ], -1 41374 superclassRole: [ 'listitem' ] -1 41375 }, -1 41376 'doc-endnotes': { -1 41377 type: 'landmark', -1 41378 requiredOwned: [ 'doc-endnote' ], -1 41379 allowedAttrs: [ 'aria-expanded' ], -1 41380 superclassRole: [ 'landmark' ] -1 41381 }, -1 41382 'doc-epigraph': { -1 41383 type: 'section', -1 41384 allowedAttrs: [ 'aria-expanded' ], -1 41385 superclassRole: [ 'section' ] -1 41386 }, -1 41387 'doc-epilogue': { -1 41388 type: 'landmark', -1 41389 allowedAttrs: [ 'aria-expanded' ], -1 41390 superclassRole: [ 'landmark' ] -1 41391 }, -1 41392 'doc-errata': { -1 41393 type: 'landmark', -1 41394 allowedAttrs: [ 'aria-expanded' ], -1 41395 superclassRole: [ 'landmark' ] -1 41396 }, -1 41397 'doc-example': { -1 41398 type: 'section', -1 41399 allowedAttrs: [ 'aria-expanded' ], -1 41400 superclassRole: [ 'section' ] -1 41401 }, -1 41402 'doc-footnote': { -1 41403 type: 'section', -1 41404 allowedAttrs: [ 'aria-expanded' ], -1 41405 superclassRole: [ 'section' ] -1 41406 }, -1 41407 'doc-foreword': { -1 41408 type: 'landmark', -1 41409 allowedAttrs: [ 'aria-expanded' ], -1 41410 superclassRole: [ 'landmark' ] -1 41411 }, -1 41412 'doc-glossary': { -1 41413 type: 'landmark', -1 41414 requiredOwned: [ 'definition', 'term' ], -1 41415 allowedAttrs: [ 'aria-expanded' ], -1 41416 superclassRole: [ 'landmark' ] -1 41417 }, -1 41418 'doc-glossref': { -1 41419 type: 'link', -1 41420 allowedAttrs: [ 'aria-expanded' ], -1 41421 nameFromContent: true, -1 41422 superclassRole: [ 'link' ] -1 41423 }, -1 41424 'doc-index': { -1 41425 type: 'navigation', -1 41426 allowedAttrs: [ 'aria-expanded' ], -1 41427 superclassRole: [ 'navigation' ] -1 41428 }, -1 41429 'doc-introduction': { -1 41430 type: 'landmark', -1 41431 allowedAttrs: [ 'aria-expanded' ], -1 41432 superclassRole: [ 'landmark' ] -1 41433 }, -1 41434 'doc-noteref': { -1 41435 type: 'link', -1 41436 allowedAttrs: [ 'aria-expanded' ], -1 41437 nameFromContent: true, -1 41438 superclassRole: [ 'link' ] -1 41439 }, -1 41440 'doc-notice': { -1 41441 type: 'note', -1 41442 allowedAttrs: [ 'aria-expanded' ], -1 41443 superclassRole: [ 'note' ] -1 41444 }, -1 41445 'doc-pagebreak': { -1 41446 type: 'separator', -1 41447 allowedAttrs: [ 'aria-expanded', 'aria-orientation' ], -1 41448 superclassRole: [ 'separator' ], -1 41449 childrenPresentational: true -1 41450 }, -1 41451 'doc-pagelist': { -1 41452 type: 'navigation', -1 41453 allowedAttrs: [ 'aria-expanded' ], -1 41454 superclassRole: [ 'navigation' ] -1 41455 }, -1 41456 'doc-part': { -1 41457 type: 'landmark', -1 41458 allowedAttrs: [ 'aria-expanded' ], -1 41459 superclassRole: [ 'landmark' ] -1 41460 }, -1 41461 'doc-preface': { -1 41462 type: 'landmark', -1 41463 allowedAttrs: [ 'aria-expanded' ], -1 41464 superclassRole: [ 'landmark' ] -1 41465 }, -1 41466 'doc-prologue': { -1 41467 type: 'landmark', -1 41468 allowedAttrs: [ 'aria-expanded' ], -1 41469 superclassRole: [ 'landmark' ] -1 41470 }, -1 41471 'doc-pullquote': { -1 41472 type: 'none', -1 41473 superclassRole: [ 'none' ] -1 41474 }, -1 41475 'doc-qna': { -1 41476 type: 'section', -1 41477 allowedAttrs: [ 'aria-expanded' ], -1 41478 superclassRole: [ 'section' ] -1 41479 }, -1 41480 'doc-subtitle': { -1 41481 type: 'sectionhead', -1 41482 allowedAttrs: [ 'aria-expanded' ], -1 41483 superclassRole: [ 'sectionhead' ] -1 41484 }, -1 41485 'doc-tip': { -1 41486 type: 'note', -1 41487 allowedAttrs: [ 'aria-expanded' ], -1 41488 superclassRole: [ 'note' ] -1 41489 }, -1 41490 'doc-toc': { -1 41491 type: 'navigation', -1 41492 allowedAttrs: [ 'aria-expanded' ], -1 41493 superclassRole: [ 'navigation' ] 22027 41494 }22028 -1 __webpack_exports__['default'] = scrollableRegionFocusableMatches;22029 -1 },22030 -1 './lib/rules/skip-link-matches.js': function libRulesSkipLinkMatchesJs(module, __webpack_exports__, __webpack_require__) {22031 -1 'use strict';22032 -1 __webpack_require__.r(__webpack_exports__);22033 -1 var _commons_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/commons/dom/index.js');22034 -1 function skipLinkMatches(node) {22035 -1 return Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isSkipLink'])(node) && Object(_commons_dom__WEBPACK_IMPORTED_MODULE_0__['isOffscreen'])(node);-1 41495 }; -1 41496 var dpub_roles_default = dpubRoles; -1 41497 var graphicsRoles = { -1 41498 'graphics-document': { -1 41499 type: 'structure', -1 41500 superclassRole: [ 'document' ], -1 41501 accessibleNameRequired: true -1 41502 }, -1 41503 'graphics-object': { -1 41504 type: 'structure', -1 41505 superclassRole: [ 'group' ], -1 41506 nameFromContent: true -1 41507 }, -1 41508 'graphics-symbol': { -1 41509 type: 'structure', -1 41510 superclassRole: [ 'img' ], -1 41511 accessibleNameRequired: true, -1 41512 childrenPresentational: true 22036 41513 }22037 -1 __webpack_exports__['default'] = skipLinkMatches;22038 -1 },22039 -1 './lib/rules/svg-namespace-matches.js': function libRulesSvgNamespaceMatchesJs(module, __webpack_exports__, __webpack_require__) {22040 -1 'use strict';22041 -1 __webpack_require__.r(__webpack_exports__);22042 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');22043 -1 function svgNamespaceMatches(node, virtualNode) {22044 -1 try {22045 -1 var nodeName = virtualNode.props.nodeName;22046 -1 if (nodeName === 'svg') {22047 -1 return true;-1 41514 }; -1 41515 var graphics_roles_default = graphicsRoles; -1 41516 var htmlElms = { -1 41517 a: { -1 41518 variant: { -1 41519 href: { -1 41520 matches: '[href]', -1 41521 contentTypes: [ 'interactive', 'phrasing', 'flow' ], -1 41522 allowedRoles: [ 'button', 'checkbox', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'switch', 'tab', 'treeitem', 'doc-backlink', 'doc-biblioref', 'doc-glossref', 'doc-noteref' ], -1 41523 namingMethods: [ 'subtreeText' ] -1 41524 }, -1 41525 default: { -1 41526 contentTypes: [ 'phrasing', 'flow' ], -1 41527 allowedRoles: true 22048 41528 }22049 -1 return !!Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['closest'])(virtualNode, 'svg');22050 -1 } catch (e) {22051 -1 return false;22052 -1 }22053 -1 }22054 -1 __webpack_exports__['default'] = svgNamespaceMatches;22055 -1 },22056 -1 './lib/rules/window-is-top-matches.js': function libRulesWindowIsTopMatchesJs(module, __webpack_exports__, __webpack_require__) {22057 -1 'use strict';22058 -1 __webpack_require__.r(__webpack_exports__);22059 -1 function windowIsTopMatches(node) {22060 -1 return node.ownerDocument.defaultView.self === node.ownerDocument.defaultView.top;22061 -1 }22062 -1 __webpack_exports__['default'] = windowIsTopMatches;22063 -1 },22064 -1 './lib/rules/xml-lang-mismatch-matches.js': function libRulesXmlLangMismatchMatchesJs(module, __webpack_exports__, __webpack_require__) {22065 -1 'use strict';22066 -1 __webpack_require__.r(__webpack_exports__);22067 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/core/utils/index.js');22068 -1 function xmlLangMismatchMatches(node) {22069 -1 var primaryLangValue = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['getBaseLang'])(node.getAttribute('lang'));22070 -1 var primaryXmlLangValue = Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['getBaseLang'])(node.getAttribute('xml:lang'));22071 -1 return Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['validLangs'])().includes(primaryLangValue) && Object(_core_utils__WEBPACK_IMPORTED_MODULE_0__['validLangs'])().includes(primaryXmlLangValue);22072 -1 }22073 -1 __webpack_exports__['default'] = xmlLangMismatchMatches;22074 -1 },22075 -1 './lib/standards/aria-attrs.js': function libStandardsAriaAttrsJs(module, __webpack_exports__, __webpack_require__) {22076 -1 'use strict';22077 -1 __webpack_require__.r(__webpack_exports__);22078 -1 var ariaAttrs = {22079 -1 'aria-activedescendant': {22080 -1 type: 'idref',22081 -1 allowEmpty: true22082 -1 },22083 -1 'aria-atomic': {22084 -1 type: 'boolean',22085 -1 global: true22086 -1 },22087 -1 'aria-autocomplete': {22088 -1 type: 'nmtoken',22089 -1 values: [ 'inline', 'list', 'both', 'none' ]22090 -1 },22091 -1 'aria-busy': {22092 -1 type: 'boolean',22093 -1 global: true22094 -1 },22095 -1 'aria-checked': {22096 -1 type: 'nmtoken',22097 -1 values: [ 'false', 'mixed', 'true', 'undefined' ]22098 -1 },22099 -1 'aria-colcount': {22100 -1 type: 'int'22101 -1 },22102 -1 'aria-colindex': {22103 -1 type: 'int'22104 -1 },22105 -1 'aria-colspan': {22106 -1 type: 'int'22107 -1 },22108 -1 'aria-controls': {22109 -1 type: 'idrefs',22110 -1 allowEmpty: true,22111 -1 global: true22112 -1 },22113 -1 'aria-current': {22114 -1 type: 'nmtoken',22115 -1 allowEmpty: true,22116 -1 values: [ 'page', 'step', 'location', 'date', 'time', 'true', 'false' ],22117 -1 global: true22118 -1 },22119 -1 'aria-describedby': {22120 -1 type: 'idrefs',22121 -1 allowEmpty: true,22122 -1 global: true22123 -1 },22124 -1 'aria-details': {22125 -1 type: 'idref',22126 -1 allowEmpty: true,22127 -1 global: true22128 -1 },22129 -1 'aria-disabled': {22130 -1 type: 'boolean',22131 -1 global: true22132 -1 },22133 -1 'aria-dropeffect': {22134 -1 type: 'nmtokens',22135 -1 values: [ 'copy', 'execute', 'link', 'move', 'none', 'popup' ],22136 -1 global: true22137 -1 },22138 -1 'aria-errormessage': {22139 -1 type: 'idref',22140 -1 allowEmpty: true,22141 -1 global: true22142 -1 },22143 -1 'aria-expanded': {22144 -1 type: 'nmtoken',22145 -1 values: [ 'true', 'false', 'undefined' ]22146 -1 },22147 -1 'aria-flowto': {22148 -1 type: 'idrefs',22149 -1 allowEmpty: true,22150 -1 global: true22151 -1 },22152 -1 'aria-grabbed': {22153 -1 type: 'nmtoken',22154 -1 values: [ 'true', 'false', 'undefined' ],22155 -1 global: true22156 -1 },22157 -1 'aria-haspopup': {22158 -1 type: 'nmtoken',22159 -1 allowEmpty: true,22160 -1 values: [ 'true', 'false', 'menu', 'listbox', 'tree', 'grid', 'dialog' ],22161 -1 global: true22162 -1 },22163 -1 'aria-hidden': {22164 -1 type: 'nmtoken',22165 -1 values: [ 'true', 'false', 'undefined' ],22166 -1 global: true22167 -1 },22168 -1 'aria-invalid': {22169 -1 type: 'nmtoken',22170 -1 allowEmpty: true,22171 -1 values: [ 'grammar', 'false', 'spelling', 'true' ],22172 -1 global: true22173 -1 },22174 -1 'aria-keyshortcuts': {22175 -1 type: 'string',22176 -1 allowEmpty: true,22177 -1 global: true22178 -1 },22179 -1 'aria-label': {22180 -1 type: 'string',22181 -1 allowEmpty: true,22182 -1 global: true22183 -1 },22184 -1 'aria-labelledby': {22185 -1 type: 'idrefs',22186 -1 allowEmpty: true,22187 -1 global: true22188 -1 },22189 -1 'aria-level': {22190 -1 type: 'int'22191 -1 },22192 -1 'aria-live': {22193 -1 type: 'nmtoken',22194 -1 values: [ 'assertive', 'off', 'polite' ],22195 -1 global: true22196 -1 },22197 -1 'aria-modal': {22198 -1 type: 'boolean'22199 -1 },22200 -1 'aria-multiline': {22201 -1 type: 'boolean'22202 -1 },22203 -1 'aria-multiselectable': {22204 -1 type: 'boolean'22205 -1 },22206 -1 'aria-orientation': {22207 -1 type: 'nmtoken',22208 -1 values: [ 'horizontal', 'undefined', 'vertical' ]22209 -1 },22210 -1 'aria-owns': {22211 -1 type: 'idrefs',22212 -1 allowEmpty: true,22213 -1 global: true22214 -1 },22215 -1 'aria-placeholder': {22216 -1 type: 'string',22217 -1 allowEmpty: true22218 -1 },22219 -1 'aria-posinset': {22220 -1 type: 'int'22221 -1 },22222 -1 'aria-pressed': {22223 -1 type: 'nmtoken',22224 -1 values: [ 'false', 'mixed', 'true', 'undefined' ]22225 -1 },22226 -1 'aria-readonly': {22227 -1 type: 'boolean'22228 -1 },22229 -1 'aria-relevant': {22230 -1 type: 'nmtokens',22231 -1 values: [ 'additions', 'all', 'removals', 'text' ],22232 -1 global: true22233 -1 },22234 -1 'aria-required': {22235 -1 type: 'boolean'22236 -1 },22237 -1 'aria-roledescription': {22238 -1 type: 'string',22239 -1 allowEmpty: true,22240 -1 global: true22241 -1 },22242 -1 'aria-rowcount': {22243 -1 type: 'int'22244 -1 },22245 -1 'aria-rowindex': {22246 -1 type: 'int'22247 -1 },22248 -1 'aria-rowspan': {22249 -1 type: 'int'22250 -1 },22251 -1 'aria-selected': {22252 -1 type: 'nmtoken',22253 -1 values: [ 'false', 'true', 'undefined' ]22254 -1 },22255 -1 'aria-setsize': {22256 -1 type: 'int'22257 -1 },22258 -1 'aria-sort': {22259 -1 type: 'nmtoken',22260 -1 values: [ 'ascending', 'descending', 'none', 'other' ]22261 -1 },22262 -1 'aria-valuemax': {22263 -1 type: 'decimal'22264 -1 },22265 -1 'aria-valuemin': {22266 -1 type: 'decimal'22267 -1 },22268 -1 'aria-valuenow': {22269 -1 type: 'decimal'22270 -1 },22271 -1 'aria-valuetext': {22272 -1 type: 'string'22273 -1 }22274 -1 };22275 -1 __webpack_exports__['default'] = ariaAttrs;22276 -1 },22277 -1 './lib/standards/aria-roles.js': function libStandardsAriaRolesJs(module, __webpack_exports__, __webpack_require__) {22278 -1 'use strict';22279 -1 __webpack_require__.r(__webpack_exports__);22280 -1 var ariaRoles = {22281 -1 alert: {22282 -1 type: 'widget',22283 -1 allowedAttrs: [ 'aria-expanded' ]22284 -1 },22285 -1 alertdialog: {22286 -1 type: 'widget',22287 -1 allowedAttrs: [ 'aria-expanded', 'aria-modal' ]22288 -1 },22289 -1 application: {22290 -1 type: 'landmark',22291 -1 allowedAttrs: [ 'aria-activedescendant', 'aria-expanded' ]22292 -1 },22293 -1 article: {22294 -1 type: 'structure',22295 -1 allowedAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded' ]22296 -1 },22297 -1 banner: {22298 -1 type: 'landmark',22299 -1 allowedAttrs: [ 'aria-expanded' ]22300 -1 },22301 -1 button: {22302 -1 type: 'widget',22303 -1 allowedAttrs: [ 'aria-expanded', 'aria-pressed' ],22304 -1 nameFromContent: true22305 -1 },22306 -1 cell: {22307 -1 type: 'structure',22308 -1 requiredContext: [ 'row' ],22309 -1 allowedAttrs: [ 'aria-colindex', 'aria-colspan', 'aria-rowindex', 'aria-rowspan', 'aria-expanded' ],22310 -1 nameFromContent: true22311 -1 },22312 -1 checkbox: {22313 -1 type: 'widget',22314 -1 allowedAttrs: [ 'aria-checked', 'aria-readonly', 'aria-required' ],22315 -1 nameFromContent: true22316 -1 },22317 -1 columnheader: {22318 -1 type: 'structure',22319 -1 requiredContext: [ 'row' ],22320 -1 allowedAttrs: [ 'aria-sort', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-readonly', 'aria-required', 'aria-rowindex', 'aria-rowspan', 'aria-selected' ],22321 -1 nameFromContent: true22322 -1 },22323 -1 combobox: {22324 -1 type: 'composite',22325 -1 requiredOwned: [ 'listbox', 'tree', 'grid', 'dialog', 'textbox' ],22326 -1 requiredAttrs: [ 'aria-expanded' ],22327 -1 allowedAttrs: [ 'aria-controls', 'aria-autocomplete', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-orientation' ]22328 -1 },22329 -1 command: {22330 -1 type: 'abstract'22331 -1 },22332 -1 complementary: {22333 -1 type: 'landmark',22334 -1 allowedAttrs: [ 'aria-expanded' ]22335 -1 },22336 -1 composite: {22337 -1 type: 'abstract'22338 -1 },22339 -1 contentinfo: {22340 -1 type: 'landmark',22341 -1 allowedAttrs: [ 'aria-expanded' ]22342 -1 },22343 -1 definition: {22344 -1 type: 'structure',22345 -1 allowedAttrs: [ 'aria-expanded' ]22346 -1 },22347 -1 dialog: {22348 -1 type: 'widget',22349 -1 allowedAttrs: [ 'aria-expanded', 'aria-modal' ]22350 -1 },22351 -1 directory: {22352 -1 type: 'structure',22353 -1 allowedAttrs: [ 'aria-expanded' ],22354 -1 nameFromContent: true22355 -1 },22356 -1 document: {22357 -1 type: 'structure',22358 -1 allowedAttrs: [ 'aria-expanded' ]22359 -1 },22360 -1 feed: {22361 -1 type: 'structure',22362 -1 requiredOwned: [ 'article' ],22363 -1 allowedAttrs: [ 'aria-expanded' ]22364 -1 },22365 -1 figure: {22366 -1 type: 'structure',22367 -1 allowedAttrs: [ 'aria-expanded' ],22368 -1 nameFromContent: true22369 -1 },22370 -1 form: {22371 -1 type: 'landmark',22372 -1 allowedAttrs: [ 'aria-expanded' ]22373 -1 },22374 -1 grid: {22375 -1 type: 'composite',22376 -1 requiredOwned: [ 'rowgroup', 'row' ],22377 -1 allowedAttrs: [ 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-rowcount' ]22378 -1 },22379 -1 gridcell: {22380 -1 type: 'widget',22381 -1 requiredContext: [ 'row' ],22382 -1 allowedAttrs: [ 'aria-readonly', 'aria-required', 'aria-selected', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan' ],22383 -1 nameFromContent: true22384 -1 },22385 -1 group: {22386 -1 type: 'structure',22387 -1 allowedAttrs: [ 'aria-activedescendant', 'aria-expanded' ]22388 -1 },22389 -1 heading: {22390 -1 type: 'structure',22391 -1 requiredAttrs: [ 'aria-level' ],22392 -1 allowedAttrs: [ 'aria-expanded' ],22393 -1 nameFromContent: true22394 -1 },22395 -1 img: {22396 -1 type: 'structure',22397 -1 allowedAttrs: [ 'aria-expanded' ]22398 -1 },22399 -1 input: {22400 -1 type: 'abstract'22401 -1 },22402 -1 landmark: {22403 -1 type: 'abstract'22404 -1 },22405 -1 link: {22406 -1 type: 'widget',22407 -1 allowedAttrs: [ 'aria-expanded' ],22408 -1 nameFromContent: true22409 -1 },22410 -1 list: {22411 -1 type: 'structure',22412 -1 requiredOwned: [ 'listitem' ],22413 -1 allowedAttrs: [ 'aria-expanded' ]22414 -1 },22415 -1 listbox: {22416 -1 type: 'composite',22417 -1 requiredOwned: [ 'option' ],22418 -1 allowedAttrs: [ 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ]22419 -1 },22420 -1 listitem: {22421 -1 type: 'structure',22422 -1 requiredContext: [ 'list' ],22423 -1 allowedAttrs: [ 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-expanded' ],22424 -1 nameFromContent: true22425 -1 },22426 -1 log: {22427 -1 type: 'widget',22428 -1 allowedAttrs: [ 'aria-expanded' ]22429 -1 },22430 -1 main: {22431 -1 type: 'landmark',22432 -1 allowedAttrs: [ 'aria-expanded' ]22433 -1 },22434 -1 marquee: {22435 -1 type: 'widget',22436 -1 allowedAttrs: [ 'aria-expanded' ]22437 -1 },22438 -1 math: {22439 -1 type: 'structure',22440 -1 allowedAttrs: [ 'aria-expanded' ]22441 -1 },22442 -1 menu: {22443 -1 type: 'composite',22444 -1 requiredOwned: [ 'menuitemradio', 'menuitem', 'menuitemcheckbox' ],22445 -1 allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ]22446 -1 },22447 -1 menubar: {22448 -1 type: 'composite',22449 -1 requiredOwned: [ 'menuitemradio', 'menuitem', 'menuitemcheckbox' ],22450 -1 allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ]22451 -1 },22452 -1 menuitem: {22453 -1 type: 'widget',22454 -1 requiredContext: [ 'menu', 'menubar' ],22455 -1 allowedAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded' ],22456 -1 nameFromContent: true22457 -1 },22458 -1 menuitemcheckbox: {22459 -1 type: 'widget',22460 -1 requiredContext: [ 'menu', 'menubar' ],22461 -1 allowedAttrs: [ 'aria-checked', 'aria-posinset', 'aria-readonly', 'aria-setsize' ],22462 -1 nameFromContent: true22463 -1 },22464 -1 menuitemradio: {22465 -1 type: 'widget',22466 -1 requiredContext: [ 'menu', 'menubar' ],22467 -1 allowedAttrs: [ 'aria-checked', 'aria-posinset', 'aria-readonly', 'aria-setsize' ],22468 -1 nameFromContent: true22469 -1 },22470 -1 navigation: {22471 -1 type: 'landmark',22472 -1 allowedAttrs: [ 'aria-expanded' ]22473 -1 },22474 -1 none: {22475 -1 type: 'structure'22476 -1 },22477 -1 note: {22478 -1 type: 'structure',22479 -1 allowedAttrs: [ 'aria-expanded' ]22480 -1 },22481 -1 option: {22482 -1 type: 'widget',22483 -1 requiredContext: [ 'listbox' ],22484 -1 allowedAttrs: [ 'aria-selected', 'aria-checked', 'aria-posinset', 'aria-setsize' ],22485 -1 nameFromContent: true22486 -1 },22487 -1 presentation: {22488 -1 type: 'structure'22489 -1 },22490 -1 progressbar: {22491 -1 type: 'widget',22492 -1 allowedAttrs: [ 'aria-expanded', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext' ]22493 -1 },22494 -1 radio: {22495 -1 type: 'widget',22496 -1 allowedAttrs: [ 'aria-checked', 'aria-posinset', 'aria-setsize', 'aria-required' ],22497 -1 nameFromContent: true22498 -1 },22499 -1 radiogroup: {22500 -1 type: 'composite',22501 -1 requiredOwned: [ 'radio' ],22502 -1 allowedAttrs: [ 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ]22503 -1 },22504 -1 range: {22505 -1 type: 'abstract'22506 -1 },22507 -1 region: {22508 -1 type: 'landmark',22509 -1 allowedAttrs: [ 'aria-expanded' ]22510 -1 },22511 -1 roletype: {22512 -1 type: 'abstract'22513 -1 },22514 -1 row: {22515 -1 type: 'structure',22516 -1 requiredContext: [ 'grid', 'rowgroup', 'table', 'treegrid' ],22517 -1 requiredOwned: [ 'cell', 'columnheader', 'gridcell', 'rowheader' ],22518 -1 allowedAttrs: [ 'aria-colindex', 'aria-level', 'aria-rowindex', 'aria-selected', 'aria-activedescendant', 'aria-expanded' ],22519 -1 nameFromContent: true22520 -1 },22521 -1 rowgroup: {22522 -1 type: 'structure',22523 -1 requiredContext: [ 'grid', 'table', 'treegrid' ],22524 -1 requiredOwned: [ 'row' ],22525 -1 nameFromContent: true22526 -1 },22527 -1 rowheader: {22528 -1 type: 'structure',22529 -1 requiredContext: [ 'row' ],22530 -1 allowedAttrs: [ 'aria-sort', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-readonly', 'aria-required', 'aria-rowindex', 'aria-rowspan', 'aria-selected' ],22531 -1 nameFromContent: true22532 -1 },22533 -1 scrollbar: {22534 -1 type: 'widget',22535 -1 requiredAttrs: [ 'aria-valuenow' ],22536 -1 allowedAttrs: [ 'aria-controls', 'aria-orientation', 'aria-valuemax', 'aria-valuemin', 'aria-valuetext' ]22537 -1 },22538 -1 search: {22539 -1 type: 'landmark',22540 -1 allowedAttrs: [ 'aria-expanded' ]22541 -1 },22542 -1 searchbox: {22543 -1 type: 'widget',22544 -1 allowedAttrs: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-placeholder', 'aria-readonly', 'aria-required' ]22545 -1 },22546 -1 section: {22547 -1 type: 'abstract',22548 -1 nameFromContent: true22549 -1 },22550 -1 sectionhead: {22551 -1 type: 'abstract',22552 -1 nameFromContent: true22553 -1 },22554 -1 select: {22555 -1 type: 'abstract'22556 -1 },22557 -1 separator: {22558 -1 type: 'structure',22559 -1 allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-orientation', 'aria-valuetext' ]22560 -1 },22561 -1 slider: {22562 -1 type: 'widget',22563 -1 requiredAttrs: [ 'aria-valuenow' ],22564 -1 allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-orientation', 'aria-readonly', 'aria-valuetext' ]22565 -1 },22566 -1 spinbutton: {22567 -1 type: 'widget',22568 -1 requiredAttrs: [ 'aria-valuenow' ],22569 -1 allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-valuetext' ]22570 -1 },22571 -1 status: {22572 -1 type: 'widget',22573 -1 allowedAttrs: [ 'aria-expanded' ]22574 -1 },22575 -1 structure: {22576 -1 type: 'abstract'22577 -1 },22578 -1 switch: {22579 -1 type: 'widget',22580 -1 requiredAttrs: [ 'aria-checked' ],22581 -1 allowedAttrs: [ 'aria-readonly' ],22582 -1 nameFromContent: true22583 -1 },22584 -1 tab: {22585 -1 type: 'widget',22586 -1 requiredContext: [ 'tablist' ],22587 -1 allowedAttrs: [ 'aria-posinset', 'aria-selected', 'aria-setsize', 'aria-expanded' ],22588 -1 nameFromContent: true22589 -1 },22590 -1 table: {22591 -1 type: 'structure',22592 -1 requiredOwned: [ 'rowgroup', 'row' ],22593 -1 allowedAttrs: [ 'aria-colcount', 'aria-rowcount', 'aria-expanded' ],22594 -1 nameFromContent: true22595 -1 },22596 -1 tablist: {22597 -1 type: 'composite',22598 -1 requiredOwned: [ 'tab' ],22599 -1 allowedAttrs: [ 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-activedescendant', 'aria-expanded' ]22600 -1 },22601 -1 tabpanel: {22602 -1 type: 'widget',22603 -1 allowedAttrs: [ 'aria-expanded' ]22604 -1 },22605 -1 term: {22606 -1 type: 'structure',22607 -1 allowedAttrs: [ 'aria-expanded' ],22608 -1 nameFromContent: true22609 -1 },22610 -1 textbox: {22611 -1 type: 'widget',22612 -1 allowedAttrs: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-placeholder', 'aria-readonly', 'aria-required' ]22613 -1 },22614 -1 timer: {22615 -1 type: 'widget',22616 -1 allowedAttrs: [ 'aria-expanded' ]22617 -1 },22618 -1 toolbar: {22619 -1 type: 'structure',22620 -1 allowedAttrs: [ 'aria-orientation', 'aria-activedescendant', 'aria-expanded' ]22621 -1 },22622 -1 tooltip: {22623 -1 type: 'structure',22624 -1 allowedAttrs: [ 'aria-expanded' ],22625 -1 nameFromContent: true22626 -1 },22627 -1 tree: {22628 -1 type: 'composite',22629 -1 requiredOwned: [ 'treeitem' ],22630 -1 allowedAttrs: [ 'aria-multiselectable', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ]22631 -1 },22632 -1 treegrid: {22633 -1 type: 'composite',22634 -1 requiredOwned: [ 'rowgroup', 'row' ],22635 -1 allowedAttrs: [ 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-readonly', 'aria-required', 'aria-rowcount' ]22636 -1 },22637 -1 treeitem: {22638 -1 type: 'widget',22639 -1 requiredContext: [ 'group', 'tree' ],22640 -1 allowedAttrs: [ 'aria-checked', 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-selected', 'aria-setsize' ],22641 -1 nameFromContent: true22642 -1 },22643 -1 widget: {22644 -1 type: 'abstract'22645 -1 },22646 -1 window: {22647 -1 type: 'abstract'22648 -1 }22649 -1 };22650 -1 __webpack_exports__['default'] = ariaRoles;22651 -1 },22652 -1 './lib/standards/css-colors.js': function libStandardsCssColorsJs(module, __webpack_exports__, __webpack_require__) {22653 -1 'use strict';22654 -1 __webpack_require__.r(__webpack_exports__);22655 -1 var cssColors = {22656 -1 aliceblue: [ 240, 248, 255 ],22657 -1 antiquewhite: [ 250, 235, 215 ],22658 -1 aqua: [ 0, 255, 255 ],22659 -1 aquamarine: [ 127, 255, 212 ],22660 -1 azure: [ 240, 255, 255 ],22661 -1 beige: [ 245, 245, 220 ],22662 -1 bisque: [ 255, 228, 196 ],22663 -1 black: [ 0, 0, 0 ],22664 -1 blanchedalmond: [ 255, 235, 205 ],22665 -1 blue: [ 0, 0, 255 ],22666 -1 blueviolet: [ 138, 43, 226 ],22667 -1 brown: [ 165, 42, 42 ],22668 -1 burlywood: [ 222, 184, 135 ],22669 -1 cadetblue: [ 95, 158, 160 ],22670 -1 chartreuse: [ 127, 255, 0 ],22671 -1 chocolate: [ 210, 105, 30 ],22672 -1 coral: [ 255, 127, 80 ],22673 -1 cornflowerblue: [ 100, 149, 237 ],22674 -1 cornsilk: [ 255, 248, 220 ],22675 -1 crimson: [ 220, 20, 60 ],22676 -1 cyan: [ 0, 255, 255 ],22677 -1 darkblue: [ 0, 0, 139 ],22678 -1 darkcyan: [ 0, 139, 139 ],22679 -1 darkgoldenrod: [ 184, 134, 11 ],22680 -1 darkgray: [ 169, 169, 169 ],22681 -1 darkgreen: [ 0, 100, 0 ],22682 -1 darkgrey: [ 169, 169, 169 ],22683 -1 darkkhaki: [ 189, 183, 107 ],22684 -1 darkmagenta: [ 139, 0, 139 ],22685 -1 darkolivegreen: [ 85, 107, 47 ],22686 -1 darkorange: [ 255, 140, 0 ],22687 -1 darkorchid: [ 153, 50, 204 ],22688 -1 darkred: [ 139, 0, 0 ],22689 -1 darksalmon: [ 233, 150, 122 ],22690 -1 darkseagreen: [ 143, 188, 143 ],22691 -1 darkslateblue: [ 72, 61, 139 ],22692 -1 darkslategray: [ 47, 79, 79 ],22693 -1 darkslategrey: [ 47, 79, 79 ],22694 -1 darkturquoise: [ 0, 206, 209 ],22695 -1 darkviolet: [ 148, 0, 211 ],22696 -1 deeppink: [ 255, 20, 147 ],22697 -1 deepskyblue: [ 0, 191, 255 ],22698 -1 dimgray: [ 105, 105, 105 ],22699 -1 dimgrey: [ 105, 105, 105 ],22700 -1 dodgerblue: [ 30, 144, 255 ],22701 -1 firebrick: [ 178, 34, 34 ],22702 -1 floralwhite: [ 255, 250, 240 ],22703 -1 forestgreen: [ 34, 139, 34 ],22704 -1 fuchsia: [ 255, 0, 255 ],22705 -1 gainsboro: [ 220, 220, 220 ],22706 -1 ghostwhite: [ 248, 248, 255 ],22707 -1 gold: [ 255, 215, 0 ],22708 -1 goldenrod: [ 218, 165, 32 ],22709 -1 gray: [ 128, 128, 128 ],22710 -1 green: [ 0, 128, 0 ],22711 -1 greenyellow: [ 173, 255, 47 ],22712 -1 grey: [ 128, 128, 128 ],22713 -1 honeydew: [ 240, 255, 240 ],22714 -1 hotpink: [ 255, 105, 180 ],22715 -1 indianred: [ 205, 92, 92 ],22716 -1 indigo: [ 75, 0, 130 ],22717 -1 ivory: [ 255, 255, 240 ],22718 -1 khaki: [ 240, 230, 140 ],22719 -1 lavender: [ 230, 230, 250 ],22720 -1 lavenderblush: [ 255, 240, 245 ],22721 -1 lawngreen: [ 124, 252, 0 ],22722 -1 lemonchiffon: [ 255, 250, 205 ],22723 -1 lightblue: [ 173, 216, 230 ],22724 -1 lightcoral: [ 240, 128, 128 ],22725 -1 lightcyan: [ 224, 255, 255 ],22726 -1 lightgoldenrodyellow: [ 250, 250, 210 ],22727 -1 lightgray: [ 211, 211, 211 ],22728 -1 lightgreen: [ 144, 238, 144 ],22729 -1 lightgrey: [ 211, 211, 211 ],22730 -1 lightpink: [ 255, 182, 193 ],22731 -1 lightsalmon: [ 255, 160, 122 ],22732 -1 lightseagreen: [ 32, 178, 170 ],22733 -1 lightskyblue: [ 135, 206, 250 ],22734 -1 lightslategray: [ 119, 136, 153 ],22735 -1 lightslategrey: [ 119, 136, 153 ],22736 -1 lightsteelblue: [ 176, 196, 222 ],22737 -1 lightyellow: [ 255, 255, 224 ],22738 -1 lime: [ 0, 255, 0 ],22739 -1 limegreen: [ 50, 205, 50 ],22740 -1 linen: [ 250, 240, 230 ],22741 -1 magenta: [ 255, 0, 255 ],22742 -1 maroon: [ 128, 0, 0 ],22743 -1 mediumaquamarine: [ 102, 205, 170 ],22744 -1 mediumblue: [ 0, 0, 205 ],22745 -1 mediumorchid: [ 186, 85, 211 ],22746 -1 mediumpurple: [ 147, 112, 219 ],22747 -1 mediumseagreen: [ 60, 179, 113 ],22748 -1 mediumslateblue: [ 123, 104, 238 ],22749 -1 mediumspringgreen: [ 0, 250, 154 ],22750 -1 mediumturquoise: [ 72, 209, 204 ],22751 -1 mediumvioletred: [ 199, 21, 133 ],22752 -1 midnightblue: [ 25, 25, 112 ],22753 -1 mintcream: [ 245, 255, 250 ],22754 -1 mistyrose: [ 255, 228, 225 ],22755 -1 moccasin: [ 255, 228, 181 ],22756 -1 navajowhite: [ 255, 222, 173 ],22757 -1 navy: [ 0, 0, 128 ],22758 -1 oldlace: [ 253, 245, 230 ],22759 -1 olive: [ 128, 128, 0 ],22760 -1 olivedrab: [ 107, 142, 35 ],22761 -1 orange: [ 255, 165, 0 ],22762 -1 orangered: [ 255, 69, 0 ],22763 -1 orchid: [ 218, 112, 214 ],22764 -1 palegoldenrod: [ 238, 232, 170 ],22765 -1 palegreen: [ 152, 251, 152 ],22766 -1 paleturquoise: [ 175, 238, 238 ],22767 -1 palevioletred: [ 219, 112, 147 ],22768 -1 papayawhip: [ 255, 239, 213 ],22769 -1 peachpuff: [ 255, 218, 185 ],22770 -1 peru: [ 205, 133, 63 ],22771 -1 pink: [ 255, 192, 203 ],22772 -1 plum: [ 221, 160, 221 ],22773 -1 powderblue: [ 176, 224, 230 ],22774 -1 purple: [ 128, 0, 128 ],22775 -1 rebeccapurple: [ 102, 51, 153 ],22776 -1 red: [ 255, 0, 0 ],22777 -1 rosybrown: [ 188, 143, 143 ],22778 -1 royalblue: [ 65, 105, 225 ],22779 -1 saddlebrown: [ 139, 69, 19 ],22780 -1 salmon: [ 250, 128, 114 ],22781 -1 sandybrown: [ 244, 164, 96 ],22782 -1 seagreen: [ 46, 139, 87 ],22783 -1 seashell: [ 255, 245, 238 ],22784 -1 sienna: [ 160, 82, 45 ],22785 -1 silver: [ 192, 192, 192 ],22786 -1 skyblue: [ 135, 206, 235 ],22787 -1 slateblue: [ 106, 90, 205 ],22788 -1 slategray: [ 112, 128, 144 ],22789 -1 slategrey: [ 112, 128, 144 ],22790 -1 snow: [ 255, 250, 250 ],22791 -1 springgreen: [ 0, 255, 127 ],22792 -1 steelblue: [ 70, 130, 180 ],22793 -1 tan: [ 210, 180, 140 ],22794 -1 teal: [ 0, 128, 128 ],22795 -1 thistle: [ 216, 191, 216 ],22796 -1 tomato: [ 255, 99, 71 ],22797 -1 turquoise: [ 64, 224, 208 ],22798 -1 violet: [ 238, 130, 238 ],22799 -1 wheat: [ 245, 222, 179 ],22800 -1 white: [ 255, 255, 255 ],22801 -1 whitesmoke: [ 245, 245, 245 ],22802 -1 yellow: [ 255, 255, 0 ],22803 -1 yellowgreen: [ 154, 205, 50 ]22804 -1 };22805 -1 __webpack_exports__['default'] = cssColors;22806 -1 },22807 -1 './lib/standards/dpub-roles.js': function libStandardsDpubRolesJs(module, __webpack_exports__, __webpack_require__) {22808 -1 'use strict';22809 -1 __webpack_require__.r(__webpack_exports__);22810 -1 var dpubRoles = {22811 -1 'doc-abstract': {22812 -1 type: 'section',22813 -1 allowedAttrs: [ 'aria-expanded' ]22814 -1 },22815 -1 'doc-acknowledgments': {22816 -1 type: 'landmark',22817 -1 allowedAttrs: [ 'aria-expanded' ]22818 -1 },22819 -1 'doc-afterword': {22820 -1 type: 'landmark',22821 -1 allowedAttrs: [ 'aria-expanded' ]22822 -1 },22823 -1 'doc-appendix': {22824 -1 type: 'landmark',22825 -1 allowedAttrs: [ 'aria-expanded' ]22826 -1 },22827 -1 'doc-backlink': {22828 -1 type: 'link',22829 -1 allowedAttrs: [ 'aria-expanded' ],22830 -1 nameFromContent: true22831 -1 },22832 -1 'doc-biblioentry': {22833 -1 type: 'listitem',22834 -1 requiredContext: [ 'doc-bibliography' ],22835 -1 allowedAttrs: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ]22836 -1 },22837 -1 'doc-bibliography': {22838 -1 type: 'landmark',22839 -1 requiredOwned: [ 'doc-biblioentry' ],22840 -1 allowedAttrs: [ 'aria-expanded' ]22841 -1 },22842 -1 'doc-biblioref': {22843 -1 type: 'link',22844 -1 allowedAttrs: [ 'aria-expanded' ],22845 -1 nameFromContent: true22846 -1 },22847 -1 'doc-chapter': {22848 -1 type: 'landmark',22849 -1 allowedAttrs: [ 'aria-expanded' ]22850 -1 },22851 -1 'doc-colophon': {22852 -1 type: 'section',22853 -1 allowedAttrs: [ 'aria-expanded' ]22854 -1 },22855 -1 'doc-conclusion': {22856 -1 type: 'landmark',22857 -1 allowedAttrs: [ 'aria-expanded' ]22858 -1 },22859 -1 'doc-cover': {22860 -1 type: 'img',22861 -1 allowedAttrs: [ 'aria-expanded' ]22862 -1 },22863 -1 'doc-credit': {22864 -1 type: 'section',22865 -1 allowedAttrs: [ 'aria-expanded' ]22866 -1 },22867 -1 'doc-credits': {22868 -1 type: 'landmark',22869 -1 allowedAttrs: [ 'aria-expanded' ]22870 -1 },22871 -1 'doc-dedication': {22872 -1 type: 'section',22873 -1 allowedAttrs: [ 'aria-expanded' ]22874 -1 },22875 -1 'doc-endnote': {22876 -1 type: 'listitem',22877 -1 requiredContext: [ 'doc-endnotes' ],22878 -1 allowedAttrs: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ]22879 -1 },22880 -1 'doc-endnotes': {22881 -1 type: 'landmark',22882 -1 requiredOwned: [ 'doc-endnote' ],22883 -1 allowedAttrs: [ 'aria-expanded' ]22884 -1 },22885 -1 'doc-epigraph': {22886 -1 type: 'section',22887 -1 allowedAttrs: [ 'aria-expanded' ]22888 -1 },22889 -1 'doc-epilogue': {22890 -1 type: 'landmark',22891 -1 allowedAttrs: [ 'aria-expanded' ]22892 -1 },22893 -1 'doc-errata': {22894 -1 type: 'landmark',22895 -1 allowedAttrs: [ 'aria-expanded' ]22896 -1 },22897 -1 'doc-example': {22898 -1 type: 'section',22899 -1 allowedAttrs: [ 'aria-expanded' ]22900 -1 },22901 -1 'doc-footnote': {22902 -1 type: 'section',22903 -1 allowedAttrs: [ 'aria-expanded' ]22904 -1 },22905 -1 'doc-foreword': {22906 -1 type: 'landmark',22907 -1 allowedAttrs: [ 'aria-expanded' ]22908 -1 },22909 -1 'doc-glossary': {22910 -1 type: 'landmark',22911 -1 requiredOwned: [ 'definition', 'term' ],22912 -1 allowedAttrs: [ 'aria-expanded' ]22913 -1 },22914 -1 'doc-glossref': {22915 -1 type: 'link',22916 -1 allowedAttrs: [ 'aria-expanded' ],22917 -1 nameFromContent: true22918 -1 },22919 -1 'doc-index': {22920 -1 type: 'navigation',22921 -1 allowedAttrs: [ 'aria-expanded' ]22922 -1 },22923 -1 'doc-introduction': {22924 -1 type: 'landmark',22925 -1 allowedAttrs: [ 'aria-expanded' ]22926 -1 },22927 -1 'doc-noteref': {22928 -1 type: 'link',22929 -1 allowedAttrs: [ 'aria-expanded' ],22930 -1 nameFromContent: true22931 -1 },22932 -1 'doc-notice': {22933 -1 type: 'note',22934 -1 allowedAttrs: [ 'aria-expanded' ]22935 -1 },22936 -1 'doc-pagebreak': {22937 -1 type: 'separator',22938 -1 allowedAttrs: [ 'aria-expanded', 'aria-orientation' ]22939 -1 },22940 -1 'doc-pagelist': {22941 -1 type: 'navigation',22942 -1 allowedAttrs: [ 'aria-expanded' ]22943 -1 },22944 -1 'doc-part': {22945 -1 type: 'landmark',22946 -1 allowedAttrs: [ 'aria-expanded' ]22947 -1 },22948 -1 'doc-preface': {22949 -1 type: 'landmark',22950 -1 allowedAttrs: [ 'aria-expanded' ]22951 -1 },22952 -1 'doc-prologue': {22953 -1 type: 'landmark',22954 -1 allowedAttrs: [ 'aria-expanded' ]22955 -1 },22956 -1 'doc-pullquote': {22957 -1 type: 'none'22958 -1 },22959 -1 'doc-qna': {22960 -1 type: 'section',22961 -1 allowedAttrs: [ 'aria-expanded' ]22962 -1 },22963 -1 'doc-subtitle': {22964 -1 type: 'sectionhead',22965 -1 allowedAttrs: [ 'aria-expanded' ]22966 -1 },22967 -1 'doc-tip': {22968 -1 type: 'note',22969 -1 allowedAttrs: [ 'aria-expanded' ]22970 -1 },22971 -1 'doc-toc': {22972 -1 type: 'navigation',22973 -1 allowedAttrs: [ 'aria-expanded' ]22974 41529 }22975 -1 };22976 -1 __webpack_exports__['default'] = dpubRoles;22977 -1 },22978 -1 './lib/standards/html-elms.js': function libStandardsHtmlElmsJs(module, __webpack_exports__, __webpack_require__) {22979 -1 'use strict';22980 -1 __webpack_require__.r(__webpack_exports__);22981 -1 var htmlElms = {22982 -1 a: {22983 -1 variant: {22984 -1 href: {22985 -1 matches: '[href]',22986 -1 contentTypes: [ 'interactive', 'phrasing', 'flow' ],22987 -1 allowedRoles: [ 'button', 'checkbox', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'switch', 'tab', 'treeitem', 'doc-backlink', 'doc-biblioref', 'doc-glossref', 'doc-noteref' ]22988 -1 },22989 -1 default: {22990 -1 contentTypes: [ 'phrasing', 'flow' ],22991 -1 allowedRoles: true22992 -1 }-1 41530 }, -1 41531 abbr: { -1 41532 contentTypes: [ 'phrasing', 'flow' ], -1 41533 allowedRoles: true -1 41534 }, -1 41535 addres: { -1 41536 contentTypes: [ 'flow' ], -1 41537 allowedRoles: true -1 41538 }, -1 41539 area: { -1 41540 contentTypes: [ 'phrasing', 'flow' ], -1 41541 allowedRoles: false, -1 41542 namingMethods: [ 'altText' ] -1 41543 }, -1 41544 article: { -1 41545 contentTypes: [ 'sectioning', 'flow' ], -1 41546 allowedRoles: [ 'feed', 'presentation', 'none', 'document', 'application', 'main', 'region' ], -1 41547 shadowRoot: true -1 41548 }, -1 41549 aside: { -1 41550 contentTypes: [ 'sectioning', 'flow' ], -1 41551 allowedRoles: [ 'feed', 'note', 'presentation', 'none', 'region', 'search', 'doc-dedication', 'doc-example', 'doc-footnote', 'doc-pullquote', 'doc-tip' ] -1 41552 }, -1 41553 audio: { -1 41554 variant: { -1 41555 controls: { -1 41556 matches: '[controls]', -1 41557 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ] -1 41558 }, -1 41559 default: { -1 41560 contentTypes: [ 'embedded', 'phrasing', 'flow' ] 22993 41561 } 22994 41562 },22995 -1 abbr: {22996 -1 contentTypes: [ 'phrasing', 'flow' ],22997 -1 allowedRoles: true22998 -1 },22999 -1 addres: {23000 -1 contentTypes: [ 'flow' ],23001 -1 allowedRoles: true23002 -1 },23003 -1 area: {23004 -1 contentTypes: [ 'phrasing', 'flow' ],23005 -1 allowedRoles: false23006 -1 },23007 -1 article: {23008 -1 contentTypes: [ 'sectioning', 'flow' ],23009 -1 allowedRoles: [ 'feed', 'presentation', 'none', 'document', 'application', 'main', 'region' ],23010 -1 shadowRoot: true23011 -1 },23012 -1 aside: {23013 -1 contentTypes: [ 'sectioning', 'flow' ],23014 -1 allowedRoles: [ 'feed', 'note', 'presentation', 'none', 'region', 'search', 'doc-dedication', 'doc-example', 'doc-footnote', 'doc-pullquote', 'doc-tip' ]23015 -1 },23016 -1 audio: {23017 -1 variant: {23018 -1 controls: {23019 -1 matches: '[controls]',23020 -1 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ]-1 41563 allowedRoles: [ 'application' ], -1 41564 chromiumRole: 'Audio' -1 41565 }, -1 41566 b: { -1 41567 contentTypes: [ 'phrasing', 'flow' ], -1 41568 allowedRoles: false -1 41569 }, -1 41570 base: { -1 41571 allowedRoles: false, -1 41572 noAriaAttrs: true -1 41573 }, -1 41574 bdi: { -1 41575 contentTypes: [ 'phrasing', 'flow' ], -1 41576 allowedRoles: true -1 41577 }, -1 41578 bdo: { -1 41579 contentTypes: [ 'phrasing', 'flow' ], -1 41580 allowedRoles: true -1 41581 }, -1 41582 blockquote: { -1 41583 contentTypes: [ 'flow' ], -1 41584 allowedRoles: true, -1 41585 shadowRoot: true -1 41586 }, -1 41587 body: { -1 41588 allowedRoles: false, -1 41589 shadowRoot: true -1 41590 }, -1 41591 br: { -1 41592 contentTypes: [ 'phrasing', 'flow' ], -1 41593 allowedRoles: [ 'presentation', 'none' ], -1 41594 namingMethods: [ 'titleText', 'singleSpace' ] -1 41595 }, -1 41596 button: { -1 41597 contentTypes: [ 'interactive', 'phrasing', 'flow' ], -1 41598 allowedRoles: [ 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'switch', 'tab' ], -1 41599 namingMethods: [ 'subtreeText' ] -1 41600 }, -1 41601 canvas: { -1 41602 allowedRoles: true, -1 41603 contentTypes: [ 'embedded', 'phrasing', 'flow' ], -1 41604 chromiumRole: 'Canvas' -1 41605 }, -1 41606 caption: { -1 41607 allowedRoles: false -1 41608 }, -1 41609 cite: { -1 41610 contentTypes: [ 'phrasing', 'flow' ], -1 41611 allowedRoles: true -1 41612 }, -1 41613 code: { -1 41614 contentTypes: [ 'phrasing', 'flow' ], -1 41615 allowedRoles: true -1 41616 }, -1 41617 col: { -1 41618 allowedRoles: false, -1 41619 noAriaAttrs: true -1 41620 }, -1 41621 colgroup: { -1 41622 allowedRoles: false, -1 41623 noAriaAttrs: true -1 41624 }, -1 41625 data: { -1 41626 contentTypes: [ 'phrasing', 'flow' ], -1 41627 allowedRoles: true -1 41628 }, -1 41629 datalist: { -1 41630 contentTypes: [ 'phrasing', 'flow' ], -1 41631 allowedRoles: false, -1 41632 implicitAttrs: { -1 41633 'aria-multiselectable': 'false' -1 41634 } -1 41635 }, -1 41636 dd: { -1 41637 allowedRoles: false -1 41638 }, -1 41639 del: { -1 41640 contentTypes: [ 'phrasing', 'flow' ], -1 41641 allowedRoles: true -1 41642 }, -1 41643 dfn: { -1 41644 contentTypes: [ 'phrasing', 'flow' ], -1 41645 allowedRoles: true -1 41646 }, -1 41647 details: { -1 41648 contentTypes: [ 'interactive', 'flow' ], -1 41649 allowedRoles: false -1 41650 }, -1 41651 dialog: { -1 41652 contentTypes: [ 'flow' ], -1 41653 allowedRoles: [ 'alertdialog' ] -1 41654 }, -1 41655 div: { -1 41656 contentTypes: [ 'flow' ], -1 41657 allowedRoles: true, -1 41658 shadowRoot: true -1 41659 }, -1 41660 dl: { -1 41661 contentTypes: [ 'flow' ], -1 41662 allowedRoles: [ 'group', 'list', 'presentation', 'none' ], -1 41663 chromiumRole: 'DescriptionList' -1 41664 }, -1 41665 dt: { -1 41666 allowedRoles: [ 'listitem' ] -1 41667 }, -1 41668 em: { -1 41669 contentTypes: [ 'phrasing', 'flow' ], -1 41670 allowedRoles: true -1 41671 }, -1 41672 embed: { -1 41673 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ], -1 41674 allowedRoles: [ 'application', 'document', 'img', 'presentation', 'none' ], -1 41675 chromiumRole: 'EmbeddedObject' -1 41676 }, -1 41677 fieldset: { -1 41678 contentTypes: [ 'flow' ], -1 41679 allowedRoles: [ 'none', 'presentation', 'radiogroup' ], -1 41680 namingMethods: [ 'fieldsetLegendText' ] -1 41681 }, -1 41682 figcaption: { -1 41683 allowedRoles: [ 'group', 'none', 'presentation' ] -1 41684 }, -1 41685 figure: { -1 41686 contentTypes: [ 'flow' ], -1 41687 allowedRoles: true, -1 41688 namingMethods: [ 'figureText', 'titleText' ] -1 41689 }, -1 41690 footer: { -1 41691 contentTypes: [ 'flow' ], -1 41692 allowedRoles: [ 'group', 'none', 'presentation', 'doc-footnote' ], -1 41693 shadowRoot: true -1 41694 }, -1 41695 form: { -1 41696 contentTypes: [ 'flow' ], -1 41697 allowedRoles: [ 'search', 'none', 'presentation' ] -1 41698 }, -1 41699 h1: { -1 41700 contentTypes: [ 'heading', 'flow' ], -1 41701 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ], -1 41702 shadowRoot: true, -1 41703 implicitAttrs: { -1 41704 'aria-level': '1' -1 41705 } -1 41706 }, -1 41707 h2: { -1 41708 contentTypes: [ 'heading', 'flow' ], -1 41709 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ], -1 41710 shadowRoot: true, -1 41711 implicitAttrs: { -1 41712 'aria-level': '2' -1 41713 } -1 41714 }, -1 41715 h3: { -1 41716 contentTypes: [ 'heading', 'flow' ], -1 41717 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ], -1 41718 shadowRoot: true, -1 41719 implicitAttrs: { -1 41720 'aria-level': '3' -1 41721 } -1 41722 }, -1 41723 h4: { -1 41724 contentTypes: [ 'heading', 'flow' ], -1 41725 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ], -1 41726 shadowRoot: true, -1 41727 implicitAttrs: { -1 41728 'aria-level': '4' -1 41729 } -1 41730 }, -1 41731 h5: { -1 41732 contentTypes: [ 'heading', 'flow' ], -1 41733 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ], -1 41734 shadowRoot: true, -1 41735 implicitAttrs: { -1 41736 'aria-level': '5' -1 41737 } -1 41738 }, -1 41739 h6: { -1 41740 contentTypes: [ 'heading', 'flow' ], -1 41741 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ], -1 41742 shadowRoot: true, -1 41743 implicitAttrs: { -1 41744 'aria-level': '6' -1 41745 } -1 41746 }, -1 41747 head: { -1 41748 allowedRoles: false, -1 41749 noAriaAttrs: true -1 41750 }, -1 41751 header: { -1 41752 contentTypes: [ 'flow' ], -1 41753 allowedRoles: [ 'group', 'none', 'presentation', 'doc-footnote' ], -1 41754 shadowRoot: true -1 41755 }, -1 41756 hgroup: { -1 41757 contentTypes: [ 'heading', 'flow' ], -1 41758 allowedRoles: true -1 41759 }, -1 41760 hr: { -1 41761 contentTypes: [ 'flow' ], -1 41762 allowedRoles: [ 'none', 'presentation', 'doc-pagebreak' ], -1 41763 namingMethods: [ 'titleText', 'singleSpace' ] -1 41764 }, -1 41765 html: { -1 41766 allowedRoles: false, -1 41767 noAriaAttrs: true -1 41768 }, -1 41769 i: { -1 41770 contentTypes: [ 'phrasing', 'flow' ], -1 41771 allowedRoles: true -1 41772 }, -1 41773 iframe: { -1 41774 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ], -1 41775 allowedRoles: [ 'application', 'document', 'img', 'none', 'presentation' ], -1 41776 chromiumRole: 'Iframe' -1 41777 }, -1 41778 img: { -1 41779 variant: { -1 41780 nonEmptyAlt: { -1 41781 matches: { -1 41782 attributes: { -1 41783 alt: '/.+/' -1 41784 } 23021 41785 },23022 -1 default: {23023 -1 contentTypes: [ 'embedded', 'phrasing', 'flow' ]23024 -1 }-1 41786 allowedRoles: [ 'button', 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'scrollbar', 'separator', 'slider', 'switch', 'tab', 'treeitem', 'doc-cover' ] 23025 41787 },23026 -1 allowedRoles: [ 'application' ]23027 -1 },23028 -1 b: {23029 -1 contentTypes: [ 'phrasing', 'flow' ],23030 -1 allowedRoles: false23031 -1 },23032 -1 base: {23033 -1 allowedRoles: false,23034 -1 noAriaAttrs: true23035 -1 },23036 -1 bdi: {23037 -1 contentTypes: [ 'phrasing', 'flow' ],23038 -1 allowedRoles: true23039 -1 },23040 -1 bdo: {23041 -1 contentTypes: [ 'phrasing', 'flow' ],23042 -1 allowedRoles: true23043 -1 },23044 -1 blockquote: {23045 -1 contentTypes: [ 'flow' ],23046 -1 allowedRoles: true,23047 -1 shadowRoot: true23048 -1 },23049 -1 body: {23050 -1 allowedRoles: false,23051 -1 shadowRoot: true23052 -1 },23053 -1 br: {23054 -1 contentTypes: [ 'phrasing', 'flow' ],23055 -1 allowedRoles: [ 'presentation', 'none' ],23056 -1 namingMethods: [ 'titleText', 'singleSpace' ]23057 -1 },23058 -1 button: {23059 -1 contentTypes: [ 'interactive', 'phrasing', 'flow' ],23060 -1 allowedRoles: [ 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'switch', 'tab' ],23061 -1 namingMethods: [ 'subtreeText' ]23062 -1 },23063 -1 canvas: {23064 -1 allowedRoles: true,23065 -1 contentTypes: [ 'embedded', 'phrasing', 'flow' ]23066 -1 },23067 -1 caption: {23068 -1 allowedRoles: false23069 -1 },23070 -1 cite: {23071 -1 contentTypes: [ 'phrasing', 'flow' ],23072 -1 allowedRoles: true23073 -1 },23074 -1 code: {23075 -1 contentTypes: [ 'phrasing', 'flow' ],23076 -1 allowedRoles: true23077 -1 },23078 -1 col: {23079 -1 allowedRoles: false,23080 -1 noAriaAttrs: true23081 -1 },23082 -1 colgroup: {23083 -1 allowedRoles: false,23084 -1 noAriaAttrs: true23085 -1 },23086 -1 data: {23087 -1 contentTypes: [ 'phrasing', 'flow' ],23088 -1 allowedRoles: true23089 -1 },23090 -1 datalist: {23091 -1 contentTypes: [ 'phrasing', 'flow' ],23092 -1 allowedRoles: false,23093 -1 implicitAttrs: {23094 -1 'aria-multiselectable': 'false'23095 -1 }23096 -1 },23097 -1 dd: {23098 -1 allowedRoles: false23099 -1 },23100 -1 del: {23101 -1 contentTypes: [ 'phrasing', 'flow' ],23102 -1 allowedRoles: true23103 -1 },23104 -1 dfn: {23105 -1 contentTypes: [ 'phrasing', 'flow' ],23106 -1 allowedRoles: true23107 -1 },23108 -1 details: {23109 -1 contentTypes: [ 'interactive', 'flow' ],23110 -1 allowedRoles: false23111 -1 },23112 -1 dialog: {23113 -1 contentTypes: [ 'flow' ],23114 -1 allowedRoles: [ 'alertdialog' ]23115 -1 },23116 -1 div: {23117 -1 contentTypes: [ 'flow' ],23118 -1 allowedRoles: true,23119 -1 shadowRoot: true23120 -1 },23121 -1 dl: {23122 -1 contentTypes: [ 'flow' ],23123 -1 allowedRoles: [ 'group', 'list', 'presentation', 'none' ]23124 -1 },23125 -1 dt: {23126 -1 allowedRoles: [ 'listitem' ]23127 -1 },23128 -1 em: {23129 -1 contentTypes: [ 'phrasing', 'flow' ],23130 -1 allowedRoles: true23131 -1 },23132 -1 embed: {23133 -1 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ],23134 -1 allowedRoles: [ 'application', 'document', 'img', 'presentation', 'none' ]-1 41788 usemap: { -1 41789 matches: '[usemap]', -1 41790 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ] -1 41791 }, -1 41792 default: { -1 41793 allowedRoles: [ 'presentation', 'none' ], -1 41794 contentTypes: [ 'embedded', 'phrasing', 'flow' ] -1 41795 } 23135 41796 },23136 -1 fieldset: {23137 -1 contentTypes: [ 'flow' ],23138 -1 allowedRoles: [ 'none', 'presentation', 'radiogroup' ],23139 -1 namingMethods: [ 'fieldsetLegendText' ]23140 -1 },23141 -1 figcaption: {23142 -1 allowedRoles: [ 'group', 'none', 'presentation' ]23143 -1 },23144 -1 figure: {23145 -1 contentTypes: [ 'flow' ],23146 -1 allowedRoles: true,23147 -1 namingMethods: [ 'figureText', 'titleText' ]23148 -1 },23149 -1 footer: {23150 -1 contentTypes: [ 'flow' ],23151 -1 allowedRoles: [ 'group', 'none', 'presentation', 'doc-footnote' ],23152 -1 shadowRoot: true23153 -1 },23154 -1 form: {23155 -1 contentTypes: [ 'flow' ],23156 -1 allowedRoles: [ 'search', 'none', 'presentation' ]23157 -1 },23158 -1 h1: {23159 -1 contentTypes: [ 'heading', 'flow' ],23160 -1 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],23161 -1 shadowRoot: true,23162 -1 implicitAttrs: {23163 -1 'aria-level': '1'23164 -1 }23165 -1 },23166 -1 h2: {23167 -1 contentTypes: [ 'heading', 'flow' ],23168 -1 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],23169 -1 shadowRoot: true,23170 -1 implicitAttrs: {23171 -1 'aria-level': '2'23172 -1 }23173 -1 },23174 -1 h3: {23175 -1 contentTypes: [ 'heading', 'flow' ],23176 -1 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],23177 -1 shadowRoot: true,23178 -1 implicitAttrs: {23179 -1 'aria-level': '3'23180 -1 }23181 -1 },23182 -1 h4: {23183 -1 contentTypes: [ 'heading', 'flow' ],23184 -1 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],23185 -1 shadowRoot: true,23186 -1 implicitAttrs: {23187 -1 'aria-level': '4'23188 -1 }23189 -1 },23190 -1 h5: {23191 -1 contentTypes: [ 'heading', 'flow' ],23192 -1 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],23193 -1 shadowRoot: true,23194 -1 implicitAttrs: {23195 -1 'aria-level': '5'23196 -1 }23197 -1 },23198 -1 h6: {23199 -1 contentTypes: [ 'heading', 'flow' ],23200 -1 allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],23201 -1 shadowRoot: true,23202 -1 implicitAttrs: {23203 -1 'aria-level': '6'23204 -1 }23205 -1 },23206 -1 head: {23207 -1 allowedRoles: false,23208 -1 noAriaAttrs: true23209 -1 },23210 -1 header: {23211 -1 contentTypes: [ 'flow' ],23212 -1 allowedRoles: [ 'group', 'none', 'presentation', 'doc-footnote' ],23213 -1 shadowRoot: true23214 -1 },23215 -1 hgroup: {23216 -1 contentTypes: [ 'heading', 'flow' ],23217 -1 allowedRoles: true23218 -1 },23219 -1 hr: {23220 -1 contentTypes: [ 'flow' ],23221 -1 allowedRoles: [ 'none', 'presentation', 'doc-pagebreak' ],23222 -1 namingMethods: [ 'titleText', 'singleSpace' ]23223 -1 },23224 -1 html: {23225 -1 allowedRoles: false,23226 -1 noAriaAttrs: true23227 -1 },23228 -1 i: {23229 -1 contentTypes: [ 'phrasing', 'flow' ],23230 -1 allowedRoles: true23231 -1 },23232 -1 iframe: {23233 -1 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ],23234 -1 allowedRoles: [ 'application', 'document', 'img', 'none', 'presentation' ]23235 -1 },23236 -1 img: {23237 -1 variant: {23238 -1 nonEmptyAlt: {23239 -1 matches: {23240 -1 attributes: {23241 -1 alt: '/.+/'23242 -1 }23243 -1 },23244 -1 allowedRoles: [ 'button', 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'scrollbar', 'separator', 'slider', 'switch', 'tab', 'treeitem', 'doc-cover' ]23245 -1 },23246 -1 usemap: {23247 -1 matches: '[usemap]',23248 -1 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ]-1 41797 namingMethods: [ 'altText' ] -1 41798 }, -1 41799 input: { -1 41800 variant: { -1 41801 button: { -1 41802 matches: { -1 41803 properties: { -1 41804 type: 'button' -1 41805 } 23249 41806 },23250 -1 default: {23251 -1 allowedRoles: [ 'presentation', 'none' ],23252 -1 contentTypes: [ 'embedded', 'phrasing', 'flow' ]23253 -1 }-1 41807 allowedRoles: [ 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'switch', 'tab' ] 23254 41808 },23255 -1 namingMethods: [ 'altText' ]23256 -1 },23257 -1 input: {23258 -1 variant: {23259 -1 button: {23260 -1 matches: {23261 -1 properties: {23262 -1 type: 'button'23263 -1 }23264 -1 },23265 -1 allowedRoles: [ 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'switch', 'tab' ]23266 -1 },23267 -1 buttonType: {23268 -1 matches: {23269 -1 properties: {23270 -1 type: [ 'button', 'submit', 'reset' ]23271 -1 }23272 -1 },23273 -1 namingMethods: [ 'valueText', 'titleText', 'buttonDefaultText' ]23274 -1 },23275 -1 checkboxPressed: {23276 -1 matches: {23277 -1 properties: {23278 -1 type: 'checkbox'23279 -1 },23280 -1 attributes: {23281 -1 'aria-pressed': '/.*/'23282 -1 }23283 -1 },23284 -1 allowedRoles: [ 'button', 'menuitemcheckbox', 'option', 'switch' ],23285 -1 implicitAttrs: {23286 -1 'aria-checked': 'false'-1 41809 buttonType: { -1 41810 matches: { -1 41811 properties: { -1 41812 type: [ 'button', 'submit', 'reset' ] 23287 41813 } 23288 41814 },23289 -1 checkbox: {23290 -1 matches: {23291 -1 properties: {23292 -1 type: 'checkbox'23293 -1 },23294 -1 attributes: {23295 -1 'aria-pressed': null23296 -1 }-1 41815 namingMethods: [ 'valueText', 'titleText', 'buttonDefaultText' ] -1 41816 }, -1 41817 checkboxPressed: { -1 41818 matches: { -1 41819 properties: { -1 41820 type: 'checkbox' 23297 41821 },23298 -1 allowedRoles: [ 'menuitemcheckbox', 'option', 'switch' ],23299 -1 implicitAttrs: {23300 -1 'aria-checked': 'false'-1 41822 attributes: { -1 41823 'aria-pressed': '/.*/' 23301 41824 } 23302 41825 },23303 -1 noRoles: {23304 -1 matches: {23305 -1 properties: {23306 -1 type: [ 'color', 'date', 'datetime-local', 'file', 'month', 'number', 'password', 'range', 'reset', 'submit', 'time', 'week' ]23307 -1 }23308 -1 },23309 -1 allowedRoles: false23310 -1 },23311 -1 hidden: {23312 -1 matches: {23313 -1 properties: {23314 -1 type: 'hidden'23315 -1 }23316 -1 },23317 -1 contentTypes: [ 'phrasing', 'flow' ],23318 -1 allowedRoles: false,23319 -1 noAriaAttrs: true23320 -1 },23321 -1 image: {23322 -1 matches: {23323 -1 properties: {23324 -1 type: 'image'23325 -1 }23326 -1 },23327 -1 allowedRoles: [ 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'radio', 'switch' ],23328 -1 namingMethods: [ 'altText', 'valueText', 'labelText', 'titleText', 'buttonDefaultText' ]23329 -1 },23330 -1 radio: {23331 -1 matches: {23332 -1 properties: {23333 -1 type: 'radio'23334 -1 }-1 41826 allowedRoles: [ 'button', 'menuitemcheckbox', 'option', 'switch' ], -1 41827 implicitAttrs: { -1 41828 'aria-checked': 'false' -1 41829 } -1 41830 }, -1 41831 checkbox: { -1 41832 matches: { -1 41833 properties: { -1 41834 type: 'checkbox' 23335 41835 },23336 -1 allowedRoles: [ 'menuitemradio' ],23337 -1 implicitAttrs: {23338 -1 'aria-checked': 'false'-1 41836 attributes: { -1 41837 'aria-pressed': null 23339 41838 } 23340 41839 },23341 -1 textWithList: {23342 -1 matches: {23343 -1 properties: {23344 -1 type: 'text'23345 -1 },23346 -1 attributes: {23347 -1 list: '/.*/'23348 -1 }23349 -1 },23350 -1 allowedRoles: false23351 -1 },23352 -1 default: {23353 -1 contentTypes: [ 'interactive', 'phrasing', 'flow' ],23354 -1 allowedRoles: [ 'combobox', 'searchbox', 'spinbutton' ],23355 -1 implicitAttrs: {23356 -1 'aria-valuenow': ''23357 -1 },23358 -1 namingMethods: [ 'labelText' ]23359 -1 }23360 -1 }23361 -1 },23362 -1 ins: {23363 -1 contentTypes: [ 'phrasing', 'flow' ],23364 -1 allowedRoles: true23365 -1 },23366 -1 kbd: {23367 -1 contentTypes: [ 'phrasing', 'flow' ],23368 -1 allowedRoles: true23369 -1 },23370 -1 label: {23371 -1 contentTypes: [ 'interactive', 'phrasing', 'flow' ],23372 -1 allowedRoles: false23373 -1 },23374 -1 legend: {23375 -1 allowedRoles: false23376 -1 },23377 -1 li: {23378 -1 allowedRoles: [ 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'none', 'presentation', 'radio', 'separator', 'tab', 'treeitem', 'doc-biblioentry', 'doc-endnote' ],23379 -1 implicitAttrs: {23380 -1 'aria-setsize': '1',23381 -1 'aria-posinset': '1'23382 -1 }23383 -1 },23384 -1 link: {23385 -1 contentTypes: [ 'phrasing', 'flow' ],23386 -1 allowedRoles: false,23387 -1 noAriaAttrs: true23388 -1 },23389 -1 main: {23390 -1 contentTypes: [ 'flow' ],23391 -1 allowedRoles: false,23392 -1 shadowRoot: true23393 -1 },23394 -1 map: {23395 -1 contentTypes: [ 'phrasing', 'flow' ],23396 -1 allowedRoles: false,23397 -1 noAriaAttrs: true23398 -1 },23399 -1 math: {23400 -1 contentTypes: [ 'embedded', 'phrasing', 'flow' ],23401 -1 allowedRoles: false23402 -1 },23403 -1 mark: {23404 -1 contentTypes: [ 'phrasing', 'flow' ],23405 -1 allowedRoles: true23406 -1 },23407 -1 menu: {23408 -1 contentTypes: [ 'flow' ],23409 -1 allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ]23410 -1 },23411 -1 meta: {23412 -1 variant: {23413 -1 itemprop: {23414 -1 matches: '[itemprop]',23415 -1 contentTypes: [ 'phrasing', 'flow' ]-1 41840 allowedRoles: [ 'menuitemcheckbox', 'option', 'switch' ], -1 41841 implicitAttrs: { -1 41842 'aria-checked': 'false' 23416 41843 } 23417 41844 },23418 -1 allowedRoles: false,23419 -1 noAriaAttrs: true23420 -1 },23421 -1 meter: {23422 -1 contentTypes: [ 'phrasing', 'flow' ],23423 -1 allowedRoles: false23424 -1 },23425 -1 nav: {23426 -1 contentTypes: [ 'sectioning', 'flow' ],23427 -1 allowedRoles: [ 'doc-index', 'doc-pagelist', 'doc-toc' ],23428 -1 shadowRoot: true23429 -1 },23430 -1 noscript: {23431 -1 contentTypes: [ 'phrasing', 'flow' ],23432 -1 allowedRoles: false,23433 -1 noAriaAttrs: true23434 -1 },23435 -1 object: {23436 -1 variant: {23437 -1 usemap: {23438 -1 matches: '[usemap]',23439 -1 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ]-1 41845 noRoles: { -1 41846 matches: { -1 41847 properties: { -1 41848 type: [ 'color', 'date', 'datetime-local', 'file', 'month', 'number', 'password', 'range', 'reset', 'submit', 'time', 'week' ] -1 41849 } 23440 41850 },23441 -1 default: {23442 -1 contentTypes: [ 'embedded', 'phrasing', 'flow' ]23443 -1 }-1 41851 allowedRoles: false 23444 41852 },23445 -1 allowedRoles: [ 'application', 'document', 'img' ]23446 -1 },23447 -1 ol: {23448 -1 contentTypes: [ 'flow' ],23449 -1 allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ]23450 -1 },23451 -1 optgroup: {23452 -1 allowedRoles: false23453 -1 },23454 -1 option: {23455 -1 allowedRoles: false,23456 -1 implicitAttrs: {23457 -1 'aria-selected': 'false'23458 -1 }23459 -1 },23460 -1 output: {23461 -1 contentTypes: [ 'phrasing', 'flow' ],23462 -1 allowedRoles: true,23463 -1 namingMethods: [ 'subtreeText' ]23464 -1 },23465 -1 p: {23466 -1 contentTypes: [ 'flow' ],23467 -1 allowedRoles: true,23468 -1 shadowRoot: true23469 -1 },23470 -1 param: {23471 -1 allowedRoles: false,23472 -1 noAriaAttrs: true23473 -1 },23474 -1 picture: {23475 -1 contentTypes: [ 'embedded', 'phrasing', 'flow' ],23476 -1 allowedRoles: false,23477 -1 noAriaAttrs: true23478 -1 },23479 -1 pre: {23480 -1 contentTypes: [ 'flow' ],23481 -1 allowedRoles: true23482 -1 },23483 -1 progress: {23484 -1 contentTypes: [ 'phrasing', 'flow' ],23485 -1 allowedRoles: true,23486 -1 implicitAttrs: {23487 -1 'aria-valuemax': '100',23488 -1 'aria-valuemin': '0',23489 -1 'aria-valuenow': '0'23490 -1 }23491 -1 },23492 -1 q: {23493 -1 contentTypes: [ 'phrasing', 'flow' ],23494 -1 allowedRoles: true23495 -1 },23496 -1 rp: {23497 -1 allowedRoles: true23498 -1 },23499 -1 rt: {23500 -1 allowedRoles: true23501 -1 },23502 -1 ruby: {23503 -1 contentTypes: [ 'phrasing', 'flow' ],23504 -1 allowedRoles: true23505 -1 },23506 -1 s: {23507 -1 contentTypes: [ 'phrasing', 'flow' ],23508 -1 allowedRoles: true23509 -1 },23510 -1 samp: {23511 -1 contentTypes: [ 'phrasing', 'flow' ],23512 -1 allowedRoles: true23513 -1 },23514 -1 script: {23515 -1 contentTypes: [ 'phrasing', 'flow' ],23516 -1 allowedRoles: false,23517 -1 noAriaAttrs: true23518 -1 },23519 -1 section: {23520 -1 contentTypes: [ 'sectioning', 'flow' ],23521 -1 allowedRoles: [ 'alert', 'alertdialog', 'application', 'banner', 'complementary', 'contentinfo', 'dialog', 'document', 'feed', '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' ],23522 -1 shadowRoot: true23523 -1 },23524 -1 select: {23525 -1 variant: {23526 -1 combobox: {23527 -1 matches: {23528 -1 attributes: {23529 -1 multiple: null,23530 -1 size: [ null, '1' ]23531 -1 }23532 -1 },23533 -1 allowedRoles: [ 'menu' ]-1 41853 hidden: { -1 41854 matches: { -1 41855 properties: { -1 41856 type: 'hidden' -1 41857 } 23534 41858 },23535 -1 default: {23536 -1 allowedRoles: false23537 -1 }-1 41859 contentTypes: [ 'flow' ], -1 41860 allowedRoles: false, -1 41861 noAriaAttrs: true 23538 41862 },23539 -1 contentTypes: [ 'interactive', 'phrasing', 'flow' ],23540 -1 implicitAttrs: {23541 -1 'aria-valuenow': ''23542 -1 }23543 -1 },23544 -1 slot: {23545 -1 contentTypes: [ 'phrasing', 'flow' ],23546 -1 allowedRoles: false,23547 -1 noAriaAttrs: true23548 -1 },23549 -1 small: {23550 -1 contentTypes: [ 'phrasing', 'flow' ],23551 -1 allowedRoles: true23552 -1 },23553 -1 source: {23554 -1 allowedRoles: false,23555 -1 noAriaAttrs: true23556 -1 },23557 -1 span: {23558 -1 contentTypes: [ 'phrasing', 'flow' ],23559 -1 allowedRoles: true,23560 -1 shadowRoot: true23561 -1 },23562 -1 strong: {23563 -1 contentTypes: [ 'phrasing', 'flow' ],23564 -1 allowedRoles: true23565 -1 },23566 -1 style: {23567 -1 allowedRoles: false,23568 -1 noAriaAttrs: true23569 -1 },23570 -1 svg: {23571 -1 contentTypes: [ 'embedded', 'phrasing', 'flow' ],23572 -1 allowedRoles: [ 'application', 'document', 'img' ]23573 -1 },23574 -1 sub: {23575 -1 contentTypes: [ 'phrasing', 'flow' ],23576 -1 allowedRoles: true23577 -1 },23578 -1 summary: {23579 -1 allowedRoles: false,23580 -1 namingMethods: [ 'subtreeText' ]23581 -1 },23582 -1 sup: {23583 -1 contentTypes: [ 'phrasing', 'flow' ],23584 -1 allowedRoles: true23585 -1 },23586 -1 table: {23587 -1 contentTypes: [ 'flow' ],23588 -1 allowedRoles: true,23589 -1 namingMethods: [ 'tableCaptionText', 'tableSummaryText' ]23590 -1 },23591 -1 tbody: {23592 -1 allowedRoles: true23593 -1 },23594 -1 template: {23595 -1 contentTypes: [ 'phrasing', 'flow' ],23596 -1 allowedRoles: false,23597 -1 noAriaAttrs: true23598 -1 },23599 -1 textarea: {23600 -1 contentTypes: [ 'interactive', 'phrasing', 'flow' ],23601 -1 allowedRoles: false,23602 -1 implicitAttrs: {23603 -1 'aria-valuenow': '',23604 -1 'aria-multiline': 'true'-1 41863 image: { -1 41864 matches: { -1 41865 properties: { -1 41866 type: 'image' -1 41867 } -1 41868 }, -1 41869 allowedRoles: [ 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'radio', 'switch' ], -1 41870 namingMethods: [ 'altText', 'valueText', 'labelText', 'titleText', 'buttonDefaultText' ] 23605 41871 },23606 -1 namingMethods: [ 'labelText' ]23607 -1 },23608 -1 tfoot: {23609 -1 allowedRoles: true23610 -1 },23611 -1 thead: {23612 -1 allowedRoles: true23613 -1 },23614 -1 time: {23615 -1 contentTypes: [ 'phrasing', 'flow' ],23616 -1 allowedRoles: true23617 -1 },23618 -1 title: {23619 -1 allowedRoles: false,23620 -1 noAriaAttrs: true23621 -1 },23622 -1 td: {23623 -1 allowedRoles: true23624 -1 },23625 -1 th: {23626 -1 allowedRoles: true23627 -1 },23628 -1 tr: {23629 -1 allowedRoles: true23630 -1 },23631 -1 track: {23632 -1 allowedRoles: false,23633 -1 noAriaAttrs: true23634 -1 },23635 -1 u: {23636 -1 contentTypes: [ 'phrasing', 'flow' ],23637 -1 allowedRoles: true23638 -1 },23639 -1 ul: {23640 -1 contentTypes: [ 'flow' ],23641 -1 allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ]23642 -1 },23643 -1 var: {23644 -1 contentTypes: [ 'phrasing', 'flow' ],23645 -1 allowedRoles: true23646 -1 },23647 -1 video: {23648 -1 variant: {23649 -1 controls: {23650 -1 matches: '[controls]',23651 -1 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ]-1 41872 radio: { -1 41873 matches: { -1 41874 properties: { -1 41875 type: 'radio' -1 41876 } 23652 41877 },23653 -1 default: {23654 -1 contentTypes: [ 'embedded', 'phrasing', 'flow' ]-1 41878 allowedRoles: [ 'menuitemradio' ], -1 41879 implicitAttrs: { -1 41880 'aria-checked': 'false' 23655 41881 } 23656 41882 },23657 -1 allowedRoles: [ 'application' ]23658 -1 },23659 -1 wbr: {23660 -1 contentTypes: [ 'phrasing', 'flow' ],23661 -1 allowedRoles: true23662 -1 }23663 -1 };23664 -1 __webpack_exports__['default'] = htmlElms;23665 -1 },23666 -1 './lib/standards/index.js': function libStandardsIndexJs(module, __webpack_exports__, __webpack_require__) {23667 -1 'use strict';23668 -1 __webpack_require__.r(__webpack_exports__);23669 -1 __webpack_require__.d(__webpack_exports__, 'configureStandards', function() {23670 -1 return configureStandards;23671 -1 });23672 -1 __webpack_require__.d(__webpack_exports__, 'resetStandards', function() {23673 -1 return resetStandards;23674 -1 });23675 -1 var _aria_attrs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__('./lib/standards/aria-attrs.js');23676 -1 var _aria_roles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__('./lib/standards/aria-roles.js');23677 -1 var _dpub_roles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__('./lib/standards/dpub-roles.js');23678 -1 var _html_elms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__('./lib/standards/html-elms.js');23679 -1 var _core_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__('./lib/core/utils/index.js');23680 -1 var _css_colors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__('./lib/standards/css-colors.js');23681 -1 var originals = {23682 -1 ariaAttrs: _aria_attrs__WEBPACK_IMPORTED_MODULE_0__['default'],23683 -1 ariaRoles: _extends({}, _aria_roles__WEBPACK_IMPORTED_MODULE_1__['default'], _dpub_roles__WEBPACK_IMPORTED_MODULE_2__['default']),23684 -1 htmlElms: _html_elms__WEBPACK_IMPORTED_MODULE_3__['default'],23685 -1 cssColors: _css_colors__WEBPACK_IMPORTED_MODULE_5__['default']23686 -1 };23687 -1 var standards = _extends({}, originals);23688 -1 function configureStandards(config) {23689 -1 Object.keys(standards).forEach(function(propName) {23690 -1 if (config[propName]) {23691 -1 standards[propName] = Object(_core_utils__WEBPACK_IMPORTED_MODULE_4__['deepMerge'])(standards[propName], config[propName]);23692 -1 }23693 -1 });23694 -1 }23695 -1 function resetStandards() {23696 -1 Object.keys(standards).forEach(function(propName) {23697 -1 standards[propName] = originals[propName];23698 -1 });23699 -1 }23700 -1 __webpack_exports__['default'] = standards;23701 -1 },23702 -1 './node_modules/@deque/dot/doT.js': function node_modulesDequeDotDoTJs(module, exports, __webpack_require__) {23703 -1 (function(global) {23704 -1 var __WEBPACK_AMD_DEFINE_RESULT__;23705 -1 (function() {23706 -1 'use strict';23707 -1 var doT = {23708 -1 name: 'doT',23709 -1 version: '1.1.1',23710 -1 templateSettings: {23711 -1 evaluate: /\{\{([\s\S]+?(\}?)+)\}\}/g,23712 -1 interpolate: /\{\{=([\s\S]+?)\}\}/g,23713 -1 encode: /\{\{!([\s\S]+?)\}\}/g,23714 -1 use: /\{\{#([\s\S]+?)\}\}/g,23715 -1 useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,23716 -1 define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,23717 -1 defineParams: /^\s*([\w$]+):([\s\S]+)/,23718 -1 conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,23719 -1 iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,23720 -1 varname: 'it',23721 -1 strip: true,23722 -1 append: true,23723 -1 selfcontained: false,23724 -1 doNotSkipEncoded: false-1 41883 textWithList: { -1 41884 matches: { -1 41885 properties: { -1 41886 type: 'text' -1 41887 }, -1 41888 attributes: { -1 41889 list: '/.*/' -1 41890 } 23725 41891 },23726 -1 template: undefined,23727 -1 compile: undefined,23728 -1 log: true23729 -1 };23730 -1 (function() {23731 -1 if ((typeof globalThis === 'undefined' ? 'undefined' : _typeof(globalThis)) === 'object') {23732 -1 return;23733 -1 }23734 -1 try {23735 -1 Object.defineProperty(Object.prototype, '__magic__', {23736 -1 get: function get() {23737 -1 return this;23738 -1 },23739 -1 configurable: true23740 -1 });23741 -1 __magic__.globalThis = __magic__;23742 -1 delete Object.prototype.__magic__;23743 -1 } catch (e) {23744 -1 window.globalThis = function() {23745 -1 if (typeof self !== 'undefined') {23746 -1 return self;23747 -1 }23748 -1 if (typeof window !== 'undefined') {23749 -1 return window;23750 -1 }23751 -1 if (typeof global !== 'undefined') {23752 -1 return global;23753 -1 }23754 -1 if (typeof this !== 'undefined') {23755 -1 return this;23756 -1 }23757 -1 throw new Error('Unable to locate global `this`');23758 -1 }();23759 -1 }23760 -1 })();23761 -1 doT.encodeHTMLSource = function(doNotSkipEncoded) {23762 -1 var encodeHTMLRules = {23763 -1 '&': '&',23764 -1 '<': '<',23765 -1 '>': '>',23766 -1 '"': '"',23767 -1 '\'': ''',23768 -1 '/': '/'23769 -1 }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;23770 -1 return function(code) {23771 -1 return code ? code.toString().replace(matchHTML, function(m) {23772 -1 return encodeHTMLRules[m] || m;23773 -1 }) : '';23774 -1 };23775 -1 };23776 -1 if (true && module.exports) {23777 -1 module.exports = doT;23778 -1 } else if (true) {23779 -1 !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {23780 -1 return doT;23781 -1 }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));23782 -1 } else {}23783 -1 var startend = {23784 -1 append: {23785 -1 start: '\'+(',23786 -1 end: ')+\'',23787 -1 startencode: '\'+encodeHTML('-1 41892 allowedRoles: false -1 41893 }, -1 41894 default: { -1 41895 contentTypes: [ 'interactive', 'flow' ], -1 41896 allowedRoles: [ 'combobox', 'searchbox', 'spinbutton' ], -1 41897 implicitAttrs: { -1 41898 'aria-valuenow': '' 23788 41899 },23789 -1 split: {23790 -1 start: '\';out+=(',23791 -1 end: ');out+=\'',23792 -1 startencode: '\';out+=encodeHTML('23793 -1 }23794 -1 }, skip = /$^/;23795 -1 function resolveDefs(c, block, def) {23796 -1 return (typeof block === 'string' ? block : block.toString()).replace(c.define || skip, function(m, code, assign, value) {23797 -1 if (code.indexOf('def.') === 0) {23798 -1 code = code.substring(4);23799 -1 }23800 -1 if (!(code in def)) {23801 -1 if (assign === ':') {23802 -1 if (c.defineParams) {23803 -1 value.replace(c.defineParams, function(m, param, v) {23804 -1 def[code] = {23805 -1 arg: param,23806 -1 text: v23807 -1 };23808 -1 });23809 -1 }23810 -1 if (!(code in def)) {23811 -1 def[code] = value;23812 -1 }23813 -1 } else {23814 -1 new Function('def', 'def[\'' + code + '\']=' + value)(def);23815 -1 }23816 -1 }23817 -1 return '';23818 -1 }).replace(c.use || skip, function(m, code) {23819 -1 if (c.useParams) {23820 -1 code = code.replace(c.useParams, function(m, s, d, param) {23821 -1 if (def[d] && def[d].arg && param) {23822 -1 var rw = (d + ':' + param).replace(/'|\\/g, '_');23823 -1 def.__exp = def.__exp || {};23824 -1 def.__exp[rw] = def[d].text.replace(new RegExp('(^|[^\\w$])' + def[d].arg + '([^\\w$])', 'g'), '$1' + param + '$2');23825 -1 return s + 'def.__exp[\'' + rw + '\']';23826 -1 }23827 -1 });23828 -1 }23829 -1 var v = new Function('def', 'return ' + code)(def);23830 -1 return v ? resolveDefs(c, v, def) : v;23831 -1 });23832 -1 }23833 -1 function unescape(code) {23834 -1 return code.replace(/\\('|\\)/g, '$1').replace(/[\r\t\n]/g, ' ');23835 -1 }23836 -1 doT.template = function(tmpl, c, def) {23837 -1 c = c || doT.templateSettings;23838 -1 var cse = c.append ? startend.append : startend.split, needhtmlencode, sid = 0, indv, str = c.use || c.define ? resolveDefs(c, tmpl, def || {}) : tmpl;23839 -1 str = ('var out=\'' + (c.strip ? str.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g, ' ').replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g, '') : str).replace(/'|\\/g, '\\$&').replace(c.interpolate || skip, function(m, code) {23840 -1 return cse.start + unescape(code) + cse.end;23841 -1 }).replace(c.encode || skip, function(m, code) {23842 -1 needhtmlencode = true;23843 -1 return cse.startencode + unescape(code) + cse.end;23844 -1 }).replace(c.conditional || skip, function(m, elsecase, code) {23845 -1 return elsecase ? code ? '\';}else if(' + unescape(code) + '){out+=\'' : '\';}else{out+=\'' : code ? '\';if(' + unescape(code) + '){out+=\'' : '\';}out+=\'';23846 -1 }).replace(c.iterate || skip, function(m, iterate, vname, iname) {23847 -1 if (!iterate) {23848 -1 return '\';} } out+=\'';23849 -1 }23850 -1 sid += 1;23851 -1 indv = iname || 'i' + sid;23852 -1 iterate = unescape(iterate);23853 -1 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+=\'';23854 -1 }).replace(c.evaluate || skip, function(m, code) {23855 -1 return '\';' + unescape(code) + 'out+=\'';23856 -1 }) + '\';return out;').replace(/\n/g, '\\n').replace(/\t/g, '\\t').replace(/\r/g, '\\r').replace(/(\s|;|\}|^|\{)out\+='';/g, '$1').replace(/\+''/g, '');23857 -1 if (needhtmlencode) {23858 -1 if (!c.selfcontained && globalThis && !globalThis._encodeHTML) {23859 -1 globalThis._encodeHTML = doT.encodeHTMLSource(c.doNotSkipEncoded);23860 -1 }23861 -1 str = 'var encodeHTML = typeof _encodeHTML !== \'undefined\' ? _encodeHTML : (' + doT.encodeHTMLSource.toString() + '(' + (c.doNotSkipEncoded || '') + '));' + str;23862 -1 }23863 -1 try {23864 -1 return new Function(c.varname, str);23865 -1 } catch (e) {23866 -1 if (typeof console !== 'undefined') {23867 -1 console.log('Could not create a template function: ' + str);23868 -1 }23869 -1 throw e;23870 -1 }23871 -1 };23872 -1 doT.compile = function(tmpl, def) {23873 -1 return doT.template(tmpl, null, def);23874 -1 };23875 -1 })();23876 -1 }).call(this, __webpack_require__('./node_modules/webpack/buildin/global.js'));23877 -1 },23878 -1 './node_modules/axios/index.js': function node_modulesAxiosIndexJs(module, exports, __webpack_require__) {23879 -1 module.exports = __webpack_require__('./node_modules/axios/lib/axios.js');23880 -1 },23881 -1 './node_modules/axios/lib/adapters/xhr.js': function node_modulesAxiosLibAdaptersXhrJs(module, exports, __webpack_require__) {23882 -1 'use strict';23883 -1 var utils = __webpack_require__('./node_modules/axios/lib/utils.js');23884 -1 var settle = __webpack_require__('./node_modules/axios/lib/core/settle.js');23885 -1 var buildURL = __webpack_require__('./node_modules/axios/lib/helpers/buildURL.js');23886 -1 var buildFullPath = __webpack_require__('./node_modules/axios/lib/core/buildFullPath.js');23887 -1 var parseHeaders = __webpack_require__('./node_modules/axios/lib/helpers/parseHeaders.js');23888 -1 var isURLSameOrigin = __webpack_require__('./node_modules/axios/lib/helpers/isURLSameOrigin.js');23889 -1 var createError = __webpack_require__('./node_modules/axios/lib/core/createError.js');23890 -1 module.exports = function xhrAdapter(config) {23891 -1 return new Promise(function dispatchXhrRequest(resolve, reject) {23892 -1 var requestData = config.data;23893 -1 var requestHeaders = config.headers;23894 -1 if (utils.isFormData(requestData)) {23895 -1 delete requestHeaders['Content-Type'];23896 -1 }23897 -1 var request = new XMLHttpRequest();23898 -1 if (config.auth) {23899 -1 var username = config.auth.username || '';23900 -1 var password = config.auth.password || '';23901 -1 requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);23902 -1 }23903 -1 var fullPath = buildFullPath(config.baseURL, config.url);23904 -1 request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);23905 -1 request.timeout = config.timeout;23906 -1 request.onreadystatechange = function handleLoad() {23907 -1 if (!request || request.readyState !== 4) {23908 -1 return;23909 -1 }23910 -1 if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {23911 -1 return;23912 -1 }23913 -1 var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;23914 -1 var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;23915 -1 var response = {23916 -1 data: responseData,23917 -1 status: request.status,23918 -1 statusText: request.statusText,23919 -1 headers: responseHeaders,23920 -1 config: config,23921 -1 request: request23922 -1 };23923 -1 settle(resolve, reject, response);23924 -1 request = null;23925 -1 };23926 -1 request.onabort = function handleAbort() {23927 -1 if (!request) {23928 -1 return;23929 -1 }23930 -1 reject(createError('Request aborted', config, 'ECONNABORTED', request));23931 -1 request = null;23932 -1 };23933 -1 request.onerror = function handleError() {23934 -1 reject(createError('Network Error', config, null, request));23935 -1 request = null;23936 -1 };23937 -1 request.ontimeout = function handleTimeout() {23938 -1 var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';23939 -1 if (config.timeoutErrorMessage) {23940 -1 timeoutErrorMessage = config.timeoutErrorMessage;23941 -1 }23942 -1 reject(createError(timeoutErrorMessage, config, 'ECONNABORTED', request));23943 -1 request = null;23944 -1 };23945 -1 if (utils.isStandardBrowserEnv()) {23946 -1 var cookies = __webpack_require__('./node_modules/axios/lib/helpers/cookies.js');23947 -1 var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined;23948 -1 if (xsrfValue) {23949 -1 requestHeaders[config.xsrfHeaderName] = xsrfValue;23950 -1 }23951 -1 }23952 -1 if ('setRequestHeader' in request) {23953 -1 utils.forEach(requestHeaders, function setRequestHeader(val, key) {23954 -1 if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {23955 -1 delete requestHeaders[key];23956 -1 } else {23957 -1 request.setRequestHeader(key, val);23958 -1 }23959 -1 });23960 -1 }23961 -1 if (!utils.isUndefined(config.withCredentials)) {23962 -1 request.withCredentials = !!config.withCredentials;-1 41900 namingMethods: [ 'labelText', 'placeholderText' ] 23963 41901 }23964 -1 if (config.responseType) {23965 -1 try {23966 -1 request.responseType = config.responseType;23967 -1 } catch (e) {23968 -1 if (config.responseType !== 'json') {23969 -1 throw e;23970 -1 }23971 -1 }23972 -1 }23973 -1 if (typeof config.onDownloadProgress === 'function') {23974 -1 request.addEventListener('progress', config.onDownloadProgress);-1 41902 } -1 41903 }, -1 41904 ins: { -1 41905 contentTypes: [ 'phrasing', 'flow' ], -1 41906 allowedRoles: true -1 41907 }, -1 41908 kbd: { -1 41909 contentTypes: [ 'phrasing', 'flow' ], -1 41910 allowedRoles: true -1 41911 }, -1 41912 label: { -1 41913 contentTypes: [ 'interactive', 'phrasing', 'flow' ], -1 41914 allowedRoles: false, -1 41915 chromiumRole: 'Label' -1 41916 }, -1 41917 legend: { -1 41918 allowedRoles: false -1 41919 }, -1 41920 li: { -1 41921 allowedRoles: [ 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'none', 'presentation', 'radio', 'separator', 'tab', 'treeitem', 'doc-biblioentry', 'doc-endnote' ], -1 41922 implicitAttrs: { -1 41923 'aria-setsize': '1', -1 41924 'aria-posinset': '1' -1 41925 } -1 41926 }, -1 41927 link: { -1 41928 contentTypes: [ 'phrasing', 'flow' ], -1 41929 allowedRoles: false, -1 41930 noAriaAttrs: true -1 41931 }, -1 41932 main: { -1 41933 contentTypes: [ 'flow' ], -1 41934 allowedRoles: false, -1 41935 shadowRoot: true -1 41936 }, -1 41937 map: { -1 41938 contentTypes: [ 'phrasing', 'flow' ], -1 41939 allowedRoles: false, -1 41940 noAriaAttrs: true -1 41941 }, -1 41942 math: { -1 41943 contentTypes: [ 'embedded', 'phrasing', 'flow' ], -1 41944 allowedRoles: false -1 41945 }, -1 41946 mark: { -1 41947 contentTypes: [ 'phrasing', 'flow' ], -1 41948 allowedRoles: true -1 41949 }, -1 41950 menu: { -1 41951 contentTypes: [ 'flow' ], -1 41952 allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ] -1 41953 }, -1 41954 meta: { -1 41955 variant: { -1 41956 itemprop: { -1 41957 matches: '[itemprop]', -1 41958 contentTypes: [ 'phrasing', 'flow' ] 23975 41959 }23976 -1 if (typeof config.onUploadProgress === 'function' && request.upload) {23977 -1 request.upload.addEventListener('progress', config.onUploadProgress);-1 41960 }, -1 41961 allowedRoles: false, -1 41962 noAriaAttrs: true -1 41963 }, -1 41964 meter: { -1 41965 contentTypes: [ 'phrasing', 'flow' ], -1 41966 allowedRoles: false, -1 41967 chromiumRole: 'progressbar' -1 41968 }, -1 41969 nav: { -1 41970 contentTypes: [ 'sectioning', 'flow' ], -1 41971 allowedRoles: [ 'doc-index', 'doc-pagelist', 'doc-toc' ], -1 41972 shadowRoot: true -1 41973 }, -1 41974 noscript: { -1 41975 contentTypes: [ 'phrasing', 'flow' ], -1 41976 allowedRoles: false, -1 41977 noAriaAttrs: true -1 41978 }, -1 41979 object: { -1 41980 variant: { -1 41981 usemap: { -1 41982 matches: '[usemap]', -1 41983 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ] -1 41984 }, -1 41985 default: { -1 41986 contentTypes: [ 'embedded', 'phrasing', 'flow' ] 23978 41987 }23979 -1 if (config.cancelToken) {23980 -1 config.cancelToken.promise.then(function onCanceled(cancel) {23981 -1 if (!request) {23982 -1 return;-1 41988 }, -1 41989 allowedRoles: [ 'application', 'document', 'img' ], -1 41990 chromiumRole: 'PluginObject' -1 41991 }, -1 41992 ol: { -1 41993 contentTypes: [ 'flow' ], -1 41994 allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ] -1 41995 }, -1 41996 optgroup: { -1 41997 allowedRoles: false -1 41998 }, -1 41999 option: { -1 42000 allowedRoles: false, -1 42001 implicitAttrs: { -1 42002 'aria-selected': 'false' -1 42003 } -1 42004 }, -1 42005 output: { -1 42006 contentTypes: [ 'phrasing', 'flow' ], -1 42007 allowedRoles: true, -1 42008 namingMethods: [ 'subtreeText' ] -1 42009 }, -1 42010 p: { -1 42011 contentTypes: [ 'flow' ], -1 42012 allowedRoles: true, -1 42013 shadowRoot: true -1 42014 }, -1 42015 param: { -1 42016 allowedRoles: false, -1 42017 noAriaAttrs: true -1 42018 }, -1 42019 picture: { -1 42020 contentTypes: [ 'phrasing', 'flow' ], -1 42021 allowedRoles: false, -1 42022 noAriaAttrs: true -1 42023 }, -1 42024 pre: { -1 42025 contentTypes: [ 'flow' ], -1 42026 allowedRoles: true -1 42027 }, -1 42028 progress: { -1 42029 contentTypes: [ 'phrasing', 'flow' ], -1 42030 allowedRoles: true, -1 42031 implicitAttrs: { -1 42032 'aria-valuemax': '100', -1 42033 'aria-valuemin': '0', -1 42034 'aria-valuenow': '0' -1 42035 } -1 42036 }, -1 42037 q: { -1 42038 contentTypes: [ 'phrasing', 'flow' ], -1 42039 allowedRoles: true -1 42040 }, -1 42041 rp: { -1 42042 allowedRoles: true -1 42043 }, -1 42044 rt: { -1 42045 allowedRoles: true -1 42046 }, -1 42047 ruby: { -1 42048 contentTypes: [ 'phrasing', 'flow' ], -1 42049 allowedRoles: true -1 42050 }, -1 42051 s: { -1 42052 contentTypes: [ 'phrasing', 'flow' ], -1 42053 allowedRoles: true -1 42054 }, -1 42055 samp: { -1 42056 contentTypes: [ 'phrasing', 'flow' ], -1 42057 allowedRoles: true -1 42058 }, -1 42059 script: { -1 42060 contentTypes: [ 'phrasing', 'flow' ], -1 42061 allowedRoles: false, -1 42062 noAriaAttrs: true -1 42063 }, -1 42064 section: { -1 42065 contentTypes: [ 'sectioning', 'flow' ], -1 42066 allowedRoles: [ 'alert', 'alertdialog', 'application', 'banner', 'complementary', 'contentinfo', 'dialog', 'document', 'feed', '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' ], -1 42067 shadowRoot: true -1 42068 }, -1 42069 select: { -1 42070 variant: { -1 42071 combobox: { -1 42072 matches: { -1 42073 attributes: { -1 42074 multiple: null, -1 42075 size: [ null, '1' ] 23983 42076 }23984 -1 request.abort();23985 -1 reject(cancel);23986 -1 request = null;23987 -1 });-1 42077 }, -1 42078 allowedRoles: [ 'menu' ] -1 42079 }, -1 42080 default: { -1 42081 allowedRoles: false 23988 42082 }23989 -1 if (requestData === undefined) {23990 -1 requestData = null;-1 42083 }, -1 42084 contentTypes: [ 'interactive', 'phrasing', 'flow' ], -1 42085 implicitAttrs: { -1 42086 'aria-valuenow': '' -1 42087 }, -1 42088 namingMethods: [ 'labelText' ] -1 42089 }, -1 42090 slot: { -1 42091 contentTypes: [ 'phrasing', 'flow' ], -1 42092 allowedRoles: false, -1 42093 noAriaAttrs: true -1 42094 }, -1 42095 small: { -1 42096 contentTypes: [ 'phrasing', 'flow' ], -1 42097 allowedRoles: true -1 42098 }, -1 42099 source: { -1 42100 allowedRoles: false, -1 42101 noAriaAttrs: true -1 42102 }, -1 42103 span: { -1 42104 contentTypes: [ 'phrasing', 'flow' ], -1 42105 allowedRoles: true, -1 42106 shadowRoot: true -1 42107 }, -1 42108 strong: { -1 42109 contentTypes: [ 'phrasing', 'flow' ], -1 42110 allowedRoles: true -1 42111 }, -1 42112 style: { -1 42113 allowedRoles: false, -1 42114 noAriaAttrs: true -1 42115 }, -1 42116 svg: { -1 42117 contentTypes: [ 'embedded', 'phrasing', 'flow' ], -1 42118 allowedRoles: [ 'application', 'document', 'img' ], -1 42119 chromiumRole: 'SVGRoot', -1 42120 namingMethods: [ 'svgTitleText' ] -1 42121 }, -1 42122 sub: { -1 42123 contentTypes: [ 'phrasing', 'flow' ], -1 42124 allowedRoles: true -1 42125 }, -1 42126 summary: { -1 42127 allowedRoles: false, -1 42128 namingMethods: [ 'subtreeText' ] -1 42129 }, -1 42130 sup: { -1 42131 contentTypes: [ 'phrasing', 'flow' ], -1 42132 allowedRoles: true -1 42133 }, -1 42134 table: { -1 42135 contentTypes: [ 'flow' ], -1 42136 allowedRoles: true, -1 42137 namingMethods: [ 'tableCaptionText', 'tableSummaryText' ] -1 42138 }, -1 42139 tbody: { -1 42140 allowedRoles: true -1 42141 }, -1 42142 template: { -1 42143 contentTypes: [ 'phrasing', 'flow' ], -1 42144 allowedRoles: false, -1 42145 noAriaAttrs: true -1 42146 }, -1 42147 textarea: { -1 42148 contentTypes: [ 'interactive', 'phrasing', 'flow' ], -1 42149 allowedRoles: false, -1 42150 implicitAttrs: { -1 42151 'aria-valuenow': '', -1 42152 'aria-multiline': 'true' -1 42153 }, -1 42154 namingMethods: [ 'labelText', 'placeholderText' ] -1 42155 }, -1 42156 tfoot: { -1 42157 allowedRoles: true -1 42158 }, -1 42159 thead: { -1 42160 allowedRoles: true -1 42161 }, -1 42162 time: { -1 42163 contentTypes: [ 'phrasing', 'flow' ], -1 42164 allowedRoles: true -1 42165 }, -1 42166 title: { -1 42167 allowedRoles: false, -1 42168 noAriaAttrs: true -1 42169 }, -1 42170 td: { -1 42171 allowedRoles: true -1 42172 }, -1 42173 th: { -1 42174 allowedRoles: true -1 42175 }, -1 42176 tr: { -1 42177 allowedRoles: true -1 42178 }, -1 42179 track: { -1 42180 allowedRoles: false, -1 42181 noAriaAttrs: true -1 42182 }, -1 42183 u: { -1 42184 contentTypes: [ 'phrasing', 'flow' ], -1 42185 allowedRoles: true -1 42186 }, -1 42187 ul: { -1 42188 contentTypes: [ 'flow' ], -1 42189 allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ] -1 42190 }, -1 42191 var: { -1 42192 contentTypes: [ 'phrasing', 'flow' ], -1 42193 allowedRoles: true -1 42194 }, -1 42195 video: { -1 42196 variant: { -1 42197 controls: { -1 42198 matches: '[controls]', -1 42199 contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ] -1 42200 }, -1 42201 default: { -1 42202 contentTypes: [ 'embedded', 'phrasing', 'flow' ] 23991 42203 }23992 -1 request.send(requestData);23993 -1 });23994 -1 };23995 -1 },23996 -1 './node_modules/axios/lib/axios.js': function node_modulesAxiosLibAxiosJs(module, exports, __webpack_require__) {23997 -1 'use strict';23998 -1 var utils = __webpack_require__('./node_modules/axios/lib/utils.js');23999 -1 var bind = __webpack_require__('./node_modules/axios/lib/helpers/bind.js');24000 -1 var Axios = __webpack_require__('./node_modules/axios/lib/core/Axios.js');24001 -1 var mergeConfig = __webpack_require__('./node_modules/axios/lib/core/mergeConfig.js');24002 -1 var defaults = __webpack_require__('./node_modules/axios/lib/defaults.js');24003 -1 function createInstance(defaultConfig) {24004 -1 var context = new Axios(defaultConfig);24005 -1 var instance = bind(Axios.prototype.request, context);24006 -1 utils.extend(instance, Axios.prototype, context);24007 -1 utils.extend(instance, context);24008 -1 return instance;24009 -1 }24010 -1 var axios = createInstance(defaults);24011 -1 axios.Axios = Axios;24012 -1 axios.create = function create(instanceConfig) {24013 -1 return createInstance(mergeConfig(axios.defaults, instanceConfig));24014 -1 };24015 -1 axios.Cancel = __webpack_require__('./node_modules/axios/lib/cancel/Cancel.js');24016 -1 axios.CancelToken = __webpack_require__('./node_modules/axios/lib/cancel/CancelToken.js');24017 -1 axios.isCancel = __webpack_require__('./node_modules/axios/lib/cancel/isCancel.js');24018 -1 axios.all = function all(promises) {24019 -1 return Promise.all(promises);24020 -1 };24021 -1 axios.spread = __webpack_require__('./node_modules/axios/lib/helpers/spread.js');24022 -1 module.exports = axios;24023 -1 module.exports['default'] = axios;24024 -1 },24025 -1 './node_modules/axios/lib/cancel/Cancel.js': function node_modulesAxiosLibCancelCancelJs(module, exports, __webpack_require__) {24026 -1 'use strict';24027 -1 function Cancel(message) {24028 -1 this.message = message;-1 42204 }, -1 42205 allowedRoles: [ 'application' ], -1 42206 chromiumRole: 'video' -1 42207 }, -1 42208 wbr: { -1 42209 contentTypes: [ 'phrasing', 'flow' ], -1 42210 allowedRoles: true 24029 42211 }24030 -1 Cancel.prototype.toString = function toString() {24031 -1 return 'Cancel' + (this.message ? ': ' + this.message : '');24032 -1 };24033 -1 Cancel.prototype.__CANCEL__ = true;24034 -1 module.exports = Cancel;24035 -1 },24036 -1 './node_modules/axios/lib/cancel/CancelToken.js': function node_modulesAxiosLibCancelCancelTokenJs(module, exports, __webpack_require__) {24037 -1 'use strict';24038 -1 var Cancel = __webpack_require__('./node_modules/axios/lib/cancel/Cancel.js');24039 -1 function CancelToken(executor) {24040 -1 if (typeof executor !== 'function') {24041 -1 throw new TypeError('executor must be a function.');24042 -1 }24043 -1 var resolvePromise;24044 -1 this.promise = new Promise(function promiseExecutor(resolve) {24045 -1 resolvePromise = resolve;24046 -1 });24047 -1 var token = this;24048 -1 executor(function cancel(message) {24049 -1 if (token.reason) {24050 -1 return;24051 -1 }24052 -1 token.reason = new Cancel(message);24053 -1 resolvePromise(token.reason);24054 -1 });-1 42212 }; -1 42213 var html_elms_default = htmlElms; -1 42214 var cssColors = { -1 42215 aliceblue: [ 240, 248, 255 ], -1 42216 antiquewhite: [ 250, 235, 215 ], -1 42217 aqua: [ 0, 255, 255 ], -1 42218 aquamarine: [ 127, 255, 212 ], -1 42219 azure: [ 240, 255, 255 ], -1 42220 beige: [ 245, 245, 220 ], -1 42221 bisque: [ 255, 228, 196 ], -1 42222 black: [ 0, 0, 0 ], -1 42223 blanchedalmond: [ 255, 235, 205 ], -1 42224 blue: [ 0, 0, 255 ], -1 42225 blueviolet: [ 138, 43, 226 ], -1 42226 brown: [ 165, 42, 42 ], -1 42227 burlywood: [ 222, 184, 135 ], -1 42228 cadetblue: [ 95, 158, 160 ], -1 42229 chartreuse: [ 127, 255, 0 ], -1 42230 chocolate: [ 210, 105, 30 ], -1 42231 coral: [ 255, 127, 80 ], -1 42232 cornflowerblue: [ 100, 149, 237 ], -1 42233 cornsilk: [ 255, 248, 220 ], -1 42234 crimson: [ 220, 20, 60 ], -1 42235 cyan: [ 0, 255, 255 ], -1 42236 darkblue: [ 0, 0, 139 ], -1 42237 darkcyan: [ 0, 139, 139 ], -1 42238 darkgoldenrod: [ 184, 134, 11 ], -1 42239 darkgray: [ 169, 169, 169 ], -1 42240 darkgreen: [ 0, 100, 0 ], -1 42241 darkgrey: [ 169, 169, 169 ], -1 42242 darkkhaki: [ 189, 183, 107 ], -1 42243 darkmagenta: [ 139, 0, 139 ], -1 42244 darkolivegreen: [ 85, 107, 47 ], -1 42245 darkorange: [ 255, 140, 0 ], -1 42246 darkorchid: [ 153, 50, 204 ], -1 42247 darkred: [ 139, 0, 0 ], -1 42248 darksalmon: [ 233, 150, 122 ], -1 42249 darkseagreen: [ 143, 188, 143 ], -1 42250 darkslateblue: [ 72, 61, 139 ], -1 42251 darkslategray: [ 47, 79, 79 ], -1 42252 darkslategrey: [ 47, 79, 79 ], -1 42253 darkturquoise: [ 0, 206, 209 ], -1 42254 darkviolet: [ 148, 0, 211 ], -1 42255 deeppink: [ 255, 20, 147 ], -1 42256 deepskyblue: [ 0, 191, 255 ], -1 42257 dimgray: [ 105, 105, 105 ], -1 42258 dimgrey: [ 105, 105, 105 ], -1 42259 dodgerblue: [ 30, 144, 255 ], -1 42260 firebrick: [ 178, 34, 34 ], -1 42261 floralwhite: [ 255, 250, 240 ], -1 42262 forestgreen: [ 34, 139, 34 ], -1 42263 fuchsia: [ 255, 0, 255 ], -1 42264 gainsboro: [ 220, 220, 220 ], -1 42265 ghostwhite: [ 248, 248, 255 ], -1 42266 gold: [ 255, 215, 0 ], -1 42267 goldenrod: [ 218, 165, 32 ], -1 42268 gray: [ 128, 128, 128 ], -1 42269 green: [ 0, 128, 0 ], -1 42270 greenyellow: [ 173, 255, 47 ], -1 42271 grey: [ 128, 128, 128 ], -1 42272 honeydew: [ 240, 255, 240 ], -1 42273 hotpink: [ 255, 105, 180 ], -1 42274 indianred: [ 205, 92, 92 ], -1 42275 indigo: [ 75, 0, 130 ], -1 42276 ivory: [ 255, 255, 240 ], -1 42277 khaki: [ 240, 230, 140 ], -1 42278 lavender: [ 230, 230, 250 ], -1 42279 lavenderblush: [ 255, 240, 245 ], -1 42280 lawngreen: [ 124, 252, 0 ], -1 42281 lemonchiffon: [ 255, 250, 205 ], -1 42282 lightblue: [ 173, 216, 230 ], -1 42283 lightcoral: [ 240, 128, 128 ], -1 42284 lightcyan: [ 224, 255, 255 ], -1 42285 lightgoldenrodyellow: [ 250, 250, 210 ], -1 42286 lightgray: [ 211, 211, 211 ], -1 42287 lightgreen: [ 144, 238, 144 ], -1 42288 lightgrey: [ 211, 211, 211 ], -1 42289 lightpink: [ 255, 182, 193 ], -1 42290 lightsalmon: [ 255, 160, 122 ], -1 42291 lightseagreen: [ 32, 178, 170 ], -1 42292 lightskyblue: [ 135, 206, 250 ], -1 42293 lightslategray: [ 119, 136, 153 ], -1 42294 lightslategrey: [ 119, 136, 153 ], -1 42295 lightsteelblue: [ 176, 196, 222 ], -1 42296 lightyellow: [ 255, 255, 224 ], -1 42297 lime: [ 0, 255, 0 ], -1 42298 limegreen: [ 50, 205, 50 ], -1 42299 linen: [ 250, 240, 230 ], -1 42300 magenta: [ 255, 0, 255 ], -1 42301 maroon: [ 128, 0, 0 ], -1 42302 mediumaquamarine: [ 102, 205, 170 ], -1 42303 mediumblue: [ 0, 0, 205 ], -1 42304 mediumorchid: [ 186, 85, 211 ], -1 42305 mediumpurple: [ 147, 112, 219 ], -1 42306 mediumseagreen: [ 60, 179, 113 ], -1 42307 mediumslateblue: [ 123, 104, 238 ], -1 42308 mediumspringgreen: [ 0, 250, 154 ], -1 42309 mediumturquoise: [ 72, 209, 204 ], -1 42310 mediumvioletred: [ 199, 21, 133 ], -1 42311 midnightblue: [ 25, 25, 112 ], -1 42312 mintcream: [ 245, 255, 250 ], -1 42313 mistyrose: [ 255, 228, 225 ], -1 42314 moccasin: [ 255, 228, 181 ], -1 42315 navajowhite: [ 255, 222, 173 ], -1 42316 navy: [ 0, 0, 128 ], -1 42317 oldlace: [ 253, 245, 230 ], -1 42318 olive: [ 128, 128, 0 ], -1 42319 olivedrab: [ 107, 142, 35 ], -1 42320 orange: [ 255, 165, 0 ], -1 42321 orangered: [ 255, 69, 0 ], -1 42322 orchid: [ 218, 112, 214 ], -1 42323 palegoldenrod: [ 238, 232, 170 ], -1 42324 palegreen: [ 152, 251, 152 ], -1 42325 paleturquoise: [ 175, 238, 238 ], -1 42326 palevioletred: [ 219, 112, 147 ], -1 42327 papayawhip: [ 255, 239, 213 ], -1 42328 peachpuff: [ 255, 218, 185 ], -1 42329 peru: [ 205, 133, 63 ], -1 42330 pink: [ 255, 192, 203 ], -1 42331 plum: [ 221, 160, 221 ], -1 42332 powderblue: [ 176, 224, 230 ], -1 42333 purple: [ 128, 0, 128 ], -1 42334 rebeccapurple: [ 102, 51, 153 ], -1 42335 red: [ 255, 0, 0 ], -1 42336 rosybrown: [ 188, 143, 143 ], -1 42337 royalblue: [ 65, 105, 225 ], -1 42338 saddlebrown: [ 139, 69, 19 ], -1 42339 salmon: [ 250, 128, 114 ], -1 42340 sandybrown: [ 244, 164, 96 ], -1 42341 seagreen: [ 46, 139, 87 ], -1 42342 seashell: [ 255, 245, 238 ], -1 42343 sienna: [ 160, 82, 45 ], -1 42344 silver: [ 192, 192, 192 ], -1 42345 skyblue: [ 135, 206, 235 ], -1 42346 slateblue: [ 106, 90, 205 ], -1 42347 slategray: [ 112, 128, 144 ], -1 42348 slategrey: [ 112, 128, 144 ], -1 42349 snow: [ 255, 250, 250 ], -1 42350 springgreen: [ 0, 255, 127 ], -1 42351 steelblue: [ 70, 130, 180 ], -1 42352 tan: [ 210, 180, 140 ], -1 42353 teal: [ 0, 128, 128 ], -1 42354 thistle: [ 216, 191, 216 ], -1 42355 tomato: [ 255, 99, 71 ], -1 42356 turquoise: [ 64, 224, 208 ], -1 42357 violet: [ 238, 130, 238 ], -1 42358 wheat: [ 245, 222, 179 ], -1 42359 white: [ 255, 255, 255 ], -1 42360 whitesmoke: [ 245, 245, 245 ], -1 42361 yellow: [ 255, 255, 0 ], -1 42362 yellowgreen: [ 154, 205, 50 ] -1 42363 }; -1 42364 var css_colors_default = cssColors; -1 42365 var originals = { -1 42366 ariaAttrs: aria_attrs_default, -1 42367 ariaRoles: _extends({}, aria_roles_default, dpub_roles_default, graphics_roles_default), -1 42368 htmlElms: html_elms_default, -1 42369 cssColors: css_colors_default -1 42370 }; -1 42371 var standards = _extends({}, originals); -1 42372 function configureStandards(config) { -1 42373 Object.keys(standards).forEach(function(propName) { -1 42374 if (config[propName]) { -1 42375 standards[propName] = deep_merge_default(standards[propName], config[propName]); -1 42376 } -1 42377 }); -1 42378 } -1 42379 function resetStandards() { -1 42380 Object.keys(standards).forEach(function(propName) { -1 42381 standards[propName] = originals[propName]; -1 42382 }); -1 42383 } -1 42384 var standards_default = standards; -1 42385 function convertColorVal(colorFunc, value, index) { -1 42386 if (/%$/.test(value)) { -1 42387 if (index === 3) { -1 42388 return parseFloat(value) / 100; -1 42389 } -1 42390 return parseFloat(value) * 255 / 100; 24055 42391 }24056 -1 CancelToken.prototype.throwIfRequested = function throwIfRequested() {24057 -1 if (this.reason) {24058 -1 throw this.reason;-1 42392 if (colorFunc[index] === 'h') { -1 42393 if (/turn$/.test(value)) { -1 42394 return parseFloat(value) * 360; -1 42395 } -1 42396 if (/rad$/.test(value)) { -1 42397 return parseFloat(value) * 57.3; 24059 42398 }24060 -1 };24061 -1 CancelToken.source = function source() {24062 -1 var cancel;24063 -1 var token = new CancelToken(function executor(c) {24064 -1 cancel = c;24065 -1 });24066 -1 return {24067 -1 token: token,24068 -1 cancel: cancel24069 -1 };24070 -1 };24071 -1 module.exports = CancelToken;24072 -1 },24073 -1 './node_modules/axios/lib/cancel/isCancel.js': function node_modulesAxiosLibCancelIsCancelJs(module, exports, __webpack_require__) {24074 -1 'use strict';24075 -1 module.exports = function isCancel(value) {24076 -1 return !!(value && value.__CANCEL__);24077 -1 };24078 -1 },24079 -1 './node_modules/axios/lib/core/Axios.js': function node_modulesAxiosLibCoreAxiosJs(module, exports, __webpack_require__) {24080 -1 'use strict';24081 -1 var utils = __webpack_require__('./node_modules/axios/lib/utils.js');24082 -1 var buildURL = __webpack_require__('./node_modules/axios/lib/helpers/buildURL.js');24083 -1 var InterceptorManager = __webpack_require__('./node_modules/axios/lib/core/InterceptorManager.js');24084 -1 var dispatchRequest = __webpack_require__('./node_modules/axios/lib/core/dispatchRequest.js');24085 -1 var mergeConfig = __webpack_require__('./node_modules/axios/lib/core/mergeConfig.js');24086 -1 function Axios(instanceConfig) {24087 -1 this.defaults = instanceConfig;24088 -1 this.interceptors = {24089 -1 request: new InterceptorManager(),24090 -1 response: new InterceptorManager()24091 -1 };24092 42399 }24093 -1 Axios.prototype.request = function request(config) {24094 -1 if (typeof config === 'string') {24095 -1 config = arguments[1] || {};24096 -1 config.url = arguments[0];24097 -1 } else {24098 -1 config = config || {};-1 42400 return parseFloat(value); -1 42401 } -1 42402 function hslToRgb(_ref9) { -1 42403 var _ref10 = _slicedToArray(_ref9, 4), hue = _ref10[0], saturation = _ref10[1], lightness = _ref10[2], alpha = _ref10[3]; -1 42404 saturation /= 255; -1 42405 lightness /= 255; -1 42406 var high = (1 - Math.abs(2 * lightness - 1)) * saturation; -1 42407 var low = high * (1 - Math.abs(hue / 60 % 2 - 1)); -1 42408 var base = lightness - high / 2; -1 42409 var colors; -1 42410 if (hue < 60) { -1 42411 colors = [ high, low, 0 ]; -1 42412 } else if (hue < 120) { -1 42413 colors = [ low, high, 0 ]; -1 42414 } else if (hue < 180) { -1 42415 colors = [ 0, high, low ]; -1 42416 } else if (hue < 240) { -1 42417 colors = [ 0, low, high ]; -1 42418 } else if (hue < 300) { -1 42419 colors = [ low, 0, high ]; -1 42420 } else { -1 42421 colors = [ high, 0, low ]; -1 42422 } -1 42423 return colors.map(function(color10) { -1 42424 return Math.round((color10 + base) * 255); -1 42425 }).concat(alpha); -1 42426 } -1 42427 function Color(red, green, blue, alpha) { -1 42428 this.red = red; -1 42429 this.green = green; -1 42430 this.blue = blue; -1 42431 this.alpha = alpha; -1 42432 this.toHexString = function toHexString() { -1 42433 var redString = Math.round(this.red).toString(16); -1 42434 var greenString = Math.round(this.green).toString(16); -1 42435 var blueString = Math.round(this.blue).toString(16); -1 42436 return '#' + (this.red > 15.5 ? redString : '0' + redString) + (this.green > 15.5 ? greenString : '0' + greenString) + (this.blue > 15.5 ? blueString : '0' + blueString); -1 42437 }; -1 42438 var hexRegex = /^#[0-9a-f]{3,8}$/i; -1 42439 var colorFnRegex = /^((?:rgb|hsl)a?)\s*\(([^\)]*)\)/i; -1 42440 this.parseString = function parseString(colorString) { -1 42441 if (standards_default.cssColors[colorString] || colorString === 'transparent') { -1 42442 var _ref11 = standards_default.cssColors[colorString] || [ 0, 0, 0 ], _ref12 = _slicedToArray(_ref11, 3), red2 = _ref12[0], green2 = _ref12[1], blue2 = _ref12[2]; -1 42443 this.red = red2; -1 42444 this.green = green2; -1 42445 this.blue = blue2; -1 42446 this.alpha = colorString === 'transparent' ? 0 : 1; -1 42447 return; 24099 42448 }24100 -1 config = mergeConfig(this.defaults, config);24101 -1 if (config.method) {24102 -1 config.method = config.method.toLowerCase();24103 -1 } else if (this.defaults.method) {24104 -1 config.method = this.defaults.method.toLowerCase();24105 -1 } else {24106 -1 config.method = 'get';-1 42449 if (colorString.match(colorFnRegex)) { -1 42450 this.parseColorFnString(colorString); -1 42451 return; 24107 42452 }24108 -1 var chain = [ dispatchRequest, undefined ];24109 -1 var promise = Promise.resolve(config);24110 -1 this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {24111 -1 chain.unshift(interceptor.fulfilled, interceptor.rejected);24112 -1 });24113 -1 this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {24114 -1 chain.push(interceptor.fulfilled, interceptor.rejected);24115 -1 });24116 -1 while (chain.length) {24117 -1 promise = promise.then(chain.shift(), chain.shift());-1 42453 if (colorString.match(hexRegex)) { -1 42454 this.parseHexString(colorString); -1 42455 return; 24118 42456 }24119 -1 return promise;24120 -1 };24121 -1 Axios.prototype.getUri = function getUri(config) {24122 -1 config = mergeConfig(this.defaults, config);24123 -1 return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');24124 -1 };24125 -1 utils.forEach([ 'delete', 'get', 'head', 'options' ], function forEachMethodNoData(method) {24126 -1 Axios.prototype[method] = function(url, config) {24127 -1 return this.request(utils.merge(config || {}, {24128 -1 method: method,24129 -1 url: url24130 -1 }));24131 -1 };24132 -1 });24133 -1 utils.forEach([ 'post', 'put', 'patch' ], function forEachMethodWithData(method) {24134 -1 Axios.prototype[method] = function(url, data, config) {24135 -1 return this.request(utils.merge(config || {}, {24136 -1 method: method,24137 -1 url: url,24138 -1 data: data24139 -1 }));24140 -1 };24141 -1 });24142 -1 module.exports = Axios;24143 -1 },24144 -1 './node_modules/axios/lib/core/InterceptorManager.js': function node_modulesAxiosLibCoreInterceptorManagerJs(module, exports, __webpack_require__) {24145 -1 'use strict';24146 -1 var utils = __webpack_require__('./node_modules/axios/lib/utils.js');24147 -1 function InterceptorManager() {24148 -1 this.handlers = [];24149 -1 }24150 -1 InterceptorManager.prototype.use = function use(fulfilled, rejected) {24151 -1 this.handlers.push({24152 -1 fulfilled: fulfilled,24153 -1 rejected: rejected24154 -1 });24155 -1 return this.handlers.length - 1;-1 42457 throw new Error('Unable to parse color "'.concat(colorString, '"')); 24156 42458 };24157 -1 InterceptorManager.prototype.eject = function eject(id) {24158 -1 if (this.handlers[id]) {24159 -1 this.handlers[id] = null;-1 42459 this.parseRgbString = function parseRgbString(colorString) { -1 42460 if (colorString === 'transparent') { -1 42461 this.red = 0; -1 42462 this.green = 0; -1 42463 this.blue = 0; -1 42464 this.alpha = 0; -1 42465 return; 24160 42466 } -1 42467 this.parseColorFnString(colorString); 24161 42468 };24162 -1 InterceptorManager.prototype.forEach = function forEach(fn) {24163 -1 utils.forEach(this.handlers, function forEachHandler(h) {24164 -1 if (h !== null) {24165 -1 fn(h);24166 -1 }24167 -1 });24168 -1 };24169 -1 module.exports = InterceptorManager;24170 -1 },24171 -1 './node_modules/axios/lib/core/buildFullPath.js': function node_modulesAxiosLibCoreBuildFullPathJs(module, exports, __webpack_require__) {24172 -1 'use strict';24173 -1 var isAbsoluteURL = __webpack_require__('./node_modules/axios/lib/helpers/isAbsoluteURL.js');24174 -1 var combineURLs = __webpack_require__('./node_modules/axios/lib/helpers/combineURLs.js');24175 -1 module.exports = function buildFullPath(baseURL, requestedURL) {24176 -1 if (baseURL && !isAbsoluteURL(requestedURL)) {24177 -1 return combineURLs(baseURL, requestedURL);-1 42469 this.parseHexString = function parseHexString(colorString) { -1 42470 if (!colorString.match(hexRegex) || [ 6, 8 ].includes(colorString.length)) { -1 42471 return; 24178 42472 }24179 -1 return requestedURL;24180 -1 };24181 -1 },24182 -1 './node_modules/axios/lib/core/createError.js': function node_modulesAxiosLibCoreCreateErrorJs(module, exports, __webpack_require__) {24183 -1 'use strict';24184 -1 var enhanceError = __webpack_require__('./node_modules/axios/lib/core/enhanceError.js');24185 -1 module.exports = function createError(message, config, code, request, response) {24186 -1 var error = new Error(message);24187 -1 return enhanceError(error, config, code, request, response);24188 -1 };24189 -1 },24190 -1 './node_modules/axios/lib/core/dispatchRequest.js': function node_modulesAxiosLibCoreDispatchRequestJs(module, exports, __webpack_require__) {24191 -1 'use strict';24192 -1 var utils = __webpack_require__('./node_modules/axios/lib/utils.js');24193 -1 var transformData = __webpack_require__('./node_modules/axios/lib/core/transformData.js');24194 -1 var isCancel = __webpack_require__('./node_modules/axios/lib/cancel/isCancel.js');24195 -1 var defaults = __webpack_require__('./node_modules/axios/lib/defaults.js');24196 -1 function throwIfCancellationRequested(config) {24197 -1 if (config.cancelToken) {24198 -1 config.cancelToken.throwIfRequested();24199 -1 }24200 -1 }24201 -1 module.exports = function dispatchRequest(config) {24202 -1 throwIfCancellationRequested(config);24203 -1 config.headers = config.headers || {};24204 -1 config.data = transformData(config.data, config.headers, config.transformRequest);24205 -1 config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);24206 -1 utils.forEach([ 'delete', 'get', 'head', 'post', 'put', 'patch', 'common' ], function cleanHeaderConfig(method) {24207 -1 delete config.headers[method];24208 -1 });24209 -1 var adapter = config.adapter || defaults.adapter;24210 -1 return adapter(config).then(function onAdapterResolution(response) {24211 -1 throwIfCancellationRequested(config);24212 -1 response.data = transformData(response.data, response.headers, config.transformResponse);24213 -1 return response;24214 -1 }, function onAdapterRejection(reason) {24215 -1 if (!isCancel(reason)) {24216 -1 throwIfCancellationRequested(config);24217 -1 if (reason && reason.response) {24218 -1 reason.response.data = transformData(reason.response.data, reason.response.headers, config.transformResponse);24219 -1 }24220 -1 }24221 -1 return Promise.reject(reason);24222 -1 });24223 -1 };24224 -1 },24225 -1 './node_modules/axios/lib/core/enhanceError.js': function node_modulesAxiosLibCoreEnhanceErrorJs(module, exports, __webpack_require__) {24226 -1 'use strict';24227 -1 module.exports = function enhanceError(error, config, code, request, response) {24228 -1 error.config = config;24229 -1 if (code) {24230 -1 error.code = code;24231 -1 }24232 -1 error.request = request;24233 -1 error.response = response;24234 -1 error.isAxiosError = true;24235 -1 error.toJSON = function() {24236 -1 return {24237 -1 message: this.message,24238 -1 name: this.name,24239 -1 description: this.description,24240 -1 number: this.number,24241 -1 fileName: this.fileName,24242 -1 lineNumber: this.lineNumber,24243 -1 columnNumber: this.columnNumber,24244 -1 stack: this.stack,24245 -1 config: this.config,24246 -1 code: this.code24247 -1 };24248 -1 };24249 -1 return error;24250 -1 };24251 -1 },24252 -1 './node_modules/axios/lib/core/mergeConfig.js': function node_modulesAxiosLibCoreMergeConfigJs(module, exports, __webpack_require__) {24253 -1 'use strict';24254 -1 var utils = __webpack_require__('./node_modules/axios/lib/utils.js');24255 -1 module.exports = function mergeConfig(config1, config2) {24256 -1 config2 = config2 || {};24257 -1 var config = {};24258 -1 var valueFromConfig2Keys = [ 'url', 'method', 'params', 'data' ];24259 -1 var mergeDeepPropertiesKeys = [ 'headers', 'auth', 'proxy' ];24260 -1 var defaultToConfig2Keys = [ 'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer', 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken', 'socketPath' ];24261 -1 utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {24262 -1 if (typeof config2[prop] !== 'undefined') {24263 -1 config[prop] = config2[prop];24264 -1 }24265 -1 });24266 -1 utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {24267 -1 if (utils.isObject(config2[prop])) {24268 -1 config[prop] = utils.deepMerge(config1[prop], config2[prop]);24269 -1 } else if (typeof config2[prop] !== 'undefined') {24270 -1 config[prop] = config2[prop];24271 -1 } else if (utils.isObject(config1[prop])) {24272 -1 config[prop] = utils.deepMerge(config1[prop]);24273 -1 } else if (typeof config1[prop] !== 'undefined') {24274 -1 config[prop] = config1[prop];24275 -1 }24276 -1 });24277 -1 utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {24278 -1 if (typeof config2[prop] !== 'undefined') {24279 -1 config[prop] = config2[prop];24280 -1 } else if (typeof config1[prop] !== 'undefined') {24281 -1 config[prop] = config1[prop];24282 -1 }24283 -1 });24284 -1 var axiosKeys = valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys);24285 -1 var otherKeys = Object.keys(config2).filter(function filterAxiosKeys(key) {24286 -1 return axiosKeys.indexOf(key) === -1;24287 -1 });24288 -1 utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {24289 -1 if (typeof config2[prop] !== 'undefined') {24290 -1 config[prop] = config2[prop];24291 -1 } else if (typeof config1[prop] !== 'undefined') {24292 -1 config[prop] = config1[prop];-1 42473 colorString = colorString.replace('#', ''); -1 42474 if (colorString.length < 6) { -1 42475 var _colorString = colorString, _colorString2 = _slicedToArray(_colorString, 4), r = _colorString2[0], g = _colorString2[1], b = _colorString2[2], a = _colorString2[3]; -1 42476 colorString = r + r + g + g + b + b; -1 42477 if (a) { -1 42478 colorString += a + a; 24293 42479 }24294 -1 });24295 -1 return config;24296 -1 };24297 -1 },24298 -1 './node_modules/axios/lib/core/settle.js': function node_modulesAxiosLibCoreSettleJs(module, exports, __webpack_require__) {24299 -1 'use strict';24300 -1 var createError = __webpack_require__('./node_modules/axios/lib/core/createError.js');24301 -1 module.exports = function settle(resolve, reject, response) {24302 -1 var validateStatus = response.config.validateStatus;24303 -1 if (!validateStatus || validateStatus(response.status)) {24304 -1 resolve(response);24305 -1 } else {24306 -1 reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response));24307 42480 }24308 -1 };24309 -1 },24310 -1 './node_modules/axios/lib/core/transformData.js': function node_modulesAxiosLibCoreTransformDataJs(module, exports, __webpack_require__) {24311 -1 'use strict';24312 -1 var utils = __webpack_require__('./node_modules/axios/lib/utils.js');24313 -1 module.exports = function transformData(data, headers, fns) {24314 -1 utils.forEach(fns, function transform(fn) {24315 -1 data = fn(data, headers);24316 -1 });24317 -1 return data;24318 -1 };24319 -1 },24320 -1 './node_modules/axios/lib/defaults.js': function node_modulesAxiosLibDefaultsJs(module, exports, __webpack_require__) {24321 -1 'use strict';24322 -1 (function(process) {24323 -1 var utils = __webpack_require__('./node_modules/axios/lib/utils.js');24324 -1 var normalizeHeaderName = __webpack_require__('./node_modules/axios/lib/helpers/normalizeHeaderName.js');24325 -1 var DEFAULT_CONTENT_TYPE = {24326 -1 'Content-Type': 'application/x-www-form-urlencoded'24327 -1 };24328 -1 function setContentTypeIfUnset(headers, value) {24329 -1 if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {24330 -1 headers['Content-Type'] = value;24331 -1 }24332 -1 }24333 -1 function getDefaultAdapter() {24334 -1 var adapter;24335 -1 if (typeof XMLHttpRequest !== 'undefined') {24336 -1 adapter = __webpack_require__('./node_modules/axios/lib/adapters/xhr.js');24337 -1 } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {24338 -1 adapter = __webpack_require__('./node_modules/axios/lib/adapters/xhr.js');24339 -1 }24340 -1 return adapter;24341 -1 }24342 -1 var defaults = {24343 -1 adapter: getDefaultAdapter(),24344 -1 transformRequest: [ function transformRequest(data, headers) {24345 -1 normalizeHeaderName(headers, 'Accept');24346 -1 normalizeHeaderName(headers, 'Content-Type');24347 -1 if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {24348 -1 return data;24349 -1 }24350 -1 if (utils.isArrayBufferView(data)) {24351 -1 return data.buffer;24352 -1 }24353 -1 if (utils.isURLSearchParams(data)) {24354 -1 setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');24355 -1 return data.toString();24356 -1 }24357 -1 if (utils.isObject(data)) {24358 -1 setContentTypeIfUnset(headers, 'application/json;charset=utf-8');24359 -1 return JSON.stringify(data);24360 -1 }24361 -1 return data;24362 -1 } ],24363 -1 transformResponse: [ function transformResponse(data) {24364 -1 if (typeof data === 'string') {24365 -1 try {24366 -1 data = JSON.parse(data);24367 -1 } catch (e) {}24368 -1 }24369 -1 return data;24370 -1 } ],24371 -1 timeout: 0,24372 -1 xsrfCookieName: 'XSRF-TOKEN',24373 -1 xsrfHeaderName: 'X-XSRF-TOKEN',24374 -1 maxContentLength: -1,24375 -1 validateStatus: function validateStatus(status) {24376 -1 return status >= 200 && status < 300;24377 -1 }24378 -1 };24379 -1 defaults.headers = {24380 -1 common: {24381 -1 Accept: 'application/json, text/plain, */*'24382 -1 }24383 -1 };24384 -1 utils.forEach([ 'delete', 'get', 'head' ], function forEachMethodNoData(method) {24385 -1 defaults.headers[method] = {};24386 -1 });24387 -1 utils.forEach([ 'post', 'put', 'patch' ], function forEachMethodWithData(method) {24388 -1 defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);24389 -1 });24390 -1 module.exports = defaults;24391 -1 }).call(this, __webpack_require__('./node_modules/process/browser.js'));24392 -1 },24393 -1 './node_modules/axios/lib/helpers/bind.js': function node_modulesAxiosLibHelpersBindJs(module, exports, __webpack_require__) {24394 -1 'use strict';24395 -1 module.exports = function bind(fn, thisArg) {24396 -1 return function wrap() {24397 -1 var args = new Array(arguments.length);24398 -1 for (var i = 0; i < args.length; i++) {24399 -1 args[i] = arguments[i];24400 -1 }24401 -1 return fn.apply(thisArg, args);24402 -1 };24403 -1 };24404 -1 },24405 -1 './node_modules/axios/lib/helpers/buildURL.js': function node_modulesAxiosLibHelpersBuildURLJs(module, exports, __webpack_require__) {24406 -1 'use strict';24407 -1 var utils = __webpack_require__('./node_modules/axios/lib/utils.js');24408 -1 function encode(val) {24409 -1 return encodeURIComponent(val).replace(/%40/gi, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']');24410 -1 }24411 -1 module.exports = function buildURL(url, params, paramsSerializer) {24412 -1 if (!params) {24413 -1 return url;24414 -1 }24415 -1 var serializedParams;24416 -1 if (paramsSerializer) {24417 -1 serializedParams = paramsSerializer(params);24418 -1 } else if (utils.isURLSearchParams(params)) {24419 -1 serializedParams = params.toString();-1 42481 var aRgbHex = colorString.match(/.{1,2}/g); -1 42482 this.red = parseInt(aRgbHex[0], 16); -1 42483 this.green = parseInt(aRgbHex[1], 16); -1 42484 this.blue = parseInt(aRgbHex[2], 16); -1 42485 if (aRgbHex[3]) { -1 42486 this.alpha = parseInt(aRgbHex[3], 16) / 255; 24420 42487 } else {24421 -1 var parts = [];24422 -1 utils.forEach(params, function serialize(val, key) {24423 -1 if (val === null || typeof val === 'undefined') {24424 -1 return;24425 -1 }24426 -1 if (utils.isArray(val)) {24427 -1 key = key + '[]';24428 -1 } else {24429 -1 val = [ val ];24430 -1 }24431 -1 utils.forEach(val, function parseValue(v) {24432 -1 if (utils.isDate(v)) {24433 -1 v = v.toISOString();24434 -1 } else if (utils.isObject(v)) {24435 -1 v = JSON.stringify(v);24436 -1 }24437 -1 parts.push(encode(key) + '=' + encode(v));24438 -1 });24439 -1 });24440 -1 serializedParams = parts.join('&');24441 -1 }24442 -1 if (serializedParams) {24443 -1 var hashmarkIndex = url.indexOf('#');24444 -1 if (hashmarkIndex !== -1) {24445 -1 url = url.slice(0, hashmarkIndex);24446 -1 }24447 -1 url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;-1 42488 this.alpha = 1; 24448 42489 }24449 -1 return url;24450 -1 };24451 -1 },24452 -1 './node_modules/axios/lib/helpers/combineURLs.js': function node_modulesAxiosLibHelpersCombineURLsJs(module, exports, __webpack_require__) {24453 -1 'use strict';24454 -1 module.exports = function combineURLs(baseURL, relativeURL) {24455 -1 return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL;24456 -1 };24457 -1 },24458 -1 './node_modules/axios/lib/helpers/cookies.js': function node_modulesAxiosLibHelpersCookiesJs(module, exports, __webpack_require__) {24459 -1 'use strict';24460 -1 var utils = __webpack_require__('./node_modules/axios/lib/utils.js');24461 -1 module.exports = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {24462 -1 return {24463 -1 write: function write(name, value, expires, path, domain, secure) {24464 -1 var cookie = [];24465 -1 cookie.push(name + '=' + encodeURIComponent(value));24466 -1 if (utils.isNumber(expires)) {24467 -1 cookie.push('expires=' + new Date(expires).toGMTString());24468 -1 }24469 -1 if (utils.isString(path)) {24470 -1 cookie.push('path=' + path);24471 -1 }24472 -1 if (utils.isString(domain)) {24473 -1 cookie.push('domain=' + domain);24474 -1 }24475 -1 if (secure === true) {24476 -1 cookie.push('secure');24477 -1 }24478 -1 document.cookie = cookie.join('; ');24479 -1 },24480 -1 read: function read(name) {24481 -1 var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));24482 -1 return match ? decodeURIComponent(match[3]) : null;24483 -1 },24484 -1 remove: function remove(name) {24485 -1 this.write(name, '', Date.now() - 864e5);24486 -1 }24487 -1 };24488 -1 }() : function nonStandardBrowserEnv() {24489 -1 return {24490 -1 write: function write() {},24491 -1 read: function read() {24492 -1 return null;24493 -1 },24494 -1 remove: function remove() {}24495 -1 };24496 -1 }();24497 -1 },24498 -1 './node_modules/axios/lib/helpers/isAbsoluteURL.js': function node_modulesAxiosLibHelpersIsAbsoluteURLJs(module, exports, __webpack_require__) {24499 -1 'use strict';24500 -1 module.exports = function isAbsoluteURL(url) {24501 -1 return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);24502 42490 };24503 -1 },24504 -1 './node_modules/axios/lib/helpers/isURLSameOrigin.js': function node_modulesAxiosLibHelpersIsURLSameOriginJs(module, exports, __webpack_require__) {24505 -1 'use strict';24506 -1 var utils = __webpack_require__('./node_modules/axios/lib/utils.js');24507 -1 module.exports = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {24508 -1 var msie = /(msie|trident)/i.test(navigator.userAgent);24509 -1 var urlParsingNode = document.createElement('a');24510 -1 var originURL;24511 -1 function resolveURL(url) {24512 -1 var href = url;24513 -1 if (msie) {24514 -1 urlParsingNode.setAttribute('href', href);24515 -1 href = urlParsingNode.href;24516 -1 }24517 -1 urlParsingNode.setAttribute('href', href);24518 -1 return {24519 -1 href: urlParsingNode.href,24520 -1 protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',24521 -1 host: urlParsingNode.host,24522 -1 search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',24523 -1 hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',24524 -1 hostname: urlParsingNode.hostname,24525 -1 port: urlParsingNode.port,24526 -1 pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname24527 -1 };-1 42491 this.parseColorFnString = function parseColorFnString(colorString) { -1 42492 var _ref13 = colorString.match(colorFnRegex) || [], _ref14 = _slicedToArray(_ref13, 3), colorFunc = _ref14[1], colorValStr = _ref14[2]; -1 42493 if (!colorFunc || !colorValStr) { -1 42494 return; 24528 42495 }24529 -1 originURL = resolveURL(window.location.href);24530 -1 return function isURLSameOrigin(requestURL) {24531 -1 var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;24532 -1 return parsed.protocol === originURL.protocol && parsed.host === originURL.host;24533 -1 };24534 -1 }() : function nonStandardBrowserEnv() {24535 -1 return function isURLSameOrigin() {24536 -1 return true;24537 -1 };24538 -1 }();24539 -1 },24540 -1 './node_modules/axios/lib/helpers/normalizeHeaderName.js': function node_modulesAxiosLibHelpersNormalizeHeaderNameJs(module, exports, __webpack_require__) {24541 -1 'use strict';24542 -1 var utils = __webpack_require__('./node_modules/axios/lib/utils.js');24543 -1 module.exports = function normalizeHeaderName(headers, normalizedName) {24544 -1 utils.forEach(headers, function processHeader(value, name) {24545 -1 if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {24546 -1 headers[normalizedName] = value;24547 -1 delete headers[name];24548 -1 }-1 42496 var colorVals = colorValStr.split(/\s*[,\/\s]\s*/).map(function(str) { -1 42497 return str.replace(',', '').trim(); -1 42498 }).filter(function(str) { -1 42499 return str !== ''; 24549 42500 });24550 -1 };24551 -1 },24552 -1 './node_modules/axios/lib/helpers/parseHeaders.js': function node_modulesAxiosLibHelpersParseHeadersJs(module, exports, __webpack_require__) {24553 -1 'use strict';24554 -1 var utils = __webpack_require__('./node_modules/axios/lib/utils.js');24555 -1 var ignoreDuplicateOf = [ 'age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent' ];24556 -1 module.exports = function parseHeaders(headers) {24557 -1 var parsed = {};24558 -1 var key;24559 -1 var val;24560 -1 var i;24561 -1 if (!headers) {24562 -1 return parsed;24563 -1 }24564 -1 utils.forEach(headers.split('\n'), function parser(line) {24565 -1 i = line.indexOf(':');24566 -1 key = utils.trim(line.substr(0, i)).toLowerCase();24567 -1 val = utils.trim(line.substr(i + 1));24568 -1 if (key) {24569 -1 if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {24570 -1 return;24571 -1 }24572 -1 if (key === 'set-cookie') {24573 -1 parsed[key] = (parsed[key] ? parsed[key] : []).concat([ val ]);24574 -1 } else {24575 -1 parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;24576 -1 }24577 -1 }-1 42501 var colorNums = colorVals.map(function(val, index) { -1 42502 return convertColorVal(colorFunc, val, index); 24578 42503 });24579 -1 return parsed;24580 -1 };24581 -1 },24582 -1 './node_modules/axios/lib/helpers/spread.js': function node_modulesAxiosLibHelpersSpreadJs(module, exports, __webpack_require__) {24583 -1 'use strict';24584 -1 module.exports = function spread(callback) {24585 -1 return function wrap(arr) {24586 -1 return callback.apply(null, arr);24587 -1 };24588 -1 };24589 -1 },24590 -1 './node_modules/axios/lib/utils.js': function node_modulesAxiosLibUtilsJs(module, exports, __webpack_require__) {24591 -1 'use strict';24592 -1 var bind = __webpack_require__('./node_modules/axios/lib/helpers/bind.js');24593 -1 var toString = Object.prototype.toString;24594 -1 function isArray(val) {24595 -1 return toString.call(val) === '[object Array]';24596 -1 }24597 -1 function isUndefined(val) {24598 -1 return typeof val === 'undefined';-1 42504 if (colorFunc.substr(0, 3) === 'hsl') { -1 42505 colorNums = hslToRgb(colorNums); -1 42506 } -1 42507 this.red = colorNums[0]; -1 42508 this.green = colorNums[1]; -1 42509 this.blue = colorNums[2]; -1 42510 this.alpha = typeof colorNums[3] === 'number' ? colorNums[3] : 1; -1 42511 }; -1 42512 this.getRelativeLuminance = function getRelativeLuminance() { -1 42513 var rSRGB = this.red / 255; -1 42514 var gSRGB = this.green / 255; -1 42515 var bSRGB = this.blue / 255; -1 42516 var r = rSRGB <= .03928 ? rSRGB / 12.92 : Math.pow((rSRGB + .055) / 1.055, 2.4); -1 42517 var g = gSRGB <= .03928 ? gSRGB / 12.92 : Math.pow((gSRGB + .055) / 1.055, 2.4); -1 42518 var b = bSRGB <= .03928 ? bSRGB / 12.92 : Math.pow((bSRGB + .055) / 1.055, 2.4); -1 42519 return .2126 * r + .7152 * g + .0722 * b; -1 42520 }; -1 42521 } -1 42522 var color_default = Color; -1 42523 function getOwnBackgroundColor(elmStyle) { -1 42524 var bgColor = new color_default(); -1 42525 bgColor.parseString(elmStyle.getPropertyValue('background-color')); -1 42526 if (bgColor.alpha !== 0) { -1 42527 var opacity = elmStyle.getPropertyValue('opacity'); -1 42528 bgColor.alpha = bgColor.alpha * opacity; -1 42529 } -1 42530 return bgColor; -1 42531 } -1 42532 var get_own_background_color_default = getOwnBackgroundColor; -1 42533 function isOpaque(node) { -1 42534 var style = window.getComputedStyle(node); -1 42535 return element_has_image_default(node, style) || get_own_background_color_default(style).alpha === 1; -1 42536 } -1 42537 var is_opaque_default = isOpaque; -1 42538 var isInternalLinkRegex = /^\/?#[^/!]/; -1 42539 function isSkipLink(element) { -1 42540 if (!isInternalLinkRegex.test(element.getAttribute('href'))) { -1 42541 return false; 24599 42542 }24600 -1 function isBuffer(val) {24601 -1 return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);-1 42543 var firstPageLink; -1 42544 if (typeof cache_default.get('firstPageLink') !== 'undefined') { -1 42545 firstPageLink = cache_default.get('firstPageLink'); -1 42546 } else { -1 42547 firstPageLink = query_selector_all_default(axe._tree, 'a:not([href^="#"]):not([href^="/#"]):not([href^="javascript"])')[0]; -1 42548 cache_default.set('firstPageLink', firstPageLink || null); 24602 42549 }24603 -1 function isArrayBuffer(val) {24604 -1 return toString.call(val) === '[object ArrayBuffer]';-1 42550 if (!firstPageLink) { -1 42551 return true; 24605 42552 }24606 -1 function isFormData(val) {24607 -1 return typeof FormData !== 'undefined' && val instanceof FormData;-1 42553 return element.compareDocumentPosition(firstPageLink.actualNode) === element.DOCUMENT_POSITION_FOLLOWING; -1 42554 } -1 42555 var is_skip_link_default = isSkipLink; -1 42556 function reduceToElementsBelowFloating(elements, targetNode) { -1 42557 var floatingPositions = [ 'fixed', 'sticky' ]; -1 42558 var finalElements = []; -1 42559 var targetFound = false; -1 42560 for (var index = 0; index < elements.length; ++index) { -1 42561 var currentNode = elements[index]; -1 42562 if (currentNode === targetNode) { -1 42563 targetFound = true; -1 42564 } -1 42565 var style = window.getComputedStyle(currentNode); -1 42566 if (!targetFound && floatingPositions.indexOf(style.position) !== -1) { -1 42567 finalElements = []; -1 42568 continue; -1 42569 } -1 42570 finalElements.push(currentNode); 24608 42571 }24609 -1 function isArrayBufferView(val) {24610 -1 var result;24611 -1 if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {24612 -1 result = ArrayBuffer.isView(val);24613 -1 } else {24614 -1 result = val && val.buffer && val.buffer instanceof ArrayBuffer;-1 42572 return finalElements; -1 42573 } -1 42574 var reduce_to_elements_below_floating_default = reduceToElementsBelowFloating; -1 42575 function getScrollAncestor(node) { -1 42576 var vNode = get_node_from_tree_default(node); -1 42577 var ancestor = vNode.parent; -1 42578 while (ancestor) { -1 42579 if (get_scroll_default(ancestor.actualNode)) { -1 42580 return ancestor.actualNode; 24615 42581 }24616 -1 return result;-1 42582 ancestor = ancestor.parent; -1 42583 } -1 42584 } -1 42585 function contains2(node, parent) { -1 42586 var rectBound = node.getBoundingClientRect(); -1 42587 var margin = .01; -1 42588 var rect = { -1 42589 top: rectBound.top + margin, -1 42590 bottom: rectBound.bottom - margin, -1 42591 left: rectBound.left + margin, -1 42592 right: rectBound.right - margin -1 42593 }; -1 42594 var parentRect = parent.getBoundingClientRect(); -1 42595 var parentTop = parentRect.top; -1 42596 var parentLeft = parentRect.left; -1 42597 var parentScrollArea = { -1 42598 top: parentTop - parent.scrollTop, -1 42599 bottom: parentTop - parent.scrollTop + parent.scrollHeight, -1 42600 left: parentLeft - parent.scrollLeft, -1 42601 right: parentLeft - parent.scrollLeft + parent.scrollWidth -1 42602 }; -1 42603 var style = window.getComputedStyle(parent); -1 42604 if (style.getPropertyValue('display') === 'inline') { -1 42605 return true; -1 42606 } -1 42607 if (rect.left < parentScrollArea.left && rect.left < parentRect.left || rect.top < parentScrollArea.top && rect.top < parentRect.top || rect.right > parentScrollArea.right && rect.right > parentRect.right || rect.bottom > parentScrollArea.bottom && rect.bottom > parentRect.bottom) { -1 42608 return false; 24617 42609 }24618 -1 function isString(val) {24619 -1 return typeof val === 'string';-1 42610 if (rect.right > parentRect.right || rect.bottom > parentRect.bottom) { -1 42611 return style.overflow === 'scroll' || style.overflow === 'auto' || style.overflow === 'hidden' || parent instanceof window.HTMLBodyElement || parent instanceof window.HTMLHtmlElement; 24620 42612 }24621 -1 function isNumber(val) {24622 -1 return typeof val === 'number';-1 42613 return true; -1 42614 } -1 42615 function visuallyContains(node, parent) { -1 42616 var parentScrollAncestor = getScrollAncestor(parent); -1 42617 do { -1 42618 var nextScrollAncestor = getScrollAncestor(node); -1 42619 if (nextScrollAncestor === parentScrollAncestor || nextScrollAncestor === parent) { -1 42620 return contains2(node, parent); -1 42621 } -1 42622 node = nextScrollAncestor; -1 42623 } while (node); -1 42624 return false; -1 42625 } -1 42626 var visually_contains_default = visuallyContains; -1 42627 function shadowElementsFromPoint(nodeX, nodeY) { -1 42628 var root = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document; -1 42629 var i = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; -1 42630 if (i > 999) { -1 42631 throw new Error('Infinite loop detected'); -1 42632 } -1 42633 return Array.from(root.elementsFromPoint(nodeX, nodeY) || []).filter(function(nodes) { -1 42634 return get_root_node_default2(nodes) === root; -1 42635 }).reduce(function(stack, elm) { -1 42636 if (is_shadow_root_default(elm)) { -1 42637 var shadowStack = shadowElementsFromPoint(nodeX, nodeY, elm.shadowRoot, i + 1); -1 42638 stack = stack.concat(shadowStack); -1 42639 if (stack.length && visually_contains_default(stack[0], elm)) { -1 42640 stack.push(elm); -1 42641 } -1 42642 } else { -1 42643 stack.push(elm); -1 42644 } -1 42645 return stack; -1 42646 }, []); -1 42647 } -1 42648 var shadow_elements_from_point_default = shadowElementsFromPoint; -1 42649 function urlPropsFromAttribute(node, attribute) { -1 42650 if (!node.hasAttribute(attribute)) { -1 42651 return void 0; -1 42652 } -1 42653 var nodeName2 = node.nodeName.toUpperCase(); -1 42654 var parser2 = node; -1 42655 if (![ 'A', 'AREA' ].includes(nodeName2) || node.ownerSVGElement) { -1 42656 parser2 = document.createElement('a'); -1 42657 parser2.href = node.getAttribute(attribute); -1 42658 } -1 42659 var protocol = [ 'https:', 'ftps:' ].includes(parser2.protocol) ? parser2.protocol.replace(/s:$/, ':') : parser2.protocol; -1 42660 var parserPathname = /^\//.test(parser2.pathname) ? parser2.pathname : '/'.concat(parser2.pathname); -1 42661 var _getPathnameOrFilenam = getPathnameOrFilename(parserPathname), pathname = _getPathnameOrFilenam.pathname, filename = _getPathnameOrFilenam.filename; -1 42662 return { -1 42663 protocol: protocol, -1 42664 hostname: parser2.hostname, -1 42665 port: getPort(parser2.port), -1 42666 pathname: /\/$/.test(pathname) ? pathname : ''.concat(pathname, '/'), -1 42667 search: getSearchPairs(parser2.search), -1 42668 hash: getHashRoute(parser2.hash), -1 42669 filename: filename -1 42670 }; -1 42671 } -1 42672 function getPort(port) { -1 42673 var excludePorts = [ '443', '80' ]; -1 42674 return !excludePorts.includes(port) ? port : ''; -1 42675 } -1 42676 function getPathnameOrFilename(pathname) { -1 42677 var filename = pathname.split('/').pop(); -1 42678 if (!filename || filename.indexOf('.') === -1) { -1 42679 return { -1 42680 pathname: pathname, -1 42681 filename: '' -1 42682 }; 24623 42683 }24624 -1 function isObject(val) {24625 -1 return val !== null && _typeof(val) === 'object';-1 42684 return { -1 42685 pathname: pathname.replace(filename, ''), -1 42686 filename: /index./.test(filename) ? '' : filename -1 42687 }; -1 42688 } -1 42689 function getSearchPairs(searchStr) { -1 42690 var query = {}; -1 42691 if (!searchStr || !searchStr.length) { -1 42692 return query; 24626 42693 }24627 -1 function isDate(val) {24628 -1 return toString.call(val) === '[object Date]';-1 42694 var pairs = searchStr.substring(1).split('&'); -1 42695 if (!pairs || !pairs.length) { -1 42696 return query; 24629 42697 }24630 -1 function isFile(val) {24631 -1 return toString.call(val) === '[object File]';-1 42698 for (var index = 0; index < pairs.length; index++) { -1 42699 var pair = pairs[index]; -1 42700 var _pair$split = pair.split('='), _pair$split2 = _slicedToArray(_pair$split, 2), key = _pair$split2[0], _pair$split2$ = _pair$split2[1], value = _pair$split2$ === void 0 ? '' : _pair$split2$; -1 42701 query[decodeURIComponent(key)] = decodeURIComponent(value); 24632 42702 }24633 -1 function isBlob(val) {24634 -1 return toString.call(val) === '[object Blob]';-1 42703 return query; -1 42704 } -1 42705 function getHashRoute(hash) { -1 42706 if (!hash) { -1 42707 return ''; 24635 42708 }24636 -1 function isFunction(val) {24637 -1 return toString.call(val) === '[object Function]';-1 42709 var hashRegex = /#!?\/?/g; -1 42710 var hasMatch = hash.match(hashRegex); -1 42711 if (!hasMatch) { -1 42712 return ''; 24638 42713 }24639 -1 function isStream(val) {24640 -1 return isObject(val) && isFunction(val.pipe);-1 42714 var _hasMatch = _slicedToArray(hasMatch, 1), matchedStr = _hasMatch[0]; -1 42715 if (matchedStr === '#') { -1 42716 return ''; 24641 42717 }24642 -1 function isURLSearchParams(val) {24643 -1 return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;-1 42718 return hash; -1 42719 } -1 42720 var url_props_from_attribute_default = urlPropsFromAttribute; -1 42721 function visuallyOverlaps(rect, parent) { -1 42722 var parentRect = parent.getBoundingClientRect(); -1 42723 var parentTop = parentRect.top; -1 42724 var parentLeft = parentRect.left; -1 42725 var parentScrollArea = { -1 42726 top: parentTop - parent.scrollTop, -1 42727 bottom: parentTop - parent.scrollTop + parent.scrollHeight, -1 42728 left: parentLeft - parent.scrollLeft, -1 42729 right: parentLeft - parent.scrollLeft + parent.scrollWidth -1 42730 }; -1 42731 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) { -1 42732 return false; 24644 42733 }24645 -1 function trim(str) {24646 -1 return str.replace(/^\s*/, '').replace(/\s*$/, '');-1 42734 var style = window.getComputedStyle(parent); -1 42735 if (rect.left > parentRect.right || rect.top > parentRect.bottom) { -1 42736 return style.overflow === 'scroll' || style.overflow === 'auto' || parent instanceof window.HTMLBodyElement || parent instanceof window.HTMLHtmlElement; 24647 42737 }24648 -1 function isStandardBrowserEnv() {24649 -1 if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || navigator.product === 'NativeScript' || navigator.product === 'NS')) {24650 -1 return false;-1 42738 return true; -1 42739 } -1 42740 var visually_overlaps_default = visuallyOverlaps; -1 42741 var isXHTMLGlobal; -1 42742 var nodeIndex = 0; -1 42743 var VirtualNode = function(_abstract_virtual_nod) { -1 42744 _inherits(VirtualNode, _abstract_virtual_nod); -1 42745 var _super = _createSuper(VirtualNode); -1 42746 function VirtualNode(node, parent, shadowId) { -1 42747 var _this; -1 42748 _classCallCheck(this, VirtualNode); -1 42749 _this = _super.call(this); -1 42750 _this.shadowId = shadowId; -1 42751 _this.children = []; -1 42752 _this.actualNode = node; -1 42753 _this.parent = parent; -1 42754 if (!parent) { -1 42755 nodeIndex = 0; -1 42756 } -1 42757 _this.nodeIndex = nodeIndex++; -1 42758 _this._isHidden = null; -1 42759 _this._cache = {}; -1 42760 if (typeof isXHTMLGlobal === 'undefined') { -1 42761 isXHTMLGlobal = is_xhtml_default(node.ownerDocument); -1 42762 } -1 42763 _this._isXHTML = isXHTMLGlobal; -1 42764 if (node.nodeName.toLowerCase() === 'input') { -1 42765 var type = node.getAttribute('type'); -1 42766 type = _this._isXHTML ? type : (type || '').toLowerCase(); -1 42767 if (!valid_input_type_default().includes(type)) { -1 42768 type = 'text'; -1 42769 } -1 42770 _this._type = type; 24651 42771 }24652 -1 return typeof window !== 'undefined' && typeof document !== 'undefined';-1 42772 if (cache_default.get('nodeMap')) { -1 42773 cache_default.get('nodeMap').set(node, _assertThisInitialized(_this)); -1 42774 } -1 42775 return _this; 24653 42776 }24654 -1 function forEach(obj, fn) {24655 -1 if (obj === null || typeof obj === 'undefined') {24656 -1 return;-1 42777 _createClass(VirtualNode, [ { -1 42778 key: 'props', -1 42779 get: function get() { -1 42780 var _this$actualNode = this.actualNode, nodeType = _this$actualNode.nodeType, nodeName2 = _this$actualNode.nodeName, id = _this$actualNode.id, multiple = _this$actualNode.multiple, nodeValue = _this$actualNode.nodeValue, value = _this$actualNode.value; -1 42781 return { -1 42782 nodeType: nodeType, -1 42783 nodeName: this._isXHTML ? nodeName2 : nodeName2.toLowerCase(), -1 42784 id: id, -1 42785 type: this._type, -1 42786 multiple: multiple, -1 42787 nodeValue: nodeValue, -1 42788 value: value -1 42789 }; 24657 42790 }24658 -1 if (_typeof(obj) !== 'object') {24659 -1 obj = [ obj ];-1 42791 }, { -1 42792 key: 'attr', -1 42793 value: function attr(attrName) { -1 42794 if (typeof this.actualNode.getAttribute !== 'function') { -1 42795 return null; -1 42796 } -1 42797 return this.actualNode.getAttribute(attrName); 24660 42798 }24661 -1 if (isArray(obj)) {24662 -1 for (var i = 0, l = obj.length; i < l; i++) {24663 -1 fn.call(null, obj[i], i, obj);-1 42799 }, { -1 42800 key: 'hasAttr', -1 42801 value: function hasAttr(attrName) { -1 42802 if (typeof this.actualNode.hasAttribute !== 'function') { -1 42803 return false; 24664 42804 }24665 -1 } else {24666 -1 for (var key in obj) {24667 -1 if (Object.prototype.hasOwnProperty.call(obj, key)) {24668 -1 fn.call(null, obj[key], key, obj);-1 42805 return this.actualNode.hasAttribute(attrName); -1 42806 } -1 42807 }, { -1 42808 key: 'attrNames', -1 42809 get: function get() { -1 42810 if (!this._cache.hasOwnProperty('attrNames')) { -1 42811 var attrs; -1 42812 if (this.actualNode.attributes instanceof window.NamedNodeMap) { -1 42813 attrs = this.actualNode.attributes; -1 42814 } else { -1 42815 attrs = this.actualNode.cloneNode(false).attributes; -1 42816 } -1 42817 this._cache.attrNames = Array.from(attrs).map(function(attr) { -1 42818 return attr.name; -1 42819 }); -1 42820 } -1 42821 return this._cache.attrNames; -1 42822 } -1 42823 }, { -1 42824 key: 'getComputedStylePropertyValue', -1 42825 value: function getComputedStylePropertyValue(property) { -1 42826 var key = 'computedStyle_' + property; -1 42827 if (!this._cache.hasOwnProperty(key)) { -1 42828 if (!this._cache.hasOwnProperty('computedStyle')) { -1 42829 this._cache.computedStyle = window.getComputedStyle(this.actualNode); 24669 42830 } -1 42831 this._cache[key] = this._cache.computedStyle.getPropertyValue(property); 24670 42832 } -1 42833 return this._cache[key]; 24671 42834 }24672 -1 }24673 -1 function merge() {24674 -1 var result = {};24675 -1 function assignValue(val, key) {24676 -1 if (_typeof(result[key]) === 'object' && _typeof(val) === 'object') {24677 -1 result[key] = merge(result[key], val);24678 -1 } else {24679 -1 result[key] = val;-1 42835 }, { -1 42836 key: 'isFocusable', -1 42837 get: function get() { -1 42838 if (!this._cache.hasOwnProperty('isFocusable')) { -1 42839 this._cache.isFocusable = is_focusable_default(this.actualNode); 24680 42840 } -1 42841 return this._cache.isFocusable; 24681 42842 }24682 -1 for (var i = 0, l = arguments.length; i < l; i++) {24683 -1 forEach(arguments[i], assignValue);-1 42843 }, { -1 42844 key: 'tabbableElements', -1 42845 get: function get() { -1 42846 if (!this._cache.hasOwnProperty('tabbableElements')) { -1 42847 this._cache.tabbableElements = get_tabbable_elements_default(this); -1 42848 } -1 42849 return this._cache.tabbableElements; 24684 42850 }24685 -1 return result;24686 -1 }24687 -1 function deepMerge() {24688 -1 var result = {};24689 -1 function assignValue(val, key) {24690 -1 if (_typeof(result[key]) === 'object' && _typeof(val) === 'object') {24691 -1 result[key] = deepMerge(result[key], val);24692 -1 } else if (_typeof(val) === 'object') {24693 -1 result[key] = deepMerge({}, val);24694 -1 } else {24695 -1 result[key] = val;-1 42851 }, { -1 42852 key: 'clientRects', -1 42853 get: function get() { -1 42854 if (!this._cache.hasOwnProperty('clientRects')) { -1 42855 this._cache.clientRects = Array.from(this.actualNode.getClientRects()).filter(function(rect) { -1 42856 return rect.width > 0; -1 42857 }); 24696 42858 } -1 42859 return this._cache.clientRects; 24697 42860 }24698 -1 for (var i = 0, l = arguments.length; i < l; i++) {24699 -1 forEach(arguments[i], assignValue);-1 42861 }, { -1 42862 key: 'boundingClientRect', -1 42863 get: function get() { -1 42864 if (!this._cache.hasOwnProperty('boundingClientRect')) { -1 42865 this._cache.boundingClientRect = this.actualNode.getBoundingClientRect(); -1 42866 } -1 42867 return this._cache.boundingClientRect; -1 42868 } -1 42869 } ]); -1 42870 return VirtualNode; -1 42871 }(abstract_virtual_node_default); -1 42872 var virtual_node_default = VirtualNode; -1 42873 function getSlotChildren(node) { -1 42874 var retVal = []; -1 42875 node = node.firstChild; -1 42876 while (node) { -1 42877 retVal.push(node); -1 42878 node = node.nextSibling; -1 42879 } -1 42880 return retVal; -1 42881 } -1 42882 function flattenTree(node, shadowId, parent) { -1 42883 var retVal, realArray, nodeName2; -1 42884 function reduceShadowDOM(res, child, parent2) { -1 42885 var replacements = flattenTree(child, shadowId, parent2); -1 42886 if (replacements) { -1 42887 res = res.concat(replacements); 24700 42888 }24701 -1 return result;-1 42889 return res; 24702 42890 }24703 -1 function extend(a, b, thisArg) {24704 -1 forEach(b, function assignValue(val, key) {24705 -1 if (thisArg && typeof val === 'function') {24706 -1 a[key] = bind(val, thisArg);-1 42891 if (node.documentElement) { -1 42892 node = node.documentElement; -1 42893 } -1 42894 nodeName2 = node.nodeName.toLowerCase(); -1 42895 if (is_shadow_root_default(node)) { -1 42896 retVal = new virtual_node_default(node, parent, shadowId); -1 42897 shadowId = 'a' + Math.random().toString().substring(2); -1 42898 realArray = Array.from(node.shadowRoot.childNodes); -1 42899 retVal.children = realArray.reduce(function(res, child) { -1 42900 return reduceShadowDOM(res, child, retVal); -1 42901 }, []); -1 42902 return [ retVal ]; -1 42903 } else { -1 42904 if (nodeName2 === 'content' && typeof node.getDistributedNodes === 'function') { -1 42905 realArray = Array.from(node.getDistributedNodes()); -1 42906 return realArray.reduce(function(res, child) { -1 42907 return reduceShadowDOM(res, child, parent); -1 42908 }, []); -1 42909 } else if (nodeName2 === 'slot' && typeof node.assignedNodes === 'function') { -1 42910 realArray = Array.from(node.assignedNodes()); -1 42911 if (!realArray.length) { -1 42912 realArray = getSlotChildren(node); -1 42913 } -1 42914 var styl = window.getComputedStyle(node); -1 42915 if (false) { -1 42916 retVal = new virtual_node_default(node, parent, shadowId); -1 42917 retVal.children = realArray.reduce(function(res, child) { -1 42918 return reduceShadowDOM(res, child, retVal); -1 42919 }, []); -1 42920 return [ retVal ]; 24707 42921 } else {24708 -1 a[key] = val;-1 42922 return realArray.reduce(function(res, child) { -1 42923 return reduceShadowDOM(res, child, parent); -1 42924 }, []); 24709 42925 }24710 -1 });24711 -1 return a;24712 -1 }24713 -1 module.exports = {24714 -1 isArray: isArray,24715 -1 isArrayBuffer: isArrayBuffer,24716 -1 isBuffer: isBuffer,24717 -1 isFormData: isFormData,24718 -1 isArrayBufferView: isArrayBufferView,24719 -1 isString: isString,24720 -1 isNumber: isNumber,24721 -1 isObject: isObject,24722 -1 isUndefined: isUndefined,24723 -1 isDate: isDate,24724 -1 isFile: isFile,24725 -1 isBlob: isBlob,24726 -1 isFunction: isFunction,24727 -1 isStream: isStream,24728 -1 isURLSearchParams: isURLSearchParams,24729 -1 isStandardBrowserEnv: isStandardBrowserEnv,24730 -1 forEach: forEach,24731 -1 merge: merge,24732 -1 deepMerge: deepMerge,24733 -1 extend: extend,24734 -1 trim: trim24735 -1 };24736 -1 },24737 -1 './node_modules/core-js-pure/es/promise/index.js': function node_modulesCoreJsPureEsPromiseIndexJs(module, exports, __webpack_require__) {24738 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.object.to-string.js');24739 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.string.iterator.js');24740 -1 __webpack_require__('./node_modules/core-js-pure/modules/web.dom-collections.iterator.js');24741 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.promise.js');24742 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.promise.all-settled.js');24743 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.promise.finally.js');24744 -1 var path = __webpack_require__('./node_modules/core-js-pure/internals/path.js');24745 -1 module.exports = path.Promise;24746 -1 },24747 -1 './node_modules/core-js-pure/es/typed-array/methods.js': function node_modulesCoreJsPureEsTypedArrayMethodsJs(module, exports, __webpack_require__) {24748 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.from.js');24749 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.of.js');24750 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.copy-within.js');24751 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.every.js');24752 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.fill.js');24753 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.filter.js');24754 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.find.js');24755 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.find-index.js');24756 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.for-each.js');24757 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.includes.js');24758 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.index-of.js');24759 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.join.js');24760 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.last-index-of.js');24761 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.map.js');24762 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.reduce.js');24763 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.reduce-right.js');24764 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.reverse.js');24765 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.set.js');24766 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.slice.js');24767 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.some.js');24768 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.sort.js');24769 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.subarray.js');24770 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.to-locale-string.js');24771 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.to-string.js');24772 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.iterator.js');24773 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.object.to-string.js');24774 -1 },24775 -1 './node_modules/core-js-pure/es/typed-array/uint32-array.js': function node_modulesCoreJsPureEsTypedArrayUint32ArrayJs(module, exports, __webpack_require__) {24776 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.typed-array.uint32-array.js');24777 -1 __webpack_require__('./node_modules/core-js-pure/es/typed-array/methods.js');24778 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');24779 -1 module.exports = global.Uint32Array;24780 -1 },24781 -1 './node_modules/core-js-pure/es/weak-map/index.js': function node_modulesCoreJsPureEsWeakMapIndexJs(module, exports, __webpack_require__) {24782 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.object.to-string.js');24783 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.weak-map.js');24784 -1 __webpack_require__('./node_modules/core-js-pure/modules/web.dom-collections.iterator.js');24785 -1 var path = __webpack_require__('./node_modules/core-js-pure/internals/path.js');24786 -1 module.exports = path.WeakMap;24787 -1 },24788 -1 './node_modules/core-js-pure/features/promise/index.js': function node_modulesCoreJsPureFeaturesPromiseIndexJs(module, exports, __webpack_require__) {24789 -1 var parent = __webpack_require__('./node_modules/core-js-pure/es/promise/index.js');24790 -1 __webpack_require__('./node_modules/core-js-pure/modules/esnext.aggregate-error.js');24791 -1 __webpack_require__('./node_modules/core-js-pure/modules/esnext.promise.all-settled.js');24792 -1 __webpack_require__('./node_modules/core-js-pure/modules/esnext.promise.try.js');24793 -1 __webpack_require__('./node_modules/core-js-pure/modules/esnext.promise.any.js');24794 -1 module.exports = parent;24795 -1 },24796 -1 './node_modules/core-js-pure/features/typed-array/uint32-array.js': function node_modulesCoreJsPureFeaturesTypedArrayUint32ArrayJs(module, exports, __webpack_require__) {24797 -1 var parent = __webpack_require__('./node_modules/core-js-pure/es/typed-array/uint32-array.js');24798 -1 module.exports = parent;24799 -1 },24800 -1 './node_modules/core-js-pure/internals/a-function.js': function node_modulesCoreJsPureInternalsAFunctionJs(module, exports) {24801 -1 module.exports = function(it) {24802 -1 if (typeof it != 'function') {24803 -1 throw TypeError(String(it) + ' is not a function');-1 42926 } else { -1 42927 if (node.nodeType === 1) { -1 42928 retVal = new virtual_node_default(node, parent, shadowId); -1 42929 realArray = Array.from(node.childNodes); -1 42930 retVal.children = realArray.reduce(function(res, child) { -1 42931 return reduceShadowDOM(res, child, retVal); -1 42932 }, []); -1 42933 return [ retVal ]; -1 42934 } else if (node.nodeType === 3) { -1 42935 return [ new virtual_node_default(node, parent) ]; -1 42936 } -1 42937 return void 0; 24804 42938 }24805 -1 return it;24806 -1 };24807 -1 },24808 -1 './node_modules/core-js-pure/internals/a-possible-prototype.js': function node_modulesCoreJsPureInternalsAPossiblePrototypeJs(module, exports, __webpack_require__) {24809 -1 var isObject = __webpack_require__('./node_modules/core-js-pure/internals/is-object.js');24810 -1 module.exports = function(it) {24811 -1 if (!isObject(it) && it !== null) {24812 -1 throw TypeError('Can\'t set ' + String(it) + ' as a prototype');-1 42939 } -1 42940 } -1 42941 function getFlattenedTree() { -1 42942 var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.documentElement; -1 42943 var shadowId = arguments.length > 1 ? arguments[1] : undefined; -1 42944 cache_default.set('nodeMap', new WeakMap()); -1 42945 return flattenTree(node, shadowId, null); -1 42946 } -1 42947 var get_flattened_tree_default = getFlattenedTree; -1 42948 function getBaseLang(lang) { -1 42949 if (!lang) { -1 42950 return ''; -1 42951 } -1 42952 return lang.trim().split('-')[0].toLowerCase(); -1 42953 } -1 42954 var get_base_lang_default = getBaseLang; -1 42955 function failureSummary(nodeData) { -1 42956 var failingChecks = {}; -1 42957 failingChecks.none = nodeData.none.concat(nodeData.all); -1 42958 failingChecks.any = nodeData.any; -1 42959 return Object.keys(failingChecks).map(function(key) { -1 42960 if (!failingChecks[key].length) { -1 42961 return; 24813 42962 }24814 -1 return it;24815 -1 };24816 -1 },24817 -1 './node_modules/core-js-pure/internals/add-to-unscopables.js': function node_modulesCoreJsPureInternalsAddToUnscopablesJs(module, exports) {24818 -1 module.exports = function() {};24819 -1 },24820 -1 './node_modules/core-js-pure/internals/an-instance.js': function node_modulesCoreJsPureInternalsAnInstanceJs(module, exports) {24821 -1 module.exports = function(it, Constructor, name) {24822 -1 if (!(it instanceof Constructor)) {24823 -1 throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');-1 42963 var sum = axe._audit.data.failureSummaries[key]; -1 42964 if (sum && typeof sum.failureMessage === 'function') { -1 42965 return sum.failureMessage(failingChecks[key].map(function(check4) { -1 42966 return check4.message || ''; -1 42967 })); 24824 42968 }24825 -1 return it;-1 42969 }).filter(function(i) { -1 42970 return i !== void 0; -1 42971 }).join('\n\n'); -1 42972 } -1 42973 var failure_summary_default = failureSummary; -1 42974 function getEnvironmentData() { -1 42975 var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window; -1 42976 var _win$screen = win.screen, screen = _win$screen === void 0 ? {} : _win$screen, _win$navigator = win.navigator, navigator = _win$navigator === void 0 ? {} : _win$navigator, _win$location = win.location, location = _win$location === void 0 ? {} : _win$location, innerHeight = win.innerHeight, innerWidth = win.innerWidth; -1 42977 var orientation = screen.msOrientation || screen.orientation || screen.mozOrientation || {}; -1 42978 return { -1 42979 testEngine: { -1 42980 name: 'axe-core', -1 42981 version: axe.version -1 42982 }, -1 42983 testRunner: { -1 42984 name: axe._audit.brand -1 42985 }, -1 42986 testEnvironment: { -1 42987 userAgent: navigator.userAgent, -1 42988 windowWidth: innerWidth, -1 42989 windowHeight: innerHeight, -1 42990 orientationAngle: orientation.angle, -1 42991 orientationType: orientation.type -1 42992 }, -1 42993 timestamp: new Date().toISOString(), -1 42994 url: location.href 24826 42995 };24827 -1 },24828 -1 './node_modules/core-js-pure/internals/an-object.js': function node_modulesCoreJsPureInternalsAnObjectJs(module, exports, __webpack_require__) {24829 -1 var isObject = __webpack_require__('./node_modules/core-js-pure/internals/is-object.js');24830 -1 module.exports = function(it) {24831 -1 if (!isObject(it)) {24832 -1 throw TypeError(String(it) + ' is not an object');-1 42996 } -1 42997 var get_environment_data_default = getEnvironmentData; -1 42998 function incompleteFallbackMessage() { -1 42999 return typeof axe._audit.data.incompleteFallbackMessage === 'function' ? axe._audit.data.incompleteFallbackMessage() : axe._audit.data.incompleteFallbackMessage; -1 43000 } -1 43001 var incomplete_fallback_msg_default = incompleteFallbackMessage; -1 43002 function normalizeRelatedNodes(node, options) { -1 43003 [ 'any', 'all', 'none' ].forEach(function(type) { -1 43004 if (!Array.isArray(node[type])) { -1 43005 return; 24833 43006 }24834 -1 return it;24835 -1 };24836 -1 },24837 -1 './node_modules/core-js-pure/internals/array-includes.js': function node_modulesCoreJsPureInternalsArrayIncludesJs(module, exports, __webpack_require__) {24838 -1 var toIndexedObject = __webpack_require__('./node_modules/core-js-pure/internals/to-indexed-object.js');24839 -1 var toLength = __webpack_require__('./node_modules/core-js-pure/internals/to-length.js');24840 -1 var toAbsoluteIndex = __webpack_require__('./node_modules/core-js-pure/internals/to-absolute-index.js');24841 -1 var createMethod = function createMethod(IS_INCLUDES) {24842 -1 return function($this, el, fromIndex) {24843 -1 var O = toIndexedObject($this);24844 -1 var length = toLength(O.length);24845 -1 var index = toAbsoluteIndex(fromIndex, length);24846 -1 var value;24847 -1 if (IS_INCLUDES && el != el) {24848 -1 while (length > index) {24849 -1 value = O[index++];24850 -1 if (value != value) {24851 -1 return true;24852 -1 }-1 43007 node[type].filter(function(checkRes) { -1 43008 return Array.isArray(checkRes.relatedNodes); -1 43009 }).forEach(function(checkRes) { -1 43010 checkRes.relatedNodes = checkRes.relatedNodes.map(function(relatedNode) { -1 43011 var res = { -1 43012 html: relatedNode.source -1 43013 }; -1 43014 if (options.elementRef && !relatedNode.fromFrame) { -1 43015 res.element = relatedNode.element; 24853 43016 }24854 -1 } else {24855 -1 for (;length > index; index++) {24856 -1 if ((IS_INCLUDES || index in O) && O[index] === el) {24857 -1 return IS_INCLUDES || index || 0;24858 -1 }-1 43017 if (options.selectors !== false || relatedNode.fromFrame) { -1 43018 res.target = relatedNode.selector; 24859 43019 }24860 -1 }24861 -1 return !IS_INCLUDES && -1;24862 -1 };24863 -1 };24864 -1 module.exports = {24865 -1 includes: createMethod(true),24866 -1 indexOf: createMethod(false)24867 -1 };24868 -1 },24869 -1 './node_modules/core-js-pure/internals/array-iteration.js': function node_modulesCoreJsPureInternalsArrayIterationJs(module, exports, __webpack_require__) {24870 -1 var bind = __webpack_require__('./node_modules/core-js-pure/internals/function-bind-context.js');24871 -1 var IndexedObject = __webpack_require__('./node_modules/core-js-pure/internals/indexed-object.js');24872 -1 var toObject = __webpack_require__('./node_modules/core-js-pure/internals/to-object.js');24873 -1 var toLength = __webpack_require__('./node_modules/core-js-pure/internals/to-length.js');24874 -1 var arraySpeciesCreate = __webpack_require__('./node_modules/core-js-pure/internals/array-species-create.js');24875 -1 var push = [].push;24876 -1 var createMethod = function createMethod(TYPE) {24877 -1 var IS_MAP = TYPE == 1;24878 -1 var IS_FILTER = TYPE == 2;24879 -1 var IS_SOME = TYPE == 3;24880 -1 var IS_EVERY = TYPE == 4;24881 -1 var IS_FIND_INDEX = TYPE == 6;24882 -1 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;24883 -1 return function($this, callbackfn, that, specificCreate) {24884 -1 var O = toObject($this);24885 -1 var self = IndexedObject(O);24886 -1 var boundFunction = bind(callbackfn, that, 3);24887 -1 var length = toLength(self.length);24888 -1 var index = 0;24889 -1 var create = specificCreate || arraySpeciesCreate;24890 -1 var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;24891 -1 var value, result;24892 -1 for (;length > index; index++) {24893 -1 if (NO_HOLES || index in self) {24894 -1 value = self[index];24895 -1 result = boundFunction(value, index, O);24896 -1 if (TYPE) {24897 -1 if (IS_MAP) {24898 -1 target[index] = result;24899 -1 } else if (result) {24900 -1 switch (TYPE) {24901 -1 case 3:24902 -1 return true;24903 -124904 -1 case 5:24905 -1 return value;24906 -124907 -1 case 6:24908 -1 return index;24909 -124910 -1 case 2:24911 -1 push.call(target, value);24912 -1 }24913 -1 } else if (IS_EVERY) {24914 -1 return false;-1 43020 if (options.ancestry) { -1 43021 res.ancestry = relatedNode.ancestry; -1 43022 } -1 43023 if (options.xpath) { -1 43024 res.xpath = relatedNode.xpath; -1 43025 } -1 43026 return res; -1 43027 }); -1 43028 }); -1 43029 }); -1 43030 } -1 43031 var resultKeys = constants_default.resultGroups; -1 43032 function processAggregate(results, options) { -1 43033 var resultObject = axe.utils.aggregateResult(results); -1 43034 resultKeys.forEach(function(key) { -1 43035 if (options.resultTypes && !options.resultTypes.includes(key)) { -1 43036 (resultObject[key] || []).forEach(function(ruleResult) { -1 43037 if (Array.isArray(ruleResult.nodes) && ruleResult.nodes.length > 0) { -1 43038 ruleResult.nodes = [ ruleResult.nodes[0] ]; -1 43039 } -1 43040 }); -1 43041 } -1 43042 resultObject[key] = (resultObject[key] || []).map(function(ruleResult) { -1 43043 ruleResult = Object.assign({}, ruleResult); -1 43044 if (Array.isArray(ruleResult.nodes) && ruleResult.nodes.length > 0) { -1 43045 ruleResult.nodes = ruleResult.nodes.map(function(subResult) { -1 43046 if (_typeof(subResult.node) === 'object') { -1 43047 subResult.html = subResult.node.source; -1 43048 if (options.elementRef && !subResult.node.fromFrame) { -1 43049 subResult.element = subResult.node.element; -1 43050 } -1 43051 if (options.selectors !== false || subResult.node.fromFrame) { -1 43052 subResult.target = subResult.node.selector; -1 43053 } -1 43054 if (options.ancestry) { -1 43055 subResult.ancestry = subResult.node.ancestry; -1 43056 } -1 43057 if (options.xpath) { -1 43058 subResult.xpath = subResult.node.xpath; 24915 43059 } 24916 43060 }24917 -1 }-1 43061 delete subResult.result; -1 43062 delete subResult.node; -1 43063 normalizeRelatedNodes(subResult, options); -1 43064 return subResult; -1 43065 }); 24918 43066 }24919 -1 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;24920 -1 };24921 -1 };24922 -1 module.exports = {24923 -1 forEach: createMethod(0),24924 -1 map: createMethod(1),24925 -1 filter: createMethod(2),24926 -1 some: createMethod(3),24927 -1 every: createMethod(4),24928 -1 find: createMethod(5),24929 -1 findIndex: createMethod(6)24930 -1 };24931 -1 },24932 -1 './node_modules/core-js-pure/internals/array-species-create.js': function node_modulesCoreJsPureInternalsArraySpeciesCreateJs(module, exports, __webpack_require__) {24933 -1 var isObject = __webpack_require__('./node_modules/core-js-pure/internals/is-object.js');24934 -1 var isArray = __webpack_require__('./node_modules/core-js-pure/internals/is-array.js');24935 -1 var wellKnownSymbol = __webpack_require__('./node_modules/core-js-pure/internals/well-known-symbol.js');24936 -1 var SPECIES = wellKnownSymbol('species');24937 -1 module.exports = function(originalArray, length) {24938 -1 var C;24939 -1 if (isArray(originalArray)) {24940 -1 C = originalArray.constructor;24941 -1 if (typeof C == 'function' && (C === Array || isArray(C.prototype))) {24942 -1 C = undefined;24943 -1 } else if (isObject(C)) {24944 -1 C = C[SPECIES];24945 -1 if (C === null) {24946 -1 C = undefined;24947 -1 }24948 -1 }24949 -1 }24950 -1 return new (C === undefined ? Array : C)(length === 0 ? 0 : length);-1 43067 resultKeys.forEach(function(key2) { -1 43068 return delete ruleResult[key2]; -1 43069 }); -1 43070 delete ruleResult.pageLevel; -1 43071 delete ruleResult.result; -1 43072 return ruleResult; -1 43073 }); -1 43074 }); -1 43075 return resultObject; -1 43076 } -1 43077 var process_aggregate_default = processAggregate; -1 43078 axe._thisWillBeDeletedDoNotUse = axe._thisWillBeDeletedDoNotUse || {}; -1 43079 axe._thisWillBeDeletedDoNotUse.helpers = { -1 43080 failureSummary: failure_summary_default, -1 43081 getEnvironmentData: get_environment_data_default, -1 43082 incompleteFallbackMessage: incomplete_fallback_msg_default, -1 43083 processAggregate: process_aggregate_default -1 43084 }; -1 43085 var dataRegex = /\$\{\s?data\s?\}/g; -1 43086 function substitute(str, data2) { -1 43087 if (typeof data2 === 'string') { -1 43088 return str.replace(dataRegex, data2); -1 43089 } -1 43090 for (var prop in data2) { -1 43091 if (data2.hasOwnProperty(prop)) { -1 43092 var regex = new RegExp('\\${\\s?data\\.' + prop + '\\s?}', 'g'); -1 43093 var replace = typeof data2[prop] === 'undefined' ? '' : String(data2[prop]); -1 43094 str = str.replace(regex, replace); -1 43095 } -1 43096 } -1 43097 return str; -1 43098 } -1 43099 function processMessage(message, data2) { -1 43100 if (!message) { -1 43101 return; -1 43102 } -1 43103 if (Array.isArray(data2)) { -1 43104 data2.values = data2.join(', '); -1 43105 if (typeof message.singular === 'string' && typeof message.plural === 'string') { -1 43106 var str2 = data2.length === 1 ? message.singular : message.plural; -1 43107 return substitute(str2, data2); -1 43108 } -1 43109 return substitute(message, data2); -1 43110 } -1 43111 if (typeof message === 'string') { -1 43112 return substitute(message, data2); -1 43113 } -1 43114 if (typeof data2 === 'string') { -1 43115 var _str = message[data2]; -1 43116 return substitute(_str, data2); -1 43117 } -1 43118 var str = message['default'] || incomplete_fallback_msg_default(); -1 43119 if (data2 && data2.messageKey && message[data2.messageKey]) { -1 43120 str = message[data2.messageKey]; -1 43121 } -1 43122 return processMessage(str, data2); -1 43123 } -1 43124 var process_message_default = processMessage; -1 43125 function getCheckMessage(checkId, type, data2) { -1 43126 var check4 = axe._audit.data.checks[checkId]; -1 43127 if (!check4) { -1 43128 throw new Error('Cannot get message for unknown check: '.concat(checkId, '.')); -1 43129 } -1 43130 if (!check4.messages[type]) { -1 43131 throw new Error('Check "'.concat(checkId, '"" does not have a "').concat(type, '" message.')); -1 43132 } -1 43133 return process_message_default(check4.messages[type], data2); -1 43134 } -1 43135 var get_check_message_default = getCheckMessage; -1 43136 function getCheckOption(check4, ruleID, options) { -1 43137 var ruleCheckOption = ((options.rules && options.rules[ruleID] || {}).checks || {})[check4.id]; -1 43138 var checkOption = (options.checks || {})[check4.id]; -1 43139 var enabled = check4.enabled; -1 43140 var opts = check4.options; -1 43141 if (checkOption) { -1 43142 if (checkOption.hasOwnProperty('enabled')) { -1 43143 enabled = checkOption.enabled; -1 43144 } -1 43145 if (checkOption.hasOwnProperty('options')) { -1 43146 opts = checkOption.options; -1 43147 } -1 43148 } -1 43149 if (ruleCheckOption) { -1 43150 if (ruleCheckOption.hasOwnProperty('enabled')) { -1 43151 enabled = ruleCheckOption.enabled; -1 43152 } -1 43153 if (ruleCheckOption.hasOwnProperty('options')) { -1 43154 opts = ruleCheckOption.options; -1 43155 } -1 43156 } -1 43157 return { -1 43158 enabled: enabled, -1 43159 options: opts, -1 43160 absolutePaths: options.absolutePaths 24951 43161 };24952 -1 },24953 -1 './node_modules/core-js-pure/internals/call-with-safe-iteration-closing.js': function node_modulesCoreJsPureInternalsCallWithSafeIterationClosingJs(module, exports, __webpack_require__) {24954 -1 var anObject = __webpack_require__('./node_modules/core-js-pure/internals/an-object.js');24955 -1 module.exports = function(iterator, fn, value, ENTRIES) {24956 -1 try {24957 -1 return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);24958 -1 } catch (error) {24959 -1 var returnMethod = iterator['return'];24960 -1 if (returnMethod !== undefined) {24961 -1 anObject(returnMethod.call(iterator));24962 -1 }24963 -1 throw error;-1 43162 } -1 43163 var get_check_option_default = getCheckOption; -1 43164 function getRule(ruleId) { -1 43165 var rule3 = axe._audit.rules.find(function(rule4) { -1 43166 return rule4.id === ruleId; -1 43167 }); -1 43168 if (!rule3) { -1 43169 throw new Error('Cannot find rule by id: '.concat(ruleId)); -1 43170 } -1 43171 return rule3; -1 43172 } -1 43173 var get_rule_default = getRule; -1 43174 function getScroll(elm) { -1 43175 var buffer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; -1 43176 var overflowX = elm.scrollWidth > elm.clientWidth + buffer; -1 43177 var overflowY = elm.scrollHeight > elm.clientHeight + buffer; -1 43178 if (!(overflowX || overflowY)) { -1 43179 return; -1 43180 } -1 43181 var style = window.getComputedStyle(elm); -1 43182 var overflowXStyle = style.getPropertyValue('overflow-x'); -1 43183 var overflowYStyle = style.getPropertyValue('overflow-y'); -1 43184 var scrollableX = overflowXStyle !== 'visible' && overflowXStyle !== 'hidden'; -1 43185 var scrollableY = overflowYStyle !== 'visible' && overflowYStyle !== 'hidden'; -1 43186 if (overflowX && scrollableX || overflowY && scrollableY) { -1 43187 return { -1 43188 elm: elm, -1 43189 top: elm.scrollTop, -1 43190 left: elm.scrollLeft -1 43191 }; -1 43192 } -1 43193 } -1 43194 var get_scroll_default = getScroll; -1 43195 function getElmScrollRecursive(root) { -1 43196 return Array.from(root.children || root.childNodes || []).reduce(function(scrolls, elm) { -1 43197 var scroll = get_scroll_default(elm); -1 43198 if (scroll) { -1 43199 scrolls.push(scroll); -1 43200 } -1 43201 return scrolls.concat(getElmScrollRecursive(elm)); -1 43202 }, []); -1 43203 } -1 43204 function getScrollState() { -1 43205 var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window; -1 43206 var root = win.document.documentElement; -1 43207 var windowScroll = [ win.pageXOffset !== void 0 ? { -1 43208 elm: win, -1 43209 top: win.pageYOffset, -1 43210 left: win.pageXOffset -1 43211 } : { -1 43212 elm: root, -1 43213 top: root.scrollTop, -1 43214 left: root.scrollLeft -1 43215 } ]; -1 43216 return windowScroll.concat(getElmScrollRecursive(document.body)); -1 43217 } -1 43218 var get_scroll_state_default = getScrollState; -1 43219 function _getStandards() { -1 43220 return clone_default(standards_default); -1 43221 } -1 43222 function getStyleSheetFactory(dynamicDoc) { -1 43223 if (!dynamicDoc) { -1 43224 throw new Error('axe.utils.getStyleSheetFactory should be invoked with an argument'); -1 43225 } -1 43226 return function(options) { -1 43227 var data2 = 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; -1 43228 var style = dynamicDoc.createElement('style'); -1 43229 if (isLink) { -1 43230 var text32 = dynamicDoc.createTextNode('@import "'.concat(data2.href, '"')); -1 43231 style.appendChild(text32); -1 43232 } else { -1 43233 style.appendChild(dynamicDoc.createTextNode(data2)); 24964 43234 } -1 43235 dynamicDoc.head.appendChild(style); -1 43236 return { -1 43237 sheet: style.sheet, -1 43238 isCrossOrigin: isCrossOrigin, -1 43239 shadowId: shadowId, -1 43240 root: root, -1 43241 priority: priority -1 43242 }; 24965 43243 };24966 -1 },24967 -1 './node_modules/core-js-pure/internals/check-correctness-of-iteration.js': function node_modulesCoreJsPureInternalsCheckCorrectnessOfIterationJs(module, exports, __webpack_require__) {24968 -1 var wellKnownSymbol = __webpack_require__('./node_modules/core-js-pure/internals/well-known-symbol.js');24969 -1 var ITERATOR = wellKnownSymbol('iterator');24970 -1 var SAFE_CLOSING = false;-1 43244 } -1 43245 var get_stylesheet_factory_default = getStyleSheetFactory; -1 43246 var styleSheet; -1 43247 function injectStyle(style) { -1 43248 if (styleSheet && styleSheet.parentNode) { -1 43249 if (styleSheet.styleSheet === void 0) { -1 43250 styleSheet.appendChild(document.createTextNode(style)); -1 43251 } else { -1 43252 styleSheet.styleSheet.cssText += style; -1 43253 } -1 43254 return styleSheet; -1 43255 } -1 43256 if (!style) { -1 43257 return; -1 43258 } -1 43259 var head = document.head || document.getElementsByTagName('head')[0]; -1 43260 styleSheet = document.createElement('style'); -1 43261 styleSheet.type = 'text/css'; -1 43262 if (styleSheet.styleSheet === void 0) { -1 43263 styleSheet.appendChild(document.createTextNode(style)); -1 43264 } else { -1 43265 styleSheet.styleSheet.cssText = style; -1 43266 } -1 43267 head.appendChild(styleSheet); -1 43268 return styleSheet; -1 43269 } -1 43270 var inject_style_default = injectStyle; -1 43271 function isHidden(el, recursed) { -1 43272 var node = get_node_from_tree_default(el); -1 43273 if (el.nodeType === 9) { -1 43274 return false; -1 43275 } -1 43276 if (el.nodeType === 11) { -1 43277 el = el.host; -1 43278 } -1 43279 if (node && node._isHidden !== null) { -1 43280 return node._isHidden; -1 43281 } -1 43282 var style = window.getComputedStyle(el, null); -1 43283 if (!style || !el.parentNode || style.getPropertyValue('display') === 'none' || !recursed && style.getPropertyValue('visibility') === 'hidden' || el.getAttribute('aria-hidden') === 'true') { -1 43284 return true; -1 43285 } -1 43286 var parent = el.assignedSlot ? el.assignedSlot : el.parentNode; -1 43287 var hidden = isHidden(parent, true); -1 43288 if (node) { -1 43289 node._isHidden = hidden; -1 43290 } -1 43291 return hidden; -1 43292 } -1 43293 var is_hidden_default = isHidden; -1 43294 var htmlTags = [ 'a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'math', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rb', 'rp', 'rt', 'rtc', 'ruby', 's', 'samp', 'script', 'section', 'select', 'slot', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'svg', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr' ]; -1 43295 function isHtmlElement(node) { -1 43296 if (node.namespaceURI === 'http://www.w3.org/2000/svg') { -1 43297 return false; -1 43298 } -1 43299 return htmlTags.includes(node.nodeName.toLowerCase()); -1 43300 } -1 43301 var is_html_element_default = isHtmlElement; -1 43302 function getDeepest(collection) { -1 43303 return collection.sort(function(a, b) { -1 43304 if (contains_default(a, b)) { -1 43305 return 1; -1 43306 } -1 43307 return -1; -1 43308 })[0]; -1 43309 } -1 43310 function isNodeInContext(node, context3) { -1 43311 var include = context3.include && getDeepest(context3.include.filter(function(candidate) { -1 43312 return contains_default(candidate, node); -1 43313 })); -1 43314 var exclude = context3.exclude && getDeepest(context3.exclude.filter(function(candidate) { -1 43315 return contains_default(candidate, node); -1 43316 })); -1 43317 if (!exclude && include || exclude && contains_default(exclude, include)) { -1 43318 return true; -1 43319 } -1 43320 return false; -1 43321 } -1 43322 var is_node_in_context_default = isNodeInContext; -1 43323 var memoizee = __toModule(require_memoizee()); -1 43324 axe._memoizedFns = []; -1 43325 function memoizeImplementation(fn) { -1 43326 var memoized = memoizee['default'](fn); -1 43327 axe._memoizedFns.push(memoized); -1 43328 return memoized; -1 43329 } -1 43330 var memoize_default = memoizeImplementation; -1 43331 function nodeSorter(nodeA, nodeB) { -1 43332 nodeA = nodeA.actualNode || nodeA; -1 43333 nodeB = nodeB.actualNode || nodeB; -1 43334 if (nodeA === nodeB) { -1 43335 return 0; -1 43336 } -1 43337 if (nodeA.compareDocumentPosition(nodeB) & 4) { -1 43338 return -1; -1 43339 } else { -1 43340 return 1; -1 43341 } -1 43342 } -1 43343 var node_sorter_default = nodeSorter; -1 43344 function parseSameOriginStylesheet(sheet, options, priority, importedUrls) { -1 43345 var isCrossOrigin = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; -1 43346 var rules = Array.from(sheet.cssRules); -1 43347 if (!rules) { -1 43348 return Promise.resolve(); -1 43349 } -1 43350 var cssImportRules = rules.filter(function(r) { -1 43351 return r.type === 3; -1 43352 }); -1 43353 if (!cssImportRules.length) { -1 43354 return Promise.resolve({ -1 43355 isCrossOrigin: isCrossOrigin, -1 43356 priority: priority, -1 43357 root: options.rootNode, -1 43358 shadowId: options.shadowId, -1 43359 sheet: sheet -1 43360 }); -1 43361 } -1 43362 var cssImportUrlsNotAlreadyImported = cssImportRules.filter(function(rule3) { -1 43363 return rule3.href; -1 43364 }).map(function(rule3) { -1 43365 return rule3.href; -1 43366 }).filter(function(url) { -1 43367 return !importedUrls.includes(url); -1 43368 }); -1 43369 var promises = cssImportUrlsNotAlreadyImported.map(function(importUrl, cssRuleIndex) { -1 43370 var newPriority = [].concat(_toConsumableArray(priority), [ cssRuleIndex ]); -1 43371 var isCrossOriginRequest = /^https?:\/\/|^\/\//i.test(importUrl); -1 43372 return parse_crossorigin_stylesheet_default(importUrl, options, newPriority, importedUrls, isCrossOriginRequest); -1 43373 }); -1 43374 var nonImportCSSRules = rules.filter(function(r) { -1 43375 return r.type !== 3; -1 43376 }); -1 43377 if (!nonImportCSSRules.length) { -1 43378 return Promise.all(promises); -1 43379 } -1 43380 promises.push(Promise.resolve(options.convertDataToStylesheet({ -1 43381 data: nonImportCSSRules.map(function(rule3) { -1 43382 return rule3.cssText; -1 43383 }).join(), -1 43384 isCrossOrigin: isCrossOrigin, -1 43385 priority: priority, -1 43386 root: options.rootNode, -1 43387 shadowId: options.shadowId -1 43388 }))); -1 43389 return Promise.all(promises); -1 43390 } -1 43391 var parse_sameorigin_stylesheet_default = parseSameOriginStylesheet; -1 43392 function parseStylesheet(sheet, options, priority, importedUrls) { -1 43393 var isCrossOrigin = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; -1 43394 var isSameOrigin = isSameOriginStylesheet(sheet); -1 43395 if (isSameOrigin) { -1 43396 return parse_sameorigin_stylesheet_default(sheet, options, priority, importedUrls, isCrossOrigin); -1 43397 } -1 43398 return parse_crossorigin_stylesheet_default(sheet.href, options, priority, importedUrls, true); -1 43399 } -1 43400 function isSameOriginStylesheet(sheet) { 24971 43401 try {24972 -1 var called = 0;24973 -1 var iteratorWithReturn = {24974 -1 next: function next() {24975 -1 return {24976 -1 done: !!called++24977 -1 };24978 -1 },24979 -1 return: function _return() {24980 -1 SAFE_CLOSING = true;24981 -1 }24982 -1 };24983 -1 iteratorWithReturn[ITERATOR] = function() {24984 -1 return this;24985 -1 };24986 -1 Array.from(iteratorWithReturn, function() {24987 -1 throw 2;24988 -1 });24989 -1 } catch (error) {}24990 -1 module.exports = function(exec, SKIP_CLOSING) {24991 -1 if (!SKIP_CLOSING && !SAFE_CLOSING) {-1 43402 var rules = sheet.cssRules; -1 43403 if (!rules && sheet.href) { 24992 43404 return false; 24993 43405 }24994 -1 var ITERATION_SUPPORT = false;24995 -1 try {24996 -1 var object = {};24997 -1 object[ITERATOR] = function() {24998 -1 return {24999 -1 next: function next() {25000 -1 return {25001 -1 done: ITERATION_SUPPORT = true25002 -1 };25003 -1 }25004 -1 };25005 -1 };25006 -1 exec(object);25007 -1 } catch (error) {}25008 -1 return ITERATION_SUPPORT;25009 -1 };25010 -1 },25011 -1 './node_modules/core-js-pure/internals/classof-raw.js': function node_modulesCoreJsPureInternalsClassofRawJs(module, exports) {25012 -1 var toString = {}.toString;25013 -1 module.exports = function(it) {25014 -1 return toString.call(it).slice(8, -1);25015 -1 };25016 -1 },25017 -1 './node_modules/core-js-pure/internals/classof.js': function node_modulesCoreJsPureInternalsClassofJs(module, exports, __webpack_require__) {25018 -1 var TO_STRING_TAG_SUPPORT = __webpack_require__('./node_modules/core-js-pure/internals/to-string-tag-support.js');25019 -1 var classofRaw = __webpack_require__('./node_modules/core-js-pure/internals/classof-raw.js');25020 -1 var wellKnownSymbol = __webpack_require__('./node_modules/core-js-pure/internals/well-known-symbol.js');25021 -1 var TO_STRING_TAG = wellKnownSymbol('toStringTag');25022 -1 var CORRECT_ARGUMENTS = classofRaw(function() {25023 -1 return arguments;25024 -1 }()) == 'Arguments';25025 -1 var tryGet = function tryGet(it, key) {25026 -1 try {25027 -1 return it[key];25028 -1 } catch (error) {}25029 -1 };25030 -1 module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function(it) {25031 -1 var O, tag, result;25032 -1 return it === undefined ? 'Undefined' : it === null ? 'Null' : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;25033 -1 };25034 -1 },25035 -1 './node_modules/core-js-pure/internals/collection-weak.js': function node_modulesCoreJsPureInternalsCollectionWeakJs(module, exports, __webpack_require__) {25036 -1 'use strict';25037 -1 var redefineAll = __webpack_require__('./node_modules/core-js-pure/internals/redefine-all.js');25038 -1 var getWeakData = __webpack_require__('./node_modules/core-js-pure/internals/internal-metadata.js').getWeakData;25039 -1 var anObject = __webpack_require__('./node_modules/core-js-pure/internals/an-object.js');25040 -1 var isObject = __webpack_require__('./node_modules/core-js-pure/internals/is-object.js');25041 -1 var anInstance = __webpack_require__('./node_modules/core-js-pure/internals/an-instance.js');25042 -1 var iterate = __webpack_require__('./node_modules/core-js-pure/internals/iterate.js');25043 -1 var ArrayIterationModule = __webpack_require__('./node_modules/core-js-pure/internals/array-iteration.js');25044 -1 var $has = __webpack_require__('./node_modules/core-js-pure/internals/has.js');25045 -1 var InternalStateModule = __webpack_require__('./node_modules/core-js-pure/internals/internal-state.js');25046 -1 var setInternalState = InternalStateModule.set;25047 -1 var internalStateGetterFor = InternalStateModule.getterFor;25048 -1 var find = ArrayIterationModule.find;25049 -1 var findIndex = ArrayIterationModule.findIndex;25050 -1 var id = 0;25051 -1 var uncaughtFrozenStore = function uncaughtFrozenStore(store) {25052 -1 return store.frozen || (store.frozen = new UncaughtFrozenStore());25053 -1 };25054 -1 var UncaughtFrozenStore = function UncaughtFrozenStore() {25055 -1 this.entries = [];25056 -1 };25057 -1 var findUncaughtFrozen = function findUncaughtFrozen(store, key) {25058 -1 return find(store.entries, function(it) {25059 -1 return it[0] === key;-1 43406 return true; -1 43407 } catch (e) { -1 43408 return false; -1 43409 } -1 43410 } -1 43411 var parse_stylesheet_default = parseStylesheet; -1 43412 function parseCrossOriginStylesheet(url, options, priority, importedUrls, isCrossOrigin) { -1 43413 importedUrls.push(url); -1 43414 return new Promise(function(resolve, reject) { -1 43415 var request = new XMLHttpRequest(); -1 43416 request.open('GET', url); -1 43417 request.timeout = constants_default.preload.timeout; -1 43418 request.addEventListener('error', reject); -1 43419 request.addEventListener('timeout', reject); -1 43420 request.addEventListener('loadend', function(event) { -1 43421 if (event.loaded && request.responseText) { -1 43422 return resolve(request.responseText); -1 43423 } -1 43424 reject(request.responseText); 25060 43425 });25061 -1 };25062 -1 UncaughtFrozenStore.prototype = {25063 -1 get: function get(key) {25064 -1 var entry = findUncaughtFrozen(this, key);25065 -1 if (entry) {25066 -1 return entry[1];25067 -1 }-1 43426 request.send(); -1 43427 }).then(function(data2) { -1 43428 var result = options.convertDataToStylesheet({ -1 43429 data: data2, -1 43430 isCrossOrigin: isCrossOrigin, -1 43431 priority: priority, -1 43432 root: options.rootNode, -1 43433 shadowId: options.shadowId -1 43434 }); -1 43435 return parse_stylesheet_default(result.sheet, options, priority, importedUrls, result.isCrossOrigin); -1 43436 }); -1 43437 } -1 43438 var parse_crossorigin_stylesheet_default = parseCrossOriginStylesheet; -1 43439 var performanceTimer = function() { -1 43440 function now() { -1 43441 if (window.performance && window.performance) { -1 43442 return window.performance.now(); -1 43443 } -1 43444 } -1 43445 var originalTime = null; -1 43446 var lastRecordedTime = now(); -1 43447 return { -1 43448 start: function start() { -1 43449 this.mark('mark_axe_start'); 25068 43450 },25069 -1 has: function has(key) {25070 -1 return !!findUncaughtFrozen(this, key);-1 43451 end: function end() { -1 43452 this.mark('mark_axe_end'); -1 43453 this.measure('axe', 'mark_axe_start', 'mark_axe_end'); -1 43454 this.logMeasures('axe'); 25071 43455 },25072 -1 set: function set(key, value) {25073 -1 var entry = findUncaughtFrozen(this, key);25074 -1 if (entry) {25075 -1 entry[1] = value;25076 -1 } else {25077 -1 this.entries.push([ key, value ]);-1 43456 auditStart: function auditStart() { -1 43457 this.mark('mark_audit_start'); -1 43458 }, -1 43459 auditEnd: function auditEnd() { -1 43460 this.mark('mark_audit_end'); -1 43461 this.measure('audit_start_to_end', 'mark_audit_start', 'mark_audit_end'); -1 43462 this.logMeasures(); -1 43463 }, -1 43464 mark: function mark(markName) { -1 43465 if (window.performance && window.performance.mark !== void 0) { -1 43466 window.performance.mark(markName); 25078 43467 } 25079 43468 },25080 -1 delete: function _delete(key) {25081 -1 var index = findIndex(this.entries, function(it) {25082 -1 return it[0] === key;25083 -1 });25084 -1 if (~index) {25085 -1 this.entries.splice(index, 1);-1 43469 measure: function measure(measureName, startMark, endMark) { -1 43470 if (window.performance && window.performance.measure !== void 0) { -1 43471 window.performance.measure(measureName, startMark, endMark); 25086 43472 }25087 -1 return !!~index;25088 -1 }25089 -1 };25090 -1 module.exports = {25091 -1 getConstructor: function getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {25092 -1 var C = wrapper(function(that, iterable) {25093 -1 anInstance(that, C, CONSTRUCTOR_NAME);25094 -1 setInternalState(that, {25095 -1 type: CONSTRUCTOR_NAME,25096 -1 id: id++,25097 -1 frozen: undefined-1 43473 }, -1 43474 logMeasures: function logMeasures(measureName) { -1 43475 function logMeasure(req2) { -1 43476 log_default('Measure ' + req2.name + ' took ' + req2.duration + 'ms'); -1 43477 } -1 43478 if (window.performance && window.performance.getEntriesByType !== void 0) { -1 43479 var axeStart = window.performance.getEntriesByName('mark_axe_start')[0]; -1 43480 var measures = window.performance.getEntriesByType('measure').filter(function(measure) { -1 43481 return measure.startTime >= axeStart.startTime; 25098 43482 });25099 -1 if (iterable != undefined) {25100 -1 iterate(iterable, that[ADDER], that, IS_MAP);25101 -1 }25102 -1 });25103 -1 var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);25104 -1 var define = function define(that, key, value) {25105 -1 var state = getInternalState(that);25106 -1 var data = getWeakData(anObject(key), true);25107 -1 if (data === true) {25108 -1 uncaughtFrozenStore(state).set(key, value);25109 -1 } else {25110 -1 data[state.id] = value;25111 -1 }25112 -1 return that;25113 -1 };25114 -1 redefineAll(C.prototype, {25115 -1 delete: function _delete(key) {25116 -1 var state = getInternalState(this);25117 -1 if (!isObject(key)) {25118 -1 return false;25119 -1 }25120 -1 var data = getWeakData(key);25121 -1 if (data === true) {25122 -1 return uncaughtFrozenStore(state)['delete'](key);25123 -1 }25124 -1 return data && $has(data, state.id) && delete data[state.id];25125 -1 },25126 -1 has: function has(key) {25127 -1 var state = getInternalState(this);25128 -1 if (!isObject(key)) {25129 -1 return false;25130 -1 }25131 -1 var data = getWeakData(key);25132 -1 if (data === true) {25133 -1 return uncaughtFrozenStore(state).has(key);25134 -1 }25135 -1 return data && $has(data, state.id);25136 -1 }25137 -1 });25138 -1 redefineAll(C.prototype, IS_MAP ? {25139 -1 get: function get(key) {25140 -1 var state = getInternalState(this);25141 -1 if (isObject(key)) {25142 -1 var data = getWeakData(key);25143 -1 if (data === true) {25144 -1 return uncaughtFrozenStore(state).get(key);25145 -1 }25146 -1 return data ? data[state.id] : undefined;-1 43483 for (var i = 0; i < measures.length; ++i) { -1 43484 var req = measures[i]; -1 43485 if (req.name === measureName) { -1 43486 logMeasure(req); -1 43487 return; 25147 43488 }25148 -1 },25149 -1 set: function set(key, value) {25150 -1 return define(this, key, value);-1 43489 logMeasure(req); 25151 43490 }25152 -1 } : {25153 -1 add: function add(value) {25154 -1 return define(this, value, true);25155 -1 }25156 -1 });25157 -1 return C;-1 43491 } -1 43492 }, -1 43493 timeElapsed: function timeElapsed() { -1 43494 return now() - lastRecordedTime; -1 43495 }, -1 43496 reset: function reset() { -1 43497 if (!originalTime) { -1 43498 originalTime = now(); -1 43499 } -1 43500 lastRecordedTime = now(); 25158 43501 } 25159 43502 };25160 -1 },25161 -1 './node_modules/core-js-pure/internals/collection.js': function node_modulesCoreJsPureInternalsCollectionJs(module, exports, __webpack_require__) {25162 -1 'use strict';25163 -1 var $ = __webpack_require__('./node_modules/core-js-pure/internals/export.js');25164 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');25165 -1 var InternalMetadataModule = __webpack_require__('./node_modules/core-js-pure/internals/internal-metadata.js');25166 -1 var fails = __webpack_require__('./node_modules/core-js-pure/internals/fails.js');25167 -1 var createNonEnumerableProperty = __webpack_require__('./node_modules/core-js-pure/internals/create-non-enumerable-property.js');25168 -1 var iterate = __webpack_require__('./node_modules/core-js-pure/internals/iterate.js');25169 -1 var anInstance = __webpack_require__('./node_modules/core-js-pure/internals/an-instance.js');25170 -1 var isObject = __webpack_require__('./node_modules/core-js-pure/internals/is-object.js');25171 -1 var setToStringTag = __webpack_require__('./node_modules/core-js-pure/internals/set-to-string-tag.js');25172 -1 var defineProperty = __webpack_require__('./node_modules/core-js-pure/internals/object-define-property.js').f;25173 -1 var forEach = __webpack_require__('./node_modules/core-js-pure/internals/array-iteration.js').forEach;25174 -1 var DESCRIPTORS = __webpack_require__('./node_modules/core-js-pure/internals/descriptors.js');25175 -1 var InternalStateModule = __webpack_require__('./node_modules/core-js-pure/internals/internal-state.js');25176 -1 var setInternalState = InternalStateModule.set;25177 -1 var internalStateGetterFor = InternalStateModule.getterFor;25178 -1 module.exports = function(CONSTRUCTOR_NAME, wrapper, common) {25179 -1 var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;25180 -1 var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;25181 -1 var ADDER = IS_MAP ? 'set' : 'add';25182 -1 var NativeConstructor = global[CONSTRUCTOR_NAME];25183 -1 var NativePrototype = NativeConstructor && NativeConstructor.prototype;25184 -1 var exported = {};25185 -1 var Constructor;25186 -1 if (!DESCRIPTORS || typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function() {25187 -1 new NativeConstructor().entries().next();25188 -1 }))) {25189 -1 Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);25190 -1 InternalMetadataModule.REQUIRED = true;25191 -1 } else {25192 -1 Constructor = wrapper(function(target, iterable) {25193 -1 setInternalState(anInstance(target, Constructor, CONSTRUCTOR_NAME), {25194 -1 type: CONSTRUCTOR_NAME,25195 -1 collection: new NativeConstructor()25196 -1 });25197 -1 if (iterable != undefined) {25198 -1 iterate(iterable, target[ADDER], target, IS_MAP);25199 -1 }25200 -1 });25201 -1 var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);25202 -1 forEach([ 'add', 'clear', 'delete', 'forEach', 'get', 'has', 'set', 'keys', 'values', 'entries' ], function(KEY) {25203 -1 var IS_ADDER = KEY == 'add' || KEY == 'set';25204 -1 if (KEY in NativePrototype && !(IS_WEAK && KEY == 'clear')) {25205 -1 createNonEnumerableProperty(Constructor.prototype, KEY, function(a, b) {25206 -1 var collection = getInternalState(this).collection;25207 -1 if (!IS_ADDER && IS_WEAK && !isObject(a)) {25208 -1 return KEY == 'get' ? undefined : false;-1 43503 }(); -1 43504 var performance_timer_default = performanceTimer; -1 43505 if (typeof Object.assign !== 'function') { -1 43506 (function() { -1 43507 Object.assign = function(target) { -1 43508 if (target === void 0 || target === null) { -1 43509 throw new TypeError('Cannot convert undefined or null to object'); -1 43510 } -1 43511 var output = Object(target); -1 43512 for (var index = 1; index < arguments.length; index++) { -1 43513 var source = arguments[index]; -1 43514 if (source !== void 0 && source !== null) { -1 43515 for (var nextKey in source) { -1 43516 if (source.hasOwnProperty(nextKey)) { -1 43517 output[nextKey] = source[nextKey]; 25209 43518 }25210 -1 var result = collection[KEY](a === 0 ? 0 : a, b);25211 -1 return IS_ADDER ? this : result;25212 -1 });25213 -1 }25214 -1 });25215 -1 IS_WEAK || defineProperty(Constructor.prototype, 'size', {25216 -1 configurable: true,25217 -1 get: function get() {25218 -1 return getInternalState(this).collection.size;25219 -1 }25220 -1 });25221 -1 }25222 -1 setToStringTag(Constructor, CONSTRUCTOR_NAME, false, true);25223 -1 exported[CONSTRUCTOR_NAME] = Constructor;25224 -1 $({25225 -1 global: true,25226 -1 forced: true25227 -1 }, exported);25228 -1 if (!IS_WEAK) {25229 -1 common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);25230 -1 }25231 -1 return Constructor;25232 -1 };25233 -1 },25234 -1 './node_modules/core-js-pure/internals/correct-prototype-getter.js': function node_modulesCoreJsPureInternalsCorrectPrototypeGetterJs(module, exports, __webpack_require__) {25235 -1 var fails = __webpack_require__('./node_modules/core-js-pure/internals/fails.js');25236 -1 module.exports = !fails(function() {25237 -1 function F() {}25238 -1 F.prototype.constructor = null;25239 -1 return Object.getPrototypeOf(new F()) !== F.prototype;25240 -1 });25241 -1 },25242 -1 './node_modules/core-js-pure/internals/create-iterator-constructor.js': function node_modulesCoreJsPureInternalsCreateIteratorConstructorJs(module, exports, __webpack_require__) {25243 -1 'use strict';25244 -1 var IteratorPrototype = __webpack_require__('./node_modules/core-js-pure/internals/iterators-core.js').IteratorPrototype;25245 -1 var create = __webpack_require__('./node_modules/core-js-pure/internals/object-create.js');25246 -1 var createPropertyDescriptor = __webpack_require__('./node_modules/core-js-pure/internals/create-property-descriptor.js');25247 -1 var setToStringTag = __webpack_require__('./node_modules/core-js-pure/internals/set-to-string-tag.js');25248 -1 var Iterators = __webpack_require__('./node_modules/core-js-pure/internals/iterators.js');25249 -1 var returnThis = function returnThis() {25250 -1 return this;25251 -1 };25252 -1 module.exports = function(IteratorConstructor, NAME, next) {25253 -1 var TO_STRING_TAG = NAME + ' Iterator';25254 -1 IteratorConstructor.prototype = create(IteratorPrototype, {25255 -1 next: createPropertyDescriptor(1, next)25256 -1 });25257 -1 setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);25258 -1 Iterators[TO_STRING_TAG] = returnThis;25259 -1 return IteratorConstructor;25260 -1 };25261 -1 },25262 -1 './node_modules/core-js-pure/internals/create-non-enumerable-property.js': function node_modulesCoreJsPureInternalsCreateNonEnumerablePropertyJs(module, exports, __webpack_require__) {25263 -1 var DESCRIPTORS = __webpack_require__('./node_modules/core-js-pure/internals/descriptors.js');25264 -1 var definePropertyModule = __webpack_require__('./node_modules/core-js-pure/internals/object-define-property.js');25265 -1 var createPropertyDescriptor = __webpack_require__('./node_modules/core-js-pure/internals/create-property-descriptor.js');25266 -1 module.exports = DESCRIPTORS ? function(object, key, value) {25267 -1 return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));25268 -1 } : function(object, key, value) {25269 -1 object[key] = value;25270 -1 return object;25271 -1 };25272 -1 },25273 -1 './node_modules/core-js-pure/internals/create-property-descriptor.js': function node_modulesCoreJsPureInternalsCreatePropertyDescriptorJs(module, exports) {25274 -1 module.exports = function(bitmap, value) {25275 -1 return {25276 -1 enumerable: !(bitmap & 1),25277 -1 configurable: !(bitmap & 2),25278 -1 writable: !(bitmap & 4),25279 -1 value: value25280 -1 };25281 -1 };25282 -1 },25283 -1 './node_modules/core-js-pure/internals/define-iterator.js': function node_modulesCoreJsPureInternalsDefineIteratorJs(module, exports, __webpack_require__) {25284 -1 'use strict';25285 -1 var $ = __webpack_require__('./node_modules/core-js-pure/internals/export.js');25286 -1 var createIteratorConstructor = __webpack_require__('./node_modules/core-js-pure/internals/create-iterator-constructor.js');25287 -1 var getPrototypeOf = __webpack_require__('./node_modules/core-js-pure/internals/object-get-prototype-of.js');25288 -1 var setPrototypeOf = __webpack_require__('./node_modules/core-js-pure/internals/object-set-prototype-of.js');25289 -1 var setToStringTag = __webpack_require__('./node_modules/core-js-pure/internals/set-to-string-tag.js');25290 -1 var createNonEnumerableProperty = __webpack_require__('./node_modules/core-js-pure/internals/create-non-enumerable-property.js');25291 -1 var redefine = __webpack_require__('./node_modules/core-js-pure/internals/redefine.js');25292 -1 var wellKnownSymbol = __webpack_require__('./node_modules/core-js-pure/internals/well-known-symbol.js');25293 -1 var IS_PURE = __webpack_require__('./node_modules/core-js-pure/internals/is-pure.js');25294 -1 var Iterators = __webpack_require__('./node_modules/core-js-pure/internals/iterators.js');25295 -1 var IteratorsCore = __webpack_require__('./node_modules/core-js-pure/internals/iterators-core.js');25296 -1 var IteratorPrototype = IteratorsCore.IteratorPrototype;25297 -1 var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;25298 -1 var ITERATOR = wellKnownSymbol('iterator');25299 -1 var KEYS = 'keys';25300 -1 var VALUES = 'values';25301 -1 var ENTRIES = 'entries';25302 -1 var returnThis = function returnThis() {25303 -1 return this;25304 -1 };25305 -1 module.exports = function(Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {25306 -1 createIteratorConstructor(IteratorConstructor, NAME, next);25307 -1 var getIterationMethod = function getIterationMethod(KIND) {25308 -1 if (KIND === DEFAULT && defaultIterator) {25309 -1 return defaultIterator;25310 -1 }25311 -1 if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) {25312 -1 return IterablePrototype[KIND];25313 -1 }25314 -1 switch (KIND) {25315 -1 case KEYS:25316 -1 return function keys() {25317 -1 return new IteratorConstructor(this, KIND);25318 -1 };25319 -125320 -1 case VALUES:25321 -1 return function values() {25322 -1 return new IteratorConstructor(this, KIND);25323 -1 };25324 -125325 -1 case ENTRIES:25326 -1 return function entries() {25327 -1 return new IteratorConstructor(this, KIND);25328 -1 };25329 -1 }25330 -1 return function() {25331 -1 return new IteratorConstructor(this);25332 -1 };25333 -1 };25334 -1 var TO_STRING_TAG = NAME + ' Iterator';25335 -1 var INCORRECT_VALUES_NAME = false;25336 -1 var IterablePrototype = Iterable.prototype;25337 -1 var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT];25338 -1 var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);25339 -1 var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;25340 -1 var CurrentIteratorPrototype, methods, KEY;25341 -1 if (anyNativeIterator) {25342 -1 CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));25343 -1 if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {25344 -1 if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {25345 -1 if (setPrototypeOf) {25346 -1 setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);25347 -1 } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {25348 -1 createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);25349 43519 } 25350 43520 }25351 -1 setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);25352 -1 if (IS_PURE) {25353 -1 Iterators[TO_STRING_TAG] = returnThis;25354 -1 }25355 43521 }25356 -1 }25357 -1 if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {25358 -1 INCORRECT_VALUES_NAME = true;25359 -1 defaultIterator = function values() {25360 -1 return nativeIterator.call(this);25361 -1 };25362 -1 }25363 -1 if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {25364 -1 createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);25365 -1 }25366 -1 Iterators[NAME] = defaultIterator;25367 -1 if (DEFAULT) {25368 -1 methods = {25369 -1 values: getIterationMethod(VALUES),25370 -1 keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),25371 -1 entries: getIterationMethod(ENTRIES)25372 -1 };25373 -1 if (FORCED) {25374 -1 for (KEY in methods) {25375 -1 if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {25376 -1 redefine(IterablePrototype, KEY, methods[KEY]);25377 -1 }-1 43522 return output; -1 43523 }; -1 43524 })(); -1 43525 } -1 43526 if (!Array.prototype.find) { -1 43527 Object.defineProperty(Array.prototype, 'find', { -1 43528 value: function value(predicate) { -1 43529 if (this === null) { -1 43530 throw new TypeError('Array.prototype.find called on null or undefined'); -1 43531 } -1 43532 if (typeof predicate !== 'function') { -1 43533 throw new TypeError('predicate must be a function'); -1 43534 } -1 43535 var list = Object(this); -1 43536 var length = list.length >>> 0; -1 43537 var thisArg = arguments[1]; -1 43538 var value; -1 43539 for (var i = 0; i < length; i++) { -1 43540 value = list[i]; -1 43541 if (predicate.call(thisArg, value, i, list)) { -1 43542 return value; 25378 43543 }25379 -1 } else {25380 -1 $({25381 -1 target: NAME,25382 -1 proto: true,25383 -1 forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME25384 -1 }, methods);25385 43544 } -1 43545 return void 0; 25386 43546 }25387 -1 return methods;25388 -1 };25389 -1 },25390 -1 './node_modules/core-js-pure/internals/descriptors.js': function node_modulesCoreJsPureInternalsDescriptorsJs(module, exports, __webpack_require__) {25391 -1 var fails = __webpack_require__('./node_modules/core-js-pure/internals/fails.js');25392 -1 module.exports = !fails(function() {25393 -1 return Object.defineProperty({}, 1, {25394 -1 get: function get() {25395 -1 return 7;25396 -1 }25397 -1 })[1] != 7;25398 43547 });25399 -1 },25400 -1 './node_modules/core-js-pure/internals/document-create-element.js': function node_modulesCoreJsPureInternalsDocumentCreateElementJs(module, exports, __webpack_require__) {25401 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');25402 -1 var isObject = __webpack_require__('./node_modules/core-js-pure/internals/is-object.js');25403 -1 var document = global.document;25404 -1 var EXISTS = isObject(document) && isObject(document.createElement);25405 -1 module.exports = function(it) {25406 -1 return EXISTS ? document.createElement(it) : {};25407 -1 };25408 -1 },25409 -1 './node_modules/core-js-pure/internals/dom-iterables.js': function node_modulesCoreJsPureInternalsDomIterablesJs(module, exports) {25410 -1 module.exports = {25411 -1 CSSRuleList: 0,25412 -1 CSSStyleDeclaration: 0,25413 -1 CSSValueList: 0,25414 -1 ClientRectList: 0,25415 -1 DOMRectList: 0,25416 -1 DOMStringList: 0,25417 -1 DOMTokenList: 1,25418 -1 DataTransferItemList: 0,25419 -1 FileList: 0,25420 -1 HTMLAllCollection: 0,25421 -1 HTMLCollection: 0,25422 -1 HTMLFormElement: 0,25423 -1 HTMLSelectElement: 0,25424 -1 MediaList: 0,25425 -1 MimeTypeArray: 0,25426 -1 NamedNodeMap: 0,25427 -1 NodeList: 1,25428 -1 PaintRequestList: 0,25429 -1 Plugin: 0,25430 -1 PluginArray: 0,25431 -1 SVGLengthList: 0,25432 -1 SVGNumberList: 0,25433 -1 SVGPathSegList: 0,25434 -1 SVGPointList: 0,25435 -1 SVGStringList: 0,25436 -1 SVGTransformList: 0,25437 -1 SourceBufferList: 0,25438 -1 StyleSheetList: 0,25439 -1 TextTrackCueList: 0,25440 -1 TextTrackList: 0,25441 -1 TouchList: 025442 -1 };25443 -1 },25444 -1 './node_modules/core-js-pure/internals/engine-is-ios.js': function node_modulesCoreJsPureInternalsEngineIsIosJs(module, exports, __webpack_require__) {25445 -1 var userAgent = __webpack_require__('./node_modules/core-js-pure/internals/engine-user-agent.js');25446 -1 module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);25447 -1 },25448 -1 './node_modules/core-js-pure/internals/engine-user-agent.js': function node_modulesCoreJsPureInternalsEngineUserAgentJs(module, exports, __webpack_require__) {25449 -1 var getBuiltIn = __webpack_require__('./node_modules/core-js-pure/internals/get-built-in.js');25450 -1 module.exports = getBuiltIn('navigator', 'userAgent') || '';25451 -1 },25452 -1 './node_modules/core-js-pure/internals/engine-v8-version.js': function node_modulesCoreJsPureInternalsEngineV8VersionJs(module, exports, __webpack_require__) {25453 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');25454 -1 var userAgent = __webpack_require__('./node_modules/core-js-pure/internals/engine-user-agent.js');25455 -1 var process = global.process;25456 -1 var versions = process && process.versions;25457 -1 var v8 = versions && versions.v8;25458 -1 var match, version;25459 -1 if (v8) {25460 -1 match = v8.split('.');25461 -1 version = match[0] + match[1];25462 -1 } else if (userAgent) {25463 -1 match = userAgent.match(/Edge\/(\d+)/);25464 -1 if (!match || match[1] >= 74) {25465 -1 match = userAgent.match(/Chrome\/(\d+)/);25466 -1 if (match) {25467 -1 version = match[1];25468 -1 }25469 -1 }25470 -1 }25471 -1 module.exports = version && +version;25472 -1 },25473 -1 './node_modules/core-js-pure/internals/enum-bug-keys.js': function node_modulesCoreJsPureInternalsEnumBugKeysJs(module, exports) {25474 -1 module.exports = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ];25475 -1 },25476 -1 './node_modules/core-js-pure/internals/export.js': function node_modulesCoreJsPureInternalsExportJs(module, exports, __webpack_require__) {25477 -1 'use strict';25478 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');25479 -1 var getOwnPropertyDescriptor = __webpack_require__('./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js').f;25480 -1 var isForced = __webpack_require__('./node_modules/core-js-pure/internals/is-forced.js');25481 -1 var path = __webpack_require__('./node_modules/core-js-pure/internals/path.js');25482 -1 var bind = __webpack_require__('./node_modules/core-js-pure/internals/function-bind-context.js');25483 -1 var createNonEnumerableProperty = __webpack_require__('./node_modules/core-js-pure/internals/create-non-enumerable-property.js');25484 -1 var has = __webpack_require__('./node_modules/core-js-pure/internals/has.js');25485 -1 var wrapConstructor = function wrapConstructor(NativeConstructor) {25486 -1 var Wrapper = function Wrapper(a, b, c) {25487 -1 if (this instanceof NativeConstructor) {25488 -1 switch (arguments.length) {25489 -1 case 0:25490 -1 return new NativeConstructor();25491 -125492 -1 case 1:25493 -1 return new NativeConstructor(a);25494 -125495 -1 case 2:25496 -1 return new NativeConstructor(a, b);25497 -1 }25498 -1 return new NativeConstructor(a, b, c);25499 -1 }25500 -1 return NativeConstructor.apply(this, arguments);25501 -1 };25502 -1 Wrapper.prototype = NativeConstructor.prototype;25503 -1 return Wrapper;25504 -1 };25505 -1 module.exports = function(options, source) {25506 -1 var TARGET = options.target;25507 -1 var GLOBAL = options.global;25508 -1 var STATIC = options.stat;25509 -1 var PROTO = options.proto;25510 -1 var nativeSource = GLOBAL ? global : STATIC ? global[TARGET] : (global[TARGET] || {}).prototype;25511 -1 var target = GLOBAL ? path : path[TARGET] || (path[TARGET] = {});25512 -1 var targetPrototype = target.prototype;25513 -1 var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;25514 -1 var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;25515 -1 for (key in source) {25516 -1 FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);25517 -1 USE_NATIVE = !FORCED && nativeSource && has(nativeSource, key);25518 -1 targetProperty = target[key];25519 -1 if (USE_NATIVE) {25520 -1 if (options.noTargetGet) {25521 -1 descriptor = getOwnPropertyDescriptor(nativeSource, key);25522 -1 nativeProperty = descriptor && descriptor.value;25523 -1 } else {25524 -1 nativeProperty = nativeSource[key];25525 -1 }25526 -1 }25527 -1 sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key];25528 -1 if (USE_NATIVE && _typeof(targetProperty) === _typeof(sourceProperty)) {25529 -1 continue;25530 -1 }25531 -1 if (options.bind && USE_NATIVE) {25532 -1 resultProperty = bind(sourceProperty, global);25533 -1 } else if (options.wrap && USE_NATIVE) {25534 -1 resultProperty = wrapConstructor(sourceProperty);25535 -1 } else if (PROTO && typeof sourceProperty == 'function') {25536 -1 resultProperty = bind(Function.call, sourceProperty);25537 -1 } else {25538 -1 resultProperty = sourceProperty;-1 43548 } -1 43549 if (!Array.prototype.findIndex) { -1 43550 Object.defineProperty(Array.prototype, 'findIndex', { -1 43551 value: function value(predicate, thisArg) { -1 43552 if (this === null) { -1 43553 throw new TypeError('Array.prototype.find called on null or undefined'); 25539 43554 }25540 -1 if (options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) {25541 -1 createNonEnumerableProperty(resultProperty, 'sham', true);-1 43555 if (typeof predicate !== 'function') { -1 43556 throw new TypeError('predicate must be a function'); 25542 43557 }25543 -1 target[key] = resultProperty;25544 -1 if (PROTO) {25545 -1 VIRTUAL_PROTOTYPE = TARGET + 'Prototype';25546 -1 if (!has(path, VIRTUAL_PROTOTYPE)) {25547 -1 createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});25548 -1 }25549 -1 path[VIRTUAL_PROTOTYPE][key] = sourceProperty;25550 -1 if (options.real && targetPrototype && !targetPrototype[key]) {25551 -1 createNonEnumerableProperty(targetPrototype, key, sourceProperty);-1 43558 var list = Object(this); -1 43559 var length = list.length >>> 0; -1 43560 var value; -1 43561 for (var i = 0; i < length; i++) { -1 43562 value = list[i]; -1 43563 if (predicate.call(thisArg, value, i, list)) { -1 43564 return i; 25552 43565 } 25553 43566 } -1 43567 return -1; 25554 43568 }25555 -1 };25556 -1 },25557 -1 './node_modules/core-js-pure/internals/fails.js': function node_modulesCoreJsPureInternalsFailsJs(module, exports) {25558 -1 module.exports = function(exec) {25559 -1 try {25560 -1 return !!exec();25561 -1 } catch (error) {25562 -1 return true;25563 -1 }25564 -1 };25565 -1 },25566 -1 './node_modules/core-js-pure/internals/freezing.js': function node_modulesCoreJsPureInternalsFreezingJs(module, exports, __webpack_require__) {25567 -1 var fails = __webpack_require__('./node_modules/core-js-pure/internals/fails.js');25568 -1 module.exports = !fails(function() {25569 -1 return Object.isExtensible(Object.preventExtensions({}));25570 43569 });25571 -1 },25572 -1 './node_modules/core-js-pure/internals/function-bind-context.js': function node_modulesCoreJsPureInternalsFunctionBindContextJs(module, exports, __webpack_require__) {25573 -1 var aFunction = __webpack_require__('./node_modules/core-js-pure/internals/a-function.js');25574 -1 module.exports = function(fn, that, length) {25575 -1 aFunction(fn);25576 -1 if (that === undefined) {25577 -1 return fn;25578 -1 }25579 -1 switch (length) {25580 -1 case 0:25581 -1 return function() {25582 -1 return fn.call(that);25583 -1 };25584 -125585 -1 case 1:25586 -1 return function(a) {25587 -1 return fn.call(that, a);25588 -1 };25589 -125590 -1 case 2:25591 -1 return function(a, b) {25592 -1 return fn.call(that, a, b);25593 -1 };25594 -125595 -1 case 3:25596 -1 return function(a, b, c) {25597 -1 return fn.call(that, a, b, c);25598 -1 };-1 43570 } -1 43571 function _pollyfillElementsFromPoint() { -1 43572 if (document.elementsFromPoint) { -1 43573 return document.elementsFromPoint; -1 43574 } -1 43575 if (document.msElementsFromPoint) { -1 43576 return document.msElementsFromPoint; -1 43577 } -1 43578 var usePointer = function() { -1 43579 var element = document.createElement('x'); -1 43580 element.style.cssText = 'pointer-events:auto'; -1 43581 return element.style.pointerEvents === 'auto'; -1 43582 }(); -1 43583 var cssProp = usePointer ? 'pointer-events' : 'visibility'; -1 43584 var cssDisableVal = usePointer ? 'none' : 'hidden'; -1 43585 var style = document.createElement('style'); -1 43586 style.innerHTML = usePointer ? '* { pointer-events: all }' : '* { visibility: visible }'; -1 43587 return function(x, y) { -1 43588 var current, i, d; -1 43589 var elements = []; -1 43590 var previousPointerEvents = []; -1 43591 document.head.appendChild(style); -1 43592 while ((current = document.elementFromPoint(x, y)) && elements.indexOf(current) === -1) { -1 43593 elements.push(current); -1 43594 previousPointerEvents.push({ -1 43595 value: current.style.getPropertyValue(cssProp), -1 43596 priority: current.style.getPropertyPriority(cssProp) -1 43597 }); -1 43598 current.style.setProperty(cssProp, cssDisableVal, 'important'); 25599 43599 }25600 -1 return function() {25601 -1 return fn.apply(that, arguments);25602 -1 };25603 -1 };25604 -1 },25605 -1 './node_modules/core-js-pure/internals/get-built-in.js': function node_modulesCoreJsPureInternalsGetBuiltInJs(module, exports, __webpack_require__) {25606 -1 var path = __webpack_require__('./node_modules/core-js-pure/internals/path.js');25607 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');25608 -1 var aFunction = function aFunction(variable) {25609 -1 return typeof variable == 'function' ? variable : undefined;25610 -1 };25611 -1 module.exports = function(namespace, method) {25612 -1 return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace]) : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];25613 -1 };25614 -1 },25615 -1 './node_modules/core-js-pure/internals/get-iterator-method.js': function node_modulesCoreJsPureInternalsGetIteratorMethodJs(module, exports, __webpack_require__) {25616 -1 var classof = __webpack_require__('./node_modules/core-js-pure/internals/classof.js');25617 -1 var Iterators = __webpack_require__('./node_modules/core-js-pure/internals/iterators.js');25618 -1 var wellKnownSymbol = __webpack_require__('./node_modules/core-js-pure/internals/well-known-symbol.js');25619 -1 var ITERATOR = wellKnownSymbol('iterator');25620 -1 module.exports = function(it) {25621 -1 if (it != undefined) {25622 -1 return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)];-1 43600 if (elements.indexOf(document.documentElement) < elements.length - 1) { -1 43601 elements.splice(elements.indexOf(document.documentElement), 1); -1 43602 elements.push(document.documentElement); 25623 43603 }25624 -1 };25625 -1 },25626 -1 './node_modules/core-js-pure/internals/global.js': function node_modulesCoreJsPureInternalsGlobalJs(module, exports, __webpack_require__) {25627 -1 (function(global) {25628 -1 var check = function check(it) {25629 -1 return it && it.Math == Math && it;25630 -1 };25631 -1 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) == 'object' && global) || Function('return this')();25632 -1 }).call(this, __webpack_require__('./node_modules/webpack/buildin/global.js'));25633 -1 },25634 -1 './node_modules/core-js-pure/internals/has.js': function node_modulesCoreJsPureInternalsHasJs(module, exports) {25635 -1 var hasOwnProperty = {}.hasOwnProperty;25636 -1 module.exports = function(it, key) {25637 -1 return hasOwnProperty.call(it, key);25638 -1 };25639 -1 },25640 -1 './node_modules/core-js-pure/internals/hidden-keys.js': function node_modulesCoreJsPureInternalsHiddenKeysJs(module, exports) {25641 -1 module.exports = {};25642 -1 },25643 -1 './node_modules/core-js-pure/internals/host-report-errors.js': function node_modulesCoreJsPureInternalsHostReportErrorsJs(module, exports, __webpack_require__) {25644 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');25645 -1 module.exports = function(a, b) {25646 -1 var console = global.console;25647 -1 if (console && console.error) {25648 -1 arguments.length === 1 ? console.error(a) : console.error(a, b);-1 43604 for (i = previousPointerEvents.length; !!(d = previousPointerEvents[--i]); ) { -1 43605 elements[i].style.setProperty(cssProp, d.value ? d.value : '', d.priority); 25649 43606 } -1 43607 document.head.removeChild(style); -1 43608 return elements; 25650 43609 };25651 -1 },25652 -1 './node_modules/core-js-pure/internals/html.js': function node_modulesCoreJsPureInternalsHtmlJs(module, exports, __webpack_require__) {25653 -1 var getBuiltIn = __webpack_require__('./node_modules/core-js-pure/internals/get-built-in.js');25654 -1 module.exports = getBuiltIn('document', 'documentElement');25655 -1 },25656 -1 './node_modules/core-js-pure/internals/ie8-dom-define.js': function node_modulesCoreJsPureInternalsIe8DomDefineJs(module, exports, __webpack_require__) {25657 -1 var DESCRIPTORS = __webpack_require__('./node_modules/core-js-pure/internals/descriptors.js');25658 -1 var fails = __webpack_require__('./node_modules/core-js-pure/internals/fails.js');25659 -1 var createElement = __webpack_require__('./node_modules/core-js-pure/internals/document-create-element.js');25660 -1 module.exports = !DESCRIPTORS && !fails(function() {25661 -1 return Object.defineProperty(createElement('div'), 'a', {25662 -1 get: function get() {25663 -1 return 7;25664 -1 }25665 -1 }).a != 7;25666 -1 });25667 -1 },25668 -1 './node_modules/core-js-pure/internals/indexed-object.js': function node_modulesCoreJsPureInternalsIndexedObjectJs(module, exports, __webpack_require__) {25669 -1 var fails = __webpack_require__('./node_modules/core-js-pure/internals/fails.js');25670 -1 var classof = __webpack_require__('./node_modules/core-js-pure/internals/classof-raw.js');25671 -1 var split = ''.split;25672 -1 module.exports = fails(function() {25673 -1 return !Object('z').propertyIsEnumerable(0);25674 -1 }) ? function(it) {25675 -1 return classof(it) == 'String' ? split.call(it, '') : Object(it);25676 -1 } : Object;25677 -1 },25678 -1 './node_modules/core-js-pure/internals/inspect-source.js': function node_modulesCoreJsPureInternalsInspectSourceJs(module, exports, __webpack_require__) {25679 -1 var store = __webpack_require__('./node_modules/core-js-pure/internals/shared-store.js');25680 -1 var functionToString = Function.toString;25681 -1 if (typeof store.inspectSource != 'function') {25682 -1 store.inspectSource = function(it) {25683 -1 return functionToString.call(it);25684 -1 };25685 -1 }25686 -1 module.exports = store.inspectSource;25687 -1 },25688 -1 './node_modules/core-js-pure/internals/internal-metadata.js': function node_modulesCoreJsPureInternalsInternalMetadataJs(module, exports, __webpack_require__) {25689 -1 var hiddenKeys = __webpack_require__('./node_modules/core-js-pure/internals/hidden-keys.js');25690 -1 var isObject = __webpack_require__('./node_modules/core-js-pure/internals/is-object.js');25691 -1 var has = __webpack_require__('./node_modules/core-js-pure/internals/has.js');25692 -1 var defineProperty = __webpack_require__('./node_modules/core-js-pure/internals/object-define-property.js').f;25693 -1 var uid = __webpack_require__('./node_modules/core-js-pure/internals/uid.js');25694 -1 var FREEZING = __webpack_require__('./node_modules/core-js-pure/internals/freezing.js');25695 -1 var METADATA = uid('meta');25696 -1 var id = 0;25697 -1 var isExtensible = Object.isExtensible || function() {25698 -1 return true;25699 -1 };25700 -1 var setMetadata = function setMetadata(it) {25701 -1 defineProperty(it, METADATA, {25702 -1 value: {25703 -1 objectID: 'O' + ++id,25704 -1 weakData: {}-1 43610 } -1 43611 if (typeof window.addEventListener === 'function') { -1 43612 document.elementsFromPoint = _pollyfillElementsFromPoint(); -1 43613 } -1 43614 if (!Array.prototype.includes) { -1 43615 Object.defineProperty(Array.prototype, 'includes', { -1 43616 value: function value(searchElement) { -1 43617 var O = Object(this); -1 43618 var len = parseInt(O.length, 10) || 0; -1 43619 if (len === 0) { -1 43620 return false; 25705 43621 }25706 -1 });25707 -1 };25708 -1 var fastKey = function fastKey(it, create) {25709 -1 if (!isObject(it)) {25710 -1 return _typeof(it) == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;25711 -1 }25712 -1 if (!has(it, METADATA)) {25713 -1 if (!isExtensible(it)) {25714 -1 return 'F';-1 43622 var n = parseInt(arguments[1], 10) || 0; -1 43623 var k; -1 43624 if (n >= 0) { -1 43625 k = n; -1 43626 } else { -1 43627 k = len + n; -1 43628 if (k < 0) { -1 43629 k = 0; -1 43630 } 25715 43631 }25716 -1 if (!create) {25717 -1 return 'E';-1 43632 var currentElement; -1 43633 while (k < len) { -1 43634 currentElement = O[k]; -1 43635 if (searchElement === currentElement || searchElement !== searchElement && currentElement !== currentElement) { -1 43636 return true; -1 43637 } -1 43638 k++; 25718 43639 }25719 -1 setMetadata(it);-1 43640 return false; 25720 43641 }25721 -1 return it[METADATA].objectID;25722 -1 };25723 -1 var getWeakData = function getWeakData(it, create) {25724 -1 if (!has(it, METADATA)) {25725 -1 if (!isExtensible(it)) {25726 -1 return true;25727 -1 }25728 -1 if (!create) {25729 -1 return false;-1 43642 }); -1 43643 } -1 43644 if (!Array.prototype.some) { -1 43645 Object.defineProperty(Array.prototype, 'some', { -1 43646 value: function value(fun) { -1 43647 if (this == null) { -1 43648 throw new TypeError('Array.prototype.some called on null or undefined'); -1 43649 } -1 43650 if (typeof fun !== 'function') { -1 43651 throw new TypeError(); -1 43652 } -1 43653 var t = Object(this); -1 43654 var len = t.length >>> 0; -1 43655 var thisArg = arguments.length >= 2 ? arguments[1] : void 0; -1 43656 for (var i = 0; i < len; i++) { -1 43657 if (i in t && fun.call(thisArg, t[i], i, t)) { -1 43658 return true; -1 43659 } 25730 43660 }25731 -1 setMetadata(it);25732 -1 }25733 -1 return it[METADATA].weakData;25734 -1 };25735 -1 var onFreeze = function onFreeze(it) {25736 -1 if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) {25737 -1 setMetadata(it);-1 43661 return false; 25738 43662 }25739 -1 return it;25740 -1 };25741 -1 var meta = module.exports = {25742 -1 REQUIRED: false,25743 -1 fastKey: fastKey,25744 -1 getWeakData: getWeakData,25745 -1 onFreeze: onFreeze25746 -1 };25747 -1 hiddenKeys[METADATA] = true;25748 -1 },25749 -1 './node_modules/core-js-pure/internals/internal-state.js': function node_modulesCoreJsPureInternalsInternalStateJs(module, exports, __webpack_require__) {25750 -1 var NATIVE_WEAK_MAP = __webpack_require__('./node_modules/core-js-pure/internals/native-weak-map.js');25751 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');25752 -1 var isObject = __webpack_require__('./node_modules/core-js-pure/internals/is-object.js');25753 -1 var createNonEnumerableProperty = __webpack_require__('./node_modules/core-js-pure/internals/create-non-enumerable-property.js');25754 -1 var objectHas = __webpack_require__('./node_modules/core-js-pure/internals/has.js');25755 -1 var sharedKey = __webpack_require__('./node_modules/core-js-pure/internals/shared-key.js');25756 -1 var hiddenKeys = __webpack_require__('./node_modules/core-js-pure/internals/hidden-keys.js');25757 -1 var WeakMap = global.WeakMap;25758 -1 var set, get, has;25759 -1 var enforce = function enforce(it) {25760 -1 return has(it) ? get(it) : set(it, {});25761 -1 };25762 -1 var getterFor = function getterFor(TYPE) {25763 -1 return function(it) {25764 -1 var state;25765 -1 if (!isObject(it) || (state = get(it)).type !== TYPE) {25766 -1 throw TypeError('Incompatible receiver, ' + TYPE + ' required');25767 -1 }25768 -1 return state;25769 -1 };25770 -1 };25771 -1 if (NATIVE_WEAK_MAP) {25772 -1 var store = new WeakMap();25773 -1 var wmget = store.get;25774 -1 var wmhas = store.has;25775 -1 var wmset = store.set;25776 -1 set = function set(it, metadata) {25777 -1 wmset.call(store, it, metadata);25778 -1 return metadata;25779 -1 };25780 -1 get = function get(it) {25781 -1 return wmget.call(store, it) || {};25782 -1 };25783 -1 has = function has(it) {25784 -1 return wmhas.call(store, it);25785 -1 };25786 -1 } else {25787 -1 var STATE = sharedKey('state');25788 -1 hiddenKeys[STATE] = true;25789 -1 set = function set(it, metadata) {25790 -1 createNonEnumerableProperty(it, STATE, metadata);25791 -1 return metadata;25792 -1 };25793 -1 get = function get(it) {25794 -1 return objectHas(it, STATE) ? it[STATE] : {};25795 -1 };25796 -1 has = function has(it) {25797 -1 return objectHas(it, STATE);25798 -1 };25799 -1 }25800 -1 module.exports = {25801 -1 set: set,25802 -1 get: get,25803 -1 has: has,25804 -1 enforce: enforce,25805 -1 getterFor: getterFor25806 -1 };25807 -1 },25808 -1 './node_modules/core-js-pure/internals/is-array-iterator-method.js': function node_modulesCoreJsPureInternalsIsArrayIteratorMethodJs(module, exports, __webpack_require__) {25809 -1 var wellKnownSymbol = __webpack_require__('./node_modules/core-js-pure/internals/well-known-symbol.js');25810 -1 var Iterators = __webpack_require__('./node_modules/core-js-pure/internals/iterators.js');25811 -1 var ITERATOR = wellKnownSymbol('iterator');25812 -1 var ArrayPrototype = Array.prototype;25813 -1 module.exports = function(it) {25814 -1 return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);25815 -1 };25816 -1 },25817 -1 './node_modules/core-js-pure/internals/is-array.js': function node_modulesCoreJsPureInternalsIsArrayJs(module, exports, __webpack_require__) {25818 -1 var classof = __webpack_require__('./node_modules/core-js-pure/internals/classof-raw.js');25819 -1 module.exports = Array.isArray || function isArray(arg) {25820 -1 return classof(arg) == 'Array';25821 -1 };25822 -1 },25823 -1 './node_modules/core-js-pure/internals/is-forced.js': function node_modulesCoreJsPureInternalsIsForcedJs(module, exports, __webpack_require__) {25824 -1 var fails = __webpack_require__('./node_modules/core-js-pure/internals/fails.js');25825 -1 var replacement = /#|\.prototype\./;25826 -1 var isForced = function isForced(feature, detection) {25827 -1 var value = data[normalize(feature)];25828 -1 return value == POLYFILL ? true : value == NATIVE ? false : typeof detection == 'function' ? fails(detection) : !!detection;25829 -1 };25830 -1 var normalize = isForced.normalize = function(string) {25831 -1 return String(string).replace(replacement, '.').toLowerCase();25832 -1 };25833 -1 var data = isForced.data = {};25834 -1 var NATIVE = isForced.NATIVE = 'N';25835 -1 var POLYFILL = isForced.POLYFILL = 'P';25836 -1 module.exports = isForced;25837 -1 },25838 -1 './node_modules/core-js-pure/internals/is-object.js': function node_modulesCoreJsPureInternalsIsObjectJs(module, exports) {25839 -1 module.exports = function(it) {25840 -1 return _typeof(it) === 'object' ? it !== null : typeof it === 'function';25841 -1 };25842 -1 },25843 -1 './node_modules/core-js-pure/internals/is-pure.js': function node_modulesCoreJsPureInternalsIsPureJs(module, exports) {25844 -1 module.exports = true;25845 -1 },25846 -1 './node_modules/core-js-pure/internals/iterate.js': function node_modulesCoreJsPureInternalsIterateJs(module, exports, __webpack_require__) {25847 -1 var anObject = __webpack_require__('./node_modules/core-js-pure/internals/an-object.js');25848 -1 var isArrayIteratorMethod = __webpack_require__('./node_modules/core-js-pure/internals/is-array-iterator-method.js');25849 -1 var toLength = __webpack_require__('./node_modules/core-js-pure/internals/to-length.js');25850 -1 var bind = __webpack_require__('./node_modules/core-js-pure/internals/function-bind-context.js');25851 -1 var getIteratorMethod = __webpack_require__('./node_modules/core-js-pure/internals/get-iterator-method.js');25852 -1 var callWithSafeIterationClosing = __webpack_require__('./node_modules/core-js-pure/internals/call-with-safe-iteration-closing.js');25853 -1 var Result = function Result(stopped, result) {25854 -1 this.stopped = stopped;25855 -1 this.result = result;25856 -1 };25857 -1 var iterate = module.exports = function(iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {25858 -1 var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);25859 -1 var iterator, iterFn, index, length, result, next, step;25860 -1 if (IS_ITERATOR) {25861 -1 iterator = iterable;25862 -1 } else {25863 -1 iterFn = getIteratorMethod(iterable);25864 -1 if (typeof iterFn != 'function') {25865 -1 throw TypeError('Target is not iterable');25866 -1 }25867 -1 if (isArrayIteratorMethod(iterFn)) {25868 -1 for (index = 0, length = toLength(iterable.length); length > index; index++) {25869 -1 result = AS_ENTRIES ? boundFunction(anObject(step = iterable[index])[0], step[1]) : boundFunction(iterable[index]);25870 -1 if (result && result instanceof Result) {25871 -1 return result;-1 43663 }); -1 43664 } -1 43665 if (!Array.from) { -1 43666 Object.defineProperty(Array, 'from', { -1 43667 value: function() { -1 43668 var toStr = Object.prototype.toString; -1 43669 var isCallable = function isCallable(fn) { -1 43670 return typeof fn === 'function' || toStr.call(fn) === '[object Function]'; -1 43671 }; -1 43672 var toInteger = function toInteger(value) { -1 43673 var number = Number(value); -1 43674 if (isNaN(number)) { -1 43675 return 0; -1 43676 } -1 43677 if (number === 0 || !isFinite(number)) { -1 43678 return number; -1 43679 } -1 43680 return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number)); -1 43681 }; -1 43682 var maxSafeInteger = Math.pow(2, 53) - 1; -1 43683 var toLength = function toLength(value) { -1 43684 var len = toInteger(value); -1 43685 return Math.min(Math.max(len, 0), maxSafeInteger); -1 43686 }; -1 43687 return function from(arrayLike) { -1 43688 var C = this; -1 43689 var items = Object(arrayLike); -1 43690 if (arrayLike == null) { -1 43691 throw new TypeError('Array.from requires an array-like object - not null or undefined'); -1 43692 } -1 43693 var mapFn = arguments.length > 1 ? arguments[1] : void 0; -1 43694 var T; -1 43695 if (typeof mapFn !== 'undefined') { -1 43696 if (!isCallable(mapFn)) { -1 43697 throw new TypeError('Array.from: when provided, the second argument must be a function'); -1 43698 } -1 43699 if (arguments.length > 2) { -1 43700 T = arguments[2]; 25872 43701 } 25873 43702 }25874 -1 return new Result(false);25875 -1 }25876 -1 iterator = iterFn.call(iterable);25877 -1 }25878 -1 next = iterator.next;25879 -1 while (!(step = next.call(iterator)).done) {25880 -1 result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);25881 -1 if (_typeof(result) == 'object' && result && result instanceof Result) {25882 -1 return result;25883 -1 }-1 43703 var len = toLength(items.length); -1 43704 var A = isCallable(C) ? Object(new C(len)) : new Array(len); -1 43705 var k = 0; -1 43706 var kValue; -1 43707 while (k < len) { -1 43708 kValue = items[k]; -1 43709 if (mapFn) { -1 43710 A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k); -1 43711 } else { -1 43712 A[k] = kValue; -1 43713 } -1 43714 k += 1; -1 43715 } -1 43716 A.length = len; -1 43717 return A; -1 43718 }; -1 43719 }() -1 43720 }); -1 43721 } -1 43722 if (!String.prototype.includes) { -1 43723 String.prototype.includes = function(search, start) { -1 43724 if (typeof start !== 'number') { -1 43725 start = 0; 25884 43726 }25885 -1 return new Result(false);25886 -1 };25887 -1 iterate.stop = function(result) {25888 -1 return new Result(true, result);25889 -1 };25890 -1 },25891 -1 './node_modules/core-js-pure/internals/iterators-core.js': function node_modulesCoreJsPureInternalsIteratorsCoreJs(module, exports, __webpack_require__) {25892 -1 'use strict';25893 -1 var getPrototypeOf = __webpack_require__('./node_modules/core-js-pure/internals/object-get-prototype-of.js');25894 -1 var createNonEnumerableProperty = __webpack_require__('./node_modules/core-js-pure/internals/create-non-enumerable-property.js');25895 -1 var has = __webpack_require__('./node_modules/core-js-pure/internals/has.js');25896 -1 var wellKnownSymbol = __webpack_require__('./node_modules/core-js-pure/internals/well-known-symbol.js');25897 -1 var IS_PURE = __webpack_require__('./node_modules/core-js-pure/internals/is-pure.js');25898 -1 var ITERATOR = wellKnownSymbol('iterator');25899 -1 var BUGGY_SAFARI_ITERATORS = false;25900 -1 var returnThis = function returnThis() {25901 -1 return this;25902 -1 };25903 -1 var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;25904 -1 if ([].keys) {25905 -1 arrayIterator = [].keys();25906 -1 if (!('next' in arrayIterator)) {25907 -1 BUGGY_SAFARI_ITERATORS = true;-1 43727 if (start + search.length > this.length) { -1 43728 return false; 25908 43729 } else {25909 -1 PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));25910 -1 if (PrototypeOfArrayIteratorPrototype !== Object.prototype) {25911 -1 IteratorPrototype = PrototypeOfArrayIteratorPrototype;25912 -1 }-1 43730 return this.indexOf(search, start) !== -1; 25913 43731 }25914 -1 }25915 -1 if (IteratorPrototype == undefined) {25916 -1 IteratorPrototype = {};25917 -1 }25918 -1 if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {25919 -1 createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);25920 -1 }25921 -1 module.exports = {25922 -1 IteratorPrototype: IteratorPrototype,25923 -1 BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS25924 43732 };25925 -1 },25926 -1 './node_modules/core-js-pure/internals/iterators.js': function node_modulesCoreJsPureInternalsIteratorsJs(module, exports) {25927 -1 module.exports = {};25928 -1 },25929 -1 './node_modules/core-js-pure/internals/microtask.js': function node_modulesCoreJsPureInternalsMicrotaskJs(module, exports, __webpack_require__) {25930 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');25931 -1 var getOwnPropertyDescriptor = __webpack_require__('./node_modules/core-js-pure/internals/object-get-own-property-descriptor.js').f;25932 -1 var classof = __webpack_require__('./node_modules/core-js-pure/internals/classof-raw.js');25933 -1 var macrotask = __webpack_require__('./node_modules/core-js-pure/internals/task.js').set;25934 -1 var IS_IOS = __webpack_require__('./node_modules/core-js-pure/internals/engine-is-ios.js');25935 -1 var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;25936 -1 var process = global.process;25937 -1 var Promise = global.Promise;25938 -1 var IS_NODE = classof(process) == 'process';25939 -1 var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');25940 -1 var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;25941 -1 var flush, head, last, notify, toggle, node, promise, then;25942 -1 if (!queueMicrotask) {25943 -1 flush = function flush() {25944 -1 var parent, fn;25945 -1 if (IS_NODE && (parent = process.domain)) {25946 -1 parent.exit();25947 -1 }25948 -1 while (head) {25949 -1 fn = head.fn;25950 -1 head = head.next;25951 -1 try {25952 -1 fn();25953 -1 } catch (error) {25954 -1 if (head) {25955 -1 notify();-1 43733 } -1 43734 if (!Array.prototype.flat) { -1 43735 Object.defineProperty(Array.prototype, 'flat', { -1 43736 configurable: true, -1 43737 value: function flat() { -1 43738 var depth = isNaN(arguments[0]) ? 1 : Number(arguments[0]); -1 43739 return depth ? Array.prototype.reduce.call(this, function(acc, cur) { -1 43740 if (Array.isArray(cur)) { -1 43741 acc.push.apply(acc, flat.call(cur, depth - 1)); -1 43742 } else { -1 43743 acc.push(cur); -1 43744 } -1 43745 return acc; -1 43746 }, []) : Array.prototype.slice.call(this); -1 43747 }, -1 43748 writable: true -1 43749 }); -1 43750 } -1 43751 function uniqueArray(arr1, arr2) { -1 43752 return arr1.concat(arr2).filter(function(elem, pos, arr) { -1 43753 return arr.indexOf(elem) === pos; -1 43754 }); -1 43755 } -1 43756 var unique_array_default = uniqueArray; -1 43757 function createLocalVariables(vNodes, anyLevel, thisLevel, parentShadowId) { -1 43758 var retVal = { -1 43759 vNodes: vNodes.slice(), -1 43760 anyLevel: anyLevel, -1 43761 thisLevel: thisLevel, -1 43762 parentShadowId: parentShadowId -1 43763 }; -1 43764 retVal.vNodes.reverse(); -1 43765 return retVal; -1 43766 } -1 43767 function matchExpressions(domTree, expressions, filter) { -1 43768 var stack = []; -1 43769 var vNodes = Array.isArray(domTree) ? domTree : [ domTree ]; -1 43770 var currentLevel = createLocalVariables(vNodes, expressions, [], domTree[0].shadowId); -1 43771 var result = []; -1 43772 while (currentLevel.vNodes.length) { -1 43773 var vNode = currentLevel.vNodes.pop(); -1 43774 var childOnly = []; -1 43775 var childAny = []; -1 43776 var combined = currentLevel.anyLevel.slice().concat(currentLevel.thisLevel); -1 43777 var added = false; -1 43778 for (var _i8 = 0; _i8 < combined.length; _i8++) { -1 43779 var exp = combined[_i8]; -1 43780 if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && _matchesExpression(vNode, exp[0])) { -1 43781 if (exp.length === 1) { -1 43782 if (!added && (!filter || filter(vNode))) { -1 43783 result.push(vNode); -1 43784 added = true; -1 43785 } -1 43786 } else { -1 43787 var rest = exp.slice(1); -1 43788 if ([ ' ', '>' ].includes(rest[0].combinator) === false) { -1 43789 throw new Error('axe.utils.querySelectorAll does not support the combinator: ' + exp[1].combinator); -1 43790 } -1 43791 if (rest[0].combinator === '>') { -1 43792 childOnly.push(rest); 25956 43793 } else {25957 -1 last = undefined;-1 43794 childAny.push(rest); 25958 43795 }25959 -1 throw error;25960 43796 } 25961 43797 }25962 -1 last = undefined;25963 -1 if (parent) {25964 -1 parent.enter();-1 43798 if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && currentLevel.anyLevel.includes(exp)) { -1 43799 childAny.push(exp); 25965 43800 }25966 -1 };25967 -1 if (IS_NODE) {25968 -1 notify = function notify() {25969 -1 process.nextTick(flush);25970 -1 };25971 -1 } else if (MutationObserver && !IS_IOS) {25972 -1 toggle = true;25973 -1 node = document.createTextNode('');25974 -1 new MutationObserver(flush).observe(node, {25975 -1 characterData: true25976 -1 });25977 -1 notify = function notify() {25978 -1 node.data = toggle = !toggle;25979 -1 };25980 -1 } else if (Promise && Promise.resolve) {25981 -1 promise = Promise.resolve(undefined);25982 -1 then = promise.then;25983 -1 notify = function notify() {25984 -1 then.call(promise, flush);25985 -1 };25986 -1 } else {25987 -1 notify = function notify() {25988 -1 macrotask.call(global, flush);25989 -1 };25990 43801 }25991 -1 }25992 -1 module.exports = queueMicrotask || function(fn) {25993 -1 var task = {25994 -1 fn: fn,25995 -1 next: undefined25996 -1 };25997 -1 if (last) {25998 -1 last.next = task;-1 43802 if (vNode.children && vNode.children.length) { -1 43803 stack.push(currentLevel); -1 43804 currentLevel = createLocalVariables(vNode.children, childAny, childOnly, vNode.shadowId); 25999 43805 }26000 -1 if (!head) {26001 -1 head = task;26002 -1 notify();-1 43806 while (!currentLevel.vNodes.length && stack.length) { -1 43807 currentLevel = stack.pop(); 26003 43808 }26004 -1 last = task;26005 -1 };26006 -1 },26007 -1 './node_modules/core-js-pure/internals/native-promise-constructor.js': function node_modulesCoreJsPureInternalsNativePromiseConstructorJs(module, exports, __webpack_require__) {26008 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');26009 -1 module.exports = global.Promise;26010 -1 },26011 -1 './node_modules/core-js-pure/internals/native-symbol.js': function node_modulesCoreJsPureInternalsNativeSymbolJs(module, exports, __webpack_require__) {26012 -1 var fails = __webpack_require__('./node_modules/core-js-pure/internals/fails.js');26013 -1 module.exports = !!Object.getOwnPropertySymbols && !fails(function() {26014 -1 return !String(Symbol());-1 43809 } -1 43810 return result; -1 43811 } -1 43812 function querySelectorAllFilter(domTree, selector, filter) { -1 43813 domTree = Array.isArray(domTree) ? domTree : [ domTree ]; -1 43814 var expressions = _convertSelector(selector); -1 43815 return matchExpressions(domTree, expressions, filter); -1 43816 } -1 43817 var query_selector_all_filter_default = querySelectorAllFilter; -1 43818 function preloadCssom(_ref15) { -1 43819 var _ref15$treeRoot = _ref15.treeRoot, treeRoot = _ref15$treeRoot === void 0 ? axe._tree[0] : _ref15$treeRoot; -1 43820 var rootNodes = getAllRootNodesInTree(treeRoot); -1 43821 if (!rootNodes.length) { -1 43822 return Promise.resolve(); -1 43823 } -1 43824 var dynamicDoc = document.implementation.createHTMLDocument('Dynamic document for loading cssom'); -1 43825 var convertDataToStylesheet = get_stylesheet_factory_default(dynamicDoc); -1 43826 return getCssomForAllRootNodes(rootNodes, convertDataToStylesheet).then(function(assets) { -1 43827 return flattenAssets(assets); 26015 43828 });26016 -1 },26017 -1 './node_modules/core-js-pure/internals/native-weak-map.js': function node_modulesCoreJsPureInternalsNativeWeakMapJs(module, exports, __webpack_require__) {26018 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');26019 -1 var inspectSource = __webpack_require__('./node_modules/core-js-pure/internals/inspect-source.js');26020 -1 var WeakMap = global.WeakMap;26021 -1 module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));26022 -1 },26023 -1 './node_modules/core-js-pure/internals/new-promise-capability.js': function node_modulesCoreJsPureInternalsNewPromiseCapabilityJs(module, exports, __webpack_require__) {26024 -1 'use strict';26025 -1 var aFunction = __webpack_require__('./node_modules/core-js-pure/internals/a-function.js');26026 -1 var PromiseCapability = function PromiseCapability(C) {26027 -1 var resolve, reject;26028 -1 this.promise = new C(function($$resolve, $$reject) {26029 -1 if (resolve !== undefined || reject !== undefined) {26030 -1 throw TypeError('Bad Promise constructor');26031 -1 }26032 -1 resolve = $$resolve;26033 -1 reject = $$reject;26034 -1 });26035 -1 this.resolve = aFunction(resolve);26036 -1 this.reject = aFunction(reject);26037 -1 };26038 -1 module.exports.f = function(C) {26039 -1 return new PromiseCapability(C);26040 -1 };26041 -1 },26042 -1 './node_modules/core-js-pure/internals/object-create.js': function node_modulesCoreJsPureInternalsObjectCreateJs(module, exports, __webpack_require__) {26043 -1 var anObject = __webpack_require__('./node_modules/core-js-pure/internals/an-object.js');26044 -1 var defineProperties = __webpack_require__('./node_modules/core-js-pure/internals/object-define-properties.js');26045 -1 var enumBugKeys = __webpack_require__('./node_modules/core-js-pure/internals/enum-bug-keys.js');26046 -1 var hiddenKeys = __webpack_require__('./node_modules/core-js-pure/internals/hidden-keys.js');26047 -1 var html = __webpack_require__('./node_modules/core-js-pure/internals/html.js');26048 -1 var documentCreateElement = __webpack_require__('./node_modules/core-js-pure/internals/document-create-element.js');26049 -1 var sharedKey = __webpack_require__('./node_modules/core-js-pure/internals/shared-key.js');26050 -1 var GT = '>';26051 -1 var LT = '<';26052 -1 var PROTOTYPE = 'prototype';26053 -1 var SCRIPT = 'script';26054 -1 var IE_PROTO = sharedKey('IE_PROTO');26055 -1 var EmptyConstructor = function EmptyConstructor() {};26056 -1 var scriptTag = function scriptTag(content) {26057 -1 return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;26058 -1 };26059 -1 var NullProtoObjectViaActiveX = function NullProtoObjectViaActiveX(activeXDocument) {26060 -1 activeXDocument.write(scriptTag(''));26061 -1 activeXDocument.close();26062 -1 var temp = activeXDocument.parentWindow.Object;26063 -1 activeXDocument = null;26064 -1 return temp;26065 -1 };26066 -1 var NullProtoObjectViaIFrame = function NullProtoObjectViaIFrame() {26067 -1 var iframe = documentCreateElement('iframe');26068 -1 var JS = 'java' + SCRIPT + ':';26069 -1 var iframeDocument;26070 -1 iframe.style.display = 'none';26071 -1 html.appendChild(iframe);26072 -1 iframe.src = String(JS);26073 -1 iframeDocument = iframe.contentWindow.document;26074 -1 iframeDocument.open();26075 -1 iframeDocument.write(scriptTag('document.F=Object'));26076 -1 iframeDocument.close();26077 -1 return iframeDocument.F;26078 -1 };26079 -1 var activeXDocument;26080 -1 var _NullProtoObject = function NullProtoObject() {26081 -1 try {26082 -1 activeXDocument = document.domain && new ActiveXObject('htmlfile');26083 -1 } catch (error) {}26084 -1 _NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();26085 -1 var length = enumBugKeys.length;26086 -1 while (length--) {26087 -1 delete _NullProtoObject[PROTOTYPE][enumBugKeys[length]];26088 -1 }26089 -1 return _NullProtoObject();26090 -1 };26091 -1 hiddenKeys[IE_PROTO] = true;26092 -1 module.exports = Object.create || function create(O, Properties) {26093 -1 var result;26094 -1 if (O !== null) {26095 -1 EmptyConstructor[PROTOTYPE] = anObject(O);26096 -1 result = new EmptyConstructor();26097 -1 EmptyConstructor[PROTOTYPE] = null;26098 -1 result[IE_PROTO] = O;26099 -1 } else {26100 -1 result = _NullProtoObject();-1 43829 } -1 43830 var preload_cssom_default = preloadCssom; -1 43831 function getAllRootNodesInTree(tree) { -1 43832 var ids = []; -1 43833 var rootNodes = query_selector_all_filter_default(tree, '*', function(node) { -1 43834 if (ids.includes(node.shadowId)) { -1 43835 return false; 26101 43836 }26102 -1 return Properties === undefined ? result : defineProperties(result, Properties);26103 -1 };26104 -1 },26105 -1 './node_modules/core-js-pure/internals/object-define-properties.js': function node_modulesCoreJsPureInternalsObjectDefinePropertiesJs(module, exports, __webpack_require__) {26106 -1 var DESCRIPTORS = __webpack_require__('./node_modules/core-js-pure/internals/descriptors.js');26107 -1 var definePropertyModule = __webpack_require__('./node_modules/core-js-pure/internals/object-define-property.js');26108 -1 var anObject = __webpack_require__('./node_modules/core-js-pure/internals/an-object.js');26109 -1 var objectKeys = __webpack_require__('./node_modules/core-js-pure/internals/object-keys.js');26110 -1 module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {26111 -1 anObject(O);26112 -1 var keys = objectKeys(Properties);26113 -1 var length = keys.length;26114 -1 var index = 0;26115 -1 var key;26116 -1 while (length > index) {26117 -1 definePropertyModule.f(O, key = keys[index++], Properties[key]);-1 43837 ids.push(node.shadowId); -1 43838 return true; -1 43839 }).map(function(node) { -1 43840 return { -1 43841 shadowId: node.shadowId, -1 43842 rootNode: get_root_node_default(node.actualNode) -1 43843 }; -1 43844 }); -1 43845 return unique_array_default(rootNodes, []); -1 43846 } -1 43847 function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) { -1 43848 var promises = []; -1 43849 rootNodes.forEach(function(_ref16, index) { -1 43850 var rootNode = _ref16.rootNode, shadowId = _ref16.shadowId; -1 43851 var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet); -1 43852 if (!sheets) { -1 43853 return Promise.all(promises); 26118 43854 }26119 -1 return O;26120 -1 };26121 -1 },26122 -1 './node_modules/core-js-pure/internals/object-define-property.js': function node_modulesCoreJsPureInternalsObjectDefinePropertyJs(module, exports, __webpack_require__) {26123 -1 var DESCRIPTORS = __webpack_require__('./node_modules/core-js-pure/internals/descriptors.js');26124 -1 var IE8_DOM_DEFINE = __webpack_require__('./node_modules/core-js-pure/internals/ie8-dom-define.js');26125 -1 var anObject = __webpack_require__('./node_modules/core-js-pure/internals/an-object.js');26126 -1 var toPrimitive = __webpack_require__('./node_modules/core-js-pure/internals/to-primitive.js');26127 -1 var nativeDefineProperty = Object.defineProperty;26128 -1 exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {26129 -1 anObject(O);26130 -1 P = toPrimitive(P, true);26131 -1 anObject(Attributes);26132 -1 if (IE8_DOM_DEFINE) {26133 -1 try {26134 -1 return nativeDefineProperty(O, P, Attributes);26135 -1 } catch (error) {}-1 43855 var rootIndex = index + 1; -1 43856 var parseOptions = { -1 43857 rootNode: rootNode, -1 43858 shadowId: shadowId, -1 43859 convertDataToStylesheet: convertDataToStylesheet, -1 43860 rootIndex: rootIndex -1 43861 }; -1 43862 var importedUrls = []; -1 43863 var p = Promise.all(sheets.map(function(sheet, sheetIndex) { -1 43864 var priority = [ rootIndex, sheetIndex ]; -1 43865 return parse_stylesheet_default(sheet, parseOptions, priority, importedUrls); -1 43866 })); -1 43867 promises.push(p); -1 43868 }); -1 43869 return Promise.all(promises); -1 43870 } -1 43871 function flattenAssets(assets) { -1 43872 return assets.reduce(function(acc, val) { -1 43873 return Array.isArray(val) ? acc.concat(flattenAssets(val)) : acc.concat(val); -1 43874 }, []); -1 43875 } -1 43876 function getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet) { -1 43877 var sheets; -1 43878 if (rootNode.nodeType === 11 && shadowId) { -1 43879 sheets = getStylesheetsFromDocumentFragment(rootNode, convertDataToStylesheet); -1 43880 } else { -1 43881 sheets = getStylesheetsFromDocument(rootNode); -1 43882 } -1 43883 return filterStylesheetsWithSameHref(sheets); -1 43884 } -1 43885 function getStylesheetsFromDocumentFragment(rootNode, convertDataToStylesheet) { -1 43886 return Array.from(rootNode.children).filter(filerStyleAndLinkAttributesInDocumentFragment).reduce(function(out, node) { -1 43887 var nodeName2 = node.nodeName.toUpperCase(); -1 43888 var data2 = nodeName2 === 'STYLE' ? node.textContent : node; -1 43889 var isLink = nodeName2 === 'LINK'; -1 43890 var stylesheet = convertDataToStylesheet({ -1 43891 data: data2, -1 43892 isLink: isLink, -1 43893 root: rootNode -1 43894 }); -1 43895 out.push(stylesheet.sheet); -1 43896 return out; -1 43897 }, []); -1 43898 } -1 43899 function getStylesheetsFromDocument(rootNode) { -1 43900 return Array.from(rootNode.styleSheets).filter(function(sheet) { -1 43901 return filterMediaIsPrint(sheet.media.mediaText); -1 43902 }); -1 43903 } -1 43904 function filerStyleAndLinkAttributesInDocumentFragment(node) { -1 43905 var nodeName2 = node.nodeName.toUpperCase(); -1 43906 var linkHref = node.getAttribute('href'); -1 43907 var linkRel = node.getAttribute('rel'); -1 43908 var isLink = nodeName2 === 'LINK' && linkHref && linkRel && node.rel.toUpperCase().includes('STYLESHEET'); -1 43909 var isStyle = nodeName2 === 'STYLE'; -1 43910 return isStyle || isLink && filterMediaIsPrint(node.media); -1 43911 } -1 43912 function filterMediaIsPrint(media) { -1 43913 if (!media) { -1 43914 return true; -1 43915 } -1 43916 return !media.toUpperCase().includes('PRINT'); -1 43917 } -1 43918 function filterStylesheetsWithSameHref(sheets) { -1 43919 var hrefs = []; -1 43920 return sheets.filter(function(sheet) { -1 43921 if (!sheet.href) { -1 43922 return true; 26136 43923 }26137 -1 if ('get' in Attributes || 'set' in Attributes) {26138 -1 throw TypeError('Accessors not supported');-1 43924 if (hrefs.includes(sheet.href)) { -1 43925 return false; 26139 43926 }26140 -1 if ('value' in Attributes) {26141 -1 O[P] = Attributes.value;-1 43927 hrefs.push(sheet.href); -1 43928 return true; -1 43929 }); -1 43930 } -1 43931 function preloadMedia(_ref17) { -1 43932 var _ref17$treeRoot = _ref17.treeRoot, treeRoot = _ref17$treeRoot === void 0 ? axe._tree[0] : _ref17$treeRoot; -1 43933 var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(_ref18) { -1 43934 var actualNode = _ref18.actualNode; -1 43935 if (actualNode.hasAttribute('src')) { -1 43936 return !!actualNode.getAttribute('src'); -1 43937 } -1 43938 var sourceWithSrc = Array.from(actualNode.getElementsByTagName('source')).filter(function(source) { -1 43939 return !!source.getAttribute('src'); -1 43940 }); -1 43941 if (sourceWithSrc.length <= 0) { -1 43942 return false; 26142 43943 }26143 -1 return O;26144 -1 };26145 -1 },26146 -1 './node_modules/core-js-pure/internals/object-get-own-property-descriptor.js': function node_modulesCoreJsPureInternalsObjectGetOwnPropertyDescriptorJs(module, exports, __webpack_require__) {26147 -1 var DESCRIPTORS = __webpack_require__('./node_modules/core-js-pure/internals/descriptors.js');26148 -1 var propertyIsEnumerableModule = __webpack_require__('./node_modules/core-js-pure/internals/object-property-is-enumerable.js');26149 -1 var createPropertyDescriptor = __webpack_require__('./node_modules/core-js-pure/internals/create-property-descriptor.js');26150 -1 var toIndexedObject = __webpack_require__('./node_modules/core-js-pure/internals/to-indexed-object.js');26151 -1 var toPrimitive = __webpack_require__('./node_modules/core-js-pure/internals/to-primitive.js');26152 -1 var has = __webpack_require__('./node_modules/core-js-pure/internals/has.js');26153 -1 var IE8_DOM_DEFINE = __webpack_require__('./node_modules/core-js-pure/internals/ie8-dom-define.js');26154 -1 var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;26155 -1 exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {26156 -1 O = toIndexedObject(O);26157 -1 P = toPrimitive(P, true);26158 -1 if (IE8_DOM_DEFINE) {26159 -1 try {26160 -1 return nativeGetOwnPropertyDescriptor(O, P);26161 -1 } catch (error) {}-1 43944 return true; -1 43945 }); -1 43946 return Promise.all(mediaVirtualNodes.map(function(_ref19) { -1 43947 var actualNode = _ref19.actualNode; -1 43948 return isMediaElementReady(actualNode); -1 43949 })); -1 43950 } -1 43951 var preload_media_default = preloadMedia; -1 43952 function isMediaElementReady(elm) { -1 43953 return new Promise(function(resolve) { -1 43954 if (elm.readyState > 0) { -1 43955 resolve(elm); 26162 43956 }26163 -1 if (has(O, P)) {26164 -1 return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);-1 43957 function onMediaReady() { -1 43958 elm.removeEventListener('loadedmetadata', onMediaReady); -1 43959 resolve(elm); 26165 43960 } -1 43961 elm.addEventListener('loadedmetadata', onMediaReady); -1 43962 }); -1 43963 } -1 43964 function isValidPreloadObject(preload3) { -1 43965 return _typeof(preload3) === 'object' && Array.isArray(preload3.assets); -1 43966 } -1 43967 function _shouldPreload(options) { -1 43968 if (!options || options.preload === void 0 || options.preload === null) { -1 43969 return true; -1 43970 } -1 43971 if (typeof options.preload === 'boolean') { -1 43972 return options.preload; -1 43973 } -1 43974 return isValidPreloadObject(options.preload); -1 43975 } -1 43976 function _getPreloadConfig(options) { -1 43977 var _constants_default$pr = constants_default.preload, assets = _constants_default$pr.assets, timeout = _constants_default$pr.timeout; -1 43978 var config = { -1 43979 assets: assets, -1 43980 timeout: timeout 26166 43981 };26167 -1 },26168 -1 './node_modules/core-js-pure/internals/object-get-prototype-of.js': function node_modulesCoreJsPureInternalsObjectGetPrototypeOfJs(module, exports, __webpack_require__) {26169 -1 var has = __webpack_require__('./node_modules/core-js-pure/internals/has.js');26170 -1 var toObject = __webpack_require__('./node_modules/core-js-pure/internals/to-object.js');26171 -1 var sharedKey = __webpack_require__('./node_modules/core-js-pure/internals/shared-key.js');26172 -1 var CORRECT_PROTOTYPE_GETTER = __webpack_require__('./node_modules/core-js-pure/internals/correct-prototype-getter.js');26173 -1 var IE_PROTO = sharedKey('IE_PROTO');26174 -1 var ObjectPrototype = Object.prototype;26175 -1 module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function(O) {26176 -1 O = toObject(O);26177 -1 if (has(O, IE_PROTO)) {26178 -1 return O[IE_PROTO];26179 -1 }26180 -1 if (typeof O.constructor == 'function' && O instanceof O.constructor) {26181 -1 return O.constructor.prototype;26182 -1 }26183 -1 return O instanceof Object ? ObjectPrototype : null;26184 -1 };26185 -1 },26186 -1 './node_modules/core-js-pure/internals/object-keys-internal.js': function node_modulesCoreJsPureInternalsObjectKeysInternalJs(module, exports, __webpack_require__) {26187 -1 var has = __webpack_require__('./node_modules/core-js-pure/internals/has.js');26188 -1 var toIndexedObject = __webpack_require__('./node_modules/core-js-pure/internals/to-indexed-object.js');26189 -1 var indexOf = __webpack_require__('./node_modules/core-js-pure/internals/array-includes.js').indexOf;26190 -1 var hiddenKeys = __webpack_require__('./node_modules/core-js-pure/internals/hidden-keys.js');26191 -1 module.exports = function(object, names) {26192 -1 var O = toIndexedObject(object);26193 -1 var i = 0;26194 -1 var result = [];26195 -1 var key;26196 -1 for (key in O) {26197 -1 !has(hiddenKeys, key) && has(O, key) && result.push(key);26198 -1 }26199 -1 while (names.length > i) {26200 -1 if (has(O, key = names[i++])) {26201 -1 ~indexOf(result, key) || result.push(key);26202 -1 }-1 43982 if (!options.preload) { -1 43983 return config; -1 43984 } -1 43985 if (typeof options.preload === 'boolean') { -1 43986 return config; -1 43987 } -1 43988 var areRequestedAssetsValid = options.preload.assets.every(function(a) { -1 43989 return assets.includes(a.toLowerCase()); -1 43990 }); -1 43991 if (!areRequestedAssetsValid) { -1 43992 throw new Error('Requested assets, not supported. Supported assets are: '.concat(assets.join(', '), '.')); -1 43993 } -1 43994 config.assets = unique_array_default(options.preload.assets.map(function(a) { -1 43995 return a.toLowerCase(); -1 43996 }), []); -1 43997 if (options.preload.timeout && typeof options.preload.timeout === 'number' && !isNaN(options.preload.timeout)) { -1 43998 config.timeout = options.preload.timeout; -1 43999 } -1 44000 return config; -1 44001 } -1 44002 function preload(options) { -1 44003 var preloadFunctionsMap = { -1 44004 cssom: preload_cssom_default, -1 44005 media: preload_media_default -1 44006 }; -1 44007 if (!_shouldPreload(options)) { -1 44008 return Promise.resolve(); -1 44009 } -1 44010 return new Promise(function(resolve, reject) { -1 44011 var _getPreloadConfig2 = _getPreloadConfig(options), assets = _getPreloadConfig2.assets, timeout = _getPreloadConfig2.timeout; -1 44012 var preloadTimeout = setTimeout(function() { -1 44013 return reject(new Error('Preload assets timed out.')); -1 44014 }, timeout); -1 44015 Promise.all(assets.map(function(asset) { -1 44016 return preloadFunctionsMap[asset](options).then(function(results) { -1 44017 return _defineProperty({}, asset, results); -1 44018 }); -1 44019 })).then(function(results) { -1 44020 var preloadAssets = results.reduce(function(out, result) { -1 44021 return _extends({}, out, result); -1 44022 }, {}); -1 44023 clearTimeout(preloadTimeout); -1 44024 resolve(preloadAssets); -1 44025 })['catch'](function(err2) { -1 44026 clearTimeout(preloadTimeout); -1 44027 reject(err2); -1 44028 }); -1 44029 }); -1 44030 } -1 44031 var preload_default = preload; -1 44032 function getIncompleteReason(checkData, messages) { -1 44033 function getDefaultMsg(messages2) { -1 44034 if (messages2.incomplete && messages2.incomplete['default']) { -1 44035 return messages2.incomplete['default']; -1 44036 } else { -1 44037 return incomplete_fallback_msg_default(); 26203 44038 }26204 -1 return result;26205 -1 };26206 -1 },26207 -1 './node_modules/core-js-pure/internals/object-keys.js': function node_modulesCoreJsPureInternalsObjectKeysJs(module, exports, __webpack_require__) {26208 -1 var internalObjectKeys = __webpack_require__('./node_modules/core-js-pure/internals/object-keys-internal.js');26209 -1 var enumBugKeys = __webpack_require__('./node_modules/core-js-pure/internals/enum-bug-keys.js');26210 -1 module.exports = Object.keys || function keys(O) {26211 -1 return internalObjectKeys(O, enumBugKeys);26212 -1 };26213 -1 },26214 -1 './node_modules/core-js-pure/internals/object-property-is-enumerable.js': function node_modulesCoreJsPureInternalsObjectPropertyIsEnumerableJs(module, exports, __webpack_require__) {26215 -1 'use strict';26216 -1 var nativePropertyIsEnumerable = {}.propertyIsEnumerable;26217 -1 var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;26218 -1 var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({26219 -1 1: 226220 -1 }, 1);26221 -1 exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {26222 -1 var descriptor = getOwnPropertyDescriptor(this, V);26223 -1 return !!descriptor && descriptor.enumerable;26224 -1 } : nativePropertyIsEnumerable;26225 -1 },26226 -1 './node_modules/core-js-pure/internals/object-set-prototype-of.js': function node_modulesCoreJsPureInternalsObjectSetPrototypeOfJs(module, exports, __webpack_require__) {26227 -1 var anObject = __webpack_require__('./node_modules/core-js-pure/internals/an-object.js');26228 -1 var aPossiblePrototype = __webpack_require__('./node_modules/core-js-pure/internals/a-possible-prototype.js');26229 -1 module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function() {26230 -1 var CORRECT_SETTER = false;26231 -1 var test = {};26232 -1 var setter;-1 44039 } -1 44040 if (checkData && checkData.missingData) { 26233 44041 try {26234 -1 setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;26235 -1 setter.call(test, []);26236 -1 CORRECT_SETTER = test instanceof Array;26237 -1 } catch (error) {}26238 -1 return function setPrototypeOf(O, proto) {26239 -1 anObject(O);26240 -1 aPossiblePrototype(proto);26241 -1 if (CORRECT_SETTER) {26242 -1 setter.call(O, proto);26243 -1 } else {26244 -1 O.__proto__ = proto;-1 44042 var msg = messages.incomplete[checkData.missingData[0].reason]; -1 44043 if (!msg) { -1 44044 throw new Error(); 26245 44045 }26246 -1 return O;26247 -1 };26248 -1 }() : undefined);26249 -1 },26250 -1 './node_modules/core-js-pure/internals/object-to-string.js': function node_modulesCoreJsPureInternalsObjectToStringJs(module, exports, __webpack_require__) {26251 -1 'use strict';26252 -1 var TO_STRING_TAG_SUPPORT = __webpack_require__('./node_modules/core-js-pure/internals/to-string-tag-support.js');26253 -1 var classof = __webpack_require__('./node_modules/core-js-pure/internals/classof.js');26254 -1 module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {26255 -1 return '[object ' + classof(this) + ']';26256 -1 };26257 -1 },26258 -1 './node_modules/core-js-pure/internals/path.js': function node_modulesCoreJsPureInternalsPathJs(module, exports) {26259 -1 module.exports = {};26260 -1 },26261 -1 './node_modules/core-js-pure/internals/perform.js': function node_modulesCoreJsPureInternalsPerformJs(module, exports) {26262 -1 module.exports = function(exec) {26263 -1 try {26264 -1 return {26265 -1 error: false,26266 -1 value: exec()26267 -1 };26268 -1 } catch (error) {26269 -1 return {26270 -1 error: true,26271 -1 value: error26272 -1 };26273 -1 }26274 -1 };26275 -1 },26276 -1 './node_modules/core-js-pure/internals/promise-resolve.js': function node_modulesCoreJsPureInternalsPromiseResolveJs(module, exports, __webpack_require__) {26277 -1 var anObject = __webpack_require__('./node_modules/core-js-pure/internals/an-object.js');26278 -1 var isObject = __webpack_require__('./node_modules/core-js-pure/internals/is-object.js');26279 -1 var newPromiseCapability = __webpack_require__('./node_modules/core-js-pure/internals/new-promise-capability.js');26280 -1 module.exports = function(C, x) {26281 -1 anObject(C);26282 -1 if (isObject(x) && x.constructor === C) {26283 -1 return x;26284 -1 }26285 -1 var promiseCapability = newPromiseCapability.f(C);26286 -1 var resolve = promiseCapability.resolve;26287 -1 resolve(x);26288 -1 return promiseCapability.promise;26289 -1 };26290 -1 },26291 -1 './node_modules/core-js-pure/internals/redefine-all.js': function node_modulesCoreJsPureInternalsRedefineAllJs(module, exports, __webpack_require__) {26292 -1 var redefine = __webpack_require__('./node_modules/core-js-pure/internals/redefine.js');26293 -1 module.exports = function(target, src, options) {26294 -1 for (var key in src) {26295 -1 if (options && options.unsafe && target[key]) {26296 -1 target[key] = src[key];-1 44046 return msg; -1 44047 } catch (e) { -1 44048 if (typeof checkData.missingData === 'string') { -1 44049 return messages.incomplete[checkData.missingData]; 26297 44050 } else {26298 -1 redefine(target, key, src[key], options);-1 44051 return getDefaultMsg(messages); 26299 44052 } 26300 44053 }26301 -1 return target;26302 -1 };26303 -1 },26304 -1 './node_modules/core-js-pure/internals/redefine.js': function node_modulesCoreJsPureInternalsRedefineJs(module, exports, __webpack_require__) {26305 -1 var createNonEnumerableProperty = __webpack_require__('./node_modules/core-js-pure/internals/create-non-enumerable-property.js');26306 -1 module.exports = function(target, key, value, options) {26307 -1 if (options && options.enumerable) {26308 -1 target[key] = value;26309 -1 } else {26310 -1 createNonEnumerableProperty(target, key, value);26311 -1 }26312 -1 };26313 -1 },26314 -1 './node_modules/core-js-pure/internals/require-object-coercible.js': function node_modulesCoreJsPureInternalsRequireObjectCoercibleJs(module, exports) {26315 -1 module.exports = function(it) {26316 -1 if (it == undefined) {26317 -1 throw TypeError('Can\'t call method on ' + it);26318 -1 }26319 -1 return it;26320 -1 };26321 -1 },26322 -1 './node_modules/core-js-pure/internals/set-global.js': function node_modulesCoreJsPureInternalsSetGlobalJs(module, exports, __webpack_require__) {26323 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');26324 -1 var createNonEnumerableProperty = __webpack_require__('./node_modules/core-js-pure/internals/create-non-enumerable-property.js');26325 -1 module.exports = function(key, value) {26326 -1 try {26327 -1 createNonEnumerableProperty(global, key, value);26328 -1 } catch (error) {26329 -1 global[key] = value;26330 -1 }26331 -1 return value;26332 -1 };26333 -1 },26334 -1 './node_modules/core-js-pure/internals/set-species.js': function node_modulesCoreJsPureInternalsSetSpeciesJs(module, exports, __webpack_require__) {26335 -1 'use strict';26336 -1 var getBuiltIn = __webpack_require__('./node_modules/core-js-pure/internals/get-built-in.js');26337 -1 var definePropertyModule = __webpack_require__('./node_modules/core-js-pure/internals/object-define-property.js');26338 -1 var wellKnownSymbol = __webpack_require__('./node_modules/core-js-pure/internals/well-known-symbol.js');26339 -1 var DESCRIPTORS = __webpack_require__('./node_modules/core-js-pure/internals/descriptors.js');26340 -1 var SPECIES = wellKnownSymbol('species');26341 -1 module.exports = function(CONSTRUCTOR_NAME) {26342 -1 var Constructor = getBuiltIn(CONSTRUCTOR_NAME);26343 -1 var defineProperty = definePropertyModule.f;26344 -1 if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {26345 -1 defineProperty(Constructor, SPECIES, {26346 -1 configurable: true,26347 -1 get: function get() {26348 -1 return this;26349 -1 }26350 -1 });26351 -1 }26352 -1 };26353 -1 },26354 -1 './node_modules/core-js-pure/internals/set-to-string-tag.js': function node_modulesCoreJsPureInternalsSetToStringTagJs(module, exports, __webpack_require__) {26355 -1 var TO_STRING_TAG_SUPPORT = __webpack_require__('./node_modules/core-js-pure/internals/to-string-tag-support.js');26356 -1 var defineProperty = __webpack_require__('./node_modules/core-js-pure/internals/object-define-property.js').f;26357 -1 var createNonEnumerableProperty = __webpack_require__('./node_modules/core-js-pure/internals/create-non-enumerable-property.js');26358 -1 var has = __webpack_require__('./node_modules/core-js-pure/internals/has.js');26359 -1 var toString = __webpack_require__('./node_modules/core-js-pure/internals/object-to-string.js');26360 -1 var wellKnownSymbol = __webpack_require__('./node_modules/core-js-pure/internals/well-known-symbol.js');26361 -1 var TO_STRING_TAG = wellKnownSymbol('toStringTag');26362 -1 module.exports = function(it, TAG, STATIC, SET_METHOD) {26363 -1 if (it) {26364 -1 var target = STATIC ? it : it.prototype;26365 -1 if (!has(target, TO_STRING_TAG)) {26366 -1 defineProperty(target, TO_STRING_TAG, {26367 -1 configurable: true,26368 -1 value: TAG26369 -1 });26370 -1 }26371 -1 if (SET_METHOD && !TO_STRING_TAG_SUPPORT) {26372 -1 createNonEnumerableProperty(target, 'toString', toString);-1 44054 } else if (checkData && checkData.messageKey) { -1 44055 return messages.incomplete[checkData.messageKey]; -1 44056 } else { -1 44057 return getDefaultMsg(messages); -1 44058 } -1 44059 } -1 44060 function extender(checksData, shouldBeTrue, rule3) { -1 44061 return function(check4) { -1 44062 var sourceData = checksData[check4.id] || {}; -1 44063 var messages = sourceData.messages || {}; -1 44064 var data2 = Object.assign({}, sourceData); -1 44065 delete data2.messages; -1 44066 if (!rule3.reviewOnFail && check4.result === void 0) { -1 44067 if (_typeof(messages.incomplete) === 'object' && !Array.isArray(check4.data)) { -1 44068 data2.message = getIncompleteReason(check4.data, messages); -1 44069 } -1 44070 if (!data2.message) { -1 44071 data2.message = messages.incomplete; 26373 44072 }26374 -1 }26375 -1 };26376 -1 },26377 -1 './node_modules/core-js-pure/internals/shared-key.js': function node_modulesCoreJsPureInternalsSharedKeyJs(module, exports, __webpack_require__) {26378 -1 var shared = __webpack_require__('./node_modules/core-js-pure/internals/shared.js');26379 -1 var uid = __webpack_require__('./node_modules/core-js-pure/internals/uid.js');26380 -1 var keys = shared('keys');26381 -1 module.exports = function(key) {26382 -1 return keys[key] || (keys[key] = uid(key));26383 -1 };26384 -1 },26385 -1 './node_modules/core-js-pure/internals/shared-store.js': function node_modulesCoreJsPureInternalsSharedStoreJs(module, exports, __webpack_require__) {26386 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');26387 -1 var setGlobal = __webpack_require__('./node_modules/core-js-pure/internals/set-global.js');26388 -1 var SHARED = '__core-js_shared__';26389 -1 var store = global[SHARED] || setGlobal(SHARED, {});26390 -1 module.exports = store;26391 -1 },26392 -1 './node_modules/core-js-pure/internals/shared.js': function node_modulesCoreJsPureInternalsSharedJs(module, exports, __webpack_require__) {26393 -1 var IS_PURE = __webpack_require__('./node_modules/core-js-pure/internals/is-pure.js');26394 -1 var store = __webpack_require__('./node_modules/core-js-pure/internals/shared-store.js');26395 -1 (module.exports = function(key, value) {26396 -1 return store[key] || (store[key] = value !== undefined ? value : {});26397 -1 })('versions', []).push({26398 -1 version: '3.6.4',26399 -1 mode: IS_PURE ? 'pure' : 'global',26400 -1 copyright: '\xa9 2020 Denis Pushkarev (zloirock.ru)'26401 -1 });26402 -1 },26403 -1 './node_modules/core-js-pure/internals/species-constructor.js': function node_modulesCoreJsPureInternalsSpeciesConstructorJs(module, exports, __webpack_require__) {26404 -1 var anObject = __webpack_require__('./node_modules/core-js-pure/internals/an-object.js');26405 -1 var aFunction = __webpack_require__('./node_modules/core-js-pure/internals/a-function.js');26406 -1 var wellKnownSymbol = __webpack_require__('./node_modules/core-js-pure/internals/well-known-symbol.js');26407 -1 var SPECIES = wellKnownSymbol('species');26408 -1 module.exports = function(O, defaultConstructor) {26409 -1 var C = anObject(O).constructor;26410 -1 var S;26411 -1 return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);26412 -1 };26413 -1 },26414 -1 './node_modules/core-js-pure/internals/string-multibyte.js': function node_modulesCoreJsPureInternalsStringMultibyteJs(module, exports, __webpack_require__) {26415 -1 var toInteger = __webpack_require__('./node_modules/core-js-pure/internals/to-integer.js');26416 -1 var requireObjectCoercible = __webpack_require__('./node_modules/core-js-pure/internals/require-object-coercible.js');26417 -1 var createMethod = function createMethod(CONVERT_TO_STRING) {26418 -1 return function($this, pos) {26419 -1 var S = String(requireObjectCoercible($this));26420 -1 var position = toInteger(pos);26421 -1 var size = S.length;26422 -1 var first, second;26423 -1 if (position < 0 || position >= size) {26424 -1 return CONVERT_TO_STRING ? '' : undefined;26425 -1 }26426 -1 first = S.charCodeAt(position);26427 -1 return first < 55296 || first > 56319 || position + 1 === size || (second = S.charCodeAt(position + 1)) < 56320 || second > 57343 ? CONVERT_TO_STRING ? S.charAt(position) : first : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 55296 << 10) + (second - 56320) + 65536;26428 -1 };26429 -1 };26430 -1 module.exports = {26431 -1 codeAt: createMethod(false),26432 -1 charAt: createMethod(true)26433 -1 };26434 -1 },26435 -1 './node_modules/core-js-pure/internals/task.js': function node_modulesCoreJsPureInternalsTaskJs(module, exports, __webpack_require__) {26436 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');26437 -1 var fails = __webpack_require__('./node_modules/core-js-pure/internals/fails.js');26438 -1 var classof = __webpack_require__('./node_modules/core-js-pure/internals/classof-raw.js');26439 -1 var bind = __webpack_require__('./node_modules/core-js-pure/internals/function-bind-context.js');26440 -1 var html = __webpack_require__('./node_modules/core-js-pure/internals/html.js');26441 -1 var createElement = __webpack_require__('./node_modules/core-js-pure/internals/document-create-element.js');26442 -1 var IS_IOS = __webpack_require__('./node_modules/core-js-pure/internals/engine-is-ios.js');26443 -1 var location = global.location;26444 -1 var set = global.setImmediate;26445 -1 var clear = global.clearImmediate;26446 -1 var process = global.process;26447 -1 var MessageChannel = global.MessageChannel;26448 -1 var Dispatch = global.Dispatch;26449 -1 var counter = 0;26450 -1 var queue = {};26451 -1 var ONREADYSTATECHANGE = 'onreadystatechange';26452 -1 var defer, channel, port;26453 -1 var run = function run(id) {26454 -1 if (queue.hasOwnProperty(id)) {26455 -1 var fn = queue[id];26456 -1 delete queue[id];26457 -1 fn();26458 -1 }26459 -1 };26460 -1 var runner = function runner(id) {26461 -1 return function() {26462 -1 run(id);26463 -1 };26464 -1 };26465 -1 var listener = function listener(event) {26466 -1 run(event.data);26467 -1 };26468 -1 var post = function post(id) {26469 -1 global.postMessage(id + '', location.protocol + '//' + location.host);26470 -1 };26471 -1 if (!set || !clear) {26472 -1 set = function setImmediate(fn) {26473 -1 var args = [];26474 -1 var i = 1;26475 -1 while (arguments.length > i) {26476 -1 args.push(arguments[i++]);26477 -1 }26478 -1 queue[++counter] = function() {26479 -1 (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);26480 -1 };26481 -1 defer(counter);26482 -1 return counter;26483 -1 };26484 -1 clear = function clearImmediate(id) {26485 -1 delete queue[id];26486 -1 };26487 -1 if (classof(process) == 'process') {26488 -1 defer = function defer(id) {26489 -1 process.nextTick(runner(id));26490 -1 };26491 -1 } else if (Dispatch && Dispatch.now) {26492 -1 defer = function defer(id) {26493 -1 Dispatch.now(runner(id));26494 -1 };26495 -1 } else if (MessageChannel && !IS_IOS) {26496 -1 channel = new MessageChannel();26497 -1 port = channel.port2;26498 -1 channel.port1.onmessage = listener;26499 -1 defer = bind(port.postMessage, port, 1);26500 -1 } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts && !fails(post) && location.protocol !== 'file:') {26501 -1 defer = post;26502 -1 global.addEventListener('message', listener, false);26503 -1 } else if (ONREADYSTATECHANGE in createElement('script')) {26504 -1 defer = function defer(id) {26505 -1 html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function() {26506 -1 html.removeChild(this);26507 -1 run(id);26508 -1 };26509 -1 };26510 44073 } else {26511 -1 defer = function defer(id) {26512 -1 setTimeout(runner(id), 0);26513 -1 };26514 -1 }26515 -1 }26516 -1 module.exports = {26517 -1 set: set,26518 -1 clear: clear26519 -1 };26520 -1 },26521 -1 './node_modules/core-js-pure/internals/to-absolute-index.js': function node_modulesCoreJsPureInternalsToAbsoluteIndexJs(module, exports, __webpack_require__) {26522 -1 var toInteger = __webpack_require__('./node_modules/core-js-pure/internals/to-integer.js');26523 -1 var max = Math.max;26524 -1 var min = Math.min;26525 -1 module.exports = function(index, length) {26526 -1 var integer = toInteger(index);26527 -1 return integer < 0 ? max(integer + length, 0) : min(integer, length);26528 -1 };26529 -1 },26530 -1 './node_modules/core-js-pure/internals/to-indexed-object.js': function node_modulesCoreJsPureInternalsToIndexedObjectJs(module, exports, __webpack_require__) {26531 -1 var IndexedObject = __webpack_require__('./node_modules/core-js-pure/internals/indexed-object.js');26532 -1 var requireObjectCoercible = __webpack_require__('./node_modules/core-js-pure/internals/require-object-coercible.js');26533 -1 module.exports = function(it) {26534 -1 return IndexedObject(requireObjectCoercible(it));26535 -1 };26536 -1 },26537 -1 './node_modules/core-js-pure/internals/to-integer.js': function node_modulesCoreJsPureInternalsToIntegerJs(module, exports) {26538 -1 var ceil = Math.ceil;26539 -1 var floor = Math.floor;26540 -1 module.exports = function(argument) {26541 -1 return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);26542 -1 };26543 -1 },26544 -1 './node_modules/core-js-pure/internals/to-length.js': function node_modulesCoreJsPureInternalsToLengthJs(module, exports, __webpack_require__) {26545 -1 var toInteger = __webpack_require__('./node_modules/core-js-pure/internals/to-integer.js');26546 -1 var min = Math.min;26547 -1 module.exports = function(argument) {26548 -1 return argument > 0 ? min(toInteger(argument), 9007199254740991) : 0;26549 -1 };26550 -1 },26551 -1 './node_modules/core-js-pure/internals/to-object.js': function node_modulesCoreJsPureInternalsToObjectJs(module, exports, __webpack_require__) {26552 -1 var requireObjectCoercible = __webpack_require__('./node_modules/core-js-pure/internals/require-object-coercible.js');26553 -1 module.exports = function(argument) {26554 -1 return Object(requireObjectCoercible(argument));26555 -1 };26556 -1 },26557 -1 './node_modules/core-js-pure/internals/to-primitive.js': function node_modulesCoreJsPureInternalsToPrimitiveJs(module, exports, __webpack_require__) {26558 -1 var isObject = __webpack_require__('./node_modules/core-js-pure/internals/is-object.js');26559 -1 module.exports = function(input, PREFERRED_STRING) {26560 -1 if (!isObject(input)) {26561 -1 return input;-1 44074 data2.message = check4.result === shouldBeTrue ? messages.pass : messages.fail; 26562 44075 }26563 -1 var fn, val;26564 -1 if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) {26565 -1 return val;-1 44076 if (typeof data2.message !== 'function') { -1 44077 data2.message = process_message_default(data2.message, check4.data); 26566 44078 }26567 -1 if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) {26568 -1 return val;-1 44079 extend_meta_data_default(check4, data2); -1 44080 }; -1 44081 } -1 44082 function publishMetaData(ruleResult) { -1 44083 var checksData = axe._audit.data.checks || {}; -1 44084 var rulesData = axe._audit.data.rules || {}; -1 44085 var rule3 = find_by_default(axe._audit.rules, 'id', ruleResult.id) || {}; -1 44086 ruleResult.tags = clone_default(rule3.tags || []); -1 44087 var shouldBeTrue = extender(checksData, true, rule3); -1 44088 var shouldBeFalse = extender(checksData, false, rule3); -1 44089 ruleResult.nodes.forEach(function(detail) { -1 44090 detail.any.forEach(shouldBeTrue); -1 44091 detail.all.forEach(shouldBeTrue); -1 44092 detail.none.forEach(shouldBeFalse); -1 44093 }); -1 44094 extend_meta_data_default(ruleResult, clone_default(rulesData[ruleResult.id] || {})); -1 44095 } -1 44096 var publish_metadata_default = publishMetaData; -1 44097 function querySelectorAll(domTree, selector) { -1 44098 return query_selector_all_filter_default(domTree, selector); -1 44099 } -1 44100 var query_selector_all_default = querySelectorAll; -1 44101 function matchTags(rule3, runOnly) { -1 44102 var include, exclude, matching; -1 44103 var defaultExclude = axe._audit && axe._audit.tagExclude ? axe._audit.tagExclude : []; -1 44104 if (runOnly.hasOwnProperty('include') || runOnly.hasOwnProperty('exclude')) { -1 44105 include = runOnly.include || []; -1 44106 include = Array.isArray(include) ? include : [ include ]; -1 44107 exclude = runOnly.exclude || []; -1 44108 exclude = Array.isArray(exclude) ? exclude : [ exclude ]; -1 44109 exclude = exclude.concat(defaultExclude.filter(function(tag) { -1 44110 return include.indexOf(tag) === -1; -1 44111 })); -1 44112 } else { -1 44113 include = Array.isArray(runOnly) ? runOnly : [ runOnly ]; -1 44114 exclude = defaultExclude.filter(function(tag) { -1 44115 return include.indexOf(tag) === -1; -1 44116 }); -1 44117 } -1 44118 matching = include.some(function(tag) { -1 44119 return rule3.tags.indexOf(tag) !== -1; -1 44120 }); -1 44121 if (matching || include.length === 0 && rule3.enabled !== false) { -1 44122 return exclude.every(function(tag) { -1 44123 return rule3.tags.indexOf(tag) === -1; -1 44124 }); -1 44125 } else { -1 44126 return false; -1 44127 } -1 44128 } -1 44129 function ruleShouldRun(rule3, context3, options) { -1 44130 var runOnly = options.runOnly || {}; -1 44131 var ruleOptions = (options.rules || {})[rule3.id]; -1 44132 if (rule3.pageLevel && !context3.page) { -1 44133 return false; -1 44134 } else if (runOnly.type === 'rule') { -1 44135 return runOnly.values.indexOf(rule3.id) !== -1; -1 44136 } else if (ruleOptions && typeof ruleOptions.enabled === 'boolean') { -1 44137 return ruleOptions.enabled; -1 44138 } else if (runOnly.type === 'tag' && runOnly.values) { -1 44139 return matchTags(rule3, runOnly.values); -1 44140 } else { -1 44141 return matchTags(rule3, []); -1 44142 } -1 44143 } -1 44144 var rule_should_run_default = ruleShouldRun; -1 44145 function attributeMatches(node, attrName, filterAttrs) { -1 44146 if (typeof filterAttrs[attrName] === 'undefined') { -1 44147 return false; -1 44148 } -1 44149 if (filterAttrs[attrName] === true) { -1 44150 return true; -1 44151 } -1 44152 return element_matches_default(node, filterAttrs[attrName]); -1 44153 } -1 44154 function filterHtmlAttrs(element, filterAttrs) { -1 44155 if (!filterAttrs) { -1 44156 return element; -1 44157 } -1 44158 var node = element.cloneNode(false); -1 44159 var outerHTML = node.outerHTML; -1 44160 var attributes4 = get_node_attributes_default(node); -1 44161 if (cache_default.get(outerHTML)) { -1 44162 node = cache_default.get(outerHTML); -1 44163 } else if (attributes4) { -1 44164 node = document.createElement(node.nodeName); -1 44165 Array.from(attributes4).forEach(function(attr) { -1 44166 if (!attributeMatches(element, attr.name, filterAttrs)) { -1 44167 node.setAttribute(attr.name, attr.value); -1 44168 } -1 44169 }); -1 44170 cache_default.set(outerHTML, node); -1 44171 } -1 44172 Array.from(element.childNodes).forEach(function(child) { -1 44173 node.appendChild(filterHtmlAttrs(child, filterAttrs)); -1 44174 }); -1 44175 return node; -1 44176 } -1 44177 var filter_html_attrs_default = filterHtmlAttrs; -1 44178 function pushNode(result, nodes) { -1 44179 var temp; -1 44180 if (result.length === 0) { -1 44181 return nodes; -1 44182 } -1 44183 if (result.length < nodes.length) { -1 44184 temp = result; -1 44185 result = nodes; -1 44186 nodes = temp; -1 44187 } -1 44188 for (var _i9 = 0, l = nodes.length; _i9 < l; _i9++) { -1 44189 if (!result.includes(nodes[_i9])) { -1 44190 result.push(nodes[_i9]); 26569 44191 }26570 -1 if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) {26571 -1 return val;-1 44192 } -1 44193 return result; -1 44194 } -1 44195 function reduceIncludes(includes) { -1 44196 return includes.reduce(function(res, el) { -1 44197 if (!res.length || !contains_default(res[res.length - 1], el)) { -1 44198 res.push(el); 26572 44199 }26573 -1 throw TypeError('Can\'t convert object to primitive value');26574 -1 };26575 -1 },26576 -1 './node_modules/core-js-pure/internals/to-string-tag-support.js': function node_modulesCoreJsPureInternalsToStringTagSupportJs(module, exports, __webpack_require__) {26577 -1 var wellKnownSymbol = __webpack_require__('./node_modules/core-js-pure/internals/well-known-symbol.js');26578 -1 var TO_STRING_TAG = wellKnownSymbol('toStringTag');26579 -1 var test = {};26580 -1 test[TO_STRING_TAG] = 'z';26581 -1 module.exports = String(test) === '[object z]';26582 -1 },26583 -1 './node_modules/core-js-pure/internals/uid.js': function node_modulesCoreJsPureInternalsUidJs(module, exports) {26584 -1 var id = 0;26585 -1 var postfix = Math.random();26586 -1 module.exports = function(key) {26587 -1 return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);26588 -1 };26589 -1 },26590 -1 './node_modules/core-js-pure/internals/use-symbol-as-uid.js': function node_modulesCoreJsPureInternalsUseSymbolAsUidJs(module, exports, __webpack_require__) {26591 -1 var NATIVE_SYMBOL = __webpack_require__('./node_modules/core-js-pure/internals/native-symbol.js');26592 -1 module.exports = NATIVE_SYMBOL && !Symbol.sham && _typeof(Symbol.iterator) == 'symbol';26593 -1 },26594 -1 './node_modules/core-js-pure/internals/well-known-symbol.js': function node_modulesCoreJsPureInternalsWellKnownSymbolJs(module, exports, __webpack_require__) {26595 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');26596 -1 var shared = __webpack_require__('./node_modules/core-js-pure/internals/shared.js');26597 -1 var has = __webpack_require__('./node_modules/core-js-pure/internals/has.js');26598 -1 var uid = __webpack_require__('./node_modules/core-js-pure/internals/uid.js');26599 -1 var NATIVE_SYMBOL = __webpack_require__('./node_modules/core-js-pure/internals/native-symbol.js');26600 -1 var USE_SYMBOL_AS_UID = __webpack_require__('./node_modules/core-js-pure/internals/use-symbol-as-uid.js');26601 -1 var WellKnownSymbolsStore = shared('wks');26602 -1 var _Symbol = global.Symbol;26603 -1 var createWellKnownSymbol = USE_SYMBOL_AS_UID ? _Symbol : _Symbol && _Symbol.withoutSetter || uid;26604 -1 module.exports = function(name) {26605 -1 if (!has(WellKnownSymbolsStore, name)) {26606 -1 if (NATIVE_SYMBOL && has(_Symbol, name)) {26607 -1 WellKnownSymbolsStore[name] = _Symbol[name];26608 -1 } else {26609 -1 WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);-1 44200 return res; -1 44201 }, []); -1 44202 } -1 44203 function select(selector, context3) { -1 44204 var result = []; -1 44205 var candidate; -1 44206 if (axe._selectCache) { -1 44207 for (var j = 0, l = axe._selectCache.length; j < l; j++) { -1 44208 var item = axe._selectCache[j]; -1 44209 if (item.selector === selector) { -1 44210 return item.result; 26610 44211 } 26611 44212 }26612 -1 return WellKnownSymbolsStore[name];26613 -1 };26614 -1 },26615 -1 './node_modules/core-js-pure/modules/es.array.iterator.js': function node_modulesCoreJsPureModulesEsArrayIteratorJs(module, exports, __webpack_require__) {26616 -1 'use strict';26617 -1 var toIndexedObject = __webpack_require__('./node_modules/core-js-pure/internals/to-indexed-object.js');26618 -1 var addToUnscopables = __webpack_require__('./node_modules/core-js-pure/internals/add-to-unscopables.js');26619 -1 var Iterators = __webpack_require__('./node_modules/core-js-pure/internals/iterators.js');26620 -1 var InternalStateModule = __webpack_require__('./node_modules/core-js-pure/internals/internal-state.js');26621 -1 var defineIterator = __webpack_require__('./node_modules/core-js-pure/internals/define-iterator.js');26622 -1 var ARRAY_ITERATOR = 'Array Iterator';26623 -1 var setInternalState = InternalStateModule.set;26624 -1 var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);26625 -1 module.exports = defineIterator(Array, 'Array', function(iterated, kind) {26626 -1 setInternalState(this, {26627 -1 type: ARRAY_ITERATOR,26628 -1 target: toIndexedObject(iterated),26629 -1 index: 0,26630 -1 kind: kind-1 44213 } -1 44214 var curried = function(context4) { -1 44215 return function(node) { -1 44216 return is_node_in_context_default(node, context4); -1 44217 }; -1 44218 }(context3); -1 44219 var reducedIncludes = reduceIncludes(context3.include); -1 44220 for (var _i10 = 0; _i10 < reducedIncludes.length; _i10++) { -1 44221 candidate = reducedIncludes[_i10]; -1 44222 result = pushNode(result, query_selector_all_filter_default(candidate, selector, curried)); -1 44223 } -1 44224 if (axe._selectCache) { -1 44225 axe._selectCache.push({ -1 44226 selector: selector, -1 44227 result: result 26631 44228 });26632 -1 }, function() {26633 -1 var state = getInternalState(this);26634 -1 var target = state.target;26635 -1 var kind = state.kind;26636 -1 var index = state.index++;26637 -1 if (!target || index >= target.length) {26638 -1 state.target = undefined;26639 -1 return {26640 -1 value: undefined,26641 -1 done: true26642 -1 };-1 44229 } -1 44230 return result; -1 44231 } -1 44232 var select_default = select; -1 44233 function setScroll(elm, top, left) { -1 44234 if (elm === window) { -1 44235 return elm.scroll(left, top); -1 44236 } else { -1 44237 elm.scrollTop = top; -1 44238 elm.scrollLeft = left; -1 44239 } -1 44240 } -1 44241 function setScrollState(scrollState) { -1 44242 scrollState.forEach(function(_ref21) { -1 44243 var elm = _ref21.elm, top = _ref21.top, left = _ref21.left; -1 44244 return setScroll(elm, top, left); -1 44245 }); -1 44246 } -1 44247 var set_scroll_state_default = setScrollState; -1 44248 function tokenList(str) { -1 44249 return (str || '').trim().replace(/\s{2,}/g, ' ').split(' '); -1 44250 } -1 44251 var token_list_default = tokenList; -1 44252 function validInputTypes() { -1 44253 return [ 'hidden', 'text', 'search', 'tel', 'url', 'email', 'password', 'date', 'month', 'week', 'time', 'datetime-local', 'number', 'range', 'color', 'checkbox', 'radio', 'file', 'submit', 'image', 'reset', 'button' ]; -1 44254 } -1 44255 var valid_input_type_default = validInputTypes; -1 44256 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 44257 function isValidLang(lang) { -1 44258 var array = langs; -1 44259 while (lang.length < 3) { -1 44260 lang += '`'; -1 44261 } -1 44262 for (var _i11 = 0; _i11 <= lang.length - 1; _i11++) { -1 44263 var index = lang.charCodeAt(_i11) - 96; -1 44264 array = array[index]; -1 44265 if (!array) { -1 44266 return false; 26643 44267 }26644 -1 if (kind == 'keys') {26645 -1 return {26646 -1 value: index,26647 -1 done: false26648 -1 };-1 44268 } -1 44269 return true; -1 44270 } -1 44271 function _validLangs(langArray) { -1 44272 langArray = Array.isArray(langArray) ? langArray : langs; -1 44273 var codes = []; -1 44274 langArray.forEach(function(lang, index) { -1 44275 var _char2 = String.fromCharCode(index + 96).replace('`', ''); -1 44276 if (Array.isArray(lang)) { -1 44277 codes = codes.concat(_validLangs(lang).map(function(newLang) { -1 44278 return _char2 + newLang; -1 44279 })); -1 44280 } else { -1 44281 codes.push(_char2); 26649 44282 }26650 -1 if (kind == 'values') {26651 -1 return {26652 -1 value: target[index],26653 -1 done: false26654 -1 };-1 44283 }); -1 44284 return codes; -1 44285 } -1 44286 var valid_langs_default = isValidLang; -1 44287 axe._thisWillBeDeletedDoNotUse = axe._thisWillBeDeletedDoNotUse || {}; -1 44288 axe._thisWillBeDeletedDoNotUse.utils = { -1 44289 setDefaultFrameMessenger: setDefaultFrameMessenger -1 44290 }; -1 44291 var SerialVirtualNode = function(_abstract_virtual_nod2) { -1 44292 _inherits(SerialVirtualNode, _abstract_virtual_nod2); -1 44293 var _super2 = _createSuper(SerialVirtualNode); -1 44294 function SerialVirtualNode(serialNode) { -1 44295 var _this2; -1 44296 _classCallCheck(this, SerialVirtualNode); -1 44297 _this2 = _super2.call(this); -1 44298 _this2._props = normaliseProps(serialNode); -1 44299 _this2._attrs = normaliseAttrs(serialNode); -1 44300 return _this2; -1 44301 } -1 44302 _createClass(SerialVirtualNode, [ { -1 44303 key: 'props', -1 44304 get: function get() { -1 44305 return this._props; 26655 44306 }26656 -1 return {26657 -1 value: [ index, target[index] ],26658 -1 done: false26659 -1 };26660 -1 }, 'values');26661 -1 Iterators.Arguments = Iterators.Array;26662 -1 addToUnscopables('keys');26663 -1 addToUnscopables('values');26664 -1 addToUnscopables('entries');26665 -1 },26666 -1 './node_modules/core-js-pure/modules/es.object.to-string.js': function node_modulesCoreJsPureModulesEsObjectToStringJs(module, exports) {},26667 -1 './node_modules/core-js-pure/modules/es.promise.all-settled.js': function node_modulesCoreJsPureModulesEsPromiseAllSettledJs(module, exports, __webpack_require__) {26668 -1 'use strict';26669 -1 var $ = __webpack_require__('./node_modules/core-js-pure/internals/export.js');26670 -1 var aFunction = __webpack_require__('./node_modules/core-js-pure/internals/a-function.js');26671 -1 var newPromiseCapabilityModule = __webpack_require__('./node_modules/core-js-pure/internals/new-promise-capability.js');26672 -1 var perform = __webpack_require__('./node_modules/core-js-pure/internals/perform.js');26673 -1 var iterate = __webpack_require__('./node_modules/core-js-pure/internals/iterate.js');26674 -1 $({26675 -1 target: 'Promise',26676 -1 stat: true26677 44307 }, {26678 -1 allSettled: function allSettled(iterable) {26679 -1 var C = this;26680 -1 var capability = newPromiseCapabilityModule.f(C);26681 -1 var resolve = capability.resolve;26682 -1 var reject = capability.reject;26683 -1 var result = perform(function() {26684 -1 var promiseResolve = aFunction(C.resolve);26685 -1 var values = [];26686 -1 var counter = 0;26687 -1 var remaining = 1;26688 -1 iterate(iterable, function(promise) {26689 -1 var index = counter++;26690 -1 var alreadyCalled = false;26691 -1 values.push(undefined);26692 -1 remaining++;26693 -1 promiseResolve.call(C, promise).then(function(value) {26694 -1 if (alreadyCalled) {26695 -1 return;26696 -1 }26697 -1 alreadyCalled = true;26698 -1 values[index] = {26699 -1 status: 'fulfilled',26700 -1 value: value26701 -1 };26702 -1 --remaining || resolve(values);26703 -1 }, function(e) {26704 -1 if (alreadyCalled) {26705 -1 return;26706 -1 }26707 -1 alreadyCalled = true;26708 -1 values[index] = {26709 -1 status: 'rejected',26710 -1 reason: e26711 -1 };26712 -1 --remaining || resolve(values);26713 -1 });26714 -1 });26715 -1 --remaining || resolve(values);26716 -1 });26717 -1 if (result.error) {26718 -1 reject(result.value);26719 -1 }26720 -1 return capability.promise;-1 44308 key: 'attr', -1 44309 value: function attr(attrName) { -1 44310 return this._attrs[attrName] || null; 26721 44311 }26722 -1 });26723 -1 },26724 -1 './node_modules/core-js-pure/modules/es.promise.finally.js': function node_modulesCoreJsPureModulesEsPromiseFinallyJs(module, exports, __webpack_require__) {26725 -1 'use strict';26726 -1 var $ = __webpack_require__('./node_modules/core-js-pure/internals/export.js');26727 -1 var IS_PURE = __webpack_require__('./node_modules/core-js-pure/internals/is-pure.js');26728 -1 var NativePromise = __webpack_require__('./node_modules/core-js-pure/internals/native-promise-constructor.js');26729 -1 var fails = __webpack_require__('./node_modules/core-js-pure/internals/fails.js');26730 -1 var getBuiltIn = __webpack_require__('./node_modules/core-js-pure/internals/get-built-in.js');26731 -1 var speciesConstructor = __webpack_require__('./node_modules/core-js-pure/internals/species-constructor.js');26732 -1 var promiseResolve = __webpack_require__('./node_modules/core-js-pure/internals/promise-resolve.js');26733 -1 var redefine = __webpack_require__('./node_modules/core-js-pure/internals/redefine.js');26734 -1 var NON_GENERIC = !!NativePromise && fails(function() {26735 -1 NativePromise.prototype['finally'].call({26736 -1 then: function then() {}26737 -1 }, function() {});26738 -1 });26739 -1 $({26740 -1 target: 'Promise',26741 -1 proto: true,26742 -1 real: true,26743 -1 forced: NON_GENERIC26744 44312 }, {26745 -1 finally: function _finally(onFinally) {26746 -1 var C = speciesConstructor(this, getBuiltIn('Promise'));26747 -1 var isFunction = typeof onFinally == 'function';26748 -1 return this.then(isFunction ? function(x) {26749 -1 return promiseResolve(C, onFinally()).then(function() {26750 -1 return x;26751 -1 });26752 -1 } : onFinally, isFunction ? function(e) {26753 -1 return promiseResolve(C, onFinally()).then(function() {26754 -1 throw e;26755 -1 });26756 -1 } : onFinally);-1 44313 key: 'hasAttr', -1 44314 value: function hasAttr(attrName) { -1 44315 return this._attrs[attrName] !== void 0; -1 44316 } -1 44317 }, { -1 44318 key: 'attrNames', -1 44319 get: function get() { -1 44320 return Object.keys(this._attrs); -1 44321 } -1 44322 } ]); -1 44323 return SerialVirtualNode; -1 44324 }(abstract_virtual_node_default); -1 44325 function normaliseProps(serialNode) { -1 44326 var nodeName2 = serialNode.nodeName; -1 44327 var _serialNode$nodeType = serialNode.nodeType, nodeType = _serialNode$nodeType === void 0 ? 1 : _serialNode$nodeType; -1 44328 assert_default(typeof nodeType === 'number', 'nodeType has to be a number, got \''.concat(nodeType, '\'')); -1 44329 assert_default(typeof nodeName2 === 'string', 'nodeName has to be a string, got \''.concat(nodeName2, '\'')); -1 44330 nodeName2 = nodeName2.toLowerCase(); -1 44331 var type = null; -1 44332 if (nodeName2 === 'input') { -1 44333 type = (serialNode.type || serialNode.attributes && serialNode.attributes.type || '').toLowerCase(); -1 44334 if (!valid_input_type_default().includes(type)) { -1 44335 type = 'text'; -1 44336 } -1 44337 } -1 44338 var props = _extends({}, serialNode, { -1 44339 nodeType: nodeType, -1 44340 nodeName: nodeName2 -1 44341 }); -1 44342 if (type) { -1 44343 props.type = type; -1 44344 } -1 44345 delete props.attributes; -1 44346 return Object.freeze(props); -1 44347 } -1 44348 function normaliseAttrs(_ref22) { -1 44349 var _ref22$attributes = _ref22.attributes, attributes4 = _ref22$attributes === void 0 ? {} : _ref22$attributes; -1 44350 var attrMap = { -1 44351 htmlFor: 'for', -1 44352 className: 'class' -1 44353 }; -1 44354 return Object.keys(attributes4).reduce(function(attrs, attrName) { -1 44355 var value = attributes4[attrName]; -1 44356 assert_default(_typeof(value) !== 'object' || value === null, 'expects attributes not to be an object, \''.concat(attrName, '\' was')); -1 44357 if (value !== void 0) { -1 44358 var mappedName = attrMap[attrName] || attrName; -1 44359 attrs[mappedName] = value !== null ? String(value) : null; 26757 44360 } -1 44361 return attrs; -1 44362 }, {}); -1 44363 } -1 44364 var serial_virtual_node_default = SerialVirtualNode; -1 44365 var aria_exports = {}; -1 44366 __export(aria_exports, { -1 44367 allowedAttr: function allowedAttr() { -1 44368 return allowed_attr_default; -1 44369 }, -1 44370 arialabelText: function arialabelText() { -1 44371 return arialabel_text_default; -1 44372 }, -1 44373 arialabelledbyText: function arialabelledbyText() { -1 44374 return arialabelledby_text_default; -1 44375 }, -1 44376 getAccessibleRefs: function getAccessibleRefs() { -1 44377 return get_accessible_refs_default; -1 44378 }, -1 44379 getElementUnallowedRoles: function getElementUnallowedRoles() { -1 44380 return get_element_unallowed_roles_default; -1 44381 }, -1 44382 getExplicitRole: function getExplicitRole() { -1 44383 return get_explicit_role_default; -1 44384 }, -1 44385 getImplicitRole: function getImplicitRole() { -1 44386 return implicit_role_default; -1 44387 }, -1 44388 getOwnedVirtual: function getOwnedVirtual() { -1 44389 return get_owned_virtual_default; -1 44390 }, -1 44391 getRole: function getRole() { -1 44392 return get_role_default; -1 44393 }, -1 44394 getRoleType: function getRoleType() { -1 44395 return get_role_type_default; -1 44396 }, -1 44397 getRolesByType: function getRolesByType() { -1 44398 return get_roles_by_type_default; -1 44399 }, -1 44400 getRolesWithNameFromContents: function getRolesWithNameFromContents() { -1 44401 return get_roles_with_name_from_contents_default; -1 44402 }, -1 44403 implicitNodes: function implicitNodes() { -1 44404 return implicit_nodes_default; -1 44405 }, -1 44406 implicitRole: function implicitRole() { -1 44407 return implicit_role_default; -1 44408 }, -1 44409 isAccessibleRef: function isAccessibleRef() { -1 44410 return is_accessible_ref_default; -1 44411 }, -1 44412 isAriaRoleAllowedOnElement: function isAriaRoleAllowedOnElement() { -1 44413 return is_aria_role_allowed_on_element_default; -1 44414 }, -1 44415 isUnsupportedRole: function isUnsupportedRole() { -1 44416 return is_unsupported_role_default; -1 44417 }, -1 44418 isValidRole: function isValidRole() { -1 44419 return is_valid_role_default; -1 44420 }, -1 44421 label: function label() { -1 44422 return label_default2; -1 44423 }, -1 44424 labelVirtual: function labelVirtual() { -1 44425 return label_virtual_default; -1 44426 }, -1 44427 lookupTable: function lookupTable() { -1 44428 return lookup_table_default; -1 44429 }, -1 44430 namedFromContents: function namedFromContents() { -1 44431 return named_from_contents_default; -1 44432 }, -1 44433 requiredAttr: function requiredAttr() { -1 44434 return required_attr_default; -1 44435 }, -1 44436 requiredContext: function requiredContext() { -1 44437 return required_context_default; -1 44438 }, -1 44439 requiredOwned: function requiredOwned() { -1 44440 return required_owned_default; -1 44441 }, -1 44442 validateAttr: function validateAttr() { -1 44443 return validate_attr_default; -1 44444 }, -1 44445 validateAttrValue: function validateAttrValue() { -1 44446 return validate_attr_value_default; -1 44447 } -1 44448 }); -1 44449 function getGlobalAriaAttrs() { -1 44450 if (cache_default.get('globalAriaAttrs')) { -1 44451 return cache_default.get('globalAriaAttrs'); -1 44452 } -1 44453 var globalAttrs = Object.keys(standards_default.ariaAttrs).filter(function(attrName) { -1 44454 return standards_default.ariaAttrs[attrName].global; 26758 44455 });26759 -1 if (!IS_PURE && typeof NativePromise == 'function' && !NativePromise.prototype['finally']) {26760 -1 redefine(NativePromise.prototype, 'finally', getBuiltIn('Promise').prototype['finally']);-1 44456 cache_default.set('globalAriaAttrs', globalAttrs); -1 44457 return globalAttrs; -1 44458 } -1 44459 var get_global_aria_attrs_default = getGlobalAriaAttrs; -1 44460 function allowedAttr(role) { -1 44461 var roleDef = standards_default.ariaRoles[role]; -1 44462 var attrs = _toConsumableArray(get_global_aria_attrs_default()); -1 44463 if (!roleDef) { -1 44464 return attrs; 26761 44465 }26762 -1 },26763 -1 './node_modules/core-js-pure/modules/es.promise.js': function node_modulesCoreJsPureModulesEsPromiseJs(module, exports, __webpack_require__) {26764 -1 'use strict';26765 -1 var $ = __webpack_require__('./node_modules/core-js-pure/internals/export.js');26766 -1 var IS_PURE = __webpack_require__('./node_modules/core-js-pure/internals/is-pure.js');26767 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');26768 -1 var getBuiltIn = __webpack_require__('./node_modules/core-js-pure/internals/get-built-in.js');26769 -1 var NativePromise = __webpack_require__('./node_modules/core-js-pure/internals/native-promise-constructor.js');26770 -1 var redefine = __webpack_require__('./node_modules/core-js-pure/internals/redefine.js');26771 -1 var redefineAll = __webpack_require__('./node_modules/core-js-pure/internals/redefine-all.js');26772 -1 var setToStringTag = __webpack_require__('./node_modules/core-js-pure/internals/set-to-string-tag.js');26773 -1 var setSpecies = __webpack_require__('./node_modules/core-js-pure/internals/set-species.js');26774 -1 var isObject = __webpack_require__('./node_modules/core-js-pure/internals/is-object.js');26775 -1 var aFunction = __webpack_require__('./node_modules/core-js-pure/internals/a-function.js');26776 -1 var anInstance = __webpack_require__('./node_modules/core-js-pure/internals/an-instance.js');26777 -1 var classof = __webpack_require__('./node_modules/core-js-pure/internals/classof-raw.js');26778 -1 var inspectSource = __webpack_require__('./node_modules/core-js-pure/internals/inspect-source.js');26779 -1 var iterate = __webpack_require__('./node_modules/core-js-pure/internals/iterate.js');26780 -1 var checkCorrectnessOfIteration = __webpack_require__('./node_modules/core-js-pure/internals/check-correctness-of-iteration.js');26781 -1 var speciesConstructor = __webpack_require__('./node_modules/core-js-pure/internals/species-constructor.js');26782 -1 var task = __webpack_require__('./node_modules/core-js-pure/internals/task.js').set;26783 -1 var microtask = __webpack_require__('./node_modules/core-js-pure/internals/microtask.js');26784 -1 var promiseResolve = __webpack_require__('./node_modules/core-js-pure/internals/promise-resolve.js');26785 -1 var hostReportErrors = __webpack_require__('./node_modules/core-js-pure/internals/host-report-errors.js');26786 -1 var newPromiseCapabilityModule = __webpack_require__('./node_modules/core-js-pure/internals/new-promise-capability.js');26787 -1 var perform = __webpack_require__('./node_modules/core-js-pure/internals/perform.js');26788 -1 var InternalStateModule = __webpack_require__('./node_modules/core-js-pure/internals/internal-state.js');26789 -1 var isForced = __webpack_require__('./node_modules/core-js-pure/internals/is-forced.js');26790 -1 var wellKnownSymbol = __webpack_require__('./node_modules/core-js-pure/internals/well-known-symbol.js');26791 -1 var V8_VERSION = __webpack_require__('./node_modules/core-js-pure/internals/engine-v8-version.js');26792 -1 var SPECIES = wellKnownSymbol('species');26793 -1 var PROMISE = 'Promise';26794 -1 var getInternalState = InternalStateModule.get;26795 -1 var setInternalState = InternalStateModule.set;26796 -1 var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);26797 -1 var PromiseConstructor = NativePromise;26798 -1 var TypeError = global.TypeError;26799 -1 var document = global.document;26800 -1 var process = global.process;26801 -1 var $fetch = getBuiltIn('fetch');26802 -1 var newPromiseCapability = newPromiseCapabilityModule.f;26803 -1 var newGenericPromiseCapability = newPromiseCapability;26804 -1 var IS_NODE = classof(process) == 'process';26805 -1 var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);26806 -1 var UNHANDLED_REJECTION = 'unhandledrejection';26807 -1 var REJECTION_HANDLED = 'rejectionhandled';26808 -1 var PENDING = 0;26809 -1 var FULFILLED = 1;26810 -1 var REJECTED = 2;26811 -1 var HANDLED = 1;26812 -1 var UNHANDLED = 2;26813 -1 var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;26814 -1 var FORCED = isForced(PROMISE, function() {26815 -1 var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);26816 -1 if (!GLOBAL_CORE_JS_PROMISE) {26817 -1 if (V8_VERSION === 66) {26818 -1 return true;26819 -1 }26820 -1 if (!IS_NODE && typeof PromiseRejectionEvent != 'function') {26821 -1 return true;26822 -1 }26823 -1 }26824 -1 if (IS_PURE && !PromiseConstructor.prototype['finally']) {26825 -1 return true;-1 44466 if (roleDef.allowedAttrs) { -1 44467 attrs.push.apply(attrs, _toConsumableArray(roleDef.allowedAttrs)); -1 44468 } -1 44469 if (roleDef.requiredAttrs) { -1 44470 attrs.push.apply(attrs, _toConsumableArray(roleDef.requiredAttrs)); -1 44471 } -1 44472 return attrs; -1 44473 } -1 44474 var allowed_attr_default = allowedAttr; -1 44475 function arialabelText(vNode) { -1 44476 if (!(vNode instanceof abstract_virtual_node_default)) { -1 44477 if (vNode.nodeType !== 1) { -1 44478 return ''; 26826 44479 }26827 -1 if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) {-1 44480 vNode = get_node_from_tree_default(vNode); -1 44481 } -1 44482 return vNode.attr('aria-label') || ''; -1 44483 } -1 44484 var arialabel_text_default = arialabelText; -1 44485 function isUnsupportedRole(role) { -1 44486 var roleDefinition = standards_default.ariaRoles[role]; -1 44487 return roleDefinition ? !!roleDefinition.unsupported : false; -1 44488 } -1 44489 var is_unsupported_role_default = isUnsupportedRole; -1 44490 function isValidRole(role) { -1 44491 var _ref23 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref23.allowAbstract, _ref23$flagUnsupporte = _ref23.flagUnsupported, flagUnsupported = _ref23$flagUnsupporte === void 0 ? false : _ref23$flagUnsupporte; -1 44492 var roleDefinition = standards_default.ariaRoles[role]; -1 44493 var isRoleUnsupported = is_unsupported_role_default(role); -1 44494 if (!roleDefinition || flagUnsupported && isRoleUnsupported) { -1 44495 return false; -1 44496 } -1 44497 return allowAbstract ? true : roleDefinition.type !== 'abstract'; -1 44498 } -1 44499 var is_valid_role_default = isValidRole; -1 44500 function getExplicitRole(vNode) { -1 44501 var _ref24 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, fallback = _ref24.fallback, abstracts = _ref24.abstracts, dpub = _ref24.dpub; -1 44502 vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode); -1 44503 if (vNode.props.nodeType !== 1) { -1 44504 return null; -1 44505 } -1 44506 var roleAttr = (vNode.attr('role') || '').trim().toLowerCase(); -1 44507 var roleList = fallback ? token_list_default(roleAttr) : [ roleAttr ]; -1 44508 var firstValidRole = roleList.find(function(role) { -1 44509 if (!dpub && role.substr(0, 4) === 'doc-') { 26828 44510 return false; 26829 44511 }26830 -1 var promise = PromiseConstructor.resolve(1);26831 -1 var FakePromise = function FakePromise(exec) {26832 -1 exec(function() {}, function() {});26833 -1 };26834 -1 var constructor = promise.constructor = {};26835 -1 constructor[SPECIES] = FakePromise;26836 -1 return !(promise.then(function() {}) instanceof FakePromise);26837 -1 });26838 -1 var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function(iterable) {26839 -1 PromiseConstructor.all(iterable)['catch'](function() {});26840 -1 });26841 -1 var isThenable = function isThenable(it) {26842 -1 var then;26843 -1 return isObject(it) && typeof (then = it.then) == 'function' ? then : false;26844 -1 };26845 -1 var notify = function notify(promise, state, isReject) {26846 -1 if (state.notified) {26847 -1 return;26848 -1 }26849 -1 state.notified = true;26850 -1 var chain = state.reactions;26851 -1 microtask(function() {26852 -1 var value = state.value;26853 -1 var ok = state.state == FULFILLED;26854 -1 var index = 0;26855 -1 while (chain.length > index) {26856 -1 var reaction = chain[index++];26857 -1 var handler = ok ? reaction.ok : reaction.fail;26858 -1 var resolve = reaction.resolve;26859 -1 var reject = reaction.reject;26860 -1 var domain = reaction.domain;26861 -1 var result, then, exited;26862 -1 try {26863 -1 if (handler) {26864 -1 if (!ok) {26865 -1 if (state.rejection === UNHANDLED) {26866 -1 onHandleUnhandled(promise, state);26867 -1 }26868 -1 state.rejection = HANDLED;26869 -1 }26870 -1 if (handler === true) {26871 -1 result = value;26872 -1 } else {26873 -1 if (domain) {26874 -1 domain.enter();26875 -1 }26876 -1 result = handler(value);26877 -1 if (domain) {26878 -1 domain.exit();26879 -1 exited = true;26880 -1 }26881 -1 }26882 -1 if (result === reaction.promise) {26883 -1 reject(TypeError('Promise-chain cycle'));26884 -1 } else if (then = isThenable(result)) {26885 -1 then.call(result, resolve, reject);26886 -1 } else {26887 -1 resolve(result);26888 -1 }26889 -1 } else {26890 -1 reject(value);26891 -1 }26892 -1 } catch (error) {26893 -1 if (domain && !exited) {26894 -1 domain.exit();26895 -1 }26896 -1 reject(error);26897 -1 }26898 -1 }26899 -1 state.reactions = [];26900 -1 state.notified = false;26901 -1 if (isReject && !state.rejection) {26902 -1 onUnhandled(promise, state);26903 -1 }-1 44512 return is_valid_role_default(role, { -1 44513 allowAbstract: abstracts 26904 44514 });26905 -1 };26906 -1 var dispatchEvent = function dispatchEvent(name, promise, reason) {26907 -1 var event, handler;26908 -1 if (DISPATCH_EVENT) {26909 -1 event = document.createEvent('Event');26910 -1 event.promise = promise;26911 -1 event.reason = reason;26912 -1 event.initEvent(name, false, true);26913 -1 global.dispatchEvent(event);26914 -1 } else {26915 -1 event = {26916 -1 promise: promise,26917 -1 reason: reason26918 -1 };-1 44515 }); -1 44516 return firstValidRole || null; -1 44517 } -1 44518 var get_explicit_role_default = getExplicitRole; -1 44519 function getElementsByContentType(type) { -1 44520 return Object.keys(standards_default.htmlElms).filter(function(nodeName2) { -1 44521 var elm = standards_default.htmlElms[nodeName2]; -1 44522 if (elm.contentTypes) { -1 44523 return elm.contentTypes.includes(type); -1 44524 } -1 44525 if (!elm.variant) { -1 44526 return false; 26919 44527 }26920 -1 if (handler = global['on' + name]) {26921 -1 handler(event);26922 -1 } else if (name === UNHANDLED_REJECTION) {26923 -1 hostReportErrors('Unhandled promise rejection', reason);-1 44528 if (elm.variant['default'] && elm.variant['default'].contentTypes) { -1 44529 return elm.variant['default'].contentTypes.includes(type); 26924 44530 }26925 -1 };26926 -1 var onUnhandled = function onUnhandled(promise, state) {26927 -1 task.call(global, function() {26928 -1 var value = state.value;26929 -1 var IS_UNHANDLED = isUnhandled(state);26930 -1 var result;26931 -1 if (IS_UNHANDLED) {26932 -1 result = perform(function() {26933 -1 if (IS_NODE) {26934 -1 process.emit('unhandledRejection', value, promise);26935 -1 } else {26936 -1 dispatchEvent(UNHANDLED_REJECTION, promise, value);-1 44531 return false; -1 44532 }); -1 44533 } -1 44534 var get_elements_by_content_type_default = getElementsByContentType; -1 44535 function toGrid(node) { -1 44536 var table5 = []; -1 44537 var rows = node.rows; -1 44538 for (var i = 0, rowLength = rows.length; i < rowLength; i++) { -1 44539 var cells = rows[i].cells; -1 44540 table5[i] = table5[i] || []; -1 44541 var columnIndex = 0; -1 44542 for (var j = 0, cellLength = cells.length; j < cellLength; j++) { -1 44543 for (var colSpan = 0; colSpan < cells[j].colSpan; colSpan++) { -1 44544 var rowspanAttr = cells[j].getAttribute('rowspan'); -1 44545 var rowspanValue = parseInt(rowspanAttr) === 0 || cells[j].rowspan === 0 ? rows.length : cells[j].rowSpan; -1 44546 for (var rowSpan = 0; rowSpan < rowspanValue; rowSpan++) { -1 44547 table5[i + rowSpan] = table5[i + rowSpan] || []; -1 44548 while (table5[i + rowSpan][columnIndex]) { -1 44549 columnIndex++; 26937 44550 }26938 -1 });26939 -1 state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;26940 -1 if (result.error) {26941 -1 throw result.value;-1 44551 table5[i + rowSpan][columnIndex] = cells[j]; 26942 44552 } -1 44553 columnIndex++; 26943 44554 }26944 -1 });26945 -1 };26946 -1 var isUnhandled = function isUnhandled(state) {26947 -1 return state.rejection !== HANDLED && !state.parent;26948 -1 };26949 -1 var onHandleUnhandled = function onHandleUnhandled(promise, state) {26950 -1 task.call(global, function() {26951 -1 if (IS_NODE) {26952 -1 process.emit('rejectionHandled', promise);26953 -1 } else {26954 -1 dispatchEvent(REJECTION_HANDLED, promise, state.value);-1 44555 } -1 44556 } -1 44557 return table5; -1 44558 } -1 44559 var to_grid_default = memoize_default(toGrid); -1 44560 function getCellPosition(cell, tableGrid) { -1 44561 var rowIndex, index; -1 44562 if (!tableGrid) { -1 44563 tableGrid = to_grid_default(find_up_default(cell, 'table')); -1 44564 } -1 44565 for (rowIndex = 0; rowIndex < tableGrid.length; rowIndex++) { -1 44566 if (tableGrid[rowIndex]) { -1 44567 index = tableGrid[rowIndex].indexOf(cell); -1 44568 if (index !== -1) { -1 44569 return { -1 44570 x: index, -1 44571 y: rowIndex -1 44572 }; 26955 44573 }26956 -1 });26957 -1 };26958 -1 var bind = function bind(fn, promise, state, unwrap) {26959 -1 return function(value) {26960 -1 fn(promise, state, value, unwrap);26961 -1 };26962 -1 };26963 -1 var internalReject = function internalReject(promise, state, value, unwrap) {26964 -1 if (state.done) {26965 -1 return;26966 44574 }26967 -1 state.done = true;26968 -1 if (unwrap) {26969 -1 state = unwrap;-1 44575 } -1 44576 } -1 44577 var get_cell_position_default = memoize_default(getCellPosition); -1 44578 function getScope(cell) { -1 44579 var scope = cell.getAttribute('scope'); -1 44580 var role = cell.getAttribute('role'); -1 44581 if (cell instanceof window.Element === false || [ 'TD', 'TH' ].indexOf(cell.nodeName.toUpperCase()) === -1) { -1 44582 throw new TypeError('Expected TD or TH element'); -1 44583 } -1 44584 if (role === 'columnheader') { -1 44585 return 'col'; -1 44586 } else if (role === 'rowheader') { -1 44587 return 'row'; -1 44588 } else if (scope === 'col' || scope === 'row') { -1 44589 return scope; -1 44590 } else if (cell.nodeName.toUpperCase() !== 'TH') { -1 44591 return false; -1 44592 } -1 44593 var tableGrid = to_grid_default(find_up_default(cell, 'table')); -1 44594 var pos = get_cell_position_default(cell, tableGrid); -1 44595 var headerRow = tableGrid[pos.y].reduce(function(headerRow2, cell2) { -1 44596 return headerRow2 && cell2.nodeName.toUpperCase() === 'TH'; -1 44597 }, true); -1 44598 if (headerRow) { -1 44599 return 'col'; -1 44600 } -1 44601 var headerCol = tableGrid.map(function(col) { -1 44602 return col[pos.x]; -1 44603 }).reduce(function(headerCol2, cell2) { -1 44604 return headerCol2 && cell2 && cell2.nodeName.toUpperCase() === 'TH'; -1 44605 }, true); -1 44606 if (headerCol) { -1 44607 return 'row'; -1 44608 } -1 44609 return 'auto'; -1 44610 } -1 44611 var get_scope_default = getScope; -1 44612 function isColumnHeader(element) { -1 44613 return [ 'col', 'auto' ].indexOf(get_scope_default(element)) !== -1; -1 44614 } -1 44615 var is_column_header_default = isColumnHeader; -1 44616 function isRowHeader(cell) { -1 44617 return [ 'row', 'auto' ].includes(get_scope_default(cell)); -1 44618 } -1 44619 var is_row_header_default = isRowHeader; -1 44620 var sectioningElementSelector = get_elements_by_content_type_default('sectioning').map(function(nodeName2) { -1 44621 return ''.concat(nodeName2, ':not([role])'); -1 44622 }).join(', ') + ' , main:not([role]), [role=article], [role=complementary], [role=main], [role=navigation], [role=region]'; -1 44623 function hasAccessibleName(vNode) { -1 44624 var ariaLabelledby = sanitize_default(arialabelledby_text_default(vNode)); -1 44625 var ariaLabel = sanitize_default(arialabel_text_default(vNode)); -1 44626 return !!(ariaLabelledby || ariaLabel); -1 44627 } -1 44628 var implicitHtmlRoles = { -1 44629 a: function a(vNode) { -1 44630 return vNode.hasAttr('href') ? 'link' : null; -1 44631 }, -1 44632 area: function area(vNode) { -1 44633 return vNode.hasAttr('href') ? 'link' : null; -1 44634 }, -1 44635 article: 'article', -1 44636 aside: 'complementary', -1 44637 body: 'document', -1 44638 button: 'button', -1 44639 datalist: 'listbox', -1 44640 dd: 'definition', -1 44641 dfn: 'term', -1 44642 details: 'group', -1 44643 dialog: 'dialog', -1 44644 dt: 'term', -1 44645 fieldset: 'group', -1 44646 figure: 'figure', -1 44647 footer: function footer(vNode) { -1 44648 var sectioningElement = closest_default(vNode, sectioningElementSelector); -1 44649 return !sectioningElement ? 'contentinfo' : null; -1 44650 }, -1 44651 form: function form(vNode) { -1 44652 return hasAccessibleName(vNode) ? 'form' : null; -1 44653 }, -1 44654 h1: 'heading', -1 44655 h2: 'heading', -1 44656 h3: 'heading', -1 44657 h4: 'heading', -1 44658 h5: 'heading', -1 44659 h6: 'heading', -1 44660 header: function header(vNode) { -1 44661 var sectioningElement = closest_default(vNode, sectioningElementSelector); -1 44662 return !sectioningElement ? 'banner' : null; -1 44663 }, -1 44664 hr: 'separator', -1 44665 img: function img(vNode) { -1 44666 var emptyAlt = vNode.hasAttr('alt') && !vNode.attr('alt'); -1 44667 var hasGlobalAria = get_global_aria_attrs_default().find(function(attr) { -1 44668 return vNode.hasAttr(attr); -1 44669 }); -1 44670 return emptyAlt && !hasGlobalAria && !is_focusable_default(vNode) ? 'presentation' : 'img'; -1 44671 }, -1 44672 input: function input(vNode) { -1 44673 var suggestionsSourceElement; -1 44674 if (vNode.hasAttr('list')) { -1 44675 var listElement = idrefs_default(vNode.actualNode, 'list').filter(function(node) { -1 44676 return !!node; -1 44677 })[0]; -1 44678 suggestionsSourceElement = listElement && listElement.nodeName.toLowerCase() === 'datalist'; 26970 44679 }26971 -1 state.value = value;26972 -1 state.state = REJECTED;26973 -1 notify(promise, state, true);26974 -1 };26975 -1 var internalResolve = function internalResolve(promise, state, value, unwrap) {26976 -1 if (state.done) {26977 -1 return;-1 44680 switch (vNode.props.type) { -1 44681 case 'checkbox': -1 44682 return 'checkbox'; -1 44683 -1 44684 case 'number': -1 44685 return 'spinbutton'; -1 44686 -1 44687 case 'radio': -1 44688 return 'radio'; -1 44689 -1 44690 case 'range': -1 44691 return 'slider'; -1 44692 -1 44693 case 'search': -1 44694 return !suggestionsSourceElement ? 'searchbox' : 'combobox'; -1 44695 -1 44696 case 'button': -1 44697 case 'image': -1 44698 case 'reset': -1 44699 case 'submit': -1 44700 return 'button'; -1 44701 -1 44702 case 'text': -1 44703 case 'tel': -1 44704 case 'url': -1 44705 case 'email': -1 44706 case '': -1 44707 return !suggestionsSourceElement ? 'textbox' : 'combobox'; -1 44708 -1 44709 default: -1 44710 return 'textbox'; 26978 44711 }26979 -1 state.done = true;26980 -1 if (unwrap) {26981 -1 state = unwrap;-1 44712 }, -1 44713 li: 'listitem', -1 44714 main: 'main', -1 44715 math: 'math', -1 44716 menu: 'list', -1 44717 nav: 'navigation', -1 44718 ol: 'list', -1 44719 optgroup: 'group', -1 44720 option: 'option', -1 44721 output: 'status', -1 44722 progress: 'progressbar', -1 44723 section: function section(vNode) { -1 44724 return hasAccessibleName(vNode) ? 'region' : null; -1 44725 }, -1 44726 select: function select(vNode) { -1 44727 return vNode.hasAttr('multiple') || parseInt(vNode.attr('size')) > 1 ? 'listbox' : 'combobox'; -1 44728 }, -1 44729 summary: 'button', -1 44730 table: 'table', -1 44731 tbody: 'rowgroup', -1 44732 td: function td(vNode) { -1 44733 var table5 = closest_default(vNode, 'table'); -1 44734 var role = get_explicit_role_default(table5); -1 44735 return [ 'grid', 'treegrid' ].includes(role) ? 'gridcell' : 'cell'; -1 44736 }, -1 44737 textarea: 'textbox', -1 44738 tfoot: 'rowgroup', -1 44739 th: function th(vNode) { -1 44740 if (is_column_header_default(vNode.actualNode)) { -1 44741 return 'columnheader'; 26982 44742 }26983 -1 try {26984 -1 if (promise === value) {26985 -1 throw TypeError('Promise can\'t be resolved itself');26986 -1 }26987 -1 var then = isThenable(value);26988 -1 if (then) {26989 -1 microtask(function() {26990 -1 var wrapper = {26991 -1 done: false26992 -1 };26993 -1 try {26994 -1 then.call(value, bind(internalResolve, promise, wrapper, state), bind(internalReject, promise, wrapper, state));26995 -1 } catch (error) {26996 -1 internalReject(promise, wrapper, error, state);26997 -1 }26998 -1 });26999 -1 } else {27000 -1 state.value = value;27001 -1 state.state = FULFILLED;27002 -1 notify(promise, state, false);27003 -1 }27004 -1 } catch (error) {27005 -1 internalReject(promise, {27006 -1 done: false27007 -1 }, error, state);-1 44743 if (is_row_header_default(vNode.actualNode)) { -1 44744 return 'rowheader'; 27008 44745 }27009 -1 };27010 -1 if (FORCED) {27011 -1 PromiseConstructor = function Promise(executor) {27012 -1 anInstance(this, PromiseConstructor, PROMISE);27013 -1 aFunction(executor);27014 -1 Internal.call(this);27015 -1 var state = getInternalState(this);27016 -1 try {27017 -1 executor(bind(internalResolve, this, state), bind(internalReject, this, state));27018 -1 } catch (error) {27019 -1 internalReject(this, state, error);27020 -1 }27021 -1 };27022 -1 Internal = function Promise(executor) {27023 -1 setInternalState(this, {27024 -1 type: PROMISE,27025 -1 done: false,27026 -1 notified: false,27027 -1 parent: false,27028 -1 reactions: [],27029 -1 rejection: false,27030 -1 state: PENDING,27031 -1 value: undefined27032 -1 });27033 -1 };27034 -1 Internal.prototype = redefineAll(PromiseConstructor.prototype, {27035 -1 then: function then(onFulfilled, onRejected) {27036 -1 var state = getInternalPromiseState(this);27037 -1 var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));27038 -1 reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;27039 -1 reaction.fail = typeof onRejected == 'function' && onRejected;27040 -1 reaction.domain = IS_NODE ? process.domain : undefined;27041 -1 state.parent = true;27042 -1 state.reactions.push(reaction);27043 -1 if (state.state != PENDING) {27044 -1 notify(this, state, false);27045 -1 }27046 -1 return reaction.promise;27047 -1 },27048 -1 catch: function _catch(onRejected) {27049 -1 return this.then(undefined, onRejected);27050 -1 }27051 -1 });27052 -1 OwnPromiseCapability = function OwnPromiseCapability() {27053 -1 var promise = new Internal();27054 -1 var state = getInternalState(promise);27055 -1 this.promise = promise;27056 -1 this.resolve = bind(internalResolve, promise, state);27057 -1 this.reject = bind(internalReject, promise, state);27058 -1 };27059 -1 newPromiseCapabilityModule.f = newPromiseCapability = function newPromiseCapability(C) {27060 -1 return C === PromiseConstructor || C === PromiseWrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C);27061 -1 };27062 -1 if (!IS_PURE && typeof NativePromise == 'function') {27063 -1 nativeThen = NativePromise.prototype.then;27064 -1 redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {27065 -1 var that = this;27066 -1 return new PromiseConstructor(function(resolve, reject) {27067 -1 nativeThen.call(that, resolve, reject);27068 -1 }).then(onFulfilled, onRejected);27069 -1 }, {27070 -1 unsafe: true27071 -1 });27072 -1 if (typeof $fetch == 'function') {27073 -1 $({27074 -1 global: true,27075 -1 enumerable: true,27076 -1 forced: true27077 -1 }, {27078 -1 fetch: function fetch(input) {27079 -1 return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));27080 -1 }27081 -1 });27082 -1 }-1 44746 }, -1 44747 thead: 'rowgroup', -1 44748 tr: 'row', -1 44749 ul: 'list' -1 44750 }; -1 44751 var implicit_html_roles_default = implicitHtmlRoles; -1 44752 function fromPrimative(someString, matcher) { -1 44753 var matcherType = _typeof(matcher); -1 44754 if (Array.isArray(matcher) && typeof someString !== 'undefined') { -1 44755 return matcher.includes(someString); -1 44756 } -1 44757 if (matcherType === 'function') { -1 44758 return !!matcher(someString); -1 44759 } -1 44760 if (someString !== null && someString !== void 0) { -1 44761 if (matcher instanceof RegExp) { -1 44762 return matcher.test(someString); -1 44763 } -1 44764 if (/^\/.*\/$/.test(matcher)) { -1 44765 var pattern = matcher.substring(1, matcher.length - 1); -1 44766 return new RegExp(pattern).test(someString); 27083 44767 } 27084 44768 }27085 -1 $({27086 -1 global: true,27087 -1 wrap: true,27088 -1 forced: FORCED27089 -1 }, {27090 -1 Promise: PromiseConstructor-1 44769 return matcher === someString; -1 44770 } -1 44771 var from_primative_default = fromPrimative; -1 44772 function fromFunction(getValue, matcher) { -1 44773 var matcherType = _typeof(matcher); -1 44774 if (matcherType !== 'object' || Array.isArray(matcher) || matcher instanceof RegExp) { -1 44775 throw new Error('Expect matcher to be an object'); -1 44776 } -1 44777 return Object.keys(matcher).every(function(propName) { -1 44778 return from_primative_default(getValue(propName), matcher[propName]); 27091 44779 });27092 -1 setToStringTag(PromiseConstructor, PROMISE, false, true);27093 -1 setSpecies(PROMISE);27094 -1 PromiseWrapper = getBuiltIn(PROMISE);27095 -1 $({27096 -1 target: PROMISE,27097 -1 stat: true,27098 -1 forced: FORCED27099 -1 }, {27100 -1 reject: function reject(r) {27101 -1 var capability = newPromiseCapability(this);27102 -1 capability.reject.call(undefined, r);27103 -1 return capability.promise;-1 44780 } -1 44781 var from_function_default = fromFunction; -1 44782 function attributes(vNode, matcher) { -1 44783 if (!(vNode instanceof abstract_virtual_node_default)) { -1 44784 vNode = get_node_from_tree_default(vNode); -1 44785 } -1 44786 return from_function_default(function(attrName) { -1 44787 return vNode.attr(attrName); -1 44788 }, matcher); -1 44789 } -1 44790 var attributes_default = attributes; -1 44791 function condition(arg, condition4) { -1 44792 return !!condition4(arg); -1 44793 } -1 44794 var condition_default = condition; -1 44795 function explicitRole(vNode, matcher) { -1 44796 return from_primative_default(get_explicit_role_default(vNode), matcher); -1 44797 } -1 44798 var explicit_role_default = explicitRole; -1 44799 function implicitRole(vNode, matcher) { -1 44800 return from_primative_default(implicit_role_default(vNode), matcher); -1 44801 } -1 44802 var implicit_role_default2 = implicitRole; -1 44803 function nodeName(vNode, matcher) { -1 44804 if (!(vNode instanceof abstract_virtual_node_default)) { -1 44805 vNode = get_node_from_tree_default(vNode); -1 44806 } -1 44807 return from_primative_default(vNode.props.nodeName, matcher); -1 44808 } -1 44809 var node_name_default = nodeName; -1 44810 function properties(vNode, matcher) { -1 44811 if (!(vNode instanceof abstract_virtual_node_default)) { -1 44812 vNode = get_node_from_tree_default(vNode); -1 44813 } -1 44814 return from_function_default(function(propName) { -1 44815 return vNode.props[propName]; -1 44816 }, matcher); -1 44817 } -1 44818 var properties_default = properties; -1 44819 function semanticRole(vNode, matcher) { -1 44820 return from_primative_default(get_role_default(vNode), matcher); -1 44821 } -1 44822 var semantic_role_default = semanticRole; -1 44823 var matchers = { -1 44824 attributes: attributes_default, -1 44825 condition: condition_default, -1 44826 explicitRole: explicit_role_default, -1 44827 implicitRole: implicit_role_default2, -1 44828 nodeName: node_name_default, -1 44829 properties: properties_default, -1 44830 semanticRole: semantic_role_default -1 44831 }; -1 44832 function fromDefinition(vNode, definition) { -1 44833 if (!(vNode instanceof abstract_virtual_node_default)) { -1 44834 vNode = get_node_from_tree_default(vNode); -1 44835 } -1 44836 if (Array.isArray(definition)) { -1 44837 return definition.some(function(definitionItem) { -1 44838 return fromDefinition(vNode, definitionItem); -1 44839 }); -1 44840 } -1 44841 if (typeof definition === 'string') { -1 44842 return matches_default(vNode, definition); -1 44843 } -1 44844 return Object.keys(definition).every(function(matcherName) { -1 44845 if (!matchers[matcherName]) { -1 44846 throw new Error('Unknown matcher type "'.concat(matcherName, '"')); 27104 44847 } -1 44848 var matchMethod = matchers[matcherName]; -1 44849 var matcher = definition[matcherName]; -1 44850 return matchMethod(vNode, matcher); 27105 44851 });27106 -1 $({27107 -1 target: PROMISE,27108 -1 stat: true,27109 -1 forced: IS_PURE || FORCED27110 -1 }, {27111 -1 resolve: function resolve(x) {27112 -1 return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);-1 44852 } -1 44853 var from_definition_default = fromDefinition; -1 44854 function matches5(vNode, definition) { -1 44855 return from_definition_default(vNode, definition); -1 44856 } -1 44857 var matches_default2 = matches5; -1 44858 matches_default2.attributes = attributes_default; -1 44859 matches_default2.condition = condition_default; -1 44860 matches_default2.explicitRole = explicit_role_default; -1 44861 matches_default2.fromDefinition = from_definition_default; -1 44862 matches_default2.fromFunction = from_function_default; -1 44863 matches_default2.fromPrimative = from_primative_default; -1 44864 matches_default2.implicitRole = implicit_role_default2; -1 44865 matches_default2.nodeName = node_name_default; -1 44866 matches_default2.properties = properties_default; -1 44867 matches_default2.semanticRole = semantic_role_default; -1 44868 var matches_default3 = matches_default2; -1 44869 function getElementSpec(vNode) { -1 44870 var standard = standards_default.htmlElms[vNode.props.nodeName]; -1 44871 if (!standard) { -1 44872 return {}; -1 44873 } -1 44874 if (!standard.variant) { -1 44875 return standard; -1 44876 } -1 44877 var variant = standard.variant, spec = _objectWithoutProperties(standard, _excluded); -1 44878 for (var variantName in variant) { -1 44879 if (!variant.hasOwnProperty(variantName) || variantName === 'default') { -1 44880 continue; 27113 44881 }27114 -1 });27115 -1 $({27116 -1 target: PROMISE,27117 -1 stat: true,27118 -1 forced: INCORRECT_ITERATION27119 -1 }, {27120 -1 all: function all(iterable) {27121 -1 var C = this;27122 -1 var capability = newPromiseCapability(C);27123 -1 var resolve = capability.resolve;27124 -1 var reject = capability.reject;27125 -1 var result = perform(function() {27126 -1 var $promiseResolve = aFunction(C.resolve);27127 -1 var values = [];27128 -1 var counter = 0;27129 -1 var remaining = 1;27130 -1 iterate(iterable, function(promise) {27131 -1 var index = counter++;27132 -1 var alreadyCalled = false;27133 -1 values.push(undefined);27134 -1 remaining++;27135 -1 $promiseResolve.call(C, promise).then(function(value) {27136 -1 if (alreadyCalled) {27137 -1 return;27138 -1 }27139 -1 alreadyCalled = true;27140 -1 values[index] = value;27141 -1 --remaining || resolve(values);27142 -1 }, reject);27143 -1 });27144 -1 --remaining || resolve(values);27145 -1 });27146 -1 if (result.error) {27147 -1 reject(result.value);27148 -1 }27149 -1 return capability.promise;27150 -1 },27151 -1 race: function race(iterable) {27152 -1 var C = this;27153 -1 var capability = newPromiseCapability(C);27154 -1 var reject = capability.reject;27155 -1 var result = perform(function() {27156 -1 var $promiseResolve = aFunction(C.resolve);27157 -1 iterate(iterable, function(promise) {27158 -1 $promiseResolve.call(C, promise).then(capability.resolve, reject);27159 -1 });27160 -1 });27161 -1 if (result.error) {27162 -1 reject(result.value);-1 44882 var _variant$variantName = variant[variantName], matches14 = _variant$variantName.matches, props = _objectWithoutProperties(_variant$variantName, _excluded2); -1 44883 if (matches_default3(vNode, matches14)) { -1 44884 for (var propName in props) { -1 44885 if (props.hasOwnProperty(propName)) { -1 44886 spec[propName] = props[propName]; -1 44887 } 27163 44888 }27164 -1 return capability.promise;27165 44889 }27166 -1 });27167 -1 },27168 -1 './node_modules/core-js-pure/modules/es.string.iterator.js': function node_modulesCoreJsPureModulesEsStringIteratorJs(module, exports, __webpack_require__) {27169 -1 'use strict';27170 -1 var charAt = __webpack_require__('./node_modules/core-js-pure/internals/string-multibyte.js').charAt;27171 -1 var InternalStateModule = __webpack_require__('./node_modules/core-js-pure/internals/internal-state.js');27172 -1 var defineIterator = __webpack_require__('./node_modules/core-js-pure/internals/define-iterator.js');27173 -1 var STRING_ITERATOR = 'String Iterator';27174 -1 var setInternalState = InternalStateModule.set;27175 -1 var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);27176 -1 defineIterator(String, 'String', function(iterated) {27177 -1 setInternalState(this, {27178 -1 type: STRING_ITERATOR,27179 -1 string: String(iterated),27180 -1 index: 027181 -1 });27182 -1 }, function next() {27183 -1 var state = getInternalState(this);27184 -1 var string = state.string;27185 -1 var index = state.index;27186 -1 var point;27187 -1 if (index >= string.length) {27188 -1 return {27189 -1 value: undefined,27190 -1 done: true27191 -1 };-1 44890 } -1 44891 for (var _propName in variant['default']) { -1 44892 if (variant['default'].hasOwnProperty(_propName) && typeof spec[_propName] === 'undefined') { -1 44893 spec[_propName] = variant['default'][_propName]; 27192 44894 }27193 -1 point = charAt(string, index);27194 -1 state.index += point.length;27195 -1 return {27196 -1 value: point,27197 -1 done: false27198 -1 };-1 44895 } -1 44896 return spec; -1 44897 } -1 44898 var get_element_spec_default = getElementSpec; -1 44899 function implicitRole2(node) { -1 44900 var _ref25 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref25.chromium; -1 44901 var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node); -1 44902 node = vNode.actualNode; -1 44903 if (!vNode) { -1 44904 throw new ReferenceError('Cannot get implicit role of a node outside the current scope.'); -1 44905 } -1 44906 var nodeName2 = vNode.props.nodeName; -1 44907 var role = implicit_html_roles_default[nodeName2]; -1 44908 if (!role && chromium) { -1 44909 var _get_element_spec_def = get_element_spec_default(vNode), chromiumRole = _get_element_spec_def.chromiumRole; -1 44910 return chromiumRole || null; -1 44911 } -1 44912 if (typeof role === 'function') { -1 44913 return role(vNode); -1 44914 } -1 44915 return role || null; -1 44916 } -1 44917 var implicit_role_default = implicitRole2; -1 44918 var inheritsPresentationChain = { -1 44919 td: [ 'tr' ], -1 44920 th: [ 'tr' ], -1 44921 tr: [ 'thead', 'tbody', 'tfoot', 'table' ], -1 44922 thead: [ 'table' ], -1 44923 tbody: [ 'table' ], -1 44924 tfoot: [ 'table' ], -1 44925 li: [ 'ol', 'ul' ], -1 44926 dt: [ 'dl', 'div' ], -1 44927 dd: [ 'dl', 'div' ], -1 44928 div: [ 'dl' ] -1 44929 }; -1 44930 function getInheritedRole(vNode, explicitRoleOptions) { -1 44931 var parentNodeNames = inheritsPresentationChain[vNode.props.nodeName]; -1 44932 if (!parentNodeNames) { -1 44933 return null; -1 44934 } -1 44935 if (!vNode.parent) { -1 44936 throw new ReferenceError('Cannot determine role presentational inheritance of a required parent outside the current scope.'); -1 44937 } -1 44938 if (!parentNodeNames.includes(vNode.parent.props.nodeName)) { -1 44939 return null; -1 44940 } -1 44941 var parentRole = get_explicit_role_default(vNode.parent, explicitRoleOptions); -1 44942 if ([ 'none', 'presentation' ].includes(parentRole) && !hasConflictResolution(vNode.parent)) { -1 44943 return parentRole; -1 44944 } -1 44945 if (parentRole) { -1 44946 return null; -1 44947 } -1 44948 return getInheritedRole(vNode.parent, explicitRoleOptions); -1 44949 } -1 44950 function resolveImplicitRole(vNode, _ref26) { -1 44951 var chromium = _ref26.chromium, explicitRoleOptions = _objectWithoutProperties(_ref26, _excluded3); -1 44952 var implicitRole3 = implicit_role_default(vNode, { -1 44953 chromium: chromium 27199 44954 });27200 -1 },27201 -1 './node_modules/core-js-pure/modules/es.typed-array.copy-within.js': function node_modulesCoreJsPureModulesEsTypedArrayCopyWithinJs(module, exports) {},27202 -1 './node_modules/core-js-pure/modules/es.typed-array.every.js': function node_modulesCoreJsPureModulesEsTypedArrayEveryJs(module, exports) {},27203 -1 './node_modules/core-js-pure/modules/es.typed-array.fill.js': function node_modulesCoreJsPureModulesEsTypedArrayFillJs(module, exports) {},27204 -1 './node_modules/core-js-pure/modules/es.typed-array.filter.js': function node_modulesCoreJsPureModulesEsTypedArrayFilterJs(module, exports) {},27205 -1 './node_modules/core-js-pure/modules/es.typed-array.find-index.js': function node_modulesCoreJsPureModulesEsTypedArrayFindIndexJs(module, exports) {},27206 -1 './node_modules/core-js-pure/modules/es.typed-array.find.js': function node_modulesCoreJsPureModulesEsTypedArrayFindJs(module, exports) {},27207 -1 './node_modules/core-js-pure/modules/es.typed-array.for-each.js': function node_modulesCoreJsPureModulesEsTypedArrayForEachJs(module, exports) {},27208 -1 './node_modules/core-js-pure/modules/es.typed-array.from.js': function node_modulesCoreJsPureModulesEsTypedArrayFromJs(module, exports) {},27209 -1 './node_modules/core-js-pure/modules/es.typed-array.includes.js': function node_modulesCoreJsPureModulesEsTypedArrayIncludesJs(module, exports) {},27210 -1 './node_modules/core-js-pure/modules/es.typed-array.index-of.js': function node_modulesCoreJsPureModulesEsTypedArrayIndexOfJs(module, exports) {},27211 -1 './node_modules/core-js-pure/modules/es.typed-array.iterator.js': function node_modulesCoreJsPureModulesEsTypedArrayIteratorJs(module, exports) {},27212 -1 './node_modules/core-js-pure/modules/es.typed-array.join.js': function node_modulesCoreJsPureModulesEsTypedArrayJoinJs(module, exports) {},27213 -1 './node_modules/core-js-pure/modules/es.typed-array.last-index-of.js': function node_modulesCoreJsPureModulesEsTypedArrayLastIndexOfJs(module, exports) {},27214 -1 './node_modules/core-js-pure/modules/es.typed-array.map.js': function node_modulesCoreJsPureModulesEsTypedArrayMapJs(module, exports) {},27215 -1 './node_modules/core-js-pure/modules/es.typed-array.of.js': function node_modulesCoreJsPureModulesEsTypedArrayOfJs(module, exports) {},27216 -1 './node_modules/core-js-pure/modules/es.typed-array.reduce-right.js': function node_modulesCoreJsPureModulesEsTypedArrayReduceRightJs(module, exports) {},27217 -1 './node_modules/core-js-pure/modules/es.typed-array.reduce.js': function node_modulesCoreJsPureModulesEsTypedArrayReduceJs(module, exports) {},27218 -1 './node_modules/core-js-pure/modules/es.typed-array.reverse.js': function node_modulesCoreJsPureModulesEsTypedArrayReverseJs(module, exports) {},27219 -1 './node_modules/core-js-pure/modules/es.typed-array.set.js': function node_modulesCoreJsPureModulesEsTypedArraySetJs(module, exports) {},27220 -1 './node_modules/core-js-pure/modules/es.typed-array.slice.js': function node_modulesCoreJsPureModulesEsTypedArraySliceJs(module, exports) {},27221 -1 './node_modules/core-js-pure/modules/es.typed-array.some.js': function node_modulesCoreJsPureModulesEsTypedArraySomeJs(module, exports) {},27222 -1 './node_modules/core-js-pure/modules/es.typed-array.sort.js': function node_modulesCoreJsPureModulesEsTypedArraySortJs(module, exports) {},27223 -1 './node_modules/core-js-pure/modules/es.typed-array.subarray.js': function node_modulesCoreJsPureModulesEsTypedArraySubarrayJs(module, exports) {},27224 -1 './node_modules/core-js-pure/modules/es.typed-array.to-locale-string.js': function node_modulesCoreJsPureModulesEsTypedArrayToLocaleStringJs(module, exports) {},27225 -1 './node_modules/core-js-pure/modules/es.typed-array.to-string.js': function node_modulesCoreJsPureModulesEsTypedArrayToStringJs(module, exports) {},27226 -1 './node_modules/core-js-pure/modules/es.typed-array.uint32-array.js': function node_modulesCoreJsPureModulesEsTypedArrayUint32ArrayJs(module, exports) {},27227 -1 './node_modules/core-js-pure/modules/es.weak-map.js': function node_modulesCoreJsPureModulesEsWeakMapJs(module, exports, __webpack_require__) {27228 -1 'use strict';27229 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');27230 -1 var redefineAll = __webpack_require__('./node_modules/core-js-pure/internals/redefine-all.js');27231 -1 var InternalMetadataModule = __webpack_require__('./node_modules/core-js-pure/internals/internal-metadata.js');27232 -1 var collection = __webpack_require__('./node_modules/core-js-pure/internals/collection.js');27233 -1 var collectionWeak = __webpack_require__('./node_modules/core-js-pure/internals/collection-weak.js');27234 -1 var isObject = __webpack_require__('./node_modules/core-js-pure/internals/is-object.js');27235 -1 var enforceIternalState = __webpack_require__('./node_modules/core-js-pure/internals/internal-state.js').enforce;27236 -1 var NATIVE_WEAK_MAP = __webpack_require__('./node_modules/core-js-pure/internals/native-weak-map.js');27237 -1 var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;27238 -1 var isExtensible = Object.isExtensible;27239 -1 var InternalWeakMap;27240 -1 var wrapper = function wrapper(init) {27241 -1 return function WeakMap() {27242 -1 return init(this, arguments.length ? arguments[0] : undefined);27243 -1 };27244 -1 };27245 -1 var $WeakMap = module.exports = collection('WeakMap', wrapper, collectionWeak);27246 -1 if (NATIVE_WEAK_MAP && IS_IE11) {27247 -1 InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);27248 -1 InternalMetadataModule.REQUIRED = true;27249 -1 var WeakMapPrototype = $WeakMap.prototype;27250 -1 var nativeDelete = WeakMapPrototype['delete'];27251 -1 var nativeHas = WeakMapPrototype.has;27252 -1 var nativeGet = WeakMapPrototype.get;27253 -1 var nativeSet = WeakMapPrototype.set;27254 -1 redefineAll(WeakMapPrototype, {27255 -1 delete: function _delete(key) {27256 -1 if (isObject(key) && !isExtensible(key)) {27257 -1 var state = enforceIternalState(this);27258 -1 if (!state.frozen) {27259 -1 state.frozen = new InternalWeakMap();27260 -1 }27261 -1 return nativeDelete.call(this, key) || state.frozen['delete'](key);27262 -1 }27263 -1 return nativeDelete.call(this, key);27264 -1 },27265 -1 has: function has(key) {27266 -1 if (isObject(key) && !isExtensible(key)) {27267 -1 var state = enforceIternalState(this);27268 -1 if (!state.frozen) {27269 -1 state.frozen = new InternalWeakMap();27270 -1 }27271 -1 return nativeHas.call(this, key) || state.frozen.has(key);27272 -1 }27273 -1 return nativeHas.call(this, key);27274 -1 },27275 -1 get: function get(key) {27276 -1 if (isObject(key) && !isExtensible(key)) {27277 -1 var state = enforceIternalState(this);27278 -1 if (!state.frozen) {27279 -1 state.frozen = new InternalWeakMap();27280 -1 }27281 -1 return nativeHas.call(this, key) ? nativeGet.call(this, key) : state.frozen.get(key);27282 -1 }27283 -1 return nativeGet.call(this, key);27284 -1 },27285 -1 set: function set(key, value) {27286 -1 if (isObject(key) && !isExtensible(key)) {27287 -1 var state = enforceIternalState(this);27288 -1 if (!state.frozen) {27289 -1 state.frozen = new InternalWeakMap();27290 -1 }27291 -1 nativeHas.call(this, key) ? nativeSet.call(this, key, value) : state.frozen.set(key, value);27292 -1 } else {27293 -1 nativeSet.call(this, key, value);27294 -1 }27295 -1 return this;27296 -1 }-1 44955 if (!implicitRole3) { -1 44956 return null; -1 44957 } -1 44958 var presentationalRole = getInheritedRole(vNode, explicitRoleOptions); -1 44959 if (presentationalRole) { -1 44960 return presentationalRole; -1 44961 } -1 44962 return implicitRole3; -1 44963 } -1 44964 function hasConflictResolution(vNode) { -1 44965 var hasGlobalAria = get_global_aria_attrs_default().some(function(attr) { -1 44966 return vNode.hasAttr(attr); -1 44967 }); -1 44968 return hasGlobalAria || is_focusable_default(vNode); -1 44969 } -1 44970 function resolveRole(node) { -1 44971 var _ref27 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 44972 var noImplicit = _ref27.noImplicit, roleOptions = _objectWithoutProperties(_ref27, _excluded4); -1 44973 var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node); -1 44974 if (vNode.props.nodeType !== 1) { -1 44975 return null; -1 44976 } -1 44977 var explicitRole2 = get_explicit_role_default(vNode, roleOptions); -1 44978 if (!explicitRole2) { -1 44979 return noImplicit ? null : resolveImplicitRole(vNode, roleOptions); -1 44980 } -1 44981 if (![ 'presentation', 'none' ].includes(explicitRole2)) { -1 44982 return explicitRole2; -1 44983 } -1 44984 if (hasConflictResolution(vNode)) { -1 44985 return noImplicit ? null : resolveImplicitRole(vNode, roleOptions); -1 44986 } -1 44987 return explicitRole2; -1 44988 } -1 44989 function getRole(node) { -1 44990 var _ref28 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 44991 var noPresentational = _ref28.noPresentational, options = _objectWithoutProperties(_ref28, _excluded5); -1 44992 var role = resolveRole(node, options); -1 44993 if (noPresentational && [ 'presentation', 'none' ].includes(role)) { -1 44994 return null; -1 44995 } -1 44996 return role; -1 44997 } -1 44998 var get_role_default = getRole; -1 44999 var alwaysTitleElements = [ 'iframe' ]; -1 45000 function titleText(node) { -1 45001 var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node); -1 45002 if (vNode.props.nodeType !== 1 || !node.hasAttr('title')) { -1 45003 return ''; -1 45004 } -1 45005 if (!matches_default2(vNode, alwaysTitleElements) && [ 'none', 'presentation' ].includes(get_role_default(vNode))) { -1 45006 return ''; -1 45007 } -1 45008 return vNode.attr('title'); -1 45009 } -1 45010 var title_text_default = titleText; -1 45011 function namedFromContents(vNode) { -1 45012 var _ref29 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref29.strict; -1 45013 vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode); -1 45014 if (vNode.props.nodeType !== 1) { -1 45015 return false; -1 45016 } -1 45017 var role = get_role_default(vNode); -1 45018 var roleDef = standards_default.ariaRoles[role]; -1 45019 if (roleDef && roleDef.nameFromContent) { -1 45020 return true; -1 45021 } -1 45022 if (strict) { -1 45023 return false; -1 45024 } -1 45025 return !roleDef || [ 'presentation', 'none' ].includes(role); -1 45026 } -1 45027 var named_from_contents_default = namedFromContents; -1 45028 function getOwnedVirtual(virtualNode) { -1 45029 var actualNode = virtualNode.actualNode, children = virtualNode.children; -1 45030 if (!children) { -1 45031 throw new Error('getOwnedVirtual requires a virtual node'); -1 45032 } -1 45033 if (virtualNode.hasAttr('aria-owns')) { -1 45034 var owns = idrefs_default(actualNode, 'aria-owns').filter(function(element) { -1 45035 return !!element; -1 45036 }).map(function(element) { -1 45037 return axe.utils.getNodeFromTree(element); 27297 45038 }); -1 45039 return [].concat(_toConsumableArray(children), _toConsumableArray(owns)); 27298 45040 }27299 -1 },27300 -1 './node_modules/core-js-pure/modules/esnext.aggregate-error.js': function node_modulesCoreJsPureModulesEsnextAggregateErrorJs(module, exports, __webpack_require__) {27301 -1 'use strict';27302 -1 var $ = __webpack_require__('./node_modules/core-js-pure/internals/export.js');27303 -1 var DESCRIPTORS = __webpack_require__('./node_modules/core-js-pure/internals/descriptors.js');27304 -1 var getPrototypeOf = __webpack_require__('./node_modules/core-js-pure/internals/object-get-prototype-of.js');27305 -1 var setPrototypeOf = __webpack_require__('./node_modules/core-js-pure/internals/object-set-prototype-of.js');27306 -1 var create = __webpack_require__('./node_modules/core-js-pure/internals/object-create.js');27307 -1 var defineProperty = __webpack_require__('./node_modules/core-js-pure/internals/object-define-property.js');27308 -1 var createPropertyDescriptor = __webpack_require__('./node_modules/core-js-pure/internals/create-property-descriptor.js');27309 -1 var iterate = __webpack_require__('./node_modules/core-js-pure/internals/iterate.js');27310 -1 var createNonEnumerableProperty = __webpack_require__('./node_modules/core-js-pure/internals/create-non-enumerable-property.js');27311 -1 var InternalStateModule = __webpack_require__('./node_modules/core-js-pure/internals/internal-state.js');27312 -1 var setInternalState = InternalStateModule.set;27313 -1 var getInternalAggregateErrorState = InternalStateModule.getterFor('AggregateError');27314 -1 var $AggregateError = function AggregateError(errors, message) {27315 -1 var that = this;27316 -1 if (!(that instanceof $AggregateError)) {27317 -1 return new $AggregateError(errors, message);27318 -1 }27319 -1 if (setPrototypeOf) {27320 -1 that = setPrototypeOf(new Error(message), getPrototypeOf(that));27321 -1 }27322 -1 var errorsArray = [];27323 -1 iterate(errors, errorsArray.push, errorsArray);27324 -1 if (DESCRIPTORS) {27325 -1 setInternalState(that, {27326 -1 errors: errorsArray,27327 -1 type: 'AggregateError'27328 -1 });27329 -1 } else {27330 -1 that.errors = errorsArray;-1 45041 return _toConsumableArray(children); -1 45042 } -1 45043 var get_owned_virtual_default = getOwnedVirtual; -1 45044 function subtreeText(virtualNode) { -1 45045 var context3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 45046 var alreadyProcessed2 = accessible_text_virtual_default.alreadyProcessed; -1 45047 context3.startNode = context3.startNode || virtualNode; -1 45048 var _context = context3, strict = _context.strict, inControlContext = _context.inControlContext, inLabelledByContext = _context.inLabelledByContext; -1 45049 var _get_element_spec_def2 = get_element_spec_default(virtualNode), contentTypes = _get_element_spec_def2.contentTypes; -1 45050 if (alreadyProcessed2(virtualNode, context3) || virtualNode.props.nodeType !== 1 || contentTypes !== null && contentTypes !== void 0 && contentTypes.includes('embedded')) { -1 45051 return ''; -1 45052 } -1 45053 if (!named_from_contents_default(virtualNode, { -1 45054 strict: strict -1 45055 }) && !context3.subtreeDescendant) { -1 45056 return ''; -1 45057 } -1 45058 if (!strict) { -1 45059 var subtreeDescendant = !inControlContext && !inLabelledByContext; -1 45060 context3 = _extends({ -1 45061 subtreeDescendant: subtreeDescendant -1 45062 }, context3); -1 45063 } -1 45064 return get_owned_virtual_default(virtualNode).reduce(function(contentText, child) { -1 45065 return appendAccessibleText(contentText, child, context3); -1 45066 }, ''); -1 45067 } -1 45068 var phrasingElements = get_elements_by_content_type_default('phrasing').concat([ '#text' ]); -1 45069 function appendAccessibleText(contentText, virtualNode, context3) { -1 45070 var nodeName2 = virtualNode.props.nodeName; -1 45071 var contentTextAdd = accessible_text_virtual_default(virtualNode, context3); -1 45072 if (!contentTextAdd) { -1 45073 return contentText; -1 45074 } -1 45075 if (!phrasingElements.includes(nodeName2)) { -1 45076 if (contentTextAdd[0] !== ' ') { -1 45077 contentTextAdd += ' '; 27331 45078 }27332 -1 if (message !== undefined) {27333 -1 createNonEnumerableProperty(that, 'message', String(message));-1 45079 if (contentText && contentText[contentText.length - 1] !== ' ') { -1 45080 contentTextAdd = ' ' + contentTextAdd; 27334 45081 }27335 -1 return that;27336 -1 };27337 -1 $AggregateError.prototype = create(Error.prototype, {27338 -1 constructor: createPropertyDescriptor(5, $AggregateError),27339 -1 message: createPropertyDescriptor(5, ''),27340 -1 name: createPropertyDescriptor(5, 'AggregateError')-1 45082 } -1 45083 return contentText + contentTextAdd; -1 45084 } -1 45085 var subtree_text_default = subtreeText; -1 45086 function labelText(virtualNode) { -1 45087 var context3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 45088 var alreadyProcessed2 = accessible_text_virtual_default.alreadyProcessed; -1 45089 if (context3.inControlContext || context3.inLabelledByContext || alreadyProcessed2(virtualNode, context3)) { -1 45090 return ''; -1 45091 } -1 45092 if (!context3.startNode) { -1 45093 context3.startNode = virtualNode; -1 45094 } -1 45095 var labelContext = _extends({ -1 45096 inControlContext: true -1 45097 }, context3); -1 45098 var explicitLabels = getExplicitLabels(virtualNode); -1 45099 var implicitLabel = closest_default(virtualNode, 'label'); -1 45100 var labels; -1 45101 if (implicitLabel) { -1 45102 labels = [].concat(_toConsumableArray(explicitLabels), [ implicitLabel.actualNode ]); -1 45103 labels.sort(node_sorter_default); -1 45104 } else { -1 45105 labels = explicitLabels; -1 45106 } -1 45107 return labels.map(function(label5) { -1 45108 return accessible_text_default(label5, labelContext); -1 45109 }).filter(function(text32) { -1 45110 return text32 !== ''; -1 45111 }).join(' '); -1 45112 } -1 45113 function getExplicitLabels(virtualNode) { -1 45114 if (!virtualNode.attr('id')) { -1 45115 return []; -1 45116 } -1 45117 if (!virtualNode.actualNode) { -1 45118 throw new TypeError('Cannot resolve explicit label reference for non-DOM nodes'); -1 45119 } -1 45120 return find_elms_in_context_default({ -1 45121 elm: 'label', -1 45122 attr: 'for', -1 45123 value: virtualNode.attr('id'), -1 45124 context: virtualNode.actualNode 27341 45125 });27342 -1 if (DESCRIPTORS) {27343 -1 defineProperty.f($AggregateError.prototype, 'errors', {27344 -1 get: function get() {27345 -1 return getInternalAggregateErrorState(this).errors;27346 -1 },27347 -1 configurable: true27348 -1 });-1 45126 } -1 45127 var label_text_default = labelText; -1 45128 var defaultButtonValues = { -1 45129 submit: 'Submit', -1 45130 image: 'Submit', -1 45131 reset: 'Reset', -1 45132 button: '' -1 45133 }; -1 45134 var nativeTextMethods = { -1 45135 valueText: function valueText(_ref30) { -1 45136 var actualNode = _ref30.actualNode; -1 45137 return actualNode.value || ''; -1 45138 }, -1 45139 buttonDefaultText: function buttonDefaultText(_ref31) { -1 45140 var actualNode = _ref31.actualNode; -1 45141 return defaultButtonValues[actualNode.type] || ''; -1 45142 }, -1 45143 tableCaptionText: descendantText.bind(null, 'caption'), -1 45144 figureText: descendantText.bind(null, 'figcaption'), -1 45145 svgTitleText: descendantText.bind(null, 'title'), -1 45146 fieldsetLegendText: descendantText.bind(null, 'legend'), -1 45147 altText: attrText.bind(null, 'alt'), -1 45148 tableSummaryText: attrText.bind(null, 'summary'), -1 45149 titleText: title_text_default, -1 45150 subtreeText: subtree_text_default, -1 45151 labelText: label_text_default, -1 45152 singleSpace: function singleSpace() { -1 45153 return ' '; -1 45154 }, -1 45155 placeholderText: attrText.bind(null, 'placeholder') -1 45156 }; -1 45157 function attrText(attr, vNode) { -1 45158 return vNode.attr(attr) || ''; -1 45159 } -1 45160 function descendantText(nodeName2, _ref32, context3) { -1 45161 var actualNode = _ref32.actualNode; -1 45162 nodeName2 = nodeName2.toLowerCase(); -1 45163 var nodeNames = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(','); -1 45164 var candidate = actualNode.querySelector(nodeNames); -1 45165 if (!candidate || candidate.nodeName.toLowerCase() !== nodeName2) { -1 45166 return ''; 27349 45167 }27350 -1 $({27351 -1 global: true27352 -1 }, {27353 -1 AggregateError: $AggregateError-1 45168 return accessible_text_default(candidate, context3); -1 45169 } -1 45170 var native_text_methods_default = nativeTextMethods; -1 45171 function nativeTextAlternative(virtualNode) { -1 45172 var context3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 45173 var actualNode = virtualNode.actualNode; -1 45174 if (virtualNode.props.nodeType !== 1 || [ 'presentation', 'none' ].includes(get_role_default(virtualNode))) { -1 45175 return ''; -1 45176 } -1 45177 var textMethods = findTextMethods(virtualNode); -1 45178 var accName = textMethods.reduce(function(accName2, step) { -1 45179 return accName2 || step(virtualNode, context3); -1 45180 }, ''); -1 45181 if (context3.debug) { -1 45182 axe.log(accName || '{empty-value}', actualNode, context3); -1 45183 } -1 45184 return accName; -1 45185 } -1 45186 function findTextMethods(virtualNode) { -1 45187 var elmSpec = get_element_spec_default(virtualNode); -1 45188 var methods = elmSpec.namingMethods || []; -1 45189 return methods.map(function(methodName) { -1 45190 return native_text_methods_default[methodName]; 27354 45191 });27355 -1 },27356 -1 './node_modules/core-js-pure/modules/esnext.promise.all-settled.js': function node_modulesCoreJsPureModulesEsnextPromiseAllSettledJs(module, exports, __webpack_require__) {27357 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.promise.all-settled.js');27358 -1 },27359 -1 './node_modules/core-js-pure/modules/esnext.promise.any.js': function node_modulesCoreJsPureModulesEsnextPromiseAnyJs(module, exports, __webpack_require__) {27360 -1 'use strict';27361 -1 var $ = __webpack_require__('./node_modules/core-js-pure/internals/export.js');27362 -1 var aFunction = __webpack_require__('./node_modules/core-js-pure/internals/a-function.js');27363 -1 var getBuiltIn = __webpack_require__('./node_modules/core-js-pure/internals/get-built-in.js');27364 -1 var newPromiseCapabilityModule = __webpack_require__('./node_modules/core-js-pure/internals/new-promise-capability.js');27365 -1 var perform = __webpack_require__('./node_modules/core-js-pure/internals/perform.js');27366 -1 var iterate = __webpack_require__('./node_modules/core-js-pure/internals/iterate.js');27367 -1 var PROMISE_ANY_ERROR = 'No one promise resolved';27368 -1 $({27369 -1 target: 'Promise',27370 -1 stat: true27371 -1 }, {27372 -1 any: function any(iterable) {27373 -1 var C = this;27374 -1 var capability = newPromiseCapabilityModule.f(C);27375 -1 var resolve = capability.resolve;27376 -1 var reject = capability.reject;27377 -1 var result = perform(function() {27378 -1 var promiseResolve = aFunction(C.resolve);27379 -1 var errors = [];27380 -1 var counter = 0;27381 -1 var remaining = 1;27382 -1 var alreadyResolved = false;27383 -1 iterate(iterable, function(promise) {27384 -1 var index = counter++;27385 -1 var alreadyRejected = false;27386 -1 errors.push(undefined);27387 -1 remaining++;27388 -1 promiseResolve.call(C, promise).then(function(value) {27389 -1 if (alreadyRejected || alreadyResolved) {27390 -1 return;27391 -1 }27392 -1 alreadyResolved = true;27393 -1 resolve(value);27394 -1 }, function(e) {27395 -1 if (alreadyRejected || alreadyResolved) {27396 -1 return;27397 -1 }27398 -1 alreadyRejected = true;27399 -1 errors[index] = e;27400 -1 --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR));27401 -1 });27402 -1 });27403 -1 --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR));27404 -1 });27405 -1 if (result.error) {27406 -1 reject(result.value);27407 -1 }27408 -1 return capability.promise;27409 -1 }-1 45192 } -1 45193 var native_text_alternative_default = nativeTextAlternative; -1 45194 var unsupported = { -1 45195 accessibleNameFromFieldValue: [ 'combobox', 'listbox', 'progressbar' ] -1 45196 }; -1 45197 var unsupported_default = unsupported; -1 45198 var nonTextInputTypes = [ 'button', 'checkbox', 'color', 'file', 'hidden', 'image', 'password', 'radio', 'reset', 'submit' ]; -1 45199 function isNativeTextbox(node) { -1 45200 node = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node); -1 45201 var nodeName2 = node.props.nodeName; -1 45202 return nodeName2 === 'textarea' || nodeName2 === 'input' && !nonTextInputTypes.includes((node.attr('type') || '').toLowerCase()); -1 45203 } -1 45204 var is_native_textbox_default = isNativeTextbox; -1 45205 function isNativeSelect(node) { -1 45206 node = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node); -1 45207 var nodeName2 = node.props.nodeName; -1 45208 return nodeName2 === 'select'; -1 45209 } -1 45210 var is_native_select_default = isNativeSelect; -1 45211 function isAriaTextbox(node) { -1 45212 var role = get_explicit_role_default(node); -1 45213 return role === 'textbox'; -1 45214 } -1 45215 var is_aria_textbox_default = isAriaTextbox; -1 45216 function isAriaListbox(node) { -1 45217 var role = get_explicit_role_default(node); -1 45218 return role === 'listbox'; -1 45219 } -1 45220 var is_aria_listbox_default = isAriaListbox; -1 45221 function isAriaCombobox(node) { -1 45222 var role = get_explicit_role_default(node); -1 45223 return role === 'combobox'; -1 45224 } -1 45225 var is_aria_combobox_default = isAriaCombobox; -1 45226 var rangeRoles = [ 'progressbar', 'scrollbar', 'slider', 'spinbutton' ]; -1 45227 function isAriaRange(node) { -1 45228 var role = get_explicit_role_default(node); -1 45229 return rangeRoles.includes(role); -1 45230 } -1 45231 var is_aria_range_default = isAriaRange; -1 45232 var controlValueRoles = [ 'textbox', 'progressbar', 'scrollbar', 'slider', 'spinbutton', 'combobox', 'listbox' ]; -1 45233 var _formControlValueMethods = { -1 45234 nativeTextboxValue: nativeTextboxValue, -1 45235 nativeSelectValue: nativeSelectValue, -1 45236 ariaTextboxValue: ariaTextboxValue, -1 45237 ariaListboxValue: ariaListboxValue, -1 45238 ariaComboboxValue: ariaComboboxValue, -1 45239 ariaRangeValue: ariaRangeValue -1 45240 }; -1 45241 function formControlValue(virtualNode) { -1 45242 var context3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 45243 var actualNode = virtualNode.actualNode; -1 45244 var unsupportedRoles = unsupported_default.accessibleNameFromFieldValue || []; -1 45245 var role = get_role_default(virtualNode); -1 45246 if (context3.startNode === virtualNode || !controlValueRoles.includes(role) || unsupportedRoles.includes(role)) { -1 45247 return ''; -1 45248 } -1 45249 var valueMethods = Object.keys(_formControlValueMethods).map(function(name) { -1 45250 return _formControlValueMethods[name]; 27410 45251 });27411 -1 },27412 -1 './node_modules/core-js-pure/modules/esnext.promise.try.js': function node_modulesCoreJsPureModulesEsnextPromiseTryJs(module, exports, __webpack_require__) {27413 -1 'use strict';27414 -1 var $ = __webpack_require__('./node_modules/core-js-pure/internals/export.js');27415 -1 var newPromiseCapabilityModule = __webpack_require__('./node_modules/core-js-pure/internals/new-promise-capability.js');27416 -1 var perform = __webpack_require__('./node_modules/core-js-pure/internals/perform.js');27417 -1 $({27418 -1 target: 'Promise',27419 -1 stat: true27420 -1 }, {27421 -1 try: function _try(callbackfn) {27422 -1 var promiseCapability = newPromiseCapabilityModule.f(this);27423 -1 var result = perform(callbackfn);27424 -1 (result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value);27425 -1 return promiseCapability.promise;-1 45252 var valueString = valueMethods.reduce(function(accName, step) { -1 45253 return accName || step(virtualNode, context3); -1 45254 }, ''); -1 45255 if (context3.debug) { -1 45256 log_default(valueString || '{empty-value}', actualNode, context3); -1 45257 } -1 45258 return valueString; -1 45259 } -1 45260 function nativeTextboxValue(node) { -1 45261 var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node); -1 45262 if (is_native_textbox_default(vNode)) { -1 45263 return vNode.props.value || ''; -1 45264 } -1 45265 return ''; -1 45266 } -1 45267 function nativeSelectValue(node) { -1 45268 var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node); -1 45269 if (!is_native_select_default(vNode)) { -1 45270 return ''; -1 45271 } -1 45272 var options = query_selector_all_default(vNode, 'option'); -1 45273 var selectedOptions = options.filter(function(option) { -1 45274 return option.hasAttr('selected'); -1 45275 }); -1 45276 if (!selectedOptions.length) { -1 45277 selectedOptions.push(options[0]); -1 45278 } -1 45279 return selectedOptions.map(function(option) { -1 45280 return visible_virtual_default(option); -1 45281 }).join(' ') || ''; -1 45282 } -1 45283 function ariaTextboxValue(node) { -1 45284 var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node); -1 45285 var actualNode = vNode.actualNode; -1 45286 if (!is_aria_textbox_default(vNode)) { -1 45287 return ''; -1 45288 } -1 45289 if (!actualNode || actualNode && !is_hidden_with_css_default(actualNode)) { -1 45290 return visible_virtual_default(vNode, true); -1 45291 } else { -1 45292 return actualNode.textContent; -1 45293 } -1 45294 } -1 45295 function ariaListboxValue(node, context3) { -1 45296 var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node); -1 45297 if (!is_aria_listbox_default(vNode)) { -1 45298 return ''; -1 45299 } -1 45300 var selected = get_owned_virtual_default(vNode).filter(function(owned) { -1 45301 return get_role_default(owned) === 'option' && owned.attr('aria-selected') === 'true'; -1 45302 }); -1 45303 if (selected.length === 0) { -1 45304 return ''; -1 45305 } -1 45306 return accessible_text_virtual_default(selected[0], context3); -1 45307 } -1 45308 function ariaComboboxValue(node, context3) { -1 45309 var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node); -1 45310 if (!is_aria_combobox_default(vNode)) { -1 45311 return ''; -1 45312 } -1 45313 var listbox = get_owned_virtual_default(vNode).filter(function(elm) { -1 45314 return get_role_default(elm) === 'listbox'; -1 45315 })[0]; -1 45316 return listbox ? ariaListboxValue(listbox, context3) : ''; -1 45317 } -1 45318 function ariaRangeValue(node) { -1 45319 var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node); -1 45320 if (!is_aria_range_default(vNode) || !vNode.hasAttr('aria-valuenow')) { -1 45321 return ''; -1 45322 } -1 45323 var valueNow = +vNode.attr('aria-valuenow'); -1 45324 return !isNaN(valueNow) ? String(valueNow) : '0'; -1 45325 } -1 45326 var form_control_value_default = formControlValue; -1 45327 function accessibleTextVirtual(virtualNode) { -1 45328 var context3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 45329 var actualNode = virtualNode.actualNode; -1 45330 context3 = prepareContext(virtualNode, context3); -1 45331 if (shouldIgnoreHidden(virtualNode, context3)) { -1 45332 return ''; -1 45333 } -1 45334 var computationSteps = [ arialabelledby_text_default, arialabel_text_default, native_text_alternative_default, form_control_value_default, subtree_text_default, textNodeValue, title_text_default ]; -1 45335 var accName = computationSteps.reduce(function(accName2, step) { -1 45336 if (context3.startNode === virtualNode) { -1 45337 accName2 = sanitize_default(accName2); -1 45338 } -1 45339 if (accName2 !== '') { -1 45340 return accName2; -1 45341 } -1 45342 return step(virtualNode, context3); -1 45343 }, ''); -1 45344 if (context3.debug) { -1 45345 axe.log(accName || '{empty-value}', actualNode, context3); -1 45346 } -1 45347 return accName; -1 45348 } -1 45349 function textNodeValue(virtualNode) { -1 45350 if (virtualNode.props.nodeType !== 3) { -1 45351 return ''; -1 45352 } -1 45353 return virtualNode.props.nodeValue; -1 45354 } -1 45355 function shouldIgnoreHidden(_ref33, context3) { -1 45356 var actualNode = _ref33.actualNode; -1 45357 if (!actualNode) { -1 45358 return false; -1 45359 } -1 45360 if (actualNode.nodeType !== 1 || context3.includeHidden) { -1 45361 return false; -1 45362 } -1 45363 return !is_visible_default(actualNode, true); -1 45364 } -1 45365 function prepareContext(virtualNode, context3) { -1 45366 var actualNode = virtualNode.actualNode; -1 45367 if (!context3.startNode) { -1 45368 context3 = _extends({ -1 45369 startNode: virtualNode -1 45370 }, context3); -1 45371 } -1 45372 if (!actualNode) { -1 45373 return context3; -1 45374 } -1 45375 if (actualNode.nodeType === 1 && context3.inLabelledByContext && context3.includeHidden === void 0) { -1 45376 context3 = _extends({ -1 45377 includeHidden: !is_visible_default(actualNode, true) -1 45378 }, context3); -1 45379 } -1 45380 return context3; -1 45381 } -1 45382 accessibleTextVirtual.alreadyProcessed = function alreadyProcessed(virtualnode, context3) { -1 45383 context3.processed = context3.processed || []; -1 45384 if (context3.processed.includes(virtualnode)) { -1 45385 return true; -1 45386 } -1 45387 context3.processed.push(virtualnode); -1 45388 return false; -1 45389 }; -1 45390 var accessible_text_virtual_default = accessibleTextVirtual; -1 45391 function accessibleText(element, context3) { -1 45392 var virtualNode = get_node_from_tree_default(element); -1 45393 return accessible_text_virtual_default(virtualNode, context3); -1 45394 } -1 45395 var accessible_text_default = accessibleText; -1 45396 function arialabelledbyText(vNode) { -1 45397 var context3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 45398 if (!(vNode instanceof abstract_virtual_node_default)) { -1 45399 if (vNode.nodeType !== 1) { -1 45400 return ''; 27426 45401 } -1 45402 vNode = get_node_from_tree_default(vNode); -1 45403 } -1 45404 if (vNode.props.nodeType !== 1 || context3.inLabelledByContext || context3.inControlContext || !vNode.attr('aria-labelledby')) { -1 45405 return ''; -1 45406 } -1 45407 var refs = idrefs_default(vNode, 'aria-labelledby').filter(function(elm) { -1 45408 return elm; 27427 45409 });27428 -1 },27429 -1 './node_modules/core-js-pure/modules/web.dom-collections.iterator.js': function node_modulesCoreJsPureModulesWebDomCollectionsIteratorJs(module, exports, __webpack_require__) {27430 -1 __webpack_require__('./node_modules/core-js-pure/modules/es.array.iterator.js');27431 -1 var DOMIterables = __webpack_require__('./node_modules/core-js-pure/internals/dom-iterables.js');27432 -1 var global = __webpack_require__('./node_modules/core-js-pure/internals/global.js');27433 -1 var classof = __webpack_require__('./node_modules/core-js-pure/internals/classof.js');27434 -1 var createNonEnumerableProperty = __webpack_require__('./node_modules/core-js-pure/internals/create-non-enumerable-property.js');27435 -1 var Iterators = __webpack_require__('./node_modules/core-js-pure/internals/iterators.js');27436 -1 var wellKnownSymbol = __webpack_require__('./node_modules/core-js-pure/internals/well-known-symbol.js');27437 -1 var TO_STRING_TAG = wellKnownSymbol('toStringTag');27438 -1 for (var COLLECTION_NAME in DOMIterables) {27439 -1 var Collection = global[COLLECTION_NAME];27440 -1 var CollectionPrototype = Collection && Collection.prototype;27441 -1 if (CollectionPrototype && classof(CollectionPrototype) !== TO_STRING_TAG) {27442 -1 createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);27443 -1 }27444 -1 Iterators[COLLECTION_NAME] = Iterators.Array;-1 45410 return refs.reduce(function(accessibleName, elm) { -1 45411 var accessibleNameAdd = accessible_text_default(elm, _extends({ -1 45412 inLabelledByContext: true, -1 45413 startNode: context3.startNode || vNode -1 45414 }, context3)); -1 45415 if (!accessibleName) { -1 45416 return accessibleNameAdd; -1 45417 } else { -1 45418 return ''.concat(accessibleName, ' ').concat(accessibleNameAdd); -1 45419 } -1 45420 }, ''); -1 45421 } -1 45422 var arialabelledby_text_default = arialabelledbyText; -1 45423 var text_exports = {}; -1 45424 __export(text_exports, { -1 45425 accessibleText: function accessibleText() { -1 45426 return accessible_text_default; -1 45427 }, -1 45428 accessibleTextVirtual: function accessibleTextVirtual() { -1 45429 return accessible_text_virtual_default; -1 45430 }, -1 45431 autocomplete: function autocomplete() { -1 45432 return _autocomplete; -1 45433 }, -1 45434 formControlValue: function formControlValue() { -1 45435 return form_control_value_default; -1 45436 }, -1 45437 formControlValueMethods: function formControlValueMethods() { -1 45438 return _formControlValueMethods; -1 45439 }, -1 45440 hasUnicode: function hasUnicode() { -1 45441 return has_unicode_default; -1 45442 }, -1 45443 isHumanInterpretable: function isHumanInterpretable() { -1 45444 return is_human_interpretable_default; -1 45445 }, -1 45446 isIconLigature: function isIconLigature() { -1 45447 return is_icon_ligature_default; -1 45448 }, -1 45449 isValidAutocomplete: function isValidAutocomplete() { -1 45450 return is_valid_autocomplete_default; -1 45451 }, -1 45452 label: function label() { -1 45453 return label_default; -1 45454 }, -1 45455 labelText: function labelText() { -1 45456 return label_text_default; -1 45457 }, -1 45458 labelVirtual: function labelVirtual() { -1 45459 return label_virtual_default2; -1 45460 }, -1 45461 nativeElementType: function nativeElementType() { -1 45462 return native_element_type_default; -1 45463 }, -1 45464 nativeTextAlternative: function nativeTextAlternative() { -1 45465 return native_text_alternative_default; -1 45466 }, -1 45467 nativeTextMethods: function nativeTextMethods() { -1 45468 return native_text_methods_default; -1 45469 }, -1 45470 removeUnicode: function removeUnicode() { -1 45471 return remove_unicode_default; -1 45472 }, -1 45473 sanitize: function sanitize() { -1 45474 return sanitize_default; -1 45475 }, -1 45476 subtreeText: function subtreeText() { -1 45477 return subtree_text_default; -1 45478 }, -1 45479 titleText: function titleText() { -1 45480 return title_text_default; -1 45481 }, -1 45482 unsupported: function unsupported() { -1 45483 return unsupported_default; -1 45484 }, -1 45485 visible: function visible() { -1 45486 return visible_default; -1 45487 }, -1 45488 visibleTextNodes: function visibleTextNodes() { -1 45489 return visible_text_nodes_default; -1 45490 }, -1 45491 visibleVirtual: function visibleVirtual() { -1 45492 return visible_virtual_default; -1 45493 } -1 45494 }); -1 45495 function getUnicodeNonBmpRegExp() { -1 45496 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; -1 45497 } -1 45498 function getPunctuationRegExp() { -1 45499 return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&\xa3\xa2\xa5\xa7\u20ac()*+,\-.\/:;<=>?@\[\]^_`{|}~\xb1]/g; -1 45500 } -1 45501 function getSupplementaryPrivateUseRegExp() { -1 45502 return /[\uDB80-\uDBBF][\uDC00-\uDFFF]/g; -1 45503 } -1 45504 var emoji_regex = __toModule(require_emoji_regex()); -1 45505 function hasUnicode(str, options) { -1 45506 var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations; -1 45507 if (emoji) { -1 45508 return emoji_regex['default']().test(str); -1 45509 } -1 45510 if (nonBmp) { -1 45511 return getUnicodeNonBmpRegExp().test(str) || getSupplementaryPrivateUseRegExp().test(str); -1 45512 } -1 45513 if (punctuations) { -1 45514 return getPunctuationRegExp().test(str); 27445 45515 }27446 -1 },27447 -1 './node_modules/css-selector-parser/lib/index.js': function node_modulesCssSelectorParserLibIndexJs(module, exports, __webpack_require__) {27448 -1 'use strict';27449 -1 Object.defineProperty(exports, '__esModule', {27450 -1 value: true-1 45516 return false; -1 45517 } -1 45518 var has_unicode_default = hasUnicode; -1 45519 var emoji_regex2 = __toModule(require_emoji_regex()); -1 45520 function removeUnicode(str, options) { -1 45521 var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations; -1 45522 if (emoji) { -1 45523 str = str.replace(emoji_regex2['default'](), ''); -1 45524 } -1 45525 if (nonBmp) { -1 45526 str = str.replace(getUnicodeNonBmpRegExp(), ''); -1 45527 str = str.replace(getSupplementaryPrivateUseRegExp(), ''); -1 45528 } -1 45529 if (punctuations) { -1 45530 str = str.replace(getPunctuationRegExp(), ''); -1 45531 } -1 45532 return str; -1 45533 } -1 45534 var remove_unicode_default = removeUnicode; -1 45535 function isHumanInterpretable(str) { -1 45536 if (!str.length) { -1 45537 return 0; -1 45538 } -1 45539 var alphaNumericIconMap = [ 'x', 'i' ]; -1 45540 if (alphaNumericIconMap.includes(str)) { -1 45541 return 0; -1 45542 } -1 45543 var noUnicodeStr = remove_unicode_default(str, { -1 45544 emoji: true, -1 45545 nonBmp: true, -1 45546 punctuations: true 27451 45547 });27452 -1 var parser_context_1 = __webpack_require__('./node_modules/css-selector-parser/lib/parser-context.js');27453 -1 var render_1 = __webpack_require__('./node_modules/css-selector-parser/lib/render.js');27454 -1 var CssSelectorParser = function() {27455 -1 function CssSelectorParser() {27456 -1 this.pseudos = {};27457 -1 this.attrEqualityMods = {};27458 -1 this.ruleNestingOperators = {};27459 -1 this.substitutesEnabled = false;27460 -1 }27461 -1 CssSelectorParser.prototype.registerSelectorPseudos = function() {27462 -1 var pseudos = [];27463 -1 for (var _i = 0; _i < arguments.length; _i++) {27464 -1 pseudos[_i] = arguments[_i];27465 -1 }27466 -1 for (var _a = 0, pseudos_1 = pseudos; _a < pseudos_1.length; _a++) {27467 -1 var pseudo = pseudos_1[_a];27468 -1 this.pseudos[pseudo] = 'selector';27469 -1 }27470 -1 return this;27471 -1 };27472 -1 CssSelectorParser.prototype.unregisterSelectorPseudos = function() {27473 -1 var pseudos = [];27474 -1 for (var _i = 0; _i < arguments.length; _i++) {27475 -1 pseudos[_i] = arguments[_i];27476 -1 }27477 -1 for (var _a = 0, pseudos_2 = pseudos; _a < pseudos_2.length; _a++) {27478 -1 var pseudo = pseudos_2[_a];27479 -1 delete this.pseudos[pseudo];27480 -1 }27481 -1 return this;27482 -1 };27483 -1 CssSelectorParser.prototype.registerNumericPseudos = function() {27484 -1 var pseudos = [];27485 -1 for (var _i = 0; _i < arguments.length; _i++) {27486 -1 pseudos[_i] = arguments[_i];27487 -1 }27488 -1 for (var _a = 0, pseudos_3 = pseudos; _a < pseudos_3.length; _a++) {27489 -1 var pseudo = pseudos_3[_a];27490 -1 this.pseudos[pseudo] = 'numeric';27491 -1 }27492 -1 return this;27493 -1 };27494 -1 CssSelectorParser.prototype.unregisterNumericPseudos = function() {27495 -1 var pseudos = [];27496 -1 for (var _i = 0; _i < arguments.length; _i++) {27497 -1 pseudos[_i] = arguments[_i];27498 -1 }27499 -1 for (var _a = 0, pseudos_4 = pseudos; _a < pseudos_4.length; _a++) {27500 -1 var pseudo = pseudos_4[_a];27501 -1 delete this.pseudos[pseudo];27502 -1 }27503 -1 return this;27504 -1 };27505 -1 CssSelectorParser.prototype.registerNestingOperators = function() {27506 -1 var operators = [];27507 -1 for (var _i = 0; _i < arguments.length; _i++) {27508 -1 operators[_i] = arguments[_i];27509 -1 }27510 -1 for (var _a = 0, operators_1 = operators; _a < operators_1.length; _a++) {27511 -1 var operator = operators_1[_a];27512 -1 this.ruleNestingOperators[operator] = true;27513 -1 }27514 -1 return this;27515 -1 };27516 -1 CssSelectorParser.prototype.unregisterNestingOperators = function() {27517 -1 var operators = [];27518 -1 for (var _i = 0; _i < arguments.length; _i++) {27519 -1 operators[_i] = arguments[_i];27520 -1 }27521 -1 for (var _a = 0, operators_2 = operators; _a < operators_2.length; _a++) {27522 -1 var operator = operators_2[_a];27523 -1 delete this.ruleNestingOperators[operator];27524 -1 }27525 -1 return this;27526 -1 };27527 -1 CssSelectorParser.prototype.registerAttrEqualityMods = function() {27528 -1 var mods = [];27529 -1 for (var _i = 0; _i < arguments.length; _i++) {27530 -1 mods[_i] = arguments[_i];27531 -1 }27532 -1 for (var _a = 0, mods_1 = mods; _a < mods_1.length; _a++) {27533 -1 var mod = mods_1[_a];27534 -1 this.attrEqualityMods[mod] = true;27535 -1 }27536 -1 return this;27537 -1 };27538 -1 CssSelectorParser.prototype.unregisterAttrEqualityMods = function() {27539 -1 var mods = [];27540 -1 for (var _i = 0; _i < arguments.length; _i++) {27541 -1 mods[_i] = arguments[_i];27542 -1 }27543 -1 for (var _a = 0, mods_2 = mods; _a < mods_2.length; _a++) {27544 -1 var mod = mods_2[_a];27545 -1 delete this.attrEqualityMods[mod];27546 -1 }27547 -1 return this;27548 -1 };27549 -1 CssSelectorParser.prototype.enableSubstitutes = function() {27550 -1 this.substitutesEnabled = true;27551 -1 return this;27552 -1 };27553 -1 CssSelectorParser.prototype.disableSubstitutes = function() {27554 -1 this.substitutesEnabled = false;27555 -1 return this;27556 -1 };27557 -1 CssSelectorParser.prototype.parse = function(str) {27558 -1 return parser_context_1.parseCssSelector(str, 0, this.pseudos, this.attrEqualityMods, this.ruleNestingOperators, this.substitutesEnabled);27559 -1 };27560 -1 CssSelectorParser.prototype.render = function(path) {27561 -1 return render_1.renderEntity(path).trim();-1 45548 if (!sanitize_default(noUnicodeStr)) { -1 45549 return 0; -1 45550 } -1 45551 return 1; -1 45552 } -1 45553 var is_human_interpretable_default = isHumanInterpretable; -1 45554 function isIconLigature(textVNode) { -1 45555 var differenceThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .15; -1 45556 var occuranceThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3; -1 45557 var nodeValue = textVNode.actualNode.nodeValue.trim(); -1 45558 if (!sanitize_default(nodeValue) || has_unicode_default(nodeValue, { -1 45559 emoji: true, -1 45560 nonBmp: true -1 45561 })) { -1 45562 return false; -1 45563 } -1 45564 if (!cache_default.get('canvasContext')) { -1 45565 cache_default.set('canvasContext', document.createElement('canvas').getContext('2d')); -1 45566 } -1 45567 var canvasContext = cache_default.get('canvasContext'); -1 45568 var canvas = canvasContext.canvas; -1 45569 if (!cache_default.get('fonts')) { -1 45570 cache_default.set('fonts', {}); -1 45571 } -1 45572 var fonts = cache_default.get('fonts'); -1 45573 var style = window.getComputedStyle(textVNode.parent.actualNode); -1 45574 var fontFamily = style.getPropertyValue('font-family'); -1 45575 if (!fonts[fontFamily]) { -1 45576 fonts[fontFamily] = { -1 45577 occurances: 0, -1 45578 numLigatures: 0 27562 45579 };27563 -1 return CssSelectorParser;27564 -1 }();27565 -1 exports.CssSelectorParser = CssSelectorParser;27566 -1 },27567 -1 './node_modules/css-selector-parser/lib/parser-context.js': function node_modulesCssSelectorParserLibParserContextJs(module, exports, __webpack_require__) {27568 -1 'use strict';27569 -1 Object.defineProperty(exports, '__esModule', {27570 -1 value: true27571 -1 });27572 -1 var utils_1 = __webpack_require__('./node_modules/css-selector-parser/lib/utils.js');27573 -1 function parseCssSelector(str, pos, pseudos, attrEqualityMods, ruleNestingOperators, substitutesEnabled) {27574 -1 var l = str.length;27575 -1 var chr = '';27576 -1 function getStr(quote, escapeTable) {27577 -1 var result = '';27578 -1 pos++;27579 -1 chr = str.charAt(pos);27580 -1 while (pos < l) {27581 -1 if (chr === quote) {27582 -1 pos++;27583 -1 return result;27584 -1 } else if (chr === '\\') {27585 -1 pos++;27586 -1 chr = str.charAt(pos);27587 -1 var esc = void 0;27588 -1 if (chr === quote) {27589 -1 result += quote;27590 -1 } else if ((esc = escapeTable[chr]) !== undefined) {27591 -1 result += esc;27592 -1 } else if (utils_1.isHex(chr)) {27593 -1 var hex = chr;27594 -1 pos++;27595 -1 chr = str.charAt(pos);27596 -1 while (utils_1.isHex(chr)) {27597 -1 hex += chr;27598 -1 pos++;27599 -1 chr = str.charAt(pos);27600 -1 }27601 -1 if (chr === ' ') {27602 -1 pos++;27603 -1 chr = str.charAt(pos);27604 -1 }27605 -1 result += String.fromCharCode(parseInt(hex, 16));27606 -1 continue;27607 -1 } else {27608 -1 result += chr;27609 -1 }27610 -1 } else {27611 -1 result += chr;27612 -1 }27613 -1 pos++;27614 -1 chr = str.charAt(pos);27615 -1 }27616 -1 return result;-1 45580 } -1 45581 var font = fonts[fontFamily]; -1 45582 if (font.occurances >= occuranceThreshold) { -1 45583 if (font.numLigatures / font.occurances === 1) { -1 45584 return true; -1 45585 } else if (font.numLigatures === 0) { -1 45586 return false; 27617 45587 }27618 -1 function getIdent() {27619 -1 var result = '';27620 -1 chr = str.charAt(pos);27621 -1 while (pos < l) {27622 -1 if (utils_1.isIdent(chr)) {27623 -1 result += chr;27624 -1 } else if (chr === '\\') {27625 -1 pos++;27626 -1 if (pos >= l) {27627 -1 throw Error('Expected symbol but end of file reached.');27628 -1 }27629 -1 chr = str.charAt(pos);27630 -1 if (utils_1.identSpecialChars[chr]) {27631 -1 result += chr;27632 -1 } else if (utils_1.isHex(chr)) {27633 -1 var hex = chr;27634 -1 pos++;27635 -1 chr = str.charAt(pos);27636 -1 while (utils_1.isHex(chr)) {27637 -1 hex += chr;27638 -1 pos++;27639 -1 chr = str.charAt(pos);27640 -1 }27641 -1 if (chr === ' ') {27642 -1 pos++;27643 -1 chr = str.charAt(pos);27644 -1 }27645 -1 result += String.fromCharCode(parseInt(hex, 16));27646 -1 continue;27647 -1 } else {27648 -1 result += chr;27649 -1 }27650 -1 } else {27651 -1 return result;27652 -1 }27653 -1 pos++;27654 -1 chr = str.charAt(pos);27655 -1 }27656 -1 return result;-1 45588 } -1 45589 font.occurances++; -1 45590 var fontSize = 30; -1 45591 var fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily); -1 45592 canvasContext.font = fontStyle; -1 45593 var firstChar = nodeValue.charAt(0); -1 45594 var width = canvasContext.measureText(firstChar).width; -1 45595 if (width < 30) { -1 45596 var diff = 30 / width; -1 45597 width *= diff; -1 45598 fontSize *= diff; -1 45599 fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily); -1 45600 } -1 45601 canvas.width = width; -1 45602 canvas.height = fontSize; -1 45603 canvasContext.font = fontStyle; -1 45604 canvasContext.textAlign = 'left'; -1 45605 canvasContext.textBaseline = 'top'; -1 45606 canvasContext.fillText(firstChar, 0, 0); -1 45607 var compareData = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer); -1 45608 if (!compareData.some(function(pixel) { -1 45609 return pixel; -1 45610 })) { -1 45611 font.numLigatures++; -1 45612 return true; -1 45613 } -1 45614 canvasContext.clearRect(0, 0, width, fontSize); -1 45615 canvasContext.fillText(nodeValue, 0, 0); -1 45616 var compareWith = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer); -1 45617 var differences = compareData.reduce(function(diff, pixel, i) { -1 45618 if (pixel === 0 && compareWith[i] === 0) { -1 45619 return diff; -1 45620 } -1 45621 if (pixel !== 0 && compareWith[i] !== 0) { -1 45622 return diff; -1 45623 } -1 45624 return ++diff; -1 45625 }, 0); -1 45626 var expectedWidth = nodeValue.split('').reduce(function(width2, _char3) { -1 45627 return width2 + canvasContext.measureText(_char3).width; -1 45628 }, 0); -1 45629 var actualWidth = canvasContext.measureText(nodeValue).width; -1 45630 var pixelDifference = differences / compareData.length; -1 45631 var sizeDifference = 1 - actualWidth / expectedWidth; -1 45632 if (pixelDifference >= differenceThreshold && sizeDifference >= differenceThreshold) { -1 45633 font.numLigatures++; -1 45634 return true; -1 45635 } -1 45636 return false; -1 45637 } -1 45638 var is_icon_ligature_default = isIconLigature; -1 45639 var _autocomplete = { -1 45640 stateTerms: [ 'on', 'off' ], -1 45641 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' ], -1 45642 qualifiers: [ 'home', 'work', 'mobile', 'fax', 'pager' ], -1 45643 qualifiedTerms: [ 'tel', 'tel-country-code', 'tel-national', 'tel-area-code', 'tel-local', 'tel-local-prefix', 'tel-local-suffix', 'tel-extension', 'email', 'impp' ], -1 45644 locations: [ 'billing', 'shipping' ] -1 45645 }; -1 45646 function isValidAutocomplete(autocompleteValue) { -1 45647 var _ref34 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref34$looseTyped = _ref34.looseTyped, looseTyped = _ref34$looseTyped === void 0 ? false : _ref34$looseTyped, _ref34$stateTerms = _ref34.stateTerms, stateTerms = _ref34$stateTerms === void 0 ? [] : _ref34$stateTerms, _ref34$locations = _ref34.locations, locations = _ref34$locations === void 0 ? [] : _ref34$locations, _ref34$qualifiers = _ref34.qualifiers, qualifiers = _ref34$qualifiers === void 0 ? [] : _ref34$qualifiers, _ref34$standaloneTerm = _ref34.standaloneTerms, standaloneTerms = _ref34$standaloneTerm === void 0 ? [] : _ref34$standaloneTerm, _ref34$qualifiedTerms = _ref34.qualifiedTerms, qualifiedTerms = _ref34$qualifiedTerms === void 0 ? [] : _ref34$qualifiedTerms; -1 45648 autocompleteValue = autocompleteValue.toLowerCase().trim(); -1 45649 stateTerms = stateTerms.concat(_autocomplete.stateTerms); -1 45650 if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') { -1 45651 return true; -1 45652 } -1 45653 qualifiers = qualifiers.concat(_autocomplete.qualifiers); -1 45654 locations = locations.concat(_autocomplete.locations); -1 45655 standaloneTerms = standaloneTerms.concat(_autocomplete.standaloneTerms); -1 45656 qualifiedTerms = qualifiedTerms.concat(_autocomplete.qualifiedTerms); -1 45657 var autocompleteTerms = autocompleteValue.split(/\s+/g); -1 45658 if (!looseTyped) { -1 45659 if (autocompleteTerms[0].length > 8 && autocompleteTerms[0].substr(0, 8) === 'section-') { -1 45660 autocompleteTerms.shift(); 27657 45661 }27658 -1 function skipWhitespace() {27659 -1 chr = str.charAt(pos);27660 -1 var result = false;27661 -1 while (chr === ' ' || chr === '\t' || chr === '\n' || chr === '\r' || chr === '\f') {27662 -1 result = true;27663 -1 pos++;27664 -1 chr = str.charAt(pos);27665 -1 }27666 -1 return result;-1 45662 if (locations.includes(autocompleteTerms[0])) { -1 45663 autocompleteTerms.shift(); 27667 45664 }27668 -1 function parse() {27669 -1 var res = parseSelector();27670 -1 if (pos < l) {27671 -1 throw Error('Rule expected but "' + str.charAt(pos) + '" found.');27672 -1 }27673 -1 return res;-1 45665 if (qualifiers.includes(autocompleteTerms[0])) { -1 45666 autocompleteTerms.shift(); -1 45667 standaloneTerms = []; 27674 45668 }27675 -1 function parseSelector() {27676 -1 var selector = parseSingleSelector();27677 -1 if (!selector) {27678 -1 return null;27679 -1 }27680 -1 var res = selector;27681 -1 chr = str.charAt(pos);27682 -1 while (chr === ',') {27683 -1 pos++;27684 -1 skipWhitespace();27685 -1 if (res.type !== 'selectors') {27686 -1 res = {27687 -1 type: 'selectors',27688 -1 selectors: [ selector ]27689 -1 };27690 -1 }27691 -1 selector = parseSingleSelector();27692 -1 if (!selector) {27693 -1 throw Error('Rule expected after ",".');27694 -1 }27695 -1 res.selectors.push(selector);27696 -1 }27697 -1 return res;-1 45669 if (autocompleteTerms.length !== 1) { -1 45670 return false; -1 45671 } -1 45672 } -1 45673 var purposeTerm = autocompleteTerms[autocompleteTerms.length - 1]; -1 45674 return standaloneTerms.includes(purposeTerm) || qualifiedTerms.includes(purposeTerm); -1 45675 } -1 45676 var is_valid_autocomplete_default = isValidAutocomplete; -1 45677 function visible(element, screenReader, noRecursing) { -1 45678 element = get_node_from_tree_default(element); -1 45679 return visible_virtual_default(element, screenReader, noRecursing); -1 45680 } -1 45681 var visible_default = visible; -1 45682 function labelVirtual2(virtualNode) { -1 45683 var ref, candidate, doc; -1 45684 candidate = label_virtual_default(virtualNode); -1 45685 if (candidate) { -1 45686 return candidate; -1 45687 } -1 45688 if (virtualNode.attr('id')) { -1 45689 if (!virtualNode.actualNode) { -1 45690 throw new TypeError('Cannot resolve explicit label reference for non-DOM nodes'); 27698 45691 }27699 -1 function parseSingleSelector() {27700 -1 skipWhitespace();27701 -1 var selector = {27702 -1 type: 'ruleSet'27703 -1 };27704 -1 var rule = parseRule();27705 -1 if (!rule) {27706 -1 return null;27707 -1 }27708 -1 var currentRule = selector;27709 -1 while (rule) {27710 -1 rule.type = 'rule';27711 -1 currentRule.rule = rule;27712 -1 currentRule = rule;27713 -1 skipWhitespace();27714 -1 chr = str.charAt(pos);27715 -1 if (pos >= l || chr === ',' || chr === ')') {27716 -1 break;27717 -1 }27718 -1 if (ruleNestingOperators[chr]) {27719 -1 var op = chr;27720 -1 pos++;27721 -1 skipWhitespace();27722 -1 rule = parseRule();27723 -1 if (!rule) {27724 -1 throw Error('Rule expected after "' + op + '".');27725 -1 }27726 -1 rule.nestingOperator = op;27727 -1 } else {27728 -1 rule = parseRule();27729 -1 if (rule) {27730 -1 rule.nestingOperator = null;27731 -1 }27732 -1 }27733 -1 }27734 -1 return selector;-1 45692 var id = escape_selector_default(virtualNode.attr('id')); -1 45693 doc = get_root_node_default2(virtualNode.actualNode); -1 45694 ref = doc.querySelector('label[for="' + id + '"]'); -1 45695 candidate = ref && visible_default(ref, true); -1 45696 if (candidate) { -1 45697 return candidate; 27735 45698 }27736 -1 function parseRule() {27737 -1 var rule = null;27738 -1 while (pos < l) {27739 -1 chr = str.charAt(pos);27740 -1 if (chr === '*') {27741 -1 pos++;27742 -1 (rule = rule || {}).tagName = '*';27743 -1 } else if (utils_1.isIdentStart(chr) || chr === '\\') {27744 -1 (rule = rule || {}).tagName = getIdent();27745 -1 } else if (chr === '.') {27746 -1 pos++;27747 -1 rule = rule || {};27748 -1 (rule.classNames = rule.classNames || []).push(getIdent());27749 -1 } else if (chr === '#') {27750 -1 pos++;27751 -1 (rule = rule || {}).id = getIdent();27752 -1 } else if (chr === '[') {27753 -1 pos++;27754 -1 skipWhitespace();27755 -1 var attr = {27756 -1 name: getIdent()27757 -1 };27758 -1 skipWhitespace();27759 -1 if (chr === ']') {27760 -1 pos++;27761 -1 } else {27762 -1 var operator = '';27763 -1 if (attrEqualityMods[chr]) {27764 -1 operator = chr;27765 -1 pos++;27766 -1 chr = str.charAt(pos);27767 -1 }27768 -1 if (pos >= l) {27769 -1 throw Error('Expected "=" but end of file reached.');27770 -1 }27771 -1 if (chr !== '=') {27772 -1 throw Error('Expected "=" but "' + chr + '" found.');27773 -1 }27774 -1 attr.operator = operator + '=';27775 -1 pos++;27776 -1 skipWhitespace();27777 -1 var attrValue = '';27778 -1 attr.valueType = 'string';27779 -1 if (chr === '"') {27780 -1 attrValue = getStr('"', utils_1.doubleQuotesEscapeChars);27781 -1 } else if (chr === '\'') {27782 -1 attrValue = getStr('\'', utils_1.singleQuoteEscapeChars);27783 -1 } else if (substitutesEnabled && chr === '$') {27784 -1 pos++;27785 -1 attrValue = getIdent();27786 -1 attr.valueType = 'substitute';27787 -1 } else {27788 -1 while (pos < l) {27789 -1 if (chr === ']') {27790 -1 break;27791 -1 }27792 -1 attrValue += chr;27793 -1 pos++;27794 -1 chr = str.charAt(pos);27795 -1 }27796 -1 attrValue = attrValue.trim();27797 -1 }27798 -1 skipWhitespace();27799 -1 if (pos >= l) {27800 -1 throw Error('Expected "]" but end of file reached.');27801 -1 }27802 -1 if (chr !== ']') {27803 -1 throw Error('Expected "]" but "' + chr + '" found.');27804 -1 }27805 -1 pos++;27806 -1 attr.value = attrValue;27807 -1 }27808 -1 rule = rule || {};27809 -1 (rule.attrs = rule.attrs || []).push(attr);27810 -1 } else if (chr === ':') {27811 -1 pos++;27812 -1 var pseudoName = getIdent();27813 -1 var pseudo = {27814 -1 name: pseudoName27815 -1 };27816 -1 if (chr === '(') {27817 -1 pos++;27818 -1 var value = '';27819 -1 skipWhitespace();27820 -1 if (pseudos[pseudoName] === 'selector') {27821 -1 pseudo.valueType = 'selector';27822 -1 value = parseSelector();27823 -1 } else {27824 -1 pseudo.valueType = pseudos[pseudoName] || 'string';27825 -1 if (chr === '"') {27826 -1 value = getStr('"', utils_1.doubleQuotesEscapeChars);27827 -1 } else if (chr === '\'') {27828 -1 value = getStr('\'', utils_1.singleQuoteEscapeChars);27829 -1 } else if (substitutesEnabled && chr === '$') {27830 -1 pos++;27831 -1 value = getIdent();27832 -1 pseudo.valueType = 'substitute';27833 -1 } else {27834 -1 while (pos < l) {27835 -1 if (chr === ')') {27836 -1 break;27837 -1 }27838 -1 value += chr;27839 -1 pos++;27840 -1 chr = str.charAt(pos);27841 -1 }27842 -1 value = value.trim();27843 -1 }27844 -1 skipWhitespace();27845 -1 }27846 -1 if (pos >= l) {27847 -1 throw Error('Expected ")" but end of file reached.');27848 -1 }27849 -1 if (chr !== ')') {27850 -1 throw Error('Expected ")" but "' + chr + '" found.');27851 -1 }27852 -1 pos++;27853 -1 pseudo.value = value;27854 -1 }27855 -1 rule = rule || {};27856 -1 (rule.pseudos = rule.pseudos || []).push(pseudo);27857 -1 } else {27858 -1 break;27859 -1 }-1 45699 } -1 45700 ref = closest_default(virtualNode, 'label'); -1 45701 candidate = ref && visible_virtual_default(ref, true); -1 45702 if (candidate) { -1 45703 return candidate; -1 45704 } -1 45705 return null; -1 45706 } -1 45707 var label_virtual_default2 = labelVirtual2; -1 45708 function label(node) { -1 45709 node = get_node_from_tree_default(node); -1 45710 return label_virtual_default2(node); -1 45711 } -1 45712 var label_default = label; -1 45713 var nativeElementType = [ { -1 45714 matches: [ { -1 45715 nodeName: 'textarea' -1 45716 }, { -1 45717 nodeName: 'input', -1 45718 properties: { -1 45719 type: [ 'text', 'password', 'search', 'tel', 'email', 'url' ] -1 45720 } -1 45721 } ], -1 45722 namingMethods: 'labelText' -1 45723 }, { -1 45724 matches: { -1 45725 nodeName: 'input', -1 45726 properties: { -1 45727 type: [ 'button', 'submit', 'reset' ] -1 45728 } -1 45729 }, -1 45730 namingMethods: [ 'valueText', 'titleText', 'buttonDefaultText' ] -1 45731 }, { -1 45732 matches: { -1 45733 nodeName: 'input', -1 45734 properties: { -1 45735 type: 'image' -1 45736 } -1 45737 }, -1 45738 namingMethods: [ 'altText', 'valueText', 'labelText', 'titleText', 'buttonDefaultText' ] -1 45739 }, { -1 45740 matches: 'button', -1 45741 namingMethods: 'subtreeText' -1 45742 }, { -1 45743 matches: 'fieldset', -1 45744 namingMethods: 'fieldsetLegendText' -1 45745 }, { -1 45746 matches: 'OUTPUT', -1 45747 namingMethods: 'subtreeText' -1 45748 }, { -1 45749 matches: [ { -1 45750 nodeName: 'select' -1 45751 }, { -1 45752 nodeName: 'input', -1 45753 properties: { -1 45754 type: /^(?!text|password|search|tel|email|url|button|submit|reset)/ -1 45755 } -1 45756 } ], -1 45757 namingMethods: 'labelText' -1 45758 }, { -1 45759 matches: 'summary', -1 45760 namingMethods: 'subtreeText' -1 45761 }, { -1 45762 matches: 'figure', -1 45763 namingMethods: [ 'figureText', 'titleText' ] -1 45764 }, { -1 45765 matches: 'img', -1 45766 namingMethods: 'altText' -1 45767 }, { -1 45768 matches: 'table', -1 45769 namingMethods: [ 'tableCaptionText', 'tableSummaryText' ] -1 45770 }, { -1 45771 matches: [ 'hr', 'br' ], -1 45772 namingMethods: [ 'titleText', 'singleSpace' ] -1 45773 } ]; -1 45774 var native_element_type_default = nativeElementType; -1 45775 function visibleTextNodes(vNode) { -1 45776 var parentVisible = is_visible_default(vNode.actualNode); -1 45777 var nodes = []; -1 45778 vNode.children.forEach(function(child) { -1 45779 if (child.actualNode.nodeType === 3) { -1 45780 if (parentVisible) { -1 45781 nodes.push(child); 27860 45782 }27861 -1 return rule;-1 45783 } else { -1 45784 nodes = nodes.concat(visibleTextNodes(child)); 27862 45785 }27863 -1 return parse();27864 -1 }27865 -1 exports.parseCssSelector = parseCssSelector;27866 -1 },27867 -1 './node_modules/css-selector-parser/lib/render.js': function node_modulesCssSelectorParserLibRenderJs(module, exports, __webpack_require__) {27868 -1 'use strict';27869 -1 Object.defineProperty(exports, '__esModule', {27870 -1 value: true27871 45786 });27872 -1 var utils_1 = __webpack_require__('./node_modules/css-selector-parser/lib/utils.js');27873 -1 function renderEntity(entity) {27874 -1 var res = '';27875 -1 switch (entity.type) {27876 -1 case 'ruleSet':27877 -1 var currentEntity = entity.rule;27878 -1 var parts = [];27879 -1 while (currentEntity) {27880 -1 if (currentEntity.nestingOperator) {27881 -1 parts.push(currentEntity.nestingOperator);27882 -1 }27883 -1 parts.push(renderEntity(currentEntity));27884 -1 currentEntity = currentEntity.rule;27885 -1 }27886 -1 res = parts.join(' ');27887 -1 break;27888 -127889 -1 case 'selectors':27890 -1 res = entity.selectors.map(renderEntity).join(', ');27891 -1 break;27892 -127893 -1 case 'rule':27894 -1 if (entity.tagName) {27895 -1 if (entity.tagName === '*') {27896 -1 res = '*';27897 -1 } else {27898 -1 res = utils_1.escapeIdentifier(entity.tagName);27899 -1 }27900 -1 }27901 -1 if (entity.id) {27902 -1 res += '#' + utils_1.escapeIdentifier(entity.id);27903 -1 }27904 -1 if (entity.classNames) {27905 -1 res += entity.classNames.map(function(cn) {27906 -1 return '.' + utils_1.escapeIdentifier(cn);27907 -1 }).join('');27908 -1 }27909 -1 if (entity.attrs) {27910 -1 res += entity.attrs.map(function(attr) {27911 -1 if ('operator' in attr) {27912 -1 if (attr.valueType === 'substitute') {27913 -1 return '[' + utils_1.escapeIdentifier(attr.name) + attr.operator + '$' + attr.value + ']';27914 -1 } else {27915 -1 return '[' + utils_1.escapeIdentifier(attr.name) + attr.operator + utils_1.escapeStr(attr.value) + ']';27916 -1 }27917 -1 } else {27918 -1 return '[' + utils_1.escapeIdentifier(attr.name) + ']';27919 -1 }27920 -1 }).join('');27921 -1 }27922 -1 if (entity.pseudos) {27923 -1 res += entity.pseudos.map(function(pseudo) {27924 -1 if (pseudo.valueType) {27925 -1 if (pseudo.valueType === 'selector') {27926 -1 return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + renderEntity(pseudo.value) + ')';27927 -1 } else if (pseudo.valueType === 'substitute') {27928 -1 return ':' + utils_1.escapeIdentifier(pseudo.name) + '($' + pseudo.value + ')';27929 -1 } else if (pseudo.valueType === 'numeric') {27930 -1 return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + pseudo.value + ')';27931 -1 } else {27932 -1 return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + utils_1.escapeIdentifier(pseudo.value) + ')';27933 -1 }27934 -1 } else {27935 -1 return ':' + utils_1.escapeIdentifier(pseudo.name);27936 -1 }27937 -1 }).join('');27938 -1 }27939 -1 break;27940 -127941 -1 default:27942 -1 throw Error('Unknown entity type: "' + entity.type + '".');-1 45787 return nodes; -1 45788 } -1 45789 var visible_text_nodes_default = visibleTextNodes; -1 45790 var idRefsRegex = /^idrefs?$/; -1 45791 function cacheIdRefs(node, idRefs, refAttrs) { -1 45792 if (node.hasAttribute) { -1 45793 if (node.nodeName.toUpperCase() === 'LABEL' && node.hasAttribute('for')) { -1 45794 var id = node.getAttribute('for'); -1 45795 idRefs[id] = idRefs[id] || []; -1 45796 idRefs[id].push(node); -1 45797 } -1 45798 for (var _i12 = 0; _i12 < refAttrs.length; ++_i12) { -1 45799 var attr = refAttrs[_i12]; -1 45800 var attrValue = sanitize_default(node.getAttribute(attr) || ''); -1 45801 if (!attrValue) { -1 45802 continue; -1 45803 } -1 45804 var tokens = token_list_default(attrValue); -1 45805 for (var k = 0; k < tokens.length; ++k) { -1 45806 idRefs[tokens[k]] = idRefs[tokens[k]] || []; -1 45807 idRefs[tokens[k]].push(node); -1 45808 } 27943 45809 }27944 -1 return res;27945 45810 }27946 -1 exports.renderEntity = renderEntity;27947 -1 },27948 -1 './node_modules/css-selector-parser/lib/utils.js': function node_modulesCssSelectorParserLibUtilsJs(module, exports, __webpack_require__) {27949 -1 'use strict';27950 -1 Object.defineProperty(exports, '__esModule', {27951 -1 value: true-1 45811 for (var _i13 = 0; _i13 < node.children.length; _i13++) { -1 45812 cacheIdRefs(node.children[_i13], idRefs, refAttrs); -1 45813 } -1 45814 } -1 45815 function getAccessibleRefs(node) { -1 45816 node = node.actualNode || node; -1 45817 var root = get_root_node_default2(node); -1 45818 root = root.documentElement || root; -1 45819 var idRefsByRoot = cache_default.get('idRefsByRoot'); -1 45820 if (!idRefsByRoot) { -1 45821 idRefsByRoot = new WeakMap(); -1 45822 cache_default.set('idRefsByRoot', idRefsByRoot); -1 45823 } -1 45824 var idRefs = idRefsByRoot.get(root); -1 45825 if (!idRefs) { -1 45826 idRefs = {}; -1 45827 idRefsByRoot.set(root, idRefs); -1 45828 var refAttrs = Object.keys(standards_default.ariaAttrs).filter(function(attr) { -1 45829 var type = standards_default.ariaAttrs[attr].type; -1 45830 return idRefsRegex.test(type); -1 45831 }); -1 45832 cacheIdRefs(root, idRefs, refAttrs); -1 45833 } -1 45834 return idRefs[node.id] || []; -1 45835 } -1 45836 var get_accessible_refs_default = getAccessibleRefs; -1 45837 function getRoleType(role) { -1 45838 var roleDef = standards_default.ariaRoles[role]; -1 45839 if (!roleDef) { -1 45840 return null; -1 45841 } -1 45842 return roleDef.type; -1 45843 } -1 45844 var get_role_type_default = getRoleType; -1 45845 function isAriaRoleAllowedOnElement(node, role) { -1 45846 var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node); -1 45847 var implicitRole3 = implicit_role_default(vNode); -1 45848 if (role === implicitRole3) { -1 45849 return true; -1 45850 } -1 45851 var spec = get_element_spec_default(vNode); -1 45852 if (Array.isArray(spec.allowedRoles)) { -1 45853 return spec.allowedRoles.includes(role); -1 45854 } -1 45855 return !!spec.allowedRoles; -1 45856 } -1 45857 var is_aria_role_allowed_on_element_default = isAriaRoleAllowedOnElement; -1 45858 var dpubRoles2 = [ 'doc-backlink', 'doc-biblioentry', 'doc-biblioref', 'doc-cover', 'doc-endnote', 'doc-glossref', 'doc-noteref' ]; -1 45859 function getRoleSegments(node) { -1 45860 var roles = []; -1 45861 if (!node) { -1 45862 return roles; -1 45863 } -1 45864 if (node.hasAttribute('role')) { -1 45865 var nodeRoles = token_list_default(node.getAttribute('role').toLowerCase()); -1 45866 roles = roles.concat(nodeRoles); -1 45867 } -1 45868 if (node.hasAttributeNS('http://www.idpf.org/2007/ops', 'type')) { -1 45869 var epubRoles = token_list_default(node.getAttributeNS('http://www.idpf.org/2007/ops', 'type').toLowerCase()).map(function(role) { -1 45870 return 'doc-'.concat(role); -1 45871 }); -1 45872 roles = roles.concat(epubRoles); -1 45873 } -1 45874 roles = roles.filter(function(role) { -1 45875 return is_valid_role_default(role); 27952 45876 });27953 -1 function isIdentStart(c) {27954 -1 return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c === '-' || c === '_';-1 45877 return roles; -1 45878 } -1 45879 function getElementUnallowedRoles(node) { -1 45880 var allowImplicit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; -1 45881 var tagName = node.nodeName.toUpperCase(); -1 45882 if (!is_html_element_default(node)) { -1 45883 return []; 27955 45884 }27956 -1 exports.isIdentStart = isIdentStart;27957 -1 function isIdent(c) {27958 -1 return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c === '-' || c === '_';-1 45885 var roleSegments = getRoleSegments(node); -1 45886 var implicitRole3 = implicit_role_default(node); -1 45887 var unallowedRoles = roleSegments.filter(function(role) { -1 45888 if (allowImplicit && role === implicitRole3) { -1 45889 return false; -1 45890 } -1 45891 if (allowImplicit && dpubRoles2.includes(role)) { -1 45892 var roleType = get_role_type_default(role); -1 45893 if (implicitRole3 !== roleType) { -1 45894 return true; -1 45895 } -1 45896 } -1 45897 if (!allowImplicit && !(role === 'row' && tagName === 'TR' && element_matches_default(node, 'table[role="grid"] > tr'))) { -1 45898 return true; -1 45899 } -1 45900 return !is_aria_role_allowed_on_element_default(node, role); -1 45901 }); -1 45902 return unallowedRoles; -1 45903 } -1 45904 var get_element_unallowed_roles_default = getElementUnallowedRoles; -1 45905 function getAriaRolesByType(type) { -1 45906 return Object.keys(standards_default.ariaRoles).filter(function(roleName) { -1 45907 return standards_default.ariaRoles[roleName].type === type; -1 45908 }); -1 45909 } -1 45910 var get_aria_roles_by_type_default = getAriaRolesByType; -1 45911 function getRolesByType(roleType) { -1 45912 return get_aria_roles_by_type_default(roleType); -1 45913 } -1 45914 var get_roles_by_type_default = getRolesByType; -1 45915 function getAriaRolesSupportingNameFromContent() { -1 45916 if (cache_default.get('ariaRolesNameFromContent')) { -1 45917 return cache_default.get('ariaRolesNameFromContent'); 27959 45918 }27960 -1 exports.isIdent = isIdent;27961 -1 function isHex(c) {27962 -1 return c >= 'a' && c <= 'f' || c >= 'A' && c <= 'F' || c >= '0' && c <= '9';-1 45919 var contentRoles = Object.keys(standards_default.ariaRoles).filter(function(roleName) { -1 45920 return standards_default.ariaRoles[roleName].nameFromContent; -1 45921 }); -1 45922 cache_default.set('ariaRolesNameFromContent', contentRoles); -1 45923 return contentRoles; -1 45924 } -1 45925 var get_aria_roles_supporting_name_from_content_default = getAriaRolesSupportingNameFromContent; -1 45926 function getRolesWithNameFromContents() { -1 45927 return get_aria_roles_supporting_name_from_content_default(); -1 45928 } -1 45929 var get_roles_with_name_from_contents_default = getRolesWithNameFromContents; -1 45930 var isNull = function isNull(value) { -1 45931 return value === null; -1 45932 }; -1 45933 var isNotNull = function isNotNull(value) { -1 45934 return value !== null; -1 45935 }; -1 45936 var lookupTable = {}; -1 45937 lookupTable.attributes = { -1 45938 'aria-activedescendant': { -1 45939 type: 'idref', -1 45940 allowEmpty: true, -1 45941 unsupported: false -1 45942 }, -1 45943 'aria-atomic': { -1 45944 type: 'boolean', -1 45945 values: [ 'true', 'false' ], -1 45946 unsupported: false -1 45947 }, -1 45948 'aria-autocomplete': { -1 45949 type: 'nmtoken', -1 45950 values: [ 'inline', 'list', 'both', 'none' ], -1 45951 unsupported: false -1 45952 }, -1 45953 'aria-busy': { -1 45954 type: 'boolean', -1 45955 values: [ 'true', 'false' ], -1 45956 unsupported: false -1 45957 }, -1 45958 'aria-checked': { -1 45959 type: 'nmtoken', -1 45960 values: [ 'true', 'false', 'mixed', 'undefined' ], -1 45961 unsupported: false -1 45962 }, -1 45963 'aria-colcount': { -1 45964 type: 'int', -1 45965 unsupported: false -1 45966 }, -1 45967 'aria-colindex': { -1 45968 type: 'int', -1 45969 unsupported: false -1 45970 }, -1 45971 'aria-colspan': { -1 45972 type: 'int', -1 45973 unsupported: false -1 45974 }, -1 45975 'aria-controls': { -1 45976 type: 'idrefs', -1 45977 allowEmpty: true, -1 45978 unsupported: false -1 45979 }, -1 45980 'aria-current': { -1 45981 type: 'nmtoken', -1 45982 allowEmpty: true, -1 45983 values: [ 'page', 'step', 'location', 'date', 'time', 'true', 'false' ], -1 45984 unsupported: false -1 45985 }, -1 45986 'aria-describedby': { -1 45987 type: 'idrefs', -1 45988 allowEmpty: true, -1 45989 unsupported: false -1 45990 }, -1 45991 'aria-describedat': { -1 45992 unsupported: true, -1 45993 unstandardized: true -1 45994 }, -1 45995 'aria-details': { -1 45996 type: 'idref', -1 45997 allowEmpty: true, -1 45998 unsupported: false -1 45999 }, -1 46000 'aria-disabled': { -1 46001 type: 'boolean', -1 46002 values: [ 'true', 'false' ], -1 46003 unsupported: false -1 46004 }, -1 46005 'aria-dropeffect': { -1 46006 type: 'nmtokens', -1 46007 values: [ 'copy', 'move', 'reference', 'execute', 'popup', 'none' ], -1 46008 unsupported: false -1 46009 }, -1 46010 'aria-errormessage': { -1 46011 type: 'idref', -1 46012 allowEmpty: true, -1 46013 unsupported: false -1 46014 }, -1 46015 'aria-expanded': { -1 46016 type: 'nmtoken', -1 46017 values: [ 'true', 'false', 'undefined' ], -1 46018 unsupported: false -1 46019 }, -1 46020 'aria-flowto': { -1 46021 type: 'idrefs', -1 46022 allowEmpty: true, -1 46023 unsupported: false -1 46024 }, -1 46025 'aria-grabbed': { -1 46026 type: 'nmtoken', -1 46027 values: [ 'true', 'false', 'undefined' ], -1 46028 unsupported: false -1 46029 }, -1 46030 'aria-haspopup': { -1 46031 type: 'nmtoken', -1 46032 allowEmpty: true, -1 46033 values: [ 'true', 'false', 'menu', 'listbox', 'tree', 'grid', 'dialog' ], -1 46034 unsupported: false -1 46035 }, -1 46036 'aria-hidden': { -1 46037 type: 'boolean', -1 46038 values: [ 'true', 'false' ], -1 46039 unsupported: false -1 46040 }, -1 46041 'aria-invalid': { -1 46042 type: 'nmtoken', -1 46043 allowEmpty: true, -1 46044 values: [ 'true', 'false', 'spelling', 'grammar' ], -1 46045 unsupported: false -1 46046 }, -1 46047 'aria-keyshortcuts': { -1 46048 type: 'string', -1 46049 allowEmpty: true, -1 46050 unsupported: false -1 46051 }, -1 46052 'aria-label': { -1 46053 type: 'string', -1 46054 allowEmpty: true, -1 46055 unsupported: false -1 46056 }, -1 46057 'aria-labelledby': { -1 46058 type: 'idrefs', -1 46059 allowEmpty: true, -1 46060 unsupported: false -1 46061 }, -1 46062 'aria-level': { -1 46063 type: 'int', -1 46064 unsupported: false -1 46065 }, -1 46066 'aria-live': { -1 46067 type: 'nmtoken', -1 46068 values: [ 'off', 'polite', 'assertive' ], -1 46069 unsupported: false -1 46070 }, -1 46071 'aria-modal': { -1 46072 type: 'boolean', -1 46073 values: [ 'true', 'false' ], -1 46074 unsupported: false -1 46075 }, -1 46076 'aria-multiline': { -1 46077 type: 'boolean', -1 46078 values: [ 'true', 'false' ], -1 46079 unsupported: false -1 46080 }, -1 46081 'aria-multiselectable': { -1 46082 type: 'boolean', -1 46083 values: [ 'true', 'false' ], -1 46084 unsupported: false -1 46085 }, -1 46086 'aria-orientation': { -1 46087 type: 'nmtoken', -1 46088 values: [ 'horizontal', 'vertical' ], -1 46089 unsupported: false -1 46090 }, -1 46091 'aria-owns': { -1 46092 type: 'idrefs', -1 46093 allowEmpty: true, -1 46094 unsupported: false -1 46095 }, -1 46096 'aria-placeholder': { -1 46097 type: 'string', -1 46098 allowEmpty: true, -1 46099 unsupported: false -1 46100 }, -1 46101 'aria-posinset': { -1 46102 type: 'int', -1 46103 unsupported: false -1 46104 }, -1 46105 'aria-pressed': { -1 46106 type: 'nmtoken', -1 46107 values: [ 'true', 'false', 'mixed', 'undefined' ], -1 46108 unsupported: false -1 46109 }, -1 46110 'aria-readonly': { -1 46111 type: 'boolean', -1 46112 values: [ 'true', 'false' ], -1 46113 unsupported: false -1 46114 }, -1 46115 'aria-relevant': { -1 46116 type: 'nmtokens', -1 46117 values: [ 'additions', 'removals', 'text', 'all' ], -1 46118 unsupported: false -1 46119 }, -1 46120 'aria-required': { -1 46121 type: 'boolean', -1 46122 values: [ 'true', 'false' ], -1 46123 unsupported: false -1 46124 }, -1 46125 'aria-roledescription': { -1 46126 type: 'string', -1 46127 allowEmpty: true, -1 46128 unsupported: false -1 46129 }, -1 46130 'aria-rowcount': { -1 46131 type: 'int', -1 46132 unsupported: false -1 46133 }, -1 46134 'aria-rowindex': { -1 46135 type: 'int', -1 46136 unsupported: false -1 46137 }, -1 46138 'aria-rowspan': { -1 46139 type: 'int', -1 46140 unsupported: false -1 46141 }, -1 46142 'aria-selected': { -1 46143 type: 'nmtoken', -1 46144 values: [ 'true', 'false', 'undefined' ], -1 46145 unsupported: false -1 46146 }, -1 46147 'aria-setsize': { -1 46148 type: 'int', -1 46149 unsupported: false -1 46150 }, -1 46151 'aria-sort': { -1 46152 type: 'nmtoken', -1 46153 values: [ 'ascending', 'descending', 'other', 'none' ], -1 46154 unsupported: false -1 46155 }, -1 46156 'aria-valuemax': { -1 46157 type: 'decimal', -1 46158 unsupported: false -1 46159 }, -1 46160 'aria-valuemin': { -1 46161 type: 'decimal', -1 46162 unsupported: false -1 46163 }, -1 46164 'aria-valuenow': { -1 46165 type: 'decimal', -1 46166 unsupported: false -1 46167 }, -1 46168 'aria-valuetext': { -1 46169 type: 'string', -1 46170 unsupported: false 27963 46171 }27964 -1 exports.isHex = isHex;27965 -1 function escapeIdentifier(s) {27966 -1 var len = s.length;27967 -1 var result = '';27968 -1 var i = 0;27969 -1 while (i < len) {27970 -1 var chr = s.charAt(i);27971 -1 if (exports.identSpecialChars[chr]) {27972 -1 result += '\\' + chr;27973 -1 } else {27974 -1 if (!(chr === '_' || chr === '-' || chr >= 'A' && chr <= 'Z' || chr >= 'a' && chr <= 'z' || i !== 0 && chr >= '0' && chr <= '9')) {27975 -1 var charCode = chr.charCodeAt(0);27976 -1 if ((charCode & 63488) === 55296) {27977 -1 var extraCharCode = s.charCodeAt(i++);27978 -1 if ((charCode & 64512) !== 55296 || (extraCharCode & 64512) !== 56320) {27979 -1 throw Error('UCS-2(decode): illegal sequence');27980 -1 }27981 -1 charCode = ((charCode & 1023) << 10) + (extraCharCode & 1023) + 65536;27982 -1 }27983 -1 result += '\\' + charCode.toString(16) + ' ';27984 -1 } else {27985 -1 result += chr;27986 -1 }-1 46172 }; -1 46173 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' ]; -1 46174 lookupTable.role = { -1 46175 alert: { -1 46176 type: 'widget', -1 46177 attributes: { -1 46178 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46179 }, -1 46180 owned: null, -1 46181 nameFrom: [ 'author' ], -1 46182 context: null, -1 46183 unsupported: false, -1 46184 allowedElements: [ 'section' ] -1 46185 }, -1 46186 alertdialog: { -1 46187 type: 'widget', -1 46188 attributes: { -1 46189 allowed: [ 'aria-expanded', 'aria-modal', 'aria-errormessage' ] -1 46190 }, -1 46191 owned: null, -1 46192 nameFrom: [ 'author' ], -1 46193 context: null, -1 46194 unsupported: false, -1 46195 allowedElements: [ 'dialog', 'section' ] -1 46196 }, -1 46197 application: { -1 46198 type: 'landmark', -1 46199 attributes: { -1 46200 allowed: [ 'aria-expanded', 'aria-errormessage', 'aria-activedescendant' ] -1 46201 }, -1 46202 owned: null, -1 46203 nameFrom: [ 'author' ], -1 46204 context: null, -1 46205 unsupported: false, -1 46206 allowedElements: [ 'article', 'audio', 'embed', 'iframe', 'object', 'section', 'svg', 'video' ] -1 46207 }, -1 46208 article: { -1 46209 type: 'structure', -1 46210 attributes: { -1 46211 allowed: [ 'aria-expanded', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ] -1 46212 }, -1 46213 owned: null, -1 46214 nameFrom: [ 'author' ], -1 46215 context: null, -1 46216 implicit: [ 'article' ], -1 46217 unsupported: false -1 46218 }, -1 46219 banner: { -1 46220 type: 'landmark', -1 46221 attributes: { -1 46222 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46223 }, -1 46224 owned: null, -1 46225 nameFrom: [ 'author' ], -1 46226 context: null, -1 46227 implicit: [ 'header' ], -1 46228 unsupported: false, -1 46229 allowedElements: [ 'section' ] -1 46230 }, -1 46231 button: { -1 46232 type: 'widget', -1 46233 attributes: { -1 46234 allowed: [ 'aria-expanded', 'aria-pressed', 'aria-errormessage' ] -1 46235 }, -1 46236 owned: null, -1 46237 nameFrom: [ 'author', 'contents' ], -1 46238 context: null, -1 46239 implicit: [ 'button', 'input[type="button"]', 'input[type="image"]', 'input[type="reset"]', 'input[type="submit"]', 'summary' ], -1 46240 unsupported: false, -1 46241 allowedElements: [ { -1 46242 nodeName: 'a', -1 46243 attributes: { -1 46244 href: isNotNull -1 46245 } -1 46246 } ] -1 46247 }, -1 46248 cell: { -1 46249 type: 'structure', -1 46250 attributes: { -1 46251 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-rowindex', 'aria-rowspan', 'aria-errormessage' ] -1 46252 }, -1 46253 owned: null, -1 46254 nameFrom: [ 'author', 'contents' ], -1 46255 context: [ 'row' ], -1 46256 implicit: [ 'td', 'th' ], -1 46257 unsupported: false -1 46258 }, -1 46259 checkbox: { -1 46260 type: 'widget', -1 46261 attributes: { -1 46262 allowed: [ 'aria-checked', 'aria-required', 'aria-readonly', 'aria-errormessage' ] -1 46263 }, -1 46264 owned: null, -1 46265 nameFrom: [ 'author', 'contents' ], -1 46266 context: null, -1 46267 implicit: [ 'input[type="checkbox"]' ], -1 46268 unsupported: false, -1 46269 allowedElements: [ 'button' ] -1 46270 }, -1 46271 columnheader: { -1 46272 type: 'structure', -1 46273 attributes: { -1 46274 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort', 'aria-errormessage' ] -1 46275 }, -1 46276 owned: null, -1 46277 nameFrom: [ 'author', 'contents' ], -1 46278 context: [ 'row' ], -1 46279 implicit: [ 'th' ], -1 46280 unsupported: false -1 46281 }, -1 46282 combobox: { -1 46283 type: 'composite', -1 46284 attributes: { -1 46285 allowed: [ 'aria-autocomplete', 'aria-required', 'aria-activedescendant', 'aria-orientation', 'aria-errormessage' ], -1 46286 required: [ 'aria-expanded' ] -1 46287 }, -1 46288 owned: { -1 46289 all: [ 'listbox', 'tree', 'grid', 'dialog', 'textbox' ] -1 46290 }, -1 46291 nameFrom: [ 'author' ], -1 46292 context: null, -1 46293 unsupported: false, -1 46294 allowedElements: [ { -1 46295 nodeName: 'input', -1 46296 properties: { -1 46297 type: [ 'text', 'search', 'tel', 'url', 'email' ] -1 46298 } -1 46299 } ] -1 46300 }, -1 46301 command: { -1 46302 nameFrom: [ 'author' ], -1 46303 type: 'abstract', -1 46304 unsupported: false -1 46305 }, -1 46306 complementary: { -1 46307 type: 'landmark', -1 46308 attributes: { -1 46309 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46310 }, -1 46311 owned: null, -1 46312 nameFrom: [ 'author' ], -1 46313 context: null, -1 46314 implicit: [ 'aside' ], -1 46315 unsupported: false, -1 46316 allowedElements: [ 'section' ] -1 46317 }, -1 46318 composite: { -1 46319 nameFrom: [ 'author' ], -1 46320 type: 'abstract', -1 46321 unsupported: false -1 46322 }, -1 46323 contentinfo: { -1 46324 type: 'landmark', -1 46325 attributes: { -1 46326 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46327 }, -1 46328 owned: null, -1 46329 nameFrom: [ 'author' ], -1 46330 context: null, -1 46331 implicit: [ 'footer' ], -1 46332 unsupported: false, -1 46333 allowedElements: [ 'section' ] -1 46334 }, -1 46335 definition: { -1 46336 type: 'structure', -1 46337 attributes: { -1 46338 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46339 }, -1 46340 owned: null, -1 46341 nameFrom: [ 'author' ], -1 46342 context: null, -1 46343 implicit: [ 'dd', 'dfn' ], -1 46344 unsupported: false -1 46345 }, -1 46346 dialog: { -1 46347 type: 'widget', -1 46348 attributes: { -1 46349 allowed: [ 'aria-expanded', 'aria-modal', 'aria-errormessage' ] -1 46350 }, -1 46351 owned: null, -1 46352 nameFrom: [ 'author' ], -1 46353 context: null, -1 46354 implicit: [ 'dialog' ], -1 46355 unsupported: false, -1 46356 allowedElements: [ 'section' ] -1 46357 }, -1 46358 directory: { -1 46359 type: 'structure', -1 46360 attributes: { -1 46361 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46362 }, -1 46363 owned: null, -1 46364 nameFrom: [ 'author', 'contents' ], -1 46365 context: null, -1 46366 unsupported: false, -1 46367 allowedElements: [ 'ol', 'ul' ] -1 46368 }, -1 46369 document: { -1 46370 type: 'structure', -1 46371 attributes: { -1 46372 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46373 }, -1 46374 owned: null, -1 46375 nameFrom: [ 'author' ], -1 46376 context: null, -1 46377 implicit: [ 'body' ], -1 46378 unsupported: false, -1 46379 allowedElements: [ 'article', 'embed', 'iframe', 'object', 'section', 'svg' ] -1 46380 }, -1 46381 'doc-abstract': { -1 46382 type: 'section', -1 46383 attributes: { -1 46384 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46385 }, -1 46386 owned: null, -1 46387 nameFrom: [ 'author' ], -1 46388 context: null, -1 46389 unsupported: false, -1 46390 allowedElements: [ 'section' ] -1 46391 }, -1 46392 'doc-acknowledgments': { -1 46393 type: 'landmark', -1 46394 attributes: { -1 46395 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46396 }, -1 46397 owned: null, -1 46398 nameFrom: [ 'author' ], -1 46399 context: null, -1 46400 unsupported: false, -1 46401 allowedElements: [ 'section' ] -1 46402 }, -1 46403 'doc-afterword': { -1 46404 type: 'landmark', -1 46405 attributes: { -1 46406 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46407 }, -1 46408 owned: null, -1 46409 nameFrom: [ 'author' ], -1 46410 context: null, -1 46411 unsupported: false, -1 46412 allowedElements: [ 'section' ] -1 46413 }, -1 46414 'doc-appendix': { -1 46415 type: 'landmark', -1 46416 attributes: { -1 46417 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46418 }, -1 46419 owned: null, -1 46420 nameFrom: [ 'author' ], -1 46421 context: null, -1 46422 unsupported: false, -1 46423 allowedElements: [ 'section' ] -1 46424 }, -1 46425 'doc-backlink': { -1 46426 type: 'link', -1 46427 attributes: { -1 46428 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46429 }, -1 46430 owned: null, -1 46431 nameFrom: [ 'author', 'contents' ], -1 46432 context: null, -1 46433 unsupported: false, -1 46434 allowedElements: [ { -1 46435 nodeName: 'a', -1 46436 attributes: { -1 46437 href: isNotNull -1 46438 } -1 46439 } ] -1 46440 }, -1 46441 'doc-biblioentry': { -1 46442 type: 'listitem', -1 46443 attributes: { -1 46444 allowed: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ] -1 46445 }, -1 46446 owned: null, -1 46447 nameFrom: [ 'author' ], -1 46448 context: [ 'doc-bibliography' ], -1 46449 unsupported: false, -1 46450 allowedElements: [ 'li' ] -1 46451 }, -1 46452 'doc-bibliography': { -1 46453 type: 'landmark', -1 46454 attributes: { -1 46455 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46456 }, -1 46457 owned: { -1 46458 one: [ 'doc-biblioentry' ] -1 46459 }, -1 46460 nameFrom: [ 'author' ], -1 46461 context: null, -1 46462 unsupported: false, -1 46463 allowedElements: [ 'section' ] -1 46464 }, -1 46465 'doc-biblioref': { -1 46466 type: 'link', -1 46467 attributes: { -1 46468 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46469 }, -1 46470 owned: null, -1 46471 nameFrom: [ 'author', 'contents' ], -1 46472 context: null, -1 46473 unsupported: false, -1 46474 allowedElements: [ { -1 46475 nodeName: 'a', -1 46476 attributes: { -1 46477 href: isNotNull -1 46478 } -1 46479 } ] -1 46480 }, -1 46481 'doc-chapter': { -1 46482 type: 'landmark', -1 46483 attributes: { -1 46484 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46485 }, -1 46486 owned: null, -1 46487 namefrom: [ 'author' ], -1 46488 context: null, -1 46489 unsupported: false, -1 46490 allowedElements: [ 'section' ] -1 46491 }, -1 46492 'doc-colophon': { -1 46493 type: 'section', -1 46494 attributes: { -1 46495 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46496 }, -1 46497 owned: null, -1 46498 namefrom: [ 'author' ], -1 46499 context: null, -1 46500 unsupported: false, -1 46501 allowedElements: [ 'section' ] -1 46502 }, -1 46503 'doc-conclusion': { -1 46504 type: 'landmark', -1 46505 attributes: { -1 46506 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46507 }, -1 46508 owned: null, -1 46509 namefrom: [ 'author' ], -1 46510 context: null, -1 46511 unsupported: false, -1 46512 allowedElements: [ 'section' ] -1 46513 }, -1 46514 'doc-cover': { -1 46515 type: 'img', -1 46516 attributes: { -1 46517 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46518 }, -1 46519 owned: null, -1 46520 namefrom: [ 'author' ], -1 46521 context: null, -1 46522 unsupported: false -1 46523 }, -1 46524 'doc-credit': { -1 46525 type: 'section', -1 46526 attributes: { -1 46527 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46528 }, -1 46529 owned: null, -1 46530 namefrom: [ 'author' ], -1 46531 context: null, -1 46532 unsupported: false, -1 46533 allowedElements: [ 'section' ] -1 46534 }, -1 46535 'doc-credits': { -1 46536 type: 'landmark', -1 46537 attributes: { -1 46538 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46539 }, -1 46540 owned: null, -1 46541 namefrom: [ 'author' ], -1 46542 context: null, -1 46543 unsupported: false, -1 46544 allowedElements: [ 'section' ] -1 46545 }, -1 46546 'doc-dedication': { -1 46547 type: 'section', -1 46548 attributes: { -1 46549 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46550 }, -1 46551 owned: null, -1 46552 namefrom: [ 'author' ], -1 46553 context: null, -1 46554 unsupported: false, -1 46555 allowedElements: [ 'section' ] -1 46556 }, -1 46557 'doc-endnote': { -1 46558 type: 'listitem', -1 46559 attributes: { -1 46560 allowed: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ] -1 46561 }, -1 46562 owned: null, -1 46563 namefrom: [ 'author' ], -1 46564 context: [ 'doc-endnotes' ], -1 46565 unsupported: false, -1 46566 allowedElements: [ 'li' ] -1 46567 }, -1 46568 'doc-endnotes': { -1 46569 type: 'landmark', -1 46570 attributes: { -1 46571 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46572 }, -1 46573 owned: { -1 46574 one: [ 'doc-endnote' ] -1 46575 }, -1 46576 namefrom: [ 'author' ], -1 46577 context: null, -1 46578 unsupported: false, -1 46579 allowedElements: [ 'section' ] -1 46580 }, -1 46581 'doc-epigraph': { -1 46582 type: 'section', -1 46583 attributes: { -1 46584 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46585 }, -1 46586 owned: null, -1 46587 namefrom: [ 'author' ], -1 46588 context: null, -1 46589 unsupported: false -1 46590 }, -1 46591 'doc-epilogue': { -1 46592 type: 'landmark', -1 46593 attributes: { -1 46594 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46595 }, -1 46596 owned: null, -1 46597 namefrom: [ 'author' ], -1 46598 context: null, -1 46599 unsupported: false, -1 46600 allowedElements: [ 'section' ] -1 46601 }, -1 46602 'doc-errata': { -1 46603 type: 'landmark', -1 46604 attributes: { -1 46605 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46606 }, -1 46607 owned: null, -1 46608 namefrom: [ 'author' ], -1 46609 context: null, -1 46610 unsupported: false, -1 46611 allowedElements: [ 'section' ] -1 46612 }, -1 46613 'doc-example': { -1 46614 type: 'section', -1 46615 attributes: { -1 46616 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46617 }, -1 46618 owned: null, -1 46619 namefrom: [ 'author' ], -1 46620 context: null, -1 46621 unsupported: false, -1 46622 allowedElements: [ 'aside', 'section' ] -1 46623 }, -1 46624 'doc-footnote': { -1 46625 type: 'section', -1 46626 attributes: { -1 46627 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46628 }, -1 46629 owned: null, -1 46630 namefrom: [ 'author' ], -1 46631 context: null, -1 46632 unsupported: false, -1 46633 allowedElements: [ 'aside', 'footer', 'header' ] -1 46634 }, -1 46635 'doc-foreword': { -1 46636 type: 'landmark', -1 46637 attributes: { -1 46638 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46639 }, -1 46640 owned: null, -1 46641 namefrom: [ 'author' ], -1 46642 context: null, -1 46643 unsupported: false, -1 46644 allowedElements: [ 'section' ] -1 46645 }, -1 46646 'doc-glossary': { -1 46647 type: 'landmark', -1 46648 attributes: { -1 46649 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46650 }, -1 46651 owned: [ 'term', 'definition' ], -1 46652 namefrom: [ 'author' ], -1 46653 context: null, -1 46654 unsupported: false, -1 46655 allowedElements: [ 'dl' ] -1 46656 }, -1 46657 'doc-glossref': { -1 46658 type: 'link', -1 46659 attributes: { -1 46660 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46661 }, -1 46662 owned: null, -1 46663 namefrom: [ 'author', 'contents' ], -1 46664 context: null, -1 46665 unsupported: false, -1 46666 allowedElements: [ { -1 46667 nodeName: 'a', -1 46668 attributes: { -1 46669 href: isNotNull -1 46670 } -1 46671 } ] -1 46672 }, -1 46673 'doc-index': { -1 46674 type: 'navigation', -1 46675 attributes: { -1 46676 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46677 }, -1 46678 owned: null, -1 46679 namefrom: [ 'author' ], -1 46680 context: null, -1 46681 unsupported: false, -1 46682 allowedElements: [ 'nav', 'section' ] -1 46683 }, -1 46684 'doc-introduction': { -1 46685 type: 'landmark', -1 46686 attributes: { -1 46687 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46688 }, -1 46689 owned: null, -1 46690 namefrom: [ 'author' ], -1 46691 context: null, -1 46692 unsupported: false, -1 46693 allowedElements: [ 'section' ] -1 46694 }, -1 46695 'doc-noteref': { -1 46696 type: 'link', -1 46697 attributes: { -1 46698 allowed: [ 'aria-expanded' ] -1 46699 }, -1 46700 owned: null, -1 46701 namefrom: [ 'author', 'contents' ], -1 46702 context: null, -1 46703 unsupported: false, -1 46704 allowedElements: [ { -1 46705 nodeName: 'a', -1 46706 attributes: { -1 46707 href: isNotNull 27987 46708 }27988 -1 i++;-1 46709 } ] -1 46710 }, -1 46711 'doc-notice': { -1 46712 type: 'note', -1 46713 attributes: { -1 46714 allowed: [ 'aria-expanded' ] -1 46715 }, -1 46716 owned: null, -1 46717 namefrom: [ 'author' ], -1 46718 context: null, -1 46719 unsupported: false, -1 46720 allowedElements: [ 'section' ] -1 46721 }, -1 46722 'doc-pagebreak': { -1 46723 type: 'separator', -1 46724 attributes: { -1 46725 allowed: [ 'aria-expanded' ] -1 46726 }, -1 46727 owned: null, -1 46728 namefrom: [ 'author' ], -1 46729 context: null, -1 46730 unsupported: false, -1 46731 allowedElements: [ 'hr' ] -1 46732 }, -1 46733 'doc-pagelist': { -1 46734 type: 'navigation', -1 46735 attributes: { -1 46736 allowed: [ 'aria-expanded' ] -1 46737 }, -1 46738 owned: null, -1 46739 namefrom: [ 'author' ], -1 46740 context: null, -1 46741 unsupported: false, -1 46742 allowedElements: [ 'nav', 'section' ] -1 46743 }, -1 46744 'doc-part': { -1 46745 type: 'landmark', -1 46746 attributes: { -1 46747 allowed: [ 'aria-expanded' ] -1 46748 }, -1 46749 owned: null, -1 46750 namefrom: [ 'author' ], -1 46751 context: null, -1 46752 unsupported: false, -1 46753 allowedElements: [ 'section' ] -1 46754 }, -1 46755 'doc-preface': { -1 46756 type: 'landmark', -1 46757 attributes: { -1 46758 allowed: [ 'aria-expanded' ] -1 46759 }, -1 46760 owned: null, -1 46761 namefrom: [ 'author' ], -1 46762 context: null, -1 46763 unsupported: false, -1 46764 allowedElements: [ 'section' ] -1 46765 }, -1 46766 'doc-prologue': { -1 46767 type: 'landmark', -1 46768 attributes: { -1 46769 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46770 }, -1 46771 owned: null, -1 46772 namefrom: [ 'author' ], -1 46773 context: null, -1 46774 unsupported: false, -1 46775 allowedElements: [ 'section' ] -1 46776 }, -1 46777 'doc-pullquote': { -1 46778 type: 'none', -1 46779 attributes: { -1 46780 allowed: [ 'aria-expanded' ] -1 46781 }, -1 46782 owned: null, -1 46783 namefrom: [ 'author' ], -1 46784 context: null, -1 46785 unsupported: false, -1 46786 allowedElements: [ 'aside', 'section' ] -1 46787 }, -1 46788 'doc-qna': { -1 46789 type: 'section', -1 46790 attributes: { -1 46791 allowed: [ 'aria-expanded' ] -1 46792 }, -1 46793 owned: null, -1 46794 namefrom: [ 'author' ], -1 46795 context: null, -1 46796 unsupported: false, -1 46797 allowedElements: [ 'section' ] -1 46798 }, -1 46799 'doc-subtitle': { -1 46800 type: 'sectionhead', -1 46801 attributes: { -1 46802 allowed: [ 'aria-expanded' ] -1 46803 }, -1 46804 owned: null, -1 46805 namefrom: [ 'author' ], -1 46806 context: null, -1 46807 unsupported: false, -1 46808 allowedElements: { -1 46809 nodeName: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ] 27989 46810 }27990 -1 return result;27991 -1 }27992 -1 exports.escapeIdentifier = escapeIdentifier;27993 -1 function escapeStr(s) {27994 -1 var len = s.length;27995 -1 var result = '';27996 -1 var i = 0;27997 -1 var replacement;27998 -1 while (i < len) {27999 -1 var chr = s.charAt(i);28000 -1 if (chr === '"') {28001 -1 chr = '\\"';28002 -1 } else if (chr === '\\') {28003 -1 chr = '\\\\';28004 -1 } else if ((replacement = exports.strReplacementsRev[chr]) !== undefined) {28005 -1 chr = replacement;-1 46811 }, -1 46812 'doc-tip': { -1 46813 type: 'note', -1 46814 attributes: { -1 46815 allowed: [ 'aria-expanded' ] -1 46816 }, -1 46817 owned: null, -1 46818 namefrom: [ 'author' ], -1 46819 context: null, -1 46820 unsupported: false, -1 46821 allowedElements: [ 'aside' ] -1 46822 }, -1 46823 'doc-toc': { -1 46824 type: 'navigation', -1 46825 attributes: { -1 46826 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46827 }, -1 46828 owned: null, -1 46829 namefrom: [ 'author' ], -1 46830 context: null, -1 46831 unsupported: false, -1 46832 allowedElements: [ 'nav', 'section' ] -1 46833 }, -1 46834 feed: { -1 46835 type: 'structure', -1 46836 attributes: { -1 46837 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46838 }, -1 46839 owned: { -1 46840 one: [ 'article' ] -1 46841 }, -1 46842 nameFrom: [ 'author' ], -1 46843 context: null, -1 46844 unsupported: false, -1 46845 allowedElements: [ 'article', 'aside', 'section' ] -1 46846 }, -1 46847 figure: { -1 46848 type: 'structure', -1 46849 attributes: { -1 46850 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46851 }, -1 46852 owned: null, -1 46853 nameFrom: [ 'author', 'contents' ], -1 46854 context: null, -1 46855 implicit: [ 'figure' ], -1 46856 unsupported: false -1 46857 }, -1 46858 form: { -1 46859 type: 'landmark', -1 46860 attributes: { -1 46861 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46862 }, -1 46863 owned: null, -1 46864 nameFrom: [ 'author' ], -1 46865 context: null, -1 46866 implicit: [ 'form' ], -1 46867 unsupported: false -1 46868 }, -1 46869 grid: { -1 46870 type: 'composite', -1 46871 attributes: { -1 46872 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-colcount', 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-rowcount', 'aria-errormessage' ] -1 46873 }, -1 46874 owned: { -1 46875 one: [ 'rowgroup', 'row' ] -1 46876 }, -1 46877 nameFrom: [ 'author' ], -1 46878 context: null, -1 46879 implicit: [ 'table' ], -1 46880 unsupported: false -1 46881 }, -1 46882 gridcell: { -1 46883 type: 'widget', -1 46884 attributes: { -1 46885 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-selected', 'aria-readonly', 'aria-required', 'aria-errormessage' ] -1 46886 }, -1 46887 owned: null, -1 46888 nameFrom: [ 'author', 'contents' ], -1 46889 context: [ 'row' ], -1 46890 implicit: [ 'td', 'th' ], -1 46891 unsupported: false -1 46892 }, -1 46893 group: { -1 46894 type: 'structure', -1 46895 attributes: { -1 46896 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-errormessage' ] -1 46897 }, -1 46898 owned: null, -1 46899 nameFrom: [ 'author' ], -1 46900 context: null, -1 46901 implicit: [ 'details', 'optgroup' ], -1 46902 unsupported: false, -1 46903 allowedElements: [ 'dl', 'figcaption', 'fieldset', 'figure', 'footer', 'header', 'ol', 'ul' ] -1 46904 }, -1 46905 heading: { -1 46906 type: 'structure', -1 46907 attributes: { -1 46908 required: [ 'aria-level' ], -1 46909 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46910 }, -1 46911 owned: null, -1 46912 nameFrom: [ 'author', 'contents' ], -1 46913 context: null, -1 46914 implicit: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ], -1 46915 unsupported: false -1 46916 }, -1 46917 img: { -1 46918 type: 'structure', -1 46919 attributes: { -1 46920 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46921 }, -1 46922 owned: null, -1 46923 nameFrom: [ 'author' ], -1 46924 context: null, -1 46925 implicit: [ 'img' ], -1 46926 unsupported: false, -1 46927 allowedElements: [ 'embed', 'iframe', 'object', 'svg' ] -1 46928 }, -1 46929 input: { -1 46930 nameFrom: [ 'author' ], -1 46931 type: 'abstract', -1 46932 unsupported: false -1 46933 }, -1 46934 landmark: { -1 46935 nameFrom: [ 'author' ], -1 46936 type: 'abstract', -1 46937 unsupported: false -1 46938 }, -1 46939 link: { -1 46940 type: 'widget', -1 46941 attributes: { -1 46942 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46943 }, -1 46944 owned: null, -1 46945 nameFrom: [ 'author', 'contents' ], -1 46946 context: null, -1 46947 implicit: [ 'a[href]', 'area[href]' ], -1 46948 unsupported: false, -1 46949 allowedElements: [ 'button', { -1 46950 nodeName: 'input', -1 46951 properties: { -1 46952 type: [ 'image', 'button' ] 28006 46953 }28007 -1 result += chr;28008 -1 i++;28009 -1 }28010 -1 return '"' + result + '"';28011 -1 }28012 -1 exports.escapeStr = escapeStr;28013 -1 exports.identSpecialChars = {28014 -1 '!': true,28015 -1 '"': true,28016 -1 '#': true,28017 -1 $: true,28018 -1 '%': true,28019 -1 '&': true,28020 -1 '\'': true,28021 -1 '(': true,28022 -1 ')': true,28023 -1 '*': true,28024 -1 '+': true,28025 -1 ',': true,28026 -1 '.': true,28027 -1 '/': true,28028 -1 ';': true,28029 -1 '<': true,28030 -1 '=': true,28031 -1 '>': true,28032 -1 '?': true,28033 -1 '@': true,28034 -1 '[': true,28035 -1 '\\': true,28036 -1 ']': true,28037 -1 '^': true,28038 -1 '`': true,28039 -1 '{': true,28040 -1 '|': true,28041 -1 '}': true,28042 -1 '~': true28043 -1 };28044 -1 exports.strReplacementsRev = {28045 -1 '\n': '\\n',28046 -1 '\r': '\\r',28047 -1 '\t': '\\t',28048 -1 '\f': '\\f',28049 -1 '\v': '\\v'28050 -1 };28051 -1 exports.singleQuoteEscapeChars = {28052 -1 n: '\n',28053 -1 r: '\r',28054 -1 t: '\t',28055 -1 f: '\f',28056 -1 '\\': '\\',28057 -1 '\'': '\''28058 -1 };28059 -1 exports.doubleQuotesEscapeChars = {28060 -1 n: '\n',28061 -1 r: '\r',28062 -1 t: '\t',28063 -1 f: '\f',28064 -1 '\\': '\\',28065 -1 '"': '"'28066 -1 };28067 -1 },28068 -1 './node_modules/d/index.js': function node_modulesDIndexJs(module, exports, __webpack_require__) {28069 -1 'use strict';28070 -1 var isValue = __webpack_require__('./node_modules/type/value/is.js'), isPlainFunction = __webpack_require__('./node_modules/type/plain-function/is.js'), assign = __webpack_require__('./node_modules/es5-ext/object/assign/index.js'), normalizeOpts = __webpack_require__('./node_modules/es5-ext/object/normalize-options.js'), contains = __webpack_require__('./node_modules/es5-ext/string/#/contains/index.js');28071 -1 var d = module.exports = function(dscr, value) {28072 -1 var c, e, w, options, desc;28073 -1 if (arguments.length < 2 || typeof dscr !== 'string') {28074 -1 options = value;28075 -1 value = dscr;28076 -1 dscr = null;28077 -1 } else {28078 -1 options = arguments[2];28079 -1 }28080 -1 if (isValue(dscr)) {28081 -1 c = contains.call(dscr, 'c');28082 -1 e = contains.call(dscr, 'e');28083 -1 w = contains.call(dscr, 'w');28084 -1 } else {28085 -1 c = w = true;28086 -1 e = false;28087 -1 }28088 -1 desc = {28089 -1 value: value,28090 -1 configurable: c,28091 -1 enumerable: e,28092 -1 writable: w28093 -1 };28094 -1 return !options ? desc : assign(normalizeOpts(options), desc);28095 -1 };28096 -1 d.gs = function(dscr, get, set) {28097 -1 var c, e, options, desc;28098 -1 if (typeof dscr !== 'string') {28099 -1 options = set;28100 -1 set = get;28101 -1 get = dscr;28102 -1 dscr = null;28103 -1 } else {28104 -1 options = arguments[3];28105 -1 }28106 -1 if (!isValue(get)) {28107 -1 get = undefined;28108 -1 } else if (!isPlainFunction(get)) {28109 -1 options = get;28110 -1 get = set = undefined;28111 -1 } else if (!isValue(set)) {28112 -1 set = undefined;28113 -1 } else if (!isPlainFunction(set)) {28114 -1 options = set;28115 -1 set = undefined;28116 -1 }28117 -1 if (isValue(dscr)) {28118 -1 c = contains.call(dscr, 'c');28119 -1 e = contains.call(dscr, 'e');28120 -1 } else {28121 -1 c = true;28122 -1 e = false;28123 -1 }28124 -1 desc = {28125 -1 get: get,28126 -1 set: set,28127 -1 configurable: c,28128 -1 enumerable: e28129 -1 };28130 -1 return !options ? desc : assign(normalizeOpts(options), desc);28131 -1 };28132 -1 },28133 -1 './node_modules/emoji-regex/index.js': function node_modulesEmojiRegexIndexJs(module, exports, __webpack_require__) {28134 -1 'use strict';28135 -1 module.exports = function() {28136 -1 return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;28137 -1 };28138 -1 },28139 -1 './node_modules/es5-ext/array/#/e-index-of.js': function node_modulesEs5ExtArrayEIndexOfJs(module, exports, __webpack_require__) {28140 -1 'use strict';28141 -1 var numberIsNaN = __webpack_require__('./node_modules/es5-ext/number/is-nan/index.js'), toPosInt = __webpack_require__('./node_modules/es5-ext/number/to-pos-integer.js'), value = __webpack_require__('./node_modules/es5-ext/object/valid-value.js'), indexOf = Array.prototype.indexOf, objHasOwnProperty = Object.prototype.hasOwnProperty, abs = Math.abs, floor = Math.floor;28142 -1 module.exports = function(searchElement) {28143 -1 var i, length, fromIndex, val;28144 -1 if (!numberIsNaN(searchElement)) {28145 -1 return indexOf.apply(this, arguments);28146 -1 }28147 -1 length = toPosInt(value(this).length);28148 -1 fromIndex = arguments[1];28149 -1 if (isNaN(fromIndex)) {28150 -1 fromIndex = 0;28151 -1 } else if (fromIndex >= 0) {28152 -1 fromIndex = floor(fromIndex);28153 -1 } else {28154 -1 fromIndex = toPosInt(this.length) - floor(abs(fromIndex));28155 -1 }28156 -1 for (i = fromIndex; i < length; ++i) {28157 -1 if (objHasOwnProperty.call(this, i)) {28158 -1 val = this[i];28159 -1 if (numberIsNaN(val)) {28160 -1 return i;28161 -1 }-1 46954 } ] -1 46955 }, -1 46956 list: { -1 46957 type: 'structure', -1 46958 attributes: { -1 46959 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46960 }, -1 46961 owned: { -1 46962 all: [ 'listitem' ] -1 46963 }, -1 46964 nameFrom: [ 'author' ], -1 46965 context: null, -1 46966 implicit: [ 'ol', 'ul', 'dl' ], -1 46967 unsupported: false -1 46968 }, -1 46969 listbox: { -1 46970 type: 'composite', -1 46971 attributes: { -1 46972 allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ] -1 46973 }, -1 46974 owned: { -1 46975 all: [ 'option' ] -1 46976 }, -1 46977 nameFrom: [ 'author' ], -1 46978 context: null, -1 46979 implicit: [ 'select' ], -1 46980 unsupported: false, -1 46981 allowedElements: [ 'ol', 'ul' ] -1 46982 }, -1 46983 listitem: { -1 46984 type: 'structure', -1 46985 attributes: { -1 46986 allowed: [ 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-errormessage' ] -1 46987 }, -1 46988 owned: null, -1 46989 nameFrom: [ 'author', 'contents' ], -1 46990 context: [ 'list' ], -1 46991 implicit: [ 'li', 'dt' ], -1 46992 unsupported: false -1 46993 }, -1 46994 log: { -1 46995 type: 'widget', -1 46996 attributes: { -1 46997 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 46998 }, -1 46999 owned: null, -1 47000 nameFrom: [ 'author' ], -1 47001 context: null, -1 47002 unsupported: false, -1 47003 allowedElements: [ 'section' ] -1 47004 }, -1 47005 main: { -1 47006 type: 'landmark', -1 47007 attributes: { -1 47008 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 47009 }, -1 47010 owned: null, -1 47011 nameFrom: [ 'author' ], -1 47012 context: null, -1 47013 implicit: [ 'main' ], -1 47014 unsupported: false, -1 47015 allowedElements: [ 'article', 'section' ] -1 47016 }, -1 47017 marquee: { -1 47018 type: 'widget', -1 47019 attributes: { -1 47020 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 47021 }, -1 47022 owned: null, -1 47023 nameFrom: [ 'author' ], -1 47024 context: null, -1 47025 unsupported: false, -1 47026 allowedElements: [ 'section' ] -1 47027 }, -1 47028 math: { -1 47029 type: 'structure', -1 47030 attributes: { -1 47031 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 47032 }, -1 47033 owned: null, -1 47034 nameFrom: [ 'author' ], -1 47035 context: null, -1 47036 implicit: [ 'math' ], -1 47037 unsupported: false -1 47038 }, -1 47039 menu: { -1 47040 type: 'composite', -1 47041 attributes: { -1 47042 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ] -1 47043 }, -1 47044 owned: { -1 47045 one: [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ] -1 47046 }, -1 47047 nameFrom: [ 'author' ], -1 47048 context: null, -1 47049 implicit: [ 'menu[type="context"]' ], -1 47050 unsupported: false, -1 47051 allowedElements: [ 'ol', 'ul' ] -1 47052 }, -1 47053 menubar: { -1 47054 type: 'composite', -1 47055 attributes: { -1 47056 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ] -1 47057 }, -1 47058 owned: { -1 47059 one: [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ] -1 47060 }, -1 47061 nameFrom: [ 'author' ], -1 47062 context: null, -1 47063 unsupported: false, -1 47064 allowedElements: [ 'ol', 'ul' ] -1 47065 }, -1 47066 menuitem: { -1 47067 type: 'widget', -1 47068 attributes: { -1 47069 allowed: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-errormessage' ] -1 47070 }, -1 47071 owned: null, -1 47072 nameFrom: [ 'author', 'contents' ], -1 47073 context: [ 'menu', 'menubar' ], -1 47074 implicit: [ 'menuitem[type="command"]' ], -1 47075 unsupported: false, -1 47076 allowedElements: [ 'button', 'li', { -1 47077 nodeName: 'iput', -1 47078 properties: { -1 47079 type: [ 'image', 'button' ] 28162 47080 }28163 -1 }28164 -1 return -1;28165 -1 };28166 -1 },28167 -1 './node_modules/es5-ext/array/from/index.js': function node_modulesEs5ExtArrayFromIndexJs(module, exports, __webpack_require__) {28168 -1 'use strict';28169 -1 module.exports = __webpack_require__('./node_modules/es5-ext/array/from/is-implemented.js')() ? Array.from : __webpack_require__('./node_modules/es5-ext/array/from/shim.js');28170 -1 },28171 -1 './node_modules/es5-ext/array/from/is-implemented.js': function node_modulesEs5ExtArrayFromIsImplementedJs(module, exports, __webpack_require__) {28172 -1 'use strict';28173 -1 module.exports = function() {28174 -1 var from = Array.from, arr, result;28175 -1 if (typeof from !== 'function') {28176 -1 return false;28177 -1 }28178 -1 arr = [ 'raz', 'dwa' ];28179 -1 result = from(arr);28180 -1 return Boolean(result && result !== arr && result[1] === 'dwa');28181 -1 };28182 -1 },28183 -1 './node_modules/es5-ext/array/from/shim.js': function node_modulesEs5ExtArrayFromShimJs(module, exports, __webpack_require__) {28184 -1 'use strict';28185 -1 var iteratorSymbol = __webpack_require__('./node_modules/es6-symbol/index.js').iterator, isArguments = __webpack_require__('./node_modules/es5-ext/function/is-arguments.js'), isFunction = __webpack_require__('./node_modules/es5-ext/function/is-function.js'), toPosInt = __webpack_require__('./node_modules/es5-ext/number/to-pos-integer.js'), callable = __webpack_require__('./node_modules/es5-ext/object/valid-callable.js'), validValue = __webpack_require__('./node_modules/es5-ext/object/valid-value.js'), isValue = __webpack_require__('./node_modules/es5-ext/object/is-value.js'), isString = __webpack_require__('./node_modules/es5-ext/string/is-string.js'), isArray = Array.isArray, call = Function.prototype.call, desc = {28186 -1 configurable: true,28187 -1 enumerable: true,28188 -1 writable: true,28189 -1 value: null28190 -1 }, defineProperty = Object.defineProperty;28191 -1 module.exports = function(arrayLike) {28192 -1 var mapFn = arguments[1], thisArg = arguments[2], Context, i, j, arr, length, code, iterator, result, getIterator, value;28193 -1 arrayLike = Object(validValue(arrayLike));28194 -1 if (isValue(mapFn)) {28195 -1 callable(mapFn);28196 -1 }28197 -1 if (!this || this === Array || !isFunction(this)) {28198 -1 if (!mapFn) {28199 -1 if (isArguments(arrayLike)) {28200 -1 length = arrayLike.length;28201 -1 if (length !== 1) {28202 -1 return Array.apply(null, arrayLike);28203 -1 }28204 -1 arr = new Array(1);28205 -1 arr[0] = arrayLike[0];28206 -1 return arr;28207 -1 }28208 -1 if (isArray(arrayLike)) {28209 -1 arr = new Array(length = arrayLike.length);28210 -1 for (i = 0; i < length; ++i) {28211 -1 arr[i] = arrayLike[i];28212 -1 }28213 -1 return arr;28214 -1 }-1 47081 }, { -1 47082 nodeName: 'a', -1 47083 attributes: { -1 47084 href: isNotNull 28215 47085 }28216 -1 arr = [];28217 -1 } else {28218 -1 Context = this;28219 -1 }28220 -1 if (!isArray(arrayLike)) {28221 -1 if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {28222 -1 iterator = callable(getIterator).call(arrayLike);28223 -1 if (Context) {28224 -1 arr = new Context();28225 -1 }28226 -1 result = iterator.next();28227 -1 i = 0;28228 -1 while (!result.done) {28229 -1 value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;28230 -1 if (Context) {28231 -1 desc.value = value;28232 -1 defineProperty(arr, i, desc);28233 -1 } else {28234 -1 arr[i] = value;28235 -1 }28236 -1 result = iterator.next();28237 -1 ++i;28238 -1 }28239 -1 length = i;28240 -1 } else if (isString(arrayLike)) {28241 -1 length = arrayLike.length;28242 -1 if (Context) {28243 -1 arr = new Context();28244 -1 }28245 -1 for (i = 0, j = 0; i < length; ++i) {28246 -1 value = arrayLike[i];28247 -1 if (i + 1 < length) {28248 -1 code = value.charCodeAt(0);28249 -1 if (code >= 55296 && code <= 56319) {28250 -1 value += arrayLike[++i];28251 -1 }28252 -1 }28253 -1 value = mapFn ? call.call(mapFn, thisArg, value, j) : value;28254 -1 if (Context) {28255 -1 desc.value = value;28256 -1 defineProperty(arr, j, desc);28257 -1 } else {28258 -1 arr[j] = value;28259 -1 }28260 -1 ++j;28261 -1 }28262 -1 length = j;-1 47086 } ] -1 47087 }, -1 47088 menuitemcheckbox: { -1 47089 type: 'widget', -1 47090 attributes: { -1 47091 allowed: [ 'aria-checked', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ] -1 47092 }, -1 47093 owned: null, -1 47094 nameFrom: [ 'author', 'contents' ], -1 47095 context: [ 'menu', 'menubar' ], -1 47096 implicit: [ 'menuitem[type="checkbox"]' ], -1 47097 unsupported: false, -1 47098 allowedElements: [ { -1 47099 nodeName: [ 'button', 'li' ] -1 47100 }, { -1 47101 nodeName: 'input', -1 47102 properties: { -1 47103 type: [ 'checkbox', 'image', 'button' ] 28263 47104 }28264 -1 }28265 -1 if (length === undefined) {28266 -1 length = toPosInt(arrayLike.length);28267 -1 if (Context) {28268 -1 arr = new Context(length);-1 47105 }, { -1 47106 nodeName: 'a', -1 47107 attributes: { -1 47108 href: isNotNull 28269 47109 }28270 -1 for (i = 0; i < length; ++i) {28271 -1 value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];28272 -1 if (Context) {28273 -1 desc.value = value;28274 -1 defineProperty(arr, i, desc);28275 -1 } else {28276 -1 arr[i] = value;28277 -1 }-1 47110 } ] -1 47111 }, -1 47112 menuitemradio: { -1 47113 type: 'widget', -1 47114 attributes: { -1 47115 allowed: [ 'aria-checked', 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ] -1 47116 }, -1 47117 owned: null, -1 47118 nameFrom: [ 'author', 'contents' ], -1 47119 context: [ 'menu', 'menubar' ], -1 47120 implicit: [ 'menuitem[type="radio"]' ], -1 47121 unsupported: false, -1 47122 allowedElements: [ { -1 47123 nodeName: [ 'button', 'li' ] -1 47124 }, { -1 47125 nodeName: 'input', -1 47126 properties: { -1 47127 type: [ 'image', 'button', 'radio' ] 28278 47128 }28279 -1 }28280 -1 if (Context) {28281 -1 desc.value = null;28282 -1 arr.length = length;28283 -1 }28284 -1 return arr;28285 -1 };28286 -1 },28287 -1 './node_modules/es5-ext/array/to-array.js': function node_modulesEs5ExtArrayToArrayJs(module, exports, __webpack_require__) {28288 -1 'use strict';28289 -1 var from = __webpack_require__('./node_modules/es5-ext/array/from/index.js'), isArray = Array.isArray;28290 -1 module.exports = function(arrayLike) {28291 -1 return isArray(arrayLike) ? arrayLike : from(arrayLike);28292 -1 };28293 -1 },28294 -1 './node_modules/es5-ext/error/custom.js': function node_modulesEs5ExtErrorCustomJs(module, exports, __webpack_require__) {28295 -1 'use strict';28296 -1 var assign = __webpack_require__('./node_modules/es5-ext/object/assign/index.js'), isObject = __webpack_require__('./node_modules/es5-ext/object/is-object.js'), isValue = __webpack_require__('./node_modules/es5-ext/object/is-value.js'), captureStackTrace = Error.captureStackTrace;28297 -1 module.exports = function(message) {28298 -1 var err = new Error(message), code = arguments[1], ext = arguments[2];28299 -1 if (!isValue(ext)) {28300 -1 if (isObject(code)) {28301 -1 ext = code;28302 -1 code = null;-1 47129 }, { -1 47130 nodeName: 'a', -1 47131 attributes: { -1 47132 href: isNotNull 28303 47133 }28304 -1 }28305 -1 if (isValue(ext)) {28306 -1 assign(err, ext);28307 -1 }28308 -1 if (isValue(code)) {28309 -1 err.code = code;28310 -1 }28311 -1 if (captureStackTrace) {28312 -1 captureStackTrace(err, module.exports);28313 -1 }28314 -1 return err;28315 -1 };28316 -1 },28317 -1 './node_modules/es5-ext/function/_define-length.js': function node_modulesEs5ExtFunction_defineLengthJs(module, exports, __webpack_require__) {28318 -1 'use strict';28319 -1 var toPosInt = __webpack_require__('./node_modules/es5-ext/number/to-pos-integer.js');28320 -1 var test = function test(arg1, arg2) {28321 -1 return arg2;28322 -1 };28323 -1 var desc, defineProperty, generate, mixin;28324 -1 try {28325 -1 Object.defineProperty(test, 'length', {28326 -1 configurable: true,28327 -1 writable: false,28328 -1 enumerable: false,28329 -1 value: 128330 -1 });28331 -1 } catch (ignore) {}28332 -1 if (test.length === 1) {28333 -1 desc = {28334 -1 configurable: true,28335 -1 writable: false,28336 -1 enumerable: false28337 -1 };28338 -1 defineProperty = Object.defineProperty;28339 -1 module.exports = function(fn, length) {28340 -1 length = toPosInt(length);28341 -1 if (fn.length === length) {28342 -1 return fn;-1 47134 } ] -1 47135 }, -1 47136 navigation: { -1 47137 type: 'landmark', -1 47138 attributes: { -1 47139 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 47140 }, -1 47141 owned: null, -1 47142 nameFrom: [ 'author' ], -1 47143 context: null, -1 47144 implicit: [ 'nav' ], -1 47145 unsupported: false, -1 47146 allowedElements: [ 'section' ] -1 47147 }, -1 47148 none: { -1 47149 type: 'structure', -1 47150 attributes: null, -1 47151 owned: null, -1 47152 nameFrom: [ 'author' ], -1 47153 context: null, -1 47154 unsupported: false, -1 47155 allowedElements: [ { -1 47156 nodeName: [ 'article', 'aside', 'dl', 'embed', 'figcaption', 'fieldset', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'iframe', 'li', 'ol', 'section', 'ul' ] -1 47157 }, { -1 47158 nodeName: 'img', -1 47159 attributes: { -1 47160 alt: isNotNull 28343 47161 }28344 -1 desc.value = length;28345 -1 return defineProperty(fn, 'length', desc);28346 -1 };28347 -1 } else {28348 -1 mixin = __webpack_require__('./node_modules/es5-ext/object/mixin.js');28349 -1 generate = function() {28350 -1 var cache = [];28351 -1 return function(length) {28352 -1 var args, i = 0;28353 -1 if (cache[length]) {28354 -1 return cache[length];28355 -1 }28356 -1 args = [];28357 -1 while (length--) {28358 -1 args.push('a' + (++i).toString(36));28359 -1 }28360 -1 return new Function('fn', 'return function (' + args.join(', ') + ') { return fn.apply(this, arguments); };');28361 -1 };28362 -1 }();28363 -1 module.exports = function(src, length) {28364 -1 var target;28365 -1 length = toPosInt(length);28366 -1 if (src.length === length) {28367 -1 return src;-1 47162 } ] -1 47163 }, -1 47164 note: { -1 47165 type: 'structure', -1 47166 attributes: { -1 47167 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 47168 }, -1 47169 owned: null, -1 47170 nameFrom: [ 'author' ], -1 47171 context: null, -1 47172 unsupported: false, -1 47173 allowedElements: [ 'aside' ] -1 47174 }, -1 47175 option: { -1 47176 type: 'widget', -1 47177 attributes: { -1 47178 allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-checked', 'aria-errormessage' ] -1 47179 }, -1 47180 owned: null, -1 47181 nameFrom: [ 'author', 'contents' ], -1 47182 context: [ 'listbox' ], -1 47183 implicit: [ 'option' ], -1 47184 unsupported: false, -1 47185 allowedElements: [ { -1 47186 nodeName: [ 'button', 'li' ] -1 47187 }, { -1 47188 nodeName: 'input', -1 47189 properties: { -1 47190 type: [ 'checkbox', 'button' ] 28368 47191 }28369 -1 target = generate(length)(src);28370 -1 try {28371 -1 mixin(target, src);28372 -1 } catch (ignore) {}28373 -1 return target;28374 -1 };28375 -1 }28376 -1 },28377 -1 './node_modules/es5-ext/function/is-arguments.js': function node_modulesEs5ExtFunctionIsArgumentsJs(module, exports, __webpack_require__) {28378 -1 'use strict';28379 -1 var objToString = Object.prototype.toString, id = objToString.call(function() {28380 -1 return arguments;28381 -1 }());28382 -1 module.exports = function(value) {28383 -1 return objToString.call(value) === id;28384 -1 };28385 -1 },28386 -1 './node_modules/es5-ext/function/is-function.js': function node_modulesEs5ExtFunctionIsFunctionJs(module, exports, __webpack_require__) {28387 -1 'use strict';28388 -1 var objToString = Object.prototype.toString, isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);28389 -1 module.exports = function(value) {28390 -1 return typeof value === 'function' && isFunctionStringTag(objToString.call(value));28391 -1 };28392 -1 },28393 -1 './node_modules/es5-ext/function/noop.js': function node_modulesEs5ExtFunctionNoopJs(module, exports, __webpack_require__) {28394 -1 'use strict';28395 -1 module.exports = function() {};28396 -1 },28397 -1 './node_modules/es5-ext/math/sign/index.js': function node_modulesEs5ExtMathSignIndexJs(module, exports, __webpack_require__) {28398 -1 'use strict';28399 -1 module.exports = __webpack_require__('./node_modules/es5-ext/math/sign/is-implemented.js')() ? Math.sign : __webpack_require__('./node_modules/es5-ext/math/sign/shim.js');28400 -1 },28401 -1 './node_modules/es5-ext/math/sign/is-implemented.js': function node_modulesEs5ExtMathSignIsImplementedJs(module, exports, __webpack_require__) {28402 -1 'use strict';28403 -1 module.exports = function() {28404 -1 var sign = Math.sign;28405 -1 if (typeof sign !== 'function') {28406 -1 return false;-1 47192 }, { -1 47193 nodeName: 'a', -1 47194 attributes: { -1 47195 href: isNotNull -1 47196 } -1 47197 } ] -1 47198 }, -1 47199 presentation: { -1 47200 type: 'structure', -1 47201 attributes: null, -1 47202 owned: null, -1 47203 nameFrom: [ 'author' ], -1 47204 context: null, -1 47205 unsupported: false, -1 47206 allowedElements: [ { -1 47207 nodeName: [ 'article', 'aside', 'dl', 'embed', 'figcaption', 'fieldset', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'iframe', 'li', 'ol', 'section', 'ul' ] -1 47208 }, { -1 47209 nodeName: 'img', -1 47210 attributes: { -1 47211 alt: isNotNull -1 47212 } -1 47213 } ] -1 47214 }, -1 47215 progressbar: { -1 47216 type: 'widget', -1 47217 attributes: { -1 47218 allowed: [ 'aria-valuetext', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin', 'aria-expanded', 'aria-errormessage' ] -1 47219 }, -1 47220 owned: null, -1 47221 nameFrom: [ 'author' ], -1 47222 context: null, -1 47223 implicit: [ 'progress' ], -1 47224 unsupported: false -1 47225 }, -1 47226 radio: { -1 47227 type: 'widget', -1 47228 attributes: { -1 47229 allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-required', 'aria-errormessage', 'aria-checked' ] -1 47230 }, -1 47231 owned: null, -1 47232 nameFrom: [ 'author', 'contents' ], -1 47233 context: null, -1 47234 implicit: [ 'input[type="radio"]' ], -1 47235 unsupported: false, -1 47236 allowedElements: [ { -1 47237 nodeName: [ 'button', 'li' ] -1 47238 }, { -1 47239 nodeName: 'input', -1 47240 properties: { -1 47241 type: [ 'image', 'button' ] -1 47242 } -1 47243 } ] -1 47244 }, -1 47245 radiogroup: { -1 47246 type: 'composite', -1 47247 attributes: { -1 47248 allowed: [ 'aria-activedescendant', 'aria-required', 'aria-expanded', 'aria-readonly', 'aria-errormessage', 'aria-orientation' ] -1 47249 }, -1 47250 owned: { -1 47251 all: [ 'radio' ] -1 47252 }, -1 47253 nameFrom: [ 'author' ], -1 47254 context: null, -1 47255 unsupported: false, -1 47256 allowedElements: { -1 47257 nodeName: [ 'ol', 'ul', 'fieldset' ] 28407 47258 }28408 -1 return sign(10) === 1 && sign(-20) === -1;28409 -1 };28410 -1 },28411 -1 './node_modules/es5-ext/math/sign/shim.js': function node_modulesEs5ExtMathSignShimJs(module, exports, __webpack_require__) {28412 -1 'use strict';28413 -1 module.exports = function(value) {28414 -1 value = Number(value);28415 -1 if (isNaN(value) || value === 0) {28416 -1 return value;-1 47259 }, -1 47260 range: { -1 47261 nameFrom: [ 'author' ], -1 47262 type: 'abstract', -1 47263 unsupported: false -1 47264 }, -1 47265 region: { -1 47266 type: 'landmark', -1 47267 attributes: { -1 47268 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 47269 }, -1 47270 owned: null, -1 47271 nameFrom: [ 'author' ], -1 47272 context: null, -1 47273 implicit: [ 'section[aria-label]', 'section[aria-labelledby]', 'section[title]' ], -1 47274 unsupported: false, -1 47275 allowedElements: { -1 47276 nodeName: [ 'article', 'aside' ] 28417 47277 }28418 -1 return value > 0 ? 1 : -1;28419 -1 };28420 -1 },28421 -1 './node_modules/es5-ext/number/is-nan/index.js': function node_modulesEs5ExtNumberIsNanIndexJs(module, exports, __webpack_require__) {28422 -1 'use strict';28423 -1 module.exports = __webpack_require__('./node_modules/es5-ext/number/is-nan/is-implemented.js')() ? Number.isNaN : __webpack_require__('./node_modules/es5-ext/number/is-nan/shim.js');28424 -1 },28425 -1 './node_modules/es5-ext/number/is-nan/is-implemented.js': function node_modulesEs5ExtNumberIsNanIsImplementedJs(module, exports, __webpack_require__) {28426 -1 'use strict';28427 -1 module.exports = function() {28428 -1 var numberIsNaN = Number.isNaN;28429 -1 if (typeof numberIsNaN !== 'function') {28430 -1 return false;-1 47278 }, -1 47279 roletype: { -1 47280 type: 'abstract', -1 47281 unsupported: false -1 47282 }, -1 47283 row: { -1 47284 type: 'structure', -1 47285 attributes: { -1 47286 allowed: [ 'aria-activedescendant', 'aria-colindex', 'aria-expanded', 'aria-level', 'aria-selected', 'aria-rowindex', 'aria-errormessage' ] -1 47287 }, -1 47288 owned: { -1 47289 one: [ 'cell', 'columnheader', 'rowheader', 'gridcell' ] -1 47290 }, -1 47291 nameFrom: [ 'author', 'contents' ], -1 47292 context: [ 'rowgroup', 'grid', 'treegrid', 'table' ], -1 47293 implicit: [ 'tr' ], -1 47294 unsupported: false -1 47295 }, -1 47296 rowgroup: { -1 47297 type: 'structure', -1 47298 attributes: { -1 47299 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-errormessage' ] -1 47300 }, -1 47301 owned: { -1 47302 all: [ 'row' ] -1 47303 }, -1 47304 nameFrom: [ 'author', 'contents' ], -1 47305 context: [ 'grid', 'table', 'treegrid' ], -1 47306 implicit: [ 'tbody', 'thead', 'tfoot' ], -1 47307 unsupported: false -1 47308 }, -1 47309 rowheader: { -1 47310 type: 'structure', -1 47311 attributes: { -1 47312 allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort', 'aria-errormessage' ] -1 47313 }, -1 47314 owned: null, -1 47315 nameFrom: [ 'author', 'contents' ], -1 47316 context: [ 'row' ], -1 47317 implicit: [ 'th' ], -1 47318 unsupported: false -1 47319 }, -1 47320 scrollbar: { -1 47321 type: 'widget', -1 47322 attributes: { -1 47323 required: [ 'aria-controls', 'aria-valuenow' ], -1 47324 allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ] -1 47325 }, -1 47326 owned: null, -1 47327 nameFrom: [ 'author' ], -1 47328 context: null, -1 47329 unsupported: false -1 47330 }, -1 47331 search: { -1 47332 type: 'landmark', -1 47333 attributes: { -1 47334 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 47335 }, -1 47336 owned: null, -1 47337 nameFrom: [ 'author' ], -1 47338 context: null, -1 47339 unsupported: false, -1 47340 allowedElements: { -1 47341 nodeName: [ 'aside', 'form', 'section' ] 28431 47342 }28432 -1 return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);28433 -1 };28434 -1 },28435 -1 './node_modules/es5-ext/number/is-nan/shim.js': function node_modulesEs5ExtNumberIsNanShimJs(module, exports, __webpack_require__) {28436 -1 'use strict';28437 -1 module.exports = function(value) {28438 -1 return value !== value;28439 -1 };28440 -1 },28441 -1 './node_modules/es5-ext/number/to-integer.js': function node_modulesEs5ExtNumberToIntegerJs(module, exports, __webpack_require__) {28442 -1 'use strict';28443 -1 var sign = __webpack_require__('./node_modules/es5-ext/math/sign/index.js'), abs = Math.abs, floor = Math.floor;28444 -1 module.exports = function(value) {28445 -1 if (isNaN(value)) {28446 -1 return 0;-1 47343 }, -1 47344 searchbox: { -1 47345 type: 'widget', -1 47346 attributes: { -1 47347 allowed: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required', 'aria-placeholder', 'aria-errormessage' ] -1 47348 }, -1 47349 owned: null, -1 47350 nameFrom: [ 'author' ], -1 47351 context: null, -1 47352 implicit: [ 'input[type="search"]' ], -1 47353 unsupported: false, -1 47354 allowedElements: { -1 47355 nodeName: 'input', -1 47356 properties: { -1 47357 type: 'text' -1 47358 } 28447 47359 }28448 -1 value = Number(value);28449 -1 if (value === 0 || !isFinite(value)) {28450 -1 return value;-1 47360 }, -1 47361 section: { -1 47362 nameFrom: [ 'author', 'contents' ], -1 47363 type: 'abstract', -1 47364 unsupported: false -1 47365 }, -1 47366 sectionhead: { -1 47367 nameFrom: [ 'author', 'contents' ], -1 47368 type: 'abstract', -1 47369 unsupported: false -1 47370 }, -1 47371 select: { -1 47372 nameFrom: [ 'author' ], -1 47373 type: 'abstract', -1 47374 unsupported: false -1 47375 }, -1 47376 separator: { -1 47377 type: 'structure', -1 47378 attributes: { -1 47379 allowed: [ 'aria-expanded', 'aria-orientation', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin', 'aria-valuetext', 'aria-errormessage' ] -1 47380 }, -1 47381 owned: null, -1 47382 nameFrom: [ 'author' ], -1 47383 context: null, -1 47384 implicit: [ 'hr' ], -1 47385 unsupported: false, -1 47386 allowedElements: [ 'li' ] -1 47387 }, -1 47388 slider: { -1 47389 type: 'widget', -1 47390 attributes: { -1 47391 allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-readonly', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ], -1 47392 required: [ 'aria-valuenow' ] -1 47393 }, -1 47394 owned: null, -1 47395 nameFrom: [ 'author' ], -1 47396 context: null, -1 47397 implicit: [ 'input[type="range"]' ], -1 47398 unsupported: false -1 47399 }, -1 47400 spinbutton: { -1 47401 type: 'widget', -1 47402 attributes: { -1 47403 allowed: [ 'aria-valuetext', 'aria-required', 'aria-readonly', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ], -1 47404 required: [ 'aria-valuenow' ] -1 47405 }, -1 47406 owned: null, -1 47407 nameFrom: [ 'author' ], -1 47408 context: null, -1 47409 implicit: [ 'input[type="number"]' ], -1 47410 unsupported: false, -1 47411 allowedElements: { -1 47412 nodeName: 'input', -1 47413 properties: { -1 47414 type: [ 'text', 'tel' ] -1 47415 } 28451 47416 }28452 -1 return sign(value) * floor(abs(value));28453 -1 };28454 -1 },28455 -1 './node_modules/es5-ext/number/to-pos-integer.js': function node_modulesEs5ExtNumberToPosIntegerJs(module, exports, __webpack_require__) {28456 -1 'use strict';28457 -1 var toInteger = __webpack_require__('./node_modules/es5-ext/number/to-integer.js'), max = Math.max;28458 -1 module.exports = function(value) {28459 -1 return max(0, toInteger(value));28460 -1 };28461 -1 },28462 -1 './node_modules/es5-ext/object/_iterate.js': function node_modulesEs5ExtObject_iterateJs(module, exports, __webpack_require__) {28463 -1 'use strict';28464 -1 var callable = __webpack_require__('./node_modules/es5-ext/object/valid-callable.js'), value = __webpack_require__('./node_modules/es5-ext/object/valid-value.js'), bind = Function.prototype.bind, call = Function.prototype.call, keys = Object.keys, objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;28465 -1 module.exports = function(method, defVal) {28466 -1 return function(obj, cb) {28467 -1 var list, thisArg = arguments[2], compareFn = arguments[3];28468 -1 obj = Object(value(obj));28469 -1 callable(cb);28470 -1 list = keys(obj);28471 -1 if (compareFn) {28472 -1 list.sort(typeof compareFn === 'function' ? bind.call(compareFn, obj) : undefined);-1 47417 }, -1 47418 status: { -1 47419 type: 'widget', -1 47420 attributes: { -1 47421 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 47422 }, -1 47423 owned: null, -1 47424 nameFrom: [ 'author' ], -1 47425 context: null, -1 47426 implicit: [ 'output' ], -1 47427 unsupported: false, -1 47428 allowedElements: [ 'section' ] -1 47429 }, -1 47430 structure: { -1 47431 type: 'abstract', -1 47432 unsupported: false -1 47433 }, -1 47434 switch: { -1 47435 type: 'widget', -1 47436 attributes: { -1 47437 allowed: [ 'aria-errormessage' ], -1 47438 required: [ 'aria-checked' ] -1 47439 }, -1 47440 owned: null, -1 47441 nameFrom: [ 'author', 'contents' ], -1 47442 context: null, -1 47443 unsupported: false, -1 47444 allowedElements: [ 'button', { -1 47445 nodeName: 'input', -1 47446 properties: { -1 47447 type: [ 'checkbox', 'image', 'button' ] 28473 47448 }28474 -1 if (typeof method !== 'function') {28475 -1 method = list[method];-1 47449 }, { -1 47450 nodeName: 'a', -1 47451 attributes: { -1 47452 href: isNotNull 28476 47453 }28477 -1 return call.call(method, list, function(key, index) {28478 -1 if (!objPropertyIsEnumerable.call(obj, key)) {28479 -1 return defVal;28480 -1 }28481 -1 return call.call(cb, thisArg, obj[key], key, obj, index);28482 -1 });28483 -1 };28484 -1 };28485 -1 },28486 -1 './node_modules/es5-ext/object/assign/index.js': function node_modulesEs5ExtObjectAssignIndexJs(module, exports, __webpack_require__) {28487 -1 'use strict';28488 -1 module.exports = __webpack_require__('./node_modules/es5-ext/object/assign/is-implemented.js')() ? Object.assign : __webpack_require__('./node_modules/es5-ext/object/assign/shim.js');28489 -1 },28490 -1 './node_modules/es5-ext/object/assign/is-implemented.js': function node_modulesEs5ExtObjectAssignIsImplementedJs(module, exports, __webpack_require__) {28491 -1 'use strict';28492 -1 module.exports = function() {28493 -1 var assign = Object.assign, obj;28494 -1 if (typeof assign !== 'function') {28495 -1 return false;28496 -1 }28497 -1 obj = {28498 -1 foo: 'raz'28499 -1 };28500 -1 assign(obj, {28501 -1 bar: 'dwa'-1 47454 } ] -1 47455 }, -1 47456 tab: { -1 47457 type: 'widget', -1 47458 attributes: { -1 47459 allowed: [ 'aria-selected', 'aria-expanded', 'aria-setsize', 'aria-posinset', 'aria-errormessage' ] -1 47460 }, -1 47461 owned: null, -1 47462 nameFrom: [ 'author', 'contents' ], -1 47463 context: [ 'tablist' ], -1 47464 unsupported: false, -1 47465 allowedElements: [ { -1 47466 nodeName: [ 'button', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'li' ] 28502 47467 }, {28503 -1 trzy: 'trzy'28504 -1 });28505 -1 return obj.foo + obj.bar + obj.trzy === 'razdwatrzy';28506 -1 };28507 -1 },28508 -1 './node_modules/es5-ext/object/assign/shim.js': function node_modulesEs5ExtObjectAssignShimJs(module, exports, __webpack_require__) {28509 -1 'use strict';28510 -1 var keys = __webpack_require__('./node_modules/es5-ext/object/keys/index.js'), value = __webpack_require__('./node_modules/es5-ext/object/valid-value.js'), max = Math.max;28511 -1 module.exports = function(dest, src) {28512 -1 var error, i, length = max(arguments.length, 2), assign;28513 -1 dest = Object(value(dest));28514 -1 assign = function assign(key) {28515 -1 try {28516 -1 dest[key] = src[key];28517 -1 } catch (e) {28518 -1 if (!error) {28519 -1 error = e;28520 -1 }-1 47468 nodeName: 'input', -1 47469 properties: { -1 47470 type: 'button' 28521 47471 }28522 -1 };28523 -1 for (i = 1; i < length; ++i) {28524 -1 src = arguments[i];28525 -1 keys(src).forEach(assign);28526 -1 }28527 -1 if (error !== undefined) {28528 -1 throw error;28529 -1 }28530 -1 return dest;28531 -1 };28532 -1 },28533 -1 './node_modules/es5-ext/object/for-each.js': function node_modulesEs5ExtObjectForEachJs(module, exports, __webpack_require__) {28534 -1 'use strict';28535 -1 module.exports = __webpack_require__('./node_modules/es5-ext/object/_iterate.js')('forEach');28536 -1 },28537 -1 './node_modules/es5-ext/object/is-callable.js': function node_modulesEs5ExtObjectIsCallableJs(module, exports, __webpack_require__) {28538 -1 'use strict';28539 -1 module.exports = function(obj) {28540 -1 return typeof obj === 'function';28541 -1 };28542 -1 },28543 -1 './node_modules/es5-ext/object/is-object.js': function node_modulesEs5ExtObjectIsObjectJs(module, exports, __webpack_require__) {28544 -1 'use strict';28545 -1 var isValue = __webpack_require__('./node_modules/es5-ext/object/is-value.js');28546 -1 var map = {28547 -1 function: true,28548 -1 object: true28549 -1 };28550 -1 module.exports = function(value) {28551 -1 return isValue(value) && map[_typeof(value)] || false;28552 -1 };28553 -1 },28554 -1 './node_modules/es5-ext/object/is-value.js': function node_modulesEs5ExtObjectIsValueJs(module, exports, __webpack_require__) {28555 -1 'use strict';28556 -1 var _undefined = __webpack_require__('./node_modules/es5-ext/function/noop.js')();28557 -1 module.exports = function(val) {28558 -1 return val !== _undefined && val !== null;28559 -1 };28560 -1 },28561 -1 './node_modules/es5-ext/object/keys/index.js': function node_modulesEs5ExtObjectKeysIndexJs(module, exports, __webpack_require__) {28562 -1 'use strict';28563 -1 module.exports = __webpack_require__('./node_modules/es5-ext/object/keys/is-implemented.js')() ? Object.keys : __webpack_require__('./node_modules/es5-ext/object/keys/shim.js');28564 -1 },28565 -1 './node_modules/es5-ext/object/keys/is-implemented.js': function node_modulesEs5ExtObjectKeysIsImplementedJs(module, exports, __webpack_require__) {28566 -1 'use strict';28567 -1 module.exports = function() {28568 -1 try {28569 -1 Object.keys('primitive');28570 -1 return true;28571 -1 } catch (e) {28572 -1 return false;28573 -1 }28574 -1 };28575 -1 },28576 -1 './node_modules/es5-ext/object/keys/shim.js': function node_modulesEs5ExtObjectKeysShimJs(module, exports, __webpack_require__) {28577 -1 'use strict';28578 -1 var isValue = __webpack_require__('./node_modules/es5-ext/object/is-value.js');28579 -1 var keys = Object.keys;28580 -1 module.exports = function(object) {28581 -1 return keys(isValue(object) ? Object(object) : object);28582 -1 };28583 -1 },28584 -1 './node_modules/es5-ext/object/map.js': function node_modulesEs5ExtObjectMapJs(module, exports, __webpack_require__) {28585 -1 'use strict';28586 -1 var callable = __webpack_require__('./node_modules/es5-ext/object/valid-callable.js'), forEach = __webpack_require__('./node_modules/es5-ext/object/for-each.js'), call = Function.prototype.call;28587 -1 module.exports = function(obj, cb) {28588 -1 var result = {}, thisArg = arguments[2];28589 -1 callable(cb);28590 -1 forEach(obj, function(value, key, targetObj, index) {28591 -1 result[key] = call.call(cb, thisArg, value, key, targetObj, index);28592 -1 });28593 -1 return result;28594 -1 };28595 -1 },28596 -1 './node_modules/es5-ext/object/mixin.js': function node_modulesEs5ExtObjectMixinJs(module, exports, __webpack_require__) {28597 -1 'use strict';28598 -1 var value = __webpack_require__('./node_modules/es5-ext/object/valid-value.js'), defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;28599 -1 module.exports = function(target, source) {28600 -1 var error, sourceObject = Object(value(source));28601 -1 target = Object(value(target));28602 -1 getOwnPropertyNames(sourceObject).forEach(function(name) {28603 -1 try {28604 -1 defineProperty(target, name, getOwnPropertyDescriptor(source, name));28605 -1 } catch (e) {28606 -1 error = e;-1 47472 }, { -1 47473 nodeName: 'a', -1 47474 attributes: { -1 47475 href: isNotNull 28607 47476 }28608 -1 });28609 -1 if (typeof getOwnPropertySymbols === 'function') {28610 -1 getOwnPropertySymbols(sourceObject).forEach(function(symbol) {28611 -1 try {28612 -1 defineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol));28613 -1 } catch (e) {28614 -1 error = e;28615 -1 }28616 -1 });-1 47477 } ] -1 47478 }, -1 47479 table: { -1 47480 type: 'structure', -1 47481 attributes: { -1 47482 allowed: [ 'aria-colcount', 'aria-rowcount', 'aria-errormessage' ] -1 47483 }, -1 47484 owned: { -1 47485 one: [ 'rowgroup', 'row' ] -1 47486 }, -1 47487 nameFrom: [ 'author', 'contents' ], -1 47488 context: null, -1 47489 implicit: [ 'table' ], -1 47490 unsupported: false -1 47491 }, -1 47492 tablist: { -1 47493 type: 'composite', -1 47494 attributes: { -1 47495 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-errormessage' ] -1 47496 }, -1 47497 owned: { -1 47498 all: [ 'tab' ] -1 47499 }, -1 47500 nameFrom: [ 'author' ], -1 47501 context: null, -1 47502 unsupported: false, -1 47503 allowedElements: [ 'ol', 'ul' ] -1 47504 }, -1 47505 tabpanel: { -1 47506 type: 'widget', -1 47507 attributes: { -1 47508 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 47509 }, -1 47510 owned: null, -1 47511 nameFrom: [ 'author' ], -1 47512 context: null, -1 47513 unsupported: false, -1 47514 allowedElements: [ 'section' ] -1 47515 }, -1 47516 term: { -1 47517 type: 'structure', -1 47518 attributes: { -1 47519 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 47520 }, -1 47521 owned: null, -1 47522 nameFrom: [ 'author', 'contents' ], -1 47523 context: null, -1 47524 implicit: [ 'dt' ], -1 47525 unsupported: false -1 47526 }, -1 47527 textbox: { -1 47528 type: 'widget', -1 47529 attributes: { -1 47530 allowed: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required', 'aria-placeholder', 'aria-errormessage' ] -1 47531 }, -1 47532 owned: null, -1 47533 nameFrom: [ 'author' ], -1 47534 context: null, -1 47535 implicit: [ 'input[type="text"]', 'input[type="email"]', 'input[type="password"]', 'input[type="tel"]', 'input[type="url"]', 'input:not([type])', 'textarea' ], -1 47536 unsupported: false -1 47537 }, -1 47538 timer: { -1 47539 type: 'widget', -1 47540 attributes: { -1 47541 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 47542 }, -1 47543 owned: null, -1 47544 nameFrom: [ 'author' ], -1 47545 context: null, -1 47546 unsupported: false -1 47547 }, -1 47548 toolbar: { -1 47549 type: 'structure', -1 47550 attributes: { -1 47551 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ] -1 47552 }, -1 47553 owned: null, -1 47554 nameFrom: [ 'author' ], -1 47555 context: null, -1 47556 implicit: [ 'menu[type="toolbar"]' ], -1 47557 unsupported: false, -1 47558 allowedElements: [ 'ol', 'ul' ] -1 47559 }, -1 47560 tooltip: { -1 47561 type: 'structure', -1 47562 attributes: { -1 47563 allowed: [ 'aria-expanded', 'aria-errormessage' ] -1 47564 }, -1 47565 owned: null, -1 47566 nameFrom: [ 'author', 'contents' ], -1 47567 context: null, -1 47568 unsupported: false -1 47569 }, -1 47570 tree: { -1 47571 type: 'composite', -1 47572 attributes: { -1 47573 allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-required', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ] -1 47574 }, -1 47575 owned: { -1 47576 all: [ 'treeitem' ] -1 47577 }, -1 47578 nameFrom: [ 'author' ], -1 47579 context: null, -1 47580 unsupported: false, -1 47581 allowedElements: [ 'ol', 'ul' ] -1 47582 }, -1 47583 treegrid: { -1 47584 type: 'composite', -1 47585 attributes: { -1 47586 allowed: [ 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-rowcount', 'aria-orientation', 'aria-errormessage' ] -1 47587 }, -1 47588 owned: { -1 47589 one: [ 'rowgroup', 'row' ] -1 47590 }, -1 47591 nameFrom: [ 'author' ], -1 47592 context: null, -1 47593 unsupported: false -1 47594 }, -1 47595 treeitem: { -1 47596 type: 'widget', -1 47597 attributes: { -1 47598 allowed: [ 'aria-checked', 'aria-selected', 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ] -1 47599 }, -1 47600 owned: null, -1 47601 nameFrom: [ 'author', 'contents' ], -1 47602 context: [ 'group', 'tree' ], -1 47603 unsupported: false, -1 47604 allowedElements: [ 'li', { -1 47605 nodeName: 'a', -1 47606 attributes: { -1 47607 href: isNotNull -1 47608 } -1 47609 } ] -1 47610 }, -1 47611 widget: { -1 47612 type: 'abstract', -1 47613 unsupported: false -1 47614 }, -1 47615 window: { -1 47616 nameFrom: [ 'author' ], -1 47617 type: 'abstract', -1 47618 unsupported: false -1 47619 } -1 47620 }; -1 47621 lookupTable.implicitHtmlRole = implicit_html_roles_default; -1 47622 lookupTable.elementsAllowedNoRole = [ { -1 47623 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' ] -1 47624 }, { -1 47625 nodeName: 'area', -1 47626 attributes: { -1 47627 href: isNotNull -1 47628 } -1 47629 }, { -1 47630 nodeName: 'input', -1 47631 properties: { -1 47632 type: [ 'color', 'data', 'datatime', 'file', 'hidden', 'month', 'number', 'password', 'range', 'reset', 'submit', 'time', 'week' ] -1 47633 } -1 47634 }, { -1 47635 nodeName: 'link', -1 47636 attributes: { -1 47637 href: isNotNull -1 47638 } -1 47639 }, { -1 47640 nodeName: 'menu', -1 47641 attributes: { -1 47642 type: 'context' -1 47643 } -1 47644 }, { -1 47645 nodeName: 'menuitem', -1 47646 attributes: { -1 47647 type: [ 'command', 'checkbox', 'radio' ] -1 47648 } -1 47649 }, { -1 47650 nodeName: 'select', -1 47651 condition: function condition(vNode) { -1 47652 if (!(vNode instanceof axe.AbstractVirtualNode)) { -1 47653 vNode = axe.utils.getNodeFromTree(vNode); 28617 47654 }28618 -1 if (error !== undefined) {28619 -1 throw error;-1 47655 return Number(vNode.attr('size')) > 1; -1 47656 }, -1 47657 properties: { -1 47658 multiple: true -1 47659 } -1 47660 }, { -1 47661 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' ] -1 47662 } ]; -1 47663 lookupTable.elementsAllowedAnyRole = [ { -1 47664 nodeName: 'a', -1 47665 attributes: { -1 47666 href: isNull -1 47667 } -1 47668 }, { -1 47669 nodeName: 'img', -1 47670 attributes: { -1 47671 alt: isNull -1 47672 } -1 47673 }, { -1 47674 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' ] -1 47675 } ]; -1 47676 lookupTable.evaluateRoleForElement = { -1 47677 A: function A(_ref35) { -1 47678 var node = _ref35.node, out = _ref35.out; -1 47679 if (node.namespaceURI === 'http://www.w3.org/2000/svg') { -1 47680 return true; 28620 47681 }28621 -1 return target;28622 -1 };28623 -1 },28624 -1 './node_modules/es5-ext/object/normalize-options.js': function node_modulesEs5ExtObjectNormalizeOptionsJs(module, exports, __webpack_require__) {28625 -1 'use strict';28626 -1 var isValue = __webpack_require__('./node_modules/es5-ext/object/is-value.js');28627 -1 var forEach = Array.prototype.forEach, create = Object.create;28628 -1 var process = function process(src, obj) {28629 -1 var key;28630 -1 for (key in src) {28631 -1 obj[key] = src[key];-1 47682 if (node.href.length) { -1 47683 return out; 28632 47684 }28633 -1 };28634 -1 module.exports = function(opts1) {28635 -1 var result = create(null);28636 -1 forEach.call(arguments, function(options) {28637 -1 if (!isValue(options)) {28638 -1 return;28639 -1 }28640 -1 process(Object(options), result);28641 -1 });28642 -1 return result;28643 -1 };28644 -1 },28645 -1 './node_modules/es5-ext/object/primitive-set.js': function node_modulesEs5ExtObjectPrimitiveSetJs(module, exports, __webpack_require__) {28646 -1 'use strict';28647 -1 var forEach = Array.prototype.forEach, create = Object.create;28648 -1 module.exports = function(arg) {28649 -1 var set = create(null);28650 -1 forEach.call(arguments, function(name) {28651 -1 set[name] = true;28652 -1 });28653 -1 return set;28654 -1 };28655 -1 },28656 -1 './node_modules/es5-ext/object/valid-callable.js': function node_modulesEs5ExtObjectValidCallableJs(module, exports, __webpack_require__) {28657 -1 'use strict';28658 -1 module.exports = function(fn) {28659 -1 if (typeof fn !== 'function') {28660 -1 throw new TypeError(fn + ' is not a function');-1 47685 return true; -1 47686 }, -1 47687 AREA: function AREA(_ref36) { -1 47688 var node = _ref36.node; -1 47689 return !node.href; -1 47690 }, -1 47691 BUTTON: function BUTTON(_ref37) { -1 47692 var node = _ref37.node, role = _ref37.role, out = _ref37.out; -1 47693 if (node.getAttribute('type') === 'menu') { -1 47694 return role === 'menuitem'; 28661 47695 }28662 -1 return fn;28663 -1 };28664 -1 },28665 -1 './node_modules/es5-ext/object/valid-value.js': function node_modulesEs5ExtObjectValidValueJs(module, exports, __webpack_require__) {28666 -1 'use strict';28667 -1 var isValue = __webpack_require__('./node_modules/es5-ext/object/is-value.js');28668 -1 module.exports = function(value) {28669 -1 if (!isValue(value)) {28670 -1 throw new TypeError('Cannot use null or undefined');-1 47696 return out; -1 47697 }, -1 47698 IMG: function IMG(_ref38) { -1 47699 var node = _ref38.node, role = _ref38.role, out = _ref38.out; -1 47700 switch (node.alt) { -1 47701 case null: -1 47702 return out; -1 47703 -1 47704 case '': -1 47705 return role === 'presentation' || role === 'none'; -1 47706 -1 47707 default: -1 47708 return role !== 'presentation' && role !== 'none'; 28671 47709 }28672 -1 return value;28673 -1 };28674 -1 },28675 -1 './node_modules/es5-ext/object/validate-stringifiable-value.js': function node_modulesEs5ExtObjectValidateStringifiableValueJs(module, exports, __webpack_require__) {28676 -1 'use strict';28677 -1 var ensureValue = __webpack_require__('./node_modules/es5-ext/object/valid-value.js'), stringifiable = __webpack_require__('./node_modules/es5-ext/object/validate-stringifiable.js');28678 -1 module.exports = function(value) {28679 -1 return stringifiable(ensureValue(value));28680 -1 };28681 -1 },28682 -1 './node_modules/es5-ext/object/validate-stringifiable.js': function node_modulesEs5ExtObjectValidateStringifiableJs(module, exports, __webpack_require__) {28683 -1 'use strict';28684 -1 var isCallable = __webpack_require__('./node_modules/es5-ext/object/is-callable.js');28685 -1 module.exports = function(stringifiable) {28686 -1 try {28687 -1 if (stringifiable && isCallable(stringifiable.toString)) {28688 -1 return stringifiable.toString();-1 47710 }, -1 47711 INPUT: function INPUT(_ref39) { -1 47712 var node = _ref39.node, role = _ref39.role, out = _ref39.out; -1 47713 switch (node.type) { -1 47714 case 'button': -1 47715 case 'image': -1 47716 return out; -1 47717 -1 47718 case 'checkbox': -1 47719 if (role === 'button' && node.hasAttribute('aria-pressed')) { -1 47720 return true; 28689 47721 }28690 -1 return String(stringifiable);28691 -1 } catch (e) {28692 -1 throw new TypeError('Passed argument cannot be stringifed');-1 47722 return out; -1 47723 -1 47724 case 'radio': -1 47725 return role === 'menuitemradio'; -1 47726 -1 47727 case 'text': -1 47728 return role === 'combobox' || role === 'searchbox' || role === 'spinbutton'; -1 47729 -1 47730 case 'tel': -1 47731 return role === 'combobox' || role === 'spinbutton'; -1 47732 -1 47733 case 'url': -1 47734 case 'search': -1 47735 case 'email': -1 47736 return role === 'combobox'; -1 47737 -1 47738 default: -1 47739 return false; 28693 47740 }28694 -1 };28695 -1 },28696 -1 './node_modules/es5-ext/safe-to-string.js': function node_modulesEs5ExtSafeToStringJs(module, exports, __webpack_require__) {28697 -1 'use strict';28698 -1 var isCallable = __webpack_require__('./node_modules/es5-ext/object/is-callable.js');28699 -1 module.exports = function(value) {28700 -1 try {28701 -1 if (value && isCallable(value.toString)) {28702 -1 return value.toString();28703 -1 }28704 -1 return String(value);28705 -1 } catch (e) {28706 -1 return '<Non-coercible to string value>';-1 47741 }, -1 47742 LI: function LI(_ref40) { -1 47743 var node = _ref40.node, out = _ref40.out; -1 47744 var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li'); -1 47745 if (hasImplicitListitemRole) { -1 47746 return out; 28707 47747 }28708 -1 };28709 -1 },28710 -1 './node_modules/es5-ext/string/#/contains/index.js': function node_modulesEs5ExtStringContainsIndexJs(module, exports, __webpack_require__) {28711 -1 'use strict';28712 -1 module.exports = __webpack_require__('./node_modules/es5-ext/string/#/contains/is-implemented.js')() ? String.prototype.contains : __webpack_require__('./node_modules/es5-ext/string/#/contains/shim.js');28713 -1 },28714 -1 './node_modules/es5-ext/string/#/contains/is-implemented.js': function node_modulesEs5ExtStringContainsIsImplementedJs(module, exports, __webpack_require__) {28715 -1 'use strict';28716 -1 var str = 'razdwatrzy';28717 -1 module.exports = function() {28718 -1 if (typeof str.contains !== 'function') {-1 47748 return true; -1 47749 }, -1 47750 MENU: function MENU(_ref41) { -1 47751 var node = _ref41.node; -1 47752 if (node.getAttribute('type') === 'context') { 28719 47753 return false; 28720 47754 }28721 -1 return str.contains('dwa') === true && str.contains('foo') === false;28722 -1 };28723 -1 },28724 -1 './node_modules/es5-ext/string/#/contains/shim.js': function node_modulesEs5ExtStringContainsShimJs(module, exports, __webpack_require__) {28725 -1 'use strict';28726 -1 var indexOf = String.prototype.indexOf;28727 -1 module.exports = function(searchString) {28728 -1 return indexOf.call(this, searchString, arguments[1]) > -1;28729 -1 };28730 -1 },28731 -1 './node_modules/es5-ext/string/is-string.js': function node_modulesEs5ExtStringIsStringJs(module, exports, __webpack_require__) {28732 -1 'use strict';28733 -1 var objToString = Object.prototype.toString, id = objToString.call('');28734 -1 module.exports = function(value) {28735 -1 return typeof value === 'string' || value && _typeof(value) === 'object' && (value instanceof String || objToString.call(value) === id) || false;28736 -1 };28737 -1 },28738 -1 './node_modules/es5-ext/to-short-string-representation.js': function node_modulesEs5ExtToShortStringRepresentationJs(module, exports, __webpack_require__) {28739 -1 'use strict';28740 -1 var safeToString = __webpack_require__('./node_modules/es5-ext/safe-to-string.js');28741 -1 var reNewLine = /[\n\r\u2028\u2029]/g;28742 -1 module.exports = function(value) {28743 -1 var string = safeToString(value);28744 -1 if (string.length > 100) {28745 -1 string = string.slice(0, 99) + '\u2026';-1 47755 return true; -1 47756 }, -1 47757 OPTION: function OPTION(_ref42) { -1 47758 var node = _ref42.node; -1 47759 var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option'); -1 47760 return !withinOptionList; -1 47761 }, -1 47762 SELECT: function SELECT(_ref43) { -1 47763 var node = _ref43.node, role = _ref43.role; -1 47764 return !node.multiple && node.size <= 1 && role === 'menu'; -1 47765 }, -1 47766 SVG: function SVG(_ref44) { -1 47767 var node = _ref44.node, out = _ref44.out; -1 47768 if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') { -1 47769 return true; 28746 47770 }28747 -1 string = string.replace(reNewLine, function(_char2) {28748 -1 return JSON.stringify(_char2).slice(1, -1);-1 47771 return out; -1 47772 } -1 47773 }; -1 47774 lookupTable.rolesOfType = { -1 47775 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' ] -1 47776 }; -1 47777 var lookup_table_default = lookupTable; -1 47778 function implicitNodes(role) { -1 47779 var implicit = null; -1 47780 var roles = lookup_table_default.role[role]; -1 47781 if (roles && roles.implicit) { -1 47782 implicit = clone_default(roles.implicit); -1 47783 } -1 47784 return implicit; -1 47785 } -1 47786 var implicit_nodes_default = implicitNodes; -1 47787 function isAccessibleRef(node) { -1 47788 return !!get_accessible_refs_default(node).length; -1 47789 } -1 47790 var is_accessible_ref_default = isAccessibleRef; -1 47791 function label3(node) { -1 47792 node = get_node_from_tree_default(node); -1 47793 return label_virtual_default(node); -1 47794 } -1 47795 var label_default2 = label3; -1 47796 function requiredAttr(role) { -1 47797 var roleDef = standards_default.ariaRoles[role]; -1 47798 if (!roleDef || !Array.isArray(roleDef.requiredAttrs)) { -1 47799 return []; -1 47800 } -1 47801 return _toConsumableArray(roleDef.requiredAttrs); -1 47802 } -1 47803 var required_attr_default = requiredAttr; -1 47804 function requiredContext(role) { -1 47805 var roleDef = standards_default.ariaRoles[role]; -1 47806 if (!roleDef || !Array.isArray(roleDef.requiredContext)) { -1 47807 return null; -1 47808 } -1 47809 return _toConsumableArray(roleDef.requiredContext); -1 47810 } -1 47811 var required_context_default = requiredContext; -1 47812 function requiredOwned(role) { -1 47813 var roleDef = standards_default.ariaRoles[role]; -1 47814 if (!roleDef || !Array.isArray(roleDef.requiredOwned)) { -1 47815 return null; -1 47816 } -1 47817 return _toConsumableArray(roleDef.requiredOwned); -1 47818 } -1 47819 var required_owned_default = requiredOwned; -1 47820 function validateAttrValue(node, attr) { -1 47821 var matches14; -1 47822 var list; -1 47823 var value = node.getAttribute(attr); -1 47824 var attrInfo = standards_default.ariaAttrs[attr]; -1 47825 var doc = get_root_node_default2(node); -1 47826 if (!attrInfo) { -1 47827 return true; -1 47828 } -1 47829 if (attrInfo.allowEmpty && (!value || value.trim() === '')) { -1 47830 return true; -1 47831 } -1 47832 switch (attrInfo.type) { -1 47833 case 'boolean': -1 47834 return [ 'true', 'false' ].includes(value.toLowerCase()); -1 47835 -1 47836 case 'nmtoken': -1 47837 return typeof value === 'string' && attrInfo.values.includes(value.toLowerCase()); -1 47838 -1 47839 case 'nmtokens': -1 47840 list = token_list_default(value); -1 47841 return list.reduce(function(result, token) { -1 47842 return result && attrInfo.values.includes(token); -1 47843 }, list.length !== 0); -1 47844 -1 47845 case 'idref': -1 47846 return !!(value && doc.getElementById(value)); -1 47847 -1 47848 case 'idrefs': -1 47849 list = token_list_default(value); -1 47850 return list.some(function(token) { -1 47851 return doc.getElementById(token); 28749 47852 });28750 -1 return string;28751 -1 };28752 -1 },28753 -1 './node_modules/es6-symbol/index.js': function node_modulesEs6SymbolIndexJs(module, exports, __webpack_require__) {28754 -1 'use strict';28755 -1 module.exports = __webpack_require__('./node_modules/es6-symbol/is-implemented.js')() ? __webpack_require__('./node_modules/ext/global-this/index.js').Symbol : __webpack_require__('./node_modules/es6-symbol/polyfill.js');28756 -1 },28757 -1 './node_modules/es6-symbol/is-implemented.js': function node_modulesEs6SymbolIsImplementedJs(module, exports, __webpack_require__) {28758 -1 'use strict';28759 -1 var global = __webpack_require__('./node_modules/ext/global-this/index.js'), validTypes = {28760 -1 object: true,28761 -1 symbol: true28762 -1 };28763 -1 module.exports = function() {28764 -1 var _Symbol2 = global.Symbol;28765 -1 var symbol;28766 -1 if (typeof _Symbol2 !== 'function') {28767 -1 return false;-1 47853 -1 47854 case 'string': -1 47855 return value.trim() !== ''; -1 47856 -1 47857 case 'decimal': -1 47858 matches14 = value.match(/^[-+]?([0-9]*)\.?([0-9]*)$/); -1 47859 return !!(matches14 && (matches14[1] || matches14[2])); -1 47860 -1 47861 case 'int': -1 47862 var minValue = typeof attrInfo.minValue !== 'undefined' ? attrInfo.minValue : -Infinity; -1 47863 return /^[-+]?[0-9]+$/.test(value) && parseInt(value) >= minValue; -1 47864 } -1 47865 } -1 47866 var validate_attr_value_default = validateAttrValue; -1 47867 function validateAttr(att) { -1 47868 var attrDefinition = standards_default.ariaAttrs[att]; -1 47869 return !!attrDefinition; -1 47870 } -1 47871 var validate_attr_default = validateAttr; -1 47872 function abstractroleEvaluate(node, options, virtualNode) { -1 47873 var abstractRoles = token_list_default(virtualNode.attr('role')).filter(function(role) { -1 47874 return get_role_type_default(role) === 'abstract'; -1 47875 }); -1 47876 if (abstractRoles.length > 0) { -1 47877 this.data(abstractRoles); -1 47878 return true; -1 47879 } -1 47880 return false; -1 47881 } -1 47882 var abstractrole_evaluate_default = abstractroleEvaluate; -1 47883 function ariaAllowedAttrEvaluate(node, options, virtualNode) { -1 47884 var invalid = []; -1 47885 var role = get_role_default(virtualNode); -1 47886 var attrs = virtualNode.attrNames; -1 47887 var allowed = allowed_attr_default(role); -1 47888 if (Array.isArray(options[role])) { -1 47889 allowed = unique_array_default(options[role].concat(allowed)); -1 47890 } -1 47891 if (role && allowed) { -1 47892 for (var _i14 = 0; _i14 < attrs.length; _i14++) { -1 47893 var attrName = attrs[_i14]; -1 47894 if (validate_attr_default(attrName) && !allowed.includes(attrName)) { -1 47895 invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"'); -1 47896 } 28768 47897 }28769 -1 symbol = _Symbol2('test symbol');28770 -1 try {28771 -1 String(symbol);28772 -1 } catch (e) {28773 -1 return false;-1 47898 } -1 47899 if (invalid.length) { -1 47900 this.data(invalid); -1 47901 return false; -1 47902 } -1 47903 return true; -1 47904 } -1 47905 var aria_allowed_attr_evaluate_default = ariaAllowedAttrEvaluate; -1 47906 function ariaAllowedRoledEvaluate(node) { -1 47907 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 47908 var _options$allowImplici = options.allowImplicit, allowImplicit = _options$allowImplici === void 0 ? true : _options$allowImplici, _options$ignoredTags = options.ignoredTags, ignoredTags = _options$ignoredTags === void 0 ? [] : _options$ignoredTags; -1 47909 var tagName = node.nodeName.toUpperCase(); -1 47910 if (ignoredTags.map(function(t) { -1 47911 return t.toUpperCase(); -1 47912 }).includes(tagName)) { -1 47913 return true; -1 47914 } -1 47915 var unallowedRoles = get_element_unallowed_roles_default(node, allowImplicit); -1 47916 if (unallowedRoles.length) { -1 47917 this.data(unallowedRoles); -1 47918 if (!is_visible_default(node, true)) { -1 47919 return void 0; -1 47920 } -1 47921 return false; -1 47922 } -1 47923 return true; -1 47924 } -1 47925 var aria_allowed_role_evaluate_default = ariaAllowedRoledEvaluate; -1 47926 function ariaErrormessageEvaluate(node, options) { -1 47927 options = Array.isArray(options) ? options : []; -1 47928 var attr = node.getAttribute('aria-errormessage'); -1 47929 var hasAttr = node.hasAttribute('aria-errormessage'); -1 47930 var invaid = node.getAttribute('aria-invalid'); -1 47931 var hasInvallid = node.hasAttribute('aria-invalid'); -1 47932 if (!hasInvallid || invaid === 'false') { -1 47933 return true; -1 47934 } -1 47935 var doc = get_root_node_default2(node); -1 47936 function validateAttrValue2(attr2) { -1 47937 if (attr2.trim() === '') { -1 47938 return standards_default.ariaAttrs['aria-errormessage'].allowEmpty; 28774 47939 }28775 -1 if (!validTypes[_typeof(_Symbol2.iterator)]) {-1 47940 var idref = attr2 && doc.getElementById(attr2); -1 47941 if (idref) { -1 47942 return idref.getAttribute('role') === 'alert' || idref.getAttribute('aria-live') === 'assertive' || idref.getAttribute('aria-live') === 'polite' || token_list_default(node.getAttribute('aria-describedby')).indexOf(attr2) > -1; -1 47943 } -1 47944 return; -1 47945 } -1 47946 if (options.indexOf(attr) === -1 && hasAttr) { -1 47947 this.data(token_list_default(attr)); -1 47948 return validateAttrValue2(attr); -1 47949 } -1 47950 return true; -1 47951 } -1 47952 var aria_errormessage_evaluate_default = ariaErrormessageEvaluate; -1 47953 function ariaHiddenBodyEvaluate(node, options, virtualNode) { -1 47954 return virtualNode.attr('aria-hidden') !== 'true'; -1 47955 } -1 47956 var aria_hidden_body_evaluate_default = ariaHiddenBodyEvaluate; -1 47957 function ariaProhibitedAttrEvaluate(node) { -1 47958 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 47959 var virtualNode = arguments.length > 2 ? arguments[2] : undefined; -1 47960 var extraElementsAllowedAriaLabel = options.elementsAllowedAriaLabel || []; -1 47961 var prohibitedList = listProhibitedAttrs(virtualNode, extraElementsAllowedAriaLabel); -1 47962 var prohibited = prohibitedList.filter(function(attrName) { -1 47963 if (!virtualNode.attrNames.includes(attrName)) { 28776 47964 return false; 28777 47965 }28778 -1 if (!validTypes[_typeof(_Symbol2.toPrimitive)]) {28779 -1 return false;-1 47966 return sanitize_default(virtualNode.attr(attrName)) !== ''; -1 47967 }); -1 47968 if (prohibited.length === 0) { -1 47969 return false; -1 47970 } -1 47971 this.data(prohibited); -1 47972 var hasTextContent = sanitize_default(subtree_text_default(virtualNode)) !== ''; -1 47973 return hasTextContent ? void 0 : true; -1 47974 } -1 47975 function listProhibitedAttrs(virtualNode, elementsAllowedAriaLabel) { -1 47976 var role = get_role_default(virtualNode, { -1 47977 chromium: true -1 47978 }); -1 47979 var roleSpec = standards_default.ariaRoles[role]; -1 47980 if (roleSpec) { -1 47981 return roleSpec.prohibitedAttrs || []; -1 47982 } -1 47983 var nodeName2 = virtualNode.props.nodeName; -1 47984 if (!!role || elementsAllowedAriaLabel.includes(nodeName2)) { -1 47985 return []; -1 47986 } -1 47987 return [ 'aria-label', 'aria-labelledby' ]; -1 47988 } -1 47989 var aria_prohibited_attr_evaluate_default = ariaProhibitedAttrEvaluate; -1 47990 var standards_exports = {}; -1 47991 __export(standards_exports, { -1 47992 getAriaRolesByType: function getAriaRolesByType() { -1 47993 return get_aria_roles_by_type_default; -1 47994 }, -1 47995 getAriaRolesSupportingNameFromContent: function getAriaRolesSupportingNameFromContent() { -1 47996 return get_aria_roles_supporting_name_from_content_default; -1 47997 }, -1 47998 getElementSpec: function getElementSpec() { -1 47999 return get_element_spec_default; -1 48000 }, -1 48001 getElementsByContentType: function getElementsByContentType() { -1 48002 return get_elements_by_content_type_default; -1 48003 }, -1 48004 getGlobalAriaAttrs: function getGlobalAriaAttrs() { -1 48005 return get_global_aria_attrs_default; -1 48006 }, -1 48007 implicitHtmlRoles: function implicitHtmlRoles() { -1 48008 return implicit_html_roles_default; -1 48009 } -1 48010 }); -1 48011 function ariaRequiredAttrEvaluate(node) { -1 48012 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 48013 var virtualNode = arguments.length > 2 ? arguments[2] : undefined; -1 48014 var missing = []; -1 48015 var attrs = virtualNode.attrNames; -1 48016 if (attrs.length) { -1 48017 var role = get_explicit_role_default(virtualNode); -1 48018 var required = required_attr_default(role); -1 48019 var elmSpec = get_element_spec_default(virtualNode); -1 48020 if (Array.isArray(options[role])) { -1 48021 required = unique_array_default(options[role], required); -1 48022 } -1 48023 if (role && required) { -1 48024 for (var _i15 = 0, l = required.length; _i15 < l; _i15++) { -1 48025 var attr = required[_i15]; -1 48026 if (!virtualNode.attr(attr) && !(elmSpec.implicitAttrs && typeof elmSpec.implicitAttrs[attr] !== 'undefined')) { -1 48027 missing.push(attr); -1 48028 } -1 48029 } -1 48030 } -1 48031 } -1 48032 if (missing.length) { -1 48033 this.data(missing); -1 48034 return false; -1 48035 } -1 48036 return true; -1 48037 } -1 48038 var aria_required_attr_evaluate_default = ariaRequiredAttrEvaluate; -1 48039 function getOwnedRoles(virtualNode, required) { -1 48040 var ownedRoles = []; -1 48041 var ownedElements = get_owned_virtual_default(virtualNode); -1 48042 var _loop4 = function _loop4(_i16) { -1 48043 var ownedElement = ownedElements[_i16]; -1 48044 var role = get_role_default(ownedElement, { -1 48045 noPresentational: true -1 48046 }); -1 48047 if (!role || [ 'group', 'rowgroup' ].includes(role) && required.some(function(requiredRole) { -1 48048 return requiredRole === role; -1 48049 })) { -1 48050 ownedElements.push.apply(ownedElements, _toConsumableArray(ownedElement.children)); -1 48051 } else if (role) { -1 48052 ownedRoles.push(role); -1 48053 } -1 48054 }; -1 48055 for (var _i16 = 0; _i16 < ownedElements.length; _i16++) { -1 48056 _loop4(_i16); -1 48057 } -1 48058 return ownedRoles; -1 48059 } -1 48060 function missingRequiredChildren(virtualNode, role, required, ownedRoles) { -1 48061 var isCombobox = role === 'combobox'; -1 48062 if (isCombobox) { -1 48063 var textTypeInputs = [ 'text', 'search', 'email', 'url', 'tel' ]; -1 48064 if (virtualNode.props.nodeName === 'input' && textTypeInputs.includes(virtualNode.props.type) || ownedRoles.includes('searchbox')) { -1 48065 required = required.filter(function(requiredRole) { -1 48066 return requiredRole !== 'textbox'; -1 48067 }); 28780 48068 }28781 -1 if (!validTypes[_typeof(_Symbol2.toStringTag)]) {28782 -1 return false;-1 48069 var expandedChildRoles = [ 'listbox', 'tree', 'grid', 'dialog' ]; -1 48070 var expandedValue = virtualNode.attr('aria-expanded'); -1 48071 var expanded = expandedValue && expandedValue.toLowerCase() !== 'false'; -1 48072 var popupRole = (virtualNode.attr('aria-haspopup') || 'listbox').toLowerCase(); -1 48073 required = required.filter(function(requiredRole) { -1 48074 return !expandedChildRoles.includes(requiredRole) || expanded && requiredRole === popupRole; -1 48075 }); -1 48076 } -1 48077 for (var _i17 = 0; _i17 < ownedRoles.length; _i17++) { -1 48078 var ownedRole = ownedRoles[_i17]; -1 48079 if (required.includes(ownedRole)) { -1 48080 required = required.filter(function(requiredRole) { -1 48081 return requiredRole !== ownedRole; -1 48082 }); -1 48083 if (!isCombobox) { -1 48084 return null; -1 48085 } 28783 48086 } -1 48087 } -1 48088 if (required.length) { -1 48089 return required; -1 48090 } -1 48091 return null; -1 48092 } -1 48093 function ariaRequiredChildrenEvaluate(node, options, virtualNode) { -1 48094 var reviewEmpty = options && Array.isArray(options.reviewEmpty) ? options.reviewEmpty : []; -1 48095 var role = get_explicit_role_default(virtualNode, { -1 48096 dpub: true -1 48097 }); -1 48098 var required = required_owned_default(role); -1 48099 if (required === null) { 28784 48100 return true;28785 -1 };28786 -1 },28787 -1 './node_modules/es6-symbol/is-symbol.js': function node_modulesEs6SymbolIsSymbolJs(module, exports, __webpack_require__) {28788 -1 'use strict';28789 -1 module.exports = function(value) {28790 -1 if (!value) {28791 -1 return false;-1 48101 } -1 48102 var ownedRoles = getOwnedRoles(virtualNode, required); -1 48103 var missing = missingRequiredChildren(virtualNode, role, required, ownedRoles); -1 48104 if (!missing) { -1 48105 return true; -1 48106 } -1 48107 this.data(missing); -1 48108 if (reviewEmpty.includes(role) && !has_content_virtual_default(virtualNode, false, true) && !ownedRoles.length && (!virtualNode.hasAttr('aria-owns') || !idrefs_default(node, 'aria-owns').length)) { -1 48109 return void 0; -1 48110 } -1 48111 return false; -1 48112 } -1 48113 var aria_required_children_evaluate_default = ariaRequiredChildrenEvaluate; -1 48114 function getMissingContext(virtualNode, ownGroupRoles, reqContext, includeElement) { -1 48115 var explicitRole2 = get_explicit_role_default(virtualNode); -1 48116 if (!reqContext) { -1 48117 reqContext = required_context_default(explicitRole2); -1 48118 } -1 48119 if (!reqContext) { -1 48120 return null; -1 48121 } -1 48122 var vNode = includeElement ? virtualNode : virtualNode.parent; -1 48123 while (vNode) { -1 48124 var parentRole = get_role_default(vNode); -1 48125 if (reqContext.includes('group') && parentRole === 'group') { -1 48126 if (ownGroupRoles.includes(explicitRole2)) { -1 48127 reqContext.push(explicitRole2); -1 48128 } -1 48129 vNode = vNode.parent; -1 48130 continue; 28792 48131 }28793 -1 if (_typeof(value) === 'symbol') {28794 -1 return true;-1 48132 if (reqContext.includes(parentRole)) { -1 48133 return null; -1 48134 } else if (parentRole && ![ 'presentation', 'none' ].includes(parentRole)) { -1 48135 return reqContext; 28795 48136 }28796 -1 if (!value.constructor) {28797 -1 return false;-1 48137 vNode = vNode.parent; -1 48138 } -1 48139 return reqContext; -1 48140 } -1 48141 function getAriaOwners(element) { -1 48142 var owners = [], o = null; -1 48143 while (element) { -1 48144 if (element.getAttribute('id')) { -1 48145 var id = escape_selector_default(element.getAttribute('id')); -1 48146 var doc = get_root_node_default2(element); -1 48147 o = doc.querySelector('[aria-owns~='.concat(id, ']')); -1 48148 if (o) { -1 48149 owners.push(o); -1 48150 } 28798 48151 }28799 -1 if (value.constructor.name !== 'Symbol') {-1 48152 element = element.parentElement; -1 48153 } -1 48154 return owners.length ? owners : null; -1 48155 } -1 48156 function ariaRequiredParentEvaluate(node, options, virtualNode) { -1 48157 var ownGroupRoles = options && Array.isArray(options.ownGroupRoles) ? options.ownGroupRoles : []; -1 48158 var missingParents = getMissingContext(virtualNode, ownGroupRoles); -1 48159 if (!missingParents) { -1 48160 return true; -1 48161 } -1 48162 var owners = getAriaOwners(node); -1 48163 if (owners) { -1 48164 for (var _i18 = 0, l = owners.length; _i18 < l; _i18++) { -1 48165 missingParents = getMissingContext(get_node_from_tree_default(owners[_i18]), ownGroupRoles, missingParents, true); -1 48166 if (!missingParents) { -1 48167 return true; -1 48168 } -1 48169 } -1 48170 } -1 48171 this.data(missingParents); -1 48172 return false; -1 48173 } -1 48174 var aria_required_parent_evaluate_default = ariaRequiredParentEvaluate; -1 48175 function ariaRoledescriptionEvaluate(node) { -1 48176 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 48177 var role = get_role_default(node); -1 48178 var supportedRoles = options.supportedRoles || []; -1 48179 if (supportedRoles.includes(role)) { -1 48180 return true; -1 48181 } -1 48182 if (role && role !== 'presentation' && role !== 'none') { -1 48183 return void 0; -1 48184 } -1 48185 return false; -1 48186 } -1 48187 var aria_roledescription_evaluate_default = ariaRoledescriptionEvaluate; -1 48188 function ariaUnsupportedAttrEvaluate(node, options, virtualNode) { -1 48189 var unsupportedAttrs = virtualNode.attrNames.filter(function(name) { -1 48190 var attribute = standards_default.ariaAttrs[name]; -1 48191 if (!validate_attr_default(name)) { 28800 48192 return false; 28801 48193 }28802 -1 return value[value.constructor.toStringTag] === 'Symbol';28803 -1 };28804 -1 },28805 -1 './node_modules/es6-symbol/lib/private/generate-name.js': function node_modulesEs6SymbolLibPrivateGenerateNameJs(module, exports, __webpack_require__) {28806 -1 'use strict';28807 -1 var d = __webpack_require__('./node_modules/d/index.js');28808 -1 var create = Object.create, defineProperty = Object.defineProperty, objPrototype = Object.prototype;28809 -1 var created = create(null);28810 -1 module.exports = function(desc) {28811 -1 var postfix = 0, name, ie11BugWorkaround;28812 -1 while (created[desc + (postfix || '')]) {28813 -1 ++postfix;-1 48194 var unsupported4 = attribute.unsupported; -1 48195 if (_typeof(unsupported4) !== 'object') { -1 48196 return !!unsupported4; 28814 48197 }28815 -1 desc += postfix || '';28816 -1 created[desc] = true;28817 -1 name = '@@' + desc;28818 -1 defineProperty(objPrototype, name, d.gs(null, function(value) {28819 -1 if (ie11BugWorkaround) {28820 -1 return;-1 48198 return !matches_default3(node, unsupported4.exceptions); -1 48199 }); -1 48200 if (unsupportedAttrs.length) { -1 48201 this.data(unsupportedAttrs); -1 48202 return true; -1 48203 } -1 48204 return false; -1 48205 } -1 48206 var aria_unsupported_attr_evaluate_default = ariaUnsupportedAttrEvaluate; -1 48207 function ariaValidAttrEvaluate(node, options, virtualNode) { -1 48208 options = Array.isArray(options.value) ? options.value : []; -1 48209 var invalid = []; -1 48210 var aria44 = /^aria-/; -1 48211 virtualNode.attrNames.forEach(function(attr) { -1 48212 if (options.indexOf(attr) === -1 && aria44.test(attr) && !validate_attr_default(attr)) { -1 48213 invalid.push(attr); -1 48214 } -1 48215 }); -1 48216 if (invalid.length) { -1 48217 this.data(invalid); -1 48218 return false; -1 48219 } -1 48220 return true; -1 48221 } -1 48222 var aria_valid_attr_evaluate_default = ariaValidAttrEvaluate; -1 48223 function ariaValidAttrValueEvaluate(node, options) { -1 48224 options = Array.isArray(options.value) ? options.value : []; -1 48225 var needsReview = ''; -1 48226 var messageKey = ''; -1 48227 var invalid = []; -1 48228 var aria44 = /^aria-/; -1 48229 var attrs = get_node_attributes_default(node); -1 48230 var skipAttrs = [ 'aria-errormessage' ]; -1 48231 var preChecks = { -1 48232 'aria-controls': function ariaControls() { -1 48233 return node.getAttribute('aria-expanded') !== 'false' && node.getAttribute('aria-selected') !== 'false'; -1 48234 }, -1 48235 'aria-current': function ariaCurrent() { -1 48236 if (!validate_attr_value_default(node, 'aria-current')) { -1 48237 needsReview = 'aria-current="'.concat(node.getAttribute('aria-current'), '"'); -1 48238 messageKey = 'ariaCurrent'; 28821 48239 }28822 -1 ie11BugWorkaround = true;28823 -1 defineProperty(this, name, d(value));28824 -1 ie11BugWorkaround = false;28825 -1 }));28826 -1 return name;-1 48240 return; -1 48241 }, -1 48242 'aria-owns': function ariaOwns() { -1 48243 return node.getAttribute('aria-expanded') !== 'false'; -1 48244 }, -1 48245 'aria-describedby': function ariaDescribedby() { -1 48246 if (!validate_attr_value_default(node, 'aria-describedby')) { -1 48247 needsReview = 'aria-describedby="'.concat(node.getAttribute('aria-describedby'), '"'); -1 48248 messageKey = 'noId'; -1 48249 } -1 48250 return; -1 48251 }, -1 48252 'aria-labelledby': function ariaLabelledby() { -1 48253 if (!validate_attr_value_default(node, 'aria-labelledby')) { -1 48254 needsReview = 'aria-labelledby="'.concat(node.getAttribute('aria-labelledby'), '"'); -1 48255 messageKey = 'noId'; -1 48256 } -1 48257 } 28827 48258 };28828 -1 },28829 -1 './node_modules/es6-symbol/lib/private/setup/standard-symbols.js': function node_modulesEs6SymbolLibPrivateSetupStandardSymbolsJs(module, exports, __webpack_require__) {28830 -1 'use strict';28831 -1 var d = __webpack_require__('./node_modules/d/index.js'), NativeSymbol = __webpack_require__('./node_modules/ext/global-this/index.js').Symbol;28832 -1 module.exports = function(SymbolPolyfill) {28833 -1 return Object.defineProperties(SymbolPolyfill, {28834 -1 hasInstance: d('', NativeSymbol && NativeSymbol.hasInstance || SymbolPolyfill('hasInstance')),28835 -1 isConcatSpreadable: d('', NativeSymbol && NativeSymbol.isConcatSpreadable || SymbolPolyfill('isConcatSpreadable')),28836 -1 iterator: d('', NativeSymbol && NativeSymbol.iterator || SymbolPolyfill('iterator')),28837 -1 match: d('', NativeSymbol && NativeSymbol.match || SymbolPolyfill('match')),28838 -1 replace: d('', NativeSymbol && NativeSymbol.replace || SymbolPolyfill('replace')),28839 -1 search: d('', NativeSymbol && NativeSymbol.search || SymbolPolyfill('search')),28840 -1 species: d('', NativeSymbol && NativeSymbol.species || SymbolPolyfill('species')),28841 -1 split: d('', NativeSymbol && NativeSymbol.split || SymbolPolyfill('split')),28842 -1 toPrimitive: d('', NativeSymbol && NativeSymbol.toPrimitive || SymbolPolyfill('toPrimitive')),28843 -1 toStringTag: d('', NativeSymbol && NativeSymbol.toStringTag || SymbolPolyfill('toStringTag')),28844 -1 unscopables: d('', NativeSymbol && NativeSymbol.unscopables || SymbolPolyfill('unscopables'))-1 48259 for (var _i19 = 0, l = attrs.length; _i19 < l; _i19++) { -1 48260 var attr = attrs[_i19]; -1 48261 var attrName = attr.name; -1 48262 if (!skipAttrs.includes(attrName) && options.indexOf(attrName) === -1 && aria44.test(attrName) && (preChecks[attrName] ? preChecks[attrName]() : true) && !validate_attr_value_default(node, attrName)) { -1 48263 invalid.push(''.concat(attrName, '="').concat(attr.nodeValue, '"')); -1 48264 } -1 48265 } -1 48266 if (needsReview) { -1 48267 this.data({ -1 48268 messageKey: messageKey, -1 48269 needsReview: needsReview 28845 48270 });28846 -1 };28847 -1 },28848 -1 './node_modules/es6-symbol/lib/private/setup/symbol-registry.js': function node_modulesEs6SymbolLibPrivateSetupSymbolRegistryJs(module, exports, __webpack_require__) {28849 -1 'use strict';28850 -1 var d = __webpack_require__('./node_modules/d/index.js'), validateSymbol = __webpack_require__('./node_modules/es6-symbol/validate-symbol.js');28851 -1 var registry = Object.create(null);28852 -1 module.exports = function(SymbolPolyfill) {28853 -1 return Object.defineProperties(SymbolPolyfill, {28854 -1 for: d(function(key) {28855 -1 if (registry[key]) {28856 -1 return registry[key];28857 -1 }28858 -1 return registry[key] = SymbolPolyfill(String(key));28859 -1 }),28860 -1 keyFor: d(function(symbol) {28861 -1 var key;28862 -1 validateSymbol(symbol);28863 -1 for (key in registry) {28864 -1 if (registry[key] === symbol) {28865 -1 return key;28866 -1 }28867 -1 }28868 -1 return undefined;28869 -1 })-1 48271 return void 0; -1 48272 } -1 48273 if (invalid.length) { -1 48274 this.data(invalid); -1 48275 return false; -1 48276 } -1 48277 return true; -1 48278 } -1 48279 var aria_valid_attr_value_evaluate_default = ariaValidAttrValueEvaluate; -1 48280 function fallbackroleEvaluate(node, options, virtualNode) { -1 48281 return token_list_default(virtualNode.attr('role')).length > 1; -1 48282 } -1 48283 var fallbackrole_evaluate_default = fallbackroleEvaluate; -1 48284 function hasGlobalAriaAttributeEvaluate(node, options, virtualNode) { -1 48285 var globalAttrs = get_global_aria_attrs_default().filter(function(attr) { -1 48286 return virtualNode.hasAttr(attr); -1 48287 }); -1 48288 this.data(globalAttrs); -1 48289 return globalAttrs.length > 0; -1 48290 } -1 48291 var has_global_aria_attribute_evaluate_default = hasGlobalAriaAttributeEvaluate; -1 48292 function hasImplicitChromiumRoleMatches(node, virtualNode) { -1 48293 return implicit_role_default(virtualNode, { -1 48294 chromium: true -1 48295 }) !== null; -1 48296 } -1 48297 var has_implicit_chromium_role_matches_default = hasImplicitChromiumRoleMatches; -1 48298 function hasWidgetRoleEvaluate(node) { -1 48299 var role = node.getAttribute('role'); -1 48300 if (role === null) { -1 48301 return false; -1 48302 } -1 48303 var roleType = get_role_type_default(role); -1 48304 return roleType === 'widget' || roleType === 'composite'; -1 48305 } -1 48306 var has_widget_role_evaluate_default = hasWidgetRoleEvaluate; -1 48307 function invalidroleEvaluate(node, options, virtualNode) { -1 48308 var allRoles = token_list_default(virtualNode.attr('role')); -1 48309 var allInvalid = allRoles.every(function(role) { -1 48310 return !is_valid_role_default(role, { -1 48311 allowAbstract: true 28870 48312 });28871 -1 };28872 -1 },28873 -1 './node_modules/es6-symbol/polyfill.js': function node_modulesEs6SymbolPolyfillJs(module, exports, __webpack_require__) {28874 -1 'use strict';28875 -1 var d = __webpack_require__('./node_modules/d/index.js'), validateSymbol = __webpack_require__('./node_modules/es6-symbol/validate-symbol.js'), NativeSymbol = __webpack_require__('./node_modules/ext/global-this/index.js').Symbol, generateName = __webpack_require__('./node_modules/es6-symbol/lib/private/generate-name.js'), setupStandardSymbols = __webpack_require__('./node_modules/es6-symbol/lib/private/setup/standard-symbols.js'), setupSymbolRegistry = __webpack_require__('./node_modules/es6-symbol/lib/private/setup/symbol-registry.js');28876 -1 var create = Object.create, defineProperties = Object.defineProperties, defineProperty = Object.defineProperty;28877 -1 var SymbolPolyfill, HiddenSymbol, isNativeSafe;28878 -1 if (typeof NativeSymbol === 'function') {28879 -1 try {28880 -1 String(NativeSymbol());28881 -1 isNativeSafe = true;28882 -1 } catch (ignore) {}28883 -1 } else {28884 -1 NativeSymbol = null;-1 48313 }); -1 48314 if (allInvalid) { -1 48315 this.data(allRoles); -1 48316 return true; 28885 48317 }28886 -1 HiddenSymbol = function _Symbol3(description) {28887 -1 if (this instanceof HiddenSymbol) {28888 -1 throw new TypeError('Symbol is not a constructor');28889 -1 }28890 -1 return SymbolPolyfill(description);28891 -1 };28892 -1 module.exports = SymbolPolyfill = function _Symbol4(description) {28893 -1 var symbol;28894 -1 if (this instanceof _Symbol4) {28895 -1 throw new TypeError('Symbol is not a constructor');-1 48318 return false; -1 48319 } -1 48320 var invalidrole_evaluate_default = invalidroleEvaluate; -1 48321 function isElementFocusableEvaluate(node, options, virtualNode) { -1 48322 return is_focusable_default(virtualNode); -1 48323 } -1 48324 var is_element_focusable_evaluate_default = isElementFocusableEvaluate; -1 48325 function noImplicitExplicitLabelEvaluate(node, options, virtualNode) { -1 48326 var role = get_role_default(virtualNode, { -1 48327 noImplicit: true -1 48328 }); -1 48329 this.data(role); -1 48330 var label5; -1 48331 var accText; -1 48332 try { -1 48333 label5 = sanitize_default(label_text_default(virtualNode)).toLowerCase(); -1 48334 accText = sanitize_default(accessible_text_virtual_default(virtualNode)).toLowerCase(); -1 48335 } catch (e) { -1 48336 return void 0; -1 48337 } -1 48338 if (!accText && !label5) { -1 48339 return false; -1 48340 } -1 48341 if (!accText && label5) { -1 48342 return void 0; -1 48343 } -1 48344 if (!accText.includes(label5)) { -1 48345 return void 0; -1 48346 } -1 48347 return false; -1 48348 } -1 48349 var no_implicit_explicit_label_evaluate_default = noImplicitExplicitLabelEvaluate; -1 48350 function unsupportedroleEvaluate(node, options, virtualNode) { -1 48351 return is_unsupported_role_default(get_role_default(virtualNode)); -1 48352 } -1 48353 var unsupportedrole_evaluate_default = unsupportedroleEvaluate; -1 48354 var VALID_TAG_NAMES_FOR_SCROLLABLE_REGIONS = { -1 48355 ARTICLE: true, -1 48356 ASIDE: true, -1 48357 NAV: true, -1 48358 SECTION: true -1 48359 }; -1 48360 var VALID_ROLES_FOR_SCROLLABLE_REGIONS = { -1 48361 application: true, -1 48362 banner: false, -1 48363 complementary: true, -1 48364 contentinfo: true, -1 48365 form: true, -1 48366 main: true, -1 48367 navigation: true, -1 48368 region: true, -1 48369 search: false -1 48370 }; -1 48371 function validScrollableTagName(node) { -1 48372 var nodeName2 = node.nodeName.toUpperCase(); -1 48373 return VALID_TAG_NAMES_FOR_SCROLLABLE_REGIONS[nodeName2] || false; -1 48374 } -1 48375 function validScrollableRole(node, options) { -1 48376 var role = get_explicit_role_default(node); -1 48377 if (!role) { -1 48378 return false; -1 48379 } -1 48380 return VALID_ROLES_FOR_SCROLLABLE_REGIONS[role] || options.roles.includes(role) || false; -1 48381 } -1 48382 function validScrollableSemanticsEvaluate(node, options) { -1 48383 return validScrollableRole(node, options) || validScrollableTagName(node); -1 48384 } -1 48385 var valid_scrollable_semantics_evaluate_default = validScrollableSemanticsEvaluate; -1 48386 var table_exports = {}; -1 48387 __export(table_exports, { -1 48388 getAllCells: function getAllCells() { -1 48389 return get_all_cells_default; -1 48390 }, -1 48391 getCellPosition: function getCellPosition() { -1 48392 return get_cell_position_default; -1 48393 }, -1 48394 getHeaders: function getHeaders() { -1 48395 return get_headers_default; -1 48396 }, -1 48397 getScope: function getScope() { -1 48398 return get_scope_default; -1 48399 }, -1 48400 isColumnHeader: function isColumnHeader() { -1 48401 return is_column_header_default; -1 48402 }, -1 48403 isDataCell: function isDataCell() { -1 48404 return is_data_cell_default; -1 48405 }, -1 48406 isDataTable: function isDataTable() { -1 48407 return is_data_table_default; -1 48408 }, -1 48409 isHeader: function isHeader() { -1 48410 return is_header_default; -1 48411 }, -1 48412 isRowHeader: function isRowHeader() { -1 48413 return is_row_header_default; -1 48414 }, -1 48415 toArray: function toArray() { -1 48416 return to_grid_default; -1 48417 }, -1 48418 toGrid: function toGrid() { -1 48419 return to_grid_default; -1 48420 }, -1 48421 traverse: function traverse() { -1 48422 return traverse_default; -1 48423 } -1 48424 }); -1 48425 function getAllCells(tableElm) { -1 48426 var rowIndex, cellIndex, rowLength, cellLength; -1 48427 var cells = []; -1 48428 for (rowIndex = 0, rowLength = tableElm.rows.length; rowIndex < rowLength; rowIndex++) { -1 48429 for (cellIndex = 0, cellLength = tableElm.rows[rowIndex].cells.length; cellIndex < cellLength; cellIndex++) { -1 48430 cells.push(tableElm.rows[rowIndex].cells[cellIndex]); 28896 48431 }28897 -1 if (isNativeSafe) {28898 -1 return NativeSymbol(description);-1 48432 } -1 48433 return cells; -1 48434 } -1 48435 var get_all_cells_default = getAllCells; -1 48436 function traverseForHeaders(headerType, position, tableGrid) { -1 48437 var property = headerType === 'row' ? '_rowHeaders' : '_colHeaders'; -1 48438 var predicate = headerType === 'row' ? is_row_header_default : is_column_header_default; -1 48439 var startCell = tableGrid[position.y][position.x]; -1 48440 var colspan = startCell.colSpan - 1; -1 48441 var rowspanAttr = startCell.getAttribute('rowspan'); -1 48442 var rowspanValue = parseInt(rowspanAttr) === 0 || startCell.rowspan === 0 ? tableGrid.length : startCell.rowSpan; -1 48443 var rowspan = rowspanValue - 1; -1 48444 var rowStart = position.y + rowspan; -1 48445 var colStart = position.x + colspan; -1 48446 var rowEnd = headerType === 'row' ? position.y : 0; -1 48447 var colEnd = headerType === 'row' ? 0 : position.x; -1 48448 var headers; -1 48449 var cells = []; -1 48450 for (var row = rowStart; row >= rowEnd && !headers; row--) { -1 48451 for (var col = colStart; col >= colEnd; col--) { -1 48452 var cell = tableGrid[row] ? tableGrid[row][col] : void 0; -1 48453 if (!cell) { -1 48454 continue; -1 48455 } -1 48456 var vNode = axe.utils.getNodeFromTree(cell); -1 48457 if (vNode[property]) { -1 48458 headers = vNode[property]; -1 48459 break; -1 48460 } -1 48461 cells.push(cell); 28899 48462 }28900 -1 symbol = create(HiddenSymbol.prototype);28901 -1 description = description === undefined ? '' : String(description);28902 -1 return defineProperties(symbol, {28903 -1 __description__: d('', description),28904 -1 __name__: d('', generateName(description))28905 -1 });28906 -1 };28907 -1 setupStandardSymbols(SymbolPolyfill);28908 -1 setupSymbolRegistry(SymbolPolyfill);28909 -1 defineProperties(HiddenSymbol.prototype, {28910 -1 constructor: d(SymbolPolyfill),28911 -1 toString: d('', function() {28912 -1 return this.__name__;28913 -1 })28914 -1 });28915 -1 defineProperties(SymbolPolyfill.prototype, {28916 -1 toString: d(function() {28917 -1 return 'Symbol (' + validateSymbol(this).__description__ + ')';28918 -1 }),28919 -1 valueOf: d(function() {28920 -1 return validateSymbol(this);28921 -1 })-1 48463 } -1 48464 headers = (headers || []).concat(cells.filter(predicate)); -1 48465 cells.forEach(function(tableCell) { -1 48466 var vNode = axe.utils.getNodeFromTree(tableCell); -1 48467 vNode[property] = headers; 28922 48468 });28923 -1 defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('', function() {28924 -1 var symbol = validateSymbol(this);28925 -1 if (_typeof(symbol) === 'symbol') {28926 -1 return symbol;-1 48469 return headers; -1 48470 } -1 48471 function getHeaders(cell, tableGrid) { -1 48472 if (cell.getAttribute('headers')) { -1 48473 var headers = idrefs_default(cell, 'headers'); -1 48474 if (headers.filter(function(header) { -1 48475 return header; -1 48476 }).length) { -1 48477 return headers; -1 48478 } -1 48479 } -1 48480 if (!tableGrid) { -1 48481 tableGrid = to_grid_default(find_up_default(cell, 'table')); -1 48482 } -1 48483 var position = get_cell_position_default(cell, tableGrid); -1 48484 var rowHeaders = traverseForHeaders('row', position, tableGrid); -1 48485 var colHeaders = traverseForHeaders('col', position, tableGrid); -1 48486 return [].concat(rowHeaders, colHeaders).reverse(); -1 48487 } -1 48488 var get_headers_default = getHeaders; -1 48489 function isDataCell(cell) { -1 48490 if (!cell.children.length && !cell.textContent.trim()) { -1 48491 return false; -1 48492 } -1 48493 var role = cell.getAttribute('role'); -1 48494 if (is_valid_role_default(role)) { -1 48495 return [ 'cell', 'gridcell' ].includes(role); -1 48496 } else { -1 48497 return cell.nodeName.toUpperCase() === 'TD'; -1 48498 } -1 48499 } -1 48500 var is_data_cell_default = isDataCell; -1 48501 function isDataTable(node) { -1 48502 var role = (node.getAttribute('role') || '').toLowerCase(); -1 48503 if ((role === 'presentation' || role === 'none') && !is_focusable_default(node)) { -1 48504 return false; -1 48505 } -1 48506 if (node.getAttribute('contenteditable') === 'true' || find_up_default(node, '[contenteditable="true"]')) { -1 48507 return true; -1 48508 } -1 48509 if (role === 'grid' || role === 'treegrid' || role === 'table') { -1 48510 return true; -1 48511 } -1 48512 if (get_role_type_default(role) === 'landmark') { -1 48513 return true; -1 48514 } -1 48515 if (node.getAttribute('datatable') === '0') { -1 48516 return false; -1 48517 } -1 48518 if (node.getAttribute('summary')) { -1 48519 return true; -1 48520 } -1 48521 if (node.tHead || node.tFoot || node.caption) { -1 48522 return true; -1 48523 } -1 48524 for (var childIndex = 0, childLength = node.children.length; childIndex < childLength; childIndex++) { -1 48525 if (node.children[childIndex].nodeName.toUpperCase() === 'COLGROUP') { -1 48526 return true; 28927 48527 }28928 -1 return symbol.toString();28929 -1 }));28930 -1 defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol'));28931 -1 defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));28932 -1 defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));28933 -1 },28934 -1 './node_modules/es6-symbol/validate-symbol.js': function node_modulesEs6SymbolValidateSymbolJs(module, exports, __webpack_require__) {28935 -1 'use strict';28936 -1 var isSymbol = __webpack_require__('./node_modules/es6-symbol/is-symbol.js');28937 -1 module.exports = function(value) {28938 -1 if (!isSymbol(value)) {28939 -1 throw new TypeError(value + ' is not a symbol');-1 48528 } -1 48529 var cells = 0; -1 48530 var rowLength = node.rows.length; -1 48531 var row, cell; -1 48532 var hasBorder = false; -1 48533 for (var rowIndex = 0; rowIndex < rowLength; rowIndex++) { -1 48534 row = node.rows[rowIndex]; -1 48535 for (var cellIndex = 0, cellLength = row.cells.length; cellIndex < cellLength; cellIndex++) { -1 48536 cell = row.cells[cellIndex]; -1 48537 if (cell.nodeName.toUpperCase() === 'TH') { -1 48538 return true; -1 48539 } -1 48540 if (!hasBorder && (cell.offsetWidth !== cell.clientWidth || cell.offsetHeight !== cell.clientHeight)) { -1 48541 hasBorder = true; -1 48542 } -1 48543 if (cell.getAttribute('scope') || cell.getAttribute('headers') || cell.getAttribute('abbr')) { -1 48544 return true; -1 48545 } -1 48546 if ([ 'columnheader', 'rowheader' ].includes((cell.getAttribute('role') || '').toLowerCase())) { -1 48547 return true; -1 48548 } -1 48549 if (cell.children.length === 1 && cell.children[0].nodeName.toUpperCase() === 'ABBR') { -1 48550 return true; -1 48551 } -1 48552 cells++; 28940 48553 }28941 -1 return value;28942 -1 };28943 -1 },28944 -1 './node_modules/event-emitter/index.js': function node_modulesEventEmitterIndexJs(module, exports, __webpack_require__) {28945 -1 'use strict';28946 -1 var d = __webpack_require__('./node_modules/d/index.js'), callable = __webpack_require__('./node_modules/es5-ext/object/valid-callable.js'), apply = Function.prototype.apply, call = Function.prototype.call, create = Object.create, defineProperty = Object.defineProperty, defineProperties = Object.defineProperties, hasOwnProperty = Object.prototype.hasOwnProperty, descriptor = {28947 -1 configurable: true,28948 -1 enumerable: false,28949 -1 writable: true28950 -1 }, on, _once2, off, emit, methods, descriptors, base;28951 -1 on = function on(type, listener) {28952 -1 var data;28953 -1 callable(listener);28954 -1 if (!hasOwnProperty.call(this, '__ee__')) {28955 -1 data = descriptor.value = create(null);28956 -1 defineProperty(this, '__ee__', descriptor);28957 -1 descriptor.value = null;-1 48554 } -1 48555 if (node.getElementsByTagName('table').length) { -1 48556 return false; -1 48557 } -1 48558 if (rowLength < 2) { -1 48559 return false; -1 48560 } -1 48561 var sampleRow = node.rows[Math.ceil(rowLength / 2)]; -1 48562 if (sampleRow.cells.length === 1 && sampleRow.cells[0].colSpan === 1) { -1 48563 return false; -1 48564 } -1 48565 if (sampleRow.cells.length >= 5) { -1 48566 return true; -1 48567 } -1 48568 if (hasBorder) { -1 48569 return true; -1 48570 } -1 48571 var bgColor, bgImage; -1 48572 for (rowIndex = 0; rowIndex < rowLength; rowIndex++) { -1 48573 row = node.rows[rowIndex]; -1 48574 if (bgColor && bgColor !== window.getComputedStyle(row).getPropertyValue('background-color')) { -1 48575 return true; 28958 48576 } else {28959 -1 data = this.__ee__;-1 48577 bgColor = window.getComputedStyle(row).getPropertyValue('background-color'); 28960 48578 }28961 -1 if (!data[type]) {28962 -1 data[type] = listener;28963 -1 } else if (_typeof(data[type]) === 'object') {28964 -1 data[type].push(listener);-1 48579 if (bgImage && bgImage !== window.getComputedStyle(row).getPropertyValue('background-image')) { -1 48580 return true; 28965 48581 } else {28966 -1 data[type] = [ data[type], listener ];-1 48582 bgImage = window.getComputedStyle(row).getPropertyValue('background-image'); 28967 48583 }28968 -1 return this;28969 -1 };28970 -1 _once2 = function once(type, listener) {28971 -1 var _once, self;28972 -1 callable(listener);28973 -1 self = this;28974 -1 on.call(this, type, _once = function once() {28975 -1 off.call(self, type, _once);28976 -1 apply.call(listener, this, arguments);28977 -1 });28978 -1 _once.__eeOnceListener__ = listener;28979 -1 return this;28980 -1 };28981 -1 off = function off(type, listener) {28982 -1 var data, listeners, candidate, i;28983 -1 callable(listener);28984 -1 if (!hasOwnProperty.call(this, '__ee__')) {28985 -1 return this;-1 48584 } -1 48585 if (rowLength >= 20) { -1 48586 return true; -1 48587 } -1 48588 if (get_element_coordinates_default(node).width > get_viewport_size_default(window).width * .95) { -1 48589 return false; -1 48590 } -1 48591 if (cells < 10) { -1 48592 return false; -1 48593 } -1 48594 if (node.querySelector('object, embed, iframe, applet')) { -1 48595 return false; -1 48596 } -1 48597 return true; -1 48598 } -1 48599 var is_data_table_default = isDataTable; -1 48600 function isHeader(cell) { -1 48601 if (is_column_header_default(cell) || is_row_header_default(cell)) { -1 48602 return true; -1 48603 } -1 48604 if (cell.getAttribute('id')) { -1 48605 var id = escape_selector_default(cell.getAttribute('id')); -1 48606 return !!document.querySelector('[headers~="'.concat(id, '"]')); -1 48607 } -1 48608 return false; -1 48609 } -1 48610 var is_header_default = isHeader; -1 48611 function traverseTable(dir, position, tableGrid, callback) { -1 48612 var result; -1 48613 var cell = tableGrid[position.y] ? tableGrid[position.y][position.x] : void 0; -1 48614 if (!cell) { -1 48615 return []; -1 48616 } -1 48617 if (typeof callback === 'function') { -1 48618 result = callback(cell, position, tableGrid); -1 48619 if (result === true) { -1 48620 return [ cell ]; 28986 48621 }28987 -1 data = this.__ee__;28988 -1 if (!data[type]) {28989 -1 return this;-1 48622 } -1 48623 result = traverseTable(dir, { -1 48624 x: position.x + dir.x, -1 48625 y: position.y + dir.y -1 48626 }, tableGrid, callback); -1 48627 result.unshift(cell); -1 48628 return result; -1 48629 } -1 48630 function traverse(dir, startPos, tableGrid, callback) { -1 48631 if (Array.isArray(startPos)) { -1 48632 callback = tableGrid; -1 48633 tableGrid = startPos; -1 48634 startPos = { -1 48635 x: 0, -1 48636 y: 0 -1 48637 }; -1 48638 } -1 48639 if (typeof dir === 'string') { -1 48640 switch (dir) { -1 48641 case 'left': -1 48642 dir = { -1 48643 x: -1, -1 48644 y: 0 -1 48645 }; -1 48646 break; -1 48647 -1 48648 case 'up': -1 48649 dir = { -1 48650 x: 0, -1 48651 y: -1 -1 48652 }; -1 48653 break; -1 48654 -1 48655 case 'right': -1 48656 dir = { -1 48657 x: 1, -1 48658 y: 0 -1 48659 }; -1 48660 break; -1 48661 -1 48662 case 'down': -1 48663 dir = { -1 48664 x: 0, -1 48665 y: 1 -1 48666 }; -1 48667 break; 28990 48668 }28991 -1 listeners = data[type];28992 -1 if (_typeof(listeners) === 'object') {28993 -1 for (i = 0; candidate = listeners[i]; ++i) {28994 -1 if (candidate === listener || candidate.__eeOnceListener__ === listener) {28995 -1 if (listeners.length === 2) {28996 -1 data[type] = listeners[i ? 0 : 1];28997 -1 } else {28998 -1 listeners.splice(i, 1);28999 -1 }29000 -1 }29001 -1 }29002 -1 } else {29003 -1 if (listeners === listener || listeners.__eeOnceListener__ === listener) {29004 -1 delete data[type];-1 48669 } -1 48670 return traverseTable(dir, { -1 48671 x: startPos.x + dir.x, -1 48672 y: startPos.y + dir.y -1 48673 }, tableGrid, callback); -1 48674 } -1 48675 var traverse_default = traverse; -1 48676 function captionFakedEvaluate(node) { -1 48677 var table5 = to_grid_default(node); -1 48678 var firstRow = table5[0]; -1 48679 if (table5.length <= 1 || firstRow.length <= 1 || node.rows.length <= 1) { -1 48680 return true; -1 48681 } -1 48682 return firstRow.reduce(function(out, curr, i) { -1 48683 return out || curr !== firstRow[i + 1] && firstRow[i + 1] !== void 0; -1 48684 }, false); -1 48685 } -1 48686 var caption_faked_evaluate_default = captionFakedEvaluate; -1 48687 function html5ScopeEvaluate(node) { -1 48688 if (!is_html5_default(document)) { -1 48689 return true; -1 48690 } -1 48691 return node.nodeName.toUpperCase() === 'TH'; -1 48692 } -1 48693 var html5_scope_evaluate_default = html5ScopeEvaluate; -1 48694 function sameCaptionSummaryEvaluate(node) { -1 48695 return !!(node.summary && node.caption) && node.summary.toLowerCase() === accessible_text_default(node.caption).toLowerCase(); -1 48696 } -1 48697 var same_caption_summary_evaluate_default = sameCaptionSummaryEvaluate; -1 48698 function scopeValueEvaluate(node, options) { -1 48699 var value = node.getAttribute('scope').toLowerCase(); -1 48700 return options.values.indexOf(value) !== -1; -1 48701 } -1 48702 var scope_value_evaluate_default = scopeValueEvaluate; -1 48703 function tdHasHeaderEvaluate(node) { -1 48704 var badCells = []; -1 48705 var cells = get_all_cells_default(node); -1 48706 var tableGrid = to_grid_default(node); -1 48707 cells.forEach(function(cell) { -1 48708 if (has_content_default(cell) && is_data_cell_default(cell) && !label_default2(cell)) { -1 48709 var hasHeaders = get_headers_default(cell, tableGrid).some(function(header) { -1 48710 return header !== null && !!has_content_default(header); -1 48711 }); -1 48712 if (!hasHeaders) { -1 48713 badCells.push(cell); 29005 48714 } 29006 48715 }29007 -1 return this;29008 -1 };29009 -1 emit = function emit(type) {29010 -1 var i, l, listener, listeners, args;29011 -1 if (!hasOwnProperty.call(this, '__ee__')) {-1 48716 }); -1 48717 if (badCells.length) { -1 48718 this.relatedNodes(badCells); -1 48719 return false; -1 48720 } -1 48721 return true; -1 48722 } -1 48723 var td_has_header_evaluate_default = tdHasHeaderEvaluate; -1 48724 function tdHeadersAttrEvaluate(node) { -1 48725 var cells = []; -1 48726 var reviewCells = []; -1 48727 var badCells = []; -1 48728 for (var rowIndex = 0; rowIndex < node.rows.length; rowIndex++) { -1 48729 var row = node.rows[rowIndex]; -1 48730 for (var cellIndex = 0; cellIndex < row.cells.length; cellIndex++) { -1 48731 cells.push(row.cells[cellIndex]); -1 48732 } -1 48733 } -1 48734 var ids = cells.reduce(function(ids2, cell) { -1 48735 if (cell.getAttribute('id')) { -1 48736 ids2.push(cell.getAttribute('id')); -1 48737 } -1 48738 return ids2; -1 48739 }, []); -1 48740 cells.forEach(function(cell) { -1 48741 var isSelf = false; -1 48742 var notOfTable = false; -1 48743 if (!cell.hasAttribute('headers')) { 29012 48744 return; 29013 48745 }29014 -1 listeners = this.__ee__[type];29015 -1 if (!listeners) {29016 -1 return;-1 48746 var headersAttr = cell.getAttribute('headers').trim(); -1 48747 if (!headersAttr) { -1 48748 return reviewCells.push(cell); 29017 48749 }29018 -1 if (_typeof(listeners) === 'object') {29019 -1 l = arguments.length;29020 -1 args = new Array(l - 1);29021 -1 for (i = 1; i < l; ++i) {29022 -1 args[i - 1] = arguments[i];-1 48750 var headers = token_list_default(headersAttr); -1 48751 if (headers.length !== 0) { -1 48752 if (cell.getAttribute('id')) { -1 48753 isSelf = headers.indexOf(cell.getAttribute('id').trim()) !== -1; 29023 48754 }29024 -1 listeners = listeners.slice();29025 -1 for (i = 0; listener = listeners[i]; ++i) {29026 -1 apply.call(listener, this, args);-1 48755 notOfTable = headers.some(function(header) { -1 48756 return !ids.includes(header); -1 48757 }); -1 48758 if (isSelf || notOfTable) { -1 48759 badCells.push(cell); 29027 48760 }29028 -1 } else {29029 -1 switch (arguments.length) {29030 -1 case 1:29031 -1 call.call(listeners, this);29032 -1 break;29033 -129034 -1 case 2:29035 -1 call.call(listeners, this, arguments[1]);29036 -1 break;29037 -129038 -1 case 3:29039 -1 call.call(listeners, this, arguments[1], arguments[2]);29040 -1 break;29041 -129042 -1 default:29043 -1 l = arguments.length;29044 -1 args = new Array(l - 1);29045 -1 for (i = 1; i < l; ++i) {29046 -1 args[i - 1] = arguments[i];29047 -1 }29048 -1 apply.call(listeners, this, args);-1 48761 } -1 48762 }); -1 48763 if (badCells.length > 0) { -1 48764 this.relatedNodes(badCells); -1 48765 return false; -1 48766 } -1 48767 if (reviewCells.length) { -1 48768 this.relatedNodes(reviewCells); -1 48769 return void 0; -1 48770 } -1 48771 return true; -1 48772 } -1 48773 var td_headers_attr_evaluate_default = tdHeadersAttrEvaluate; -1 48774 function thHasDataCellsEvaluate(node) { -1 48775 var cells = get_all_cells_default(node); -1 48776 var checkResult = this; -1 48777 var reffedHeaders = []; -1 48778 cells.forEach(function(cell) { -1 48779 var headers2 = cell.getAttribute('headers'); -1 48780 if (headers2) { -1 48781 reffedHeaders = reffedHeaders.concat(headers2.split(/\s+/)); -1 48782 } -1 48783 var ariaLabel = cell.getAttribute('aria-labelledby'); -1 48784 if (ariaLabel) { -1 48785 reffedHeaders = reffedHeaders.concat(ariaLabel.split(/\s+/)); -1 48786 } -1 48787 }); -1 48788 var headers = cells.filter(function(cell) { -1 48789 if (sanitize_default(cell.textContent) === '') { -1 48790 return false; -1 48791 } -1 48792 return cell.nodeName.toUpperCase() === 'TH' || [ 'rowheader', 'columnheader' ].indexOf(cell.getAttribute('role')) !== -1; -1 48793 }); -1 48794 var tableGrid = to_grid_default(node); -1 48795 var out = true; -1 48796 headers.forEach(function(header) { -1 48797 if (header.getAttribute('id') && reffedHeaders.includes(header.getAttribute('id'))) { -1 48798 return; -1 48799 } -1 48800 var pos = get_cell_position_default(header, tableGrid); -1 48801 var hasCell = false; -1 48802 if (is_column_header_default(header)) { -1 48803 hasCell = traverse_default('down', pos, tableGrid).find(function(cell) { -1 48804 return !is_column_header_default(cell) && get_headers_default(cell, tableGrid).includes(header); -1 48805 }); -1 48806 } -1 48807 if (!hasCell && is_row_header_default(header)) { -1 48808 hasCell = traverse_default('right', pos, tableGrid).find(function(cell) { -1 48809 return !is_row_header_default(cell) && get_headers_default(cell, tableGrid).includes(header); -1 48810 }); -1 48811 } -1 48812 if (!hasCell) { -1 48813 checkResult.relatedNodes(header); -1 48814 } -1 48815 out = out && hasCell; -1 48816 }); -1 48817 return out ? true : void 0; -1 48818 } -1 48819 var th_has_data_cells_evaluate_default = thHasDataCellsEvaluate; -1 48820 function hiddenContentEvaluate(node, options, virtualNode) { -1 48821 var allowlist = [ 'SCRIPT', 'HEAD', 'TITLE', 'NOSCRIPT', 'STYLE', 'TEMPLATE' ]; -1 48822 if (!allowlist.includes(node.nodeName.toUpperCase()) && has_content_virtual_default(virtualNode)) { -1 48823 var styles = window.getComputedStyle(node); -1 48824 if (styles.getPropertyValue('display') === 'none') { -1 48825 return void 0; -1 48826 } else if (styles.getPropertyValue('visibility') === 'hidden') { -1 48827 var parent = get_composed_parent_default(node); -1 48828 var parentStyle = parent && window.getComputedStyle(parent); -1 48829 if (!parentStyle || parentStyle.getPropertyValue('visibility') !== 'hidden') { -1 48830 return void 0; 29049 48831 } 29050 48832 } -1 48833 } -1 48834 return true; -1 48835 } -1 48836 var hidden_content_evaluate_default = hiddenContentEvaluate; -1 48837 var color_exports = {}; -1 48838 __export(color_exports, { -1 48839 Color: function Color() { -1 48840 return color_default; -1 48841 }, -1 48842 centerPointOfRect: function centerPointOfRect() { -1 48843 return center_point_of_rect_default; -1 48844 }, -1 48845 elementHasImage: function elementHasImage() { -1 48846 return element_has_image_default; -1 48847 }, -1 48848 elementIsDistinct: function elementIsDistinct() { -1 48849 return element_is_distinct_default; -1 48850 }, -1 48851 filteredRectStack: function filteredRectStack() { -1 48852 return filtered_rect_stack_default; -1 48853 }, -1 48854 flattenColors: function flattenColors() { -1 48855 return flatten_colors_default; -1 48856 }, -1 48857 getBackgroundColor: function getBackgroundColor() { -1 48858 return get_background_color_default; -1 48859 }, -1 48860 getBackgroundStack: function getBackgroundStack() { -1 48861 return get_background_stack_default; -1 48862 }, -1 48863 getContrast: function getContrast() { -1 48864 return get_contrast_default; -1 48865 }, -1 48866 getForegroundColor: function getForegroundColor() { -1 48867 return get_foreground_color_default; -1 48868 }, -1 48869 getOwnBackgroundColor: function getOwnBackgroundColor() { -1 48870 return get_own_background_color_default; -1 48871 }, -1 48872 getRectStack: function getRectStack() { -1 48873 return get_rect_stack_default; -1 48874 }, -1 48875 getTextShadowColors: function getTextShadowColors() { -1 48876 return get_text_shadow_colors_default; -1 48877 }, -1 48878 hasValidContrastRatio: function hasValidContrastRatio() { -1 48879 return has_valid_contrast_ratio_default; -1 48880 }, -1 48881 incompleteData: function incompleteData() { -1 48882 return incomplete_data_default; -1 48883 } -1 48884 }); -1 48885 function centerPointOfRect(rect) { -1 48886 if (rect.left > window.innerWidth) { -1 48887 return void 0; -1 48888 } -1 48889 if (rect.top > window.innerHeight) { -1 48890 return void 0; -1 48891 } -1 48892 var x = Math.min(Math.ceil(rect.left + rect.width / 2), window.innerWidth - 1); -1 48893 var y = Math.min(Math.ceil(rect.top + rect.height / 2), window.innerHeight - 1); -1 48894 return { -1 48895 x: x, -1 48896 y: y 29051 48897 };29052 -1 methods = {29053 -1 on: on,29054 -1 once: _once2,29055 -1 off: off,29056 -1 emit: emit29057 -1 };29058 -1 descriptors = {29059 -1 on: d(on),29060 -1 once: d(_once2),29061 -1 off: d(off),29062 -1 emit: d(emit)29063 -1 };29064 -1 base = defineProperties({}, descriptors);29065 -1 module.exports = exports = function exports(o) {29066 -1 return o == null ? create(base) : defineProperties(Object(o), descriptors);29067 -1 };29068 -1 exports.methods = methods;29069 -1 },29070 -1 './node_modules/ext/global-this/implementation.js': function node_modulesExtGlobalThisImplementationJs(module, exports) {29071 -1 var naiveFallback = function naiveFallback() {29072 -1 if ((typeof self === 'undefined' ? 'undefined' : _typeof(self)) === 'object' && self) {29073 -1 return self;-1 48898 } -1 48899 var center_point_of_rect_default = centerPointOfRect; -1 48900 function _getFonts(style) { -1 48901 return style.getPropertyValue('font-family').split(/[,;]/g).map(function(font) { -1 48902 return font.trim().toLowerCase(); -1 48903 }); -1 48904 } -1 48905 function elementIsDistinct(node, ancestorNode) { -1 48906 var nodeStyle = window.getComputedStyle(node); -1 48907 if (nodeStyle.getPropertyValue('background-image') !== 'none') { -1 48908 return true; -1 48909 } -1 48910 var hasBorder = [ 'border-bottom', 'border-top', 'outline' ].reduce(function(result, edge) { -1 48911 var borderClr = new color_default(); -1 48912 borderClr.parseString(nodeStyle.getPropertyValue(edge + '-color')); -1 48913 return result || nodeStyle.getPropertyValue(edge + '-style') !== 'none' && parseFloat(nodeStyle.getPropertyValue(edge + '-width')) > 0 && borderClr.alpha !== 0; -1 48914 }, false); -1 48915 if (hasBorder) { -1 48916 return true; -1 48917 } -1 48918 var parentStyle = window.getComputedStyle(ancestorNode); -1 48919 if (_getFonts(nodeStyle)[0] !== _getFonts(parentStyle)[0]) { -1 48920 return true; -1 48921 } -1 48922 var hasStyle = [ 'text-decoration-line', 'text-decoration-style', 'font-weight', 'font-style', 'font-size' ].reduce(function(result, cssProp) { -1 48923 return result || nodeStyle.getPropertyValue(cssProp) !== parentStyle.getPropertyValue(cssProp); -1 48924 }, false); -1 48925 var tDec = nodeStyle.getPropertyValue('text-decoration'); -1 48926 if (tDec.split(' ').length < 3) { -1 48927 hasStyle = hasStyle || tDec !== parentStyle.getPropertyValue('text-decoration'); -1 48928 } -1 48929 return hasStyle; -1 48930 } -1 48931 var element_is_distinct_default = elementIsDistinct; -1 48932 function getRectStack2(elm) { -1 48933 var boundingStack = get_element_stack_default(elm); -1 48934 var filteredArr = get_text_element_stack_default(elm); -1 48935 if (!filteredArr || filteredArr.length <= 1) { -1 48936 return [ boundingStack ]; -1 48937 } -1 48938 if (filteredArr.some(function(stack) { -1 48939 return stack === void 0; -1 48940 })) { -1 48941 return null; -1 48942 } -1 48943 filteredArr.splice(0, 0, boundingStack); -1 48944 return filteredArr; -1 48945 } -1 48946 var get_rect_stack_default = getRectStack2; -1 48947 function filteredRectStack(elm) { -1 48948 var rectStack = get_rect_stack_default(elm); -1 48949 if (rectStack && rectStack.length === 1) { -1 48950 return rectStack[0]; -1 48951 } -1 48952 if (rectStack && rectStack.length > 1) { -1 48953 var boundingStack = rectStack.shift(); -1 48954 var isSame; -1 48955 rectStack.forEach(function(rectList, index) { -1 48956 if (index === 0) { -1 48957 return; -1 48958 } -1 48959 var rectA = rectStack[index - 1], rectB = rectStack[index]; -1 48960 isSame = rectA.every(function(element, elementIndex) { -1 48961 return element === rectB[elementIndex]; -1 48962 }) || boundingStack.includes(elm); -1 48963 }); -1 48964 if (!isSame) { -1 48965 incomplete_data_default.set('bgColor', 'elmPartiallyObscuring'); -1 48966 return null; 29074 48967 }29075 -1 if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window) {29076 -1 return window;-1 48968 return rectStack[0]; -1 48969 } -1 48970 incomplete_data_default.set('bgColor', 'outsideViewport'); -1 48971 return null; -1 48972 } -1 48973 var filtered_rect_stack_default = filteredRectStack; -1 48974 function flattenColors(fgColor, bgColor) { -1 48975 var alpha = fgColor.alpha; -1 48976 var r = (1 - alpha) * bgColor.red + alpha * fgColor.red; -1 48977 var g = (1 - alpha) * bgColor.green + alpha * fgColor.green; -1 48978 var b = (1 - alpha) * bgColor.blue + alpha * fgColor.blue; -1 48979 var a = fgColor.alpha + bgColor.alpha * (1 - fgColor.alpha); -1 48980 return new color_default(r, g, b, a); -1 48981 } -1 48982 var flatten_colors_default = flattenColors; -1 48983 function contentOverlapping(targetElement, bgNode) { -1 48984 var targetRect = targetElement.getClientRects()[0]; -1 48985 var obscuringElements = shadow_elements_from_point_default(targetRect.left, targetRect.top); -1 48986 if (obscuringElements) { -1 48987 for (var i = 0; i < obscuringElements.length; i++) { -1 48988 if (obscuringElements[i] !== targetElement && obscuringElements[i] === bgNode) { -1 48989 return true; -1 48990 } 29077 48991 }29078 -1 throw new Error('Unable to resolve global `this`');29079 -1 };29080 -1 module.exports = function() {29081 -1 if (this) {29082 -1 return this;-1 48992 } -1 48993 return false; -1 48994 } -1 48995 function calculateObscuringElement(elmIndex, elmStack, originalElm) { -1 48996 if (elmIndex > 0) { -1 48997 for (var i = elmIndex - 1; i >= 0; i--) { -1 48998 var bgElm = elmStack[i]; -1 48999 if (contentOverlapping(originalElm, bgElm)) { -1 49000 return true; -1 49001 } else { -1 49002 elmStack.splice(i, 1); -1 49003 } 29083 49004 }29084 -1 try {29085 -1 Object.defineProperty(Object.prototype, '__global__', {29086 -1 get: function get() {29087 -1 return this;29088 -1 },29089 -1 configurable: true-1 49005 } -1 49006 return false; -1 49007 } -1 49008 function sortPageBackground(elmStack) { -1 49009 var bodyIndex = elmStack.indexOf(document.body); -1 49010 var bgNodes = elmStack; -1 49011 var sortBodyElement = bodyIndex > 1 || bodyIndex === -1; -1 49012 if (sortBodyElement && !element_has_image_default(document.documentElement) && get_own_background_color_default(window.getComputedStyle(document.documentElement)).alpha === 0) { -1 49013 if (bodyIndex > 1) { -1 49014 bgNodes.splice(bodyIndex, 1); -1 49015 } -1 49016 bgNodes.splice(elmStack.indexOf(document.documentElement), 1); -1 49017 bgNodes.push(document.body); -1 49018 } -1 49019 return bgNodes; -1 49020 } -1 49021 function getBackgroundStack(elm) { -1 49022 var elmStack = filtered_rect_stack_default(elm); -1 49023 if (elmStack === null) { -1 49024 return null; -1 49025 } -1 49026 elmStack = reduce_to_elements_below_floating_default(elmStack, elm); -1 49027 elmStack = sortPageBackground(elmStack); -1 49028 var elmIndex = elmStack.indexOf(elm); -1 49029 if (calculateObscuringElement(elmIndex, elmStack, elm)) { -1 49030 incomplete_data_default.set('bgColor', 'bgOverlap'); -1 49031 return null; -1 49032 } -1 49033 return elmIndex !== -1 ? elmStack : null; -1 49034 } -1 49035 var get_background_stack_default = getBackgroundStack; -1 49036 function getTextShadowColors(node) { -1 49037 var _ref45 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref45.minRatio, maxRatio = _ref45.maxRatio; -1 49038 var style = window.getComputedStyle(node); -1 49039 var textShadow = style.getPropertyValue('text-shadow'); -1 49040 if (textShadow === 'none') { -1 49041 return []; -1 49042 } -1 49043 var fontSizeStr = style.getPropertyValue('font-size'); -1 49044 var fontSize = parseInt(fontSizeStr); -1 49045 assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr)); -1 49046 var shadowColors = []; -1 49047 var shadows = parseTextShadows(textShadow); -1 49048 shadows.forEach(function(_ref46) { -1 49049 var colorStr = _ref46.colorStr, pixels = _ref46.pixels; -1 49050 colorStr = colorStr || style.getPropertyValue('color'); -1 49051 var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$; -1 49052 if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) { -1 49053 var color10 = textShadowColor({ -1 49054 colorStr: colorStr, -1 49055 offsetY: offsetY, -1 49056 offsetX: offsetX, -1 49057 blurRadius: blurRadius, -1 49058 fontSize: fontSize 29090 49059 });29091 -1 } catch (error) {29092 -1 return naiveFallback();-1 49060 shadowColors.push(color10); 29093 49061 }29094 -1 try {29095 -1 if (!__global__) {29096 -1 return naiveFallback();29097 -1 }29098 -1 return __global__;29099 -1 } finally {29100 -1 delete Object.prototype.__global__;-1 49062 }); -1 49063 return shadowColors; -1 49064 } -1 49065 function parseTextShadows(textShadow) { -1 49066 var current = { -1 49067 pixels: [] -1 49068 }; -1 49069 var str = textShadow.trim(); -1 49070 var shadows = [ current ]; -1 49071 if (!str) { -1 49072 return []; -1 49073 } -1 49074 while (str) { -1 49075 var colorMatch = str.match(/^rgba?\([0-9,.\s]+\)/i) || str.match(/^[a-z]+/i) || str.match(/^#[0-9a-f]+/i); -1 49076 var pixelMatch = str.match(/^([0-9.-]+)px/i) || str.match(/^(0)/); -1 49077 if (colorMatch) { -1 49078 assert_default(!current.colorStr, 'Multiple colors identified in text-shadow: '.concat(textShadow)); -1 49079 str = str.replace(colorMatch[0], '').trim(); -1 49080 current.colorStr = colorMatch[0]; -1 49081 } else if (pixelMatch) { -1 49082 assert_default(current.pixels.length < 3, 'Too many pixel units in text-shadow: '.concat(textShadow)); -1 49083 str = str.replace(pixelMatch[0], '').trim(); -1 49084 var pixelUnit = parseFloat((pixelMatch[1][0] === '.' ? '0' : '') + pixelMatch[1]); -1 49085 current.pixels.push(pixelUnit); -1 49086 } else if (str[0] === ',') { -1 49087 assert_default(current.pixels.length >= 2, 'Missing pixel value in text-shadow: '.concat(textShadow)); -1 49088 current = { -1 49089 pixels: [] -1 49090 }; -1 49091 shadows.push(current); -1 49092 str = str.substr(1).trim(); -1 49093 } else { -1 49094 throw new Error('Unable to process text-shadows: '.concat(textShadow)); 29101 49095 }29102 -1 }();29103 -1 },29104 -1 './node_modules/ext/global-this/index.js': function node_modulesExtGlobalThisIndexJs(module, exports, __webpack_require__) {29105 -1 'use strict';29106 -1 module.exports = __webpack_require__('./node_modules/ext/global-this/is-implemented.js')() ? globalThis : __webpack_require__('./node_modules/ext/global-this/implementation.js');29107 -1 },29108 -1 './node_modules/ext/global-this/is-implemented.js': function node_modulesExtGlobalThisIsImplementedJs(module, exports, __webpack_require__) {29109 -1 'use strict';29110 -1 module.exports = function() {29111 -1 if ((typeof globalThis === 'undefined' ? 'undefined' : _typeof(globalThis)) !== 'object') {29112 -1 return false;-1 49096 } -1 49097 return shadows; -1 49098 } -1 49099 function textShadowColor(_ref47) { -1 49100 var colorStr = _ref47.colorStr, offsetX = _ref47.offsetX, offsetY = _ref47.offsetY, blurRadius = _ref47.blurRadius, fontSize = _ref47.fontSize; -1 49101 if (offsetX > blurRadius || offsetY > blurRadius) { -1 49102 return new color_default(0, 0, 0, 0); -1 49103 } -1 49104 var shadowColor = new color_default(); -1 49105 shadowColor.parseString(colorStr); -1 49106 shadowColor.alpha *= blurRadiusToAlpha(blurRadius, fontSize); -1 49107 return shadowColor; -1 49108 } -1 49109 function blurRadiusToAlpha(blurRadius, fontSize) { -1 49110 var relativeBlur = blurRadius / fontSize; -1 49111 return .185 / (relativeBlur + .4); -1 49112 } -1 49113 var get_text_shadow_colors_default = getTextShadowColors; -1 49114 function elmPartiallyObscured(elm, bgElm, bgColor) { -1 49115 var obscured = elm !== bgElm && !visually_contains_default(elm, bgElm) && bgColor.alpha !== 0; -1 49116 if (obscured) { -1 49117 incomplete_data_default.set('bgColor', 'elmPartiallyObscured'); -1 49118 } -1 49119 return obscured; -1 49120 } -1 49121 function getBackgroundColor(elm) { -1 49122 var bgElms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; -1 49123 var shadowOutlineEmMax = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : .1; -1 49124 var bgColors = get_text_shadow_colors_default(elm, { -1 49125 minRatio: shadowOutlineEmMax -1 49126 }); -1 49127 var elmStack = get_background_stack_default(elm); -1 49128 (elmStack || []).some(function(bgElm) { -1 49129 var bgElmStyle = window.getComputedStyle(bgElm); -1 49130 var bgColor = get_own_background_color_default(bgElmStyle); -1 49131 if (elmPartiallyObscured(elm, bgElm, bgColor) || element_has_image_default(bgElm, bgElmStyle)) { -1 49132 bgColors = null; -1 49133 bgElms.push(bgElm); -1 49134 return true; 29113 49135 }29114 -1 if (!globalThis) {-1 49136 if (bgColor.alpha !== 0) { -1 49137 bgElms.push(bgElm); -1 49138 bgColors.push(bgColor); -1 49139 return bgColor.alpha === 1; -1 49140 } else { 29115 49141 return false; 29116 49142 }29117 -1 return globalThis.Array === Array;29118 -1 };29119 -1 },29120 -1 './node_modules/is-promise/index.js': function node_modulesIsPromiseIndexJs(module, exports) {29121 -1 module.exports = isPromise;29122 -1 module.exports['default'] = isPromise;29123 -1 function isPromise(obj) {29124 -1 return !!obj && (_typeof(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';-1 49143 }); -1 49144 if (bgColors === null || elmStack === null) { -1 49145 return null; 29125 49146 }29126 -1 },29127 -1 './node_modules/lru-queue/index.js': function node_modulesLruQueueIndexJs(module, exports, __webpack_require__) {29128 -1 'use strict';29129 -1 var toPosInt = __webpack_require__('./node_modules/es5-ext/number/to-pos-integer.js'), create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty;29130 -1 module.exports = function(limit) {29131 -1 var size = 0, base = 1, queue = create(null), map = create(null), index = 0, del;29132 -1 limit = toPosInt(limit);29133 -1 return {29134 -1 hit: function hit(id) {29135 -1 var oldIndex = map[id], nuIndex = ++index;29136 -1 queue[nuIndex] = id;29137 -1 map[id] = nuIndex;29138 -1 if (!oldIndex) {29139 -1 ++size;29140 -1 if (size <= limit) {29141 -1 return;29142 -1 }29143 -1 id = queue[base];29144 -1 del(id);29145 -1 return id;29146 -1 }29147 -1 delete queue[oldIndex];29148 -1 if (base !== oldIndex) {29149 -1 return;29150 -1 }29151 -1 while (!hasOwnProperty.call(queue, ++base)) {29152 -1 continue;29153 -1 }29154 -1 },29155 -1 delete: del = function del(id) {29156 -1 var oldIndex = map[id];29157 -1 if (!oldIndex) {29158 -1 return;29159 -1 }29160 -1 delete queue[oldIndex];29161 -1 delete map[id];29162 -1 --size;29163 -1 if (base !== oldIndex) {29164 -1 return;29165 -1 }29166 -1 if (!size) {29167 -1 index = 0;29168 -1 base = 1;29169 -1 return;29170 -1 }29171 -1 while (!hasOwnProperty.call(queue, ++base)) {29172 -1 continue;29173 -1 }29174 -1 },29175 -1 clear: function clear() {29176 -1 size = 0;29177 -1 base = 1;29178 -1 queue = create(null);29179 -1 map = create(null);29180 -1 index = 0;29181 -1 }29182 -1 };-1 49147 bgColors.push(new color_default(255, 255, 255, 1)); -1 49148 var colors = bgColors.reduce(flatten_colors_default); -1 49149 return colors; -1 49150 } -1 49151 var get_background_color_default = getBackgroundColor; -1 49152 function getContrast(bgColor, fgColor) { -1 49153 if (!fgColor || !bgColor) { -1 49154 return null; -1 49155 } -1 49156 if (fgColor.alpha < 1) { -1 49157 fgColor = flatten_colors_default(fgColor, bgColor); -1 49158 } -1 49159 var bL = bgColor.getRelativeLuminance(); -1 49160 var fL = fgColor.getRelativeLuminance(); -1 49161 return (Math.max(fL, bL) + .05) / (Math.min(fL, bL) + .05); -1 49162 } -1 49163 var get_contrast_default = getContrast; -1 49164 function getOpacity(node) { -1 49165 if (!node) { -1 49166 return 1; -1 49167 } -1 49168 var vNode = get_node_from_tree_default(node); -1 49169 if (vNode && vNode._opacity !== void 0 && vNode._opacity !== null) { -1 49170 return vNode._opacity; -1 49171 } -1 49172 var nodeStyle = window.getComputedStyle(node); -1 49173 var opacity = nodeStyle.getPropertyValue('opacity'); -1 49174 var finalOpacity = opacity * getOpacity(node.parentElement); -1 49175 if (vNode) { -1 49176 vNode._opacity = finalOpacity; -1 49177 } -1 49178 return finalOpacity; -1 49179 } -1 49180 function getForegroundColor(node, _, bgColor) { -1 49181 var nodeStyle = window.getComputedStyle(node); -1 49182 var fgColor = new color_default(); -1 49183 fgColor.parseString(nodeStyle.getPropertyValue('color')); -1 49184 var opacity = getOpacity(node); -1 49185 fgColor.alpha = fgColor.alpha * opacity; -1 49186 if (fgColor.alpha === 1) { -1 49187 return fgColor; -1 49188 } -1 49189 if (!bgColor) { -1 49190 bgColor = get_background_color_default(node, []); -1 49191 } -1 49192 if (bgColor === null) { -1 49193 var reason = incomplete_data_default.get('bgColor'); -1 49194 incomplete_data_default.set('fgColor', reason); -1 49195 return null; -1 49196 } -1 49197 return flatten_colors_default(fgColor, bgColor); -1 49198 } -1 49199 var get_foreground_color_default = getForegroundColor; -1 49200 function hasValidContrastRatio(bg, fg, fontSize, isBold) { -1 49201 var contrast = get_contrast_default(bg, fg); -1 49202 var isSmallFont = isBold && Math.ceil(fontSize * 72) / 96 < 14 || !isBold && Math.ceil(fontSize * 72) / 96 < 18; -1 49203 var expectedContrastRatio = isSmallFont ? 4.5 : 3; -1 49204 return { -1 49205 isValid: contrast > expectedContrastRatio, -1 49206 contrastRatio: contrast, -1 49207 expectedContrastRatio: expectedContrastRatio 29183 49208 };29184 -1 },29185 -1 './node_modules/memoizee/ext/async.js': function node_modulesMemoizeeExtAsyncJs(module, exports, __webpack_require__) {29186 -1 'use strict';29187 -1 var aFrom = __webpack_require__('./node_modules/es5-ext/array/from/index.js'), objectMap = __webpack_require__('./node_modules/es5-ext/object/map.js'), mixin = __webpack_require__('./node_modules/es5-ext/object/mixin.js'), defineLength = __webpack_require__('./node_modules/es5-ext/function/_define-length.js'), nextTick = __webpack_require__('./node_modules/next-tick/index.js');29188 -1 var slice = Array.prototype.slice, apply = Function.prototype.apply, create = Object.create;29189 -1 __webpack_require__('./node_modules/memoizee/lib/registered-extensions.js').async = function(tbi, conf) {29190 -1 var waiting = create(null), cache = create(null), base = conf.memoized, original = conf.original, currentCallback, currentContext, currentArgs;29191 -1 conf.memoized = defineLength(function(arg) {29192 -1 var args = arguments, last = args[args.length - 1];29193 -1 if (typeof last === 'function') {29194 -1 currentCallback = last;29195 -1 args = slice.call(args, 0, -1);29196 -1 }29197 -1 return base.apply(currentContext = this, currentArgs = args);29198 -1 }, base);29199 -1 try {29200 -1 mixin(conf.memoized, base);29201 -1 } catch (ignore) {}29202 -1 conf.on('get', function(id) {29203 -1 var cb, context, args;29204 -1 if (!currentCallback) {29205 -1 return;29206 -1 }29207 -1 if (waiting[id]) {29208 -1 if (typeof waiting[id] === 'function') {29209 -1 waiting[id] = [ waiting[id], currentCallback ];29210 -1 } else {29211 -1 waiting[id].push(currentCallback);29212 -1 }29213 -1 currentCallback = null;29214 -1 return;29215 -1 }29216 -1 cb = currentCallback;29217 -1 context = currentContext;29218 -1 args = currentArgs;29219 -1 currentCallback = currentContext = currentArgs = null;29220 -1 nextTick(function() {29221 -1 var data;29222 -1 if (hasOwnProperty.call(cache, id)) {29223 -1 data = cache[id];29224 -1 conf.emit('getasync', id, args, context);29225 -1 apply.call(cb, data.context, data.args);29226 -1 } else {29227 -1 currentCallback = cb;29228 -1 currentContext = context;29229 -1 currentArgs = args;29230 -1 base.apply(context, args);29231 -1 }29232 -1 });-1 49209 } -1 49210 var has_valid_contrast_ratio_default = hasValidContrastRatio; -1 49211 var hasPsuedoElement = memoize_default(function hasPsuedoElement2(node, pseudo) { -1 49212 var style = window.getComputedStyle(node, pseudo); -1 49213 var backgroundColor = get_own_background_color_default(style); -1 49214 return style.getPropertyValue('content') !== 'none' && style.getPropertyValue('position') === 'absolute' && parseInt(style.getPropertyValue('width')) !== 0 && parseInt(style.getPropertyValue('height')) !== 0 && (backgroundColor.alpha !== 0 || style.getPropertyValue('background-image') !== 'none'); -1 49215 }); -1 49216 function colorContrastEvaluate(node, options, virtualNode) { -1 49217 if (!is_visible_default(node, false)) { -1 49218 return true; -1 49219 } -1 49220 var ignoreUnicode = options.ignoreUnicode, ignoreLength = options.ignoreLength, boldValue = options.boldValue, boldTextPt = options.boldTextPt, largeTextPt = options.largeTextPt, contrastRatio = options.contrastRatio, shadowOutlineEmMax = options.shadowOutlineEmMax; -1 49221 var visibleText = visible_virtual_default(virtualNode, false, true); -1 49222 var textContainsOnlyUnicode = has_unicode_default(visibleText, { -1 49223 nonBmp: true -1 49224 }) && sanitize_default(remove_unicode_default(visibleText, { -1 49225 nonBmp: true -1 49226 })) === ''; -1 49227 if (textContainsOnlyUnicode && ignoreUnicode) { -1 49228 this.data({ -1 49229 messageKey: 'nonBmp' 29233 49230 });29234 -1 conf.original = function() {29235 -1 var args, cb, origCb, result;29236 -1 if (!currentCallback) {29237 -1 return apply.call(original, this, arguments);29238 -1 }29239 -1 args = aFrom(arguments);29240 -1 cb = function self(err) {29241 -1 var cb, args, id = self.id;29242 -1 if (id == null) {29243 -1 nextTick(apply.bind(self, this, arguments));29244 -1 return undefined;29245 -1 }29246 -1 delete self.id;29247 -1 cb = waiting[id];29248 -1 delete waiting[id];29249 -1 if (!cb) {29250 -1 return undefined;29251 -1 }29252 -1 args = aFrom(arguments);29253 -1 if (conf.has(id)) {29254 -1 if (err) {29255 -1 conf['delete'](id);29256 -1 } else {29257 -1 cache[id] = {29258 -1 context: this,29259 -1 args: args29260 -1 };29261 -1 conf.emit('setasync', id, typeof cb === 'function' ? 1 : cb.length);29262 -1 }29263 -1 }29264 -1 if (typeof cb === 'function') {29265 -1 result = apply.call(cb, this, args);29266 -1 } else {29267 -1 cb.forEach(function(cb) {29268 -1 result = apply.call(cb, this, args);29269 -1 }, this);29270 -1 }29271 -1 return result;29272 -1 };29273 -1 origCb = currentCallback;29274 -1 currentCallback = currentContext = currentArgs = null;29275 -1 args.push(cb);29276 -1 result = apply.call(original, this, args);29277 -1 cb.cb = origCb;29278 -1 currentCallback = cb;29279 -1 return result;29280 -1 };29281 -1 conf.on('set', function(id) {29282 -1 if (!currentCallback) {29283 -1 conf['delete'](id);29284 -1 return;29285 -1 }29286 -1 if (waiting[id]) {29287 -1 if (typeof waiting[id] === 'function') {29288 -1 waiting[id] = [ waiting[id], currentCallback.cb ];29289 -1 } else {29290 -1 waiting[id].push(currentCallback.cb);29291 -1 }-1 49231 return void 0; -1 49232 } -1 49233 var bgNodes = []; -1 49234 var bgColor = get_background_color_default(node, bgNodes, shadowOutlineEmMax); -1 49235 var fgColor = get_foreground_color_default(node, false, bgColor); -1 49236 var shadowColors = get_text_shadow_colors_default(node, { -1 49237 maxRatio: shadowOutlineEmMax -1 49238 }); -1 49239 var nodeStyle = window.getComputedStyle(node); -1 49240 var fontSize = parseFloat(nodeStyle.getPropertyValue('font-size')); -1 49241 var fontWeight = nodeStyle.getPropertyValue('font-weight'); -1 49242 var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold'; -1 49243 var contrast = null; -1 49244 if (shadowColors.length === 0) { -1 49245 contrast = get_contrast_default(bgColor, fgColor); -1 49246 } else if (fgColor && bgColor) { -1 49247 var shadowColor = [].concat(_toConsumableArray(shadowColors), [ bgColor ]).reduce(flatten_colors_default); -1 49248 var bgContrast = get_contrast_default(bgColor, shadowColor); -1 49249 var fgContrast = get_contrast_default(shadowColor, fgColor); -1 49250 contrast = Math.max(bgContrast, fgContrast); -1 49251 } -1 49252 var ptSize = Math.ceil(fontSize * 72) / 96; -1 49253 var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt; -1 49254 var _ref48 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref48.expected, minThreshold = _ref48.minThreshold, maxThreshold = _ref48.maxThreshold; -1 49255 var isValid = contrast > expected; -1 49256 var nodeToCheck = node; -1 49257 while (nodeToCheck) { -1 49258 if (hasPsuedoElement(nodeToCheck, ':before') || hasPsuedoElement(nodeToCheck, ':after')) { -1 49259 this.data({ -1 49260 messageKey: 'pseudoContent' -1 49261 }); -1 49262 this.relatedNodes(nodeToCheck); -1 49263 return void 0; -1 49264 } -1 49265 nodeToCheck = nodeToCheck.parentElement; -1 49266 } -1 49267 if (typeof minThreshold === 'number' && contrast < minThreshold || typeof maxThreshold === 'number' && contrast > maxThreshold) { -1 49268 return true; -1 49269 } -1 49270 var truncatedResult = Math.floor(contrast * 100) / 100; -1 49271 var missing; -1 49272 if (bgColor === null) { -1 49273 missing = incomplete_data_default.get('bgColor'); -1 49274 } -1 49275 var equalRatio = truncatedResult === 1; -1 49276 var shortTextContent = visibleText.length === 1; -1 49277 if (equalRatio) { -1 49278 missing = incomplete_data_default.set('bgColor', 'equalRatio'); -1 49279 } else if (shortTextContent && !ignoreLength) { -1 49280 missing = 'shortTextContent'; -1 49281 } -1 49282 var data2 = { -1 49283 fgColor: fgColor ? fgColor.toHexString() : void 0, -1 49284 bgColor: bgColor ? bgColor.toHexString() : void 0, -1 49285 contrastRatio: truncatedResult, -1 49286 fontSize: ''.concat((fontSize * 72 / 96).toFixed(1), 'pt (').concat(fontSize, 'px)'), -1 49287 fontWeight: bold ? 'bold' : 'normal', -1 49288 messageKey: missing, -1 49289 expectedContrastRatio: expected + ':1' -1 49290 }; -1 49291 this.data(data2); -1 49292 if (fgColor === null || bgColor === null || equalRatio || shortTextContent && !ignoreLength && !isValid) { -1 49293 missing = null; -1 49294 incomplete_data_default.clear(); -1 49295 this.relatedNodes(bgNodes); -1 49296 return void 0; -1 49297 } -1 49298 if (!isValid) { -1 49299 this.relatedNodes(bgNodes); -1 49300 } -1 49301 return isValid; -1 49302 } -1 49303 var color_contrast_evaluate_default = colorContrastEvaluate; -1 49304 function getContrast2(color1, color22) { -1 49305 var c1lum = color1.getRelativeLuminance(); -1 49306 var c2lum = color22.getRelativeLuminance(); -1 49307 return (Math.max(c1lum, c2lum) + .05) / (Math.min(c1lum, c2lum) + .05); -1 49308 } -1 49309 var blockLike2 = [ 'block', 'list-item', 'table', 'flex', 'grid', 'inline-block' ]; -1 49310 function isBlock2(elm) { -1 49311 var display = window.getComputedStyle(elm).getPropertyValue('display'); -1 49312 return blockLike2.indexOf(display) !== -1 || display.substr(0, 6) === 'table-'; -1 49313 } -1 49314 function linkInTextBlockEvaluate(node) { -1 49315 if (isBlock2(node)) { -1 49316 return false; -1 49317 } -1 49318 var parentBlock = get_composed_parent_default(node); -1 49319 while (parentBlock.nodeType === 1 && !isBlock2(parentBlock)) { -1 49320 parentBlock = get_composed_parent_default(parentBlock); -1 49321 } -1 49322 this.relatedNodes([ parentBlock ]); -1 49323 if (element_is_distinct_default(node, parentBlock)) { -1 49324 return true; -1 49325 } else { -1 49326 var nodeColor, parentColor; -1 49327 nodeColor = get_foreground_color_default(node); -1 49328 parentColor = get_foreground_color_default(parentBlock); -1 49329 if (!nodeColor || !parentColor) { -1 49330 return void 0; -1 49331 } -1 49332 var contrast = getContrast2(nodeColor, parentColor); -1 49333 if (contrast === 1) { -1 49334 return true; -1 49335 } else if (contrast >= 3) { -1 49336 incomplete_data_default.set('fgColor', 'bgContrast'); -1 49337 this.data({ -1 49338 messageKey: incomplete_data_default.get('fgColor') -1 49339 }); -1 49340 incomplete_data_default.clear(); -1 49341 return void 0; -1 49342 } -1 49343 nodeColor = get_background_color_default(node); -1 49344 parentColor = get_background_color_default(parentBlock); -1 49345 if (!nodeColor || !parentColor || getContrast2(nodeColor, parentColor) >= 3) { -1 49346 var reason; -1 49347 if (!nodeColor || !parentColor) { -1 49348 reason = incomplete_data_default.get('bgColor'); 29292 49349 } else {29293 -1 waiting[id] = currentCallback.cb;-1 49350 reason = 'bgContrast'; 29294 49351 }29295 -1 delete currentCallback.cb;29296 -1 currentCallback.id = id;29297 -1 currentCallback = null;-1 49352 incomplete_data_default.set('fgColor', reason); -1 49353 this.data({ -1 49354 messageKey: incomplete_data_default.get('fgColor') -1 49355 }); -1 49356 incomplete_data_default.clear(); -1 49357 return void 0; -1 49358 } -1 49359 } -1 49360 return false; -1 49361 } -1 49362 var link_in_text_block_evaluate_default = linkInTextBlockEvaluate; -1 49363 function autocompleteAppropriateEvaluate(node, options, virtualNode) { -1 49364 if (virtualNode.props.nodeName !== 'input') { -1 49365 return true; -1 49366 } -1 49367 var number = [ 'text', 'search', 'number', 'tel' ]; -1 49368 var url = [ 'text', 'search', 'url' ]; -1 49369 var allowedTypesMap = { -1 49370 bday: [ 'text', 'search', 'date' ], -1 49371 email: [ 'text', 'search', 'email' ], -1 49372 username: [ 'text', 'search', 'email' ], -1 49373 'street-address': [ 'text' ], -1 49374 tel: [ 'text', 'search', 'tel' ], -1 49375 'tel-country-code': [ 'text', 'search', 'tel' ], -1 49376 'tel-national': [ 'text', 'search', 'tel' ], -1 49377 'tel-area-code': [ 'text', 'search', 'tel' ], -1 49378 'tel-local': [ 'text', 'search', 'tel' ], -1 49379 'tel-local-prefix': [ 'text', 'search', 'tel' ], -1 49380 'tel-local-suffix': [ 'text', 'search', 'tel' ], -1 49381 'tel-extension': [ 'text', 'search', 'tel' ], -1 49382 'cc-number': number, -1 49383 'cc-exp': [ 'text', 'search', 'month', 'tel' ], -1 49384 'cc-exp-month': number, -1 49385 'cc-exp-year': number, -1 49386 'cc-csc': number, -1 49387 'transaction-amount': number, -1 49388 'bday-day': number, -1 49389 'bday-month': number, -1 49390 'bday-year': number, -1 49391 'new-password': [ 'text', 'search', 'password' ], -1 49392 'current-password': [ 'text', 'search', 'password' ], -1 49393 url: url, -1 49394 photo: url, -1 49395 impp: url -1 49396 }; -1 49397 if (_typeof(options) === 'object') { -1 49398 Object.keys(options).forEach(function(key) { -1 49399 if (!allowedTypesMap[key]) { -1 49400 allowedTypesMap[key] = []; -1 49401 } -1 49402 allowedTypesMap[key] = allowedTypesMap[key].concat(options[key]); 29298 49403 });29299 -1 conf.on('delete', function(id) {29300 -1 var result;29301 -1 if (hasOwnProperty.call(waiting, id)) {29302 -1 return;29303 -1 }29304 -1 if (!cache[id]) {29305 -1 return;29306 -1 }29307 -1 result = cache[id];29308 -1 delete cache[id];29309 -1 conf.emit('deleteasync', id, slice.call(result.args, 1));-1 49404 } -1 49405 var autocompleteAttr = virtualNode.attr('autocomplete'); -1 49406 var autocompleteTerms = autocompleteAttr.split(/\s+/g).map(function(term) { -1 49407 return term.toLowerCase(); -1 49408 }); -1 49409 var purposeTerm = autocompleteTerms[autocompleteTerms.length - 1]; -1 49410 if (_autocomplete.stateTerms.includes(purposeTerm)) { -1 49411 return true; -1 49412 } -1 49413 var allowedTypes = allowedTypesMap[purposeTerm]; -1 49414 var type = virtualNode.hasAttr('type') ? sanitize_default(virtualNode.attr('type')).toLowerCase() : 'text'; -1 49415 type = valid_input_type_default().includes(type) ? type : 'text'; -1 49416 if (typeof allowedTypes === 'undefined') { -1 49417 return type === 'text'; -1 49418 } -1 49419 return allowedTypes.includes(type); -1 49420 } -1 49421 var autocomplete_appropriate_evaluate_default = autocompleteAppropriateEvaluate; -1 49422 function autocompleteValidEvaluate(node, options, virtualNode) { -1 49423 var autocomplete2 = virtualNode.attr('autocomplete') || ''; -1 49424 return is_valid_autocomplete_default(autocomplete2, options); -1 49425 } -1 49426 var autocomplete_valid_evaluate_default = autocompleteValidEvaluate; -1 49427 function attrNonSpaceContentEvaluate(node) { -1 49428 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 49429 var vNode = arguments.length > 2 ? arguments[2] : undefined; -1 49430 if (!options.attribute || typeof options.attribute !== 'string') { -1 49431 throw new TypeError('attr-non-space-content requires options.attribute to be a string'); -1 49432 } -1 49433 if (!vNode.hasAttr(options.attribute)) { -1 49434 this.data({ -1 49435 messageKey: 'noAttr' -1 49436 }); -1 49437 return false; -1 49438 } -1 49439 var attribute = vNode.attr(options.attribute); -1 49440 var attributeIsEmpty = !sanitize_default(attribute); -1 49441 if (attributeIsEmpty) { -1 49442 this.data({ -1 49443 messageKey: 'emptyAttr' 29310 49444 });29311 -1 conf.on('clear', function() {29312 -1 var oldCache = cache;29313 -1 cache = create(null);29314 -1 conf.emit('clearasync', objectMap(oldCache, function(data) {29315 -1 return slice.call(data.args, 1);29316 -1 }));-1 49445 return false; -1 49446 } -1 49447 return true; -1 49448 } -1 49449 var attr_non_space_content_evaluate_default = attrNonSpaceContentEvaluate; -1 49450 function pageHasElmAfter(results) { -1 49451 var elmUsedAnywhere = results.some(function(frameResult) { -1 49452 return frameResult.result === true; -1 49453 }); -1 49454 if (elmUsedAnywhere) { -1 49455 results.forEach(function(result) { -1 49456 result.result = true; 29317 49457 });29318 -1 };29319 -1 },29320 -1 './node_modules/memoizee/ext/dispose.js': function node_modulesMemoizeeExtDisposeJs(module, exports, __webpack_require__) {29321 -1 'use strict';29322 -1 var callable = __webpack_require__('./node_modules/es5-ext/object/valid-callable.js'), forEach = __webpack_require__('./node_modules/es5-ext/object/for-each.js'), extensions = __webpack_require__('./node_modules/memoizee/lib/registered-extensions.js'), apply = Function.prototype.apply;29323 -1 extensions.dispose = function(dispose, conf, options) {29324 -1 var del;29325 -1 callable(dispose);29326 -1 if (options.async && extensions.async || options.promise && extensions.promise) {29327 -1 conf.on('deleteasync', del = function del(id, resultArray) {29328 -1 apply.call(dispose, null, resultArray);29329 -1 });29330 -1 conf.on('clearasync', function(cache) {29331 -1 forEach(cache, function(result, id) {29332 -1 del(id, result);29333 -1 });29334 -1 });29335 -1 return;29336 -1 }29337 -1 conf.on('delete', del = function del(id, result) {29338 -1 dispose(result);-1 49458 } -1 49459 return results; -1 49460 } -1 49461 var has_descendant_after_default = pageHasElmAfter; -1 49462 function hasDescendant(node, options, virtualNode) { -1 49463 if (!options || !options.selector || typeof options.selector !== 'string') { -1 49464 throw new TypeError('has-descendant requires options.selector to be a string'); -1 49465 } -1 49466 var matchingElms = query_selector_all_filter_default(virtualNode, options.selector, function(vNode) { -1 49467 return is_visible_default(vNode.actualNode, true); -1 49468 }); -1 49469 this.relatedNodes(matchingElms.map(function(vNode) { -1 49470 return vNode.actualNode; -1 49471 })); -1 49472 return matchingElms.length > 0; -1 49473 } -1 49474 var has_descendant_evaluate_default = hasDescendant; -1 49475 function hasTextContentEvaluate(node, options, virtualNode) { -1 49476 try { -1 49477 return sanitize_default(subtree_text_default(virtualNode)) !== ''; -1 49478 } catch (e) { -1 49479 return void 0; -1 49480 } -1 49481 } -1 49482 var has_text_content_evaluate_default = hasTextContentEvaluate; -1 49483 function matchesDefinitionEvaluate(_, options, virtualNode) { -1 49484 return matches_default3(virtualNode, options.matcher); -1 49485 } -1 49486 var matches_definition_evaluate_default = matchesDefinitionEvaluate; -1 49487 function pageNoDuplicateAfter(results) { -1 49488 return results.filter(function(checkResult) { -1 49489 return checkResult.data !== 'ignored'; -1 49490 }); -1 49491 } -1 49492 var page_no_duplicate_after_default = pageNoDuplicateAfter; -1 49493 function pageNoDuplicateEvaluate(node, options, virtualNode) { -1 49494 if (!options || !options.selector || typeof options.selector !== 'string') { -1 49495 throw new TypeError('page-no-duplicate requires options.selector to be a string'); -1 49496 } -1 49497 var key = 'page-no-duplicate;' + options.selector; -1 49498 if (cache_default.get(key)) { -1 49499 this.data('ignored'); -1 49500 return; -1 49501 } -1 49502 cache_default.set(key, true); -1 49503 var elms = query_selector_all_filter_default(axe._tree[0], options.selector, function(elm) { -1 49504 return is_visible_default(elm.actualNode); -1 49505 }); -1 49506 if (typeof options.nativeScopeFilter === 'string') { -1 49507 elms = elms.filter(function(elm) { -1 49508 return elm.actualNode.hasAttribute('role') || !find_up_virtual_default(elm, options.nativeScopeFilter); 29339 49509 });29340 -1 conf.on('clear', function(cache) {29341 -1 forEach(cache, function(result, id) {29342 -1 del(id, result);29343 -1 });-1 49510 } -1 49511 this.relatedNodes(elms.filter(function(elm) { -1 49512 return elm !== virtualNode; -1 49513 }).map(function(elm) { -1 49514 return elm.actualNode; -1 49515 })); -1 49516 return elms.length <= 1; -1 49517 } -1 49518 var page_no_duplicate_evaluate_default = pageNoDuplicateEvaluate; -1 49519 function headingOrderAfter(results) { -1 49520 var headingOrder = getHeadingOrder(results); -1 49521 results.forEach(function(result) { -1 49522 result.result = getHeadingOrderOutcome(result, headingOrder); -1 49523 }); -1 49524 return results; -1 49525 } -1 49526 function getHeadingOrderOutcome(result, headingOrder) { -1 49527 var _headingOrder$index$l, _headingOrder$index, _headingOrder$level, _headingOrder; -1 49528 var index = findHeadingOrderIndex(headingOrder, result.node.ancestry); -1 49529 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; -1 49530 var prevLevel = (_headingOrder$level = (_headingOrder = headingOrder[index - 1]) === null || _headingOrder === void 0 ? void 0 : _headingOrder.level) !== null && _headingOrder$level !== void 0 ? _headingOrder$level : -1; -1 49531 if (index === 0) { -1 49532 return true; -1 49533 } -1 49534 if (currLevel === -1) { -1 49535 return void 0; -1 49536 } -1 49537 return currLevel - prevLevel <= 1; -1 49538 } -1 49539 function getHeadingOrder(results) { -1 49540 results = _toConsumableArray(results); -1 49541 results.sort(function(_ref49, _ref50) { -1 49542 var nodeA = _ref49.node; -1 49543 var nodeB = _ref50.node; -1 49544 return nodeA.ancestry.length - nodeB.ancestry.length; -1 49545 }); -1 49546 var headingOrder = results.reduce(mergeHeadingOrder, []); -1 49547 return headingOrder.filter(function(_ref51) { -1 49548 var level = _ref51.level; -1 49549 return level !== -1; -1 49550 }); -1 49551 } -1 49552 function mergeHeadingOrder(mergedHeadingOrder, result) { -1 49553 var _result$data; -1 49554 var frameHeadingOrder = (_result$data = result.data) === null || _result$data === void 0 ? void 0 : _result$data.headingOrder; -1 49555 var frameAncestry = shortenArray(result.node.ancestry, 1); -1 49556 if (!frameHeadingOrder) { -1 49557 return mergedHeadingOrder; -1 49558 } -1 49559 var normalizedHeadingOrder = frameHeadingOrder.map(function(heading) { -1 49560 return addFrameToHeadingAncestry(heading, frameAncestry); -1 49561 }); -1 49562 var index = getFrameIndex(mergedHeadingOrder, frameAncestry); -1 49563 if (index === -1) { -1 49564 mergedHeadingOrder.push.apply(mergedHeadingOrder, _toConsumableArray(normalizedHeadingOrder)); -1 49565 } else { -1 49566 mergedHeadingOrder.splice.apply(mergedHeadingOrder, [ index, 0 ].concat(_toConsumableArray(normalizedHeadingOrder))); -1 49567 } -1 49568 return mergedHeadingOrder; -1 49569 } -1 49570 function getFrameIndex(headingOrder, frameAncestry) { -1 49571 while (frameAncestry.length) { -1 49572 var index = findHeadingOrderIndex(headingOrder, frameAncestry); -1 49573 if (index !== -1) { -1 49574 return index; -1 49575 } -1 49576 frameAncestry = shortenArray(frameAncestry, 1); -1 49577 } -1 49578 return -1; -1 49579 } -1 49580 function findHeadingOrderIndex(headingOrder, ancestry) { -1 49581 return headingOrder.findIndex(function(heading) { -1 49582 return matchAncestry(heading.ancestry, ancestry); -1 49583 }); -1 49584 } -1 49585 function addFrameToHeadingAncestry(heading, frameAncestry) { -1 49586 var ancestry = frameAncestry.concat(heading.ancestry); -1 49587 return _extends({}, heading, { -1 49588 ancestry: ancestry -1 49589 }); -1 49590 } -1 49591 function matchAncestry(ancestryA, ancestryB) { -1 49592 if (ancestryA.length !== ancestryB.length) { -1 49593 return false; -1 49594 } -1 49595 return ancestryA.every(function(selectorA, index) { -1 49596 var selectorB = ancestryB[index]; -1 49597 if (!Array.isArray(selectorA)) { -1 49598 return selectorA === selectorB; -1 49599 } -1 49600 if (selectorA.length !== selectorB.length) { -1 49601 return false; -1 49602 } -1 49603 return selectorA.every(function(str, index2) { -1 49604 return selectorB[index2] === str; 29344 49605 });29345 -1 };29346 -1 },29347 -1 './node_modules/memoizee/ext/max-age.js': function node_modulesMemoizeeExtMaxAgeJs(module, exports, __webpack_require__) {29348 -1 'use strict';29349 -1 var aFrom = __webpack_require__('./node_modules/es5-ext/array/from/index.js'), forEach = __webpack_require__('./node_modules/es5-ext/object/for-each.js'), nextTick = __webpack_require__('./node_modules/next-tick/index.js'), isPromise = __webpack_require__('./node_modules/is-promise/index.js'), timeout = __webpack_require__('./node_modules/timers-ext/valid-timeout.js'), extensions = __webpack_require__('./node_modules/memoizee/lib/registered-extensions.js');29350 -1 var noop = Function.prototype, max = Math.max, min = Math.min, create = Object.create;29351 -1 extensions.maxAge = function(maxAge, conf, options) {29352 -1 var timeouts, postfix, preFetchAge, preFetchTimeouts;29353 -1 maxAge = timeout(maxAge);29354 -1 if (!maxAge) {29355 -1 return;-1 49606 }); -1 49607 } -1 49608 function shortenArray(arr, spliceLength) { -1 49609 return arr.slice(0, arr.length - spliceLength); -1 49610 } -1 49611 function getLevel(vNode) { -1 49612 var role = vNode.attr('role'); -1 49613 if (role && role.includes('heading')) { -1 49614 var ariaHeadingLevel = vNode.attr('aria-level'); -1 49615 var level = parseInt(ariaHeadingLevel, 10); -1 49616 if (isNaN(level) || level < 1 || level > 6) { -1 49617 return 2; 29356 49618 }29357 -1 timeouts = create(null);29358 -1 postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';29359 -1 conf.on('set' + postfix, function(id) {29360 -1 timeouts[id] = setTimeout(function() {29361 -1 conf['delete'](id);29362 -1 }, maxAge);29363 -1 if (typeof timeouts[id].unref === 'function') {29364 -1 timeouts[id].unref();29365 -1 }29366 -1 if (!preFetchTimeouts) {29367 -1 return;29368 -1 }29369 -1 if (preFetchTimeouts[id]) {29370 -1 if (preFetchTimeouts[id] !== 'nextTick') {29371 -1 clearTimeout(preFetchTimeouts[id]);29372 -1 }29373 -1 }29374 -1 preFetchTimeouts[id] = setTimeout(function() {29375 -1 delete preFetchTimeouts[id];29376 -1 }, preFetchAge);29377 -1 if (typeof preFetchTimeouts[id].unref === 'function') {29378 -1 preFetchTimeouts[id].unref();29379 -1 }-1 49619 return level; -1 49620 } -1 49621 var headingLevel = vNode.props.nodeName.match(/h(\d)/); -1 49622 if (headingLevel) { -1 49623 return parseInt(headingLevel[1], 10); -1 49624 } -1 49625 return -1; -1 49626 } -1 49627 function headingOrderEvaluate() { -1 49628 var headingOrder = cache_default.get('headingOrder'); -1 49629 if (headingOrder) { -1 49630 return true; -1 49631 } -1 49632 var selector = 'h1, h2, h3, h4, h5, h6, [role=heading], iframe, frame'; -1 49633 var vNodes = query_selector_all_filter_default(axe._tree[0], selector, function(vNode) { -1 49634 return is_visible_default(vNode.actualNode, true); -1 49635 }); -1 49636 headingOrder = vNodes.map(function(vNode) { -1 49637 return { -1 49638 ancestry: [ _getAncestry(vNode.actualNode) ], -1 49639 level: getLevel(vNode) -1 49640 }; -1 49641 }); -1 49642 this.data({ -1 49643 headingOrder: headingOrder -1 49644 }); -1 49645 cache_default.set('headingOrder', vNodes); -1 49646 return true; -1 49647 } -1 49648 var heading_order_evaluate_default = headingOrderEvaluate; -1 49649 function isIdenticalObject(a, b) { -1 49650 if (!a || !b) { -1 49651 return false; -1 49652 } -1 49653 var aProps = Object.getOwnPropertyNames(a); -1 49654 var bProps = Object.getOwnPropertyNames(b); -1 49655 if (aProps.length !== bProps.length) { -1 49656 return false; -1 49657 } -1 49658 var result = aProps.every(function(propName) { -1 49659 var aValue = a[propName]; -1 49660 var bValue = b[propName]; -1 49661 if (_typeof(aValue) !== _typeof(bValue)) { -1 49662 return false; -1 49663 } -1 49664 if (typeof aValue === 'object' || typeof bValue === 'object') { -1 49665 return isIdenticalObject(aValue, bValue); -1 49666 } -1 49667 return aValue === bValue; -1 49668 }); -1 49669 return result; -1 49670 } -1 49671 function identicalLinksSamePurposeAfter(results) { -1 49672 if (results.length < 2) { -1 49673 return results; -1 49674 } -1 49675 var incompleteResults = results.filter(function(_ref52) { -1 49676 var result = _ref52.result; -1 49677 return result !== void 0; -1 49678 }); -1 49679 var uniqueResults = []; -1 49680 var nameMap = {}; -1 49681 var _loop5 = function _loop5(index) { -1 49682 var _currentResult$relate; -1 49683 var currentResult = incompleteResults[index]; -1 49684 var _currentResult$data = currentResult.data, name = _currentResult$data.name, urlProps = _currentResult$data.urlProps; -1 49685 if (nameMap[name]) { -1 49686 return 'continue'; -1 49687 } -1 49688 var sameNameResults = incompleteResults.filter(function(_ref53, resultNum) { -1 49689 var data2 = _ref53.data; -1 49690 return data2.name === name && resultNum !== index; 29380 49691 });29381 -1 conf.on('delete' + postfix, function(id) {29382 -1 clearTimeout(timeouts[id]);29383 -1 delete timeouts[id];29384 -1 if (!preFetchTimeouts) {29385 -1 return;29386 -1 }29387 -1 if (preFetchTimeouts[id] !== 'nextTick') {29388 -1 clearTimeout(preFetchTimeouts[id]);29389 -1 }29390 -1 delete preFetchTimeouts[id];-1 49692 var isSameUrl = sameNameResults.every(function(_ref54) { -1 49693 var data2 = _ref54.data; -1 49694 return isIdenticalObject(data2.urlProps, urlProps); 29391 49695 });29392 -1 if (options.preFetch) {29393 -1 if (options.preFetch === true || isNaN(options.preFetch)) {29394 -1 preFetchAge = .333;29395 -1 } else {29396 -1 preFetchAge = max(min(Number(options.preFetch), 1), 0);29397 -1 }29398 -1 if (preFetchAge) {29399 -1 preFetchTimeouts = {};29400 -1 preFetchAge = (1 - preFetchAge) * maxAge;29401 -1 conf.on('get' + postfix, function(id, args, context) {29402 -1 if (!preFetchTimeouts[id]) {29403 -1 preFetchTimeouts[id] = 'nextTick';29404 -1 nextTick(function() {29405 -1 var result;29406 -1 if (preFetchTimeouts[id] !== 'nextTick') {29407 -1 return;29408 -1 }29409 -1 delete preFetchTimeouts[id];29410 -1 conf['delete'](id);29411 -1 if (options.async) {29412 -1 args = aFrom(args);29413 -1 args.push(noop);29414 -1 }29415 -1 result = conf.memoized.apply(context, args);29416 -1 if (options.promise) {29417 -1 if (isPromise(result)) {29418 -1 if (typeof result.done === 'function') {29419 -1 result.done(noop, noop);29420 -1 } else {29421 -1 result.then(noop, noop);29422 -1 }29423 -1 }29424 -1 }29425 -1 });29426 -1 }29427 -1 });29428 -1 }-1 49696 if (sameNameResults.length && !isSameUrl) { -1 49697 currentResult.result = void 0; -1 49698 } -1 49699 currentResult.relatedNodes = []; -1 49700 (_currentResult$relate = currentResult.relatedNodes).push.apply(_currentResult$relate, _toConsumableArray(sameNameResults.map(function(node) { -1 49701 return node.relatedNodes[0]; -1 49702 }))); -1 49703 nameMap[name] = sameNameResults; -1 49704 uniqueResults.push(currentResult); -1 49705 }; -1 49706 for (var index = 0; index < incompleteResults.length; index++) { -1 49707 var _ret2 = _loop5(index); -1 49708 if (_ret2 === 'continue') { -1 49709 continue; -1 49710 } -1 49711 } -1 49712 return uniqueResults; -1 49713 } -1 49714 var identical_links_same_purpose_after_default = identicalLinksSamePurposeAfter; -1 49715 var commons_exports = {}; -1 49716 __export(commons_exports, { -1 49717 aria: function aria() { -1 49718 return aria_exports; -1 49719 }, -1 49720 color: function color() { -1 49721 return color_exports; -1 49722 }, -1 49723 dom: function dom() { -1 49724 return dom_exports; -1 49725 }, -1 49726 forms: function forms() { -1 49727 return forms_exports; -1 49728 }, -1 49729 matches: function matches() { -1 49730 return matches_default3; -1 49731 }, -1 49732 standards: function standards() { -1 49733 return standards_exports; -1 49734 }, -1 49735 table: function table() { -1 49736 return table_exports; -1 49737 }, -1 49738 text: function text() { -1 49739 return text_exports; -1 49740 }, -1 49741 utils: function utils() { -1 49742 return utils_exports; -1 49743 } -1 49744 }); -1 49745 var forms_exports = {}; -1 49746 __export(forms_exports, { -1 49747 isAriaCombobox: function isAriaCombobox() { -1 49748 return is_aria_combobox_default; -1 49749 }, -1 49750 isAriaListbox: function isAriaListbox() { -1 49751 return is_aria_listbox_default; -1 49752 }, -1 49753 isAriaRange: function isAriaRange() { -1 49754 return is_aria_range_default; -1 49755 }, -1 49756 isAriaTextbox: function isAriaTextbox() { -1 49757 return is_aria_textbox_default; -1 49758 }, -1 49759 isDisabled: function isDisabled() { -1 49760 return is_disabled_default; -1 49761 }, -1 49762 isNativeSelect: function isNativeSelect() { -1 49763 return is_native_select_default; -1 49764 }, -1 49765 isNativeTextbox: function isNativeTextbox() { -1 49766 return is_native_textbox_default; -1 49767 } -1 49768 }); -1 49769 var disabledNodeNames = [ 'fieldset', 'button', 'select', 'input', 'textarea' ]; -1 49770 function isDisabled(virtualNode) { -1 49771 var disabledState = virtualNode._isDisabled; -1 49772 if (typeof disabledState === 'boolean') { -1 49773 return disabledState; -1 49774 } -1 49775 var nodeName2 = virtualNode.props.nodeName; -1 49776 var ariaDisabled = virtualNode.attr('aria-disabled'); -1 49777 if (disabledNodeNames.includes(nodeName2) && virtualNode.hasAttr('disabled')) { -1 49778 disabledState = true; -1 49779 } else if (ariaDisabled) { -1 49780 disabledState = ariaDisabled.toLowerCase() === 'true'; -1 49781 } else if (virtualNode.parent) { -1 49782 disabledState = isDisabled(virtualNode.parent); -1 49783 } else { -1 49784 disabledState = false; -1 49785 } -1 49786 virtualNode._isDisabled = disabledState; -1 49787 return disabledState; -1 49788 } -1 49789 var is_disabled_default = isDisabled; -1 49790 var commons = { -1 49791 aria: aria_exports, -1 49792 color: color_exports, -1 49793 dom: dom_exports, -1 49794 forms: forms_exports, -1 49795 matches: matches_default3, -1 49796 standards: standards_exports, -1 49797 table: table_exports, -1 49798 text: text_exports, -1 49799 utils: utils_exports -1 49800 }; -1 49801 function identicalLinksSamePurposeEvaluate(node, options, virtualNode) { -1 49802 var accText = text_exports.accessibleTextVirtual(virtualNode); -1 49803 var name = text_exports.sanitize(text_exports.removeUnicode(accText, { -1 49804 emoji: true, -1 49805 nonBmp: true, -1 49806 punctuations: true -1 49807 })).toLowerCase(); -1 49808 if (!name) { -1 49809 return void 0; -1 49810 } -1 49811 var afterData = { -1 49812 name: name, -1 49813 urlProps: dom_exports.urlPropsFromAttribute(node, 'href') -1 49814 }; -1 49815 this.data(afterData); -1 49816 this.relatedNodes([ node ]); -1 49817 return true; -1 49818 } -1 49819 var identical_links_same_purpose_evaluate_default = identicalLinksSamePurposeEvaluate; -1 49820 function internalLinkPresentEvaluate(node, options, virtualNode) { -1 49821 var links = query_selector_all_default(virtualNode, 'a[href]'); -1 49822 return links.some(function(vLink) { -1 49823 return /^#[^/!]/.test(vLink.actualNode.getAttribute('href')); -1 49824 }); -1 49825 } -1 49826 var internal_link_present_evaluate_default = internalLinkPresentEvaluate; -1 49827 function metaRefreshEvaluate(node, options, virtualNode) { -1 49828 var content = virtualNode.attr('content') || '', parsedParams = content.split(/[;,]/); -1 49829 return content === '' || parsedParams[0] === '0'; -1 49830 } -1 49831 var meta_refresh_evaluate_default = metaRefreshEvaluate; -1 49832 function normalizeFontWeight(weight) { -1 49833 switch (weight) { -1 49834 case 'lighter': -1 49835 return 100; -1 49836 -1 49837 case 'normal': -1 49838 return 400; -1 49839 -1 49840 case 'bold': -1 49841 return 700; -1 49842 -1 49843 case 'bolder': -1 49844 return 900; -1 49845 } -1 49846 weight = parseInt(weight); -1 49847 return !isNaN(weight) ? weight : 400; -1 49848 } -1 49849 function getTextContainer(elm) { -1 49850 var nextNode = elm; -1 49851 var outerText = elm.textContent.trim(); -1 49852 var innerText = outerText; -1 49853 while (innerText === outerText && nextNode !== void 0) { -1 49854 var _i20 = -1; -1 49855 elm = nextNode; -1 49856 if (elm.children.length === 0) { -1 49857 return elm; -1 49858 } -1 49859 do { -1 49860 _i20++; -1 49861 innerText = elm.children[_i20].textContent.trim(); -1 49862 } while (innerText === '' && _i20 + 1 < elm.children.length); -1 49863 nextNode = elm.children[_i20]; -1 49864 } -1 49865 return elm; -1 49866 } -1 49867 function getStyleValues(node) { -1 49868 var style = window.getComputedStyle(getTextContainer(node)); -1 49869 return { -1 49870 fontWeight: normalizeFontWeight(style.getPropertyValue('font-weight')), -1 49871 fontSize: parseInt(style.getPropertyValue('font-size')), -1 49872 isItalic: style.getPropertyValue('font-style') === 'italic' -1 49873 }; -1 49874 } -1 49875 function isHeaderStyle(styleA, styleB, margins) { -1 49876 return margins.reduce(function(out, margin) { -1 49877 return out || (!margin.size || styleA.fontSize / margin.size > styleB.fontSize) && (!margin.weight || styleA.fontWeight - margin.weight > styleB.fontWeight) && (!margin.italic || styleA.isItalic && !styleB.isItalic); -1 49878 }, false); -1 49879 } -1 49880 function pAsHeadingEvaluate(node, options, virtualNode) { -1 49881 var siblings = Array.from(node.parentNode.children); -1 49882 var currentIndex = siblings.indexOf(node); -1 49883 options = options || {}; -1 49884 var margins = options.margins || []; -1 49885 var nextSibling = siblings.slice(currentIndex + 1).find(function(elm) { -1 49886 return elm.nodeName.toUpperCase() === 'P'; -1 49887 }); -1 49888 var prevSibling = siblings.slice(0, currentIndex).reverse().find(function(elm) { -1 49889 return elm.nodeName.toUpperCase() === 'P'; -1 49890 }); -1 49891 var currStyle = getStyleValues(node); -1 49892 var nextStyle = nextSibling ? getStyleValues(nextSibling) : null; -1 49893 var prevStyle = prevSibling ? getStyleValues(prevSibling) : null; -1 49894 if (!nextStyle || !isHeaderStyle(currStyle, nextStyle, margins)) { -1 49895 return true; -1 49896 } -1 49897 var blockquote = find_up_virtual_default(virtualNode, 'blockquote'); -1 49898 if (blockquote && blockquote.nodeName.toUpperCase() === 'BLOCKQUOTE') { -1 49899 return void 0; -1 49900 } -1 49901 if (prevStyle && !isHeaderStyle(currStyle, prevStyle, margins)) { -1 49902 return void 0; -1 49903 } -1 49904 return false; -1 49905 } -1 49906 var p_as_heading_evaluate_default = pAsHeadingEvaluate; -1 49907 var landmarkRoles = get_aria_roles_by_type_default('landmark'); -1 49908 var implicitAriaLiveRoles = [ 'alert', 'log', 'status' ]; -1 49909 function isRegion(virtualNode, options) { -1 49910 var node = virtualNode.actualNode; -1 49911 var role = get_role_default(virtualNode); -1 49912 var ariaLive = (node.getAttribute('aria-live') || '').toLowerCase().trim(); -1 49913 if ([ 'assertive', 'polite' ].includes(ariaLive) || implicitAriaLiveRoles.includes(role)) { -1 49914 return true; -1 49915 } -1 49916 if (landmarkRoles.includes(role)) { -1 49917 return true; -1 49918 } -1 49919 if (options.regionMatcher && matches_default3(virtualNode, options.regionMatcher)) { -1 49920 return true; -1 49921 } -1 49922 return false; -1 49923 } -1 49924 function findRegionlessElms(virtualNode, options) { -1 49925 var node = virtualNode.actualNode; -1 49926 if (isRegion(virtualNode, options) || is_skip_link_default(virtualNode.actualNode) && get_element_by_reference_default(virtualNode.actualNode, 'href') || !is_visible_default(node, true)) { -1 49927 var vNode = virtualNode; -1 49928 while (vNode) { -1 49929 vNode._hasRegionDescendant = true; -1 49930 vNode = vNode.parent; -1 49931 } -1 49932 return []; -1 49933 } else if (node !== document.body && has_content_default(node, true)) { -1 49934 return [ virtualNode ]; -1 49935 } else { -1 49936 return virtualNode.children.filter(function(_ref55) { -1 49937 var actualNode = _ref55.actualNode; -1 49938 return actualNode.nodeType === 1; -1 49939 }).map(function(vNode) { -1 49940 return findRegionlessElms(vNode, options); -1 49941 }).reduce(function(a, b) { -1 49942 return a.concat(b); -1 49943 }, []); -1 49944 } -1 49945 } -1 49946 function regionEvaluate(node, options, virtualNode) { -1 49947 var regionlessNodes = cache_default.get('regionlessNodes'); -1 49948 if (regionlessNodes) { -1 49949 return !regionlessNodes.includes(virtualNode); -1 49950 } -1 49951 var tree = axe._tree; -1 49952 regionlessNodes = findRegionlessElms(tree[0], options).map(function(vNode) { -1 49953 while (vNode.parent && !vNode.parent._hasRegionDescendant && vNode.parent.actualNode !== document.body) { -1 49954 vNode = vNode.parent; -1 49955 } -1 49956 return vNode; -1 49957 }).filter(function(vNode, index, array) { -1 49958 return array.indexOf(vNode) === index; -1 49959 }); -1 49960 cache_default.set('regionlessNodes', regionlessNodes); -1 49961 return !regionlessNodes.includes(virtualNode); -1 49962 } -1 49963 var region_evaluate_default = regionEvaluate; -1 49964 function skipLinkEvaluate(node) { -1 49965 var target = get_element_by_reference_default(node, 'href'); -1 49966 if (target) { -1 49967 return is_visible_default(target, true) || void 0; -1 49968 } -1 49969 return false; -1 49970 } -1 49971 var skip_link_evaluate_default = skipLinkEvaluate; -1 49972 function uniqueFrameTitleAfter(results) { -1 49973 var titles = {}; -1 49974 results.forEach(function(r) { -1 49975 titles[r.data] = titles[r.data] !== void 0 ? ++titles[r.data] : 0; -1 49976 }); -1 49977 results.forEach(function(r) { -1 49978 r.result = !!titles[r.data]; -1 49979 }); -1 49980 return results; -1 49981 } -1 49982 var unique_frame_title_after_default = uniqueFrameTitleAfter; -1 49983 function uniqueFrameTitleEvaluate(node, options, vNode) { -1 49984 var title = sanitize_default(vNode.attr('title')).toLowerCase(); -1 49985 this.data(title); -1 49986 return true; -1 49987 } -1 49988 var unique_frame_title_evaluate_default = uniqueFrameTitleEvaluate; -1 49989 function ariaLabelEvaluate(node, options, virtualNode) { -1 49990 return !!sanitize_default(arialabel_text_default(virtualNode)); -1 49991 } -1 49992 var aria_label_evaluate_default = ariaLabelEvaluate; -1 49993 function ariaLabelledbyEvaluate(node, options, virtualNode) { -1 49994 try { -1 49995 return !!sanitize_default(arialabelledby_text_default(virtualNode)); -1 49996 } catch (e) { -1 49997 return void 0; -1 49998 } -1 49999 } -1 50000 var aria_labelledby_evaluate_default = ariaLabelledbyEvaluate; -1 50001 function avoidInlineSpacingEvaluate(node, options) { -1 50002 var overriddenProperties = options.cssProperties.filter(function(property) { -1 50003 if (node.style.getPropertyPriority(property) === 'important') { -1 50004 return property; -1 50005 } -1 50006 }); -1 50007 if (overriddenProperties.length > 0) { -1 50008 this.data(overriddenProperties); -1 50009 return false; -1 50010 } -1 50011 return true; -1 50012 } -1 50013 var avoid_inline_spacing_evaluate_default = avoidInlineSpacingEvaluate; -1 50014 function docHasTitleEvaluate() { -1 50015 var title = document.title; -1 50016 return !!sanitize_default(title); -1 50017 } -1 50018 var doc_has_title_evaluate_default = docHasTitleEvaluate; -1 50019 function existsEvaluate() { -1 50020 return void 0; -1 50021 } -1 50022 var exists_evaluate_default = existsEvaluate; -1 50023 function hasAltEvaluate(node, options, virtualNode) { -1 50024 var nodeName2 = virtualNode.props.nodeName; -1 50025 if (![ 'img', 'input', 'area' ].includes(nodeName2)) { -1 50026 return false; -1 50027 } -1 50028 return virtualNode.hasAttr('alt'); -1 50029 } -1 50030 var has_alt_evaluate_default = hasAltEvaluate; -1 50031 function isOnScreenEvaluate(node) { -1 50032 return is_visible_default(node, false) && !is_offscreen_default(node); -1 50033 } -1 50034 var is_on_screen_evaluate_default = isOnScreenEvaluate; -1 50035 function nonEmptyIfPresentEvaluate(node, options, virtualNode) { -1 50036 var nodeName2 = virtualNode.props.nodeName; -1 50037 var type = (virtualNode.attr('type') || '').toLowerCase(); -1 50038 var label5 = virtualNode.attr('value'); -1 50039 if (label5) { -1 50040 this.data({ -1 50041 messageKey: 'has-label' -1 50042 }); -1 50043 } -1 50044 if (nodeName2 === 'input' && [ 'submit', 'reset' ].includes(type)) { -1 50045 return label5 === null; -1 50046 } -1 50047 return false; -1 50048 } -1 50049 var non_empty_if_present_evaluate_default = nonEmptyIfPresentEvaluate; -1 50050 function presentationalRoleEvaluate(node, options, virtualNode) { -1 50051 var role = get_role_default(virtualNode); -1 50052 var explicitRole2 = get_explicit_role_default(virtualNode); -1 50053 if ([ 'presentation', 'none' ].includes(role)) { -1 50054 this.data({ -1 50055 role: role -1 50056 }); -1 50057 return true; -1 50058 } -1 50059 if (![ 'presentation', 'none' ].includes(explicitRole2)) { -1 50060 return false; -1 50061 } -1 50062 var hasGlobalAria = get_global_aria_attrs_default().some(function(attr) { -1 50063 return virtualNode.hasAttr(attr); -1 50064 }); -1 50065 var focusable = is_focusable_default(virtualNode); -1 50066 var messageKey; -1 50067 if (hasGlobalAria && !focusable) { -1 50068 messageKey = 'globalAria'; -1 50069 } else if (!hasGlobalAria && focusable) { -1 50070 messageKey = 'focusable'; -1 50071 } else { -1 50072 messageKey = 'both'; -1 50073 } -1 50074 this.data({ -1 50075 messageKey: messageKey, -1 50076 role: role -1 50077 }); -1 50078 return false; -1 50079 } -1 50080 var presentational_role_evaluate_default = presentationalRoleEvaluate; -1 50081 function svgNonEmptyTitleEvaluate(node, options, virtualNode) { -1 50082 if (!virtualNode.children) { -1 50083 return void 0; -1 50084 } -1 50085 var titleNode = virtualNode.children.find(function(_ref56) { -1 50086 var props = _ref56.props; -1 50087 return props.nodeName === 'title'; -1 50088 }); -1 50089 if (!titleNode) { -1 50090 this.data({ -1 50091 messageKey: 'noTitle' -1 50092 }); -1 50093 return false; -1 50094 } -1 50095 try { -1 50096 if (visible_virtual_default(titleNode) === '') { -1 50097 this.data({ -1 50098 messageKey: 'emptyTitle' -1 50099 }); -1 50100 return false; 29429 50101 }29430 -1 conf.on('clear' + postfix, function() {29431 -1 forEach(timeouts, function(id) {29432 -1 clearTimeout(id);-1 50102 } catch (e) { -1 50103 return void 0; -1 50104 } -1 50105 return true; -1 50106 } -1 50107 var svg_non_empty_title_evaluate_default = svgNonEmptyTitleEvaluate; -1 50108 function cssOrientationLockEvaluate(node, options, virtualNode, context3) { -1 50109 var _ref57 = context3 || {}, _ref57$cssom = _ref57.cssom, cssom = _ref57$cssom === void 0 ? void 0 : _ref57$cssom; -1 50110 var _ref58 = options || {}, _ref58$degreeThreshol = _ref58.degreeThreshold, degreeThreshold = _ref58$degreeThreshol === void 0 ? 0 : _ref58$degreeThreshol; -1 50111 if (!cssom || !cssom.length) { -1 50112 return void 0; -1 50113 } -1 50114 var isLocked = false; -1 50115 var relatedElements = []; -1 50116 var rulesGroupByDocumentFragment = groupCssomByDocument(cssom); -1 50117 var _loop6 = function _loop6() { -1 50118 var key = _Object$keys2[_i21]; -1 50119 var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules; -1 50120 var orientationRules = rules.filter(isMediaRuleWithOrientation); -1 50121 if (!orientationRules.length) { -1 50122 return 'continue'; -1 50123 } -1 50124 orientationRules.forEach(function(_ref59) { -1 50125 var cssRules = _ref59.cssRules; -1 50126 Array.from(cssRules).forEach(function(cssRule) { -1 50127 var locked = getIsOrientationLocked(cssRule); -1 50128 if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') { -1 50129 var elms = Array.from(root.querySelectorAll(cssRule.selectorText)) || []; -1 50130 relatedElements = relatedElements.concat(elms); -1 50131 } -1 50132 isLocked = isLocked || locked; 29433 50133 });29434 -1 timeouts = {};29435 -1 if (preFetchTimeouts) {29436 -1 forEach(preFetchTimeouts, function(id) {29437 -1 if (id !== 'nextTick') {29438 -1 clearTimeout(id);29439 -1 }29440 -1 });29441 -1 preFetchTimeouts = {};29442 -1 }29443 50134 }); 29444 50135 };29445 -1 },29446 -1 './node_modules/memoizee/ext/max.js': function node_modulesMemoizeeExtMaxJs(module, exports, __webpack_require__) {29447 -1 'use strict';29448 -1 var toPosInteger = __webpack_require__('./node_modules/es5-ext/number/to-pos-integer.js'), lruQueue = __webpack_require__('./node_modules/lru-queue/index.js'), extensions = __webpack_require__('./node_modules/memoizee/lib/registered-extensions.js');29449 -1 extensions.max = function(max, conf, options) {29450 -1 var postfix, queue, hit;29451 -1 max = toPosInteger(max);29452 -1 if (!max) {29453 -1 return;-1 50136 for (var _i21 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i21 < _Object$keys2.length; _i21++) { -1 50137 var _ret3 = _loop6(); -1 50138 if (_ret3 === 'continue') { -1 50139 continue; 29454 50140 }29455 -1 queue = lruQueue(max);29456 -1 postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';29457 -1 conf.on('set' + postfix, hit = function hit(id) {29458 -1 id = queue.hit(id);29459 -1 if (id === undefined) {29460 -1 return;-1 50141 } -1 50142 if (!isLocked) { -1 50143 return true; -1 50144 } -1 50145 if (relatedElements.length) { -1 50146 this.relatedNodes(relatedElements); -1 50147 } -1 50148 return false; -1 50149 function groupCssomByDocument(cssObjectModel) { -1 50150 return cssObjectModel.reduce(function(out, _ref60) { -1 50151 var sheet = _ref60.sheet, root = _ref60.root, shadowId = _ref60.shadowId; -1 50152 var key = shadowId ? shadowId : 'topDocument'; -1 50153 if (!out[key]) { -1 50154 out[key] = { -1 50155 root: root, -1 50156 rules: [] -1 50157 }; 29461 50158 }29462 -1 conf['delete'](id);29463 -1 });29464 -1 conf.on('get' + postfix, hit);29465 -1 conf.on('delete' + postfix, queue['delete']);29466 -1 conf.on('clear' + postfix, queue.clear);29467 -1 };29468 -1 },29469 -1 './node_modules/memoizee/ext/promise.js': function node_modulesMemoizeeExtPromiseJs(module, exports, __webpack_require__) {29470 -1 'use strict';29471 -1 var objectMap = __webpack_require__('./node_modules/es5-ext/object/map.js'), primitiveSet = __webpack_require__('./node_modules/es5-ext/object/primitive-set.js'), ensureString = __webpack_require__('./node_modules/es5-ext/object/validate-stringifiable-value.js'), toShortString = __webpack_require__('./node_modules/es5-ext/to-short-string-representation.js'), isPromise = __webpack_require__('./node_modules/is-promise/index.js'), nextTick = __webpack_require__('./node_modules/next-tick/index.js');29472 -1 var create = Object.create, supportedModes = primitiveSet('then', 'then:finally', 'done', 'done:finally');29473 -1 __webpack_require__('./node_modules/memoizee/lib/registered-extensions.js').promise = function(mode, conf) {29474 -1 var waiting = create(null), cache = create(null), promises = create(null);29475 -1 if (mode === true) {29476 -1 mode = null;29477 -1 } else {29478 -1 mode = ensureString(mode);29479 -1 if (!supportedModes[mode]) {29480 -1 throw new TypeError('\'' + toShortString(mode) + '\' is not valid promise mode');-1 50159 if (!sheet || !sheet.cssRules) { -1 50160 return out; 29481 50161 } -1 50162 var rules = Array.from(sheet.cssRules); -1 50163 out[key].rules = out[key].rules.concat(rules); -1 50164 return out; -1 50165 }, {}); -1 50166 } -1 50167 function isMediaRuleWithOrientation(_ref61) { -1 50168 var type = _ref61.type, cssText = _ref61.cssText; -1 50169 if (type !== 4) { -1 50170 return false; 29482 50171 }29483 -1 conf.on('set', function(id, ignore, promise) {29484 -1 var isFailed = false;29485 -1 if (!isPromise(promise)) {29486 -1 cache[id] = promise;29487 -1 conf.emit('setasync', id, 1);29488 -1 return;29489 -1 }29490 -1 waiting[id] = 1;29491 -1 promises[id] = promise;29492 -1 var onSuccess = function onSuccess(result) {29493 -1 var count = waiting[id];29494 -1 if (isFailed) {29495 -1 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)\n' + 'Consider to rely on \'then\' or \'done\' mode instead.');29496 -1 }29497 -1 if (!count) {29498 -1 return;29499 -1 }29500 -1 delete waiting[id];29501 -1 cache[id] = result;29502 -1 conf.emit('setasync', id, count);29503 -1 };29504 -1 var onFailure = function onFailure() {29505 -1 isFailed = true;29506 -1 if (!waiting[id]) {29507 -1 return;29508 -1 }29509 -1 delete waiting[id];29510 -1 delete promises[id];29511 -1 conf['delete'](id);29512 -1 };29513 -1 var resolvedMode = mode;29514 -1 if (!resolvedMode) {29515 -1 resolvedMode = 'then';29516 -1 }29517 -1 if (resolvedMode === 'then') {29518 -1 var nextTickFailure = function nextTickFailure() {29519 -1 nextTick(onFailure);29520 -1 };29521 -1 promise = promise.then(function(result) {29522 -1 nextTick(onSuccess.bind(this, result));29523 -1 }, nextTickFailure);29524 -1 if (typeof promise['finally'] === 'function') {29525 -1 promise['finally'](nextTickFailure);29526 -1 }29527 -1 } else if (resolvedMode === 'done') {29528 -1 if (typeof promise.done !== 'function') {29529 -1 throw new Error('Memoizee error: Retrieved promise does not implement \'done\' ' + 'in \'done\' mode');29530 -1 }29531 -1 promise.done(onSuccess, onFailure);29532 -1 } else if (resolvedMode === 'done:finally') {29533 -1 if (typeof promise.done !== 'function') {29534 -1 throw new Error('Memoizee error: Retrieved promise does not implement \'done\' ' + 'in \'done:finally\' mode');29535 -1 }29536 -1 if (typeof promise['finally'] !== 'function') {29537 -1 throw new Error('Memoizee error: Retrieved promise does not implement \'finally\' ' + 'in \'done:finally\' mode');29538 -1 }29539 -1 promise.done(onSuccess);29540 -1 promise['finally'](onFailure);29541 -1 }29542 -1 });29543 -1 conf.on('get', function(id, args, context) {29544 -1 var promise;29545 -1 if (waiting[id]) {29546 -1 ++waiting[id];-1 50172 return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText); -1 50173 } -1 50174 function getIsOrientationLocked(_ref62) { -1 50175 var selectorText = _ref62.selectorText, style = _ref62.style; -1 50176 if (!selectorText || style.length <= 0) { -1 50177 return false; -1 50178 } -1 50179 var transformStyle = style.transform || style.webkitTransform || style.msTransform || false; -1 50180 if (!transformStyle) { -1 50181 return false; -1 50182 } -1 50183 var matches14 = transformStyle.match(/(rotate|rotateZ|rotate3d|matrix|matrix3d)\(([^)]+)\)(?!.*(rotate|rotateZ|rotate3d|matrix|matrix3d))/); -1 50184 if (!matches14) { -1 50185 return false; -1 50186 } -1 50187 var _matches = _slicedToArray(matches14, 3), transformFn = _matches[1], transformFnValue = _matches[2]; -1 50188 var degrees = getRotationInDegrees(transformFn, transformFnValue); -1 50189 if (!degrees) { -1 50190 return false; -1 50191 } -1 50192 degrees = Math.abs(degrees); -1 50193 if (Math.abs(degrees - 180) % 180 <= degreeThreshold) { -1 50194 return false; -1 50195 } -1 50196 return Math.abs(degrees - 90) % 90 <= degreeThreshold; -1 50197 } -1 50198 function getRotationInDegrees(transformFunction, transformFnValue) { -1 50199 switch (transformFunction) { -1 50200 case 'rotate': -1 50201 case 'rotateZ': -1 50202 return getAngleInDegrees(transformFnValue); -1 50203 -1 50204 case 'rotate3d': -1 50205 var _transformFnValue$spl = transformFnValue.split(',').map(function(value) { -1 50206 return value.trim(); -1 50207 }), _transformFnValue$spl2 = _slicedToArray(_transformFnValue$spl, 4), z = _transformFnValue$spl2[2], angleWithUnit = _transformFnValue$spl2[3]; -1 50208 if (parseInt(z) === 0) { 29547 50209 return; 29548 50210 }29549 -1 promise = promises[id];29550 -1 var emit = function emit() {29551 -1 conf.emit('getasync', id, args, context);29552 -1 };29553 -1 if (isPromise(promise)) {29554 -1 if (typeof promise.done === 'function') {29555 -1 promise.done(emit);29556 -1 } else {29557 -1 promise.then(function() {29558 -1 nextTick(emit);29559 -1 });29560 -1 }29561 -1 } else {29562 -1 emit();29563 -1 }-1 50211 return getAngleInDegrees(angleWithUnit); -1 50212 -1 50213 case 'matrix': -1 50214 case 'matrix3d': -1 50215 return getAngleInDegreesFromMatrixTransform(transformFnValue); -1 50216 -1 50217 default: -1 50218 return; -1 50219 } -1 50220 } -1 50221 function getAngleInDegrees(angleWithUnit) { -1 50222 var _ref63 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref64 = _slicedToArray(_ref63, 1), unit = _ref64[0]; -1 50223 if (!unit) { -1 50224 return; -1 50225 } -1 50226 var angle = parseFloat(angleWithUnit.replace(unit, '')); -1 50227 switch (unit) { -1 50228 case 'rad': -1 50229 return convertRadToDeg(angle); -1 50230 -1 50231 case 'grad': -1 50232 return convertGradToDeg(angle); -1 50233 -1 50234 case 'turn': -1 50235 return convertTurnToDeg(angle); -1 50236 -1 50237 case 'deg': -1 50238 default: -1 50239 return parseInt(angle); -1 50240 } -1 50241 } -1 50242 function getAngleInDegreesFromMatrixTransform(transformFnValue) { -1 50243 var values = transformFnValue.split(','); -1 50244 if (values.length <= 6) { -1 50245 var _values = _slicedToArray(values, 2), a = _values[0], b2 = _values[1]; -1 50246 var radians = Math.atan2(parseFloat(b2), parseFloat(a)); -1 50247 return convertRadToDeg(radians); -1 50248 } -1 50249 var sinB = parseFloat(values[8]); -1 50250 var b = Math.asin(sinB); -1 50251 var cosB = Math.cos(b); -1 50252 var rotateZRadians = Math.acos(parseFloat(values[0]) / cosB); -1 50253 return convertRadToDeg(rotateZRadians); -1 50254 } -1 50255 function convertRadToDeg(radians) { -1 50256 return Math.round(radians * (180 / Math.PI)); -1 50257 } -1 50258 function convertGradToDeg(grad) { -1 50259 grad = grad % 400; -1 50260 if (grad < 0) { -1 50261 grad += 400; -1 50262 } -1 50263 return Math.round(grad / 400 * 360); -1 50264 } -1 50265 function convertTurnToDeg(turn) { -1 50266 return Math.round(360 / (1 / turn)); -1 50267 } -1 50268 } -1 50269 var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate; -1 50270 function metaViewportScaleEvaluate(node, options, virtualNode) { -1 50271 var _ref65 = options || {}, _ref65$scaleMinimum = _ref65.scaleMinimum, scaleMinimum = _ref65$scaleMinimum === void 0 ? 2 : _ref65$scaleMinimum, _ref65$lowerBound = _ref65.lowerBound, lowerBound = _ref65$lowerBound === void 0 ? false : _ref65$lowerBound; -1 50272 var content = virtualNode.attr('content') || ''; -1 50273 if (!content) { -1 50274 return true; -1 50275 } -1 50276 var result = content.split(/[;,]/).reduce(function(out, item) { -1 50277 var contentValue = item.trim(); -1 50278 if (!contentValue) { -1 50279 return out; -1 50280 } -1 50281 var _contentValue$split = contentValue.split('='), _contentValue$split2 = _slicedToArray(_contentValue$split, 2), key = _contentValue$split2[0], value = _contentValue$split2[1]; -1 50282 if (!key || !value) { -1 50283 return out; -1 50284 } -1 50285 var curatedKey = key.toLowerCase().trim(); -1 50286 var curatedValue = value.toLowerCase().trim(); -1 50287 if (curatedKey === 'maximum-scale' && curatedValue === 'yes') { -1 50288 curatedValue = 1; -1 50289 } -1 50290 if (curatedKey === 'maximum-scale' && parseFloat(curatedValue) < 0) { -1 50291 return out; -1 50292 } -1 50293 out[curatedKey] = curatedValue; -1 50294 return out; -1 50295 }, {}); -1 50296 if (lowerBound && result['maximum-scale'] && parseFloat(result['maximum-scale']) < lowerBound) { -1 50297 return true; -1 50298 } -1 50299 if (!lowerBound && result['user-scalable'] === 'no') { -1 50300 this.data('user-scalable=no'); -1 50301 return false; -1 50302 } -1 50303 var userScalableAsFloat = parseFloat(result['user-scalable']); -1 50304 if (!lowerBound && result['user-scalable'] && (userScalableAsFloat || userScalableAsFloat === 0) && userScalableAsFloat > -1 && userScalableAsFloat < 1) { -1 50305 this.data('user-scalable'); -1 50306 return false; -1 50307 } -1 50308 if (result['maximum-scale'] && parseFloat(result['maximum-scale']) < scaleMinimum) { -1 50309 this.data('maximum-scale'); -1 50310 return false; -1 50311 } -1 50312 return true; -1 50313 } -1 50314 var meta_viewport_scale_evaluate_default = metaViewportScaleEvaluate; -1 50315 function duplicateIdAfter(results) { -1 50316 var uniqueIds = []; -1 50317 return results.filter(function(r) { -1 50318 if (uniqueIds.indexOf(r.data) === -1) { -1 50319 uniqueIds.push(r.data); -1 50320 return true; -1 50321 } -1 50322 return false; -1 50323 }); -1 50324 } -1 50325 var duplicate_id_after_default = duplicateIdAfter; -1 50326 function duplicateIdEvaluate(node) { -1 50327 var id = node.getAttribute('id').trim(); -1 50328 if (!id) { -1 50329 return true; -1 50330 } -1 50331 var root = get_root_node_default2(node); -1 50332 var matchingNodes = Array.from(root.querySelectorAll('[id="'.concat(escape_selector_default(id), '"]'))).filter(function(foundNode) { -1 50333 return foundNode !== node; -1 50334 }); -1 50335 if (matchingNodes.length) { -1 50336 this.relatedNodes(matchingNodes); -1 50337 } -1 50338 this.data(id); -1 50339 return matchingNodes.length === 0; -1 50340 } -1 50341 var duplicate_id_evaluate_default = duplicateIdEvaluate; -1 50342 function accesskeysAfter(results) { -1 50343 var seen = {}; -1 50344 return results.filter(function(r) { -1 50345 if (!r.data) { -1 50346 return false; -1 50347 } -1 50348 var key = r.data.toUpperCase(); -1 50349 if (!seen[key]) { -1 50350 seen[key] = r; -1 50351 r.relatedNodes = []; -1 50352 return true; -1 50353 } -1 50354 seen[key].relatedNodes.push(r.relatedNodes[0]); -1 50355 return false; -1 50356 }).map(function(r) { -1 50357 r.result = !!r.relatedNodes.length; -1 50358 return r; -1 50359 }); -1 50360 } -1 50361 var accesskeys_after_default = accesskeysAfter; -1 50362 function accesskeysEvaluate(node) { -1 50363 if (is_visible_default(node, false)) { -1 50364 this.data(node.getAttribute('accesskey')); -1 50365 this.relatedNodes([ node ]); -1 50366 } -1 50367 return true; -1 50368 } -1 50369 var accesskeys_evaluate_default = accesskeysEvaluate; -1 50370 function focusableContentEvaluate(node, options, virtualNode) { -1 50371 var tabbableElements = virtualNode.tabbableElements; -1 50372 if (!tabbableElements) { -1 50373 return false; -1 50374 } -1 50375 var tabbableContentElements = tabbableElements.filter(function(el) { -1 50376 return el !== virtualNode; -1 50377 }); -1 50378 return tabbableContentElements.length > 0; -1 50379 } -1 50380 var focusable_content_evaluate_default = focusableContentEvaluate; -1 50381 function focusableDisabledEvaluate(node, options, virtualNode) { -1 50382 var elementsThatCanBeDisabled = [ 'BUTTON', 'FIELDSET', 'INPUT', 'SELECT', 'TEXTAREA' ]; -1 50383 var tabbableElements = virtualNode.tabbableElements; -1 50384 if (!tabbableElements || !tabbableElements.length) { -1 50385 return true; -1 50386 } -1 50387 var relatedNodes = tabbableElements.reduce(function(out, _ref66) { -1 50388 var el = _ref66.actualNode; -1 50389 var nodeName2 = el.nodeName.toUpperCase(); -1 50390 if (elementsThatCanBeDisabled.includes(nodeName2)) { -1 50391 out.push(el); -1 50392 } -1 50393 return out; -1 50394 }, []); -1 50395 this.relatedNodes(relatedNodes); -1 50396 if (relatedNodes.length && is_modal_open_default()) { -1 50397 return true; -1 50398 } -1 50399 return relatedNodes.length === 0; -1 50400 } -1 50401 var focusable_disabled_evaluate_default = focusableDisabledEvaluate; -1 50402 function focusableElementEvaluate(node, options, virtualNode) { -1 50403 if (virtualNode.hasAttr('contenteditable') && isContenteditable(virtualNode)) { -1 50404 return true; -1 50405 } -1 50406 var isFocusable2 = virtualNode.isFocusable; -1 50407 var tabIndex = parseInt(virtualNode.attr('tabindex'), 10); -1 50408 tabIndex = !isNaN(tabIndex) ? tabIndex : null; -1 50409 return tabIndex ? isFocusable2 && tabIndex >= 0 : isFocusable2; -1 50410 function isContenteditable(vNode) { -1 50411 var contenteditable = vNode.attr('contenteditable'); -1 50412 if (contenteditable === 'true' || contenteditable === '') { -1 50413 return true; -1 50414 } -1 50415 if (contenteditable === 'false') { -1 50416 return false; -1 50417 } -1 50418 var ancestor = closest_default(virtualNode.parent, '[contenteditable]'); -1 50419 if (!ancestor) { -1 50420 return false; -1 50421 } -1 50422 return isContenteditable(ancestor); -1 50423 } -1 50424 } -1 50425 var focusable_element_evaluate_default = focusableElementEvaluate; -1 50426 function focusableModalOpenEvaluate(node, options, virtualNode) { -1 50427 var tabbableElements = virtualNode.tabbableElements.map(function(_ref67) { -1 50428 var actualNode = _ref67.actualNode; -1 50429 return actualNode; -1 50430 }); -1 50431 if (!tabbableElements || !tabbableElements.length) { -1 50432 return true; -1 50433 } -1 50434 if (is_modal_open_default()) { -1 50435 this.relatedNodes(tabbableElements); -1 50436 return void 0; -1 50437 } -1 50438 return true; -1 50439 } -1 50440 var focusable_modal_open_evaluate_default = focusableModalOpenEvaluate; -1 50441 function focusableNoNameEvaluate(node, options, virtualNode) { -1 50442 var tabIndex = virtualNode.attr('tabindex'); -1 50443 var inFocusOrder = is_focusable_default(virtualNode) && tabIndex > -1; -1 50444 if (!inFocusOrder) { -1 50445 return false; -1 50446 } -1 50447 try { -1 50448 return !accessible_text_virtual_default(virtualNode); -1 50449 } catch (e) { -1 50450 return void 0; -1 50451 } -1 50452 } -1 50453 var focusable_no_name_evaluate_default = focusableNoNameEvaluate; -1 50454 function focusableNotTabbableEvaluate(node, options, virtualNode) { -1 50455 var elementsThatCanBeDisabled = [ 'BUTTON', 'FIELDSET', 'INPUT', 'SELECT', 'TEXTAREA' ]; -1 50456 var tabbableElements = virtualNode.tabbableElements; -1 50457 if (!tabbableElements || !tabbableElements.length) { -1 50458 return true; -1 50459 } -1 50460 var relatedNodes = tabbableElements.reduce(function(out, _ref68) { -1 50461 var el = _ref68.actualNode; -1 50462 var nodeName2 = el.nodeName.toUpperCase(); -1 50463 if (!elementsThatCanBeDisabled.includes(nodeName2)) { -1 50464 out.push(el); -1 50465 } -1 50466 return out; -1 50467 }, []); -1 50468 this.relatedNodes(relatedNodes); -1 50469 if (relatedNodes.length > 0 && is_modal_open_default()) { -1 50470 return true; -1 50471 } -1 50472 return relatedNodes.length === 0; -1 50473 } -1 50474 var focusable_not_tabbable_evaluate_default = focusableNotTabbableEvaluate; -1 50475 function landmarkIsTopLevelEvaluate(node) { -1 50476 var landmarks = get_aria_roles_by_type_default('landmark'); -1 50477 var parent = get_composed_parent_default(node); -1 50478 var nodeRole = get_role_default(node); -1 50479 this.data({ -1 50480 role: nodeRole -1 50481 }); -1 50482 while (parent) { -1 50483 var role = parent.getAttribute('role'); -1 50484 if (!role && parent.nodeName.toUpperCase() !== 'FORM') { -1 50485 role = implicit_role_default(parent); -1 50486 } -1 50487 if (role && landmarks.includes(role) && !(role === 'main' && nodeRole === 'complementary')) { -1 50488 return false; -1 50489 } -1 50490 parent = get_composed_parent_default(parent); -1 50491 } -1 50492 return true; -1 50493 } -1 50494 var landmark_is_top_level_evaluate_default = landmarkIsTopLevelEvaluate; -1 50495 function focusableDescendants(vNode) { -1 50496 if (is_focusable_default(vNode)) { -1 50497 return true; -1 50498 } -1 50499 if (!vNode.children) { -1 50500 if (vNode.props.nodeType === 1) { -1 50501 throw new Error('Cannot determine children'); -1 50502 } -1 50503 return false; -1 50504 } -1 50505 return vNode.children.some(function(child) { -1 50506 return focusableDescendants(child); -1 50507 }); -1 50508 } -1 50509 function noFocusbleContentEvaluate(node, options, virtualNode) { -1 50510 if (!virtualNode.children) { -1 50511 return void 0; -1 50512 } -1 50513 try { -1 50514 return !virtualNode.children.some(function(child) { -1 50515 return focusableDescendants(child); 29564 50516 });29565 -1 conf.on('delete', function(id) {29566 -1 delete promises[id];29567 -1 if (waiting[id]) {29568 -1 delete waiting[id];29569 -1 return;-1 50517 } catch (e) { -1 50518 return void 0; -1 50519 } -1 50520 } -1 50521 var no_focusable_content_evaluate_default = noFocusbleContentEvaluate; -1 50522 function tabindexEvaluate(node, options, virtualNode) { -1 50523 var tabIndex = parseInt(virtualNode.attr('tabindex'), 10); -1 50524 return isNaN(tabIndex) ? true : tabIndex <= 0; -1 50525 } -1 50526 var tabindex_evaluate_default = tabindexEvaluate; -1 50527 function altSpaceValueEvaluate(node, options, virtualNode) { -1 50528 var alt = virtualNode.attr('alt'); -1 50529 var isOnlySpace = /^\s+$/; -1 50530 return typeof alt === 'string' && isOnlySpace.test(alt); -1 50531 } -1 50532 var alt_space_value_evaluate_default = altSpaceValueEvaluate; -1 50533 function duplicateImgLabelEvaluate(node, options, virtualNode) { -1 50534 if ([ 'none', 'presentation' ].includes(get_role_default(virtualNode))) { -1 50535 return false; -1 50536 } -1 50537 var parentVNode = closest_default(virtualNode, options.parentSelector); -1 50538 if (!parentVNode) { -1 50539 return false; -1 50540 } -1 50541 var visibleText = visible_virtual_default(parentVNode, true).toLowerCase(); -1 50542 if (visibleText === '') { -1 50543 return false; -1 50544 } -1 50545 return visibleText === accessible_text_virtual_default(virtualNode).toLowerCase(); -1 50546 } -1 50547 var duplicate_img_label_evaluate_default = duplicateImgLabelEvaluate; -1 50548 function explicitEvaluate(node, options, virtualNode) { -1 50549 if (virtualNode.attr('id')) { -1 50550 if (!virtualNode.actualNode) { -1 50551 return void 0; -1 50552 } -1 50553 var root = get_root_node_default2(virtualNode.actualNode); -1 50554 var id = escape_selector_default(virtualNode.attr('id')); -1 50555 var labels = Array.from(root.querySelectorAll('label[for="'.concat(id, '"]'))); -1 50556 if (labels.length) { -1 50557 try { -1 50558 return labels.some(function(label5) { -1 50559 if (!is_visible_default(label5)) { -1 50560 return true; -1 50561 } else { -1 50562 return !!accessible_text_default(label5); -1 50563 } -1 50564 }); -1 50565 } catch (e) { -1 50566 return void 0; 29570 50567 }29571 -1 if (!hasOwnProperty.call(cache, id)) {29572 -1 return;-1 50568 } -1 50569 } -1 50570 return false; -1 50571 } -1 50572 var explicit_evaluate_default = explicitEvaluate; -1 50573 function helpSameAsLabelEvaluate(node, options, virtualNode) { -1 50574 var labelText2 = label_virtual_default2(virtualNode), check4 = node.getAttribute('title'); -1 50575 if (!labelText2) { -1 50576 return false; -1 50577 } -1 50578 if (!check4) { -1 50579 check4 = ''; -1 50580 if (node.getAttribute('aria-describedby')) { -1 50581 var ref = idrefs_default(node, 'aria-describedby'); -1 50582 check4 = ref.map(function(thing) { -1 50583 return thing ? accessible_text_default(thing) : ''; -1 50584 }).join(''); -1 50585 } -1 50586 } -1 50587 return sanitize_default(check4) === sanitize_default(labelText2); -1 50588 } -1 50589 var help_same_as_label_evaluate_default = helpSameAsLabelEvaluate; -1 50590 function hiddenExplicitLabelEvaluate(node, options, virtualNode) { -1 50591 if (virtualNode.hasAttr('id')) { -1 50592 if (!virtualNode.actualNode) { -1 50593 return void 0; -1 50594 } -1 50595 var root = get_root_node_default2(node); -1 50596 var id = escape_selector_default(node.getAttribute('id')); -1 50597 var label5 = root.querySelector('label[for="'.concat(id, '"]')); -1 50598 if (label5 && !is_visible_default(label5, true)) { -1 50599 var name; -1 50600 try { -1 50601 name = accessible_text_virtual_default(virtualNode).trim(); -1 50602 } catch (e) { -1 50603 return void 0; 29573 50604 }29574 -1 var result = cache[id];29575 -1 delete cache[id];29576 -1 conf.emit('deleteasync', id, [ result ]);-1 50605 var isNameEmpty = name === ''; -1 50606 return isNameEmpty; -1 50607 } -1 50608 } -1 50609 return false; -1 50610 } -1 50611 var hidden_explicit_label_evaluate_default = hiddenExplicitLabelEvaluate; -1 50612 function implicitEvaluate(node, options, virtualNode) { -1 50613 try { -1 50614 var label5 = closest_default(virtualNode, 'label'); -1 50615 if (label5) { -1 50616 return !!accessible_text_virtual_default(label5, { -1 50617 inControlContext: true -1 50618 }); -1 50619 } -1 50620 return false; -1 50621 } catch (e) { -1 50622 return void 0; -1 50623 } -1 50624 } -1 50625 var implicit_evaluate_default = implicitEvaluate; -1 50626 function isStringContained(compare, compareWith) { -1 50627 var curatedCompareWith = curateString(compareWith); -1 50628 var curatedCompare = curateString(compare); -1 50629 if (!curatedCompareWith || !curatedCompare) { -1 50630 return false; -1 50631 } -1 50632 return curatedCompareWith.includes(curatedCompare); -1 50633 } -1 50634 function curateString(str) { -1 50635 var noUnicodeStr = remove_unicode_default(str, { -1 50636 emoji: true, -1 50637 nonBmp: true, -1 50638 punctuations: true -1 50639 }); -1 50640 return sanitize_default(noUnicodeStr); -1 50641 } -1 50642 function labelContentNameMismatchEvaluate(node, options, virtualNode) { -1 50643 var _ref69 = options || {}, pixelThreshold = _ref69.pixelThreshold, occuranceThreshold = _ref69.occuranceThreshold; -1 50644 var accText = accessible_text_default(node).toLowerCase(); -1 50645 if (is_human_interpretable_default(accText) < 1) { -1 50646 return void 0; -1 50647 } -1 50648 var textVNodes = visible_text_nodes_default(virtualNode); -1 50649 var nonLigatureText = textVNodes.filter(function(textVNode) { -1 50650 return !is_icon_ligature_default(textVNode, pixelThreshold, occuranceThreshold); -1 50651 }).map(function(textVNode) { -1 50652 return textVNode.actualNode.nodeValue; -1 50653 }).join(''); -1 50654 var visibleText = sanitize_default(nonLigatureText).toLowerCase(); -1 50655 if (!visibleText) { -1 50656 return true; -1 50657 } -1 50658 if (is_human_interpretable_default(visibleText) < 1) { -1 50659 if (isStringContained(visibleText, accText)) { -1 50660 return true; -1 50661 } -1 50662 return void 0; -1 50663 } -1 50664 return isStringContained(visibleText, accText); -1 50665 } -1 50666 var label_content_name_mismatch_evaluate_default = labelContentNameMismatchEvaluate; -1 50667 function multipleLabelEvaluate(node) { -1 50668 var id = escape_selector_default(node.getAttribute('id')); -1 50669 var parent = node.parentNode; -1 50670 var root = get_root_node_default2(node); -1 50671 root = root.documentElement || root; -1 50672 var labels = Array.from(root.querySelectorAll('label[for="'.concat(id, '"]'))); -1 50673 if (labels.length) { -1 50674 labels = labels.filter(function(label5) { -1 50675 return is_visible_default(label5); 29577 50676 });29578 -1 conf.on('clear', function() {29579 -1 var oldCache = cache;29580 -1 cache = create(null);29581 -1 waiting = create(null);29582 -1 promises = create(null);29583 -1 conf.emit('clearasync', objectMap(oldCache, function(data) {29584 -1 return [ data ];29585 -1 }));-1 50677 } -1 50678 while (parent) { -1 50679 if (parent.nodeName.toUpperCase() === 'LABEL' && labels.indexOf(parent) === -1) { -1 50680 labels.push(parent); -1 50681 } -1 50682 parent = parent.parentNode; -1 50683 } -1 50684 this.relatedNodes(labels); -1 50685 if (labels.length > 1) { -1 50686 var ATVisibleLabels = labels.filter(function(label5) { -1 50687 return is_visible_default(label5, true); 29586 50688 });29587 -1 };29588 -1 },29589 -1 './node_modules/memoizee/ext/ref-counter.js': function node_modulesMemoizeeExtRefCounterJs(module, exports, __webpack_require__) {29590 -1 'use strict';29591 -1 var d = __webpack_require__('./node_modules/d/index.js'), extensions = __webpack_require__('./node_modules/memoizee/lib/registered-extensions.js'), create = Object.create, defineProperties = Object.defineProperties;29592 -1 extensions.refCounter = function(ignore, conf, options) {29593 -1 var cache, postfix;29594 -1 cache = create(null);29595 -1 postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';29596 -1 conf.on('set' + postfix, function(id, length) {29597 -1 cache[id] = length || 1;-1 50689 if (ATVisibleLabels.length > 1) { -1 50690 return void 0; -1 50691 } -1 50692 var labelledby = idrefs_default(node, 'aria-labelledby'); -1 50693 return !labelledby.includes(ATVisibleLabels[0]) ? void 0 : false; -1 50694 } -1 50695 return false; -1 50696 } -1 50697 var multiple_label_evaluate_default = multipleLabelEvaluate; -1 50698 function titleOnlyEvaluate(node, options, virtualNode) { -1 50699 var labelText2 = label_virtual_default2(virtualNode); -1 50700 var title = title_text_default(virtualNode); -1 50701 var ariaDescribedBy = virtualNode.attr('aria-describedby'); -1 50702 return !labelText2 && !!(title || ariaDescribedBy); -1 50703 } -1 50704 var title_only_evaluate_default = titleOnlyEvaluate; -1 50705 function landmarkIsUniqueAfter(results) { -1 50706 var uniqueLandmarks = []; -1 50707 return results.filter(function(currentResult) { -1 50708 var findMatch = function findMatch(someResult) { -1 50709 return currentResult.data.role === someResult.data.role && currentResult.data.accessibleText === someResult.data.accessibleText; -1 50710 }; -1 50711 var matchedResult = uniqueLandmarks.find(findMatch); -1 50712 if (matchedResult) { -1 50713 matchedResult.result = false; -1 50714 matchedResult.relatedNodes.push(currentResult.relatedNodes[0]); -1 50715 return false; -1 50716 } -1 50717 uniqueLandmarks.push(currentResult); -1 50718 currentResult.relatedNodes = []; -1 50719 return true; -1 50720 }); -1 50721 } -1 50722 var landmark_is_unique_after_default = landmarkIsUniqueAfter; -1 50723 function landmarkIsUniqueEvaluate(node, options, virtualNode) { -1 50724 var role = get_role_default(node); -1 50725 var accessibleText2 = accessible_text_virtual_default(virtualNode); -1 50726 accessibleText2 = accessibleText2 ? accessibleText2.toLowerCase() : null; -1 50727 this.data({ -1 50728 role: role, -1 50729 accessibleText: accessibleText2 -1 50730 }); -1 50731 this.relatedNodes([ node ]); -1 50732 return true; -1 50733 } -1 50734 var landmark_is_unique_evaluate_default = landmarkIsUniqueEvaluate; -1 50735 function hasValue(value) { -1 50736 return (value || '').trim() !== ''; -1 50737 } -1 50738 function hasLangEvaluate(node, options, virtualNode) { -1 50739 var xhtml2 = typeof document !== 'undefined' ? is_xhtml_default(document) : false; -1 50740 if (options.attributes.includes('xml:lang') && options.attributes.includes('lang') && hasValue(virtualNode.attr('xml:lang')) && !hasValue(virtualNode.attr('lang')) && !xhtml2) { -1 50741 this.data({ -1 50742 messageKey: 'noXHTML' 29598 50743 });29599 -1 conf.on('get' + postfix, function(id) {29600 -1 ++cache[id];-1 50744 return false; -1 50745 } -1 50746 var hasLang = options.attributes.some(function(name) { -1 50747 return hasValue(virtualNode.attr(name)); -1 50748 }); -1 50749 if (!hasLang) { -1 50750 this.data({ -1 50751 messageKey: 'noLang' 29601 50752 });29602 -1 conf.on('delete' + postfix, function(id) {29603 -1 delete cache[id];-1 50753 return false; -1 50754 } -1 50755 return true; -1 50756 } -1 50757 var has_lang_evaluate_default = hasLangEvaluate; -1 50758 function validLangEvaluate(node, options, virtualNode) { -1 50759 var invalid = []; -1 50760 options.attributes.forEach(function(langAttr) { -1 50761 var langVal = virtualNode.attr(langAttr); -1 50762 if (typeof langVal !== 'string') { -1 50763 return; -1 50764 } -1 50765 var baselangVal = get_base_lang_default(langVal); -1 50766 var invalidLang = options.value ? !options.value.map(get_base_lang_default).includes(baselangVal) : !valid_langs_default(baselangVal); -1 50767 if (baselangVal !== '' && invalidLang || langVal !== '' && !sanitize_default(langVal)) { -1 50768 invalid.push(langAttr + '="' + virtualNode.attr(langAttr) + '"'); -1 50769 } -1 50770 }); -1 50771 if (invalid.length) { -1 50772 this.data(invalid); -1 50773 return true; -1 50774 } -1 50775 return false; -1 50776 } -1 50777 var valid_lang_evaluate_default = validLangEvaluate; -1 50778 function xmlLangMismatchEvaluate(node, options, vNode) { -1 50779 var primaryLangValue = get_base_lang_default(vNode.attr('lang')); -1 50780 var primaryXmlLangValue = get_base_lang_default(vNode.attr('xml:lang')); -1 50781 return primaryLangValue === primaryXmlLangValue; -1 50782 } -1 50783 var xml_lang_mismatch_evaluate_default = xmlLangMismatchEvaluate; -1 50784 function dlitemEvaluate(node) { -1 50785 var parent = get_composed_parent_default(node); -1 50786 var parentTagName = parent.nodeName.toUpperCase(); -1 50787 var parentRole = get_explicit_role_default(parent); -1 50788 if (parentTagName === 'DIV' && [ 'presentation', 'none', null ].includes(parentRole)) { -1 50789 parent = get_composed_parent_default(parent); -1 50790 parentTagName = parent.nodeName.toUpperCase(); -1 50791 parentRole = get_explicit_role_default(parent); -1 50792 } -1 50793 if (parentTagName !== 'DL') { -1 50794 return false; -1 50795 } -1 50796 if (!parentRole || [ 'presentation', 'none', 'list' ].includes(parentRole)) { -1 50797 return true; -1 50798 } -1 50799 return false; -1 50800 } -1 50801 var dlitem_evaluate_default = dlitemEvaluate; -1 50802 function listitemEvaluate(node) { -1 50803 var parent = get_composed_parent_default(node); -1 50804 if (!parent) { -1 50805 return void 0; -1 50806 } -1 50807 var parentTagName = parent.nodeName.toUpperCase(); -1 50808 var parentRole = (parent.getAttribute('role') || '').toLowerCase(); -1 50809 if ([ 'presentation', 'none', 'list' ].includes(parentRole)) { -1 50810 return true; -1 50811 } -1 50812 if (parentRole && is_valid_role_default(parentRole)) { -1 50813 this.data({ -1 50814 messageKey: 'roleNotValid' 29604 50815 });29605 -1 conf.on('clear' + postfix, function() {29606 -1 cache = {};-1 50816 return false; -1 50817 } -1 50818 return [ 'UL', 'OL' ].includes(parentTagName); -1 50819 } -1 50820 var listitem_evaluate_default = listitemEvaluate; -1 50821 function onlyDlitemsEvaluate(node, options, virtualNode) { -1 50822 var ALLOWED_ROLES = [ 'definition', 'term', 'list' ]; -1 50823 var base = { -1 50824 badNodes: [], -1 50825 hasNonEmptyTextNode: false -1 50826 }; -1 50827 var content = virtualNode.children.reduce(function(content2, child) { -1 50828 var actualNode = child.actualNode; -1 50829 if (actualNode.nodeName.toUpperCase() === 'DIV' && get_role_default(actualNode) === null) { -1 50830 return content2.concat(child.children); -1 50831 } -1 50832 return content2.concat(child); -1 50833 }, []); -1 50834 var result = content.reduce(function(out, childNode) { -1 50835 var actualNode = childNode.actualNode; -1 50836 var tagName = actualNode.nodeName.toUpperCase(); -1 50837 if (actualNode.nodeType === 1 && is_visible_default(actualNode, true, false)) { -1 50838 var explicitRole2 = get_explicit_role_default(actualNode); -1 50839 if (tagName !== 'DT' && tagName !== 'DD' || explicitRole2) { -1 50840 if (!ALLOWED_ROLES.includes(explicitRole2)) { -1 50841 out.badNodes.push(actualNode); -1 50842 } -1 50843 } -1 50844 } else if (actualNode.nodeType === 3 && actualNode.nodeValue.trim() !== '') { -1 50845 out.hasNonEmptyTextNode = true; -1 50846 } -1 50847 return out; -1 50848 }, base); -1 50849 if (result.badNodes.length) { -1 50850 this.relatedNodes(result.badNodes); -1 50851 } -1 50852 return !!result.badNodes.length || result.hasNonEmptyTextNode; -1 50853 } -1 50854 var only_dlitems_evaluate_default = onlyDlitemsEvaluate; -1 50855 function onlyListitemsEvaluate(node, options, virtualNode) { -1 50856 var hasNonEmptyTextNode = false; -1 50857 var atLeastOneListitem = false; -1 50858 var isEmpty = true; -1 50859 var badNodes = []; -1 50860 var badRoleNodes = []; -1 50861 var badRoles = []; -1 50862 virtualNode.children.forEach(function(vNode) { -1 50863 var actualNode = vNode.actualNode; -1 50864 if (actualNode.nodeType === 3 && actualNode.nodeValue.trim() !== '') { -1 50865 hasNonEmptyTextNode = true; -1 50866 return; -1 50867 } -1 50868 if (actualNode.nodeType !== 1 || !is_visible_default(actualNode, true, false)) { -1 50869 return; -1 50870 } -1 50871 isEmpty = false; -1 50872 var isLi = actualNode.nodeName.toUpperCase() === 'LI'; -1 50873 var role = get_role_default(vNode); -1 50874 var isListItemRole = role === 'listitem'; -1 50875 if (!isLi && !isListItemRole) { -1 50876 badNodes.push(actualNode); -1 50877 } -1 50878 if (isLi && !isListItemRole) { -1 50879 badRoleNodes.push(actualNode); -1 50880 if (!badRoles.includes(role)) { -1 50881 badRoles.push(role); -1 50882 } -1 50883 } -1 50884 if (isListItemRole) { -1 50885 atLeastOneListitem = true; -1 50886 } -1 50887 }); -1 50888 if (hasNonEmptyTextNode || badNodes.length) { -1 50889 this.relatedNodes(badNodes); -1 50890 return true; -1 50891 } -1 50892 if (isEmpty || atLeastOneListitem) { -1 50893 return false; -1 50894 } -1 50895 this.relatedNodes(badRoleNodes); -1 50896 this.data({ -1 50897 messageKey: 'roleNotValid', -1 50898 roles: badRoles.join(', ') -1 50899 }); -1 50900 return true; -1 50901 } -1 50902 var only_listitems_evaluate_default = onlyListitemsEvaluate; -1 50903 function structuredDlitemsEvaluate(node, options, virtualNode) { -1 50904 var children = virtualNode.children; -1 50905 if (!children || !children.length) { -1 50906 return false; -1 50907 } -1 50908 var hasDt = false, hasDd = false, nodeName2; -1 50909 for (var i = 0; i < children.length; i++) { -1 50910 nodeName2 = children[i].props.nodeName.toUpperCase(); -1 50911 if (nodeName2 === 'DT') { -1 50912 hasDt = true; -1 50913 } -1 50914 if (hasDt && nodeName2 === 'DD') { -1 50915 return false; -1 50916 } -1 50917 if (nodeName2 === 'DD') { -1 50918 hasDd = true; -1 50919 } -1 50920 } -1 50921 return hasDt || hasDd; -1 50922 } -1 50923 var structured_dlitems_evaluate_default = structuredDlitemsEvaluate; -1 50924 function captionEvaluate(node, options, virtualNode) { -1 50925 var tracks = query_selector_all_default(virtualNode, 'track'); -1 50926 var hasCaptions = tracks.some(function(vNode) { -1 50927 return (vNode.attr('kind') || '').toLowerCase() === 'captions'; -1 50928 }); -1 50929 return hasCaptions ? false : void 0; -1 50930 } -1 50931 var caption_evaluate_default = captionEvaluate; -1 50932 function frameTestedEvaluate(node, options) { -1 50933 return options.isViolation ? false : void 0; -1 50934 } -1 50935 var frame_tested_evaluate_default = frameTestedEvaluate; -1 50936 var joinStr = ' > '; -1 50937 function frameTestedAfter(results) { -1 50938 var iframes = {}; -1 50939 return results.filter(function(result) { -1 50940 var frameResult = result.node.ancestry[result.node.ancestry.length - 1] !== 'html'; -1 50941 if (frameResult) { -1 50942 var ancestry2 = result.node.ancestry.flat(Infinity).join(joinStr); -1 50943 iframes[ancestry2] = result; -1 50944 return true; -1 50945 } -1 50946 var ancestry = result.node.ancestry.slice(0, result.node.ancestry.length - 1).flat(Infinity).join(joinStr); -1 50947 if (iframes[ancestry]) { -1 50948 iframes[ancestry].result = true; -1 50949 } -1 50950 return false; -1 50951 }); -1 50952 } -1 50953 var frame_tested_after_default = frameTestedAfter; -1 50954 function noAutoplayAudioEvaluate(node, options) { -1 50955 if (!node.duration) { -1 50956 console.warn('axe.utils.preloadMedia did not load metadata'); -1 50957 return void 0; -1 50958 } -1 50959 var _options$allowedDurat = options.allowedDuration, allowedDuration = _options$allowedDurat === void 0 ? 3 : _options$allowedDurat; -1 50960 var playableDuration = getPlayableDuration(node); -1 50961 if (playableDuration <= allowedDuration && !node.hasAttribute('loop')) { -1 50962 return true; -1 50963 } -1 50964 if (!node.hasAttribute('controls')) { -1 50965 return false; -1 50966 } -1 50967 return true; -1 50968 function getPlayableDuration(elm) { -1 50969 if (!elm.currentSrc) { -1 50970 return 0; -1 50971 } -1 50972 var playbackRange = getPlaybackRange(elm.currentSrc); -1 50973 if (!playbackRange) { -1 50974 return Math.abs(elm.duration - (elm.currentTime || 0)); -1 50975 } -1 50976 if (playbackRange.length === 1) { -1 50977 return Math.abs(elm.duration - playbackRange[0]); -1 50978 } -1 50979 return Math.abs(playbackRange[1] - playbackRange[0]); -1 50980 } -1 50981 function getPlaybackRange(src) { -1 50982 var match = src.match(/#t=(.*)/); -1 50983 if (!match) { -1 50984 return; -1 50985 } -1 50986 var _match = _slicedToArray(match, 2), value = _match[1]; -1 50987 var ranges = value.split(','); -1 50988 return ranges.map(function(range) { -1 50989 if (/:/.test(range)) { -1 50990 return convertHourMinSecToSeconds(range); -1 50991 } -1 50992 return parseFloat(range); 29607 50993 });29608 -1 defineProperties(conf.memoized, {29609 -1 deleteRef: d(function() {29610 -1 var id = conf.get(arguments);29611 -1 if (id === null) {29612 -1 return null;29613 -1 }29614 -1 if (!cache[id]) {29615 -1 return null;29616 -1 }29617 -1 if (!--cache[id]) {29618 -1 conf['delete'](id);29619 -1 return true;29620 -1 }-1 50994 } -1 50995 function convertHourMinSecToSeconds(hhMmSs) { -1 50996 var parts = hhMmSs.split(':'); -1 50997 var secs = 0; -1 50998 var mins = 1; -1 50999 while (parts.length > 0) { -1 51000 secs += mins * parseInt(parts.pop(), 10); -1 51001 mins *= 60; -1 51002 } -1 51003 return parseFloat(secs); -1 51004 } -1 51005 } -1 51006 var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate; -1 51007 function ariaAllowedAttrMatches(node, virtualNode) { -1 51008 var aria44 = /^aria-/; -1 51009 var attrs = virtualNode.attrNames; -1 51010 if (attrs.length) { -1 51011 for (var _i22 = 0, l = attrs.length; _i22 < l; _i22++) { -1 51012 if (aria44.test(attrs[_i22])) { -1 51013 return true; -1 51014 } -1 51015 } -1 51016 } -1 51017 return false; -1 51018 } -1 51019 var aria_allowed_attr_matches_default = ariaAllowedAttrMatches; -1 51020 function ariaAllowedRoleMatches(node) { -1 51021 return get_explicit_role_default(node, { -1 51022 dpub: true, -1 51023 fallback: true -1 51024 }) !== null; -1 51025 } -1 51026 var aria_allowed_role_matches_default = ariaAllowedRoleMatches; -1 51027 function ariaHasAttrMatches(node, virtualNode) { -1 51028 var aria44 = /^aria-/; -1 51029 return virtualNode.attrNames.some(function(attr) { -1 51030 return aria44.test(attr); -1 51031 }); -1 51032 } -1 51033 var aria_has_attr_matches_default = ariaHasAttrMatches; -1 51034 function shouldMatchElement(el) { -1 51035 if (!el) { -1 51036 return true; -1 51037 } -1 51038 if (el.getAttribute('aria-hidden') === 'true') { -1 51039 return false; -1 51040 } -1 51041 return shouldMatchElement(get_composed_parent_default(el)); -1 51042 } -1 51043 function ariaHiddenFocusMatches(node) { -1 51044 return shouldMatchElement(get_composed_parent_default(node)); -1 51045 } -1 51046 var aria_hidden_focus_matches_default = ariaHiddenFocusMatches; -1 51047 function ariaRequiredChildrenMatches(node, virtualNode) { -1 51048 var role = get_explicit_role_default(virtualNode, { -1 51049 dpub: true -1 51050 }); -1 51051 return !!required_owned_default(role); -1 51052 } -1 51053 var aria_required_children_matches_default = ariaRequiredChildrenMatches; -1 51054 function ariaRequiredParentMatches(node, virtualNode) { -1 51055 var role = get_explicit_role_default(virtualNode); -1 51056 return !!required_context_default(role); -1 51057 } -1 51058 var aria_required_parent_matches_default = ariaRequiredParentMatches; -1 51059 function autocompleteMatches(node, virtualNode) { -1 51060 var autocomplete2 = virtualNode.attr('autocomplete'); -1 51061 if (!autocomplete2 || sanitize_default(autocomplete2) === '') { -1 51062 return false; -1 51063 } -1 51064 var nodeName2 = virtualNode.props.nodeName; -1 51065 if ([ 'textarea', 'input', 'select' ].includes(nodeName2) === false) { -1 51066 return false; -1 51067 } -1 51068 var excludedInputTypes = [ 'submit', 'reset', 'button', 'hidden' ]; -1 51069 if (nodeName2 === 'input' && excludedInputTypes.includes(virtualNode.props.type)) { -1 51070 return false; -1 51071 } -1 51072 var ariaDisabled = virtualNode.attr('aria-disabled') || 'false'; -1 51073 if (virtualNode.hasAttr('disabled') || ariaDisabled.toLowerCase() === 'true') { -1 51074 return false; -1 51075 } -1 51076 var role = virtualNode.attr('role'); -1 51077 var tabIndex = virtualNode.attr('tabindex'); -1 51078 if (tabIndex === '-1' && role) { -1 51079 var roleDef = standards_default.ariaRoles[role]; -1 51080 if (roleDef === void 0 || roleDef.type !== 'widget') { -1 51081 return false; -1 51082 } -1 51083 } -1 51084 if (tabIndex === '-1' && virtualNode.actualNode && !is_visible_default(virtualNode.actualNode, false) && !is_visible_default(virtualNode.actualNode, true)) { -1 51085 return false; -1 51086 } -1 51087 return true; -1 51088 } -1 51089 var autocomplete_matches_default = autocompleteMatches; -1 51090 function isInitiatorMatches(node, virtualNode, context3) { -1 51091 return context3.initiator; -1 51092 } -1 51093 var is_initiator_matches_default = isInitiatorMatches; -1 51094 function bypassMatches(node, virtualNode, context3) { -1 51095 if (is_initiator_matches_default(node, virtualNode, context3)) { -1 51096 return !!node.querySelector('a[href]'); -1 51097 } -1 51098 return true; -1 51099 } -1 51100 var bypass_matches_default = bypassMatches; -1 51101 function colorContrastMatches(node, virtualNode) { -1 51102 var _virtualNode$props = virtualNode.props, nodeName2 = _virtualNode$props.nodeName, inputType = _virtualNode$props.type; -1 51103 if (nodeName2 === 'option') { -1 51104 return false; -1 51105 } -1 51106 if (nodeName2 === 'select' && !node.options.length) { -1 51107 return false; -1 51108 } -1 51109 var nonTextInput = [ 'hidden', 'range', 'color', 'checkbox', 'radio', 'image' ]; -1 51110 if (nodeName2 === 'input' && nonTextInput.includes(inputType)) { -1 51111 return false; -1 51112 } -1 51113 if (is_disabled_default(virtualNode)) { -1 51114 return false; -1 51115 } -1 51116 var formElements = [ 'input', 'select', 'textarea' ]; -1 51117 if (formElements.includes(nodeName2)) { -1 51118 var style = window.getComputedStyle(node); -1 51119 var textIndent = parseInt(style.getPropertyValue('text-indent'), 10); -1 51120 if (textIndent) { -1 51121 var rect = node.getBoundingClientRect(); -1 51122 rect = { -1 51123 top: rect.top, -1 51124 bottom: rect.bottom, -1 51125 left: rect.left + textIndent, -1 51126 right: rect.right + textIndent -1 51127 }; -1 51128 if (!visually_overlaps_default(rect, node)) { 29621 51129 return false;29622 -1 }),29623 -1 getRefCount: d(function() {29624 -1 var id = conf.get(arguments);29625 -1 if (id === null) {29626 -1 return 0;29627 -1 }29628 -1 if (!cache[id]) {29629 -1 return 0;29630 -1 }29631 -1 return cache[id];29632 -1 })29633 -1 });29634 -1 };29635 -1 },29636 -1 './node_modules/memoizee/index.js': function node_modulesMemoizeeIndexJs(module, exports, __webpack_require__) {29637 -1 'use strict';29638 -1 var normalizeOpts = __webpack_require__('./node_modules/es5-ext/object/normalize-options.js'), resolveLength = __webpack_require__('./node_modules/memoizee/lib/resolve-length.js'), plain = __webpack_require__('./node_modules/memoizee/plain.js');29639 -1 module.exports = function(fn) {29640 -1 var options = normalizeOpts(arguments[1]), length;29641 -1 if (!options.normalizer) {29642 -1 length = options.length = resolveLength(options.length, fn.length, options.async);29643 -1 if (length !== 0) {29644 -1 if (options.primitive) {29645 -1 if (length === false) {29646 -1 options.normalizer = __webpack_require__('./node_modules/memoizee/normalizers/primitive.js');29647 -1 } else if (length > 1) {29648 -1 options.normalizer = __webpack_require__('./node_modules/memoizee/normalizers/get-primitive-fixed.js')(length);29649 -1 }29650 -1 } else if (length === false) {29651 -1 options.normalizer = __webpack_require__('./node_modules/memoizee/normalizers/get.js')();29652 -1 } else if (length === 1) {29653 -1 options.normalizer = __webpack_require__('./node_modules/memoizee/normalizers/get-1.js')();29654 -1 } else {29655 -1 options.normalizer = __webpack_require__('./node_modules/memoizee/normalizers/get-fixed.js')(length);29656 -1 }29657 51130 } 29658 51131 }29659 -1 if (options.async) {29660 -1 __webpack_require__('./node_modules/memoizee/ext/async.js');29661 -1 }29662 -1 if (options.promise) {29663 -1 __webpack_require__('./node_modules/memoizee/ext/promise.js');-1 51132 return true; -1 51133 } -1 51134 var nodeParentLabel = find_up_virtual_default(virtualNode, 'label'); -1 51135 if (nodeName2 === 'label' || nodeParentLabel) { -1 51136 var labelNode = nodeParentLabel || node; -1 51137 var labelVirtual3 = nodeParentLabel ? get_node_from_tree_default(nodeParentLabel) : virtualNode; -1 51138 if (labelNode.htmlFor) { -1 51139 var doc = get_root_node_default2(labelNode); -1 51140 var explicitControl = doc.getElementById(labelNode.htmlFor); -1 51141 var explicitControlVirtual = explicitControl && get_node_from_tree_default(explicitControl); -1 51142 if (explicitControlVirtual && is_disabled_default(explicitControlVirtual)) { -1 51143 return false; -1 51144 } 29664 51145 }29665 -1 if (options.dispose) {29666 -1 __webpack_require__('./node_modules/memoizee/ext/dispose.js');-1 51146 var query = 'input:not([type="hidden"],[type="image"],[type="button"],[type="submit"],[type="reset"]), select, textarea'; -1 51147 var implicitControl = query_selector_all_default(labelVirtual3, query)[0]; -1 51148 if (implicitControl && is_disabled_default(implicitControl)) { -1 51149 return false; 29667 51150 }29668 -1 if (options.maxAge) {29669 -1 __webpack_require__('./node_modules/memoizee/ext/max-age.js');-1 51151 } -1 51152 var ariaLabelledbyControls = []; -1 51153 var ancestorNode = virtualNode; -1 51154 while (ancestorNode) { -1 51155 if (ancestorNode.props.id) { -1 51156 var virtualControls = get_accessible_refs_default(ancestorNode).filter(function(control) { -1 51157 return token_list_default(control.getAttribute('aria-labelledby') || '').includes(ancestorNode.props.id); -1 51158 }).map(function(control) { -1 51159 return get_node_from_tree_default(control); -1 51160 }); -1 51161 ariaLabelledbyControls.push.apply(ariaLabelledbyControls, _toConsumableArray(virtualControls)); 29670 51162 }29671 -1 if (options.max) {29672 -1 __webpack_require__('./node_modules/memoizee/ext/max.js');-1 51163 ancestorNode = ancestorNode.parent; -1 51164 } -1 51165 if (ariaLabelledbyControls.length > 0 && ariaLabelledbyControls.every(is_disabled_default)) { -1 51166 return false; -1 51167 } -1 51168 var visibleText = visible_virtual_default(virtualNode, false, true); -1 51169 var removeUnicodeOptions = { -1 51170 emoji: true, -1 51171 nonBmp: false, -1 51172 punctuations: true -1 51173 }; -1 51174 if (!visibleText || !remove_unicode_default(visibleText, removeUnicodeOptions)) { -1 51175 return false; -1 51176 } -1 51177 var range = document.createRange(); -1 51178 var childNodes = virtualNode.children; -1 51179 for (var index = 0; index < childNodes.length; index++) { -1 51180 var child = childNodes[index]; -1 51181 if (child.actualNode.nodeType === 3 && sanitize_default(child.actualNode.nodeValue) !== '') { -1 51182 range.selectNodeContents(child.actualNode); 29673 51183 }29674 -1 if (options.refCounter) {29675 -1 __webpack_require__('./node_modules/memoizee/ext/ref-counter.js');-1 51184 } -1 51185 var rects = range.getClientRects(); -1 51186 for (var _index = 0; _index < rects.length; _index++) { -1 51187 if (visually_overlaps_default(rects[_index], node)) { -1 51188 return true; 29676 51189 }29677 -1 return plain(fn, options);29678 -1 };29679 -1 },29680 -1 './node_modules/memoizee/lib/configure-map.js': function node_modulesMemoizeeLibConfigureMapJs(module, exports, __webpack_require__) {29681 -1 'use strict';29682 -1 var customError = __webpack_require__('./node_modules/es5-ext/error/custom.js'), defineLength = __webpack_require__('./node_modules/es5-ext/function/_define-length.js'), d = __webpack_require__('./node_modules/d/index.js'), ee = __webpack_require__('./node_modules/event-emitter/index.js').methods, resolveResolve = __webpack_require__('./node_modules/memoizee/lib/resolve-resolve.js'), resolveNormalize = __webpack_require__('./node_modules/memoizee/lib/resolve-normalize.js');29683 -1 var apply = Function.prototype.apply, call = Function.prototype.call, create = Object.create, defineProperties = Object.defineProperties, _on = ee.on, emit = ee.emit;29684 -1 module.exports = function(original, length, options) {29685 -1 var cache = create(null), conf, memLength, _get, set, del, _clear, extDel, extGet, extHas, normalizer, getListeners, setListeners, deleteListeners, memoized, resolve;29686 -1 if (length !== false) {29687 -1 memLength = length;29688 -1 } else if (isNaN(original.length)) {29689 -1 memLength = 1;29690 -1 } else {29691 -1 memLength = original.length;-1 51190 } -1 51191 return false; -1 51192 } -1 51193 var color_contrast_matches_default = colorContrastMatches; -1 51194 function dataTableLargeMatches(node) { -1 51195 if (is_data_table_default(node)) { -1 51196 var tableArray = to_grid_default(node); -1 51197 return tableArray.length >= 3 && tableArray[0].length >= 3 && tableArray[1].length >= 3 && tableArray[2].length >= 3; -1 51198 } -1 51199 return false; -1 51200 } -1 51201 var data_table_large_matches_default = dataTableLargeMatches; -1 51202 function dataTableMatches(node) { -1 51203 return is_data_table_default(node); -1 51204 } -1 51205 var data_table_matches_default = dataTableMatches; -1 51206 function duplicateIdActiveMatches(node) { -1 51207 var id = node.getAttribute('id').trim(); -1 51208 var idSelector = '*[id="'.concat(escape_selector_default(id), '"]'); -1 51209 var idMatchingElms = Array.from(get_root_node_default2(node).querySelectorAll(idSelector)); -1 51210 return !is_accessible_ref_default(node) && idMatchingElms.some(is_focusable_default); -1 51211 } -1 51212 var duplicate_id_active_matches_default = duplicateIdActiveMatches; -1 51213 function duplicateIdAriaMatches(node) { -1 51214 return is_accessible_ref_default(node); -1 51215 } -1 51216 var duplicate_id_aria_matches_default = duplicateIdAriaMatches; -1 51217 function duplicateIdMiscMatches(node) { -1 51218 var id = node.getAttribute('id').trim(); -1 51219 var idSelector = '*[id="'.concat(escape_selector_default(id), '"]'); -1 51220 var idMatchingElms = Array.from(get_root_node_default2(node).querySelectorAll(idSelector)); -1 51221 return !is_accessible_ref_default(node) && idMatchingElms.every(function(elm) { -1 51222 return !is_focusable_default(elm); -1 51223 }); -1 51224 } -1 51225 var duplicate_id_misc_matches_default = duplicateIdMiscMatches; -1 51226 function frameFocusableContentMatches(node, virtualNode, context3) { -1 51227 return !context3.initiator && !context3.focusable && context3.boundingClientRect.width * context3.boundingClientRect.height > 1; -1 51228 } -1 51229 var frame_focusable_content_matches_default = frameFocusableContentMatches; -1 51230 function frameTitleHasTextMatches(node) { -1 51231 var title = node.getAttribute('title'); -1 51232 return !!sanitize_default(title); -1 51233 } -1 51234 var frame_title_has_text_matches_default = frameTitleHasTextMatches; -1 51235 function headingMatches(node) { -1 51236 var explicitRoles; -1 51237 if (node.hasAttribute('role')) { -1 51238 explicitRoles = node.getAttribute('role').split(/\s+/i).filter(axe.commons.aria.isValidRole); -1 51239 } -1 51240 if (explicitRoles && explicitRoles.length > 0) { -1 51241 return explicitRoles.includes('heading'); -1 51242 } else { -1 51243 return axe.commons.aria.implicitRole(node) === 'heading'; -1 51244 } -1 51245 } -1 51246 var heading_matches_default = headingMatches; -1 51247 function svgNamespaceMatches(node, virtualNode) { -1 51248 try { -1 51249 var nodeName2 = virtualNode.props.nodeName; -1 51250 if (nodeName2 === 'svg') { -1 51251 return true; 29692 51252 }29693 -1 if (options.normalizer) {29694 -1 normalizer = resolveNormalize(options.normalizer);29695 -1 _get = normalizer.get;29696 -1 set = normalizer.set;29697 -1 del = normalizer['delete'];29698 -1 _clear = normalizer.clear;-1 51253 return !!closest_default(virtualNode, 'svg'); -1 51254 } catch (e) { -1 51255 return false; -1 51256 } -1 51257 } -1 51258 var svg_namespace_matches_default = svgNamespaceMatches; -1 51259 function htmlNamespaceMatches(node, virtualNode) { -1 51260 return !svg_namespace_matches_default(node, virtualNode); -1 51261 } -1 51262 var html_namespace_matches_default = htmlNamespaceMatches; -1 51263 function identicalLinksSamePurposeMatches(node, virtualNode) { -1 51264 var hasAccName = !!accessible_text_virtual_default(virtualNode); -1 51265 if (!hasAccName) { -1 51266 return false; -1 51267 } -1 51268 var role = get_role_default(node); -1 51269 if (role && role !== 'link') { -1 51270 return false; -1 51271 } -1 51272 return true; -1 51273 } -1 51274 var identical_links_same_purpose_matches_default = identicalLinksSamePurposeMatches; -1 51275 function insertedIntoFocusOrderMatches(node) { -1 51276 return inserted_into_focus_order_default(node); -1 51277 } -1 51278 var inserted_into_focus_order_matches_default = insertedIntoFocusOrderMatches; -1 51279 function labelContentNameMismatchMatches(node, virtualNode) { -1 51280 var role = get_role_default(node); -1 51281 if (!role) { -1 51282 return false; -1 51283 } -1 51284 var widgetRoles = get_aria_roles_by_type_default('widget'); -1 51285 var isWidgetType = widgetRoles.includes(role); -1 51286 if (!isWidgetType) { -1 51287 return false; -1 51288 } -1 51289 var rolesWithNameFromContents = get_aria_roles_supporting_name_from_content_default(); -1 51290 if (!rolesWithNameFromContents.includes(role)) { -1 51291 return false; -1 51292 } -1 51293 if (!sanitize_default(arialabel_text_default(virtualNode)) && !sanitize_default(arialabelledby_text_default(node))) { -1 51294 return false; -1 51295 } -1 51296 if (!sanitize_default(visible_virtual_default(virtualNode))) { -1 51297 return false; -1 51298 } -1 51299 return true; -1 51300 } -1 51301 var label_content_name_mismatch_matches_default = labelContentNameMismatchMatches; -1 51302 function labelMatches(node, virtualNode) { -1 51303 if (virtualNode.props.nodeName !== 'input' || virtualNode.hasAttr('type') === false) { -1 51304 return true; -1 51305 } -1 51306 var type = virtualNode.attr('type').toLowerCase(); -1 51307 return [ 'hidden', 'image', 'button', 'submit', 'reset' ].includes(type) === false; -1 51308 } -1 51309 var label_matches_default = labelMatches; -1 51310 function landmarkHasBodyContextMatches(node, virtualNode) { -1 51311 var nativeScopeFilter = 'article, aside, main, nav, section'; -1 51312 return node.hasAttribute('role') || !find_up_virtual_default(virtualNode, nativeScopeFilter); -1 51313 } -1 51314 var landmark_has_body_context_matches_default = landmarkHasBodyContextMatches; -1 51315 function landmarkUniqueMatches(node, virtualNode) { -1 51316 var excludedParentsForHeaderFooterLandmarks = [ 'article', 'aside', 'main', 'nav', 'section' ].join(','); -1 51317 function isHeaderFooterLandmark(headerFooterElement) { -1 51318 return !find_up_virtual_default(headerFooterElement, excludedParentsForHeaderFooterLandmarks); -1 51319 } -1 51320 function isLandmarkVirtual(virtualNode2) { -1 51321 var actualNode = virtualNode2.actualNode; -1 51322 var landmarkRoles2 = get_aria_roles_by_type_default('landmark'); -1 51323 var role = get_role_default(actualNode); -1 51324 if (!role) { -1 51325 return false; 29699 51326 }29700 -1 if (options.resolvers != null) {29701 -1 resolve = resolveResolve(options.resolvers);-1 51327 var nodeName2 = actualNode.nodeName.toUpperCase(); -1 51328 if (nodeName2 === 'HEADER' || nodeName2 === 'FOOTER') { -1 51329 return isHeaderFooterLandmark(virtualNode2); 29702 51330 }29703 -1 if (_get) {29704 -1 memoized = defineLength(function(arg) {29705 -1 var id, result, args = arguments;29706 -1 if (resolve) {29707 -1 args = resolve(args);29708 -1 }29709 -1 id = _get(args);29710 -1 if (id !== null) {29711 -1 if (hasOwnProperty.call(cache, id)) {29712 -1 if (getListeners) {29713 -1 conf.emit('get', id, args, this);29714 -1 }29715 -1 return cache[id];29716 -1 }29717 -1 }29718 -1 if (args.length === 1) {29719 -1 result = call.call(original, this, args[0]);29720 -1 } else {29721 -1 result = apply.call(original, this, args);29722 -1 }29723 -1 if (id === null) {29724 -1 id = _get(args);29725 -1 if (id !== null) {29726 -1 throw customError('Circular invocation', 'CIRCULAR_INVOCATION');29727 -1 }29728 -1 id = set(args);29729 -1 } else if (hasOwnProperty.call(cache, id)) {29730 -1 throw customError('Circular invocation', 'CIRCULAR_INVOCATION');29731 -1 }29732 -1 cache[id] = result;29733 -1 if (setListeners) {29734 -1 conf.emit('set', id, null, result);29735 -1 }29736 -1 return result;29737 -1 }, memLength);29738 -1 } else if (length === 0) {29739 -1 memoized = function memoized() {29740 -1 var result;29741 -1 if (hasOwnProperty.call(cache, 'data')) {29742 -1 if (getListeners) {29743 -1 conf.emit('get', 'data', arguments, this);29744 -1 }29745 -1 return cache.data;29746 -1 }29747 -1 if (arguments.length) {29748 -1 result = apply.call(original, this, arguments);29749 -1 } else {29750 -1 result = call.call(original, this);29751 -1 }29752 -1 if (hasOwnProperty.call(cache, 'data')) {29753 -1 throw customError('Circular invocation', 'CIRCULAR_INVOCATION');29754 -1 }29755 -1 cache.data = result;29756 -1 if (setListeners) {29757 -1 conf.emit('set', 'data', null, result);29758 -1 }29759 -1 return result;29760 -1 };29761 -1 } else {29762 -1 memoized = function memoized(arg) {29763 -1 var result, args = arguments, id;29764 -1 if (resolve) {29765 -1 args = resolve(arguments);29766 -1 }29767 -1 id = String(args[0]);29768 -1 if (hasOwnProperty.call(cache, id)) {29769 -1 if (getListeners) {29770 -1 conf.emit('get', id, args, this);29771 -1 }29772 -1 return cache[id];29773 -1 }29774 -1 if (args.length === 1) {29775 -1 result = call.call(original, this, args[0]);29776 -1 } else {29777 -1 result = apply.call(original, this, args);29778 -1 }29779 -1 if (hasOwnProperty.call(cache, id)) {29780 -1 throw customError('Circular invocation', 'CIRCULAR_INVOCATION');29781 -1 }29782 -1 cache[id] = result;29783 -1 if (setListeners) {29784 -1 conf.emit('set', id, null, result);29785 -1 }29786 -1 return result;29787 -1 };-1 51331 if (nodeName2 === 'SECTION' || nodeName2 === 'FORM') { -1 51332 var accessibleText2 = accessible_text_virtual_default(virtualNode2); -1 51333 return !!accessibleText2; 29788 51334 }29789 -1 conf = {29790 -1 original: original,29791 -1 memoized: memoized,29792 -1 profileName: options.profileName,29793 -1 get: function get(args) {29794 -1 if (resolve) {29795 -1 args = resolve(args);29796 -1 }29797 -1 if (_get) {29798 -1 return _get(args);29799 -1 }29800 -1 return String(args[0]);29801 -1 },29802 -1 has: function has(id) {29803 -1 return hasOwnProperty.call(cache, id);29804 -1 },29805 -1 delete: function _delete(id) {29806 -1 var result;29807 -1 if (!hasOwnProperty.call(cache, id)) {29808 -1 return;29809 -1 }29810 -1 if (del) {29811 -1 del(id);29812 -1 }29813 -1 result = cache[id];29814 -1 delete cache[id];29815 -1 if (deleteListeners) {29816 -1 conf.emit('delete', id, result);29817 -1 }29818 -1 },29819 -1 clear: function clear() {29820 -1 var oldCache = cache;29821 -1 if (_clear) {29822 -1 _clear();29823 -1 }29824 -1 cache = create(null);29825 -1 conf.emit('clear', oldCache);29826 -1 },29827 -1 on: function on(type, listener) {29828 -1 if (type === 'get') {29829 -1 getListeners = true;29830 -1 } else if (type === 'set') {29831 -1 setListeners = true;29832 -1 } else if (type === 'delete') {29833 -1 deleteListeners = true;29834 -1 }29835 -1 return _on.call(this, type, listener);29836 -1 },29837 -1 emit: emit,29838 -1 updateEnv: function updateEnv() {29839 -1 original = conf.original;-1 51335 return landmarkRoles2.indexOf(role) >= 0 || role === 'region'; -1 51336 } -1 51337 return isLandmarkVirtual(virtualNode) && is_visible_default(node, true); -1 51338 } -1 51339 var landmark_unique_matches_default = landmarkUniqueMatches; -1 51340 function dataTableMatches2(node) { -1 51341 return !is_data_table_default(node) && !is_focusable_default(node); -1 51342 } -1 51343 var layout_table_matches_default = dataTableMatches2; -1 51344 function linkInTextBlockMatches(node) { -1 51345 var text32 = sanitize_default(node.textContent); -1 51346 var role = node.getAttribute('role'); -1 51347 if (role && role !== 'link') { -1 51348 return false; -1 51349 } -1 51350 if (!text32) { -1 51351 return false; -1 51352 } -1 51353 if (!is_visible_default(node, false)) { -1 51354 return false; -1 51355 } -1 51356 return is_in_text_block_default(node); -1 51357 } -1 51358 var link_in_text_block_matches_default = linkInTextBlockMatches; -1 51359 function nestedInteractiveMatches(node, virtualNode) { -1 51360 var role = get_role_default(virtualNode); -1 51361 if (!role) { -1 51362 return false; -1 51363 } -1 51364 return !!standards_default.ariaRoles[role].childrenPresentational; -1 51365 } -1 51366 var nested_interactive_matches_default = nestedInteractiveMatches; -1 51367 function noAutoplayAudioMatches(node) { -1 51368 if (!node.currentSrc) { -1 51369 return false; -1 51370 } -1 51371 if (node.hasAttribute('paused') || node.hasAttribute('muted')) { -1 51372 return false; -1 51373 } -1 51374 return true; -1 51375 } -1 51376 var no_autoplay_audio_matches_default = noAutoplayAudioMatches; -1 51377 function noEmptyRoleMatches(node, virtualNode) { -1 51378 if (!virtualNode.hasAttr('role')) { -1 51379 return false; -1 51380 } -1 51381 if (!virtualNode.attr('role').trim()) { -1 51382 return false; -1 51383 } -1 51384 return true; -1 51385 } -1 51386 var no_empty_role_matches_default = noEmptyRoleMatches; -1 51387 function noExplicitNameRequired(node, virtualNode) { -1 51388 var role = get_explicit_role_default(virtualNode); -1 51389 if (!role || [ 'none', 'presentation' ].includes(role)) { -1 51390 return true; -1 51391 } -1 51392 var _ref70 = aria_roles_default[role] || {}, accessibleNameRequired = _ref70.accessibleNameRequired; -1 51393 if (accessibleNameRequired || is_focusable_default(virtualNode)) { -1 51394 return true; -1 51395 } -1 51396 return false; -1 51397 } -1 51398 var no_explicit_name_required_matches_default = noExplicitNameRequired; -1 51399 function noNamingMethodMatches(node, virtualNode) { -1 51400 var _get_element_spec_def3 = get_element_spec_default(virtualNode), namingMethods = _get_element_spec_def3.namingMethods; -1 51401 if (namingMethods && namingMethods.length !== 0) { -1 51402 return false; -1 51403 } -1 51404 if (get_explicit_role_default(virtualNode) === 'combobox' && query_selector_all_default(virtualNode, 'input:not([type="hidden"])').length) { -1 51405 return false; -1 51406 } -1 51407 return true; -1 51408 } -1 51409 var no_naming_method_matches_default = noNamingMethodMatches; -1 51410 function noRoleMatches(node) { -1 51411 return !node.getAttribute('role'); -1 51412 } -1 51413 var no_role_matches_default = noRoleMatches; -1 51414 function notHtmlMatches(node, virtualNode) { -1 51415 return virtualNode.props.nodeName !== 'html'; -1 51416 } -1 51417 var not_html_matches_default = notHtmlMatches; -1 51418 function pAsHeadingMatches(node) { -1 51419 var children = Array.from(node.parentNode.childNodes); -1 51420 var nodeText = node.textContent.trim(); -1 51421 var isSentence = /[.!?:;](?![.!?:;])/g; -1 51422 if (nodeText.length === 0 || (nodeText.match(isSentence) || []).length >= 2) { -1 51423 return false; -1 51424 } -1 51425 var siblingsAfter = children.slice(children.indexOf(node) + 1).filter(function(elm) { -1 51426 return elm.nodeName.toUpperCase() === 'P' && elm.textContent.trim() !== ''; -1 51427 }); -1 51428 return siblingsAfter.length !== 0; -1 51429 } -1 51430 var p_as_heading_matches_default = pAsHeadingMatches; -1 51431 function scrollableRegionFocusableMatches(node, virtualNode) { -1 51432 if (!!get_scroll_default(node, 13) === false) { -1 51433 return false; -1 51434 } -1 51435 var role = get_explicit_role_default(virtualNode); -1 51436 if (standards_default.ariaRoles.combobox.requiredOwned.includes(role)) { -1 51437 if (closest_default(virtualNode, '[role~="combobox"]')) { -1 51438 return false; -1 51439 } -1 51440 var id = virtualNode.attr('id'); -1 51441 if (id) { -1 51442 var doc = get_root_node_default(node); -1 51443 var owned = Array.from(doc.querySelectorAll('[aria-owns~="'.concat(id, '"], [aria-controls~="').concat(id, '"]'))); -1 51444 var comboboxOwned = owned.some(function(el) { -1 51445 var roles = token_list_default(el.getAttribute('role')); -1 51446 return roles.includes('combobox'); -1 51447 }); -1 51448 if (comboboxOwned) { -1 51449 return false; 29840 51450 } -1 51451 } -1 51452 } -1 51453 var nodeAndDescendents = query_selector_all_default(virtualNode, '*'); -1 51454 var hasVisibleChildren = nodeAndDescendents.some(function(elm) { -1 51455 return has_content_virtual_default(elm, true, true); -1 51456 }); -1 51457 if (!hasVisibleChildren) { -1 51458 return false; -1 51459 } -1 51460 return true; -1 51461 } -1 51462 var scrollable_region_focusable_matches_default = scrollableRegionFocusableMatches; -1 51463 function skipLinkMatches(node) { -1 51464 return is_skip_link_default(node) && is_offscreen_default(node); -1 51465 } -1 51466 var skip_link_matches_default = skipLinkMatches; -1 51467 function windowIsTopMatches(node) { -1 51468 return node.ownerDocument.defaultView.self === node.ownerDocument.defaultView.top; -1 51469 } -1 51470 var window_is_top_matches_default = windowIsTopMatches; -1 51471 function xmlLangMismatchMatches(node) { -1 51472 var primaryLangValue = get_base_lang_default(node.getAttribute('lang')); -1 51473 var primaryXmlLangValue = get_base_lang_default(node.getAttribute('xml:lang')); -1 51474 return valid_langs_default(primaryLangValue) && valid_langs_default(primaryXmlLangValue); -1 51475 } -1 51476 var xml_lang_mismatch_matches_default = xmlLangMismatchMatches; -1 51477 var metadataFunctionMap = { -1 51478 'abstractrole-evaluate': abstractrole_evaluate_default, -1 51479 'aria-allowed-attr-evaluate': aria_allowed_attr_evaluate_default, -1 51480 'aria-allowed-role-evaluate': aria_allowed_role_evaluate_default, -1 51481 'aria-errormessage-evaluate': aria_errormessage_evaluate_default, -1 51482 'aria-hidden-body-evaluate': aria_hidden_body_evaluate_default, -1 51483 'aria-prohibited-attr-evaluate': aria_prohibited_attr_evaluate_default, -1 51484 'aria-required-attr-evaluate': aria_required_attr_evaluate_default, -1 51485 'aria-required-children-evaluate': aria_required_children_evaluate_default, -1 51486 'aria-required-parent-evaluate': aria_required_parent_evaluate_default, -1 51487 'aria-roledescription-evaluate': aria_roledescription_evaluate_default, -1 51488 'aria-unsupported-attr-evaluate': aria_unsupported_attr_evaluate_default, -1 51489 'aria-valid-attr-evaluate': aria_valid_attr_evaluate_default, -1 51490 'aria-valid-attr-value-evaluate': aria_valid_attr_value_evaluate_default, -1 51491 'fallbackrole-evaluate': fallbackrole_evaluate_default, -1 51492 'has-global-aria-attribute-evaluate': has_global_aria_attribute_evaluate_default, -1 51493 'has-implicit-chromium-role-matches': has_implicit_chromium_role_matches_default, -1 51494 'has-widget-role-evaluate': has_widget_role_evaluate_default, -1 51495 'invalidrole-evaluate': invalidrole_evaluate_default, -1 51496 'is-element-focusable-evaluate': is_element_focusable_evaluate_default, -1 51497 'no-implicit-explicit-label-evaluate': no_implicit_explicit_label_evaluate_default, -1 51498 'unsupportedrole-evaluate': unsupportedrole_evaluate_default, -1 51499 'valid-scrollable-semantics-evaluate': valid_scrollable_semantics_evaluate_default, -1 51500 'caption-faked-evaluate': caption_faked_evaluate_default, -1 51501 'html5-scope-evaluate': html5_scope_evaluate_default, -1 51502 'same-caption-summary-evaluate': same_caption_summary_evaluate_default, -1 51503 'scope-value-evaluate': scope_value_evaluate_default, -1 51504 'td-has-header-evaluate': td_has_header_evaluate_default, -1 51505 'td-headers-attr-evaluate': td_headers_attr_evaluate_default, -1 51506 'th-has-data-cells-evaluate': th_has_data_cells_evaluate_default, -1 51507 'hidden-content-evaluate': hidden_content_evaluate_default, -1 51508 'color-contrast-evaluate': color_contrast_evaluate_default, -1 51509 'link-in-text-block-evaluate': link_in_text_block_evaluate_default, -1 51510 'autocomplete-appropriate-evaluate': autocomplete_appropriate_evaluate_default, -1 51511 'autocomplete-valid-evaluate': autocomplete_valid_evaluate_default, -1 51512 'attr-non-space-content-evaluate': attr_non_space_content_evaluate_default, -1 51513 'has-descendant-after': has_descendant_after_default, -1 51514 'has-descendant-evaluate': has_descendant_evaluate_default, -1 51515 'has-text-content-evaluate': has_text_content_evaluate_default, -1 51516 'matches-definition-evaluate': matches_definition_evaluate_default, -1 51517 'page-no-duplicate-after': page_no_duplicate_after_default, -1 51518 'page-no-duplicate-evaluate': page_no_duplicate_evaluate_default, -1 51519 'heading-order-after': headingOrderAfter, -1 51520 'heading-order-evaluate': heading_order_evaluate_default, -1 51521 'identical-links-same-purpose-after': identical_links_same_purpose_after_default, -1 51522 'identical-links-same-purpose-evaluate': identical_links_same_purpose_evaluate_default, -1 51523 'internal-link-present-evaluate': internal_link_present_evaluate_default, -1 51524 'meta-refresh-evaluate': meta_refresh_evaluate_default, -1 51525 'p-as-heading-evaluate': p_as_heading_evaluate_default, -1 51526 'region-evaluate': region_evaluate_default, -1 51527 'skip-link-evaluate': skip_link_evaluate_default, -1 51528 'unique-frame-title-after': unique_frame_title_after_default, -1 51529 'unique-frame-title-evaluate': unique_frame_title_evaluate_default, -1 51530 'aria-label-evaluate': aria_label_evaluate_default, -1 51531 'aria-labelledby-evaluate': aria_labelledby_evaluate_default, -1 51532 'avoid-inline-spacing-evaluate': avoid_inline_spacing_evaluate_default, -1 51533 'doc-has-title-evaluate': doc_has_title_evaluate_default, -1 51534 'exists-evaluate': exists_evaluate_default, -1 51535 'has-alt-evaluate': has_alt_evaluate_default, -1 51536 'is-on-screen-evaluate': is_on_screen_evaluate_default, -1 51537 'non-empty-if-present-evaluate': non_empty_if_present_evaluate_default, -1 51538 'presentational-role-evaluate': presentational_role_evaluate_default, -1 51539 'svg-non-empty-title-evaluate': svg_non_empty_title_evaluate_default, -1 51540 'css-orientation-lock-evaluate': css_orientation_lock_evaluate_default, -1 51541 'meta-viewport-scale-evaluate': meta_viewport_scale_evaluate_default, -1 51542 'duplicate-id-after': duplicate_id_after_default, -1 51543 'duplicate-id-evaluate': duplicate_id_evaluate_default, -1 51544 'accesskeys-after': accesskeys_after_default, -1 51545 'accesskeys-evaluate': accesskeys_evaluate_default, -1 51546 'focusable-content-evaluate': focusable_content_evaluate_default, -1 51547 'focusable-disabled-evaluate': focusable_disabled_evaluate_default, -1 51548 'focusable-element-evaluate': focusable_element_evaluate_default, -1 51549 'focusable-modal-open-evaluate': focusable_modal_open_evaluate_default, -1 51550 'focusable-no-name-evaluate': focusable_no_name_evaluate_default, -1 51551 'focusable-not-tabbable-evaluate': focusable_not_tabbable_evaluate_default, -1 51552 'landmark-is-top-level-evaluate': landmark_is_top_level_evaluate_default, -1 51553 'no-focusable-content-evaluate': no_focusable_content_evaluate_default, -1 51554 'tabindex-evaluate': tabindex_evaluate_default, -1 51555 'alt-space-value-evaluate': alt_space_value_evaluate_default, -1 51556 'duplicate-img-label-evaluate': duplicate_img_label_evaluate_default, -1 51557 'explicit-evaluate': explicit_evaluate_default, -1 51558 'help-same-as-label-evaluate': help_same_as_label_evaluate_default, -1 51559 'hidden-explicit-label-evaluate': hidden_explicit_label_evaluate_default, -1 51560 'implicit-evaluate': implicit_evaluate_default, -1 51561 'label-content-name-mismatch-evaluate': label_content_name_mismatch_evaluate_default, -1 51562 'multiple-label-evaluate': multiple_label_evaluate_default, -1 51563 'title-only-evaluate': title_only_evaluate_default, -1 51564 'landmark-is-unique-after': landmark_is_unique_after_default, -1 51565 'landmark-is-unique-evaluate': landmark_is_unique_evaluate_default, -1 51566 'has-lang-evaluate': has_lang_evaluate_default, -1 51567 'valid-lang-evaluate': valid_lang_evaluate_default, -1 51568 'xml-lang-mismatch-evaluate': xml_lang_mismatch_evaluate_default, -1 51569 'dlitem-evaluate': dlitem_evaluate_default, -1 51570 'listitem-evaluate': listitem_evaluate_default, -1 51571 'only-dlitems-evaluate': only_dlitems_evaluate_default, -1 51572 'only-listitems-evaluate': only_listitems_evaluate_default, -1 51573 'structured-dlitems-evaluate': structured_dlitems_evaluate_default, -1 51574 'caption-evaluate': caption_evaluate_default, -1 51575 'frame-tested-evaluate': frame_tested_evaluate_default, -1 51576 'frame-tested-after': frame_tested_after_default, -1 51577 'no-autoplay-audio-evaluate': no_autoplay_audio_evaluate_default, -1 51578 'aria-allowed-attr-matches': aria_allowed_attr_matches_default, -1 51579 'aria-allowed-role-matches': aria_allowed_role_matches_default, -1 51580 'aria-form-field-name-matches': no_naming_method_matches_default, -1 51581 'aria-has-attr-matches': aria_has_attr_matches_default, -1 51582 'aria-hidden-focus-matches': aria_hidden_focus_matches_default, -1 51583 'aria-required-children-matches': aria_required_children_matches_default, -1 51584 'aria-required-parent-matches': aria_required_parent_matches_default, -1 51585 'autocomplete-matches': autocomplete_matches_default, -1 51586 'bypass-matches': bypass_matches_default, -1 51587 'color-contrast-matches': color_contrast_matches_default, -1 51588 'data-table-large-matches': data_table_large_matches_default, -1 51589 'data-table-matches': data_table_matches_default, -1 51590 'duplicate-id-active-matches': duplicate_id_active_matches_default, -1 51591 'duplicate-id-aria-matches': duplicate_id_aria_matches_default, -1 51592 'duplicate-id-misc-matches': duplicate_id_misc_matches_default, -1 51593 'frame-focusable-content-matches': frame_focusable_content_matches_default, -1 51594 'frame-title-has-text-matches': frame_title_has_text_matches_default, -1 51595 'heading-matches': heading_matches_default, -1 51596 'html-namespace-matches': html_namespace_matches_default, -1 51597 'identical-links-same-purpose-matches': identical_links_same_purpose_matches_default, -1 51598 'inserted-into-focus-order-matches': inserted_into_focus_order_matches_default, -1 51599 'is-initiator-matches': is_initiator_matches_default, -1 51600 'label-content-name-mismatch-matches': label_content_name_mismatch_matches_default, -1 51601 'label-matches': label_matches_default, -1 51602 'landmark-has-body-context-matches': landmark_has_body_context_matches_default, -1 51603 'landmark-unique-matches': landmark_unique_matches_default, -1 51604 'layout-table-matches': layout_table_matches_default, -1 51605 'link-in-text-block-matches': link_in_text_block_matches_default, -1 51606 'nested-interactive-matches': nested_interactive_matches_default, -1 51607 'no-autoplay-audio-matches': no_autoplay_audio_matches_default, -1 51608 'no-empty-role-matches': no_empty_role_matches_default, -1 51609 'no-explicit-name-required-matches': no_explicit_name_required_matches_default, -1 51610 'no-naming-method-matches': no_naming_method_matches_default, -1 51611 'no-role-matches': no_role_matches_default, -1 51612 'not-html-matches': not_html_matches_default, -1 51613 'p-as-heading-matches': p_as_heading_matches_default, -1 51614 'scrollable-region-focusable-matches': scrollable_region_focusable_matches_default, -1 51615 'skip-link-matches': skip_link_matches_default, -1 51616 'svg-namespace-matches': svg_namespace_matches_default, -1 51617 'window-is-top-matches': window_is_top_matches_default, -1 51618 'xml-lang-mismatch-matches': xml_lang_mismatch_matches_default -1 51619 }; -1 51620 var metadata_function_map_default = metadataFunctionMap; -1 51621 function CheckResult(check4) { -1 51622 this.id = check4.id; -1 51623 this.data = null; -1 51624 this.relatedNodes = []; -1 51625 this.result = null; -1 51626 } -1 51627 var check_result_default = CheckResult; -1 51628 function createExecutionContext(spec) { -1 51629 if (typeof spec === 'string') { -1 51630 if (metadata_function_map_default[spec]) { -1 51631 return metadata_function_map_default[spec]; -1 51632 } -1 51633 if (/^\s*function[\s\w]*\(/.test(spec)) { -1 51634 return new Function('return ' + spec + ';')(); -1 51635 } -1 51636 throw new ReferenceError('Function ID does not exist in the metadata-function-map: '.concat(spec)); -1 51637 } -1 51638 return spec; -1 51639 } -1 51640 function normalizeOptions() { -1 51641 var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; -1 51642 if (Array.isArray(options) || _typeof(options) !== 'object') { -1 51643 options = { -1 51644 value: options 29841 51645 };29842 -1 if (_get) {29843 -1 extDel = defineLength(function(arg) {29844 -1 var id, args = arguments;29845 -1 if (resolve) {29846 -1 args = resolve(args);29847 -1 }29848 -1 id = _get(args);29849 -1 if (id === null) {29850 -1 return;29851 -1 }29852 -1 conf['delete'](id);29853 -1 }, memLength);29854 -1 } else if (length === 0) {29855 -1 extDel = function extDel() {29856 -1 return conf['delete']('data');29857 -1 };-1 51646 } -1 51647 return options; -1 51648 } -1 51649 function Check(spec) { -1 51650 if (spec) { -1 51651 this.id = spec.id; -1 51652 this.configure(spec); -1 51653 } -1 51654 } -1 51655 Check.prototype.enabled = true; -1 51656 Check.prototype.run = function run(node, options, context3, resolve, reject) { -1 51657 options = options || {}; -1 51658 var enabled = options.hasOwnProperty('enabled') ? options.enabled : this.enabled; -1 51659 var checkOptions = this.getOptions(options.options); -1 51660 if (enabled) { -1 51661 var checkResult = new check_result_default(this); -1 51662 var helper = check_helper_default(checkResult, options, resolve, reject); -1 51663 var result; -1 51664 try { -1 51665 result = this.evaluate.call(helper, node.actualNode, checkOptions, node, context3); -1 51666 } catch (e) { -1 51667 if (node && node.actualNode) { -1 51668 e.errorNode = new dq_element_default(node).toJSON(); -1 51669 } -1 51670 reject(e); -1 51671 return; -1 51672 } -1 51673 if (!helper.isAsync) { -1 51674 checkResult.result = result; -1 51675 resolve(checkResult); -1 51676 } -1 51677 } else { -1 51678 resolve(null); -1 51679 } -1 51680 }; -1 51681 Check.prototype.runSync = function runSync(node, options, context3) { -1 51682 options = options || {}; -1 51683 var _options = options, _options$enabled = _options.enabled, enabled = _options$enabled === void 0 ? this.enabled : _options$enabled; -1 51684 if (!enabled) { -1 51685 return null; -1 51686 } -1 51687 var checkOptions = this.getOptions(options.options); -1 51688 var checkResult = new check_result_default(this); -1 51689 var helper = check_helper_default(checkResult, options); -1 51690 helper.async = function async() { -1 51691 throw new Error('Cannot run async check while in a synchronous run'); -1 51692 }; -1 51693 var result; -1 51694 try { -1 51695 result = this.evaluate.call(helper, node.actualNode, checkOptions, node, context3); -1 51696 } catch (e) { -1 51697 if (node && node.actualNode) { -1 51698 e.errorNode = new dq_element_default(node).toJSON(); -1 51699 } -1 51700 throw e; -1 51701 } -1 51702 checkResult.result = result; -1 51703 return checkResult; -1 51704 }; -1 51705 Check.prototype.configure = function configure(spec) { -1 51706 var _this3 = this; -1 51707 if (!spec.evaluate || metadata_function_map_default[spec.evaluate]) { -1 51708 this._internalCheck = true; -1 51709 } -1 51710 if (spec.hasOwnProperty('enabled')) { -1 51711 this.enabled = spec.enabled; -1 51712 } -1 51713 if (spec.hasOwnProperty('options')) { -1 51714 if (this._internalCheck) { -1 51715 this.options = normalizeOptions(spec.options); 29858 51716 } else {29859 -1 extDel = function extDel(arg) {29860 -1 if (resolve) {29861 -1 arg = resolve(arguments)[0];29862 -1 }29863 -1 return conf['delete'](arg);29864 -1 };-1 51717 this.options = spec.options; 29865 51718 }29866 -1 extGet = defineLength(function() {29867 -1 var id, args = arguments;29868 -1 if (length === 0) {29869 -1 return cache.data;29870 -1 }29871 -1 if (resolve) {29872 -1 args = resolve(args);29873 -1 }29874 -1 if (_get) {29875 -1 id = _get(args);29876 -1 } else {29877 -1 id = String(args[0]);29878 -1 }29879 -1 return cache[id];-1 51719 } -1 51720 [ 'evaluate', 'after' ].filter(function(prop) { -1 51721 return spec.hasOwnProperty(prop); -1 51722 }).forEach(function(prop) { -1 51723 return _this3[prop] = createExecutionContext(spec[prop]); -1 51724 }); -1 51725 }; -1 51726 Check.prototype.getOptions = function getOptions(options) { -1 51727 if (this._internalCheck) { -1 51728 return deep_merge_default(this.options, normalizeOptions(options || {})); -1 51729 } else { -1 51730 return options || this.options; -1 51731 } -1 51732 }; -1 51733 var check_default = Check; -1 51734 function RuleResult(rule3) { -1 51735 this.id = rule3.id; -1 51736 this.result = constants_default.NA; -1 51737 this.pageLevel = rule3.pageLevel; -1 51738 this.impact = null; -1 51739 this.nodes = []; -1 51740 } -1 51741 var rule_result_default = RuleResult; -1 51742 function Rule(spec, parentAudit) { -1 51743 this._audit = parentAudit; -1 51744 this.id = spec.id; -1 51745 this.selector = spec.selector || '*'; -1 51746 if (spec.impact) { -1 51747 assert_default(constants_default.impact.includes(spec.impact), 'Impact '.concat(spec.impact, ' is not a valid impact')); -1 51748 this.impact = spec.impact; -1 51749 } -1 51750 this.excludeHidden = typeof spec.excludeHidden === 'boolean' ? spec.excludeHidden : true; -1 51751 this.enabled = typeof spec.enabled === 'boolean' ? spec.enabled : true; -1 51752 this.pageLevel = typeof spec.pageLevel === 'boolean' ? spec.pageLevel : false; -1 51753 this.reviewOnFail = typeof spec.reviewOnFail === 'boolean' ? spec.reviewOnFail : false; -1 51754 this.any = spec.any || []; -1 51755 this.all = spec.all || []; -1 51756 this.none = spec.none || []; -1 51757 this.tags = spec.tags || []; -1 51758 this.preload = spec.preload ? true : false; -1 51759 if (spec.matches) { -1 51760 this.matches = createExecutionContext(spec.matches); -1 51761 } -1 51762 } -1 51763 Rule.prototype.matches = function matches13() { -1 51764 return true; -1 51765 }; -1 51766 Rule.prototype.gather = function gather(context3) { -1 51767 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 51768 var markStart = 'mark_gather_start_' + this.id; -1 51769 var markEnd = 'mark_gather_end_' + this.id; -1 51770 var markHiddenStart = 'mark_isHidden_start_' + this.id; -1 51771 var markHiddenEnd = 'mark_isHidden_end_' + this.id; -1 51772 if (options.performanceTimer) { -1 51773 performance_timer_default.mark(markStart); -1 51774 } -1 51775 var elements = select_default(this.selector, context3); -1 51776 if (this.excludeHidden) { -1 51777 if (options.performanceTimer) { -1 51778 performance_timer_default.mark(markHiddenStart); -1 51779 } -1 51780 elements = elements.filter(function(element) { -1 51781 return !is_hidden_default(element.actualNode); 29880 51782 });29881 -1 extHas = defineLength(function() {29882 -1 var id, args = arguments;29883 -1 if (length === 0) {29884 -1 return conf.has('data');29885 -1 }29886 -1 if (resolve) {29887 -1 args = resolve(args);-1 51783 if (options.performanceTimer) { -1 51784 performance_timer_default.mark(markHiddenEnd); -1 51785 performance_timer_default.measure('rule_' + this.id + '#gather_axe.utils.isHidden', markHiddenStart, markHiddenEnd); -1 51786 } -1 51787 } -1 51788 if (options.performanceTimer) { -1 51789 performance_timer_default.mark(markEnd); -1 51790 performance_timer_default.measure('rule_' + this.id + '#gather', markStart, markEnd); -1 51791 } -1 51792 return elements; -1 51793 }; -1 51794 Rule.prototype.runChecks = function runChecks(type, node, options, context3, resolve, reject) { -1 51795 var self2 = this; -1 51796 var checkQueue = queue_default(); -1 51797 this[type].forEach(function(c) { -1 51798 var check4 = self2._audit.checks[c.id || c]; -1 51799 var option = get_check_option_default(check4, self2.id, options); -1 51800 checkQueue.defer(function(res, rej) { -1 51801 check4.run(node, option, context3, res, rej); -1 51802 }); -1 51803 }); -1 51804 checkQueue.then(function(results) { -1 51805 results = results.filter(function(check4) { -1 51806 return check4; -1 51807 }); -1 51808 resolve({ -1 51809 type: type, -1 51810 results: results -1 51811 }); -1 51812 })['catch'](reject); -1 51813 }; -1 51814 Rule.prototype.runChecksSync = function runChecksSync(type, node, options, context3) { -1 51815 var self2 = this; -1 51816 var results = []; -1 51817 this[type].forEach(function(c) { -1 51818 var check4 = self2._audit.checks[c.id || c]; -1 51819 var option = get_check_option_default(check4, self2.id, options); -1 51820 results.push(check4.runSync(node, option, context3)); -1 51821 }); -1 51822 results = results.filter(function(check4) { -1 51823 return check4; -1 51824 }); -1 51825 return { -1 51826 type: type, -1 51827 results: results -1 51828 }; -1 51829 }; -1 51830 Rule.prototype.run = function run2(context3) { -1 51831 var _this4 = this; -1 51832 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 51833 var resolve = arguments.length > 2 ? arguments[2] : undefined; -1 51834 var reject = arguments.length > 3 ? arguments[3] : undefined; -1 51835 if (options.performanceTimer) { -1 51836 this._trackPerformance(); -1 51837 } -1 51838 var q = queue_default(); -1 51839 var ruleResult = new rule_result_default(this); -1 51840 var nodes; -1 51841 try { -1 51842 nodes = this.gatherAndMatchNodes(context3, options); -1 51843 } catch (error) { -1 51844 reject(new SupportError({ -1 51845 cause: error, -1 51846 ruleId: this.id -1 51847 })); -1 51848 return; -1 51849 } -1 51850 if (options.performanceTimer) { -1 51851 this._logGatherPerformance(nodes); -1 51852 } -1 51853 nodes.forEach(function(node) { -1 51854 q.defer(function(resolveNode, rejectNode) { -1 51855 var checkQueue = queue_default(); -1 51856 [ 'any', 'all', 'none' ].forEach(function(type) { -1 51857 checkQueue.defer(function(res, rej) { -1 51858 _this4.runChecks(type, node, options, context3, res, rej); -1 51859 }); -1 51860 }); -1 51861 checkQueue.then(function(results) { -1 51862 var result = getResult(results); -1 51863 if (result) { -1 51864 result.node = new dq_element_default(node, options); -1 51865 ruleResult.nodes.push(result); -1 51866 if (_this4.reviewOnFail) { -1 51867 [ 'any', 'all' ].forEach(function(type) { -1 51868 result[type].forEach(function(checkResult) { -1 51869 if (checkResult.result === false) { -1 51870 checkResult.result = void 0; -1 51871 } -1 51872 }); -1 51873 }); -1 51874 result.none.forEach(function(checkResult) { -1 51875 if (checkResult.result === true) { -1 51876 checkResult.result = void 0; -1 51877 } -1 51878 }); -1 51879 } -1 51880 } -1 51881 resolveNode(); -1 51882 })['catch'](function(err2) { -1 51883 return rejectNode(err2); -1 51884 }); -1 51885 }); -1 51886 }); -1 51887 q.defer(function(resolve2) { -1 51888 return setTimeout(resolve2, 0); -1 51889 }); -1 51890 if (options.performanceTimer) { -1 51891 this._logRulePerformance(); -1 51892 } -1 51893 q.then(function() { -1 51894 return resolve(ruleResult); -1 51895 })['catch'](function(error) { -1 51896 return reject(error); -1 51897 }); -1 51898 }; -1 51899 Rule.prototype.runSync = function runSync2(context3) { -1 51900 var _this5 = this; -1 51901 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -1 51902 if (options.performanceTimer) { -1 51903 this._trackPerformance(); -1 51904 } -1 51905 var ruleResult = new rule_result_default(this); -1 51906 var nodes; -1 51907 try { -1 51908 nodes = this.gatherAndMatchNodes(context3, options); -1 51909 } catch (error) { -1 51910 throw new SupportError({ -1 51911 cause: error, -1 51912 ruleId: this.id -1 51913 }); -1 51914 } -1 51915 if (options.performanceTimer) { -1 51916 this._logGatherPerformance(nodes); -1 51917 } -1 51918 nodes.forEach(function(node) { -1 51919 var results = []; -1 51920 [ 'any', 'all', 'none' ].forEach(function(type) { -1 51921 results.push(_this5.runChecksSync(type, node, options, context3)); -1 51922 }); -1 51923 var result = getResult(results); -1 51924 if (result) { -1 51925 result.node = node.actualNode ? new dq_element_default(node, options) : null; -1 51926 ruleResult.nodes.push(result); -1 51927 if (_this5.reviewOnFail) { -1 51928 [ 'any', 'all' ].forEach(function(type) { -1 51929 result[type].forEach(function(checkResult) { -1 51930 if (checkResult.result === false) { -1 51931 checkResult.result = void 0; -1 51932 } -1 51933 }); -1 51934 }); -1 51935 result.none.forEach(function(checkResult) { -1 51936 if (checkResult.result === true) { -1 51937 checkResult.result = void 0; -1 51938 } -1 51939 }); 29888 51940 }29889 -1 if (_get) {29890 -1 id = _get(args);29891 -1 } else {29892 -1 id = String(args[0]);-1 51941 } -1 51942 }); -1 51943 if (options.performanceTimer) { -1 51944 this._logRulePerformance(); -1 51945 } -1 51946 return ruleResult; -1 51947 }; -1 51948 Rule.prototype._trackPerformance = function _trackPerformance() { -1 51949 this._markStart = 'mark_rule_start_' + this.id; -1 51950 this._markEnd = 'mark_rule_end_' + this.id; -1 51951 this._markChecksStart = 'mark_runchecks_start_' + this.id; -1 51952 this._markChecksEnd = 'mark_runchecks_end_' + this.id; -1 51953 }; -1 51954 Rule.prototype._logGatherPerformance = function _logGatherPerformance(nodes) { -1 51955 log_default('gather (', nodes.length, '):', performance_timer_default.timeElapsed() + 'ms'); -1 51956 performance_timer_default.mark(this._markChecksStart); -1 51957 }; -1 51958 Rule.prototype._logRulePerformance = function _logRulePerformance() { -1 51959 performance_timer_default.mark(this._markChecksEnd); -1 51960 performance_timer_default.mark(this._markEnd); -1 51961 performance_timer_default.measure('runchecks_' + this.id, this._markChecksStart, this._markChecksEnd); -1 51962 performance_timer_default.measure('rule_' + this.id, this._markStart, this._markEnd); -1 51963 }; -1 51964 function getResult(results) { -1 51965 if (results.length) { -1 51966 var hasResults = false; -1 51967 var result = {}; -1 51968 results.forEach(function(r) { -1 51969 var res = r.results.filter(function(result2) { -1 51970 return result2; -1 51971 }); -1 51972 result[r.type] = res; -1 51973 if (res.length) { -1 51974 hasResults = true; 29893 51975 }29894 -1 if (id === null) {29895 -1 return false;-1 51976 }); -1 51977 if (hasResults) { -1 51978 return result; -1 51979 } -1 51980 return null; -1 51981 } -1 51982 } -1 51983 Rule.prototype.gatherAndMatchNodes = function gatherAndMatchNodes(context3, options) { -1 51984 var _this6 = this; -1 51985 var markMatchesStart = 'mark_matches_start_' + this.id; -1 51986 var markMatchesEnd = 'mark_matches_end_' + this.id; -1 51987 var nodes = this.gather(context3, options); -1 51988 if (options.performanceTimer) { -1 51989 performance_timer_default.mark(markMatchesStart); -1 51990 } -1 51991 nodes = nodes.filter(function(node) { -1 51992 return _this6.matches(node.actualNode, node, context3); -1 51993 }); -1 51994 if (options.performanceTimer) { -1 51995 performance_timer_default.mark(markMatchesEnd); -1 51996 performance_timer_default.measure('rule_' + this.id + '#matches', markMatchesStart, markMatchesEnd); -1 51997 } -1 51998 return nodes; -1 51999 }; -1 52000 function findAfterChecks(rule3) { -1 52001 return get_all_checks_default(rule3).map(function(c) { -1 52002 var check4 = rule3._audit.checks[c.id || c]; -1 52003 return check4 && typeof check4.after === 'function' ? check4 : null; -1 52004 }).filter(Boolean); -1 52005 } -1 52006 function findCheckResults(nodes, checkID) { -1 52007 var checkResults = []; -1 52008 nodes.forEach(function(nodeResult) { -1 52009 var checks = get_all_checks_default(nodeResult); -1 52010 checks.forEach(function(checkResult) { -1 52011 if (checkResult.id === checkID) { -1 52012 checkResult.node = nodeResult.node; -1 52013 checkResults.push(checkResult); 29896 52014 }29897 -1 return conf.has(id);29898 52015 });29899 -1 defineProperties(memoized, {29900 -1 __memoized__: d(true),29901 -1 delete: d(extDel),29902 -1 clear: d(conf.clear),29903 -1 _get: d(extGet),29904 -1 _has: d(extHas)-1 52016 }); -1 52017 return checkResults; -1 52018 } -1 52019 function filterChecks(checks) { -1 52020 return checks.filter(function(check4) { -1 52021 return check4.filtered !== true; -1 52022 }); -1 52023 } -1 52024 function sanitizeNodes(result) { -1 52025 var checkTypes2 = [ 'any', 'all', 'none' ]; -1 52026 var nodes = result.nodes.filter(function(detail) { -1 52027 var length = 0; -1 52028 checkTypes2.forEach(function(type) { -1 52029 detail[type] = filterChecks(detail[type]); -1 52030 length += detail[type].length; 29905 52031 });29906 -1 return conf;29907 -1 };29908 -1 },29909 -1 './node_modules/memoizee/lib/registered-extensions.js': function node_modulesMemoizeeLibRegisteredExtensionsJs(module, exports, __webpack_require__) {29910 -1 'use strict';29911 -1 },29912 -1 './node_modules/memoizee/lib/resolve-length.js': function node_modulesMemoizeeLibResolveLengthJs(module, exports, __webpack_require__) {29913 -1 'use strict';29914 -1 var toPosInt = __webpack_require__('./node_modules/es5-ext/number/to-pos-integer.js');29915 -1 module.exports = function(optsLength, fnLength, isAsync) {29916 -1 var length;29917 -1 if (isNaN(optsLength)) {29918 -1 length = fnLength;29919 -1 if (!(length >= 0)) {29920 -1 return 1;-1 52032 return length > 0; -1 52033 }); -1 52034 if (result.pageLevel && nodes.length) { -1 52035 nodes = [ nodes.reduce(function(a, b) { -1 52036 if (a) { -1 52037 checkTypes2.forEach(function(type) { -1 52038 a[type].push.apply(a[type], b[type]); -1 52039 }); -1 52040 return a; 29921 52041 }29922 -1 if (isAsync && length) {29923 -1 return length - 1;-1 52042 }) ]; -1 52043 } -1 52044 return nodes; -1 52045 } -1 52046 Rule.prototype.after = function after(result, options) { -1 52047 var afterChecks = findAfterChecks(this); -1 52048 var ruleID = this.id; -1 52049 afterChecks.forEach(function(check4) { -1 52050 var beforeResults = findCheckResults(result.nodes, check4.id); -1 52051 var option = get_check_option_default(check4, ruleID, options); -1 52052 var afterResults = check4.after(beforeResults, option); -1 52053 beforeResults.forEach(function(item) { -1 52054 delete item.node; -1 52055 if (afterResults.indexOf(item) === -1) { -1 52056 item.filtered = true; 29924 52057 }29925 -1 return length;29926 -1 }29927 -1 if (optsLength === false) {29928 -1 return false;-1 52058 }); -1 52059 }); -1 52060 result.nodes = sanitizeNodes(result); -1 52061 return result; -1 52062 }; -1 52063 Rule.prototype.configure = function configure2(spec) { -1 52064 if (spec.hasOwnProperty('selector')) { -1 52065 this.selector = spec.selector; -1 52066 } -1 52067 if (spec.hasOwnProperty('excludeHidden')) { -1 52068 this.excludeHidden = typeof spec.excludeHidden === 'boolean' ? spec.excludeHidden : true; -1 52069 } -1 52070 if (spec.hasOwnProperty('enabled')) { -1 52071 this.enabled = typeof spec.enabled === 'boolean' ? spec.enabled : true; -1 52072 } -1 52073 if (spec.hasOwnProperty('pageLevel')) { -1 52074 this.pageLevel = typeof spec.pageLevel === 'boolean' ? spec.pageLevel : false; -1 52075 } -1 52076 if (spec.hasOwnProperty('reviewOnFail')) { -1 52077 this.reviewOnFail = typeof spec.reviewOnFail === 'boolean' ? spec.reviewOnFail : false; -1 52078 } -1 52079 if (spec.hasOwnProperty('any')) { -1 52080 this.any = spec.any; -1 52081 } -1 52082 if (spec.hasOwnProperty('all')) { -1 52083 this.all = spec.all; -1 52084 } -1 52085 if (spec.hasOwnProperty('none')) { -1 52086 this.none = spec.none; -1 52087 } -1 52088 if (spec.hasOwnProperty('tags')) { -1 52089 this.tags = spec.tags; -1 52090 } -1 52091 if (spec.hasOwnProperty('matches')) { -1 52092 this.matches = createExecutionContext(spec.matches); -1 52093 } -1 52094 if (spec.impact) { -1 52095 assert_default(constants_default.impact.includes(spec.impact), 'Impact '.concat(spec.impact, ' is not a valid impact')); -1 52096 this.impact = spec.impact; -1 52097 } -1 52098 }; -1 52099 var rule_default = Rule; -1 52100 var dot = __toModule(require_doT()); -1 52101 var dotRegex = /\{\{.+?\}\}/g; -1 52102 function getDefaultOrigin() { -1 52103 if (window.origin) { -1 52104 return window.origin; -1 52105 } -1 52106 if (window.location && window.location.origin) { -1 52107 return window.location.origin; -1 52108 } -1 52109 } -1 52110 function getDefaultConfiguration(audit3) { -1 52111 var config; -1 52112 if (audit3) { -1 52113 config = clone_default(audit3); -1 52114 config.commons = audit3.commons; -1 52115 } else { -1 52116 config = {}; -1 52117 } -1 52118 config.reporter = config.reporter || null; -1 52119 config.noHtml = config.noHtml || false; -1 52120 if (!config.allowedOrigins) { -1 52121 var defaultOrigin = getDefaultOrigin(); -1 52122 config.allowedOrigins = defaultOrigin ? [ defaultOrigin ] : []; -1 52123 } -1 52124 config.rules = config.rules || []; -1 52125 config.checks = config.checks || []; -1 52126 config.data = _extends({ -1 52127 checks: {}, -1 52128 rules: {} -1 52129 }, config.data); -1 52130 return config; -1 52131 } -1 52132 function unpackToObject(collection, audit3, method) { -1 52133 var i, l; -1 52134 for (i = 0, l = collection.length; i < l; i++) { -1 52135 audit3[method](collection[i]); -1 52136 } -1 52137 } -1 52138 var mergeCheckLocale = function mergeCheckLocale(a, b) { -1 52139 var pass = b.pass, fail = b.fail; -1 52140 if (typeof pass === 'string' && dotRegex.test(pass)) { -1 52141 pass = dot['default'].compile(pass); -1 52142 } -1 52143 if (typeof fail === 'string' && dotRegex.test(fail)) { -1 52144 fail = dot['default'].compile(fail); -1 52145 } -1 52146 return _extends({}, a, { -1 52147 messages: { -1 52148 pass: pass || a.messages.pass, -1 52149 fail: fail || a.messages.fail, -1 52150 incomplete: _typeof(a.messages.incomplete) === 'object' ? _extends({}, a.messages.incomplete, b.incomplete) : b.incomplete 29929 52151 }29930 -1 return toPosInt(optsLength);29931 -1 };29932 -1 },29933 -1 './node_modules/memoizee/lib/resolve-normalize.js': function node_modulesMemoizeeLibResolveNormalizeJs(module, exports, __webpack_require__) {29934 -1 'use strict';29935 -1 var callable = __webpack_require__('./node_modules/es5-ext/object/valid-callable.js');29936 -1 module.exports = function(userNormalizer) {29937 -1 var normalizer;29938 -1 if (typeof userNormalizer === 'function') {29939 -1 return {29940 -1 set: userNormalizer,29941 -1 get: userNormalizer-1 52152 }); -1 52153 }; -1 52154 var mergeRuleLocale = function mergeRuleLocale(a, b) { -1 52155 var help = b.help, description = b.description; -1 52156 if (typeof help === 'string' && dotRegex.test(help)) { -1 52157 help = dot['default'].compile(help); -1 52158 } -1 52159 if (typeof description === 'string' && dotRegex.test(description)) { -1 52160 description = dot['default'].compile(description); -1 52161 } -1 52162 return _extends({}, a, { -1 52163 help: help || a.help, -1 52164 description: description || a.description -1 52165 }); -1 52166 }; -1 52167 var mergeFailureMessage = function mergeFailureMessage(a, b) { -1 52168 var failureMessage = b.failureMessage; -1 52169 if (typeof failureMessage === 'string' && dotRegex.test(failureMessage)) { -1 52170 failureMessage = dot['default'].compile(failureMessage); -1 52171 } -1 52172 return _extends({}, a, { -1 52173 failureMessage: failureMessage || a.failureMessage -1 52174 }); -1 52175 }; -1 52176 var mergeFallbackMessage = function mergeFallbackMessage(a, b) { -1 52177 if (typeof b === 'string' && dotRegex.test(b)) { -1 52178 b = dot['default'].compile(b); -1 52179 } -1 52180 return b || a; -1 52181 }; -1 52182 var Audit = function() { -1 52183 function Audit(audit3) { -1 52184 _classCallCheck(this, Audit); -1 52185 this.lang = 'en'; -1 52186 this.defaultConfig = audit3; -1 52187 this.standards = standards_default; -1 52188 this._init(); -1 52189 this._defaultLocale = null; -1 52190 } -1 52191 _createClass(Audit, [ { -1 52192 key: '_setDefaultLocale', -1 52193 value: function _setDefaultLocale() { -1 52194 if (this._defaultLocale) { -1 52195 return; -1 52196 } -1 52197 var locale = { -1 52198 checks: {}, -1 52199 rules: {}, -1 52200 failureSummaries: {}, -1 52201 incompleteFallbackMessage: '', -1 52202 lang: this.lang 29942 52203 };29943 -1 }29944 -1 normalizer = {29945 -1 get: callable(userNormalizer.get)29946 -1 };29947 -1 if (userNormalizer.set !== undefined) {29948 -1 normalizer.set = callable(userNormalizer.set);29949 -1 if (userNormalizer['delete']) {29950 -1 normalizer['delete'] = callable(userNormalizer['delete']);-1 52204 var checkIDs = Object.keys(this.data.checks); -1 52205 for (var _i23 = 0; _i23 < checkIDs.length; _i23++) { -1 52206 var id = checkIDs[_i23]; -1 52207 var check4 = this.data.checks[id]; -1 52208 var _check4$messages = check4.messages, pass = _check4$messages.pass, fail = _check4$messages.fail, incomplete = _check4$messages.incomplete; -1 52209 locale.checks[id] = { -1 52210 pass: pass, -1 52211 fail: fail, -1 52212 incomplete: incomplete -1 52213 }; 29951 52214 }29952 -1 if (userNormalizer.clear) {29953 -1 normalizer.clear = callable(userNormalizer.clear);-1 52215 var ruleIDs = Object.keys(this.data.rules); -1 52216 for (var _i24 = 0; _i24 < ruleIDs.length; _i24++) { -1 52217 var _id = ruleIDs[_i24]; -1 52218 var rule3 = this.data.rules[_id]; -1 52219 var description = rule3.description, help = rule3.help; -1 52220 locale.rules[_id] = { -1 52221 description: description, -1 52222 help: help -1 52223 }; 29954 52224 }29955 -1 return normalizer;-1 52225 var failureSummaries = Object.keys(this.data.failureSummaries); -1 52226 for (var _i25 = 0; _i25 < failureSummaries.length; _i25++) { -1 52227 var type = failureSummaries[_i25]; -1 52228 var failureSummary2 = this.data.failureSummaries[type]; -1 52229 var failureMessage = failureSummary2.failureMessage; -1 52230 locale.failureSummaries[type] = { -1 52231 failureMessage: failureMessage -1 52232 }; -1 52233 } -1 52234 locale.incompleteFallbackMessage = this.data.incompleteFallbackMessage; -1 52235 this._defaultLocale = locale; 29956 52236 }29957 -1 normalizer.set = normalizer.get;29958 -1 return normalizer;29959 -1 };29960 -1 },29961 -1 './node_modules/memoizee/lib/resolve-resolve.js': function node_modulesMemoizeeLibResolveResolveJs(module, exports, __webpack_require__) {29962 -1 'use strict';29963 -1 var toArray = __webpack_require__('./node_modules/es5-ext/array/to-array.js'), isValue = __webpack_require__('./node_modules/es5-ext/object/is-value.js'), callable = __webpack_require__('./node_modules/es5-ext/object/valid-callable.js');29964 -1 var slice = Array.prototype.slice, resolveArgs;29965 -1 resolveArgs = function resolveArgs(args) {29966 -1 return this.map(function(resolve, i) {29967 -1 return resolve ? resolve(args[i]) : args[i];29968 -1 }).concat(slice.call(args, this.length));29969 -1 };29970 -1 module.exports = function(resolvers) {29971 -1 resolvers = toArray(resolvers);29972 -1 resolvers.forEach(function(resolve) {29973 -1 if (isValue(resolve)) {29974 -1 callable(resolve);-1 52237 }, { -1 52238 key: '_resetLocale', -1 52239 value: function _resetLocale() { -1 52240 var defaultLocale = this._defaultLocale; -1 52241 if (!defaultLocale) { -1 52242 return; 29975 52243 }29976 -1 });29977 -1 return resolveArgs.bind(resolvers);29978 -1 };29979 -1 },29980 -1 './node_modules/memoizee/normalizers/get-1.js': function node_modulesMemoizeeNormalizersGet1Js(module, exports, __webpack_require__) {29981 -1 'use strict';29982 -1 var indexOf = __webpack_require__('./node_modules/es5-ext/array/#/e-index-of.js');29983 -1 module.exports = function() {29984 -1 var lastId = 0, argsMap = [], cache = [];29985 -1 return {29986 -1 get: function get(args) {29987 -1 var index = indexOf.call(argsMap, args[0]);29988 -1 return index === -1 ? null : cache[index];29989 -1 },29990 -1 set: function set(args) {29991 -1 argsMap.push(args[0]);29992 -1 cache.push(++lastId);29993 -1 return lastId;29994 -1 },29995 -1 delete: function _delete(id) {29996 -1 var index = indexOf.call(cache, id);29997 -1 if (index !== -1) {29998 -1 argsMap.splice(index, 1);29999 -1 cache.splice(index, 1);-1 52244 this.applyLocale(defaultLocale); -1 52245 } -1 52246 }, { -1 52247 key: '_applyCheckLocale', -1 52248 value: function _applyCheckLocale(checks) { -1 52249 var keys = Object.keys(checks); -1 52250 for (var _i26 = 0; _i26 < keys.length; _i26++) { -1 52251 var id = keys[_i26]; -1 52252 if (!this.data.checks[id]) { -1 52253 throw new Error('Locale provided for unknown check: "'.concat(id, '"')); 30000 52254 }30001 -1 },30002 -1 clear: function clear() {30003 -1 argsMap = [];30004 -1 cache = [];-1 52255 this.data.checks[id] = mergeCheckLocale(this.data.checks[id], checks[id]); 30005 52256 }30006 -1 };30007 -1 };30008 -1 },30009 -1 './node_modules/memoizee/normalizers/get-fixed.js': function node_modulesMemoizeeNormalizersGetFixedJs(module, exports, __webpack_require__) {30010 -1 'use strict';30011 -1 var indexOf = __webpack_require__('./node_modules/es5-ext/array/#/e-index-of.js'), create = Object.create;30012 -1 module.exports = function(length) {30013 -1 var lastId = 0, map = [ [], [] ], cache = create(null);30014 -1 return {30015 -1 get: function get(args) {30016 -1 var index = 0, set = map, i;30017 -1 while (index < length - 1) {30018 -1 i = indexOf.call(set[0], args[index]);30019 -1 if (i === -1) {30020 -1 return null;30021 -1 }30022 -1 set = set[1][i];30023 -1 ++index;30024 -1 }30025 -1 i = indexOf.call(set[0], args[index]);30026 -1 if (i === -1) {30027 -1 return null;30028 -1 }30029 -1 return set[1][i] || null;30030 -1 },30031 -1 set: function set(args) {30032 -1 var index = 0, set = map, i;30033 -1 while (index < length - 1) {30034 -1 i = indexOf.call(set[0], args[index]);30035 -1 if (i === -1) {30036 -1 i = set[0].push(args[index]) - 1;30037 -1 set[1].push([ [], [] ]);30038 -1 }30039 -1 set = set[1][i];30040 -1 ++index;30041 -1 }30042 -1 i = indexOf.call(set[0], args[index]);30043 -1 if (i === -1) {30044 -1 i = set[0].push(args[index]) - 1;30045 -1 }30046 -1 set[1][i] = ++lastId;30047 -1 cache[lastId] = args;30048 -1 return lastId;30049 -1 },30050 -1 delete: function _delete(id) {30051 -1 var index = 0, set = map, i, path = [], args = cache[id];30052 -1 while (index < length - 1) {30053 -1 i = indexOf.call(set[0], args[index]);30054 -1 if (i === -1) {30055 -1 return;30056 -1 }30057 -1 path.push(set, i);30058 -1 set = set[1][i];30059 -1 ++index;30060 -1 }30061 -1 i = indexOf.call(set[0], args[index]);30062 -1 if (i === -1) {30063 -1 return;-1 52257 } -1 52258 }, { -1 52259 key: '_applyRuleLocale', -1 52260 value: function _applyRuleLocale(rules) { -1 52261 var keys = Object.keys(rules); -1 52262 for (var _i27 = 0; _i27 < keys.length; _i27++) { -1 52263 var id = keys[_i27]; -1 52264 if (!this.data.rules[id]) { -1 52265 throw new Error('Locale provided for unknown rule: "'.concat(id, '"')); 30064 52266 }30065 -1 id = set[1][i];30066 -1 set[0].splice(i, 1);30067 -1 set[1].splice(i, 1);30068 -1 while (!set[0].length && path.length) {30069 -1 i = path.pop();30070 -1 set = path.pop();30071 -1 set[0].splice(i, 1);30072 -1 set[1].splice(i, 1);-1 52267 this.data.rules[id] = mergeRuleLocale(this.data.rules[id], rules[id]); -1 52268 } -1 52269 } -1 52270 }, { -1 52271 key: '_applyFailureSummaries', -1 52272 value: function _applyFailureSummaries(messages) { -1 52273 var keys = Object.keys(messages); -1 52274 for (var _i28 = 0; _i28 < keys.length; _i28++) { -1 52275 var key = keys[_i28]; -1 52276 if (!this.data.failureSummaries[key]) { -1 52277 throw new Error('Locale provided for unknown failureMessage: "'.concat(key, '"')); 30073 52278 }30074 -1 delete cache[id];30075 -1 },30076 -1 clear: function clear() {30077 -1 map = [ [], [] ];30078 -1 cache = create(null);-1 52279 this.data.failureSummaries[key] = mergeFailureMessage(this.data.failureSummaries[key], messages[key]); 30079 52280 }30080 -1 };30081 -1 };30082 -1 },30083 -1 './node_modules/memoizee/normalizers/get-primitive-fixed.js': function node_modulesMemoizeeNormalizersGetPrimitiveFixedJs(module, exports, __webpack_require__) {30084 -1 'use strict';30085 -1 module.exports = function(length) {30086 -1 if (!length) {30087 -1 return function() {30088 -1 return '';30089 -1 };30090 52281 }30091 -1 return function(args) {30092 -1 var id = String(args[0]), i = 0, currentLength = length;30093 -1 while (--currentLength) {30094 -1 id += '\x01' + args[++i];-1 52282 }, { -1 52283 key: 'applyLocale', -1 52284 value: function applyLocale(locale) { -1 52285 this._setDefaultLocale(); -1 52286 if (locale.checks) { -1 52287 this._applyCheckLocale(locale.checks); 30095 52288 }30096 -1 return id;30097 -1 };30098 -1 };30099 -1 },30100 -1 './node_modules/memoizee/normalizers/get.js': function node_modulesMemoizeeNormalizersGetJs(module, exports, __webpack_require__) {30101 -1 'use strict';30102 -1 var indexOf = __webpack_require__('./node_modules/es5-ext/array/#/e-index-of.js');30103 -1 var create = Object.create;30104 -1 module.exports = function() {30105 -1 var lastId = 0, map = [], cache = create(null);30106 -1 return {30107 -1 get: function get(args) {30108 -1 var index = 0, set = map, i, length = args.length;30109 -1 if (length === 0) {30110 -1 return set[length] || null;30111 -1 }30112 -1 if (set = set[length]) {30113 -1 while (index < length - 1) {30114 -1 i = indexOf.call(set[0], args[index]);30115 -1 if (i === -1) {30116 -1 return null;30117 -1 }30118 -1 set = set[1][i];30119 -1 ++index;30120 -1 }30121 -1 i = indexOf.call(set[0], args[index]);30122 -1 if (i === -1) {30123 -1 return null;30124 -1 }30125 -1 return set[1][i] || null;30126 -1 }30127 -1 return null;30128 -1 },30129 -1 set: function set(args) {30130 -1 var index = 0, set = map, i, length = args.length;30131 -1 if (length === 0) {30132 -1 set[length] = ++lastId;30133 -1 } else {30134 -1 if (!set[length]) {30135 -1 set[length] = [ [], [] ];30136 -1 }30137 -1 set = set[length];30138 -1 while (index < length - 1) {30139 -1 i = indexOf.call(set[0], args[index]);30140 -1 if (i === -1) {30141 -1 i = set[0].push(args[index]) - 1;30142 -1 set[1].push([ [], [] ]);30143 -1 }30144 -1 set = set[1][i];30145 -1 ++index;30146 -1 }30147 -1 i = indexOf.call(set[0], args[index]);30148 -1 if (i === -1) {30149 -1 i = set[0].push(args[index]) - 1;30150 -1 }30151 -1 set[1][i] = ++lastId;30152 -1 }30153 -1 cache[lastId] = args;30154 -1 return lastId;30155 -1 },30156 -1 delete: function _delete(id) {30157 -1 var index = 0, set = map, i, args = cache[id], length = args.length, path = [];30158 -1 if (length === 0) {30159 -1 delete set[length];30160 -1 } else if (set = set[length]) {30161 -1 while (index < length - 1) {30162 -1 i = indexOf.call(set[0], args[index]);30163 -1 if (i === -1) {30164 -1 return;30165 -1 }30166 -1 path.push(set, i);30167 -1 set = set[1][i];30168 -1 ++index;30169 -1 }30170 -1 i = indexOf.call(set[0], args[index]);30171 -1 if (i === -1) {30172 -1 return;30173 -1 }30174 -1 id = set[1][i];30175 -1 set[0].splice(i, 1);30176 -1 set[1].splice(i, 1);30177 -1 while (!set[0].length && path.length) {30178 -1 i = path.pop();30179 -1 set = path.pop();30180 -1 set[0].splice(i, 1);30181 -1 set[1].splice(i, 1);-1 52289 if (locale.rules) { -1 52290 this._applyRuleLocale(locale.rules); -1 52291 } -1 52292 if (locale.failureSummaries) { -1 52293 this._applyFailureSummaries(locale.failureSummaries, 'failureSummaries'); -1 52294 } -1 52295 if (locale.incompleteFallbackMessage) { -1 52296 this.data.incompleteFallbackMessage = mergeFallbackMessage(this.data.incompleteFallbackMessage, locale.incompleteFallbackMessage); -1 52297 } -1 52298 if (locale.lang) { -1 52299 this.lang = locale.lang; -1 52300 } -1 52301 } -1 52302 }, { -1 52303 key: 'setAllowedOrigins', -1 52304 value: function setAllowedOrigins(allowedOrigins) { -1 52305 var defaultOrigin = getDefaultOrigin(); -1 52306 this.allowedOrigins = []; -1 52307 var _iterator2 = _createForOfIteratorHelper(allowedOrigins), _step2; -1 52308 try { -1 52309 for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) { -1 52310 var origin = _step2.value; -1 52311 if (origin === constants_default.allOrigins) { -1 52312 this.allowedOrigins = [ '*' ]; -1 52313 return; -1 52314 } else if (origin !== constants_default.sameOrigin) { -1 52315 this.allowedOrigins.push(origin); -1 52316 } else if (defaultOrigin) { -1 52317 this.allowedOrigins.push(defaultOrigin); 30182 52318 } 30183 52319 }30184 -1 delete cache[id];30185 -1 },30186 -1 clear: function clear() {30187 -1 map = [];30188 -1 cache = create(null);-1 52320 } catch (err) { -1 52321 _iterator2.e(err); -1 52322 } finally { -1 52323 _iterator2.f(); 30189 52324 }30190 -1 };30191 -1 };30192 -1 },30193 -1 './node_modules/memoizee/normalizers/primitive.js': function node_modulesMemoizeeNormalizersPrimitiveJs(module, exports, __webpack_require__) {30194 -1 'use strict';30195 -1 module.exports = function(args) {30196 -1 var id, i, length = args.length;30197 -1 if (!length) {30198 -1 return '\x02';30199 52325 }30200 -1 id = String(args[i = 0]);30201 -1 while (--length) {30202 -1 id += '\x01' + args[++i];-1 52326 }, { -1 52327 key: '_init', -1 52328 value: function _init() { -1 52329 var audit3 = getDefaultConfiguration(this.defaultConfig); -1 52330 this.lang = audit3.lang || 'en'; -1 52331 this.reporter = audit3.reporter; -1 52332 this.commands = {}; -1 52333 this.rules = []; -1 52334 this.checks = {}; -1 52335 this.brand = 'axe'; -1 52336 this.application = 'axeAPI'; -1 52337 this.tagExclude = [ 'experimental' ]; -1 52338 this.noHtml = audit3.noHtml; -1 52339 this.allowedOrigins = audit3.allowedOrigins; -1 52340 unpackToObject(audit3.rules, this, 'addRule'); -1 52341 unpackToObject(audit3.checks, this, 'addCheck'); -1 52342 this.data = {}; -1 52343 this.data.checks = audit3.data && audit3.data.checks || {}; -1 52344 this.data.rules = audit3.data && audit3.data.rules || {}; -1 52345 this.data.failureSummaries = audit3.data && audit3.data.failureSummaries || {}; -1 52346 this.data.incompleteFallbackMessage = audit3.data && audit3.data.incompleteFallbackMessage || ''; -1 52347 this._constructHelpUrls(); 30203 52348 }30204 -1 return id;30205 -1 };30206 -1 },30207 -1 './node_modules/memoizee/plain.js': function node_modulesMemoizeePlainJs(module, exports, __webpack_require__) {30208 -1 'use strict';30209 -1 var callable = __webpack_require__('./node_modules/es5-ext/object/valid-callable.js'), forEach = __webpack_require__('./node_modules/es5-ext/object/for-each.js'), extensions = __webpack_require__('./node_modules/memoizee/lib/registered-extensions.js'), configure = __webpack_require__('./node_modules/memoizee/lib/configure-map.js'), resolveLength = __webpack_require__('./node_modules/memoizee/lib/resolve-length.js');30210 -1 module.exports = function self(fn) {30211 -1 var options, length, conf;30212 -1 callable(fn);30213 -1 options = Object(arguments[1]);30214 -1 if (options.async && options.promise) {30215 -1 throw new Error('Options \'async\' and \'promise\' cannot be used together');-1 52349 }, { -1 52350 key: 'registerCommand', -1 52351 value: function registerCommand(command) { -1 52352 this.commands[command.id] = command.callback; 30216 52353 }30217 -1 if (hasOwnProperty.call(fn, '__memoized__') && !options.force) {30218 -1 return fn;-1 52354 }, { -1 52355 key: 'addRule', -1 52356 value: function addRule(spec) { -1 52357 if (spec.metadata) { -1 52358 this.data.rules[spec.id] = spec.metadata; -1 52359 } -1 52360 var rule3 = this.getRule(spec.id); -1 52361 if (rule3) { -1 52362 rule3.configure(spec); -1 52363 } else { -1 52364 this.rules.push(new rule_default(spec, this)); -1 52365 } 30219 52366 }30220 -1 length = resolveLength(options.length, fn.length, options.async && extensions.async);30221 -1 conf = configure(fn, length, options);30222 -1 forEach(extensions, function(extFn, name) {30223 -1 if (options[name]) {30224 -1 extFn(options[name], conf, options);-1 52367 }, { -1 52368 key: 'addCheck', -1 52369 value: function addCheck(spec) { -1 52370 var metadata = spec.metadata; -1 52371 if (_typeof(metadata) === 'object') { -1 52372 this.data.checks[spec.id] = metadata; -1 52373 if (_typeof(metadata.messages) === 'object') { -1 52374 Object.keys(metadata.messages).filter(function(prop) { -1 52375 return metadata.messages.hasOwnProperty(prop) && typeof metadata.messages[prop] === 'string'; -1 52376 }).forEach(function(prop) { -1 52377 if (metadata.messages[prop].indexOf('function') === 0) { -1 52378 metadata.messages[prop] = new Function('return ' + metadata.messages[prop] + ';')(); -1 52379 } -1 52380 }); -1 52381 } -1 52382 } -1 52383 if (this.checks[spec.id]) { -1 52384 this.checks[spec.id].configure(spec); -1 52385 } else { -1 52386 this.checks[spec.id] = new check_default(spec); 30225 52387 }30226 -1 });30227 -1 if (self.__profiler__) {30228 -1 self.__profiler__(conf);30229 52388 }30230 -1 conf.updateEnv();30231 -1 return conf.memoized;30232 -1 };30233 -1 },30234 -1 './node_modules/next-tick/index.js': function node_modulesNextTickIndexJs(module, exports, __webpack_require__) {30235 -1 'use strict';30236 -1 (function(process, setImmediate) {30237 -1 var callable, byObserver;30238 -1 callable = function callable(fn) {30239 -1 if (typeof fn !== 'function') {30240 -1 throw new TypeError(fn + ' is not a function');-1 52389 }, { -1 52390 key: 'run', -1 52391 value: function run(context3, options, resolve, reject) { -1 52392 this.normalizeOptions(options); -1 52393 axe._selectCache = []; -1 52394 var allRulesToRun = getRulesToRun(this.rules, context3, options); -1 52395 var runNowRules = allRulesToRun.now; -1 52396 var runLaterRules = allRulesToRun.later; -1 52397 var nowRulesQueue = queue_default(); -1 52398 runNowRules.forEach(function(rule3) { -1 52399 nowRulesQueue.defer(getDefferedRule(rule3, context3, options)); -1 52400 }); -1 52401 var preloaderQueue = queue_default(); -1 52402 if (runLaterRules.length) { -1 52403 preloaderQueue.defer(function(resolve2) { -1 52404 preload_default(options).then(function(assets) { -1 52405 return resolve2(assets); -1 52406 })['catch'](function(err2) { -1 52407 console.warn('Couldn\'t load preload assets: ', err2); -1 52408 resolve2(void 0); -1 52409 }); -1 52410 }); 30241 52411 }30242 -1 return fn;30243 -1 };30244 -1 byObserver = function byObserver(Observer) {30245 -1 var node = document.createTextNode(''), queue, currentQueue, i = 0;30246 -1 new Observer(function() {30247 -1 var callback;30248 -1 if (!queue) {30249 -1 if (!currentQueue) {30250 -1 return;-1 52412 var queueForNowRulesAndPreloader = queue_default(); -1 52413 queueForNowRulesAndPreloader.defer(nowRulesQueue); -1 52414 queueForNowRulesAndPreloader.defer(preloaderQueue); -1 52415 queueForNowRulesAndPreloader.then(function(nowRulesAndPreloaderResults) { -1 52416 var assetsFromQueue = nowRulesAndPreloaderResults.pop(); -1 52417 if (assetsFromQueue && assetsFromQueue.length) { -1 52418 var assets = assetsFromQueue[0]; -1 52419 if (assets) { -1 52420 context3 = _extends({}, context3, assets); 30251 52421 }30252 -1 queue = currentQueue;30253 -1 } else if (currentQueue) {30254 -1 queue = currentQueue.concat(queue);30255 -1 }30256 -1 currentQueue = queue;30257 -1 queue = null;30258 -1 if (typeof currentQueue === 'function') {30259 -1 callback = currentQueue;30260 -1 currentQueue = null;30261 -1 callback();-1 52422 } -1 52423 var nowRulesResults = nowRulesAndPreloaderResults[0]; -1 52424 if (!runLaterRules.length) { -1 52425 axe._selectCache = void 0; -1 52426 resolve(nowRulesResults.filter(function(result) { -1 52427 return !!result; -1 52428 })); 30262 52429 return; 30263 52430 }30264 -1 node.data = i = ++i % 2;30265 -1 while (currentQueue) {30266 -1 callback = currentQueue.shift();30267 -1 if (!currentQueue.length) {30268 -1 currentQueue = null;-1 52431 var laterRulesQueue = queue_default(); -1 52432 runLaterRules.forEach(function(rule3) { -1 52433 var deferredRule = getDefferedRule(rule3, context3, options); -1 52434 laterRulesQueue.defer(deferredRule); -1 52435 }); -1 52436 laterRulesQueue.then(function(laterRuleResults) { -1 52437 axe._selectCache = void 0; -1 52438 resolve(nowRulesResults.concat(laterRuleResults).filter(function(result) { -1 52439 return !!result; -1 52440 })); -1 52441 })['catch'](reject); -1 52442 })['catch'](reject); -1 52443 } -1 52444 }, { -1 52445 key: 'after', -1 52446 value: function after(results, options) { -1 52447 var rules = this.rules; -1 52448 return results.map(function(ruleResult) { -1 52449 var rule3 = find_by_default(rules, 'id', ruleResult.id); -1 52450 if (!rule3) { -1 52451 throw new Error('Result for unknown rule. You may be running mismatch axe-core versions'); -1 52452 } -1 52453 return rule3.after(ruleResult, options); -1 52454 }); -1 52455 } -1 52456 }, { -1 52457 key: 'getRule', -1 52458 value: function getRule(ruleId) { -1 52459 return this.rules.find(function(rule3) { -1 52460 return rule3.id === ruleId; -1 52461 }); -1 52462 } -1 52463 }, { -1 52464 key: 'normalizeOptions', -1 52465 value: function normalizeOptions(options) { -1 52466 var audit3 = this; -1 52467 var tags = []; -1 52468 var ruleIds = []; -1 52469 audit3.rules.forEach(function(rule3) { -1 52470 ruleIds.push(rule3.id); -1 52471 rule3.tags.forEach(function(tag) { -1 52472 if (!tags.includes(tag)) { -1 52473 tags.push(tag); 30269 52474 }30270 -1 callback();30271 -1 }30272 -1 }).observe(node, {30273 -1 characterData: true-1 52475 }); 30274 52476 });30275 -1 return function(fn) {30276 -1 callable(fn);30277 -1 if (queue) {30278 -1 if (typeof queue === 'function') {30279 -1 queue = [ queue, fn ];-1 52477 if (_typeof(options.runOnly) === 'object') { -1 52478 if (Array.isArray(options.runOnly)) { -1 52479 var hasTag = options.runOnly.find(function(value) { -1 52480 return tags.includes(value); -1 52481 }); -1 52482 var hasRule = options.runOnly.find(function(value) { -1 52483 return ruleIds.includes(value); -1 52484 }); -1 52485 if (hasTag && hasRule) { -1 52486 throw new Error('runOnly cannot be both rules and tags'); -1 52487 } -1 52488 if (hasRule) { -1 52489 options.runOnly = { -1 52490 type: 'rule', -1 52491 values: options.runOnly -1 52492 }; 30280 52493 } else {30281 -1 queue.push(fn);-1 52494 options.runOnly = { -1 52495 type: 'tag', -1 52496 values: options.runOnly -1 52497 }; 30282 52498 }30283 -1 return;30284 52499 }30285 -1 queue = fn;30286 -1 node.data = i = ++i % 2;30287 -1 };30288 -1 };30289 -1 module.exports = function() {30290 -1 if (_typeof(process) === 'object' && process && typeof process.nextTick === 'function') {30291 -1 return process.nextTick;30292 -1 }30293 -1 if ((typeof document === 'undefined' ? 'undefined' : _typeof(document)) === 'object' && document) {30294 -1 if (typeof MutationObserver === 'function') {30295 -1 return byObserver(MutationObserver);-1 52500 var only = options.runOnly; -1 52501 if (only.value && !only.values) { -1 52502 only.values = only.value; -1 52503 delete only.value; 30296 52504 }30297 -1 if (typeof WebKitMutationObserver === 'function') {30298 -1 return byObserver(WebKitMutationObserver);-1 52505 if (!Array.isArray(only.values) || only.values.length === 0) { -1 52506 throw new Error('runOnly.values must be a non-empty array'); -1 52507 } -1 52508 if ([ 'rule', 'rules' ].includes(only.type)) { -1 52509 only.type = 'rule'; -1 52510 only.values.forEach(function(ruleId) { -1 52511 if (!ruleIds.includes(ruleId)) { -1 52512 throw new Error('unknown rule `' + ruleId + '` in options.runOnly'); -1 52513 } -1 52514 }); -1 52515 } else if ([ 'tag', 'tags', void 0 ].includes(only.type)) { -1 52516 only.type = 'tag'; -1 52517 var unmatchedTags = only.values.filter(function(tag) { -1 52518 return !tags.includes(tag); -1 52519 }); -1 52520 if (unmatchedTags.length !== 0) { -1 52521 log_default('Could not find tags `' + unmatchedTags.join('`, `') + '`'); -1 52522 } -1 52523 } else { -1 52524 throw new Error('Unknown runOnly type \''.concat(only.type, '\'')); 30299 52525 } 30300 52526 }30301 -1 if (typeof setImmediate === 'function') {30302 -1 return function(cb) {30303 -1 setImmediate(callable(cb));30304 -1 };30305 -1 }30306 -1 if (typeof setTimeout === 'function' || (typeof setTimeout === 'undefined' ? 'undefined' : _typeof(setTimeout)) === 'object') {30307 -1 return function(cb) {30308 -1 setTimeout(callable(cb), 0);30309 -1 };30310 -1 }30311 -1 return null;30312 -1 }();30313 -1 }).call(this, __webpack_require__('./node_modules/process/browser.js'), __webpack_require__('./node_modules/node-libs-browser/node_modules/timers-browserify/main.js').setImmediate);30314 -1 },30315 -1 './node_modules/node-libs-browser/node_modules/timers-browserify/main.js': function node_modulesNodeLibsBrowserNode_modulesTimersBrowserifyMainJs(module, exports, __webpack_require__) {30316 -1 (function(global) {30317 -1 var scope = typeof global !== 'undefined' && global || typeof self !== 'undefined' && self || window;30318 -1 var apply = Function.prototype.apply;30319 -1 exports.setTimeout = function() {30320 -1 return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);30321 -1 };30322 -1 exports.setInterval = function() {30323 -1 return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);30324 -1 };30325 -1 exports.clearTimeout = exports.clearInterval = function(timeout) {30326 -1 if (timeout) {30327 -1 timeout.close();-1 52527 if (_typeof(options.rules) === 'object') { -1 52528 Object.keys(options.rules).forEach(function(ruleId) { -1 52529 if (!ruleIds.includes(ruleId)) { -1 52530 throw new Error('unknown rule `' + ruleId + '` in options.rules'); -1 52531 } -1 52532 }); 30328 52533 }30329 -1 };30330 -1 function Timeout(id, clearFn) {30331 -1 this._id = id;30332 -1 this._clearFn = clearFn;-1 52534 return options; 30333 52535 }30334 -1 Timeout.prototype.unref = Timeout.prototype.ref = function() {};30335 -1 Timeout.prototype.close = function() {30336 -1 this._clearFn.call(scope, this._id);30337 -1 };30338 -1 exports.enroll = function(item, msecs) {30339 -1 clearTimeout(item._idleTimeoutId);30340 -1 item._idleTimeout = msecs;30341 -1 };30342 -1 exports.unenroll = function(item) {30343 -1 clearTimeout(item._idleTimeoutId);30344 -1 item._idleTimeout = -1;30345 -1 };30346 -1 exports._unrefActive = exports.active = function(item) {30347 -1 clearTimeout(item._idleTimeoutId);30348 -1 var msecs = item._idleTimeout;30349 -1 if (msecs >= 0) {30350 -1 item._idleTimeoutId = setTimeout(function onTimeout() {30351 -1 if (item._onTimeout) {30352 -1 item._onTimeout();30353 -1 }30354 -1 }, msecs);-1 52536 }, { -1 52537 key: 'setBranding', -1 52538 value: function setBranding(branding) { -1 52539 var previous = { -1 52540 brand: this.brand, -1 52541 application: this.application -1 52542 }; -1 52543 if (branding && branding.hasOwnProperty('brand') && branding.brand && typeof branding.brand === 'string') { -1 52544 this.brand = branding.brand; 30355 52545 }30356 -1 };30357 -1 __webpack_require__('./node_modules/setimmediate/setImmediate.js');30358 -1 exports.setImmediate = typeof self !== 'undefined' && self.setImmediate || typeof global !== 'undefined' && global.setImmediate || this && this.setImmediate;30359 -1 exports.clearImmediate = typeof self !== 'undefined' && self.clearImmediate || typeof global !== 'undefined' && global.clearImmediate || this && this.clearImmediate;30360 -1 }).call(this, __webpack_require__('./node_modules/webpack/buildin/global.js'));30361 -1 },30362 -1 './node_modules/process/browser.js': function node_modulesProcessBrowserJs(module, exports) {30363 -1 var process = module.exports = {};30364 -1 var cachedSetTimeout;30365 -1 var cachedClearTimeout;30366 -1 function defaultSetTimout() {30367 -1 throw new Error('setTimeout has not been defined');30368 -1 }30369 -1 function defaultClearTimeout() {30370 -1 throw new Error('clearTimeout has not been defined');30371 -1 }30372 -1 (function() {30373 -1 try {30374 -1 if (typeof setTimeout === 'function') {30375 -1 cachedSetTimeout = setTimeout;30376 -1 } else {30377 -1 cachedSetTimeout = defaultSetTimout;-1 52546 if (branding && branding.hasOwnProperty('application') && branding.application && typeof branding.application === 'string') { -1 52547 this.application = branding.application; 30378 52548 }30379 -1 } catch (e) {30380 -1 cachedSetTimeout = defaultSetTimout;-1 52549 this._constructHelpUrls(previous); 30381 52550 }30382 -1 try {30383 -1 if (typeof clearTimeout === 'function') {30384 -1 cachedClearTimeout = clearTimeout;30385 -1 } else {30386 -1 cachedClearTimeout = defaultClearTimeout;30387 -1 }30388 -1 } catch (e) {30389 -1 cachedClearTimeout = defaultClearTimeout;-1 52551 }, { -1 52552 key: '_constructHelpUrls', -1 52553 value: function _constructHelpUrls() { -1 52554 var _this7 = this; -1 52555 var previous = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; -1 52556 var version = (axe.version.match(/^[1-9][0-9]*\.[0-9]+/) || [ 'x.y' ])[0]; -1 52557 this.rules.forEach(function(rule3) { -1 52558 if (!_this7.data.rules[rule3.id]) { -1 52559 _this7.data.rules[rule3.id] = {}; -1 52560 } -1 52561 var metaData = _this7.data.rules[rule3.id]; -1 52562 if (typeof metaData.helpUrl !== 'string' || previous && metaData.helpUrl === getHelpUrl(previous, rule3.id, version)) { -1 52563 metaData.helpUrl = getHelpUrl(_this7, rule3.id, version); -1 52564 } -1 52565 }); 30390 52566 }30391 -1 })();30392 -1 function runTimeout(fun) {30393 -1 if (cachedSetTimeout === setTimeout) {30394 -1 return setTimeout(fun, 0);-1 52567 }, { -1 52568 key: 'resetRulesAndChecks', -1 52569 value: function resetRulesAndChecks() { -1 52570 this._init(); -1 52571 this._resetLocale(); -1 52572 } -1 52573 } ]); -1 52574 return Audit; -1 52575 }(); -1 52576 function getRulesToRun(rules, context3, options) { -1 52577 var base = { -1 52578 now: [], -1 52579 later: [] -1 52580 }; -1 52581 var splitRules = rules.reduce(function(out, rule3) { -1 52582 if (!rule_should_run_default(rule3, context3, options)) { -1 52583 return out; 30395 52584 }30396 -1 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {30397 -1 cachedSetTimeout = setTimeout;30398 -1 return setTimeout(fun, 0);-1 52585 if (rule3.preload) { -1 52586 out.later.push(rule3); -1 52587 return out; 30399 52588 }30400 -1 try {30401 -1 return cachedSetTimeout(fun, 0);30402 -1 } catch (e) {30403 -1 try {30404 -1 return cachedSetTimeout.call(null, fun, 0);30405 -1 } catch (e) {30406 -1 return cachedSetTimeout.call(this, fun, 0);-1 52589 out.now.push(rule3); -1 52590 return out; -1 52591 }, base); -1 52592 return splitRules; -1 52593 } -1 52594 function getDefferedRule(rule3, context3, options) { -1 52595 if (options.performanceTimer) { -1 52596 performance_timer_default.mark('mark_rule_start_' + rule3.id); -1 52597 } -1 52598 return function(resolve, reject) { -1 52599 rule3.run(context3, options, function(ruleResult) { -1 52600 resolve(ruleResult); -1 52601 }, function(err2) { -1 52602 if (!options.debug) { -1 52603 var errResult = Object.assign(new rule_result_default(rule3), { -1 52604 result: constants_default.CANTTELL, -1 52605 description: 'An error occured while running this rule', -1 52606 message: err2.message, -1 52607 stack: err2.stack, -1 52608 error: err2, -1 52609 errorNode: err2.errorNode -1 52610 }); -1 52611 resolve(errResult); -1 52612 } else { -1 52613 reject(err2); 30407 52614 }30408 -1 }-1 52615 }); -1 52616 }; -1 52617 } -1 52618 function getHelpUrl(_ref71, ruleId, version) { -1 52619 var brand = _ref71.brand, application = _ref71.application, lang = _ref71.lang; -1 52620 return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : ''); -1 52621 } -1 52622 var audit_default = Audit; -1 52623 function pushUniqueFrame(collection, frame) { -1 52624 if (is_hidden_default(frame)) { -1 52625 return; -1 52626 } -1 52627 var fr = find_by_default(collection, 'node', frame); -1 52628 if (!fr) { -1 52629 collection.push({ -1 52630 node: frame, -1 52631 include: [], -1 52632 exclude: [] -1 52633 }); 30409 52634 }30410 -1 function runClearTimeout(marker) {30411 -1 if (cachedClearTimeout === clearTimeout) {30412 -1 return clearTimeout(marker);30413 -1 }30414 -1 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {30415 -1 cachedClearTimeout = clearTimeout;30416 -1 return clearTimeout(marker);30417 -1 }30418 -1 try {30419 -1 return cachedClearTimeout(marker);30420 -1 } catch (e) {30421 -1 try {30422 -1 return cachedClearTimeout.call(null, marker);30423 -1 } catch (e) {30424 -1 return cachedClearTimeout.call(this, marker);30425 -1 }-1 52635 } -1 52636 function pushUniqueFrameSelector(context3, type, selectorArray) { -1 52637 context3.frames = context3.frames || []; -1 52638 var result, frame; -1 52639 var frames = document.querySelectorAll(selectorArray.shift()); -1 52640 frameloop: for (var i = 0, l = frames.length; i < l; i++) { -1 52641 frame = frames[i]; -1 52642 for (var j = 0, l2 = context3.frames.length; j < l2; j++) { -1 52643 if (context3.frames[j].node === frame) { -1 52644 context3.frames[j][type].push(selectorArray); -1 52645 break frameloop; -1 52646 } -1 52647 } -1 52648 result = { -1 52649 node: frame, -1 52650 include: [], -1 52651 exclude: [] -1 52652 }; -1 52653 if (selectorArray) { -1 52654 result[type].push(selectorArray); 30426 52655 } -1 52656 context3.frames.push(result); 30427 52657 }30428 -1 var queue = [];30429 -1 var draining = false;30430 -1 var currentQueue;30431 -1 var queueIndex = -1;30432 -1 function cleanUpNextTick() {30433 -1 if (!draining || !currentQueue) {30434 -1 return;-1 52658 } -1 52659 function normalizeContext(context3) { -1 52660 if (context3 && _typeof(context3) === 'object' || context3 instanceof window.NodeList) { -1 52661 if (context3 instanceof window.Node) { -1 52662 return { -1 52663 include: [ context3 ], -1 52664 exclude: [] -1 52665 }; 30435 52666 }30436 -1 draining = false;30437 -1 if (currentQueue.length) {30438 -1 queue = currentQueue.concat(queue);30439 -1 } else {30440 -1 queueIndex = -1;-1 52667 if (context3.hasOwnProperty('include') || context3.hasOwnProperty('exclude')) { -1 52668 return { -1 52669 include: context3.include && +context3.include.length ? context3.include : [ document ], -1 52670 exclude: context3.exclude || [] -1 52671 }; 30441 52672 }30442 -1 if (queue.length) {30443 -1 drainQueue();-1 52673 if (context3.length === +context3.length) { -1 52674 return { -1 52675 include: context3, -1 52676 exclude: [] -1 52677 }; 30444 52678 } 30445 52679 }30446 -1 function drainQueue() {30447 -1 if (draining) {30448 -1 return;30449 -1 }30450 -1 var timeout = runTimeout(cleanUpNextTick);30451 -1 draining = true;30452 -1 var len = queue.length;30453 -1 while (len) {30454 -1 currentQueue = queue;30455 -1 queue = [];30456 -1 while (++queueIndex < len) {30457 -1 if (currentQueue) {30458 -1 currentQueue[queueIndex].run();30459 -1 }-1 52680 if (typeof context3 === 'string') { -1 52681 return { -1 52682 include: [ context3 ], -1 52683 exclude: [] -1 52684 }; -1 52685 } -1 52686 return { -1 52687 include: [ document ], -1 52688 exclude: [] -1 52689 }; -1 52690 } -1 52691 function parseSelectorArray(context3, type) { -1 52692 var item, result = [], nodeList; -1 52693 for (var i = 0, l = context3[type].length; i < l; i++) { -1 52694 item = context3[type][i]; -1 52695 if (typeof item === 'string') { -1 52696 nodeList = Array.from(document.querySelectorAll(item)); -1 52697 result = result.concat(nodeList.map(function(node) { -1 52698 return get_node_from_tree_default(node); -1 52699 })); -1 52700 break; -1 52701 } else if (item && item.length && !(item instanceof window.Node)) { -1 52702 if (item.length > 1) { -1 52703 pushUniqueFrameSelector(context3, type, item); -1 52704 } else { -1 52705 nodeList = Array.from(document.querySelectorAll(item[0])); -1 52706 result = result.concat(nodeList.map(function(node) { -1 52707 return get_node_from_tree_default(node); -1 52708 })); -1 52709 } -1 52710 } else if (item instanceof window.Node) { -1 52711 if (item.documentElement instanceof window.Node) { -1 52712 result.push(context3.flatTree[0]); -1 52713 } else { -1 52714 result.push(get_node_from_tree_default(item)); 30460 52715 }30461 -1 queueIndex = -1;30462 -1 len = queue.length;30463 52716 }30464 -1 currentQueue = null;30465 -1 draining = false;30466 -1 runClearTimeout(timeout);30467 52717 }30468 -1 process.nextTick = function(fun) {30469 -1 var args = new Array(arguments.length - 1);30470 -1 if (arguments.length > 1) {30471 -1 for (var i = 1; i < arguments.length; i++) {30472 -1 args[i - 1] = arguments[i];-1 52718 return result.filter(function(r) { -1 52719 return r; -1 52720 }); -1 52721 } -1 52722 function validateContext(context3) { -1 52723 if (context3.include.length === 0) { -1 52724 if (context3.frames.length === 0) { -1 52725 var env = _respondable.isInFrame() ? 'frame' : 'page'; -1 52726 return new Error('No elements found for include in ' + env + ' Context'); -1 52727 } -1 52728 context3.frames.forEach(function(frame, i) { -1 52729 if (frame.include.length === 0) { -1 52730 return new Error('No elements found for include in Context of frame ' + i); 30473 52731 } -1 52732 }); -1 52733 } -1 52734 } -1 52735 function getRootNode2(_ref72) { -1 52736 var include = _ref72.include, exclude = _ref72.exclude; -1 52737 var selectors = Array.from(include).concat(Array.from(exclude)); -1 52738 for (var i = 0; i < selectors.length; ++i) { -1 52739 var item = selectors[i]; -1 52740 if (item instanceof window.Element) { -1 52741 return item.ownerDocument.documentElement; 30474 52742 }30475 -1 queue.push(new Item(fun, args));30476 -1 if (queue.length === 1 && !draining) {30477 -1 runTimeout(drainQueue);-1 52743 if (item instanceof window.Document) { -1 52744 return item.documentElement; 30478 52745 }30479 -1 };30480 -1 function Item(fun, array) {30481 -1 this.fun = fun;30482 -1 this.array = array;30483 52746 }30484 -1 Item.prototype.run = function() {30485 -1 this.fun.apply(null, this.array);30486 -1 };30487 -1 process.title = 'browser';30488 -1 process.browser = true;30489 -1 process.env = {};30490 -1 process.argv = [];30491 -1 process.version = '';30492 -1 process.versions = {};30493 -1 function noop() {}30494 -1 process.on = noop;30495 -1 process.addListener = noop;30496 -1 process.once = noop;30497 -1 process.off = noop;30498 -1 process.removeListener = noop;30499 -1 process.removeAllListeners = noop;30500 -1 process.emit = noop;30501 -1 process.prependListener = noop;30502 -1 process.prependOnceListener = noop;30503 -1 process.listeners = function(name) {30504 -1 return [];30505 -1 };30506 -1 process.binding = function(name) {30507 -1 throw new Error('process.binding is not supported');30508 -1 };30509 -1 process.cwd = function() {30510 -1 return '/';30511 -1 };30512 -1 process.chdir = function(dir) {30513 -1 throw new Error('process.chdir is not supported');30514 -1 };30515 -1 process.umask = function() {30516 -1 return 0;30517 -1 };30518 -1 },30519 -1 './node_modules/setimmediate/setImmediate.js': function node_modulesSetimmediateSetImmediateJs(module, exports, __webpack_require__) {30520 -1 (function(global, process) {30521 -1 (function(global, undefined) {30522 -1 'use strict';30523 -1 if (global.setImmediate) {30524 -1 return;30525 -1 }30526 -1 var nextHandle = 1;30527 -1 var tasksByHandle = {};30528 -1 var currentlyRunningATask = false;30529 -1 var doc = global.document;30530 -1 var registerImmediate;30531 -1 function setImmediate(callback) {30532 -1 if (typeof callback !== 'function') {30533 -1 callback = new Function('' + callback);30534 -1 }30535 -1 var args = new Array(arguments.length - 1);30536 -1 for (var i = 0; i < args.length; i++) {30537 -1 args[i] = arguments[i + 1];30538 -1 }30539 -1 var task = {30540 -1 callback: callback,30541 -1 args: args30542 -1 };30543 -1 tasksByHandle[nextHandle] = task;30544 -1 registerImmediate(nextHandle);30545 -1 return nextHandle++;30546 -1 }30547 -1 function clearImmediate(handle) {30548 -1 delete tasksByHandle[handle];30549 -1 }30550 -1 function run(task) {30551 -1 var callback = task.callback;30552 -1 var args = task.args;30553 -1 switch (args.length) {30554 -1 case 0:30555 -1 callback();30556 -1 break;30557 -130558 -1 case 1:30559 -1 callback(args[0]);30560 -1 break;30561 -130562 -1 case 2:30563 -1 callback(args[0], args[1]);30564 -1 break;30565 -130566 -1 case 3:30567 -1 callback(args[0], args[1], args[2]);30568 -1 break;30569 -130570 -1 default:30571 -1 callback.apply(undefined, args);30572 -1 break;30573 -1 }30574 -1 }30575 -1 function runIfPresent(handle) {30576 -1 if (currentlyRunningATask) {30577 -1 setTimeout(runIfPresent, 0, handle);30578 -1 } else {30579 -1 var task = tasksByHandle[handle];30580 -1 if (task) {30581 -1 currentlyRunningATask = true;30582 -1 try {30583 -1 run(task);30584 -1 } finally {30585 -1 clearImmediate(handle);30586 -1 currentlyRunningATask = false;30587 -1 }30588 -1 }30589 -1 }30590 -1 }30591 -1 function installNextTickImplementation() {30592 -1 registerImmediate = function registerImmediate(handle) {30593 -1 process.nextTick(function() {30594 -1 runIfPresent(handle);30595 -1 });30596 -1 };30597 -1 }30598 -1 function canUsePostMessage() {30599 -1 if (global.postMessage && !global.importScripts) {30600 -1 var postMessageIsAsynchronous = true;30601 -1 var oldOnMessage = global.onmessage;30602 -1 global.onmessage = function() {30603 -1 postMessageIsAsynchronous = false;30604 -1 };30605 -1 global.postMessage('', '*');30606 -1 global.onmessage = oldOnMessage;30607 -1 return postMessageIsAsynchronous;30608 -1 }30609 -1 }30610 -1 function installPostMessageImplementation() {30611 -1 var messagePrefix = 'setImmediate$' + Math.random() + '$';30612 -1 var onGlobalMessage = function onGlobalMessage(event) {30613 -1 if (event.source === global && typeof event.data === 'string' && event.data.indexOf(messagePrefix) === 0) {30614 -1 runIfPresent(+event.data.slice(messagePrefix.length));30615 -1 }30616 -1 };30617 -1 if (global.addEventListener) {30618 -1 global.addEventListener('message', onGlobalMessage, false);30619 -1 } else {30620 -1 global.attachEvent('onmessage', onGlobalMessage);30621 -1 }30622 -1 registerImmediate = function registerImmediate(handle) {30623 -1 global.postMessage(messagePrefix + handle, '*');30624 -1 };30625 -1 }30626 -1 function installMessageChannelImplementation() {30627 -1 var channel = new MessageChannel();30628 -1 channel.port1.onmessage = function(event) {30629 -1 var handle = event.data;30630 -1 runIfPresent(handle);30631 -1 };30632 -1 registerImmediate = function registerImmediate(handle) {30633 -1 channel.port2.postMessage(handle);30634 -1 };-1 52747 return document.documentElement; -1 52748 } -1 52749 function Context(spec) { -1 52750 var _this8 = this; -1 52751 this.frames = []; -1 52752 this.initiator = spec && typeof spec.initiator === 'boolean' ? spec.initiator : true; -1 52753 this.focusable = spec && typeof spec.focusable === 'boolean' ? spec.focusable : true; -1 52754 this.boundingClientRect = spec && _typeof(spec.boundingClientRect) === 'object' ? spec.boundingClientRect : {}; -1 52755 this.page = false; -1 52756 spec = normalizeContext(spec); -1 52757 this.flatTree = get_flattened_tree_default(getRootNode2(spec)); -1 52758 this.exclude = spec.exclude; -1 52759 this.include = spec.include; -1 52760 this.include = parseSelectorArray(this, 'include'); -1 52761 this.exclude = parseSelectorArray(this, 'exclude'); -1 52762 select_default('frame, iframe', this).forEach(function(frame) { -1 52763 if (is_node_in_context_default(frame, _this8)) { -1 52764 pushUniqueFrame(_this8.frames, frame.actualNode); -1 52765 } -1 52766 }); -1 52767 if (this.include.length === 1 && this.include[0].actualNode === document.documentElement) { -1 52768 this.page = true; -1 52769 } -1 52770 var err2 = validateContext(this); -1 52771 if (err2 instanceof Error) { -1 52772 throw err2; -1 52773 } -1 52774 if (!Array.isArray(this.include)) { -1 52775 this.include = Array.from(this.include); -1 52776 } -1 52777 this.include.sort(node_sorter_default); -1 52778 } -1 52779 var context_default = Context; -1 52780 var imports_exports = {}; -1 52781 __export(imports_exports, { -1 52782 CssSelectorParser: function CssSelectorParser() { -1 52783 return css_selector_parser2.CssSelectorParser; -1 52784 }, -1 52785 doT: function doT() { -1 52786 return dot2['default']; -1 52787 }, -1 52788 emojiRegexText: function emojiRegexText() { -1 52789 return emoji_regex3['default']; -1 52790 }, -1 52791 memoize: function memoize() { -1 52792 return memoizee2['default']; -1 52793 } -1 52794 }); -1 52795 var css_selector_parser2 = __toModule(require_lib()); -1 52796 var dot2 = __toModule(require_doT()); -1 52797 var emoji_regex3 = __toModule(require_emoji_regex()); -1 52798 var memoizee2 = __toModule(require_memoizee()); -1 52799 var es6_promise = __toModule(require_es6_promise()); -1 52800 var typedarray = __toModule(require_typedarray()); -1 52801 var weakmap_polyfill = __toModule(require_weakmap_polyfill()); -1 52802 if (!('Promise' in window)) { -1 52803 es6_promise['default'].polyfill(); -1 52804 } -1 52805 if (!('Uint32Array' in window)) { -1 52806 window.Uint32Array = typedarray.Uint32Array; -1 52807 } -1 52808 if (window.Uint32Array) { -1 52809 if (!('some' in window.Uint32Array.prototype)) { -1 52810 Object.defineProperty(window.Uint32Array.prototype, 'some', { -1 52811 value: Array.prototype.some -1 52812 }); -1 52813 } -1 52814 if (!('reduce' in window.Uint32Array.prototype)) { -1 52815 Object.defineProperty(window.Uint32Array.prototype, 'reduce', { -1 52816 value: Array.prototype.reduce -1 52817 }); -1 52818 } -1 52819 } -1 52820 function cleanup(resolve, reject) { -1 52821 resolve = resolve || function res() {}; -1 52822 reject = reject || axe.log; -1 52823 if (!axe._audit) { -1 52824 throw new Error('No audit configured'); -1 52825 } -1 52826 var q = axe.utils.queue(); -1 52827 var cleanupErrors = []; -1 52828 Object.keys(axe.plugins).forEach(function(key) { -1 52829 q.defer(function(res) { -1 52830 var rej = function rej2(err2) { -1 52831 cleanupErrors.push(err2); -1 52832 res(); -1 52833 }; -1 52834 try { -1 52835 axe.plugins[key].cleanup(res, rej); -1 52836 } catch (err2) { -1 52837 rej(err2); 30635 52838 }30636 -1 function installReadyStateChangeImplementation() {30637 -1 var html = doc.documentElement;30638 -1 registerImmediate = function registerImmediate(handle) {30639 -1 var script = doc.createElement('script');30640 -1 script.onreadystatechange = function() {30641 -1 runIfPresent(handle);30642 -1 script.onreadystatechange = null;30643 -1 html.removeChild(script);30644 -1 script = null;30645 -1 };30646 -1 html.appendChild(script);30647 -1 };-1 52839 }); -1 52840 }); -1 52841 var flattenedTree = axe.utils.getFlattenedTree(document.body); -1 52842 axe.utils.querySelectorAll(flattenedTree, 'iframe, frame').forEach(function(node) { -1 52843 q.defer(function(res, rej) { -1 52844 return axe.utils.sendCommandToFrame(node.actualNode, { -1 52845 command: 'cleanup-plugin' -1 52846 }, res, rej); -1 52847 }); -1 52848 }); -1 52849 q.then(function(results) { -1 52850 if (cleanupErrors.length === 0) { -1 52851 resolve(results); -1 52852 } else { -1 52853 reject(cleanupErrors); -1 52854 } -1 52855 })['catch'](reject); -1 52856 } -1 52857 var cleanup_default = cleanup; -1 52858 var reporters = {}; -1 52859 var defaultReporter; -1 52860 function hasReporter(reporterName) { -1 52861 return reporters.hasOwnProperty(reporterName); -1 52862 } -1 52863 function getReporter(reporter4) { -1 52864 if (typeof reporter4 === 'string' && reporters[reporter4]) { -1 52865 return reporters[reporter4]; -1 52866 } -1 52867 if (typeof reporter4 === 'function') { -1 52868 return reporter4; -1 52869 } -1 52870 return defaultReporter; -1 52871 } -1 52872 function addReporter(name, cb, isDefault) { -1 52873 reporters[name] = cb; -1 52874 if (isDefault) { -1 52875 defaultReporter = cb; -1 52876 } -1 52877 } -1 52878 function configure3(spec) { -1 52879 var audit3; -1 52880 audit3 = axe._audit; -1 52881 if (!audit3) { -1 52882 throw new Error('No audit configured'); -1 52883 } -1 52884 if (spec.axeVersion || spec.ver) { -1 52885 var specVersion = spec.axeVersion || spec.ver; -1 52886 if (!/^\d+\.\d+\.\d+(-canary)?/.test(specVersion)) { -1 52887 throw new Error('Invalid configured version '.concat(specVersion)); -1 52888 } -1 52889 var _specVersion$split = specVersion.split('-'), _specVersion$split2 = _slicedToArray(_specVersion$split, 2), version = _specVersion$split2[0], canary = _specVersion$split2[1]; -1 52890 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]; -1 52891 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]; -1 52892 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]; -1 52893 if (major !== axeMajor || axeMinor < minor || axeMinor === minor && axePatch < patch || major === axeMajor && minor === axeMinor && patch === axePatch && canary && canary !== axeCanary) { -1 52894 throw new Error('Configured version '.concat(specVersion, ' is not compatible with current axe version ').concat(axe.version)); -1 52895 } -1 52896 } -1 52897 if (spec.reporter && (typeof spec.reporter === 'function' || hasReporter(spec.reporter))) { -1 52898 audit3.reporter = spec.reporter; -1 52899 } -1 52900 if (spec.checks) { -1 52901 if (!Array.isArray(spec.checks)) { -1 52902 throw new TypeError('Checks property must be an array'); -1 52903 } -1 52904 spec.checks.forEach(function(check4) { -1 52905 if (!check4.id) { -1 52906 throw new TypeError('Configured check '.concat(JSON.stringify(check4), ' is invalid. Checks must be an object with at least an id property')); 30648 52907 }30649 -1 function installSetTimeoutImplementation() {30650 -1 registerImmediate = function registerImmediate(handle) {30651 -1 setTimeout(runIfPresent, 0, handle);30652 -1 };-1 52908 audit3.addCheck(check4); -1 52909 }); -1 52910 } -1 52911 var modifiedRules = []; -1 52912 if (spec.rules) { -1 52913 if (!Array.isArray(spec.rules)) { -1 52914 throw new TypeError('Rules property must be an array'); -1 52915 } -1 52916 spec.rules.forEach(function(rule3) { -1 52917 if (!rule3.id) { -1 52918 throw new TypeError('Configured rule '.concat(JSON.stringify(rule3), ' is invalid. Rules must be an object with at least an id property')); 30653 52919 }30654 -1 var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);30655 -1 attachTo = attachTo && attachTo.setTimeout ? attachTo : global;30656 -1 if ({}.toString.call(global.process) === '[object process]') {30657 -1 installNextTickImplementation();30658 -1 } else if (canUsePostMessage()) {30659 -1 installPostMessageImplementation();30660 -1 } else if (global.MessageChannel) {30661 -1 installMessageChannelImplementation();30662 -1 } else if (doc && 'onreadystatechange' in doc.createElement('script')) {30663 -1 installReadyStateChangeImplementation();30664 -1 } else {30665 -1 installSetTimeoutImplementation();-1 52920 modifiedRules.push(rule3.id); -1 52921 audit3.addRule(rule3); -1 52922 }); -1 52923 } -1 52924 if (spec.disableOtherRules) { -1 52925 audit3.rules.forEach(function(rule3) { -1 52926 if (modifiedRules.includes(rule3.id) === false) { -1 52927 rule3.enabled = false; 30666 52928 }30667 -1 attachTo.setImmediate = setImmediate;30668 -1 attachTo.clearImmediate = clearImmediate;30669 -1 })(typeof self === 'undefined' ? typeof global === 'undefined' ? this : global : self);30670 -1 }).call(this, __webpack_require__('./node_modules/webpack/buildin/global.js'), __webpack_require__('./node_modules/process/browser.js'));30671 -1 },30672 -1 './node_modules/timers-ext/max-timeout.js': function node_modulesTimersExtMaxTimeoutJs(module, exports, __webpack_require__) {30673 -1 'use strict';30674 -1 module.exports = 2147483647;30675 -1 },30676 -1 './node_modules/timers-ext/valid-timeout.js': function node_modulesTimersExtValidTimeoutJs(module, exports, __webpack_require__) {30677 -1 'use strict';30678 -1 var toPosInt = __webpack_require__('./node_modules/es5-ext/number/to-pos-integer.js'), maxTimeout = __webpack_require__('./node_modules/timers-ext/max-timeout.js');30679 -1 module.exports = function(value) {30680 -1 value = toPosInt(value);30681 -1 if (value > maxTimeout) {30682 -1 throw new TypeError(value + ' exceeds maximum possible timeout');30683 -1 }30684 -1 return value;30685 -1 };30686 -1 },30687 -1 './node_modules/type/function/is.js': function node_modulesTypeFunctionIsJs(module, exports, __webpack_require__) {30688 -1 'use strict';30689 -1 var isPrototype = __webpack_require__('./node_modules/type/prototype/is.js');30690 -1 module.exports = function(value) {30691 -1 if (typeof value !== 'function') {30692 -1 return false;-1 52929 }); -1 52930 } -1 52931 if (typeof spec.branding !== 'undefined') { -1 52932 audit3.setBranding(spec.branding); -1 52933 } else { -1 52934 audit3._constructHelpUrls(); -1 52935 } -1 52936 if (spec.tagExclude) { -1 52937 audit3.tagExclude = spec.tagExclude; -1 52938 } -1 52939 if (spec.locale) { -1 52940 audit3.applyLocale(spec.locale); -1 52941 } -1 52942 if (spec.standards) { -1 52943 configureStandards(spec.standards); -1 52944 } -1 52945 if (spec.noHtml) { -1 52946 audit3.noHtml = true; -1 52947 } -1 52948 if (spec.allowedOrigins) { -1 52949 if (!Array.isArray(spec.allowedOrigins)) { -1 52950 throw new TypeError('Allowed origins property must be an array'); 30693 52951 }30694 -1 if (!hasOwnProperty.call(value, 'length')) {30695 -1 return false;-1 52952 if (spec.allowedOrigins.includes('*')) { -1 52953 throw new Error('"*" is not allowed. Use "'.concat(constants_default.allOrigins, '" instead')); 30696 52954 } -1 52955 audit3.setAllowedOrigins(spec.allowedOrigins); -1 52956 } -1 52957 } -1 52958 var configure_default = configure3; -1 52959 function frameMessenger2(frameHandler) { -1 52960 _respondable.updateMessenger(frameHandler); -1 52961 } -1 52962 function getRules(tags) { -1 52963 tags = tags || []; -1 52964 var matchingRules = !tags.length ? axe._audit.rules : axe._audit.rules.filter(function(item) { -1 52965 return !!tags.filter(function(tag) { -1 52966 return item.tags.indexOf(tag) !== -1; -1 52967 }).length; -1 52968 }); -1 52969 var ruleData = axe._audit.data.rules || {}; -1 52970 return matchingRules.map(function(matchingRule) { -1 52971 var rd = ruleData[matchingRule.id] || {}; -1 52972 return { -1 52973 ruleId: matchingRule.id, -1 52974 description: rd.description, -1 52975 help: rd.help, -1 52976 helpUrl: rd.helpUrl, -1 52977 tags: matchingRule.tags -1 52978 }; -1 52979 }); -1 52980 } -1 52981 var get_rules_default = getRules; -1 52982 function teardown() { -1 52983 if (cache_default.get('globalDocumentSet')) { -1 52984 document = null; -1 52985 } -1 52986 if (cache_default.get('globalWindowSet')) { -1 52987 window = null; -1 52988 } -1 52989 axe._memoizedFns.forEach(function(fn) { -1 52990 return fn.clear(); -1 52991 }); -1 52992 cache_default.clear(); -1 52993 axe._tree = void 0; -1 52994 axe._selectorData = void 0; -1 52995 axe._selectCache = void 0; -1 52996 } -1 52997 var teardown_default = teardown; -1 52998 function runRules(context3, options, resolve, reject) { -1 52999 try { -1 53000 context3 = new context_default(context3); -1 53001 axe._tree = context3.flatTree; -1 53002 axe._selectorData = _getSelectorData(context3.flatTree); -1 53003 } catch (e) { -1 53004 teardown_default(); -1 53005 return reject(e); -1 53006 } -1 53007 var q = queue_default(); -1 53008 var audit3 = axe._audit; -1 53009 if (options.performanceTimer) { -1 53010 performance_timer_default.auditStart(); -1 53011 } -1 53012 if (context3.frames.length && options.iframes !== false) { -1 53013 q.defer(function(res, rej) { -1 53014 collect_results_from_frames_default(context3, options, 'rules', null, res, rej); -1 53015 }); -1 53016 } -1 53017 q.defer(function(res, rej) { -1 53018 audit3.run(context3, options, res, rej); -1 53019 }); -1 53020 q.then(function(data2) { 30697 53021 try {30698 -1 if (typeof value.length !== 'number') {30699 -1 return false;-1 53022 if (options.performanceTimer) { -1 53023 performance_timer_default.auditEnd(); 30700 53024 }30701 -1 if (typeof value.call !== 'function') {30702 -1 return false;-1 53025 var results = merge_results_default(data2.map(function(results2) { -1 53026 return { -1 53027 results: results2 -1 53028 }; -1 53029 })); -1 53030 if (context3.initiator) { -1 53031 results = audit3.after(results, options); -1 53032 results.forEach(publish_metadata_default); -1 53033 results = results.map(finalize_result_default); 30703 53034 }30704 -1 if (typeof value.apply !== 'function') {30705 -1 return false;-1 53035 try { -1 53036 resolve(results, teardown_default); -1 53037 } catch (e) { -1 53038 teardown_default(); -1 53039 log_default(e); 30706 53040 }30707 -1 } catch (error) {30708 -1 return false;-1 53041 } catch (e) { -1 53042 teardown_default(); -1 53043 reject(e); 30709 53044 }30710 -1 return !isPrototype(value);30711 -1 };30712 -1 },30713 -1 './node_modules/type/object/is.js': function node_modulesTypeObjectIsJs(module, exports, __webpack_require__) {30714 -1 'use strict';30715 -1 var isValue = __webpack_require__('./node_modules/type/value/is.js');30716 -1 var possibleTypes = {30717 -1 object: true,30718 -1 function: true,30719 -1 undefined: true30720 -1 };30721 -1 module.exports = function(value) {30722 -1 if (!isValue(value)) {30723 -1 return false;-1 53045 })['catch'](function(e) { -1 53046 teardown_default(); -1 53047 reject(e); -1 53048 }); -1 53049 } -1 53050 var run_rules_default = runRules; -1 53051 function runCommand(data2, keepalive, callback) { -1 53052 var resolve = callback; -1 53053 var reject = function reject2(err2) { -1 53054 if (err2 instanceof Error === false) { -1 53055 err2 = new Error(err2); 30724 53056 }30725 -1 return hasOwnProperty.call(possibleTypes, _typeof(value));-1 53057 callback(err2); 30726 53058 };30727 -1 },30728 -1 './node_modules/type/plain-function/is.js': function node_modulesTypePlainFunctionIsJs(module, exports, __webpack_require__) {30729 -1 'use strict';30730 -1 var isFunction = __webpack_require__('./node_modules/type/function/is.js');30731 -1 var classRe = /^\s*class[\s{/}]/, functionToString = Function.prototype.toString;30732 -1 module.exports = function(value) {30733 -1 if (!isFunction(value)) {30734 -1 return false;30735 -1 }30736 -1 if (classRe.test(functionToString.call(value))) {30737 -1 return false;-1 53059 var context3 = data2 && data2.context || {}; -1 53060 if (context3.hasOwnProperty('include') && !context3.include.length) { -1 53061 context3.include = [ document ]; -1 53062 } -1 53063 var options = data2 && data2.options || {}; -1 53064 switch (data2.command) { -1 53065 case 'rules': -1 53066 return run_rules_default(context3, options, function(results, cleanup5) { -1 53067 resolve(results); -1 53068 cleanup5(); -1 53069 }, reject); -1 53070 -1 53071 case 'cleanup-plugin': -1 53072 return cleanup_default(resolve, reject); -1 53073 -1 53074 default: -1 53075 if (axe._audit && axe._audit.commands && axe._audit.commands[data2.command]) { -1 53076 return axe._audit.commands[data2.command](data2, callback); 30738 53077 } -1 53078 } -1 53079 } -1 53080 if (window.top !== window) { -1 53081 _respondable.subscribe('axe.start', runCommand); -1 53082 _respondable.subscribe('axe.ping', function(data2, keepalive, respond) { -1 53083 respond({ -1 53084 axe: true -1 53085 }); -1 53086 }); -1 53087 } -1 53088 function load(audit3) { -1 53089 axe._audit = new audit_default(audit3); -1 53090 } -1 53091 var load_default = load; -1 53092 function Plugin(spec) { -1 53093 this._run = spec.run; -1 53094 this._collect = spec.collect; -1 53095 this._registry = {}; -1 53096 spec.commands.forEach(function(command) { -1 53097 axe._audit.registerCommand(command); -1 53098 }); -1 53099 } -1 53100 Plugin.prototype.run = function run3() { -1 53101 return this._run.apply(this, arguments); -1 53102 }; -1 53103 Plugin.prototype.collect = function collect() { -1 53104 return this._collect.apply(this, arguments); -1 53105 }; -1 53106 Plugin.prototype.cleanup = function cleanup3(done) { -1 53107 var q = axe.utils.queue(); -1 53108 var that = this; -1 53109 Object.keys(this._registry).forEach(function(key) { -1 53110 q.defer(function(_done) { -1 53111 that._registry[key].cleanup(_done); -1 53112 }); -1 53113 }); -1 53114 q.then(done); -1 53115 }; -1 53116 Plugin.prototype.add = function add(impl) { -1 53117 this._registry[impl.id] = impl; -1 53118 }; -1 53119 function registerPlugin(plugin) { -1 53120 axe.plugins[plugin.id] = new Plugin(plugin); -1 53121 } -1 53122 var plugins_default = registerPlugin; -1 53123 function reset() { -1 53124 var audit3 = axe._audit; -1 53125 if (!audit3) { -1 53126 throw new Error('No audit configured'); -1 53127 } -1 53128 audit3.resetRulesAndChecks(); -1 53129 resetStandards(); -1 53130 } -1 53131 var reset_default = reset; -1 53132 function runVirtualRule(ruleId, vNode) { -1 53133 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; -1 53134 options.reporter = options.reporter || axe._audit.reporter || 'v1'; -1 53135 axe._selectorData = {}; -1 53136 if (!(vNode instanceof abstract_virtual_node_default)) { -1 53137 vNode = new serial_virtual_node_default(vNode); -1 53138 } -1 53139 var rule3 = get_rule_default(ruleId); -1 53140 if (!rule3) { -1 53141 throw new Error('unknown rule `' + ruleId + '`'); -1 53142 } -1 53143 rule3 = Object.create(rule3, { -1 53144 excludeHidden: { -1 53145 value: false -1 53146 } -1 53147 }); -1 53148 var context3 = { -1 53149 initiator: true, -1 53150 include: [ vNode ] -1 53151 }; -1 53152 var rawResults = rule3.runSync(context3, options); -1 53153 publish_metadata_default(rawResults); -1 53154 finalize_result_default(rawResults); -1 53155 var results = aggregate_result_default([ rawResults ]); -1 53156 results.violations.forEach(function(result) { -1 53157 return result.nodes.forEach(function(nodeResult) { -1 53158 nodeResult.failureSummary = failure_summary_default(nodeResult); -1 53159 }); -1 53160 }); -1 53161 return _extends({}, get_environment_data_default(), results, { -1 53162 toolOptions: options -1 53163 }); -1 53164 } -1 53165 var run_virtual_rule_default = runVirtualRule; -1 53166 function isContext(potential) { -1 53167 switch (true) { -1 53168 case typeof potential === 'string': -1 53169 case Array.isArray(potential): -1 53170 case window.Node && potential instanceof window.Node: -1 53171 case window.NodeList && potential instanceof window.NodeList: -1 53172 return true; -1 53173 -1 53174 case _typeof(potential) !== 'object': -1 53175 return false; -1 53176 -1 53177 case potential.include !== void 0: -1 53178 case potential.exclude !== void 0: -1 53179 case typeof potential.length === 'number': 30739 53180 return true; -1 53181 -1 53182 default: -1 53183 return false; -1 53184 } -1 53185 } -1 53186 var noop2 = function noop3() {}; -1 53187 function normalizeRunParams(context3, options, callback) { -1 53188 var typeErr = new TypeError('axe.run arguments are invalid'); -1 53189 if (!isContext(context3)) { -1 53190 if (callback !== void 0) { -1 53191 throw typeErr; -1 53192 } -1 53193 callback = options; -1 53194 options = context3; -1 53195 context3 = document; -1 53196 } -1 53197 if (_typeof(options) !== 'object') { -1 53198 if (callback !== void 0) { -1 53199 throw typeErr; -1 53200 } -1 53201 callback = options; -1 53202 options = {}; -1 53203 } -1 53204 if (typeof callback !== 'function' && callback !== void 0) { -1 53205 throw typeErr; -1 53206 } -1 53207 return { -1 53208 context: context3, -1 53209 options: options, -1 53210 callback: callback || noop2 30740 53211 };30741 -1 },30742 -1 './node_modules/type/prototype/is.js': function node_modulesTypePrototypeIsJs(module, exports, __webpack_require__) {30743 -1 'use strict';30744 -1 var isObject = __webpack_require__('./node_modules/type/object/is.js');30745 -1 module.exports = function(value) {30746 -1 if (!isObject(value)) {30747 -1 return false;-1 53212 } -1 53213 function run4(context3, options, callback) { -1 53214 if (!axe._audit) { -1 53215 throw new Error('No audit configured'); -1 53216 } -1 53217 var hasWindow = window && 'Node' in window && 'NodeList' in window; -1 53218 var hasDoc = !!document; -1 53219 if (!hasWindow || !hasDoc) { -1 53220 if (!context3 || !context3.ownerDocument) { -1 53221 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.'); -1 53222 } -1 53223 if (!hasDoc) { -1 53224 cache_default.set('globalDocumentSet', true); -1 53225 document = context3.ownerDocument; -1 53226 } -1 53227 if (!hasWindow) { -1 53228 cache_default.set('globalWindowSet', true); -1 53229 window = document.defaultView; -1 53230 } -1 53231 } -1 53232 var args = normalizeRunParams(context3, options, callback); -1 53233 context3 = args.context; -1 53234 options = args.options; -1 53235 callback = args.callback; -1 53236 options.reporter = options.reporter || axe._audit.reporter || 'v1'; -1 53237 if (options.performanceTimer) { -1 53238 axe.utils.performanceTimer.start(); -1 53239 } -1 53240 var p; -1 53241 var reject = noop2; -1 53242 var resolve = noop2; -1 53243 if (typeof Promise === 'function' && callback === noop2) { -1 53244 p = new Promise(function(_resolve, _reject) { -1 53245 reject = _reject; -1 53246 resolve = _resolve; -1 53247 }); -1 53248 } -1 53249 if (axe._running) { -1 53250 var err2 = 'Axe is already running. Use `await axe.run()` to wait for the previous run to finish before starting a new run.'; -1 53251 callback(err2); -1 53252 reject(err2); -1 53253 return p; -1 53254 } -1 53255 axe._running = true; -1 53256 axe._runRules(context3, options, function(rawResults, cleanup5) { -1 53257 var respond = function respond(results) { -1 53258 axe._running = false; -1 53259 cleanup5(); -1 53260 try { -1 53261 callback(null, results); -1 53262 } catch (e) { -1 53263 axe.log(e); -1 53264 } -1 53265 resolve(results); -1 53266 }; -1 53267 if (options.performanceTimer) { -1 53268 axe.utils.performanceTimer.end(); 30748 53269 } 30749 53270 try {30750 -1 if (!value.constructor) {30751 -1 return false;-1 53271 var reporter4 = getReporter(options.reporter); -1 53272 var results = reporter4(rawResults, options, respond); -1 53273 if (results !== void 0) { -1 53274 respond(results); 30752 53275 }30753 -1 return value.constructor.prototype === value;30754 -1 } catch (error) {30755 -1 return false;-1 53276 } catch (err2) { -1 53277 axe._running = false; -1 53278 cleanup5(); -1 53279 callback(err2); -1 53280 reject(err2); 30756 53281 }30757 -1 };30758 -1 },30759 -1 './node_modules/type/value/is.js': function node_modulesTypeValueIsJs(module, exports, __webpack_require__) {30760 -1 'use strict';30761 -1 var _undefined = void 0;30762 -1 module.exports = function(value) {30763 -1 return value !== _undefined && value !== null;30764 -1 };30765 -1 },30766 -1 './node_modules/webpack/buildin/global.js': function node_modulesWebpackBuildinGlobalJs(module, exports) {30767 -1 var g;30768 -1 g = function() {30769 -1 return this;30770 -1 }();30771 -1 try {30772 -1 g = g || new Function('return this')();30773 -1 } catch (e) {30774 -1 if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object') {30775 -1 g = window;-1 53282 }, function(err2) { -1 53283 axe._running = false; -1 53284 callback(err2); -1 53285 reject(err2); -1 53286 }); -1 53287 return p; -1 53288 } -1 53289 var run_default = run4; -1 53290 function setup(node) { -1 53291 if (axe._tree) { -1 53292 throw new Error('Axe is already setup. Call `axe.teardown()` before calling `axe.setup` again.'); -1 53293 } -1 53294 axe._tree = get_flattened_tree_default(node); -1 53295 axe._selectorData = _getSelectorData(axe._tree); -1 53296 return axe._tree[0]; -1 53297 } -1 53298 var setup_default = setup; -1 53299 var naReporter = function naReporter(results, options, callback) { -1 53300 console.warn('"na" reporter will be deprecated in axe v4.0. Use the "v2" reporter instead.'); -1 53301 if (typeof options === 'function') { -1 53302 callback = options; -1 53303 options = {}; -1 53304 } -1 53305 var out = process_aggregate_default(results, options); -1 53306 callback(_extends({}, get_environment_data_default(), { -1 53307 toolOptions: options, -1 53308 violations: out.violations, -1 53309 passes: out.passes, -1 53310 incomplete: out.incomplete, -1 53311 inapplicable: out.inapplicable -1 53312 })); -1 53313 }; -1 53314 var na_default = naReporter; -1 53315 var noPassesReporter = function noPassesReporter(results, options, callback) { -1 53316 if (typeof options === 'function') { -1 53317 callback = options; -1 53318 options = {}; -1 53319 } -1 53320 options.resultTypes = [ 'violations' ]; -1 53321 var out = process_aggregate_default(results, options); -1 53322 callback(_extends({}, get_environment_data_default(), { -1 53323 toolOptions: options, -1 53324 violations: out.violations -1 53325 })); -1 53326 }; -1 53327 var no_passes_default = noPassesReporter; -1 53328 var rawReporter = function rawReporter(results, options, callback) { -1 53329 if (typeof options === 'function') { -1 53330 callback = options; -1 53331 options = {}; -1 53332 } -1 53333 if (!results || !Array.isArray(results)) { -1 53334 return callback(results); -1 53335 } -1 53336 var transformedResults = results.map(function(result) { -1 53337 var transformedResult = _extends({}, result); -1 53338 var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ]; -1 53339 for (var _i29 = 0, _types = types; _i29 < _types.length; _i29++) { -1 53340 var type = _types[_i29]; -1 53341 if (transformedResult[type] && Array.isArray(transformedResult[type])) { -1 53342 transformedResult[type] = transformedResult[type].map(function(typeResult) { -1 53343 return _extends({}, typeResult, { -1 53344 node: typeResult.node.toJSON() -1 53345 }); -1 53346 }); -1 53347 } 30776 53348 } -1 53349 return transformedResult; -1 53350 }); -1 53351 callback(transformedResults); -1 53352 }; -1 53353 var raw_default = rawReporter; -1 53354 var rawEnvReporter = function rawEnvReporter(results, options, callback) { -1 53355 if (typeof options === 'function') { -1 53356 callback = options; -1 53357 options = {}; -1 53358 } -1 53359 function rawCallback(raw3) { -1 53360 var env = get_environment_data_default(); -1 53361 callback({ -1 53362 raw: raw3, -1 53363 env: env -1 53364 }); 30777 53365 }30778 -1 module.exports = g;30779 -1 }30780 -1 });-1 53366 raw_default(results, options, rawCallback); -1 53367 }; -1 53368 var raw_env_default = rawEnvReporter; -1 53369 var v1Reporter = function v1Reporter(results, options, callback) { -1 53370 if (typeof options === 'function') { -1 53371 callback = options; -1 53372 options = {}; -1 53373 } -1 53374 var out = process_aggregate_default(results, options); -1 53375 var addFailureSummaries = function addFailureSummaries(result) { -1 53376 result.nodes.forEach(function(nodeResult) { -1 53377 nodeResult.failureSummary = failure_summary_default(nodeResult); -1 53378 }); -1 53379 }; -1 53380 out.incomplete.forEach(addFailureSummaries); -1 53381 out.violations.forEach(addFailureSummaries); -1 53382 callback(_extends({}, get_environment_data_default(), { -1 53383 toolOptions: options, -1 53384 violations: out.violations, -1 53385 passes: out.passes, -1 53386 incomplete: out.incomplete, -1 53387 inapplicable: out.inapplicable -1 53388 })); -1 53389 }; -1 53390 var v1_default = v1Reporter; -1 53391 var v2Reporter = function v2Reporter(results, options, callback) { -1 53392 if (typeof options === 'function') { -1 53393 callback = options; -1 53394 options = {}; -1 53395 } -1 53396 var out = process_aggregate_default(results, options); -1 53397 callback(_extends({}, get_environment_data_default(), { -1 53398 toolOptions: options, -1 53399 violations: out.violations, -1 53400 passes: out.passes, -1 53401 incomplete: out.incomplete, -1 53402 inapplicable: out.inapplicable -1 53403 })); -1 53404 }; -1 53405 var v2_default = v2Reporter; -1 53406 axe.constants = constants_default; -1 53407 axe.log = log_default; -1 53408 axe.AbstractVirtualNode = abstract_virtual_node_default; -1 53409 axe.SerialVirtualNode = serial_virtual_node_default; -1 53410 axe.VirtualNode = virtual_node_default; -1 53411 axe._cache = cache_default; -1 53412 axe._thisWillBeDeletedDoNotUse = axe._thisWillBeDeletedDoNotUse || {}; -1 53413 axe._thisWillBeDeletedDoNotUse.base = { -1 53414 Audit: audit_default, -1 53415 CheckResult: check_result_default, -1 53416 Check: check_default, -1 53417 Context: context_default, -1 53418 RuleResult: rule_result_default, -1 53419 Rule: rule_default, -1 53420 metadataFunctionMap: metadata_function_map_default -1 53421 }; -1 53422 axe.imports = imports_exports; -1 53423 axe.cleanup = cleanup_default; -1 53424 axe.configure = configure_default; -1 53425 axe.frameMessenger = frameMessenger2; -1 53426 axe.getRules = get_rules_default; -1 53427 axe._load = load_default; -1 53428 axe.plugins = {}; -1 53429 axe.registerPlugin = plugins_default; -1 53430 axe.hasReporter = hasReporter; -1 53431 axe.getReporter = getReporter; -1 53432 axe.addReporter = addReporter; -1 53433 axe.reset = reset_default; -1 53434 axe._runRules = run_rules_default; -1 53435 axe.runVirtualRule = run_virtual_rule_default; -1 53436 axe.run = run_default; -1 53437 axe.setup = setup_default; -1 53438 axe.teardown = teardown_default; -1 53439 axe.commons = commons_exports; -1 53440 axe.utils = utils_exports; -1 53441 axe.addReporter('na', na_default); -1 53442 axe.addReporter('no-passes', no_passes_default); -1 53443 axe.addReporter('rawEnv', raw_env_default); -1 53444 axe.addReporter('raw', raw_default); -1 53445 axe.addReporter('v1', v1_default); -1 53446 axe.addReporter('v2', v2_default, true); -1 53447 })(); 30781 53448 'use strict'; 30782 53449 axe._load({ 30783 53450 lang: 'en', @@ -30785,7 +53452,7 @@ module.exports = { 30785 53452 rules: { 30786 53453 accesskeys: { 30787 53454 description: 'Ensures every accesskey attribute value is unique',30788 -1 help: 'accesskey attribute value must be unique'-1 53455 help: 'accesskey attribute value should be unique' 30789 53456 }, 30790 53457 'area-alt': { 30791 53458 description: 'Ensures <area> elements of image maps have alternate text', @@ -30797,7 +53464,15 @@ module.exports = { 30797 53464 }, 30798 53465 'aria-allowed-role': { 30799 53466 description: 'Ensures role attribute has an appropriate value for the element',30800 -1 help: 'ARIA role must be appropriate for the element'-1 53467 help: 'ARIA role should be appropriate for the element' -1 53468 }, -1 53469 'aria-command-name': { -1 53470 description: 'Ensures every ARIA button, link and menuitem has an accessible name', -1 53471 help: 'ARIA commands must have an accessible name' -1 53472 }, -1 53473 'aria-dialog-name': { -1 53474 description: 'Ensures every ARIA dialog and alertdialog node has an accessible name', -1 53475 help: 'ARIA dialog and alertdialog nodes should have an accessible name' 30801 53476 }, 30802 53477 'aria-hidden-body': { 30803 53478 description: 'Ensures aria-hidden=\'true\' is not present on the document body.', @@ -30811,6 +53486,14 @@ module.exports = { 30811 53486 description: 'Ensures every ARIA input field has an accessible name', 30812 53487 help: 'ARIA input fields must have an accessible name' 30813 53488 }, -1 53489 'aria-meter-name': { -1 53490 description: 'Ensures every ARIA meter node has an accessible name', -1 53491 help: 'ARIA meter nodes must have an accessible name' -1 53492 }, -1 53493 'aria-progressbar-name': { -1 53494 description: 'Ensures every ARIA progressbar node has an accessible name', -1 53495 help: 'ARIA progressbar nodes must have an accessible name' -1 53496 }, 30814 53497 'aria-required-attr': { 30815 53498 description: 'Ensures elements with ARIA roles have all required ARIA attributes', 30816 53499 help: 'Required ARIA attributes must be provided' @@ -30831,10 +53514,22 @@ module.exports = { 30831 53514 description: 'Ensures all elements with a role attribute use a valid value', 30832 53515 help: 'ARIA roles used must conform to valid values' 30833 53516 }, -1 53517 'aria-text': { -1 53518 description: 'Ensures "role=text" is used on elements with no focusable descendants', -1 53519 help: '"role=text" should have no focusable descendants' -1 53520 }, 30834 53521 'aria-toggle-field-name': { 30835 53522 description: 'Ensures every ARIA toggle field has an accessible name', 30836 53523 help: 'ARIA toggle fields have an accessible name' 30837 53524 }, -1 53525 'aria-tooltip-name': { -1 53526 description: 'Ensures every ARIA tooltip node has an accessible name', -1 53527 help: 'ARIA tooltip nodes must have an accessible name' -1 53528 }, -1 53529 'aria-treeitem-name': { -1 53530 description: 'Ensures every ARIA treeitem node has an accessible name', -1 53531 help: 'ARIA treeitem nodes should have an accessible name' -1 53532 }, 30838 53533 'aria-valid-attr-value': { 30839 53534 description: 'Ensures all ARIA attributes have valid values', 30840 53535 help: 'ARIA attributes must conform to valid values' @@ -30901,7 +53596,11 @@ module.exports = { 30901 53596 }, 30902 53597 'empty-heading': { 30903 53598 description: 'Ensures headings have discernible text',30904 -1 help: 'Headings must not be empty'-1 53599 help: 'Headings should not be empty' -1 53600 }, -1 53601 'empty-table-header': { -1 53602 description: 'Ensures table headers have discernible text', -1 53603 help: 'Table header text must not be empty' 30905 53604 }, 30906 53605 'focus-order-semantics': { 30907 53606 description: 'Ensures elements in the focus order have an appropriate role', @@ -30909,19 +53608,23 @@ module.exports = { 30909 53608 }, 30910 53609 'form-field-multiple-labels': { 30911 53610 description: 'Ensures form field does not have multiple label elements',30912 -1 help: 'Form field should not have multiple label elements'-1 53611 help: 'Form field must not have multiple label elements' -1 53612 }, -1 53613 'frame-focusable-content': { -1 53614 description: 'Ensures <frame> and <iframe> elements with focusable content do not have tabindex=-1', -1 53615 help: 'Frames with focusable content must not have tabindex=-1' 30913 53616 }, 30914 53617 'frame-tested': { 30915 53618 description: 'Ensures <iframe> and <frame> elements contain the axe-core script',30916 -1 help: 'Frames must be tested with axe-core'-1 53619 help: 'Frames should be tested with axe-core' 30917 53620 }, 30918 53621 'frame-title-unique': { 30919 53622 description: 'Ensures <iframe> and <frame> elements contain a unique title attribute',30920 -1 help: 'Frames must have a unique title attribute'-1 53623 help: 'Frames should have a unique title attribute' 30921 53624 }, 30922 53625 'frame-title': {30923 -1 description: 'Ensures <iframe> and <frame> elements contain a non-empty title attribute',30924 -1 help: 'Frames must have title attribute'-1 53626 description: 'Ensures <iframe> and <frame> elements have an accessible name', -1 53627 help: 'Frames must have an accessible name' 30925 53628 }, 30926 53629 'heading-order': { 30927 53630 description: 'Ensures the order of headings is semantically correct', @@ -30977,39 +53680,39 @@ module.exports = { 30977 53680 }, 30978 53681 'landmark-banner-is-top-level': { 30979 53682 description: 'Ensures the banner landmark is at top level',30980 -1 help: 'Banner landmark must not be contained in another landmark'-1 53683 help: 'Banner landmark should not be contained in another landmark' 30981 53684 }, 30982 53685 'landmark-complementary-is-top-level': { 30983 53686 description: 'Ensures the complementary landmark or aside is at top level',30984 -1 help: 'Aside must not be contained in another landmark'-1 53687 help: 'Aside should not be contained in another landmark' 30985 53688 }, 30986 53689 'landmark-contentinfo-is-top-level': { 30987 53690 description: 'Ensures the contentinfo landmark is at top level',30988 -1 help: 'Contentinfo landmark must not be contained in another landmark'-1 53691 help: 'Contentinfo landmark should not be contained in another landmark' 30989 53692 }, 30990 53693 'landmark-main-is-top-level': { 30991 53694 description: 'Ensures the main landmark is at top level',30992 -1 help: 'Main landmark must not be contained in another landmark'-1 53695 help: 'Main landmark should not be contained in another landmark' 30993 53696 }, 30994 53697 'landmark-no-duplicate-banner': { 30995 53698 description: 'Ensures the document has at most one banner landmark',30996 -1 help: 'Document must not have more than one banner landmark'-1 53699 help: 'Document should not have more than one banner landmark' 30997 53700 }, 30998 53701 'landmark-no-duplicate-contentinfo': { 30999 53702 description: 'Ensures the document has at most one contentinfo landmark',31000 -1 help: 'Document must not have more than one contentinfo landmark'-1 53703 help: 'Document should not have more than one contentinfo landmark' 31001 53704 }, 31002 53705 'landmark-no-duplicate-main': { 31003 53706 description: 'Ensures the document has at most one main landmark',31004 -1 help: 'Document must not have more than one main landmark'-1 53707 help: 'Document should not have more than one main landmark' 31005 53708 }, 31006 53709 'landmark-one-main': { 31007 53710 description: 'Ensures the document has a main landmark',31008 -1 help: 'Document must have one main landmark'-1 53711 help: 'Document should have one main landmark' 31009 53712 }, 31010 53713 'landmark-unique': { 31011 53714 help: 'Ensures landmarks are unique',31012 -1 description: 'Landmarks must have a unique role or role/label/title (i.e. accessible name) combination'-1 53715 description: 'Landmarks should have a unique role or role/label/title (i.e. accessible name) combination' 31013 53716 }, 31014 53717 'link-in-text-block': { 31015 53718 description: 'Links can be distinguished without relying on color', @@ -31041,7 +53744,11 @@ module.exports = { 31041 53744 }, 31042 53745 'meta-viewport': { 31043 53746 description: 'Ensures <meta name="viewport"> does not disable text scaling and zooming',31044 -1 help: 'Zooming and scaling must not be disabled'-1 53747 help: 'Zooming and scaling should not be disabled' -1 53748 }, -1 53749 'nested-interactive': { -1 53750 description: 'Nested interactive controls are not announced by screen readers', -1 53751 help: 'Ensure interactive controls are not nested' 31045 53752 }, 31046 53753 'no-autoplay-audio': { 31047 53754 description: 'Ensures <video> or <audio> elements do not autoplay audio for more than 3 seconds without a control mechanism to stop or mute the audio', @@ -31057,11 +53764,15 @@ module.exports = { 31057 53764 }, 31058 53765 'page-has-heading-one': { 31059 53766 description: 'Ensure that the page, or at least one of its frames contains a level-one heading',31060 -1 help: 'Page must contain a level-one heading'-1 53767 help: 'Page should contain a level-one heading' -1 53768 }, -1 53769 'presentation-role-conflict': { -1 53770 description: 'Flags elements whose role is none or presentation and which cause the role conflict resolution to trigger.', -1 53771 help: 'Elements of role none or presentation should be flagged' 31061 53772 }, 31062 53773 region: { 31063 53774 description: 'Ensures all page content is contained by landmarks',31064 -1 help: 'All page content must be contained by landmarks'-1 53775 help: 'All page content should be contained by landmarks' 31065 53776 }, 31066 53777 'role-img-alt': { 31067 53778 description: 'Ensures [role=\'img\'] elements have alternate text', @@ -31072,9 +53783,13 @@ module.exports = { 31072 53783 help: 'scope attribute should be used correctly' 31073 53784 }, 31074 53785 'scrollable-region-focusable': {31075 -1 description: 'Elements that have scrollable content should be accessible by keyboard',-1 53786 description: 'Elements that have scrollable content must be accessible by keyboard', 31076 53787 help: 'Ensure that scrollable region has keyboard access' 31077 53788 }, -1 53789 'select-name': { -1 53790 description: 'Ensures select element has an accessible name', -1 53791 help: 'Select element must have an accessible name' -1 53792 }, 31078 53793 'server-side-image-map': { 31079 53794 description: 'Ensures that server-side image maps are not used', 31080 53795 help: 'Server-side image maps must not be used' @@ -31097,7 +53812,7 @@ module.exports = { 31097 53812 }, 31098 53813 'table-fake-caption': { 31099 53814 description: 'Ensure that tables with a caption use the <caption> element.',31100 -1 help: 'Data or header cells should not be used to give caption to a data table.'-1 53815 help: 'Data or header cells must not be used to give caption to a data table.' 31101 53816 }, 31102 53817 'td-has-header': { 31103 53818 description: 'Ensure that each non-empty data cell in a large table has one or more table headers', @@ -31121,40 +53836,14 @@ module.exports = { 31121 53836 } 31122 53837 }, 31123 53838 checks: {31124 -1 accesskeys: {31125 -1 impact: 'serious',31126 -1 messages: {31127 -1 pass: 'Accesskey attribute value is unique',31128 -1 fail: 'Document has multiple elements with the same accesskey'31129 -1 }31130 -1 },31131 -1 'non-empty-alt': {31132 -1 impact: 'critical',31133 -1 messages: {31134 -1 pass: 'Element has a non-empty alt attribute',31135 -1 fail: 'Element has no alt attribute or the alt attribute is empty'31136 -1 }31137 -1 },31138 -1 'non-empty-title': {31139 -1 impact: 'serious',31140 -1 messages: {31141 -1 pass: 'Element has a title attribute',31142 -1 fail: 'Element has no title attribute or the title attribute is empty'31143 -1 }31144 -1 },31145 -1 'aria-label': {31146 -1 impact: 'serious',31147 -1 messages: {31148 -1 pass: 'aria-label attribute exists and is not empty',31149 -1 fail: 'aria-label attribute does not exist or is empty'31150 -1 }31151 -1 },31152 -1 'aria-labelledby': {-1 53839 abstractrole: { 31153 53840 impact: 'serious', 31154 53841 messages: {31155 -1 pass: 'aria-labelledby attribute exists and references elements that are visible to screen readers',31156 -1 fail: 'aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty',31157 -1 incomplete: 'ensure aria-labelledby references an existing element'-1 53842 pass: 'Abstract roles are not used', -1 53843 fail: { -1 53844 singular: 'Abstract role cannot be directly used: ${data.values}', -1 53845 plural: 'Abstract roles cannot be directly used: ${data.values}' -1 53846 } 31158 53847 } 31159 53848 }, 31160 53849 'aria-allowed-attr': { @@ -31167,13 +53856,6 @@ module.exports = { 31167 53856 } 31168 53857 } 31169 53858 },31170 -1 'aria-unsupported-attr': {31171 -1 impact: 'critical',31172 -1 messages: {31173 -1 pass: 'ARIA attribute is supported',31174 -1 fail: 'ARIA attribute is not widely supported in screen readers and assistive technologies: ${data.values}'31175 -1 }31176 -1 },31177 53859 'aria-allowed-role': { 31178 53860 impact: 'minor', 31179 53861 messages: { @@ -31188,39 +53870,33 @@ module.exports = { 31188 53870 } 31189 53871 } 31190 53872 },31191 -1 'aria-hidden-body': {-1 53873 'aria-errormessage': { 31192 53874 impact: 'critical', 31193 53875 messages: {31194 -1 pass: 'No aria-hidden attribute is present on document body',31195 -1 fail: 'aria-hidden=true should not be present on the document body'31196 -1 }31197 -1 },31198 -1 'focusable-modal-open': {31199 -1 impact: 'serious',31200 -1 messages: {31201 -1 pass: 'No focusable elements while a modal is open',31202 -1 incomplete: 'Check that focusable elements are not tabbable in the current state'-1 53876 pass: 'aria-errormessage exists and references elements visible to screen readers that use a supported aria-errormessage technique', -1 53877 fail: { -1 53878 singular: 'aria-errormessage value `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)', -1 53879 plural: 'aria-errormessage values `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)' -1 53880 }, -1 53881 incomplete: { -1 53882 singular: 'ensure aria-errormessage value `${data.values}` references an existing element', -1 53883 plural: 'ensure aria-errormessage values `${data.values}` reference existing elements' -1 53884 } 31203 53885 } 31204 53886 },31205 -1 'focusable-disabled': {31206 -1 impact: 'serious',-1 53887 'aria-hidden-body': { -1 53888 impact: 'critical', 31207 53889 messages: {31208 -1 pass: 'No focusable elements contained within element',31209 -1 fail: 'Focusable content should be disabled or be removed from the DOM'-1 53890 pass: 'No aria-hidden attribute is present on document body', -1 53891 fail: 'aria-hidden=true should not be present on the document body' 31210 53892 } 31211 53893 },31212 -1 'focusable-not-tabbable': {-1 53894 'aria-prohibited-attr': { 31213 53895 impact: 'serious', 31214 53896 messages: {31215 -1 pass: 'No focusable elements contained within element',31216 -1 fail: 'Focusable content should have tabindex=\'-1\' or be removed from the DOM'31217 -1 }31218 -1 },31219 -1 'no-implicit-explicit-label': {31220 -1 impact: 'moderate',31221 -1 messages: {31222 -1 pass: 'There is no mismatch between a <label> and accessible name',31223 -1 incomplete: 'Check that the <label> does not need be part of the ARIA ${data} field\'s name'-1 53897 pass: 'ARIA attribute is allowed', -1 53898 fail: 'ARIA attribute cannot be used, add a role attribute or use a different element: ${data.values}', -1 53899 incomplete: 'ARIA attribute is not well supported on the element and the text content will be used instead: ${data.values}' 31224 53900 } 31225 53901 }, 31226 53902 'aria-required-attr': { @@ -31265,6 +53941,37 @@ module.exports = { 31265 53941 fail: 'Give the element a role that supports aria-roledescription' 31266 53942 } 31267 53943 }, -1 53944 'aria-unsupported-attr': { -1 53945 impact: 'critical', -1 53946 messages: { -1 53947 pass: 'ARIA attribute is supported', -1 53948 fail: 'ARIA attribute is not widely supported in screen readers and assistive technologies: ${data.values}' -1 53949 } -1 53950 }, -1 53951 'aria-valid-attr-value': { -1 53952 impact: 'critical', -1 53953 messages: { -1 53954 pass: 'ARIA attribute values are valid', -1 53955 fail: { -1 53956 singular: 'Invalid ARIA attribute value: ${data.values}', -1 53957 plural: 'Invalid ARIA attribute values: ${data.values}' -1 53958 }, -1 53959 incomplete: { -1 53960 noId: 'ARIA attribute element ID does not exist on the page: ${data.needsReview}', -1 53961 ariaCurrent: 'ARIA attribute value is invalid and will be treated as "aria-current=true": ${data.needsReview}' -1 53962 } -1 53963 } -1 53964 }, -1 53965 'aria-valid-attr': { -1 53966 impact: 'critical', -1 53967 messages: { -1 53968 pass: 'ARIA attribute name is valid', -1 53969 fail: { -1 53970 singular: 'Invalid ARIA attribute name: ${data.values}', -1 53971 plural: 'Invalid ARIA attribute names: ${data.values}' -1 53972 } -1 53973 } -1 53974 }, 31268 53975 fallbackrole: { 31269 53976 impact: 'serious', 31270 53977 messages: { @@ -31272,6 +53979,23 @@ module.exports = { 31272 53979 fail: 'Use only one role value, since fallback roles are not supported in older browsers' 31273 53980 } 31274 53981 }, -1 53982 'has-global-aria-attribute': { -1 53983 impact: 'minor', -1 53984 messages: { -1 53985 pass: { -1 53986 singular: 'Element has global ARIA attribute: ${data.values}', -1 53987 plural: 'Element has global ARIA attributes: ${data.values}' -1 53988 }, -1 53989 fail: 'Element does not have global ARIA attribute' -1 53990 } -1 53991 }, -1 53992 'has-widget-role': { -1 53993 impact: 'minor', -1 53994 messages: { -1 53995 pass: 'Element has a widget role.', -1 53996 fail: 'Element does not have a widget role.' -1 53997 } -1 53998 }, 31275 53999 invalidrole: { 31276 54000 impact: 'critical', 31277 54001 messages: { @@ -31282,14 +54006,18 @@ module.exports = { 31282 54006 } 31283 54007 } 31284 54008 },31285 -1 abstractrole: {31286 -1 impact: 'serious',-1 54009 'is-element-focusable': { -1 54010 impact: 'minor', 31287 54011 messages: {31288 -1 pass: 'Abstract roles are not used',31289 -1 fail: {31290 -1 singular: 'Abstract role cannot be directly used: ${data.values}',31291 -1 plural: 'Abstract roles cannot be directly used: ${data.values}'31292 -1 }-1 54012 pass: 'Element is focusable.', -1 54013 fail: 'Element is not focusable.' -1 54014 } -1 54015 }, -1 54016 'no-implicit-explicit-label': { -1 54017 impact: 'moderate', -1 54018 messages: { -1 54019 pass: 'There is no mismatch between a <label> and accessible name', -1 54020 incomplete: 'Check that the <label> does not need be part of the ARIA ${data} field\'s name' 31293 54021 } 31294 54022 }, 31295 54023 unsupportedrole: { @@ -31299,53 +54027,55 @@ module.exports = { 31299 54027 fail: 'The role used is not widely supported in screen readers and assistive technologies: ${data.values}' 31300 54028 } 31301 54029 },31302 -1 'has-visible-text': {-1 54030 'valid-scrollable-semantics': { 31303 54031 impact: 'minor', 31304 54032 messages: {31305 -1 pass: 'Element has text that is visible to screen readers',31306 -1 fail: 'Element does not have text that is visible to screen readers',31307 -1 incomplete: 'Unable to determine if element has children'-1 54033 pass: 'Element has valid semantics for an element in the focus order.', -1 54034 fail: 'Element has invalid semantics for an element in the focus order.' 31308 54035 } 31309 54036 },31310 -1 'aria-valid-attr-value': {31311 -1 impact: 'critical',-1 54037 'color-contrast': { -1 54038 impact: 'serious', 31312 54039 messages: {31313 -1 pass: 'ARIA attribute values are valid',31314 -1 fail: {31315 -1 singular: 'Invalid ARIA attribute value: ${data.values}',31316 -1 plural: 'Invalid ARIA attribute values: ${data.values}'31317 -1 },-1 54040 pass: 'Element has sufficient color contrast of ${data.contrastRatio}', -1 54041 fail: '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}', 31318 54042 incomplete: {31319 -1 noId: 'ARIA attribute element ID does not exist on the page: ${data.needsReview}',31320 -1 ariaCurrent: 'ARIA attribute value is invalid and will be treated as "aria-current=true": ${data.needsReview}'31321 -1 }31322 -1 }31323 -1 },31324 -1 'aria-errormessage': {31325 -1 impact: 'critical',31326 -1 messages: {31327 -1 pass: 'Uses a supported aria-errormessage technique',31328 -1 fail: {31329 -1 singular: 'aria-errormessage value `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)',31330 -1 plural: 'aria-errormessage values `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)'-1 54043 default: 'Unable to determine contrast ratio', -1 54044 bgImage: 'Element\'s background color could not be determined due to a background image', -1 54045 bgGradient: 'Element\'s background color could not be determined due to a background gradient', -1 54046 imgNode: 'Element\'s background color could not be determined because element contains an image node', -1 54047 bgOverlap: 'Element\'s background color could not be determined because it is overlapped by another element', -1 54048 fgAlpha: 'Element\'s foreground color could not be determined because of alpha transparency', -1 54049 elmPartiallyObscured: 'Element\'s background color could not be determined because it\'s partially obscured by another element', -1 54050 elmPartiallyObscuring: 'Element\'s background color could not be determined because it partially overlaps other elements', -1 54051 outsideViewport: 'Element\'s background color could not be determined because it\'s outside the viewport', -1 54052 equalRatio: 'Element has a 1:1 contrast ratio with the background', -1 54053 shortTextContent: 'Element content is too short to determine if it is actual text content', -1 54054 nonBmp: 'Element content contains only non-text characters', -1 54055 pseudoContent: 'Element\'s background color could not be determined due to a pseudo element' 31331 54056 } 31332 54057 } 31333 54058 },31334 -1 'aria-valid-attr': {31335 -1 impact: 'critical',-1 54059 'link-in-text-block': { -1 54060 impact: 'serious', 31336 54061 messages: {31337 -1 pass: 'ARIA attribute name is valid',31338 -1 fail: {31339 -1 singular: 'Invalid ARIA attribute name: ${data.values}',31340 -1 plural: 'Invalid ARIA attribute names: ${data.values}'-1 54062 pass: 'Links can be distinguished from surrounding text in some way other than by color', -1 54063 fail: 'Links need to be distinguished from surrounding text in some way other than by color', -1 54064 incomplete: { -1 54065 default: 'Unable to determine contrast ratio', -1 54066 bgContrast: 'Element\'s contrast ratio could not be determined. Check for a distinct hover/focus style', -1 54067 bgImage: 'Element\'s contrast ratio could not be determined due to a background image', -1 54068 bgGradient: 'Element\'s contrast ratio could not be determined due to a background gradient', -1 54069 imgNode: 'Element\'s contrast ratio could not be determined because element contains an image node', -1 54070 bgOverlap: 'Element\'s contrast ratio could not be determined because of element overlap' 31341 54071 } 31342 54072 } 31343 54073 },31344 -1 caption: {31345 -1 impact: 'critical',-1 54074 'autocomplete-appropriate': { -1 54075 impact: 'serious', 31346 54076 messages: {31347 -1 pass: 'The multimedia element has a captions track',31348 -1 incomplete: 'Check that captions is available for the element'-1 54077 pass: 'the autocomplete value is on an appropriate element', -1 54078 fail: 'the autocomplete value is inappropriate for this type of input' 31349 54079 } 31350 54080 }, 31351 54081 'autocomplete-valid': { @@ -31355,200 +54085,192 @@ module.exports = { 31355 54085 fail: 'the autocomplete attribute is incorrectly formatted' 31356 54086 } 31357 54087 },31358 -1 'autocomplete-appropriate': {-1 54088 accesskeys: { 31359 54089 impact: 'serious', 31360 54090 messages: {31361 -1 pass: 'the autocomplete value is on an appropriate element',31362 -1 fail: 'the autocomplete value is inappropriate for this type of input'-1 54091 pass: 'Accesskey attribute value is unique', -1 54092 fail: 'Document has multiple elements with the same accesskey' 31363 54093 } 31364 54094 },31365 -1 'avoid-inline-spacing': {31366 -1 impact: 'serious',-1 54095 'focusable-content': { -1 54096 impact: 'moderate', 31367 54097 messages: {31368 -1 pass: 'No inline styles with \'!important\' that affect text spacing has been specified',31369 -1 fail: {31370 -1 singular: 'Remove \'!important\' from inline style ${data.values}, as overriding this is not supported by most browsers',31371 -1 plural: 'Remove \'!important\' from inline styles ${data.values}, as overriding this is not supported by most browsers'31372 -1 }-1 54098 pass: 'Element contains focusable elements', -1 54099 fail: 'Element should have focusable content' 31373 54100 } 31374 54101 },31375 -1 'is-on-screen': {-1 54102 'focusable-disabled': { 31376 54103 impact: 'serious', 31377 54104 messages: {31378 -1 pass: 'Element is not visible',31379 -1 fail: 'Element is visible'-1 54105 pass: 'No focusable elements contained within element', -1 54106 fail: 'Focusable content should be disabled or be removed from the DOM' 31380 54107 } 31381 54108 },31382 -1 'button-has-visible-text': {31383 -1 impact: 'critical',-1 54109 'focusable-element': { -1 54110 impact: 'moderate', 31384 54111 messages: {31385 -1 pass: 'Element has inner text that is visible to screen readers',31386 -1 fail: 'Element does not have inner text that is visible to screen readers',31387 -1 incomplete: 'Unable to determine if element has children'-1 54112 pass: 'Element is focusable', -1 54113 fail: 'Element should be focusable' 31388 54114 } 31389 54115 },31390 -1 'role-presentation': {31391 -1 impact: 'minor',-1 54116 'focusable-modal-open': { -1 54117 impact: 'serious', 31392 54118 messages: {31393 -1 pass: 'Element\'s default semantics were overriden with role="presentation"',31394 -1 fail: 'Element\'s default semantics were not overridden with role="presentation"'-1 54119 pass: 'No focusable elements while a modal is open', -1 54120 incomplete: 'Check that focusable elements are not tabbable in the current state' 31395 54121 } 31396 54122 },31397 -1 'role-none': {31398 -1 impact: 'minor',-1 54123 'focusable-no-name': { -1 54124 impact: 'serious', 31399 54125 messages: {31400 -1 pass: 'Element\'s default semantics were overriden with role="none"',31401 -1 fail: 'Element\'s default semantics were not overridden with role="none"'-1 54126 pass: 'Element is not in tab order or has accessible text', -1 54127 fail: 'Element is in tab order and does not have accessible text', -1 54128 incomplete: 'Unable to determine if element has an accessible name' 31402 54129 } 31403 54130 },31404 -1 'internal-link-present': {-1 54131 'focusable-not-tabbable': { 31405 54132 impact: 'serious', 31406 54133 messages: {31407 -1 pass: 'Valid skip link found',31408 -1 fail: 'No valid skip link found'-1 54134 pass: 'No focusable elements contained within element', -1 54135 fail: 'Focusable content should have tabindex=\'-1\' or be removed from the DOM' 31409 54136 } 31410 54137 },31411 -1 'header-present': {-1 54138 'frame-focusable-content': { 31412 54139 impact: 'serious', 31413 54140 messages: {31414 -1 pass: 'Page has a heading',31415 -1 fail: 'Page does not have a heading'-1 54141 pass: 'Element does not have focusable descendants', -1 54142 fail: 'Element has focusable descendants', -1 54143 incomplete: 'Could not determine if element has descendants' 31416 54144 } 31417 54145 },31418 -1 landmark: {31419 -1 impact: 'serious',-1 54146 'landmark-is-top-level': { -1 54147 impact: 'moderate', 31420 54148 messages: {31421 -1 pass: 'Page has a landmark region',31422 -1 fail: 'Page does not have a landmark region'-1 54149 pass: 'The ${data.role} landmark is at the top level.', -1 54150 fail: 'The ${data.role} landmark is contained in another landmark.' 31423 54151 } 31424 54152 },31425 -1 'color-contrast': {-1 54153 'no-focusable-content': { 31426 54154 impact: 'serious', 31427 54155 messages: {31428 -1 pass: 'Element has sufficient color contrast of ${data.contrastRatio}',31429 -1 fail: '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}',31430 -1 incomplete: {31431 -1 default: 'Unable to determine contrast ratio',31432 -1 bgImage: 'Element\'s background color could not be determined due to a background image',31433 -1 bgGradient: 'Element\'s background color could not be determined due to a background gradient',31434 -1 imgNode: 'Element\'s background color could not be determined because element contains an image node',31435 -1 bgOverlap: 'Element\'s background color could not be determined because it is overlapped by another element',31436 -1 fgAlpha: 'Element\'s foreground color could not be determined because of alpha transparency',31437 -1 elmPartiallyObscured: 'Element\'s background color could not be determined because it\'s partially obscured by another element',31438 -1 elmPartiallyObscuring: 'Element\'s background color could not be determined because it partially overlaps other elements',31439 -1 outsideViewport: 'Element\'s background color could not be determined because it\'s outside the viewport',31440 -1 equalRatio: 'Element has a 1:1 contrast ratio with the background',31441 -1 shortTextContent: 'Element content is too short to determine if it is actual text content',31442 -1 nonBmp: 'Element content contains only non-text characters'31443 -1 }-1 54156 pass: 'Element does not have focusable descendants', -1 54157 fail: 'Element has focusable descendants', -1 54158 incomplete: 'Could not determine if element has descendants' 31444 54159 }31445 -1 },31446 -1 'css-orientation-lock': {31447 -1 impact: 'serious',-1 54160 }, -1 54161 'page-has-heading-one': { -1 54162 impact: 'moderate', 31448 54163 messages: {31449 -1 pass: 'Display is operable, and orientation lock does not exist',31450 -1 fail: 'CSS Orientation lock is applied, and makes display inoperable',31451 -1 incomplete: 'CSS Orientation lock cannot be determined'-1 54164 pass: 'Page has at least one level-one heading', -1 54165 fail: 'Page must have a level-one heading' 31452 54166 } 31453 54167 },31454 -1 'structured-dlitems': {31455 -1 impact: 'serious',-1 54168 'page-has-main': { -1 54169 impact: 'moderate', 31456 54170 messages: {31457 -1 pass: 'When not empty, element has both <dt> and <dd> elements',31458 -1 fail: 'When not empty, element does not have at least one <dt> element followed by at least one <dd> element'-1 54171 pass: 'Document has at least one main landmark', -1 54172 fail: 'Document does not have a main landmark' 31459 54173 } 31460 54174 },31461 -1 'only-dlitems': {31462 -1 impact: 'serious',-1 54175 'page-no-duplicate-banner': { -1 54176 impact: 'moderate', 31463 54177 messages: {31464 -1 pass: 'List element only has direct children that are allowed inside <dt> or <dd> elements',31465 -1 fail: 'List element has direct children that are not allowed inside <dt> or <dd> elements'-1 54178 pass: 'Document does not have more than one banner landmark', -1 54179 fail: 'Document has more than one banner landmark' 31466 54180 } 31467 54181 },31468 -1 dlitem: {31469 -1 impact: 'serious',-1 54182 'page-no-duplicate-contentinfo': { -1 54183 impact: 'moderate', 31470 54184 messages: {31471 -1 pass: 'Description list item has a <dl> parent element',31472 -1 fail: 'Description list item does not have a <dl> parent element'-1 54185 pass: 'Document does not have more than one contentinfo landmark', -1 54186 fail: 'Document has more than one contentinfo landmark' 31473 54187 } 31474 54188 },31475 -1 'doc-has-title': {31476 -1 impact: 'serious',-1 54189 'page-no-duplicate-main': { -1 54190 impact: 'moderate', 31477 54191 messages: {31478 -1 pass: 'Document has a non-empty <title> element',31479 -1 fail: 'Document does not have a non-empty <title> element'-1 54192 pass: 'Document does not have more than one main landmark', -1 54193 fail: 'Document has more than one main landmark' 31480 54194 } 31481 54195 },31482 -1 'duplicate-id-active': {-1 54196 tabindex: { 31483 54197 impact: 'serious', 31484 54198 messages: {31485 -1 pass: 'Document has no active elements that share the same id attribute',31486 -1 fail: 'Document has active elements with the same id attribute: ${data}'-1 54199 pass: 'Element does not have a tabindex greater than 0', -1 54200 fail: 'Element has a tabindex greater than 0' 31487 54201 } 31488 54202 },31489 -1 'duplicate-id-aria': {-1 54203 'alt-space-value': { 31490 54204 impact: 'critical', 31491 54205 messages: {31492 -1 pass: 'Document has no elements referenced with ARIA or labels that share the same id attribute',31493 -1 fail: 'Document has multiple elements referenced with ARIA with the same id attribute: ${data}'-1 54206 pass: 'Element has a valid alt attribute value', -1 54207 fail: 'Element has an alt attribute containing only a space character, which is not ignored by all screen readers' 31494 54208 } 31495 54209 },31496 -1 'duplicate-id': {-1 54210 'duplicate-img-label': { 31497 54211 impact: 'minor', 31498 54212 messages: {31499 -1 pass: 'Document has no static elements that share the same id attribute',31500 -1 fail: 'Document has multiple static elements with the same id attribute: ${data}'-1 54213 pass: 'Element does not duplicate existing text in <img> alt text', -1 54214 fail: 'Element contains <img> element with alt text that duplicates existing text' 31501 54215 } 31502 54216 },31503 -1 'has-widget-role': {31504 -1 impact: 'minor',-1 54217 'explicit-label': { -1 54218 impact: 'critical', 31505 54219 messages: {31506 -1 pass: 'Element has a widget role.',31507 -1 fail: 'Element does not have a widget role.'-1 54220 pass: 'Form element has an explicit <label>', -1 54221 fail: 'Form element does not have an explicit <label>', -1 54222 incomplete: 'Unable to determine if form element has an explicit <label>' 31508 54223 } 31509 54224 },31510 -1 'valid-scrollable-semantics': {-1 54225 'help-same-as-label': { 31511 54226 impact: 'minor', 31512 54227 messages: {31513 -1 pass: 'Element has valid semantics for an element in the focus order.',31514 -1 fail: 'Element has invalid semantics for an element in the focus order.'-1 54228 pass: 'Help text (title or aria-describedby) does not duplicate label text', -1 54229 fail: 'Help text (title or aria-describedby) text is the same as the label text' 31515 54230 } 31516 54231 },31517 -1 'multiple-label': {31518 -1 impact: 'moderate',-1 54232 'hidden-explicit-label': { -1 54233 impact: 'critical', 31519 54234 messages: {31520 -1 pass: 'Form field does not have multiple label elements',31521 -1 incomplete: 'Multiple label elements is not widely supported in assistive technologies. Ensure the first label contains all necessary information.'-1 54235 pass: 'Form element has a visible explicit <label>', -1 54236 fail: 'Form element has explicit <label> that is hidden', -1 54237 incomplete: 'Unable to determine if form element has explicit <label> that is hidden' 31522 54238 } 31523 54239 },31524 -1 'frame-tested': {-1 54240 'implicit-label': { 31525 54241 impact: 'critical', 31526 54242 messages: {31527 -1 pass: 'The iframe was tested with axe-core',31528 -1 fail: 'The iframe could not be tested with axe-core',31529 -1 incomplete: 'The iframe still has to be tested with axe-core'-1 54243 pass: 'Form element has an implicit (wrapped) <label>', -1 54244 fail: 'Form element does not have an implicit (wrapped) <label>', -1 54245 incomplete: 'Unable to determine if form element has an implicit (wrapped} <label>' 31530 54246 } 31531 54247 },31532 -1 'unique-frame-title': {-1 54248 'label-content-name-mismatch': { 31533 54249 impact: 'serious', 31534 54250 messages: {31535 -1 pass: 'Element\'s title attribute is unique',31536 -1 fail: 'Element\'s title attribute is not unique'-1 54251 pass: 'Element contains visible text as part of it\'s accessible name', -1 54252 fail: 'Text inside the element is not included in the accessible name' 31537 54253 } 31538 54254 },31539 -1 'heading-order': {-1 54255 'multiple-label': { 31540 54256 impact: 'moderate', 31541 54257 messages: {31542 -1 pass: 'Heading order valid',31543 -1 fail: 'Heading order invalid'-1 54258 pass: 'Form field does not have multiple label elements', -1 54259 incomplete: 'Multiple label elements is not widely supported in assistive technologies. Ensure the first label contains all necessary information.' 31544 54260 } 31545 54261 },31546 -1 'hidden-content': {31547 -1 impact: 'minor',-1 54262 'title-only': { -1 54263 impact: 'serious', 31548 54264 messages: {31549 -1 pass: 'All content on the page has been analyzed.',31550 -1 fail: 'There were problems analyzing the content on this page.',31551 -1 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.'-1 54265 pass: 'Form element does not solely use title attribute for its label', -1 54266 fail: 'Only title used to generate label for form element' -1 54267 } -1 54268 }, -1 54269 'landmark-is-unique': { -1 54270 impact: 'moderate', -1 54271 messages: { -1 54272 pass: 'Landmarks must have a unique role or role/label/title (i.e. accessible name) combination', -1 54273 fail: 'The landmark must have a unique aria-label, aria-labelledby, or title to make landmarks distinguishable' 31552 54274 } 31553 54275 }, 31554 54276 'has-lang': { @@ -31575,272 +54297,328 @@ module.exports = { 31575 54297 fail: 'Lang and xml:lang attributes do not have the same base language' 31576 54298 } 31577 54299 },31578 -1 'identical-links-same-purpose': {31579 -1 impact: 'minor',-1 54300 dlitem: { -1 54301 impact: 'serious', 31580 54302 messages: {31581 -1 pass: 'There are no other links with the same name, that go to a different URL',31582 -1 incomplete: 'Check that links have the same purpose, or are intentionally ambiguous.'-1 54303 pass: 'Description list item has a <dl> parent element', -1 54304 fail: 'Description list item does not have a <dl> parent element' 31583 54305 } 31584 54306 },31585 -1 'has-alt': {31586 -1 impact: 'critical',-1 54307 listitem: { -1 54308 impact: 'serious', 31587 54309 messages: {31588 -1 pass: 'Element has an alt attribute',31589 -1 fail: 'Element does not have an alt attribute'-1 54310 pass: 'List item has a <ul>, <ol> or role="list" parent element', -1 54311 fail: { -1 54312 default: 'List item does not have a <ul>, <ol> parent element', -1 54313 roleNotValid: 'List item does not have a <ul>, <ol> parent element without a role, or a role="list"' -1 54314 } 31590 54315 } 31591 54316 },31592 -1 'alt-space-value': {31593 -1 impact: 'critical',-1 54317 'only-dlitems': { -1 54318 impact: 'serious', 31594 54319 messages: {31595 -1 pass: 'Element has a valid alt attribute value',31596 -1 fail: 'Element has an alt attribute containing only a space character, which is not ignored by all screen readers'-1 54320 pass: 'List element only has direct children that are allowed inside <dt> or <dd> elements', -1 54321 fail: 'List element has direct children that are not allowed inside <dt> or <dd> elements' 31597 54322 } 31598 54323 },31599 -1 'duplicate-img-label': {31600 -1 impact: 'minor',-1 54324 'only-listitems': { -1 54325 impact: 'serious', 31601 54326 messages: {31602 -1 pass: 'Element does not duplicate existing text in <img> alt text',31603 -1 fail: 'Element contains <img> element with alt text that duplicates existing text'-1 54327 pass: 'List element only has direct children that are allowed inside <li> elements', -1 54328 fail: { -1 54329 default: 'List element has direct children that are not allowed inside <li> elements', -1 54330 roleNotValid: 'List element has direct children with a role that is not allowed: ${data.roles}' -1 54331 } 31604 54332 } 31605 54333 },31606 -1 'non-empty-if-present': {-1 54334 'structured-dlitems': { -1 54335 impact: 'serious', -1 54336 messages: { -1 54337 pass: 'When not empty, element has both <dt> and <dd> elements', -1 54338 fail: 'When not empty, element does not have at least one <dt> element followed by at least one <dd> element' -1 54339 } -1 54340 }, -1 54341 caption: { 31607 54342 impact: 'critical', 31608 54343 messages: {31609 -1 pass: {31610 -1 default: 'Element does not have a value attribute',31611 -1 'has-label': 'Element has a non-empty value attribute'31612 -1 },31613 -1 fail: 'Element has a value attribute and the value attribute is empty'-1 54344 pass: 'The multimedia element has a captions track', -1 54345 incomplete: 'Check that captions is available for the element' 31614 54346 } 31615 54347 },31616 -1 'non-empty-value': {-1 54348 'frame-tested': { 31617 54349 impact: 'critical', 31618 54350 messages: {31619 -1 pass: 'Element has a non-empty value attribute',31620 -1 fail: 'Element has no value attribute or the value attribute is empty'-1 54351 pass: 'The iframe was tested with axe-core', -1 54352 fail: 'The iframe could not be tested with axe-core', -1 54353 incomplete: 'The iframe still has to be tested with axe-core' 31621 54354 } 31622 54355 },31623 -1 'label-content-name-mismatch': {31624 -1 impact: 'serious',-1 54356 'no-autoplay-audio': { -1 54357 impact: 'moderate', 31625 54358 messages: {31626 -1 pass: 'Element contains visible text as part of it\'s accessible name',31627 -1 fail: 'Text inside the element is not included in the accessible name'-1 54359 pass: '<video> or <audio> does not output audio for more than allowed duration or has controls mechanism', -1 54360 fail: '<video> or <audio> outputs audio for more than allowed duration and does not have a controls mechanism', -1 54361 incomplete: 'Check that the <video> or <audio> does not output audio for more than allowed duration or provides a controls mechanism' 31628 54362 } 31629 54363 },31630 -1 'title-only': {-1 54364 'css-orientation-lock': { 31631 54365 impact: 'serious', 31632 54366 messages: {31633 -1 pass: 'Form element does not solely use title attribute for its label',31634 -1 fail: 'Only title used to generate label for form element'-1 54367 pass: 'Display is operable, and orientation lock does not exist', -1 54368 fail: 'CSS Orientation lock is applied, and makes display inoperable', -1 54369 incomplete: 'CSS Orientation lock cannot be determined' 31635 54370 } 31636 54371 },31637 -1 'implicit-label': {31638 -1 impact: 'critical',-1 54372 'meta-viewport-large': { -1 54373 impact: 'minor', 31639 54374 messages: {31640 -1 pass: 'Form element has an implicit (wrapped) <label>',31641 -1 fail: 'Form element does not have an implicit (wrapped) <label>',31642 -1 incomplete: 'Unable to determine if form element has an implicit (wrapped} <label>'-1 54375 pass: '<meta> tag does not prevent significant zooming on mobile devices', -1 54376 fail: '<meta> tag limits zooming on mobile devices' 31643 54377 } 31644 54378 },31645 -1 'explicit-label': {-1 54379 'meta-viewport': { 31646 54380 impact: 'critical', 31647 54381 messages: {31648 -1 pass: 'Form element has an explicit <label>',31649 -1 fail: 'Form element does not have an explicit <label>',31650 -1 incomplete: 'Unable to determine if form element has an explicit <label>'-1 54382 pass: '<meta> tag does not disable zooming on mobile devices', -1 54383 fail: '${data} on <meta> tag disables zooming on mobile devices' 31651 54384 } 31652 54385 },31653 -1 'help-same-as-label': {-1 54386 'header-present': { -1 54387 impact: 'serious', -1 54388 messages: { -1 54389 pass: 'Page has a heading', -1 54390 fail: 'Page does not have a heading' -1 54391 } -1 54392 }, -1 54393 'heading-order': { -1 54394 impact: 'moderate', -1 54395 messages: { -1 54396 pass: 'Heading order valid', -1 54397 fail: 'Heading order invalid', -1 54398 incomplete: 'Unable to determine previous heading' -1 54399 } -1 54400 }, -1 54401 'identical-links-same-purpose': { 31654 54402 impact: 'minor', 31655 54403 messages: {31656 -1 pass: 'Help text (title or aria-describedby) does not duplicate label text',31657 -1 fail: 'Help text (title or aria-describedby) text is the same as the label text'-1 54404 pass: 'There are no other links with the same name, that go to a different URL', -1 54405 incomplete: 'Check that links have the same purpose, or are intentionally ambiguous.' 31658 54406 } 31659 54407 },31660 -1 'hidden-explicit-label': {-1 54408 'internal-link-present': { -1 54409 impact: 'serious', -1 54410 messages: { -1 54411 pass: 'Valid skip link found', -1 54412 fail: 'No valid skip link found' -1 54413 } -1 54414 }, -1 54415 landmark: { -1 54416 impact: 'serious', -1 54417 messages: { -1 54418 pass: 'Page has a landmark region', -1 54419 fail: 'Page does not have a landmark region' -1 54420 } -1 54421 }, -1 54422 'meta-refresh': { 31661 54423 impact: 'critical', 31662 54424 messages: {31663 -1 pass: 'Form element has a visible explicit <label>',31664 -1 fail: 'Form element has explicit <label> that is hidden',31665 -1 incomplete: 'Unable to determine if form element has explicit <label> that is hidden'-1 54425 pass: '<meta> tag does not immediately refresh the page', -1 54426 fail: '<meta> tag forces timed refresh of page' -1 54427 } -1 54428 }, -1 54429 'p-as-heading': { -1 54430 impact: 'serious', -1 54431 messages: { -1 54432 pass: '<p> elements are not styled as headings', -1 54433 fail: 'Heading elements should be used instead of styled p elements' 31666 54434 } 31667 54435 },31668 -1 'landmark-is-top-level': {-1 54436 region: { 31669 54437 impact: 'moderate', 31670 54438 messages: {31671 -1 pass: 'The ${data.role} landmark is at the top level.',31672 -1 fail: 'The ${data.role} landmark is contained in another landmark.'-1 54439 pass: 'All page content is contained by landmarks', -1 54440 fail: 'Some page content is not contained by landmarks' 31673 54441 } 31674 54442 },31675 -1 'page-no-duplicate-banner': {-1 54443 'skip-link': { 31676 54444 impact: 'moderate', 31677 54445 messages: {31678 -1 pass: 'Document does not have more than one banner landmark',31679 -1 fail: 'Document has more than one banner landmark'-1 54446 pass: 'Skip link target exists', -1 54447 incomplete: 'Skip link target should become visible on activation', -1 54448 fail: 'No skip link target' 31680 54449 } 31681 54450 },31682 -1 'page-no-duplicate-contentinfo': {31683 -1 impact: 'moderate',-1 54451 'unique-frame-title': { -1 54452 impact: 'serious', 31684 54453 messages: {31685 -1 pass: 'Document does not have more than one contentinfo landmark',31686 -1 fail: 'Document has more than one contentinfo landmark'-1 54454 pass: 'Element\'s title attribute is unique', -1 54455 fail: 'Element\'s title attribute is not unique' 31687 54456 } 31688 54457 },31689 -1 'page-no-duplicate-main': {31690 -1 impact: 'moderate',-1 54458 'duplicate-id-active': { -1 54459 impact: 'serious', 31691 54460 messages: {31692 -1 pass: 'Document does not have more than one main landmark',31693 -1 fail: 'Document has more than one main landmark'-1 54461 pass: 'Document has no active elements that share the same id attribute', -1 54462 fail: 'Document has active elements with the same id attribute: ${data}' 31694 54463 } 31695 54464 },31696 -1 'page-has-main': {31697 -1 impact: 'moderate',-1 54465 'duplicate-id-aria': { -1 54466 impact: 'critical', 31698 54467 messages: {31699 -1 pass: 'Document has at least one main landmark',31700 -1 fail: 'Document does not have a main landmark'-1 54468 pass: 'Document has no elements referenced with ARIA or labels that share the same id attribute', -1 54469 fail: 'Document has multiple elements referenced with ARIA with the same id attribute: ${data}' 31701 54470 } 31702 54471 },31703 -1 'landmark-is-unique': {31704 -1 impact: 'moderate',-1 54472 'duplicate-id': { -1 54473 impact: 'minor', 31705 54474 messages: {31706 -1 pass: 'Landmarks must have a unique role or role/label/title (i.e. accessible name) combination',31707 -1 fail: 'The landmark must have a unique aria-label, aria-labelledby, or title to make landmarks distinguishable'-1 54475 pass: 'Document has no static elements that share the same id attribute', -1 54476 fail: 'Document has multiple static elements with the same id attribute: ${data}' 31708 54477 } 31709 54478 },31710 -1 'link-in-text-block': {-1 54479 'aria-label': { 31711 54480 impact: 'serious', 31712 54481 messages: {31713 -1 pass: 'Links can be distinguished from surrounding text in some way other than by color',31714 -1 fail: 'Links need to be distinguished from surrounding text in some way other than by color',31715 -1 incomplete: {31716 -1 default: 'Unable to determine contrast ratio',31717 -1 bgContrast: 'Element\'s contrast ratio could not be determined. Check for a distinct hover/focus style',31718 -1 bgImage: 'Element\'s contrast ratio could not be determined due to a background image',31719 -1 bgGradient: 'Element\'s contrast ratio could not be determined due to a background gradient',31720 -1 imgNode: 'Element\'s contrast ratio could not be determined because element contains an image node',31721 -1 bgOverlap: 'Element\'s contrast ratio could not be determined because of element overlap'31722 -1 }-1 54482 pass: 'aria-label attribute exists and is not empty', -1 54483 fail: 'aria-label attribute does not exist or is empty' 31723 54484 } 31724 54485 },31725 -1 'focusable-no-name': {-1 54486 'aria-labelledby': { 31726 54487 impact: 'serious', 31727 54488 messages: {31728 -1 pass: 'Element is not in tab order or has accessible text',31729 -1 fail: 'Element is in tab order and does not have accessible text',31730 -1 incomplete: 'Unable to determine if element has an accessible name'-1 54489 pass: 'aria-labelledby attribute exists and references elements that are visible to screen readers', -1 54490 fail: 'aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty', -1 54491 incomplete: 'ensure aria-labelledby references an existing element' 31731 54492 } 31732 54493 },31733 -1 'only-listitems': {-1 54494 'avoid-inline-spacing': { 31734 54495 impact: 'serious', 31735 54496 messages: {31736 -1 pass: 'List element only has direct children that are allowed inside <li> elements',-1 54497 pass: 'No inline styles with \'!important\' that affect text spacing has been specified', 31737 54498 fail: {31738 -1 default: 'List element has direct children that are not allowed inside <li> elements',31739 -1 roleNotValid: 'List element has direct children with a role that is not allowed: ${data.roles}'-1 54499 singular: 'Remove \'!important\' from inline style ${data.values}, as overriding this is not supported by most browsers', -1 54500 plural: 'Remove \'!important\' from inline styles ${data.values}, as overriding this is not supported by most browsers' 31740 54501 } 31741 54502 } 31742 54503 },31743 -1 listitem: {31744 -1 impact: 'serious',-1 54504 'button-has-visible-text': { -1 54505 impact: 'critical', 31745 54506 messages: {31746 -1 pass: 'List item has a <ul>, <ol> or role="list" parent element',31747 -1 fail: {31748 -1 default: 'List item does not have a <ul>, <ol> parent element',31749 -1 roleNotValid: 'List item does not have a <ul>, <ol> parent element without a role, or a role="list"'31750 -1 }-1 54507 pass: 'Element has inner text that is visible to screen readers', -1 54508 fail: 'Element does not have inner text that is visible to screen readers', -1 54509 incomplete: 'Unable to determine if element has children' 31751 54510 } 31752 54511 },31753 -1 'meta-refresh': {31754 -1 impact: 'critical',-1 54512 'doc-has-title': { -1 54513 impact: 'serious', 31755 54514 messages: {31756 -1 pass: '<meta> tag does not immediately refresh the page',31757 -1 fail: '<meta> tag forces timed refresh of page'-1 54515 pass: 'Document has a non-empty <title> element', -1 54516 fail: 'Document does not have a non-empty <title> element' 31758 54517 } 31759 54518 },31760 -1 'meta-viewport-large': {-1 54519 exists: { 31761 54520 impact: 'minor', 31762 54521 messages: {31763 -1 pass: '<meta> tag does not prevent significant zooming on mobile devices',31764 -1 fail: '<meta> tag limits zooming on mobile devices'-1 54522 pass: 'Element does not exist', -1 54523 incomplete: 'Element exists' 31765 54524 } 31766 54525 },31767 -1 'meta-viewport': {-1 54526 'has-alt': { 31768 54527 impact: 'critical', 31769 54528 messages: {31770 -1 pass: '<meta> tag does not disable zooming on mobile devices',31771 -1 fail: '${data} on <meta> tag disables zooming on mobile devices'-1 54529 pass: 'Element has an alt attribute', -1 54530 fail: 'Element does not have an alt attribute' 31772 54531 } 31773 54532 },31774 -1 'no-autoplay-audio': {31775 -1 impact: 'moderate',-1 54533 'has-visible-text': { -1 54534 impact: 'minor', 31776 54535 messages: {31777 -1 pass: '<video> or <audio> does not output audio for more than allowed duration or has controls mechanism',31778 -1 fail: '<video> or <audio> outputs audio for more than allowed duration and does not have a controls mechanism',31779 -1 incomplete: 'Check that the <video> or <audio> does not output audio for more than allowed duration or provides a controls mechanism'-1 54536 pass: 'Element has text that is visible to screen readers', -1 54537 fail: 'Element does not have text that is visible to screen readers', -1 54538 incomplete: 'Unable to determine if element has children' 31780 54539 } 31781 54540 },31782 -1 'p-as-heading': {-1 54541 'is-on-screen': { 31783 54542 impact: 'serious', 31784 54543 messages: {31785 -1 pass: '<p> elements are not styled as headings',31786 -1 fail: 'Heading elements should be used instead of styled p elements'-1 54544 pass: 'Element is not visible', -1 54545 fail: 'Element is visible' 31787 54546 } 31788 54547 },31789 -1 'page-has-heading-one': {31790 -1 impact: 'moderate',-1 54548 'non-empty-alt': { -1 54549 impact: 'critical', 31791 54550 messages: {31792 -1 pass: 'Page has at least one level-one heading',31793 -1 fail: 'Page must have a level-one heading'-1 54551 pass: 'Element has a non-empty alt attribute', -1 54552 fail: { -1 54553 noAttr: 'Element has no alt attribute', -1 54554 emptyAttr: 'Element has an empty alt attribute' -1 54555 } 31794 54556 } 31795 54557 },31796 -1 region: {31797 -1 impact: 'moderate',-1 54558 'non-empty-if-present': { -1 54559 impact: 'critical', 31798 54560 messages: {31799 -1 pass: 'All page content is contained by landmarks',31800 -1 fail: 'Some page content is not contained by landmarks'-1 54561 pass: { -1 54562 default: 'Element does not have a value attribute', -1 54563 'has-label': 'Element has a non-empty value attribute' -1 54564 }, -1 54565 fail: 'Element has a value attribute and the value attribute is empty' 31801 54566 } 31802 54567 },31803 -1 'html5-scope': {31804 -1 impact: 'moderate',-1 54568 'non-empty-placeholder': { -1 54569 impact: 'serious', 31805 54570 messages: {31806 -1 pass: 'Scope attribute is only used on table header elements (<th>)',31807 -1 fail: 'In HTML 5, scope attributes may only be used on table header elements (<th>)'-1 54571 pass: 'Element has a placeholder attribute', -1 54572 fail: { -1 54573 noAttr: 'Element has no placeholder attribute', -1 54574 emptyAttr: 'Element has an empty placeholder attribute' -1 54575 } 31808 54576 } 31809 54577 },31810 -1 'scope-value': {31811 -1 impact: 'critical',-1 54578 'non-empty-title': { -1 54579 impact: 'serious', 31812 54580 messages: {31813 -1 pass: 'Scope attribute is used correctly',31814 -1 fail: 'The value of the scope attribute may only be \'row\' or \'col\''-1 54581 pass: 'Element has a title attribute', -1 54582 fail: { -1 54583 noAttr: 'Element has no title attribute', -1 54584 emptyAttr: 'Element has an empty title attribute' -1 54585 } 31815 54586 } 31816 54587 },31817 -1 'focusable-content': {31818 -1 impact: 'moderate',-1 54588 'non-empty-value': { -1 54589 impact: 'critical', 31819 54590 messages: {31820 -1 pass: 'Element contains focusable elements',31821 -1 fail: 'Element should have focusable content'-1 54591 pass: 'Element has a non-empty value attribute', -1 54592 fail: { -1 54593 noAttr: 'Element has no value attribute', -1 54594 emptyAttr: 'Element has an empty value attribute' -1 54595 } 31822 54596 } 31823 54597 },31824 -1 'focusable-element': {31825 -1 impact: 'moderate',-1 54598 'presentational-role': { -1 54599 impact: 'minor', 31826 54600 messages: {31827 -1 pass: 'Element is focusable',31828 -1 fail: 'Element should be focusable'-1 54601 pass: 'Element\'s default semantics were overriden with role="${data.role}"', -1 54602 fail: { -1 54603 default: 'Element\'s default semantics were not overridden with role="none" or role="presentation"', -1 54604 globalAria: 'Element\'s role is not presentational because it has a global ARIA attribute', -1 54605 focusable: 'Element\'s role is not presentational because it is focusable', -1 54606 both: 'Element\'s role is not presentational because it has a global ARIA attribute and is focusable' -1 54607 } 31829 54608 } 31830 54609 },31831 -1 exists: {-1 54610 'role-none': { 31832 54611 impact: 'minor', 31833 54612 messages: {31834 -1 pass: 'Element does not exist',31835 -1 incomplete: 'Element exists'-1 54613 pass: 'Element\'s default semantics were overriden with role="none"', -1 54614 fail: 'Element\'s default semantics were not overridden with role="none"' 31836 54615 } 31837 54616 },31838 -1 'skip-link': {31839 -1 impact: 'moderate',-1 54617 'role-presentation': { -1 54618 impact: 'minor', 31840 54619 messages: {31841 -1 pass: 'Skip link target exists',31842 -1 incomplete: 'Skip link target should become visible on activation',31843 -1 fail: 'No skip link target'-1 54620 pass: 'Element\'s default semantics were overriden with role="presentation"', -1 54621 fail: 'Element\'s default semantics were not overridden with role="presentation"' 31844 54622 } 31845 54623 }, 31846 54624 'svg-non-empty-title': { @@ -31854,11 +54632,18 @@ module.exports = { 31854 54632 incomplete: 'Unable to determine element has a child that is a title' 31855 54633 } 31856 54634 },31857 -1 tabindex: {-1 54635 'caption-faked': { 31858 54636 impact: 'serious', 31859 54637 messages: {31860 -1 pass: 'Element does not have a tabindex greater than 0',31861 -1 fail: 'Element has a tabindex greater than 0'-1 54638 pass: 'The first row of a table is not used as a caption', -1 54639 fail: 'The first child of the table should be a caption instead of a table cell' -1 54640 } -1 54641 }, -1 54642 'html5-scope': { -1 54643 impact: 'moderate', -1 54644 messages: { -1 54645 pass: 'Scope attribute is only used on table header elements (<th>)', -1 54646 fail: 'In HTML 5, scope attributes may only be used on table header elements (<th>)' 31862 54647 } 31863 54648 }, 31864 54649 'same-caption-summary': { @@ -31868,11 +54653,11 @@ module.exports = { 31868 54653 fail: 'Content of summary attribute and <caption> element are identical' 31869 54654 } 31870 54655 },31871 -1 'caption-faked': {31872 -1 impact: 'serious',-1 54656 'scope-value': { -1 54657 impact: 'critical', 31873 54658 messages: {31874 -1 pass: 'The first row of a table is not used as a caption',31875 -1 fail: 'The first child of the table should be a caption instead of a table cell'-1 54659 pass: 'Scope attribute is used correctly', -1 54660 fail: 'The value of the scope attribute may only be \'row\' or \'col\'' 31876 54661 } 31877 54662 }, 31878 54663 'td-has-header': { @@ -31897,6 +54682,14 @@ module.exports = { 31897 54682 fail: 'Not all table header cells refer to data cells', 31898 54683 incomplete: 'Table data cells are missing or empty' 31899 54684 } -1 54685 }, -1 54686 'hidden-content': { -1 54687 impact: 'minor', -1 54688 messages: { -1 54689 pass: 'All content on the page has been analyzed.', -1 54690 fail: 'There were problems analyzing the content on this page.', -1 54691 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.' -1 54692 } 31900 54693 } 31901 54694 }, 31902 54695 failureSummaries: { @@ -31935,7 +54728,7 @@ module.exports = { 31935 54728 id: 'accesskeys', 31936 54729 selector: '[accesskey]', 31937 54730 excludeHidden: false,31938 -1 tags: [ 'best-practice', 'cat.keyboard' ],-1 54731 tags: [ 'cat.keyboard', 'best-practice' ], 31939 54732 all: [], 31940 54733 any: [], 31941 54734 none: [ 'accesskeys' ] @@ -31943,46 +54736,78 @@ module.exports = { 31943 54736 id: 'area-alt', 31944 54737 selector: 'map area[href]', 31945 54738 excludeHidden: false,31946 -1 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'wcag244', 'wcag412', 'section508', 'section508.22.a' ],-1 54739 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'wcag244', 'wcag412', 'section508', 'section508.22.a', 'ACT' ], 31947 54740 all: [], 31948 54741 any: [ { 31949 54742 options: { 31950 54743 attribute: 'alt' 31951 54744 }, 31952 54745 id: 'non-empty-alt'31953 -1 }, {-1 54746 }, 'aria-label', 'aria-labelledby', { -1 54747 options: { -1 54748 attribute: 'title' -1 54749 }, -1 54750 id: 'non-empty-title' -1 54751 } ], -1 54752 none: [] -1 54753 }, { -1 54754 id: 'aria-allowed-attr', -1 54755 matches: 'aria-allowed-attr-matches', -1 54756 tags: [ 'cat.aria', 'wcag2a', 'wcag412' ], -1 54757 all: [], -1 54758 any: [ 'aria-allowed-attr' ], -1 54759 none: [ 'aria-unsupported-attr', { -1 54760 options: { -1 54761 elementsAllowedAriaLabel: [ 'applet', 'input' ] -1 54762 }, -1 54763 id: 'aria-prohibited-attr' -1 54764 } ] -1 54765 }, { -1 54766 id: 'aria-allowed-role', -1 54767 excludeHidden: false, -1 54768 selector: '[role]', -1 54769 matches: 'aria-allowed-role-matches', -1 54770 tags: [ 'cat.aria', 'best-practice' ], -1 54771 all: [], -1 54772 any: [ { -1 54773 options: { -1 54774 allowImplicit: true, -1 54775 ignoredTags: [] -1 54776 }, -1 54777 id: 'aria-allowed-role' -1 54778 } ], -1 54779 none: [] -1 54780 }, { -1 54781 id: 'aria-command-name', -1 54782 selector: '[role="link"], [role="button"], [role="menuitem"]', -1 54783 matches: 'no-naming-method-matches', -1 54784 tags: [ 'cat.aria', 'wcag2a', 'wcag412' ], -1 54785 all: [], -1 54786 any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', { 31954 54787 options: { 31955 54788 attribute: 'title' 31956 54789 }, 31957 54790 id: 'non-empty-title'31958 -1 }, 'aria-label', 'aria-labelledby' ],-1 54791 } ], 31959 54792 none: [] 31960 54793 }, {31961 -1 id: 'aria-allowed-attr',31962 -1 matches: 'aria-allowed-attr-matches',31963 -1 tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],31964 -1 all: [],31965 -1 any: [ 'aria-allowed-attr' ],31966 -1 none: [ 'aria-unsupported-attr' ]31967 -1 }, {31968 -1 id: 'aria-allowed-role',31969 -1 excludeHidden: false,31970 -1 selector: '[role]',31971 -1 matches: 'aria-allowed-role-matches',-1 54794 id: 'aria-dialog-name', -1 54795 selector: '[role="dialog"], [role="alertdialog"]', -1 54796 matches: 'no-naming-method-matches', 31972 54797 tags: [ 'cat.aria', 'best-practice' ], 31973 54798 all: [],31974 -1 any: [ {-1 54799 any: [ 'aria-label', 'aria-labelledby', { 31975 54800 options: {31976 -1 allowImplicit: true,31977 -1 ignoredTags: []-1 54801 attribute: 'title' 31978 54802 },31979 -1 id: 'aria-allowed-role'-1 54803 id: 'non-empty-title' 31980 54804 } ], 31981 54805 none: [] 31982 54806 }, { 31983 54807 id: 'aria-hidden-body', 31984 54808 selector: 'body', 31985 54809 excludeHidden: false, -1 54810 matches: 'is-initiator-matches', 31986 54811 tags: [ 'cat.aria', 'wcag2a', 'wcag412' ], 31987 54812 all: [], 31988 54813 any: [ 'aria-hidden-body' ], @@ -31999,8 +54824,8 @@ module.exports = { 31999 54824 }, { 32000 54825 id: 'aria-input-field-name', 32001 54826 selector: '[role="combobox"], [role="listbox"], [role="searchbox"], [role="slider"], [role="spinbutton"], [role="textbox"]',32002 -1 matches: 'aria-form-field-name-matches',32003 -1 tags: [ 'wcag2a', 'wcag412' ],-1 54827 matches: 'no-naming-method-matches', -1 54828 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'ACT' ], 32004 54829 all: [], 32005 54830 any: [ 'aria-label', 'aria-labelledby', { 32006 54831 options: { @@ -32010,6 +54835,32 @@ module.exports = { 32010 54835 } ], 32011 54836 none: [ 'no-implicit-explicit-label' ] 32012 54837 }, { -1 54838 id: 'aria-meter-name', -1 54839 selector: '[role="meter"]', -1 54840 matches: 'no-naming-method-matches', -1 54841 tags: [ 'cat.aria', 'wcag2a', 'wcag111' ], -1 54842 all: [], -1 54843 any: [ 'aria-label', 'aria-labelledby', { -1 54844 options: { -1 54845 attribute: 'title' -1 54846 }, -1 54847 id: 'non-empty-title' -1 54848 } ], -1 54849 none: [] -1 54850 }, { -1 54851 id: 'aria-progressbar-name', -1 54852 selector: '[role="progressbar"]', -1 54853 matches: 'no-naming-method-matches', -1 54854 tags: [ 'cat.aria', 'wcag2a', 'wcag111' ], -1 54855 all: [], -1 54856 any: [ 'aria-label', 'aria-labelledby', { -1 54857 options: { -1 54858 attribute: 'title' -1 54859 }, -1 54860 id: 'non-empty-title' -1 54861 } ], -1 54862 none: [] -1 54863 }, { 32013 54864 id: 'aria-required-attr', 32014 54865 selector: '[role]', 32015 54866 tags: [ 'cat.aria', 'wcag2a', 'wcag412' ], @@ -32019,6 +54870,7 @@ module.exports = { 32019 54870 }, { 32020 54871 id: 'aria-required-children', 32021 54872 selector: '[role]', -1 54873 matches: 'aria-required-children-matches', 32022 54874 tags: [ 'cat.aria', 'wcag2a', 'wcag131' ], 32023 54875 all: [], 32024 54876 any: [ { @@ -32031,9 +54883,15 @@ module.exports = { 32031 54883 }, { 32032 54884 id: 'aria-required-parent', 32033 54885 selector: '[role]', -1 54886 matches: 'aria-required-parent-matches', 32034 54887 tags: [ 'cat.aria', 'wcag2a', 'wcag131' ], 32035 54888 all: [],32036 -1 any: [ 'aria-required-parent' ],-1 54889 any: [ { -1 54890 options: { -1 54891 ownGroupRoles: [ 'listitem', 'treeitem' ] -1 54892 }, -1 54893 id: 'aria-required-parent' -1 54894 } ], 32037 54895 none: [] 32038 54896 }, { 32039 54897 id: 'aria-roledescription', @@ -32056,19 +54914,52 @@ module.exports = { 32056 54914 any: [], 32057 54915 none: [ 'fallbackrole', 'invalidrole', 'abstractrole', 'unsupportedrole' ] 32058 54916 }, { -1 54917 id: 'aria-text', -1 54918 selector: '[role=text]', -1 54919 tags: [ 'cat.aria', 'best-practice' ], -1 54920 all: [], -1 54921 any: [ 'no-focusable-content' ], -1 54922 none: [] -1 54923 }, { 32059 54924 id: 'aria-toggle-field-name',32060 -1 selector: '[role="checkbox"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="radio"], [role="switch"]',32061 -1 matches: 'aria-form-field-name-matches',32062 -1 tags: [ 'wcag2a', 'wcag412' ],-1 54925 selector: '[role="checkbox"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="radio"], [role="switch"], [role="option"]', -1 54926 matches: 'no-naming-method-matches', -1 54927 tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'ACT' ], 32063 54928 all: [],32064 -1 any: [ 'aria-label', 'aria-labelledby', {-1 54929 any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', { 32065 54930 options: { 32066 54931 attribute: 'title' 32067 54932 }, 32068 54933 id: 'non-empty-title'32069 -1 }, 'has-visible-text' ],-1 54934 } ], 32070 54935 none: [ 'no-implicit-explicit-label' ] 32071 54936 }, { -1 54937 id: 'aria-tooltip-name', -1 54938 selector: '[role="tooltip"]', -1 54939 matches: 'no-naming-method-matches', -1 54940 tags: [ 'cat.aria', 'wcag2a', 'wcag412' ], -1 54941 all: [], -1 54942 any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', { -1 54943 options: { -1 54944 attribute: 'title' -1 54945 }, -1 54946 id: 'non-empty-title' -1 54947 } ], -1 54948 none: [] -1 54949 }, { -1 54950 id: 'aria-treeitem-name', -1 54951 selector: '[role="treeitem"]', -1 54952 matches: 'no-naming-method-matches', -1 54953 tags: [ 'cat.aria', 'best-practice' ], -1 54954 all: [], -1 54955 any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', { -1 54956 options: { -1 54957 attribute: 'title' -1 54958 }, -1 54959 id: 'non-empty-title' -1 54960 } ], -1 54961 none: [] -1 54962 }, { 32072 54963 id: 'aria-valid-attr-value', 32073 54964 matches: 'aria-has-attr-matches', 32074 54965 tags: [ 'cat.aria', 'wcag2a', 'wcag412' ], @@ -32107,7 +54998,7 @@ module.exports = { 32107 54998 }, { 32108 54999 id: 'avoid-inline-spacing', 32109 55000 selector: '[style]',32110 -1 tags: [ 'wcag21aa', 'wcag1412' ],-1 55001 tags: [ 'cat.structure', 'wcag21aa', 'wcag1412' ], 32111 55002 all: [ { 32112 55003 options: { 32113 55004 cssProperties: [ 'line-height', 'letter-spacing', 'word-spacing' ] @@ -32126,44 +55017,28 @@ module.exports = { 32126 55017 none: [ 'is-on-screen' ] 32127 55018 }, { 32128 55019 id: 'button-name',32129 -1 selector: 'button, [role="button"]:not(input)',32130 -1 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'section508', 'section508.22.a' ],-1 55020 selector: 'button', -1 55021 matches: 'no-explicit-name-required-matches', -1 55022 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'section508', 'section508.22.a', 'ACT' ], 32131 55023 all: [], 32132 55024 any: [ 'button-has-visible-text', 'aria-label', 'aria-labelledby', { 32133 55025 options: {32134 -1 matcher: {32135 -1 attributes: {32136 -1 role: 'presentation'32137 -1 }32138 -1 }32139 -1 },32140 -1 id: 'role-presentation'32141 -1 }, {32142 -1 options: {32143 -1 matcher: {32144 -1 attributes: {32145 -1 role: 'none'32146 -1 }32147 -1 }32148 -1 },32149 -1 id: 'role-none'32150 -1 }, {32151 -1 options: {32152 55026 attribute: 'title' 32153 55027 }, 32154 55028 id: 'non-empty-title'32155 -1 } ],-1 55029 }, 'presentational-role' ], 32156 55030 none: [] 32157 55031 }, { 32158 55032 id: 'bypass', 32159 55033 selector: 'html', 32160 55034 pageLevel: true, 32161 55035 matches: 'bypass-matches', -1 55036 reviewOnFail: true, 32162 55037 tags: [ 'cat.keyboard', 'wcag2a', 'wcag241', 'section508', 'section508.22.o' ], 32163 55038 all: [], 32164 55039 any: [ 'internal-link-present', { 32165 55040 options: {32166 -1 selector: 'h1:not([role]), h2:not([role]), h3:not([role]), h4:not([role]), h5:not([role]), h6:not([role]), [role=heading]'-1 55041 selector: ':is(h1, h2, h3, h4, h5, h6):not([role]), [role=heading]' 32167 55042 }, 32168 55043 id: 'header-present' 32169 55044 }, { @@ -32193,7 +55068,8 @@ module.exports = { 32193 55068 large: { 32194 55069 expected: 3 32195 55070 }32196 -1 }-1 55071 }, -1 55072 shadowOutlineEmMax: .1 32197 55073 }, 32198 55074 id: 'color-contrast' 32199 55075 } ], @@ -32230,7 +55106,7 @@ module.exports = { 32230 55106 }, { 32231 55107 id: 'document-title', 32232 55108 selector: 'html',32233 -1 matches: 'window-is-top-matches',-1 55109 matches: 'is-initiator-matches', 32234 55110 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag242', 'ACT' ], 32235 55111 all: [], 32236 55112 any: [ 'doc-has-title' ], @@ -32277,6 +55153,14 @@ module.exports = { 32277 55153 } ], 32278 55154 none: [] 32279 55155 }, { -1 55156 id: 'empty-table-header', -1 55157 selector: 'th, [role="rowheader"], [role="columnheader"]', -1 55158 tags: [ 'wcag131', 'cat.aria' ], -1 55159 reviewOnFail: true, -1 55160 all: [], -1 55161 any: [ 'has-visible-text' ], -1 55162 none: [] -1 55163 }, { 32280 55164 id: 'focus-order-semantics', 32281 55165 selector: 'div, h1, h2, h3, h4, h5, h6, [role=heading], p, span', 32282 55166 matches: 'inserted-into-focus-order-matches', @@ -32286,7 +55170,9 @@ module.exports = { 32286 55170 options: [], 32287 55171 id: 'has-widget-role' 32288 55172 }, {32289 -1 options: [],-1 55173 options: { -1 55174 roles: [ 'tooltip' ] -1 55175 }, 32290 55176 id: 'valid-scrollable-semantics' 32291 55177 } ], 32292 55178 none: [] @@ -32299,8 +55185,16 @@ module.exports = { 32299 55185 any: [], 32300 55186 none: [ 'multiple-label' ] 32301 55187 }, { -1 55188 id: 'frame-focusable-content', -1 55189 selector: 'html', -1 55190 matches: 'frame-focusable-content-matches', -1 55191 tags: [ 'cat.keyboard', 'wcag2a', 'wcag211' ], -1 55192 all: [], -1 55193 any: [ 'frame-focusable-content' ], -1 55194 none: [] -1 55195 }, { 32302 55196 id: 'frame-tested',32303 -1 selector: 'frame, iframe',-1 55197 selector: 'html, frame, iframe', 32304 55198 tags: [ 'cat.structure', 'review-item', 'best-practice' ], 32305 55199 all: [ { 32306 55200 options: { @@ -32323,30 +55217,12 @@ module.exports = { 32323 55217 selector: 'frame, iframe', 32324 55218 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag241', 'wcag412', 'section508', 'section508.22.i' ], 32325 55219 all: [],32326 -1 any: [ 'aria-label', 'aria-labelledby', {-1 55220 any: [ { 32327 55221 options: { 32328 55222 attribute: 'title' 32329 55223 }, 32330 55224 id: 'non-empty-title'32331 -1 }, {32332 -1 options: {32333 -1 matcher: {32334 -1 attributes: {32335 -1 role: 'presentation'32336 -1 }32337 -1 }32338 -1 },32339 -1 id: 'role-presentation'32340 -1 }, {32341 -1 options: {32342 -1 matcher: {32343 -1 attributes: {32344 -1 role: 'none'32345 -1 }32346 -1 }32347 -1 },32348 -1 id: 'role-none'32349 -1 } ],-1 55225 }, 'aria-label', 'aria-labelledby', 'presentational-role' ], 32350 55226 none: [] 32351 55227 }, { 32352 55228 id: 'heading-order', @@ -32367,7 +55243,7 @@ module.exports = { 32367 55243 }, { 32368 55244 id: 'html-has-lang', 32369 55245 selector: 'html',32370 -1 matches: 'window-is-top-matches',-1 55246 matches: 'is-initiator-matches', 32371 55247 tags: [ 'cat.language', 'wcag2a', 'wcag311', 'ACT' ], 32372 55248 all: [], 32373 55249 any: [ { @@ -32402,39 +55278,22 @@ module.exports = { 32402 55278 selector: 'a[href], area[href], [role="link"]', 32403 55279 excludeHidden: false, 32404 55280 matches: 'identical-links-same-purpose-matches',32405 -1 tags: [ 'wcag2aaa', 'wcag249', 'best-practice' ],-1 55281 tags: [ 'cat.semantics', 'wcag2aaa', 'wcag249', 'best-practice' ], 32406 55282 all: [ 'identical-links-same-purpose' ], 32407 55283 any: [], 32408 55284 none: [] 32409 55285 }, { 32410 55286 id: 'image-alt', 32411 55287 selector: 'img',32412 -1 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a' ],-1 55288 matches: 'no-explicit-name-required-matches', -1 55289 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ], 32413 55290 all: [], 32414 55291 any: [ 'has-alt', 'aria-label', 'aria-labelledby', { 32415 55292 options: { 32416 55293 attribute: 'title' 32417 55294 }, 32418 55295 id: 'non-empty-title'32419 -1 }, {32420 -1 options: {32421 -1 matcher: {32422 -1 attributes: {32423 -1 role: 'presentation'32424 -1 }32425 -1 }32426 -1 },32427 -1 id: 'role-presentation'32428 -1 }, {32429 -1 options: {32430 -1 matcher: {32431 -1 attributes: {32432 -1 role: 'none'32433 -1 }32434 -1 }32435 -1 },32436 -1 id: 'role-none'32437 -1 } ],-1 55296 }, 'presentational-role' ], 32438 55297 none: [ 'alt-space-value' ] 32439 55298 }, { 32440 55299 id: 'image-redundant-alt', @@ -32451,6 +55310,7 @@ module.exports = { 32451 55310 }, { 32452 55311 id: 'input-button-name', 32453 55312 selector: 'input[type="button"], input[type="submit"], input[type="reset"]', -1 55313 matches: 'no-explicit-name-required-matches', 32454 55314 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'section508', 'section508.22.a' ], 32455 55315 all: [], 32456 55316 any: [ 'non-empty-if-present', { @@ -32460,32 +55320,15 @@ module.exports = { 32460 55320 id: 'non-empty-value' 32461 55321 }, 'aria-label', 'aria-labelledby', { 32462 55322 options: {32463 -1 matcher: {32464 -1 attributes: {32465 -1 role: 'presentation'32466 -1 }32467 -1 }32468 -1 },32469 -1 id: 'role-presentation'32470 -1 }, {32471 -1 options: {32472 -1 matcher: {32473 -1 attributes: {32474 -1 role: 'none'32475 -1 }32476 -1 }32477 -1 },32478 -1 id: 'role-none'32479 -1 }, {32480 -1 options: {32481 55323 attribute: 'title' 32482 55324 }, 32483 55325 id: 'non-empty-title'32484 -1 } ],-1 55326 }, 'presentational-role' ], 32485 55327 none: [] 32486 55328 }, { 32487 55329 id: 'input-image-alt', 32488 55330 selector: 'input[type="image"]', -1 55331 matches: 'no-explicit-name-required-matches', 32489 55332 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ], 32490 55333 all: [], 32491 55334 any: [ { @@ -32503,7 +55346,7 @@ module.exports = { 32503 55346 }, { 32504 55347 id: 'label-content-name-mismatch', 32505 55348 matches: 'label-content-name-mismatch-matches',32506 -1 tags: [ 'wcag21a', 'wcag253', 'experimental' ],-1 55349 tags: [ 'cat.semantics', 'wcag21a', 'wcag253', 'experimental' ], 32507 55350 all: [], 32508 55351 any: [ { 32509 55352 options: { @@ -32523,34 +55366,21 @@ module.exports = { 32523 55366 none: [ 'title-only' ] 32524 55367 }, { 32525 55368 id: 'label',32526 -1 selector: 'input, select, textarea',-1 55369 selector: 'input, textarea', 32527 55370 matches: 'label-matches',32528 -1 tags: [ 'cat.forms', 'wcag2a', 'wcag412', 'wcag131', 'section508', 'section508.22.n' ],-1 55371 tags: [ 'cat.forms', 'wcag2a', 'wcag412', 'wcag131', 'section508', 'section508.22.n', 'ACT' ], 32529 55372 all: [],32530 -1 any: [ 'aria-label', 'aria-labelledby', 'implicit-label', 'explicit-label', {-1 55373 any: [ 'implicit-label', 'explicit-label', 'aria-label', 'aria-labelledby', { 32531 55374 options: { 32532 55375 attribute: 'title' 32533 55376 }, 32534 55377 id: 'non-empty-title' 32535 55378 }, { 32536 55379 options: {32537 -1 matcher: {32538 -1 attributes: {32539 -1 role: 'none'32540 -1 }32541 -1 }32542 -1 },32543 -1 id: 'role-none'32544 -1 }, {32545 -1 options: {32546 -1 matcher: {32547 -1 attributes: {32548 -1 role: 'presentation'32549 -1 }32550 -1 }-1 55380 attribute: 'placeholder' 32551 55381 },32552 -1 id: 'role-presentation'32553 -1 } ],-1 55382 id: 'non-empty-placeholder' -1 55383 }, 'presentational-role' ], 32554 55384 none: [ 'help-same-as-label', 'hidden-explicit-label' ] 32555 55385 }, { 32556 55386 id: 'landmark-banner-is-top-level', @@ -32651,29 +55481,11 @@ module.exports = { 32651 55481 none: [] 32652 55482 }, { 32653 55483 id: 'link-name',32654 -1 selector: 'a[href]:not([role=button]), [role=link]',32655 -1 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'wcag244', 'section508', 'section508.22.a' ],-1 55484 selector: 'a[href]', -1 55485 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'wcag244', 'section508', 'section508.22.a', 'ACT' ], 32656 55486 all: [], 32657 55487 any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', { 32658 55488 options: {32659 -1 matcher: {32660 -1 attributes: {32661 -1 role: 'presentation'32662 -1 }32663 -1 }32664 -1 },32665 -1 id: 'role-presentation'32666 -1 }, {32667 -1 options: {32668 -1 matcher: {32669 -1 attributes: {32670 -1 role: 'none'32671 -1 }32672 -1 }32673 -1 },32674 -1 id: 'role-none'32675 -1 }, {32676 -1 options: {32677 55489 attribute: 'title' 32678 55490 }, 32679 55491 id: 'non-empty-title' @@ -32714,6 +55526,7 @@ module.exports = { 32714 55526 }, { 32715 55527 id: 'meta-viewport-large', 32716 55528 selector: 'meta[name="viewport"]', -1 55529 matches: 'is-initiator-matches', 32717 55530 excludeHidden: false, 32718 55531 tags: [ 'cat.sensory-and-visual-cues', 'best-practice' ], 32719 55532 all: [], @@ -32728,8 +55541,9 @@ module.exports = { 32728 55541 }, { 32729 55542 id: 'meta-viewport', 32730 55543 selector: 'meta[name="viewport"]', -1 55544 matches: 'is-initiator-matches', 32731 55545 excludeHidden: false,32732 -1 tags: [ 'cat.sensory-and-visual-cues', 'best-practice' ],-1 55546 tags: [ 'cat.sensory-and-visual-cues', 'best-practice', 'ACT' ], 32733 55547 all: [], 32734 55548 any: [ { 32735 55549 options: { @@ -32739,11 +55553,18 @@ module.exports = { 32739 55553 } ], 32740 55554 none: [] 32741 55555 }, { -1 55556 id: 'nested-interactive', -1 55557 matches: 'nested-interactive-matches', -1 55558 tags: [ 'cat.keyboard', 'wcag2a', 'wcag412' ], -1 55559 all: [], -1 55560 any: [ 'no-focusable-content' ], -1 55561 none: [] -1 55562 }, { 32742 55563 id: 'no-autoplay-audio', 32743 55564 excludeHidden: false, 32744 55565 selector: 'audio[autoplay], video[autoplay]', 32745 55566 matches: 'no-autoplay-audio-matches',32746 -1 tags: [ 'wcag2a', 'wcag142', 'experimental' ],-1 55567 tags: [ 'cat.time-and-media', 'wcag2a', 'wcag142', 'experimental' ], 32747 55568 preload: true, 32748 55569 all: [ { 32749 55570 options: { @@ -32756,32 +55577,15 @@ module.exports = { 32756 55577 }, { 32757 55578 id: 'object-alt', 32758 55579 selector: 'object', -1 55580 matches: 'no-explicit-name-required-matches', 32759 55581 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a' ], 32760 55582 all: [],32761 -1 any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {-1 55583 any: [ 'aria-label', 'aria-labelledby', { 32762 55584 options: { 32763 55585 attribute: 'title' 32764 55586 }, 32765 55587 id: 'non-empty-title'32766 -1 }, {32767 -1 options: {32768 -1 matcher: {32769 -1 attributes: {32770 -1 role: 'presentation'32771 -1 }32772 -1 }32773 -1 },32774 -1 id: 'role-presentation'32775 -1 }, {32776 -1 options: {32777 -1 matcher: {32778 -1 attributes: {32779 -1 role: 'none'32780 -1 }32781 -1 }32782 -1 },32783 -1 id: 'role-none'32784 -1 } ],-1 55588 }, 'presentational-role' ], 32785 55589 none: [] 32786 55590 }, { 32787 55591 id: 'p-as-heading', @@ -32813,24 +55617,37 @@ module.exports = { 32813 55617 tags: [ 'cat.semantics', 'best-practice' ], 32814 55618 all: [ { 32815 55619 options: {32816 -1 selector: 'h1:not([role]):not([aria-level]), h1:not([role])[aria-level=1], h2:not([role])[aria-level=1], h3:not([role])[aria-level=1], h4:not([role])[aria-level=1], h5:not([role])[aria-level=1], h6:not([role])[aria-level=1], [role=heading][aria-level=1]'-1 55620 selector: 'h1:not([role], [aria-level]), :is(h1, h2, h3, h4, h5, h6):not([role])[aria-level=1], [role=heading][aria-level=1]' 32817 55621 }, 32818 55622 id: 'page-has-heading-one' 32819 55623 } ], 32820 55624 any: [], 32821 55625 none: [] 32822 55626 }, { -1 55627 id: 'presentation-role-conflict', -1 55628 matches: 'has-implicit-chromium-role-matches', -1 55629 selector: '[role="none"], [role="presentation"]', -1 55630 tags: [ 'cat.aria', 'best-practice' ], -1 55631 all: [], -1 55632 any: [], -1 55633 none: [ 'is-element-focusable', 'has-global-aria-attribute' ] -1 55634 }, { 32823 55635 id: 'region', 32824 55636 selector: 'body *', 32825 55637 tags: [ 'cat.keyboard', 'best-practice' ], 32826 55638 all: [],32827 -1 any: [ 'region' ],-1 55639 any: [ { -1 55640 options: { -1 55641 regionMatcher: 'dialog, [role=dialog], [role=alertdialog], svg, iframe' -1 55642 }, -1 55643 id: 'region' -1 55644 } ], 32828 55645 none: [] 32829 55646 }, { 32830 55647 id: 'role-img-alt',32831 -1 selector: '[role=\'img\']:not(img):not(area):not(input):not(object)',-1 55648 selector: '[role=\'img\']:not(img, area, input, object)', 32832 55649 matches: 'html-namespace-matches',32833 -1 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a' ],-1 55650 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ], 32834 55651 all: [], 32835 55652 any: [ 'aria-label', 'aria-labelledby', { 32836 55653 options: { @@ -32854,11 +55671,23 @@ module.exports = { 32854 55671 }, { 32855 55672 id: 'scrollable-region-focusable', 32856 55673 matches: 'scrollable-region-focusable-matches',32857 -1 tags: [ 'wcag2a', 'wcag211' ],-1 55674 tags: [ 'cat.keyboard', 'wcag2a', 'wcag211' ], 32858 55675 all: [], 32859 55676 any: [ 'focusable-content', 'focusable-element' ], 32860 55677 none: [] 32861 55678 }, { -1 55679 id: 'select-name', -1 55680 selector: 'select', -1 55681 tags: [ 'cat.forms', 'wcag2a', 'wcag412', 'wcag131', 'section508', 'section508.22.n', 'ACT' ], -1 55682 all: [], -1 55683 any: [ 'implicit-label', 'explicit-label', 'aria-label', 'aria-labelledby', { -1 55684 options: { -1 55685 attribute: 'title' -1 55686 }, -1 55687 id: 'non-empty-title' -1 55688 }, 'presentational-role' ], -1 55689 none: [ 'help-same-as-label', 'hidden-explicit-label' ] -1 55690 }, { 32862 55691 id: 'server-side-image-map', 32863 55692 selector: 'img[ismap]', 32864 55693 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag211', 'section508', 'section508.22.f' ], @@ -32877,7 +55706,7 @@ module.exports = { 32877 55706 id: 'svg-img-alt', 32878 55707 selector: '[role="img"], [role="graphics-symbol"], svg[role="graphics-document"]', 32879 55708 matches: 'svg-namespace-matches',32880 -1 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a' ],-1 55709 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ], 32881 55710 all: [], 32882 55711 any: [ 'svg-non-empty-title', 'aria-label', 'aria-labelledby', { 32883 55712 options: { @@ -32973,6 +55802,12 @@ module.exports = { 32973 55802 id: 'aria-hidden-body', 32974 55803 evaluate: 'aria-hidden-body-evaluate' 32975 55804 }, { -1 55805 id: 'aria-prohibited-attr', -1 55806 evaluate: 'aria-prohibited-attr-evaluate', -1 55807 options: { -1 55808 elementsAllowedAriaLabel: [ 'applet', 'input' ] -1 55809 } -1 55810 }, { 32976 55811 id: 'aria-required-attr', 32977 55812 evaluate: 'aria-required-attr-evaluate' 32978 55813 }, { @@ -32983,7 +55818,10 @@ module.exports = { 32983 55818 } 32984 55819 }, { 32985 55820 id: 'aria-required-parent',32986 -1 evaluate: 'aria-required-parent-evaluate'-1 55821 evaluate: 'aria-required-parent-evaluate', -1 55822 options: { -1 55823 ownGroupRoles: [ 'listitem', 'treeitem' ] -1 55824 } 32987 55825 }, { 32988 55826 id: 'aria-roledescription', 32989 55827 evaluate: 'aria-roledescription-evaluate', @@ -33005,6 +55843,9 @@ module.exports = { 33005 55843 id: 'fallbackrole', 33006 55844 evaluate: 'fallbackrole-evaluate' 33007 55845 }, { -1 55846 id: 'has-global-aria-attribute', -1 55847 evaluate: 'has-global-aria-attribute-evaluate' -1 55848 }, { 33008 55849 id: 'has-widget-role', 33009 55850 evaluate: 'has-widget-role-evaluate', 33010 55851 options: [] @@ -33012,6 +55853,9 @@ module.exports = { 33012 55853 id: 'invalidrole', 33013 55854 evaluate: 'invalidrole-evaluate' 33014 55855 }, { -1 55856 id: 'is-element-focusable', -1 55857 evaluate: 'is-element-focusable-evaluate' -1 55858 }, { 33015 55859 id: 'no-implicit-explicit-label', 33016 55860 evaluate: 'no-implicit-explicit-label-evaluate' 33017 55861 }, { @@ -33020,7 +55864,9 @@ module.exports = { 33020 55864 }, { 33021 55865 id: 'valid-scrollable-semantics', 33022 55866 evaluate: 'valid-scrollable-semantics-evaluate',33023 -1 options: []-1 55867 options: { -1 55868 roles: [ 'tooltip' ] -1 55869 } 33024 55870 }, { 33025 55871 id: 'color-contrast', 33026 55872 evaluate: 'color-contrast-evaluate', @@ -33037,7 +55883,8 @@ module.exports = { 33037 55883 large: { 33038 55884 expected: 3 33039 55885 }33040 -1 }-1 55886 }, -1 55887 shadowOutlineEmMax: .1 33041 55888 } 33042 55889 }, { 33043 55890 id: 'link-in-text-block', @@ -33071,14 +55918,20 @@ module.exports = { 33071 55918 id: 'focusable-not-tabbable', 33072 55919 evaluate: 'focusable-not-tabbable-evaluate' 33073 55920 }, { -1 55921 id: 'frame-focusable-content', -1 55922 evaluate: 'no-focusable-content-evaluate' -1 55923 }, { 33074 55924 id: 'landmark-is-top-level', 33075 55925 evaluate: 'landmark-is-top-level-evaluate' 33076 55926 }, { -1 55927 id: 'no-focusable-content', -1 55928 evaluate: 'no-focusable-content-evaluate' -1 55929 }, { 33077 55930 id: 'page-has-heading-one', 33078 55931 evaluate: 'has-descendant-evaluate', 33079 55932 after: 'has-descendant-after', 33080 55933 options: {33081 -1 selector: 'h1:not([role]):not([aria-level]), h1:not([role])[aria-level=1], h2:not([role])[aria-level=1], h3:not([role])[aria-level=1], h4:not([role])[aria-level=1], h5:not([role])[aria-level=1], h6:not([role])[aria-level=1], [role=heading][aria-level=1]'-1 55934 selector: 'h1:not([role], [aria-level]), :is(h1, h2, h3, h4, h5, h6):not([role])[aria-level=1], [role=heading][aria-level=1]' 33082 55935 } 33083 55936 }, { 33084 55937 id: 'page-has-main', @@ -33188,6 +56041,7 @@ module.exports = { 33188 56041 }, { 33189 56042 id: 'frame-tested', 33190 56043 evaluate: 'frame-tested-evaluate', -1 56044 after: 'frame-tested-after', 33191 56045 options: { 33192 56046 isViolation: false 33193 56047 } @@ -33221,7 +56075,7 @@ module.exports = { 33221 56075 evaluate: 'has-descendant-evaluate', 33222 56076 after: 'has-descendant-after', 33223 56077 options: {33224 -1 selector: 'h1:not([role]), h2:not([role]), h3:not([role]), h4:not([role]), h5:not([role]), h6:not([role]), [role=heading]'-1 56078 selector: ':is(h1, h2, h3, h4, h5, h6):not([role]), [role=heading]' 33225 56079 } 33226 56080 }, { 33227 56081 id: 'heading-order', @@ -33262,7 +56116,10 @@ module.exports = { 33262 56116 } 33263 56117 }, { 33264 56118 id: 'region',33265 -1 evaluate: 'region-evaluate'-1 56119 evaluate: 'region-evaluate', -1 56120 options: { -1 56121 regionMatcher: 'dialog, [role=dialog], [role=alertdialog], svg, iframe' -1 56122 } 33266 56123 }, { 33267 56124 id: 'skip-link', 33268 56125 evaluate: 'skip-link-evaluate' @@ -33322,6 +56179,12 @@ module.exports = { 33322 56179 id: 'non-empty-if-present', 33323 56180 evaluate: 'non-empty-if-present-evaluate' 33324 56181 }, { -1 56182 id: 'non-empty-placeholder', -1 56183 evaluate: 'attr-non-space-content-evaluate', -1 56184 options: { -1 56185 attribute: 'placeholder' -1 56186 } -1 56187 }, { 33325 56188 id: 'non-empty-title', 33326 56189 evaluate: 'attr-non-space-content-evaluate', 33327 56190 options: { @@ -33334,8 +56197,12 @@ module.exports = { 33334 56197 attribute: 'value' 33335 56198 } 33336 56199 }, { -1 56200 id: 'presentational-role', -1 56201 evaluate: 'presentational-role-evaluate' -1 56202 }, { 33337 56203 id: 'role-none', 33338 56204 evaluate: 'matches-definition-evaluate', -1 56205 deprecated: true, 33339 56206 options: { 33340 56207 matcher: { 33341 56208 attributes: { @@ -33346,6 +56213,7 @@ module.exports = { 33346 56213 }, { 33347 56214 id: 'role-presentation', 33348 56215 evaluate: 'matches-definition-evaluate', -1 56216 deprecated: true, 33349 56217 options: { 33350 56218 matcher: { 33351 56219 attributes: { @@ -33386,7 +56254,8 @@ module.exports = { 33386 56254 } ] 33387 56255 }); 33388 56256 })(typeof window === 'object' ? window : this);33389 -1 },{}],14:[function(require,module,exports){-1 56257 }).call(this)}).call(this,require('_process'),require("timers").setImmediate) -1 56258 },{"_process":149,"crypto":71,"timers":186}],201:[function(require,module,exports){ 33390 56259 "use strict"; 33391 56260 33392 56261 exports.__esModule = true; @@ -33396,7 +56265,7 @@ var _accessibleNameAndDescription = require("./accessible-name-and-description") 33396 56265 33397 56266 var _util = require("./util"); 33398 5626733399 -1 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }-1 56268 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } 33400 56269 33401 56270 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 33402 56271 @@ -33428,7 +56297,7 @@ function computeAccessibleDescription(root) { 33428 56297 return description; 33429 56298 } 33430 5629933431 -1 },{"./accessible-name-and-description":15,"./util":21}],15:[function(require,module,exports){-1 56300 },{"./accessible-name-and-description":202,"./util":208}],202:[function(require,module,exports){ 33432 56301 "use strict"; 33433 56302 33434 56303 exports.__esModule = true; @@ -33656,7 +56525,8 @@ function getLabels(element) { 33656 56525 33657 56526 if (labelsProperty !== undefined) { 33658 56527 return (0, _array.default)(labelsProperty);33659 -1 }-1 56528 } // polyfill -1 56529 33660 56530 33661 56531 if (!isLabelableElement(element)) { 33662 56532 return null; @@ -33819,6 +56689,12 @@ function computeTextAlternative(root) { 33819 56689 if (nameFromAlt !== null) { 33820 56690 return nameFromAlt; 33821 56691 } -1 56692 } else if ((0, _util.isHTMLOptGroupElement)(node)) { -1 56693 var nameFromLabel = useAttribute(node, "label"); -1 56694 -1 56695 if (nameFromLabel !== null) { -1 56696 return nameFromLabel; -1 56697 } 33822 56698 } 33823 56699 33824 56700 if ((0, _util.isHTMLInputElement)(node) && (node.type === "button" || node.type === "submit" || node.type === "reset")) { @@ -33840,22 +56716,19 @@ function computeTextAlternative(root) { 33840 56716 } 33841 56717 } 33842 5671833843 -1 if ((0, _util.isHTMLInputElement)(node) || (0, _util.isHTMLSelectElement)(node) || (0, _util.isHTMLTextAreaElement)(node)) {33844 -1 var input = node;33845 -1 var labels = getLabels(input);-1 56719 var labels = getLabels(node); 33846 5672033847 -1 if (labels !== null && labels.length !== 0) {33848 -1 consultedNodes.add(input);33849 -1 return (0, _array.default)(labels).map(function (element) {33850 -1 return computeTextAlternative(element, {33851 -1 isEmbeddedInLabel: true,33852 -1 isReferenced: false,33853 -1 recursion: true33854 -1 });33855 -1 }).filter(function (label) {33856 -1 return label.length > 0;33857 -1 }).join(" ");33858 -1 }-1 56721 if (labels !== null && labels.length !== 0) { -1 56722 consultedNodes.add(node); -1 56723 return (0, _array.default)(labels).map(function (element) { -1 56724 return computeTextAlternative(element, { -1 56725 isEmbeddedInLabel: true, -1 56726 isReferenced: false, -1 56727 recursion: true -1 56728 }); -1 56729 }).filter(function (label) { -1 56730 return label.length > 0; -1 56731 }).join(" "); 33859 56732 } // https://w3c.github.io/html-aam/#input-type-image-accessible-name-computation 33860 56733 // TODO: wpt test consider label elements but html-aam does not mention them 33861 56734 // We follow existing implementations over spec @@ -34024,7 +56897,7 @@ function computeTextAlternative(root) { 34024 56897 })); 34025 56898 } 34026 5689934027 -1 },{"./polyfills/SetLike":19,"./polyfills/array.from":20,"./util":21}],16:[function(require,module,exports){-1 56900 },{"./polyfills/SetLike":206,"./polyfills/array.from":207,"./util":208}],203:[function(require,module,exports){ 34028 56901 "use strict"; 34029 56902 34030 56903 exports.__esModule = true; @@ -34058,7 +56931,7 @@ function computeAccessibleName(root) { 34058 56931 return (0, _accessibleNameAndDescription.computeTextAlternative)(root, options); 34059 56932 } 34060 5693334061 -1 },{"./accessible-name-and-description":15,"./util":21}],17:[function(require,module,exports){-1 56934 },{"./accessible-name-and-description":202,"./util":208}],204:[function(require,module,exports){ 34062 56935 "use strict"; 34063 56936 34064 56937 exports.__esModule = true; @@ -34066,18 +56939,7 @@ exports.default = getRole; 34066 56939 34067 56940 var _util = require("./util"); 34068 5694134069 -1 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }34070 -134071 -1 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }34072 -134073 -1 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }34074 -134075 -1 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }34076 -134077 -1 function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }34078 -134079 -1 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }34080 -1-1 56942 // https://w3c.github.io/html-aria/#document-conformance-requirements-for-use-of-aria-attributes-in-html 34081 56943 var localNameToRoleMappings = { 34082 56944 article: "article", 34083 56945 aside: "complementary", @@ -34156,7 +57018,7 @@ function hasGlobalAriaAttributes(element, role) { 34156 57018 "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-relevant", "aria-roledescription"].some(function (attributeName) { 34157 57019 var _prohibitedAttributes; 34158 5702034159 -1 return element.hasAttribute(attributeName) && !((_prohibitedAttributes = prohibitedAttributes[role]) === null || _prohibitedAttributes === void 0 ? void 0 : _prohibitedAttributes.has(attributeName));-1 57021 return element.hasAttribute(attributeName) && !((_prohibitedAttributes = prohibitedAttributes[role]) !== null && _prohibitedAttributes !== void 0 && _prohibitedAttributes.has(attributeName)); 34160 57022 }); 34161 57023 } 34162 57024 @@ -34256,13 +57118,13 @@ function getImplicitRole(element) { 34256 57118 } 34257 57119 34258 57120 function getExplicitRole(element) {34259 -1 if (element.hasAttribute("role")) {34260 -1 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute check34261 -1 var _trim$split = element.getAttribute("role").trim().split(" "),34262 -1 _trim$split2 = _slicedToArray(_trim$split, 1),34263 -1 explicitRole = _trim$split2[0];-1 57121 var role = element.getAttribute("role"); 34264 5712234265 -1 if (explicitRole !== undefined && explicitRole.length > 0) {-1 57123 if (role !== null) { -1 57124 var explicitRole = role.trim().split(" ")[0]; // String.prototype.split(sep, limit) will always return an array with at least one member -1 57125 // as long as limit is either undefined or > 0 -1 57126 -1 57127 if (explicitRole.length > 0) { 34266 57128 return explicitRole; 34267 57129 } 34268 57130 } @@ -34270,7 +57132,7 @@ function getExplicitRole(element) { 34270 57132 return null; 34271 57133 } 34272 5713434273 -1 },{"./util":21}],18:[function(require,module,exports){-1 57135 },{"./util":208}],205:[function(require,module,exports){ 34274 57136 "use strict"; 34275 57137 34276 57138 exports.__esModule = true; @@ -34290,7 +57152,7 @@ exports.getRole = _getRole.default; 34290 57152 34291 57153 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 34292 5715434293 -1 },{"./accessible-description":14,"./accessible-name":16,"./getRole":17}],19:[function(require,module,exports){-1 57155 },{"./accessible-description":201,"./accessible-name":203,"./getRole":204}],206:[function(require,module,exports){ 34294 57156 "use strict"; 34295 57157 34296 57158 exports.__esModule = true; @@ -34367,7 +57229,7 @@ var _default = typeof Set === "undefined" ? Set : SetLike; 34367 57229 34368 57230 exports.default = _default; 34369 5723134370 -1 },{}],20:[function(require,module,exports){-1 57232 },{}],207:[function(require,module,exports){ 34371 57233 "use strict"; 34372 57234 34373 57235 exports.__esModule = true; @@ -34467,7 +57329,7 @@ function arrayFrom(arrayLike, mapFn) { 34467 57329 return A; 34468 57330 } 34469 5733134470 -1 },{}],21:[function(require,module,exports){-1 57332 },{}],208:[function(require,module,exports){ 34471 57333 "use strict"; 34472 57334 34473 57335 exports.__esModule = true; @@ -34475,6 +57337,7 @@ exports.getLocalName = getLocalName; 34475 57337 exports.isElement = isElement; 34476 57338 exports.isHTMLTableCaptionElement = isHTMLTableCaptionElement; 34477 57339 exports.isHTMLInputElement = isHTMLInputElement; -1 57340 exports.isHTMLOptGroupElement = isHTMLOptGroupElement; 34478 57341 exports.isHTMLSelectElement = isHTMLSelectElement; 34479 57342 exports.isHTMLTableElement = isHTMLTableElement; 34480 57343 exports.isHTMLTextAreaElement = isHTMLTextAreaElement; @@ -34517,6 +57380,10 @@ function isHTMLInputElement(node) { 34517 57380 return isElement(node) && getLocalName(node) === "input"; 34518 57381 } 34519 57382 -1 57383 function isHTMLOptGroupElement(node) { -1 57384 return isElement(node) && getLocalName(node) === "optgroup"; -1 57385 } -1 57386 34520 57387 function isHTMLSelectElement(node) { 34521 57388 return isElement(node) && getLocalName(node) === "select"; 34522 57389 } @@ -34594,7 +57461,7 @@ function hasAnyConcreteRoles(node, roles) { 34594 57461 return false; 34595 57462 } 34596 5746334597 -1 },{"./getRole":17}],22:[function(require,module,exports){-1 57464 },{"./getRole":204}],209:[function(require,module,exports){ 34598 57465 /*! 34599 57466 CalcNames: The AccName Computation Prototype, compute the Name and Description property values for a DOM node 34600 57467 Returns an object with 'name' and 'desc' properties. @@ -34611,7 +57478,7 @@ Distributed under the terms of the Open Source Initiative OSI - MIT License 34611 57478 window[nameSpace] = {}; 34612 57479 nameSpace = window[nameSpace]; 34613 57480 }34614 -1 nameSpace.getAccNameVersion = "2.50";-1 57481 nameSpace.getAccNameVersion = "2.55"; 34615 57482 // AccName Computation Prototype 34616 57483 nameSpace.getAccName = nameSpace.calcNames = function( 34617 57484 node, @@ -34671,9 +57538,10 @@ Plus roles extended for the Role Parity project. 34671 57538 return false; 34672 57539 } 34673 57540 -1 57541 var role = getRole(node); -1 57542 var tag = node.nodeName.toLowerCase(); -1 57543 34674 57544 var inList = function(node, list) {34675 -1 var role = getRole(node);34676 -1 var tag = node.nodeName.toLowerCase();34677 57545 return ( 34678 57546 (role && list.roles.indexOf(role) >= 0) || 34679 57547 (!role && list.tags.indexOf(tag) >= 0) @@ -34697,12 +57565,21 @@ Plus roles extended for the Role Parity project. 34697 57565 } 34698 57566 } 34699 57567 // Otherwise process list2 to identify roles to ignore processing name from content.34700 -1 else-1 57568 else { 34701 57569 return !!( 34702 57570 (inList(node, list2) || 34703 57571 (node === rootNode && !inList(node, list1))) && -1 57572 !( -1 57573 !role && -1 57574 ["section"].indexOf(tag) !== -1 && -1 57575 !( -1 57576 node.getAttribute("aria-labelledby") || -1 57577 node.getAttribute("aria-label") -1 57578 ) -1 57579 ) && 34704 57580 !skipTo.go 34705 57581 ); -1 57582 } 34706 57583 }; 34707 57584 34708 57585 var inParent = function(node, parent) { @@ -34915,6 +57792,10 @@ Plus roles extended for the Role Parity project. 34915 57792 !skipTo.role && 34916 57793 node.getAttribute("aria-describedby")) || 34917 57794 ""; -1 57795 var aDescription = -1 57796 !skipTo.tag && -1 57797 !skipTo.role && -1 57798 node.getAttribute("aria-description"); 34918 57799 var aLabel = 34919 57800 (!skipTo.tag && 34920 57801 !skipTo.role && @@ -34955,30 +57836,33 @@ Plus roles extended for the Role Parity project. 34955 57836 ownedBy[node.id].target === node)) 34956 57837 ); 34957 5783834958 -1 // Check for non-empty value of aria-describedby if current node equals reference node, follow each ID ref, then stop and process no deeper.-1 57839 // Check for non-empty value of aria-describedby/description if current node equals reference node, follow each ID ref, then stop and process no deeper. 34959 57840 if ( 34960 57841 !stop && 34961 57842 node === refNode && 34962 57843 !skipTo.tag && 34963 57844 !skipTo.role &&34964 -1 aDescribedby-1 57845 (aDescribedby || aDescription) 34965 57846 ) {34966 -1 var desc;34967 -1 ids = aDescribedby.split(/\s+/);34968 -1 parts = [];34969 -1 for (i = 0; i < ids.length; i++) {34970 -1 element = docO.getElementById(ids[i]);34971 -1 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label34972 -1 parts.push(34973 -1 walk(element, true, false, [node], false, {34974 -1 ref: ownedBy,34975 -1 top: element34976 -1 }).name34977 -1 );-1 57847 if (aDescribedby) { -1 57848 var desc; -1 57849 ids = aDescribedby.split(/\s+/); -1 57850 parts = []; -1 57851 for (i = 0; i < ids.length; i++) { -1 57852 element = docO.getElementById(ids[i]); -1 57853 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label -1 57854 parts.push( -1 57855 walk(element, true, false, [node], false, { -1 57856 ref: ownedBy, -1 57857 top: element -1 57858 }).name -1 57859 ); -1 57860 } -1 57861 // Check for blank value, since whitespace chars alone are not valid as a name -1 57862 desc = trim(parts.join(" ")); -1 57863 } else { -1 57864 desc = trim(aDescription); 34978 57865 }34979 -1 // Check for blank value, since whitespace chars alone are not valid as a name34980 -1 desc = trim(parts.join(" "));34981 -134982 57866 if (trim(desc)) { 34983 57867 result.desc = desc; 34984 57868 hasDesc = true; @@ -35037,6 +57921,7 @@ Plus roles extended for the Role Parity project. 35037 57921 !skipTo.tag && 35038 57922 !skipTo.role && 35039 57923 !hasName && -1 57924 nTag !== "iframe" && 35040 57925 nRole && 35041 57926 presentationRoles.indexOf(nRole) !== -1 && 35042 57927 !isFocusable(node) && @@ -35108,7 +57993,7 @@ Plus roles extended for the Role Parity project. 35108 57993 !skipTo.role && 35109 57994 !hasName && 35110 57995 !rolePresentation &&35111 -1 (nTag === "img" || btnType === "image") &&-1 57996 (nRole === "img" || nTag === "img" || btnType === "image") && 35112 57997 (nAlt || trim(nTitle)) 35113 57998 ) { 35114 57999 // Check for blank value, since whitespace chars alone are not valid as a name @@ -35266,10 +58151,9 @@ Plus roles extended for the Role Parity project. 35266 58151 !skipTo.tag && 35267 58152 !skipTo.role && 35268 58153 !hasName &&35269 -1 node === rootNode &&35270 58154 (nRole === "figure" || (!nRole && nTag === "figure")); 35271 5815535272 -1 // Otherwise, if name is still empty and the current node matches the root node and is a standard figure element with a non-empty associated figcaption element as the first or last child node, process caption with same naming computation algorithm.-1 58156 // Otherwise, if name is still empty and is a standard figure element with a non-empty associated figcaption element as the first or last child node, process caption with same naming computation algorithm. 35273 58157 // Plus do the same for role="figure" with embedded role="caption", or a combination of these. 35274 58158 if (isFigure) { 35275 58159 fChild = @@ -35287,7 +58171,6 @@ Plus roles extended for the Role Parity project. 35287 58171 if (trim(name)) { 35288 58172 hasName = true; 35289 58173 }35290 -1 skip = true;35291 58174 } 35292 58175 35293 58176 // Otherwise, if name is still empty and the root node and the current node are the same and node is an svg element, then parse the content of the title element to set the name and the desc element to set the description. @@ -35385,7 +58268,9 @@ Plus roles extended for the Role Parity project. 35385 58268 !rolePresentation && 35386 58269 trim(nTitle) 35387 58270 ) {35388 -1 result.title = trim(nTitle);-1 58271 if (!(name && aDescription === " ")) { -1 58272 result.title = trim(nTitle); -1 58273 } 35389 58274 } 35390 58275 35391 58276 var nType = @@ -35579,7 +58464,7 @@ Plus roles extended for the Role Parity project. 35579 58464 ); 35580 58465 }; 35581 5846635582 -1 // ARIA Role Exception Rule Set 1.1-1 58467 // ARIA Role Exception Rule Set 1.2 35583 58468 // The following Role Exception Rule Set is based on the following ARIA Working Group discussion involving all relevant browser venders. 35584 58469 // https://lists.w3.org/Archives/Public/public-aria/2017Jun/0057.html 35585 58470 @@ -35682,6 +58567,7 @@ Plus roles extended for the Role Parity project. 35682 58567 "form", 35683 58568 "header", 35684 58569 "hr", -1 58570 "iframe", 35685 58571 "img", 35686 58572 "textarea", 35687 58573 "input", @@ -36197,8 +59083,8 @@ Plus roles extended for the Role Parity project. 36197 59083 } 36198 59084 })(); 36199 5908536200 -1 },{}],23:[function(require,module,exports){36201 -1 (function (global){-1 59086 },{}],210:[function(require,module,exports){ -1 59087 (function (global){(function (){ 36202 59088 global.goog = { 36203 59089 provide: function() {}, 36204 59090 require: function() {}, @@ -36221,8 +59107,8 @@ require('accessibility-developer-tools/src/js/Properties'); 36221 59107 36222 59108 module.exports = global.axs; 36223 5910936224 -1 }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})36225 -1 },{"accessibility-developer-tools/src/js/AccessibilityUtils":1,"accessibility-developer-tools/src/js/BrowserUtils":2,"accessibility-developer-tools/src/js/Color":3,"accessibility-developer-tools/src/js/Constants":4,"accessibility-developer-tools/src/js/DOMUtils":5,"accessibility-developer-tools/src/js/Properties":6}],24:[function(require,module,exports){-1 59110 }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -1 59111 },{"accessibility-developer-tools/src/js/AccessibilityUtils":188,"accessibility-developer-tools/src/js/BrowserUtils":189,"accessibility-developer-tools/src/js/Color":190,"accessibility-developer-tools/src/js/Constants":191,"accessibility-developer-tools/src/js/DOMUtils":192,"accessibility-developer-tools/src/js/Properties":193}],211:[function(require,module,exports){ 36226 59112 var ariaApi = require('aria-api'); 36227 59113 var accdc = require('w3c-alternative-text-computation'); 36228 59114 var axe = require('axe-core'); @@ -36242,7 +59128,7 @@ var ex = function(fn, args, _this) { 36242 59128 }; 36243 59129 36244 59130 var implementations = [{36245 -1 name: 'aria-api (0.4.0)',-1 59131 name: 'aria-api (0.4.1)', 36246 59132 url: 'https://github.com/xi/aria-api', 36247 59133 fn: function(el) { 36248 59134 return { @@ -36252,11 +59138,11 @@ var implementations = [{ 36252 59138 }; 36253 59139 }, 36254 59140 }, {36255 -1 name: 'accdc (2.50)',-1 59141 name: 'accdc (2.55)', 36256 59142 url: 'https://github.com/accdc/w3c-alternative-text-computation', 36257 59143 fn: accdc.calcNames, 36258 59144 }, {36259 -1 name: 'dom-accessibility-api (0.5.4)',-1 59145 name: 'dom-accessibility-api (0.5.6)', 36260 59146 url: 'https://github.com/eps1lon/dom-accessibility-api/', 36261 59147 fn: function(el) { 36262 59148 return { @@ -36266,7 +59152,7 @@ var implementations = [{ 36266 59152 }; 36267 59153 }, 36268 59154 }, {36269 -1 name: 'axe (4.0.2)',-1 59155 name: 'axe (4.2.3)', 36270 59156 url: 'https://github.com/dequelabs/axe-core', 36271 59157 fn: function(el) { 36272 59158 axe._tree = axe.utils.getFlattenedTree(document.body); @@ -36350,4 +59236,4 @@ try { 36350 59236 }); 36351 59237 } 36352 5923836353 -1 },{"./axs":23,"aria-api":7,"axe-core":13,"dom-accessibility-api":18,"w3c-alternative-text-computation":22}]},{},[24]);-1 59239 },{"./axs":210,"aria-api":194,"axe-core":200,"dom-accessibility-api":205,"w3c-alternative-text-computation":209}]},{},[211]);
diff --git a/fuzz.js b/fuzz.js
@@ -429,6 +429,10 @@ var getAttribute = function(el, key) {
429 429 } else if (key === 'invalid' && el.checkValidity) {
430 430 return !el.checkValidity();
431 431 } else if (key === 'hidden') {
-1 432 // workaround for chromium
-1 433 if (el.matches('noscript')) {
-1 434 return true;
-1 435 }
432 436 var style = window.getComputedStyle(el);
433 437 if (style.display === 'none' || style.visibility === 'hidden') {
434 438 return true;
@@ -1154,7 +1158,6 @@ http://www.w3.org/TR/accname-aam-1.1/
1154 1158 Authored by Bryan Garaventa, plus refactoring contrabutions by Tobias Bengfort
1155 1159 https://github.com/whatsock/w3c-alternative-text-computation
1156 1160 Distributed under the terms of the Open Source Initiative OSI - MIT License
1157 -1 11:33 AM Thursday, May 7, 2020
1158 1161 */
1159 1162
1160 1163 (function() {
@@ -1163,7 +1166,7 @@ Distributed under the terms of the Open Source Initiative OSI - MIT License
1163 1166 window[nameSpace] = {};
1164 1167 nameSpace = window[nameSpace];
1165 1168 }
1166 -1 nameSpace.getAccNameVersion = "2.49";
-1 1169 nameSpace.getAccNameVersion = "2.55";
1167 1170 // AccName Computation Prototype
1168 1171 nameSpace.getAccName = nameSpace.calcNames = function(
1169 1172 node,
@@ -1181,7 +1184,7 @@ Distributed under the terms of the Open Source Initiative OSI - MIT License
1181 1184 return props;
1182 1185 }
1183 1186 var rootNode = node;
1184 -1
-1 1187 var rootRole = trim(node.getAttribute("role") || "");
1185 1188 // Track nodes to prevent duplicate node reference parsing.
1186 1189 var nodes = [];
1187 1190 // Track aria-owns references to prevent duplicate parsing.
@@ -1223,9 +1226,10 @@ Plus roles extended for the Role Parity project.
1223 1226 return false;
1224 1227 }
1225 1228
-1 1229 var role = getRole(node);
-1 1230 var tag = node.nodeName.toLowerCase();
-1 1231
1226 1232 var inList = function(node, list) {
1227 -1 var role = getRole(node);
1228 -1 var tag = node.nodeName.toLowerCase();
1229 1233 return (
1230 1234 (role && list.roles.indexOf(role) >= 0) ||
1231 1235 (!role && list.tags.indexOf(tag) >= 0)
@@ -1249,12 +1253,21 @@ Plus roles extended for the Role Parity project.
1249 1253 }
1250 1254 }
1251 1255 // Otherwise process list2 to identify roles to ignore processing name from content.
1252 -1 else
-1 1256 else {
1253 1257 return !!(
1254 1258 (inList(node, list2) ||
1255 1259 (node === rootNode && !inList(node, list1))) &&
-1 1260 !(
-1 1261 !role &&
-1 1262 ["section"].indexOf(tag) !== -1 &&
-1 1263 !(
-1 1264 node.getAttribute("aria-labelledby") ||
-1 1265 node.getAttribute("aria-label")
-1 1266 )
-1 1267 ) &&
1256 1268 !skipTo.go
1257 1269 );
-1 1270 }
1258 1271 };
1259 1272
1260 1273 var inParent = function(node, parent) {
@@ -1467,6 +1480,10 @@ Plus roles extended for the Role Parity project.
1467 1480 !skipTo.role &&
1468 1481 node.getAttribute("aria-describedby")) ||
1469 1482 "";
-1 1483 var aDescription =
-1 1484 !skipTo.tag &&
-1 1485 !skipTo.role &&
-1 1486 node.getAttribute("aria-description");
1470 1487 var aLabel =
1471 1488 (!skipTo.tag &&
1472 1489 !skipTo.role &&
@@ -1507,30 +1524,33 @@ Plus roles extended for the Role Parity project.
1507 1524 ownedBy[node.id].target === node))
1508 1525 );
1509 1526
1510 -1 // Check for non-empty value of aria-describedby if current node equals reference node, follow each ID ref, then stop and process no deeper.
-1 1527 // Check for non-empty value of aria-describedby/description if current node equals reference node, follow each ID ref, then stop and process no deeper.
1511 1528 if (
1512 1529 !stop &&
1513 1530 node === refNode &&
1514 1531 !skipTo.tag &&
1515 1532 !skipTo.role &&
1516 -1 aDescribedby
-1 1533 (aDescribedby || aDescription)
1517 1534 ) {
1518 -1 var desc;
1519 -1 ids = aDescribedby.split(/\s+/);
1520 -1 parts = [];
1521 -1 for (i = 0; i < ids.length; i++) {
1522 -1 element = docO.getElementById(ids[i]);
1523 -1 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label
1524 -1 parts.push(
1525 -1 walk(element, true, false, [node], false, {
1526 -1 ref: ownedBy,
1527 -1 top: element
1528 -1 }).name
1529 -1 );
-1 1535 if (aDescribedby) {
-1 1536 var desc;
-1 1537 ids = aDescribedby.split(/\s+/);
-1 1538 parts = [];
-1 1539 for (i = 0; i < ids.length; i++) {
-1 1540 element = docO.getElementById(ids[i]);
-1 1541 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label
-1 1542 parts.push(
-1 1543 walk(element, true, false, [node], false, {
-1 1544 ref: ownedBy,
-1 1545 top: element
-1 1546 }).name
-1 1547 );
-1 1548 }
-1 1549 // Check for blank value, since whitespace chars alone are not valid as a name
-1 1550 desc = trim(parts.join(" "));
-1 1551 } else {
-1 1552 desc = trim(aDescription);
1530 1553 }
1531 -1 // Check for blank value, since whitespace chars alone are not valid as a name
1532 -1 desc = trim(parts.join(" "));
1533 -1
1534 1554 if (trim(desc)) {
1535 1555 result.desc = desc;
1536 1556 hasDesc = true;
@@ -1589,6 +1609,7 @@ Plus roles extended for the Role Parity project.
1589 1609 !skipTo.tag &&
1590 1610 !skipTo.role &&
1591 1611 !hasName &&
-1 1612 nTag !== "iframe" &&
1592 1613 nRole &&
1593 1614 presentationRoles.indexOf(nRole) !== -1 &&
1594 1615 !isFocusable(node) &&
@@ -1640,7 +1661,7 @@ Plus roles extended for the Role Parity project.
1640 1661 (!skipTo.tag &&
1641 1662 !skipTo.role &&
1642 1663 isNativeButton &&
1643 -1 node.getAttribute("type")) ||
-1 1664 (node.getAttribute("type") || "").toLowerCase()) ||
1644 1665 false;
1645 1666 var btnValue =
1646 1667 (!skipTo.tag &&
@@ -1660,7 +1681,7 @@ Plus roles extended for the Role Parity project.
1660 1681 !skipTo.role &&
1661 1682 !hasName &&
1662 1683 !rolePresentation &&
1663 -1 (nTag === "img" || btnType === "image") &&
-1 1684 (nRole === "img" || nTag === "img" || btnType === "image") &&
1664 1685 (nAlt || trim(nTitle))
1665 1686 ) {
1666 1687 // Check for blank value, since whitespace chars alone are not valid as a name
@@ -1818,10 +1839,9 @@ Plus roles extended for the Role Parity project.
1818 1839 !skipTo.tag &&
1819 1840 !skipTo.role &&
1820 1841 !hasName &&
1821 -1 node === rootNode &&
1822 1842 (nRole === "figure" || (!nRole && nTag === "figure"));
1823 1843
1824 -1 // Otherwise, if name is still empty and the current node matches the root node and is a standard figure element with a non-empty associated figcaption element as the first or last child node, process caption with same naming computation algorithm.
-1 1844 // Otherwise, if name is still empty and is a standard figure element with a non-empty associated figcaption element as the first or last child node, process caption with same naming computation algorithm.
1825 1845 // Plus do the same for role="figure" with embedded role="caption", or a combination of these.
1826 1846 if (isFigure) {
1827 1847 fChild =
@@ -1839,7 +1859,6 @@ Plus roles extended for the Role Parity project.
1839 1859 if (trim(name)) {
1840 1860 hasName = true;
1841 1861 }
1842 -1 skip = true;
1843 1862 }
1844 1863
1845 1864 // Otherwise, if name is still empty and the root node and the current node are the same and node is an svg element, then parse the content of the title element to set the name and the desc element to set the description.
@@ -1937,10 +1956,14 @@ Plus roles extended for the Role Parity project.
1937 1956 !rolePresentation &&
1938 1957 trim(nTitle)
1939 1958 ) {
1940 -1 result.title = trim(nTitle);
-1 1959 if (!(name && aDescription === " ")) {
-1 1960 result.title = trim(nTitle);
-1 1961 }
1941 1962 }
1942 1963
1943 -1 var nType = isNativeFormField && trim(node.getAttribute("type"));
-1 1964 var nType =
-1 1965 isNativeFormField &&
-1 1966 trim(node.getAttribute("type") || "").toLowerCase();
1944 1967 if (!nType) nType = "text";
1945 1968 var placeholder =
1946 1969 !skipTo.tag &&
@@ -2089,7 +2112,10 @@ Plus roles extended for the Role Parity project.
2089 2112 };
2090 2113
2091 2114 var getRole = function(node) {
2092 -1 var role = node && node.getAttribute ? node.getAttribute("role") : "";
-1 2115 var role =
-1 2116 node && node.getAttribute
-1 2117 ? (node.getAttribute("role") || "").toLowerCase()
-1 2118 : "";
2093 2119 if (!trim(role)) {
2094 2120 return "";
2095 2121 }
@@ -2122,11 +2148,11 @@ Plus roles extended for the Role Parity project.
2122 2148 }
2123 2149 return (
2124 2150 ["button", "input", "select", "textarea"].indexOf(nodeName) !== -1 &&
2125 -1 node.getAttribute("type") !== "hidden"
-1 2151 (node.getAttribute("type") || "").toLowerCase() !== "hidden"
2126 2152 );
2127 2153 };
2128 2154
2129 -1 // ARIA Role Exception Rule Set 1.1
-1 2155 // ARIA Role Exception Rule Set 1.2
2130 2156 // The following Role Exception Rule Set is based on the following ARIA Working Group discussion involving all relevant browser venders.
2131 2157 // https://lists.w3.org/Archives/Public/public-aria/2017Jun/0057.html
2132 2158
@@ -2229,6 +2255,7 @@ Plus roles extended for the Role Parity project.
2229 2255 "form",
2230 2256 "header",
2231 2257 "hr",
-1 2258 "iframe",
2232 2259 "img",
2233 2260 "textarea",
2234 2261 "input",
@@ -2661,13 +2688,6 @@ Plus roles extended for the Role Parity project.
2661 2688 return false;
2662 2689 };
2663 2690
2664 -1 var trim = function(str) {
2665 -1 if (typeof str !== "string") {
2666 -1 return "";
2667 -1 }
2668 -1 return str.replace(/^\s+|\s+$/g, "");
2669 -1 };
2670 -1
2671 2691 if (
2672 2692 isParentHidden(
2673 2693 node,
@@ -2690,6 +2710,8 @@ Plus roles extended for the Role Parity project.
2690 2710 accDesc = "";
2691 2711 }
2692 2712
-1 2713 props.hasUpperCase =
-1 2714 rootRole && rootRole !== rootRole.toLowerCase() ? true : false;
2693 2715 props.name = accName;
2694 2716 props.desc = accDesc;
2695 2717
@@ -2709,6 +2731,13 @@ Plus roles extended for the Role Parity project.
2709 2731 }
2710 2732 };
2711 2733
-1 2734 var trim = function(str) {
-1 2735 if (typeof str !== "string") {
-1 2736 return "";
-1 2737 }
-1 2738 return str.replace(/^\s+|\s+$/g, "");
-1 2739 };
-1 2740
2712 2741 // Customize returned string for testable statements
2713 2742
2714 2743 nameSpace.getAccNameMsg = nameSpace.getNames = function(node, overrides) {
diff --git a/package.json b/package.json
@@ -4,9 +4,9 @@ 4 4 "description": "compare different implementations of accname", 5 5 "devDependencies": { 6 6 "accessibility-developer-tools": "2.12.0",7 -1 "aria-api": "0.4.0",8 -1 "axe-core": "4.0.2",9 -1 "dom-accessibility-api": "0.5.4",-1 7 "aria-api": "0.4.1", -1 8 "axe-core": "4.2.3", -1 9 "dom-accessibility-api": "0.5.6", 10 10 "nyc": "^15.1.0", 11 11 "w3c-alternative-text-computation": "github:accdc/w3c-alternative-text-computation" 12 12 },
diff --git a/src/babel.js b/src/babel.js
@@ -17,7 +17,7 @@ var ex = function(fn, args, _this) {
17 17 };
18 18
19 19 var implementations = [{
20 -1 name: 'aria-api (0.4.0)',
-1 20 name: 'aria-api (0.4.1)',
21 21 url: 'https://github.com/xi/aria-api',
22 22 fn: function(el) {
23 23 return {
@@ -27,11 +27,11 @@ var implementations = [{
27 27 };
28 28 },
29 29 }, {
30 -1 name: 'accdc (2.50)',
-1 30 name: 'accdc (2.55)',
31 31 url: 'https://github.com/accdc/w3c-alternative-text-computation',
32 32 fn: accdc.calcNames,
33 33 }, {
34 -1 name: 'dom-accessibility-api (0.5.4)',
-1 34 name: 'dom-accessibility-api (0.5.6)',
35 35 url: 'https://github.com/eps1lon/dom-accessibility-api/',
36 36 fn: function(el) {
37 37 return {
@@ -41,7 +41,7 @@ var implementations = [{
41 41 };
42 42 },
43 43 }, {
44 -1 name: 'axe (4.0.2)',
-1 44 name: 'axe (4.2.3)',
45 45 url: 'https://github.com/dequelabs/axe-core',
46 46 fn: function(el) {
47 47 axe._tree = axe.utils.getFlattenedTree(document.body);