@stonecrop/beam 0.6.3 → 0.7.0

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/beam.umd.cjs CHANGED
@@ -1,7 +1,10 @@
1
- (function(Te,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],C):(Te=typeof globalThis<"u"?globalThis:Te||self,C(Te["@stonecrop/beam"]={},Te.Vue))})(this,(function(Te,C){"use strict";var hi=document.createElement("style");hi.textContent=`@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap";.beam_action-footer[data-v-37933bd1]{margin-left:0;background:linear-gradient(180deg,transparent 0%,white 100%);color:var(--sc-primary-text-color);position:fixed;bottom:0;left:0;width:100%;padding:.625rem;text-align:center}.beam_metadata_arrow[data-v-2b1d7448]{align-self:center;flex-grow:1;position:relative;display:flex;align-items:center}.beam_metadata_arrow-body[data-v-2b1d7448]{width:100%;height:10px;background:#c4c4c4}.beam_metadata_arrow-head svg[data-v-2b1d7448]{width:20px;display:block}.beam_btn[data-v-bc768596]{font-size:.875rem;text-align:center;padding:.3125rem .75rem;border:1px solid var(--sc-btn-border);color:var(--sc-btn-label-color);background-color:var(--sc-btn-color);cursor:pointer;font-family:var(--sc-font-family)}.beam_btn[data-v-bc768596]:hover,.beam_btn[data-v-bc768596]:active{background-color:var(--sc-btn-hover)}.beam_btn a:link,.beam_btn a:visited,.beam_btn a:hover,.beam_btn a:active{text-decoration:none;color:var(--sc-btn-label-color)}.beam_day-divider[data-v-160cf6ef]{text-align:left;padding:1rem;background:var(--sc-cell-changed-color);border-bottom:1px solid var(--sc-row-border-color);box-sizing:border-box;margin-bottom:1rem;margin-left:calc(-1 * var(--sc-list-margin));margin-right:calc(-1 * var(--sc-list-margin))}.beam_day-divider h2[data-v-160cf6ef]{text-align:left;font-size:1rem;color:var(--sc-primary-text-color);margin:0;padding:0}.beam_day-divider[data-v-160cf6ef]:first-of-type{margin-top:0}.beam_filters[data-v-f8d60c9f]{background-color:var(--sc-primary-color);border-bottom:1px solid var(--sc-row-border-color);box-sizing:border-box;min-height:2em;overflow:visible;padding:.625rem;transition:all .2s ease-in-out}.beam_filters-heading[data-v-f8d60c9f]{align-items:center;background-color:var(--sc-primary-color);box-sizing:border-box;cursor:pointer;display:flex;font-size:1rem}.beam_filters-heading>h1[data-v-f8d60c9f]{font-size:1rem}.beam_filters-options[data-v-f8d60c9f]{display:flex;flex-direction:row;justify-content:flex-start;margin:1rem 0;padding:0 1rem;gap:1rem}@media(max-width:479px){.beam_filters-options[data-v-f8d60c9f]{flex-direction:column}}.beam_filter-option[data-v-ad8ee21c]{cursor:pointer;position:relative}.beam_filter-option-heading[data-v-ad8ee21c]{font-size:1rem!important;padding-bottom:.25rem}.beam_filter-option-select[data-v-ad8ee21c]{align-items:stretch;appearance:none;background-color:#fff;border:1px solid var(--sc-row-border-color);color:var(--sc-primary-text-color);display:flex;font-family:var(--sc-font-family);font-size:.8rem;font-weight:700;position:relative}label[data-v-ad8ee21c]{cursor:pointer;padding:.5rem}.beam_filter-arrow[data-v-ad8ee21c]{background:var(--sc-primary-color);color:var(--sc-primary-text-color);cursor:pointer;display:flex;align-items:center;width:5px;padding:.5rem .7rem}.beam_filter-label[data-v-ad8ee21c]{display:flex;align-items:center}svg[data-v-ad8ee21c]{fill:var(--sc-primary-text-color);width:5px;transform:rotate(90deg)}.beam_filter-select-menu[data-v-ad8ee21c]{background-color:#fff;border-top:none;border:1px solid var(--sc-row-border-color);box-sizing:border-box;left:0;list-style:none;margin:0;max-height:200px;overflow-y:scroll;padding:0rem;position:absolute;width:100%;z-index:100}.beam_filter-select-option[data-v-ad8ee21c]{font-size:.8rem;font-family:var(--sc-font-family);font-weight:700;color:var(--sc-primary-text-color);border-bottom:1px solid var(--sc-row-border-color);padding:.5rem}.beam_filter-select-option[data-v-ad8ee21c]:hover{background:var(--sc-primary-color)}.selected[data-v-ad8ee21c],.selected[data-v-ad8ee21c]:hover{background:var(--sc-row-border-color)}.beam_filter-container[data-v-ad8ee21c]{flex-grow:1;max-width:300px;width:50%}@media(max-width:479px){.beam_filter-container[data-v-ad8ee21c]{width:100%;max-width:100%}}.beam_header[data-v-5182a4d5]{border:1px solid transparent;text-align:left;font-size:1.125rem;color:var(--sc-primary-text-color);margin:0;padding:0;font-family:var(--sc-font-family)}.beam_metadata[data-v-80484331]{box-sizing:border-box;display:flex;flex-direction:column;max-height:100vh;color:var(--sc-primary-text-color);font-family:var(--sc-font-family)}.beam_metadata_content[data-v-80484331]{padding-top:10px}.beam_metadata_header[data-v-80484331]{display:flex;flex-direction:row;align-items:baseline;padding:0 30px;justify-content:space-between}.beam_metadata_count[data-v-80484331]{font-size:1.5rem}.beam_metadata_count p[data-v-80484331]{margin:0}.beam_metadata_header-order-num[data-v-80484331]{font-weight:700;font-size:1.5rem}.beam_metadata_block[data-v-80484331]{padding:0 30px;margin:10px 0}.beam_metadata_shipping[data-v-80484331]{display:flex;flex-direction:row;align-items:baseline;justify-content:space-between}.beam_metadata_shipping p[data-v-80484331]{line-height:1.5rem}@media screen and (max-width:600px){.beam_metadata_shipping[data-v-80484331]{flex-direction:column}}.beam_metadata_component_header[data-v-80484331]{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline}.beam_metadata_components[data-v-80484331]{overflow:scroll}hr[data-v-80484331]{display:block;height:1px;border:0;border-top:1px solid var(--sc-row-border-color);margin:1em 0;padding:0}.beam_metadata_heading{font-size:1.125rem;font-weight:700;margin:.625rem 0;color:var(--sc-primary-text-color)}.beam_modal[data-v-55f98302]{position:fixed;inset:0;background-color:#00000080;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:1000;text-align:center;padding:1.25rem}.beam_modal-confirm[data-v-5b430dca]{background:#fff;padding:1.25rem;width:80%;max-width:400px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.beam_modal-confirm button[data-v-5b430dca]{margin:.625rem}.beam_modal-confirm h2[data-v-5b430dca]{border-bottom:1px solid var(--sc-row-border-color);padding-bottom:.625rem;color:var(--sc-primary-text-color)}.fixed-top[data-v-a38a41d0]{position:sticky;top:0;left:0}.container[data-v-ad0dc7dc]{display:block;position:relative;padding-left:2.5ch;margin:0;margin-top:.5rem;cursor:pointer;font-size:2rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container input[data-v-ad0dc7dc]{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.checkmark[data-v-ad0dc7dc]{position:absolute;top:0;left:0;height:2rem;width:2rem;background-color:#eee;outline:2px solid transparent;border:1px solid var(--sc-highlight)}.container:hover input~.checkmark[data-v-ad0dc7dc]{background-color:#fff}.container input:checked~.checkmark[data-v-ad0dc7dc]{background-color:var(--sc-brand-secondary)}.checkmark[data-v-ad0dc7dc]:after{content:"";position:absolute;display:none}.container input:checked~.checkmark[data-v-ad0dc7dc]:after{display:block}.container .checkmark[data-v-ad0dc7dc]:after{left:25%;top:50%;width:.5rem;height:1rem;border:solid var(--sc-text-color);border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg) translate(-50%,-50%)}.beam_item-count[data-v-d4f676ed]{font-size:1.3125rem;color:var(--sc-primary-text-color)}.beam_item-count span[data-v-d4f676ed]{margin:0;padding:0;outline:none}.beam_list-anchor[data-v-7e3ecf0d]{text-decoration:none;outline:none;color:var(--sc-primary-text-color)}.beam_list-item[data-v-634dd647]{padding:.625rem;border-bottom:1px solid var(--sc-row-border-color);max-width:100%;box-sizing:border-box;display:flex;flex-flow:row nowrap;justify-content:space-between;gap:1.25rem;cursor:pointer;outline:2px solid transparent;outline-offset:-1px}.beam_list-item[data-v-634dd647]:focus{outline:2px solid var(--sc-focus-cell-outline);background-color:var(--sc-focus-cell-background)}.beam_list-text[data-v-634dd647]{width:80%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;flex-grow:1;font-size:.875rem;color:var(--sc-primary-text-color)}.beam_list-text label[data-v-634dd647],.beam_list-text p[data-v-634dd647]{overflow:hidden;text-overflow:ellipsis;width:100%;display:block}.beam_list-item label[data-v-634dd647]{display:block}.beam_list-item p[data-v-634dd647]{margin:0}.beam_list-view[data-v-d536b2a7]{font-family:var(--sc-font-family);list-style-type:none;margin-top:1px;margin-left:var(--sc-list-margin);margin-right:var(--sc-list-margin);padding:0}ul.beam_list-view[data-v-d536b2a7]:last-of-type{padding-bottom:2.5em}.beam_navbar[data-v-cfc4c14e]{padding:.625rem;background-color:var(--sc-primary-color);margin-left:0;min-height:2em;max-height:2em;color:var(--sc-primary-text-color);display:flex;flex-flow:row nowrap;align-content:center;justify-content:space-between;align-items:center;position:sticky;top:0;font-family:var(--sc-font-family);border-bottom:1px solid var(--sc-row-border-color)}.beam_navbar h1[data-v-cfc4c14e]{margin-left:.625rem}.segmented-display[data-v-1731e036]{width:100%;padding:1rem;box-sizing:border-box;display:flex;background:var(--sc-segmented-display-background);align-items:center;justify-content:flex-end}.segmented-display-output[data-v-1731e036]{text-align:right;font-family:Segment7,Arimo,sans-serif;font-weight:400;font-size:var(--sc-segemented-display-font-size);padding:0;margin:0;letter-spacing:.3rem;margin-bottom:-.7rem;color:var(--sc-segmented-display-color)}.two-column[data-v-3f65313d]{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline;gap:1rem}@media screen and (max-width:400px){.two-column[data-v-3f65313d]{flex-direction:column;gap:0}}.column[data-v-3f65313d]{flex-grow:1;width:50%}@media screen and (max-width:400px){.column[data-v-3f65313d]{width:100%}}.column-right[data-v-3f65313d]{text-align:right}@media screen and (max-width:400px){.column-right[data-v-3f65313d]{text-align:left}}svg[data-v-05e7abed]{width:100%;overflow:visible;fill:var(--sc-primary-text-color)}.arrow-icon[data-v-05e7abed]{width:.4rem;transform:rotate(0);transform-origin:center;position:relative;transition:all .1s ease-in-out;margin:.5rem;cursor:pointer;display:flex;align-items:center}.open[data-v-05e7abed]{transform:rotate(90deg)}@font-face{font-family:Segment7;src:url(data:font/otf;base64,T1RUTwAOAIAAAwBgQkFTRQAJAAQAACasAAAADkNGRiC5m9MSAAAH7AAAHbpGRlRNa6XwRAAAJrwAAAAcR0RFRgKxAqIAACWoAAAASkdQT1Ou773UAAAmLAAAAH5HU1VCRNhM5gAAJfQAAAA4T1MvMljUYiwAAAFQAAAAYGNtYXAxVzUsAAAFhAAAAkZoZWFkAmNATwAAAOwAAAA2aGhlYQdTAF8AAAEkAAAAJGhtdHgW0g5oAAAm2AAAAgZtYXhwAQFQAAAAAUgAAAAGbmFtZYoOx10AAAGwAAAD0nBvc3QAAAABAAAHzAAAACAAAQAAAAEAAOVWl1RfDzz1AAsD6AAAAADPuH6JAAAAAM+4fokAAP84A9EDIAACAAgAAgAAAAAAAAABAAADIP84AFoCSQAA/ngD0QBkAAUAAAAAAAAAAAAAAAAAAgAAUAABAQAAAAMCSQJYAAUACAKKArsABwCMAooCu//nAd8AMQECAAACAAUJAAAAAAAAAAAAAwAAAAAAAAAAAAAAAFBmRWQAAQAAAP8DIP84AFoDIADIAAAAAQAAAAABwgHCACAAIAACAAAADgCuAAEAAAAAAAAAsQFkAAEAAAAAAAEACAIoAAEAAAAAAAIACAJDAAEAAAAAAAMAIwKUAAEAAAAAAAQACALKAAEAAAAAAAUACQLnAAEAAAAAAAYAEAMTAAMAAQQJAAABYgAAAAMAAQQJAAEAEAIWAAMAAQQJAAIAEAIxAAMAAQQJAAMARgJMAAMAAQQJAAQAEAK4AAMAAQQJAAUAEgLTAAMAAQQJAAYAIALxAFMAdAByAGkAYwB0AGwAeQAgAHMAZQB2AGUAbgAtAHMAZQBnAG0AZQBuAHQAIAAoAHAAbAB1AHMAIABwAG8AaQBuAHQAKQAgAGMAYQBsAGMAdQBsAGEAdABvAHIAIABkAGkAcwBwAGwAYQB5ACAAZgBhAGMAZQAsACAAZgBpAHgAZQBkAC0AdwBpAGQAdABoACAAYQBuAGQAIABmAHIAZQBlAC4AIAAgACgAYwApACAAQwBlAGQAcgBpAGMAIABLAG4AaQBnAGgAdAAgADIAMAAxADQALgAgACAATABpAGMAZQBuAHMAZQBkACAAdQBuAGQAZQByACAAUwBJAEwAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBjAGUAIAB2ADEALgAxAC4AIAAgAFIAZQBzAGUAcgB2AGUAZAAgAG4AYQBtAGUAOgAgAFMAZQBnAG0AZQBuAHQANwAuAABTdHJpY3RseSBzZXZlbi1zZWdtZW50IChwbHVzIHBvaW50KSBjYWxjdWxhdG9yIGRpc3BsYXkgZmFjZSwgZml4ZWQtd2lkdGggYW5kIGZyZWUuICAoYykgQ2VkcmljIEtuaWdodCAyMDE0LiAgTGljZW5zZWQgdW5kZXIgU0lMIE9wZW4gRm9udCBMaWNlbmNlIHYxLjEuICBSZXNlcnZlZCBuYW1lOiBTZWdtZW50Ny4AAFMAZQBnAG0AZQBuAHQANwAAU2VnbWVudDcAAFMAdABhAG4AZABhAHIAZAAAU3RhbmRhcmQAAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAUwBlAGcAbQBlAG4AdAA3ACAAOgAgADcALQA2AC0AMgAwADEANAAARm9udEZvcmdlIDIuMCA6IFNlZ21lbnQ3IDogNy02LTIwMTQAAFMAZQBnAG0AZQBuAHQANwAAU2VnbWVudDcAAFYAZQByAHMAaQBvAG4AIAAgAABWZXJzaW9uICAAAFMAZQBnAG0AZQBuAHQANwBTAHQAYQBuAGQAYQByAGQAAFNlZ21lbnQ3U3RhbmRhcmQAAAAAAAADAAAAAwAAABwAAQAAAAAAPAADAAEAAAAcAAQAIAAAAAQABAABAAAA////AAAAAP//AAEAAQAAAAAABgIKAAAAAAEAAAEAAgADAAQABQAGAAcACAAJAAoACwAMAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5ADoAOwA8AD0APgA/AEAAQQBCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwBgAGEAYgBjAGQAZQBmAGcAaABpAGoAawBsAG0AbgBvAHAAcQByAHMAdAB1AHYAdwB4AHkAegB7AHwAfQB+AH8AgADFAMYAyADKANIA1wDdAOIA4QDjAOUA5ADmAOgA6gDpAOsA7ADuAO0A7wDwAPIA9ADzAPUA9wD2APsA+gD8AP0AAACxAKMApACoAAAAtwDgAK8AqgAAALUAqQAAAMcA2QAAALIAAAAAAKYAtgAAAAAAAAAAAAAAqwC7AAAA5wD5AMAAogCtAAAAAAAAAAAArAC8AAAAoQDBAMQA1gAAAAAAAAAAAAAAAAAAAAAA+AAAAQAAAAAAAAAAAAAAAAAAAAAAALgAAAAAAAAAwwDLAMIAzADJAM4AzwDQAM0A1ADVAAAA0wDbANwA2gAAAAAAAACwAAAAAAAAALkAAAAAAAAAAAADAAD//QAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAQAEBAABAQERU2VnbWVudDdTdGFuZGFyZAABAgABADf4YgD4YwH4ZAL4ZQP4ZgSMDAGIDAKLDAOLDASL+1z6Zfm0BRwDrw8cAAAQHAWwERwAMRwbyBIATAIAAQAIAA8AFgAdACQAKwAyADkAQABHAE4AVQBcAGMAagBxAHgAfwCGAI0AlACbAKIAqQCwALcAvgDFAMwA0wDaAOEA6ADvAPYA/QEEAQsBEgEZASABJwEuATUBPAFDAUoBUQFYAV8BZgFtAXQBewGCAYkBkAGXAZ4BpQGsAbMBugHBAcgBzwHWAd0B5AHrAfIB8gKjAqsCswK7dW5pMDAwMHVuaTAwMDF1bmkwMDAydW5pMDAwM3VuaTAwMDR1bmkwMDA1dW5pMDAwNnVuaTAwMDd1bmkwMDA4dW5pMDAwOXVuaTAwMEF1bmkwMDBCdW5pMDAwQ3VuaTAwMER1bmkwMDBFdW5pMDAwRnVuaTAwMTB1bmkwMDExdW5pMDAxMnVuaTAwMTN1bmkwMDE0dW5pMDAxNXVuaTAwMTZ1bmkwMDE3dW5pMDAxOHVuaTAwMTl1bmkwMDFBdW5pMDAxQnVuaTAwMUN1bmkwMDFEdW5pMDAxRXVuaTAwMUZ1bmkwMDdGdW5pMDA4MHVuaTAwODF1bmkwMDgydW5pMDA4M3VuaTAwODR1bmkwMDg1dW5pMDA4NnVuaTAwODd1bmkwMDg4dW5pMDA4OXVuaTAwOEF1bmkwMDhCdW5pMDA4Q3VuaTAwOER1bmkwMDhFdW5pMDA4RnVuaTAwOTB1bmkwMDkxdW5pMDA5MnVuaTAwOTN1bmkwMDk0dW5pMDA5NXVuaTAwOTZ1bmkwMDk3dW5pMDA5OHVuaTAwOTl1bmkwMDlBdW5pMDA5QnVuaTAwOUN1bmkwMDlEdW5pMDA5RXVuaTAwOUZ1bmkwMEEwdW5pMDBBRHVuaTAwQjJ1bmkwMEIzdW5pMDBCNXVuaTAwQjlTdHJpY3RseSBzZXZlbi1zZWdtZW50IChwbHVzIHBvaW50KSBjYWxjdWxhdG9yIGRpc3BsYXkgZmFjZSwgZml4ZWQtd2lkdGggYW5kIGZyZWUuICAoYykgQ2VkcmljIEtuaWdodCAyMDE0LiAgTGljZW5zZWQgdW5kZXIgU0lMIE9wZW4gRm9udCBMaWNlbmNlIHYxLjEuICBSZXNlcnZlZCBuYW1lOiBTZWdtZW50Ny5TZWdtZW50N1NlZ21lbnQ3U3RhbmRhcmQAAAABhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAAEAAgADAAQABQAGAAcAaAAJAAoACwAMAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5ADoAOwA8AD0APgA/AEAAfABCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAGAAYQBiAGcAZACgAGYAgwCqAIsAagCXAckApQCAAKEAnAHKAcsAfQHMAHMAcgCFAc0AjwB4AJ4AmwCjAHsArgCrAKwAsACtAK8AigCxALUAsgCzALQAuQC2ALcAuACaALoAvgC7ALwAvwC9AKgAjQDEAMEAwgDDAMUAnQCVAMsAyADJAM0AygDMAJAAzgDSAM8A0ADRANYA0wDUANUApwDXANsA2ADZANwA2gCfAJMA4QDeAN8A4ADiAKIA4wEBAgABACIANgA3ADgAOQA6ADsAPAA9AD4APwBAAEEAQgBDAEQARQBGAEcASABJAEoASwBMAE0ATgBPAFAAUQBSAFMAVABVAFYAdgCQALYA7QEmAUgBXgGRAcoB8gIWAjQCQAJOAncCxgLnAyQDZwOWA+AEPARhBMEFDgUaBToFTgViBYAFsgX/BkEGhwa6Bv4HOgdrB7AH7QgJCEIIegihCLkI8QlACXwJsgnLCg0KQgqECsYLGAs2C3gLqgvdDAAMNwxcDGgMewzIDQ4NIg1mDa0N3g4pDloOaQ6iDtoPAQ84D1gPjQ/JEAEQGhBeEJMQwREDEVURkhHWEf8SABIcEh0STxJQElESUhJTElQSVRJWElcSWBJZEloSWxJcEl0SXhJfEmASYRJiEmMSZBJlEmYSZxJoEmkSahJrEmwSbRJuEm8ScBJxEnIScxJ0EnUSdhJ3EngSeRJ6EnsSfBJ9En4SfxKAEq8SsBKxErISsxLqEusS7BLtEu4S7xLwEvES8hLzEvQS9RL2EvcS+BL5EvoS+xL8Ev0S/hL/EwATARMCEwMTBBMFEwYTBxMIEwkTChMLEwwTDRMOEw8TEBMRExITExMUE2ETrhOvE7ATsROyE7MTtBO1E/wT/RP+E/8UABQBFAIUAxQEFAUUBhQHFAgUCRQKFAsUDBQNFA4UDxQQFBEUEou9+EW9Ab29+BW9A70W+Hn4qfx5Br38dxX4RfgV/EUHDvtc+nwBi/plA/tcBPpl+nz+ZQYODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg527/floPfFnxL4O/Z66hNw+KH5jhUgChOIsf0/FSEKDvhJdvfBd593zHcSE9Dd+WEVIgr3+fAVIwoOien3m+ppoPfFnxITgPcf5xUkChPA+3j3+hUlChOw9wz3zBUgCg6J6VOg9/ug94zqOJ8SE6D3H+cVE2AmChOgJwoTKPvS+QUVIgoTMH73CxUoCmT8FxUpChNgKgoOielodvgldveh6kx3n3cSE6D3H+cVE2AmChOgJwoTKPvS+QUVIgoTMH73CxUoCmT8FxUpChNgKgoOr6D3vuppoPfFnxITwPdA+FYVJQrRTRUrChOwm/gwFSAKDvhJdvfud593Evg79hPQ+KH5jhUgCg6J6X929+N3ynb3oepMdxITsPcf5xUkCvvX98IVLAoTcC0KEzRG+AsVIgoTOH73CxUoCg6J6Wh2+CV296HqeXefdxIToPcf5xUTYCYKE6AnChMw+4n5RBUoCmT8FxUpChNgKgoTKJv4MBUgCg6J6feb6n529+53n3cSE4D3H+cVJAoTwPt49/oVJQoTsPcM98wVIAoOxHb30+p+dvfud593EhPA90D4VhUlCtFNFSsKE7Cb+DAVIAoOielodhITgPcf5xUTQCYKE4AnCtb3vBUpChNAKgoO9/fqAfdA+FYVJQoOdu8B+JXqA/jH2hUhCg7bdve86lN3ynb37ncSE6jY+B4VLgoTyKD3ABUlCvcM98wVLwoTmDAKDonpaHa3dvfjd8p296HqTHfMdxITmPcf5xUTWCYKE5gnCvvX98IVLAoTOC0KExpG+AsVIgoTHH73CxUoCmT8FxUpChNYKgoTGZv4MBUgCg7Edvgldvfud593Evgq9xATyPhv+BgVKwoT6Jv4MBUgCg6J6X9297zqU3fKdveh6nl3EhOA9x/nFSQKE1D71/fCFS4KEwSP+EoVKAoTIPvq+9kVJQoTCvcM98wVIAoOielodvfT6n5296HqeXefdxITgPcf5xUTQCYKE4AnChMI+4n5RBUoChMg++r72RUlCtFNFSkKE0AqChMUm/gwFSAKDsR299Pqfnb3wXefd8x3EhO03flhFSIKE8SP+2cVJQrRTRUrCpv4MBUvChOkMAoOielodvfU6X5296HmUHefdxITQPhw+BkVUlx++3jNPZylnve1BRMg++XuFTEK+4333RVJYAUTCDIKExT8Q1AVMwoTgG38zhU0Cg6J6Wh2tnb3vulndrd296HmUHcSE4D3HucVNAoTBfvS+QUVMwp+9wkVSWAFEwIyChMQ++r72hUxCtNOFVJcfvt4BRNANQoTKPxEtRWHgYaBh4EIe/vF576X930FDsR2+CV296HqeXefdxIT4Pcv+aAVKApk/BcVKwoT0Jv4MBUgCg6J6Wh2t3b3vOpTd8p296HqTHfMdxITgAD3H+cVE0AAJgoTgAAnChMoAPvX98IVLgoTBQBG+AsVIgoTAgB+9wsVKAoTEAD76vvZFSUK0U0VKQoTQAAqChMEgJv4MBUgCg6J6Wh299Pqfnb3oepMd593zHcSE4D3H+cVE0AmChOAJwoTFPvS+QUVIgoTCH73CxUoChMg++r72RUlCtFNFSkKE0AqChMRm/gwFSAKDvf36gH3QPhWFSUKDnbv9+Wg98WfEvg79nrqE3D4ofmOFSAKE4ix/T8VIQoO9x/nFSQK+9f3whUuCqD3ABUlCg6J6feb6gH3H+cVJAr7ePf6FSUKDonpU6ASE4D3H+cVE0AmChOAJwrW97wVKQoTQCoKDtt297zqU3fKdveh6nl3EhOg2PgeFS4KE4iP+EoVKAoTwPvq+9kVJQoTlPcM98wVIAoOielToI2g96fqP5+hoPeM6mWfEhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KEwKP+EoVKAoTEPvq+9kVJQrRTRUpChNAKgoTBZv4MBUgCg7Edrd297zqU3fKdveh6kx3zHcSE9DY+B4VLgoTykb4CxUiChPEfvcLFSgKE+D76vvZFSUK0U0VKwoTyZv4MBUgCg6J6VOgjaD3p+o/n6Gg95ifEhOC9x/nFRNCJgoTgicKEyr71/fCFS4KRvgLFXv7qQUTBjYKExKP+2cVJQrRTRUpChNCKgoOielqoPe6n6Gg94zqOJ8SE7D3H+cVJAr71/fCFSwKE3AtChM0RvgLFSIKEzh+9wsVKAoOielToI2g96fqP5+hoPfFnxITgvcf5xUTQiYKE4InChMq+9f3whUuChMSoPcAFSUK0U0VKQoTQioKm/gwFS8KEwYwCg6J6X9297zqU3fKdveh6kx3EhOA9x/nFSQKE1D71/fCFS4KEwpG+AsVIgoTBH73CxUoChMg++r72RUlCg7GoPen6j+foaD3jOo4nxIToNj4HhUuChOURvgLFSIKE4h+9wsVKAoTwPvq+9kVJQoOielodrd29+N3ynb3oepMdxITmPcf5xUTWCYKE5gnCvvX98IVLAoTOC0KExpG+AsVIgoTHH73CxUoCmT8FxUpChNYKgoOr6CNoPen6j+foaD3mJ+knxIT1tj4HhUuCkb4CxV7+6kFE842ChPmj/tnFSUK0U0VKwqb+DAVLwoTzjAKDq+g9/ug98WfAfgq9xAD+G/4GBUrCpv4MBUgCg6J6VOgjaD3up+hoPfFnxITnPcf5xUTXCYKE5wnCvvX98IVLAoTPC0K99i5FSkKE1wqCpv4MBUjCg6voI2g96fqP5+hoPeM6jifEhPQ2PgeFS4KE8pG+AsVIgoTxH73CxUoChPg++r72RUlCtFNFSsKDonpaqD3up+hoPeYnxITuPcf5xUkCvvX98IVLAoTeC0KRvgLFSIKDtj4HhUuCqD3ABUlCtFNFSsKm/gwFSMKDsR2t3b343fKdveh6kx3zHcSE/DY+B4VLgoT9Eb4CxUiChP4fvcLFSgKZPwXFSsKE/Kb+DAVIAoOielToI2g97qfoaD3jOo4n6SfEhOY9x/nFRNYJgoTmCcK+9f3whUsChM4LQoTGkb4CxUiChMcfvcLFSgKZPwXFSkKE1gqChMZm/gwFSAKDsag96fqP5+hoPeM6jifpJ8SE6DY+B4VLgoTlEb4CxUiChOIfvcLFSgKE8D76vvZFSUKE5L3DPfMFSAKDq+g977qaaD3jOo4n6SfEhOo3flhFSIKE5B+9wsVKAoTwPvq+9kVJQrRTRUrChOkm/gwFSAKDsag96fqP58SE6DY+B4VLgoTwKD3ABUlCg6J6VOg97/paaD3jOY8nxITgPce5xU0ChMU+9L5BRUzCn73CRVJYAUTCDIKEyD76vvaFTEK004VUlx++3gFE0A1Cg6J6Wqg96fqP5+hoPeYnxIThPcf5xUkChNU+9f3whUuCkb4CxV7+6kFEww2ChMkj/tnFSUKDonpU6CNoPe6n6Gg95ifpJ8SE573H+cVE14mChOeJwr71/fCFSwKEz4tCkb4CxUiCvfH+6UVKQoTXioKm/gwFSMKDonpU6CNoPe6n6Gg95ifpJ8SE573H+cVE14mChOeJwr71/fCFSwKEz4tCkb4CxUiCvfH+6UVKQoTXioKm/gwFSMKDonpU6CNoPen6j+foaD3mJ+knxITg/cf5xUTQyYKE4MnChMr+9f3whUuCkb4CxV7+6kFEwc2ChMTj/tnFSUK0U0VKQoTQyoKm/gwFS8KEwcwCg6J6feb6vd/6gH3H+cVJAr7iflEFSgK++r72RUlCg6J6VOg977qaaD3mJ+knxIThPcf5xUTRCYKE4QnChMc+9L5BRUiChMkj/tnFSUK0U0VKQoTRCoKm/gwFS8KExQwCg7GoPen6j+foaD3jOplnxIToNj4HhUuChOIj/hKFSgKE8D76vvZFSUKE5T3DPfMFSAKDonpaqD3up+hoPeM6jifEhOw9x/nFSQK+9f3whUsChNwLQoTNEb4CxUiChM4fvcLFSgKDsR299Pqfnb3wXefdxITsN35YRUiChPAj/tnFSUK0U0VKwoOielToPf7oPeM6mWfEhOg9x/nFRNgJgoToCcKEzD7iflEFSgKZPwXFSkKE2AqChMom/gwFSAKDvhJdveh6kx3n3fMdxIToN35YRUiChPAfvcLFSgKE4iWfhUgCg739+oB90D4VhUlCg74NKD3xZ8B+Dv2A/ih+Y4VIAoOielodrd297zqU3fKdveh6nl3EhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KEwKP+EoVKAoTEPvq+9kVJQrRTRUpChNAKgoTBZv4MBUgCg6J6Wh2t3b3vOpTd8p298F3EhOC9x/nFRNCJgoTgicKEyr71/fCFS4KRvgLFXv7qQUTBjYKExKP+2cVJQrRTRUpChNCKgoO9x/nFSQK+9f3whUuCqD3ABUlCg6J6Wh2t3b3vOpTd8p29+53EhOC9x/nFRNCJgoTgicKEyr71/fCFS4KExKg9wAVJQrRTRUpChNCKgqb+DAVLwoTBjAKDonpf3b3vOpTd8p296HqTHfMdxITgPcf5xUkChNQ+9f3whUuChMKRvgLFSIKEwR+9wsVKAoTIPvq+9kVJQoTCfcM98wVIAoO23b3vOpTd8p296HqTHcSE6DY+B4VLgoTlEb4CxUiChOIfvcLFSgKE8D76vvZFSUKDonpU6D3vuppoPeM6jifpJ8SE4D3H+cVE0AmChOAJwoTFPvS+QUVIgoTCH73CxUoChMg++r72RUlCtFNFSkKE0AqChMSm/gwFSAKDsR2t3b3vOpTd8p298F3EhPU2PgeFS4KRvgLFXv7qQUTzDYKE+SP+2cVJQrRTRUrCg7EdgH4KvID+G/4GBUrCg6J6Wh2t3b343fKdvfudxITnPcf5xUTXCYKE5wnCvvX98IVLAoTPC0K99i5FSkKE1wqCpv4MBUjCg7Edrd297zqU3fKdveh6kx3EhPQ2PgeFS4KE8pG+AsVIgoTxH73CxUoChPg++r72RUlCtFNFSsKDonpf3b343fKdvfBdxITuPcf5xUkCvvX98IVLAoTeC0KRvgLFSIKDtt297zqU3fKdvfBd8x3EhOs2PgeFS4KRvgLFXv7qQUTnDYKE8yP+2cVJQr3DPfMFS8KE5wwCg7Edrd297zqU3cSE9DY+B4VLgoT4KD3ABUlCtFNFSsKDonpaHa3dve86lN3EhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KExCg9wAVJQrRTRUpChNAKgoO23b3vOpTd8p296HqTHfMdxIToNj4HhUuChOURvgLFSIKE4h+9wsVKAoTwPvq+9kVJQoTkvcM98wVIAoOxHb30+p+dveh6kx3n3fMdxITqN35YRUiChOQfvcLFSgKE8D76vvZFSUK0U0VKwoTopv4MBUgCg7bdve86lN3EhOg2PgeFS4KE8Cg9wAVJQoOielodvfU6X5296HmUHefdxITgPce5xU0ChMU+9L5BRUzCn73CRVJYAUTCDIKEyD76vvaFTEK004VUlx++3gFE0A1Cg6J6X9297zqU3fKdvfBdxIThPcf5xUkChNU+9f3whUuCkb4CxV7+6kFEww2ChMkj/tnFSUKDonpaHa3dvfjdxITkPcf5xUTUCYKE5AnCvvX98IVLAoTMC0K99i5FSkKE1AqCg6J6Wh2t3b343fKdvfBd8x3EhOe9x/nFRNeJgoTnicK+9f3whUsChM+LQpG+AsVIgr3x/ulFSkKE14qCpv4MBUjCg6J6Wh2t3b3vOpTd8p298F3zHcSE4P3H+cVE0MmChODJwoTK/vX98IVLgpG+AsVe/upBRMHNgoTE4/7ZxUlCtFNFSkKE0MqCpv4MBUvChMHMAoOxHa3dve86lN3ynb3wXfMdxIT1tj4HhUuCkb4CxV7+6kFE842ChPmj/tnFSUK0U0VKwqb+DAVLwoTzjAKDonpaHb30+p+dvfBd593zHcSE4L3H+cVE0ImChOCJwoTGvvS+QUVIgoTIo/7ZxUlCtFNFSkKE0IqCpv4MBUvChMSMAoOxqD3p+o/n6Gg98WfEhOo2PgeFS4KE8ig9wAVJQr3DPfMFS8KE5gwCg4Or6D3+6D3xZ8B+Cr3EAP4b/gYFSsKm/gwFSAKDg6J6X929+N3ynb3oep5dxITsPcf5xUkCvvX98IVLAoTcC0KEziP+EoVKAoTNJZ+FSAKDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg739+ppoPeM6jifpJ8SE4D3QPhWFSUKE1D71/efFSIKE2B+9wsVKAoTSJZ+FSAKDg4ODg7GoPen6j+foaD3mJ+knxITrNj4HhUuCkb4CxV7+6kFE5w2ChPMj/tnFSUK9wz3zBUvChOcMAoODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OielToI2g96fqP5+hoPeM6mWfEhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KEwKP+EoVKAoTEPvq+9kVJQrRTRUpChNAKgoTBZv4MBUgCg6J6VOgjaD3p+o/n6Gg94zqZZ8SE4D3H+cVE0AmChOAJwoTKPvX98IVLgoTAo/4ShUoChMQ++r72RUlCtFNFSkKE0AqChMFm/gwFSAKDg4ODg4ODg6J6Wqg96fqP5+hoPeM6jifpJ8SE4D3H+cVJAoTUPvX98IVLgoTCkb4CxUiChMEfvcLFSgKEyD76vvZFSUKEwn3DPfMFSAKDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg743RSLFYmx+T24nIwGHgoCLwwJiwwK6gqfjNGOjJD6GAwM+mUL6pOPnPnpDA0cADETABcCAAEAGgAsADgAUAB+AJEAngDBAMwA0wDcAOoA8gD8AQ0BFAEnAToBQwFPAX0BhgGPMTF/+2rDYa6wBZDukeqQ7giLkIiRiZAIC291dm1voHakp6Cgqad3oHIfC3v7qZZz2rqX91oFCzExf/tqw2GusAWQ7pHqkO6LkIiRiZAICy9Ti4oFi4aPiI6IkoKSg5KCCNKL9yKL90CLBZKOjY4fi42JjYiOdqV0qXalCAs7XwWgeqN8oHgI94yLy7dKvgULL1OLigWLho+IjogIC5KCkoOSggjSi/cii/dAiwWSjo2OH4uNiY2IjnaldKl2pQgLSF7bWfeTi+blBQtSXX/7dwULzTydpZ73tAULUl1/+3fNPJ2lnve0BQuIgYOAiIEIC3v7xOe9l/d9BQuIgYOAiIEIe/vE572X930FCzExf/tqBQvDYa6wBZDukeqQ7ouQiJGJkAgLPF8FoXqhfKF5CPeMi8u2Sb4FC9tY95KL5eYFC3z7qJVy27qW91sFCy9Ui4kFi4aQiI6HkoOSgpKDCNOL9yGL90CLBZKPjY4fi42JjYiOdqZzp3amCAvNPZylnve1BQuWc9q6l/daBQsAAAABAAAAAAAAAA4AFgAAAAQAAAACAAAAAgAIADEAOgABAEAAQAACAEIAQgACAEYARgACAE8ATwACAFkAWQACAGIAcwACAHUAegACAAAAAQAAAAoAHAAeAAFERkxUAAgABAAAAAD//wAAAAAAAQAEAAEACAABAAgAAQAGACAAAQACAEcASwABAAAACgAeACwAAURGTFQACAAEAAAAAP//AAEAAAABa2VybgAIAAAAAQABAAIABgAOAAEAAAABABAAAgAAAAEAFgABAAgABP22AAEAAQAvAAEAJAAEAAAACgAeAB4AHgAeAB4AHgAeAB4AHgAeAAEAL/22AAIAAQAxADoAAAAAAAEAAAAIAAAAAAAEAAAAAAAAAAEAAAAAzD2izwAAAADPr89TAAAAAM+4fiECSQAAAkkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpwBCAC8ALwAvAFwBpwAvAC8ALwBcAC8AXAIBAC8ALwGWAC8ALwBCAC4ALgBYAC8ALwBcAacALwAvAC8ALwAvAC8ALwAvAC8ALwAvAC8ALwGWAC8ALwAvAC8ALwAvAC8AQgAvAC4ALwAvAC8ALwAvAC8ALwAvAEIALwBCAFwBpwAvAC8ALwAvAC8ALwAvAC8BlgAvAC8ALwAvAC8ALwAvAEIALwAuAC8ALwAvAC8ALwAvAC8AAAGWAAAALwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEIAAAAAAAAAAAAvAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC8ALwAAAAAAAAAAAAAAAAAAAC8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA)}:root{--sc-primary-color: #f2f2f2;--sc-primary-text-color: #666666;--sc-alert: #e63c28;--sc-success: #155724;--sc-warning: #f0f34f;--sc-font-family: Arimo, Arial, sans-serif;--sc-row-border-color: #ccc;--sc-btn-color: white;--sc-btn-border: #ccc;--sc-btn-label-color: black;--sc-list-margin: .625rem;--sc-cell-changed-color: #d8edff;--sc-segemented-display-font-size: 4.5rem;--sc-segmented-display-background: #404040;--sc-segmented-display-color: #b0b0b0}.beam_copy{color:var(--sc-primary-text-color);font-size:1rem;line-height:1.5rem;font-family:var(--sc-font-family)}.beam--bold{font-weight:700}.beam--normal{font-weight:400}.beam--alert{color:var(--sc-alert)}.beam--warning{color:var(--sc-warning)}.beam--success{color:var(--sc-success)}.v-toast__item{border-radius:0;color:#fff;font-family:var(--sc-font-family)}.v-toast__item--success{background-color:var(--sc-success)!important;color:#fff}.v-toast__item--info{background-color:var(--sc-primary-text-color)!important}.v-toast__item--warning{background-color:var(--sc-warning)!important;color:#fff}.v-toast__item--error{background-color:var(--sc-alert)!important;color:#fff}.v-toast__item--default{background-color:var(--sc-primary-text-color)!important}
2
- /*$vite$:1*/`,document.head.appendChild(hi);const Zs={class:"beam_action-footer"},Xs={class:"footer-action-wrapper"},ea=C.defineComponent({__name:"ActionFooter",emits:["click"],setup(i,{emit:h}){const o=h,a=()=>{o("click")};return(l,t)=>{const e=C.resolveComponent("BeamBtn");return C.openBlock(),C.createElementBlock("footer",Zs,[C.createElementVNode("span",Xs,[C.createVNode(e,{onClick:a},{default:C.withCtx(()=>[C.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3})])])}}}),Fe=(i,h)=>{const o=i.__vccOpts||i;for(const[a,l]of h)o[a]=l;return o},fi=Fe(ea,[["__scopeId","data-v-37933bd1"]]),ta={class:"beam_metadata_arrow"},ra={class:"beam_metadata_arrow-head"},na={id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6.74 7.78"},di=Fe(C.defineComponent({__name:"BeamArrow",props:{color:{default:"#c4c4c4"}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("div",ta,[C.createElementVNode("div",{class:"beam_metadata_arrow-body",style:C.normalizeStyle({background:i.color})},null,4),C.createElementVNode("div",ra,[(C.openBlock(),C.createElementBlock("svg",na,[C.createElementVNode("polygon",{points:"6.74 3.89 0 0 0 7.78 6.74 3.89",style:C.normalizeStyle([{fill:"#c4c4c4"},{fill:i.color}])},null,4)]))])]))}}),[["__scopeId","data-v-2b1d7448"]]),ia={},oa={class:"beam_btn"};function sa(i,h){return C.openBlock(),C.createElementBlock("button",oa,[C.renderSlot(i.$slots,"default",{},()=>[h[0]||(h[0]=C.createTextVNode("Action",-1))],!0)])}const pi=Fe(ia,[["render",sa],["__scopeId","data-v-bc768596"]]),aa={class:"beam_day-divider"},gr=Fe(C.defineComponent({__name:"BeamDayDivider",props:{item:{}},setup(i){const h=C.computed(()=>{if(!i.item.date||isNaN(Date.parse(i.item.date)))return i.item.date;const o=new Date(i.item.date);return i.item.dateFormat&&i.item.dateFormat.toLowerCase()==="iso"?o.toISOString():o.toDateString()});return(o,a)=>(C.openBlock(),C.createElementBlock(C.Fragment,null,[C.createElementVNode("div",aa,[C.createElementVNode("h2",null,C.toDisplayString(h.value),1)]),C.renderSlot(o.$slots,"default",{},void 0,!0)],64))}}),[["__scopeId","data-v-160cf6ef"]]),la={class:"beam_filters"},ua={class:"beam_filters-options"},gi=Fe(C.defineComponent({__name:"BeamFilter",setup(i){const h=C.ref(!1);return(o,a)=>{const l=C.resolveComponent("ToggleArrow"),t=C.resolveComponent("BeamHeading");return C.openBlock(),C.createElementBlock("div",la,[C.createElementVNode("div",{class:"beam_filters-heading",onClick:a[0]||(a[0]=e=>h.value=!h.value)},[C.createVNode(l,{open:h.value},null,8,["open"]),C.createVNode(t,null,{default:C.withCtx(()=>[...a[1]||(a[1]=[C.createTextVNode("Filter",-1)])]),_:1})]),C.withDirectives(C.createElementVNode("div",ua,[C.renderSlot(o.$slots,"default",{},void 0,!0)],512),[[C.vShow,h.value]])])}}}),[["__scopeId","data-v-f8d60c9f"]]);function ca(i,h){return C.getCurrentScope()?(C.onScopeDispose(i,h),!0):!1}const ha=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fa=Object.prototype.toString,da=i=>fa.call(i)==="[object Object]",bt=()=>{};function pa(...i){if(i.length!==1)return C.toRef(...i);const h=i[0];return typeof h=="function"?C.readonly(C.customRef(()=>({get:h,set:bt}))):C.ref(h)}function ga(i,h){function o(...a){return new Promise((l,t)=>{Promise.resolve(i(()=>h.apply(this,a),{fn:h,thisArg:this,args:a})).then(l).catch(t)})}return o}function ma(i,h={}){let o,a,l=bt;const t=r=>{clearTimeout(r),l(),l=bt};let e;return r=>{const s=C.toValue(i),u=C.toValue(h.maxWait);return o&&t(o),s<=0||u!==void 0&&u<=0?(a&&(t(a),a=void 0),Promise.resolve(r())):new Promise((d,p)=>{l=h.rejectOnCancel?p:d,e=r,u&&!a&&(a=setTimeout(()=>{o&&t(o),a=void 0,d(e())},u)),o=setTimeout(()=>{a&&t(a),a=void 0,d(r())},s)})}}function mr(i){return Array.isArray(i)?i:[i]}function Aa(i,h=200,o={}){return ga(ma(h,o),i)}function ba(i,h,o){return C.watch(i,h,{...o,immediate:!0})}const mi=ha?window:void 0;function Nt(i){var h;const o=C.toValue(i);return(h=o?.$el)!==null&&h!==void 0?h:o}function Ar(...i){const h=(a,l,t,e)=>(a.addEventListener(l,t,e),()=>a.removeEventListener(l,t,e)),o=C.computed(()=>{const a=mr(C.toValue(i[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0});return ba(()=>{var a,l;return[(a=(l=o.value)===null||l===void 0?void 0:l.map(t=>Nt(t)))!==null&&a!==void 0?a:[mi].filter(t=>t!=null),mr(C.toValue(o.value?i[1]:i[0])),mr(C.unref(o.value?i[2]:i[1])),C.toValue(o.value?i[3]:i[2])]},([a,l,t,e],n,r)=>{if(!a?.length||!l?.length||!t?.length)return;const s=da(e)?{...e}:e,u=a.flatMap(d=>l.flatMap(p=>t.map(g=>h(d,p,g,s))));r(()=>{u.forEach(d=>d())})},{flush:"post"})}function Ai(i,h,o={}){const{window:a=mi,ignore:l=[],capture:t=!0,detectIframe:e=!1,controls:n=!1}=o;if(!a)return n?{stop:bt,cancel:bt,trigger:bt}:bt;let r=!0;const s=y=>C.toValue(l).some(_=>{if(typeof _=="string")return Array.from(a.document.querySelectorAll(_)).some(A=>A===y.target||y.composedPath().includes(A));{const A=Nt(_);return A&&(y.target===A||y.composedPath().includes(A))}});function u(y){const _=C.toValue(y);return _&&_.$.subTree.shapeFlag===16}function d(y,_){const A=C.toValue(y),w=A.$.subTree&&A.$.subTree.children;return w==null||!Array.isArray(w)?!1:w.some(I=>I.el===_.target||_.composedPath().includes(I.el))}const p=y=>{const _=Nt(i);if(y.target!=null&&!(!(_ instanceof Element)&&u(i)&&d(i,y))&&!(!_||_===y.target||y.composedPath().includes(_))){if("detail"in y&&y.detail===0&&(r=!s(y)),!r){r=!0;return}h(y)}};let g=!1;const f=[Ar(a,"click",y=>{g||(g=!0,setTimeout(()=>{g=!1},0),p(y))},{passive:!0,capture:t}),Ar(a,"pointerdown",y=>{const _=Nt(i);r=!s(y)&&!!(_&&!y.composedPath().includes(_))},{passive:!0}),e&&Ar(a,"blur",y=>{setTimeout(()=>{var _;const A=Nt(i);((_=a.document.activeElement)===null||_===void 0?void 0:_.tagName)==="IFRAME"&&!A?.contains(a.document.activeElement)&&h(y)},0)},{passive:!0})].filter(Boolean),b=()=>f.forEach(y=>y());return n?{stop:b,cancel:()=>{r=!1},trigger:y=>{r=!0,p(y),r=!1}}:b}function br(i){return typeof Window<"u"&&i instanceof Window?i.document.documentElement:typeof Document<"u"&&i instanceof Document?i.documentElement:i}const yr=new WeakMap;function ya(i,h=!1){const o=C.shallowRef(h);let a="";C.watch(pa(i),e=>{const n=br(C.toValue(e));if(n){const r=n;if(yr.get(r)||yr.set(r,r.style.overflow),r.style.overflow!=="hidden"&&(a=r.style.overflow),r.style.overflow==="hidden")return o.value=!0;if(o.value)return r.style.overflow="hidden"}},{immediate:!0});const l=()=>{const e=br(C.toValue(i));!e||o.value||(e.style.overflow="hidden",o.value=!0)},t=()=>{const e=br(C.toValue(i));!e||!o.value||(e.style.overflow=a,yr.delete(e),o.value=!1)};return ca(t),C.computed({get(){return o.value},set(e){e?l():t()}})}const wr=new WeakMap,wa={mounted(i,h){const o=!h.modifiers.bubble;let a;if(typeof h.value=="function")a=Ai(i,h.value,{capture:o});else{const[l,t]=h.value;a=Ai(i,l,Object.assign({capture:o},t))}wr.set(i,a)},unmounted(i){const h=wr.get(i);h&&typeof h=="function"?h():h?.stop(),wr.delete(i)}};function va(){let i=!1;const h=C.shallowRef(!1);return(o,a)=>{if(h.value=a.value,i)return;i=!0;const l=ya(o,a.value);C.watch(h,t=>l.value=t)}}va();const _a={class:"beam_filter-container"},Ea={class:"beam_filter-option-select"},Sa={class:"beam_filter-label"},Ca={key:0,ref:"menu",class:"beam_filter-select-menu"},ka=["data-value","onClick"],bi=Fe(C.defineComponent({__name:"BeamFilterOption",props:{choices:{},title:{default:"title"}},emits:["select"],setup(i,{emit:h}){const o=h,a=C.ref(!1),l=C.ref(i.choices[0].label),t=C.ref(i.choices[0].value),e=n=>{l.value=n.label,t.value=n.value,o("select",n)};return(n,r)=>{const s=C.resolveComponent("BeamHeading");return C.withDirectives((C.openBlock(),C.createElementBlock("div",_a,[C.createVNode(s,{class:"beam_filter-option-heading"},{default:C.withCtx(()=>[C.createTextVNode(C.toDisplayString(i.title),1)]),_:1}),C.createElementVNode("div",{class:"beam_filter-option",onClick:r[0]||(r[0]=u=>a.value=!a.value)},[C.createElementVNode("div",Ea,[r[1]||(r[1]=C.createElementVNode("div",{class:"beam_filter-arrow"},[C.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[C.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})])],-1)),C.createElementVNode("div",Sa,[C.createElementVNode("label",null,C.toDisplayString(l.value),1)])]),a.value?(C.openBlock(),C.createElementBlock("ul",Ca,[(C.openBlock(!0),C.createElementBlock(C.Fragment,null,C.renderList(i.choices,u=>(C.openBlock(),C.createElementBlock("li",{key:u.value,class:C.normalizeClass([{selected:l.value==u.label},"beam_filter-select-option"]),"data-value":u.value,onClick:d=>e(u)},C.toDisplayString(u.label),11,ka))),128))],512)):C.createCommentVNode("",!0)])])),[[C.unref(wa),()=>a.value=!1]])}}}),[["__scopeId","data-v-ad8ee21c"]]),Ta={},Ia={class:"beam_header"};function Ba(i,h){return C.openBlock(),C.createElementBlock("h1",Ia,[C.renderSlot(i.$slots,"default",{},void 0,!0)])}const yi=Fe(Ta,[["render",Ba],["__scopeId","data-v-5182a4d5"]]),Oa={class:"beam_metadata"},xa={class:"beam_metadata_content"},Pa={class:"beam_metadata_block"},Ra={class:"beam_metadata_heading"},wi=Fe(C.defineComponent({__name:"BeamMetadata",props:{order:{}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("div",Oa,[C.createElementVNode("div",xa,[C.renderSlot(h.$slots,"default",{},()=>[o[1]||(o[1]=C.createElementVNode("div",{class:"beam_metadata_header beam_metadata--two-column"},null,-1)),C.createElementVNode("div",Pa,[C.createElementVNode("p",Ra,[o[0]||(o[0]=C.createTextVNode(" Status: ",-1)),C.createElementVNode("span",{class:C.normalizeClass([{alert:!i.order.complete},"beam_metadata--normal"])},C.toDisplayString(i.order.complete?"Complete":"In Progress"),3)])]),o[2]||(o[2]=C.createStaticVNode('<div class="beam_metadata_shipping beam_metadata_block" data-v-80484331><div class="beam_metadata_source" data-v-80484331><p class="beam_metadata_heading" data-v-80484331>Source</p></div><div class="beam_metadata_source" data-v-80484331><p class="beam_metadata_heading" data-v-80484331>Receiving</p></div></div>',1))],!0)]),o[3]||(o[3]=C.createElementVNode("hr",null,null,-1))]))}}),[["__scopeId","data-v-80484331"]]),Ma={class:"beam_modal"},vi=Fe(C.defineComponent({__name:"BeamModal",props:{showModal:{type:Boolean}},emits:["closemodal","confirmmodal"],setup(i){return(h,o)=>{const a=C.resolveComponent("BeamBtn"),l=C.resolveComponent("portal");return C.openBlock(),C.createBlock(l,{to:"beam_modal_outlet"},{default:C.withCtx(()=>[C.withDirectives(C.createElementVNode("div",Ma,[C.createVNode(a,{onClick:o[0]||(o[0]=t=>h.$emit("closemodal"))},{default:C.withCtx(()=>[...o[3]||(o[3]=[C.createTextVNode("Close Modal",-1)])]),_:1}),C.renderSlot(h.$slots,"default",{onClosemodal:o[1]||(o[1]=t=>h.$emit("closemodal")),onConfirmmodal:o[2]||(o[2]=t=>h.$emit("confirmmodal"))},void 0,!0)],512),[[C.vShow,i.showModal]])]),_:3})}}}),[["__scopeId","data-v-55f98302"]]),_i=C.defineComponent({__name:"BeamModalOutlet",emits:["confirmmodal","closemodal"],setup(i){return(h,o)=>{const a=C.resolveComponent("portal-target");return C.openBlock(),C.createBlock(a,{name:"beam_modal_outlet"})}}}),Ua={class:"beam_metadata_heading"},Ei=C.defineComponent({__name:"BeamProgress",props:{label:{default:"Status"},progressMessage:{default:"In Progress"},completeMessage:{default:"Complete"},complete:{type:Boolean,default:!1}},setup(i){const h=C.computed(()=>i.complete?i.completeMessage:i.progressMessage);return(o,a)=>(C.openBlock(),C.createElementBlock("p",Ua,[C.createTextVNode(C.toDisplayString(i.label)+": ",1),C.createElementVNode("span",{class:C.normalizeClass([{"beam--alert":!i.complete},"beam--normal"])},C.toDisplayString(h.value),3)]))}}),Da={},La={class:"beam_modal-confirm"};function Na(i,h){const o=C.resolveComponent("BeamBtn");return C.openBlock(),C.createElementBlock("div",La,[h[4]||(h[4]=C.createElementVNode("h2",null,"Would you like to continue?",-1)),C.createVNode(o,{onClick:h[0]||(h[0]=a=>i.$emit("confirmmodal"))},{default:C.withCtx(()=>[...h[2]||(h[2]=[C.createTextVNode("Yes",-1)])]),_:1}),C.createVNode(o,{onClick:h[1]||(h[1]=a=>i.$emit("confirmmodal"))},{default:C.withCtx(()=>[...h[3]||(h[3]=[C.createTextVNode("No",-1)])]),_:1})])}const Si=Fe(Da,[["render",Na],["__scopeId","data-v-5b430dca"]]),Fa={},ja={class:"fixed-top"};function Wa(i,h){return C.openBlock(),C.createElementBlock("div",ja,[C.renderSlot(i.$slots,"default",{},void 0,!0)])}const Ci=Fe(Fa,[["render",Wa],["__scopeId","data-v-a38a41d0"]]),Va={class:"container"},vr=Fe(C.defineComponent({__name:"ItemCheck",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(i){const h=C.useModel(i,"modelValue");return(o,a)=>(C.openBlock(),C.createElementBlock("label",Va,[C.withDirectives(C.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>h.value=l),type:"checkbox",tabindex:"-1"},null,512),[[C.vModelCheckbox,h.value]]),a[1]||(a[1]=C.createElementVNode("div",{class:"checkmark",tabindex:"0"},null,-1))]))}}),[["__scopeId","data-v-ad0dc7dc"]]),Qa={class:"beam_item-count"},Ka=["contenteditable"],Ha={key:0},qa={key:1},_r=Fe(C.defineComponent({__name:"ItemCount",props:C.mergeModels({denominator:{default:0},debounce:{default:300},editable:{default:!0},uom:{default:""}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const h=C.useModel(i,"modelValue"),o=C.computed(()=>i.denominator!==0&&h.value===i.denominator),a=e=>{const n=Number(e.target.innerHTML)||0;h.value=i.denominator?Math.min(n,i.denominator):n},l=Aa(e=>a(e),i.debounce),t=async e=>await l(e);return(e,n)=>(C.openBlock(),C.createElementBlock("div",Qa,[C.createElementVNode("span",{contenteditable:i.editable,class:C.normalizeClass({"beam--alert":!o.value}),onClick:C.withModifiers(a,["stop","prevent"]),onInput:C.withModifiers(t,["stop","prevent"]),onPaste:a},C.toDisplayString(h.value),43,Ka),i.denominator?(C.openBlock(),C.createElementBlock("span",Ha,"/"+C.toDisplayString(i.denominator),1)):C.createCommentVNode("",!0),i.uom?(C.openBlock(),C.createElementBlock("span",qa,"  "+C.toDisplayString(i.uom),1)):C.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-d4f676ed"]]),$a=["href"],ki=Fe(C.defineComponent({__name:"ListAnchor",props:{to:{default:""}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("a",{href:i.to,class:"beam_list-anchor"},[C.renderSlot(h.$slots,"default",{},void 0,!0)],8,$a))}}),[["__scopeId","data-v-7e3ecf0d"]]),za={tabindex:"0",class:"beam_list-item"},Ga={class:"beam_list-text"},Ya={class:"beam--bold"},zt=Fe(C.defineComponent({__name:"ListItem",props:{item:{}},emits:["update"],setup(i,{emit:h}){const o=h,a=C.ref(i.item);return C.watch(a,l=>{o("update",l)},{deep:!0}),(l,t)=>(C.openBlock(),C.createElementBlock("li",za,[C.createElementVNode("div",Ga,[C.createElementVNode("label",Ya,C.toDisplayString(a.value.label),1),C.createElementVNode("p",null,C.toDisplayString(a.value.description),1)]),a.value.count?(C.openBlock(),C.createBlock(_r,{key:0,modelValue:a.value.count.count,"onUpdate:modelValue":t[0]||(t[0]=e=>a.value.count.count=e),debounce:a.value.debounce,denominator:a.value.count.of,editable:!0,uom:a.value.count.uom},null,8,["modelValue","debounce","denominator","uom"])):C.createCommentVNode("",!0),a.value.hasOwnProperty("checked")?(C.openBlock(),C.createBlock(vr,{key:1,modelValue:a.value.checked,"onUpdate:modelValue":t[1]||(t[1]=e=>a.value.checked=e)},null,8,["modelValue"])):C.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-634dd647"]]),Ja={class:"beam_list-view"},Ti=Fe(C.defineComponent({__name:"ListView",props:{items:{}},emits:["update","scrollbottom"],setup(i,{emit:h}){const o=h;C.onMounted(()=>{window.addEventListener("scroll",l)}),C.onUnmounted(()=>{window.removeEventListener("scroll",l)});const a=t=>o("update",t),l=()=>{const t=document.documentElement.scrollHeight-window.innerHeight,e=document.documentElement.scrollTop;t-e<=2&&o("scrollbottom")};return(t,e)=>(C.openBlock(),C.createElementBlock("ul",Ja,[(C.openBlock(!0),C.createElementBlock(C.Fragment,null,C.renderList(i.items,n=>(C.openBlock(),C.createElementBlock("li",{key:n.barcode||n.label},[n.linkComponent=="BeamDayDivider"?(C.openBlock(),C.createBlock(gr,{key:0,item:n},null,8,["item"])):n.linkComponent?(C.openBlock(),C.createBlock(C.resolveDynamicComponent(n.linkComponent),{key:1,to:n.route,tabindex:"-1"},{default:C.withCtx(()=>[C.createVNode(zt,{item:n,onUpdate:a},null,8,["item"])]),_:2},1032,["to"])):(C.openBlock(),C.createBlock(zt,{key:2,item:n,onUpdate:a},null,8,["item"]))]))),128))]))}}),[["__scopeId","data-v-d536b2a7"]]),Za={class:"beam_navbar"},Ii=Fe(C.defineComponent({__name:"Navbar",emits:["click"],setup(i,{emit:h}){const o=h,a=()=>{o("click")};return(l,t)=>{const e=C.resolveComponent("BeamHeading"),n=C.resolveComponent("BeamBtn");return C.openBlock(),C.createElementBlock("nav",Za,[C.renderSlot(l.$slots,"title",{},()=>[C.createVNode(e,null,{default:C.withCtx(()=>[...t[0]||(t[0]=[C.createTextVNode("TITLE",-1)])]),_:1})],!0),C.createVNode(n,{onClick:a},{default:C.withCtx(()=>[C.renderSlot(l.$slots,"navbaraction",{},()=>[t[1]||(t[1]=C.createTextVNode("Action",-1))],!0)]),_:3})])}}}),[["__scopeId","data-v-cfc4c14e"]]);function Xa(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Gt={exports:{}},el=Gt.exports,Bi;function tl(){return Bi||(Bi=1,(function(i,h){(function(o,a){i.exports=a()})(el,(function(){var o={attachTo:function(a,l){if(a.scannerDetectionData!==void 0)throw new Error("onScan.js is already initialized for DOM element "+a);var t={onScan:function(e,n){},onScanError:function(e){},onKeyProcess:function(e,n){},onKeyDetect:function(e,n){},onPaste:function(e,n){},keyCodeMapper:function(e){return o.decodeKeyEvent(e)},onScanButtonLongPress:function(){},scanButtonKeyCode:!1,scanButtonLongPressTime:500,timeBeforeScanTest:100,avgTimeByChar:30,minLength:6,suffixKeyCodes:[9,13],prefixKeyCodes:[],ignoreIfFocusOn:!1,stopPropagation:!1,preventDefault:!1,captureEvents:!1,reactToKeydown:!0,reactToPaste:!1,singleScanQty:1};return l=this._mergeOptions(t,l),a.scannerDetectionData={options:l,vars:{firstCharTime:0,lastCharTime:0,accumulatedString:"",testTimer:!1,longPressTimeStart:0,longPressed:!1}},l.reactToPaste===!0&&a.addEventListener("paste",this._handlePaste,l.captureEvents),l.scanButtonKeyCode!==!1&&a.addEventListener("keyup",this._handleKeyUp,l.captureEvents),(l.reactToKeydown===!0||l.scanButtonKeyCode!==!1)&&a.addEventListener("keydown",this._handleKeyDown,l.captureEvents),this},detachFrom:function(a){a.scannerDetectionData.options.reactToPaste&&a.removeEventListener("paste",this._handlePaste),a.scannerDetectionData.options.scanButtonKeyCode!==!1&&a.removeEventListener("keyup",this._handleKeyUp),a.removeEventListener("keydown",this._handleKeyDown),a.scannerDetectionData=void 0},getOptions:function(a){return a.scannerDetectionData.options},setOptions:function(a,l){switch(a.scannerDetectionData.options.reactToPaste){case!0:l.reactToPaste===!1&&a.removeEventListener("paste",this._handlePaste);break;case!1:l.reactToPaste===!0&&a.addEventListener("paste",this._handlePaste);break}return a.scannerDetectionData.options.scanButtonKeyCode===!1?l.scanButtonKeyCode!==!1&&a.addEventListener("keyup",this._handleKeyUp):l.scanButtonKeyCode===!1&&a.removeEventListener("keyup",this._handleKeyUp),a.scannerDetectionData.options=this._mergeOptions(a.scannerDetectionData.options,l),this._reinitialize(a),this},decodeKeyEvent:function(a){var l=this._getNormalizedKeyNum(a);switch(!0){case(l>=48&&l<=90):case(l>=106&&l<=111):if(a.key!==void 0&&a.key!=="")return a.key;var t=String.fromCharCode(l);switch(a.shiftKey){case!1:t=t.toLowerCase();break;case!0:t=t.toUpperCase();break}return t;case(l>=96&&l<=105):return 0+(l-96)}return""},simulate:function(a,l){return this._reinitialize(a),Array.isArray(l)?l.forEach(function(t){var e={};(typeof t=="object"||typeof t=="function")&&t!==null?e=t:e.keyCode=parseInt(t);var n=new KeyboardEvent("keydown",e);document.dispatchEvent(n)}):this._validateScanCode(a,l),this},_reinitialize:function(a){var l=a.scannerDetectionData.vars;l.firstCharTime=0,l.lastCharTime=0,l.accumulatedString=""},_isFocusOnIgnoredElement:function(a){var l=a.scannerDetectionData.options.ignoreIfFocusOn;if(!l)return!1;var t=document.activeElement;if(Array.isArray(l)){for(var e=0;e<l.length;e++)if(t.matches(l[e])===!0)return!0}else if(t.matches(l))return!0;return!1},_validateScanCode:function(a,l){var t=a.scannerDetectionData,e=t.options,n=t.options.singleScanQty,r=t.vars.firstCharTime,s=t.vars.lastCharTime,u={},d;switch(!0){case l.length<e.minLength:u={message:"Receieved code is shorter then minimal length"};break;case s-r>l.length*e.avgTimeByChar:u={message:"Receieved code was not entered in time"};break;default:return e.onScan.call(a,l,n),d=new CustomEvent("scan",{detail:{scanCode:l,qty:n}}),a.dispatchEvent(d),o._reinitialize(a),!0}return u.scanCode=l,u.scanDuration=s-r,u.avgTimeByChar=e.avgTimeByChar,u.minLength=e.minLength,e.onScanError.call(a,u),d=new CustomEvent("scanError",{detail:u}),a.dispatchEvent(d),o._reinitialize(a),!1},_mergeOptions:function(a,l){var t={},e;for(e in a)Object.prototype.hasOwnProperty.call(a,e)&&(t[e]=a[e]);for(e in l)Object.prototype.hasOwnProperty.call(l,e)&&(t[e]=l[e]);return t},_getNormalizedKeyNum:function(a){return a.which||a.keyCode},_handleKeyDown:function(a){var l=o._getNormalizedKeyNum(a),t=this.scannerDetectionData.options,e=this.scannerDetectionData.vars,n=!1;if(t.onKeyDetect.call(this,l,a)!==!1&&!o._isFocusOnIgnoredElement(this)){if(t.scanButtonKeyCode!==!1&&l==t.scanButtonKeyCode){e.longPressed||(e.longPressTimer=setTimeout(t.onScanButtonLongPress,t.scanButtonLongPressTime,this),e.longPressed=!0);return}switch(!0){case(e.firstCharTime&&t.suffixKeyCodes.indexOf(l)!==-1):a.preventDefault(),a.stopImmediatePropagation(),n=!0;break;case(!e.firstCharTime&&t.prefixKeyCodes.indexOf(l)!==-1):a.preventDefault(),a.stopImmediatePropagation(),n=!1;break;default:var r=t.keyCodeMapper.call(this,a);if(r===null)return;e.accumulatedString+=r,t.preventDefault&&a.preventDefault(),t.stopPropagation&&a.stopImmediatePropagation(),n=!1;break}e.firstCharTime||(e.firstCharTime=Date.now()),e.lastCharTime=Date.now(),e.testTimer&&clearTimeout(e.testTimer),n?(o._validateScanCode(this,e.accumulatedString),e.testTimer=!1):e.testTimer=setTimeout(o._validateScanCode,t.timeBeforeScanTest,this,e.accumulatedString),t.onKeyProcess.call(this,r,a)}},_handlePaste:function(a){var l=this.scannerDetectionData.options,t=this.scannerDetectionData.vars,e=(event.clipboardData||window.clipboardData).getData("text");o._isFocusOnIgnoredElement(this)||(a.preventDefault(),l.stopPropagation&&a.stopImmediatePropagation(),l.onPaste.call(this,e,event),t.firstCharTime=0,t.lastCharTime=0,o._validateScanCode(this,e))},_handleKeyUp:function(a){if(!o._isFocusOnIgnoredElement(this)){var l=o._getNormalizedKeyNum(a);l==this.scannerDetectionData.options.scanButtonKeyCode&&(clearTimeout(this.scannerDetectionData.vars.longPressTimer),this.scannerDetectionData.vars.longPressed=!1)}},isScanInProgressFor:function(a){return a.scannerDetectionData.vars.firstCharTime>0},isAttachedTo:function(a){return a.scannerDetectionData!==void 0}};return o}))})(Gt)),Gt.exports}var rl=tl();const Oi=Xa(rl),nl={id:"scan_input"},xi=C.defineComponent({__name:"ScanInput",props:{scanHandler:{type:Function}},emits:["scanInstance"],setup(i,{emit:h}){const o=h,a=i;return C.onMounted(()=>{const l=Oi.attachTo(window,{onScan:a.scanHandler});o("scanInstance",l)}),C.onUnmounted(()=>{Oi.detachFrom(window)}),(l,t)=>(C.openBlock(),C.createElementBlock("div",nl))}}),Pi=Fe(C.defineComponent({__name:"SegmentedDisplay",props:{displayInput:{default:120.2568},decimalPlaces:{default:2},displayColor:{default:"gray"},textColor:{default:"white"}},setup(i){const h=C.computed(()=>i.displayInput===0?0 .toFixed(i.decimalPlaces):i.displayInput.toFixed(i.decimalPlaces)),o=a=>a?.substring(0,2)=="--"?`var(${a})`:a;return(a,l)=>(C.openBlock(),C.createElementBlock("div",{class:"segmented-display",style:C.normalizeStyle({background:o(i.displayColor)})},[C.createElementVNode("h1",{class:"segmented-display-output",style:C.normalizeStyle({color:o(i.textColor)})},C.toDisplayString(h.value),5)],4))}}),[["__scopeId","data-v-1731e036"]]),il={class:"column column-left"},ol={class:"column column-right"},Ri=Fe(C.defineComponent({__name:"SplitColumn",props:{justifyContent:{default:"space-between"},alignItems:{default:"flex-start"}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("div",{class:"two-column",style:C.normalizeStyle({justifyContent:i.justifyContent,alignItems:i.alignItems})},[C.createElementVNode("div",il,[C.renderSlot(h.$slots,"left",{},void 0,!0)]),C.createElementVNode("div",ol,[C.renderSlot(h.$slots,"right",{},void 0,!0)])],4))}}),[["__scopeId","data-v-3f65313d"]]),Mi=Fe(C.defineComponent({__name:"ToggleArrow",props:{open:{type:Boolean}},setup(i){return(h,o)=>(C.openBlock(),C.createElementBlock("div",{class:C.normalizeClass(["arrow-icon",{open:i.open}])},[...o[0]||(o[0]=[C.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[C.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})],-1)])],2))}}),[["__scopeId","data-v-05e7abed"]]);var Er=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,al=Object.getOwnPropertyNames,ll=Object.prototype.hasOwnProperty,He=(i,h)=>()=>(i&&(h=i(i=0)),h),fe=(i,h)=>()=>(h||i((h={exports:{}}).exports,h),h.exports),Rt=(i,h)=>{for(var o in h)Er(i,o,{get:h[o],enumerable:!0})},ul=(i,h,o,a)=>{if(h&&typeof h=="object"||typeof h=="function")for(let l of al(h))!ll.call(i,l)&&l!==o&&Er(i,l,{get:()=>h[l],enumerable:!(a=sl(h,l))||a.enumerable});return i},Be=i=>ul(Er({},"__esModule",{value:!0}),i),oe=He(()=>{}),ke={};Rt(ke,{_debugEnd:()=>nn,_debugProcess:()=>rn,_events:()=>wn,_eventsCount:()=>vn,_exiting:()=>Vr,_fatalExceptions:()=>Xr,_getActiveHandles:()=>Wi,_getActiveRequests:()=>ji,_kill:()=>Hr,_linkedBinding:()=>Ni,_maxListeners:()=>yn,_preload_modules:()=>mn,_rawDebug:()=>Fr,_startProfilerIdleNotifier:()=>on,_stopProfilerIdleNotifier:()=>sn,_tickCallback:()=>tn,abort:()=>cn,addListener:()=>_n,allowedNodeEnvironmentFlags:()=>Jr,arch:()=>kr,argv:()=>Br,argv0:()=>gn,assert:()=>Vi,binding:()=>Mr,chdir:()=>Lr,config:()=>Qr,cpuUsage:()=>jt,cwd:()=>Dr,debugPort:()=>pn,default:()=>On,dlopen:()=>Fi,domain:()=>Wr,emit:()=>Tn,emitWarning:()=>Rr,env:()=>Ir,execArgv:()=>Or,execPath:()=>dn,exit:()=>Gr,features:()=>Zr,hasUncaughtExceptionCaptureCallback:()=>Qi,hrtime:()=>Yt,kill:()=>zr,listeners:()=>Hi,memoryUsage:()=>$r,moduleLoadList:()=>jr,nextTick:()=>Di,off:()=>Sn,on:()=>rt,once:()=>En,openStdin:()=>Yr,pid:()=>hn,platform:()=>Tr,ppid:()=>fn,prependListener:()=>In,prependOnceListener:()=>Bn,reallyExit:()=>Kr,release:()=>Nr,removeAllListeners:()=>kn,removeListener:()=>Cn,resourceUsage:()=>qr,setSourceMapsEnabled:()=>An,setUncaughtExceptionCaptureCallback:()=>en,stderr:()=>ln,stdin:()=>un,stdout:()=>an,title:()=>Cr,umask:()=>Ur,uptime:()=>Ki,version:()=>xr,versions:()=>Pr});function Sr(i){throw new Error("Node.js process "+i+" is not supported by JSPM core outside of Node.js")}function cl(){!yt||!wt||(yt=!1,wt.length?Xe=wt.concat(Xe):Ft=-1,Xe.length&&Ui())}function Ui(){if(!yt){var i=setTimeout(cl,0);yt=!0;for(var h=Xe.length;h;){for(wt=Xe,Xe=[];++Ft<h;)wt&&wt[Ft].run();Ft=-1,h=Xe.length}wt=null,yt=!1,clearTimeout(i)}}function Di(i){var h=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)h[o-1]=arguments[o];Xe.push(new Li(i,h)),Xe.length===1&&!yt&&setTimeout(Ui,0)}function Li(i,h){this.fun=i,this.array=h}function Qe(){}function Ni(i){Sr("_linkedBinding")}function Fi(i){Sr("dlopen")}function ji(){return[]}function Wi(){return[]}function Vi(i,h){if(!i)throw new Error(h||"assertion error")}function Qi(){return!1}function Ki(){return nt.now()/1e3}function Yt(i){var h=Math.floor((Date.now()-nt.now())*.001),o=nt.now()*.001,a=Math.floor(o)+h,l=Math.floor(o%1*1e9);return i&&(a=a-i[0],l=l-i[1],l<0&&(a--,l+=Jt)),[a,l]}function rt(){return On}function Hi(i){return[]}var Xe,yt,wt,Ft,Cr,kr,Tr,Ir,Br,Or,xr,Pr,Rr,Mr,Ur,Dr,Lr,Nr,Fr,jr,Wr,Vr,Qr,Kr,Hr,jt,qr,$r,zr,Gr,Yr,Jr,Zr,Xr,en,tn,rn,nn,on,sn,an,ln,un,cn,hn,fn,dn,pn,gn,mn,An,nt,bn,Jt,yn,wn,vn,_n,En,Sn,Cn,kn,Tn,In,Bn,On,hl=He(()=>{oe(),ae(),se(),Xe=[],yt=!1,Ft=-1,Li.prototype.run=function(){this.fun.apply(null,this.array)},Cr="browser",kr="x64",Tr="browser",Ir={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},Br=["/usr/bin/node"],Or=[],xr="v16.8.0",Pr={},Rr=function(i,h){console.warn((h?h+": ":"")+i)},Mr=function(i){Sr("binding")},Ur=function(i){return 0},Dr=function(){return"/"},Lr=function(i){},Nr={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},Fr=Qe,jr=[],Wr={},Vr=!1,Qr={},Kr=Qe,Hr=Qe,jt=function(){return{}},qr=jt,$r=jt,zr=Qe,Gr=Qe,Yr=Qe,Jr={},Zr={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},Xr=Qe,en=Qe,tn=Qe,rn=Qe,nn=Qe,on=Qe,sn=Qe,an=void 0,ln=void 0,un=void 0,cn=Qe,hn=2,fn=1,dn="/bin/usr/node",pn=9229,gn="node",mn=[],An=Qe,nt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},nt.now===void 0&&(bn=Date.now(),nt.timing&&nt.timing.navigationStart&&(bn=nt.timing.navigationStart),nt.now=()=>Date.now()-bn),Jt=1e9,Yt.bigint=function(i){var h=Yt(i);return typeof BigInt>"u"?h[0]*Jt+h[1]:BigInt(h[0]*Jt)+BigInt(h[1])},yn=10,wn={},vn=0,_n=rt,En=rt,Sn=rt,Cn=rt,kn=rt,Tn=Qe,In=rt,Bn=rt,On={version:xr,versions:Pr,arch:kr,platform:Tr,release:Nr,_rawDebug:Fr,moduleLoadList:jr,binding:Mr,_linkedBinding:Ni,_events:wn,_eventsCount:vn,_maxListeners:yn,on:rt,addListener:_n,once:En,off:Sn,removeListener:Cn,removeAllListeners:kn,emit:Tn,prependListener:In,prependOnceListener:Bn,listeners:Hi,domain:Wr,_exiting:Vr,config:Qr,dlopen:Fi,uptime:Ki,_getActiveRequests:ji,_getActiveHandles:Wi,reallyExit:Kr,_kill:Hr,cpuUsage:jt,resourceUsage:qr,memoryUsage:$r,kill:zr,exit:Gr,openStdin:Yr,allowedNodeEnvironmentFlags:Jr,assert:Vi,features:Zr,_fatalExceptions:Xr,setUncaughtExceptionCaptureCallback:en,hasUncaughtExceptionCaptureCallback:Qi,emitWarning:Rr,nextTick:Di,_tickCallback:tn,_debugProcess:rn,_debugEnd:nn,_startProfilerIdleNotifier:on,_stopProfilerIdleNotifier:sn,stdout:an,stdin:un,stderr:ln,abort:cn,umask:Ur,chdir:Lr,cwd:Dr,env:Ir,title:Cr,argv:Br,execArgv:Or,pid:hn,ppid:fn,execPath:dn,debugPort:pn,hrtime:Yt,argv0:gn,_preload_modules:mn,setSourceMapsEnabled:An}}),se=He(()=>{hl()}),We={};Rt(We,{Buffer:()=>Zt,INSPECT_MAX_BYTES:()=>qi,default:()=>it,kMaxLength:()=>$i});function fl(){if(xn)return Mt;xn=!0,Mt.byteLength=n,Mt.toByteArray=s,Mt.fromByteArray=p;for(var i=[],h=[],o=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,t=a.length;l<t;++l)i[l]=a[l],h[a.charCodeAt(l)]=l;h[45]=62,h[95]=63;function e(g){var f=g.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=g.indexOf("=");b===-1&&(b=f);var y=b===f?0:4-b%4;return[b,y]}function n(g){var f=e(g),b=f[0],y=f[1];return(b+y)*3/4-y}function r(g,f,b){return(f+b)*3/4-b}function s(g){var f,b=e(g),y=b[0],_=b[1],A=new o(r(g,y,_)),w=0,I=_>0?y-4:y,k;for(k=0;k<I;k+=4)f=h[g.charCodeAt(k)]<<18|h[g.charCodeAt(k+1)]<<12|h[g.charCodeAt(k+2)]<<6|h[g.charCodeAt(k+3)],A[w++]=f>>16&255,A[w++]=f>>8&255,A[w++]=f&255;return _===2&&(f=h[g.charCodeAt(k)]<<2|h[g.charCodeAt(k+1)]>>4,A[w++]=f&255),_===1&&(f=h[g.charCodeAt(k)]<<10|h[g.charCodeAt(k+1)]<<4|h[g.charCodeAt(k+2)]>>2,A[w++]=f>>8&255,A[w++]=f&255),A}function u(g){return i[g>>18&63]+i[g>>12&63]+i[g>>6&63]+i[g&63]}function d(g,f,b){for(var y,_=[],A=f;A<b;A+=3)y=(g[A]<<16&16711680)+(g[A+1]<<8&65280)+(g[A+2]&255),_.push(u(y));return _.join("")}function p(g){for(var f,b=g.length,y=b%3,_=[],A=16383,w=0,I=b-y;w<I;w+=A)_.push(d(g,w,w+A>I?I:w+A));return y===1?(f=g[b-1],_.push(i[f>>2]+i[f<<4&63]+"==")):y===2&&(f=(g[b-2]<<8)+g[b-1],_.push(i[f>>10]+i[f>>4&63]+i[f<<2&63]+"=")),_.join("")}return Mt}function dl(){return Pn?Wt:(Pn=!0,Wt.read=function(i,h,o,a,l){var t,e,n=l*8-a-1,r=(1<<n)-1,s=r>>1,u=-7,d=o?l-1:0,p=o?-1:1,g=i[h+d];for(d+=p,t=g&(1<<-u)-1,g>>=-u,u+=n;u>0;t=t*256+i[h+d],d+=p,u-=8);for(e=t&(1<<-u)-1,t>>=-u,u+=a;u>0;e=e*256+i[h+d],d+=p,u-=8);if(t===0)t=1-s;else{if(t===r)return e?NaN:(g?-1:1)*(1/0);e=e+Math.pow(2,a),t=t-s}return(g?-1:1)*e*Math.pow(2,t-a)},Wt.write=function(i,h,o,a,l,t){var e,n,r,s=t*8-l-1,u=(1<<s)-1,d=u>>1,p=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=a?0:t-1,f=a?1:-1,b=h<0||h===0&&1/h<0?1:0;for(h=Math.abs(h),isNaN(h)||h===1/0?(n=isNaN(h)?1:0,e=u):(e=Math.floor(Math.log(h)/Math.LN2),h*(r=Math.pow(2,-e))<1&&(e--,r*=2),e+d>=1?h+=p/r:h+=p*Math.pow(2,1-d),h*r>=2&&(e++,r/=2),e+d>=u?(n=0,e=u):e+d>=1?(n=(h*r-1)*Math.pow(2,l),e=e+d):(n=h*Math.pow(2,d-1)*Math.pow(2,l),e=0));l>=8;i[o+g]=n&255,g+=f,n/=256,l-=8);for(e=e<<l|n,s+=l;s>0;i[o+g]=e&255,g+=f,e/=256,s-=8);i[o+g-f]|=b*128},Wt)}function pl(){if(Rn)return pt;Rn=!0;let i=fl(),h=dl(),o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;pt.Buffer=e,pt.SlowBuffer=_,pt.INSPECT_MAX_BYTES=50;let a=2147483647;pt.kMaxLength=a,e.TYPED_ARRAY_SUPPORT=l(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{let c=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(c,m),c.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function t(c){if(c>a)throw new RangeError('The value "'+c+'" is invalid for option "size"');let m=new Uint8Array(c);return Object.setPrototypeOf(m,e.prototype),m}function e(c,m,v){if(typeof c=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return u(c)}return n(c,m,v)}e.poolSize=8192;function n(c,m,v){if(typeof c=="string")return d(c,m);if(ArrayBuffer.isView(c))return g(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c);if(L(c,ArrayBuffer)||c&&L(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(L(c,SharedArrayBuffer)||c&&L(c.buffer,SharedArrayBuffer)))return f(c,m,v);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let R=c.valueOf&&c.valueOf();if(R!=null&&R!==c)return e.from(R,m,v);let N=b(c);if(N)return N;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return e.from(c[Symbol.toPrimitive]("string"),m,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c)}e.from=function(c,m,v){return n(c,m,v)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function r(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function s(c,m,v){return r(c),c<=0?t(c):m!==void 0?typeof v=="string"?t(c).fill(m,v):t(c).fill(m):t(c)}e.alloc=function(c,m,v){return s(c,m,v)};function u(c){return r(c),t(c<0?0:y(c)|0)}e.allocUnsafe=function(c){return u(c)},e.allocUnsafeSlow=function(c){return u(c)};function d(c,m){if((typeof m!="string"||m==="")&&(m="utf8"),!e.isEncoding(m))throw new TypeError("Unknown encoding: "+m);let v=A(c,m)|0,R=t(v),N=R.write(c,m);return N!==v&&(R=R.slice(0,N)),R}function p(c){let m=c.length<0?0:y(c.length)|0,v=t(m);for(let R=0;R<m;R+=1)v[R]=c[R]&255;return v}function g(c){if(L(c,Uint8Array)){let m=new Uint8Array(c);return f(m.buffer,m.byteOffset,m.byteLength)}return p(c)}function f(c,m,v){if(m<0||c.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<m+(v||0))throw new RangeError('"length" is outside of buffer bounds');let R;return m===void 0&&v===void 0?R=new Uint8Array(c):v===void 0?R=new Uint8Array(c,m):R=new Uint8Array(c,m,v),Object.setPrototypeOf(R,e.prototype),R}function b(c){if(e.isBuffer(c)){let m=y(c.length)|0,v=t(m);return v.length===0||c.copy(v,0,0,m),v}if(c.length!==void 0)return typeof c.length!="number"||ne(c.length)?t(0):p(c);if(c.type==="Buffer"&&Array.isArray(c.data))return p(c.data)}function y(c){if(c>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return c|0}function _(c){return+c!=c&&(c=0),e.alloc(+c)}e.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==e.prototype},e.compare=function(c,m){if(L(c,Uint8Array)&&(c=e.from(c,c.offset,c.byteLength)),L(m,Uint8Array)&&(m=e.from(m,m.offset,m.byteLength)),!e.isBuffer(c)||!e.isBuffer(m))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===m)return 0;let v=c.length,R=m.length;for(let N=0,X=Math.min(v,R);N<X;++N)if(c[N]!==m[N]){v=c[N],R=m[N];break}return v<R?-1:R<v?1:0},e.isEncoding=function(c){switch(String(c).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(c,m){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return e.alloc(0);let v;if(m===void 0)for(m=0,v=0;v<c.length;++v)m+=c[v].length;let R=e.allocUnsafe(m),N=0;for(v=0;v<c.length;++v){let X=c[v];if(L(X,Uint8Array))N+X.length>R.length?(e.isBuffer(X)||(X=e.from(X)),X.copy(R,N)):Uint8Array.prototype.set.call(R,X,N);else if(e.isBuffer(X))X.copy(R,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=X.length}return R};function A(c,m){if(e.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||L(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof c);let v=c.length,R=arguments.length>2&&arguments[2]===!0;if(!R&&v===0)return 0;let N=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return D(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return ee(c).length;default:if(N)return R?-1:D(c).length;m=(""+m).toLowerCase(),N=!0}}e.byteLength=A;function w(c,m,v){let R=!1;if((m===void 0||m<0)&&(m=0),m>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,m>>>=0,v<=m))return"";for(c||(c="utf8");;)switch(c){case"hex":return pe(this,m,v);case"utf8":case"utf-8":return $(this,m,v);case"ascii":return me(this,m,v);case"latin1":case"binary":return le(this,m,v);case"base64":return U(this,m,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return we(this,m,v);default:if(R)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),R=!0}}e.prototype._isBuffer=!0;function I(c,m,v){let R=c[m];c[m]=c[v],c[v]=R}e.prototype.swap16=function(){let c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let m=0;m<c;m+=2)I(this,m,m+1);return this},e.prototype.swap32=function(){let c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let m=0;m<c;m+=4)I(this,m,m+3),I(this,m+1,m+2);return this},e.prototype.swap64=function(){let c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let m=0;m<c;m+=8)I(this,m,m+7),I(this,m+1,m+6),I(this,m+2,m+5),I(this,m+3,m+4);return this},e.prototype.toString=function(){let c=this.length;return c===0?"":arguments.length===0?$(this,0,c):w.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(c){if(!e.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:e.compare(this,c)===0},e.prototype.inspect=function(){let c="",m=pt.INSPECT_MAX_BYTES;return c=this.toString("hex",0,m).replace(/(.{2})/g,"$1 ").trim(),this.length>m&&(c+=" ... "),"<Buffer "+c+">"},o&&(e.prototype[o]=e.prototype.inspect),e.prototype.compare=function(c,m,v,R,N){if(L(c,Uint8Array)&&(c=e.from(c,c.offset,c.byteLength)),!e.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof c);if(m===void 0&&(m=0),v===void 0&&(v=c?c.length:0),R===void 0&&(R=0),N===void 0&&(N=this.length),m<0||v>c.length||R<0||N>this.length)throw new RangeError("out of range index");if(R>=N&&m>=v)return 0;if(R>=N)return-1;if(m>=v)return 1;if(m>>>=0,v>>>=0,R>>>=0,N>>>=0,this===c)return 0;let X=N-R,be=v-m,Ce=Math.min(X,be),je=this.slice(R,N),Pe=c.slice(m,v);for(let Ie=0;Ie<Ce;++Ie)if(je[Ie]!==Pe[Ie]){X=je[Ie],be=Pe[Ie];break}return X<be?-1:be<X?1:0};function k(c,m,v,R,N){if(c.length===0)return-1;if(typeof v=="string"?(R=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,ne(v)&&(v=N?0:c.length-1),v<0&&(v=c.length+v),v>=c.length){if(N)return-1;v=c.length-1}else if(v<0)if(N)v=0;else return-1;if(typeof m=="string"&&(m=e.from(m,R)),e.isBuffer(m))return m.length===0?-1:E(c,m,v,R,N);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(c,m,v):Uint8Array.prototype.lastIndexOf.call(c,m,v):E(c,[m],v,R,N);throw new TypeError("val must be string, number or Buffer")}function E(c,m,v,R,N){let X=1,be=c.length,Ce=m.length;if(R!==void 0&&(R=String(R).toLowerCase(),R==="ucs2"||R==="ucs-2"||R==="utf16le"||R==="utf-16le")){if(c.length<2||m.length<2)return-1;X=2,be/=2,Ce/=2,v/=2}function je(Ie,Ne){return X===1?Ie[Ne]:Ie.readUInt16BE(Ne*X)}let Pe;if(N){let Ie=-1;for(Pe=v;Pe<be;Pe++)if(je(c,Pe)===je(m,Ie===-1?0:Pe-Ie)){if(Ie===-1&&(Ie=Pe),Pe-Ie+1===Ce)return Ie*X}else Ie!==-1&&(Pe-=Pe-Ie),Ie=-1}else for(v+Ce>be&&(v=be-Ce),Pe=v;Pe>=0;Pe--){let Ie=!0;for(let Ne=0;Ne<Ce;Ne++)if(je(c,Pe+Ne)!==je(m,Ne)){Ie=!1;break}if(Ie)return Pe}return-1}e.prototype.includes=function(c,m,v){return this.indexOf(c,m,v)!==-1},e.prototype.indexOf=function(c,m,v){return k(this,c,m,v,!0)},e.prototype.lastIndexOf=function(c,m,v){return k(this,c,m,v,!1)};function T(c,m,v,R){v=Number(v)||0;let N=c.length-v;R?(R=Number(R),R>N&&(R=N)):R=N;let X=m.length;R>X/2&&(R=X/2);let be;for(be=0;be<R;++be){let Ce=parseInt(m.substr(be*2,2),16);if(ne(Ce))return be;c[v+be]=Ce}return be}function O(c,m,v,R){return ie(D(m,c.length-v),c,v,R)}function H(c,m,v,R){return ie(q(m),c,v,R)}function G(c,m,v,R){return ie(ee(m),c,v,R)}function de(c,m,v,R){return ie(te(m,c.length-v),c,v,R)}e.prototype.write=function(c,m,v,R){if(m===void 0)R="utf8",v=this.length,m=0;else if(v===void 0&&typeof m=="string")R=m,v=this.length,m=0;else if(isFinite(m))m=m>>>0,isFinite(v)?(v=v>>>0,R===void 0&&(R="utf8")):(R=v,v=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let N=this.length-m;if((v===void 0||v>N)&&(v=N),c.length>0&&(v<0||m<0)||m>this.length)throw new RangeError("Attempt to write outside buffer bounds");R||(R="utf8");let X=!1;for(;;)switch(R){case"hex":return T(this,c,m,v);case"utf8":case"utf-8":return O(this,c,m,v);case"ascii":case"latin1":case"binary":return H(this,c,m,v);case"base64":return G(this,c,m,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,c,m,v);default:if(X)throw new TypeError("Unknown encoding: "+R);R=(""+R).toLowerCase(),X=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(c,m,v){return m===0&&v===c.length?i.fromByteArray(c):i.fromByteArray(c.slice(m,v))}function $(c,m,v){v=Math.min(c.length,v);let R=[],N=m;for(;N<v;){let X=c[N],be=null,Ce=X>239?4:X>223?3:X>191?2:1;if(N+Ce<=v){let je,Pe,Ie,Ne;switch(Ce){case 1:X<128&&(be=X);break;case 2:je=c[N+1],(je&192)===128&&(Ne=(X&31)<<6|je&63,Ne>127&&(be=Ne));break;case 3:je=c[N+1],Pe=c[N+2],(je&192)===128&&(Pe&192)===128&&(Ne=(X&15)<<12|(je&63)<<6|Pe&63,Ne>2047&&(Ne<55296||Ne>57343)&&(be=Ne));break;case 4:je=c[N+1],Pe=c[N+2],Ie=c[N+3],(je&192)===128&&(Pe&192)===128&&(Ie&192)===128&&(Ne=(X&15)<<18|(je&63)<<12|(Pe&63)<<6|Ie&63,Ne>65535&&Ne<1114112&&(be=Ne))}}be===null?(be=65533,Ce=1):be>65535&&(be-=65536,R.push(be>>>10&1023|55296),be=56320|be&1023),R.push(be),N+=Ce}return F(R)}let z=4096;function F(c){let m=c.length;if(m<=z)return String.fromCharCode.apply(String,c);let v="",R=0;for(;R<m;)v+=String.fromCharCode.apply(String,c.slice(R,R+=z));return v}function me(c,m,v){let R="";v=Math.min(c.length,v);for(let N=m;N<v;++N)R+=String.fromCharCode(c[N]&127);return R}function le(c,m,v){let R="";v=Math.min(c.length,v);for(let N=m;N<v;++N)R+=String.fromCharCode(c[N]);return R}function pe(c,m,v){let R=c.length;(!m||m<0)&&(m=0),(!v||v<0||v>R)&&(v=R);let N="";for(let X=m;X<v;++X)N+=ge[c[X]];return N}function we(c,m,v){let R=c.slice(m,v),N="";for(let X=0;X<R.length-1;X+=2)N+=String.fromCharCode(R[X]+R[X+1]*256);return N}e.prototype.slice=function(c,m){let v=this.length;c=~~c,m=m===void 0?v:~~m,c<0?(c+=v,c<0&&(c=0)):c>v&&(c=v),m<0?(m+=v,m<0&&(m=0)):m>v&&(m=v),m<c&&(m=c);let R=this.subarray(c,m);return Object.setPrototypeOf(R,e.prototype),R};function Q(c,m,v){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+m>v)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(c,m,v){c=c>>>0,m=m>>>0,v||Q(c,m,this.length);let R=this[c],N=1,X=0;for(;++X<m&&(N*=256);)R+=this[c+X]*N;return R},e.prototype.readUintBE=e.prototype.readUIntBE=function(c,m,v){c=c>>>0,m=m>>>0,v||Q(c,m,this.length);let R=this[c+--m],N=1;for(;m>0&&(N*=256);)R+=this[c+--m]*N;return R},e.prototype.readUint8=e.prototype.readUInt8=function(c,m){return c=c>>>0,m||Q(c,1,this.length),this[c]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(c,m){return c=c>>>0,m||Q(c,2,this.length),this[c]|this[c+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(c,m){return c=c>>>0,m||Q(c,2,this.length),this[c]<<8|this[c+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},e.prototype.readBigUInt64LE=Y(function(c){c=c>>>0,W(c,"offset");let m=this[c],v=this[c+7];(m===void 0||v===void 0)&&ue(c,this.length-8);let R=m+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24,N=this[++c]+this[++c]*2**8+this[++c]*2**16+v*2**24;return BigInt(R)+(BigInt(N)<<BigInt(32))}),e.prototype.readBigUInt64BE=Y(function(c){c=c>>>0,W(c,"offset");let m=this[c],v=this[c+7];(m===void 0||v===void 0)&&ue(c,this.length-8);let R=m*2**24+this[++c]*2**16+this[++c]*2**8+this[++c],N=this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+v;return(BigInt(R)<<BigInt(32))+BigInt(N)}),e.prototype.readIntLE=function(c,m,v){c=c>>>0,m=m>>>0,v||Q(c,m,this.length);let R=this[c],N=1,X=0;for(;++X<m&&(N*=256);)R+=this[c+X]*N;return N*=128,R>=N&&(R-=Math.pow(2,8*m)),R},e.prototype.readIntBE=function(c,m,v){c=c>>>0,m=m>>>0,v||Q(c,m,this.length);let R=m,N=1,X=this[c+--R];for(;R>0&&(N*=256);)X+=this[c+--R]*N;return N*=128,X>=N&&(X-=Math.pow(2,8*m)),X},e.prototype.readInt8=function(c,m){return c=c>>>0,m||Q(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},e.prototype.readInt16LE=function(c,m){c=c>>>0,m||Q(c,2,this.length);let v=this[c]|this[c+1]<<8;return v&32768?v|4294901760:v},e.prototype.readInt16BE=function(c,m){c=c>>>0,m||Q(c,2,this.length);let v=this[c+1]|this[c]<<8;return v&32768?v|4294901760:v},e.prototype.readInt32LE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},e.prototype.readInt32BE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},e.prototype.readBigInt64LE=Y(function(c){c=c>>>0,W(c,"offset");let m=this[c],v=this[c+7];(m===void 0||v===void 0)&&ue(c,this.length-8);let R=this[c+4]+this[c+5]*2**8+this[c+6]*2**16+(v<<24);return(BigInt(R)<<BigInt(32))+BigInt(m+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24)}),e.prototype.readBigInt64BE=Y(function(c){c=c>>>0,W(c,"offset");let m=this[c],v=this[c+7];(m===void 0||v===void 0)&&ue(c,this.length-8);let R=(m<<24)+this[++c]*2**16+this[++c]*2**8+this[++c];return(BigInt(R)<<BigInt(32))+BigInt(this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+v)}),e.prototype.readFloatLE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),h.read(this,c,!0,23,4)},e.prototype.readFloatBE=function(c,m){return c=c>>>0,m||Q(c,4,this.length),h.read(this,c,!1,23,4)},e.prototype.readDoubleLE=function(c,m){return c=c>>>0,m||Q(c,8,this.length),h.read(this,c,!0,52,8)},e.prototype.readDoubleBE=function(c,m){return c=c>>>0,m||Q(c,8,this.length),h.read(this,c,!1,52,8)};function he(c,m,v,R,N,X){if(!e.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>N||m<X)throw new RangeError('"value" argument is out of bounds');if(v+R>c.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(c,m,v,R){if(c=+c,m=m>>>0,v=v>>>0,!R){let be=Math.pow(2,8*v)-1;he(this,c,m,v,be,0)}let N=1,X=0;for(this[m]=c&255;++X<v&&(N*=256);)this[m+X]=c/N&255;return m+v},e.prototype.writeUintBE=e.prototype.writeUIntBE=function(c,m,v,R){if(c=+c,m=m>>>0,v=v>>>0,!R){let be=Math.pow(2,8*v)-1;he(this,c,m,v,be,0)}let N=v-1,X=1;for(this[m+N]=c&255;--N>=0&&(X*=256);)this[m+N]=c/X&255;return m+v},e.prototype.writeUint8=e.prototype.writeUInt8=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,1,255,0),this[m]=c&255,m+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,2,65535,0),this[m]=c&255,this[m+1]=c>>>8,m+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,2,65535,0),this[m]=c>>>8,this[m+1]=c&255,m+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,4,4294967295,0),this[m+3]=c>>>24,this[m+2]=c>>>16,this[m+1]=c>>>8,this[m]=c&255,m+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,4,4294967295,0),this[m]=c>>>24,this[m+1]=c>>>16,this[m+2]=c>>>8,this[m+3]=c&255,m+4};function P(c,m,v,R,N){j(m,R,N,c,v,7);let X=Number(m&BigInt(4294967295));c[v++]=X,X=X>>8,c[v++]=X,X=X>>8,c[v++]=X,X=X>>8,c[v++]=X;let be=Number(m>>BigInt(32)&BigInt(4294967295));return c[v++]=be,be=be>>8,c[v++]=be,be=be>>8,c[v++]=be,be=be>>8,c[v++]=be,v}function ce(c,m,v,R,N){j(m,R,N,c,v,7);let X=Number(m&BigInt(4294967295));c[v+7]=X,X=X>>8,c[v+6]=X,X=X>>8,c[v+5]=X,X=X>>8,c[v+4]=X;let be=Number(m>>BigInt(32)&BigInt(4294967295));return c[v+3]=be,be=be>>8,c[v+2]=be,be=be>>8,c[v+1]=be,be=be>>8,c[v]=be,v+8}e.prototype.writeBigUInt64LE=Y(function(c,m=0){return P(this,c,m,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=Y(function(c,m=0){return ce(this,c,m,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(c,m,v,R){if(c=+c,m=m>>>0,!R){let Ce=Math.pow(2,8*v-1);he(this,c,m,v,Ce-1,-Ce)}let N=0,X=1,be=0;for(this[m]=c&255;++N<v&&(X*=256);)c<0&&be===0&&this[m+N-1]!==0&&(be=1),this[m+N]=(c/X>>0)-be&255;return m+v},e.prototype.writeIntBE=function(c,m,v,R){if(c=+c,m=m>>>0,!R){let Ce=Math.pow(2,8*v-1);he(this,c,m,v,Ce-1,-Ce)}let N=v-1,X=1,be=0;for(this[m+N]=c&255;--N>=0&&(X*=256);)c<0&&be===0&&this[m+N+1]!==0&&(be=1),this[m+N]=(c/X>>0)-be&255;return m+v},e.prototype.writeInt8=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,1,127,-128),c<0&&(c=255+c+1),this[m]=c&255,m+1},e.prototype.writeInt16LE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,2,32767,-32768),this[m]=c&255,this[m+1]=c>>>8,m+2},e.prototype.writeInt16BE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,2,32767,-32768),this[m]=c>>>8,this[m+1]=c&255,m+2},e.prototype.writeInt32LE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,4,2147483647,-2147483648),this[m]=c&255,this[m+1]=c>>>8,this[m+2]=c>>>16,this[m+3]=c>>>24,m+4},e.prototype.writeInt32BE=function(c,m,v){return c=+c,m=m>>>0,v||he(this,c,m,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[m]=c>>>24,this[m+1]=c>>>16,this[m+2]=c>>>8,this[m+3]=c&255,m+4},e.prototype.writeBigInt64LE=Y(function(c,m=0){return P(this,c,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=Y(function(c,m=0){return ce(this,c,m,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ye(c,m,v,R,N,X){if(v+R>c.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function J(c,m,v,R,N){return m=+m,v=v>>>0,N||ye(c,m,v,4),h.write(c,m,v,R,23,4),v+4}e.prototype.writeFloatLE=function(c,m,v){return J(this,c,m,!0,v)},e.prototype.writeFloatBE=function(c,m,v){return J(this,c,m,!1,v)};function _e(c,m,v,R,N){return m=+m,v=v>>>0,N||ye(c,m,v,8),h.write(c,m,v,R,52,8),v+8}e.prototype.writeDoubleLE=function(c,m,v){return _e(this,c,m,!0,v)},e.prototype.writeDoubleBE=function(c,m,v){return _e(this,c,m,!1,v)},e.prototype.copy=function(c,m,v,R){if(!e.isBuffer(c))throw new TypeError("argument should be a Buffer");if(v||(v=0),!R&&R!==0&&(R=this.length),m>=c.length&&(m=c.length),m||(m=0),R>0&&R<v&&(R=v),R===v||c.length===0||this.length===0)return 0;if(m<0)throw new RangeError("targetStart out of bounds");if(v<0||v>=this.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("sourceEnd out of bounds");R>this.length&&(R=this.length),c.length-m<R-v&&(R=c.length-m+v);let N=R-v;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(m,v,R):Uint8Array.prototype.set.call(c,this.subarray(v,R),m),N},e.prototype.fill=function(c,m,v,R){if(typeof c=="string"){if(typeof m=="string"?(R=m,m=0,v=this.length):typeof v=="string"&&(R=v,v=this.length),R!==void 0&&typeof R!="string")throw new TypeError("encoding must be a string");if(typeof R=="string"&&!e.isEncoding(R))throw new TypeError("Unknown encoding: "+R);if(c.length===1){let X=c.charCodeAt(0);(R==="utf8"&&X<128||R==="latin1")&&(c=X)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(m<0||this.length<m||this.length<v)throw new RangeError("Out of range index");if(v<=m)return this;m=m>>>0,v=v===void 0?this.length:v>>>0,c||(c=0);let N;if(typeof c=="number")for(N=m;N<v;++N)this[N]=c;else{let X=e.isBuffer(c)?c:e.from(c,R),be=X.length;if(be===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(N=0;N<v-m;++N)this[N+m]=X[N%be]}return this};let K={};function M(c,m,v){K[c]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code(R){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:R,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}M("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),M("ERR_INVALID_ARG_TYPE",function(c,m){return`The "${c}" argument must be of type number. Received type ${typeof m}`},TypeError),M("ERR_OUT_OF_RANGE",function(c,m,v){let R=`The value of "${c}" is out of range.`,N=v;return Number.isInteger(v)&&Math.abs(v)>2**32?N=Z(String(v)):typeof v=="bigint"&&(N=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(N=Z(N)),N+="n"),R+=` It must be ${m}. Received ${N}`,R},RangeError);function Z(c){let m="",v=c.length,R=c[0]==="-"?1:0;for(;v>=R+4;v-=3)m=`_${c.slice(v-3,v)}${m}`;return`${c.slice(0,v)}${m}`}function V(c,m,v){W(m,"offset"),(c[m]===void 0||c[m+v]===void 0)&&ue(m,c.length-(v+1))}function j(c,m,v,R,N,X){if(c>v||c<m){let be=typeof m=="bigint"?"n":"",Ce;throw m===0||m===BigInt(0)?Ce=`>= 0${be} and < 2${be} ** ${(X+1)*8}${be}`:Ce=`>= -(2${be} ** ${(X+1)*8-1}${be}) and < 2 ** ${(X+1)*8-1}${be}`,new K.ERR_OUT_OF_RANGE("value",Ce,c)}V(R,N,X)}function W(c,m){if(typeof c!="number")throw new K.ERR_INVALID_ARG_TYPE(m,"number",c)}function ue(c,m,v){throw Math.floor(c)!==c?(W(c,v),new K.ERR_OUT_OF_RANGE("offset","an integer",c)):m<0?new K.ERR_BUFFER_OUT_OF_BOUNDS:new K.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${m}`,c)}let re=/[^+/0-9A-Za-z-_]/g;function x(c){if(c=c.split("=")[0],c=c.trim().replace(re,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function D(c,m){m=m||1/0;let v,R=c.length,N=null,X=[];for(let be=0;be<R;++be){if(v=c.charCodeAt(be),v>55295&&v<57344){if(!N){if(v>56319){(m-=3)>-1&&X.push(239,191,189);continue}else if(be+1===R){(m-=3)>-1&&X.push(239,191,189);continue}N=v;continue}if(v<56320){(m-=3)>-1&&X.push(239,191,189),N=v;continue}v=(N-55296<<10|v-56320)+65536}else N&&(m-=3)>-1&&X.push(239,191,189);if(N=null,v<128){if((m-=1)<0)break;X.push(v)}else if(v<2048){if((m-=2)<0)break;X.push(v>>6|192,v&63|128)}else if(v<65536){if((m-=3)<0)break;X.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((m-=4)<0)break;X.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return X}function q(c){let m=[];for(let v=0;v<c.length;++v)m.push(c.charCodeAt(v)&255);return m}function te(c,m){let v,R,N,X=[];for(let be=0;be<c.length&&!((m-=2)<0);++be)v=c.charCodeAt(be),R=v>>8,N=v%256,X.push(N),X.push(R);return X}function ee(c){return i.toByteArray(x(c))}function ie(c,m,v,R){let N;for(N=0;N<R&&!(N+v>=m.length||N>=c.length);++N)m[N+v]=c[N];return N}function L(c,m){return c instanceof m||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===m.name}function ne(c){return c!==c}let ge=(function(){let c="0123456789abcdef",m=new Array(256);for(let v=0;v<16;++v){let R=v*16;for(let N=0;N<16;++N)m[R+N]=c[v]+c[N]}return m})();function Y(c){return typeof BigInt>"u"?Se:c}function Se(){throw new Error("BigInt not supported")}return pt}var Mt,xn,Wt,Pn,pt,Rn,it,Zt,qi,$i,Ve=He(()=>{oe(),ae(),se(),Mt={},xn=!1,Wt={},Pn=!1,pt={},Rn=!1,it=pl(),it.Buffer,it.SlowBuffer,it.INSPECT_MAX_BYTES,it.kMaxLength,Zt=it.Buffer,qi=it.INSPECT_MAX_BYTES,$i=it.kMaxLength}),ae=He(()=>{Ve()}),gl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=class{constructor(o){this.aliasToTopic={},this.max=o}put(o,a){return a===0||a>this.max?!1:(this.aliasToTopic[a]=o,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(o){return this.aliasToTopic[o]}clear(){this.aliasToTopic={}}};i.default=h}),Ue=fe((i,h)=>{oe(),ae(),se();var o=class extends Error{constructor(a){if(!Array.isArray(a))throw new TypeError(`Expected input to be an Array, got ${typeof a}`);let l="";for(let t=0;t<a.length;t++)l+=` ${a[t].stack}
3
- `;super(l),this.name="AggregateError",this.errors=a}};h.exports={AggregateError:o,ArrayIsArray(a){return Array.isArray(a)},ArrayPrototypeIncludes(a,l){return a.includes(l)},ArrayPrototypeIndexOf(a,l){return a.indexOf(l)},ArrayPrototypeJoin(a,l){return a.join(l)},ArrayPrototypeMap(a,l){return a.map(l)},ArrayPrototypePop(a,l){return a.pop(l)},ArrayPrototypePush(a,l){return a.push(l)},ArrayPrototypeSlice(a,l,t){return a.slice(l,t)},Error,FunctionPrototypeCall(a,l,...t){return a.call(l,...t)},FunctionPrototypeSymbolHasInstance(a,l){return Function.prototype[Symbol.hasInstance].call(a,l)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(a,l){return Object.defineProperties(a,l)},ObjectDefineProperty(a,l,t){return Object.defineProperty(a,l,t)},ObjectGetOwnPropertyDescriptor(a,l){return Object.getOwnPropertyDescriptor(a,l)},ObjectKeys(a){return Object.keys(a)},ObjectSetPrototypeOf(a,l){return Object.setPrototypeOf(a,l)},Promise,PromisePrototypeCatch(a,l){return a.catch(l)},PromisePrototypeThen(a,l,t){return a.then(l,t)},PromiseReject(a){return Promise.reject(a)},PromiseResolve(a){return Promise.resolve(a)},ReflectApply:Reflect.apply,RegExpPrototypeTest(a,l){return a.test(l)},SafeSet:Set,String,StringPrototypeSlice(a,l,t){return a.slice(l,t)},StringPrototypeToLowerCase(a){return a.toLowerCase()},StringPrototypeToUpperCase(a){return a.toUpperCase()},StringPrototypeTrim(a){return a.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(a,l,t){return a.set(l,t)},Boolean,Uint8Array}}),zi=fe((i,h)=>{oe(),ae(),se(),h.exports={format(o,...a){return o.replace(/%([sdifj])/g,function(...[l,t]){let e=a.shift();return t==="f"?e.toFixed(6):t==="j"?JSON.stringify(e):t==="s"&&typeof e=="object"?`${e.constructor!==Object?e.constructor.name:""} {}`.trim():e.toString()})},inspect(o){switch(typeof o){case"string":if(o.includes("'"))if(o.includes('"')){if(!o.includes("`")&&!o.includes("${"))return`\`${o}\``}else return`"${o}"`;return`'${o}'`;case"number":return isNaN(o)?"NaN":Object.is(o,-0)?String(o):o;case"bigint":return`${String(o)}n`;case"boolean":case"undefined":return String(o);case"object":return"{}"}}}}),qe=fe((i,h)=>{oe(),ae(),se();var{format:o,inspect:a}=zi(),{AggregateError:l}=Ue(),t=globalThis.AggregateError||l,e=Symbol("kIsNodeError"),n=["string","function","number","object","Function","Object","boolean","bigint","symbol"],r=/^([A-Z][a-z0-9]*)+$/,s="__node_internal_",u={};function d(A,w){if(!A)throw new u.ERR_INTERNAL_ASSERTION(w)}function p(A){let w="",I=A.length,k=A[0]==="-"?1:0;for(;I>=k+4;I-=3)w=`_${A.slice(I-3,I)}${w}`;return`${A.slice(0,I)}${w}`}function g(A,w,I){if(typeof w=="function")return d(w.length<=I.length,`Code: ${A}; The provided arguments length (${I.length}) does not match the required ones (${w.length}).`),w(...I);let k=(w.match(/%[dfijoOs]/g)||[]).length;return d(k===I.length,`Code: ${A}; The provided arguments length (${I.length}) does not match the required ones (${k}).`),I.length===0?w:o(w,...I)}function f(A,w,I){I||(I=Error);class k extends I{constructor(...T){super(g(A,w,T))}toString(){return`${this.name} [${A}]: ${this.message}`}}Object.defineProperties(k.prototype,{name:{value:I.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${A}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),k.prototype.code=A,k.prototype[e]=!0,u[A]=k}function b(A){let w=s+A.name;return Object.defineProperty(A,"name",{value:w}),A}function y(A,w){if(A&&w&&A!==w){if(Array.isArray(w.errors))return w.errors.push(A),w;let I=new t([w,A],w.message);return I.code=w.code,I}return A||w}var _=class extends Error{constructor(A="The operation was aborted",w=void 0){if(w!==void 0&&typeof w!="object")throw new u.ERR_INVALID_ARG_TYPE("options","Object",w);super(A,w),this.code="ABORT_ERR",this.name="AbortError"}};f("ERR_ASSERTION","%s",Error),f("ERR_INVALID_ARG_TYPE",(A,w,I)=>{d(typeof A=="string","'name' must be a string"),Array.isArray(w)||(w=[w]);let k="The ";A.endsWith(" argument")?k+=`${A} `:k+=`"${A}" ${A.includes(".")?"property":"argument"} `,k+="must be ";let E=[],T=[],O=[];for(let G of w)d(typeof G=="string","All expected entries have to be of type string"),n.includes(G)?E.push(G.toLowerCase()):r.test(G)?T.push(G):(d(G!=="object",'The value "object" should be written as "Object"'),O.push(G));if(T.length>0){let G=E.indexOf("object");G!==-1&&(E.splice(E,G,1),T.push("Object"))}if(E.length>0){switch(E.length){case 1:k+=`of type ${E[0]}`;break;case 2:k+=`one of type ${E[0]} or ${E[1]}`;break;default:{let G=E.pop();k+=`one of type ${E.join(", ")}, or ${G}`}}(T.length>0||O.length>0)&&(k+=" or ")}if(T.length>0){switch(T.length){case 1:k+=`an instance of ${T[0]}`;break;case 2:k+=`an instance of ${T[0]} or ${T[1]}`;break;default:{let G=T.pop();k+=`an instance of ${T.join(", ")}, or ${G}`}}O.length>0&&(k+=" or ")}switch(O.length){case 0:break;case 1:O[0].toLowerCase()!==O[0]&&(k+="an "),k+=`${O[0]}`;break;case 2:k+=`one of ${O[0]} or ${O[1]}`;break;default:{let G=O.pop();k+=`one of ${O.join(", ")}, or ${G}`}}if(I==null)k+=`. Received ${I}`;else if(typeof I=="function"&&I.name)k+=`. Received function ${I.name}`;else if(typeof I=="object"){var H;if((H=I.constructor)!==null&&H!==void 0&&H.name)k+=`. Received an instance of ${I.constructor.name}`;else{let G=a(I,{depth:-1});k+=`. Received ${G}`}}else{let G=a(I,{colors:!1});G.length>25&&(G=`${G.slice(0,25)}...`),k+=`. Received type ${typeof I} (${G})`}return k},TypeError),f("ERR_INVALID_ARG_VALUE",(A,w,I="is invalid")=>{let k=a(w);return k.length>128&&(k=k.slice(0,128)+"..."),`The ${A.includes(".")?"property":"argument"} '${A}' ${I}. Received ${k}`},TypeError),f("ERR_INVALID_RETURN_VALUE",(A,w,I)=>{var k;let E=I!=null&&(k=I.constructor)!==null&&k!==void 0&&k.name?`instance of ${I.constructor.name}`:`type ${typeof I}`;return`Expected ${A} to be returned from the "${w}" function but got ${E}.`},TypeError),f("ERR_MISSING_ARGS",(...A)=>{d(A.length>0,"At least one arg needs to be specified");let w,I=A.length;switch(A=(Array.isArray(A)?A:[A]).map(k=>`"${k}"`).join(" or "),I){case 1:w+=`The ${A[0]} argument`;break;case 2:w+=`The ${A[0]} and ${A[1]} arguments`;break;default:{let k=A.pop();w+=`The ${A.join(", ")}, and ${k} arguments`}break}return`${w} must be specified`},TypeError),f("ERR_OUT_OF_RANGE",(A,w,I)=>{d(w,'Missing "range" argument');let k;if(Number.isInteger(I)&&Math.abs(I)>2**32)k=p(String(I));else if(typeof I=="bigint"){k=String(I);let E=BigInt(2)**BigInt(32);(I>E||I<-E)&&(k=p(k)),k+="n"}else k=a(I);return`The value of "${A}" is out of range. It must be ${w}. Received ${k}`},RangeError),f("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),f("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),f("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),f("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),f("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),f("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),f("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),f("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),f("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),f("ERR_STREAM_WRITE_AFTER_END","write after end",Error),f("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),h.exports={AbortError:_,aggregateTwoErrors:b(y),hideStackFrames:b,codes:u}}),Vt=fe((i,h)=>{oe(),ae(),se();var{AbortController:o,AbortSignal:a}=typeof self<"u"?self:typeof window<"u"?window:void 0;h.exports=o,h.exports.AbortSignal=a,h.exports.default=o});function Oe(){Oe.init.call(this)}function Xt(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}function Gi(i){return i._maxListeners===void 0?Oe.defaultMaxListeners:i._maxListeners}function Yi(i,h,o,a){var l,t,e,n;if(Xt(o),(t=i._events)===void 0?(t=i._events=Object.create(null),i._eventsCount=0):(t.newListener!==void 0&&(i.emit("newListener",h,o.listener?o.listener:o),t=i._events),e=t[h]),e===void 0)e=t[h]=o,++i._eventsCount;else if(typeof e=="function"?e=t[h]=a?[o,e]:[e,o]:a?e.unshift(o):e.push(o),(l=Gi(i))>0&&e.length>l&&!e.warned){e.warned=!0;var r=new Error("Possible EventEmitter memory leak detected. "+e.length+" "+String(h)+" listeners added. Use emitter.setMaxListeners() to increase limit");r.name="MaxListenersExceededWarning",r.emitter=i,r.type=h,r.count=e.length,n=r,console&&console.warn&&console.warn(n)}return i}function ml(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Ji(i,h,o){var a={fired:!1,wrapFn:void 0,target:i,type:h,listener:o},l=ml.bind(a);return l.listener=o,a.wrapFn=l,l}function Zi(i,h,o){var a=i._events;if(a===void 0)return[];var l=a[h];return l===void 0?[]:typeof l=="function"?o?[l.listener||l]:[l]:o?(function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e})(l):eo(l,l.length)}function Xi(i){var h=this._events;if(h!==void 0){var o=h[i];if(typeof o=="function")return 1;if(o!==void 0)return o.length}return 0}function eo(i,h){for(var o=new Array(h),a=0;a<h;++a)o[a]=i[a];return o}var to,ro,vt,Mn,Un,Dn,ze,no=He(()=>{oe(),ae(),se(),vt=typeof Reflect=="object"?Reflect:null,Mn=vt&&typeof vt.apply=="function"?vt.apply:function(i,h,o){return Function.prototype.apply.call(i,h,o)},ro=vt&&typeof vt.ownKeys=="function"?vt.ownKeys:Object.getOwnPropertySymbols?function(i){return Object.getOwnPropertyNames(i).concat(Object.getOwnPropertySymbols(i))}:function(i){return Object.getOwnPropertyNames(i)},Un=Number.isNaN||function(i){return i!=i},to=Oe,Oe.EventEmitter=Oe,Oe.prototype._events=void 0,Oe.prototype._eventsCount=0,Oe.prototype._maxListeners=void 0,Dn=10,Object.defineProperty(Oe,"defaultMaxListeners",{enumerable:!0,get:function(){return Dn},set:function(i){if(typeof i!="number"||i<0||Un(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");Dn=i}}),Oe.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Oe.prototype.setMaxListeners=function(i){if(typeof i!="number"||i<0||Un(i))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+i+".");return this._maxListeners=i,this},Oe.prototype.getMaxListeners=function(){return Gi(this)},Oe.prototype.emit=function(i){for(var h=[],o=1;o<arguments.length;o++)h.push(arguments[o]);var a=i==="error",l=this._events;if(l!==void 0)a=a&&l.error===void 0;else if(!a)return!1;if(a){var t;if(h.length>0&&(t=h[0]),t instanceof Error)throw t;var e=new Error("Unhandled error."+(t?" ("+t.message+")":""));throw e.context=t,e}var n=l[i];if(n===void 0)return!1;if(typeof n=="function")Mn(n,this,h);else{var r=n.length,s=eo(n,r);for(o=0;o<r;++o)Mn(s[o],this,h)}return!0},Oe.prototype.addListener=function(i,h){return Yi(this,i,h,!1)},Oe.prototype.on=Oe.prototype.addListener,Oe.prototype.prependListener=function(i,h){return Yi(this,i,h,!0)},Oe.prototype.once=function(i,h){return Xt(h),this.on(i,Ji(this,i,h)),this},Oe.prototype.prependOnceListener=function(i,h){return Xt(h),this.prependListener(i,Ji(this,i,h)),this},Oe.prototype.removeListener=function(i,h){var o,a,l,t,e;if(Xt(h),(a=this._events)===void 0)return this;if((o=a[i])===void 0)return this;if(o===h||o.listener===h)--this._eventsCount==0?this._events=Object.create(null):(delete a[i],a.removeListener&&this.emit("removeListener",i,o.listener||h));else if(typeof o!="function"){for(l=-1,t=o.length-1;t>=0;t--)if(o[t]===h||o[t].listener===h){e=o[t].listener,l=t;break}if(l<0)return this;l===0?o.shift():(function(n,r){for(;r+1<n.length;r++)n[r]=n[r+1];n.pop()})(o,l),o.length===1&&(a[i]=o[0]),a.removeListener!==void 0&&this.emit("removeListener",i,e||h)}return this},Oe.prototype.off=Oe.prototype.removeListener,Oe.prototype.removeAllListeners=function(i){var h,o,a;if((o=this._events)===void 0)return this;if(o.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):o[i]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete o[i]),this;if(arguments.length===0){var l,t=Object.keys(o);for(a=0;a<t.length;++a)(l=t[a])!=="removeListener"&&this.removeAllListeners(l);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(h=o[i])=="function")this.removeListener(i,h);else if(h!==void 0)for(a=h.length-1;a>=0;a--)this.removeListener(i,h[a]);return this},Oe.prototype.listeners=function(i){return Zi(this,i,!0)},Oe.prototype.rawListeners=function(i){return Zi(this,i,!1)},Oe.listenerCount=function(i,h){return typeof i.listenerCount=="function"?i.listenerCount(h):Xi.call(i,h)},Oe.prototype.listenerCount=Xi,Oe.prototype.eventNames=function(){return this._eventsCount>0?ro(this._events):[]},ze=to,ze.EventEmitter,ze.defaultMaxListeners,ze.init,ze.listenerCount,ze.EventEmitter,ze.defaultMaxListeners,ze.init,ze.listenerCount}),gt={};Rt(gt,{EventEmitter:()=>io,default:()=>ze,defaultMaxListeners:()=>oo,init:()=>so,listenerCount:()=>ao,on:()=>lo,once:()=>uo});var io,oo,so,ao,lo,uo,_t=He(()=>{oe(),ae(),se(),no(),no(),ze.once=function(i,h){return new Promise((o,a)=>{function l(...e){t!==void 0&&i.removeListener("error",t),o(e)}let t;h!=="error"&&(t=e=>{i.removeListener(name,l),a(e)},i.once("error",t)),i.once(h,l)})},ze.on=function(i,h){let o=[],a=[],l=null,t=!1,e={async next(){let s=o.shift();if(s)return createIterResult(s,!1);if(l){let u=Promise.reject(l);return l=null,u}return t?createIterResult(void 0,!0):new Promise((u,d)=>a.push({resolve:u,reject:d}))},async return(){i.removeListener(h,n),i.removeListener("error",r),t=!0;for(let s of a)s.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(s){l=s,i.removeListener(h,n),i.removeListener("error",r)},[Symbol.asyncIterator](){return this}};return i.on(h,n),i.on("error",r),e;function n(...s){let u=a.shift();u?u.resolve(createIterResult(s,!1)):o.push(s)}function r(s){t=!0;let u=a.shift();u?u.reject(s):l=s,e.return()}},{EventEmitter:io,defaultMaxListeners:oo,init:so,listenerCount:ao,on:lo,once:uo}=ze}),$e=fe((i,h)=>{oe(),ae(),se();var o=(Ve(),Be(We)),{format:a,inspect:l}=zi(),{codes:{ERR_INVALID_ARG_TYPE:t}}=qe(),{kResistStopPropagation:e,AggregateError:n,SymbolDispose:r}=Ue(),s=globalThis.AbortSignal||Vt().AbortSignal,u=globalThis.AbortController||Vt().AbortController,d=Object.getPrototypeOf(async function(){}).constructor,p=globalThis.Blob||o.Blob,g=typeof p<"u"?function(y){return y instanceof p}:function(y){return!1},f=(y,_)=>{if(y!==void 0&&(y===null||typeof y!="object"||!("aborted"in y)))throw new t(_,"AbortSignal",y)},b=(y,_)=>{if(typeof y!="function")throw new t(_,"Function",y)};h.exports={AggregateError:n,kEmptyObject:Object.freeze({}),once(y){let _=!1;return function(...A){_||(_=!0,y.apply(this,A))}},createDeferredPromise:function(){let y,_;return{promise:new Promise((A,w)=>{y=A,_=w}),resolve:y,reject:_}},promisify(y){return new Promise((_,A)=>{y((w,...I)=>w?A(w):_(...I))})},debuglog(){return function(){}},format:a,inspect:l,types:{isAsyncFunction(y){return y instanceof d},isArrayBufferView(y){return ArrayBuffer.isView(y)}},isBlob:g,deprecate(y,_){return y},addAbortListener:(_t(),Be(gt)).addAbortListener||function(y,_){if(y===void 0)throw new t("signal","AbortSignal",y);f(y,"signal"),b(_,"listener");let A;return y.aborted?queueMicrotask(()=>_()):(y.addEventListener("abort",_,{__proto__:null,once:!0,[e]:!0}),A=()=>{y.removeEventListener("abort",_)}),{__proto__:null,[r](){var w;(w=A)===null||w===void 0||w()}}},AbortSignalAny:s.any||function(y){if(y.length===1)return y[0];let _=new u,A=()=>_.abort();return y.forEach(w=>{f(w,"signals"),w.addEventListener("abort",A,{once:!0})}),_.signal.addEventListener("abort",()=>{y.forEach(w=>w.removeEventListener("abort",A))},{once:!0}),_.signal}},h.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),Qt=fe((i,h)=>{oe(),ae(),se();var{ArrayIsArray:o,ArrayPrototypeIncludes:a,ArrayPrototypeJoin:l,ArrayPrototypeMap:t,NumberIsInteger:e,NumberIsNaN:n,NumberMAX_SAFE_INTEGER:r,NumberMIN_SAFE_INTEGER:s,NumberParseInt:u,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:p,String:g,StringPrototypeToUpperCase:f,StringPrototypeTrim:b}=Ue(),{hideStackFrames:y,codes:{ERR_SOCKET_BAD_PORT:_,ERR_INVALID_ARG_TYPE:A,ERR_INVALID_ARG_VALUE:w,ERR_OUT_OF_RANGE:I,ERR_UNKNOWN_SIGNAL:k}}=qe(),{normalizeEncoding:E}=$e(),{isAsyncFunction:T,isArrayBufferView:O}=$e().types,H={};function G(L){return L===(L|0)}function de(L){return L===L>>>0}var U=/^[0-7]+$/,$="must be a 32-bit unsigned integer or an octal string";function z(L,ne,ge){if(typeof L>"u"&&(L=ge),typeof L=="string"){if(p(U,L)===null)throw new w(ne,L,$);L=u(L,8)}return le(L,ne),L}var F=y((L,ne,ge=s,Y=r)=>{if(typeof L!="number")throw new A(ne,"number",L);if(!e(L))throw new I(ne,"an integer",L);if(L<ge||L>Y)throw new I(ne,`>= ${ge} && <= ${Y}`,L)}),me=y((L,ne,ge=-2147483648,Y=2147483647)=>{if(typeof L!="number")throw new A(ne,"number",L);if(!e(L))throw new I(ne,"an integer",L);if(L<ge||L>Y)throw new I(ne,`>= ${ge} && <= ${Y}`,L)}),le=y((L,ne,ge=!1)=>{if(typeof L!="number")throw new A(ne,"number",L);if(!e(L))throw new I(ne,"an integer",L);let Y=ge?1:0,Se=4294967295;if(L<Y||L>Se)throw new I(ne,`>= ${Y} && <= ${Se}`,L)});function pe(L,ne){if(typeof L!="string")throw new A(ne,"string",L)}function we(L,ne,ge=void 0,Y){if(typeof L!="number")throw new A(ne,"number",L);if(ge!=null&&L<ge||Y!=null&&L>Y||(ge!=null||Y!=null)&&n(L))throw new I(ne,`${ge!=null?`>= ${ge}`:""}${ge!=null&&Y!=null?" && ":""}${Y!=null?`<= ${Y}`:""}`,L)}var Q=y((L,ne,ge)=>{if(!a(ge,L)){let Y="must be one of: "+l(t(ge,Se=>typeof Se=="string"?`'${Se}'`:g(Se)),", ");throw new w(ne,L,Y)}});function he(L,ne){if(typeof L!="boolean")throw new A(ne,"boolean",L)}function P(L,ne,ge){return L==null||!d(L,ne)?ge:L[ne]}var ce=y((L,ne,ge=null)=>{let Y=P(ge,"allowArray",!1),Se=P(ge,"allowFunction",!1);if(!P(ge,"nullable",!1)&&L===null||!Y&&o(L)||typeof L!="object"&&(!Se||typeof L!="function"))throw new A(ne,"Object",L)}),ye=y((L,ne)=>{if(L!=null&&typeof L!="object"&&typeof L!="function")throw new A(ne,"a dictionary",L)}),J=y((L,ne,ge=0)=>{if(!o(L))throw new A(ne,"Array",L);if(L.length<ge){let Y=`must be longer than ${ge}`;throw new w(ne,L,Y)}});function _e(L,ne){J(L,ne);for(let ge=0;ge<L.length;ge++)pe(L[ge],`${ne}[${ge}]`)}function K(L,ne){J(L,ne);for(let ge=0;ge<L.length;ge++)he(L[ge],`${ne}[${ge}]`)}function M(L,ne){J(L,ne);for(let ge=0;ge<L.length;ge++){let Y=L[ge],Se=`${ne}[${ge}]`;if(Y==null)throw new A(Se,"AbortSignal",Y);ue(Y,Se)}}function Z(L,ne="signal"){if(pe(L,ne),H[L]===void 0)throw H[f(L)]!==void 0?new k(L+" (signals must use all capital letters)"):new k(L)}var V=y((L,ne="buffer")=>{if(!O(L))throw new A(ne,["Buffer","TypedArray","DataView"],L)});function j(L,ne){let ge=E(ne),Y=L.length;if(ge==="hex"&&Y%2!==0)throw new w("encoding",ne,`is invalid for data of length ${Y}`)}function W(L,ne="Port",ge=!0){if(typeof L!="number"&&typeof L!="string"||typeof L=="string"&&b(L).length===0||+L!==+L>>>0||L>65535||L===0&&!ge)throw new _(ne,L,ge);return L|0}var ue=y((L,ne)=>{if(L!==void 0&&(L===null||typeof L!="object"||!("aborted"in L)))throw new A(ne,"AbortSignal",L)}),re=y((L,ne)=>{if(typeof L!="function")throw new A(ne,"Function",L)}),x=y((L,ne)=>{if(typeof L!="function"||T(L))throw new A(ne,"Function",L)}),D=y((L,ne)=>{if(L!==void 0)throw new A(ne,"undefined",L)});function q(L,ne,ge){if(!a(ge,L))throw new A(ne,`('${l(ge,"|")}')`,L)}var te=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function ee(L,ne){if(typeof L>"u"||!p(te,L))throw new w(ne,L,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function ie(L){if(typeof L=="string")return ee(L,"hints"),L;if(o(L)){let ne=L.length,ge="";if(ne===0)return ge;for(let Y=0;Y<ne;Y++){let Se=L[Y];ee(Se,"hints"),ge+=Se,Y!==ne-1&&(ge+=", ")}return ge}throw new w("hints",L,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}h.exports={isInt32:G,isUint32:de,parseFileMode:z,validateArray:J,validateStringArray:_e,validateBooleanArray:K,validateAbortSignalArray:M,validateBoolean:he,validateBuffer:V,validateDictionary:ye,validateEncoding:j,validateFunction:re,validateInt32:me,validateInteger:F,validateNumber:we,validateObject:ce,validateOneOf:Q,validatePlainFunction:x,validatePort:W,validateSignalName:Z,validateString:pe,validateUint32:le,validateUndefined:D,validateUnion:q,validateAbortSignal:ue,validateLinkHeaderValue:ie}}),Et=fe((i,h)=>{oe(),ae(),se();var o=h.exports={},a,l;function t(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=t}catch{a=t}try{typeof clearTimeout=="function"?l=clearTimeout:l=e}catch{l=e}})();function n(_){if(a===setTimeout)return setTimeout(_,0);if((a===t||!a)&&setTimeout)return a=setTimeout,setTimeout(_,0);try{return a(_,0)}catch{try{return a.call(null,_,0)}catch{return a.call(this,_,0)}}}function r(_){if(l===clearTimeout)return clearTimeout(_);if((l===e||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(_);try{return l(_)}catch{try{return l.call(null,_)}catch{return l.call(this,_)}}}var s=[],u=!1,d,p=-1;function g(){!u||!d||(u=!1,d.length?s=d.concat(s):p=-1,s.length&&f())}function f(){if(!u){var _=n(g);u=!0;for(var A=s.length;A;){for(d=s,s=[];++p<A;)d&&d[p].run();p=-1,A=s.length}d=null,u=!1,r(_)}}o.nextTick=function(_){var A=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;w<arguments.length;w++)A[w-1]=arguments[w];s.push(new b(_,A)),s.length===1&&!u&&n(f)};function b(_,A){this.fun=_,this.array=A}b.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function y(){}o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(_){return[]},o.binding=function(_){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(_){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}}),ot=fe((i,h)=>{oe(),ae(),se();var{SymbolAsyncIterator:o,SymbolIterator:a,SymbolFor:l}=Ue(),t=l("nodejs.stream.destroyed"),e=l("nodejs.stream.errored"),n=l("nodejs.stream.readable"),r=l("nodejs.stream.writable"),s=l("nodejs.stream.disturbed"),u=l("nodejs.webstream.isClosedPromise"),d=l("nodejs.webstream.controllerErrorFunction");function p(P,ce=!1){var ye;return!!(P&&typeof P.pipe=="function"&&typeof P.on=="function"&&(!ce||typeof P.pause=="function"&&typeof P.resume=="function")&&(!P._writableState||((ye=P._readableState)===null||ye===void 0?void 0:ye.readable)!==!1)&&(!P._writableState||P._readableState))}function g(P){var ce;return!!(P&&typeof P.write=="function"&&typeof P.on=="function"&&(!P._readableState||((ce=P._writableState)===null||ce===void 0?void 0:ce.writable)!==!1))}function f(P){return!!(P&&typeof P.pipe=="function"&&P._readableState&&typeof P.on=="function"&&typeof P.write=="function")}function b(P){return P&&(P._readableState||P._writableState||typeof P.write=="function"&&typeof P.on=="function"||typeof P.pipe=="function"&&typeof P.on=="function")}function y(P){return!!(P&&!b(P)&&typeof P.pipeThrough=="function"&&typeof P.getReader=="function"&&typeof P.cancel=="function")}function _(P){return!!(P&&!b(P)&&typeof P.getWriter=="function"&&typeof P.abort=="function")}function A(P){return!!(P&&!b(P)&&typeof P.readable=="object"&&typeof P.writable=="object")}function w(P){return y(P)||_(P)||A(P)}function I(P,ce){return P==null?!1:ce===!0?typeof P[o]=="function":ce===!1?typeof P[a]=="function":typeof P[o]=="function"||typeof P[a]=="function"}function k(P){if(!b(P))return null;let ce=P._writableState,ye=P._readableState,J=ce||ye;return!!(P.destroyed||P[t]||J!=null&&J.destroyed)}function E(P){if(!g(P))return null;if(P.writableEnded===!0)return!0;let ce=P._writableState;return ce!=null&&ce.errored?!1:typeof ce?.ended!="boolean"?null:ce.ended}function T(P,ce){if(!g(P))return null;if(P.writableFinished===!0)return!0;let ye=P._writableState;return ye!=null&&ye.errored?!1:typeof ye?.finished!="boolean"?null:!!(ye.finished||ce===!1&&ye.ended===!0&&ye.length===0)}function O(P){if(!p(P))return null;if(P.readableEnded===!0)return!0;let ce=P._readableState;return!ce||ce.errored?!1:typeof ce?.ended!="boolean"?null:ce.ended}function H(P,ce){if(!p(P))return null;let ye=P._readableState;return ye!=null&&ye.errored?!1:typeof ye?.endEmitted!="boolean"?null:!!(ye.endEmitted||ce===!1&&ye.ended===!0&&ye.length===0)}function G(P){return P&&P[n]!=null?P[n]:typeof P?.readable!="boolean"?null:k(P)?!1:p(P)&&P.readable&&!H(P)}function de(P){return P&&P[r]!=null?P[r]:typeof P?.writable!="boolean"?null:k(P)?!1:g(P)&&P.writable&&!E(P)}function U(P,ce){return b(P)?k(P)?!0:!(ce?.readable!==!1&&G(P)||ce?.writable!==!1&&de(P)):null}function $(P){var ce,ye;return b(P)?P.writableErrored?P.writableErrored:(ce=(ye=P._writableState)===null||ye===void 0?void 0:ye.errored)!==null&&ce!==void 0?ce:null:null}function z(P){var ce,ye;return b(P)?P.readableErrored?P.readableErrored:(ce=(ye=P._readableState)===null||ye===void 0?void 0:ye.errored)!==null&&ce!==void 0?ce:null:null}function F(P){if(!b(P))return null;if(typeof P.closed=="boolean")return P.closed;let ce=P._writableState,ye=P._readableState;return typeof ce?.closed=="boolean"||typeof ye?.closed=="boolean"?ce?.closed||ye?.closed:typeof P._closed=="boolean"&&me(P)?P._closed:null}function me(P){return typeof P._closed=="boolean"&&typeof P._defaultKeepAlive=="boolean"&&typeof P._removedConnection=="boolean"&&typeof P._removedContLen=="boolean"}function le(P){return typeof P._sent100=="boolean"&&me(P)}function pe(P){var ce;return typeof P._consuming=="boolean"&&typeof P._dumped=="boolean"&&((ce=P.req)===null||ce===void 0?void 0:ce.upgradeOrConnect)===void 0}function we(P){if(!b(P))return null;let ce=P._writableState,ye=P._readableState,J=ce||ye;return!J&&le(P)||!!(J&&J.autoDestroy&&J.emitClose&&J.closed===!1)}function Q(P){var ce;return!!(P&&((ce=P[s])!==null&&ce!==void 0?ce:P.readableDidRead||P.readableAborted))}function he(P){var ce,ye,J,_e,K,M,Z,V,j,W;return!!(P&&((ce=(ye=(J=(_e=(K=(M=P[e])!==null&&M!==void 0?M:P.readableErrored)!==null&&K!==void 0?K:P.writableErrored)!==null&&_e!==void 0?_e:(Z=P._readableState)===null||Z===void 0?void 0:Z.errorEmitted)!==null&&J!==void 0?J:(V=P._writableState)===null||V===void 0?void 0:V.errorEmitted)!==null&&ye!==void 0?ye:(j=P._readableState)===null||j===void 0?void 0:j.errored)!==null&&ce!==void 0?ce:!((W=P._writableState)===null||W===void 0)&&W.errored))}h.exports={isDestroyed:k,kIsDestroyed:t,isDisturbed:Q,kIsDisturbed:s,isErrored:he,kIsErrored:e,isReadable:G,kIsReadable:n,kIsClosedPromise:u,kControllerErrorFunction:d,kIsWritable:r,isClosed:F,isDuplexNodeStream:f,isFinished:U,isIterable:I,isReadableNodeStream:p,isReadableStream:y,isReadableEnded:O,isReadableFinished:H,isReadableErrored:z,isNodeStream:b,isWebStream:w,isWritable:de,isWritableNodeStream:g,isWritableStream:_,isWritableEnded:E,isWritableFinished:T,isWritableErrored:$,isServerRequest:pe,isServerResponse:le,willEmitClose:we,isTransformStream:A}}),mt=fe((i,h)=>{oe(),ae(),se();var o=Et(),{AbortError:a,codes:l}=qe(),{ERR_INVALID_ARG_TYPE:t,ERR_STREAM_PREMATURE_CLOSE:e}=l,{kEmptyObject:n,once:r}=$e(),{validateAbortSignal:s,validateFunction:u,validateObject:d,validateBoolean:p}=Qt(),{Promise:g,PromisePrototypeThen:f,SymbolDispose:b}=Ue(),{isClosed:y,isReadable:_,isReadableNodeStream:A,isReadableStream:w,isReadableFinished:I,isReadableErrored:k,isWritable:E,isWritableNodeStream:T,isWritableStream:O,isWritableFinished:H,isWritableErrored:G,isNodeStream:de,willEmitClose:U,kIsClosedPromise:$}=ot(),z;function F(Q){return Q.setHeader&&typeof Q.abort=="function"}var me=()=>{};function le(Q,he,P){var ce,ye;if(arguments.length===2?(P=he,he=n):he==null?he=n:d(he,"options"),u(P,"callback"),s(he.signal,"options.signal"),P=r(P),w(Q)||O(Q))return pe(Q,he,P);if(!de(Q))throw new t("stream",["ReadableStream","WritableStream","Stream"],Q);let J=(ce=he.readable)!==null&&ce!==void 0?ce:A(Q),_e=(ye=he.writable)!==null&&ye!==void 0?ye:T(Q),K=Q._writableState,M=Q._readableState,Z=()=>{Q.writable||W()},V=U(Q)&&A(Q)===J&&T(Q)===_e,j=H(Q,!1),W=()=>{j=!0,Q.destroyed&&(V=!1),!(V&&(!Q.readable||J))&&(!J||ue)&&P.call(Q)},ue=I(Q,!1),re=()=>{ue=!0,Q.destroyed&&(V=!1),!(V&&(!Q.writable||_e))&&(!_e||j)&&P.call(Q)},x=L=>{P.call(Q,L)},D=y(Q),q=()=>{D=!0;let L=G(Q)||k(Q);if(L&&typeof L!="boolean")return P.call(Q,L);if(J&&!ue&&A(Q,!0)&&!I(Q,!1))return P.call(Q,new e);if(_e&&!j&&!H(Q,!1))return P.call(Q,new e);P.call(Q)},te=()=>{D=!0;let L=G(Q)||k(Q);if(L&&typeof L!="boolean")return P.call(Q,L);P.call(Q)},ee=()=>{Q.req.on("finish",W)};F(Q)?(Q.on("complete",W),V||Q.on("abort",q),Q.req?ee():Q.on("request",ee)):_e&&!K&&(Q.on("end",Z),Q.on("close",Z)),!V&&typeof Q.aborted=="boolean"&&Q.on("aborted",q),Q.on("end",re),Q.on("finish",W),he.error!==!1&&Q.on("error",x),Q.on("close",q),D?o.nextTick(q):K!=null&&K.errorEmitted||M!=null&&M.errorEmitted?V||o.nextTick(te):(!J&&(!V||_(Q))&&(j||E(Q)===!1)||!_e&&(!V||E(Q))&&(ue||_(Q)===!1)||M&&Q.req&&Q.aborted)&&o.nextTick(te);let ie=()=>{P=me,Q.removeListener("aborted",q),Q.removeListener("complete",W),Q.removeListener("abort",q),Q.removeListener("request",ee),Q.req&&Q.req.removeListener("finish",W),Q.removeListener("end",Z),Q.removeListener("close",Z),Q.removeListener("finish",W),Q.removeListener("end",re),Q.removeListener("error",x),Q.removeListener("close",q)};if(he.signal&&!D){let L=()=>{let ne=P;ie(),ne.call(Q,new a(void 0,{cause:he.signal.reason}))};if(he.signal.aborted)o.nextTick(L);else{z=z||$e().addAbortListener;let ne=z(he.signal,L),ge=P;P=r((...Y)=>{ne[b](),ge.apply(Q,Y)})}}return ie}function pe(Q,he,P){let ce=!1,ye=me;if(he.signal)if(ye=()=>{ce=!0,P.call(Q,new a(void 0,{cause:he.signal.reason}))},he.signal.aborted)o.nextTick(ye);else{z=z||$e().addAbortListener;let _e=z(he.signal,ye),K=P;P=r((...M)=>{_e[b](),K.apply(Q,M)})}let J=(..._e)=>{ce||o.nextTick(()=>P.apply(Q,_e))};return f(Q[$].promise,J,J),me}function we(Q,he){var P;let ce=!1;return he===null&&(he=n),(P=he)!==null&&P!==void 0&&P.cleanup&&(p(he.cleanup,"cleanup"),ce=he.cleanup),new g((ye,J)=>{let _e=le(Q,he,K=>{ce&&_e(),K?J(K):ye()})})}h.exports=le,h.exports.finished=we}),Ut=fe((i,h)=>{oe(),ae(),se();var o=Et(),{aggregateTwoErrors:a,codes:{ERR_MULTIPLE_CALLBACK:l},AbortError:t}=qe(),{Symbol:e}=Ue(),{kIsDestroyed:n,isDestroyed:r,isFinished:s,isServerRequest:u}=ot(),d=e("kDestroy"),p=e("kConstruct");function g(U,$,z){U&&(U.stack,$&&!$.errored&&($.errored=U),z&&!z.errored&&(z.errored=U))}function f(U,$){let z=this._readableState,F=this._writableState,me=F||z;return F!=null&&F.destroyed||z!=null&&z.destroyed?(typeof $=="function"&&$(),this):(g(U,F,z),F&&(F.destroyed=!0),z&&(z.destroyed=!0),me.constructed?b(this,U,$):this.once(d,function(le){b(this,a(le,U),$)}),this)}function b(U,$,z){let F=!1;function me(le){if(F)return;F=!0;let pe=U._readableState,we=U._writableState;g(le,we,pe),we&&(we.closed=!0),pe&&(pe.closed=!0),typeof z=="function"&&z(le),le?o.nextTick(y,U,le):o.nextTick(_,U)}try{U._destroy($||null,me)}catch(le){me(le)}}function y(U,$){A(U,$),_(U)}function _(U){let $=U._readableState,z=U._writableState;z&&(z.closeEmitted=!0),$&&($.closeEmitted=!0),(z!=null&&z.emitClose||$!=null&&$.emitClose)&&U.emit("close")}function A(U,$){let z=U._readableState,F=U._writableState;F!=null&&F.errorEmitted||z!=null&&z.errorEmitted||(F&&(F.errorEmitted=!0),z&&(z.errorEmitted=!0),U.emit("error",$))}function w(){let U=this._readableState,$=this._writableState;U&&(U.constructed=!0,U.closed=!1,U.closeEmitted=!1,U.destroyed=!1,U.errored=null,U.errorEmitted=!1,U.reading=!1,U.ended=U.readable===!1,U.endEmitted=U.readable===!1),$&&($.constructed=!0,$.destroyed=!1,$.closed=!1,$.closeEmitted=!1,$.errored=null,$.errorEmitted=!1,$.finalCalled=!1,$.prefinished=!1,$.ended=$.writable===!1,$.ending=$.writable===!1,$.finished=$.writable===!1)}function I(U,$,z){let F=U._readableState,me=U._writableState;if(me!=null&&me.destroyed||F!=null&&F.destroyed)return this;F!=null&&F.autoDestroy||me!=null&&me.autoDestroy?U.destroy($):$&&($.stack,me&&!me.errored&&(me.errored=$),F&&!F.errored&&(F.errored=$),z?o.nextTick(A,U,$):A(U,$))}function k(U,$){if(typeof U._construct!="function")return;let z=U._readableState,F=U._writableState;z&&(z.constructed=!1),F&&(F.constructed=!1),U.once(p,$),!(U.listenerCount(p)>1)&&o.nextTick(E,U)}function E(U){let $=!1;function z(F){if($){I(U,F??new l);return}$=!0;let me=U._readableState,le=U._writableState,pe=le||me;me&&(me.constructed=!0),le&&(le.constructed=!0),pe.destroyed?U.emit(d,F):F?I(U,F,!0):o.nextTick(T,U)}try{U._construct(F=>{o.nextTick(z,F)})}catch(F){o.nextTick(z,F)}}function T(U){U.emit(p)}function O(U){return U?.setHeader&&typeof U.abort=="function"}function H(U){U.emit("close")}function G(U,$){U.emit("error",$),o.nextTick(H,U)}function de(U,$){!U||r(U)||(!$&&!s(U)&&($=new t),u(U)?(U.socket=null,U.destroy($)):O(U)?U.abort():O(U.req)?U.req.abort():typeof U.destroy=="function"?U.destroy($):typeof U.close=="function"?U.close():$?o.nextTick(G,U,$):o.nextTick(H,U),U.destroyed||(U[n]=!0))}h.exports={construct:k,destroyer:de,destroy:f,undestroy:w,errorOrDestroy:I}}),Ln=fe((i,h)=>{oe(),ae(),se();var{ArrayIsArray:o,ObjectSetPrototypeOf:a}=Ue(),{EventEmitter:l}=(_t(),Be(gt));function t(n){l.call(this,n)}a(t.prototype,l.prototype),a(t,l),t.prototype.pipe=function(n,r){let s=this;function u(_){n.writable&&n.write(_)===!1&&s.pause&&s.pause()}s.on("data",u);function d(){s.readable&&s.resume&&s.resume()}n.on("drain",d),!n._isStdio&&(!r||r.end!==!1)&&(s.on("end",g),s.on("close",f));let p=!1;function g(){p||(p=!0,n.end())}function f(){p||(p=!0,typeof n.destroy=="function"&&n.destroy())}function b(_){y(),l.listenerCount(this,"error")===0&&this.emit("error",_)}e(s,"error",b),e(n,"error",b);function y(){s.removeListener("data",u),n.removeListener("drain",d),s.removeListener("end",g),s.removeListener("close",f),s.removeListener("error",b),n.removeListener("error",b),s.removeListener("end",y),s.removeListener("close",y),n.removeListener("close",y)}return s.on("end",y),s.on("close",y),n.on("close",y),n.emit("pipe",s),n};function e(n,r,s){if(typeof n.prependListener=="function")return n.prependListener(r,s);!n._events||!n._events[r]?n.on(r,s):o(n._events[r])?n._events[r].unshift(s):n._events[r]=[s,n._events[r]]}h.exports={Stream:t,prependListener:e}}),er=fe((i,h)=>{oe(),ae(),se();var{SymbolDispose:o}=Ue(),{AbortError:a,codes:l}=qe(),{isNodeStream:t,isWebStream:e,kControllerErrorFunction:n}=ot(),r=mt(),{ERR_INVALID_ARG_TYPE:s}=l,u,d=(p,g)=>{if(typeof p!="object"||!("aborted"in p))throw new s(g,"AbortSignal",p)};h.exports.addAbortSignal=function(p,g){if(d(p,"signal"),!t(g)&&!e(g))throw new s("stream",["ReadableStream","WritableStream","Stream"],g);return h.exports.addAbortSignalNoValidate(p,g)},h.exports.addAbortSignalNoValidate=function(p,g){if(typeof p!="object"||!("aborted"in p))return g;let f=t(g)?()=>{g.destroy(new a(void 0,{cause:p.reason}))}:()=>{g[n](new a(void 0,{cause:p.reason}))};if(p.aborted)f();else{u=u||$e().addAbortListener;let b=u(p,f);r(g,b[o])}return g}}),Al=fe((i,h)=>{oe(),ae(),se();var{StringPrototypeSlice:o,SymbolIterator:a,TypedArrayPrototypeSet:l,Uint8Array:t}=Ue(),{Buffer:e}=(Ve(),Be(We)),{inspect:n}=$e();h.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(r){let s={data:r,next:null};this.length>0?this.tail.next=s:this.head=s,this.tail=s,++this.length}unshift(r){let s={data:r,next:this.head};this.length===0&&(this.tail=s),this.head=s,++this.length}shift(){if(this.length===0)return;let r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}clear(){this.head=this.tail=null,this.length=0}join(r){if(this.length===0)return"";let s=this.head,u=""+s.data;for(;(s=s.next)!==null;)u+=r+s.data;return u}concat(r){if(this.length===0)return e.alloc(0);let s=e.allocUnsafe(r>>>0),u=this.head,d=0;for(;u;)l(s,u.data,d),d+=u.data.length,u=u.next;return s}consume(r,s){let u=this.head.data;if(r<u.length){let d=u.slice(0,r);return this.head.data=u.slice(r),d}return r===u.length?this.shift():s?this._getString(r):this._getBuffer(r)}first(){return this.head.data}*[a](){for(let r=this.head;r;r=r.next)yield r.data}_getString(r){let s="",u=this.head,d=0;do{let p=u.data;if(r>p.length)s+=p,r-=p.length;else{r===p.length?(s+=p,++d,u.next?this.head=u.next:this.head=this.tail=null):(s+=o(p,0,r),this.head=u,u.data=o(p,r));break}++d}while((u=u.next)!==null);return this.length-=d,s}_getBuffer(r){let s=e.allocUnsafe(r),u=r,d=this.head,p=0;do{let g=d.data;if(r>g.length)l(s,g,u-r),r-=g.length;else{r===g.length?(l(s,g,u-r),++p,d.next?this.head=d.next:this.head=this.tail=null):(l(s,new t(g.buffer,g.byteOffset,r),u-r),this.head=d,d.data=g.slice(r));break}++p}while((d=d.next)!==null);return this.length-=p,s}[Symbol.for("nodejs.util.inspect.custom")](r,s){return n(this,{...s,depth:0,customInspect:!1})}}}),tr=fe((i,h)=>{oe(),ae(),se();var{MathFloor:o,NumberIsInteger:a}=Ue(),{validateInteger:l}=Qt(),{ERR_INVALID_ARG_VALUE:t}=qe().codes,e=16*1024,n=16;function r(p,g,f){return p.highWaterMark!=null?p.highWaterMark:g?p[f]:null}function s(p){return p?n:e}function u(p,g){l(g,"value",0),p?n=g:e=g}function d(p,g,f,b){let y=r(g,b,f);if(y!=null){if(!a(y)||y<0){let _=b?`options.${f}`:"options.highWaterMark";throw new t(_,y)}return o(y)}return s(p.objectMode)}h.exports={getHighWaterMark:d,getDefaultHighWaterMark:s,setDefaultHighWaterMark:u}}),bl=fe((i,h)=>{oe(),ae(),se();var o=(Ve(),Be(We)),a=o.Buffer;function l(e,n){for(var r in e)n[r]=e[r]}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?h.exports=o:(l(o,i),i.Buffer=t);function t(e,n,r){return a(e,n,r)}t.prototype=Object.create(a.prototype),l(a,t),t.from=function(e,n,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return a(e,n,r)},t.alloc=function(e,n,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var s=a(e);return n!==void 0?typeof r=="string"?s.fill(n,r):s.fill(n):s.fill(0),s},t.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return a(e)},t.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return o.SlowBuffer(e)}}),yl=fe(i=>{oe(),ae(),se();var h=bl().Buffer,o=h.isEncoding||function(A){switch(A=""+A,A&&A.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(A){if(!A)return"utf8";for(var w;;)switch(A){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return A;default:if(w)return;A=(""+A).toLowerCase(),w=!0}}function l(A){var w=a(A);if(typeof w!="string"&&(h.isEncoding===o||!o(A)))throw new Error("Unknown encoding: "+A);return w||A}i.StringDecoder=t;function t(A){this.encoding=l(A);var w;switch(this.encoding){case"utf16le":this.text=p,this.end=g,w=4;break;case"utf8":this.fillLast=s,w=4;break;case"base64":this.text=f,this.end=b,w=3;break;default:this.write=y,this.end=_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(w)}t.prototype.write=function(A){if(A.length===0)return"";var w,I;if(this.lastNeed){if(w=this.fillLast(A),w===void 0)return"";I=this.lastNeed,this.lastNeed=0}else I=0;return I<A.length?w?w+this.text(A,I):this.text(A,I):w||""},t.prototype.end=d,t.prototype.text=u,t.prototype.fillLast=function(A){if(this.lastNeed<=A.length)return A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,A.length),this.lastNeed-=A.length};function e(A){return A<=127?0:A>>5===6?2:A>>4===14?3:A>>3===30?4:A>>6===2?-1:-2}function n(A,w,I){var k=w.length-1;if(k<I)return 0;var E=e(w[k]);return E>=0?(E>0&&(A.lastNeed=E-1),E):--k<I||E===-2?0:(E=e(w[k]),E>=0?(E>0&&(A.lastNeed=E-2),E):--k<I||E===-2?0:(E=e(w[k]),E>=0?(E>0&&(E===2?E=0:A.lastNeed=E-3),E):0))}function r(A,w,I){if((w[0]&192)!==128)return A.lastNeed=0,"�";if(A.lastNeed>1&&w.length>1){if((w[1]&192)!==128)return A.lastNeed=1,"�";if(A.lastNeed>2&&w.length>2&&(w[2]&192)!==128)return A.lastNeed=2,"�"}}function s(A){var w=this.lastTotal-this.lastNeed,I=r(this,A);if(I!==void 0)return I;if(this.lastNeed<=A.length)return A.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,w,0,A.length),this.lastNeed-=A.length}function u(A,w){var I=n(this,A,w);if(!this.lastNeed)return A.toString("utf8",w);this.lastTotal=I;var k=A.length-(I-this.lastNeed);return A.copy(this.lastChar,0,k),A.toString("utf8",w,k)}function d(A){var w=A&&A.length?this.write(A):"";return this.lastNeed?w+"�":w}function p(A,w){if((A.length-w)%2===0){var I=A.toString("utf16le",w);if(I){var k=I.charCodeAt(I.length-1);if(k>=55296&&k<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],I.slice(0,-1)}return I}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",w,A.length-1)}function g(A){var w=A&&A.length?this.write(A):"";if(this.lastNeed){var I=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,I)}return w}function f(A,w){var I=(A.length-w)%3;return I===0?A.toString("base64",w):(this.lastNeed=3-I,this.lastTotal=3,I===1?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",w,A.length-I))}function b(A){var w=A&&A.length?this.write(A):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function y(A){return A.toString(this.encoding)}function _(A){return A&&A.length?this.write(A):""}}),co=fe((i,h)=>{oe(),ae(),se();var o=Et(),{PromisePrototypeThen:a,SymbolAsyncIterator:l,SymbolIterator:t}=Ue(),{Buffer:e}=(Ve(),Be(We)),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_NULL_VALUES:r}=qe().codes;function s(u,d,p){let g;if(typeof d=="string"||d instanceof e)return new u({objectMode:!0,...p,read(){this.push(d),this.push(null)}});let f;if(d&&d[l])f=!0,g=d[l]();else if(d&&d[t])f=!1,g=d[t]();else throw new n("iterable",["Iterable"],d);let b=new u({objectMode:!0,highWaterMark:1,...p}),y=!1;b._read=function(){y||(y=!0,A())},b._destroy=function(w,I){a(_(w),()=>o.nextTick(I,w),k=>o.nextTick(I,k||w))};async function _(w){let I=w!=null,k=typeof g.throw=="function";if(I&&k){let{value:E,done:T}=await g.throw(w);if(await E,T)return}if(typeof g.return=="function"){let{value:E}=await g.return();await E}}async function A(){for(;;){try{let{value:w,done:I}=f?await g.next():g.next();if(I)b.push(null);else{let k=w&&typeof w.then=="function"?await w:w;if(k===null)throw y=!1,new r;if(b.push(k))continue;y=!1}}catch(w){b.destroy(w)}break}}return b}h.exports=s}),rr=fe((i,h)=>{oe(),ae(),se();var o=Et(),{ArrayPrototypeIndexOf:a,NumberIsInteger:l,NumberIsNaN:t,NumberParseInt:e,ObjectDefineProperties:n,ObjectKeys:r,ObjectSetPrototypeOf:s,Promise:u,SafeSet:d,SymbolAsyncDispose:p,SymbolAsyncIterator:g,Symbol:f}=Ue();h.exports=Y,Y.ReadableState=ge;var{EventEmitter:b}=(_t(),Be(gt)),{Stream:y,prependListener:_}=Ln(),{Buffer:A}=(Ve(),Be(We)),{addAbortSignal:w}=er(),I=mt(),k=$e().debuglog("stream",S=>{k=S}),E=Al(),T=Ut(),{getHighWaterMark:O,getDefaultHighWaterMark:H}=tr(),{aggregateTwoErrors:G,codes:{ERR_INVALID_ARG_TYPE:de,ERR_METHOD_NOT_IMPLEMENTED:U,ERR_OUT_OF_RANGE:$,ERR_STREAM_PUSH_AFTER_EOF:z,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:F},AbortError:me}=qe(),{validateObject:le}=Qt(),pe=f("kPaused"),{StringDecoder:we}=yl(),Q=co();s(Y.prototype,y.prototype),s(Y,y);var he=()=>{},{errorOrDestroy:P}=T,ce=1,ye=2,J=4,_e=8,K=16,M=32,Z=64,V=128,j=256,W=512,ue=1024,re=2048,x=4096,D=8192,q=16384,te=32768,ee=65536,ie=1<<17,L=1<<18;function ne(S){return{enumerable:!1,get(){return(this.state&S)!==0},set(B){B?this.state|=S:this.state&=~S}}}n(ge.prototype,{objectMode:ne(ce),ended:ne(ye),endEmitted:ne(J),reading:ne(_e),constructed:ne(K),sync:ne(M),needReadable:ne(Z),emittedReadable:ne(V),readableListening:ne(j),resumeScheduled:ne(W),errorEmitted:ne(ue),emitClose:ne(re),autoDestroy:ne(x),destroyed:ne(D),closed:ne(q),closeEmitted:ne(te),multiAwaitDrain:ne(ee),readingMore:ne(ie),dataEmitted:ne(L)});function ge(S,B,Ae){typeof Ae!="boolean"&&(Ae=B instanceof st()),this.state=re|x|K|M,S&&S.objectMode&&(this.state|=ce),Ae&&S&&S.readableObjectMode&&(this.state|=ce),this.highWaterMark=S?O(this,S,"readableHighWaterMark",Ae):H(!1),this.buffer=new E,this.length=0,this.pipes=[],this.flowing=null,this[pe]=null,S&&S.emitClose===!1&&(this.state&=~re),S&&S.autoDestroy===!1&&(this.state&=~x),this.errored=null,this.defaultEncoding=S&&S.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,S&&S.encoding&&(this.decoder=new we(S.encoding),this.encoding=S.encoding)}function Y(S){if(!(this instanceof Y))return new Y(S);let B=this instanceof st();this._readableState=new ge(S,this,B),S&&(typeof S.read=="function"&&(this._read=S.read),typeof S.destroy=="function"&&(this._destroy=S.destroy),typeof S.construct=="function"&&(this._construct=S.construct),S.signal&&!B&&w(S.signal,this)),y.call(this,S),T.construct(this,()=>{this._readableState.needReadable&&Ce(this,this._readableState)})}Y.prototype.destroy=T.destroy,Y.prototype._undestroy=T.undestroy,Y.prototype._destroy=function(S,B){B(S)},Y.prototype[b.captureRejectionSymbol]=function(S){this.destroy(S)},Y.prototype[p]=function(){let S;return this.destroyed||(S=this.readableEnded?null:new me,this.destroy(S)),new u((B,Ae)=>I(this,ve=>ve&&ve!==S?Ae(ve):B(null)))},Y.prototype.push=function(S,B){return Se(this,S,B,!1)},Y.prototype.unshift=function(S,B){return Se(this,S,B,!0)};function Se(S,B,Ae,ve){k("readableAddChunk",B);let Ee=S._readableState,Ke;if((Ee.state&ce)===0&&(typeof B=="string"?(Ae=Ae||Ee.defaultEncoding,Ee.encoding!==Ae&&(ve&&Ee.encoding?B=A.from(B,Ae).toString(Ee.encoding):(B=A.from(B,Ae),Ae=""))):B instanceof A?Ae="":y._isUint8Array(B)?(B=y._uint8ArrayToBuffer(B),Ae=""):B!=null&&(Ke=new de("chunk",["string","Buffer","Uint8Array"],B))),Ke)P(S,Ke);else if(B===null)Ee.state&=~_e,N(S,Ee);else if((Ee.state&ce)!==0||B&&B.length>0)if(ve)if((Ee.state&J)!==0)P(S,new F);else{if(Ee.destroyed||Ee.errored)return!1;c(S,Ee,B,!0)}else if(Ee.ended)P(S,new z);else{if(Ee.destroyed||Ee.errored)return!1;Ee.state&=~_e,Ee.decoder&&!Ae?(B=Ee.decoder.write(B),Ee.objectMode||B.length!==0?c(S,Ee,B,!1):Ce(S,Ee)):c(S,Ee,B,!1)}else ve||(Ee.state&=~_e,Ce(S,Ee));return!Ee.ended&&(Ee.length<Ee.highWaterMark||Ee.length===0)}function c(S,B,Ae,ve){B.flowing&&B.length===0&&!B.sync&&S.listenerCount("data")>0?((B.state&ee)!==0?B.awaitDrainWriters.clear():B.awaitDrainWriters=null,B.dataEmitted=!0,S.emit("data",Ae)):(B.length+=B.objectMode?1:Ae.length,ve?B.buffer.unshift(Ae):B.buffer.push(Ae),(B.state&Z)!==0&&X(S)),Ce(S,B)}Y.prototype.isPaused=function(){let S=this._readableState;return S[pe]===!0||S.flowing===!1},Y.prototype.setEncoding=function(S){let B=new we(S);this._readableState.decoder=B,this._readableState.encoding=this._readableState.decoder.encoding;let Ae=this._readableState.buffer,ve="";for(let Ee of Ae)ve+=B.write(Ee);return Ae.clear(),ve!==""&&Ae.push(ve),this._readableState.length=ve.length,this};var m=1073741824;function v(S){if(S>m)throw new $("size","<= 1GiB",S);return S--,S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S++,S}function R(S,B){return S<=0||B.length===0&&B.ended?0:(B.state&ce)!==0?1:t(S)?B.flowing&&B.length?B.buffer.first().length:B.length:S<=B.length?S:B.ended?B.length:0}Y.prototype.read=function(S){k("read",S),S===void 0?S=NaN:l(S)||(S=e(S,10));let B=this._readableState,Ae=S;if(S>B.highWaterMark&&(B.highWaterMark=v(S)),S!==0&&(B.state&=~V),S===0&&B.needReadable&&((B.highWaterMark!==0?B.length>=B.highWaterMark:B.length>0)||B.ended))return k("read: emitReadable",B.length,B.ended),B.length===0&&B.ended?ii(this):X(this),null;if(S=R(S,B),S===0&&B.ended)return B.length===0&&ii(this),null;let ve=(B.state&Z)!==0;if(k("need readable",ve),(B.length===0||B.length-S<B.highWaterMark)&&(ve=!0,k("length less than watermark",ve)),B.ended||B.reading||B.destroyed||B.errored||!B.constructed)ve=!1,k("reading, ended or constructing",ve);else if(ve){k("do read"),B.state|=_e|M,B.length===0&&(B.state|=Z);try{this._read(B.highWaterMark)}catch(Ke){P(this,Ke)}B.state&=~M,B.reading||(S=R(Ae,B))}let Ee;return S>0?Ee=Ls(S,B):Ee=null,Ee===null?(B.needReadable=B.length<=B.highWaterMark,S=0):(B.length-=S,B.multiAwaitDrain?B.awaitDrainWriters.clear():B.awaitDrainWriters=null),B.length===0&&(B.ended||(B.needReadable=!0),Ae!==S&&B.ended&&ii(this)),Ee!==null&&!B.errorEmitted&&!B.closeEmitted&&(B.dataEmitted=!0,this.emit("data",Ee)),Ee};function N(S,B){if(k("onEofChunk"),!B.ended){if(B.decoder){let Ae=B.decoder.end();Ae&&Ae.length&&(B.buffer.push(Ae),B.length+=B.objectMode?1:Ae.length)}B.ended=!0,B.sync?X(S):(B.needReadable=!1,B.emittedReadable=!0,be(S))}}function X(S){let B=S._readableState;k("emitReadable",B.needReadable,B.emittedReadable),B.needReadable=!1,B.emittedReadable||(k("emitReadable",B.flowing),B.emittedReadable=!0,o.nextTick(be,S))}function be(S){let B=S._readableState;k("emitReadable_",B.destroyed,B.length,B.ended),!B.destroyed&&!B.errored&&(B.length||B.ended)&&(S.emit("readable"),B.emittedReadable=!1),B.needReadable=!B.flowing&&!B.ended&&B.length<=B.highWaterMark,Us(S)}function Ce(S,B){!B.readingMore&&B.constructed&&(B.readingMore=!0,o.nextTick(je,S,B))}function je(S,B){for(;!B.reading&&!B.ended&&(B.length<B.highWaterMark||B.flowing&&B.length===0);){let Ae=B.length;if(k("maybeReadMore read 0"),S.read(0),Ae===B.length)break}B.readingMore=!1}Y.prototype._read=function(S){throw new U("_read()")},Y.prototype.pipe=function(S,B){let Ae=this,ve=this._readableState;ve.pipes.length===1&&(ve.multiAwaitDrain||(ve.multiAwaitDrain=!0,ve.awaitDrainWriters=new d(ve.awaitDrainWriters?[ve.awaitDrainWriters]:[]))),ve.pipes.push(S),k("pipe count=%d opts=%j",ve.pipes.length,B);let Ee=(!B||B.end!==!1)&&S!==o.stdout&&S!==o.stderr?Ye:qt;ve.endEmitted?o.nextTick(Ee):Ae.once("end",Ee),S.on("unpipe",Ke);function Ke(Pt,dt){k("onunpipe"),Pt===Ae&&dt&&dt.hasUnpiped===!1&&(dt.hasUnpiped=!0,Nu())}function Ye(){k("onend"),S.end()}let xt,Fs=!1;function Nu(){k("cleanup"),S.removeListener("close",ai),S.removeListener("finish",li),xt&&S.removeListener("drain",xt),S.removeListener("error",si),S.removeListener("unpipe",Ke),Ae.removeListener("end",Ye),Ae.removeListener("end",qt),Ae.removeListener("data",Ws),Fs=!0,xt&&ve.awaitDrainWriters&&(!S._writableState||S._writableState.needDrain)&&xt()}function js(){Fs||(ve.pipes.length===1&&ve.pipes[0]===S?(k("false write response, pause",0),ve.awaitDrainWriters=S,ve.multiAwaitDrain=!1):ve.pipes.length>1&&ve.pipes.includes(S)&&(k("false write response, pause",ve.awaitDrainWriters.size),ve.awaitDrainWriters.add(S)),Ae.pause()),xt||(xt=Pe(Ae,S),S.on("drain",xt))}Ae.on("data",Ws);function Ws(Pt){k("ondata");let dt=S.write(Pt);k("dest.write",dt),dt===!1&&js()}function si(Pt){if(k("onerror",Pt),qt(),S.removeListener("error",si),S.listenerCount("error")===0){let dt=S._writableState||S._readableState;dt&&!dt.errorEmitted?P(S,Pt):S.emit("error",Pt)}}_(S,"error",si);function ai(){S.removeListener("finish",li),qt()}S.once("close",ai);function li(){k("onfinish"),S.removeListener("close",ai),qt()}S.once("finish",li);function qt(){k("unpipe"),Ae.unpipe(S)}return S.emit("pipe",Ae),S.writableNeedDrain===!0?js():ve.flowing||(k("pipe resume"),Ae.resume()),S};function Pe(S,B){return function(){let Ae=S._readableState;Ae.awaitDrainWriters===B?(k("pipeOnDrain",1),Ae.awaitDrainWriters=null):Ae.multiAwaitDrain&&(k("pipeOnDrain",Ae.awaitDrainWriters.size),Ae.awaitDrainWriters.delete(B)),(!Ae.awaitDrainWriters||Ae.awaitDrainWriters.size===0)&&S.listenerCount("data")&&S.resume()}}Y.prototype.unpipe=function(S){let B=this._readableState,Ae={hasUnpiped:!1};if(B.pipes.length===0)return this;if(!S){let Ee=B.pipes;B.pipes=[],this.pause();for(let Ke=0;Ke<Ee.length;Ke++)Ee[Ke].emit("unpipe",this,{hasUnpiped:!1});return this}let ve=a(B.pipes,S);return ve===-1?this:(B.pipes.splice(ve,1),B.pipes.length===0&&this.pause(),S.emit("unpipe",this,Ae),this)},Y.prototype.on=function(S,B){let Ae=y.prototype.on.call(this,S,B),ve=this._readableState;return S==="data"?(ve.readableListening=this.listenerCount("readable")>0,ve.flowing!==!1&&this.resume()):S==="readable"&&!ve.endEmitted&&!ve.readableListening&&(ve.readableListening=ve.needReadable=!0,ve.flowing=!1,ve.emittedReadable=!1,k("on readable",ve.length,ve.reading),ve.length?X(this):ve.reading||o.nextTick(Ne,this)),Ae},Y.prototype.addListener=Y.prototype.on,Y.prototype.removeListener=function(S,B){let Ae=y.prototype.removeListener.call(this,S,B);return S==="readable"&&o.nextTick(Ie,this),Ae},Y.prototype.off=Y.prototype.removeListener,Y.prototype.removeAllListeners=function(S){let B=y.prototype.removeAllListeners.apply(this,arguments);return(S==="readable"||S===void 0)&&o.nextTick(Ie,this),B};function Ie(S){let B=S._readableState;B.readableListening=S.listenerCount("readable")>0,B.resumeScheduled&&B[pe]===!1?B.flowing=!0:S.listenerCount("data")>0?S.resume():B.readableListening||(B.flowing=null)}function Ne(S){k("readable nexttick read 0"),S.read(0)}Y.prototype.resume=function(){let S=this._readableState;return S.flowing||(k("resume"),S.flowing=!S.readableListening,Ru(this,S)),S[pe]=!1,this};function Ru(S,B){B.resumeScheduled||(B.resumeScheduled=!0,o.nextTick(Mu,S,B))}function Mu(S,B){k("resume",B.reading),B.reading||S.read(0),B.resumeScheduled=!1,S.emit("resume"),Us(S),B.flowing&&!B.reading&&S.read(0)}Y.prototype.pause=function(){return k("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(k("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[pe]=!0,this};function Us(S){let B=S._readableState;for(k("flow",B.flowing);B.flowing&&S.read()!==null;);}Y.prototype.wrap=function(S){let B=!1;S.on("data",ve=>{!this.push(ve)&&S.pause&&(B=!0,S.pause())}),S.on("end",()=>{this.push(null)}),S.on("error",ve=>{P(this,ve)}),S.on("close",()=>{this.destroy()}),S.on("destroy",()=>{this.destroy()}),this._read=()=>{B&&S.resume&&(B=!1,S.resume())};let Ae=r(S);for(let ve=1;ve<Ae.length;ve++){let Ee=Ae[ve];this[Ee]===void 0&&typeof S[Ee]=="function"&&(this[Ee]=S[Ee].bind(S))}return this},Y.prototype[g]=function(){return Ds(this)},Y.prototype.iterator=function(S){return S!==void 0&&le(S,"options"),Ds(this,S)};function Ds(S,B){typeof S.read!="function"&&(S=Y.wrap(S,{objectMode:!0}));let Ae=Uu(S,B);return Ae.stream=S,Ae}async function*Uu(S,B){let Ae=he;function ve(Ye){this===S?(Ae(),Ae=he):Ae=Ye}S.on("readable",ve);let Ee,Ke=I(S,{writable:!1},Ye=>{Ee=Ye?G(Ee,Ye):null,Ae(),Ae=he});try{for(;;){let Ye=S.destroyed?null:S.read();if(Ye!==null)yield Ye;else{if(Ee)throw Ee;if(Ee===null)return;await new u(ve)}}}catch(Ye){throw Ee=G(Ee,Ye),Ee}finally{(Ee||B?.destroyOnReturn!==!1)&&(Ee===void 0||S._readableState.autoDestroy)?T.destroyer(S,null):(S.off("readable",ve),Ke())}}n(Y.prototype,{readable:{__proto__:null,get(){let S=this._readableState;return!!S&&S.readable!==!1&&!S.destroyed&&!S.errorEmitted&&!S.endEmitted},set(S){this._readableState&&(this._readableState.readable=!!S)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(S){this._readableState&&(this._readableState.flowing=S)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(S){this._readableState&&(this._readableState.destroyed=S)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),n(ge.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[pe]!==!1},set(S){this[pe]=!!S}}}),Y._fromList=Ls;function Ls(S,B){if(B.length===0)return null;let Ae;return B.objectMode?Ae=B.buffer.shift():!S||S>=B.length?(B.decoder?Ae=B.buffer.join(""):B.buffer.length===1?Ae=B.buffer.first():Ae=B.buffer.concat(B.length),B.buffer.clear()):Ae=B.buffer.consume(S,B.decoder),Ae}function ii(S){let B=S._readableState;k("endReadable",B.endEmitted),B.endEmitted||(B.ended=!0,o.nextTick(Du,B,S))}function Du(S,B){if(k("endReadableNT",S.endEmitted,S.length),!S.errored&&!S.closeEmitted&&!S.endEmitted&&S.length===0){if(S.endEmitted=!0,B.emit("end"),B.writable&&B.allowHalfOpen===!1)o.nextTick(Lu,B);else if(S.autoDestroy){let Ae=B._writableState;(!Ae||Ae.autoDestroy&&(Ae.finished||Ae.writable===!1))&&B.destroy()}}}function Lu(S){S.writable&&!S.writableEnded&&!S.destroyed&&S.end()}Y.from=function(S,B){return Q(Y,S,B)};var oi;function Ns(){return oi===void 0&&(oi={}),oi}Y.fromWeb=function(S,B){return Ns().newStreamReadableFromReadableStream(S,B)},Y.toWeb=function(S,B){return Ns().newReadableStreamFromStreamReadable(S,B)},Y.wrap=function(S,B){var Ae,ve;return new Y({objectMode:(Ae=(ve=S.readableObjectMode)!==null&&ve!==void 0?ve:S.objectMode)!==null&&Ae!==void 0?Ae:!0,...B,destroy(Ee,Ke){T.destroyer(S,Ee),Ke(Ee)}}).wrap(S)}}),Nn=fe((i,h)=>{oe(),ae(),se();var o=Et(),{ArrayPrototypeSlice:a,Error:l,FunctionPrototypeSymbolHasInstance:t,ObjectDefineProperty:e,ObjectDefineProperties:n,ObjectSetPrototypeOf:r,StringPrototypeToLowerCase:s,Symbol:u,SymbolHasInstance:d}=Ue();h.exports=le,le.WritableState=F;var{EventEmitter:p}=(_t(),Be(gt)),g=Ln().Stream,{Buffer:f}=(Ve(),Be(We)),b=Ut(),{addAbortSignal:y}=er(),{getHighWaterMark:_,getDefaultHighWaterMark:A}=tr(),{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_MULTIPLE_CALLBACK:k,ERR_STREAM_CANNOT_PIPE:E,ERR_STREAM_DESTROYED:T,ERR_STREAM_ALREADY_FINISHED:O,ERR_STREAM_NULL_VALUES:H,ERR_STREAM_WRITE_AFTER_END:G,ERR_UNKNOWN_ENCODING:de}=qe().codes,{errorOrDestroy:U}=b;r(le.prototype,g.prototype),r(le,g);function $(){}var z=u("kOnFinished");function F(x,D,q){typeof q!="boolean"&&(q=D instanceof st()),this.objectMode=!!(x&&x.objectMode),q&&(this.objectMode=this.objectMode||!!(x&&x.writableObjectMode)),this.highWaterMark=x?_(this,x,"writableHighWaterMark",q):A(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let te=!!(x&&x.decodeStrings===!1);this.decodeStrings=!te,this.defaultEncoding=x&&x.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=P.bind(void 0,D),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,me(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!x||x.emitClose!==!1,this.autoDestroy=!x||x.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[z]=[]}function me(x){x.buffered=[],x.bufferedIndex=0,x.allBuffers=!0,x.allNoop=!0}F.prototype.getBuffer=function(){return a(this.buffered,this.bufferedIndex)},e(F.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function le(x){let D=this instanceof st();if(!D&&!t(le,this))return new le(x);this._writableState=new F(x,this,D),x&&(typeof x.write=="function"&&(this._write=x.write),typeof x.writev=="function"&&(this._writev=x.writev),typeof x.destroy=="function"&&(this._destroy=x.destroy),typeof x.final=="function"&&(this._final=x.final),typeof x.construct=="function"&&(this._construct=x.construct),x.signal&&y(x.signal,this)),g.call(this,x),b.construct(this,()=>{let q=this._writableState;q.writing||_e(this,q),V(this,q)})}e(le,d,{__proto__:null,value:function(x){return t(this,x)?!0:this!==le?!1:x&&x._writableState instanceof F}}),le.prototype.pipe=function(){U(this,new E)};function pe(x,D,q,te){let ee=x._writableState;if(typeof q=="function")te=q,q=ee.defaultEncoding;else{if(!q)q=ee.defaultEncoding;else if(q!=="buffer"&&!f.isEncoding(q))throw new de(q);typeof te!="function"&&(te=$)}if(D===null)throw new H;if(!ee.objectMode)if(typeof D=="string")ee.decodeStrings!==!1&&(D=f.from(D,q),q="buffer");else if(D instanceof f)q="buffer";else if(g._isUint8Array(D))D=g._uint8ArrayToBuffer(D),q="buffer";else throw new w("chunk",["string","Buffer","Uint8Array"],D);let ie;return ee.ending?ie=new G:ee.destroyed&&(ie=new T("write")),ie?(o.nextTick(te,ie),U(x,ie,!0),ie):(ee.pendingcb++,we(x,ee,D,q,te))}le.prototype.write=function(x,D,q){return pe(this,x,D,q)===!0},le.prototype.cork=function(){this._writableState.corked++},le.prototype.uncork=function(){let x=this._writableState;x.corked&&(x.corked--,x.writing||_e(this,x))},le.prototype.setDefaultEncoding=function(x){if(typeof x=="string"&&(x=s(x)),!f.isEncoding(x))throw new de(x);return this._writableState.defaultEncoding=x,this};function we(x,D,q,te,ee){let ie=D.objectMode?1:q.length;D.length+=ie;let L=D.length<D.highWaterMark;return L||(D.needDrain=!0),D.writing||D.corked||D.errored||!D.constructed?(D.buffered.push({chunk:q,encoding:te,callback:ee}),D.allBuffers&&te!=="buffer"&&(D.allBuffers=!1),D.allNoop&&ee!==$&&(D.allNoop=!1)):(D.writelen=ie,D.writecb=ee,D.writing=!0,D.sync=!0,x._write(q,te,D.onwrite),D.sync=!1),L&&!D.errored&&!D.destroyed}function Q(x,D,q,te,ee,ie,L){D.writelen=te,D.writecb=L,D.writing=!0,D.sync=!0,D.destroyed?D.onwrite(new T("write")):q?x._writev(ee,D.onwrite):x._write(ee,ie,D.onwrite),D.sync=!1}function he(x,D,q,te){--D.pendingcb,te(q),J(D),U(x,q)}function P(x,D){let q=x._writableState,te=q.sync,ee=q.writecb;if(typeof ee!="function"){U(x,new k);return}q.writing=!1,q.writecb=null,q.length-=q.writelen,q.writelen=0,D?(D.stack,q.errored||(q.errored=D),x._readableState&&!x._readableState.errored&&(x._readableState.errored=D),te?o.nextTick(he,x,q,D,ee):he(x,q,D,ee)):(q.buffered.length>q.bufferedIndex&&_e(x,q),te?q.afterWriteTickInfo!==null&&q.afterWriteTickInfo.cb===ee?q.afterWriteTickInfo.count++:(q.afterWriteTickInfo={count:1,cb:ee,stream:x,state:q},o.nextTick(ce,q.afterWriteTickInfo)):ye(x,q,1,ee))}function ce({stream:x,state:D,count:q,cb:te}){return D.afterWriteTickInfo=null,ye(x,D,q,te)}function ye(x,D,q,te){for(!D.ending&&!x.destroyed&&D.length===0&&D.needDrain&&(D.needDrain=!1,x.emit("drain"));q-- >0;)D.pendingcb--,te();D.destroyed&&J(D),V(x,D)}function J(x){if(x.writing)return;for(let ee=x.bufferedIndex;ee<x.buffered.length;++ee){var D;let{chunk:ie,callback:L}=x.buffered[ee],ne=x.objectMode?1:ie.length;x.length-=ne,L((D=x.errored)!==null&&D!==void 0?D:new T("write"))}let q=x[z].splice(0);for(let ee=0;ee<q.length;ee++){var te;q[ee]((te=x.errored)!==null&&te!==void 0?te:new T("end"))}me(x)}function _e(x,D){if(D.corked||D.bufferProcessing||D.destroyed||!D.constructed)return;let{buffered:q,bufferedIndex:te,objectMode:ee}=D,ie=q.length-te;if(!ie)return;let L=te;if(D.bufferProcessing=!0,ie>1&&x._writev){D.pendingcb-=ie-1;let ne=D.allNoop?$:Y=>{for(let Se=L;Se<q.length;++Se)q[Se].callback(Y)},ge=D.allNoop&&L===0?q:a(q,L);ge.allBuffers=D.allBuffers,Q(x,D,!0,D.length,ge,"",ne),me(D)}else{do{let{chunk:ne,encoding:ge,callback:Y}=q[L];q[L++]=null;let Se=ee?1:ne.length;Q(x,D,!1,Se,ne,ge,Y)}while(L<q.length&&!D.writing);L===q.length?me(D):L>256?(q.splice(0,L),D.bufferedIndex=0):D.bufferedIndex=L}D.bufferProcessing=!1}le.prototype._write=function(x,D,q){if(this._writev)this._writev([{chunk:x,encoding:D}],q);else throw new I("_write()")},le.prototype._writev=null,le.prototype.end=function(x,D,q){let te=this._writableState;typeof x=="function"?(q=x,x=null,D=null):typeof D=="function"&&(q=D,D=null);let ee;if(x!=null){let ie=pe(this,x,D);ie instanceof l&&(ee=ie)}return te.corked&&(te.corked=1,this.uncork()),ee||(!te.errored&&!te.ending?(te.ending=!0,V(this,te,!0),te.ended=!0):te.finished?ee=new O("end"):te.destroyed&&(ee=new T("end"))),typeof q=="function"&&(ee||te.finished?o.nextTick(q,ee):te[z].push(q)),this};function K(x){return x.ending&&!x.destroyed&&x.constructed&&x.length===0&&!x.errored&&x.buffered.length===0&&!x.finished&&!x.writing&&!x.errorEmitted&&!x.closeEmitted}function M(x,D){let q=!1;function te(ee){if(q){U(x,ee??k());return}if(q=!0,D.pendingcb--,ee){let ie=D[z].splice(0);for(let L=0;L<ie.length;L++)ie[L](ee);U(x,ee,D.sync)}else K(D)&&(D.prefinished=!0,x.emit("prefinish"),D.pendingcb++,o.nextTick(j,x,D))}D.sync=!0,D.pendingcb++;try{x._final(te)}catch(ee){te(ee)}D.sync=!1}function Z(x,D){!D.prefinished&&!D.finalCalled&&(typeof x._final=="function"&&!D.destroyed?(D.finalCalled=!0,M(x,D)):(D.prefinished=!0,x.emit("prefinish")))}function V(x,D,q){K(D)&&(Z(x,D),D.pendingcb===0&&(q?(D.pendingcb++,o.nextTick((te,ee)=>{K(ee)?j(te,ee):ee.pendingcb--},x,D)):K(D)&&(D.pendingcb++,j(x,D))))}function j(x,D){D.pendingcb--,D.finished=!0;let q=D[z].splice(0);for(let te=0;te<q.length;te++)q[te]();if(x.emit("finish"),D.autoDestroy){let te=x._readableState;(!te||te.autoDestroy&&(te.endEmitted||te.readable===!1))&&x.destroy()}}n(le.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(x){this._writableState&&(this._writableState.destroyed=x)}},writable:{__proto__:null,get(){let x=this._writableState;return!!x&&x.writable!==!1&&!x.destroyed&&!x.errored&&!x.ending&&!x.ended},set(x){this._writableState&&(this._writableState.writable=!!x)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let x=this._writableState;return x?!x.destroyed&&!x.ending&&x.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var W=b.destroy;le.prototype.destroy=function(x,D){let q=this._writableState;return!q.destroyed&&(q.bufferedIndex<q.buffered.length||q[z].length)&&o.nextTick(J,q),W.call(this,x,D),this},le.prototype._undestroy=b.undestroy,le.prototype._destroy=function(x,D){D(x)},le.prototype[p.captureRejectionSymbol]=function(x){this.destroy(x)};var ue;function re(){return ue===void 0&&(ue={}),ue}le.fromWeb=function(x,D){return re().newStreamWritableFromWritableStream(x,D)},le.toWeb=function(x){return re().newWritableStreamFromStreamWritable(x)}}),wl=fe((i,h)=>{oe(),ae(),se();var o=Et(),a=(Ve(),Be(We)),{isReadable:l,isWritable:t,isIterable:e,isNodeStream:n,isReadableNodeStream:r,isWritableNodeStream:s,isDuplexNodeStream:u,isReadableStream:d,isWritableStream:p}=ot(),g=mt(),{AbortError:f,codes:{ERR_INVALID_ARG_TYPE:b,ERR_INVALID_RETURN_VALUE:y}}=qe(),{destroyer:_}=Ut(),A=st(),w=rr(),I=Nn(),{createDeferredPromise:k}=$e(),E=co(),T=globalThis.Blob||a.Blob,O=typeof T<"u"?function(z){return z instanceof T}:function(z){return!1},H=globalThis.AbortController||Vt().AbortController,{FunctionPrototypeCall:G}=Ue(),de=class extends A{constructor(z){super(z),z?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),z?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};h.exports=function z(F,me){if(u(F))return F;if(r(F))return $({readable:F});if(s(F))return $({writable:F});if(n(F))return $({writable:!1,readable:!1});if(d(F))return $({readable:w.fromWeb(F)});if(p(F))return $({writable:I.fromWeb(F)});if(typeof F=="function"){let{value:pe,write:we,final:Q,destroy:he}=U(F);if(e(pe))return E(de,pe,{objectMode:!0,write:we,final:Q,destroy:he});let P=pe?.then;if(typeof P=="function"){let ce,ye=G(P,pe,J=>{if(J!=null)throw new y("nully","body",J)},J=>{_(ce,J)});return ce=new de({objectMode:!0,readable:!1,write:we,final(J){Q(async()=>{try{await ye,o.nextTick(J,null)}catch(_e){o.nextTick(J,_e)}})},destroy:he})}throw new y("Iterable, AsyncIterable or AsyncFunction",me,pe)}if(O(F))return z(F.arrayBuffer());if(e(F))return E(de,F,{objectMode:!0,writable:!1});if(d(F?.readable)&&p(F?.writable))return de.fromWeb(F);if(typeof F?.writable=="object"||typeof F?.readable=="object"){let pe=F!=null&&F.readable?r(F?.readable)?F?.readable:z(F.readable):void 0,we=F!=null&&F.writable?s(F?.writable)?F?.writable:z(F.writable):void 0;return $({readable:pe,writable:we})}let le=F?.then;if(typeof le=="function"){let pe;return G(le,F,we=>{we!=null&&pe.push(we),pe.push(null)},we=>{_(pe,we)}),pe=new de({objectMode:!0,writable:!1,read(){}})}throw new b(me,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],F)};function U(z){let{promise:F,resolve:me}=k(),le=new H,pe=le.signal;return{value:z((async function*(){for(;;){let we=F;F=null;let{chunk:Q,done:he,cb:P}=await we;if(o.nextTick(P),he)return;if(pe.aborted)throw new f(void 0,{cause:pe.reason});({promise:F,resolve:me}=k()),yield Q}})(),{signal:pe}),write(we,Q,he){let P=me;me=null,P({chunk:we,done:!1,cb:he})},final(we){let Q=me;me=null,Q({done:!0,cb:we})},destroy(we,Q){le.abort(),Q(we)}}}function $(z){let F=z.readable&&typeof z.readable.read!="function"?w.wrap(z.readable):z.readable,me=z.writable,le=!!l(F),pe=!!t(me),we,Q,he,P,ce;function ye(J){let _e=P;P=null,_e?_e(J):J&&ce.destroy(J)}return ce=new de({readableObjectMode:!!(F!=null&&F.readableObjectMode),writableObjectMode:!!(me!=null&&me.writableObjectMode),readable:le,writable:pe}),pe&&(g(me,J=>{pe=!1,J&&_(F,J),ye(J)}),ce._write=function(J,_e,K){me.write(J,_e)?K():we=K},ce._final=function(J){me.end(),Q=J},me.on("drain",function(){if(we){let J=we;we=null,J()}}),me.on("finish",function(){if(Q){let J=Q;Q=null,J()}})),le&&(g(F,J=>{le=!1,J&&_(F,J),ye(J)}),F.on("readable",function(){if(he){let J=he;he=null,J()}}),F.on("end",function(){ce.push(null)}),ce._read=function(){for(;;){let J=F.read();if(J===null){he=ce._read;return}if(!ce.push(J))return}}),ce._destroy=function(J,_e){!J&&P!==null&&(J=new f),he=null,we=null,Q=null,P===null?_e(J):(P=_e,_(me,J),_(F,J))},ce}}),st=fe((i,h)=>{oe(),ae(),se();var{ObjectDefineProperties:o,ObjectGetOwnPropertyDescriptor:a,ObjectKeys:l,ObjectSetPrototypeOf:t}=Ue();h.exports=r;var e=rr(),n=Nn();t(r.prototype,e.prototype),t(r,e);{let p=l(n.prototype);for(let g=0;g<p.length;g++){let f=p[g];r.prototype[f]||(r.prototype[f]=n.prototype[f])}}function r(p){if(!(this instanceof r))return new r(p);e.call(this,p),n.call(this,p),p?(this.allowHalfOpen=p.allowHalfOpen!==!1,p.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),p.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}o(r.prototype,{writable:{__proto__:null,...a(n.prototype,"writable")},writableHighWaterMark:{__proto__:null,...a(n.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...a(n.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...a(n.prototype,"writableBuffer")},writableLength:{__proto__:null,...a(n.prototype,"writableLength")},writableFinished:{__proto__:null,...a(n.prototype,"writableFinished")},writableCorked:{__proto__:null,...a(n.prototype,"writableCorked")},writableEnded:{__proto__:null,...a(n.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...a(n.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(p){this._readableState&&this._writableState&&(this._readableState.destroyed=p,this._writableState.destroyed=p)}}});var s;function u(){return s===void 0&&(s={}),s}r.fromWeb=function(p,g){return u().newStreamDuplexFromReadableWritablePair(p,g)},r.toWeb=function(p){return u().newReadableWritablePairFromDuplex(p)};var d;r.from=function(p){return d||(d=wl()),d(p,"body")}}),ho=fe((i,h)=>{oe(),ae(),se();var{ObjectSetPrototypeOf:o,Symbol:a}=Ue();h.exports=r;var{ERR_METHOD_NOT_IMPLEMENTED:l}=qe().codes,t=st(),{getHighWaterMark:e}=tr();o(r.prototype,t.prototype),o(r,t);var n=a("kCallback");function r(d){if(!(this instanceof r))return new r(d);let p=d?e(this,d,"readableHighWaterMark",!0):null;p===0&&(d={...d,highWaterMark:null,readableHighWaterMark:p,writableHighWaterMark:d.writableHighWaterMark||0}),t.call(this,d),this._readableState.sync=!1,this[n]=null,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",u)}function s(d){typeof this._flush=="function"&&!this.destroyed?this._flush((p,g)=>{if(p){d?d(p):this.destroy(p);return}g!=null&&this.push(g),this.push(null),d&&d()}):(this.push(null),d&&d())}function u(){this._final!==s&&s.call(this)}r.prototype._final=s,r.prototype._transform=function(d,p,g){throw new l("_transform()")},r.prototype._write=function(d,p,g){let f=this._readableState,b=this._writableState,y=f.length;this._transform(d,p,(_,A)=>{if(_){g(_);return}A!=null&&this.push(A),b.ended||y===f.length||f.length<f.highWaterMark?g():this[n]=g})},r.prototype._read=function(){if(this[n]){let d=this[n];this[n]=null,d()}}}),fo=fe((i,h)=>{oe(),ae(),se();var{ObjectSetPrototypeOf:o}=Ue();h.exports=l;var a=ho();o(l.prototype,a.prototype),o(l,a);function l(t){if(!(this instanceof l))return new l(t);a.call(this,t)}l.prototype._transform=function(t,e,n){n(null,t)}}),Fn=fe((i,h)=>{oe(),ae(),se();var o=Et(),{ArrayIsArray:a,Promise:l,SymbolAsyncIterator:t,SymbolDispose:e}=Ue(),n=mt(),{once:r}=$e(),s=Ut(),u=st(),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:g,ERR_MISSING_ARGS:f,ERR_STREAM_DESTROYED:b,ERR_STREAM_PREMATURE_CLOSE:y},AbortError:_}=qe(),{validateFunction:A,validateAbortSignal:w}=Qt(),{isIterable:I,isReadable:k,isReadableNodeStream:E,isNodeStream:T,isTransformStream:O,isWebStream:H,isReadableStream:G,isReadableFinished:de}=ot(),U=globalThis.AbortController||Vt().AbortController,$,z,F;function me(J,_e,K){let M=!1;J.on("close",()=>{M=!0});let Z=n(J,{readable:_e,writable:K},V=>{M=!V});return{destroy:V=>{M||(M=!0,s.destroyer(J,V||new b("pipe")))},cleanup:Z}}function le(J){return A(J[J.length-1],"streams[stream.length - 1]"),J.pop()}function pe(J){if(I(J))return J;if(E(J))return we(J);throw new p("val",["Readable","Iterable","AsyncIterable"],J)}async function*we(J){z||(z=rr()),yield*z.prototype[t].call(J)}async function Q(J,_e,K,{end:M}){let Z,V=null,j=re=>{if(re&&(Z=re),V){let x=V;V=null,x()}},W=()=>new l((re,x)=>{Z?x(Z):V=()=>{Z?x(Z):re()}});_e.on("drain",j);let ue=n(_e,{readable:!1},j);try{_e.writableNeedDrain&&await W();for await(let re of J)_e.write(re)||await W();M&&(_e.end(),await W()),K()}catch(re){K(Z!==re?d(Z,re):re)}finally{ue(),_e.off("drain",j)}}async function he(J,_e,K,{end:M}){O(_e)&&(_e=_e.writable);let Z=_e.getWriter();try{for await(let V of J)await Z.ready,Z.write(V).catch(()=>{});await Z.ready,M&&await Z.close(),K()}catch(V){try{await Z.abort(V),K(V)}catch(j){K(j)}}}function P(...J){return ce(J,r(le(J)))}function ce(J,_e,K){if(J.length===1&&a(J[0])&&(J=J[0]),J.length<2)throw new f("streams");let M=new U,Z=M.signal,V=K?.signal,j=[];w(V,"options.signal");function W(){ee(new _)}F=F||$e().addAbortListener;let ue;V&&(ue=F(V,W));let re,x,D=[],q=0;function te(ge){ee(ge,--q===0)}function ee(ge,Y){var Se;if(ge&&(!re||re.code==="ERR_STREAM_PREMATURE_CLOSE")&&(re=ge),!(!re&&!Y)){for(;D.length;)D.shift()(re);(Se=ue)===null||Se===void 0||Se[e](),M.abort(),Y&&(re||j.forEach(c=>c()),o.nextTick(_e,re,x))}}let ie;for(let ge=0;ge<J.length;ge++){let Y=J[ge],Se=ge<J.length-1,c=ge>0,m=Se||K?.end!==!1,v=ge===J.length-1;if(T(Y)){let R=function(N){N&&N.name!=="AbortError"&&N.code!=="ERR_STREAM_PREMATURE_CLOSE"&&te(N)};if(m){let{destroy:N,cleanup:X}=me(Y,Se,c);D.push(N),k(Y)&&v&&j.push(X)}Y.on("error",R),k(Y)&&v&&j.push(()=>{Y.removeListener("error",R)})}if(ge===0)if(typeof Y=="function"){if(ie=Y({signal:Z}),!I(ie))throw new g("Iterable, AsyncIterable or Stream","source",ie)}else I(Y)||E(Y)||O(Y)?ie=Y:ie=u.from(Y);else if(typeof Y=="function"){if(O(ie)){var L;ie=pe((L=ie)===null||L===void 0?void 0:L.readable)}else ie=pe(ie);if(ie=Y(ie,{signal:Z}),Se){if(!I(ie,!0))throw new g("AsyncIterable",`transform[${ge-1}]`,ie)}else{var ne;$||($=fo());let R=new $({objectMode:!0}),N=(ne=ie)===null||ne===void 0?void 0:ne.then;if(typeof N=="function")q++,N.call(ie,Ce=>{x=Ce,Ce!=null&&R.write(Ce),m&&R.end(),o.nextTick(te)},Ce=>{R.destroy(Ce),o.nextTick(te,Ce)});else if(I(ie,!0))q++,Q(ie,R,te,{end:m});else if(G(ie)||O(ie)){let Ce=ie.readable||ie;q++,Q(Ce,R,te,{end:m})}else throw new g("AsyncIterable or Promise","destination",ie);ie=R;let{destroy:X,cleanup:be}=me(ie,!1,!0);D.push(X),v&&j.push(be)}}else if(T(Y)){if(E(ie)){q+=2;let R=ye(ie,Y,te,{end:m});k(Y)&&v&&j.push(R)}else if(O(ie)||G(ie)){let R=ie.readable||ie;q++,Q(R,Y,te,{end:m})}else if(I(ie))q++,Q(ie,Y,te,{end:m});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],ie);ie=Y}else if(H(Y)){if(E(ie))q++,he(pe(ie),Y,te,{end:m});else if(G(ie)||I(ie))q++,he(ie,Y,te,{end:m});else if(O(ie))q++,he(ie.readable,Y,te,{end:m});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],ie);ie=Y}else ie=u.from(Y)}return(Z!=null&&Z.aborted||V!=null&&V.aborted)&&o.nextTick(W),ie}function ye(J,_e,K,{end:M}){let Z=!1;if(_e.on("close",()=>{Z||K(new y)}),J.pipe(_e,{end:!1}),M){let V=function(){Z=!0,_e.end()};de(J)?o.nextTick(V):J.once("end",V)}else K();return n(J,{readable:!0,writable:!1},V=>{let j=J._readableState;V&&V.code==="ERR_STREAM_PREMATURE_CLOSE"&&j&&j.ended&&!j.errored&&!j.errorEmitted?J.once("end",K).once("error",K):K(V)}),n(_e,{readable:!1,writable:!0},K)}h.exports={pipelineImpl:ce,pipeline:P}}),po=fe((i,h)=>{oe(),ae(),se();var{pipeline:o}=Fn(),a=st(),{destroyer:l}=Ut(),{isNodeStream:t,isReadable:e,isWritable:n,isWebStream:r,isTransformStream:s,isWritableStream:u,isReadableStream:d}=ot(),{AbortError:p,codes:{ERR_INVALID_ARG_VALUE:g,ERR_MISSING_ARGS:f}}=qe(),b=mt();h.exports=function(...y){if(y.length===0)throw new f("streams");if(y.length===1)return a.from(y[0]);let _=[...y];if(typeof y[0]=="function"&&(y[0]=a.from(y[0])),typeof y[y.length-1]=="function"){let U=y.length-1;y[U]=a.from(y[U])}for(let U=0;U<y.length;++U)if(!(!t(y[U])&&!r(y[U]))){if(U<y.length-1&&!(e(y[U])||d(y[U])||s(y[U])))throw new g(`streams[${U}]`,_[U],"must be readable");if(U>0&&!(n(y[U])||u(y[U])||s(y[U])))throw new g(`streams[${U}]`,_[U],"must be writable")}let A,w,I,k,E;function T(U){let $=k;k=null,$?$(U):U?E.destroy(U):!de&&!G&&E.destroy()}let O=y[0],H=o(y,T),G=!!(n(O)||u(O)||s(O)),de=!!(e(H)||d(H)||s(H));if(E=new a({writableObjectMode:!!(O!=null&&O.writableObjectMode),readableObjectMode:!!(H!=null&&H.readableObjectMode),writable:G,readable:de}),G){if(t(O))E._write=function($,z,F){O.write($,z)?F():A=F},E._final=function($){O.end(),w=$},O.on("drain",function(){if(A){let $=A;A=null,$()}});else if(r(O)){let $=(s(O)?O.writable:O).getWriter();E._write=async function(z,F,me){try{await $.ready,$.write(z).catch(()=>{}),me()}catch(le){me(le)}},E._final=async function(z){try{await $.ready,$.close().catch(()=>{}),w=z}catch(F){z(F)}}}let U=s(H)?H.readable:H;b(U,()=>{if(w){let $=w;w=null,$()}})}if(de){if(t(H))H.on("readable",function(){if(I){let U=I;I=null,U()}}),H.on("end",function(){E.push(null)}),E._read=function(){for(;;){let U=H.read();if(U===null){I=E._read;return}if(!E.push(U))return}};else if(r(H)){let U=(s(H)?H.readable:H).getReader();E._read=async function(){for(;;)try{let{value:$,done:z}=await U.read();if(!E.push($))return;if(z){E.push(null);return}}catch{return}}}}return E._destroy=function(U,$){!U&&k!==null&&(U=new p),I=null,A=null,w=null,k===null?$(U):(k=$,t(H)&&l(H,U))},E}}),vl=fe((i,h)=>{oe(),ae(),se();var o=globalThis.AbortController||Vt().AbortController,{codes:{ERR_INVALID_ARG_VALUE:a,ERR_INVALID_ARG_TYPE:l,ERR_MISSING_ARGS:t,ERR_OUT_OF_RANGE:e},AbortError:n}=qe(),{validateAbortSignal:r,validateInteger:s,validateObject:u}=Qt(),d=Ue().Symbol("kWeak"),p=Ue().Symbol("kResistStopPropagation"),{finished:g}=mt(),f=po(),{addAbortSignalNoValidate:b}=er(),{isWritable:y,isNodeStream:_}=ot(),{deprecate:A}=$e(),{ArrayPrototypePush:w,Boolean:I,MathFloor:k,Number:E,NumberIsNaN:T,Promise:O,PromiseReject:H,PromiseResolve:G,PromisePrototypeThen:de,Symbol:U}=Ue(),$=U("kEmpty"),z=U("kEof");function F(V,j){if(j!=null&&u(j,"options"),j?.signal!=null&&r(j.signal,"options.signal"),_(V)&&!y(V))throw new a("stream",V,"must be writable");let W=f(this,V);return j!=null&&j.signal&&b(j.signal,W),W}function me(V,j){if(typeof V!="function")throw new l("fn",["Function","AsyncFunction"],V);j!=null&&u(j,"options"),j?.signal!=null&&r(j.signal,"options.signal");let W=1;j?.concurrency!=null&&(W=k(j.concurrency));let ue=W-1;return j?.highWaterMark!=null&&(ue=k(j.highWaterMark)),s(W,"options.concurrency",1),s(ue,"options.highWaterMark",0),ue+=W,(async function*(){let re=$e().AbortSignalAny([j?.signal].filter(I)),x=this,D=[],q={signal:re},te,ee,ie=!1,L=0;function ne(){ie=!0,ge()}function ge(){L-=1,Y()}function Y(){ee&&!ie&&L<W&&D.length<ue&&(ee(),ee=null)}async function Se(){try{for await(let c of x){if(ie)return;if(re.aborted)throw new n;try{if(c=V(c,q),c===$)continue;c=G(c)}catch(m){c=H(m)}L+=1,de(c,ge,ne),D.push(c),te&&(te(),te=null),!ie&&(D.length>=ue||L>=W)&&await new O(m=>{ee=m})}D.push(z)}catch(c){let m=H(c);de(m,ge,ne),D.push(m)}finally{ie=!0,te&&(te(),te=null)}}Se();try{for(;;){for(;D.length>0;){let c=await D[0];if(c===z)return;if(re.aborted)throw new n;c!==$&&(yield c),D.shift(),Y()}await new O(c=>{te=c})}}finally{ie=!0,ee&&(ee(),ee=null)}}).call(this)}function le(V=void 0){return V!=null&&u(V,"options"),V?.signal!=null&&r(V.signal,"options.signal"),(async function*(){let j=0;for await(let ue of this){var W;if(V!=null&&(W=V.signal)!==null&&W!==void 0&&W.aborted)throw new n({cause:V.signal.reason});yield[j++,ue]}}).call(this)}async function pe(V,j=void 0){for await(let W of P.call(this,V,j))return!0;return!1}async function we(V,j=void 0){if(typeof V!="function")throw new l("fn",["Function","AsyncFunction"],V);return!await pe.call(this,async(...W)=>!await V(...W),j)}async function Q(V,j){for await(let W of P.call(this,V,j))return W}async function he(V,j){if(typeof V!="function")throw new l("fn",["Function","AsyncFunction"],V);async function W(ue,re){return await V(ue,re),$}for await(let ue of me.call(this,W,j));}function P(V,j){if(typeof V!="function")throw new l("fn",["Function","AsyncFunction"],V);async function W(ue,re){return await V(ue,re)?ue:$}return me.call(this,W,j)}var ce=class extends t{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function ye(V,j,W){var ue;if(typeof V!="function")throw new l("reducer",["Function","AsyncFunction"],V);W!=null&&u(W,"options"),W?.signal!=null&&r(W.signal,"options.signal");let re=arguments.length>1;if(W!=null&&(ue=W.signal)!==null&&ue!==void 0&&ue.aborted){let ee=new n(void 0,{cause:W.signal.reason});throw this.once("error",()=>{}),await g(this.destroy(ee)),ee}let x=new o,D=x.signal;if(W!=null&&W.signal){let ee={once:!0,[d]:this,[p]:!0};W.signal.addEventListener("abort",()=>x.abort(),ee)}let q=!1;try{for await(let ee of this){var te;if(q=!0,W!=null&&(te=W.signal)!==null&&te!==void 0&&te.aborted)throw new n;re?j=await V(j,ee,{signal:D}):(j=ee,re=!0)}if(!q&&!re)throw new ce}finally{x.abort()}return j}async function J(V){V!=null&&u(V,"options"),V?.signal!=null&&r(V.signal,"options.signal");let j=[];for await(let ue of this){var W;if(V!=null&&(W=V.signal)!==null&&W!==void 0&&W.aborted)throw new n(void 0,{cause:V.signal.reason});w(j,ue)}return j}function _e(V,j){let W=me.call(this,V,j);return(async function*(){for await(let ue of W)yield*ue}).call(this)}function K(V){if(V=E(V),T(V))return 0;if(V<0)throw new e("number",">= 0",V);return V}function M(V,j=void 0){return j!=null&&u(j,"options"),j?.signal!=null&&r(j.signal,"options.signal"),V=K(V),(async function*(){var W;if(j!=null&&(W=j.signal)!==null&&W!==void 0&&W.aborted)throw new n;for await(let re of this){var ue;if(j!=null&&(ue=j.signal)!==null&&ue!==void 0&&ue.aborted)throw new n;V--<=0&&(yield re)}}).call(this)}function Z(V,j=void 0){return j!=null&&u(j,"options"),j?.signal!=null&&r(j.signal,"options.signal"),V=K(V),(async function*(){var W;if(j!=null&&(W=j.signal)!==null&&W!==void 0&&W.aborted)throw new n;for await(let re of this){var ue;if(j!=null&&(ue=j.signal)!==null&&ue!==void 0&&ue.aborted)throw new n;if(V-- >0&&(yield re),V<=0)return}}).call(this)}h.exports.streamReturningOperators={asIndexedPairs:A(le,"readable.asIndexedPairs will be removed in a future version."),drop:M,filter:P,flatMap:_e,map:me,take:Z,compose:F},h.exports.promiseReturningOperators={every:we,forEach:he,reduce:ye,toArray:J,some:pe,find:Q}}),go=fe((i,h)=>{oe(),ae(),se();var{ArrayPrototypePop:o,Promise:a}=Ue(),{isIterable:l,isNodeStream:t,isWebStream:e}=ot(),{pipelineImpl:n}=Fn(),{finished:r}=mt();mo();function s(...u){return new a((d,p)=>{let g,f,b=u[u.length-1];if(b&&typeof b=="object"&&!t(b)&&!l(b)&&!e(b)){let y=o(u);g=y.signal,f=y.end}n(u,(y,_)=>{y?p(y):d(_)},{signal:g,end:f})})}h.exports={finished:r,pipeline:s}}),mo=fe((i,h)=>{oe(),ae(),se();var{Buffer:o}=(Ve(),Be(We)),{ObjectDefineProperty:a,ObjectKeys:l,ReflectApply:t}=Ue(),{promisify:{custom:e}}=$e(),{streamReturningOperators:n,promiseReturningOperators:r}=vl(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:s}}=qe(),u=po(),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:p}=tr(),{pipeline:g}=Fn(),{destroyer:f}=Ut(),b=mt(),y=go(),_=ot(),A=h.exports=Ln().Stream;A.isDestroyed=_.isDestroyed,A.isDisturbed=_.isDisturbed,A.isErrored=_.isErrored,A.isReadable=_.isReadable,A.isWritable=_.isWritable,A.Readable=rr();for(let I of l(n)){let k=function(...T){if(new.target)throw s();return A.Readable.from(t(E,this,T))},E=n[I];a(k,"name",{__proto__:null,value:E.name}),a(k,"length",{__proto__:null,value:E.length}),a(A.Readable.prototype,I,{__proto__:null,value:k,enumerable:!1,configurable:!0,writable:!0})}for(let I of l(r)){let k=function(...T){if(new.target)throw s();return t(E,this,T)},E=r[I];a(k,"name",{__proto__:null,value:E.name}),a(k,"length",{__proto__:null,value:E.length}),a(A.Readable.prototype,I,{__proto__:null,value:k,enumerable:!1,configurable:!0,writable:!0})}A.Writable=Nn(),A.Duplex=st(),A.Transform=ho(),A.PassThrough=fo(),A.pipeline=g;var{addAbortSignal:w}=er();A.addAbortSignal=w,A.finished=b,A.destroy=f,A.compose=u,A.setDefaultHighWaterMark=d,A.getDefaultHighWaterMark=p,a(A,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return y}}),a(g,e,{__proto__:null,enumerable:!0,get(){return y.pipeline}}),a(b,e,{__proto__:null,enumerable:!0,get(){return y.finished}}),A.Stream=A,A._isUint8Array=function(I){return I instanceof Uint8Array},A._uint8ArrayToBuffer=function(I){return o.from(I.buffer,I.byteOffset,I.byteLength)}}),St=fe((i,h)=>{oe(),ae(),se();var o=mo(),a=go(),l=o.Readable.destroy;h.exports=o.Readable,h.exports._uint8ArrayToBuffer=o._uint8ArrayToBuffer,h.exports._isUint8Array=o._isUint8Array,h.exports.isDisturbed=o.isDisturbed,h.exports.isErrored=o.isErrored,h.exports.isReadable=o.isReadable,h.exports.Readable=o.Readable,h.exports.Writable=o.Writable,h.exports.Duplex=o.Duplex,h.exports.Transform=o.Transform,h.exports.PassThrough=o.PassThrough,h.exports.addAbortSignal=o.addAbortSignal,h.exports.finished=o.finished,h.exports.destroy=o.destroy,h.exports.destroy=l,h.exports.pipeline=o.pipeline,h.exports.compose=o.compose,Object.defineProperty(o,"promises",{configurable:!0,enumerable:!0,get(){return a}}),h.exports.Stream=o.Stream,h.exports.default=h.exports}),_l=fe((i,h)=>{oe(),ae(),se(),typeof Object.create=="function"?h.exports=function(o,a){a&&(o.super_=a,o.prototype=Object.create(a.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}))}:h.exports=function(o,a){if(a){o.super_=a;var l=function(){};l.prototype=a.prototype,o.prototype=new l,o.prototype.constructor=o}}}),El=fe((i,h)=>{oe(),ae(),se();var{Buffer:o}=(Ve(),Be(We)),a=Symbol.for("BufferList");function l(t){if(!(this instanceof l))return new l(t);l._init.call(this,t)}l._init=function(t){Object.defineProperty(this,a,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},l.prototype._new=function(t){return new l(t)},l.prototype._offset=function(t){if(t===0)return[0,0];let e=0;for(let n=0;n<this._bufs.length;n++){let r=e+this._bufs[n].length;if(t<r||n===this._bufs.length-1)return[n,t-e];e=r}},l.prototype._reverseOffset=function(t){let e=t[0],n=t[1];for(let r=0;r<e;r++)n+=this._bufs[r].length;return n},l.prototype.get=function(t){if(t>this.length||t<0)return;let e=this._offset(t);return this._bufs[e[0]][e[1]]},l.prototype.slice=function(t,e){return typeof t=="number"&&t<0&&(t+=this.length),typeof e=="number"&&e<0&&(e+=this.length),this.copy(null,0,t,e)},l.prototype.copy=function(t,e,n,r){if((typeof n!="number"||n<0)&&(n=0),(typeof r!="number"||r>this.length)&&(r=this.length),n>=this.length||r<=0)return t||o.alloc(0);let s=!!t,u=this._offset(n),d=r-n,p=d,g=s&&e||0,f=u[1];if(n===0&&r===this.length){if(!s)return this._bufs.length===1?this._bufs[0]:o.concat(this._bufs,this.length);for(let b=0;b<this._bufs.length;b++)this._bufs[b].copy(t,g),g+=this._bufs[b].length;return t}if(p<=this._bufs[u[0]].length-f)return s?this._bufs[u[0]].copy(t,e,f,f+p):this._bufs[u[0]].slice(f,f+p);s||(t=o.allocUnsafe(d));for(let b=u[0];b<this._bufs.length;b++){let y=this._bufs[b].length-f;if(p>y)this._bufs[b].copy(t,g,f),g+=y;else{this._bufs[b].copy(t,g,f,f+p),g+=y;break}p-=y,f&&(f=0)}return t.length>g?t.slice(0,g):t},l.prototype.shallowSlice=function(t,e){if(t=t||0,e=typeof e!="number"?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();let n=this._offset(t),r=this._offset(e),s=this._bufs.slice(n[0],r[0]+1);return r[1]===0?s.pop():s[s.length-1]=s[s.length-1].slice(0,r[1]),n[1]!==0&&(s[0]=s[0].slice(n[1])),this._new(s)},l.prototype.toString=function(t,e,n){return this.slice(e,n).toString(t)},l.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this},l.prototype.duplicate=function(){let t=this._new();for(let e=0;e<this._bufs.length;e++)t.append(this._bufs[e]);return t},l.prototype.append=function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(o.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let e=0;e<t.length;e++)this.append(t[e]);else if(this._isBufferList(t))for(let e=0;e<t._bufs.length;e++)this.append(t._bufs[e]);else typeof t=="number"&&(t=t.toString()),this._appendBuffer(o.from(t));return this},l.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length},l.prototype.indexOf=function(t,e,n){if(n===void 0&&typeof e=="string"&&(n=e,e=void 0),typeof t=="function"||Array.isArray(t))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof t=="number"?t=o.from([t]):typeof t=="string"?t=o.from(t,n):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=o.from(t.buffer,t.byteOffset,t.byteLength):o.isBuffer(t)||(t=o.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),t.length===0)return e>this.length?this.length:e;let r=this._offset(e),s=r[0],u=r[1];for(;s<this._bufs.length;s++){let d=this._bufs[s];for(;u<d.length;)if(d.length-u>=t.length){let p=d.indexOf(t,u);if(p!==-1)return this._reverseOffset([s,p]);u=d.length-t.length+1}else{let p=this._reverseOffset([s,u]);if(this._match(p,t))return p;u++}u=0}return-1},l.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let n=0;n<e.length;n++)if(this.get(t+n)!==e[n])return!1;return!0},(function(){let t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readBigInt64BE:8,readBigInt64LE:8,readBigUInt64BE:8,readBigUInt64LE:8,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let e in t)(function(n){t[n]===null?l.prototype[n]=function(r,s){return this.slice(r,r+s)[n](0,s)}:l.prototype[n]=function(r=0){return this.slice(r,r+t[n])[n](0)}})(e)})(),l.prototype._isBufferList=function(t){return t instanceof l||l.isBufferList(t)},l.isBufferList=function(t){return t!=null&&t[a]},h.exports=l}),Sl=fe((i,h)=>{oe(),ae(),se();var o=St().Duplex,a=_l(),l=El();function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="function"){this._callback=e;let n=(function(r){this._callback&&(this._callback(r),this._callback=null)}).bind(this);this.on("pipe",function(r){r.on("error",n)}),this.on("unpipe",function(r){r.removeListener("error",n)}),e=null}l._init.call(this,e),o.call(this)}a(t,o),Object.assign(t.prototype,l.prototype),t.prototype._new=function(e){return new t(e)},t.prototype._write=function(e,n,r){this._appendBuffer(e),typeof r=="function"&&r()},t.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},t.prototype.end=function(e){o.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},t.prototype._destroy=function(e,n){this._bufs.length=0,this.length=0,n(e)},t.prototype._isBufferList=function(e){return e instanceof t||e instanceof l||t.isBufferList(e)},t.isBufferList=l.isBufferList,h.exports=t,h.exports.BufferListStream=t,h.exports.BufferList=l}),Cl=fe((i,h)=>{oe(),ae(),se();var o=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}};h.exports=o}),Ao=fe((i,h)=>{oe(),ae(),se();var o=h.exports,{Buffer:a}=(Ve(),Be(We));o.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},o.requiredHeaderFlags={1:0,2:0,4:0,5:0,6:2,7:0,8:2,9:0,10:2,11:0,12:0,13:0,14:0,15:0},o.requiredHeaderFlagsErrors={};for(let t in o.requiredHeaderFlags){let e=o.requiredHeaderFlags[t];o.requiredHeaderFlagsErrors[t]="Invalid header flag bits, must be 0x"+e.toString(16)+" for "+o.types[t]+" packet"}o.codes={};for(let t in o.types){let e=o.types[t];o.codes[e]=t}o.CMD_SHIFT=4,o.CMD_MASK=240,o.DUP_MASK=8,o.QOS_MASK=3,o.QOS_SHIFT=1,o.RETAIN_MASK=1,o.VARBYTEINT_MASK=127,o.VARBYTEINT_FIN_MASK=128,o.VARBYTEINT_MAX=268435455,o.SESSIONPRESENT_MASK=1,o.SESSIONPRESENT_HEADER=a.from([o.SESSIONPRESENT_MASK]),o.CONNACK_HEADER=a.from([o.codes.connack<<o.CMD_SHIFT]),o.USERNAME_MASK=128,o.PASSWORD_MASK=64,o.WILL_RETAIN_MASK=32,o.WILL_QOS_MASK=24,o.WILL_QOS_SHIFT=3,o.WILL_FLAG_MASK=4,o.CLEAN_SESSION_MASK=2,o.CONNECT_HEADER=a.from([o.codes.connect<<o.CMD_SHIFT]),o.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},o.propertiesCodes={};for(let t in o.properties){let e=o.properties[t];o.propertiesCodes[e]=t}o.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"};function l(t){return[0,1,2].map(e=>[0,1].map(n=>[0,1].map(r=>{let s=a.alloc(1);return s.writeUInt8(o.codes[t]<<o.CMD_SHIFT|(n?o.DUP_MASK:0)|e<<o.QOS_SHIFT|r,0,!0),s})))}o.PUBLISH_HEADER=l("publish"),o.SUBSCRIBE_HEADER=l("subscribe"),o.SUBSCRIBE_OPTIONS_QOS_MASK=3,o.SUBSCRIBE_OPTIONS_NL_MASK=1,o.SUBSCRIBE_OPTIONS_NL_SHIFT=2,o.SUBSCRIBE_OPTIONS_RAP_MASK=1,o.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,o.SUBSCRIBE_OPTIONS_RH_MASK=3,o.SUBSCRIBE_OPTIONS_RH_SHIFT=4,o.SUBSCRIBE_OPTIONS_RH=[0,16,32],o.SUBSCRIBE_OPTIONS_NL=4,o.SUBSCRIBE_OPTIONS_RAP=8,o.SUBSCRIBE_OPTIONS_QOS=[0,1,2],o.UNSUBSCRIBE_HEADER=l("unsubscribe"),o.ACKS={unsuback:l("unsuback"),puback:l("puback"),pubcomp:l("pubcomp"),pubrel:l("pubrel"),pubrec:l("pubrec")},o.SUBACK_HEADER=a.from([o.codes.suback<<o.CMD_SHIFT]),o.VERSION3=a.from([3]),o.VERSION4=a.from([4]),o.VERSION5=a.from([5]),o.VERSION131=a.from([131]),o.VERSION132=a.from([132]),o.QOS=[0,1,2].map(t=>a.from([t])),o.EMPTY={pingreq:a.from([o.codes.pingreq<<4,0]),pingresp:a.from([o.codes.pingresp<<4,0]),disconnect:a.from([o.codes.disconnect<<4,0])},o.MQTT5_PUBACK_PUBREC_CODES={0:"Success",16:"No matching subscribers",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",144:"Topic Name invalid",145:"Packet identifier in use",151:"Quota exceeded",153:"Payload format invalid"},o.MQTT5_PUBREL_PUBCOMP_CODES={0:"Success",146:"Packet Identifier not found"},o.MQTT5_SUBACK_CODES={0:"Granted QoS 0",1:"Granted QoS 1",2:"Granted QoS 2",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use",151:"Quota exceeded",158:"Shared Subscriptions not supported",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},o.MQTT5_UNSUBACK_CODES={0:"Success",17:"No subscription existed",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use"},o.MQTT5_DISCONNECT_CODES={0:"Normal disconnection",4:"Disconnect with Will Message",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",135:"Not authorized",137:"Server busy",139:"Server shutting down",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},o.MQTT5_AUTH_CODES={0:"Success",24:"Continue authentication",25:"Re-authenticate"}}),kl=fe((i,h)=>{oe(),ae(),se();var o=1e3,a=o*60,l=a*60,t=l*24,e=t*7,n=t*365.25;h.exports=function(p,g){g=g||{};var f=typeof p;if(f==="string"&&p.length>0)return r(p);if(f==="number"&&isFinite(p))return g.long?u(p):s(p);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))};function r(p){if(p=String(p),!(p.length>100)){var g=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(p);if(g){var f=parseFloat(g[1]),b=(g[2]||"ms").toLowerCase();switch(b){case"years":case"year":case"yrs":case"yr":case"y":return f*n;case"weeks":case"week":case"w":return f*e;case"days":case"day":case"d":return f*t;case"hours":case"hour":case"hrs":case"hr":case"h":return f*l;case"minutes":case"minute":case"mins":case"min":case"m":return f*a;case"seconds":case"second":case"secs":case"sec":case"s":return f*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function s(p){var g=Math.abs(p);return g>=t?Math.round(p/t)+"d":g>=l?Math.round(p/l)+"h":g>=a?Math.round(p/a)+"m":g>=o?Math.round(p/o)+"s":p+"ms"}function u(p){var g=Math.abs(p);return g>=t?d(p,g,t,"day"):g>=l?d(p,g,l,"hour"):g>=a?d(p,g,a,"minute"):g>=o?d(p,g,o,"second"):p+" ms"}function d(p,g,f,b){var y=g>=f*1.5;return Math.round(p/f)+" "+b+(y?"s":"")}}),Tl=fe((i,h)=>{oe(),ae(),se();function o(a){t.debug=t,t.default=t,t.coerce=d,t.disable=s,t.enable=n,t.enabled=u,t.humanize=kl(),t.destroy=p,Object.keys(a).forEach(g=>{t[g]=a[g]}),t.names=[],t.skips=[],t.formatters={};function l(g){let f=0;for(let b=0;b<g.length;b++)f=(f<<5)-f+g.charCodeAt(b),f|=0;return t.colors[Math.abs(f)%t.colors.length]}t.selectColor=l;function t(g){let f,b=null,y,_;function A(...w){if(!A.enabled)return;let I=A,k=Number(new Date),E=k-(f||k);I.diff=E,I.prev=f,I.curr=k,f=k,w[0]=t.coerce(w[0]),typeof w[0]!="string"&&w.unshift("%O");let T=0;w[0]=w[0].replace(/%([a-zA-Z%])/g,(O,H)=>{if(O==="%%")return"%";T++;let G=t.formatters[H];if(typeof G=="function"){let de=w[T];O=G.call(I,de),w.splice(T,1),T--}return O}),t.formatArgs.call(I,w),(I.log||t.log).apply(I,w)}return A.namespace=g,A.useColors=t.useColors(),A.color=t.selectColor(g),A.extend=e,A.destroy=t.destroy,Object.defineProperty(A,"enabled",{enumerable:!0,configurable:!1,get:()=>b!==null?b:(y!==t.namespaces&&(y=t.namespaces,_=t.enabled(g)),_),set:w=>{b=w}}),typeof t.init=="function"&&t.init(A),A}function e(g,f){let b=t(this.namespace+(typeof f>"u"?":":f)+g);return b.log=this.log,b}function n(g){t.save(g),t.namespaces=g,t.names=[],t.skips=[];let f=(typeof g=="string"?g:"").trim().replace(" ",",").split(",").filter(Boolean);for(let b of f)b[0]==="-"?t.skips.push(b.slice(1)):t.names.push(b)}function r(g,f){let b=0,y=0,_=-1,A=0;for(;b<g.length;)if(y<f.length&&(f[y]===g[b]||f[y]==="*"))f[y]==="*"?(_=y,A=b,y++):(b++,y++);else if(_!==-1)y=_+1,A++,b=A;else return!1;for(;y<f.length&&f[y]==="*";)y++;return y===f.length}function s(){let g=[...t.names,...t.skips.map(f=>"-"+f)].join(",");return t.enable(""),g}function u(g){for(let f of t.skips)if(r(g,f))return!1;for(let f of t.names)if(r(g,f))return!0;return!1}function d(g){return g instanceof Error?g.stack||g.message:g}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}h.exports=o}),at=fe((i,h)=>{oe(),ae(),se(),i.formatArgs=a,i.save=l,i.load=t,i.useColors=o,i.storage=e(),i.destroy=(()=>{let r=!1;return()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),i.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function o(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let r;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(r=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(r[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+h.exports.humanize(this.diff),!this.useColors)return;let s="color: "+this.color;r.splice(1,0,s,"color: inherit");let u=0,d=0;r[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(u++,p==="%c"&&(d=u))}),r.splice(d,0,s)}i.log=console.debug||console.log||(()=>{});function l(r){try{r?i.storage.setItem("debug",r):i.storage.removeItem("debug")}catch{}}function t(){let r;try{r=i.storage.getItem("debug")}catch{}return!r&&typeof ke<"u"&&"env"in ke&&(r=ke.env.DEBUG),r}function e(){try{return localStorage}catch{}}h.exports=Tl()(i);var{formatters:n}=h.exports;n.j=function(r){try{return JSON.stringify(r)}catch(s){return"[UnexpectedJSONParseError]: "+s.message}}}),Il=fe((i,h)=>{oe(),ae(),se();var o=Sl(),{EventEmitter:a}=(_t(),Be(gt)),l=Cl(),t=Ao(),e=at()("mqtt-packet:parser"),n=class ui extends a{constructor(){super(),this.parser=this.constructor.parser}static parser(s){return this instanceof ui?(this.settings=s||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new ui().parser(s)}_resetState(){e("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new l,this.error=null,this._list=o(),this._stateCounter=0}parse(s){for(this.error&&this._resetState(),this._list.append(s),e("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,e("parse: state complete. _stateCounter is now: %d",this._stateCounter),e("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return e("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){let s=this._list.readUInt8(0),u=s>>t.CMD_SHIFT;this.packet.cmd=t.types[u];let d=s&15,p=t.requiredHeaderFlags[u];return p!=null&&d!==p?this._emitError(new Error(t.requiredHeaderFlagsErrors[u])):(this.packet.retain=(s&t.RETAIN_MASK)!==0,this.packet.qos=s>>t.QOS_SHIFT&t.QOS_MASK,this.packet.qos>2?this._emitError(new Error("Packet must not have both QoS bits set to 1")):(this.packet.dup=(s&t.DUP_MASK)!==0,e("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0))}_parseLength(){let s=this._parseVarByteNum(!0);return s&&(this.packet.length=s.value,this._list.consume(s.bytes)),e("_parseLength %d",s.value),!!s}_parsePayload(){e("_parsePayload: payload %O",this._list);let s=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}s=!0}return e("_parsePayload complete result: %s",s),s}_parseConnect(){e("_parseConnect");let s,u,d,p,g={},f=this.packet,b=this._parseString();if(b===null)return this._emitError(new Error("Cannot parse protocolId"));if(b!=="MQTT"&&b!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(f.protocolId=b,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(f.protocolVersion=this._list.readUInt8(this._pos),f.protocolVersion>=128&&(f.bridgeMode=!0,f.protocolVersion=f.protocolVersion-128),f.protocolVersion!==3&&f.protocolVersion!==4&&f.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(this._list.readUInt8(this._pos)&1)return this._emitError(new Error("Connect flag bit 0 must be 0, but got 1"));g.username=this._list.readUInt8(this._pos)&t.USERNAME_MASK,g.password=this._list.readUInt8(this._pos)&t.PASSWORD_MASK,g.will=this._list.readUInt8(this._pos)&t.WILL_FLAG_MASK;let y=!!(this._list.readUInt8(this._pos)&t.WILL_RETAIN_MASK),_=(this._list.readUInt8(this._pos)&t.WILL_QOS_MASK)>>t.WILL_QOS_SHIFT;if(g.will)f.will={},f.will.retain=y,f.will.qos=_;else{if(y)return this._emitError(new Error("Will Retain Flag must be set to zero when Will Flag is set to 0"));if(_)return this._emitError(new Error("Will QoS must be set to zero when Will Flag is set to 0"))}if(f.clean=(this._list.readUInt8(this._pos)&t.CLEAN_SESSION_MASK)!==0,this._pos++,f.keepalive=this._parseNum(),f.keepalive===-1)return this._emitError(new Error("Packet too short"));if(f.protocolVersion===5){let w=this._parseProperties();Object.getOwnPropertyNames(w).length&&(f.properties=w)}let A=this._parseString();if(A===null)return this._emitError(new Error("Packet too short"));if(f.clientId=A,e("_parseConnect: packet.clientId: %s",f.clientId),g.will){if(f.protocolVersion===5){let w=this._parseProperties();Object.getOwnPropertyNames(w).length&&(f.will.properties=w)}if(s=this._parseString(),s===null)return this._emitError(new Error("Cannot parse will topic"));if(f.will.topic=s,e("_parseConnect: packet.will.topic: %s",f.will.topic),u=this._parseBuffer(),u===null)return this._emitError(new Error("Cannot parse will payload"));f.will.payload=u,e("_parseConnect: packet.will.paylaod: %s",f.will.payload)}if(g.username){if(p=this._parseString(),p===null)return this._emitError(new Error("Cannot parse username"));f.username=p,e("_parseConnect: packet.username: %s",f.username)}if(g.password){if(d=this._parseBuffer(),d===null)return this._emitError(new Error("Cannot parse password"));f.password=d}return this.settings=f,e("_parseConnect: complete"),f}_parseConnack(){e("_parseConnack");let s=this.packet;if(this._list.length<1)return null;let u=this._list.readUInt8(this._pos++);if(u>1)return this._emitError(new Error("Invalid connack flags, bits 7-1 must be set to 0"));if(s.sessionPresent=!!(u&t.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?s.reasonCode=this._list.readUInt8(this._pos++):s.reasonCode=0;else{if(this._list.length<2)return null;s.returnCode=this._list.readUInt8(this._pos++)}if(s.returnCode===-1||s.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){let d=this._parseProperties();Object.getOwnPropertyNames(d).length&&(s.properties=d)}e("_parseConnack: complete")}_parsePublish(){e("_parsePublish");let s=this.packet;if(s.topic=this._parseString(),s.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(s.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}s.payload=this._list.slice(this._pos,s.length),e("_parsePublish: payload from buffer list: %o",s.payload)}}_parseSubscribe(){e("_parseSubscribe");let s=this.packet,u,d,p,g,f,b,y;if(s.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let _=this._parseProperties();Object.getOwnPropertyNames(_).length&&(s.properties=_)}if(s.length<=0)return this._emitError(new Error("Malformed subscribe, no payload specified"));for(;this._pos<s.length;){if(u=this._parseString(),u===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=s.length)return this._emitError(new Error("Malformed Subscribe Payload"));if(d=this._parseByte(),this.settings.protocolVersion===5){if(d&192)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-6 must be 0"))}else if(d&252)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-2 must be 0"));if(p=d&t.SUBSCRIBE_OPTIONS_QOS_MASK,p>2)return this._emitError(new Error("Invalid subscribe QoS, must be <= 2"));if(b=(d>>t.SUBSCRIBE_OPTIONS_NL_SHIFT&t.SUBSCRIBE_OPTIONS_NL_MASK)!==0,f=(d>>t.SUBSCRIBE_OPTIONS_RAP_SHIFT&t.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,g=d>>t.SUBSCRIBE_OPTIONS_RH_SHIFT&t.SUBSCRIBE_OPTIONS_RH_MASK,g>2)return this._emitError(new Error("Invalid retain handling, must be <= 2"));y={topic:u,qos:p},this.settings.protocolVersion===5?(y.nl=b,y.rap=f,y.rh=g):this.settings.bridgeMode&&(y.rh=0,y.rap=!0,y.nl=!0),e("_parseSubscribe: push subscription `%s` to subscription",y),s.subscriptions.push(y)}}}_parseSuback(){e("_parseSuback");let s=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}if(s.length<=0)return this._emitError(new Error("Malformed suback, no payload specified"));for(;this._pos<this.packet.length;){let u=this._list.readUInt8(this._pos++);if(this.settings.protocolVersion===5){if(!t.MQTT5_SUBACK_CODES[u])return this._emitError(new Error("Invalid suback code"))}else if(u>2&&u!==128)return this._emitError(new Error("Invalid suback QoS, must be 0, 1, 2 or 128"));this.packet.granted.push(u)}}}_parseUnsubscribe(){e("_parseUnsubscribe");let s=this.packet;if(s.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}if(s.length<=0)return this._emitError(new Error("Malformed unsubscribe, no payload specified"));for(;this._pos<s.length;){let u=this._parseString();if(u===null)return this._emitError(new Error("Cannot parse topic"));e("_parseUnsubscribe: push topic `%s` to unsubscriptions",u),s.unsubscriptions.push(u)}}}_parseUnsuback(){e("_parseUnsuback");let s=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if((this.settings.protocolVersion===3||this.settings.protocolVersion===4)&&s.length!==2)return this._emitError(new Error("Malformed unsuback, payload length must be 2"));if(s.length<=0)return this._emitError(new Error("Malformed unsuback, no payload specified"));if(this.settings.protocolVersion===5){let u=this._parseProperties();for(Object.getOwnPropertyNames(u).length&&(s.properties=u),s.granted=[];this._pos<this.packet.length;){let d=this._list.readUInt8(this._pos++);if(!t.MQTT5_UNSUBACK_CODES[d])return this._emitError(new Error("Invalid unsuback code"));this.packet.granted.push(d)}}}_parseConfirmation(){e("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);let s=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5){if(s.length>2){switch(s.reasonCode=this._parseByte(),this.packet.cmd){case"puback":case"pubrec":if(!t.MQTT5_PUBACK_PUBREC_CODES[s.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break;case"pubrel":case"pubcomp":if(!t.MQTT5_PUBREL_PUBCOMP_CODES[s.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break}e("_parseConfirmation: packet.reasonCode `%d`",s.reasonCode)}else s.reasonCode=0;if(s.length>3){let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}}return!0}_parseDisconnect(){let s=this.packet;if(e("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?(s.reasonCode=this._parseByte(),t.MQTT5_DISCONNECT_CODES[s.reasonCode]||this._emitError(new Error("Invalid disconnect reason code"))):s.reasonCode=0;let u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(s.properties=u)}return e("_parseDisconnect result: true"),!0}_parseAuth(){e("_parseAuth");let s=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));if(s.reasonCode=this._parseByte(),!t.MQTT5_AUTH_CODES[s.reasonCode])return this._emitError(new Error("Invalid auth reason code"));let u=this._parseProperties();return Object.getOwnPropertyNames(u).length&&(s.properties=u),e("_parseAuth: result: true"),!0}_parseMessageId(){let s=this.packet;return s.messageId=this._parseNum(),s.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(e("_parseMessageId: packet.messageId %d",s.messageId),!0)}_parseString(s){let u=this._parseNum(),d=u+this._pos;if(u===-1||d>this._list.length||d>this.packet.length)return null;let p=this._list.toString("utf8",this._pos,d);return this._pos+=u,e("_parseString: result: %s",p),p}_parseStringPair(){return e("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let s=this._parseNum(),u=s+this._pos;if(s===-1||u>this._list.length||u>this.packet.length)return null;let d=this._list.slice(this._pos,u);return this._pos+=s,e("_parseBuffer: result: %o",d),d}_parseNum(){if(this._list.length-this._pos<2)return-1;let s=this._list.readUInt16BE(this._pos);return this._pos+=2,e("_parseNum: result: %s",s),s}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;let s=this._list.readUInt32BE(this._pos);return this._pos+=4,e("_parse4ByteNum: result: %s",s),s}_parseVarByteNum(s){e("_parseVarByteNum");let u=4,d=0,p=1,g=0,f=!1,b,y=this._pos?this._pos:0;for(;d<u&&y+d<this._list.length;){if(b=this._list.readUInt8(y+d++),g+=p*(b&t.VARBYTEINT_MASK),p*=128,(b&t.VARBYTEINT_FIN_MASK)===0){f=!0;break}if(this._list.length<=d)break}return!f&&d===u&&this._list.length>=d&&this._emitError(new Error("Invalid variable byte integer")),y&&(this._pos+=d),f?s?f={bytes:d,value:g}:f=g:f=!1,e("_parseVarByteNum: result: %o",f),f}_parseByte(){let s;return this._pos<this._list.length&&(s=this._list.readUInt8(this._pos),this._pos++),e("_parseByte: result: %o",s),s}_parseByType(s){switch(e("_parseByType: type: %s",s),s){case"byte":return this._parseByte()!==0;case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){e("_parseProperties");let s=this._parseVarByteNum(),u=this._pos+s,d={};for(;this._pos<u;){let p=this._parseByte();if(!p)return this._emitError(new Error("Cannot parse property code type")),!1;let g=t.propertiesCodes[p];if(!g)return this._emitError(new Error("Unknown property")),!1;if(g==="userProperties"){d[g]||(d[g]=Object.create(null));let f=this._parseByType(t.propertiesTypes[g]);if(d[g][f.name])if(Array.isArray(d[g][f.name]))d[g][f.name].push(f.value);else{let b=d[g][f.name];d[g][f.name]=[b],d[g][f.name].push(f.value)}else d[g][f.name]=f.value;continue}d[g]?Array.isArray(d[g])?d[g].push(this._parseByType(t.propertiesTypes[g])):(d[g]=[d[g]],d[g].push(this._parseByType(t.propertiesTypes[g]))):d[g]=this._parseByType(t.propertiesTypes[g])}return d}_newPacket(){return e("_newPacket"),this.packet&&(this._list.consume(this.packet.length),e("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),e("_newPacket: new packet"),this.packet=new l,this._pos=0,!0}_emitError(s){e("_emitError",s),this.error=s,this.emit("error",s)}};h.exports=n}),Bl=fe((i,h)=>{oe(),ae(),se();var{Buffer:o}=(Ve(),Be(We)),a=65536,l={},t=o.isBuffer(o.from([1,2]).subarray(0,1));function e(u){let d=o.allocUnsafe(2);return d.writeUInt8(u>>8,0),d.writeUInt8(u&255,1),d}function n(){for(let u=0;u<a;u++)l[u]=e(u)}function r(u){let d=0,p=0,g=o.allocUnsafe(4);do d=u%128|0,u=u/128|0,u>0&&(d=d|128),g.writeUInt8(d,p++);while(u>0&&p<4);return u>0&&(p=0),t?g.subarray(0,p):g.slice(0,p)}function s(u){let d=o.allocUnsafe(4);return d.writeUInt32BE(u,0),d}h.exports={cache:l,generateCache:n,generateNumber:e,genBufVariableByteInt:r,generate4ByteBuffer:s}}),Ol=fe((i,h)=>{oe(),ae(),se(),typeof ke>"u"||!ke.version||ke.version.indexOf("v0.")===0||ke.version.indexOf("v1.")===0&&ke.version.indexOf("v1.8.")!==0?h.exports={nextTick:o}:h.exports=ke;function o(a,l,t,e){if(typeof a!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,r,s;switch(n){case 0:case 1:return ke.nextTick(a);case 2:return ke.nextTick(function(){a.call(null,l)});case 3:return ke.nextTick(function(){a.call(null,l,t)});case 4:return ke.nextTick(function(){a.call(null,l,t,e)});default:for(r=new Array(n-1),s=0;s<r.length;)r[s++]=arguments[s];return ke.nextTick(function(){a.apply(null,r)})}}}),bo=fe((i,h)=>{oe(),ae(),se();var o=Ao(),{Buffer:a}=(Ve(),Be(We)),l=a.allocUnsafe(0),t=a.from([0]),e=Bl(),n=Ol().nextTick,r=at()("mqtt-packet:writeToStream"),s=e.cache,u=e.generateNumber,d=e.generateCache,p=e.genBufVariableByteInt,g=e.generate4ByteBuffer,f=le,b=!0;function y(K,M,Z){switch(r("generate called"),M.cork&&(M.cork(),n(_,M)),b&&(b=!1,d()),r("generate: packet.cmd: %s",K.cmd),K.cmd){case"connect":return A(K,M);case"connack":return w(K,M,Z);case"publish":return I(K,M,Z);case"puback":case"pubrec":case"pubrel":case"pubcomp":return k(K,M,Z);case"subscribe":return E(K,M,Z);case"suback":return T(K,M,Z);case"unsubscribe":return O(K,M,Z);case"unsuback":return H(K,M,Z);case"pingreq":case"pingresp":return G(K,M);case"disconnect":return de(K,M,Z);case"auth":return U(K,M,Z);default:return M.destroy(new Error("Unknown command")),!1}}Object.defineProperty(y,"cacheNumbers",{get(){return f===le},set(K){K?((!s||Object.keys(s).length===0)&&(b=!0),f=le):(b=!1,f=pe)}});function _(K){K.uncork()}function A(K,M,Z){let V=K||{},j=V.protocolId||"MQTT",W=V.protocolVersion||4,ue=V.will,re=V.clean,x=V.keepalive||0,D=V.clientId||"",q=V.username,te=V.password,ee=V.properties;re===void 0&&(re=!0);let ie=0;if(typeof j!="string"&&!a.isBuffer(j))return M.destroy(new Error("Invalid protocolId")),!1;if(ie+=j.length+2,W!==3&&W!==4&&W!==5)return M.destroy(new Error("Invalid protocol version")),!1;if(ie+=1,(typeof D=="string"||a.isBuffer(D))&&(D||W>=4)&&(D||re))ie+=a.byteLength(D)+2;else{if(W<4)return M.destroy(new Error("clientId must be supplied before 3.1.1")),!1;if(re*1===0)return M.destroy(new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof x!="number"||x<0||x>65535||x%1!==0)return M.destroy(new Error("Invalid keepalive")),!1;ie+=2,ie+=1;let L,ne;if(W===5){if(L=he(M,ee),!L)return!1;ie+=L.length}if(ue){if(typeof ue!="object")return M.destroy(new Error("Invalid will")),!1;if(!ue.topic||typeof ue.topic!="string")return M.destroy(new Error("Invalid will topic")),!1;if(ie+=a.byteLength(ue.topic)+2,ie+=2,ue.payload)if(ue.payload.length>=0)typeof ue.payload=="string"?ie+=a.byteLength(ue.payload):ie+=ue.payload.length;else return M.destroy(new Error("Invalid will payload")),!1;if(ne={},W===5){if(ne=he(M,ue.properties),!ne)return!1;ie+=ne.length}}let ge=!1;if(q!=null)if(_e(q))ge=!0,ie+=a.byteLength(q)+2;else return M.destroy(new Error("Invalid username")),!1;if(te!=null){if(!ge)return M.destroy(new Error("Username is required to use password")),!1;if(_e(te))ie+=J(te)+2;else return M.destroy(new Error("Invalid password")),!1}M.write(o.CONNECT_HEADER),z(M,ie),Q(M,j),V.bridgeMode&&(W+=128),M.write(W===131?o.VERSION131:W===132?o.VERSION132:W===4?o.VERSION4:W===5?o.VERSION5:o.VERSION3);let Y=0;return Y|=q!=null?o.USERNAME_MASK:0,Y|=te!=null?o.PASSWORD_MASK:0,Y|=ue&&ue.retain?o.WILL_RETAIN_MASK:0,Y|=ue&&ue.qos?ue.qos<<o.WILL_QOS_SHIFT:0,Y|=ue?o.WILL_FLAG_MASK:0,Y|=re?o.CLEAN_SESSION_MASK:0,M.write(a.from([Y])),f(M,x),W===5&&L.write(),Q(M,D),ue&&(W===5&&ne.write(),F(M,ue.topic),Q(M,ue.payload)),q!=null&&Q(M,q),te!=null&&Q(M,te),!0}function w(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=V===5?j.reasonCode:j.returnCode,ue=j.properties,re=2;if(typeof W!="number")return M.destroy(new Error("Invalid return code")),!1;let x=null;if(V===5){if(x=he(M,ue),!x)return!1;re+=x.length}return M.write(o.CONNACK_HEADER),z(M,re),M.write(j.sessionPresent?o.SESSIONPRESENT_HEADER:t),M.write(a.from([W])),x?.write(),!0}function I(K,M,Z){r("publish: packet: %o",K);let V=Z?Z.protocolVersion:4,j=K||{},W=j.qos||0,ue=j.retain?o.RETAIN_MASK:0,re=j.topic,x=j.payload||l,D=j.messageId,q=j.properties,te=0;if(typeof re=="string")te+=a.byteLength(re)+2;else if(a.isBuffer(re))te+=re.length+2;else return M.destroy(new Error("Invalid topic")),!1;if(a.isBuffer(x)?te+=x.length:te+=a.byteLength(x),W&&typeof D!="number")return M.destroy(new Error("Invalid messageId")),!1;W&&(te+=2);let ee=null;if(V===5){if(ee=he(M,q),!ee)return!1;te+=ee.length}return M.write(o.PUBLISH_HEADER[W][j.dup?1:0][ue?1:0]),z(M,te),f(M,J(re)),M.write(re),W>0&&f(M,D),ee?.write(),r("publish: payload: %o",x),M.write(x)}function k(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.cmd||"puback",ue=j.messageId,re=j.dup&&W==="pubrel"?o.DUP_MASK:0,x=0,D=j.reasonCode,q=j.properties,te=V===5?3:2;if(W==="pubrel"&&(x=1),typeof ue!="number")return M.destroy(new Error("Invalid messageId")),!1;let ee=null;if(V===5&&typeof q=="object"){if(ee=P(M,q,Z,te),!ee)return!1;te+=ee.length}return M.write(o.ACKS[W][x][re][0]),te===3&&(te+=D!==0?1:-1),z(M,te),f(M,ue),V===5&&te!==2&&M.write(a.from([D])),ee!==null?ee.write():te===4&&M.write(a.from([0])),!0}function E(K,M,Z){r("subscribe: packet: ");let V=Z?Z.protocolVersion:4,j=K||{},W=j.dup?o.DUP_MASK:0,ue=j.messageId,re=j.subscriptions,x=j.properties,D=0;if(typeof ue!="number")return M.destroy(new Error("Invalid messageId")),!1;D+=2;let q=null;if(V===5){if(q=he(M,x),!q)return!1;D+=q.length}if(typeof re=="object"&&re.length)for(let ee=0;ee<re.length;ee+=1){let ie=re[ee].topic,L=re[ee].qos;if(typeof ie!="string")return M.destroy(new Error("Invalid subscriptions - invalid topic")),!1;if(typeof L!="number")return M.destroy(new Error("Invalid subscriptions - invalid qos")),!1;if(V===5){if(typeof(re[ee].nl||!1)!="boolean")return M.destroy(new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(re[ee].rap||!1)!="boolean")return M.destroy(new Error("Invalid subscriptions - invalid Retain as Published")),!1;let ne=re[ee].rh||0;if(typeof ne!="number"||ne>2)return M.destroy(new Error("Invalid subscriptions - invalid Retain Handling")),!1}D+=a.byteLength(ie)+2+1}else return M.destroy(new Error("Invalid subscriptions")),!1;r("subscribe: writing to stream: %o",o.SUBSCRIBE_HEADER),M.write(o.SUBSCRIBE_HEADER[1][W?1:0][0]),z(M,D),f(M,ue),q!==null&&q.write();let te=!0;for(let ee of re){let ie=ee.topic,L=ee.qos,ne=+ee.nl,ge=+ee.rap,Y=ee.rh,Se;F(M,ie),Se=o.SUBSCRIBE_OPTIONS_QOS[L],V===5&&(Se|=ne?o.SUBSCRIBE_OPTIONS_NL:0,Se|=ge?o.SUBSCRIBE_OPTIONS_RAP:0,Se|=Y?o.SUBSCRIBE_OPTIONS_RH[Y]:0),te=M.write(a.from([Se]))}return te}function T(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.messageId,ue=j.granted,re=j.properties,x=0;if(typeof W!="number")return M.destroy(new Error("Invalid messageId")),!1;if(x+=2,typeof ue=="object"&&ue.length)for(let q=0;q<ue.length;q+=1){if(typeof ue[q]!="number")return M.destroy(new Error("Invalid qos vector")),!1;x+=1}else return M.destroy(new Error("Invalid qos vector")),!1;let D=null;if(V===5){if(D=P(M,re,Z,x),!D)return!1;x+=D.length}return M.write(o.SUBACK_HEADER),z(M,x),f(M,W),D!==null&&D.write(),M.write(a.from(ue))}function O(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.messageId,ue=j.dup?o.DUP_MASK:0,re=j.unsubscriptions,x=j.properties,D=0;if(typeof W!="number")return M.destroy(new Error("Invalid messageId")),!1;if(D+=2,typeof re=="object"&&re.length)for(let ee=0;ee<re.length;ee+=1){if(typeof re[ee]!="string")return M.destroy(new Error("Invalid unsubscriptions")),!1;D+=a.byteLength(re[ee])+2}else return M.destroy(new Error("Invalid unsubscriptions")),!1;let q=null;if(V===5){if(q=he(M,x),!q)return!1;D+=q.length}M.write(o.UNSUBSCRIBE_HEADER[1][ue?1:0][0]),z(M,D),f(M,W),q!==null&&q.write();let te=!0;for(let ee=0;ee<re.length;ee++)te=F(M,re[ee]);return te}function H(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.messageId,ue=j.dup?o.DUP_MASK:0,re=j.granted,x=j.properties,D=j.cmd,q=0,te=2;if(typeof W!="number")return M.destroy(new Error("Invalid messageId")),!1;if(V===5)if(typeof re=="object"&&re.length)for(let ie=0;ie<re.length;ie+=1){if(typeof re[ie]!="number")return M.destroy(new Error("Invalid qos vector")),!1;te+=1}else return M.destroy(new Error("Invalid qos vector")),!1;let ee=null;if(V===5){if(ee=P(M,x,Z,te),!ee)return!1;te+=ee.length}return M.write(o.ACKS[D][q][ue][0]),z(M,te),f(M,W),ee!==null&&ee.write(),V===5&&M.write(a.from(re)),!0}function G(K,M,Z){return M.write(o.EMPTY[K.cmd])}function de(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.reasonCode,ue=j.properties,re=V===5?1:0,x=null;if(V===5){if(x=P(M,ue,Z,re),!x)return!1;re+=x.length}return M.write(a.from([o.codes.disconnect<<4])),z(M,re),V===5&&M.write(a.from([W])),x!==null&&x.write(),!0}function U(K,M,Z){let V=Z?Z.protocolVersion:4,j=K||{},W=j.reasonCode,ue=j.properties,re=V===5?1:0;V!==5&&M.destroy(new Error("Invalid mqtt version for auth packet"));let x=P(M,ue,Z,re);return x?(re+=x.length,M.write(a.from([o.codes.auth<<4])),z(M,re),M.write(a.from([W])),x!==null&&x.write(),!0):!1}var $={};function z(K,M){if(M>o.VARBYTEINT_MAX)return K.destroy(new Error(`Invalid variable byte integer: ${M}`)),!1;let Z=$[M];return Z||(Z=p(M),M<16384&&($[M]=Z)),r("writeVarByteInt: writing to stream: %o",Z),K.write(Z)}function F(K,M){let Z=a.byteLength(M);return f(K,Z),r("writeString: %s",M),K.write(M,"utf8")}function me(K,M,Z){F(K,M),F(K,Z)}function le(K,M){return r("writeNumberCached: number: %d",M),r("writeNumberCached: %o",s[M]),K.write(s[M])}function pe(K,M){let Z=u(M);return r("writeNumberGenerated: %o",Z),K.write(Z)}function we(K,M){let Z=g(M);return r("write4ByteNumber: %o",Z),K.write(Z)}function Q(K,M){typeof M=="string"?F(K,M):M?(f(K,M.length),K.write(M)):f(K,0)}function he(K,M){if(typeof M!="object"||M.length!=null)return{length:1,write(){ye(K,{},0)}};let Z=0;function V(j,W){let ue=o.propertiesTypes[j],re=0;switch(ue){case"byte":{if(typeof W!="boolean")return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=2;break}case"int8":{if(typeof W!="number"||W<0||W>255)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=2;break}case"binary":{if(W&&W===null)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=1+a.byteLength(W)+2;break}case"int16":{if(typeof W!="number"||W<0||W>65535)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=3;break}case"int32":{if(typeof W!="number"||W<0||W>4294967295)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=5;break}case"var":{if(typeof W!="number"||W<0||W>268435455)return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=1+a.byteLength(p(W));break}case"string":{if(typeof W!="string")return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=3+a.byteLength(W.toString());break}case"pair":{if(typeof W!="object")return K.destroy(new Error(`Invalid ${j}: ${W}`)),!1;re+=Object.getOwnPropertyNames(W).reduce((x,D)=>{let q=W[D];return Array.isArray(q)?x+=q.reduce((te,ee)=>(te+=3+a.byteLength(D.toString())+2+a.byteLength(ee.toString()),te),0):x+=3+a.byteLength(D.toString())+2+a.byteLength(W[D].toString()),x},0);break}default:return K.destroy(new Error(`Invalid property ${j}: ${W}`)),!1}return re}if(M)for(let j in M){let W=0,ue=0,re=M[j];if(re!==void 0){if(Array.isArray(re))for(let x=0;x<re.length;x++){if(ue=V(j,re[x]),!ue)return!1;W+=ue}else{if(ue=V(j,re),!ue)return!1;W=ue}if(!W)return!1;Z+=W}}return{length:a.byteLength(p(Z))+Z,write(){ye(K,M,Z)}}}function P(K,M,Z,V){let j=["reasonString","userProperties"],W=Z&&Z.properties&&Z.properties.maximumPacketSize?Z.properties.maximumPacketSize:0,ue=he(K,M);if(W)for(;V+ue.length>W;){let re=j.shift();if(re&&M[re])delete M[re],ue=he(K,M);else return!1}return ue}function ce(K,M,Z){switch(o.propertiesTypes[M]){case"byte":{K.write(a.from([o.properties[M]])),K.write(a.from([+Z]));break}case"int8":{K.write(a.from([o.properties[M]])),K.write(a.from([Z]));break}case"binary":{K.write(a.from([o.properties[M]])),Q(K,Z);break}case"int16":{K.write(a.from([o.properties[M]])),f(K,Z);break}case"int32":{K.write(a.from([o.properties[M]])),we(K,Z);break}case"var":{K.write(a.from([o.properties[M]])),z(K,Z);break}case"string":{K.write(a.from([o.properties[M]])),F(K,Z);break}case"pair":{Object.getOwnPropertyNames(Z).forEach(V=>{let j=Z[V];Array.isArray(j)?j.forEach(W=>{K.write(a.from([o.properties[M]])),me(K,V.toString(),W.toString())}):(K.write(a.from([o.properties[M]])),me(K,V.toString(),j.toString()))});break}default:return K.destroy(new Error(`Invalid property ${M} value: ${Z}`)),!1}}function ye(K,M,Z){z(K,Z);for(let V in M)if(Object.prototype.hasOwnProperty.call(M,V)&&M[V]!=null){let j=M[V];if(Array.isArray(j))for(let W=0;W<j.length;W++)ce(K,V,j[W]);else ce(K,V,j)}}function J(K){return K?K instanceof a?K.length:a.byteLength(K):0}function _e(K){return typeof K=="string"||K instanceof a}h.exports=y}),xl=fe((i,h)=>{oe(),ae(),se();var o=bo(),{EventEmitter:a}=(_t(),Be(gt)),{Buffer:l}=(Ve(),Be(We));function t(n,r){let s=new e;return o(n,s,r),s.concat()}var e=class extends a{constructor(){super(),this._array=new Array(20),this._i=0}write(n){return this._array[this._i++]=n,!0}concat(){let n=0,r=new Array(this._array.length),s=this._array,u=0,d;for(d=0;d<s.length&&s[d]!==void 0;d++)typeof s[d]!="string"?r[d]=s[d].length:r[d]=l.byteLength(s[d]),n+=r[d];let p=l.allocUnsafe(n);for(d=0;d<s.length&&s[d]!==void 0;d++)typeof s[d]!="string"?(s[d].copy(p,u),u+=r[d]):(p.write(s[d],u),u+=r[d]);return p}destroy(n){n&&this.emit("error",n)}};h.exports=t}),Pl=fe(i=>{oe(),ae(),se(),i.parser=Il().parser,i.generate=xl(),i.writeToStream=bo()}),yo=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=class{constructor(){this.nextId=Math.max(1,Math.floor(Math.random()*65535))}allocate(){let o=this.nextId++;return this.nextId===65536&&(this.nextId=1),o}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(o){return!0}deallocate(o){}clear(){}};i.default=h}),Rl=fe((i,h)=>{oe(),ae(),se(),h.exports=a;function o(t){return t instanceof Zt?Zt.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function a(t){if(t=t||{},t.circles)return l(t);let e=new Map;if(e.set(Date,d=>new Date(d)),e.set(Map,(d,p)=>new Map(r(Array.from(d),p))),e.set(Set,(d,p)=>new Set(r(Array.from(d),p))),t.constructorHandlers)for(let d of t.constructorHandlers)e.set(d[0],d[1]);let n=null;return t.proto?u:s;function r(d,p){let g=Object.keys(d),f=new Array(g.length);for(let b=0;b<g.length;b++){let y=g[b],_=d[y];typeof _!="object"||_===null?f[y]=_:_.constructor!==Object&&(n=e.get(_.constructor))?f[y]=n(_,p):ArrayBuffer.isView(_)?f[y]=o(_):f[y]=p(_)}return f}function s(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return r(d,s);if(d.constructor!==Object&&(n=e.get(d.constructor)))return n(d,s);let p={};for(let g in d){if(Object.hasOwnProperty.call(d,g)===!1)continue;let f=d[g];typeof f!="object"||f===null?p[g]=f:f.constructor!==Object&&(n=e.get(f.constructor))?p[g]=n(f,s):ArrayBuffer.isView(f)?p[g]=o(f):p[g]=s(f)}return p}function u(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return r(d,u);if(d.constructor!==Object&&(n=e.get(d.constructor)))return n(d,u);let p={};for(let g in d){let f=d[g];typeof f!="object"||f===null?p[g]=f:f.constructor!==Object&&(n=e.get(f.constructor))?p[g]=n(f,u):ArrayBuffer.isView(f)?p[g]=o(f):p[g]=u(f)}return p}}function l(t){let e=[],n=[],r=new Map;if(r.set(Date,g=>new Date(g)),r.set(Map,(g,f)=>new Map(u(Array.from(g),f))),r.set(Set,(g,f)=>new Set(u(Array.from(g),f))),t.constructorHandlers)for(let g of t.constructorHandlers)r.set(g[0],g[1]);let s=null;return t.proto?p:d;function u(g,f){let b=Object.keys(g),y=new Array(b.length);for(let _=0;_<b.length;_++){let A=b[_],w=g[A];if(typeof w!="object"||w===null)y[A]=w;else if(w.constructor!==Object&&(s=r.get(w.constructor)))y[A]=s(w,f);else if(ArrayBuffer.isView(w))y[A]=o(w);else{let I=e.indexOf(w);I!==-1?y[A]=n[I]:y[A]=f(w)}}return y}function d(g){if(typeof g!="object"||g===null)return g;if(Array.isArray(g))return u(g,d);if(g.constructor!==Object&&(s=r.get(g.constructor)))return s(g,d);let f={};e.push(g),n.push(f);for(let b in g){if(Object.hasOwnProperty.call(g,b)===!1)continue;let y=g[b];if(typeof y!="object"||y===null)f[b]=y;else if(y.constructor!==Object&&(s=r.get(y.constructor)))f[b]=s(y,d);else if(ArrayBuffer.isView(y))f[b]=o(y);else{let _=e.indexOf(y);_!==-1?f[b]=n[_]:f[b]=d(y)}}return e.pop(),n.pop(),f}function p(g){if(typeof g!="object"||g===null)return g;if(Array.isArray(g))return u(g,p);if(g.constructor!==Object&&(s=r.get(g.constructor)))return s(g,p);let f={};e.push(g),n.push(f);for(let b in g){let y=g[b];if(typeof y!="object"||y===null)f[b]=y;else if(y.constructor!==Object&&(s=r.get(y.constructor)))f[b]=s(y,p);else if(ArrayBuffer.isView(y))f[b]=o(y);else{let _=e.indexOf(y);_!==-1?f[b]=n[_]:f[b]=p(y)}}return e.pop(),n.pop(),f}}}),Ml=fe((i,h)=>{oe(),ae(),se(),h.exports=Rl()()}),Ul=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.validateTopic=h,i.validateTopics=o;function h(a){let l=a.split("/");for(let t=0;t<l.length;t++)if(l[t]!=="+"){if(l[t]==="#")return t===l.length-1;if(l[t].indexOf("+")!==-1||l[t].indexOf("#")!==-1)return!1}return!0}function o(a){if(a.length===0)return"empty_topic_list";for(let l=0;l<a.length;l++)if(!h(a[l]))return a[l];return null}}),wo=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=St(),o={objectMode:!0},a={clean:!0},l=class{constructor(t){this.options=t||{},this.options=Object.assign(Object.assign({},a),t),this._inflights=new Map}put(t,e){return this._inflights.set(t.messageId,t),e&&e(),this}createStream(){let t=new h.Readable(o),e=[],n=!1,r=0;return this._inflights.forEach((s,u)=>{e.push(s)}),t._read=()=>{!n&&r<e.length?t.push(e[r++]):t.push(null)},t.destroy=s=>{if(!n)return n=!0,setTimeout(()=>{t.emit("close")},0),t},t}del(t,e){let n=this._inflights.get(t.messageId);return n?(this._inflights.delete(t.messageId),e(null,n)):e&&e(new Error("missing packet")),this}get(t,e){let n=this._inflights.get(t.messageId);return n?e(null,n):e&&e(new Error("missing packet")),this}close(t){this.options.clean&&(this._inflights=null),t&&t()}};i.default=l}),Dl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=[0,16,128,131,135,144,145,151,153],o=(a,l,t)=>{a.log("handlePublish: packet %o",l),t=typeof t<"u"?t:a.noop;let e=l.topic.toString(),n=l.payload,{qos:r}=l,{messageId:s}=l,{options:u}=a;if(a.options.protocolVersion===5){let d;if(l.properties&&(d=l.properties.topicAlias),typeof d<"u")if(e.length===0)if(d>0&&d<=65535){let p=a.topicAliasRecv.getTopicByAlias(d);if(p)e=p,a.log("handlePublish :: topic complemented by alias. topic: %s - alias: %d",e,d);else{a.log("handlePublish :: unregistered topic alias. alias: %d",d),a.emit("error",new Error("Received unregistered Topic Alias"));return}}else{a.log("handlePublish :: topic alias out of range. alias: %d",d),a.emit("error",new Error("Received Topic Alias is out of range"));return}else if(a.topicAliasRecv.put(e,d))a.log("handlePublish :: registered topic: %s - alias: %d",e,d);else{a.log("handlePublish :: topic alias out of range. alias: %d",d),a.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(a.log("handlePublish: qos %d",r),r){case 2:{u.customHandleAcks(e,n,l,(d,p)=>{if(typeof d=="number"&&(p=d,d=null),d)return a.emit("error",d);if(h.indexOf(p)===-1)return a.emit("error",new Error("Wrong reason code for pubrec"));p?a._sendPacket({cmd:"pubrec",messageId:s,reasonCode:p},t):a.incomingStore.put(l,()=>{a._sendPacket({cmd:"pubrec",messageId:s},t)})});break}case 1:{u.customHandleAcks(e,n,l,(d,p)=>{if(typeof d=="number"&&(p=d,d=null),d)return a.emit("error",d);if(h.indexOf(p)===-1)return a.emit("error",new Error("Wrong reason code for puback"));p||a.emit("message",e,n,l),a.handleMessage(l,g=>{if(g)return t&&t(g);a._sendPacket({cmd:"puback",messageId:s,reasonCode:p},t)})});break}case 0:a.emit("message",e,n,l),a.handleMessage(l,t);break;default:a.log("handlePublish: unknown QoS. Doing nothing.");break}};i.default=o}),Ll=fe((i,h)=>{h.exports={version:"5.13.1"}}),Dt=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.MQTTJS_VERSION=i.nextTick=i.ErrorWithSubackPacket=i.ErrorWithReasonCode=void 0,i.applyMixin=a;var h=class Vs extends Error{constructor(t,e){super(t),this.code=e,Object.setPrototypeOf(this,Vs.prototype),Object.getPrototypeOf(this).name="ErrorWithReasonCode"}};i.ErrorWithReasonCode=h;var o=class Qs extends Error{constructor(t,e){super(t),this.packet=e,Object.setPrototypeOf(this,Qs.prototype),Object.getPrototypeOf(this).name="ErrorWithSubackPacket"}};i.ErrorWithSubackPacket=o;function a(l,t,e=!1){var n;let r=[t];for(;;){let s=r[0],u=Object.getPrototypeOf(s);if(u?.prototype)r.unshift(u);else break}for(let s of r)for(let u of Object.getOwnPropertyNames(s.prototype))(e||u!=="constructor")&&Object.defineProperty(l.prototype,u,(n=Object.getOwnPropertyDescriptor(s.prototype,u))!==null&&n!==void 0?n:Object.create(null))}i.nextTick=typeof ke?.nextTick=="function"?ke.nextTick:l=>{setTimeout(l,0)},i.MQTTJS_VERSION=Ll().version}),nr=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.ReasonCodes=void 0;var h=Dt();i.ReasonCodes={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};var o=(a,l)=>{let{messageId:t}=l,e=l.cmd,n=null,r=a.outgoing[t]?a.outgoing[t].cb:null,s=null;if(!r){a.log("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(a.log("_handleAck :: packet type",e),e){case"pubcomp":case"puback":{let u=l.reasonCode;u&&u>0&&u!==16?(s=new h.ErrorWithReasonCode(`Publish error: ${i.ReasonCodes[u]}`,u),a._removeOutgoingAndStoreMessage(t,()=>{r(s,l)})):a._removeOutgoingAndStoreMessage(t,r);break}case"pubrec":{n={cmd:"pubrel",qos:2,messageId:t};let u=l.reasonCode;u&&u>0&&u!==16?(s=new h.ErrorWithReasonCode(`Publish error: ${i.ReasonCodes[u]}`,u),a._removeOutgoingAndStoreMessage(t,()=>{r(s,l)})):a._sendPacket(n);break}case"suback":{delete a.outgoing[t],a.messageIdProvider.deallocate(t);let u=l.granted;for(let d=0;d<u.length;d++){let p=u[d];if((p&128)!==0){s=new Error(`Subscribe error: ${i.ReasonCodes[p]}`),s.code=p;let g=a.messageIdToTopic[t];g&&g.forEach(f=>{delete a._resubscribeTopics[f]})}}delete a.messageIdToTopic[t],a._invokeStoreProcessingQueue(),r(s,l);break}case"unsuback":{delete a.outgoing[t],a.messageIdProvider.deallocate(t),a._invokeStoreProcessingQueue(),r(null,l);break}default:a.emit("error",new Error("unrecognized packet type"))}a.disconnecting&&Object.keys(a.outgoing).length===0&&a.emit("outgoingEmpty")};i.default=o}),Nl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=Dt(),o=nr(),a=(l,t)=>{let{options:e}=l,n=e.protocolVersion,r=n===5?t.reasonCode:t.returnCode;if(n!==5){let s=new h.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${n}`,r);l.emit("error",s);return}l.handleAuth(t,(s,u)=>{if(s){l.emit("error",s);return}if(r===24)l.reconnecting=!1,l._sendPacket(u);else{let d=new h.ErrorWithReasonCode(`Connection refused: ${o.ReasonCodes[r]}`,r);l.emit("error",d)}})};i.default=a}),Fl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.LRUCache=void 0;var h=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,o=new Set,a=typeof ke=="object"&&ke?ke:{},l=(g,f,b,y)=>{typeof a.emitWarning=="function"?a.emitWarning(g,f,b,y):console.error(`[${b}] ${f}: ${g}`)},t=globalThis.AbortController,e=globalThis.AbortSignal;if(typeof t>"u"){e=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(b,y){this._onabort.push(y)}},t=class{constructor(){f()}signal=new e;abort(b){if(!this.signal.aborted){this.signal.reason=b,this.signal.aborted=!0;for(let y of this.signal._onabort)y(b);this.signal.onabort?.(b)}}};let g=a.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",f=()=>{g&&(g=!1,l("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",f))}}var n=g=>!o.has(g),r=g=>g&&g===Math.floor(g)&&g>0&&isFinite(g),s=g=>r(g)?g<=Math.pow(2,8)?Uint8Array:g<=Math.pow(2,16)?Uint16Array:g<=Math.pow(2,32)?Uint32Array:g<=Number.MAX_SAFE_INTEGER?u:null:null,u=class extends Array{constructor(g){super(g),this.fill(0)}},d=class $t{heap;length;static#l=!1;static create(f){let b=s(f);if(!b)return[];$t.#l=!0;let y=new $t(f,b);return $t.#l=!1,y}constructor(f,b){if(!$t.#l)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new b(f),this.length=0}push(f){this.heap[this.length++]=f}pop(){return this.heap[--this.length]}},p=class Ks{#l;#h;#g;#m;#O;#x;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#A;#n;#r;#e;#u;#f;#a;#o;#b;#s;#y;#w;#d;#v;#k;#c;static unsafeExposeInternals(f){return{starts:f.#w,ttls:f.#d,sizes:f.#y,keyMap:f.#n,keyList:f.#r,valList:f.#e,next:f.#u,prev:f.#f,get head(){return f.#a},get tail(){return f.#o},free:f.#b,isBackgroundFetch:b=>f.#t(b),backgroundFetch:(b,y,_,A)=>f.#M(b,y,_,A),moveToTail:b=>f.#B(b),indexes:b=>f.#_(b),rindexes:b=>f.#E(b),isStale:b=>f.#p(b)}}get max(){return this.#l}get maxSize(){return this.#h}get calculatedSize(){return this.#A}get size(){return this.#i}get fetchMethod(){return this.#O}get memoMethod(){return this.#x}get dispose(){return this.#g}get disposeAfter(){return this.#m}constructor(f){let{max:b=0,ttl:y,ttlResolution:_=1,ttlAutopurge:A,updateAgeOnGet:w,updateAgeOnHas:I,allowStale:k,dispose:E,disposeAfter:T,noDisposeOnSet:O,noUpdateTTL:H,maxSize:G=0,maxEntrySize:de=0,sizeCalculation:U,fetchMethod:$,memoMethod:z,noDeleteOnFetchRejection:F,noDeleteOnStaleGet:me,allowStaleOnFetchRejection:le,allowStaleOnFetchAbort:pe,ignoreFetchAbort:we}=f;if(b!==0&&!r(b))throw new TypeError("max option must be a nonnegative integer");let Q=b?s(b):Array;if(!Q)throw new Error("invalid max value: "+b);if(this.#l=b,this.#h=G,this.maxEntrySize=de||this.#h,this.sizeCalculation=U,this.sizeCalculation){if(!this.#h&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(z!==void 0&&typeof z!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#x=z,$!==void 0&&typeof $!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#O=$,this.#k=!!$,this.#n=new Map,this.#r=new Array(b).fill(void 0),this.#e=new Array(b).fill(void 0),this.#u=new Q(b),this.#f=new Q(b),this.#a=0,this.#o=0,this.#b=d.create(b),this.#i=0,this.#A=0,typeof E=="function"&&(this.#g=E),typeof T=="function"?(this.#m=T,this.#s=[]):(this.#m=void 0,this.#s=void 0),this.#v=!!this.#g,this.#c=!!this.#m,this.noDisposeOnSet=!!O,this.noUpdateTTL=!!H,this.noDeleteOnFetchRejection=!!F,this.allowStaleOnFetchRejection=!!le,this.allowStaleOnFetchAbort=!!pe,this.ignoreFetchAbort=!!we,this.maxEntrySize!==0){if(this.#h!==0&&!r(this.#h))throw new TypeError("maxSize must be a positive integer if specified");if(!r(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#W()}if(this.allowStale=!!k,this.noDeleteOnStaleGet=!!me,this.updateAgeOnGet=!!w,this.updateAgeOnHas=!!I,this.ttlResolution=r(_)||_===0?_:1,this.ttlAutopurge=!!A,this.ttl=y||0,this.ttl){if(!r(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#U()}if(this.#l===0&&this.ttl===0&&this.#h===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#l&&!this.#h){let he="LRU_CACHE_UNBOUNDED";n(he)&&(o.add(he),l("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",he,Ks))}}getRemainingTTL(f){return this.#n.has(f)?1/0:0}#U(){let f=new u(this.#l),b=new u(this.#l);this.#d=f,this.#w=b,this.#D=(A,w,I=h.now())=>{if(b[A]=w!==0?I:0,f[A]=w,w!==0&&this.ttlAutopurge){let k=setTimeout(()=>{this.#p(A)&&this.#S(this.#r[A],"expire")},w+1);k.unref&&k.unref()}},this.#T=A=>{b[A]=f[A]!==0?h.now():0},this.#C=(A,w)=>{if(f[w]){let I=f[w],k=b[w];if(!I||!k)return;A.ttl=I,A.start=k,A.now=y||_();let E=A.now-k;A.remainingTTL=I-E}};let y=0,_=()=>{let A=h.now();if(this.ttlResolution>0){y=A;let w=setTimeout(()=>y=0,this.ttlResolution);w.unref&&w.unref()}return A};this.getRemainingTTL=A=>{let w=this.#n.get(A);if(w===void 0)return 0;let I=f[w],k=b[w];if(!I||!k)return 1/0;let E=(y||_())-k;return I-E},this.#p=A=>{let w=b[A],I=f[A];return!!I&&!!w&&(y||_())-w>I}}#T=()=>{};#C=()=>{};#D=()=>{};#p=()=>!1;#W(){let f=new u(this.#l);this.#A=0,this.#y=f,this.#I=b=>{this.#A-=f[b],f[b]=0},this.#L=(b,y,_,A)=>{if(this.#t(y))return 0;if(!r(_))if(A){if(typeof A!="function")throw new TypeError("sizeCalculation must be a function");if(_=A(y,b),!r(_))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return _},this.#P=(b,y,_)=>{if(f[b]=y,this.#h){let A=this.#h-f[b];for(;this.#A>A;)this.#R(!0)}this.#A+=f[b],_&&(_.entrySize=y,_.totalCalculatedSize=this.#A)}}#I=f=>{};#P=(f,b,y)=>{};#L=(f,b,y,_)=>{if(y||_)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#_({allowStale:f=this.allowStale}={}){if(this.#i)for(let b=this.#o;!(!this.#N(b)||((f||!this.#p(b))&&(yield b),b===this.#a));)b=this.#f[b]}*#E({allowStale:f=this.allowStale}={}){if(this.#i)for(let b=this.#a;!(!this.#N(b)||((f||!this.#p(b))&&(yield b),b===this.#o));)b=this.#u[b]}#N(f){return f!==void 0&&this.#n.get(this.#r[f])===f}*entries(){for(let f of this.#_())this.#e[f]!==void 0&&this.#r[f]!==void 0&&!this.#t(this.#e[f])&&(yield[this.#r[f],this.#e[f]])}*rentries(){for(let f of this.#E())this.#e[f]!==void 0&&this.#r[f]!==void 0&&!this.#t(this.#e[f])&&(yield[this.#r[f],this.#e[f]])}*keys(){for(let f of this.#_()){let b=this.#r[f];b!==void 0&&!this.#t(this.#e[f])&&(yield b)}}*rkeys(){for(let f of this.#E()){let b=this.#r[f];b!==void 0&&!this.#t(this.#e[f])&&(yield b)}}*values(){for(let f of this.#_())this.#e[f]!==void 0&&!this.#t(this.#e[f])&&(yield this.#e[f])}*rvalues(){for(let f of this.#E())this.#e[f]!==void 0&&!this.#t(this.#e[f])&&(yield this.#e[f])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(f,b={}){for(let y of this.#_()){let _=this.#e[y],A=this.#t(_)?_.__staleWhileFetching:_;if(A!==void 0&&f(A,this.#r[y],this))return this.get(this.#r[y],b)}}forEach(f,b=this){for(let y of this.#_()){let _=this.#e[y],A=this.#t(_)?_.__staleWhileFetching:_;A!==void 0&&f.call(b,A,this.#r[y],this)}}rforEach(f,b=this){for(let y of this.#E()){let _=this.#e[y],A=this.#t(_)?_.__staleWhileFetching:_;A!==void 0&&f.call(b,A,this.#r[y],this)}}purgeStale(){let f=!1;for(let b of this.#E({allowStale:!0}))this.#p(b)&&(this.#S(this.#r[b],"expire"),f=!0);return f}info(f){let b=this.#n.get(f);if(b===void 0)return;let y=this.#e[b],_=this.#t(y)?y.__staleWhileFetching:y;if(_===void 0)return;let A={value:_};if(this.#d&&this.#w){let w=this.#d[b],I=this.#w[b];if(w&&I){let k=w-(h.now()-I);A.ttl=k,A.start=Date.now()}}return this.#y&&(A.size=this.#y[b]),A}dump(){let f=[];for(let b of this.#_({allowStale:!0})){let y=this.#r[b],_=this.#e[b],A=this.#t(_)?_.__staleWhileFetching:_;if(A===void 0||y===void 0)continue;let w={value:A};if(this.#d&&this.#w){w.ttl=this.#d[b];let I=h.now()-this.#w[b];w.start=Math.floor(Date.now()-I)}this.#y&&(w.size=this.#y[b]),f.unshift([y,w])}return f}load(f){this.clear();for(let[b,y]of f){if(y.start){let _=Date.now()-y.start;y.start=h.now()-_}this.set(b,y.value,y)}}set(f,b,y={}){if(b===void 0)return this.delete(f),this;let{ttl:_=this.ttl,start:A,noDisposeOnSet:w=this.noDisposeOnSet,sizeCalculation:I=this.sizeCalculation,status:k}=y,{noUpdateTTL:E=this.noUpdateTTL}=y,T=this.#L(f,b,y.size||0,I);if(this.maxEntrySize&&T>this.maxEntrySize)return k&&(k.set="miss",k.maxEntrySizeExceeded=!0),this.#S(f,"set"),this;let O=this.#i===0?void 0:this.#n.get(f);if(O===void 0)O=this.#i===0?this.#o:this.#b.length!==0?this.#b.pop():this.#i===this.#l?this.#R(!1):this.#i,this.#r[O]=f,this.#e[O]=b,this.#n.set(f,O),this.#u[this.#o]=O,this.#f[O]=this.#o,this.#o=O,this.#i++,this.#P(O,T,k),k&&(k.set="add"),E=!1;else{this.#B(O);let H=this.#e[O];if(b!==H){if(this.#k&&this.#t(H)){H.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:G}=H;G!==void 0&&!w&&(this.#v&&this.#g?.(G,f,"set"),this.#c&&this.#s?.push([G,f,"set"]))}else w||(this.#v&&this.#g?.(H,f,"set"),this.#c&&this.#s?.push([H,f,"set"]));if(this.#I(O),this.#P(O,T,k),this.#e[O]=b,k){k.set="replace";let G=H&&this.#t(H)?H.__staleWhileFetching:H;G!==void 0&&(k.oldValue=G)}}else k&&(k.set="update")}if(_!==0&&!this.#d&&this.#U(),this.#d&&(E||this.#D(O,_,A),k&&this.#C(k,O)),!w&&this.#c&&this.#s){let H=this.#s,G;for(;G=H?.shift();)this.#m?.(...G)}return this}pop(){try{for(;this.#i;){let f=this.#e[this.#a];if(this.#R(!0),this.#t(f)){if(f.__staleWhileFetching)return f.__staleWhileFetching}else if(f!==void 0)return f}}finally{if(this.#c&&this.#s){let f=this.#s,b;for(;b=f?.shift();)this.#m?.(...b)}}}#R(f){let b=this.#a,y=this.#r[b],_=this.#e[b];return this.#k&&this.#t(_)?_.__abortController.abort(new Error("evicted")):(this.#v||this.#c)&&(this.#v&&this.#g?.(_,y,"evict"),this.#c&&this.#s?.push([_,y,"evict"])),this.#I(b),f&&(this.#r[b]=void 0,this.#e[b]=void 0,this.#b.push(b)),this.#i===1?(this.#a=this.#o=0,this.#b.length=0):this.#a=this.#u[b],this.#n.delete(y),this.#i--,b}has(f,b={}){let{updateAgeOnHas:y=this.updateAgeOnHas,status:_}=b,A=this.#n.get(f);if(A!==void 0){let w=this.#e[A];if(this.#t(w)&&w.__staleWhileFetching===void 0)return!1;if(this.#p(A))_&&(_.has="stale",this.#C(_,A));else return y&&this.#T(A),_&&(_.has="hit",this.#C(_,A)),!0}else _&&(_.has="miss");return!1}peek(f,b={}){let{allowStale:y=this.allowStale}=b,_=this.#n.get(f);if(_===void 0||!y&&this.#p(_))return;let A=this.#e[_];return this.#t(A)?A.__staleWhileFetching:A}#M(f,b,y,_){let A=b===void 0?void 0:this.#e[b];if(this.#t(A))return A;let w=new t,{signal:I}=y;I?.addEventListener("abort",()=>w.abort(I.reason),{signal:w.signal});let k={signal:w.signal,options:y,context:_},E=(U,$=!1)=>{let{aborted:z}=w.signal,F=y.ignoreFetchAbort&&U!==void 0;if(y.status&&(z&&!$?(y.status.fetchAborted=!0,y.status.fetchError=w.signal.reason,F&&(y.status.fetchAbortIgnored=!0)):y.status.fetchResolved=!0),z&&!F&&!$)return O(w.signal.reason);let me=G;return this.#e[b]===G&&(U===void 0?me.__staleWhileFetching?this.#e[b]=me.__staleWhileFetching:this.#S(f,"fetch"):(y.status&&(y.status.fetchUpdated=!0),this.set(f,U,k.options))),U},T=U=>(y.status&&(y.status.fetchRejected=!0,y.status.fetchError=U),O(U)),O=U=>{let{aborted:$}=w.signal,z=$&&y.allowStaleOnFetchAbort,F=z||y.allowStaleOnFetchRejection,me=F||y.noDeleteOnFetchRejection,le=G;if(this.#e[b]===G&&(!me||le.__staleWhileFetching===void 0?this.#S(f,"fetch"):z||(this.#e[b]=le.__staleWhileFetching)),F)return y.status&&le.__staleWhileFetching!==void 0&&(y.status.returnedStale=!0),le.__staleWhileFetching;if(le.__returned===le)throw U},H=(U,$)=>{let z=this.#O?.(f,A,k);z&&z instanceof Promise&&z.then(F=>U(F===void 0?void 0:F),$),w.signal.addEventListener("abort",()=>{(!y.ignoreFetchAbort||y.allowStaleOnFetchAbort)&&(U(void 0),y.allowStaleOnFetchAbort&&(U=F=>E(F,!0)))})};y.status&&(y.status.fetchDispatched=!0);let G=new Promise(H).then(E,T),de=Object.assign(G,{__abortController:w,__staleWhileFetching:A,__returned:void 0});return b===void 0?(this.set(f,de,{...k.options,status:void 0}),b=this.#n.get(f)):this.#e[b]=de,de}#t(f){if(!this.#k)return!1;let b=f;return!!b&&b instanceof Promise&&b.hasOwnProperty("__staleWhileFetching")&&b.__abortController instanceof t}async fetch(f,b={}){let{allowStale:y=this.allowStale,updateAgeOnGet:_=this.updateAgeOnGet,noDeleteOnStaleGet:A=this.noDeleteOnStaleGet,ttl:w=this.ttl,noDisposeOnSet:I=this.noDisposeOnSet,size:k=0,sizeCalculation:E=this.sizeCalculation,noUpdateTTL:T=this.noUpdateTTL,noDeleteOnFetchRejection:O=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:H=this.allowStaleOnFetchRejection,ignoreFetchAbort:G=this.ignoreFetchAbort,allowStaleOnFetchAbort:de=this.allowStaleOnFetchAbort,context:U,forceRefresh:$=!1,status:z,signal:F}=b;if(!this.#k)return z&&(z.fetch="get"),this.get(f,{allowStale:y,updateAgeOnGet:_,noDeleteOnStaleGet:A,status:z});let me={allowStale:y,updateAgeOnGet:_,noDeleteOnStaleGet:A,ttl:w,noDisposeOnSet:I,size:k,sizeCalculation:E,noUpdateTTL:T,noDeleteOnFetchRejection:O,allowStaleOnFetchRejection:H,allowStaleOnFetchAbort:de,ignoreFetchAbort:G,status:z,signal:F},le=this.#n.get(f);if(le===void 0){z&&(z.fetch="miss");let pe=this.#M(f,le,me,U);return pe.__returned=pe}else{let pe=this.#e[le];if(this.#t(pe)){let P=y&&pe.__staleWhileFetching!==void 0;return z&&(z.fetch="inflight",P&&(z.returnedStale=!0)),P?pe.__staleWhileFetching:pe.__returned=pe}let we=this.#p(le);if(!$&&!we)return z&&(z.fetch="hit"),this.#B(le),_&&this.#T(le),z&&this.#C(z,le),pe;let Q=this.#M(f,le,me,U),he=Q.__staleWhileFetching!==void 0&&y;return z&&(z.fetch=we?"stale":"refresh",he&&we&&(z.returnedStale=!0)),he?Q.__staleWhileFetching:Q.__returned=Q}}async forceFetch(f,b={}){let y=await this.fetch(f,b);if(y===void 0)throw new Error("fetch() returned undefined");return y}memo(f,b={}){let y=this.#x;if(!y)throw new Error("no memoMethod provided to constructor");let{context:_,forceRefresh:A,...w}=b,I=this.get(f,w);if(!A&&I!==void 0)return I;let k=y(f,I,{options:w,context:_});return this.set(f,k,w),k}get(f,b={}){let{allowStale:y=this.allowStale,updateAgeOnGet:_=this.updateAgeOnGet,noDeleteOnStaleGet:A=this.noDeleteOnStaleGet,status:w}=b,I=this.#n.get(f);if(I!==void 0){let k=this.#e[I],E=this.#t(k);return w&&this.#C(w,I),this.#p(I)?(w&&(w.get="stale"),E?(w&&y&&k.__staleWhileFetching!==void 0&&(w.returnedStale=!0),y?k.__staleWhileFetching:void 0):(A||this.#S(f,"expire"),w&&y&&(w.returnedStale=!0),y?k:void 0)):(w&&(w.get="hit"),E?k.__staleWhileFetching:(this.#B(I),_&&this.#T(I),k))}else w&&(w.get="miss")}#F(f,b){this.#f[b]=f,this.#u[f]=b}#B(f){f!==this.#o&&(f===this.#a?this.#a=this.#u[f]:this.#F(this.#f[f],this.#u[f]),this.#F(this.#o,f),this.#o=f)}delete(f){return this.#S(f,"delete")}#S(f,b){let y=!1;if(this.#i!==0){let _=this.#n.get(f);if(_!==void 0)if(y=!0,this.#i===1)this.#j(b);else{this.#I(_);let A=this.#e[_];if(this.#t(A)?A.__abortController.abort(new Error("deleted")):(this.#v||this.#c)&&(this.#v&&this.#g?.(A,f,b),this.#c&&this.#s?.push([A,f,b])),this.#n.delete(f),this.#r[_]=void 0,this.#e[_]=void 0,_===this.#o)this.#o=this.#f[_];else if(_===this.#a)this.#a=this.#u[_];else{let w=this.#f[_];this.#u[w]=this.#u[_];let I=this.#u[_];this.#f[I]=this.#f[_]}this.#i--,this.#b.push(_)}}if(this.#c&&this.#s?.length){let _=this.#s,A;for(;A=_?.shift();)this.#m?.(...A)}return y}clear(){return this.#j("delete")}#j(f){for(let b of this.#E({allowStale:!0})){let y=this.#e[b];if(this.#t(y))y.__abortController.abort(new Error("deleted"));else{let _=this.#r[b];this.#v&&this.#g?.(y,_,f),this.#c&&this.#s?.push([y,_,f])}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#d&&this.#w&&(this.#d.fill(0),this.#w.fill(0)),this.#y&&this.#y.fill(0),this.#a=0,this.#o=0,this.#b.length=0,this.#A=0,this.#i=0,this.#c&&this.#s){let b=this.#s,y;for(;y=b?.shift();)this.#m?.(...y)}}};i.LRUCache=p}),lt=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.ContainerIterator=i.Container=i.Base=void 0;var h=class{constructor(l=0){this.iteratorType=l}equals(l){return this.o===l.o}};i.ContainerIterator=h;var o=class{constructor(){this.i=0}get length(){return this.i}size(){return this.i}empty(){return this.i===0}};i.Base=o;var a=class extends o{};i.Container=a}),jl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=class extends h.Base{constructor(l=[]){super(),this.S=[];let t=this;l.forEach(function(e){t.push(e)})}clear(){this.i=0,this.S=[]}push(l){return this.S.push(l),this.i+=1,this.i}pop(){if(this.i!==0)return this.i-=1,this.S.pop()}top(){return this.S[this.i-1]}},a=o;i.default=a}),Wl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=class extends h.Base{constructor(l=[]){super(),this.j=0,this.q=[];let t=this;l.forEach(function(e){t.push(e)})}clear(){this.q=[],this.i=this.j=0}push(l){let t=this.q.length;if(this.j/t>.5&&this.j+this.i>=t&&t>4096){let e=this.i;for(let n=0;n<e;++n)this.q[n]=this.q[this.j+n];this.j=0,this.q[this.i]=l}else this.q[this.j+this.i]=l;return++this.i}pop(){if(this.i===0)return;let l=this.q[this.j++];return this.i-=1,l}front(){if(this.i!==0)return this.q[this.j]}},a=o;i.default=a}),Vl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=class extends h.Base{constructor(l=[],t=function(n,r){return n>r?-1:n<r?1:0},e=!0){if(super(),this.v=t,Array.isArray(l))this.C=e?[...l]:l;else{this.C=[];let r=this;l.forEach(function(s){r.C.push(s)})}this.i=this.C.length;let n=this.i>>1;for(let r=this.i-1>>1;r>=0;--r)this.k(r,n)}m(l){let t=this.C[l];for(;l>0;){let e=l-1>>1,n=this.C[e];if(this.v(n,t)<=0)break;this.C[l]=n,l=e}this.C[l]=t}k(l,t){let e=this.C[l];for(;l<t;){let n=l<<1|1,r=n+1,s=this.C[n];if(r<this.i&&this.v(s,this.C[r])>0&&(n=r,s=this.C[r]),this.v(s,e)>=0)break;this.C[l]=s,l=n}this.C[l]=e}clear(){this.i=0,this.C.length=0}push(l){this.C.push(l),this.m(this.i),this.i+=1}pop(){if(this.i===0)return;let l=this.C[0],t=this.C.pop();return this.i-=1,this.i&&(this.C[0]=t,this.k(0,this.i>>1)),l}top(){return this.C[0]}find(l){return this.C.indexOf(l)>=0}remove(l){let t=this.C.indexOf(l);return t<0?!1:(t===0?this.pop():t===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(t,1,this.C.pop()),this.i-=1,this.m(t),this.k(t,this.i>>1)),!0)}updateItem(l){let t=this.C.indexOf(l);return t<0?!1:(this.m(t),this.k(t,this.i>>1),!0)}toArray(){return[...this.C]}},a=o;i.default=a}),jn=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=class extends h.Container{},a=o;i.default=a}),ut=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.throwIteratorAccessError=h;function h(){throw new RangeError("Iterator access denied!")}}),vo=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.RandomIterator=void 0;var h=lt(),o=ut(),a=class extends h.ContainerIterator{constructor(l,t){super(t),this.o=l,this.iteratorType===0?(this.pre=function(){return this.o===0&&(0,o.throwIteratorAccessError)(),this.o-=1,this},this.next=function(){return this.o===this.container.size()&&(0,o.throwIteratorAccessError)(),this.o+=1,this}):(this.pre=function(){return this.o===this.container.size()-1&&(0,o.throwIteratorAccessError)(),this.o+=1,this},this.next=function(){return this.o===-1&&(0,o.throwIteratorAccessError)(),this.o-=1,this})}get pointer(){return this.container.getElementByPos(this.o)}set pointer(l){this.container.setElementByPos(this.o,l)}};i.RandomIterator=a}),Ql=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=a(jn()),o=vo();function a(n){return n&&n.t?n:{default:n}}var l=class Hs extends o.RandomIterator{constructor(r,s,u){super(r,u),this.container=s}copy(){return new Hs(this.o,this.container,this.iteratorType)}},t=class extends h.default{constructor(n=[],r=!0){if(super(),Array.isArray(n))this.J=r?[...n]:n,this.i=n.length;else{this.J=[];let s=this;n.forEach(function(u){s.pushBack(u)})}}clear(){this.i=0,this.J.length=0}begin(){return new l(0,this)}end(){return new l(this.i,this)}rBegin(){return new l(this.i-1,this,1)}rEnd(){return new l(-1,this,1)}front(){return this.J[0]}back(){return this.J[this.i-1]}getElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;return this.J[n]}eraseElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;return this.J.splice(n,1),this.i-=1,this.i}eraseElementByValue(n){let r=0;for(let s=0;s<this.i;++s)this.J[s]!==n&&(this.J[r++]=this.J[s]);return this.i=this.J.length=r,this.i}eraseElementByIterator(n){let r=n.o;return n=n.next(),this.eraseElementByPos(r),n}pushBack(n){return this.J.push(n),this.i+=1,this.i}popBack(){if(this.i!==0)return this.i-=1,this.J.pop()}setElementByPos(n,r){if(n<0||n>this.i-1)throw new RangeError;this.J[n]=r}insert(n,r,s=1){if(n<0||n>this.i)throw new RangeError;return this.J.splice(n,0,...new Array(s).fill(r)),this.i+=s,this.i}find(n){for(let r=0;r<this.i;++r)if(this.J[r]===n)return new l(r,this);return this.end()}reverse(){this.J.reverse()}unique(){let n=1;for(let r=1;r<this.i;++r)this.J[r]!==this.J[r-1]&&(this.J[n++]=this.J[r]);return this.i=this.J.length=n,this.i}sort(n){this.J.sort(n)}forEach(n){for(let r=0;r<this.i;++r)n(this.J[r],r,this)}[Symbol.iterator](){return(function*(){yield*this.J}).bind(this)()}},e=t;i.default=e}),Kl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=l(jn()),o=lt(),a=ut();function l(r){return r&&r.t?r:{default:r}}var t=class qs extends o.ContainerIterator{constructor(s,u,d,p){super(p),this.o=s,this.h=u,this.container=d,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.L,this})}get pointer(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o.l}set pointer(s){this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o.l=s}copy(){return new qs(this.o,this.h,this.container,this.iteratorType)}},e=class extends h.default{constructor(r=[]){super(),this.h={},this.p=this._=this.h.L=this.h.B=this.h;let s=this;r.forEach(function(u){s.pushBack(u)})}V(r){let{L:s,B:u}=r;s.B=u,u.L=s,r===this.p&&(this.p=u),r===this._&&(this._=s),this.i-=1}G(r,s){let u=s.B,d={l:r,L:s,B:u};s.B=d,u.L=d,s===this.h&&(this.p=d),u===this.h&&(this._=d),this.i+=1}clear(){this.i=0,this.p=this._=this.h.L=this.h.B=this.h}begin(){return new t(this.p,this.h,this)}end(){return new t(this.h,this.h,this)}rBegin(){return new t(this._,this.h,this,1)}rEnd(){return new t(this.h,this.h,this,1)}front(){return this.p.l}back(){return this._.l}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let s=this.p;for(;r--;)s=s.B;return s.l}eraseElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let s=this.p;for(;r--;)s=s.B;return this.V(s),this.i}eraseElementByValue(r){let s=this.p;for(;s!==this.h;)s.l===r&&this.V(s),s=s.B;return this.i}eraseElementByIterator(r){let s=r.o;return s===this.h&&(0,a.throwIteratorAccessError)(),r=r.next(),this.V(s),r}pushBack(r){return this.G(r,this._),this.i}popBack(){if(this.i===0)return;let r=this._.l;return this.V(this._),r}pushFront(r){return this.G(r,this.h),this.i}popFront(){if(this.i===0)return;let r=this.p.l;return this.V(this.p),r}setElementByPos(r,s){if(r<0||r>this.i-1)throw new RangeError;let u=this.p;for(;r--;)u=u.B;u.l=s}insert(r,s,u=1){if(r<0||r>this.i)throw new RangeError;if(u<=0)return this.i;if(r===0)for(;u--;)this.pushFront(s);else if(r===this.i)for(;u--;)this.pushBack(s);else{let d=this.p;for(let g=1;g<r;++g)d=d.B;let p=d.B;for(this.i+=u;u--;)d.B={l:s,L:d},d.B.L=d,d=d.B;d.B=p,p.L=d}return this.i}find(r){let s=this.p;for(;s!==this.h;){if(s.l===r)return new t(s,this.h,this);s=s.B}return this.end()}reverse(){if(this.i<=1)return;let r=this.p,s=this._,u=0;for(;u<<1<this.i;){let d=r.l;r.l=s.l,s.l=d,r=r.B,s=s.L,u+=1}}unique(){if(this.i<=1)return this.i;let r=this.p;for(;r!==this.h;){let s=r;for(;s.B!==this.h&&s.l===s.B.l;)s=s.B,this.i-=1;r.B=s.B,r.B.L=r,r=r.B}return this.i}sort(r){if(this.i<=1)return;let s=[];this.forEach(function(d){s.push(d)}),s.sort(r);let u=this.p;s.forEach(function(d){u.l=d,u=u.B})}merge(r){let s=this;if(this.i===0)r.forEach(function(u){s.pushBack(u)});else{let u=this.p;r.forEach(function(d){for(;u!==s.h&&u.l<=d;)u=u.B;s.G(d,u.L)})}return this.i}forEach(r){let s=this.p,u=0;for(;s!==this.h;)r(s.l,u++,this),s=s.B}[Symbol.iterator](){return(function*(){if(this.i===0)return;let r=this.p;for(;r!==this.h;)yield r.l,r=r.B}).bind(this)()}},n=e;i.default=n}),Hl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=a(jn()),o=vo();function a(n){return n&&n.t?n:{default:n}}var l=class $s extends o.RandomIterator{constructor(r,s,u){super(r,u),this.container=s}copy(){return new $s(this.o,this.container,this.iteratorType)}},t=class extends h.default{constructor(n=[],r=4096){super(),this.j=0,this.D=0,this.R=0,this.N=0,this.P=0,this.A=[];let s=(()=>{if(typeof n.length=="number")return n.length;if(typeof n.size=="number")return n.size;if(typeof n.size=="function")return n.size();throw new TypeError("Cannot get the length or size of the container")})();this.F=r,this.P=Math.max(Math.ceil(s/this.F),1);for(let p=0;p<this.P;++p)this.A.push(new Array(this.F));let u=Math.ceil(s/this.F);this.j=this.R=(this.P>>1)-(u>>1),this.D=this.N=this.F-s%this.F>>1;let d=this;n.forEach(function(p){d.pushBack(p)})}T(){let n=[],r=Math.max(this.P>>1,1);for(let s=0;s<r;++s)n[s]=new Array(this.F);for(let s=this.j;s<this.P;++s)n[n.length]=this.A[s];for(let s=0;s<this.R;++s)n[n.length]=this.A[s];n[n.length]=[...this.A[this.R]],this.j=r,this.R=n.length-1;for(let s=0;s<r;++s)n[n.length]=new Array(this.F);this.A=n,this.P=n.length}O(n){let r=this.D+n+1,s=r%this.F,u=s-1,d=this.j+(r-s)/this.F;return s===0&&(d-=1),d%=this.P,u<0&&(u+=this.F),{curNodeBucketIndex:d,curNodePointerIndex:u}}clear(){this.A=[new Array(this.F)],this.P=1,this.j=this.R=this.i=0,this.D=this.N=this.F>>1}begin(){return new l(0,this)}end(){return new l(this.i,this)}rBegin(){return new l(this.i-1,this,1)}rEnd(){return new l(-1,this,1)}front(){if(this.i!==0)return this.A[this.j][this.D]}back(){if(this.i!==0)return this.A[this.R][this.N]}pushBack(n){return this.i&&(this.N<this.F-1?this.N+=1:this.R<this.P-1?(this.R+=1,this.N=0):(this.R=0,this.N=0),this.R===this.j&&this.N===this.D&&this.T()),this.i+=1,this.A[this.R][this.N]=n,this.i}popBack(){if(this.i===0)return;let n=this.A[this.R][this.N];return this.i!==1&&(this.N>0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,n}pushFront(n){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=n,this.i}popFront(){if(this.i===0)return;let n=this.A[this.j][this.D];return this.i!==1&&(this.D<this.F-1?this.D+=1:this.j<this.P-1?(this.j+=1,this.D=0):(this.j=0,this.D=0)),this.i-=1,n}getElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;let{curNodeBucketIndex:r,curNodePointerIndex:s}=this.O(n);return this.A[r][s]}setElementByPos(n,r){if(n<0||n>this.i-1)throw new RangeError;let{curNodeBucketIndex:s,curNodePointerIndex:u}=this.O(n);this.A[s][u]=r}insert(n,r,s=1){if(n<0||n>this.i)throw new RangeError;if(n===0)for(;s--;)this.pushFront(r);else if(n===this.i)for(;s--;)this.pushBack(r);else{let u=[];for(let d=n;d<this.i;++d)u.push(this.getElementByPos(d));this.cut(n-1);for(let d=0;d<s;++d)this.pushBack(r);for(let d=0;d<u.length;++d)this.pushBack(u[d])}return this.i}cut(n){if(n<0)return this.clear(),0;let{curNodeBucketIndex:r,curNodePointerIndex:s}=this.O(n);return this.R=r,this.N=s,this.i=n+1,this.i}eraseElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;if(n===0)this.popFront();else if(n===this.i-1)this.popBack();else{let r=[];for(let u=n+1;u<this.i;++u)r.push(this.getElementByPos(u));this.cut(n),this.popBack();let s=this;r.forEach(function(u){s.pushBack(u)})}return this.i}eraseElementByValue(n){if(this.i===0)return 0;let r=[];for(let u=0;u<this.i;++u){let d=this.getElementByPos(u);d!==n&&r.push(d)}let s=r.length;for(let u=0;u<s;++u)this.setElementByPos(u,r[u]);return this.cut(s-1)}eraseElementByIterator(n){let r=n.o;return this.eraseElementByPos(r),n=n.next(),n}find(n){for(let r=0;r<this.i;++r)if(this.getElementByPos(r)===n)return new l(r,this);return this.end()}reverse(){let n=0,r=this.i-1;for(;n<r;){let s=this.getElementByPos(n);this.setElementByPos(n,this.getElementByPos(r)),this.setElementByPos(r,s),n+=1,r-=1}}unique(){if(this.i<=1)return this.i;let n=1,r=this.getElementByPos(0);for(let s=1;s<this.i;++s){let u=this.getElementByPos(s);u!==r&&(r=u,this.setElementByPos(n++,u))}for(;this.i>n;)this.popBack();return this.i}sort(n){let r=[];for(let s=0;s<this.i;++s)r.push(this.getElementByPos(s));r.sort(n);for(let s=0;s<this.i;++s)this.setElementByPos(s,r[s])}shrinkToFit(){if(this.i===0)return;let n=[];this.forEach(function(r){n.push(r)}),this.P=Math.max(Math.ceil(this.i/this.F),1),this.i=this.j=this.R=this.D=this.N=0,this.A=[];for(let r=0;r<this.P;++r)this.A.push(new Array(this.F));for(let r=0;r<n.length;++r)this.pushBack(n[r])}forEach(n){for(let r=0;r<this.i;++r)n(this.getElementByPos(r),r,this)}[Symbol.iterator](){return(function*(){for(let n=0;n<this.i;++n)yield this.getElementByPos(n)}).bind(this)()}},e=t;i.default=e}),ql=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.TreeNodeEnableIndex=i.TreeNode=void 0;var h=class{constructor(a,l){this.ee=1,this.u=void 0,this.l=void 0,this.U=void 0,this.W=void 0,this.tt=void 0,this.u=a,this.l=l}L(){let a=this;if(a.ee===1&&a.tt.tt===a)a=a.W;else if(a.U)for(a=a.U;a.W;)a=a.W;else{let l=a.tt;for(;l.U===a;)a=l,l=a.tt;a=l}return a}B(){let a=this;if(a.W){for(a=a.W;a.U;)a=a.U;return a}else{let l=a.tt;for(;l.W===a;)a=l,l=a.tt;return a.W!==l?l:a}}te(){let a=this.tt,l=this.W,t=l.U;return a.tt===this?a.tt=l:a.U===this?a.U=l:a.W=l,l.tt=a,l.U=this,this.tt=l,this.W=t,t&&(t.tt=this),l}se(){let a=this.tt,l=this.U,t=l.W;return a.tt===this?a.tt=l:a.U===this?a.U=l:a.W=l,l.tt=a,l.W=this,this.tt=l,this.U=t,t&&(t.tt=this),l}};i.TreeNode=h;var o=class extends h{constructor(){super(...arguments),this.rt=1}te(){let a=super.te();return this.ie(),a.ie(),a}se(){let a=super.se();return this.ie(),a.ie(),a}ie(){this.rt=1,this.U&&(this.rt+=this.U.rt),this.W&&(this.rt+=this.W.rt)}};i.TreeNodeEnableIndex=o}),_o=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=ql(),o=lt(),a=ut(),l=class extends o.Container{constructor(e=function(r,s){return r<s?-1:r>s?1:0},n=!1){super(),this.Y=void 0,this.v=e,n?(this.re=h.TreeNodeEnableIndex,this.M=function(r,s,u){let d=this.ne(r,s,u);if(d){let p=d.tt;for(;p!==this.h;)p.rt+=1,p=p.tt;let g=this.he(d);if(g){let{parentNode:f,grandParent:b,curNode:y}=g;f.ie(),b.ie(),y.ie()}}return this.i},this.V=function(r){let s=this.fe(r);for(;s!==this.h;)s.rt-=1,s=s.tt}):(this.re=h.TreeNode,this.M=function(r,s,u){let d=this.ne(r,s,u);return d&&this.he(d),this.i},this.V=this.fe),this.h=new this.re}X(e,n){let r=this.h;for(;e;){let s=this.v(e.u,n);if(s<0)e=e.W;else if(s>0)r=e,e=e.U;else return e}return r}Z(e,n){let r=this.h;for(;e;)this.v(e.u,n)<=0?e=e.W:(r=e,e=e.U);return r}$(e,n){let r=this.h;for(;e;){let s=this.v(e.u,n);if(s<0)r=e,e=e.W;else if(s>0)e=e.U;else return e}return r}rr(e,n){let r=this.h;for(;e;)this.v(e.u,n)<0?(r=e,e=e.W):e=e.U;return r}ue(e){for(;;){let n=e.tt;if(n===this.h)return;if(e.ee===1){e.ee=0;return}if(e===n.U){let r=n.W;if(r.ee===1)r.ee=0,n.ee=1,n===this.Y?this.Y=n.te():n.te();else if(r.W&&r.W.ee===1){r.ee=n.ee,n.ee=0,r.W.ee=0,n===this.Y?this.Y=n.te():n.te();return}else r.U&&r.U.ee===1?(r.ee=1,r.U.ee=0,r.se()):(r.ee=1,e=n)}else{let r=n.U;if(r.ee===1)r.ee=0,n.ee=1,n===this.Y?this.Y=n.se():n.se();else if(r.U&&r.U.ee===1){r.ee=n.ee,n.ee=0,r.U.ee=0,n===this.Y?this.Y=n.se():n.se();return}else r.W&&r.W.ee===1?(r.ee=1,r.W.ee=0,r.te()):(r.ee=1,e=n)}}}fe(e){if(this.i===1)return this.clear(),this.h;let n=e;for(;n.U||n.W;){if(n.W)for(n=n.W;n.U;)n=n.U;else n=n.U;[e.u,n.u]=[n.u,e.u],[e.l,n.l]=[n.l,e.l],e=n}this.h.U===n?this.h.U=n.tt:this.h.W===n&&(this.h.W=n.tt),this.ue(n);let r=n.tt;return n===r.U?r.U=void 0:r.W=void 0,this.i-=1,this.Y.ee=0,r}oe(e,n){return e===void 0?!1:this.oe(e.U,n)||n(e)?!0:this.oe(e.W,n)}he(e){for(;;){let n=e.tt;if(n.ee===0)return;let r=n.tt;if(n===r.U){let s=r.W;if(s&&s.ee===1){if(s.ee=n.ee=0,r===this.Y)return;r.ee=1,e=r;continue}else if(e===n.W){if(e.ee=0,e.U&&(e.U.tt=n),e.W&&(e.W.tt=r),n.W=e.U,r.U=e.W,e.U=n,e.W=r,r===this.Y)this.Y=e,this.h.tt=e;else{let u=r.tt;u.U===r?u.U=e:u.W=e}return e.tt=r.tt,n.tt=e,r.tt=e,r.ee=1,{parentNode:n,grandParent:r,curNode:e}}else n.ee=0,r===this.Y?this.Y=r.se():r.se(),r.ee=1}else{let s=r.U;if(s&&s.ee===1){if(s.ee=n.ee=0,r===this.Y)return;r.ee=1,e=r;continue}else if(e===n.U){if(e.ee=0,e.U&&(e.U.tt=r),e.W&&(e.W.tt=n),r.W=e.U,n.U=e.W,e.U=r,e.W=n,r===this.Y)this.Y=e,this.h.tt=e;else{let u=r.tt;u.U===r?u.U=e:u.W=e}return e.tt=r.tt,n.tt=e,r.tt=e,r.ee=1,{parentNode:n,grandParent:r,curNode:e}}else n.ee=0,r===this.Y?this.Y=r.te():r.te(),r.ee=1}return}}ne(e,n,r){if(this.Y===void 0){this.i+=1,this.Y=new this.re(e,n),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,this.h.W=this.Y;return}let s,u=this.h.U,d=this.v(u.u,e);if(d===0){u.l=n;return}else if(d>0)u.U=new this.re(e,n),u.U.tt=u,s=u.U,this.h.U=s;else{let p=this.h.W,g=this.v(p.u,e);if(g===0){p.l=n;return}else if(g<0)p.W=new this.re(e,n),p.W.tt=p,s=p.W,this.h.W=s;else{if(r!==void 0){let f=r.o;if(f!==this.h){let b=this.v(f.u,e);if(b===0){f.l=n;return}else if(b>0){let y=f.L(),_=this.v(y.u,e);if(_===0){y.l=n;return}else _<0&&(s=new this.re(e,n),y.W===void 0?(y.W=s,s.tt=y):(f.U=s,s.tt=f))}}}if(s===void 0)for(s=this.Y;;){let f=this.v(s.u,e);if(f>0){if(s.U===void 0){s.U=new this.re(e,n),s.U.tt=s,s=s.U;break}s=s.U}else if(f<0){if(s.W===void 0){s.W=new this.re(e,n),s.W.tt=s,s=s.W;break}s=s.W}else{s.l=n;return}}}}return this.i+=1,s}I(e,n){for(;e;){let r=this.v(e.u,n);if(r<0)e=e.W;else if(r>0)e=e.U;else return e}return e||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0}updateKeyByIterator(e,n){let r=e.o;if(r===this.h&&(0,a.throwIteratorAccessError)(),this.i===1)return r.u=n,!0;if(r===this.h.U)return this.v(r.B().u,n)>0?(r.u=n,!0):!1;if(r===this.h.W)return this.v(r.L().u,n)<0?(r.u=n,!0):!1;let s=r.L().u;if(this.v(s,n)>=0)return!1;let u=r.B().u;return this.v(u,n)<=0?!1:(r.u=n,!0)}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let n=0,r=this;return this.oe(this.Y,function(s){return e===n?(r.V(s),!0):(n+=1,!1)}),this.i}eraseElementByKey(e){if(this.i===0)return!1;let n=this.I(this.Y,e);return n===this.h?!1:(this.V(n),!0)}eraseElementByIterator(e){let n=e.o;n===this.h&&(0,a.throwIteratorAccessError)();let r=n.W===void 0;return e.iteratorType===0?r&&e.next():(!r||n.U===void 0)&&e.next(),this.V(n),e}forEach(e){let n=0;for(let r of this)e(r,n++,this)}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let n,r=0;for(let s of this){if(r===e){n=s;break}r+=1}return n}getHeight(){if(this.i===0)return 0;let e=function(n){return n?Math.max(e(n.U),e(n.W))+1:0};return e(this.Y)}},t=l;i.default=t}),Eo=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=lt(),o=ut(),a=class extends h.ContainerIterator{constructor(t,e,n){super(n),this.o=t,this.h=e,this.iteratorType===0?(this.pre=function(){return this.o===this.h.U&&(0,o.throwIteratorAccessError)(),this.o=this.o.L(),this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B(),this}):(this.pre=function(){return this.o===this.h.W&&(0,o.throwIteratorAccessError)(),this.o=this.o.B(),this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L(),this})}get index(){let t=this.o,e=this.h.tt;if(t===this.h)return e?e.rt-1:0;let n=0;for(t.U&&(n+=t.U.rt);t!==e;){let r=t.tt;t===r.W&&(n+=1,r.U&&(n+=r.U.rt)),t=r}return n}},l=a;i.default=l}),$l=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=l(_o()),o=l(Eo()),a=ut();function l(r){return r&&r.t?r:{default:r}}var t=class zs extends o.default{constructor(s,u,d,p){super(s,u,p),this.container=d}get pointer(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o.u}copy(){return new zs(this.o,this.h,this.container,this.iteratorType)}},e=class extends h.default{constructor(r=[],s,u){super(s,u);let d=this;r.forEach(function(p){d.insert(p)})}*K(r){r!==void 0&&(yield*this.K(r.U),yield r.u,yield*this.K(r.W))}begin(){return new t(this.h.U||this.h,this.h,this)}end(){return new t(this.h,this.h,this)}rBegin(){return new t(this.h.W||this.h,this.h,this,1)}rEnd(){return new t(this.h,this.h,this,1)}front(){return this.h.U?this.h.U.u:void 0}back(){return this.h.W?this.h.W.u:void 0}insert(r,s){return this.M(r,void 0,s)}find(r){let s=this.I(this.Y,r);return new t(s,this.h,this)}lowerBound(r){let s=this.X(this.Y,r);return new t(s,this.h,this)}upperBound(r){let s=this.Z(this.Y,r);return new t(s,this.h,this)}reverseLowerBound(r){let s=this.$(this.Y,r);return new t(s,this.h,this)}reverseUpperBound(r){let s=this.rr(this.Y,r);return new t(s,this.h,this)}union(r){let s=this;return r.forEach(function(u){s.insert(u)}),this.i}[Symbol.iterator](){return this.K(this.Y)}},n=e;i.default=n}),zl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=l(_o()),o=l(Eo()),a=ut();function l(r){return r&&r.t?r:{default:r}}var t=class Gs extends o.default{constructor(s,u,d,p){super(s,u,p),this.container=d}get pointer(){this.o===this.h&&(0,a.throwIteratorAccessError)();let s=this;return new Proxy([],{get(u,d){if(d==="0")return s.o.u;if(d==="1")return s.o.l},set(u,d,p){if(d!=="1")throw new TypeError("props must be 1");return s.o.l=p,!0}})}copy(){return new Gs(this.o,this.h,this.container,this.iteratorType)}},e=class extends h.default{constructor(r=[],s,u){super(s,u);let d=this;r.forEach(function(p){d.setElement(p[0],p[1])})}*K(r){r!==void 0&&(yield*this.K(r.U),yield[r.u,r.l],yield*this.K(r.W))}begin(){return new t(this.h.U||this.h,this.h,this)}end(){return new t(this.h,this.h,this)}rBegin(){return new t(this.h.W||this.h,this.h,this,1)}rEnd(){return new t(this.h,this.h,this,1)}front(){if(this.i===0)return;let r=this.h.U;return[r.u,r.l]}back(){if(this.i===0)return;let r=this.h.W;return[r.u,r.l]}lowerBound(r){let s=this.X(this.Y,r);return new t(s,this.h,this)}upperBound(r){let s=this.Z(this.Y,r);return new t(s,this.h,this)}reverseLowerBound(r){let s=this.$(this.Y,r);return new t(s,this.h,this)}reverseUpperBound(r){let s=this.rr(this.Y,r);return new t(s,this.h,this)}setElement(r,s,u){return this.M(r,s,u)}find(r){let s=this.I(this.Y,r);return new t(s,this.h,this)}getElementByKey(r){return this.I(this.Y,r).l}union(r){let s=this;return r.forEach(function(u){s.setElement(u[0],u[1])}),this.i}[Symbol.iterator](){return this.K(this.Y)}},n=e;i.default=n}),So=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=h;function h(o){let a=typeof o;return a==="object"&&o!==null||a==="function"}}),Co=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.HashContainerIterator=i.HashContainer=void 0;var h=lt(),o=l(So()),a=ut();function l(n){return n&&n.t?n:{default:n}}var t=class extends h.ContainerIterator{constructor(n,r,s){super(s),this.o=n,this.h=r,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o=this.o.L,this})}};i.HashContainerIterator=t;var e=class extends h.Container{constructor(){super(),this.H=[],this.g={},this.HASH_TAG=Symbol("@@HASH_TAG"),Object.setPrototypeOf(this.g,null),this.h={},this.h.L=this.h.B=this.p=this._=this.h}V(n){let{L:r,B:s}=n;r.B=s,s.L=r,n===this.p&&(this.p=s),n===this._&&(this._=r),this.i-=1}M(n,r,s){s===void 0&&(s=(0,o.default)(n));let u;if(s){let d=n[this.HASH_TAG];if(d!==void 0)return this.H[d].l=r,this.i;Object.defineProperty(n,this.HASH_TAG,{value:this.H.length,configurable:!0}),u={u:n,l:r,L:this._,B:this.h},this.H.push(u)}else{let d=this.g[n];if(d)return d.l=r,this.i;u={u:n,l:r,L:this._,B:this.h},this.g[n]=u}return this.i===0?(this.p=u,this.h.B=u):this._.B=u,this._=u,this.h.L=u,++this.i}I(n,r){if(r===void 0&&(r=(0,o.default)(n)),r){let s=n[this.HASH_TAG];return s===void 0?this.h:this.H[s]}else return this.g[n]||this.h}clear(){let n=this.HASH_TAG;this.H.forEach(function(r){delete r.u[n]}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h}eraseElementByKey(n,r){let s;if(r===void 0&&(r=(0,o.default)(n)),r){let u=n[this.HASH_TAG];if(u===void 0)return!1;delete n[this.HASH_TAG],s=this.H[u],delete this.H[u]}else{if(s=this.g[n],s===void 0)return!1;delete this.g[n]}return this.V(s),!0}eraseElementByIterator(n){let r=n.o;return r===this.h&&(0,a.throwIteratorAccessError)(),this.V(r),n.next()}eraseElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;let r=this.p;for(;n--;)r=r.B;return this.V(r),this.i}};i.HashContainer=e}),Gl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=Co(),o=ut(),a=class Ys extends h.HashContainerIterator{constructor(n,r,s,u){super(n,r,u),this.container=s}get pointer(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o.u}copy(){return new Ys(this.o,this.h,this.container,this.iteratorType)}},l=class extends h.HashContainer{constructor(e=[]){super();let n=this;e.forEach(function(r){n.insert(r)})}begin(){return new a(this.p,this.h,this)}end(){return new a(this.h,this.h,this)}rBegin(){return new a(this._,this.h,this,1)}rEnd(){return new a(this.h,this.h,this,1)}front(){return this.p.u}back(){return this._.u}insert(e,n){return this.M(e,void 0,n)}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let n=this.p;for(;e--;)n=n.B;return n.u}find(e,n){let r=this.I(e,n);return new a(r,this.h,this)}forEach(e){let n=0,r=this.p;for(;r!==this.h;)e(r.u,n++,this),r=r.B}[Symbol.iterator](){return(function*(){let e=this.p;for(;e!==this.h;)yield e.u,e=e.B}).bind(this)()}},t=l;i.default=t}),Yl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),i.default=void 0;var h=Co(),o=l(So()),a=ut();function l(r){return r&&r.t?r:{default:r}}var t=class Js extends h.HashContainerIterator{constructor(s,u,d,p){super(s,u,p),this.container=d}get pointer(){this.o===this.h&&(0,a.throwIteratorAccessError)();let s=this;return new Proxy([],{get(u,d){if(d==="0")return s.o.u;if(d==="1")return s.o.l},set(u,d,p){if(d!=="1")throw new TypeError("props must be 1");return s.o.l=p,!0}})}copy(){return new Js(this.o,this.h,this.container,this.iteratorType)}},e=class extends h.HashContainer{constructor(r=[]){super();let s=this;r.forEach(function(u){s.setElement(u[0],u[1])})}begin(){return new t(this.p,this.h,this)}end(){return new t(this.h,this.h,this)}rBegin(){return new t(this._,this.h,this,1)}rEnd(){return new t(this.h,this.h,this,1)}front(){if(this.i!==0)return[this.p.u,this.p.l]}back(){if(this.i!==0)return[this._.u,this._.l]}setElement(r,s,u){return this.M(r,s,u)}getElementByKey(r,s){if(s===void 0&&(s=(0,o.default)(r)),s){let d=r[this.HASH_TAG];return d!==void 0?this.H[d].l:void 0}let u=this.g[r];return u?u.l:void 0}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let s=this.p;for(;r--;)s=s.B;return[s.u,s.l]}find(r,s){let u=this.I(r,s);return new t(u,this.h,this)}forEach(r){let s=0,u=this.p;for(;u!==this.h;)r([u.u,u.l],s++,this),u=u.B}[Symbol.iterator](){return(function*(){let r=this.p;for(;r!==this.h;)yield[r.u,r.l],r=r.B}).bind(this)()}},n=e;i.default=n}),Jl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"t",{value:!0}),Object.defineProperty(i,"Deque",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(i,"HashMap",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(i,"HashSet",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(i,"LinkList",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(i,"OrderedMap",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(i,"OrderedSet",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(i,"PriorityQueue",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(i,"Queue",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(i,"Stack",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(i,"Vector",{enumerable:!0,get:function(){return l.default}});var h=d(jl()),o=d(Wl()),a=d(Vl()),l=d(Ql()),t=d(Kl()),e=d(Hl()),n=d($l()),r=d(zl()),s=d(Gl()),u=d(Yl());function d(p){return p&&p.t?p:{default:p}}}),Zl=fe((i,h)=>{oe(),ae(),se();var o=Jl().OrderedSet,a=at()("number-allocator:trace"),l=at()("number-allocator:error");function t(n,r){this.low=n,this.high=r}t.prototype.equals=function(n){return this.low===n.low&&this.high===n.high},t.prototype.compare=function(n){return this.low<n.low&&this.high<n.low?-1:n.low<this.low&&n.high<this.low?1:0};function e(n,r){if(!(this instanceof e))return new e(n,r);this.min=n,this.max=r,this.ss=new o([],(s,u)=>s.compare(u)),a("Create"),this.clear()}e.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},e.prototype.alloc=function(){if(this.ss.size()===0)return a("alloc():empty"),null;let n=this.ss.begin(),r=n.pointer.low,s=n.pointer.high,u=r;return u+1<=s?this.ss.updateKeyByIterator(n,new t(r+1,s)):this.ss.eraseElementByPos(0),a("alloc():"+u),u},e.prototype.use=function(n){let r=new t(n,n),s=this.ss.lowerBound(r);if(!s.equals(this.ss.end())){let u=s.pointer.low,d=s.pointer.high;return s.pointer.equals(r)?(this.ss.eraseElementByIterator(s),a("use():"+n),!0):u>n?!1:u===n?(this.ss.updateKeyByIterator(s,new t(u+1,d)),a("use():"+n),!0):d===n?(this.ss.updateKeyByIterator(s,new t(u,d-1)),a("use():"+n),!0):(this.ss.updateKeyByIterator(s,new t(n+1,d)),this.ss.insert(new t(u,n-1)),a("use():"+n),!0)}return a("use():failed"),!1},e.prototype.free=function(n){if(n<this.min||n>this.max){l("free():"+n+" is out of range");return}let r=new t(n,n),s=this.ss.upperBound(r);if(s.equals(this.ss.end())){if(s.equals(this.ss.begin())){this.ss.insert(r);return}s.pre();let u=s.pointer.high;s.pointer.high+1===n?this.ss.updateKeyByIterator(s,new t(u,n)):this.ss.insert(r)}else if(s.equals(this.ss.begin()))if(n+1===s.pointer.low){let u=s.pointer.high;this.ss.updateKeyByIterator(s,new t(n,u))}else this.ss.insert(r);else{let u=s.pointer.low,d=s.pointer.high;s.pre();let p=s.pointer.low;s.pointer.high+1===n?n+1===u?(this.ss.eraseElementByIterator(s),this.ss.updateKeyByIterator(s,new t(p,d))):this.ss.updateKeyByIterator(s,new t(p,n)):n+1===u?(this.ss.eraseElementByIterator(s.next()),this.ss.insert(new t(n,d))):this.ss.insert(r)}a("free():"+n)},e.prototype.clear=function(){a("clear()"),this.ss.clear(),this.ss.insert(new t(this.min,this.max))},e.prototype.intervalCount=function(){return this.ss.size()},e.prototype.dump=function(){console.log("length:"+this.ss.size());for(let n of this.ss)console.log(n)},h.exports=e}),ko=fe((i,h)=>{oe(),ae(),se();var o=Zl();h.exports.NumberAllocator=o}),Xl=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=Fl(),o=ko(),a=class{constructor(l){l>0&&(this.aliasToTopic=new h.LRUCache({max:l}),this.topicToAlias={},this.numberAllocator=new o.NumberAllocator(1,l),this.max=l,this.length=0)}put(l,t){if(t===0||t>this.max)return!1;let e=this.aliasToTopic.get(t);return e&&delete this.topicToAlias[e],this.aliasToTopic.set(t,l),this.topicToAlias[l]=t,this.numberAllocator.use(t),this.length=this.aliasToTopic.size,!0}getTopicByAlias(l){return this.aliasToTopic.get(l)}getAliasByTopic(l){let t=this.topicToAlias[l];return typeof t<"u"&&this.aliasToTopic.get(t),t}clear(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0}getLruAlias(){return this.numberAllocator.firstVacant()||[...this.aliasToTopic.keys()][this.aliasToTopic.size-1]}};i.default=a}),eu=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});var o=nr(),a=h(Xl()),l=Dt(),t=(e,n)=>{e.log("_handleConnack");let{options:r}=e,s=r.protocolVersion===5?n.reasonCode:n.returnCode;if(clearTimeout(e.connackTimer),delete e.topicAliasSend,n.properties){if(n.properties.topicAliasMaximum){if(n.properties.topicAliasMaximum>65535){e.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}n.properties.topicAliasMaximum>0&&(e.topicAliasSend=new a.default(n.properties.topicAliasMaximum))}n.properties.serverKeepAlive&&r.keepalive&&(r.keepalive=n.properties.serverKeepAlive),n.properties.maximumPacketSize&&(r.properties||(r.properties={}),r.properties.maximumPacketSize=n.properties.maximumPacketSize)}if(s===0)e.reconnecting=!1,e._onConnect(n);else if(s>0){let u=new l.ErrorWithReasonCode(`Connection refused: ${o.ReasonCodes[s]}`,s);e.emit("error",u),e.options.reconnectOnConnackError&&e._cleanUp(!0)}};i.default=t}),tu=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=(o,a,l)=>{o.log("handling pubrel packet");let t=typeof l<"u"?l:o.noop,{messageId:e}=a,n={cmd:"pubcomp",messageId:e};o.incomingStore.get(a,(r,s)=>{r?o._sendPacket(n,t):(o.emit("message",s.topic,s.payload,s),o.handleMessage(s,u=>{if(u)return t(u);o.incomingStore.del(s,o.noop),o._sendPacket(n,t)}))})};i.default=h}),ru=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(i,"__esModule",{value:!0});var o=h(Dl()),a=h(Nl()),l=h(eu()),t=h(nr()),e=h(tu()),n=(r,s,u)=>{let{options:d}=r;if(d.protocolVersion===5&&d.properties&&d.properties.maximumPacketSize&&d.properties.maximumPacketSize<s.length)return r.emit("error",new Error(`exceeding packets size ${s.cmd}`)),r.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),r;switch(r.log("_handlePacket :: emitting packetreceive"),r.emit("packetreceive",s),s.cmd){case"publish":(0,o.default)(r,s,u);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":r.reschedulePing(),(0,t.default)(r,s),u();break;case"pubrel":r.reschedulePing(),(0,e.default)(r,s,u);break;case"connack":(0,l.default)(r,s),u();break;case"auth":r.reschedulePing(),(0,a.default)(r,s),u();break;case"pingresp":r.log("_handlePacket :: received pingresp"),r.reschedulePing(!0),u();break;case"disconnect":r.emit("disconnect",s),u();break;default:r.log("_handlePacket :: unknown command"),u();break}};i.default=n}),nu=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(i,"__esModule",{value:!0}),i.TypedEventEmitter=void 0;var o=h((_t(),Be(gt))),a=Dt(),l=class{};i.TypedEventEmitter=l,(0,a.applyMixin)(l,o.default)}),ir=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.isReactNativeBrowser=i.isWebWorker=void 0;var h=()=>{var t;return typeof window<"u"?typeof navigator<"u"&&((t=navigator.userAgent)===null||t===void 0?void 0:t.toLowerCase().indexOf(" electron/"))>-1&&ke!=null&&ke.versions?!Object.prototype.hasOwnProperty.call(ke.versions,"electron"):typeof window.document<"u":!1},o=()=>{var t,e;return!!(typeof self=="object"&&!((e=(t=self?.constructor)===null||t===void 0?void 0:t.name)===null||e===void 0)&&e.includes("WorkerGlobalScope"))},a=()=>typeof navigator<"u"&&navigator.product==="ReactNative",l=h()||o()||a();i.isWebWorker=o(),i.isReactNativeBrowser=a(),i.default=l}),iu=fe((i,h)=>{oe(),ae(),se(),(function(o,a){typeof i=="object"&&typeof h<"u"?a(i):typeof define=="function"&&define.amd?define(["exports"],a):(o=typeof globalThis<"u"?globalThis:o||self,a(o.fastUniqueNumbers={}))})(i,function(o){var a=function(g){return function(f){var b=g(f);return f.add(b),b}},l=function(g){return function(f,b){return g.set(f,b),b}},t=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,e=536870912,n=e*2,r=function(g,f){return function(b){var y=f.get(b),_=y===void 0?b.size:y<n?y+1:0;if(!b.has(_))return g(b,_);if(b.size<e){for(;b.has(_);)_=Math.floor(Math.random()*n);return g(b,_)}if(b.size>t)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;b.has(_);)_=Math.floor(Math.random()*t);return g(b,_)}},s=new WeakMap,u=l(s),d=r(u,s),p=a(d);o.addUniqueNumber=p,o.generateUniqueNumber=d})}),ou=fe((i,h)=>{oe(),ae(),se(),(function(o,a){typeof i=="object"&&typeof h<"u"?a(i,iu()):typeof define=="function"&&define.amd?define(["exports","fast-unique-numbers"],a):(o=typeof globalThis<"u"?globalThis:o||self,a(o.workerTimersBroker={},o.fastUniqueNumbers))})(i,function(o,a){var l=function(n){return n.method!==void 0&&n.method==="call"},t=function(n){return n.error===null&&typeof n.id=="number"},e=function(n){var r=new Map([[0,function(){}]]),s=new Map([[0,function(){}]]),u=new Map,d=new Worker(n);d.addEventListener("message",function(y){var _=y.data;if(l(_)){var A=_.params,w=A.timerId,I=A.timerType;if(I==="interval"){var k=r.get(w);if(typeof k=="number"){var E=u.get(k);if(E===void 0||E.timerId!==w||E.timerType!==I)throw new Error("The timer is in an undefined state.")}else if(typeof k<"u")k();else throw new Error("The timer is in an undefined state.")}else if(I==="timeout"){var T=s.get(w);if(typeof T=="number"){var O=u.get(T);if(O===void 0||O.timerId!==w||O.timerType!==I)throw new Error("The timer is in an undefined state.")}else if(typeof T<"u")T(),s.delete(w);else throw new Error("The timer is in an undefined state.")}}else if(t(_)){var H=_.id,G=u.get(H);if(G===void 0)throw new Error("The timer is in an undefined state.");var de=G.timerId,U=G.timerType;u.delete(H),U==="interval"?r.delete(de):s.delete(de)}else{var $=_.error.message;throw new Error($)}});var p=function(y){var _=a.generateUniqueNumber(u);u.set(_,{timerId:y,timerType:"interval"}),r.set(y,_),d.postMessage({id:_,method:"clear",params:{timerId:y,timerType:"interval"}})},g=function(y){var _=a.generateUniqueNumber(u);u.set(_,{timerId:y,timerType:"timeout"}),s.set(y,_),d.postMessage({id:_,method:"clear",params:{timerId:y,timerType:"timeout"}})},f=function(y){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,A=a.generateUniqueNumber(r);return r.set(A,function(){y(),typeof r.get(A)=="function"&&d.postMessage({id:null,method:"set",params:{delay:_,now:performance.now(),timerId:A,timerType:"interval"}})}),d.postMessage({id:null,method:"set",params:{delay:_,now:performance.now(),timerId:A,timerType:"interval"}}),A},b=function(y){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,A=a.generateUniqueNumber(s);return s.set(A,y),d.postMessage({id:null,method:"set",params:{delay:_,now:performance.now(),timerId:A,timerType:"timeout"}}),A};return{clearInterval:p,clearTimeout:g,setInterval:f,setTimeout:b}};o.load=e})}),su=fe((i,h)=>{oe(),ae(),se(),(function(o,a){typeof i=="object"&&typeof h<"u"?a(i,ou()):typeof define=="function"&&define.amd?define(["exports","worker-timers-broker"],a):(o=typeof globalThis<"u"?globalThis:o||self,a(o.workerTimers={},o.workerTimersBroker))})(i,function(o,a){var l=function(d,p){var g=null;return function(){if(g!==null)return g;var f=new Blob([p],{type:"application/javascript; charset=utf-8"}),b=URL.createObjectURL(f);return g=d(b),setTimeout(function(){return URL.revokeObjectURL(b)}),g}},t=`(()=>{var e={472:(e,t,r)=>{var o,i;void 0===(i="function"==typeof(o=function(){"use strict";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id "'.concat(t,'".'));clearTimeout(r),e.delete(t)},o=function(e){var r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id "'.concat(e,'".'));clearTimeout(r),t.delete(e)},i=function(e,t){var r,o=performance.now();return{expected:o+(r=e-Math.max(0,o-t)),remainingDelay:r}},n=function e(t,r,o,i){var n=performance.now();n>o?postMessage({id:null,method:"call",params:{timerId:r,timerType:i}}):t.set(r,setTimeout(e,o-n,t,r,o,i))},a=function(t,r,o){var a=i(t,o),s=a.expected,d=a.remainingDelay;e.set(r,setTimeout(n,d,e,r,s,"interval"))},s=function(e,r,o){var a=i(e,o),s=a.expected,d=a.remainingDelay;t.set(r,setTimeout(n,d,t,r,s,"timeout"))};addEventListener("message",(function(e){var t=e.data;try{if("clear"===t.method){var i=t.id,n=t.params,d=n.timerId,c=n.timerType;if("interval"===c)r(d),postMessage({error:null,id:i});else{if("timeout"!==c)throw new Error('The given type "'.concat(c,'" is not supported'));o(d),postMessage({error:null,id:i})}}else{if("set"!==t.method)throw new Error('The given method "'.concat(t.method,'" is not supported'));var u=t.params,l=u.delay,p=u.now,m=u.timerId,v=u.timerType;if("interval"===v)a(l,m,p);else{if("timeout"!==v)throw new Error('The given type "'.concat(v,'" is not supported'));s(l,m,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}}))})?o.call(t,r,t,e):o)||(e.exports=i)}},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";r(472)})()})();`,e=l(a.load,t),n=function(d){return e().clearInterval(d)},r=function(d){return e().clearTimeout(d)},s=function(){var d;return(d=e()).setInterval.apply(d,arguments)},u=function(){var d;return(d=e()).setTimeout.apply(d,arguments)};o.clearInterval=n,o.clearTimeout=r,o.setInterval=s,o.setTimeout=u})}),au=fe(i=>{oe(),ae(),se();var h=i&&i.__createBinding||(Object.create?function(s,u,d,p){p===void 0&&(p=d);var g=Object.getOwnPropertyDescriptor(u,d);(!g||("get"in g?!u.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return u[d]}}),Object.defineProperty(s,p,g)}:function(s,u,d,p){p===void 0&&(p=d),s[p]=u[d]}),o=i&&i.__setModuleDefault||(Object.create?function(s,u){Object.defineProperty(s,"default",{enumerable:!0,value:u})}:function(s,u){s.default=u}),a=i&&i.__importStar||(function(){var s=function(u){return s=Object.getOwnPropertyNames||function(d){var p=[];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(p[p.length]=g);return p},s(u)};return function(u){if(u&&u.__esModule)return u;var d={};if(u!=null)for(var p=s(u),g=0;g<p.length;g++)p[g]!=="default"&&h(d,u,p[g]);return o(d,u),d}})();Object.defineProperty(i,"__esModule",{value:!0});var l=a(ir()),t=su(),e={set:t.setInterval,clear:t.clearInterval},n={set:(s,u)=>setInterval(s,u),clear:s=>clearInterval(s)},r=s=>{switch(s){case"native":return n;case"worker":return e;default:return l.default&&!l.isWebWorker&&!l.isReactNativeBrowser?e:n}};i.default=r}),To=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(i,"__esModule",{value:!0});var o=h(au()),a=class{get keepaliveTimeoutTimestamp(){return this._keepaliveTimeoutTimestamp}get intervalEvery(){return this._intervalEvery}get keepalive(){return this._keepalive}constructor(l,t){this.destroyed=!1,this.client=l,this.timer=typeof t=="object"&&"set"in t&&"clear"in t?t:(0,o.default)(t),this.setKeepalive(l.options.keepalive)}clear(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null)}setKeepalive(l){if(l*=1e3,isNaN(l)||l<=0||l>2147483647)throw new Error(`Keepalive value must be an integer between 0 and 2147483647. Provided value is ${l}`);this._keepalive=l,this.reschedule(),this.client.log(`KeepaliveManager: set keepalive to ${l}ms`)}destroy(){this.clear(),this.destroyed=!0}reschedule(){if(this.destroyed)return;this.clear(),this.counter=0;let l=Math.ceil(this._keepalive*1.5);this._keepaliveTimeoutTimestamp=Date.now()+l,this._intervalEvery=Math.ceil(this._keepalive/2),this.timerId=this.timer.set(()=>{this.destroyed||(this.counter+=1,this.counter===2?this.client.sendPing():this.counter>2&&this.client.onKeepaliveTimeout())},this._intervalEvery)}};i.default=a}),Wn=fe(i=>{oe(),ae(),se();var h=i&&i.__createBinding||(Object.create?function(k,E,T,O){O===void 0&&(O=T);var H=Object.getOwnPropertyDescriptor(E,T);(!H||("get"in H?!E.__esModule:H.writable||H.configurable))&&(H={enumerable:!0,get:function(){return E[T]}}),Object.defineProperty(k,O,H)}:function(k,E,T,O){O===void 0&&(O=T),k[O]=E[T]}),o=i&&i.__setModuleDefault||(Object.create?function(k,E){Object.defineProperty(k,"default",{enumerable:!0,value:E})}:function(k,E){k.default=E}),a=i&&i.__importStar||(function(){var k=function(E){return k=Object.getOwnPropertyNames||function(T){var O=[];for(var H in T)Object.prototype.hasOwnProperty.call(T,H)&&(O[O.length]=H);return O},k(E)};return function(E){if(E&&E.__esModule)return E;var T={};if(E!=null)for(var O=k(E),H=0;H<O.length;H++)O[H]!=="default"&&h(T,E,O[H]);return o(T,E),T}})(),l=i&&i.__importDefault||function(k){return k&&k.__esModule?k:{default:k}};Object.defineProperty(i,"__esModule",{value:!0});var t=l(gl()),e=l(Pl()),n=l(yo()),r=St(),s=l(Ml()),u=a(Ul()),d=l(at()),p=l(wo()),g=l(ru()),f=Dt(),b=nu(),y=l(To()),_=a(ir()),A=globalThis.setImmediate||((...k)=>{let E=k.shift();(0,f.nextTick)(()=>{E(...k)})}),w={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,subscribeBatchSize:null,writeCache:!0,timerVariant:"auto"},I=class ci extends b.TypedEventEmitter{static defaultId(){return`mqttjs_${Math.random().toString(16).substr(2,8)}`}constructor(E,T){super(),this.options=T||{};for(let O in w)typeof this.options[O]>"u"?this.options[O]=w[O]:this.options[O]=T[O];this.log=this.options.log||(0,d.default)("mqttjs:client"),this.noop=this._noop.bind(this),this.log("MqttClient :: version:",ci.VERSION),_.isWebWorker?this.log("MqttClient :: environment","webworker"):this.log("MqttClient :: environment",_.default?"browser":"node"),this.log("MqttClient :: options.protocol",T.protocol),this.log("MqttClient :: options.protocolVersion",T.protocolVersion),this.log("MqttClient :: options.username",T.username),this.log("MqttClient :: options.keepalive",T.keepalive),this.log("MqttClient :: options.reconnectPeriod",T.reconnectPeriod),this.log("MqttClient :: options.rejectUnauthorized",T.rejectUnauthorized),this.log("MqttClient :: options.properties.topicAliasMaximum",T.properties?T.properties.topicAliasMaximum:void 0),this.options.clientId=typeof T.clientId=="string"?T.clientId:ci.defaultId(),this.log("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=T.protocolVersion===5&&T.customHandleAcks?T.customHandleAcks:(...O)=>{O[3](null,0)},this.options.writeCache||(e.default.writeToStream.cacheNumbers=!1),this.streamBuilder=E,this.messageIdProvider=typeof this.options.messageIdProvider>"u"?new n.default:this.options.messageIdProvider,this.outgoingStore=T.outgoingStore||new p.default,this.incomingStore=T.incomingStore||new p.default,this.queueQoSZero=T.queueQoSZero===void 0?!0:T.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.keepaliveManager=null,this.connected=!1,this.disconnecting=!1,this.reconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,T.properties&&T.properties.topicAliasMaximum>0&&(T.properties.topicAliasMaximum>65535?this.log("MqttClient :: options.properties.topicAliasMaximum is out of range"):this.topicAliasRecv=new t.default(T.properties.topicAliasMaximum)),this.on("connect",()=>{let{queue:O}=this,H=()=>{let G=O.shift();this.log("deliver :: entry %o",G);let de=null;if(!G){this._resubscribe();return}de=G.packet,this.log("deliver :: call _sendPacket for %o",de);let U=!0;de.messageId&&de.messageId!==0&&(this.messageIdProvider.register(de.messageId)||(U=!1)),U?this._sendPacket(de,$=>{G.cb&&G.cb($),H()}):(this.log("messageId: %d has already used. The message is skipped and removed.",de.messageId),H())};this.log("connect :: sending queued packets"),H()}),this.on("close",()=>{this.log("close :: connected set to `false`"),this.connected=!1,this.log("close :: clearing connackTimer"),clearTimeout(this.connackTimer),this._destroyKeepaliveManager(),this.topicAliasRecv&&this.topicAliasRecv.clear(),this.log("close :: calling _setupReconnect"),this._setupReconnect()}),this.options.manualConnect||(this.log("MqttClient :: setting up stream"),this.connect())}handleAuth(E,T){T()}handleMessage(E,T){T()}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){var E;let T=new r.Writable,O=e.default.parser(this.options),H=null,G=[];this.log("connect :: calling method to clear reconnect"),this._clearReconnect(),this.disconnected&&!this.reconnecting&&(this.incomingStore=this.options.incomingStore||new p.default,this.outgoingStore=this.options.outgoingStore||new p.default,this.disconnecting=!1,this.disconnected=!1),this.log("connect :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),O.on("packet",F=>{this.log("parser :: on packet push to packets array."),G.push(F)});let de=()=>{this.log("work :: getting next packet in queue");let F=G.shift();if(F)this.log("work :: packet pulled from queue"),(0,g.default)(this,F,U);else{this.log("work :: no packets in queue");let me=H;H=null,this.log("work :: done flag is %s",!!me),me&&me()}},U=()=>{if(G.length)(0,f.nextTick)(de);else{let F=H;H=null,F()}};T._write=(F,me,le)=>{H=le,this.log("writable stream :: parsing buffer"),O.parse(F),de()};let $=F=>{this.log("streamErrorHandler :: error",F.message),F.code?(this.log("streamErrorHandler :: emitting error"),this.emit("error",F)):this.noop(F)};this.log("connect :: pipe stream to writable stream"),this.stream.pipe(T),this.stream.on("error",$),this.stream.on("close",()=>{this.log("(%s)stream :: on close",this.options.clientId),this._flushVolatile(),this.log("stream: emit close to MqttClient"),this.emit("close")}),this.log("connect: sending packet `connect`");let z={cmd:"connect",protocolId:this.options.protocolId,protocolVersion:this.options.protocolVersion,clean:this.options.clean,clientId:this.options.clientId,keepalive:this.options.keepalive,username:this.options.username,password:this.options.password,properties:this.options.properties};if(this.options.will&&(z.will=Object.assign(Object.assign({},this.options.will),{payload:(E=this.options.will)===null||E===void 0?void 0:E.payload})),this.topicAliasRecv&&(z.properties||(z.properties={}),this.topicAliasRecv&&(z.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(z),O.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"){let F=Object.assign({cmd:"auth",reasonCode:0},this.options.authPacket);this._writePacket(F)}}return this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(()=>{this.log("!!connectTimeout hit!! Calling _cleanUp with force `true`"),this.emit("error",new Error("connack timeout")),this._cleanUp(!0)},this.options.connectTimeout),this}publish(E,T,O,H){this.log("publish :: message `%s` to topic `%s`",T,E);let{options:G}=this;typeof O=="function"&&(H=O,O=null),O=O||{},O=Object.assign(Object.assign({},{qos:0,retain:!1,dup:!1}),O);let{qos:de,retain:U,dup:$,properties:z,cbStorePut:F}=O;if(this._checkDisconnecting(H))return this;let me=()=>{let le=0;if((de===1||de===2)&&(le=this._nextId(),le===null))return this.log("No messageId left"),!1;let pe={cmd:"publish",topic:E,payload:T,qos:de,retain:U,messageId:le,dup:$};switch(G.protocolVersion===5&&(pe.properties=z),this.log("publish :: qos",de),de){case 1:case 2:this.outgoing[pe.messageId]={volatile:!1,cb:H||this.noop},this.log("MqttClient:publish: packet cmd: %s",pe.cmd),this._sendPacket(pe,void 0,F);break;default:this.log("MqttClient:publish: packet cmd: %s",pe.cmd),this._sendPacket(pe,H,F);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!me())&&this._storeProcessingQueue.push({invoke:me,cbStorePut:O.cbStorePut,callback:H}),this}publishAsync(E,T,O){return new Promise((H,G)=>{this.publish(E,T,O,(de,U)=>{de?G(de):H(U)})})}subscribe(E,T,O){let H=this.options.protocolVersion;typeof T=="function"&&(O=T),O=O||this.noop;let G=!1,de=[];typeof E=="string"?(E=[E],de=E):Array.isArray(E)?de=E:typeof E=="object"&&(G=E.resubscribe,delete E.resubscribe,de=Object.keys(E));let U=u.validateTopics(de);if(U!==null)return A(O,new Error(`Invalid topic ${U}`)),this;if(this._checkDisconnecting(O))return this.log("subscribe: discconecting true"),this;let $={qos:0};H===5&&($.nl=!1,$.rap=!1,$.rh=0),T=Object.assign(Object.assign({},$),T);let z=T.properties,F=[],me=(we,Q)=>{if(Q=Q||T,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,we)||this._resubscribeTopics[we].qos<Q.qos||G){let he={topic:we,qos:Q.qos};H===5&&(he.nl=Q.nl,he.rap=Q.rap,he.rh=Q.rh,he.properties=z),this.log("subscribe: pushing topic `%s` and qos `%s` to subs list",he.topic,he.qos),F.push(he)}};if(Array.isArray(E)?E.forEach(we=>{this.log("subscribe: array topic %s",we),me(we)}):Object.keys(E).forEach(we=>{this.log("subscribe: object topic %s, %o",we,E[we]),me(we,E[we])}),!F.length)return O(null,[]),this;let le=(we,Q)=>{let he={cmd:"subscribe",subscriptions:we,messageId:Q};if(z&&(he.properties=z),this.options.resubscribe){this.log("subscribe :: resubscribe true");let ce=[];we.forEach(ye=>{if(this.options.reconnectPeriod>0){let J={qos:ye.qos};H===5&&(J.nl=ye.nl||!1,J.rap=ye.rap||!1,J.rh=ye.rh||0,J.properties=ye.properties),this._resubscribeTopics[ye.topic]=J,ce.push(ye.topic)}}),this.messageIdToTopic[he.messageId]=ce}let P=new Promise((ce,ye)=>{this.outgoing[he.messageId]={volatile:!0,cb(J,_e){if(!J){let{granted:K}=_e;for(let M=0;M<K.length;M+=1)we[M].qos=K[M]}J?ye(new f.ErrorWithSubackPacket(J.message,_e)):ce(_e)}}});return this.log("subscribe :: call _sendPacket"),this._sendPacket(he),P},pe=()=>{var we;let Q=(we=this.options.subscribeBatchSize)!==null&&we!==void 0?we:F.length,he=[];for(let P=0;P<F.length;P+=Q){let ce=F.slice(P,P+Q),ye=this._nextId();if(ye===null)return this.log("No messageId left"),!1;he.push(le(ce,ye))}return Promise.all(he).then(P=>{O(null,F,P.at(-1))}).catch(P=>{O(P,F,P.packet)}),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!pe())&&this._storeProcessingQueue.push({invoke:pe,callback:O}),this}subscribeAsync(E,T){return new Promise((O,H)=>{this.subscribe(E,T,(G,de)=>{G?H(G):O(de)})})}unsubscribe(E,T,O){typeof E=="string"&&(E=[E]),typeof T=="function"&&(O=T),O=O||this.noop;let H=u.validateTopics(E);if(H!==null)return A(O,new Error(`Invalid topic ${H}`)),this;if(this._checkDisconnecting(O))return this;let G=()=>{let de=this._nextId();if(de===null)return this.log("No messageId left"),!1;let U={cmd:"unsubscribe",messageId:de,unsubscriptions:[]};return typeof E=="string"?U.unsubscriptions=[E]:Array.isArray(E)&&(U.unsubscriptions=E),this.options.resubscribe&&U.unsubscriptions.forEach($=>{delete this._resubscribeTopics[$]}),typeof T=="object"&&T.properties&&(U.properties=T.properties),this.outgoing[U.messageId]={volatile:!0,cb:O},this.log("unsubscribe: call _sendPacket"),this._sendPacket(U),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!G())&&this._storeProcessingQueue.push({invoke:G,callback:O}),this}unsubscribeAsync(E,T){return new Promise((O,H)=>{this.unsubscribe(E,T,(G,de)=>{G?H(G):O(de)})})}end(E,T,O){this.log("end :: (%s)",this.options.clientId),(E==null||typeof E!="boolean")&&(O=O||T,T=E,E=!1),typeof T!="object"&&(O=O||T,T=null),this.log("end :: cb? %s",!!O),(!O||typeof O!="function")&&(O=this.noop);let H=()=>{this.log("end :: closeStores: closing incoming and outgoing stores"),this.disconnected=!0,this.incomingStore.close(de=>{this.outgoingStore.close(U=>{if(this.log("end :: closeStores: emitting end"),this.emit("end"),O){let $=de||U;this.log("end :: closeStores: invoking callback with args"),O($)}})}),this._deferredReconnect?this._deferredReconnect():(this.options.reconnectPeriod===0||this.options.manualConnect)&&(this.disconnecting=!1)},G=()=>{this.log("end :: (%s) :: finish :: calling _cleanUp with force %s",this.options.clientId,E),this._cleanUp(E,()=>{this.log("end :: finish :: calling process.nextTick on closeStores"),(0,f.nextTick)(H)},T)};return this.disconnecting?(O(),this):(this._clearReconnect(),this.disconnecting=!0,!E&&Object.keys(this.outgoing).length>0?(this.log("end :: (%s) :: calling finish in 10ms once outgoing is empty",this.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,G,10))):(this.log("end :: (%s) :: immediately calling finish",this.options.clientId),G()),this)}endAsync(E,T){return new Promise((O,H)=>{this.end(E,T,G=>{G?H(G):O()})})}removeOutgoingMessage(E){if(this.outgoing[E]){let{cb:T}=this.outgoing[E];this._removeOutgoingAndStoreMessage(E,()=>{T(new Error("Message removed"))})}return this}reconnect(E){this.log("client reconnect");let T=()=>{E?(this.options.incomingStore=E.incomingStore,this.options.outgoingStore=E.outgoingStore):(this.options.incomingStore=null,this.options.outgoingStore=null),this.incomingStore=this.options.incomingStore||new p.default,this.outgoingStore=this.options.outgoingStore||new p.default,this.disconnecting=!1,this.disconnected=!1,this._deferredReconnect=null,this._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=T:T(),this}_flushVolatile(){this.outgoing&&(this.log("_flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(this.outgoing).forEach(E=>{this.outgoing[E].volatile&&typeof this.outgoing[E].cb=="function"&&(this.outgoing[E].cb(new Error("Connection closed")),delete this.outgoing[E])}))}_flush(){this.outgoing&&(this.log("_flush: queue exists? %b",!!this.outgoing),Object.keys(this.outgoing).forEach(E=>{typeof this.outgoing[E].cb=="function"&&(this.outgoing[E].cb(new Error("Connection closed")),delete this.outgoing[E])}))}_removeTopicAliasAndRecoverTopicName(E){let T;E.properties&&(T=E.properties.topicAlias);let O=E.topic.toString();if(this.log("_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o",T,O),O.length===0){if(typeof T>"u")return new Error("Unregistered Topic Alias");if(O=this.topicAliasSend.getTopicByAlias(T),typeof O>"u")return new Error("Unregistered Topic Alias");E.topic=O}T&&delete E.properties.topicAlias}_checkDisconnecting(E){return this.disconnecting&&(E&&E!==this.noop?E(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting}_reconnect(){this.log("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this.connect()}),this.log("client already connected. disconnecting first.")):(this.log("_reconnect: calling connect"),this.connect())}_setupReconnect(){!this.disconnecting&&!this.reconnectTimer&&this.options.reconnectPeriod>0?(this.reconnecting||(this.log("_setupReconnect :: emit `offline` state"),this.emit("offline"),this.log("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),this.log("_setupReconnect :: setting reconnectTimer for %d ms",this.options.reconnectPeriod),this.reconnectTimer=setInterval(()=>{this.log("reconnectTimer :: reconnect triggered!"),this._reconnect()},this.options.reconnectPeriod)):this.log("_setupReconnect :: doing nothing...")}_clearReconnect(){this.log("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)}_cleanUp(E,T,O={}){if(T&&(this.log("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",T)),this.log("_cleanUp :: forced? %s",E),E)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let H=Object.assign({cmd:"disconnect"},O);this.log("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(H,()=>{this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),A(()=>{this.stream.end(()=>{this.log("_cleanUp :: (%s) :: stream destroyed",this.options.clientId)})})})}!this.disconnecting&&!this.reconnecting&&(this.log("_cleanUp :: client not disconnecting/reconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this._destroyKeepaliveManager(),T&&!this.connected&&(this.log("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",T),T())}_storeAndSend(E,T,O){this.log("storeAndSend :: store packet with cmd %s to outgoingStore",E.cmd);let H=E,G;if(H.cmd==="publish"&&(H=(0,s.default)(E),G=this._removeTopicAliasAndRecoverTopicName(H),G))return T&&T(G);this.outgoingStore.put(H,de=>{if(de)return T&&T(de);O(),this._writePacket(E,T)})}_applyTopicAlias(E){if(this.options.protocolVersion===5&&E.cmd==="publish"){let T;E.properties&&(T=E.properties.topicAlias);let O=E.topic.toString();if(this.topicAliasSend)if(T){if(O.length!==0&&(this.log("applyTopicAlias :: register topic: %s - alias: %d",O,T),!this.topicAliasSend.put(O,T)))return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",O,T),new Error("Sending Topic Alias out of range")}else O.length!==0&&(this.options.autoAssignTopicAlias?(T=this.topicAliasSend.getAliasByTopic(O),T?(E.topic="",E.properties=Object.assign(Object.assign({},E.properties),{topicAlias:T}),this.log("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",O,T)):(T=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(O,T),E.properties=Object.assign(Object.assign({},E.properties),{topicAlias:T}),this.log("applyTopicAlias :: auto assign topic: %s - alias: %d",O,T))):this.options.autoUseTopicAlias&&(T=this.topicAliasSend.getAliasByTopic(O),T&&(E.topic="",E.properties=Object.assign(Object.assign({},E.properties),{topicAlias:T}),this.log("applyTopicAlias :: auto use topic: %s - alias: %d",O,T))));else if(T)return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",O,T),new Error("Sending Topic Alias out of range")}}_noop(E){this.log("noop ::",E)}_writePacket(E,T){this.log("_writePacket :: packet: %O",E),this.log("_writePacket :: emitting `packetsend`"),this.emit("packetsend",E),this.log("_writePacket :: writing to stream");let O=e.default.writeToStream(E,this.stream,this.options);this.log("_writePacket :: writeToStream result %s",O),!O&&T&&T!==this.noop?(this.log("_writePacket :: handle events on `drain` once through callback."),this.stream.once("drain",T)):T&&(this.log("_writePacket :: invoking cb"),T())}_sendPacket(E,T,O,H){this.log("_sendPacket :: (%s) :: start",this.options.clientId),O=O||this.noop,T=T||this.noop;let G=this._applyTopicAlias(E);if(G){T(G);return}if(!this.connected){if(E.cmd==="auth"){this._writePacket(E,T);return}this.log("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(E,T,O);return}if(H){this._writePacket(E,T);return}switch(E.cmd){case"publish":break;case"pubrel":this._storeAndSend(E,T,O);return;default:this._writePacket(E,T);return}switch(E.qos){case 2:case 1:this._storeAndSend(E,T,O);break;default:this._writePacket(E,T);break}this.log("_sendPacket :: (%s) :: end",this.options.clientId)}_storePacket(E,T,O){this.log("_storePacket :: packet: %o",E),this.log("_storePacket :: cb? %s",!!T),O=O||this.noop;let H=E;if(H.cmd==="publish"){H=(0,s.default)(E);let de=this._removeTopicAliasAndRecoverTopicName(H);if(de)return T&&T(de)}let G=H.qos||0;G===0&&this.queueQoSZero||H.cmd!=="publish"?this.queue.push({packet:H,cb:T}):G>0?(T=this.outgoing[H.messageId]?this.outgoing[H.messageId].cb:null,this.outgoingStore.put(H,de=>{if(de)return T&&T(de);O()})):T&&T(new Error("No connection to broker"))}_setupKeepaliveManager(){this.log("_setupKeepaliveManager :: keepalive %d (seconds)",this.options.keepalive),!this.keepaliveManager&&this.options.keepalive&&(this.keepaliveManager=new y.default(this,this.options.timerVariant))}_destroyKeepaliveManager(){this.keepaliveManager&&(this.log("_destroyKeepaliveManager :: destroying keepalive manager"),this.keepaliveManager.destroy(),this.keepaliveManager=null)}reschedulePing(E=!1){this.keepaliveManager&&this.options.keepalive&&(E||this.options.reschedulePings)&&this._reschedulePing()}_reschedulePing(){this.log("_reschedulePing :: rescheduling ping"),this.keepaliveManager.reschedule()}sendPing(){this.log("_sendPing :: sending pingreq"),this._sendPacket({cmd:"pingreq"})}onKeepaliveTimeout(){this.emit("error",new Error("Keepalive timeout")),this.log("onKeepaliveTimeout :: calling _cleanUp with force true"),this._cleanUp(!0)}_resubscribe(){this.log("_resubscribe");let E=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&E.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log("_resubscribe: protocolVersion 5");for(let T=0;T<E.length;T++){let O={};O[E[T]]=this._resubscribeTopics[E[T]],O.resubscribe=!0,this.subscribe(O,{properties:O[E[T]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1}_onConnect(E){if(this.disconnected){this.emit("connect",E);return}this.connackPacket=E,this.messageIdProvider.clear(),this._setupKeepaliveManager(),this.connected=!0;let T=()=>{let O=this.outgoingStore.createStream(),H=()=>{O.destroy(),O=null,this._flushStoreProcessingQueue(),G()},G=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={}};this.once("close",H),O.on("error",U=>{G(),this._flushStoreProcessingQueue(),this.removeListener("close",H),this.emit("error",U)});let de=()=>{if(!O)return;let U=O.read(1),$;if(!U){O.once("readable",de);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[U.messageId]){de();return}!this.disconnecting&&!this.reconnectTimer?($=this.outgoing[U.messageId]?this.outgoing[U.messageId].cb:null,this.outgoing[U.messageId]={volatile:!1,cb(z,F){$&&$(z,F),de()}},this._packetIdsDuringStoreProcessing[U.messageId]=!0,this.messageIdProvider.register(U.messageId)?this._sendPacket(U,void 0,void 0,!0):this.log("messageId: %d has already used.",U.messageId)):O.destroy&&O.destroy()};O.on("end",()=>{let U=!0;for(let $ in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[$]){U=!1;break}this.removeListener("close",H),U?(G(),this._invokeAllStoreProcessingQueue(),this.emit("connect",E)):T()}),de()};T()}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let E=this._storeProcessingQueue[0];if(E&&E.invoke())return this._storeProcessingQueue.shift(),!0}return!1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let E of this._storeProcessingQueue)E.cbStorePut&&E.cbStorePut(new Error("Connection closed")),E.callback&&E.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)}_removeOutgoingAndStoreMessage(E,T){delete this.outgoing[E],this.outgoingStore.del({messageId:E},(O,H)=>{T(O,H),this.messageIdProvider.deallocate(E),this._invokeStoreProcessingQueue()})}};I.VERSION=f.MQTTJS_VERSION,i.default=I}),lu=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=ko(),o=class{constructor(){this.numberAllocator=new h.NumberAllocator(1,65535)}allocate(){return this.lastId=this.numberAllocator.alloc(),this.lastId}getLastAllocated(){return this.lastId}register(a){return this.numberAllocator.use(a)}deallocate(a){this.numberAllocator.free(a)}clear(){this.numberAllocator.clear()}};i.default=o});function Ct(i){throw new RangeError(Ro[i])}function Io(i,h){let o=i.split("@"),a="";o.length>1&&(a=o[0]+"@",i=o[1]);let l=(function(t,e){let n=[],r=t.length;for(;r--;)n[r]=e(t[r]);return n})((i=i.replace(Po,".")).split("."),h).join(".");return a+l}function Bo(i){let h=[],o=0,a=i.length;for(;o<a;){let l=i.charCodeAt(o++);if(l>=55296&&l<=56319&&o<a){let t=i.charCodeAt(o++);(64512&t)==56320?h.push(((1023&l)<<10)+(1023&t)+65536):(h.push(l),o--)}else h.push(l)}return h}var Oo,xo,Po,Ro,Je,or,Vn,Qn,Kn,Hn,At,uu=He(()=>{oe(),ae(),se(),Oo=/^xn--/,xo=/[^\0-\x7E]/,Po=/[\x2E\u3002\uFF0E\uFF61]/g,Ro={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Je=Math.floor,or=String.fromCharCode,Vn=function(i,h){return i+22+75*(i<26)-((h!=0)<<5)},Qn=function(i,h,o){let a=0;for(i=o?Je(i/700):i>>1,i+=Je(i/h);i>455;a+=36)i=Je(i/35);return Je(a+36*i/(i+38))},Kn=function(i){let h=[],o=i.length,a=0,l=128,t=72,e=i.lastIndexOf("-");e<0&&(e=0);for(let r=0;r<e;++r)i.charCodeAt(r)>=128&&Ct("not-basic"),h.push(i.charCodeAt(r));for(let r=e>0?e+1:0;r<o;){let s=a;for(let d=1,p=36;;p+=36){r>=o&&Ct("invalid-input");let g=(n=i.charCodeAt(r++))-48<10?n-22:n-65<26?n-65:n-97<26?n-97:36;(g>=36||g>Je((2147483647-a)/d))&&Ct("overflow"),a+=g*d;let f=p<=t?1:p>=t+26?26:p-t;if(g<f)break;let b=36-f;d>Je(2147483647/b)&&Ct("overflow"),d*=b}let u=h.length+1;t=Qn(a-s,u,s==0),Je(a/u)>2147483647-l&&Ct("overflow"),l+=Je(a/u),a%=u,h.splice(a++,0,l)}var n;return String.fromCodePoint(...h)},Hn=function(i){let h=[],o=(i=Bo(i)).length,a=128,l=0,t=72;for(let r of i)r<128&&h.push(or(r));let e=h.length,n=e;for(e&&h.push("-");n<o;){let r=2147483647;for(let u of i)u>=a&&u<r&&(r=u);let s=n+1;r-a>Je((2147483647-l)/s)&&Ct("overflow"),l+=(r-a)*s,a=r;for(let u of i)if(u<a&&++l>2147483647&&Ct("overflow"),u==a){let d=l;for(let p=36;;p+=36){let g=p<=t?1:p>=t+26?26:p-t;if(d<g)break;let f=d-g,b=36-g;h.push(or(Vn(g+f%b,0))),d=Je(f/b)}h.push(or(Vn(d,0))),t=Qn(l,s,n==e),l=0,++n}++l,++a}return h.join("")},At={version:"2.1.0",ucs2:{decode:Bo,encode:i=>String.fromCodePoint(...i)},decode:Kn,encode:Hn,toASCII:function(i){return Io(i,function(h){return xo.test(h)?"xn--"+Hn(h):h})},toUnicode:function(i){return Io(i,function(h){return Oo.test(h)?Kn(h.slice(4).toLowerCase()):h})}},At.decode,At.encode,At.toASCII,At.toUnicode,At.ucs2,At.version});function cu(i,h){return Object.prototype.hasOwnProperty.call(i,h)}var Mo,Lt,Uo,et,hu=He(()=>{oe(),ae(),se(),Mo=function(i,h,o,a){h=h||"&",o=o||"=";var l={};if(typeof i!="string"||i.length===0)return l;var t=/\+/g;i=i.split(h);var e=1e3;a&&typeof a.maxKeys=="number"&&(e=a.maxKeys);var n=i.length;e>0&&n>e&&(n=e);for(var r=0;r<n;++r){var s,u,d,p,g=i[r].replace(t,"%20"),f=g.indexOf(o);f>=0?(s=g.substr(0,f),u=g.substr(f+1)):(s=g,u=""),d=decodeURIComponent(s),p=decodeURIComponent(u),cu(l,d)?Array.isArray(l[d])?l[d].push(p):l[d]=[l[d],p]:l[d]=p}return l},Lt=function(i){switch(typeof i){case"string":return i;case"boolean":return i?"true":"false";case"number":return isFinite(i)?i:"";default:return""}},Uo=function(i,h,o,a){return h=h||"&",o=o||"=",i===null&&(i=void 0),typeof i=="object"?Object.keys(i).map(function(l){var t=encodeURIComponent(Lt(l))+o;return Array.isArray(i[l])?i[l].map(function(e){return t+encodeURIComponent(Lt(e))}).join(h):t+encodeURIComponent(Lt(i[l]))}).join(h):a?encodeURIComponent(Lt(a))+o+encodeURIComponent(Lt(i)):""},et={},et.decode=et.parse=Mo,et.encode=et.stringify=Uo,et.decode,et.encode,et.parse,et.stringify});function qn(){throw new Error("setTimeout has not been defined")}function $n(){throw new Error("clearTimeout has not been defined")}function Do(i){if(ht===setTimeout)return setTimeout(i,0);if((ht===qn||!ht)&&setTimeout)return ht=setTimeout,setTimeout(i,0);try{return ht(i,0)}catch{try{return ht.call(null,i,0)}catch{return ht.call(this||kt,i,0)}}}function fu(){It&&Tt&&(It=!1,Tt.length?tt=Tt.concat(tt):Kt=-1,tt.length&&Lo())}function Lo(){if(!It){var i=Do(fu);It=!0;for(var h=tt.length;h;){for(Tt=tt,tt=[];++Kt<h;)Tt&&Tt[Kt].run();Kt=-1,h=tt.length}Tt=null,It=!1,(function(o){if(ft===clearTimeout)return clearTimeout(o);if((ft===$n||!ft)&&clearTimeout)return ft=clearTimeout,clearTimeout(o);try{ft(o)}catch{try{return ft.call(null,o)}catch{return ft.call(this||kt,o)}}})(i)}}function No(i,h){(this||kt).fun=i,(this||kt).array=h}function ct(){}var Fo,ht,ft,kt,Le,Tt,tt,It,Kt,De,du=He(()=>{oe(),ae(),se(),kt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Le=Fo={},(function(){try{ht=typeof setTimeout=="function"?setTimeout:qn}catch{ht=qn}try{ft=typeof clearTimeout=="function"?clearTimeout:$n}catch{ft=$n}})(),tt=[],It=!1,Kt=-1,Le.nextTick=function(i){var h=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)h[o-1]=arguments[o];tt.push(new No(i,h)),tt.length!==1||It||Do(Lo)},No.prototype.run=function(){(this||kt).fun.apply(null,(this||kt).array)},Le.title="browser",Le.browser=!0,Le.env={},Le.argv=[],Le.version="",Le.versions={},Le.on=ct,Le.addListener=ct,Le.once=ct,Le.off=ct,Le.removeListener=ct,Le.removeAllListeners=ct,Le.emit=ct,Le.prependListener=ct,Le.prependOnceListener=ct,Le.listeners=function(i){return[]},Le.binding=function(i){throw new Error("process.binding is not supported")},Le.cwd=function(){return"/"},Le.chdir=function(i){throw new Error("process.chdir is not supported")},Le.umask=function(){return 0},De=Fo,De.addListener,De.argv,De.binding,De.browser,De.chdir,De.cwd,De.emit,De.env,De.listeners,De.nextTick,De.off,De.on,De.once,De.prependListener,De.prependOnceListener,De.removeAllListeners,De.removeListener,De.title,De.umask,De.version,De.versions});function pu(){if(zn)return sr;zn=!0;var i=sr={},h,o;function a(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?h=setTimeout:h=a}catch{h=a}try{typeof clearTimeout=="function"?o=clearTimeout:o=l}catch{o=l}})();function t(b){if(h===setTimeout)return setTimeout(b,0);if((h===a||!h)&&setTimeout)return h=setTimeout,setTimeout(b,0);try{return h(b,0)}catch{try{return h.call(null,b,0)}catch{return h.call(this||Bt,b,0)}}}function e(b){if(o===clearTimeout)return clearTimeout(b);if((o===l||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(b);try{return o(b)}catch{try{return o.call(null,b)}catch{return o.call(this||Bt,b)}}}var n=[],r=!1,s,u=-1;function d(){!r||!s||(r=!1,s.length?n=s.concat(n):u=-1,n.length&&p())}function p(){if(!r){var b=t(d);r=!0;for(var y=n.length;y;){for(s=n,n=[];++u<y;)s&&s[u].run();u=-1,y=n.length}s=null,r=!1,e(b)}}i.nextTick=function(b){var y=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)y[_-1]=arguments[_];n.push(new g(b,y)),n.length===1&&!r&&t(p)};function g(b,y){(this||Bt).fun=b,(this||Bt).array=y}g.prototype.run=function(){(this||Bt).fun.apply(null,(this||Bt).array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={};function f(){}return i.on=f,i.addListener=f,i.once=f,i.off=f,i.removeListener=f,i.removeAllListeners=f,i.emit=f,i.prependListener=f,i.prependOnceListener=f,i.listeners=function(b){return[]},i.binding=function(b){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(b){throw new Error("process.chdir is not supported")},i.umask=function(){return 0},sr}var sr,zn,Bt,Re,jo=He(()=>{oe(),ae(),se(),sr={},zn=!1,Bt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Re=pu(),Re.platform="browser",Re.addListener,Re.argv,Re.binding,Re.browser,Re.chdir,Re.cwd,Re.emit,Re.env,Re.listeners,Re.nextTick,Re.off,Re.on,Re.once,Re.prependListener,Re.prependOnceListener,Re.removeAllListeners,Re.removeListener,Re.title,Re.umask,Re.version,Re.versions});function gu(){if(Gn)return ar;Gn=!0;var i=Re;function h(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function o(t,e){for(var n="",r=0,s=-1,u=0,d,p=0;p<=t.length;++p){if(p<t.length)d=t.charCodeAt(p);else{if(d===47)break;d=47}if(d===47){if(!(s===p-1||u===1))if(s!==p-1&&u===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var g=n.lastIndexOf("/");if(g!==n.length-1){g===-1?(n="",r=0):(n=n.slice(0,g),r=n.length-1-n.lastIndexOf("/")),s=p,u=0;continue}}else if(n.length===2||n.length===1){n="",r=0,s=p,u=0;continue}}e&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+t.slice(s+1,p):n=t.slice(s+1,p),r=p-s-1;s=p,u=0}else d===46&&u!==-1?++u:u=-1}return n}function a(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+t+r:r}var l={resolve:function(){for(var t="",e=!1,n,r=arguments.length-1;r>=-1&&!e;r--){var s;r>=0?s=arguments[r]:(n===void 0&&(n=i.cwd()),s=n),h(s),s.length!==0&&(t=s+"/"+t,e=s.charCodeAt(0)===47)}return t=o(t,!e),e?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(h(t),t.length===0)return".";var e=t.charCodeAt(0)===47,n=t.charCodeAt(t.length-1)===47;return t=o(t,!e),t.length===0&&!e&&(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return h(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];h(n),n.length>0&&(t===void 0?t=n:t+="/"+n)}return t===void 0?".":l.normalize(t)},relative:function(t,e){if(h(t),h(e),t===e||(t=l.resolve(t),e=l.resolve(e),t===e))return"";for(var n=1;n<t.length&&t.charCodeAt(n)===47;++n);for(var r=t.length,s=r-n,u=1;u<e.length&&e.charCodeAt(u)===47;++u);for(var d=e.length,p=d-u,g=s<p?s:p,f=-1,b=0;b<=g;++b){if(b===g){if(p>g){if(e.charCodeAt(u+b)===47)return e.slice(u+b+1);if(b===0)return e.slice(u+b)}else s>g&&(t.charCodeAt(n+b)===47?f=b:b===0&&(f=0));break}var y=t.charCodeAt(n+b),_=e.charCodeAt(u+b);if(y!==_)break;y===47&&(f=b)}var A="";for(b=n+f+1;b<=r;++b)(b===r||t.charCodeAt(b)===47)&&(A.length===0?A+="..":A+="/..");return A.length>0?A+e.slice(u+f):(u+=f,e.charCodeAt(u)===47&&++u,e.slice(u))},_makeLong:function(t){return t},dirname:function(t){if(h(t),t.length===0)return".";for(var e=t.charCodeAt(0),n=e===47,r=-1,s=!0,u=t.length-1;u>=1;--u)if(e=t.charCodeAt(u),e===47){if(!s){r=u;break}}else s=!1;return r===-1?n?"/":".":n&&r===1?"//":t.slice(0,r)},basename:function(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');h(t);var n=0,r=-1,s=!0,u;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var d=e.length-1,p=-1;for(u=t.length-1;u>=0;--u){var g=t.charCodeAt(u);if(g===47){if(!s){n=u+1;break}}else p===-1&&(s=!1,p=u+1),d>=0&&(g===e.charCodeAt(d)?--d===-1&&(r=u):(d=-1,r=p))}return n===r?r=p:r===-1&&(r=t.length),t.slice(n,r)}else{for(u=t.length-1;u>=0;--u)if(t.charCodeAt(u)===47){if(!s){n=u+1;break}}else r===-1&&(s=!1,r=u+1);return r===-1?"":t.slice(n,r)}},extname:function(t){h(t);for(var e=-1,n=0,r=-1,s=!0,u=0,d=t.length-1;d>=0;--d){var p=t.charCodeAt(d);if(p===47){if(!s){n=d+1;break}continue}r===-1&&(s=!1,r=d+1),p===46?e===-1?e=d:u!==1&&(u=1):e!==-1&&(u=-1)}return e===-1||r===-1||u===0||u===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return a("/",t)},parse:function(t){h(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;var n=t.charCodeAt(0),r=n===47,s;r?(e.root="/",s=1):s=0;for(var u=-1,d=0,p=-1,g=!0,f=t.length-1,b=0;f>=s;--f){if(n=t.charCodeAt(f),n===47){if(!g){d=f+1;break}continue}p===-1&&(g=!1,p=f+1),n===46?u===-1?u=f:b!==1&&(b=1):u!==-1&&(b=-1)}return u===-1||p===-1||b===0||b===1&&u===p-1&&u===d+1?p!==-1&&(d===0&&r?e.base=e.name=t.slice(1,p):e.base=e.name=t.slice(d,p)):(d===0&&r?(e.name=t.slice(1,u),e.base=t.slice(1,p)):(e.name=t.slice(d,u),e.base=t.slice(d,p)),e.ext=t.slice(u,p)),d>0?e.dir=t.slice(0,d-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};return l.posix=l,ar=l,ar}var ar,Gn,Yn,mu=He(()=>{oe(),ae(),se(),jo(),ar={},Gn=!1,Yn=gu()}),Wo={};Rt(Wo,{URL:()=>ps,Url:()=>us,default:()=>xe,fileURLToPath:()=>Vo,format:()=>cs,parse:()=>ds,pathToFileURL:()=>Qo,resolve:()=>hs,resolveObject:()=>fs});function Ge(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function Ht(i,h,o){if(i&&Ze.isObject(i)&&i instanceof Ge)return i;var a=new Ge;return a.parse(i,h,o),a}function Au(){if(ei)return hr;ei=!0;var i=De;function h(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function o(t,e){for(var n="",r=0,s=-1,u=0,d,p=0;p<=t.length;++p){if(p<t.length)d=t.charCodeAt(p);else{if(d===47)break;d=47}if(d===47){if(!(s===p-1||u===1))if(s!==p-1&&u===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var g=n.lastIndexOf("/");if(g!==n.length-1){g===-1?(n="",r=0):(n=n.slice(0,g),r=n.length-1-n.lastIndexOf("/")),s=p,u=0;continue}}else if(n.length===2||n.length===1){n="",r=0,s=p,u=0;continue}}e&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+t.slice(s+1,p):n=t.slice(s+1,p),r=p-s-1;s=p,u=0}else d===46&&u!==-1?++u:u=-1}return n}function a(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+t+r:r}var l={resolve:function(){for(var t="",e=!1,n,r=arguments.length-1;r>=-1&&!e;r--){var s;r>=0?s=arguments[r]:(n===void 0&&(n=i.cwd()),s=n),h(s),s.length!==0&&(t=s+"/"+t,e=s.charCodeAt(0)===47)}return t=o(t,!e),e?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(h(t),t.length===0)return".";var e=t.charCodeAt(0)===47,n=t.charCodeAt(t.length-1)===47;return t=o(t,!e),t.length===0&&!e&&(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return h(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];h(n),n.length>0&&(t===void 0?t=n:t+="/"+n)}return t===void 0?".":l.normalize(t)},relative:function(t,e){if(h(t),h(e),t===e||(t=l.resolve(t),e=l.resolve(e),t===e))return"";for(var n=1;n<t.length&&t.charCodeAt(n)===47;++n);for(var r=t.length,s=r-n,u=1;u<e.length&&e.charCodeAt(u)===47;++u);for(var d=e.length,p=d-u,g=s<p?s:p,f=-1,b=0;b<=g;++b){if(b===g){if(p>g){if(e.charCodeAt(u+b)===47)return e.slice(u+b+1);if(b===0)return e.slice(u+b)}else s>g&&(t.charCodeAt(n+b)===47?f=b:b===0&&(f=0));break}var y=t.charCodeAt(n+b),_=e.charCodeAt(u+b);if(y!==_)break;y===47&&(f=b)}var A="";for(b=n+f+1;b<=r;++b)(b===r||t.charCodeAt(b)===47)&&(A.length===0?A+="..":A+="/..");return A.length>0?A+e.slice(u+f):(u+=f,e.charCodeAt(u)===47&&++u,e.slice(u))},_makeLong:function(t){return t},dirname:function(t){if(h(t),t.length===0)return".";for(var e=t.charCodeAt(0),n=e===47,r=-1,s=!0,u=t.length-1;u>=1;--u)if(e=t.charCodeAt(u),e===47){if(!s){r=u;break}}else s=!1;return r===-1?n?"/":".":n&&r===1?"//":t.slice(0,r)},basename:function(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');h(t);var n=0,r=-1,s=!0,u;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var d=e.length-1,p=-1;for(u=t.length-1;u>=0;--u){var g=t.charCodeAt(u);if(g===47){if(!s){n=u+1;break}}else p===-1&&(s=!1,p=u+1),d>=0&&(g===e.charCodeAt(d)?--d===-1&&(r=u):(d=-1,r=p))}return n===r?r=p:r===-1&&(r=t.length),t.slice(n,r)}else{for(u=t.length-1;u>=0;--u)if(t.charCodeAt(u)===47){if(!s){n=u+1;break}}else r===-1&&(s=!1,r=u+1);return r===-1?"":t.slice(n,r)}},extname:function(t){h(t);for(var e=-1,n=0,r=-1,s=!0,u=0,d=t.length-1;d>=0;--d){var p=t.charCodeAt(d);if(p===47){if(!s){n=d+1;break}continue}r===-1&&(s=!1,r=d+1),p===46?e===-1?e=d:u!==1&&(u=1):e!==-1&&(u=-1)}return e===-1||r===-1||u===0||u===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return a("/",t)},parse:function(t){h(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;var n=t.charCodeAt(0),r=n===47,s;r?(e.root="/",s=1):s=0;for(var u=-1,d=0,p=-1,g=!0,f=t.length-1,b=0;f>=s;--f){if(n=t.charCodeAt(f),n===47){if(!g){d=f+1;break}continue}p===-1&&(g=!1,p=f+1),n===46?u===-1?u=f:b!==1&&(b=1):u!==-1&&(b=-1)}return u===-1||p===-1||b===0||b===1&&u===p-1&&u===d+1?p!==-1&&(d===0&&r?e.base=e.name=t.slice(1,p):e.base=e.name=t.slice(d,p)):(d===0&&r?(e.name=t.slice(1,u),e.base=t.slice(1,p)):(e.name=t.slice(d,u),e.base=t.slice(d,p)),e.ext=t.slice(u,p)),d>0?e.dir=t.slice(0,d-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};return l.posix=l,hr=l,hr}function bu(i){if(typeof i=="string")i=new URL(i);else if(!(i instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(i.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return fr?yu(i):wu(i)}function yu(i){let h=i.hostname,o=i.pathname;for(let a=0;a<o.length;a++)if(o[a]==="%"){let l=o.codePointAt(a+2)||32;if(o[a+1]==="2"&&l===102||o[a+1]==="5"&&l===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(o=o.replace(rs,"\\"),o=decodeURIComponent(o),h!=="")return`\\\\${h}${o}`;{let a=o.codePointAt(1)|32,l=o[2];if(a<es||a>ts||l!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return o.slice(1)}}function wu(i){if(i.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let h=i.pathname;for(let o=0;o<h.length;o++)if(h[o]==="%"){let a=h.codePointAt(o+2)||32;if(h[o+1]==="2"&&a===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(h)}function vu(i){let h=ti.resolve(i),o=i.charCodeAt(i.length-1);(o===Xo||fr&&o===Zo)&&h[h.length-1]!==ti.sep&&(h+="/");let a=new URL("file://");return h.includes("%")&&(h=h.replace(ns,"%25")),!fr&&h.includes("\\")&&(h=h.replace(is,"%5C")),h.includes(`
4
- `)&&(h=h.replace(os,"%0A")),h.includes("\r")&&(h=h.replace(ss,"%0D")),h.includes(" ")&&(h=h.replace(as,"%09")),a.pathname=h,a}function Vo(i){if(typeof i=="string")i=new URL(i);else if(!(i instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(i.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return dr?_u(i):Eu(i)}function _u(i){let h=i.hostname,o=i.pathname;for(let a=0;a<o.length;a++)if(o[a]==="%"){let l=o.codePointAt(a+2)||32;if(o[a+1]==="2"&&l===102||o[a+1]==="5"&&l===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(o=o.replace(ys,"\\"),o=decodeURIComponent(o),h!=="")return`\\\\${h}${o}`;{let a=o.codePointAt(1)|32,l=o[2];if(a<As||a>bs||l!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return o.slice(1)}}function Eu(i){if(i.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let h=i.pathname;for(let o=0;o<h.length;o++)if(h[o]==="%"){let a=h.codePointAt(o+2)||32;if(h[o+1]==="2"&&a===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(h)}function Qo(i){let h=Yn.resolve(i),o=i.charCodeAt(i.length-1);(o===ms||dr&&o===gs)&&h[h.length-1]!==Yn.sep&&(h+="/");let a=new URL("file://");return h.includes("%")&&(h=h.replace(ws,"%25")),!dr&&h.includes("\\")&&(h=h.replace(vs,"%5C")),h.includes(`
5
- `)&&(h=h.replace(_s,"%0A")),h.includes("\r")&&(h=h.replace(Es,"%0D")),h.includes(" ")&&(h=h.replace(Ss,"%09")),a.pathname=h,a}var xe,Ko,Ze,Ho,qo,$o,zo,lr,Jn,Zn,Xn,Go,Yo,ur,Ot,cr,hr,ei,ti,Jo,Zo,Xo,es,ts,fr,rs,ns,is,os,ss,as,ls,us,cs,hs,fs,ds,ps,gs,ms,As,bs,dr,ys,ws,vs,_s,Es,Ss,Su=He(()=>{oe(),ae(),se(),uu(),hu(),du(),mu(),jo(),xe={},Ko=At,Ze={isString:function(i){return typeof i=="string"},isObject:function(i){return typeof i=="object"&&i!==null},isNull:function(i){return i===null},isNullOrUndefined:function(i){return i==null}},xe.parse=Ht,xe.resolve=function(i,h){return Ht(i,!1,!0).resolve(h)},xe.resolveObject=function(i,h){return i?Ht(i,!1,!0).resolveObject(h):h},xe.format=function(i){return Ze.isString(i)&&(i=Ht(i)),i instanceof Ge?i.format():Ge.prototype.format.call(i)},xe.Url=Ge,Ho=/^([a-z0-9.+-]+:)/i,qo=/:[0-9]*$/,$o=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,zo=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
6
- `," "]),lr=["'"].concat(zo),Jn=["%","/","?",";","#"].concat(lr),Zn=["/","?","#"],Xn=/^[+a-z0-9A-Z_-]{0,63}$/,Go=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Yo={javascript:!0,"javascript:":!0},ur={javascript:!0,"javascript:":!0},Ot={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},cr=et,Ge.prototype.parse=function(i,h,o){if(!Ze.isString(i))throw new TypeError("Parameter 'url' must be a string, not "+typeof i);var a=i.indexOf("?"),l=a!==-1&&a<i.indexOf("#")?"?":"#",t=i.split(l);t[0]=t[0].replace(/\\/g,"/");var e=i=t.join(l);if(e=e.trim(),!o&&i.split("#").length===1){var n=$o.exec(e);if(n)return this.path=e,this.href=e,this.pathname=n[1],n[2]?(this.search=n[2],this.query=h?cr.parse(this.search.substr(1)):this.search.substr(1)):h&&(this.search="",this.query={}),this}var r=Ho.exec(e);if(r){var s=(r=r[0]).toLowerCase();this.protocol=s,e=e.substr(r.length)}if(o||r||e.match(/^\/\/[^@\/]+@[^@\/]+/)){var u=e.substr(0,2)==="//";!u||r&&ur[r]||(e=e.substr(2),this.slashes=!0)}if(!ur[r]&&(u||r&&!Ot[r])){for(var d,p,g=-1,f=0;f<Zn.length;f++)(b=e.indexOf(Zn[f]))!==-1&&(g===-1||b<g)&&(g=b);for((p=g===-1?e.lastIndexOf("@"):e.lastIndexOf("@",g))!==-1&&(d=e.slice(0,p),e=e.slice(p+1),this.auth=decodeURIComponent(d)),g=-1,f=0;f<Jn.length;f++){var b;(b=e.indexOf(Jn[f]))!==-1&&(g===-1||b<g)&&(g=b)}g===-1&&(g=e.length),this.host=e.slice(0,g),e=e.slice(g),this.parseHost(),this.hostname=this.hostname||"";var y=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!y)for(var _=this.hostname.split(/\./),A=(f=0,_.length);f<A;f++){var w=_[f];if(w&&!w.match(Xn)){for(var I="",k=0,E=w.length;k<E;k++)w.charCodeAt(k)>127?I+="x":I+=w[k];if(!I.match(Xn)){var T=_.slice(0,f),O=_.slice(f+1),H=w.match(Go);H&&(T.push(H[1]),O.unshift(H[2])),O.length&&(e="/"+O.join(".")+e),this.hostname=T.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=Ko.toASCII(this.hostname));var G=this.port?":"+this.port:"",de=this.hostname||"";this.host=de+G,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),e[0]!=="/"&&(e="/"+e))}if(!Yo[s])for(f=0,A=lr.length;f<A;f++){var U=lr[f];if(e.indexOf(U)!==-1){var $=encodeURIComponent(U);$===U&&($=escape(U)),e=e.split(U).join($)}}var z=e.indexOf("#");z!==-1&&(this.hash=e.substr(z),e=e.slice(0,z));var F=e.indexOf("?");if(F!==-1?(this.search=e.substr(F),this.query=e.substr(F+1),h&&(this.query=cr.parse(this.query)),e=e.slice(0,F)):h&&(this.search="",this.query={}),e&&(this.pathname=e),Ot[s]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){G=this.pathname||"";var me=this.search||"";this.path=G+me}return this.href=this.format(),this},Ge.prototype.format=function(){var i=this.auth||"";i&&(i=(i=encodeURIComponent(i)).replace(/%3A/i,":"),i+="@");var h=this.protocol||"",o=this.pathname||"",a=this.hash||"",l=!1,t="";this.host?l=i+this.host:this.hostname&&(l=i+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(l+=":"+this.port)),this.query&&Ze.isObject(this.query)&&Object.keys(this.query).length&&(t=cr.stringify(this.query));var e=this.search||t&&"?"+t||"";return h&&h.substr(-1)!==":"&&(h+=":"),this.slashes||(!h||Ot[h])&&l!==!1?(l="//"+(l||""),o&&o.charAt(0)!=="/"&&(o="/"+o)):l||(l=""),a&&a.charAt(0)!=="#"&&(a="#"+a),e&&e.charAt(0)!=="?"&&(e="?"+e),h+l+(o=o.replace(/[?#]/g,function(n){return encodeURIComponent(n)}))+(e=e.replace("#","%23"))+a},Ge.prototype.resolve=function(i){return this.resolveObject(Ht(i,!1,!0)).format()},Ge.prototype.resolveObject=function(i){if(Ze.isString(i)){var h=new Ge;h.parse(i,!1,!0),i=h}for(var o=new Ge,a=Object.keys(this),l=0;l<a.length;l++){var t=a[l];o[t]=this[t]}if(o.hash=i.hash,i.href==="")return o.href=o.format(),o;if(i.slashes&&!i.protocol){for(var e=Object.keys(i),n=0;n<e.length;n++){var r=e[n];r!=="protocol"&&(o[r]=i[r])}return Ot[o.protocol]&&o.hostname&&!o.pathname&&(o.path=o.pathname="/"),o.href=o.format(),o}if(i.protocol&&i.protocol!==o.protocol){if(!Ot[i.protocol]){for(var s=Object.keys(i),u=0;u<s.length;u++){var d=s[u];o[d]=i[d]}return o.href=o.format(),o}if(o.protocol=i.protocol,i.host||ur[i.protocol])o.pathname=i.pathname;else{for(var p=(i.pathname||"").split("/");p.length&&!(i.host=p.shift()););i.host||(i.host=""),i.hostname||(i.hostname=""),p[0]!==""&&p.unshift(""),p.length<2&&p.unshift(""),o.pathname=p.join("/")}if(o.search=i.search,o.query=i.query,o.host=i.host||"",o.auth=i.auth,o.hostname=i.hostname||i.host,o.port=i.port,o.pathname||o.search){var g=o.pathname||"",f=o.search||"";o.path=g+f}return o.slashes=o.slashes||i.slashes,o.href=o.format(),o}var b=o.pathname&&o.pathname.charAt(0)==="/",y=i.host||i.pathname&&i.pathname.charAt(0)==="/",_=y||b||o.host&&i.pathname,A=_,w=o.pathname&&o.pathname.split("/")||[],I=(p=i.pathname&&i.pathname.split("/")||[],o.protocol&&!Ot[o.protocol]);if(I&&(o.hostname="",o.port=null,o.host&&(w[0]===""?w[0]=o.host:w.unshift(o.host)),o.host="",i.protocol&&(i.hostname=null,i.port=null,i.host&&(p[0]===""?p[0]=i.host:p.unshift(i.host)),i.host=null),_=_&&(p[0]===""||w[0]==="")),y)o.host=i.host||i.host===""?i.host:o.host,o.hostname=i.hostname||i.hostname===""?i.hostname:o.hostname,o.search=i.search,o.query=i.query,w=p;else if(p.length)w||(w=[]),w.pop(),w=w.concat(p),o.search=i.search,o.query=i.query;else if(!Ze.isNullOrUndefined(i.search))return I&&(o.hostname=o.host=w.shift(),(H=!!(o.host&&o.host.indexOf("@")>0)&&o.host.split("@"))&&(o.auth=H.shift(),o.host=o.hostname=H.shift())),o.search=i.search,o.query=i.query,Ze.isNull(o.pathname)&&Ze.isNull(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.href=o.format(),o;if(!w.length)return o.pathname=null,o.search?o.path="/"+o.search:o.path=null,o.href=o.format(),o;for(var k=w.slice(-1)[0],E=(o.host||i.host||w.length>1)&&(k==="."||k==="..")||k==="",T=0,O=w.length;O>=0;O--)(k=w[O])==="."?w.splice(O,1):k===".."?(w.splice(O,1),T++):T&&(w.splice(O,1),T--);if(!_&&!A)for(;T--;T)w.unshift("..");!_||w[0]===""||w[0]&&w[0].charAt(0)==="/"||w.unshift(""),E&&w.join("/").substr(-1)!=="/"&&w.push("");var H,G=w[0]===""||w[0]&&w[0].charAt(0)==="/";return I&&(o.hostname=o.host=G?"":w.length?w.shift():"",(H=!!(o.host&&o.host.indexOf("@")>0)&&o.host.split("@"))&&(o.auth=H.shift(),o.host=o.hostname=H.shift())),(_=_||o.host&&w.length)&&!G&&w.unshift(""),w.length?o.pathname=w.join("/"):(o.pathname=null,o.path=null),Ze.isNull(o.pathname)&&Ze.isNull(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.auth=i.auth||o.auth,o.slashes=o.slashes||i.slashes,o.href=o.format(),o},Ge.prototype.parseHost=function(){var i=this.host,h=qo.exec(i);h&&((h=h[0])!==":"&&(this.port=h.substr(1)),i=i.substr(0,i.length-h.length)),i&&(this.hostname=i)},xe.Url,xe.format,xe.resolve,xe.resolveObject,hr={},ei=!1,ti=Au(),Jo=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,xe.URL=typeof URL<"u"?URL:null,xe.pathToFileURL=vu,xe.fileURLToPath=bu,xe.Url,xe.format,xe.resolve,xe.resolveObject,xe.URL,Zo=92,Xo=47,es=97,ts=122,fr=Jo==="win32",rs=/\//g,ns=/%/g,is=/\\/g,os=/\n/g,ss=/\r/g,as=/\t/g,ls=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,xe.URL=typeof URL<"u"?URL:null,xe.pathToFileURL=Qo,xe.fileURLToPath=Vo,us=xe.Url,cs=xe.format,hs=xe.resolve,fs=xe.resolveObject,ds=xe.parse,ps=xe.URL,gs=92,ms=47,As=97,bs=122,dr=ls==="win32",ys=/\//g,ws=/%/g,vs=/\\/g,_s=/\n/g,Es=/\r/g,Ss=/\t/g}),Cu=fe((i,h)=>{oe(),ae(),se(),h.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}),ri=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0}),i.BufferedDuplex=void 0,i.writev=a;var h=St(),o=(Ve(),Be(We));function a(t,e){let n=new Array(t.length);for(let r=0;r<t.length;r++)typeof t[r].chunk=="string"?n[r]=o.Buffer.from(t[r].chunk,"utf8"):n[r]=t[r].chunk;this._write(o.Buffer.concat(n),"binary",e)}var l=class extends h.Duplex{constructor(t,e,n){super({objectMode:!0}),this.proxy=e,this.socket=n,this.writeQueue=[],t.objectMode||(this._writev=a.bind(this)),this.isSocketOpen=!1,this.proxy.on("data",r=>{!this.destroyed&&this.readable&&this.push(r)})}_read(t){this.proxy.read(t)}_write(t,e,n){this.isSocketOpen?this.writeToProxy(t,e,n):this.writeQueue.push({chunk:t,encoding:e,cb:n})}_final(t){this.writeQueue=[],this.proxy.end(t)}_destroy(t,e){this.writeQueue=[],this.proxy.destroy(),e(t)}socketReady(){this.emit("connect"),this.isSocketOpen=!0,this.processWriteQueue()}writeToProxy(t,e,n){this.proxy.write(t,e)===!1?this.proxy.once("drain",n):n()}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:t,encoding:e,cb:n}=this.writeQueue.shift();this.writeToProxy(t,e,n)}}};i.BufferedDuplex=l}),pr=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(i,"__esModule",{value:!0}),i.streamBuilder=i.browserStreamBuilder=void 0;var o=(Ve(),Be(We)),a=h(Cu()),l=h(at()),t=St(),e=h(ir()),n=ri(),r=(0,l.default)("mqttjs:ws"),s=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];function u(_,A){let w=`${_.protocol}://${_.hostname}:${_.port}${_.path}`;return typeof _.transformWsUrl=="function"&&(w=_.transformWsUrl(w,_,A)),w}function d(_){let A=_;return _.port||(_.protocol==="wss"?A.port=443:A.port=80),_.path||(A.path="/"),_.wsOptions||(A.wsOptions={}),!e.default&&!_.forceNativeWebSocket&&_.protocol==="wss"&&s.forEach(w=>{Object.prototype.hasOwnProperty.call(_,w)&&!Object.prototype.hasOwnProperty.call(_.wsOptions,w)&&(A.wsOptions[w]=_[w])}),A}function p(_){let A=d(_);if(A.hostname||(A.hostname=A.host),!A.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let w=new URL(document.URL);A.hostname=w.hostname,A.port||(A.port=Number(w.port))}return A.objectMode===void 0&&(A.objectMode=!(A.binary===!0||A.binary===void 0)),A}function g(_,A,w){r("createWebSocket"),r(`protocol: ${w.protocolId} ${w.protocolVersion}`);let I=w.protocolId==="MQIsdp"&&w.protocolVersion===3?"mqttv3.1":"mqtt";r(`creating new Websocket for url: ${A} and protocol: ${I}`);let k;return w.createWebsocket?k=w.createWebsocket(A,[I],w):k=new a.default(A,[I],w.wsOptions),k}function f(_,A){let w=A.protocolId==="MQIsdp"&&A.protocolVersion===3?"mqttv3.1":"mqtt",I=u(A,_),k;return A.createWebsocket?k=A.createWebsocket(I,[w],A):k=new WebSocket(I,[w]),k.binaryType="arraybuffer",k}var b=(_,A)=>{r("streamBuilder");let w=d(A);w.hostname=w.hostname||w.host||"localhost";let I=u(w,_),k=g(_,I,w),E=a.default.createWebSocketStream(k,w.wsOptions);return E.url=I,k.on("close",()=>{E.destroy()}),E};i.streamBuilder=b;var y=(_,A)=>{r("browserStreamBuilder");let w,I=p(A).browserBufferSize||1024*512,k=A.browserBufferTimeout||1e3,E=!A.objectMode,T=f(_,A),O=G(A,F,me);A.objectMode||(O._writev=n.writev.bind(O)),O.on("close",()=>{T.close()});let H=typeof T.addEventListener<"u";T.readyState===T.OPEN?(w=O,w.socket=T):(w=new n.BufferedDuplex(A,O,T),H?T.addEventListener("open",de):T.onopen=de),H?(T.addEventListener("close",U),T.addEventListener("error",$),T.addEventListener("message",z)):(T.onclose=U,T.onerror=$,T.onmessage=z);function G(le,pe,we){let Q=new t.Transform({objectMode:le.objectMode});return Q._write=pe,Q._flush=we,Q}function de(){r("WebSocket onOpen"),w instanceof n.BufferedDuplex&&w.socketReady()}function U(le){r("WebSocket onClose",le),w.end(),w.destroy()}function $(le){r("WebSocket onError",le);let pe=new Error("WebSocket error");pe.event=le,w.destroy(pe)}async function z(le){if(!O||O.destroyed||!O.readable)return;let{data:pe}=le;pe instanceof ArrayBuffer?pe=o.Buffer.from(pe):pe instanceof Blob?pe=o.Buffer.from(await new Response(pe).arrayBuffer()):pe=o.Buffer.from(pe,"utf8"),O.push(pe)}function F(le,pe,we){if(T.bufferedAmount>I){setTimeout(F,k,le,pe,we);return}E&&typeof le=="string"&&(le=o.Buffer.from(le,"utf8"));try{T.send(le)}catch(Q){return we(Q)}we()}function me(le){T.close(),le()}return w};i.browserStreamBuilder=y}),ni={};Rt(ni,{Server:()=>Me,Socket:()=>Me,Stream:()=>Me,_createServerHandle:()=>Me,_normalizeArgs:()=>Me,_setSimultaneousAccepts:()=>Me,connect:()=>Me,createConnection:()=>Me,createServer:()=>Me,default:()=>Cs,isIP:()=>Me,isIPv4:()=>Me,isIPv6:()=>Me});function Me(){throw new Error("Node.js net module is not supported by JSPM core outside of Node.js")}var Cs,ks=He(()=>{oe(),ae(),se(),Cs={_createServerHandle:Me,_normalizeArgs:Me,_setSimultaneousAccepts:Me,connect:Me,createConnection:Me,createServer:Me,isIP:Me,isIPv4:Me,isIPv6:Me,Server:Me,Socket:Me,Stream:Me}}),Ts=fe((i,h)=>{oe(),ae(),se(),h.exports={}}),Is=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(i,"__esModule",{value:!0});var o=h((ks(),Be(ni))),a=h(at()),l=h(Ts()),t=(0,a.default)("mqttjs:tcp"),e=(n,r)=>{if(r.port=r.port||1883,r.hostname=r.hostname||r.host||"localhost",r.socksProxy)return(0,l.default)(r.hostname,r.port,r.socksProxy,{timeout:r.socksTimeout});let{port:s,path:u}=r,d=r.hostname;return t("port %d and host %s",s,d),o.default.createConnection({port:s,host:d,path:u})};i.default=e}),Bs={};Rt(Bs,{default:()=>Os});var Os,ku=He(()=>{oe(),ae(),se(),Os={}}),xs=fe(i=>{oe(),ae(),se();var h=i&&i.__rest||function(u,d){var p={};for(var g in u)Object.prototype.hasOwnProperty.call(u,g)&&d.indexOf(g)<0&&(p[g]=u[g]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,g=Object.getOwnPropertySymbols(u);f<g.length;f++)d.indexOf(g[f])<0&&Object.prototype.propertyIsEnumerable.call(u,g[f])&&(p[g[f]]=u[g[f]]);return p},o=i&&i.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(i,"__esModule",{value:!0});var a=o((ku(),Be(Bs))),l=o((ks(),Be(ni))),t=o(at()),e=o(Ts()),n=(0,t.default)("mqttjs:tls");function r(u){let{host:d,port:p,socksProxy:g}=u,f=h(u,["host","port","socksProxy"]);return a.default.connect(g?Object.assign(Object.assign({},f),{socket:(0,e.default)(d,p,g,{timeout:u.socksTimeout})}):u)}var s=(u,d)=>{d.port=d.port||8883,d.host=d.hostname||d.host||"localhost",l.default.isIP(d.host)===0&&(d.servername=d.host),d.rejectUnauthorized=d.rejectUnauthorized!==!1,delete d.path,n("port %d host %s rejectUnauthorized %b",d.port,d.host,d.rejectUnauthorized);let p=r(d);p.on("secureConnect",()=>{d.rejectUnauthorized&&!p.authorized?p.emit("error",new Error("TLS not authorized")):p.removeListener("error",g)});function g(f){d.rejectUnauthorized&&u.emit("error",f),p.end()}return p.on("error",g),p};i.default=s}),Ps=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=(Ve(),Be(We)),o=St(),a=ri(),l,t,e;function n(){let p=new o.Transform;return p._write=(g,f,b)=>{l.send({data:g.buffer,success(){b()},fail(y){b(new Error(y))}})},p._flush=g=>{l.close({success(){g()}})},p}function r(p){p.hostname||(p.hostname="localhost"),p.path||(p.path="/"),p.wsOptions||(p.wsOptions={})}function s(p,g){let f=p.protocol==="wxs"?"wss":"ws",b=`${f}://${p.hostname}${p.path}`;return p.port&&p.port!==80&&p.port!==443&&(b=`${f}://${p.hostname}:${p.port}${p.path}`),typeof p.transformWsUrl=="function"&&(b=p.transformWsUrl(b,p,g)),b}function u(){l.onOpen(()=>{e.socketReady()}),l.onMessage(p=>{let{data:g}=p;g instanceof ArrayBuffer?g=h.Buffer.from(g):g=h.Buffer.from(g,"utf8"),t.push(g)}),l.onClose(()=>{e.emit("close"),e.end(),e.destroy()}),l.onError(p=>{let g=new Error(p.errMsg);e.destroy(g)})}var d=(p,g)=>{if(g.hostname=g.hostname||g.host,!g.hostname)throw new Error("Could not determine host. Specify host manually.");let f=g.protocolId==="MQIsdp"&&g.protocolVersion===3?"mqttv3.1":"mqtt";r(g);let b=s(g,p);l=wx.connectSocket({url:b,protocols:[f]}),t=n(),e=new a.BufferedDuplex(g,t,l),e._destroy=(_,A)=>{l.close({success(){A&&A(_)}})};let y=e.destroy;return e.destroy=(_,A)=>(e.destroy=y,setTimeout(()=>{l.close({fail(){e._destroy(_,A)}})},0),e),u(),e};i.default=d}),Rs=fe(i=>{oe(),ae(),se(),Object.defineProperty(i,"__esModule",{value:!0});var h=(Ve(),Be(We)),o=St(),a=ri(),l,t,e,n=!1;function r(){let g=new o.Transform;return g._write=(f,b,y)=>{l.sendSocketMessage({data:f.buffer,success(){y()},fail(){y(new Error)}})},g._flush=f=>{l.closeSocket({success(){f()}})},g}function s(g){g.hostname||(g.hostname="localhost"),g.path||(g.path="/"),g.wsOptions||(g.wsOptions={})}function u(g,f){let b=g.protocol==="alis"?"wss":"ws",y=`${b}://${g.hostname}${g.path}`;return g.port&&g.port!==80&&g.port!==443&&(y=`${b}://${g.hostname}:${g.port}${g.path}`),typeof g.transformWsUrl=="function"&&(y=g.transformWsUrl(y,g,f)),y}function d(){n||(n=!0,l.onSocketOpen(()=>{e.socketReady()}),l.onSocketMessage(g=>{if(typeof g.data=="string"){let f=h.Buffer.from(g.data,"base64");t.push(f)}else{let f=new FileReader;f.addEventListener("load",()=>{let b=f.result;b instanceof ArrayBuffer?b=h.Buffer.from(b):b=h.Buffer.from(b,"utf8"),t.push(b)}),f.readAsArrayBuffer(g.data)}}),l.onSocketClose(()=>{e.end(),e.destroy()}),l.onSocketError(g=>{e.destroy(g)}))}var p=(g,f)=>{if(f.hostname=f.hostname||f.host,!f.hostname)throw new Error("Could not determine host. Specify host manually.");let b=f.protocolId==="MQIsdp"&&f.protocolVersion===3?"mqttv3.1":"mqtt";s(f);let y=u(f,g);return l=f.my,l.connectSocket({url:y,protocols:b}),t=r(),e=new a.BufferedDuplex(f,t,l),d(),e};i.default=p}),Tu=fe(i=>{oe(),ae(),se();var h=i&&i.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(i,"__esModule",{value:!0}),i.connectAsync=u;var o=h(at()),a=h((Su(),Be(Wo))),l=h(Wn()),t=h(ir());typeof ke?.nextTick!="function"&&(ke.nextTick=setImmediate);var e=(0,o.default)("mqttjs"),n=null;function r(d){let p;d.auth&&(p=d.auth.match(/^(.+):(.+)$/),p?(d.username=p[1],d.password=p[2]):d.username=d.auth)}function s(d,p){var g,f,b;if(e("connecting to an MQTT broker..."),typeof d=="object"&&!p&&(p=d,d=""),p=p||{},d&&typeof d=="string"){let A=a.default.parse(d,!0),w={};if(A.port!=null&&(w.port=Number(A.port)),w.host=A.hostname,w.query=A.query,w.auth=A.auth,w.protocol=A.protocol,w.path=A.path,p=Object.assign(Object.assign({},w),p),!p.protocol)throw new Error("Missing protocol");p.protocol=p.protocol.replace(/:$/,"")}if(p.unixSocket=p.unixSocket||((g=p.protocol)===null||g===void 0?void 0:g.includes("+unix")),p.unixSocket?p.protocol=p.protocol.replace("+unix",""):!(!((f=p.protocol)===null||f===void 0)&&f.startsWith("ws"))&&!(!((b=p.protocol)===null||b===void 0)&&b.startsWith("wx"))&&delete p.path,r(p),p.query&&typeof p.query.clientId=="string"&&(p.clientId=p.query.clientId),t.default||p.unixSocket?p.socksProxy=void 0:p.socksProxy===void 0&&typeof ke<"u"&&(p.socksProxy=ke.env.MQTTJS_SOCKS_PROXY),p.cert&&p.key)if(p.protocol){if(["mqtts","wss","wxs","alis"].indexOf(p.protocol)===-1)switch(p.protocol){case"mqtt":p.protocol="mqtts";break;case"ws":p.protocol="wss";break;case"wx":p.protocol="wxs";break;case"ali":p.protocol="alis";break;default:throw new Error(`Unknown protocol for secure connection: "${p.protocol}"!`)}}else throw new Error("Missing secure protocol key");if(n||(n={},!t.default&&!p.forceNativeWebSocket?(n.ws=pr().streamBuilder,n.wss=pr().streamBuilder,n.mqtt=Is().default,n.tcp=Is().default,n.ssl=xs().default,n.tls=n.ssl,n.mqtts=xs().default):(n.ws=pr().browserStreamBuilder,n.wss=pr().browserStreamBuilder,n.wx=Ps().default,n.wxs=Ps().default,n.ali=Rs().default,n.alis=Rs().default)),!n[p.protocol]){let A=["mqtts","wss"].indexOf(p.protocol)!==-1;p.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((w,I)=>A&&I%2===0?!1:typeof n[w]=="function")[0]}if(p.clean===!1&&!p.clientId)throw new Error("Missing clientId for unclean clients");p.protocol&&(p.defaultProtocol=p.protocol);function y(A){return p.servers&&((!A._reconnectCount||A._reconnectCount===p.servers.length)&&(A._reconnectCount=0),p.host=p.servers[A._reconnectCount].host,p.port=p.servers[A._reconnectCount].port,p.protocol=p.servers[A._reconnectCount].protocol?p.servers[A._reconnectCount].protocol:p.defaultProtocol,p.hostname=p.host,A._reconnectCount++),e("calling streambuilder for",p.protocol),n[p.protocol](A,p)}let _=new l.default(y,p);return _.on("error",()=>{}),_}function u(d,p,g=!0){return new Promise((f,b)=>{let y=s(d,p),_={connect:w=>{A(),f(y)},end:()=>{A(),f(y)},error:w=>{A(),y.end(),b(w)}};g===!1&&(_.close=()=>{_.error(new Error("Couldn't connect to server"))});function A(){Object.keys(_).forEach(w=>{y.off(w,_[w])})}Object.keys(_).forEach(w=>{y.on(w,_[w])})})}i.default=s}),Ms=fe(i=>{oe(),ae(),se();var h=i&&i.__createBinding||(Object.create?function(g,f,b,y){y===void 0&&(y=b);var _=Object.getOwnPropertyDescriptor(f,b);(!_||("get"in _?!f.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return f[b]}}),Object.defineProperty(g,y,_)}:function(g,f,b,y){y===void 0&&(y=b),g[y]=f[b]}),o=i&&i.__setModuleDefault||(Object.create?function(g,f){Object.defineProperty(g,"default",{enumerable:!0,value:f})}:function(g,f){g.default=f}),a=i&&i.__importStar||(function(){var g=function(f){return g=Object.getOwnPropertyNames||function(b){var y=[];for(var _ in b)Object.prototype.hasOwnProperty.call(b,_)&&(y[y.length]=_);return y},g(f)};return function(f){if(f&&f.__esModule)return f;var b={};if(f!=null)for(var y=g(f),_=0;_<y.length;_++)y[_]!=="default"&&h(b,f,y[_]);return o(b,f),b}})(),l=i&&i.__exportStar||function(g,f){for(var b in g)b!=="default"&&!Object.prototype.hasOwnProperty.call(f,b)&&h(f,g,b)},t=i&&i.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(i,"__esModule",{value:!0}),i.ReasonCodes=i.KeepaliveManager=i.UniqueMessageIdProvider=i.DefaultMessageIdProvider=i.Store=i.MqttClient=i.connectAsync=i.connect=i.Client=void 0;var e=t(Wn());i.MqttClient=e.default;var n=t(yo());i.DefaultMessageIdProvider=n.default;var r=t(lu());i.UniqueMessageIdProvider=r.default;var s=t(wo());i.Store=s.default;var u=a(Tu());i.connect=u.default,Object.defineProperty(i,"connectAsync",{enumerable:!0,get:function(){return u.connectAsync}});var d=t(To());i.KeepaliveManager=d.default,i.Client=e.default,l(Wn(),i),l(Dt(),i);var p=nr();Object.defineProperty(i,"ReasonCodes",{enumerable:!0,get:function(){return p.ReasonCodes}})}),Iu=fe(i=>{oe(),ae(),se();var h=i&&i.__createBinding||(Object.create?function(e,n,r,s){s===void 0&&(s=r);var u=Object.getOwnPropertyDescriptor(n,r);(!u||("get"in u?!n.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(e,s,u)}:function(e,n,r,s){s===void 0&&(s=r),e[s]=n[r]}),o=i&&i.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),a=i&&i.__importStar||(function(){var e=function(n){return e=Object.getOwnPropertyNames||function(r){var s=[];for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&(s[s.length]=u);return s},e(n)};return function(n){if(n&&n.__esModule)return n;var r={};if(n!=null)for(var s=e(n),u=0;u<s.length;u++)s[u]!=="default"&&h(r,n,s[u]);return o(r,n),r}})(),l=i&&i.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&h(n,e,r)};Object.defineProperty(i,"__esModule",{value:!0});var t=a(Ms());i.default=t,l(Ms(),i)});const Bu=Iu();const Ou=async i=>{if(i.host&&i.port&&!await xu(i.host,i.port))return;const h=C.ref(),o=C.ref({});return C.onMounted(()=>{h.value=Bu.connect(i),i.topics||(i.topics=["#"]);for(const a of i.topics)h.value.subscribe(a,l=>{if(l)throw l});h.value.on("message",(a,l)=>{o.value[a]||(o.value[a]=[]),o.value[a].push(l.toString())})}),C.onUnmounted(()=>{h.value?.end()}),{messages:o}},xu=async(i,h)=>{try{const o=new AbortController,a=setTimeout(()=>o.abort(),2e3);try{return await fetch(`${i}:${h}`,{mode:"no-cors",signal:o.signal}),clearTimeout(a),!0}catch(l){if(clearTimeout(a),l instanceof DOMException&&l.name==="AbortError")return!1;const t=String(l);return!(t.includes("NetworkError")||t.includes("Failed to fetch")||t.includes("net::ERR_CONNECTION_REFUSED"))}}catch{return!1}};function Pu(i){i.component("ActionFooter",fi),i.component("BeamArrow",di),i.component("BeamBtn",pi),i.component("BeamDayDivider",gr),i.component("BeamFilter",gi),i.component("BeamFilterOption",bi),i.component("BeamHeading",yi),i.component("BeamMetadata",wi),i.component("BeamModal",vi),i.component("BeamModalOutlet",_i),i.component("BeamProgress",Ei),i.component("Confirm",Si),i.component("FixedTop",Ci),i.component("ItemCheck",vr),i.component("ItemCount",_r),i.component("ListAnchor",ki),i.component("ListItem",zt),i.component("ListView",Ti),i.component("Navbar",Ii),i.component("ScanInput",xi),i.component("SegmentedDisplay",Pi),i.component("SplitColumn",Ri),i.component("ToggleArrow",Mi)}Te.ActionFooter=fi,Te.BeamArrow=di,Te.BeamBtn=pi,Te.BeamDayDivider=gr,Te.BeamFilter=gi,Te.BeamFilterOption=bi,Te.BeamHeading=yi,Te.BeamMetadata=wi,Te.BeamModal=vi,Te.BeamModalOutlet=_i,Te.BeamProgress=Ei,Te.Confirm=Si,Te.FixedTop=Ci,Te.ItemCheck=vr,Te.ItemCount=_r,Te.ListAnchor=ki,Te.ListItem=zt,Te.ListView=Ti,Te.Navbar=Ii,Te.ScanInput=xi,Te.SegmentedDisplay=Pi,Te.SplitColumn=Ri,Te.ToggleArrow=Mi,Te.install=Pu,Te.useMqttStream=Ou,Object.defineProperty(Te,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(Pe,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],O):(Pe=typeof globalThis<"u"?globalThis:Pe||self,O(Pe["@stonecrop/beam"]={},Pe.Vue))})(this,(function(Pe,O){"use strict";var ui=document.createElement("style");ui.textContent=`@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap";.beam_action-footer[data-v-37933bd1]{margin-left:0;background:linear-gradient(180deg,transparent 0%,white 100%);color:var(--sc-primary-text-color);position:fixed;bottom:0;left:0;width:100%;padding:.625rem;text-align:center}.beam_metadata_arrow[data-v-2b1d7448]{align-self:center;flex-grow:1;position:relative;display:flex;align-items:center}.beam_metadata_arrow-body[data-v-2b1d7448]{width:100%;height:10px;background:#c4c4c4}.beam_metadata_arrow-head svg[data-v-2b1d7448]{width:20px;display:block}.beam_btn[data-v-bc768596]{font-size:.875rem;text-align:center;padding:.3125rem .75rem;border:1px solid var(--sc-btn-border);color:var(--sc-btn-label-color);background-color:var(--sc-btn-color);cursor:pointer;font-family:var(--sc-font-family)}.beam_btn[data-v-bc768596]:hover,.beam_btn[data-v-bc768596]:active{background-color:var(--sc-btn-hover)}.beam_btn a:link,.beam_btn a:visited,.beam_btn a:hover,.beam_btn a:active{text-decoration:none;color:var(--sc-btn-label-color)}.beam_day-divider[data-v-160cf6ef]{text-align:left;padding:1rem;background:var(--sc-cell-changed-color);border-bottom:1px solid var(--sc-row-border-color);box-sizing:border-box;margin-bottom:1rem;margin-left:calc(-1 * var(--sc-list-margin));margin-right:calc(-1 * var(--sc-list-margin))}.beam_day-divider h2[data-v-160cf6ef]{text-align:left;font-size:1rem;color:var(--sc-primary-text-color);margin:0;padding:0}.beam_day-divider[data-v-160cf6ef]:first-of-type{margin-top:0}.beam_filters[data-v-f8d60c9f]{background-color:var(--sc-primary-color);border-bottom:1px solid var(--sc-row-border-color);box-sizing:border-box;min-height:2em;overflow:visible;padding:.625rem;transition:all .2s ease-in-out}.beam_filters-heading[data-v-f8d60c9f]{align-items:center;background-color:var(--sc-primary-color);box-sizing:border-box;cursor:pointer;display:flex;font-size:1rem}.beam_filters-heading>h1[data-v-f8d60c9f]{font-size:1rem}.beam_filters-options[data-v-f8d60c9f]{display:flex;flex-direction:row;justify-content:flex-start;margin:1rem 0;padding:0 1rem;gap:1rem}@media(max-width:479px){.beam_filters-options[data-v-f8d60c9f]{flex-direction:column}}.beam_filter-option[data-v-ad8ee21c]{cursor:pointer;position:relative}.beam_filter-option-heading[data-v-ad8ee21c]{font-size:1rem!important;padding-bottom:.25rem}.beam_filter-option-select[data-v-ad8ee21c]{align-items:stretch;appearance:none;background-color:#fff;border:1px solid var(--sc-row-border-color);color:var(--sc-primary-text-color);display:flex;font-family:var(--sc-font-family);font-size:.8rem;font-weight:700;position:relative}label[data-v-ad8ee21c]{cursor:pointer;padding:.5rem}.beam_filter-arrow[data-v-ad8ee21c]{background:var(--sc-primary-color);color:var(--sc-primary-text-color);cursor:pointer;display:flex;align-items:center;width:5px;padding:.5rem .7rem}.beam_filter-label[data-v-ad8ee21c]{display:flex;align-items:center}svg[data-v-ad8ee21c]{fill:var(--sc-primary-text-color);width:5px;transform:rotate(90deg)}.beam_filter-select-menu[data-v-ad8ee21c]{background-color:#fff;border-top:none;border:1px solid var(--sc-row-border-color);box-sizing:border-box;left:0;list-style:none;margin:0;max-height:200px;overflow-y:scroll;padding:0rem;position:absolute;width:100%;z-index:100}.beam_filter-select-option[data-v-ad8ee21c]{font-size:.8rem;font-family:var(--sc-font-family);font-weight:700;color:var(--sc-primary-text-color);border-bottom:1px solid var(--sc-row-border-color);padding:.5rem}.beam_filter-select-option[data-v-ad8ee21c]:hover{background:var(--sc-primary-color)}.selected[data-v-ad8ee21c],.selected[data-v-ad8ee21c]:hover{background:var(--sc-row-border-color)}.beam_filter-container[data-v-ad8ee21c]{flex-grow:1;max-width:300px;width:50%}@media(max-width:479px){.beam_filter-container[data-v-ad8ee21c]{width:100%;max-width:100%}}.beam_header[data-v-5182a4d5]{border:1px solid transparent;text-align:left;font-size:1.125rem;color:var(--sc-primary-text-color);margin:0;padding:0;font-family:var(--sc-font-family)}.beam_metadata[data-v-80484331]{box-sizing:border-box;display:flex;flex-direction:column;max-height:100vh;color:var(--sc-primary-text-color);font-family:var(--sc-font-family)}.beam_metadata_content[data-v-80484331]{padding-top:10px}.beam_metadata_header[data-v-80484331]{display:flex;flex-direction:row;align-items:baseline;padding:0 30px;justify-content:space-between}.beam_metadata_count[data-v-80484331]{font-size:1.5rem}.beam_metadata_count p[data-v-80484331]{margin:0}.beam_metadata_header-order-num[data-v-80484331]{font-weight:700;font-size:1.5rem}.beam_metadata_block[data-v-80484331]{padding:0 30px;margin:10px 0}.beam_metadata_shipping[data-v-80484331]{display:flex;flex-direction:row;align-items:baseline;justify-content:space-between}.beam_metadata_shipping p[data-v-80484331]{line-height:1.5rem}@media screen and (max-width:600px){.beam_metadata_shipping[data-v-80484331]{flex-direction:column}}.beam_metadata_component_header[data-v-80484331]{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline}.beam_metadata_components[data-v-80484331]{overflow:scroll}hr[data-v-80484331]{display:block;height:1px;border:0;border-top:1px solid var(--sc-row-border-color);margin:1em 0;padding:0}.beam_metadata_heading{font-size:1.125rem;font-weight:700;margin:.625rem 0;color:var(--sc-primary-text-color)}.beam_modal[data-v-55f98302]{position:fixed;inset:0;background-color:#00000080;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:1000;text-align:center;padding:1.25rem}.beam_modal-confirm[data-v-5b430dca]{background:#fff;padding:1.25rem;width:80%;max-width:400px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.beam_modal-confirm button[data-v-5b430dca]{margin:.625rem}.beam_modal-confirm h2[data-v-5b430dca]{border-bottom:1px solid var(--sc-row-border-color);padding-bottom:.625rem;color:var(--sc-primary-text-color)}.fixed-top[data-v-a38a41d0]{position:sticky;top:0;left:0}.container[data-v-ad0dc7dc]{display:block;position:relative;padding-left:2.5ch;margin:0;margin-top:.5rem;cursor:pointer;font-size:2rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container input[data-v-ad0dc7dc]{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.checkmark[data-v-ad0dc7dc]{position:absolute;top:0;left:0;height:2rem;width:2rem;background-color:#eee;outline:2px solid transparent;border:1px solid var(--sc-highlight)}.container:hover input~.checkmark[data-v-ad0dc7dc]{background-color:#fff}.container input:checked~.checkmark[data-v-ad0dc7dc]{background-color:var(--sc-brand-secondary)}.checkmark[data-v-ad0dc7dc]:after{content:"";position:absolute;display:none}.container input:checked~.checkmark[data-v-ad0dc7dc]:after{display:block}.container .checkmark[data-v-ad0dc7dc]:after{left:25%;top:50%;width:.5rem;height:1rem;border:solid var(--sc-text-color);border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg) translate(-50%,-50%)}.beam_item-count[data-v-d4f676ed]{font-size:1.3125rem;color:var(--sc-primary-text-color)}.beam_item-count span[data-v-d4f676ed]{margin:0;padding:0;outline:none}.beam_list-anchor[data-v-7e3ecf0d]{text-decoration:none;outline:none;color:var(--sc-primary-text-color)}.beam_list-item[data-v-634dd647]{padding:.625rem;border-bottom:1px solid var(--sc-row-border-color);max-width:100%;box-sizing:border-box;display:flex;flex-flow:row nowrap;justify-content:space-between;gap:1.25rem;cursor:pointer;outline:2px solid transparent;outline-offset:-1px}.beam_list-item[data-v-634dd647]:focus{outline:2px solid var(--sc-focus-cell-outline);background-color:var(--sc-focus-cell-background)}.beam_list-text[data-v-634dd647]{width:80%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;flex-grow:1;font-size:.875rem;color:var(--sc-primary-text-color)}.beam_list-text label[data-v-634dd647],.beam_list-text p[data-v-634dd647]{overflow:hidden;text-overflow:ellipsis;width:100%;display:block}.beam_list-item label[data-v-634dd647]{display:block}.beam_list-item p[data-v-634dd647]{margin:0}.beam_list-view[data-v-d536b2a7]{font-family:var(--sc-font-family);list-style-type:none;margin-top:1px;margin-left:var(--sc-list-margin);margin-right:var(--sc-list-margin);padding:0}ul.beam_list-view[data-v-d536b2a7]:last-of-type{padding-bottom:2.5em}.beam_navbar[data-v-cfc4c14e]{padding:.625rem;background-color:var(--sc-primary-color);margin-left:0;min-height:2em;max-height:2em;color:var(--sc-primary-text-color);display:flex;flex-flow:row nowrap;align-content:center;justify-content:space-between;align-items:center;position:sticky;top:0;font-family:var(--sc-font-family);border-bottom:1px solid var(--sc-row-border-color)}.beam_navbar h1[data-v-cfc4c14e]{margin-left:.625rem}.segmented-display[data-v-1731e036]{width:100%;padding:1rem;box-sizing:border-box;display:flex;background:var(--sc-segmented-display-background);align-items:center;justify-content:flex-end}.segmented-display-output[data-v-1731e036]{text-align:right;font-family:Segment7,Arimo,sans-serif;font-weight:400;font-size:var(--sc-segemented-display-font-size);padding:0;margin:0;letter-spacing:.3rem;margin-bottom:-.7rem;color:var(--sc-segmented-display-color)}.two-column[data-v-3f65313d]{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline;gap:1rem}@media screen and (max-width:400px){.two-column[data-v-3f65313d]{flex-direction:column;gap:0}}.column[data-v-3f65313d]{flex-grow:1;width:50%}@media screen and (max-width:400px){.column[data-v-3f65313d]{width:100%}}.column-right[data-v-3f65313d]{text-align:right}@media screen and (max-width:400px){.column-right[data-v-3f65313d]{text-align:left}}svg[data-v-05e7abed]{width:100%;overflow:visible;fill:var(--sc-primary-text-color)}.arrow-icon[data-v-05e7abed]{width:.4rem;transform:rotate(0);transform-origin:center;position:relative;transition:all .1s ease-in-out;margin:.5rem;cursor:pointer;display:flex;align-items:center}.open[data-v-05e7abed]{transform:rotate(90deg)}@font-face{font-family:Segment7;src:url(data:font/otf;base64,T1RUTwAOAIAAAwBgQkFTRQAJAAQAACasAAAADkNGRiC5m9MSAAAH7AAAHbpGRlRNa6XwRAAAJrwAAAAcR0RFRgKxAqIAACWoAAAASkdQT1Ou773UAAAmLAAAAH5HU1VCRNhM5gAAJfQAAAA4T1MvMljUYiwAAAFQAAAAYGNtYXAxVzUsAAAFhAAAAkZoZWFkAmNATwAAAOwAAAA2aGhlYQdTAF8AAAEkAAAAJGhtdHgW0g5oAAAm2AAAAgZtYXhwAQFQAAAAAUgAAAAGbmFtZYoOx10AAAGwAAAD0nBvc3QAAAABAAAHzAAAACAAAQAAAAEAAOVWl1RfDzz1AAsD6AAAAADPuH6JAAAAAM+4fokAAP84A9EDIAACAAgAAgAAAAAAAAABAAADIP84AFoCSQAA/ngD0QBkAAUAAAAAAAAAAAAAAAAAAgAAUAABAQAAAAMCSQJYAAUACAKKArsABwCMAooCu//nAd8AMQECAAACAAUJAAAAAAAAAAAAAwAAAAAAAAAAAAAAAFBmRWQAAQAAAP8DIP84AFoDIADIAAAAAQAAAAABwgHCACAAIAACAAAADgCuAAEAAAAAAAAAsQFkAAEAAAAAAAEACAIoAAEAAAAAAAIACAJDAAEAAAAAAAMAIwKUAAEAAAAAAAQACALKAAEAAAAAAAUACQLnAAEAAAAAAAYAEAMTAAMAAQQJAAABYgAAAAMAAQQJAAEAEAIWAAMAAQQJAAIAEAIxAAMAAQQJAAMARgJMAAMAAQQJAAQAEAK4AAMAAQQJAAUAEgLTAAMAAQQJAAYAIALxAFMAdAByAGkAYwB0AGwAeQAgAHMAZQB2AGUAbgAtAHMAZQBnAG0AZQBuAHQAIAAoAHAAbAB1AHMAIABwAG8AaQBuAHQAKQAgAGMAYQBsAGMAdQBsAGEAdABvAHIAIABkAGkAcwBwAGwAYQB5ACAAZgBhAGMAZQAsACAAZgBpAHgAZQBkAC0AdwBpAGQAdABoACAAYQBuAGQAIABmAHIAZQBlAC4AIAAgACgAYwApACAAQwBlAGQAcgBpAGMAIABLAG4AaQBnAGgAdAAgADIAMAAxADQALgAgACAATABpAGMAZQBuAHMAZQBkACAAdQBuAGQAZQByACAAUwBJAEwAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBjAGUAIAB2ADEALgAxAC4AIAAgAFIAZQBzAGUAcgB2AGUAZAAgAG4AYQBtAGUAOgAgAFMAZQBnAG0AZQBuAHQANwAuAABTdHJpY3RseSBzZXZlbi1zZWdtZW50IChwbHVzIHBvaW50KSBjYWxjdWxhdG9yIGRpc3BsYXkgZmFjZSwgZml4ZWQtd2lkdGggYW5kIGZyZWUuICAoYykgQ2VkcmljIEtuaWdodCAyMDE0LiAgTGljZW5zZWQgdW5kZXIgU0lMIE9wZW4gRm9udCBMaWNlbmNlIHYxLjEuICBSZXNlcnZlZCBuYW1lOiBTZWdtZW50Ny4AAFMAZQBnAG0AZQBuAHQANwAAU2VnbWVudDcAAFMAdABhAG4AZABhAHIAZAAAU3RhbmRhcmQAAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAUwBlAGcAbQBlAG4AdAA3ACAAOgAgADcALQA2AC0AMgAwADEANAAARm9udEZvcmdlIDIuMCA6IFNlZ21lbnQ3IDogNy02LTIwMTQAAFMAZQBnAG0AZQBuAHQANwAAU2VnbWVudDcAAFYAZQByAHMAaQBvAG4AIAAgAABWZXJzaW9uICAAAFMAZQBnAG0AZQBuAHQANwBTAHQAYQBuAGQAYQByAGQAAFNlZ21lbnQ3U3RhbmRhcmQAAAAAAAADAAAAAwAAABwAAQAAAAAAPAADAAEAAAAcAAQAIAAAAAQABAABAAAA////AAAAAP//AAEAAQAAAAAABgIKAAAAAAEAAAEAAgADAAQABQAGAAcACAAJAAoACwAMAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5ADoAOwA8AD0APgA/AEAAQQBCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwBgAGEAYgBjAGQAZQBmAGcAaABpAGoAawBsAG0AbgBvAHAAcQByAHMAdAB1AHYAdwB4AHkAegB7AHwAfQB+AH8AgADFAMYAyADKANIA1wDdAOIA4QDjAOUA5ADmAOgA6gDpAOsA7ADuAO0A7wDwAPIA9ADzAPUA9wD2APsA+gD8AP0AAACxAKMApACoAAAAtwDgAK8AqgAAALUAqQAAAMcA2QAAALIAAAAAAKYAtgAAAAAAAAAAAAAAqwC7AAAA5wD5AMAAogCtAAAAAAAAAAAArAC8AAAAoQDBAMQA1gAAAAAAAAAAAAAAAAAAAAAA+AAAAQAAAAAAAAAAAAAAAAAAAAAAALgAAAAAAAAAwwDLAMIAzADJAM4AzwDQAM0A1ADVAAAA0wDbANwA2gAAAAAAAACwAAAAAAAAALkAAAAAAAAAAAADAAD//QAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAQAEBAABAQERU2VnbWVudDdTdGFuZGFyZAABAgABADf4YgD4YwH4ZAL4ZQP4ZgSMDAGIDAKLDAOLDASL+1z6Zfm0BRwDrw8cAAAQHAWwERwAMRwbyBIATAIAAQAIAA8AFgAdACQAKwAyADkAQABHAE4AVQBcAGMAagBxAHgAfwCGAI0AlACbAKIAqQCwALcAvgDFAMwA0wDaAOEA6ADvAPYA/QEEAQsBEgEZASABJwEuATUBPAFDAUoBUQFYAV8BZgFtAXQBewGCAYkBkAGXAZ4BpQGsAbMBugHBAcgBzwHWAd0B5AHrAfIB8gKjAqsCswK7dW5pMDAwMHVuaTAwMDF1bmkwMDAydW5pMDAwM3VuaTAwMDR1bmkwMDA1dW5pMDAwNnVuaTAwMDd1bmkwMDA4dW5pMDAwOXVuaTAwMEF1bmkwMDBCdW5pMDAwQ3VuaTAwMER1bmkwMDBFdW5pMDAwRnVuaTAwMTB1bmkwMDExdW5pMDAxMnVuaTAwMTN1bmkwMDE0dW5pMDAxNXVuaTAwMTZ1bmkwMDE3dW5pMDAxOHVuaTAwMTl1bmkwMDFBdW5pMDAxQnVuaTAwMUN1bmkwMDFEdW5pMDAxRXVuaTAwMUZ1bmkwMDdGdW5pMDA4MHVuaTAwODF1bmkwMDgydW5pMDA4M3VuaTAwODR1bmkwMDg1dW5pMDA4NnVuaTAwODd1bmkwMDg4dW5pMDA4OXVuaTAwOEF1bmkwMDhCdW5pMDA4Q3VuaTAwOER1bmkwMDhFdW5pMDA4RnVuaTAwOTB1bmkwMDkxdW5pMDA5MnVuaTAwOTN1bmkwMDk0dW5pMDA5NXVuaTAwOTZ1bmkwMDk3dW5pMDA5OHVuaTAwOTl1bmkwMDlBdW5pMDA5QnVuaTAwOUN1bmkwMDlEdW5pMDA5RXVuaTAwOUZ1bmkwMEEwdW5pMDBBRHVuaTAwQjJ1bmkwMEIzdW5pMDBCNXVuaTAwQjlTdHJpY3RseSBzZXZlbi1zZWdtZW50IChwbHVzIHBvaW50KSBjYWxjdWxhdG9yIGRpc3BsYXkgZmFjZSwgZml4ZWQtd2lkdGggYW5kIGZyZWUuICAoYykgQ2VkcmljIEtuaWdodCAyMDE0LiAgTGljZW5zZWQgdW5kZXIgU0lMIE9wZW4gRm9udCBMaWNlbmNlIHYxLjEuICBSZXNlcnZlZCBuYW1lOiBTZWdtZW50Ny5TZWdtZW50N1NlZ21lbnQ3U3RhbmRhcmQAAAABhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAAEAAgADAAQABQAGAAcAaAAJAAoACwAMAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5ADoAOwA8AD0APgA/AEAAfABCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAGAAYQBiAGcAZACgAGYAgwCqAIsAagCXAckApQCAAKEAnAHKAcsAfQHMAHMAcgCFAc0AjwB4AJ4AmwCjAHsArgCrAKwAsACtAK8AigCxALUAsgCzALQAuQC2ALcAuACaALoAvgC7ALwAvwC9AKgAjQDEAMEAwgDDAMUAnQCVAMsAyADJAM0AygDMAJAAzgDSAM8A0ADRANYA0wDUANUApwDXANsA2ADZANwA2gCfAJMA4QDeAN8A4ADiAKIA4wEBAgABACIANgA3ADgAOQA6ADsAPAA9AD4APwBAAEEAQgBDAEQARQBGAEcASABJAEoASwBMAE0ATgBPAFAAUQBSAFMAVABVAFYAdgCQALYA7QEmAUgBXgGRAcoB8gIWAjQCQAJOAncCxgLnAyQDZwOWA+AEPARhBMEFDgUaBToFTgViBYAFsgX/BkEGhwa6Bv4HOgdrB7AH7QgJCEIIegihCLkI8QlACXwJsgnLCg0KQgqECsYLGAs2C3gLqgvdDAAMNwxcDGgMewzIDQ4NIg1mDa0N3g4pDloOaQ6iDtoPAQ84D1gPjQ/JEAEQGhBeEJMQwREDEVURkhHWEf8SABIcEh0STxJQElESUhJTElQSVRJWElcSWBJZEloSWxJcEl0SXhJfEmASYRJiEmMSZBJlEmYSZxJoEmkSahJrEmwSbRJuEm8ScBJxEnIScxJ0EnUSdhJ3EngSeRJ6EnsSfBJ9En4SfxKAEq8SsBKxErISsxLqEusS7BLtEu4S7xLwEvES8hLzEvQS9RL2EvcS+BL5EvoS+xL8Ev0S/hL/EwATARMCEwMTBBMFEwYTBxMIEwkTChMLEwwTDRMOEw8TEBMRExITExMUE2ETrhOvE7ATsROyE7MTtBO1E/wT/RP+E/8UABQBFAIUAxQEFAUUBhQHFAgUCRQKFAsUDBQNFA4UDxQQFBEUEou9+EW9Ab29+BW9A70W+Hn4qfx5Br38dxX4RfgV/EUHDvtc+nwBi/plA/tcBPpl+nz+ZQYODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg527/floPfFnxL4O/Z66hNw+KH5jhUgChOIsf0/FSEKDvhJdvfBd593zHcSE9Dd+WEVIgr3+fAVIwoOien3m+ppoPfFnxITgPcf5xUkChPA+3j3+hUlChOw9wz3zBUgCg6J6VOg9/ug94zqOJ8SE6D3H+cVE2AmChOgJwoTKPvS+QUVIgoTMH73CxUoCmT8FxUpChNgKgoOielodvgldveh6kx3n3cSE6D3H+cVE2AmChOgJwoTKPvS+QUVIgoTMH73CxUoCmT8FxUpChNgKgoOr6D3vuppoPfFnxITwPdA+FYVJQrRTRUrChOwm/gwFSAKDvhJdvfud593Evg79hPQ+KH5jhUgCg6J6X929+N3ynb3oepMdxITsPcf5xUkCvvX98IVLAoTcC0KEzRG+AsVIgoTOH73CxUoCg6J6Wh2+CV296HqeXefdxIToPcf5xUTYCYKE6AnChMw+4n5RBUoCmT8FxUpChNgKgoTKJv4MBUgCg6J6feb6n529+53n3cSE4D3H+cVJAoTwPt49/oVJQoTsPcM98wVIAoOxHb30+p+dvfud593EhPA90D4VhUlCtFNFSsKE7Cb+DAVIAoOielodhITgPcf5xUTQCYKE4AnCtb3vBUpChNAKgoO9/fqAfdA+FYVJQoOdu8B+JXqA/jH2hUhCg7bdve86lN3ynb37ncSE6jY+B4VLgoTyKD3ABUlCvcM98wVLwoTmDAKDonpaHa3dvfjd8p296HqTHfMdxITmPcf5xUTWCYKE5gnCvvX98IVLAoTOC0KExpG+AsVIgoTHH73CxUoCmT8FxUpChNYKgoTGZv4MBUgCg7Edvgldvfud593Evgq9xATyPhv+BgVKwoT6Jv4MBUgCg6J6X9297zqU3fKdveh6nl3EhOA9x/nFSQKE1D71/fCFS4KEwSP+EoVKAoTIPvq+9kVJQoTCvcM98wVIAoOielodvfT6n5296HqeXefdxITgPcf5xUTQCYKE4AnChMI+4n5RBUoChMg++r72RUlCtFNFSkKE0AqChMUm/gwFSAKDsR299Pqfnb3wXefd8x3EhO03flhFSIKE8SP+2cVJQrRTRUrCpv4MBUvChOkMAoOielodvfU6X5296HmUHefdxITQPhw+BkVUlx++3jNPZylnve1BRMg++XuFTEK+4333RVJYAUTCDIKExT8Q1AVMwoTgG38zhU0Cg6J6Wh2tnb3vulndrd296HmUHcSE4D3HucVNAoTBfvS+QUVMwp+9wkVSWAFEwIyChMQ++r72hUxCtNOFVJcfvt4BRNANQoTKPxEtRWHgYaBh4EIe/vF576X930FDsR2+CV296HqeXefdxIT4Pcv+aAVKApk/BcVKwoT0Jv4MBUgCg6J6Wh2t3b3vOpTd8p296HqTHfMdxITgAD3H+cVE0AAJgoTgAAnChMoAPvX98IVLgoTBQBG+AsVIgoTAgB+9wsVKAoTEAD76vvZFSUK0U0VKQoTQAAqChMEgJv4MBUgCg6J6Wh299Pqfnb3oepMd593zHcSE4D3H+cVE0AmChOAJwoTFPvS+QUVIgoTCH73CxUoChMg++r72RUlCtFNFSkKE0AqChMRm/gwFSAKDvf36gH3QPhWFSUKDnbv9+Wg98WfEvg79nrqE3D4ofmOFSAKE4ix/T8VIQoO9x/nFSQK+9f3whUuCqD3ABUlCg6J6feb6gH3H+cVJAr7ePf6FSUKDonpU6ASE4D3H+cVE0AmChOAJwrW97wVKQoTQCoKDtt297zqU3fKdveh6nl3EhOg2PgeFS4KE4iP+EoVKAoTwPvq+9kVJQoTlPcM98wVIAoOielToI2g96fqP5+hoPeM6mWfEhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KEwKP+EoVKAoTEPvq+9kVJQrRTRUpChNAKgoTBZv4MBUgCg7Edrd297zqU3fKdveh6kx3zHcSE9DY+B4VLgoTykb4CxUiChPEfvcLFSgKE+D76vvZFSUK0U0VKwoTyZv4MBUgCg6J6VOgjaD3p+o/n6Gg95ifEhOC9x/nFRNCJgoTgicKEyr71/fCFS4KRvgLFXv7qQUTBjYKExKP+2cVJQrRTRUpChNCKgoOielqoPe6n6Gg94zqOJ8SE7D3H+cVJAr71/fCFSwKE3AtChM0RvgLFSIKEzh+9wsVKAoOielToI2g96fqP5+hoPfFnxITgvcf5xUTQiYKE4InChMq+9f3whUuChMSoPcAFSUK0U0VKQoTQioKm/gwFS8KEwYwCg6J6X9297zqU3fKdveh6kx3EhOA9x/nFSQKE1D71/fCFS4KEwpG+AsVIgoTBH73CxUoChMg++r72RUlCg7GoPen6j+foaD3jOo4nxIToNj4HhUuChOURvgLFSIKE4h+9wsVKAoTwPvq+9kVJQoOielodrd29+N3ynb3oepMdxITmPcf5xUTWCYKE5gnCvvX98IVLAoTOC0KExpG+AsVIgoTHH73CxUoCmT8FxUpChNYKgoOr6CNoPen6j+foaD3mJ+knxIT1tj4HhUuCkb4CxV7+6kFE842ChPmj/tnFSUK0U0VKwqb+DAVLwoTzjAKDq+g9/ug98WfAfgq9xAD+G/4GBUrCpv4MBUgCg6J6VOgjaD3up+hoPfFnxITnPcf5xUTXCYKE5wnCvvX98IVLAoTPC0K99i5FSkKE1wqCpv4MBUjCg6voI2g96fqP5+hoPeM6jifEhPQ2PgeFS4KE8pG+AsVIgoTxH73CxUoChPg++r72RUlCtFNFSsKDonpaqD3up+hoPeYnxITuPcf5xUkCvvX98IVLAoTeC0KRvgLFSIKDtj4HhUuCqD3ABUlCtFNFSsKm/gwFSMKDsR2t3b343fKdveh6kx3zHcSE/DY+B4VLgoT9Eb4CxUiChP4fvcLFSgKZPwXFSsKE/Kb+DAVIAoOielToI2g97qfoaD3jOo4n6SfEhOY9x/nFRNYJgoTmCcK+9f3whUsChM4LQoTGkb4CxUiChMcfvcLFSgKZPwXFSkKE1gqChMZm/gwFSAKDsag96fqP5+hoPeM6jifpJ8SE6DY+B4VLgoTlEb4CxUiChOIfvcLFSgKE8D76vvZFSUKE5L3DPfMFSAKDq+g977qaaD3jOo4n6SfEhOo3flhFSIKE5B+9wsVKAoTwPvq+9kVJQrRTRUrChOkm/gwFSAKDsag96fqP58SE6DY+B4VLgoTwKD3ABUlCg6J6VOg97/paaD3jOY8nxITgPce5xU0ChMU+9L5BRUzCn73CRVJYAUTCDIKEyD76vvaFTEK004VUlx++3gFE0A1Cg6J6Wqg96fqP5+hoPeYnxIThPcf5xUkChNU+9f3whUuCkb4CxV7+6kFEww2ChMkj/tnFSUKDonpU6CNoPe6n6Gg95ifpJ8SE573H+cVE14mChOeJwr71/fCFSwKEz4tCkb4CxUiCvfH+6UVKQoTXioKm/gwFSMKDonpU6CNoPe6n6Gg95ifpJ8SE573H+cVE14mChOeJwr71/fCFSwKEz4tCkb4CxUiCvfH+6UVKQoTXioKm/gwFSMKDonpU6CNoPen6j+foaD3mJ+knxITg/cf5xUTQyYKE4MnChMr+9f3whUuCkb4CxV7+6kFEwc2ChMTj/tnFSUK0U0VKQoTQyoKm/gwFS8KEwcwCg6J6feb6vd/6gH3H+cVJAr7iflEFSgK++r72RUlCg6J6VOg977qaaD3mJ+knxIThPcf5xUTRCYKE4QnChMc+9L5BRUiChMkj/tnFSUK0U0VKQoTRCoKm/gwFS8KExQwCg7GoPen6j+foaD3jOplnxIToNj4HhUuChOIj/hKFSgKE8D76vvZFSUKE5T3DPfMFSAKDonpaqD3up+hoPeM6jifEhOw9x/nFSQK+9f3whUsChNwLQoTNEb4CxUiChM4fvcLFSgKDsR299Pqfnb3wXefdxITsN35YRUiChPAj/tnFSUK0U0VKwoOielToPf7oPeM6mWfEhOg9x/nFRNgJgoToCcKEzD7iflEFSgKZPwXFSkKE2AqChMom/gwFSAKDvhJdveh6kx3n3fMdxIToN35YRUiChPAfvcLFSgKE4iWfhUgCg739+oB90D4VhUlCg74NKD3xZ8B+Dv2A/ih+Y4VIAoOielodrd297zqU3fKdveh6nl3EhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KEwKP+EoVKAoTEPvq+9kVJQrRTRUpChNAKgoTBZv4MBUgCg6J6Wh2t3b3vOpTd8p298F3EhOC9x/nFRNCJgoTgicKEyr71/fCFS4KRvgLFXv7qQUTBjYKExKP+2cVJQrRTRUpChNCKgoO9x/nFSQK+9f3whUuCqD3ABUlCg6J6Wh2t3b3vOpTd8p29+53EhOC9x/nFRNCJgoTgicKEyr71/fCFS4KExKg9wAVJQrRTRUpChNCKgqb+DAVLwoTBjAKDonpf3b3vOpTd8p296HqTHfMdxITgPcf5xUkChNQ+9f3whUuChMKRvgLFSIKEwR+9wsVKAoTIPvq+9kVJQoTCfcM98wVIAoO23b3vOpTd8p296HqTHcSE6DY+B4VLgoTlEb4CxUiChOIfvcLFSgKE8D76vvZFSUKDonpU6D3vuppoPeM6jifpJ8SE4D3H+cVE0AmChOAJwoTFPvS+QUVIgoTCH73CxUoChMg++r72RUlCtFNFSkKE0AqChMSm/gwFSAKDsR2t3b3vOpTd8p298F3EhPU2PgeFS4KRvgLFXv7qQUTzDYKE+SP+2cVJQrRTRUrCg7EdgH4KvID+G/4GBUrCg6J6Wh2t3b343fKdvfudxITnPcf5xUTXCYKE5wnCvvX98IVLAoTPC0K99i5FSkKE1wqCpv4MBUjCg7Edrd297zqU3fKdveh6kx3EhPQ2PgeFS4KE8pG+AsVIgoTxH73CxUoChPg++r72RUlCtFNFSsKDonpf3b343fKdvfBdxITuPcf5xUkCvvX98IVLAoTeC0KRvgLFSIKDtt297zqU3fKdvfBd8x3EhOs2PgeFS4KRvgLFXv7qQUTnDYKE8yP+2cVJQr3DPfMFS8KE5wwCg7Edrd297zqU3cSE9DY+B4VLgoT4KD3ABUlCtFNFSsKDonpaHa3dve86lN3EhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KExCg9wAVJQrRTRUpChNAKgoO23b3vOpTd8p296HqTHfMdxIToNj4HhUuChOURvgLFSIKE4h+9wsVKAoTwPvq+9kVJQoTkvcM98wVIAoOxHb30+p+dveh6kx3n3fMdxITqN35YRUiChOQfvcLFSgKE8D76vvZFSUK0U0VKwoTopv4MBUgCg7bdve86lN3EhOg2PgeFS4KE8Cg9wAVJQoOielodvfU6X5296HmUHefdxITgPce5xU0ChMU+9L5BRUzCn73CRVJYAUTCDIKEyD76vvaFTEK004VUlx++3gFE0A1Cg6J6X9297zqU3fKdvfBdxIThPcf5xUkChNU+9f3whUuCkb4CxV7+6kFEww2ChMkj/tnFSUKDonpaHa3dvfjdxITkPcf5xUTUCYKE5AnCvvX98IVLAoTMC0K99i5FSkKE1AqCg6J6Wh2t3b343fKdvfBd8x3EhOe9x/nFRNeJgoTnicK+9f3whUsChM+LQpG+AsVIgr3x/ulFSkKE14qCpv4MBUjCg6J6Wh2t3b3vOpTd8p298F3zHcSE4P3H+cVE0MmChODJwoTK/vX98IVLgpG+AsVe/upBRMHNgoTE4/7ZxUlCtFNFSkKE0MqCpv4MBUvChMHMAoOxHa3dve86lN3ynb3wXfMdxIT1tj4HhUuCkb4CxV7+6kFE842ChPmj/tnFSUK0U0VKwqb+DAVLwoTzjAKDonpaHb30+p+dvfBd593zHcSE4L3H+cVE0ImChOCJwoTGvvS+QUVIgoTIo/7ZxUlCtFNFSkKE0IqCpv4MBUvChMSMAoOxqD3p+o/n6Gg98WfEhOo2PgeFS4KE8ig9wAVJQr3DPfMFS8KE5gwCg4Or6D3+6D3xZ8B+Cr3EAP4b/gYFSsKm/gwFSAKDg6J6X929+N3ynb3oep5dxITsPcf5xUkCvvX98IVLAoTcC0KEziP+EoVKAoTNJZ+FSAKDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg739+ppoPeM6jifpJ8SE4D3QPhWFSUKE1D71/efFSIKE2B+9wsVKAoTSJZ+FSAKDg4ODg7GoPen6j+foaD3mJ+knxITrNj4HhUuCkb4CxV7+6kFE5w2ChPMj/tnFSUK9wz3zBUvChOcMAoODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OielToI2g96fqP5+hoPeM6mWfEhOA9x/nFRNAJgoTgCcKEyj71/fCFS4KEwKP+EoVKAoTEPvq+9kVJQrRTRUpChNAKgoTBZv4MBUgCg6J6VOgjaD3p+o/n6Gg94zqZZ8SE4D3H+cVE0AmChOAJwoTKPvX98IVLgoTAo/4ShUoChMQ++r72RUlCtFNFSkKE0AqChMFm/gwFSAKDg4ODg4ODg6J6Wqg96fqP5+hoPeM6jifpJ8SE4D3H+cVJAoTUPvX98IVLgoTCkb4CxUiChMEfvcLFSgKEyD76vvZFSUKEwn3DPfMFSAKDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg743RSLFYmx+T24nIwGHgoCLwwJiwwK6gqfjNGOjJD6GAwM+mUL6pOPnPnpDA0cADETABcCAAEAGgAsADgAUAB+AJEAngDBAMwA0wDcAOoA8gD8AQ0BFAEnAToBQwFPAX0BhgGPMTF/+2rDYa6wBZDukeqQ7giLkIiRiZAIC291dm1voHakp6Cgqad3oHIfC3v7qZZz2rqX91oFCzExf/tqw2GusAWQ7pHqkO6LkIiRiZAICy9Ti4oFi4aPiI6IkoKSg5KCCNKL9yKL90CLBZKOjY4fi42JjYiOdqV0qXalCAs7XwWgeqN8oHgI94yLy7dKvgULL1OLigWLho+IjogIC5KCkoOSggjSi/cii/dAiwWSjo2OH4uNiY2IjnaldKl2pQgLSF7bWfeTi+blBQtSXX/7dwULzTydpZ73tAULUl1/+3fNPJ2lnve0BQuIgYOAiIEIC3v7xOe9l/d9BQuIgYOAiIEIe/vE572X930FCzExf/tqBQvDYa6wBZDukeqQ7ouQiJGJkAgLPF8FoXqhfKF5CPeMi8u2Sb4FC9tY95KL5eYFC3z7qJVy27qW91sFCy9Ui4kFi4aQiI6HkoOSgpKDCNOL9yGL90CLBZKPjY4fi42JjYiOdqZzp3amCAvNPZylnve1BQuWc9q6l/daBQsAAAABAAAAAAAAAA4AFgAAAAQAAAACAAAAAgAIADEAOgABAEAAQAACAEIAQgACAEYARgACAE8ATwACAFkAWQACAGIAcwACAHUAegACAAAAAQAAAAoAHAAeAAFERkxUAAgABAAAAAD//wAAAAAAAQAEAAEACAABAAgAAQAGACAAAQACAEcASwABAAAACgAeACwAAURGTFQACAAEAAAAAP//AAEAAAABa2VybgAIAAAAAQABAAIABgAOAAEAAAABABAAAgAAAAEAFgABAAgABP22AAEAAQAvAAEAJAAEAAAACgAeAB4AHgAeAB4AHgAeAB4AHgAeAAEAL/22AAIAAQAxADoAAAAAAAEAAAAIAAAAAAAEAAAAAAAAAAEAAAAAzD2izwAAAADPr89TAAAAAM+4fiECSQAAAkkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpwBCAC8ALwAvAFwBpwAvAC8ALwBcAC8AXAIBAC8ALwGWAC8ALwBCAC4ALgBYAC8ALwBcAacALwAvAC8ALwAvAC8ALwAvAC8ALwAvAC8ALwGWAC8ALwAvAC8ALwAvAC8AQgAvAC4ALwAvAC8ALwAvAC8ALwAvAEIALwBCAFwBpwAvAC8ALwAvAC8ALwAvAC8BlgAvAC8ALwAvAC8ALwAvAEIALwAuAC8ALwAvAC8ALwAvAC8AAAGWAAAALwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEIAAAAAAAAAAAAvAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC8ALwAAAAAAAAAAAAAAAAAAAC8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA)}:root{--sc-primary-color: #f2f2f2;--sc-primary-text-color: #666666;--sc-alert: #e63c28;--sc-success: #155724;--sc-warning: #f0f34f;--sc-font-family: Arimo, Arial, sans-serif;--sc-row-border-color: #ccc;--sc-btn-color: white;--sc-btn-border: #ccc;--sc-btn-label-color: black;--sc-list-margin: .625rem;--sc-cell-changed-color: #d8edff;--sc-segemented-display-font-size: 4.5rem;--sc-segmented-display-background: #404040;--sc-segmented-display-color: #b0b0b0}.beam_copy{color:var(--sc-primary-text-color);font-size:1rem;line-height:1.5rem;font-family:var(--sc-font-family)}.beam--bold{font-weight:700}.beam--normal{font-weight:400}.beam--alert{color:var(--sc-alert)}.beam--warning{color:var(--sc-warning)}.beam--success{color:var(--sc-success)}.v-toast__item{border-radius:0;color:#fff;font-family:var(--sc-font-family)}.v-toast__item--success{background-color:var(--sc-success)!important;color:#fff}.v-toast__item--info{background-color:var(--sc-primary-text-color)!important}.v-toast__item--warning{background-color:var(--sc-warning)!important;color:#fff}.v-toast__item--error{background-color:var(--sc-alert)!important;color:#fff}.v-toast__item--default{background-color:var(--sc-primary-text-color)!important}
2
+ /*$vite$:1*/`,document.head.appendChild(ui);const yl={class:"beam_action-footer"},bl={class:"footer-action-wrapper"},wl=O.defineComponent({__name:"ActionFooter",emits:["click"],setup(l,{emit:u}){const s=u,i=()=>{s("click")};return(a,t)=>{const e=O.resolveComponent("BeamBtn");return O.openBlock(),O.createElementBlock("footer",yl,[O.createElementVNode("span",bl,[O.createVNode(e,{onClick:i},{default:O.withCtx(()=>[O.renderSlot(a.$slots,"default",{},void 0,!0)]),_:3})])])}}}),Ue=(l,u)=>{const s=l.__vccOpts||l;for(const[i,a]of u)s[i]=a;return s},ci=Ue(wl,[["__scopeId","data-v-37933bd1"]]),vl={class:"beam_metadata_arrow"},_l={class:"beam_metadata_arrow-head"},El={id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6.74 7.78"},fi=Ue(O.defineComponent({__name:"BeamArrow",props:{color:{default:"#c4c4c4"}},setup(l){return(u,s)=>(O.openBlock(),O.createElementBlock("div",vl,[O.createElementVNode("div",{class:"beam_metadata_arrow-body",style:O.normalizeStyle({background:l.color})},null,4),O.createElementVNode("div",_l,[(O.openBlock(),O.createElementBlock("svg",El,[O.createElementVNode("polygon",{points:"6.74 3.89 0 0 0 7.78 6.74 3.89",style:O.normalizeStyle([{fill:"#c4c4c4"},{fill:l.color}])},null,4)]))])]))}}),[["__scopeId","data-v-2b1d7448"]]),Sl={},xl={class:"beam_btn"};function Il(l,u){return O.openBlock(),O.createElementBlock("button",xl,[O.renderSlot(l.$slots,"default",{},()=>[u[0]||(u[0]=O.createTextVNode("Action",-1))],!0)])}const hi=Ue(Sl,[["render",Il],["__scopeId","data-v-bc768596"]]),Cl={class:"beam_day-divider"},Fr=Ue(O.defineComponent({__name:"BeamDayDivider",props:{item:{}},setup(l){const u=O.computed(()=>{if(!l.item.date||isNaN(Date.parse(l.item.date)))return l.item.date;const s=new Date(l.item.date);return l.item.dateFormat&&l.item.dateFormat.toLowerCase()==="iso"?s.toISOString():s.toDateString()});return(s,i)=>(O.openBlock(),O.createElementBlock(O.Fragment,null,[O.createElementVNode("div",Cl,[O.createElementVNode("h2",null,O.toDisplayString(u.value),1)]),O.renderSlot(s.$slots,"default",{},void 0,!0)],64))}}),[["__scopeId","data-v-160cf6ef"]]),kl={class:"beam_filters"},Tl={class:"beam_filters-options"},di=Ue(O.defineComponent({__name:"BeamFilter",setup(l){const u=O.ref(!1);return(s,i)=>{const a=O.resolveComponent("ToggleArrow"),t=O.resolveComponent("BeamHeading");return O.openBlock(),O.createElementBlock("div",kl,[O.createElementVNode("div",{class:"beam_filters-heading",onClick:i[0]||(i[0]=e=>u.value=!u.value)},[O.createVNode(a,{open:u.value},null,8,["open"]),O.createVNode(t,null,{default:O.withCtx(()=>[...i[1]||(i[1]=[O.createTextVNode("Filter",-1)])]),_:1})]),O.withDirectives(O.createElementVNode("div",Tl,[O.renderSlot(s.$slots,"default",{},void 0,!0)],512),[[O.vShow,u.value]])])}}}),[["__scopeId","data-v-f8d60c9f"]]);function Ol(l,u){return O.getCurrentScope()?(O.onScopeDispose(l,u),!0):!1}const Pl=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Bl=Object.prototype.toString,Ml=l=>Bl.call(l)==="[object Object]",vt=()=>{};function Rl(...l){if(l.length!==1)return O.toRef(...l);const u=l[0];return typeof u=="function"?O.readonly(O.customRef(()=>({get:u,set:vt}))):O.ref(u)}function Dl(l,u){function s(...i){return new Promise((a,t)=>{Promise.resolve(l(()=>u.apply(this,i),{fn:u,thisArg:this,args:i})).then(a).catch(t)})}return s}function Ul(l,u={}){let s,i,a=vt;const t=r=>{clearTimeout(r),a(),a=vt};let e;return r=>{const o=O.toValue(l),c=O.toValue(u.maxWait);return s&&t(s),o<=0||c!==void 0&&c<=0?(i&&(t(i),i=void 0),Promise.resolve(r())):new Promise((p,g)=>{a=u.rejectOnCancel?g:p,e=r,c&&!i&&(i=setTimeout(()=>{s&&t(s),i=void 0,p(e())},c)),s=setTimeout(()=>{i&&t(i),i=void 0,p(r())},o)})}}function Lr(l){return Array.isArray(l)?l:[l]}function Nl(l,u=200,s={}){return Dl(Ul(u,s),l)}function jl(l,u,s){return O.watch(l,u,{...s,immediate:!0})}const pi=Pl?window:void 0;function Lt(l){var u;const s=O.toValue(l);return(u=s?.$el)!==null&&u!==void 0?u:s}function Wr(...l){const u=(i,a,t,e)=>(i.addEventListener(a,t,e),()=>i.removeEventListener(a,t,e)),s=O.computed(()=>{const i=Lr(O.toValue(l[0])).filter(a=>a!=null);return i.every(a=>typeof a!="string")?i:void 0});return jl(()=>{var i,a;return[(i=(a=s.value)===null||a===void 0?void 0:a.map(t=>Lt(t)))!==null&&i!==void 0?i:[pi].filter(t=>t!=null),Lr(O.toValue(s.value?l[1]:l[0])),Lr(O.unref(s.value?l[2]:l[1])),O.toValue(s.value?l[3]:l[2])]},([i,a,t,e],n,r)=>{if(!i?.length||!a?.length||!t?.length)return;const o=Ml(e)?{...e}:e,c=i.flatMap(p=>a.flatMap(g=>t.map(y=>u(p,g,y,o))));r(()=>{c.forEach(p=>p())})},{flush:"post"})}function gi(l,u,s={}){const{window:i=pi,ignore:a=[],capture:t=!0,detectIframe:e=!1,controls:n=!1}=s;if(!i)return n?{stop:vt,cancel:vt,trigger:vt}:vt;let r=!0;const o=A=>O.toValue(a).some(_=>{if(typeof _=="string")return Array.from(i.document.querySelectorAll(_)).some(d=>d===A.target||A.composedPath().includes(d));{const d=Lt(_);return d&&(A.target===d||A.composedPath().includes(d))}});function c(A){const _=O.toValue(A);return _&&_.$.subTree.shapeFlag===16}function p(A,_){const d=O.toValue(A),v=d.$.subTree&&d.$.subTree.children;return v==null||!Array.isArray(v)?!1:v.some(S=>S.el===_.target||_.composedPath().includes(S.el))}const g=A=>{const _=Lt(l);if(A.target!=null&&!(!(_ instanceof Element)&&c(l)&&p(l,A))&&!(!_||_===A.target||A.composedPath().includes(_))){if("detail"in A&&A.detail===0&&(r=!o(A)),!r){r=!0;return}u(A)}};let y=!1;const h=[Wr(i,"click",A=>{y||(y=!0,setTimeout(()=>{y=!1},0),g(A))},{passive:!0,capture:t}),Wr(i,"pointerdown",A=>{const _=Lt(l);r=!o(A)&&!!(_&&!A.composedPath().includes(_))},{passive:!0}),e&&Wr(i,"blur",A=>{setTimeout(()=>{var _;const d=Lt(l);((_=i.document.activeElement)===null||_===void 0?void 0:_.tagName)==="IFRAME"&&!d?.contains(i.document.activeElement)&&u(A)},0)},{passive:!0})].filter(Boolean),m=()=>h.forEach(A=>A());return n?{stop:m,cancel:()=>{r=!1},trigger:A=>{r=!0,g(A),r=!1}}:m}function Kr(l){return typeof Window<"u"&&l instanceof Window?l.document.documentElement:typeof Document<"u"&&l instanceof Document?l.documentElement:l}const Vr=new WeakMap;function Fl(l,u=!1){const s=O.shallowRef(u);let i="";O.watch(Rl(l),e=>{const n=Kr(O.toValue(e));if(n){const r=n;if(Vr.get(r)||Vr.set(r,r.style.overflow),r.style.overflow!=="hidden"&&(i=r.style.overflow),r.style.overflow==="hidden")return s.value=!0;if(s.value)return r.style.overflow="hidden"}},{immediate:!0});const a=()=>{const e=Kr(O.toValue(l));!e||s.value||(e.style.overflow="hidden",s.value=!0)},t=()=>{const e=Kr(O.toValue(l));!e||!s.value||(e.style.overflow=i,Vr.delete(e),s.value=!1)};return Ol(t),O.computed({get(){return s.value},set(e){e?a():t()}})}const Qr=new WeakMap,Ll={mounted(l,u){const s=!u.modifiers.bubble;let i;if(typeof u.value=="function")i=gi(l,u.value,{capture:s});else{const[a,t]=u.value;i=gi(l,a,Object.assign({capture:s},t))}Qr.set(l,i)},unmounted(l){const u=Qr.get(l);u&&typeof u=="function"?u():u?.stop(),Qr.delete(l)}};function Wl(){let l=!1;const u=O.shallowRef(!1);return(s,i)=>{if(u.value=i.value,l)return;l=!0;const a=Fl(s,i.value);O.watch(u,t=>a.value=t)}}Wl();const Kl={class:"beam_filter-container"},Vl={class:"beam_filter-option-select"},Ql={class:"beam_filter-label"},ql={key:0,ref:"menu",class:"beam_filter-select-menu"},$l=["data-value","onClick"],mi=Ue(O.defineComponent({__name:"BeamFilterOption",props:{choices:{},title:{default:"title"}},emits:["select"],setup(l,{emit:u}){const s=u,i=O.ref(!1),a=O.ref(l.choices[0].label),t=O.ref(l.choices[0].value),e=n=>{a.value=n.label,t.value=n.value,s("select",n)};return(n,r)=>{const o=O.resolveComponent("BeamHeading");return O.withDirectives((O.openBlock(),O.createElementBlock("div",Kl,[O.createVNode(o,{class:"beam_filter-option-heading"},{default:O.withCtx(()=>[O.createTextVNode(O.toDisplayString(l.title),1)]),_:1}),O.createElementVNode("div",{class:"beam_filter-option",onClick:r[0]||(r[0]=c=>i.value=!i.value)},[O.createElementVNode("div",Vl,[r[1]||(r[1]=O.createElementVNode("div",{class:"beam_filter-arrow"},[O.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[O.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})])],-1)),O.createElementVNode("div",Ql,[O.createElementVNode("label",null,O.toDisplayString(a.value),1)])]),i.value?(O.openBlock(),O.createElementBlock("ul",ql,[(O.openBlock(!0),O.createElementBlock(O.Fragment,null,O.renderList(l.choices,c=>(O.openBlock(),O.createElementBlock("li",{key:c.value,class:O.normalizeClass([{selected:a.value==c.label},"beam_filter-select-option"]),"data-value":c.value,onClick:p=>e(c)},O.toDisplayString(c.label),11,$l))),128))],512)):O.createCommentVNode("",!0)])])),[[O.unref(Ll),()=>i.value=!1]])}}}),[["__scopeId","data-v-ad8ee21c"]]),Hl={},zl={class:"beam_header"};function Gl(l,u){return O.openBlock(),O.createElementBlock("h1",zl,[O.renderSlot(l.$slots,"default",{},void 0,!0)])}const Ai=Ue(Hl,[["render",Gl],["__scopeId","data-v-5182a4d5"]]),Jl={class:"beam_metadata"},Yl={class:"beam_metadata_content"},Zl={class:"beam_metadata_block"},Xl={class:"beam_metadata_heading"},yi=Ue(O.defineComponent({__name:"BeamMetadata",props:{order:{}},setup(l){return(u,s)=>(O.openBlock(),O.createElementBlock("div",Jl,[O.createElementVNode("div",Yl,[O.renderSlot(u.$slots,"default",{},()=>[s[1]||(s[1]=O.createElementVNode("div",{class:"beam_metadata_header beam_metadata--two-column"},null,-1)),O.createElementVNode("div",Zl,[O.createElementVNode("p",Xl,[s[0]||(s[0]=O.createTextVNode(" Status: ",-1)),O.createElementVNode("span",{class:O.normalizeClass([{alert:!l.order.complete},"beam_metadata--normal"])},O.toDisplayString(l.order.complete?"Complete":"In Progress"),3)])]),s[2]||(s[2]=O.createStaticVNode('<div class="beam_metadata_shipping beam_metadata_block" data-v-80484331><div class="beam_metadata_source" data-v-80484331><p class="beam_metadata_heading" data-v-80484331>Source</p></div><div class="beam_metadata_source" data-v-80484331><p class="beam_metadata_heading" data-v-80484331>Receiving</p></div></div>',1))],!0)]),s[3]||(s[3]=O.createElementVNode("hr",null,null,-1))]))}}),[["__scopeId","data-v-80484331"]]),eu={class:"beam_modal"},bi=Ue(O.defineComponent({__name:"BeamModal",props:{showModal:{type:Boolean}},emits:["closemodal","confirmmodal"],setup(l){return(u,s)=>{const i=O.resolveComponent("BeamBtn"),a=O.resolveComponent("portal");return O.openBlock(),O.createBlock(a,{to:"beam_modal_outlet"},{default:O.withCtx(()=>[O.withDirectives(O.createElementVNode("div",eu,[O.createVNode(i,{onClick:s[0]||(s[0]=t=>u.$emit("closemodal"))},{default:O.withCtx(()=>[...s[3]||(s[3]=[O.createTextVNode("Close Modal",-1)])]),_:1}),O.renderSlot(u.$slots,"default",{onClosemodal:s[1]||(s[1]=t=>u.$emit("closemodal")),onConfirmmodal:s[2]||(s[2]=t=>u.$emit("confirmmodal"))},void 0,!0)],512),[[O.vShow,l.showModal]])]),_:3})}}}),[["__scopeId","data-v-55f98302"]]),wi=O.defineComponent({__name:"BeamModalOutlet",emits:["confirmmodal","closemodal"],setup(l){return(u,s)=>{const i=O.resolveComponent("portal-target");return O.openBlock(),O.createBlock(i,{name:"beam_modal_outlet"})}}}),tu={class:"beam_metadata_heading"},vi=O.defineComponent({__name:"BeamProgress",props:{label:{default:"Status"},progressMessage:{default:"In Progress"},completeMessage:{default:"Complete"},complete:{type:Boolean,default:!1}},setup(l){const u=O.computed(()=>l.complete?l.completeMessage:l.progressMessage);return(s,i)=>(O.openBlock(),O.createElementBlock("p",tu,[O.createTextVNode(O.toDisplayString(l.label)+": ",1),O.createElementVNode("span",{class:O.normalizeClass([{"beam--alert":!l.complete},"beam--normal"])},O.toDisplayString(u.value),3)]))}}),ru={},nu={class:"beam_modal-confirm"};function ou(l,u){const s=O.resolveComponent("BeamBtn");return O.openBlock(),O.createElementBlock("div",nu,[u[4]||(u[4]=O.createElementVNode("h2",null,"Would you like to continue?",-1)),O.createVNode(s,{onClick:u[0]||(u[0]=i=>l.$emit("confirmmodal"))},{default:O.withCtx(()=>[...u[2]||(u[2]=[O.createTextVNode("Yes",-1)])]),_:1}),O.createVNode(s,{onClick:u[1]||(u[1]=i=>l.$emit("confirmmodal"))},{default:O.withCtx(()=>[...u[3]||(u[3]=[O.createTextVNode("No",-1)])]),_:1})])}const _i=Ue(ru,[["render",ou],["__scopeId","data-v-5b430dca"]]),iu={},su={class:"fixed-top"};function au(l,u){return O.openBlock(),O.createElementBlock("div",su,[O.renderSlot(l.$slots,"default",{},void 0,!0)])}const Ei=Ue(iu,[["render",au],["__scopeId","data-v-a38a41d0"]]),lu={class:"container"},qr=Ue(O.defineComponent({__name:"ItemCheck",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(l){const u=O.useModel(l,"modelValue");return(s,i)=>(O.openBlock(),O.createElementBlock("label",lu,[O.withDirectives(O.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=a=>u.value=a),type:"checkbox",tabindex:"-1"},null,512),[[O.vModelCheckbox,u.value]]),i[1]||(i[1]=O.createElementVNode("div",{class:"checkmark",tabindex:"0"},null,-1))]))}}),[["__scopeId","data-v-ad0dc7dc"]]),uu={class:"beam_item-count"},cu=["contenteditable"],fu={key:0},hu={key:1},$r=Ue(O.defineComponent({__name:"ItemCount",props:O.mergeModels({denominator:{default:0},debounce:{default:300},editable:{default:!0},uom:{default:""}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const u=O.useModel(l,"modelValue"),s=O.computed(()=>l.denominator!==0&&u.value===l.denominator),i=e=>{const n=Number(e.target.innerHTML)||0;u.value=l.denominator?Math.min(n,l.denominator):n},a=Nl(e=>i(e),l.debounce),t=async e=>await a(e);return(e,n)=>(O.openBlock(),O.createElementBlock("div",uu,[O.createElementVNode("span",{contenteditable:l.editable,class:O.normalizeClass({"beam--alert":!s.value}),onClick:O.withModifiers(i,["stop","prevent"]),onInput:O.withModifiers(t,["stop","prevent"]),onPaste:i},O.toDisplayString(u.value),43,cu),l.denominator?(O.openBlock(),O.createElementBlock("span",fu,"/"+O.toDisplayString(l.denominator),1)):O.createCommentVNode("",!0),l.uom?(O.openBlock(),O.createElementBlock("span",hu,"  "+O.toDisplayString(l.uom),1)):O.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-d4f676ed"]]),du=["href"],Si=Ue(O.defineComponent({__name:"ListAnchor",props:{to:{default:""}},setup(l){return(u,s)=>(O.openBlock(),O.createElementBlock("a",{href:l.to,class:"beam_list-anchor"},[O.renderSlot(u.$slots,"default",{},void 0,!0)],8,du))}}),[["__scopeId","data-v-7e3ecf0d"]]),pu={tabindex:"0",class:"beam_list-item"},gu={class:"beam_list-text"},mu={class:"beam--bold"},er=Ue(O.defineComponent({__name:"ListItem",props:{item:{}},emits:["update"],setup(l,{emit:u}){const s=u,i=O.ref(l.item);return O.watch(i,a=>{s("update",a)},{deep:!0}),(a,t)=>(O.openBlock(),O.createElementBlock("li",pu,[O.createElementVNode("div",gu,[O.createElementVNode("label",mu,O.toDisplayString(i.value.label),1),O.createElementVNode("p",null,O.toDisplayString(i.value.description),1)]),i.value.count?(O.openBlock(),O.createBlock($r,{key:0,modelValue:i.value.count.count,"onUpdate:modelValue":t[0]||(t[0]=e=>i.value.count.count=e),debounce:i.value.debounce,denominator:i.value.count.of,editable:!0,uom:i.value.count.uom},null,8,["modelValue","debounce","denominator","uom"])):O.createCommentVNode("",!0),i.value.hasOwnProperty("checked")?(O.openBlock(),O.createBlock(qr,{key:1,modelValue:i.value.checked,"onUpdate:modelValue":t[1]||(t[1]=e=>i.value.checked=e)},null,8,["modelValue"])):O.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-634dd647"]]),Au={class:"beam_list-view"},xi=Ue(O.defineComponent({__name:"ListView",props:{items:{}},emits:["update","scrollbottom"],setup(l,{emit:u}){const s=u;O.onMounted(()=>{window.addEventListener("scroll",a)}),O.onUnmounted(()=>{window.removeEventListener("scroll",a)});const i=t=>s("update",t),a=()=>{const t=document.documentElement.scrollHeight-window.innerHeight,e=document.documentElement.scrollTop;t-e<=2&&s("scrollbottom")};return(t,e)=>(O.openBlock(),O.createElementBlock("ul",Au,[(O.openBlock(!0),O.createElementBlock(O.Fragment,null,O.renderList(l.items,n=>(O.openBlock(),O.createElementBlock("li",{key:n.barcode||n.label},[n.linkComponent=="BeamDayDivider"?(O.openBlock(),O.createBlock(Fr,{key:0,item:n},null,8,["item"])):n.linkComponent?(O.openBlock(),O.createBlock(O.resolveDynamicComponent(n.linkComponent),{key:1,to:n.route,tabindex:"-1"},{default:O.withCtx(()=>[O.createVNode(er,{item:n,onUpdate:i},null,8,["item"])]),_:2},1032,["to"])):(O.openBlock(),O.createBlock(er,{key:2,item:n,onUpdate:i},null,8,["item"]))]))),128))]))}}),[["__scopeId","data-v-d536b2a7"]]),yu={class:"beam_navbar"},Ii=Ue(O.defineComponent({__name:"Navbar",emits:["click"],setup(l,{emit:u}){const s=u,i=()=>{s("click")};return(a,t)=>{const e=O.resolveComponent("BeamHeading"),n=O.resolveComponent("BeamBtn");return O.openBlock(),O.createElementBlock("nav",yu,[O.renderSlot(a.$slots,"title",{},()=>[O.createVNode(e,null,{default:O.withCtx(()=>[...t[0]||(t[0]=[O.createTextVNode("TITLE",-1)])]),_:1})],!0),O.createVNode(n,{onClick:i},{default:O.withCtx(()=>[O.renderSlot(a.$slots,"navbaraction",{},()=>[t[1]||(t[1]=O.createTextVNode("Action",-1))],!0)]),_:3})])}}}),[["__scopeId","data-v-cfc4c14e"]]);function bu(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var tr={exports:{}},wu=tr.exports,Ci;function vu(){return Ci||(Ci=1,(function(l,u){(function(s,i){l.exports=i()})(wu,(function(){var s={attachTo:function(i,a){if(i.scannerDetectionData!==void 0)throw new Error("onScan.js is already initialized for DOM element "+i);var t={onScan:function(e,n){},onScanError:function(e){},onKeyProcess:function(e,n){},onKeyDetect:function(e,n){},onPaste:function(e,n){},keyCodeMapper:function(e){return s.decodeKeyEvent(e)},onScanButtonLongPress:function(){},scanButtonKeyCode:!1,scanButtonLongPressTime:500,timeBeforeScanTest:100,avgTimeByChar:30,minLength:6,suffixKeyCodes:[9,13],prefixKeyCodes:[],ignoreIfFocusOn:!1,stopPropagation:!1,preventDefault:!1,captureEvents:!1,reactToKeydown:!0,reactToPaste:!1,singleScanQty:1};return a=this._mergeOptions(t,a),i.scannerDetectionData={options:a,vars:{firstCharTime:0,lastCharTime:0,accumulatedString:"",testTimer:!1,longPressTimeStart:0,longPressed:!1}},a.reactToPaste===!0&&i.addEventListener("paste",this._handlePaste,a.captureEvents),a.scanButtonKeyCode!==!1&&i.addEventListener("keyup",this._handleKeyUp,a.captureEvents),(a.reactToKeydown===!0||a.scanButtonKeyCode!==!1)&&i.addEventListener("keydown",this._handleKeyDown,a.captureEvents),this},detachFrom:function(i){i.scannerDetectionData.options.reactToPaste&&i.removeEventListener("paste",this._handlePaste),i.scannerDetectionData.options.scanButtonKeyCode!==!1&&i.removeEventListener("keyup",this._handleKeyUp),i.removeEventListener("keydown",this._handleKeyDown),i.scannerDetectionData=void 0},getOptions:function(i){return i.scannerDetectionData.options},setOptions:function(i,a){switch(i.scannerDetectionData.options.reactToPaste){case!0:a.reactToPaste===!1&&i.removeEventListener("paste",this._handlePaste);break;case!1:a.reactToPaste===!0&&i.addEventListener("paste",this._handlePaste);break}return i.scannerDetectionData.options.scanButtonKeyCode===!1?a.scanButtonKeyCode!==!1&&i.addEventListener("keyup",this._handleKeyUp):a.scanButtonKeyCode===!1&&i.removeEventListener("keyup",this._handleKeyUp),i.scannerDetectionData.options=this._mergeOptions(i.scannerDetectionData.options,a),this._reinitialize(i),this},decodeKeyEvent:function(i){var a=this._getNormalizedKeyNum(i);switch(!0){case(a>=48&&a<=90):case(a>=106&&a<=111):if(i.key!==void 0&&i.key!=="")return i.key;var t=String.fromCharCode(a);switch(i.shiftKey){case!1:t=t.toLowerCase();break;case!0:t=t.toUpperCase();break}return t;case(a>=96&&a<=105):return 0+(a-96)}return""},simulate:function(i,a){return this._reinitialize(i),Array.isArray(a)?a.forEach(function(t){var e={};(typeof t=="object"||typeof t=="function")&&t!==null?e=t:e.keyCode=parseInt(t);var n=new KeyboardEvent("keydown",e);document.dispatchEvent(n)}):this._validateScanCode(i,a),this},_reinitialize:function(i){var a=i.scannerDetectionData.vars;a.firstCharTime=0,a.lastCharTime=0,a.accumulatedString=""},_isFocusOnIgnoredElement:function(i){var a=i.scannerDetectionData.options.ignoreIfFocusOn;if(!a)return!1;var t=document.activeElement;if(Array.isArray(a)){for(var e=0;e<a.length;e++)if(t.matches(a[e])===!0)return!0}else if(t.matches(a))return!0;return!1},_validateScanCode:function(i,a){var t=i.scannerDetectionData,e=t.options,n=t.options.singleScanQty,r=t.vars.firstCharTime,o=t.vars.lastCharTime,c={},p;switch(!0){case a.length<e.minLength:c={message:"Receieved code is shorter then minimal length"};break;case o-r>a.length*e.avgTimeByChar:c={message:"Receieved code was not entered in time"};break;default:return e.onScan.call(i,a,n),p=new CustomEvent("scan",{detail:{scanCode:a,qty:n}}),i.dispatchEvent(p),s._reinitialize(i),!0}return c.scanCode=a,c.scanDuration=o-r,c.avgTimeByChar=e.avgTimeByChar,c.minLength=e.minLength,e.onScanError.call(i,c),p=new CustomEvent("scanError",{detail:c}),i.dispatchEvent(p),s._reinitialize(i),!1},_mergeOptions:function(i,a){var t={},e;for(e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);for(e in a)Object.prototype.hasOwnProperty.call(a,e)&&(t[e]=a[e]);return t},_getNormalizedKeyNum:function(i){return i.which||i.keyCode},_handleKeyDown:function(i){var a=s._getNormalizedKeyNum(i),t=this.scannerDetectionData.options,e=this.scannerDetectionData.vars,n=!1;if(t.onKeyDetect.call(this,a,i)!==!1&&!s._isFocusOnIgnoredElement(this)){if(t.scanButtonKeyCode!==!1&&a==t.scanButtonKeyCode){e.longPressed||(e.longPressTimer=setTimeout(t.onScanButtonLongPress,t.scanButtonLongPressTime,this),e.longPressed=!0);return}switch(!0){case(e.firstCharTime&&t.suffixKeyCodes.indexOf(a)!==-1):i.preventDefault(),i.stopImmediatePropagation(),n=!0;break;case(!e.firstCharTime&&t.prefixKeyCodes.indexOf(a)!==-1):i.preventDefault(),i.stopImmediatePropagation(),n=!1;break;default:var r=t.keyCodeMapper.call(this,i);if(r===null)return;e.accumulatedString+=r,t.preventDefault&&i.preventDefault(),t.stopPropagation&&i.stopImmediatePropagation(),n=!1;break}e.firstCharTime||(e.firstCharTime=Date.now()),e.lastCharTime=Date.now(),e.testTimer&&clearTimeout(e.testTimer),n?(s._validateScanCode(this,e.accumulatedString),e.testTimer=!1):e.testTimer=setTimeout(s._validateScanCode,t.timeBeforeScanTest,this,e.accumulatedString),t.onKeyProcess.call(this,r,i)}},_handlePaste:function(i){var a=this.scannerDetectionData.options,t=this.scannerDetectionData.vars,e=(event.clipboardData||window.clipboardData).getData("text");s._isFocusOnIgnoredElement(this)||(i.preventDefault(),a.stopPropagation&&i.stopImmediatePropagation(),a.onPaste.call(this,e,event),t.firstCharTime=0,t.lastCharTime=0,s._validateScanCode(this,e))},_handleKeyUp:function(i){if(!s._isFocusOnIgnoredElement(this)){var a=s._getNormalizedKeyNum(i);a==this.scannerDetectionData.options.scanButtonKeyCode&&(clearTimeout(this.scannerDetectionData.vars.longPressTimer),this.scannerDetectionData.vars.longPressed=!1)}},isScanInProgressFor:function(i){return i.scannerDetectionData.vars.firstCharTime>0},isAttachedTo:function(i){return i.scannerDetectionData!==void 0}};return s}))})(tr)),tr.exports}var _u=vu();const ki=bu(_u),Eu={id:"scan_input"},Ti=O.defineComponent({__name:"ScanInput",props:{scanHandler:{type:Function}},emits:["scanInstance"],setup(l,{emit:u}){const s=u,i=l;return O.onMounted(()=>{const a=ki.attachTo(window,{onScan:i.scanHandler});s("scanInstance",a)}),O.onUnmounted(()=>{ki.detachFrom(window)}),(a,t)=>(O.openBlock(),O.createElementBlock("div",Eu))}}),Oi=Ue(O.defineComponent({__name:"SegmentedDisplay",props:{displayInput:{default:120.2568},decimalPlaces:{default:2},displayColor:{default:"gray"},textColor:{default:"white"}},setup(l){const u=O.computed(()=>l.displayInput===0?0 .toFixed(l.decimalPlaces):l.displayInput.toFixed(l.decimalPlaces)),s=i=>i?.substring(0,2)=="--"?`var(${i})`:i;return(i,a)=>(O.openBlock(),O.createElementBlock("div",{class:"segmented-display",style:O.normalizeStyle({background:s(l.displayColor)})},[O.createElementVNode("h1",{class:"segmented-display-output",style:O.normalizeStyle({color:s(l.textColor)})},O.toDisplayString(u.value),5)],4))}}),[["__scopeId","data-v-1731e036"]]),Su={class:"column column-left"},xu={class:"column column-right"},Pi=Ue(O.defineComponent({__name:"SplitColumn",props:{justifyContent:{default:"space-between"},alignItems:{default:"flex-start"}},setup(l){return(u,s)=>(O.openBlock(),O.createElementBlock("div",{class:"two-column",style:O.normalizeStyle({justifyContent:l.justifyContent,alignItems:l.alignItems})},[O.createElementVNode("div",Su,[O.renderSlot(u.$slots,"left",{},void 0,!0)]),O.createElementVNode("div",xu,[O.renderSlot(u.$slots,"right",{},void 0,!0)])],4))}}),[["__scopeId","data-v-3f65313d"]]),Bi=Ue(O.defineComponent({__name:"ToggleArrow",props:{open:{type:Boolean}},setup(l){return(u,s)=>(O.openBlock(),O.createElementBlock("div",{class:O.normalizeClass(["arrow-icon",{open:l.open}])},[...s[0]||(s[0]=[O.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[O.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})],-1)])],2))}}),[["__scopeId","data-v-05e7abed"]]);var Hr=Object.defineProperty,Iu=Object.getOwnPropertyDescriptor,Cu=Object.getOwnPropertyNames,ku=Object.prototype.hasOwnProperty,$e=(l,u)=>()=>(l&&(u=l(l=0)),u),ge=(l,u)=>()=>(u||l((u={exports:{}}).exports,u),u.exports),Pt=(l,u)=>{for(var s in u)Hr(l,s,{get:u[s],enumerable:!0})},Tu=(l,u,s,i)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of Cu(u))!ku.call(l,a)&&a!==s&&Hr(l,a,{get:()=>u[a],enumerable:!(i=Iu(u,a))||i.enumerable});return l},Be=l=>Tu(Hr({},"__esModule",{value:!0}),l),ue=$e(()=>{}),Me={};Pt(Me,{_debugEnd:()=>Tn,_debugProcess:()=>kn,_events:()=>qn,_eventsCount:()=>$n,_exiting:()=>pn,_fatalExceptions:()=>xn,_getActiveHandles:()=>Fi,_getActiveRequests:()=>ji,_kill:()=>An,_linkedBinding:()=>Ui,_maxListeners:()=>Qn,_preload_modules:()=>Wn,_rawDebug:()=>fn,_startProfilerIdleNotifier:()=>On,_stopProfilerIdleNotifier:()=>Pn,_tickCallback:()=>Cn,abort:()=>Dn,addListener:()=>Hn,allowedNodeEnvironmentFlags:()=>En,arch:()=>Jr,argv:()=>Xr,argv0:()=>Ln,assert:()=>Li,binding:()=>on,browser:()=>cn,chdir:()=>ln,config:()=>gn,cpuUsage:()=>Kt,cwd:()=>an,debugPort:()=>Fn,default:()=>to,dlopen:()=>Ni,domain:()=>dn,emit:()=>Zn,emitWarning:()=>nn,env:()=>Zr,execArgv:()=>en,execPath:()=>jn,exit:()=>vn,features:()=>Sn,hasUncaughtExceptionCaptureCallback:()=>Wi,hrtime:()=>rr,kill:()=>wn,listeners:()=>Vi,memoryUsage:()=>bn,moduleLoadList:()=>hn,nextTick:()=>Ri,off:()=>Gn,on:()=>ot,once:()=>zn,openStdin:()=>_n,pid:()=>Un,platform:()=>Yr,ppid:()=>Nn,prependListener:()=>Xn,prependOnceListener:()=>eo,reallyExit:()=>mn,release:()=>un,removeAllListeners:()=>Yn,removeListener:()=>Jn,resourceUsage:()=>yn,setSourceMapsEnabled:()=>Kn,setUncaughtExceptionCaptureCallback:()=>In,stderr:()=>Mn,stdin:()=>Rn,stdout:()=>Bn,title:()=>Gr,umask:()=>sn,uptime:()=>Ki,version:()=>tn,versions:()=>rn});function zr(l){throw new Error("Node.js process "+l+" is not supported by JSPM core outside of Node.js")}function Ou(){!_t||!Et||(_t=!1,Et.length?Je=Et.concat(Je):Wt=-1,Je.length&&Mi())}function Mi(){if(!_t){var l=setTimeout(Ou,0);_t=!0;for(var u=Je.length;u;){for(Et=Je,Je=[];++Wt<u;)Et&&Et[Wt].run();Wt=-1,u=Je.length}Et=null,_t=!1,clearTimeout(l)}}function Ri(l){var u=new Array(arguments.length-1);if(arguments.length>1)for(var s=1;s<arguments.length;s++)u[s-1]=arguments[s];Je.push(new Di(l,u)),Je.length===1&&!_t&&setTimeout(Mi,0)}function Di(l,u){this.fun=l,this.array=u}function Le(){}function Ui(l){zr("_linkedBinding")}function Ni(l){zr("dlopen")}function ji(){return[]}function Fi(){return[]}function Li(l,u){if(!l)throw new Error(u||"assertion error")}function Wi(){return!1}function Ki(){return it.now()/1e3}function rr(l){var u=Math.floor((Date.now()-it.now())*.001),s=it.now()*.001,i=Math.floor(s)+u,a=Math.floor(s%1*1e9);return l&&(i=i-l[0],a=a-l[1],a<0&&(i--,a+=nr)),[i,a]}function ot(){return to}function Vi(l){return[]}var Je,_t,Et,Wt,Gr,Jr,Yr,Zr,Xr,en,tn,rn,nn,on,sn,an,ln,un,cn,fn,hn,dn,pn,gn,mn,An,Kt,yn,bn,wn,vn,_n,En,Sn,xn,In,Cn,kn,Tn,On,Pn,Bn,Mn,Rn,Dn,Un,Nn,jn,Fn,Ln,Wn,Kn,it,Vn,nr,Qn,qn,$n,Hn,zn,Gn,Jn,Yn,Zn,Xn,eo,to,Pu=$e(()=>{ue(),fe(),ce(),Je=[],_t=!1,Wt=-1,Di.prototype.run=function(){this.fun.apply(null,this.array)},Gr="browser",Jr="x64",Yr="browser",Zr={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},Xr=["/usr/bin/node"],en=[],tn="v16.8.0",rn={},nn=function(l,u){console.warn((u?u+": ":"")+l)},on=function(l){zr("binding")},sn=function(l){return 0},an=function(){return"/"},ln=function(l){},un={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},cn=!0,fn=Le,hn=[],dn={},pn=!1,gn={},mn=Le,An=Le,Kt=function(){return{}},yn=Kt,bn=Kt,wn=Le,vn=Le,_n=Le,En={},Sn={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},xn=Le,In=Le,Cn=Le,kn=Le,Tn=Le,On=Le,Pn=Le,Bn=void 0,Mn=void 0,Rn=void 0,Dn=Le,Un=2,Nn=1,jn="/bin/usr/node",Fn=9229,Ln="node",Wn=[],Kn=Le,it={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},it.now===void 0&&(Vn=Date.now(),it.timing&&it.timing.navigationStart&&(Vn=it.timing.navigationStart),it.now=()=>Date.now()-Vn),nr=1e9,rr.bigint=function(l){var u=rr(l);return typeof BigInt>"u"?u[0]*nr+u[1]:BigInt(u[0]*nr)+BigInt(u[1])},Qn=10,qn={},$n=0,Hn=ot,zn=ot,Gn=ot,Jn=ot,Yn=ot,Zn=Le,Xn=ot,eo=ot,to={version:tn,versions:rn,arch:Jr,platform:Yr,browser:cn,release:un,_rawDebug:fn,moduleLoadList:hn,binding:on,_linkedBinding:Ui,_events:qn,_eventsCount:$n,_maxListeners:Qn,on:ot,addListener:Hn,once:zn,off:Gn,removeListener:Jn,removeAllListeners:Yn,emit:Zn,prependListener:Xn,prependOnceListener:eo,listeners:Vi,domain:dn,_exiting:pn,config:gn,dlopen:Ni,uptime:Ki,_getActiveRequests:ji,_getActiveHandles:Fi,reallyExit:mn,_kill:An,cpuUsage:Kt,resourceUsage:yn,memoryUsage:bn,kill:wn,exit:vn,openStdin:_n,allowedNodeEnvironmentFlags:En,assert:Li,features:Sn,_fatalExceptions:xn,setUncaughtExceptionCaptureCallback:In,hasUncaughtExceptionCaptureCallback:Wi,emitWarning:nn,nextTick:Ri,_tickCallback:Cn,_debugProcess:kn,_debugEnd:Tn,_startProfilerIdleNotifier:On,_stopProfilerIdleNotifier:Pn,stdout:Bn,stdin:Rn,stderr:Mn,abort:Dn,umask:sn,chdir:ln,cwd:an,env:Zr,title:Gr,argv:Xr,execArgv:en,pid:Un,ppid:Nn,execPath:jn,debugPort:Fn,hrtime:rr,argv0:Ln,_preload_modules:Wn,setSourceMapsEnabled:Kn}}),ce=$e(()=>{Pu()});function Bu(){if(ro)return Bt;ro=!0,Bt.byteLength=n,Bt.toByteArray=o,Bt.fromByteArray=g;for(var l=[],u=[],s=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,t=i.length;a<t;++a)l[a]=i[a],u[i.charCodeAt(a)]=a;u[45]=62,u[95]=63;function e(y){var h=y.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var m=y.indexOf("=");m===-1&&(m=h);var A=m===h?0:4-m%4;return[m,A]}function n(y){var h=e(y),m=h[0],A=h[1];return(m+A)*3/4-A}function r(y,h,m){return(h+m)*3/4-m}function o(y){var h,m=e(y),A=m[0],_=m[1],d=new s(r(y,A,_)),v=0,S=_>0?A-4:A,b;for(b=0;b<S;b+=4)h=u[y.charCodeAt(b)]<<18|u[y.charCodeAt(b+1)]<<12|u[y.charCodeAt(b+2)]<<6|u[y.charCodeAt(b+3)],d[v++]=h>>16&255,d[v++]=h>>8&255,d[v++]=h&255;return _===2&&(h=u[y.charCodeAt(b)]<<2|u[y.charCodeAt(b+1)]>>4,d[v++]=h&255),_===1&&(h=u[y.charCodeAt(b)]<<10|u[y.charCodeAt(b+1)]<<4|u[y.charCodeAt(b+2)]>>2,d[v++]=h>>8&255,d[v++]=h&255),d}function c(y){return l[y>>18&63]+l[y>>12&63]+l[y>>6&63]+l[y&63]}function p(y,h,m){for(var A,_=[],d=h;d<m;d+=3)A=(y[d]<<16&16711680)+(y[d+1]<<8&65280)+(y[d+2]&255),_.push(c(A));return _.join("")}function g(y){for(var h,m=y.length,A=m%3,_=[],d=16383,v=0,S=m-A;v<S;v+=d)_.push(p(y,v,v+d>S?S:v+d));return A===1?(h=y[m-1],_.push(l[h>>2]+l[h<<4&63]+"==")):A===2&&(h=(y[m-2]<<8)+y[m-1],_.push(l[h>>10]+l[h>>4&63]+l[h<<2&63]+"=")),_.join("")}return Bt}function Mu(){return no?Vt:(no=!0,Vt.read=function(l,u,s,i,a){var t,e,n=a*8-i-1,r=(1<<n)-1,o=r>>1,c=-7,p=s?a-1:0,g=s?-1:1,y=l[u+p];for(p+=g,t=y&(1<<-c)-1,y>>=-c,c+=n;c>0;t=t*256+l[u+p],p+=g,c-=8);for(e=t&(1<<-c)-1,t>>=-c,c+=i;c>0;e=e*256+l[u+p],p+=g,c-=8);if(t===0)t=1-o;else{if(t===r)return e?NaN:(y?-1:1)*(1/0);e=e+Math.pow(2,i),t=t-o}return(y?-1:1)*e*Math.pow(2,t-i)},Vt.write=function(l,u,s,i,a,t){var e,n,r,o=t*8-a-1,c=(1<<o)-1,p=c>>1,g=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=i?0:t-1,h=i?1:-1,m=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===1/0?(n=isNaN(u)?1:0,e=c):(e=Math.floor(Math.log(u)/Math.LN2),u*(r=Math.pow(2,-e))<1&&(e--,r*=2),e+p>=1?u+=g/r:u+=g*Math.pow(2,1-p),u*r>=2&&(e++,r/=2),e+p>=c?(n=0,e=c):e+p>=1?(n=(u*r-1)*Math.pow(2,a),e=e+p):(n=u*Math.pow(2,p-1)*Math.pow(2,a),e=0));a>=8;l[s+y]=n&255,y+=h,n/=256,a-=8);for(e=e<<a|n,o+=a;o>0;l[s+y]=e&255,y+=h,e/=256,o-=8);l[s+y-h]|=m*128},Vt)}function Ru(){if(oo)return pt;oo=!0;let l=Bu(),u=Mu(),s=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;pt.Buffer=e,pt.SlowBuffer=_,pt.INSPECT_MAX_BYTES=50;let i=2147483647;pt.kMaxLength=i,e.TYPED_ARRAY_SUPPORT=a(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{let f=new Uint8Array(1),w={foo:function(){return 42}};return Object.setPrototypeOf(w,Uint8Array.prototype),Object.setPrototypeOf(f,w),f.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function t(f){if(f>i)throw new RangeError('The value "'+f+'" is invalid for option "size"');let w=new Uint8Array(f);return Object.setPrototypeOf(w,e.prototype),w}function e(f,w,I){if(typeof f=="number"){if(typeof w=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(f)}return n(f,w,I)}e.poolSize=8192;function n(f,w,I){if(typeof f=="string")return p(f,w);if(ArrayBuffer.isView(f))return y(f);if(f==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f);if(Q(f,ArrayBuffer)||f&&Q(f.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Q(f,SharedArrayBuffer)||f&&Q(f.buffer,SharedArrayBuffer)))return h(f,w,I);if(typeof f=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let j=f.valueOf&&f.valueOf();if(j!=null&&j!==f)return e.from(j,w,I);let X=m(f);if(X)return X;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof f[Symbol.toPrimitive]=="function")return e.from(f[Symbol.toPrimitive]("string"),w,I);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f)}e.from=function(f,w,I){return n(f,w,I)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function r(f){if(typeof f!="number")throw new TypeError('"size" argument must be of type number');if(f<0)throw new RangeError('The value "'+f+'" is invalid for option "size"')}function o(f,w,I){return r(f),f<=0?t(f):w!==void 0?typeof I=="string"?t(f).fill(w,I):t(f).fill(w):t(f)}e.alloc=function(f,w,I){return o(f,w,I)};function c(f){return r(f),t(f<0?0:A(f)|0)}e.allocUnsafe=function(f){return c(f)},e.allocUnsafeSlow=function(f){return c(f)};function p(f,w){if((typeof w!="string"||w==="")&&(w="utf8"),!e.isEncoding(w))throw new TypeError("Unknown encoding: "+w);let I=d(f,w)|0,j=t(I),X=j.write(f,w);return X!==I&&(j=j.slice(0,X)),j}function g(f){let w=f.length<0?0:A(f.length)|0,I=t(w);for(let j=0;j<w;j+=1)I[j]=f[j]&255;return I}function y(f){if(Q(f,Uint8Array)){let w=new Uint8Array(f);return h(w.buffer,w.byteOffset,w.byteLength)}return g(f)}function h(f,w,I){if(w<0||f.byteLength<w)throw new RangeError('"offset" is outside of buffer bounds');if(f.byteLength<w+(I||0))throw new RangeError('"length" is outside of buffer bounds');let j;return w===void 0&&I===void 0?j=new Uint8Array(f):I===void 0?j=new Uint8Array(f,w):j=new Uint8Array(f,w,I),Object.setPrototypeOf(j,e.prototype),j}function m(f){if(e.isBuffer(f)){let w=A(f.length)|0,I=t(w);return I.length===0||f.copy(I,0,0,w),I}if(f.length!==void 0)return typeof f.length!="number"||me(f.length)?t(0):g(f);if(f.type==="Buffer"&&Array.isArray(f.data))return g(f.data)}function A(f){if(f>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return f|0}function _(f){return+f!=f&&(f=0),e.alloc(+f)}e.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==e.prototype},e.compare=function(f,w){if(Q(f,Uint8Array)&&(f=e.from(f,f.offset,f.byteLength)),Q(w,Uint8Array)&&(w=e.from(w,w.offset,w.byteLength)),!e.isBuffer(f)||!e.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===w)return 0;let I=f.length,j=w.length;for(let X=0,he=Math.min(I,j);X<he;++X)if(f[X]!==w[X]){I=f[X],j=w[X];break}return I<j?-1:j<I?1:0},e.isEncoding=function(f){switch(String(f).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(f,w){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return e.alloc(0);let I;if(w===void 0)for(w=0,I=0;I<f.length;++I)w+=f[I].length;let j=e.allocUnsafe(w),X=0;for(I=0;I<f.length;++I){let he=f[I];if(Q(he,Uint8Array))X+he.length>j.length?(e.isBuffer(he)||(he=e.from(he)),he.copy(j,X)):Uint8Array.prototype.set.call(j,he,X);else if(e.isBuffer(he))he.copy(j,X);else throw new TypeError('"list" argument must be an Array of Buffers');X+=he.length}return j};function d(f,w){if(e.isBuffer(f))return f.length;if(ArrayBuffer.isView(f)||Q(f,ArrayBuffer))return f.byteLength;if(typeof f!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof f);let I=f.length,j=arguments.length>2&&arguments[2]===!0;if(!j&&I===0)return 0;let X=!1;for(;;)switch(w){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":return K(f).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I*2;case"hex":return I>>>1;case"base64":return pe(f).length;default:if(X)return j?-1:K(f).length;w=(""+w).toLowerCase(),X=!0}}e.byteLength=d;function v(f,w,I){let j=!1;if((w===void 0||w<0)&&(w=0),w>this.length||((I===void 0||I>this.length)&&(I=this.length),I<=0)||(I>>>=0,w>>>=0,I<=w))return"";for(f||(f="utf8");;)switch(f){case"hex":return H(this,w,I);case"utf8":case"utf-8":return V(this,w,I);case"ascii":return le(this,w,I);case"latin1":case"binary":return J(this,w,I);case"base64":return k(this,w,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,w,I);default:if(j)throw new TypeError("Unknown encoding: "+f);f=(f+"").toLowerCase(),j=!0}}e.prototype._isBuffer=!0;function S(f,w,I){let j=f[w];f[w]=f[I],f[I]=j}e.prototype.swap16=function(){let f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<f;w+=2)S(this,w,w+1);return this},e.prototype.swap32=function(){let f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<f;w+=4)S(this,w,w+3),S(this,w+1,w+2);return this},e.prototype.swap64=function(){let f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<f;w+=8)S(this,w,w+7),S(this,w+1,w+6),S(this,w+2,w+5),S(this,w+3,w+4);return this},e.prototype.toString=function(){let f=this.length;return f===0?"":arguments.length===0?V(this,0,f):v.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(f){if(!e.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:e.compare(this,f)===0},e.prototype.inspect=function(){let f="",w=pt.INSPECT_MAX_BYTES;return f=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(f+=" ... "),"<Buffer "+f+">"},s&&(e.prototype[s]=e.prototype.inspect),e.prototype.compare=function(f,w,I,j,X){if(Q(f,Uint8Array)&&(f=e.from(f,f.offset,f.byteLength)),!e.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(w===void 0&&(w=0),I===void 0&&(I=f?f.length:0),j===void 0&&(j=0),X===void 0&&(X=this.length),w<0||I>f.length||j<0||X>this.length)throw new RangeError("out of range index");if(j>=X&&w>=I)return 0;if(j>=X)return-1;if(w>=I)return 1;if(w>>>=0,I>>>=0,j>>>=0,X>>>=0,this===f)return 0;let he=X-j,Ee=I-w,$=Math.min(he,Ee),ie=this.slice(j,X),Ie=f.slice(w,I);for(let Ce=0;Ce<$;++Ce)if(ie[Ce]!==Ie[Ce]){he=ie[Ce],Ee=Ie[Ce];break}return he<Ee?-1:Ee<he?1:0};function b(f,w,I,j,X){if(f.length===0)return-1;if(typeof I=="string"?(j=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,me(I)&&(I=X?0:f.length-1),I<0&&(I=f.length+I),I>=f.length){if(X)return-1;I=f.length-1}else if(I<0)if(X)I=0;else return-1;if(typeof w=="string"&&(w=e.from(w,j)),e.isBuffer(w))return w.length===0?-1:x(f,w,I,j,X);if(typeof w=="number")return w=w&255,typeof Uint8Array.prototype.indexOf=="function"?X?Uint8Array.prototype.indexOf.call(f,w,I):Uint8Array.prototype.lastIndexOf.call(f,w,I):x(f,[w],I,j,X);throw new TypeError("val must be string, number or Buffer")}function x(f,w,I,j,X){let he=1,Ee=f.length,$=w.length;if(j!==void 0&&(j=String(j).toLowerCase(),j==="ucs2"||j==="ucs-2"||j==="utf16le"||j==="utf-16le")){if(f.length<2||w.length<2)return-1;he=2,Ee/=2,$/=2,I/=2}function ie(Ce,ke){return he===1?Ce[ke]:Ce.readUInt16BE(ke*he)}let Ie;if(X){let Ce=-1;for(Ie=I;Ie<Ee;Ie++)if(ie(f,Ie)===ie(w,Ce===-1?0:Ie-Ce)){if(Ce===-1&&(Ce=Ie),Ie-Ce+1===$)return Ce*he}else Ce!==-1&&(Ie-=Ie-Ce),Ce=-1}else for(I+$>Ee&&(I=Ee-$),Ie=I;Ie>=0;Ie--){let Ce=!0;for(let ke=0;ke<$;ke++)if(ie(f,Ie+ke)!==ie(w,ke)){Ce=!1;break}if(Ce)return Ie}return-1}e.prototype.includes=function(f,w,I){return this.indexOf(f,w,I)!==-1},e.prototype.indexOf=function(f,w,I){return b(this,f,w,I,!0)},e.prototype.lastIndexOf=function(f,w,I){return b(this,f,w,I,!1)};function E(f,w,I,j){I=Number(I)||0;let X=f.length-I;j?(j=Number(j),j>X&&(j=X)):j=X;let he=w.length;j>he/2&&(j=he/2);let Ee;for(Ee=0;Ee<j;++Ee){let $=parseInt(w.substr(Ee*2,2),16);if(me($))return Ee;f[I+Ee]=$}return Ee}function C(f,w,I,j){return be(K(w,f.length-I),f,I,j)}function M(f,w,I,j){return be(te(w),f,I,j)}function P(f,w,I,j){return be(pe(w),f,I,j)}function F(f,w,I,j){return be(de(w,f.length-I),f,I,j)}e.prototype.write=function(f,w,I,j){if(w===void 0)j="utf8",I=this.length,w=0;else if(I===void 0&&typeof w=="string")j=w,I=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(I)?(I=I>>>0,j===void 0&&(j="utf8")):(j=I,I=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let X=this.length-w;if((I===void 0||I>X)&&(I=X),f.length>0&&(I<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");j||(j="utf8");let he=!1;for(;;)switch(j){case"hex":return E(this,f,w,I);case"utf8":case"utf-8":return C(this,f,w,I);case"ascii":case"latin1":case"binary":return M(this,f,w,I);case"base64":return P(this,f,w,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,f,w,I);default:if(he)throw new TypeError("Unknown encoding: "+j);j=(""+j).toLowerCase(),he=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(f,w,I){return w===0&&I===f.length?l.fromByteArray(f):l.fromByteArray(f.slice(w,I))}function V(f,w,I){I=Math.min(f.length,I);let j=[],X=w;for(;X<I;){let he=f[X],Ee=null,$=he>239?4:he>223?3:he>191?2:1;if(X+$<=I){let ie,Ie,Ce,ke;switch($){case 1:he<128&&(Ee=he);break;case 2:ie=f[X+1],(ie&192)===128&&(ke=(he&31)<<6|ie&63,ke>127&&(Ee=ke));break;case 3:ie=f[X+1],Ie=f[X+2],(ie&192)===128&&(Ie&192)===128&&(ke=(he&15)<<12|(ie&63)<<6|Ie&63,ke>2047&&(ke<55296||ke>57343)&&(Ee=ke));break;case 4:ie=f[X+1],Ie=f[X+2],Ce=f[X+3],(ie&192)===128&&(Ie&192)===128&&(Ce&192)===128&&(ke=(he&15)<<18|(ie&63)<<12|(Ie&63)<<6|Ce&63,ke>65535&&ke<1114112&&(Ee=ke))}}Ee===null?(Ee=65533,$=1):Ee>65535&&(Ee-=65536,j.push(Ee>>>10&1023|55296),Ee=56320|Ee&1023),j.push(Ee),X+=$}return N(j)}let L=4096;function N(f){let w=f.length;if(w<=L)return String.fromCharCode.apply(String,f);let I="",j=0;for(;j<w;)I+=String.fromCharCode.apply(String,f.slice(j,j+=L));return I}function le(f,w,I){let j="";I=Math.min(f.length,I);for(let X=w;X<I;++X)j+=String.fromCharCode(f[X]&127);return j}function J(f,w,I){let j="";I=Math.min(f.length,I);for(let X=w;X<I;++X)j+=String.fromCharCode(f[X]);return j}function H(f,w,I){let j=f.length;(!w||w<0)&&(w=0),(!I||I<0||I>j)&&(I=j);let X="";for(let he=w;he<I;++he)X+=we[f[he]];return X}function ne(f,w,I){let j=f.slice(w,I),X="";for(let he=0;he<j.length-1;he+=2)X+=String.fromCharCode(j[he]+j[he+1]*256);return X}e.prototype.slice=function(f,w){let I=this.length;f=~~f,w=w===void 0?I:~~w,f<0?(f+=I,f<0&&(f=0)):f>I&&(f=I),w<0?(w+=I,w<0&&(w=0)):w>I&&(w=I),w<f&&(w=f);let j=this.subarray(f,w);return Object.setPrototypeOf(j,e.prototype),j};function W(f,w,I){if(f%1!==0||f<0)throw new RangeError("offset is not uint");if(f+w>I)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(f,w,I){f=f>>>0,w=w>>>0,I||W(f,w,this.length);let j=this[f],X=1,he=0;for(;++he<w&&(X*=256);)j+=this[f+he]*X;return j},e.prototype.readUintBE=e.prototype.readUIntBE=function(f,w,I){f=f>>>0,w=w>>>0,I||W(f,w,this.length);let j=this[f+--w],X=1;for(;w>0&&(X*=256);)j+=this[f+--w]*X;return j},e.prototype.readUint8=e.prototype.readUInt8=function(f,w){return f=f>>>0,w||W(f,1,this.length),this[f]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(f,w){return f=f>>>0,w||W(f,2,this.length),this[f]|this[f+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(f,w){return f=f>>>0,w||W(f,2,this.length),this[f]<<8|this[f+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(f,w){return f=f>>>0,w||W(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(f,w){return f=f>>>0,w||W(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},e.prototype.readBigUInt64LE=ae(function(f){f=f>>>0,Y(f,"offset");let w=this[f],I=this[f+7];(w===void 0||I===void 0)&&Ae(f,this.length-8);let j=w+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24,X=this[++f]+this[++f]*2**8+this[++f]*2**16+I*2**24;return BigInt(j)+(BigInt(X)<<BigInt(32))}),e.prototype.readBigUInt64BE=ae(function(f){f=f>>>0,Y(f,"offset");let w=this[f],I=this[f+7];(w===void 0||I===void 0)&&Ae(f,this.length-8);let j=w*2**24+this[++f]*2**16+this[++f]*2**8+this[++f],X=this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+I;return(BigInt(j)<<BigInt(32))+BigInt(X)}),e.prototype.readIntLE=function(f,w,I){f=f>>>0,w=w>>>0,I||W(f,w,this.length);let j=this[f],X=1,he=0;for(;++he<w&&(X*=256);)j+=this[f+he]*X;return X*=128,j>=X&&(j-=Math.pow(2,8*w)),j},e.prototype.readIntBE=function(f,w,I){f=f>>>0,w=w>>>0,I||W(f,w,this.length);let j=w,X=1,he=this[f+--j];for(;j>0&&(X*=256);)he+=this[f+--j]*X;return X*=128,he>=X&&(he-=Math.pow(2,8*w)),he},e.prototype.readInt8=function(f,w){return f=f>>>0,w||W(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},e.prototype.readInt16LE=function(f,w){f=f>>>0,w||W(f,2,this.length);let I=this[f]|this[f+1]<<8;return I&32768?I|4294901760:I},e.prototype.readInt16BE=function(f,w){f=f>>>0,w||W(f,2,this.length);let I=this[f+1]|this[f]<<8;return I&32768?I|4294901760:I},e.prototype.readInt32LE=function(f,w){return f=f>>>0,w||W(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},e.prototype.readInt32BE=function(f,w){return f=f>>>0,w||W(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},e.prototype.readBigInt64LE=ae(function(f){f=f>>>0,Y(f,"offset");let w=this[f],I=this[f+7];(w===void 0||I===void 0)&&Ae(f,this.length-8);let j=this[f+4]+this[f+5]*2**8+this[f+6]*2**16+(I<<24);return(BigInt(j)<<BigInt(32))+BigInt(w+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24)}),e.prototype.readBigInt64BE=ae(function(f){f=f>>>0,Y(f,"offset");let w=this[f],I=this[f+7];(w===void 0||I===void 0)&&Ae(f,this.length-8);let j=(w<<24)+this[++f]*2**16+this[++f]*2**8+this[++f];return(BigInt(j)<<BigInt(32))+BigInt(this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+I)}),e.prototype.readFloatLE=function(f,w){return f=f>>>0,w||W(f,4,this.length),u.read(this,f,!0,23,4)},e.prototype.readFloatBE=function(f,w){return f=f>>>0,w||W(f,4,this.length),u.read(this,f,!1,23,4)},e.prototype.readDoubleLE=function(f,w){return f=f>>>0,w||W(f,8,this.length),u.read(this,f,!0,52,8)},e.prototype.readDoubleBE=function(f,w){return f=f>>>0,w||W(f,8,this.length),u.read(this,f,!1,52,8)};function ee(f,w,I,j,X,he){if(!e.isBuffer(f))throw new TypeError('"buffer" argument must be a Buffer instance');if(w>X||w<he)throw new RangeError('"value" argument is out of bounds');if(I+j>f.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(f,w,I,j){if(f=+f,w=w>>>0,I=I>>>0,!j){let Ee=Math.pow(2,8*I)-1;ee(this,f,w,I,Ee,0)}let X=1,he=0;for(this[w]=f&255;++he<I&&(X*=256);)this[w+he]=f/X&255;return w+I},e.prototype.writeUintBE=e.prototype.writeUIntBE=function(f,w,I,j){if(f=+f,w=w>>>0,I=I>>>0,!j){let Ee=Math.pow(2,8*I)-1;ee(this,f,w,I,Ee,0)}let X=I-1,he=1;for(this[w+X]=f&255;--X>=0&&(he*=256);)this[w+X]=f/he&255;return w+I},e.prototype.writeUint8=e.prototype.writeUInt8=function(f,w,I){return f=+f,w=w>>>0,I||ee(this,f,w,1,255,0),this[w]=f&255,w+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(f,w,I){return f=+f,w=w>>>0,I||ee(this,f,w,2,65535,0),this[w]=f&255,this[w+1]=f>>>8,w+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(f,w,I){return f=+f,w=w>>>0,I||ee(this,f,w,2,65535,0),this[w]=f>>>8,this[w+1]=f&255,w+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(f,w,I){return f=+f,w=w>>>0,I||ee(this,f,w,4,4294967295,0),this[w+3]=f>>>24,this[w+2]=f>>>16,this[w+1]=f>>>8,this[w]=f&255,w+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(f,w,I){return f=+f,w=w>>>0,I||ee(this,f,w,4,4294967295,0),this[w]=f>>>24,this[w+1]=f>>>16,this[w+2]=f>>>8,this[w+3]=f&255,w+4};function B(f,w,I,j,X){G(w,j,X,f,I,7);let he=Number(w&BigInt(4294967295));f[I++]=he,he=he>>8,f[I++]=he,he=he>>8,f[I++]=he,he=he>>8,f[I++]=he;let Ee=Number(w>>BigInt(32)&BigInt(4294967295));return f[I++]=Ee,Ee=Ee>>8,f[I++]=Ee,Ee=Ee>>8,f[I++]=Ee,Ee=Ee>>8,f[I++]=Ee,I}function Z(f,w,I,j,X){G(w,j,X,f,I,7);let he=Number(w&BigInt(4294967295));f[I+7]=he,he=he>>8,f[I+6]=he,he=he>>8,f[I+5]=he,he=he>>8,f[I+4]=he;let Ee=Number(w>>BigInt(32)&BigInt(4294967295));return f[I+3]=Ee,Ee=Ee>>8,f[I+2]=Ee,Ee=Ee>>8,f[I+1]=Ee,Ee=Ee>>8,f[I]=Ee,I+8}e.prototype.writeBigUInt64LE=ae(function(f,w=0){return B(this,f,w,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=ae(function(f,w=0){return Z(this,f,w,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(f,w,I,j){if(f=+f,w=w>>>0,!j){let $=Math.pow(2,8*I-1);ee(this,f,w,I,$-1,-$)}let X=0,he=1,Ee=0;for(this[w]=f&255;++X<I&&(he*=256);)f<0&&Ee===0&&this[w+X-1]!==0&&(Ee=1),this[w+X]=(f/he>>0)-Ee&255;return w+I},e.prototype.writeIntBE=function(f,w,I,j){if(f=+f,w=w>>>0,!j){let $=Math.pow(2,8*I-1);ee(this,f,w,I,$-1,-$)}let X=I-1,he=1,Ee=0;for(this[w+X]=f&255;--X>=0&&(he*=256);)f<0&&Ee===0&&this[w+X+1]!==0&&(Ee=1),this[w+X]=(f/he>>0)-Ee&255;return w+I},e.prototype.writeInt8=function(f,w,I){return f=+f,w=w>>>0,I||ee(this,f,w,1,127,-128),f<0&&(f=255+f+1),this[w]=f&255,w+1},e.prototype.writeInt16LE=function(f,w,I){return f=+f,w=w>>>0,I||ee(this,f,w,2,32767,-32768),this[w]=f&255,this[w+1]=f>>>8,w+2},e.prototype.writeInt16BE=function(f,w,I){return f=+f,w=w>>>0,I||ee(this,f,w,2,32767,-32768),this[w]=f>>>8,this[w+1]=f&255,w+2},e.prototype.writeInt32LE=function(f,w,I){return f=+f,w=w>>>0,I||ee(this,f,w,4,2147483647,-2147483648),this[w]=f&255,this[w+1]=f>>>8,this[w+2]=f>>>16,this[w+3]=f>>>24,w+4},e.prototype.writeInt32BE=function(f,w,I){return f=+f,w=w>>>0,I||ee(this,f,w,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[w]=f>>>24,this[w+1]=f>>>16,this[w+2]=f>>>8,this[w+3]=f&255,w+4},e.prototype.writeBigInt64LE=ae(function(f,w=0){return B(this,f,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=ae(function(f,w=0){return Z(this,f,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ye(f,w,I,j,X,he){if(I+j>f.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function re(f,w,I,j,X){return w=+w,I=I>>>0,X||ye(f,w,I,4),u.write(f,w,I,j,23,4),I+4}e.prototype.writeFloatLE=function(f,w,I){return re(this,f,w,!0,I)},e.prototype.writeFloatBE=function(f,w,I){return re(this,f,w,!1,I)};function ve(f,w,I,j,X){return w=+w,I=I>>>0,X||ye(f,w,I,8),u.write(f,w,I,j,52,8),I+8}e.prototype.writeDoubleLE=function(f,w,I){return ve(this,f,w,!0,I)},e.prototype.writeDoubleBE=function(f,w,I){return ve(this,f,w,!1,I)},e.prototype.copy=function(f,w,I,j){if(!e.isBuffer(f))throw new TypeError("argument should be a Buffer");if(I||(I=0),!j&&j!==0&&(j=this.length),w>=f.length&&(w=f.length),w||(w=0),j>0&&j<I&&(j=I),j===I||f.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(I<0||I>=this.length)throw new RangeError("Index out of range");if(j<0)throw new RangeError("sourceEnd out of bounds");j>this.length&&(j=this.length),f.length-w<j-I&&(j=f.length-w+I);let X=j-I;return this===f&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(w,I,j):Uint8Array.prototype.set.call(f,this.subarray(I,j),w),X},e.prototype.fill=function(f,w,I,j){if(typeof f=="string"){if(typeof w=="string"?(j=w,w=0,I=this.length):typeof I=="string"&&(j=I,I=this.length),j!==void 0&&typeof j!="string")throw new TypeError("encoding must be a string");if(typeof j=="string"&&!e.isEncoding(j))throw new TypeError("Unknown encoding: "+j);if(f.length===1){let he=f.charCodeAt(0);(j==="utf8"&&he<128||j==="latin1")&&(f=he)}}else typeof f=="number"?f=f&255:typeof f=="boolean"&&(f=Number(f));if(w<0||this.length<w||this.length<I)throw new RangeError("Out of range index");if(I<=w)return this;w=w>>>0,I=I===void 0?this.length:I>>>0,f||(f=0);let X;if(typeof f=="number")for(X=w;X<I;++X)this[X]=f;else{let he=e.isBuffer(f)?f:e.from(f,j),Ee=he.length;if(Ee===0)throw new TypeError('The value "'+f+'" is invalid for argument "value"');for(X=0;X<I-w;++X)this[X+w]=he[X%Ee]}return this};let z={};function U(f,w,I){z[f]=class extends I{constructor(){super(),Object.defineProperty(this,"message",{value:w.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${f}]`,this.stack,delete this.name}get code(){return f}set code(j){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:j,writable:!0})}toString(){return`${this.name} [${f}]: ${this.message}`}}}U("ERR_BUFFER_OUT_OF_BOUNDS",function(f){return f?`${f} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(f,w){return`The "${f}" argument must be of type number. Received type ${typeof w}`},TypeError),U("ERR_OUT_OF_RANGE",function(f,w,I){let j=`The value of "${f}" is out of range.`,X=I;return Number.isInteger(I)&&Math.abs(I)>2**32?X=oe(String(I)):typeof I=="bigint"&&(X=String(I),(I>BigInt(2)**BigInt(32)||I<-(BigInt(2)**BigInt(32)))&&(X=oe(X)),X+="n"),j+=` It must be ${w}. Received ${X}`,j},RangeError);function oe(f){let w="",I=f.length,j=f[0]==="-"?1:0;for(;I>=j+4;I-=3)w=`_${f.slice(I-3,I)}${w}`;return`${f.slice(0,I)}${w}`}function q(f,w,I){Y(w,"offset"),(f[w]===void 0||f[w+I]===void 0)&&Ae(w,f.length-(I+1))}function G(f,w,I,j,X,he){if(f>I||f<w){let Ee=typeof w=="bigint"?"n":"",$;throw w===0||w===BigInt(0)?$=`>= 0${Ee} and < 2${Ee} ** ${(he+1)*8}${Ee}`:$=`>= -(2${Ee} ** ${(he+1)*8-1}${Ee}) and < 2 ** ${(he+1)*8-1}${Ee}`,new z.ERR_OUT_OF_RANGE("value",$,f)}q(j,X,he)}function Y(f,w){if(typeof f!="number")throw new z.ERR_INVALID_ARG_TYPE(w,"number",f)}function Ae(f,w,I){throw Math.floor(f)!==f?(Y(f,I),new z.ERR_OUT_OF_RANGE("offset","an integer",f)):w<0?new z.ERR_BUFFER_OUT_OF_BOUNDS:new z.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${w}`,f)}let se=/[^+/0-9A-Za-z-_]/g;function R(f){if(f=f.split("=")[0],f=f.trim().replace(se,""),f.length<2)return"";for(;f.length%4!==0;)f=f+"=";return f}function K(f,w){w=w||1/0;let I,j=f.length,X=null,he=[];for(let Ee=0;Ee<j;++Ee){if(I=f.charCodeAt(Ee),I>55295&&I<57344){if(!X){if(I>56319){(w-=3)>-1&&he.push(239,191,189);continue}else if(Ee+1===j){(w-=3)>-1&&he.push(239,191,189);continue}X=I;continue}if(I<56320){(w-=3)>-1&&he.push(239,191,189),X=I;continue}I=(X-55296<<10|I-56320)+65536}else X&&(w-=3)>-1&&he.push(239,191,189);if(X=null,I<128){if((w-=1)<0)break;he.push(I)}else if(I<2048){if((w-=2)<0)break;he.push(I>>6|192,I&63|128)}else if(I<65536){if((w-=3)<0)break;he.push(I>>12|224,I>>6&63|128,I&63|128)}else if(I<1114112){if((w-=4)<0)break;he.push(I>>18|240,I>>12&63|128,I>>6&63|128,I&63|128)}else throw new Error("Invalid code point")}return he}function te(f){let w=[];for(let I=0;I<f.length;++I)w.push(f.charCodeAt(I)&255);return w}function de(f,w){let I,j,X,he=[];for(let Ee=0;Ee<f.length&&!((w-=2)<0);++Ee)I=f.charCodeAt(Ee),j=I>>8,X=I%256,he.push(X),he.push(j);return he}function pe(f){return l.toByteArray(R(f))}function be(f,w,I,j){let X;for(X=0;X<j&&!(X+I>=w.length||X>=f.length);++X)w[X+I]=f[X];return X}function Q(f,w){return f instanceof w||f!=null&&f.constructor!=null&&f.constructor.name!=null&&f.constructor.name===w.name}function me(f){return f!==f}let we=(function(){let f="0123456789abcdef",w=new Array(256);for(let I=0;I<16;++I){let j=I*16;for(let X=0;X<16;++X)w[j+X]=f[I]+f[X]}return w})();function ae(f){return typeof BigInt>"u"?Te:f}function Te(){throw new Error("BigInt not supported")}return pt}var Bt,ro,Vt,no,pt,oo,Du=$e(()=>{ue(),fe(),ce(),Bt={},ro=!1,Vt={},no=!1,pt={},oo=!1}),je={};Pt(je,{Buffer:()=>or,INSPECT_MAX_BYTES:()=>Qi,default:()=>st,kMaxLength:()=>qi});var st,or,Qi,qi,Fe=$e(()=>{ue(),fe(),ce(),Du(),st=Ru(),st.Buffer,st.SlowBuffer,st.INSPECT_MAX_BYTES,st.kMaxLength,or=st.Buffer,Qi=st.INSPECT_MAX_BYTES,qi=st.kMaxLength}),fe=$e(()=>{Fe()}),De=ge((l,u)=>{ue(),fe(),ce();var s=class extends Error{constructor(i){if(!Array.isArray(i))throw new TypeError(`Expected input to be an Array, got ${typeof i}`);let a="";for(let t=0;t<i.length;t++)a+=` ${i[t].stack}
3
+ `;super(a),this.name="AggregateError",this.errors=i}};u.exports={AggregateError:s,ArrayIsArray(i){return Array.isArray(i)},ArrayPrototypeIncludes(i,a){return i.includes(a)},ArrayPrototypeIndexOf(i,a){return i.indexOf(a)},ArrayPrototypeJoin(i,a){return i.join(a)},ArrayPrototypeMap(i,a){return i.map(a)},ArrayPrototypePop(i,a){return i.pop(a)},ArrayPrototypePush(i,a){return i.push(a)},ArrayPrototypeSlice(i,a,t){return i.slice(a,t)},Error,FunctionPrototypeCall(i,a,...t){return i.call(a,...t)},FunctionPrototypeSymbolHasInstance(i,a){return Function.prototype[Symbol.hasInstance].call(i,a)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(i,a){return Object.defineProperties(i,a)},ObjectDefineProperty(i,a,t){return Object.defineProperty(i,a,t)},ObjectGetOwnPropertyDescriptor(i,a){return Object.getOwnPropertyDescriptor(i,a)},ObjectKeys(i){return Object.keys(i)},ObjectSetPrototypeOf(i,a){return Object.setPrototypeOf(i,a)},Promise,PromisePrototypeCatch(i,a){return i.catch(a)},PromisePrototypeThen(i,a,t){return i.then(a,t)},PromiseReject(i){return Promise.reject(i)},PromiseResolve(i){return Promise.resolve(i)},ReflectApply:Reflect.apply,RegExpPrototypeTest(i,a){return i.test(a)},SafeSet:Set,String,StringPrototypeSlice(i,a,t){return i.slice(a,t)},StringPrototypeToLowerCase(i){return i.toLowerCase()},StringPrototypeToUpperCase(i){return i.toUpperCase()},StringPrototypeTrim(i){return i.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(i,a,t){return i.set(a,t)},Boolean,Uint8Array}}),$i=ge((l,u)=>{ue(),fe(),ce(),u.exports={format(s,...i){return s.replace(/%([sdifj])/g,function(...[a,t]){let e=i.shift();return t==="f"?e.toFixed(6):t==="j"?JSON.stringify(e):t==="s"&&typeof e=="object"?`${e.constructor!==Object?e.constructor.name:""} {}`.trim():e.toString()})},inspect(s){switch(typeof s){case"string":if(s.includes("'"))if(s.includes('"')){if(!s.includes("`")&&!s.includes("${"))return`\`${s}\``}else return`"${s}"`;return`'${s}'`;case"number":return isNaN(s)?"NaN":Object.is(s,-0)?String(s):s;case"bigint":return`${String(s)}n`;case"boolean":case"undefined":return String(s);case"object":return"{}"}}}}),Qe=ge((l,u)=>{ue(),fe(),ce();var{format:s,inspect:i}=$i(),{AggregateError:a}=De(),t=globalThis.AggregateError||a,e=Symbol("kIsNodeError"),n=["string","function","number","object","Function","Object","boolean","bigint","symbol"],r=/^([A-Z][a-z0-9]*)+$/,o="__node_internal_",c={};function p(d,v){if(!d)throw new c.ERR_INTERNAL_ASSERTION(v)}function g(d){let v="",S=d.length,b=d[0]==="-"?1:0;for(;S>=b+4;S-=3)v=`_${d.slice(S-3,S)}${v}`;return`${d.slice(0,S)}${v}`}function y(d,v,S){if(typeof v=="function")return p(v.length<=S.length,`Code: ${d}; The provided arguments length (${S.length}) does not match the required ones (${v.length}).`),v(...S);let b=(v.match(/%[dfijoOs]/g)||[]).length;return p(b===S.length,`Code: ${d}; The provided arguments length (${S.length}) does not match the required ones (${b}).`),S.length===0?v:s(v,...S)}function h(d,v,S){S||(S=Error);class b extends S{constructor(...E){super(y(d,v,E))}toString(){return`${this.name} [${d}]: ${this.message}`}}Object.defineProperties(b.prototype,{name:{value:S.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${d}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),b.prototype.code=d,b.prototype[e]=!0,c[d]=b}function m(d){let v=o+d.name;return Object.defineProperty(d,"name",{value:v}),d}function A(d,v){if(d&&v&&d!==v){if(Array.isArray(v.errors))return v.errors.push(d),v;let S=new t([v,d],v.message);return S.code=v.code,S}return d||v}var _=class extends Error{constructor(d="The operation was aborted",v=void 0){if(v!==void 0&&typeof v!="object")throw new c.ERR_INVALID_ARG_TYPE("options","Object",v);super(d,v),this.code="ABORT_ERR",this.name="AbortError"}};h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",(d,v,S)=>{p(typeof d=="string","'name' must be a string"),Array.isArray(v)||(v=[v]);let b="The ";d.endsWith(" argument")?b+=`${d} `:b+=`"${d}" ${d.includes(".")?"property":"argument"} `,b+="must be ";let x=[],E=[],C=[];for(let P of v)p(typeof P=="string","All expected entries have to be of type string"),n.includes(P)?x.push(P.toLowerCase()):r.test(P)?E.push(P):(p(P!=="object",'The value "object" should be written as "Object"'),C.push(P));if(E.length>0){let P=x.indexOf("object");P!==-1&&(x.splice(x,P,1),E.push("Object"))}if(x.length>0){switch(x.length){case 1:b+=`of type ${x[0]}`;break;case 2:b+=`one of type ${x[0]} or ${x[1]}`;break;default:{let P=x.pop();b+=`one of type ${x.join(", ")}, or ${P}`}}(E.length>0||C.length>0)&&(b+=" or ")}if(E.length>0){switch(E.length){case 1:b+=`an instance of ${E[0]}`;break;case 2:b+=`an instance of ${E[0]} or ${E[1]}`;break;default:{let P=E.pop();b+=`an instance of ${E.join(", ")}, or ${P}`}}C.length>0&&(b+=" or ")}switch(C.length){case 0:break;case 1:C[0].toLowerCase()!==C[0]&&(b+="an "),b+=`${C[0]}`;break;case 2:b+=`one of ${C[0]} or ${C[1]}`;break;default:{let P=C.pop();b+=`one of ${C.join(", ")}, or ${P}`}}if(S==null)b+=`. Received ${S}`;else if(typeof S=="function"&&S.name)b+=`. Received function ${S.name}`;else if(typeof S=="object"){var M;if((M=S.constructor)!==null&&M!==void 0&&M.name)b+=`. Received an instance of ${S.constructor.name}`;else{let P=i(S,{depth:-1});b+=`. Received ${P}`}}else{let P=i(S,{colors:!1});P.length>25&&(P=`${P.slice(0,25)}...`),b+=`. Received type ${typeof S} (${P})`}return b},TypeError),h("ERR_INVALID_ARG_VALUE",(d,v,S="is invalid")=>{let b=i(v);return b.length>128&&(b=b.slice(0,128)+"..."),`The ${d.includes(".")?"property":"argument"} '${d}' ${S}. Received ${b}`},TypeError),h("ERR_INVALID_RETURN_VALUE",(d,v,S)=>{var b;let x=S!=null&&(b=S.constructor)!==null&&b!==void 0&&b.name?`instance of ${S.constructor.name}`:`type ${typeof S}`;return`Expected ${d} to be returned from the "${v}" function but got ${x}.`},TypeError),h("ERR_MISSING_ARGS",(...d)=>{p(d.length>0,"At least one arg needs to be specified");let v,S=d.length;switch(d=(Array.isArray(d)?d:[d]).map(b=>`"${b}"`).join(" or "),S){case 1:v+=`The ${d[0]} argument`;break;case 2:v+=`The ${d[0]} and ${d[1]} arguments`;break;default:{let b=d.pop();v+=`The ${d.join(", ")}, and ${b} arguments`}break}return`${v} must be specified`},TypeError),h("ERR_OUT_OF_RANGE",(d,v,S)=>{p(v,'Missing "range" argument');let b;if(Number.isInteger(S)&&Math.abs(S)>2**32)b=g(String(S));else if(typeof S=="bigint"){b=String(S);let x=BigInt(2)**BigInt(32);(S>x||S<-x)&&(b=g(b)),b+="n"}else b=i(S);return`The value of "${d}" is out of range. It must be ${v}. Received ${b}`},RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),u.exports={AbortError:_,aggregateTwoErrors:m(A),hideStackFrames:m,codes:c}}),Qt=ge((l,u)=>{ue(),fe(),ce();var{AbortController:s,AbortSignal:i}=typeof self<"u"?self:typeof window<"u"?window:void 0;u.exports=s,u.exports.AbortSignal=i,u.exports.default=s}),gt={};Pt(gt,{EventEmitter:()=>Hi,default:()=>Mt,defaultMaxListeners:()=>zi,init:()=>Gi,listenerCount:()=>Ji,on:()=>Yi,once:()=>Zi});function Uu(){if(io)return qt;io=!0;var l=typeof Reflect=="object"?Reflect:null,u=l&&typeof l.apply=="function"?l.apply:function(S,b,x){return Function.prototype.apply.call(S,b,x)},s;l&&typeof l.ownKeys=="function"?s=l.ownKeys:Object.getOwnPropertySymbols?s=function(S){return Object.getOwnPropertyNames(S).concat(Object.getOwnPropertySymbols(S))}:s=function(S){return Object.getOwnPropertyNames(S)};function i(S){console&&console.warn&&console.warn(S)}var a=Number.isNaN||function(S){return S!==S};function t(){t.init.call(this)}qt=t,qt.once=_,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._eventsCount=0,t.prototype._maxListeners=void 0;var e=10;function n(S){if(typeof S!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof S)}Object.defineProperty(t,"defaultMaxListeners",{enumerable:!0,get:function(){return e},set:function(S){if(typeof S!="number"||S<0||a(S))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+S+".");e=S}}),t.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},t.prototype.setMaxListeners=function(S){if(typeof S!="number"||S<0||a(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this};function r(S){return S._maxListeners===void 0?t.defaultMaxListeners:S._maxListeners}t.prototype.getMaxListeners=function(){return r(this)},t.prototype.emit=function(S){for(var b=[],x=1;x<arguments.length;x++)b.push(arguments[x]);var E=S==="error",C=this._events;if(C!==void 0)E=E&&C.error===void 0;else if(!E)return!1;if(E){var M;if(b.length>0&&(M=b[0]),M instanceof Error)throw M;var P=new Error("Unhandled error."+(M?" ("+M.message+")":""));throw P.context=M,P}var F=C[S];if(F===void 0)return!1;if(typeof F=="function")u(F,this,b);else for(var k=F.length,V=h(F,k),x=0;x<k;++x)u(V[x],this,b);return!0};function o(S,b,x,E){var C,M,P;if(n(x),M=S._events,M===void 0?(M=S._events=Object.create(null),S._eventsCount=0):(M.newListener!==void 0&&(S.emit("newListener",b,x.listener?x.listener:x),M=S._events),P=M[b]),P===void 0)P=M[b]=x,++S._eventsCount;else if(typeof P=="function"?P=M[b]=E?[x,P]:[P,x]:E?P.unshift(x):P.push(x),C=r(S),C>0&&P.length>C&&!P.warned){P.warned=!0;var F=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+String(b)+" listeners added. Use emitter.setMaxListeners() to increase limit");F.name="MaxListenersExceededWarning",F.emitter=S,F.type=b,F.count=P.length,i(F)}return S}t.prototype.addListener=function(S,b){return o(this,S,b,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(S,b){return o(this,S,b,!0)};function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(S,b,x){var E={fired:!1,wrapFn:void 0,target:S,type:b,listener:x},C=c.bind(E);return C.listener=x,E.wrapFn=C,C}t.prototype.once=function(S,b){return n(b),this.on(S,p(this,S,b)),this},t.prototype.prependOnceListener=function(S,b){return n(b),this.prependListener(S,p(this,S,b)),this},t.prototype.removeListener=function(S,b){var x,E,C,M,P;if(n(b),E=this._events,E===void 0)return this;if(x=E[S],x===void 0)return this;if(x===b||x.listener===b)--this._eventsCount===0?this._events=Object.create(null):(delete E[S],E.removeListener&&this.emit("removeListener",S,x.listener||b));else if(typeof x!="function"){for(C=-1,M=x.length-1;M>=0;M--)if(x[M]===b||x[M].listener===b){P=x[M].listener,C=M;break}if(C<0)return this;C===0?x.shift():m(x,C),x.length===1&&(E[S]=x[0]),E.removeListener!==void 0&&this.emit("removeListener",S,P||b)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(S){var b,x,E;if(x=this._events,x===void 0)return this;if(x.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):x[S]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete x[S]),this;if(arguments.length===0){var C=Object.keys(x),M;for(E=0;E<C.length;++E)M=C[E],M!=="removeListener"&&this.removeAllListeners(M);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(b=x[S],typeof b=="function")this.removeListener(S,b);else if(b!==void 0)for(E=b.length-1;E>=0;E--)this.removeListener(S,b[E]);return this};function g(S,b,x){var E=S._events;if(E===void 0)return[];var C=E[b];return C===void 0?[]:typeof C=="function"?x?[C.listener||C]:[C]:x?A(C):h(C,C.length)}t.prototype.listeners=function(S){return g(this,S,!0)},t.prototype.rawListeners=function(S){return g(this,S,!1)},t.listenerCount=function(S,b){return typeof S.listenerCount=="function"?S.listenerCount(b):y.call(S,b)},t.prototype.listenerCount=y;function y(S){var b=this._events;if(b!==void 0){var x=b[S];if(typeof x=="function")return 1;if(x!==void 0)return x.length}return 0}t.prototype.eventNames=function(){return this._eventsCount>0?s(this._events):[]};function h(S,b){for(var x=new Array(b),E=0;E<b;++E)x[E]=S[E];return x}function m(S,b){for(;b+1<S.length;b++)S[b]=S[b+1];S.pop()}function A(S){for(var b=new Array(S.length),x=0;x<b.length;++x)b[x]=S[x].listener||S[x];return b}function _(S,b){return new Promise(function(x,E){function C(P){S.removeListener(b,M),E(P)}function M(){typeof S.removeListener=="function"&&S.removeListener("error",C),x([].slice.call(arguments))}v(S,b,M,{once:!0}),b!=="error"&&d(S,C,{once:!0})})}function d(S,b,x){typeof S.on=="function"&&v(S,"error",b,x)}function v(S,b,x,E){if(typeof S.on=="function")E.once?S.once(b,x):S.on(b,x);else if(typeof S.addEventListener=="function")S.addEventListener(b,function C(M){E.once&&S.removeEventListener(b,C),x(M)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof S)}return qt}var qt,io,Mt,Hi,zi,Gi,Ji,Yi,Zi,St=$e(()=>{ue(),fe(),ce(),qt={},io=!1,Mt=Uu(),Mt.once,Mt.once=function(l,u){return new Promise((s,i)=>{function a(...e){t!==void 0&&l.removeListener("error",t),s(e)}let t;u!=="error"&&(t=e=>{l.removeListener(name,a),i(e)},l.once("error",t)),l.once(u,a)})},Mt.on=function(l,u){let s=[],i=[],a=null,t=!1,e={async next(){let o=s.shift();if(o)return createIterResult(o,!1);if(a){let c=Promise.reject(a);return a=null,c}return t?createIterResult(void 0,!0):new Promise((c,p)=>i.push({resolve:c,reject:p}))},async return(){l.removeListener(u,n),l.removeListener("error",r),t=!0;for(let o of i)o.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(o){a=o,l.removeListener(u,n),l.removeListener("error",r)},[Symbol.asyncIterator](){return this}};return l.on(u,n),l.on("error",r),e;function n(...o){let c=i.shift();c?c.resolve(createIterResult(o,!1)):s.push(o)}function r(o){t=!0;let c=i.shift();c?c.reject(o):a=o,e.return()}},{EventEmitter:Hi,defaultMaxListeners:zi,init:Gi,listenerCount:Ji,on:Yi,once:Zi}=Mt}),He=ge((l,u)=>{ue(),fe(),ce();var s=(Fe(),Be(je)),{format:i,inspect:a}=$i(),{codes:{ERR_INVALID_ARG_TYPE:t}}=Qe(),{kResistStopPropagation:e,AggregateError:n,SymbolDispose:r}=De(),o=globalThis.AbortSignal||Qt().AbortSignal,c=globalThis.AbortController||Qt().AbortController,p=Object.getPrototypeOf(async function(){}).constructor,g=globalThis.Blob||s.Blob,y=typeof g<"u"?function(A){return A instanceof g}:function(A){return!1},h=(A,_)=>{if(A!==void 0&&(A===null||typeof A!="object"||!("aborted"in A)))throw new t(_,"AbortSignal",A)},m=(A,_)=>{if(typeof A!="function")throw new t(_,"Function",A)};u.exports={AggregateError:n,kEmptyObject:Object.freeze({}),once(A){let _=!1;return function(...d){_||(_=!0,A.apply(this,d))}},createDeferredPromise:function(){let A,_;return{promise:new Promise((d,v)=>{A=d,_=v}),resolve:A,reject:_}},promisify(A){return new Promise((_,d)=>{A((v,...S)=>v?d(v):_(...S))})},debuglog(){return function(){}},format:i,inspect:a,types:{isAsyncFunction(A){return A instanceof p},isArrayBufferView(A){return ArrayBuffer.isView(A)}},isBlob:y,deprecate(A,_){return A},addAbortListener:(St(),Be(gt)).addAbortListener||function(A,_){if(A===void 0)throw new t("signal","AbortSignal",A);h(A,"signal"),m(_,"listener");let d;return A.aborted?queueMicrotask(()=>_()):(A.addEventListener("abort",_,{__proto__:null,once:!0,[e]:!0}),d=()=>{A.removeEventListener("abort",_)}),{__proto__:null,[r](){var v;(v=d)===null||v===void 0||v()}}},AbortSignalAny:o.any||function(A){if(A.length===1)return A[0];let _=new c,d=()=>_.abort();return A.forEach(v=>{h(v,"signals"),v.addEventListener("abort",d,{once:!0})}),_.signal.addEventListener("abort",()=>{A.forEach(v=>v.removeEventListener("abort",d))},{once:!0}),_.signal}},u.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),$t=ge((l,u)=>{ue(),fe(),ce();var{ArrayIsArray:s,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:a,ArrayPrototypeMap:t,NumberIsInteger:e,NumberIsNaN:n,NumberMAX_SAFE_INTEGER:r,NumberMIN_SAFE_INTEGER:o,NumberParseInt:c,ObjectPrototypeHasOwnProperty:p,RegExpPrototypeExec:g,String:y,StringPrototypeToUpperCase:h,StringPrototypeTrim:m}=De(),{hideStackFrames:A,codes:{ERR_SOCKET_BAD_PORT:_,ERR_INVALID_ARG_TYPE:d,ERR_INVALID_ARG_VALUE:v,ERR_OUT_OF_RANGE:S,ERR_UNKNOWN_SIGNAL:b}}=Qe(),{normalizeEncoding:x}=He(),{isAsyncFunction:E,isArrayBufferView:C}=He().types,M={};function P(Q){return Q===(Q|0)}function F(Q){return Q===Q>>>0}var k=/^[0-7]+$/,V="must be a 32-bit unsigned integer or an octal string";function L(Q,me,we){if(typeof Q>"u"&&(Q=we),typeof Q=="string"){if(g(k,Q)===null)throw new v(me,Q,V);Q=c(Q,8)}return J(Q,me),Q}var N=A((Q,me,we=o,ae=r)=>{if(typeof Q!="number")throw new d(me,"number",Q);if(!e(Q))throw new S(me,"an integer",Q);if(Q<we||Q>ae)throw new S(me,`>= ${we} && <= ${ae}`,Q)}),le=A((Q,me,we=-2147483648,ae=2147483647)=>{if(typeof Q!="number")throw new d(me,"number",Q);if(!e(Q))throw new S(me,"an integer",Q);if(Q<we||Q>ae)throw new S(me,`>= ${we} && <= ${ae}`,Q)}),J=A((Q,me,we=!1)=>{if(typeof Q!="number")throw new d(me,"number",Q);if(!e(Q))throw new S(me,"an integer",Q);let ae=we?1:0,Te=4294967295;if(Q<ae||Q>Te)throw new S(me,`>= ${ae} && <= ${Te}`,Q)});function H(Q,me){if(typeof Q!="string")throw new d(me,"string",Q)}function ne(Q,me,we=void 0,ae){if(typeof Q!="number")throw new d(me,"number",Q);if(we!=null&&Q<we||ae!=null&&Q>ae||(we!=null||ae!=null)&&n(Q))throw new S(me,`${we!=null?`>= ${we}`:""}${we!=null&&ae!=null?" && ":""}${ae!=null?`<= ${ae}`:""}`,Q)}var W=A((Q,me,we)=>{if(!i(we,Q)){let ae="must be one of: "+a(t(we,Te=>typeof Te=="string"?`'${Te}'`:y(Te)),", ");throw new v(me,Q,ae)}});function ee(Q,me){if(typeof Q!="boolean")throw new d(me,"boolean",Q)}function B(Q,me,we){return Q==null||!p(Q,me)?we:Q[me]}var Z=A((Q,me,we=null)=>{let ae=B(we,"allowArray",!1),Te=B(we,"allowFunction",!1);if(!B(we,"nullable",!1)&&Q===null||!ae&&s(Q)||typeof Q!="object"&&(!Te||typeof Q!="function"))throw new d(me,"Object",Q)}),ye=A((Q,me)=>{if(Q!=null&&typeof Q!="object"&&typeof Q!="function")throw new d(me,"a dictionary",Q)}),re=A((Q,me,we=0)=>{if(!s(Q))throw new d(me,"Array",Q);if(Q.length<we){let ae=`must be longer than ${we}`;throw new v(me,Q,ae)}});function ve(Q,me){re(Q,me);for(let we=0;we<Q.length;we++)H(Q[we],`${me}[${we}]`)}function z(Q,me){re(Q,me);for(let we=0;we<Q.length;we++)ee(Q[we],`${me}[${we}]`)}function U(Q,me){re(Q,me);for(let we=0;we<Q.length;we++){let ae=Q[we],Te=`${me}[${we}]`;if(ae==null)throw new d(Te,"AbortSignal",ae);Ae(ae,Te)}}function oe(Q,me="signal"){if(H(Q,me),M[Q]===void 0)throw M[h(Q)]!==void 0?new b(Q+" (signals must use all capital letters)"):new b(Q)}var q=A((Q,me="buffer")=>{if(!C(Q))throw new d(me,["Buffer","TypedArray","DataView"],Q)});function G(Q,me){let we=x(me),ae=Q.length;if(we==="hex"&&ae%2!==0)throw new v("encoding",me,`is invalid for data of length ${ae}`)}function Y(Q,me="Port",we=!0){if(typeof Q!="number"&&typeof Q!="string"||typeof Q=="string"&&m(Q).length===0||+Q!==+Q>>>0||Q>65535||Q===0&&!we)throw new _(me,Q,we);return Q|0}var Ae=A((Q,me)=>{if(Q!==void 0&&(Q===null||typeof Q!="object"||!("aborted"in Q)))throw new d(me,"AbortSignal",Q)}),se=A((Q,me)=>{if(typeof Q!="function")throw new d(me,"Function",Q)}),R=A((Q,me)=>{if(typeof Q!="function"||E(Q))throw new d(me,"Function",Q)}),K=A((Q,me)=>{if(Q!==void 0)throw new d(me,"undefined",Q)});function te(Q,me,we){if(!i(we,Q))throw new d(me,`('${a(we,"|")}')`,Q)}var de=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function pe(Q,me){if(typeof Q>"u"||!g(de,Q))throw new v(me,Q,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function be(Q){if(typeof Q=="string")return pe(Q,"hints"),Q;if(s(Q)){let me=Q.length,we="";if(me===0)return we;for(let ae=0;ae<me;ae++){let Te=Q[ae];pe(Te,"hints"),we+=Te,ae!==me-1&&(we+=", ")}return we}throw new v("hints",Q,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}u.exports={isInt32:P,isUint32:F,parseFileMode:L,validateArray:re,validateStringArray:ve,validateBooleanArray:z,validateAbortSignalArray:U,validateBoolean:ee,validateBuffer:q,validateDictionary:ye,validateEncoding:G,validateFunction:se,validateInt32:le,validateInteger:N,validateNumber:ne,validateObject:Z,validateOneOf:W,validatePlainFunction:R,validatePort:Y,validateSignalName:oe,validateString:H,validateUint32:J,validateUndefined:K,validateUnion:te,validateAbortSignal:Ae,validateLinkHeaderValue:be}}),xt=ge((l,u)=>{ue(),fe(),ce();var s=u.exports={},i,a;function t(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?i=setTimeout:i=t}catch{i=t}try{typeof clearTimeout=="function"?a=clearTimeout:a=e}catch{a=e}})();function n(_){if(i===setTimeout)return setTimeout(_,0);if((i===t||!i)&&setTimeout)return i=setTimeout,setTimeout(_,0);try{return i(_,0)}catch{try{return i.call(null,_,0)}catch{return i.call(this,_,0)}}}function r(_){if(a===clearTimeout)return clearTimeout(_);if((a===e||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(_);try{return a(_)}catch{try{return a.call(null,_)}catch{return a.call(this,_)}}}var o=[],c=!1,p,g=-1;function y(){!c||!p||(c=!1,p.length?o=p.concat(o):g=-1,o.length&&h())}function h(){if(!c){var _=n(y);c=!0;for(var d=o.length;d;){for(p=o,o=[];++g<d;)p&&p[g].run();g=-1,d=o.length}p=null,c=!1,r(_)}}s.nextTick=function(_){var d=new Array(arguments.length-1);if(arguments.length>1)for(var v=1;v<arguments.length;v++)d[v-1]=arguments[v];o.push(new m(_,d)),o.length===1&&!c&&n(h)};function m(_,d){this.fun=_,this.array=d}m.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={};function A(){}s.on=A,s.addListener=A,s.once=A,s.off=A,s.removeListener=A,s.removeAllListeners=A,s.emit=A,s.prependListener=A,s.prependOnceListener=A,s.listeners=function(_){return[]},s.binding=function(_){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(_){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}}),at=ge((l,u)=>{ue(),fe(),ce();var{SymbolAsyncIterator:s,SymbolIterator:i,SymbolFor:a}=De(),t=a("nodejs.stream.destroyed"),e=a("nodejs.stream.errored"),n=a("nodejs.stream.readable"),r=a("nodejs.stream.writable"),o=a("nodejs.stream.disturbed"),c=a("nodejs.webstream.isClosedPromise"),p=a("nodejs.webstream.controllerErrorFunction");function g(B,Z=!1){var ye;return!!(B&&typeof B.pipe=="function"&&typeof B.on=="function"&&(!Z||typeof B.pause=="function"&&typeof B.resume=="function")&&(!B._writableState||((ye=B._readableState)===null||ye===void 0?void 0:ye.readable)!==!1)&&(!B._writableState||B._readableState))}function y(B){var Z;return!!(B&&typeof B.write=="function"&&typeof B.on=="function"&&(!B._readableState||((Z=B._writableState)===null||Z===void 0?void 0:Z.writable)!==!1))}function h(B){return!!(B&&typeof B.pipe=="function"&&B._readableState&&typeof B.on=="function"&&typeof B.write=="function")}function m(B){return B&&(B._readableState||B._writableState||typeof B.write=="function"&&typeof B.on=="function"||typeof B.pipe=="function"&&typeof B.on=="function")}function A(B){return!!(B&&!m(B)&&typeof B.pipeThrough=="function"&&typeof B.getReader=="function"&&typeof B.cancel=="function")}function _(B){return!!(B&&!m(B)&&typeof B.getWriter=="function"&&typeof B.abort=="function")}function d(B){return!!(B&&!m(B)&&typeof B.readable=="object"&&typeof B.writable=="object")}function v(B){return A(B)||_(B)||d(B)}function S(B,Z){return B==null?!1:Z===!0?typeof B[s]=="function":Z===!1?typeof B[i]=="function":typeof B[s]=="function"||typeof B[i]=="function"}function b(B){if(!m(B))return null;let Z=B._writableState,ye=B._readableState,re=Z||ye;return!!(B.destroyed||B[t]||re!=null&&re.destroyed)}function x(B){if(!y(B))return null;if(B.writableEnded===!0)return!0;let Z=B._writableState;return Z!=null&&Z.errored?!1:typeof Z?.ended!="boolean"?null:Z.ended}function E(B,Z){if(!y(B))return null;if(B.writableFinished===!0)return!0;let ye=B._writableState;return ye!=null&&ye.errored?!1:typeof ye?.finished!="boolean"?null:!!(ye.finished||Z===!1&&ye.ended===!0&&ye.length===0)}function C(B){if(!g(B))return null;if(B.readableEnded===!0)return!0;let Z=B._readableState;return!Z||Z.errored?!1:typeof Z?.ended!="boolean"?null:Z.ended}function M(B,Z){if(!g(B))return null;let ye=B._readableState;return ye!=null&&ye.errored?!1:typeof ye?.endEmitted!="boolean"?null:!!(ye.endEmitted||Z===!1&&ye.ended===!0&&ye.length===0)}function P(B){return B&&B[n]!=null?B[n]:typeof B?.readable!="boolean"?null:b(B)?!1:g(B)&&B.readable&&!M(B)}function F(B){return B&&B[r]!=null?B[r]:typeof B?.writable!="boolean"?null:b(B)?!1:y(B)&&B.writable&&!x(B)}function k(B,Z){return m(B)?b(B)?!0:!(Z?.readable!==!1&&P(B)||Z?.writable!==!1&&F(B)):null}function V(B){var Z,ye;return m(B)?B.writableErrored?B.writableErrored:(Z=(ye=B._writableState)===null||ye===void 0?void 0:ye.errored)!==null&&Z!==void 0?Z:null:null}function L(B){var Z,ye;return m(B)?B.readableErrored?B.readableErrored:(Z=(ye=B._readableState)===null||ye===void 0?void 0:ye.errored)!==null&&Z!==void 0?Z:null:null}function N(B){if(!m(B))return null;if(typeof B.closed=="boolean")return B.closed;let Z=B._writableState,ye=B._readableState;return typeof Z?.closed=="boolean"||typeof ye?.closed=="boolean"?Z?.closed||ye?.closed:typeof B._closed=="boolean"&&le(B)?B._closed:null}function le(B){return typeof B._closed=="boolean"&&typeof B._defaultKeepAlive=="boolean"&&typeof B._removedConnection=="boolean"&&typeof B._removedContLen=="boolean"}function J(B){return typeof B._sent100=="boolean"&&le(B)}function H(B){var Z;return typeof B._consuming=="boolean"&&typeof B._dumped=="boolean"&&((Z=B.req)===null||Z===void 0?void 0:Z.upgradeOrConnect)===void 0}function ne(B){if(!m(B))return null;let Z=B._writableState,ye=B._readableState,re=Z||ye;return!re&&J(B)||!!(re&&re.autoDestroy&&re.emitClose&&re.closed===!1)}function W(B){var Z;return!!(B&&((Z=B[o])!==null&&Z!==void 0?Z:B.readableDidRead||B.readableAborted))}function ee(B){var Z,ye,re,ve,z,U,oe,q,G,Y;return!!(B&&((Z=(ye=(re=(ve=(z=(U=B[e])!==null&&U!==void 0?U:B.readableErrored)!==null&&z!==void 0?z:B.writableErrored)!==null&&ve!==void 0?ve:(oe=B._readableState)===null||oe===void 0?void 0:oe.errorEmitted)!==null&&re!==void 0?re:(q=B._writableState)===null||q===void 0?void 0:q.errorEmitted)!==null&&ye!==void 0?ye:(G=B._readableState)===null||G===void 0?void 0:G.errored)!==null&&Z!==void 0?Z:!((Y=B._writableState)===null||Y===void 0)&&Y.errored))}u.exports={isDestroyed:b,kIsDestroyed:t,isDisturbed:W,kIsDisturbed:o,isErrored:ee,kIsErrored:e,isReadable:P,kIsReadable:n,kIsClosedPromise:c,kControllerErrorFunction:p,kIsWritable:r,isClosed:N,isDuplexNodeStream:h,isFinished:k,isIterable:S,isReadableNodeStream:g,isReadableStream:A,isReadableEnded:C,isReadableFinished:M,isReadableErrored:L,isNodeStream:m,isWebStream:v,isWritable:F,isWritableNodeStream:y,isWritableStream:_,isWritableEnded:x,isWritableFinished:E,isWritableErrored:V,isServerRequest:H,isServerResponse:J,willEmitClose:ne,isTransformStream:d}}),mt=ge((l,u)=>{ue(),fe(),ce();var s=xt(),{AbortError:i,codes:a}=Qe(),{ERR_INVALID_ARG_TYPE:t,ERR_STREAM_PREMATURE_CLOSE:e}=a,{kEmptyObject:n,once:r}=He(),{validateAbortSignal:o,validateFunction:c,validateObject:p,validateBoolean:g}=$t(),{Promise:y,PromisePrototypeThen:h,SymbolDispose:m}=De(),{isClosed:A,isReadable:_,isReadableNodeStream:d,isReadableStream:v,isReadableFinished:S,isReadableErrored:b,isWritable:x,isWritableNodeStream:E,isWritableStream:C,isWritableFinished:M,isWritableErrored:P,isNodeStream:F,willEmitClose:k,kIsClosedPromise:V}=at(),L;function N(W){return W.setHeader&&typeof W.abort=="function"}var le=()=>{};function J(W,ee,B){var Z,ye;if(arguments.length===2?(B=ee,ee=n):ee==null?ee=n:p(ee,"options"),c(B,"callback"),o(ee.signal,"options.signal"),B=r(B),v(W)||C(W))return H(W,ee,B);if(!F(W))throw new t("stream",["ReadableStream","WritableStream","Stream"],W);let re=(Z=ee.readable)!==null&&Z!==void 0?Z:d(W),ve=(ye=ee.writable)!==null&&ye!==void 0?ye:E(W),z=W._writableState,U=W._readableState,oe=()=>{W.writable||Y()},q=k(W)&&d(W)===re&&E(W)===ve,G=M(W,!1),Y=()=>{G=!0,W.destroyed&&(q=!1),!(q&&(!W.readable||re))&&(!re||Ae)&&B.call(W)},Ae=S(W,!1),se=()=>{Ae=!0,W.destroyed&&(q=!1),!(q&&(!W.writable||ve))&&(!ve||G)&&B.call(W)},R=Q=>{B.call(W,Q)},K=A(W),te=()=>{K=!0;let Q=P(W)||b(W);if(Q&&typeof Q!="boolean")return B.call(W,Q);if(re&&!Ae&&d(W,!0)&&!S(W,!1))return B.call(W,new e);if(ve&&!G&&!M(W,!1))return B.call(W,new e);B.call(W)},de=()=>{K=!0;let Q=P(W)||b(W);if(Q&&typeof Q!="boolean")return B.call(W,Q);B.call(W)},pe=()=>{W.req.on("finish",Y)};N(W)?(W.on("complete",Y),q||W.on("abort",te),W.req?pe():W.on("request",pe)):ve&&!z&&(W.on("end",oe),W.on("close",oe)),!q&&typeof W.aborted=="boolean"&&W.on("aborted",te),W.on("end",se),W.on("finish",Y),ee.error!==!1&&W.on("error",R),W.on("close",te),K?s.nextTick(te):z!=null&&z.errorEmitted||U!=null&&U.errorEmitted?q||s.nextTick(de):(!re&&(!q||_(W))&&(G||x(W)===!1)||!ve&&(!q||x(W))&&(Ae||_(W)===!1)||U&&W.req&&W.aborted)&&s.nextTick(de);let be=()=>{B=le,W.removeListener("aborted",te),W.removeListener("complete",Y),W.removeListener("abort",te),W.removeListener("request",pe),W.req&&W.req.removeListener("finish",Y),W.removeListener("end",oe),W.removeListener("close",oe),W.removeListener("finish",Y),W.removeListener("end",se),W.removeListener("error",R),W.removeListener("close",te)};if(ee.signal&&!K){let Q=()=>{let me=B;be(),me.call(W,new i(void 0,{cause:ee.signal.reason}))};if(ee.signal.aborted)s.nextTick(Q);else{L=L||He().addAbortListener;let me=L(ee.signal,Q),we=B;B=r((...ae)=>{me[m](),we.apply(W,ae)})}}return be}function H(W,ee,B){let Z=!1,ye=le;if(ee.signal)if(ye=()=>{Z=!0,B.call(W,new i(void 0,{cause:ee.signal.reason}))},ee.signal.aborted)s.nextTick(ye);else{L=L||He().addAbortListener;let ve=L(ee.signal,ye),z=B;B=r((...U)=>{ve[m](),z.apply(W,U)})}let re=(...ve)=>{Z||s.nextTick(()=>B.apply(W,ve))};return h(W[V].promise,re,re),le}function ne(W,ee){var B;let Z=!1;return ee===null&&(ee=n),(B=ee)!==null&&B!==void 0&&B.cleanup&&(g(ee.cleanup,"cleanup"),Z=ee.cleanup),new y((ye,re)=>{let ve=J(W,ee,z=>{Z&&ve(),z?re(z):ye()})})}u.exports=J,u.exports.finished=ne}),Rt=ge((l,u)=>{ue(),fe(),ce();var s=xt(),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:a},AbortError:t}=Qe(),{Symbol:e}=De(),{kIsDestroyed:n,isDestroyed:r,isFinished:o,isServerRequest:c}=at(),p=e("kDestroy"),g=e("kConstruct");function y(k,V,L){k&&(k.stack,V&&!V.errored&&(V.errored=k),L&&!L.errored&&(L.errored=k))}function h(k,V){let L=this._readableState,N=this._writableState,le=N||L;return N!=null&&N.destroyed||L!=null&&L.destroyed?(typeof V=="function"&&V(),this):(y(k,N,L),N&&(N.destroyed=!0),L&&(L.destroyed=!0),le.constructed?m(this,k,V):this.once(p,function(J){m(this,i(J,k),V)}),this)}function m(k,V,L){let N=!1;function le(J){if(N)return;N=!0;let H=k._readableState,ne=k._writableState;y(J,ne,H),ne&&(ne.closed=!0),H&&(H.closed=!0),typeof L=="function"&&L(J),J?s.nextTick(A,k,J):s.nextTick(_,k)}try{k._destroy(V||null,le)}catch(J){le(J)}}function A(k,V){d(k,V),_(k)}function _(k){let V=k._readableState,L=k._writableState;L&&(L.closeEmitted=!0),V&&(V.closeEmitted=!0),(L!=null&&L.emitClose||V!=null&&V.emitClose)&&k.emit("close")}function d(k,V){let L=k._readableState,N=k._writableState;N!=null&&N.errorEmitted||L!=null&&L.errorEmitted||(N&&(N.errorEmitted=!0),L&&(L.errorEmitted=!0),k.emit("error",V))}function v(){let k=this._readableState,V=this._writableState;k&&(k.constructed=!0,k.closed=!1,k.closeEmitted=!1,k.destroyed=!1,k.errored=null,k.errorEmitted=!1,k.reading=!1,k.ended=k.readable===!1,k.endEmitted=k.readable===!1),V&&(V.constructed=!0,V.destroyed=!1,V.closed=!1,V.closeEmitted=!1,V.errored=null,V.errorEmitted=!1,V.finalCalled=!1,V.prefinished=!1,V.ended=V.writable===!1,V.ending=V.writable===!1,V.finished=V.writable===!1)}function S(k,V,L){let N=k._readableState,le=k._writableState;if(le!=null&&le.destroyed||N!=null&&N.destroyed)return this;N!=null&&N.autoDestroy||le!=null&&le.autoDestroy?k.destroy(V):V&&(V.stack,le&&!le.errored&&(le.errored=V),N&&!N.errored&&(N.errored=V),L?s.nextTick(d,k,V):d(k,V))}function b(k,V){if(typeof k._construct!="function")return;let L=k._readableState,N=k._writableState;L&&(L.constructed=!1),N&&(N.constructed=!1),k.once(g,V),!(k.listenerCount(g)>1)&&s.nextTick(x,k)}function x(k){let V=!1;function L(N){if(V){S(k,N??new a);return}V=!0;let le=k._readableState,J=k._writableState,H=J||le;le&&(le.constructed=!0),J&&(J.constructed=!0),H.destroyed?k.emit(p,N):N?S(k,N,!0):s.nextTick(E,k)}try{k._construct(N=>{s.nextTick(L,N)})}catch(N){s.nextTick(L,N)}}function E(k){k.emit(g)}function C(k){return k?.setHeader&&typeof k.abort=="function"}function M(k){k.emit("close")}function P(k,V){k.emit("error",V),s.nextTick(M,k)}function F(k,V){!k||r(k)||(!V&&!o(k)&&(V=new t),c(k)?(k.socket=null,k.destroy(V)):C(k)?k.abort():C(k.req)?k.req.abort():typeof k.destroy=="function"?k.destroy(V):typeof k.close=="function"?k.close():V?s.nextTick(P,k,V):s.nextTick(M,k),k.destroyed||(k[n]=!0))}u.exports={construct:b,destroyer:F,destroy:h,undestroy:v,errorOrDestroy:S}}),so=ge((l,u)=>{ue(),fe(),ce();var{ArrayIsArray:s,ObjectSetPrototypeOf:i}=De(),{EventEmitter:a}=(St(),Be(gt));function t(n){a.call(this,n)}i(t.prototype,a.prototype),i(t,a),t.prototype.pipe=function(n,r){let o=this;function c(_){n.writable&&n.write(_)===!1&&o.pause&&o.pause()}o.on("data",c);function p(){o.readable&&o.resume&&o.resume()}n.on("drain",p),!n._isStdio&&(!r||r.end!==!1)&&(o.on("end",y),o.on("close",h));let g=!1;function y(){g||(g=!0,n.end())}function h(){g||(g=!0,typeof n.destroy=="function"&&n.destroy())}function m(_){A(),a.listenerCount(this,"error")===0&&this.emit("error",_)}e(o,"error",m),e(n,"error",m);function A(){o.removeListener("data",c),n.removeListener("drain",p),o.removeListener("end",y),o.removeListener("close",h),o.removeListener("error",m),n.removeListener("error",m),o.removeListener("end",A),o.removeListener("close",A),n.removeListener("close",A)}return o.on("end",A),o.on("close",A),n.on("close",A),n.emit("pipe",o),n};function e(n,r,o){if(typeof n.prependListener=="function")return n.prependListener(r,o);!n._events||!n._events[r]?n.on(r,o):s(n._events[r])?n._events[r].unshift(o):n._events[r]=[o,n._events[r]]}u.exports={Stream:t,prependListener:e}}),ir=ge((l,u)=>{ue(),fe(),ce();var{SymbolDispose:s}=De(),{AbortError:i,codes:a}=Qe(),{isNodeStream:t,isWebStream:e,kControllerErrorFunction:n}=at(),r=mt(),{ERR_INVALID_ARG_TYPE:o}=a,c,p=(g,y)=>{if(typeof g!="object"||!("aborted"in g))throw new o(y,"AbortSignal",g)};u.exports.addAbortSignal=function(g,y){if(p(g,"signal"),!t(y)&&!e(y))throw new o("stream",["ReadableStream","WritableStream","Stream"],y);return u.exports.addAbortSignalNoValidate(g,y)},u.exports.addAbortSignalNoValidate=function(g,y){if(typeof g!="object"||!("aborted"in g))return y;let h=t(y)?()=>{y.destroy(new i(void 0,{cause:g.reason}))}:()=>{y[n](new i(void 0,{cause:g.reason}))};if(g.aborted)h();else{c=c||He().addAbortListener;let m=c(g,h);r(y,m[s])}return y}}),Nu=ge((l,u)=>{ue(),fe(),ce();var{StringPrototypeSlice:s,SymbolIterator:i,TypedArrayPrototypeSet:a,Uint8Array:t}=De(),{Buffer:e}=(Fe(),Be(je)),{inspect:n}=He();u.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(r){let o={data:r,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length}unshift(r){let o={data:r,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length}shift(){if(this.length===0)return;let r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}clear(){this.head=this.tail=null,this.length=0}join(r){if(this.length===0)return"";let o=this.head,c=""+o.data;for(;(o=o.next)!==null;)c+=r+o.data;return c}concat(r){if(this.length===0)return e.alloc(0);let o=e.allocUnsafe(r>>>0),c=this.head,p=0;for(;c;)a(o,c.data,p),p+=c.data.length,c=c.next;return o}consume(r,o){let c=this.head.data;if(r<c.length){let p=c.slice(0,r);return this.head.data=c.slice(r),p}return r===c.length?this.shift():o?this._getString(r):this._getBuffer(r)}first(){return this.head.data}*[i](){for(let r=this.head;r;r=r.next)yield r.data}_getString(r){let o="",c=this.head,p=0;do{let g=c.data;if(r>g.length)o+=g,r-=g.length;else{r===g.length?(o+=g,++p,c.next?this.head=c.next:this.head=this.tail=null):(o+=s(g,0,r),this.head=c,c.data=s(g,r));break}++p}while((c=c.next)!==null);return this.length-=p,o}_getBuffer(r){let o=e.allocUnsafe(r),c=r,p=this.head,g=0;do{let y=p.data;if(r>y.length)a(o,y,c-r),r-=y.length;else{r===y.length?(a(o,y,c-r),++g,p.next?this.head=p.next:this.head=this.tail=null):(a(o,new t(y.buffer,y.byteOffset,r),c-r),this.head=p,p.data=y.slice(r));break}++g}while((p=p.next)!==null);return this.length-=g,o}[Symbol.for("nodejs.util.inspect.custom")](r,o){return n(this,{...o,depth:0,customInspect:!1})}}}),sr=ge((l,u)=>{ue(),fe(),ce();var{MathFloor:s,NumberIsInteger:i}=De(),{validateInteger:a}=$t(),{ERR_INVALID_ARG_VALUE:t}=Qe().codes,e=16*1024,n=16;function r(g,y,h){return g.highWaterMark!=null?g.highWaterMark:y?g[h]:null}function o(g){return g?n:e}function c(g,y){a(y,"value",0),g?n=y:e=y}function p(g,y,h,m){let A=r(y,m,h);if(A!=null){if(!i(A)||A<0){let _=m?`options.${h}`:"options.highWaterMark";throw new t(_,A)}return s(A)}return o(g.objectMode)}u.exports={getHighWaterMark:p,getDefaultHighWaterMark:o,setDefaultHighWaterMark:c}}),ju=ge((l,u)=>{ue(),fe(),ce();var s=(Fe(),Be(je)),i=s.Buffer;function a(e,n){for(var r in e)n[r]=e[r]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?u.exports=s:(a(s,l),l.Buffer=t);function t(e,n,r){return i(e,n,r)}t.prototype=Object.create(i.prototype),a(i,t),t.from=function(e,n,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return i(e,n,r)},t.alloc=function(e,n,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=i(e);return n!==void 0?typeof r=="string"?o.fill(n,r):o.fill(n):o.fill(0),o},t.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return i(e)},t.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return s.SlowBuffer(e)}}),Fu=ge(l=>{ue(),fe(),ce();var u=ju().Buffer,s=u.isEncoding||function(d){switch(d=""+d,d&&d.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(d){if(!d)return"utf8";for(var v;;)switch(d){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return d;default:if(v)return;d=(""+d).toLowerCase(),v=!0}}function a(d){var v=i(d);if(typeof v!="string"&&(u.isEncoding===s||!s(d)))throw new Error("Unknown encoding: "+d);return v||d}l.StringDecoder=t;function t(d){this.encoding=a(d);var v;switch(this.encoding){case"utf16le":this.text=g,this.end=y,v=4;break;case"utf8":this.fillLast=o,v=4;break;case"base64":this.text=h,this.end=m,v=3;break;default:this.write=A,this.end=_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=u.allocUnsafe(v)}t.prototype.write=function(d){if(d.length===0)return"";var v,S;if(this.lastNeed){if(v=this.fillLast(d),v===void 0)return"";S=this.lastNeed,this.lastNeed=0}else S=0;return S<d.length?v?v+this.text(d,S):this.text(d,S):v||""},t.prototype.end=p,t.prototype.text=c,t.prototype.fillLast=function(d){if(this.lastNeed<=d.length)return d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,d.length),this.lastNeed-=d.length};function e(d){return d<=127?0:d>>5===6?2:d>>4===14?3:d>>3===30?4:d>>6===2?-1:-2}function n(d,v,S){var b=v.length-1;if(b<S)return 0;var x=e(v[b]);return x>=0?(x>0&&(d.lastNeed=x-1),x):--b<S||x===-2?0:(x=e(v[b]),x>=0?(x>0&&(d.lastNeed=x-2),x):--b<S||x===-2?0:(x=e(v[b]),x>=0?(x>0&&(x===2?x=0:d.lastNeed=x-3),x):0))}function r(d,v,S){if((v[0]&192)!==128)return d.lastNeed=0,"�";if(d.lastNeed>1&&v.length>1){if((v[1]&192)!==128)return d.lastNeed=1,"�";if(d.lastNeed>2&&v.length>2&&(v[2]&192)!==128)return d.lastNeed=2,"�"}}function o(d){var v=this.lastTotal-this.lastNeed,S=r(this,d);if(S!==void 0)return S;if(this.lastNeed<=d.length)return d.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,v,0,d.length),this.lastNeed-=d.length}function c(d,v){var S=n(this,d,v);if(!this.lastNeed)return d.toString("utf8",v);this.lastTotal=S;var b=d.length-(S-this.lastNeed);return d.copy(this.lastChar,0,b),d.toString("utf8",v,b)}function p(d){var v=d&&d.length?this.write(d):"";return this.lastNeed?v+"�":v}function g(d,v){if((d.length-v)%2===0){var S=d.toString("utf16le",v);if(S){var b=S.charCodeAt(S.length-1);if(b>=55296&&b<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=d[d.length-1],d.toString("utf16le",v,d.length-1)}function y(d){var v=d&&d.length?this.write(d):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,S)}return v}function h(d,v){var S=(d.length-v)%3;return S===0?d.toString("base64",v):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=d[d.length-1]:(this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1]),d.toString("base64",v,d.length-S))}function m(d){var v=d&&d.length?this.write(d):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function A(d){return d.toString(this.encoding)}function _(d){return d&&d.length?this.write(d):""}}),Xi=ge((l,u)=>{ue(),fe(),ce();var s=xt(),{PromisePrototypeThen:i,SymbolAsyncIterator:a,SymbolIterator:t}=De(),{Buffer:e}=(Fe(),Be(je)),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_NULL_VALUES:r}=Qe().codes;function o(c,p,g){let y;if(typeof p=="string"||p instanceof e)return new c({objectMode:!0,...g,read(){this.push(p),this.push(null)}});let h;if(p&&p[a])h=!0,y=p[a]();else if(p&&p[t])h=!1,y=p[t]();else throw new n("iterable",["Iterable"],p);let m=new c({objectMode:!0,highWaterMark:1,...g}),A=!1;m._read=function(){A||(A=!0,d())},m._destroy=function(v,S){i(_(v),()=>s.nextTick(S,v),b=>s.nextTick(S,b||v))};async function _(v){let S=v!=null,b=typeof y.throw=="function";if(S&&b){let{value:x,done:E}=await y.throw(v);if(await x,E)return}if(typeof y.return=="function"){let{value:x}=await y.return();await x}}async function d(){for(;;){try{let{value:v,done:S}=h?await y.next():y.next();if(S)m.push(null);else{let b=v&&typeof v.then=="function"?await v:v;if(b===null)throw A=!1,new r;if(m.push(b))continue;A=!1}}catch(v){m.destroy(v)}break}}return m}u.exports=o}),ar=ge((l,u)=>{ue(),fe(),ce();var s=xt(),{ArrayPrototypeIndexOf:i,NumberIsInteger:a,NumberIsNaN:t,NumberParseInt:e,ObjectDefineProperties:n,ObjectKeys:r,ObjectSetPrototypeOf:o,Promise:c,SafeSet:p,SymbolAsyncDispose:g,SymbolAsyncIterator:y,Symbol:h}=De();u.exports=ae,ae.ReadableState=we;var{EventEmitter:m}=(St(),Be(gt)),{Stream:A,prependListener:_}=so(),{Buffer:d}=(Fe(),Be(je)),{addAbortSignal:v}=ir(),S=mt(),b=He().debuglog("stream",T=>{b=T}),x=Nu(),E=Rt(),{getHighWaterMark:C,getDefaultHighWaterMark:M}=sr(),{aggregateTwoErrors:P,codes:{ERR_INVALID_ARG_TYPE:F,ERR_METHOD_NOT_IMPLEMENTED:k,ERR_OUT_OF_RANGE:V,ERR_STREAM_PUSH_AFTER_EOF:L,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N},AbortError:le}=Qe(),{validateObject:J}=$t(),H=h("kPaused"),{StringDecoder:ne}=Fu(),W=Xi();o(ae.prototype,A.prototype),o(ae,A);var ee=()=>{},{errorOrDestroy:B}=E,Z=1,ye=2,re=4,ve=8,z=16,U=32,oe=64,q=128,G=256,Y=512,Ae=1024,se=2048,R=4096,K=8192,te=16384,de=32768,pe=65536,be=1<<17,Q=1<<18;function me(T){return{enumerable:!1,get(){return(this.state&T)!==0},set(D){D?this.state|=T:this.state&=~T}}}n(we.prototype,{objectMode:me(Z),ended:me(ye),endEmitted:me(re),reading:me(ve),constructed:me(z),sync:me(U),needReadable:me(oe),emittedReadable:me(q),readableListening:me(G),resumeScheduled:me(Y),errorEmitted:me(Ae),emitClose:me(se),autoDestroy:me(R),destroyed:me(K),closed:me(te),closeEmitted:me(de),multiAwaitDrain:me(pe),readingMore:me(be),dataEmitted:me(Q)});function we(T,D,_e){typeof _e!="boolean"&&(_e=D instanceof lt()),this.state=se|R|z|U,T&&T.objectMode&&(this.state|=Z),_e&&T&&T.readableObjectMode&&(this.state|=Z),this.highWaterMark=T?C(this,T,"readableHighWaterMark",_e):M(!1),this.buffer=new x,this.length=0,this.pipes=[],this.flowing=null,this[H]=null,T&&T.emitClose===!1&&(this.state&=~se),T&&T.autoDestroy===!1&&(this.state&=~R),this.errored=null,this.defaultEncoding=T&&T.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,T&&T.encoding&&(this.decoder=new ne(T.encoding),this.encoding=T.encoding)}function ae(T){if(!(this instanceof ae))return new ae(T);let D=this instanceof lt();this._readableState=new we(T,this,D),T&&(typeof T.read=="function"&&(this._read=T.read),typeof T.destroy=="function"&&(this._destroy=T.destroy),typeof T.construct=="function"&&(this._construct=T.construct),T.signal&&!D&&v(T.signal,this)),A.call(this,T),E.construct(this,()=>{this._readableState.needReadable&&$(this,this._readableState)})}ae.prototype.destroy=E.destroy,ae.prototype._undestroy=E.undestroy,ae.prototype._destroy=function(T,D){D(T)},ae.prototype[m.captureRejectionSymbol]=function(T){this.destroy(T)},ae.prototype[g]=function(){let T;return this.destroyed||(T=this.readableEnded?null:new le,this.destroy(T)),new c((D,_e)=>S(this,Se=>Se&&Se!==T?_e(Se):D(null)))},ae.prototype.push=function(T,D){return Te(this,T,D,!1)},ae.prototype.unshift=function(T,D){return Te(this,T,D,!0)};function Te(T,D,_e,Se){b("readableAddChunk",D);let xe=T._readableState,Ne;if((xe.state&Z)===0&&(typeof D=="string"?(_e=_e||xe.defaultEncoding,xe.encoding!==_e&&(Se&&xe.encoding?D=d.from(D,_e).toString(xe.encoding):(D=d.from(D,_e),_e=""))):D instanceof d?_e="":A._isUint8Array(D)?(D=A._uint8ArrayToBuffer(D),_e=""):D!=null&&(Ne=new F("chunk",["string","Buffer","Uint8Array"],D))),Ne)B(T,Ne);else if(D===null)xe.state&=~ve,X(T,xe);else if((xe.state&Z)!==0||D&&D.length>0)if(Se)if((xe.state&re)!==0)B(T,new N);else{if(xe.destroyed||xe.errored)return!1;f(T,xe,D,!0)}else if(xe.ended)B(T,new L);else{if(xe.destroyed||xe.errored)return!1;xe.state&=~ve,xe.decoder&&!_e?(D=xe.decoder.write(D),xe.objectMode||D.length!==0?f(T,xe,D,!1):$(T,xe)):f(T,xe,D,!1)}else Se||(xe.state&=~ve,$(T,xe));return!xe.ended&&(xe.length<xe.highWaterMark||xe.length===0)}function f(T,D,_e,Se){D.flowing&&D.length===0&&!D.sync&&T.listenerCount("data")>0?((D.state&pe)!==0?D.awaitDrainWriters.clear():D.awaitDrainWriters=null,D.dataEmitted=!0,T.emit("data",_e)):(D.length+=D.objectMode?1:_e.length,Se?D.buffer.unshift(_e):D.buffer.push(_e),(D.state&oe)!==0&&he(T)),$(T,D)}ae.prototype.isPaused=function(){let T=this._readableState;return T[H]===!0||T.flowing===!1},ae.prototype.setEncoding=function(T){let D=new ne(T);this._readableState.decoder=D,this._readableState.encoding=this._readableState.decoder.encoding;let _e=this._readableState.buffer,Se="";for(let xe of _e)Se+=D.write(xe);return _e.clear(),Se!==""&&_e.push(Se),this._readableState.length=Se.length,this};var w=1073741824;function I(T){if(T>w)throw new V("size","<= 1GiB",T);return T--,T|=T>>>1,T|=T>>>2,T|=T>>>4,T|=T>>>8,T|=T>>>16,T++,T}function j(T,D){return T<=0||D.length===0&&D.ended?0:(D.state&Z)!==0?1:t(T)?D.flowing&&D.length?D.buffer.first().length:D.length:T<=D.length?T:D.ended?D.length:0}ae.prototype.read=function(T){b("read",T),T===void 0?T=NaN:a(T)||(T=e(T,10));let D=this._readableState,_e=T;if(T>D.highWaterMark&&(D.highWaterMark=I(T)),T!==0&&(D.state&=~q),T===0&&D.needReadable&&((D.highWaterMark!==0?D.length>=D.highWaterMark:D.length>0)||D.ended))return b("read: emitReadable",D.length,D.ended),D.length===0&&D.ended?tt(this):he(this),null;if(T=j(T,D),T===0&&D.ended)return D.length===0&&tt(this),null;let Se=(D.state&oe)!==0;if(b("need readable",Se),(D.length===0||D.length-T<D.highWaterMark)&&(Se=!0,b("length less than watermark",Se)),D.ended||D.reading||D.destroyed||D.errored||!D.constructed)Se=!1,b("reading, ended or constructing",Se);else if(Se){b("do read"),D.state|=ve|U,D.length===0&&(D.state|=oe);try{this._read(D.highWaterMark)}catch(Ne){B(this,Ne)}D.state&=~U,D.reading||(T=j(_e,D))}let xe;return T>0?xe=jt(T,D):xe=null,xe===null?(D.needReadable=D.length<=D.highWaterMark,T=0):(D.length-=T,D.multiAwaitDrain?D.awaitDrainWriters.clear():D.awaitDrainWriters=null),D.length===0&&(D.ended||(D.needReadable=!0),_e!==T&&D.ended&&tt(this)),xe!==null&&!D.errorEmitted&&!D.closeEmitted&&(D.dataEmitted=!0,this.emit("data",xe)),xe};function X(T,D){if(b("onEofChunk"),!D.ended){if(D.decoder){let _e=D.decoder.end();_e&&_e.length&&(D.buffer.push(_e),D.length+=D.objectMode?1:_e.length)}D.ended=!0,D.sync?he(T):(D.needReadable=!1,D.emittedReadable=!0,Ee(T))}}function he(T){let D=T._readableState;b("emitReadable",D.needReadable,D.emittedReadable),D.needReadable=!1,D.emittedReadable||(b("emitReadable",D.flowing),D.emittedReadable=!0,s.nextTick(Ee,T))}function Ee(T){let D=T._readableState;b("emitReadable_",D.destroyed,D.length,D.ended),!D.destroyed&&!D.errored&&(D.length||D.ended)&&(T.emit("readable"),D.emittedReadable=!1),D.needReadable=!D.flowing&&!D.ended&&D.length<=D.highWaterMark,Xe(T)}function $(T,D){!D.readingMore&&D.constructed&&(D.readingMore=!0,s.nextTick(ie,T,D))}function ie(T,D){for(;!D.reading&&!D.ended&&(D.length<D.highWaterMark||D.flowing&&D.length===0);){let _e=D.length;if(b("maybeReadMore read 0"),T.read(0),_e===D.length)break}D.readingMore=!1}ae.prototype._read=function(T){throw new k("_read()")},ae.prototype.pipe=function(T,D){let _e=this,Se=this._readableState;Se.pipes.length===1&&(Se.multiAwaitDrain||(Se.multiAwaitDrain=!0,Se.awaitDrainWriters=new p(Se.awaitDrainWriters?[Se.awaitDrainWriters]:[]))),Se.pipes.push(T),b("pipe count=%d opts=%j",Se.pipes.length,D);let xe=(!D||D.end!==!1)&&T!==s.stdout&&T!==s.stderr?qe:Ot;Se.endEmitted?s.nextTick(xe):_e.once("end",xe),T.on("unpipe",Ne);function Ne(nt,dt){b("onunpipe"),nt===_e&&dt&&dt.hasUnpiped===!1&&(dt.hasUnpiped=!0,Yt())}function qe(){b("onend"),T.end()}let Ge,Jt=!1;function Yt(){b("cleanup"),T.removeListener("close",rt),T.removeListener("finish",wt),Ge&&T.removeListener("drain",Ge),T.removeListener("error",Tt),T.removeListener("unpipe",Ne),_e.removeListener("end",qe),_e.removeListener("end",Ot),_e.removeListener("data",jr),Jt=!0,Ge&&Se.awaitDrainWriters&&(!T._writableState||T._writableState.needDrain)&&Ge()}function Zt(){Jt||(Se.pipes.length===1&&Se.pipes[0]===T?(b("false write response, pause",0),Se.awaitDrainWriters=T,Se.multiAwaitDrain=!1):Se.pipes.length>1&&Se.pipes.includes(T)&&(b("false write response, pause",Se.awaitDrainWriters.size),Se.awaitDrainWriters.add(T)),_e.pause()),Ge||(Ge=Ie(_e,T),T.on("drain",Ge))}_e.on("data",jr);function jr(nt){b("ondata");let dt=T.write(nt);b("dest.write",dt),dt===!1&&Zt()}function Tt(nt){if(b("onerror",nt),Ot(),T.removeListener("error",Tt),T.listenerCount("error")===0){let dt=T._writableState||T._readableState;dt&&!dt.errorEmitted?B(T,nt):T.emit("error",nt)}}_(T,"error",Tt);function rt(){T.removeListener("finish",wt),Ot()}T.once("close",rt);function wt(){b("onfinish"),T.removeListener("close",rt),Ot()}T.once("finish",wt);function Ot(){b("unpipe"),_e.unpipe(T)}return T.emit("pipe",_e),T.writableNeedDrain===!0?Zt():Se.flowing||(b("pipe resume"),_e.resume()),T};function Ie(T,D){return function(){let _e=T._readableState;_e.awaitDrainWriters===D?(b("pipeOnDrain",1),_e.awaitDrainWriters=null):_e.multiAwaitDrain&&(b("pipeOnDrain",_e.awaitDrainWriters.size),_e.awaitDrainWriters.delete(D)),(!_e.awaitDrainWriters||_e.awaitDrainWriters.size===0)&&T.listenerCount("data")&&T.resume()}}ae.prototype.unpipe=function(T){let D=this._readableState,_e={hasUnpiped:!1};if(D.pipes.length===0)return this;if(!T){let xe=D.pipes;D.pipes=[],this.pause();for(let Ne=0;Ne<xe.length;Ne++)xe[Ne].emit("unpipe",this,{hasUnpiped:!1});return this}let Se=i(D.pipes,T);return Se===-1?this:(D.pipes.splice(Se,1),D.pipes.length===0&&this.pause(),T.emit("unpipe",this,_e),this)},ae.prototype.on=function(T,D){let _e=A.prototype.on.call(this,T,D),Se=this._readableState;return T==="data"?(Se.readableListening=this.listenerCount("readable")>0,Se.flowing!==!1&&this.resume()):T==="readable"&&!Se.endEmitted&&!Se.readableListening&&(Se.readableListening=Se.needReadable=!0,Se.flowing=!1,Se.emittedReadable=!1,b("on readable",Se.length,Se.reading),Se.length?he(this):Se.reading||s.nextTick(ke,this)),_e},ae.prototype.addListener=ae.prototype.on,ae.prototype.removeListener=function(T,D){let _e=A.prototype.removeListener.call(this,T,D);return T==="readable"&&s.nextTick(Ce,this),_e},ae.prototype.off=ae.prototype.removeListener,ae.prototype.removeAllListeners=function(T){let D=A.prototype.removeAllListeners.apply(this,arguments);return(T==="readable"||T===void 0)&&s.nextTick(Ce,this),D};function Ce(T){let D=T._readableState;D.readableListening=T.listenerCount("readable")>0,D.resumeScheduled&&D[H]===!1?D.flowing=!0:T.listenerCount("data")>0?T.resume():D.readableListening||(D.flowing=null)}function ke(T){b("readable nexttick read 0"),T.read(0)}ae.prototype.resume=function(){let T=this._readableState;return T.flowing||(b("resume"),T.flowing=!T.readableListening,Oe(this,T)),T[H]=!1,this};function Oe(T,D){D.resumeScheduled||(D.resumeScheduled=!0,s.nextTick(Ze,T,D))}function Ze(T,D){b("resume",D.reading),D.reading||T.read(0),D.resumeScheduled=!1,T.emit("resume"),Xe(T),D.flowing&&!D.reading&&T.read(0)}ae.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[H]=!0,this};function Xe(T){let D=T._readableState;for(b("flow",D.flowing);D.flowing&&T.read()!==null;);}ae.prototype.wrap=function(T){let D=!1;T.on("data",Se=>{!this.push(Se)&&T.pause&&(D=!0,T.pause())}),T.on("end",()=>{this.push(null)}),T.on("error",Se=>{B(this,Se)}),T.on("close",()=>{this.destroy()}),T.on("destroy",()=>{this.destroy()}),this._read=()=>{D&&T.resume&&(D=!1,T.resume())};let _e=r(T);for(let Se=1;Se<_e.length;Se++){let xe=_e[Se];this[xe]===void 0&&typeof T[xe]=="function"&&(this[xe]=T[xe].bind(T))}return this},ae.prototype[y]=function(){return Ve(this)},ae.prototype.iterator=function(T){return T!==void 0&&J(T,"options"),Ve(this,T)};function Ve(T,D){typeof T.read!="function"&&(T=ae.wrap(T,{objectMode:!0}));let _e=et(T,D);return _e.stream=T,_e}async function*et(T,D){let _e=ee;function Se(qe){this===T?(_e(),_e=ee):_e=qe}T.on("readable",Se);let xe,Ne=S(T,{writable:!1},qe=>{xe=qe?P(xe,qe):null,_e(),_e=ee});try{for(;;){let qe=T.destroyed?null:T.read();if(qe!==null)yield qe;else{if(xe)throw xe;if(xe===null)return;await new c(Se)}}}catch(qe){throw xe=P(xe,qe),xe}finally{(xe||D?.destroyOnReturn!==!1)&&(xe===void 0||T._readableState.autoDestroy)?E.destroyer(T,null):(T.off("readable",Se),Ne())}}n(ae.prototype,{readable:{__proto__:null,get(){let T=this._readableState;return!!T&&T.readable!==!1&&!T.destroyed&&!T.errorEmitted&&!T.endEmitted},set(T){this._readableState&&(this._readableState.readable=!!T)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(T){this._readableState&&(this._readableState.flowing=T)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(T){this._readableState&&(this._readableState.destroyed=T)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),n(we.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[H]!==!1},set(T){this[H]=!!T}}}),ae._fromList=jt;function jt(T,D){if(D.length===0)return null;let _e;return D.objectMode?_e=D.buffer.shift():!T||T>=D.length?(D.decoder?_e=D.buffer.join(""):D.buffer.length===1?_e=D.buffer.first():_e=D.buffer.concat(D.length),D.buffer.clear()):_e=D.buffer.consume(T,D.decoder),_e}function tt(T){let D=T._readableState;b("endReadable",D.endEmitted),D.endEmitted||(D.ended=!0,s.nextTick(ze,D,T))}function ze(T,D){if(b("endReadableNT",T.endEmitted,T.length),!T.errored&&!T.closeEmitted&&!T.endEmitted&&T.length===0){if(T.endEmitted=!0,D.emit("end"),D.writable&&D.allowHalfOpen===!1)s.nextTick(Nr,D);else if(T.autoDestroy){let _e=D._writableState;(!_e||_e.autoDestroy&&(_e.finished||_e.writable===!1))&&D.destroy()}}}function Nr(T){T.writable&&!T.writableEnded&&!T.destroyed&&T.end()}ae.from=function(T,D){return W(ae,T,D)};var Ft;function Gt(){return Ft===void 0&&(Ft={}),Ft}ae.fromWeb=function(T,D){return Gt().newStreamReadableFromReadableStream(T,D)},ae.toWeb=function(T,D){return Gt().newReadableStreamFromStreamReadable(T,D)},ae.wrap=function(T,D){var _e,Se;return new ae({objectMode:(_e=(Se=T.readableObjectMode)!==null&&Se!==void 0?Se:T.objectMode)!==null&&_e!==void 0?_e:!0,...D,destroy(xe,Ne){E.destroyer(T,xe),Ne(xe)}}).wrap(T)}}),ao=ge((l,u)=>{ue(),fe(),ce();var s=xt(),{ArrayPrototypeSlice:i,Error:a,FunctionPrototypeSymbolHasInstance:t,ObjectDefineProperty:e,ObjectDefineProperties:n,ObjectSetPrototypeOf:r,StringPrototypeToLowerCase:o,Symbol:c,SymbolHasInstance:p}=De();u.exports=J,J.WritableState=N;var{EventEmitter:g}=(St(),Be(gt)),y=so().Stream,{Buffer:h}=(Fe(),Be(je)),m=Rt(),{addAbortSignal:A}=ir(),{getHighWaterMark:_,getDefaultHighWaterMark:d}=sr(),{ERR_INVALID_ARG_TYPE:v,ERR_METHOD_NOT_IMPLEMENTED:S,ERR_MULTIPLE_CALLBACK:b,ERR_STREAM_CANNOT_PIPE:x,ERR_STREAM_DESTROYED:E,ERR_STREAM_ALREADY_FINISHED:C,ERR_STREAM_NULL_VALUES:M,ERR_STREAM_WRITE_AFTER_END:P,ERR_UNKNOWN_ENCODING:F}=Qe().codes,{errorOrDestroy:k}=m;r(J.prototype,y.prototype),r(J,y);function V(){}var L=c("kOnFinished");function N(R,K,te){typeof te!="boolean"&&(te=K instanceof lt()),this.objectMode=!!(R&&R.objectMode),te&&(this.objectMode=this.objectMode||!!(R&&R.writableObjectMode)),this.highWaterMark=R?_(this,R,"writableHighWaterMark",te):d(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let de=!!(R&&R.decodeStrings===!1);this.decodeStrings=!de,this.defaultEncoding=R&&R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=B.bind(void 0,K),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,le(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!R||R.emitClose!==!1,this.autoDestroy=!R||R.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[L]=[]}function le(R){R.buffered=[],R.bufferedIndex=0,R.allBuffers=!0,R.allNoop=!0}N.prototype.getBuffer=function(){return i(this.buffered,this.bufferedIndex)},e(N.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function J(R){let K=this instanceof lt();if(!K&&!t(J,this))return new J(R);this._writableState=new N(R,this,K),R&&(typeof R.write=="function"&&(this._write=R.write),typeof R.writev=="function"&&(this._writev=R.writev),typeof R.destroy=="function"&&(this._destroy=R.destroy),typeof R.final=="function"&&(this._final=R.final),typeof R.construct=="function"&&(this._construct=R.construct),R.signal&&A(R.signal,this)),y.call(this,R),m.construct(this,()=>{let te=this._writableState;te.writing||ve(this,te),q(this,te)})}e(J,p,{__proto__:null,value:function(R){return t(this,R)?!0:this!==J?!1:R&&R._writableState instanceof N}}),J.prototype.pipe=function(){k(this,new x)};function H(R,K,te,de){let pe=R._writableState;if(typeof te=="function")de=te,te=pe.defaultEncoding;else{if(!te)te=pe.defaultEncoding;else if(te!=="buffer"&&!h.isEncoding(te))throw new F(te);typeof de!="function"&&(de=V)}if(K===null)throw new M;if(!pe.objectMode)if(typeof K=="string")pe.decodeStrings!==!1&&(K=h.from(K,te),te="buffer");else if(K instanceof h)te="buffer";else if(y._isUint8Array(K))K=y._uint8ArrayToBuffer(K),te="buffer";else throw new v("chunk",["string","Buffer","Uint8Array"],K);let be;return pe.ending?be=new P:pe.destroyed&&(be=new E("write")),be?(s.nextTick(de,be),k(R,be,!0),be):(pe.pendingcb++,ne(R,pe,K,te,de))}J.prototype.write=function(R,K,te){return H(this,R,K,te)===!0},J.prototype.cork=function(){this._writableState.corked++},J.prototype.uncork=function(){let R=this._writableState;R.corked&&(R.corked--,R.writing||ve(this,R))},J.prototype.setDefaultEncoding=function(R){if(typeof R=="string"&&(R=o(R)),!h.isEncoding(R))throw new F(R);return this._writableState.defaultEncoding=R,this};function ne(R,K,te,de,pe){let be=K.objectMode?1:te.length;K.length+=be;let Q=K.length<K.highWaterMark;return Q||(K.needDrain=!0),K.writing||K.corked||K.errored||!K.constructed?(K.buffered.push({chunk:te,encoding:de,callback:pe}),K.allBuffers&&de!=="buffer"&&(K.allBuffers=!1),K.allNoop&&pe!==V&&(K.allNoop=!1)):(K.writelen=be,K.writecb=pe,K.writing=!0,K.sync=!0,R._write(te,de,K.onwrite),K.sync=!1),Q&&!K.errored&&!K.destroyed}function W(R,K,te,de,pe,be,Q){K.writelen=de,K.writecb=Q,K.writing=!0,K.sync=!0,K.destroyed?K.onwrite(new E("write")):te?R._writev(pe,K.onwrite):R._write(pe,be,K.onwrite),K.sync=!1}function ee(R,K,te,de){--K.pendingcb,de(te),re(K),k(R,te)}function B(R,K){let te=R._writableState,de=te.sync,pe=te.writecb;if(typeof pe!="function"){k(R,new b);return}te.writing=!1,te.writecb=null,te.length-=te.writelen,te.writelen=0,K?(K.stack,te.errored||(te.errored=K),R._readableState&&!R._readableState.errored&&(R._readableState.errored=K),de?s.nextTick(ee,R,te,K,pe):ee(R,te,K,pe)):(te.buffered.length>te.bufferedIndex&&ve(R,te),de?te.afterWriteTickInfo!==null&&te.afterWriteTickInfo.cb===pe?te.afterWriteTickInfo.count++:(te.afterWriteTickInfo={count:1,cb:pe,stream:R,state:te},s.nextTick(Z,te.afterWriteTickInfo)):ye(R,te,1,pe))}function Z({stream:R,state:K,count:te,cb:de}){return K.afterWriteTickInfo=null,ye(R,K,te,de)}function ye(R,K,te,de){for(!K.ending&&!R.destroyed&&K.length===0&&K.needDrain&&(K.needDrain=!1,R.emit("drain"));te-- >0;)K.pendingcb--,de();K.destroyed&&re(K),q(R,K)}function re(R){if(R.writing)return;for(let pe=R.bufferedIndex;pe<R.buffered.length;++pe){var K;let{chunk:be,callback:Q}=R.buffered[pe],me=R.objectMode?1:be.length;R.length-=me,Q((K=R.errored)!==null&&K!==void 0?K:new E("write"))}let te=R[L].splice(0);for(let pe=0;pe<te.length;pe++){var de;te[pe]((de=R.errored)!==null&&de!==void 0?de:new E("end"))}le(R)}function ve(R,K){if(K.corked||K.bufferProcessing||K.destroyed||!K.constructed)return;let{buffered:te,bufferedIndex:de,objectMode:pe}=K,be=te.length-de;if(!be)return;let Q=de;if(K.bufferProcessing=!0,be>1&&R._writev){K.pendingcb-=be-1;let me=K.allNoop?V:ae=>{for(let Te=Q;Te<te.length;++Te)te[Te].callback(ae)},we=K.allNoop&&Q===0?te:i(te,Q);we.allBuffers=K.allBuffers,W(R,K,!0,K.length,we,"",me),le(K)}else{do{let{chunk:me,encoding:we,callback:ae}=te[Q];te[Q++]=null;let Te=pe?1:me.length;W(R,K,!1,Te,me,we,ae)}while(Q<te.length&&!K.writing);Q===te.length?le(K):Q>256?(te.splice(0,Q),K.bufferedIndex=0):K.bufferedIndex=Q}K.bufferProcessing=!1}J.prototype._write=function(R,K,te){if(this._writev)this._writev([{chunk:R,encoding:K}],te);else throw new S("_write()")},J.prototype._writev=null,J.prototype.end=function(R,K,te){let de=this._writableState;typeof R=="function"?(te=R,R=null,K=null):typeof K=="function"&&(te=K,K=null);let pe;if(R!=null){let be=H(this,R,K);be instanceof a&&(pe=be)}return de.corked&&(de.corked=1,this.uncork()),pe||(!de.errored&&!de.ending?(de.ending=!0,q(this,de,!0),de.ended=!0):de.finished?pe=new C("end"):de.destroyed&&(pe=new E("end"))),typeof te=="function"&&(pe||de.finished?s.nextTick(te,pe):de[L].push(te)),this};function z(R){return R.ending&&!R.destroyed&&R.constructed&&R.length===0&&!R.errored&&R.buffered.length===0&&!R.finished&&!R.writing&&!R.errorEmitted&&!R.closeEmitted}function U(R,K){let te=!1;function de(pe){if(te){k(R,pe??b());return}if(te=!0,K.pendingcb--,pe){let be=K[L].splice(0);for(let Q=0;Q<be.length;Q++)be[Q](pe);k(R,pe,K.sync)}else z(K)&&(K.prefinished=!0,R.emit("prefinish"),K.pendingcb++,s.nextTick(G,R,K))}K.sync=!0,K.pendingcb++;try{R._final(de)}catch(pe){de(pe)}K.sync=!1}function oe(R,K){!K.prefinished&&!K.finalCalled&&(typeof R._final=="function"&&!K.destroyed?(K.finalCalled=!0,U(R,K)):(K.prefinished=!0,R.emit("prefinish")))}function q(R,K,te){z(K)&&(oe(R,K),K.pendingcb===0&&(te?(K.pendingcb++,s.nextTick((de,pe)=>{z(pe)?G(de,pe):pe.pendingcb--},R,K)):z(K)&&(K.pendingcb++,G(R,K))))}function G(R,K){K.pendingcb--,K.finished=!0;let te=K[L].splice(0);for(let de=0;de<te.length;de++)te[de]();if(R.emit("finish"),K.autoDestroy){let de=R._readableState;(!de||de.autoDestroy&&(de.endEmitted||de.readable===!1))&&R.destroy()}}n(J.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(R){this._writableState&&(this._writableState.destroyed=R)}},writable:{__proto__:null,get(){let R=this._writableState;return!!R&&R.writable!==!1&&!R.destroyed&&!R.errored&&!R.ending&&!R.ended},set(R){this._writableState&&(this._writableState.writable=!!R)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let R=this._writableState;return R?!R.destroyed&&!R.ending&&R.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var Y=m.destroy;J.prototype.destroy=function(R,K){let te=this._writableState;return!te.destroyed&&(te.bufferedIndex<te.buffered.length||te[L].length)&&s.nextTick(re,te),Y.call(this,R,K),this},J.prototype._undestroy=m.undestroy,J.prototype._destroy=function(R,K){K(R)},J.prototype[g.captureRejectionSymbol]=function(R){this.destroy(R)};var Ae;function se(){return Ae===void 0&&(Ae={}),Ae}J.fromWeb=function(R,K){return se().newStreamWritableFromWritableStream(R,K)},J.toWeb=function(R){return se().newWritableStreamFromStreamWritable(R)}}),Lu=ge((l,u)=>{ue(),fe(),ce();var s=xt(),i=(Fe(),Be(je)),{isReadable:a,isWritable:t,isIterable:e,isNodeStream:n,isReadableNodeStream:r,isWritableNodeStream:o,isDuplexNodeStream:c,isReadableStream:p,isWritableStream:g}=at(),y=mt(),{AbortError:h,codes:{ERR_INVALID_ARG_TYPE:m,ERR_INVALID_RETURN_VALUE:A}}=Qe(),{destroyer:_}=Rt(),d=lt(),v=ar(),S=ao(),{createDeferredPromise:b}=He(),x=Xi(),E=globalThis.Blob||i.Blob,C=typeof E<"u"?function(L){return L instanceof E}:function(L){return!1},M=globalThis.AbortController||Qt().AbortController,{FunctionPrototypeCall:P}=De(),F=class extends d{constructor(L){super(L),L?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),L?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};u.exports=function L(N,le){if(c(N))return N;if(r(N))return V({readable:N});if(o(N))return V({writable:N});if(n(N))return V({writable:!1,readable:!1});if(p(N))return V({readable:v.fromWeb(N)});if(g(N))return V({writable:S.fromWeb(N)});if(typeof N=="function"){let{value:H,write:ne,final:W,destroy:ee}=k(N);if(e(H))return x(F,H,{objectMode:!0,write:ne,final:W,destroy:ee});let B=H?.then;if(typeof B=="function"){let Z,ye=P(B,H,re=>{if(re!=null)throw new A("nully","body",re)},re=>{_(Z,re)});return Z=new F({objectMode:!0,readable:!1,write:ne,final(re){W(async()=>{try{await ye,s.nextTick(re,null)}catch(ve){s.nextTick(re,ve)}})},destroy:ee})}throw new A("Iterable, AsyncIterable or AsyncFunction",le,H)}if(C(N))return L(N.arrayBuffer());if(e(N))return x(F,N,{objectMode:!0,writable:!1});if(p(N?.readable)&&g(N?.writable))return F.fromWeb(N);if(typeof N?.writable=="object"||typeof N?.readable=="object"){let H=N!=null&&N.readable?r(N?.readable)?N?.readable:L(N.readable):void 0,ne=N!=null&&N.writable?o(N?.writable)?N?.writable:L(N.writable):void 0;return V({readable:H,writable:ne})}let J=N?.then;if(typeof J=="function"){let H;return P(J,N,ne=>{ne!=null&&H.push(ne),H.push(null)},ne=>{_(H,ne)}),H=new F({objectMode:!0,writable:!1,read(){}})}throw new m(le,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],N)};function k(L){let{promise:N,resolve:le}=b(),J=new M,H=J.signal;return{value:L((async function*(){for(;;){let ne=N;N=null;let{chunk:W,done:ee,cb:B}=await ne;if(s.nextTick(B),ee)return;if(H.aborted)throw new h(void 0,{cause:H.reason});({promise:N,resolve:le}=b()),yield W}})(),{signal:H}),write(ne,W,ee){let B=le;le=null,B({chunk:ne,done:!1,cb:ee})},final(ne){let W=le;le=null,W({done:!0,cb:ne})},destroy(ne,W){J.abort(),W(ne)}}}function V(L){let N=L.readable&&typeof L.readable.read!="function"?v.wrap(L.readable):L.readable,le=L.writable,J=!!a(N),H=!!t(le),ne,W,ee,B,Z;function ye(re){let ve=B;B=null,ve?ve(re):re&&Z.destroy(re)}return Z=new F({readableObjectMode:!!(N!=null&&N.readableObjectMode),writableObjectMode:!!(le!=null&&le.writableObjectMode),readable:J,writable:H}),H&&(y(le,re=>{H=!1,re&&_(N,re),ye(re)}),Z._write=function(re,ve,z){le.write(re,ve)?z():ne=z},Z._final=function(re){le.end(),W=re},le.on("drain",function(){if(ne){let re=ne;ne=null,re()}}),le.on("finish",function(){if(W){let re=W;W=null,re()}})),J&&(y(N,re=>{J=!1,re&&_(N,re),ye(re)}),N.on("readable",function(){if(ee){let re=ee;ee=null,re()}}),N.on("end",function(){Z.push(null)}),Z._read=function(){for(;;){let re=N.read();if(re===null){ee=Z._read;return}if(!Z.push(re))return}}),Z._destroy=function(re,ve){!re&&B!==null&&(re=new h),ee=null,ne=null,W=null,B===null?ve(re):(B=ve,_(le,re),_(N,re))},Z}}),lt=ge((l,u)=>{ue(),fe(),ce();var{ObjectDefineProperties:s,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:a,ObjectSetPrototypeOf:t}=De();u.exports=r;var e=ar(),n=ao();t(r.prototype,e.prototype),t(r,e);{let g=a(n.prototype);for(let y=0;y<g.length;y++){let h=g[y];r.prototype[h]||(r.prototype[h]=n.prototype[h])}}function r(g){if(!(this instanceof r))return new r(g);e.call(this,g),n.call(this,g),g?(this.allowHalfOpen=g.allowHalfOpen!==!1,g.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),g.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}s(r.prototype,{writable:{__proto__:null,...i(n.prototype,"writable")},writableHighWaterMark:{__proto__:null,...i(n.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...i(n.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...i(n.prototype,"writableBuffer")},writableLength:{__proto__:null,...i(n.prototype,"writableLength")},writableFinished:{__proto__:null,...i(n.prototype,"writableFinished")},writableCorked:{__proto__:null,...i(n.prototype,"writableCorked")},writableEnded:{__proto__:null,...i(n.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...i(n.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(g){this._readableState&&this._writableState&&(this._readableState.destroyed=g,this._writableState.destroyed=g)}}});var o;function c(){return o===void 0&&(o={}),o}r.fromWeb=function(g,y){return c().newStreamDuplexFromReadableWritablePair(g,y)},r.toWeb=function(g){return c().newReadableWritablePairFromDuplex(g)};var p;r.from=function(g){return p||(p=Lu()),p(g,"body")}}),es=ge((l,u)=>{ue(),fe(),ce();var{ObjectSetPrototypeOf:s,Symbol:i}=De();u.exports=r;var{ERR_METHOD_NOT_IMPLEMENTED:a}=Qe().codes,t=lt(),{getHighWaterMark:e}=sr();s(r.prototype,t.prototype),s(r,t);var n=i("kCallback");function r(p){if(!(this instanceof r))return new r(p);let g=p?e(this,p,"readableHighWaterMark",!0):null;g===0&&(p={...p,highWaterMark:null,readableHighWaterMark:g,writableHighWaterMark:p.writableHighWaterMark||0}),t.call(this,p),this._readableState.sync=!1,this[n]=null,p&&(typeof p.transform=="function"&&(this._transform=p.transform),typeof p.flush=="function"&&(this._flush=p.flush)),this.on("prefinish",c)}function o(p){typeof this._flush=="function"&&!this.destroyed?this._flush((g,y)=>{if(g){p?p(g):this.destroy(g);return}y!=null&&this.push(y),this.push(null),p&&p()}):(this.push(null),p&&p())}function c(){this._final!==o&&o.call(this)}r.prototype._final=o,r.prototype._transform=function(p,g,y){throw new a("_transform()")},r.prototype._write=function(p,g,y){let h=this._readableState,m=this._writableState,A=h.length;this._transform(p,g,(_,d)=>{if(_){y(_);return}d!=null&&this.push(d),m.ended||A===h.length||h.length<h.highWaterMark?y():this[n]=y})},r.prototype._read=function(){if(this[n]){let p=this[n];this[n]=null,p()}}}),ts=ge((l,u)=>{ue(),fe(),ce();var{ObjectSetPrototypeOf:s}=De();u.exports=a;var i=es();s(a.prototype,i.prototype),s(a,i);function a(t){if(!(this instanceof a))return new a(t);i.call(this,t)}a.prototype._transform=function(t,e,n){n(null,t)}}),lo=ge((l,u)=>{ue(),fe(),ce();var s=xt(),{ArrayIsArray:i,Promise:a,SymbolAsyncIterator:t,SymbolDispose:e}=De(),n=mt(),{once:r}=He(),o=Rt(),c=lt(),{aggregateTwoErrors:p,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:y,ERR_MISSING_ARGS:h,ERR_STREAM_DESTROYED:m,ERR_STREAM_PREMATURE_CLOSE:A},AbortError:_}=Qe(),{validateFunction:d,validateAbortSignal:v}=$t(),{isIterable:S,isReadable:b,isReadableNodeStream:x,isNodeStream:E,isTransformStream:C,isWebStream:M,isReadableStream:P,isReadableFinished:F}=at(),k=globalThis.AbortController||Qt().AbortController,V,L,N;function le(re,ve,z){let U=!1;re.on("close",()=>{U=!0});let oe=n(re,{readable:ve,writable:z},q=>{U=!q});return{destroy:q=>{U||(U=!0,o.destroyer(re,q||new m("pipe")))},cleanup:oe}}function J(re){return d(re[re.length-1],"streams[stream.length - 1]"),re.pop()}function H(re){if(S(re))return re;if(x(re))return ne(re);throw new g("val",["Readable","Iterable","AsyncIterable"],re)}async function*ne(re){L||(L=ar()),yield*L.prototype[t].call(re)}async function W(re,ve,z,{end:U}){let oe,q=null,G=se=>{if(se&&(oe=se),q){let R=q;q=null,R()}},Y=()=>new a((se,R)=>{oe?R(oe):q=()=>{oe?R(oe):se()}});ve.on("drain",G);let Ae=n(ve,{readable:!1},G);try{ve.writableNeedDrain&&await Y();for await(let se of re)ve.write(se)||await Y();U&&(ve.end(),await Y()),z()}catch(se){z(oe!==se?p(oe,se):se)}finally{Ae(),ve.off("drain",G)}}async function ee(re,ve,z,{end:U}){C(ve)&&(ve=ve.writable);let oe=ve.getWriter();try{for await(let q of re)await oe.ready,oe.write(q).catch(()=>{});await oe.ready,U&&await oe.close(),z()}catch(q){try{await oe.abort(q),z(q)}catch(G){z(G)}}}function B(...re){return Z(re,r(J(re)))}function Z(re,ve,z){if(re.length===1&&i(re[0])&&(re=re[0]),re.length<2)throw new h("streams");let U=new k,oe=U.signal,q=z?.signal,G=[];v(q,"options.signal");function Y(){pe(new _)}N=N||He().addAbortListener;let Ae;q&&(Ae=N(q,Y));let se,R,K=[],te=0;function de(we){pe(we,--te===0)}function pe(we,ae){var Te;if(we&&(!se||se.code==="ERR_STREAM_PREMATURE_CLOSE")&&(se=we),!(!se&&!ae)){for(;K.length;)K.shift()(se);(Te=Ae)===null||Te===void 0||Te[e](),U.abort(),ae&&(se||G.forEach(f=>f()),s.nextTick(ve,se,R))}}let be;for(let we=0;we<re.length;we++){let ae=re[we],Te=we<re.length-1,f=we>0,w=Te||z?.end!==!1,I=we===re.length-1;if(E(ae)){let j=function(X){X&&X.name!=="AbortError"&&X.code!=="ERR_STREAM_PREMATURE_CLOSE"&&de(X)};if(w){let{destroy:X,cleanup:he}=le(ae,Te,f);K.push(X),b(ae)&&I&&G.push(he)}ae.on("error",j),b(ae)&&I&&G.push(()=>{ae.removeListener("error",j)})}if(we===0)if(typeof ae=="function"){if(be=ae({signal:oe}),!S(be))throw new y("Iterable, AsyncIterable or Stream","source",be)}else S(ae)||x(ae)||C(ae)?be=ae:be=c.from(ae);else if(typeof ae=="function"){if(C(be)){var Q;be=H((Q=be)===null||Q===void 0?void 0:Q.readable)}else be=H(be);if(be=ae(be,{signal:oe}),Te){if(!S(be,!0))throw new y("AsyncIterable",`transform[${we-1}]`,be)}else{var me;V||(V=ts());let j=new V({objectMode:!0}),X=(me=be)===null||me===void 0?void 0:me.then;if(typeof X=="function")te++,X.call(be,$=>{R=$,$!=null&&j.write($),w&&j.end(),s.nextTick(de)},$=>{j.destroy($),s.nextTick(de,$)});else if(S(be,!0))te++,W(be,j,de,{end:w});else if(P(be)||C(be)){let $=be.readable||be;te++,W($,j,de,{end:w})}else throw new y("AsyncIterable or Promise","destination",be);be=j;let{destroy:he,cleanup:Ee}=le(be,!1,!0);K.push(he),I&&G.push(Ee)}}else if(E(ae)){if(x(be)){te+=2;let j=ye(be,ae,de,{end:w});b(ae)&&I&&G.push(j)}else if(C(be)||P(be)){let j=be.readable||be;te++,W(j,ae,de,{end:w})}else if(S(be))te++,W(be,ae,de,{end:w});else throw new g("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],be);be=ae}else if(M(ae)){if(x(be))te++,ee(H(be),ae,de,{end:w});else if(P(be)||S(be))te++,ee(be,ae,de,{end:w});else if(C(be))te++,ee(be.readable,ae,de,{end:w});else throw new g("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],be);be=ae}else be=c.from(ae)}return(oe!=null&&oe.aborted||q!=null&&q.aborted)&&s.nextTick(Y),be}function ye(re,ve,z,{end:U}){let oe=!1;if(ve.on("close",()=>{oe||z(new A)}),re.pipe(ve,{end:!1}),U){let q=function(){oe=!0,ve.end()};F(re)?s.nextTick(q):re.once("end",q)}else z();return n(re,{readable:!0,writable:!1},q=>{let G=re._readableState;q&&q.code==="ERR_STREAM_PREMATURE_CLOSE"&&G&&G.ended&&!G.errored&&!G.errorEmitted?re.once("end",z).once("error",z):z(q)}),n(ve,{readable:!1,writable:!0},z)}u.exports={pipelineImpl:Z,pipeline:B}}),rs=ge((l,u)=>{ue(),fe(),ce();var{pipeline:s}=lo(),i=lt(),{destroyer:a}=Rt(),{isNodeStream:t,isReadable:e,isWritable:n,isWebStream:r,isTransformStream:o,isWritableStream:c,isReadableStream:p}=at(),{AbortError:g,codes:{ERR_INVALID_ARG_VALUE:y,ERR_MISSING_ARGS:h}}=Qe(),m=mt();u.exports=function(...A){if(A.length===0)throw new h("streams");if(A.length===1)return i.from(A[0]);let _=[...A];if(typeof A[0]=="function"&&(A[0]=i.from(A[0])),typeof A[A.length-1]=="function"){let k=A.length-1;A[k]=i.from(A[k])}for(let k=0;k<A.length;++k)if(!(!t(A[k])&&!r(A[k]))){if(k<A.length-1&&!(e(A[k])||p(A[k])||o(A[k])))throw new y(`streams[${k}]`,_[k],"must be readable");if(k>0&&!(n(A[k])||c(A[k])||o(A[k])))throw new y(`streams[${k}]`,_[k],"must be writable")}let d,v,S,b,x;function E(k){let V=b;b=null,V?V(k):k?x.destroy(k):!F&&!P&&x.destroy()}let C=A[0],M=s(A,E),P=!!(n(C)||c(C)||o(C)),F=!!(e(M)||p(M)||o(M));if(x=new i({writableObjectMode:!!(C!=null&&C.writableObjectMode),readableObjectMode:!!(M!=null&&M.readableObjectMode),writable:P,readable:F}),P){if(t(C))x._write=function(V,L,N){C.write(V,L)?N():d=N},x._final=function(V){C.end(),v=V},C.on("drain",function(){if(d){let V=d;d=null,V()}});else if(r(C)){let V=(o(C)?C.writable:C).getWriter();x._write=async function(L,N,le){try{await V.ready,V.write(L).catch(()=>{}),le()}catch(J){le(J)}},x._final=async function(L){try{await V.ready,V.close().catch(()=>{}),v=L}catch(N){L(N)}}}let k=o(M)?M.readable:M;m(k,()=>{if(v){let V=v;v=null,V()}})}if(F){if(t(M))M.on("readable",function(){if(S){let k=S;S=null,k()}}),M.on("end",function(){x.push(null)}),x._read=function(){for(;;){let k=M.read();if(k===null){S=x._read;return}if(!x.push(k))return}};else if(r(M)){let k=(o(M)?M.readable:M).getReader();x._read=async function(){for(;;)try{let{value:V,done:L}=await k.read();if(!x.push(V))return;if(L){x.push(null);return}}catch{return}}}}return x._destroy=function(k,V){!k&&b!==null&&(k=new g),S=null,d=null,v=null,b===null?V(k):(b=V,t(M)&&a(M,k))},x}}),Wu=ge((l,u)=>{ue(),fe(),ce();var s=globalThis.AbortController||Qt().AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:a,ERR_MISSING_ARGS:t,ERR_OUT_OF_RANGE:e},AbortError:n}=Qe(),{validateAbortSignal:r,validateInteger:o,validateObject:c}=$t(),p=De().Symbol("kWeak"),g=De().Symbol("kResistStopPropagation"),{finished:y}=mt(),h=rs(),{addAbortSignalNoValidate:m}=ir(),{isWritable:A,isNodeStream:_}=at(),{deprecate:d}=He(),{ArrayPrototypePush:v,Boolean:S,MathFloor:b,Number:x,NumberIsNaN:E,Promise:C,PromiseReject:M,PromiseResolve:P,PromisePrototypeThen:F,Symbol:k}=De(),V=k("kEmpty"),L=k("kEof");function N(q,G){if(G!=null&&c(G,"options"),G?.signal!=null&&r(G.signal,"options.signal"),_(q)&&!A(q))throw new i("stream",q,"must be writable");let Y=h(this,q);return G!=null&&G.signal&&m(G.signal,Y),Y}function le(q,G){if(typeof q!="function")throw new a("fn",["Function","AsyncFunction"],q);G!=null&&c(G,"options"),G?.signal!=null&&r(G.signal,"options.signal");let Y=1;G?.concurrency!=null&&(Y=b(G.concurrency));let Ae=Y-1;return G?.highWaterMark!=null&&(Ae=b(G.highWaterMark)),o(Y,"options.concurrency",1),o(Ae,"options.highWaterMark",0),Ae+=Y,(async function*(){let se=He().AbortSignalAny([G?.signal].filter(S)),R=this,K=[],te={signal:se},de,pe,be=!1,Q=0;function me(){be=!0,we()}function we(){Q-=1,ae()}function ae(){pe&&!be&&Q<Y&&K.length<Ae&&(pe(),pe=null)}async function Te(){try{for await(let f of R){if(be)return;if(se.aborted)throw new n;try{if(f=q(f,te),f===V)continue;f=P(f)}catch(w){f=M(w)}Q+=1,F(f,we,me),K.push(f),de&&(de(),de=null),!be&&(K.length>=Ae||Q>=Y)&&await new C(w=>{pe=w})}K.push(L)}catch(f){let w=M(f);F(w,we,me),K.push(w)}finally{be=!0,de&&(de(),de=null)}}Te();try{for(;;){for(;K.length>0;){let f=await K[0];if(f===L)return;if(se.aborted)throw new n;f!==V&&(yield f),K.shift(),ae()}await new C(f=>{de=f})}}finally{be=!0,pe&&(pe(),pe=null)}}).call(this)}function J(q=void 0){return q!=null&&c(q,"options"),q?.signal!=null&&r(q.signal,"options.signal"),(async function*(){let G=0;for await(let Ae of this){var Y;if(q!=null&&(Y=q.signal)!==null&&Y!==void 0&&Y.aborted)throw new n({cause:q.signal.reason});yield[G++,Ae]}}).call(this)}async function H(q,G=void 0){for await(let Y of B.call(this,q,G))return!0;return!1}async function ne(q,G=void 0){if(typeof q!="function")throw new a("fn",["Function","AsyncFunction"],q);return!await H.call(this,async(...Y)=>!await q(...Y),G)}async function W(q,G){for await(let Y of B.call(this,q,G))return Y}async function ee(q,G){if(typeof q!="function")throw new a("fn",["Function","AsyncFunction"],q);async function Y(Ae,se){return await q(Ae,se),V}for await(let Ae of le.call(this,Y,G));}function B(q,G){if(typeof q!="function")throw new a("fn",["Function","AsyncFunction"],q);async function Y(Ae,se){return await q(Ae,se)?Ae:V}return le.call(this,Y,G)}var Z=class extends t{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function ye(q,G,Y){var Ae;if(typeof q!="function")throw new a("reducer",["Function","AsyncFunction"],q);Y!=null&&c(Y,"options"),Y?.signal!=null&&r(Y.signal,"options.signal");let se=arguments.length>1;if(Y!=null&&(Ae=Y.signal)!==null&&Ae!==void 0&&Ae.aborted){let pe=new n(void 0,{cause:Y.signal.reason});throw this.once("error",()=>{}),await y(this.destroy(pe)),pe}let R=new s,K=R.signal;if(Y!=null&&Y.signal){let pe={once:!0,[p]:this,[g]:!0};Y.signal.addEventListener("abort",()=>R.abort(),pe)}let te=!1;try{for await(let pe of this){var de;if(te=!0,Y!=null&&(de=Y.signal)!==null&&de!==void 0&&de.aborted)throw new n;se?G=await q(G,pe,{signal:K}):(G=pe,se=!0)}if(!te&&!se)throw new Z}finally{R.abort()}return G}async function re(q){q!=null&&c(q,"options"),q?.signal!=null&&r(q.signal,"options.signal");let G=[];for await(let Ae of this){var Y;if(q!=null&&(Y=q.signal)!==null&&Y!==void 0&&Y.aborted)throw new n(void 0,{cause:q.signal.reason});v(G,Ae)}return G}function ve(q,G){let Y=le.call(this,q,G);return(async function*(){for await(let Ae of Y)yield*Ae}).call(this)}function z(q){if(q=x(q),E(q))return 0;if(q<0)throw new e("number",">= 0",q);return q}function U(q,G=void 0){return G!=null&&c(G,"options"),G?.signal!=null&&r(G.signal,"options.signal"),q=z(q),(async function*(){var Y;if(G!=null&&(Y=G.signal)!==null&&Y!==void 0&&Y.aborted)throw new n;for await(let se of this){var Ae;if(G!=null&&(Ae=G.signal)!==null&&Ae!==void 0&&Ae.aborted)throw new n;q--<=0&&(yield se)}}).call(this)}function oe(q,G=void 0){return G!=null&&c(G,"options"),G?.signal!=null&&r(G.signal,"options.signal"),q=z(q),(async function*(){var Y;if(G!=null&&(Y=G.signal)!==null&&Y!==void 0&&Y.aborted)throw new n;for await(let se of this){var Ae;if(G!=null&&(Ae=G.signal)!==null&&Ae!==void 0&&Ae.aborted)throw new n;if(q-- >0&&(yield se),q<=0)return}}).call(this)}u.exports.streamReturningOperators={asIndexedPairs:d(J,"readable.asIndexedPairs will be removed in a future version."),drop:U,filter:B,flatMap:ve,map:le,take:oe,compose:N},u.exports.promiseReturningOperators={every:ne,forEach:ee,reduce:ye,toArray:re,some:H,find:W}}),ns=ge((l,u)=>{ue(),fe(),ce();var{ArrayPrototypePop:s,Promise:i}=De(),{isIterable:a,isNodeStream:t,isWebStream:e}=at(),{pipelineImpl:n}=lo(),{finished:r}=mt();os();function o(...c){return new i((p,g)=>{let y,h,m=c[c.length-1];if(m&&typeof m=="object"&&!t(m)&&!a(m)&&!e(m)){let A=s(c);y=A.signal,h=A.end}n(c,(A,_)=>{A?g(A):p(_)},{signal:y,end:h})})}u.exports={finished:r,pipeline:o}}),os=ge((l,u)=>{ue(),fe(),ce();var{Buffer:s}=(Fe(),Be(je)),{ObjectDefineProperty:i,ObjectKeys:a,ReflectApply:t}=De(),{promisify:{custom:e}}=He(),{streamReturningOperators:n,promiseReturningOperators:r}=Wu(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:o}}=Qe(),c=rs(),{setDefaultHighWaterMark:p,getDefaultHighWaterMark:g}=sr(),{pipeline:y}=lo(),{destroyer:h}=Rt(),m=mt(),A=ns(),_=at(),d=u.exports=so().Stream;d.isDestroyed=_.isDestroyed,d.isDisturbed=_.isDisturbed,d.isErrored=_.isErrored,d.isReadable=_.isReadable,d.isWritable=_.isWritable,d.Readable=ar();for(let S of a(n)){let b=function(...E){if(new.target)throw o();return d.Readable.from(t(x,this,E))},x=n[S];i(b,"name",{__proto__:null,value:x.name}),i(b,"length",{__proto__:null,value:x.length}),i(d.Readable.prototype,S,{__proto__:null,value:b,enumerable:!1,configurable:!0,writable:!0})}for(let S of a(r)){let b=function(...E){if(new.target)throw o();return t(x,this,E)},x=r[S];i(b,"name",{__proto__:null,value:x.name}),i(b,"length",{__proto__:null,value:x.length}),i(d.Readable.prototype,S,{__proto__:null,value:b,enumerable:!1,configurable:!0,writable:!0})}d.Writable=ao(),d.Duplex=lt(),d.Transform=es(),d.PassThrough=ts(),d.pipeline=y;var{addAbortSignal:v}=ir();d.addAbortSignal=v,d.finished=m,d.destroy=h,d.compose=c,d.setDefaultHighWaterMark=p,d.getDefaultHighWaterMark=g,i(d,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return A}}),i(y,e,{__proto__:null,enumerable:!0,get(){return A.pipeline}}),i(m,e,{__proto__:null,enumerable:!0,get(){return A.finished}}),d.Stream=d,d._isUint8Array=function(S){return S instanceof Uint8Array},d._uint8ArrayToBuffer=function(S){return s.from(S.buffer,S.byteOffset,S.byteLength)}}),It=ge((l,u)=>{ue(),fe(),ce();var s=os(),i=ns(),a=s.Readable.destroy;u.exports=s.Readable,u.exports._uint8ArrayToBuffer=s._uint8ArrayToBuffer,u.exports._isUint8Array=s._isUint8Array,u.exports.isDisturbed=s.isDisturbed,u.exports.isErrored=s.isErrored,u.exports.isReadable=s.isReadable,u.exports.Readable=s.Readable,u.exports.Writable=s.Writable,u.exports.Duplex=s.Duplex,u.exports.Transform=s.Transform,u.exports.PassThrough=s.PassThrough,u.exports.addAbortSignal=s.addAbortSignal,u.exports.finished=s.finished,u.exports.destroy=s.destroy,u.exports.destroy=a,u.exports.pipeline=s.pipeline,u.exports.compose=s.compose,Object.defineProperty(s,"promises",{configurable:!0,enumerable:!0,get(){return i}}),u.exports.Stream=s.Stream,u.exports.default=u.exports}),Ku=ge((l,u)=>{ue(),fe(),ce(),typeof Object.create=="function"?u.exports=function(s,i){i&&(s.super_=i,s.prototype=Object.create(i.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}))}:u.exports=function(s,i){if(i){s.super_=i;var a=function(){};a.prototype=i.prototype,s.prototype=new a,s.prototype.constructor=s}}}),Vu=ge((l,u)=>{ue(),fe(),ce();var{Buffer:s}=(Fe(),Be(je)),i=Symbol.for("BufferList");function a(t){if(!(this instanceof a))return new a(t);a._init.call(this,t)}a._init=function(t){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},a.prototype._new=function(t){return new a(t)},a.prototype._offset=function(t){if(t===0)return[0,0];let e=0;for(let n=0;n<this._bufs.length;n++){let r=e+this._bufs[n].length;if(t<r||n===this._bufs.length-1)return[n,t-e];e=r}},a.prototype._reverseOffset=function(t){let e=t[0],n=t[1];for(let r=0;r<e;r++)n+=this._bufs[r].length;return n},a.prototype.getBuffers=function(){return this._bufs},a.prototype.get=function(t){if(t>this.length||t<0)return;let e=this._offset(t);return this._bufs[e[0]][e[1]]},a.prototype.slice=function(t,e){return typeof t=="number"&&t<0&&(t+=this.length),typeof e=="number"&&e<0&&(e+=this.length),this.copy(null,0,t,e)},a.prototype.copy=function(t,e,n,r){if((typeof n!="number"||n<0)&&(n=0),(typeof r!="number"||r>this.length)&&(r=this.length),n>=this.length||r<=0)return t||s.alloc(0);let o=!!t,c=this._offset(n),p=r-n,g=p,y=o&&e||0,h=c[1];if(n===0&&r===this.length){if(!o)return this._bufs.length===1?this._bufs[0]:s.concat(this._bufs,this.length);for(let m=0;m<this._bufs.length;m++)this._bufs[m].copy(t,y),y+=this._bufs[m].length;return t}if(g<=this._bufs[c[0]].length-h)return o?this._bufs[c[0]].copy(t,e,h,h+g):this._bufs[c[0]].slice(h,h+g);o||(t=s.allocUnsafe(p));for(let m=c[0];m<this._bufs.length;m++){let A=this._bufs[m].length-h;if(g>A)this._bufs[m].copy(t,y,h),y+=A;else{this._bufs[m].copy(t,y,h,h+g),y+=A;break}g-=A,h&&(h=0)}return t.length>y?t.slice(0,y):t},a.prototype.shallowSlice=function(t,e){if(t=t||0,e=typeof e!="number"?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();let n=this._offset(t),r=this._offset(e),o=this._bufs.slice(n[0],r[0]+1);return r[1]===0?o.pop():o[o.length-1]=o[o.length-1].slice(0,r[1]),n[1]!==0&&(o[0]=o[0].slice(n[1])),this._new(o)},a.prototype.toString=function(t,e,n){return this.slice(e,n).toString(t)},a.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this},a.prototype.duplicate=function(){let t=this._new();for(let e=0;e<this._bufs.length;e++)t.append(this._bufs[e]);return t},a.prototype.append=function(t){return this._attach(t,a.prototype._appendBuffer)},a.prototype.prepend=function(t){return this._attach(t,a.prototype._prependBuffer,!0)},a.prototype._attach=function(t,e,n){if(t==null)return this;if(t.buffer)e.call(this,s.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t)){let[r,o]=n?[t.length-1,-1]:[0,1];for(let c=r;c>=0&&c<t.length;c+=o)this._attach(t[c],e,n)}else if(this._isBufferList(t)){let[r,o]=n?[t._bufs.length-1,-1]:[0,1];for(let c=r;c>=0&&c<t._bufs.length;c+=o)this._attach(t._bufs[c],e,n)}else typeof t=="number"&&(t=t.toString()),e.call(this,s.from(t));return this},a.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length},a.prototype._prependBuffer=function(t){this._bufs.unshift(t),this.length+=t.length},a.prototype.indexOf=function(t,e,n){if(n===void 0&&typeof e=="string"&&(n=e,e=void 0),typeof t=="function"||Array.isArray(t))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof t=="number"?t=s.from([t]):typeof t=="string"?t=s.from(t,n):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=s.from(t.buffer,t.byteOffset,t.byteLength):s.isBuffer(t)||(t=s.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),t.length===0)return e>this.length?this.length:e;let r=this._offset(e),o=r[0],c=r[1];for(;o<this._bufs.length;o++){let p=this._bufs[o];for(;c<p.length;)if(p.length-c>=t.length){let g=p.indexOf(t,c);if(g!==-1)return this._reverseOffset([o,g]);c=p.length-t.length+1}else{let g=this._reverseOffset([o,c]);if(this._match(g,t))return g;c++}c=0}return-1},a.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let n=0;n<e.length;n++)if(this.get(t+n)!==e[n])return!1;return!0},(function(){let t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readBigInt64BE:8,readBigInt64LE:8,readBigUInt64BE:8,readBigUInt64LE:8,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let e in t)(function(n){t[n]===null?a.prototype[n]=function(r,o){return this.slice(r,r+o)[n](0,o)}:a.prototype[n]=function(r=0){return this.slice(r,r+t[n])[n](0)}})(e)})(),a.prototype._isBufferList=function(t){return t instanceof a||a.isBufferList(t)},a.isBufferList=function(t){return t!=null&&t[i]},u.exports=a}),Qu=ge((l,u)=>{ue(),fe(),ce();var s=It().Duplex,i=Ku(),a=Vu();function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="function"){this._callback=e;let n=(function(r){this._callback&&(this._callback(r),this._callback=null)}).bind(this);this.on("pipe",function(r){r.on("error",n)}),this.on("unpipe",function(r){r.removeListener("error",n)}),e=null}a._init.call(this,e),s.call(this)}i(t,s),Object.assign(t.prototype,a.prototype),t.prototype._new=function(e){return new t(e)},t.prototype._write=function(e,n,r){this._appendBuffer(e),typeof r=="function"&&r()},t.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},t.prototype.end=function(e){s.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},t.prototype._destroy=function(e,n){this._bufs.length=0,this.length=0,n(e)},t.prototype._isBufferList=function(e){return e instanceof t||e instanceof a||t.isBufferList(e)},t.isBufferList=a.isBufferList,u.exports=t,u.exports.BufferListStream=t,u.exports.BufferList=a}),qu=ge((l,u)=>{ue(),fe(),ce();var s=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}};u.exports=s}),is=ge((l,u)=>{ue(),fe(),ce();var s=u.exports,{Buffer:i}=(Fe(),Be(je));s.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},s.requiredHeaderFlags={1:0,2:0,4:0,5:0,6:2,7:0,8:2,9:0,10:2,11:0,12:0,13:0,14:0,15:0},s.requiredHeaderFlagsErrors={};for(let t in s.requiredHeaderFlags){let e=s.requiredHeaderFlags[t];s.requiredHeaderFlagsErrors[t]="Invalid header flag bits, must be 0x"+e.toString(16)+" for "+s.types[t]+" packet"}s.codes={};for(let t in s.types){let e=s.types[t];s.codes[e]=t}s.CMD_SHIFT=4,s.CMD_MASK=240,s.DUP_MASK=8,s.QOS_MASK=3,s.QOS_SHIFT=1,s.RETAIN_MASK=1,s.VARBYTEINT_MASK=127,s.VARBYTEINT_FIN_MASK=128,s.VARBYTEINT_MAX=268435455,s.SESSIONPRESENT_MASK=1,s.SESSIONPRESENT_HEADER=i.from([s.SESSIONPRESENT_MASK]),s.CONNACK_HEADER=i.from([s.codes.connack<<s.CMD_SHIFT]),s.USERNAME_MASK=128,s.PASSWORD_MASK=64,s.WILL_RETAIN_MASK=32,s.WILL_QOS_MASK=24,s.WILL_QOS_SHIFT=3,s.WILL_FLAG_MASK=4,s.CLEAN_SESSION_MASK=2,s.CONNECT_HEADER=i.from([s.codes.connect<<s.CMD_SHIFT]),s.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},s.propertiesCodes={};for(let t in s.properties){let e=s.properties[t];s.propertiesCodes[e]=t}s.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"};function a(t){return[0,1,2].map(e=>[0,1].map(n=>[0,1].map(r=>{let o=i.alloc(1);return o.writeUInt8(s.codes[t]<<s.CMD_SHIFT|(n?s.DUP_MASK:0)|e<<s.QOS_SHIFT|r,0,!0),o})))}s.PUBLISH_HEADER=a("publish"),s.SUBSCRIBE_HEADER=a("subscribe"),s.SUBSCRIBE_OPTIONS_QOS_MASK=3,s.SUBSCRIBE_OPTIONS_NL_MASK=1,s.SUBSCRIBE_OPTIONS_NL_SHIFT=2,s.SUBSCRIBE_OPTIONS_RAP_MASK=1,s.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,s.SUBSCRIBE_OPTIONS_RH_MASK=3,s.SUBSCRIBE_OPTIONS_RH_SHIFT=4,s.SUBSCRIBE_OPTIONS_RH=[0,16,32],s.SUBSCRIBE_OPTIONS_NL=4,s.SUBSCRIBE_OPTIONS_RAP=8,s.SUBSCRIBE_OPTIONS_QOS=[0,1,2],s.UNSUBSCRIBE_HEADER=a("unsubscribe"),s.ACKS={unsuback:a("unsuback"),puback:a("puback"),pubcomp:a("pubcomp"),pubrel:a("pubrel"),pubrec:a("pubrec")},s.SUBACK_HEADER=i.from([s.codes.suback<<s.CMD_SHIFT]),s.VERSION3=i.from([3]),s.VERSION4=i.from([4]),s.VERSION5=i.from([5]),s.VERSION131=i.from([131]),s.VERSION132=i.from([132]),s.QOS=[0,1,2].map(t=>i.from([t])),s.EMPTY={pingreq:i.from([s.codes.pingreq<<4,0]),pingresp:i.from([s.codes.pingresp<<4,0]),disconnect:i.from([s.codes.disconnect<<4,0])},s.MQTT5_PUBACK_PUBREC_CODES={0:"Success",16:"No matching subscribers",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",144:"Topic Name invalid",145:"Packet identifier in use",151:"Quota exceeded",153:"Payload format invalid"},s.MQTT5_PUBREL_PUBCOMP_CODES={0:"Success",146:"Packet Identifier not found"},s.MQTT5_SUBACK_CODES={0:"Granted QoS 0",1:"Granted QoS 1",2:"Granted QoS 2",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use",151:"Quota exceeded",158:"Shared Subscriptions not supported",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},s.MQTT5_UNSUBACK_CODES={0:"Success",17:"No subscription existed",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use"},s.MQTT5_DISCONNECT_CODES={0:"Normal disconnection",4:"Disconnect with Will Message",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",135:"Not authorized",137:"Server busy",139:"Server shutting down",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},s.MQTT5_AUTH_CODES={0:"Success",24:"Continue authentication",25:"Re-authenticate"}}),$u=ge((l,u)=>{ue(),fe(),ce();var s=1e3,i=s*60,a=i*60,t=a*24,e=t*7,n=t*365.25;u.exports=function(g,y){y=y||{};var h=typeof g;if(h==="string"&&g.length>0)return r(g);if(h==="number"&&isFinite(g))return y.long?c(g):o(g);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(g))};function r(g){if(g=String(g),!(g.length>100)){var y=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(g);if(y){var h=parseFloat(y[1]),m=(y[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return h*n;case"weeks":case"week":case"w":return h*e;case"days":case"day":case"d":return h*t;case"hours":case"hour":case"hrs":case"hr":case"h":return h*a;case"minutes":case"minute":case"mins":case"min":case"m":return h*i;case"seconds":case"second":case"secs":case"sec":case"s":return h*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function o(g){var y=Math.abs(g);return y>=t?Math.round(g/t)+"d":y>=a?Math.round(g/a)+"h":y>=i?Math.round(g/i)+"m":y>=s?Math.round(g/s)+"s":g+"ms"}function c(g){var y=Math.abs(g);return y>=t?p(g,y,t,"day"):y>=a?p(g,y,a,"hour"):y>=i?p(g,y,i,"minute"):y>=s?p(g,y,s,"second"):g+" ms"}function p(g,y,h,m){var A=y>=h*1.5;return Math.round(g/h)+" "+m+(A?"s":"")}}),Hu=ge((l,u)=>{ue(),fe(),ce();function s(i){t.debug=t,t.default=t,t.coerce=p,t.disable=o,t.enable=n,t.enabled=c,t.humanize=$u(),t.destroy=g,Object.keys(i).forEach(y=>{t[y]=i[y]}),t.names=[],t.skips=[],t.formatters={};function a(y){let h=0;for(let m=0;m<y.length;m++)h=(h<<5)-h+y.charCodeAt(m),h|=0;return t.colors[Math.abs(h)%t.colors.length]}t.selectColor=a;function t(y){let h,m=null,A,_;function d(...v){if(!d.enabled)return;let S=d,b=Number(new Date),x=b-(h||b);S.diff=x,S.prev=h,S.curr=b,h=b,v[0]=t.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let E=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(C,M)=>{if(C==="%%")return"%";E++;let P=t.formatters[M];if(typeof P=="function"){let F=v[E];C=P.call(S,F),v.splice(E,1),E--}return C}),t.formatArgs.call(S,v),(S.log||t.log).apply(S,v)}return d.namespace=y,d.useColors=t.useColors(),d.color=t.selectColor(y),d.extend=e,d.destroy=t.destroy,Object.defineProperty(d,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(A!==t.namespaces&&(A=t.namespaces,_=t.enabled(y)),_),set:v=>{m=v}}),typeof t.init=="function"&&t.init(d),d}function e(y,h){let m=t(this.namespace+(typeof h>"u"?":":h)+y);return m.log=this.log,m}function n(y){t.save(y),t.namespaces=y,t.names=[],t.skips=[];let h=(typeof y=="string"?y:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let m of h)m[0]==="-"?t.skips.push(m.slice(1)):t.names.push(m)}function r(y,h){let m=0,A=0,_=-1,d=0;for(;m<y.length;)if(A<h.length&&(h[A]===y[m]||h[A]==="*"))h[A]==="*"?(_=A,d=m,A++):(m++,A++);else if(_!==-1)A=_+1,d++,m=d;else return!1;for(;A<h.length&&h[A]==="*";)A++;return A===h.length}function o(){let y=[...t.names,...t.skips.map(h=>"-"+h)].join(",");return t.enable(""),y}function c(y){for(let h of t.skips)if(r(y,h))return!1;for(let h of t.names)if(r(y,h))return!0;return!1}function p(y){return y instanceof Error?y.stack||y.message:y}function g(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}u.exports=s}),ut=ge((l,u)=>{ue(),fe(),ce(),l.formatArgs=i,l.save=a,l.load=t,l.useColors=s,l.storage=e(),l.destroy=(()=>{let r=!1;return()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),l.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function s(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let r;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(r=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(r[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function i(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+u.exports.humanize(this.diff),!this.useColors)return;let o="color: "+this.color;r.splice(1,0,o,"color: inherit");let c=0,p=0;r[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(c++,g==="%c"&&(p=c))}),r.splice(p,0,o)}l.log=console.debug||console.log||(()=>{});function a(r){try{r?l.storage.setItem("debug",r):l.storage.removeItem("debug")}catch{}}function t(){let r;try{r=l.storage.getItem("debug")||l.storage.getItem("DEBUG")}catch{}return!r&&typeof Me<"u"&&"env"in Me&&(r=Me.env.DEBUG),r}function e(){try{return localStorage}catch{}}u.exports=Hu()(l);var{formatters:n}=u.exports;n.j=function(r){try{return JSON.stringify(r)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}}}),zu=ge((l,u)=>{ue(),fe(),ce();var s=Qu(),{EventEmitter:i}=(St(),Be(gt)),a=qu(),t=is(),e=ut()("mqtt-packet:parser"),n=class ai extends i{constructor(){super(),this.parser=this.constructor.parser}static parser(o){return this instanceof ai?(this.settings=o||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new ai().parser(o)}_resetState(){e("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new a,this.error=null,this._list=s(),this._stateCounter=0}parse(o){for(this.error&&this._resetState(),this._list.append(o),e("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,e("parse: state complete. _stateCounter is now: %d",this._stateCounter),e("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return e("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){let o=this._list.readUInt8(0),c=o>>t.CMD_SHIFT;this.packet.cmd=t.types[c];let p=o&15,g=t.requiredHeaderFlags[c];return g!=null&&p!==g?this._emitError(new Error(t.requiredHeaderFlagsErrors[c])):(this.packet.retain=(o&t.RETAIN_MASK)!==0,this.packet.qos=o>>t.QOS_SHIFT&t.QOS_MASK,this.packet.qos>2?this._emitError(new Error("Packet must not have both QoS bits set to 1")):(this.packet.dup=(o&t.DUP_MASK)!==0,e("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0))}_parseLength(){let o=this._parseVarByteNum(!0);return o&&(this.packet.length=o.value,this._list.consume(o.bytes)),e("_parseLength %d",o.value),!!o}_parsePayload(){e("_parsePayload: payload %O",this._list);let o=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}o=!0}return e("_parsePayload complete result: %s",o),o}_parseConnect(){e("_parseConnect");let o,c,p,g,y={},h=this.packet,m=this._parseString();if(m===null)return this._emitError(new Error("Cannot parse protocolId"));if(m!=="MQTT"&&m!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(h.protocolId=m,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(h.protocolVersion=this._list.readUInt8(this._pos),h.protocolVersion>=128&&(h.bridgeMode=!0,h.protocolVersion=h.protocolVersion-128),h.protocolVersion!==3&&h.protocolVersion!==4&&h.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(this._list.readUInt8(this._pos)&1)return this._emitError(new Error("Connect flag bit 0 must be 0, but got 1"));y.username=this._list.readUInt8(this._pos)&t.USERNAME_MASK,y.password=this._list.readUInt8(this._pos)&t.PASSWORD_MASK,y.will=this._list.readUInt8(this._pos)&t.WILL_FLAG_MASK;let A=!!(this._list.readUInt8(this._pos)&t.WILL_RETAIN_MASK),_=(this._list.readUInt8(this._pos)&t.WILL_QOS_MASK)>>t.WILL_QOS_SHIFT;if(y.will)h.will={},h.will.retain=A,h.will.qos=_;else{if(A)return this._emitError(new Error("Will Retain Flag must be set to zero when Will Flag is set to 0"));if(_)return this._emitError(new Error("Will QoS must be set to zero when Will Flag is set to 0"))}if(h.clean=(this._list.readUInt8(this._pos)&t.CLEAN_SESSION_MASK)!==0,this._pos++,h.keepalive=this._parseNum(),h.keepalive===-1)return this._emitError(new Error("Packet too short"));if(h.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(h.properties=v)}let d=this._parseString();if(d===null)return this._emitError(new Error("Packet too short"));if(h.clientId=d,e("_parseConnect: packet.clientId: %s",h.clientId),y.will){if(h.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(h.will.properties=v)}if(o=this._parseString(),o===null)return this._emitError(new Error("Cannot parse will topic"));if(h.will.topic=o,e("_parseConnect: packet.will.topic: %s",h.will.topic),c=this._parseBuffer(),c===null)return this._emitError(new Error("Cannot parse will payload"));h.will.payload=c,e("_parseConnect: packet.will.paylaod: %s",h.will.payload)}if(y.username){if(g=this._parseString(),g===null)return this._emitError(new Error("Cannot parse username"));h.username=g,e("_parseConnect: packet.username: %s",h.username)}if(y.password){if(p=this._parseBuffer(),p===null)return this._emitError(new Error("Cannot parse password"));h.password=p}return this.settings=h,e("_parseConnect: complete"),h}_parseConnack(){e("_parseConnack");let o=this.packet;if(this._list.length<1)return null;let c=this._list.readUInt8(this._pos++);if(c>1)return this._emitError(new Error("Invalid connack flags, bits 7-1 must be set to 0"));if(o.sessionPresent=!!(c&t.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?o.reasonCode=this._list.readUInt8(this._pos++):o.reasonCode=0;else{if(this._list.length<2)return null;o.returnCode=this._list.readUInt8(this._pos++)}if(o.returnCode===-1||o.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){let p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(o.properties=p)}e("_parseConnack: complete")}_parsePublish(){e("_parsePublish");let o=this.packet;if(o.topic=this._parseString(),o.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(o.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(o.properties=c)}o.payload=this._list.slice(this._pos,o.length),e("_parsePublish: payload from buffer list: %o",o.payload)}}_parseSubscribe(){e("_parseSubscribe");let o=this.packet,c,p,g,y,h,m,A;if(o.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let _=this._parseProperties();Object.getOwnPropertyNames(_).length&&(o.properties=_)}if(o.length<=0)return this._emitError(new Error("Malformed subscribe, no payload specified"));for(;this._pos<o.length;){if(c=this._parseString(),c===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=o.length)return this._emitError(new Error("Malformed Subscribe Payload"));if(p=this._parseByte(),this.settings.protocolVersion===5){if(p&192)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-6 must be 0"))}else if(p&252)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-2 must be 0"));if(g=p&t.SUBSCRIBE_OPTIONS_QOS_MASK,g>2)return this._emitError(new Error("Invalid subscribe QoS, must be <= 2"));if(m=(p>>t.SUBSCRIBE_OPTIONS_NL_SHIFT&t.SUBSCRIBE_OPTIONS_NL_MASK)!==0,h=(p>>t.SUBSCRIBE_OPTIONS_RAP_SHIFT&t.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,y=p>>t.SUBSCRIBE_OPTIONS_RH_SHIFT&t.SUBSCRIBE_OPTIONS_RH_MASK,y>2)return this._emitError(new Error("Invalid retain handling, must be <= 2"));A={topic:c,qos:g},this.settings.protocolVersion===5?(A.nl=m,A.rap=h,A.rh=y):this.settings.bridgeMode&&(A.rh=0,A.rap=!0,A.nl=!0),e("_parseSubscribe: push subscription `%s` to subscription",A),o.subscriptions.push(A)}}}_parseSuback(){e("_parseSuback");let o=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(o.properties=c)}if(o.length<=0)return this._emitError(new Error("Malformed suback, no payload specified"));for(;this._pos<this.packet.length;){let c=this._list.readUInt8(this._pos++);if(this.settings.protocolVersion===5){if(!t.MQTT5_SUBACK_CODES[c])return this._emitError(new Error("Invalid suback code"))}else if(c>2&&c!==128)return this._emitError(new Error("Invalid suback QoS, must be 0, 1, 2 or 128"));this.packet.granted.push(c)}}}_parseUnsubscribe(){e("_parseUnsubscribe");let o=this.packet;if(o.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(o.properties=c)}if(o.length<=0)return this._emitError(new Error("Malformed unsubscribe, no payload specified"));for(;this._pos<o.length;){let c=this._parseString();if(c===null)return this._emitError(new Error("Cannot parse topic"));e("_parseUnsubscribe: push topic `%s` to unsubscriptions",c),o.unsubscriptions.push(c)}}}_parseUnsuback(){e("_parseUnsuback");let o=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if((this.settings.protocolVersion===3||this.settings.protocolVersion===4)&&o.length!==2)return this._emitError(new Error("Malformed unsuback, payload length must be 2"));if(o.length<=0)return this._emitError(new Error("Malformed unsuback, no payload specified"));if(this.settings.protocolVersion===5){let c=this._parseProperties();for(Object.getOwnPropertyNames(c).length&&(o.properties=c),o.granted=[];this._pos<this.packet.length;){let p=this._list.readUInt8(this._pos++);if(!t.MQTT5_UNSUBACK_CODES[p])return this._emitError(new Error("Invalid unsuback code"));this.packet.granted.push(p)}}}_parseConfirmation(){e("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);let o=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5){if(o.length>2){switch(o.reasonCode=this._parseByte(),this.packet.cmd){case"puback":case"pubrec":if(!t.MQTT5_PUBACK_PUBREC_CODES[o.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break;case"pubrel":case"pubcomp":if(!t.MQTT5_PUBREL_PUBCOMP_CODES[o.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break}e("_parseConfirmation: packet.reasonCode `%d`",o.reasonCode)}else o.reasonCode=0;if(o.length>3){let c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(o.properties=c)}}return!0}_parseDisconnect(){let o=this.packet;if(e("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?(o.reasonCode=this._parseByte(),t.MQTT5_DISCONNECT_CODES[o.reasonCode]||this._emitError(new Error("Invalid disconnect reason code"))):o.reasonCode=0;let c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(o.properties=c)}return e("_parseDisconnect result: true"),!0}_parseAuth(){e("_parseAuth");let o=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));if(o.reasonCode=this._parseByte(),!t.MQTT5_AUTH_CODES[o.reasonCode])return this._emitError(new Error("Invalid auth reason code"));let c=this._parseProperties();return Object.getOwnPropertyNames(c).length&&(o.properties=c),e("_parseAuth: result: true"),!0}_parseMessageId(){let o=this.packet;return o.messageId=this._parseNum(),o.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(e("_parseMessageId: packet.messageId %d",o.messageId),!0)}_parseString(o){let c=this._parseNum(),p=c+this._pos;if(c===-1||p>this._list.length||p>this.packet.length)return null;let g=this._list.toString("utf8",this._pos,p);return this._pos+=c,e("_parseString: result: %s",g),g}_parseStringPair(){return e("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let o=this._parseNum(),c=o+this._pos;if(o===-1||c>this._list.length||c>this.packet.length)return null;let p=this._list.slice(this._pos,c);return this._pos+=o,e("_parseBuffer: result: %o",p),p}_parseNum(){if(this._list.length-this._pos<2)return-1;let o=this._list.readUInt16BE(this._pos);return this._pos+=2,e("_parseNum: result: %s",o),o}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;let o=this._list.readUInt32BE(this._pos);return this._pos+=4,e("_parse4ByteNum: result: %s",o),o}_parseVarByteNum(o){e("_parseVarByteNum");let c=4,p=0,g=1,y=0,h=!1,m,A=this._pos?this._pos:0;for(;p<c&&A+p<this._list.length;){if(m=this._list.readUInt8(A+p++),y+=g*(m&t.VARBYTEINT_MASK),g*=128,(m&t.VARBYTEINT_FIN_MASK)===0){h=!0;break}if(this._list.length<=p)break}return!h&&p===c&&this._list.length>=p&&this._emitError(new Error("Invalid variable byte integer")),A&&(this._pos+=p),h?o?h={bytes:p,value:y}:h=y:h=!1,e("_parseVarByteNum: result: %o",h),h}_parseByte(){let o;return this._pos<this._list.length&&(o=this._list.readUInt8(this._pos),this._pos++),e("_parseByte: result: %o",o),o}_parseByType(o){switch(e("_parseByType: type: %s",o),o){case"byte":return this._parseByte()!==0;case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){e("_parseProperties");let o=this._parseVarByteNum(),c=this._pos+o,p={};for(;this._pos<c;){let g=this._parseByte();if(!g)return this._emitError(new Error("Cannot parse property code type")),!1;let y=t.propertiesCodes[g];if(!y)return this._emitError(new Error("Unknown property")),!1;if(y==="userProperties"){p[y]||(p[y]=Object.create(null));let h=this._parseByType(t.propertiesTypes[y]);if(p[y][h.name])if(Array.isArray(p[y][h.name]))p[y][h.name].push(h.value);else{let m=p[y][h.name];p[y][h.name]=[m],p[y][h.name].push(h.value)}else p[y][h.name]=h.value;continue}p[y]?Array.isArray(p[y])?p[y].push(this._parseByType(t.propertiesTypes[y])):(p[y]=[p[y]],p[y].push(this._parseByType(t.propertiesTypes[y]))):p[y]=this._parseByType(t.propertiesTypes[y])}return p}_newPacket(){return e("_newPacket"),this.packet&&(this._list.consume(this.packet.length),e("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),e("_newPacket: new packet"),this.packet=new a,this._pos=0,!0}_emitError(o){e("_emitError",o),this.error=o,this.emit("error",o)}};u.exports=n}),Gu=ge((l,u)=>{ue(),fe(),ce();var{Buffer:s}=(Fe(),Be(je)),i=65536,a={},t=s.isBuffer(s.from([1,2]).subarray(0,1));function e(c){let p=s.allocUnsafe(2);return p.writeUInt8(c>>8,0),p.writeUInt8(c&255,1),p}function n(){for(let c=0;c<i;c++)a[c]=e(c)}function r(c){let p=0,g=0,y=s.allocUnsafe(4);do p=c%128|0,c=c/128|0,c>0&&(p=p|128),y.writeUInt8(p,g++);while(c>0&&g<4);return c>0&&(g=0),t?y.subarray(0,g):y.slice(0,g)}function o(c){let p=s.allocUnsafe(4);return p.writeUInt32BE(c,0),p}u.exports={cache:a,generateCache:n,generateNumber:e,genBufVariableByteInt:r,generate4ByteBuffer:o}}),Ju=ge((l,u)=>{ue(),fe(),ce(),typeof Me>"u"||!Me.version||Me.version.indexOf("v0.")===0||Me.version.indexOf("v1.")===0&&Me.version.indexOf("v1.8.")!==0?u.exports={nextTick:s}:u.exports=Me;function s(i,a,t,e){if(typeof i!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,r,o;switch(n){case 0:case 1:return Me.nextTick(i);case 2:return Me.nextTick(function(){i.call(null,a)});case 3:return Me.nextTick(function(){i.call(null,a,t)});case 4:return Me.nextTick(function(){i.call(null,a,t,e)});default:for(r=new Array(n-1),o=0;o<r.length;)r[o++]=arguments[o];return Me.nextTick(function(){i.apply(null,r)})}}}),ss=ge((l,u)=>{ue(),fe(),ce();var s=is(),{Buffer:i}=(Fe(),Be(je)),a=i.allocUnsafe(0),t=i.from([0]),e=Gu(),n=Ju().nextTick,r=ut()("mqtt-packet:writeToStream"),o=e.cache,c=e.generateNumber,p=e.generateCache,g=e.genBufVariableByteInt,y=e.generate4ByteBuffer,h=J,m=!0;function A(z,U,oe){switch(r("generate called"),U.cork&&(U.cork(),n(_,U)),m&&(m=!1,p()),r("generate: packet.cmd: %s",z.cmd),z.cmd){case"connect":return d(z,U);case"connack":return v(z,U,oe);case"publish":return S(z,U,oe);case"puback":case"pubrec":case"pubrel":case"pubcomp":return b(z,U,oe);case"subscribe":return x(z,U,oe);case"suback":return E(z,U,oe);case"unsubscribe":return C(z,U,oe);case"unsuback":return M(z,U,oe);case"pingreq":case"pingresp":return P(z,U);case"disconnect":return F(z,U,oe);case"auth":return k(z,U,oe);default:return U.destroy(new Error("Unknown command")),!1}}Object.defineProperty(A,"cacheNumbers",{get(){return h===J},set(z){z?((!o||Object.keys(o).length===0)&&(m=!0),h=J):(m=!1,h=H)}});function _(z){z.uncork()}function d(z,U,oe){let q=z||{},G=q.protocolId||"MQTT",Y=q.protocolVersion||4,Ae=q.will,se=q.clean,R=q.keepalive||0,K=q.clientId||"",te=q.username,de=q.password,pe=q.properties;se===void 0&&(se=!0);let be=0;if(typeof G!="string"&&!i.isBuffer(G))return U.destroy(new Error("Invalid protocolId")),!1;if(be+=G.length+2,Y!==3&&Y!==4&&Y!==5)return U.destroy(new Error("Invalid protocol version")),!1;if(be+=1,(typeof K=="string"||i.isBuffer(K))&&(K||Y>=4)&&(K||se))be+=i.byteLength(K)+2;else{if(Y<4)return U.destroy(new Error("clientId must be supplied before 3.1.1")),!1;if(se*1===0)return U.destroy(new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof R!="number"||R<0||R>65535||R%1!==0)return U.destroy(new Error("Invalid keepalive")),!1;be+=2,be+=1;let Q,me;if(Y===5){if(Q=ee(U,pe),!Q)return!1;be+=Q.length}if(Ae){if(typeof Ae!="object")return U.destroy(new Error("Invalid will")),!1;if(!Ae.topic||typeof Ae.topic!="string")return U.destroy(new Error("Invalid will topic")),!1;if(be+=i.byteLength(Ae.topic)+2,be+=2,Ae.payload)if(Ae.payload.length>=0)typeof Ae.payload=="string"?be+=i.byteLength(Ae.payload):be+=Ae.payload.length;else return U.destroy(new Error("Invalid will payload")),!1;if(me={},Y===5){if(me=ee(U,Ae.properties),!me)return!1;be+=me.length}}let we=!1;if(te!=null)if(ve(te))we=!0,be+=i.byteLength(te)+2;else return U.destroy(new Error("Invalid username")),!1;if(de!=null){if(!we)return U.destroy(new Error("Username is required to use password")),!1;if(ve(de))be+=re(de)+2;else return U.destroy(new Error("Invalid password")),!1}U.write(s.CONNECT_HEADER),L(U,be),W(U,G),q.bridgeMode&&(Y+=128),U.write(Y===131?s.VERSION131:Y===132?s.VERSION132:Y===4?s.VERSION4:Y===5?s.VERSION5:s.VERSION3);let ae=0;return ae|=te!=null?s.USERNAME_MASK:0,ae|=de!=null?s.PASSWORD_MASK:0,ae|=Ae&&Ae.retain?s.WILL_RETAIN_MASK:0,ae|=Ae&&Ae.qos?Ae.qos<<s.WILL_QOS_SHIFT:0,ae|=Ae?s.WILL_FLAG_MASK:0,ae|=se?s.CLEAN_SESSION_MASK:0,U.write(i.from([ae])),h(U,R),Y===5&&Q.write(),W(U,K),Ae&&(Y===5&&me.write(),N(U,Ae.topic),W(U,Ae.payload)),te!=null&&W(U,te),de!=null&&W(U,de),!0}function v(z,U,oe){let q=oe?oe.protocolVersion:4,G=z||{},Y=q===5?G.reasonCode:G.returnCode,Ae=G.properties,se=2;if(typeof Y!="number")return U.destroy(new Error("Invalid return code")),!1;let R=null;if(q===5){if(R=ee(U,Ae),!R)return!1;se+=R.length}return U.write(s.CONNACK_HEADER),L(U,se),U.write(G.sessionPresent?s.SESSIONPRESENT_HEADER:t),U.write(i.from([Y])),R?.write(),!0}function S(z,U,oe){r("publish: packet: %o",z);let q=oe?oe.protocolVersion:4,G=z||{},Y=G.qos||0,Ae=G.retain?s.RETAIN_MASK:0,se=G.topic,R=G.payload||a,K=G.messageId,te=G.properties,de=0;if(typeof se=="string")de+=i.byteLength(se)+2;else if(i.isBuffer(se))de+=se.length+2;else return U.destroy(new Error("Invalid topic")),!1;if(i.isBuffer(R)?de+=R.length:de+=i.byteLength(R),Y&&typeof K!="number")return U.destroy(new Error("Invalid messageId")),!1;Y&&(de+=2);let pe=null;if(q===5){if(pe=ee(U,te),!pe)return!1;de+=pe.length}return U.write(s.PUBLISH_HEADER[Y][G.dup?1:0][Ae?1:0]),L(U,de),h(U,re(se)),U.write(se),Y>0&&h(U,K),pe?.write(),r("publish: payload: %o",R),U.write(R)}function b(z,U,oe){let q=oe?oe.protocolVersion:4,G=z||{},Y=G.cmd||"puback",Ae=G.messageId,se=G.dup&&Y==="pubrel"?s.DUP_MASK:0,R=0,K=G.reasonCode,te=G.properties,de=q===5?3:2;if(Y==="pubrel"&&(R=1),typeof Ae!="number")return U.destroy(new Error("Invalid messageId")),!1;let pe=null;if(q===5&&typeof te=="object"){if(pe=B(U,te,oe,de),!pe)return!1;de+=pe.length}return U.write(s.ACKS[Y][R][se][0]),de===3&&(de+=K!==0?1:-1),L(U,de),h(U,Ae),q===5&&de!==2&&U.write(i.from([K])),pe!==null?pe.write():de===4&&U.write(i.from([0])),!0}function x(z,U,oe){r("subscribe: packet: ");let q=oe?oe.protocolVersion:4,G=z||{},Y=G.dup?s.DUP_MASK:0,Ae=G.messageId,se=G.subscriptions,R=G.properties,K=0;if(typeof Ae!="number")return U.destroy(new Error("Invalid messageId")),!1;K+=2;let te=null;if(q===5){if(te=ee(U,R),!te)return!1;K+=te.length}if(typeof se=="object"&&se.length)for(let pe=0;pe<se.length;pe+=1){let be=se[pe].topic,Q=se[pe].qos;if(typeof be!="string")return U.destroy(new Error("Invalid subscriptions - invalid topic")),!1;if(typeof Q!="number")return U.destroy(new Error("Invalid subscriptions - invalid qos")),!1;if(q===5){if(typeof(se[pe].nl||!1)!="boolean")return U.destroy(new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(se[pe].rap||!1)!="boolean")return U.destroy(new Error("Invalid subscriptions - invalid Retain as Published")),!1;let me=se[pe].rh||0;if(typeof me!="number"||me>2)return U.destroy(new Error("Invalid subscriptions - invalid Retain Handling")),!1}K+=i.byteLength(be)+2+1}else return U.destroy(new Error("Invalid subscriptions")),!1;r("subscribe: writing to stream: %o",s.SUBSCRIBE_HEADER),U.write(s.SUBSCRIBE_HEADER[1][Y?1:0][0]),L(U,K),h(U,Ae),te!==null&&te.write();let de=!0;for(let pe of se){let be=pe.topic,Q=pe.qos,me=+pe.nl,we=+pe.rap,ae=pe.rh,Te;N(U,be),Te=s.SUBSCRIBE_OPTIONS_QOS[Q],q===5&&(Te|=me?s.SUBSCRIBE_OPTIONS_NL:0,Te|=we?s.SUBSCRIBE_OPTIONS_RAP:0,Te|=ae?s.SUBSCRIBE_OPTIONS_RH[ae]:0),de=U.write(i.from([Te]))}return de}function E(z,U,oe){let q=oe?oe.protocolVersion:4,G=z||{},Y=G.messageId,Ae=G.granted,se=G.properties,R=0;if(typeof Y!="number")return U.destroy(new Error("Invalid messageId")),!1;if(R+=2,typeof Ae=="object"&&Ae.length)for(let te=0;te<Ae.length;te+=1){if(typeof Ae[te]!="number")return U.destroy(new Error("Invalid qos vector")),!1;R+=1}else return U.destroy(new Error("Invalid qos vector")),!1;let K=null;if(q===5){if(K=B(U,se,oe,R),!K)return!1;R+=K.length}return U.write(s.SUBACK_HEADER),L(U,R),h(U,Y),K!==null&&K.write(),U.write(i.from(Ae))}function C(z,U,oe){let q=oe?oe.protocolVersion:4,G=z||{},Y=G.messageId,Ae=G.dup?s.DUP_MASK:0,se=G.unsubscriptions,R=G.properties,K=0;if(typeof Y!="number")return U.destroy(new Error("Invalid messageId")),!1;if(K+=2,typeof se=="object"&&se.length)for(let pe=0;pe<se.length;pe+=1){if(typeof se[pe]!="string")return U.destroy(new Error("Invalid unsubscriptions")),!1;K+=i.byteLength(se[pe])+2}else return U.destroy(new Error("Invalid unsubscriptions")),!1;let te=null;if(q===5){if(te=ee(U,R),!te)return!1;K+=te.length}U.write(s.UNSUBSCRIBE_HEADER[1][Ae?1:0][0]),L(U,K),h(U,Y),te!==null&&te.write();let de=!0;for(let pe=0;pe<se.length;pe++)de=N(U,se[pe]);return de}function M(z,U,oe){let q=oe?oe.protocolVersion:4,G=z||{},Y=G.messageId,Ae=G.dup?s.DUP_MASK:0,se=G.granted,R=G.properties,K=G.cmd,te=0,de=2;if(typeof Y!="number")return U.destroy(new Error("Invalid messageId")),!1;if(q===5)if(typeof se=="object"&&se.length)for(let be=0;be<se.length;be+=1){if(typeof se[be]!="number")return U.destroy(new Error("Invalid qos vector")),!1;de+=1}else return U.destroy(new Error("Invalid qos vector")),!1;let pe=null;if(q===5){if(pe=B(U,R,oe,de),!pe)return!1;de+=pe.length}return U.write(s.ACKS[K][te][Ae][0]),L(U,de),h(U,Y),pe!==null&&pe.write(),q===5&&U.write(i.from(se)),!0}function P(z,U,oe){return U.write(s.EMPTY[z.cmd])}function F(z,U,oe){let q=oe?oe.protocolVersion:4,G=z||{},Y=G.reasonCode,Ae=G.properties,se=q===5?1:0,R=null;if(q===5){if(R=B(U,Ae,oe,se),!R)return!1;se+=R.length}return U.write(i.from([s.codes.disconnect<<4])),L(U,se),q===5&&U.write(i.from([Y])),R!==null&&R.write(),!0}function k(z,U,oe){let q=oe?oe.protocolVersion:4,G=z||{},Y=G.reasonCode,Ae=G.properties,se=q===5?1:0;q!==5&&U.destroy(new Error("Invalid mqtt version for auth packet"));let R=B(U,Ae,oe,se);return R?(se+=R.length,U.write(i.from([s.codes.auth<<4])),L(U,se),U.write(i.from([Y])),R!==null&&R.write(),!0):!1}var V={};function L(z,U){if(U>s.VARBYTEINT_MAX)return z.destroy(new Error(`Invalid variable byte integer: ${U}`)),!1;let oe=V[U];return oe||(oe=g(U),U<16384&&(V[U]=oe)),r("writeVarByteInt: writing to stream: %o",oe),z.write(oe)}function N(z,U){let oe=i.byteLength(U);return h(z,oe),r("writeString: %s",U),z.write(U,"utf8")}function le(z,U,oe){N(z,U),N(z,oe)}function J(z,U){return r("writeNumberCached: number: %d",U),r("writeNumberCached: %o",o[U]),z.write(o[U])}function H(z,U){let oe=c(U);return r("writeNumberGenerated: %o",oe),z.write(oe)}function ne(z,U){let oe=y(U);return r("write4ByteNumber: %o",oe),z.write(oe)}function W(z,U){typeof U=="string"?N(z,U):U?(h(z,U.length),z.write(U)):h(z,0)}function ee(z,U){if(typeof U!="object"||U.length!=null)return{length:1,write(){ye(z,{},0)}};let oe=0;function q(G,Y){let Ae=s.propertiesTypes[G],se=0;switch(Ae){case"byte":{if(typeof Y!="boolean")return z.destroy(new Error(`Invalid ${G}: ${Y}`)),!1;se+=2;break}case"int8":{if(typeof Y!="number"||Y<0||Y>255)return z.destroy(new Error(`Invalid ${G}: ${Y}`)),!1;se+=2;break}case"binary":{if(Y&&Y===null)return z.destroy(new Error(`Invalid ${G}: ${Y}`)),!1;se+=1+i.byteLength(Y)+2;break}case"int16":{if(typeof Y!="number"||Y<0||Y>65535)return z.destroy(new Error(`Invalid ${G}: ${Y}`)),!1;se+=3;break}case"int32":{if(typeof Y!="number"||Y<0||Y>4294967295)return z.destroy(new Error(`Invalid ${G}: ${Y}`)),!1;se+=5;break}case"var":{if(typeof Y!="number"||Y<0||Y>268435455)return z.destroy(new Error(`Invalid ${G}: ${Y}`)),!1;se+=1+i.byteLength(g(Y));break}case"string":{if(typeof Y!="string")return z.destroy(new Error(`Invalid ${G}: ${Y}`)),!1;se+=3+i.byteLength(Y.toString());break}case"pair":{if(typeof Y!="object")return z.destroy(new Error(`Invalid ${G}: ${Y}`)),!1;se+=Object.getOwnPropertyNames(Y).reduce((R,K)=>{let te=Y[K];return Array.isArray(te)?R+=te.reduce((de,pe)=>(de+=3+i.byteLength(K.toString())+2+i.byteLength(pe.toString()),de),0):R+=3+i.byteLength(K.toString())+2+i.byteLength(Y[K].toString()),R},0);break}default:return z.destroy(new Error(`Invalid property ${G}: ${Y}`)),!1}return se}if(U)for(let G in U){let Y=0,Ae=0,se=U[G];if(se!==void 0){if(Array.isArray(se))for(let R=0;R<se.length;R++){if(Ae=q(G,se[R]),!Ae)return!1;Y+=Ae}else{if(Ae=q(G,se),!Ae)return!1;Y=Ae}if(!Y)return!1;oe+=Y}}return{length:i.byteLength(g(oe))+oe,write(){ye(z,U,oe)}}}function B(z,U,oe,q){let G=["reasonString","userProperties"],Y=oe&&oe.properties&&oe.properties.maximumPacketSize?oe.properties.maximumPacketSize:0,Ae=ee(z,U);if(Y)for(;q+Ae.length>Y;){let se=G.shift();if(se&&U[se])delete U[se],Ae=ee(z,U);else return!1}return Ae}function Z(z,U,oe){switch(s.propertiesTypes[U]){case"byte":{z.write(i.from([s.properties[U]])),z.write(i.from([+oe]));break}case"int8":{z.write(i.from([s.properties[U]])),z.write(i.from([oe]));break}case"binary":{z.write(i.from([s.properties[U]])),W(z,oe);break}case"int16":{z.write(i.from([s.properties[U]])),h(z,oe);break}case"int32":{z.write(i.from([s.properties[U]])),ne(z,oe);break}case"var":{z.write(i.from([s.properties[U]])),L(z,oe);break}case"string":{z.write(i.from([s.properties[U]])),N(z,oe);break}case"pair":{Object.getOwnPropertyNames(oe).forEach(q=>{let G=oe[q];Array.isArray(G)?G.forEach(Y=>{z.write(i.from([s.properties[U]])),le(z,q.toString(),Y.toString())}):(z.write(i.from([s.properties[U]])),le(z,q.toString(),G.toString()))});break}default:return z.destroy(new Error(`Invalid property ${U} value: ${oe}`)),!1}}function ye(z,U,oe){L(z,oe);for(let q in U)if(Object.prototype.hasOwnProperty.call(U,q)&&U[q]!=null){let G=U[q];if(Array.isArray(G))for(let Y=0;Y<G.length;Y++)Z(z,q,G[Y]);else Z(z,q,G)}}function re(z){return z?z instanceof i?z.length:i.byteLength(z):0}function ve(z){return typeof z=="string"||z instanceof i}u.exports=A}),Yu=ge((l,u)=>{ue(),fe(),ce();var s=ss(),{EventEmitter:i}=(St(),Be(gt)),{Buffer:a}=(Fe(),Be(je));function t(n,r){let o=new e;return s(n,o,r),o.concat()}var e=class extends i{constructor(){super(),this._array=new Array(20),this._i=0}write(n){return this._array[this._i++]=n,!0}concat(){let n=0,r=new Array(this._array.length),o=this._array,c=0,p;for(p=0;p<o.length&&o[p]!==void 0;p++)typeof o[p]!="string"?r[p]=o[p].length:r[p]=a.byteLength(o[p]),n+=r[p];let g=a.allocUnsafe(n);for(p=0;p<o.length&&o[p]!==void 0;p++)typeof o[p]!="string"?(o[p].copy(g,c),c+=r[p]):(g.write(o[p],c),c+=r[p]);return g}destroy(n){n&&this.emit("error",n)}};u.exports=t}),Zu=ge(l=>{ue(),fe(),ce(),l.parser=zu().parser,l.generate=Yu(),l.writeToStream=ss()}),Xu=ge((l,u)=>{ue(),fe(),ce(),u.exports=i;function s(t){return t instanceof or?or.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function i(t){if(t=t||{},t.circles)return a(t);let e=new Map;if(e.set(Date,p=>new Date(p)),e.set(Map,(p,g)=>new Map(r(Array.from(p),g))),e.set(Set,(p,g)=>new Set(r(Array.from(p),g))),t.constructorHandlers)for(let p of t.constructorHandlers)e.set(p[0],p[1]);let n=null;return t.proto?c:o;function r(p,g){let y=Object.keys(p),h=new Array(y.length);for(let m=0;m<y.length;m++){let A=y[m],_=p[A];typeof _!="object"||_===null?h[A]=_:_.constructor!==Object&&(n=e.get(_.constructor))?h[A]=n(_,g):ArrayBuffer.isView(_)?h[A]=s(_):h[A]=g(_)}return h}function o(p){if(typeof p!="object"||p===null)return p;if(Array.isArray(p))return r(p,o);if(p.constructor!==Object&&(n=e.get(p.constructor)))return n(p,o);let g={};for(let y in p){if(Object.hasOwnProperty.call(p,y)===!1)continue;let h=p[y];typeof h!="object"||h===null?g[y]=h:h.constructor!==Object&&(n=e.get(h.constructor))?g[y]=n(h,o):ArrayBuffer.isView(h)?g[y]=s(h):g[y]=o(h)}return g}function c(p){if(typeof p!="object"||p===null)return p;if(Array.isArray(p))return r(p,c);if(p.constructor!==Object&&(n=e.get(p.constructor)))return n(p,c);let g={};for(let y in p){let h=p[y];typeof h!="object"||h===null?g[y]=h:h.constructor!==Object&&(n=e.get(h.constructor))?g[y]=n(h,c):ArrayBuffer.isView(h)?g[y]=s(h):g[y]=c(h)}return g}}function a(t){let e=[],n=[],r=new Map;if(r.set(Date,y=>new Date(y)),r.set(Map,(y,h)=>new Map(c(Array.from(y),h))),r.set(Set,(y,h)=>new Set(c(Array.from(y),h))),t.constructorHandlers)for(let y of t.constructorHandlers)r.set(y[0],y[1]);let o=null;return t.proto?g:p;function c(y,h){let m=Object.keys(y),A=new Array(m.length);for(let _=0;_<m.length;_++){let d=m[_],v=y[d];if(typeof v!="object"||v===null)A[d]=v;else if(v.constructor!==Object&&(o=r.get(v.constructor)))A[d]=o(v,h);else if(ArrayBuffer.isView(v))A[d]=s(v);else{let S=e.indexOf(v);S!==-1?A[d]=n[S]:A[d]=h(v)}}return A}function p(y){if(typeof y!="object"||y===null)return y;if(Array.isArray(y))return c(y,p);if(y.constructor!==Object&&(o=r.get(y.constructor)))return o(y,p);let h={};e.push(y),n.push(h);for(let m in y){if(Object.hasOwnProperty.call(y,m)===!1)continue;let A=y[m];if(typeof A!="object"||A===null)h[m]=A;else if(A.constructor!==Object&&(o=r.get(A.constructor)))h[m]=o(A,p);else if(ArrayBuffer.isView(A))h[m]=s(A);else{let _=e.indexOf(A);_!==-1?h[m]=n[_]:h[m]=p(A)}}return e.pop(),n.pop(),h}function g(y){if(typeof y!="object"||y===null)return y;if(Array.isArray(y))return c(y,g);if(y.constructor!==Object&&(o=r.get(y.constructor)))return o(y,g);let h={};e.push(y),n.push(h);for(let m in y){let A=y[m];if(typeof A!="object"||A===null)h[m]=A;else if(A.constructor!==Object&&(o=r.get(A.constructor)))h[m]=o(A,g);else if(ArrayBuffer.isView(A))h[m]=s(A);else{let _=e.indexOf(A);_!==-1?h[m]=n[_]:h[m]=g(A)}}return e.pop(),n.pop(),h}}}),ec=ge((l,u)=>{ue(),fe(),ce(),u.exports=Xu()()}),tc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0}),l.validateTopic=u,l.validateTopics=s;function u(i){let a=i.split("/");for(let t=0;t<a.length;t++)if(a[t]!=="+"){if(a[t]==="#")return t===a.length-1;if(a[t].indexOf("+")!==-1||a[t].indexOf("#")!==-1)return!1}return!0}function s(i){if(i.length===0)return"empty_topic_list";for(let a=0;a<i.length;a++)if(!u(i[a]))return i[a];return null}}),as=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0});var u=It(),s={objectMode:!0},i={clean:!0},a=class{options;_inflights;constructor(t){this.options=t||{},this.options={...i,...t},this._inflights=new Map}put(t,e){return this._inflights.set(t.messageId,t),e&&e(),this}createStream(){let t=new u.Readable(s),e=[],n=!1,r=0;return this._inflights.forEach((o,c)=>{e.push(o)}),t._read=()=>{!n&&r<e.length?t.push(e[r++]):t.push(null)},t.destroy=o=>{if(!n)return n=!0,setTimeout(()=>{t.emit("close")},0),t},t}del(t,e){let n=this._inflights.get(t.messageId);return n?(this._inflights.delete(t.messageId),e(null,n)):e&&e(new Error("missing packet")),this}get(t,e){let n=this._inflights.get(t.messageId);return n?e(null,n):e&&e(new Error("missing packet")),this}close(t){this.options.clean&&(this._inflights=null),t&&t()}};l.default=a}),rc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0});var u=[0,16,128,131,135,144,145,151,153],s=(i,a,t)=>{i.log("handlePublish: packet %o",a),t=typeof t<"u"?t:i.noop;let e=a.topic.toString(),n=a.payload,{qos:r}=a,{messageId:o}=a,{options:c}=i;if(i.options.protocolVersion===5){let p;if(a.properties&&(p=a.properties.topicAlias),typeof p<"u")if(e.length===0)if(p>0&&p<=65535){let g=i.topicAliasRecv.getTopicByAlias(p);if(g)e=g,i.log("handlePublish :: topic complemented by alias. topic: %s - alias: %d",e,p);else{i.log("handlePublish :: unregistered topic alias. alias: %d",p),i.emit("error",new Error("Received unregistered Topic Alias"));return}}else{i.log("handlePublish :: topic alias out of range. alias: %d",p),i.emit("error",new Error("Received Topic Alias is out of range"));return}else if(i.topicAliasRecv.put(e,p))i.log("handlePublish :: registered topic: %s - alias: %d",e,p);else{i.log("handlePublish :: topic alias out of range. alias: %d",p),i.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(i.log("handlePublish: qos %d",r),r){case 2:{c.customHandleAcks(e,n,a,(p,g)=>{if(typeof p=="number"&&(g=p,p=null),p)return i.emit("error",p);if(u.indexOf(g)===-1)return i.emit("error",new Error("Wrong reason code for pubrec"));g?i._sendPacket({cmd:"pubrec",messageId:o,reasonCode:g},t):i.incomingStore.put(a,()=>{i._sendPacket({cmd:"pubrec",messageId:o},t)})});break}case 1:{c.customHandleAcks(e,n,a,(p,g)=>{if(typeof p=="number"&&(g=p,p=null),p)return i.emit("error",p);if(u.indexOf(g)===-1)return i.emit("error",new Error("Wrong reason code for puback"));g||i.emit("message",e,n,a),i.handleMessage(a,y=>{if(y)return t&&t(y);i._sendPacket({cmd:"puback",messageId:o,reasonCode:g},t)})});break}case 0:i.emit("message",e,n,a),i.handleMessage(a,t);break;default:i.log("handlePublish: unknown QoS. Doing nothing.");break}};l.default=s}),nc=ge((l,u)=>{u.exports={version:"5.14.1"}}),Dt=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0}),l.MQTTJS_VERSION=l.nextTick=l.ErrorWithSubackPacket=l.ErrorWithReasonCode=void 0,l.applyMixin=i;var u=class ll extends Error{code;constructor(t,e){super(t),this.code=e,Object.setPrototypeOf(this,ll.prototype),Object.getPrototypeOf(this).name="ErrorWithReasonCode"}};l.ErrorWithReasonCode=u;var s=class ul extends Error{packet;constructor(t,e){super(t),this.packet=e,Object.setPrototypeOf(this,ul.prototype),Object.getPrototypeOf(this).name="ErrorWithSubackPacket"}};l.ErrorWithSubackPacket=s;function i(a,t,e=!1){let n=[t];for(;;){let r=n[0],o=Object.getPrototypeOf(r);if(o?.prototype)n.unshift(o);else break}for(let r of n)for(let o of Object.getOwnPropertyNames(r.prototype))(e||o!=="constructor")&&Object.defineProperty(a.prototype,o,Object.getOwnPropertyDescriptor(r.prototype,o)??Object.create(null))}l.nextTick=typeof Me?.nextTick=="function"?Me.nextTick:a=>{setTimeout(a,0)},l.MQTTJS_VERSION=nc().version}),lr=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0}),l.ReasonCodes=void 0;var u=Dt();l.ReasonCodes={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};var s=(i,a)=>{let{messageId:t}=a,e=a.cmd,n=null,r=i.outgoing[t]?i.outgoing[t].cb:null,o=null;if(!r){i.log("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(i.log("_handleAck :: packet type",e),e){case"pubcomp":case"puback":{let c=a.reasonCode;c&&c>0&&c!==16?(o=new u.ErrorWithReasonCode(`Publish error: ${l.ReasonCodes[c]}`,c),i._removeOutgoingAndStoreMessage(t,()=>{r(o,a)})):i._removeOutgoingAndStoreMessage(t,r);break}case"pubrec":{n={cmd:"pubrel",qos:2,messageId:t};let c=a.reasonCode;c&&c>0&&c!==16?(o=new u.ErrorWithReasonCode(`Publish error: ${l.ReasonCodes[c]}`,c),i._removeOutgoingAndStoreMessage(t,()=>{r(o,a)})):i._sendPacket(n);break}case"suback":{delete i.outgoing[t],i.messageIdProvider.deallocate(t);let c=a.granted;for(let p=0;p<c.length;p++){let g=c[p];if((g&128)!==0){o=new Error(`Subscribe error: ${l.ReasonCodes[g]}`),o.code=g;let y=i.messageIdToTopic[t];y&&y.forEach(h=>{delete i._resubscribeTopics[h]})}}delete i.messageIdToTopic[t],i._invokeStoreProcessingQueue(),r(o,a);break}case"unsuback":{delete i.outgoing[t],i.messageIdProvider.deallocate(t),i._invokeStoreProcessingQueue(),r(null,a);break}default:i.emit("error",new Error("unrecognized packet type"))}i.disconnecting&&Object.keys(i.outgoing).length===0&&i.emit("outgoingEmpty")};l.default=s}),oc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0});var u=Dt(),s=lr(),i=(a,t)=>{let{options:e}=a,n=e.protocolVersion,r=n===5?t.reasonCode:t.returnCode;if(n!==5){let o=new u.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${n}`,r);a.emit("error",o);return}a.handleAuth(t,(o,c)=>{if(o){a.emit("error",o);return}if(r===24)a.reconnecting=!1,a._sendPacket(c);else{let p=new u.ErrorWithReasonCode(`Connection refused: ${s.ReasonCodes[r]}`,r);a.emit("error",p)}})};l.default=i}),ic=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0}),l.LRUCache=void 0;var u=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,s=new Set,i=typeof Me=="object"&&Me?Me:{},a=(y,h,m,A)=>{typeof i.emitWarning=="function"?i.emitWarning(y,h,m,A):console.error(`[${m}] ${h}: ${y}`)},t=globalThis.AbortController,e=globalThis.AbortSignal;if(typeof t>"u"){e=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(m,A){this._onabort.push(A)}},t=class{constructor(){h()}signal=new e;abort(m){if(!this.signal.aborted){this.signal.reason=m,this.signal.aborted=!0;for(let A of this.signal._onabort)A(m);this.signal.onabort?.(m)}}};let y=i.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",h=()=>{y&&(y=!1,a("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",h))}}var n=y=>!s.has(y),r=y=>y&&y===Math.floor(y)&&y>0&&isFinite(y),o=y=>r(y)?y<=Math.pow(2,8)?Uint8Array:y<=Math.pow(2,16)?Uint16Array:y<=Math.pow(2,32)?Uint32Array:y<=Number.MAX_SAFE_INTEGER?c:null:null,c=class extends Array{constructor(y){super(y),this.fill(0)}},p=class Xt{heap;length;static#l=!1;static create(h){let m=o(h);if(!m)return[];Xt.#l=!0;let A=new Xt(h,m);return Xt.#l=!1,A}constructor(h,m){if(!Xt.#l)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new m(h),this.length=0}push(h){this.heap[this.length++]=h}pop(){return this.heap[--this.length]}},g=class cl{#l;#f;#g;#m;#O;#P;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#A;#n;#r;#e;#u;#h;#a;#i;#y;#s;#b;#w;#d;#v;#I;#c;static unsafeExposeInternals(h){return{starts:h.#w,ttls:h.#d,sizes:h.#b,keyMap:h.#n,keyList:h.#r,valList:h.#e,next:h.#u,prev:h.#h,get head(){return h.#a},get tail(){return h.#i},free:h.#y,isBackgroundFetch:m=>h.#t(m),backgroundFetch:(m,A,_,d)=>h.#R(m,A,_,d),moveToTail:m=>h.#T(m),indexes:m=>h.#_(m),rindexes:m=>h.#E(m),isStale:m=>h.#p(m)}}get max(){return this.#l}get maxSize(){return this.#f}get calculatedSize(){return this.#A}get size(){return this.#o}get fetchMethod(){return this.#O}get memoMethod(){return this.#P}get dispose(){return this.#g}get disposeAfter(){return this.#m}constructor(h){let{max:m=0,ttl:A,ttlResolution:_=1,ttlAutopurge:d,updateAgeOnGet:v,updateAgeOnHas:S,allowStale:b,dispose:x,disposeAfter:E,noDisposeOnSet:C,noUpdateTTL:M,maxSize:P=0,maxEntrySize:F=0,sizeCalculation:k,fetchMethod:V,memoMethod:L,noDeleteOnFetchRejection:N,noDeleteOnStaleGet:le,allowStaleOnFetchRejection:J,allowStaleOnFetchAbort:H,ignoreFetchAbort:ne}=h;if(m!==0&&!r(m))throw new TypeError("max option must be a nonnegative integer");let W=m?o(m):Array;if(!W)throw new Error("invalid max value: "+m);if(this.#l=m,this.#f=P,this.maxEntrySize=F||this.#f,this.sizeCalculation=k,this.sizeCalculation){if(!this.#f&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(L!==void 0&&typeof L!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#P=L,V!==void 0&&typeof V!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#O=V,this.#I=!!V,this.#n=new Map,this.#r=new Array(m).fill(void 0),this.#e=new Array(m).fill(void 0),this.#u=new W(m),this.#h=new W(m),this.#a=0,this.#i=0,this.#y=p.create(m),this.#o=0,this.#A=0,typeof x=="function"&&(this.#g=x),typeof E=="function"?(this.#m=E,this.#s=[]):(this.#m=void 0,this.#s=void 0),this.#v=!!this.#g,this.#c=!!this.#m,this.noDisposeOnSet=!!C,this.noUpdateTTL=!!M,this.noDeleteOnFetchRejection=!!N,this.allowStaleOnFetchRejection=!!J,this.allowStaleOnFetchAbort=!!H,this.ignoreFetchAbort=!!ne,this.maxEntrySize!==0){if(this.#f!==0&&!r(this.#f))throw new TypeError("maxSize must be a positive integer if specified");if(!r(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#W()}if(this.allowStale=!!b,this.noDeleteOnStaleGet=!!le,this.updateAgeOnGet=!!v,this.updateAgeOnHas=!!S,this.ttlResolution=r(_)||_===0?_:1,this.ttlAutopurge=!!d,this.ttl=A||0,this.ttl){if(!r(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#D()}if(this.#l===0&&this.ttl===0&&this.#f===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#l&&!this.#f){let ee="LRU_CACHE_UNBOUNDED";n(ee)&&(s.add(ee),a("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",ee,cl))}}getRemainingTTL(h){return this.#n.has(h)?1/0:0}#D(){let h=new c(this.#l),m=new c(this.#l);this.#d=h,this.#w=m,this.#U=(d,v,S=u.now())=>{if(m[d]=v!==0?S:0,h[d]=v,v!==0&&this.ttlAutopurge){let b=setTimeout(()=>{this.#p(d)&&this.#S(this.#r[d],"expire")},v+1);b.unref&&b.unref()}},this.#C=d=>{m[d]=h[d]!==0?u.now():0},this.#x=(d,v)=>{if(h[v]){let S=h[v],b=m[v];if(!S||!b)return;d.ttl=S,d.start=b,d.now=A||_();let x=d.now-b;d.remainingTTL=S-x}};let A=0,_=()=>{let d=u.now();if(this.ttlResolution>0){A=d;let v=setTimeout(()=>A=0,this.ttlResolution);v.unref&&v.unref()}return d};this.getRemainingTTL=d=>{let v=this.#n.get(d);if(v===void 0)return 0;let S=h[v],b=m[v];if(!S||!b)return 1/0;let x=(A||_())-b;return S-x},this.#p=d=>{let v=m[d],S=h[d];return!!S&&!!v&&(A||_())-v>S}}#C=()=>{};#x=()=>{};#U=()=>{};#p=()=>!1;#W(){let h=new c(this.#l);this.#A=0,this.#b=h,this.#k=m=>{this.#A-=h[m],h[m]=0},this.#N=(m,A,_,d)=>{if(this.#t(A))return 0;if(!r(_))if(d){if(typeof d!="function")throw new TypeError("sizeCalculation must be a function");if(_=d(A,m),!r(_))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return _},this.#B=(m,A,_)=>{if(h[m]=A,this.#f){let d=this.#f-h[m];for(;this.#A>d;)this.#M(!0)}this.#A+=h[m],_&&(_.entrySize=A,_.totalCalculatedSize=this.#A)}}#k=h=>{};#B=(h,m,A)=>{};#N=(h,m,A,_)=>{if(A||_)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#_({allowStale:h=this.allowStale}={}){if(this.#o)for(let m=this.#i;!(!this.#j(m)||((h||!this.#p(m))&&(yield m),m===this.#a));)m=this.#h[m]}*#E({allowStale:h=this.allowStale}={}){if(this.#o)for(let m=this.#a;!(!this.#j(m)||((h||!this.#p(m))&&(yield m),m===this.#i));)m=this.#u[m]}#j(h){return h!==void 0&&this.#n.get(this.#r[h])===h}*entries(){for(let h of this.#_())this.#e[h]!==void 0&&this.#r[h]!==void 0&&!this.#t(this.#e[h])&&(yield[this.#r[h],this.#e[h]])}*rentries(){for(let h of this.#E())this.#e[h]!==void 0&&this.#r[h]!==void 0&&!this.#t(this.#e[h])&&(yield[this.#r[h],this.#e[h]])}*keys(){for(let h of this.#_()){let m=this.#r[h];m!==void 0&&!this.#t(this.#e[h])&&(yield m)}}*rkeys(){for(let h of this.#E()){let m=this.#r[h];m!==void 0&&!this.#t(this.#e[h])&&(yield m)}}*values(){for(let h of this.#_())this.#e[h]!==void 0&&!this.#t(this.#e[h])&&(yield this.#e[h])}*rvalues(){for(let h of this.#E())this.#e[h]!==void 0&&!this.#t(this.#e[h])&&(yield this.#e[h])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(h,m={}){for(let A of this.#_()){let _=this.#e[A],d=this.#t(_)?_.__staleWhileFetching:_;if(d!==void 0&&h(d,this.#r[A],this))return this.get(this.#r[A],m)}}forEach(h,m=this){for(let A of this.#_()){let _=this.#e[A],d=this.#t(_)?_.__staleWhileFetching:_;d!==void 0&&h.call(m,d,this.#r[A],this)}}rforEach(h,m=this){for(let A of this.#E()){let _=this.#e[A],d=this.#t(_)?_.__staleWhileFetching:_;d!==void 0&&h.call(m,d,this.#r[A],this)}}purgeStale(){let h=!1;for(let m of this.#E({allowStale:!0}))this.#p(m)&&(this.#S(this.#r[m],"expire"),h=!0);return h}info(h){let m=this.#n.get(h);if(m===void 0)return;let A=this.#e[m],_=this.#t(A)?A.__staleWhileFetching:A;if(_===void 0)return;let d={value:_};if(this.#d&&this.#w){let v=this.#d[m],S=this.#w[m];if(v&&S){let b=v-(u.now()-S);d.ttl=b,d.start=Date.now()}}return this.#b&&(d.size=this.#b[m]),d}dump(){let h=[];for(let m of this.#_({allowStale:!0})){let A=this.#r[m],_=this.#e[m],d=this.#t(_)?_.__staleWhileFetching:_;if(d===void 0||A===void 0)continue;let v={value:d};if(this.#d&&this.#w){v.ttl=this.#d[m];let S=u.now()-this.#w[m];v.start=Math.floor(Date.now()-S)}this.#b&&(v.size=this.#b[m]),h.unshift([A,v])}return h}load(h){this.clear();for(let[m,A]of h){if(A.start){let _=Date.now()-A.start;A.start=u.now()-_}this.set(m,A.value,A)}}set(h,m,A={}){if(m===void 0)return this.delete(h),this;let{ttl:_=this.ttl,start:d,noDisposeOnSet:v=this.noDisposeOnSet,sizeCalculation:S=this.sizeCalculation,status:b}=A,{noUpdateTTL:x=this.noUpdateTTL}=A,E=this.#N(h,m,A.size||0,S);if(this.maxEntrySize&&E>this.maxEntrySize)return b&&(b.set="miss",b.maxEntrySizeExceeded=!0),this.#S(h,"set"),this;let C=this.#o===0?void 0:this.#n.get(h);if(C===void 0)C=this.#o===0?this.#i:this.#y.length!==0?this.#y.pop():this.#o===this.#l?this.#M(!1):this.#o,this.#r[C]=h,this.#e[C]=m,this.#n.set(h,C),this.#u[this.#i]=C,this.#h[C]=this.#i,this.#i=C,this.#o++,this.#B(C,E,b),b&&(b.set="add"),x=!1;else{this.#T(C);let M=this.#e[C];if(m!==M){if(this.#I&&this.#t(M)){M.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:P}=M;P!==void 0&&!v&&(this.#v&&this.#g?.(P,h,"set"),this.#c&&this.#s?.push([P,h,"set"]))}else v||(this.#v&&this.#g?.(M,h,"set"),this.#c&&this.#s?.push([M,h,"set"]));if(this.#k(C),this.#B(C,E,b),this.#e[C]=m,b){b.set="replace";let P=M&&this.#t(M)?M.__staleWhileFetching:M;P!==void 0&&(b.oldValue=P)}}else b&&(b.set="update")}if(_!==0&&!this.#d&&this.#D(),this.#d&&(x||this.#U(C,_,d),b&&this.#x(b,C)),!v&&this.#c&&this.#s){let M=this.#s,P;for(;P=M?.shift();)this.#m?.(...P)}return this}pop(){try{for(;this.#o;){let h=this.#e[this.#a];if(this.#M(!0),this.#t(h)){if(h.__staleWhileFetching)return h.__staleWhileFetching}else if(h!==void 0)return h}}finally{if(this.#c&&this.#s){let h=this.#s,m;for(;m=h?.shift();)this.#m?.(...m)}}}#M(h){let m=this.#a,A=this.#r[m],_=this.#e[m];return this.#I&&this.#t(_)?_.__abortController.abort(new Error("evicted")):(this.#v||this.#c)&&(this.#v&&this.#g?.(_,A,"evict"),this.#c&&this.#s?.push([_,A,"evict"])),this.#k(m),h&&(this.#r[m]=void 0,this.#e[m]=void 0,this.#y.push(m)),this.#o===1?(this.#a=this.#i=0,this.#y.length=0):this.#a=this.#u[m],this.#n.delete(A),this.#o--,m}has(h,m={}){let{updateAgeOnHas:A=this.updateAgeOnHas,status:_}=m,d=this.#n.get(h);if(d!==void 0){let v=this.#e[d];if(this.#t(v)&&v.__staleWhileFetching===void 0)return!1;if(this.#p(d))_&&(_.has="stale",this.#x(_,d));else return A&&this.#C(d),_&&(_.has="hit",this.#x(_,d)),!0}else _&&(_.has="miss");return!1}peek(h,m={}){let{allowStale:A=this.allowStale}=m,_=this.#n.get(h);if(_===void 0||!A&&this.#p(_))return;let d=this.#e[_];return this.#t(d)?d.__staleWhileFetching:d}#R(h,m,A,_){let d=m===void 0?void 0:this.#e[m];if(this.#t(d))return d;let v=new t,{signal:S}=A;S?.addEventListener("abort",()=>v.abort(S.reason),{signal:v.signal});let b={signal:v.signal,options:A,context:_},x=(k,V=!1)=>{let{aborted:L}=v.signal,N=A.ignoreFetchAbort&&k!==void 0;if(A.status&&(L&&!V?(A.status.fetchAborted=!0,A.status.fetchError=v.signal.reason,N&&(A.status.fetchAbortIgnored=!0)):A.status.fetchResolved=!0),L&&!N&&!V)return C(v.signal.reason);let le=P;return this.#e[m]===P&&(k===void 0?le.__staleWhileFetching?this.#e[m]=le.__staleWhileFetching:this.#S(h,"fetch"):(A.status&&(A.status.fetchUpdated=!0),this.set(h,k,b.options))),k},E=k=>(A.status&&(A.status.fetchRejected=!0,A.status.fetchError=k),C(k)),C=k=>{let{aborted:V}=v.signal,L=V&&A.allowStaleOnFetchAbort,N=L||A.allowStaleOnFetchRejection,le=N||A.noDeleteOnFetchRejection,J=P;if(this.#e[m]===P&&(!le||J.__staleWhileFetching===void 0?this.#S(h,"fetch"):L||(this.#e[m]=J.__staleWhileFetching)),N)return A.status&&J.__staleWhileFetching!==void 0&&(A.status.returnedStale=!0),J.__staleWhileFetching;if(J.__returned===J)throw k},M=(k,V)=>{let L=this.#O?.(h,d,b);L&&L instanceof Promise&&L.then(N=>k(N===void 0?void 0:N),V),v.signal.addEventListener("abort",()=>{(!A.ignoreFetchAbort||A.allowStaleOnFetchAbort)&&(k(void 0),A.allowStaleOnFetchAbort&&(k=N=>x(N,!0)))})};A.status&&(A.status.fetchDispatched=!0);let P=new Promise(M).then(x,E),F=Object.assign(P,{__abortController:v,__staleWhileFetching:d,__returned:void 0});return m===void 0?(this.set(h,F,{...b.options,status:void 0}),m=this.#n.get(h)):this.#e[m]=F,F}#t(h){if(!this.#I)return!1;let m=h;return!!m&&m instanceof Promise&&m.hasOwnProperty("__staleWhileFetching")&&m.__abortController instanceof t}async fetch(h,m={}){let{allowStale:A=this.allowStale,updateAgeOnGet:_=this.updateAgeOnGet,noDeleteOnStaleGet:d=this.noDeleteOnStaleGet,ttl:v=this.ttl,noDisposeOnSet:S=this.noDisposeOnSet,size:b=0,sizeCalculation:x=this.sizeCalculation,noUpdateTTL:E=this.noUpdateTTL,noDeleteOnFetchRejection:C=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:M=this.allowStaleOnFetchRejection,ignoreFetchAbort:P=this.ignoreFetchAbort,allowStaleOnFetchAbort:F=this.allowStaleOnFetchAbort,context:k,forceRefresh:V=!1,status:L,signal:N}=m;if(!this.#I)return L&&(L.fetch="get"),this.get(h,{allowStale:A,updateAgeOnGet:_,noDeleteOnStaleGet:d,status:L});let le={allowStale:A,updateAgeOnGet:_,noDeleteOnStaleGet:d,ttl:v,noDisposeOnSet:S,size:b,sizeCalculation:x,noUpdateTTL:E,noDeleteOnFetchRejection:C,allowStaleOnFetchRejection:M,allowStaleOnFetchAbort:F,ignoreFetchAbort:P,status:L,signal:N},J=this.#n.get(h);if(J===void 0){L&&(L.fetch="miss");let H=this.#R(h,J,le,k);return H.__returned=H}else{let H=this.#e[J];if(this.#t(H)){let B=A&&H.__staleWhileFetching!==void 0;return L&&(L.fetch="inflight",B&&(L.returnedStale=!0)),B?H.__staleWhileFetching:H.__returned=H}let ne=this.#p(J);if(!V&&!ne)return L&&(L.fetch="hit"),this.#T(J),_&&this.#C(J),L&&this.#x(L,J),H;let W=this.#R(h,J,le,k),ee=W.__staleWhileFetching!==void 0&&A;return L&&(L.fetch=ne?"stale":"refresh",ee&&ne&&(L.returnedStale=!0)),ee?W.__staleWhileFetching:W.__returned=W}}async forceFetch(h,m={}){let A=await this.fetch(h,m);if(A===void 0)throw new Error("fetch() returned undefined");return A}memo(h,m={}){let A=this.#P;if(!A)throw new Error("no memoMethod provided to constructor");let{context:_,forceRefresh:d,...v}=m,S=this.get(h,v);if(!d&&S!==void 0)return S;let b=A(h,S,{options:v,context:_});return this.set(h,b,v),b}get(h,m={}){let{allowStale:A=this.allowStale,updateAgeOnGet:_=this.updateAgeOnGet,noDeleteOnStaleGet:d=this.noDeleteOnStaleGet,status:v}=m,S=this.#n.get(h);if(S!==void 0){let b=this.#e[S],x=this.#t(b);return v&&this.#x(v,S),this.#p(S)?(v&&(v.get="stale"),x?(v&&A&&b.__staleWhileFetching!==void 0&&(v.returnedStale=!0),A?b.__staleWhileFetching:void 0):(d||this.#S(h,"expire"),v&&A&&(v.returnedStale=!0),A?b:void 0)):(v&&(v.get="hit"),x?b.__staleWhileFetching:(this.#T(S),_&&this.#C(S),b))}else v&&(v.get="miss")}#F(h,m){this.#h[m]=h,this.#u[h]=m}#T(h){h!==this.#i&&(h===this.#a?this.#a=this.#u[h]:this.#F(this.#h[h],this.#u[h]),this.#F(this.#i,h),this.#i=h)}delete(h){return this.#S(h,"delete")}#S(h,m){let A=!1;if(this.#o!==0){let _=this.#n.get(h);if(_!==void 0)if(A=!0,this.#o===1)this.#L(m);else{this.#k(_);let d=this.#e[_];if(this.#t(d)?d.__abortController.abort(new Error("deleted")):(this.#v||this.#c)&&(this.#v&&this.#g?.(d,h,m),this.#c&&this.#s?.push([d,h,m])),this.#n.delete(h),this.#r[_]=void 0,this.#e[_]=void 0,_===this.#i)this.#i=this.#h[_];else if(_===this.#a)this.#a=this.#u[_];else{let v=this.#h[_];this.#u[v]=this.#u[_];let S=this.#u[_];this.#h[S]=this.#h[_]}this.#o--,this.#y.push(_)}}if(this.#c&&this.#s?.length){let _=this.#s,d;for(;d=_?.shift();)this.#m?.(...d)}return A}clear(){return this.#L("delete")}#L(h){for(let m of this.#E({allowStale:!0})){let A=this.#e[m];if(this.#t(A))A.__abortController.abort(new Error("deleted"));else{let _=this.#r[m];this.#v&&this.#g?.(A,_,h),this.#c&&this.#s?.push([A,_,h])}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#d&&this.#w&&(this.#d.fill(0),this.#w.fill(0)),this.#b&&this.#b.fill(0),this.#a=0,this.#i=0,this.#y.length=0,this.#A=0,this.#o=0,this.#c&&this.#s){let m=this.#s,A;for(;A=m?.shift();)this.#m?.(...A)}}};l.LRUCache=g}),ct=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.ContainerIterator=l.Container=l.Base=void 0;var u=class{constructor(a=0){this.iteratorType=a}equals(a){return this.o===a.o}};l.ContainerIterator=u;var s=class{constructor(){this.i=0}get length(){return this.i}size(){return this.i}empty(){return this.i===0}};l.Base=s;var i=class extends s{};l.Container=i}),sc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.default=void 0;var u=ct(),s=class extends u.Base{constructor(a=[]){super(),this.S=[];let t=this;a.forEach(function(e){t.push(e)})}clear(){this.i=0,this.S=[]}push(a){return this.S.push(a),this.i+=1,this.i}pop(){if(this.i!==0)return this.i-=1,this.S.pop()}top(){return this.S[this.i-1]}},i=s;l.default=i}),ac=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.default=void 0;var u=ct(),s=class extends u.Base{constructor(a=[]){super(),this.j=0,this.q=[];let t=this;a.forEach(function(e){t.push(e)})}clear(){this.q=[],this.i=this.j=0}push(a){let t=this.q.length;if(this.j/t>.5&&this.j+this.i>=t&&t>4096){let e=this.i;for(let n=0;n<e;++n)this.q[n]=this.q[this.j+n];this.j=0,this.q[this.i]=a}else this.q[this.j+this.i]=a;return++this.i}pop(){if(this.i===0)return;let a=this.q[this.j++];return this.i-=1,a}front(){if(this.i!==0)return this.q[this.j]}},i=s;l.default=i}),lc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.default=void 0;var u=ct(),s=class extends u.Base{constructor(a=[],t=function(n,r){return n>r?-1:n<r?1:0},e=!0){if(super(),this.v=t,Array.isArray(a))this.C=e?[...a]:a;else{this.C=[];let r=this;a.forEach(function(o){r.C.push(o)})}this.i=this.C.length;let n=this.i>>1;for(let r=this.i-1>>1;r>=0;--r)this.k(r,n)}m(a){let t=this.C[a];for(;a>0;){let e=a-1>>1,n=this.C[e];if(this.v(n,t)<=0)break;this.C[a]=n,a=e}this.C[a]=t}k(a,t){let e=this.C[a];for(;a<t;){let n=a<<1|1,r=n+1,o=this.C[n];if(r<this.i&&this.v(o,this.C[r])>0&&(n=r,o=this.C[r]),this.v(o,e)>=0)break;this.C[a]=o,a=n}this.C[a]=e}clear(){this.i=0,this.C.length=0}push(a){this.C.push(a),this.m(this.i),this.i+=1}pop(){if(this.i===0)return;let a=this.C[0],t=this.C.pop();return this.i-=1,this.i&&(this.C[0]=t,this.k(0,this.i>>1)),a}top(){return this.C[0]}find(a){return this.C.indexOf(a)>=0}remove(a){let t=this.C.indexOf(a);return t<0?!1:(t===0?this.pop():t===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(t,1,this.C.pop()),this.i-=1,this.m(t),this.k(t,this.i>>1)),!0)}updateItem(a){let t=this.C.indexOf(a);return t<0?!1:(this.m(t),this.k(t,this.i>>1),!0)}toArray(){return[...this.C]}},i=s;l.default=i}),uo=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.default=void 0;var u=ct(),s=class extends u.Container{},i=s;l.default=i}),ft=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.throwIteratorAccessError=u;function u(){throw new RangeError("Iterator access denied!")}}),ls=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.RandomIterator=void 0;var u=ct(),s=ft(),i=class extends u.ContainerIterator{constructor(a,t){super(t),this.o=a,this.iteratorType===0?(this.pre=function(){return this.o===0&&(0,s.throwIteratorAccessError)(),this.o-=1,this},this.next=function(){return this.o===this.container.size()&&(0,s.throwIteratorAccessError)(),this.o+=1,this}):(this.pre=function(){return this.o===this.container.size()-1&&(0,s.throwIteratorAccessError)(),this.o+=1,this},this.next=function(){return this.o===-1&&(0,s.throwIteratorAccessError)(),this.o-=1,this})}get pointer(){return this.container.getElementByPos(this.o)}set pointer(a){this.container.setElementByPos(this.o,a)}};l.RandomIterator=i}),uc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.default=void 0;var u=i(uo()),s=ls();function i(n){return n&&n.t?n:{default:n}}var a=class fl extends s.RandomIterator{constructor(r,o,c){super(r,c),this.container=o}copy(){return new fl(this.o,this.container,this.iteratorType)}},t=class extends u.default{constructor(n=[],r=!0){if(super(),Array.isArray(n))this.J=r?[...n]:n,this.i=n.length;else{this.J=[];let o=this;n.forEach(function(c){o.pushBack(c)})}}clear(){this.i=0,this.J.length=0}begin(){return new a(0,this)}end(){return new a(this.i,this)}rBegin(){return new a(this.i-1,this,1)}rEnd(){return new a(-1,this,1)}front(){return this.J[0]}back(){return this.J[this.i-1]}getElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;return this.J[n]}eraseElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;return this.J.splice(n,1),this.i-=1,this.i}eraseElementByValue(n){let r=0;for(let o=0;o<this.i;++o)this.J[o]!==n&&(this.J[r++]=this.J[o]);return this.i=this.J.length=r,this.i}eraseElementByIterator(n){let r=n.o;return n=n.next(),this.eraseElementByPos(r),n}pushBack(n){return this.J.push(n),this.i+=1,this.i}popBack(){if(this.i!==0)return this.i-=1,this.J.pop()}setElementByPos(n,r){if(n<0||n>this.i-1)throw new RangeError;this.J[n]=r}insert(n,r,o=1){if(n<0||n>this.i)throw new RangeError;return this.J.splice(n,0,...new Array(o).fill(r)),this.i+=o,this.i}find(n){for(let r=0;r<this.i;++r)if(this.J[r]===n)return new a(r,this);return this.end()}reverse(){this.J.reverse()}unique(){let n=1;for(let r=1;r<this.i;++r)this.J[r]!==this.J[r-1]&&(this.J[n++]=this.J[r]);return this.i=this.J.length=n,this.i}sort(n){this.J.sort(n)}forEach(n){for(let r=0;r<this.i;++r)n(this.J[r],r,this)}[Symbol.iterator](){return(function*(){yield*this.J}).bind(this)()}},e=t;l.default=e}),cc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.default=void 0;var u=a(uo()),s=ct(),i=ft();function a(r){return r&&r.t?r:{default:r}}var t=class hl extends s.ContainerIterator{constructor(o,c,p,g){super(g),this.o=o,this.h=c,this.container=p,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.L,this})}get pointer(){return this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o.l}set pointer(o){this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o.l=o}copy(){return new hl(this.o,this.h,this.container,this.iteratorType)}},e=class extends u.default{constructor(r=[]){super(),this.h={},this.p=this._=this.h.L=this.h.B=this.h;let o=this;r.forEach(function(c){o.pushBack(c)})}V(r){let{L:o,B:c}=r;o.B=c,c.L=o,r===this.p&&(this.p=c),r===this._&&(this._=o),this.i-=1}G(r,o){let c=o.B,p={l:r,L:o,B:c};o.B=p,c.L=p,o===this.h&&(this.p=p),c===this.h&&(this._=p),this.i+=1}clear(){this.i=0,this.p=this._=this.h.L=this.h.B=this.h}begin(){return new t(this.p,this.h,this)}end(){return new t(this.h,this.h,this)}rBegin(){return new t(this._,this.h,this,1)}rEnd(){return new t(this.h,this.h,this,1)}front(){return this.p.l}back(){return this._.l}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let o=this.p;for(;r--;)o=o.B;return o.l}eraseElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let o=this.p;for(;r--;)o=o.B;return this.V(o),this.i}eraseElementByValue(r){let o=this.p;for(;o!==this.h;)o.l===r&&this.V(o),o=o.B;return this.i}eraseElementByIterator(r){let o=r.o;return o===this.h&&(0,i.throwIteratorAccessError)(),r=r.next(),this.V(o),r}pushBack(r){return this.G(r,this._),this.i}popBack(){if(this.i===0)return;let r=this._.l;return this.V(this._),r}pushFront(r){return this.G(r,this.h),this.i}popFront(){if(this.i===0)return;let r=this.p.l;return this.V(this.p),r}setElementByPos(r,o){if(r<0||r>this.i-1)throw new RangeError;let c=this.p;for(;r--;)c=c.B;c.l=o}insert(r,o,c=1){if(r<0||r>this.i)throw new RangeError;if(c<=0)return this.i;if(r===0)for(;c--;)this.pushFront(o);else if(r===this.i)for(;c--;)this.pushBack(o);else{let p=this.p;for(let y=1;y<r;++y)p=p.B;let g=p.B;for(this.i+=c;c--;)p.B={l:o,L:p},p.B.L=p,p=p.B;p.B=g,g.L=p}return this.i}find(r){let o=this.p;for(;o!==this.h;){if(o.l===r)return new t(o,this.h,this);o=o.B}return this.end()}reverse(){if(this.i<=1)return;let r=this.p,o=this._,c=0;for(;c<<1<this.i;){let p=r.l;r.l=o.l,o.l=p,r=r.B,o=o.L,c+=1}}unique(){if(this.i<=1)return this.i;let r=this.p;for(;r!==this.h;){let o=r;for(;o.B!==this.h&&o.l===o.B.l;)o=o.B,this.i-=1;r.B=o.B,r.B.L=r,r=r.B}return this.i}sort(r){if(this.i<=1)return;let o=[];this.forEach(function(p){o.push(p)}),o.sort(r);let c=this.p;o.forEach(function(p){c.l=p,c=c.B})}merge(r){let o=this;if(this.i===0)r.forEach(function(c){o.pushBack(c)});else{let c=this.p;r.forEach(function(p){for(;c!==o.h&&c.l<=p;)c=c.B;o.G(p,c.L)})}return this.i}forEach(r){let o=this.p,c=0;for(;o!==this.h;)r(o.l,c++,this),o=o.B}[Symbol.iterator](){return(function*(){if(this.i===0)return;let r=this.p;for(;r!==this.h;)yield r.l,r=r.B}).bind(this)()}},n=e;l.default=n}),fc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.default=void 0;var u=i(uo()),s=ls();function i(n){return n&&n.t?n:{default:n}}var a=class dl extends s.RandomIterator{constructor(r,o,c){super(r,c),this.container=o}copy(){return new dl(this.o,this.container,this.iteratorType)}},t=class extends u.default{constructor(n=[],r=4096){super(),this.j=0,this.D=0,this.R=0,this.N=0,this.P=0,this.A=[];let o=(()=>{if(typeof n.length=="number")return n.length;if(typeof n.size=="number")return n.size;if(typeof n.size=="function")return n.size();throw new TypeError("Cannot get the length or size of the container")})();this.F=r,this.P=Math.max(Math.ceil(o/this.F),1);for(let g=0;g<this.P;++g)this.A.push(new Array(this.F));let c=Math.ceil(o/this.F);this.j=this.R=(this.P>>1)-(c>>1),this.D=this.N=this.F-o%this.F>>1;let p=this;n.forEach(function(g){p.pushBack(g)})}T(){let n=[],r=Math.max(this.P>>1,1);for(let o=0;o<r;++o)n[o]=new Array(this.F);for(let o=this.j;o<this.P;++o)n[n.length]=this.A[o];for(let o=0;o<this.R;++o)n[n.length]=this.A[o];n[n.length]=[...this.A[this.R]],this.j=r,this.R=n.length-1;for(let o=0;o<r;++o)n[n.length]=new Array(this.F);this.A=n,this.P=n.length}O(n){let r=this.D+n+1,o=r%this.F,c=o-1,p=this.j+(r-o)/this.F;return o===0&&(p-=1),p%=this.P,c<0&&(c+=this.F),{curNodeBucketIndex:p,curNodePointerIndex:c}}clear(){this.A=[new Array(this.F)],this.P=1,this.j=this.R=this.i=0,this.D=this.N=this.F>>1}begin(){return new a(0,this)}end(){return new a(this.i,this)}rBegin(){return new a(this.i-1,this,1)}rEnd(){return new a(-1,this,1)}front(){if(this.i!==0)return this.A[this.j][this.D]}back(){if(this.i!==0)return this.A[this.R][this.N]}pushBack(n){return this.i&&(this.N<this.F-1?this.N+=1:this.R<this.P-1?(this.R+=1,this.N=0):(this.R=0,this.N=0),this.R===this.j&&this.N===this.D&&this.T()),this.i+=1,this.A[this.R][this.N]=n,this.i}popBack(){if(this.i===0)return;let n=this.A[this.R][this.N];return this.i!==1&&(this.N>0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,n}pushFront(n){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=n,this.i}popFront(){if(this.i===0)return;let n=this.A[this.j][this.D];return this.i!==1&&(this.D<this.F-1?this.D+=1:this.j<this.P-1?(this.j+=1,this.D=0):(this.j=0,this.D=0)),this.i-=1,n}getElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;let{curNodeBucketIndex:r,curNodePointerIndex:o}=this.O(n);return this.A[r][o]}setElementByPos(n,r){if(n<0||n>this.i-1)throw new RangeError;let{curNodeBucketIndex:o,curNodePointerIndex:c}=this.O(n);this.A[o][c]=r}insert(n,r,o=1){if(n<0||n>this.i)throw new RangeError;if(n===0)for(;o--;)this.pushFront(r);else if(n===this.i)for(;o--;)this.pushBack(r);else{let c=[];for(let p=n;p<this.i;++p)c.push(this.getElementByPos(p));this.cut(n-1);for(let p=0;p<o;++p)this.pushBack(r);for(let p=0;p<c.length;++p)this.pushBack(c[p])}return this.i}cut(n){if(n<0)return this.clear(),0;let{curNodeBucketIndex:r,curNodePointerIndex:o}=this.O(n);return this.R=r,this.N=o,this.i=n+1,this.i}eraseElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;if(n===0)this.popFront();else if(n===this.i-1)this.popBack();else{let r=[];for(let c=n+1;c<this.i;++c)r.push(this.getElementByPos(c));this.cut(n),this.popBack();let o=this;r.forEach(function(c){o.pushBack(c)})}return this.i}eraseElementByValue(n){if(this.i===0)return 0;let r=[];for(let c=0;c<this.i;++c){let p=this.getElementByPos(c);p!==n&&r.push(p)}let o=r.length;for(let c=0;c<o;++c)this.setElementByPos(c,r[c]);return this.cut(o-1)}eraseElementByIterator(n){let r=n.o;return this.eraseElementByPos(r),n=n.next(),n}find(n){for(let r=0;r<this.i;++r)if(this.getElementByPos(r)===n)return new a(r,this);return this.end()}reverse(){let n=0,r=this.i-1;for(;n<r;){let o=this.getElementByPos(n);this.setElementByPos(n,this.getElementByPos(r)),this.setElementByPos(r,o),n+=1,r-=1}}unique(){if(this.i<=1)return this.i;let n=1,r=this.getElementByPos(0);for(let o=1;o<this.i;++o){let c=this.getElementByPos(o);c!==r&&(r=c,this.setElementByPos(n++,c))}for(;this.i>n;)this.popBack();return this.i}sort(n){let r=[];for(let o=0;o<this.i;++o)r.push(this.getElementByPos(o));r.sort(n);for(let o=0;o<this.i;++o)this.setElementByPos(o,r[o])}shrinkToFit(){if(this.i===0)return;let n=[];this.forEach(function(r){n.push(r)}),this.P=Math.max(Math.ceil(this.i/this.F),1),this.i=this.j=this.R=this.D=this.N=0,this.A=[];for(let r=0;r<this.P;++r)this.A.push(new Array(this.F));for(let r=0;r<n.length;++r)this.pushBack(n[r])}forEach(n){for(let r=0;r<this.i;++r)n(this.getElementByPos(r),r,this)}[Symbol.iterator](){return(function*(){for(let n=0;n<this.i;++n)yield this.getElementByPos(n)}).bind(this)()}},e=t;l.default=e}),hc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.TreeNodeEnableIndex=l.TreeNode=void 0;var u=class{constructor(i,a){this.ee=1,this.u=void 0,this.l=void 0,this.U=void 0,this.W=void 0,this.tt=void 0,this.u=i,this.l=a}L(){let i=this;if(i.ee===1&&i.tt.tt===i)i=i.W;else if(i.U)for(i=i.U;i.W;)i=i.W;else{let a=i.tt;for(;a.U===i;)i=a,a=i.tt;i=a}return i}B(){let i=this;if(i.W){for(i=i.W;i.U;)i=i.U;return i}else{let a=i.tt;for(;a.W===i;)i=a,a=i.tt;return i.W!==a?a:i}}te(){let i=this.tt,a=this.W,t=a.U;return i.tt===this?i.tt=a:i.U===this?i.U=a:i.W=a,a.tt=i,a.U=this,this.tt=a,this.W=t,t&&(t.tt=this),a}se(){let i=this.tt,a=this.U,t=a.W;return i.tt===this?i.tt=a:i.U===this?i.U=a:i.W=a,a.tt=i,a.W=this,this.tt=a,this.U=t,t&&(t.tt=this),a}};l.TreeNode=u;var s=class extends u{constructor(){super(...arguments),this.rt=1}te(){let i=super.te();return this.ie(),i.ie(),i}se(){let i=super.se();return this.ie(),i.ie(),i}ie(){this.rt=1,this.U&&(this.rt+=this.U.rt),this.W&&(this.rt+=this.W.rt)}};l.TreeNodeEnableIndex=s}),us=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.default=void 0;var u=hc(),s=ct(),i=ft(),a=class extends s.Container{constructor(e=function(r,o){return r<o?-1:r>o?1:0},n=!1){super(),this.Y=void 0,this.v=e,n?(this.re=u.TreeNodeEnableIndex,this.M=function(r,o,c){let p=this.ne(r,o,c);if(p){let g=p.tt;for(;g!==this.h;)g.rt+=1,g=g.tt;let y=this.he(p);if(y){let{parentNode:h,grandParent:m,curNode:A}=y;h.ie(),m.ie(),A.ie()}}return this.i},this.V=function(r){let o=this.fe(r);for(;o!==this.h;)o.rt-=1,o=o.tt}):(this.re=u.TreeNode,this.M=function(r,o,c){let p=this.ne(r,o,c);return p&&this.he(p),this.i},this.V=this.fe),this.h=new this.re}X(e,n){let r=this.h;for(;e;){let o=this.v(e.u,n);if(o<0)e=e.W;else if(o>0)r=e,e=e.U;else return e}return r}Z(e,n){let r=this.h;for(;e;)this.v(e.u,n)<=0?e=e.W:(r=e,e=e.U);return r}$(e,n){let r=this.h;for(;e;){let o=this.v(e.u,n);if(o<0)r=e,e=e.W;else if(o>0)e=e.U;else return e}return r}rr(e,n){let r=this.h;for(;e;)this.v(e.u,n)<0?(r=e,e=e.W):e=e.U;return r}ue(e){for(;;){let n=e.tt;if(n===this.h)return;if(e.ee===1){e.ee=0;return}if(e===n.U){let r=n.W;if(r.ee===1)r.ee=0,n.ee=1,n===this.Y?this.Y=n.te():n.te();else if(r.W&&r.W.ee===1){r.ee=n.ee,n.ee=0,r.W.ee=0,n===this.Y?this.Y=n.te():n.te();return}else r.U&&r.U.ee===1?(r.ee=1,r.U.ee=0,r.se()):(r.ee=1,e=n)}else{let r=n.U;if(r.ee===1)r.ee=0,n.ee=1,n===this.Y?this.Y=n.se():n.se();else if(r.U&&r.U.ee===1){r.ee=n.ee,n.ee=0,r.U.ee=0,n===this.Y?this.Y=n.se():n.se();return}else r.W&&r.W.ee===1?(r.ee=1,r.W.ee=0,r.te()):(r.ee=1,e=n)}}}fe(e){if(this.i===1)return this.clear(),this.h;let n=e;for(;n.U||n.W;){if(n.W)for(n=n.W;n.U;)n=n.U;else n=n.U;[e.u,n.u]=[n.u,e.u],[e.l,n.l]=[n.l,e.l],e=n}this.h.U===n?this.h.U=n.tt:this.h.W===n&&(this.h.W=n.tt),this.ue(n);let r=n.tt;return n===r.U?r.U=void 0:r.W=void 0,this.i-=1,this.Y.ee=0,r}oe(e,n){return e===void 0?!1:this.oe(e.U,n)||n(e)?!0:this.oe(e.W,n)}he(e){for(;;){let n=e.tt;if(n.ee===0)return;let r=n.tt;if(n===r.U){let o=r.W;if(o&&o.ee===1){if(o.ee=n.ee=0,r===this.Y)return;r.ee=1,e=r;continue}else if(e===n.W){if(e.ee=0,e.U&&(e.U.tt=n),e.W&&(e.W.tt=r),n.W=e.U,r.U=e.W,e.U=n,e.W=r,r===this.Y)this.Y=e,this.h.tt=e;else{let c=r.tt;c.U===r?c.U=e:c.W=e}return e.tt=r.tt,n.tt=e,r.tt=e,r.ee=1,{parentNode:n,grandParent:r,curNode:e}}else n.ee=0,r===this.Y?this.Y=r.se():r.se(),r.ee=1}else{let o=r.U;if(o&&o.ee===1){if(o.ee=n.ee=0,r===this.Y)return;r.ee=1,e=r;continue}else if(e===n.U){if(e.ee=0,e.U&&(e.U.tt=r),e.W&&(e.W.tt=n),r.W=e.U,n.U=e.W,e.U=r,e.W=n,r===this.Y)this.Y=e,this.h.tt=e;else{let c=r.tt;c.U===r?c.U=e:c.W=e}return e.tt=r.tt,n.tt=e,r.tt=e,r.ee=1,{parentNode:n,grandParent:r,curNode:e}}else n.ee=0,r===this.Y?this.Y=r.te():r.te(),r.ee=1}return}}ne(e,n,r){if(this.Y===void 0){this.i+=1,this.Y=new this.re(e,n),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,this.h.W=this.Y;return}let o,c=this.h.U,p=this.v(c.u,e);if(p===0){c.l=n;return}else if(p>0)c.U=new this.re(e,n),c.U.tt=c,o=c.U,this.h.U=o;else{let g=this.h.W,y=this.v(g.u,e);if(y===0){g.l=n;return}else if(y<0)g.W=new this.re(e,n),g.W.tt=g,o=g.W,this.h.W=o;else{if(r!==void 0){let h=r.o;if(h!==this.h){let m=this.v(h.u,e);if(m===0){h.l=n;return}else if(m>0){let A=h.L(),_=this.v(A.u,e);if(_===0){A.l=n;return}else _<0&&(o=new this.re(e,n),A.W===void 0?(A.W=o,o.tt=A):(h.U=o,o.tt=h))}}}if(o===void 0)for(o=this.Y;;){let h=this.v(o.u,e);if(h>0){if(o.U===void 0){o.U=new this.re(e,n),o.U.tt=o,o=o.U;break}o=o.U}else if(h<0){if(o.W===void 0){o.W=new this.re(e,n),o.W.tt=o,o=o.W;break}o=o.W}else{o.l=n;return}}}}return this.i+=1,o}I(e,n){for(;e;){let r=this.v(e.u,n);if(r<0)e=e.W;else if(r>0)e=e.U;else return e}return e||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0}updateKeyByIterator(e,n){let r=e.o;if(r===this.h&&(0,i.throwIteratorAccessError)(),this.i===1)return r.u=n,!0;if(r===this.h.U)return this.v(r.B().u,n)>0?(r.u=n,!0):!1;if(r===this.h.W)return this.v(r.L().u,n)<0?(r.u=n,!0):!1;let o=r.L().u;if(this.v(o,n)>=0)return!1;let c=r.B().u;return this.v(c,n)<=0?!1:(r.u=n,!0)}eraseElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let n=0,r=this;return this.oe(this.Y,function(o){return e===n?(r.V(o),!0):(n+=1,!1)}),this.i}eraseElementByKey(e){if(this.i===0)return!1;let n=this.I(this.Y,e);return n===this.h?!1:(this.V(n),!0)}eraseElementByIterator(e){let n=e.o;n===this.h&&(0,i.throwIteratorAccessError)();let r=n.W===void 0;return e.iteratorType===0?r&&e.next():(!r||n.U===void 0)&&e.next(),this.V(n),e}forEach(e){let n=0;for(let r of this)e(r,n++,this)}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let n,r=0;for(let o of this){if(r===e){n=o;break}r+=1}return n}getHeight(){if(this.i===0)return 0;let e=function(n){return n?Math.max(e(n.U),e(n.W))+1:0};return e(this.Y)}},t=a;l.default=t}),cs=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.default=void 0;var u=ct(),s=ft(),i=class extends u.ContainerIterator{constructor(t,e,n){super(n),this.o=t,this.h=e,this.iteratorType===0?(this.pre=function(){return this.o===this.h.U&&(0,s.throwIteratorAccessError)(),this.o=this.o.L(),this},this.next=function(){return this.o===this.h&&(0,s.throwIteratorAccessError)(),this.o=this.o.B(),this}):(this.pre=function(){return this.o===this.h.W&&(0,s.throwIteratorAccessError)(),this.o=this.o.B(),this},this.next=function(){return this.o===this.h&&(0,s.throwIteratorAccessError)(),this.o=this.o.L(),this})}get index(){let t=this.o,e=this.h.tt;if(t===this.h)return e?e.rt-1:0;let n=0;for(t.U&&(n+=t.U.rt);t!==e;){let r=t.tt;t===r.W&&(n+=1,r.U&&(n+=r.U.rt)),t=r}return n}},a=i;l.default=a}),dc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.default=void 0;var u=a(us()),s=a(cs()),i=ft();function a(r){return r&&r.t?r:{default:r}}var t=class pl extends s.default{constructor(o,c,p,g){super(o,c,g),this.container=p}get pointer(){return this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o.u}copy(){return new pl(this.o,this.h,this.container,this.iteratorType)}},e=class extends u.default{constructor(r=[],o,c){super(o,c);let p=this;r.forEach(function(g){p.insert(g)})}*K(r){r!==void 0&&(yield*this.K(r.U),yield r.u,yield*this.K(r.W))}begin(){return new t(this.h.U||this.h,this.h,this)}end(){return new t(this.h,this.h,this)}rBegin(){return new t(this.h.W||this.h,this.h,this,1)}rEnd(){return new t(this.h,this.h,this,1)}front(){return this.h.U?this.h.U.u:void 0}back(){return this.h.W?this.h.W.u:void 0}insert(r,o){return this.M(r,void 0,o)}find(r){let o=this.I(this.Y,r);return new t(o,this.h,this)}lowerBound(r){let o=this.X(this.Y,r);return new t(o,this.h,this)}upperBound(r){let o=this.Z(this.Y,r);return new t(o,this.h,this)}reverseLowerBound(r){let o=this.$(this.Y,r);return new t(o,this.h,this)}reverseUpperBound(r){let o=this.rr(this.Y,r);return new t(o,this.h,this)}union(r){let o=this;return r.forEach(function(c){o.insert(c)}),this.i}[Symbol.iterator](){return this.K(this.Y)}},n=e;l.default=n}),pc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.default=void 0;var u=a(us()),s=a(cs()),i=ft();function a(r){return r&&r.t?r:{default:r}}var t=class gl extends s.default{constructor(o,c,p,g){super(o,c,g),this.container=p}get pointer(){this.o===this.h&&(0,i.throwIteratorAccessError)();let o=this;return new Proxy([],{get(c,p){if(p==="0")return o.o.u;if(p==="1")return o.o.l},set(c,p,g){if(p!=="1")throw new TypeError("props must be 1");return o.o.l=g,!0}})}copy(){return new gl(this.o,this.h,this.container,this.iteratorType)}},e=class extends u.default{constructor(r=[],o,c){super(o,c);let p=this;r.forEach(function(g){p.setElement(g[0],g[1])})}*K(r){r!==void 0&&(yield*this.K(r.U),yield[r.u,r.l],yield*this.K(r.W))}begin(){return new t(this.h.U||this.h,this.h,this)}end(){return new t(this.h,this.h,this)}rBegin(){return new t(this.h.W||this.h,this.h,this,1)}rEnd(){return new t(this.h,this.h,this,1)}front(){if(this.i===0)return;let r=this.h.U;return[r.u,r.l]}back(){if(this.i===0)return;let r=this.h.W;return[r.u,r.l]}lowerBound(r){let o=this.X(this.Y,r);return new t(o,this.h,this)}upperBound(r){let o=this.Z(this.Y,r);return new t(o,this.h,this)}reverseLowerBound(r){let o=this.$(this.Y,r);return new t(o,this.h,this)}reverseUpperBound(r){let o=this.rr(this.Y,r);return new t(o,this.h,this)}setElement(r,o,c){return this.M(r,o,c)}find(r){let o=this.I(this.Y,r);return new t(o,this.h,this)}getElementByKey(r){return this.I(this.Y,r).l}union(r){let o=this;return r.forEach(function(c){o.setElement(c[0],c[1])}),this.i}[Symbol.iterator](){return this.K(this.Y)}},n=e;l.default=n}),fs=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.default=u;function u(s){let i=typeof s;return i==="object"&&s!==null||i==="function"}}),hs=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.HashContainerIterator=l.HashContainer=void 0;var u=ct(),s=a(fs()),i=ft();function a(n){return n&&n.t?n:{default:n}}var t=class extends u.ContainerIterator{constructor(n,r,o){super(o),this.o=n,this.h=r,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.L,this})}};l.HashContainerIterator=t;var e=class extends u.Container{constructor(){super(),this.H=[],this.g={},this.HASH_TAG=Symbol("@@HASH_TAG"),Object.setPrototypeOf(this.g,null),this.h={},this.h.L=this.h.B=this.p=this._=this.h}V(n){let{L:r,B:o}=n;r.B=o,o.L=r,n===this.p&&(this.p=o),n===this._&&(this._=r),this.i-=1}M(n,r,o){o===void 0&&(o=(0,s.default)(n));let c;if(o){let p=n[this.HASH_TAG];if(p!==void 0)return this.H[p].l=r,this.i;Object.defineProperty(n,this.HASH_TAG,{value:this.H.length,configurable:!0}),c={u:n,l:r,L:this._,B:this.h},this.H.push(c)}else{let p=this.g[n];if(p)return p.l=r,this.i;c={u:n,l:r,L:this._,B:this.h},this.g[n]=c}return this.i===0?(this.p=c,this.h.B=c):this._.B=c,this._=c,this.h.L=c,++this.i}I(n,r){if(r===void 0&&(r=(0,s.default)(n)),r){let o=n[this.HASH_TAG];return o===void 0?this.h:this.H[o]}else return this.g[n]||this.h}clear(){let n=this.HASH_TAG;this.H.forEach(function(r){delete r.u[n]}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h}eraseElementByKey(n,r){let o;if(r===void 0&&(r=(0,s.default)(n)),r){let c=n[this.HASH_TAG];if(c===void 0)return!1;delete n[this.HASH_TAG],o=this.H[c],delete this.H[c]}else{if(o=this.g[n],o===void 0)return!1;delete this.g[n]}return this.V(o),!0}eraseElementByIterator(n){let r=n.o;return r===this.h&&(0,i.throwIteratorAccessError)(),this.V(r),n.next()}eraseElementByPos(n){if(n<0||n>this.i-1)throw new RangeError;let r=this.p;for(;n--;)r=r.B;return this.V(r),this.i}};l.HashContainer=e}),gc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.default=void 0;var u=hs(),s=ft(),i=class ml extends u.HashContainerIterator{constructor(n,r,o,c){super(n,r,c),this.container=o}get pointer(){return this.o===this.h&&(0,s.throwIteratorAccessError)(),this.o.u}copy(){return new ml(this.o,this.h,this.container,this.iteratorType)}},a=class extends u.HashContainer{constructor(e=[]){super();let n=this;e.forEach(function(r){n.insert(r)})}begin(){return new i(this.p,this.h,this)}end(){return new i(this.h,this.h,this)}rBegin(){return new i(this._,this.h,this,1)}rEnd(){return new i(this.h,this.h,this,1)}front(){return this.p.u}back(){return this._.u}insert(e,n){return this.M(e,void 0,n)}getElementByPos(e){if(e<0||e>this.i-1)throw new RangeError;let n=this.p;for(;e--;)n=n.B;return n.u}find(e,n){let r=this.I(e,n);return new i(r,this.h,this)}forEach(e){let n=0,r=this.p;for(;r!==this.h;)e(r.u,n++,this),r=r.B}[Symbol.iterator](){return(function*(){let e=this.p;for(;e!==this.h;)yield e.u,e=e.B}).bind(this)()}},t=a;l.default=t}),mc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),l.default=void 0;var u=hs(),s=a(fs()),i=ft();function a(r){return r&&r.t?r:{default:r}}var t=class Al extends u.HashContainerIterator{constructor(o,c,p,g){super(o,c,g),this.container=p}get pointer(){this.o===this.h&&(0,i.throwIteratorAccessError)();let o=this;return new Proxy([],{get(c,p){if(p==="0")return o.o.u;if(p==="1")return o.o.l},set(c,p,g){if(p!=="1")throw new TypeError("props must be 1");return o.o.l=g,!0}})}copy(){return new Al(this.o,this.h,this.container,this.iteratorType)}},e=class extends u.HashContainer{constructor(r=[]){super();let o=this;r.forEach(function(c){o.setElement(c[0],c[1])})}begin(){return new t(this.p,this.h,this)}end(){return new t(this.h,this.h,this)}rBegin(){return new t(this._,this.h,this,1)}rEnd(){return new t(this.h,this.h,this,1)}front(){if(this.i!==0)return[this.p.u,this.p.l]}back(){if(this.i!==0)return[this._.u,this._.l]}setElement(r,o,c){return this.M(r,o,c)}getElementByKey(r,o){if(o===void 0&&(o=(0,s.default)(r)),o){let p=r[this.HASH_TAG];return p!==void 0?this.H[p].l:void 0}let c=this.g[r];return c?c.l:void 0}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let o=this.p;for(;r--;)o=o.B;return[o.u,o.l]}find(r,o){let c=this.I(r,o);return new t(c,this.h,this)}forEach(r){let o=0,c=this.p;for(;c!==this.h;)r([c.u,c.l],o++,this),c=c.B}[Symbol.iterator](){return(function*(){let r=this.p;for(;r!==this.h;)yield[r.u,r.l],r=r.B}).bind(this)()}},n=e;l.default=n}),Ac=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"t",{value:!0}),Object.defineProperty(l,"Deque",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(l,"HashMap",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(l,"HashSet",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(l,"LinkList",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(l,"OrderedMap",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(l,"OrderedSet",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(l,"PriorityQueue",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(l,"Queue",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(l,"Stack",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(l,"Vector",{enumerable:!0,get:function(){return a.default}});var u=p(sc()),s=p(ac()),i=p(lc()),a=p(uc()),t=p(cc()),e=p(fc()),n=p(dc()),r=p(pc()),o=p(gc()),c=p(mc());function p(g){return g&&g.t?g:{default:g}}}),yc=ge((l,u)=>{ue(),fe(),ce();var s=Ac().OrderedSet,i=ut()("number-allocator:trace"),a=ut()("number-allocator:error");function t(n,r){this.low=n,this.high=r}t.prototype.equals=function(n){return this.low===n.low&&this.high===n.high},t.prototype.compare=function(n){return this.low<n.low&&this.high<n.low?-1:n.low<this.low&&n.high<this.low?1:0};function e(n,r){if(!(this instanceof e))return new e(n,r);this.min=n,this.max=r,this.ss=new s([],(o,c)=>o.compare(c)),i("Create"),this.clear()}e.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},e.prototype.alloc=function(){if(this.ss.size()===0)return i("alloc():empty"),null;let n=this.ss.begin(),r=n.pointer.low,o=n.pointer.high,c=r;return c+1<=o?this.ss.updateKeyByIterator(n,new t(r+1,o)):this.ss.eraseElementByPos(0),i("alloc():"+c),c},e.prototype.use=function(n){let r=new t(n,n),o=this.ss.lowerBound(r);if(!o.equals(this.ss.end())){let c=o.pointer.low,p=o.pointer.high;return o.pointer.equals(r)?(this.ss.eraseElementByIterator(o),i("use():"+n),!0):c>n?!1:c===n?(this.ss.updateKeyByIterator(o,new t(c+1,p)),i("use():"+n),!0):p===n?(this.ss.updateKeyByIterator(o,new t(c,p-1)),i("use():"+n),!0):(this.ss.updateKeyByIterator(o,new t(n+1,p)),this.ss.insert(new t(c,n-1)),i("use():"+n),!0)}return i("use():failed"),!1},e.prototype.free=function(n){if(n<this.min||n>this.max){a("free():"+n+" is out of range");return}let r=new t(n,n),o=this.ss.upperBound(r);if(o.equals(this.ss.end())){if(o.equals(this.ss.begin())){this.ss.insert(r);return}o.pre();let c=o.pointer.high;o.pointer.high+1===n?this.ss.updateKeyByIterator(o,new t(c,n)):this.ss.insert(r)}else if(o.equals(this.ss.begin()))if(n+1===o.pointer.low){let c=o.pointer.high;this.ss.updateKeyByIterator(o,new t(n,c))}else this.ss.insert(r);else{let c=o.pointer.low,p=o.pointer.high;o.pre();let g=o.pointer.low;o.pointer.high+1===n?n+1===c?(this.ss.eraseElementByIterator(o),this.ss.updateKeyByIterator(o,new t(g,p))):this.ss.updateKeyByIterator(o,new t(g,n)):n+1===c?(this.ss.eraseElementByIterator(o.next()),this.ss.insert(new t(n,p))):this.ss.insert(r)}i("free():"+n)},e.prototype.clear=function(){i("clear()"),this.ss.clear(),this.ss.insert(new t(this.min,this.max))},e.prototype.intervalCount=function(){return this.ss.size()},e.prototype.dump=function(){console.log("length:"+this.ss.size());for(let n of this.ss)console.log(n)},u.exports=e}),ds=ge((l,u)=>{ue(),fe(),ce();var s=yc();u.exports.NumberAllocator=s}),bc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0});var u=ic(),s=ds(),i=class{aliasToTopic;topicToAlias;max;numberAllocator;length;constructor(a){a>0&&(this.aliasToTopic=new u.LRUCache({max:a}),this.topicToAlias={},this.numberAllocator=new s.NumberAllocator(1,a),this.max=a,this.length=0)}put(a,t){if(t===0||t>this.max)return!1;let e=this.aliasToTopic.get(t);return e&&delete this.topicToAlias[e],this.aliasToTopic.set(t,a),this.topicToAlias[a]=t,this.numberAllocator.use(t),this.length=this.aliasToTopic.size,!0}getTopicByAlias(a){return this.aliasToTopic.get(a)}getAliasByTopic(a){let t=this.topicToAlias[a];return typeof t<"u"&&this.aliasToTopic.get(t),t}clear(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0}getLruAlias(){return this.numberAllocator.firstVacant()||[...this.aliasToTopic.keys()][this.aliasToTopic.size-1]}};l.default=i}),wc=ge(l=>{ue(),fe(),ce();var u=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l,"__esModule",{value:!0});var s=lr(),i=u(bc()),a=Dt(),t=(e,n)=>{e.log("_handleConnack");let{options:r}=e,o=r.protocolVersion===5?n.reasonCode:n.returnCode;if(clearTimeout(e.connackTimer),delete e.topicAliasSend,n.properties){if(n.properties.topicAliasMaximum){if(n.properties.topicAliasMaximum>65535){e.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}n.properties.topicAliasMaximum>0&&(e.topicAliasSend=new i.default(n.properties.topicAliasMaximum))}n.properties.serverKeepAlive&&r.keepalive&&(r.keepalive=n.properties.serverKeepAlive),n.properties.maximumPacketSize&&(r.properties||(r.properties={}),r.properties.maximumPacketSize=n.properties.maximumPacketSize)}if(o===0)e.reconnecting=!1,e._onConnect(n);else if(o>0){let c=new a.ErrorWithReasonCode(`Connection refused: ${s.ReasonCodes[o]}`,o);e.emit("error",c),e.options.reconnectOnConnackError&&e._cleanUp(!0)}};l.default=t}),vc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0});var u=(s,i,a)=>{s.log("handling pubrel packet");let t=typeof a<"u"?a:s.noop,{messageId:e}=i,n={cmd:"pubcomp",messageId:e};s.incomingStore.get(i,(r,o)=>{r?s._sendPacket(n,t):(s.emit("message",o.topic,o.payload,o),s.handleMessage(o,c=>{if(c)return t(c);s.incomingStore.del(o,s.noop),s._sendPacket(n,t)}))})};l.default=u}),_c=ge(l=>{ue(),fe(),ce();var u=l&&l.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(l,"__esModule",{value:!0});var s=u(rc()),i=u(oc()),a=u(wc()),t=u(lr()),e=u(vc()),n=(r,o,c)=>{let{options:p}=r;if(p.protocolVersion===5&&p.properties&&p.properties.maximumPacketSize&&p.properties.maximumPacketSize<o.length)return r.emit("error",new Error(`exceeding packets size ${o.cmd}`)),r.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),r;switch(r.log("_handlePacket :: emitting packetreceive"),r.emit("packetreceive",o),o.cmd){case"publish":(0,s.default)(r,o,c);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":r.reschedulePing(),(0,t.default)(r,o),c();break;case"pubrel":r.reschedulePing(),(0,e.default)(r,o,c);break;case"connack":(0,a.default)(r,o),c();break;case"auth":r.reschedulePing(),(0,i.default)(r,o),c();break;case"pingresp":r.log("_handlePacket :: received pingresp"),r.reschedulePing(!0),c();break;case"disconnect":r.emit("disconnect",o),c();break;default:r.log("_handlePacket :: unknown command"),c();break}};l.default=n}),ps=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0});var u=class{nextId;constructor(){this.nextId=Math.max(1,Math.floor(Math.random()*65535))}allocate(){let s=this.nextId++;return this.nextId===65536&&(this.nextId=1),s}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(s){return!0}deallocate(s){}clear(){}};l.default=u}),Ec=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0});var u=class{aliasToTopic;max;length;constructor(s){this.aliasToTopic={},this.max=s}put(s,i){return i===0||i>this.max?!1:(this.aliasToTopic[i]=s,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(s){return this.aliasToTopic[s]}clear(){this.aliasToTopic={}}};l.default=u}),Sc=ge(l=>{ue(),fe(),ce();var u=l&&l.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(l,"__esModule",{value:!0}),l.TypedEventEmitter=void 0;var s=u((St(),Be(gt))),i=Dt(),a=class{};l.TypedEventEmitter=a,(0,i.applyMixin)(a,s.default)}),ur=ge((l,u)=>{ue(),fe(),ce();function s(i){"@babel/helpers - typeof";return u.exports=s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},u.exports.__esModule=!0,u.exports.default=u.exports,s(i)}u.exports=s,u.exports.__esModule=!0,u.exports.default=u.exports}),xc=ge((l,u)=>{ue(),fe(),ce();var s=ur().default;function i(a,t){if(s(a)!="object"||!a)return a;var e=a[Symbol.toPrimitive];if(e!==void 0){var n=e.call(a,t||"default");if(s(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(a)}u.exports=i,u.exports.__esModule=!0,u.exports.default=u.exports}),Ic=ge((l,u)=>{ue(),fe(),ce();var s=ur().default,i=xc();function a(t){var e=i(t,"string");return s(e)=="symbol"?e:e+""}u.exports=a,u.exports.__esModule=!0,u.exports.default=u.exports}),Cc=ge((l,u)=>{ue(),fe(),ce();var s=Ic();function i(a,t,e){return(t=s(t))in a?Object.defineProperty(a,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):a[t]=e,a}u.exports=i,u.exports.__esModule=!0,u.exports.default=u.exports}),kc=ge((l,u)=>{ue(),fe(),ce();function s(i){if(Array.isArray(i))return i}u.exports=s,u.exports.__esModule=!0,u.exports.default=u.exports}),Tc=ge((l,u)=>{ue(),fe(),ce();function s(i,a){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var e,n,r,o,c=[],p=!0,g=!1;try{if(r=(t=t.call(i)).next,a===0){if(Object(t)!==t)return;p=!1}else for(;!(p=(e=r.call(t)).done)&&(c.push(e.value),c.length!==a);p=!0);}catch(y){g=!0,n=y}finally{try{if(!p&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(g)throw n}}return c}}u.exports=s,u.exports.__esModule=!0,u.exports.default=u.exports}),Oc=ge((l,u)=>{ue(),fe(),ce();function s(i,a){(a==null||a>i.length)&&(a=i.length);for(var t=0,e=Array(a);t<a;t++)e[t]=i[t];return e}u.exports=s,u.exports.__esModule=!0,u.exports.default=u.exports}),Pc=ge((l,u)=>{ue(),fe(),ce();var s=Oc();function i(a,t){if(a){if(typeof a=="string")return s(a,t);var e={}.toString.call(a).slice(8,-1);return e==="Object"&&a.constructor&&(e=a.constructor.name),e==="Map"||e==="Set"?Array.from(a):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?s(a,t):void 0}}u.exports=i,u.exports.__esModule=!0,u.exports.default=u.exports}),Bc=ge((l,u)=>{ue(),fe(),ce();function s(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}u.exports=s,u.exports.__esModule=!0,u.exports.default=u.exports}),Mc=ge((l,u)=>{ue(),fe(),ce();var s=kc(),i=Tc(),a=Pc(),t=Bc();function e(n,r){return s(n)||i(n,r)||a(n,r)||t()}u.exports=e,u.exports.__esModule=!0,u.exports.default=u.exports}),gs=ge((l,u)=>{ue(),fe(),ce(),(function(s,i){typeof l=="object"&&typeof u<"u"?i(l):typeof define=="function"&&define.amd?define(["exports"],i):(s=typeof globalThis<"u"?globalThis:s||self,i(s.fastUniqueNumbers={}))})(l,function(s){var i=function(y){return function(h){var m=y(h);return h.add(m),m}},a=function(y){return function(h,m){return y.set(h,m),m}},t=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,e=536870912,n=e*2,r=function(y,h){return function(m){var A=h.get(m),_=A===void 0?m.size:A<n?A+1:0;if(!m.has(_))return y(m,_);if(m.size<e){for(;m.has(_);)_=Math.floor(Math.random()*n);return y(m,_)}if(m.size>t)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;m.has(_);)_=Math.floor(Math.random()*t);return y(m,_)}},o=new WeakMap,c=a(o),p=r(c,o),g=i(p);s.addUniqueNumber=g,s.generateUniqueNumber=p})}),Rc=ge((l,u)=>{ue(),fe(),ce();function s(a,t,e,n,r,o,c){try{var p=a[o](c),g=p.value}catch(y){return void e(y)}p.done?t(g):Promise.resolve(g).then(n,r)}function i(a){return function(){var t=this,e=arguments;return new Promise(function(n,r){var o=a.apply(t,e);function c(g){s(o,n,r,c,p,"next",g)}function p(g){s(o,n,r,c,p,"throw",g)}c(void 0)})}}u.exports=i,u.exports.__esModule=!0,u.exports.default=u.exports}),ms=ge((l,u)=>{ue(),fe(),ce();function s(i,a){this.v=i,this.k=a}u.exports=s,u.exports.__esModule=!0,u.exports.default=u.exports}),As=ge((l,u)=>{ue(),fe(),ce();function s(i,a,t,e){var n=Object.defineProperty;try{n({},"",{})}catch{n=0}u.exports=s=function(r,o,c,p){function g(y,h){s(r,y,function(m){return this._invoke(y,h,m)})}o?n?n(r,o,{value:c,enumerable:!p,configurable:!p,writable:!p}):r[o]=c:(g("next",0),g("throw",1),g("return",2))},u.exports.__esModule=!0,u.exports.default=u.exports,s(i,a,t,e)}u.exports=s,u.exports.__esModule=!0,u.exports.default=u.exports}),ys=ge((l,u)=>{ue(),fe(),ce();var s=As();function i(){var a,t,e=typeof Symbol=="function"?Symbol:{},n=e.iterator||"@@iterator",r=e.toStringTag||"@@toStringTag";function o(_,d,v,S){var b=d&&d.prototype instanceof p?d:p,x=Object.create(b.prototype);return s(x,"_invoke",(function(E,C,M){var P,F,k,V=0,L=M||[],N=!1,le={p:0,n:0,v:a,a:J,f:J.bind(a,4),d:function(H,ne){return P=H,F=0,k=a,le.n=ne,c}};function J(H,ne){for(F=H,k=ne,t=0;!N&&V&&!W&&t<L.length;t++){var W,ee=L[t],B=le.p,Z=ee[2];H>3?(W=Z===ne)&&(k=ee[(F=ee[4])?5:(F=3,3)],ee[4]=ee[5]=a):ee[0]<=B&&((W=H<2&&B<ee[1])?(F=0,le.v=ne,le.n=ee[1]):B<Z&&(W=H<3||ee[0]>ne||ne>Z)&&(ee[4]=H,ee[5]=ne,le.n=Z,F=0))}if(W||H>1)return c;throw N=!0,ne}return function(H,ne,W){if(V>1)throw TypeError("Generator is already running");for(N&&ne===1&&J(ne,W),F=ne,k=W;(t=F<2?a:k)||!N;){P||(F?F<3?(F>1&&(le.n=-1),J(F,k)):le.n=k:le.v=k);try{if(V=2,P){if(F||(H="next"),t=P[H]){if(!(t=t.call(P,k)))throw TypeError("iterator result is not an object");if(!t.done)return t;k=t.value,F<2&&(F=0)}else F===1&&(t=P.return)&&t.call(P),F<2&&(k=TypeError("The iterator does not provide a '"+H+"' method"),F=1);P=a}else if((t=(N=le.n<0)?k:E.call(C,le))!==c)break}catch(ee){P=a,F=1,k=ee}finally{V=1}}return{value:t,done:N}}})(_,v,S),!0),x}var c={};function p(){}function g(){}function y(){}t=Object.getPrototypeOf;var h=[][n]?t(t([][n]())):(s(t={},n,function(){return this}),t),m=y.prototype=p.prototype=Object.create(h);function A(_){return Object.setPrototypeOf?Object.setPrototypeOf(_,y):(_.__proto__=y,s(_,r,"GeneratorFunction")),_.prototype=Object.create(m),_}return g.prototype=y,s(m,"constructor",y),s(y,"constructor",g),g.displayName="GeneratorFunction",s(y,r,"GeneratorFunction"),s(m),s(m,r,"Generator"),s(m,n,function(){return this}),s(m,"toString",function(){return"[object Generator]"}),(u.exports=i=function(){return{w:o,m:A}},u.exports.__esModule=!0,u.exports.default=u.exports)()}u.exports=i,u.exports.__esModule=!0,u.exports.default=u.exports}),bs=ge((l,u)=>{ue(),fe(),ce();var s=ms(),i=As();function a(t,e){function n(o,c,p,g){try{var y=t[o](c),h=y.value;return h instanceof s?e.resolve(h.v).then(function(m){n("next",m,p,g)},function(m){n("throw",m,p,g)}):e.resolve(h).then(function(m){y.value=m,p(y)},function(m){return n("throw",m,p,g)})}catch(m){g(m)}}var r;this.next||(i(a.prototype),i(a.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(o,c,p){function g(){return new e(function(y,h){n(o,p,y,h)})}return r=r?r.then(g,g):g()},!0)}u.exports=a,u.exports.__esModule=!0,u.exports.default=u.exports}),ws=ge((l,u)=>{ue(),fe(),ce();var s=ys(),i=bs();function a(t,e,n,r,o){return new i(s().w(t,e,n,r),o||Promise)}u.exports=a,u.exports.__esModule=!0,u.exports.default=u.exports}),Dc=ge((l,u)=>{ue(),fe(),ce();var s=ws();function i(a,t,e,n,r){var o=s(a,t,e,n,r);return o.next().then(function(c){return c.done?c.value:o.next()})}u.exports=i,u.exports.__esModule=!0,u.exports.default=u.exports}),Uc=ge((l,u)=>{ue(),fe(),ce();function s(i){var a=Object(i),t=[];for(var e in a)t.unshift(e);return function n(){for(;t.length;)if((e=t.pop())in a)return n.value=e,n.done=!1,n;return n.done=!0,n}}u.exports=s,u.exports.__esModule=!0,u.exports.default=u.exports}),Nc=ge((l,u)=>{ue(),fe(),ce();var s=ur().default;function i(a){if(a!=null){var t=a[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],e=0;if(t)return t.call(a);if(typeof a.next=="function")return a;if(!isNaN(a.length))return{next:function(){return a&&e>=a.length&&(a=void 0),{value:a&&a[e++],done:!a}}}}throw new TypeError(s(a)+" is not iterable")}u.exports=i,u.exports.__esModule=!0,u.exports.default=u.exports}),jc=ge((l,u)=>{ue(),fe(),ce();var s=ms(),i=ys(),a=Dc(),t=ws(),e=bs(),n=Uc(),r=Nc();function o(){var c=i(),p=c.m(o),g=(Object.getPrototypeOf?Object.getPrototypeOf(p):p.__proto__).constructor;function y(A){var _=typeof A=="function"&&A.constructor;return!!_&&(_===g||(_.displayName||_.name)==="GeneratorFunction")}var h={throw:1,return:2,break:3,continue:3};function m(A){var _,d;return function(v){_||(_={stop:function(){return d(v.a,2)},catch:function(){return v.v},abrupt:function(S,b){return d(v.a,h[S],b)},delegateYield:function(S,b,x){return _.resultName=b,d(v.d,r(S),x)},finish:function(S){return d(v.f,S)}},d=function(S,b,x){v.p=_.prev,v.n=_.next;try{return S(b,x)}finally{_.next=v.n}}),_.resultName&&(_[_.resultName]=v.v,_.resultName=void 0),_.sent=v.v,_.next=v.n;try{return A.call(this,_)}finally{v.p=_.prev,v.n=_.next}}}return(u.exports=o=function(){return{wrap:function(A,_,d,v){return c.w(m(A),_,d,v&&v.reverse())},isGeneratorFunction:y,mark:c.m,awrap:function(A,_){return new s(A,_)},AsyncIterator:e,async:function(A,_,d,v,S){return(y(_)?t:a)(m(A),_,d,v,S)},keys:n,values:r}},u.exports.__esModule=!0,u.exports.default=u.exports)()}u.exports=o,u.exports.__esModule=!0,u.exports.default=u.exports}),Fc=ge((l,u)=>{ue(),fe(),ce();var s=jc()();u.exports=s;try{regeneratorRuntime=s}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=s:Function("r","regeneratorRuntime = r")(s)}}),Lc=ge((l,u)=>{ue(),fe(),ce(),(function(s,i){typeof l=="object"&&typeof u<"u"?i(l,Cc(),Mc(),gs(),Rc(),Fc()):typeof define=="function"&&define.amd?define(["exports","@babel/runtime/helpers/defineProperty","@babel/runtime/helpers/slicedToArray","fast-unique-numbers","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/regenerator"],i):(s=typeof globalThis<"u"?globalThis:s||self,i(s.brokerFactory={},s._defineProperty,s._slicedToArray,s.fastUniqueNumbers,s._asyncToGenerator,s._regeneratorRuntime))})(l,function(s,i,a,t,e,n){var r=function(d){return typeof d.start=="function"},o=new WeakMap;function c(d,v){var S=Object.keys(d);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(d);v&&(b=b.filter(function(x){return Object.getOwnPropertyDescriptor(d,x).enumerable})),S.push.apply(S,b)}return S}function p(d){for(var v=1;v<arguments.length;v++){var S=arguments[v]!=null?arguments[v]:{};v%2?c(Object(S),!0).forEach(function(b){i(d,b,S[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(S)):c(Object(S)).forEach(function(b){Object.defineProperty(d,b,Object.getOwnPropertyDescriptor(S,b))})}return d}var g=function(d){return p(p({},d),{},{connect:function(v){var S=v.call;return e(n.mark(function b(){var x,E,C,M;return n.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return x=new MessageChannel,E=x.port1,C=x.port2,P.next=1,S("connect",{port:E},[E]);case 1:return M=P.sent,o.set(C,M),P.abrupt("return",C);case 2:case"end":return P.stop()}},b)}))},disconnect:function(v){var S=v.call;return(function(){var b=e(n.mark(function x(E){var C;return n.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(C=o.get(E),C!==void 0){M.next=1;break}throw new Error("The given port is not connected.");case 1:return M.next=2,S("disconnect",{portId:C});case 2:case"end":return M.stop()}},x)}));return function(x){return b.apply(this,arguments)}})()},isSupported:function(v){var S=v.call;return function(){return S("isSupported")}}})};function y(d,v){var S=Object.keys(d);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(d);v&&(b=b.filter(function(x){return Object.getOwnPropertyDescriptor(d,x).enumerable})),S.push.apply(S,b)}return S}function h(d){for(var v=1;v<arguments.length;v++){var S=arguments[v]!=null?arguments[v]:{};v%2?y(Object(S),!0).forEach(function(b){i(d,b,S[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(S)):y(Object(S)).forEach(function(b){Object.defineProperty(d,b,Object.getOwnPropertyDescriptor(S,b))})}return d}var m=new WeakMap,A=function(d){if(m.has(d))return m.get(d);var v=new Map;return m.set(d,v),v},_=function(d){var v=g(d);return function(S){var b=A(S);S.addEventListener("message",function(L){var N=L.data,le=N.id;if(le!==null&&b.has(le)){var J=b.get(le),H=J.reject,ne=J.resolve;b.delete(le),N.error===void 0?ne(N.result):H(new Error(N.error.message))}}),r(S)&&S.start();for(var x=function(L){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return new Promise(function(J,H){var ne=t.generateUniqueNumber(b);b.set(ne,{reject:H,resolve:J}),N===null?S.postMessage({id:ne,method:L},le):S.postMessage({id:ne,method:L,params:N},le)})},E=function(L,N){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];S.postMessage({id:null,method:L,params:N},le)},C={},M=0,P=Object.entries(v);M<P.length;M++){var F=a(P[M],2),k=F[0],V=F[1];C=h(h({},C),{},i({},k,V({call:x,notify:E})))}return h({},C)}};s.createBroker=_})}),Wc=ge((l,u)=>{ue(),fe(),ce(),(function(s,i){typeof l=="object"&&typeof u<"u"?i(l,ur(),Lc(),gs()):typeof define=="function"&&define.amd?define(["exports","@babel/runtime/helpers/typeof","broker-factory","fast-unique-numbers"],i):(s=typeof globalThis<"u"?globalThis:s||self,i(s.workerTimersBroker={},s._typeof,s.brokerFactory,s.fastUniqueNumbers))})(l,function(s,i,a,t){var e=new Map([[0,null]]),n=new Map([[0,null]]),r=a.createBroker({clearInterval:function(c){var p=c.call;return function(g){i(e.get(g))==="symbol"&&(e.set(g,null),p("clear",{timerId:g,timerType:"interval"}).then(function(){e.delete(g)}))}},clearTimeout:function(c){var p=c.call;return function(g){i(n.get(g))==="symbol"&&(n.set(g,null),p("clear",{timerId:g,timerType:"timeout"}).then(function(){n.delete(g)}))}},setInterval:function(c){var p=c.call;return function(g){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,h=arguments.length,m=new Array(h>2?h-2:0),A=2;A<h;A++)m[A-2]=arguments[A];var _=Symbol(),d=t.generateUniqueNumber(e);e.set(d,_);var v=function(){return p("set",{delay:y,now:performance.timeOrigin+performance.now(),timerId:d,timerType:"interval"}).then(function(){var S=e.get(d);if(S===void 0)throw new Error("The timer is in an undefined state.");S===_&&(g.apply(void 0,m),e.get(d)===_&&v())})};return v(),d}},setTimeout:function(c){var p=c.call;return function(g){for(var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,h=arguments.length,m=new Array(h>2?h-2:0),A=2;A<h;A++)m[A-2]=arguments[A];var _=Symbol(),d=t.generateUniqueNumber(n);return n.set(d,_),p("set",{delay:y,now:performance.timeOrigin+performance.now(),timerId:d,timerType:"timeout"}).then(function(){var v=n.get(d);if(v===void 0)throw new Error("The timer is in an undefined state.");v===_&&(n.delete(d),g.apply(void 0,m))}),d}}}),o=function(c){var p=new Worker(c);return r(p)};s.load=o,s.wrap=r})}),Kc=ge((l,u)=>{ue(),fe(),ce(),(function(s,i){typeof l=="object"&&typeof u<"u"?i(l,Wc()):typeof define=="function"&&define.amd?define(["exports","worker-timers-broker"],i):(s=typeof globalThis<"u"?globalThis:s||self,i(s.workerTimers={},s.workerTimersBroker))})(l,function(s,i){var a=function(p,g){var y=null;return function(){if(y!==null)return y;var h=new Blob([g],{type:"application/javascript; charset=utf-8"}),m=URL.createObjectURL(h);return y=p(m),setTimeout(function(){return URL.revokeObjectURL(m)}),y}},t=`(()=>{var e={45:(e,t,r)=>{var n=r(738).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},79:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},122:(e,t,r)=>{var n=r(79);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},156:e=>{e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,u,a,i=[],s=!0,c=!1;try{if(u=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=u.call(r)).done)&&(i.push(n.value),i.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}},e.exports.__esModule=!0,e.exports.default=e.exports},172:e=>{e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},293:e=>{function t(e,t,r,n,o,u,a){try{var i=e[u](a),s=i.value}catch(e){return void r(e)}i.done?t(s):Promise.resolve(s).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,u){var a=e.apply(r,n);function i(e){t(a,o,u,i,s,"next",e)}function s(e){t(a,o,u,i,s,"throw",e)}i(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},373:e=>{e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},389:function(e,t){!function(e){"use strict";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,u=2*o,a=function(e,t){return function(r){var a=t.get(r),i=void 0===a?r.size:a<u?a+1:0;if(!r.has(i))return e(r,i);if(r.size<o){for(;r.has(i);)i=Math.floor(Math.random()*u);return e(r,i)}if(r.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(i);)i=Math.floor(Math.random()*n);return e(r,i)}},i=new WeakMap,s=r(i),c=a(s,i),f=t(c);e.addUniqueNumber=f,e.generateUniqueNumber=c}(t)},472:function(e,t,r){!function(e,t,r,n){"use strict";var o=function(e,t){return function(r){var o=t.get(r);if(void 0===o)return Promise.resolve(!1);var u=n(o,2),a=u[0],i=u[1];return e(a),t.delete(r),i(!1),Promise.resolve(!0)}},u=function(e,t){var r=function(n,o,u,a){var i=n-e.now();i>0?o.set(a,[t(r,i,n,o,u,a),u]):(o.delete(a),u(!0))};return r},a=function(e,t,r,n){return function(o,u,a){var i=o+u-t.timeOrigin,s=i-t.now();return new Promise((function(t){e.set(a,[r(n,s,i,e,t,a),t])}))}},i=new Map,s=o(globalThis.clearTimeout,i),c=new Map,f=o(globalThis.clearTimeout,c),l=u(performance,globalThis.setTimeout),p=a(i,performance,globalThis.setTimeout,l),d=a(c,performance,globalThis.setTimeout,l);r.createWorker(self,{clear:function(){var r=e(t.mark((function e(r){var n,o,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.timerId,o=r.timerType,e.next=1,"interval"===o?s(n):f(n);case 1:return u=e.sent,e.abrupt("return",{result:u});case 2:case"end":return e.stop()}}),e)})));function n(e){return r.apply(this,arguments)}return n}(),set:function(){var r=e(t.mark((function e(r){var n,o,u,a,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.delay,o=r.now,u=r.timerId,a=r.timerType,e.next=1,("interval"===a?p:d)(n,o,u);case 1:return i=e.sent,e.abrupt("return",{result:i});case 2:case"end":return e.stop()}}),e)})));function n(e){return r.apply(this,arguments)}return n}()})}(r(293),r(756),r(623),r(715))},546:e=>{function t(r,n,o,u){var a=Object.defineProperty;try{a({},"",{})}catch(r){a=0}e.exports=t=function(e,r,n,o){if(r)a?a(e,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[r]=n;else{var u=function(r,n){t(e,r,(function(e){return this._invoke(r,n,e)}))};u("next",0),u("throw",1),u("return",2)}},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,o,u)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},579:(e,t,r)=>{var n=r(738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},623:function(e,t,r){!function(e,t,r,n,o){"use strict";var u={INTERNAL_ERROR:-32603,INVALID_PARAMS:-32602,METHOD_NOT_FOUND:-32601},a=function(e,t){return Object.assign(new Error(e),{status:t})},i=function(e){return a('The requested method called "'.concat(e,'" is not supported.'),u.METHOD_NOT_FOUND)},s=function(e){return a('The handler of the method called "'.concat(e,'" returned no required result.'),u.INTERNAL_ERROR)},c=function(e){return a('The handler of the method called "'.concat(e,'" returned an unexpected result.'),u.INTERNAL_ERROR)},f=function(e){return a('The specified parameter called "portId" with the given value "'.concat(e,'" does not identify a port connected to this worker.'),u.INVALID_PARAMS)},l=function(e,n){return function(){var o=t(r.mark((function t(o){var u,a,f,l,p,d,v,x,y,b,h,m,_,g,w;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=o.data,a=u.id,f=u.method,l=u.params,p=n[f],t.prev=1,void 0!==p){t.next=2;break}throw i(f);case 2:if(void 0!==(d=void 0===l?p():p(l))){t.next=3;break}throw s(f);case 3:if(!(d instanceof Promise)){t.next=5;break}return t.next=4,d;case 4:g=t.sent,t.next=6;break;case 5:g=d;case 6:if(v=g,null!==a){t.next=8;break}if(void 0===v.result){t.next=7;break}throw c(f);case 7:t.next=10;break;case 8:if(void 0!==v.result){t.next=9;break}throw c(f);case 9:x=v.result,y=v.transferables,b=void 0===y?[]:y,e.postMessage({id:a,result:x},b);case 10:t.next=12;break;case 11:t.prev=11,w=t.catch(1),h=w.message,m=w.status,_=void 0===m?-32603:m,e.postMessage({error:{code:_,message:h},id:a});case 12:case"end":return t.stop()}}),t,null,[[1,11]])})));return function(e){return o.apply(this,arguments)}}()},p=function(){return new Promise((function(e){var t=new ArrayBuffer(0),r=new MessageChannel,n=r.port1,o=r.port2;n.onmessage=function(t){var r=t.data;return e(null!==r)},o.postMessage(t,[t])}))};function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x=new Map,y=function(e,n,u){return v(v({},n),{},{connect:function(t){var r=t.port;r.start();var u=e(r,n),a=o.generateUniqueNumber(x);return x.set(a,(function(){u(),r.close(),x.delete(a)})),{result:a}},disconnect:function(e){var t=e.portId,r=x.get(t);if(void 0===r)throw f(t);return r(),{result:null}},isSupported:function(){var e=t(r.mark((function e(){var t,n,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,p();case 1:if(!e.sent){e.next=5;break}if(!((t=u())instanceof Promise)){e.next=3;break}return e.next=2,t;case 2:o=e.sent,e.next=4;break;case 3:o=t;case 4:return n=o,e.abrupt("return",{result:n});case 5:return e.abrupt("return",{result:!1});case 6:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},b=function(e,t){var r=y(b,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0}),n=l(e,r);return e.addEventListener("message",n),function(){return e.removeEventListener("message",n)}};e.createWorker=b,e.isSupported=p}(t,r(293),r(756),r(693),r(389))},633:(e,t,r)=>{var n=r(172),o=r(993),u=r(869),a=r(887),i=r(791),s=r(373),c=r(579);function f(){"use strict";var t=o(),r=t.m(f),l=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name))}var d={throw:1,return:2,break:3,continue:3};function v(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,d[e],t)},delegateYield:function(e,o,u){return t.resultName=o,r(n.d,c(e),u)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=f=function(){return{wrap:function(e,r,n,o){return t.w(v(e),r,n,o&&o.reverse())},isGeneratorFunction:p,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:i,async:function(e,t,r,n,o){return(p(t)?a:u)(v(e),t,r,n,o)},keys:s,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=f,e.exports.__esModule=!0,e.exports.default=e.exports},693:(e,t,r)=>{var n=r(736);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},715:(e,t,r)=>{var n=r(987),o=r(156),u=r(122),a=r(752);e.exports=function(e,t){return n(e)||o(e,t)||u(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},736:(e,t,r)=>{var n=r(738).default,o=r(45);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},752:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},756:(e,t,r)=>{var n=r(633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},791:(e,t,r)=>{var n=r(172),o=r(546);e.exports=function e(t,r){function u(e,o,a,i){try{var s=t[e](o),c=s.value;return c instanceof n?r.resolve(c.v).then((function(e){u("next",e,a,i)}),(function(e){u("throw",e,a,i)})):r.resolve(c).then((function(e){s.value=e,a(s)}),(function(e){return u("throw",e,a,i)}))}catch(e){i(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),o(this,"_invoke",(function(e,t,n){function o(){return new r((function(t,r){u(e,n,t,r)}))}return a=a?a.then(o,o):o()}),!0)},e.exports.__esModule=!0,e.exports.default=e.exports},869:(e,t,r)=>{var n=r(887);e.exports=function(e,t,r,o,u){var a=n(e,t,r,o,u);return a.next().then((function(e){return e.done?e.value:a.next()}))},e.exports.__esModule=!0,e.exports.default=e.exports},887:(e,t,r)=>{var n=r(993),o=r(791);e.exports=function(e,t,r,u,a){return new o(n().w(e,t,r,u),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},987:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},993:(e,t,r)=>{var n=r(546);function o(){var t,r,u="function"==typeof Symbol?Symbol:{},a=u.iterator||"@@iterator",i=u.toStringTag||"@@toStringTag";function s(e,o,u,a){var i=o&&o.prototype instanceof f?o:f,s=Object.create(i.prototype);return n(s,"_invoke",function(e,n,o){var u,a,i,s=0,f=o||[],l=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return u=e,a=0,i=t,p.n=r,c}};function d(e,n){for(a=e,i=n,r=0;!l&&s&&!o&&r<f.length;r++){var o,u=f[r],d=p.p,v=u[2];e>3?(o=v===n)&&(i=u[(a=u[4])?5:(a=3,3)],u[4]=u[5]=t):u[0]<=d&&((o=e<2&&d<u[1])?(a=0,p.v=n,p.n=u[1]):d<v&&(o=e<3||u[0]>n||n>v)&&(u[4]=e,u[5]=n,p.n=v,a=0))}if(o||e>1)return c;throw l=!0,n}return function(o,f,v){if(s>1)throw TypeError("Generator is already running");for(l&&1===f&&d(f,v),a=f,i=v;(r=a<2?t:i)||!l;){u||(a?a<3?(a>1&&(p.n=-1),d(a,i)):p.n=i:p.v=i);try{if(s=2,u){if(a||(o="next"),r=u[o]){if(!(r=r.call(u,i)))throw TypeError("iterator result is not an object");if(!r.done)return r;i=r.value,a<2&&(a=0)}else 1===a&&(r=u.return)&&r.call(u),a<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),a=1);u=t}else if((r=(l=p.n<0)?i:e.call(n,p))!==c)break}catch(e){u=t,a=1,i=e}finally{s=1}}return{value:r,done:l}}}(e,u,a),!0),s}var c={};function f(){}function l(){}function p(){}r=Object.getPrototypeOf;var d=[][a]?r(r([][a]())):(n(r={},a,(function(){return this})),r),v=p.prototype=f.prototype=Object.create(d);function x(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,n(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e}return l.prototype=p,n(v,"constructor",p),n(p,"constructor",l),l.displayName="GeneratorFunction",n(p,i,"GeneratorFunction"),n(v),n(v,i,"Generator"),n(v,a,(function(){return this})),n(v,"toString",(function(){return"[object Generator]"})),(e.exports=o=function(){return{w:s,m:x}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var u=t[n]={exports:{}};return e[n].call(u.exports,u,u.exports,r),u.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";r(472)})()})();`,e=a(i.load,t),n=function(p){return e().clearInterval(p)},r=function(p){return e().clearTimeout(p)},o=function(){var p;return(p=e()).setInterval.apply(p,arguments)},c=function(){var p;return(p=e()).setTimeout.apply(p,arguments)};s.clearInterval=n,s.clearTimeout=r,s.setInterval=o,s.setTimeout=c})}),cr=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0}),l.isReactNativeBrowser=l.isWebWorker=void 0;var u=()=>typeof window<"u"?typeof navigator<"u"&&navigator.userAgent?.toLowerCase().indexOf(" electron/")>-1&&Me?.versions?!Object.prototype.hasOwnProperty.call(Me.versions,"electron"):typeof window.document<"u":!1,s=()=>!!(typeof self=="object"&&self?.constructor?.name?.includes("WorkerGlobalScope")&&typeof Deno>"u"),i=()=>typeof navigator<"u"&&navigator.product==="ReactNative",a=u()||s()||i();l.isWebWorker=s(),l.isReactNativeBrowser=i(),l.default=a}),Vc=ge(l=>{ue(),fe(),ce();var u=l&&l.__createBinding||(Object.create?function(o,c,p,g){g===void 0&&(g=p);var y=Object.getOwnPropertyDescriptor(c,p);(!y||("get"in y?!c.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return c[p]}}),Object.defineProperty(o,g,y)}:function(o,c,p,g){g===void 0&&(g=p),o[g]=c[p]}),s=l&&l.__setModuleDefault||(Object.create?function(o,c){Object.defineProperty(o,"default",{enumerable:!0,value:c})}:function(o,c){o.default=c}),i=l&&l.__importStar||(function(){var o=function(c){return o=Object.getOwnPropertyNames||function(p){var g=[];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(g[g.length]=y);return g},o(c)};return function(c){if(c&&c.__esModule)return c;var p={};if(c!=null)for(var g=o(c),y=0;y<g.length;y++)g[y]!=="default"&&u(p,c,g[y]);return s(p,c),p}})();Object.defineProperty(l,"__esModule",{value:!0});var a=Kc(),t=i(cr()),e={set:a.setInterval,clear:a.clearInterval},n={set:(o,c)=>setInterval(o,c),clear:o=>clearInterval(o)},r=o=>{switch(o){case"native":return n;case"worker":return e;default:return t.default&&!t.isWebWorker&&!t.isReactNativeBrowser?e:n}};l.default=r}),vs=ge(l=>{ue(),fe(),ce();var u=l&&l.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(l,"__esModule",{value:!0});var s=u(Vc()),i=class{_keepalive;timerId;timer;destroyed=!1;counter;client;_keepaliveTimeoutTimestamp;_intervalEvery;get keepaliveTimeoutTimestamp(){return this._keepaliveTimeoutTimestamp}get intervalEvery(){return this._intervalEvery}get keepalive(){return this._keepalive}constructor(a,t){this.client=a,this.timer=typeof t=="object"&&"set"in t&&"clear"in t?t:(0,s.default)(t),this.setKeepalive(a.options.keepalive)}clear(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null)}setKeepalive(a){if(a*=1e3,isNaN(a)||a<=0||a>2147483647)throw new Error(`Keepalive value must be an integer between 0 and 2147483647. Provided value is ${a}`);this._keepalive=a,this.reschedule(),this.client.log(`KeepaliveManager: set keepalive to ${a}ms`)}destroy(){this.clear(),this.destroyed=!0}reschedule(){if(this.destroyed)return;this.clear(),this.counter=0;let a=Math.ceil(this._keepalive*1.5);this._keepaliveTimeoutTimestamp=Date.now()+a,this._intervalEvery=Math.ceil(this._keepalive/2),this.timerId=this.timer.set(()=>{this.destroyed||(this.counter+=1,this.counter===2?this.client.sendPing():this.counter>2&&this.client.onKeepaliveTimeout())},this._intervalEvery)}};l.default=i}),co=ge(l=>{ue(),fe(),ce();var u=l&&l.__createBinding||(Object.create?function(b,x,E,C){C===void 0&&(C=E);var M=Object.getOwnPropertyDescriptor(x,E);(!M||("get"in M?!x.__esModule:M.writable||M.configurable))&&(M={enumerable:!0,get:function(){return x[E]}}),Object.defineProperty(b,C,M)}:function(b,x,E,C){C===void 0&&(C=E),b[C]=x[E]}),s=l&&l.__setModuleDefault||(Object.create?function(b,x){Object.defineProperty(b,"default",{enumerable:!0,value:x})}:function(b,x){b.default=x}),i=l&&l.__importStar||(function(){var b=function(x){return b=Object.getOwnPropertyNames||function(E){var C=[];for(var M in E)Object.prototype.hasOwnProperty.call(E,M)&&(C[C.length]=M);return C},b(x)};return function(x){if(x&&x.__esModule)return x;var E={};if(x!=null)for(var C=b(x),M=0;M<C.length;M++)C[M]!=="default"&&u(E,x,C[M]);return s(E,x),E}})(),a=l&&l.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(l,"__esModule",{value:!0});var t=a(Zu()),e=It(),n=a(ec()),r=a(ut()),o=i(tc()),c=a(as()),p=a(_c()),g=a(ps()),y=a(Ec()),h=Dt(),m=Sc(),A=a(vs()),_=i(cr()),d=globalThis.setImmediate||((...b)=>{let x=b.shift();(0,h.nextTick)(()=>{x(...b)})}),v={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,subscribeBatchSize:null,writeCache:!0,timerVariant:"auto"},S=class li extends m.TypedEventEmitter{static VERSION=h.MQTTJS_VERSION;connected;disconnecting;disconnected;reconnecting;incomingStore;outgoingStore;options;queueQoSZero;_reconnectCount;log;messageIdProvider;outgoing;messageIdToTopic;noop;keepaliveManager;stream;queue;streamBuilder;_resubscribeTopics;connackTimer;reconnectTimer;_storeProcessing;_packetIdsDuringStoreProcessing;_storeProcessingQueue;_firstConnection;topicAliasRecv;topicAliasSend;_deferredReconnect;connackPacket;static defaultId(){return`mqttjs_${Math.random().toString(16).substr(2,8)}`}constructor(x,E){super(),this.options=E||{};for(let C in v)typeof this.options[C]>"u"?this.options[C]=v[C]:this.options[C]=E[C];this.log=this.options.log||(0,r.default)("mqttjs:client"),this.noop=this._noop.bind(this),this.log("MqttClient :: version:",li.VERSION),_.isWebWorker?this.log("MqttClient :: environment","webworker"):this.log("MqttClient :: environment",_.default?"browser":"node"),this.log("MqttClient :: options.protocol",E.protocol),this.log("MqttClient :: options.protocolVersion",E.protocolVersion),this.log("MqttClient :: options.username",E.username),this.log("MqttClient :: options.keepalive",E.keepalive),this.log("MqttClient :: options.reconnectPeriod",E.reconnectPeriod),this.log("MqttClient :: options.rejectUnauthorized",E.rejectUnauthorized),this.log("MqttClient :: options.properties.topicAliasMaximum",E.properties?E.properties.topicAliasMaximum:void 0),this.options.clientId=typeof E.clientId=="string"?E.clientId:li.defaultId(),this.log("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=E.protocolVersion===5&&E.customHandleAcks?E.customHandleAcks:(...C)=>{C[3](null,0)},this.options.writeCache||(t.default.writeToStream.cacheNumbers=!1),this.streamBuilder=x,this.messageIdProvider=typeof this.options.messageIdProvider>"u"?new g.default:this.options.messageIdProvider,this.outgoingStore=E.outgoingStore||new c.default,this.incomingStore=E.incomingStore||new c.default,this.queueQoSZero=E.queueQoSZero===void 0?!0:E.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.keepaliveManager=null,this.connected=!1,this.disconnecting=!1,this.reconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,E.properties&&E.properties.topicAliasMaximum>0&&(E.properties.topicAliasMaximum>65535?this.log("MqttClient :: options.properties.topicAliasMaximum is out of range"):this.topicAliasRecv=new y.default(E.properties.topicAliasMaximum)),this.on("connect",()=>{let{queue:C}=this,M=()=>{let P=C.shift();this.log("deliver :: entry %o",P);let F=null;if(!P){this._resubscribe();return}F=P.packet,this.log("deliver :: call _sendPacket for %o",F);let k=!0;F.messageId&&F.messageId!==0&&(this.messageIdProvider.register(F.messageId)||(k=!1)),k?this._sendPacket(F,V=>{P.cb&&P.cb(V),M()}):(this.log("messageId: %d has already used. The message is skipped and removed.",F.messageId),M())};this.log("connect :: sending queued packets"),M()}),this.on("close",()=>{this.log("close :: connected set to `false`"),this.connected=!1,this.log("close :: clearing connackTimer"),clearTimeout(this.connackTimer),this._destroyKeepaliveManager(),this.topicAliasRecv&&this.topicAliasRecv.clear(),this.log("close :: calling _setupReconnect"),this._setupReconnect()}),this.options.manualConnect||(this.log("MqttClient :: setting up stream"),this.connect())}handleAuth(x,E){E()}handleMessage(x,E){E()}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){let x=new e.Writable,E=t.default.parser(this.options),C=null,M=[];this.log("connect :: calling method to clear reconnect"),this._clearReconnect(),this.disconnected&&!this.reconnecting&&(this.incomingStore=this.options.incomingStore||new c.default,this.outgoingStore=this.options.outgoingStore||new c.default,this.disconnecting=!1,this.disconnected=!1),this.log("connect :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),E.on("packet",L=>{this.log("parser :: on packet push to packets array."),M.push(L)});let P=()=>{this.log("work :: getting next packet in queue");let L=M.shift();if(L)this.log("work :: packet pulled from queue"),(0,p.default)(this,L,F);else{this.log("work :: no packets in queue");let N=C;C=null,this.log("work :: done flag is %s",!!N),N&&N()}},F=()=>{if(M.length)(0,h.nextTick)(P);else{let L=C;C=null,L()}};x._write=(L,N,le)=>{C=le,this.log("writable stream :: parsing buffer"),E.parse(L),P()};let k=L=>{this.log("streamErrorHandler :: error",L.message),L.code?(this.log("streamErrorHandler :: emitting error"),this.emit("error",L)):this.noop(L)};this.log("connect :: pipe stream to writable stream"),this.stream.pipe(x),this.stream.on("error",k),this.stream.on("close",()=>{this.log("(%s)stream :: on close",this.options.clientId),this._flushVolatile(),this.log("stream: emit close to MqttClient"),this.emit("close")}),this.log("connect: sending packet `connect`");let V={cmd:"connect",protocolId:this.options.protocolId,protocolVersion:this.options.protocolVersion,clean:this.options.clean,clientId:this.options.clientId,keepalive:this.options.keepalive,username:this.options.username,password:this.options.password,properties:this.options.properties};if(this.options.will&&(V.will={...this.options.will,payload:this.options.will?.payload}),this.topicAliasRecv&&(V.properties||(V.properties={}),this.topicAliasRecv&&(V.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(V),E.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"){let L={cmd:"auth",reasonCode:0,...this.options.authPacket};this._writePacket(L)}}return this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(()=>{this.log("!!connectTimeout hit!! Calling _cleanUp with force `true`"),this.emit("error",new Error("connack timeout")),this._cleanUp(!0)},this.options.connectTimeout),this}publish(x,E,C,M){this.log("publish :: message `%s` to topic `%s`",E,x);let{options:P}=this;typeof C=="function"&&(M=C,C=null),C=C||{},C={qos:0,retain:!1,dup:!1,...C};let{qos:F,retain:k,dup:V,properties:L,cbStorePut:N}=C;if(this._checkDisconnecting(M))return this;let le=()=>{let J=0;if((F===1||F===2)&&(J=this._nextId(),J===null))return this.log("No messageId left"),!1;let H={cmd:"publish",topic:x,payload:E,qos:F,retain:k,messageId:J,dup:V};switch(P.protocolVersion===5&&(H.properties=L),this.log("publish :: qos",F),F){case 1:case 2:this.outgoing[H.messageId]={volatile:!1,cb:M||this.noop},this.log("MqttClient:publish: packet cmd: %s",H.cmd),this._sendPacket(H,void 0,N);break;default:this.log("MqttClient:publish: packet cmd: %s",H.cmd),this._sendPacket(H,M,N);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!le())&&this._storeProcessingQueue.push({invoke:le,cbStorePut:C.cbStorePut,callback:M}),this}publishAsync(x,E,C){return new Promise((M,P)=>{this.publish(x,E,C,(F,k)=>{F?P(F):M(k)})})}subscribe(x,E,C){let M=this.options.protocolVersion;typeof E=="function"&&(C=E),C=C||this.noop;let P=!1,F=[];typeof x=="string"?(x=[x],F=x):Array.isArray(x)?F=x:typeof x=="object"&&(P=x.resubscribe,delete x.resubscribe,F=Object.keys(x));let k=o.validateTopics(F);if(k!==null)return d(C,new Error(`Invalid topic ${k}`)),this;if(this._checkDisconnecting(C))return this.log("subscribe: discconecting true"),this;let V={qos:0};M===5&&(V.nl=!1,V.rap=!1,V.rh=0),E={...V,...E};let{properties:L}=E,N=[],le=(ne,W)=>{if(W=W||E,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,ne)||this._resubscribeTopics[ne].qos<W.qos||P){let ee={topic:ne,qos:W.qos};M===5&&(ee.nl=W.nl,ee.rap=W.rap,ee.rh=W.rh,ee.properties=L),this.log("subscribe: pushing topic `%s` and qos `%s` to subs list",ee.topic,ee.qos),N.push(ee)}};if(Array.isArray(x)?x.forEach(ne=>{this.log("subscribe: array topic %s",ne),le(ne)}):Object.keys(x).forEach(ne=>{this.log("subscribe: object topic %s, %o",ne,x[ne]),le(ne,x[ne])}),!N.length)return C(null,[]),this;let J=(ne,W)=>{let ee={cmd:"subscribe",subscriptions:ne,messageId:W};if(L&&(ee.properties=L),this.options.resubscribe){this.log("subscribe :: resubscribe true");let Z=[];ne.forEach(ye=>{if(this.options.reconnectPeriod>0){let re={qos:ye.qos};M===5&&(re.nl=ye.nl||!1,re.rap=ye.rap||!1,re.rh=ye.rh||0,re.properties=ye.properties),this._resubscribeTopics[ye.topic]=re,Z.push(ye.topic)}}),this.messageIdToTopic[ee.messageId]=Z}let B=new Promise((Z,ye)=>{this.outgoing[ee.messageId]={volatile:!0,cb(re,ve){if(!re){let{granted:z}=ve;for(let U=0;U<z.length;U+=1)ne[U].qos=z[U]}re?ye(new h.ErrorWithSubackPacket(re.message,ve)):Z(ve)}}});return this.log("subscribe :: call _sendPacket"),this._sendPacket(ee),B},H=()=>{let ne=this.options.subscribeBatchSize??N.length,W=[];for(let ee=0;ee<N.length;ee+=ne){let B=N.slice(ee,ee+ne),Z=this._nextId();if(Z===null)return this.log("No messageId left"),!1;W.push(J(B,Z))}return Promise.all(W).then(ee=>{C(null,N,ee.at(-1))}).catch(ee=>{C(ee,N,ee.packet)}),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!H())&&this._storeProcessingQueue.push({invoke:H,callback:C}),this}subscribeAsync(x,E){return new Promise((C,M)=>{this.subscribe(x,E,(P,F)=>{P?M(P):C(F)})})}unsubscribe(x,E,C){typeof x=="string"&&(x=[x]),typeof E=="function"&&(C=E),C=C||this.noop;let M=o.validateTopics(x);if(M!==null)return d(C,new Error(`Invalid topic ${M}`)),this;if(this._checkDisconnecting(C))return this;let P=()=>{let F=this._nextId();if(F===null)return this.log("No messageId left"),!1;let k={cmd:"unsubscribe",messageId:F,unsubscriptions:[]};return typeof x=="string"?k.unsubscriptions=[x]:Array.isArray(x)&&(k.unsubscriptions=x),this.options.resubscribe&&k.unsubscriptions.forEach(V=>{delete this._resubscribeTopics[V]}),typeof E=="object"&&E.properties&&(k.properties=E.properties),this.outgoing[k.messageId]={volatile:!0,cb:C},this.log("unsubscribe: call _sendPacket"),this._sendPacket(k),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!P())&&this._storeProcessingQueue.push({invoke:P,callback:C}),this}unsubscribeAsync(x,E){return new Promise((C,M)=>{this.unsubscribe(x,E,(P,F)=>{P?M(P):C(F)})})}end(x,E,C){this.log("end :: (%s)",this.options.clientId),(x==null||typeof x!="boolean")&&(C=C||E,E=x,x=!1),typeof E!="object"&&(C=C||E,E=null),this.log("end :: cb? %s",!!C),(!C||typeof C!="function")&&(C=this.noop);let M=()=>{this.log("end :: closeStores: closing incoming and outgoing stores"),this.disconnected=!0,this.incomingStore.close(F=>{this.outgoingStore.close(k=>{if(this.log("end :: closeStores: emitting end"),this.emit("end"),C){let V=F||k;this.log("end :: closeStores: invoking callback with args"),C(V)}})}),this._deferredReconnect?this._deferredReconnect():(this.options.reconnectPeriod===0||this.options.manualConnect)&&(this.disconnecting=!1)},P=()=>{this.log("end :: (%s) :: finish :: calling _cleanUp with force %s",this.options.clientId,x),this._cleanUp(x,()=>{this.log("end :: finish :: calling process.nextTick on closeStores"),(0,h.nextTick)(M)},E)};return this.disconnecting?(C(),this):(this._clearReconnect(),this.disconnecting=!0,!x&&Object.keys(this.outgoing).length>0?(this.log("end :: (%s) :: calling finish in 10ms once outgoing is empty",this.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,P,10))):(this.log("end :: (%s) :: immediately calling finish",this.options.clientId),P()),this)}endAsync(x,E){return new Promise((C,M)=>{this.end(x,E,P=>{P?M(P):C()})})}removeOutgoingMessage(x){if(this.outgoing[x]){let{cb:E}=this.outgoing[x];this._removeOutgoingAndStoreMessage(x,()=>{E(new Error("Message removed"))})}return this}reconnect(x){this.log("client reconnect");let E=()=>{x?(this.options.incomingStore=x.incomingStore,this.options.outgoingStore=x.outgoingStore):(this.options.incomingStore=null,this.options.outgoingStore=null),this.incomingStore=this.options.incomingStore||new c.default,this.outgoingStore=this.options.outgoingStore||new c.default,this.disconnecting=!1,this.disconnected=!1,this._deferredReconnect=null,this._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=E:E(),this}_flushVolatile(){this.outgoing&&(this.log("_flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(this.outgoing).forEach(x=>{this.outgoing[x].volatile&&typeof this.outgoing[x].cb=="function"&&(this.outgoing[x].cb(new Error("Connection closed")),delete this.outgoing[x])}))}_flush(){this.outgoing&&(this.log("_flush: queue exists? %b",!!this.outgoing),Object.keys(this.outgoing).forEach(x=>{typeof this.outgoing[x].cb=="function"&&(this.outgoing[x].cb(new Error("Connection closed")),delete this.outgoing[x])}))}_removeTopicAliasAndRecoverTopicName(x){let E;x.properties&&(E=x.properties.topicAlias);let C=x.topic.toString();if(this.log("_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o",E,C),C.length===0){if(typeof E>"u")return new Error("Unregistered Topic Alias");if(C=this.topicAliasSend.getTopicByAlias(E),typeof C>"u")return new Error("Unregistered Topic Alias");x.topic=C}E&&delete x.properties.topicAlias}_checkDisconnecting(x){return this.disconnecting&&(x&&x!==this.noop?x(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting}_reconnect(){this.log("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this.connect()}),this.log("client already connected. disconnecting first.")):(this.log("_reconnect: calling connect"),this.connect())}_setupReconnect(){!this.disconnecting&&!this.reconnectTimer&&this.options.reconnectPeriod>0?(this.reconnecting||(this.log("_setupReconnect :: emit `offline` state"),this.emit("offline"),this.log("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),this.log("_setupReconnect :: setting reconnectTimer for %d ms",this.options.reconnectPeriod),this.reconnectTimer=setInterval(()=>{this.log("reconnectTimer :: reconnect triggered!"),this._reconnect()},this.options.reconnectPeriod)):this.log("_setupReconnect :: doing nothing...")}_clearReconnect(){this.log("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)}_cleanUp(x,E,C={}){if(E&&(this.log("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",E)),this.log("_cleanUp :: forced? %s",x),x)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let M={cmd:"disconnect",...C};this.log("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(M,()=>{this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),d(()=>{this.stream.end(()=>{this.log("_cleanUp :: (%s) :: stream destroyed",this.options.clientId)})})})}!this.disconnecting&&!this.reconnecting&&(this.log("_cleanUp :: client not disconnecting/reconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this._destroyKeepaliveManager(),E&&!this.connected&&(this.log("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",E),E())}_storeAndSend(x,E,C){this.log("storeAndSend :: store packet with cmd %s to outgoingStore",x.cmd);let M=x,P;if(M.cmd==="publish"&&(M=(0,n.default)(x),P=this._removeTopicAliasAndRecoverTopicName(M),P))return E&&E(P);this.outgoingStore.put(M,F=>{if(F)return E&&E(F);C(),this._writePacket(x,E)})}_applyTopicAlias(x){if(this.options.protocolVersion===5&&x.cmd==="publish"){let E;x.properties&&(E=x.properties.topicAlias);let C=x.topic.toString();if(this.topicAliasSend)if(E){if(C.length!==0&&(this.log("applyTopicAlias :: register topic: %s - alias: %d",C,E),!this.topicAliasSend.put(C,E)))return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",C,E),new Error("Sending Topic Alias out of range")}else C.length!==0&&(this.options.autoAssignTopicAlias?(E=this.topicAliasSend.getAliasByTopic(C),E?(x.topic="",x.properties={...x.properties,topicAlias:E},this.log("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",C,E)):(E=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(C,E),x.properties={...x.properties,topicAlias:E},this.log("applyTopicAlias :: auto assign topic: %s - alias: %d",C,E))):this.options.autoUseTopicAlias&&(E=this.topicAliasSend.getAliasByTopic(C),E&&(x.topic="",x.properties={...x.properties,topicAlias:E},this.log("applyTopicAlias :: auto use topic: %s - alias: %d",C,E))));else if(E)return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",C,E),new Error("Sending Topic Alias out of range")}}_noop(x){this.log("noop ::",x)}_writePacket(x,E){this.log("_writePacket :: packet: %O",x),this.log("_writePacket :: emitting `packetsend`"),this.emit("packetsend",x),this.log("_writePacket :: writing to stream");let C=t.default.writeToStream(x,this.stream,this.options);this.log("_writePacket :: writeToStream result %s",C),!C&&E&&E!==this.noop?(this.log("_writePacket :: handle events on `drain` once through callback."),this.stream.once("drain",E)):E&&(this.log("_writePacket :: invoking cb"),E())}_sendPacket(x,E,C,M){this.log("_sendPacket :: (%s) :: start",this.options.clientId),C=C||this.noop,E=E||this.noop;let P=this._applyTopicAlias(x);if(P){E(P);return}if(!this.connected){if(x.cmd==="auth"){this._writePacket(x,E);return}this.log("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(x,E,C);return}if(M){this._writePacket(x,E);return}switch(x.cmd){case"publish":break;case"pubrel":this._storeAndSend(x,E,C);return;default:this._writePacket(x,E);return}switch(x.qos){case 2:case 1:this._storeAndSend(x,E,C);break;default:this._writePacket(x,E);break}this.log("_sendPacket :: (%s) :: end",this.options.clientId)}_storePacket(x,E,C){this.log("_storePacket :: packet: %o",x),this.log("_storePacket :: cb? %s",!!E),C=C||this.noop;let M=x;if(M.cmd==="publish"){M=(0,n.default)(x);let F=this._removeTopicAliasAndRecoverTopicName(M);if(F)return E&&E(F)}let P=M.qos||0;P===0&&this.queueQoSZero||M.cmd!=="publish"?this.queue.push({packet:M,cb:E}):P>0?(E=this.outgoing[M.messageId]?this.outgoing[M.messageId].cb:null,this.outgoingStore.put(M,F=>{if(F)return E&&E(F);C()})):E&&E(new Error("No connection to broker"))}_setupKeepaliveManager(){this.log("_setupKeepaliveManager :: keepalive %d (seconds)",this.options.keepalive),!this.keepaliveManager&&this.options.keepalive&&(this.keepaliveManager=new A.default(this,this.options.timerVariant))}_destroyKeepaliveManager(){this.keepaliveManager&&(this.log("_destroyKeepaliveManager :: destroying keepalive manager"),this.keepaliveManager.destroy(),this.keepaliveManager=null)}reschedulePing(x=!1){this.keepaliveManager&&this.options.keepalive&&(x||this.options.reschedulePings)&&this._reschedulePing()}_reschedulePing(){this.log("_reschedulePing :: rescheduling ping"),this.keepaliveManager.reschedule()}sendPing(){this.log("_sendPing :: sending pingreq"),this._sendPacket({cmd:"pingreq"})}onKeepaliveTimeout(){this.emit("error",new Error("Keepalive timeout")),this.log("onKeepaliveTimeout :: calling _cleanUp with force true"),this._cleanUp(!0)}_resubscribe(){this.log("_resubscribe");let x=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&x.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log("_resubscribe: protocolVersion 5");for(let E=0;E<x.length;E++){let C={};C[x[E]]=this._resubscribeTopics[x[E]],C.resubscribe=!0,this.subscribe(C,{properties:C[x[E]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1}_onConnect(x){if(this.disconnected){this.emit("connect",x);return}this.connackPacket=x,this.messageIdProvider.clear(),this._setupKeepaliveManager(),this.connected=!0;let E=()=>{let C=this.outgoingStore.createStream(),M=()=>{C.destroy(),C=null,this._flushStoreProcessingQueue(),P()},P=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={}};this.once("close",M),C.on("error",k=>{P(),this._flushStoreProcessingQueue(),this.removeListener("close",M),this.emit("error",k)});let F=()=>{if(!C)return;let k=C.read(1),V;if(!k){C.once("readable",F);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[k.messageId]){F();return}!this.disconnecting&&!this.reconnectTimer?(V=this.outgoing[k.messageId]?this.outgoing[k.messageId].cb:null,this.outgoing[k.messageId]={volatile:!1,cb(L,N){V&&V(L,N),F()}},this._packetIdsDuringStoreProcessing[k.messageId]=!0,this.messageIdProvider.register(k.messageId)?this._sendPacket(k,void 0,void 0,!0):this.log("messageId: %d has already used.",k.messageId)):C.destroy&&C.destroy()};C.on("end",()=>{let k=!0;for(let V in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[V]){k=!1;break}this.removeListener("close",M),k?(P(),this._invokeAllStoreProcessingQueue(),this.emit("connect",x)):E()}),F()};E()}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let x=this._storeProcessingQueue[0];if(x&&x.invoke())return this._storeProcessingQueue.shift(),!0}return!1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let x of this._storeProcessingQueue)x.cbStorePut&&x.cbStorePut(new Error("Connection closed")),x.callback&&x.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)}_removeOutgoingAndStoreMessage(x,E){delete this.outgoing[x],this.outgoingStore.del({messageId:x},(C,M)=>{E(C,M),this.messageIdProvider.deallocate(x),this._invokeStoreProcessingQueue()})}};l.default=S}),Qc=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0});var u=ds(),s=class{numberAllocator;lastId;constructor(){this.numberAllocator=new u.NumberAllocator(1,65535)}allocate(){return this.lastId=this.numberAllocator.alloc(),this.lastId}getLastAllocated(){return this.lastId}register(i){return this.numberAllocator.use(i)}deallocate(i){this.numberAllocator.free(i)}clear(){this.numberAllocator.clear()}};l.default=s});function qc(){if(fo)return fr;fo=!0;let l=2147483647,u=36,s=1,i=26,a=38,t=700,e=72,n=128,r="-",o=/^xn--/,c=/[^\0-\x7F]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=u-s,h=Math.floor,m=String.fromCharCode;function A(P){throw new RangeError(g[P])}function _(P,F){let k=[],V=P.length;for(;V--;)k[V]=F(P[V]);return k}function d(P,F){let k=P.split("@"),V="";k.length>1&&(V=k[0]+"@",P=k[1]),P=P.replace(p,".");let L=P.split("."),N=_(L,F).join(".");return V+N}function v(P){let F=[],k=0,V=P.length;for(;k<V;){let L=P.charCodeAt(k++);if(L>=55296&&L<=56319&&k<V){let N=P.charCodeAt(k++);(N&64512)==56320?F.push(((L&1023)<<10)+(N&1023)+65536):(F.push(L),k--)}else F.push(L)}return F}let S=P=>String.fromCodePoint(...P),b=function(P){return P>=48&&P<58?26+(P-48):P>=65&&P<91?P-65:P>=97&&P<123?P-97:u},x=function(P,F){return P+22+75*(P<26)-((F!=0)<<5)},E=function(P,F,k){let V=0;for(P=k?h(P/t):P>>1,P+=h(P/F);P>y*i>>1;V+=u)P=h(P/y);return h(V+(y+1)*P/(P+a))},C=function(P){let F=[],k=P.length,V=0,L=n,N=e,le=P.lastIndexOf(r);le<0&&(le=0);for(let J=0;J<le;++J)P.charCodeAt(J)>=128&&A("not-basic"),F.push(P.charCodeAt(J));for(let J=le>0?le+1:0;J<k;){let H=V;for(let W=1,ee=u;;ee+=u){J>=k&&A("invalid-input");let B=b(P.charCodeAt(J++));B>=u&&A("invalid-input"),B>h((l-V)/W)&&A("overflow"),V+=B*W;let Z=ee<=N?s:ee>=N+i?i:ee-N;if(B<Z)break;let ye=u-Z;W>h(l/ye)&&A("overflow"),W*=ye}let ne=F.length+1;N=E(V-H,ne,H==0),h(V/ne)>l-L&&A("overflow"),L+=h(V/ne),V%=ne,F.splice(V++,0,L)}return String.fromCodePoint(...F)},M=function(P){let F=[];P=v(P);let k=P.length,V=n,L=0,N=e;for(let H of P)H<128&&F.push(m(H));let le=F.length,J=le;for(le&&F.push(r);J<k;){let H=l;for(let W of P)W>=V&&W<H&&(H=W);let ne=J+1;H-V>h((l-L)/ne)&&A("overflow"),L+=(H-V)*ne,V=H;for(let W of P)if(W<V&&++L>l&&A("overflow"),W===V){let ee=L;for(let B=u;;B+=u){let Z=B<=N?s:B>=N+i?i:B-N;if(ee<Z)break;let ye=ee-Z,re=u-Z;F.push(m(x(Z+ye%re,0))),ee=h(ye/re)}F.push(m(x(ee,0))),N=E(L,ne,J===le),L=0,++J}++L,++V}return F.join("")};return fr={version:"2.3.1",ucs2:{decode:v,encode:S},decode:C,encode:M,toASCII:function(P){return d(P,function(F){return c.test(F)?"xn--"+M(F):F})},toUnicode:function(P){return d(P,function(F){return o.test(F)?C(F.slice(4).toLowerCase()):F})}},fr}var fr,fo,At,$c=$e(()=>{ue(),fe(),ce(),fr={},fo=!1,At=qc(),At.decode,At.encode,At.toASCII,At.toUnicode,At.ucs2,At.version});function Hc(){return mo||(mo=!0,go=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var l={},u=Symbol("test"),s=Object(u);if(typeof u=="string"||Object.prototype.toString.call(u)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;var i=42;l[u]=i;for(u in l)return!1;if(typeof Object.keys=="function"&&Object.keys(l).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(l).length!==0)return!1;var a=Object.getOwnPropertySymbols(l);if(a.length!==1||a[0]!==u||!Object.prototype.propertyIsEnumerable.call(l,u))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var t=Object.getOwnPropertyDescriptor(l,u);if(t.value!==i||t.enumerable!==!0)return!1}return!0}),go}function zc(){return yo||(yo=!0,Ao=Error),Ao}function Gc(){return wo||(wo=!0,bo=EvalError),bo}function Jc(){return _o||(_o=!0,vo=RangeError),vo}function Yc(){return So||(So=!0,Eo=ReferenceError),Eo}function _s(){return Io||(Io=!0,xo=SyntaxError),xo}function Ht(){return ko||(ko=!0,Co=TypeError),Co}function Zc(){return Oo||(Oo=!0,To=URIError),To}function Xc(){if(Po)return hr;Po=!0;var l=typeof Symbol<"u"&&Symbol,u=Hc();return hr=function(){return typeof l!="function"||typeof Symbol!="function"||typeof l("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:u()},hr}function ef(){if(Bo)return dr;Bo=!0;var l={__proto__:null,foo:{}},u=Object;return dr=function(){return{__proto__:l}.foo===l.foo&&!(l instanceof u)},dr}function tf(){if(Mo)return pr;Mo=!0;var l="Function.prototype.bind called on incompatible ",u=Object.prototype.toString,s=Math.max,i="[object Function]",a=function(n,r){for(var o=[],c=0;c<n.length;c+=1)o[c]=n[c];for(var p=0;p<r.length;p+=1)o[p+n.length]=r[p];return o},t=function(n,r){for(var o=[],c=r,p=0;c<n.length;c+=1,p+=1)o[p]=n[c];return o},e=function(n,r){for(var o="",c=0;c<n.length;c+=1)o+=n[c],c+1<n.length&&(o+=r);return o};return pr=function(n){var r=this;if(typeof r!="function"||u.apply(r)!==i)throw new TypeError(l+r);for(var o=t(arguments,1),c,p=function(){if(this instanceof c){var A=r.apply(this,a(o,arguments));return Object(A)===A?A:this}return r.apply(n,a(o,arguments))},g=s(0,r.length-o.length),y=[],h=0;h<g;h++)y[h]="$"+h;if(c=Function("binder","return function ("+e(y,",")+"){ return binder.apply(this,arguments); }")(p),r.prototype){var m=function(){};m.prototype=r.prototype,c.prototype=new m,m.prototype=null}return c},pr}function ho(){if(Ro)return gr;Ro=!0;var l=tf();return gr=Function.prototype.bind||l,gr}function rf(){if(Do)return mr;Do=!0;var l=Function.prototype.call,u=Object.prototype.hasOwnProperty,s=ho();return mr=s.call(l,u),mr}function Ut(){if(Uo)return Ar;Uo=!0;var l,u=zc(),s=Gc(),i=Jc(),a=Yc(),t=_s(),e=Ht(),n=Zc(),r=Function,o=function(J){try{return r('"use strict"; return ('+J+").constructor;")()}catch{}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch{c=null}var p=function(){throw new e},g=c?(function(){try{return arguments.callee,p}catch{try{return c(arguments,"callee").get}catch{return p}}})():p,y=Xc()(),h=ef()(),m=Object.getPrototypeOf||(h?function(J){return J.__proto__}:null),A={},_=typeof Uint8Array>"u"||!m?l:m(Uint8Array),d={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?l:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?l:ArrayBuffer,"%ArrayIteratorPrototype%":y&&m?m([][Symbol.iterator]()):l,"%AsyncFromSyncIteratorPrototype%":l,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>"u"?l:Atomics,"%BigInt%":typeof BigInt>"u"?l:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?l:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?l:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?l:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":u,"%eval%":eval,"%EvalError%":s,"%Float32Array%":typeof Float32Array>"u"?l:Float32Array,"%Float64Array%":typeof Float64Array>"u"?l:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?l:FinalizationRegistry,"%Function%":r,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>"u"?l:Int8Array,"%Int16Array%":typeof Int16Array>"u"?l:Int16Array,"%Int32Array%":typeof Int32Array>"u"?l:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&m?m(m([][Symbol.iterator]())):l,"%JSON%":typeof JSON=="object"?JSON:l,"%Map%":typeof Map>"u"?l:Map,"%MapIteratorPrototype%":typeof Map>"u"||!y||!m?l:m(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?l:Promise,"%Proxy%":typeof Proxy>"u"?l:Proxy,"%RangeError%":i,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?l:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?l:Set,"%SetIteratorPrototype%":typeof Set>"u"||!y||!m?l:m(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?l:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&m?m(""[Symbol.iterator]()):l,"%Symbol%":y?Symbol:l,"%SyntaxError%":t,"%ThrowTypeError%":g,"%TypedArray%":_,"%TypeError%":e,"%Uint8Array%":typeof Uint8Array>"u"?l:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?l:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?l:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?l:Uint32Array,"%URIError%":n,"%WeakMap%":typeof WeakMap>"u"?l:WeakMap,"%WeakRef%":typeof WeakRef>"u"?l:WeakRef,"%WeakSet%":typeof WeakSet>"u"?l:WeakSet};if(m)try{null.error}catch(J){var v=m(m(J));d["%Error.prototype%"]=v}var S=function J(H){var ne;if(H==="%AsyncFunction%")ne=o("async function () {}");else if(H==="%GeneratorFunction%")ne=o("function* () {}");else if(H==="%AsyncGeneratorFunction%")ne=o("async function* () {}");else if(H==="%AsyncGenerator%"){var W=J("%AsyncGeneratorFunction%");W&&(ne=W.prototype)}else if(H==="%AsyncIteratorPrototype%"){var ee=J("%AsyncGenerator%");ee&&m&&(ne=m(ee.prototype))}return d[H]=ne,ne},b={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=ho(),E=rf(),C=x.call(Function.call,Array.prototype.concat),M=x.call(Function.apply,Array.prototype.splice),P=x.call(Function.call,String.prototype.replace),F=x.call(Function.call,String.prototype.slice),k=x.call(Function.call,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,L=/\\(\\)?/g,N=function(J){var H=F(J,0,1),ne=F(J,-1);if(H==="%"&&ne!=="%")throw new t("invalid intrinsic syntax, expected closing `%`");if(ne==="%"&&H!=="%")throw new t("invalid intrinsic syntax, expected opening `%`");var W=[];return P(J,V,function(ee,B,Z,ye){W[W.length]=Z?P(ye,L,"$1"):B||ee}),W},le=function(J,H){var ne=J,W;if(E(b,ne)&&(W=b[ne],ne="%"+W[0]+"%"),E(d,ne)){var ee=d[ne];if(ee===A&&(ee=S(ne)),typeof ee>"u"&&!H)throw new e("intrinsic "+J+" exists, but is not available. Please file an issue!");return{alias:W,name:ne,value:ee}}throw new t("intrinsic "+J+" does not exist!")};return Ar=function(J,H){if(typeof J!="string"||J.length===0)throw new e("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof H!="boolean")throw new e('"allowMissing" argument must be a boolean');if(k(/^%?[^%]*%?$/,J)===null)throw new t("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ne=N(J),W=ne.length>0?ne[0]:"",ee=le("%"+W+"%",H),B=ee.name,Z=ee.value,ye=!1,re=ee.alias;re&&(W=re[0],M(ne,C([0,1],re)));for(var ve=1,z=!0;ve<ne.length;ve+=1){var U=ne[ve],oe=F(U,0,1),q=F(U,-1);if((oe==='"'||oe==="'"||oe==="`"||q==='"'||q==="'"||q==="`")&&oe!==q)throw new t("property names with quotes must have matching quotes");if((U==="constructor"||!z)&&(ye=!0),W+="."+U,B="%"+W+"%",E(d,B))Z=d[B];else if(Z!=null){if(!(U in Z)){if(!H)throw new e("base intrinsic for "+J+" exists, but the property is not available.");return}if(c&&ve+1>=ne.length){var G=c(Z,U);z=!!G,z&&"get"in G&&!("originalValue"in G.get)?Z=G.get:Z=Z[U]}else z=E(Z,U),Z=Z[U];z&&!ye&&(d[B]=Z)}}return Z},Ar}function po(){if(No)return yr;No=!0;var l=Ut(),u=l("%Object.defineProperty%",!0)||!1;if(u)try{u({},"a",{value:1})}catch{u=!1}return yr=u,yr}function Es(){if(jo)return br;jo=!0;var l=Ut(),u=l("%Object.getOwnPropertyDescriptor%",!0);if(u)try{u([],"length")}catch{u=null}return br=u,br}function nf(){if(Fo)return wr;Fo=!0;var l=po(),u=_s(),s=Ht(),i=Es();return wr=function(a,t,e){if(!a||typeof a!="object"&&typeof a!="function")throw new s("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,p=!!i&&i(a,t);if(l)l(a,t,{configurable:o===null&&p?p.configurable:!o,enumerable:n===null&&p?p.enumerable:!n,value:e,writable:r===null&&p?p.writable:!r});else if(c||!n&&!r&&!o)a[t]=e;else throw new u("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},wr}function of(){if(Lo)return vr;Lo=!0;var l=po(),u=function(){return!!l};return u.hasArrayLengthDefineBug=function(){if(!l)return null;try{return l([],"length",{value:1}).length!==1}catch{return!0}},vr=u,vr}function sf(){if(Wo)return _r;Wo=!0;var l=Ut(),u=nf(),s=of()(),i=Es(),a=Ht(),t=l("%Math.floor%");return _r=function(e,n){if(typeof e!="function")throw new a("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||t(n)!==n)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,c=!0;if("length"in e&&i){var p=i(e,"length");p&&!p.configurable&&(o=!1),p&&!p.writable&&(c=!1)}return(o||c||!r)&&(s?u(e,"length",n,!0,!0):u(e,"length",n)),e},_r}function af(){if(Ko)return Nt;Ko=!0;var l=ho(),u=Ut(),s=sf(),i=Ht(),a=u("%Function.prototype.apply%"),t=u("%Function.prototype.call%"),e=u("%Reflect.apply%",!0)||l.call(t,a),n=po(),r=u("%Math.max%");Nt=function(c){if(typeof c!="function")throw new i("a function is required");var p=e(l,t,arguments);return s(p,1+r(0,c.length-(arguments.length-1)),!0)};var o=function(){return e(l,a,arguments)};return n?n(Nt,"apply",{value:o}):Nt.apply=o,Nt}function lf(){if(Vo)return Er;Vo=!0;var l=Ut(),u=af(),s=u(l("String.prototype.indexOf"));return Er=function(i,a){var t=l(i,!!a);return typeof t=="function"&&s(i,".prototype.")>-1?u(t):t},Er}var go,mo,Ao,yo,bo,wo,vo,_o,Eo,So,xo,Io,Co,ko,To,Oo,hr,Po,dr,Bo,pr,Mo,gr,Ro,mr,Do,Ar,Uo,yr,No,br,jo,wr,Fo,vr,Lo,_r,Wo,Nt,Ko,Er,Vo,uf=$e(()=>{ue(),fe(),ce(),go={},mo=!1,Ao={},yo=!1,bo={},wo=!1,vo={},_o=!1,Eo={},So=!1,xo={},Io=!1,Co={},ko=!1,To={},Oo=!1,hr={},Po=!1,dr={},Bo=!1,pr={},Mo=!1,gr={},Ro=!1,mr={},Do=!1,Ar={},Uo=!1,yr={},No=!1,br={},jo=!1,wr={},Fo=!1,vr={},Lo=!1,_r={},Wo=!1,Nt={},Ko=!1,Er={},Vo=!1});function Qo(l){throw new Error("Node.js process "+l+" is not supported by JSPM core outside of Node.js")}function cf(){!Ct||!kt||(Ct=!1,kt.length?Ye=kt.concat(Ye):zt=-1,Ye.length&&Ss())}function Ss(){if(!Ct){var l=setTimeout(cf,0);Ct=!0;for(var u=Ye.length;u;){for(kt=Ye,Ye=[];++zt<u;)kt&&kt[zt].run();zt=-1,u=Ye.length}kt=null,Ct=!1,clearTimeout(l)}}function ff(l){var u=new Array(arguments.length-1);if(arguments.length>1)for(var s=1;s<arguments.length;s++)u[s-1]=arguments[s];Ye.push(new xs(l,u)),Ye.length===1&&!Ct&&setTimeout(Ss,0)}function xs(l,u){this.fun=l,this.array=u}function We(){}function hf(l){Qo("_linkedBinding")}function df(l){Qo("dlopen")}function pf(){return[]}function gf(){return[]}function mf(l,u){if(!l)throw new Error(u||"assertion error")}function Af(){return!1}function yf(){return ht.now()/1e3}function qo(l){var u=Math.floor((Date.now()-ht.now())*.001),s=ht.now()*.001,i=Math.floor(s)+u,a=Math.floor(s%1*1e9);return l&&(i=i-l[0],a=a-l[1],a<0&&(i--,a+=xr)),[i,a]}function yt(){return Ho}function bf(l){return[]}var Ye,Ct,kt,zt,Is,Cs,ks,Ts,Os,Ps,Bs,Ms,Rs,Ds,Us,Ns,js,Fs,Ls,Ws,Ks,Vs,Qs,qs,$s,Sr,Hs,zs,Gs,Js,Ys,Zs,Xs,ea,ta,ra,na,oa,ia,sa,aa,la,ua,ca,fa,ha,da,pa,ga,ma,Aa,ht,$o,xr,ya,ba,wa,va,_a,Ea,Sa,xa,Ia,Ca,ka,Ho,Ta=$e(()=>{ue(),fe(),ce(),Ye=[],Ct=!1,zt=-1,xs.prototype.run=function(){this.fun.apply(null,this.array)},Is="browser",Cs="x64",ks="browser",Ts={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},Os=["/usr/bin/node"],Ps=[],Bs="v16.8.0",Ms={},Rs=function(l,u){console.warn((u?u+": ":"")+l)},Ds=function(l){Qo("binding")},Us=function(l){return 0},Ns=function(){return"/"},js=function(l){},Fs={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},Ls=We,Ws=[],Ks={},Vs=!1,Qs={},qs=We,$s=We,Sr=function(){return{}},Hs=Sr,zs=Sr,Gs=We,Js=We,Ys=We,Zs={},Xs={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},ea=We,ta=We,ra=We,na=We,oa=We,ia=We,sa=We,aa=void 0,la=void 0,ua=void 0,ca=We,fa=2,ha=1,da="/bin/usr/node",pa=9229,ga="node",ma=[],Aa=We,ht={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},ht.now===void 0&&($o=Date.now(),ht.timing&&ht.timing.navigationStart&&($o=ht.timing.navigationStart),ht.now=()=>Date.now()-$o),xr=1e9,qo.bigint=function(l){var u=qo(l);return typeof BigInt>"u"?u[0]*xr+u[1]:BigInt(u[0]*xr)+BigInt(u[1])},ya=10,ba={},wa=0,va=yt,_a=yt,Ea=yt,Sa=yt,xa=yt,Ia=We,Ca=yt,ka=yt,Ho={version:Bs,versions:Ms,arch:Cs,platform:ks,release:Fs,_rawDebug:Ls,moduleLoadList:Ws,binding:Ds,_linkedBinding:hf,_events:ba,_eventsCount:wa,_maxListeners:ya,on:yt,addListener:va,once:_a,off:Ea,removeListener:Sa,removeAllListeners:xa,emit:Ia,prependListener:Ca,prependOnceListener:ka,listeners:bf,domain:Ks,_exiting:Vs,config:Qs,dlopen:df,uptime:yf,_getActiveRequests:pf,_getActiveHandles:gf,reallyExit:qs,_kill:$s,cpuUsage:Sr,resourceUsage:Hs,memoryUsage:zs,kill:Gs,exit:Js,openStdin:Ys,allowedNodeEnvironmentFlags:Zs,assert:mf,features:Xs,_fatalExceptions:ea,setUncaughtExceptionCaptureCallback:ta,hasUncaughtExceptionCaptureCallback:Af,emitWarning:Rs,nextTick:ff,_tickCallback:ra,_debugProcess:na,_debugEnd:oa,_startProfilerIdleNotifier:ia,_stopProfilerIdleNotifier:sa,stdout:aa,stdin:ua,stderr:la,abort:ca,umask:Us,chdir:js,cwd:Ns,env:Ts,title:Is,argv:Os,execArgv:Ps,pid:fa,ppid:ha,execPath:da,debugPort:pa,hrtime:qo,argv0:ga,_preload_modules:ma,setSourceMapsEnabled:Aa}});function wf(){if(zo)return Ir;zo=!0;var l=Ho;function u(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function s(t,e){for(var n="",r=0,o=-1,c=0,p,g=0;g<=t.length;++g){if(g<t.length)p=t.charCodeAt(g);else{if(p===47)break;p=47}if(p===47){if(!(o===g-1||c===1))if(o!==g-1&&c===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var y=n.lastIndexOf("/");if(y!==n.length-1){y===-1?(n="",r=0):(n=n.slice(0,y),r=n.length-1-n.lastIndexOf("/")),o=g,c=0;continue}}else if(n.length===2||n.length===1){n="",r=0,o=g,c=0;continue}}e&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+t.slice(o+1,g):n=t.slice(o+1,g),r=g-o-1;o=g,c=0}else p===46&&c!==-1?++c:c=-1}return n}function i(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+t+r:r}var a={resolve:function(){for(var t="",e=!1,n,r=arguments.length-1;r>=-1&&!e;r--){var o;r>=0?o=arguments[r]:(n===void 0&&(n=l.cwd()),o=n),u(o),o.length!==0&&(t=o+"/"+t,e=o.charCodeAt(0)===47)}return t=s(t,!e),e?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(u(t),t.length===0)return".";var e=t.charCodeAt(0)===47,n=t.charCodeAt(t.length-1)===47;return t=s(t,!e),t.length===0&&!e&&(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return u(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];u(n),n.length>0&&(t===void 0?t=n:t+="/"+n)}return t===void 0?".":a.normalize(t)},relative:function(t,e){if(u(t),u(e),t===e||(t=a.resolve(t),e=a.resolve(e),t===e))return"";for(var n=1;n<t.length&&t.charCodeAt(n)===47;++n);for(var r=t.length,o=r-n,c=1;c<e.length&&e.charCodeAt(c)===47;++c);for(var p=e.length,g=p-c,y=o<g?o:g,h=-1,m=0;m<=y;++m){if(m===y){if(g>y){if(e.charCodeAt(c+m)===47)return e.slice(c+m+1);if(m===0)return e.slice(c+m)}else o>y&&(t.charCodeAt(n+m)===47?h=m:m===0&&(h=0));break}var A=t.charCodeAt(n+m),_=e.charCodeAt(c+m);if(A!==_)break;A===47&&(h=m)}var d="";for(m=n+h+1;m<=r;++m)(m===r||t.charCodeAt(m)===47)&&(d.length===0?d+="..":d+="/..");return d.length>0?d+e.slice(c+h):(c+=h,e.charCodeAt(c)===47&&++c,e.slice(c))},_makeLong:function(t){return t},dirname:function(t){if(u(t),t.length===0)return".";for(var e=t.charCodeAt(0),n=e===47,r=-1,o=!0,c=t.length-1;c>=1;--c)if(e=t.charCodeAt(c),e===47){if(!o){r=c;break}}else o=!1;return r===-1?n?"/":".":n&&r===1?"//":t.slice(0,r)},basename:function(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');u(t);var n=0,r=-1,o=!0,c;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var p=e.length-1,g=-1;for(c=t.length-1;c>=0;--c){var y=t.charCodeAt(c);if(y===47){if(!o){n=c+1;break}}else g===-1&&(o=!1,g=c+1),p>=0&&(y===e.charCodeAt(p)?--p===-1&&(r=c):(p=-1,r=g))}return n===r?r=g:r===-1&&(r=t.length),t.slice(n,r)}else{for(c=t.length-1;c>=0;--c)if(t.charCodeAt(c)===47){if(!o){n=c+1;break}}else r===-1&&(o=!1,r=c+1);return r===-1?"":t.slice(n,r)}},extname:function(t){u(t);for(var e=-1,n=0,r=-1,o=!0,c=0,p=t.length-1;p>=0;--p){var g=t.charCodeAt(p);if(g===47){if(!o){n=p+1;break}continue}r===-1&&(o=!1,r=p+1),g===46?e===-1?e=p:c!==1&&(c=1):e!==-1&&(c=-1)}return e===-1||r===-1||c===0||c===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return i("/",t)},parse:function(t){u(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;var n=t.charCodeAt(0),r=n===47,o;r?(e.root="/",o=1):o=0;for(var c=-1,p=0,g=-1,y=!0,h=t.length-1,m=0;h>=o;--h){if(n=t.charCodeAt(h),n===47){if(!y){p=h+1;break}continue}g===-1&&(y=!1,g=h+1),n===46?c===-1?c=h:m!==1&&(m=1):c!==-1&&(m=-1)}return c===-1||g===-1||m===0||m===1&&c===g-1&&c===p+1?g!==-1&&(p===0&&r?e.base=e.name=t.slice(1,g):e.base=e.name=t.slice(p,g)):(p===0&&r?(e.name=t.slice(1,c),e.base=t.slice(1,g)):(e.name=t.slice(p,c),e.base=t.slice(p,g)),e.ext=t.slice(c,g)),p>0?e.dir=t.slice(0,p-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};return a.posix=a,Ir=a,Ir}var Ir,zo,Go,vf=$e(()=>{ue(),fe(),ce(),Ta(),Ir={},zo=!1,Go=wf()}),Oa={};Pt(Oa,{URL:()=>Wa,Url:()=>Ua,default:()=>Ke,fileURLToPath:()=>Ba,format:()=>Na,parse:()=>La,pathToFileURL:()=>Ma,resolve:()=>ja,resolveObject:()=>Fa});function _f(){if(Yo)return Cr;Yo=!0;var l=typeof Map=="function"&&Map.prototype,u=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,s=l&&u&&typeof u.get=="function"?u.get:null,i=l&&Map.prototype.forEach,a=typeof Set=="function"&&Set.prototype,t=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,e=a&&t&&typeof t.get=="function"?t.get:null,n=a&&Set.prototype.forEach,r=typeof WeakMap=="function"&&WeakMap.prototype,o=r?WeakMap.prototype.has:null,c=typeof WeakSet=="function"&&WeakSet.prototype,p=c?WeakSet.prototype.has:null,g=typeof WeakRef=="function"&&WeakRef.prototype,y=g?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,m=Object.prototype.toString,A=Function.prototype.toString,_=String.prototype.match,d=String.prototype.slice,v=String.prototype.replace,S=String.prototype.toUpperCase,b=String.prototype.toLowerCase,x=RegExp.prototype.test,E=Array.prototype.concat,C=Array.prototype.join,M=Array.prototype.slice,P=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,k=Object.getOwnPropertySymbols,V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,L=typeof Symbol=="function"&&typeof Symbol.iterator=="object",N=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===L||!0)?Symbol.toStringTag:null,le=Object.prototype.propertyIsEnumerable,J=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function($){return $.__proto__}:null);function H($,ie){if($===1/0||$===-1/0||$!==$||$&&$>-1e3&&$<1e3||x.call(/e/,ie))return ie;var Ie=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof $=="number"){var Ce=$<0?-P(-$):P($);if(Ce!==$){var ke=String(Ce),Oe=d.call(ie,ke.length+1);return v.call(ke,Ie,"$&_")+"."+v.call(v.call(Oe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(ie,Ie,"$&_")}var ne=Ra,W=ne.custom,ee=G(W)?W:null;Cr=function $(ie,Ie,Ce,ke){var Oe=Ie||{};if(se(Oe,"quoteStyle")&&Oe.quoteStyle!=="single"&&Oe.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(se(Oe,"maxStringLength")&&(typeof Oe.maxStringLength=="number"?Oe.maxStringLength<0&&Oe.maxStringLength!==1/0:Oe.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Ze=se(Oe,"customInspect")?Oe.customInspect:!0;if(typeof Ze!="boolean"&&Ze!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(se(Oe,"indent")&&Oe.indent!==null&&Oe.indent!==" "&&!(parseInt(Oe.indent,10)===Oe.indent&&Oe.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(se(Oe,"numericSeparator")&&typeof Oe.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Xe=Oe.numericSeparator;if(typeof ie>"u")return"undefined";if(ie===null)return"null";if(typeof ie=="boolean")return ie?"true":"false";if(typeof ie=="string")return ae(ie,Oe);if(typeof ie=="number"){if(ie===0)return 1/0/ie>0?"0":"-0";var Ve=String(ie);return Xe?H(ie,Ve):Ve}if(typeof ie=="bigint"){var et=String(ie)+"n";return Xe?H(ie,et):et}var jt=typeof Oe.depth>"u"?5:Oe.depth;if(typeof Ce>"u"&&(Ce=0),Ce>=jt&&jt>0&&typeof ie=="object")return ye(ie)?"[Array]":"[Object]";var tt=X(Oe,Ce);if(typeof ke>"u")ke=[];else if(te(ke,ie)>=0)return"[Circular]";function ze(rt,wt,Ot){if(wt&&(ke=M.call(ke),ke.push(wt)),Ot){var nt={depth:Oe.depth};return se(Oe,"quoteStyle")&&(nt.quoteStyle=Oe.quoteStyle),$(rt,nt,Ce+1,ke)}return $(rt,Oe,Ce+1,ke)}if(typeof ie=="function"&&!ve(ie)){var Nr=K(ie),Ft=Ee(ie,ze);return"[Function"+(Nr?": "+Nr:" (anonymous)")+"]"+(Ft.length>0?" { "+C.call(Ft,", ")+" }":"")}if(G(ie)){var Gt=L?v.call(String(ie),/^(Symbol\(.*\))_[^)]*$/,"$1"):V.call(ie);return typeof ie=="object"&&!L?f(Gt):Gt}if(we(ie)){for(var T="<"+b.call(String(ie.nodeName)),D=ie.attributes||[],_e=0;_e<D.length;_e++)T+=" "+D[_e].name+"="+B(Z(D[_e].value),"double",Oe);return T+=">",ie.childNodes&&ie.childNodes.length&&(T+="..."),T+="</"+b.call(String(ie.nodeName))+">",T}if(ye(ie)){if(ie.length===0)return"[]";var Se=Ee(ie,ze);return tt&&!j(Se)?"["+he(Se,tt)+"]":"[ "+C.call(Se,", ")+" ]"}if(z(ie)){var xe=Ee(ie,ze);return!("cause"in Error.prototype)&&"cause"in ie&&!le.call(ie,"cause")?"{ ["+String(ie)+"] "+C.call(E.call("[cause]: "+ze(ie.cause),xe),", ")+" }":xe.length===0?"["+String(ie)+"]":"{ ["+String(ie)+"] "+C.call(xe,", ")+" }"}if(typeof ie=="object"&&Ze){if(ee&&typeof ie[ee]=="function"&&ne)return ne(ie,{depth:jt-Ce});if(Ze!=="symbol"&&typeof ie.inspect=="function")return ie.inspect()}if(de(ie)){var Ne=[];return i&&i.call(ie,function(rt,wt){Ne.push(ze(wt,ie,!0)+" => "+ze(rt,ie))}),I("Map",s.call(ie),Ne,tt)}if(Q(ie)){var qe=[];return n&&n.call(ie,function(rt){qe.push(ze(rt,ie))}),I("Set",e.call(ie),qe,tt)}if(pe(ie))return w("WeakMap");if(me(ie))return w("WeakSet");if(be(ie))return w("WeakRef");if(oe(ie))return f(ze(Number(ie)));if(Y(ie))return f(ze(F.call(ie)));if(q(ie))return f(h.call(ie));if(U(ie))return f(ze(String(ie)));if(typeof window<"u"&&ie===window)return"{ [object Window] }";if(typeof globalThis<"u"&&ie===globalThis||typeof kr<"u"&&ie===kr)return"{ [object globalThis] }";if(!re(ie)&&!ve(ie)){var Ge=Ee(ie,ze),Jt=J?J(ie)===Object.prototype:ie instanceof Object||ie.constructor===Object,Yt=ie instanceof Object?"":"null prototype",Zt=!Jt&&N&&Object(ie)===ie&&N in ie?d.call(R(ie),8,-1):Yt?"Object":"",jr=Jt||typeof ie.constructor!="function"?"":ie.constructor.name?ie.constructor.name+" ":"",Tt=jr+(Zt||Yt?"["+C.call(E.call([],Zt||[],Yt||[]),": ")+"] ":"");return Ge.length===0?Tt+"{}":tt?Tt+"{"+he(Ge,tt)+"}":Tt+"{ "+C.call(Ge,", ")+" }"}return String(ie)};function B($,ie,Ie){var Ce=(Ie.quoteStyle||ie)==="double"?'"':"'";return Ce+$+Ce}function Z($){return v.call(String($),/"/g,"&quot;")}function ye($){return R($)==="[object Array]"&&(!N||!(typeof $=="object"&&N in $))}function re($){return R($)==="[object Date]"&&(!N||!(typeof $=="object"&&N in $))}function ve($){return R($)==="[object RegExp]"&&(!N||!(typeof $=="object"&&N in $))}function z($){return R($)==="[object Error]"&&(!N||!(typeof $=="object"&&N in $))}function U($){return R($)==="[object String]"&&(!N||!(typeof $=="object"&&N in $))}function oe($){return R($)==="[object Number]"&&(!N||!(typeof $=="object"&&N in $))}function q($){return R($)==="[object Boolean]"&&(!N||!(typeof $=="object"&&N in $))}function G($){if(L)return $&&typeof $=="object"&&$ instanceof Symbol;if(typeof $=="symbol")return!0;if(!$||typeof $!="object"||!V)return!1;try{return V.call($),!0}catch{}return!1}function Y($){if(!$||typeof $!="object"||!F)return!1;try{return F.call($),!0}catch{}return!1}var Ae=Object.prototype.hasOwnProperty||function($){return $ in(this||kr)};function se($,ie){return Ae.call($,ie)}function R($){return m.call($)}function K($){if($.name)return $.name;var ie=_.call(A.call($),/^function\s*([\w$]+)/);return ie?ie[1]:null}function te($,ie){if($.indexOf)return $.indexOf(ie);for(var Ie=0,Ce=$.length;Ie<Ce;Ie++)if($[Ie]===ie)return Ie;return-1}function de($){if(!s||!$||typeof $!="object")return!1;try{s.call($);try{e.call($)}catch{return!0}return $ instanceof Map}catch{}return!1}function pe($){if(!o||!$||typeof $!="object")return!1;try{o.call($,o);try{p.call($,p)}catch{return!0}return $ instanceof WeakMap}catch{}return!1}function be($){if(!y||!$||typeof $!="object")return!1;try{return y.call($),!0}catch{}return!1}function Q($){if(!e||!$||typeof $!="object")return!1;try{e.call($);try{s.call($)}catch{return!0}return $ instanceof Set}catch{}return!1}function me($){if(!p||!$||typeof $!="object")return!1;try{p.call($,p);try{o.call($,o)}catch{return!0}return $ instanceof WeakSet}catch{}return!1}function we($){return!$||typeof $!="object"?!1:typeof HTMLElement<"u"&&$ instanceof HTMLElement?!0:typeof $.nodeName=="string"&&typeof $.getAttribute=="function"}function ae($,ie){if($.length>ie.maxStringLength){var Ie=$.length-ie.maxStringLength,Ce="... "+Ie+" more character"+(Ie>1?"s":"");return ae(d.call($,0,ie.maxStringLength),ie)+Ce}var ke=v.call(v.call($,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Te);return B(ke,"single",ie)}function Te($){var ie=$.charCodeAt(0),Ie={8:"b",9:"t",10:"n",12:"f",13:"r"}[ie];return Ie?"\\"+Ie:"\\x"+(ie<16?"0":"")+S.call(ie.toString(16))}function f($){return"Object("+$+")"}function w($){return $+" { ? }"}function I($,ie,Ie,Ce){var ke=Ce?he(Ie,Ce):C.call(Ie,", ");return $+" ("+ie+") {"+ke+"}"}function j($){for(var ie=0;ie<$.length;ie++)if(te($[ie],`
5
+ `)>=0)return!1;return!0}function X($,ie){var Ie;if($.indent===" ")Ie=" ";else if(typeof $.indent=="number"&&$.indent>0)Ie=C.call(Array($.indent+1)," ");else return null;return{base:Ie,prev:C.call(Array(ie+1),Ie)}}function he($,ie){if($.length===0)return"";var Ie=`
6
+ `+ie.prev+ie.base;return Ie+C.call($,","+Ie)+`
7
+ `+ie.prev}function Ee($,ie){var Ie=ye($),Ce=[];if(Ie){Ce.length=$.length;for(var ke=0;ke<$.length;ke++)Ce[ke]=se($,ke)?ie($[ke],$):""}var Oe=typeof k=="function"?k($):[],Ze;if(L){Ze={};for(var Xe=0;Xe<Oe.length;Xe++)Ze["$"+Oe[Xe]]=Oe[Xe]}for(var Ve in $)se($,Ve)&&(Ie&&String(Number(Ve))===Ve&&Ve<$.length||L&&Ze["$"+Ve]instanceof Symbol||(x.call(/[^\w$]/,Ve)?Ce.push(ie(Ve,$)+": "+ie($[Ve],$)):Ce.push(Ve+": "+ie($[Ve],$))));if(typeof k=="function")for(var et=0;et<Oe.length;et++)le.call($,Oe[et])&&Ce.push("["+ie(Oe[et])+"]: "+ie($[Oe[et]],$));return Ce}return Cr}function Ef(){if(Zo)return Tr;Zo=!0;var l=Ut(),u=lf(),s=_f(),i=Ht(),a=l("%WeakMap%",!0),t=l("%Map%",!0),e=u("WeakMap.prototype.get",!0),n=u("WeakMap.prototype.set",!0),r=u("WeakMap.prototype.has",!0),o=u("Map.prototype.get",!0),c=u("Map.prototype.set",!0),p=u("Map.prototype.has",!0),g=function(A,_){for(var d=A,v;(v=d.next)!==null;d=v)if(v.key===_)return d.next=v.next,v.next=A.next,A.next=v,v},y=function(A,_){var d=g(A,_);return d&&d.value},h=function(A,_,d){var v=g(A,_);v?v.value=d:A.next={key:_,next:A.next,value:d}},m=function(A,_){return!!g(A,_)};return Tr=function(){var A,_,d,v={assert:function(S){if(!v.has(S))throw new i("Side channel does not contain "+s(S))},get:function(S){if(a&&S&&(typeof S=="object"||typeof S=="function")){if(A)return e(A,S)}else if(t){if(_)return o(_,S)}else if(d)return y(d,S)},has:function(S){if(a&&S&&(typeof S=="object"||typeof S=="function")){if(A)return r(A,S)}else if(t){if(_)return p(_,S)}else if(d)return m(d,S);return!1},set:function(S,b){a&&S&&(typeof S=="object"||typeof S=="function")?(A||(A=new a),n(A,S,b)):t?(_||(_=new t),c(_,S,b)):(d||(d={key:{},next:null}),h(d,S,b))}};return v},Tr}function Jo(){if(Xo)return Or;Xo=!0;var l=String.prototype.replace,u=/%20/g,s={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Or={default:s.RFC3986,formatters:{RFC1738:function(i){return l.call(i,u,"+")},RFC3986:function(i){return String(i)}},RFC1738:s.RFC1738,RFC3986:s.RFC3986},Or}function Pa(){if(ei)return Pr;ei=!0;var l=Jo(),u=Object.prototype.hasOwnProperty,s=Array.isArray,i=(function(){for(var A=[],_=0;_<256;++_)A.push("%"+((_<16?"0":"")+_.toString(16)).toUpperCase());return A})(),a=function(A){for(;A.length>1;){var _=A.pop(),d=_.obj[_.prop];if(s(d)){for(var v=[],S=0;S<d.length;++S)typeof d[S]<"u"&&v.push(d[S]);_.obj[_.prop]=v}}},t=function(A,_){for(var d=_&&_.plainObjects?Object.create(null):{},v=0;v<A.length;++v)typeof A[v]<"u"&&(d[v]=A[v]);return d},e=function A(_,d,v){if(!d)return _;if(typeof d!="object"){if(s(_))_.push(d);else if(_&&typeof _=="object")(v&&(v.plainObjects||v.allowPrototypes)||!u.call(Object.prototype,d))&&(_[d]=!0);else return[_,d];return _}if(!_||typeof _!="object")return[_].concat(d);var S=_;return s(_)&&!s(d)&&(S=t(_,v)),s(_)&&s(d)?(d.forEach(function(b,x){if(u.call(_,x)){var E=_[x];E&&typeof E=="object"&&b&&typeof b=="object"?_[x]=A(E,b,v):_.push(b)}else _[x]=b}),_):Object.keys(d).reduce(function(b,x){var E=d[x];return u.call(b,x)?b[x]=A(b[x],E,v):b[x]=E,b},S)},n=function(A,_){return Object.keys(_).reduce(function(d,v){return d[v]=_[v],d},A)},r=function(A,_,d){var v=A.replace(/\+/g," ");if(d==="iso-8859-1")return v.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(v)}catch{return v}},o=1024,c=function(A,_,d,v,S){if(A.length===0)return A;var b=A;if(typeof A=="symbol"?b=Symbol.prototype.toString.call(A):typeof A!="string"&&(b=String(A)),d==="iso-8859-1")return escape(b).replace(/%u[0-9a-f]{4}/gi,function(k){return"%26%23"+parseInt(k.slice(2),16)+"%3B"});for(var x="",E=0;E<b.length;E+=o){for(var C=b.length>=o?b.slice(E,E+o):b,M=[],P=0;P<C.length;++P){var F=C.charCodeAt(P);if(F===45||F===46||F===95||F===126||F>=48&&F<=57||F>=65&&F<=90||F>=97&&F<=122||S===l.RFC1738&&(F===40||F===41)){M[M.length]=C.charAt(P);continue}if(F<128){M[M.length]=i[F];continue}if(F<2048){M[M.length]=i[192|F>>6]+i[128|F&63];continue}if(F<55296||F>=57344){M[M.length]=i[224|F>>12]+i[128|F>>6&63]+i[128|F&63];continue}P+=1,F=65536+((F&1023)<<10|C.charCodeAt(P)&1023),M[M.length]=i[240|F>>18]+i[128|F>>12&63]+i[128|F>>6&63]+i[128|F&63]}x+=M.join("")}return x},p=function(A){for(var _=[{obj:{o:A},prop:"o"}],d=[],v=0;v<_.length;++v)for(var S=_[v],b=S.obj[S.prop],x=Object.keys(b),E=0;E<x.length;++E){var C=x[E],M=b[C];typeof M=="object"&&M!==null&&d.indexOf(M)===-1&&(_.push({obj:b,prop:C}),d.push(M))}return a(_),A},g=function(A){return Object.prototype.toString.call(A)==="[object RegExp]"},y=function(A){return!A||typeof A!="object"?!1:!!(A.constructor&&A.constructor.isBuffer&&A.constructor.isBuffer(A))},h=function(A,_){return[].concat(A,_)},m=function(A,_){if(s(A)){for(var d=[],v=0;v<A.length;v+=1)d.push(_(A[v]));return d}return _(A)};return Pr={arrayToObject:t,assign:n,combine:h,compact:p,decode:r,encode:c,isBuffer:y,isRegExp:g,maybeMap:m,merge:e},Pr}function Sf(){if(ti)return Br;ti=!0;var l=Ef(),u=Pa(),s=Jo(),i=Object.prototype.hasOwnProperty,a={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,A){return m+"["+A+"]"},repeat:function(m){return m}},t=Array.isArray,e=Array.prototype.push,n=function(m,A){e.apply(m,t(A)?A:[A])},r=Date.prototype.toISOString,o=s.default,c={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:u.encode,encodeValuesOnly:!1,format:o,formatter:s.formatters[o],indices:!1,serializeDate:function(m){return r.call(m)},skipNulls:!1,strictNullHandling:!1},p=function(m){return typeof m=="string"||typeof m=="number"||typeof m=="boolean"||typeof m=="symbol"||typeof m=="bigint"},g={},y=function m(A,_,d,v,S,b,x,E,C,M,P,F,k,V,L,N,le,J){for(var H=A,ne=J,W=0,ee=!1;(ne=ne.get(g))!==void 0&&!ee;){var B=ne.get(A);if(W+=1,typeof B<"u"){if(B===W)throw new RangeError("Cyclic object value");ee=!0}typeof ne.get(g)>"u"&&(W=0)}if(typeof M=="function"?H=M(_,H):H instanceof Date?H=k(H):d==="comma"&&t(H)&&(H=u.maybeMap(H,function(R){return R instanceof Date?k(R):R})),H===null){if(b)return C&&!N?C(_,c.encoder,le,"key",V):_;H=""}if(p(H)||u.isBuffer(H)){if(C){var Z=N?_:C(_,c.encoder,le,"key",V);return[L(Z)+"="+L(C(H,c.encoder,le,"value",V))]}return[L(_)+"="+L(String(H))]}var ye=[];if(typeof H>"u")return ye;var re;if(d==="comma"&&t(H))N&&C&&(H=u.maybeMap(H,C)),re=[{value:H.length>0?H.join(",")||null:void 0}];else if(t(M))re=M;else{var ve=Object.keys(H);re=P?ve.sort(P):ve}var z=E?_.replace(/\./g,"%2E"):_,U=v&&t(H)&&H.length===1?z+"[]":z;if(S&&t(H)&&H.length===0)return U+"[]";for(var oe=0;oe<re.length;++oe){var q=re[oe],G=typeof q=="object"&&typeof q.value<"u"?q.value:H[q];if(!(x&&G===null)){var Y=F&&E?q.replace(/\./g,"%2E"):q,Ae=t(H)?typeof d=="function"?d(U,Y):U:U+(F?"."+Y:"["+Y+"]");J.set(A,W);var se=l();se.set(g,J),n(ye,m(G,Ae,d,v,S,b,x,E,d==="comma"&&N&&t(H)?null:C,M,P,F,k,V,L,N,le,se))}}return ye},h=function(m){if(!m)return c;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var A=m.charset||c.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var _=s.default;if(typeof m.format<"u"){if(!i.call(s.formatters,m.format))throw new TypeError("Unknown format option provided.");_=m.format}var d=s.formatters[_],v=c.filter;(typeof m.filter=="function"||t(m.filter))&&(v=m.filter);var S;if(m.arrayFormat in a?S=m.arrayFormat:"indices"in m?S=m.indices?"indices":"repeat":S=c.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var b=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:c.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:c.addQueryPrefix,allowDots:b,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:c.allowEmptyArrays,arrayFormat:S,charset:A,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:c.charsetSentinel,commaRoundTrip:m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?c.delimiter:m.delimiter,encode:typeof m.encode=="boolean"?m.encode:c.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:c.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:c.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:c.encodeValuesOnly,filter:v,format:_,formatter:d,serializeDate:typeof m.serializeDate=="function"?m.serializeDate:c.serializeDate,skipNulls:typeof m.skipNulls=="boolean"?m.skipNulls:c.skipNulls,sort:typeof m.sort=="function"?m.sort:null,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:c.strictNullHandling}};return Br=function(m,A){var _=m,d=h(A),v,S;typeof d.filter=="function"?(S=d.filter,_=S("",_)):t(d.filter)&&(S=d.filter,v=S);var b=[];if(typeof _!="object"||_===null)return"";var x=a[d.arrayFormat],E=x==="comma"&&d.commaRoundTrip;v||(v=Object.keys(_)),d.sort&&v.sort(d.sort);for(var C=l(),M=0;M<v.length;++M){var P=v[M];d.skipNulls&&_[P]===null||n(b,y(_[P],P,x,E,d.allowEmptyArrays,d.strictNullHandling,d.skipNulls,d.encodeDotInKeys,d.encode?d.encoder:null,d.filter,d.sort,d.allowDots,d.serializeDate,d.format,d.formatter,d.encodeValuesOnly,d.charset,C))}var F=b.join(d.delimiter),k=d.addQueryPrefix===!0?"?":"";return d.charsetSentinel&&(d.charset==="iso-8859-1"?k+="utf8=%26%2310003%3B&":k+="utf8=%E2%9C%93&"),F.length>0?k+F:""},Br}function xf(){if(ri)return Mr;ri=!0;var l=Pa(),u=Object.prototype.hasOwnProperty,s=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:l.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},a=function(g){return g.replace(/&#(\d+);/g,function(y,h){return String.fromCharCode(parseInt(h,10))})},t=function(g,y){return g&&typeof g=="string"&&y.comma&&g.indexOf(",")>-1?g.split(","):g},e="utf8=%26%2310003%3B",n="utf8=%E2%9C%93",r=function(g,y){var h={__proto__:null},m=y.ignoreQueryPrefix?g.replace(/^\?/,""):g;m=m.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var A=y.parameterLimit===1/0?void 0:y.parameterLimit,_=m.split(y.delimiter,A),d=-1,v,S=y.charset;if(y.charsetSentinel)for(v=0;v<_.length;++v)_[v].indexOf("utf8=")===0&&(_[v]===n?S="utf-8":_[v]===e&&(S="iso-8859-1"),d=v,v=_.length);for(v=0;v<_.length;++v)if(v!==d){var b=_[v],x=b.indexOf("]="),E=x===-1?b.indexOf("="):x+1,C,M;E===-1?(C=y.decoder(b,i.decoder,S,"key"),M=y.strictNullHandling?null:""):(C=y.decoder(b.slice(0,E),i.decoder,S,"key"),M=l.maybeMap(t(b.slice(E+1),y),function(F){return y.decoder(F,i.decoder,S,"value")})),M&&y.interpretNumericEntities&&S==="iso-8859-1"&&(M=a(M)),b.indexOf("[]=")>-1&&(M=s(M)?[M]:M);var P=u.call(h,C);P&&y.duplicates==="combine"?h[C]=l.combine(h[C],M):(!P||y.duplicates==="last")&&(h[C]=M)}return h},o=function(g,y,h,m){for(var A=m?y:t(y,h),_=g.length-1;_>=0;--_){var d,v=g[_];if(v==="[]"&&h.parseArrays)d=h.allowEmptyArrays&&(A===""||h.strictNullHandling&&A===null)?[]:[].concat(A);else{d=h.plainObjects?Object.create(null):{};var S=v.charAt(0)==="["&&v.charAt(v.length-1)==="]"?v.slice(1,-1):v,b=h.decodeDotInKeys?S.replace(/%2E/g,"."):S,x=parseInt(b,10);!h.parseArrays&&b===""?d={0:A}:!isNaN(x)&&v!==b&&String(x)===b&&x>=0&&h.parseArrays&&x<=h.arrayLimit?(d=[],d[x]=A):b!=="__proto__"&&(d[b]=A)}A=d}return A},c=function(g,y,h,m){if(g){var A=h.allowDots?g.replace(/\.([^.[]+)/g,"[$1]"):g,_=/(\[[^[\]]*])/,d=/(\[[^[\]]*])/g,v=h.depth>0&&_.exec(A),S=v?A.slice(0,v.index):A,b=[];if(S){if(!h.plainObjects&&u.call(Object.prototype,S)&&!h.allowPrototypes)return;b.push(S)}for(var x=0;h.depth>0&&(v=d.exec(A))!==null&&x<h.depth;){if(x+=1,!h.plainObjects&&u.call(Object.prototype,v[1].slice(1,-1))&&!h.allowPrototypes)return;b.push(v[1])}if(v){if(h.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+h.depth+" and strictDepth is true");b.push("["+A.slice(v.index)+"]")}return o(b,y,h,m)}},p=function(g){if(!g)return i;if(typeof g.allowEmptyArrays<"u"&&typeof g.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof g.decodeDotInKeys<"u"&&typeof g.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(g.decoder!==null&&typeof g.decoder<"u"&&typeof g.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=typeof g.charset>"u"?i.charset:g.charset,h=typeof g.duplicates>"u"?i.duplicates:g.duplicates;if(h!=="combine"&&h!=="first"&&h!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var m=typeof g.allowDots>"u"?g.decodeDotInKeys===!0?!0:i.allowDots:!!g.allowDots;return{allowDots:m,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:typeof g.allowPrototypes=="boolean"?g.allowPrototypes:i.allowPrototypes,allowSparse:typeof g.allowSparse=="boolean"?g.allowSparse:i.allowSparse,arrayLimit:typeof g.arrayLimit=="number"?g.arrayLimit:i.arrayLimit,charset:y,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:i.charsetSentinel,comma:typeof g.comma=="boolean"?g.comma:i.comma,decodeDotInKeys:typeof g.decodeDotInKeys=="boolean"?g.decodeDotInKeys:i.decodeDotInKeys,decoder:typeof g.decoder=="function"?g.decoder:i.decoder,delimiter:typeof g.delimiter=="string"||l.isRegExp(g.delimiter)?g.delimiter:i.delimiter,depth:typeof g.depth=="number"||g.depth===!1?+g.depth:i.depth,duplicates:h,ignoreQueryPrefix:g.ignoreQueryPrefix===!0,interpretNumericEntities:typeof g.interpretNumericEntities=="boolean"?g.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:typeof g.parameterLimit=="number"?g.parameterLimit:i.parameterLimit,parseArrays:g.parseArrays!==!1,plainObjects:typeof g.plainObjects=="boolean"?g.plainObjects:i.plainObjects,strictDepth:typeof g.strictDepth=="boolean"?!!g.strictDepth:i.strictDepth,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:i.strictNullHandling}};return Mr=function(g,y){var h=p(y);if(g===""||g===null||typeof g>"u")return h.plainObjects?Object.create(null):{};for(var m=typeof g=="string"?r(g,h):g,A=h.plainObjects?Object.create(null):{},_=Object.keys(m),d=0;d<_.length;++d){var v=_[d],S=c(v,m[v],h,typeof g=="string");A=l.merge(A,S,h)}return h.allowSparse===!0?A:l.compact(A)},Mr}function If(){if(ni)return Rr;ni=!0;var l=Sf(),u=xf(),s=Jo();return Rr={formats:s,parse:u,stringify:l},Rr}function Cf(){if(oi)return bt;oi=!0;var l=At;function u(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var s=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,t=["<",">",'"',"`"," ","\r",`
8
+ `," "],e=["{","}","|","\\","^","`"].concat(t),n=["'"].concat(e),r=["%","/","?",";","#"].concat(n),o=["/","?","#"],c=255,p=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},h={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},A=If();function _(b,x,E){if(b&&typeof b=="object"&&b instanceof u)return b;var C=new u;return C.parse(b,x,E),C}u.prototype.parse=function(b,x,E){if(typeof b!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof b);var C=b.indexOf("?"),M=C!==-1&&C<b.indexOf("#")?"?":"#",P=b.split(M),F=/\\/g;P[0]=P[0].replace(F,"/"),b=P.join(M);var k=b;if(k=k.trim(),!E&&b.split("#").length===1){var V=a.exec(k);if(V)return this.path=k,this.href=k,this.pathname=V[1],V[2]?(this.search=V[2],x?this.query=A.parse(this.search.substr(1)):this.query=this.search.substr(1)):x&&(this.search="",this.query={}),this}var L=s.exec(k);if(L){L=L[0];var N=L.toLowerCase();this.protocol=N,k=k.substr(L.length)}if(E||L||k.match(/^\/\/[^@/]+@[^@/]+/)){var le=k.substr(0,2)==="//";le&&!(L&&h[L])&&(k=k.substr(2),this.slashes=!0)}if(!h[L]&&(le||L&&!m[L])){for(var J=-1,H=0;H<o.length;H++){var ne=k.indexOf(o[H]);ne!==-1&&(J===-1||ne<J)&&(J=ne)}var W,ee;J===-1?ee=k.lastIndexOf("@"):ee=k.lastIndexOf("@",J),ee!==-1&&(W=k.slice(0,ee),k=k.slice(ee+1),this.auth=decodeURIComponent(W)),J=-1;for(var H=0;H<r.length;H++){var ne=k.indexOf(r[H]);ne!==-1&&(J===-1||ne<J)&&(J=ne)}J===-1&&(J=k.length),this.host=k.slice(0,J),k=k.slice(J),this.parseHost(),this.hostname=this.hostname||"";var B=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!B)for(var Z=this.hostname.split(/\./),H=0,ye=Z.length;H<ye;H++){var re=Z[H];if(re&&!re.match(p)){for(var ve="",z=0,U=re.length;z<U;z++)re.charCodeAt(z)>127?ve+="x":ve+=re[z];if(!ve.match(p)){var oe=Z.slice(0,H),q=Z.slice(H+1),G=re.match(g);G&&(oe.push(G[1]),q.unshift(G[2])),q.length&&(k="/"+q.join(".")+k),this.hostname=oe.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),B||(this.hostname=l.toASCII(this.hostname));var Y=this.port?":"+this.port:"",Ae=this.hostname||"";this.host=Ae+Y,this.href+=this.host,B&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),k[0]!=="/"&&(k="/"+k))}if(!y[N])for(var H=0,ye=n.length;H<ye;H++){var se=n[H];if(k.indexOf(se)!==-1){var R=encodeURIComponent(se);R===se&&(R=escape(se)),k=k.split(se).join(R)}}var K=k.indexOf("#");K!==-1&&(this.hash=k.substr(K),k=k.slice(0,K));var te=k.indexOf("?");if(te!==-1?(this.search=k.substr(te),this.query=k.substr(te+1),x&&(this.query=A.parse(this.query)),k=k.slice(0,te)):x&&(this.search="",this.query={}),k&&(this.pathname=k),m[N]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Y=this.pathname||"",de=this.search||"";this.path=Y+de}return this.href=this.format(),this};function d(b){return typeof b=="string"&&(b=_(b)),b instanceof u?b.format():u.prototype.format.call(b)}u.prototype.format=function(){var b=this.auth||"";b&&(b=encodeURIComponent(b),b=b.replace(/%3A/i,":"),b+="@");var x=this.protocol||"",E=this.pathname||"",C=this.hash||"",M=!1,P="";this.host?M=b+this.host:this.hostname&&(M=b+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(M+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(P=A.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var F=this.search||P&&"?"+P||"";return x&&x.substr(-1)!==":"&&(x+=":"),this.slashes||(!x||m[x])&&M!==!1?(M="//"+(M||""),E&&E.charAt(0)!=="/"&&(E="/"+E)):M||(M=""),C&&C.charAt(0)!=="#"&&(C="#"+C),F&&F.charAt(0)!=="?"&&(F="?"+F),E=E.replace(/[?#]/g,function(k){return encodeURIComponent(k)}),F=F.replace("#","%23"),x+M+E+F+C};function v(b,x){return _(b,!1,!0).resolve(x)}u.prototype.resolve=function(b){return this.resolveObject(_(b,!1,!0)).format()};function S(b,x){return b?_(b,!1,!0).resolveObject(x):x}return u.prototype.resolveObject=function(b){if(typeof b=="string"){var x=new u;x.parse(b,!1,!0),b=x}for(var E=new u,C=Object.keys(this),M=0;M<C.length;M++){var P=C[M];E[P]=this[P]}if(E.hash=b.hash,b.href==="")return E.href=E.format(),E;if(b.slashes&&!b.protocol){for(var F=Object.keys(b),k=0;k<F.length;k++){var V=F[k];V!=="protocol"&&(E[V]=b[V])}return m[E.protocol]&&E.hostname&&!E.pathname&&(E.pathname="/",E.path=E.pathname),E.href=E.format(),E}if(b.protocol&&b.protocol!==E.protocol){if(!m[b.protocol]){for(var L=Object.keys(b),N=0;N<L.length;N++){var le=L[N];E[le]=b[le]}return E.href=E.format(),E}if(E.protocol=b.protocol,!b.host&&!h[b.protocol]){for(var ye=(b.pathname||"").split("/");ye.length&&!(b.host=ye.shift()););b.host||(b.host=""),b.hostname||(b.hostname=""),ye[0]!==""&&ye.unshift(""),ye.length<2&&ye.unshift(""),E.pathname=ye.join("/")}else E.pathname=b.pathname;if(E.search=b.search,E.query=b.query,E.host=b.host||"",E.auth=b.auth,E.hostname=b.hostname||b.host,E.port=b.port,E.pathname||E.search){var J=E.pathname||"",H=E.search||"";E.path=J+H}return E.slashes=E.slashes||b.slashes,E.href=E.format(),E}var ne=E.pathname&&E.pathname.charAt(0)==="/",W=b.host||b.pathname&&b.pathname.charAt(0)==="/",ee=W||ne||E.host&&b.pathname,B=ee,Z=E.pathname&&E.pathname.split("/")||[],ye=b.pathname&&b.pathname.split("/")||[],re=E.protocol&&!m[E.protocol];if(re&&(E.hostname="",E.port=null,E.host&&(Z[0]===""?Z[0]=E.host:Z.unshift(E.host)),E.host="",b.protocol&&(b.hostname=null,b.port=null,b.host&&(ye[0]===""?ye[0]=b.host:ye.unshift(b.host)),b.host=null),ee=ee&&(ye[0]===""||Z[0]==="")),W)E.host=b.host||b.host===""?b.host:E.host,E.hostname=b.hostname||b.hostname===""?b.hostname:E.hostname,E.search=b.search,E.query=b.query,Z=ye;else if(ye.length)Z||(Z=[]),Z.pop(),Z=Z.concat(ye),E.search=b.search,E.query=b.query;else if(b.search!=null){if(re){E.host=Z.shift(),E.hostname=E.host;var ve=E.host&&E.host.indexOf("@")>0?E.host.split("@"):!1;ve&&(E.auth=ve.shift(),E.hostname=ve.shift(),E.host=E.hostname)}return E.search=b.search,E.query=b.query,(E.pathname!==null||E.search!==null)&&(E.path=(E.pathname?E.pathname:"")+(E.search?E.search:"")),E.href=E.format(),E}if(!Z.length)return E.pathname=null,E.search?E.path="/"+E.search:E.path=null,E.href=E.format(),E;for(var z=Z.slice(-1)[0],U=(E.host||b.host||Z.length>1)&&(z==="."||z==="..")||z==="",oe=0,q=Z.length;q>=0;q--)z=Z[q],z==="."?Z.splice(q,1):z===".."?(Z.splice(q,1),oe++):oe&&(Z.splice(q,1),oe--);if(!ee&&!B)for(;oe--;oe)Z.unshift("..");ee&&Z[0]!==""&&(!Z[0]||Z[0].charAt(0)!=="/")&&Z.unshift(""),U&&Z.join("/").substr(-1)!=="/"&&Z.push("");var G=Z[0]===""||Z[0]&&Z[0].charAt(0)==="/";if(re){E.hostname=G?"":Z.length?Z.shift():"",E.host=E.hostname;var ve=E.host&&E.host.indexOf("@")>0?E.host.split("@"):!1;ve&&(E.auth=ve.shift(),E.hostname=ve.shift(),E.host=E.hostname)}return ee=ee||E.host&&Z.length,ee&&!G&&Z.unshift(""),Z.length>0?E.pathname=Z.join("/"):(E.pathname=null,E.path=null),(E.pathname!==null||E.search!==null)&&(E.path=(E.pathname?E.pathname:"")+(E.search?E.search:"")),E.auth=b.auth||E.auth,E.slashes=E.slashes||b.slashes,E.href=E.format(),E},u.prototype.parseHost=function(){var b=this.host,x=i.exec(b);x&&(x=x[0],x!==":"&&(this.port=x.substr(1)),b=b.substr(0,b.length-x.length)),b&&(this.hostname=b)},bt.parse=_,bt.resolve=v,bt.resolveObject=S,bt.format=d,bt.Url=u,bt}function Ba(l){if(typeof l=="string")l=new URL(l);else if(!(l instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(l.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return Dr?kf(l):Tf(l)}function kf(l){let u=l.hostname,s=l.pathname;for(let i=0;i<s.length;i++)if(s[i]==="%"){let a=s.codePointAt(i+2)||32;if(s[i+1]==="2"&&a===102||s[i+1]==="5"&&a===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(s=s.replace($a,"\\"),s=decodeURIComponent(s),u!=="")return`\\\\${u}${s}`;{let i=s.codePointAt(1)|32,a=s[2];if(i<Qa||i>qa||a!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return s.slice(1)}}function Tf(l){if(l.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let u=l.pathname;for(let s=0;s<u.length;s++)if(u[s]==="%"){let i=u.codePointAt(s+2)||32;if(u[s+1]==="2"&&i===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(u)}function Ma(l){let u=Go.resolve(l),s=l.charCodeAt(l.length-1);(s===Va||Dr&&s===Ka)&&u[u.length-1]!==Go.sep&&(u+="/");let i=new URL("file://");return u.includes("%")&&(u=u.replace(Ha,"%25")),!Dr&&u.includes("\\")&&(u=u.replace(za,"%5C")),u.includes(`
9
+ `)&&(u=u.replace(Ga,"%0A")),u.includes("\r")&&(u=u.replace(Ja,"%0D")),u.includes(" ")&&(u=u.replace(Ya,"%09")),i.pathname=u,i}var Ra,Cr,Yo,kr,Tr,Zo,Or,Xo,Pr,ei,Br,ti,Mr,ri,Rr,ni,bt,oi,Ke,Da,Ua,Na,ja,Fa,La,Wa,Ka,Va,Qa,qa,Dr,$a,Ha,za,Ga,Ja,Ya,Of=$e(()=>{ue(),fe(),ce(),$c(),uf(),vf(),Ta(),Ra=Object.freeze(Object.create(null)),Cr={},Yo=!1,kr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Tr={},Zo=!1,Or={},Xo=!1,Pr={},ei=!1,Br={},ti=!1,Mr={},ri=!1,Rr={},ni=!1,bt={},oi=!1,Ke=Cf(),Ke.parse,Ke.resolve,Ke.resolveObject,Ke.format,Ke.Url,Da=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,Ke.URL=typeof URL<"u"?URL:null,Ke.pathToFileURL=Ma,Ke.fileURLToPath=Ba,Ua=Ke.Url,Na=Ke.format,ja=Ke.resolve,Fa=Ke.resolveObject,La=Ke.parse,Wa=Ke.URL,Ka=92,Va=47,Qa=97,qa=122,Dr=Da==="win32",$a=/\//g,Ha=/%/g,za=/\\/g,Ga=/\n/g,Ja=/\r/g,Ya=/\t/g}),Pf=ge((l,u)=>{ue(),fe(),ce(),u.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}),ii=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0}),l.BufferedDuplex=void 0,l.writev=i;var u=It(),s=(Fe(),Be(je));function i(t,e){let n=new Array(t.length);for(let r=0;r<t.length;r++)typeof t[r].chunk=="string"?n[r]=s.Buffer.from(t[r].chunk,"utf8"):n[r]=t[r].chunk;this._write(s.Buffer.concat(n),"binary",e)}var a=class extends u.Duplex{socket;proxy;isSocketOpen;writeQueue;constructor(t,e,n){super({objectMode:!0}),this.proxy=e,this.socket=n,this.writeQueue=[],t.objectMode||(this._writev=i.bind(this)),this.isSocketOpen=!1,this.proxy.on("data",r=>{!this.destroyed&&this.readable&&this.push(r)})}_read(t){this.proxy.read(t)}_write(t,e,n){this.isSocketOpen?this.writeToProxy(t,e,n):this.writeQueue.push({chunk:t,encoding:e,cb:n})}_final(t){this.writeQueue=[],this.proxy.end(t)}_destroy(t,e){this.writeQueue=[],this.proxy.destroy(),e(t)}socketReady(){this.emit("connect"),this.isSocketOpen=!0,this.processWriteQueue()}writeToProxy(t,e,n){this.proxy.write(t,e)===!1?this.proxy.once("drain",n):n()}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:t,encoding:e,cb:n}=this.writeQueue.shift();this.writeToProxy(t,e,n)}}};l.BufferedDuplex=a}),Ur=ge(l=>{ue(),fe(),ce();var u=l&&l.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(l,"__esModule",{value:!0}),l.streamBuilder=l.browserStreamBuilder=void 0;var s=(Fe(),Be(je)),i=u(Pf()),a=u(ut()),t=It(),e=u(cr()),n=ii(),r=(0,a.default)("mqttjs:ws"),o=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];function c(_,d){let v=`${_.protocol}://${_.hostname}:${_.port}${_.path}`;return typeof _.transformWsUrl=="function"&&(v=_.transformWsUrl(v,_,d)),v}function p(_){let d=_;return _.port||(_.protocol==="wss"?d.port=443:d.port=80),_.path||(d.path="/"),_.wsOptions||(d.wsOptions={}),!e.default&&!_.forceNativeWebSocket&&_.protocol==="wss"&&o.forEach(v=>{Object.prototype.hasOwnProperty.call(_,v)&&!Object.prototype.hasOwnProperty.call(_.wsOptions,v)&&(d.wsOptions[v]=_[v])}),d}function g(_){let d=p(_);if(d.hostname||(d.hostname=d.host),!d.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let v=new URL(document.URL);d.hostname=v.hostname,d.port||(d.port=Number(v.port))}return d.objectMode===void 0&&(d.objectMode=!(d.binary===!0||d.binary===void 0)),d}function y(_,d,v){r("createWebSocket"),r(`protocol: ${v.protocolId} ${v.protocolVersion}`);let S=v.protocolId==="MQIsdp"&&v.protocolVersion===3?"mqttv3.1":"mqtt";r(`creating new Websocket for url: ${d} and protocol: ${S}`);let b;return v.createWebsocket?b=v.createWebsocket(d,[S],v):b=new i.default(d,[S],v.wsOptions),b}function h(_,d){let v=d.protocolId==="MQIsdp"&&d.protocolVersion===3?"mqttv3.1":"mqtt",S=c(d,_),b;return d.createWebsocket?b=d.createWebsocket(S,[v],d):b=new WebSocket(S,[v]),b.binaryType="arraybuffer",b}var m=(_,d)=>{r("streamBuilder");let v=p(d);v.hostname=v.hostname||v.host||"localhost";let S=c(v,_),b=y(_,S,v),x=i.default.createWebSocketStream(b,v.wsOptions);return x.url=S,b.on("close",()=>{x.destroy()}),x};l.streamBuilder=m;var A=(_,d)=>{r("browserStreamBuilder");let v,S=g(d).browserBufferSize||1024*512,b=d.browserBufferTimeout||1e3,x=!d.objectMode,E=h(_,d),C=P(d,N,le);d.objectMode||(C._writev=n.writev.bind(C)),C.on("close",()=>{E.close()});let M=typeof E.addEventListener<"u";E.readyState===E.OPEN?(v=C,v.socket=E):(v=new n.BufferedDuplex(d,C,E),M?E.addEventListener("open",F):E.onopen=F),M?(E.addEventListener("close",k),E.addEventListener("error",V),E.addEventListener("message",L)):(E.onclose=k,E.onerror=V,E.onmessage=L);function P(J,H,ne){let W=new t.Transform({objectMode:J.objectMode});return W._write=H,W._flush=ne,W}function F(){r("WebSocket onOpen"),v instanceof n.BufferedDuplex&&v.socketReady()}function k(J){r("WebSocket onClose",J),v.end(),v.destroy()}function V(J){r("WebSocket onError",J);let H=new Error("WebSocket error");H.event=J,v.destroy(H)}async function L(J){if(!C||!C.readable||!C.writable)return;let{data:H}=J;H instanceof ArrayBuffer?H=s.Buffer.from(H):H instanceof Blob?H=s.Buffer.from(await new Response(H).arrayBuffer()):H=s.Buffer.from(H,"utf8"),C.push(H)}function N(J,H,ne){if(E.bufferedAmount>S){setTimeout(N,b,J,H,ne);return}x&&typeof J=="string"&&(J=s.Buffer.from(J,"utf8"));try{E.send(J)}catch(W){return ne(W)}ne()}function le(J){E.close(),J()}return v};l.browserStreamBuilder=A}),si={};Pt(si,{Server:()=>Re,Socket:()=>Re,Stream:()=>Re,_createServerHandle:()=>Re,_normalizeArgs:()=>Re,_setSimultaneousAccepts:()=>Re,connect:()=>Re,createConnection:()=>Re,createServer:()=>Re,default:()=>Za,isIP:()=>Re,isIPv4:()=>Re,isIPv6:()=>Re});function Re(){throw new Error("Node.js net module is not supported by JSPM core outside of Node.js")}var Za,Xa=$e(()=>{ue(),fe(),ce(),Za={_createServerHandle:Re,_normalizeArgs:Re,_setSimultaneousAccepts:Re,connect:Re,createConnection:Re,createServer:Re,isIP:Re,isIPv4:Re,isIPv6:Re,Server:Re,Socket:Re,Stream:Re}}),el=ge((l,u)=>{ue(),fe(),ce(),u.exports={}}),tl=ge(l=>{ue(),fe(),ce();var u=l&&l.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(l,"__esModule",{value:!0});var s=u((Xa(),Be(si))),i=u(ut()),a=u(el()),t=(0,i.default)("mqttjs:tcp"),e=(n,r)=>{if(r.port=r.port||1883,r.hostname=r.hostname||r.host||"localhost",r.socksProxy)return(0,a.default)(r.hostname,r.port,r.socksProxy,{timeout:r.socksTimeout});let{port:o,path:c}=r,p=r.hostname;return t("port %d and host %s",o,p),s.default.createConnection({port:o,host:p,path:c})};l.default=e}),rl={};Pt(rl,{default:()=>nl});var nl,Bf=$e(()=>{ue(),fe(),ce(),nl={}}),ol=ge(l=>{ue(),fe(),ce();var u=l&&l.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(l,"__esModule",{value:!0});var s=(Bf(),Be(rl)),i=u((Xa(),Be(si))),a=u(ut()),t=u(el()),e=(0,a.default)("mqttjs:tls");function n(o){let{host:c,port:p,socksProxy:g,...y}=o;if(g!==void 0){let h=(0,t.default)(c,p,g,{timeout:o.socksTimeout});return(0,s.connect)({...y,socket:h})}return(0,s.connect)(o)}var r=(o,c)=>{c.port=c.port||8883,c.host=c.hostname||c.host||"localhost",i.default.isIP(c.host)===0&&(c.servername=c.host),c.rejectUnauthorized=c.rejectUnauthorized!==!1,delete c.path,e("port %d host %s rejectUnauthorized %b",c.port,c.host,c.rejectUnauthorized);let p=n(c);p.on("secureConnect",()=>{c.rejectUnauthorized&&!p.authorized?p.emit("error",new Error("TLS not authorized")):p.removeListener("error",g)});function g(y){c.rejectUnauthorized&&o.emit("error",y),p.end()}return p.on("error",g),p};l.default=r}),il=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0});var u=(Fe(),Be(je)),s=It(),i=ii(),a,t,e;function n(){let g=new s.Transform;return g._write=(y,h,m)=>{a.send({data:y.buffer,success(){m()},fail(A){m(new Error(A))}})},g._flush=y=>{a.close({success(){y()}})},g}function r(g){g.hostname||(g.hostname="localhost"),g.path||(g.path="/"),g.wsOptions||(g.wsOptions={})}function o(g,y){let h=g.protocol==="wxs"?"wss":"ws",m=`${h}://${g.hostname}${g.path}`;return g.port&&g.port!==80&&g.port!==443&&(m=`${h}://${g.hostname}:${g.port}${g.path}`),typeof g.transformWsUrl=="function"&&(m=g.transformWsUrl(m,g,y)),m}function c(){a.onOpen(()=>{e.socketReady()}),a.onMessage(g=>{let{data:y}=g;y instanceof ArrayBuffer?y=u.Buffer.from(y):y=u.Buffer.from(y,"utf8"),t.push(y)}),a.onClose(()=>{e.emit("close"),e.end(),e.destroy()}),a.onError(g=>{let y=new Error(g.errMsg);e.destroy(y)})}var p=(g,y)=>{if(y.hostname=y.hostname||y.host,!y.hostname)throw new Error("Could not determine host. Specify host manually.");let h=y.protocolId==="MQIsdp"&&y.protocolVersion===3?"mqttv3.1":"mqtt";r(y);let m=o(y,g);a=wx.connectSocket({url:m,protocols:[h]}),t=n(),e=new i.BufferedDuplex(y,t,a),e._destroy=(_,d)=>{a.close({success(){d&&d(_)}})};let A=e.destroy;return e.destroy=(_,d)=>(e.destroy=A,setTimeout(()=>{a.close({fail(){e._destroy(_,d)}})},0),e),c(),e};l.default=p}),sl=ge(l=>{ue(),fe(),ce(),Object.defineProperty(l,"__esModule",{value:!0});var u=(Fe(),Be(je)),s=It(),i=ii(),a,t,e,n=!1;function r(){let y=new s.Transform;return y._write=(h,m,A)=>{a.sendSocketMessage({data:h.buffer,success(){A()},fail(){A(new Error)}})},y._flush=h=>{a.closeSocket({success(){h()}})},y}function o(y){y.hostname||(y.hostname="localhost"),y.path||(y.path="/"),y.wsOptions||(y.wsOptions={})}function c(y,h){let m=y.protocol==="alis"?"wss":"ws",A=`${m}://${y.hostname}${y.path}`;return y.port&&y.port!==80&&y.port!==443&&(A=`${m}://${y.hostname}:${y.port}${y.path}`),typeof y.transformWsUrl=="function"&&(A=y.transformWsUrl(A,y,h)),A}function p(){n||(n=!0,a.onSocketOpen(()=>{e.socketReady()}),a.onSocketMessage(y=>{if(typeof y.data=="string"){let h=u.Buffer.from(y.data,"base64");t.push(h)}else{let h=new FileReader;h.addEventListener("load",()=>{if(h.result instanceof ArrayBuffer){t.push(u.Buffer.from(h.result));return}t.push(u.Buffer.from(h.result,"utf-8"))}),h.readAsArrayBuffer(y.data)}}),a.onSocketClose(()=>{e.end(),e.destroy()}),a.onSocketError(y=>{e.destroy(y)}))}var g=(y,h)=>{if(h.hostname=h.hostname||h.host,!h.hostname)throw new Error("Could not determine host. Specify host manually.");let m=h.protocolId==="MQIsdp"&&h.protocolVersion===3?"mqttv3.1":"mqtt";o(h);let A=c(h,y);return a=h.my,a.connectSocket({url:A,protocols:m}),t=r(),e=new i.BufferedDuplex(h,t,a),p(),e};l.default=g}),Mf=ge(l=>{ue(),fe(),ce();var u=l&&l.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(l,"__esModule",{value:!0}),l.connectAsync=c;var s=u(ut()),i=u((Of(),Be(Oa))),a=u(co()),t=u(cr());typeof Me?.nextTick!="function"&&(Me.nextTick=setImmediate);var e=(0,s.default)("mqttjs"),n=null;function r(p){let g;if(p.auth)if(g=p.auth.match(/^(.+):(.+)$/),g){let[,y,h]=g;p.username=y,p.password=h}else p.username=p.auth}function o(p,g){if(e("connecting to an MQTT broker..."),typeof p=="object"&&!g&&(g=p,p=""),g=g||{},p&&typeof p=="string"){let m=i.default.parse(p,!0),A={};if(m.port!=null&&(A.port=Number(m.port)),A.host=m.hostname,A.query=m.query,A.auth=m.auth,A.protocol=m.protocol,A.path=m.path,g={...A,...g},!g.protocol)throw new Error("Missing protocol");g.protocol=g.protocol.replace(/:$/,"")}if(g.unixSocket=g.unixSocket||g.protocol?.includes("+unix"),g.unixSocket?g.protocol=g.protocol.replace("+unix",""):!g.protocol?.startsWith("ws")&&!g.protocol?.startsWith("wx")&&delete g.path,r(g),g.query&&typeof g.query.clientId=="string"&&(g.clientId=g.query.clientId),t.default||g.unixSocket?g.socksProxy=void 0:g.socksProxy===void 0&&typeof Me<"u"&&(g.socksProxy=Me.env.MQTTJS_SOCKS_PROXY),g.cert&&g.key)if(g.protocol){if(["mqtts","wss","wxs","alis"].indexOf(g.protocol)===-1)switch(g.protocol){case"mqtt":g.protocol="mqtts";break;case"ws":g.protocol="wss";break;case"wx":g.protocol="wxs";break;case"ali":g.protocol="alis";break;default:throw new Error(`Unknown protocol for secure connection: "${g.protocol}"!`)}}else throw new Error("Missing secure protocol key");if(n||(n={},!t.default&&!g.forceNativeWebSocket?(n.ws=Ur().streamBuilder,n.wss=Ur().streamBuilder,n.mqtt=tl().default,n.tcp=tl().default,n.ssl=ol().default,n.tls=n.ssl,n.mqtts=ol().default):(n.ws=Ur().browserStreamBuilder,n.wss=Ur().browserStreamBuilder,n.wx=il().default,n.wxs=il().default,n.ali=sl().default,n.alis=sl().default)),!n[g.protocol]){let m=["mqtts","wss"].indexOf(g.protocol)!==-1;g.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((A,_)=>m&&_%2===0?!1:typeof n[A]=="function")[0]}if(g.clean===!1&&!g.clientId)throw new Error("Missing clientId for unclean clients");g.protocol&&(g.defaultProtocol=g.protocol);function y(m){return g.servers&&((!m._reconnectCount||m._reconnectCount===g.servers.length)&&(m._reconnectCount=0),g.host=g.servers[m._reconnectCount].host,g.port=g.servers[m._reconnectCount].port,g.protocol=g.servers[m._reconnectCount].protocol?g.servers[m._reconnectCount].protocol:g.defaultProtocol,g.hostname=g.host,m._reconnectCount++),e("calling streambuilder for",g.protocol),n[g.protocol](m,g)}let h=new a.default(y,g);return h.on("error",()=>{}),h}function c(p,g,y=!0){return new Promise((h,m)=>{let A=o(p,g),_={connect:v=>{d(),h(A)},end:()=>{d(),h(A)},error:v=>{d(),A.end(),m(v)}};y===!1&&(_.close=()=>{_.error(new Error("Couldn't connect to server"))});function d(){Object.keys(_).forEach(v=>{A.off(v,_[v])})}Object.keys(_).forEach(v=>{A.on(v,_[v])})})}l.default=o}),al=ge(l=>{ue(),fe(),ce();var u=l&&l.__createBinding||(Object.create?function(y,h,m,A){A===void 0&&(A=m);var _=Object.getOwnPropertyDescriptor(h,m);(!_||("get"in _?!h.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return h[m]}}),Object.defineProperty(y,A,_)}:function(y,h,m,A){A===void 0&&(A=m),y[A]=h[m]}),s=l&&l.__setModuleDefault||(Object.create?function(y,h){Object.defineProperty(y,"default",{enumerable:!0,value:h})}:function(y,h){y.default=h}),i=l&&l.__importStar||(function(){var y=function(h){return y=Object.getOwnPropertyNames||function(m){var A=[];for(var _ in m)Object.prototype.hasOwnProperty.call(m,_)&&(A[A.length]=_);return A},y(h)};return function(h){if(h&&h.__esModule)return h;var m={};if(h!=null)for(var A=y(h),_=0;_<A.length;_++)A[_]!=="default"&&u(m,h,A[_]);return s(m,h),m}})(),a=l&&l.__exportStar||function(y,h){for(var m in y)m!=="default"&&!Object.prototype.hasOwnProperty.call(h,m)&&u(h,y,m)},t=l&&l.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(l,"__esModule",{value:!0}),l.ReasonCodes=l.KeepaliveManager=l.UniqueMessageIdProvider=l.DefaultMessageIdProvider=l.Store=l.MqttClient=l.connectAsync=l.connect=l.Client=void 0;var e=t(co());l.MqttClient=e.default;var n=t(ps());l.DefaultMessageIdProvider=n.default;var r=t(Qc());l.UniqueMessageIdProvider=r.default;var o=t(as());l.Store=o.default;var c=i(Mf());l.connect=c.default,Object.defineProperty(l,"connectAsync",{enumerable:!0,get:function(){return c.connectAsync}});var p=t(vs());l.KeepaliveManager=p.default,l.Client=e.default,a(co(),l),a(Dt(),l);var g=lr();Object.defineProperty(l,"ReasonCodes",{enumerable:!0,get:function(){return g.ReasonCodes}})}),Rf=ge(l=>{ue(),fe(),ce();var u=l&&l.__createBinding||(Object.create?function(e,n,r,o){o===void 0&&(o=r);var c=Object.getOwnPropertyDescriptor(n,r);(!c||("get"in c?!n.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(e,o,c)}:function(e,n,r,o){o===void 0&&(o=r),e[o]=n[r]}),s=l&&l.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),i=l&&l.__importStar||(function(){var e=function(n){return e=Object.getOwnPropertyNames||function(r){var o=[];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(o[o.length]=c);return o},e(n)};return function(n){if(n&&n.__esModule)return n;var r={};if(n!=null)for(var o=e(n),c=0;c<o.length;c++)o[c]!=="default"&&u(r,n,o[c]);return s(r,n),r}})(),a=l&&l.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&u(n,e,r)};Object.defineProperty(l,"__esModule",{value:!0});var t=i(al());l.default=t,a(al(),l)});const Df=Rf();const Uf=async l=>{if(l.host&&l.port&&!await Nf(l.host,l.port))return;const u=O.ref(),s=O.ref({});return O.onMounted(()=>{u.value=Df.connect(l),l.topics||(l.topics=["#"]);for(const i of l.topics)u.value.subscribe(i,a=>{if(a)throw a});u.value.on("message",(i,a)=>{s.value[i]||(s.value[i]=[]),s.value[i].push(a.toString())})}),O.onUnmounted(()=>{u.value?.end()}),{messages:s}},Nf=async(l,u)=>{try{const s=new AbortController,i=setTimeout(()=>s.abort(),2e3);try{return await fetch(`${l}:${u}`,{mode:"no-cors",signal:s.signal}),clearTimeout(i),!0}catch(a){if(clearTimeout(i),a instanceof DOMException&&a.name==="AbortError")return!1;const t=String(a);return!(t.includes("NetworkError")||t.includes("Failed to fetch")||t.includes("net::ERR_CONNECTION_REFUSED"))}}catch{return!1}};function jf(l){l.component("ActionFooter",ci),l.component("BeamArrow",fi),l.component("BeamBtn",hi),l.component("BeamDayDivider",Fr),l.component("BeamFilter",di),l.component("BeamFilterOption",mi),l.component("BeamHeading",Ai),l.component("BeamMetadata",yi),l.component("BeamModal",bi),l.component("BeamModalOutlet",wi),l.component("BeamProgress",vi),l.component("Confirm",_i),l.component("FixedTop",Ei),l.component("ItemCheck",qr),l.component("ItemCount",$r),l.component("ListAnchor",Si),l.component("ListItem",er),l.component("ListView",xi),l.component("Navbar",Ii),l.component("ScanInput",Ti),l.component("SegmentedDisplay",Oi),l.component("SplitColumn",Pi),l.component("ToggleArrow",Bi)}Pe.ActionFooter=ci,Pe.BeamArrow=fi,Pe.BeamBtn=hi,Pe.BeamDayDivider=Fr,Pe.BeamFilter=di,Pe.BeamFilterOption=mi,Pe.BeamHeading=Ai,Pe.BeamMetadata=yi,Pe.BeamModal=bi,Pe.BeamModalOutlet=wi,Pe.BeamProgress=vi,Pe.Confirm=_i,Pe.FixedTop=Ei,Pe.ItemCheck=qr,Pe.ItemCount=$r,Pe.ListAnchor=Si,Pe.ListItem=er,Pe.ListView=xi,Pe.Navbar=Ii,Pe.ScanInput=Ti,Pe.SegmentedDisplay=Oi,Pe.SplitColumn=Pi,Pe.ToggleArrow=Bi,Pe.install=jf,Pe.useMqttStream=Uf,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})}));
7
10
  //# sourceMappingURL=beam.umd.cjs.map