@stomp/stompjs 5.0.0-beta.4 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +8 -8
  2. package/bundles/stomp.umd.js +310 -65
  3. package/bundles/stomp.umd.js.map +1 -1
  4. package/bundles/stomp.umd.min.js +1 -1
  5. package/bundles/stomp.umd.min.js.map +1 -1
  6. package/esm5/byte.d.ts +3 -1
  7. package/esm5/byte.js +3 -1
  8. package/esm5/byte.js.map +1 -1
  9. package/esm5/client.d.ts +12 -9
  10. package/esm5/client.js +25 -7
  11. package/esm5/client.js.map +1 -1
  12. package/esm5/compatibility/compat-client.d.ts +5 -3
  13. package/esm5/compatibility/compat-client.js +11 -34
  14. package/esm5/compatibility/compat-client.js.map +1 -1
  15. package/esm5/compatibility/heartbeat-info.d.ts +12 -0
  16. package/esm5/compatibility/heartbeat-info.js +35 -0
  17. package/esm5/compatibility/heartbeat-info.js.map +1 -0
  18. package/esm5/compatibility/stomp.d.ts +25 -2
  19. package/esm5/compatibility/stomp.js +29 -5
  20. package/esm5/compatibility/stomp.js.map +1 -1
  21. package/esm5/frame.d.ts +10 -3
  22. package/esm5/frame.js +9 -5
  23. package/esm5/frame.js.map +1 -1
  24. package/esm5/index.js +5 -0
  25. package/esm5/index.js.map +1 -1
  26. package/esm5/message.d.ts +7 -5
  27. package/esm5/message.js +29 -0
  28. package/esm5/message.js.map +1 -1
  29. package/esm5/parser.d.ts +5 -3
  30. package/esm5/parser.js +6 -3
  31. package/esm5/parser.js.map +1 -1
  32. package/esm5/stomp-config.d.ts +6 -4
  33. package/esm5/stomp-config.js +13 -0
  34. package/esm5/stomp-config.js.map +1 -1
  35. package/esm5/stomp-handler.d.ts +9 -7
  36. package/esm5/stomp-handler.js +43 -36
  37. package/esm5/stomp-handler.js.map +1 -1
  38. package/esm5/stomp-headers.d.ts +3 -1
  39. package/esm5/stomp-headers.js +15 -0
  40. package/esm5/stomp-headers.js.map +1 -1
  41. package/esm5/stomp-subscription.d.ts +6 -4
  42. package/esm5/stomp-subscription.js +11 -0
  43. package/esm5/stomp-subscription.js.map +1 -1
  44. package/esm5/transaction.d.ts +3 -1
  45. package/esm5/transaction.js +13 -0
  46. package/esm5/transaction.js.map +1 -1
  47. package/esm5/types.d.ts +38 -14
  48. package/esm5/versions.d.ts +11 -3
  49. package/esm5/versions.js +11 -3
  50. package/esm5/versions.js.map +1 -1
  51. package/esm6/byte.d.ts +3 -1
  52. package/esm6/byte.js +3 -1
  53. package/esm6/byte.js.map +1 -1
  54. package/esm6/client.d.ts +12 -9
  55. package/esm6/client.js +27 -9
  56. package/esm6/client.js.map +1 -1
  57. package/esm6/compatibility/compat-client.d.ts +5 -3
  58. package/esm6/compatibility/compat-client.js +11 -34
  59. package/esm6/compatibility/compat-client.js.map +1 -1
  60. package/esm6/compatibility/heartbeat-info.d.ts +12 -0
  61. package/esm6/compatibility/heartbeat-info.js +33 -0
  62. package/esm6/compatibility/heartbeat-info.js.map +1 -0
  63. package/esm6/compatibility/stomp.d.ts +25 -2
  64. package/esm6/compatibility/stomp.js +31 -7
  65. package/esm6/compatibility/stomp.js.map +1 -1
  66. package/esm6/frame.d.ts +10 -3
  67. package/esm6/frame.js +10 -6
  68. package/esm6/frame.js.map +1 -1
  69. package/esm6/index.js +5 -0
  70. package/esm6/index.js.map +1 -1
  71. package/esm6/message.d.ts +7 -5
  72. package/esm6/message.js +29 -0
  73. package/esm6/message.js.map +1 -1
  74. package/esm6/parser.d.ts +5 -3
  75. package/esm6/parser.js +6 -3
  76. package/esm6/parser.js.map +1 -1
  77. package/esm6/stomp-config.d.ts +6 -4
  78. package/esm6/stomp-config.js +13 -0
  79. package/esm6/stomp-config.js.map +1 -1
  80. package/esm6/stomp-handler.d.ts +9 -7
  81. package/esm6/stomp-handler.js +46 -39
  82. package/esm6/stomp-handler.js.map +1 -1
  83. package/esm6/stomp-headers.d.ts +3 -1
  84. package/esm6/stomp-headers.js +15 -0
  85. package/esm6/stomp-headers.js.map +1 -1
  86. package/esm6/stomp-subscription.d.ts +6 -4
  87. package/esm6/stomp-subscription.js +11 -0
  88. package/esm6/stomp-subscription.js.map +1 -1
  89. package/esm6/transaction.d.ts +3 -1
  90. package/esm6/transaction.js +13 -0
  91. package/esm6/transaction.js.map +1 -1
  92. package/esm6/types.d.ts +38 -14
  93. package/esm6/versions.d.ts +11 -3
  94. package/esm6/versions.js +11 -3
  95. package/esm6/versions.js.map +1 -1
  96. package/package.json +4 -5
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://StompJs/webpack/universalModuleDefinition","webpack://StompJs/webpack/bootstrap","webpack://StompJs/./src/byte.ts","webpack://StompJs/./src/client.ts","webpack://StompJs/./src/compatibility/compat-client.ts","webpack://StompJs/./src/compatibility/stomp.ts","webpack://StompJs/./src/frame.ts","webpack://StompJs/./src/index.ts","webpack://StompJs/./src/parser.ts","webpack://StompJs/./src/stomp-handler.ts","webpack://StompJs/./src/versions.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;;;ACl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K,mBAAQ,CAAC,IAAI,EAAE;YAC5C,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;SAC3B;aAAM;YACL,OAAO,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;SACnC;QACD,OAAO,CAAC,YAAY,GAAG,cAAc,CAAC;QACtC,OAAO,IAAI,CAAC,SAAS,CAAC,EAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAC,CAAC,CAAC;IAC7D,CAAC;IAEH,mBAAC;AAAD,CAAC;AA5WY,oCAAY;;;;;;;;;;;;;;;ACjBzB;;GAEG;AACH;IAmBE;;;;;OAKG;IACH,kBAAoB,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IACtC,CAAC;IAEM,oCAAiB,GAAxB;QACE,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IAEM,mCAAgB,GAAvB;QACE,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAC,IAAI,aAAI,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,WAAQ,EAA9B,CAA8B,CAAC,CAAC;IAChE,CAAC;IAjCD;;OAEG;IACI,aAAI,GAAE,KAAK,CAAC;IACnB;;OAEG;IACI,aAAI,GAAE,KAAK,CAAC;IACnB;;OAEG;IACI,aAAI,GAAE,KAAK,CAAC;IAEnB;;OAEG;IACI,gBAAO,GAAG,IAAI,QAAQ,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAkB/E,eAAC;CAAA;AAnCY,4BAAQ","file":"stomp.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"StompJs\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"StompJs\"] = factory();\n\telse\n\t\troot[\"StompJs\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/**\n * Some byte values, used as per STOMP specifications.\n *\n * @internal\n */\nexport const Byte = {\n // LINEFEED byte (octet 10)\n LF: '\\x0A',\n // NULL byte (octet 0)\n NULL: '\\x00'\n};\n","import {StompHeaders} from \"./stomp-headers\";\nimport {StompSubscription} from \"./stomp-subscription\";\nimport {Transaction} from \"./transaction\";\nimport {\n closeEventCallbackType,\n debugFnType,\n frameCallbackType,\n messageCallbackType,\n messageCheckCallbackType,\n publishParams\n} from \"./types\";\nimport {StompConfig} from './stomp-config';\nimport {StompHandler} from \"./stomp-handler\";\nimport {Versions} from \"./versions\";\n\n/**\n * STOMP Client Class.\n */\nexport class Client {\n /**\n * The URL for the STOMP broker to connect to.\n * Typically like `\"ws://broker.329broker.com:15674/ws\"` or `\"wss://broker.329broker.com:15674/ws\"`.\n *\n * Only one of this or [Client#webSocketFactory]{@link Client#webSocketFactory} need to be set.\n * If both are set, [Client#webSocketFactory]{@link Client#webSocketFactory} will be used.\n */\n public brokerURL: string;\n\n /**\n * STOMP versions to attempt during STOMP handshake. By default versions `1.0`, `1.1`, and `1.2` are attempted.\n *\n * Example:\n * ```javascript\n * // Try only versions 1.0 and 1.1\n * client.stompVersions = new Versions(['1.0', '1.1'])\n * ```\n */\n public stompVersions = Versions.default;\n\n /**\n * This function should return a WebSocket or a similar (e.g. SockJS) object.\n * If your STOMP Broker supports WebSockets, prefer setting [Client#brokerURL]{@link Client#brokerURL}.\n *\n * If both this and [Client#brokerURL]{@link Client#brokerURL} are set, this will be used.\n *\n * Example:\n * ```javascript\n * // use a WebSocket\n * client.webSocketFactory= function () {\n * return new WebSocket(\"wss://broker.329broker.com:15674/ws\");\n * };\n *\n * // Typical usage with SockJS\n * client.webSocketFactory= function () {\n * return new SockJS(\"http://broker.329broker.com/stomp\");\n * };\n * ```\n */\n public webSocketFactory: () => WebSocket;\n\n /**\n * automatically reconnect with delay in milliseconds, set to 0 to disable.\n */\n public reconnectDelay: number = 5000;\n\n /**\n * Incoming heartbeat interval in milliseconds. Set to 0 to disable.\n */\n public heartbeatIncoming: number = 10000;\n\n /**\n * Outgoing heartbeat interval in milliseconds. Set to 0 to disable.\n */\n public heartbeatOutgoing: number = 10000;\n\n /**\n * Underlying WebSocket instance, READONLY.\n */\n get webSocket(): WebSocket {\n return this._webSocket;\n }\n /**\n * Underlying WebSocket instance\n * @internal\n */\n protected _webSocket: WebSocket;\n\n /**\n * Connection headers, important keys - `login`, `passcode`, `host`.\n * Though STOMP 1.2 standard marks these keys to be present, check your broker documentation for\n * details specific to your broker.\n */\n public connectHeaders: StompHeaders;\n\n /**\n * Disconnection headers.\n */\n public disconnectHeaders: StompHeaders;\n\n /**\n * This function will be called for any unhandled messages.\n * It is useful for receiving messages sent to RabbitMQ temporary queues.\n *\n * It can also get invoked with stray messages while the server is processing\n * a request to [Client#unsubscribe]{@link Client#unsubscribe}\n * from an endpoint.\n *\n * The actual {@link Message} will be passed as parameter to the callback.\n */\n public onUnhandledMessage: messageCallbackType;\n\n /**\n * STOMP brokers can be requested to notify when an operation is actually completed.\n * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}. See\n * [Client#watchForReceipt]{@link Client#watchForReceipt} for examples.\n *\n * The actual {@link Frame} will be passed as parameter to the callback.\n */\n public onUnhandledReceipt: frameCallbackType;\n\n /**\n * Will be invoked if {@link Frame} of unknown type is received from the STOMP broker.\n *\n * The actual {@link Frame} will be passed as parameter to the callback.\n */\n public onUnhandledFrame: frameCallbackType;\n\n /**\n * `true` if there is a active connection with STOMP Broker\n */\n get connected(): boolean {\n return (!!this._stompHandler) && this._stompHandler.connected;\n }\n\n /**\n * Callback, invoked on before a connection connection to the STOMP broker.\n *\n * You can change options on the client, which will impact the immediate connect.\n * It is valid to call [Client#decativate]{@link Client#deactivate} in this callback.\n */\n public beforeConnect: () => void;\n\n /**\n * Callback, invoked on every successful connection to the STOMP broker.\n *\n * The actual {@link Frame} will be passed as parameter to the callback.\n * Sometimes clients will like to use headers from this frame.\n */\n public onConnect: frameCallbackType;\n\n /**\n * Callback, invoked on every successful disconnection from the STOMP broker. It will not be invoked if\n * the STOMP broker disconnected due to an error.\n *\n * The actual Receipt {@link Frame} acknowledging the DISCONNECT will be passed as parameter to the callback.\n *\n * The way STOMP protocol is designed, the connection may close/terminate without the client\n * receiving the Receipt {@link Frame} acknowledging the DISCONNECT.\n * You might find [Client#onWebSocketClose]{@link Client#onWebSocketClose} more appropriate to watch\n * STOMP broker disconnects.\n */\n public onDisconnect: frameCallbackType;\n\n /**\n * Callback, invoked on an ERROR frame received from the STOMP Broker.\n * A compliant STOMP Broker will close the connection after this type of frame.\n * Please check broker specific documentation for exact behavior.\n *\n * The actual {@link Frame} will be passed as parameter to the callback.\n */\n public onStompError: frameCallbackType;\n\n /**\n * Callback, invoked when underlying WebSocket is closed.\n *\n * Actual [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}\n * is passed as parameter to the callback.\n */\n public onWebSocketClose: closeEventCallbackType;\n\n /**\n * By default, debug messages are discarded. To log to `console` following can be used:\n *\n * ```javascript\n * client.debug = function(str) {\n * console.log(str);\n * };\n * ```\n *\n * Currently this method does not support levels of log. Be aware that the output can be quite verbose\n * and may contain sensitive information (like passwords, tokens etc.).\n */\n public debug: debugFnType;\n\n /**\n * version of STOMP protocol negotiated with the server, READONLY\n */\n get connectedVersion(): string {\n return this._stompHandler ? this._stompHandler.connectedVersion : undefined;\n }\n\n private _stompHandler: StompHandler;\n\n /**\n * if the client is active (connected or going to reconnect)\n */\n get active(): boolean {\n return this._active;\n }\n private _active: boolean = false;\n private _reconnector: any;\n\n /**\n * Create an instance.\n */\n constructor(conf: StompConfig = {}) {\n // Dummy callbacks\n const noOp = () => {};\n this.debug = noOp;\n this.beforeConnect = noOp;\n this.onConnect = noOp;\n this.onDisconnect = noOp;\n this.onUnhandledMessage = noOp;\n this.onUnhandledReceipt = noOp;\n this.onUnhandledFrame = noOp;\n this.onStompError = noOp;\n this.onWebSocketClose = noOp;\n\n // These parameters would typically get proper values before connect is called\n this.connectHeaders = {};\n this.disconnectHeaders = {};\n\n // Apply configuration\n this.configure(conf);\n }\n\n /**\n * Update configuration.\n */\n public configure(conf: StompConfig): void {\n // bulk assign all properties to this\n (<any>Object).assign(this, conf);\n }\n\n /**\n * Initiate the connection with the broker.\n * If the connection breaks, as per [Client#reconnectDelay]{@link Client#reconnectDelay},\n * it will keep trying to reconnect.\n *\n * Call [Client#deactivate]{@link Client#deactivate} to disconnect and stop reconnection attempts.\n */\n public activate(): void {\n this._active = true;\n\n this._connect();\n }\n\n private _connect(): void {\n if (this.connected) {\n this.debug('STOMP: already connected, nothing to do');\n return;\n }\n\n this.beforeConnect();\n\n if (!this._active) {\n this.debug('Client has been marked inactive, will not attempt to connect');\n return;\n }\n\n this.debug(\"Opening Web Socket...\");\n\n // Get the actual WebSocket (or a similar object)\n this._webSocket = this._createWebSocket();\n\n this._stompHandler = new StompHandler(this, this._webSocket, {\n debug: this.debug,\n stompVersions: this.stompVersions,\n connectHeaders: this.connectHeaders,\n disconnectHeaders: this.disconnectHeaders,\n heartbeatIncoming: this.heartbeatIncoming,\n heartbeatOutgoing: this.heartbeatOutgoing,\n onConnect: (frame) => {\n if (!this._active) {\n this.debug('STOMP got connected while deactivate was issued, will disconnect now');\n this._disposeStompHandler();\n return;\n }\n this.onConnect(frame);\n },\n onDisconnect: (frame) => {\n this.onDisconnect(frame);\n },\n onStompError: (frame) => {\n this.onStompError(frame);\n },\n onWebSocketClose: (evt) => {\n this.onWebSocketClose(evt);\n // The callback is called before attempting to reconnect, this would allow the client\n // to be `deactivated` in the callback.\n if (this._active) {\n this._schedule_reconnect();\n }\n },\n onUnhandledMessage: (message) => {\n this.onUnhandledMessage(message);\n },\n onUnhandledReceipt: (frame) => {\n this.onUnhandledReceipt(frame);\n },\n onUnhandledFrame: (frame) => {\n this.onUnhandledFrame(frame);\n }\n });\n\n this._stompHandler.start();\n }\n\n private _createWebSocket() {\n let webSocket: WebSocket;\n\n if (this.webSocketFactory) {\n webSocket = this.webSocketFactory();\n } else {\n webSocket = new WebSocket(this.brokerURL, this.stompVersions.protocolVersions());\n }\n webSocket.binaryType = \"arraybuffer\";\n return webSocket;\n }\n\n private _schedule_reconnect(): void {\n if (this.reconnectDelay > 0) {\n this.debug(`STOMP: scheduling reconnection in ${this.reconnectDelay}ms`);\n\n this._reconnector = setTimeout(() => {\n this._connect();\n }, this.reconnectDelay);\n }\n }\n\n /**\n * Disconnect if connected and stop auto reconnect loop.\n * Appropriate callbacks will be invoked if underlying STOMP connection was connected.\n *\n * To reactivate the {@link Client} you can call [Client#activate]{@link Client#activate}.\n */\n public deactivate(): void {\n // indicate that auto reconnect loop should terminate\n this._active = false;\n\n // Clear if a reconnection was scheduled\n if (this._reconnector) {\n clearTimeout(this._reconnector);\n }\n this._disposeStompHandler();\n }\n\n /**\n * Force disconnect if there is an active connection by directly closing the underlying WebSocket.\n * This is different than a normal disconnect where a DISCONNECT sequence is carried out with the broker.\n * After forcing disconnect, automatic reconnect will be attempted.\n * To stop further reconnects call [Client#deactivate]{@link Client#deactivate} as well.\n */\n public forceDisconnect() {\n if (this._webSocket) {\n if (this._webSocket.readyState === WebSocket.CONNECTING || this._webSocket.readyState === WebSocket.OPEN) {\n this._webSocket.close();\n }\n }\n }\n\n private _disposeStompHandler() {\n // Dispose STOMP Handler\n if (this._stompHandler) {\n this._stompHandler.dispose();\n this._stompHandler = null;\n }\n }\n\n /**\n * Send a message to a named destination. Refer to your STOMP broker documentation for types\n * and naming of destinations.\n *\n * STOMP protocol specifies and suggests some headers and also allows broker specific headers.\n *\n * Body must be String.\n * You will need to covert the payload to string in case it is not string (e.g. JSON).\n *\n * To send a binary message body use binaryBody parameter. It should be a\n * [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).\n * Sometimes brokers may not support binary frames out of the box.\n * Please check your broker documentation.\n *\n * `content-length` header is automatically added to the STOMP Frame sent to the broker.\n * Set `skipContentLengthHeader` to indicate that `content-length` header should not be added.\n * For binary messages `content-length` header is always added.\n *\n * Caution: The broker will, most likely, report an error and disconnect if message body has NULL octet(s)\n * and `content-length` header is missing.\n *\n * ```javascript\n * client.publish({destination: \"/queue/test\", headers: {priority: 9}, body: \"Hello, STOMP\"});\n *\n * // Only destination is mandatory parameter\n * client.publish({destination: \"/queue/test\", body: \"Hello, STOMP\"});\n *\n * // Skip content-length header in the frame to the broker\n * client.publish({\"/queue/test\", body: \"Hello, STOMP\", skipContentLengthHeader: true});\n *\n * var binaryData = generateBinaryData(); // This need to be of type Uint8Array\n * // setting content-type header is not mandatory, however a good practice\n * client.publish({destination: '/topic/special', binaryBody: binaryData,\n * headers: {'content-type': 'application/octet-stream'}});\n * ```\n */\n public publish(params: publishParams) {\n this._stompHandler.publish(params);\n }\n\n /**\n * STOMP brokers may carry out operation asynchronously and allow requesting for acknowledgement.\n * To request an acknowledgement, a `receipt` header needs to be sent with the actual request.\n * The value (say receipt-id) for this header needs to be unique for each use. Typically a sequence, a UUID, a\n * random number or a combination may be used.\n *\n * A complaint broker will send a RECEIPT frame when an operation has actually been completed.\n * The operation needs to be matched based in the value of the receipt-id.\n *\n * This method allow watching for a receipt and invoke the callback\n * when corresponding receipt has been received.\n *\n * The actual {@link Frame} will be passed as parameter to the callback.\n *\n * Example:\n * ```javascript\n * // Subscribing with acknowledgement\n * let receiptId = randomText();\n *\n * client.watchForReceipt(receiptId, function() {\n * // Will be called after server acknowledges\n * });\n *\n * client.subscribe(TEST.destination, onMessage, {receipt: receiptId});\n *\n *\n * // Publishing with acknowledgement\n * receiptId = randomText();\n *\n * client.watchForReceipt(receiptId, function() {\n * // Will be called after server acknowledges\n * });\n * client.publish({destination: TEST.destination, headers: {receipt: receiptId}, body: msg});\n * ```\n */\n public watchForReceipt(receiptId: string, callback: frameCallbackType): void {\n this._stompHandler.watchForReceipt(receiptId, callback);\n }\n\n /**\n * Subscribe to a STOMP Broker location. The callbck will be invoked for each received message with\n * the {@link Message} as argument.\n *\n * Note: The library will generate an unique ID if there is none provided in the headers.\n * To use your own ID, pass it using the headers argument.\n *\n * ```javascript\n * callback = function(message) {\n * // called when the client receives a STOMP message from the server\n * if (message.body) {\n * alert(\"got message with body \" + message.body)\n * } else {\n * alert(\"got empty message\");\n * }\n * });\n *\n * var subscription = client.subscribe(\"/queue/test\", callback);\n *\n * // Explicit subscription id\n * var mySubId = 'my-subscription-id-001';\n * var subscription = client.subscribe(destination, callback, { id: mySubId });\n * ```\n */\n public subscribe(destination: string, callback: messageCallbackType, headers: StompHeaders = {}): StompSubscription {\n return this._stompHandler.subscribe(destination, callback, headers);\n }\n\n /**\n * It is preferable to unsubscribe from a subscription by calling\n * `unsubscribe()` directly on {@link StompSubscription} returned by `client.subscribe()`:\n *\n * ```javascript\n * var subscription = client.subscribe(destination, onmessage);\n * // ...\n * subscription.unsubscribe();\n * ```\n *\n * See: http://stomp.github.com/stomp-specification-1.2.html#UNSUBSCRIBE UNSUBSCRIBE Frame\n */\n public unsubscribe(id: string, headers: StompHeaders = {}): void {\n this._stompHandler.unsubscribe(id, headers);\n }\n\n /**\n * Start a transaction, the returned {@link Transaction} has methods - [commit]{@link Transaction#commit}\n * and [abort]{@link Transaction#abort}.\n *\n * `transactionId` is optional, if not passed the library will generate it internally.\n */\n public begin(transactionId?: string): Transaction {\n return this._stompHandler.begin(transactionId);\n }\n\n /**\n * Commit a transaction.\n *\n * It is preferable to commit a transaction by calling [commit]{@link Transaction#commit} directly on\n * {@link Transaction} returned by [client.begin]{@link Client#begin}.\n *\n * ```javascript\n * var tx = client.begin(txId);\n * //...\n * tx.commit();\n * ```\n */\n public commit(transactionId: string): void {\n this._stompHandler.commit(transactionId);\n }\n\n /**\n * Abort a transaction.\n * It is preferable to abort a transaction by calling [abort]{@link Transaction#abort} directly on\n * {@link Transaction} returned by [client.begin]{@link Client#begin}.\n *\n * ```javascript\n * var tx = client.begin(txId);\n * //...\n * tx.abort();\n * ```\n */\n public abort(transactionId: string): void {\n this._stompHandler.abort(transactionId);\n }\n\n /**\n * ACK a message. It is preferable to acknowledge a message by calling [ack]{@link Message#ack} directly\n * on the {@link Message} handled by a subscription callback:\n *\n * ```javascript\n * var callback = function (message) {\n * // process the message\n * // acknowledge it\n * message.ack();\n * };\n * client.subscribe(destination, callback, {'ack': 'client'});\n * ```\n */\n public ack(messageId: string, subscriptionId: string, headers: StompHeaders = {}): void {\n this._stompHandler.ack(messageId, subscriptionId, headers);\n }\n\n /**\n * NACK a message. It is preferable to acknowledge a message by calling [nack]{@link Message#nack} directly\n * on the {@link Message} handled by a subscription callback:\n *\n * ```javascript\n * var callback = function (message) {\n * // process the message\n * // an error occurs, nack it\n * message.nack();\n * };\n * client.subscribe(destination, callback, {'ack': 'client'});\n * ```\n */\n public nack(messageId: string, subscriptionId: string, headers: StompHeaders = {}): void {\n this._stompHandler.nack(messageId, subscriptionId, headers);\n }\n}","import {Client} from \"../client\";\nimport {StompHeaders} from \"../stomp-headers\";\nimport {frameCallbackType, messageCallbackType} from \"../types\";\n\n/**\n * Available for backward compatibility, please shift to using {@link Client}.\n *\n * **Deprecated**\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\nexport class CompatClient extends Client {\n\n /**\n * It is no op now. No longer needed. Large packets work out of the box.\n */\n public maxWebSocketFrameSize: number = 16 * 1024;\n\n /**\n * Available for backward compatibility, please shift to using {@link Client}\n * and [Client#webSocketFactory]{@link Client#webSocketFactory}.\n *\n * **Deprecated**\n *\n * @internal\n */\n constructor(webSocketFactory: () => any) {\n super();\n this.reconnect_delay = 0;\n this.webSocketFactory = webSocketFactory;\n // Default from previous version\n this.debug = (...message: any[]) => {\n console.log(...message);\n };\n }\n\n private _parseConnect(...args: any[]): any {\n let closeEventCallback, connectCallback, errorCallback;\n let headers: StompHeaders = {};\n if (args.length < 2) {\n throw(\"Connect requires at least 2 arguments\");\n }\n if (typeof(args[1]) === 'function') {\n [headers, connectCallback, errorCallback, closeEventCallback] = args;\n } else {\n switch (args.length) {\n case 6:\n [headers['login'], headers['passcode'], connectCallback, errorCallback, closeEventCallback, headers['host']] = args;\n break;\n default:\n [headers['login'], headers['passcode'], connectCallback, errorCallback, closeEventCallback] = args;\n }\n }\n\n return [headers, connectCallback, errorCallback, closeEventCallback];\n }\n\n /**\n * Available for backward compatibility, please shift to using [Client#activate]{@link Client#activate}.\n *\n * **Deprecated**\n *\n * The `connect` method accepts different number of arguments and types. See the Overloads list. Use the\n * version with headers to pass your broker specific options.\n *\n * overloads:\n * - connect(headers, connectCallback)\n * - connect(headers, connectCallback, errorCallback)\n * - connect(login, passcode, connectCallback)\n * - connect(login, passcode, connectCallback, errorCallback)\n * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback)\n * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback, host)\n *\n * params:\n * - headers, see [Client#connectHeaders]{@link Client#connectHeaders}\n * - connectCallback, see [Client#onConnect]{@link Client#onConnect}\n * - errorCallback, see [Client#onStompError]{@link Client#onStompError}\n * - closeEventCallback, see [Client#onWebSocketClose]{@link Client#onWebSocketClose}\n * - login [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)\n * - passcode [String], [Client#connectHeaders](../classes/Client.html#connectHeaders)\n * - host [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\n public connect(...args: any[]): void {\n const out = this._parseConnect(...args);\n\n if (out[0]) { this.connectHeaders = out[0]; }\n if (out[1]) { this.onConnect = out[1]; }\n if (out[2]) { this.onStompError = out[2]; }\n if (out[3]) { this.onWebSocketClose = out[3]; }\n\n super.activate();\n }\n\n /**\n * Available for backward compatibility, please shift to using [Client#deactivate]{@link Client#deactivate}.\n *\n * **Deprecated**\n *\n * See:\n * [Client#onDisconnect]{@link Client#onDisconnect}, and\n * [Client#disconnectHeaders]{@link Client#disconnectHeaders}\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\n public disconnect(disconnectCallback?: any, headers: StompHeaders = {}): void {\n if (disconnectCallback) {\n this.onDisconnect = disconnectCallback;\n }\n this.disconnectHeaders = headers;\n\n super.deactivate();\n }\n\n /**\n * Available for backward compatibility, use [Client#publish]{@link Client#publish}.\n *\n * Send a message to a named destination. Refer to your STOMP broker documentation for types\n * and naming of destinations. The headers will, typically, be available to the subscriber.\n * However, there may be special purpose headers corresponding to your STOMP broker.\n *\n * **Deprecated**, use [Client#publish]{@link Client#publish}\n *\n * Note: Body must be String. You will need to covert the payload to string in case it is not string (e.g. JSON)\n *\n * ```javascript\n * client.send(\"/queue/test\", {priority: 9}, \"Hello, STOMP\");\n *\n * // If you want to send a message with a body, you must also pass the headers argument.\n * client.send(\"/queue/test\", {}, \"Hello, STOMP\");\n * ```\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\n public send(destination: string, headers: {[key:string]: any} = {}, body: string = ''): void {\n const skipContentLengthHeader = (headers['content-length'] === false);\n if (skipContentLengthHeader) {\n delete headers['content-length'];\n }\n this.publish({\n destination: destination,\n headers: <StompHeaders>headers,\n body: body,\n skipContentLengthHeader: skipContentLengthHeader\n });\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#reconnectDelay]{@link Client#reconnectDelay}.\n *\n * **Deprecated**\n */\n set reconnect_delay(value: number) {\n this.reconnectDelay = value;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#webSocket]{@link Client#webSocket}.\n *\n * **Deprecated**\n */\n get ws(): any {\n return this._webSocket;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#connectedVersion]{@link Client#connectedVersion}.\n *\n * **Deprecated**\n */\n get version() {\n return this.connectedVersion;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.\n *\n * **Deprecated**\n */\n get onreceive(): messageCallbackType {\n return this.onUnhandledMessage;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.\n *\n * **Deprecated**\n */\n set onreceive(value: messageCallbackType) {\n this.onUnhandledMessage = value;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.\n * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}.\n *\n * **Deprecated**\n */\n get onreceipt(): frameCallbackType {\n return this.onUnhandledReceipt;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.\n *\n * **Deprecated**\n */\n set onreceipt(value: frameCallbackType) {\n this.onUnhandledReceipt = value;\n }\n\n private _heartbeatInfo: HeartbeatInfo = new HeartbeatInfo(this);\n\n /**\n * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}\n * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.\n *\n * **Deprecated**\n */\n get heartbeat() {\n return this._heartbeatInfo;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}\n * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.\n *\n * **Deprecated**\n */\n set heartbeat(value: {incoming: number, outgoing: number}) {\n this.heartbeatIncoming = value.incoming;\n this.heartbeatOutgoing = value.outgoing;\n }\n}\n\n/**\n * @internal\n */\nclass HeartbeatInfo {\n constructor (private client: CompatClient) {\n }\n\n get outgoing(): number {\n return this.client.heartbeatOutgoing;\n }\n\n set outgoing(value: number) {\n this.client.heartbeatOutgoing = value;\n }\n\n get incoming(): number {\n return this.client.heartbeatIncoming;\n }\n\n set incoming(value: number) {\n this.client.heartbeatIncoming = value;\n }\n}","import {Versions} from \"../versions\";\nimport {CompatClient} from \"./compat-client\";\n\n/**\n * STOMP Class, acts like a factory to create {@link Client}.\n */\nexport class Stomp {\n /**\n * In case you need to use a non standard class for WebSocket.\n *\n * For example when using within NodeJS environment:\n *\n * ```javascript\n * StompJs = require('../../esm5/');\n * Stomp = StompJs.Stomp;\n * Stomp.WebSocketClass = require('websocket').w3cwebsocket;\n * ```\n */\n public static WebSocketClass:any = null;\n\n /**\n * This method creates a WebSocket client that is connected to\n * the STOMP server located at the url.\n *\n * ```javascript\n * var url = \"ws://localhost:61614/stomp\";\n * var client = Stomp.client(url);\n * ```\n */\n public static client (url: string, protocols?: string[]): CompatClient {\n // This is a hack to allow another implementation than the standard\n // HTML5 WebSocket class.\n //\n // It is possible to use another class by calling\n //\n // Stomp.WebSocketClass = MozWebSocket\n //\n // *prior* to call `Stomp.client()`.\n //\n // This hack is deprecated and `Stomp.over()` method should be used\n // instead.\n\n // See remarks on the function Stomp.over\n if (protocols == null) { protocols = Versions.default.protocolVersions(); }\n const ws_fn= function() {\n const klass = Stomp.WebSocketClass || WebSocket;\n return new klass(url, protocols);\n };\n\n return new CompatClient(ws_fn);\n }\n\n /**\n * This method is an alternative to [Stomp#client]{@link Stomp#client} to let the user\n * specify the WebSocket to use (either a standard HTML5 WebSocket or\n * a similar object).\n *\n * In order to support reconnection, the function Client._connect should be callable more than once. While reconnecting\n * a new instance of underlying transport (TCP Socket, WebSocket or SockJS) will be needed. So, this function\n * alternatively allows passing a function that should return a new instance of the underlying socket.\n *\n * ```javascript\n * var client = Stomp.over(function(){\n * return new WebSocket('ws://localhost:15674/ws')\n * });\n * ```\n */\n public static over (ws: any): CompatClient {\n const ws_fn = typeof(ws) === \"function\" ? ws : () => ws;\n\n return new CompatClient(ws_fn);\n }\n}\n","import {StompHeaders} from \"./stomp-headers\";\nimport {Byte} from \"./byte\";\nimport {RawFrameType} from \"./types\";\n\n/**\n * @internal\n */\ntype unmarshallResults = { frames: Frame[]; partial: string };\n\n/**\n * Frame class represents a STOMP frame. Many of the callbacks pass the Frame received from\n * the STOMP broker. For advanced usage you might need to access [headers]{@link Frame#headers}.\n *\n * {@link Message} is an extended Frame.\n */\nexport class Frame {\n /**\n * STOMP Command\n */\n public command: string;\n\n /**\n * Headers, key value pairs.\n */\n public headers: StompHeaders;\n\n public isBinaryBody: boolean;\n\n /**\n * body of the frame\n */\n get body(): string {\n if (!this._body && this.isBinaryBody) {\n this._body = new TextDecoder().decode(this._binaryBody);\n }\n return this._body;\n }\n private _body: string;\n\n /**\n * body as Uint8Array\n */\n get binaryBody(): Uint8Array {\n if (!this._binaryBody && !this.isBinaryBody) {\n this._binaryBody = new TextEncoder().encode(this._body);\n }\n return this._binaryBody;\n }\n private _binaryBody: Uint8Array;\n\n private escapeHeaderValues: boolean;\n private skipContentLengthHeader: boolean;\n\n /**\n * Frame constructor. `command`, `headers` and `body` are available as properties.\n *\n * @internal\n */\n constructor(params: {\n command: string, headers?: StompHeaders, body?: string, binaryBody?: Uint8Array,\n escapeHeaderValues?: boolean, skipContentLengthHeader?: boolean\n }) {\n let {command, headers, body, binaryBody, escapeHeaderValues, skipContentLengthHeader} = params;\n this.command = command;\n this.headers = headers || {};\n\n if (binaryBody) {\n this._binaryBody = binaryBody;\n this.isBinaryBody = true;\n } else {\n this._body = body || '';\n this.isBinaryBody = false;\n }\n this.escapeHeaderValues = escapeHeaderValues || false;\n this.skipContentLengthHeader = skipContentLengthHeader || false;\n }\n\n /**\n * deserialize a STOMP Frame from raw data.\n *\n * @internal\n */\n public static fromRawFrame(rawFrame: RawFrameType, escapeHeaderValues: boolean): Frame {\n const headers: StompHeaders = {};\n const trim = (str: string): string => str.replace(/^\\s+|\\s+$/g, '');\n\n // In case of repeated headers, as per standards, first value need to be used\n for (let header of rawFrame.headers.reverse()) {\n const idx = header.indexOf(':');\n\n const key = trim(header[0]);\n let value = trim(header[1]);\n\n if (escapeHeaderValues && (rawFrame.command !== 'CONNECT') && (rawFrame.command !== 'CONNECTED')) {\n value = Frame.hdrValueUnEscape(value);\n }\n\n headers[key] = value;\n }\n\n return new Frame({\n command: rawFrame.command,\n headers: headers,\n binaryBody: rawFrame.binaryBody,\n escapeHeaderValues: escapeHeaderValues\n });\n }\n\n /**\n * @internal\n */\n public toString(): string {\n return this.serializeCmdAndHeaders();\n }\n\n /**\n * serialize this Frame in a format suitable to be passed to WebSocket.\n * If the body is string the output will be string.\n * If the body is binary (i.e. of type Unit8Array) it will be serialized to ArrayBuffer.\n */\n public serialize(): string|ArrayBuffer {\n const cmdAndHeaders = this.serializeCmdAndHeaders();\n\n if(this.isBinaryBody) {\n return Frame.toUnit8Array(cmdAndHeaders, this._binaryBody).buffer;\n } else {\n return cmdAndHeaders + this._body + Byte.NULL;\n }\n }\n\n private serializeCmdAndHeaders(): string {\n const lines = [this.command];\n if (this.skipContentLengthHeader) {\n delete this.headers['content-length'];\n }\n\n for (let name of Object.keys(this.headers || {})) {\n const value = this.headers[name];\n if (this.escapeHeaderValues && (this.command !== 'CONNECT') && (this.command !== 'CONNECTED')) {\n lines.push(`${name}:${Frame.hdrValueEscape(`${value}`)}`);\n } else {\n lines.push(`${name}:${value}`);\n }\n }\n if (this.isBinaryBody || (!this.isBodyEmpty() && !this.skipContentLengthHeader)) {\n lines.push(`content-length:${this.bodyLength()}`);\n }\n return lines.join(Byte.LF) + Byte.LF + Byte.LF;\n }\n\n private isBodyEmpty(): boolean {\n return this.bodyLength() === 0;\n }\n\n private bodyLength(): number {\n const binaryBody = this.binaryBody;\n return binaryBody ? binaryBody.length : 0;\n }\n\n /**\n * Compute the size of a UTF-8 string by counting its number of bytes\n * (and not the number of characters composing the string)\n */\n private static sizeOfUTF8(s: string): number {\n return s ? new TextEncoder().encode(s).length : 0;\n }\n\n private static toUnit8Array(cmdAndHeaders: string, binaryBody: Uint8Array): Uint8Array {\n const uint8CmdAndHeaders = new TextEncoder().encode(cmdAndHeaders);\n const nullTerminator = new Uint8Array([0]);\n const uint8Frame = new Uint8Array(uint8CmdAndHeaders.length + binaryBody.length + nullTerminator.length);\n\n uint8Frame.set(uint8CmdAndHeaders);\n uint8Frame.set(binaryBody, uint8CmdAndHeaders.length);\n uint8Frame.set(nullTerminator, uint8CmdAndHeaders.length + binaryBody.length);\n\n return uint8Frame;\n }\n /**\n * Serialize a STOMP frame as per STOMP standards, suitable to be sent to the STOMP broker.\n *\n * @internal\n */\n public static marshall(params: {\n command: string, headers?: StompHeaders, body?: string, binaryBody?: Uint8Array,\n escapeHeaderValues?: boolean, skipContentLengthHeader?: boolean\n }) {\n const frame = new Frame(params);\n return frame.serialize();\n }\n\n /**\n * Escape header values\n */\n private static hdrValueEscape(str: string): string {\n return str.replace(/\\\\/g, \"\\\\\\\\\").replace(/\\r/g, \"\\\\r\").replace(/\\n/g, \"\\\\n\").replace(/:/g, \"\\\\c\");\n }\n\n /**\n * UnEscape header values\n */\n private static hdrValueUnEscape(str: string): string {\n return str.replace(/\\\\r/g, \"\\r\").replace(/\\\\n/g, \"\\n\").replace(/\\\\c/g, \":\").replace(/\\\\\\\\/g, \"\\\\\");\n }\n}\n","export * from './client';\nexport * from './frame';\nexport * from './message';\nexport * from './parser';\nexport * from './stomp-config';\nexport * from './stomp-headers';\nexport * from './stomp-subscription';\nexport * from './transaction';\nexport * from './types';\nexport * from './versions';\n\n// Compatibility code\nexport * from './compatibility/compat-client';\nexport * from './compatibility/stomp';\n","import {RawFrameType} from './types';\n\n/**\n * @internal\n */\nconst NULL = 0;\n/**\n * @internal\n */\nconst LF = 10;\n/**\n * @internal\n */\nconst CR = 13;\n/**\n * @internal\n */\nconst COLON = 58;\n\n/**\n * This is an evented, rec descent parser.\n * A stream of Octets can be passed and whenever it recognizes\n * a complete Frame or an incoming ping it will invoke the registered callbacks.\n *\n * All incoming Octets are fed into _onByte function.\n * Depending on current state the _onByte function keeps changing.\n * Depending on the state it keeps accumulating into _token and _results.\n * State is indicated by current value of _onByte, all states are named as _collect.\n *\n * STOMP standards https://stomp.github.io/stomp-specification-1.2.html\n * imply that all lengths are considered in bytes (instead of string lengths).\n * So, before actual parsing, if the incoming data is String it is converted to Octets.\n * This allows faithful implementation of the protocol and allows NULL Octets to be present in the body.\n *\n * There is no peek function on the incoming data.\n * When a state change occurs based on an Octet without consuming the Octet,\n * the Octet, after state change, is fed again (_reinjectByte).\n * This became possible as the state change can be determined by inspecting just one Octet.\n *\n * There are two modes to collect the body, if content-length header is there then it by counting Octets\n * otherwise it is determined by NULL terminator.\n *\n * Following the standards, the command and headers are converted to Strings\n * and the body is returned as Octets.\n * Headers are returned as an array and not as Hash - to allow multiple occurrence of an header.\n *\n * This parser does not use Regular Expressions as that can only operate on Strings.\n *\n * It handles if multiple STOMP frames are given as one chunk, a frame is split into multiple chunks, or\n * any combination there of. The parser remembers its state (any partial frame) and continues when a new chunk\n * is pushed.\n *\n * Typically the higher level function will convert headers to Hash, handle unescaping of header values\n * (which is protocol version specific), and convert body to text.\n *\n * Check the parser.spec.js to understand cases that this parser is supposed to handle.\n *\n * @internal\n */\nexport class Parser {\n private readonly _encoder = new TextEncoder();\n private readonly _decoder = new TextDecoder();\n\n private _results: RawFrameType;\n\n private _token: number[] = [];\n private _headerKey: string;\n private _bodyBytesRemaining:number;\n\n private _onByte: (byte: number) => void;\n\n public constructor(public onFrame: (rawFrame: RawFrameType) => void, public onIncomingPing: () => void) {\n this._initState();\n }\n\n public parseChunk(segment: string|ArrayBuffer) {\n let chunk: Uint8Array;\n\n if ((segment instanceof ArrayBuffer)) {\n chunk = new Uint8Array(segment);\n } else {\n chunk = this._encoder.encode(segment);\n }\n\n for (let i = 0; i < chunk.length; i++) {\n const byte = chunk[i];\n this._onByte(byte);\n }\n }\n\n // The following implements a simple Rec Descent Parser.\n // The grammar is simple and just one byte tells what should be the next state\n\n private _collectFrame(byte: number): void {\n if (byte === NULL) { // Ignore\n return;\n }\n if (byte === CR) { // Ignore CR\n return;\n }\n if (byte === LF) { // Incoming Ping\n this.onIncomingPing();\n return;\n }\n\n this._onByte = this._collectCommand;\n this._reinjectByte(byte);\n }\n\n private _collectCommand(byte: number): void {\n if (byte === CR) { // Ignore CR\n return;\n }\n if (byte === LF) {\n this._results.command = this._consumeTokenAsUTF8();\n this._onByte = this._collectHeaders;\n return;\n }\n\n this._consumeByte(byte);\n }\n\n private _collectHeaders(byte: number): void {\n if (byte === CR) { // Ignore CR\n return;\n }\n if (byte === LF) {\n this._setupCollectBody();\n return;\n }\n this._onByte = this._collectHeaderKey;\n this._reinjectByte(byte);\n }\n\n private _reinjectByte(byte: number) {\n this._onByte(byte);\n }\n\n private _collectHeaderKey(byte: number): void {\n if (byte === COLON) {\n this._headerKey = this._consumeTokenAsUTF8();\n this._onByte = this._collectHeaderValue;\n return;\n }\n this._consumeByte(byte);\n }\n\n private _collectHeaderValue(byte: number): void {\n if (byte === CR) { // Ignore CR\n return;\n }\n if (byte === LF) {\n this._results.headers.push([this._headerKey, this._consumeTokenAsUTF8()]);\n this._headerKey = undefined;\n this._onByte = this._collectHeaders;\n return;\n }\n this._consumeByte(byte);\n }\n\n private _setupCollectBody() {\n const contentLengthHeader = this._results.headers.filter(function (header: [string, string]) {\n return header[0] === \"content-length\";\n })[0];\n\n if(contentLengthHeader) {\n this._bodyBytesRemaining = parseInt(contentLengthHeader[1]);\n this._onByte = this._collectBodyFixedSize;\n } else {\n this._onByte = this._collectBodyNullTerminated;\n }\n }\n\n private _collectBodyNullTerminated(byte: number): void {\n if (byte === NULL) {\n this._retrievedBody();\n return;\n }\n this._consumeByte(byte);\n }\n\n private _collectBodyFixedSize(byte: number): void {\n // It is post decrement, so that we discard the trailing NULL octet\n if (this._bodyBytesRemaining-- === 0) {\n this._retrievedBody();\n return;\n }\n this._consumeByte(byte);\n }\n\n private _retrievedBody() {\n this._results.binaryBody = this._consumeTokenAsRaw();\n\n this.onFrame(this._results);\n\n this._initState();\n }\n\n // Rec Descent Parser helpers\n\n private _consumeByte(byte: number) {\n this._token.push(byte);\n }\n\n private _consumeTokenAsUTF8() {\n return this._decoder.decode(this._consumeTokenAsRaw());\n }\n\n private _consumeTokenAsRaw() {\n const rawResult = new Uint8Array(this._token);\n this._token = [];\n return rawResult;\n }\n\n private _initState() {\n this._results = {\n command: undefined,\n headers: [],\n binaryBody: undefined,\n };\n\n this._token = [];\n this._headerKey = undefined;\n\n this._onByte = this._collectFrame;\n }\n\n}","import {Client} from './client';\nimport {Byte} from \"./byte\";\nimport {Versions} from \"./versions\";\nimport {Message} from \"./message\";\nimport {Frame} from \"./frame\";\nimport {StompHeaders} from \"./stomp-headers\";\nimport {closeEventCallbackType, debugFnType, frameCallbackType, messageCallbackType, publishParams} from \"./types\";\nimport {StompSubscription} from \"./stomp-subscription\";\nimport {Transaction} from \"./transaction\";\nimport {StompConfig} from \"./stomp-config\";\nimport {Parser} from \"./parser\";\n\n/**\n * The STOMP protocol handler\n *\n * @internal\n */\nexport class StompHandler {\n public debug: debugFnType;\n\n public stompVersions: Versions;\n\n public connectHeaders: StompHeaders;\n\n public disconnectHeaders: StompHeaders;\n\n public heartbeatIncoming: number;\n\n public heartbeatOutgoing: number;\n\n public onUnhandledMessage: messageCallbackType;\n\n public onUnhandledReceipt: frameCallbackType;\n\n public onUnhandledFrame: frameCallbackType;\n\n public onConnect: frameCallbackType;\n\n public onDisconnect: frameCallbackType;\n\n public onStompError: frameCallbackType;\n\n public onWebSocketClose: closeEventCallbackType;\n\n get connectedVersion(): string {\n return this._connectedVersion;\n }\n private _connectedVersion: string;\n\n get connected(): boolean {\n return this._connected;\n }\n\n private _connected: boolean;\n\n private readonly _subscriptions: { [key: string]: messageCallbackType };\n private readonly _receiptWatchers: { [key: string]: frameCallbackType };\n private _partialData: string;\n private _escapeHeaderValues: boolean;\n private _counter: number;\n private _pinger: any;\n private _ponger: any;\n private _lastServerActivityTS: number;\n\n constructor(private _client: Client, private _webSocket: WebSocket, config: StompConfig = {}) {\n // used to index subscribers\n this._counter = 0;\n\n // subscription callbacks indexed by subscriber's ID\n this._subscriptions = {};\n\n // receipt-watchers indexed by receipts-ids\n this._receiptWatchers = {};\n\n this._partialData = '';\n\n this._escapeHeaderValues = false;\n\n this._lastServerActivityTS = Date.now();\n\n this.configure(config);\n }\n\n public configure(conf: StompConfig): void {\n // bulk assign all properties to this\n (<any>Object).assign(this, conf);\n }\n\n public start(): void {\n const parser = new Parser(\n // On Frame\n (rawFrame) => {\n const frame = Frame.fromRawFrame(rawFrame, this._escapeHeaderValues);\n\n this.debug(`<<< ${frame}`);\n\n const serverFrameHandler = this._serverFrameHandlers[frame.command] || this.onUnhandledFrame;\n serverFrameHandler(frame);\n },\n // On Incoming Ping\n () => {\n this.debug(\"<<< PONG\");\n }\n );\n\n this._webSocket.onmessage = (evt: any) => {\n this.debug('Received data');\n this._lastServerActivityTS = Date.now();\n\n parser.parseChunk(evt.data);\n };\n\n this._webSocket.onclose = (closeEvent: any): void => {\n this.debug(`Connection closed to ${this._webSocket.url}`);\n this.onWebSocketClose(closeEvent);\n this._cleanUp();\n };\n\n this._webSocket.onopen = () => {\n this.debug('Web Socket Opened...');\n this.connectHeaders[\"accept-version\"] = this.stompVersions.supportedVersions();\n this.connectHeaders[\"heart-beat\"] = [this.heartbeatOutgoing, this.heartbeatIncoming].join(',');\n this._transmit({command: \"CONNECT\", headers: this.connectHeaders});\n };\n }\n\n private readonly _serverFrameHandlers: { [key: string]: frameCallbackType } = {\n\n // [CONNECTED Frame](http://stomp.github.com/stomp-specification-1.2.html#CONNECTED_Frame)\n 'CONNECTED': (frame) => {\n this.debug(`connected to server ${frame.headers.server}`);\n this._connected = true;\n this._connectedVersion = frame.headers.version;\n // STOMP version 1.2 needs header values to be escaped\n if (this._connectedVersion === Versions.V1_2) {\n this._escapeHeaderValues = true;\n }\n\n this._setupHeartbeat(frame.headers);\n this.onConnect(frame);\n },\n\n // [MESSAGE Frame](http://stomp.github.com/stomp-specification-1.2.html#MESSAGE)\n \"MESSAGE\": (frame) => {\n // the callback is registered when the client calls\n // `subscribe()`.\n // If there is no registered subscription for the received message,\n // the default `onUnhandledMessage` callback is used that the client can set.\n // This is useful for subscriptions that are automatically created\n // on the browser side (e.g. [RabbitMQ's temporary\n // queues](http://www.rabbitmq.com/stomp.html)).\n const subscription = frame.headers.subscription;\n const onReceive = this._subscriptions[subscription] || this.onUnhandledMessage;\n\n // bless the frame to be a Message\n const message = <Message>frame;\n\n const client = this;\n const messageId = this._connectedVersion === Versions.V1_2 ? message.headers[\"ack\"] : message.headers[\"message-id\"];\n\n // add `ack()` and `nack()` methods directly to the returned frame\n // so that a simple call to `message.ack()` can acknowledge the message.\n message.ack = (headers: StompHeaders = {}): void => {\n return client.ack(messageId, subscription, headers);\n };\n message.nack = (headers: StompHeaders = {}): void => {\n return client.nack(messageId, subscription, headers);\n };\n onReceive(message);\n },\n\n // [RECEIPT Frame](http://stomp.github.com/stomp-specification-1.2.html#RECEIPT)\n \"RECEIPT\": (frame) => {\n const callback = this._receiptWatchers[frame.headers[\"receipt-id\"]];\n if (callback) {\n callback(frame);\n // Server will acknowledge only once, remove the callback\n delete this._receiptWatchers[frame.headers[\"receipt-id\"]];\n } else {\n this.onUnhandledReceipt(frame);\n }\n },\n\n // [ERROR Frame](http://stomp.github.com/stomp-specification-1.2.html#ERROR)\n 'ERROR': (frame) => {\n this.onStompError(frame);\n }\n };\n\n private _setupHeartbeat(headers: StompHeaders): void {\n if ((headers.version !== Versions.V1_1 && headers.version !== Versions.V1_2)) {\n return;\n }\n\n // heart-beat header received from the server looks like:\n //\n // heart-beat: sx, sy\n const [serverOutgoing, serverIncoming] = (headers['heart-beat']).split(\",\").map((v: string) => parseInt(v));\n\n if ((this.heartbeatOutgoing !== 0) && (serverIncoming !== 0)) {\n let ttl: number = Math.max(this.heartbeatOutgoing, serverIncoming);\n this.debug(`send PING every ${ttl}ms`);\n this._pinger = setInterval(() => {\n this._webSocket.send(Byte.LF);\n this.debug(\">>> PING\");\n }, ttl);\n }\n\n if ((this.heartbeatIncoming !== 0) && (serverOutgoing !== 0)) {\n let ttl: number = Math.max(this.heartbeatIncoming, serverOutgoing);\n this.debug(`check PONG every ${ttl}ms`);\n this._ponger = setInterval(() => {\n const delta = Date.now() - this._lastServerActivityTS;\n // We wait twice the TTL to be flexible on window's setInterval calls\n if (delta > (ttl * 2)) {\n this.debug(`did not receive server activity for the last ${delta}ms`);\n this._webSocket.close();\n }\n }, ttl);\n }\n }\n\n private _transmit(params: { command: string, headers?: StompHeaders,\n body?: string, binaryBody?: Uint8Array, skipContentLengthHeader?: boolean }): void {\n let {command, headers, body, binaryBody, skipContentLengthHeader} = params;\n let frame = new Frame({\n command: command,\n headers: headers,\n body: body,\n binaryBody: binaryBody,\n escapeHeaderValues: this._escapeHeaderValues,\n skipContentLengthHeader: skipContentLengthHeader\n });\n this.debug(`>>> ${frame}`);\n this._webSocket.send(frame.serialize());\n/* Do we need this?\n // if necessary, split the *STOMP* frame to send it on many smaller\n // *WebSocket* frames\n while (true) {\n if (out.length > this.maxWebSocketFrameSize) {\n this._webSocket.send(out.substring(0, this.maxWebSocketFrameSize));\n out = out.substring(this.maxWebSocketFrameSize);\n this.debug(`remaining = ${out.length}`);\n } else {\n this._webSocket.send(out);\n return;\n }\n }\n*/\n }\n\n public dispose(): void {\n if (this.connected) {\n try {\n if (!this.disconnectHeaders['receipt']) {\n this.disconnectHeaders['receipt'] = `close-${this._counter++}`;\n }\n this.watchForReceipt(this.disconnectHeaders['receipt'], (frame) => {\n this._webSocket.close();\n this._cleanUp();\n this.onDisconnect(frame);\n });\n this._transmit({command: \"DISCONNECT\", headers: this.disconnectHeaders});\n } catch (error) {\n this.debug(`Ignoring error during disconnect ${error}`);\n }\n } else {\n if (this._webSocket.readyState === WebSocket.CONNECTING || this._webSocket.readyState === WebSocket.OPEN) {\n this._webSocket.close();\n }\n }\n }\n\n private _cleanUp() {\n this._connected = false;\n\n if (this._pinger) {\n clearInterval(this._pinger);\n }\n if (this._ponger) {\n clearInterval(this._ponger);\n }\n }\n\n public publish(params: publishParams): void {\n let {destination, headers, body, binaryBody, skipContentLengthHeader} = params;\n headers = (<any>Object).assign({destination: destination}, headers);\n this._transmit({\n command: \"SEND\",\n headers: headers,\n body: body,\n binaryBody: binaryBody,\n skipContentLengthHeader: skipContentLengthHeader\n });\n }\n\n public watchForReceipt(receiptId: string, callback: frameCallbackType): void {\n this._receiptWatchers[receiptId] = callback;\n }\n\n public subscribe(destination: string, callback: messageCallbackType, headers: StompHeaders = {}): StompSubscription {\n if (!headers.id) {\n headers.id = `sub-${this._counter++}`;\n }\n headers.destination = destination;\n this._subscriptions[headers.id] = callback;\n this._transmit({command: \"SUBSCRIBE\", headers: headers});\n const client = this;\n return {\n id: headers.id,\n\n unsubscribe(hdrs) {\n return client.unsubscribe(headers.id, hdrs);\n }\n };\n }\n\n public unsubscribe(id: string, headers: StompHeaders = {}): void {\n if (headers == null) {\n headers = {};\n }\n delete this._subscriptions[id];\n headers.id = id;\n this._transmit({command: \"UNSUBSCRIBE\", headers: headers});\n }\n\n public begin(transactionId: string): Transaction {\n const txId = transactionId || (`tx-${this._counter++}`);\n this._transmit({\n command: \"BEGIN\", headers: {\n transaction: txId\n }\n });\n const client = this;\n return {\n id: txId,\n commit(): void {\n client.commit(txId);\n },\n abort(): void {\n client.abort(txId);\n }\n };\n }\n\n public commit(transactionId: string): void {\n this._transmit({\n command: \"COMMIT\", headers: {\n transaction: transactionId\n }\n });\n }\n\n public abort(transactionId: string): void {\n this._transmit({\n command: \"ABORT\", headers: {\n transaction: transactionId\n }\n });\n }\n\n public ack(messageId: string, subscriptionId: string, headers: StompHeaders = {}): void {\n if (this._connectedVersion === Versions.V1_2) {\n headers[\"id\"] = messageId;\n } else {\n headers[\"message-id\"] = messageId;\n }\n headers.subscription = subscriptionId;\n this._transmit({command: \"ACK\", headers: headers});\n }\n\n public nack(messageId: string, subscriptionId: string, headers: StompHeaders = {}): void {\n if (this._connectedVersion === Versions.V1_2) {\n headers[\"id\"] = messageId;\n } else {\n headers[\"message-id\"] = messageId;\n }\n headers.subscription = subscriptionId;\n return this._transmit({command: \"NACK\", headers: headers});\n }\n\n}\n","/**\n * Supported STOMP versions\n */\nexport class Versions {\n /**\n * 1.0\n */\n static V1_0= '1.0';\n /**\n * 1.1\n */\n static V1_1= '1.1';\n /**\n * 1.2\n */\n static V1_2= '1.2';\n\n /**\n * @internal\n */\n static default = new Versions([Versions.V1_0, Versions.V1_1, Versions.V1_2]);\n\n /**\n * Takes an array of string of versions, typical elements '1.0', '1.1', or '1.2'\n *\n * You will an instance if this class if you want to override supported versions to be declared during\n * STOMP handshake.\n */\n constructor (public versions: string[]) {\n }\n\n public supportedVersions() {\n return this.versions.join(',');\n }\n\n public protocolVersions() {\n return this.versions.map(x => `v${x.replace('.', '')}.stomp`);\n }\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://StompJs/webpack/universalModuleDefinition","webpack://StompJs/webpack/bootstrap","webpack://StompJs/./src/byte.ts","webpack://StompJs/./src/client.ts","webpack://StompJs/./src/compatibility/compat-client.ts","webpack://StompJs/./src/compatibility/heartbeat-info.ts","webpack://StompJs/./src/compatibility/stomp.ts","webpack://StompJs/./src/frame.ts","webpack://StompJs/./src/index.ts","webpack://StompJs/./src/message.ts","webpack://StompJs/./src/parser.ts","webpack://StompJs/./src/stomp-config.ts","webpack://StompJs/./src/stomp-handler.ts","webpack://StompJs/./src/stomp-headers.ts","webpack://StompJs/./src/stomp-subscription.ts","webpack://StompJs/./src/transaction.ts","webpack://StompJs/./src/versions.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AAK,aAAI,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,WAAQ,EAA9B,CAA8B,CAAC,CAAC;IAClE,CAAC;IAvCD;;OAEG;IACW,aAAI,GAAG,KAAK,CAAC;IAC3B;;OAEG;IACW,aAAI,GAAG,KAAK,CAAC;IAC3B;;OAEG;IACW,aAAI,GAAG,KAAK,CAAC;IAE3B;;OAEG;IACW,gBAAO,GAAG,IAAI,QAAQ,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAwBtF,eAAC;CAAA;AAzCY,4BAAQ","file":"stomp.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"StompJs\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"StompJs\"] = factory();\n\telse\n\t\troot[\"StompJs\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/**\n * Some byte values, used as per STOMP specifications.\n *\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport const BYTE = {\n // LINEFEED byte (octet 10)\n LF: '\\x0A',\n // NULL byte (octet 0)\n NULL: '\\x00'\n};\n","import {StompConfig} from './stomp-config';\nimport {StompHandler} from './stomp-handler';\nimport {StompHeaders} from './stomp-headers';\nimport {StompSubscription} from './stomp-subscription';\nimport {Transaction} from './transaction';\nimport {\n closeEventCallbackType,\n debugFnType,\n frameCallbackType,\n IPublishParams,\n messageCallbackType\n} from './types';\nimport {Versions} from './versions';\n\n/**\n * STOMP Client Class.\n *\n * Part of `@stomp/stompjs`.\n */\nexport class Client {\n /**\n * The URL for the STOMP broker to connect to.\n * Typically like `\"ws://broker.329broker.com:15674/ws\"` or `\"wss://broker.329broker.com:15674/ws\"`.\n *\n * Only one of this or [Client#webSocketFactory]{@link Client#webSocketFactory} need to be set.\n * If both are set, [Client#webSocketFactory]{@link Client#webSocketFactory} will be used.\n */\n public brokerURL: string;\n\n /**\n * STOMP versions to attempt during STOMP handshake. By default versions `1.0`, `1.1`, and `1.2` are attempted.\n *\n * Example:\n * ```javascript\n * // Try only versions 1.0 and 1.1\n * client.stompVersions = new Versions(['1.0', '1.1'])\n * ```\n */\n public stompVersions = Versions.default;\n\n /**\n * This function should return a WebSocket or a similar (e.g. SockJS) object.\n * If your STOMP Broker supports WebSockets, prefer setting [Client#brokerURL]{@link Client#brokerURL}.\n *\n * If both this and [Client#brokerURL]{@link Client#brokerURL} are set, this will be used.\n *\n * Example:\n * ```javascript\n * // use a WebSocket\n * client.webSocketFactory= function () {\n * return new WebSocket(\"wss://broker.329broker.com:15674/ws\");\n * };\n *\n * // Typical usage with SockJS\n * client.webSocketFactory= function () {\n * return new SockJS(\"http://broker.329broker.com/stomp\");\n * };\n * ```\n */\n public webSocketFactory: () => WebSocket;\n\n /**\n * automatically reconnect with delay in milliseconds, set to 0 to disable.\n */\n public reconnectDelay: number = 5000;\n\n /**\n * Incoming heartbeat interval in milliseconds. Set to 0 to disable.\n */\n public heartbeatIncoming: number = 10000;\n\n /**\n * Outgoing heartbeat interval in milliseconds. Set to 0 to disable.\n */\n public heartbeatOutgoing: number = 10000;\n\n /**\n * Underlying WebSocket instance, READONLY.\n */\n get webSocket(): WebSocket {\n return this._webSocket;\n }\n /**\n * Underlying WebSocket instance\n * @internal\n */\n protected _webSocket: WebSocket;\n\n /**\n * Connection headers, important keys - `login`, `passcode`, `host`.\n * Though STOMP 1.2 standard marks these keys to be present, check your broker documentation for\n * details specific to your broker.\n */\n public connectHeaders: StompHeaders;\n\n /**\n * Disconnection headers.\n */\n get disconnectHeaders(): StompHeaders {\n return this._disconnectHeaders;\n }\n\n set disconnectHeaders(value: StompHeaders) {\n this._disconnectHeaders = value;\n if (this._stompHandler) {\n this._stompHandler.disconnectHeaders = this._disconnectHeaders;\n }\n }\n private _disconnectHeaders: StompHeaders;\n\n /**\n * This function will be called for any unhandled messages.\n * It is useful for receiving messages sent to RabbitMQ temporary queues.\n *\n * It can also get invoked with stray messages while the server is processing\n * a request to [Client#unsubscribe]{@link Client#unsubscribe}\n * from an endpoint.\n *\n * The actual {@link Message} will be passed as parameter to the callback.\n */\n public onUnhandledMessage: messageCallbackType;\n\n /**\n * STOMP brokers can be requested to notify when an operation is actually completed.\n * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}. See\n * [Client#watchForReceipt]{@link Client#watchForReceipt} for examples.\n *\n * The actual {@link Frame} will be passed as parameter to the callback.\n */\n public onUnhandledReceipt: frameCallbackType;\n\n /**\n * Will be invoked if {@link Frame} of unknown type is received from the STOMP broker.\n *\n * The actual {@link Frame} will be passed as parameter to the callback.\n */\n public onUnhandledFrame: frameCallbackType;\n\n /**\n * `true` if there is a active connection with STOMP Broker\n */\n get connected(): boolean {\n return (!!this._stompHandler) && this._stompHandler.connected;\n }\n\n /**\n * Callback, invoked on before a connection connection to the STOMP broker.\n *\n * You can change options on the client, which will impact the immediate connect.\n * It is valid to call [Client#decativate]{@link Client#deactivate} in this callback.\n */\n public beforeConnect: () => void;\n\n /**\n * Callback, invoked on every successful connection to the STOMP broker.\n *\n * The actual {@link Frame} will be passed as parameter to the callback.\n * Sometimes clients will like to use headers from this frame.\n */\n public onConnect: frameCallbackType;\n\n /**\n * Callback, invoked on every successful disconnection from the STOMP broker. It will not be invoked if\n * the STOMP broker disconnected due to an error.\n *\n * The actual Receipt {@link Frame} acknowledging the DISCONNECT will be passed as parameter to the callback.\n *\n * The way STOMP protocol is designed, the connection may close/terminate without the client\n * receiving the Receipt {@link Frame} acknowledging the DISCONNECT.\n * You might find [Client#onWebSocketClose]{@link Client#onWebSocketClose} more appropriate to watch\n * STOMP broker disconnects.\n */\n public onDisconnect: frameCallbackType;\n\n /**\n * Callback, invoked on an ERROR frame received from the STOMP Broker.\n * A compliant STOMP Broker will close the connection after this type of frame.\n * Please check broker specific documentation for exact behavior.\n *\n * The actual {@link Frame} will be passed as parameter to the callback.\n */\n public onStompError: frameCallbackType;\n\n /**\n * Callback, invoked when underlying WebSocket is closed.\n *\n * Actual [CloseEvent]{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}\n * is passed as parameter to the callback.\n */\n public onWebSocketClose: closeEventCallbackType;\n\n /**\n * By default, debug messages are discarded. To log to `console` following can be used:\n *\n * ```javascript\n * client.debug = function(str) {\n * console.log(str);\n * };\n * ```\n *\n * Currently this method does not support levels of log. Be aware that the output can be quite verbose\n * and may contain sensitive information (like passwords, tokens etc.).\n */\n public debug: debugFnType;\n\n /**\n * version of STOMP protocol negotiated with the server, READONLY\n */\n get connectedVersion(): string {\n return this._stompHandler ? this._stompHandler.connectedVersion : undefined;\n }\n\n private _stompHandler: StompHandler;\n\n /**\n * if the client is active (connected or going to reconnect)\n */\n get active(): boolean {\n return this._active;\n }\n private _active: boolean = false;\n private _reconnector: any;\n\n /**\n * Create an instance.\n */\n constructor(conf: StompConfig = {}) {\n // Dummy callbacks\n const noOp = () => {};\n this.debug = noOp;\n this.beforeConnect = noOp;\n this.onConnect = noOp;\n this.onDisconnect = noOp;\n this.onUnhandledMessage = noOp;\n this.onUnhandledReceipt = noOp;\n this.onUnhandledFrame = noOp;\n this.onStompError = noOp;\n this.onWebSocketClose = noOp;\n\n // These parameters would typically get proper values before connect is called\n this.connectHeaders = {};\n this._disconnectHeaders = {};\n\n // Apply configuration\n this.configure(conf);\n }\n\n /**\n * Update configuration.\n */\n public configure(conf: StompConfig): void {\n // bulk assign all properties to this\n (Object as any).assign(this, conf);\n }\n\n /**\n * Initiate the connection with the broker.\n * If the connection breaks, as per [Client#reconnectDelay]{@link Client#reconnectDelay},\n * it will keep trying to reconnect.\n *\n * Call [Client#deactivate]{@link Client#deactivate} to disconnect and stop reconnection attempts.\n */\n public activate(): void {\n this._active = true;\n\n this._connect();\n }\n\n private _connect(): void {\n if (this.connected) {\n this.debug('STOMP: already connected, nothing to do');\n return;\n }\n\n this.beforeConnect();\n\n if (!this._active) {\n this.debug('Client has been marked inactive, will not attempt to connect');\n return;\n }\n\n this.debug('Opening Web Socket...');\n\n // Get the actual WebSocket (or a similar object)\n this._webSocket = this._createWebSocket();\n\n this._stompHandler = new StompHandler(this, this._webSocket, {\n debug: this.debug,\n stompVersions: this.stompVersions,\n connectHeaders: this.connectHeaders,\n disconnectHeaders: this._disconnectHeaders,\n heartbeatIncoming: this.heartbeatIncoming,\n heartbeatOutgoing: this.heartbeatOutgoing,\n onConnect: (frame) => {\n if (!this._active) {\n this.debug('STOMP got connected while deactivate was issued, will disconnect now');\n this._disposeStompHandler();\n return;\n }\n this.onConnect(frame);\n },\n onDisconnect: (frame) => {\n this.onDisconnect(frame);\n },\n onStompError: (frame) => {\n this.onStompError(frame);\n },\n onWebSocketClose: (evt) => {\n this.onWebSocketClose(evt);\n // The callback is called before attempting to reconnect, this would allow the client\n // to be `deactivated` in the callback.\n if (this._active) {\n this._schedule_reconnect();\n }\n },\n onUnhandledMessage: (message) => {\n this.onUnhandledMessage(message);\n },\n onUnhandledReceipt: (frame) => {\n this.onUnhandledReceipt(frame);\n },\n onUnhandledFrame: (frame) => {\n this.onUnhandledFrame(frame);\n }\n });\n\n this._stompHandler.start();\n }\n\n private _createWebSocket() {\n let webSocket: WebSocket;\n\n if (this.webSocketFactory) {\n webSocket = this.webSocketFactory();\n } else {\n webSocket = new WebSocket(this.brokerURL, this.stompVersions.protocolVersions());\n }\n webSocket.binaryType = 'arraybuffer';\n return webSocket;\n }\n\n private _schedule_reconnect(): void {\n if (this.reconnectDelay > 0) {\n this.debug(`STOMP: scheduling reconnection in ${this.reconnectDelay}ms`);\n\n this._reconnector = setTimeout(() => {\n this._connect();\n }, this.reconnectDelay);\n }\n }\n\n /**\n * Disconnect if connected and stop auto reconnect loop.\n * Appropriate callbacks will be invoked if underlying STOMP connection was connected.\n *\n * To reactivate you can call [Client#activate]{@link Client#activate}.\n */\n public deactivate(): void {\n // indicate that auto reconnect loop should terminate\n this._active = false;\n\n // Clear if a reconnection was scheduled\n if (this._reconnector) {\n clearTimeout(this._reconnector);\n }\n this._disposeStompHandler();\n }\n\n /**\n * Force disconnect if there is an active connection by directly closing the underlying WebSocket.\n * This is different than a normal disconnect where a DISCONNECT sequence is carried out with the broker.\n * After forcing disconnect, automatic reconnect will be attempted.\n * To stop further reconnects call [Client#deactivate]{@link Client#deactivate} as well.\n */\n public forceDisconnect() {\n if (this._webSocket) {\n if (this._webSocket.readyState === WebSocket.CONNECTING || this._webSocket.readyState === WebSocket.OPEN) {\n this._webSocket.close();\n }\n }\n }\n\n private _disposeStompHandler() {\n // Dispose STOMP Handler\n if (this._stompHandler) {\n this._stompHandler.dispose();\n this._stompHandler = null;\n }\n }\n\n /**\n * Send a message to a named destination. Refer to your STOMP broker documentation for types\n * and naming of destinations.\n *\n * STOMP protocol specifies and suggests some headers and also allows broker specific headers.\n *\n * `body` must be String.\n * You will need to covert the payload to string in case it is not string (e.g. JSON).\n *\n * To send a binary message body use binaryBody parameter. It should be a\n * [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).\n * Sometimes brokers may not support binary frames out of the box.\n * Please check your broker documentation.\n *\n * `content-length` header is automatically added to the STOMP Frame sent to the broker.\n * Set `skipContentLengthHeader` to indicate that `content-length` header should not be added.\n * For binary messages `content-length` header is always added.\n *\n * Caution: The broker will, most likely, report an error and disconnect if message body has NULL octet(s)\n * and `content-length` header is missing.\n *\n * ```javascript\n * client.publish({destination: \"/queue/test\", headers: {priority: 9}, body: \"Hello, STOMP\"});\n *\n * // Only destination is mandatory parameter\n * client.publish({destination: \"/queue/test\", body: \"Hello, STOMP\"});\n *\n * // Skip content-length header in the frame to the broker\n * client.publish({\"/queue/test\", body: \"Hello, STOMP\", skipContentLengthHeader: true});\n *\n * var binaryData = generateBinaryData(); // This need to be of type Uint8Array\n * // setting content-type header is not mandatory, however a good practice\n * client.publish({destination: '/topic/special', binaryBody: binaryData,\n * headers: {'content-type': 'application/octet-stream'}});\n * ```\n */\n public publish(params: IPublishParams) {\n this._stompHandler.publish(params);\n }\n\n /**\n * STOMP brokers may carry out operation asynchronously and allow requesting for acknowledgement.\n * To request an acknowledgement, a `receipt` header needs to be sent with the actual request.\n * The value (say receipt-id) for this header needs to be unique for each use. Typically a sequence, a UUID, a\n * random number or a combination may be used.\n *\n * A complaint broker will send a RECEIPT frame when an operation has actually been completed.\n * The operation needs to be matched based in the value of the receipt-id.\n *\n * This method allow watching for a receipt and invoke the callback\n * when corresponding receipt has been received.\n *\n * The actual {@link Frame} will be passed as parameter to the callback.\n *\n * Example:\n * ```javascript\n * // Subscribing with acknowledgement\n * let receiptId = randomText();\n *\n * client.watchForReceipt(receiptId, function() {\n * // Will be called after server acknowledges\n * });\n *\n * client.subscribe(TEST.destination, onMessage, {receipt: receiptId});\n *\n *\n * // Publishing with acknowledgement\n * receiptId = randomText();\n *\n * client.watchForReceipt(receiptId, function() {\n * // Will be called after server acknowledges\n * });\n * client.publish({destination: TEST.destination, headers: {receipt: receiptId}, body: msg});\n * ```\n */\n public watchForReceipt(receiptId: string, callback: frameCallbackType): void {\n this._stompHandler.watchForReceipt(receiptId, callback);\n }\n\n /**\n * Subscribe to a STOMP Broker location. The callback will be invoked for each received message with\n * the {@link Message} as argument.\n *\n * Note: The library will generate an unique ID if there is none provided in the headers.\n * To use your own ID, pass it using the headers argument.\n *\n * ```javascript\n * callback = function(message) {\n * // called when the client receives a STOMP message from the server\n * if (message.body) {\n * alert(\"got message with body \" + message.body)\n * } else {\n * alert(\"got empty message\");\n * }\n * });\n *\n * var subscription = client.subscribe(\"/queue/test\", callback);\n *\n * // Explicit subscription id\n * var mySubId = 'my-subscription-id-001';\n * var subscription = client.subscribe(destination, callback, { id: mySubId });\n * ```\n */\n public subscribe(destination: string, callback: messageCallbackType, headers: StompHeaders = {}): StompSubscription {\n return this._stompHandler.subscribe(destination, callback, headers);\n }\n\n /**\n * It is preferable to unsubscribe from a subscription by calling\n * `unsubscribe()` directly on {@link StompSubscription} returned by `client.subscribe()`:\n *\n * ```javascript\n * var subscription = client.subscribe(destination, onmessage);\n * // ...\n * subscription.unsubscribe();\n * ```\n *\n * See: http://stomp.github.com/stomp-specification-1.2.html#UNSUBSCRIBE UNSUBSCRIBE Frame\n */\n public unsubscribe(id: string, headers: StompHeaders = {}): void {\n this._stompHandler.unsubscribe(id, headers);\n }\n\n /**\n * Start a transaction, the returned {@link Transaction} has methods - [commit]{@link Transaction#commit}\n * and [abort]{@link Transaction#abort}.\n *\n * `transactionId` is optional, if not passed the library will generate it internally.\n */\n public begin(transactionId?: string): Transaction {\n return this._stompHandler.begin(transactionId);\n }\n\n /**\n * Commit a transaction.\n *\n * It is preferable to commit a transaction by calling [commit]{@link Transaction#commit} directly on\n * {@link Transaction} returned by [client.begin]{@link Client#begin}.\n *\n * ```javascript\n * var tx = client.begin(txId);\n * //...\n * tx.commit();\n * ```\n */\n public commit(transactionId: string): void {\n this._stompHandler.commit(transactionId);\n }\n\n /**\n * Abort a transaction.\n * It is preferable to abort a transaction by calling [abort]{@link Transaction#abort} directly on\n * {@link Transaction} returned by [client.begin]{@link Client#begin}.\n *\n * ```javascript\n * var tx = client.begin(txId);\n * //...\n * tx.abort();\n * ```\n */\n public abort(transactionId: string): void {\n this._stompHandler.abort(transactionId);\n }\n\n /**\n * ACK a message. It is preferable to acknowledge a message by calling [ack]{@link Message#ack} directly\n * on the {@link Message} handled by a subscription callback:\n *\n * ```javascript\n * var callback = function (message) {\n * // process the message\n * // acknowledge it\n * message.ack();\n * };\n * client.subscribe(destination, callback, {'ack': 'client'});\n * ```\n */\n public ack(messageId: string, subscriptionId: string, headers: StompHeaders = {}): void {\n this._stompHandler.ack(messageId, subscriptionId, headers);\n }\n\n /**\n * NACK a message. It is preferable to acknowledge a message by calling [nack]{@link Message#nack} directly\n * on the {@link Message} handled by a subscription callback:\n *\n * ```javascript\n * var callback = function (message) {\n * // process the message\n * // an error occurs, nack it\n * message.nack();\n * };\n * client.subscribe(destination, callback, {'ack': 'client'});\n * ```\n */\n public nack(messageId: string, subscriptionId: string, headers: StompHeaders = {}): void {\n this._stompHandler.nack(messageId, subscriptionId, headers);\n }\n}\n","import {Client} from '../client';\nimport {StompHeaders} from '../stomp-headers';\nimport {frameCallbackType, messageCallbackType} from '../types';\nimport {HeartbeatInfo} from './heartbeat-info';\n\n/**\n * Available for backward compatibility, please shift to using {@link Client}.\n *\n * **Deprecated**\n *\n * Part of `@stomp/stompjs`.\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\nexport class CompatClient extends Client {\n\n /**\n * It is no op now. No longer needed. Large packets work out of the box.\n */\n public maxWebSocketFrameSize: number = 16 * 1024;\n\n /**\n * Available for backward compatibility, please shift to using {@link Client}\n * and [Client#webSocketFactory]{@link Client#webSocketFactory}.\n *\n * **Deprecated**\n *\n * @internal\n */\n constructor(webSocketFactory: () => any) {\n super();\n this.reconnect_delay = 0;\n this.webSocketFactory = webSocketFactory;\n // Default from previous version\n this.debug = (...message: any[]) => {\n console.log(...message);\n };\n }\n\n private _parseConnect(...args: any[]): any {\n let closeEventCallback;\n let connectCallback;\n let errorCallback;\n let headers: StompHeaders = {};\n if (args.length < 2) {\n throw new Error(('Connect requires at least 2 arguments'));\n }\n if (typeof(args[1]) === 'function') {\n [headers, connectCallback, errorCallback, closeEventCallback] = args;\n } else {\n switch (args.length) {\n case 6:\n [headers.login, headers.passcode, connectCallback, errorCallback, closeEventCallback, headers.host] = args;\n break;\n default:\n [headers.login, headers.passcode, connectCallback, errorCallback, closeEventCallback] = args;\n }\n }\n\n return [headers, connectCallback, errorCallback, closeEventCallback];\n }\n\n /**\n * Available for backward compatibility, please shift to using [Client#activate]{@link Client#activate}.\n *\n * **Deprecated**\n *\n * The `connect` method accepts different number of arguments and types. See the Overloads list. Use the\n * version with headers to pass your broker specific options.\n *\n * overloads:\n * - connect(headers, connectCallback)\n * - connect(headers, connectCallback, errorCallback)\n * - connect(login, passcode, connectCallback)\n * - connect(login, passcode, connectCallback, errorCallback)\n * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback)\n * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback, host)\n *\n * params:\n * - headers, see [Client#connectHeaders]{@link Client#connectHeaders}\n * - connectCallback, see [Client#onConnect]{@link Client#onConnect}\n * - errorCallback, see [Client#onStompError]{@link Client#onStompError}\n * - closeEventCallback, see [Client#onWebSocketClose]{@link Client#onWebSocketClose}\n * - login [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)\n * - passcode [String], [Client#connectHeaders](../classes/Client.html#connectHeaders)\n * - host [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders)\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\n public connect(...args: any[]): void {\n const out = this._parseConnect(...args);\n\n if (out[0]) { this.connectHeaders = out[0]; }\n if (out[1]) { this.onConnect = out[1]; }\n if (out[2]) { this.onStompError = out[2]; }\n if (out[3]) { this.onWebSocketClose = out[3]; }\n\n super.activate();\n }\n\n /**\n * Available for backward compatibility, please shift to using [Client#deactivate]{@link Client#deactivate}.\n *\n * **Deprecated**\n *\n * See:\n * [Client#onDisconnect]{@link Client#onDisconnect}, and\n * [Client#disconnectHeaders]{@link Client#disconnectHeaders}\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\n public disconnect(disconnectCallback?: any, headers: StompHeaders = {}): void {\n if (disconnectCallback) {\n this.onDisconnect = disconnectCallback;\n }\n this.disconnectHeaders = headers;\n\n super.deactivate();\n }\n\n /**\n * Available for backward compatibility, use [Client#publish]{@link Client#publish}.\n *\n * Send a message to a named destination. Refer to your STOMP broker documentation for types\n * and naming of destinations. The headers will, typically, be available to the subscriber.\n * However, there may be special purpose headers corresponding to your STOMP broker.\n *\n * **Deprecated**, use [Client#publish]{@link Client#publish}\n *\n * Note: Body must be String. You will need to covert the payload to string in case it is not string (e.g. JSON)\n *\n * ```javascript\n * client.send(\"/queue/test\", {priority: 9}, \"Hello, STOMP\");\n *\n * // If you want to send a message with a body, you must also pass the headers argument.\n * client.send(\"/queue/test\", {}, \"Hello, STOMP\");\n * ```\n *\n * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html)\n */\n public send(destination: string, headers: {[key: string]: any} = {}, body: string = ''): void {\n headers = (Object as any).assign({}, headers);\n\n const skipContentLengthHeader = (headers['content-length'] === false);\n if (skipContentLengthHeader) {\n delete headers['content-length'];\n }\n this.publish({\n destination,\n headers: headers as StompHeaders,\n body,\n skipContentLengthHeader\n });\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#reconnectDelay]{@link Client#reconnectDelay}.\n *\n * **Deprecated**\n */\n set reconnect_delay(value: number) {\n this.reconnectDelay = value;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#webSocket]{@link Client#webSocket}.\n *\n * **Deprecated**\n */\n get ws(): any {\n return this._webSocket;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#connectedVersion]{@link Client#connectedVersion}.\n *\n * **Deprecated**\n */\n get version() {\n return this.connectedVersion;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.\n *\n * **Deprecated**\n */\n get onreceive(): messageCallbackType {\n return this.onUnhandledMessage;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.\n *\n * **Deprecated**\n */\n set onreceive(value: messageCallbackType) {\n this.onUnhandledMessage = value;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.\n * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}.\n *\n * **Deprecated**\n */\n get onreceipt(): frameCallbackType {\n return this.onUnhandledReceipt;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.\n *\n * **Deprecated**\n */\n set onreceipt(value: frameCallbackType) {\n this.onUnhandledReceipt = value;\n }\n\n private _heartbeatInfo: HeartbeatInfo = new HeartbeatInfo(this);\n\n /**\n * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}\n * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.\n *\n * **Deprecated**\n */\n get heartbeat() {\n return this._heartbeatInfo;\n }\n\n /**\n * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}\n * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.\n *\n * **Deprecated**\n */\n set heartbeat(value: {incoming: number, outgoing: number}) {\n this.heartbeatIncoming = value.incoming;\n this.heartbeatOutgoing = value.outgoing;\n }\n}\n","import {CompatClient} from './compat-client';\n\n/**\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport class HeartbeatInfo {\n constructor(private client: CompatClient) {\n }\n\n get outgoing(): number {\n return this.client.heartbeatOutgoing;\n }\n\n set outgoing(value: number) {\n this.client.heartbeatOutgoing = value;\n }\n\n get incoming(): number {\n return this.client.heartbeatIncoming;\n }\n\n set incoming(value: number) {\n this.client.heartbeatIncoming = value;\n }\n}\n","import {Versions} from '../versions';\nimport {CompatClient} from './compat-client';\n\n/**\n * STOMP Class, acts like a factory to create {@link Client}.\n *\n * Part of `@stomp/stompjs`.\n *\n * **Deprecated**\n *\n * It will be removed in next major version. Please switch to {@link Client}.\n */\nexport class Stomp {\n /**\n * In case you need to use a non standard class for WebSocket.\n *\n * For example when using within NodeJS environment:\n *\n * ```javascript\n * StompJs = require('../../esm5/');\n * Stomp = StompJs.Stomp;\n * Stomp.WebSocketClass = require('websocket').w3cwebsocket;\n * ```\n *\n * **Deprecated**\n *\n *\n * It will be removed in next major version. Please switch to {@link Client}\n * using [Client#webSocketFactory]{@link Client#webSocketFactory}.\n */\n // tslint:disable-next-line:variable-name\n public static WebSocketClass: any = null;\n\n /**\n * This method creates a WebSocket client that is connected to\n * the STOMP server located at the url.\n *\n * ```javascript\n * var url = \"ws://localhost:61614/stomp\";\n * var client = Stomp.client(url);\n * ```\n *\n * **Deprecated**\n *\n * It will be removed in next major version. Please switch to {@link Client}\n * using [Client#brokerURL]{@link Client#brokerURL}.\n */\n public static client(url: string, protocols?: string[]): CompatClient {\n // This is a hack to allow another implementation than the standard\n // HTML5 WebSocket class.\n //\n // It is possible to use another class by calling\n //\n // Stomp.WebSocketClass = MozWebSocket\n //\n // *prior* to call `Stomp.client()`.\n //\n // This hack is deprecated and `Stomp.over()` method should be used\n // instead.\n\n // See remarks on the function Stomp.over\n if (protocols == null) { protocols = Versions.default.protocolVersions(); }\n const wsFn = () => {\n const klass = Stomp.WebSocketClass || WebSocket;\n return new klass(url, protocols);\n };\n\n return new CompatClient(wsFn);\n }\n\n /**\n * This method is an alternative to [Stomp#client]{@link Stomp#client} to let the user\n * specify the WebSocket to use (either a standard HTML5 WebSocket or\n * a similar object).\n *\n * In order to support reconnection, the function Client._connect should be callable more than once.\n * While reconnecting\n * a new instance of underlying transport (TCP Socket, WebSocket or SockJS) will be needed. So, this function\n * alternatively allows passing a function that should return a new instance of the underlying socket.\n *\n * ```javascript\n * var client = Stomp.over(function(){\n * return new WebSocket('ws://localhost:15674/ws')\n * });\n * ```\n *\n * **Deprecated**\n *\n * It will be removed in next major version. Please switch to {@link Client}\n * using [Client#webSocketFactory]{@link Client#webSocketFactory}.\n */\n public static over(ws: any): CompatClient {\n const wsFn = typeof(ws) === 'function' ? ws : () => ws;\n\n return new CompatClient(wsFn);\n }\n}\n","import {BYTE} from './byte';\nimport {StompHeaders} from './stomp-headers';\nimport {IRawFrameType} from './types';\n\n/**\n * Frame class represents a STOMP frame. Many of the callbacks pass the Frame received from\n * the STOMP broker. For advanced usage you might need to access [headers]{@link Frame#headers}.\n *\n * Part of `@stomp/stompjs`.\n *\n * {@link Message} is an extended Frame.\n */\nexport class Frame {\n /**\n * STOMP Command\n */\n public command: string;\n\n /**\n * Headers, key value pairs.\n */\n public headers: StompHeaders;\n\n /**\n * Is this frame binary (based on whether body/binaryBody was passed when creating this frame).\n */\n public isBinaryBody: boolean;\n\n /**\n * body of the frame\n */\n get body(): string {\n if (!this._body && this.isBinaryBody) {\n this._body = new TextDecoder().decode(this._binaryBody);\n }\n return this._body;\n }\n private _body: string;\n\n /**\n * body as Uint8Array\n */\n get binaryBody(): Uint8Array {\n if (!this._binaryBody && !this.isBinaryBody) {\n this._binaryBody = new TextEncoder().encode(this._body);\n }\n return this._binaryBody;\n }\n private _binaryBody: Uint8Array;\n\n private escapeHeaderValues: boolean;\n private skipContentLengthHeader: boolean;\n\n /**\n * Frame constructor. `command`, `headers` and `body` are available as properties.\n *\n * @internal\n */\n constructor(params: {\n command: string, headers?: StompHeaders, body?: string, binaryBody?: Uint8Array,\n escapeHeaderValues?: boolean, skipContentLengthHeader?: boolean\n }) {\n const {command, headers, body, binaryBody, escapeHeaderValues, skipContentLengthHeader} = params;\n this.command = command;\n this.headers = (Object as any).assign({}, headers || {});\n\n if (binaryBody) {\n this._binaryBody = binaryBody;\n this.isBinaryBody = true;\n } else {\n this._body = body || '';\n this.isBinaryBody = false;\n }\n this.escapeHeaderValues = escapeHeaderValues || false;\n this.skipContentLengthHeader = skipContentLengthHeader || false;\n }\n\n /**\n * deserialize a STOMP Frame from raw data.\n *\n * @internal\n */\n public static fromRawFrame(rawFrame: IRawFrameType, escapeHeaderValues: boolean): Frame {\n const headers: StompHeaders = {};\n const trim = (str: string): string => str.replace(/^\\s+|\\s+$/g, '');\n\n // In case of repeated headers, as per standards, first value need to be used\n for (const header of rawFrame.headers.reverse()) {\n const idx = header.indexOf(':');\n\n const key = trim(header[0]);\n let value = trim(header[1]);\n\n if (escapeHeaderValues && (rawFrame.command !== 'CONNECT') && (rawFrame.command !== 'CONNECTED')) {\n value = Frame.hdrValueUnEscape(value);\n }\n\n headers[key] = value;\n }\n\n return new Frame({\n command: rawFrame.command,\n headers,\n binaryBody: rawFrame.binaryBody,\n escapeHeaderValues\n });\n }\n\n /**\n * @internal\n */\n public toString(): string {\n return this.serializeCmdAndHeaders();\n }\n\n /**\n * serialize this Frame in a format suitable to be passed to WebSocket.\n * If the body is string the output will be string.\n * If the body is binary (i.e. of type Unit8Array) it will be serialized to ArrayBuffer.\n *\n * @internal\n */\n public serialize(): string|ArrayBuffer {\n const cmdAndHeaders = this.serializeCmdAndHeaders();\n\n if (this.isBinaryBody) {\n return Frame.toUnit8Array(cmdAndHeaders, this._binaryBody).buffer;\n } else {\n return cmdAndHeaders + this._body + BYTE.NULL;\n }\n }\n\n private serializeCmdAndHeaders(): string {\n const lines = [this.command];\n if (this.skipContentLengthHeader) {\n delete this.headers['content-length'];\n }\n\n for (const name of Object.keys(this.headers || {})) {\n const value = this.headers[name];\n if (this.escapeHeaderValues && (this.command !== 'CONNECT') && (this.command !== 'CONNECTED')) {\n lines.push(`${name}:${Frame.hdrValueEscape(`${value}`)}`);\n } else {\n lines.push(`${name}:${value}`);\n }\n }\n if (this.isBinaryBody || (!this.isBodyEmpty() && !this.skipContentLengthHeader)) {\n lines.push(`content-length:${this.bodyLength()}`);\n }\n return lines.join(BYTE.LF) + BYTE.LF + BYTE.LF;\n }\n\n private isBodyEmpty(): boolean {\n return this.bodyLength() === 0;\n }\n\n private bodyLength(): number {\n const binaryBody = this.binaryBody;\n return binaryBody ? binaryBody.length : 0;\n }\n\n /**\n * Compute the size of a UTF-8 string by counting its number of bytes\n * (and not the number of characters composing the string)\n */\n private static sizeOfUTF8(s: string): number {\n return s ? new TextEncoder().encode(s).length : 0;\n }\n\n private static toUnit8Array(cmdAndHeaders: string, binaryBody: Uint8Array): Uint8Array {\n const uint8CmdAndHeaders = new TextEncoder().encode(cmdAndHeaders);\n const nullTerminator = new Uint8Array([0]);\n const uint8Frame = new Uint8Array(uint8CmdAndHeaders.length + binaryBody.length + nullTerminator.length);\n\n uint8Frame.set(uint8CmdAndHeaders);\n uint8Frame.set(binaryBody, uint8CmdAndHeaders.length);\n uint8Frame.set(nullTerminator, uint8CmdAndHeaders.length + binaryBody.length);\n\n return uint8Frame;\n }\n /**\n * Serialize a STOMP frame as per STOMP standards, suitable to be sent to the STOMP broker.\n *\n * @internal\n */\n public static marshall(params: {\n command: string, headers?: StompHeaders, body?: string, binaryBody?: Uint8Array,\n escapeHeaderValues?: boolean, skipContentLengthHeader?: boolean\n }) {\n const frame = new Frame(params);\n return frame.serialize();\n }\n\n /**\n * Escape header values\n */\n private static hdrValueEscape(str: string): string {\n return str.replace(/\\\\/g, '\\\\\\\\').replace(/\\r/g, '\\\\r').replace(/\\n/g, '\\\\n').replace(/:/g, '\\\\c');\n }\n\n /**\n * UnEscape header values\n */\n private static hdrValueUnEscape(str: string): string {\n return str.replace(/\\\\r/g, '\\r').replace(/\\\\n/g, '\\n').replace(/\\\\c/g, ':').replace(/\\\\\\\\/g, '\\\\');\n }\n}\n","export * from './client';\nexport * from './frame';\nexport * from './message';\nexport * from './parser';\nexport * from './stomp-config';\nexport * from './stomp-headers';\nexport * from './stomp-subscription';\nexport * from './transaction';\nexport * from './types';\nexport * from './versions';\n\n// Compatibility code\nexport * from './compatibility/compat-client';\nexport * from './compatibility/stomp';\n","import {Frame} from './frame';\nimport {StompHeaders} from './stomp-headers';\n\n/**\n * Instance of Message will be passed to [subscription callback]{@link Client#subscribe}\n * and [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.\n * Since it is an extended {@link Frame}, you can access [headers]{@link Frame#headers}\n * and [body]{@link Frame#body} as properties.\n *\n * Part of `@stomp/stompjs`.\n *\n * See [Client#subscribe]{@link Client#subscribe} for example.\n */\nexport class Message extends Frame {\n /**\n * When subscribing with manual acknowledgement, call this method on the message to ACK the message.\n *\n * See [Client#ack]{@link Client#ack} for an example.\n */\n public ack: (headers?: StompHeaders) => void;\n\n /**\n * When subscribing with manual acknowledgement, call this method on the message to NACK the message.\n *\n * See [Client#nack]{@link Client#nack} for an example.\n */\n public nack: (headers?: StompHeaders) => void;\n}\n","import {IRawFrameType} from './types';\n\n/**\n * @internal\n */\nconst NULL = 0;\n/**\n * @internal\n */\nconst LF = 10;\n/**\n * @internal\n */\nconst CR = 13;\n/**\n * @internal\n */\nconst COLON = 58;\n\n/**\n * This is an evented, rec descent parser.\n * A stream of Octets can be passed and whenever it recognizes\n * a complete Frame or an incoming ping it will invoke the registered callbacks.\n *\n * All incoming Octets are fed into _onByte function.\n * Depending on current state the _onByte function keeps changing.\n * Depending on the state it keeps accumulating into _token and _results.\n * State is indicated by current value of _onByte, all states are named as _collect.\n *\n * STOMP standards https://stomp.github.io/stomp-specification-1.2.html\n * imply that all lengths are considered in bytes (instead of string lengths).\n * So, before actual parsing, if the incoming data is String it is converted to Octets.\n * This allows faithful implementation of the protocol and allows NULL Octets to be present in the body.\n *\n * There is no peek function on the incoming data.\n * When a state change occurs based on an Octet without consuming the Octet,\n * the Octet, after state change, is fed again (_reinjectByte).\n * This became possible as the state change can be determined by inspecting just one Octet.\n *\n * There are two modes to collect the body, if content-length header is there then it by counting Octets\n * otherwise it is determined by NULL terminator.\n *\n * Following the standards, the command and headers are converted to Strings\n * and the body is returned as Octets.\n * Headers are returned as an array and not as Hash - to allow multiple occurrence of an header.\n *\n * This parser does not use Regular Expressions as that can only operate on Strings.\n *\n * It handles if multiple STOMP frames are given as one chunk, a frame is split into multiple chunks, or\n * any combination there of. The parser remembers its state (any partial frame) and continues when a new chunk\n * is pushed.\n *\n * Typically the higher level function will convert headers to Hash, handle unescaping of header values\n * (which is protocol version specific), and convert body to text.\n *\n * Check the parser.spec.js to understand cases that this parser is supposed to handle.\n *\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport class Parser {\n private readonly _encoder = new TextEncoder();\n private readonly _decoder = new TextDecoder();\n\n private _results: IRawFrameType;\n\n private _token: number[] = [];\n private _headerKey: string;\n private _bodyBytesRemaining: number;\n\n private _onByte: (byte: number) => void;\n\n public constructor(public onFrame: (rawFrame: IRawFrameType) => void, public onIncomingPing: () => void) {\n this._initState();\n }\n\n public parseChunk(segment: string|ArrayBuffer) {\n let chunk: Uint8Array;\n\n if ((segment instanceof ArrayBuffer)) {\n chunk = new Uint8Array(segment);\n } else {\n chunk = this._encoder.encode(segment);\n }\n\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < chunk.length; i++) {\n const byte = chunk[i];\n this._onByte(byte);\n }\n }\n\n // The following implements a simple Rec Descent Parser.\n // The grammar is simple and just one byte tells what should be the next state\n\n private _collectFrame(byte: number): void {\n if (byte === NULL) { // Ignore\n return;\n }\n if (byte === CR) { // Ignore CR\n return;\n }\n if (byte === LF) { // Incoming Ping\n this.onIncomingPing();\n return;\n }\n\n this._onByte = this._collectCommand;\n this._reinjectByte(byte);\n }\n\n private _collectCommand(byte: number): void {\n if (byte === CR) { // Ignore CR\n return;\n }\n if (byte === LF) {\n this._results.command = this._consumeTokenAsUTF8();\n this._onByte = this._collectHeaders;\n return;\n }\n\n this._consumeByte(byte);\n }\n\n private _collectHeaders(byte: number): void {\n if (byte === CR) { // Ignore CR\n return;\n }\n if (byte === LF) {\n this._setupCollectBody();\n return;\n }\n this._onByte = this._collectHeaderKey;\n this._reinjectByte(byte);\n }\n\n private _reinjectByte(byte: number) {\n this._onByte(byte);\n }\n\n private _collectHeaderKey(byte: number): void {\n if (byte === COLON) {\n this._headerKey = this._consumeTokenAsUTF8();\n this._onByte = this._collectHeaderValue;\n return;\n }\n this._consumeByte(byte);\n }\n\n private _collectHeaderValue(byte: number): void {\n if (byte === CR) { // Ignore CR\n return;\n }\n if (byte === LF) {\n this._results.headers.push([this._headerKey, this._consumeTokenAsUTF8()]);\n this._headerKey = undefined;\n this._onByte = this._collectHeaders;\n return;\n }\n this._consumeByte(byte);\n }\n\n private _setupCollectBody() {\n const contentLengthHeader = this._results.headers.filter((header: [string, string]) => {\n return header[0] === 'content-length';\n })[0];\n\n if (contentLengthHeader) {\n this._bodyBytesRemaining = parseInt(contentLengthHeader[1], 10);\n this._onByte = this._collectBodyFixedSize;\n } else {\n this._onByte = this._collectBodyNullTerminated;\n }\n }\n\n private _collectBodyNullTerminated(byte: number): void {\n if (byte === NULL) {\n this._retrievedBody();\n return;\n }\n this._consumeByte(byte);\n }\n\n private _collectBodyFixedSize(byte: number): void {\n // It is post decrement, so that we discard the trailing NULL octet\n if (this._bodyBytesRemaining-- === 0) {\n this._retrievedBody();\n return;\n }\n this._consumeByte(byte);\n }\n\n private _retrievedBody() {\n this._results.binaryBody = this._consumeTokenAsRaw();\n\n this.onFrame(this._results);\n\n this._initState();\n }\n\n // Rec Descent Parser helpers\n\n private _consumeByte(byte: number) {\n this._token.push(byte);\n }\n\n private _consumeTokenAsUTF8() {\n return this._decoder.decode(this._consumeTokenAsRaw());\n }\n\n private _consumeTokenAsRaw() {\n const rawResult = new Uint8Array(this._token);\n this._token = [];\n return rawResult;\n }\n\n private _initState() {\n this._results = {\n command: undefined,\n headers: [],\n binaryBody: undefined\n };\n\n this._token = [];\n this._headerKey = undefined;\n\n this._onByte = this._collectFrame;\n }\n\n}\n","import {StompHeaders} from './stomp-headers';\nimport {\n closeEventCallbackType,\n debugFnType,\n frameCallbackType,\n messageCallbackType\n} from './types';\nimport {Versions} from './versions';\n\n/**\n * Configuration options for STOMP Client, each key corresponds to\n * field by the same name in {@link Client}. This can be passed to\n * the constructor of {@link Client} or to [Client#configure]{@link Client#configure}.\n *\n * Part of `@stomp/stompjs`.\n */\nexport class StompConfig {\n /**\n * See [Client#brokerURL]{@link Client#brokerURL}.\n */\n public brokerURL?: string;\n\n /**\n * See See [Client#stompVersions]{@link Client#stompVersions}.\n */\n public stompVersions?: Versions;\n\n /**\n * See [Client#webSocketFactory]{@link Client#webSocketFactory}.\n */\n public webSocketFactory?: () => any;\n\n /**\n * See [Client#reconnectDelay]{@link Client#reconnectDelay}.\n */\n public reconnectDelay?: number;\n\n /**\n * See [Client#heartbeatIncoming]{@link Client#heartbeatIncoming}.\n */\n public heartbeatIncoming?: number;\n\n /**\n * See [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}.\n */\n public heartbeatOutgoing?: number;\n\n /**\n * See [Client#connectHeaders]{@link Client#connectHeaders}.\n */\n public connectHeaders?: StompHeaders;\n\n /**\n * See [Client#disconnectHeaders]{@link Client#disconnectHeaders}.\n */\n public disconnectHeaders?: StompHeaders;\n\n /**\n * See [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}.\n */\n public onUnhandledMessage?: messageCallbackType;\n\n /**\n * See [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}.\n */\n public onUnhandledReceipt?: frameCallbackType;\n\n /**\n * See [Client#onUnhandledFrame]{@link Client#onUnhandledFrame}.\n */\n public onUnhandledFrame?: frameCallbackType;\n\n /**\n * See [Client#beforeConnect]{@link Client#beforeConnect}.\n */\n public beforeConnect?: () => void;\n\n /**\n * See [Client#onConnect]{@link Client#onConnect}.\n */\n public onConnect?: frameCallbackType;\n\n /**\n * See [Client#onDisconnect]{@link Client#onDisconnect}.\n */\n public onDisconnect?: frameCallbackType;\n\n /**\n * See [Client#onStompError]{@link Client#onStompError}.\n */\n public onStompError?: frameCallbackType;\n\n /**\n * See [Client#onWebSocketClose]{@link Client#onWebSocketClose}.\n */\n public onWebSocketClose?: closeEventCallbackType;\n\n /**\n * See [Client#debug]{@link Client#debug}.\n */\n public debug?: debugFnType;\n}\n","import {BYTE} from './byte';\nimport {Client} from './client';\nimport {Frame} from './frame';\nimport {Message} from './message';\nimport {Parser} from './parser';\nimport {StompConfig} from './stomp-config';\nimport {StompHeaders} from './stomp-headers';\nimport {StompSubscription} from './stomp-subscription';\nimport {Transaction} from './transaction';\nimport {closeEventCallbackType, debugFnType, frameCallbackType, IPublishParams, messageCallbackType} from './types';\nimport {Versions} from './versions';\n\n/**\n * The STOMP protocol handler\n *\n * Part of `@stomp/stompjs`.\n *\n * @internal\n */\nexport class StompHandler {\n public debug: debugFnType;\n\n public stompVersions: Versions;\n\n public connectHeaders: StompHeaders;\n\n public disconnectHeaders: StompHeaders;\n\n public heartbeatIncoming: number;\n\n public heartbeatOutgoing: number;\n\n public onUnhandledMessage: messageCallbackType;\n\n public onUnhandledReceipt: frameCallbackType;\n\n public onUnhandledFrame: frameCallbackType;\n\n public onConnect: frameCallbackType;\n\n public onDisconnect: frameCallbackType;\n\n public onStompError: frameCallbackType;\n\n public onWebSocketClose: closeEventCallbackType;\n\n get connectedVersion(): string {\n return this._connectedVersion;\n }\n private _connectedVersion: string;\n\n get connected(): boolean {\n return this._connected;\n }\n\n private _connected: boolean;\n\n private readonly _subscriptions: { [key: string]: messageCallbackType };\n private readonly _receiptWatchers: { [key: string]: frameCallbackType };\n private _partialData: string;\n private _escapeHeaderValues: boolean;\n private _counter: number;\n private _pinger: any;\n private _ponger: any;\n private _lastServerActivityTS: number;\n\n constructor(private _client: Client, private _webSocket: WebSocket, config: StompConfig = {}) {\n // used to index subscribers\n this._counter = 0;\n\n // subscription callbacks indexed by subscriber's ID\n this._subscriptions = {};\n\n // receipt-watchers indexed by receipts-ids\n this._receiptWatchers = {};\n\n this._partialData = '';\n\n this._escapeHeaderValues = false;\n\n this._lastServerActivityTS = Date.now();\n\n this.configure(config);\n }\n\n public configure(conf: StompConfig): void {\n // bulk assign all properties to this\n (Object as any).assign(this, conf);\n }\n\n public start(): void {\n const parser = new Parser(\n // On Frame\n (rawFrame) => {\n const frame = Frame.fromRawFrame(rawFrame, this._escapeHeaderValues);\n\n this.debug(`<<< ${frame}`);\n\n const serverFrameHandler = this._serverFrameHandlers[frame.command] || this.onUnhandledFrame;\n serverFrameHandler(frame);\n },\n // On Incoming Ping\n () => {\n this.debug('<<< PONG');\n }\n );\n\n this._webSocket.onmessage = (evt: any) => {\n this.debug('Received data');\n this._lastServerActivityTS = Date.now();\n\n parser.parseChunk(evt.data);\n };\n\n this._webSocket.onclose = (closeEvent: any): void => {\n this.debug(`Connection closed to ${this._webSocket.url}`);\n this.onWebSocketClose(closeEvent);\n this._cleanUp();\n };\n\n this._webSocket.onopen = () => {\n // Clone before updating\n const connectHeaders = (Object as any).assign({}, this.connectHeaders);\n\n this.debug('Web Socket Opened...');\n connectHeaders['accept-version'] = this.stompVersions.supportedVersions();\n connectHeaders['heart-beat'] = [this.heartbeatOutgoing, this.heartbeatIncoming].join(',');\n this._transmit({command: 'CONNECT', headers: connectHeaders});\n };\n }\n\n private readonly _serverFrameHandlers: { [key: string]: frameCallbackType } = {\n\n // [CONNECTED Frame](http://stomp.github.com/stomp-specification-1.2.html#CONNECTED_Frame)\n CONNECTED: (frame) => {\n this.debug(`connected to server ${frame.headers.server}`);\n this._connected = true;\n this._connectedVersion = frame.headers.version;\n // STOMP version 1.2 needs header values to be escaped\n if (this._connectedVersion === Versions.V1_2) {\n this._escapeHeaderValues = true;\n }\n\n this._setupHeartbeat(frame.headers);\n this.onConnect(frame);\n },\n\n // [MESSAGE Frame](http://stomp.github.com/stomp-specification-1.2.html#MESSAGE)\n MESSAGE: (frame) => {\n // the callback is registered when the client calls\n // `subscribe()`.\n // If there is no registered subscription for the received message,\n // the default `onUnhandledMessage` callback is used that the client can set.\n // This is useful for subscriptions that are automatically created\n // on the browser side (e.g. [RabbitMQ's temporary\n // queues](http://www.rabbitmq.com/stomp.html)).\n const subscription = frame.headers.subscription;\n const onReceive = this._subscriptions[subscription] || this.onUnhandledMessage;\n\n // bless the frame to be a Message\n const message = frame as Message;\n\n const client = this;\n const messageId = this._connectedVersion === Versions.V1_2 ? message.headers.ack : message.headers['message-id'];\n\n // add `ack()` and `nack()` methods directly to the returned frame\n // so that a simple call to `message.ack()` can acknowledge the message.\n message.ack = (headers: StompHeaders = {}): void => {\n return client.ack(messageId, subscription, headers);\n };\n message.nack = (headers: StompHeaders = {}): void => {\n return client.nack(messageId, subscription, headers);\n };\n onReceive(message);\n },\n\n // [RECEIPT Frame](http://stomp.github.com/stomp-specification-1.2.html#RECEIPT)\n RECEIPT: (frame) => {\n const callback = this._receiptWatchers[frame.headers['receipt-id']];\n if (callback) {\n callback(frame);\n // Server will acknowledge only once, remove the callback\n delete this._receiptWatchers[frame.headers['receipt-id']];\n } else {\n this.onUnhandledReceipt(frame);\n }\n },\n\n // [ERROR Frame](http://stomp.github.com/stomp-specification-1.2.html#ERROR)\n ERROR: (frame) => {\n this.onStompError(frame);\n }\n };\n\n private _setupHeartbeat(headers: StompHeaders): void {\n if ((headers.version !== Versions.V1_1 && headers.version !== Versions.V1_2)) {\n return;\n }\n\n // heart-beat header received from the server looks like:\n //\n // heart-beat: sx, sy\n const [serverOutgoing, serverIncoming] = (headers['heart-beat']).split(',').map((v: string) => parseInt(v, 10));\n\n if ((this.heartbeatOutgoing !== 0) && (serverIncoming !== 0)) {\n const ttl: number = Math.max(this.heartbeatOutgoing, serverIncoming);\n this.debug(`send PING every ${ttl}ms`);\n this._pinger = setInterval(() => {\n this._webSocket.send(BYTE.LF);\n this.debug('>>> PING');\n }, ttl);\n }\n\n if ((this.heartbeatIncoming !== 0) && (serverOutgoing !== 0)) {\n const ttl: number = Math.max(this.heartbeatIncoming, serverOutgoing);\n this.debug(`check PONG every ${ttl}ms`);\n this._ponger = setInterval(() => {\n const delta = Date.now() - this._lastServerActivityTS;\n // We wait twice the TTL to be flexible on window's setInterval calls\n if (delta > (ttl * 2)) {\n this.debug(`did not receive server activity for the last ${delta}ms`);\n this._webSocket.close();\n }\n }, ttl);\n }\n }\n\n private _transmit(params: { command: string, headers?: StompHeaders,\n body?: string, binaryBody?: Uint8Array, skipContentLengthHeader?: boolean }): void {\n const {command, headers, body, binaryBody, skipContentLengthHeader} = params;\n const frame = new Frame({\n command,\n headers,\n body,\n binaryBody,\n escapeHeaderValues: this._escapeHeaderValues,\n skipContentLengthHeader\n });\n this.debug(`>>> ${frame}`);\n this._webSocket.send(frame.serialize());\n/* Do we need this?\n // if necessary, split the *STOMP* frame to send it on many smaller\n // *WebSocket* frames\n while (true) {\n if (out.length > this.maxWebSocketFrameSize) {\n this._webSocket.send(out.substring(0, this.maxWebSocketFrameSize));\n out = out.substring(this.maxWebSocketFrameSize);\n this.debug(`remaining = ${out.length}`);\n } else {\n this._webSocket.send(out);\n return;\n }\n }\n*/\n }\n\n public dispose(): void {\n if (this.connected) {\n try {\n // clone before updating\n const disconnectHeaders = (Object as any).assign({}, this.disconnectHeaders);\n\n if (!disconnectHeaders.receipt) {\n disconnectHeaders.receipt = `close-${this._counter++}`;\n }\n this.watchForReceipt(disconnectHeaders.receipt, (frame) => {\n this._webSocket.close();\n this._cleanUp();\n this.onDisconnect(frame);\n });\n this._transmit({command: 'DISCONNECT', headers: disconnectHeaders});\n } catch (error) {\n this.debug(`Ignoring error during disconnect ${error}`);\n }\n } else {\n if (this._webSocket.readyState === WebSocket.CONNECTING || this._webSocket.readyState === WebSocket.OPEN) {\n this._webSocket.close();\n }\n }\n }\n\n private _cleanUp() {\n this._connected = false;\n\n if (this._pinger) {\n clearInterval(this._pinger);\n }\n if (this._ponger) {\n clearInterval(this._ponger);\n }\n }\n\n public publish(params: IPublishParams): void {\n const {destination, headers, body, binaryBody, skipContentLengthHeader} = params;\n const hdrs: StompHeaders = (Object as any).assign({destination}, headers);\n this._transmit({\n command: 'SEND',\n headers: hdrs,\n body,\n binaryBody,\n skipContentLengthHeader\n });\n }\n\n public watchForReceipt(receiptId: string, callback: frameCallbackType): void {\n this._receiptWatchers[receiptId] = callback;\n }\n\n public subscribe(destination: string, callback: messageCallbackType, headers: StompHeaders = {}): StompSubscription {\n headers = (Object as any).assign({}, headers);\n\n if (!headers.id) {\n headers.id = `sub-${this._counter++}`;\n }\n headers.destination = destination;\n this._subscriptions[headers.id] = callback;\n this._transmit({command: 'SUBSCRIBE', headers});\n const client = this;\n return {\n id: headers.id,\n\n unsubscribe(hdrs) {\n return client.unsubscribe(headers.id, hdrs);\n }\n };\n }\n\n public unsubscribe(id: string, headers: StompHeaders = {}): void {\n headers = (Object as any).assign({}, headers);\n\n delete this._subscriptions[id];\n headers.id = id;\n this._transmit({command: 'UNSUBSCRIBE', headers});\n }\n\n public begin(transactionId: string): Transaction {\n const txId = transactionId || (`tx-${this._counter++}`);\n this._transmit({\n command: 'BEGIN', headers: {\n transaction: txId\n }\n });\n const client = this;\n return {\n id: txId,\n commit(): void {\n client.commit(txId);\n },\n abort(): void {\n client.abort(txId);\n }\n };\n }\n\n public commit(transactionId: string): void {\n this._transmit({\n command: 'COMMIT', headers: {\n transaction: transactionId\n }\n });\n }\n\n public abort(transactionId: string): void {\n this._transmit({\n command: 'ABORT', headers: {\n transaction: transactionId\n }\n });\n }\n\n public ack(messageId: string, subscriptionId: string, headers: StompHeaders = {}): void {\n headers = (Object as any).assign({}, headers);\n\n if (this._connectedVersion === Versions.V1_2) {\n headers.id = messageId;\n } else {\n headers['message-id'] = messageId;\n }\n headers.subscription = subscriptionId;\n this._transmit({command: 'ACK', headers});\n }\n\n public nack(messageId: string, subscriptionId: string, headers: StompHeaders = {}): void {\n headers = (Object as any).assign({}, headers);\n\n if (this._connectedVersion === Versions.V1_2) {\n headers.id = messageId;\n } else {\n headers['message-id'] = messageId;\n }\n headers.subscription = subscriptionId;\n return this._transmit({command: 'NACK', headers});\n }\n\n}\n","/**\n * STOMP headers. Many functions calls will accept headers as parameters.\n * The headers sent by Broker will be available as [Frame#headers]{@link Frame#headers}.\n *\n * `key` and `value` must be valid strings.\n * In addition, `key` must not contain `CR`, `LF`, or `:`.\n *\n * Part of `@stomp/stompjs`.\n */\nexport class StompHeaders { [key: string]: string }\n","import {StompHeaders} from './stomp-headers';\n\n/**\n * Call [Client#subscribe]{@link Client#subscribe} to create a StompSubscription.\n *\n * Part of `@stomp/stompjs`.\n */\nexport class StompSubscription {\n /**\n * Id associated with this subscription.\n */\n public id: string;\n\n /**\n * Unsubscribe. See [Client#unsubscribe]{@link Client#unsubscribe} for an example.\n */\n public unsubscribe: (headers?: StompHeaders) => void;\n}\n","/**\n * A Transaction is created by calling [Client#begin]{@link Client#begin}\n *\n * Part of `@stomp/stompjs`.\n *\n * TODO: Example and caveat\n */\nexport class Transaction {\n /**\n * You will need to access this to send, ack, or nack within this transaction.\n */\n public id: string;\n\n /**\n * Commit this transaction. See [Client#commit]{@link Client#commit} for an example.\n */\n public commit: () => void;\n\n /**\n * Abort this transaction. See [Client#abort]{@link Client#abort} for an example.\n */\n public abort: () => void;\n}\n","/**\n * Supported STOMP versions\n *\n * Part of `@stomp/stompjs`.\n */\nexport class Versions {\n /**\n * Indicates protocol version 1.0\n */\n public static V1_0 = '1.0';\n /**\n * Indicates protocol version 1.1\n */\n public static V1_1 = '1.1';\n /**\n * Indicates protocol version 1.2\n */\n public static V1_2 = '1.2';\n\n /**\n * @internal\n */\n public static default = new Versions([Versions.V1_0, Versions.V1_1, Versions.V1_2]);\n\n /**\n * Takes an array of string of versions, typical elements '1.0', '1.1', or '1.2'\n *\n * You will an instance if this class if you want to override supported versions to be declared during\n * STOMP handshake.\n */\n constructor(public versions: string[]) {\n }\n\n /**\n * Used as part of CONNECT STOMP Frame\n */\n public supportedVersions() {\n return this.versions.join(',');\n }\n\n /**\n * Used while creating a WebSocket\n */\n public protocolVersions() {\n return this.versions.map((x) => `v${x.replace('.', '')}.stomp`);\n }\n}\n"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("StompJs",[],t):"object"==typeof exports?exports.StompJs=t():e.StompJs=t()}(window,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.versions=e}return e.prototype.supportedVersions=function(){return this.versions.join(",")},e.prototype.protocolVersions=function(){return this.versions.map(function(e){return"v"+e.replace(".","")+".stomp"})},e.V1_0="1.0",e.V1_1="1.1",e.V1_2="1.2",e.default=new e([e.V1_0,e.V1_1,e.V1_2]),e}();t.Versions=o},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=e.call(this)||this;return n.maxWebSocketFrameSize=16384,n._heartbeatInfo=new r(n),n.reconnect_delay=0,n.webSocketFactory=t,n.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.log.apply(console,e)},n}return o(t,e),t.prototype._parseConnect=function(){for(var e,t,n,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var r={};if(o.length<2)throw"Connect requires at least 2 arguments";if("function"==typeof o[1])r=o[0],t=o[1],n=o[2],e=o[3];else switch(o.length){case 6:r.login=o[0],r.passcode=o[1],t=o[2],n=o[3],e=o[4],r.host=o[5];break;default:r.login=o[0],r.passcode=o[1],t=o[2],n=o[3],e=o[4]}return[r,t,n,e]},t.prototype.connect=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=this._parseConnect.apply(this,t);o[0]&&(this.connectHeaders=o[0]),o[1]&&(this.onConnect=o[1]),o[2]&&(this.onStompError=o[2]),o[3]&&(this.onWebSocketClose=o[3]),e.prototype.activate.call(this)},t.prototype.disconnect=function(t,n){void 0===n&&(n={}),t&&(this.onDisconnect=t),this.disconnectHeaders=n,e.prototype.deactivate.call(this)},t.prototype.send=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n="");var o=!1===t["content-length"];o&&delete t["content-length"],this.publish({destination:e,headers:t,body:n,skipContentLengthHeader:o})},Object.defineProperty(t.prototype,"reconnect_delay",{set:function(e){this.reconnectDelay=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ws",{get:function(){return this._webSocket},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this.connectedVersion},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onreceive",{get:function(){return this.onUnhandledMessage},set:function(e){this.onUnhandledMessage=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onreceipt",{get:function(){return this.onUnhandledReceipt},set:function(e){this.onUnhandledReceipt=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"heartbeat",{get:function(){return this._heartbeatInfo},set:function(e){this.heartbeatIncoming=e.incoming,this.heartbeatOutgoing=e.outgoing},enumerable:!0,configurable:!0}),t}(n(5).Client);t.CompatClient=i;var r=function(){function e(e){this.client=e}return Object.defineProperty(e.prototype,"outgoing",{get:function(){return this.client.heartbeatOutgoing},set:function(e){this.client.heartbeatOutgoing=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"incoming",{get:function(){return this.client.heartbeatIncoming},set:function(e){this.client.heartbeatIncoming=e},enumerable:!0,configurable:!0}),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.onFrame=e,this.onIncomingPing=t,this._encoder=new TextEncoder,this._decoder=new TextDecoder,this._token=[],this._initState()}return e.prototype.parseChunk=function(e){var t;t=e instanceof ArrayBuffer?new Uint8Array(e):this._encoder.encode(e);for(var n=0;n<t.length;n++){var o=t[n];this._onByte(o)}},e.prototype._collectFrame=function(e){0!==e&&13!==e&&(10!==e?(this._onByte=this._collectCommand,this._reinjectByte(e)):this.onIncomingPing())},e.prototype._collectCommand=function(e){if(13!==e)return 10===e?(this._results.command=this._consumeTokenAsUTF8(),void(this._onByte=this._collectHeaders)):void this._consumeByte(e)},e.prototype._collectHeaders=function(e){13!==e&&(10!==e?(this._onByte=this._collectHeaderKey,this._reinjectByte(e)):this._setupCollectBody())},e.prototype._reinjectByte=function(e){this._onByte(e)},e.prototype._collectHeaderKey=function(e){if(58===e)return this._headerKey=this._consumeTokenAsUTF8(),void(this._onByte=this._collectHeaderValue);this._consumeByte(e)},e.prototype._collectHeaderValue=function(e){if(13!==e)return 10===e?(this._results.headers.push([this._headerKey,this._consumeTokenAsUTF8()]),this._headerKey=void 0,void(this._onByte=this._collectHeaders)):void this._consumeByte(e)},e.prototype._setupCollectBody=function(){var e=this._results.headers.filter(function(e){return"content-length"===e[0]})[0];e?(this._bodyBytesRemaining=parseInt(e[1]),this._onByte=this._collectBodyFixedSize):this._onByte=this._collectBodyNullTerminated},e.prototype._collectBodyNullTerminated=function(e){0!==e?this._consumeByte(e):this._retrievedBody()},e.prototype._collectBodyFixedSize=function(e){0!=this._bodyBytesRemaining--?this._consumeByte(e):this._retrievedBody()},e.prototype._retrievedBody=function(){this._results.binaryBody=this._consumeTokenAsRaw(),this.onFrame(this._results),this._initState()},e.prototype._consumeByte=function(e){this._token.push(e)},e.prototype._consumeTokenAsUTF8=function(){return this._decoder.decode(this._consumeTokenAsRaw())},e.prototype._consumeTokenAsRaw=function(){var e=new Uint8Array(this._token);return this._token=[],e},e.prototype._initState=function(){this._results={command:void 0,headers:[],binaryBody:void 0},this._token=[],this._headerKey=void 0,this._onByte=this._collectFrame},e}();t.Parser=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=function(){function e(e){var t=e.command,n=e.headers,o=e.body,i=e.binaryBody,r=e.escapeHeaderValues,s=e.skipContentLengthHeader;this.command=t,this.headers=n||{},i?(this._binaryBody=i,this.isBinaryBody=!0):(this._body=o||"",this.isBinaryBody=!1),this.escapeHeaderValues=r||!1,this.skipContentLengthHeader=s||!1}return Object.defineProperty(e.prototype,"body",{get:function(){return!this._body&&this.isBinaryBody&&(this._body=(new TextDecoder).decode(this._binaryBody)),this._body},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"binaryBody",{get:function(){return this._binaryBody||this.isBinaryBody||(this._binaryBody=(new TextEncoder).encode(this._body)),this._binaryBody},enumerable:!0,configurable:!0}),e.fromRawFrame=function(t,n){for(var o={},i=function(e){return e.replace(/^\s+|\s+$/g,"")},r=0,s=t.headers.reverse();r<s.length;r++){var c=s[r],a=(c.indexOf(":"),i(c[0])),d=i(c[1]);n&&"CONNECT"!==t.command&&"CONNECTED"!==t.command&&(d=e.hdrValueUnEscape(d)),o[a]=d}return new e({command:t.command,headers:o,binaryBody:t.binaryBody,escapeHeaderValues:n})},e.prototype.toString=function(){return this.serializeCmdAndHeaders()},e.prototype.serialize=function(){var t=this.serializeCmdAndHeaders();return this.isBinaryBody?e.toUnit8Array(t,this._binaryBody).buffer:t+this._body+o.Byte.NULL},e.prototype.serializeCmdAndHeaders=function(){var t=[this.command];this.skipContentLengthHeader&&delete this.headers["content-length"];for(var n=0,i=Object.keys(this.headers||{});n<i.length;n++){var r=i[n],s=this.headers[r];this.escapeHeaderValues&&"CONNECT"!==this.command&&"CONNECTED"!==this.command?t.push(r+":"+e.hdrValueEscape(""+s)):t.push(r+":"+s)}return(this.isBinaryBody||!this.isBodyEmpty()&&!this.skipContentLengthHeader)&&t.push("content-length:"+this.bodyLength()),t.join(o.Byte.LF)+o.Byte.LF+o.Byte.LF},e.prototype.isBodyEmpty=function(){return 0===this.bodyLength()},e.prototype.bodyLength=function(){var e=this.binaryBody;return e?e.length:0},e.sizeOfUTF8=function(e){return e?(new TextEncoder).encode(e).length:0},e.toUnit8Array=function(e,t){var n=(new TextEncoder).encode(e),o=new Uint8Array([0]),i=new Uint8Array(n.length+t.length+o.length);return i.set(n),i.set(t,n.length),i.set(o,n.length+t.length),i},e.marshall=function(t){return new e(t).serialize()},e.hdrValueEscape=function(e){return e.replace(/\\/g,"\\\\").replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/:/g,"\\c")},e.hdrValueUnEscape=function(e){return e.replace(/\\r/g,"\r").replace(/\\n/g,"\n").replace(/\\c/g,":").replace(/\\\\/g,"\\")},e}();t.Frame=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Byte={LF:"\n",NULL:"\0"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),i=n(0),r=function(){function e(e){void 0===e&&(e={}),this.stompVersions=i.Versions.default,this.reconnectDelay=5e3,this.heartbeatIncoming=1e4,this.heartbeatOutgoing=1e4,this._active=!1;var t=function(){};this.debug=t,this.beforeConnect=t,this.onConnect=t,this.onDisconnect=t,this.onUnhandledMessage=t,this.onUnhandledReceipt=t,this.onUnhandledFrame=t,this.onStompError=t,this.onWebSocketClose=t,this.connectHeaders={},this.disconnectHeaders={},this.configure(e)}return Object.defineProperty(e.prototype,"webSocket",{get:function(){return this._webSocket},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"connected",{get:function(){return!!this._stompHandler&&this._stompHandler.connected},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"connectedVersion",{get:function(){return this._stompHandler?this._stompHandler.connectedVersion:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this._active},enumerable:!0,configurable:!0}),e.prototype.configure=function(e){Object.assign(this,e)},e.prototype.activate=function(){this._active=!0,this._connect()},e.prototype._connect=function(){var e=this;this.connected?this.debug("STOMP: already connected, nothing to do"):(this.beforeConnect(),this._active?(this.debug("Opening Web Socket..."),this._webSocket=this._createWebSocket(),this._stompHandler=new o.StompHandler(this,this._webSocket,{debug:this.debug,stompVersions:this.stompVersions,connectHeaders:this.connectHeaders,disconnectHeaders:this.disconnectHeaders,heartbeatIncoming:this.heartbeatIncoming,heartbeatOutgoing:this.heartbeatOutgoing,onConnect:function(t){if(!e._active)return e.debug("STOMP got connected while deactivate was issued, will disconnect now"),void e._disposeStompHandler();e.onConnect(t)},onDisconnect:function(t){e.onDisconnect(t)},onStompError:function(t){e.onStompError(t)},onWebSocketClose:function(t){e.onWebSocketClose(t),e._active&&e._schedule_reconnect()},onUnhandledMessage:function(t){e.onUnhandledMessage(t)},onUnhandledReceipt:function(t){e.onUnhandledReceipt(t)},onUnhandledFrame:function(t){e.onUnhandledFrame(t)}}),this._stompHandler.start()):this.debug("Client has been marked inactive, will not attempt to connect"))},e.prototype._createWebSocket=function(){var e;return(e=this.webSocketFactory?this.webSocketFactory():new WebSocket(this.brokerURL,this.stompVersions.protocolVersions())).binaryType="arraybuffer",e},e.prototype._schedule_reconnect=function(){var e=this;this.reconnectDelay>0&&(this.debug("STOMP: scheduling reconnection in "+this.reconnectDelay+"ms"),this._reconnector=setTimeout(function(){e._connect()},this.reconnectDelay))},e.prototype.deactivate=function(){this._active=!1,this._reconnector&&clearTimeout(this._reconnector),this._disposeStompHandler()},e.prototype.forceDisconnect=function(){this._webSocket&&(this._webSocket.readyState!==WebSocket.CONNECTING&&this._webSocket.readyState!==WebSocket.OPEN||this._webSocket.close())},e.prototype._disposeStompHandler=function(){this._stompHandler&&(this._stompHandler.dispose(),this._stompHandler=null)},e.prototype.publish=function(e){this._stompHandler.publish(e)},e.prototype.watchForReceipt=function(e,t){this._stompHandler.watchForReceipt(e,t)},e.prototype.subscribe=function(e,t,n){return void 0===n&&(n={}),this._stompHandler.subscribe(e,t,n)},e.prototype.unsubscribe=function(e,t){void 0===t&&(t={}),this._stompHandler.unsubscribe(e,t)},e.prototype.begin=function(e){return this._stompHandler.begin(e)},e.prototype.commit=function(e){this._stompHandler.commit(e)},e.prototype.abort=function(e){this._stompHandler.abort(e)},e.prototype.ack=function(e,t,n){void 0===n&&(n={}),this._stompHandler.ack(e,t,n)},e.prototype.nack=function(e,t,n){void 0===n&&(n={}),this._stompHandler.nack(e,t,n)},e}();t.Client=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(1),r=function(){function e(){}return e.client=function(t,n){null==n&&(n=o.Versions.default.protocolVersions());return new i.CompatClient(function(){return new(e.WebSocketClass||WebSocket)(t,n)})},e.over=function(e){var t="function"==typeof e?e:function(){return e};return new i.CompatClient(t)},e.WebSocketClass=null,e}();t.Stomp=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),i=n(0),r=n(3),s=n(2),c=function(){function e(e,t,n){void 0===n&&(n={});var o=this;this._client=e,this._webSocket=t,this._serverFrameHandlers={CONNECTED:function(e){o.debug("connected to server "+e.headers.server),o._connected=!0,o._connectedVersion=e.headers.version,o._connectedVersion===i.Versions.V1_2&&(o._escapeHeaderValues=!0),o._setupHeartbeat(e.headers),o.onConnect(e)},MESSAGE:function(e){var t=e.headers.subscription,n=o._subscriptions[t]||o.onUnhandledMessage,r=e,s=o,c=o._connectedVersion===i.Versions.V1_2?r.headers.ack:r.headers["message-id"];r.ack=function(e){return void 0===e&&(e={}),s.ack(c,t,e)},r.nack=function(e){return void 0===e&&(e={}),s.nack(c,t,e)},n(r)},RECEIPT:function(e){var t=o._receiptWatchers[e.headers["receipt-id"]];t?(t(e),delete o._receiptWatchers[e.headers["receipt-id"]]):o.onUnhandledReceipt(e)},ERROR:function(e){o.onStompError(e)}},this._counter=0,this._subscriptions={},this._receiptWatchers={},this._partialData="",this._escapeHeaderValues=!1,this._lastServerActivityTS=Date.now(),this.configure(n)}return Object.defineProperty(e.prototype,"connectedVersion",{get:function(){return this._connectedVersion},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"connected",{get:function(){return this._connected},enumerable:!0,configurable:!0}),e.prototype.configure=function(e){Object.assign(this,e)},e.prototype.start=function(){var e=this,t=new s.Parser(function(t){var n=r.Frame.fromRawFrame(t,e._escapeHeaderValues);e.debug("<<< "+n),(e._serverFrameHandlers[n.command]||e.onUnhandledFrame)(n)},function(){e.debug("<<< PONG")});this._webSocket.onmessage=function(n){e.debug("Received data"),e._lastServerActivityTS=Date.now(),t.parseChunk(n.data)},this._webSocket.onclose=function(t){e.debug("Connection closed to "+e._webSocket.url),e.onWebSocketClose(t),e._cleanUp()},this._webSocket.onopen=function(){e.debug("Web Socket Opened..."),e.connectHeaders["accept-version"]=e.stompVersions.supportedVersions(),e.connectHeaders["heart-beat"]=[e.heartbeatOutgoing,e.heartbeatIncoming].join(","),e._transmit({command:"CONNECT",headers:e.connectHeaders})}},e.prototype._setupHeartbeat=function(e){var t=this;if(e.version===i.Versions.V1_1||e.version===i.Versions.V1_2){var n=e["heart-beat"].split(",").map(function(e){return parseInt(e)}),r=n[0],s=n[1];if(0!==this.heartbeatOutgoing&&0!==s){var c=Math.max(this.heartbeatOutgoing,s);this.debug("send PING every "+c+"ms"),this._pinger=setInterval(function(){t._webSocket.send(o.Byte.LF),t.debug(">>> PING")},c)}if(0!==this.heartbeatIncoming&&0!==r){var a=Math.max(this.heartbeatIncoming,r);this.debug("check PONG every "+a+"ms"),this._ponger=setInterval(function(){var e=Date.now()-t._lastServerActivityTS;e>2*a&&(t.debug("did not receive server activity for the last "+e+"ms"),t._webSocket.close())},a)}}},e.prototype._transmit=function(e){var t=e.command,n=e.headers,o=e.body,i=e.binaryBody,s=e.skipContentLengthHeader,c=new r.Frame({command:t,headers:n,body:o,binaryBody:i,escapeHeaderValues:this._escapeHeaderValues,skipContentLengthHeader:s});this.debug(">>> "+c),this._webSocket.send(c.serialize())},e.prototype.dispose=function(){var e=this;if(this.connected)try{this.disconnectHeaders.receipt||(this.disconnectHeaders.receipt="close-"+this._counter++),this.watchForReceipt(this.disconnectHeaders.receipt,function(t){e._webSocket.close(),e._cleanUp(),e.onDisconnect(t)}),this._transmit({command:"DISCONNECT",headers:this.disconnectHeaders})}catch(e){this.debug("Ignoring error during disconnect "+e)}else this._webSocket.readyState!==WebSocket.CONNECTING&&this._webSocket.readyState!==WebSocket.OPEN||this._webSocket.close()},e.prototype._cleanUp=function(){this._connected=!1,this._pinger&&clearInterval(this._pinger),this._ponger&&clearInterval(this._ponger)},e.prototype.publish=function(e){var t=e.destination,n=e.headers,o=e.body,i=e.binaryBody,r=e.skipContentLengthHeader;n=Object.assign({destination:t},n),this._transmit({command:"SEND",headers:n,body:o,binaryBody:i,skipContentLengthHeader:r})},e.prototype.watchForReceipt=function(e,t){this._receiptWatchers[e]=t},e.prototype.subscribe=function(e,t,n){void 0===n&&(n={}),n.id||(n.id="sub-"+this._counter++),n.destination=e,this._subscriptions[n.id]=t,this._transmit({command:"SUBSCRIBE",headers:n});var o=this;return{id:n.id,unsubscribe:function(e){return o.unsubscribe(n.id,e)}}},e.prototype.unsubscribe=function(e,t){void 0===t&&(t={}),null==t&&(t={}),delete this._subscriptions[e],t.id=e,this._transmit({command:"UNSUBSCRIBE",headers:t})},e.prototype.begin=function(e){var t=e||"tx-"+this._counter++;this._transmit({command:"BEGIN",headers:{transaction:t}});var n=this;return{id:t,commit:function(){n.commit(t)},abort:function(){n.abort(t)}}},e.prototype.commit=function(e){this._transmit({command:"COMMIT",headers:{transaction:e}})},e.prototype.abort=function(e){this._transmit({command:"ABORT",headers:{transaction:e}})},e.prototype.ack=function(e,t,n){void 0===n&&(n={}),this._connectedVersion===i.Versions.V1_2?n.id=e:n["message-id"]=e,n.subscription=t,this._transmit({command:"ACK",headers:n})},e.prototype.nack=function(e,t,n){return void 0===n&&(n={}),this._connectedVersion===i.Versions.V1_2?n.id=e:n["message-id"]=e,n.subscription=t,this._transmit({command:"NACK",headers:n})},e}();t.StompHandler=c},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(5)),o(n(3)),o(n(2)),o(n(0)),o(n(1)),o(n(6))},function(e,t,n){e.exports=n(8)}])});
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("StompJs",[],t):"object"==typeof exports?exports.StompJs=t():e.StompJs=t()}(window,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.versions=e}return e.prototype.supportedVersions=function(){return this.versions.join(",")},e.prototype.protocolVersions=function(){return this.versions.map(function(e){return"v"+e.replace(".","")+".stomp"})},e.V1_0="1.0",e.V1_1="1.1",e.V1_2="1.2",e.default=new e([e.V1_0,e.V1_1,e.V1_2]),e}();t.Versions=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),r=function(){function e(e){var t=e.command,n=e.headers,o=e.body,r=e.binaryBody,i=e.escapeHeaderValues,s=e.skipContentLengthHeader;this.command=t,this.headers=Object.assign({},n||{}),r?(this._binaryBody=r,this.isBinaryBody=!0):(this._body=o||"",this.isBinaryBody=!1),this.escapeHeaderValues=i||!1,this.skipContentLengthHeader=s||!1}return Object.defineProperty(e.prototype,"body",{get:function(){return!this._body&&this.isBinaryBody&&(this._body=(new TextDecoder).decode(this._binaryBody)),this._body},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"binaryBody",{get:function(){return this._binaryBody||this.isBinaryBody||(this._binaryBody=(new TextEncoder).encode(this._body)),this._binaryBody},enumerable:!0,configurable:!0}),e.fromRawFrame=function(t,n){for(var o={},r=function(e){return e.replace(/^\s+|\s+$/g,"")},i=0,s=t.headers.reverse();i<s.length;i++){var c=s[i],a=(c.indexOf(":"),r(c[0])),u=r(c[1]);n&&"CONNECT"!==t.command&&"CONNECTED"!==t.command&&(u=e.hdrValueUnEscape(u)),o[a]=u}return new e({command:t.command,headers:o,binaryBody:t.binaryBody,escapeHeaderValues:n})},e.prototype.toString=function(){return this.serializeCmdAndHeaders()},e.prototype.serialize=function(){var t=this.serializeCmdAndHeaders();return this.isBinaryBody?e.toUnit8Array(t,this._binaryBody).buffer:t+this._body+o.BYTE.NULL},e.prototype.serializeCmdAndHeaders=function(){var t=[this.command];this.skipContentLengthHeader&&delete this.headers["content-length"];for(var n=0,r=Object.keys(this.headers||{});n<r.length;n++){var i=r[n],s=this.headers[i];this.escapeHeaderValues&&"CONNECT"!==this.command&&"CONNECTED"!==this.command?t.push(i+":"+e.hdrValueEscape(""+s)):t.push(i+":"+s)}return(this.isBinaryBody||!this.isBodyEmpty()&&!this.skipContentLengthHeader)&&t.push("content-length:"+this.bodyLength()),t.join(o.BYTE.LF)+o.BYTE.LF+o.BYTE.LF},e.prototype.isBodyEmpty=function(){return 0===this.bodyLength()},e.prototype.bodyLength=function(){var e=this.binaryBody;return e?e.length:0},e.sizeOfUTF8=function(e){return e?(new TextEncoder).encode(e).length:0},e.toUnit8Array=function(e,t){var n=(new TextEncoder).encode(e),o=new Uint8Array([0]),r=new Uint8Array(n.length+t.length+o.length);return r.set(n),r.set(t,n.length),r.set(o,n.length+t.length),r},e.marshall=function(t){return new e(t).serialize()},e.hdrValueEscape=function(e){return e.replace(/\\/g,"\\\\").replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/:/g,"\\c")},e.hdrValueUnEscape=function(e){return e.replace(/\\r/g,"\r").replace(/\\n/g,"\n").replace(/\\c/g,":").replace(/\\\\/g,"\\")},e}();t.Frame=r},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),i=n(7),s=function(e){function t(t){var n=e.call(this)||this;return n.maxWebSocketFrameSize=16384,n._heartbeatInfo=new i.HeartbeatInfo(n),n.reconnect_delay=0,n.webSocketFactory=t,n.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.log.apply(console,e)},n}return o(t,e),t.prototype._parseConnect=function(){for(var e,t,n,o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];var i={};if(o.length<2)throw new Error("Connect requires at least 2 arguments");if("function"==typeof o[1])i=o[0],t=o[1],n=o[2],e=o[3];else switch(o.length){case 6:i.login=o[0],i.passcode=o[1],t=o[2],n=o[3],e=o[4],i.host=o[5];break;default:i.login=o[0],i.passcode=o[1],t=o[2],n=o[3],e=o[4]}return[i,t,n,e]},t.prototype.connect=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=this._parseConnect.apply(this,t);o[0]&&(this.connectHeaders=o[0]),o[1]&&(this.onConnect=o[1]),o[2]&&(this.onStompError=o[2]),o[3]&&(this.onWebSocketClose=o[3]),e.prototype.activate.call(this)},t.prototype.disconnect=function(t,n){void 0===n&&(n={}),t&&(this.onDisconnect=t),this.disconnectHeaders=n,e.prototype.deactivate.call(this)},t.prototype.send=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n="");var o=!1===(t=Object.assign({},t))["content-length"];o&&delete t["content-length"],this.publish({destination:e,headers:t,body:n,skipContentLengthHeader:o})},Object.defineProperty(t.prototype,"reconnect_delay",{set:function(e){this.reconnectDelay=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ws",{get:function(){return this._webSocket},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this.connectedVersion},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onreceive",{get:function(){return this.onUnhandledMessage},set:function(e){this.onUnhandledMessage=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onreceipt",{get:function(){return this.onUnhandledReceipt},set:function(e){this.onUnhandledReceipt=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"heartbeat",{get:function(){return this._heartbeatInfo},set:function(e){this.heartbeatIncoming=e.incoming,this.heartbeatOutgoing=e.outgoing},enumerable:!0,configurable:!0}),t}(r.Client);t.CompatClient=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.onFrame=e,this.onIncomingPing=t,this._encoder=new TextEncoder,this._decoder=new TextDecoder,this._token=[],this._initState()}return e.prototype.parseChunk=function(e){var t;t=e instanceof ArrayBuffer?new Uint8Array(e):this._encoder.encode(e);for(var n=0;n<t.length;n++){var o=t[n];this._onByte(o)}},e.prototype._collectFrame=function(e){0!==e&&13!==e&&(10!==e?(this._onByte=this._collectCommand,this._reinjectByte(e)):this.onIncomingPing())},e.prototype._collectCommand=function(e){if(13!==e)return 10===e?(this._results.command=this._consumeTokenAsUTF8(),void(this._onByte=this._collectHeaders)):void this._consumeByte(e)},e.prototype._collectHeaders=function(e){13!==e&&(10!==e?(this._onByte=this._collectHeaderKey,this._reinjectByte(e)):this._setupCollectBody())},e.prototype._reinjectByte=function(e){this._onByte(e)},e.prototype._collectHeaderKey=function(e){if(58===e)return this._headerKey=this._consumeTokenAsUTF8(),void(this._onByte=this._collectHeaderValue);this._consumeByte(e)},e.prototype._collectHeaderValue=function(e){if(13!==e)return 10===e?(this._results.headers.push([this._headerKey,this._consumeTokenAsUTF8()]),this._headerKey=void 0,void(this._onByte=this._collectHeaders)):void this._consumeByte(e)},e.prototype._setupCollectBody=function(){var e=this._results.headers.filter(function(e){return"content-length"===e[0]})[0];e?(this._bodyBytesRemaining=parseInt(e[1],10),this._onByte=this._collectBodyFixedSize):this._onByte=this._collectBodyNullTerminated},e.prototype._collectBodyNullTerminated=function(e){0!==e?this._consumeByte(e):this._retrievedBody()},e.prototype._collectBodyFixedSize=function(e){0!=this._bodyBytesRemaining--?this._consumeByte(e):this._retrievedBody()},e.prototype._retrievedBody=function(){this._results.binaryBody=this._consumeTokenAsRaw(),this.onFrame(this._results),this._initState()},e.prototype._consumeByte=function(e){this._token.push(e)},e.prototype._consumeTokenAsUTF8=function(){return this._decoder.decode(this._consumeTokenAsRaw())},e.prototype._consumeTokenAsRaw=function(){var e=new Uint8Array(this._token);return this._token=[],e},e.prototype._initState=function(){this._results={command:void 0,headers:[],binaryBody:void 0},this._token=[],this._headerKey=void 0,this._onByte=this._collectFrame},e}();t.Parser=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BYTE={LF:"\n",NULL:"\0"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(13),r=n(0),i=function(){function e(e){void 0===e&&(e={}),this.stompVersions=r.Versions.default,this.reconnectDelay=5e3,this.heartbeatIncoming=1e4,this.heartbeatOutgoing=1e4,this._active=!1;var t=function(){};this.debug=t,this.beforeConnect=t,this.onConnect=t,this.onDisconnect=t,this.onUnhandledMessage=t,this.onUnhandledReceipt=t,this.onUnhandledFrame=t,this.onStompError=t,this.onWebSocketClose=t,this.connectHeaders={},this._disconnectHeaders={},this.configure(e)}return Object.defineProperty(e.prototype,"webSocket",{get:function(){return this._webSocket},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disconnectHeaders",{get:function(){return this._disconnectHeaders},set:function(e){this._disconnectHeaders=e,this._stompHandler&&(this._stompHandler.disconnectHeaders=this._disconnectHeaders)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"connected",{get:function(){return!!this._stompHandler&&this._stompHandler.connected},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"connectedVersion",{get:function(){return this._stompHandler?this._stompHandler.connectedVersion:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this._active},enumerable:!0,configurable:!0}),e.prototype.configure=function(e){Object.assign(this,e)},e.prototype.activate=function(){this._active=!0,this._connect()},e.prototype._connect=function(){var e=this;this.connected?this.debug("STOMP: already connected, nothing to do"):(this.beforeConnect(),this._active?(this.debug("Opening Web Socket..."),this._webSocket=this._createWebSocket(),this._stompHandler=new o.StompHandler(this,this._webSocket,{debug:this.debug,stompVersions:this.stompVersions,connectHeaders:this.connectHeaders,disconnectHeaders:this._disconnectHeaders,heartbeatIncoming:this.heartbeatIncoming,heartbeatOutgoing:this.heartbeatOutgoing,onConnect:function(t){if(!e._active)return e.debug("STOMP got connected while deactivate was issued, will disconnect now"),void e._disposeStompHandler();e.onConnect(t)},onDisconnect:function(t){e.onDisconnect(t)},onStompError:function(t){e.onStompError(t)},onWebSocketClose:function(t){e.onWebSocketClose(t),e._active&&e._schedule_reconnect()},onUnhandledMessage:function(t){e.onUnhandledMessage(t)},onUnhandledReceipt:function(t){e.onUnhandledReceipt(t)},onUnhandledFrame:function(t){e.onUnhandledFrame(t)}}),this._stompHandler.start()):this.debug("Client has been marked inactive, will not attempt to connect"))},e.prototype._createWebSocket=function(){var e;return(e=this.webSocketFactory?this.webSocketFactory():new WebSocket(this.brokerURL,this.stompVersions.protocolVersions())).binaryType="arraybuffer",e},e.prototype._schedule_reconnect=function(){var e=this;this.reconnectDelay>0&&(this.debug("STOMP: scheduling reconnection in "+this.reconnectDelay+"ms"),this._reconnector=setTimeout(function(){e._connect()},this.reconnectDelay))},e.prototype.deactivate=function(){this._active=!1,this._reconnector&&clearTimeout(this._reconnector),this._disposeStompHandler()},e.prototype.forceDisconnect=function(){this._webSocket&&(this._webSocket.readyState!==WebSocket.CONNECTING&&this._webSocket.readyState!==WebSocket.OPEN||this._webSocket.close())},e.prototype._disposeStompHandler=function(){this._stompHandler&&(this._stompHandler.dispose(),this._stompHandler=null)},e.prototype.publish=function(e){this._stompHandler.publish(e)},e.prototype.watchForReceipt=function(e,t){this._stompHandler.watchForReceipt(e,t)},e.prototype.subscribe=function(e,t,n){return void 0===n&&(n={}),this._stompHandler.subscribe(e,t,n)},e.prototype.unsubscribe=function(e,t){void 0===t&&(t={}),this._stompHandler.unsubscribe(e,t)},e.prototype.begin=function(e){return this._stompHandler.begin(e)},e.prototype.commit=function(e){this._stompHandler.commit(e)},e.prototype.abort=function(e){this._stompHandler.abort(e)},e.prototype.ack=function(e,t,n){void 0===n&&(n={}),this._stompHandler.ack(e,t,n)},e.prototype.nack=function(e,t,n){void 0===n&&(n={}),this._stompHandler.nack(e,t,n)},e}();t.Client=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),r=n(2),i=function(){function e(){}return e.client=function(t,n){null==n&&(n=o.Versions.default.protocolVersions());return new r.CompatClient(function(){return new(e.WebSocketClass||WebSocket)(t,n)})},e.over=function(e){var t="function"==typeof e?e:function(){return e};return new r.CompatClient(t)},e.WebSocketClass=null,e}();t.Stomp=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.client=e}return Object.defineProperty(e.prototype,"outgoing",{get:function(){return this.client.heartbeatOutgoing},set:function(e){this.client.heartbeatOutgoing=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"incoming",{get:function(){return this.client.heartbeatIncoming},set:function(e){this.client.heartbeatIncoming=e},enumerable:!0,configurable:!0}),e}();t.HeartbeatInfo=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){return function(){}}();t.Transaction=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){return function(){}}();t.StompSubscription=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){return function(){}}();t.StompHeaders=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){return function(){}}();t.StompConfig=o},function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(n(1).Frame);t.Message=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),r=n(1),i=n(3),s=n(0),c=function(){function e(e,t,n){void 0===n&&(n={});var o=this;this._client=e,this._webSocket=t,this._serverFrameHandlers={CONNECTED:function(e){o.debug("connected to server "+e.headers.server),o._connected=!0,o._connectedVersion=e.headers.version,o._connectedVersion===s.Versions.V1_2&&(o._escapeHeaderValues=!0),o._setupHeartbeat(e.headers),o.onConnect(e)},MESSAGE:function(e){var t=e.headers.subscription,n=o._subscriptions[t]||o.onUnhandledMessage,r=e,i=o,c=o._connectedVersion===s.Versions.V1_2?r.headers.ack:r.headers["message-id"];r.ack=function(e){return void 0===e&&(e={}),i.ack(c,t,e)},r.nack=function(e){return void 0===e&&(e={}),i.nack(c,t,e)},n(r)},RECEIPT:function(e){var t=o._receiptWatchers[e.headers["receipt-id"]];t?(t(e),delete o._receiptWatchers[e.headers["receipt-id"]]):o.onUnhandledReceipt(e)},ERROR:function(e){o.onStompError(e)}},this._counter=0,this._subscriptions={},this._receiptWatchers={},this._partialData="",this._escapeHeaderValues=!1,this._lastServerActivityTS=Date.now(),this.configure(n)}return Object.defineProperty(e.prototype,"connectedVersion",{get:function(){return this._connectedVersion},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"connected",{get:function(){return this._connected},enumerable:!0,configurable:!0}),e.prototype.configure=function(e){Object.assign(this,e)},e.prototype.start=function(){var e=this,t=new i.Parser(function(t){var n=r.Frame.fromRawFrame(t,e._escapeHeaderValues);e.debug("<<< "+n),(e._serverFrameHandlers[n.command]||e.onUnhandledFrame)(n)},function(){e.debug("<<< PONG")});this._webSocket.onmessage=function(n){e.debug("Received data"),e._lastServerActivityTS=Date.now(),t.parseChunk(n.data)},this._webSocket.onclose=function(t){e.debug("Connection closed to "+e._webSocket.url),e.onWebSocketClose(t),e._cleanUp()},this._webSocket.onopen=function(){var t=Object.assign({},e.connectHeaders);e.debug("Web Socket Opened..."),t["accept-version"]=e.stompVersions.supportedVersions(),t["heart-beat"]=[e.heartbeatOutgoing,e.heartbeatIncoming].join(","),e._transmit({command:"CONNECT",headers:t})}},e.prototype._setupHeartbeat=function(e){var t=this;if(e.version===s.Versions.V1_1||e.version===s.Versions.V1_2){var n=e["heart-beat"].split(",").map(function(e){return parseInt(e,10)}),r=n[0],i=n[1];if(0!==this.heartbeatOutgoing&&0!==i){var c=Math.max(this.heartbeatOutgoing,i);this.debug("send PING every "+c+"ms"),this._pinger=setInterval(function(){t._webSocket.send(o.BYTE.LF),t.debug(">>> PING")},c)}if(0!==this.heartbeatIncoming&&0!==r){var a=Math.max(this.heartbeatIncoming,r);this.debug("check PONG every "+a+"ms"),this._ponger=setInterval(function(){var e=Date.now()-t._lastServerActivityTS;e>2*a&&(t.debug("did not receive server activity for the last "+e+"ms"),t._webSocket.close())},a)}}},e.prototype._transmit=function(e){var t=e.command,n=e.headers,o=e.body,i=e.binaryBody,s=e.skipContentLengthHeader,c=new r.Frame({command:t,headers:n,body:o,binaryBody:i,escapeHeaderValues:this._escapeHeaderValues,skipContentLengthHeader:s});this.debug(">>> "+c),this._webSocket.send(c.serialize())},e.prototype.dispose=function(){var e=this;if(this.connected)try{var t=Object.assign({},this.disconnectHeaders);t.receipt||(t.receipt="close-"+this._counter++),this.watchForReceipt(t.receipt,function(t){e._webSocket.close(),e._cleanUp(),e.onDisconnect(t)}),this._transmit({command:"DISCONNECT",headers:t})}catch(e){this.debug("Ignoring error during disconnect "+e)}else this._webSocket.readyState!==WebSocket.CONNECTING&&this._webSocket.readyState!==WebSocket.OPEN||this._webSocket.close()},e.prototype._cleanUp=function(){this._connected=!1,this._pinger&&clearInterval(this._pinger),this._ponger&&clearInterval(this._ponger)},e.prototype.publish=function(e){var t=e.destination,n=e.headers,o=e.body,r=e.binaryBody,i=e.skipContentLengthHeader,s=Object.assign({destination:t},n);this._transmit({command:"SEND",headers:s,body:o,binaryBody:r,skipContentLengthHeader:i})},e.prototype.watchForReceipt=function(e,t){this._receiptWatchers[e]=t},e.prototype.subscribe=function(e,t,n){void 0===n&&(n={}),(n=Object.assign({},n)).id||(n.id="sub-"+this._counter++),n.destination=e,this._subscriptions[n.id]=t,this._transmit({command:"SUBSCRIBE",headers:n});var o=this;return{id:n.id,unsubscribe:function(e){return o.unsubscribe(n.id,e)}}},e.prototype.unsubscribe=function(e,t){void 0===t&&(t={}),t=Object.assign({},t),delete this._subscriptions[e],t.id=e,this._transmit({command:"UNSUBSCRIBE",headers:t})},e.prototype.begin=function(e){var t=e||"tx-"+this._counter++;this._transmit({command:"BEGIN",headers:{transaction:t}});var n=this;return{id:t,commit:function(){n.commit(t)},abort:function(){n.abort(t)}}},e.prototype.commit=function(e){this._transmit({command:"COMMIT",headers:{transaction:e}})},e.prototype.abort=function(e){this._transmit({command:"ABORT",headers:{transaction:e}})},e.prototype.ack=function(e,t,n){void 0===n&&(n={}),n=Object.assign({},n),this._connectedVersion===s.Versions.V1_2?n.id=e:n["message-id"]=e,n.subscription=t,this._transmit({command:"ACK",headers:n})},e.prototype.nack=function(e,t,n){return void 0===n&&(n={}),n=Object.assign({},n),this._connectedVersion===s.Versions.V1_2?n.id=e:n["message-id"]=e,n.subscription=t,this._transmit({command:"NACK",headers:n})},e}();t.StompHandler=c},function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(5)),o(n(1)),o(n(12)),o(n(3)),o(n(11)),o(n(10)),o(n(9)),o(n(8)),o(n(0)),o(n(2)),o(n(6))},function(e,t,n){e.exports=n(14)}])});
2
2
  //# sourceMappingURL=stomp.umd.min.js.map