@nethesis/phone-island 0.7.78 → 0.7.79

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 (227) hide show
  1. package/dist/App.d.ts +1 -0
  2. package/dist/App.js +1 -1
  3. package/dist/App.js.map +1 -1
  4. package/dist/_virtual/_rollupPluginBabelHelpers.js +1 -1
  5. package/dist/_virtual/floating-ui.dom.esm.js +2 -0
  6. package/dist/_virtual/floating-ui.dom.esm.js.map +1 -0
  7. package/dist/_virtual/index.js +1 -1
  8. package/dist/_virtual/index3.js +1 -1
  9. package/dist/_virtual/index4.js +1 -1
  10. package/dist/_virtual/index5.js +1 -1
  11. package/dist/_virtual/index6.js +1 -1
  12. package/dist/_virtual/index8.js +1 -1
  13. package/dist/_virtual/index9.js +2 -0
  14. package/dist/_virtual/index9.js.map +1 -0
  15. package/dist/_virtual/react-tooltip.min.cjs.js +2 -0
  16. package/dist/_virtual/react-tooltip.min.cjs.js.map +1 -0
  17. package/dist/components/Button.js +1 -1
  18. package/dist/components/Button.js.map +1 -1
  19. package/dist/components/CallView/Actions.js +1 -1
  20. package/dist/components/CallView/Actions.js.map +1 -1
  21. package/dist/components/CallView/Avatar.js +1 -1
  22. package/dist/components/CallView/Avatar.js.map +1 -1
  23. package/dist/components/CallView/BackCall.js +1 -1
  24. package/dist/components/CallView/BackCall.js.map +1 -1
  25. package/dist/components/CallView/DisplayName.js +1 -1
  26. package/dist/components/CallView/DisplayName.js.map +1 -1
  27. package/dist/components/CallView/index.js +1 -1
  28. package/dist/components/CallView/index.js.map +1 -1
  29. package/dist/components/Hangup.d.ts +1 -0
  30. package/dist/components/Hangup.js +1 -1
  31. package/dist/components/Hangup.js.map +1 -1
  32. package/dist/components/Island.js +1 -1
  33. package/dist/components/Island.js.map +1 -1
  34. package/dist/components/KeypadView/index.js +1 -1
  35. package/dist/components/KeypadView/index.js.map +1 -1
  36. package/dist/components/Socket.js +1 -1
  37. package/dist/components/Socket.js.map +1 -1
  38. package/dist/components/TransferView/ListAvatar.d.ts +2 -2
  39. package/dist/components/TransferView/ListAvatar.js +1 -1
  40. package/dist/components/TransferView/ListAvatar.js.map +1 -1
  41. package/dist/components/TransferView/TransferActions.js +1 -1
  42. package/dist/components/TransferView/TransferActions.js.map +1 -1
  43. package/dist/components/TransferView/TransferList.js +1 -1
  44. package/dist/components/TransferView/TransferList.js.map +1 -1
  45. package/dist/index.css +1 -1
  46. package/dist/lib/devices/devices.js +1 -1
  47. package/dist/lib/phone/call.d.ts +1 -1
  48. package/dist/lib/phone/call.js +1 -1
  49. package/dist/lib/phone/call.js.map +1 -1
  50. package/dist/models/currentCall.d.ts +67 -0
  51. package/dist/models/currentCall.js +1 -1
  52. package/dist/models/currentCall.js.map +1 -1
  53. package/dist/models/motions.js +1 -1
  54. package/dist/models/motions.js.map +1 -1
  55. package/dist/node_modules/@emotion/stylis/dist/stylis.browser.esm.js +1 -1
  56. package/dist/node_modules/@emotion/stylis/dist/stylis.browser.esm.js.map +1 -1
  57. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs.js +2 -0
  58. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs.js.map +1 -0
  59. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +2 -0
  60. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js.map +1 -0
  61. package/dist/node_modules/@fortawesome/react-fontawesome/index.es.js +1 -1
  62. package/dist/node_modules/@nethesis/nethesis-light-svg-icons/index.mjs.js +1 -1
  63. package/dist/node_modules/@nethesis/nethesis-light-svg-icons/index.mjs.js.map +1 -1
  64. package/dist/node_modules/@nethesis/nethesis-solid-svg-icons/index.mjs.js +1 -1
  65. package/dist/node_modules/@nethesis/nethesis-solid-svg-icons/index.mjs.js.map +1 -1
  66. package/dist/node_modules/@rematch/core/dist/core.esm.js +1 -1
  67. package/dist/node_modules/@rematch/core/dist/core.esm.js.map +1 -1
  68. package/dist/node_modules/bowser/es5.js +1 -1
  69. package/dist/node_modules/bowser/es5.js.map +1 -1
  70. package/dist/node_modules/classnames/index.js +7 -0
  71. package/dist/node_modules/classnames/index.js.map +1 -0
  72. package/dist/node_modules/engine.io-client/build/esm/contrib/has-cors.js +1 -1
  73. package/dist/node_modules/engine.io-client/build/esm/contrib/has-cors.js.map +1 -1
  74. package/dist/node_modules/engine.io-client/build/esm/contrib/parseqs.js +1 -1
  75. package/dist/node_modules/engine.io-client/build/esm/contrib/parseqs.js.map +1 -1
  76. package/dist/node_modules/engine.io-client/build/esm/contrib/parseuri.js +1 -1
  77. package/dist/node_modules/engine.io-client/build/esm/contrib/parseuri.js.map +1 -1
  78. package/dist/node_modules/engine.io-client/build/esm/contrib/yeast.js +1 -1
  79. package/dist/node_modules/engine.io-client/build/esm/contrib/yeast.js.map +1 -1
  80. package/dist/node_modules/engine.io-client/build/esm/globalThis.browser.js +1 -1
  81. package/dist/node_modules/engine.io-client/build/esm/globalThis.browser.js.map +1 -1
  82. package/dist/node_modules/engine.io-client/build/esm/socket.js +1 -1
  83. package/dist/node_modules/engine.io-client/build/esm/socket.js.map +1 -1
  84. package/dist/node_modules/engine.io-client/build/esm/transport.js +1 -1
  85. package/dist/node_modules/engine.io-client/build/esm/transport.js.map +1 -1
  86. package/dist/node_modules/engine.io-client/build/esm/transports/index.js +1 -1
  87. package/dist/node_modules/engine.io-client/build/esm/transports/index.js.map +1 -1
  88. package/dist/node_modules/engine.io-client/build/esm/transports/polling.js +1 -1
  89. package/dist/node_modules/engine.io-client/build/esm/transports/polling.js.map +1 -1
  90. package/dist/node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js +1 -1
  91. package/dist/node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js.map +1 -1
  92. package/dist/node_modules/engine.io-client/build/esm/transports/websocket.js +1 -1
  93. package/dist/node_modules/engine.io-client/build/esm/transports/websocket.js.map +1 -1
  94. package/dist/node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js +1 -1
  95. package/dist/node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js.map +1 -1
  96. package/dist/node_modules/engine.io-client/build/esm/util.js +1 -1
  97. package/dist/node_modules/engine.io-client/build/esm/util.js.map +1 -1
  98. package/dist/node_modules/engine.io-parser/build/esm/commons.js +1 -1
  99. package/dist/node_modules/engine.io-parser/build/esm/commons.js.map +1 -1
  100. package/dist/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js +1 -1
  101. package/dist/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js.map +1 -1
  102. package/dist/node_modules/engine.io-parser/build/esm/decodePacket.browser.js +1 -1
  103. package/dist/node_modules/engine.io-parser/build/esm/decodePacket.browser.js.map +1 -1
  104. package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +1 -1
  105. package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js.map +1 -1
  106. package/dist/node_modules/engine.io-parser/build/esm/index.js +1 -1
  107. package/dist/node_modules/engine.io-parser/build/esm/index.js.map +1 -1
  108. package/dist/node_modules/framer-motion/dist/framer-motion.js +1 -1
  109. package/dist/node_modules/framer-motion/dist/framer-motion.js.map +1 -1
  110. package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +1 -1
  111. package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +9 -1
  112. package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js.map +1 -1
  113. package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +9 -1
  114. package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
  115. package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
  116. package/dist/node_modules/immer/dist/immer.esm.mjs.js +1 -1
  117. package/dist/node_modules/immer/dist/immer.esm.mjs.js.map +1 -1
  118. package/dist/node_modules/js-base64/base64.mjs.js +1 -1
  119. package/dist/node_modules/js-base64/base64.mjs.js.map +1 -1
  120. package/dist/node_modules/mic-check/lib/index.js +1 -1
  121. package/dist/node_modules/mic-check/lib/requestMediaPermissions.js +1 -1
  122. package/dist/node_modules/mic-check/lib/requestMediaPermissions.js.map +1 -1
  123. package/dist/node_modules/moment/moment.js +2 -2
  124. package/dist/node_modules/moment/moment.js.map +1 -1
  125. package/dist/node_modules/prop-types/checkPropTypes.js +1 -1
  126. package/dist/node_modules/prop-types/checkPropTypes.js.map +1 -1
  127. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
  128. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -1
  129. package/dist/node_modules/prop-types/index.js +1 -1
  130. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +9 -1
  131. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +1 -1
  132. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +9 -1
  133. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
  134. package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  135. package/dist/node_modules/react-is/cjs/react-is.development.js +9 -1
  136. package/dist/node_modules/react-is/cjs/react-is.development.js.map +1 -1
  137. package/dist/node_modules/react-is/cjs/react-is.production.min.js +9 -1
  138. package/dist/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
  139. package/dist/node_modules/react-is/index.js +1 -1
  140. package/dist/node_modules/react-is/index.js.map +1 -1
  141. package/dist/node_modules/react-moment/dist/index.js +2 -2
  142. package/dist/node_modules/react-moment/dist/index.js.map +1 -1
  143. package/dist/node_modules/react-redux/es/components/Context.js +1 -1
  144. package/dist/node_modules/react-redux/es/components/Context.js.map +1 -1
  145. package/dist/node_modules/react-redux/es/components/Provider.js +1 -1
  146. package/dist/node_modules/react-redux/es/components/Provider.js.map +1 -1
  147. package/dist/node_modules/react-redux/es/hooks/useDispatch.js +1 -1
  148. package/dist/node_modules/react-redux/es/hooks/useDispatch.js.map +1 -1
  149. package/dist/node_modules/react-redux/es/hooks/useReduxContext.js +1 -1
  150. package/dist/node_modules/react-redux/es/hooks/useReduxContext.js.map +1 -1
  151. package/dist/node_modules/react-redux/es/hooks/useSelector.js +1 -1
  152. package/dist/node_modules/react-redux/es/hooks/useSelector.js.map +1 -1
  153. package/dist/node_modules/react-redux/es/hooks/useStore.js +1 -1
  154. package/dist/node_modules/react-redux/es/hooks/useStore.js.map +1 -1
  155. package/dist/node_modules/react-redux/es/utils/Subscription.js +1 -1
  156. package/dist/node_modules/react-redux/es/utils/Subscription.js.map +1 -1
  157. package/dist/node_modules/react-redux/es/utils/batch.js +1 -1
  158. package/dist/node_modules/react-redux/es/utils/batch.js.map +1 -1
  159. package/dist/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js +1 -1
  160. package/dist/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js.map +1 -1
  161. package/dist/node_modules/react-redux/es/utils/useSyncExternalStore.js +1 -1
  162. package/dist/node_modules/react-redux/es/utils/useSyncExternalStore.js.map +1 -1
  163. package/dist/node_modules/react-redux/node_modules/react-is/cjs/react-is.development.js +10 -1
  164. package/dist/node_modules/react-redux/node_modules/react-is/cjs/react-is.development.js.map +1 -1
  165. package/dist/node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js +10 -1
  166. package/dist/node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
  167. package/dist/node_modules/react-redux/node_modules/react-is/index.js +1 -1
  168. package/dist/node_modules/react-tooltip/dist/react-tooltip.min.cjs.js +2 -0
  169. package/dist/node_modules/react-tooltip/dist/react-tooltip.min.cjs.js.map +1 -0
  170. package/dist/node_modules/react-tooltip/dist/react-tooltip.min.css.js +2 -0
  171. package/dist/node_modules/react-tooltip/dist/react-tooltip.min.css.js.map +1 -0
  172. package/dist/node_modules/redux/es/redux.js +1 -1
  173. package/dist/node_modules/redux/es/redux.js.map +1 -1
  174. package/dist/node_modules/sdp/sdp.js +1 -1
  175. package/dist/node_modules/sdp/sdp.js.map +1 -1
  176. package/dist/node_modules/socket.io-client/build/esm/index.js +1 -1
  177. package/dist/node_modules/socket.io-client/build/esm/index.js.map +1 -1
  178. package/dist/node_modules/socket.io-client/build/esm/manager.js +1 -1
  179. package/dist/node_modules/socket.io-client/build/esm/manager.js.map +1 -1
  180. package/dist/node_modules/socket.io-client/build/esm/socket.js +1 -1
  181. package/dist/node_modules/socket.io-client/build/esm/socket.js.map +1 -1
  182. package/dist/node_modules/socket.io-client/build/esm/url.js +1 -1
  183. package/dist/node_modules/socket.io-client/build/esm/url.js.map +1 -1
  184. package/dist/node_modules/socket.io-parser/build/esm/binary.js +1 -1
  185. package/dist/node_modules/socket.io-parser/build/esm/binary.js.map +1 -1
  186. package/dist/node_modules/socket.io-parser/build/esm/index.js +1 -1
  187. package/dist/node_modules/socket.io-parser/build/esm/index.js.map +1 -1
  188. package/dist/node_modules/socket.io-parser/build/esm/is-binary.js +1 -1
  189. package/dist/node_modules/socket.io-parser/build/esm/is-binary.js.map +1 -1
  190. package/dist/node_modules/style-inject/dist/style-inject.es.js +2 -0
  191. package/dist/node_modules/style-inject/dist/style-inject.es.js.map +1 -0
  192. package/dist/node_modules/styled-components/dist/styled-components.browser.esm.js +1 -1
  193. package/dist/node_modules/styled-components/dist/styled-components.browser.esm.js.map +1 -1
  194. package/dist/node_modules/tslib/tslib.es6.js +1 -1
  195. package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
  196. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +1 -1
  197. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +1 -1
  198. package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
  199. package/dist/node_modules/webrtc-adapter/src/js/adapter_core.js +1 -1
  200. package/dist/node_modules/webrtc-adapter/src/js/adapter_core.js.map +1 -1
  201. package/dist/node_modules/webrtc-adapter/src/js/adapter_factory.js +1 -1
  202. package/dist/node_modules/webrtc-adapter/src/js/adapter_factory.js.map +1 -1
  203. package/dist/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js +1 -1
  204. package/dist/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js.map +1 -1
  205. package/dist/node_modules/webrtc-adapter/src/js/chrome/getdisplaymedia.js +1 -1
  206. package/dist/node_modules/webrtc-adapter/src/js/chrome/getdisplaymedia.js.map +1 -1
  207. package/dist/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js +1 -1
  208. package/dist/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js.map +1 -1
  209. package/dist/node_modules/webrtc-adapter/src/js/common_shim.js +1 -1
  210. package/dist/node_modules/webrtc-adapter/src/js/common_shim.js.map +1 -1
  211. package/dist/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js +1 -1
  212. package/dist/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js.map +1 -1
  213. package/dist/node_modules/webrtc-adapter/src/js/firefox/getdisplaymedia.js +1 -1
  214. package/dist/node_modules/webrtc-adapter/src/js/firefox/getdisplaymedia.js.map +1 -1
  215. package/dist/node_modules/webrtc-adapter/src/js/firefox/getusermedia.js +1 -1
  216. package/dist/node_modules/webrtc-adapter/src/js/firefox/getusermedia.js.map +1 -1
  217. package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js +1 -1
  218. package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js.map +1 -1
  219. package/dist/node_modules/webrtc-adapter/src/js/utils.js +1 -1
  220. package/dist/node_modules/webrtc-adapter/src/js/utils.js.map +1 -1
  221. package/dist/services/astproxy.js +1 -1
  222. package/dist/services/astproxy.js.map +1 -1
  223. package/dist/styles/Island.styles.js +1 -1
  224. package/dist/styles/Island.styles.js.map +1 -1
  225. package/package.json +3 -2
  226. package/dist/node_modules/engine.io-client/build/esm/index.js +0 -2
  227. package/dist/node_modules/engine.io-client/build/esm/index.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=!1;try{e="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}var t=e;exports.hasCORS=t;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});let e=!1;try{e="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}const t=e;exports.hasCORS=t;
