@opentiny/fluent-editor 4.0.0-alpha.6 → 4.0.0-alpha.7

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 (270) hide show
  1. package/README.md +1 -1
  2. package/es/_virtual/_commonjs-dynamic-modules.es.js +7 -0
  3. package/es/_virtual/_commonjs-dynamic-modules.es.js.map +1 -0
  4. package/es/_virtual/_commonjsHelpers.es.js +42 -0
  5. package/es/_virtual/_commonjsHelpers.es.js.map +1 -0
  6. package/es/_virtual/quill-cursors.es.js +5 -0
  7. package/es/_virtual/quill-cursors.es.js.map +1 -0
  8. package/es/_virtual/simplepeer.min.es.js +5 -0
  9. package/es/_virtual/simplepeer.min.es.js.map +1 -0
  10. package/es/index.es.js +2 -0
  11. package/es/index.es.js.map +1 -1
  12. package/es/modules/collaborative-editing/awareness/awareness.es.js +93 -0
  13. package/es/modules/collaborative-editing/awareness/awareness.es.js.map +1 -0
  14. package/es/modules/collaborative-editing/awareness/index.es.js +8 -0
  15. package/es/modules/collaborative-editing/awareness/index.es.js.map +1 -0
  16. package/es/modules/collaborative-editing/awareness/y-indexeddb.es.js +12 -0
  17. package/es/modules/collaborative-editing/awareness/y-indexeddb.es.js.map +1 -0
  18. package/es/modules/collaborative-editing/collaborative-editing.es.js +105 -0
  19. package/es/modules/collaborative-editing/collaborative-editing.es.js.map +1 -0
  20. package/es/modules/collaborative-editing/index.es.js +6 -0
  21. package/es/modules/collaborative-editing/index.es.js.map +1 -0
  22. package/es/modules/collaborative-editing/module.es.js +35 -0
  23. package/es/modules/collaborative-editing/module.es.js.map +1 -0
  24. package/es/modules/collaborative-editing/provider/providerRegistry.es.js +28 -0
  25. package/es/modules/collaborative-editing/provider/providerRegistry.es.js.map +1 -0
  26. package/es/modules/collaborative-editing/provider/webrtc.es.js +99 -0
  27. package/es/modules/collaborative-editing/provider/webrtc.es.js.map +1 -0
  28. package/es/modules/collaborative-editing/provider/websocket.es.js +111 -0
  29. package/es/modules/collaborative-editing/provider/websocket.es.js.map +1 -0
  30. package/es/modules/collaborative-editing/types.es.js +2 -0
  31. package/es/modules/collaborative-editing/types.es.js.map +1 -0
  32. package/es/modules/custom-image/options.es.js +1 -1
  33. package/es/modules/custom-image/options.es.js.map +1 -1
  34. package/es/modules/index.es.js +1 -0
  35. package/es/modules/index.es.js.map +1 -1
  36. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/array.es.js +112 -0
  37. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/array.es.js.map +1 -0
  38. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/binary.es.js +133 -0
  39. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/binary.es.js.map +1 -0
  40. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/broadcastchannel.es.js +59 -0
  41. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/broadcastchannel.es.js.map +1 -0
  42. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/buffer.es.js +75 -0
  43. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/buffer.es.js.map +1 -0
  44. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/conditions.es.js +5 -0
  45. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/conditions.es.js.map +1 -0
  46. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/decoding.es.js +422 -0
  47. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/decoding.es.js.map +1 -0
  48. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/dom.es.js +142 -0
  49. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/dom.es.js.map +1 -0
  50. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/encoding.es.js +484 -0
  51. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/encoding.es.js.map +1 -0
  52. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/environment.es.js +79 -0
  53. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/environment.es.js.map +1 -0
  54. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/error.es.js +13 -0
  55. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/error.es.js.map +1 -0
  56. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/eventloop.es.js +69 -0
  57. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/eventloop.es.js.map +1 -0
  58. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/function.es.js +124 -0
  59. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/function.es.js.map +1 -0
  60. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/indexeddb.es.js +92 -0
  61. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/indexeddb.es.js.map +1 -0
  62. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/iterator.es.js +38 -0
  63. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/iterator.es.js.map +1 -0
  64. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/json.es.js +7 -0
  65. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/json.es.js.map +1 -0
  66. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/logging.common.es.js +99 -0
  67. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/logging.common.es.js.map +1 -0
  68. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/logging.es.js +288 -0
  69. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/logging.es.js.map +1 -0
  70. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/map.es.js +47 -0
  71. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/map.es.js.map +1 -0
  72. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/math.es.js +37 -0
  73. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/math.es.js.map +1 -0
  74. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/metric.es.js +64 -0
  75. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/metric.es.js.map +1 -0
  76. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/mutex.es.js +19 -0
  77. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/mutex.es.js.map +1 -0
  78. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/number.es.js +31 -0
  79. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/number.es.js.map +1 -0
  80. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/object.es.js +72 -0
  81. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/object.es.js.map +1 -0
  82. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/observable.es.js +128 -0
  83. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/observable.es.js.map +1 -0
  84. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/pair.es.js +22 -0
  85. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/pair.es.js.map +1 -0
  86. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/promise.es.js +50 -0
  87. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/promise.es.js.map +1 -0
  88. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/random.es.js +24 -0
  89. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/random.es.js.map +1 -0
  90. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/set.es.js +11 -0
  91. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/set.es.js.map +1 -0
  92. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/storage.es.js +44 -0
  93. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/storage.es.js.map +1 -0
  94. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/string.es.js +95 -0
  95. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/string.es.js.map +1 -0
  96. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/symbol.es.js +7 -0
  97. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/symbol.es.js.map +1 -0
  98. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/time.es.js +28 -0
  99. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/time.es.js.map +1 -0
  100. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/traits.es.js +5 -0
  101. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/traits.es.js.map +1 -0
  102. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/url.es.js +20 -0
  103. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/url.es.js.map +1 -0
  104. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/webcrypto.es.js +7 -0
  105. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/webcrypto.es.js.map +1 -0
  106. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/websocket.es.js +113 -0
  107. package/es/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/websocket.es.js.map +1 -0
  108. package/es/node_modules/.pnpm/quill-cursors@4.0.4/node_modules/quill-cursors/dist/quill-cursors.es.js +1796 -0
  109. package/es/node_modules/.pnpm/quill-cursors@4.0.4/node_modules/quill-cursors/dist/quill-cursors.es.js.map +1 -0
  110. package/es/node_modules/.pnpm/simple-peer@9.11.1/node_modules/simple-peer/simplepeer.min.es.js +2620 -0
  111. package/es/node_modules/.pnpm/simple-peer@9.11.1/node_modules/simple-peer/simplepeer.min.es.js.map +1 -0
  112. package/es/node_modules/.pnpm/y-indexeddb@9.0.12_yjs@13.6.27/node_modules/y-indexeddb/src/y-indexeddb.es.js +155 -0
  113. package/es/node_modules/.pnpm/y-indexeddb@9.0.12_yjs@13.6.27/node_modules/y-indexeddb/src/y-indexeddb.es.js.map +1 -0
  114. package/es/node_modules/.pnpm/y-protocols@1.0.6_yjs@13.6.27/node_modules/y-protocols/auth.es.js +20 -0
  115. package/es/node_modules/.pnpm/y-protocols@1.0.6_yjs@13.6.27/node_modules/y-protocols/auth.es.js.map +1 -0
  116. package/es/node_modules/.pnpm/y-protocols@1.0.6_yjs@13.6.27/node_modules/y-protocols/awareness.es.js +232 -0
  117. package/es/node_modules/.pnpm/y-protocols@1.0.6_yjs@13.6.27/node_modules/y-protocols/awareness.es.js.map +1 -0
  118. package/es/node_modules/.pnpm/y-protocols@1.0.6_yjs@13.6.27/node_modules/y-protocols/sync.es.js +58 -0
  119. package/es/node_modules/.pnpm/y-protocols@1.0.6_yjs@13.6.27/node_modules/y-protocols/sync.es.js.map +1 -0
  120. package/es/node_modules/.pnpm/y-quill@1.0.0_quill-cursors@4.0.4_quill@2.0.3_patch_hash_dnirvjhpzdmsvdidsclwslxxji__yjs@13.6.27/node_modules/y-quill/src/y-quill.es.js +157 -0
  121. package/es/node_modules/.pnpm/y-quill@1.0.0_quill-cursors@4.0.4_quill@2.0.3_patch_hash_dnirvjhpzdmsvdidsclwslxxji__yjs@13.6.27/node_modules/y-quill/src/y-quill.es.js.map +1 -0
  122. package/es/node_modules/.pnpm/y-webrtc@10.3.0_yjs@13.6.27/node_modules/y-webrtc/src/crypto.es.js +94 -0
  123. package/es/node_modules/.pnpm/y-webrtc@10.3.0_yjs@13.6.27/node_modules/y-webrtc/src/crypto.es.js.map +1 -0
  124. package/es/node_modules/.pnpm/y-webrtc@10.3.0_yjs@13.6.27/node_modules/y-webrtc/src/y-webrtc.es.js +537 -0
  125. package/es/node_modules/.pnpm/y-webrtc@10.3.0_yjs@13.6.27/node_modules/y-webrtc/src/y-webrtc.es.js.map +1 -0
  126. package/es/node_modules/.pnpm/y-websocket@3.0.0_yjs@13.6.27/node_modules/y-websocket/src/y-websocket.es.js +380 -0
  127. package/es/node_modules/.pnpm/y-websocket@3.0.0_yjs@13.6.27/node_modules/y-websocket/src/y-websocket.es.js.map +1 -0
  128. package/es/node_modules/.pnpm/yjs@13.6.27/node_modules/yjs/dist/yjs.es.js +7653 -0
  129. package/es/node_modules/.pnpm/yjs@13.6.27/node_modules/yjs/dist/yjs.es.js.map +1 -0
  130. package/lib/_virtual/_commonjs-dynamic-modules.cjs.js +7 -0
  131. package/lib/_virtual/_commonjs-dynamic-modules.cjs.js.map +1 -0
  132. package/lib/_virtual/_commonjsHelpers.cjs.js +42 -0
  133. package/lib/_virtual/_commonjsHelpers.cjs.js.map +1 -0
  134. package/lib/_virtual/quill-cursors.cjs.js +5 -0
  135. package/lib/_virtual/quill-cursors.cjs.js.map +1 -0
  136. package/lib/_virtual/simplepeer.min.cjs.js +5 -0
  137. package/lib/_virtual/simplepeer.min.cjs.js.map +1 -0
  138. package/lib/index.cjs.js +4 -2
  139. package/lib/index.cjs.js.map +1 -1
  140. package/lib/modules/collaborative-editing/awareness/awareness.cjs.js +93 -0
  141. package/lib/modules/collaborative-editing/awareness/awareness.cjs.js.map +1 -0
  142. package/lib/modules/collaborative-editing/awareness/index.cjs.js +8 -0
  143. package/lib/modules/collaborative-editing/awareness/index.cjs.js.map +1 -0
  144. package/lib/modules/collaborative-editing/awareness/y-indexeddb.cjs.js +12 -0
  145. package/lib/modules/collaborative-editing/awareness/y-indexeddb.cjs.js.map +1 -0
  146. package/lib/modules/collaborative-editing/collaborative-editing.cjs.js +105 -0
  147. package/lib/modules/collaborative-editing/collaborative-editing.cjs.js.map +1 -0
  148. package/lib/modules/collaborative-editing/index.cjs.js +6 -0
  149. package/lib/modules/collaborative-editing/index.cjs.js.map +1 -0
  150. package/lib/modules/collaborative-editing/module.cjs.js +35 -0
  151. package/lib/modules/collaborative-editing/module.cjs.js.map +1 -0
  152. package/lib/modules/collaborative-editing/provider/providerRegistry.cjs.js +28 -0
  153. package/lib/modules/collaborative-editing/provider/providerRegistry.cjs.js.map +1 -0
  154. package/lib/modules/collaborative-editing/provider/webrtc.cjs.js +99 -0
  155. package/lib/modules/collaborative-editing/provider/webrtc.cjs.js.map +1 -0
  156. package/lib/modules/collaborative-editing/provider/websocket.cjs.js +111 -0
  157. package/lib/modules/collaborative-editing/provider/websocket.cjs.js.map +1 -0
  158. package/lib/modules/collaborative-editing/types.cjs.js +2 -0
  159. package/lib/modules/collaborative-editing/types.cjs.js.map +1 -0
  160. package/lib/modules/custom-image/options.cjs.js +1 -1
  161. package/lib/modules/custom-image/options.cjs.js.map +1 -1
  162. package/lib/modules/index.cjs.js +1 -0
  163. package/lib/modules/index.cjs.js.map +1 -1
  164. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/array.cjs.js +112 -0
  165. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/array.cjs.js.map +1 -0
  166. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/binary.cjs.js +133 -0
  167. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/binary.cjs.js.map +1 -0
  168. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/broadcastchannel.cjs.js +59 -0
  169. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/broadcastchannel.cjs.js.map +1 -0
  170. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/buffer.cjs.js +75 -0
  171. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/buffer.cjs.js.map +1 -0
  172. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/conditions.cjs.js +5 -0
  173. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/conditions.cjs.js.map +1 -0
  174. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/decoding.cjs.js +422 -0
  175. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/decoding.cjs.js.map +1 -0
  176. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/dom.cjs.js +142 -0
  177. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/dom.cjs.js.map +1 -0
  178. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/encoding.cjs.js +484 -0
  179. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/encoding.cjs.js.map +1 -0
  180. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/environment.cjs.js +79 -0
  181. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/environment.cjs.js.map +1 -0
  182. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/error.cjs.js +13 -0
  183. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/error.cjs.js.map +1 -0
  184. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/eventloop.cjs.js +69 -0
  185. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/eventloop.cjs.js.map +1 -0
  186. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/function.cjs.js +124 -0
  187. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/function.cjs.js.map +1 -0
  188. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/indexeddb.cjs.js +92 -0
  189. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/indexeddb.cjs.js.map +1 -0
  190. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/iterator.cjs.js +38 -0
  191. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/iterator.cjs.js.map +1 -0
  192. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/json.cjs.js +7 -0
  193. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/json.cjs.js.map +1 -0
  194. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/logging.cjs.js +288 -0
  195. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/logging.cjs.js.map +1 -0
  196. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/logging.common.cjs.js +99 -0
  197. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/logging.common.cjs.js.map +1 -0
  198. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/map.cjs.js +47 -0
  199. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/map.cjs.js.map +1 -0
  200. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/math.cjs.js +37 -0
  201. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/math.cjs.js.map +1 -0
  202. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/metric.cjs.js +64 -0
  203. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/metric.cjs.js.map +1 -0
  204. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/mutex.cjs.js +19 -0
  205. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/mutex.cjs.js.map +1 -0
  206. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/number.cjs.js +31 -0
  207. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/number.cjs.js.map +1 -0
  208. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/object.cjs.js +72 -0
  209. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/object.cjs.js.map +1 -0
  210. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/observable.cjs.js +128 -0
  211. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/observable.cjs.js.map +1 -0
  212. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/pair.cjs.js +22 -0
  213. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/pair.cjs.js.map +1 -0
  214. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/promise.cjs.js +50 -0
  215. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/promise.cjs.js.map +1 -0
  216. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/random.cjs.js +24 -0
  217. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/random.cjs.js.map +1 -0
  218. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/set.cjs.js +11 -0
  219. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/set.cjs.js.map +1 -0
  220. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/storage.cjs.js +44 -0
  221. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/storage.cjs.js.map +1 -0
  222. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/string.cjs.js +94 -0
  223. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/string.cjs.js.map +1 -0
  224. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/symbol.cjs.js +7 -0
  225. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/symbol.cjs.js.map +1 -0
  226. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/time.cjs.js +28 -0
  227. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/time.cjs.js.map +1 -0
  228. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/traits.cjs.js +5 -0
  229. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/traits.cjs.js.map +1 -0
  230. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/url.cjs.js +20 -0
  231. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/url.cjs.js.map +1 -0
  232. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/webcrypto.cjs.js +7 -0
  233. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/webcrypto.cjs.js.map +1 -0
  234. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/websocket.cjs.js +113 -0
  235. package/lib/node_modules/.pnpm/lib0@0.2.114/node_modules/lib0/websocket.cjs.js.map +1 -0
  236. package/lib/node_modules/.pnpm/quill-cursors@4.0.4/node_modules/quill-cursors/dist/quill-cursors.cjs.js +1796 -0
  237. package/lib/node_modules/.pnpm/quill-cursors@4.0.4/node_modules/quill-cursors/dist/quill-cursors.cjs.js.map +1 -0
  238. package/lib/node_modules/.pnpm/simple-peer@9.11.1/node_modules/simple-peer/simplepeer.min.cjs.js +2620 -0
  239. package/lib/node_modules/.pnpm/simple-peer@9.11.1/node_modules/simple-peer/simplepeer.min.cjs.js.map +1 -0
  240. package/lib/node_modules/.pnpm/y-indexeddb@9.0.12_yjs@13.6.27/node_modules/y-indexeddb/src/y-indexeddb.cjs.js +155 -0
  241. package/lib/node_modules/.pnpm/y-indexeddb@9.0.12_yjs@13.6.27/node_modules/y-indexeddb/src/y-indexeddb.cjs.js.map +1 -0
  242. package/lib/node_modules/.pnpm/y-protocols@1.0.6_yjs@13.6.27/node_modules/y-protocols/auth.cjs.js +20 -0
  243. package/lib/node_modules/.pnpm/y-protocols@1.0.6_yjs@13.6.27/node_modules/y-protocols/auth.cjs.js.map +1 -0
  244. package/lib/node_modules/.pnpm/y-protocols@1.0.6_yjs@13.6.27/node_modules/y-protocols/awareness.cjs.js +232 -0
  245. package/lib/node_modules/.pnpm/y-protocols@1.0.6_yjs@13.6.27/node_modules/y-protocols/awareness.cjs.js.map +1 -0
  246. package/lib/node_modules/.pnpm/y-protocols@1.0.6_yjs@13.6.27/node_modules/y-protocols/sync.cjs.js +58 -0
  247. package/lib/node_modules/.pnpm/y-protocols@1.0.6_yjs@13.6.27/node_modules/y-protocols/sync.cjs.js.map +1 -0
  248. package/lib/node_modules/.pnpm/y-quill@1.0.0_quill-cursors@4.0.4_quill@2.0.3_patch_hash_dnirvjhpzdmsvdidsclwslxxji__yjs@13.6.27/node_modules/y-quill/src/y-quill.cjs.js +157 -0
  249. package/lib/node_modules/.pnpm/y-quill@1.0.0_quill-cursors@4.0.4_quill@2.0.3_patch_hash_dnirvjhpzdmsvdidsclwslxxji__yjs@13.6.27/node_modules/y-quill/src/y-quill.cjs.js.map +1 -0
  250. package/lib/node_modules/.pnpm/y-webrtc@10.3.0_yjs@13.6.27/node_modules/y-webrtc/src/crypto.cjs.js +94 -0
  251. package/lib/node_modules/.pnpm/y-webrtc@10.3.0_yjs@13.6.27/node_modules/y-webrtc/src/crypto.cjs.js.map +1 -0
  252. package/lib/node_modules/.pnpm/y-webrtc@10.3.0_yjs@13.6.27/node_modules/y-webrtc/src/y-webrtc.cjs.js +537 -0
  253. package/lib/node_modules/.pnpm/y-webrtc@10.3.0_yjs@13.6.27/node_modules/y-webrtc/src/y-webrtc.cjs.js.map +1 -0
  254. package/lib/node_modules/.pnpm/y-websocket@3.0.0_yjs@13.6.27/node_modules/y-websocket/src/y-websocket.cjs.js +380 -0
  255. package/lib/node_modules/.pnpm/y-websocket@3.0.0_yjs@13.6.27/node_modules/y-websocket/src/y-websocket.cjs.js.map +1 -0
  256. package/lib/node_modules/.pnpm/yjs@13.6.27/node_modules/yjs/dist/yjs.cjs.js +7653 -0
  257. package/lib/node_modules/.pnpm/yjs@13.6.27/node_modules/yjs/dist/yjs.cjs.js.map +1 -0
  258. package/package.json +9 -2
  259. package/types/modules/collaborative-editing/awareness/awareness.d.ts +29 -0
  260. package/types/modules/collaborative-editing/awareness/index.d.ts +2 -0
  261. package/types/modules/collaborative-editing/awareness/y-indexeddb.d.ts +3 -0
  262. package/types/modules/collaborative-editing/collaborative-editing.d.ts +25 -0
  263. package/types/modules/collaborative-editing/index.d.ts +2 -0
  264. package/types/modules/collaborative-editing/module.d.ts +12 -0
  265. package/types/modules/collaborative-editing/provider/index.d.ts +3 -0
  266. package/types/modules/collaborative-editing/provider/providerRegistry.d.ts +26 -0
  267. package/types/modules/collaborative-editing/provider/webrtc.d.ts +37 -0
  268. package/types/modules/collaborative-editing/provider/websocket.d.ts +41 -0
  269. package/types/modules/collaborative-editing/types.d.ts +37 -0
  270. package/types/modules/index.d.ts +1 -0
