{"ast":null,"code":"'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\nvar _collections = require('../collections');\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* eslint-disable local/ban-types-eventually */\nconst SPACE = ' ';\nconst OBJECT_NAMES = ['DOMStringMap', 'NamedNodeMap'];\nconst ARRAY_REGEXP = /^(HTML\\w*Collection|NodeList)$/;\nconst testName = name => OBJECT_NAMES.indexOf(name) !== -1 || ARRAY_REGEXP.test(name);\nconst test = val => val && val.constructor && !!val.constructor.name && testName(val.constructor.name);\nexports.test = test;\nconst isNamedNodeMap = collection => collection.constructor.name === 'NamedNodeMap';\nconst serialize = (collection, config, indentation, depth, refs, printer) => {\n const name = collection.constructor.name;\n if (++depth > config.maxDepth) {\n return '[' + name + ']';\n }\n return (config.min ? '' : name + SPACE) + (OBJECT_NAMES.indexOf(name) !== -1 ? '{' + (0, _collections.printObjectProperties)(isNamedNodeMap(collection) ? Array.from(collection).reduce((props, attribute) => {\n props[attribute.name] = attribute.value;\n return props;\n }, {}) : {\n ...collection\n }, config, indentation, depth, refs, printer) + '}' : '[' + (0, _collections.printListItems)(Array.from(collection), config, indentation, depth, refs, printer) + ']');\n};\nexports.serialize = serialize;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;","map":{"version":3,"names":["Object","defineProperty","exports","value","test","serialize","default","_collections","require","SPACE","OBJECT_NAMES","ARRAY_REGEXP","testName","name","indexOf","val","constructor","isNamedNodeMap","collection","config","indentation","depth","refs","printer","maxDepth","min","printObjectProperties","Array","from","reduce","props","attribute","printListItems","plugin","_default"],"sources":["/Users/max_liu/max_liu/company/tools_auto_pt/node_modules/pretty-format/build/plugins/DOMCollection.js"],"sourcesContent":["'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar _collections = require('../collections');\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* eslint-disable local/ban-types-eventually */\nconst SPACE = ' ';\nconst OBJECT_NAMES = ['DOMStringMap', 'NamedNodeMap'];\nconst ARRAY_REGEXP = /^(HTML\\w*Collection|NodeList)$/;\n\nconst testName = name =>\n OBJECT_NAMES.indexOf(name) !== -1 || ARRAY_REGEXP.test(name);\n\nconst test = val =>\n val &&\n val.constructor &&\n !!val.constructor.name &&\n testName(val.constructor.name);\n\nexports.test = test;\n\nconst isNamedNodeMap = collection =>\n collection.constructor.name === 'NamedNodeMap';\n\nconst serialize = (collection, config, indentation, depth, refs, printer) => {\n const name = collection.constructor.name;\n\n if (++depth > config.maxDepth) {\n return '[' + name + ']';\n }\n\n return (\n (config.min ? '' : name + SPACE) +\n (OBJECT_NAMES.indexOf(name) !== -1\n ? '{' +\n (0, _collections.printObjectProperties)(\n isNamedNodeMap(collection)\n ? Array.from(collection).reduce((props, attribute) => {\n props[attribute.name] = attribute.value;\n return props;\n }, {})\n : {...collection},\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}'\n : '[' +\n (0, _collections.printListItems)(\n Array.from(collection),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']')\n );\n};\n\nexports.serialize = serialize;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n"],"mappings":"AAAA,YAAY;;AAEZA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAC3CC,KAAK,EAAE;AACT,CAAC,CAAC;AACFD,OAAO,CAACE,IAAI,GAAGF,OAAO,CAACG,SAAS,GAAGH,OAAO,CAACI,OAAO,GAAG,KAAK,CAAC;AAE3D,IAAIC,YAAY,GAAGC,OAAO,CAAC,gBAAgB,CAAC;;AAE5C;AACA;AACA;AACA;AACA;AACA;;AA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