System.register(["./utils-lib-legacy.js?v=1761009159","./base-lib-legacy.js?v=1761009159"],function(a,e){"use strict";var c,t;return{setters:[function(a){c=a.ay},function(a){t=a.r}],execute:function(){a("u",function(a){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t(null),l={},s=function(a,e){try{var c=JSON.parse(e.data),t=c.callback||c.ws_callback||c.def_name;t&&l[t]&&l[t].callback(a,e)}catch(n){}},u=function(a,e){var c;l[a.ws_callback]&&(l[a.ws_callback]=void 0),l[a.ws_callback]={data:a,callback:e,request:!0},null===(c=n.value)||void 0===c||c.send(a)};return n.value=c({route:a,onMessage:s,autoReconnect:e}),{socketRequest:function(a){var e=a.params,c=a.onMessage,t=void 0!==c&&c;return t?u(e,function(a,e){var c=JSON.parse(e.data);t(c)}):new Promise(function(a){u(e,function(c,t){var n=JSON.parse(t.data),s=n.callback||n.ws_callback||n.def_name;delete l[s],e.ws_callback===s&&a(n)})})},socketDestroy:function(){n.value&&n.value.close(),l={}}}})}}});
