1 |
- {"ast":null,"code":"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime-corejs3/helpers/interopRequireDefault\");\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs3/core-js-stable/object/define-property\");\n\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = void 0;\n\nvar _set = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/set\"));\n\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs3/helpers/slicedToArray\"));\n\nvar _entries = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/instance/entries\"));\n\nvar _find = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/instance/find\"));\n\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/json/stringify\"));\n\nvar _concat = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/instance/concat\"));\n\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/instance/keys\"));\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs3/helpers/toConsumableArray\"));\n\nvar _forEach = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/instance/for-each\"));\n\nvar _map = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/map\"));\n\nvar _rolesMap = _interopRequireDefault(require(\"./rolesMap\"));\n\nvar _context;\n\nvar elementRoleMap = new _map.default([]);\n(0, _forEach.default)(_context = (0, _toConsumableArray2.default)((0, _keys.default)(_rolesMap.default).call(_rolesMap.default))).call(_context, function (key) {\n var role = _rolesMap.default.get(key);\n\n if (role) {\n var _context2, _context3;\n\n (0, _forEach.default)(_context2 = (0, _concat.default)(_context3 = []).call(_context3, (0, _toConsumableArray2.default)(role.baseConcepts), (0, _toConsumableArray2.default)(role.relatedConcepts))).call(_context2, function (relation) {\n if (relation.module === 'HTML') {\n var concept = relation.concept;\n\n if (concept) {\n var _context4;\n\n var conceptStr = (0, _stringify.default)(concept);\n var roles = ((0, _find.default)(_context4 = (0, _toConsumableArray2.default)((0, _entries.default)(elementRoleMap).call(elementRoleMap))).call(_context4, function (_ref) {\n var _ref2 = (0, _slicedToArray2.default)(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n\n return (0, _stringify.default)(key) === conceptStr;\n }) || [])[1];\n\n if (!roles) {\n roles = new _set.default([]);\n }\n\n roles.add(key);\n elementRoleMap.set(concept, roles);\n }\n }\n });\n }\n});\nvar _default = elementRoleMap;\nexports.default = _default;","map":{"version":3,"sources":["/Users/jane/Documents/Курс Front-end/HW8/myproject/node_modules/aria-query/lib/elementRoleMap.js"],"names":["_interopRequireDefault","require","_Object$defineProperty","exports","value","default","_set","_slicedToArray2","_entries","_find","_stringify","_concat","_keys","_toConsumableArray2","_forEach","_map","_rolesMap","_context","elementRoleMap","call","key","role","get","_context2","_context3","baseConcepts","relatedConcepts","relation","module","concept","_context4","conceptStr","roles","_ref","_ref2","add","set","_default"],"mappings":"AAAA;;AAEA,IAAIA,sBAAsB,GAAGC,OAAO,CAAC,sDAAD,CAApC;;AAEA,IAAIC,sBAAsB,GAAGD,OAAO,CAAC,8DAAD,CAApC;;AAEAC,sBAAsB,CAACC,OAAD,EAAU,YAAV,EAAwB;AAC5CC,EAAAA,KAAK,EAAE;AADqC,CAAxB,CAAtB;;AAIAD,OAAO,CAACE,OAAR,GAAkB,KAAK,CAAvB;;AAEA,IAAIC,IAAI,GAAGN,sBAAsB,CAACC,OAAO,CAAC,2CAAD,CAAR,CAAjC;;AAEA,IAAIM,eAAe,GAAGP,sBAAsB,CAACC,OAAO,CAAC,8CAAD,CAAR,CAA5C;;AAEA,IAAIO,QAAQ,GAAGR,sBAAsB,CAACC,OAAO,CAAC,wDAAD,CAAR,CAArC;;AAEA,IAAIQ,KAAK,GAAGT,sBAAsB,CAACC,OAAO,CAAC,qDAAD,CAAR,CAAlC;;AAEA,IAAIS,UAAU,GAAGV,sBAAsB,CAACC,OAAO,C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,IAAIK,QAAQ,GAAGnB,cAAf;AACAf,OAAO,CAACE,OAAR,GAAkBgC,QAAlB","sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime-corejs3/helpers/interopRequireDefault\");\n\nvar _Object$defineProperty = require(\"@babel/runtime-corejs3/core-js-stable/object/define-property\");\n\n_Object$defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = void 0;\n\nvar _set = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/set\"));\n\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs3/helpers/slicedToArray\"));\n\nvar _entries = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/instance/entries\"));\n\nvar _find = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/instance/find\"));\n\nvar _stringify = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/json/stringify\"));\n\nvar _concat = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/instance/concat\"));\n\nvar _keys = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/instance/keys\"));\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime-corejs3/helpers/toConsumableArray\"));\n\nvar _forEach = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/instance/for-each\"));\n\nvar _map = _interopRequireDefault(require(\"@babel/runtime-corejs3/core-js-stable/map\"));\n\nvar _rolesMap = _interopRequireDefault(require(\"./rolesMap\"));\n\nvar _context;\n\nvar elementRoleMap = new _map.default([]);\n(0, _forEach.default)(_context = (0, _toConsumableArray2.default)((0, _keys.default)(_rolesMap.default).call(_rolesMap.default))).call(_context, function (key) {\n var role = _rolesMap.default.get(key);\n\n if (role) {\n var _context2, _context3;\n\n (0, _forEach.default)(_context2 = (0, _concat.default)(_context3 = []).call(_context3, (0, _toConsumableArray2.default)(role.baseConcepts), (0, _toConsumableArray2.default)(role.relatedConcepts))).call(_context2, function (relation) {\n if (relation.module === 'HTML') {\n var concept = relation.concept;\n\n if (concept) {\n var _context4;\n\n var conceptStr = (0, _stringify.default)(concept);\n var roles = ((0, _find.default)(_context4 = (0, _toConsumableArray2.default)((0, _entries.default)(elementRoleMap).call(elementRoleMap))).call(_context4, function (_ref) {\n var _ref2 = (0, _slicedToArray2.default)(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n\n return (0, _stringify.default)(key) === conceptStr;\n }) || [])[1];\n\n if (!roles) {\n roles = new _set.default([]);\n }\n\n roles.add(key);\n elementRoleMap.set(concept, roles);\n }\n }\n });\n }\n});\nvar _default = elementRoleMap;\nexports.default = _default;"]},"metadata":{},"sourceType":"script"}
|