2
2
  //# sourceMappingURL=has-cors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"has-cors.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/contrib/has-cors.js"],"sourcesContent":["// imported from https://github.com/component/has-cors\nlet value = false;\ntry {\n value = typeof XMLHttpRequest !== 'undefined' &&\n 'withCredentials' in new XMLHttpRequest();\n}\ncatch (err) {\n // if XMLHttp support is disabled in IE then it will throw\n // when trying to create\n}\nexport const hasCORS = value;\n"],"names":["value","XMLHttpRequest","err","hasCORS"],"mappings":"oEACA,IAAIA,GAAQ,EACZ,IACIA,EAAkC,oBAAnBC,gBACX,oBAAqB,IAAIA,cAI7B,CAFJ,MAAOC,GAEH,CAEG,IAAMC,EAAUH"}
1
+ {"version":3,"file":"has-cors.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/contrib/has-cors.js"],"sourcesContent":["// imported from https://github.com/component/has-cors\nlet value = false;\ntry {\n value = typeof XMLHttpRequest !== 'undefined' &&\n 'withCredentials' in new XMLHttpRequest();\n}\ncatch (err) {\n // if XMLHttp support is disabled in IE then it will throw\n // when trying to create\n}\nexport const hasCORS = value;\n"],"names":["value","XMLHttpRequest","err","hasCORS"],"mappings":"oEACA,IAAIA,GAAQ,EACZ,IACIA,EAAkC,oBAAnBC,gBACX,oBAAqB,IAAIA,cAI7B,CAFJ,MAAOC,GAEH,CAEG,MAAMC,EAAUH"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.decode=function(e){for(var o={},n=e.split("&"),t=0,r=n.length;t<r;t++){var d=n[t].split("=");o[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return o},exports.encode=function(e){var o="";for(var n in e)e.hasOwnProperty(n)&&(o.length&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return o};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.decode=function(e){let t={},o=e.split("&");for(let e=0,n=o.length;e<n;e++){let n=o[e].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return t},exports.encode=function(e){let t="";for(let o in e)e.hasOwnProperty(o)&&(t.length&&(t+="&"),t+=encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return t};
2
2
  //# sourceMappingURL=parseqs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parseqs.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/contrib/parseqs.js"],"sourcesContent":["// imported from https://github.com/galkn/querystring\n/**\n * Compiles a querystring\n * Returns string representation of the object\n *\n * @param {Object}\n * @api private\n */\nexport function encode(obj) {\n let str = '';\n for (let i in obj) {\n if (obj.hasOwnProperty(i)) {\n if (str.length)\n str += '&';\n str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);\n }\n }\n return str;\n}\n/**\n * Parses a simple querystring into an object\n *\n * @param {String} qs\n * @api private\n */\nexport function decode(qs) {\n let qry = {};\n let pairs = qs.split('&');\n for (let i = 0, l = pairs.length; i < l; i++) {\n let pair = pairs[i].split('=');\n qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);\n }\n return qry;\n}\n"],"names":["qs","qry","pairs","split","i","l","length","pair","decodeURIComponent","obj","str","hasOwnProperty","encodeURIComponent"],"mappings":"mFAyBO,SAAgBA,GAGnB,IAFA,IAAIC,EAAM,CAAA,EACNC,EAAQF,EAAGG,MAAM,KACZC,EAAI,EAAGC,EAAIH,EAAMI,OAAQF,EAAIC,EAAGD,IAAK,CAC1C,IAAIG,EAAOL,EAAME,GAAGD,MAAM,KAC1BF,EAAIO,mBAAmBD,EAAK,KAAOC,mBAAmBD,EAAK,GAC/D,CACA,OAAON,CACX,iBAzBO,SAAgBQ,GACnB,IAAIC,EAAM,GACV,IAAK,IAAIN,KAAKK,EACNA,EAAIE,eAAeP,KACfM,EAAIJ,SACJI,GAAO,KACXA,GAAOE,mBAAmBR,GAAK,IAAMQ,mBAAmBH,EAAIL,KAGpE,OAAOM,CACX"}
1
+ {"version":3,"file":"parseqs.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/contrib/parseqs.js"],"sourcesContent":["// imported from https://github.com/galkn/querystring\n/**\n * Compiles a querystring\n * Returns string representation of the object\n *\n * @param {Object}\n * @api private\n */\nexport function encode(obj) {\n let str = '';\n for (let i in obj) {\n if (obj.hasOwnProperty(i)) {\n if (str.length)\n str += '&';\n str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);\n }\n }\n return str;\n}\n/**\n * Parses a simple querystring into an object\n *\n * @param {String} qs\n * @api private\n */\nexport function decode(qs) {\n let qry = {};\n let pairs = qs.split('&');\n for (let i = 0, l = pairs.length; i < l; i++) {\n let pair = pairs[i].split('=');\n qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);\n }\n return qry;\n}\n"],"names":["qs","qry","pairs","split","i","l","length","pair","decodeURIComponent","obj","str","hasOwnProperty","encodeURIComponent"],"mappings":"mFAyBO,SAAgBA,GACnB,IAAIC,EAAM,CAAA,EACNC,EAAQF,EAAGG,MAAM,KACrB,IAAK,IAAIC,EAAI,EAAGC,EAAIH,EAAMI,OAAQF,EAAIC,EAAGD,IAAK,CAC1C,IAAIG,EAAOL,EAAME,GAAGD,MAAM,KAC1BF,EAAIO,mBAAmBD,EAAK,KAAOC,mBAAmBD,EAAK,GAC/D,CACA,OAAON,CACX,iBAzBO,SAAgBQ,GACnB,IAAIC,EAAM,GACV,IAAK,IAAIN,KAAKK,EACNA,EAAIE,eAAeP,KACfM,EAAIJ,SACJI,GAAO,KACXA,GAAOE,mBAAmBR,GAAK,IAAMQ,mBAAmBH,EAAIL,KAGpE,OAAOM,CACX"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];exports.parse=function(t){var s=t,a=t.indexOf("["),o=t.indexOf("]");-1!=a&&-1!=o&&(t=t.substring(0,a)+t.substring(a,o).replace(/:/g,";")+t.substring(o,t.length));for(var i,p,u=e.exec(t||""),c={},l=14;l--;)c[r[l]]=u[l]||"";return-1!=a&&-1!=o&&(c.source=s,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=function(e,r){var t=/\/{2,9}/g,s=r.replace(t,"/").split("/");"/"!=r.slice(0,1)&&0!==r.length||s.splice(0,1);"/"==r.slice(-1)&&s.splice(s.length-1,1);return s}(0,c.path),c.queryKey=(i=c.query,p={},i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,r,t){r&&(p[r]=t)})),p),c};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,t=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];exports.parse=function(r){const s=r,o=r.indexOf("["),n=r.indexOf("]");-1!=o&&-1!=n&&(r=r.substring(0,o)+r.substring(o,n).replace(/:/g,";")+r.substring(n,r.length));let c=e.exec(r||""),i={},u=14;for(;u--;)i[t[u]]=c[u]||"";return-1!=o&&-1!=n&&(i.source=s,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(e,t){const r=/\/{2,9}/g,s=t.replace(r,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||s.splice(0,1);"/"==t.slice(-1)&&s.splice(s.length-1,1);return s}(0,i.path),i.queryKey=function(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,s){t&&(r[t]=s)})),r}(0,i.query),i};
2
2
  //# sourceMappingURL=parseuri.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parseuri.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/contrib/parseuri.js"],"sourcesContent":["// imported from https://github.com/galkn/parseuri\n/**\n * Parses an URI\n *\n * @author Steven Levithan <stevenlevithan.com> (MIT license)\n * @api private\n */\nconst re = /^(?:(?![^:@]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/;\nconst parts = [\n 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\n];\nexport function parse(str) {\n const src = str, b = str.indexOf('['), e = str.indexOf(']');\n if (b != -1 && e != -1) {\n str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);\n }\n let m = re.exec(str || ''), uri = {}, i = 14;\n while (i--) {\n uri[parts[i]] = m[i] || '';\n }\n if (b != -1 && e != -1) {\n uri.source = src;\n uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');\n uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');\n uri.ipv6uri = true;\n }\n uri.pathNames = pathNames(uri, uri['path']);\n uri.queryKey = queryKey(uri, uri['query']);\n return uri;\n}\nfunction pathNames(obj, path) {\n const regx = /\\/{2,9}/g, names = path.replace(regx, \"/\").split(\"/\");\n if (path.slice(0, 1) == '/' || path.length === 0) {\n names.splice(0, 1);\n }\n if (path.slice(-1) == '/') {\n names.splice(names.length - 1, 1);\n }\n return names;\n}\nfunction queryKey(uri, query) {\n const data = {};\n query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function ($0, $1, $2) {\n if ($1) {\n data[$1] = $2;\n }\n });\n return data;\n}\n"],"names":["re","parts","str","src","b","indexOf","e","substring","replace","length","query","data","m","exec","uri","i","source","host","authority","ipv6uri","pathNames","obj","path","regx","names","split","slice","splice","queryKey","$0","$1","$2"],"mappings":"oEAOA,IAAMA,EAAK,0OACLC,EAAQ,CACV,SAAU,WAAY,YAAa,WAAY,OAAQ,WAAY,OAAQ,OAAQ,WAAY,OAAQ,YAAa,OAAQ,QAAS,wBAElI,SAAeC,GAClB,IAAMC,EAAMD,EAAKE,EAAIF,EAAIG,QAAQ,KAAMC,EAAIJ,EAAIG,QAAQ,MAC7C,GAAND,IAAiB,GAANE,IACXJ,EAAMA,EAAIK,UAAU,EAAGH,GAAKF,EAAIK,UAAUH,EAAGE,GAAGE,QAAQ,KAAM,KAAON,EAAIK,UAAUD,EAAGJ,EAAIO,SAG9F,IADA,IAwBmBC,EACbC,EAzBFC,EAAIZ,EAAGa,KAAKX,GAAO,IAAKY,EAAM,CAAE,EAAEC,EAAI,GACnCA,KACHD,EAAIb,EAAMc,IAAMH,EAAEG,IAAM,GAU5B,OARU,GAANX,IAAiB,GAANE,IACXQ,EAAIE,OAASb,EACbW,EAAIG,KAAOH,EAAIG,KAAKV,UAAU,EAAGO,EAAIG,KAAKR,OAAS,GAAGD,QAAQ,KAAM,KACpEM,EAAII,UAAYJ,EAAII,UAAUV,QAAQ,IAAK,IAAIA,QAAQ,IAAK,IAAIA,QAAQ,KAAM,KAC9EM,EAAIK,SAAU,GAElBL,EAAIM,UAIR,SAAmBC,EAAKC,GACpB,IAAMC,EAAO,WAAYC,EAAQF,EAAKd,QAAQe,EAAM,KAAKE,MAAM,KACvC,KAApBH,EAAKI,MAAM,EAAG,IAA6B,IAAhBJ,EAAKb,QAChCe,EAAMG,OAAO,EAAG,GAEE,KAAlBL,EAAKI,OAAO,IACZF,EAAMG,OAAOH,EAAMf,OAAS,EAAG,GAEnC,OAAOe,CACX,CAboBJ,CAAUN,EAAKA,EAAU,MACzCA,EAAIc,UAaelB,EAbUI,EAAW,MAclCH,EAAO,CAAA,EACbD,EAAMF,QAAQ,6BAA6B,SAAUqB,EAAIC,EAAIC,GACrDD,IACAnB,EAAKmB,GAAMC,EAEnB,IACOpB,GAnBAG,CACX"}
