Server IP : 150.95.80.236 / Your IP : 18.191.162.21 Web Server : Apache System : Linux host-150-95-80-236 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : social-telecare ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/pcu.in.th/api-uat.pcu.in.th/node_modules/@babel/traverse/lib/ |
Upload File : |
{"version":3,"names":["pathsCache","exports","path","WeakMap","scope","clear","clearPath","clearScope","nullHub","Object","freeze","getCachedPaths","hub","parent","_pathsCache$get","_hub","get","getOrCreateCachedPaths","_hub2","_hub3","parents","set","paths","Map"],"sources":["../src/cache.ts"],"sourcesContent":["import type { Node } from \"@babel/types\";\nimport type NodePath from \"./path/index.ts\";\nimport type Scope from \"./scope/index.ts\";\nimport type { HubInterface } from \"./hub.ts\";\n\nlet pathsCache: WeakMap<\n HubInterface | typeof nullHub,\n WeakMap<Node, Map<Node, NodePath>>\n> = new WeakMap();\nexport { pathsCache as path };\nexport let scope: WeakMap<Node, Scope> = new WeakMap();\n\nexport function clear() {\n clearPath();\n clearScope();\n}\n\nexport function clearPath() {\n pathsCache = new WeakMap();\n}\n\nexport function clearScope() {\n scope = new WeakMap();\n}\n\n// NodePath#hub can be null, but it's not a valid weakmap key because it\n// cannot be collected by GC. Use an object, knowing tht it will not be\n// collected anyway. It's not a memory leak because pathsCache.get(nullHub)\n// is itself a weakmap, so its entries can still be collected.\nconst nullHub = Object.freeze({} as const);\n\nexport function getCachedPaths(hub: HubInterface | null, parent: Node) {\n if (!process.env.BABEL_8_BREAKING) {\n // Only use Hub as part of the cache key in Babel 8, because it is a\n // breaking change (it causes incompatibilities with older `@babel/core`\n // versions: see https://github.com/babel/babel/pull/15759)\n hub = null;\n }\n return pathsCache.get(hub ?? nullHub)?.get(parent);\n}\n\nexport function getOrCreateCachedPaths(hub: HubInterface | null, parent: Node) {\n if (!process.env.BABEL_8_BREAKING) {\n hub = null;\n }\n\n let parents = pathsCache.get(hub ?? nullHub);\n if (!parents) pathsCache.set(hub ?? nullHub, (parents = new WeakMap()));\n\n let paths = parents.get(parent);\n if (!paths) parents.set(parent, (paths = new Map()));\n\n return paths;\n}\n"],"mappings":";;;;;;;;;;;AAKA,IAAIA,UAGH,GAAAC,OAAA,CAAAC,IAAA,GAAG,IAAIC,OAAO,CAAC,CAAC;AAEV,IAAIC,KAA2B,GAAAH,OAAA,CAAAG,KAAA,GAAG,IAAID,OAAO,CAAC,CAAC;AAE/C,SAASE,KAAKA,CAAA,EAAG;EACtBC,SAAS,CAAC,CAAC;EACXC,UAAU,CAAC,CAAC;AACd;AAEO,SAASD,SAASA,CAAA,EAAG;EAC1BL,OAAA,CAAAC,IAAA,GAAAF,UAAU,GAAG,IAAIG,OAAO,CAAC,CAAC;AAC5B;AAEO,SAASI,UAAUA,CAAA,EAAG;EAC3BN,OAAA,CAAAG,KAAA,GAAAA,KAAK,GAAG,IAAID,OAAO,CAAC,CAAC;AACvB;AAMA,MAAMK,OAAO,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAU,CAAC;AAEnC,SAASC,cAAcA,CAACC,GAAwB,EAAEC,MAAY,EAAE;EAAA,IAAAC,eAAA,EAAAC,IAAA;EAClC;IAIjCH,GAAG,GAAG,IAAI;EACZ;EACA,QAAAE,eAAA,GAAOd,UAAU,CAACgB,GAAG,EAAAD,IAAA,GAACH,GAAG,YAAAG,IAAA,GAAIP,OAAO,CAAC,qBAA9BM,eAAA,CAAgCE,GAAG,CAACH,MAAM,CAAC;AACpD;AAEO,SAASI,sBAAsBA,CAACL,GAAwB,EAAEC,MAAY,EAAE;EAAA,IAAAK,KAAA,EAAAC,KAAA;EAC1C;IACjCP,GAAG,GAAG,IAAI;EACZ;EAEA,IAAIQ,OAAO,GAAGpB,UAAU,CAACgB,GAAG,EAAAE,KAAA,GAACN,GAAG,YAAAM,KAAA,GAAIV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