appmax-client-vue3 5.0.4 → 5.0.6

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 (850) hide show
  1. package/dist/AD-Ct_GVBfr-B0NgkhG-.js +16 -0
  2. package/dist/AE-DiMVenwy-BWQLa33w.js +16 -0
  3. package/dist/AF-DOrptOkS-Drc9XQJx.js +16 -0
  4. package/dist/AG-CzBMAtom-B-OlONmf.js +16 -0
  5. package/dist/AI-A2DnDGPS-DT91mX3i.js +16 -0
  6. package/dist/AL-BcGdPXjJ-DExFi-YT.js +16 -0
  7. package/dist/AM-BC_r4gTd-BDs6qIRD.js +16 -0
  8. package/dist/AO-D6GK49nd-U_dULeRN.js +16 -0
  9. package/dist/AQ-Eeziry42-C-Om7y7H.js +16 -0
  10. package/dist/AR-AbqVWszQ-CzpUNgQa.js +16 -0
  11. package/dist/AS-BWe_Gq8Z-CthlmMNh.js +16 -0
  12. package/dist/AT-b5CS9jSt-CuPm1E_i.js +16 -0
  13. package/dist/AU-BUbOyX6Q-C9GMMlR_.js +16 -0
  14. package/dist/AW-CjVdJTYe-D6MRykcI.js +16 -0
  15. package/dist/AX-lNtwEmw2-sxc5LzmD.js +16 -0
  16. package/dist/AZ-f8zSo9ut-DXmBVjN6.js +16 -0
  17. package/dist/AmBulletLegend-52gChigw.js +23 -0
  18. package/dist/AmCardV3-OdRs-z1j.js +22 -0
  19. package/dist/AmDoughnutChartAdapted-BhfBzb94.js +203 -0
  20. package/dist/AmEmptyState.vue_vue_type_script_setup_true_lang-BDpMkjAR.js +86 -0
  21. package/dist/AmFilterLevelDateSelect-BbVyzCa5-mqLOhZ7-.js +40 -0
  22. package/dist/AmFilterLevelMultiSelectFilter-CPxxHU90-BP6CSyx6.js +46 -0
  23. package/dist/AmFilterLevelSelectFilter-Be3LFJno-NdqTyzES.js +63 -0
  24. package/dist/AmHelper.vue_vue_type_script_setup_true_lang-D2zQmEN--ClK0lGCz.js +53 -0
  25. package/dist/AmLayoutFeedbackState-Di__llrB.js +48 -0
  26. package/dist/AmLayoutInnerData-BjksUdtP.js +162 -0
  27. package/dist/AmOutlineCard-BpHzJqpY.js +25 -0
  28. package/dist/AmSkeleton-CMDXffqv.js +35 -0
  29. package/dist/AmText-B4gSbZhe.js +33 -0
  30. package/dist/AmTooltip.vue_vue_type_script_setup_true_lang-DvhTZs1v-Bhh_sEoD.js +64 -0
  31. package/dist/ApiService-CMji3DZQ.js +11 -0
  32. package/dist/AppInstallationConfirmationPasswordModal-C9B3zwzU.js +535 -0
  33. package/dist/AppstoreAppView-CllOZV21.js +315 -0
  34. package/dist/AppstoreHomeView-m_1nQ_Jn.js +1372 -0
  35. package/dist/BA-BfV7_7RP-DOpAKJEN.js +16 -0
  36. package/dist/BB-CC4768VM-DiTttwLj.js +16 -0
  37. package/dist/BD-YQdTTbhg-iJ-Mpvi3.js +16 -0
  38. package/dist/BE-DUYoRyei-0WAiLDaR.js +16 -0
  39. package/dist/BF-XZRLkaHX-Cb9zOZhM.js +16 -0
  40. package/dist/BG-BAb8lAFP-0bfnaAWE.js +16 -0
  41. package/dist/BH-C1LTB8Fj-D37QTedm.js +16 -0
  42. package/dist/BI-RjDfMipp-9Mn-Qe4W.js +16 -0
  43. package/dist/BJ-DAv61IMB-I283Lwmn.js +16 -0
  44. package/dist/BL-CFW4iaQd-BjbmsrF6.js +16 -0
  45. package/dist/BM-DuK3dA1G-gP1iKSwy.js +16 -0
  46. package/dist/BN-BXHGopan-B13xheUo.js +16 -0
  47. package/dist/BO-CzuoErsx-BntOgWhV.js +16 -0
  48. package/dist/BQ-BO-BlM1Uin3-Dt8JnniZ.js +16 -0
  49. package/dist/BQ-SA-BninfeHy-BLUFQNxa.js +16 -0
  50. package/dist/BQ-SE-tq-mCvpl-BV5-RpVj.js +16 -0
  51. package/dist/BR-B1GEJ05L-C5ShOe7A.js +16 -0
  52. package/dist/BS-MeULPH4e-CeEaWwcm.js +16 -0
  53. package/dist/BT-BCfQJS6a-DGnUG4Oe.js +16 -0
  54. package/dist/BV-CfaYWvM--DeQOtQ9V.js +16 -0
  55. package/dist/BW-jYbPMHhQ-ByhXqunH.js +16 -0
  56. package/dist/BY-Ddffd2rT-BehXTId1.js +16 -0
  57. package/dist/BZ-B7mGW2Jg-9BCaVvvp.js +16 -0
  58. package/dist/BankAccountCrossborderNew.page-C28R_1Qd.js +152 -0
  59. package/dist/BankAccountList.page-CNeEpk4H.js +331 -0
  60. package/dist/BankAccountNew.page-BSpKrX5u.js +982 -0
  61. package/dist/CA-CHl-cqJL-XR0ndh4J.js +16 -0
  62. package/dist/CC-DSLZRwFz-DYEzvl09.js +16 -0
  63. package/dist/CD-D4NJYkQm-L5L9-fTb.js +16 -0
  64. package/dist/CF-DoxRpaA9-By8Pbyi3.js +16 -0
  65. package/dist/CG-Auzp6pC_-D-tyTP_M.js +16 -0
  66. package/dist/CH-B5eEo1aL-DYS_VO_S.js +16 -0
  67. package/dist/CI-DFfmdeVw-BhIa4094.js +16 -0
  68. package/dist/CK-CKWUhjXV-CZvjdIyd.js +16 -0
  69. package/dist/CL-Di6p-p6X-DzZ5YYia.js +16 -0
  70. package/dist/CM-B0ht31e3-eZzVc86A.js +16 -0
  71. package/dist/CN-CKHlOciI-BAkHzs2o.js +16 -0
  72. package/dist/CO-GBUkcePt-CLeWrjx0.js +16 -0
  73. package/dist/CR-Daw5JsjF-PjEtTToe.js +16 -0
  74. package/dist/CU-CVOkcTvR-BSNGrSk3.js +16 -0
  75. package/dist/CV-cyPoze-o-D9ajXnsp.js +16 -0
  76. package/dist/CW-Bt-Pwg4j-C_ex-Sdr.js +16 -0
  77. package/dist/CX-uhIZlYzy-D_-keHM6.js +16 -0
  78. package/dist/CY-un4rgwPX-CHTtlcGa.js +16 -0
  79. package/dist/CZ-equ-r4iN-CJH4b4uG.js +16 -0
  80. package/dist/CashoutAntecipateContent-Clo-RuSw.js +42 -0
  81. package/dist/ChargebackAnalytics-DVbiz8Yb.js +1701 -0
  82. package/dist/ChargebackDetail-Bou3b7Xl.js +3470 -0
  83. package/dist/ConfirmationModal-t8hM5cPb.js +105 -0
  84. package/dist/Create.page-B2GKeXaW.js +1409 -0
  85. package/dist/CreatePaymentLink-Cjs8mN-z.js +857 -0
  86. package/dist/DE-zx7UmJ-V-7dMw-Msl.js +16 -0
  87. package/dist/DJ-BN1kIFYT-CbAyhLrL.js +16 -0
  88. package/dist/DK-CrXXNH_h-Dq1c5oGn.js +16 -0
  89. package/dist/DM-B4nVdNww-B2H3SDw6.js +16 -0
  90. package/dist/DO-C7-NF2JD-Cx2irRLd.js +16 -0
  91. package/dist/DZ-DSDLbNRb-DLc6FwJb.js +16 -0
  92. package/dist/DashboardAmountDetailsContent-D8rXn6Xl.js +65 -0
  93. package/dist/DashboardApprovalRateDetails.vue_vue_type_style_index_0_lang-Ch1-BrNn.js +151 -0
  94. package/dist/DashboardApprovalRateInternationalContent-D8Fh_qom.js +19 -0
  95. package/dist/DashboardApprovalRateNationalContent-CfqsP3qp.js +74 -0
  96. package/dist/DashboardCarouselContent-Cxaz7rsI.js +963 -0
  97. package/dist/DashboardDetailsContent-DkY9MfZ5.js +58 -0
  98. package/dist/DashboardHome-CUCswBCo.js +5399 -0
  99. package/dist/DetailSubscriptionRecurring-DuImJwB9.js +1314 -0
  100. package/dist/EC-C_bjTYWm-BL8ERFgH.js +16 -0
  101. package/dist/EE-CQIjuoWO-WiwMe9KP.js +16 -0
  102. package/dist/EG-Bs_BHfVR-CKQNWTMP.js +16 -0
  103. package/dist/EH-CnWam84F-HONgeWbu.js +16 -0
  104. package/dist/ER-Dcl4hJzq-CBMxH7o_.js +16 -0
  105. package/dist/ES-Bpj2gAdj-9ptGZPyp.js +16 -0
  106. package/dist/ET-Dm3q0Ruz-Dg6IdOKl.js +16 -0
  107. package/dist/ExternalPendenciesList-IGLpEq29.js +651 -0
  108. package/dist/FI-DCqfJeiQ-DL-SVIGO.js +16 -0
  109. package/dist/FJ-C6UrGUgI-qnFHKCfW.js +16 -0
  110. package/dist/FK-CAaec31K-glJ52JZI.js +16 -0
  111. package/dist/FM-Cf2SIJ7h-igGt5oAT.js +16 -0
  112. package/dist/FO-DBb4psBV-2QzUkoue.js +16 -0
  113. package/dist/FR-CFW4iaQd-CqWFOhyb.js +16 -0
  114. package/dist/FeatureFlagsPage-BByq3i15.js +271 -0
  115. package/dist/Form.page-PuqDs_X7.js +624 -0
  116. package/dist/GA-D3NTxgTl-DvcNJ6mb.js +16 -0
  117. package/dist/GB-ENG-Cmkg6Zq8-DWXBOxrA.js +16 -0
  118. package/dist/GB-NIR-DKszcfHi-DS25CVF2.js +16 -0
  119. package/dist/GB-SCT-BiivwJ71-CrZcARLd.js +16 -0
  120. package/dist/GB-UKM-DgMBd3ib-BVmXVj_N.js +16 -0
  121. package/dist/GB-WLS-DLoDy9iv-DoRBtf-B.js +16 -0
  122. package/dist/GD-Bs1d4We7-BD-iydvb.js +16 -0
  123. package/dist/GE-DXG9iLk5-8JnbPMFl.js +16 -0
  124. package/dist/GF-B20s5gtx-D3hYvm6d.js +16 -0
  125. package/dist/GG-BAyrpIoO-DjMoGh7J.js +16 -0
  126. package/dist/GH-v3jh5r1X-DNPhdhxH.js +16 -0
  127. package/dist/GI-D39Krd4s-DPVKm99b.js +16 -0
  128. package/dist/GL-BDd_W5AU-DDhgkiHH.js +16 -0
  129. package/dist/GM-BNEHspzj-DWXbb0So.js +16 -0
  130. package/dist/GN-DdIZ0X6d-B7qs0poY.js +16 -0
  131. package/dist/GP-CFW4iaQd-BM7uu9Nb.js +16 -0
  132. package/dist/GQ-CC3X6AMz-Xe_g5BIj.js +16 -0
  133. package/dist/GR-C_0rusTd-DN4T761r.js +16 -0
  134. package/dist/GS-Db5l22a1-6-LOnXot.js +16 -0
  135. package/dist/GT-BhbkqUft-D29H0S6W.js +16 -0
  136. package/dist/GU-C0HeItm1-bHm28Dme.js +16 -0
  137. package/dist/GW-BjLM1vg--V7NII1WT.js +16 -0
  138. package/dist/GY-BreBVlhN-C7UIbb3j.js +16 -0
  139. package/dist/Giftmax-CNZsCi3o.js +489 -0
  140. package/dist/HK-BZn9ZQGS-Diu8_by9.js +16 -0
  141. package/dist/HM-BUbOyX6Q-BRlNpGBX.js +16 -0
  142. package/dist/HN-D4wujIPC-DW_tdfoq.js +16 -0
  143. package/dist/HR-Jhi3QQ9F-CzxmuesC.js +16 -0
  144. package/dist/HT-MMjMjr-R-C15Kc3GY.js +16 -0
  145. package/dist/HU-CN5KmQ7F-BrTU16Hw.js +16 -0
  146. package/dist/Home-DhsliPG0.js +997 -0
  147. package/dist/Home.page-BwpG-OGu.js +499 -0
  148. package/dist/ID-hVVUTKNG-82XdiRzW.js +16 -0
  149. package/dist/IE-WN_vdKcS-CmW4Fa2I.js +16 -0
  150. package/dist/IL-D5Wr_Xxh-Be1qFTjW.js +16 -0
  151. package/dist/IM-B-putc0k-DmkrM6ss.js +16 -0
  152. package/dist/IN-CK40zbQD-CrQJh-f2.js +16 -0
  153. package/dist/IO-CdvLck7D-5Ph5rhlz.js +16 -0
  154. package/dist/IQ-f_9wyurt-Do8cCe-5.js +16 -0
  155. package/dist/IR-B0yfWttH-Dm_cdJaZ.js +16 -0
  156. package/dist/IS-Dvf-XQTq-DLQCV1Ib.js +16 -0
  157. package/dist/IT-uY7cjdFI-CbmvC392.js +16 -0
  158. package/dist/ImportTrackingCode-BXM-IZPv.js +1007 -0
  159. package/dist/InternalCompanyIssuesDetail-DRw8pYyq.js +862 -0
  160. package/dist/InternalCompanyList-CdIQ2bbK.js +351 -0
  161. package/dist/InternalPendencyDetail-D7DV_a_X.js +717 -0
  162. package/dist/JE-C95tN_VG-C5U6WhjP.js +16 -0
  163. package/dist/JM-zOuEwaB3-C0iegfzQ.js +16 -0
  164. package/dist/JO-Cq88rrOD-DaissPPf.js +16 -0
  165. package/dist/JP-5evXgWxq-BAXSCjAc.js +16 -0
  166. package/dist/KE-PHx0d97Z-RMCQkIpG.js +16 -0
  167. package/dist/KG-DT4JnieX-5IdOv33L.js +16 -0
  168. package/dist/KH-ChwV2WTT-BLgzTAqf.js +16 -0
  169. package/dist/KI-D212g4Lh-B3PFWtsa.js +16 -0
  170. package/dist/KM-mPVp7AKS-CB-p6Q4s.js +16 -0
  171. package/dist/KN-AdXLXICN-ByiILU9E.js +16 -0
  172. package/dist/KP-CC6UIrEF-B5A3gWd9.js +16 -0
  173. package/dist/KR-BtnmWR6C-BjPQjsgx.js +16 -0
  174. package/dist/KW-gqahWVaw-DWQdB3xi.js +16 -0
  175. package/dist/KY-DjIb70VQ-sTb3a8wH.js +16 -0
  176. package/dist/KZ-C_fRihiO-IfRJKBAH.js +16 -0
  177. package/dist/LA-KIULJHAb-C5ICo3_R.js +16 -0
  178. package/dist/LB-CrF8WJiI-D1KnKZaK.js +16 -0
  179. package/dist/LC-DGiHXm5V-B46fqsqM.js +16 -0
  180. package/dist/LI-BwB0b8M1-BWZ9mJw-.js +16 -0
  181. package/dist/LK-BOC44ZgS-CS7CAN9T.js +16 -0
  182. package/dist/LR-CWjRlWOZ-DJMxkvFv.js +16 -0
  183. package/dist/LS-B_EgU3p5-DxaDoEGk.js +16 -0
  184. package/dist/LT-BPyPiVx2-D96XpXEr.js +16 -0
  185. package/dist/LU-B-De6aB--CNyLqhm_.js +16 -0
  186. package/dist/LV-D2Ewe3XC-D1NbzjAK.js +16 -0
  187. package/dist/LY-D1TSt6YI-BzJlH-xI.js +16 -0
  188. package/dist/MA-QY5gm-vM-pEMpz4Uz.js +16 -0
  189. package/dist/MC-BjlCjfCP-B1moHhIT.js +16 -0
  190. package/dist/MD-rh-6rlSt-BjfBJ0rJ.js +16 -0
  191. package/dist/ME-D1euo0V2-82DZwMKL.js +16 -0
  192. package/dist/MF-CFW4iaQd-CmIk59Yf.js +16 -0
  193. package/dist/MG-ONnxn_5g-C8GUYrRG.js +16 -0
  194. package/dist/MH-B8oC_VMS-BlYuQ5PA.js +16 -0
  195. package/dist/MK-ByjICisj-D6CtfZCb.js +16 -0
  196. package/dist/ML-CKVAuhox-JOjeAqYW.js +16 -0
  197. package/dist/MM-doJuUjVT-Bj8lDl7J.js +16 -0
  198. package/dist/MN-BFP303GE-vip25PA8.js +16 -0
  199. package/dist/MO-Dp4PTSYU-3CNAIy5e.js +16 -0
  200. package/dist/MP-CqKsnjHV-DCYI9oHs.js +16 -0
  201. package/dist/MQ-CFW4iaQd-BFMTVQoF.js +16 -0
  202. package/dist/MR-D73q_PiY-DqXK0CxP.js +16 -0
  203. package/dist/MS-qhjKl9TO-Dtzn8rKb.js +16 -0
  204. package/dist/MT-CZjbs1U--DqalCKRr.js +16 -0
  205. package/dist/MU-D0EQOl0S-DQLgbGtU.js +16 -0
  206. package/dist/MV-BtwHRTMn-DWp0qMPr.js +16 -0
  207. package/dist/MW-CVnAR98j-D_43UAP7.js +16 -0
  208. package/dist/MX-C7vXnCDY-tnp1lbHy.js +16 -0
  209. package/dist/MY-DJcgH_o3-DYipQe7N.js +16 -0
  210. package/dist/MZ-BbLwl9DA-D77jBrez.js +16 -0
  211. package/dist/Max.page-Cyx0ogtT.js +879 -0
  212. package/dist/MostSoldCountries-CjjsiJHA.js +22 -0
  213. package/dist/NA-5FKNjRGT-BjaDRgqG.js +16 -0
  214. package/dist/NC-CFW4iaQd-Bagorfoc.js +16 -0
  215. package/dist/NE-DpLZJa7D-CEzy23OF.js +16 -0
  216. package/dist/NF-BT-wIfwf-ZZ_ntI_H.js +16 -0
  217. package/dist/NG-BAiR_q0H--FDJWMWe.js +16 -0
  218. package/dist/NI-DylPDojG-CD5c4t3P.js +16 -0
  219. package/dist/NL-iozeFKPM-D1KlRggb.js +16 -0
  220. package/dist/NO-CfaYWvM--gvzb0sEz.js +16 -0
  221. package/dist/NP-BGR_ZaqA-CQJTYavs.js +16 -0
  222. package/dist/NR-DHGW5Y3Q-CBswr0L3.js +16 -0
  223. package/dist/NU-CcpcSx_x-BOB3CJWK.js +16 -0
  224. package/dist/NZ-DDYt6DcJ-5RNlfucy.js +16 -0
  225. package/dist/OM-D6hiar1r-B0mmcUV5.js +16 -0
  226. package/dist/OrderStatus.vue_vue_type_script_setup_true_lang-D0_gEBWQ.js +790 -0
  227. package/dist/OrderStatusChip-BE3PjteJ.js +30 -0
  228. package/dist/Orders.page-Djd-KP5A.js +1636 -0
  229. package/dist/OrdersChartDataContent-ePGVSzaT.js +221 -0
  230. package/dist/OrdersDetails.page-y05AA7kl.js +6194 -0
  231. package/dist/PA-Bi2blxjJ-Dp4vDAIG.js +16 -0
  232. package/dist/PE-D4DjQOlP-9LbsGquA.js +16 -0
  233. package/dist/PF-DmOSfnYB-DKrQnuZa.js +16 -0
  234. package/dist/PG-DeOlZ7TA-BXjJ5CTn.js +16 -0
  235. package/dist/PH-Dv4KdxU--CfCKyF6L.js +16 -0
  236. package/dist/PK-CRhM95F8-Bb9mOp2t.js +16 -0
  237. package/dist/PL-BIdMQAtx-Dw-OYGTm.js +16 -0
  238. package/dist/PM-BDa53dEz-CWw7ZOOZ.js +16 -0
  239. package/dist/PN-Csu7Dufn-CJHlnhyq.js +16 -0
  240. package/dist/PR-C_Acdbc_-DYPOduhX.js +16 -0
  241. package/dist/PS-Dmg0ofZr-Be701NUz.js +16 -0
  242. package/dist/PT-Bsck4nv8-MLSdS7tn.js +16 -0
  243. package/dist/PW-CBMqjpxh-C6Jek5Ze.js +16 -0
  244. package/dist/PY-Be6zNh15-ByUytKzc.js +16 -0
  245. package/dist/PaymentsLinks-KiELtIgJ.js +675 -0
  246. package/dist/QA-CZmcW85r-DAp46Hhe.js +16 -0
  247. package/dist/RE-CFW4iaQd-BrIp1vau.js +16 -0
  248. package/dist/RO-6H4O-gQF-Y0n3SQjv.js +16 -0
  249. package/dist/RS-DM7vMnHL-76n8wS4u.js +16 -0
  250. package/dist/RU-HqKQeTq2-D6bmmaHJ.js +16 -0
  251. package/dist/RW-DkH4VhfP-qZf9eN8n.js +16 -0
  252. package/dist/RecurringSubscription-ZQkCIk47.js +639 -0
  253. package/dist/RecurringSubscriptionDashView-j9_e79Vk.js +2051 -0
  254. package/dist/RefundChargeback-DX7mVtAd.js +97 -0
  255. package/dist/RiskPendenciesInternalService-WHk-ppNv.js +145 -0
  256. package/dist/SA-C2hBi4Lh-DJe7imc6.js +16 -0
  257. package/dist/SB-CBu9QLGP-Zm7rn3TY.js +16 -0
  258. package/dist/SC-CR6esM-V-Bo0A45g8.js +16 -0
  259. package/dist/SD-VCXqBHrW-Dc36ZkKw.js +16 -0
  260. package/dist/SE-DbI0jJm9-CqAlwaOd.js +16 -0
  261. package/dist/SG-DgprfMyV-CFbIh-wK.js +16 -0
  262. package/dist/SH-qhjKl9TO-BdwBOgTx.js +16 -0
  263. package/dist/SI-C3dA03Yk-CvfNW-ca.js +16 -0
  264. package/dist/SJ-CfaYWvM--Wmn4_5e9.js +16 -0
  265. package/dist/SK-CxbHN7aU-B6uC2yQk.js +16 -0
  266. package/dist/SL-GXAaRXng-zi1bLG3X.js +16 -0
  267. package/dist/SM-B2SteTdO-RLpKypGW.js +16 -0
  268. package/dist/SN-B7Q__Lx_-Djo-IO4C.js +16 -0
  269. package/dist/SO-Bnd5-U9z-BSkVHNoK.js +16 -0
  270. package/dist/SR-BHMDOkL2-BwwEXDkU.js +16 -0
  271. package/dist/SS-CsTgWca1-CV-Ynua3.js +16 -0
  272. package/dist/ST-DLqO0boT-DXEkEuGZ.js +16 -0
  273. package/dist/SV-DNZizmQg-C128vKse.js +16 -0
  274. package/dist/SX-DWuXjLwS-Db0eoKe-.js +16 -0
  275. package/dist/SY-DeOQEBum-Dk8H_N_8.js +16 -0
  276. package/dist/SZ-Bhe0qU5K-CgBFMF6-.js +16 -0
  277. package/dist/SalesRecovery-B4Thja2M.js +595 -0
  278. package/dist/SalesRecoveryIA-efVg4JC4.js +199 -0
  279. package/dist/SendCustomerRefundLinkPage-BuqIgKvN.js +137 -0
  280. package/dist/StatusDescriptionModal-CYNIOE1j.js +60 -0
  281. package/dist/StatusTag.vue_vue_type_script_setup_true_lang-c6yIqdJa.js +28 -0
  282. package/dist/TC-D5HTaKiF-ClAflBvq.js +16 -0
  283. package/dist/TD-DyIWvaGg-CVP03vAg.js +16 -0
  284. package/dist/TF-BRsv64iE-C0oaO6MU.js +16 -0
  285. package/dist/TG-OhNa5jmt-DMNgYBxF.js +16 -0
  286. package/dist/TH-F_ODV0JW-CpOL_sp1.js +16 -0
  287. package/dist/TJ-BFkbbSmN-Csmcaz0_.js +16 -0
  288. package/dist/TK-Ct75yy7V-CUazKMgf.js +16 -0
  289. package/dist/TL-BzqVkHGw-r23cAIYq.js +16 -0
  290. package/dist/TM-CCAvd8qV-DFrWqdHH.js +16 -0
  291. package/dist/TN-CmYqbPEz-B3pzWqH5.js +16 -0
  292. package/dist/TO-BQQk9Xq_-B3hOFwhw.js +16 -0
  293. package/dist/TR-_MKkCnUV-CichoDJ8.js +16 -0
  294. package/dist/TT-DoRURl1c-CueLLCZx.js +16 -0
  295. package/dist/TV-Dt8uZCP4-C08Vobx7.js +16 -0
  296. package/dist/TW-CvHugvex-ZCo88m_A.js +16 -0
  297. package/dist/TZ-RbwBgiwb-BKG3wtBA.js +16 -0
  298. package/dist/TestView-B9ORmp4t.js +14 -0
  299. package/dist/TopSellingProductsContent-CapF1pxR.js +80 -0
  300. package/dist/UA-BiXHPMqV-DeyLupeU.js +16 -0
  301. package/dist/UG--it_LhSj-34w5YImL.js +16 -0
  302. package/dist/UM-BFcTdeDD-B_L_MtPg.js +16 -0
  303. package/dist/US-BFcTdeDD-B_L_MtPg.js +16 -0
  304. package/dist/UY-C26Ndi4P-BRt4Luxu.js +16 -0
  305. package/dist/UZ-BK5ADwFW-D-rIbj3c.js +16 -0
  306. package/dist/UserIndicationsPage-KwXikhun.js +743 -0
  307. package/dist/VA-Cpq1n4yW-CQMrSw3o.js +16 -0
  308. package/dist/VC-D1Fjbog5-DS-_9LQx.js +16 -0
  309. package/dist/VE-CeM-hea7-CrLlGLy0.js +16 -0
  310. package/dist/VG-qhjKl9TO-pvooCb-6.js +16 -0
  311. package/dist/VI-C-kcu42_-BLh-tNOQ.js +16 -0
  312. package/dist/VN-2yoryeK1-CqyYI03S.js +16 -0
  313. package/dist/VU-CkLlsgzP-DFxfxPMN.js +16 -0
  314. package/dist/WF-BDa53dEz-C5kJ_Hhr.js +16 -0
  315. package/dist/WS-CNi2O6Qm-QmsKSXlr.js +16 -0
  316. package/dist/WhatsappPreview.vue_vue_type_script_setup_true_lang-_qUyhaRu.js +157 -0
  317. package/dist/WithdrawAdvance-BreZtAfY.js +17 -0
  318. package/dist/WithdrawBalanceStore-B10oLSa_.js +504 -0
  319. package/dist/WithdrawBankAccountStore-Du2udJuO.js +130 -0
  320. package/dist/WithdrawBlocked-CQydkcIq.js +133 -0
  321. package/dist/WithdrawCompanyStore-D9U__hkU.js +80 -0
  322. package/dist/WithdrawGuaranteeExtract-exYhE-Es.js +980 -0
  323. package/dist/WithdrawHome-CufaZ8P6.js +1843 -0
  324. package/dist/WithdrawHome-DEuMKuef.js +2448 -0
  325. package/dist/WithdrawInternational-BEdv9fhP.js +17 -0
  326. package/dist/WithdrawMaxStore-BvYFgsgf.js +375 -0
  327. package/dist/WithdrawNegativeCompany.vue_vue_type_script_setup_true_lang-D95E4U9r.js +531 -0
  328. package/dist/WithdrawNoAccountWarning-DElpJnu6.js +233 -0
  329. package/dist/WithdrawPermissionGuard-cnhy_Vmo.js +338 -0
  330. package/dist/WithdrawRequest-CKjVx8V1.js +944 -0
  331. package/dist/WithdrawRequest-CLCKvxDw.js +17 -0
  332. package/dist/WithdrawRequestDetail-Crzbdmrz.js +284 -0
  333. package/dist/WithdrawRequestLayout.vue_vue_type_script_setup_true_lang-DjpMoI4R.js +937 -0
  334. package/dist/YE-DxPZysMs-24K9cWE_.js +16 -0
  335. package/dist/YT-BMJJ1U_T-GX_92h08.js +16 -0
  336. package/dist/ZA-BjQXS8mc-2n92DpNr.js +16 -0
  337. package/dist/ZM-Dw0PmMTO-DYwTJ-oI.js +16 -0
  338. package/dist/ZW-D0UStZMr-DeU_fV34.js +16 -0
  339. package/dist/affiliate-Bgt9fadK-5bY5P5wZ.js +22 -0
  340. package/dist/amex-CvNwRHhS-DUMkjlF6.js +16 -0
  341. package/dist/api-BHFKG5kE.js +11 -0
  342. package/dist/apple_pay-DtsAzVjF-DCZOAMPl.js +20 -0
  343. package/dist/archive-CFoPOir7-D1aNQGjF.js +18 -0
  344. package/dist/aura-D1VyKb6w-l-eJYNis.js +23 -0
  345. package/dist/boleto-BQZRi0Q5-BLTcSl2i.js +18 -0
  346. package/dist/box-DNrK38w2-CFIqdJZh.js +20 -0
  347. package/dist/cart-p5jccB8o-C05mkOt6.js +15 -0
  348. package/dist/cash-FZcelZV1-4OwwN_xB.js +20 -0
  349. package/dist/chart-YJ27XOr3-C63Tzu7L.js +22 -0
  350. package/dist/credit_card-CGrPYCJP-DItpwjaI.js +15 -0
  351. package/dist/csv-CYa6aPS5-Ce33Pjpr.js +18 -0
  352. package/dist/dayjs.min-ClXij-Xt.js +282 -0
  353. package/dist/diners-CN_1suUM-CC8r2OUJ.js +26 -0
  354. package/dist/discover-vVTOFEvv-BdQ28MnO.js +22 -0
  355. package/dist/ds-appmax-v322-BTOsNt2U.js +52 -0
  356. package/dist/ds-appmax-v327-CC7Euamf.js +69 -0
  357. package/dist/ds-appmax-v330-BDkt8A9-.js +48 -0
  358. package/dist/ds-appmax-v335-CCAR448_.js +278 -0
  359. package/dist/elo-BaNbqhYS-COc7gztu.js +15 -0
  360. package/dist/gear-BHOWpd7b-D52qwW1h.js +18 -0
  361. package/dist/grid-B7I0mWry-BOSWv5Bq.js +18 -0
  362. package/dist/hipercard-DBsszwxC-DzTjYDjh.js +22 -0
  363. package/dist/index-6NiIamsC.js +169 -0
  364. package/dist/index-B36N6Yug.js +21 -0
  365. package/dist/index-B6sx5tS0.js +681 -0
  366. package/dist/index-BE3koNgQ.js +153 -0
  367. package/dist/index-BPRKiT2E.js +1567 -0
  368. package/dist/index-Ba4eG-wb.js +409 -0
  369. package/dist/index-BjIAV-_B.js +200 -0
  370. package/dist/index-BmVzDTsI.js +83 -0
  371. package/dist/index-BmcmU6h2.js +92 -0
  372. package/dist/index-BnmIJFy7.js +67 -0
  373. package/dist/index-Brv2oJ9J.js +159 -0
  374. package/dist/index-C-vsON6x.js +106 -0
  375. package/dist/index-C5SstnrR.js +9812 -0
  376. package/dist/index-C9MhOAEc.js +35 -0
  377. package/dist/index-CLH-Zm7T.js +217 -0
  378. package/dist/index-CNqlIVuO.js +21 -0
  379. package/dist/index-COnpfUWj.js +332 -0
  380. package/dist/index-C_nDhPn6.js +219 -0
  381. package/dist/index-CoSm6RqN.js +961 -0
  382. package/dist/index-Cz7X93CO.js +1433 -0
  383. package/dist/index-D0Iyih-u.js +62 -0
  384. package/dist/index-D19d5hP5.js +1790 -0
  385. package/dist/index-D1Jdc6lH.js +219 -0
  386. package/dist/index-D9qqQcAS.js +28 -0
  387. package/dist/index-DMwoKY6I.js +721 -0
  388. package/dist/index-DVf0M0X7.js +117 -0
  389. package/dist/index-DY1YUNXf.js +230 -0
  390. package/dist/index-DctdjrrX.js +150 -0
  391. package/dist/index-QxWV09ws.js +11 -0
  392. package/dist/index-UdcUM2la.js +275 -0
  393. package/dist/index-dkBrO_eE.js +4133 -0
  394. package/dist/index-fOdzX3fu.js +18 -0
  395. package/dist/index-qdDNTlkJ.js +808 -0
  396. package/dist/index-smItj_5Q.js +534 -0
  397. package/dist/index.page-DfhxfDjo.js +828 -0
  398. package/dist/infos-8KGPLXoE-D6f9AKqY.js +18 -0
  399. package/dist/integrations-UOltVEyj-CEVUBcXa.js +19 -0
  400. package/dist/logs-Ce3fZY0v-Ex6uqIkv.js +28 -0
  401. package/dist/maestro-BMomgHxO-Bf54492K.js +27 -0
  402. package/dist/main-ByGSHXk8.js +103911 -0
  403. package/dist/main.js +1 -1
  404. package/dist/mastercard-5I-dcOVV-Cj2v1tDT.js +30 -0
  405. package/dist/max_brand-Crj-SFUw-DkFK9sxk.js +29 -0
  406. package/dist/max_brand_active-BIkS5qkP-D3JuiklW.js +27 -0
  407. package/dist/max_brand_negative-BxvdIegN-BRUDl9NE.js +30 -0
  408. package/dist/menu.page-BbGUxE5c.js +274 -0
  409. package/dist/money-DZpB5eTf-Cjkac9KR.js +19 -0
  410. package/dist/notification-DMezLtAj-Zozt1Wp3.js +18 -0
  411. package/dist/paypal-DMYjfEw0-BJyNR6z7.js +15 -0
  412. package/dist/pix-DXdX91yj-B1TvKMJy.js +22 -0
  413. package/dist/pix_outline-D_xXXgCN-lieqG0_X.js +16 -0
  414. package/dist/pusher-DcXz3HV4.js +4010 -0
  415. package/dist/shield-DS-Xf4WH-_rsUOWgL.js +15 -0
  416. package/dist/solid_help-DNaqfgoc-CpeV4e88.js +20 -0
  417. package/dist/solid_home-BDUiJDVY-wsmI7UJu.js +18 -0
  418. package/dist/solid_leaderboard-DtqK7q9Y-B5MK1oI0.js +18 -0
  419. package/dist/solid_store-Cfv6o4b8-Wr1GF8us.js +18 -0
  420. package/dist/ticket_icon-DwvyLm7c-BWWC5xqD.js +22 -0
  421. package/dist/useQueryFilter-Bgv4dMQj.js +93 -0
  422. package/dist/useRecurringTable-DN0kS1P6.js +161 -0
  423. package/dist/user-BRpwqYx8-D9-Kz0tC.js +18 -0
  424. package/dist/validateURL.helper-BvsbRkbu.js +126 -0
  425. package/dist/visa-tPjWcMbi-BE0B6z8I.js +18 -0
  426. package/package.json +1 -1
  427. package/dist/AD-Ct_GVBfr-F0iZzh43.js +0 -16
  428. package/dist/AE-DiMVenwy-B8gAP_yC.js +0 -16
  429. package/dist/AF-DOrptOkS-Cwy_BZvL.js +0 -16
  430. package/dist/AG-CzBMAtom-CgfEZO6L.js +0 -16
  431. package/dist/AI-A2DnDGPS-DpqQr8jG.js +0 -16
  432. package/dist/AL-BcGdPXjJ-DMCd-Nqi.js +0 -16
  433. package/dist/AM-BC_r4gTd-CcjWYDAQ.js +0 -16
  434. package/dist/AO-D6GK49nd-LKZej1r9.js +0 -16
  435. package/dist/AQ-Eeziry42-DyYTlRGS.js +0 -16
  436. package/dist/AR-AbqVWszQ-BatSn_vi.js +0 -16
  437. package/dist/AS-BWe_Gq8Z-DlAs4e2_.js +0 -16
  438. package/dist/AT-b5CS9jSt-CRr1j1Ri.js +0 -16
  439. package/dist/AU-BUbOyX6Q-DaEx2GZ-.js +0 -16
  440. package/dist/AW-CjVdJTYe-zZS7OtZN.js +0 -16
  441. package/dist/AX-lNtwEmw2-DITygSQt.js +0 -16
  442. package/dist/AZ-f8zSo9ut-CDwiKsVc.js +0 -16
  443. package/dist/AmBulletLegend-nu2EgQb2.js +0 -23
  444. package/dist/AmCardV3-Bay9-BBN.js +0 -22
  445. package/dist/AmDoughnutChartAdapted-tywewwFd.js +0 -203
  446. package/dist/AmEmptyState.vue_vue_type_script_setup_true_lang-CnpVhP99.js +0 -86
  447. package/dist/AmFilterLevelDateSelect-BbVyzCa5-Dt3FX9Tw.js +0 -40
  448. package/dist/AmFilterLevelMultiSelectFilter-CPxxHU90-Q3WOtOcz.js +0 -46
  449. package/dist/AmFilterLevelSelectFilter-Be3LFJno-SuWLFcVM.js +0 -63
  450. package/dist/AmHelper.vue_vue_type_script_setup_true_lang-D2zQmEN--77vmJWuR.js +0 -53
  451. package/dist/AmLayoutFeedbackState-Cv5RUrw6.js +0 -48
  452. package/dist/AmLayoutInnerData-rTP3FKmu.js +0 -162
  453. package/dist/AmOutlineCard-BOdCaVzb.js +0 -25
  454. package/dist/AmSkeleton-yk6Pzn4C.js +0 -35
  455. package/dist/AmText-B7UQzHj8.js +0 -33
  456. package/dist/AmTooltip.vue_vue_type_script_setup_true_lang-DvhTZs1v-DdAal3Yb.js +0 -64
  457. package/dist/ApiService-DrjuEh5o.js +0 -11
  458. package/dist/AppInstallationConfirmationPasswordModal-21z9otg1.js +0 -535
  459. package/dist/AppstoreAppView-B73bYr2e.js +0 -315
  460. package/dist/AppstoreHomeView-Bw-_zlSK.js +0 -1372
  461. package/dist/BA-BfV7_7RP-F8JqkZze.js +0 -16
  462. package/dist/BB-CC4768VM-CMnRksxp.js +0 -16
  463. package/dist/BD-YQdTTbhg-CqMZPbfS.js +0 -16
  464. package/dist/BE-DUYoRyei-1lydJB2w.js +0 -16
  465. package/dist/BF-XZRLkaHX-CZm6F6LW.js +0 -16
  466. package/dist/BG-BAb8lAFP-Ad4cnAd-.js +0 -16
  467. package/dist/BH-C1LTB8Fj-CcfcOSyW.js +0 -16
  468. package/dist/BI-RjDfMipp-MQrL4FYI.js +0 -16
  469. package/dist/BJ-DAv61IMB-C-qTZgwU.js +0 -16
  470. package/dist/BL-CFW4iaQd-BraZIfMA.js +0 -16
  471. package/dist/BM-DuK3dA1G-CYEZXJKJ.js +0 -16
  472. package/dist/BN-BXHGopan-DRwck0Mc.js +0 -16
  473. package/dist/BO-CzuoErsx-CiZBS0UG.js +0 -16
  474. package/dist/BQ-BO-BlM1Uin3-9ePT0Asn.js +0 -16
  475. package/dist/BQ-SA-BninfeHy-6GO4Spzq.js +0 -16
  476. package/dist/BQ-SE-tq-mCvpl-BUudoTUe.js +0 -16
  477. package/dist/BR-B1GEJ05L-CSLBvxZ4.js +0 -16
  478. package/dist/BS-MeULPH4e-bZ02kQIv.js +0 -16
  479. package/dist/BT-BCfQJS6a-BPMUoVcw.js +0 -16
  480. package/dist/BV-CfaYWvM--BrdtnZcA.js +0 -16
  481. package/dist/BW-jYbPMHhQ-Cu6lhi36.js +0 -16
  482. package/dist/BY-Ddffd2rT-Be487gr8.js +0 -16
  483. package/dist/BZ-B7mGW2Jg-D8chbJyr.js +0 -16
  484. package/dist/BankAccountCrossborderNew.page-BddqvpFp.js +0 -152
  485. package/dist/BankAccountList.page-BNvPCHa5.js +0 -331
  486. package/dist/BankAccountNew.page-CFDJVz8O.js +0 -982
  487. package/dist/CA-CHl-cqJL-DB4j9FVk.js +0 -16
  488. package/dist/CC-DSLZRwFz-ClA7CKP_.js +0 -16
  489. package/dist/CD-D4NJYkQm-DsTCf8m1.js +0 -16
  490. package/dist/CF-DoxRpaA9-BEQxOeLL.js +0 -16
  491. package/dist/CG-Auzp6pC_-DI7D7XxO.js +0 -16
  492. package/dist/CH-B5eEo1aL-BbltqURK.js +0 -16
  493. package/dist/CI-DFfmdeVw-Cl1bRJxT.js +0 -16
  494. package/dist/CK-CKWUhjXV-CP4nVixC.js +0 -16
  495. package/dist/CL-Di6p-p6X-B1Kym-Ql.js +0 -16
  496. package/dist/CM-B0ht31e3-BKinQprU.js +0 -16
  497. package/dist/CN-CKHlOciI-CEe6lwpb.js +0 -16
  498. package/dist/CO-GBUkcePt-DN5f4vEk.js +0 -16
  499. package/dist/CR-Daw5JsjF-BYyRzX6C.js +0 -16
  500. package/dist/CU-CVOkcTvR-DljJCULn.js +0 -16
  501. package/dist/CV-cyPoze-o-ODY6g3K8.js +0 -16
  502. package/dist/CW-Bt-Pwg4j-Ci9_y-u9.js +0 -16
  503. package/dist/CX-uhIZlYzy-SsdOrcx8.js +0 -16
  504. package/dist/CY-un4rgwPX-DOn2Liyc.js +0 -16
  505. package/dist/CZ-equ-r4iN-C_hxtqfh.js +0 -16
  506. package/dist/CashoutAntecipateContent-BuLxzWiL.js +0 -42
  507. package/dist/ChargebackAnalytics-gFJCv7ts.js +0 -1701
  508. package/dist/ChargebackDetail-C-6RswdS.js +0 -3470
  509. package/dist/ConfirmationModal-STccE9FK.js +0 -105
  510. package/dist/Create.page-CwdZ7_c5.js +0 -1409
  511. package/dist/CreatePaymentLink-NL_5TlHd.js +0 -857
  512. package/dist/DE-zx7UmJ-V-BS0kXMtz.js +0 -16
  513. package/dist/DJ-BN1kIFYT-D3S2ABv7.js +0 -16
  514. package/dist/DK-CrXXNH_h-BfTg3lI8.js +0 -16
  515. package/dist/DM-B4nVdNww-C8q86bvT.js +0 -16
  516. package/dist/DO-C7-NF2JD-1qS2PEyQ.js +0 -16
  517. package/dist/DZ-DSDLbNRb-CXYecYcn.js +0 -16
  518. package/dist/DashboardAmountDetailsContent-C1GdGRZi.js +0 -65
  519. package/dist/DashboardApprovalRateDetails.vue_vue_type_style_index_0_lang-DL7098JI.js +0 -151
  520. package/dist/DashboardApprovalRateInternationalContent-lFyWrkpA.js +0 -19
  521. package/dist/DashboardApprovalRateNationalContent-BT_zrVP4.js +0 -74
  522. package/dist/DashboardCarouselContent-BK3PjL79.js +0 -963
  523. package/dist/DashboardDetailsContent-cAUtagYn.js +0 -58
  524. package/dist/DashboardHome-CaSyZuRO.js +0 -5399
  525. package/dist/DetailSubscriptionRecurring-B9nKFQHX.js +0 -1314
  526. package/dist/EC-C_bjTYWm-DsHtNoWx.js +0 -16
  527. package/dist/EE-CQIjuoWO-Dj_tL3Gy.js +0 -16
  528. package/dist/EG-Bs_BHfVR-CrFL2WMv.js +0 -16
  529. package/dist/EH-CnWam84F-MS1nyvYv.js +0 -16
  530. package/dist/ER-Dcl4hJzq-DutoWGfF.js +0 -16
  531. package/dist/ES-Bpj2gAdj-BW2d620V.js +0 -16
  532. package/dist/ET-Dm3q0Ruz-DZo8ATY5.js +0 -16
  533. package/dist/ExternalPendenciesList-BPPFQvH8.js +0 -651
  534. package/dist/FI-DCqfJeiQ-11fV-BEv.js +0 -16
  535. package/dist/FJ-C6UrGUgI-KUm51Ib8.js +0 -16
  536. package/dist/FK-CAaec31K-Bw1w-W8s.js +0 -16
  537. package/dist/FM-Cf2SIJ7h-KPrIpJ1y.js +0 -16
  538. package/dist/FO-DBb4psBV-B9W61ock.js +0 -16
  539. package/dist/FR-CFW4iaQd-CWqHUgNh.js +0 -16
  540. package/dist/FeatureFlagsPage-DfFjyIF5.js +0 -271
  541. package/dist/Form.page-ClCzuCyz.js +0 -624
  542. package/dist/GA-D3NTxgTl-XELfISbA.js +0 -16
  543. package/dist/GB-ENG-Cmkg6Zq8-BPoP907L.js +0 -16
  544. package/dist/GB-NIR-DKszcfHi-BocgCw2H.js +0 -16
  545. package/dist/GB-SCT-BiivwJ71-Du37A8O_.js +0 -16
  546. package/dist/GB-UKM-DgMBd3ib-BIDoZfpE.js +0 -16
  547. package/dist/GB-WLS-DLoDy9iv-ZqqSrY4X.js +0 -16
  548. package/dist/GD-Bs1d4We7-D0xc9QuN.js +0 -16
  549. package/dist/GE-DXG9iLk5-SuIQagWu.js +0 -16
  550. package/dist/GF-B20s5gtx-CKuNCqPB.js +0 -16
  551. package/dist/GG-BAyrpIoO-oGFM42J3.js +0 -16
  552. package/dist/GH-v3jh5r1X-DH4NoKLW.js +0 -16
  553. package/dist/GI-D39Krd4s-BD9yA-ei.js +0 -16
  554. package/dist/GL-BDd_W5AU-B5INZUUx.js +0 -16
  555. package/dist/GM-BNEHspzj-DsJk6IiV.js +0 -16
  556. package/dist/GN-DdIZ0X6d-CZ0_OxEu.js +0 -16
  557. package/dist/GP-CFW4iaQd-BXjKkKpL.js +0 -16
  558. package/dist/GQ-CC3X6AMz-NKhxQZ7G.js +0 -16
  559. package/dist/GR-C_0rusTd-CipHy4ZL.js +0 -16
  560. package/dist/GS-Db5l22a1-DJlnW_Q6.js +0 -16
  561. package/dist/GT-BhbkqUft-DwRk3xfJ.js +0 -16
  562. package/dist/GU-C0HeItm1-C3KnqEoy.js +0 -16
  563. package/dist/GW-BjLM1vg--51vX1R5K.js +0 -16
  564. package/dist/GY-BreBVlhN-CjtwTYgA.js +0 -16
  565. package/dist/Giftmax-BJe8pa3Q.js +0 -489
  566. package/dist/HK-BZn9ZQGS-DYuua8sB.js +0 -16
  567. package/dist/HM-BUbOyX6Q-DuS5weAU.js +0 -16
  568. package/dist/HN-D4wujIPC-7S8GW-9b.js +0 -16
  569. package/dist/HR-Jhi3QQ9F-D_k7IbwL.js +0 -16
  570. package/dist/HT-MMjMjr-R-D3b3hgPi.js +0 -16
  571. package/dist/HU-CN5KmQ7F-DYJ4md8L.js +0 -16
  572. package/dist/Home-pFUfEAof.js +0 -997
  573. package/dist/Home.page-B7w7zx7P.js +0 -499
  574. package/dist/ID-hVVUTKNG-DALNDLox.js +0 -16
  575. package/dist/IE-WN_vdKcS-r8eP-_Zs.js +0 -16
  576. package/dist/IL-D5Wr_Xxh-pr7hp9ur.js +0 -16
  577. package/dist/IM-B-putc0k-D-Ss0zV8.js +0 -16
  578. package/dist/IN-CK40zbQD-D2zZ4XVl.js +0 -16
  579. package/dist/IO-CdvLck7D-lIDeqGXY.js +0 -16
  580. package/dist/IQ-f_9wyurt-BJX3PcWJ.js +0 -16
  581. package/dist/IR-B0yfWttH-BmSw08zX.js +0 -16
  582. package/dist/IS-Dvf-XQTq-BiZAklXr.js +0 -16
  583. package/dist/IT-uY7cjdFI-D_-tjwaF.js +0 -16
  584. package/dist/ImportTrackingCode-BN-cDxy9.js +0 -1007
  585. package/dist/InternalCompanyIssuesDetail-DFcGhpKO.js +0 -862
  586. package/dist/InternalCompanyList-CJlhSVvO.js +0 -351
  587. package/dist/InternalPendencyDetail-BKLJB3lK.js +0 -717
  588. package/dist/JE-C95tN_VG-DBV4EBBR.js +0 -16
  589. package/dist/JM-zOuEwaB3-JGDKKcts.js +0 -16
  590. package/dist/JO-Cq88rrOD-DYgBZ-zb.js +0 -16
  591. package/dist/JP-5evXgWxq-NBMBMIVR.js +0 -16
  592. package/dist/KE-PHx0d97Z-BS1QTnOJ.js +0 -16
  593. package/dist/KG-DT4JnieX-m5l71KHl.js +0 -16
  594. package/dist/KH-ChwV2WTT-BbqVr_Oq.js +0 -16
  595. package/dist/KI-D212g4Lh-DeuAOfmQ.js +0 -16
  596. package/dist/KM-mPVp7AKS-CV7nn_4s.js +0 -16
  597. package/dist/KN-AdXLXICN-BFvRzmEn.js +0 -16
  598. package/dist/KP-CC6UIrEF-t_INb3kz.js +0 -16
  599. package/dist/KR-BtnmWR6C-MlbRC0C3.js +0 -16
  600. package/dist/KW-gqahWVaw-DKGq2WXt.js +0 -16
  601. package/dist/KY-DjIb70VQ-Cz1DetKe.js +0 -16
  602. package/dist/KZ-C_fRihiO-CESat3H2.js +0 -16
  603. package/dist/LA-KIULJHAb-Bim-d1KJ.js +0 -16
  604. package/dist/LB-CrF8WJiI-CmBC4lTr.js +0 -16
  605. package/dist/LC-DGiHXm5V-DIZVclSG.js +0 -16
  606. package/dist/LI-BwB0b8M1-Dy_PTf8y.js +0 -16
  607. package/dist/LK-BOC44ZgS-Q8ikHfmm.js +0 -16
  608. package/dist/LR-CWjRlWOZ-BM8WajB6.js +0 -16
  609. package/dist/LS-B_EgU3p5-DPBhe5Ef.js +0 -16
  610. package/dist/LT-BPyPiVx2-DeAJtpxd.js +0 -16
  611. package/dist/LU-B-De6aB--C06WOodC.js +0 -16
  612. package/dist/LV-D2Ewe3XC-DA3THIZC.js +0 -16
  613. package/dist/LY-D1TSt6YI-D-TzyJPp.js +0 -16
  614. package/dist/MA-QY5gm-vM-ZvB6kwac.js +0 -16
  615. package/dist/MC-BjlCjfCP-BY6csHcr.js +0 -16
  616. package/dist/MD-rh-6rlSt-DBbdgsj1.js +0 -16
  617. package/dist/ME-D1euo0V2-D0MKJkJa.js +0 -16
  618. package/dist/MF-CFW4iaQd-BQ0pnAUK.js +0 -16
  619. package/dist/MG-ONnxn_5g-DdD2EbF5.js +0 -16
  620. package/dist/MH-B8oC_VMS-CmYP1qIz.js +0 -16
  621. package/dist/MK-ByjICisj-DGn1SOwL.js +0 -16
  622. package/dist/ML-CKVAuhox-Dn6lAMRz.js +0 -16
  623. package/dist/MM-doJuUjVT-C0KP-Cv4.js +0 -16
  624. package/dist/MN-BFP303GE-CKn_WdVA.js +0 -16
  625. package/dist/MO-Dp4PTSYU-B_AXtKD6.js +0 -16
  626. package/dist/MP-CqKsnjHV-mzt6qqjx.js +0 -16
  627. package/dist/MQ-CFW4iaQd-DpbnMvl4.js +0 -16
  628. package/dist/MR-D73q_PiY-BnAtsABQ.js +0 -16
  629. package/dist/MS-qhjKl9TO-Bd8gSFrP.js +0 -16
  630. package/dist/MT-CZjbs1U--EgeCDXd4.js +0 -16
  631. package/dist/MU-D0EQOl0S-BYLs1W5Z.js +0 -16
  632. package/dist/MV-BtwHRTMn-BCdBPszP.js +0 -16
  633. package/dist/MW-CVnAR98j-CJZbRagJ.js +0 -16
  634. package/dist/MX-C7vXnCDY-Dmin-oWl.js +0 -16
  635. package/dist/MY-DJcgH_o3-2oOLkdlD.js +0 -16
  636. package/dist/MZ-BbLwl9DA-FYUzVCo5.js +0 -16
  637. package/dist/Max.page-CRhbzJ09.js +0 -879
  638. package/dist/MostSoldCountries-DG_Wc7uA.js +0 -22
  639. package/dist/NA-5FKNjRGT-BWqKe71_.js +0 -16
  640. package/dist/NC-CFW4iaQd-D3IlHn7e.js +0 -16
  641. package/dist/NE-DpLZJa7D-CGV72KGn.js +0 -16
  642. package/dist/NF-BT-wIfwf--HSCkAos.js +0 -16
  643. package/dist/NG-BAiR_q0H-x2oPxOaQ.js +0 -16
  644. package/dist/NI-DylPDojG-FpIXxQpF.js +0 -16
  645. package/dist/NL-iozeFKPM-DBppf4BZ.js +0 -16
  646. package/dist/NO-CfaYWvM--CMXm4PaG.js +0 -16
  647. package/dist/NP-BGR_ZaqA-ByV9nGnO.js +0 -16
  648. package/dist/NR-DHGW5Y3Q-PSsRcf81.js +0 -16
  649. package/dist/NU-CcpcSx_x-9gVU1wF-.js +0 -16
  650. package/dist/NZ-DDYt6DcJ-83Lkgw7S.js +0 -16
  651. package/dist/OM-D6hiar1r-CJba-daf.js +0 -16
  652. package/dist/OrderStatus.vue_vue_type_script_setup_true_lang-BsAfhXp7.js +0 -790
  653. package/dist/OrderStatusChip-DjUvy8Gk.js +0 -30
  654. package/dist/Orders.page-MN81O0nE.js +0 -1636
  655. package/dist/OrdersChartDataContent-DZ9DsBl-.js +0 -221
  656. package/dist/OrdersDetails.page-D5T8h9Un.js +0 -6194
  657. package/dist/PA-Bi2blxjJ-DIGWZnCX.js +0 -16
  658. package/dist/PE-D4DjQOlP-BKBTx4UK.js +0 -16
  659. package/dist/PF-DmOSfnYB-1ApQTn_-.js +0 -16
  660. package/dist/PG-DeOlZ7TA-DKYqmbsV.js +0 -16
  661. package/dist/PH-Dv4KdxU--CkFstgXH.js +0 -16
  662. package/dist/PK-CRhM95F8-IROg-6-b.js +0 -16
  663. package/dist/PL-BIdMQAtx-71vcrbUA.js +0 -16
  664. package/dist/PM-BDa53dEz-olcElLQY.js +0 -16
  665. package/dist/PN-Csu7Dufn-BRdUWiqn.js +0 -16
  666. package/dist/PR-C_Acdbc_-XVJp0ZAd.js +0 -16
  667. package/dist/PS-Dmg0ofZr-BfcXOnvL.js +0 -16
  668. package/dist/PT-Bsck4nv8-wXHigpK7.js +0 -16
  669. package/dist/PW-CBMqjpxh-w9ngaopP.js +0 -16
  670. package/dist/PY-Be6zNh15-DSh0UOul.js +0 -16
  671. package/dist/PaymentsLinks-DmGMdhQq.js +0 -675
  672. package/dist/QA-CZmcW85r-1dcbocf7.js +0 -16
  673. package/dist/RE-CFW4iaQd-ZjFoKpOm.js +0 -16
  674. package/dist/RO-6H4O-gQF-D5kCIFp3.js +0 -16
  675. package/dist/RS-DM7vMnHL-B8bpIXlq.js +0 -16
  676. package/dist/RU-HqKQeTq2-Dbq5EvWT.js +0 -16
  677. package/dist/RW-DkH4VhfP-CSJHwy2h.js +0 -16
  678. package/dist/RecurringSubscription-Dns1lfxX.js +0 -639
  679. package/dist/RecurringSubscriptionDashView-BU74Iu14.js +0 -2051
  680. package/dist/RefundChargeback-DxzX1ggU.js +0 -97
  681. package/dist/RiskPendenciesInternalService-C18MHw9P.js +0 -145
  682. package/dist/SA-C2hBi4Lh-LVuceiPn.js +0 -16
  683. package/dist/SB-CBu9QLGP-CDNlu2Hi.js +0 -16
  684. package/dist/SC-CR6esM-V-zzjShRK_.js +0 -16
  685. package/dist/SD-VCXqBHrW-_q1bkXLo.js +0 -16
  686. package/dist/SE-DbI0jJm9-CVNv6YY5.js +0 -16
  687. package/dist/SG-DgprfMyV-8f-vday0.js +0 -16
  688. package/dist/SH-qhjKl9TO-D5KY5Y-m.js +0 -16
  689. package/dist/SI-C3dA03Yk-DBM3URbM.js +0 -16
  690. package/dist/SJ-CfaYWvM--Ca3QZPZ3.js +0 -16
  691. package/dist/SK-CxbHN7aU-BJMmIJs8.js +0 -16
  692. package/dist/SL-GXAaRXng-BqldurGy.js +0 -16
  693. package/dist/SM-B2SteTdO-De8TzD4p.js +0 -16
  694. package/dist/SN-B7Q__Lx_-DmZlDE1W.js +0 -16
  695. package/dist/SO-Bnd5-U9z-ChYTpGa9.js +0 -16
  696. package/dist/SR-BHMDOkL2-DOoMrZJY.js +0 -16
  697. package/dist/SS-CsTgWca1-Bc7bSVgH.js +0 -16
  698. package/dist/ST-DLqO0boT-lp2LWq4J.js +0 -16
  699. package/dist/SV-DNZizmQg-iLSymkkM.js +0 -16
  700. package/dist/SX-DWuXjLwS-Cq7piB0J.js +0 -16
  701. package/dist/SY-DeOQEBum-CkORRYcV.js +0 -16
  702. package/dist/SZ-Bhe0qU5K-Bi4t0wtA.js +0 -16
  703. package/dist/SalesRecovery-DdXIO9M9.js +0 -595
  704. package/dist/SalesRecoveryIA-DIoHDLwj.js +0 -199
  705. package/dist/SendCustomerRefundLinkPage-BoNDJcX5.js +0 -137
  706. package/dist/StatusDescriptionModal-C1st_TVR.js +0 -60
  707. package/dist/StatusTag.vue_vue_type_script_setup_true_lang-fsT8_PI4.js +0 -28
  708. package/dist/TC-D5HTaKiF-C_qC-bkC.js +0 -16
  709. package/dist/TD-DyIWvaGg-6oLoIBo9.js +0 -16
  710. package/dist/TF-BRsv64iE-CVHPxNav.js +0 -16
  711. package/dist/TG-OhNa5jmt-pbhXOQv_.js +0 -16
  712. package/dist/TH-F_ODV0JW-BIxnXFCx.js +0 -16
  713. package/dist/TJ-BFkbbSmN-CdT7ozJu.js +0 -16
  714. package/dist/TK-Ct75yy7V-dGc6SSsm.js +0 -16
  715. package/dist/TL-BzqVkHGw-vDmIdZ4m.js +0 -16
  716. package/dist/TM-CCAvd8qV-Di0BOTBf.js +0 -16
  717. package/dist/TN-CmYqbPEz-DWwMw0Fr.js +0 -16
  718. package/dist/TO-BQQk9Xq_-B8DFmqC6.js +0 -16
  719. package/dist/TR-_MKkCnUV-JwlcTP3L.js +0 -16
  720. package/dist/TT-DoRURl1c-CH-cqA8a.js +0 -16
  721. package/dist/TV-Dt8uZCP4-BNxfT83l.js +0 -16
  722. package/dist/TW-CvHugvex-DfXcsCaL.js +0 -16
  723. package/dist/TZ-RbwBgiwb-duq9OFxQ.js +0 -16
  724. package/dist/TestView-9CRQm_ef.js +0 -14
  725. package/dist/TopSellingProductsContent-DKh5NdxZ.js +0 -80
  726. package/dist/UA-BiXHPMqV-B8z263ap.js +0 -16
  727. package/dist/UG--it_LhSj-DlUiWeJc.js +0 -16
  728. package/dist/UM-BFcTdeDD-DMTJGVgK.js +0 -16
  729. package/dist/US-BFcTdeDD-DMTJGVgK.js +0 -16
  730. package/dist/UY-C26Ndi4P-BVZWb-RO.js +0 -16
  731. package/dist/UZ-BK5ADwFW-ph43lXhE.js +0 -16
  732. package/dist/UserIndicationsPage-BnnT28Tn.js +0 -743
  733. package/dist/VA-Cpq1n4yW-Cpuym3zd.js +0 -16
  734. package/dist/VC-D1Fjbog5-BCfEgmx0.js +0 -16
  735. package/dist/VE-CeM-hea7-BOAng-R9.js +0 -16
  736. package/dist/VG-qhjKl9TO-D_i-eenB.js +0 -16
  737. package/dist/VI-C-kcu42_-gDEsrJsD.js +0 -16
  738. package/dist/VN-2yoryeK1-uHPQxyir.js +0 -16
  739. package/dist/VU-CkLlsgzP-CL7qX3FO.js +0 -16
  740. package/dist/WF-BDa53dEz-CyEpzrWH.js +0 -16
  741. package/dist/WS-CNi2O6Qm-CMb4auQx.js +0 -16
  742. package/dist/WhatsappPreview.vue_vue_type_script_setup_true_lang-D1omqu9f.js +0 -157
  743. package/dist/WithdrawAdvance-Ccep1JA-.js +0 -17
  744. package/dist/WithdrawBalanceStore-B20oJdvz.js +0 -504
  745. package/dist/WithdrawBankAccountStore-DsC4ZZdM.js +0 -130
  746. package/dist/WithdrawBlocked-NNr_muot.js +0 -133
  747. package/dist/WithdrawCompanyStore-BfVnw3lu.js +0 -80
  748. package/dist/WithdrawGuaranteeExtract-D89hQaf8.js +0 -980
  749. package/dist/WithdrawHome-BFYz-v7C.js +0 -2448
  750. package/dist/WithdrawHome-DGDCoK7n.js +0 -1843
  751. package/dist/WithdrawInternational-Cqb89TzD.js +0 -17
  752. package/dist/WithdrawMaxStore-_rja1BVK.js +0 -375
  753. package/dist/WithdrawNegativeCompany.vue_vue_type_script_setup_true_lang-D-p791VE.js +0 -531
  754. package/dist/WithdrawNoAccountWarning-D0hQYAcv.js +0 -233
  755. package/dist/WithdrawPermissionGuard-Dh_mbukV.js +0 -338
  756. package/dist/WithdrawRequest-CB8Y9QWF.js +0 -17
  757. package/dist/WithdrawRequest-F37bBNu9.js +0 -944
  758. package/dist/WithdrawRequestDetail-CNp0KDNX.js +0 -284
  759. package/dist/WithdrawRequestLayout.vue_vue_type_script_setup_true_lang-DGkd1Esj.js +0 -937
  760. package/dist/YE-DxPZysMs-CpLn8RWj.js +0 -16
  761. package/dist/YT-BMJJ1U_T-CDXFoXV0.js +0 -16
  762. package/dist/ZA-BjQXS8mc-B0UQZUrN.js +0 -16
  763. package/dist/ZM-Dw0PmMTO-lGOmeQdn.js +0 -16
  764. package/dist/ZW-D0UStZMr-xCVgLVmw.js +0 -16
  765. package/dist/affiliate-Bgt9fadK-D963Q88G.js +0 -22
  766. package/dist/amex-CvNwRHhS-BBsK7IIu.js +0 -16
  767. package/dist/api-CIMKicLA.js +0 -11
  768. package/dist/apple_pay-DtsAzVjF-B41BU1HD.js +0 -20
  769. package/dist/archive-CFoPOir7-BpMgkpDZ.js +0 -18
  770. package/dist/aura-D1VyKb6w-Dv3gZn_e.js +0 -23
  771. package/dist/boleto-BQZRi0Q5-CxYgPyHm.js +0 -18
  772. package/dist/box-DNrK38w2-BwLsz66q.js +0 -20
  773. package/dist/cart-p5jccB8o-DF5drP2k.js +0 -15
  774. package/dist/cash-FZcelZV1-CnTZqD-U.js +0 -20
  775. package/dist/chart-YJ27XOr3-BPPe3GdW.js +0 -22
  776. package/dist/credit_card-CGrPYCJP-e0PKYFkL.js +0 -15
  777. package/dist/csv-CYa6aPS5-DFrnOxgO.js +0 -18
  778. package/dist/dayjs.min-BfgpYSt2.js +0 -282
  779. package/dist/diners-CN_1suUM-DVgMrdIj.js +0 -26
  780. package/dist/discover-vVTOFEvv-eHwdSwfK.js +0 -22
  781. package/dist/ds-appmax-v322-CpQMgZw3.js +0 -52
  782. package/dist/ds-appmax-v327-Ogu8YEIj.js +0 -69
  783. package/dist/ds-appmax-v330-DU7SsVuF.js +0 -48
  784. package/dist/ds-appmax-v335-Bu5aCfYb.js +0 -278
  785. package/dist/elo-BaNbqhYS-2SN-EGzL.js +0 -15
  786. package/dist/gear-BHOWpd7b-CxTyK_3h.js +0 -18
  787. package/dist/grid-B7I0mWry-DIYOqABE.js +0 -18
  788. package/dist/hipercard-DBsszwxC-O3YILWno.js +0 -22
  789. package/dist/index-B0VSb7WU.js +0 -1567
  790. package/dist/index-B3TmIKjB.js +0 -150
  791. package/dist/index-B50N-W-a.js +0 -808
  792. package/dist/index-B5D3_Xvi.js +0 -9812
  793. package/dist/index-BH-_EudT.js +0 -117
  794. package/dist/index-BQkmaKbH.js +0 -83
  795. package/dist/index-BWlCj_o_.js +0 -681
  796. package/dist/index-BYTi8KOq.js +0 -1790
  797. package/dist/index-BeA0UPnd.js +0 -28
  798. package/dist/index-Bfu5BNbN.js +0 -230
  799. package/dist/index-ByaHDAn-.js +0 -534
  800. package/dist/index-C9VJ4W4D.js +0 -961
  801. package/dist/index-CDH6Q9OK.js +0 -18
  802. package/dist/index-CbPPVyeN.js +0 -217
  803. package/dist/index-Cc1ntr1N.js +0 -21
  804. package/dist/index-CnNeFAhj.js +0 -35
  805. package/dist/index-CoD8VMcG.js +0 -4133
  806. package/dist/index-Ct51ZylZ.js +0 -200
  807. package/dist/index-D9bN7Q-Y.js +0 -409
  808. package/dist/index-DFe60DBo.js +0 -159
  809. package/dist/index-DHI_7PxN.js +0 -11
  810. package/dist/index-DMwh-GaM.js +0 -275
  811. package/dist/index-DbAmAB7j.js +0 -219
  812. package/dist/index-DhRYkSPC.js +0 -721
  813. package/dist/index-Dhe_zOZu.js +0 -219
  814. package/dist/index-Du2tTRlE.js +0 -21
  815. package/dist/index-DzftXkkx.js +0 -67
  816. package/dist/index-GylxZXuC.js +0 -62
  817. package/dist/index-QZyAbkkv.js +0 -106
  818. package/dist/index-XpYbwknJ.js +0 -332
  819. package/dist/index-_-X480d-.js +0 -92
  820. package/dist/index-bCzxdosm.js +0 -169
  821. package/dist/index-nN012QFO.js +0 -153
  822. package/dist/index-w0KwgECI.js +0 -1433
  823. package/dist/index.page-CNPvzJKt.js +0 -828
  824. package/dist/infos-8KGPLXoE-C6OsCWqK.js +0 -18
  825. package/dist/integrations-UOltVEyj-M_RdnWiP.js +0 -19
  826. package/dist/logs-Ce3fZY0v-CVreLBK_.js +0 -28
  827. package/dist/maestro-BMomgHxO-BNgiakAR.js +0 -27
  828. package/dist/main-BxSNdVUz.js +0 -103911
  829. package/dist/mastercard-5I-dcOVV-Ds80DwY-.js +0 -30
  830. package/dist/max_brand-Crj-SFUw-DK399Iq_.js +0 -29
  831. package/dist/max_brand_active-BIkS5qkP-CMFLrBZF.js +0 -27
  832. package/dist/max_brand_negative-BxvdIegN-JSR-KVwv.js +0 -30
  833. package/dist/menu.page-kL-gVlzs.js +0 -274
  834. package/dist/money-DZpB5eTf-C4RoV8Qo.js +0 -19
  835. package/dist/notification-DMezLtAj-IzO6v-CJ.js +0 -18
  836. package/dist/paypal-DMYjfEw0-D_lMXGAN.js +0 -15
  837. package/dist/pix-DXdX91yj-CsL4mdir.js +0 -22
  838. package/dist/pix_outline-D_xXXgCN-Ci4-UNcA.js +0 -16
  839. package/dist/pusher-Dk_QQo3l.js +0 -4010
  840. package/dist/shield-DS-Xf4WH-CqZ9vik1.js +0 -15
  841. package/dist/solid_help-DNaqfgoc-DprccH4-.js +0 -20
  842. package/dist/solid_home-BDUiJDVY-BJxbZIJ7.js +0 -18
  843. package/dist/solid_leaderboard-DtqK7q9Y-DhzHx0Mm.js +0 -18
  844. package/dist/solid_store-Cfv6o4b8-CVAdL9nk.js +0 -18
  845. package/dist/ticket_icon-DwvyLm7c-HVUOghvW.js +0 -22
  846. package/dist/useQueryFilter-B9jobv4G.js +0 -93
  847. package/dist/useRecurringTable-C-HMx7Go.js +0 -161
  848. package/dist/user-BRpwqYx8-Cr7iRLnS.js +0 -18
  849. package/dist/validateURL.helper-CAafZEs1.js +0 -126
  850. package/dist/visa-tPjWcMbi-zgcZYmD1.js +0 -18