1
+ {"version":3,"file":"parseuri.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/contrib/parseuri.js"],"sourcesContent":["// imported from https://github.com/galkn/parseuri\n/**\n * Parses an URI\n *\n * @author Steven Levithan <stevenlevithan.com> (MIT license)\n * @api private\n */\nconst re = /^(?:(?![^:@]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/;\nconst parts = [\n 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\n];\nexport function parse(str) {\n const src = str, b = str.indexOf('['), e = str.indexOf(']');\n if (b != -1 && e != -1) {\n str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);\n }\n let m = re.exec(str || ''), uri = {}, i = 14;\n while (i--) {\n uri[parts[i]] = m[i] || '';\n }\n if (b != -1 && e != -1) {\n uri.source = src;\n uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');\n uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');\n uri.ipv6uri = true;\n }\n uri.pathNames = pathNames(uri, uri['path']);\n uri.queryKey = queryKey(uri, uri['query']);\n return uri;\n}\nfunction pathNames(obj, path) {\n const regx = /\\/{2,9}/g, names = path.replace(regx, \"/\").split(\"/\");\n if (path.slice(0, 1) == '/' || path.length === 0) {\n names.splice(0, 1);\n }\n if (path.slice(-1) == '/') {\n names.splice(names.length - 1, 1);\n }\n return names;\n}\nfunction queryKey(uri, query) {\n const data = {};\n query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function ($0, $1, $2) {\n if ($1) {\n data[$1] = $2;\n }\n });\n return data;\n}\n"],"names":["re","parts","str","src","b","indexOf","e","substring","replace","length","m","exec","uri","i","source","host","authority","ipv6uri","pathNames","obj","path","regx","names","split","slice","splice","queryKey","query","data","$0","$1","$2"],"mappings":"oEAOA,MAAMA,EAAK,0OACLC,EAAQ,CACV,SAAU,WAAY,YAAa,WAAY,OAAQ,WAAY,OAAQ,OAAQ,WAAY,OAAQ,YAAa,OAAQ,QAAS,wBAElI,SAAeC,GAClB,MAAMC,EAAMD,EAAKE,EAAIF,EAAIG,QAAQ,KAAMC,EAAIJ,EAAIG,QAAQ,MAC7C,GAAND,IAAiB,GAANE,IACXJ,EAAMA,EAAIK,UAAU,EAAGH,GAAKF,EAAIK,UAAUH,EAAGE,GAAGE,QAAQ,KAAM,KAAON,EAAIK,UAAUD,EAAGJ,EAAIO,SAE9F,IAAIC,EAAIV,EAAGW,KAAKT,GAAO,IAAKU,EAAM,CAAE,EAAEC,EAAI,GAC1C,KAAOA,KACHD,EAAIX,EAAMY,IAAMH,EAAEG,IAAM,GAU5B,OARU,GAANT,IAAiB,GAANE,IACXM,EAAIE,OAASX,EACbS,EAAIG,KAAOH,EAAIG,KAAKR,UAAU,EAAGK,EAAIG,KAAKN,OAAS,GAAGD,QAAQ,KAAM,KACpEI,EAAII,UAAYJ,EAAII,UAAUR,QAAQ,IAAK,IAAIA,QAAQ,IAAK,IAAIA,QAAQ,KAAM,KAC9EI,EAAIK,SAAU,GAElBL,EAAIM,UAIR,SAAmBC,EAAKC,GACpB,MAAMC,EAAO,WAAYC,EAAQF,EAAKZ,QAAQa,EAAM,KAAKE,MAAM,KACvC,KAApBH,EAAKI,MAAM,EAAG,IAA6B,IAAhBJ,EAAKX,QAChCa,EAAMG,OAAO,EAAG,GAEE,KAAlBL,EAAKI,OAAO,IACZF,EAAMG,OAAOH,EAAMb,OAAS,EAAG,GAEnC,OAAOa,CACX,CAboBJ,CAAUN,EAAKA,EAAU,MACzCA,EAAIc,SAaR,SAAkBd,EAAKe,GACnB,MAAMC,EAAO,CAAA,EAMb,OALAD,EAAMnB,QAAQ,6BAA6B,SAAUqB,EAAIC,EAAIC,GACrDD,IACAF,EAAKE,GAAMC,EAEnB,IACOH,CACX,CArBmBF,CAASd,EAAKA,EAAW,OACjCA,CACX"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),t={},o=0,n=0;function s(e){var t="";do{t=r[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}for(;n<64;n++)t[r[n]]=n;exports.encode=s,exports.yeast=function(){var r=s(+new Date);return r!==e?(o=0,e=r):r+"."+s(o++)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),t={};let o,r=0,n=0;function s(t){let o="";do{o=e[t%64]+o,t=Math.floor(t/64)}while(t>0);return o}for(;n<64;n++)t[e[n]]=n;exports.encode=s,exports.yeast=function(){const e=s(+new Date);return e!==o?(r=0,o=e):e+"."+s(r++)};
2
2
  //# sourceMappingURL=yeast.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"yeast.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/contrib/yeast.js"],"sourcesContent":["// imported from https://github.com/unshiftio/yeast\n'use strict';\nconst alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split(''), length = 64, map = {};\nlet seed = 0, i = 0, prev;\n/**\n * Return a string representing the specified number.\n *\n * @param {Number} num The number to convert.\n * @returns {String} The string representation of the number.\n * @api public\n */\nexport function encode(num) {\n let encoded = '';\n do {\n encoded = alphabet[num % length] + encoded;\n num = Math.floor(num / length);\n } while (num > 0);\n return encoded;\n}\n/**\n * Return the integer value specified by the given string.\n *\n * @param {String} str The string to convert.\n * @returns {Number} The integer value represented by the string.\n * @api public\n */\nexport function decode(str) {\n let decoded = 0;\n for (i = 0; i < str.length; i++) {\n decoded = decoded * length + map[str.charAt(i)];\n }\n return decoded;\n}\n/**\n * Yeast: A tiny growing id generator.\n *\n * @returns {String} A unique id.\n * @api public\n */\nexport function yeast() {\n const now = encode(+new Date());\n if (now !== prev)\n return seed = 0, prev = now;\n return now + '.' + encode(seed++);\n}\n//\n// Map each character to its index.\n//\nfor (; i < length; i++)\n map[alphabet[i]] = i;\n"],"names":["prev","alphabet","split","map","seed","i","encode","num","encoded","Math","floor","now","Date"],"mappings":"oEAEA,IACqBA,EADfC,EAAW,mEAAmEC,MAAM,IAAkBC,EAAM,CAAA,EAC9GC,EAAO,EAAGC,EAAI,EAQX,SAASC,EAAOC,GACnB,IAAIC,EAAU,GACd,GACIA,EAAUP,EAASM,EAZ6E,IAY7DC,EACnCD,EAAME,KAAKC,MAAMH,EAb+E,UAc3FA,EAAM,GACf,OAAOC,CACX,CA8BA,KAAOH,EA9CiG,GA8CrFA,IACfF,EAAIF,EAASI,IAAMA,iCAVhB,WACH,IAAMM,EAAML,GAAQ,IAAIM,MACxB,OAAID,IAAQX,GACDI,EAAO,EAAGJ,EAAOW,GACrBA,EAAM,IAAML,EAAOF,IAC9B"}
1
+ {"version":3,"file":"yeast.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/contrib/yeast.js"],"sourcesContent":["// imported from https://github.com/unshiftio/yeast\n'use strict';\nconst alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split(''), length = 64, map = {};\nlet seed = 0, i = 0, prev;\n/**\n * Return a string representing the specified number.\n *\n * @param {Number} num The number to convert.\n * @returns {String} The string representation of the number.\n * @api public\n */\nexport function encode(num) {\n let encoded = '';\n do {\n encoded = alphabet[num % length] + encoded;\n num = Math.floor(num / length);\n } while (num > 0);\n return encoded;\n}\n/**\n * Return the integer value specified by the given string.\n *\n * @param {String} str The string to convert.\n * @returns {Number} The integer value represented by the string.\n * @api public\n */\nexport function decode(str) {\n let decoded = 0;\n for (i = 0; i < str.length; i++) {\n decoded = decoded * length + map[str.charAt(i)];\n }\n return decoded;\n}\n/**\n * Yeast: A tiny growing id generator.\n *\n * @returns {String} A unique id.\n * @api public\n */\nexport function yeast() {\n const now = encode(+new Date());\n if (now !== prev)\n return seed = 0, prev = now;\n return now + '.' + encode(seed++);\n}\n//\n// Map each character to its index.\n//\nfor (; i < length; i++)\n map[alphabet[i]] = i;\n"],"names":["alphabet","split","map","prev","seed","i","encode","num","encoded","Math","floor","now","Date"],"mappings":"oEAEA,MAAMA,EAAW,mEAAmEC,MAAM,IAAkBC,EAAM,CAAA,EAClH,IAAqBC,EAAjBC,EAAO,EAAGC,EAAI,EAQX,SAASC,EAAOC,GACnB,IAAIC,EAAU,GACd,GACIA,EAAUR,EAASO,EAZ6E,IAY7DC,EACnCD,EAAME,KAAKC,MAAMH,EAb+E,UAc3FA,EAAM,GACf,OAAOC,CACX,CA8BA,KAAOH,EA9CiG,GA8CrFA,IACfH,EAAIF,EAASK,IAAMA,iCAVhB,WACH,MAAMM,EAAML,GAAQ,IAAIM,MACxB,OAAID,IAAQR,GACDC,EAAO,EAAGD,EAAOQ,GACrBA,EAAM,IAAML,EAAOF,IAC9B"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();exports.globalThisShim=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();exports.globalThisShim=e;
2
2
  //# sourceMappingURL=globalThis.browser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"globalThis.browser.js","sources":["../../../../../node_modules/engine.io-client/build/esm/globalThis.browser.js"],"sourcesContent":["export const globalThisShim = (() => {\n if (typeof self !== \"undefined\") {\n return self;\n }\n else if (typeof window !== \"undefined\") {\n return window;\n }\n else {\n return Function(\"return this\")();\n }\n})();\n"],"names":["globalThisShim","self","window","Function"],"mappings":"oEAAO,IAAMA,EACW,oBAATC,KACAA,KAEgB,oBAAXC,OACLA,OAGAC,SAAS,cAATA"}
1
+ {"version":3,"file":"globalThis.browser.js","sources":["../../../../../node_modules/engine.io-client/build/esm/globalThis.browser.js"],"sourcesContent":["export const globalThisShim = (() => {\n if (typeof self !== \"undefined\") {\n return self;\n }\n else if (typeof window !== \"undefined\") {\n return window;\n }\n else {\n return Function(\"return this\")();\n }\n})();\n"],"names":["globalThisShim","self","window","Function"],"mappings":"oEAAaA,MAAAA,EACW,oBAATC,KACAA,KAEgB,oBAAXC,OACLA,OAGAC,SAAS,cAATA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("./transports/index.js"),r=require("./util.js"),s=require("./contrib/parseqs.js"),i=require("./contrib/parseuri.js"),n=require("../../../@socket.io/component-emitter/index.mjs.js"),o=require("../../../engine.io-parser/build/esm/index.js"),a=function(n){e.inherits(u,n);var a=e.createSuper(u);function u(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.classCallCheck(this,u),n=a.call(this),t&&"object"===e.typeof(t)&&(o=t,t=null),t?(t=i.parse(t),o.hostname=t.host,o.secure="https"===t.protocol||"wss"===t.protocol,o.port=t.port,t.query&&(o.query=t.query)):o.host&&(o.hostname=i.parse(o.host).host),r.installTimerFunctions(e.assertThisInitialized(n),o),n.secure=null!=o.secure?o.secure:"undefined"!=typeof location&&"https:"===location.protocol,o.hostname&&!o.port&&(o.port=n.secure?"443":"80"),n.hostname=o.hostname||("undefined"!=typeof location?location.hostname:"localhost"),n.port=o.port||("undefined"!=typeof location&&location.port?location.port:n.secure?"443":"80"),n.transports=o.transports||["polling","websocket"],n.readyState="",n.writeBuffer=[],n.prevBufferLen=0,n.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},o),n.opts.path=n.opts.path.replace(/\/$/,"")+"/","string"==typeof n.opts.query&&(n.opts.query=s.decode(n.opts.query)),n.id=null,n.upgrades=null,n.pingInterval=null,n.pingTimeout=null,n.pingTimeoutTimer=null,"function"==typeof addEventListener&&(n.opts.closeOnBeforeunload&&(n.beforeunloadEventListener=function(){n.transport&&(n.transport.removeAllListeners(),n.transport.close())},addEventListener("beforeunload",n.beforeunloadEventListener,!1)),"localhost"!==n.hostname&&(n.offlineEventListener=function(){n.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",n.offlineEventListener,!1))),n.open(),n}return e.createClass(u,[{key:"createTransport",value:function(e){var r=Object.assign({},this.opts.query);r.EIO=o.protocol,r.transport=e,this.id&&(r.sid=this.id);var s=Object.assign({},this.opts.transportOptions[e],this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new t.transports[e](s)}},{key:"open",value:function(){var e,t=this;if(this.opts.rememberUpgrade&&u.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((function(){t.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}},{key:"setTransport",value:function(e){var t=this;this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(function(e){return t.onClose("transport close",e)}))}},{key:"probe",value:function(e){var t=this,r=this.createTransport(e),s=!1;u.priorWebsocketSuccess=!1;var i=function(){s||(r.send([{type:"ping",data:"probe"}]),r.once("packet",(function(e){if(!s)if("pong"===e.type&&"probe"===e.data){if(t.upgrading=!0,t.emitReserved("upgrading",r),!r)return;u.priorWebsocketSuccess="websocket"===r.name,t.transport.pause((function(){s||"closed"!==t.readyState&&(c(),t.setTransport(r),r.send([{type:"upgrade"}]),t.emitReserved("upgrade",r),r=null,t.upgrading=!1,t.flush())}))}else{var i=new Error("probe error");i.transport=r.name,t.emitReserved("upgradeError",i)}})))};function n(){s||(s=!0,c(),r.close(),r=null)}var o=function(e){var s=new Error("probe error: "+e);s.transport=r.name,n(),t.emitReserved("upgradeError",s)};function a(){o("transport closed")}function p(){o("socket closed")}function h(e){r&&e.name!==r.name&&n()}var c=function(){r.removeListener("open",i),r.removeListener("error",o),r.removeListener("close",a),t.off("close",p),t.off("upgrading",h)};r.once("open",i),r.once("error",o),r.once("close",a),this.once("close",p),this.once("upgrading",h),r.open()}},{key:"onOpen",value:function(){if(this.readyState="open",u.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause)for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},{key:"onPacket",value:function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}},{key:"onHandshake",value:function(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}},{key:"resetPingTimeout",value:function(){var e=this;this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((function(){e.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}},{key:"onDrain",value:function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}},{key:"flush",value:function(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){var e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}},{key:"getWritablePackets",value:function(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;for(var e=1,t=0;t<this.writeBuffer.length;t++){var s=this.writeBuffer[t].data;if(s&&(e+=r.byteLength(s)),t>0&&e>this.maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}},{key:"write",value:function(e,t,r){return this.sendPacket("message",e,t,r),this}},{key:"send",value:function(e,t,r){return this.sendPacket("message",e,t,r),this}},{key:"sendPacket",value:function(e,t,r,s){if("function"==typeof t&&(s=t,t=void 0),"function"==typeof r&&(s=r,r=null),"closing"!==this.readyState&&"closed"!==this.readyState){(r=r||{}).compress=!1!==r.compress;var i={type:e,data:t,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),s&&this.once("flush",s),this.flush()}}},{key:"close",value:function(){var e=this,t=function(){e.onClose("forced close"),e.transport.close()},r=function r(){e.off("upgrade",r),e.off("upgradeError",r),t()},s=function(){e.once("upgrade",r),e.once("upgradeError",r)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(function(){e.upgrading?s():t()})):this.upgrading?s():t()),this}},{key:"onError",value:function(e){u.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}},{key:"onClose",value:function(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}},{key:"filterUpgrades",value:function(e){for(var t=[],r=0,s=e.length;r<s;r++)~this.transports.indexOf(e[r])&&t.push(e[r]);return t}}]),u}(n.Emitter);a.protocol=o.protocol,exports.Socket=a;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./transports/index.js"),t=require("./util.js"),s=require("./contrib/parseqs.js"),r=require("./contrib/parseuri.js"),i=require("../../../@socket.io/component-emitter/index.mjs.js"),o=require("../../../engine.io-parser/build/esm/index.js");class n extends i.Emitter{constructor(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),e&&"object"==typeof e&&(i=e,e=null),e?(e=r.parse(e),i.hostname=e.host,i.secure="https"===e.protocol||"wss"===e.protocol,i.port=e.port,e.query&&(i.query=e.query)):i.host&&(i.hostname=r.parse(i.host).host),t.installTimerFunctions(this,i),this.secure=null!=i.secure?i.secure:"undefined"!=typeof location&&"https:"===location.protocol,i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=i.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=i.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},i),this.opts.path=this.opts.path.replace(/\/$/,"")+"/","string"==typeof this.opts.query&&(this.opts.query=s.decode(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=o.protocol,s.transport=t,this.id&&(s.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new e.transports[t](r)}open(){let e;if(this.opts.rememberUpgrade&&n.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(e){let t=this.createTransport(e),s=!1;n.priorWebsocketSuccess=!1;const r=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",(e=>{if(!s)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;n.priorWebsocketSuccess="websocket"===t.name,this.transport.pause((()=>{s||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())}))}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}})))};function i(){s||(s=!0,c(),t.close(),t=null)}const o=e=>{const s=new Error("probe error: "+e);s.transport=t.name,i(),this.emitReserved("upgradeError",s)};function a(){o("transport closed")}function h(){o("socket closed")}function p(e){t&&e.name!==t.name&&i()}const c=()=>{t.removeListener("open",r),t.removeListener("error",o),t.removeListener("close",a),this.off("close",h),this.off("upgrading",p)};t.once("open",r),t.once("error",o),t.once("close",a),this.once("close",h),this.once("upgrading",p),t.open()}onOpen(){if(this.readyState="open",n.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade&&this.transport.pause){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let s=0;s<this.writeBuffer.length;s++){const r=this.writeBuffer[s].data;if(r&&(e+=t.byteLength(r)),s>0&&e>this.maxPayload)return this.writeBuffer.slice(0,s);e+=2}return this.writeBuffer}write(e,t,s){return this.sendPacket("message",e,t,s),this}send(e,t,s){return this.sendPacket("message",e,t,s),this}sendPacket(e,t,s,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof s&&(r=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;const i={type:e,data:t,options:s};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?s():e()})):this.upgrading?s():e()),this}onError(e){n.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let s=0;const r=e.length;for(;s<r;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}n.protocol=o.protocol,exports.Socket=n;
2
2
  //# sourceMappingURL=socket.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"socket.js","sources":["../../../../../node_modules/engine.io-client/build/esm/socket.js"],"sourcesContent":["import { transports } from \"./transports/index.js\";\nimport { installTimerFunctions, byteLength } from \"./util.js\";\nimport { decode } from \"./contrib/parseqs.js\";\nimport { parse } from \"./contrib/parseuri.js\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { protocol } from \"engine.io-parser\";\nexport class Socket extends Emitter {\n /**\n * Socket constructor.\n *\n * @param {String|Object} uri or options\n * @param {Object} opts - options\n * @api public\n */\n constructor(uri, opts = {}) {\n super();\n if (uri && \"object\" === typeof uri) {\n opts = uri;\n uri = null;\n }\n if (uri) {\n uri = parse(uri);\n opts.hostname = uri.host;\n opts.secure = uri.protocol === \"https\" || uri.protocol === \"wss\";\n opts.port = uri.port;\n if (uri.query)\n opts.query = uri.query;\n }\n else if (opts.host) {\n opts.hostname = parse(opts.host).host;\n }\n installTimerFunctions(this, opts);\n this.secure =\n null != opts.secure\n ? opts.secure\n : typeof location !== \"undefined\" && \"https:\" === location.protocol;\n if (opts.hostname && !opts.port) {\n // if no port is specified manually, use the protocol default\n opts.port = this.secure ? \"443\" : \"80\";\n }\n this.hostname =\n opts.hostname ||\n (typeof location !== \"undefined\" ? location.hostname : \"localhost\");\n this.port =\n opts.port ||\n (typeof location !== \"undefined\" && location.port\n ? location.port\n : this.secure\n ? \"443\"\n : \"80\");\n this.transports = opts.transports || [\"polling\", \"websocket\"];\n this.readyState = \"\";\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n this.opts = Object.assign({\n path: \"/engine.io\",\n agent: false,\n withCredentials: false,\n upgrade: true,\n timestampParam: \"t\",\n rememberUpgrade: false,\n rejectUnauthorized: true,\n perMessageDeflate: {\n threshold: 1024\n },\n transportOptions: {},\n closeOnBeforeunload: true\n }, opts);\n this.opts.path = this.opts.path.replace(/\\/$/, \"\") + \"/\";\n if (typeof this.opts.query === \"string\") {\n this.opts.query = decode(this.opts.query);\n }\n // set on handshake\n this.id = null;\n this.upgrades = null;\n this.pingInterval = null;\n this.pingTimeout = null;\n // set on heartbeat\n this.pingTimeoutTimer = null;\n if (typeof addEventListener === \"function\") {\n if (this.opts.closeOnBeforeunload) {\n // Firefox closes the connection when the \"beforeunload\" event is emitted but not Chrome. This event listener\n // ensures every browser behaves the same (no \"disconnect\" event at the Socket.IO level when the page is\n // closed/reloaded)\n this.beforeunloadEventListener = () => {\n if (this.transport) {\n // silently close the transport\n this.transport.removeAllListeners();\n this.transport.close();\n }\n };\n addEventListener(\"beforeunload\", this.beforeunloadEventListener, false);\n }\n if (this.hostname !== \"localhost\") {\n this.offlineEventListener = () => {\n this.onClose(\"transport close\", {\n description: \"network connection lost\"\n });\n };\n addEventListener(\"offline\", this.offlineEventListener, false);\n }\n }\n this.open();\n }\n /**\n * Creates transport of the given type.\n *\n * @param {String} transport name\n * @return {Transport}\n * @api private\n */\n createTransport(name) {\n const query = Object.assign({}, this.opts.query);\n // append engine.io protocol identifier\n query.EIO = protocol;\n // transport name\n query.transport = name;\n // session id if we already have one\n if (this.id)\n query.sid = this.id;\n const opts = Object.assign({}, this.opts.transportOptions[name], this.opts, {\n query,\n socket: this,\n hostname: this.hostname,\n secure: this.secure,\n port: this.port\n });\n return new transports[name](opts);\n }\n /**\n * Initializes transport to use and starts probe.\n *\n * @api private\n */\n open() {\n let transport;\n if (this.opts.rememberUpgrade &&\n Socket.priorWebsocketSuccess &&\n this.transports.indexOf(\"websocket\") !== -1) {\n transport = \"websocket\";\n }\n else if (0 === this.transports.length) {\n // Emit error on next tick so it can be listened to\n this.setTimeoutFn(() => {\n this.emitReserved(\"error\", \"No transports available\");\n }, 0);\n return;\n }\n else {\n transport = this.transports[0];\n }\n this.readyState = \"opening\";\n // Retry with the next transport if the transport is disabled (jsonp: false)\n try {\n transport = this.createTransport(transport);\n }\n catch (e) {\n this.transports.shift();\n this.open();\n return;\n }\n transport.open();\n this.setTransport(transport);\n }\n /**\n * Sets the current transport. Disables the existing one (if any).\n *\n * @api private\n */\n setTransport(transport) {\n if (this.transport) {\n this.transport.removeAllListeners();\n }\n // set up transport\n this.transport = transport;\n // set up transport listeners\n transport\n .on(\"drain\", this.onDrain.bind(this))\n .on(\"packet\", this.onPacket.bind(this))\n .on(\"error\", this.onError.bind(this))\n .on(\"close\", reason => this.onClose(\"transport close\", reason));\n }\n /**\n * Probes a transport.\n *\n * @param {String} transport name\n * @api private\n */\n probe(name) {\n let transport = this.createTransport(name);\n let failed = false;\n Socket.priorWebsocketSuccess = false;\n const onTransportOpen = () => {\n if (failed)\n return;\n transport.send([{ type: \"ping\", data: \"probe\" }]);\n transport.once(\"packet\", msg => {\n if (failed)\n return;\n if (\"pong\" === msg.type && \"probe\" === msg.data) {\n this.upgrading = true;\n this.emitReserved(\"upgrading\", transport);\n if (!transport)\n return;\n Socket.priorWebsocketSuccess = \"websocket\" === transport.name;\n this.transport.pause(() => {\n if (failed)\n return;\n if (\"closed\" === this.readyState)\n return;\n cleanup();\n this.setTransport(transport);\n transport.send([{ type: \"upgrade\" }]);\n this.emitReserved(\"upgrade\", transport);\n transport = null;\n this.upgrading = false;\n this.flush();\n });\n }\n else {\n const err = new Error(\"probe error\");\n // @ts-ignore\n err.transport = transport.name;\n this.emitReserved(\"upgradeError\", err);\n }\n });\n };\n function freezeTransport() {\n if (failed)\n return;\n // Any callback called by transport should be ignored since now\n failed = true;\n cleanup();\n transport.close();\n transport = null;\n }\n // Handle any error that happens while probing\n const onerror = err => {\n const error = new Error(\"probe error: \" + err);\n // @ts-ignore\n error.transport = transport.name;\n freezeTransport();\n this.emitReserved(\"upgradeError\", error);\n };\n function onTransportClose() {\n onerror(\"transport closed\");\n }\n // When the socket is closed while we're probing\n function onclose() {\n onerror(\"socket closed\");\n }\n // When the socket is upgraded while we're probing\n function onupgrade(to) {\n if (transport && to.name !== transport.name) {\n freezeTransport();\n }\n }\n // Remove all listeners on the transport and on self\n const cleanup = () => {\n transport.removeListener(\"open\", onTransportOpen);\n transport.removeListener(\"error\", onerror);\n transport.removeListener(\"close\", onTransportClose);\n this.off(\"close\", onclose);\n this.off(\"upgrading\", onupgrade);\n };\n transport.once(\"open\", onTransportOpen);\n transport.once(\"error\", onerror);\n transport.once(\"close\", onTransportClose);\n this.once(\"close\", onclose);\n this.once(\"upgrading\", onupgrade);\n transport.open();\n }\n /**\n * Called when connection is deemed open.\n *\n * @api private\n */\n onOpen() {\n this.readyState = \"open\";\n Socket.priorWebsocketSuccess = \"websocket\" === this.transport.name;\n this.emitReserved(\"open\");\n this.flush();\n // we check for `readyState` in case an `open`\n // listener already closed the socket\n if (\"open\" === this.readyState &&\n this.opts.upgrade &&\n this.transport.pause) {\n let i = 0;\n const l = this.upgrades.length;\n for (; i < l; i++) {\n this.probe(this.upgrades[i]);\n }\n }\n }\n /**\n * Handles a packet.\n *\n * @api private\n */\n onPacket(packet) {\n if (\"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState) {\n this.emitReserved(\"packet\", packet);\n // Socket is live - any packet counts\n this.emitReserved(\"heartbeat\");\n switch (packet.type) {\n case \"open\":\n this.onHandshake(JSON.parse(packet.data));\n break;\n case \"ping\":\n this.resetPingTimeout();\n this.sendPacket(\"pong\");\n this.emitReserved(\"ping\");\n this.emitReserved(\"pong\");\n break;\n case \"error\":\n const err = new Error(\"server error\");\n // @ts-ignore\n err.code = packet.data;\n this.onError(err);\n break;\n case \"message\":\n this.emitReserved(\"data\", packet.data);\n this.emitReserved(\"message\", packet.data);\n break;\n }\n }\n else {\n }\n }\n /**\n * Called upon handshake completion.\n *\n * @param {Object} data - handshake obj\n * @api private\n */\n onHandshake(data) {\n this.emitReserved(\"handshake\", data);\n this.id = data.sid;\n this.transport.query.sid = data.sid;\n this.upgrades = this.filterUpgrades(data.upgrades);\n this.pingInterval = data.pingInterval;\n this.pingTimeout = data.pingTimeout;\n this.maxPayload = data.maxPayload;\n this.onOpen();\n // In case open handler closes socket\n if (\"closed\" === this.readyState)\n return;\n this.resetPingTimeout();\n }\n /**\n * Sets and resets ping timeout timer based on server pings.\n *\n * @api private\n */\n resetPingTimeout() {\n this.clearTimeoutFn(this.pingTimeoutTimer);\n this.pingTimeoutTimer = this.setTimeoutFn(() => {\n this.onClose(\"ping timeout\");\n }, this.pingInterval + this.pingTimeout);\n if (this.opts.autoUnref) {\n this.pingTimeoutTimer.unref();\n }\n }\n /**\n * Called on `drain` event\n *\n * @api private\n */\n onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n if (0 === this.writeBuffer.length) {\n this.emitReserved(\"drain\");\n }\n else {\n this.flush();\n }\n }\n /**\n * Flush write buffers.\n *\n * @api private\n */\n flush() {\n if (\"closed\" !== this.readyState &&\n this.transport.writable &&\n !this.upgrading &&\n this.writeBuffer.length) {\n const packets = this.getWritablePackets();\n this.transport.send(packets);\n // keep track of current length of writeBuffer\n // splice writeBuffer and callbackBuffer on `drain`\n this.prevBufferLen = packets.length;\n this.emitReserved(\"flush\");\n }\n }\n /**\n * Ensure the encoded size of the writeBuffer is below the maxPayload value sent by the server (only for HTTP\n * long-polling)\n *\n * @private\n */\n getWritablePackets() {\n const shouldCheckPayloadSize = this.maxPayload &&\n this.transport.name === \"polling\" &&\n this.writeBuffer.length > 1;\n if (!shouldCheckPayloadSize) {\n return this.writeBuffer;\n }\n let payloadSize = 1; // first packet type\n for (let i = 0; i < this.writeBuffer.length; i++) {\n const data = this.writeBuffer[i].data;\n if (data) {\n payloadSize += byteLength(data);\n }\n if (i > 0 && payloadSize > this.maxPayload) {\n return this.writeBuffer.slice(0, i);\n }\n payloadSize += 2; // separator + packet type\n }\n return this.writeBuffer;\n }\n /**\n * Sends a message.\n *\n * @param {String} message.\n * @param {Function} callback function.\n * @param {Object} options.\n * @return {Socket} for chaining.\n * @api public\n */\n write(msg, options, fn) {\n this.sendPacket(\"message\", msg, options, fn);\n return this;\n }\n send(msg, options, fn) {\n this.sendPacket(\"message\", msg, options, fn);\n return this;\n }\n /**\n * Sends a packet.\n *\n * @param {String} packet type.\n * @param {String} data.\n * @param {Object} options.\n * @param {Function} callback function.\n * @api private\n */\n sendPacket(type, data, options, fn) {\n if (\"function\" === typeof data) {\n fn = data;\n data = undefined;\n }\n if (\"function\" === typeof options) {\n fn = options;\n options = null;\n }\n if (\"closing\" === this.readyState || \"closed\" === this.readyState) {\n return;\n }\n options = options || {};\n options.compress = false !== options.compress;\n const packet = {\n type: type,\n data: data,\n options: options\n };\n this.emitReserved(\"packetCreate\", packet);\n this.writeBuffer.push(packet);\n if (fn)\n this.once(\"flush\", fn);\n this.flush();\n }\n /**\n * Closes the connection.\n *\n * @api public\n */\n close() {\n const close = () => {\n this.onClose(\"forced close\");\n this.transport.close();\n };\n const cleanupAndClose = () => {\n this.off(\"upgrade\", cleanupAndClose);\n this.off(\"upgradeError\", cleanupAndClose);\n close();\n };\n const waitForUpgrade = () => {\n // wait for upgrade to finish since we can't send packets while pausing a transport\n this.once(\"upgrade\", cleanupAndClose);\n this.once(\"upgradeError\", cleanupAndClose);\n };\n if (\"opening\" === this.readyState || \"open\" === this.readyState) {\n this.readyState = \"closing\";\n if (this.writeBuffer.length) {\n this.once(\"drain\", () => {\n if (this.upgrading) {\n waitForUpgrade();\n }\n else {\n close();\n }\n });\n }\n else if (this.upgrading) {\n waitForUpgrade();\n }\n else {\n close();\n }\n }\n return this;\n }\n /**\n * Called upon transport error\n *\n * @api private\n */\n onError(err) {\n Socket.priorWebsocketSuccess = false;\n this.emitReserved(\"error\", err);\n this.onClose(\"transport error\", err);\n }\n /**\n * Called upon transport close.\n *\n * @api private\n */\n onClose(reason, description) {\n if (\"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState) {\n // clear timers\n this.clearTimeoutFn(this.pingTimeoutTimer);\n // stop event from firing again for transport\n this.transport.removeAllListeners(\"close\");\n // ensure transport won't stay open\n this.transport.close();\n // ignore further transport communication\n this.transport.removeAllListeners();\n if (typeof removeEventListener === \"function\") {\n removeEventListener(\"beforeunload\", this.beforeunloadEventListener, false);\n removeEventListener(\"offline\", this.offlineEventListener, false);\n }\n // set ready state\n this.readyState = \"closed\";\n // clear session id\n this.id = null;\n // emit close event\n this.emitReserved(\"close\", reason, description);\n // clean buffers after, so users can still\n // grab the buffers on `close` event\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n }\n }\n /**\n * Filters upgrades, returning only those matching client transports.\n *\n * @param {Array} server upgrades\n * @api private\n *\n */\n filterUpgrades(upgrades) {\n const filteredUpgrades = [];\n let i = 0;\n const j = upgrades.length;\n for (; i < j; i++) {\n if (~this.transports.indexOf(upgrades[i]))\n filteredUpgrades.push(upgrades[i]);\n }\n return filteredUpgrades;\n }\n}\nSocket.protocol = protocol;\n"],"names":["Socket","_Emitter","_inherits","_super","_createSuper","uri","_this","opts","arguments","length","undefined","_classCallCheck","this","call","_typeof","parse","hostname","host","secure","protocol","port","query","installTimerFunctions","_assertThisInitialized","assertThisInitialized","location","transports","readyState","writeBuffer","prevBufferLen","Object","assign","path","agent","withCredentials","upgrade","timestampParam","rememberUpgrade","rejectUnauthorized","perMessageDeflate","threshold","transportOptions","closeOnBeforeunload","replace","decode","id","upgrades","pingInterval","pingTimeout","pingTimeoutTimer","addEventListener","beforeunloadEventListener","transport","removeAllListeners","close","offlineEventListener","onClose","description","open","_createClass","createClass","key","value","name","EIO","sid","socket","_this2","priorWebsocketSuccess","indexOf","setTimeoutFn","emitReserved","createTransport","e","shift","setTransport","_this3","on","onDrain","bind","onPacket","onError","reason","_this4","failed","onTransportOpen","send","type","data","once","msg","upgrading","pause","cleanup","flush","err","Error","freezeTransport","onerror","error","onTransportClose","onclose","onupgrade","to","removeListener","off","i","l","probe","packet","onHandshake","JSON","resetPingTimeout","sendPacket","code","filterUpgrades","maxPayload","onOpen","_this5","clearTimeoutFn","autoUnref","unref","splice","writable","packets","getWritablePackets","payloadSize","byteLength","slice","options","fn","compress","push","_this6","cleanupAndClose","waitForUpgrade","removeEventListener","filteredUpgrades","j","Emitter"],"mappings":"gYAMaA,EAAM,SAAAC,GAAAC,WAAAF,EAAAC,GAAA,IAAAE,EAAAC,cAAAJ,GAQf,SAAAA,EAAYK,GAAgB,IAAAC,EAAXC,EAAOC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAA,CAAA,EAwFR,OAxFUG,iBAAAC,KAAAZ,GACtBM,EAAAH,EAAAU,KAAAD,MACIP,GAAO,WAAQS,EAAA,OAAYT,KAC3BE,EAAOF,EACPA,EAAM,MAENA,GACAA,EAAMU,EAAAA,MAAMV,GACZE,EAAKS,SAAWX,EAAIY,KACpBV,EAAKW,OAA0B,UAAjBb,EAAIc,UAAyC,QAAjBd,EAAIc,SAC9CZ,EAAKa,KAAOf,EAAIe,KACZf,EAAIgB,QACJd,EAAKc,MAAQhB,EAAIgB,QAEhBd,EAAKU,OACVV,EAAKS,SAAWD,EAAKA,MAACR,EAAKU,MAAMA,MAErCK,EAAAA,sBAAqBC,EAAAC,sBAAAlB,GAAOC,GAC5BD,EAAKY,OACD,MAAQX,EAAKW,OACPX,EAAKW,OACe,oBAAbO,UAA4B,WAAaA,SAASN,SAC/DZ,EAAKS,WAAaT,EAAKa,OAEvBb,EAAKa,KAAOd,EAAKY,OAAS,MAAQ,MAEtCZ,EAAKU,SACDT,EAAKS,WACoB,oBA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,KAAK+E,UACV4C,IAGAjF,KAGD1C,IACX,GACA,CAAAiD,IAAA,UAAAC,MAKA,SAAQiC,GACJ/F,EAAOoE,uBAAwB,EAC/BxD,KAAK2D,aAAa,QAASwB,GAC3BnF,KAAK4C,QAAQ,kBAAmBuC,EACpC,GACA,CAAAlC,IAAA,UAAAC,MAKA,SAAQoB,EAAQzB,GACR,YAAc7C,KAAKe,YACnB,SAAWf,KAAKe,YAChB,YAAcf,KAAKe,aAEnBf,KAAK2G,eAAe3G,KAAKqC,kBAEzBrC,KAAKwC,UAAUC,mBAAmB,SAElCzC,KAAKwC,UAAUE,QAEf1C,KAAKwC,UAAUC,qBACoB,mBAAxBmF,sBACPA,oBAAoB,eAAgB5H,KAAKuC,2BAA2B,GACpEqF,oBAAoB,UAAW5H,KAAK2C,sBAAsB,IAG9D3C,KAAKe,WAAa,SAElBf,KAAKiC,GAAK,KAEVjC,KAAK2D,aAAa,QAASW,EAAQzB,GAGnC7C,KAAKgB,YAAc,GACnBhB,KAAKiB,cAAgB,EAE7B,GACA,CAAAgC,IAAA,iBAAAC,MAOA,SAAehB,GAIX,IAHA,IAAM2F,EAAmB,GACrB/B,EAAI,EACFgC,EAAI5F,EAASrC,OACZiG,EAAIgC,EAAGhC,KACL9F,KAAKc,WAAW2C,QAAQvB,EAAS4D,KAClC+B,EAAiBL,KAAKtF,EAAS4D,IAEvC,OAAO+B,CACX,KAACzI,CAAA,CA5jBc,CAAS2I,WA8jB5B3I,EAAOmB,SAAWA,EAAQA"}
1
+ {"version":3,"file":"socket.js","sources":["../../../../../node_modules/engine.io-client/build/esm/socket.js"],"sourcesContent":["import { transports } from \"./transports/index.js\";\nimport { installTimerFunctions, byteLength } from \"./util.js\";\nimport { decode } from \"./contrib/parseqs.js\";\nimport { parse } from \"./contrib/parseuri.js\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { protocol } from \"engine.io-parser\";\nexport class Socket extends Emitter {\n /**\n * Socket constructor.\n *\n * @param {String|Object} uri or options\n * @param {Object} opts - options\n * @api public\n */\n constructor(uri, opts = {}) {\n super();\n if (uri && \"object\" === typeof uri) {\n opts = uri;\n uri = null;\n }\n if (uri) {\n uri = parse(uri);\n opts.hostname = uri.host;\n opts.secure = uri.protocol === \"https\" || uri.protocol === \"wss\";\n opts.port = uri.port;\n if (uri.query)\n opts.query = uri.query;\n }\n else if (opts.host) {\n opts.hostname = parse(opts.host).host;\n }\n installTimerFunctions(this, opts);\n this.secure =\n null != opts.secure\n ? opts.secure\n : typeof location !== \"undefined\" && \"https:\" === location.protocol;\n if (opts.hostname && !opts.port) {\n // if no port is specified manually, use the protocol default\n opts.port = this.secure ? \"443\" : \"80\";\n }\n this.hostname =\n opts.hostname ||\n (typeof location !== \"undefined\" ? location.hostname : \"localhost\");\n this.port =\n opts.port ||\n (typeof location !== \"undefined\" && location.port\n ? location.port\n : this.secure\n ? \"443\"\n : \"80\");\n this.transports = opts.transports || [\"polling\", \"websocket\"];\n this.readyState = \"\";\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n this.opts = Object.assign({\n path: \"/engine.io\",\n agent: false,\n withCredentials: false,\n upgrade: true,\n timestampParam: \"t\",\n rememberUpgrade: false,\n rejectUnauthorized: true,\n perMessageDeflate: {\n threshold: 1024\n },\n transportOptions: {},\n closeOnBeforeunload: true\n }, opts);\n this.opts.path = this.opts.path.replace(/\\/$/, \"\") + \"/\";\n if (typeof this.opts.query === \"string\") {\n this.opts.query = decode(this.opts.query);\n }\n // set on handshake\n this.id = null;\n this.upgrades = null;\n this.pingInterval = null;\n this.pingTimeout = null;\n // set on heartbeat\n this.pingTimeoutTimer = null;\n if (typeof addEventListener === \"function\") {\n if (this.opts.closeOnBeforeunload) {\n // Firefox closes the connection when the \"beforeunload\" event is emitted but not Chrome. This event listener\n // ensures every browser behaves the same (no \"disconnect\" event at the Socket.IO level when the page is\n // closed/reloaded)\n this.beforeunloadEventListener = () => {\n if (this.transport) {\n // silently close the transport\n this.transport.removeAllListeners();\n this.transport.close();\n }\n };\n addEventListener(\"beforeunload\", this.beforeunloadEventListener, false);\n }\n if (this.hostname !== \"localhost\") {\n this.offlineEventListener = () => {\n this.onClose(\"transport close\", {\n description: \"network connection lost\"\n });\n };\n addEventListener(\"offline\", this.offlineEventListener, false);\n }\n }\n this.open();\n }\n /**\n * Creates transport of the given type.\n *\n * @param {String} transport name\n * @return {Transport}\n * @api private\n */\n createTransport(name) {\n const query = Object.assign({}, this.opts.query);\n // append engine.io protocol identifier\n query.EIO = protocol;\n // transport name\n query.transport = name;\n // session id if we already have one\n if (this.id)\n query.sid = this.id;\n const opts = Object.assign({}, this.opts.transportOptions[name], this.opts, {\n query,\n socket: this,\n hostname: this.hostname,\n secure: this.secure,\n port: this.port\n });\n return new transports[name](opts);\n }\n /**\n * Initializes transport to use and starts probe.\n *\n * @api private\n */\n open() {\n let transport;\n if (this.opts.rememberUpgrade &&\n Socket.priorWebsocketSuccess &&\n this.transports.indexOf(\"websocket\") !== -1) {\n transport = \"websocket\";\n }\n else if (0 === this.transports.length) {\n // Emit error on next tick so it can be listened to\n this.setTimeoutFn(() => {\n this.emitReserved(\"error\", \"No transports available\");\n }, 0);\n return;\n }\n else {\n transport = this.transports[0];\n }\n this.readyState = \"opening\";\n // Retry with the next transport if the transport is disabled (jsonp: false)\n try {\n transport = this.createTransport(transport);\n }\n catch (e) {\n this.transports.shift();\n this.open();\n return;\n }\n transport.open();\n this.setTransport(transport);\n }\n /**\n * Sets the current transport. Disables the existing one (if any).\n *\n * @api private\n */\n setTransport(transport) {\n if (this.transport) {\n this.transport.removeAllListeners();\n }\n // set up transport\n this.transport = transport;\n // set up transport listeners\n transport\n .on(\"drain\", this.onDrain.bind(this))\n .on(\"packet\", this.onPacket.bind(this))\n .on(\"error\", this.onError.bind(this))\n .on(\"close\", reason => this.onClose(\"transport close\", reason));\n }\n /**\n * Probes a transport.\n *\n * @param {String} transport name\n * @api private\n */\n probe(name) {\n let transport = this.createTransport(name);\n let failed = false;\n Socket.priorWebsocketSuccess = false;\n const onTransportOpen = () => {\n if (failed)\n return;\n transport.send([{ type: \"ping\", data: \"probe\" }]);\n transport.once(\"packet\", msg => {\n if (failed)\n return;\n if (\"pong\" === msg.type && \"probe\" === msg.data) {\n this.upgrading = true;\n this.emitReserved(\"upgrading\", transport);\n if (!transport)\n return;\n Socket.priorWebsocketSuccess = \"websocket\" === transport.name;\n this.transport.pause(() => {\n if (failed)\n return;\n if (\"closed\" === this.readyState)\n return;\n cleanup();\n this.setTransport(transport);\n transport.send([{ type: \"upgrade\" }]);\n this.emitReserved(\"upgrade\", transport);\n transport = null;\n this.upgrading = false;\n this.flush();\n });\n }\n else {\n const err = new Error(\"probe error\");\n // @ts-ignore\n err.transport = transport.name;\n this.emitReserved(\"upgradeError\", err);\n }\n });\n };\n function freezeTransport() {\n if (failed)\n return;\n // Any callback called by transport should be ignored since now\n failed = true;\n cleanup();\n transport.close();\n transport = null;\n }\n // Handle any error that happens while probing\n const onerror = err => {\n const error = new Error(\"probe error: \" + err);\n // @ts-ignore\n error.transport = transport.name;\n freezeTransport();\n this.emitReserved(\"upgradeError\", error);\n };\n function onTransportClose() {\n onerror(\"transport closed\");\n }\n // When the socket is closed while we're probing\n function onclose() {\n onerror(\"socket closed\");\n }\n // When the socket is upgraded while we're probing\n function onupgrade(to) {\n if (transport && to.name !== transport.name) {\n freezeTransport();\n }\n }\n // Remove all listeners on the transport and on self\n const cleanup = () => {\n transport.removeListener(\"open\", onTransportOpen);\n transport.removeListener(\"error\", onerror);\n transport.removeListener(\"close\", onTransportClose);\n this.off(\"close\", onclose);\n this.off(\"upgrading\", onupgrade);\n };\n transport.once(\"open\", onTransportOpen);\n transport.once(\"error\", onerror);\n transport.once(\"close\", onTransportClose);\n this.once(\"close\", onclose);\n this.once(\"upgrading\", onupgrade);\n transport.open();\n }\n /**\n * Called when connection is deemed open.\n *\n * @api private\n */\n onOpen() {\n this.readyState = \"open\";\n Socket.priorWebsocketSuccess = \"websocket\" === this.transport.name;\n this.emitReserved(\"open\");\n this.flush();\n // we check for `readyState` in case an `open`\n // listener already closed the socket\n if (\"open\" === this.readyState &&\n this.opts.upgrade &&\n this.transport.pause) {\n let i = 0;\n const l = this.upgrades.length;\n for (; i < l; i++) {\n this.probe(this.upgrades[i]);\n }\n }\n }\n /**\n * Handles a packet.\n *\n * @api private\n */\n onPacket(packet) {\n if (\"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState) {\n this.emitReserved(\"packet\", packet);\n // Socket is live - any packet counts\n this.emitReserved(\"heartbeat\");\n switch (packet.type) {\n case \"open\":\n this.onHandshake(JSON.parse(packet.data));\n break;\n case \"ping\":\n this.resetPingTimeout();\n this.sendPacket(\"pong\");\n this.emitReserved(\"ping\");\n this.emitReserved(\"pong\");\n break;\n case \"error\":\n const err = new Error(\"server error\");\n // @ts-ignore\n err.code = packet.data;\n this.onError(err);\n break;\n case \"message\":\n this.emitReserved(\"data\", packet.data);\n this.emitReserved(\"message\", packet.data);\n break;\n }\n }\n else {\n }\n }\n /**\n * Called upon handshake completion.\n *\n * @param {Object} data - handshake obj\n * @api private\n */\n onHandshake(data) {\n this.emitReserved(\"handshake\", data);\n this.id = data.sid;\n this.transport.query.sid = data.sid;\n this.upgrades = this.filterUpgrades(data.upgrades);\n this.pingInterval = data.pingInterval;\n this.pingTimeout = data.pingTimeout;\n this.maxPayload = data.maxPayload;\n this.onOpen();\n // In case open handler closes socket\n if (\"closed\" === this.readyState)\n return;\n this.resetPingTimeout();\n }\n /**\n * Sets and resets ping timeout timer based on server pings.\n *\n * @api private\n */\n resetPingTimeout() {\n this.clearTimeoutFn(this.pingTimeoutTimer);\n this.pingTimeoutTimer = this.setTimeoutFn(() => {\n this.onClose(\"ping timeout\");\n }, this.pingInterval + this.pingTimeout);\n if (this.opts.autoUnref) {\n this.pingTimeoutTimer.unref();\n }\n }\n /**\n * Called on `drain` event\n *\n * @api private\n */\n onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n if (0 === this.writeBuffer.length) {\n this.emitReserved(\"drain\");\n }\n else {\n this.flush();\n }\n }\n /**\n * Flush write buffers.\n *\n * @api private\n */\n flush() {\n if (\"closed\" !== this.readyState &&\n this.transport.writable &&\n !this.upgrading &&\n this.writeBuffer.length) {\n const packets = this.getWritablePackets();\n this.transport.send(packets);\n // keep track of current length of writeBuffer\n // splice writeBuffer and callbackBuffer on `drain`\n this.prevBufferLen = packets.length;\n this.emitReserved(\"flush\");\n }\n }\n /**\n * Ensure the encoded size of the writeBuffer is below the maxPayload value sent by the server (only for HTTP\n * long-polling)\n *\n * @private\n */\n getWritablePackets() {\n const shouldCheckPayloadSize = this.maxPayload &&\n this.transport.name === \"polling\" &&\n this.writeBuffer.length > 1;\n if (!shouldCheckPayloadSize) {\n return this.writeBuffer;\n }\n let payloadSize = 1; // first packet type\n for (let i = 0; i < this.writeBuffer.length; i++) {\n const data = this.writeBuffer[i].data;\n if (data) {\n payloadSize += byteLength(data);\n }\n if (i > 0 && payloadSize > this.maxPayload) {\n return this.writeBuffer.slice(0, i);\n }\n payloadSize += 2; // separator + packet type\n }\n return this.writeBuffer;\n }\n /**\n * Sends a message.\n *\n * @param {String} message.\n * @param {Function} callback function.\n * @param {Object} options.\n * @return {Socket} for chaining.\n * @api public\n */\n write(msg, options, fn) {\n this.sendPacket(\"message\", msg, options, fn);\n return this;\n }\n send(msg, options, fn) {\n this.sendPacket(\"message\", msg, options, fn);\n return this;\n }\n /**\n * Sends a packet.\n *\n * @param {String} packet type.\n * @param {String} data.\n * @param {Object} options.\n * @param {Function} callback function.\n * @api private\n */\n sendPacket(type, data, options, fn) {\n if (\"function\" === typeof data) {\n fn = data;\n data = undefined;\n }\n if (\"function\" === typeof options) {\n fn = options;\n options = null;\n }\n if (\"closing\" === this.readyState || \"closed\" === this.readyState) {\n return;\n }\n options = options || {};\n options.compress = false !== options.compress;\n const packet = {\n type: type,\n data: data,\n options: options\n };\n this.emitReserved(\"packetCreate\", packet);\n this.writeBuffer.push(packet);\n if (fn)\n this.once(\"flush\", fn);\n this.flush();\n }\n /**\n * Closes the connection.\n *\n * @api public\n */\n close() {\n const close = () => {\n this.onClose(\"forced close\");\n this.transport.close();\n };\n const cleanupAndClose = () => {\n this.off(\"upgrade\", cleanupAndClose);\n this.off(\"upgradeError\", cleanupAndClose);\n close();\n };\n const waitForUpgrade = () => {\n // wait for upgrade to finish since we can't send packets while pausing a transport\n this.once(\"upgrade\", cleanupAndClose);\n this.once(\"upgradeError\", cleanupAndClose);\n };\n if (\"opening\" === this.readyState || \"open\" === this.readyState) {\n this.readyState = \"closing\";\n if (this.writeBuffer.length) {\n this.once(\"drain\", () => {\n if (this.upgrading) {\n waitForUpgrade();\n }\n else {\n close();\n }\n });\n }\n else if (this.upgrading) {\n waitForUpgrade();\n }\n else {\n close();\n }\n }\n return this;\n }\n /**\n * Called upon transport error\n *\n * @api private\n */\n onError(err) {\n Socket.priorWebsocketSuccess = false;\n this.emitReserved(\"error\", err);\n this.onClose(\"transport error\", err);\n }\n /**\n * Called upon transport close.\n *\n * @api private\n */\n onClose(reason, description) {\n if (\"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState) {\n // clear timers\n this.clearTimeoutFn(this.pingTimeoutTimer);\n // stop event from firing again for transport\n this.transport.removeAllListeners(\"close\");\n // ensure transport won't stay open\n this.transport.close();\n // ignore further transport communication\n this.transport.removeAllListeners();\n if (typeof removeEventListener === \"function\") {\n removeEventListener(\"beforeunload\", this.beforeunloadEventListener, false);\n removeEventListener(\"offline\", this.offlineEventListener, false);\n }\n // set ready state\n this.readyState = \"closed\";\n // clear session id\n this.id = null;\n // emit close event\n this.emitReserved(\"close\", reason, description);\n // clean buffers after, so users can still\n // grab the buffers on `close` event\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n }\n }\n /**\n * Filters upgrades, returning only those matching client transports.\n *\n * @param {Array} server upgrades\n * @api private\n *\n */\n filterUpgrades(upgrades) {\n const filteredUpgrades = [];\n let i = 0;\n const j = upgrades.length;\n for (; i < j; i++) {\n if (~this.transports.indexOf(upgrades[i]))\n filteredUpgrades.push(upgrades[i]);\n }\n return filteredUpgrades;\n }\n}\nSocket.protocol = protocol;\n"],"names":["Socket","Emitter","constructor","uri","opts","arguments","length","undefined","super","parse","hostname","host","secure","protocol","port","query","installTimerFunctions","this","location","transports","readyState","writeBuffer","prevBufferLen","Object","assign","path","agent","withCredentials","upgrade","timestampParam","rememberUpgrade","rejectUnauthorized","perMessageDeflate","threshold","transportOptions","closeOnBeforeunload","replace","decode","id","upgrades","pingInterval","pingTimeout","pingTimeoutTimer","addEventListener","beforeunloadEventListener","transport","removeAllListeners","close","offlineEventListener","onClose","description","open","createTransport","name","EIO","sid","socket","priorWebsocketSuccess","indexOf","setTimeoutFn","emitReserved","e","shift","setTransport","on","onDrain","bind","onPacket","onError","reason","probe","failed","onTransportOpen","send","type","data","once","msg","upgrading","pause","cleanup","flush","err","Error","freezeTransport","onerror","error","onTransportClose","onclose","onupgrade","to","removeListener","off","onOpen","i","l","packet","onHandshake","JSON","resetPingTimeout","sendPacket","code","filterUpgrades","maxPayload","clearTimeoutFn","autoUnref","unref","splice","writable","packets","getWritablePackets","payloadSize","byteLength","slice","write","options","fn","compress","push","cleanupAndClose","waitForUpgrade","removeEventListener","filteredUpgrades","j"],"mappings":"iUAMO,MAAMA,UAAeC,EAAAA,QAQxBC,YAAYC,GAAgB,IAAXC,EAAOC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAA,CAAA,EACpBG,QACIL,GAAO,iBAAoBA,IAC3BC,EAAOD,EACPA,EAAM,MAENA,GACAA,EAAMM,EAAAA,MAAMN,GACZC,EAAKM,SAAWP,EAAIQ,KACpBP,EAAKQ,OAA0B,UAAjBT,EAAIU,UAAyC,QAAjBV,EAAIU,SAC9CT,EAAKU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AAQnB,GACR,YAAcjC,KAAKG,YACnB,SAAWH,KAAKG,YAChB,YAAcH,KAAKG,aAEnBH,KAAKuF,eAAevF,KAAKyB,kBAEzBzB,KAAK4B,UAAUC,mBAAmB,SAElC7B,KAAK4B,UAAUE,QAEf9B,KAAK4B,UAAUC,qBACoB,mBAAxB2E,sBACPA,oBAAoB,eAAgBxG,KAAK2B,2BAA2B,GACpE6E,oBAAoB,UAAWxG,KAAK+B,sBAAsB,IAG9D/B,KAAKG,WAAa,SAElBH,KAAKqB,GAAK,KAEVrB,KAAK2C,aAAa,QAASS,EAAQnB,GAGnCjC,KAAKI,YAAc,GACnBJ,KAAKK,cAAgB,EAE7B,CAQAgF,eAAe/D,GACX,MAAMmF,EAAmB,GACzB,IAAI5B,EAAI,EACR,MAAM6B,EAAIpF,EAASjC,OACnB,KAAOwF,EAAI6B,EAAG7B,KACL7E,KAAKE,WAAWuC,QAAQnB,EAASuD,KAClC4B,EAAiBJ,KAAK/E,EAASuD,IAEvC,OAAO4B,CACX,EAEJ1H,EAAOa,SAAWA,EAAQA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../engine.io-parser/build/esm/encodePacket.browser.js");var t=require("../../../engine.io-parser/build/esm/decodePacket.browser.js"),r=require("../../../@socket.io/component-emitter/index.mjs.js"),i=require("./util.js"),s=function(t){e.inherits(i,t);var r=e.createSuper(i);function i(t,s,o){var a;return e.classCallCheck(this,i),(a=r.call(this,t)).description=s,a.context=o,a.type="TransportError",a}return e.createClass(i)}(e.wrapNativeSuper(Error)),o=function(r){e.inherits(a,r);var o=e.createSuper(a);function a(t){var r;return e.classCallCheck(this,a),(r=o.call(this)).writable=!1,i.installTimerFunctions(e.assertThisInitialized(r),t),r.opts=t,r.query=t.query,r.readyState="",r.socket=t.socket,r}return e.createClass(a,[{key:"onError",value:function(t,r,i){return e.get(e.getPrototypeOf(a.prototype),"emitReserved",this).call(this,"error",new s(t,r,i)),this}},{key:"open",value:function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}},{key:"close",value:function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}},{key:"send",value:function(e){"open"===this.readyState&&this.write(e)}},{key:"onOpen",value:function(){this.readyState="open",this.writable=!0,e.get(e.getPrototypeOf(a.prototype),"emitReserved",this).call(this,"open")}},{key:"onData",value:function(e){var r=t.default(e,this.socket.binaryType);this.onPacket(r)}},{key:"onPacket",value:function(t){e.get(e.getPrototypeOf(a.prototype),"emitReserved",this).call(this,"packet",t)}},{key:"onClose",value:function(t){this.readyState="closed",e.get(e.getPrototypeOf(a.prototype),"emitReserved",this).call(this,"close",t)}}]),a}(r.Emitter);exports.Transport=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../engine.io-parser/build/esm/encodePacket.browser.js");var e=require("../../../engine.io-parser/build/esm/decodePacket.browser.js"),t=require("../../../@socket.io/component-emitter/index.mjs.js"),s=require("./util.js");class r extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class i extends t.Emitter{constructor(e){super(),this.writable=!1,s.installTimerFunctions(this,e),this.opts=e,this.query=e.query,this.readyState="",this.socket=e.socket}onError(e,t,s){return super.emitReserved("error",new r(e,t,s)),this}open(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const s=e.default(t,this.socket.binaryType);this.onPacket(s)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}}exports.Transport=i;
2
2
  //# sourceMappingURL=transport.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transport.js","sources":["../../../../../node_modules/engine.io-client/build/esm/transport.js"],"sourcesContent":["import { decodePacket } from \"engine.io-parser\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions } from \"./util.js\";\nclass TransportError extends Error {\n constructor(reason, description, context) {\n super(reason);\n this.description = description;\n this.context = context;\n this.type = \"TransportError\";\n }\n}\nexport class Transport extends Emitter {\n /**\n * Transport abstract constructor.\n *\n * @param {Object} options.\n * @api private\n */\n constructor(opts) {\n super();\n this.writable = false;\n installTimerFunctions(this, opts);\n this.opts = opts;\n this.query = opts.query;\n this.readyState = \"\";\n this.socket = opts.socket;\n }\n /**\n * Emits an error.\n *\n * @param {String} reason\n * @param description\n * @param context - the error context\n * @return {Transport} for chaining\n * @api protected\n */\n onError(reason, description, context) {\n super.emitReserved(\"error\", new TransportError(reason, description, context));\n return this;\n }\n /**\n * Opens the transport.\n *\n * @api public\n */\n open() {\n if (\"closed\" === this.readyState || \"\" === this.readyState) {\n this.readyState = \"opening\";\n this.doOpen();\n }\n return this;\n }\n /**\n * Closes the transport.\n *\n * @api public\n */\n close() {\n if (\"opening\" === this.readyState || \"open\" === this.readyState) {\n this.doClose();\n this.onClose();\n }\n return this;\n }\n /**\n * Sends multiple packets.\n *\n * @param {Array} packets\n * @api public\n */\n send(packets) {\n if (\"open\" === this.readyState) {\n this.write(packets);\n }\n else {\n // this might happen if the transport was silently closed in the beforeunload event handler\n }\n }\n /**\n * Called upon open\n *\n * @api protected\n */\n onOpen() {\n this.readyState = \"open\";\n this.writable = true;\n super.emitReserved(\"open\");\n }\n /**\n * Called with data.\n *\n * @param {String} data\n * @api protected\n */\n onData(data) {\n const packet = decodePacket(data, this.socket.binaryType);\n this.onPacket(packet);\n }\n /**\n * Called with a decoded packet.\n *\n * @api protected\n */\n onPacket(packet) {\n super.emitReserved(\"packet\", packet);\n }\n /**\n * Called upon close.\n *\n * @api protected\n */\n onClose(details) {\n this.readyState = \"closed\";\n super.emitReserved(\"close\", details);\n }\n}\n"],"names":["TransportError","_Error","_inherits","_super","_createSuper","reason","description","context","_this","_classCallCheck","this","call","type","_createClass","_wrapNativeSuper","wrapNativeSuper","Error","Transport","_Emitter","_super2","opts","_this2","writable","installTimerFunctions","_assertThisInitialized","assertThisInitialized","query","readyState","socket","createClass","key","value","_get","get","_getPrototypeOf","getPrototypeOf","prototype","doOpen","doClose","onClose","packets","write","data","packet","decodePacket","binaryType","onPacket","details","Emitter"],"mappings":"kXAGMA,EAAc,SAAAC,GAAAC,WAAAF,EAAAC,GAAA,IAAAE,EAAAC,cAAAJ,GAChB,SAAAA,EAAYK,EAAQC,EAAaC,GAAS,IAAAC,EAIT,OAJSC,iBAAAC,KAAAV,IACtCQ,EAAAL,EAAAQ,KAAAD,KAAML,IACDC,YAAcA,EACnBE,EAAKD,QAAUA,EACfC,EAAKI,KAAO,iBAAiBJ,CACjC,CAAC,OAAAK,EAAAA,YAAAb,EAAA,CANe,CAMfc,EAAAC,gBANwBC,QAQhBC,EAAS,SAAAC,GAAAhB,WAAAe,EAAAC,GAAA,IAAAC,EAAAf,cAAAa,GAOlB,SAAAA,EAAYG,GAAM,IAAAC,EAOY,OAPZZ,iBAAAC,KAAAO,IACdI,EAAAF,EAAAR,KAAAD,OACKY,UAAW,EAChBC,EAAAA,sBAAqBC,EAAAC,sBAAAJ,GAAOD,GAC5BC,EAAKD,KAAOA,EACZC,EAAKK,MAAQN,EAAKM,MAClBL,EAAKM,WAAa,GAClBN,EAAKO,OAASR,EAAKQ,OAAOP,CAC9B,CAwFC,OAvFDR,EAAAgB,YAAAZ,EAAA,CAAA,CAAAa,IAAA,UAAAC,MASA,SAAQ1B,EAAQC,EAAaC,GAEzB,OADAyB,EAAmBC,IAAAC,EAAAC,eAAAlB,EAAAmB,WAAA,eAAA1B,MAAAC,KAAAD,KAAA,QAAS,IAAIV,EAAeK,EAAQC,EAAaC,IAC7DG,IACX,GACA,CAAAoB,IAAA,OAAAC,MAKA,WAKI,MAJI,WAAarB,KAAKiB,YAAc,KAAOjB,KAAKiB,aAC5CjB,KAAKiB,WAAa,UAClBjB,KAAK2B,UAEF3B,IACX,GACA,CAAAoB,IAAA,QAAAC,MAKA,WAKI,MAJI,YAAcrB,KAAKiB,YAAc,SAAWjB,KAAKiB,aACjDjB,KAAK4B,UACL5B,KAAK6B,WAEF7B,IACX,GACA,CAAAoB,IAAA,OAAAC,MAMA,SAAKS,GACG,SAAW9B,KAAKiB,YAChBjB,KAAK+B,MAAMD,EAKnB,GACA,CAAAV,IAAA,SAAAC,MAKA,WACIrB,KAAKiB,WAAa,OAClBjB,KAAKY,UAAW,EAChBU,EAAAA,IAAAE,EAAAC,eAAAlB,EAAAmB,WAAA,eAAA1B,MAAAC,KAAAD,KAAmB,OACvB,GACA,CAAAoB,IAAA,SAAAC,MAMA,SAAOW,GACH,IAAMC,EAASC,EAAAA,QAAaF,EAAMhC,KAAKkB,OAAOiB,YAC9CnC,KAAKoC,SAASH,EAClB,GACA,CAAAb,IAAA,WAAAC,MAKA,SAASY,GACLX,EAAAA,IAAmBE,EAAAC,eAAAlB,EAAAmB,WAAA,eAAA1B,MAAAC,KAAAD,KAAA,SAAUiC,EACjC,GACA,CAAAb,IAAA,UAAAC,MAKA,SAAQgB,GACJrC,KAAKiB,WAAa,SAClBK,EAAAA,IAAmBE,EAAAC,eAAAlB,EAAAmB,WAAA,eAAA1B,MAAAC,KAAAD,KAAA,QAASqC,EAChC,KAAC9B,CAAA,CAvGiB,CAAS+B,EAAOA"}
