\n\n\n\n\n\n","import mod from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./Page.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./Page.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Page.vue?vue&type=template&id=2fb5d41b\"\nimport script from \"./Page.vue?vue&type=script&lang=js\"\nexport * from \"./Page.vue?vue&type=script&lang=js\"\nimport style0 from \"./Page.vue?vue&type=style&index=0&id=2fb5d41b&prod&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Stomp from \"webstomp-client\";\n\nexport default {\n data() {\n return {\n url: undefined,\n callbackFunction: undefined,\n\n websocket: undefined,\n connected: false,\n };\n },\n methods: {\n connect: function (url, callbackFunction) {\n if (!url) {\n return \"Cannot connect to websocket without url\";\n }\n\n if (!callbackFunction) {\n return \"Cannot connect to websocket without function to execute\";\n }\n\n this.url = url;\n this.callbackFunction = callbackFunction;\n\n if (!this.websocket && !this.connected) {\n this.websocket = Stomp.client(process.env.VUE_APP_STOMP_URL, {\n protocols: [\"v12.stomp\"],\n debug: false,\n });\n /* Disable debugging */\n this.websocket.debug = () => {};\n }\n\n if (this.websocket && !this.websocket.connected) {\n this.websocket.connect(\n process.env.VUE_APP_STOMP_USERNAME,\n process.env.VUE_APP_STOMP_PASSWORD,\n this.onConnect,\n this.onError,\n this.onDisconnect\n );\n }\n },\n\n disconnect: function () {\n if (this.websocket) {\n this.websocket.disconnect();\n this.websocket = null;\n }\n\n this.connected = false;\n },\n\n onConnect: function () {\n this.websocket.subscribe(this.url, this.onMessage);\n this.connected = true;\n },\n\n onDisconnect: function () {\n this.connected = false;\n this.url = null;\n this.callbackFunction = null;\n },\n\n onError: function (error) {\n console.warn(\"WEBSOCKET:\", error);\n this.connected = false;\n },\n\n onMessage: async function (frame) {\n if (frame && \"body\" in frame) {\n if (typeof frame.body === \"string\") {\n try {\n const message = JSON.parse(frame.body);\n await this.callbackFunction(message);\n } catch (e) {\n console.warn(e);\n }\n } else {\n await this.callbackFunction(frame.body);\n }\n }\n },\n },\n};\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.webstomp = factory());\n}(this, (function () { 'use strict';\n\n var classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n };\n\n var createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n\n var slicedToArray = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n }();\n\n var toConsumableArray = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n };\n\n var VERSIONS = {\n V1_0: '1.0',\n V1_1: '1.1',\n V1_2: '1.2',\n // Versions of STOMP specifications supported\n supportedVersions: function supportedVersions() {\n return '1.2,1.1,1.0';\n },\n supportedProtocols: function supportedProtocols() {\n return ['v10.stomp', 'v11.stomp', 'v12.stomp'];\n }\n };\n\n var PROTOCOLS_VERSIONS = {\n 'v10.stomp': VERSIONS.V1_0,\n 'v11.stomp': VERSIONS.V1_1,\n 'v12.stomp': VERSIONS.V1_2\n };\n\n function getSupportedVersion(protocol, debug) {\n var knownVersion = PROTOCOLS_VERSIONS[protocol];\n if (!knownVersion && debug) {\n debug('DEPRECATED: ' + protocol + ' is not a recognized STOMP version. In next major client version, this will close the connection.');\n }\n // 2nd temporary fallback if the protocol\n // does not match a supported STOMP version\n // This fallback will be removed in next major version\n return knownVersion || VERSIONS.V1_2;\n }\n\n // Define constants for bytes used throughout the code.\n var BYTES = {\n // LINEFEED byte (octet 10)\n LF: '\\x0A',\n // NULL byte (octet 0)\n NULL: '\\x00'\n };\n\n // utility function to trim any whitespace before and after a string\n var trim = function trim(str) {\n return str.replace(/^\\s+|\\s+$/g, '');\n };\n\n // from https://coolaj86.com/articles/unicode-string-to-a-utf-8-typed-array-buffer-in-javascript/\n function unicodeStringToTypedArray(s) {\n var escstr = encodeURIComponent(s);\n var binstr = escstr.replace(/%([0-9A-F]{2})/g, function (match, p1) {\n return String.fromCharCode('0x' + p1);\n });\n var arr = Array.prototype.map.call(binstr, function (c) {\n return c.charCodeAt(0);\n });\n return new Uint8Array(arr);\n }\n\n // from https://coolaj86.com/articles/unicode-string-to-a-utf-8-typed-array-buffer-in-javascript/\n function typedArrayToUnicodeString(ua) {\n var binstr = String.fromCharCode.apply(String, toConsumableArray(ua));\n var escstr = binstr.replace(/(.)/g, function (m, p) {\n var code = p.charCodeAt(0).toString(16).toUpperCase();\n if (code.length < 2) {\n code = '0' + code;\n }\n return '%' + code;\n });\n return decodeURIComponent(escstr);\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 function sizeOfUTF8(s) {\n if (!s) return 0;\n return encodeURIComponent(s).match(/%..|./g).length;\n }\n\n function createId() {\n var ts = new Date().getTime();\n var rand = Math.floor(Math.random() * 1000);\n return ts + '-' + rand;\n }\n\n // [STOMP Frame](http://stomp.github.com/stomp-specification-1.1.html#STOMP_Frames) Class\n\n var Frame = function () {\n\n // Frame constructor\n function Frame(command) {\n var headers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var body = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n classCallCheck(this, Frame);\n\n this.command = command;\n this.headers = headers;\n this.body = body;\n }\n\n // Provides a textual representation of the frame\n // suitable to be sent to the server\n\n\n createClass(Frame, [{\n key: 'toString',\n value: function toString() {\n var _this = this;\n\n var lines = [this.command],\n skipContentLength = this.headers['content-length'] === false;\n if (skipContentLength) delete this.headers['content-length'];\n\n Object.keys(this.headers).forEach(function (name) {\n var value = _this.headers[name];\n lines.push(name + ':' + value);\n });\n\n if (this.body && !skipContentLength) {\n lines.push('content-length:' + sizeOfUTF8(this.body));\n }\n\n lines.push(BYTES.LF + this.body);\n\n return lines.join(BYTES.LF);\n }\n\n // Unmarshall a single STOMP frame from a `data` string\n\n }], [{\n key: 'unmarshallSingle',\n value: function unmarshallSingle(data) {\n // search for 2 consecutives LF byte to split the command\n // and headers from the body\n var divider = data.search(new RegExp(BYTES.LF + BYTES.LF)),\n headerLines = data.substring(0, divider).split(BYTES.LF),\n command = headerLines.shift(),\n headers = {},\n body = '',\n\n // skip the 2 LF bytes that divides the headers from the body\n bodyIndex = divider + 2;\n\n // Parse headers in reverse order so that for repeated headers, the 1st\n // value is used\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = headerLines.reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var line = _step.value;\n\n var idx = line.indexOf(':');\n headers[trim(line.substring(0, idx))] = trim(line.substring(idx + 1));\n }\n // Parse body\n // check for content-length or topping at the first NULL byte found.\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n if (headers['content-length']) {\n var len = parseInt(headers['content-length'], 10);\n body = ('' + data).substring(bodyIndex, bodyIndex + len);\n } else {\n var chr = null;\n for (var i = bodyIndex; i < data.length; i++) {\n chr = data.charAt(i);\n if (chr === BYTES.NULL) break;\n body += chr;\n }\n }\n\n return new Frame(command, headers, body);\n }\n\n // Split the data before unmarshalling every single STOMP frame.\n // Web socket servers can send multiple frames in a single websocket message.\n // If the message size exceeds the websocket message size, then a single\n // frame can be fragmented across multiple messages.\n //\n // `datas` is a string.\n //\n // returns an *array* of Frame objects\n\n }, {\n key: 'unmarshall',\n value: function unmarshall(datas) {\n // split and unmarshall *multiple STOMP frames* contained in a *single WebSocket frame*.\n // The data is split when a NULL byte (followed by zero or many LF bytes) is found\n var frames = datas.split(new RegExp(BYTES.NULL + BYTES.LF + '*')),\n firstFrames = frames.slice(0, -1),\n lastFrame = frames.slice(-1)[0],\n r = {\n frames: firstFrames.map(function (f) {\n return Frame.unmarshallSingle(f);\n }),\n partial: ''\n };\n\n // If this contains a final full message or just a acknowledgement of a PING\n // without any other content, process this frame, otherwise return the\n // contents of the buffer to the caller.\n if (lastFrame === BYTES.LF || lastFrame.search(RegExp(BYTES.NULL + BYTES.LF + '*$')) !== -1) {\n r.frames.push(Frame.unmarshallSingle(lastFrame));\n } else {\n r.partial = lastFrame;\n }\n\n return r;\n }\n\n // Marshall a Stomp frame\n\n }, {\n key: 'marshall',\n value: function marshall(command, headers, body) {\n var frame = new Frame(command, headers, body);\n return frame.toString() + BYTES.NULL;\n }\n }]);\n return Frame;\n }();\n\n // STOMP Client Class\n //\n // All STOMP protocol is exposed as methods of this class (`connect()`,\n // `send()`, etc.)\n\n var Client = function () {\n function Client(ws) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n classCallCheck(this, Client);\n\n // cannot have default options object + destructuring in the same time in method signature\n var _options$binary = options.binary,\n binary = _options$binary === undefined ? false : _options$binary,\n _options$heartbeat = options.heartbeat,\n heartbeat = _options$heartbeat === undefined ? { outgoing: 10000, incoming: 10000 } : _options$heartbeat,\n _options$debug = options.debug,\n debug = _options$debug === undefined ? true : _options$debug,\n _options$protocols = options.protocols,\n protocols = _options$protocols === undefined ? [] : _options$protocols;\n\n\n this.ws = ws;\n this.ws.binaryType = 'arraybuffer';\n this.isBinary = !!binary;\n this.hasDebug = !!debug;\n this.connected = false;\n // Heartbeat properties of the client\n // outgoing: send heartbeat every 10s by default (value is in ms)\n // incoming: expect to receive server heartbeat at least every 10s by default\n // falsy value means no heartbeat hence 0,0\n this.heartbeat = heartbeat || { outgoing: 0, incoming: 0 };\n // maximum *WebSocket* frame size sent by the client. If the STOMP frame\n // is bigger than this value, the STOMP frame will be sent using multiple\n // WebSocket frames (default is 16KiB)\n this.maxWebSocketFrameSize = 16 * 1024;\n // subscription callbacks indexed by subscriber's ID\n this.subscriptions = {};\n this.partialData = '';\n this.protocols = protocols;\n }\n\n // //// Debugging\n //\n // By default, debug messages are logged in the window's console if it is defined.\n // This method is called for every actual transmission of the STOMP frames over the\n // WebSocket.\n //\n // It is possible to set a `debug(message, data)` method\n // on a client instance to handle differently the debug messages:\n //\n // client.debug = function(str) {\n // // append the debug log to a #debug div\n // $(\"#debug\").append(str + \"\\n\");\n // };\n\n\n createClass(Client, [{\n key: 'debug',\n value: function debug() {\n var _console;\n\n if (this.hasDebug) (_console = console).log.apply(_console, arguments);\n }\n\n // [CONNECT Frame](http://stomp.github.com/stomp-specification-1.1.html#CONNECT_or_STOMP_Frame)\n //\n // The `connect` method accepts different number of arguments and types:\n //\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, host)`\n //\n // The errorCallback is optional and the 2 first forms allow to pass other\n // headers in addition to `client`, `passcode` and `host`.\n\n }, {\n key: 'connect',\n value: function connect() {\n var _this = this;\n\n var _parseConnect2 = this._parseConnect.apply(this, arguments),\n _parseConnect3 = slicedToArray(_parseConnect2, 3),\n headers = _parseConnect3[0],\n connectCallback = _parseConnect3[1],\n errorCallback = _parseConnect3[2];\n\n this.connectCallback = connectCallback;\n this.debug('Opening Web Socket...');\n this.ws.onmessage = function (evt) {\n var data = evt.data;\n if (evt.data instanceof ArrayBuffer) {\n data = typedArrayToUnicodeString(new Uint8Array(evt.data));\n }\n _this.serverActivity = Date.now();\n // heartbeat\n if (data === BYTES.LF) {\n _this.debug('<<< PONG');\n return;\n }\n _this.debug('<<< ' + data);\n // Handle STOMP frames received from the server\n // The unmarshall function returns the frames parsed and any remaining\n // data from partial frames.\n var unmarshalledData = Frame.unmarshall(_this.partialData + data);\n _this.partialData = unmarshalledData.partial;\n unmarshalledData.frames.forEach(function (frame) {\n switch (frame.command) {\n // [CONNECTED Frame](http://stomp.github.com/stomp-specification-1.1.html#CONNECTED_Frame)\n case 'CONNECTED':\n _this.debug('connected to server ' + frame.headers.server);\n _this.connected = true;\n _this.version = frame.headers.version;\n _this._setupHeartbeat(frame.headers);\n if (connectCallback) connectCallback(frame);\n break;\n // [MESSAGE Frame](http://stomp.github.com/stomp-specification-1.1.html#MESSAGE)\n case 'MESSAGE':\n // the `onreceive` callback is registered when the client calls\n // `subscribe()`.\n // If there is registered subscription for the received message,\n // we used the default `onreceive` method 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 var subscription = frame.headers.subscription;\n var onreceive = _this.subscriptions[subscription] || _this.onreceive;\n if (onreceive) {\n // 1.2 define ack header if ack is set to client\n // and this header must be used for ack/nack\n var messageID = _this.version === VERSIONS.V1_2 && frame.headers.ack || frame.headers['message-id'];\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 frame.ack = _this.ack.bind(_this, messageID, subscription);\n frame.nack = _this.nack.bind(_this, messageID, subscription);\n onreceive(frame);\n } else {\n _this.debug('Unhandled received MESSAGE: ' + frame);\n }\n break;\n // [RECEIPT Frame](http://stomp.github.com/stomp-specification-1.1.html#RECEIPT)\n //\n // The client instance can set its `onreceipt` field to a function taking\n // a frame argument that will be called when a receipt is received from\n // the server:\n //\n // client.onreceipt = function(frame) {\n // receiptID = frame.headers['receipt-id'];\n // ...\n // }\n case 'RECEIPT':\n if (_this.onreceipt) _this.onreceipt(frame);\n break;\n // [ERROR Frame](http://stomp.github.com/stomp-specification-1.1.html#ERROR)\n case 'ERROR':\n if (errorCallback) errorCallback(frame);\n break;\n default:\n _this.debug('Unhandled frame: ' + frame);\n }\n });\n };\n this.ws.onclose = function (event) {\n _this.debug('Whoops! Lost connection to ' + _this.ws.url + ':', { event: event });\n _this._cleanUp();\n if (errorCallback) errorCallback(event);\n };\n this.ws.onopen = function () {\n _this.debug('Web Socket Opened...');\n // 1st protocol fallback on user 1st protocols options\n // to prevent edge case where server does not comply and respond with a choosen protocol\n // or when ws client does not handle protocol property very well\n headers['accept-version'] = getSupportedVersion(_this.ws.protocol || _this.protocols[0], _this.debug.bind(_this));\n // Check if we already have heart-beat in headers before adding them\n if (!headers['heart-beat']) {\n headers['heart-beat'] = [_this.heartbeat.outgoing, _this.heartbeat.incoming].join(',');\n }\n _this._transmit('CONNECT', headers);\n };\n if (this.ws.readyState === this.ws.OPEN) {\n this.ws.onopen();\n }\n }\n\n // [DISCONNECT Frame](http://stomp.github.com/stomp-specification-1.1.html#DISCONNECT)\n\n }, {\n key: 'disconnect',\n value: function disconnect(disconnectCallback) {\n var headers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n this._transmit('DISCONNECT', headers);\n // Discard the onclose callback to avoid calling the errorCallback when\n // the client is properly disconnected.\n this.ws.onclose = null;\n this.ws.close();\n this._cleanUp();\n // TODO: what's the point of this callback disconnect is not async\n if (disconnectCallback) disconnectCallback();\n }\n\n // [SEND Frame](http://stomp.github.com/stomp-specification-1.1.html#SEND)\n //\n // * `destination` is MANDATORY.\n\n }, {\n key: 'send',\n value: function send(destination) {\n var body = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var hdrs = Object.assign({}, headers);\n hdrs.destination = destination;\n this._transmit('SEND', hdrs, body);\n }\n\n // [BEGIN Frame](http://stomp.github.com/stomp-specification-1.1.html#BEGIN)\n //\n // If no transaction ID is passed, one will be created automatically\n\n }, {\n key: 'begin',\n value: function begin() {\n var transaction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'tx-' + createId();\n\n this._transmit('BEGIN', { transaction: transaction });\n return {\n id: transaction,\n commit: this.commit.bind(this, transaction),\n abort: this.abort.bind(this, transaction)\n };\n }\n\n // [COMMIT Frame](http://stomp.github.com/stomp-specification-1.1.html#COMMIT)\n //\n // * `transaction` is MANDATORY.\n //\n // It is preferable to commit a transaction by calling `commit()` directly on\n // the object returned by `client.begin()`:\n //\n // var tx = client.begin(txid);\n // ...\n // tx.commit();\n\n }, {\n key: 'commit',\n value: function commit(transaction) {\n this._transmit('COMMIT', { transaction: transaction });\n }\n\n // [ABORT Frame](http://stomp.github.com/stomp-specification-1.1.html#ABORT)\n //\n // * `transaction` is MANDATORY.\n //\n // It is preferable to abort a transaction by calling `abort()` directly on\n // the object returned by `client.begin()`:\n //\n // var tx = client.begin(txid);\n // ...\n // tx.abort();\n\n }, {\n key: 'abort',\n value: function abort(transaction) {\n this._transmit('ABORT', { transaction: transaction });\n }\n\n // [ACK Frame](http://stomp.github.com/stomp-specification-1.1.html#ACK)\n //\n // * `messageID` & `subscription` are MANDATORY.\n //\n // It is preferable to acknowledge a message by calling `ack()` directly\n // on the message handled by a subscription callback:\n //\n // client.subscribe(destination,\n // function(message) {\n // // process the message\n // // acknowledge it\n // message.ack();\n // },\n // {'ack': 'client'}\n // );\n\n }, {\n key: 'ack',\n value: function ack(messageID, subscription) {\n var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var hdrs = Object.assign({}, headers);\n // 1.2 change id header name from message-id to id\n var idAttr = this.version === VERSIONS.V1_2 ? 'id' : 'message-id';\n hdrs[idAttr] = messageID;\n hdrs.subscription = subscription;\n this._transmit('ACK', hdrs);\n }\n\n // [NACK Frame](http://stomp.github.com/stomp-specification-1.1.html#NACK)\n //\n // * `messageID` & `subscription` are MANDATORY.\n //\n // It is preferable to nack a message by calling `nack()` directly on the\n // message handled by a subscription callback:\n //\n // client.subscribe(destination,\n // function(message) {\n // // process the message\n // // an error occurs, nack it\n // message.nack();\n // },\n // {'ack': 'client'}\n // );\n\n }, {\n key: 'nack',\n value: function nack(messageID, subscription) {\n var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var hdrs = Object.assign({}, headers);\n // 1.2 change id header name from message-id to id\n var idAttr = this.version === VERSIONS.V1_2 ? 'id' : 'message-id';\n hdrs[idAttr] = messageID;\n hdrs.subscription = subscription;\n this._transmit('NACK', hdrs);\n }\n\n // [SUBSCRIBE Frame](http://stomp.github.com/stomp-specification-1.1.html#SUBSCRIBE)\n\n }, {\n key: 'subscribe',\n value: function subscribe(destination, callback) {\n var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var hdrs = Object.assign({}, headers);\n // for convenience if the `id` header is not set, we create a new one for this client\n // that will be returned to be able to unsubscribe this subscription\n if (!hdrs.id) hdrs.id = 'sub-' + createId();\n hdrs.destination = destination;\n this.subscriptions[hdrs.id] = callback;\n this._transmit('SUBSCRIBE', hdrs);\n return {\n id: hdrs.id,\n unsubscribe: this.unsubscribe.bind(this, hdrs.id)\n };\n }\n\n // [UNSUBSCRIBE Frame](http://stomp.github.com/stomp-specification-1.1.html#UNSUBSCRIBE)\n //\n // * `id` is MANDATORY.\n //\n // It is preferable to unsubscribe from a subscription by calling\n // `unsubscribe()` directly on the object returned by `client.subscribe()`:\n //\n // var subscription = client.subscribe(destination, onmessage);\n // ...\n // subscription.unsubscribe(headers);\n\n }, {\n key: 'unsubscribe',\n value: function unsubscribe(id) {\n var headers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var hdrs = Object.assign({}, headers);\n delete this.subscriptions[id];\n hdrs.id = id;\n this._transmit('UNSUBSCRIBE', hdrs);\n }\n\n // Clean up client resources when it is disconnected or the server did not\n // send heart beats in a timely fashion\n\n }, {\n key: '_cleanUp',\n value: function _cleanUp() {\n this.connected = false;\n clearInterval(this.pinger);\n clearInterval(this.ponger);\n }\n\n // Base method to transmit any stomp frame\n\n }, {\n key: '_transmit',\n value: function _transmit(command, headers, body) {\n var out = Frame.marshall(command, headers, body);\n this.debug('>>> ' + out, { frame: { command: command, headers: headers, body: body } });\n this._wsSend(out);\n }\n }, {\n key: '_wsSend',\n value: function _wsSend(data) {\n if (this.isBinary) data = unicodeStringToTypedArray(data);\n this.debug('>>> length ' + data.length);\n // if necessary, split the *STOMP* frame to send it on many smaller\n // *WebSocket* frames\n while (true) {\n if (data.length > this.maxWebSocketFrameSize) {\n this.ws.send(data.slice(0, this.maxWebSocketFrameSize));\n data = data.slice(this.maxWebSocketFrameSize);\n this.debug('remaining = ' + data.length);\n } else {\n return this.ws.send(data);\n }\n }\n }\n\n // Heart-beat negotiation\n\n }, {\n key: '_setupHeartbeat',\n value: function _setupHeartbeat(headers) {\n var _this2 = this;\n\n if (this.version !== VERSIONS.V1_1 && this.version !== VERSIONS.V1_2) return;\n\n // heart-beat header received from the server looks like:\n //\n // heart-beat: sx, sy\n\n var _split$map = (headers['heart-beat'] || '0,0').split(',').map(function (v) {\n return parseInt(v, 10);\n }),\n _split$map2 = slicedToArray(_split$map, 2),\n serverOutgoing = _split$map2[0],\n serverIncoming = _split$map2[1];\n\n if (!(this.heartbeat.outgoing === 0 || serverIncoming === 0)) {\n var ttl = Math.max(this.heartbeat.outgoing, serverIncoming);\n this.debug('send PING every ' + ttl + 'ms');\n this.pinger = setInterval(function () {\n _this2._wsSend(BYTES.LF);\n _this2.debug('>>> PING');\n }, ttl);\n }\n\n if (!(this.heartbeat.incoming === 0 || serverOutgoing === 0)) {\n var _ttl = Math.max(this.heartbeat.incoming, serverOutgoing);\n this.debug('check PONG every ' + _ttl + 'ms');\n this.ponger = setInterval(function () {\n var delta = Date.now() - _this2.serverActivity;\n // We wait twice the TTL to be flexible on window's setInterval calls\n if (delta > _ttl * 2) {\n _this2.debug('did not receive server activity for the last ' + delta + 'ms');\n _this2.ws.close();\n }\n }, _ttl);\n }\n }\n\n // parse the arguments number and type to find the headers, connectCallback and\n // (eventually undefined) errorCallback\n\n }, {\n key: '_parseConnect',\n value: function _parseConnect() {\n var headers = {},\n connectCallback = void 0,\n errorCallback = void 0;\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n switch (args.length) {\n case 2:\n headers = args[0];\n connectCallback = args[1];\n\n break;\n case 3:\n if (args[1] instanceof Function) {\n headers = args[0];\n connectCallback = args[1];\n errorCallback = args[2];\n } else {\n headers.login = args[0];\n headers.passcode = args[1];\n connectCallback = args[2];\n }\n break;\n case 4:\n headers.login = args[0];\n headers.passcode = args[1];\n connectCallback = args[2];\n errorCallback = args[3];\n\n break;\n default:\n headers.login = args[0];\n headers.passcode = args[1];\n connectCallback = args[2];\n errorCallback = args[3];\n headers.host = args[4];\n\n }\n\n return [headers, connectCallback, errorCallback];\n }\n }]);\n return Client;\n }();\n\n // The `webstomp` Object\n var webstomp = {\n Frame: Frame,\n VERSIONS: VERSIONS,\n // This method creates a WebSocket client that is connected to\n // the STOMP server located at the url.\n client: function client(url) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var ws = new WebSocket(url, options.protocols || VERSIONS.supportedProtocols());\n return new Client(ws, options);\n },\n\n // This method is an alternative to `webstomp.client()` to let the user\n // specify the WebSocket to use (either a standard HTML5 WebSocket or\n // a similar object).\n over: function over() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return new (Function.prototype.bind.apply(Client, [null].concat(args)))();\n }\n };\n\n return webstomp;\n\n})));\n"],"names":["render","_vm","this","_c","_self","$mq","attrs","staticRenderFns","name","component","staticClass","crumbs","length","_l","crumb","index","key","on","$event","navigate","_v","_s","label","_e","determineCrumbTypeAndPrefix","map","newCrumb","value","prefix","Prefixes","INSTANCE","includes","type","DynamicTypes","ACTION","referenceId","BULK_ACTION","CANDIDATE","TAB","SOURCE","setNonDynamicCrumbs","router","fullRoute","find","route","toLowerCase","meta","breadcrumb","RouteNames","AANVRAGEN","RECRUITMENT","setDynamicCrumbs","async","path","store","getGenericInstance","getActions","setBreadcrumb","params","instanceCrumb","setInstanceCrumb","actionCrumb","setActionCrumb","candidateCrumb","tabCrumb","setCrumb","sourceCrumb","bulkActionCrumb","setLabelAndPath","actionName","actionId","filter","NOT_SHOW_IN_BREADCRUMBS","data","item","instance","id","profile","candidate","setInstanceName","PROFILE_INSTANCE","Breadcrumbs","PROFILE","action","all","_special","_others","stages_list","identification","definition","urlValue","DETAILS","slice","indexOf","console","error","REQUEST_INSTANCE","content","functie","publicatietitel","firstName","algemeen","roepnaam","lastName","achternaam","setFullNameWithDot","MY_PROFILE_INSTANCE","MY_SOLLICITATIES","werktitel","display","TALENTPOOL","methods","mapActions","setBreadcrumbs","$route","split","$router","options","routes","NotShowCrumbs","findIndex","otherCrumb","push","computed","mapGetters","mounted","versionNumber","links","FAQ","LINKEDIN","require","FACEBOOK","TWITTER","INSTAGRAM","YOUTUBE","userId","MIJN_PROFIEL","JOB_ALERT","MIJN_SOLLICITATIES","$t","DASHBOARD","INTERNE_VACATURES","LOOPBAAN_OPLEIDING","PRIVACY","COOKIES","ACCESSIBILITY","process","Links","logout","authentication","signOut","e","$message","toString","showNotificationCounter","ref","numberOfUserNotifications","directives","rawName","loading","expression","slot","toggleDisabled","toggleIncludeReadUserNotifications","includeReadUserNotifications","userNotifications","notification","goToNotifiedInstance","message","hasOwnProperty","getNotificationContent","notification_timestamp","substring","parseInt","readNotification","fullName","canAccessMijnRecruitment","MIJN_RECRUITMENT","canAccessMijnWervingEnSelectie","MIJN_WERVING_EN_SELECTIE","canAccessMijnLoopbaanadvies","MIJN_LOOPBAANADVIES","canAccessMijnActies","MIJN_TAKEN","NEW","WERKEN_BIJ_AMSTERDAM_NL","components","Logo","mixins","wsSubscribe","isActive","loggedIn","activeIndex","notificationPopup","undefined","menuWidth","pageTitle","title","splitName","userName","pop","join","organisation","showGenericError","markNotificationsAsRead","fetchNotifications","retrieveUserNotifications","fetchNotificationsDebounced","_debounce","previousNumber","showNewNotifications","sleep","getTitleFromNotification","instanceContent","relatedToRequest","NotificationsType","AANVRAAG","instanceId","tab","identifier","user","relationships","setUserAccessRights","watch","connected","IdUtils","isUUID","connect","notifications","deep","handler","newValue","oldValue","read","$notify","onClick","count","props","Boolean","required","Number","default","select","class","active","MIJN_TALENTEN","customContentClass","subtitle","$slots","_t","skeletonCount","Loader","Header","Footer","Breadcrumb","String","customBreadcrumb","Array","location","param","tenantId","window","href","url","callbackFunction","websocket","Stomp","protocols","debug","onConnect","onError","onDisconnect","disconnect","subscribe","onMessage","warn","frame","body","JSON","parse","FUNC_ERROR_TEXT","NAN","symbolTag","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","freeGlobal","g","Object","freeSelf","self","root","Function","objectProto","prototype","objectToString","nativeMax","Math","max","nativeMin","min","now","Date","debounce","func","wait","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","apply","leadingEdge","setTimeout","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","shouldInvoke","trailingEdge","cancel","clearTimeout","flush","debounced","isInvoking","arguments","toNumber","isObject","isObjectLike","isSymbol","call","other","valueOf","replace","isBinary","test","module","exports","global","factory","classCallCheck","Constructor","createClass","defineProperties","target","i","descriptor","enumerable","configurable","writable","defineProperty","protoProps","staticProps","slicedToArray","sliceIterator","arr","_arr","_n","_d","_i","Symbol","iterator","next","done","err","isArray","toConsumableArray","arr2","from","VERSIONS","V1_0","V1_1","V1_2","supportedVersions","supportedProtocols","PROTOCOLS_VERSIONS","getSupportedVersion","protocol","knownVersion","BYTES","LF","NULL","trim","str","unicodeStringToTypedArray","s","escstr","encodeURIComponent","binstr","match","p1","fromCharCode","c","charCodeAt","Uint8Array","typedArrayToUnicodeString","ua","m","p","code","toUpperCase","decodeURIComponent","sizeOfUTF8","createId","ts","getTime","rand","floor","random","Frame","command","headers","_this","lines","skipContentLength","keys","forEach","divider","search","RegExp","headerLines","shift","bodyIndex","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","reverse","line","idx","return","len","chr","charAt","datas","frames","firstFrames","lastFrame","r","f","unmarshallSingle","partial","Client","ws","_options$binary","binary","_options$heartbeat","heartbeat","outgoing","incoming","_options$debug","_options$protocols","binaryType","hasDebug","maxWebSocketFrameSize","subscriptions","partialData","_console","log","_parseConnect2","_parseConnect","_parseConnect3","connectCallback","errorCallback","onmessage","evt","ArrayBuffer","serverActivity","unmarshalledData","unmarshall","server","version","_setupHeartbeat","subscription","onreceive","messageID","ack","bind","nack","onreceipt","onclose","event","_cleanUp","onopen","_transmit","readyState","OPEN","disconnectCallback","close","destination","hdrs","assign","transaction","commit","abort","idAttr","callback","unsubscribe","clearInterval","pinger","ponger","out","marshall","_wsSend","send","_this2","_split$map","v","_split$map2","serverOutgoing","serverIncoming","ttl","setInterval","_ttl","delta","_len","_key","login","passcode","host","webstomp","client","WebSocket","over","concat"],"sourceRoot":""}