UNPKG

@typecad/typecad

Version:

🤖programmatically 💥create 🛰️hardware

1 lines 1.95 kB
export var RoutingAlgorithm;function a25_0x5e7cba(_0x52685f,_0x22638b){return a25_0x433e(_0x22638b- -0x2ea,_0x52685f);}(function(_0x58e197){_0x58e197['AStar']='astar';}(RoutingAlgorithm||(RoutingAlgorithm={})));function a25_0x433e(_0x42e1e8,_0x433e13){var _0xa22797=a25_0x42e1();return a25_0x433e=function(_0x3bd1ab,_0x4655a4){_0x3bd1ab=_0x3bd1ab-0x0;var _0x4be39e=_0xa22797[_0x3bd1ab];return _0x4be39e;},a25_0x433e(_0x42e1e8,_0x433e13);}export class RouterRegistry{static['register'](_0x391c68,_0xe49e16,_0x544213){this['registrations']['set'](String(_0x391c68),{'factory':_0xe49e16,'configureGrid':_0x544213?.['configureGrid']});}static['unregister'](_0x2bf42a){function _0x4466b3(_0x1d3150,_0x497e84){return a25_0x433e(_0x1d3150-0x1e,_0x497e84);}this[_0x4466b3(0x1e,0x1f)][_0x4466b3(0x1f,0x1c)](String(_0x2bf42a));}static['has'](_0x44677a){return this['registrations']['has'](String(_0x44677a));}static['list'](){return Array['from'](this['registrations']['keys']());}static[a25_0x5e7cba(-0x2e7,-0x2e8)](_0x7842c6,_0x3b36cb,_0x57fe90){const _0x4dce42=this['registrations']['get'](String(_0x7842c6));function _0x38c943(_0x2a6da0,_0x3f48c5){return a25_0x433e(_0x2a6da0- -0x276,_0x3f48c5);}if(!_0x4dce42)throw new Error('Routing\x20algorithm\x20\x27'+_0x7842c6+_0x38c943(-0x273,-0x275));return _0x4dce42[_0x38c943(-0x272,-0x270)](_0x3b36cb,_0x57fe90);}static['createWithFreeVias'](_0x3a9622,_0xe8b844,_0x4fa098){return this['create'](_0x3a9622,_0xe8b844,_0x4fa098);}static['getGridConfigurator'](_0x35bca4){return this['registrations']['get'](String(_0x35bca4))?.['configureGrid'];}}RouterRegistry['registrations']=new Map();function a25_0x42e1(){var _0x2340d7=['registrations','delete','create','\x27\x20is\x20not\x20registered.\x20Install\x20a\x20router\x20plugin\x20(e.g.,\x20\x27@typecad/@typecad-astar\x27)\x20and\x20ensure\x20it\x20calls\x20RouterRegistry.register().','factory'];a25_0x42e1=function(){return _0x2340d7;};return a25_0x42e1();}