1
+ {"version":3,"file":"transport.js","sources":["../../../../../node_modules/engine.io-client/build/esm/transport.js"],"sourcesContent":["import { decodePacket } from \"engine.io-parser\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions } from \"./util.js\";\nclass TransportError extends Error {\n constructor(reason, description, context) {\n super(reason);\n this.description = description;\n this.context = context;\n this.type = \"TransportError\";\n }\n}\nexport class Transport extends Emitter {\n /**\n * Transport abstract constructor.\n *\n * @param {Object} options.\n * @api private\n */\n constructor(opts) {\n super();\n this.writable = false;\n installTimerFunctions(this, opts);\n this.opts = opts;\n this.query = opts.query;\n this.readyState = \"\";\n this.socket = opts.socket;\n }\n /**\n * Emits an error.\n *\n * @param {String} reason\n * @param description\n * @param context - the error context\n * @return {Transport} for chaining\n * @api protected\n */\n onError(reason, description, context) {\n super.emitReserved(\"error\", new TransportError(reason, description, context));\n return this;\n }\n /**\n * Opens the transport.\n *\n * @api public\n */\n open() {\n if (\"closed\" === this.readyState || \"\" === this.readyState) {\n this.readyState = \"opening\";\n this.doOpen();\n }\n return this;\n }\n /**\n * Closes the transport.\n *\n * @api public\n */\n close() {\n if (\"opening\" === this.readyState || \"open\" === this.readyState) {\n this.doClose();\n this.onClose();\n }\n return this;\n }\n /**\n * Sends multiple packets.\n *\n * @param {Array} packets\n * @api public\n */\n send(packets) {\n if (\"open\" === this.readyState) {\n this.write(packets);\n }\n else {\n // this might happen if the transport was silently closed in the beforeunload event handler\n }\n }\n /**\n * Called upon open\n *\n * @api protected\n */\n onOpen() {\n this.readyState = \"open\";\n this.writable = true;\n super.emitReserved(\"open\");\n }\n /**\n * Called with data.\n *\n * @param {String} data\n * @api protected\n */\n onData(data) {\n const packet = decodePacket(data, this.socket.binaryType);\n this.onPacket(packet);\n }\n /**\n * Called with a decoded packet.\n *\n * @api protected\n */\n onPacket(packet) {\n super.emitReserved(\"packet\", packet);\n }\n /**\n * Called upon close.\n *\n * @api protected\n */\n onClose(details) {\n this.readyState = \"closed\";\n super.emitReserved(\"close\", details);\n }\n}\n"],"names":["TransportError","Error","constructor","reason","description","context","super","this","type","Transport","Emitter","opts","writable","installTimerFunctions","query","readyState","socket","onError","emitReserved","open","doOpen","close","doClose","onClose","send","packets","write","onOpen","onData","data","packet","decodePacket","binaryType","onPacket","details"],"mappings":"+SAGA,MAAMA,UAAuBC,MACzBC,YAAYC,EAAQC,EAAaC,GAC7BC,MAAMH,GACNI,KAAKH,YAAcA,EACnBG,KAAKF,QAAUA,EACfE,KAAKC,KAAO,gBAChB,EAEG,MAAMC,UAAkBC,EAAAA,QAO3BR,YAAYS,GACRL,QACAC,KAAKK,UAAW,EAChBC,wBAAsBN,KAAMI,GAC5BJ,KAAKI,KAAOA,EACZJ,KAAKO,MAAQH,EAAKG,MAClBP,KAAKQ,WAAa,GAClBR,KAAKS,OAASL,EAAKK,MACvB,CAUAC,QAAQd,EAAQC,EAAaC,GAEzB,OADAC,MAAMY,aAAa,QAAS,IAAIlB,EAAeG,EAAQC,EAAaC,IAC7DE,IACX,CAMAY,OAKI,MAJI,WAAaZ,KAAKQ,YAAc,KAAOR,KAAKQ,aAC5CR,KAAKQ,WAAa,UAClBR,KAAKa,UAEFb,IACX,CAMAc,QAKI,MAJI,YAAcd,KAAKQ,YAAc,SAAWR,KAAKQ,aACjDR,KAAKe,UACLf,KAAKgB,WAEFhB,IACX,CAOAiB,KAAKC,GACG,SAAWlB,KAAKQ,YAChBR,KAAKmB,MAAMD,EAKnB,CAMAE,SACIpB,KAAKQ,WAAa,OAClBR,KAAKK,UAAW,EAChBN,MAAMY,aAAa,OACvB,CAOAU,OAAOC,GACH,MAAMC,EAASC,EAAAA,QAAaF,EAAMtB,KAAKS,OAAOgB,YAC9CzB,KAAK0B,SAASH,EAClB,CAMAG,SAASH,GACLxB,MAAMY,aAAa,SAAUY,EACjC,CAMAP,QAAQW,GACJ3B,KAAKQ,WAAa,SAClBT,MAAMY,aAAa,QAASgB,EAChC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./polling.js"),r={websocket:require("./websocket.js").WS,polling:e.Polling};exports.transports=r;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./polling.js");const r={websocket:require("./websocket.js").WS,polling:e.Polling};exports.transports=r;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/transports/index.js"],"sourcesContent":["import { Polling } from \"./polling.js\";\nimport { WS } from \"./websocket.js\";\nexport const transports = {\n websocket: WS,\n polling: Polling\n};\n"],"names":["transports","websocket","WS","polling","Polling"],"mappings":"kGAEaA,EAAa,CACtBC,oCAAaC,GACbC,QAASC,EAAAA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/transports/index.js"],"sourcesContent":["import { Polling } from \"./polling.js\";\nimport { WS } from \"./websocket.js\";\nexport const transports = {\n websocket: WS,\n polling: Polling\n};\n"],"names":["transports","websocket","WS","polling","Polling"],"mappings":"kGAEO,MAAMA,EAAa,CACtBC,oCAAaC,GACbC,QAASC,EAAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("../transport.js"),s=require("../contrib/yeast.js"),i=require("../contrib/parseqs.js"),r=require("../../../../engine.io-parser/build/esm/index.js"),o=require("./xmlhttprequest.browser.js"),n=require("../../../../@socket.io/component-emitter/index.mjs.js"),a=require("../util.js"),h=require("../globalThis.browser.js");function u(){}var l=null!=new o.XHR({xdomain:!1}).responseType,c=function(t){e.inherits(n,t);var o=e.createSuper(n);function n(t){var s;if(e.classCallCheck(this,n),(s=o.call(this,t)).polling=!1,"undefined"!=typeof location){var i="https:"===location.protocol,r=location.port;r||(r=i?"443":"80"),s.xd="undefined"!=typeof location&&t.hostname!==location.hostname||r!==t.port,s.xs=t.secure!==i}var a=t&&t.forceBase64;return s.supportsBinary=l&&!a,s}return e.createClass(n,[{key:"name",get:function(){return"polling"}},{key:"doOpen",value:function(){this.poll()}},{key:"pause",value:function(e){var t=this;this.readyState="pausing";var s=function(){t.readyState="paused",e()};if(this.polling||!this.writable){var i=0;this.polling&&(i++,this.once("pollComplete",(function(){--i||s()}))),this.writable||(i++,this.once("drain",(function(){--i||s()})))}else s()}},{key:"poll",value:function(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}},{key:"onData",value:function(e){var t=this;r.decodePayload(e,this.socket.binaryType).forEach((function(e){if("opening"===t.readyState&&"open"===e.type&&t.onOpen(),"close"===e.type)return t.onClose({description:"transport closed by the server"}),!1;t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}},{key:"doClose",value:function(){var e=this,t=function(){e.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}},{key:"write",value:function(e){var t=this;this.writable=!1,r.encodePayload(e,(function(e){t.doWrite(e,(function(){t.writable=!0,t.emitReserved("drain")}))}))}},{key:"uri",value:function(){var e=this.query||{},t=this.opts.secure?"https":"http",r="";!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=s.yeast()),this.supportsBinary||e.sid||(e.b64=1),this.opts.port&&("https"===t&&443!==Number(this.opts.port)||"http"===t&&80!==Number(this.opts.port))&&(r=":"+this.opts.port);var o=i.encode(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(o.length?"?"+o:"")}},{key:"request",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new p(this.uri(),e)}},{key:"doWrite",value:function(e,t){var s=this,i=this.request({method:"POST",data:e});i.on("success",t),i.on("error",(function(e,t){s.onError("xhr post error",e,t)}))}},{key:"doPoll",value:function(){var e=this,t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(function(t,s){e.onError("xhr poll error",t,s)})),this.pollXhr=t}}]),n}(t.Transport),p=function(t){e.inherits(i,t);var s=e.createSuper(i);function i(t,r){var o;return e.classCallCheck(this,i),o=s.call(this),a.installTimerFunctions(e.assertThisInitialized(o),r),o.opts=r,o.method=r.method||"GET",o.uri=t,o.async=!1!==r.async,o.data=void 0!==r.data?r.data:null,o.create(),o}return e.createClass(i,[{key:"create",value:function(){var e=this,t=a.pick(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;var s=this.xhr=new o.XHR(t);try{s.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders)for(var r in s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0),this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&s.setRequestHeader(r,this.opts.extraHeaders[r])}catch(e){}if("POST"===this.method)try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{s.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in s&&(s.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(s.timeout=this.opts.requestTimeout),s.onreadystatechange=function(){4===s.readyState&&(200===s.status||1223===s.status?e.onLoad():e.setTimeoutFn((function(){e.onError("number"==typeof s.status?s.status:0)}),0))},s.send(this.data)}catch(t){return void this.setTimeoutFn((function(){e.onError(t)}),0)}"undefined"!=typeof document&&(this.index=i.requestsCount++,i.requests[this.index]=this)}},{key:"onError",value:function(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}},{key:"cleanup",value:function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=u,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete i.requests[this.index],this.xhr=null}}},{key:"onLoad",value:function(){var e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}},{key:"abort",value:function(){this.cleanup()}}]),i}(n.Emitter);if(p.requestsCount=0,p.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",f);else if("function"==typeof addEventListener){var d="onpagehide"in h.globalThisShim?"pagehide":"unload";addEventListener(d,f,!1)}function f(){for(var e in p.requests)p.requests.hasOwnProperty(e)&&p.requests[e].abort()}exports.Polling=c,exports.Request=p;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../transport.js"),e=require("../contrib/yeast.js"),s=require("../contrib/parseqs.js"),i=require("../../../../engine.io-parser/build/esm/index.js"),o=require("./xmlhttprequest.browser.js"),r=require("../../../../@socket.io/component-emitter/index.mjs.js"),n=require("../util.js"),h=require("../globalThis.browser.js");function a(){}const p=null!=new o.XHR({xdomain:!1}).responseType;class d extends t.Transport{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let s=location.port;s||(s=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||s!==t.port,this.xs=t.secure!==e}const e=t&&t.forceBase64;this.supportsBinary=p&&!e}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(t++,this.once("pollComplete",(function(){--t||e()}))),this.writable||(t++,this.once("drain",(function(){--t||e()})))}else e()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){i.decodePayload(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,i.encodePayload(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){let t=this.query||{};const i=this.opts.secure?"https":"http";let o="";!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=e.yeast()),this.supportsBinary||t.sid||(t.b64=1),this.opts.port&&("https"===i&&443!==Number(this.opts.port)||"http"===i&&80!==Number(this.opts.port))&&(o=":"+this.opts.port);const r=s.encode(t);return i+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+o+this.opts.path+(r.length?"?"+r:"")}request(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new l(this.uri(),t)}doWrite(t,e){const s=this.request({method:"POST",data:t});s.on("success",e),s.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)})),this.pollXhr=t}}class l extends r.Emitter{constructor(t,e){super(),n.installTimerFunctions(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.create()}create(){const t=n.pick(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const e=this.xhr=new o.XHR(t);try{e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&e.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(e.timeout=this.opts.requestTimeout),e.onreadystatechange=()=>{4===e.readyState&&(200===e.status||1223===e.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof e.status?e.status:0)}),0))},e.send(this.data)}catch(t){return void this.setTimeoutFn((()=>{this.onError(t)}),0)}"undefined"!=typeof document&&(this.index=l.requestsCount++,l.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=a,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete l.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(l.requestsCount=0,l.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",c);else if("function"==typeof addEventListener){const t="onpagehide"in h.globalThisShim?"pagehide":"unload";addEventListener(t,c,!1)}function c(){for(let t in l.requests)l.requests.hasOwnProperty(t)&&l.requests[t].abort()}exports.Polling=d,exports.Request=l;
2
2
  //# sourceMappingURL=polling.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"polling.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/transports/polling.js"],"sourcesContent":["import { Transport } from \"../transport.js\";\nimport { yeast } from \"../contrib/yeast.js\";\nimport { encode } from \"../contrib/parseqs.js\";\nimport { encodePayload, decodePayload } from \"engine.io-parser\";\nimport { XHR as XMLHttpRequest } from \"./xmlhttprequest.js\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions, pick } from \"../util.js\";\nimport { globalThisShim as globalThis } from \"../globalThis.js\";\nfunction empty() { }\nconst hasXHR2 = (function () {\n const xhr = new XMLHttpRequest({\n xdomain: false\n });\n return null != xhr.responseType;\n})();\nexport class Polling extends Transport {\n /**\n * XHR Polling constructor.\n *\n * @param {Object} opts\n * @api public\n */\n constructor(opts) {\n super(opts);\n this.polling = false;\n if (typeof location !== \"undefined\") {\n const isSSL = \"https:\" === location.protocol;\n let port = location.port;\n // some user agents have empty `location.port`\n if (!port) {\n port = isSSL ? \"443\" : \"80\";\n }\n this.xd =\n (typeof location !== \"undefined\" &&\n opts.hostname !== location.hostname) ||\n port !== opts.port;\n this.xs = opts.secure !== isSSL;\n }\n /**\n * XHR supports binary\n */\n const forceBase64 = opts && opts.forceBase64;\n this.supportsBinary = hasXHR2 && !forceBase64;\n }\n /**\n * Transport name.\n */\n get name() {\n return \"polling\";\n }\n /**\n * Opens the socket (triggers polling). We write a PING message to determine\n * when the transport is open.\n *\n * @api private\n */\n doOpen() {\n this.poll();\n }\n /**\n * Pauses polling.\n *\n * @param {Function} callback upon buffers are flushed and transport is paused\n * @api private\n */\n pause(onPause) {\n this.readyState = \"pausing\";\n const pause = () => {\n this.readyState = \"paused\";\n onPause();\n };\n if (this.polling || !this.writable) {\n let total = 0;\n if (this.polling) {\n total++;\n this.once(\"pollComplete\", function () {\n --total || pause();\n });\n }\n if (!this.writable) {\n total++;\n this.once(\"drain\", function () {\n --total || pause();\n });\n }\n }\n else {\n pause();\n }\n }\n /**\n * Starts polling cycle.\n *\n * @api public\n */\n poll() {\n this.polling = true;\n this.doPoll();\n this.emitReserved(\"poll\");\n }\n /**\n * Overloads onData to detect payloads.\n *\n * @api private\n */\n onData(data) {\n const callback = packet => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n }\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n this.onClose({ description: \"transport closed by the server\" });\n return false;\n }\n // otherwise bypass onData and handle the message\n this.onPacket(packet);\n };\n // decode payload\n decodePayload(data, this.socket.binaryType).forEach(callback);\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emitReserved(\"pollComplete\");\n if (\"open\" === this.readyState) {\n this.poll();\n }\n else {\n }\n }\n }\n /**\n * For polling, send a close packet.\n *\n * @api private\n */\n doClose() {\n const close = () => {\n this.write([{ type: \"close\" }]);\n };\n if (\"open\" === this.readyState) {\n close();\n }\n else {\n // in case we're trying to close while\n // handshaking is in progress (GH-164)\n this.once(\"open\", close);\n }\n }\n /**\n * Writes a packets payload.\n *\n * @param {Array} data packets\n * @param {Function} drain callback\n * @api private\n */\n write(packets) {\n this.writable = false;\n encodePayload(packets, data => {\n this.doWrite(data, () => {\n this.writable = true;\n this.emitReserved(\"drain\");\n });\n });\n }\n /**\n * Generates uri for connection.\n *\n * @api private\n */\n uri() {\n let query = this.query || {};\n const schema = this.opts.secure ? \"https\" : \"http\";\n let port = \"\";\n // cache busting is forced\n if (false !== this.opts.timestampRequests) {\n query[this.opts.timestampParam] = yeast();\n }\n if (!this.supportsBinary && !query.sid) {\n query.b64 = 1;\n }\n // avoid port if default for schema\n if (this.opts.port &&\n ((\"https\" === schema && Number(this.opts.port) !== 443) ||\n (\"http\" === schema && Number(this.opts.port) !== 80))) {\n port = \":\" + this.opts.port;\n }\n const encodedQuery = encode(query);\n const ipv6 = this.opts.hostname.indexOf(\":\") !== -1;\n return (schema +\n \"://\" +\n (ipv6 ? \"[\" + this.opts.hostname + \"]\" : this.opts.hostname) +\n port +\n this.opts.path +\n (encodedQuery.length ? \"?\" + encodedQuery : \"\"));\n }\n /**\n * Creates a request.\n *\n * @param {String} method\n * @api private\n */\n request(opts = {}) {\n Object.assign(opts, { xd: this.xd, xs: this.xs }, this.opts);\n return new Request(this.uri(), opts);\n }\n /**\n * Sends data.\n *\n * @param {String} data to send.\n * @param {Function} called upon flush.\n * @api private\n */\n doWrite(data, fn) {\n const req = this.request({\n method: \"POST\",\n data: data\n });\n req.on(\"success\", fn);\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr post error\", xhrStatus, context);\n });\n }\n /**\n * Starts a poll cycle.\n *\n * @api private\n */\n doPoll() {\n const req = this.request();\n req.on(\"data\", this.onData.bind(this));\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr poll error\", xhrStatus, context);\n });\n this.pollXhr = req;\n }\n}\nexport class Request extends Emitter {\n /**\n * Request constructor\n *\n * @param {Object} options\n * @api public\n */\n constructor(uri, opts) {\n super();\n installTimerFunctions(this, opts);\n this.opts = opts;\n this.method = opts.method || \"GET\";\n this.uri = uri;\n this.async = false !== opts.async;\n this.data = undefined !== opts.data ? opts.data : null;\n this.create();\n }\n /**\n * Creates the XHR object and sends the request.\n *\n * @api private\n */\n create() {\n const opts = pick(this.opts, \"agent\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"autoUnref\");\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n const xhr = (this.xhr = new XMLHttpRequest(opts));\n try {\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n }\n catch (e) { }\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n }\n catch (e) { }\n }\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n }\n catch (e) { }\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n xhr.onreadystatechange = () => {\n if (4 !== xhr.readyState)\n return;\n if (200 === xhr.status || 1223 === xhr.status) {\n this.onLoad();\n }\n else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n this.setTimeoutFn(() => {\n this.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n xhr.send(this.data);\n }\n catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n this.setTimeoutFn(() => {\n this.onError(e);\n }, 0);\n return;\n }\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }\n /**\n * Called upon error.\n *\n * @api private\n */\n onError(err) {\n this.emitReserved(\"error\", err, this.xhr);\n this.cleanup(true);\n }\n /**\n * Cleans up house.\n *\n * @api private\n */\n cleanup(fromError) {\n if (\"undefined\" === typeof this.xhr || null === this.xhr) {\n return;\n }\n this.xhr.onreadystatechange = empty;\n if (fromError) {\n try {\n this.xhr.abort();\n }\n catch (e) { }\n }\n if (typeof document !== \"undefined\") {\n delete Request.requests[this.index];\n }\n this.xhr = null;\n }\n /**\n * Called upon load.\n *\n * @api private\n */\n onLoad() {\n const data = this.xhr.responseText;\n if (data !== null) {\n this.emitReserved(\"data\", data);\n this.emitReserved(\"success\");\n this.cleanup();\n }\n }\n /**\n * Aborts the request.\n *\n * @api public\n */\n abort() {\n this.cleanup();\n }\n}\nRequest.requestsCount = 0;\nRequest.requests = {};\n/**\n * Aborts pending requests when unloading the window. This is needed to prevent\n * memory leaks (e.g. when using IE) and to ensure that no spurious error is\n * emitted.\n */\nif (typeof document !== \"undefined\") {\n // @ts-ignore\n if (typeof attachEvent === \"function\") {\n // @ts-ignore\n attachEvent(\"onunload\", unloadHandler);\n }\n else if (typeof addEventListener === \"function\") {\n const terminationEvent = \"onpagehide\" in globalThis ? \"pagehide\" : \"unload\";\n addEventListener(terminationEvent, unloadHandler, false);\n }\n}\nfunction unloadHandler() {\n for (let i in Request.requests) {\n if (Request.requests.hasOwnProperty(i)) {\n Request.requests[i].abort();\n }\n }\n}\n"],"names":["empty","hasXHR2","XMLHttpRequest","xdomain","responseType","Polling","_Transport","_inherits","_super","_createSuper","opts","_this","_classCallCheck","this","call","polling","location","isSSL","protocol","port","xd","hostname","xs","secure","forceBase64","supportsBinary","_createClass","createClass","key","get","value","poll","onPause","_this2","readyState","pause","writable","total","once","doPoll","emitReserved","data","_this3","decodePayload","socket","binaryType","forEach","packet","type","onOpen","onClose","description","onPacket","_this4","close","write","packets","_this5","encodePayload","doWrite","query","schema","timestampRequests","timestampParam","yeast","sid","b64","Number","encodedQuery","encode","indexOf","path","length","arguments","undefined","Object","assign","Request","uri","fn","_this6","req","request","method","on","xhrStatus","context","onError","_this7","onData","bind","pollXhr","Transport","_Emitter","_super2","_this8","installTimerFunctions","_assertThisInitialized","assertThisInitialized","async","create","_this9","pick","xscheme","xhr","XHR","open","extraHeaders","i","setDisableHeaderCheck","hasOwnProperty","setRequestHeader","e","withCredentials","requestTimeout","timeout","onreadystatechange","status","onLoad","setTimeoutFn","send","document","index","requestsCount","requests","err","cleanup","fromError","abort","responseText","Emitter","attachEvent","unloadHandler","addEventListener","terminationEvent","globalThis"],"mappings":"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,"file":"polling.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/transports/polling.js"],"sourcesContent":["import { Transport } from \"../transport.js\";\nimport { yeast } from \"../contrib/yeast.js\";\nimport { encode } from \"../contrib/parseqs.js\";\nimport { encodePayload, decodePayload } from \"engine.io-parser\";\nimport { XHR as XMLHttpRequest } from \"./xmlhttprequest.js\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions, pick } from \"../util.js\";\nimport { globalThisShim as globalThis } from \"../globalThis.js\";\nfunction empty() { }\nconst hasXHR2 = (function () {\n const xhr = new XMLHttpRequest({\n xdomain: false\n });\n return null != xhr.responseType;\n})();\nexport class Polling extends Transport {\n /**\n * XHR Polling constructor.\n *\n * @param {Object} opts\n * @api public\n */\n constructor(opts) {\n super(opts);\n this.polling = false;\n if (typeof location !== \"undefined\") {\n const isSSL = \"https:\" === location.protocol;\n let port = location.port;\n // some user agents have empty `location.port`\n if (!port) {\n port = isSSL ? \"443\" : \"80\";\n }\n this.xd =\n (typeof location !== \"undefined\" &&\n opts.hostname !== location.hostname) ||\n port !== opts.port;\n this.xs = opts.secure !== isSSL;\n }\n /**\n * XHR supports binary\n */\n const forceBase64 = opts && opts.forceBase64;\n this.supportsBinary = hasXHR2 && !forceBase64;\n }\n /**\n * Transport name.\n */\n get name() {\n return \"polling\";\n }\n /**\n * Opens the socket (triggers polling). We write a PING message to determine\n * when the transport is open.\n *\n * @api private\n */\n doOpen() {\n this.poll();\n }\n /**\n * Pauses polling.\n *\n * @param {Function} callback upon buffers are flushed and transport is paused\n * @api private\n */\n pause(onPause) {\n this.readyState = \"pausing\";\n const pause = () => {\n this.readyState = \"paused\";\n onPause();\n };\n if (this.polling || !this.writable) {\n let total = 0;\n if (this.polling) {\n total++;\n this.once(\"pollComplete\", function () {\n --total || pause();\n });\n }\n if (!this.writable) {\n total++;\n this.once(\"drain\", function () {\n --total || pause();\n });\n }\n }\n else {\n pause();\n }\n }\n /**\n * Starts polling cycle.\n *\n * @api public\n */\n poll() {\n this.polling = true;\n this.doPoll();\n this.emitReserved(\"poll\");\n }\n /**\n * Overloads onData to detect payloads.\n *\n * @api private\n */\n onData(data) {\n const callback = packet => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n }\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n this.onClose({ description: \"transport closed by the server\" });\n return false;\n }\n // otherwise bypass onData and handle the message\n this.onPacket(packet);\n };\n // decode payload\n decodePayload(data, this.socket.binaryType).forEach(callback);\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emitReserved(\"pollComplete\");\n if (\"open\" === this.readyState) {\n this.poll();\n }\n else {\n }\n }\n }\n /**\n * For polling, send a close packet.\n *\n * @api private\n */\n doClose() {\n const close = () => {\n this.write([{ type: \"close\" }]);\n };\n if (\"open\" === this.readyState) {\n close();\n }\n else {\n // in case we're trying to close while\n // handshaking is in progress (GH-164)\n this.once(\"open\", close);\n }\n }\n /**\n * Writes a packets payload.\n *\n * @param {Array} data packets\n * @param {Function} drain callback\n * @api private\n */\n write(packets) {\n this.writable = false;\n encodePayload(packets, data => {\n this.doWrite(data, () => {\n this.writable = true;\n this.emitReserved(\"drain\");\n });\n });\n }\n /**\n * Generates uri for connection.\n *\n * @api private\n */\n uri() {\n let query = this.query || {};\n const schema = this.opts.secure ? \"https\" : \"http\";\n let port = \"\";\n // cache busting is forced\n if (false !== this.opts.timestampRequests) {\n query[this.opts.timestampParam] = yeast();\n }\n if (!this.supportsBinary && !query.sid) {\n query.b64 = 1;\n }\n // avoid port if default for schema\n if (this.opts.port &&\n ((\"https\" === schema && Number(this.opts.port) !== 443) ||\n (\"http\" === schema && Number(this.opts.port) !== 80))) {\n port = \":\" + this.opts.port;\n }\n const encodedQuery = encode(query);\n const ipv6 = this.opts.hostname.indexOf(\":\") !== -1;\n return (schema +\n \"://\" +\n (ipv6 ? \"[\" + this.opts.hostname + \"]\" : this.opts.hostname) +\n port +\n this.opts.path +\n (encodedQuery.length ? \"?\" + encodedQuery : \"\"));\n }\n /**\n * Creates a request.\n *\n * @param {String} method\n * @api private\n */\n request(opts = {}) {\n Object.assign(opts, { xd: this.xd, xs: this.xs }, this.opts);\n return new Request(this.uri(), opts);\n }\n /**\n * Sends data.\n *\n * @param {String} data to send.\n * @param {Function} called upon flush.\n * @api private\n */\n doWrite(data, fn) {\n const req = this.request({\n method: \"POST\",\n data: data\n });\n req.on(\"success\", fn);\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr post error\", xhrStatus, context);\n });\n }\n /**\n * Starts a poll cycle.\n *\n * @api private\n */\n doPoll() {\n const req = this.request();\n req.on(\"data\", this.onData.bind(this));\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr poll error\", xhrStatus, context);\n });\n this.pollXhr = req;\n }\n}\nexport class Request extends Emitter {\n /**\n * Request constructor\n *\n * @param {Object} options\n * @api public\n */\n constructor(uri, opts) {\n super();\n installTimerFunctions(this, opts);\n this.opts = opts;\n this.method = opts.method || \"GET\";\n this.uri = uri;\n this.async = false !== opts.async;\n this.data = undefined !== opts.data ? opts.data : null;\n this.create();\n }\n /**\n * Creates the XHR object and sends the request.\n *\n * @api private\n */\n create() {\n const opts = pick(this.opts, \"agent\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"autoUnref\");\n opts.xdomain = !!this.opts.xd;\n opts.xscheme = !!this.opts.xs;\n const xhr = (this.xhr = new XMLHttpRequest(opts));\n try {\n xhr.open(this.method, this.uri, this.async);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n }\n catch (e) { }\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n }\n catch (e) { }\n }\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n }\n catch (e) { }\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n xhr.onreadystatechange = () => {\n if (4 !== xhr.readyState)\n return;\n if (200 === xhr.status || 1223 === xhr.status) {\n this.onLoad();\n }\n else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n this.setTimeoutFn(() => {\n this.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n xhr.send(this.data);\n }\n catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n this.setTimeoutFn(() => {\n this.onError(e);\n }, 0);\n return;\n }\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }\n /**\n * Called upon error.\n *\n * @api private\n */\n onError(err) {\n this.emitReserved(\"error\", err, this.xhr);\n this.cleanup(true);\n }\n /**\n * Cleans up house.\n *\n * @api private\n */\n cleanup(fromError) {\n if (\"undefined\" === typeof this.xhr || null === this.xhr) {\n return;\n }\n this.xhr.onreadystatechange = empty;\n if (fromError) {\n try {\n this.xhr.abort();\n }\n catch (e) { }\n }\n if (typeof document !== \"undefined\") {\n delete Request.requests[this.index];\n }\n this.xhr = null;\n }\n /**\n * Called upon load.\n *\n * @api private\n */\n onLoad() {\n const data = this.xhr.responseText;\n if (data !== null) {\n this.emitReserved(\"data\", data);\n this.emitReserved(\"success\");\n this.cleanup();\n }\n }\n /**\n * Aborts the request.\n *\n * @api public\n */\n abort() {\n this.cleanup();\n }\n}\nRequest.requestsCount = 0;\nRequest.requests = {};\n/**\n * Aborts pending requests when unloading the window. This is needed to prevent\n * memory leaks (e.g. when using IE) and to ensure that no spurious error is\n * emitted.\n */\nif (typeof document !== \"undefined\") {\n // @ts-ignore\n if (typeof attachEvent === \"function\") {\n // @ts-ignore\n attachEvent(\"onunload\", unloadHandler);\n }\n else if (typeof addEventListener === \"function\") {\n const terminationEvent = \"onpagehide\" in globalThis ? \"pagehide\" : \"unload\";\n addEventListener(terminationEvent, unloadHandler, false);\n }\n}\nfunction unloadHandler() {\n for (let i in Request.requests) {\n if (Request.requests.hasOwnProperty(i)) {\n Request.requests[i].abort();\n }\n }\n}\n"],"names":["empty","hasXHR2","XMLHttpRequest","xdomain","responseType","Polling","Transport","constructor","opts","super","this","polling","location","isSSL","protocol","port","xd","hostname","xs","secure","forceBase64","supportsBinary","name","doOpen","poll","pause","onPause","readyState","writable","total","once","doPoll","emitReserved","onData","data","decodePayload","socket","binaryType","forEach","packet","type","onOpen","onClose","description","onPacket","doClose","close","write","packets","encodePayload","doWrite","uri","query","schema","timestampRequests","timestampParam","yeast","sid","b64","Number","encodedQuery","encode","indexOf","path","length","request","arguments","undefined","Object","assign","Request","fn","req","method","on","xhrStatus","context","onError","bind","pollXhr","Emitter","installTimerFunctions","async","create","pick","xscheme","xhr","XHR","open","extraHeaders","setDisableHeaderCheck","i","hasOwnProperty","setRequestHeader","e","withCredentials","requestTimeout","timeout","onreadystatechange","status","onLoad","setTimeoutFn","send","document","index","requestsCount","requests","err","cleanup","fromError","abort","responseText","attachEvent","unloadHandler","addEventListener","terminationEvent","globalThis"],"mappings":"gZAQA,SAASA,IAAU,CACnB,MAAMC,EAIK,MAHK,IAAIC,MAAe,CAC3BC,SAAS,IAEMC,aAEhB,MAAMC,UAAgBC,EAAAA,UAOzBC,YAAYC,GAGR,GAFAC,MAAMD,GACNE,KAAKC,SAAU,EACS,oBAAbC,SAA0B,CACjC,MAAMC,EAAQ,WAAaD,SAASE,SACpC,IAAIC,EAAOH,SAASG,KAEfA,IACDA,EAAOF,EAAQ,MAAQ,MAE3BH,KAAKM,GACoB,oBAAbJ,UACJJ,EA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d,eAAeD,IAChCrB,EAAQoC,SAASf,GAAGmB,OAGhC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../globalThis.browser.js"),o="function"==typeof Promise&&"function"==typeof Promise.resolve?function(e){return Promise.resolve().then(e)}:function(e,o){return o(e,0)},r=e.globalThisShim.WebSocket||e.globalThisShim.MozWebSocket;exports.WebSocket=r,exports.defaultBinaryType="arraybuffer",exports.nextTick=o,exports.usingBrowserWebSocket=!0;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../globalThis.browser.js");const o="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,o)=>o(e,0),r=e.globalThisShim.WebSocket||e.globalThisShim.MozWebSocket;exports.WebSocket=r,exports.defaultBinaryType="arraybuffer",exports.nextTick=o,exports.usingBrowserWebSocket=!0;
