PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` {"version":3,"names":["VISITOR_KEYS","traverseNode","node","opts","scope","state","path","skipKeys","keys","type","context","TraversalContext","key","visit"],"sources":["../src/traverse-node.ts"],"sourcesContent":["import TraversalContext from \"./context\";\nimport type { TraverseOptions } from \"./index\";\nimport type NodePath from \"./path\";\nimport type Scope from \"./scope\";\nimport type * as t from \"@babel/types\";\nimport { VISITOR_KEYS } from \"@babel/types\";\n\n/**\n * Traverse the children of given node\n * @param {Node} node\n * @param {TraverseOptions} opts The traverse options used to create a new traversal context\n * @param {scope} scope A traversal scope used to create a new traversal context. When opts.noScope is true, scope should not be provided\n * @param {any} state A user data storage provided as the second callback argument for traversal visitors\n * @param {NodePath} path A NodePath of given node\n * @param {Record} skipKeys A map from key names to whether that should be skipped during traversal. The skipKeys are applied to every descendants\n * @returns {boolean} Whether the traversal stops early\n\n * @note This function does not visit the given `node`.\n */\nexport function traverseNode(\n node: t.Node,\n opts: TraverseOptions,\n scope?: Scope,\n state?: any,\n path?: NodePath,\n skipKeys?: Record,\n): boolean {\n const keys = VISITOR_KEYS[node.type];\n if (!keys) return false;\n\n const context = new TraversalContext(scope, opts, state, path);\n for (const key of keys) {\n if (skipKeys && skipKeys[key]) continue;\n if (context.visit(node, key)) {\n return true;\n }\n }\n\n return false;\n}\n"],"mappings":";;;;;;;AAAA;;AAKA;;;EAASA;;;AAcF,SAASC,YAAT,CACLC,IADK,EAELC,IAFK,EAGLC,KAHK,EAILC,KAJK,EAKLC,IALK,EAMLC,QANK,EAOI;EACT,MAAMC,IAAI,GAAGR,YAAY,CAACE,IAAI,CAACO,IAAN,CAAzB;EACA,IAAI,CAACD,IAAL,EAAW,OAAO,KAAP;EAEX,MAAME,OAAO,GAAG,IAAIC,gBAAJ,CAAqBP,KAArB,EAA4BD,IAA5B,EAAkCE,KAAlC,EAAyCC,IAAzC,CAAhB;;EACA,KAAK,MAAMM,GAAX,IAAkBJ,IAAlB,EAAwB;IACtB,IAAID,QAAQ,IAAIA,QAAQ,CAACK,GAAD,CAAxB,EAA+B;;IAC/B,IAAIF,OAAO,CAACG,KAAR,CAAcX,IAAd,EAAoBU,GAApB,CAAJ,EAA8B;MAC5B,OAAO,IAAP;IACD;EACF;;EAED,OAAO,KAAP;AACD"}