@@ -1,4010 +0,0 @@
1
- import { aK as getDefaultExportFromCjs } from "./main-BxSNdVUz.js";
2
- var pusher = { exports: {} };
3
- /*!
4
- * Pusher JavaScript Library v8.4.0-rc2
5
- * https://pusher.com/
6
- *
7
- * Copyright 2020, Pusher
8
- * Released under the MIT licence.
9
- */
10
- (function(module, exports) {
11
- (function webpackUniversalModuleDefinition(root, factory) {
12
- module.exports = factory();
13
- })(window, function() {
14
- return (
15
- /******/
16
- function(modules) {
17
- var installedModules = {};
18
- function __webpack_require__(moduleId) {
19
- if (installedModules[moduleId]) {
20
- return installedModules[moduleId].exports;
21
- }
22
- var module2 = installedModules[moduleId] = {
23
- /******/
24
- i: moduleId,
25
- /******/
26
- l: false,
27
- /******/
28
- exports: {}
29
- /******/
30
- };
31
- modules[moduleId].call(module2.exports, module2, module2.exports, __webpack_require__);
32
- module2.l = true;
33
- return module2.exports;
34
- }
35
- __webpack_require__.m = modules;
36
- __webpack_require__.c = installedModules;
37
- __webpack_require__.d = function(exports2, name, getter) {
38
- if (!__webpack_require__.o(exports2, name)) {
39
- Object.defineProperty(exports2, name, { enumerable: true, get: getter });
40
- }
41
- };
42
- __webpack_require__.r = function(exports2) {
43
- if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
44
- Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
45
- }
46
- Object.defineProperty(exports2, "__esModule", { value: true });
47
- };
48
- __webpack_require__.t = function(value, mode) {
49
- if (mode & 1) value = __webpack_require__(value);
50
- if (mode & 8) return value;
51
- if (mode & 4 && typeof value === "object" && value && value.__esModule) return value;
52
- var ns = /* @__PURE__ */ Object.create(null);
53
- __webpack_require__.r(ns);
54
- Object.defineProperty(ns, "default", { enumerable: true, value });
55
- if (mode & 2 && typeof value != "string") for (var key in value) __webpack_require__.d(ns, key, (function(key2) {
56
- return value[key2];
57
- }).bind(null, key));
58
- return ns;
59
- };
60
- __webpack_require__.n = function(module2) {
61
- var getter = module2 && module2.__esModule ? (
62
- /******/
63
- function getDefault() {
64
- return module2["default"];
65
- }
66
- ) : (
67
- /******/
68
- function getModuleExports() {
69
- return module2;
70
- }
71
- );
72
- __webpack_require__.d(getter, "a", getter);
73
- return getter;
74
- };
75
- __webpack_require__.o = function(object, property) {
76
- return Object.prototype.hasOwnProperty.call(object, property);
77
- };
78
- __webpack_require__.p = "";
79
- return __webpack_require__(__webpack_require__.s = 2);
80
- }([
81
- /* 0 */
82
- /***/
83
- function(module2, exports2, __webpack_require__) {
84
- var __extends = this && this.__extends || /* @__PURE__ */ function() {
85
- var extendStatics = function(d, b) {
86
- extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
87
- d2.__proto__ = b2;
88
- } || function(d2, b2) {
89
- for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
90
- };
91
- return extendStatics(d, b);
92
- };
93
- return function(d, b) {
94
- extendStatics(d, b);
95
- function __() {
96
- this.constructor = d;
97
- }
98
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
99
- };
100
- }();
101
- Object.defineProperty(exports2, "__esModule", { value: true });
102
- var INVALID_BYTE = 256;
103
- var Coder = (
104
- /** @class */
105
- function() {
106
- function Coder2(_paddingCharacter) {
107
- if (_paddingCharacter === void 0) {
108
- _paddingCharacter = "=";
109
- }
110
- this._paddingCharacter = _paddingCharacter;
111
- }
112
- Coder2.prototype.encodedLength = function(length) {
113
- if (!this._paddingCharacter) {
114
- return (length * 8 + 5) / 6 | 0;
115
- }
116
- return (length + 2) / 3 * 4 | 0;
117
- };
118
- Coder2.prototype.encode = function(data) {
119
- var out = "";
120
- var i = 0;
121
- for (; i < data.length - 2; i += 3) {
122
- var c = data[i] << 16 | data[i + 1] << 8 | data[i + 2];
123
- out += this._encodeByte(c >>> 3 * 6 & 63);
124
- out += this._encodeByte(c >>> 2 * 6 & 63);
125
- out += this._encodeByte(c >>> 1 * 6 & 63);
126
- out += this._encodeByte(c >>> 0 * 6 & 63);
127
- }
128
- var left = data.length - i;
129
- if (left > 0) {
130
- var c = data[i] << 16 | (left === 2 ? data[i + 1] << 8 : 0);
131
- out += this._encodeByte(c >>> 3 * 6 & 63);
132
- out += this._encodeByte(c >>> 2 * 6 & 63);
133
- if (left === 2) {
134
- out += this._encodeByte(c >>> 1 * 6 & 63);
135
- } else {
136
- out += this._paddingCharacter || "";
137
- }
138
- out += this._paddingCharacter || "";
139
- }
140
- return out;
141
- };
142
- Coder2.prototype.maxDecodedLength = function(length) {
143
- if (!this._paddingCharacter) {
144
- return (length * 6 + 7) / 8 | 0;
145
- }
146
- return length / 4 * 3 | 0;
147
- };
148
- Coder2.prototype.decodedLength = function(s) {
149
- return this.maxDecodedLength(s.length - this._getPaddingLength(s));
150
- };
151
- Coder2.prototype.decode = function(s) {
152
- if (s.length === 0) {
153
- return new Uint8Array(0);
154
- }
155
- var paddingLength = this._getPaddingLength(s);
156
- var length = s.length - paddingLength;
157
- var out = new Uint8Array(this.maxDecodedLength(length));
158
- var op = 0;
159
- var i = 0;
160
- var haveBad = 0;
161
- var v0 = 0, v1 = 0, v2 = 0, v3 = 0;
162
- for (; i < length - 4; i += 4) {
163
- v0 = this._decodeChar(s.charCodeAt(i + 0));
164
- v1 = this._decodeChar(s.charCodeAt(i + 1));
165
- v2 = this._decodeChar(s.charCodeAt(i + 2));
166
- v3 = this._decodeChar(s.charCodeAt(i + 3));
167
- out[op++] = v0 << 2 | v1 >>> 4;
168
- out[op++] = v1 << 4 | v2 >>> 2;
169
- out[op++] = v2 << 6 | v3;
170
- haveBad |= v0 & INVALID_BYTE;
171
- haveBad |= v1 & INVALID_BYTE;
172
- haveBad |= v2 & INVALID_BYTE;
173
- haveBad |= v3 & INVALID_BYTE;
174
- }
175
- if (i < length - 1) {
176
- v0 = this._decodeChar(s.charCodeAt(i));
177
- v1 = this._decodeChar(s.charCodeAt(i + 1));
178
- out[op++] = v0 << 2 | v1 >>> 4;
179
- haveBad |= v0 & INVALID_BYTE;
180
- haveBad |= v1 & INVALID_BYTE;
181
- }
182
- if (i < length - 2) {
183
- v2 = this._decodeChar(s.charCodeAt(i + 2));
184
- out[op++] = v1 << 4 | v2 >>> 2;
185
- haveBad |= v2 & INVALID_BYTE;
186
- }
187
- if (i < length - 3) {
188
- v3 = this._decodeChar(s.charCodeAt(i + 3));
189
- out[op++] = v2 << 6 | v3;
190
- haveBad |= v3 & INVALID_BYTE;
191
- }
192
- if (haveBad !== 0) {
193
- throw new Error("Base64Coder: incorrect characters for decoding");
194
- }
195
- return out;
196
- };
197
- Coder2.prototype._encodeByte = function(b) {
198
- var result = b;
199
- result += 65;
200
- result += 25 - b >>> 8 & 0 - 65 - 26 + 97;
201
- result += 51 - b >>> 8 & 26 - 97 - 52 + 48;
202
- result += 61 - b >>> 8 & 52 - 48 - 62 + 43;
203
- result += 62 - b >>> 8 & 62 - 43 - 63 + 47;
204
- return String.fromCharCode(result);
205
- };
206
- Coder2.prototype._decodeChar = function(c) {
207
- var result = INVALID_BYTE;
208
- result += (42 - c & c - 44) >>> 8 & -256 + c - 43 + 62;
209
- result += (46 - c & c - 48) >>> 8 & -256 + c - 47 + 63;
210
- result += (47 - c & c - 58) >>> 8 & -256 + c - 48 + 52;
211
- result += (64 - c & c - 91) >>> 8 & -256 + c - 65 + 0;
212
- result += (96 - c & c - 123) >>> 8 & -256 + c - 97 + 26;
213
- return result;
214
- };
215
- Coder2.prototype._getPaddingLength = function(s) {
216
- var paddingLength = 0;
217
- if (this._paddingCharacter) {
218
- for (var i = s.length - 1; i >= 0; i--) {
219
- if (s[i] !== this._paddingCharacter) {
220
- break;
221
- }
222
- paddingLength++;
223
- }
224
- if (s.length < 4 || paddingLength > 2) {
225
- throw new Error("Base64Coder: incorrect padding");
226
- }
227
- }
228
- return paddingLength;
229
- };
230
- return Coder2;
231
- }()
232
- );
233
- exports2.Coder = Coder;
234
- var stdCoder = new Coder();
235
- function encode(data) {
236
- return stdCoder.encode(data);
237
- }
238
- exports2.encode = encode;
239
- function decode(s) {
240
- return stdCoder.decode(s);
241
- }
242
- exports2.decode = decode;
243
- var URLSafeCoder = (
244
- /** @class */
245
- function(_super) {
246
- __extends(URLSafeCoder2, _super);
247
- function URLSafeCoder2() {
248
- return _super !== null && _super.apply(this, arguments) || this;
249
- }
250
- URLSafeCoder2.prototype._encodeByte = function(b) {
251
- var result = b;
252
- result += 65;
253
- result += 25 - b >>> 8 & 0 - 65 - 26 + 97;
254
- result += 51 - b >>> 8 & 26 - 97 - 52 + 48;
255
- result += 61 - b >>> 8 & 52 - 48 - 62 + 45;
256
- result += 62 - b >>> 8 & 62 - 45 - 63 + 95;
257
- return String.fromCharCode(result);
258
- };
259
- URLSafeCoder2.prototype._decodeChar = function(c) {
260
- var result = INVALID_BYTE;
261
- result += (44 - c & c - 46) >>> 8 & -256 + c - 45 + 62;
262
- result += (94 - c & c - 96) >>> 8 & -256 + c - 95 + 63;
263
- result += (47 - c & c - 58) >>> 8 & -256 + c - 48 + 52;
264
- result += (64 - c & c - 91) >>> 8 & -256 + c - 65 + 0;
265
- result += (96 - c & c - 123) >>> 8 & -256 + c - 97 + 26;
266
- return result;
267
- };
268
- return URLSafeCoder2;
269
- }(Coder)
270
- );
271
- exports2.URLSafeCoder = URLSafeCoder;
272
- var urlSafeCoder = new URLSafeCoder();
273
- function encodeURLSafe(data) {
274
- return urlSafeCoder.encode(data);
275
- }
276
- exports2.encodeURLSafe = encodeURLSafe;
277
- function decodeURLSafe(s) {
278
- return urlSafeCoder.decode(s);
279
- }
280
- exports2.decodeURLSafe = decodeURLSafe;
281
- exports2.encodedLength = function(length) {
282
- return stdCoder.encodedLength(length);
283
- };
284
- exports2.maxDecodedLength = function(length) {
285
- return stdCoder.maxDecodedLength(length);
286
- };
287
- exports2.decodedLength = function(s) {
288
- return stdCoder.decodedLength(s);
289
- };
290
- },
291
- /* 1 */
292
- /***/
293
- function(module2, exports2, __webpack_require__) {
294
- Object.defineProperty(exports2, "__esModule", { value: true });
295
- var INVALID_UTF16 = "utf8: invalid string";
296
- var INVALID_UTF8 = "utf8: invalid source encoding";
297
- function encode(s) {
298
- var arr = new Uint8Array(encodedLength(s));
299
- var pos = 0;
300
- for (var i = 0; i < s.length; i++) {
301
- var c = s.charCodeAt(i);
302
- if (c < 128) {
303
- arr[pos++] = c;
304
- } else if (c < 2048) {
305
- arr[pos++] = 192 | c >> 6;
306
- arr[pos++] = 128 | c & 63;
307
- } else if (c < 55296) {
308
- arr[pos++] = 224 | c >> 12;
309
- arr[pos++] = 128 | c >> 6 & 63;
310
- arr[pos++] = 128 | c & 63;
311
- } else {
312
- i++;
313
- c = (c & 1023) << 10;
314
- c |= s.charCodeAt(i) & 1023;
315
- c += 65536;
316
- arr[pos++] = 240 | c >> 18;
317
- arr[pos++] = 128 | c >> 12 & 63;
318
- arr[pos++] = 128 | c >> 6 & 63;
319
- arr[pos++] = 128 | c & 63;
320
- }
321
- }
322
- return arr;
323
- }
324
- exports2.encode = encode;
325
- function encodedLength(s) {
326
- var result = 0;
327
- for (var i = 0; i < s.length; i++) {
328
- var c = s.charCodeAt(i);
329
- if (c < 128) {
330
- result += 1;
331
- } else if (c < 2048) {
332
- result += 2;
333
- } else if (c < 55296) {
334
- result += 3;
335
- } else if (c <= 57343) {
336
- if (i >= s.length - 1) {
337
- throw new Error(INVALID_UTF16);
338
- }
339
- i++;
340
- result += 4;
341
- } else {
342
- throw new Error(INVALID_UTF16);
343
- }
344
- }
345
- return result;
346
- }
347
- exports2.encodedLength = encodedLength;
348
- function decode(arr) {
349
- var chars = [];
350
- for (var i = 0; i < arr.length; i++) {
351
- var b = arr[i];
352
- if (b & 128) {
353
- var min = void 0;
354
- if (b < 224) {
355
- if (i >= arr.length) {
356
- throw new Error(INVALID_UTF8);
357
- }
358
- var n1 = arr[++i];
359
- if ((n1 & 192) !== 128) {
360
- throw new Error(INVALID_UTF8);
361
- }
362
- b = (b & 31) << 6 | n1 & 63;
363
- min = 128;
364
- } else if (b < 240) {
365
- if (i >= arr.length - 1) {
366
- throw new Error(INVALID_UTF8);
367
- }
368
- var n1 = arr[++i];
369
- var n2 = arr[++i];
370
- if ((n1 & 192) !== 128 || (n2 & 192) !== 128) {
371
- throw new Error(INVALID_UTF8);
372
- }
373
- b = (b & 15) << 12 | (n1 & 63) << 6 | n2 & 63;
374
- min = 2048;
375
- } else if (b < 248) {
376
- if (i >= arr.length - 2) {
377
- throw new Error(INVALID_UTF8);
378
- }
379
- var n1 = arr[++i];
380
- var n2 = arr[++i];
381
- var n3 = arr[++i];
382
- if ((n1 & 192) !== 128 || (n2 & 192) !== 128 || (n3 & 192) !== 128) {
383
- throw new Error(INVALID_UTF8);
384
- }
385
- b = (b & 15) << 18 | (n1 & 63) << 12 | (n2 & 63) << 6 | n3 & 63;
386
- min = 65536;
387
- } else {
388
- throw new Error(INVALID_UTF8);
389
- }
390
- if (b < min || b >= 55296 && b <= 57343) {
391
- throw new Error(INVALID_UTF8);
392
- }
393
- if (b >= 65536) {
394
- if (b > 1114111) {
395
- throw new Error(INVALID_UTF8);
396
- }
397
- b -= 65536;
398
- chars.push(String.fromCharCode(55296 | b >> 10));
399
- b = 56320 | b & 1023;
400
- }
401
- }
402
- chars.push(String.fromCharCode(b));
403
- }
404
- return chars.join("");
405
- }
406
- exports2.decode = decode;
407
- },
408
- /* 2 */
409
- /***/
410
- function(module2, exports2, __webpack_require__) {
411
- module2.exports = __webpack_require__(3).default;
412
- },
413
- /* 3 */
414
- /***/
415
- function(module2, __webpack_exports__, __webpack_require__) {
416
- __webpack_require__.r(__webpack_exports__);
417
- class ScriptReceiverFactory {
418
- constructor(prefix2, name) {
419
- this.lastId = 0;
420
- this.prefix = prefix2;
421
- this.name = name;
422
- }
423
- create(callback) {
424
- this.lastId++;
425
- var number = this.lastId;
426
- var id = this.prefix + number;
427
- var name = this.name + "[" + number + "]";
428
- var called = false;
429
- var callbackWrapper = function() {
430
- if (!called) {
431
- callback.apply(null, arguments);
432
- called = true;
433
- }
434
- };
435
- this[number] = callbackWrapper;
436
- return { number, id, name, callback: callbackWrapper };
437
- }
438
- remove(receiver) {
439
- delete this[receiver.number];
440
- }
441
- }
442
- var ScriptReceivers = new ScriptReceiverFactory("_pusher_script_", "Pusher.ScriptReceivers");
443
- var Defaults = {
444
- VERSION: "8.4.0-rc2",
445
- PROTOCOL: 7,
446
- wsPort: 80,
447
- wssPort: 443,
448
- wsPath: "",
449
- httpHost: "sockjs.pusher.com",
450
- httpPort: 80,
451
- httpsPort: 443,
452
- httpPath: "/pusher",
453
- stats_host: "stats.pusher.com",
454
- authEndpoint: "/pusher/auth",
455
- authTransport: "ajax",
456
- activityTimeout: 12e4,
457
- pongTimeout: 3e4,
458
- unavailableTimeout: 1e4,
459
- userAuthentication: {
460
- endpoint: "/pusher/user-auth",
461
- transport: "ajax"
462
- },
463
- channelAuthorization: {
464
- endpoint: "/pusher/auth",
465
- transport: "ajax"
466
- },
467
- cdn_http: "http://js.pusher.com",
468
- cdn_https: "https://js.pusher.com",
469
- dependency_suffix: ""
470
- };
471
- var defaults = Defaults;
472
- class dependency_loader_DependencyLoader {
473
- constructor(options) {
474
- this.options = options;
475
- this.receivers = options.receivers || ScriptReceivers;
476
- this.loading = {};
477
- }
478
- load(name, options, callback) {
479
- var self = this;
480
- if (self.loading[name] && self.loading[name].length > 0) {
481
- self.loading[name].push(callback);
482
- } else {
483
- self.loading[name] = [callback];
484
- var request = runtime.createScriptRequest(self.getPath(name, options));
485
- var receiver = self.receivers.create(function(error) {
486
- self.receivers.remove(receiver);
487
- if (self.loading[name]) {
488
- var callbacks = self.loading[name];
489
- delete self.loading[name];
490
- var successCallback = function(wasSuccessful) {
491
- if (!wasSuccessful) {
492
- request.cleanup();
493
- }
494
- };
495
- for (var i = 0; i < callbacks.length; i++) {
496
- callbacks[i](error, successCallback);
497
- }
498
- }
499
- });
500
- request.send(receiver);
501
- }
502
- }
503
- getRoot(options) {
504
- var cdn;
505
- var protocol = runtime.getDocument().location.protocol;
506
- if (options && options.useTLS || protocol === "https:") {
507
- cdn = this.options.cdn_https;
508
- } else {
509
- cdn = this.options.cdn_http;
510
- }
511
- return cdn.replace(/\/*$/, "") + "/" + this.options.version;
512
- }
513
- getPath(name, options) {
514
- return this.getRoot(options) + "/" + name + this.options.suffix + ".js";
515
- }
516
- }
517
- var DependenciesReceivers = new ScriptReceiverFactory("_pusher_dependencies", "Pusher.DependenciesReceivers");
518
- var Dependencies = new dependency_loader_DependencyLoader({
519
- cdn_http: defaults.cdn_http,
520
- cdn_https: defaults.cdn_https,
521
- version: defaults.VERSION,
522
- suffix: defaults.dependency_suffix,
523
- receivers: DependenciesReceivers
524
- });
525
- const urlStore = {
526
- baseUrl: "https://pusher.com",
527
- urls: {
528
- authenticationEndpoint: {
529
- path: "/docs/channels/server_api/authenticating_users"
530
- },
531
- authorizationEndpoint: {
532
- path: "/docs/channels/server_api/authorizing-users/"
533
- },
534
- javascriptQuickStart: {
535
- path: "/docs/javascript_quick_start"
536
- },
537
- triggeringClientEvents: {
538
- path: "/docs/client_api_guide/client_events#trigger-events"
539
- },
540
- encryptedChannelSupport: {
541
- fullUrl: "https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"
542
- }
543
- }
544
- };
545
- const buildLogSuffix = function(key) {
546
- const urlPrefix = "See:";
547
- const urlObj = urlStore.urls[key];
548
- if (!urlObj)
549
- return "";
550
- let url;
551
- if (urlObj.fullUrl) {
552
- url = urlObj.fullUrl;
553
- } else if (urlObj.path) {
554
- url = urlStore.baseUrl + urlObj.path;
555
- }
556
- if (!url)
557
- return "";
558
- return `${urlPrefix} ${url}`;
559
- };
560
- var url_store = { buildLogSuffix };
561
- var AuthRequestType;
562
- (function(AuthRequestType2) {
563
- AuthRequestType2["UserAuthentication"] = "user-authentication";
564
- AuthRequestType2["ChannelAuthorization"] = "channel-authorization";
565
- })(AuthRequestType || (AuthRequestType = {}));
566
- class BadEventName extends Error {
567
- constructor(msg) {
568
- super(msg);
569
- Object.setPrototypeOf(this, new.target.prototype);
570
- }
571
- }
572
- class BadChannelName extends Error {
573
- constructor(msg) {
574
- super(msg);
575
- Object.setPrototypeOf(this, new.target.prototype);
576
- }
577
- }
578
- class RequestTimedOut extends Error {
579
- constructor(msg) {
580
- super(msg);
581
- Object.setPrototypeOf(this, new.target.prototype);
582
- }
583
- }
584
- class TransportPriorityTooLow extends Error {
585
- constructor(msg) {
586
- super(msg);
587
- Object.setPrototypeOf(this, new.target.prototype);
588
- }
589
- }
590
- class TransportClosed extends Error {
591
- constructor(msg) {
592
- super(msg);
593
- Object.setPrototypeOf(this, new.target.prototype);
594
- }
595
- }
596
- class UnsupportedFeature extends Error {
597
- constructor(msg) {
598
- super(msg);
599
- Object.setPrototypeOf(this, new.target.prototype);
600
- }
601
- }
602
- class UnsupportedTransport extends Error {
603
- constructor(msg) {
604
- super(msg);
605
- Object.setPrototypeOf(this, new.target.prototype);
606
- }
607
- }
608
- class UnsupportedStrategy extends Error {
609
- constructor(msg) {
610
- super(msg);
611
- Object.setPrototypeOf(this, new.target.prototype);
612
- }
613
- }
614
- class HTTPAuthError extends Error {
615
- constructor(status, msg) {
616
- super(msg);
617
- this.status = status;
618
- Object.setPrototypeOf(this, new.target.prototype);
619
- }
620
- }
621
- const ajax = function(context, query, authOptions, authRequestType, callback) {
622
- const xhr = runtime.createXHR();
623
- xhr.open("POST", authOptions.endpoint, true);
624
- xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
625
- for (var headerName in authOptions.headers) {
626
- xhr.setRequestHeader(headerName, authOptions.headers[headerName]);
627
- }
628
- if (authOptions.headersProvider != null) {
629
- let dynamicHeaders = authOptions.headersProvider();
630
- for (var headerName in dynamicHeaders) {
631
- xhr.setRequestHeader(headerName, dynamicHeaders[headerName]);
632
- }
633
- }
634
- xhr.onreadystatechange = function() {
635
- if (xhr.readyState === 4) {
636
- if (xhr.status === 200) {
637
- let data;
638
- let parsed = false;
639
- try {
640
- data = JSON.parse(xhr.responseText);
641
- parsed = true;
642
- } catch (e) {
643
- callback(new HTTPAuthError(200, `JSON returned from ${authRequestType.toString()} endpoint was invalid, yet status code was 200. Data was: ${xhr.responseText}`), null);
644
- }
645
- if (parsed) {
646
- callback(null, data);
647
- }
648
- } else {
649
- let suffix = "";
650
- switch (authRequestType) {
651
- case AuthRequestType.UserAuthentication:
652
- suffix = url_store.buildLogSuffix("authenticationEndpoint");
653
- break;
654
- case AuthRequestType.ChannelAuthorization:
655
- suffix = `Clients must be authorized to join private or presence channels. ${url_store.buildLogSuffix("authorizationEndpoint")}`;
656
- break;
657
- }
658
- callback(new HTTPAuthError(xhr.status, `Unable to retrieve auth string from ${authRequestType.toString()} endpoint - received status: ${xhr.status} from ${authOptions.endpoint}. ${suffix}`), null);
659
- }
660
- }
661
- };
662
- xhr.send(query);
663
- return xhr;
664
- };
665
- var xhr_auth = ajax;
666
- function encode(s) {
667
- return btoa(utob(s));
668
- }
669
- var fromCharCode = String.fromCharCode;
670
- var b64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
671
- var cb_utob = function(c) {
672
- var cc = c.charCodeAt(0);
673
- return cc < 128 ? c : cc < 2048 ? fromCharCode(192 | cc >>> 6) + fromCharCode(128 | cc & 63) : fromCharCode(224 | cc >>> 12 & 15) + fromCharCode(128 | cc >>> 6 & 63) + fromCharCode(128 | cc & 63);
674
- };
675
- var utob = function(u) {
676
- return u.replace(/[^\x00-\x7F]/g, cb_utob);
677
- };
678
- var cb_encode = function(ccc) {
679
- var padlen = [0, 2, 1][ccc.length % 3];
680
- var ord = ccc.charCodeAt(0) << 16 | (ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8 | (ccc.length > 2 ? ccc.charCodeAt(2) : 0);
681
- var chars = [
682
- b64chars.charAt(ord >>> 18),
683
- b64chars.charAt(ord >>> 12 & 63),
684
- padlen >= 2 ? "=" : b64chars.charAt(ord >>> 6 & 63),
685
- padlen >= 1 ? "=" : b64chars.charAt(ord & 63)
686
- ];
687
- return chars.join("");
688
- };
689
- var btoa = window.btoa || function(b) {
690
- return b.replace(/[\s\S]{1,3}/g, cb_encode);
691
- };
692
- class Timer {
693
- constructor(set, clear, delay, callback) {
694
- this.clear = clear;
695
- this.timer = set(() => {
696
- if (this.timer) {
697
- this.timer = callback(this.timer);
698
- }
699
- }, delay);
700
- }
701
- isRunning() {
702
- return this.timer !== null;
703
- }
704
- ensureAborted() {
705
- if (this.timer) {
706
- this.clear(this.timer);
707
- this.timer = null;
708
- }
709
- }
710
- }
711
- var abstract_timer = Timer;
712
- function timers_clearTimeout(timer) {
713
- window.clearTimeout(timer);
714
- }
715
- function timers_clearInterval(timer) {
716
- window.clearInterval(timer);
717
- }
718
- class timers_OneOffTimer extends abstract_timer {
719
- constructor(delay, callback) {
720
- super(setTimeout, timers_clearTimeout, delay, function(timer) {
721
- callback();
722
- return null;
723
- });
724
- }
725
- }
726
- class timers_PeriodicTimer extends abstract_timer {
727
- constructor(delay, callback) {
728
- super(setInterval, timers_clearInterval, delay, function(timer) {
729
- callback();
730
- return timer;
731
- });
732
- }
733
- }
734
- var Util = {
735
- now() {
736
- if (Date.now) {
737
- return Date.now();
738
- } else {
739
- return (/* @__PURE__ */ new Date()).valueOf();
740
- }
741
- },
742
- defer(callback) {
743
- return new timers_OneOffTimer(0, callback);
744
- },
745
- method(name, ...args) {
746
- var boundArguments = Array.prototype.slice.call(arguments, 1);
747
- return function(object) {
748
- return object[name].apply(object, boundArguments.concat(arguments));
749
- };
750
- }
751
- };
752
- var util = Util;
753
- function extend(target, ...sources) {
754
- for (var i = 0; i < sources.length; i++) {
755
- var extensions = sources[i];
756
- for (var property in extensions) {
757
- if (extensions[property] && extensions[property].constructor && extensions[property].constructor === Object) {
758
- target[property] = extend(target[property] || {}, extensions[property]);
759
- } else {
760
- target[property] = extensions[property];
761
- }
762
- }
763
- }
764
- return target;
765
- }
766
- function stringify() {
767
- var m = ["Pusher"];
768
- for (var i = 0; i < arguments.length; i++) {
769
- if (typeof arguments[i] === "string") {
770
- m.push(arguments[i]);
771
- } else {
772
- m.push(safeJSONStringify(arguments[i]));
773
- }
774
- }
775
- return m.join(" : ");
776
- }
777
- function arrayIndexOf(array, item) {
778
- var nativeIndexOf = Array.prototype.indexOf;
779
- if (array === null) {
780
- return -1;
781
- }
782
- if (nativeIndexOf && array.indexOf === nativeIndexOf) {
783
- return array.indexOf(item);
784
- }
785
- for (var i = 0, l = array.length; i < l; i++) {
786
- if (array[i] === item) {
787
- return i;
788
- }
789
- }
790
- return -1;
791
- }
792
- function objectApply(object, f) {
793
- for (var key in object) {
794
- if (Object.prototype.hasOwnProperty.call(object, key)) {
795
- f(object[key], key, object);
796
- }
797
- }
798
- }
799
- function keys(object) {
800
- var keys2 = [];
801
- objectApply(object, function(_, key) {
802
- keys2.push(key);
803
- });
804
- return keys2;
805
- }
806
- function values(object) {
807
- var values2 = [];
808
- objectApply(object, function(value) {
809
- values2.push(value);
810
- });
811
- return values2;
812
- }
813
- function apply(array, f, context) {
814
- for (var i = 0; i < array.length; i++) {
815
- f.call(context || window, array[i], i, array);
816
- }
817
- }
818
- function map(array, f) {
819
- var result = [];
820
- for (var i = 0; i < array.length; i++) {
821
- result.push(f(array[i], i, array, result));
822
- }
823
- return result;
824
- }
825
- function mapObject(object, f) {
826
- var result = {};
827
- objectApply(object, function(value, key) {
828
- result[key] = f(value);
829
- });
830
- return result;
831
- }
832
- function filter(array, test) {
833
- test = test || function(value) {
834
- return !!value;
835
- };
836
- var result = [];
837
- for (var i = 0; i < array.length; i++) {
838
- if (test(array[i], i, array, result)) {
839
- result.push(array[i]);
840
- }
841
- }
842
- return result;
843
- }
844
- function filterObject(object, test) {
845
- var result = {};
846
- objectApply(object, function(value, key) {
847
- if (test && test(value, key, object, result) || Boolean(value)) {
848
- result[key] = value;
849
- }
850
- });
851
- return result;
852
- }
853
- function flatten(object) {
854
- var result = [];
855
- objectApply(object, function(value, key) {
856
- result.push([key, value]);
857
- });
858
- return result;
859
- }
860
- function any(array, test) {
861
- for (var i = 0; i < array.length; i++) {
862
- if (test(array[i], i, array)) {
863
- return true;
864
- }
865
- }
866
- return false;
867
- }
868
- function collections_all(array, test) {
869
- for (var i = 0; i < array.length; i++) {
870
- if (!test(array[i], i, array)) {
871
- return false;
872
- }
873
- }
874
- return true;
875
- }
876
- function encodeParamsObject(data) {
877
- return mapObject(data, function(value) {
878
- if (typeof value === "object") {
879
- value = safeJSONStringify(value);
880
- }
881
- return encodeURIComponent(encode(value.toString()));
882
- });
883
- }
884
- function buildQueryString(data) {
885
- var params = filterObject(data, function(value) {
886
- return value !== void 0;
887
- });
888
- var query = map(flatten(encodeParamsObject(params)), util.method("join", "=")).join("&");
889
- return query;
890
- }
891
- function decycleObject(object) {
892
- var objects = [], paths = [];
893
- return function derez(value, path) {
894
- var i, name, nu;
895
- switch (typeof value) {
896
- case "object":
897
- if (!value) {
898
- return null;
899
- }
900
- for (i = 0; i < objects.length; i += 1) {
901
- if (objects[i] === value) {
902
- return { $ref: paths[i] };
903
- }
904
- }
905
- objects.push(value);
906
- paths.push(path);
907
- if (Object.prototype.toString.apply(value) === "[object Array]") {
908
- nu = [];
909
- for (i = 0; i < value.length; i += 1) {
910
- nu[i] = derez(value[i], path + "[" + i + "]");
911
- }
912
- } else {
913
- nu = {};
914
- for (name in value) {
915
- if (Object.prototype.hasOwnProperty.call(value, name)) {
916
- nu[name] = derez(value[name], path + "[" + JSON.stringify(name) + "]");
917
- }
918
- }
919
- }
920
- return nu;
921
- case "number":
922
- case "string":
923
- case "boolean":
924
- return value;
925
- }
926
- }(object, "$");
927
- }
928
- function safeJSONStringify(source) {
929
- try {
930
- return JSON.stringify(source);
931
- } catch (e) {
932
- return JSON.stringify(decycleObject(source));
933
- }
934
- }
935
- class logger_Logger {
936
- constructor() {
937
- this.globalLog = (message) => {
938
- if (window.console && window.console.log) {
939
- window.console.log(message);
940
- }
941
- };
942
- }
943
- debug(...args) {
944
- this.log(this.globalLog, args);
945
- }
946
- warn(...args) {
947
- this.log(this.globalLogWarn, args);
948
- }
949
- error(...args) {
950
- this.log(this.globalLogError, args);
951
- }
952
- globalLogWarn(message) {
953
- if (window.console && window.console.warn) {
954
- window.console.warn(message);
955
- } else {
956
- this.globalLog(message);
957
- }
958
- }
959
- globalLogError(message) {
960
- if (window.console && window.console.error) {
961
- window.console.error(message);
962
- } else {
963
- this.globalLogWarn(message);
964
- }
965
- }
966
- log(defaultLoggingFunction, ...args) {
967
- var message = stringify.apply(this, arguments);
968
- if (core_pusher.log) {
969
- core_pusher.log(message);
970
- } else if (core_pusher.logToConsole) {
971
- const log = defaultLoggingFunction.bind(this);
972
- log(message);
973
- }
974
- }
975
- }
976
- var logger = new logger_Logger();
977
- var jsonp = function(context, query, authOptions, authRequestType, callback) {
978
- if (authOptions.headers !== void 0 || authOptions.headersProvider != null) {
979
- logger.warn(`To send headers with the ${authRequestType.toString()} request, you must use AJAX, rather than JSONP.`);
980
- }
981
- var callbackName = context.nextAuthCallbackID.toString();
982
- context.nextAuthCallbackID++;
983
- var document2 = context.getDocument();
984
- var script = document2.createElement("script");
985
- context.auth_callbacks[callbackName] = function(data) {
986
- callback(null, data);
987
- };
988
- var callback_name = "Pusher.auth_callbacks['" + callbackName + "']";
989
- script.src = authOptions.endpoint + "?callback=" + encodeURIComponent(callback_name) + "&" + query;
990
- var head = document2.getElementsByTagName("head")[0] || document2.documentElement;
991
- head.insertBefore(script, head.firstChild);
992
- };
993
- var jsonp_auth = jsonp;
994
- class ScriptRequest {
995
- constructor(src) {
996
- this.src = src;
997
- }
998
- send(receiver) {
999
- var self = this;
1000
- var errorString = "Error loading " + self.src;
1001
- self.script = document.createElement("script");
1002
- self.script.id = receiver.id;
1003
- self.script.src = self.src;
1004
- self.script.type = "text/javascript";
1005
- self.script.charset = "UTF-8";
1006
- if (self.script.addEventListener) {
1007
- self.script.onerror = function() {
1008
- receiver.callback(errorString);
1009
- };
1010
- self.script.onload = function() {
1011
- receiver.callback(null);
1012
- };
1013
- } else {
1014
- self.script.onreadystatechange = function() {
1015
- if (self.script.readyState === "loaded" || self.script.readyState === "complete") {
1016
- receiver.callback(null);
1017
- }
1018
- };
1019
- }
1020
- if (self.script.async === void 0 && document.attachEvent && /opera/i.test(navigator.userAgent)) {
1021
- self.errorScript = document.createElement("script");
1022
- self.errorScript.id = receiver.id + "_error";
1023
- self.errorScript.text = receiver.name + "('" + errorString + "');";
1024
- self.script.async = self.errorScript.async = false;
1025
- } else {
1026
- self.script.async = true;
1027
- }
1028
- var head = document.getElementsByTagName("head")[0];
1029
- head.insertBefore(self.script, head.firstChild);
1030
- if (self.errorScript) {
1031
- head.insertBefore(self.errorScript, self.script.nextSibling);
1032
- }
1033
- }
1034
- cleanup() {
1035
- if (this.script) {
1036
- this.script.onload = this.script.onerror = null;
1037
- this.script.onreadystatechange = null;
1038
- }
1039
- if (this.script && this.script.parentNode) {
1040
- this.script.parentNode.removeChild(this.script);
1041
- }
1042
- if (this.errorScript && this.errorScript.parentNode) {
1043
- this.errorScript.parentNode.removeChild(this.errorScript);
1044
- }
1045
- this.script = null;
1046
- this.errorScript = null;
1047
- }
1048
- }
1049
- class jsonp_request_JSONPRequest {
1050
- constructor(url, data) {
1051
- this.url = url;
1052
- this.data = data;
1053
- }
1054
- send(receiver) {
1055
- if (this.request) {
1056
- return;
1057
- }
1058
- var query = buildQueryString(this.data);
1059
- var url = this.url + "/" + receiver.number + "?" + query;
1060
- this.request = runtime.createScriptRequest(url);
1061
- this.request.send(receiver);
1062
- }
1063
- cleanup() {
1064
- if (this.request) {
1065
- this.request.cleanup();
1066
- }
1067
- }
1068
- }
1069
- var getAgent = function(sender, useTLS) {
1070
- return function(data, callback) {
1071
- var scheme = "http" + (useTLS ? "s" : "") + "://";
1072
- var url = scheme + (sender.host || sender.options.host) + sender.options.path;
1073
- var request = runtime.createJSONPRequest(url, data);
1074
- var receiver = runtime.ScriptReceivers.create(function(error, result) {
1075
- ScriptReceivers.remove(receiver);
1076
- request.cleanup();
1077
- if (result && result.host) {
1078
- sender.host = result.host;
1079
- }
1080
- if (callback) {
1081
- callback(error, result);
1082
- }
1083
- });
1084
- request.send(receiver);
1085
- };
1086
- };
1087
- var jsonp_timeline_jsonp = {
1088
- name: "jsonp",
1089
- getAgent
1090
- };
1091
- var jsonp_timeline = jsonp_timeline_jsonp;
1092
- function getGenericURL(baseScheme, params, path) {
1093
- var scheme = baseScheme + (params.useTLS ? "s" : "");
1094
- var host = params.useTLS ? params.hostTLS : params.hostNonTLS;
1095
- return scheme + "://" + host + path;
1096
- }
1097
- function getGenericPath(key, queryString) {
1098
- var path = "/app/" + key;
1099
- var query = "?protocol=" + defaults.PROTOCOL + "&client=js&version=" + defaults.VERSION + (queryString ? "&" + queryString : "");
1100
- return path + query;
1101
- }
1102
- var ws = {
1103
- getInitial: function(key, params) {
1104
- var path = (params.httpPath || "") + getGenericPath(key, "flash=false");
1105
- return getGenericURL("ws", params, path);
1106
- }
1107
- };
1108
- var http = {
1109
- getInitial: function(key, params) {
1110
- var path = (params.httpPath || "/pusher") + getGenericPath(key);
1111
- return getGenericURL("http", params, path);
1112
- }
1113
- };
1114
- var sockjs = {
1115
- getInitial: function(key, params) {
1116
- return getGenericURL("http", params, params.httpPath || "/pusher");
1117
- },
1118
- getPath: function(key, params) {
1119
- return getGenericPath(key);
1120
- }
1121
- };
1122
- class callback_registry_CallbackRegistry {
1123
- constructor() {
1124
- this._callbacks = {};
1125
- }
1126
- get(name) {
1127
- return this._callbacks[prefix(name)];
1128
- }
1129
- add(name, callback, context) {
1130
- var prefixedEventName = prefix(name);
1131
- this._callbacks[prefixedEventName] = this._callbacks[prefixedEventName] || [];
1132
- this._callbacks[prefixedEventName].push({
1133
- fn: callback,
1134
- context
1135
- });
1136
- }
1137
- remove(name, callback, context) {
1138
- if (!name && !callback && !context) {
1139
- this._callbacks = {};
1140
- return;
1141
- }
1142
- var names = name ? [prefix(name)] : keys(this._callbacks);
1143
- if (callback || context) {
1144
- this.removeCallback(names, callback, context);
1145
- } else {
1146
- this.removeAllCallbacks(names);
1147
- }
1148
- }
1149
- removeCallback(names, callback, context) {
1150
- apply(names, function(name) {
1151
- this._callbacks[name] = filter(this._callbacks[name] || [], function(binding) {
1152
- return callback && callback !== binding.fn || context && context !== binding.context;
1153
- });
1154
- if (this._callbacks[name].length === 0) {
1155
- delete this._callbacks[name];
1156
- }
1157
- }, this);
1158
- }
1159
- removeAllCallbacks(names) {
1160
- apply(names, function(name) {
1161
- delete this._callbacks[name];
1162
- }, this);
1163
- }
1164
- }
1165
- function prefix(name) {
1166
- return "_" + name;
1167
- }
1168
- class dispatcher_Dispatcher {
1169
- constructor(failThrough) {
1170
- this.callbacks = new callback_registry_CallbackRegistry();
1171
- this.global_callbacks = [];
1172
- this.failThrough = failThrough;
1173
- }
1174
- bind(eventName, callback, context) {
1175
- this.callbacks.add(eventName, callback, context);
1176
- return this;
1177
- }
1178
- bind_global(callback) {
1179
- this.global_callbacks.push(callback);
1180
- return this;
1181
- }
1182
- unbind(eventName, callback, context) {
1183
- this.callbacks.remove(eventName, callback, context);
1184
- return this;
1185
- }
1186
- unbind_global(callback) {
1187
- if (!callback) {
1188
- this.global_callbacks = [];
1189
- return this;
1190
- }
1191
- this.global_callbacks = filter(this.global_callbacks || [], (c) => c !== callback);
1192
- return this;
1193
- }
1194
- unbind_all() {
1195
- this.unbind();
1196
- this.unbind_global();
1197
- return this;
1198
- }
1199
- emit(eventName, data, metadata) {
1200
- for (var i = 0; i < this.global_callbacks.length; i++) {
1201
- this.global_callbacks[i](eventName, data);
1202
- }
1203
- var callbacks = this.callbacks.get(eventName);
1204
- var args = [];
1205
- if (metadata) {
1206
- args.push(data, metadata);
1207
- } else if (data) {
1208
- args.push(data);
1209
- }
1210
- if (callbacks && callbacks.length > 0) {
1211
- for (var i = 0; i < callbacks.length; i++) {
1212
- callbacks[i].fn.apply(callbacks[i].context || window, args);
1213
- }
1214
- } else if (this.failThrough) {
1215
- this.failThrough(eventName, data);
1216
- }
1217
- return this;
1218
- }
1219
- }
1220
- class transport_connection_TransportConnection extends dispatcher_Dispatcher {
1221
- constructor(hooks, name, priority, key, options) {
1222
- super();
1223
- this.initialize = runtime.transportConnectionInitializer;
1224
- this.hooks = hooks;
1225
- this.name = name;
1226
- this.priority = priority;
1227
- this.key = key;
1228
- this.options = options;
1229
- this.state = "new";
1230
- this.timeline = options.timeline;
1231
- this.activityTimeout = options.activityTimeout;
1232
- this.id = this.timeline.generateUniqueID();
1233
- }
1234
- handlesActivityChecks() {
1235
- return Boolean(this.hooks.handlesActivityChecks);
1236
- }
1237
- supportsPing() {
1238
- return Boolean(this.hooks.supportsPing);
1239
- }
1240
- connect() {
1241
- if (this.socket || this.state !== "initialized") {
1242
- return false;
1243
- }
1244
- var url = this.hooks.urls.getInitial(this.key, this.options);
1245
- try {
1246
- this.socket = this.hooks.getSocket(url, this.options);
1247
- } catch (e) {
1248
- util.defer(() => {
1249
- this.onError(e);
1250
- this.changeState("closed");
1251
- });
1252
- return false;
1253
- }
1254
- this.bindListeners();
1255
- logger.debug("Connecting", { transport: this.name, url });
1256
- this.changeState("connecting");
1257
- return true;
1258
- }
1259
- close() {
1260
- if (this.socket) {
1261
- this.socket.close();
1262
- return true;
1263
- } else {
1264
- return false;
1265
- }
1266
- }
1267
- send(data) {
1268
- if (this.state === "open") {
1269
- util.defer(() => {
1270
- if (this.socket) {
1271
- this.socket.send(data);
1272
- }
1273
- });
1274
- return true;
1275
- } else {
1276
- return false;
1277
- }
1278
- }
1279
- ping() {
1280
- if (this.state === "open" && this.supportsPing()) {
1281
- this.socket.ping();
1282
- }
1283
- }
1284
- onOpen() {
1285
- if (this.hooks.beforeOpen) {
1286
- this.hooks.beforeOpen(this.socket, this.hooks.urls.getPath(this.key, this.options));
1287
- }
1288
- this.changeState("open");
1289
- this.socket.onopen = void 0;
1290
- }
1291
- onError(error) {
1292
- this.emit("error", { type: "WebSocketError", error });
1293
- this.timeline.error(this.buildTimelineMessage({ error: error.toString() }));
1294
- }
1295
- onClose(closeEvent) {
1296
- if (closeEvent) {
1297
- this.changeState("closed", {
1298
- code: closeEvent.code,
1299
- reason: closeEvent.reason,
1300
- wasClean: closeEvent.wasClean
1301
- });
1302
- } else {
1303
- this.changeState("closed");
1304
- }
1305
- this.unbindListeners();
1306
- this.socket = void 0;
1307
- }
1308
- onMessage(message) {
1309
- this.emit("message", message);
1310
- }
1311
- onActivity() {
1312
- this.emit("activity");
1313
- }
1314
- bindListeners() {
1315
- this.socket.onopen = () => {
1316
- this.onOpen();
1317
- };
1318
- this.socket.onerror = (error) => {
1319
- this.onError(error);
1320
- };
1321
- this.socket.onclose = (closeEvent) => {
1322
- this.onClose(closeEvent);
1323
- };
1324
- this.socket.onmessage = (message) => {
1325
- this.onMessage(message);
1326
- };
1327
- if (this.supportsPing()) {
1328
- this.socket.onactivity = () => {
1329
- this.onActivity();
1330
- };
1331
- }
1332
- }
1333
- unbindListeners() {
1334
- if (this.socket) {
1335
- this.socket.onopen = void 0;
1336
- this.socket.onerror = void 0;
1337
- this.socket.onclose = void 0;
1338
- this.socket.onmessage = void 0;
1339
- if (this.supportsPing()) {
1340
- this.socket.onactivity = void 0;
1341
- }
1342
- }
1343
- }
1344
- changeState(state2, params) {
1345
- this.state = state2;
1346
- this.timeline.info(this.buildTimelineMessage({
1347
- state: state2,
1348
- params
1349
- }));
1350
- this.emit(state2, params);
1351
- }
1352
- buildTimelineMessage(message) {
1353
- return extend({ cid: this.id }, message);
1354
- }
1355
- }
1356
- class transport_Transport {
1357
- constructor(hooks) {
1358
- this.hooks = hooks;
1359
- }
1360
- isSupported(environment) {
1361
- return this.hooks.isSupported(environment);
1362
- }
1363
- createConnection(name, priority, key, options) {
1364
- return new transport_connection_TransportConnection(this.hooks, name, priority, key, options);
1365
- }
1366
- }
1367
- var WSTransport = new transport_Transport({
1368
- urls: ws,
1369
- handlesActivityChecks: false,
1370
- supportsPing: false,
1371
- isInitialized: function() {
1372
- return Boolean(runtime.getWebSocketAPI());
1373
- },
1374
- isSupported: function() {
1375
- return Boolean(runtime.getWebSocketAPI());
1376
- },
1377
- getSocket: function(url) {
1378
- return runtime.createWebSocket(url);
1379
- }
1380
- });
1381
- var httpConfiguration = {
1382
- urls: http,
1383
- handlesActivityChecks: false,
1384
- supportsPing: true,
1385
- isInitialized: function() {
1386
- return true;
1387
- }
1388
- };
1389
- var streamingConfiguration = extend({
1390
- getSocket: function(url) {
1391
- return runtime.HTTPFactory.createStreamingSocket(url);
1392
- }
1393
- }, httpConfiguration);
1394
- var pollingConfiguration = extend({
1395
- getSocket: function(url) {
1396
- return runtime.HTTPFactory.createPollingSocket(url);
1397
- }
1398
- }, httpConfiguration);
1399
- var xhrConfiguration = {
1400
- isSupported: function() {
1401
- return runtime.isXHRSupported();
1402
- }
1403
- };
1404
- var XHRStreamingTransport = new transport_Transport(extend({}, streamingConfiguration, xhrConfiguration));
1405
- var XHRPollingTransport = new transport_Transport(extend({}, pollingConfiguration, xhrConfiguration));
1406
- var Transports = {
1407
- ws: WSTransport,
1408
- xhr_streaming: XHRStreamingTransport,
1409
- xhr_polling: XHRPollingTransport
1410
- };
1411
- var transports = Transports;
1412
- var SockJSTransport = new transport_Transport({
1413
- file: "sockjs",
1414
- urls: sockjs,
1415
- handlesActivityChecks: true,
1416
- supportsPing: false,
1417
- isSupported: function() {
1418
- return true;
1419
- },
1420
- isInitialized: function() {
1421
- return window.SockJS !== void 0;
1422
- },
1423
- getSocket: function(url, options) {
1424
- return new window.SockJS(url, null, {
1425
- js_path: Dependencies.getPath("sockjs", {
1426
- useTLS: options.useTLS
1427
- }),
1428
- ignore_null_origin: options.ignoreNullOrigin
1429
- });
1430
- },
1431
- beforeOpen: function(socket, path) {
1432
- socket.send(JSON.stringify({
1433
- path
1434
- }));
1435
- }
1436
- });
1437
- var xdrConfiguration = {
1438
- isSupported: function(environment) {
1439
- var yes = runtime.isXDRSupported(environment.useTLS);
1440
- return yes;
1441
- }
1442
- };
1443
- var XDRStreamingTransport = new transport_Transport(extend({}, streamingConfiguration, xdrConfiguration));
1444
- var XDRPollingTransport = new transport_Transport(extend({}, pollingConfiguration, xdrConfiguration));
1445
- transports.xdr_streaming = XDRStreamingTransport;
1446
- transports.xdr_polling = XDRPollingTransport;
1447
- transports.sockjs = SockJSTransport;
1448
- var transports_transports = transports;
1449
- class net_info_NetInfo extends dispatcher_Dispatcher {
1450
- constructor() {
1451
- super();
1452
- var self = this;
1453
- if (window.addEventListener !== void 0) {
1454
- window.addEventListener("online", function() {
1455
- self.emit("online");
1456
- }, false);
1457
- window.addEventListener("offline", function() {
1458
- self.emit("offline");
1459
- }, false);
1460
- }
1461
- }
1462
- isOnline() {
1463
- if (window.navigator.onLine === void 0) {
1464
- return true;
1465
- } else {
1466
- return window.navigator.onLine;
1467
- }
1468
- }
1469
- }
1470
- var net_info_Network = new net_info_NetInfo();
1471
- class assistant_to_the_transport_manager_AssistantToTheTransportManager {
1472
- constructor(manager, transport, options) {
1473
- this.manager = manager;
1474
- this.transport = transport;
1475
- this.minPingDelay = options.minPingDelay;
1476
- this.maxPingDelay = options.maxPingDelay;
1477
- this.pingDelay = void 0;
1478
- }
1479
- createConnection(name, priority, key, options) {
1480
- options = extend({}, options, {
1481
- activityTimeout: this.pingDelay
1482
- });
1483
- var connection = this.transport.createConnection(name, priority, key, options);
1484
- var openTimestamp = null;
1485
- var onOpen = function() {
1486
- connection.unbind("open", onOpen);
1487
- connection.bind("closed", onClosed);
1488
- openTimestamp = util.now();
1489
- };
1490
- var onClosed = (closeEvent) => {
1491
- connection.unbind("closed", onClosed);
1492
- if (closeEvent.code === 1002 || closeEvent.code === 1003) {
1493
- this.manager.reportDeath();
1494
- } else if (!closeEvent.wasClean && openTimestamp) {
1495
- var lifespan = util.now() - openTimestamp;
1496
- if (lifespan < 2 * this.maxPingDelay) {
1497
- this.manager.reportDeath();
1498
- this.pingDelay = Math.max(lifespan / 2, this.minPingDelay);
1499
- }
1500
- }
1501
- };
1502
- connection.bind("open", onOpen);
1503
- return connection;
1504
- }
1505
- isSupported(environment) {
1506
- return this.manager.isAlive() && this.transport.isSupported(environment);
1507
- }
1508
- }
1509
- const Protocol = {
1510
- decodeMessage: function(messageEvent) {
1511
- try {
1512
- var messageData = JSON.parse(messageEvent.data);
1513
- var pusherEventData = messageData.data;
1514
- if (typeof pusherEventData === "string") {
1515
- try {
1516
- pusherEventData = JSON.parse(messageData.data);
1517
- } catch (e) {
1518
- }
1519
- }
1520
- var pusherEvent = {
1521
- event: messageData.event,
1522
- channel: messageData.channel,
1523
- data: pusherEventData
1524
- };
1525
- if (messageData.user_id) {
1526
- pusherEvent.user_id = messageData.user_id;
1527
- }
1528
- return pusherEvent;
1529
- } catch (e) {
1530
- throw { type: "MessageParseError", error: e, data: messageEvent.data };
1531
- }
1532
- },
1533
- encodeMessage: function(event) {
1534
- return JSON.stringify(event);
1535
- },
1536
- processHandshake: function(messageEvent) {
1537
- var message = Protocol.decodeMessage(messageEvent);
1538
- if (message.event === "pusher:connection_established") {
1539
- if (!message.data.activity_timeout) {
1540
- throw "No activity timeout specified in handshake";
1541
- }
1542
- return {
1543
- action: "connected",
1544
- id: message.data.socket_id,
1545
- activityTimeout: message.data.activity_timeout * 1e3
1546
- };
1547
- } else if (message.event === "pusher:error") {
1548
- return {
1549
- action: this.getCloseAction(message.data),
1550
- error: this.getCloseError(message.data)
1551
- };
1552
- } else {
1553
- throw "Invalid handshake";
1554
- }
1555
- },
1556
- getCloseAction: function(closeEvent) {
1557
- if (closeEvent.code < 4e3) {
1558
- if (closeEvent.code >= 1002 && closeEvent.code <= 1004) {
1559
- return "backoff";
1560
- } else {
1561
- return null;
1562
- }
1563
- } else if (closeEvent.code === 4e3) {
1564
- return "tls_only";
1565
- } else if (closeEvent.code < 4100) {
1566
- return "refused";
1567
- } else if (closeEvent.code < 4200) {
1568
- return "backoff";
1569
- } else if (closeEvent.code < 4300) {
1570
- return "retry";
1571
- } else {
1572
- return "refused";
1573
- }
1574
- },
1575
- getCloseError: function(closeEvent) {
1576
- if (closeEvent.code !== 1e3 && closeEvent.code !== 1001) {
1577
- return {
1578
- type: "PusherError",
1579
- data: {
1580
- code: closeEvent.code,
1581
- message: closeEvent.reason || closeEvent.message
1582
- }
1583
- };
1584
- } else {
1585
- return null;
1586
- }
1587
- }
1588
- };
1589
- var protocol_protocol = Protocol;
1590
- class connection_Connection extends dispatcher_Dispatcher {
1591
- constructor(id, transport) {
1592
- super();
1593
- this.id = id;
1594
- this.transport = transport;
1595
- this.activityTimeout = transport.activityTimeout;
1596
- this.bindListeners();
1597
- }
1598
- handlesActivityChecks() {
1599
- return this.transport.handlesActivityChecks();
1600
- }
1601
- send(data) {
1602
- return this.transport.send(data);
1603
- }
1604
- send_event(name, data, channel) {
1605
- var event = { event: name, data };
1606
- if (channel) {
1607
- event.channel = channel;
1608
- }
1609
- logger.debug("Event sent", event);
1610
- return this.send(protocol_protocol.encodeMessage(event));
1611
- }
1612
- ping() {
1613
- if (this.transport.supportsPing()) {
1614
- this.transport.ping();
1615
- } else {
1616
- this.send_event("pusher:ping", {});
1617
- }
1618
- }
1619
- close() {
1620
- this.transport.close();
1621
- }
1622
- bindListeners() {
1623
- var listeners = {
1624
- message: (messageEvent) => {
1625
- var pusherEvent;
1626
- try {
1627
- pusherEvent = protocol_protocol.decodeMessage(messageEvent);
1628
- } catch (e) {
1629
- this.emit("error", {
1630
- type: "MessageParseError",
1631
- error: e,
1632
- data: messageEvent.data
1633
- });
1634
- }
1635
- if (pusherEvent !== void 0) {
1636
- logger.debug("Event recd", pusherEvent);
1637
- switch (pusherEvent.event) {
1638
- case "pusher:error":
1639
- this.emit("error", {
1640
- type: "PusherError",
1641
- data: pusherEvent.data
1642
- });
1643
- break;
1644
- case "pusher:ping":
1645
- this.emit("ping");
1646
- break;
1647
- case "pusher:pong":
1648
- this.emit("pong");
1649
- break;
1650
- }
1651
- this.emit("message", pusherEvent);
1652
- }
1653
- },
1654
- activity: () => {
1655
- this.emit("activity");
1656
- },
1657
- error: (error) => {
1658
- this.emit("error", error);
1659
- },
1660
- closed: (closeEvent) => {
1661
- unbindListeners();
1662
- if (closeEvent && closeEvent.code) {
1663
- this.handleCloseEvent(closeEvent);
1664
- }
1665
- this.transport = null;
1666
- this.emit("closed");
1667
- }
1668
- };
1669
- var unbindListeners = () => {
1670
- objectApply(listeners, (listener, event) => {
1671
- this.transport.unbind(event, listener);
1672
- });
1673
- };
1674
- objectApply(listeners, (listener, event) => {
1675
- this.transport.bind(event, listener);
1676
- });
1677
- }
1678
- handleCloseEvent(closeEvent) {
1679
- var action = protocol_protocol.getCloseAction(closeEvent);
1680
- var error = protocol_protocol.getCloseError(closeEvent);
1681
- if (error) {
1682
- this.emit("error", error);
1683
- }
1684
- if (action) {
1685
- this.emit(action, { action, error });
1686
- }
1687
- }
1688
- }
1689
- class handshake_Handshake {
1690
- constructor(transport, callback) {
1691
- this.transport = transport;
1692
- this.callback = callback;
1693
- this.bindListeners();
1694
- }
1695
- close() {
1696
- this.unbindListeners();
1697
- this.transport.close();
1698
- }
1699
- bindListeners() {
1700
- this.onMessage = (m) => {
1701
- this.unbindListeners();
1702
- var result;
1703
- try {
1704
- result = protocol_protocol.processHandshake(m);
1705
- } catch (e) {
1706
- this.finish("error", { error: e });
1707
- this.transport.close();
1708
- return;
1709
- }
1710
- if (result.action === "connected") {
1711
- this.finish("connected", {
1712
- connection: new connection_Connection(result.id, this.transport),
1713
- activityTimeout: result.activityTimeout
1714
- });
1715
- } else {
1716
- this.finish(result.action, { error: result.error });
1717
- this.transport.close();
1718
- }
1719
- };
1720
- this.onClosed = (closeEvent) => {
1721
- this.unbindListeners();
1722
- var action = protocol_protocol.getCloseAction(closeEvent) || "backoff";
1723
- var error = protocol_protocol.getCloseError(closeEvent);
1724
- this.finish(action, { error });
1725
- };
1726
- this.transport.bind("message", this.onMessage);
1727
- this.transport.bind("closed", this.onClosed);
1728
- }
1729
- unbindListeners() {
1730
- this.transport.unbind("message", this.onMessage);
1731
- this.transport.unbind("closed", this.onClosed);
1732
- }
1733
- finish(action, params) {
1734
- this.callback(extend({ transport: this.transport, action }, params));
1735
- }
1736
- }
1737
- class timeline_sender_TimelineSender {
1738
- constructor(timeline, options) {
1739
- this.timeline = timeline;
1740
- this.options = options || {};
1741
- }
1742
- send(useTLS, callback) {
1743
- if (this.timeline.isEmpty()) {
1744
- return;
1745
- }
1746
- this.timeline.send(runtime.TimelineTransport.getAgent(this, useTLS), callback);
1747
- }
1748
- }
1749
- class channel_Channel extends dispatcher_Dispatcher {
1750
- constructor(name, pusher2) {
1751
- super(function(event, data) {
1752
- logger.debug("No callbacks on " + name + " for " + event);
1753
- });
1754
- this.name = name;
1755
- this.pusher = pusher2;
1756
- this.subscribed = false;
1757
- this.subscriptionPending = false;
1758
- this.subscriptionCancelled = false;
1759
- }
1760
- authorize(socketId, callback) {
1761
- return callback(null, { auth: "" });
1762
- }
1763
- trigger(event, data) {
1764
- if (event.indexOf("client-") !== 0) {
1765
- throw new BadEventName("Event '" + event + "' does not start with 'client-'");
1766
- }
1767
- if (!this.subscribed) {
1768
- var suffix = url_store.buildLogSuffix("triggeringClientEvents");
1769
- logger.warn(`Client event triggered before channel 'subscription_succeeded' event . ${suffix}`);
1770
- }
1771
- return this.pusher.send_event(event, data, this.name);
1772
- }
1773
- disconnect() {
1774
- this.subscribed = false;
1775
- this.subscriptionPending = false;
1776
- }
1777
- handleEvent(event) {
1778
- var eventName = event.event;
1779
- var data = event.data;
1780
- if (eventName === "pusher_internal:subscription_succeeded") {
1781
- this.handleSubscriptionSucceededEvent(event);
1782
- } else if (eventName === "pusher_internal:subscription_count") {
1783
- this.handleSubscriptionCountEvent(event);
1784
- } else if (eventName.indexOf("pusher_internal:") !== 0) {
1785
- var metadata = {};
1786
- this.emit(eventName, data, metadata);
1787
- }
1788
- }
1789
- handleSubscriptionSucceededEvent(event) {
1790
- this.subscriptionPending = false;
1791
- this.subscribed = true;
1792
- if (this.subscriptionCancelled) {
1793
- this.pusher.unsubscribe(this.name);
1794
- } else {
1795
- this.emit("pusher:subscription_succeeded", event.data);
1796
- }
1797
- }
1798
- handleSubscriptionCountEvent(event) {
1799
- if (event.data.subscription_count) {
1800
- this.subscriptionCount = event.data.subscription_count;
1801
- }
1802
- this.emit("pusher:subscription_count", event.data);
1803
- }
1804
- subscribe() {
1805
- if (this.subscribed) {
1806
- return;
1807
- }
1808
- this.subscriptionPending = true;
1809
- this.subscriptionCancelled = false;
1810
- this.authorize(this.pusher.connection.socket_id, (error, data) => {
1811
- if (error) {
1812
- this.subscriptionPending = false;
1813
- logger.error(error.toString());
1814
- this.emit("pusher:subscription_error", Object.assign({}, {
1815
- type: "AuthError",
1816
- error: error.message
1817
- }, error instanceof HTTPAuthError ? { status: error.status } : {}));
1818
- } else {
1819
- this.pusher.send_event("pusher:subscribe", {
1820
- auth: data.auth,
1821
- channel_data: data.channel_data,
1822
- channel: this.name
1823
- });
1824
- }
1825
- });
1826
- }
1827
- unsubscribe() {
1828
- this.subscribed = false;
1829
- this.pusher.send_event("pusher:unsubscribe", {
1830
- channel: this.name
1831
- });
1832
- }
1833
- cancelSubscription() {
1834
- this.subscriptionCancelled = true;
1835
- }
1836
- reinstateSubscription() {
1837
- this.subscriptionCancelled = false;
1838
- }
1839
- }
1840
- class private_channel_PrivateChannel extends channel_Channel {
1841
- authorize(socketId, callback) {
1842
- return this.pusher.config.channelAuthorizer({
1843
- channelName: this.name,
1844
- socketId
1845
- }, callback);
1846
- }
1847
- }
1848
- class members_Members {
1849
- constructor() {
1850
- this.reset();
1851
- }
1852
- get(id) {
1853
- if (Object.prototype.hasOwnProperty.call(this.members, id)) {
1854
- return {
1855
- id,
1856
- info: this.members[id]
1857
- };
1858
- } else {
1859
- return null;
1860
- }
1861
- }
1862
- each(callback) {
1863
- objectApply(this.members, (member, id) => {
1864
- callback(this.get(id));
1865
- });
1866
- }
1867
- setMyID(id) {
1868
- this.myID = id;
1869
- }
1870
- onSubscription(subscriptionData) {
1871
- this.members = subscriptionData.presence.hash;
1872
- this.count = subscriptionData.presence.count;
1873
- this.me = this.get(this.myID);
1874
- }
1875
- addMember(memberData) {
1876
- if (this.get(memberData.user_id) === null) {
1877
- this.count++;
1878
- }
1879
- this.members[memberData.user_id] = memberData.user_info;
1880
- return this.get(memberData.user_id);
1881
- }
1882
- removeMember(memberData) {
1883
- var member = this.get(memberData.user_id);
1884
- if (member) {
1885
- delete this.members[memberData.user_id];
1886
- this.count--;
1887
- }
1888
- return member;
1889
- }
1890
- reset() {
1891
- this.members = {};
1892
- this.count = 0;
1893
- this.myID = null;
1894
- this.me = null;
1895
- }
1896
- }
1897
- var __awaiter = function(thisArg, _arguments, P, generator) {
1898
- function adopt(value) {
1899
- return value instanceof P ? value : new P(function(resolve) {
1900
- resolve(value);
1901
- });
1902
- }
1903
- return new (P || (P = Promise))(function(resolve, reject) {
1904
- function fulfilled(value) {
1905
- try {
1906
- step(generator.next(value));
1907
- } catch (e) {
1908
- reject(e);
1909
- }
1910
- }
1911
- function rejected(value) {
1912
- try {
1913
- step(generator["throw"](value));
1914
- } catch (e) {
1915
- reject(e);
1916
- }
1917
- }
1918
- function step(result) {
1919
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
1920
- }
1921
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1922
- });
1923
- };
1924
- class presence_channel_PresenceChannel extends private_channel_PrivateChannel {
1925
- constructor(name, pusher2) {
1926
- super(name, pusher2);
1927
- this.members = new members_Members();
1928
- }
1929
- authorize(socketId, callback) {
1930
- super.authorize(socketId, (error, authData) => __awaiter(this, void 0, void 0, function* () {
1931
- if (!error) {
1932
- authData = authData;
1933
- if (authData.channel_data != null) {
1934
- var channelData = JSON.parse(authData.channel_data);
1935
- this.members.setMyID(channelData.user_id);
1936
- } else {
1937
- yield this.pusher.user.signinDonePromise;
1938
- if (this.pusher.user.user_data != null) {
1939
- this.members.setMyID(this.pusher.user.user_data.id);
1940
- } else {
1941
- let suffix = url_store.buildLogSuffix("authorizationEndpoint");
1942
- logger.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${suffix}, or the user should be signed in.`);
1943
- callback("Invalid auth response");
1944
- return;
1945
- }
1946
- }
1947
- }
1948
- callback(error, authData);
1949
- }));
1950
- }
1951
- handleEvent(event) {
1952
- var eventName = event.event;
1953
- if (eventName.indexOf("pusher_internal:") === 0) {
1954
- this.handleInternalEvent(event);
1955
- } else {
1956
- var data = event.data;
1957
- var metadata = {};
1958
- if (event.user_id) {
1959
- metadata.user_id = event.user_id;
1960
- }
1961
- this.emit(eventName, data, metadata);
1962
- }
1963
- }
1964
- handleInternalEvent(event) {
1965
- var eventName = event.event;
1966
- var data = event.data;
1967
- switch (eventName) {
1968
- case "pusher_internal:subscription_succeeded":
1969
- this.handleSubscriptionSucceededEvent(event);
1970
- break;
1971
- case "pusher_internal:subscription_count":
1972
- this.handleSubscriptionCountEvent(event);
1973
- break;
1974
- case "pusher_internal:member_added":
1975
- var addedMember = this.members.addMember(data);
1976
- this.emit("pusher:member_added", addedMember);
1977
- break;
1978
- case "pusher_internal:member_removed":
1979
- var removedMember = this.members.removeMember(data);
1980
- if (removedMember) {
1981
- this.emit("pusher:member_removed", removedMember);
1982
- }
1983
- break;
1984
- }
1985
- }
1986
- handleSubscriptionSucceededEvent(event) {
1987
- this.subscriptionPending = false;
1988
- this.subscribed = true;
1989
- if (this.subscriptionCancelled) {
1990
- this.pusher.unsubscribe(this.name);
1991
- } else {
1992
- this.members.onSubscription(event.data);
1993
- this.emit("pusher:subscription_succeeded", this.members);
1994
- }
1995
- }
1996
- disconnect() {
1997
- this.members.reset();
1998
- super.disconnect();
1999
- }
2000
- }
2001
- var utf8 = __webpack_require__(1);
2002
- var base64 = __webpack_require__(0);
2003
- class encrypted_channel_EncryptedChannel extends private_channel_PrivateChannel {
2004
- constructor(name, pusher2, nacl) {
2005
- super(name, pusher2);
2006
- this.key = null;
2007
- this.nacl = nacl;
2008
- }
2009
- authorize(socketId, callback) {
2010
- super.authorize(socketId, (error, authData) => {
2011
- if (error) {
2012
- callback(error, authData);
2013
- return;
2014
- }
2015
- let sharedSecret = authData["shared_secret"];
2016
- if (!sharedSecret) {
2017
- callback(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`), null);
2018
- return;
2019
- }
2020
- this.key = Object(base64["decode"])(sharedSecret);
2021
- delete authData["shared_secret"];
2022
- callback(null, authData);
2023
- });
2024
- }
2025
- trigger(event, data) {
2026
- throw new UnsupportedFeature("Client events are not currently supported for encrypted channels");
2027
- }
2028
- handleEvent(event) {
2029
- var eventName = event.event;
2030
- var data = event.data;
2031
- if (eventName.indexOf("pusher_internal:") === 0 || eventName.indexOf("pusher:") === 0) {
2032
- super.handleEvent(event);
2033
- return;
2034
- }
2035
- this.handleEncryptedEvent(eventName, data);
2036
- }
2037
- handleEncryptedEvent(event, data) {
2038
- if (!this.key) {
2039
- logger.debug("Received encrypted event before key has been retrieved from the authEndpoint");
2040
- return;
2041
- }
2042
- if (!data.ciphertext || !data.nonce) {
2043
- logger.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: " + data);
2044
- return;
2045
- }
2046
- let cipherText = Object(base64["decode"])(data.ciphertext);
2047
- if (cipherText.length < this.nacl.secretbox.overheadLength) {
2048
- logger.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${cipherText.length}`);
2049
- return;
2050
- }
2051
- let nonce = Object(base64["decode"])(data.nonce);
2052
- if (nonce.length < this.nacl.secretbox.nonceLength) {
2053
- logger.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${nonce.length}`);
2054
- return;
2055
- }
2056
- let bytes = this.nacl.secretbox.open(cipherText, nonce, this.key);
2057
- if (bytes === null) {
2058
- logger.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint...");
2059
- this.authorize(this.pusher.connection.socket_id, (error, authData) => {
2060
- if (error) {
2061
- logger.error(`Failed to make a request to the authEndpoint: ${authData}. Unable to fetch new key, so dropping encrypted event`);
2062
- return;
2063
- }
2064
- bytes = this.nacl.secretbox.open(cipherText, nonce, this.key);
2065
- if (bytes === null) {
2066
- logger.error(`Failed to decrypt event with new key. Dropping encrypted event`);
2067
- return;
2068
- }
2069
- this.emit(event, this.getDataToEmit(bytes));
2070
- return;
2071
- });
2072
- return;
2073
- }
2074
- this.emit(event, this.getDataToEmit(bytes));
2075
- }
2076
- getDataToEmit(bytes) {
2077
- let raw = Object(utf8["decode"])(bytes);
2078
- try {
2079
- return JSON.parse(raw);
2080
- } catch (_a) {
2081
- return raw;
2082
- }
2083
- }
2084
- }
2085
- class connection_manager_ConnectionManager extends dispatcher_Dispatcher {
2086
- constructor(key, options) {
2087
- super();
2088
- this.state = "initialized";
2089
- this.connection = null;
2090
- this.key = key;
2091
- this.options = options;
2092
- this.timeline = this.options.timeline;
2093
- this.usingTLS = this.options.useTLS;
2094
- this.errorCallbacks = this.buildErrorCallbacks();
2095
- this.connectionCallbacks = this.buildConnectionCallbacks(this.errorCallbacks);
2096
- this.handshakeCallbacks = this.buildHandshakeCallbacks(this.errorCallbacks);
2097
- var Network = runtime.getNetwork();
2098
- Network.bind("online", () => {
2099
- this.timeline.info({ netinfo: "online" });
2100
- if (this.state === "connecting" || this.state === "unavailable") {
2101
- this.retryIn(0);
2102
- }
2103
- });
2104
- Network.bind("offline", () => {
2105
- this.timeline.info({ netinfo: "offline" });
2106
- if (this.connection) {
2107
- this.sendActivityCheck();
2108
- }
2109
- });
2110
- this.updateStrategy();
2111
- }
2112
- switchCluster(key) {
2113
- this.key = key;
2114
- this.updateStrategy();
2115
- this.retryIn(0);
2116
- }
2117
- connect() {
2118
- if (this.connection || this.runner) {
2119
- return;
2120
- }
2121
- if (!this.strategy.isSupported()) {
2122
- this.updateState("failed");
2123
- return;
2124
- }
2125
- this.updateState("connecting");
2126
- this.startConnecting();
2127
- this.setUnavailableTimer();
2128
- }
2129
- send(data) {
2130
- if (this.connection) {
2131
- return this.connection.send(data);
2132
- } else {
2133
- return false;
2134
- }
2135
- }
2136
- send_event(name, data, channel) {
2137
- if (this.connection) {
2138
- return this.connection.send_event(name, data, channel);
2139
- } else {
2140
- return false;
2141
- }
2142
- }
2143
- disconnect() {
2144
- this.disconnectInternally();
2145
- this.updateState("disconnected");
2146
- }
2147
- isUsingTLS() {
2148
- return this.usingTLS;
2149
- }
2150
- startConnecting() {
2151
- var callback = (error, handshake) => {
2152
- if (error) {
2153
- this.runner = this.strategy.connect(0, callback);
2154
- } else {
2155
- if (handshake.action === "error") {
2156
- this.emit("error", {
2157
- type: "HandshakeError",
2158
- error: handshake.error
2159
- });
2160
- this.timeline.error({ handshakeError: handshake.error });
2161
- } else {
2162
- this.abortConnecting();
2163
- this.handshakeCallbacks[handshake.action](handshake);
2164
- }
2165
- }
2166
- };
2167
- this.runner = this.strategy.connect(0, callback);
2168
- }
2169
- abortConnecting() {
2170
- if (this.runner) {
2171
- this.runner.abort();
2172
- this.runner = null;
2173
- }
2174
- }
2175
- disconnectInternally() {
2176
- this.abortConnecting();
2177
- this.clearRetryTimer();
2178
- this.clearUnavailableTimer();
2179
- if (this.connection) {
2180
- var connection = this.abandonConnection();
2181
- connection.close();
2182
- }
2183
- }
2184
- updateStrategy() {
2185
- this.strategy = this.options.getStrategy({
2186
- key: this.key,
2187
- timeline: this.timeline,
2188
- useTLS: this.usingTLS
2189
- });
2190
- }
2191
- retryIn(delay) {
2192
- this.timeline.info({ action: "retry", delay });
2193
- if (delay > 0) {
2194
- this.emit("connecting_in", Math.round(delay / 1e3));
2195
- }
2196
- this.retryTimer = new timers_OneOffTimer(delay || 0, () => {
2197
- this.disconnectInternally();
2198
- this.connect();
2199
- });
2200
- }
2201
- clearRetryTimer() {
2202
- if (this.retryTimer) {
2203
- this.retryTimer.ensureAborted();
2204
- this.retryTimer = null;
2205
- }
2206
- }
2207
- setUnavailableTimer() {
2208
- this.unavailableTimer = new timers_OneOffTimer(this.options.unavailableTimeout, () => {
2209
- this.updateState("unavailable");
2210
- });
2211
- }
2212
- clearUnavailableTimer() {
2213
- if (this.unavailableTimer) {
2214
- this.unavailableTimer.ensureAborted();
2215
- }
2216
- }
2217
- sendActivityCheck() {
2218
- this.stopActivityCheck();
2219
- this.connection.ping();
2220
- this.activityTimer = new timers_OneOffTimer(this.options.pongTimeout, () => {
2221
- this.timeline.error({ pong_timed_out: this.options.pongTimeout });
2222
- this.retryIn(0);
2223
- });
2224
- }
2225
- resetActivityCheck() {
2226
- this.stopActivityCheck();
2227
- if (this.connection && !this.connection.handlesActivityChecks()) {
2228
- this.activityTimer = new timers_OneOffTimer(this.activityTimeout, () => {
2229
- this.sendActivityCheck();
2230
- });
2231
- }
2232
- }
2233
- stopActivityCheck() {
2234
- if (this.activityTimer) {
2235
- this.activityTimer.ensureAborted();
2236
- }
2237
- }
2238
- buildConnectionCallbacks(errorCallbacks) {
2239
- return extend({}, errorCallbacks, {
2240
- message: (message) => {
2241
- this.resetActivityCheck();
2242
- this.emit("message", message);
2243
- },
2244
- ping: () => {
2245
- this.send_event("pusher:pong", {});
2246
- },
2247
- activity: () => {
2248
- this.resetActivityCheck();
2249
- },
2250
- error: (error) => {
2251
- this.emit("error", error);
2252
- },
2253
- closed: () => {
2254
- this.abandonConnection();
2255
- if (this.shouldRetry()) {
2256
- this.retryIn(1e3);
2257
- }
2258
- }
2259
- });
2260
- }
2261
- buildHandshakeCallbacks(errorCallbacks) {
2262
- return extend({}, errorCallbacks, {
2263
- connected: (handshake) => {
2264
- this.activityTimeout = Math.min(this.options.activityTimeout, handshake.activityTimeout, handshake.connection.activityTimeout || Infinity);
2265
- this.clearUnavailableTimer();
2266
- this.setConnection(handshake.connection);
2267
- this.socket_id = this.connection.id;
2268
- this.updateState("connected", { socket_id: this.socket_id });
2269
- }
2270
- });
2271
- }
2272
- buildErrorCallbacks() {
2273
- let withErrorEmitted = (callback) => {
2274
- return (result) => {
2275
- if (result.error) {
2276
- this.emit("error", { type: "WebSocketError", error: result.error });
2277
- }
2278
- callback(result);
2279
- };
2280
- };
2281
- return {
2282
- tls_only: withErrorEmitted(() => {
2283
- this.usingTLS = true;
2284
- this.updateStrategy();
2285
- this.retryIn(0);
2286
- }),
2287
- refused: withErrorEmitted(() => {
2288
- this.disconnect();
2289
- }),
2290
- backoff: withErrorEmitted(() => {
2291
- this.retryIn(1e3);
2292
- }),
2293
- retry: withErrorEmitted(() => {
2294
- this.retryIn(0);
2295
- })
2296
- };
2297
- }
2298
- setConnection(connection) {
2299
- this.connection = connection;
2300
- for (var event in this.connectionCallbacks) {
2301
- this.connection.bind(event, this.connectionCallbacks[event]);
2302
- }
2303
- this.resetActivityCheck();
2304
- }
2305
- abandonConnection() {
2306
- if (!this.connection) {
2307
- return;
2308
- }
2309
- this.stopActivityCheck();
2310
- for (var event in this.connectionCallbacks) {
2311
- this.connection.unbind(event, this.connectionCallbacks[event]);
2312
- }
2313
- var connection = this.connection;
2314
- this.connection = null;
2315
- return connection;
2316
- }
2317
- updateState(newState, data) {
2318
- var previousState = this.state;
2319
- this.state = newState;
2320
- if (previousState !== newState) {
2321
- var newStateDescription = newState;
2322
- if (newStateDescription === "connected") {
2323
- newStateDescription += " with new socket ID " + data.socket_id;
2324
- }
2325
- logger.debug("State changed", previousState + " -> " + newStateDescription);
2326
- this.timeline.info({ state: newState, params: data });
2327
- this.emit("state_change", { previous: previousState, current: newState });
2328
- this.emit(newState, data);
2329
- }
2330
- }
2331
- shouldRetry() {
2332
- return this.state === "connecting" || this.state === "connected";
2333
- }
2334
- }
2335
- class channels_Channels {
2336
- constructor() {
2337
- this.channels = {};
2338
- }
2339
- add(name, pusher2) {
2340
- if (!this.channels[name]) {
2341
- this.channels[name] = createChannel(name, pusher2);
2342
- }
2343
- return this.channels[name];
2344
- }
2345
- all() {
2346
- return values(this.channels);
2347
- }
2348
- find(name) {
2349
- return this.channels[name];
2350
- }
2351
- remove(name) {
2352
- var channel = this.channels[name];
2353
- delete this.channels[name];
2354
- return channel;
2355
- }
2356
- disconnect() {
2357
- objectApply(this.channels, function(channel) {
2358
- channel.disconnect();
2359
- });
2360
- }
2361
- }
2362
- function createChannel(name, pusher2) {
2363
- if (name.indexOf("private-encrypted-") === 0) {
2364
- if (pusher2.config.nacl) {
2365
- return factory.createEncryptedChannel(name, pusher2, pusher2.config.nacl);
2366
- }
2367
- let errMsg = "Tried to subscribe to a private-encrypted- channel but no nacl implementation available";
2368
- let suffix = url_store.buildLogSuffix("encryptedChannelSupport");
2369
- throw new UnsupportedFeature(`${errMsg}. ${suffix}`);
2370
- } else if (name.indexOf("private-") === 0) {
2371
- return factory.createPrivateChannel(name, pusher2);
2372
- } else if (name.indexOf("presence-") === 0) {
2373
- return factory.createPresenceChannel(name, pusher2);
2374
- } else if (name.indexOf("#") === 0) {
2375
- throw new BadChannelName('Cannot create a channel with name "' + name + '".');
2376
- } else {
2377
- return factory.createChannel(name, pusher2);
2378
- }
2379
- }
2380
- var Factory = {
2381
- createChannels() {
2382
- return new channels_Channels();
2383
- },
2384
- createConnectionManager(key, options) {
2385
- return new connection_manager_ConnectionManager(key, options);
2386
- },
2387
- createChannel(name, pusher2) {
2388
- return new channel_Channel(name, pusher2);
2389
- },
2390
- createPrivateChannel(name, pusher2) {
2391
- return new private_channel_PrivateChannel(name, pusher2);
2392
- },
2393
- createPresenceChannel(name, pusher2) {
2394
- return new presence_channel_PresenceChannel(name, pusher2);
2395
- },
2396
- createEncryptedChannel(name, pusher2, nacl) {
2397
- return new encrypted_channel_EncryptedChannel(name, pusher2, nacl);
2398
- },
2399
- createTimelineSender(timeline, options) {
2400
- return new timeline_sender_TimelineSender(timeline, options);
2401
- },
2402
- createHandshake(transport, callback) {
2403
- return new handshake_Handshake(transport, callback);
2404
- },
2405
- createAssistantToTheTransportManager(manager, transport, options) {
2406
- return new assistant_to_the_transport_manager_AssistantToTheTransportManager(manager, transport, options);
2407
- }
2408
- };
2409
- var factory = Factory;
2410
- class transport_manager_TransportManager {
2411
- constructor(options) {
2412
- this.options = options || {};
2413
- this.livesLeft = this.options.lives || Infinity;
2414
- }
2415
- getAssistant(transport) {
2416
- return factory.createAssistantToTheTransportManager(this, transport, {
2417
- minPingDelay: this.options.minPingDelay,
2418
- maxPingDelay: this.options.maxPingDelay
2419
- });
2420
- }
2421
- isAlive() {
2422
- return this.livesLeft > 0;
2423
- }
2424
- reportDeath() {
2425
- this.livesLeft -= 1;
2426
- }
2427
- }
2428
- class sequential_strategy_SequentialStrategy {
2429
- constructor(strategies, options) {
2430
- this.strategies = strategies;
2431
- this.loop = Boolean(options.loop);
2432
- this.failFast = Boolean(options.failFast);
2433
- this.timeout = options.timeout;
2434
- this.timeoutLimit = options.timeoutLimit;
2435
- }
2436
- isSupported() {
2437
- return any(this.strategies, util.method("isSupported"));
2438
- }
2439
- connect(minPriority, callback) {
2440
- var strategies = this.strategies;
2441
- var current = 0;
2442
- var timeout = this.timeout;
2443
- var runner = null;
2444
- var tryNextStrategy = (error, handshake) => {
2445
- if (handshake) {
2446
- callback(null, handshake);
2447
- } else {
2448
- current = current + 1;
2449
- if (this.loop) {
2450
- current = current % strategies.length;
2451
- }
2452
- if (current < strategies.length) {
2453
- if (timeout) {
2454
- timeout = timeout * 2;
2455
- if (this.timeoutLimit) {
2456
- timeout = Math.min(timeout, this.timeoutLimit);
2457
- }
2458
- }
2459
- runner = this.tryStrategy(strategies[current], minPriority, { timeout, failFast: this.failFast }, tryNextStrategy);
2460
- } else {
2461
- callback(true);
2462
- }
2463
- }
2464
- };
2465
- runner = this.tryStrategy(strategies[current], minPriority, { timeout, failFast: this.failFast }, tryNextStrategy);
2466
- return {
2467
- abort: function() {
2468
- runner.abort();
2469
- },
2470
- forceMinPriority: function(p) {
2471
- minPriority = p;
2472
- if (runner) {
2473
- runner.forceMinPriority(p);
2474
- }
2475
- }
2476
- };
2477
- }
2478
- tryStrategy(strategy, minPriority, options, callback) {
2479
- var timer = null;
2480
- var runner = null;
2481
- if (options.timeout > 0) {
2482
- timer = new timers_OneOffTimer(options.timeout, function() {
2483
- runner.abort();
2484
- callback(true);
2485
- });
2486
- }
2487
- runner = strategy.connect(minPriority, function(error, handshake) {
2488
- if (error && timer && timer.isRunning() && !options.failFast) {
2489
- return;
2490
- }
2491
- if (timer) {
2492
- timer.ensureAborted();
2493
- }
2494
- callback(error, handshake);
2495
- });
2496
- return {
2497
- abort: function() {
2498
- if (timer) {
2499
- timer.ensureAborted();
2500
- }
2501
- runner.abort();
2502
- },
2503
- forceMinPriority: function(p) {
2504
- runner.forceMinPriority(p);
2505
- }
2506
- };
2507
- }
2508
- }
2509
- class best_connected_ever_strategy_BestConnectedEverStrategy {
2510
- constructor(strategies) {
2511
- this.strategies = strategies;
2512
- }
2513
- isSupported() {
2514
- return any(this.strategies, util.method("isSupported"));
2515
- }
2516
- connect(minPriority, callback) {
2517
- return connect(this.strategies, minPriority, function(i, runners) {
2518
- return function(error, handshake) {
2519
- runners[i].error = error;
2520
- if (error) {
2521
- if (allRunnersFailed(runners)) {
2522
- callback(true);
2523
- }
2524
- return;
2525
- }
2526
- apply(runners, function(runner) {
2527
- runner.forceMinPriority(handshake.transport.priority);
2528
- });
2529
- callback(null, handshake);
2530
- };
2531
- });
2532
- }
2533
- }
2534
- function connect(strategies, minPriority, callbackBuilder) {
2535
- var runners = map(strategies, function(strategy, i, _, rs) {
2536
- return strategy.connect(minPriority, callbackBuilder(i, rs));
2537
- });
2538
- return {
2539
- abort: function() {
2540
- apply(runners, abortRunner);
2541
- },
2542
- forceMinPriority: function(p) {
2543
- apply(runners, function(runner) {
2544
- runner.forceMinPriority(p);
2545
- });
2546
- }
2547
- };
2548
- }
2549
- function allRunnersFailed(runners) {
2550
- return collections_all(runners, function(runner) {
2551
- return Boolean(runner.error);
2552
- });
2553
- }
2554
- function abortRunner(runner) {
2555
- if (!runner.error && !runner.aborted) {
2556
- runner.abort();
2557
- runner.aborted = true;
2558
- }
2559
- }
2560
- class websocket_prioritized_cached_strategy_WebSocketPrioritizedCachedStrategy {
2561
- constructor(strategy, transports2, options) {
2562
- this.strategy = strategy;
2563
- this.transports = transports2;
2564
- this.ttl = options.ttl || 1800 * 1e3;
2565
- this.usingTLS = options.useTLS;
2566
- this.timeline = options.timeline;
2567
- }
2568
- isSupported() {
2569
- return this.strategy.isSupported();
2570
- }
2571
- connect(minPriority, callback) {
2572
- var usingTLS = this.usingTLS;
2573
- var info = fetchTransportCache(usingTLS);
2574
- var cacheSkipCount = info && info.cacheSkipCount ? info.cacheSkipCount : 0;
2575
- var strategies = [this.strategy];
2576
- if (info && info.timestamp + this.ttl >= util.now()) {
2577
- var transport = this.transports[info.transport];
2578
- if (transport) {
2579
- if (["ws", "wss"].includes(info.transport) || cacheSkipCount > 3) {
2580
- this.timeline.info({
2581
- cached: true,
2582
- transport: info.transport,
2583
- latency: info.latency
2584
- });
2585
- strategies.push(new sequential_strategy_SequentialStrategy([transport], {
2586
- timeout: info.latency * 2 + 1e3,
2587
- failFast: true
2588
- }));
2589
- } else {
2590
- cacheSkipCount++;
2591
- }
2592
- }
2593
- }
2594
- var startTimestamp = util.now();
2595
- var runner = strategies.pop().connect(minPriority, function cb(error, handshake) {
2596
- if (error) {
2597
- flushTransportCache(usingTLS);
2598
- if (strategies.length > 0) {
2599
- startTimestamp = util.now();
2600
- runner = strategies.pop().connect(minPriority, cb);
2601
- } else {
2602
- callback(error);
2603
- }
2604
- } else {
2605
- storeTransportCache(usingTLS, handshake.transport.name, util.now() - startTimestamp, cacheSkipCount);
2606
- callback(null, handshake);
2607
- }
2608
- });
2609
- return {
2610
- abort: function() {
2611
- runner.abort();
2612
- },
2613
- forceMinPriority: function(p) {
2614
- minPriority = p;
2615
- if (runner) {
2616
- runner.forceMinPriority(p);
2617
- }
2618
- }
2619
- };
2620
- }
2621
- }
2622
- function getTransportCacheKey(usingTLS) {
2623
- return "pusherTransport" + (usingTLS ? "TLS" : "NonTLS");
2624
- }
2625
- function fetchTransportCache(usingTLS) {
2626
- var storage = runtime.getLocalStorage();
2627
- if (storage) {
2628
- try {
2629
- var serializedCache = storage[getTransportCacheKey(usingTLS)];
2630
- if (serializedCache) {
2631
- return JSON.parse(serializedCache);
2632
- }
2633
- } catch (e) {
2634
- flushTransportCache(usingTLS);
2635
- }
2636
- }
2637
- return null;
2638
- }
2639
- function storeTransportCache(usingTLS, transport, latency, cacheSkipCount) {
2640
- var storage = runtime.getLocalStorage();
2641
- if (storage) {
2642
- try {
2643
- storage[getTransportCacheKey(usingTLS)] = safeJSONStringify({
2644
- timestamp: util.now(),
2645
- transport,
2646
- latency,
2647
- cacheSkipCount
2648
- });
2649
- } catch (e) {
2650
- }
2651
- }
2652
- }
2653
- function flushTransportCache(usingTLS) {
2654
- var storage = runtime.getLocalStorage();
2655
- if (storage) {
2656
- try {
2657
- delete storage[getTransportCacheKey(usingTLS)];
2658
- } catch (e) {
2659
- }
2660
- }
2661
- }
2662
- class delayed_strategy_DelayedStrategy {
2663
- constructor(strategy, { delay: number }) {
2664
- this.strategy = strategy;
2665
- this.options = { delay: number };
2666
- }
2667
- isSupported() {
2668
- return this.strategy.isSupported();
2669
- }
2670
- connect(minPriority, callback) {
2671
- var strategy = this.strategy;
2672
- var runner;
2673
- var timer = new timers_OneOffTimer(this.options.delay, function() {
2674
- runner = strategy.connect(minPriority, callback);
2675
- });
2676
- return {
2677
- abort: function() {
2678
- timer.ensureAborted();
2679
- if (runner) {
2680
- runner.abort();
2681
- }
2682
- },
2683
- forceMinPriority: function(p) {
2684
- minPriority = p;
2685
- if (runner) {
2686
- runner.forceMinPriority(p);
2687
- }
2688
- }
2689
- };
2690
- }
2691
- }
2692
- class IfStrategy {
2693
- constructor(test, trueBranch, falseBranch) {
2694
- this.test = test;
2695
- this.trueBranch = trueBranch;
2696
- this.falseBranch = falseBranch;
2697
- }
2698
- isSupported() {
2699
- var branch = this.test() ? this.trueBranch : this.falseBranch;
2700
- return branch.isSupported();
2701
- }
2702
- connect(minPriority, callback) {
2703
- var branch = this.test() ? this.trueBranch : this.falseBranch;
2704
- return branch.connect(minPriority, callback);
2705
- }
2706
- }
2707
- class FirstConnectedStrategy {
2708
- constructor(strategy) {
2709
- this.strategy = strategy;
2710
- }
2711
- isSupported() {
2712
- return this.strategy.isSupported();
2713
- }
2714
- connect(minPriority, callback) {
2715
- var runner = this.strategy.connect(minPriority, function(error, handshake) {
2716
- if (handshake) {
2717
- runner.abort();
2718
- }
2719
- callback(error, handshake);
2720
- });
2721
- return runner;
2722
- }
2723
- }
2724
- function testSupportsStrategy(strategy) {
2725
- return function() {
2726
- return strategy.isSupported();
2727
- };
2728
- }
2729
- var getDefaultStrategy = function(config, baseOptions, defineTransport) {
2730
- var definedTransports = {};
2731
- function defineTransportStrategy(name, type, priority, options, manager) {
2732
- var transport = defineTransport(config, name, type, priority, options, manager);
2733
- definedTransports[name] = transport;
2734
- return transport;
2735
- }
2736
- var ws_options = Object.assign({}, baseOptions, {
2737
- hostNonTLS: config.wsHost + ":" + config.wsPort,
2738
- hostTLS: config.wsHost + ":" + config.wssPort,
2739
- httpPath: config.wsPath
2740
- });
2741
- var wss_options = Object.assign({}, ws_options, {
2742
- useTLS: true
2743
- });
2744
- var sockjs_options = Object.assign({}, baseOptions, {
2745
- hostNonTLS: config.httpHost + ":" + config.httpPort,
2746
- hostTLS: config.httpHost + ":" + config.httpsPort,
2747
- httpPath: config.httpPath
2748
- });
2749
- var timeouts = {
2750
- loop: true,
2751
- timeout: 15e3,
2752
- timeoutLimit: 6e4
2753
- };
2754
- var ws_manager = new transport_manager_TransportManager({
2755
- minPingDelay: 1e4,
2756
- maxPingDelay: config.activityTimeout
2757
- });
2758
- var streaming_manager = new transport_manager_TransportManager({
2759
- lives: 2,
2760
- minPingDelay: 1e4,
2761
- maxPingDelay: config.activityTimeout
2762
- });
2763
- var ws_transport = defineTransportStrategy("ws", "ws", 3, ws_options, ws_manager);
2764
- var wss_transport = defineTransportStrategy("wss", "ws", 3, wss_options, ws_manager);
2765
- var sockjs_transport = defineTransportStrategy("sockjs", "sockjs", 1, sockjs_options);
2766
- var xhr_streaming_transport = defineTransportStrategy("xhr_streaming", "xhr_streaming", 1, sockjs_options, streaming_manager);
2767
- var xdr_streaming_transport = defineTransportStrategy("xdr_streaming", "xdr_streaming", 1, sockjs_options, streaming_manager);
2768
- var xhr_polling_transport = defineTransportStrategy("xhr_polling", "xhr_polling", 1, sockjs_options);
2769
- var xdr_polling_transport = defineTransportStrategy("xdr_polling", "xdr_polling", 1, sockjs_options);
2770
- var ws_loop = new sequential_strategy_SequentialStrategy([ws_transport], timeouts);
2771
- var wss_loop = new sequential_strategy_SequentialStrategy([wss_transport], timeouts);
2772
- var sockjs_loop = new sequential_strategy_SequentialStrategy([sockjs_transport], timeouts);
2773
- var streaming_loop = new sequential_strategy_SequentialStrategy([
2774
- new IfStrategy(testSupportsStrategy(xhr_streaming_transport), xhr_streaming_transport, xdr_streaming_transport)
2775
- ], timeouts);
2776
- var polling_loop = new sequential_strategy_SequentialStrategy([
2777
- new IfStrategy(testSupportsStrategy(xhr_polling_transport), xhr_polling_transport, xdr_polling_transport)
2778
- ], timeouts);
2779
- var http_loop = new sequential_strategy_SequentialStrategy([
2780
- new IfStrategy(testSupportsStrategy(streaming_loop), new best_connected_ever_strategy_BestConnectedEverStrategy([
2781
- streaming_loop,
2782
- new delayed_strategy_DelayedStrategy(polling_loop, { delay: 4e3 })
2783
- ]), polling_loop)
2784
- ], timeouts);
2785
- var http_fallback_loop = new IfStrategy(testSupportsStrategy(http_loop), http_loop, sockjs_loop);
2786
- var wsStrategy;
2787
- if (baseOptions.useTLS) {
2788
- wsStrategy = new best_connected_ever_strategy_BestConnectedEverStrategy([
2789
- ws_loop,
2790
- new delayed_strategy_DelayedStrategy(http_fallback_loop, { delay: 2e3 })
2791
- ]);
2792
- } else {
2793
- wsStrategy = new best_connected_ever_strategy_BestConnectedEverStrategy([
2794
- ws_loop,
2795
- new delayed_strategy_DelayedStrategy(wss_loop, { delay: 2e3 }),
2796
- new delayed_strategy_DelayedStrategy(http_fallback_loop, { delay: 5e3 })
2797
- ]);
2798
- }
2799
- return new websocket_prioritized_cached_strategy_WebSocketPrioritizedCachedStrategy(new FirstConnectedStrategy(new IfStrategy(testSupportsStrategy(ws_transport), wsStrategy, http_fallback_loop)), definedTransports, {
2800
- ttl: 18e5,
2801
- timeline: baseOptions.timeline,
2802
- useTLS: baseOptions.useTLS
2803
- });
2804
- };
2805
- var default_strategy = getDefaultStrategy;
2806
- var transport_connection_initializer = function() {
2807
- var self = this;
2808
- self.timeline.info(self.buildTimelineMessage({
2809
- transport: self.name + (self.options.useTLS ? "s" : "")
2810
- }));
2811
- if (self.hooks.isInitialized()) {
2812
- self.changeState("initialized");
2813
- } else if (self.hooks.file) {
2814
- self.changeState("initializing");
2815
- Dependencies.load(self.hooks.file, { useTLS: self.options.useTLS }, function(error, callback) {
2816
- if (self.hooks.isInitialized()) {
2817
- self.changeState("initialized");
2818
- callback(true);
2819
- } else {
2820
- if (error) {
2821
- self.onError(error);
2822
- }
2823
- self.onClose();
2824
- callback(false);
2825
- }
2826
- });
2827
- } else {
2828
- self.onClose();
2829
- }
2830
- };
2831
- var http_xdomain_request_hooks = {
2832
- getRequest: function(socket) {
2833
- var xdr = new window.XDomainRequest();
2834
- xdr.ontimeout = function() {
2835
- socket.emit("error", new RequestTimedOut());
2836
- socket.close();
2837
- };
2838
- xdr.onerror = function(e) {
2839
- socket.emit("error", e);
2840
- socket.close();
2841
- };
2842
- xdr.onprogress = function() {
2843
- if (xdr.responseText && xdr.responseText.length > 0) {
2844
- socket.onChunk(200, xdr.responseText);
2845
- }
2846
- };
2847
- xdr.onload = function() {
2848
- if (xdr.responseText && xdr.responseText.length > 0) {
2849
- socket.onChunk(200, xdr.responseText);
2850
- }
2851
- socket.emit("finished", 200);
2852
- socket.close();
2853
- };
2854
- return xdr;
2855
- },
2856
- abortRequest: function(xdr) {
2857
- xdr.ontimeout = xdr.onerror = xdr.onprogress = xdr.onload = null;
2858
- xdr.abort();
2859
- }
2860
- };
2861
- var http_xdomain_request = http_xdomain_request_hooks;
2862
- const MAX_BUFFER_LENGTH = 256 * 1024;
2863
- class http_request_HTTPRequest extends dispatcher_Dispatcher {
2864
- constructor(hooks, method, url) {
2865
- super();
2866
- this.hooks = hooks;
2867
- this.method = method;
2868
- this.url = url;
2869
- }
2870
- start(payload) {
2871
- this.position = 0;
2872
- this.xhr = this.hooks.getRequest(this);
2873
- this.unloader = () => {
2874
- this.close();
2875
- };
2876
- runtime.addUnloadListener(this.unloader);
2877
- this.xhr.open(this.method, this.url, true);
2878
- if (this.xhr.setRequestHeader) {
2879
- this.xhr.setRequestHeader("Content-Type", "application/json");
2880
- }
2881
- this.xhr.send(payload);
2882
- }
2883
- close() {
2884
- if (this.unloader) {
2885
- runtime.removeUnloadListener(this.unloader);
2886
- this.unloader = null;
2887
- }
2888
- if (this.xhr) {
2889
- this.hooks.abortRequest(this.xhr);
2890
- this.xhr = null;
2891
- }
2892
- }
2893
- onChunk(status, data) {
2894
- while (true) {
2895
- var chunk = this.advanceBuffer(data);
2896
- if (chunk) {
2897
- this.emit("chunk", { status, data: chunk });
2898
- } else {
2899
- break;
2900
- }
2901
- }
2902
- if (this.isBufferTooLong(data)) {
2903
- this.emit("buffer_too_long");
2904
- }
2905
- }
2906
- advanceBuffer(buffer) {
2907
- var unreadData = buffer.slice(this.position);
2908
- var endOfLinePosition = unreadData.indexOf("\n");
2909
- if (endOfLinePosition !== -1) {
2910
- this.position += endOfLinePosition + 1;
2911
- return unreadData.slice(0, endOfLinePosition);
2912
- } else {
2913
- return null;
2914
- }
2915
- }
2916
- isBufferTooLong(buffer) {
2917
- return this.position === buffer.length && buffer.length > MAX_BUFFER_LENGTH;
2918
- }
2919
- }
2920
- var State;
2921
- (function(State2) {
2922
- State2[State2["CONNECTING"] = 0] = "CONNECTING";
2923
- State2[State2["OPEN"] = 1] = "OPEN";
2924
- State2[State2["CLOSED"] = 3] = "CLOSED";
2925
- })(State || (State = {}));
2926
- var state = State;
2927
- var autoIncrement = 1;
2928
- class http_socket_HTTPSocket {
2929
- constructor(hooks, url) {
2930
- this.hooks = hooks;
2931
- this.session = randomNumber(1e3) + "/" + randomString(8);
2932
- this.location = getLocation(url);
2933
- this.readyState = state.CONNECTING;
2934
- this.openStream();
2935
- }
2936
- send(payload) {
2937
- return this.sendRaw(JSON.stringify([payload]));
2938
- }
2939
- ping() {
2940
- this.hooks.sendHeartbeat(this);
2941
- }
2942
- close(code, reason) {
2943
- this.onClose(code, reason, true);
2944
- }
2945
- sendRaw(payload) {
2946
- if (this.readyState === state.OPEN) {
2947
- try {
2948
- runtime.createSocketRequest("POST", getUniqueURL(getSendURL(this.location, this.session))).start(payload);
2949
- return true;
2950
- } catch (e) {
2951
- return false;
2952
- }
2953
- } else {
2954
- return false;
2955
- }
2956
- }
2957
- reconnect() {
2958
- this.closeStream();
2959
- this.openStream();
2960
- }
2961
- onClose(code, reason, wasClean) {
2962
- this.closeStream();
2963
- this.readyState = state.CLOSED;
2964
- if (this.onclose) {
2965
- this.onclose({
2966
- code,
2967
- reason,
2968
- wasClean
2969
- });
2970
- }
2971
- }
2972
- onChunk(chunk) {
2973
- if (chunk.status !== 200) {
2974
- return;
2975
- }
2976
- if (this.readyState === state.OPEN) {
2977
- this.onActivity();
2978
- }
2979
- var payload;
2980
- var type = chunk.data.slice(0, 1);
2981
- switch (type) {
2982
- case "o":
2983
- payload = JSON.parse(chunk.data.slice(1) || "{}");
2984
- this.onOpen(payload);
2985
- break;
2986
- case "a":
2987
- payload = JSON.parse(chunk.data.slice(1) || "[]");
2988
- for (var i = 0; i < payload.length; i++) {
2989
- this.onEvent(payload[i]);
2990
- }
2991
- break;
2992
- case "m":
2993
- payload = JSON.parse(chunk.data.slice(1) || "null");
2994
- this.onEvent(payload);
2995
- break;
2996
- case "h":
2997
- this.hooks.onHeartbeat(this);
2998
- break;
2999
- case "c":
3000
- payload = JSON.parse(chunk.data.slice(1) || "[]");
3001
- this.onClose(payload[0], payload[1], true);
3002
- break;
3003
- }
3004
- }
3005
- onOpen(options) {
3006
- if (this.readyState === state.CONNECTING) {
3007
- if (options && options.hostname) {
3008
- this.location.base = replaceHost(this.location.base, options.hostname);
3009
- }
3010
- this.readyState = state.OPEN;
3011
- if (this.onopen) {
3012
- this.onopen();
3013
- }
3014
- } else {
3015
- this.onClose(1006, "Server lost session", true);
3016
- }
3017
- }
3018
- onEvent(event) {
3019
- if (this.readyState === state.OPEN && this.onmessage) {
3020
- this.onmessage({ data: event });
3021
- }
3022
- }
3023
- onActivity() {
3024
- if (this.onactivity) {
3025
- this.onactivity();
3026
- }
3027
- }
3028
- onError(error) {
3029
- if (this.onerror) {
3030
- this.onerror(error);
3031
- }
3032
- }
3033
- openStream() {
3034
- this.stream = runtime.createSocketRequest("POST", getUniqueURL(this.hooks.getReceiveURL(this.location, this.session)));
3035
- this.stream.bind("chunk", (chunk) => {
3036
- this.onChunk(chunk);
3037
- });
3038
- this.stream.bind("finished", (status) => {
3039
- this.hooks.onFinished(this, status);
3040
- });
3041
- this.stream.bind("buffer_too_long", () => {
3042
- this.reconnect();
3043
- });
3044
- try {
3045
- this.stream.start();
3046
- } catch (error) {
3047
- util.defer(() => {
3048
- this.onError(error);
3049
- this.onClose(1006, "Could not start streaming", false);
3050
- });
3051
- }
3052
- }
3053
- closeStream() {
3054
- if (this.stream) {
3055
- this.stream.unbind_all();
3056
- this.stream.close();
3057
- this.stream = null;
3058
- }
3059
- }
3060
- }
3061
- function getLocation(url) {
3062
- var parts = /([^\?]*)\/*(\??.*)/.exec(url);
3063
- return {
3064
- base: parts[1],
3065
- queryString: parts[2]
3066
- };
3067
- }
3068
- function getSendURL(url, session) {
3069
- return url.base + "/" + session + "/xhr_send";
3070
- }
3071
- function getUniqueURL(url) {
3072
- var separator = url.indexOf("?") === -1 ? "?" : "&";
3073
- return url + separator + "t=" + +/* @__PURE__ */ new Date() + "&n=" + autoIncrement++;
3074
- }
3075
- function replaceHost(url, hostname) {
3076
- var urlParts = /(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(url);
3077
- return urlParts[1] + hostname + urlParts[3];
3078
- }
3079
- function randomNumber(max) {
3080
- return runtime.randomInt(max);
3081
- }
3082
- function randomString(length) {
3083
- var result = [];
3084
- for (var i = 0; i < length; i++) {
3085
- result.push(randomNumber(32).toString(32));
3086
- }
3087
- return result.join("");
3088
- }
3089
- var http_socket = http_socket_HTTPSocket;
3090
- var http_streaming_socket_hooks = {
3091
- getReceiveURL: function(url, session) {
3092
- return url.base + "/" + session + "/xhr_streaming" + url.queryString;
3093
- },
3094
- onHeartbeat: function(socket) {
3095
- socket.sendRaw("[]");
3096
- },
3097
- sendHeartbeat: function(socket) {
3098
- socket.sendRaw("[]");
3099
- },
3100
- onFinished: function(socket, status) {
3101
- socket.onClose(1006, "Connection interrupted (" + status + ")", false);
3102
- }
3103
- };
3104
- var http_streaming_socket = http_streaming_socket_hooks;
3105
- var http_polling_socket_hooks = {
3106
- getReceiveURL: function(url, session) {
3107
- return url.base + "/" + session + "/xhr" + url.queryString;
3108
- },
3109
- onHeartbeat: function() {
3110
- },
3111
- sendHeartbeat: function(socket) {
3112
- socket.sendRaw("[]");
3113
- },
3114
- onFinished: function(socket, status) {
3115
- if (status === 200) {
3116
- socket.reconnect();
3117
- } else {
3118
- socket.onClose(1006, "Connection interrupted (" + status + ")", false);
3119
- }
3120
- }
3121
- };
3122
- var http_polling_socket = http_polling_socket_hooks;
3123
- var http_xhr_request_hooks = {
3124
- getRequest: function(socket) {
3125
- var Constructor = runtime.getXHRAPI();
3126
- var xhr = new Constructor();
3127
- xhr.onreadystatechange = xhr.onprogress = function() {
3128
- switch (xhr.readyState) {
3129
- case 3:
3130
- if (xhr.responseText && xhr.responseText.length > 0) {
3131
- socket.onChunk(xhr.status, xhr.responseText);
3132
- }
3133
- break;
3134
- case 4:
3135
- if (xhr.responseText && xhr.responseText.length > 0) {
3136
- socket.onChunk(xhr.status, xhr.responseText);
3137
- }
3138
- socket.emit("finished", xhr.status);
3139
- socket.close();
3140
- break;
3141
- }
3142
- };
3143
- return xhr;
3144
- },
3145
- abortRequest: function(xhr) {
3146
- xhr.onreadystatechange = null;
3147
- xhr.abort();
3148
- }
3149
- };
3150
- var http_xhr_request = http_xhr_request_hooks;
3151
- var HTTP = {
3152
- createStreamingSocket(url) {
3153
- return this.createSocket(http_streaming_socket, url);
3154
- },
3155
- createPollingSocket(url) {
3156
- return this.createSocket(http_polling_socket, url);
3157
- },
3158
- createSocket(hooks, url) {
3159
- return new http_socket(hooks, url);
3160
- },
3161
- createXHR(method, url) {
3162
- return this.createRequest(http_xhr_request, method, url);
3163
- },
3164
- createRequest(hooks, method, url) {
3165
- return new http_request_HTTPRequest(hooks, method, url);
3166
- }
3167
- };
3168
- var http_http = HTTP;
3169
- http_http.createXDR = function(method, url) {
3170
- return this.createRequest(http_xdomain_request, method, url);
3171
- };
3172
- var web_http_http = http_http;
3173
- var Runtime = {
3174
- nextAuthCallbackID: 1,
3175
- auth_callbacks: {},
3176
- ScriptReceivers,
3177
- DependenciesReceivers,
3178
- getDefaultStrategy: default_strategy,
3179
- Transports: transports_transports,
3180
- transportConnectionInitializer: transport_connection_initializer,
3181
- HTTPFactory: web_http_http,
3182
- TimelineTransport: jsonp_timeline,
3183
- getXHRAPI() {
3184
- return window.XMLHttpRequest;
3185
- },
3186
- getWebSocketAPI() {
3187
- return window.WebSocket || window.MozWebSocket;
3188
- },
3189
- setup(PusherClass) {
3190
- window.Pusher = PusherClass;
3191
- var initializeOnDocumentBody = () => {
3192
- this.onDocumentBody(PusherClass.ready);
3193
- };
3194
- if (!window.JSON) {
3195
- Dependencies.load("json2", {}, initializeOnDocumentBody);
3196
- } else {
3197
- initializeOnDocumentBody();
3198
- }
3199
- },
3200
- getDocument() {
3201
- return document;
3202
- },
3203
- getProtocol() {
3204
- return this.getDocument().location.protocol;
3205
- },
3206
- getAuthorizers() {
3207
- return { ajax: xhr_auth, jsonp: jsonp_auth };
3208
- },
3209
- onDocumentBody(callback) {
3210
- if (document.body) {
3211
- callback();
3212
- } else {
3213
- setTimeout(() => {
3214
- this.onDocumentBody(callback);
3215
- }, 0);
3216
- }
3217
- },
3218
- createJSONPRequest(url, data) {
3219
- return new jsonp_request_JSONPRequest(url, data);
3220
- },
3221
- createScriptRequest(src) {
3222
- return new ScriptRequest(src);
3223
- },
3224
- getLocalStorage() {
3225
- try {
3226
- return window.localStorage;
3227
- } catch (e) {
3228
- return void 0;
3229
- }
3230
- },
3231
- createXHR() {
3232
- if (this.getXHRAPI()) {
3233
- return this.createXMLHttpRequest();
3234
- } else {
3235
- return this.createMicrosoftXHR();
3236
- }
3237
- },
3238
- createXMLHttpRequest() {
3239
- var Constructor = this.getXHRAPI();
3240
- return new Constructor();
3241
- },
3242
- createMicrosoftXHR() {
3243
- return new ActiveXObject("Microsoft.XMLHTTP");
3244
- },
3245
- getNetwork() {
3246
- return net_info_Network;
3247
- },
3248
- createWebSocket(url) {
3249
- var Constructor = this.getWebSocketAPI();
3250
- return new Constructor(url);
3251
- },
3252
- createSocketRequest(method, url) {
3253
- if (this.isXHRSupported()) {
3254
- return this.HTTPFactory.createXHR(method, url);
3255
- } else if (this.isXDRSupported(url.indexOf("https:") === 0)) {
3256
- return this.HTTPFactory.createXDR(method, url);
3257
- } else {
3258
- throw "Cross-origin HTTP requests are not supported";
3259
- }
3260
- },
3261
- isXHRSupported() {
3262
- var Constructor = this.getXHRAPI();
3263
- return Boolean(Constructor) && new Constructor().withCredentials !== void 0;
3264
- },
3265
- isXDRSupported(useTLS) {
3266
- var protocol = useTLS ? "https:" : "http:";
3267
- var documentProtocol = this.getProtocol();
3268
- return Boolean(window["XDomainRequest"]) && documentProtocol === protocol;
3269
- },
3270
- addUnloadListener(listener) {
3271
- if (window.addEventListener !== void 0) {
3272
- window.addEventListener("unload", listener, false);
3273
- } else if (window.attachEvent !== void 0) {
3274
- window.attachEvent("onunload", listener);
3275
- }
3276
- },
3277
- removeUnloadListener(listener) {
3278
- if (window.addEventListener !== void 0) {
3279
- window.removeEventListener("unload", listener, false);
3280
- } else if (window.detachEvent !== void 0) {
3281
- window.detachEvent("onunload", listener);
3282
- }
3283
- },
3284
- randomInt(max) {
3285
- const random = function() {
3286
- const crypto = window.crypto || window["msCrypto"];
3287
- const random2 = crypto.getRandomValues(new Uint32Array(1))[0];
3288
- return random2 / Math.pow(2, 32);
3289
- };
3290
- return Math.floor(random() * max);
3291
- }
3292
- };
3293
- var runtime = Runtime;
3294
- var TimelineLevel;
3295
- (function(TimelineLevel2) {
3296
- TimelineLevel2[TimelineLevel2["ERROR"] = 3] = "ERROR";
3297
- TimelineLevel2[TimelineLevel2["INFO"] = 6] = "INFO";
3298
- TimelineLevel2[TimelineLevel2["DEBUG"] = 7] = "DEBUG";
3299
- })(TimelineLevel || (TimelineLevel = {}));
3300
- var timeline_level = TimelineLevel;
3301
- class timeline_Timeline {
3302
- constructor(key, session, options) {
3303
- this.key = key;
3304
- this.session = session;
3305
- this.events = [];
3306
- this.options = options || {};
3307
- this.sent = 0;
3308
- this.uniqueID = 0;
3309
- }
3310
- log(level, event) {
3311
- if (level <= this.options.level) {
3312
- this.events.push(extend({}, event, { timestamp: util.now() }));
3313
- if (this.options.limit && this.events.length > this.options.limit) {
3314
- this.events.shift();
3315
- }
3316
- }
3317
- }
3318
- error(event) {
3319
- this.log(timeline_level.ERROR, event);
3320
- }
3321
- info(event) {
3322
- this.log(timeline_level.INFO, event);
3323
- }
3324
- debug(event) {
3325
- this.log(timeline_level.DEBUG, event);
3326
- }
3327
- isEmpty() {
3328
- return this.events.length === 0;
3329
- }
3330
- send(sendfn, callback) {
3331
- var data = extend({
3332
- session: this.session,
3333
- bundle: this.sent + 1,
3334
- key: this.key,
3335
- lib: "js",
3336
- version: this.options.version,
3337
- cluster: this.options.cluster,
3338
- features: this.options.features,
3339
- timeline: this.events
3340
- }, this.options.params);
3341
- this.events = [];
3342
- sendfn(data, (error, result) => {
3343
- if (!error) {
3344
- this.sent++;
3345
- }
3346
- if (callback) {
3347
- callback(error, result);
3348
- }
3349
- });
3350
- return true;
3351
- }
3352
- generateUniqueID() {
3353
- this.uniqueID++;
3354
- return this.uniqueID;
3355
- }
3356
- }
3357
- class transport_strategy_TransportStrategy {
3358
- constructor(name, priority, transport, options) {
3359
- this.name = name;
3360
- this.priority = priority;
3361
- this.transport = transport;
3362
- this.options = options || {};
3363
- }
3364
- isSupported() {
3365
- return this.transport.isSupported({
3366
- useTLS: this.options.useTLS
3367
- });
3368
- }
3369
- connect(minPriority, callback) {
3370
- if (!this.isSupported()) {
3371
- return failAttempt(new UnsupportedStrategy(), callback);
3372
- } else if (this.priority < minPriority) {
3373
- return failAttempt(new TransportPriorityTooLow(), callback);
3374
- }
3375
- var connected = false;
3376
- var transport = this.transport.createConnection(this.name, this.priority, this.options.key, this.options);
3377
- var handshake = null;
3378
- var onInitialized = function() {
3379
- transport.unbind("initialized", onInitialized);
3380
- transport.connect();
3381
- };
3382
- var onOpen = function() {
3383
- handshake = factory.createHandshake(transport, function(result) {
3384
- connected = true;
3385
- unbindListeners();
3386
- callback(null, result);
3387
- });
3388
- };
3389
- var onError = function(error) {
3390
- unbindListeners();
3391
- callback(error);
3392
- };
3393
- var onClosed = function() {
3394
- unbindListeners();
3395
- var serializedTransport;
3396
- serializedTransport = safeJSONStringify(transport);
3397
- callback(new TransportClosed(serializedTransport));
3398
- };
3399
- var unbindListeners = function() {
3400
- transport.unbind("initialized", onInitialized);
3401
- transport.unbind("open", onOpen);
3402
- transport.unbind("error", onError);
3403
- transport.unbind("closed", onClosed);
3404
- };
3405
- transport.bind("initialized", onInitialized);
3406
- transport.bind("open", onOpen);
3407
- transport.bind("error", onError);
3408
- transport.bind("closed", onClosed);
3409
- transport.initialize();
3410
- return {
3411
- abort: () => {
3412
- if (connected) {
3413
- return;
3414
- }
3415
- unbindListeners();
3416
- if (handshake) {
3417
- handshake.close();
3418
- } else {
3419
- transport.close();
3420
- }
3421
- },
3422
- forceMinPriority: (p) => {
3423
- if (connected) {
3424
- return;
3425
- }
3426
- if (this.priority < p) {
3427
- if (handshake) {
3428
- handshake.close();
3429
- } else {
3430
- transport.close();
3431
- }
3432
- }
3433
- }
3434
- };
3435
- }
3436
- }
3437
- function failAttempt(error, callback) {
3438
- util.defer(function() {
3439
- callback(error);
3440
- });
3441
- return {
3442
- abort: function() {
3443
- },
3444
- forceMinPriority: function() {
3445
- }
3446
- };
3447
- }
3448
- const { Transports: strategy_builder_Transports } = runtime;
3449
- var strategy_builder_defineTransport = function(config, name, type, priority, options, manager) {
3450
- var transportClass = strategy_builder_Transports[type];
3451
- if (!transportClass) {
3452
- throw new UnsupportedTransport(type);
3453
- }
3454
- var enabled = (!config.enabledTransports || arrayIndexOf(config.enabledTransports, name) !== -1) && (!config.disabledTransports || arrayIndexOf(config.disabledTransports, name) === -1);
3455
- var transport;
3456
- if (enabled) {
3457
- options = Object.assign({ ignoreNullOrigin: config.ignoreNullOrigin }, options);
3458
- transport = new transport_strategy_TransportStrategy(name, priority, manager ? manager.getAssistant(transportClass) : transportClass, options);
3459
- } else {
3460
- transport = strategy_builder_UnsupportedStrategy;
3461
- }
3462
- return transport;
3463
- };
3464
- var strategy_builder_UnsupportedStrategy = {
3465
- isSupported: function() {
3466
- return false;
3467
- },
3468
- connect: function(_, callback) {
3469
- var deferred = util.defer(function() {
3470
- callback(new UnsupportedStrategy());
3471
- });
3472
- return {
3473
- abort: function() {
3474
- deferred.ensureAborted();
3475
- },
3476
- forceMinPriority: function() {
3477
- }
3478
- };
3479
- }
3480
- };
3481
- function validateOptions(options) {
3482
- if (options == null) {
3483
- throw "You must pass an options object";
3484
- }
3485
- if (options.cluster == null) {
3486
- throw "Options object must provide a cluster";
3487
- }
3488
- if ("disableStats" in options) {
3489
- logger.warn("The disableStats option is deprecated in favor of enableStats");
3490
- }
3491
- }
3492
- const composeChannelQuery = (params, authOptions) => {
3493
- var query = "socket_id=" + encodeURIComponent(params.socketId);
3494
- for (var key in authOptions.params) {
3495
- query += "&" + encodeURIComponent(key) + "=" + encodeURIComponent(authOptions.params[key]);
3496
- }
3497
- if (authOptions.paramsProvider != null) {
3498
- let dynamicParams = authOptions.paramsProvider();
3499
- for (var key in dynamicParams) {
3500
- query += "&" + encodeURIComponent(key) + "=" + encodeURIComponent(dynamicParams[key]);
3501
- }
3502
- }
3503
- return query;
3504
- };
3505
- const UserAuthenticator = (authOptions) => {
3506
- if (typeof runtime.getAuthorizers()[authOptions.transport] === "undefined") {
3507
- throw `'${authOptions.transport}' is not a recognized auth transport`;
3508
- }
3509
- return (params, callback) => {
3510
- const query = composeChannelQuery(params, authOptions);
3511
- runtime.getAuthorizers()[authOptions.transport](runtime, query, authOptions, AuthRequestType.UserAuthentication, callback);
3512
- };
3513
- };
3514
- var user_authenticator = UserAuthenticator;
3515
- const channel_authorizer_composeChannelQuery = (params, authOptions) => {
3516
- var query = "socket_id=" + encodeURIComponent(params.socketId);
3517
- query += "&channel_name=" + encodeURIComponent(params.channelName);
3518
- for (var key in authOptions.params) {
3519
- query += "&" + encodeURIComponent(key) + "=" + encodeURIComponent(authOptions.params[key]);
3520
- }
3521
- if (authOptions.paramsProvider != null) {
3522
- let dynamicParams = authOptions.paramsProvider();
3523
- for (var key in dynamicParams) {
3524
- query += "&" + encodeURIComponent(key) + "=" + encodeURIComponent(dynamicParams[key]);
3525
- }
3526
- }
3527
- return query;
3528
- };
3529
- const ChannelAuthorizer = (authOptions) => {
3530
- if (typeof runtime.getAuthorizers()[authOptions.transport] === "undefined") {
3531
- throw `'${authOptions.transport}' is not a recognized auth transport`;
3532
- }
3533
- return (params, callback) => {
3534
- const query = channel_authorizer_composeChannelQuery(params, authOptions);
3535
- runtime.getAuthorizers()[authOptions.transport](runtime, query, authOptions, AuthRequestType.ChannelAuthorization, callback);
3536
- };
3537
- };
3538
- var channel_authorizer = ChannelAuthorizer;
3539
- const ChannelAuthorizerProxy = (pusher2, authOptions, channelAuthorizerGenerator) => {
3540
- const deprecatedAuthorizerOptions = {
3541
- authTransport: authOptions.transport,
3542
- authEndpoint: authOptions.endpoint,
3543
- auth: {
3544
- params: authOptions.params,
3545
- headers: authOptions.headers
3546
- }
3547
- };
3548
- return (params, callback) => {
3549
- const channel = pusher2.channel(params.channelName);
3550
- const channelAuthorizer = channelAuthorizerGenerator(channel, deprecatedAuthorizerOptions);
3551
- channelAuthorizer.authorize(params.socketId, callback);
3552
- };
3553
- };
3554
- function getConfig(opts, pusher2) {
3555
- let config = {
3556
- activityTimeout: opts.activityTimeout || defaults.activityTimeout,
3557
- cluster: opts.cluster,
3558
- httpPath: opts.httpPath || defaults.httpPath,
3559
- httpPort: opts.httpPort || defaults.httpPort,
3560
- httpsPort: opts.httpsPort || defaults.httpsPort,
3561
- pongTimeout: opts.pongTimeout || defaults.pongTimeout,
3562
- statsHost: opts.statsHost || defaults.stats_host,
3563
- unavailableTimeout: opts.unavailableTimeout || defaults.unavailableTimeout,
3564
- wsPath: opts.wsPath || defaults.wsPath,
3565
- wsPort: opts.wsPort || defaults.wsPort,
3566
- wssPort: opts.wssPort || defaults.wssPort,
3567
- enableStats: getEnableStatsConfig(opts),
3568
- httpHost: getHttpHost(opts),
3569
- useTLS: shouldUseTLS(opts),
3570
- wsHost: getWebsocketHost(opts),
3571
- userAuthenticator: buildUserAuthenticator(opts),
3572
- channelAuthorizer: buildChannelAuthorizer(opts, pusher2)
3573
- };
3574
- if ("disabledTransports" in opts)
3575
- config.disabledTransports = opts.disabledTransports;
3576
- if ("enabledTransports" in opts)
3577
- config.enabledTransports = opts.enabledTransports;
3578
- if ("ignoreNullOrigin" in opts)
3579
- config.ignoreNullOrigin = opts.ignoreNullOrigin;
3580
- if ("timelineParams" in opts)
3581
- config.timelineParams = opts.timelineParams;
3582
- if ("nacl" in opts) {
3583
- config.nacl = opts.nacl;
3584
- }
3585
- return config;
3586
- }
3587
- function getHttpHost(opts) {
3588
- if (opts.httpHost) {
3589
- return opts.httpHost;
3590
- }
3591
- if (opts.cluster) {
3592
- return `sockjs-${opts.cluster}.pusher.com`;
3593
- }
3594
- return defaults.httpHost;
3595
- }
3596
- function getWebsocketHost(opts) {
3597
- if (opts.wsHost) {
3598
- return opts.wsHost;
3599
- }
3600
- return getWebsocketHostFromCluster(opts.cluster);
3601
- }
3602
- function getWebsocketHostFromCluster(cluster) {
3603
- return `ws-${cluster}.pusher.com`;
3604
- }
3605
- function shouldUseTLS(opts) {
3606
- if (runtime.getProtocol() === "https:") {
3607
- return true;
3608
- } else if (opts.forceTLS === false) {
3609
- return false;
3610
- }
3611
- return true;
3612
- }
3613
- function getEnableStatsConfig(opts) {
3614
- if ("enableStats" in opts) {
3615
- return opts.enableStats;
3616
- }
3617
- if ("disableStats" in opts) {
3618
- return !opts.disableStats;
3619
- }
3620
- return false;
3621
- }
3622
- const hasCustomHandler = (auth) => {
3623
- return "customHandler" in auth && auth["customHandler"] != null;
3624
- };
3625
- function buildUserAuthenticator(opts) {
3626
- const userAuthentication = Object.assign(Object.assign({}, defaults.userAuthentication), opts.userAuthentication);
3627
- if (hasCustomHandler(userAuthentication)) {
3628
- return userAuthentication["customHandler"];
3629
- }
3630
- return user_authenticator(userAuthentication);
3631
- }
3632
- function buildChannelAuth(opts, pusher2) {
3633
- let channelAuthorization;
3634
- if ("channelAuthorization" in opts) {
3635
- channelAuthorization = Object.assign(Object.assign({}, defaults.channelAuthorization), opts.channelAuthorization);
3636
- } else {
3637
- channelAuthorization = {
3638
- transport: opts.authTransport || defaults.authTransport,
3639
- endpoint: opts.authEndpoint || defaults.authEndpoint
3640
- };
3641
- if ("auth" in opts) {
3642
- if ("params" in opts.auth)
3643
- channelAuthorization.params = opts.auth.params;
3644
- if ("headers" in opts.auth)
3645
- channelAuthorization.headers = opts.auth.headers;
3646
- }
3647
- if ("authorizer" in opts) {
3648
- return {
3649
- customHandler: ChannelAuthorizerProxy(pusher2, channelAuthorization, opts.authorizer)
3650
- };
3651
- }
3652
- }
3653
- return channelAuthorization;
3654
- }
3655
- function buildChannelAuthorizer(opts, pusher2) {
3656
- const channelAuthorization = buildChannelAuth(opts, pusher2);
3657
- if (hasCustomHandler(channelAuthorization)) {
3658
- return channelAuthorization["customHandler"];
3659
- }
3660
- return channel_authorizer(channelAuthorization);
3661
- }
3662
- class watchlist_WatchlistFacade extends dispatcher_Dispatcher {
3663
- constructor(pusher2) {
3664
- super(function(eventName, data) {
3665
- logger.debug(`No callbacks on watchlist events for ${eventName}`);
3666
- });
3667
- this.pusher = pusher2;
3668
- this.bindWatchlistInternalEvent();
3669
- }
3670
- handleEvent(pusherEvent) {
3671
- pusherEvent.data.events.forEach((watchlistEvent) => {
3672
- this.emit(watchlistEvent.name, watchlistEvent);
3673
- });
3674
- }
3675
- bindWatchlistInternalEvent() {
3676
- this.pusher.connection.bind("message", (pusherEvent) => {
3677
- var eventName = pusherEvent.event;
3678
- if (eventName === "pusher_internal:watchlist_events") {
3679
- this.handleEvent(pusherEvent);
3680
- }
3681
- });
3682
- }
3683
- }
3684
- function flatPromise() {
3685
- let resolve, reject;
3686
- const promise = new Promise((res, rej) => {
3687
- resolve = res;
3688
- reject = rej;
3689
- });
3690
- return { promise, resolve, reject };
3691
- }
3692
- var flat_promise = flatPromise;
3693
- class user_UserFacade extends dispatcher_Dispatcher {
3694
- constructor(pusher2) {
3695
- super(function(eventName, data) {
3696
- logger.debug("No callbacks on user for " + eventName);
3697
- });
3698
- this.signin_requested = false;
3699
- this.user_data = null;
3700
- this.serverToUserChannel = null;
3701
- this.signinDonePromise = null;
3702
- this._signinDoneResolve = null;
3703
- this._onAuthorize = (err, authData) => {
3704
- if (err) {
3705
- logger.warn(`Error during signin: ${err}`);
3706
- this._cleanup();
3707
- return;
3708
- }
3709
- this.pusher.send_event("pusher:signin", {
3710
- auth: authData.auth,
3711
- user_data: authData.user_data
3712
- });
3713
- };
3714
- this.pusher = pusher2;
3715
- this.pusher.connection.bind("state_change", ({ previous, current }) => {
3716
- if (previous !== "connected" && current === "connected") {
3717
- this._signin();
3718
- }
3719
- if (previous === "connected" && current !== "connected") {
3720
- this._cleanup();
3721
- this._newSigninPromiseIfNeeded();
3722
- }
3723
- });
3724
- this.watchlist = new watchlist_WatchlistFacade(pusher2);
3725
- this.pusher.connection.bind("message", (event) => {
3726
- var eventName = event.event;
3727
- if (eventName === "pusher:signin_success") {
3728
- this._onSigninSuccess(event.data);
3729
- }
3730
- if (this.serverToUserChannel && this.serverToUserChannel.name === event.channel) {
3731
- this.serverToUserChannel.handleEvent(event);
3732
- }
3733
- });
3734
- }
3735
- signin() {
3736
- if (this.signin_requested) {
3737
- return;
3738
- }
3739
- this.signin_requested = true;
3740
- this._signin();
3741
- }
3742
- _signin() {
3743
- if (!this.signin_requested) {
3744
- return;
3745
- }
3746
- this._newSigninPromiseIfNeeded();
3747
- if (this.pusher.connection.state !== "connected") {
3748
- return;
3749
- }
3750
- this.pusher.config.userAuthenticator({
3751
- socketId: this.pusher.connection.socket_id
3752
- }, this._onAuthorize);
3753
- }
3754
- _onSigninSuccess(data) {
3755
- try {
3756
- this.user_data = JSON.parse(data.user_data);
3757
- } catch (e) {
3758
- logger.error(`Failed parsing user data after signin: ${data.user_data}`);
3759
- this._cleanup();
3760
- return;
3761
- }
3762
- if (typeof this.user_data.id !== "string" || this.user_data.id === "") {
3763
- logger.error(`user_data doesn't contain an id. user_data: ${this.user_data}`);
3764
- this._cleanup();
3765
- return;
3766
- }
3767
- this._signinDoneResolve();
3768
- this._subscribeChannels();
3769
- }
3770
- _subscribeChannels() {
3771
- const ensure_subscribed = (channel) => {
3772
- if (channel.subscriptionPending && channel.subscriptionCancelled) {
3773
- channel.reinstateSubscription();
3774
- } else if (!channel.subscriptionPending && this.pusher.connection.state === "connected") {
3775
- channel.subscribe();
3776
- }
3777
- };
3778
- this.serverToUserChannel = new channel_Channel(`#server-to-user-${this.user_data.id}`, this.pusher);
3779
- this.serverToUserChannel.bind_global((eventName, data) => {
3780
- if (eventName.indexOf("pusher_internal:") === 0 || eventName.indexOf("pusher:") === 0) {
3781
- return;
3782
- }
3783
- this.emit(eventName, data);
3784
- });
3785
- ensure_subscribed(this.serverToUserChannel);
3786
- }
3787
- _cleanup() {
3788
- this.user_data = null;
3789
- if (this.serverToUserChannel) {
3790
- this.serverToUserChannel.unbind_all();
3791
- this.serverToUserChannel.disconnect();
3792
- this.serverToUserChannel = null;
3793
- }
3794
- if (this.signin_requested) {
3795
- this._signinDoneResolve();
3796
- }
3797
- }
3798
- _newSigninPromiseIfNeeded() {
3799
- if (!this.signin_requested) {
3800
- return;
3801
- }
3802
- if (this.signinDonePromise && !this.signinDonePromise.done) {
3803
- return;
3804
- }
3805
- const { promise, resolve } = flat_promise();
3806
- promise.done = false;
3807
- const setDone = () => {
3808
- promise.done = true;
3809
- };
3810
- promise.then(setDone).catch(setDone);
3811
- this.signinDonePromise = promise;
3812
- this._signinDoneResolve = resolve;
3813
- }
3814
- }
3815
- class pusher_Pusher {
3816
- static ready() {
3817
- pusher_Pusher.isReady = true;
3818
- for (var i = 0, l = pusher_Pusher.instances.length; i < l; i++) {
3819
- pusher_Pusher.instances[i].connect();
3820
- }
3821
- }
3822
- static getClientFeatures() {
3823
- return keys(filterObject({ ws: runtime.Transports.ws }, function(t) {
3824
- return t.isSupported({});
3825
- }));
3826
- }
3827
- constructor(app_key, options) {
3828
- checkAppKey(app_key);
3829
- validateOptions(options);
3830
- this.key = app_key;
3831
- this.options = options;
3832
- this.config = getConfig(this.options, this);
3833
- this.channels = factory.createChannels();
3834
- this.global_emitter = new dispatcher_Dispatcher();
3835
- this.sessionID = runtime.randomInt(1e9);
3836
- this.timeline = new timeline_Timeline(this.key, this.sessionID, {
3837
- cluster: this.config.cluster,
3838
- features: pusher_Pusher.getClientFeatures(),
3839
- params: this.config.timelineParams || {},
3840
- limit: 50,
3841
- level: timeline_level.INFO,
3842
- version: defaults.VERSION
3843
- });
3844
- if (this.config.enableStats) {
3845
- this.timelineSender = factory.createTimelineSender(this.timeline, {
3846
- host: this.config.statsHost,
3847
- path: "/timeline/v2/" + runtime.TimelineTransport.name
3848
- });
3849
- }
3850
- var getStrategy = (options2) => {
3851
- return runtime.getDefaultStrategy(this.config, options2, strategy_builder_defineTransport);
3852
- };
3853
- this.connection = factory.createConnectionManager(this.key, {
3854
- getStrategy,
3855
- timeline: this.timeline,
3856
- activityTimeout: this.config.activityTimeout,
3857
- pongTimeout: this.config.pongTimeout,
3858
- unavailableTimeout: this.config.unavailableTimeout,
3859
- useTLS: Boolean(this.config.useTLS)
3860
- });
3861
- this.connection.bind("connected", () => {
3862
- this.subscribeAll();
3863
- if (this.timelineSender) {
3864
- this.timelineSender.send(this.connection.isUsingTLS());
3865
- }
3866
- });
3867
- this.connection.bind("message", (event) => {
3868
- var eventName = event.event;
3869
- var internal = eventName.indexOf("pusher_internal:") === 0;
3870
- if (event.channel) {
3871
- var channel = this.channel(event.channel);
3872
- if (channel) {
3873
- channel.handleEvent(event);
3874
- }
3875
- }
3876
- if (!internal) {
3877
- this.global_emitter.emit(event.event, event.data);
3878
- }
3879
- });
3880
- this.connection.bind("connecting", () => {
3881
- this.channels.disconnect();
3882
- });
3883
- this.connection.bind("disconnected", () => {
3884
- this.channels.disconnect();
3885
- });
3886
- this.connection.bind("error", (err) => {
3887
- logger.warn(err);
3888
- });
3889
- pusher_Pusher.instances.push(this);
3890
- this.timeline.info({ instances: pusher_Pusher.instances.length });
3891
- this.user = new user_UserFacade(this);
3892
- if (pusher_Pusher.isReady) {
3893
- this.connect();
3894
- }
3895
- }
3896
- switchCluster(options) {
3897
- const { appKey, cluster } = options;
3898
- this.key = appKey;
3899
- this.options = Object.assign(Object.assign({}, this.options), { cluster });
3900
- this.config = getConfig(this.options, this);
3901
- this.connection.switchCluster(this.key);
3902
- }
3903
- channel(name) {
3904
- return this.channels.find(name);
3905
- }
3906
- allChannels() {
3907
- return this.channels.all();
3908
- }
3909
- connect() {
3910
- this.connection.connect();
3911
- if (this.timelineSender) {
3912
- if (!this.timelineSenderTimer) {
3913
- var usingTLS = this.connection.isUsingTLS();
3914
- var timelineSender = this.timelineSender;
3915
- this.timelineSenderTimer = new timers_PeriodicTimer(6e4, function() {
3916
- timelineSender.send(usingTLS);
3917
- });
3918
- }
3919
- }
3920
- }
3921
- disconnect() {
3922
- this.connection.disconnect();
3923
- if (this.timelineSenderTimer) {
3924
- this.timelineSenderTimer.ensureAborted();
3925
- this.timelineSenderTimer = null;
3926
- }
3927
- }
3928
- bind(event_name, callback, context) {
3929
- this.global_emitter.bind(event_name, callback, context);
3930
- return this;
3931
- }
3932
- unbind(event_name, callback, context) {
3933
- this.global_emitter.unbind(event_name, callback, context);
3934
- return this;
3935
- }
3936
- bind_global(callback) {
3937
- this.global_emitter.bind_global(callback);
3938
- return this;
3939
- }
3940
- unbind_global(callback) {
3941
- this.global_emitter.unbind_global(callback);
3942
- return this;
3943
- }
3944
- unbind_all(callback) {
3945
- this.global_emitter.unbind_all();
3946
- return this;
3947
- }
3948
- subscribeAll() {
3949
- var channelName;
3950
- for (channelName in this.channels.channels) {
3951
- if (this.channels.channels.hasOwnProperty(channelName)) {
3952
- this.subscribe(channelName);
3953
- }
3954
- }
3955
- }
3956
- subscribe(channel_name) {
3957
- var channel = this.channels.add(channel_name, this);
3958
- if (channel.subscriptionPending && channel.subscriptionCancelled) {
3959
- channel.reinstateSubscription();
3960
- } else if (!channel.subscriptionPending && this.connection.state === "connected") {
3961
- channel.subscribe();
3962
- }
3963
- return channel;
3964
- }
3965
- unsubscribe(channel_name) {
3966
- var channel = this.channels.find(channel_name);
3967
- if (channel && channel.subscriptionPending) {
3968
- channel.cancelSubscription();
3969
- } else {
3970
- channel = this.channels.remove(channel_name);
3971
- if (channel && channel.subscribed) {
3972
- channel.unsubscribe();
3973
- }
3974
- }
3975
- }
3976
- send_event(event_name, data, channel) {
3977
- return this.connection.send_event(event_name, data, channel);
3978
- }
3979
- shouldUseTLS() {
3980
- return this.config.useTLS;
3981
- }
3982
- signin() {
3983
- this.user.signin();
3984
- }
3985
- }
3986
- pusher_Pusher.instances = [];
3987
- pusher_Pusher.isReady = false;
3988
- pusher_Pusher.logToConsole = false;
3989
- pusher_Pusher.Runtime = runtime;
3990
- pusher_Pusher.ScriptReceivers = runtime.ScriptReceivers;
3991
- pusher_Pusher.DependenciesReceivers = runtime.DependenciesReceivers;
3992
- pusher_Pusher.auth_callbacks = runtime.auth_callbacks;
3993
- var core_pusher = __webpack_exports__["default"] = pusher_Pusher;
3994
- function checkAppKey(key) {
3995
- if (key === null || key === void 0) {
3996
- throw "You must pass your app key when you instantiate Pusher.";
3997
- }
3998
- }
3999
- runtime.setup(pusher_Pusher);
4000
- }
4001
- /******/
4002
- ])
4003
- );
4004
- });
4005
- })(pusher);
4006
- var pusherExports = pusher.exports;
4007
- const Pusher = /* @__PURE__ */ getDefaultExportFromCjs(pusherExports);
4008
- export {
4009
- Pusher as P
4010
- };