2
2
  //# sourceMappingURL=websocket-constructor.browser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"websocket-constructor.browser.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js"],"sourcesContent":["import { globalThisShim as globalThis } from \"../globalThis.js\";\nexport const nextTick = (() => {\n const isPromiseAvailable = typeof Promise === \"function\" && typeof Promise.resolve === \"function\";\n if (isPromiseAvailable) {\n return cb => Promise.resolve().then(cb);\n }\n else {\n return (cb, setTimeoutFn) => setTimeoutFn(cb, 0);\n }\n})();\nexport const WebSocket = globalThis.WebSocket || globalThis.MozWebSocket;\nexport const usingBrowserWebSocket = true;\nexport const defaultBinaryType = \"arraybuffer\";\n"],"names":["nextTick","Promise","resolve","cb","then","setTimeoutFn","WebSocket","globalThis","globalThisShim","MozWebSocket"],"mappings":"8GACaA,EACqC,mBAAZC,SAAqD,mBAApBA,QAAQC,QAEhE,SAAAC,GAAE,OAAIF,QAAQC,UAAUE,KAAKD,EAAG,EAGhC,SAACA,EAAIE,GAAY,OAAKA,EAAaF,EAAI,EAAE,EAG3CG,EAAYC,EAAUC,eAACF,WAAaC,EAAAA,eAAWE,2DAE3B,gEADI"}
