{"version":3,"file":"651.0e281cf29b101b30e623.js","mappings":"mJAGO,MAAMA,EACXC,KAAO,UAEPC,YAAYC,GACVC,KAAKD,QAAUA,EACfC,KAAKC,KAAOF,EAAQG,SAASC,cAC7BH,KAAKI,SAAWC,QAAO,OAAeN,GACxC,CAEAO,SACE,OAAON,KAAKD,QAAQQ,uBACtB,CAEAC,aACE,OAAOR,KAAKD,OACd,CAEAU,cAEE,OADiBC,MAAMC,KAAKX,KAAKD,QAAQa,UACzBC,KAAIC,GACdA,aAAiBC,YAEZ,IAAIf,KAAKF,YAAYgB,GAErB,OAERE,OAAO,IACZ,CAEAC,YACE,OAAIjB,KAAKD,QAAQmB,cAER,IAAIlB,KAAKF,YAAYE,KAAKD,QAAQmB,eAElC,IAEX,CAEAC,YACE,MAAM,IAAIC,MAAM,0BAClB,CAEAC,eACE,MAAM,IAAID,MAAM,0BAClB,E","sources":["webpack:///../node_modules/@locator/runtime/dist/adapters/HtmlElementTreeNode.js"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport { getReferenceId } from \"../functions/getReferenceId\";\nimport nonNullable from \"../functions/nonNullable\";\nexport class HtmlElementTreeNode {\n type = \"element\";\n\n constructor(element) {\n this.element = element;\n this.name = element.nodeName.toLowerCase();\n this.uniqueId = String(getReferenceId(element));\n }\n\n getBox() {\n return this.element.getBoundingClientRect();\n }\n\n getElement() {\n return this.element;\n }\n\n getChildren() {\n const children = Array.from(this.element.children);\n return children.map(child => {\n if (child instanceof HTMLElement) {\n // @ts-ignore\n return new this.constructor(child);\n } else {\n return null;\n }\n }).filter(nonNullable);\n }\n\n getParent() {\n if (this.element.parentElement) {\n // @ts-ignore\n return new this.constructor(this.element.parentElement);\n } else {\n return null;\n }\n }\n\n getSource() {\n throw new Error(\"Method not implemented.\");\n }\n\n getComponent() {\n throw new Error(\"Method not implemented.\");\n }\n\n}"],"names":["HtmlElementTreeNode","type","constructor","element","this","name","nodeName","toLowerCase","uniqueId","String","getBox","getBoundingClientRect","getElement","getChildren","Array","from","children","map","child","HTMLElement","filter","getParent","parentElement","getSource","Error","getComponent"],"sourceRoot":""}