@@ -0,0 +1,2620 @@
1
+ import { commonjsGlobal, getDefaultExportFromCjs } from "../../../../../_virtual/_commonjsHelpers.es.js";
2
+ import { commonjsRequire } from "../../../../../_virtual/_commonjs-dynamic-modules.es.js";
3
+ import { __module as simplepeer_min$1 } from "../../../../../_virtual/simplepeer.min.es.js";
4
+ var simplepeer_min = simplepeer_min$1.exports;
5
+ (function(module, exports) {
6
+ (function(e) {
7
+ if (true) module.exports = e();
8
+ else if (false) (void 0)([], e);
9
+ else {
10
+ var t;
11
+ t = "undefined" == typeof window ? "undefined" == typeof commonjsGlobal ? "undefined" == typeof self ? this : self : commonjsGlobal : window, t.SimplePeer = e();
12
+ }
13
+ })(function() {
14
+ var t = Math.floor, n = Math.abs, r = Math.pow;
15
+ return (/* @__PURE__ */ function() {
16
+ function d(s, e, n2) {
17
+ function t2(o, i) {
18
+ if (!e[o]) {
19
+ if (!s[o]) {
20
+ var l = "function" == typeof commonjsRequire && commonjsRequire;
21
+ if (!i && l) return l(o, true);
22
+ if (r2) return r2(o, true);
23
+ var c = new Error("Cannot find module '" + o + "'");
24
+ throw c.code = "MODULE_NOT_FOUND", c;
25
+ }
26
+ var a2 = e[o] = { exports: {} };
27
+ s[o][0].call(a2.exports, function(e2) {
28
+ var r3 = s[o][1][e2];
29
+ return t2(r3 || e2);
30
+ }, a2, a2.exports, d, s, e, n2);
31
+ }
32
+ return e[o].exports;
33
+ }
34
+ for (var r2 = "function" == typeof commonjsRequire && commonjsRequire, a = 0; a < n2.length; a++) t2(n2[a]);
35
+ return t2;
36
+ }
37
+ return d;
38
+ }())({ 1: [function(e, t2, n2) {
39
+ "use strict";
40
+ function r2(e2) {
41
+ var t3 = e2.length;
42
+ if (0 < t3 % 4) throw new Error("Invalid string. Length must be a multiple of 4");
43
+ var n3 = e2.indexOf("=");
44
+ -1 === n3 && (n3 = t3);
45
+ var r3 = n3 === t3 ? 0 : 4 - n3 % 4;
46
+ return [n3, r3];
47
+ }
48
+ function a(e2, t3, n3) {
49
+ return 3 * (t3 + n3) / 4 - n3;
50
+ }
51
+ function o(e2) {
52
+ var t3, n3, o2 = r2(e2), d2 = o2[0], s2 = o2[1], l2 = new p(a(e2, d2, s2)), c2 = 0, f2 = 0 < s2 ? d2 - 4 : d2;
53
+ for (n3 = 0; n3 < f2; n3 += 4) t3 = u[e2.charCodeAt(n3)] << 18 | u[e2.charCodeAt(n3 + 1)] << 12 | u[e2.charCodeAt(n3 + 2)] << 6 | u[e2.charCodeAt(n3 + 3)], l2[c2++] = 255 & t3 >> 16, l2[c2++] = 255 & t3 >> 8, l2[c2++] = 255 & t3;
54
+ return 2 === s2 && (t3 = u[e2.charCodeAt(n3)] << 2 | u[e2.charCodeAt(n3 + 1)] >> 4, l2[c2++] = 255 & t3), 1 === s2 && (t3 = u[e2.charCodeAt(n3)] << 10 | u[e2.charCodeAt(n3 + 1)] << 4 | u[e2.charCodeAt(n3 + 2)] >> 2, l2[c2++] = 255 & t3 >> 8, l2[c2++] = 255 & t3), l2;
55
+ }
56
+ function d(e2) {
57
+ return c[63 & e2 >> 18] + c[63 & e2 >> 12] + c[63 & e2 >> 6] + c[63 & e2];
58
+ }
59
+ function s(e2, t3, n3) {
60
+ for (var r3, a2 = [], o2 = t3; o2 < n3; o2 += 3) r3 = (16711680 & e2[o2] << 16) + (65280 & e2[o2 + 1] << 8) + (255 & e2[o2 + 2]), a2.push(d(r3));
61
+ return a2.join("");
62
+ }
63
+ function l(e2) {
64
+ for (var t3, n3 = e2.length, r3 = n3 % 3, a2 = [], o2 = 16383, d2 = 0, l2 = n3 - r3; d2 < l2; d2 += o2) a2.push(s(e2, d2, d2 + o2 > l2 ? l2 : d2 + o2));
65
+ return 1 === r3 ? (t3 = e2[n3 - 1], a2.push(c[t3 >> 2] + c[63 & t3 << 4] + "==")) : 2 === r3 && (t3 = (e2[n3 - 2] << 8) + e2[n3 - 1], a2.push(c[t3 >> 10] + c[63 & t3 >> 4] + c[63 & t3 << 2] + "=")), a2.join("");
66
+ }
67
+ n2.byteLength = function(e2) {
68
+ var t3 = r2(e2), n3 = t3[0], a2 = t3[1];
69
+ return 3 * (n3 + a2) / 4 - a2;
70
+ }, n2.toByteArray = o, n2.fromByteArray = l;
71
+ for (var c = [], u = [], p = "undefined" == typeof Uint8Array ? Array : Uint8Array, f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", g = 0, _ = f.length; g < _; ++g) c[g] = f[g], u[f.charCodeAt(g)] = g;
72
+ u[45] = 62, u[95] = 63;
73
+ }, {}], 2: [function() {
74
+ }, {}], 3: [function(e, t2, n2) {
75
+ (function() {
76
+ (function() {
77
+ /*!
78
+ * The buffer module from node.js, for the browser.
79
+ *
80
+ * @author Feross Aboukhadijeh <https://feross.org>
81
+ * @license MIT
82
+ */
83
+ "use strict";
84
+ var t3 = String.fromCharCode, o = Math.min;
85
+ function d(e2) {
86
+ if (2147483647 < e2) throw new RangeError('The value "' + e2 + '" is invalid for option "size"');
87
+ var t4 = new Uint8Array(e2);
88
+ return t4.__proto__ = s.prototype, t4;
89
+ }
90
+ function s(e2, t4, n3) {
91
+ if ("number" == typeof e2) {
92
+ if ("string" == typeof t4) throw new TypeError('The "string" argument must be of type string. Received type number');
93
+ return p(e2);
94
+ }
95
+ return l(e2, t4, n3);
96
+ }
97
+ function l(e2, t4, n3) {
98
+ if ("string" == typeof e2) return f(e2, t4);
99
+ if (ArrayBuffer.isView(e2)) return g(e2);
100
+ if (null == e2) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e2);
101
+ if (K(e2, ArrayBuffer) || e2 && K(e2.buffer, ArrayBuffer)) return _(e2, t4, n3);
102
+ if ("number" == typeof e2) throw new TypeError('The "value" argument must not be of type number. Received type number');
103
+ var r2 = e2.valueOf && e2.valueOf();
104
+ if (null != r2 && r2 !== e2) return s.from(r2, t4, n3);
105
+ var a = h(e2);
106
+ if (a) return a;
107
+ if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof e2[Symbol.toPrimitive]) return s.from(e2[Symbol.toPrimitive]("string"), t4, n3);
108
+ throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e2);
109
+ }
110
+ function c(e2) {
111
+ if ("number" != typeof e2) throw new TypeError('"size" argument must be of type number');
112
+ else if (0 > e2) throw new RangeError('The value "' + e2 + '" is invalid for option "size"');
113
+ }
114
+ function u(e2, t4, n3) {
115
+ return c(e2), 0 >= e2 ? d(e2) : void 0 === t4 ? d(e2) : "string" == typeof n3 ? d(e2).fill(t4, n3) : d(e2).fill(t4);
116
+ }
117
+ function p(e2) {
118
+ return c(e2), d(0 > e2 ? 0 : 0 | m(e2));
119
+ }
120
+ function f(e2, t4) {
121
+ if (("string" != typeof t4 || "" === t4) && (t4 = "utf8"), !s.isEncoding(t4)) throw new TypeError("Unknown encoding: " + t4);
122
+ var n3 = 0 | b(e2, t4), r2 = d(n3), a = r2.write(e2, t4);
123
+ return a !== n3 && (r2 = r2.slice(0, a)), r2;
124
+ }
125
+ function g(e2) {
126
+ for (var t4 = 0 > e2.length ? 0 : 0 | m(e2.length), n3 = d(t4), r2 = 0; r2 < t4; r2 += 1) n3[r2] = 255 & e2[r2];
127
+ return n3;
128
+ }
129
+ function _(e2, t4, n3) {
130
+ if (0 > t4 || e2.byteLength < t4) throw new RangeError('"offset" is outside of buffer bounds');
131
+ if (e2.byteLength < t4 + (n3 || 0)) throw new RangeError('"length" is outside of buffer bounds');
132
+ var r2;
133
+ return r2 = void 0 === t4 && void 0 === n3 ? new Uint8Array(e2) : void 0 === n3 ? new Uint8Array(e2, t4) : new Uint8Array(e2, t4, n3), r2.__proto__ = s.prototype, r2;
134
+ }
135
+ function h(e2) {
136
+ if (s.isBuffer(e2)) {
137
+ var t4 = 0 | m(e2.length), n3 = d(t4);
138
+ return 0 === n3.length ? n3 : (e2.copy(n3, 0, 0, t4), n3);
139
+ }
140
+ return void 0 === e2.length ? "Buffer" === e2.type && Array.isArray(e2.data) ? g(e2.data) : void 0 : "number" != typeof e2.length || X(e2.length) ? d(0) : g(e2);
141
+ }
142
+ function m(e2) {
143
+ if (e2 >= 2147483647) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + 2147483647 .toString(16) + " bytes");
144
+ return 0 | e2;
145
+ }
146
+ function b(e2, t4) {
147
+ if (s.isBuffer(e2)) return e2.length;
148
+ if (ArrayBuffer.isView(e2) || K(e2, ArrayBuffer)) return e2.byteLength;
149
+ if ("string" != typeof e2) throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e2);
150
+ var n3 = e2.length, r2 = 2 < arguments.length && true === arguments[2];
151
+ if (!r2 && 0 === n3) return 0;
152
+ for (var a = false; ; ) switch (t4) {
153
+ case "ascii":
154
+ case "latin1":
155
+ case "binary":
156
+ return n3;
157
+ case "utf8":
158
+ case "utf-8":
159
+ return H(e2).length;
160
+ case "ucs2":
161
+ case "ucs-2":
162
+ case "utf16le":
163
+ case "utf-16le":
164
+ return 2 * n3;
165
+ case "hex":
166
+ return n3 >>> 1;
167
+ case "base64":
168
+ return z(e2).length;
169
+ default:
170
+ if (a) return r2 ? -1 : H(e2).length;
171
+ t4 = ("" + t4).toLowerCase(), a = true;
172
+ }
173
+ }
174
+ function y(e2, t4, n3) {
175
+ var r2 = false;
176
+ if ((void 0 === t4 || 0 > t4) && (t4 = 0), t4 > this.length) return "";
177
+ if ((void 0 === n3 || n3 > this.length) && (n3 = this.length), 0 >= n3) return "";
178
+ if (n3 >>>= 0, t4 >>>= 0, n3 <= t4) return "";
179
+ for (e2 || (e2 = "utf8"); ; ) switch (e2) {
180
+ case "hex":
181
+ return P(this, t4, n3);
182
+ case "utf8":
183
+ case "utf-8":
184
+ return x(this, t4, n3);
185
+ case "ascii":
186
+ return D(this, t4, n3);
187
+ case "latin1":
188
+ case "binary":
189
+ return I(this, t4, n3);
190
+ case "base64":
191
+ return A(this, t4, n3);
192
+ case "ucs2":
193
+ case "ucs-2":
194
+ case "utf16le":
195
+ case "utf-16le":
196
+ return M(this, t4, n3);
197
+ default:
198
+ if (r2) throw new TypeError("Unknown encoding: " + e2);
199
+ e2 = (e2 + "").toLowerCase(), r2 = true;
200
+ }
201
+ }
202
+ function C(e2, t4, n3) {
203
+ var r2 = e2[t4];
204
+ e2[t4] = e2[n3], e2[n3] = r2;
205
+ }
206
+ function R(e2, t4, n3, r2, a) {
207
+ if (0 === e2.length) return -1;
208
+ if ("string" == typeof n3 ? (r2 = n3, n3 = 0) : 2147483647 < n3 ? n3 = 2147483647 : -2147483648 > n3 && (n3 = -2147483648), n3 = +n3, X(n3) && (n3 = a ? 0 : e2.length - 1), 0 > n3 && (n3 = e2.length + n3), n3 >= e2.length) {
209
+ if (a) return -1;
210
+ n3 = e2.length - 1;
211
+ } else if (0 > n3) if (a) n3 = 0;
212
+ else return -1;
213
+ if ("string" == typeof t4 && (t4 = s.from(t4, r2)), s.isBuffer(t4)) return 0 === t4.length ? -1 : E(e2, t4, n3, r2, a);
214
+ if ("number" == typeof t4) return t4 &= 255, "function" == typeof Uint8Array.prototype.indexOf ? a ? Uint8Array.prototype.indexOf.call(e2, t4, n3) : Uint8Array.prototype.lastIndexOf.call(e2, t4, n3) : E(e2, [t4], n3, r2, a);
215
+ throw new TypeError("val must be string, number or Buffer");
216
+ }
217
+ function E(e2, t4, n3, r2, a) {
218
+ function o2(e3, t5) {
219
+ return 1 === d2 ? e3[t5] : e3.readUInt16BE(t5 * d2);
220
+ }
221
+ var d2 = 1, s2 = e2.length, l2 = t4.length;
222
+ if (void 0 !== r2 && (r2 = (r2 + "").toLowerCase(), "ucs2" === r2 || "ucs-2" === r2 || "utf16le" === r2 || "utf-16le" === r2)) {
223
+ if (2 > e2.length || 2 > t4.length) return -1;
224
+ d2 = 2, s2 /= 2, l2 /= 2, n3 /= 2;
225
+ }
226
+ var c2;
227
+ if (a) {
228
+ var u2 = -1;
229
+ for (c2 = n3; c2 < s2; c2++) if (o2(e2, c2) !== o2(t4, -1 === u2 ? 0 : c2 - u2)) -1 !== u2 && (c2 -= c2 - u2), u2 = -1;
230
+ else if (-1 === u2 && (u2 = c2), c2 - u2 + 1 === l2) return u2 * d2;
231
+ } else for (n3 + l2 > s2 && (n3 = s2 - l2), c2 = n3; 0 <= c2; c2--) {
232
+ for (var p2 = true, f2 = 0; f2 < l2; f2++) if (o2(e2, c2 + f2) !== o2(t4, f2)) {
233
+ p2 = false;
234
+ break;
235
+ }
236
+ if (p2) return c2;
237
+ }
238
+ return -1;
239
+ }
240
+ function w(e2, t4, n3, r2) {
241
+ n3 = +n3 || 0;
242
+ var a = e2.length - n3;
243
+ r2 ? (r2 = +r2, r2 > a && (r2 = a)) : r2 = a;
244
+ var o2 = t4.length;
245
+ r2 > o2 / 2 && (r2 = o2 / 2);
246
+ for (var d2, s2 = 0; s2 < r2; ++s2) {
247
+ if (d2 = parseInt(t4.substr(2 * s2, 2), 16), X(d2)) return s2;
248
+ e2[n3 + s2] = d2;
249
+ }
250
+ return s2;
251
+ }
252
+ function S(e2, t4, n3, r2) {
253
+ return G(H(t4, e2.length - n3), e2, n3, r2);
254
+ }
255
+ function T(e2, t4, n3, r2) {
256
+ return G(Y(t4), e2, n3, r2);
257
+ }
258
+ function v(e2, t4, n3, r2) {
259
+ return T(e2, t4, n3, r2);
260
+ }
261
+ function k(e2, t4, n3, r2) {
262
+ return G(z(t4), e2, n3, r2);
263
+ }
264
+ function L(e2, t4, n3, r2) {
265
+ return G(V(t4, e2.length - n3), e2, n3, r2);
266
+ }
267
+ function A(e2, t4, n3) {
268
+ return 0 === t4 && n3 === e2.length ? $.fromByteArray(e2) : $.fromByteArray(e2.slice(t4, n3));
269
+ }
270
+ function x(e2, t4, n3) {
271
+ n3 = o(e2.length, n3);
272
+ for (var r2 = [], a = t4; a < n3; ) {
273
+ var d2 = e2[a], s2 = null, l2 = 239 < d2 ? 4 : 223 < d2 ? 3 : 191 < d2 ? 2 : 1;
274
+ if (a + l2 <= n3) {
275
+ var c2, u2, p2, f2;
276
+ 1 === l2 ? 128 > d2 && (s2 = d2) : 2 === l2 ? (c2 = e2[a + 1], 128 == (192 & c2) && (f2 = (31 & d2) << 6 | 63 & c2, 127 < f2 && (s2 = f2))) : 3 === l2 ? (c2 = e2[a + 1], u2 = e2[a + 2], 128 == (192 & c2) && 128 == (192 & u2) && (f2 = (15 & d2) << 12 | (63 & c2) << 6 | 63 & u2, 2047 < f2 && (55296 > f2 || 57343 < f2) && (s2 = f2))) : 4 === l2 ? (c2 = e2[a + 1], u2 = e2[a + 2], p2 = e2[a + 3], 128 == (192 & c2) && 128 == (192 & u2) && 128 == (192 & p2) && (f2 = (15 & d2) << 18 | (63 & c2) << 12 | (63 & u2) << 6 | 63 & p2, 65535 < f2 && 1114112 > f2 && (s2 = f2))) : void 0;
277
+ }
278
+ null === s2 ? (s2 = 65533, l2 = 1) : 65535 < s2 && (s2 -= 65536, r2.push(55296 | 1023 & s2 >>> 10), s2 = 56320 | 1023 & s2), r2.push(s2), a += l2;
279
+ }
280
+ return N(r2);
281
+ }
282
+ function N(e2) {
283
+ var n3 = e2.length;
284
+ if (n3 <= 4096) return t3.apply(String, e2);
285
+ for (var r2 = "", a = 0; a < n3; ) r2 += t3.apply(String, e2.slice(a, a += 4096));
286
+ return r2;
287
+ }
288
+ function D(e2, n3, r2) {
289
+ var a = "";
290
+ r2 = o(e2.length, r2);
291
+ for (var d2 = n3; d2 < r2; ++d2) a += t3(127 & e2[d2]);
292
+ return a;
293
+ }
294
+ function I(e2, n3, r2) {
295
+ var a = "";
296
+ r2 = o(e2.length, r2);
297
+ for (var d2 = n3; d2 < r2; ++d2) a += t3(e2[d2]);
298
+ return a;
299
+ }
300
+ function P(e2, t4, n3) {
301
+ var r2 = e2.length;
302
+ (!t4 || 0 > t4) && (t4 = 0), (!n3 || 0 > n3 || n3 > r2) && (n3 = r2);
303
+ for (var a = "", o2 = t4; o2 < n3; ++o2) a += W(e2[o2]);
304
+ return a;
305
+ }
306
+ function M(e2, n3, r2) {
307
+ for (var a = e2.slice(n3, r2), o2 = "", d2 = 0; d2 < a.length; d2 += 2) o2 += t3(a[d2] + 256 * a[d2 + 1]);
308
+ return o2;
309
+ }
310
+ function O(e2, t4, n3) {
311
+ if (0 != e2 % 1 || 0 > e2) throw new RangeError("offset is not uint");
312
+ if (e2 + t4 > n3) throw new RangeError("Trying to access beyond buffer length");
313
+ }
314
+ function F(e2, t4, n3, r2, a, o2) {
315
+ if (!s.isBuffer(e2)) throw new TypeError('"buffer" argument must be a Buffer instance');
316
+ if (t4 > a || t4 < o2) throw new RangeError('"value" argument is out of bounds');
317
+ if (n3 + r2 > e2.length) throw new RangeError("Index out of range");
318
+ }
319
+ function B(e2, t4, n3, r2) {
320
+ if (n3 + r2 > e2.length) throw new RangeError("Index out of range");
321
+ if (0 > n3) throw new RangeError("Index out of range");
322
+ }
323
+ function U(e2, t4, n3, r2, a) {
324
+ return t4 = +t4, n3 >>>= 0, a || B(e2, t4, n3, 4, 34028234663852886e22, -34028234663852886e22), J.write(e2, t4, n3, r2, 23, 4), n3 + 4;
325
+ }
326
+ function j(e2, t4, n3, r2, a) {
327
+ return t4 = +t4, n3 >>>= 0, a || B(e2, t4, n3, 8, 17976931348623157e292, -17976931348623157e292), J.write(e2, t4, n3, r2, 52, 8), n3 + 8;
328
+ }
329
+ function q(e2) {
330
+ if (e2 = e2.split("=")[0], e2 = e2.trim().replace(Q, ""), 2 > e2.length) return "";
331
+ for (; 0 != e2.length % 4; ) e2 += "=";
332
+ return e2;
333
+ }
334
+ function W(e2) {
335
+ return 16 > e2 ? "0" + e2.toString(16) : e2.toString(16);
336
+ }
337
+ function H(e2, t4) {
338
+ t4 = t4 || 1 / 0;
339
+ for (var n3, r2 = e2.length, a = null, o2 = [], d2 = 0; d2 < r2; ++d2) {
340
+ if (n3 = e2.charCodeAt(d2), 55295 < n3 && 57344 > n3) {
341
+ if (!a) {
342
+ if (56319 < n3) {
343
+ -1 < (t4 -= 3) && o2.push(239, 191, 189);
344
+ continue;
345
+ } else if (d2 + 1 === r2) {
346
+ -1 < (t4 -= 3) && o2.push(239, 191, 189);
347
+ continue;
348
+ }
349
+ a = n3;
350
+ continue;
351
+ }
352
+ if (56320 > n3) {
353
+ -1 < (t4 -= 3) && o2.push(239, 191, 189), a = n3;
354
+ continue;
355
+ }
356
+ n3 = (a - 55296 << 10 | n3 - 56320) + 65536;
357
+ } else a && -1 < (t4 -= 3) && o2.push(239, 191, 189);
358
+ if (a = null, 128 > n3) {
359
+ if (0 > (t4 -= 1)) break;
360
+ o2.push(n3);
361
+ } else if (2048 > n3) {
362
+ if (0 > (t4 -= 2)) break;
363
+ o2.push(192 | n3 >> 6, 128 | 63 & n3);
364
+ } else if (65536 > n3) {
365
+ if (0 > (t4 -= 3)) break;
366
+ o2.push(224 | n3 >> 12, 128 | 63 & n3 >> 6, 128 | 63 & n3);
367
+ } else if (1114112 > n3) {
368
+ if (0 > (t4 -= 4)) break;
369
+ o2.push(240 | n3 >> 18, 128 | 63 & n3 >> 12, 128 | 63 & n3 >> 6, 128 | 63 & n3);
370
+ } else throw new Error("Invalid code point");
371
+ }
372
+ return o2;
373
+ }
374
+ function Y(e2) {
375
+ for (var t4 = [], n3 = 0; n3 < e2.length; ++n3) t4.push(255 & e2.charCodeAt(n3));
376
+ return t4;
377
+ }
378
+ function V(e2, t4) {
379
+ for (var n3, r2, a, o2 = [], d2 = 0; d2 < e2.length && !(0 > (t4 -= 2)); ++d2) n3 = e2.charCodeAt(d2), r2 = n3 >> 8, a = n3 % 256, o2.push(a), o2.push(r2);
380
+ return o2;
381
+ }
382
+ function z(e2) {
383
+ return $.toByteArray(q(e2));
384
+ }
385
+ function G(e2, t4, n3, r2) {
386
+ for (var a = 0; a < r2 && !(a + n3 >= t4.length || a >= e2.length); ++a) t4[a + n3] = e2[a];
387
+ return a;
388
+ }
389
+ function K(e2, t4) {
390
+ return e2 instanceof t4 || null != e2 && null != e2.constructor && null != e2.constructor.name && e2.constructor.name === t4.name;
391
+ }
392
+ function X(e2) {
393
+ return e2 !== e2;
394
+ }
395
+ var $ = e("base64-js"), J = e("ieee754");
396
+ n2.Buffer = s, n2.SlowBuffer = function(e2) {
397
+ return +e2 != e2 && (e2 = 0), s.alloc(+e2);
398
+ }, n2.INSPECT_MAX_BYTES = 50;
399
+ n2.kMaxLength = 2147483647, s.TYPED_ARRAY_SUPPORT = function() {
400
+ try {
401
+ var e2 = new Uint8Array(1);
402
+ return e2.__proto__ = { __proto__: Uint8Array.prototype, foo: function() {
403
+ return 42;
404
+ } }, 42 === e2.foo();
405
+ } catch (t4) {
406
+ return false;
407
+ }
408
+ }(), s.TYPED_ARRAY_SUPPORT || "undefined" == typeof console || "function" != typeof console.error || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), Object.defineProperty(s.prototype, "parent", { enumerable: true, get: function() {
409
+ return s.isBuffer(this) ? this.buffer : void 0;
410
+ } }), Object.defineProperty(s.prototype, "offset", { enumerable: true, get: function() {
411
+ return s.isBuffer(this) ? this.byteOffset : void 0;
412
+ } }), "undefined" != typeof Symbol && null != Symbol.species && s[Symbol.species] === s && Object.defineProperty(s, Symbol.species, { value: null, configurable: true, enumerable: false, writable: false }), s.poolSize = 8192, s.from = function(e2, t4, n3) {
413
+ return l(e2, t4, n3);
414
+ }, s.prototype.__proto__ = Uint8Array.prototype, s.__proto__ = Uint8Array, s.alloc = function(e2, t4, n3) {
415
+ return u(e2, t4, n3);
416
+ }, s.allocUnsafe = function(e2) {
417
+ return p(e2);
418
+ }, s.allocUnsafeSlow = function(e2) {
419
+ return p(e2);
420
+ }, s.isBuffer = function(e2) {
421
+ return null != e2 && true === e2._isBuffer && e2 !== s.prototype;
422
+ }, s.compare = function(e2, t4) {
423
+ if (K(e2, Uint8Array) && (e2 = s.from(e2, e2.offset, e2.byteLength)), K(t4, Uint8Array) && (t4 = s.from(t4, t4.offset, t4.byteLength)), !s.isBuffer(e2) || !s.isBuffer(t4)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
424
+ if (e2 === t4) return 0;
425
+ for (var n3 = e2.length, r2 = t4.length, d2 = 0, l2 = o(n3, r2); d2 < l2; ++d2) if (e2[d2] !== t4[d2]) {
426
+ n3 = e2[d2], r2 = t4[d2];
427
+ break;
428
+ }
429
+ return n3 < r2 ? -1 : r2 < n3 ? 1 : 0;
430
+ }, s.isEncoding = function(e2) {
431
+ switch ((e2 + "").toLowerCase()) {
432
+ case "hex":
433
+ case "utf8":
434
+ case "utf-8":
435
+ case "ascii":
436
+ case "latin1":
437
+ case "binary":
438
+ case "base64":
439
+ case "ucs2":
440
+ case "ucs-2":
441
+ case "utf16le":
442
+ case "utf-16le":
443
+ return true;
444
+ default:
445
+ return false;
446
+ }
447
+ }, s.concat = function(e2, t4) {
448
+ if (!Array.isArray(e2)) throw new TypeError('"list" argument must be an Array of Buffers');
449
+ if (0 === e2.length) return s.alloc(0);
450
+ var n3;
451
+ if (t4 === void 0) for (t4 = 0, n3 = 0; n3 < e2.length; ++n3) t4 += e2[n3].length;
452
+ var r2 = s.allocUnsafe(t4), a = 0;
453
+ for (n3 = 0; n3 < e2.length; ++n3) {
454
+ var o2 = e2[n3];
455
+ if (K(o2, Uint8Array) && (o2 = s.from(o2)), !s.isBuffer(o2)) throw new TypeError('"list" argument must be an Array of Buffers');
456
+ o2.copy(r2, a), a += o2.length;
457
+ }
458
+ return r2;
459
+ }, s.byteLength = b, s.prototype._isBuffer = true, s.prototype.swap16 = function() {
460
+ var e2 = this.length;
461
+ if (0 != e2 % 2) throw new RangeError("Buffer size must be a multiple of 16-bits");
462
+ for (var t4 = 0; t4 < e2; t4 += 2) C(this, t4, t4 + 1);
463
+ return this;
464
+ }, s.prototype.swap32 = function() {
465
+ var e2 = this.length;
466
+ if (0 != e2 % 4) throw new RangeError("Buffer size must be a multiple of 32-bits");
467
+ for (var t4 = 0; t4 < e2; t4 += 4) C(this, t4, t4 + 3), C(this, t4 + 1, t4 + 2);
468
+ return this;
469
+ }, s.prototype.swap64 = function() {
470
+ var e2 = this.length;
471
+ if (0 != e2 % 8) throw new RangeError("Buffer size must be a multiple of 64-bits");
472
+ for (var t4 = 0; t4 < e2; t4 += 8) C(this, t4, t4 + 7), C(this, t4 + 1, t4 + 6), C(this, t4 + 2, t4 + 5), C(this, t4 + 3, t4 + 4);
473
+ return this;
474
+ }, s.prototype.toString = function() {
475
+ var e2 = this.length;
476
+ return 0 === e2 ? "" : 0 === arguments.length ? x(this, 0, e2) : y.apply(this, arguments);
477
+ }, s.prototype.toLocaleString = s.prototype.toString, s.prototype.equals = function(e2) {
478
+ if (!s.isBuffer(e2)) throw new TypeError("Argument must be a Buffer");
479
+ return this === e2 || 0 === s.compare(this, e2);
480
+ }, s.prototype.inspect = function() {
481
+ var e2 = "", t4 = n2.INSPECT_MAX_BYTES;
482
+ return e2 = this.toString("hex", 0, t4).replace(/(.{2})/g, "$1 ").trim(), this.length > t4 && (e2 += " ... "), "<Buffer " + e2 + ">";
483
+ }, s.prototype.compare = function(e2, t4, n3, r2, a) {
484
+ if (K(e2, Uint8Array) && (e2 = s.from(e2, e2.offset, e2.byteLength)), !s.isBuffer(e2)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e2);
485
+ if (void 0 === t4 && (t4 = 0), void 0 === n3 && (n3 = e2 ? e2.length : 0), void 0 === r2 && (r2 = 0), void 0 === a && (a = this.length), 0 > t4 || n3 > e2.length || 0 > r2 || a > this.length) throw new RangeError("out of range index");
486
+ if (r2 >= a && t4 >= n3) return 0;
487
+ if (r2 >= a) return -1;
488
+ if (t4 >= n3) return 1;
489
+ if (t4 >>>= 0, n3 >>>= 0, r2 >>>= 0, a >>>= 0, this === e2) return 0;
490
+ for (var d2 = a - r2, l2 = n3 - t4, c2 = o(d2, l2), u2 = this.slice(r2, a), p2 = e2.slice(t4, n3), f2 = 0; f2 < c2; ++f2) if (u2[f2] !== p2[f2]) {
491
+ d2 = u2[f2], l2 = p2[f2];
492
+ break;
493
+ }
494
+ return d2 < l2 ? -1 : l2 < d2 ? 1 : 0;
495
+ }, s.prototype.includes = function(e2, t4, n3) {
496
+ return -1 !== this.indexOf(e2, t4, n3);
497
+ }, s.prototype.indexOf = function(e2, t4, n3) {
498
+ return R(this, e2, t4, n3, true);
499
+ }, s.prototype.lastIndexOf = function(e2, t4, n3) {
500
+ return R(this, e2, t4, n3, false);
501
+ }, s.prototype.write = function(e2, t4, n3, r2) {
502
+ if (void 0 === t4) r2 = "utf8", n3 = this.length, t4 = 0;
503
+ else if (void 0 === n3 && "string" == typeof t4) r2 = t4, n3 = this.length, t4 = 0;
504
+ else if (isFinite(t4)) t4 >>>= 0, isFinite(n3) ? (n3 >>>= 0, void 0 === r2 && (r2 = "utf8")) : (r2 = n3, n3 = void 0);
505
+ else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
506
+ var a = this.length - t4;
507
+ if ((void 0 === n3 || n3 > a) && (n3 = a), 0 < e2.length && (0 > n3 || 0 > t4) || t4 > this.length) throw new RangeError("Attempt to write outside buffer bounds");
508
+ r2 || (r2 = "utf8");
509
+ for (var o2 = false; ; ) switch (r2) {
510
+ case "hex":
511
+ return w(this, e2, t4, n3);
512
+ case "utf8":
513
+ case "utf-8":
514
+ return S(this, e2, t4, n3);
515
+ case "ascii":
516
+ return T(this, e2, t4, n3);
517
+ case "latin1":
518
+ case "binary":
519
+ return v(this, e2, t4, n3);
520
+ case "base64":
521
+ return k(this, e2, t4, n3);
522
+ case "ucs2":
523
+ case "ucs-2":
524
+ case "utf16le":
525
+ case "utf-16le":
526
+ return L(this, e2, t4, n3);
527
+ default:
528
+ if (o2) throw new TypeError("Unknown encoding: " + r2);
529
+ r2 = ("" + r2).toLowerCase(), o2 = true;
530
+ }
531
+ }, s.prototype.toJSON = function() {
532
+ return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) };
533
+ };
534
+ s.prototype.slice = function(e2, t4) {
535
+ var n3 = this.length;
536
+ e2 = ~~e2, t4 = t4 === void 0 ? n3 : ~~t4, 0 > e2 ? (e2 += n3, 0 > e2 && (e2 = 0)) : e2 > n3 && (e2 = n3), 0 > t4 ? (t4 += n3, 0 > t4 && (t4 = 0)) : t4 > n3 && (t4 = n3), t4 < e2 && (t4 = e2);
537
+ var r2 = this.subarray(e2, t4);
538
+ return r2.__proto__ = s.prototype, r2;
539
+ }, s.prototype.readUIntLE = function(e2, t4, n3) {
540
+ e2 >>>= 0, t4 >>>= 0, n3 || O(e2, t4, this.length);
541
+ for (var r2 = this[e2], a = 1, o2 = 0; ++o2 < t4 && (a *= 256); ) r2 += this[e2 + o2] * a;
542
+ return r2;
543
+ }, s.prototype.readUIntBE = function(e2, t4, n3) {
544
+ e2 >>>= 0, t4 >>>= 0, n3 || O(e2, t4, this.length);
545
+ for (var r2 = this[e2 + --t4], a = 1; 0 < t4 && (a *= 256); ) r2 += this[e2 + --t4] * a;
546
+ return r2;
547
+ }, s.prototype.readUInt8 = function(e2, t4) {
548
+ return e2 >>>= 0, t4 || O(e2, 1, this.length), this[e2];
549
+ }, s.prototype.readUInt16LE = function(e2, t4) {
550
+ return e2 >>>= 0, t4 || O(e2, 2, this.length), this[e2] | this[e2 + 1] << 8;
551
+ }, s.prototype.readUInt16BE = function(e2, t4) {
552
+ return e2 >>>= 0, t4 || O(e2, 2, this.length), this[e2] << 8 | this[e2 + 1];
553
+ }, s.prototype.readUInt32LE = function(e2, t4) {
554
+ return e2 >>>= 0, t4 || O(e2, 4, this.length), (this[e2] | this[e2 + 1] << 8 | this[e2 + 2] << 16) + 16777216 * this[e2 + 3];
555
+ }, s.prototype.readUInt32BE = function(e2, t4) {
556
+ return e2 >>>= 0, t4 || O(e2, 4, this.length), 16777216 * this[e2] + (this[e2 + 1] << 16 | this[e2 + 2] << 8 | this[e2 + 3]);
557
+ }, s.prototype.readIntLE = function(e2, t4, n3) {
558
+ e2 >>>= 0, t4 >>>= 0, n3 || O(e2, t4, this.length);
559
+ for (var a = this[e2], o2 = 1, d2 = 0; ++d2 < t4 && (o2 *= 256); ) a += this[e2 + d2] * o2;
560
+ return o2 *= 128, a >= o2 && (a -= r(2, 8 * t4)), a;
561
+ }, s.prototype.readIntBE = function(e2, t4, n3) {
562
+ e2 >>>= 0, t4 >>>= 0, n3 || O(e2, t4, this.length);
563
+ for (var a = t4, o2 = 1, d2 = this[e2 + --a]; 0 < a && (o2 *= 256); ) d2 += this[e2 + --a] * o2;
564
+ return o2 *= 128, d2 >= o2 && (d2 -= r(2, 8 * t4)), d2;
565
+ }, s.prototype.readInt8 = function(e2, t4) {
566
+ return e2 >>>= 0, t4 || O(e2, 1, this.length), 128 & this[e2] ? -1 * (255 - this[e2] + 1) : this[e2];
567
+ }, s.prototype.readInt16LE = function(e2, t4) {
568
+ e2 >>>= 0, t4 || O(e2, 2, this.length);
569
+ var n3 = this[e2] | this[e2 + 1] << 8;
570
+ return 32768 & n3 ? 4294901760 | n3 : n3;
571
+ }, s.prototype.readInt16BE = function(e2, t4) {
572
+ e2 >>>= 0, t4 || O(e2, 2, this.length);
573
+ var n3 = this[e2 + 1] | this[e2] << 8;
574
+ return 32768 & n3 ? 4294901760 | n3 : n3;
575
+ }, s.prototype.readInt32LE = function(e2, t4) {
576
+ return e2 >>>= 0, t4 || O(e2, 4, this.length), this[e2] | this[e2 + 1] << 8 | this[e2 + 2] << 16 | this[e2 + 3] << 24;
577
+ }, s.prototype.readInt32BE = function(e2, t4) {
578
+ return e2 >>>= 0, t4 || O(e2, 4, this.length), this[e2] << 24 | this[e2 + 1] << 16 | this[e2 + 2] << 8 | this[e2 + 3];
579
+ }, s.prototype.readFloatLE = function(e2, t4) {
580
+ return e2 >>>= 0, t4 || O(e2, 4, this.length), J.read(this, e2, true, 23, 4);
581
+ }, s.prototype.readFloatBE = function(e2, t4) {
582
+ return e2 >>>= 0, t4 || O(e2, 4, this.length), J.read(this, e2, false, 23, 4);
583
+ }, s.prototype.readDoubleLE = function(e2, t4) {
584
+ return e2 >>>= 0, t4 || O(e2, 8, this.length), J.read(this, e2, true, 52, 8);
585
+ }, s.prototype.readDoubleBE = function(e2, t4) {
586
+ return e2 >>>= 0, t4 || O(e2, 8, this.length), J.read(this, e2, false, 52, 8);
587
+ }, s.prototype.writeUIntLE = function(e2, t4, n3, a) {
588
+ if (e2 = +e2, t4 >>>= 0, n3 >>>= 0, !a) {
589
+ var o2 = r(2, 8 * n3) - 1;
590
+ F(this, e2, t4, n3, o2, 0);
591
+ }
592
+ var d2 = 1, s2 = 0;
593
+ for (this[t4] = 255 & e2; ++s2 < n3 && (d2 *= 256); ) this[t4 + s2] = 255 & e2 / d2;
594
+ return t4 + n3;
595
+ }, s.prototype.writeUIntBE = function(e2, t4, n3, a) {
596
+ if (e2 = +e2, t4 >>>= 0, n3 >>>= 0, !a) {
597
+ var o2 = r(2, 8 * n3) - 1;
598
+ F(this, e2, t4, n3, o2, 0);
599
+ }
600
+ var d2 = n3 - 1, s2 = 1;
601
+ for (this[t4 + d2] = 255 & e2; 0 <= --d2 && (s2 *= 256); ) this[t4 + d2] = 255 & e2 / s2;
602
+ return t4 + n3;
603
+ }, s.prototype.writeUInt8 = function(e2, t4, n3) {
604
+ return e2 = +e2, t4 >>>= 0, n3 || F(this, e2, t4, 1, 255, 0), this[t4] = 255 & e2, t4 + 1;
605
+ }, s.prototype.writeUInt16LE = function(e2, t4, n3) {
606
+ return e2 = +e2, t4 >>>= 0, n3 || F(this, e2, t4, 2, 65535, 0), this[t4] = 255 & e2, this[t4 + 1] = e2 >>> 8, t4 + 2;
607
+ }, s.prototype.writeUInt16BE = function(e2, t4, n3) {
608
+ return e2 = +e2, t4 >>>= 0, n3 || F(this, e2, t4, 2, 65535, 0), this[t4] = e2 >>> 8, this[t4 + 1] = 255 & e2, t4 + 2;
609
+ }, s.prototype.writeUInt32LE = function(e2, t4, n3) {
610
+ return e2 = +e2, t4 >>>= 0, n3 || F(this, e2, t4, 4, 4294967295, 0), this[t4 + 3] = e2 >>> 24, this[t4 + 2] = e2 >>> 16, this[t4 + 1] = e2 >>> 8, this[t4] = 255 & e2, t4 + 4;
611
+ }, s.prototype.writeUInt32BE = function(e2, t4, n3) {
612
+ return e2 = +e2, t4 >>>= 0, n3 || F(this, e2, t4, 4, 4294967295, 0), this[t4] = e2 >>> 24, this[t4 + 1] = e2 >>> 16, this[t4 + 2] = e2 >>> 8, this[t4 + 3] = 255 & e2, t4 + 4;
613
+ }, s.prototype.writeIntLE = function(e2, t4, n3, a) {
614
+ if (e2 = +e2, t4 >>>= 0, !a) {
615
+ var o2 = r(2, 8 * n3 - 1);
616
+ F(this, e2, t4, n3, o2 - 1, -o2);
617
+ }
618
+ var d2 = 0, s2 = 1, l2 = 0;
619
+ for (this[t4] = 255 & e2; ++d2 < n3 && (s2 *= 256); ) 0 > e2 && 0 === l2 && 0 !== this[t4 + d2 - 1] && (l2 = 1), this[t4 + d2] = 255 & (e2 / s2 >> 0) - l2;
620
+ return t4 + n3;
621
+ }, s.prototype.writeIntBE = function(e2, t4, n3, a) {
622
+ if (e2 = +e2, t4 >>>= 0, !a) {
623
+ var o2 = r(2, 8 * n3 - 1);
624
+ F(this, e2, t4, n3, o2 - 1, -o2);
625
+ }
626
+ var d2 = n3 - 1, s2 = 1, l2 = 0;
627
+ for (this[t4 + d2] = 255 & e2; 0 <= --d2 && (s2 *= 256); ) 0 > e2 && 0 === l2 && 0 !== this[t4 + d2 + 1] && (l2 = 1), this[t4 + d2] = 255 & (e2 / s2 >> 0) - l2;
628
+ return t4 + n3;
629
+ }, s.prototype.writeInt8 = function(e2, t4, n3) {
630
+ return e2 = +e2, t4 >>>= 0, n3 || F(this, e2, t4, 1, 127, -128), 0 > e2 && (e2 = 255 + e2 + 1), this[t4] = 255 & e2, t4 + 1;
631
+ }, s.prototype.writeInt16LE = function(e2, t4, n3) {
632
+ return e2 = +e2, t4 >>>= 0, n3 || F(this, e2, t4, 2, 32767, -32768), this[t4] = 255 & e2, this[t4 + 1] = e2 >>> 8, t4 + 2;
633
+ }, s.prototype.writeInt16BE = function(e2, t4, n3) {
634
+ return e2 = +e2, t4 >>>= 0, n3 || F(this, e2, t4, 2, 32767, -32768), this[t4] = e2 >>> 8, this[t4 + 1] = 255 & e2, t4 + 2;
635
+ }, s.prototype.writeInt32LE = function(e2, t4, n3) {
636
+ return e2 = +e2, t4 >>>= 0, n3 || F(this, e2, t4, 4, 2147483647, -2147483648), this[t4] = 255 & e2, this[t4 + 1] = e2 >>> 8, this[t4 + 2] = e2 >>> 16, this[t4 + 3] = e2 >>> 24, t4 + 4;
637
+ }, s.prototype.writeInt32BE = function(e2, t4, n3) {
638
+ return e2 = +e2, t4 >>>= 0, n3 || F(this, e2, t4, 4, 2147483647, -2147483648), 0 > e2 && (e2 = 4294967295 + e2 + 1), this[t4] = e2 >>> 24, this[t4 + 1] = e2 >>> 16, this[t4 + 2] = e2 >>> 8, this[t4 + 3] = 255 & e2, t4 + 4;
639
+ }, s.prototype.writeFloatLE = function(e2, t4, n3) {
640
+ return U(this, e2, t4, true, n3);
641
+ }, s.prototype.writeFloatBE = function(e2, t4, n3) {
642
+ return U(this, e2, t4, false, n3);
643
+ }, s.prototype.writeDoubleLE = function(e2, t4, n3) {
644
+ return j(this, e2, t4, true, n3);
645
+ }, s.prototype.writeDoubleBE = function(e2, t4, n3) {
646
+ return j(this, e2, t4, false, n3);
647
+ }, s.prototype.copy = function(e2, t4, n3, r2) {
648
+ if (!s.isBuffer(e2)) throw new TypeError("argument should be a Buffer");
649
+ if (n3 || (n3 = 0), r2 || 0 === r2 || (r2 = this.length), t4 >= e2.length && (t4 = e2.length), t4 || (t4 = 0), 0 < r2 && r2 < n3 && (r2 = n3), r2 === n3) return 0;
650
+ if (0 === e2.length || 0 === this.length) return 0;
651
+ if (0 > t4) throw new RangeError("targetStart out of bounds");
652
+ if (0 > n3 || n3 >= this.length) throw new RangeError("Index out of range");
653
+ if (0 > r2) throw new RangeError("sourceEnd out of bounds");
654
+ r2 > this.length && (r2 = this.length), e2.length - t4 < r2 - n3 && (r2 = e2.length - t4 + n3);
655
+ var a = r2 - n3;
656
+ if (this === e2 && "function" == typeof Uint8Array.prototype.copyWithin) this.copyWithin(t4, n3, r2);
657
+ else if (this === e2 && n3 < t4 && t4 < r2) for (var o2 = a - 1; 0 <= o2; --o2) e2[o2 + t4] = this[o2 + n3];
658
+ else Uint8Array.prototype.set.call(e2, this.subarray(n3, r2), t4);
659
+ return a;
660
+ }, s.prototype.fill = function(e2, t4, n3, r2) {
661
+ if ("string" == typeof e2) {
662
+ if ("string" == typeof t4 ? (r2 = t4, t4 = 0, n3 = this.length) : "string" == typeof n3 && (r2 = n3, n3 = this.length), void 0 !== r2 && "string" != typeof r2) throw new TypeError("encoding must be a string");
663
+ if ("string" == typeof r2 && !s.isEncoding(r2)) throw new TypeError("Unknown encoding: " + r2);
664
+ if (1 === e2.length) {
665
+ var a = e2.charCodeAt(0);
666
+ ("utf8" === r2 && 128 > a || "latin1" === r2) && (e2 = a);
667
+ }
668
+ } else "number" == typeof e2 && (e2 &= 255);
669
+ if (0 > t4 || this.length < t4 || this.length < n3) throw new RangeError("Out of range index");
670
+ if (n3 <= t4) return this;
671
+ t4 >>>= 0, n3 = n3 === void 0 ? this.length : n3 >>> 0, e2 || (e2 = 0);
672
+ var o2;
673
+ if ("number" == typeof e2) for (o2 = t4; o2 < n3; ++o2) this[o2] = e2;
674
+ else {
675
+ var d2 = s.isBuffer(e2) ? e2 : s.from(e2, r2), l2 = d2.length;
676
+ if (0 === l2) throw new TypeError('The value "' + e2 + '" is invalid for argument "value"');
677
+ for (o2 = 0; o2 < n3 - t4; ++o2) this[o2 + t4] = d2[o2 % l2];
678
+ }
679
+ return this;
680
+ };
681
+ var Q = /[^+/0-9A-Za-z-_]/g;
682
+ }).call(this);
683
+ }).call(this, e("buffer").Buffer);
684
+ }, { "base64-js": 1, buffer: 3, ieee754: 9 }], 4: [function(e, t2, n2) {
685
+ (function(a) {
686
+ (function() {
687
+ function r2() {
688
+ let e2;
689
+ try {
690
+ e2 = n2.storage.getItem("debug");
691
+ } catch (e3) {
692
+ }
693
+ return !e2 && "undefined" != typeof a && "env" in a && (e2 = a.env.DEBUG), e2;
694
+ }
695
+ n2.formatArgs = function(e2) {
696
+ if (e2[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + e2[0] + (this.useColors ? "%c " : " ") + "+" + t2.exports.humanize(this.diff), !this.useColors) return;
697
+ const n3 = "color: " + this.color;
698
+ e2.splice(1, 0, n3, "color: inherit");
699
+ let r3 = 0, a2 = 0;
700
+ e2[0].replace(/%[a-zA-Z%]/g, (e3) => {
701
+ "%%" === e3 || (r3++, "%c" === e3 && (a2 = r3));
702
+ }), e2.splice(a2, 0, n3);
703
+ }, n2.save = function(e2) {
704
+ try {
705
+ e2 ? n2.storage.setItem("debug", e2) : n2.storage.removeItem("debug");
706
+ } catch (e3) {
707
+ }
708
+ }, n2.load = r2, n2.useColors = function() {
709
+ return !!("undefined" != typeof window && window.process && ("renderer" === window.process.type || window.process.__nwjs)) || !("undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) && ("undefined" != typeof document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || "undefined" != typeof window && window.console && (window.console.firebug || window.console.exception && window.console.table) || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && 31 <= parseInt(RegExp.$1, 10) || "undefined" != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
710
+ }, n2.storage = function() {
711
+ try {
712
+ return localStorage;
713
+ } catch (e2) {
714
+ }
715
+ }(), n2.destroy = /* @__PURE__ */ (() => {
716
+ let e2 = false;
717
+ return () => {
718
+ e2 || (e2 = true, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
719
+ };
720
+ })(), n2.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33"], n2.log = console.debug || console.log || (() => {
721
+ }), t2.exports = e("./common")(n2);
722
+ const { formatters: o } = t2.exports;
723
+ o.j = function(e2) {
724
+ try {
725
+ return JSON.stringify(e2);
726
+ } catch (e3) {
727
+ return "[UnexpectedJSONParseError]: " + e3.message;
728
+ }
729
+ };
730
+ }).call(this);
731
+ }).call(this, e("_process"));
732
+ }, { "./common": 5, _process: 12 }], 5: [function(e, t2) {
733
+ t2.exports = function(t3) {
734
+ function r2(e2) {
735
+ function t4(...e3) {
736
+ if (!t4.enabled) return;
737
+ const a2 = t4, o3 = +/* @__PURE__ */ new Date(), i = o3 - (n2 || o3);
738
+ a2.diff = i, a2.prev = n2, a2.curr = o3, n2 = o3, e3[0] = r2.coerce(e3[0]), "string" != typeof e3[0] && e3.unshift("%O");
739
+ let d = 0;
740
+ e3[0] = e3[0].replace(/%([a-zA-Z%])/g, (t5, n3) => {
741
+ if ("%%" === t5) return "%";
742
+ d++;
743
+ const o4 = r2.formatters[n3];
744
+ if ("function" == typeof o4) {
745
+ const n4 = e3[d];
746
+ t5 = o4.call(a2, n4), e3.splice(d, 1), d--;
747
+ }
748
+ return t5;
749
+ }), r2.formatArgs.call(a2, e3);
750
+ const s = a2.log || r2.log;
751
+ s.apply(a2, e3);
752
+ }
753
+ let n2, o2 = null;
754
+ return t4.namespace = e2, t4.useColors = r2.useColors(), t4.color = r2.selectColor(e2), t4.extend = a, t4.destroy = r2.destroy, Object.defineProperty(t4, "enabled", { enumerable: true, configurable: false, get: () => null === o2 ? r2.enabled(e2) : o2, set: (e3) => {
755
+ o2 = e3;
756
+ } }), "function" == typeof r2.init && r2.init(t4), t4;
757
+ }
758
+ function a(e2, t4) {
759
+ const n2 = r2(this.namespace + ("undefined" == typeof t4 ? ":" : t4) + e2);
760
+ return n2.log = this.log, n2;
761
+ }
762
+ function o(e2) {
763
+ return e2.toString().substring(2, e2.toString().length - 2).replace(/\.\*\?$/, "*");
764
+ }
765
+ return r2.debug = r2, r2.default = r2, r2.coerce = function(e2) {
766
+ return e2 instanceof Error ? e2.stack || e2.message : e2;
767
+ }, r2.disable = function() {
768
+ const e2 = [...r2.names.map(o), ...r2.skips.map(o).map((e3) => "-" + e3)].join(",");
769
+ return r2.enable(""), e2;
770
+ }, r2.enable = function(e2) {
771
+ r2.save(e2), r2.names = [], r2.skips = [];
772
+ let t4;
773
+ const n2 = ("string" == typeof e2 ? e2 : "").split(/[\s,]+/), a2 = n2.length;
774
+ for (t4 = 0; t4 < a2; t4++) n2[t4] && (e2 = n2[t4].replace(/\*/g, ".*?"), "-" === e2[0] ? r2.skips.push(new RegExp("^" + e2.substr(1) + "$")) : r2.names.push(new RegExp("^" + e2 + "$")));
775
+ }, r2.enabled = function(e2) {
776
+ if ("*" === e2[e2.length - 1]) return true;
777
+ let t4, n2;
778
+ for (t4 = 0, n2 = r2.skips.length; t4 < n2; t4++) if (r2.skips[t4].test(e2)) return false;
779
+ for (t4 = 0, n2 = r2.names.length; t4 < n2; t4++) if (r2.names[t4].test(e2)) return true;
780
+ return false;
781
+ }, r2.humanize = e("ms"), r2.destroy = function() {
782
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
783
+ }, Object.keys(t3).forEach((e2) => {
784
+ r2[e2] = t3[e2];
785
+ }), r2.names = [], r2.skips = [], r2.formatters = {}, r2.selectColor = function(e2) {
786
+ let t4 = 0;
787
+ for (let n2 = 0; n2 < e2.length; n2++) t4 = (t4 << 5) - t4 + e2.charCodeAt(n2), t4 |= 0;
788
+ return r2.colors[n(t4) % r2.colors.length];
789
+ }, r2.enable(r2.load()), r2;
790
+ };
791
+ }, { ms: 11 }], 6: [function(e, t2) {
792
+ "use strict";
793
+ function n2(e2, t3) {
794
+ for (const n3 in t3) Object.defineProperty(e2, n3, { value: t3[n3], enumerable: true, configurable: true });
795
+ return e2;
796
+ }
797
+ t2.exports = function(e2, t3, r2) {
798
+ if (!e2 || "string" == typeof e2) throw new TypeError("Please pass an Error to err-code");
799
+ r2 || (r2 = {}), "object" == typeof t3 && (r2 = t3, t3 = ""), t3 && (r2.code = t3);
800
+ try {
801
+ return n2(e2, r2);
802
+ } catch (t4) {
803
+ r2.message = e2.message, r2.stack = e2.stack;
804
+ const a = function() {
805
+ };
806
+ a.prototype = Object.create(Object.getPrototypeOf(e2));
807
+ const o = n2(new a(), r2);
808
+ return o;
809
+ }
810
+ };
811
+ }, {}], 7: [function(e, t2) {
812
+ "use strict";
813
+ function n2(e2) {
814
+ console && console.warn && console.warn(e2);
815
+ }
816
+ function r2() {
817
+ r2.init.call(this);
818
+ }
819
+ function a(e2) {
820
+ if ("function" != typeof e2) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e2);
821
+ }
822
+ function o(e2) {
823
+ return void 0 === e2._maxListeners ? r2.defaultMaxListeners : e2._maxListeners;
824
+ }
825
+ function i(e2, t3, r3, i2) {
826
+ var d2, s2, l2;
827
+ if (a(r3), s2 = e2._events, void 0 === s2 ? (s2 = e2._events = /* @__PURE__ */ Object.create(null), e2._eventsCount = 0) : (void 0 !== s2.newListener && (e2.emit("newListener", t3, r3.listener ? r3.listener : r3), s2 = e2._events), l2 = s2[t3]), void 0 === l2) l2 = s2[t3] = r3, ++e2._eventsCount;
828
+ else if ("function" == typeof l2 ? l2 = s2[t3] = i2 ? [r3, l2] : [l2, r3] : i2 ? l2.unshift(r3) : l2.push(r3), d2 = o(e2), 0 < d2 && l2.length > d2 && !l2.warned) {
829
+ l2.warned = true;
830
+ var c2 = new Error("Possible EventEmitter memory leak detected. " + l2.length + " " + (t3 + " listeners added. Use emitter.setMaxListeners() to increase limit"));
831
+ c2.name = "MaxListenersExceededWarning", c2.emitter = e2, c2.type = t3, c2.count = l2.length, n2(c2);
832
+ }
833
+ return e2;
834
+ }
835
+ function d() {
836
+ if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = true, 0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
837
+ }
838
+ function s(e2, t3, n3) {
839
+ var r3 = { fired: false, wrapFn: void 0, target: e2, type: t3, listener: n3 }, a2 = d.bind(r3);
840
+ return a2.listener = n3, r3.wrapFn = a2, a2;
841
+ }
842
+ function l(e2, t3, n3) {
843
+ var r3 = e2._events;
844
+ if (r3 === void 0) return [];
845
+ var a2 = r3[t3];
846
+ return void 0 === a2 ? [] : "function" == typeof a2 ? n3 ? [a2.listener || a2] : [a2] : n3 ? f(a2) : u(a2, a2.length);
847
+ }
848
+ function c(e2) {
849
+ var t3 = this._events;
850
+ if (t3 !== void 0) {
851
+ var n3 = t3[e2];
852
+ if ("function" == typeof n3) return 1;
853
+ if (void 0 !== n3) return n3.length;
854
+ }
855
+ return 0;
856
+ }
857
+ function u(e2, t3) {
858
+ for (var n3 = Array(t3), r3 = 0; r3 < t3; ++r3) n3[r3] = e2[r3];
859
+ return n3;
860
+ }
861
+ function p(e2, t3) {
862
+ for (; t3 + 1 < e2.length; t3++) e2[t3] = e2[t3 + 1];
863
+ e2.pop();
864
+ }
865
+ function f(e2) {
866
+ for (var t3 = Array(e2.length), n3 = 0; n3 < t3.length; ++n3) t3[n3] = e2[n3].listener || e2[n3];
867
+ return t3;
868
+ }
869
+ function g(e2, t3, n3) {
870
+ "function" == typeof e2.on && _(e2, "error", t3, n3);
871
+ }
872
+ function _(e2, t3, n3, r3) {
873
+ if ("function" == typeof e2.on) r3.once ? e2.once(t3, n3) : e2.on(t3, n3);
874
+ else if ("function" == typeof e2.addEventListener) e2.addEventListener(t3, function a2(o2) {
875
+ r3.once && e2.removeEventListener(t3, a2), n3(o2);
876
+ });
877
+ else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e2);
878
+ }
879
+ var h, m = "object" == typeof Reflect ? Reflect : null, b = m && "function" == typeof m.apply ? m.apply : function(e2, t3, n3) {
880
+ return Function.prototype.apply.call(e2, t3, n3);
881
+ };
882
+ h = m && "function" == typeof m.ownKeys ? m.ownKeys : Object.getOwnPropertySymbols ? function(e2) {
883
+ return Object.getOwnPropertyNames(e2).concat(Object.getOwnPropertySymbols(e2));
884
+ } : function(e2) {
885
+ return Object.getOwnPropertyNames(e2);
886
+ };
887
+ var y = Number.isNaN || function(e2) {
888
+ return e2 !== e2;
889
+ };
890
+ t2.exports = r2, t2.exports.once = function(e2, t3) {
891
+ return new Promise(function(n3, r3) {
892
+ function a2(n4) {
893
+ e2.removeListener(t3, o2), r3(n4);
894
+ }
895
+ function o2() {
896
+ "function" == typeof e2.removeListener && e2.removeListener("error", a2), n3([].slice.call(arguments));
897
+ }
898
+ _(e2, t3, o2, { once: true }), "error" !== t3 && g(e2, a2, { once: true });
899
+ });
900
+ }, r2.EventEmitter = r2, r2.prototype._events = void 0, r2.prototype._eventsCount = 0, r2.prototype._maxListeners = void 0;
901
+ var C = 10;
902
+ Object.defineProperty(r2, "defaultMaxListeners", { enumerable: true, get: function() {
903
+ return C;
904
+ }, set: function(e2) {
905
+ if ("number" != typeof e2 || 0 > e2 || y(e2)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e2 + ".");
906
+ C = e2;
907
+ } }), r2.init = function() {
908
+ (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
909
+ }, r2.prototype.setMaxListeners = function(e2) {
910
+ if ("number" != typeof e2 || 0 > e2 || y(e2)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e2 + ".");
911
+ return this._maxListeners = e2, this;
912
+ }, r2.prototype.getMaxListeners = function() {
913
+ return o(this);
914
+ }, r2.prototype.emit = function(e2) {
915
+ for (var t3 = [], n3 = 1; n3 < arguments.length; n3++) t3.push(arguments[n3]);
916
+ var r3 = "error" === e2, a2 = this._events;
917
+ if (a2 !== void 0) r3 = r3 && a2.error === void 0;
918
+ else if (!r3) return false;
919
+ if (r3) {
920
+ var o2;
921
+ if (0 < t3.length && (o2 = t3[0]), o2 instanceof Error) throw o2;
922
+ var d2 = new Error("Unhandled error." + (o2 ? " (" + o2.message + ")" : ""));
923
+ throw d2.context = o2, d2;
924
+ }
925
+ var s2 = a2[e2];
926
+ if (s2 === void 0) return false;
927
+ if ("function" == typeof s2) b(s2, this, t3);
928
+ else for (var l2 = s2.length, c2 = u(s2, l2), n3 = 0; n3 < l2; ++n3) b(c2[n3], this, t3);
929
+ return true;
930
+ }, r2.prototype.addListener = function(e2, t3) {
931
+ return i(this, e2, t3, false);
932
+ }, r2.prototype.on = r2.prototype.addListener, r2.prototype.prependListener = function(e2, t3) {
933
+ return i(this, e2, t3, true);
934
+ }, r2.prototype.once = function(e2, t3) {
935
+ return a(t3), this.on(e2, s(this, e2, t3)), this;
936
+ }, r2.prototype.prependOnceListener = function(e2, t3) {
937
+ return a(t3), this.prependListener(e2, s(this, e2, t3)), this;
938
+ }, r2.prototype.removeListener = function(e2, t3) {
939
+ var n3, r3, o2, d2, s2;
940
+ if (a(t3), r3 = this._events, void 0 === r3) return this;
941
+ if (n3 = r3[e2], void 0 === n3) return this;
942
+ if (n3 === t3 || n3.listener === t3) 0 == --this._eventsCount ? this._events = /* @__PURE__ */ Object.create(null) : (delete r3[e2], r3.removeListener && this.emit("removeListener", e2, n3.listener || t3));
943
+ else if ("function" != typeof n3) {
944
+ for (o2 = -1, d2 = n3.length - 1; 0 <= d2; d2--) if (n3[d2] === t3 || n3[d2].listener === t3) {
945
+ s2 = n3[d2].listener, o2 = d2;
946
+ break;
947
+ }
948
+ if (0 > o2) return this;
949
+ 0 === o2 ? n3.shift() : p(n3, o2), 1 === n3.length && (r3[e2] = n3[0]), void 0 !== r3.removeListener && this.emit("removeListener", e2, s2 || t3);
950
+ }
951
+ return this;
952
+ }, r2.prototype.off = r2.prototype.removeListener, r2.prototype.removeAllListeners = function(e2) {
953
+ var t3, n3, r3;
954
+ if (n3 = this._events, void 0 === n3) return this;
955
+ if (void 0 === n3.removeListener) return 0 === arguments.length ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : void 0 !== n3[e2] && (0 == --this._eventsCount ? this._events = /* @__PURE__ */ Object.create(null) : delete n3[e2]), this;
956
+ if (0 === arguments.length) {
957
+ var a2, o2 = Object.keys(n3);
958
+ for (r3 = 0; r3 < o2.length; ++r3) a2 = o2[r3], "removeListener" !== a2 && this.removeAllListeners(a2);
959
+ return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
960
+ }
961
+ if (t3 = n3[e2], "function" == typeof t3) this.removeListener(e2, t3);
962
+ else if (void 0 !== t3) for (r3 = t3.length - 1; 0 <= r3; r3--) this.removeListener(e2, t3[r3]);
963
+ return this;
964
+ }, r2.prototype.listeners = function(e2) {
965
+ return l(this, e2, true);
966
+ }, r2.prototype.rawListeners = function(e2) {
967
+ return l(this, e2, false);
968
+ }, r2.listenerCount = function(e2, t3) {
969
+ return "function" == typeof e2.listenerCount ? e2.listenerCount(t3) : c.call(e2, t3);
970
+ }, r2.prototype.listenerCount = c, r2.prototype.eventNames = function() {
971
+ return 0 < this._eventsCount ? h(this._events) : [];
972
+ };
973
+ }, {}], 8: [function(e, t2) {
974
+ t2.exports = function() {
975
+ if ("undefined" == typeof globalThis) return null;
976
+ var e2 = { RTCPeerConnection: globalThis.RTCPeerConnection || globalThis.mozRTCPeerConnection || globalThis.webkitRTCPeerConnection, RTCSessionDescription: globalThis.RTCSessionDescription || globalThis.mozRTCSessionDescription || globalThis.webkitRTCSessionDescription, RTCIceCandidate: globalThis.RTCIceCandidate || globalThis.mozRTCIceCandidate || globalThis.webkitRTCIceCandidate };
977
+ return e2.RTCPeerConnection ? e2 : null;
978
+ };
979
+ }, {}], 9: [function(e, a, o) {
980
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
981
+ o.read = function(t2, n2, a2, o2, l) {
982
+ var c, u, p = 8 * l - o2 - 1, f = (1 << p) - 1, g = f >> 1, _ = -7, h = a2 ? l - 1 : 0, b = a2 ? -1 : 1, d = t2[n2 + h];
983
+ for (h += b, c = d & (1 << -_) - 1, d >>= -_, _ += p; 0 < _; c = 256 * c + t2[n2 + h], h += b, _ -= 8) ;
984
+ for (u = c & (1 << -_) - 1, c >>= -_, _ += o2; 0 < _; u = 256 * u + t2[n2 + h], h += b, _ -= 8) ;
985
+ if (0 === c) c = 1 - g;
986
+ else {
987
+ if (c === f) return u ? NaN : (d ? -1 : 1) * (1 / 0);
988
+ u += r(2, o2), c -= g;
989
+ }
990
+ return (d ? -1 : 1) * u * r(2, c - o2);
991
+ }, o.write = function(a2, o2, l, u, p, f) {
992
+ var h, b, y, g = Math.LN2, _ = Math.log, C = 8 * f - p - 1, R = (1 << C) - 1, E = R >> 1, w = 23 === p ? r(2, -24) - r(2, -77) : 0, S = u ? 0 : f - 1, T = u ? 1 : -1, d = 0 > o2 || 0 === o2 && 0 > 1 / o2 ? 1 : 0;
993
+ for (o2 = n(o2), isNaN(o2) || o2 === 1 / 0 ? (b = isNaN(o2) ? 1 : 0, h = R) : (h = t(_(o2) / g), 1 > o2 * (y = r(2, -h)) && (h--, y *= 2), o2 += 1 <= h + E ? w / y : w * r(2, 1 - E), 2 <= o2 * y && (h++, y /= 2), h + E >= R ? (b = 0, h = R) : 1 <= h + E ? (b = (o2 * y - 1) * r(2, p), h += E) : (b = o2 * r(2, E - 1) * r(2, p), h = 0)); 8 <= p; a2[l + S] = 255 & b, S += T, b /= 256, p -= 8) ;
994
+ for (h = h << p | b, C += p; 0 < C; a2[l + S] = 255 & h, S += T, h /= 256, C -= 8) ;
995
+ a2[l + S - T] |= 128 * d;
996
+ };
997
+ }, {}], 10: [function(e, t2) {
998
+ t2.exports = "function" == typeof Object.create ? function(e2, t3) {
999
+ t3 && (e2.super_ = t3, e2.prototype = Object.create(t3.prototype, { constructor: { value: e2, enumerable: false, writable: true, configurable: true } }));
1000
+ } : function(e2, t3) {
1001
+ if (t3) {
1002
+ e2.super_ = t3;
1003
+ var n2 = function() {
1004
+ };
1005
+ n2.prototype = t3.prototype, e2.prototype = new n2(), e2.prototype.constructor = e2;
1006
+ }
1007
+ };
1008
+ }, {}], 11: [function(e, t2) {
1009
+ var r2 = Math.round;
1010
+ function a(e2) {
1011
+ if (e2 += "", !(100 < e2.length)) {
1012
+ var t3 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e2);
1013
+ if (t3) {
1014
+ var r3 = parseFloat(t3[1]), n2 = (t3[2] || "ms").toLowerCase();
1015
+ return "years" === n2 || "year" === n2 || "yrs" === n2 || "yr" === n2 || "y" === n2 ? 315576e5 * r3 : "weeks" === n2 || "week" === n2 || "w" === n2 ? 6048e5 * r3 : "days" === n2 || "day" === n2 || "d" === n2 ? 864e5 * r3 : "hours" === n2 || "hour" === n2 || "hrs" === n2 || "hr" === n2 || "h" === n2 ? 36e5 * r3 : "minutes" === n2 || "minute" === n2 || "mins" === n2 || "min" === n2 || "m" === n2 ? 6e4 * r3 : "seconds" === n2 || "second" === n2 || "secs" === n2 || "sec" === n2 || "s" === n2 ? 1e3 * r3 : "milliseconds" === n2 || "millisecond" === n2 || "msecs" === n2 || "msec" === n2 || "ms" === n2 ? r3 : void 0;
1016
+ }
1017
+ }
1018
+ }
1019
+ function o(e2) {
1020
+ var t3 = n(e2);
1021
+ return 864e5 <= t3 ? r2(e2 / 864e5) + "d" : 36e5 <= t3 ? r2(e2 / 36e5) + "h" : 6e4 <= t3 ? r2(e2 / 6e4) + "m" : 1e3 <= t3 ? r2(e2 / 1e3) + "s" : e2 + "ms";
1022
+ }
1023
+ function i(e2) {
1024
+ var t3 = n(e2);
1025
+ return 864e5 <= t3 ? s(e2, t3, 864e5, "day") : 36e5 <= t3 ? s(e2, t3, 36e5, "hour") : 6e4 <= t3 ? s(e2, t3, 6e4, "minute") : 1e3 <= t3 ? s(e2, t3, 1e3, "second") : e2 + " ms";
1026
+ }
1027
+ function s(e2, t3, a2, n2) {
1028
+ return r2(e2 / a2) + " " + n2 + (t3 >= 1.5 * a2 ? "s" : "");
1029
+ }
1030
+ var l = 24 * (60 * 6e4);
1031
+ t2.exports = function(e2, t3) {
1032
+ t3 = t3 || {};
1033
+ var n2 = typeof e2;
1034
+ if ("string" == n2 && 0 < e2.length) return a(e2);
1035
+ if ("number" === n2 && isFinite(e2)) return t3.long ? i(e2) : o(e2);
1036
+ throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(e2));
1037
+ };
1038
+ }, {}], 12: [function(e, t2) {
1039
+ function n2() {
1040
+ throw new Error("setTimeout has not been defined");
1041
+ }
1042
+ function r2() {
1043
+ throw new Error("clearTimeout has not been defined");
1044
+ }
1045
+ function a(t3) {
1046
+ if (c === setTimeout) return setTimeout(t3, 0);
1047
+ if ((c === n2 || !c) && setTimeout) return c = setTimeout, setTimeout(t3, 0);
1048
+ try {
1049
+ return c(t3, 0);
1050
+ } catch (n3) {
1051
+ try {
1052
+ return c.call(null, t3, 0);
1053
+ } catch (n4) {
1054
+ return c.call(this, t3, 0);
1055
+ }
1056
+ }
1057
+ }
1058
+ function o(t3) {
1059
+ if (u === clearTimeout) return clearTimeout(t3);
1060
+ if ((u === r2 || !u) && clearTimeout) return u = clearTimeout, clearTimeout(t3);
1061
+ try {
1062
+ return u(t3);
1063
+ } catch (n3) {
1064
+ try {
1065
+ return u.call(null, t3);
1066
+ } catch (n4) {
1067
+ return u.call(this, t3);
1068
+ }
1069
+ }
1070
+ }
1071
+ function i() {
1072
+ _ && f && (_ = false, f.length ? g = f.concat(g) : h = -1, g.length && d());
1073
+ }
1074
+ function d() {
1075
+ if (!_) {
1076
+ var e2 = a(i);
1077
+ _ = true;
1078
+ for (var t3 = g.length; t3; ) {
1079
+ for (f = g, g = []; ++h < t3; ) f && f[h].run();
1080
+ h = -1, t3 = g.length;
1081
+ }
1082
+ f = null, _ = false, o(e2);
1083
+ }
1084
+ }
1085
+ function s(e2, t3) {
1086
+ this.fun = e2, this.array = t3;
1087
+ }
1088
+ function l() {
1089
+ }
1090
+ var c, u, p = t2.exports = {};
1091
+ (function() {
1092
+ try {
1093
+ c = "function" == typeof setTimeout ? setTimeout : n2;
1094
+ } catch (t3) {
1095
+ c = n2;
1096
+ }
1097
+ try {
1098
+ u = "function" == typeof clearTimeout ? clearTimeout : r2;
1099
+ } catch (t3) {
1100
+ u = r2;
1101
+ }
1102
+ })();
1103
+ var f, g = [], _ = false, h = -1;
1104
+ p.nextTick = function(e2) {
1105
+ var t3 = Array(arguments.length - 1);
1106
+ if (1 < arguments.length) for (var n3 = 1; n3 < arguments.length; n3++) t3[n3 - 1] = arguments[n3];
1107
+ g.push(new s(e2, t3)), 1 !== g.length || _ || a(d);
1108
+ }, s.prototype.run = function() {
1109
+ this.fun.apply(null, this.array);
1110
+ }, p.title = "browser", p.browser = true, p.env = {}, p.argv = [], p.version = "", p.versions = {}, p.on = l, p.addListener = l, p.once = l, p.off = l, p.removeListener = l, p.removeAllListeners = l, p.emit = l, p.prependListener = l, p.prependOnceListener = l, p.listeners = function() {
1111
+ return [];
1112
+ }, p.binding = function() {
1113
+ throw new Error("process.binding is not supported");
1114
+ }, p.cwd = function() {
1115
+ return "/";
1116
+ }, p.chdir = function() {
1117
+ throw new Error("process.chdir is not supported");
1118
+ }, p.umask = function() {
1119
+ return 0;
1120
+ };
1121
+ }, {}], 13: [function(e, t2) {
1122
+ (function(e2) {
1123
+ (function() {
1124
+ /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
1125
+ let n2;
1126
+ t2.exports = "function" == typeof queueMicrotask ? queueMicrotask.bind("undefined" == typeof window ? e2 : window) : (e3) => (n2 || (n2 = Promise.resolve())).then(e3).catch((e4) => setTimeout(() => {
1127
+ throw e4;
1128
+ }, 0));
1129
+ }).call(this);
1130
+ }).call(this, "undefined" == typeof commonjsGlobal ? "undefined" == typeof self ? "undefined" == typeof window ? {} : window : self : commonjsGlobal);
1131
+ }, {}], 14: [function(e, t2) {
1132
+ (function(n2, r2) {
1133
+ (function() {
1134
+ "use strict";
1135
+ var a = e("safe-buffer").Buffer, o = r2.crypto || r2.msCrypto;
1136
+ t2.exports = o && o.getRandomValues ? function(e2, t3) {
1137
+ if (e2 > 4294967295) throw new RangeError("requested too many random bytes");
1138
+ var r3 = a.allocUnsafe(e2);
1139
+ if (0 < e2) if (65536 < e2) for (var i = 0; i < e2; i += 65536) o.getRandomValues(r3.slice(i, i + 65536));
1140
+ else o.getRandomValues(r3);
1141
+ return "function" == typeof t3 ? n2.nextTick(function() {
1142
+ t3(null, r3);
1143
+ }) : r3;
1144
+ } : function() {
1145
+ throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11");
1146
+ };
1147
+ }).call(this);
1148
+ }).call(this, e("_process"), "undefined" == typeof commonjsGlobal ? "undefined" == typeof self ? "undefined" == typeof window ? {} : window : self : commonjsGlobal);
1149
+ }, { _process: 12, "safe-buffer": 30 }], 15: [function(e, t2) {
1150
+ "use strict";
1151
+ function n2(e2, t3) {
1152
+ e2.prototype = Object.create(t3.prototype), e2.prototype.constructor = e2, e2.__proto__ = t3;
1153
+ }
1154
+ function r2(e2, t3, r3) {
1155
+ function a2(e3, n3, r4) {
1156
+ return "string" == typeof t3 ? t3 : t3(e3, n3, r4);
1157
+ }
1158
+ r3 || (r3 = Error);
1159
+ var o2 = function(e3) {
1160
+ function t4(t5, n3, r4) {
1161
+ return e3.call(this, a2(t5, n3, r4)) || this;
1162
+ }
1163
+ return n2(t4, e3), t4;
1164
+ }(r3);
1165
+ o2.prototype.name = r3.name, o2.prototype.code = e2, s[e2] = o2;
1166
+ }
1167
+ function a(e2, t3) {
1168
+ if (Array.isArray(e2)) {
1169
+ var n3 = e2.length;
1170
+ return e2 = e2.map(function(e3) {
1171
+ return e3 + "";
1172
+ }), 2 < n3 ? "one of ".concat(t3, " ").concat(e2.slice(0, n3 - 1).join(", "), ", or ") + e2[n3 - 1] : 2 === n3 ? "one of ".concat(t3, " ").concat(e2[0], " or ").concat(e2[1]) : "of ".concat(t3, " ").concat(e2[0]);
1173
+ }
1174
+ return "of ".concat(t3, " ").concat(e2 + "");
1175
+ }
1176
+ function o(e2, t3, n3) {
1177
+ return e2.substr(!n3 || 0 > n3 ? 0 : +n3, t3.length) === t3;
1178
+ }
1179
+ function i(e2, t3, n3) {
1180
+ return (void 0 === n3 || n3 > e2.length) && (n3 = e2.length), e2.substring(n3 - t3.length, n3) === t3;
1181
+ }
1182
+ function d(e2, t3, n3) {
1183
+ return "number" != typeof n3 && (n3 = 0), !(n3 + t3.length > e2.length) && -1 !== e2.indexOf(t3, n3);
1184
+ }
1185
+ var s = {};
1186
+ r2("ERR_INVALID_OPT_VALUE", function(e2, t3) {
1187
+ return 'The value "' + t3 + '" is invalid for option "' + e2 + '"';
1188
+ }, TypeError), r2("ERR_INVALID_ARG_TYPE", function(e2, t3, n3) {
1189
+ var r3;
1190
+ "string" == typeof t3 && o(t3, "not ") ? (r3 = "must not be", t3 = t3.replace(/^not /, "")) : r3 = "must be";
1191
+ var s2;
1192
+ if (i(e2, " argument")) s2 = "The ".concat(e2, " ").concat(r3, " ").concat(a(t3, "type"));
1193
+ else {
1194
+ var l = d(e2, ".") ? "property" : "argument";
1195
+ s2 = 'The "'.concat(e2, '" ').concat(l, " ").concat(r3, " ").concat(a(t3, "type"));
1196
+ }
1197
+ return s2 += ". Received type ".concat(typeof n3), s2;
1198
+ }, TypeError), r2("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"), r2("ERR_METHOD_NOT_IMPLEMENTED", function(e2) {
1199
+ return "The " + e2 + " method is not implemented";
1200
+ }), r2("ERR_STREAM_PREMATURE_CLOSE", "Premature close"), r2("ERR_STREAM_DESTROYED", function(e2) {
1201
+ return "Cannot call " + e2 + " after a stream was destroyed";
1202
+ }), r2("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), r2("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), r2("ERR_STREAM_WRITE_AFTER_END", "write after end"), r2("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), r2("ERR_UNKNOWN_ENCODING", function(e2) {
1203
+ return "Unknown encoding: " + e2;
1204
+ }, TypeError), r2("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), t2.exports.codes = s;
1205
+ }, {}], 16: [function(e, t2) {
1206
+ (function(n2) {
1207
+ (function() {
1208
+ "use strict";
1209
+ function r2(e2) {
1210
+ return this instanceof r2 ? void (d.call(this, e2), s.call(this, e2), this.allowHalfOpen = true, e2 && (false === e2.readable && (this.readable = false), false === e2.writable && (this.writable = false), false === e2.allowHalfOpen && (this.allowHalfOpen = false, this.once("end", a)))) : new r2(e2);
1211
+ }
1212
+ function a() {
1213
+ this._writableState.ended || n2.nextTick(o, this);
1214
+ }
1215
+ function o(e2) {
1216
+ e2.end();
1217
+ }
1218
+ var i = Object.keys || function(e2) {
1219
+ var t3 = [];
1220
+ for (var n3 in e2) t3.push(n3);
1221
+ return t3;
1222
+ };
1223
+ t2.exports = r2;
1224
+ var d = e("./_stream_readable"), s = e("./_stream_writable");
1225
+ e("inherits")(r2, d);
1226
+ for (var l, c = i(s.prototype), u = 0; u < c.length; u++) l = c[u], r2.prototype[l] || (r2.prototype[l] = s.prototype[l]);
1227
+ Object.defineProperty(r2.prototype, "writableHighWaterMark", { enumerable: false, get: function() {
1228
+ return this._writableState.highWaterMark;
1229
+ } }), Object.defineProperty(r2.prototype, "writableBuffer", { enumerable: false, get: function() {
1230
+ return this._writableState && this._writableState.getBuffer();
1231
+ } }), Object.defineProperty(r2.prototype, "writableLength", { enumerable: false, get: function() {
1232
+ return this._writableState.length;
1233
+ } }), Object.defineProperty(r2.prototype, "destroyed", { enumerable: false, get: function() {
1234
+ return void 0 !== this._readableState && void 0 !== this._writableState && this._readableState.destroyed && this._writableState.destroyed;
1235
+ }, set: function(e2) {
1236
+ void 0 === this._readableState || void 0 === this._writableState || (this._readableState.destroyed = e2, this._writableState.destroyed = e2);
1237
+ } });
1238
+ }).call(this);
1239
+ }).call(this, e("_process"));
1240
+ }, { "./_stream_readable": 18, "./_stream_writable": 20, _process: 12, inherits: 10 }], 17: [function(e, t2) {
1241
+ "use strict";
1242
+ function n2(e2) {
1243
+ return this instanceof n2 ? void r2.call(this, e2) : new n2(e2);
1244
+ }
1245
+ t2.exports = n2;
1246
+ var r2 = e("./_stream_transform");
1247
+ e("inherits")(n2, r2), n2.prototype._transform = function(e2, t3, n3) {
1248
+ n3(null, e2);
1249
+ };
1250
+ }, { "./_stream_transform": 19, inherits: 10 }], 18: [function(e, t2) {
1251
+ (function(n2, r2) {
1252
+ (function() {
1253
+ "use strict";
1254
+ function a(e2) {
1255
+ return P.from(e2);
1256
+ }
1257
+ function o(e2) {
1258
+ return P.isBuffer(e2) || e2 instanceof M;
1259
+ }
1260
+ function i(e2, t3, n3) {
1261
+ return "function" == typeof e2.prependListener ? e2.prependListener(t3, n3) : void (e2._events && e2._events[t3] ? Array.isArray(e2._events[t3]) ? e2._events[t3].unshift(n3) : e2._events[t3] = [n3, e2._events[t3]] : e2.on(t3, n3));
1262
+ }
1263
+ function d(t3, n3, r3) {
1264
+ A = A || e("./_stream_duplex"), t3 = t3 || {}, "boolean" != typeof r3 && (r3 = n3 instanceof A), this.objectMode = !!t3.objectMode, r3 && (this.objectMode = this.objectMode || !!t3.readableObjectMode), this.highWaterMark = H(this, t3, "readableHighWaterMark", r3), this.buffer = new j(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = false, this.endEmitted = false, this.reading = false, this.sync = true, this.needReadable = false, this.emittedReadable = false, this.readableListening = false, this.resumeScheduled = false, this.paused = true, this.emitClose = false !== t3.emitClose, this.autoDestroy = !!t3.autoDestroy, this.destroyed = false, this.defaultEncoding = t3.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = false, this.decoder = null, this.encoding = null, t3.encoding && (!F && (F = e("string_decoder/").StringDecoder), this.decoder = new F(t3.encoding), this.encoding = t3.encoding);
1265
+ }
1266
+ function s(t3) {
1267
+ if (A = A || e("./_stream_duplex"), !(this instanceof s)) return new s(t3);
1268
+ var n3 = this instanceof A;
1269
+ this._readableState = new d(t3, this, n3), this.readable = true, t3 && ("function" == typeof t3.read && (this._read = t3.read), "function" == typeof t3.destroy && (this._destroy = t3.destroy)), I.call(this);
1270
+ }
1271
+ function l(e2, t3, n3, r3, o2) {
1272
+ x("readableAddChunk", t3);
1273
+ var i2 = e2._readableState;
1274
+ if (null === t3) i2.reading = false, g(e2, i2);
1275
+ else {
1276
+ var d2;
1277
+ if (o2 || (d2 = u(i2, t3)), d2) X(e2, d2);
1278
+ else if (!(i2.objectMode || t3 && 0 < t3.length)) r3 || (i2.reading = false, m(e2, i2));
1279
+ else if ("string" == typeof t3 || i2.objectMode || Object.getPrototypeOf(t3) === P.prototype || (t3 = a(t3)), r3) i2.endEmitted ? X(e2, new K()) : c(e2, i2, t3, true);
1280
+ else if (i2.ended) X(e2, new z());
1281
+ else {
1282
+ if (i2.destroyed) return false;
1283
+ i2.reading = false, i2.decoder && !n3 ? (t3 = i2.decoder.write(t3), i2.objectMode || 0 !== t3.length ? c(e2, i2, t3, false) : m(e2, i2)) : c(e2, i2, t3, false);
1284
+ }
1285
+ }
1286
+ return !i2.ended && (i2.length < i2.highWaterMark || 0 === i2.length);
1287
+ }
1288
+ function c(e2, t3, n3, r3) {
1289
+ t3.flowing && 0 === t3.length && !t3.sync ? (t3.awaitDrain = 0, e2.emit("data", n3)) : (t3.length += t3.objectMode ? 1 : n3.length, r3 ? t3.buffer.unshift(n3) : t3.buffer.push(n3), t3.needReadable && _(e2)), m(e2, t3);
1290
+ }
1291
+ function u(e2, t3) {
1292
+ var n3;
1293
+ return o(t3) || "string" == typeof t3 || void 0 === t3 || e2.objectMode || (n3 = new V("chunk", ["string", "Buffer", "Uint8Array"], t3)), n3;
1294
+ }
1295
+ function p(e2) {
1296
+ return 1073741824 <= e2 ? e2 = 1073741824 : (e2--, e2 |= e2 >>> 1, e2 |= e2 >>> 2, e2 |= e2 >>> 4, e2 |= e2 >>> 8, e2 |= e2 >>> 16, e2++), e2;
1297
+ }
1298
+ function f(e2, t3) {
1299
+ return 0 >= e2 || 0 === t3.length && t3.ended ? 0 : t3.objectMode ? 1 : e2 === e2 ? (e2 > t3.highWaterMark && (t3.highWaterMark = p(e2)), e2 <= t3.length ? e2 : t3.ended ? t3.length : (t3.needReadable = true, 0)) : t3.flowing && t3.length ? t3.buffer.head.data.length : t3.length;
1300
+ }
1301
+ function g(e2, t3) {
1302
+ if (x("onEofChunk"), !t3.ended) {
1303
+ if (t3.decoder) {
1304
+ var n3 = t3.decoder.end();
1305
+ n3 && n3.length && (t3.buffer.push(n3), t3.length += t3.objectMode ? 1 : n3.length);
1306
+ }
1307
+ t3.ended = true, t3.sync ? _(e2) : (t3.needReadable = false, !t3.emittedReadable && (t3.emittedReadable = true, h(e2)));
1308
+ }
1309
+ }
1310
+ function _(e2) {
1311
+ var t3 = e2._readableState;
1312
+ x("emitReadable", t3.needReadable, t3.emittedReadable), t3.needReadable = false, t3.emittedReadable || (x("emitReadable", t3.flowing), t3.emittedReadable = true, n2.nextTick(h, e2));
1313
+ }
1314
+ function h(e2) {
1315
+ var t3 = e2._readableState;
1316
+ x("emitReadable_", t3.destroyed, t3.length, t3.ended), !t3.destroyed && (t3.length || t3.ended) && (e2.emit("readable"), t3.emittedReadable = false), t3.needReadable = !t3.flowing && !t3.ended && t3.length <= t3.highWaterMark, S(e2);
1317
+ }
1318
+ function m(e2, t3) {
1319
+ t3.readingMore || (t3.readingMore = true, n2.nextTick(b, e2, t3));
1320
+ }
1321
+ function b(e2, t3) {
1322
+ for (; !t3.reading && !t3.ended && (t3.length < t3.highWaterMark || t3.flowing && 0 === t3.length); ) {
1323
+ var n3 = t3.length;
1324
+ if (x("maybeReadMore read 0"), e2.read(0), n3 === t3.length) break;
1325
+ }
1326
+ t3.readingMore = false;
1327
+ }
1328
+ function y(e2) {
1329
+ return function() {
1330
+ var t3 = e2._readableState;
1331
+ x("pipeOnDrain", t3.awaitDrain), t3.awaitDrain && t3.awaitDrain--, 0 === t3.awaitDrain && D(e2, "data") && (t3.flowing = true, S(e2));
1332
+ };
1333
+ }
1334
+ function C(e2) {
1335
+ var t3 = e2._readableState;
1336
+ t3.readableListening = 0 < e2.listenerCount("readable"), t3.resumeScheduled && !t3.paused ? t3.flowing = true : 0 < e2.listenerCount("data") && e2.resume();
1337
+ }
1338
+ function R(e2) {
1339
+ x("readable nexttick read 0"), e2.read(0);
1340
+ }
1341
+ function E(e2, t3) {
1342
+ t3.resumeScheduled || (t3.resumeScheduled = true, n2.nextTick(w, e2, t3));
1343
+ }
1344
+ function w(e2, t3) {
1345
+ x("resume", t3.reading), t3.reading || e2.read(0), t3.resumeScheduled = false, e2.emit("resume"), S(e2), t3.flowing && !t3.reading && e2.read(0);
1346
+ }
1347
+ function S(e2) {
1348
+ var t3 = e2._readableState;
1349
+ for (x("flow", t3.flowing); t3.flowing && null !== e2.read(); ) ;
1350
+ }
1351
+ function T(e2, t3) {
1352
+ if (0 === t3.length) return null;
1353
+ var n3;
1354
+ return t3.objectMode ? n3 = t3.buffer.shift() : !e2 || e2 >= t3.length ? (n3 = t3.decoder ? t3.buffer.join("") : 1 === t3.buffer.length ? t3.buffer.first() : t3.buffer.concat(t3.length), t3.buffer.clear()) : n3 = t3.buffer.consume(e2, t3.decoder), n3;
1355
+ }
1356
+ function v(e2) {
1357
+ var t3 = e2._readableState;
1358
+ x("endReadable", t3.endEmitted), t3.endEmitted || (t3.ended = true, n2.nextTick(k, t3, e2));
1359
+ }
1360
+ function k(e2, t3) {
1361
+ if (x("endReadableNT", e2.endEmitted, e2.length), !e2.endEmitted && 0 === e2.length && (e2.endEmitted = true, t3.readable = false, t3.emit("end"), e2.autoDestroy)) {
1362
+ var n3 = t3._writableState;
1363
+ (!n3 || n3.autoDestroy && n3.finished) && t3.destroy();
1364
+ }
1365
+ }
1366
+ function L(e2, t3) {
1367
+ for (var n3 = 0, r3 = e2.length; n3 < r3; n3++) if (e2[n3] === t3) return n3;
1368
+ return -1;
1369
+ }
1370
+ t2.exports = s;
1371
+ var A;
1372
+ s.ReadableState = d;
1373
+ var x, N = e("events").EventEmitter, D = function(e2, t3) {
1374
+ return e2.listeners(t3).length;
1375
+ }, I = e("./internal/streams/stream"), P = e("buffer").Buffer, M = r2.Uint8Array || function() {
1376
+ }, O = e("util");
1377
+ x = O && O.debuglog ? O.debuglog("stream") : function() {
1378
+ };
1379
+ var F, B, U, j = e("./internal/streams/buffer_list"), q = e("./internal/streams/destroy"), W = e("./internal/streams/state"), H = W.getHighWaterMark, Y = e("../errors").codes, V = Y.ERR_INVALID_ARG_TYPE, z = Y.ERR_STREAM_PUSH_AFTER_EOF, G = Y.ERR_METHOD_NOT_IMPLEMENTED, K = Y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
1380
+ e("inherits")(s, I);
1381
+ var X = q.errorOrDestroy, $ = ["error", "close", "destroy", "pause", "resume"];
1382
+ Object.defineProperty(s.prototype, "destroyed", { enumerable: false, get: function() {
1383
+ return void 0 !== this._readableState && this._readableState.destroyed;
1384
+ }, set: function(e2) {
1385
+ this._readableState && (this._readableState.destroyed = e2);
1386
+ } }), s.prototype.destroy = q.destroy, s.prototype._undestroy = q.undestroy, s.prototype._destroy = function(e2, t3) {
1387
+ t3(e2);
1388
+ }, s.prototype.push = function(e2, t3) {
1389
+ var n3, r3 = this._readableState;
1390
+ return r3.objectMode ? n3 = true : "string" == typeof e2 && (t3 = t3 || r3.defaultEncoding, t3 !== r3.encoding && (e2 = P.from(e2, t3), t3 = ""), n3 = true), l(this, e2, t3, false, n3);
1391
+ }, s.prototype.unshift = function(e2) {
1392
+ return l(this, e2, null, true, false);
1393
+ }, s.prototype.isPaused = function() {
1394
+ return false === this._readableState.flowing;
1395
+ }, s.prototype.setEncoding = function(t3) {
1396
+ F || (F = e("string_decoder/").StringDecoder);
1397
+ var n3 = new F(t3);
1398
+ this._readableState.decoder = n3, this._readableState.encoding = this._readableState.decoder.encoding;
1399
+ for (var r3 = this._readableState.buffer.head, a2 = ""; null !== r3; ) a2 += n3.write(r3.data), r3 = r3.next;
1400
+ return this._readableState.buffer.clear(), "" !== a2 && this._readableState.buffer.push(a2), this._readableState.length = a2.length, this;
1401
+ };
1402
+ s.prototype.read = function(e2) {
1403
+ x("read", e2), e2 = parseInt(e2, 10);
1404
+ var t3 = this._readableState, r3 = e2;
1405
+ if (0 !== e2 && (t3.emittedReadable = false), 0 === e2 && t3.needReadable && ((0 === t3.highWaterMark ? 0 < t3.length : t3.length >= t3.highWaterMark) || t3.ended)) return x("read: emitReadable", t3.length, t3.ended), 0 === t3.length && t3.ended ? v(this) : _(this), null;
1406
+ if (e2 = f(e2, t3), 0 === e2 && t3.ended) return 0 === t3.length && v(this), null;
1407
+ var a2 = t3.needReadable;
1408
+ x("need readable", a2), (0 === t3.length || t3.length - e2 < t3.highWaterMark) && (a2 = true, x("length less than watermark", a2)), t3.ended || t3.reading ? (a2 = false, x("reading or ended", a2)) : a2 && (x("do read"), t3.reading = true, t3.sync = true, 0 === t3.length && (t3.needReadable = true), this._read(t3.highWaterMark), t3.sync = false, !t3.reading && (e2 = f(r3, t3)));
1409
+ var o2;
1410
+ return o2 = 0 < e2 ? T(e2, t3) : null, null === o2 ? (t3.needReadable = t3.length <= t3.highWaterMark, e2 = 0) : (t3.length -= e2, t3.awaitDrain = 0), 0 === t3.length && (!t3.ended && (t3.needReadable = true), r3 !== e2 && t3.ended && v(this)), null !== o2 && this.emit("data", o2), o2;
1411
+ }, s.prototype._read = function() {
1412
+ X(this, new G("_read()"));
1413
+ }, s.prototype.pipe = function(e2, t3) {
1414
+ function r3(e3, t4) {
1415
+ x("onunpipe"), e3 === p2 && t4 && false === t4.hasUnpiped && (t4.hasUnpiped = true, o2());
1416
+ }
1417
+ function a2() {
1418
+ x("onend"), e2.end();
1419
+ }
1420
+ function o2() {
1421
+ x("cleanup"), e2.removeListener("close", l2), e2.removeListener("finish", c2), e2.removeListener("drain", h2), e2.removeListener("error", s2), e2.removeListener("unpipe", r3), p2.removeListener("end", a2), p2.removeListener("end", u2), p2.removeListener("data", d2), m2 = true, f2.awaitDrain && (!e2._writableState || e2._writableState.needDrain) && h2();
1422
+ }
1423
+ function d2(t4) {
1424
+ x("ondata");
1425
+ var n3 = e2.write(t4);
1426
+ x("dest.write", n3), false === n3 && ((1 === f2.pipesCount && f2.pipes === e2 || 1 < f2.pipesCount && -1 !== L(f2.pipes, e2)) && !m2 && (x("false write response, pause", f2.awaitDrain), f2.awaitDrain++), p2.pause());
1427
+ }
1428
+ function s2(t4) {
1429
+ x("onerror", t4), u2(), e2.removeListener("error", s2), 0 === D(e2, "error") && X(e2, t4);
1430
+ }
1431
+ function l2() {
1432
+ e2.removeListener("finish", c2), u2();
1433
+ }
1434
+ function c2() {
1435
+ x("onfinish"), e2.removeListener("close", l2), u2();
1436
+ }
1437
+ function u2() {
1438
+ x("unpipe"), p2.unpipe(e2);
1439
+ }
1440
+ var p2 = this, f2 = this._readableState;
1441
+ switch (f2.pipesCount) {
1442
+ case 0:
1443
+ f2.pipes = e2;
1444
+ break;
1445
+ case 1:
1446
+ f2.pipes = [f2.pipes, e2];
1447
+ break;
1448
+ default:
1449
+ f2.pipes.push(e2);
1450
+ }
1451
+ f2.pipesCount += 1, x("pipe count=%d opts=%j", f2.pipesCount, t3);
1452
+ var g2 = (!t3 || false !== t3.end) && e2 !== n2.stdout && e2 !== n2.stderr, _2 = g2 ? a2 : u2;
1453
+ f2.endEmitted ? n2.nextTick(_2) : p2.once("end", _2), e2.on("unpipe", r3);
1454
+ var h2 = y(p2);
1455
+ e2.on("drain", h2);
1456
+ var m2 = false;
1457
+ return p2.on("data", d2), i(e2, "error", s2), e2.once("close", l2), e2.once("finish", c2), e2.emit("pipe", p2), f2.flowing || (x("pipe resume"), p2.resume()), e2;
1458
+ }, s.prototype.unpipe = function(e2) {
1459
+ var t3 = this._readableState, n3 = { hasUnpiped: false };
1460
+ if (0 === t3.pipesCount) return this;
1461
+ if (1 === t3.pipesCount) return e2 && e2 !== t3.pipes ? this : (e2 || (e2 = t3.pipes), t3.pipes = null, t3.pipesCount = 0, t3.flowing = false, e2 && e2.emit("unpipe", this, n3), this);
1462
+ if (!e2) {
1463
+ var r3 = t3.pipes, a2 = t3.pipesCount;
1464
+ t3.pipes = null, t3.pipesCount = 0, t3.flowing = false;
1465
+ for (var o2 = 0; o2 < a2; o2++) r3[o2].emit("unpipe", this, { hasUnpiped: false });
1466
+ return this;
1467
+ }
1468
+ var d2 = L(t3.pipes, e2);
1469
+ return -1 === d2 ? this : (t3.pipes.splice(d2, 1), t3.pipesCount -= 1, 1 === t3.pipesCount && (t3.pipes = t3.pipes[0]), e2.emit("unpipe", this, n3), this);
1470
+ }, s.prototype.on = function(e2, t3) {
1471
+ var r3 = I.prototype.on.call(this, e2, t3), a2 = this._readableState;
1472
+ return "data" === e2 ? (a2.readableListening = 0 < this.listenerCount("readable"), false !== a2.flowing && this.resume()) : "readable" == e2 && !a2.endEmitted && !a2.readableListening && (a2.readableListening = a2.needReadable = true, a2.flowing = false, a2.emittedReadable = false, x("on readable", a2.length, a2.reading), a2.length ? _(this) : !a2.reading && n2.nextTick(R, this)), r3;
1473
+ }, s.prototype.addListener = s.prototype.on, s.prototype.removeListener = function(e2, t3) {
1474
+ var r3 = I.prototype.removeListener.call(this, e2, t3);
1475
+ return "readable" === e2 && n2.nextTick(C, this), r3;
1476
+ }, s.prototype.removeAllListeners = function(e2) {
1477
+ var t3 = I.prototype.removeAllListeners.apply(this, arguments);
1478
+ return ("readable" === e2 || void 0 === e2) && n2.nextTick(C, this), t3;
1479
+ }, s.prototype.resume = function() {
1480
+ var e2 = this._readableState;
1481
+ return e2.flowing || (x("resume"), e2.flowing = !e2.readableListening, E(this, e2)), e2.paused = false, this;
1482
+ }, s.prototype.pause = function() {
1483
+ return x("call pause flowing=%j", this._readableState.flowing), false !== this._readableState.flowing && (x("pause"), this._readableState.flowing = false, this.emit("pause")), this._readableState.paused = true, this;
1484
+ }, s.prototype.wrap = function(e2) {
1485
+ var t3 = this, r3 = this._readableState, a2 = false;
1486
+ for (var o2 in e2.on("end", function() {
1487
+ if (x("wrapped end"), r3.decoder && !r3.ended) {
1488
+ var e3 = r3.decoder.end();
1489
+ e3 && e3.length && t3.push(e3);
1490
+ }
1491
+ t3.push(null);
1492
+ }), e2.on("data", function(n3) {
1493
+ if ((x("wrapped data"), r3.decoder && (n3 = r3.decoder.write(n3)), !(r3.objectMode && (null === n3 || void 0 === n3))) && (r3.objectMode || n3 && n3.length)) {
1494
+ var o3 = t3.push(n3);
1495
+ o3 || (a2 = true, e2.pause());
1496
+ }
1497
+ }), e2) void 0 === this[o2] && "function" == typeof e2[o2] && (this[o2] = /* @__PURE__ */ function(t4) {
1498
+ return function() {
1499
+ return e2[t4].apply(e2, arguments);
1500
+ };
1501
+ }(o2));
1502
+ for (var i2 = 0; i2 < $.length; i2++) e2.on($[i2], this.emit.bind(this, $[i2]));
1503
+ return this._read = function(t4) {
1504
+ x("wrapped _read", t4), a2 && (a2 = false, e2.resume());
1505
+ }, this;
1506
+ }, "function" == typeof Symbol && (s.prototype[Symbol.asyncIterator] = function() {
1507
+ return void 0 === B && (B = e("./internal/streams/async_iterator")), B(this);
1508
+ }), Object.defineProperty(s.prototype, "readableHighWaterMark", { enumerable: false, get: function() {
1509
+ return this._readableState.highWaterMark;
1510
+ } }), Object.defineProperty(s.prototype, "readableBuffer", { enumerable: false, get: function() {
1511
+ return this._readableState && this._readableState.buffer;
1512
+ } }), Object.defineProperty(s.prototype, "readableFlowing", { enumerable: false, get: function() {
1513
+ return this._readableState.flowing;
1514
+ }, set: function(e2) {
1515
+ this._readableState && (this._readableState.flowing = e2);
1516
+ } }), s._fromList = T, Object.defineProperty(s.prototype, "readableLength", { enumerable: false, get: function() {
1517
+ return this._readableState.length;
1518
+ } }), "function" == typeof Symbol && (s.from = function(t3, n3) {
1519
+ return void 0 === U && (U = e("./internal/streams/from")), U(s, t3, n3);
1520
+ });
1521
+ }).call(this);
1522
+ }).call(this, e("_process"), "undefined" == typeof commonjsGlobal ? "undefined" == typeof self ? "undefined" == typeof window ? {} : window : self : commonjsGlobal);
1523
+ }, { "../errors": 15, "./_stream_duplex": 16, "./internal/streams/async_iterator": 21, "./internal/streams/buffer_list": 22, "./internal/streams/destroy": 23, "./internal/streams/from": 25, "./internal/streams/state": 27, "./internal/streams/stream": 28, _process: 12, buffer: 3, events: 7, inherits: 10, "string_decoder/": 31, util: 2 }], 19: [function(e, t2) {
1524
+ "use strict";
1525
+ function n2(e2, t3) {
1526
+ var n3 = this._transformState;
1527
+ n3.transforming = false;
1528
+ var r3 = n3.writecb;
1529
+ if (null === r3) return this.emit("error", new s());
1530
+ n3.writechunk = null, n3.writecb = null, null != t3 && this.push(t3), r3(e2);
1531
+ var a2 = this._readableState;
1532
+ a2.reading = false, (a2.needReadable || a2.length < a2.highWaterMark) && this._read(a2.highWaterMark);
1533
+ }
1534
+ function r2(e2) {
1535
+ return this instanceof r2 ? void (u.call(this, e2), this._transformState = { afterTransform: n2.bind(this), needTransform: false, transforming: false, writecb: null, writechunk: null, writeencoding: null }, this._readableState.needReadable = true, this._readableState.sync = false, e2 && ("function" == typeof e2.transform && (this._transform = e2.transform), "function" == typeof e2.flush && (this._flush = e2.flush)), this.on("prefinish", a)) : new r2(e2);
1536
+ }
1537
+ function a() {
1538
+ var e2 = this;
1539
+ "function" != typeof this._flush || this._readableState.destroyed ? o(this, null, null) : this._flush(function(t3, n3) {
1540
+ o(e2, t3, n3);
1541
+ });
1542
+ }
1543
+ function o(e2, t3, n3) {
1544
+ if (t3) return e2.emit("error", t3);
1545
+ if (null != n3 && e2.push(n3), e2._writableState.length) throw new c();
1546
+ if (e2._transformState.transforming) throw new l();
1547
+ return e2.push(null);
1548
+ }
1549
+ t2.exports = r2;
1550
+ var i = e("../errors").codes, d = i.ERR_METHOD_NOT_IMPLEMENTED, s = i.ERR_MULTIPLE_CALLBACK, l = i.ERR_TRANSFORM_ALREADY_TRANSFORMING, c = i.ERR_TRANSFORM_WITH_LENGTH_0, u = e("./_stream_duplex");
1551
+ e("inherits")(r2, u), r2.prototype.push = function(e2, t3) {
1552
+ return this._transformState.needTransform = false, u.prototype.push.call(this, e2, t3);
1553
+ }, r2.prototype._transform = function(e2, t3, n3) {
1554
+ n3(new d("_transform()"));
1555
+ }, r2.prototype._write = function(e2, t3, n3) {
1556
+ var r3 = this._transformState;
1557
+ if (r3.writecb = n3, r3.writechunk = e2, r3.writeencoding = t3, !r3.transforming) {
1558
+ var a2 = this._readableState;
1559
+ (r3.needTransform || a2.needReadable || a2.length < a2.highWaterMark) && this._read(a2.highWaterMark);
1560
+ }
1561
+ }, r2.prototype._read = function() {
1562
+ var e2 = this._transformState;
1563
+ null === e2.writechunk || e2.transforming ? e2.needTransform = true : (e2.transforming = true, this._transform(e2.writechunk, e2.writeencoding, e2.afterTransform));
1564
+ }, r2.prototype._destroy = function(e2, t3) {
1565
+ u.prototype._destroy.call(this, e2, function(e3) {
1566
+ t3(e3);
1567
+ });
1568
+ };
1569
+ }, { "../errors": 15, "./_stream_duplex": 16, inherits: 10 }], 20: [function(e, t2) {
1570
+ (function(n2, r2) {
1571
+ (function() {
1572
+ "use strict";
1573
+ function a(e2) {
1574
+ var t3 = this;
1575
+ this.next = null, this.entry = null, this.finish = function() {
1576
+ v(t3, e2);
1577
+ };
1578
+ }
1579
+ function o(e2) {
1580
+ return x.from(e2);
1581
+ }
1582
+ function i(e2) {
1583
+ return x.isBuffer(e2) || e2 instanceof N;
1584
+ }
1585
+ function d() {
1586
+ }
1587
+ function s(t3, n3, r3) {
1588
+ k = k || e("./_stream_duplex"), t3 = t3 || {}, "boolean" != typeof r3 && (r3 = n3 instanceof k), this.objectMode = !!t3.objectMode, r3 && (this.objectMode = this.objectMode || !!t3.writableObjectMode), this.highWaterMark = P(this, t3, "writableHighWaterMark", r3), this.finalCalled = false, this.needDrain = false, this.ending = false, this.ended = false, this.finished = false, this.destroyed = false;
1589
+ var o2 = false === t3.decodeStrings;
1590
+ this.decodeStrings = !o2, this.defaultEncoding = t3.defaultEncoding || "utf8", this.length = 0, this.writing = false, this.corked = 0, this.sync = true, this.bufferProcessing = false, this.onwrite = function(e2) {
1591
+ m(n3, e2);
1592
+ }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = false, this.errorEmitted = false, this.emitClose = false !== t3.emitClose, this.autoDestroy = !!t3.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new a(this);
1593
+ }
1594
+ function l(t3) {
1595
+ k = k || e("./_stream_duplex");
1596
+ var n3 = this instanceof k;
1597
+ return n3 || V.call(l, this) ? void (this._writableState = new s(t3, this, n3), this.writable = true, t3 && ("function" == typeof t3.write && (this._write = t3.write), "function" == typeof t3.writev && (this._writev = t3.writev), "function" == typeof t3.destroy && (this._destroy = t3.destroy), "function" == typeof t3.final && (this._final = t3.final)), A.call(this)) : new l(t3);
1598
+ }
1599
+ function c(e2, t3) {
1600
+ var r3 = new W();
1601
+ Y(e2, r3), n2.nextTick(t3, r3);
1602
+ }
1603
+ function u(e2, t3, r3, a2) {
1604
+ var o2;
1605
+ return null === r3 ? o2 = new q() : "string" != typeof r3 && !t3.objectMode && (o2 = new O("chunk", ["string", "Buffer"], r3)), !o2 || (Y(e2, o2), n2.nextTick(a2, o2), false);
1606
+ }
1607
+ function p(e2, t3, n3) {
1608
+ return e2.objectMode || false === e2.decodeStrings || "string" != typeof t3 || (t3 = x.from(t3, n3)), t3;
1609
+ }
1610
+ function f(e2, t3, n3, r3, a2, o2) {
1611
+ if (!n3) {
1612
+ var i2 = p(t3, r3, a2);
1613
+ r3 !== i2 && (n3 = true, a2 = "buffer", r3 = i2);
1614
+ }
1615
+ var d2 = t3.objectMode ? 1 : r3.length;
1616
+ t3.length += d2;
1617
+ var s2 = t3.length < t3.highWaterMark;
1618
+ if (s2 || (t3.needDrain = true), t3.writing || t3.corked) {
1619
+ var l2 = t3.lastBufferedRequest;
1620
+ t3.lastBufferedRequest = { chunk: r3, encoding: a2, isBuf: n3, callback: o2, next: null }, l2 ? l2.next = t3.lastBufferedRequest : t3.bufferedRequest = t3.lastBufferedRequest, t3.bufferedRequestCount += 1;
1621
+ } else g(e2, t3, false, d2, r3, a2, o2);
1622
+ return s2;
1623
+ }
1624
+ function g(e2, t3, n3, r3, a2, o2, i2) {
1625
+ t3.writelen = r3, t3.writecb = i2, t3.writing = true, t3.sync = true, t3.destroyed ? t3.onwrite(new j("write")) : n3 ? e2._writev(a2, t3.onwrite) : e2._write(a2, o2, t3.onwrite), t3.sync = false;
1626
+ }
1627
+ function _(e2, t3, r3, a2, o2) {
1628
+ --t3.pendingcb, r3 ? (n2.nextTick(o2, a2), n2.nextTick(S, e2, t3), e2._writableState.errorEmitted = true, Y(e2, a2)) : (o2(a2), e2._writableState.errorEmitted = true, Y(e2, a2), S(e2, t3));
1629
+ }
1630
+ function h(e2) {
1631
+ e2.writing = false, e2.writecb = null, e2.length -= e2.writelen, e2.writelen = 0;
1632
+ }
1633
+ function m(e2, t3) {
1634
+ var r3 = e2._writableState, a2 = r3.sync, o2 = r3.writecb;
1635
+ if ("function" != typeof o2) throw new B();
1636
+ if (h(r3), t3) _(e2, r3, a2, t3, o2);
1637
+ else {
1638
+ var i2 = R(r3) || e2.destroyed;
1639
+ i2 || r3.corked || r3.bufferProcessing || !r3.bufferedRequest || C(e2, r3), a2 ? n2.nextTick(b, e2, r3, i2, o2) : b(e2, r3, i2, o2);
1640
+ }
1641
+ }
1642
+ function b(e2, t3, n3, r3) {
1643
+ n3 || y(e2, t3), t3.pendingcb--, r3(), S(e2, t3);
1644
+ }
1645
+ function y(e2, t3) {
1646
+ 0 === t3.length && t3.needDrain && (t3.needDrain = false, e2.emit("drain"));
1647
+ }
1648
+ function C(e2, t3) {
1649
+ t3.bufferProcessing = true;
1650
+ var n3 = t3.bufferedRequest;
1651
+ if (e2._writev && n3 && n3.next) {
1652
+ var r3 = t3.bufferedRequestCount, o2 = Array(r3), i2 = t3.corkedRequestsFree;
1653
+ i2.entry = n3;
1654
+ for (var d2 = 0, s2 = true; n3; ) o2[d2] = n3, n3.isBuf || (s2 = false), n3 = n3.next, d2 += 1;
1655
+ o2.allBuffers = s2, g(e2, t3, true, t3.length, o2, "", i2.finish), t3.pendingcb++, t3.lastBufferedRequest = null, i2.next ? (t3.corkedRequestsFree = i2.next, i2.next = null) : t3.corkedRequestsFree = new a(t3), t3.bufferedRequestCount = 0;
1656
+ } else {
1657
+ for (; n3; ) {
1658
+ var l2 = n3.chunk, c2 = n3.encoding, u2 = n3.callback, p2 = t3.objectMode ? 1 : l2.length;
1659
+ if (g(e2, t3, false, p2, l2, c2, u2), n3 = n3.next, t3.bufferedRequestCount--, t3.writing) break;
1660
+ }
1661
+ null === n3 && (t3.lastBufferedRequest = null);
1662
+ }
1663
+ t3.bufferedRequest = n3, t3.bufferProcessing = false;
1664
+ }
1665
+ function R(e2) {
1666
+ return e2.ending && 0 === e2.length && null === e2.bufferedRequest && !e2.finished && !e2.writing;
1667
+ }
1668
+ function E(e2, t3) {
1669
+ e2._final(function(n3) {
1670
+ t3.pendingcb--, n3 && Y(e2, n3), t3.prefinished = true, e2.emit("prefinish"), S(e2, t3);
1671
+ });
1672
+ }
1673
+ function w(e2, t3) {
1674
+ t3.prefinished || t3.finalCalled || ("function" != typeof e2._final || t3.destroyed ? (t3.prefinished = true, e2.emit("prefinish")) : (t3.pendingcb++, t3.finalCalled = true, n2.nextTick(E, e2, t3)));
1675
+ }
1676
+ function S(e2, t3) {
1677
+ var n3 = R(t3);
1678
+ if (n3 && (w(e2, t3), 0 === t3.pendingcb && (t3.finished = true, e2.emit("finish"), t3.autoDestroy))) {
1679
+ var r3 = e2._readableState;
1680
+ (!r3 || r3.autoDestroy && r3.endEmitted) && e2.destroy();
1681
+ }
1682
+ return n3;
1683
+ }
1684
+ function T(e2, t3, r3) {
1685
+ t3.ending = true, S(e2, t3), r3 && (t3.finished ? n2.nextTick(r3) : e2.once("finish", r3)), t3.ended = true, e2.writable = false;
1686
+ }
1687
+ function v(e2, t3, n3) {
1688
+ var r3 = e2.entry;
1689
+ for (e2.entry = null; r3; ) {
1690
+ var a2 = r3.callback;
1691
+ t3.pendingcb--, a2(n3), r3 = r3.next;
1692
+ }
1693
+ t3.corkedRequestsFree.next = e2;
1694
+ }
1695
+ t2.exports = l;
1696
+ var k;
1697
+ l.WritableState = s;
1698
+ var L = { deprecate: e("util-deprecate") }, A = e("./internal/streams/stream"), x = e("buffer").Buffer, N = r2.Uint8Array || function() {
1699
+ }, D = e("./internal/streams/destroy"), I = e("./internal/streams/state"), P = I.getHighWaterMark, M = e("../errors").codes, O = M.ERR_INVALID_ARG_TYPE, F = M.ERR_METHOD_NOT_IMPLEMENTED, B = M.ERR_MULTIPLE_CALLBACK, U = M.ERR_STREAM_CANNOT_PIPE, j = M.ERR_STREAM_DESTROYED, q = M.ERR_STREAM_NULL_VALUES, W = M.ERR_STREAM_WRITE_AFTER_END, H = M.ERR_UNKNOWN_ENCODING, Y = D.errorOrDestroy;
1700
+ e("inherits")(l, A), s.prototype.getBuffer = function() {
1701
+ for (var e2 = this.bufferedRequest, t3 = []; e2; ) t3.push(e2), e2 = e2.next;
1702
+ return t3;
1703
+ }, function() {
1704
+ try {
1705
+ Object.defineProperty(s.prototype, "buffer", { get: L.deprecate(function() {
1706
+ return this.getBuffer();
1707
+ }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") });
1708
+ } catch (e2) {
1709
+ }
1710
+ }();
1711
+ var V;
1712
+ "function" == typeof Symbol && Symbol.hasInstance && "function" == typeof Function.prototype[Symbol.hasInstance] ? (V = Function.prototype[Symbol.hasInstance], Object.defineProperty(l, Symbol.hasInstance, { value: function(e2) {
1713
+ return !!V.call(this, e2) || !(this !== l) && e2 && e2._writableState instanceof s;
1714
+ } })) : V = function(e2) {
1715
+ return e2 instanceof this;
1716
+ }, l.prototype.pipe = function() {
1717
+ Y(this, new U());
1718
+ }, l.prototype.write = function(e2, t3, n3) {
1719
+ var r3 = this._writableState, a2 = false, s2 = !r3.objectMode && i(e2);
1720
+ return s2 && !x.isBuffer(e2) && (e2 = o(e2)), "function" == typeof t3 && (n3 = t3, t3 = null), s2 ? t3 = "buffer" : !t3 && (t3 = r3.defaultEncoding), "function" != typeof n3 && (n3 = d), r3.ending ? c(this, n3) : (s2 || u(this, r3, e2, n3)) && (r3.pendingcb++, a2 = f(this, r3, s2, e2, t3, n3)), a2;
1721
+ }, l.prototype.cork = function() {
1722
+ this._writableState.corked++;
1723
+ }, l.prototype.uncork = function() {
1724
+ var e2 = this._writableState;
1725
+ e2.corked && (e2.corked--, !e2.writing && !e2.corked && !e2.bufferProcessing && e2.bufferedRequest && C(this, e2));
1726
+ }, l.prototype.setDefaultEncoding = function(e2) {
1727
+ if ("string" == typeof e2 && (e2 = e2.toLowerCase()), !(-1 < ["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((e2 + "").toLowerCase()))) throw new H(e2);
1728
+ return this._writableState.defaultEncoding = e2, this;
1729
+ }, Object.defineProperty(l.prototype, "writableBuffer", { enumerable: false, get: function() {
1730
+ return this._writableState && this._writableState.getBuffer();
1731
+ } }), Object.defineProperty(l.prototype, "writableHighWaterMark", { enumerable: false, get: function() {
1732
+ return this._writableState.highWaterMark;
1733
+ } }), l.prototype._write = function(e2, t3, n3) {
1734
+ n3(new F("_write()"));
1735
+ }, l.prototype._writev = null, l.prototype.end = function(e2, t3, n3) {
1736
+ var r3 = this._writableState;
1737
+ return "function" == typeof e2 ? (n3 = e2, e2 = null, t3 = null) : "function" == typeof t3 && (n3 = t3, t3 = null), null !== e2 && void 0 !== e2 && this.write(e2, t3), r3.corked && (r3.corked = 1, this.uncork()), r3.ending || T(this, r3, n3), this;
1738
+ }, Object.defineProperty(l.prototype, "writableLength", { enumerable: false, get: function() {
1739
+ return this._writableState.length;
1740
+ } }), Object.defineProperty(l.prototype, "destroyed", { enumerable: false, get: function() {
1741
+ return void 0 !== this._writableState && this._writableState.destroyed;
1742
+ }, set: function(e2) {
1743
+ this._writableState && (this._writableState.destroyed = e2);
1744
+ } }), l.prototype.destroy = D.destroy, l.prototype._undestroy = D.undestroy, l.prototype._destroy = function(e2, t3) {
1745
+ t3(e2);
1746
+ };
1747
+ }).call(this);
1748
+ }).call(this, e("_process"), "undefined" == typeof commonjsGlobal ? "undefined" == typeof self ? "undefined" == typeof window ? {} : window : self : commonjsGlobal);
1749
+ }, { "../errors": 15, "./_stream_duplex": 16, "./internal/streams/destroy": 23, "./internal/streams/state": 27, "./internal/streams/stream": 28, _process: 12, buffer: 3, inherits: 10, "util-deprecate": 32 }], 21: [function(e, t2) {
1750
+ (function(n2) {
1751
+ (function() {
1752
+ "use strict";
1753
+ function r2(e2, t3, n3) {
1754
+ return t3 in e2 ? Object.defineProperty(e2, t3, { value: n3, enumerable: true, configurable: true, writable: true }) : e2[t3] = n3, e2;
1755
+ }
1756
+ function a(e2, t3) {
1757
+ return { value: e2, done: t3 };
1758
+ }
1759
+ function o(e2) {
1760
+ var t3 = e2[c];
1761
+ if (null !== t3) {
1762
+ var n3 = e2[h].read();
1763
+ null !== n3 && (e2[g] = null, e2[c] = null, e2[u] = null, t3(a(n3, false)));
1764
+ }
1765
+ }
1766
+ function i(e2) {
1767
+ n2.nextTick(o, e2);
1768
+ }
1769
+ function d(e2, t3) {
1770
+ return function(n3, r3) {
1771
+ e2.then(function() {
1772
+ return t3[f] ? void n3(a(void 0, true)) : void t3[_](n3, r3);
1773
+ }, r3);
1774
+ };
1775
+ }
1776
+ var s, l = e("./end-of-stream"), c = Symbol("lastResolve"), u = Symbol("lastReject"), p = Symbol("error"), f = Symbol("ended"), g = Symbol("lastPromise"), _ = Symbol("handlePromise"), h = Symbol("stream"), m = Object.getPrototypeOf(function() {
1777
+ }), b = Object.setPrototypeOf((s = { get stream() {
1778
+ return this[h];
1779
+ }, next: function() {
1780
+ var e2 = this, t3 = this[p];
1781
+ if (null !== t3) return Promise.reject(t3);
1782
+ if (this[f]) return Promise.resolve(a(void 0, true));
1783
+ if (this[h].destroyed) return new Promise(function(t4, r4) {
1784
+ n2.nextTick(function() {
1785
+ e2[p] ? r4(e2[p]) : t4(a(void 0, true));
1786
+ });
1787
+ });
1788
+ var r3, o2 = this[g];
1789
+ if (o2) r3 = new Promise(d(o2, this));
1790
+ else {
1791
+ var i2 = this[h].read();
1792
+ if (null !== i2) return Promise.resolve(a(i2, false));
1793
+ r3 = new Promise(this[_]);
1794
+ }
1795
+ return this[g] = r3, r3;
1796
+ } }, r2(s, Symbol.asyncIterator, function() {
1797
+ return this;
1798
+ }), r2(s, "return", function() {
1799
+ var e2 = this;
1800
+ return new Promise(function(t3, n3) {
1801
+ e2[h].destroy(null, function(e3) {
1802
+ return e3 ? void n3(e3) : void t3(a(void 0, true));
1803
+ });
1804
+ });
1805
+ }), s), m);
1806
+ t2.exports = function(e2) {
1807
+ var t3, n3 = Object.create(b, (t3 = {}, r2(t3, h, { value: e2, writable: true }), r2(t3, c, { value: null, writable: true }), r2(t3, u, { value: null, writable: true }), r2(t3, p, { value: null, writable: true }), r2(t3, f, { value: e2._readableState.endEmitted, writable: true }), r2(t3, _, { value: function(e3, t4) {
1808
+ var r3 = n3[h].read();
1809
+ r3 ? (n3[g] = null, n3[c] = null, n3[u] = null, e3(a(r3, false))) : (n3[c] = e3, n3[u] = t4);
1810
+ }, writable: true }), t3));
1811
+ return n3[g] = null, l(e2, function(e3) {
1812
+ if (e3 && "ERR_STREAM_PREMATURE_CLOSE" !== e3.code) {
1813
+ var t4 = n3[u];
1814
+ return null !== t4 && (n3[g] = null, n3[c] = null, n3[u] = null, t4(e3)), void (n3[p] = e3);
1815
+ }
1816
+ var r3 = n3[c];
1817
+ null !== r3 && (n3[g] = null, n3[c] = null, n3[u] = null, r3(a(void 0, true))), n3[f] = true;
1818
+ }), e2.on("readable", i.bind(null, n3)), n3;
1819
+ };
1820
+ }).call(this);
1821
+ }).call(this, e("_process"));
1822
+ }, { "./end-of-stream": 24, _process: 12 }], 22: [function(e, t2) {
1823
+ "use strict";
1824
+ function n2(e2, t3) {
1825
+ var n3 = Object.keys(e2);
1826
+ if (Object.getOwnPropertySymbols) {
1827
+ var r3 = Object.getOwnPropertySymbols(e2);
1828
+ t3 && (r3 = r3.filter(function(t4) {
1829
+ return Object.getOwnPropertyDescriptor(e2, t4).enumerable;
1830
+ })), n3.push.apply(n3, r3);
1831
+ }
1832
+ return n3;
1833
+ }
1834
+ function r2(e2) {
1835
+ for (var t3, r3 = 1; r3 < arguments.length; r3++) t3 = null == arguments[r3] ? {} : arguments[r3], r3 % 2 ? n2(Object(t3), true).forEach(function(n3) {
1836
+ a(e2, n3, t3[n3]);
1837
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t3)) : n2(Object(t3)).forEach(function(n3) {
1838
+ Object.defineProperty(e2, n3, Object.getOwnPropertyDescriptor(t3, n3));
1839
+ });
1840
+ return e2;
1841
+ }
1842
+ function a(e2, t3, n3) {
1843
+ return t3 in e2 ? Object.defineProperty(e2, t3, { value: n3, enumerable: true, configurable: true, writable: true }) : e2[t3] = n3, e2;
1844
+ }
1845
+ function o(e2, t3) {
1846
+ if (!(e2 instanceof t3)) throw new TypeError("Cannot call a class as a function");
1847
+ }
1848
+ function i(e2, t3) {
1849
+ for (var n3, r3 = 0; r3 < t3.length; r3++) n3 = t3[r3], n3.enumerable = n3.enumerable || false, n3.configurable = true, "value" in n3 && (n3.writable = true), Object.defineProperty(e2, n3.key, n3);
1850
+ }
1851
+ function d(e2, t3, n3) {
1852
+ return t3 && i(e2.prototype, t3), n3 && i(e2, n3), e2;
1853
+ }
1854
+ function s(e2, t3, n3) {
1855
+ u.prototype.copy.call(e2, t3, n3);
1856
+ }
1857
+ var l = e("buffer"), u = l.Buffer, p = e("util"), f = p.inspect, g = f && f.custom || "inspect";
1858
+ t2.exports = function() {
1859
+ function e2() {
1860
+ o(this, e2), this.head = null, this.tail = null, this.length = 0;
1861
+ }
1862
+ return d(e2, [{ key: "push", value: function(e3) {
1863
+ var t3 = { data: e3, next: null };
1864
+ 0 < this.length ? this.tail.next = t3 : this.head = t3, this.tail = t3, ++this.length;
1865
+ } }, { key: "unshift", value: function(e3) {
1866
+ var t3 = { data: e3, next: this.head };
1867
+ 0 === this.length && (this.tail = t3), this.head = t3, ++this.length;
1868
+ } }, { key: "shift", value: function() {
1869
+ if (0 !== this.length) {
1870
+ var e3 = this.head.data;
1871
+ return this.head = 1 === this.length ? this.tail = null : this.head.next, --this.length, e3;
1872
+ }
1873
+ } }, { key: "clear", value: function() {
1874
+ this.head = this.tail = null, this.length = 0;
1875
+ } }, { key: "join", value: function(e3) {
1876
+ if (0 === this.length) return "";
1877
+ for (var t3 = this.head, n3 = "" + t3.data; t3 = t3.next; ) n3 += e3 + t3.data;
1878
+ return n3;
1879
+ } }, { key: "concat", value: function(e3) {
1880
+ if (0 === this.length) return u.alloc(0);
1881
+ for (var t3 = u.allocUnsafe(e3 >>> 0), n3 = this.head, r3 = 0; n3; ) s(n3.data, t3, r3), r3 += n3.data.length, n3 = n3.next;
1882
+ return t3;
1883
+ } }, { key: "consume", value: function(e3, t3) {
1884
+ var n3;
1885
+ return e3 < this.head.data.length ? (n3 = this.head.data.slice(0, e3), this.head.data = this.head.data.slice(e3)) : e3 === this.head.data.length ? n3 = this.shift() : n3 = t3 ? this._getString(e3) : this._getBuffer(e3), n3;
1886
+ } }, { key: "first", value: function() {
1887
+ return this.head.data;
1888
+ } }, { key: "_getString", value: function(e3) {
1889
+ var t3 = this.head, r3 = 1, a2 = t3.data;
1890
+ for (e3 -= a2.length; t3 = t3.next; ) {
1891
+ var o2 = t3.data, i2 = e3 > o2.length ? o2.length : e3;
1892
+ if (a2 += i2 === o2.length ? o2 : o2.slice(0, e3), e3 -= i2, 0 === e3) {
1893
+ i2 === o2.length ? (++r3, this.head = t3.next ? t3.next : this.tail = null) : (this.head = t3, t3.data = o2.slice(i2));
1894
+ break;
1895
+ }
1896
+ ++r3;
1897
+ }
1898
+ return this.length -= r3, a2;
1899
+ } }, { key: "_getBuffer", value: function(e3) {
1900
+ var t3 = u.allocUnsafe(e3), r3 = this.head, a2 = 1;
1901
+ for (r3.data.copy(t3), e3 -= r3.data.length; r3 = r3.next; ) {
1902
+ var o2 = r3.data, i2 = e3 > o2.length ? o2.length : e3;
1903
+ if (o2.copy(t3, t3.length - e3, 0, i2), e3 -= i2, 0 === e3) {
1904
+ i2 === o2.length ? (++a2, this.head = r3.next ? r3.next : this.tail = null) : (this.head = r3, r3.data = o2.slice(i2));
1905
+ break;
1906
+ }
1907
+ ++a2;
1908
+ }
1909
+ return this.length -= a2, t3;
1910
+ } }, { key: g, value: function(e3, t3) {
1911
+ return f(this, r2({}, t3, { depth: 0, customInspect: false }));
1912
+ } }]), e2;
1913
+ }();
1914
+ }, { buffer: 3, util: 2 }], 23: [function(e, t2) {
1915
+ (function(e2) {
1916
+ (function() {
1917
+ "use strict";
1918
+ function n2(e3, t3) {
1919
+ a(e3, t3), r2(e3);
1920
+ }
1921
+ function r2(e3) {
1922
+ e3._writableState && !e3._writableState.emitClose || e3._readableState && !e3._readableState.emitClose || e3.emit("close");
1923
+ }
1924
+ function a(e3, t3) {
1925
+ e3.emit("error", t3);
1926
+ }
1927
+ t2.exports = { destroy: function(t3, o) {
1928
+ var i = this, d = this._readableState && this._readableState.destroyed, s = this._writableState && this._writableState.destroyed;
1929
+ return d || s ? (o ? o(t3) : t3 && (this._writableState ? !this._writableState.errorEmitted && (this._writableState.errorEmitted = true, e2.nextTick(a, this, t3)) : e2.nextTick(a, this, t3)), this) : (this._readableState && (this._readableState.destroyed = true), this._writableState && (this._writableState.destroyed = true), this._destroy(t3 || null, function(t4) {
1930
+ !o && t4 ? i._writableState ? i._writableState.errorEmitted ? e2.nextTick(r2, i) : (i._writableState.errorEmitted = true, e2.nextTick(n2, i, t4)) : e2.nextTick(n2, i, t4) : o ? (e2.nextTick(r2, i), o(t4)) : e2.nextTick(r2, i);
1931
+ }), this);
1932
+ }, undestroy: function() {
1933
+ this._readableState && (this._readableState.destroyed = false, this._readableState.reading = false, this._readableState.ended = false, this._readableState.endEmitted = false), this._writableState && (this._writableState.destroyed = false, this._writableState.ended = false, this._writableState.ending = false, this._writableState.finalCalled = false, this._writableState.prefinished = false, this._writableState.finished = false, this._writableState.errorEmitted = false);
1934
+ }, errorOrDestroy: function(e3, t3) {
1935
+ var n3 = e3._readableState, r3 = e3._writableState;
1936
+ n3 && n3.autoDestroy || r3 && r3.autoDestroy ? e3.destroy(t3) : e3.emit("error", t3);
1937
+ } };
1938
+ }).call(this);
1939
+ }).call(this, e("_process"));
1940
+ }, { _process: 12 }], 24: [function(e, t2) {
1941
+ "use strict";
1942
+ function n2(e2) {
1943
+ var t3 = false;
1944
+ return function() {
1945
+ if (!t3) {
1946
+ t3 = true;
1947
+ for (var n3 = arguments.length, r3 = Array(n3), a2 = 0; a2 < n3; a2++) r3[a2] = arguments[a2];
1948
+ e2.apply(this, r3);
1949
+ }
1950
+ };
1951
+ }
1952
+ function r2() {
1953
+ }
1954
+ function a(e2) {
1955
+ return e2.setHeader && "function" == typeof e2.abort;
1956
+ }
1957
+ function o(e2, t3, d) {
1958
+ if ("function" == typeof t3) return o(e2, null, t3);
1959
+ t3 || (t3 = {}), d = n2(d || r2);
1960
+ var s = t3.readable || false !== t3.readable && e2.readable, l = t3.writable || false !== t3.writable && e2.writable, c = function() {
1961
+ e2.writable || p();
1962
+ }, u = e2._writableState && e2._writableState.finished, p = function() {
1963
+ l = false, u = true, s || d.call(e2);
1964
+ }, f = e2._readableState && e2._readableState.endEmitted, g = function() {
1965
+ s = false, f = true, l || d.call(e2);
1966
+ }, _ = function(t4) {
1967
+ d.call(e2, t4);
1968
+ }, h = function() {
1969
+ var t4;
1970
+ return s && !f ? (e2._readableState && e2._readableState.ended || (t4 = new i()), d.call(e2, t4)) : l && !u ? (e2._writableState && e2._writableState.ended || (t4 = new i()), d.call(e2, t4)) : void 0;
1971
+ }, m = function() {
1972
+ e2.req.on("finish", p);
1973
+ };
1974
+ return a(e2) ? (e2.on("complete", p), e2.on("abort", h), e2.req ? m() : e2.on("request", m)) : l && !e2._writableState && (e2.on("end", c), e2.on("close", c)), e2.on("end", g), e2.on("finish", p), false !== t3.error && e2.on("error", _), e2.on("close", h), function() {
1975
+ e2.removeListener("complete", p), e2.removeListener("abort", h), e2.removeListener("request", m), e2.req && e2.req.removeListener("finish", p), e2.removeListener("end", c), e2.removeListener("close", c), e2.removeListener("finish", p), e2.removeListener("end", g), e2.removeListener("error", _), e2.removeListener("close", h);
1976
+ };
1977
+ }
1978
+ var i = e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;
1979
+ t2.exports = o;
1980
+ }, { "../../../errors": 15 }], 25: [function(e, t2) {
1981
+ t2.exports = function() {
1982
+ throw new Error("Readable.from is not available in the browser");
1983
+ };
1984
+ }, {}], 26: [function(e, t2) {
1985
+ "use strict";
1986
+ function n2(e2) {
1987
+ var t3 = false;
1988
+ return function() {
1989
+ t3 || (t3 = true, e2.apply(void 0, arguments));
1990
+ };
1991
+ }
1992
+ function r2(e2) {
1993
+ if (e2) throw e2;
1994
+ }
1995
+ function a(e2) {
1996
+ return e2.setHeader && "function" == typeof e2.abort;
1997
+ }
1998
+ function o(t3, r3, o2, i2) {
1999
+ i2 = n2(i2);
2000
+ var d2 = false;
2001
+ t3.on("close", function() {
2002
+ d2 = true;
2003
+ }), l === void 0 && (l = e("./end-of-stream")), l(t3, { readable: r3, writable: o2 }, function(e2) {
2004
+ return e2 ? i2(e2) : void (d2 = true, i2());
2005
+ });
2006
+ var s2 = false;
2007
+ return function(e2) {
2008
+ if (!d2) return s2 ? void 0 : (s2 = true, a(t3) ? t3.abort() : "function" == typeof t3.destroy ? t3.destroy() : void i2(e2 || new p("pipe")));
2009
+ };
2010
+ }
2011
+ function i(e2) {
2012
+ e2();
2013
+ }
2014
+ function d(e2, t3) {
2015
+ return e2.pipe(t3);
2016
+ }
2017
+ function s(e2) {
2018
+ return e2.length ? "function" == typeof e2[e2.length - 1] ? e2.pop() : r2 : r2;
2019
+ }
2020
+ var l, c = e("../../../errors").codes, u = c.ERR_MISSING_ARGS, p = c.ERR_STREAM_DESTROYED;
2021
+ t2.exports = function() {
2022
+ for (var e2 = arguments.length, t3 = Array(e2), n3 = 0; n3 < e2; n3++) t3[n3] = arguments[n3];
2023
+ var r3 = s(t3);
2024
+ if (Array.isArray(t3[0]) && (t3 = t3[0]), 2 > t3.length) throw new u("streams");
2025
+ var a2, l2 = t3.map(function(e3, n4) {
2026
+ var d2 = n4 < t3.length - 1;
2027
+ return o(e3, d2, 0 < n4, function(e4) {
2028
+ a2 || (a2 = e4), e4 && l2.forEach(i), d2 || (l2.forEach(i), r3(a2));
2029
+ });
2030
+ });
2031
+ return t3.reduce(d);
2032
+ };
2033
+ }, { "../../../errors": 15, "./end-of-stream": 24 }], 27: [function(e, n2) {
2034
+ "use strict";
2035
+ function r2(e2, t2, n3) {
2036
+ return null == e2.highWaterMark ? t2 ? e2[n3] : null : e2.highWaterMark;
2037
+ }
2038
+ var a = e("../../../errors").codes.ERR_INVALID_OPT_VALUE;
2039
+ n2.exports = { getHighWaterMark: function(e2, n3, o, i) {
2040
+ var d = r2(n3, i, o);
2041
+ if (null != d) {
2042
+ if (!(isFinite(d) && t(d) === d) || 0 > d) {
2043
+ var s = i ? o : "highWaterMark";
2044
+ throw new a(s, d);
2045
+ }
2046
+ return t(d);
2047
+ }
2048
+ return e2.objectMode ? 16 : 16384;
2049
+ } };
2050
+ }, { "../../../errors": 15 }], 28: [function(e, t2) {
2051
+ t2.exports = e("events").EventEmitter;
2052
+ }, { events: 7 }], 29: [function(e, t2, n2) {
2053
+ n2 = t2.exports = e("./lib/_stream_readable.js"), n2.Stream = n2, n2.Readable = n2, n2.Writable = e("./lib/_stream_writable.js"), n2.Duplex = e("./lib/_stream_duplex.js"), n2.Transform = e("./lib/_stream_transform.js"), n2.PassThrough = e("./lib/_stream_passthrough.js"), n2.finished = e("./lib/internal/streams/end-of-stream.js"), n2.pipeline = e("./lib/internal/streams/pipeline.js");
2054
+ }, { "./lib/_stream_duplex.js": 16, "./lib/_stream_passthrough.js": 17, "./lib/_stream_readable.js": 18, "./lib/_stream_transform.js": 19, "./lib/_stream_writable.js": 20, "./lib/internal/streams/end-of-stream.js": 24, "./lib/internal/streams/pipeline.js": 26 }], 30: [function(e, t2, n2) {
2055
+ function r2(e2, t3) {
2056
+ for (var n3 in e2) t3[n3] = e2[n3];
2057
+ }
2058
+ function a(e2, t3, n3) {
2059
+ return i(e2, t3, n3);
2060
+ }
2061
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
2062
+ var o = e("buffer"), i = o.Buffer;
2063
+ i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow ? t2.exports = o : (r2(o, n2), n2.Buffer = a), a.prototype = Object.create(i.prototype), r2(i, a), a.from = function(e2, t3, n3) {
2064
+ if ("number" == typeof e2) throw new TypeError("Argument must not be a number");
2065
+ return i(e2, t3, n3);
2066
+ }, a.alloc = function(e2, t3, n3) {
2067
+ if ("number" != typeof e2) throw new TypeError("Argument must be a number");
2068
+ var r3 = i(e2);
2069
+ return void 0 === t3 ? r3.fill(0) : "string" == typeof n3 ? r3.fill(t3, n3) : r3.fill(t3), r3;
2070
+ }, a.allocUnsafe = function(e2) {
2071
+ if ("number" != typeof e2) throw new TypeError("Argument must be a number");
2072
+ return i(e2);
2073
+ }, a.allocUnsafeSlow = function(e2) {
2074
+ if ("number" != typeof e2) throw new TypeError("Argument must be a number");
2075
+ return o.SlowBuffer(e2);
2076
+ };
2077
+ }, { buffer: 3 }], 31: [function(e, t2, n2) {
2078
+ "use strict";
2079
+ function r2(e2) {
2080
+ if (!e2) return "utf8";
2081
+ for (var t3; ; ) switch (e2) {
2082
+ case "utf8":
2083
+ case "utf-8":
2084
+ return "utf8";
2085
+ case "ucs2":
2086
+ case "ucs-2":
2087
+ case "utf16le":
2088
+ case "utf-16le":
2089
+ return "utf16le";
2090
+ case "latin1":
2091
+ case "binary":
2092
+ return "latin1";
2093
+ case "base64":
2094
+ case "ascii":
2095
+ case "hex":
2096
+ return e2;
2097
+ default:
2098
+ if (t3) return;
2099
+ e2 = ("" + e2).toLowerCase(), t3 = true;
2100
+ }
2101
+ }
2102
+ function a(e2) {
2103
+ var t3 = r2(e2);
2104
+ if ("string" != typeof t3 && (m.isEncoding === b || !b(e2))) throw new Error("Unknown encoding: " + e2);
2105
+ return t3 || e2;
2106
+ }
2107
+ function o(e2) {
2108
+ this.encoding = a(e2);
2109
+ var t3;
2110
+ switch (this.encoding) {
2111
+ case "utf16le":
2112
+ this.text = u, this.end = p, t3 = 4;
2113
+ break;
2114
+ case "utf8":
2115
+ this.fillLast = c, t3 = 4;
2116
+ break;
2117
+ case "base64":
2118
+ this.text = f, this.end = g, t3 = 3;
2119
+ break;
2120
+ default:
2121
+ return this.write = _, void (this.end = h);
2122
+ }
2123
+ this.lastNeed = 0, this.lastTotal = 0, this.lastChar = m.allocUnsafe(t3);
2124
+ }
2125
+ function d(e2) {
2126
+ if (127 >= e2) return 0;
2127
+ return 6 == e2 >> 5 ? 2 : 14 == e2 >> 4 ? 3 : 30 == e2 >> 3 ? 4 : 2 == e2 >> 6 ? -1 : -2;
2128
+ }
2129
+ function s(e2, t3, n3) {
2130
+ var r3 = t3.length - 1;
2131
+ if (r3 < n3) return 0;
2132
+ var a2 = d(t3[r3]);
2133
+ return 0 <= a2 ? (0 < a2 && (e2.lastNeed = a2 - 1), a2) : --r3 < n3 || -2 === a2 ? 0 : (a2 = d(t3[r3]), 0 <= a2) ? (0 < a2 && (e2.lastNeed = a2 - 2), a2) : --r3 < n3 || -2 === a2 ? 0 : (a2 = d(t3[r3]), 0 <= a2 ? (0 < a2 && (2 === a2 ? a2 = 0 : e2.lastNeed = a2 - 3), a2) : 0);
2134
+ }
2135
+ function l(e2, t3) {
2136
+ if (128 != (192 & t3[0])) return e2.lastNeed = 0, "�";
2137
+ if (1 < e2.lastNeed && 1 < t3.length) {
2138
+ if (128 != (192 & t3[1])) return e2.lastNeed = 1, "�";
2139
+ if (2 < e2.lastNeed && 2 < t3.length && 128 != (192 & t3[2])) return e2.lastNeed = 2, "�";
2140
+ }
2141
+ }
2142
+ function c(e2) {
2143
+ var t3 = this.lastTotal - this.lastNeed, n3 = l(this, e2, t3);
2144
+ return void 0 === n3 ? this.lastNeed <= e2.length ? (e2.copy(this.lastChar, t3, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : void (e2.copy(this.lastChar, t3, 0, e2.length), this.lastNeed -= e2.length) : n3;
2145
+ }
2146
+ function u(e2, t3) {
2147
+ if (0 == (e2.length - t3) % 2) {
2148
+ var n3 = e2.toString("utf16le", t3);
2149
+ if (n3) {
2150
+ var r3 = n3.charCodeAt(n3.length - 1);
2151
+ if (55296 <= r3 && 56319 >= r3) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = e2[e2.length - 2], this.lastChar[1] = e2[e2.length - 1], n3.slice(0, -1);
2152
+ }
2153
+ return n3;
2154
+ }
2155
+ return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = e2[e2.length - 1], e2.toString("utf16le", t3, e2.length - 1);
2156
+ }
2157
+ function p(e2) {
2158
+ var t3 = e2 && e2.length ? this.write(e2) : "";
2159
+ if (this.lastNeed) {
2160
+ var n3 = this.lastTotal - this.lastNeed;
2161
+ return t3 + this.lastChar.toString("utf16le", 0, n3);
2162
+ }
2163
+ return t3;
2164
+ }
2165
+ function f(e2, t3) {
2166
+ var r3 = (e2.length - t3) % 3;
2167
+ return 0 == r3 ? e2.toString("base64", t3) : (this.lastNeed = 3 - r3, this.lastTotal = 3, 1 == r3 ? this.lastChar[0] = e2[e2.length - 1] : (this.lastChar[0] = e2[e2.length - 2], this.lastChar[1] = e2[e2.length - 1]), e2.toString("base64", t3, e2.length - r3));
2168
+ }
2169
+ function g(e2) {
2170
+ var t3 = e2 && e2.length ? this.write(e2) : "";
2171
+ return this.lastNeed ? t3 + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : t3;
2172
+ }
2173
+ function _(e2) {
2174
+ return e2.toString(this.encoding);
2175
+ }
2176
+ function h(e2) {
2177
+ return e2 && e2.length ? this.write(e2) : "";
2178
+ }
2179
+ var m = e("safe-buffer").Buffer, b = m.isEncoding || function(e2) {
2180
+ switch (e2 = "" + e2, e2 && e2.toLowerCase()) {
2181
+ case "hex":
2182
+ case "utf8":
2183
+ case "utf-8":
2184
+ case "ascii":
2185
+ case "binary":
2186
+ case "base64":
2187
+ case "ucs2":
2188
+ case "ucs-2":
2189
+ case "utf16le":
2190
+ case "utf-16le":
2191
+ case "raw":
2192
+ return true;
2193
+ default:
2194
+ return false;
2195
+ }
2196
+ };
2197
+ n2.StringDecoder = o, o.prototype.write = function(e2) {
2198
+ if (0 === e2.length) return "";
2199
+ var t3, n3;
2200
+ if (this.lastNeed) {
2201
+ if (t3 = this.fillLast(e2), void 0 === t3) return "";
2202
+ n3 = this.lastNeed, this.lastNeed = 0;
2203
+ } else n3 = 0;
2204
+ return n3 < e2.length ? t3 ? t3 + this.text(e2, n3) : this.text(e2, n3) : t3 || "";
2205
+ }, o.prototype.end = function(e2) {
2206
+ var t3 = e2 && e2.length ? this.write(e2) : "";
2207
+ return this.lastNeed ? t3 + "�" : t3;
2208
+ }, o.prototype.text = function(e2, t3) {
2209
+ var n3 = s(this, e2, t3);
2210
+ if (!this.lastNeed) return e2.toString("utf8", t3);
2211
+ this.lastTotal = n3;
2212
+ var r3 = e2.length - (n3 - this.lastNeed);
2213
+ return e2.copy(this.lastChar, 0, r3), e2.toString("utf8", t3, r3);
2214
+ }, o.prototype.fillLast = function(e2) {
2215
+ return this.lastNeed <= e2.length ? (e2.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : void (e2.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, e2.length), this.lastNeed -= e2.length);
2216
+ };
2217
+ }, { "safe-buffer": 30 }], 32: [function(e, t2) {
2218
+ (function(e2) {
2219
+ (function() {
2220
+ function n2(t3) {
2221
+ try {
2222
+ if (!e2.localStorage) return false;
2223
+ } catch (e3) {
2224
+ return false;
2225
+ }
2226
+ var n3 = e2.localStorage[t3];
2227
+ return null != n3 && "true" === (n3 + "").toLowerCase();
2228
+ }
2229
+ t2.exports = function(e3, t3) {
2230
+ function r2() {
2231
+ if (!a) {
2232
+ if (n2("throwDeprecation")) throw new Error(t3);
2233
+ else n2("traceDeprecation") ? console.trace(t3) : console.warn(t3);
2234
+ a = true;
2235
+ }
2236
+ return e3.apply(this, arguments);
2237
+ }
2238
+ if (n2("noDeprecation")) return e3;
2239
+ var a = false;
2240
+ return r2;
2241
+ };
2242
+ }).call(this);
2243
+ }).call(this, "undefined" == typeof commonjsGlobal ? "undefined" == typeof self ? "undefined" == typeof window ? {} : window : self : commonjsGlobal);
2244
+ }, {}], "/": [function(e, t2) {
2245
+ function n2(e2) {
2246
+ return e2.replace(/a=ice-options:trickle\s\n/g, "");
2247
+ }
2248
+ function r2(e2) {
2249
+ console.warn(e2);
2250
+ }
2251
+ /*! simple-peer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
2252
+ const a = e("debug")("simple-peer"), o = e("get-browser-rtc"), i = e("randombytes"), d = e("readable-stream"), s = e("queue-microtask"), l = e("err-code"), { Buffer: c } = e("buffer"), u = 65536;
2253
+ class p extends d.Duplex {
2254
+ constructor(e2) {
2255
+ if (e2 = Object.assign({ allowHalfOpen: false }, e2), super(e2), this._id = i(4).toString("hex").slice(0, 7), this._debug("new peer %o", e2), this.channelName = e2.initiator ? e2.channelName || i(20).toString("hex") : null, this.initiator = e2.initiator || false, this.channelConfig = e2.channelConfig || p.channelConfig, this.channelNegotiated = this.channelConfig.negotiated, this.config = Object.assign({}, p.config, e2.config), this.offerOptions = e2.offerOptions || {}, this.answerOptions = e2.answerOptions || {}, this.sdpTransform = e2.sdpTransform || ((e3) => e3), this.streams = e2.streams || (e2.stream ? [e2.stream] : []), this.trickle = void 0 === e2.trickle || e2.trickle, this.allowHalfTrickle = void 0 !== e2.allowHalfTrickle && e2.allowHalfTrickle, this.iceCompleteTimeout = e2.iceCompleteTimeout || 5e3, this.destroyed = false, this.destroying = false, this._connected = false, this.remoteAddress = void 0, this.remoteFamily = void 0, this.remotePort = void 0, this.localAddress = void 0, this.localFamily = void 0, this.localPort = void 0, this._wrtc = e2.wrtc && "object" == typeof e2.wrtc ? e2.wrtc : o(), !this._wrtc) if ("undefined" == typeof window) throw l(new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"), "ERR_WEBRTC_SUPPORT");
2256
+ else throw l(new Error("No WebRTC support: Not a supported browser"), "ERR_WEBRTC_SUPPORT");
2257
+ this._pcReady = false, this._channelReady = false, this._iceComplete = false, this._iceCompleteTimer = null, this._channel = null, this._pendingCandidates = [], this._isNegotiating = false, this._firstNegotiation = true, this._batchedNegotiation = false, this._queuedNegotiation = false, this._sendersAwaitingStable = [], this._senderMap = /* @__PURE__ */ new Map(), this._closingInterval = null, this._remoteTracks = [], this._remoteStreams = [], this._chunk = null, this._cb = null, this._interval = null;
2258
+ try {
2259
+ this._pc = new this._wrtc.RTCPeerConnection(this.config);
2260
+ } catch (e3) {
2261
+ return void this.destroy(l(e3, "ERR_PC_CONSTRUCTOR"));
2262
+ }
2263
+ this._isReactNativeWebrtc = "number" == typeof this._pc._peerConnectionId, this._pc.oniceconnectionstatechange = () => {
2264
+ this._onIceStateChange();
2265
+ }, this._pc.onicegatheringstatechange = () => {
2266
+ this._onIceStateChange();
2267
+ }, this._pc.onconnectionstatechange = () => {
2268
+ this._onConnectionStateChange();
2269
+ }, this._pc.onsignalingstatechange = () => {
2270
+ this._onSignalingStateChange();
2271
+ }, this._pc.onicecandidate = (e3) => {
2272
+ this._onIceCandidate(e3);
2273
+ }, "object" == typeof this._pc.peerIdentity && this._pc.peerIdentity.catch((e3) => {
2274
+ this.destroy(l(e3, "ERR_PC_PEER_IDENTITY"));
2275
+ }), this.initiator || this.channelNegotiated ? this._setupData({ channel: this._pc.createDataChannel(this.channelName, this.channelConfig) }) : this._pc.ondatachannel = (e3) => {
2276
+ this._setupData(e3);
2277
+ }, this.streams && this.streams.forEach((e3) => {
2278
+ this.addStream(e3);
2279
+ }), this._pc.ontrack = (e3) => {
2280
+ this._onTrack(e3);
2281
+ }, this._debug("initial negotiation"), this._needsNegotiation(), this._onFinishBound = () => {
2282
+ this._onFinish();
2283
+ }, this.once("finish", this._onFinishBound);
2284
+ }
2285
+ get bufferSize() {
2286
+ return this._channel && this._channel.bufferedAmount || 0;
2287
+ }
2288
+ get connected() {
2289
+ return this._connected && "open" === this._channel.readyState;
2290
+ }
2291
+ address() {
2292
+ return { port: this.localPort, family: this.localFamily, address: this.localAddress };
2293
+ }
2294
+ signal(e2) {
2295
+ if (!this.destroying) {
2296
+ if (this.destroyed) throw l(new Error("cannot signal after peer is destroyed"), "ERR_DESTROYED");
2297
+ if ("string" == typeof e2) try {
2298
+ e2 = JSON.parse(e2);
2299
+ } catch (t3) {
2300
+ e2 = {};
2301
+ }
2302
+ this._debug("signal()"), e2.renegotiate && this.initiator && (this._debug("got request to renegotiate"), this._needsNegotiation()), e2.transceiverRequest && this.initiator && (this._debug("got request for transceiver"), this.addTransceiver(e2.transceiverRequest.kind, e2.transceiverRequest.init)), e2.candidate && (this._pc.remoteDescription && this._pc.remoteDescription.type ? this._addIceCandidate(e2.candidate) : this._pendingCandidates.push(e2.candidate)), e2.sdp && this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(e2)).then(() => {
2303
+ this.destroyed || (this._pendingCandidates.forEach((e3) => {
2304
+ this._addIceCandidate(e3);
2305
+ }), this._pendingCandidates = [], "offer" === this._pc.remoteDescription.type && this._createAnswer());
2306
+ }).catch((e3) => {
2307
+ this.destroy(l(e3, "ERR_SET_REMOTE_DESCRIPTION"));
2308
+ }), e2.sdp || e2.candidate || e2.renegotiate || e2.transceiverRequest || this.destroy(l(new Error("signal() called with invalid signal data"), "ERR_SIGNALING"));
2309
+ }
2310
+ }
2311
+ _addIceCandidate(e2) {
2312
+ const t3 = new this._wrtc.RTCIceCandidate(e2);
2313
+ this._pc.addIceCandidate(t3).catch((e3) => {
2314
+ !t3.address || t3.address.endsWith(".local") ? r2("Ignoring unsupported ICE candidate.") : this.destroy(l(e3, "ERR_ADD_ICE_CANDIDATE"));
2315
+ });
2316
+ }
2317
+ send(e2) {
2318
+ if (!this.destroying) {
2319
+ if (this.destroyed) throw l(new Error("cannot send after peer is destroyed"), "ERR_DESTROYED");
2320
+ this._channel.send(e2);
2321
+ }
2322
+ }
2323
+ addTransceiver(e2, t3) {
2324
+ if (!this.destroying) {
2325
+ if (this.destroyed) throw l(new Error("cannot addTransceiver after peer is destroyed"), "ERR_DESTROYED");
2326
+ if (this._debug("addTransceiver()"), this.initiator) try {
2327
+ this._pc.addTransceiver(e2, t3), this._needsNegotiation();
2328
+ } catch (e3) {
2329
+ this.destroy(l(e3, "ERR_ADD_TRANSCEIVER"));
2330
+ }
2331
+ else this.emit("signal", { type: "transceiverRequest", transceiverRequest: { kind: e2, init: t3 } });
2332
+ }
2333
+ }
2334
+ addStream(e2) {
2335
+ if (!this.destroying) {
2336
+ if (this.destroyed) throw l(new Error("cannot addStream after peer is destroyed"), "ERR_DESTROYED");
2337
+ this._debug("addStream()"), e2.getTracks().forEach((t3) => {
2338
+ this.addTrack(t3, e2);
2339
+ });
2340
+ }
2341
+ }
2342
+ addTrack(e2, t3) {
2343
+ if (this.destroying) return;
2344
+ if (this.destroyed) throw l(new Error("cannot addTrack after peer is destroyed"), "ERR_DESTROYED");
2345
+ this._debug("addTrack()");
2346
+ const n3 = this._senderMap.get(e2) || /* @__PURE__ */ new Map();
2347
+ let r3 = n3.get(t3);
2348
+ if (!r3) r3 = this._pc.addTrack(e2, t3), n3.set(t3, r3), this._senderMap.set(e2, n3), this._needsNegotiation();
2349
+ else if (r3.removed) throw l(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."), "ERR_SENDER_REMOVED");
2350
+ else throw l(new Error("Track has already been added to that stream."), "ERR_SENDER_ALREADY_ADDED");
2351
+ }
2352
+ replaceTrack(e2, t3, n3) {
2353
+ if (this.destroying) return;
2354
+ if (this.destroyed) throw l(new Error("cannot replaceTrack after peer is destroyed"), "ERR_DESTROYED");
2355
+ this._debug("replaceTrack()");
2356
+ const r3 = this._senderMap.get(e2), a2 = r3 ? r3.get(n3) : null;
2357
+ if (!a2) throw l(new Error("Cannot replace track that was never added."), "ERR_TRACK_NOT_ADDED");
2358
+ t3 && this._senderMap.set(t3, r3), null == a2.replaceTrack ? this.destroy(l(new Error("replaceTrack is not supported in this browser"), "ERR_UNSUPPORTED_REPLACETRACK")) : a2.replaceTrack(t3);
2359
+ }
2360
+ removeTrack(e2, t3) {
2361
+ if (this.destroying) return;
2362
+ if (this.destroyed) throw l(new Error("cannot removeTrack after peer is destroyed"), "ERR_DESTROYED");
2363
+ this._debug("removeSender()");
2364
+ const n3 = this._senderMap.get(e2), r3 = n3 ? n3.get(t3) : null;
2365
+ if (!r3) throw l(new Error("Cannot remove track that was never added."), "ERR_TRACK_NOT_ADDED");
2366
+ try {
2367
+ r3.removed = true, this._pc.removeTrack(r3);
2368
+ } catch (e3) {
2369
+ "NS_ERROR_UNEXPECTED" === e3.name ? this._sendersAwaitingStable.push(r3) : this.destroy(l(e3, "ERR_REMOVE_TRACK"));
2370
+ }
2371
+ this._needsNegotiation();
2372
+ }
2373
+ removeStream(e2) {
2374
+ if (!this.destroying) {
2375
+ if (this.destroyed) throw l(new Error("cannot removeStream after peer is destroyed"), "ERR_DESTROYED");
2376
+ this._debug("removeSenders()"), e2.getTracks().forEach((t3) => {
2377
+ this.removeTrack(t3, e2);
2378
+ });
2379
+ }
2380
+ }
2381
+ _needsNegotiation() {
2382
+ this._debug("_needsNegotiation"), this._batchedNegotiation || (this._batchedNegotiation = true, s(() => {
2383
+ this._batchedNegotiation = false, this.initiator || !this._firstNegotiation ? (this._debug("starting batched negotiation"), this.negotiate()) : this._debug("non-initiator initial negotiation request discarded"), this._firstNegotiation = false;
2384
+ }));
2385
+ }
2386
+ negotiate() {
2387
+ if (!this.destroying) {
2388
+ if (this.destroyed) throw l(new Error("cannot negotiate after peer is destroyed"), "ERR_DESTROYED");
2389
+ this.initiator ? this._isNegotiating ? (this._queuedNegotiation = true, this._debug("already negotiating, queueing")) : (this._debug("start negotiation"), setTimeout(() => {
2390
+ this._createOffer();
2391
+ }, 0)) : this._isNegotiating ? (this._queuedNegotiation = true, this._debug("already negotiating, queueing")) : (this._debug("requesting negotiation from initiator"), this.emit("signal", { type: "renegotiate", renegotiate: true })), this._isNegotiating = true;
2392
+ }
2393
+ }
2394
+ destroy(e2) {
2395
+ this._destroy(e2, () => {
2396
+ });
2397
+ }
2398
+ _destroy(e2, t3) {
2399
+ this.destroyed || this.destroying || (this.destroying = true, this._debug("destroying (error: %s)", e2 && (e2.message || e2)), s(() => {
2400
+ if (this.destroyed = true, this.destroying = false, this._debug("destroy (error: %s)", e2 && (e2.message || e2)), this.readable = this.writable = false, this._readableState.ended || this.push(null), this._writableState.finished || this.end(), this._connected = false, this._pcReady = false, this._channelReady = false, this._remoteTracks = null, this._remoteStreams = null, this._senderMap = null, clearInterval(this._closingInterval), this._closingInterval = null, clearInterval(this._interval), this._interval = null, this._chunk = null, this._cb = null, this._onFinishBound && this.removeListener("finish", this._onFinishBound), this._onFinishBound = null, this._channel) {
2401
+ try {
2402
+ this._channel.close();
2403
+ } catch (e3) {
2404
+ }
2405
+ this._channel.onmessage = null, this._channel.onopen = null, this._channel.onclose = null, this._channel.onerror = null;
2406
+ }
2407
+ if (this._pc) {
2408
+ try {
2409
+ this._pc.close();
2410
+ } catch (e3) {
2411
+ }
2412
+ this._pc.oniceconnectionstatechange = null, this._pc.onicegatheringstatechange = null, this._pc.onsignalingstatechange = null, this._pc.onicecandidate = null, this._pc.ontrack = null, this._pc.ondatachannel = null;
2413
+ }
2414
+ this._pc = null, this._channel = null, e2 && this.emit("error", e2), this.emit("close"), t3();
2415
+ }));
2416
+ }
2417
+ _setupData(e2) {
2418
+ if (!e2.channel) return this.destroy(l(new Error("Data channel event is missing `channel` property"), "ERR_DATA_CHANNEL"));
2419
+ this._channel = e2.channel, this._channel.binaryType = "arraybuffer", "number" == typeof this._channel.bufferedAmountLowThreshold && (this._channel.bufferedAmountLowThreshold = u), this.channelName = this._channel.label, this._channel.onmessage = (e3) => {
2420
+ this._onChannelMessage(e3);
2421
+ }, this._channel.onbufferedamountlow = () => {
2422
+ this._onChannelBufferedAmountLow();
2423
+ }, this._channel.onopen = () => {
2424
+ this._onChannelOpen();
2425
+ }, this._channel.onclose = () => {
2426
+ this._onChannelClose();
2427
+ }, this._channel.onerror = (e3) => {
2428
+ const t4 = e3.error instanceof Error ? e3.error : new Error(`Datachannel error: ${e3.message} ${e3.filename}:${e3.lineno}:${e3.colno}`);
2429
+ this.destroy(l(t4, "ERR_DATA_CHANNEL"));
2430
+ };
2431
+ let t3 = false;
2432
+ this._closingInterval = setInterval(() => {
2433
+ this._channel && "closing" === this._channel.readyState ? (t3 && this._onChannelClose(), t3 = true) : t3 = false;
2434
+ }, 5e3);
2435
+ }
2436
+ _read() {
2437
+ }
2438
+ _write(e2, t3, n3) {
2439
+ if (this.destroyed) return n3(l(new Error("cannot write after peer is destroyed"), "ERR_DATA_CHANNEL"));
2440
+ if (this._connected) {
2441
+ try {
2442
+ this.send(e2);
2443
+ } catch (e3) {
2444
+ return this.destroy(l(e3, "ERR_DATA_CHANNEL"));
2445
+ }
2446
+ this._channel.bufferedAmount > u ? (this._debug("start backpressure: bufferedAmount %d", this._channel.bufferedAmount), this._cb = n3) : n3(null);
2447
+ } else this._debug("write before connect"), this._chunk = e2, this._cb = n3;
2448
+ }
2449
+ _onFinish() {
2450
+ if (!this.destroyed) {
2451
+ const e2 = () => {
2452
+ setTimeout(() => this.destroy(), 1e3);
2453
+ };
2454
+ this._connected ? e2() : this.once("connect", e2);
2455
+ }
2456
+ }
2457
+ _startIceCompleteTimeout() {
2458
+ this.destroyed || this._iceCompleteTimer || (this._debug("started iceComplete timeout"), this._iceCompleteTimer = setTimeout(() => {
2459
+ this._iceComplete || (this._iceComplete = true, this._debug("iceComplete timeout completed"), this.emit("iceTimeout"), this.emit("_iceComplete"));
2460
+ }, this.iceCompleteTimeout));
2461
+ }
2462
+ _createOffer() {
2463
+ this.destroyed || this._pc.createOffer(this.offerOptions).then((e2) => {
2464
+ if (this.destroyed) return;
2465
+ this.trickle || this.allowHalfTrickle || (e2.sdp = n2(e2.sdp)), e2.sdp = this.sdpTransform(e2.sdp);
2466
+ const t3 = () => {
2467
+ if (!this.destroyed) {
2468
+ const t4 = this._pc.localDescription || e2;
2469
+ this._debug("signal"), this.emit("signal", { type: t4.type, sdp: t4.sdp });
2470
+ }
2471
+ };
2472
+ this._pc.setLocalDescription(e2).then(() => {
2473
+ this._debug("createOffer success"), this.destroyed || (this.trickle || this._iceComplete ? t3() : this.once("_iceComplete", t3));
2474
+ }).catch((e3) => {
2475
+ this.destroy(l(e3, "ERR_SET_LOCAL_DESCRIPTION"));
2476
+ });
2477
+ }).catch((e2) => {
2478
+ this.destroy(l(e2, "ERR_CREATE_OFFER"));
2479
+ });
2480
+ }
2481
+ _requestMissingTransceivers() {
2482
+ this._pc.getTransceivers && this._pc.getTransceivers().forEach((e2) => {
2483
+ e2.mid || !e2.sender.track || e2.requested || (e2.requested = true, this.addTransceiver(e2.sender.track.kind));
2484
+ });
2485
+ }
2486
+ _createAnswer() {
2487
+ this.destroyed || this._pc.createAnswer(this.answerOptions).then((e2) => {
2488
+ if (this.destroyed) return;
2489
+ this.trickle || this.allowHalfTrickle || (e2.sdp = n2(e2.sdp)), e2.sdp = this.sdpTransform(e2.sdp);
2490
+ const t3 = () => {
2491
+ if (!this.destroyed) {
2492
+ const t4 = this._pc.localDescription || e2;
2493
+ this._debug("signal"), this.emit("signal", { type: t4.type, sdp: t4.sdp }), this.initiator || this._requestMissingTransceivers();
2494
+ }
2495
+ };
2496
+ this._pc.setLocalDescription(e2).then(() => {
2497
+ this.destroyed || (this.trickle || this._iceComplete ? t3() : this.once("_iceComplete", t3));
2498
+ }).catch((e3) => {
2499
+ this.destroy(l(e3, "ERR_SET_LOCAL_DESCRIPTION"));
2500
+ });
2501
+ }).catch((e2) => {
2502
+ this.destroy(l(e2, "ERR_CREATE_ANSWER"));
2503
+ });
2504
+ }
2505
+ _onConnectionStateChange() {
2506
+ this.destroyed || "failed" === this._pc.connectionState && this.destroy(l(new Error("Connection failed."), "ERR_CONNECTION_FAILURE"));
2507
+ }
2508
+ _onIceStateChange() {
2509
+ if (this.destroyed) return;
2510
+ const e2 = this._pc.iceConnectionState, t3 = this._pc.iceGatheringState;
2511
+ this._debug("iceStateChange (connection: %s) (gathering: %s)", e2, t3), this.emit("iceStateChange", e2, t3), ("connected" === e2 || "completed" === e2) && (this._pcReady = true, this._maybeReady()), "failed" === e2 && this.destroy(l(new Error("Ice connection failed."), "ERR_ICE_CONNECTION_FAILURE")), "closed" === e2 && this.destroy(l(new Error("Ice connection closed."), "ERR_ICE_CONNECTION_CLOSED"));
2512
+ }
2513
+ getStats(e2) {
2514
+ const t3 = (e3) => ("[object Array]" === Object.prototype.toString.call(e3.values) && e3.values.forEach((t4) => {
2515
+ Object.assign(e3, t4);
2516
+ }), e3);
2517
+ 0 === this._pc.getStats.length || this._isReactNativeWebrtc ? this._pc.getStats().then((n3) => {
2518
+ const r3 = [];
2519
+ n3.forEach((e3) => {
2520
+ r3.push(t3(e3));
2521
+ }), e2(null, r3);
2522
+ }, (t4) => e2(t4)) : 0 < this._pc.getStats.length ? this._pc.getStats((n3) => {
2523
+ if (this.destroyed) return;
2524
+ const r3 = [];
2525
+ n3.result().forEach((e3) => {
2526
+ const n4 = {};
2527
+ e3.names().forEach((t4) => {
2528
+ n4[t4] = e3.stat(t4);
2529
+ }), n4.id = e3.id, n4.type = e3.type, n4.timestamp = e3.timestamp, r3.push(t3(n4));
2530
+ }), e2(null, r3);
2531
+ }, (t4) => e2(t4)) : e2(null, []);
2532
+ }
2533
+ _maybeReady() {
2534
+ if (this._debug("maybeReady pc %s channel %s", this._pcReady, this._channelReady), this._connected || this._connecting || !this._pcReady || !this._channelReady) return;
2535
+ this._connecting = true;
2536
+ const e2 = () => {
2537
+ this.destroyed || this.getStats((t3, n3) => {
2538
+ if (this.destroyed) return;
2539
+ t3 && (n3 = []);
2540
+ const r3 = {}, a2 = {}, o2 = {};
2541
+ let i2 = false;
2542
+ n3.forEach((e3) => {
2543
+ ("remotecandidate" === e3.type || "remote-candidate" === e3.type) && (r3[e3.id] = e3), ("localcandidate" === e3.type || "local-candidate" === e3.type) && (a2[e3.id] = e3), ("candidatepair" === e3.type || "candidate-pair" === e3.type) && (o2[e3.id] = e3);
2544
+ });
2545
+ const d2 = (e3) => {
2546
+ i2 = true;
2547
+ let t4 = a2[e3.localCandidateId];
2548
+ t4 && (t4.ip || t4.address) ? (this.localAddress = t4.ip || t4.address, this.localPort = +t4.port) : t4 && t4.ipAddress ? (this.localAddress = t4.ipAddress, this.localPort = +t4.portNumber) : "string" == typeof e3.googLocalAddress && (t4 = e3.googLocalAddress.split(":"), this.localAddress = t4[0], this.localPort = +t4[1]), this.localAddress && (this.localFamily = this.localAddress.includes(":") ? "IPv6" : "IPv4");
2549
+ let n4 = r3[e3.remoteCandidateId];
2550
+ n4 && (n4.ip || n4.address) ? (this.remoteAddress = n4.ip || n4.address, this.remotePort = +n4.port) : n4 && n4.ipAddress ? (this.remoteAddress = n4.ipAddress, this.remotePort = +n4.portNumber) : "string" == typeof e3.googRemoteAddress && (n4 = e3.googRemoteAddress.split(":"), this.remoteAddress = n4[0], this.remotePort = +n4[1]), this.remoteAddress && (this.remoteFamily = this.remoteAddress.includes(":") ? "IPv6" : "IPv4"), this._debug("connect local: %s:%s remote: %s:%s", this.localAddress, this.localPort, this.remoteAddress, this.remotePort);
2551
+ };
2552
+ if (n3.forEach((e3) => {
2553
+ "transport" === e3.type && e3.selectedCandidatePairId && d2(o2[e3.selectedCandidatePairId]), ("googCandidatePair" === e3.type && "true" === e3.googActiveConnection || ("candidatepair" === e3.type || "candidate-pair" === e3.type) && e3.selected) && d2(e3);
2554
+ }), !i2 && (!Object.keys(o2).length || Object.keys(a2).length)) return void setTimeout(e2, 100);
2555
+ if (this._connecting = false, this._connected = true, this._chunk) {
2556
+ try {
2557
+ this.send(this._chunk);
2558
+ } catch (e4) {
2559
+ return this.destroy(l(e4, "ERR_DATA_CHANNEL"));
2560
+ }
2561
+ this._chunk = null, this._debug('sent chunk from "write before connect"');
2562
+ const e3 = this._cb;
2563
+ this._cb = null, e3(null);
2564
+ }
2565
+ "number" != typeof this._channel.bufferedAmountLowThreshold && (this._interval = setInterval(() => this._onInterval(), 150), this._interval.unref && this._interval.unref()), this._debug("connect"), this.emit("connect");
2566
+ });
2567
+ };
2568
+ e2();
2569
+ }
2570
+ _onInterval() {
2571
+ this._cb && this._channel && !(this._channel.bufferedAmount > u) && this._onChannelBufferedAmountLow();
2572
+ }
2573
+ _onSignalingStateChange() {
2574
+ this.destroyed || ("stable" === this._pc.signalingState && (this._isNegotiating = false, this._debug("flushing sender queue", this._sendersAwaitingStable), this._sendersAwaitingStable.forEach((e2) => {
2575
+ this._pc.removeTrack(e2), this._queuedNegotiation = true;
2576
+ }), this._sendersAwaitingStable = [], this._queuedNegotiation ? (this._debug("flushing negotiation queue"), this._queuedNegotiation = false, this._needsNegotiation()) : (this._debug("negotiated"), this.emit("negotiated"))), this._debug("signalingStateChange %s", this._pc.signalingState), this.emit("signalingStateChange", this._pc.signalingState));
2577
+ }
2578
+ _onIceCandidate(e2) {
2579
+ this.destroyed || (e2.candidate && this.trickle ? this.emit("signal", { type: "candidate", candidate: { candidate: e2.candidate.candidate, sdpMLineIndex: e2.candidate.sdpMLineIndex, sdpMid: e2.candidate.sdpMid } }) : !e2.candidate && !this._iceComplete && (this._iceComplete = true, this.emit("_iceComplete")), e2.candidate && this._startIceCompleteTimeout());
2580
+ }
2581
+ _onChannelMessage(e2) {
2582
+ if (this.destroyed) return;
2583
+ let t3 = e2.data;
2584
+ t3 instanceof ArrayBuffer && (t3 = c.from(t3)), this.push(t3);
2585
+ }
2586
+ _onChannelBufferedAmountLow() {
2587
+ if (!this.destroyed && this._cb) {
2588
+ this._debug("ending backpressure: bufferedAmount %d", this._channel.bufferedAmount);
2589
+ const e2 = this._cb;
2590
+ this._cb = null, e2(null);
2591
+ }
2592
+ }
2593
+ _onChannelOpen() {
2594
+ this._connected || this.destroyed || (this._debug("on channel open"), this._channelReady = true, this._maybeReady());
2595
+ }
2596
+ _onChannelClose() {
2597
+ this.destroyed || (this._debug("on channel close"), this.destroy());
2598
+ }
2599
+ _onTrack(e2) {
2600
+ this.destroyed || e2.streams.forEach((t3) => {
2601
+ this._debug("on track"), this.emit("track", e2.track, t3), this._remoteTracks.push({ track: e2.track, stream: t3 }), this._remoteStreams.some((e3) => e3.id === t3.id) || (this._remoteStreams.push(t3), s(() => {
2602
+ this._debug("on stream"), this.emit("stream", t3);
2603
+ }));
2604
+ });
2605
+ }
2606
+ _debug() {
2607
+ const e2 = [].slice.call(arguments);
2608
+ e2[0] = "[" + this._id + "] " + e2[0], a.apply(null, e2);
2609
+ }
2610
+ }
2611
+ p.WEBRTC_SUPPORT = !!o(), p.config = { iceServers: [{ urls: ["stun:stun.l.google.com:19302", "stun:global.stun.twilio.com:3478"] }], sdpSemantics: "unified-plan" }, p.channelConfig = {}, t2.exports = p;
2612
+ }, { buffer: 3, debug: 4, "err-code": 6, "get-browser-rtc": 8, "queue-microtask": 13, randombytes: 14, "readable-stream": 29 }] }, {}, [])("/");
2613
+ });
2614
+ })(simplepeer_min$1, simplepeer_min$1.exports);
2615
+ var simplepeer_minExports = simplepeer_min$1.exports;
2616
+ const Peer = /* @__PURE__ */ getDefaultExportFromCjs(simplepeer_minExports);
2617
+ export {
2618
+ Peer as default
2619
+ };
2620
+ //# sourceMappingURL=simplepeer.min.es.js.map