1
+ {"version":3,"file":"websocket-constructor.browser.js","sources":["../../../../../../node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js"],"sourcesContent":["import { globalThisShim as globalThis } from \"../globalThis.js\";\nexport const nextTick = (() => {\n const isPromiseAvailable = typeof Promise === \"function\" && typeof Promise.resolve === \"function\";\n if (isPromiseAvailable) {\n return cb => Promise.resolve().then(cb);\n }\n else {\n return (cb, setTimeoutFn) => setTimeoutFn(cb, 0);\n }\n})();\nexport const WebSocket = globalThis.WebSocket || globalThis.MozWebSocket;\nexport const usingBrowserWebSocket = true;\nexport const defaultBinaryType = \"arraybuffer\";\n"],"names":["nextTick","Promise","resolve","cb","then","setTimeoutFn","WebSocket","globalThis","globalThisShim","MozWebSocket"],"mappings":"8GACaA,MAAAA,EACqC,mBAAZC,SAAqD,mBAApBA,QAAQC,QAEhEC,GAAMF,QAAQC,UAAUE,KAAKD,GAG7B,CAACA,EAAIE,IAAiBA,EAAaF,EAAI,GAGzCG,EAAYC,EAAUC,eAACF,WAAaC,EAAAA,eAAWE,2DAE3B,gEADI"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("../transport.js"),s=require("../contrib/parseqs.js"),r=require("../contrib/yeast.js"),o=require("../util.js"),i=require("./websocket-constructor.browser.js"),n=require("../../../../engine.io-parser/build/esm/encodePacket.browser.js");require("../../../../engine.io-parser/build/esm/commons.js"),require("../../../../engine.io-parser/build/esm/contrib/base64-arraybuffer.js");var a="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),c=function(t){e.inherits(u,t);var c=e.createSuper(u);function u(t){var s;return e.classCallCheck(this,u),(s=c.call(this,t)).supportsBinary=!t.forceBase64,s}return e.createClass(u,[{key:"name",get:function(){return"websocket"}},{key:"doOpen",value:function(){if(this.check()){var e=this.uri(),t=this.opts.protocols,s=a?{}:o.pick(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=i.usingBrowserWebSocket&&!a?t?new i.WebSocket(e,t):new i.WebSocket(e):new i.WebSocket(e,t,s)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType||i.defaultBinaryType,this.addEventListeners()}}},{key:"addEventListeners",value:function(){var e=this;this.ws.onopen=function(){e.opts.autoUnref&&e.ws._socket.unref(),e.onOpen()},this.ws.onclose=function(t){return e.onClose({description:"websocket connection closed",context:t})},this.ws.onmessage=function(t){return e.onData(t.data)},this.ws.onerror=function(t){return e.onError("websocket error",t)}}},{key:"write",value:function(e){var t=this;this.writable=!1;for(var s=function(s){var r=e[s],o=s===e.length-1;n.default(r,t.supportsBinary,(function(e){try{i.usingBrowserWebSocket&&t.ws.send(e)}catch(e){}o&&i.nextTick((function(){t.writable=!0,t.emitReserved("drain")}),t.setTimeoutFn)}))},r=0;r<e.length;r++)s(r)}},{key:"doClose",value:function(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}},{key:"uri",value:function(){var e=this.query||{},t=this.opts.secure?"wss":"ws",o="";this.opts.port&&("wss"===t&&443!==Number(this.opts.port)||"ws"===t&&80!==Number(this.opts.port))&&(o=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=r.yeast()),this.supportsBinary||(e.b64=1);var i=s.encode(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+o+this.opts.path+(i.length?"?"+i:"")}},{key:"check",value:function(){return!!i.WebSocket}}]),u}(t.Transport);exports.WS=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../transport.js"),s=require("../contrib/parseqs.js"),t=require("../contrib/yeast.js"),r=require("../util.js"),o=require("./websocket-constructor.browser.js"),i=require("../../../../engine.io-parser/build/esm/encodePacket.browser.js");require("../../../../engine.io-parser/build/esm/commons.js"),require("../../../../engine.io-parser/build/esm/contrib/base64-arraybuffer.js");const n="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class a extends e.Transport{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),s=this.opts.protocols,t=n?{}:r.pick(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(t.headers=this.opts.extraHeaders);try{this.ws=o.usingBrowserWebSocket&&!n?s?new o.WebSocket(e,s):new o.WebSocket(e):new o.WebSocket(e,s,t)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType||o.defaultBinaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let s=0;s<e.length;s++){const t=e[s],r=s===e.length-1;i.default(t,this.supportsBinary,(e=>{try{o.usingBrowserWebSocket&&this.ws.send(e)}catch(e){}r&&o.nextTick((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let e=this.query||{};const r=this.opts.secure?"wss":"ws";let o="";this.opts.port&&("wss"===r&&443!==Number(this.opts.port)||"ws"===r&&80!==Number(this.opts.port))&&(o=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=t.yeast()),this.supportsBinary||(e.b64=1);const i=s.encode(e);return r+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+o+this.opts.path+(i.length?"?"+i:"")}check(){return!!o.WebSocket}}exports.WS=a;
2
2
  //# sourceMappingURL=websocket.js.map