@tet/tet-components 1.4.136-production → 1.4.136-testing
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.
- package/dist/cjs/{http-codes-D0eSyfH-.js → http-codes-C-IXSZGG.js} +1 -1
- package/dist/cjs/{index-DaKfTj-9.js → index-Bo0hF6YQ.js} +1 -1
- package/dist/cjs/{index-CbS7RiVd.js → index-DKg1QTRW.js} +9 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{product-comparison-ed-KZo7G.js → product-comparison-f-u42TDe.js} +1 -1
- package/dist/cjs/{string-CL-wkThZ.js → string-D0kCSyUd.js} +4 -0
- package/dist/cjs/tet-accordion.cjs.entry.js +1 -1
- package/dist/cjs/tet-address-offers-filters-products_2.cjs.entry.js +4 -4
- package/dist/cjs/tet-address-offers-view.cjs.entry.js +4 -4
- package/dist/cjs/tet-address-offers_5.cjs.entry.js +6 -6
- package/dist/cjs/tet-assembler.cjs.entry.js +4 -4
- package/dist/cjs/tet-autocomplete-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/tet-autocomplete_2.cjs.entry.js +3 -3
- package/dist/cjs/tet-b2b-check-out-form_5.cjs.entry.js +4 -4
- package/dist/cjs/tet-b2b-configurator.cjs.entry.js +5 -5
- package/dist/cjs/tet-banner-nav.cjs.entry.js +4 -4
- package/dist/cjs/tet-bar-graph.cjs.entry.js +1 -1
- package/dist/cjs/tet-border-radius.cjs.entry.js +1 -1
- package/dist/cjs/tet-business-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-business-compare-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-business-round-stepper.cjs.entry.js +1 -1
- package/dist/cjs/tet-button.cjs.entry.js +1 -1
- package/dist/cjs/tet-card-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-carousel.cjs.entry.js +4 -4
- package/dist/cjs/tet-checkbox_3.cjs.entry.js +1 -1
- package/dist/cjs/tet-cloud-application-form-dialog.cjs.entry.js +4 -4
- package/dist/cjs/tet-cloud-configurator.cjs.entry.js +4 -4
- package/dist/cjs/tet-colors.cjs.entry.js +1 -1
- package/dist/cjs/tet-compare-card-v2.cjs.entry.js +3 -3
- package/dist/cjs/tet-compare-card-v3.cjs.entry.js +3 -3
- package/dist/cjs/tet-compare-cards-tab.cjs.entry.js +3 -3
- package/dist/cjs/tet-compare-cards_2.cjs.entry.js +3 -3
- package/dist/cjs/tet-components.cjs.js +2 -2
- package/dist/cjs/tet-container_2.cjs.entry.js +2 -2
- package/dist/cjs/tet-countdown.cjs.entry.js +1 -1
- package/dist/cjs/tet-counter.cjs.entry.js +1 -1
- package/dist/cjs/tet-datepicker-header_4.cjs.entry.js +387 -0
- package/dist/cjs/tet-datepicker.cjs.entry.js +132 -0
- package/dist/cjs/tet-dialog.cjs.entry.js +4 -4
- package/dist/cjs/tet-display.cjs.entry.js +1 -1
- package/dist/cjs/tet-divider.cjs.entry.js +1 -1
- package/dist/cjs/tet-dynamic-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-expandable-input.cjs.entry.js +1 -1
- package/dist/cjs/tet-expansion-panel.cjs.entry.js +1 -1
- package/dist/cjs/tet-feedback-form.cjs.entry.js +4 -4
- package/dist/cjs/tet-filter.cjs.entry.js +1 -1
- package/dist/cjs/tet-floating-block.cjs.entry.js +1 -1
- package/dist/cjs/tet-font-weight.cjs.entry.js +1 -1
- package/dist/cjs/tet-fonts.cjs.entry.js +1 -1
- package/dist/cjs/tet-grid.cjs.entry.js +1 -1
- package/dist/cjs/tet-icon.cjs.entry.js +2 -2
- package/dist/cjs/tet-inline-message.cjs.entry.js +1 -1
- package/dist/cjs/tet-input.cjs.entry.js +4 -4
- package/dist/cjs/tet-layout.cjs.entry.js +1 -1
- package/dist/cjs/tet-link-card-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-link.cjs.entry.js +1 -1
- package/dist/cjs/tet-menu-mobile.cjs.entry.js +1 -1
- package/dist/cjs/tet-menu.cjs.entry.js +1 -1
- package/dist/cjs/tet-mini-compare-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-multi-step-dialog.cjs.entry.js +4 -4
- package/dist/cjs/tet-navigation-mobile.cjs.entry.js +4 -4
- package/dist/cjs/tet-news-card-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-notification.cjs.entry.js +1 -1
- package/dist/cjs/tet-number-input.cjs.entry.js +1 -1
- package/dist/cjs/tet-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/tet-position.cjs.entry.js +1 -1
- package/dist/cjs/tet-price-view.cjs.entry.js +1 -1
- package/dist/cjs/tet-radio-blocks.cjs.entry.js +1 -1
- package/dist/cjs/tet-radio_2.cjs.entry.js +1 -1
- package/dist/cjs/tet-range-slider.cjs.entry.js +1 -1
- package/dist/cjs/tet-round-stepper.cjs.entry.js +1 -1
- package/dist/cjs/tet-snicker-card-group.cjs.entry.js +1 -1
- package/dist/cjs/tet-snicker-card.cjs.entry.js +4 -4
- package/dist/cjs/tet-spacing.cjs.entry.js +1 -1
- package/dist/cjs/tet-spinner.cjs.entry.js +1 -1
- package/dist/cjs/tet-stepper-input.cjs.entry.js +4 -4
- package/dist/cjs/tet-stepper-v3.cjs.entry.js +1 -1
- package/dist/cjs/tet-sticky-offer.cjs.entry.js +1 -1
- package/dist/cjs/tet-support-search.cjs.entry.js +2 -2
- package/dist/cjs/tet-switch.cjs.entry.js +1 -1
- package/dist/cjs/tet-table.cjs.entry.js +1 -1
- package/dist/cjs/tet-tag_2.cjs.entry.js +4 -4
- package/dist/cjs/tet-text-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-text.cjs.entry.js +1 -1
- package/dist/cjs/tet-textarea.cjs.entry.js +1 -1
- package/dist/cjs/tet-thank-you-view-v3.cjs.entry.js +4 -4
- package/dist/cjs/{translations-CpNdr9Fz.js → translations-f2lO6WcB.js} +2 -2
- package/dist/cjs/{typecheck-Do6mN8Vg.js → typecheck--Bs-bZ_K.js} +2 -0
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-header/tet-datepicker-header.css +393 -0
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-month-view/tet-datepicker-month-view.css +455 -0
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-multi-year-view/tet-datepicker-multi-year-view.css +382 -0
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-year-view/tet-datepicker-year-view.css +382 -0
- package/dist/collection/components/simple/inputs/tet-datepicker/tet-datepicker.css +380 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-1M2reaCU.js +1 -0
- package/dist/components/{p-SWy-pabH.js → p-4OtGLxTM.js} +1 -1
- package/dist/components/{p-EhJlX2Pe.js → p-8AKu6dF5.js} +1 -1
- package/dist/components/p-9ItXFJZ6.js +1 -0
- package/dist/components/{p-khIxWxRF.js → p-B8ElCfnM.js} +1 -1
- package/dist/components/{p-C3G9K-nY.js → p-BAes5ae6.js} +1 -1
- package/dist/components/{p-D-0UTSXy.js → p-BBMx2Nbt.js} +1 -1
- package/dist/components/{p-CO0OwKXE.js → p-BQKAA3oI.js} +1 -1
- package/dist/components/{p-DKBs405f.js → p-BWmFtcLN.js} +1 -1
- package/dist/components/{p-QPymGNaM.js → p-BZ0uDmYr.js} +1 -1
- package/dist/components/{p-HAvODPLk.js → p-BZ9cVPPC.js} +1 -1
- package/dist/components/{p-CdOMJGTE.js → p-B_RQCK28.js} +1 -1
- package/dist/components/p-BvVWV9bH.js +1 -0
- package/dist/components/p-C3ejCd37.js +1 -0
- package/dist/components/{p-BS9gy2FN.js → p-C8XFS2Ir.js} +1 -1
- package/dist/components/{p-DvRQIEWy.js → p-C8lJU0Vg.js} +1 -1
- package/dist/components/{p-DEANCXad.js → p-CAPNwyvb.js} +1 -1
- package/dist/components/{p-BMYOcmsg.js → p-CCcx5zR_.js} +1 -1
- package/dist/components/{p-B4cjmziN.js → p-CHl4ArFE.js} +1 -1
- package/dist/components/{p-Dzsvzn-Z.js → p-CMbAQKoe.js} +1 -1
- package/dist/components/{p-CR2etfJ0.js → p-CQOCAIVN.js} +1 -1
- package/dist/components/p-CQfy7CVi.js +1 -0
- package/dist/components/{p-BzI3TpPj.js → p-CcOXDepg.js} +1 -1
- package/dist/components/{p-B827AKjI.js → p-Cd8yxXoh.js} +1 -1
- package/dist/components/p-Cef0hbKH.js +1 -0
- package/dist/components/{p-k3J3cdat.js → p-CkP7jJd5.js} +1 -1
- package/dist/components/p-CoQ-OVcl.js +1 -0
- package/dist/components/{p-De7EZ26X.js → p-CpW0oiWt.js} +1 -1
- package/dist/components/{p-BuO08WPG.js → p-CvhD_5Lb.js} +1 -1
- package/dist/components/{p-Da9gWzvE.js → p-CwCkZCau.js} +1 -1
- package/dist/components/p-D0GJDW-O.js +1 -0
- package/dist/components/{p-BxQzO1pY.js → p-D2DL-fcM.js} +1 -1
- package/dist/components/{p-BxHAwDhA.js → p-D9UYdq38.js} +1 -1
- package/dist/components/{p-H_rLrdjd.js → p-DC6jZ79O.js} +1 -1
- package/dist/components/{p-B_LwYeuy.js → p-DHOPNeBR.js} +1 -1
- package/dist/components/{p-BXYUK59l.js → p-DJQWSjRR.js} +1 -1
- package/dist/components/{p-CxWSFzrp.js → p-DRJ0zjoF.js} +1 -1
- package/dist/components/{p-CHS-Pfmh.js → p-DRnGfpXX.js} +1 -1
- package/dist/components/{p-DTN0CTEN.js → p-DV10hBk2.js} +1 -1
- package/dist/{tet-components/p-DHhdzkdo.js → components/p-DePtMqzY.js} +1 -1
- package/dist/components/{p-O6OMP1bh.js → p-DhIzzW8J.js} +1 -1
- package/dist/components/{p-JBWk62lk.js → p-DlvjHh2y.js} +1 -1
- package/dist/components/{p-CoEDAHxT.js → p-DmiedvJM.js} +1 -1
- package/dist/components/{p-DrcVsjAJ.js → p-KBNSpMwX.js} +1 -1
- package/dist/components/{p-V-0b-p6j.js → p-LyBC96oM.js} +1 -1
- package/dist/components/{p-ChGq4Aeh.js → p-NwMag97r.js} +1 -1
- package/dist/components/{p-BBaczS91.js → p-Wztt2ajF.js} +1 -1
- package/dist/components/p-af-acWVA.js +1 -0
- package/dist/components/{p-DOUiaQyM.js → p-fnHAW6xv.js} +1 -1
- package/dist/components/{p-DFd7I6S0.js → p-lt2y08NU.js} +1 -1
- package/dist/components/p-nb3MHK7A.js +1 -0
- package/dist/components/{p-C8lVQMie.js → p-okYmW6rN.js} +1 -1
- package/dist/components/{p-DZBVGSvm.js → p-wE6xsIpj.js} +1 -1
- package/dist/components/{p-i2wF1G8t.js → p-zkmKLYHg.js} +1 -1
- package/dist/components/tet-accordion.js +1 -1
- package/dist/components/tet-address-offers-filters-products.js +1 -1
- package/dist/components/tet-address-offers-filters.js +1 -1
- package/dist/components/tet-address-offers-view.js +1 -1
- package/dist/components/tet-address-offers.js +1 -1
- package/dist/components/tet-address-search.js +1 -1
- package/dist/components/tet-assembler.js +1 -1
- package/dist/components/tet-asset-availability-addresses.js +1 -1
- package/dist/components/tet-autocomplete-dropdown.js +1 -1
- package/dist/components/tet-autocomplete.js +1 -1
- package/dist/components/tet-availability-contact-form.js +1 -1
- package/dist/components/tet-b2b-check-out-form.js +1 -1
- package/dist/components/tet-b2b-compare-card.js +1 -1
- package/dist/components/tet-b2b-configurator-cart.js +1 -1
- package/dist/components/tet-b2b-configurator.js +1 -1
- package/dist/components/tet-banner-nav.js +1 -1
- package/dist/components/tet-bar-graph.js +1 -1
- package/dist/components/tet-border-radius.js +1 -1
- package/dist/components/tet-business-card.js +1 -1
- package/dist/components/tet-business-compare-card.js +1 -1
- package/dist/components/tet-business-navigation.js +1 -1
- package/dist/components/tet-business-round-stepper.js +1 -1
- package/dist/components/tet-business-summary-card.js +1 -1
- package/dist/components/tet-button.js +1 -1
- package/dist/components/tet-card-list.js +1 -1
- package/dist/components/tet-carousel.js +1 -1
- package/dist/components/tet-checkbox.js +1 -1
- package/dist/components/tet-cloud-application-form-dialog.js +1 -1
- package/dist/components/tet-cloud-configurator.js +1 -1
- package/dist/components/tet-colors.js +1 -1
- package/dist/components/tet-compare-card-v2.js +1 -1
- package/dist/components/tet-compare-card-v3.js +1 -1
- package/dist/components/tet-compare-card.js +1 -1
- package/dist/components/tet-compare-cards-tab.js +1 -1
- package/dist/components/tet-compare-cards.js +1 -1
- package/dist/components/tet-container.js +1 -1
- package/dist/components/tet-countdown.js +1 -1
- package/dist/components/tet-counter.js +1 -1
- package/dist/components/tet-datepicker-header.d.ts +11 -0
- package/dist/components/tet-datepicker-header.js +1 -0
- package/dist/components/tet-datepicker-month-view.d.ts +11 -0
- package/dist/components/tet-datepicker-month-view.js +1 -0
- package/dist/components/tet-datepicker-multi-year-view.d.ts +11 -0
- package/dist/components/tet-datepicker-multi-year-view.js +1 -0
- package/dist/components/tet-datepicker-year-view.d.ts +11 -0
- package/dist/components/tet-datepicker-year-view.js +1 -0
- package/dist/components/tet-datepicker.d.ts +11 -0
- package/dist/components/tet-datepicker.js +1 -0
- package/dist/components/tet-dialog.js +1 -1
- package/dist/components/tet-display.js +1 -1
- package/dist/components/tet-divider.js +1 -1
- package/dist/components/tet-dropdown.js +1 -1
- package/dist/components/tet-dynamic-card.js +1 -1
- package/dist/components/tet-expandable-input.js +1 -1
- package/dist/components/tet-expansion-panel.js +1 -1
- package/dist/components/tet-feedback-form.js +1 -1
- package/dist/components/tet-filter.js +1 -1
- package/dist/components/tet-floating-block.js +1 -1
- package/dist/components/tet-font-weight.js +1 -1
- package/dist/components/tet-fonts.js +1 -1
- package/dist/components/tet-grid.js +1 -1
- package/dist/components/tet-icon.js +1 -1
- package/dist/components/tet-inline-message.js +1 -1
- package/dist/components/tet-input.js +1 -1
- package/dist/components/tet-layout.js +1 -1
- package/dist/components/tet-link-card-list.js +1 -1
- package/dist/components/tet-link.js +1 -1
- package/dist/components/tet-loader.js +1 -1
- package/dist/components/tet-menu-mobile.js +1 -1
- package/dist/components/tet-menu.js +1 -1
- package/dist/components/tet-mini-compare-card.js +1 -1
- package/dist/components/tet-multi-step-dialog.js +1 -1
- package/dist/components/tet-navigation-mobile.js +1 -1
- package/dist/components/tet-news-card-list.js +1 -1
- package/dist/components/tet-notification.js +1 -1
- package/dist/components/tet-number-input.js +1 -1
- package/dist/components/tet-placeholder.js +1 -1
- package/dist/components/tet-position.js +1 -1
- package/dist/components/tet-price-view.js +1 -1
- package/dist/components/tet-radio-blocks.js +1 -1
- package/dist/components/tet-radio.js +1 -1
- package/dist/components/tet-range-slider.js +1 -1
- package/dist/components/tet-round-stepper.js +1 -1
- package/dist/components/tet-selection-list.js +1 -1
- package/dist/components/tet-snicker-card-group.js +1 -1
- package/dist/components/tet-snicker-card.js +1 -1
- package/dist/components/tet-spacing.js +1 -1
- package/dist/components/tet-spinner.js +1 -1
- package/dist/components/tet-stepper-input.js +1 -1
- package/dist/components/tet-stepper-v3.js +1 -1
- package/dist/components/tet-sticky-offer.js +1 -1
- package/dist/components/tet-support-search.js +1 -1
- package/dist/components/tet-switch.js +1 -1
- package/dist/components/tet-tab-content.js +1 -1
- package/dist/components/tet-tab-header.js +1 -1
- package/dist/components/tet-table.js +1 -1
- package/dist/components/tet-tag-group.js +1 -1
- package/dist/components/tet-tag.js +1 -1
- package/dist/components/tet-text-list.js +1 -1
- package/dist/components/tet-text.js +1 -1
- package/dist/components/tet-textarea.js +1 -1
- package/dist/components/tet-thank-you-view-v3.js +1 -1
- package/dist/components/tet-tooltip.js +1 -1
- package/dist/esm/{http-codes-BIwnNday.js → http-codes-DchfPj1v.js} +1 -1
- package/dist/esm/{index-DRLfH-G3.js → index-ClX9TYQY.js} +9 -1
- package/dist/esm/{index-DFwTKM0O.js → index-DfBhGuuz.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{product-comparison-BLY2XeQZ.js → product-comparison-DJko3TwF.js} +1 -1
- package/dist/esm/{string-C9BlrGW8.js → string-D0GJDW-O.js} +4 -1
- package/dist/esm/tet-accordion.entry.js +1 -1
- package/dist/esm/tet-address-offers-filters-products_2.entry.js +4 -4
- package/dist/esm/tet-address-offers-view.entry.js +4 -4
- package/dist/esm/tet-address-offers_5.entry.js +6 -6
- package/dist/esm/tet-assembler.entry.js +4 -4
- package/dist/esm/tet-autocomplete-dropdown.entry.js +2 -2
- package/dist/esm/tet-autocomplete_2.entry.js +3 -3
- package/dist/esm/tet-b2b-check-out-form_5.entry.js +4 -4
- package/dist/esm/tet-b2b-configurator.entry.js +5 -5
- package/dist/esm/tet-banner-nav.entry.js +4 -4
- package/dist/esm/tet-bar-graph.entry.js +1 -1
- package/dist/esm/tet-border-radius.entry.js +1 -1
- package/dist/esm/tet-business-card.entry.js +1 -1
- package/dist/esm/tet-business-compare-card.entry.js +1 -1
- package/dist/esm/tet-business-round-stepper.entry.js +1 -1
- package/dist/esm/tet-button.entry.js +1 -1
- package/dist/esm/tet-card-list.entry.js +1 -1
- package/dist/esm/tet-carousel.entry.js +4 -4
- package/dist/esm/tet-checkbox_3.entry.js +1 -1
- package/dist/esm/tet-cloud-application-form-dialog.entry.js +4 -4
- package/dist/esm/tet-cloud-configurator.entry.js +4 -4
- package/dist/esm/tet-colors.entry.js +1 -1
- package/dist/esm/tet-compare-card-v2.entry.js +3 -3
- package/dist/esm/tet-compare-card-v3.entry.js +3 -3
- package/dist/esm/tet-compare-cards-tab.entry.js +3 -3
- package/dist/esm/tet-compare-cards_2.entry.js +3 -3
- package/dist/esm/tet-components.js +3 -3
- package/dist/esm/tet-container_2.entry.js +2 -2
- package/dist/esm/tet-countdown.entry.js +1 -1
- package/dist/esm/tet-counter.entry.js +1 -1
- package/dist/esm/tet-datepicker-header_4.entry.js +382 -0
- package/dist/esm/tet-datepicker.entry.js +130 -0
- package/dist/esm/tet-dialog.entry.js +4 -4
- package/dist/esm/tet-display.entry.js +1 -1
- package/dist/esm/tet-divider.entry.js +1 -1
- package/dist/esm/tet-dynamic-card.entry.js +1 -1
- package/dist/esm/tet-expandable-input.entry.js +1 -1
- package/dist/esm/tet-expansion-panel.entry.js +1 -1
- package/dist/esm/tet-feedback-form.entry.js +4 -4
- package/dist/esm/tet-filter.entry.js +1 -1
- package/dist/esm/tet-floating-block.entry.js +1 -1
- package/dist/esm/tet-font-weight.entry.js +1 -1
- package/dist/esm/tet-fonts.entry.js +1 -1
- package/dist/esm/tet-grid.entry.js +1 -1
- package/dist/esm/tet-icon.entry.js +2 -2
- package/dist/esm/tet-inline-message.entry.js +1 -1
- package/dist/esm/tet-input.entry.js +4 -4
- package/dist/esm/tet-layout.entry.js +1 -1
- package/dist/esm/tet-link-card-list.entry.js +1 -1
- package/dist/esm/tet-link.entry.js +1 -1
- package/dist/esm/tet-menu-mobile.entry.js +1 -1
- package/dist/esm/tet-menu.entry.js +1 -1
- package/dist/esm/tet-mini-compare-card.entry.js +1 -1
- package/dist/esm/tet-multi-step-dialog.entry.js +4 -4
- package/dist/esm/tet-navigation-mobile.entry.js +4 -4
- package/dist/esm/tet-news-card-list.entry.js +1 -1
- package/dist/esm/tet-notification.entry.js +1 -1
- package/dist/esm/tet-number-input.entry.js +1 -1
- package/dist/esm/tet-placeholder.entry.js +1 -1
- package/dist/esm/tet-position.entry.js +1 -1
- package/dist/esm/tet-price-view.entry.js +1 -1
- package/dist/esm/tet-radio-blocks.entry.js +1 -1
- package/dist/esm/tet-radio_2.entry.js +1 -1
- package/dist/esm/tet-range-slider.entry.js +1 -1
- package/dist/esm/tet-round-stepper.entry.js +1 -1
- package/dist/esm/tet-snicker-card-group.entry.js +1 -1
- package/dist/esm/tet-snicker-card.entry.js +4 -4
- package/dist/esm/tet-spacing.entry.js +1 -1
- package/dist/esm/tet-spinner.entry.js +1 -1
- package/dist/esm/tet-stepper-input.entry.js +4 -4
- package/dist/esm/tet-stepper-v3.entry.js +1 -1
- package/dist/esm/tet-sticky-offer.entry.js +1 -1
- package/dist/esm/tet-support-search.entry.js +2 -2
- package/dist/esm/tet-switch.entry.js +1 -1
- package/dist/esm/tet-table.entry.js +1 -1
- package/dist/esm/tet-tag_2.entry.js +4 -4
- package/dist/esm/tet-text-list.entry.js +1 -1
- package/dist/esm/tet-text.entry.js +1 -1
- package/dist/esm/tet-textarea.entry.js +1 -1
- package/dist/esm/tet-thank-you-view-v3.entry.js +4 -4
- package/dist/esm/{translations-DlbHIyQg.js → translations-4zQUcigP.js} +2 -2
- package/dist/esm/{typecheck-CaZKtSyx.js → typecheck-Bvqcvhjw.js} +2 -1
- package/dist/tet-components/{p-bc5450cb.entry.js → p-10e789d9.entry.js} +1 -1
- package/dist/tet-components/{p-55253942.entry.js → p-139d4cad.entry.js} +1 -1
- package/dist/tet-components/{p-33fbdaff.entry.js → p-1556076a.entry.js} +1 -1
- package/dist/tet-components/{p-4b94b11b.entry.js → p-15bddc3d.entry.js} +1 -1
- package/dist/tet-components/{p-d527b903.entry.js → p-19343cc6.entry.js} +1 -1
- package/dist/tet-components/{p-1652ed96.entry.js → p-1d997c7d.entry.js} +1 -1
- package/dist/tet-components/{p-f34234f1.entry.js → p-1deb89e1.entry.js} +1 -1
- package/dist/tet-components/{p-debd1123.entry.js → p-21a59a4f.entry.js} +1 -1
- package/dist/tet-components/{p-72f10abe.entry.js → p-24bdeb37.entry.js} +1 -1
- package/dist/tet-components/{p-4cd9856e.entry.js → p-26dd3cb0.entry.js} +1 -1
- package/dist/tet-components/{p-570f744c.entry.js → p-29948163.entry.js} +1 -1
- package/dist/tet-components/{p-54baa574.entry.js → p-2bd1b7ec.entry.js} +1 -1
- package/dist/tet-components/{p-7fae4d11.entry.js → p-2e4e81a5.entry.js} +1 -1
- package/dist/tet-components/{p-5926d29a.entry.js → p-2e7cb093.entry.js} +1 -1
- package/dist/tet-components/{p-9491b52d.entry.js → p-306ff942.entry.js} +1 -1
- package/dist/tet-components/{p-cbbb2f74.entry.js → p-3242f182.entry.js} +1 -1
- package/dist/tet-components/{p-bb4b016d.entry.js → p-394b9c6b.entry.js} +1 -1
- package/dist/tet-components/{p-443b131b.entry.js → p-39be547b.entry.js} +1 -1
- package/dist/tet-components/{p-f359076b.entry.js → p-3ab52911.entry.js} +1 -1
- package/dist/tet-components/{p-38896daf.entry.js → p-3d8635c1.entry.js} +1 -1
- package/dist/tet-components/{p-53ddf6d9.entry.js → p-43d1f956.entry.js} +1 -1
- package/dist/tet-components/{p-4538e30b.entry.js → p-47484c33.entry.js} +1 -1
- package/dist/tet-components/{p-f1672161.entry.js → p-47b6721e.entry.js} +1 -1
- package/dist/tet-components/{p-6837420f.entry.js → p-499ff632.entry.js} +1 -1
- package/dist/tet-components/{p-644d19eb.entry.js → p-4a22c9a8.entry.js} +1 -1
- package/dist/tet-components/p-4aa2dbc8.entry.js +1 -0
- package/dist/tet-components/{p-535de739.entry.js → p-4f47079e.entry.js} +1 -1
- package/dist/tet-components/{p-7f0e7265.entry.js → p-517168f6.entry.js} +1 -1
- package/dist/tet-components/{p-5bb5e9bf.entry.js → p-53b4947e.entry.js} +1 -1
- package/dist/tet-components/{p-2ee60b13.entry.js → p-591a092a.entry.js} +1 -1
- package/dist/tet-components/{p-d9e7883d.entry.js → p-5a31f21d.entry.js} +1 -1
- package/dist/tet-components/{p-a5f552c8.entry.js → p-5bd0a0c8.entry.js} +1 -1
- package/dist/tet-components/{p-2d821378.entry.js → p-616d3818.entry.js} +1 -1
- package/dist/tet-components/{p-7e55881a.entry.js → p-7105253e.entry.js} +1 -1
- package/dist/tet-components/{p-1a8c6e45.entry.js → p-73aca8b1.entry.js} +1 -1
- package/dist/tet-components/{p-6788614b.entry.js → p-77ae360e.entry.js} +1 -1
- package/dist/tet-components/{p-c444f4bc.entry.js → p-79e4a166.entry.js} +1 -1
- package/dist/tet-components/{p-19cf7e5a.entry.js → p-7fdd634a.entry.js} +1 -1
- package/dist/tet-components/{p-5356548e.entry.js → p-7ffa074d.entry.js} +1 -1
- package/dist/tet-components/{p-2c344868.entry.js → p-8091cf4b.entry.js} +1 -1
- package/dist/tet-components/{p-4569b8bc.entry.js → p-8436df88.entry.js} +1 -1
- package/dist/tet-components/{p-80eb8975.entry.js → p-87d015b3.entry.js} +1 -1
- package/dist/tet-components/{p-ce59d1cb.entry.js → p-8a9d5ef1.entry.js} +1 -1
- package/dist/tet-components/{p-f60aa760.entry.js → p-8b3ea797.entry.js} +1 -1
- package/dist/tet-components/{p-5e7ef84f.entry.js → p-8bdcb714.entry.js} +1 -1
- package/dist/tet-components/{p-ba792152.entry.js → p-92ef3a39.entry.js} +1 -1
- package/dist/tet-components/{p-85bc410d.entry.js → p-93005df8.entry.js} +1 -1
- package/dist/tet-components/{p-89aa61b4.entry.js → p-98ae4292.entry.js} +1 -1
- package/dist/tet-components/{p-d450dfc2.entry.js → p-9ab737dd.entry.js} +1 -1
- package/dist/tet-components/{p-e8a03fda.entry.js → p-9b624822.entry.js} +1 -1
- package/dist/tet-components/{p-v8vRDDsl.js → p-B8Zjo2sa.js} +1 -1
- package/dist/tet-components/p-BGrvDoTj.js +1 -0
- package/dist/tet-components/p-Bvqcvhjw.js +1 -0
- package/dist/tet-components/p-ClX9TYQY.js +3 -0
- package/dist/tet-components/p-D0GJDW-O.js +1 -0
- package/dist/tet-components/{p-6370d477.entry.js → p-a0340287.entry.js} +1 -1
- package/dist/tet-components/{p-f519649a.entry.js → p-a410109c.entry.js} +1 -1
- package/dist/tet-components/{p-39118ce2.entry.js → p-b315a1c8.entry.js} +1 -1
- package/dist/tet-components/{p-87379696.entry.js → p-b4c45d6b.entry.js} +1 -1
- package/dist/tet-components/{p-931af84a.entry.js → p-b5efc6d4.entry.js} +1 -1
- package/dist/tet-components/p-b849774e.entry.js +1 -0
- package/dist/tet-components/{p-e78ed300.entry.js → p-b8c0433c.entry.js} +1 -1
- package/dist/tet-components/{p-1a559db5.entry.js → p-baf6ba9e.entry.js} +1 -1
- package/dist/tet-components/{p-0dcca890.entry.js → p-bb325aa4.entry.js} +1 -1
- package/dist/tet-components/{p-bf441a6f.entry.js → p-bd42d182.entry.js} +1 -1
- package/dist/tet-components/{p-ec9bbd9c.entry.js → p-c32edb32.entry.js} +1 -1
- package/dist/tet-components/{p-c21eb460.entry.js → p-c989a64d.entry.js} +1 -1
- package/dist/tet-components/{p-bf79a574.entry.js → p-cb1c05ab.entry.js} +1 -1
- package/dist/tet-components/{p-74e87653.entry.js → p-cd267067.entry.js} +1 -1
- package/dist/tet-components/{p-863b9c4f.entry.js → p-d2abe02d.entry.js} +1 -1
- package/dist/tet-components/{p-09289fa1.entry.js → p-d2db496b.entry.js} +1 -1
- package/dist/tet-components/{p-df12fcae.entry.js → p-d44bea09.entry.js} +1 -1
- package/dist/tet-components/{p-bb003b93.entry.js → p-d88d8689.entry.js} +1 -1
- package/dist/tet-components/{p-001782bf.entry.js → p-d89ae495.entry.js} +1 -1
- package/dist/tet-components/{p-c5c88bf8.entry.js → p-dca1a4c2.entry.js} +1 -1
- package/dist/tet-components/{p-5c4d6ad0.entry.js → p-dfdf946f.entry.js} +1 -1
- package/dist/tet-components/{p-23f7e7c9.entry.js → p-e13f06c4.entry.js} +1 -1
- package/dist/tet-components/{p-ea9668c8.entry.js → p-e5c07d62.entry.js} +1 -1
- package/dist/tet-components/{p-bd94906d.entry.js → p-eb3a8119.entry.js} +1 -1
- package/dist/tet-components/{p-0ee97792.entry.js → p-eca2fc2f.entry.js} +1 -1
- package/dist/tet-components/{p-0ec02698.entry.js → p-f5315eaf.entry.js} +1 -1
- package/dist/tet-components/{p-5ffae43b.entry.js → p-f5a86256.entry.js} +1 -1
- package/dist/tet-components/{p-5a31ce02.entry.js → p-f79c8697.entry.js} +1 -1
- package/dist/tet-components/{p-3f9f1252.entry.js → p-f7e3a24b.entry.js} +1 -1
- package/dist/tet-components/p-t-BNeeWq.js +1 -0
- package/dist/tet-components/{p-B0ZtMor0.js → p-tf8lKgfD.js} +1 -1
- package/dist/tet-components/tet-components.esm.js +1 -1
- package/dist/types/components/simple/inputs/tet-datepicker/partials/tet-datepicker-header/tet-datepicker-header.d.ts +21 -0
- package/dist/types/components/simple/inputs/tet-datepicker/partials/tet-datepicker-month-view/tet-datepicker-month-view.d.ts +45 -0
- package/dist/types/components/simple/inputs/tet-datepicker/partials/tet-datepicker-multi-year-view/tet-datepicker-multi-year-view.d.ts +20 -0
- package/dist/types/components/simple/inputs/tet-datepicker/partials/tet-datepicker-year-view/tet-datepicker-year-view.d.ts +20 -0
- package/dist/types/components/simple/inputs/tet-datepicker/tet-datepicker.d.ts +47 -0
- package/dist/types/components.d.ts +383 -0
- package/package.json +1 -1
- package/dist/components/p-BTndlvfE.js +0 -1
- package/dist/components/p-Bha4Tnfs.js +0 -1
- package/dist/components/p-Bme7YRKY.js +0 -1
- package/dist/components/p-D2ANp_zV.js +0 -1
- package/dist/components/p-_2UzwYR8.js +0 -1
- package/dist/tet-components/p-C9BlrGW8.js +0 -1
- package/dist/tet-components/p-CaZKtSyx.js +0 -1
- package/dist/tet-components/p-DRLfH-G3.js +0 -3
- package/dist/tet-components/p-a7Y8PX2f.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as t}from"./p-BTndlvfE.js";var e={endpoints:{operations:"/operations/",address:"/addresses/",addressSearch:"/addresses/search/",translations:"/translations/",queryCustomer:"/customer/data/",customerAssets:"/customer/assets/",productComparison:"/v2/sac/product-data",catalogOffers:"/catalog/offers/",createCallCenterTask:"/tasks/create-callcenter-task/",componentData:"/web-components/data/",tvPlatformChannels:"/tv/channels/platform/",tvPackages:"/tv/packages/",metastoreProducts:"/metastore/products",cloudConfigurator:"/metastore/cloud-calculator-fields",serviceAvailabilityServices:"/sac/available-services",b2bConfigurator:"/metastore/b2b/configurator",assemblerScenario:"/sac/assembler"},testing:{baseUrl:"https://tst-gateway.tet.lv/api"},staging:{baseUrl:"https://uat-gateway.tet.lv/api"},production:{baseUrl:"https://gateway.tet.lv/api"}};const n=e.endpoints,i=e[t.environment]??{},s=Object.keys(n??[]).reduce(((t,e)=>({...t,[e]:`${i.baseUrl}${n[e]}`})),{})??{};class r{url;options;data;errorFallbackValue;defaultOptions={mode:"cors"};setUrl(t){return this.url=t,this}setOptions(t){return this.options=t,this}setData(t){return this.data=t,this}setErrorFallbackValue(t){return this.errorFallbackValue=t,this}execute(t=!1){return fetch(this.url,{...this.defaultOptions,...this.options,body:JSON.stringify(this.data)}).then((async e=>t?e:(await e.json())?.data)).catch((t=>{if(void 0!==this.errorFallbackValue)return this.errorFallbackValue;throw t}))}}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){return e&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(){return c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},c.apply(this,arguments)}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=l(t);if(e){var s=l(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}var v=function(){function t(){h(this,t)}return u(t,[{key:"listenForWhisper",value:function(t,e){return this.listen(".client-"+t,e)}},{key:"notification",value:function(t){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",t)}},{key:"stopListeningForWhisper",value:function(t,e){return this.stopListening(".client-"+t,e)}}]),t}(),p=function(){function t(e){h(this,t),this.namespace=e}return u(t,[{key:"format",value:function(t){return[".","\\"].includes(t.charAt(0))?t.substring(1):(this.namespace&&(t=this.namespace+"."+t),t.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(t){this.namespace=t}}]),t}(),w=function(){a(e,v);var t=d(e);function e(n,i,s){var r;return h(this,e),(r=t.call(this)).name=i,r.pusher=n,r.options=s,r.eventFormatter=new p(r.options.namespace),r.subscribe(),r}return u(e,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(t,e){return this.on(this.eventFormatter.format(t),e),this}},{key:"listenToAll",value:function(t){var e=this;return this.subscription.bind_global((function(n,i){if(!n.startsWith("pusher:")){var s=e.options.namespace.replace(/\./g,"\\"),r=n.startsWith(s)?n.substring(s.length+1):"."+n;t(r,i)}})),this}},{key:"stopListening",value:function(t,e){return e?this.subscription.unbind(this.eventFormatter.format(t),e):this.subscription.unbind(this.eventFormatter.format(t)),this}},{key:"stopListeningToAll",value:function(t){return t?this.subscription.unbind_global(t):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(t){return this.on("pusher:subscription_succeeded",(function(){t()})),this}},{key:"error",value:function(t){return this.on("pusher:subscription_error",(function(e){t(e)})),this}},{key:"on",value:function(t,e){return this.subscription.bind(t,e),this}}]),e}(),b=function(){a(e,w);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}}]),e}(),y=function(){a(e,w);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}}]),e}(),g=function(){a(e,w);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"here",value:function(t){return this.on("pusher:subscription_succeeded",(function(e){t(Object.keys(e.members).map((function(t){return e.members[t]})))})),this}},{key:"joining",value:function(t){return this.on("pusher:member_added",(function(e){t(e.info)})),this}},{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}},{key:"leaving",value:function(t){return this.on("pusher:member_removed",(function(e){t(e.info)})),this}}]),e}(),k=function(){a(e,v);var t=d(e);function e(n,i,s){var r;return h(this,e),(r=t.call(this)).events={},r.listeners={},r.name=i,r.socket=n,r.options=s,r.eventFormatter=new p(r.options.namespace),r.subscribe(),r}return u(e,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(t,e){return this.on(this.eventFormatter.format(t),e),this}},{key:"stopListening",value:function(t,e){return this.unbindEvent(this.eventFormatter.format(t),e),this}},{key:"subscribed",value:function(t){return this.on("connect",(function(e){t(e)})),this}},{key:"error",value:function(){return this}},{key:"on",value:function(t,e){var n=this;return this.listeners[t]=this.listeners[t]||[],this.events[t]||(this.events[t]=function(e,i){n.name===e&&n.listeners[t]&&n.listeners[t].forEach((function(t){return t(i)}))},this.socket.on(t,this.events[t])),this.listeners[t].push(e),this}},{key:"unbind",value:function(){var t=this;Object.keys(this.events).forEach((function(e){t.unbindEvent(e)}))}},{key:"unbindEvent",value:function(t,e){this.listeners[t]=this.listeners[t]||[],e&&(this.listeners[t]=this.listeners[t].filter((function(t){return t!==e}))),e&&0!==this.listeners[t].length||(this.events[t]&&(this.socket.removeListener(t,this.events[t]),delete this.events[t]),delete this.listeners[t])}}]),e}(),m=function(){a(e,k);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(t,e){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(t),data:e}),this}}]),e}(),S=function(){a(e,m);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"here",value:function(t){return this.on("presence:subscribed",(function(e){t(e.map((function(t){return t.user_info})))})),this}},{key:"joining",value:function(t){return this.on("presence:joining",(function(e){return t(e.user_info)})),this}},{key:"whisper",value:function(t,e){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(t),data:e}),this}},{key:"leaving",value:function(t){return this.on("presence:leaving",(function(e){return t(e.user_info)})),this}}]),e}(),_=function(){a(e,v);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(){return this}},{key:"listenToAll",value:function(){return this}},{key:"stopListening",value:function(){return this}},{key:"subscribed",value:function(){return this}},{key:"error",value:function(){return this}},{key:"on",value:function(){return this}}]),e}(),j=function(){a(e,_);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(){return this}}]),e}(),C=function(){a(e,_);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"here",value:function(){return this}},{key:"joining",value:function(){return this}},{key:"whisper",value:function(){return this}},{key:"leaving",value:function(){return this}}]),e}(),O=function(){function t(e){h(this,t),this._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},broadcaster:"pusher",csrfToken:null,bearerToken:null,host:null,key:null,namespace:"App.Events"},this.setOptions(e),this.connect()}return u(t,[{key:"setOptions",value:function(t){this.options=c(this._defaultOptions,t);var e=this.csrfToken();return e&&(this.options.auth.headers["X-CSRF-TOKEN"]=e,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=e),(e=this.options.bearerToken)&&(this.options.auth.headers.Authorization="Bearer "+e,this.options.userAuthentication.headers.Authorization="Bearer "+e),t}},{key:"csrfToken",value:function(){var t;return"undefined"!=typeof window&&window.Laravel&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:"undefined"!=typeof document&&"function"==typeof document.querySelector&&(t=document.querySelector('meta[name="csrf-token"]'))?t.getAttribute("content"):null}}]),t}(),E=function(){a(e,O);var t=d(e);function e(){var n;return h(this,e),(n=t.apply(this,arguments)).channels={},n}return u(e,[{key:"connect",value:function(){this.pusher=void 0!==this.options.client?this.options.client:this.options.Pusher?new this.options.Pusher(this.options.key,this.options):new Pusher(this.options.key,this.options)}},{key:"signin",value:function(){this.pusher.signin()}},{key:"listen",value:function(t,e,n){return this.channel(t).listen(e,n)}},{key:"channel",value:function(t){return this.channels[t]||(this.channels[t]=new w(this.pusher,t,this.options)),this.channels[t]}},{key:"privateChannel",value:function(t){return this.channels["private-"+t]||(this.channels["private-"+t]=new b(this.pusher,"private-"+t,this.options)),this.channels["private-"+t]}},{key:"encryptedPrivateChannel",value:function(t){return this.channels["private-encrypted-"+t]||(this.channels["private-encrypted-"+t]=new y(this.pusher,"private-encrypted-"+t,this.options)),this.channels["private-encrypted-"+t]}},{key:"presenceChannel",value:function(t){return this.channels["presence-"+t]||(this.channels["presence-"+t]=new g(this.pusher,"presence-"+t,this.options)),this.channels["presence-"+t]}},{key:"leave",value:function(t){var e=this;[t,"private-"+t,"private-encrypted-"+t,"presence-"+t].forEach((function(t){e.leaveChannel(t)}))}},{key:"leaveChannel",value:function(t){this.channels[t]&&(this.channels[t].unsubscribe(),delete this.channels[t])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}]),e}(),T=function(){a(e,O);var t=d(e);function e(){var n;return h(this,e),(n=t.apply(this,arguments)).channels={},n}return u(e,[{key:"connect",value:function(){var t=this,e=this.getSocketIO();return this.socket=e(this.options.host,this.options),this.socket.on("reconnect",(function(){Object.values(t.channels).forEach((function(t){t.subscribe()}))})),this.socket}},{key:"getSocketIO",value:function(){if(void 0!==this.options.client)return this.options.client;if("undefined"!=typeof io)return io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(t,e,n){return this.channel(t).listen(e,n)}},{key:"channel",value:function(t){return this.channels[t]||(this.channels[t]=new k(this.socket,t,this.options)),this.channels[t]}},{key:"privateChannel",value:function(t){return this.channels["private-"+t]||(this.channels["private-"+t]=new m(this.socket,"private-"+t,this.options)),this.channels["private-"+t]}},{key:"presenceChannel",value:function(t){return this.channels["presence-"+t]||(this.channels["presence-"+t]=new S(this.socket,"presence-"+t,this.options)),this.channels["presence-"+t]}},{key:"leave",value:function(t){var e=this;[t,"private-"+t,"presence-"+t].forEach((function(t){e.leaveChannel(t)}))}},{key:"leaveChannel",value:function(t){this.channels[t]&&(this.channels[t].unsubscribe(),delete this.channels[t])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}]),e}(),x=function(){a(e,O);var t=d(e);function e(){var n;return h(this,e),(n=t.apply(this,arguments)).channels={},n}return u(e,[{key:"connect",value:function(){}},{key:"listen",value:function(){return new _}},{key:"channel",value:function(){return new _}},{key:"privateChannel",value:function(){return new j}},{key:"encryptedPrivateChannel",value:function(){return new j}},{key:"presenceChannel",value:function(){return new C}},{key:"leave",value:function(){}},{key:"leaveChannel",value:function(){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}]),e}(),P=function(){function t(e){h(this,t),this.options=e,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return u(t,[{key:"channel",value:function(t){return this.connector.channel(t)}},{key:"connect",value:function(){if("reverb"==this.options.broadcaster)this.connector=new E(c(c({},this.options),{cluster:""}));else if("pusher"==this.options.broadcaster)this.connector=new E(this.options);else if("socket.io"==this.options.broadcaster)this.connector=new T(this.options);else if("null"==this.options.broadcaster)this.connector=new x(this.options);else{if("function"!=typeof this.options.broadcaster)throw new Error("Broadcaster ".concat(o(this.options.broadcaster)," ").concat(this.options.broadcaster," is not supported."));this.connector=new this.options.broadcaster(this.options)}}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(t){return this.connector.presenceChannel(t)}},{key:"leave",value:function(t){this.connector.leave(t)}},{key:"leaveChannel",value:function(t){this.connector.leaveChannel(t)}},{key:"leaveAllChannels",value:function(){for(var t in this.connector.channels)this.leaveChannel(t)}},{key:"listen",value:function(t,e,n){return this.connector.listen(t,e,n)}},{key:"private",value:function(t){return this.connector.privateChannel(t)}},{key:"encryptedPrivate",value:function(t){return this.connector.encryptedPrivateChannel(t)}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){"function"==typeof Vue&&Vue.http&&this.registerVueRequestInterceptor(),"function"==typeof axios&&this.registerAxiosRequestInterceptor(),"function"==typeof jQuery&&this.registerjQueryAjaxSetup(),"object"===("undefined"==typeof Turbo?"undefined":o(Turbo))&&this.registerTurboRequestInterceptor()}},{key:"registerVueRequestInterceptor",value:function(){var t=this;Vue.http.interceptors.push((function(e,n){t.socketId()&&e.headers.set("X-Socket-ID",t.socketId()),n()}))}},{key:"registerAxiosRequestInterceptor",value:function(){var t=this;axios.interceptors.request.use((function(e){return t.socketId()&&(e.headers["X-Socket-Id"]=t.socketId()),e}))}},{key:"registerjQueryAjaxSetup",value:function(){var t=this;void 0!==jQuery.ajax&&jQuery.ajaxPrefilter((function(e,n,i){t.socketId()&&i.setRequestHeader("X-Socket-Id",t.socketId())}))}},{key:"registerTurboRequestInterceptor",value:function(){var t=this;document.addEventListener("turbo:before-fetch-request",(function(e){e.detail.fetchOptions.headers["X-Socket-Id"]=t.socketId()}))}}]),t}();function R(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var I,A,N={exports:{}},L=I?N.exports:(I=1,window,A=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e){var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},n(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0});var s=256,r=function(){function t(t){void 0===t&&(t="="),this._paddingCharacter=t}return t.prototype.encodedLength=function(t){return this._paddingCharacter?(t+2)/3*4|0:(8*t+5)/6|0},t.prototype.encode=function(t){for(var e="",n=0;n<t.length-2;n+=3)e+=this._encodeByte((i=t[n]<<16|t[n+1]<<8|t[n+2])>>>18&63),e+=this._encodeByte(i>>>12&63),e+=this._encodeByte(i>>>6&63),e+=this._encodeByte(i>>>0&63);var i,s=t.length-n;return s>0&&(e+=this._encodeByte((i=t[n]<<16|(2===s?t[n+1]<<8:0))>>>18&63),e+=this._encodeByte(i>>>12&63),e+=2===s?this._encodeByte(i>>>6&63):this._paddingCharacter||"",e+=this._paddingCharacter||""),e},t.prototype.maxDecodedLength=function(t){return this._paddingCharacter?t/4*3|0:(6*t+7)/8|0},t.prototype.decodedLength=function(t){return this.maxDecodedLength(t.length-this._getPaddingLength(t))},t.prototype.decode=function(t){if(0===t.length)return new Uint8Array(0);for(var e=this._getPaddingLength(t),n=t.length-e,i=new Uint8Array(this.maxDecodedLength(n)),r=0,o=0,h=0,u=0,c=0,a=0,l=0;o<n-4;o+=4)u=this._decodeChar(t.charCodeAt(o+0)),c=this._decodeChar(t.charCodeAt(o+1)),a=this._decodeChar(t.charCodeAt(o+2)),l=this._decodeChar(t.charCodeAt(o+3)),i[r++]=u<<2|c>>>4,i[r++]=c<<4|a>>>2,i[r++]=a<<6|l,h|=u&s,h|=c&s,h|=a&s,h|=l&s;if(o<n-1&&(u=this._decodeChar(t.charCodeAt(o)),c=this._decodeChar(t.charCodeAt(o+1)),i[r++]=u<<2|c>>>4,h|=u&s,h|=c&s),o<n-2&&(a=this._decodeChar(t.charCodeAt(o+2)),i[r++]=c<<4|a>>>2,h|=a&s),o<n-3&&(l=this._decodeChar(t.charCodeAt(o+3)),i[r++]=a<<6|l,h|=l&s),0!==h)throw new Error("Base64Coder: incorrect characters for decoding");return i},t.prototype._encodeByte=function(t){var e=t;return e+=65,e+=25-t>>>8&6,e+=51-t>>>8&-75,e+=61-t>>>8&-15,e+=62-t>>>8&3,String.fromCharCode(e)},t.prototype._decodeChar=function(t){var e=s;return e+=(42-t&t-44)>>>8&-256+t-43+62,e+=(46-t&t-48)>>>8&-256+t-47+63,e+=(47-t&t-58)>>>8&-256+t-48+52,(e+=(64-t&t-91)>>>8&-256+t-65+0)+((96-t&t-123)>>>8&-256+t-97+26)},t.prototype._getPaddingLength=function(t){var e=0;if(this._paddingCharacter){for(var n=t.length-1;n>=0&&t[n]===this._paddingCharacter;n--)e++;if(t.length<4||e>2)throw new Error("Base64Coder: incorrect padding")}return e},t}();e.Coder=r;var o=new r;e.encode=function(t){return o.encode(t)},e.decode=function(t){return o.decode(t)};var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype._encodeByte=function(t){var e=t;return e+=65,e+=25-t>>>8&6,e+=51-t>>>8&-75,e+=61-t>>>8&-13,e+=62-t>>>8&49,String.fromCharCode(e)},e.prototype._decodeChar=function(t){var e=s;return e+=(44-t&t-46)>>>8&-256+t-45+62,e+=(94-t&t-96)>>>8&-256+t-95+63,e+=(47-t&t-58)>>>8&-256+t-48+52,(e+=(64-t&t-91)>>>8&-256+t-65+0)+((96-t&t-123)>>>8&-256+t-97+26)},e}(r);e.URLSafeCoder=h;var u=new h;e.encodeURLSafe=function(t){return u.encode(t)},e.decodeURLSafe=function(t){return u.decode(t)},e.encodedLength=function(t){return o.encodedLength(t)},e.maxDecodedLength=function(t){return o.maxDecodedLength(t)},e.decodedLength=function(t){return o.decodedLength(t)}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n="utf8: invalid string",i="utf8: invalid source encoding";function s(t){for(var e=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);if(s<128)e+=1;else if(s<2048)e+=2;else if(s<55296)e+=3;else{if(!(s<=57343))throw new Error(n);if(i>=t.length-1)throw new Error(n);i++,e+=4}}return e}e.encode=function(t){for(var e=new Uint8Array(s(t)),n=0,i=0;i<t.length;i++){var r=t.charCodeAt(i);r<128?e[n++]=r:r<2048?(e[n++]=192|r>>6,e[n++]=128|63&r):r<55296?(e[n++]=224|r>>12,e[n++]=128|r>>6&63,e[n++]=128|63&r):(i++,r=(1023&r)<<10,r|=1023&t.charCodeAt(i),e[n++]=240|(r+=65536)>>18,e[n++]=128|r>>12&63,e[n++]=128|r>>6&63,e[n++]=128|63&r)}return e},e.encodedLength=s,e.decode=function(t){for(var e=[],n=0;n<t.length;n++){var s=t[n];if(128&s){var r=void 0;if(s<224){if(n>=t.length)throw new Error(i);if(128!=(192&(o=t[++n])))throw new Error(i);s=(31&s)<<6|63&o,r=128}else if(s<240){if(n>=t.length-1)throw new Error(i);var o=t[++n],h=t[++n];if(128!=(192&o)||128!=(192&h))throw new Error(i);s=(15&s)<<12|(63&o)<<6|63&h,r=2048}else{if(!(s<248))throw new Error(i);if(n>=t.length-2)throw new Error(i);o=t[++n],h=t[++n];var u=t[++n];if(128!=(192&o)||128!=(192&h)||128!=(192&u))throw new Error(i);s=(15&s)<<18|(63&o)<<12|(63&h)<<6|63&u,r=65536}if(s<r||s>=55296&&s<=57343)throw new Error(i);if(s>=65536){if(s>1114111)throw new Error(i);s-=65536,e.push(String.fromCharCode(55296|s>>10)),s=56320|1023&s}}e.push(String.fromCharCode(s))}return e.join("")}},function(t,e,n){t.exports=n(3).default},function(t,e,n){n.r(e);class i{constructor(t,e){this.lastId=0,this.prefix=t,this.name=e}create(t){this.lastId++;var e=this.lastId,n=this.prefix+e,i=this.name+"["+e+"]",s=!1,r=function(){s||(t.apply(null,arguments),s=!0)};return this[e]=r,{number:e,id:n,name:i,callback:r}}remove(t){delete this[t.number]}}var s=new i("_pusher_script_","Pusher.ScriptReceivers"),r="8.3.0",o=7,h=80,u=443,c="",a="sockjs.pusher.com",l=80,f=443,d="/pusher",v="stats.pusher.com",p="/pusher/auth",w="ajax",b=12e4,y=3e4,g=1e4,k={endpoint:"/pusher/user-auth",transport:"ajax"},m={endpoint:"/pusher/auth",transport:"ajax"},S="http://js.pusher.com",_="https://js.pusher.com",j="",C=new i("_pusher_dependencies","Pusher.DependenciesReceivers"),O=new class{constructor(t){this.options=t,this.receivers=t.receivers||s,this.loading={}}load(t,e,n){var i=this;if(i.loading[t]&&i.loading[t].length>0)i.loading[t].push(n);else{i.loading[t]=[n];var s=_e.createScriptRequest(i.getPath(t,e)),r=i.receivers.create((function(e){if(i.receivers.remove(r),i.loading[t]){var n=i.loading[t];delete i.loading[t];for(var o=function(t){t||s.cleanup()},h=0;h<n.length;h++)n[h](e,o)}}));s.send(r)}}getRoot(t){var e=_e.getDocument().location.protocol;return(t&&t.useTLS||"https:"===e?this.options.cdn_https:this.options.cdn_http).replace(/\/*$/,"")+"/"+this.options.version}getPath(t,e){return this.getRoot(e)+"/"+t+this.options.suffix+".js"}}({cdn_http:S,cdn_https:_,version:r,suffix:j,receivers:C});const E={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}};var T,x=function(t){const e=E.urls[t];if(!e)return"";let n;return e.fullUrl?n=e.fullUrl:e.path&&(n=E.baseUrl+e.path),n?`See: ${n}`:""};!function(t){t.UserAuthentication="user-authentication",t.ChannelAuthorization="channel-authorization"}(T||(T={}));class P extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class R extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class I extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class A extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class N extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class L extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class U extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class M extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class $ extends Error{constructor(t,e){super(e),this.status=t,Object.setPrototypeOf(this,new.target.prototype)}}var D=function(t,e,n,i,s){const r=_e.createXHR();for(var o in r.open("POST",n.endpoint,!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.headers)r.setRequestHeader(o,n.headers[o]);if(null!=n.headersProvider){let t=n.headersProvider();for(var o in t)r.setRequestHeader(o,t[o])}return r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status){let t,e=!1;try{t=JSON.parse(r.responseText),e=!0}catch(t){s(new $(200,`JSON returned from ${i.toString()} endpoint was invalid, yet status code was 200. Data was: ${r.responseText}`),null)}e&&s(null,t)}else{let t="";switch(i){case T.UserAuthentication:t=x("authenticationEndpoint");break;case T.ChannelAuthorization:t=`Clients must be authorized to join private or presence channels. ${x("authorizationEndpoint")}`}s(new $(r.status,`Unable to retrieve auth string from ${i.toString()} endpoint - received status: ${r.status} from ${n.endpoint}. ${t}`),null)}},r.send(e),r},z=String.fromCharCode,B="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",H=function(t){var e=t.charCodeAt(0);return e<128?t:e<2048?z(192|e>>>6)+z(128|63&e):z(224|e>>>12&15)+z(128|e>>>6&63)+z(128|63&e)},J=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[B.charAt(n>>>18),B.charAt(n>>>12&63),e>=2?"=":B.charAt(n>>>6&63),e>=1?"=":B.charAt(63&n)].join("")},F=window.btoa||function(t){return t.replace(/[\s\S]{1,3}/g,J)},q=class{constructor(t,e,n,i){this.clear=e,this.timer=t((()=>{this.timer&&(this.timer=i(this.timer))}),n)}isRunning(){return null!==this.timer}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}};function X(t){window.clearTimeout(t)}function W(t){window.clearInterval(t)}class V extends q{constructor(t,e){super(setTimeout,X,t,(function(){return e(),null}))}}class Q extends q{constructor(t,e){super(setInterval,W,t,(function(t){return e(),t}))}}var G={now:()=>Date.now?Date.now():(new Date).valueOf(),defer:t=>new V(0,t),method(t,...e){var n=Array.prototype.slice.call(arguments,1);return function(e){return e[t].apply(e,n.concat(arguments))}}},Y=G;function K(t,...e){for(var n=0;n<e.length;n++){var i=e[n];for(var s in i)t[s]=i[s]&&i[s].constructor&&i[s].constructor===Object?K(t[s]||{},i[s]):i[s]}return t}function Z(){for(var t=["Pusher"],e=0;e<arguments.length;e++)t.push("string"==typeof arguments[e]?arguments[e]:ct(arguments[e]));return t.join(" : ")}function tt(t,e){var n=Array.prototype.indexOf;if(null===t)return-1;if(n&&t.indexOf===n)return t.indexOf(e);for(var i=0,s=t.length;i<s;i++)if(t[i]===e)return i;return-1}function et(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(t[n],n,t)}function nt(t){var e=[];return et(t,(function(t,n){e.push(n)})),e}function it(t,e,n){for(var i=0;i<t.length;i++)e.call(n||window,t[i],i,t)}function st(t,e){for(var n=[],i=0;i<t.length;i++)n.push(e(t[i],i,t,n));return n}function rt(t,e){e=e||function(t){return!!t};for(var n=[],i=0;i<t.length;i++)e(t[i],i,t,n)&&n.push(t[i]);return n}function ot(t,e){var n={};return et(t,(function(i,s){(e&&e(i,s,t,n)||Boolean(i))&&(n[s]=i)})),n}function ht(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return!0;return!1}function ut(t){return e=function(t){return"object"==typeof t&&(t=ct(t)),encodeURIComponent((e=t.toString(),F(e.replace(/[^\x00-\x7F]/g,H))));var e},n={},et(t,(function(t,i){n[i]=e(t)})),n;var e,n}function ct(t){try{return JSON.stringify(t)}catch(i){return JSON.stringify((e=[],n=[],function t(i,s){var r,o,h;switch(typeof i){case"object":if(!i)return null;for(r=0;r<e.length;r+=1)if(e[r]===i)return{$ref:n[r]};if(e.push(i),n.push(s),"[object Array]"===Object.prototype.toString.apply(i))for(h=[],r=0;r<i.length;r+=1)h[r]=t(i[r],s+"["+r+"]");else for(o in h={},i)Object.prototype.hasOwnProperty.call(i,o)&&(h[o]=t(i[o],s+"["+JSON.stringify(o)+"]"));return h;case"number":case"string":case"boolean":return i}}(t,"$")))}var e,n}var at=new class{constructor(){this.globalLog=t=>{window.console&&window.console.log&&window.console.log(t)}}debug(...t){this.log(this.globalLog,t)}warn(...t){this.log(this.globalLogWarn,t)}error(...t){this.log(this.globalLogError,t)}globalLogWarn(t){window.console&&window.console.warn?window.console.warn(t):this.globalLog(t)}globalLogError(t){window.console&&window.console.error?window.console.error(t):this.globalLogWarn(t)}log(t,...e){var n=Z.apply(this,arguments);ze.log?ze.log(n):ze.logToConsole&&t.bind(this)(n)}},lt=function(t,e,n,i,s){void 0===n.headers&&null==n.headersProvider||at.warn(`To send headers with the ${i.toString()} request, you must use AJAX, rather than JSONP.`);var r=t.nextAuthCallbackID.toString();t.nextAuthCallbackID++;var o=t.getDocument(),h=o.createElement("script");t.auth_callbacks[r]=function(t){s(null,t)},h.src=n.endpoint+"?callback="+encodeURIComponent("Pusher.auth_callbacks['"+r+"']")+"&"+e;var u=o.getElementsByTagName("head")[0]||o.documentElement;u.insertBefore(h,u.firstChild)};class ft{constructor(t){this.src=t}send(t){var e=this,n="Error loading "+e.src;e.script=document.createElement("script"),e.script.id=t.id,e.script.src=e.src,e.script.type="text/javascript",e.script.charset="UTF-8",e.script.addEventListener?(e.script.onerror=function(){t.callback(n)},e.script.onload=function(){t.callback(null)}):e.script.onreadystatechange=function(){"loaded"!==e.script.readyState&&"complete"!==e.script.readyState||t.callback(null)},void 0===e.script.async&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(e.errorScript=document.createElement("script"),e.errorScript.id=t.id+"_error",e.errorScript.text=t.name+"('"+n+"');",e.script.async=e.errorScript.async=!1):e.script.async=!0;var i=document.getElementsByTagName("head")[0];i.insertBefore(e.script,i.firstChild),e.errorScript&&i.insertBefore(e.errorScript,e.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class dt{constructor(t,e){this.url=t,this.data=e}send(t){if(!this.request){var e=st((n=ut(ot(this.data,(function(t){return void 0!==t}))),i=[],et(n,(function(t,e){i.push([e,t])})),i),Y.method("join","=")).join("&");this.request=_e.createScriptRequest(this.url+"/"+t.number+"?"+e),this.request.send(t)}var n,i}cleanup(){this.request&&this.request.cleanup()}}var vt={name:"jsonp",getAgent:function(t,e){return function(n,i){var r=_e.createJSONPRequest("http"+(e?"s":"")+"://"+(t.host||t.options.host)+t.options.path,n),o=_e.ScriptReceivers.create((function(e,n){s.remove(o),r.cleanup(),n&&n.host&&(t.host=n.host),i&&i(e,n)}));r.send(o)}}};function pt(t,e,n){return t+(e.useTLS?"s":"")+"://"+(e.useTLS?e.hostTLS:e.hostNonTLS)+n}function wt(t,e){return"/app/"+t+"?protocol="+o+"&client=js&version="+r+(e?"&"+e:"")}var bt={getInitial:function(t,e){return pt("ws",e,(e.httpPath||"")+wt(t,"flash=false"))}},yt={getInitial:function(t,e){return pt("http",e,(e.httpPath||"/pusher")+wt(t))}},gt={getInitial:function(t,e){return pt("http",e,e.httpPath||"/pusher")},getPath:function(t){return wt(t)}};class kt{constructor(){this._callbacks={}}get(t){return this._callbacks[mt(t)]}add(t,e,n){var i=mt(t);this._callbacks[i]=this._callbacks[i]||[],this._callbacks[i].push({fn:e,context:n})}remove(t,e,n){if(t||e||n){var i=t?[mt(t)]:nt(this._callbacks);e||n?this.removeCallback(i,e,n):this.removeAllCallbacks(i)}else this._callbacks={}}removeCallback(t,e,n){it(t,(function(t){this._callbacks[t]=rt(this._callbacks[t]||[],(function(t){return e&&e!==t.fn||n&&n!==t.context})),0===this._callbacks[t].length&&delete this._callbacks[t]}),this)}removeAllCallbacks(t){it(t,(function(t){delete this._callbacks[t]}),this)}}function mt(t){return"_"+t}class St{constructor(t){this.callbacks=new kt,this.global_callbacks=[],this.failThrough=t}bind(t,e,n){return this.callbacks.add(t,e,n),this}bind_global(t){return this.global_callbacks.push(t),this}unbind(t,e,n){return this.callbacks.remove(t,e,n),this}unbind_global(t){return t?(this.global_callbacks=rt(this.global_callbacks||[],(e=>e!==t)),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(t,e,n){for(var i=0;i<this.global_callbacks.length;i++)this.global_callbacks[i](t,e);var s=this.callbacks.get(t),r=[];if(n?r.push(e,n):e&&r.push(e),s&&s.length>0)for(i=0;i<s.length;i++)s[i].fn.apply(s[i].context||window,r);else this.failThrough&&this.failThrough(t,e);return this}}class _t extends St{constructor(t,e,n,i,s){super(),this.initialize=_e.transportConnectionInitializer,this.hooks=t,this.name=e,this.priority=n,this.key=i,this.options=s,this.state="new",this.timeline=s.timeline,this.activityTimeout=s.activityTimeout,this.id=this.timeline.generateUniqueID()}handlesActivityChecks(){return Boolean(this.hooks.handlesActivityChecks)}supportsPing(){return Boolean(this.hooks.supportsPing)}connect(){if(this.socket||"initialized"!==this.state)return!1;var t=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(t,this.options)}catch(t){return Y.defer((()=>{this.onError(t),this.changeState("closed")})),!1}return this.bindListeners(),at.debug("Connecting",{transport:this.name,url:t}),this.changeState("connecting"),!0}close(){return!!this.socket&&(this.socket.close(),!0)}send(t){return"open"===this.state&&(Y.defer((()=>{this.socket&&this.socket.send(t)})),!0)}ping(){"open"===this.state&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(t){this.emit("error",{type:"WebSocketError",error:t}),this.timeline.error(this.buildTimelineMessage({error:t.toString()}))}onClose(t){t?this.changeState("closed",{code:t.code,reason:t.reason,wasClean:t.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(t){this.emit("message",t)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=t=>{this.onError(t)},this.socket.onclose=t=>{this.onClose(t)},this.socket.onmessage=t=>{this.onMessage(t)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(t,e){this.state=t,this.timeline.info(this.buildTimelineMessage({state:t,params:e})),this.emit(t,e)}buildTimelineMessage(t){return K({cid:this.id},t)}}class jt{constructor(t){this.hooks=t}isSupported(t){return this.hooks.isSupported(t)}createConnection(t,e,n,i){return new _t(this.hooks,t,e,n,i)}}var Ct=new jt({urls:bt,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return Boolean(_e.getWebSocketAPI())},isSupported:function(){return Boolean(_e.getWebSocketAPI())},getSocket:function(t){return _e.createWebSocket(t)}}),Ot={urls:yt,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},Et=K({getSocket:function(t){return _e.HTTPFactory.createStreamingSocket(t)}},Ot),Tt=K({getSocket:function(t){return _e.HTTPFactory.createPollingSocket(t)}},Ot),xt={isSupported:function(){return _e.isXHRSupported()}},Pt={ws:Ct,xhr_streaming:new jt(K({},Et,xt)),xhr_polling:new jt(K({},Tt,xt))},Rt=new jt({file:"sockjs",urls:gt,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return void 0!==window.SockJS},getSocket:function(t,e){return new window.SockJS(t,null,{js_path:O.getPath("sockjs",{useTLS:e.useTLS}),ignore_null_origin:e.ignoreNullOrigin})},beforeOpen:function(t,e){t.send(JSON.stringify({path:e}))}}),It={isSupported:function(t){return _e.isXDRSupported(t.useTLS)}},At=new jt(K({},Et,It)),Nt=new jt(K({},Tt,It));Pt.xdr_streaming=At,Pt.xdr_polling=Nt,Pt.sockjs=Rt;var Lt=Pt,Ut=new class extends St{constructor(){super();var t=this;void 0!==window.addEventListener&&(window.addEventListener("online",(function(){t.emit("online")}),!1),window.addEventListener("offline",(function(){t.emit("offline")}),!1))}isOnline(){return void 0===window.navigator.onLine||window.navigator.onLine}};class Mt{constructor(t,e,n){this.manager=t,this.transport=e,this.minPingDelay=n.minPingDelay,this.maxPingDelay=n.maxPingDelay,this.pingDelay=void 0}createConnection(t,e,n,i){i=K({},i,{activityTimeout:this.pingDelay});var s=this.transport.createConnection(t,e,n,i),r=null,o=function(){s.unbind("open",o),s.bind("closed",h),r=Y.now()},h=t=>{if(s.unbind("closed",h),1002===t.code||1003===t.code)this.manager.reportDeath();else if(!t.wasClean&&r){var e=Y.now()-r;e<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(e/2,this.minPingDelay))}};return s.bind("open",o),s}isSupported(t){return this.manager.isAlive()&&this.transport.isSupported(t)}}const $t={decodeMessage:function(t){try{var e=JSON.parse(t.data),n=e.data;if("string"==typeof n)try{n=JSON.parse(e.data)}catch(t){}var i={event:e.event,channel:e.channel,data:n};return e.user_id&&(i.user_id=e.user_id),i}catch(e){throw{type:"MessageParseError",error:e,data:t.data}}},encodeMessage:function(t){return JSON.stringify(t)},processHandshake:function(t){var e=$t.decodeMessage(t);if("pusher:connection_established"===e.event){if(!e.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:e.data.socket_id,activityTimeout:1e3*e.data.activity_timeout}}if("pusher:error"===e.event)return{action:this.getCloseAction(e.data),error:this.getCloseError(e.data)};throw"Invalid handshake"},getCloseAction:function(t){return t.code<4e3?t.code>=1002&&t.code<=1004?"backoff":null:4e3===t.code?"tls_only":t.code<4100?"refused":t.code<4200?"backoff":t.code<4300?"retry":"refused"},getCloseError:function(t){return 1e3!==t.code&&1001!==t.code?{type:"PusherError",data:{code:t.code,message:t.reason||t.message}}:null}};var Dt=$t;class zt extends St{constructor(t,e){super(),this.id=t,this.transport=e,this.activityTimeout=e.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(t){return this.transport.send(t)}send_event(t,e,n){var i={event:t,data:e};return n&&(i.channel=n),at.debug("Event sent",i),this.send(Dt.encodeMessage(i))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var t={message:t=>{var e;try{e=Dt.decodeMessage(t)}catch(e){this.emit("error",{type:"MessageParseError",error:e,data:t.data})}if(void 0!==e){switch(at.debug("Event recd",e),e.event){case"pusher:error":this.emit("error",{type:"PusherError",data:e.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong")}this.emit("message",e)}},activity:()=>{this.emit("activity")},error:t=>{this.emit("error",t)},closed:t=>{e(),t&&t.code&&this.handleCloseEvent(t),this.transport=null,this.emit("closed")}},e=()=>{et(t,((t,e)=>{this.transport.unbind(e,t)}))};et(t,((t,e)=>{this.transport.bind(e,t)}))}handleCloseEvent(t){var e=Dt.getCloseAction(t),n=Dt.getCloseError(t);n&&this.emit("error",n),e&&this.emit(e,{action:e,error:n})}}class Bt{constructor(t,e){this.transport=t,this.callback=e,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=t=>{var e;this.unbindListeners();try{e=Dt.processHandshake(t)}catch(t){return this.finish("error",{error:t}),void this.transport.close()}"connected"===e.action?this.finish("connected",{connection:new zt(e.id,this.transport),activityTimeout:e.activityTimeout}):(this.finish(e.action,{error:e.error}),this.transport.close())},this.onClosed=t=>{this.unbindListeners();var e=Dt.getCloseAction(t)||"backoff",n=Dt.getCloseError(t);this.finish(e,{error:n})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(t,e){this.callback(K({transport:this.transport,action:t},e))}}class Ht{constructor(t,e){this.timeline=t,this.options=e||{}}send(t,e){this.timeline.isEmpty()||this.timeline.send(_e.TimelineTransport.getAgent(this,t),e)}}class Jt extends St{constructor(t,e){super((function(e){at.debug("No callbacks on "+t+" for "+e)})),this.name=t,this.pusher=e,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(t,e){return e(null,{auth:""})}trigger(t,e){if(0!==t.indexOf("client-"))throw new P("Event '"+t+"' does not start with 'client-'");if(!this.subscribed){var n=x("triggeringClientEvents");at.warn(`Client event triggered before channel 'subscription_succeeded' event . ${n}`)}return this.pusher.send_event(t,e,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(t){var e=t.event,n=t.data;"pusher_internal:subscription_succeeded"===e?this.handleSubscriptionSucceededEvent(t):"pusher_internal:subscription_count"===e?this.handleSubscriptionCountEvent(t):0!==e.indexOf("pusher_internal:")&&this.emit(e,n,{})}handleSubscriptionSucceededEvent(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",t.data)}handleSubscriptionCountEvent(t){t.data.subscription_count&&(this.subscriptionCount=t.data.subscription_count),this.emit("pusher:subscription_count",t.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,((t,e)=>{t?(this.subscriptionPending=!1,at.error(t.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:t.message},t instanceof $?{status:t.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:e.auth,channel_data:e.channel_data,channel:this.name})})))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class Ft extends Jt{authorize(t,e){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:t},e)}}class qt{constructor(){this.reset()}get(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members[t]}:null}each(t){et(this.members,((e,n)=>{t(this.get(n))}))}setMyID(t){this.myID=t}onSubscription(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)}addMember(t){return null===this.get(t.user_id)&&this.count++,this.members[t.user_id]=t.user_info,this.get(t.user_id)}removeMember(t){var e=this.get(t.user_id);return e&&(delete this.members[t.user_id],this.count--),e}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}class Xt extends Ft{constructor(t,e){super(t,e),this.members=new qt}authorize(t,e){super.authorize(t,((t,n)=>{return i=this,s=void 0,o=function*(){if(!t)if(null!=n.channel_data){var i=JSON.parse(n.channel_data);this.members.setMyID(i.user_id)}else{if(yield this.pusher.user.signinDonePromise,null==this.pusher.user.user_data){let t=x("authorizationEndpoint");return at.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${t}, or the user should be signed in.`),void e("Invalid auth response")}this.members.setMyID(this.pusher.user.user_data.id)}e(t,n)},new((r=void 0)||(r=Promise))((function(t,e){function n(t){try{u(o.next(t))}catch(t){e(t)}}function h(t){try{u(o.throw(t))}catch(t){e(t)}}function u(e){var i;e.done?t(e.value):(i=e.value,i instanceof r?i:new r((function(t){t(i)}))).then(n,h)}u((o=o.apply(i,s||[])).next())}));var i,s,r,o}))}handleEvent(t){var e=t.event;if(0===e.indexOf("pusher_internal:"))this.handleInternalEvent(t);else{var n=t.data,i={};t.user_id&&(i.user_id=t.user_id),this.emit(e,n,i)}}handleInternalEvent(t){var e=t.data;switch(t.event){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(t);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(t);break;case"pusher_internal:member_added":var n=this.members.addMember(e);this.emit("pusher:member_added",n);break;case"pusher_internal:member_removed":var i=this.members.removeMember(e);i&&this.emit("pusher:member_removed",i)}}handleSubscriptionSucceededEvent(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(t.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var Wt=n(1),Vt=n(0);class Qt extends Ft{constructor(t,e,n){super(t,e),this.key=null,this.nacl=n}authorize(t,e){super.authorize(t,((t,n)=>{if(t)return void e(t,n);let i=n.shared_secret;i?(this.key=Object(Vt.decode)(i),delete n.shared_secret,e(null,n)):e(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null)}))}trigger(t,e){throw new L("Client events are not currently supported for encrypted channels")}handleEvent(t){var e=t.event,n=t.data;0!==e.indexOf("pusher_internal:")&&0!==e.indexOf("pusher:")?this.handleEncryptedEvent(e,n):super.handleEvent(t)}handleEncryptedEvent(t,e){if(!this.key)return void at.debug("Received encrypted event before key has been retrieved from the authEndpoint");if(!e.ciphertext||!e.nonce)return void at.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+e);let n=Object(Vt.decode)(e.ciphertext);if(n.length<this.nacl.secretbox.overheadLength)return void at.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${n.length}`);let i=Object(Vt.decode)(e.nonce);if(i.length<this.nacl.secretbox.nonceLength)return void at.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${i.length}`);let s=this.nacl.secretbox.open(n,i,this.key);if(null===s)return at.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),void this.authorize(this.pusher.connection.socket_id,((e,r)=>{e?at.error(`Failed to make a request to the authEndpoint: ${r}. Unable to fetch new key, so dropping encrypted event`):(s=this.nacl.secretbox.open(n,i,this.key),null!==s?this.emit(t,this.getDataToEmit(s)):at.error("Failed to decrypt event with new key. Dropping encrypted event"))}));this.emit(t,this.getDataToEmit(s))}getDataToEmit(t){let e=Object(Wt.decode)(t);try{return JSON.parse(e)}catch(t){return e}}}class Gt extends St{constructor(t,e){super(),this.state="initialized",this.connection=null,this.key=t,this.options=e,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var n=_e.getNetwork();n.bind("online",(()=>{this.timeline.info({netinfo:"online"}),"connecting"!==this.state&&"unavailable"!==this.state||this.retryIn(0)})),n.bind("offline",(()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()})),this.updateStrategy()}connect(){this.connection||this.runner||(this.strategy.isSupported()?(this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()):this.updateState("failed"))}send(t){return!!this.connection&&this.connection.send(t)}send_event(t,e,n){return!!this.connection&&this.connection.send_event(t,e,n)}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var t=(e,n)=>{e?this.runner=this.strategy.connect(0,t):"error"===n.action?(this.emit("error",{type:"HandshakeError",error:n.error}),this.timeline.error({handshakeError:n.error})):(this.abortConnecting(),this.handshakeCallbacks[n.action](n))};this.runner=this.strategy.connect(0,t)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection&&this.abandonConnection().close()}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(t){this.timeline.info({action:"retry",delay:t}),t>0&&this.emit("connecting_in",Math.round(t/1e3)),this.retryTimer=new V(t||0,(()=>{this.disconnectInternally(),this.connect()}))}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new V(this.options.unavailableTimeout,(()=>{this.updateState("unavailable")}))}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new V(this.options.pongTimeout,(()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)}))}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new V(this.activityTimeout,(()=>{this.sendActivityCheck()})))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(t){return K({},t,{message:t=>{this.resetActivityCheck(),this.emit("message",t)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:t=>{this.emit("error",t)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(t){return K({},t,{connected:t=>{this.activityTimeout=Math.min(this.options.activityTimeout,t.activityTimeout,t.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(t.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let t=t=>e=>{e.error&&this.emit("error",{type:"WebSocketError",error:e.error}),t(e)};return{tls_only:t((()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)})),refused:t((()=>{this.disconnect()})),backoff:t((()=>{this.retryIn(1e3)})),retry:t((()=>{this.retryIn(0)}))}}setConnection(t){for(var e in this.connection=t,this.connectionCallbacks)this.connection.bind(e,this.connectionCallbacks[e]);this.resetActivityCheck()}abandonConnection(){if(this.connection){for(var t in this.stopActivityCheck(),this.connectionCallbacks)this.connection.unbind(t,this.connectionCallbacks[t]);var e=this.connection;return this.connection=null,e}}updateState(t,e){var n=this.state;if(this.state=t,n!==t){var i=t;"connected"===i&&(i+=" with new socket ID "+e.socket_id),at.debug("State changed",n+" -> "+i),this.timeline.info({state:t,params:e}),this.emit("state_change",{previous:n,current:t}),this.emit(t,e)}}shouldRetry(){return"connecting"===this.state||"connected"===this.state}}class Yt{constructor(){this.channels={}}add(t,e){return this.channels[t]||(this.channels[t]=function(t,e){if(0===t.indexOf("private-encrypted-")){if(e.config.nacl)return Zt.createEncryptedChannel(t,e,e.config.nacl);let n="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",i=x("encryptedChannelSupport");throw new L(`${n}. ${i}`)}if(0===t.indexOf("private-"))return Zt.createPrivateChannel(t,e);if(0===t.indexOf("presence-"))return Zt.createPresenceChannel(t,e);if(0===t.indexOf("#"))throw new R('Cannot create a channel with name "'+t+'".');return Zt.createChannel(t,e)}(t,e)),this.channels[t]}all(){return t=[],et(this.channels,(function(e){t.push(e)})),t;var t}find(t){return this.channels[t]}remove(t){var e=this.channels[t];return delete this.channels[t],e}disconnect(){et(this.channels,(function(t){t.disconnect()}))}}var Kt={createChannels:()=>new Yt,createConnectionManager:(t,e)=>new Gt(t,e),createChannel:(t,e)=>new Jt(t,e),createPrivateChannel:(t,e)=>new Ft(t,e),createPresenceChannel:(t,e)=>new Xt(t,e),createEncryptedChannel:(t,e,n)=>new Qt(t,e,n),createTimelineSender:(t,e)=>new Ht(t,e),createHandshake:(t,e)=>new Bt(t,e),createAssistantToTheTransportManager:(t,e,n)=>new Mt(t,e,n)},Zt=Kt;class te{constructor(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}getAssistant(t){return Zt.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class ee{constructor(t,e){this.strategies=t,this.loop=Boolean(e.loop),this.failFast=Boolean(e.failFast),this.timeout=e.timeout,this.timeoutLimit=e.timeoutLimit}isSupported(){return ht(this.strategies,Y.method("isSupported"))}connect(t,e){var n=this.strategies,i=0,s=this.timeout,r=null,o=(h,u)=>{u?e(null,u):(i+=1,this.loop&&(i%=n.length),i<n.length?(s&&(s*=2,this.timeoutLimit&&(s=Math.min(s,this.timeoutLimit))),r=this.tryStrategy(n[i],t,{timeout:s,failFast:this.failFast},o)):e(!0))};return r=this.tryStrategy(n[i],t,{timeout:s,failFast:this.failFast},o),{abort:function(){r.abort()},forceMinPriority:function(e){t=e,r&&r.forceMinPriority(e)}}}tryStrategy(t,e,n,i){var s=null,r=null;return n.timeout>0&&(s=new V(n.timeout,(function(){r.abort(),i(!0)}))),r=t.connect(e,(function(t,e){t&&s&&s.isRunning()&&!n.failFast||(s&&s.ensureAborted(),i(t,e))})),{abort:function(){s&&s.ensureAborted(),r.abort()},forceMinPriority:function(t){r.forceMinPriority(t)}}}}class ne{constructor(t){this.strategies=t}isSupported(){return ht(this.strategies,Y.method("isSupported"))}connect(t,e){return function(t,n){var i=st(t,(function(t,i,s,r){return t.connect(n,function(t,n){return function(i,s){n[t].error=i,i?function(t){return function(t,e){for(var n=0;n<t.length;n++)if(!e(t[n],n,t))return!1;return!0}(t,(function(t){return Boolean(t.error)}))}(n)&&e(!0):(it(n,(function(t){t.forceMinPriority(s.transport.priority)})),e(null,s))}}(i,r))}));return{abort:function(){it(i,ie)},forceMinPriority:function(t){it(i,(function(e){e.forceMinPriority(t)}))}}}(this.strategies,t)}}function ie(t){t.error||t.aborted||(t.abort(),t.aborted=!0)}class se{constructor(t,e,n){this.strategy=t,this.transports=e,this.ttl=n.ttl||18e5,this.usingTLS=n.useTLS,this.timeline=n.timeline}isSupported(){return this.strategy.isSupported()}connect(t,e){var n=this.usingTLS,i=function(t){var e=_e.getLocalStorage();if(e)try{var n=e[re(t)];if(n)return JSON.parse(n)}catch(e){oe(t)}return null}(n),s=i&&i.cacheSkipCount?i.cacheSkipCount:0,r=[this.strategy];if(i&&i.timestamp+this.ttl>=Y.now()){var o=this.transports[i.transport];o&&(["ws","wss"].includes(i.transport)||s>3?(this.timeline.info({cached:!0,transport:i.transport,latency:i.latency}),r.push(new ee([o],{timeout:2*i.latency+1e3,failFast:!0}))):s++)}var h=Y.now(),u=r.pop().connect(t,(function i(o,c){o?(oe(n),r.length>0?(h=Y.now(),u=r.pop().connect(t,i)):e(o)):(function(t,e,n,i){var s=_e.getLocalStorage();if(s)try{s[re(t)]=ct({timestamp:Y.now(),transport:e,latency:n,cacheSkipCount:i})}catch(t){}}(n,c.transport.name,Y.now()-h,s),e(null,c))}));return{abort:function(){u.abort()},forceMinPriority:function(e){t=e,u&&u.forceMinPriority(e)}}}}function re(t){return"pusherTransport"+(t?"TLS":"NonTLS")}function oe(t){var e=_e.getLocalStorage();if(e)try{delete e[re(t)]}catch(t){}}class he{constructor(t,{delay:e}){this.strategy=t,this.options={delay:e}}isSupported(){return this.strategy.isSupported()}connect(t,e){var n,i=this.strategy,s=new V(this.options.delay,(function(){n=i.connect(t,e)}));return{abort:function(){s.ensureAborted(),n&&n.abort()},forceMinPriority:function(e){t=e,n&&n.forceMinPriority(e)}}}}class ue{constructor(t,e,n){this.test=t,this.trueBranch=e,this.falseBranch=n}isSupported(){return(this.test()?this.trueBranch:this.falseBranch).isSupported()}connect(t,e){return(this.test()?this.trueBranch:this.falseBranch).connect(t,e)}}class ce{constructor(t){this.strategy=t}isSupported(){return this.strategy.isSupported()}connect(t,e){var n=this.strategy.connect(t,(function(t,i){i&&n.abort(),e(t,i)}));return n}}function ae(t){return function(){return t.isSupported()}}var le,fe={getRequest:function(t){var e=new window.XDomainRequest;return e.ontimeout=function(){t.emit("error",new I),t.close()},e.onerror=function(e){t.emit("error",e),t.close()},e.onprogress=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText)},e.onload=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText),t.emit("finished",200),t.close()},e},abortRequest:function(t){t.ontimeout=t.onerror=t.onprogress=t.onload=null,t.abort()}};class de extends St{constructor(t,e,n){super(),this.hooks=t,this.method=e,this.url=n}start(t){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},_e.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(t)}close(){this.unloader&&(_e.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(t,e){for(;;){var n=this.advanceBuffer(e);if(!n)break;this.emit("chunk",{status:t,data:n})}this.isBufferTooLong(e)&&this.emit("buffer_too_long")}advanceBuffer(t){var e=t.slice(this.position),n=e.indexOf("\n");return-1!==n?(this.position+=n+1,e.slice(0,n)):null}isBufferTooLong(t){return this.position===t.length&&t.length>262144}}!function(t){t[t.CONNECTING=0]="CONNECTING",t[t.OPEN=1]="OPEN",t[t.CLOSED=3]="CLOSED"}(le||(le={}));var ve=le,pe=1;function we(t){var e=-1===t.indexOf("?")?"?":"&";return t+e+"t="+ +new Date+"&n="+pe++}function be(t){return _e.randomInt(t)}var ye,ge=class{constructor(t,e){this.hooks=t,this.session=be(1e3)+"/"+function(){for(var t=[],e=0;e<8;e++)t.push(be(32).toString(32));return t.join("")}(),this.location=function(t){var e=/([^\?]*)\/*(\??.*)/.exec(t);return{base:e[1],queryString:e[2]}}(e),this.readyState=ve.CONNECTING,this.openStream()}send(t){return this.sendRaw(JSON.stringify([t]))}ping(){this.hooks.sendHeartbeat(this)}close(t,e){this.onClose(t,e,!0)}sendRaw(t){if(this.readyState!==ve.OPEN)return!1;try{return _e.createSocketRequest("POST",we((e=this.location,n=this.session,e.base+"/"+n+"/xhr_send"))).start(t),!0}catch(t){return!1}var e,n}reconnect(){this.closeStream(),this.openStream()}onClose(t,e,n){this.closeStream(),this.readyState=ve.CLOSED,this.onclose&&this.onclose({code:t,reason:e,wasClean:n})}onChunk(t){var e;if(200===t.status)switch(this.readyState===ve.OPEN&&this.onActivity(),t.data.slice(0,1)){case"o":e=JSON.parse(t.data.slice(1)||"{}"),this.onOpen(e);break;case"a":e=JSON.parse(t.data.slice(1)||"[]");for(var n=0;n<e.length;n++)this.onEvent(e[n]);break;case"m":e=JSON.parse(t.data.slice(1)||"null"),this.onEvent(e);break;case"h":this.hooks.onHeartbeat(this);break;case"c":e=JSON.parse(t.data.slice(1)||"[]"),this.onClose(e[0],e[1],!0)}}onOpen(t){var e,n;this.readyState===ve.CONNECTING?(t&&t.hostname&&(this.location.base=(e=t.hostname,(n=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(this.location.base))[1]+e+n[3])),this.readyState=ve.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(t){this.readyState===ve.OPEN&&this.onmessage&&this.onmessage({data:t})}onActivity(){this.onactivity&&this.onactivity()}onError(t){this.onerror&&this.onerror(t)}openStream(){this.stream=_e.createSocketRequest("POST",we(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",(t=>{this.onChunk(t)})),this.stream.bind("finished",(t=>{this.hooks.onFinished(this,t)})),this.stream.bind("buffer_too_long",(()=>{this.reconnect()}));try{this.stream.start()}catch(t){Y.defer((()=>{this.onError(t),this.onClose(1006,"Could not start streaming",!1)}))}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}},ke={getReceiveURL:function(t,e){return t.base+"/"+e+"/xhr_streaming"+t.queryString},onHeartbeat:function(t){t.sendRaw("[]")},sendHeartbeat:function(t){t.sendRaw("[]")},onFinished:function(t,e){t.onClose(1006,"Connection interrupted ("+e+")",!1)}},me={getReceiveURL:function(t,e){return t.base+"/"+e+"/xhr"+t.queryString},onHeartbeat:function(){},sendHeartbeat:function(t){t.sendRaw("[]")},onFinished:function(t,e){200===e?t.reconnect():t.onClose(1006,"Connection interrupted ("+e+")",!1)}},Se={getRequest:function(t){var e=new(_e.getXHRAPI());return e.onreadystatechange=e.onprogress=function(){switch(e.readyState){case 3:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText);break;case 4:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText),t.emit("finished",e.status),t.close()}},e},abortRequest:function(t){t.onreadystatechange=null,t.abort()}},_e={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:s,DependenciesReceivers:C,getDefaultStrategy:function(t,e,n){var i={};function s(e,s,r,o,h){var u=n(t,e,s,r,o,h);return i[e]=u,u}var r,o=Object.assign({},e,{hostNonTLS:t.wsHost+":"+t.wsPort,hostTLS:t.wsHost+":"+t.wssPort,httpPath:t.wsPath}),h=Object.assign({},o,{useTLS:!0}),u=Object.assign({},e,{hostNonTLS:t.httpHost+":"+t.httpPort,hostTLS:t.httpHost+":"+t.httpsPort,httpPath:t.httpPath}),c={loop:!0,timeout:15e3,timeoutLimit:6e4},a=new te({minPingDelay:1e4,maxPingDelay:t.activityTimeout}),l=new te({lives:2,minPingDelay:1e4,maxPingDelay:t.activityTimeout}),f=s("ws","ws",3,o,a),d=s("wss","ws",3,h,a),v=s("sockjs","sockjs",1,u),p=s("xhr_streaming","xhr_streaming",1,u,l),w=s("xdr_streaming","xdr_streaming",1,u,l),b=s("xhr_polling","xhr_polling",1,u),y=s("xdr_polling","xdr_polling",1,u),g=new ee([f],c),k=new ee([d],c),m=new ee([v],c),S=new ee([new ue(ae(p),p,w)],c),_=new ee([new ue(ae(b),b,y)],c),j=new ee([new ue(ae(S),new ne([S,new he(_,{delay:4e3})]),_)],c),C=new ue(ae(j),j,m);return r=new ne(e.useTLS?[g,new he(C,{delay:2e3})]:[g,new he(k,{delay:2e3}),new he(C,{delay:5e3})]),new se(new ce(new ue(ae(f),r,C)),i,{ttl:18e5,timeline:e.timeline,useTLS:e.useTLS})},Transports:Lt,transportConnectionInitializer:function(){var t=this;t.timeline.info(t.buildTimelineMessage({transport:t.name+(t.options.useTLS?"s":"")})),t.hooks.isInitialized()?t.changeState("initialized"):t.hooks.file?(t.changeState("initializing"),O.load(t.hooks.file,{useTLS:t.options.useTLS},(function(e,n){t.hooks.isInitialized()?(t.changeState("initialized"),n(!0)):(e&&t.onError(e),t.onClose(),n(!1))}))):t.onClose()},HTTPFactory:{createStreamingSocket(t){return this.createSocket(ke,t)},createPollingSocket(t){return this.createSocket(me,t)},createSocket:(t,e)=>new ge(t,e),createXHR(t,e){return this.createRequest(Se,t,e)},createRequest:(t,e,n)=>new de(t,e,n),createXDR:function(t,e){return this.createRequest(fe,t,e)}},TimelineTransport:vt,getXHRAPI:()=>window.XMLHttpRequest,getWebSocketAPI:()=>window.WebSocket||window.MozWebSocket,setup(t){window.Pusher=t;var e=()=>{this.onDocumentBody(t.ready)};window.JSON?e():O.load("json2",{},e)},getDocument:()=>document,getProtocol(){return this.getDocument().location.protocol},getAuthorizers:()=>({ajax:D,jsonp:lt}),onDocumentBody(t){document.body?t():setTimeout((()=>{this.onDocumentBody(t)}),0)},createJSONPRequest:(t,e)=>new dt(t,e),createScriptRequest:t=>new ft(t),getLocalStorage(){try{return window.localStorage}catch(t){return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){return new(this.getXHRAPI())},createMicrosoftXHR:()=>new ActiveXObject("Microsoft.XMLHTTP"),getNetwork:()=>Ut,createWebSocket(t){return new(this.getWebSocketAPI())(t)},createSocketRequest(t,e){if(this.isXHRSupported())return this.HTTPFactory.createXHR(t,e);if(this.isXDRSupported(0===e.indexOf("https:")))return this.HTTPFactory.createXDR(t,e);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var t=this.getXHRAPI();return Boolean(t)&&void 0!==(new t).withCredentials},isXDRSupported(t){var e=t?"https:":"http:",n=this.getProtocol();return Boolean(window.XDomainRequest)&&n===e},addUnloadListener(t){void 0!==window.addEventListener?window.addEventListener("unload",t,!1):void 0!==window.attachEvent&&window.attachEvent("onunload",t)},removeUnloadListener(t){void 0!==window.addEventListener?window.removeEventListener("unload",t,!1):void 0!==window.detachEvent&&window.detachEvent("onunload",t)},randomInt:t=>Math.floor((window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)*t)};!function(t){t[t.ERROR=3]="ERROR",t[t.INFO=6]="INFO",t[t.DEBUG=7]="DEBUG"}(ye||(ye={}));var je=ye;class Ce{constructor(t,e,n){this.key=t,this.session=e,this.events=[],this.options=n||{},this.sent=0,this.uniqueID=0}log(t,e){t<=this.options.level&&(this.events.push(K({},e,{timestamp:Y.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(t){this.log(je.ERROR,t)}info(t){this.log(je.INFO,t)}debug(t){this.log(je.DEBUG,t)}isEmpty(){return 0===this.events.length}send(t,e){var n=K({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],t(n,((t,n)=>{t||this.sent++,e&&e(t,n)})),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class Oe{constructor(t,e,n,i){this.name=t,this.priority=e,this.transport=n,this.options=i||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(t,e){if(!this.isSupported())return Ee(new M,e);if(this.priority<t)return Ee(new A,e);var n=!1,i=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),s=null,r=function(){i.unbind("initialized",r),i.connect()},o=function(){s=Zt.createHandshake(i,(function(t){n=!0,c(),e(null,t)}))},h=function(t){c(),e(t)},u=function(){var t;c(),t=ct(i),e(new N(t))},c=function(){i.unbind("initialized",r),i.unbind("open",o),i.unbind("error",h),i.unbind("closed",u)};return i.bind("initialized",r),i.bind("open",o),i.bind("error",h),i.bind("closed",u),i.initialize(),{abort:()=>{n||(c(),s?s.close():i.close())},forceMinPriority:t=>{n||this.priority<t&&(s?s.close():i.close())}}}}function Ee(t,e){return Y.defer((function(){e(t)})),{abort:function(){},forceMinPriority:function(){}}}const{Transports:Te}=_e;var xe=function(t,e,n,i,s,r){var o,h=Te[n];if(!h)throw new U(n);return t.enabledTransports&&-1===tt(t.enabledTransports,e)||t.disabledTransports&&-1!==tt(t.disabledTransports,e)?o=Pe:(s=Object.assign({ignoreNullOrigin:t.ignoreNullOrigin},s),o=new Oe(e,i,r?r.getAssistant(h):h,s)),o},Pe={isSupported:function(){return!1},connect:function(t,e){var n=Y.defer((function(){e(new M)}));return{abort:function(){n.ensureAborted()},forceMinPriority:function(){}}}};function Re(t){return t.httpHost?t.httpHost:t.cluster?`sockjs-${t.cluster}.pusher.com`:a}function Ie(t){return t.wsHost?t.wsHost:`ws-${t.cluster}.pusher.com`}function Ae(t){return"https:"===_e.getProtocol()||!1!==t.forceTLS}function Ne(t){return"enableStats"in t?t.enableStats:"disableStats"in t&&!t.disableStats}function Le(t){const e=Object.assign(Object.assign({},k),t.userAuthentication);return"customHandler"in e&&null!=e.customHandler?e.customHandler:(t=>{if(void 0===_e.getAuthorizers()[t.transport])throw`'${t.transport}' is not a recognized auth transport`;return(e,n)=>{const i=((t,e)=>{var n="socket_id="+encodeURIComponent(t.socketId);for(var i in e.params)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(e.params[i]);if(null!=e.paramsProvider){let t=e.paramsProvider();for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i])}return n})(e,t);_e.getAuthorizers()[t.transport](_e,i,t,T.UserAuthentication,n)}})(e)}function Ue(t,e){const n=function(t,e){let n;return"channelAuthorization"in t?n=Object.assign(Object.assign({},m),t.channelAuthorization):(n={transport:t.authTransport||w,endpoint:t.authEndpoint||p},"auth"in t&&("params"in t.auth&&(n.params=t.auth.params),"headers"in t.auth&&(n.headers=t.auth.headers)),"authorizer"in t&&(n.customHandler=((t,e,n)=>{const i={authTransport:e.transport,authEndpoint:e.endpoint,auth:{params:e.params,headers:e.headers}};return(e,s)=>{const r=t.channel(e.channelName);n(r,i).authorize(e.socketId,s)}})(e,n,t.authorizer))),n}(t,e);return"customHandler"in n&&null!=n.customHandler?n.customHandler:(t=>{if(void 0===_e.getAuthorizers()[t.transport])throw`'${t.transport}' is not a recognized auth transport`;return(e,n)=>{const i=((t,e)=>{var n="socket_id="+encodeURIComponent(t.socketId);for(var i in n+="&channel_name="+encodeURIComponent(t.channelName),e.params)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(e.params[i]);if(null!=e.paramsProvider){let t=e.paramsProvider();for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i])}return n})(e,t);_e.getAuthorizers()[t.transport](_e,i,t,T.ChannelAuthorization,n)}})(n)}class Me extends St{constructor(t){super((function(t){at.debug(`No callbacks on watchlist events for ${t}`)})),this.pusher=t,this.bindWatchlistInternalEvent()}handleEvent(t){t.data.events.forEach((t=>{this.emit(t.name,t)}))}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",(t=>{"pusher_internal:watchlist_events"===t.event&&this.handleEvent(t)}))}}class $e extends St{constructor(t){super((function(t){at.debug("No callbacks on user for "+t)})),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(t,e)=>{if(t)return at.warn(`Error during signin: ${t}`),void this._cleanup();this.pusher.send_event("pusher:signin",{auth:e.auth,user_data:e.user_data})},this.pusher=t,this.pusher.connection.bind("state_change",(({previous:t,current:e})=>{"connected"!==t&&"connected"===e&&this._signin(),"connected"===t&&"connected"!==e&&(this._cleanup(),this._newSigninPromiseIfNeeded())})),this.watchlist=new Me(t),this.pusher.connection.bind("message",(t=>{"pusher:signin_success"===t.event&&this._onSigninSuccess(t.data),this.serverToUserChannel&&this.serverToUserChannel.name===t.channel&&this.serverToUserChannel.handleEvent(t)}))}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),"connected"===this.pusher.connection.state&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(t){try{this.user_data=JSON.parse(t.user_data)}catch(e){return at.error(`Failed parsing user data after signin: ${t.user_data}`),void this._cleanup()}if("string"!=typeof this.user_data.id||""===this.user_data.id)return at.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),void this._cleanup();this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){this.serverToUserChannel=new Jt(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global(((t,e)=>{0!==t.indexOf("pusher_internal:")&&0!==t.indexOf("pusher:")&&this.emit(t,e)})),(t=>{t.subscriptionPending&&t.subscriptionCancelled?t.reinstateSubscription():t.subscriptionPending||"connected"!==this.pusher.connection.state||t.subscribe()})(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested)return;if(this.signinDonePromise&&!this.signinDonePromise.done)return;const{promise:t,resolve:e}=function(){let t,e;return{promise:new Promise(((n,i)=>{t=n,e=i})),resolve:t,reject:e}}();t.done=!1;const n=()=>{t.done=!0};t.then(n).catch(n),this.signinDonePromise=t,this._signinDoneResolve=e}}class De{static ready(){De.isReady=!0;for(var t=0,e=De.instances.length;t<e;t++)De.instances[t].connect()}static getClientFeatures(){return nt(ot({ws:_e.Transports.ws},(function(t){return t.isSupported({})})))}constructor(t,e){!function(t){if(null==t)throw"You must pass your app key when you instantiate Pusher."}(t),function(t){if(null==t)throw"You must pass an options object";if(null==t.cluster)throw"Options object must provide a cluster";"disableStats"in t&&at.warn("The disableStats option is deprecated in favor of enableStats")}(e),this.key=t,this.config=function(t,e){let n={activityTimeout:t.activityTimeout||b,cluster:t.cluster,httpPath:t.httpPath||d,httpPort:t.httpPort||l,httpsPort:t.httpsPort||f,pongTimeout:t.pongTimeout||y,statsHost:t.statsHost||v,unavailableTimeout:t.unavailableTimeout||g,wsPath:t.wsPath||c,wsPort:t.wsPort||h,wssPort:t.wssPort||u,enableStats:Ne(t),httpHost:Re(t),useTLS:Ae(t),wsHost:Ie(t),userAuthenticator:Le(t),channelAuthorizer:Ue(t,e)};return"disabledTransports"in t&&(n.disabledTransports=t.disabledTransports),"enabledTransports"in t&&(n.enabledTransports=t.enabledTransports),"ignoreNullOrigin"in t&&(n.ignoreNullOrigin=t.ignoreNullOrigin),"timelineParams"in t&&(n.timelineParams=t.timelineParams),"nacl"in t&&(n.nacl=t.nacl),n}(e,this),this.channels=Zt.createChannels(),this.global_emitter=new St,this.sessionID=_e.randomInt(1e9),this.timeline=new Ce(this.key,this.sessionID,{cluster:this.config.cluster,features:De.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:je.INFO,version:r}),this.config.enableStats&&(this.timelineSender=Zt.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+_e.TimelineTransport.name})),this.connection=Zt.createConnectionManager(this.key,{getStrategy:t=>_e.getDefaultStrategy(this.config,t,xe),timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:Boolean(this.config.useTLS)}),this.connection.bind("connected",(()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())})),this.connection.bind("message",(t=>{var e=0===t.event.indexOf("pusher_internal:");if(t.channel){var n=this.channel(t.channel);n&&n.handleEvent(t)}e||this.global_emitter.emit(t.event,t.data)})),this.connection.bind("connecting",(()=>{this.channels.disconnect()})),this.connection.bind("disconnected",(()=>{this.channels.disconnect()})),this.connection.bind("error",(t=>{at.warn(t)})),De.instances.push(this),this.timeline.info({instances:De.instances.length}),this.user=new $e(this),De.isReady&&this.connect()}channel(t){return this.channels.find(t)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var t=this.connection.isUsingTLS(),e=this.timelineSender;this.timelineSenderTimer=new Q(6e4,(function(){e.send(t)}))}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(t,e,n){return this.global_emitter.bind(t,e,n),this}unbind(t,e,n){return this.global_emitter.unbind(t,e,n),this}bind_global(t){return this.global_emitter.bind_global(t),this}unbind_global(t){return this.global_emitter.unbind_global(t),this}unbind_all(t){return this.global_emitter.unbind_all(),this}subscribeAll(){var t;for(t in this.channels.channels)this.channels.channels.hasOwnProperty(t)&&this.subscribe(t)}subscribe(t){var e=this.channels.add(t,this);return e.subscriptionPending&&e.subscriptionCancelled?e.reinstateSubscription():e.subscriptionPending||"connected"!==this.connection.state||e.subscribe(),e}unsubscribe(t){var e=this.channels.find(t);e&&e.subscriptionPending?e.cancelSubscription():(e=this.channels.remove(t))&&e.subscribed&&e.unsubscribe()}send_event(t,e,n){return this.connection.send_event(t,e,n)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}De.instances=[],De.isReady=!1,De.logToConsole=!1,De.Runtime=_e,De.ScriptReceivers=_e.ScriptReceivers,De.DependenciesReceivers=_e.DependenciesReceivers,De.auth_callbacks=_e.auth_callbacks;var ze=e.default=De;_e.setup(De)}])},N.exports=A());
|
|
1
|
+
import{E as t}from"./p-nb3MHK7A.js";var e={endpoints:{operations:"/operations/",address:"/addresses/",addressSearch:"/addresses/search/",translations:"/translations/",queryCustomer:"/customer/data/",customerAssets:"/customer/assets/",productComparison:"/v2/sac/product-data",catalogOffers:"/catalog/offers/",createCallCenterTask:"/tasks/create-callcenter-task/",componentData:"/web-components/data/",tvPlatformChannels:"/tv/channels/platform/",tvPackages:"/tv/packages/",metastoreProducts:"/metastore/products",cloudConfigurator:"/metastore/cloud-calculator-fields",serviceAvailabilityServices:"/sac/available-services",b2bConfigurator:"/metastore/b2b/configurator",assemblerScenario:"/sac/assembler"},testing:{baseUrl:"https://tst-gateway.tet.lv/api"},staging:{baseUrl:"https://uat-gateway.tet.lv/api"},production:{baseUrl:"https://gateway.tet.lv/api"}};const n=e.endpoints,i=e[t.environment]??{},s=Object.keys(n??[]).reduce(((t,e)=>({...t,[e]:`${i.baseUrl}${n[e]}`})),{})??{};class r{url;options;data;errorFallbackValue;defaultOptions={mode:"cors"};setUrl(t){return this.url=t,this}setOptions(t){return this.options=t,this}setData(t){return this.data=t,this}setErrorFallbackValue(t){return this.errorFallbackValue=t,this}execute(t=!1){return fetch(this.url,{...this.defaultOptions,...this.options,body:JSON.stringify(this.data)}).then((async e=>t?e:(await e.json())?.data)).catch((t=>{if(void 0!==this.errorFallbackValue)return this.errorFallbackValue;throw t}))}}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){return e&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(){return c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},c.apply(this,arguments)}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=l(t);if(e){var s=l(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}var v=function(){function t(){h(this,t)}return u(t,[{key:"listenForWhisper",value:function(t,e){return this.listen(".client-"+t,e)}},{key:"notification",value:function(t){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",t)}},{key:"stopListeningForWhisper",value:function(t,e){return this.stopListening(".client-"+t,e)}}]),t}(),p=function(){function t(e){h(this,t),this.namespace=e}return u(t,[{key:"format",value:function(t){return[".","\\"].includes(t.charAt(0))?t.substring(1):(this.namespace&&(t=this.namespace+"."+t),t.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(t){this.namespace=t}}]),t}(),w=function(){a(e,v);var t=d(e);function e(n,i,s){var r;return h(this,e),(r=t.call(this)).name=i,r.pusher=n,r.options=s,r.eventFormatter=new p(r.options.namespace),r.subscribe(),r}return u(e,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(t,e){return this.on(this.eventFormatter.format(t),e),this}},{key:"listenToAll",value:function(t){var e=this;return this.subscription.bind_global((function(n,i){if(!n.startsWith("pusher:")){var s=e.options.namespace.replace(/\./g,"\\"),r=n.startsWith(s)?n.substring(s.length+1):"."+n;t(r,i)}})),this}},{key:"stopListening",value:function(t,e){return e?this.subscription.unbind(this.eventFormatter.format(t),e):this.subscription.unbind(this.eventFormatter.format(t)),this}},{key:"stopListeningToAll",value:function(t){return t?this.subscription.unbind_global(t):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(t){return this.on("pusher:subscription_succeeded",(function(){t()})),this}},{key:"error",value:function(t){return this.on("pusher:subscription_error",(function(e){t(e)})),this}},{key:"on",value:function(t,e){return this.subscription.bind(t,e),this}}]),e}(),b=function(){a(e,w);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}}]),e}(),y=function(){a(e,w);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}}]),e}(),g=function(){a(e,w);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"here",value:function(t){return this.on("pusher:subscription_succeeded",(function(e){t(Object.keys(e.members).map((function(t){return e.members[t]})))})),this}},{key:"joining",value:function(t){return this.on("pusher:member_added",(function(e){t(e.info)})),this}},{key:"whisper",value:function(t,e){return this.pusher.channels.channels[this.name].trigger("client-".concat(t),e),this}},{key:"leaving",value:function(t){return this.on("pusher:member_removed",(function(e){t(e.info)})),this}}]),e}(),k=function(){a(e,v);var t=d(e);function e(n,i,s){var r;return h(this,e),(r=t.call(this)).events={},r.listeners={},r.name=i,r.socket=n,r.options=s,r.eventFormatter=new p(r.options.namespace),r.subscribe(),r}return u(e,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(t,e){return this.on(this.eventFormatter.format(t),e),this}},{key:"stopListening",value:function(t,e){return this.unbindEvent(this.eventFormatter.format(t),e),this}},{key:"subscribed",value:function(t){return this.on("connect",(function(e){t(e)})),this}},{key:"error",value:function(){return this}},{key:"on",value:function(t,e){var n=this;return this.listeners[t]=this.listeners[t]||[],this.events[t]||(this.events[t]=function(e,i){n.name===e&&n.listeners[t]&&n.listeners[t].forEach((function(t){return t(i)}))},this.socket.on(t,this.events[t])),this.listeners[t].push(e),this}},{key:"unbind",value:function(){var t=this;Object.keys(this.events).forEach((function(e){t.unbindEvent(e)}))}},{key:"unbindEvent",value:function(t,e){this.listeners[t]=this.listeners[t]||[],e&&(this.listeners[t]=this.listeners[t].filter((function(t){return t!==e}))),e&&0!==this.listeners[t].length||(this.events[t]&&(this.socket.removeListener(t,this.events[t]),delete this.events[t]),delete this.listeners[t])}}]),e}(),m=function(){a(e,k);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(t,e){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(t),data:e}),this}}]),e}(),S=function(){a(e,m);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"here",value:function(t){return this.on("presence:subscribed",(function(e){t(e.map((function(t){return t.user_info})))})),this}},{key:"joining",value:function(t){return this.on("presence:joining",(function(e){return t(e.user_info)})),this}},{key:"whisper",value:function(t,e){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(t),data:e}),this}},{key:"leaving",value:function(t){return this.on("presence:leaving",(function(e){return t(e.user_info)})),this}}]),e}(),_=function(){a(e,v);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(){return this}},{key:"listenToAll",value:function(){return this}},{key:"stopListening",value:function(){return this}},{key:"subscribed",value:function(){return this}},{key:"error",value:function(){return this}},{key:"on",value:function(){return this}}]),e}(),j=function(){a(e,_);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"whisper",value:function(){return this}}]),e}(),C=function(){a(e,_);var t=d(e);function e(){return h(this,e),t.apply(this,arguments)}return u(e,[{key:"here",value:function(){return this}},{key:"joining",value:function(){return this}},{key:"whisper",value:function(){return this}},{key:"leaving",value:function(){return this}}]),e}(),O=function(){function t(e){h(this,t),this._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},broadcaster:"pusher",csrfToken:null,bearerToken:null,host:null,key:null,namespace:"App.Events"},this.setOptions(e),this.connect()}return u(t,[{key:"setOptions",value:function(t){this.options=c(this._defaultOptions,t);var e=this.csrfToken();return e&&(this.options.auth.headers["X-CSRF-TOKEN"]=e,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=e),(e=this.options.bearerToken)&&(this.options.auth.headers.Authorization="Bearer "+e,this.options.userAuthentication.headers.Authorization="Bearer "+e),t}},{key:"csrfToken",value:function(){var t;return"undefined"!=typeof window&&window.Laravel&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:"undefined"!=typeof document&&"function"==typeof document.querySelector&&(t=document.querySelector('meta[name="csrf-token"]'))?t.getAttribute("content"):null}}]),t}(),E=function(){a(e,O);var t=d(e);function e(){var n;return h(this,e),(n=t.apply(this,arguments)).channels={},n}return u(e,[{key:"connect",value:function(){this.pusher=void 0!==this.options.client?this.options.client:this.options.Pusher?new this.options.Pusher(this.options.key,this.options):new Pusher(this.options.key,this.options)}},{key:"signin",value:function(){this.pusher.signin()}},{key:"listen",value:function(t,e,n){return this.channel(t).listen(e,n)}},{key:"channel",value:function(t){return this.channels[t]||(this.channels[t]=new w(this.pusher,t,this.options)),this.channels[t]}},{key:"privateChannel",value:function(t){return this.channels["private-"+t]||(this.channels["private-"+t]=new b(this.pusher,"private-"+t,this.options)),this.channels["private-"+t]}},{key:"encryptedPrivateChannel",value:function(t){return this.channels["private-encrypted-"+t]||(this.channels["private-encrypted-"+t]=new y(this.pusher,"private-encrypted-"+t,this.options)),this.channels["private-encrypted-"+t]}},{key:"presenceChannel",value:function(t){return this.channels["presence-"+t]||(this.channels["presence-"+t]=new g(this.pusher,"presence-"+t,this.options)),this.channels["presence-"+t]}},{key:"leave",value:function(t){var e=this;[t,"private-"+t,"private-encrypted-"+t,"presence-"+t].forEach((function(t){e.leaveChannel(t)}))}},{key:"leaveChannel",value:function(t){this.channels[t]&&(this.channels[t].unsubscribe(),delete this.channels[t])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}]),e}(),T=function(){a(e,O);var t=d(e);function e(){var n;return h(this,e),(n=t.apply(this,arguments)).channels={},n}return u(e,[{key:"connect",value:function(){var t=this,e=this.getSocketIO();return this.socket=e(this.options.host,this.options),this.socket.on("reconnect",(function(){Object.values(t.channels).forEach((function(t){t.subscribe()}))})),this.socket}},{key:"getSocketIO",value:function(){if(void 0!==this.options.client)return this.options.client;if("undefined"!=typeof io)return io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(t,e,n){return this.channel(t).listen(e,n)}},{key:"channel",value:function(t){return this.channels[t]||(this.channels[t]=new k(this.socket,t,this.options)),this.channels[t]}},{key:"privateChannel",value:function(t){return this.channels["private-"+t]||(this.channels["private-"+t]=new m(this.socket,"private-"+t,this.options)),this.channels["private-"+t]}},{key:"presenceChannel",value:function(t){return this.channels["presence-"+t]||(this.channels["presence-"+t]=new S(this.socket,"presence-"+t,this.options)),this.channels["presence-"+t]}},{key:"leave",value:function(t){var e=this;[t,"private-"+t,"presence-"+t].forEach((function(t){e.leaveChannel(t)}))}},{key:"leaveChannel",value:function(t){this.channels[t]&&(this.channels[t].unsubscribe(),delete this.channels[t])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}]),e}(),x=function(){a(e,O);var t=d(e);function e(){var n;return h(this,e),(n=t.apply(this,arguments)).channels={},n}return u(e,[{key:"connect",value:function(){}},{key:"listen",value:function(){return new _}},{key:"channel",value:function(){return new _}},{key:"privateChannel",value:function(){return new j}},{key:"encryptedPrivateChannel",value:function(){return new j}},{key:"presenceChannel",value:function(){return new C}},{key:"leave",value:function(){}},{key:"leaveChannel",value:function(){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}]),e}(),P=function(){function t(e){h(this,t),this.options=e,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return u(t,[{key:"channel",value:function(t){return this.connector.channel(t)}},{key:"connect",value:function(){if("reverb"==this.options.broadcaster)this.connector=new E(c(c({},this.options),{cluster:""}));else if("pusher"==this.options.broadcaster)this.connector=new E(this.options);else if("socket.io"==this.options.broadcaster)this.connector=new T(this.options);else if("null"==this.options.broadcaster)this.connector=new x(this.options);else{if("function"!=typeof this.options.broadcaster)throw new Error("Broadcaster ".concat(o(this.options.broadcaster)," ").concat(this.options.broadcaster," is not supported."));this.connector=new this.options.broadcaster(this.options)}}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(t){return this.connector.presenceChannel(t)}},{key:"leave",value:function(t){this.connector.leave(t)}},{key:"leaveChannel",value:function(t){this.connector.leaveChannel(t)}},{key:"leaveAllChannels",value:function(){for(var t in this.connector.channels)this.leaveChannel(t)}},{key:"listen",value:function(t,e,n){return this.connector.listen(t,e,n)}},{key:"private",value:function(t){return this.connector.privateChannel(t)}},{key:"encryptedPrivate",value:function(t){return this.connector.encryptedPrivateChannel(t)}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){"function"==typeof Vue&&Vue.http&&this.registerVueRequestInterceptor(),"function"==typeof axios&&this.registerAxiosRequestInterceptor(),"function"==typeof jQuery&&this.registerjQueryAjaxSetup(),"object"===("undefined"==typeof Turbo?"undefined":o(Turbo))&&this.registerTurboRequestInterceptor()}},{key:"registerVueRequestInterceptor",value:function(){var t=this;Vue.http.interceptors.push((function(e,n){t.socketId()&&e.headers.set("X-Socket-ID",t.socketId()),n()}))}},{key:"registerAxiosRequestInterceptor",value:function(){var t=this;axios.interceptors.request.use((function(e){return t.socketId()&&(e.headers["X-Socket-Id"]=t.socketId()),e}))}},{key:"registerjQueryAjaxSetup",value:function(){var t=this;void 0!==jQuery.ajax&&jQuery.ajaxPrefilter((function(e,n,i){t.socketId()&&i.setRequestHeader("X-Socket-Id",t.socketId())}))}},{key:"registerTurboRequestInterceptor",value:function(){var t=this;document.addEventListener("turbo:before-fetch-request",(function(e){e.detail.fetchOptions.headers["X-Socket-Id"]=t.socketId()}))}}]),t}();function R(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var I,A,N={exports:{}},L=I?N.exports:(I=1,window,A=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var s=e[i]={i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(i,s,function(e){return t[e]}.bind(null,s));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e){var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},n(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0});var s=256,r=function(){function t(t){void 0===t&&(t="="),this._paddingCharacter=t}return t.prototype.encodedLength=function(t){return this._paddingCharacter?(t+2)/3*4|0:(8*t+5)/6|0},t.prototype.encode=function(t){for(var e="",n=0;n<t.length-2;n+=3)e+=this._encodeByte((i=t[n]<<16|t[n+1]<<8|t[n+2])>>>18&63),e+=this._encodeByte(i>>>12&63),e+=this._encodeByte(i>>>6&63),e+=this._encodeByte(i>>>0&63);var i,s=t.length-n;return s>0&&(e+=this._encodeByte((i=t[n]<<16|(2===s?t[n+1]<<8:0))>>>18&63),e+=this._encodeByte(i>>>12&63),e+=2===s?this._encodeByte(i>>>6&63):this._paddingCharacter||"",e+=this._paddingCharacter||""),e},t.prototype.maxDecodedLength=function(t){return this._paddingCharacter?t/4*3|0:(6*t+7)/8|0},t.prototype.decodedLength=function(t){return this.maxDecodedLength(t.length-this._getPaddingLength(t))},t.prototype.decode=function(t){if(0===t.length)return new Uint8Array(0);for(var e=this._getPaddingLength(t),n=t.length-e,i=new Uint8Array(this.maxDecodedLength(n)),r=0,o=0,h=0,u=0,c=0,a=0,l=0;o<n-4;o+=4)u=this._decodeChar(t.charCodeAt(o+0)),c=this._decodeChar(t.charCodeAt(o+1)),a=this._decodeChar(t.charCodeAt(o+2)),l=this._decodeChar(t.charCodeAt(o+3)),i[r++]=u<<2|c>>>4,i[r++]=c<<4|a>>>2,i[r++]=a<<6|l,h|=u&s,h|=c&s,h|=a&s,h|=l&s;if(o<n-1&&(u=this._decodeChar(t.charCodeAt(o)),c=this._decodeChar(t.charCodeAt(o+1)),i[r++]=u<<2|c>>>4,h|=u&s,h|=c&s),o<n-2&&(a=this._decodeChar(t.charCodeAt(o+2)),i[r++]=c<<4|a>>>2,h|=a&s),o<n-3&&(l=this._decodeChar(t.charCodeAt(o+3)),i[r++]=a<<6|l,h|=l&s),0!==h)throw new Error("Base64Coder: incorrect characters for decoding");return i},t.prototype._encodeByte=function(t){var e=t;return e+=65,e+=25-t>>>8&6,e+=51-t>>>8&-75,e+=61-t>>>8&-15,e+=62-t>>>8&3,String.fromCharCode(e)},t.prototype._decodeChar=function(t){var e=s;return e+=(42-t&t-44)>>>8&-256+t-43+62,e+=(46-t&t-48)>>>8&-256+t-47+63,e+=(47-t&t-58)>>>8&-256+t-48+52,(e+=(64-t&t-91)>>>8&-256+t-65+0)+((96-t&t-123)>>>8&-256+t-97+26)},t.prototype._getPaddingLength=function(t){var e=0;if(this._paddingCharacter){for(var n=t.length-1;n>=0&&t[n]===this._paddingCharacter;n--)e++;if(t.length<4||e>2)throw new Error("Base64Coder: incorrect padding")}return e},t}();e.Coder=r;var o=new r;e.encode=function(t){return o.encode(t)},e.decode=function(t){return o.decode(t)};var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype._encodeByte=function(t){var e=t;return e+=65,e+=25-t>>>8&6,e+=51-t>>>8&-75,e+=61-t>>>8&-13,e+=62-t>>>8&49,String.fromCharCode(e)},e.prototype._decodeChar=function(t){var e=s;return e+=(44-t&t-46)>>>8&-256+t-45+62,e+=(94-t&t-96)>>>8&-256+t-95+63,e+=(47-t&t-58)>>>8&-256+t-48+52,(e+=(64-t&t-91)>>>8&-256+t-65+0)+((96-t&t-123)>>>8&-256+t-97+26)},e}(r);e.URLSafeCoder=h;var u=new h;e.encodeURLSafe=function(t){return u.encode(t)},e.decodeURLSafe=function(t){return u.decode(t)},e.encodedLength=function(t){return o.encodedLength(t)},e.maxDecodedLength=function(t){return o.maxDecodedLength(t)},e.decodedLength=function(t){return o.decodedLength(t)}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n="utf8: invalid string",i="utf8: invalid source encoding";function s(t){for(var e=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);if(s<128)e+=1;else if(s<2048)e+=2;else if(s<55296)e+=3;else{if(!(s<=57343))throw new Error(n);if(i>=t.length-1)throw new Error(n);i++,e+=4}}return e}e.encode=function(t){for(var e=new Uint8Array(s(t)),n=0,i=0;i<t.length;i++){var r=t.charCodeAt(i);r<128?e[n++]=r:r<2048?(e[n++]=192|r>>6,e[n++]=128|63&r):r<55296?(e[n++]=224|r>>12,e[n++]=128|r>>6&63,e[n++]=128|63&r):(i++,r=(1023&r)<<10,r|=1023&t.charCodeAt(i),e[n++]=240|(r+=65536)>>18,e[n++]=128|r>>12&63,e[n++]=128|r>>6&63,e[n++]=128|63&r)}return e},e.encodedLength=s,e.decode=function(t){for(var e=[],n=0;n<t.length;n++){var s=t[n];if(128&s){var r=void 0;if(s<224){if(n>=t.length)throw new Error(i);if(128!=(192&(o=t[++n])))throw new Error(i);s=(31&s)<<6|63&o,r=128}else if(s<240){if(n>=t.length-1)throw new Error(i);var o=t[++n],h=t[++n];if(128!=(192&o)||128!=(192&h))throw new Error(i);s=(15&s)<<12|(63&o)<<6|63&h,r=2048}else{if(!(s<248))throw new Error(i);if(n>=t.length-2)throw new Error(i);o=t[++n],h=t[++n];var u=t[++n];if(128!=(192&o)||128!=(192&h)||128!=(192&u))throw new Error(i);s=(15&s)<<18|(63&o)<<12|(63&h)<<6|63&u,r=65536}if(s<r||s>=55296&&s<=57343)throw new Error(i);if(s>=65536){if(s>1114111)throw new Error(i);s-=65536,e.push(String.fromCharCode(55296|s>>10)),s=56320|1023&s}}e.push(String.fromCharCode(s))}return e.join("")}},function(t,e,n){t.exports=n(3).default},function(t,e,n){n.r(e);class i{constructor(t,e){this.lastId=0,this.prefix=t,this.name=e}create(t){this.lastId++;var e=this.lastId,n=this.prefix+e,i=this.name+"["+e+"]",s=!1,r=function(){s||(t.apply(null,arguments),s=!0)};return this[e]=r,{number:e,id:n,name:i,callback:r}}remove(t){delete this[t.number]}}var s=new i("_pusher_script_","Pusher.ScriptReceivers"),r="8.3.0",o=7,h=80,u=443,c="",a="sockjs.pusher.com",l=80,f=443,d="/pusher",v="stats.pusher.com",p="/pusher/auth",w="ajax",b=12e4,y=3e4,g=1e4,k={endpoint:"/pusher/user-auth",transport:"ajax"},m={endpoint:"/pusher/auth",transport:"ajax"},S="http://js.pusher.com",_="https://js.pusher.com",j="",C=new i("_pusher_dependencies","Pusher.DependenciesReceivers"),O=new class{constructor(t){this.options=t,this.receivers=t.receivers||s,this.loading={}}load(t,e,n){var i=this;if(i.loading[t]&&i.loading[t].length>0)i.loading[t].push(n);else{i.loading[t]=[n];var s=_e.createScriptRequest(i.getPath(t,e)),r=i.receivers.create((function(e){if(i.receivers.remove(r),i.loading[t]){var n=i.loading[t];delete i.loading[t];for(var o=function(t){t||s.cleanup()},h=0;h<n.length;h++)n[h](e,o)}}));s.send(r)}}getRoot(t){var e=_e.getDocument().location.protocol;return(t&&t.useTLS||"https:"===e?this.options.cdn_https:this.options.cdn_http).replace(/\/*$/,"")+"/"+this.options.version}getPath(t,e){return this.getRoot(e)+"/"+t+this.options.suffix+".js"}}({cdn_http:S,cdn_https:_,version:r,suffix:j,receivers:C});const E={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}};var T,x=function(t){const e=E.urls[t];if(!e)return"";let n;return e.fullUrl?n=e.fullUrl:e.path&&(n=E.baseUrl+e.path),n?`See: ${n}`:""};!function(t){t.UserAuthentication="user-authentication",t.ChannelAuthorization="channel-authorization"}(T||(T={}));class P extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class R extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class I extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class A extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class N extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class L extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class U extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class M extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class $ extends Error{constructor(t,e){super(e),this.status=t,Object.setPrototypeOf(this,new.target.prototype)}}var D=function(t,e,n,i,s){const r=_e.createXHR();for(var o in r.open("POST",n.endpoint,!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.headers)r.setRequestHeader(o,n.headers[o]);if(null!=n.headersProvider){let t=n.headersProvider();for(var o in t)r.setRequestHeader(o,t[o])}return r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status){let t,e=!1;try{t=JSON.parse(r.responseText),e=!0}catch(t){s(new $(200,`JSON returned from ${i.toString()} endpoint was invalid, yet status code was 200. Data was: ${r.responseText}`),null)}e&&s(null,t)}else{let t="";switch(i){case T.UserAuthentication:t=x("authenticationEndpoint");break;case T.ChannelAuthorization:t=`Clients must be authorized to join private or presence channels. ${x("authorizationEndpoint")}`}s(new $(r.status,`Unable to retrieve auth string from ${i.toString()} endpoint - received status: ${r.status} from ${n.endpoint}. ${t}`),null)}},r.send(e),r},z=String.fromCharCode,H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",B=function(t){var e=t.charCodeAt(0);return e<128?t:e<2048?z(192|e>>>6)+z(128|63&e):z(224|e>>>12&15)+z(128|e>>>6&63)+z(128|63&e)},J=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[H.charAt(n>>>18),H.charAt(n>>>12&63),e>=2?"=":H.charAt(n>>>6&63),e>=1?"=":H.charAt(63&n)].join("")},F=window.btoa||function(t){return t.replace(/[\s\S]{1,3}/g,J)},q=class{constructor(t,e,n,i){this.clear=e,this.timer=t((()=>{this.timer&&(this.timer=i(this.timer))}),n)}isRunning(){return null!==this.timer}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}};function X(t){window.clearTimeout(t)}function W(t){window.clearInterval(t)}class V extends q{constructor(t,e){super(setTimeout,X,t,(function(){return e(),null}))}}class Q extends q{constructor(t,e){super(setInterval,W,t,(function(t){return e(),t}))}}var G={now:()=>Date.now?Date.now():(new Date).valueOf(),defer:t=>new V(0,t),method(t,...e){var n=Array.prototype.slice.call(arguments,1);return function(e){return e[t].apply(e,n.concat(arguments))}}},Y=G;function K(t,...e){for(var n=0;n<e.length;n++){var i=e[n];for(var s in i)t[s]=i[s]&&i[s].constructor&&i[s].constructor===Object?K(t[s]||{},i[s]):i[s]}return t}function Z(){for(var t=["Pusher"],e=0;e<arguments.length;e++)t.push("string"==typeof arguments[e]?arguments[e]:ct(arguments[e]));return t.join(" : ")}function tt(t,e){var n=Array.prototype.indexOf;if(null===t)return-1;if(n&&t.indexOf===n)return t.indexOf(e);for(var i=0,s=t.length;i<s;i++)if(t[i]===e)return i;return-1}function et(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(t[n],n,t)}function nt(t){var e=[];return et(t,(function(t,n){e.push(n)})),e}function it(t,e,n){for(var i=0;i<t.length;i++)e.call(n||window,t[i],i,t)}function st(t,e){for(var n=[],i=0;i<t.length;i++)n.push(e(t[i],i,t,n));return n}function rt(t,e){e=e||function(t){return!!t};for(var n=[],i=0;i<t.length;i++)e(t[i],i,t,n)&&n.push(t[i]);return n}function ot(t,e){var n={};return et(t,(function(i,s){(e&&e(i,s,t,n)||Boolean(i))&&(n[s]=i)})),n}function ht(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return!0;return!1}function ut(t){return e=function(t){return"object"==typeof t&&(t=ct(t)),encodeURIComponent((e=t.toString(),F(e.replace(/[^\x00-\x7F]/g,B))));var e},n={},et(t,(function(t,i){n[i]=e(t)})),n;var e,n}function ct(t){try{return JSON.stringify(t)}catch(i){return JSON.stringify((e=[],n=[],function t(i,s){var r,o,h;switch(typeof i){case"object":if(!i)return null;for(r=0;r<e.length;r+=1)if(e[r]===i)return{$ref:n[r]};if(e.push(i),n.push(s),"[object Array]"===Object.prototype.toString.apply(i))for(h=[],r=0;r<i.length;r+=1)h[r]=t(i[r],s+"["+r+"]");else for(o in h={},i)Object.prototype.hasOwnProperty.call(i,o)&&(h[o]=t(i[o],s+"["+JSON.stringify(o)+"]"));return h;case"number":case"string":case"boolean":return i}}(t,"$")))}var e,n}var at=new class{constructor(){this.globalLog=t=>{window.console&&window.console.log&&window.console.log(t)}}debug(...t){this.log(this.globalLog,t)}warn(...t){this.log(this.globalLogWarn,t)}error(...t){this.log(this.globalLogError,t)}globalLogWarn(t){window.console&&window.console.warn?window.console.warn(t):this.globalLog(t)}globalLogError(t){window.console&&window.console.error?window.console.error(t):this.globalLogWarn(t)}log(t,...e){var n=Z.apply(this,arguments);ze.log?ze.log(n):ze.logToConsole&&t.bind(this)(n)}},lt=function(t,e,n,i,s){void 0===n.headers&&null==n.headersProvider||at.warn(`To send headers with the ${i.toString()} request, you must use AJAX, rather than JSONP.`);var r=t.nextAuthCallbackID.toString();t.nextAuthCallbackID++;var o=t.getDocument(),h=o.createElement("script");t.auth_callbacks[r]=function(t){s(null,t)},h.src=n.endpoint+"?callback="+encodeURIComponent("Pusher.auth_callbacks['"+r+"']")+"&"+e;var u=o.getElementsByTagName("head")[0]||o.documentElement;u.insertBefore(h,u.firstChild)};class ft{constructor(t){this.src=t}send(t){var e=this,n="Error loading "+e.src;e.script=document.createElement("script"),e.script.id=t.id,e.script.src=e.src,e.script.type="text/javascript",e.script.charset="UTF-8",e.script.addEventListener?(e.script.onerror=function(){t.callback(n)},e.script.onload=function(){t.callback(null)}):e.script.onreadystatechange=function(){"loaded"!==e.script.readyState&&"complete"!==e.script.readyState||t.callback(null)},void 0===e.script.async&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(e.errorScript=document.createElement("script"),e.errorScript.id=t.id+"_error",e.errorScript.text=t.name+"('"+n+"');",e.script.async=e.errorScript.async=!1):e.script.async=!0;var i=document.getElementsByTagName("head")[0];i.insertBefore(e.script,i.firstChild),e.errorScript&&i.insertBefore(e.errorScript,e.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class dt{constructor(t,e){this.url=t,this.data=e}send(t){if(!this.request){var e=st((n=ut(ot(this.data,(function(t){return void 0!==t}))),i=[],et(n,(function(t,e){i.push([e,t])})),i),Y.method("join","=")).join("&");this.request=_e.createScriptRequest(this.url+"/"+t.number+"?"+e),this.request.send(t)}var n,i}cleanup(){this.request&&this.request.cleanup()}}var vt={name:"jsonp",getAgent:function(t,e){return function(n,i){var r=_e.createJSONPRequest("http"+(e?"s":"")+"://"+(t.host||t.options.host)+t.options.path,n),o=_e.ScriptReceivers.create((function(e,n){s.remove(o),r.cleanup(),n&&n.host&&(t.host=n.host),i&&i(e,n)}));r.send(o)}}};function pt(t,e,n){return t+(e.useTLS?"s":"")+"://"+(e.useTLS?e.hostTLS:e.hostNonTLS)+n}function wt(t,e){return"/app/"+t+"?protocol="+o+"&client=js&version="+r+(e?"&"+e:"")}var bt={getInitial:function(t,e){return pt("ws",e,(e.httpPath||"")+wt(t,"flash=false"))}},yt={getInitial:function(t,e){return pt("http",e,(e.httpPath||"/pusher")+wt(t))}},gt={getInitial:function(t,e){return pt("http",e,e.httpPath||"/pusher")},getPath:function(t){return wt(t)}};class kt{constructor(){this._callbacks={}}get(t){return this._callbacks[mt(t)]}add(t,e,n){var i=mt(t);this._callbacks[i]=this._callbacks[i]||[],this._callbacks[i].push({fn:e,context:n})}remove(t,e,n){if(t||e||n){var i=t?[mt(t)]:nt(this._callbacks);e||n?this.removeCallback(i,e,n):this.removeAllCallbacks(i)}else this._callbacks={}}removeCallback(t,e,n){it(t,(function(t){this._callbacks[t]=rt(this._callbacks[t]||[],(function(t){return e&&e!==t.fn||n&&n!==t.context})),0===this._callbacks[t].length&&delete this._callbacks[t]}),this)}removeAllCallbacks(t){it(t,(function(t){delete this._callbacks[t]}),this)}}function mt(t){return"_"+t}class St{constructor(t){this.callbacks=new kt,this.global_callbacks=[],this.failThrough=t}bind(t,e,n){return this.callbacks.add(t,e,n),this}bind_global(t){return this.global_callbacks.push(t),this}unbind(t,e,n){return this.callbacks.remove(t,e,n),this}unbind_global(t){return t?(this.global_callbacks=rt(this.global_callbacks||[],(e=>e!==t)),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(t,e,n){for(var i=0;i<this.global_callbacks.length;i++)this.global_callbacks[i](t,e);var s=this.callbacks.get(t),r=[];if(n?r.push(e,n):e&&r.push(e),s&&s.length>0)for(i=0;i<s.length;i++)s[i].fn.apply(s[i].context||window,r);else this.failThrough&&this.failThrough(t,e);return this}}class _t extends St{constructor(t,e,n,i,s){super(),this.initialize=_e.transportConnectionInitializer,this.hooks=t,this.name=e,this.priority=n,this.key=i,this.options=s,this.state="new",this.timeline=s.timeline,this.activityTimeout=s.activityTimeout,this.id=this.timeline.generateUniqueID()}handlesActivityChecks(){return Boolean(this.hooks.handlesActivityChecks)}supportsPing(){return Boolean(this.hooks.supportsPing)}connect(){if(this.socket||"initialized"!==this.state)return!1;var t=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(t,this.options)}catch(t){return Y.defer((()=>{this.onError(t),this.changeState("closed")})),!1}return this.bindListeners(),at.debug("Connecting",{transport:this.name,url:t}),this.changeState("connecting"),!0}close(){return!!this.socket&&(this.socket.close(),!0)}send(t){return"open"===this.state&&(Y.defer((()=>{this.socket&&this.socket.send(t)})),!0)}ping(){"open"===this.state&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(t){this.emit("error",{type:"WebSocketError",error:t}),this.timeline.error(this.buildTimelineMessage({error:t.toString()}))}onClose(t){t?this.changeState("closed",{code:t.code,reason:t.reason,wasClean:t.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(t){this.emit("message",t)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=t=>{this.onError(t)},this.socket.onclose=t=>{this.onClose(t)},this.socket.onmessage=t=>{this.onMessage(t)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(t,e){this.state=t,this.timeline.info(this.buildTimelineMessage({state:t,params:e})),this.emit(t,e)}buildTimelineMessage(t){return K({cid:this.id},t)}}class jt{constructor(t){this.hooks=t}isSupported(t){return this.hooks.isSupported(t)}createConnection(t,e,n,i){return new _t(this.hooks,t,e,n,i)}}var Ct=new jt({urls:bt,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return Boolean(_e.getWebSocketAPI())},isSupported:function(){return Boolean(_e.getWebSocketAPI())},getSocket:function(t){return _e.createWebSocket(t)}}),Ot={urls:yt,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},Et=K({getSocket:function(t){return _e.HTTPFactory.createStreamingSocket(t)}},Ot),Tt=K({getSocket:function(t){return _e.HTTPFactory.createPollingSocket(t)}},Ot),xt={isSupported:function(){return _e.isXHRSupported()}},Pt={ws:Ct,xhr_streaming:new jt(K({},Et,xt)),xhr_polling:new jt(K({},Tt,xt))},Rt=new jt({file:"sockjs",urls:gt,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return void 0!==window.SockJS},getSocket:function(t,e){return new window.SockJS(t,null,{js_path:O.getPath("sockjs",{useTLS:e.useTLS}),ignore_null_origin:e.ignoreNullOrigin})},beforeOpen:function(t,e){t.send(JSON.stringify({path:e}))}}),It={isSupported:function(t){return _e.isXDRSupported(t.useTLS)}},At=new jt(K({},Et,It)),Nt=new jt(K({},Tt,It));Pt.xdr_streaming=At,Pt.xdr_polling=Nt,Pt.sockjs=Rt;var Lt=Pt,Ut=new class extends St{constructor(){super();var t=this;void 0!==window.addEventListener&&(window.addEventListener("online",(function(){t.emit("online")}),!1),window.addEventListener("offline",(function(){t.emit("offline")}),!1))}isOnline(){return void 0===window.navigator.onLine||window.navigator.onLine}};class Mt{constructor(t,e,n){this.manager=t,this.transport=e,this.minPingDelay=n.minPingDelay,this.maxPingDelay=n.maxPingDelay,this.pingDelay=void 0}createConnection(t,e,n,i){i=K({},i,{activityTimeout:this.pingDelay});var s=this.transport.createConnection(t,e,n,i),r=null,o=function(){s.unbind("open",o),s.bind("closed",h),r=Y.now()},h=t=>{if(s.unbind("closed",h),1002===t.code||1003===t.code)this.manager.reportDeath();else if(!t.wasClean&&r){var e=Y.now()-r;e<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(e/2,this.minPingDelay))}};return s.bind("open",o),s}isSupported(t){return this.manager.isAlive()&&this.transport.isSupported(t)}}const $t={decodeMessage:function(t){try{var e=JSON.parse(t.data),n=e.data;if("string"==typeof n)try{n=JSON.parse(e.data)}catch(t){}var i={event:e.event,channel:e.channel,data:n};return e.user_id&&(i.user_id=e.user_id),i}catch(e){throw{type:"MessageParseError",error:e,data:t.data}}},encodeMessage:function(t){return JSON.stringify(t)},processHandshake:function(t){var e=$t.decodeMessage(t);if("pusher:connection_established"===e.event){if(!e.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:e.data.socket_id,activityTimeout:1e3*e.data.activity_timeout}}if("pusher:error"===e.event)return{action:this.getCloseAction(e.data),error:this.getCloseError(e.data)};throw"Invalid handshake"},getCloseAction:function(t){return t.code<4e3?t.code>=1002&&t.code<=1004?"backoff":null:4e3===t.code?"tls_only":t.code<4100?"refused":t.code<4200?"backoff":t.code<4300?"retry":"refused"},getCloseError:function(t){return 1e3!==t.code&&1001!==t.code?{type:"PusherError",data:{code:t.code,message:t.reason||t.message}}:null}};var Dt=$t;class zt extends St{constructor(t,e){super(),this.id=t,this.transport=e,this.activityTimeout=e.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(t){return this.transport.send(t)}send_event(t,e,n){var i={event:t,data:e};return n&&(i.channel=n),at.debug("Event sent",i),this.send(Dt.encodeMessage(i))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var t={message:t=>{var e;try{e=Dt.decodeMessage(t)}catch(e){this.emit("error",{type:"MessageParseError",error:e,data:t.data})}if(void 0!==e){switch(at.debug("Event recd",e),e.event){case"pusher:error":this.emit("error",{type:"PusherError",data:e.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong")}this.emit("message",e)}},activity:()=>{this.emit("activity")},error:t=>{this.emit("error",t)},closed:t=>{e(),t&&t.code&&this.handleCloseEvent(t),this.transport=null,this.emit("closed")}},e=()=>{et(t,((t,e)=>{this.transport.unbind(e,t)}))};et(t,((t,e)=>{this.transport.bind(e,t)}))}handleCloseEvent(t){var e=Dt.getCloseAction(t),n=Dt.getCloseError(t);n&&this.emit("error",n),e&&this.emit(e,{action:e,error:n})}}class Ht{constructor(t,e){this.transport=t,this.callback=e,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=t=>{var e;this.unbindListeners();try{e=Dt.processHandshake(t)}catch(t){return this.finish("error",{error:t}),void this.transport.close()}"connected"===e.action?this.finish("connected",{connection:new zt(e.id,this.transport),activityTimeout:e.activityTimeout}):(this.finish(e.action,{error:e.error}),this.transport.close())},this.onClosed=t=>{this.unbindListeners();var e=Dt.getCloseAction(t)||"backoff",n=Dt.getCloseError(t);this.finish(e,{error:n})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(t,e){this.callback(K({transport:this.transport,action:t},e))}}class Bt{constructor(t,e){this.timeline=t,this.options=e||{}}send(t,e){this.timeline.isEmpty()||this.timeline.send(_e.TimelineTransport.getAgent(this,t),e)}}class Jt extends St{constructor(t,e){super((function(e){at.debug("No callbacks on "+t+" for "+e)})),this.name=t,this.pusher=e,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(t,e){return e(null,{auth:""})}trigger(t,e){if(0!==t.indexOf("client-"))throw new P("Event '"+t+"' does not start with 'client-'");if(!this.subscribed){var n=x("triggeringClientEvents");at.warn(`Client event triggered before channel 'subscription_succeeded' event . ${n}`)}return this.pusher.send_event(t,e,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(t){var e=t.event,n=t.data;"pusher_internal:subscription_succeeded"===e?this.handleSubscriptionSucceededEvent(t):"pusher_internal:subscription_count"===e?this.handleSubscriptionCountEvent(t):0!==e.indexOf("pusher_internal:")&&this.emit(e,n,{})}handleSubscriptionSucceededEvent(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",t.data)}handleSubscriptionCountEvent(t){t.data.subscription_count&&(this.subscriptionCount=t.data.subscription_count),this.emit("pusher:subscription_count",t.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,((t,e)=>{t?(this.subscriptionPending=!1,at.error(t.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:t.message},t instanceof $?{status:t.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:e.auth,channel_data:e.channel_data,channel:this.name})})))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class Ft extends Jt{authorize(t,e){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:t},e)}}class qt{constructor(){this.reset()}get(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members[t]}:null}each(t){et(this.members,((e,n)=>{t(this.get(n))}))}setMyID(t){this.myID=t}onSubscription(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)}addMember(t){return null===this.get(t.user_id)&&this.count++,this.members[t.user_id]=t.user_info,this.get(t.user_id)}removeMember(t){var e=this.get(t.user_id);return e&&(delete this.members[t.user_id],this.count--),e}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}class Xt extends Ft{constructor(t,e){super(t,e),this.members=new qt}authorize(t,e){super.authorize(t,((t,n)=>{return i=this,s=void 0,o=function*(){if(!t)if(null!=n.channel_data){var i=JSON.parse(n.channel_data);this.members.setMyID(i.user_id)}else{if(yield this.pusher.user.signinDonePromise,null==this.pusher.user.user_data){let t=x("authorizationEndpoint");return at.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${t}, or the user should be signed in.`),void e("Invalid auth response")}this.members.setMyID(this.pusher.user.user_data.id)}e(t,n)},new((r=void 0)||(r=Promise))((function(t,e){function n(t){try{u(o.next(t))}catch(t){e(t)}}function h(t){try{u(o.throw(t))}catch(t){e(t)}}function u(e){var i;e.done?t(e.value):(i=e.value,i instanceof r?i:new r((function(t){t(i)}))).then(n,h)}u((o=o.apply(i,s||[])).next())}));var i,s,r,o}))}handleEvent(t){var e=t.event;if(0===e.indexOf("pusher_internal:"))this.handleInternalEvent(t);else{var n=t.data,i={};t.user_id&&(i.user_id=t.user_id),this.emit(e,n,i)}}handleInternalEvent(t){var e=t.data;switch(t.event){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(t);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(t);break;case"pusher_internal:member_added":var n=this.members.addMember(e);this.emit("pusher:member_added",n);break;case"pusher_internal:member_removed":var i=this.members.removeMember(e);i&&this.emit("pusher:member_removed",i)}}handleSubscriptionSucceededEvent(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(t.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var Wt=n(1),Vt=n(0);class Qt extends Ft{constructor(t,e,n){super(t,e),this.key=null,this.nacl=n}authorize(t,e){super.authorize(t,((t,n)=>{if(t)return void e(t,n);let i=n.shared_secret;i?(this.key=Object(Vt.decode)(i),delete n.shared_secret,e(null,n)):e(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null)}))}trigger(t,e){throw new L("Client events are not currently supported for encrypted channels")}handleEvent(t){var e=t.event,n=t.data;0!==e.indexOf("pusher_internal:")&&0!==e.indexOf("pusher:")?this.handleEncryptedEvent(e,n):super.handleEvent(t)}handleEncryptedEvent(t,e){if(!this.key)return void at.debug("Received encrypted event before key has been retrieved from the authEndpoint");if(!e.ciphertext||!e.nonce)return void at.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+e);let n=Object(Vt.decode)(e.ciphertext);if(n.length<this.nacl.secretbox.overheadLength)return void at.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${n.length}`);let i=Object(Vt.decode)(e.nonce);if(i.length<this.nacl.secretbox.nonceLength)return void at.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${i.length}`);let s=this.nacl.secretbox.open(n,i,this.key);if(null===s)return at.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),void this.authorize(this.pusher.connection.socket_id,((e,r)=>{e?at.error(`Failed to make a request to the authEndpoint: ${r}. Unable to fetch new key, so dropping encrypted event`):(s=this.nacl.secretbox.open(n,i,this.key),null!==s?this.emit(t,this.getDataToEmit(s)):at.error("Failed to decrypt event with new key. Dropping encrypted event"))}));this.emit(t,this.getDataToEmit(s))}getDataToEmit(t){let e=Object(Wt.decode)(t);try{return JSON.parse(e)}catch(t){return e}}}class Gt extends St{constructor(t,e){super(),this.state="initialized",this.connection=null,this.key=t,this.options=e,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var n=_e.getNetwork();n.bind("online",(()=>{this.timeline.info({netinfo:"online"}),"connecting"!==this.state&&"unavailable"!==this.state||this.retryIn(0)})),n.bind("offline",(()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()})),this.updateStrategy()}connect(){this.connection||this.runner||(this.strategy.isSupported()?(this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()):this.updateState("failed"))}send(t){return!!this.connection&&this.connection.send(t)}send_event(t,e,n){return!!this.connection&&this.connection.send_event(t,e,n)}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var t=(e,n)=>{e?this.runner=this.strategy.connect(0,t):"error"===n.action?(this.emit("error",{type:"HandshakeError",error:n.error}),this.timeline.error({handshakeError:n.error})):(this.abortConnecting(),this.handshakeCallbacks[n.action](n))};this.runner=this.strategy.connect(0,t)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection&&this.abandonConnection().close()}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(t){this.timeline.info({action:"retry",delay:t}),t>0&&this.emit("connecting_in",Math.round(t/1e3)),this.retryTimer=new V(t||0,(()=>{this.disconnectInternally(),this.connect()}))}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new V(this.options.unavailableTimeout,(()=>{this.updateState("unavailable")}))}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new V(this.options.pongTimeout,(()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)}))}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new V(this.activityTimeout,(()=>{this.sendActivityCheck()})))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(t){return K({},t,{message:t=>{this.resetActivityCheck(),this.emit("message",t)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:t=>{this.emit("error",t)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(t){return K({},t,{connected:t=>{this.activityTimeout=Math.min(this.options.activityTimeout,t.activityTimeout,t.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(t.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let t=t=>e=>{e.error&&this.emit("error",{type:"WebSocketError",error:e.error}),t(e)};return{tls_only:t((()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)})),refused:t((()=>{this.disconnect()})),backoff:t((()=>{this.retryIn(1e3)})),retry:t((()=>{this.retryIn(0)}))}}setConnection(t){for(var e in this.connection=t,this.connectionCallbacks)this.connection.bind(e,this.connectionCallbacks[e]);this.resetActivityCheck()}abandonConnection(){if(this.connection){for(var t in this.stopActivityCheck(),this.connectionCallbacks)this.connection.unbind(t,this.connectionCallbacks[t]);var e=this.connection;return this.connection=null,e}}updateState(t,e){var n=this.state;if(this.state=t,n!==t){var i=t;"connected"===i&&(i+=" with new socket ID "+e.socket_id),at.debug("State changed",n+" -> "+i),this.timeline.info({state:t,params:e}),this.emit("state_change",{previous:n,current:t}),this.emit(t,e)}}shouldRetry(){return"connecting"===this.state||"connected"===this.state}}class Yt{constructor(){this.channels={}}add(t,e){return this.channels[t]||(this.channels[t]=function(t,e){if(0===t.indexOf("private-encrypted-")){if(e.config.nacl)return Zt.createEncryptedChannel(t,e,e.config.nacl);let n="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",i=x("encryptedChannelSupport");throw new L(`${n}. ${i}`)}if(0===t.indexOf("private-"))return Zt.createPrivateChannel(t,e);if(0===t.indexOf("presence-"))return Zt.createPresenceChannel(t,e);if(0===t.indexOf("#"))throw new R('Cannot create a channel with name "'+t+'".');return Zt.createChannel(t,e)}(t,e)),this.channels[t]}all(){return t=[],et(this.channels,(function(e){t.push(e)})),t;var t}find(t){return this.channels[t]}remove(t){var e=this.channels[t];return delete this.channels[t],e}disconnect(){et(this.channels,(function(t){t.disconnect()}))}}var Kt={createChannels:()=>new Yt,createConnectionManager:(t,e)=>new Gt(t,e),createChannel:(t,e)=>new Jt(t,e),createPrivateChannel:(t,e)=>new Ft(t,e),createPresenceChannel:(t,e)=>new Xt(t,e),createEncryptedChannel:(t,e,n)=>new Qt(t,e,n),createTimelineSender:(t,e)=>new Bt(t,e),createHandshake:(t,e)=>new Ht(t,e),createAssistantToTheTransportManager:(t,e,n)=>new Mt(t,e,n)},Zt=Kt;class te{constructor(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}getAssistant(t){return Zt.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class ee{constructor(t,e){this.strategies=t,this.loop=Boolean(e.loop),this.failFast=Boolean(e.failFast),this.timeout=e.timeout,this.timeoutLimit=e.timeoutLimit}isSupported(){return ht(this.strategies,Y.method("isSupported"))}connect(t,e){var n=this.strategies,i=0,s=this.timeout,r=null,o=(h,u)=>{u?e(null,u):(i+=1,this.loop&&(i%=n.length),i<n.length?(s&&(s*=2,this.timeoutLimit&&(s=Math.min(s,this.timeoutLimit))),r=this.tryStrategy(n[i],t,{timeout:s,failFast:this.failFast},o)):e(!0))};return r=this.tryStrategy(n[i],t,{timeout:s,failFast:this.failFast},o),{abort:function(){r.abort()},forceMinPriority:function(e){t=e,r&&r.forceMinPriority(e)}}}tryStrategy(t,e,n,i){var s=null,r=null;return n.timeout>0&&(s=new V(n.timeout,(function(){r.abort(),i(!0)}))),r=t.connect(e,(function(t,e){t&&s&&s.isRunning()&&!n.failFast||(s&&s.ensureAborted(),i(t,e))})),{abort:function(){s&&s.ensureAborted(),r.abort()},forceMinPriority:function(t){r.forceMinPriority(t)}}}}class ne{constructor(t){this.strategies=t}isSupported(){return ht(this.strategies,Y.method("isSupported"))}connect(t,e){return function(t,n){var i=st(t,(function(t,i,s,r){return t.connect(n,function(t,n){return function(i,s){n[t].error=i,i?function(t){return function(t,e){for(var n=0;n<t.length;n++)if(!e(t[n],n,t))return!1;return!0}(t,(function(t){return Boolean(t.error)}))}(n)&&e(!0):(it(n,(function(t){t.forceMinPriority(s.transport.priority)})),e(null,s))}}(i,r))}));return{abort:function(){it(i,ie)},forceMinPriority:function(t){it(i,(function(e){e.forceMinPriority(t)}))}}}(this.strategies,t)}}function ie(t){t.error||t.aborted||(t.abort(),t.aborted=!0)}class se{constructor(t,e,n){this.strategy=t,this.transports=e,this.ttl=n.ttl||18e5,this.usingTLS=n.useTLS,this.timeline=n.timeline}isSupported(){return this.strategy.isSupported()}connect(t,e){var n=this.usingTLS,i=function(t){var e=_e.getLocalStorage();if(e)try{var n=e[re(t)];if(n)return JSON.parse(n)}catch(e){oe(t)}return null}(n),s=i&&i.cacheSkipCount?i.cacheSkipCount:0,r=[this.strategy];if(i&&i.timestamp+this.ttl>=Y.now()){var o=this.transports[i.transport];o&&(["ws","wss"].includes(i.transport)||s>3?(this.timeline.info({cached:!0,transport:i.transport,latency:i.latency}),r.push(new ee([o],{timeout:2*i.latency+1e3,failFast:!0}))):s++)}var h=Y.now(),u=r.pop().connect(t,(function i(o,c){o?(oe(n),r.length>0?(h=Y.now(),u=r.pop().connect(t,i)):e(o)):(function(t,e,n,i){var s=_e.getLocalStorage();if(s)try{s[re(t)]=ct({timestamp:Y.now(),transport:e,latency:n,cacheSkipCount:i})}catch(t){}}(n,c.transport.name,Y.now()-h,s),e(null,c))}));return{abort:function(){u.abort()},forceMinPriority:function(e){t=e,u&&u.forceMinPriority(e)}}}}function re(t){return"pusherTransport"+(t?"TLS":"NonTLS")}function oe(t){var e=_e.getLocalStorage();if(e)try{delete e[re(t)]}catch(t){}}class he{constructor(t,{delay:e}){this.strategy=t,this.options={delay:e}}isSupported(){return this.strategy.isSupported()}connect(t,e){var n,i=this.strategy,s=new V(this.options.delay,(function(){n=i.connect(t,e)}));return{abort:function(){s.ensureAborted(),n&&n.abort()},forceMinPriority:function(e){t=e,n&&n.forceMinPriority(e)}}}}class ue{constructor(t,e,n){this.test=t,this.trueBranch=e,this.falseBranch=n}isSupported(){return(this.test()?this.trueBranch:this.falseBranch).isSupported()}connect(t,e){return(this.test()?this.trueBranch:this.falseBranch).connect(t,e)}}class ce{constructor(t){this.strategy=t}isSupported(){return this.strategy.isSupported()}connect(t,e){var n=this.strategy.connect(t,(function(t,i){i&&n.abort(),e(t,i)}));return n}}function ae(t){return function(){return t.isSupported()}}var le,fe={getRequest:function(t){var e=new window.XDomainRequest;return e.ontimeout=function(){t.emit("error",new I),t.close()},e.onerror=function(e){t.emit("error",e),t.close()},e.onprogress=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText)},e.onload=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText),t.emit("finished",200),t.close()},e},abortRequest:function(t){t.ontimeout=t.onerror=t.onprogress=t.onload=null,t.abort()}};class de extends St{constructor(t,e,n){super(),this.hooks=t,this.method=e,this.url=n}start(t){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},_e.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(t)}close(){this.unloader&&(_e.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(t,e){for(;;){var n=this.advanceBuffer(e);if(!n)break;this.emit("chunk",{status:t,data:n})}this.isBufferTooLong(e)&&this.emit("buffer_too_long")}advanceBuffer(t){var e=t.slice(this.position),n=e.indexOf("\n");return-1!==n?(this.position+=n+1,e.slice(0,n)):null}isBufferTooLong(t){return this.position===t.length&&t.length>262144}}!function(t){t[t.CONNECTING=0]="CONNECTING",t[t.OPEN=1]="OPEN",t[t.CLOSED=3]="CLOSED"}(le||(le={}));var ve=le,pe=1;function we(t){var e=-1===t.indexOf("?")?"?":"&";return t+e+"t="+ +new Date+"&n="+pe++}function be(t){return _e.randomInt(t)}var ye,ge=class{constructor(t,e){this.hooks=t,this.session=be(1e3)+"/"+function(){for(var t=[],e=0;e<8;e++)t.push(be(32).toString(32));return t.join("")}(),this.location=function(t){var e=/([^\?]*)\/*(\??.*)/.exec(t);return{base:e[1],queryString:e[2]}}(e),this.readyState=ve.CONNECTING,this.openStream()}send(t){return this.sendRaw(JSON.stringify([t]))}ping(){this.hooks.sendHeartbeat(this)}close(t,e){this.onClose(t,e,!0)}sendRaw(t){if(this.readyState!==ve.OPEN)return!1;try{return _e.createSocketRequest("POST",we((e=this.location,n=this.session,e.base+"/"+n+"/xhr_send"))).start(t),!0}catch(t){return!1}var e,n}reconnect(){this.closeStream(),this.openStream()}onClose(t,e,n){this.closeStream(),this.readyState=ve.CLOSED,this.onclose&&this.onclose({code:t,reason:e,wasClean:n})}onChunk(t){var e;if(200===t.status)switch(this.readyState===ve.OPEN&&this.onActivity(),t.data.slice(0,1)){case"o":e=JSON.parse(t.data.slice(1)||"{}"),this.onOpen(e);break;case"a":e=JSON.parse(t.data.slice(1)||"[]");for(var n=0;n<e.length;n++)this.onEvent(e[n]);break;case"m":e=JSON.parse(t.data.slice(1)||"null"),this.onEvent(e);break;case"h":this.hooks.onHeartbeat(this);break;case"c":e=JSON.parse(t.data.slice(1)||"[]"),this.onClose(e[0],e[1],!0)}}onOpen(t){var e,n;this.readyState===ve.CONNECTING?(t&&t.hostname&&(this.location.base=(e=t.hostname,(n=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(this.location.base))[1]+e+n[3])),this.readyState=ve.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(t){this.readyState===ve.OPEN&&this.onmessage&&this.onmessage({data:t})}onActivity(){this.onactivity&&this.onactivity()}onError(t){this.onerror&&this.onerror(t)}openStream(){this.stream=_e.createSocketRequest("POST",we(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",(t=>{this.onChunk(t)})),this.stream.bind("finished",(t=>{this.hooks.onFinished(this,t)})),this.stream.bind("buffer_too_long",(()=>{this.reconnect()}));try{this.stream.start()}catch(t){Y.defer((()=>{this.onError(t),this.onClose(1006,"Could not start streaming",!1)}))}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}},ke={getReceiveURL:function(t,e){return t.base+"/"+e+"/xhr_streaming"+t.queryString},onHeartbeat:function(t){t.sendRaw("[]")},sendHeartbeat:function(t){t.sendRaw("[]")},onFinished:function(t,e){t.onClose(1006,"Connection interrupted ("+e+")",!1)}},me={getReceiveURL:function(t,e){return t.base+"/"+e+"/xhr"+t.queryString},onHeartbeat:function(){},sendHeartbeat:function(t){t.sendRaw("[]")},onFinished:function(t,e){200===e?t.reconnect():t.onClose(1006,"Connection interrupted ("+e+")",!1)}},Se={getRequest:function(t){var e=new(_e.getXHRAPI());return e.onreadystatechange=e.onprogress=function(){switch(e.readyState){case 3:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText);break;case 4:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText),t.emit("finished",e.status),t.close()}},e},abortRequest:function(t){t.onreadystatechange=null,t.abort()}},_e={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:s,DependenciesReceivers:C,getDefaultStrategy:function(t,e,n){var i={};function s(e,s,r,o,h){var u=n(t,e,s,r,o,h);return i[e]=u,u}var r,o=Object.assign({},e,{hostNonTLS:t.wsHost+":"+t.wsPort,hostTLS:t.wsHost+":"+t.wssPort,httpPath:t.wsPath}),h=Object.assign({},o,{useTLS:!0}),u=Object.assign({},e,{hostNonTLS:t.httpHost+":"+t.httpPort,hostTLS:t.httpHost+":"+t.httpsPort,httpPath:t.httpPath}),c={loop:!0,timeout:15e3,timeoutLimit:6e4},a=new te({minPingDelay:1e4,maxPingDelay:t.activityTimeout}),l=new te({lives:2,minPingDelay:1e4,maxPingDelay:t.activityTimeout}),f=s("ws","ws",3,o,a),d=s("wss","ws",3,h,a),v=s("sockjs","sockjs",1,u),p=s("xhr_streaming","xhr_streaming",1,u,l),w=s("xdr_streaming","xdr_streaming",1,u,l),b=s("xhr_polling","xhr_polling",1,u),y=s("xdr_polling","xdr_polling",1,u),g=new ee([f],c),k=new ee([d],c),m=new ee([v],c),S=new ee([new ue(ae(p),p,w)],c),_=new ee([new ue(ae(b),b,y)],c),j=new ee([new ue(ae(S),new ne([S,new he(_,{delay:4e3})]),_)],c),C=new ue(ae(j),j,m);return r=new ne(e.useTLS?[g,new he(C,{delay:2e3})]:[g,new he(k,{delay:2e3}),new he(C,{delay:5e3})]),new se(new ce(new ue(ae(f),r,C)),i,{ttl:18e5,timeline:e.timeline,useTLS:e.useTLS})},Transports:Lt,transportConnectionInitializer:function(){var t=this;t.timeline.info(t.buildTimelineMessage({transport:t.name+(t.options.useTLS?"s":"")})),t.hooks.isInitialized()?t.changeState("initialized"):t.hooks.file?(t.changeState("initializing"),O.load(t.hooks.file,{useTLS:t.options.useTLS},(function(e,n){t.hooks.isInitialized()?(t.changeState("initialized"),n(!0)):(e&&t.onError(e),t.onClose(),n(!1))}))):t.onClose()},HTTPFactory:{createStreamingSocket(t){return this.createSocket(ke,t)},createPollingSocket(t){return this.createSocket(me,t)},createSocket:(t,e)=>new ge(t,e),createXHR(t,e){return this.createRequest(Se,t,e)},createRequest:(t,e,n)=>new de(t,e,n),createXDR:function(t,e){return this.createRequest(fe,t,e)}},TimelineTransport:vt,getXHRAPI:()=>window.XMLHttpRequest,getWebSocketAPI:()=>window.WebSocket||window.MozWebSocket,setup(t){window.Pusher=t;var e=()=>{this.onDocumentBody(t.ready)};window.JSON?e():O.load("json2",{},e)},getDocument:()=>document,getProtocol(){return this.getDocument().location.protocol},getAuthorizers:()=>({ajax:D,jsonp:lt}),onDocumentBody(t){document.body?t():setTimeout((()=>{this.onDocumentBody(t)}),0)},createJSONPRequest:(t,e)=>new dt(t,e),createScriptRequest:t=>new ft(t),getLocalStorage(){try{return window.localStorage}catch(t){return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){return new(this.getXHRAPI())},createMicrosoftXHR:()=>new ActiveXObject("Microsoft.XMLHTTP"),getNetwork:()=>Ut,createWebSocket(t){return new(this.getWebSocketAPI())(t)},createSocketRequest(t,e){if(this.isXHRSupported())return this.HTTPFactory.createXHR(t,e);if(this.isXDRSupported(0===e.indexOf("https:")))return this.HTTPFactory.createXDR(t,e);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var t=this.getXHRAPI();return Boolean(t)&&void 0!==(new t).withCredentials},isXDRSupported(t){var e=t?"https:":"http:",n=this.getProtocol();return Boolean(window.XDomainRequest)&&n===e},addUnloadListener(t){void 0!==window.addEventListener?window.addEventListener("unload",t,!1):void 0!==window.attachEvent&&window.attachEvent("onunload",t)},removeUnloadListener(t){void 0!==window.addEventListener?window.removeEventListener("unload",t,!1):void 0!==window.detachEvent&&window.detachEvent("onunload",t)},randomInt:t=>Math.floor((window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)*t)};!function(t){t[t.ERROR=3]="ERROR",t[t.INFO=6]="INFO",t[t.DEBUG=7]="DEBUG"}(ye||(ye={}));var je=ye;class Ce{constructor(t,e,n){this.key=t,this.session=e,this.events=[],this.options=n||{},this.sent=0,this.uniqueID=0}log(t,e){t<=this.options.level&&(this.events.push(K({},e,{timestamp:Y.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(t){this.log(je.ERROR,t)}info(t){this.log(je.INFO,t)}debug(t){this.log(je.DEBUG,t)}isEmpty(){return 0===this.events.length}send(t,e){var n=K({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],t(n,((t,n)=>{t||this.sent++,e&&e(t,n)})),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class Oe{constructor(t,e,n,i){this.name=t,this.priority=e,this.transport=n,this.options=i||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(t,e){if(!this.isSupported())return Ee(new M,e);if(this.priority<t)return Ee(new A,e);var n=!1,i=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),s=null,r=function(){i.unbind("initialized",r),i.connect()},o=function(){s=Zt.createHandshake(i,(function(t){n=!0,c(),e(null,t)}))},h=function(t){c(),e(t)},u=function(){var t;c(),t=ct(i),e(new N(t))},c=function(){i.unbind("initialized",r),i.unbind("open",o),i.unbind("error",h),i.unbind("closed",u)};return i.bind("initialized",r),i.bind("open",o),i.bind("error",h),i.bind("closed",u),i.initialize(),{abort:()=>{n||(c(),s?s.close():i.close())},forceMinPriority:t=>{n||this.priority<t&&(s?s.close():i.close())}}}}function Ee(t,e){return Y.defer((function(){e(t)})),{abort:function(){},forceMinPriority:function(){}}}const{Transports:Te}=_e;var xe=function(t,e,n,i,s,r){var o,h=Te[n];if(!h)throw new U(n);return t.enabledTransports&&-1===tt(t.enabledTransports,e)||t.disabledTransports&&-1!==tt(t.disabledTransports,e)?o=Pe:(s=Object.assign({ignoreNullOrigin:t.ignoreNullOrigin},s),o=new Oe(e,i,r?r.getAssistant(h):h,s)),o},Pe={isSupported:function(){return!1},connect:function(t,e){var n=Y.defer((function(){e(new M)}));return{abort:function(){n.ensureAborted()},forceMinPriority:function(){}}}};function Re(t){return t.httpHost?t.httpHost:t.cluster?`sockjs-${t.cluster}.pusher.com`:a}function Ie(t){return t.wsHost?t.wsHost:`ws-${t.cluster}.pusher.com`}function Ae(t){return"https:"===_e.getProtocol()||!1!==t.forceTLS}function Ne(t){return"enableStats"in t?t.enableStats:"disableStats"in t&&!t.disableStats}function Le(t){const e=Object.assign(Object.assign({},k),t.userAuthentication);return"customHandler"in e&&null!=e.customHandler?e.customHandler:(t=>{if(void 0===_e.getAuthorizers()[t.transport])throw`'${t.transport}' is not a recognized auth transport`;return(e,n)=>{const i=((t,e)=>{var n="socket_id="+encodeURIComponent(t.socketId);for(var i in e.params)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(e.params[i]);if(null!=e.paramsProvider){let t=e.paramsProvider();for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i])}return n})(e,t);_e.getAuthorizers()[t.transport](_e,i,t,T.UserAuthentication,n)}})(e)}function Ue(t,e){const n=function(t,e){let n;return"channelAuthorization"in t?n=Object.assign(Object.assign({},m),t.channelAuthorization):(n={transport:t.authTransport||w,endpoint:t.authEndpoint||p},"auth"in t&&("params"in t.auth&&(n.params=t.auth.params),"headers"in t.auth&&(n.headers=t.auth.headers)),"authorizer"in t&&(n.customHandler=((t,e,n)=>{const i={authTransport:e.transport,authEndpoint:e.endpoint,auth:{params:e.params,headers:e.headers}};return(e,s)=>{const r=t.channel(e.channelName);n(r,i).authorize(e.socketId,s)}})(e,n,t.authorizer))),n}(t,e);return"customHandler"in n&&null!=n.customHandler?n.customHandler:(t=>{if(void 0===_e.getAuthorizers()[t.transport])throw`'${t.transport}' is not a recognized auth transport`;return(e,n)=>{const i=((t,e)=>{var n="socket_id="+encodeURIComponent(t.socketId);for(var i in n+="&channel_name="+encodeURIComponent(t.channelName),e.params)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(e.params[i]);if(null!=e.paramsProvider){let t=e.paramsProvider();for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i])}return n})(e,t);_e.getAuthorizers()[t.transport](_e,i,t,T.ChannelAuthorization,n)}})(n)}class Me extends St{constructor(t){super((function(t){at.debug(`No callbacks on watchlist events for ${t}`)})),this.pusher=t,this.bindWatchlistInternalEvent()}handleEvent(t){t.data.events.forEach((t=>{this.emit(t.name,t)}))}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",(t=>{"pusher_internal:watchlist_events"===t.event&&this.handleEvent(t)}))}}class $e extends St{constructor(t){super((function(t){at.debug("No callbacks on user for "+t)})),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(t,e)=>{if(t)return at.warn(`Error during signin: ${t}`),void this._cleanup();this.pusher.send_event("pusher:signin",{auth:e.auth,user_data:e.user_data})},this.pusher=t,this.pusher.connection.bind("state_change",(({previous:t,current:e})=>{"connected"!==t&&"connected"===e&&this._signin(),"connected"===t&&"connected"!==e&&(this._cleanup(),this._newSigninPromiseIfNeeded())})),this.watchlist=new Me(t),this.pusher.connection.bind("message",(t=>{"pusher:signin_success"===t.event&&this._onSigninSuccess(t.data),this.serverToUserChannel&&this.serverToUserChannel.name===t.channel&&this.serverToUserChannel.handleEvent(t)}))}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),"connected"===this.pusher.connection.state&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(t){try{this.user_data=JSON.parse(t.user_data)}catch(e){return at.error(`Failed parsing user data after signin: ${t.user_data}`),void this._cleanup()}if("string"!=typeof this.user_data.id||""===this.user_data.id)return at.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),void this._cleanup();this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){this.serverToUserChannel=new Jt(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global(((t,e)=>{0!==t.indexOf("pusher_internal:")&&0!==t.indexOf("pusher:")&&this.emit(t,e)})),(t=>{t.subscriptionPending&&t.subscriptionCancelled?t.reinstateSubscription():t.subscriptionPending||"connected"!==this.pusher.connection.state||t.subscribe()})(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested)return;if(this.signinDonePromise&&!this.signinDonePromise.done)return;const{promise:t,resolve:e}=function(){let t,e;return{promise:new Promise(((n,i)=>{t=n,e=i})),resolve:t,reject:e}}();t.done=!1;const n=()=>{t.done=!0};t.then(n).catch(n),this.signinDonePromise=t,this._signinDoneResolve=e}}class De{static ready(){De.isReady=!0;for(var t=0,e=De.instances.length;t<e;t++)De.instances[t].connect()}static getClientFeatures(){return nt(ot({ws:_e.Transports.ws},(function(t){return t.isSupported({})})))}constructor(t,e){!function(t){if(null==t)throw"You must pass your app key when you instantiate Pusher."}(t),function(t){if(null==t)throw"You must pass an options object";if(null==t.cluster)throw"Options object must provide a cluster";"disableStats"in t&&at.warn("The disableStats option is deprecated in favor of enableStats")}(e),this.key=t,this.config=function(t,e){let n={activityTimeout:t.activityTimeout||b,cluster:t.cluster,httpPath:t.httpPath||d,httpPort:t.httpPort||l,httpsPort:t.httpsPort||f,pongTimeout:t.pongTimeout||y,statsHost:t.statsHost||v,unavailableTimeout:t.unavailableTimeout||g,wsPath:t.wsPath||c,wsPort:t.wsPort||h,wssPort:t.wssPort||u,enableStats:Ne(t),httpHost:Re(t),useTLS:Ae(t),wsHost:Ie(t),userAuthenticator:Le(t),channelAuthorizer:Ue(t,e)};return"disabledTransports"in t&&(n.disabledTransports=t.disabledTransports),"enabledTransports"in t&&(n.enabledTransports=t.enabledTransports),"ignoreNullOrigin"in t&&(n.ignoreNullOrigin=t.ignoreNullOrigin),"timelineParams"in t&&(n.timelineParams=t.timelineParams),"nacl"in t&&(n.nacl=t.nacl),n}(e,this),this.channels=Zt.createChannels(),this.global_emitter=new St,this.sessionID=_e.randomInt(1e9),this.timeline=new Ce(this.key,this.sessionID,{cluster:this.config.cluster,features:De.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:je.INFO,version:r}),this.config.enableStats&&(this.timelineSender=Zt.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+_e.TimelineTransport.name})),this.connection=Zt.createConnectionManager(this.key,{getStrategy:t=>_e.getDefaultStrategy(this.config,t,xe),timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:Boolean(this.config.useTLS)}),this.connection.bind("connected",(()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())})),this.connection.bind("message",(t=>{var e=0===t.event.indexOf("pusher_internal:");if(t.channel){var n=this.channel(t.channel);n&&n.handleEvent(t)}e||this.global_emitter.emit(t.event,t.data)})),this.connection.bind("connecting",(()=>{this.channels.disconnect()})),this.connection.bind("disconnected",(()=>{this.channels.disconnect()})),this.connection.bind("error",(t=>{at.warn(t)})),De.instances.push(this),this.timeline.info({instances:De.instances.length}),this.user=new $e(this),De.isReady&&this.connect()}channel(t){return this.channels.find(t)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var t=this.connection.isUsingTLS(),e=this.timelineSender;this.timelineSenderTimer=new Q(6e4,(function(){e.send(t)}))}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(t,e,n){return this.global_emitter.bind(t,e,n),this}unbind(t,e,n){return this.global_emitter.unbind(t,e,n),this}bind_global(t){return this.global_emitter.bind_global(t),this}unbind_global(t){return this.global_emitter.unbind_global(t),this}unbind_all(t){return this.global_emitter.unbind_all(),this}subscribeAll(){var t;for(t in this.channels.channels)this.channels.channels.hasOwnProperty(t)&&this.subscribe(t)}subscribe(t){var e=this.channels.add(t,this);return e.subscriptionPending&&e.subscriptionCancelled?e.reinstateSubscription():e.subscriptionPending||"connected"!==this.connection.state||e.subscribe(),e}unsubscribe(t){var e=this.channels.find(t);e&&e.subscriptionPending?e.cancelSubscription():(e=this.channels.remove(t))&&e.subscribed&&e.unsubscribe()}send_event(t,e,n){return this.connection.send_event(t,e,n)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}De.instances=[],De.isReady=!1,De.logToConsole=!1,De.Runtime=_e,De.ScriptReceivers=_e.ScriptReceivers,De.DependenciesReceivers=_e.DependenciesReceivers,De.auth_callbacks=_e.auth_callbacks;var ze=e.default=De;_e.setup(De)}])},N.exports=A());
|
|
2
2
|
/*!
|
|
3
3
|
* Pusher JavaScript Library v8.3.0
|
|
4
4
|
* https://pusher.com/
|