@stonecrop/beam 0.4.6 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.css +1 -1
- package/dist/beam.js +1055 -1049
- package/dist/beam.js.map +1 -1
- package/dist/beam.umd.cjs +7 -7
- package/dist/beam.umd.cjs.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +16 -15
- package/src/components/BeamFilter.vue +11 -3
- package/src/components/BeamFilterOption.vue +34 -22
package/dist/beam.umd.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(function(_e,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],_):(_e=typeof globalThis<"u"?globalThis:_e||self,_(_e["@stonecrop/beam"]={},_e.Vue))})(this,function(_e,_){"use strict";var Bh=Object.defineProperty;var Ra=_e=>{throw TypeError(_e)};var Oh=(_e,_,Ke)=>_ in _e?Bh(_e,_,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):_e[_]=Ke;var Ve=(_e,_,Ke)=>Oh(_e,typeof _!="symbol"?_+"":_,Ke),Mi=(_e,_,Ke)=>_.has(_e)||Ra("Cannot "+Ke);var x=(_e,_,Ke)=>(Mi(_e,_,"read from private field"),Ke?Ke.call(_e):_.get(_e)),Pe=(_e,_,Ke)=>_.has(_e)?Ra("Cannot add the same private member more than once"):_ instanceof WeakSet?_.add(_e):_.set(_e,Ke),Ce=(_e,_,Ke,Jt)=>(Mi(_e,_,"write to private field"),Jt?Jt.call(_e,Ke):_.set(_e,Ke),Ke),Ee=(_e,_,Ke)=>(Mi(_e,_,"access private method"),Ke);var Lr=(_e,_,Ke,Jt)=>({set _(jr){Ce(_e,_,jr,Ke)},get _(){return x(_e,_,Jt)}});var Ke=document.createElement("style");Ke.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-94fbdac5]{align-self:center;flex-grow:1;position:relative;display:flex;align-items:center}.beam_metadata_arrow-body[data-v-94fbdac5]{width:100%;height:10px;background:#c4c4c4}.beam_metadata_arrow-head svg[data-v-94fbdac5]{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-1064c704]{overflow:hidden;box-sizing:border-box;transition:all .2s ease-in-out;border-bottom:1px solid var(--sc-row-border-color);background:#fff}.beam_filters-heading[data-v-1064c704]{background:var(--sc-primary-color);cursor:pointer;display:flex;align-items:center;padding-left:1rem;box-sizing:border-box;font-size:1rem;padding:0 2rem}.beam_filters-heading>h1[data-v-1064c704]{font-size:1rem}.beam_filters-options[data-v-1064c704]{background:#fff;margin:1rem 1rem 2rem;box-sizing:border-box;padding:0 2rem}.beam_filter-option[data-v-a10ab2da]{cursor:pointer;position:relative;margin-bottom:1rem}.beam_filter-option-heading[data-v-a10ab2da]{font-size:1rem;padding-bottom:.25rem}.beam_filter-option-select[data-v-a10ab2da]{position:relative;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--sc-row-border-color);font-weight:700;color:var(--sc-primary-text-color);font-size:.8rem;font-family:var(--sc-font-family);display:flex;align-items:stretch}label[data-v-a10ab2da]{cursor:pointer;padding:.5rem}.beam_filter-arrow[data-v-a10ab2da]{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-a10ab2da]{display:flex;align-items:center}svg[data-v-a10ab2da]{fill:var(--sc-primary-text-color);width:5px;transform:rotate(90deg)}.beam_filter-select-menu[data-v-a10ab2da]{z-index:100;border-top:none;left:0;border:1px solid var(--sc-row-border-color);padding:0rem;list-style:none;width:100%;box-sizing:border-box;max-height:200px;overflow-y:scroll;margin:0}.beam_filter-select-option[data-v-a10ab2da]{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-a10ab2da]:hover{background:var(--sc-primary-color)}.selected[data-v-a10ab2da],.selected[data-v-a10ab2da]:hover{background:var(--sc-row-border-color)}.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-4f3f0253]{position:fixed;top:0;right:0;bottom:0;left: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-14a5f31b]{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-14a5f31b]{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.checkmark[data-v-14a5f31b]{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-14a5f31b]{background-color:#fff}.container input:checked~.checkmark[data-v-14a5f31b]{background-color:var(--sc-brand-secondary)}.checkmark[data-v-14a5f31b]:after{content:"";position:absolute;display:none}.container input:checked~.checkmark[data-v-14a5f31b]:after{display:block}.container .checkmark[data-v-14a5f31b]: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-ec1a0218]{font-size:1.3125rem;color:var(--sc-primary-text-color)}.beam_item-count span[data-v-ec1a0218]{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-140e435e]{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-140e435e]{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-c65440c0]{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline;gap:1rem}@media screen and (max-width: 400px){.two-column[data-v-c65440c0]{flex-direction:column;gap:0}}.column[data-v-c65440c0]{flex-grow:1;width:50%}@media screen and (max-width: 400px){.column[data-v-c65440c0]{width:100%}}.column-right[data-v-c65440c0]{text-align:right}@media screen and (max-width: 400px){.column-right[data-v-c65440c0]{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
|
-
`,document.head.appendChild(Ke);const Jt={class:"beam_action-footer"},jr={class:"footer-action-wrapper"},Wa=_.defineComponent({__name:"ActionFooter",emits:["click"],setup(e,{emit:i}){const t=i,a=()=>{t("click")};return(c,n)=>{const r=_.resolveComponent("BeamBtn");return _.openBlock(),_.createElementBlock("footer",Jt,[_.createElementVNode("span",jr,[_.createVNode(r,{onClick:a},{default:_.withCtx(()=>[_.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3})])])}}}),He=(e,i)=>{const t=e.__vccOpts||e;for(const[a,c]of i)t[a]=c;return t},ji=He(Wa,[["__scopeId","data-v-37933bd1"]]),Qa={class:"beam_metadata_arrow"},Ha={class:"beam_metadata_arrow-head"},qa={id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6.74 7.78"},Vi=He(_.defineComponent({__name:"BeamArrow",props:{color:{}},setup(e){return(i,t)=>(_.openBlock(),_.createElementBlock("div",Qa,[_.createElementVNode("div",{class:"beam_metadata_arrow-body",style:_.normalizeStyle({background:i.color||"#c4c4c4"})},null,4),_.createElementVNode("div",Ha,[(_.openBlock(),_.createElementBlock("svg",qa,[_.createElementVNode("polygon",{points:"6.74 3.89 0 0 0 7.78 6.74 3.89",style:_.normalizeStyle([{fill:"#c4c4c4"},{fill:i.color||"#c4c4c4"}])},null,4)]))])]))}}),[["__scopeId","data-v-94fbdac5"]]),$a={},za={class:"beam_btn"};function Ya(e,i){return _.openBlock(),_.createElementBlock("button",za,[_.renderSlot(e.$slots,"default",{},()=>[i[0]||(i[0]=_.createTextVNode("Action"))],!0)])}const Ki=He($a,[["render",Ya],["__scopeId","data-v-bc768596"]]),Ga={class:"beam_day-divider"},Vr=He(_.defineComponent({__name:"BeamDayDivider",props:{item:{}},setup(e){const i=_.computed(()=>{if(!e.item.date||isNaN(Date.parse(e.item.date)))return e.item.date;const t=new Date(e.item.date);if(e.item.dateFormat)switch(e.item.dateFormat.toLowerCase()){case"iso":return t.toISOString()}return t.toDateString()});return(t,a)=>(_.openBlock(),_.createElementBlock(_.Fragment,null,[_.createElementVNode("div",Ga,[_.createElementVNode("h2",null,_.toDisplayString(i.value),1)]),_.renderSlot(t.$slots,"default",{},void 0,!0)],64))}}),[["__scopeId","data-v-160cf6ef"]]),Ja={class:"beam_filters-options"},Wi=He(_.defineComponent({__name:"BeamFilter",setup(e){const i=_.useTemplateRef("beam-filters-header"),t=_.useTemplateRef("beam-filters"),a=_.ref(!1),c=_.ref(),n=_.ref(),r=()=>{a.value=!a.value};_.onMounted(()=>{i.value&&t.value&&(c.value=s(i.value),n.value=s(t.value),t.value.style.height=c.value)});const s=o=>{const l=o.getBoundingClientRect().height,f=parseInt(getComputedStyle(o).marginTop),p=parseInt(getComputedStyle(o).marginBottom);return l+f+p+"px"};return(o,l)=>{const f=_.resolveComponent("ToggleArrow"),p=_.resolveComponent("BeamHeading");return _.openBlock(),_.createElementBlock("div",{ref:"beam-filters",class:"beam_filters",style:_.normalizeStyle({height:a.value?"100%":c.value})},[_.createElementVNode("div",{ref:"beam-filters-header",onClick:r,class:"beam_filters-heading"},[_.createVNode(f,{open:a.value},null,8,["open"]),_.createVNode(p,null,{default:_.withCtx(()=>l[0]||(l[0]=[_.createTextVNode("Filter")])),_:1})],512),_.createElementVNode("div",Ja,[_.renderSlot(o.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-1064c704"]]),Za={class:"beam_filter-option-select"},Xa={class:"beam_filter-label"},el={key:0,ref:"menu",class:"beam_filter-select-menu"},tl=["data-value","onClick"],Qi=He(_.defineComponent({__name:"BeamFilterOption",props:{choices:{default:()=>[]},title:{default:"title"}},emits:["select"],setup(e,{emit:i}){const t=i,a=_.ref(!1),c=_.ref(e.choices[0].label),n=_.ref(e.choices[0].value),r=s=>{c.value=s.label,n.value=s.value,t("select",s)};return(s,o)=>{const l=_.resolveComponent("BeamHeading");return _.openBlock(),_.createElementBlock(_.Fragment,null,[_.createVNode(l,{class:"beam_filter-option-heading"},{default:_.withCtx(()=>[_.createTextVNode(_.toDisplayString(s.title),1)]),_:1}),_.createElementVNode("div",{onClick:o[0]||(o[0]=f=>a.value=!a.value),class:"beam_filter-option"},[_.createElementVNode("div",Za,[o[1]||(o[1]=_.createElementVNode("div",{class:"beam_filter-arrow"},[_.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[_.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})])],-1)),_.createElementVNode("div",Xa,[_.createElementVNode("label",null,_.toDisplayString(c.value),1)])]),a.value?(_.openBlock(),_.createElementBlock("ul",el,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(s.choices,f=>(_.openBlock(),_.createElementBlock("li",{class:_.normalizeClass([{selected:c.value==f.label},"beam_filter-select-option"]),"data-value":f.value,key:f.value,onClick:p=>r(f)},_.toDisplayString(f.label),11,tl))),128))],512)):_.createCommentVNode("",!0)])],64)}}}),[["__scopeId","data-v-a10ab2da"]]),rl={},nl={class:"beam_header"};function il(e,i){return _.openBlock(),_.createElementBlock("h1",nl,[_.renderSlot(e.$slots,"default",{},void 0,!0)])}const Hi=He(rl,[["render",il],["__scopeId","data-v-5182a4d5"]]),ol={class:"beam_metadata"},sl={class:"beam_metadata_content"},al={class:"beam_metadata_block"},ll={class:"beam_metadata_heading"},qi=He(_.defineComponent({__name:"BeamMetadata",props:{order:{}},setup(e){return(i,t)=>(_.openBlock(),_.createElementBlock("div",ol,[_.createElementVNode("div",sl,[_.renderSlot(i.$slots,"default",{},()=>[t[1]||(t[1]=_.createElementVNode("div",{class:"beam_metadata_header beam_metadata--two-column"},null,-1)),_.createElementVNode("div",al,[_.createElementVNode("p",ll,[t[0]||(t[0]=_.createTextVNode(" Status: ")),_.createElementVNode("span",{class:_.normalizeClass([{alert:!i.order.complete},"beam_metadata--normal"])},_.toDisplayString(i.order.complete?"Complete":"In Progress"),3)])]),t[2]||(t[2]=_.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)]),t[3]||(t[3]=_.createElementVNode("hr",null,null,-1))]))}}),[["__scopeId","data-v-80484331"]]),cl={class:"beam_modal"},$i=He(_.defineComponent({__name:"BeamModal",props:{showModal:{type:Boolean}},setup(e){return(i,t)=>{const a=_.resolveComponent("BeamBtn"),c=_.resolveComponent("portal");return _.openBlock(),_.createBlock(c,{to:"beam_modal_outlet"},{default:_.withCtx(()=>[_.withDirectives(_.createElementVNode("div",cl,[_.createVNode(a,{onClick:t[0]||(t[0]=n=>i.$emit("closemodal"))},{default:_.withCtx(()=>t[3]||(t[3]=[_.createTextVNode("Close Modal")])),_:1}),_.renderSlot(i.$slots,"default",{onClosemodal:t[1]||(t[1]=n=>i.$emit("closemodal")),onConfirmmodal:t[2]||(t[2]=n=>i.$emit("confirmmodal"))},void 0,!0)],512),[[_.vShow,i.showModal]])]),_:3})}}}),[["__scopeId","data-v-4f3f0253"]]),zi=_.defineComponent({__name:"BeamModalOutlet",emits:["confirmmodal","closemodal"],setup(e){return(i,t)=>{const a=_.resolveComponent("portal-target");return _.openBlock(),_.createBlock(a,{name:"beam_modal_outlet"})}}}),hl={class:"beam_metadata_heading"},Yi=_.defineComponent({__name:"BeamProgress",props:{label:{default:"Status"},progressMessage:{default:"In Progress"},completeMessage:{default:"Complete"},complete:{type:Boolean,default:!1}},setup(e){const i=_.computed(()=>e.complete?e.completeMessage:e.progressMessage);return(t,a)=>(_.openBlock(),_.createElementBlock("p",hl,[_.createTextVNode(_.toDisplayString(t.label)+": ",1),_.createElementVNode("span",{class:_.normalizeClass([{"beam--alert":!t.complete},"beam--normal"])},_.toDisplayString(i.value),3)]))}}),ul={},fl={class:"beam_modal-confirm"};function dl(e,i){const t=_.resolveComponent("BeamBtn");return _.openBlock(),_.createElementBlock("div",fl,[i[4]||(i[4]=_.createElementVNode("h2",null,"Would you like to continue?",-1)),_.createVNode(t,{onClick:i[0]||(i[0]=a=>e.$emit("confirmmodal"))},{default:_.withCtx(()=>i[2]||(i[2]=[_.createTextVNode("Yes")])),_:1}),_.createVNode(t,{onClick:i[1]||(i[1]=a=>e.$emit("confirmmodal"))},{default:_.withCtx(()=>i[3]||(i[3]=[_.createTextVNode("No")])),_:1})])}const Gi=He(ul,[["render",dl],["__scopeId","data-v-5b430dca"]]),pl={},gl={class:"fixed-top"};function ml(e,i){return _.openBlock(),_.createElementBlock("div",gl,[_.renderSlot(e.$slots,"default",{},void 0,!0)])}const Ji=He(pl,[["render",ml],["__scopeId","data-v-a38a41d0"]]),Al={class:"container"},Kr=He(_.defineComponent({__name:"ItemCheck",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(e){const i=_.useModel(e,"modelValue");return(t,a)=>(_.openBlock(),_.createElementBlock("label",Al,[_.withDirectives(_.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":a[0]||(a[0]=c=>i.value=c),tabindex:"-1"},null,512),[[_.vModelCheckbox,i.value]]),a[1]||(a[1]=_.createElementVNode("div",{class:"checkmark",tabindex:"0"},null,-1))]))}}),[["__scopeId","data-v-14a5f31b"]]);function Zi(e){return typeof e=="function"?e():_.unref(e)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Xi=()=>{};function bl(e,i){function t(...a){return new Promise((c,n)=>{Promise.resolve(e(()=>i.apply(this,a),{fn:i,thisArg:this,args:a})).then(c).catch(n)})}return t}function yl(e,i={}){let t,a,c=Xi;const n=s=>{clearTimeout(s),c(),c=Xi};return s=>{const o=Zi(e),l=Zi(i.maxWait);return t&&n(t),o<=0||l!==void 0&&l<=0?(a&&(n(a),a=null),Promise.resolve(s())):new Promise((f,p)=>{c=i.rejectOnCancel?p:f,l&&!a&&(a=setTimeout(()=>{t&&n(t),a=null,f(s())},l)),t=setTimeout(()=>{a&&n(a),a=null,f(s())},o)})}}function wl(e,i=200,t={}){return bl(yl(i,t),e)}const vl={class:"beam_item-count"},_l=["contenteditable"],El={key:0},Sl={key:1},Wr=He(_.defineComponent({__name:"ItemCount",props:_.mergeModels({denominator:{},debounce:{default:300},editable:{default:!0},uom:{default:""}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const i=_.useModel(e,"modelValue"),t=_.computed(()=>i.value===e.denominator),a=r=>{const s=Number(r.target.innerHTML)||0;i.value=Math.min(s,e.denominator)},c=wl(r=>a(r),e.debounce),n=async r=>await c(r);return(r,s)=>(_.openBlock(),_.createElementBlock("div",vl,[_.createElementVNode("span",{contenteditable:r.editable,class:_.normalizeClass({"beam--alert":!t.value}),onClick:_.withModifiers(a,["stop","prevent"]),onInput:_.withModifiers(n,["stop","prevent"]),onPaste:a},_.toDisplayString(i.value),43,_l),r.denominator?(_.openBlock(),_.createElementBlock("span",El,"/"+_.toDisplayString(r.denominator),1)):_.createCommentVNode("",!0),r.uom?(_.openBlock(),_.createElementBlock("span",Sl," "+_.toDisplayString(r.uom),1)):_.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-ec1a0218"]]),Cl=["href"],eo=He(_.defineComponent({__name:"ListAnchor",props:{to:{default:""}},setup(e){return(i,t)=>(_.openBlock(),_.createElementBlock("a",{href:i.to,class:"beam_list-anchor"},[_.renderSlot(i.$slots,"default",{},void 0,!0)],8,Cl))}}),[["__scopeId","data-v-7e3ecf0d"]]),Il={tabindex:"0",class:"beam_list-item"},Tl={class:"beam_list-text"},kl={class:"beam--bold"},dr=He(_.defineComponent({__name:"ListItem",props:{item:{}},emits:["update"],setup(e,{emit:i}){const t=i,a=_.ref(e.item);return _.watch(a,c=>{t("update",c)},{deep:!0}),(c,n)=>(_.openBlock(),_.createElementBlock("li",Il,[_.createElementVNode("div",Tl,[_.createElementVNode("label",kl,_.toDisplayString(a.value.label),1),_.createElementVNode("p",null,_.toDisplayString(a.value.description),1)]),a.value.count?(_.openBlock(),_.createBlock(Wr,{key:0,modelValue:a.value.count.count,"onUpdate:modelValue":n[0]||(n[0]=r=>a.value.count.count=r),debounce:a.value.debounce,denominator:a.value.count.of,editable:!0,uom:a.value.count.uom},null,8,["modelValue","debounce","denominator","uom"])):_.createCommentVNode("",!0),a.value.hasOwnProperty("checked")?(_.openBlock(),_.createBlock(Kr,{key:1,modelValue:a.value.checked,"onUpdate:modelValue":n[1]||(n[1]=r=>a.value.checked=r)},null,8,["modelValue"])):_.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-634dd647"]]),Bl={class:"beam_list-view"},to=He(_.defineComponent({__name:"ListView",props:{items:{}},emits:["update","scrollbottom"],setup(e,{emit:i}){const t=i;_.onMounted(()=>{window.addEventListener("scroll",c)}),_.onUnmounted(()=>{window.removeEventListener("scroll",c)});const a=n=>t("update",n),c=()=>{const n=document.documentElement.scrollHeight-window.innerHeight,r=document.documentElement.scrollTop;n-r<=2&&t("scrollbottom")};return(n,r)=>(_.openBlock(),_.createElementBlock("ul",Bl,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(n.items,s=>(_.openBlock(),_.createElementBlock("li",{key:s.barcode||s.label},[s.linkComponent=="BeamDayDivider"?(_.openBlock(),_.createBlock(Vr,{key:0,item:s},null,8,["item"])):s.linkComponent?(_.openBlock(),_.createBlock(_.resolveDynamicComponent(s.linkComponent),{key:1,to:s.route,tabindex:"-1"},{default:_.withCtx(()=>[_.createVNode(dr,{item:s,onUpdate:a},null,8,["item"])]),_:2},1032,["to"])):(_.openBlock(),_.createBlock(dr,{key:2,item:s,onUpdate:a},null,8,["item"]))]))),128))]))}}),[["__scopeId","data-v-d536b2a7"]]),Ol={class:"beam_navbar"},ro=He(_.defineComponent({__name:"Navbar",emits:["click"],setup(e,{emit:i}){const t=i,a=()=>{t("click")};return(c,n)=>{const r=_.resolveComponent("BeamHeading"),s=_.resolveComponent("BeamBtn");return _.openBlock(),_.createElementBlock("nav",Ol,[_.renderSlot(c.$slots,"title",{},()=>[_.createVNode(r,null,{default:_.withCtx(()=>n[0]||(n[0]=[_.createTextVNode("TITLE")])),_:1})],!0),_.createVNode(s,{onClick:a},{default:_.withCtx(()=>[_.renderSlot(c.$slots,"navbaraction",{},()=>[n[1]||(n[1]=_.createTextVNode("Action"))],!0)]),_:3})])}}}),[["__scopeId","data-v-cfc4c14e"]]);var Pl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var no={exports:{}};(function(e,i){(function(t,a){e.exports=a()})(Pl,function(){var t={attachTo:function(a,c){if(a.scannerDetectionData!==void 0)throw new Error("onScan.js is already initialized for DOM element "+a);var n={onScan:function(r,s){},onScanError:function(r){},onKeyProcess:function(r,s){},onKeyDetect:function(r,s){},onPaste:function(r,s){},keyCodeMapper:function(r){return t.decodeKeyEvent(r)},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 c=this._mergeOptions(n,c),a.scannerDetectionData={options:c,vars:{firstCharTime:0,lastCharTime:0,accumulatedString:"",testTimer:!1,longPressTimeStart:0,longPressed:!1}},c.reactToPaste===!0&&a.addEventListener("paste",this._handlePaste,c.captureEvents),c.scanButtonKeyCode!==!1&&a.addEventListener("keyup",this._handleKeyUp,c.captureEvents),(c.reactToKeydown===!0||c.scanButtonKeyCode!==!1)&&a.addEventListener("keydown",this._handleKeyDown,c.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,c){switch(a.scannerDetectionData.options.reactToPaste){case!0:c.reactToPaste===!1&&a.removeEventListener("paste",this._handlePaste);break;case!1:c.reactToPaste===!0&&a.addEventListener("paste",this._handlePaste);break}switch(a.scannerDetectionData.options.scanButtonKeyCode){case!1:c.scanButtonKeyCode!==!1&&a.addEventListener("keyup",this._handleKeyUp);break;default:c.scanButtonKeyCode===!1&&a.removeEventListener("keyup",this._handleKeyUp);break}return a.scannerDetectionData.options=this._mergeOptions(a.scannerDetectionData.options,c),this._reinitialize(a),this},decodeKeyEvent:function(a){var c=this._getNormalizedKeyNum(a);switch(!0){case(c>=48&&c<=90):case(c>=106&&c<=111):if(a.key!==void 0&&a.key!=="")return a.key;var n=String.fromCharCode(c);switch(a.shiftKey){case!1:n=n.toLowerCase();break;case!0:n=n.toUpperCase();break}return n;case(c>=96&&c<=105):return 0+(c-96)}return""},simulate:function(a,c){return this._reinitialize(a),Array.isArray(c)?c.forEach(function(n){var r={};(typeof n=="object"||typeof n=="function")&&n!==null?r=n:r.keyCode=parseInt(n);var s=new KeyboardEvent("keydown",r);document.dispatchEvent(s)}):this._validateScanCode(a,c),this},_reinitialize:function(a){var c=a.scannerDetectionData.vars;c.firstCharTime=0,c.lastCharTime=0,c.accumulatedString=""},_isFocusOnIgnoredElement:function(a){var c=a.scannerDetectionData.options.ignoreIfFocusOn;if(!c)return!1;var n=document.activeElement;if(Array.isArray(c)){for(var r=0;r<c.length;r++)if(n.matches(c[r])===!0)return!0}else if(n.matches(c))return!0;return!1},_validateScanCode:function(a,c){var n=a.scannerDetectionData,r=n.options,s=n.options.singleScanQty,o=n.vars.firstCharTime,l=n.vars.lastCharTime,f={},p;switch(!0){case c.length<r.minLength:f={message:"Receieved code is shorter then minimal length"};break;case l-o>c.length*r.avgTimeByChar:f={message:"Receieved code was not entered in time"};break;default:return r.onScan.call(a,c,s),p=new CustomEvent("scan",{detail:{scanCode:c,qty:s}}),a.dispatchEvent(p),t._reinitialize(a),!0}return f.scanCode=c,f.scanDuration=l-o,f.avgTimeByChar=r.avgTimeByChar,f.minLength=r.minLength,r.onScanError.call(a,f),p=new CustomEvent("scanError",{detail:f}),a.dispatchEvent(p),t._reinitialize(a),!1},_mergeOptions:function(a,c){var n={},r;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(n[r]=a[r]);for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(n[r]=c[r]);return n},_getNormalizedKeyNum:function(a){return a.which||a.keyCode},_handleKeyDown:function(a){var c=t._getNormalizedKeyNum(a),n=this.scannerDetectionData.options,r=this.scannerDetectionData.vars,s=!1;if(n.onKeyDetect.call(this,c,a)!==!1&&!t._isFocusOnIgnoredElement(this)){if(n.scanButtonKeyCode!==!1&&c==n.scanButtonKeyCode){r.longPressed||(r.longPressTimer=setTimeout(n.onScanButtonLongPress,n.scanButtonLongPressTime,this),r.longPressed=!0);return}switch(!0){case(r.firstCharTime&&n.suffixKeyCodes.indexOf(c)!==-1):a.preventDefault(),a.stopImmediatePropagation(),s=!0;break;case(!r.firstCharTime&&n.prefixKeyCodes.indexOf(c)!==-1):a.preventDefault(),a.stopImmediatePropagation(),s=!1;break;default:var o=n.keyCodeMapper.call(this,a);if(o===null)return;r.accumulatedString+=o,n.preventDefault&&a.preventDefault(),n.stopPropagation&&a.stopImmediatePropagation(),s=!1;break}r.firstCharTime||(r.firstCharTime=Date.now()),r.lastCharTime=Date.now(),r.testTimer&&clearTimeout(r.testTimer),s?(t._validateScanCode(this,r.accumulatedString),r.testTimer=!1):r.testTimer=setTimeout(t._validateScanCode,n.timeBeforeScanTest,this,r.accumulatedString),n.onKeyProcess.call(this,o,a)}},_handlePaste:function(a){var c=this.scannerDetectionData.options,n=this.scannerDetectionData.vars,r=(event.clipboardData||window.clipboardData).getData("text");t._isFocusOnIgnoredElement(this)||(a.preventDefault(),c.stopPropagation&&a.stopImmediatePropagation(),c.onPaste.call(this,r,event),n.firstCharTime=0,n.lastCharTime=0,t._validateScanCode(this,r))},_handleKeyUp:function(a){if(!t._isFocusOnIgnoredElement(this)){var c=t._getNormalizedKeyNum(a);c==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 t})})(no);var Rl=no.exports;const io=xl(Rl),Ml={id:"scan_input"},oo=_.defineComponent({__name:"ScanInput",props:{scanHandler:{type:Function}},emits:["scanInstance"],setup(e,{emit:i}){const t=i,a=e;return _.onMounted(()=>{const c=io.attachTo(window,{onScan:a.scanHandler});t("scanInstance",c)}),_.onUnmounted(()=>{io.detachFrom(window)}),(c,n)=>(_.openBlock(),_.createElementBlock("div",Ml))}}),so=He(_.defineComponent({__name:"SegmentedDisplay",props:{displayInput:{default:120.2568},decimalPlaces:{default:2},displayColor:{default:"gray"},textColor:{default:"white"}},setup(e){const i=_.computed(()=>e.displayInput===0?0 .toFixed(e.decimalPlaces):e.displayInput.toFixed(e.decimalPlaces)),t=a=>a.substr(0,2)=="--"?`var(${a})`:a;return(a,c)=>(_.openBlock(),_.createElementBlock("div",{class:"segmented-display",style:_.normalizeStyle({background:t(a.displayColor)})},[_.createElementVNode("h1",{class:"segmented-display-output",style:_.normalizeStyle({color:t(a.textColor)})},_.toDisplayString(i.value),5)],4))}}),[["__scopeId","data-v-140e435e"]]),Ul={class:"column column-left"},Dl={class:"column column-right"},ao=He(_.defineComponent({__name:"SplitColumn",props:{justifyContent:{},alignItems:{}},setup(e){return(i,t)=>(_.openBlock(),_.createElementBlock("div",{class:"two-column",style:_.normalizeStyle({justifyContent:i.justifyContent||"space-between",alignItems:i.alignItems||"flex-start"})},[_.createElementVNode("div",Ul,[_.renderSlot(i.$slots,"left",{},void 0,!0)]),_.createElementVNode("div",Dl,[_.renderSlot(i.$slots,"right",{},void 0,!0)])],4))}}),[["__scopeId","data-v-c65440c0"]]),lo=He(_.defineComponent({__name:"ToggleArrow",props:{open:{type:Boolean}},setup(e){return(i,t)=>(_.openBlock(),_.createElementBlock("div",{class:_.normalizeClass(["arrow-icon",{open:i.open}])},t[0]||(t[0]=[_.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[_.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})],-1)]),2))}}),[["__scopeId","data-v-05e7abed"]]);var Qr=Object.defineProperty,Ll=Object.getOwnPropertyDescriptor,Nl=Object.getOwnPropertyNames,Fl=Object.prototype.hasOwnProperty,Ge=(e,i)=>()=>(e&&(i=e(e=0)),i),Ae=(e,i)=>()=>(i||e((i={exports:{}}).exports,i),i.exports),Mt=(e,i)=>{for(var t in i)Qr(e,t,{get:i[t],enumerable:!0})},jl=(e,i,t,a)=>{if(i&&typeof i=="object"||typeof i=="function")for(let c of Nl(i))!Fl.call(e,c)&&c!==t&&Qr(e,c,{get:()=>i[c],enumerable:!(a=Ll(i,c))||a.enumerable});return e},Ue=e=>jl(Qr({},"__esModule",{value:!0}),e),ae=Ge(()=>{}),xe={};Mt(xe,{_debugEnd:()=>Cn,_debugProcess:()=>Sn,_events:()=>Vn,_eventsCount:()=>Kn,_exiting:()=>hn,_fatalExceptions:()=>vn,_getActiveHandles:()=>mo,_getActiveRequests:()=>go,_kill:()=>dn,_linkedBinding:()=>fo,_maxListeners:()=>jn,_preload_modules:()=>Ln,_rawDebug:()=>an,_startProfilerIdleNotifier:()=>In,_stopProfilerIdleNotifier:()=>Tn,_tickCallback:()=>En,abort:()=>Pn,addListener:()=>Wn,allowedNodeEnvironmentFlags:()=>yn,arch:()=>$r,argv:()=>Gr,argv0:()=>Dn,assert:()=>Ao,binding:()=>tn,chdir:()=>on,config:()=>un,cpuUsage:()=>or,cwd:()=>nn,debugPort:()=>Un,default:()=>Jn,dlopen:()=>po,domain:()=>cn,emit:()=>zn,emitWarning:()=>en,env:()=>Yr,execArgv:()=>Jr,execPath:()=>Mn,exit:()=>An,features:()=>wn,hasUncaughtExceptionCaptureCallback:()=>bo,hrtime:()=>pr,kill:()=>mn,listeners:()=>wo,memoryUsage:()=>gn,moduleLoadList:()=>ln,nextTick:()=>ho,off:()=>Hn,on:()=>gt,once:()=>Qn,openStdin:()=>bn,pid:()=>xn,platform:()=>zr,ppid:()=>Rn,prependListener:()=>Yn,prependOnceListener:()=>Gn,reallyExit:()=>fn,release:()=>sn,removeAllListeners:()=>$n,removeListener:()=>qn,resourceUsage:()=>pn,setSourceMapsEnabled:()=>Nn,setUncaughtExceptionCaptureCallback:()=>_n,stderr:()=>Bn,stdin:()=>On,stdout:()=>kn,title:()=>qr,umask:()=>rn,uptime:()=>yo,version:()=>Zr,versions:()=>Xr});function Hr(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function Vl(){!Ut||!Dt||(Ut=!1,Dt.length?ut=Dt.concat(ut):ir=-1,ut.length&&co())}function co(){if(!Ut){var e=setTimeout(Vl,0);Ut=!0;for(var i=ut.length;i;){for(Dt=ut,ut=[];++ir<i;)Dt&&Dt[ir].run();ir=-1,i=ut.length}Dt=null,Ut=!1,clearTimeout(e)}}function ho(e){var i=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)i[t-1]=arguments[t];ut.push(new uo(e,i)),ut.length===1&&!Ut&&setTimeout(co,0)}function uo(e,i){this.fun=e,this.array=i}function et(){}function fo(e){Hr("_linkedBinding")}function po(e){Hr("dlopen")}function go(){return[]}function mo(){return[]}function Ao(e,i){if(!e)throw new Error(i||"assertion error")}function bo(){return!1}function yo(){return mt.now()/1e3}function pr(e){var i=Math.floor((Date.now()-mt.now())*.001),t=mt.now()*.001,a=Math.floor(t)+i,c=Math.floor(t%1*1e9);return e&&(a=a-e[0],c=c-e[1],c<0&&(a--,c+=gr)),[a,c]}function gt(){return Jn}function wo(e){return[]}var ut,Ut,Dt,ir,qr,$r,zr,Yr,Gr,Jr,Zr,Xr,en,tn,rn,nn,on,sn,an,ln,cn,hn,un,fn,dn,or,pn,gn,mn,An,bn,yn,wn,vn,_n,En,Sn,Cn,In,Tn,kn,Bn,On,Pn,xn,Rn,Mn,Un,Dn,Ln,Nn,mt,Fn,gr,jn,Vn,Kn,Wn,Qn,Hn,qn,$n,zn,Yn,Gn,Jn,Kl=Ge(()=>{ae(),ce(),le(),ut=[],Ut=!1,ir=-1,uo.prototype.run=function(){this.fun.apply(null,this.array)},qr="browser",$r="x64",zr="browser",Yr={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},Gr=["/usr/bin/node"],Jr=[],Zr="v16.8.0",Xr={},en=function(e,i){console.warn((i?i+": ":"")+e)},tn=function(e){Hr("binding")},rn=function(e){return 0},nn=function(){return"/"},on=function(e){},sn={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},an=et,ln=[],cn={},hn=!1,un={},fn=et,dn=et,or=function(){return{}},pn=or,gn=or,mn=et,An=et,bn=et,yn={},wn={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},vn=et,_n=et,En=et,Sn=et,Cn=et,In=et,Tn=et,kn=void 0,Bn=void 0,On=void 0,Pn=et,xn=2,Rn=1,Mn="/bin/usr/node",Un=9229,Dn="node",Ln=[],Nn=et,mt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},mt.now===void 0&&(Fn=Date.now(),mt.timing&&mt.timing.navigationStart&&(Fn=mt.timing.navigationStart),mt.now=()=>Date.now()-Fn),gr=1e9,pr.bigint=function(e){var i=pr(e);return typeof BigInt>"u"?i[0]*gr+i[1]:BigInt(i[0]*gr)+BigInt(i[1])},jn=10,Vn={},Kn=0,Wn=gt,Qn=gt,Hn=gt,qn=gt,$n=gt,zn=et,Yn=gt,Gn=gt,Jn={version:Zr,versions:Xr,arch:$r,platform:zr,release:sn,_rawDebug:an,moduleLoadList:ln,binding:tn,_linkedBinding:fo,_events:Vn,_eventsCount:Kn,_maxListeners:jn,on:gt,addListener:Wn,once:Qn,off:Hn,removeListener:qn,removeAllListeners:$n,emit:zn,prependListener:Yn,prependOnceListener:Gn,listeners:wo,domain:cn,_exiting:hn,config:un,dlopen:po,uptime:yo,_getActiveRequests:go,_getActiveHandles:mo,reallyExit:fn,_kill:dn,cpuUsage:or,resourceUsage:pn,memoryUsage:gn,kill:mn,exit:An,openStdin:bn,allowedNodeEnvironmentFlags:yn,assert:Ao,features:wn,_fatalExceptions:vn,setUncaughtExceptionCaptureCallback:_n,hasUncaughtExceptionCaptureCallback:bo,emitWarning:en,nextTick:ho,_tickCallback:En,_debugProcess:Sn,_debugEnd:Cn,_startProfilerIdleNotifier:In,_stopProfilerIdleNotifier:Tn,stdout:kn,stdin:On,stderr:Bn,abort:Pn,umask:rn,chdir:on,cwd:nn,env:Yr,title:qr,argv:Gr,execArgv:Jr,pid:xn,ppid:Rn,execPath:Mn,debugPort:Un,hrtime:pr,argv0:Dn,_preload_modules:Ln,setSourceMapsEnabled:Nn}}),le=Ge(()=>{Kl()}),Je={};Mt(Je,{Buffer:()=>mr,INSPECT_MAX_BYTES:()=>vo,default:()=>At,kMaxLength:()=>_o});function Wl(){if(Zn)return Zt;Zn=!0,Zt.byteLength=s,Zt.toByteArray=l,Zt.fromByteArray=g;for(var e=[],i=[],t=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,n=a.length;c<n;++c)e[c]=a[c],i[a.charCodeAt(c)]=c;i[45]=62,i[95]=63;function r(m){var A=m.length;if(A%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=m.indexOf("=");b===-1&&(b=A);var C=b===A?0:4-b%4;return[b,C]}function s(m){var A=r(m),b=A[0],C=A[1];return(b+C)*3/4-C}function o(m,A,b){return(A+b)*3/4-b}function l(m){var A,b=r(m),C=b[0],U=b[1],I=new t(o(m,C,U)),v=0,L=U>0?C-4:C,F;for(F=0;F<L;F+=4)A=i[m.charCodeAt(F)]<<18|i[m.charCodeAt(F+1)]<<12|i[m.charCodeAt(F+2)]<<6|i[m.charCodeAt(F+3)],I[v++]=A>>16&255,I[v++]=A>>8&255,I[v++]=A&255;return U===2&&(A=i[m.charCodeAt(F)]<<2|i[m.charCodeAt(F+1)]>>4,I[v++]=A&255),U===1&&(A=i[m.charCodeAt(F)]<<10|i[m.charCodeAt(F+1)]<<4|i[m.charCodeAt(F+2)]>>2,I[v++]=A>>8&255,I[v++]=A&255),I}function f(m){return e[m>>18&63]+e[m>>12&63]+e[m>>6&63]+e[m&63]}function p(m,A,b){for(var C,U=[],I=A;I<b;I+=3)C=(m[I]<<16&16711680)+(m[I+1]<<8&65280)+(m[I+2]&255),U.push(f(C));return U.join("")}function g(m){for(var A,b=m.length,C=b%3,U=[],I=16383,v=0,L=b-C;v<L;v+=I)U.push(p(m,v,v+I>L?L:v+I));return C===1?(A=m[b-1],U.push(e[A>>2]+e[A<<4&63]+"==")):C===2&&(A=(m[b-2]<<8)+m[b-1],U.push(e[A>>10]+e[A>>4&63]+e[A<<2&63]+"=")),U.join("")}return Zt}function Ql(){return Xn?sr:(Xn=!0,sr.read=function(e,i,t,a,c){var n,r,s=c*8-a-1,o=(1<<s)-1,l=o>>1,f=-7,p=t?c-1:0,g=t?-1:1,m=e[i+p];for(p+=g,n=m&(1<<-f)-1,m>>=-f,f+=s;f>0;n=n*256+e[i+p],p+=g,f-=8);for(r=n&(1<<-f)-1,n>>=-f,f+=a;f>0;r=r*256+e[i+p],p+=g,f-=8);if(n===0)n=1-l;else{if(n===o)return r?NaN:(m?-1:1)*(1/0);r=r+Math.pow(2,a),n=n-l}return(m?-1:1)*r*Math.pow(2,n-a)},sr.write=function(e,i,t,a,c,n){var r,s,o,l=n*8-c-1,f=(1<<l)-1,p=f>>1,g=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=a?0:n-1,A=a?1:-1,b=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(s=isNaN(i)?1:0,r=f):(r=Math.floor(Math.log(i)/Math.LN2),i*(o=Math.pow(2,-r))<1&&(r--,o*=2),r+p>=1?i+=g/o:i+=g*Math.pow(2,1-p),i*o>=2&&(r++,o/=2),r+p>=f?(s=0,r=f):r+p>=1?(s=(i*o-1)*Math.pow(2,c),r=r+p):(s=i*Math.pow(2,p-1)*Math.pow(2,c),r=0));c>=8;e[t+m]=s&255,m+=A,s/=256,c-=8);for(r=r<<c|s,l+=c;l>0;e[t+m]=r&255,m+=A,r/=256,l-=8);e[t+m-A]|=b*128},sr)}function Hl(){if(ei)return Bt;ei=!0;let e=Wl(),i=Ql(),t=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Bt.Buffer=r,Bt.SlowBuffer=U,Bt.INSPECT_MAX_BYTES=50;let a=2147483647;Bt.kMaxLength=a,r.TYPED_ARRAY_SUPPORT=c(),!r.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 c(){try{let u=new Uint8Array(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,Uint8Array.prototype),Object.setPrototypeOf(u,h),u.foo()===42}catch{return!1}}Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}});function n(u){if(u>a)throw new RangeError('The value "'+u+'" is invalid for option "size"');let h=new Uint8Array(u);return Object.setPrototypeOf(h,r.prototype),h}function r(u,h,d){if(typeof u=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(u)}return s(u,h,d)}r.poolSize=8192;function s(u,h,d){if(typeof u=="string")return p(u,h);if(ArrayBuffer.isView(u))return m(u);if(u==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u);if($(u,ArrayBuffer)||u&&$(u.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($(u,SharedArrayBuffer)||u&&$(u.buffer,SharedArrayBuffer)))return A(u,h,d);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let y=u.valueOf&&u.valueOf();if(y!=null&&y!==u)return r.from(y,h,d);let T=b(u);if(T)return T;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return r.from(u[Symbol.toPrimitive]("string"),h,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u)}r.from=function(u,h,d){return s(u,h,d)},Object.setPrototypeOf(r.prototype,Uint8Array.prototype),Object.setPrototypeOf(r,Uint8Array);function o(u){if(typeof u!="number")throw new TypeError('"size" argument must be of type number');if(u<0)throw new RangeError('The value "'+u+'" is invalid for option "size"')}function l(u,h,d){return o(u),u<=0?n(u):h!==void 0?typeof d=="string"?n(u).fill(h,d):n(u).fill(h):n(u)}r.alloc=function(u,h,d){return l(u,h,d)};function f(u){return o(u),n(u<0?0:C(u)|0)}r.allocUnsafe=function(u){return f(u)},r.allocUnsafeSlow=function(u){return f(u)};function p(u,h){if((typeof h!="string"||h==="")&&(h="utf8"),!r.isEncoding(h))throw new TypeError("Unknown encoding: "+h);let d=I(u,h)|0,y=n(d),T=y.write(u,h);return T!==d&&(y=y.slice(0,T)),y}function g(u){let h=u.length<0?0:C(u.length)|0,d=n(h);for(let y=0;y<h;y+=1)d[y]=u[y]&255;return d}function m(u){if($(u,Uint8Array)){let h=new Uint8Array(u);return A(h.buffer,h.byteOffset,h.byteLength)}return g(u)}function A(u,h,d){if(h<0||u.byteLength<h)throw new RangeError('"offset" is outside of buffer bounds');if(u.byteLength<h+(d||0))throw new RangeError('"length" is outside of buffer bounds');let y;return h===void 0&&d===void 0?y=new Uint8Array(u):d===void 0?y=new Uint8Array(u,h):y=new Uint8Array(u,h,d),Object.setPrototypeOf(y,r.prototype),y}function b(u){if(r.isBuffer(u)){let h=C(u.length)|0,d=n(h);return d.length===0||u.copy(d,0,0,h),d}if(u.length!==void 0)return typeof u.length!="number"||O(u.length)?n(0):g(u);if(u.type==="Buffer"&&Array.isArray(u.data))return g(u.data)}function C(u){if(u>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return u|0}function U(u){return+u!=u&&(u=0),r.alloc(+u)}r.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==r.prototype},r.compare=function(u,h){if($(u,Uint8Array)&&(u=r.from(u,u.offset,u.byteLength)),$(h,Uint8Array)&&(h=r.from(h,h.offset,h.byteLength)),!r.isBuffer(u)||!r.isBuffer(h))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===h)return 0;let d=u.length,y=h.length;for(let T=0,K=Math.min(d,y);T<K;++T)if(u[T]!==h[T]){d=u[T],y=h[T];break}return d<y?-1:y<d?1:0},r.isEncoding=function(u){switch(String(u).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}},r.concat=function(u,h){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return r.alloc(0);let d;if(h===void 0)for(h=0,d=0;d<u.length;++d)h+=u[d].length;let y=r.allocUnsafe(h),T=0;for(d=0;d<u.length;++d){let K=u[d];if($(K,Uint8Array))T+K.length>y.length?(r.isBuffer(K)||(K=r.from(K)),K.copy(y,T)):Uint8Array.prototype.set.call(y,K,T);else if(r.isBuffer(K))K.copy(y,T);else throw new TypeError('"list" argument must be an Array of Buffers');T+=K.length}return y};function I(u,h){if(r.isBuffer(u))return u.length;if(ArrayBuffer.isView(u)||$(u,ArrayBuffer))return u.byteLength;if(typeof u!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof u);let d=u.length,y=arguments.length>2&&arguments[2]===!0;if(!y&&d===0)return 0;let T=!1;for(;;)switch(h){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return j(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return Z(u).length;default:if(T)return y?-1:j(u).length;h=(""+h).toLowerCase(),T=!0}}r.byteLength=I;function v(u,h,d){let y=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,h>>>=0,d<=h))return"";for(u||(u="utf8");;)switch(u){case"hex":return H(this,h,d);case"utf8":case"utf-8":return q(this,h,d);case"ascii":return me(this,h,d);case"latin1":case"binary":return se(this,h,d);case"base64":return S(this,h,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be(this,h,d);default:if(y)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),y=!0}}r.prototype._isBuffer=!0;function L(u,h,d){let y=u[h];u[h]=u[d],u[d]=y}r.prototype.swap16=function(){let u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let h=0;h<u;h+=2)L(this,h,h+1);return this},r.prototype.swap32=function(){let u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let h=0;h<u;h+=4)L(this,h,h+3),L(this,h+1,h+2);return this},r.prototype.swap64=function(){let u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let h=0;h<u;h+=8)L(this,h,h+7),L(this,h+1,h+6),L(this,h+2,h+5),L(this,h+3,h+4);return this},r.prototype.toString=function(){let u=this.length;return u===0?"":arguments.length===0?q(this,0,u):v.apply(this,arguments)},r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=function(u){if(!r.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:r.compare(this,u)===0},r.prototype.inspect=function(){let u="",h=Bt.INSPECT_MAX_BYTES;return u=this.toString("hex",0,h).replace(/(.{2})/g,"$1 ").trim(),this.length>h&&(u+=" ... "),"<Buffer "+u+">"},t&&(r.prototype[t]=r.prototype.inspect),r.prototype.compare=function(u,h,d,y,T){if($(u,Uint8Array)&&(u=r.from(u,u.offset,u.byteLength)),!r.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(h===void 0&&(h=0),d===void 0&&(d=u?u.length:0),y===void 0&&(y=0),T===void 0&&(T=this.length),h<0||d>u.length||y<0||T>this.length)throw new RangeError("out of range index");if(y>=T&&h>=d)return 0;if(y>=T)return-1;if(h>=d)return 1;if(h>>>=0,d>>>=0,y>>>=0,T>>>=0,this===u)return 0;let K=T-y,ee=d-h,Ie=Math.min(K,ee),Be=this.slice(y,T),Oe=u.slice(h,d);for(let Se=0;Se<Ie;++Se)if(Be[Se]!==Oe[Se]){K=Be[Se],ee=Oe[Se];break}return K<ee?-1:ee<K?1:0};function F(u,h,d,y,T){if(u.length===0)return-1;if(typeof d=="string"?(y=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,O(d)&&(d=T?0:u.length-1),d<0&&(d=u.length+d),d>=u.length){if(T)return-1;d=u.length-1}else if(d<0)if(T)d=0;else return-1;if(typeof h=="string"&&(h=r.from(h,y)),r.isBuffer(h))return h.length===0?-1:B(u,h,d,y,T);if(typeof h=="number")return h=h&255,typeof Uint8Array.prototype.indexOf=="function"?T?Uint8Array.prototype.indexOf.call(u,h,d):Uint8Array.prototype.lastIndexOf.call(u,h,d):B(u,[h],d,y,T);throw new TypeError("val must be string, number or Buffer")}function B(u,h,d,y,T){let K=1,ee=u.length,Ie=h.length;if(y!==void 0&&(y=String(y).toLowerCase(),y==="ucs2"||y==="ucs-2"||y==="utf16le"||y==="utf-16le")){if(u.length<2||h.length<2)return-1;K=2,ee/=2,Ie/=2,d/=2}function Be(Se,ke){return K===1?Se[ke]:Se.readUInt16BE(ke*K)}let Oe;if(T){let Se=-1;for(Oe=d;Oe<ee;Oe++)if(Be(u,Oe)===Be(h,Se===-1?0:Oe-Se)){if(Se===-1&&(Se=Oe),Oe-Se+1===Ie)return Se*K}else Se!==-1&&(Oe-=Oe-Se),Se=-1}else for(d+Ie>ee&&(d=ee-Ie),Oe=d;Oe>=0;Oe--){let Se=!0;for(let ke=0;ke<Ie;ke++)if(Be(u,Oe+ke)!==Be(h,ke)){Se=!1;break}if(Se)return Oe}return-1}r.prototype.includes=function(u,h,d){return this.indexOf(u,h,d)!==-1},r.prototype.indexOf=function(u,h,d){return F(this,u,h,d,!0)},r.prototype.lastIndexOf=function(u,h,d){return F(this,u,h,d,!1)};function k(u,h,d,y){d=Number(d)||0;let T=u.length-d;y?(y=Number(y),y>T&&(y=T)):y=T;let K=h.length;y>K/2&&(y=K/2);let ee;for(ee=0;ee<y;++ee){let Ie=parseInt(h.substr(ee*2,2),16);if(O(Ie))return ee;u[d+ee]=Ie}return ee}function M(u,h,d,y){return D(j(h,u.length-d),u,d,y)}function W(u,h,d,y){return D(V(h),u,d,y)}function J(u,h,d,y){return D(Z(h),u,d,y)}function ne(u,h,d,y){return D(ie(h,u.length-d),u,d,y)}r.prototype.write=function(u,h,d,y){if(h===void 0)y="utf8",d=this.length,h=0;else if(d===void 0&&typeof h=="string")y=h,d=this.length,h=0;else if(isFinite(h))h=h>>>0,isFinite(d)?(d=d>>>0,y===void 0&&(y="utf8")):(y=d,d=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let T=this.length-h;if((d===void 0||d>T)&&(d=T),u.length>0&&(d<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");y||(y="utf8");let K=!1;for(;;)switch(y){case"hex":return k(this,u,h,d);case"utf8":case"utf-8":return M(this,u,h,d);case"ascii":case"latin1":case"binary":return W(this,u,h,d);case"base64":return J(this,u,h,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,u,h,d);default:if(K)throw new TypeError("Unknown encoding: "+y);y=(""+y).toLowerCase(),K=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(u,h,d){return h===0&&d===u.length?e.fromByteArray(u):e.fromByteArray(u.slice(h,d))}function q(u,h,d){d=Math.min(u.length,d);let y=[],T=h;for(;T<d;){let K=u[T],ee=null,Ie=K>239?4:K>223?3:K>191?2:1;if(T+Ie<=d){let Be,Oe,Se,ke;switch(Ie){case 1:K<128&&(ee=K);break;case 2:Be=u[T+1],(Be&192)===128&&(ke=(K&31)<<6|Be&63,ke>127&&(ee=ke));break;case 3:Be=u[T+1],Oe=u[T+2],(Be&192)===128&&(Oe&192)===128&&(ke=(K&15)<<12|(Be&63)<<6|Oe&63,ke>2047&&(ke<55296||ke>57343)&&(ee=ke));break;case 4:Be=u[T+1],Oe=u[T+2],Se=u[T+3],(Be&192)===128&&(Oe&192)===128&&(Se&192)===128&&(ke=(K&15)<<18|(Be&63)<<12|(Oe&63)<<6|Se&63,ke>65535&&ke<1114112&&(ee=ke))}}ee===null?(ee=65533,Ie=1):ee>65535&&(ee-=65536,y.push(ee>>>10&1023|55296),ee=56320|ee&1023),y.push(ee),T+=Ie}return Y(y)}let re=4096;function Y(u){let h=u.length;if(h<=re)return String.fromCharCode.apply(String,u);let d="",y=0;for(;y<h;)d+=String.fromCharCode.apply(String,u.slice(y,y+=re));return d}function me(u,h,d){let y="";d=Math.min(u.length,d);for(let T=h;T<d;++T)y+=String.fromCharCode(u[T]&127);return y}function se(u,h,d){let y="";d=Math.min(u.length,d);for(let T=h;T<d;++T)y+=String.fromCharCode(u[T]);return y}function H(u,h,d){let y=u.length;(!h||h<0)&&(h=0),(!d||d<0||d>y)&&(d=y);let T="";for(let K=h;K<d;++K)T+=N[u[K]];return T}function be(u,h,d){let y=u.slice(h,d),T="";for(let K=0;K<y.length-1;K+=2)T+=String.fromCharCode(y[K]+y[K+1]*256);return T}r.prototype.slice=function(u,h){let d=this.length;u=~~u,h=h===void 0?d:~~h,u<0?(u+=d,u<0&&(u=0)):u>d&&(u=d),h<0?(h+=d,h<0&&(h=0)):h>d&&(h=d),h<u&&(h=u);let y=this.subarray(u,h);return Object.setPrototypeOf(y,r.prototype),y};function oe(u,h,d){if(u%1!==0||u<0)throw new RangeError("offset is not uint");if(u+h>d)throw new RangeError("Trying to access beyond buffer length")}r.prototype.readUintLE=r.prototype.readUIntLE=function(u,h,d){u=u>>>0,h=h>>>0,d||oe(u,h,this.length);let y=this[u],T=1,K=0;for(;++K<h&&(T*=256);)y+=this[u+K]*T;return y},r.prototype.readUintBE=r.prototype.readUIntBE=function(u,h,d){u=u>>>0,h=h>>>0,d||oe(u,h,this.length);let y=this[u+--h],T=1;for(;h>0&&(T*=256);)y+=this[u+--h]*T;return y},r.prototype.readUint8=r.prototype.readUInt8=function(u,h){return u=u>>>0,h||oe(u,1,this.length),this[u]},r.prototype.readUint16LE=r.prototype.readUInt16LE=function(u,h){return u=u>>>0,h||oe(u,2,this.length),this[u]|this[u+1]<<8},r.prototype.readUint16BE=r.prototype.readUInt16BE=function(u,h){return u=u>>>0,h||oe(u,2,this.length),this[u]<<8|this[u+1]},r.prototype.readUint32LE=r.prototype.readUInt32LE=function(u,h){return u=u>>>0,h||oe(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},r.prototype.readUint32BE=r.prototype.readUInt32BE=function(u,h){return u=u>>>0,h||oe(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},r.prototype.readBigUInt64LE=Q(function(u){u=u>>>0,X(u,"offset");let h=this[u],d=this[u+7];(h===void 0||d===void 0)&&ye(u,this.length-8);let y=h+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24,T=this[++u]+this[++u]*2**8+this[++u]*2**16+d*2**24;return BigInt(y)+(BigInt(T)<<BigInt(32))}),r.prototype.readBigUInt64BE=Q(function(u){u=u>>>0,X(u,"offset");let h=this[u],d=this[u+7];(h===void 0||d===void 0)&&ye(u,this.length-8);let y=h*2**24+this[++u]*2**16+this[++u]*2**8+this[++u],T=this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+d;return(BigInt(y)<<BigInt(32))+BigInt(T)}),r.prototype.readIntLE=function(u,h,d){u=u>>>0,h=h>>>0,d||oe(u,h,this.length);let y=this[u],T=1,K=0;for(;++K<h&&(T*=256);)y+=this[u+K]*T;return T*=128,y>=T&&(y-=Math.pow(2,8*h)),y},r.prototype.readIntBE=function(u,h,d){u=u>>>0,h=h>>>0,d||oe(u,h,this.length);let y=h,T=1,K=this[u+--y];for(;y>0&&(T*=256);)K+=this[u+--y]*T;return T*=128,K>=T&&(K-=Math.pow(2,8*h)),K},r.prototype.readInt8=function(u,h){return u=u>>>0,h||oe(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},r.prototype.readInt16LE=function(u,h){u=u>>>0,h||oe(u,2,this.length);let d=this[u]|this[u+1]<<8;return d&32768?d|4294901760:d},r.prototype.readInt16BE=function(u,h){u=u>>>0,h||oe(u,2,this.length);let d=this[u+1]|this[u]<<8;return d&32768?d|4294901760:d},r.prototype.readInt32LE=function(u,h){return u=u>>>0,h||oe(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},r.prototype.readInt32BE=function(u,h){return u=u>>>0,h||oe(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},r.prototype.readBigInt64LE=Q(function(u){u=u>>>0,X(u,"offset");let h=this[u],d=this[u+7];(h===void 0||d===void 0)&&ye(u,this.length-8);let y=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(d<<24);return(BigInt(y)<<BigInt(32))+BigInt(h+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24)}),r.prototype.readBigInt64BE=Q(function(u){u=u>>>0,X(u,"offset");let h=this[u],d=this[u+7];(h===void 0||d===void 0)&&ye(u,this.length-8);let y=(h<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(y)<<BigInt(32))+BigInt(this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+d)}),r.prototype.readFloatLE=function(u,h){return u=u>>>0,h||oe(u,4,this.length),i.read(this,u,!0,23,4)},r.prototype.readFloatBE=function(u,h){return u=u>>>0,h||oe(u,4,this.length),i.read(this,u,!1,23,4)},r.prototype.readDoubleLE=function(u,h){return u=u>>>0,h||oe(u,8,this.length),i.read(this,u,!0,52,8)},r.prototype.readDoubleBE=function(u,h){return u=u>>>0,h||oe(u,8,this.length),i.read(this,u,!1,52,8)};function we(u,h,d,y,T,K){if(!r.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>T||h<K)throw new RangeError('"value" argument is out of bounds');if(d+y>u.length)throw new RangeError("Index out of range")}r.prototype.writeUintLE=r.prototype.writeUIntLE=function(u,h,d,y){if(u=+u,h=h>>>0,d=d>>>0,!y){let ee=Math.pow(2,8*d)-1;we(this,u,h,d,ee,0)}let T=1,K=0;for(this[h]=u&255;++K<d&&(T*=256);)this[h+K]=u/T&255;return h+d},r.prototype.writeUintBE=r.prototype.writeUIntBE=function(u,h,d,y){if(u=+u,h=h>>>0,d=d>>>0,!y){let ee=Math.pow(2,8*d)-1;we(this,u,h,d,ee,0)}let T=d-1,K=1;for(this[h+T]=u&255;--T>=0&&(K*=256);)this[h+T]=u/K&255;return h+d},r.prototype.writeUint8=r.prototype.writeUInt8=function(u,h,d){return u=+u,h=h>>>0,d||we(this,u,h,1,255,0),this[h]=u&255,h+1},r.prototype.writeUint16LE=r.prototype.writeUInt16LE=function(u,h,d){return u=+u,h=h>>>0,d||we(this,u,h,2,65535,0),this[h]=u&255,this[h+1]=u>>>8,h+2},r.prototype.writeUint16BE=r.prototype.writeUInt16BE=function(u,h,d){return u=+u,h=h>>>0,d||we(this,u,h,2,65535,0),this[h]=u>>>8,this[h+1]=u&255,h+2},r.prototype.writeUint32LE=r.prototype.writeUInt32LE=function(u,h,d){return u=+u,h=h>>>0,d||we(this,u,h,4,4294967295,0),this[h+3]=u>>>24,this[h+2]=u>>>16,this[h+1]=u>>>8,this[h]=u&255,h+4},r.prototype.writeUint32BE=r.prototype.writeUInt32BE=function(u,h,d){return u=+u,h=h>>>0,d||we(this,u,h,4,4294967295,0),this[h]=u>>>24,this[h+1]=u>>>16,this[h+2]=u>>>8,this[h+3]=u&255,h+4};function w(u,h,d,y,T){te(h,y,T,u,d,7);let K=Number(h&BigInt(4294967295));u[d++]=K,K=K>>8,u[d++]=K,K=K>>8,u[d++]=K,K=K>>8,u[d++]=K;let ee=Number(h>>BigInt(32)&BigInt(4294967295));return u[d++]=ee,ee=ee>>8,u[d++]=ee,ee=ee>>8,u[d++]=ee,ee=ee>>8,u[d++]=ee,d}function G(u,h,d,y,T){te(h,y,T,u,d,7);let K=Number(h&BigInt(4294967295));u[d+7]=K,K=K>>8,u[d+6]=K,K=K>>8,u[d+5]=K,K=K>>8,u[d+4]=K;let ee=Number(h>>BigInt(32)&BigInt(4294967295));return u[d+3]=ee,ee=ee>>8,u[d+2]=ee,ee=ee>>8,u[d+1]=ee,ee=ee>>8,u[d]=ee,d+8}r.prototype.writeBigUInt64LE=Q(function(u,h=0){return w(this,u,h,BigInt(0),BigInt("0xffffffffffffffff"))}),r.prototype.writeBigUInt64BE=Q(function(u,h=0){return G(this,u,h,BigInt(0),BigInt("0xffffffffffffffff"))}),r.prototype.writeIntLE=function(u,h,d,y){if(u=+u,h=h>>>0,!y){let Ie=Math.pow(2,8*d-1);we(this,u,h,d,Ie-1,-Ie)}let T=0,K=1,ee=0;for(this[h]=u&255;++T<d&&(K*=256);)u<0&&ee===0&&this[h+T-1]!==0&&(ee=1),this[h+T]=(u/K>>0)-ee&255;return h+d},r.prototype.writeIntBE=function(u,h,d,y){if(u=+u,h=h>>>0,!y){let Ie=Math.pow(2,8*d-1);we(this,u,h,d,Ie-1,-Ie)}let T=d-1,K=1,ee=0;for(this[h+T]=u&255;--T>=0&&(K*=256);)u<0&&ee===0&&this[h+T+1]!==0&&(ee=1),this[h+T]=(u/K>>0)-ee&255;return h+d},r.prototype.writeInt8=function(u,h,d){return u=+u,h=h>>>0,d||we(this,u,h,1,127,-128),u<0&&(u=255+u+1),this[h]=u&255,h+1},r.prototype.writeInt16LE=function(u,h,d){return u=+u,h=h>>>0,d||we(this,u,h,2,32767,-32768),this[h]=u&255,this[h+1]=u>>>8,h+2},r.prototype.writeInt16BE=function(u,h,d){return u=+u,h=h>>>0,d||we(this,u,h,2,32767,-32768),this[h]=u>>>8,this[h+1]=u&255,h+2},r.prototype.writeInt32LE=function(u,h,d){return u=+u,h=h>>>0,d||we(this,u,h,4,2147483647,-2147483648),this[h]=u&255,this[h+1]=u>>>8,this[h+2]=u>>>16,this[h+3]=u>>>24,h+4},r.prototype.writeInt32BE=function(u,h,d){return u=+u,h=h>>>0,d||we(this,u,h,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[h]=u>>>24,this[h+1]=u>>>16,this[h+2]=u>>>8,this[h+3]=u&255,h+4},r.prototype.writeBigInt64LE=Q(function(u,h=0){return w(this,u,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),r.prototype.writeBigInt64BE=Q(function(u,h=0){return G(this,u,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function de(u,h,d,y,T,K){if(d+y>u.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function ve(u,h,d,y,T){return h=+h,d=d>>>0,T||de(u,h,d,4),i.write(u,h,d,y,23,4),d+4}r.prototype.writeFloatLE=function(u,h,d){return ve(this,u,h,!0,d)},r.prototype.writeFloatBE=function(u,h,d){return ve(this,u,h,!1,d)};function ue(u,h,d,y,T){return h=+h,d=d>>>0,T||de(u,h,d,8),i.write(u,h,d,y,52,8),d+8}r.prototype.writeDoubleLE=function(u,h,d){return ue(this,u,h,!0,d)},r.prototype.writeDoubleBE=function(u,h,d){return ue(this,u,h,!1,d)},r.prototype.copy=function(u,h,d,y){if(!r.isBuffer(u))throw new TypeError("argument should be a Buffer");if(d||(d=0),!y&&y!==0&&(y=this.length),h>=u.length&&(h=u.length),h||(h=0),y>0&&y<d&&(y=d),y===d||u.length===0||this.length===0)return 0;if(h<0)throw new RangeError("targetStart out of bounds");if(d<0||d>=this.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("sourceEnd out of bounds");y>this.length&&(y=this.length),u.length-h<y-d&&(y=u.length-h+d);let T=y-d;return this===u&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(h,d,y):Uint8Array.prototype.set.call(u,this.subarray(d,y),h),T},r.prototype.fill=function(u,h,d,y){if(typeof u=="string"){if(typeof h=="string"?(y=h,h=0,d=this.length):typeof d=="string"&&(y=d,d=this.length),y!==void 0&&typeof y!="string")throw new TypeError("encoding must be a string");if(typeof y=="string"&&!r.isEncoding(y))throw new TypeError("Unknown encoding: "+y);if(u.length===1){let K=u.charCodeAt(0);(y==="utf8"&&K<128||y==="latin1")&&(u=K)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(h<0||this.length<h||this.length<d)throw new RangeError("Out of range index");if(d<=h)return this;h=h>>>0,d=d===void 0?this.length:d>>>0,u||(u=0);let T;if(typeof u=="number")for(T=h;T<d;++T)this[T]=u;else{let K=r.isBuffer(u)?u:r.from(u,y),ee=K.length;if(ee===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(T=0;T<d-h;++T)this[T+h]=K[T%ee]}return this};let R={};function E(u,h,d){R[u]=class extends d{constructor(){super(),Object.defineProperty(this,"message",{value:h.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${u}]`,this.stack,delete this.name}get code(){return u}set code(y){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:y,writable:!0})}toString(){return`${this.name} [${u}]: ${this.message}`}}}E("ERR_BUFFER_OUT_OF_BOUNDS",function(u){return u?`${u} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),E("ERR_INVALID_ARG_TYPE",function(u,h){return`The "${u}" argument must be of type number. Received type ${typeof h}`},TypeError),E("ERR_OUT_OF_RANGE",function(u,h,d){let y=`The value of "${u}" is out of range.`,T=d;return Number.isInteger(d)&&Math.abs(d)>2**32?T=z(String(d)):typeof d=="bigint"&&(T=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(T=z(T)),T+="n"),y+=` It must be ${h}. Received ${T}`,y},RangeError);function z(u){let h="",d=u.length,y=u[0]==="-"?1:0;for(;d>=y+4;d-=3)h=`_${u.slice(d-3,d)}${h}`;return`${u.slice(0,d)}${h}`}function fe(u,h,d){X(h,"offset"),(u[h]===void 0||u[h+d]===void 0)&&ye(h,u.length-(d+1))}function te(u,h,d,y,T,K){if(u>d||u<h){let ee=typeof h=="bigint"?"n":"",Ie;throw h===0||h===BigInt(0)?Ie=`>= 0${ee} and < 2${ee} ** ${(K+1)*8}${ee}`:Ie=`>= -(2${ee} ** ${(K+1)*8-1}${ee}) and < 2 ** ${(K+1)*8-1}${ee}`,new R.ERR_OUT_OF_RANGE("value",Ie,u)}fe(y,T,K)}function X(u,h){if(typeof u!="number")throw new R.ERR_INVALID_ARG_TYPE(h,"number",u)}function ye(u,h,d){throw Math.floor(u)!==u?(X(u,d),new R.ERR_OUT_OF_RANGE("offset","an integer",u)):h<0?new R.ERR_BUFFER_OUT_OF_BOUNDS:new R.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${h}`,u)}let ge=/[^+/0-9A-Za-z-_]/g;function P(u){if(u=u.split("=")[0],u=u.trim().replace(ge,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function j(u,h){h=h||1/0;let d,y=u.length,T=null,K=[];for(let ee=0;ee<y;++ee){if(d=u.charCodeAt(ee),d>55295&&d<57344){if(!T){if(d>56319){(h-=3)>-1&&K.push(239,191,189);continue}else if(ee+1===y){(h-=3)>-1&&K.push(239,191,189);continue}T=d;continue}if(d<56320){(h-=3)>-1&&K.push(239,191,189),T=d;continue}d=(T-55296<<10|d-56320)+65536}else T&&(h-=3)>-1&&K.push(239,191,189);if(T=null,d<128){if((h-=1)<0)break;K.push(d)}else if(d<2048){if((h-=2)<0)break;K.push(d>>6|192,d&63|128)}else if(d<65536){if((h-=3)<0)break;K.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((h-=4)<0)break;K.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return K}function V(u){let h=[];for(let d=0;d<u.length;++d)h.push(u.charCodeAt(d)&255);return h}function ie(u,h){let d,y,T,K=[];for(let ee=0;ee<u.length&&!((h-=2)<0);++ee)d=u.charCodeAt(ee),y=d>>8,T=d%256,K.push(T),K.push(y);return K}function Z(u){return e.toByteArray(P(u))}function D(u,h,d,y){let T;for(T=0;T<y&&!(T+d>=h.length||T>=u.length);++T)h[T+d]=u[T];return T}function $(u,h){return u instanceof h||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===h.name}function O(u){return u!==u}let N=function(){let u="0123456789abcdef",h=new Array(256);for(let d=0;d<16;++d){let y=d*16;for(let T=0;T<16;++T)h[y+T]=u[d]+u[T]}return h}();function Q(u){return typeof BigInt>"u"?he:u}function he(){throw new Error("BigInt not supported")}return Bt}var Zt,Zn,sr,Xn,Bt,ei,At,mr,vo,_o,Ze=Ge(()=>{ae(),ce(),le(),Zt={},Zn=!1,sr={},Xn=!1,Bt={},ei=!1,At=Hl(),At.Buffer,At.SlowBuffer,At.INSPECT_MAX_BYTES,At.kMaxLength,mr=At.Buffer,vo=At.INSPECT_MAX_BYTES,_o=At.kMaxLength}),ce=Ge(()=>{Ze()}),ql=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=class{constructor(t){this.aliasToTopic={},this.max=t}put(t,a){return a===0||a>this.max?!1:(this.aliasToTopic[a]=t,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(t){return this.aliasToTopic[t]}clear(){this.aliasToTopic={}}};e.default=i}),qe=Ae((e,i)=>{ae(),ce(),le(),i.exports={ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,a){return t.includes(a)},ArrayPrototypeIndexOf(t,a){return t.indexOf(a)},ArrayPrototypeJoin(t,a){return t.join(a)},ArrayPrototypeMap(t,a){return t.map(a)},ArrayPrototypePop(t,a){return t.pop(a)},ArrayPrototypePush(t,a){return t.push(a)},ArrayPrototypeSlice(t,a,c){return t.slice(a,c)},Error,FunctionPrototypeCall(t,a,...c){return t.call(a,...c)},FunctionPrototypeSymbolHasInstance(t,a){return Function.prototype[Symbol.hasInstance].call(t,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(t,a){return Object.defineProperties(t,a)},ObjectDefineProperty(t,a,c){return Object.defineProperty(t,a,c)},ObjectGetOwnPropertyDescriptor(t,a){return Object.getOwnPropertyDescriptor(t,a)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,a){return Object.setPrototypeOf(t,a)},Promise,PromisePrototypeCatch(t,a){return t.catch(a)},PromisePrototypeThen(t,a,c){return t.then(a,c)},PromiseReject(t){return Promise.reject(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,a){return t.test(a)},SafeSet:Set,String,StringPrototypeSlice(t,a,c){return t.slice(a,c)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(t,a,c){return t.set(a,c)},Uint8Array}}),bt=Ae((e,i)=>{ae(),ce(),le();var t=(Ze(),Ue(Je)),a=Object.getPrototypeOf(async function(){}).constructor,c=globalThis.Blob||t.Blob,n=typeof c<"u"?function(s){return s instanceof c}:function(s){return!1},r=class extends Error{constructor(s){if(!Array.isArray(s))throw new TypeError(`Expected input to be an Array, got ${typeof s}`);let o="";for(let l=0;l<s.length;l++)o+=` ${s[l].stack}
|
|
3
|
-
`;super(o),this.name="AggregateError",this.errors=s}};i.exports={AggregateError:r,kEmptyObject:Object.freeze({}),once(s){let o=!1;return function(...l){o||(o=!0,s.apply(this,l))}},createDeferredPromise:function(){let s,o;return{promise:new Promise((l,f)=>{s=l,o=f}),resolve:s,reject:o}},promisify(s){return new Promise((o,l)=>{s((f,...p)=>f?l(f):o(...p))})},debuglog(){return function(){}},format(s,...o){return s.replace(/%([sdifj])/g,function(...[l,f]){let p=o.shift();return f==="f"?p.toFixed(6):f==="j"?JSON.stringify(p):f==="s"&&typeof p=="object"?`${p.constructor!==Object?p.constructor.name:""} {}`.trim():p.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"{}"}},types:{isAsyncFunction(s){return s instanceof a},isArrayBufferView(s){return ArrayBuffer.isView(s)}},isBlob:n},i.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),ti=Ae((e,i)=>{ae(),ce(),le();var{AbortController:t,AbortSignal:a}=typeof self<"u"?self:typeof window<"u"?window:void 0;i.exports=t,i.exports.AbortSignal=a,i.exports.default=t}),rt=Ae((e,i)=>{ae(),ce(),le();var{format:t,inspect:a,AggregateError:c}=bt(),n=globalThis.AggregateError||c,r=Symbol("kIsNodeError"),s=["string","function","number","object","Function","Object","boolean","bigint","symbol"],o=/^([A-Z][a-z0-9]*)+$/,l="__node_internal_",f={};function p(I,v){if(!I)throw new f.ERR_INTERNAL_ASSERTION(v)}function g(I){let v="",L=I.length,F=I[0]==="-"?1:0;for(;L>=F+4;L-=3)v=`_${I.slice(L-3,L)}${v}`;return`${I.slice(0,L)}${v}`}function m(I,v,L){if(typeof v=="function")return p(v.length<=L.length,`Code: ${I}; The provided arguments length (${L.length}) does not match the required ones (${v.length}).`),v(...L);let F=(v.match(/%[dfijoOs]/g)||[]).length;return p(F===L.length,`Code: ${I}; The provided arguments length (${L.length}) does not match the required ones (${F}).`),L.length===0?v:t(v,...L)}function A(I,v,L){L||(L=Error);class F extends L{constructor(...k){super(m(I,v,k))}toString(){return`${this.name} [${I}]: ${this.message}`}}Object.defineProperties(F.prototype,{name:{value:L.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${I}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),F.prototype.code=I,F.prototype[r]=!0,f[I]=F}function b(I){let v=l+I.name;return Object.defineProperty(I,"name",{value:v}),I}function C(I,v){if(I&&v&&I!==v){if(Array.isArray(v.errors))return v.errors.push(I),v;let L=new n([v,I],v.message);return L.code=v.code,L}return I||v}var U=class extends Error{constructor(I="The operation was aborted",v=void 0){if(v!==void 0&&typeof v!="object")throw new f.ERR_INVALID_ARG_TYPE("options","Object",v);super(I,v),this.code="ABORT_ERR",this.name="AbortError"}};A("ERR_ASSERTION","%s",Error),A("ERR_INVALID_ARG_TYPE",(I,v,L)=>{p(typeof I=="string","'name' must be a string"),Array.isArray(v)||(v=[v]);let F="The ";I.endsWith(" argument")?F+=`${I} `:F+=`"${I}" ${I.includes(".")?"property":"argument"} `,F+="must be ";let B=[],k=[],M=[];for(let J of v)p(typeof J=="string","All expected entries have to be of type string"),s.includes(J)?B.push(J.toLowerCase()):o.test(J)?k.push(J):(p(J!=="object",'The value "object" should be written as "Object"'),M.push(J));if(k.length>0){let J=B.indexOf("object");J!==-1&&(B.splice(B,J,1),k.push("Object"))}if(B.length>0){switch(B.length){case 1:F+=`of type ${B[0]}`;break;case 2:F+=`one of type ${B[0]} or ${B[1]}`;break;default:{let J=B.pop();F+=`one of type ${B.join(", ")}, or ${J}`}}(k.length>0||M.length>0)&&(F+=" or ")}if(k.length>0){switch(k.length){case 1:F+=`an instance of ${k[0]}`;break;case 2:F+=`an instance of ${k[0]} or ${k[1]}`;break;default:{let J=k.pop();F+=`an instance of ${k.join(", ")}, or ${J}`}}M.length>0&&(F+=" or ")}switch(M.length){case 0:break;case 1:M[0].toLowerCase()!==M[0]&&(F+="an "),F+=`${M[0]}`;break;case 2:F+=`one of ${M[0]} or ${M[1]}`;break;default:{let J=M.pop();F+=`one of ${M.join(", ")}, or ${J}`}}if(L==null)F+=`. Received ${L}`;else if(typeof L=="function"&&L.name)F+=`. Received function ${L.name}`;else if(typeof L=="object"){var W;if((W=L.constructor)!==null&&W!==void 0&&W.name)F+=`. Received an instance of ${L.constructor.name}`;else{let J=a(L,{depth:-1});F+=`. Received ${J}`}}else{let J=a(L,{colors:!1});J.length>25&&(J=`${J.slice(0,25)}...`),F+=`. Received type ${typeof L} (${J})`}return F},TypeError),A("ERR_INVALID_ARG_VALUE",(I,v,L="is invalid")=>{let F=a(v);return F.length>128&&(F=F.slice(0,128)+"..."),`The ${I.includes(".")?"property":"argument"} '${I}' ${L}. Received ${F}`},TypeError),A("ERR_INVALID_RETURN_VALUE",(I,v,L)=>{var F;let B=L!=null&&(F=L.constructor)!==null&&F!==void 0&&F.name?`instance of ${L.constructor.name}`:`type ${typeof L}`;return`Expected ${I} to be returned from the "${v}" function but got ${B}.`},TypeError),A("ERR_MISSING_ARGS",(...I)=>{p(I.length>0,"At least one arg needs to be specified");let v,L=I.length;switch(I=(Array.isArray(I)?I:[I]).map(F=>`"${F}"`).join(" or "),L){case 1:v+=`The ${I[0]} argument`;break;case 2:v+=`The ${I[0]} and ${I[1]} arguments`;break;default:{let F=I.pop();v+=`The ${I.join(", ")}, and ${F} arguments`}break}return`${v} must be specified`},TypeError),A("ERR_OUT_OF_RANGE",(I,v,L)=>{p(v,'Missing "range" argument');let F;return Number.isInteger(L)&&Math.abs(L)>2**32?F=g(String(L)):typeof L=="bigint"?(F=String(L),(L>2n**32n||L<-(2n**32n))&&(F=g(F)),F+="n"):F=a(L),`The value of "${I}" is out of range. It must be ${v}. Received ${F}`},RangeError),A("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),A("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),A("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),A("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),A("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),A("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),A("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),A("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),A("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),A("ERR_STREAM_WRITE_AFTER_END","write after end",Error),A("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),i.exports={AbortError:U,aggregateTwoErrors:b(C),hideStackFrames:b,codes:f}}),Ar=Ae((e,i)=>{ae(),ce(),le();var{ArrayIsArray:t,ArrayPrototypeIncludes:a,ArrayPrototypeJoin:c,ArrayPrototypeMap:n,NumberIsInteger:r,NumberIsNaN:s,NumberMAX_SAFE_INTEGER:o,NumberMIN_SAFE_INTEGER:l,NumberParseInt:f,ObjectPrototypeHasOwnProperty:p,RegExpPrototypeExec:g,String:m,StringPrototypeToUpperCase:A,StringPrototypeTrim:b}=qe(),{hideStackFrames:C,codes:{ERR_SOCKET_BAD_PORT:U,ERR_INVALID_ARG_TYPE:I,ERR_INVALID_ARG_VALUE:v,ERR_OUT_OF_RANGE:L,ERR_UNKNOWN_SIGNAL:F}}=rt(),{normalizeEncoding:B}=bt(),{isAsyncFunction:k,isArrayBufferView:M}=bt().types,W={};function J(D){return D===(D|0)}function ne(D){return D===D>>>0}var S=/^[0-7]+$/,q="must be a 32-bit unsigned integer or an octal string";function re(D,$,O){if(typeof D>"u"&&(D=O),typeof D=="string"){if(g(S,D)===null)throw new v($,D,q);D=f(D,8)}return se(D,$),D}var Y=C((D,$,O=l,N=o)=>{if(typeof D!="number")throw new I($,"number",D);if(!r(D))throw new L($,"an integer",D);if(D<O||D>N)throw new L($,`>= ${O} && <= ${N}`,D)}),me=C((D,$,O=-2147483648,N=2147483647)=>{if(typeof D!="number")throw new I($,"number",D);if(!r(D))throw new L($,"an integer",D);if(D<O||D>N)throw new L($,`>= ${O} && <= ${N}`,D)}),se=C((D,$,O=!1)=>{if(typeof D!="number")throw new I($,"number",D);if(!r(D))throw new L($,"an integer",D);let N=O?1:0,Q=4294967295;if(D<N||D>Q)throw new L($,`>= ${N} && <= ${Q}`,D)});function H(D,$){if(typeof D!="string")throw new I($,"string",D)}function be(D,$,O=void 0,N){if(typeof D!="number")throw new I($,"number",D);if(O!=null&&D<O||N!=null&&D>N||(O!=null||N!=null)&&s(D))throw new L($,`${O!=null?`>= ${O}`:""}${O!=null&&N!=null?" && ":""}${N!=null?`<= ${N}`:""}`,D)}var oe=C((D,$,O)=>{if(!a(O,D)){let N="must be one of: "+c(n(O,Q=>typeof Q=="string"?`'${Q}'`:m(Q)),", ");throw new v($,D,N)}});function we(D,$){if(typeof D!="boolean")throw new I($,"boolean",D)}function w(D,$,O){return D==null||!p(D,$)?O:D[$]}var G=C((D,$,O=null)=>{let N=w(O,"allowArray",!1),Q=w(O,"allowFunction",!1);if(!w(O,"nullable",!1)&&D===null||!N&&t(D)||typeof D!="object"&&(!Q||typeof D!="function"))throw new I($,"Object",D)}),de=C((D,$)=>{if(D!=null&&typeof D!="object"&&typeof D!="function")throw new I($,"a dictionary",D)}),ve=C((D,$,O=0)=>{if(!t(D))throw new I($,"Array",D);if(D.length<O){let N=`must be longer than ${O}`;throw new v($,D,N)}});function ue(D,$){ve(D,$);for(let O=0;O<D.length;O++)H(D[O],`${$}[${O}]`)}function R(D,$){ve(D,$);for(let O=0;O<D.length;O++)we(D[O],`${$}[${O}]`)}function E(D,$="signal"){if(H(D,$),W[D]===void 0)throw W[A(D)]!==void 0?new F(D+" (signals must use all capital letters)"):new F(D)}var z=C((D,$="buffer")=>{if(!M(D))throw new I($,["Buffer","TypedArray","DataView"],D)});function fe(D,$){let O=B($),N=D.length;if(O==="hex"&&N%2!==0)throw new v("encoding",$,`is invalid for data of length ${N}`)}function te(D,$="Port",O=!0){if(typeof D!="number"&&typeof D!="string"||typeof D=="string"&&b(D).length===0||+D!==+D>>>0||D>65535||D===0&&!O)throw new U($,D,O);return D|0}var X=C((D,$)=>{if(D!==void 0&&(D===null||typeof D!="object"||!("aborted"in D)))throw new I($,"AbortSignal",D)}),ye=C((D,$)=>{if(typeof D!="function")throw new I($,"Function",D)}),ge=C((D,$)=>{if(typeof D!="function"||k(D))throw new I($,"Function",D)}),P=C((D,$)=>{if(D!==void 0)throw new I($,"undefined",D)});function j(D,$,O){if(!a(O,D))throw new I($,`('${c(O,"|")}')`,D)}var V=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function ie(D,$){if(typeof D>"u"||!g(V,D))throw new v($,D,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function Z(D){if(typeof D=="string")return ie(D,"hints"),D;if(t(D)){let $=D.length,O="";if($===0)return O;for(let N=0;N<$;N++){let Q=D[N];ie(Q,"hints"),O+=Q,N!==$-1&&(O+=", ")}return O}throw new v("hints",D,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}i.exports={isInt32:J,isUint32:ne,parseFileMode:re,validateArray:ve,validateStringArray:ue,validateBooleanArray:R,validateBoolean:we,validateBuffer:z,validateDictionary:de,validateEncoding:fe,validateFunction:ye,validateInt32:me,validateInteger:Y,validateNumber:be,validateObject:G,validateOneOf:oe,validatePlainFunction:ge,validatePort:te,validateSignalName:E,validateString:H,validateUint32:se,validateUndefined:P,validateUnion:j,validateAbortSignal:X,validateLinkHeaderValue:Z}}),Lt=Ae((e,i)=>{ae(),ce(),le();var t=i.exports={},a,c;function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=n}catch{a=n}try{typeof clearTimeout=="function"?c=clearTimeout:c=r}catch{c=r}})();function s(U){if(a===setTimeout)return setTimeout(U,0);if((a===n||!a)&&setTimeout)return a=setTimeout,setTimeout(U,0);try{return a(U,0)}catch{try{return a.call(null,U,0)}catch{return a.call(this,U,0)}}}function o(U){if(c===clearTimeout)return clearTimeout(U);if((c===r||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(U);try{return c(U)}catch{try{return c.call(null,U)}catch{return c.call(this,U)}}}var l=[],f=!1,p,g=-1;function m(){!f||!p||(f=!1,p.length?l=p.concat(l):g=-1,l.length&&A())}function A(){if(!f){var U=s(m);f=!0;for(var I=l.length;I;){for(p=l,l=[];++g<I;)p&&p[g].run();g=-1,I=l.length}p=null,f=!1,o(U)}}t.nextTick=function(U){var I=new Array(arguments.length-1);if(arguments.length>1)for(var v=1;v<arguments.length;v++)I[v-1]=arguments[v];l.push(new b(U,I)),l.length===1&&!f&&s(A)};function b(U,I){this.fun=U,this.array=I}b.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={};function C(){}t.on=C,t.addListener=C,t.once=C,t.off=C,t.removeListener=C,t.removeAllListeners=C,t.emit=C,t.prependListener=C,t.prependOnceListener=C,t.listeners=function(U){return[]},t.binding=function(U){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(U){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}}),yt=Ae((e,i)=>{ae(),ce(),le();var{Symbol:t,SymbolAsyncIterator:a,SymbolIterator:c,SymbolFor:n}=qe(),r=t("kDestroyed"),s=t("kIsErrored"),o=t("kIsReadable"),l=t("kIsDisturbed"),f=n("nodejs.webstream.isClosedPromise"),p=n("nodejs.webstream.controllerErrorFunction");function g(w,G=!1){var de;return!!(w&&typeof w.pipe=="function"&&typeof w.on=="function"&&(!G||typeof w.pause=="function"&&typeof w.resume=="function")&&(!w._writableState||((de=w._readableState)===null||de===void 0?void 0:de.readable)!==!1)&&(!w._writableState||w._readableState))}function m(w){var G;return!!(w&&typeof w.write=="function"&&typeof w.on=="function"&&(!w._readableState||((G=w._writableState)===null||G===void 0?void 0:G.writable)!==!1))}function A(w){return!!(w&&typeof w.pipe=="function"&&w._readableState&&typeof w.on=="function"&&typeof w.write=="function")}function b(w){return w&&(w._readableState||w._writableState||typeof w.write=="function"&&typeof w.on=="function"||typeof w.pipe=="function"&&typeof w.on=="function")}function C(w){return!!(w&&!b(w)&&typeof w.pipeThrough=="function"&&typeof w.getReader=="function"&&typeof w.cancel=="function")}function U(w){return!!(w&&!b(w)&&typeof w.getWriter=="function"&&typeof w.abort=="function")}function I(w){return!!(w&&!b(w)&&typeof w.readable=="object"&&typeof w.writable=="object")}function v(w){return C(w)||U(w)||I(w)}function L(w,G){return w==null?!1:G===!0?typeof w[a]=="function":G===!1?typeof w[c]=="function":typeof w[a]=="function"||typeof w[c]=="function"}function F(w){if(!b(w))return null;let G=w._writableState,de=w._readableState,ve=G||de;return!!(w.destroyed||w[r]||ve!=null&&ve.destroyed)}function B(w){if(!m(w))return null;if(w.writableEnded===!0)return!0;let G=w._writableState;return G!=null&&G.errored?!1:typeof(G==null?void 0:G.ended)!="boolean"?null:G.ended}function k(w,G){if(!m(w))return null;if(w.writableFinished===!0)return!0;let de=w._writableState;return de!=null&&de.errored?!1:typeof(de==null?void 0:de.finished)!="boolean"?null:!!(de.finished||G===!1&&de.ended===!0&&de.length===0)}function M(w){if(!g(w))return null;if(w.readableEnded===!0)return!0;let G=w._readableState;return!G||G.errored?!1:typeof(G==null?void 0:G.ended)!="boolean"?null:G.ended}function W(w,G){if(!g(w))return null;let de=w._readableState;return de!=null&&de.errored?!1:typeof(de==null?void 0:de.endEmitted)!="boolean"?null:!!(de.endEmitted||G===!1&&de.ended===!0&&de.length===0)}function J(w){return w&&w[o]!=null?w[o]:typeof(w==null?void 0:w.readable)!="boolean"?null:F(w)?!1:g(w)&&w.readable&&!W(w)}function ne(w){return typeof(w==null?void 0:w.writable)!="boolean"?null:F(w)?!1:m(w)&&w.writable&&!B(w)}function S(w,G){return b(w)?F(w)?!0:!((G==null?void 0:G.readable)!==!1&&J(w)||(G==null?void 0:G.writable)!==!1&&ne(w)):null}function q(w){var G,de;return b(w)?w.writableErrored?w.writableErrored:(G=(de=w._writableState)===null||de===void 0?void 0:de.errored)!==null&&G!==void 0?G:null:null}function re(w){var G,de;return b(w)?w.readableErrored?w.readableErrored:(G=(de=w._readableState)===null||de===void 0?void 0:de.errored)!==null&&G!==void 0?G:null:null}function Y(w){if(!b(w))return null;if(typeof w.closed=="boolean")return w.closed;let G=w._writableState,de=w._readableState;return typeof(G==null?void 0:G.closed)=="boolean"||typeof(de==null?void 0:de.closed)=="boolean"?(G==null?void 0:G.closed)||(de==null?void 0:de.closed):typeof w._closed=="boolean"&&me(w)?w._closed:null}function me(w){return typeof w._closed=="boolean"&&typeof w._defaultKeepAlive=="boolean"&&typeof w._removedConnection=="boolean"&&typeof w._removedContLen=="boolean"}function se(w){return typeof w._sent100=="boolean"&&me(w)}function H(w){var G;return typeof w._consuming=="boolean"&&typeof w._dumped=="boolean"&&((G=w.req)===null||G===void 0?void 0:G.upgradeOrConnect)===void 0}function be(w){if(!b(w))return null;let G=w._writableState,de=w._readableState,ve=G||de;return!ve&&se(w)||!!(ve&&ve.autoDestroy&&ve.emitClose&&ve.closed===!1)}function oe(w){var G;return!!(w&&((G=w[l])!==null&&G!==void 0?G:w.readableDidRead||w.readableAborted))}function we(w){var G,de,ve,ue,R,E,z,fe,te,X;return!!(w&&((G=(de=(ve=(ue=(R=(E=w[s])!==null&&E!==void 0?E:w.readableErrored)!==null&&R!==void 0?R:w.writableErrored)!==null&&ue!==void 0?ue:(z=w._readableState)===null||z===void 0?void 0:z.errorEmitted)!==null&&ve!==void 0?ve:(fe=w._writableState)===null||fe===void 0?void 0:fe.errorEmitted)!==null&&de!==void 0?de:(te=w._readableState)===null||te===void 0?void 0:te.errored)!==null&&G!==void 0?G:!((X=w._writableState)===null||X===void 0)&&X.errored))}i.exports={kDestroyed:r,isDisturbed:oe,kIsDisturbed:l,isErrored:we,kIsErrored:s,isReadable:J,kIsReadable:o,kIsClosedPromise:f,kControllerErrorFunction:p,isClosed:Y,isDestroyed:F,isDuplexNodeStream:A,isFinished:S,isIterable:L,isReadableNodeStream:g,isReadableStream:C,isReadableEnded:M,isReadableFinished:W,isReadableErrored:re,isNodeStream:b,isWebStream:v,isWritable:ne,isWritableNodeStream:m,isWritableStream:U,isWritableEnded:B,isWritableFinished:k,isWritableErrored:q,isServerRequest:H,isServerResponse:se,willEmitClose:be,isTransformStream:I}}),Ot=Ae((e,i)=>{ae(),ce(),le();var t=Lt(),{AbortError:a,codes:c}=rt(),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_PREMATURE_CLOSE:r}=c,{kEmptyObject:s,once:o}=bt(),{validateAbortSignal:l,validateFunction:f,validateObject:p,validateBoolean:g}=Ar(),{Promise:m,PromisePrototypeThen:A}=qe(),{isClosed:b,isReadable:C,isReadableNodeStream:U,isReadableStream:I,isReadableFinished:v,isReadableErrored:L,isWritable:F,isWritableNodeStream:B,isWritableStream:k,isWritableFinished:M,isWritableErrored:W,isNodeStream:J,willEmitClose:ne,kIsClosedPromise:S}=yt();function q(H){return H.setHeader&&typeof H.abort=="function"}var re=()=>{};function Y(H,be,oe){var we,w;if(arguments.length===2?(oe=be,be=s):be==null?be=s:p(be,"options"),f(oe,"callback"),l(be.signal,"options.signal"),oe=o(oe),I(H)||k(H))return me(H,be,oe);if(!J(H))throw new n("stream",["ReadableStream","WritableStream","Stream"],H);let G=(we=be.readable)!==null&&we!==void 0?we:U(H),de=(w=be.writable)!==null&&w!==void 0?w:B(H),ve=H._writableState,ue=H._readableState,R=()=>{H.writable||fe()},E=ne(H)&&U(H)===G&&B(H)===de,z=M(H,!1),fe=()=>{z=!0,H.destroyed&&(E=!1),!(E&&(!H.readable||G))&&(!G||te)&&oe.call(H)},te=v(H,!1),X=()=>{te=!0,H.destroyed&&(E=!1),!(E&&(!H.writable||de))&&(!de||z)&&oe.call(H)},ye=Z=>{oe.call(H,Z)},ge=b(H),P=()=>{ge=!0;let Z=W(H)||L(H);if(Z&&typeof Z!="boolean")return oe.call(H,Z);if(G&&!te&&U(H,!0)&&!v(H,!1))return oe.call(H,new r);if(de&&!z&&!M(H,!1))return oe.call(H,new r);oe.call(H)},j=()=>{ge=!0;let Z=W(H)||L(H);if(Z&&typeof Z!="boolean")return oe.call(H,Z);oe.call(H)},V=()=>{H.req.on("finish",fe)};q(H)?(H.on("complete",fe),E||H.on("abort",P),H.req?V():H.on("request",V)):de&&!ve&&(H.on("end",R),H.on("close",R)),!E&&typeof H.aborted=="boolean"&&H.on("aborted",P),H.on("end",X),H.on("finish",fe),be.error!==!1&&H.on("error",ye),H.on("close",P),ge?t.nextTick(P):ve!=null&&ve.errorEmitted||ue!=null&&ue.errorEmitted?E||t.nextTick(j):(!G&&(!E||C(H))&&(z||F(H)===!1)||!de&&(!E||F(H))&&(te||C(H)===!1)||ue&&H.req&&H.aborted)&&t.nextTick(j);let ie=()=>{oe=re,H.removeListener("aborted",P),H.removeListener("complete",fe),H.removeListener("abort",P),H.removeListener("request",V),H.req&&H.req.removeListener("finish",fe),H.removeListener("end",R),H.removeListener("close",R),H.removeListener("finish",fe),H.removeListener("end",X),H.removeListener("error",ye),H.removeListener("close",P)};if(be.signal&&!ge){let Z=()=>{let D=oe;ie(),D.call(H,new a(void 0,{cause:be.signal.reason}))};if(be.signal.aborted)t.nextTick(Z);else{let D=oe;oe=o((...$)=>{be.signal.removeEventListener("abort",Z),D.apply(H,$)}),be.signal.addEventListener("abort",Z)}}return ie}function me(H,be,oe){let we=!1,w=re;if(be.signal)if(w=()=>{we=!0,oe.call(H,new a(void 0,{cause:be.signal.reason}))},be.signal.aborted)t.nextTick(w);else{let de=oe;oe=o((...ve)=>{be.signal.removeEventListener("abort",w),de.apply(H,ve)}),be.signal.addEventListener("abort",w)}let G=(...de)=>{we||t.nextTick(()=>oe.apply(H,de))};return A(H[S].promise,G,G),re}function se(H,be){var oe;let we=!1;return be===null&&(be=s),(oe=be)!==null&&oe!==void 0&&oe.cleanup&&(g(be.cleanup,"cleanup"),we=be.cleanup),new m((w,G)=>{let de=Y(H,be,ve=>{we&&de(),ve?G(ve):w()})})}i.exports=Y,i.exports.finished=se}),Xt=Ae((e,i)=>{ae(),ce(),le();var t=Lt(),{aggregateTwoErrors:a,codes:{ERR_MULTIPLE_CALLBACK:c},AbortError:n}=rt(),{Symbol:r}=qe(),{kDestroyed:s,isDestroyed:o,isFinished:l,isServerRequest:f}=yt(),p=r("kDestroy"),g=r("kConstruct");function m(S,q,re){S&&(S.stack,q&&!q.errored&&(q.errored=S),re&&!re.errored&&(re.errored=S))}function A(S,q){let re=this._readableState,Y=this._writableState,me=Y||re;return Y!=null&&Y.destroyed||re!=null&&re.destroyed?(typeof q=="function"&&q(),this):(m(S,Y,re),Y&&(Y.destroyed=!0),re&&(re.destroyed=!0),me.constructed?b(this,S,q):this.once(p,function(se){b(this,a(se,S),q)}),this)}function b(S,q,re){let Y=!1;function me(se){if(Y)return;Y=!0;let H=S._readableState,be=S._writableState;m(se,be,H),be&&(be.closed=!0),H&&(H.closed=!0),typeof re=="function"&&re(se),se?t.nextTick(C,S,se):t.nextTick(U,S)}try{S._destroy(q||null,me)}catch(se){me(se)}}function C(S,q){I(S,q),U(S)}function U(S){let q=S._readableState,re=S._writableState;re&&(re.closeEmitted=!0),q&&(q.closeEmitted=!0),(re!=null&&re.emitClose||q!=null&&q.emitClose)&&S.emit("close")}function I(S,q){let re=S._readableState,Y=S._writableState;Y!=null&&Y.errorEmitted||re!=null&&re.errorEmitted||(Y&&(Y.errorEmitted=!0),re&&(re.errorEmitted=!0),S.emit("error",q))}function v(){let S=this._readableState,q=this._writableState;S&&(S.constructed=!0,S.closed=!1,S.closeEmitted=!1,S.destroyed=!1,S.errored=null,S.errorEmitted=!1,S.reading=!1,S.ended=S.readable===!1,S.endEmitted=S.readable===!1),q&&(q.constructed=!0,q.destroyed=!1,q.closed=!1,q.closeEmitted=!1,q.errored=null,q.errorEmitted=!1,q.finalCalled=!1,q.prefinished=!1,q.ended=q.writable===!1,q.ending=q.writable===!1,q.finished=q.writable===!1)}function L(S,q,re){let Y=S._readableState,me=S._writableState;if(me!=null&&me.destroyed||Y!=null&&Y.destroyed)return this;Y!=null&&Y.autoDestroy||me!=null&&me.autoDestroy?S.destroy(q):q&&(q.stack,me&&!me.errored&&(me.errored=q),Y&&!Y.errored&&(Y.errored=q),re?t.nextTick(I,S,q):I(S,q))}function F(S,q){if(typeof S._construct!="function")return;let re=S._readableState,Y=S._writableState;re&&(re.constructed=!1),Y&&(Y.constructed=!1),S.once(g,q),!(S.listenerCount(g)>1)&&t.nextTick(B,S)}function B(S){let q=!1;function re(Y){if(q){L(S,Y??new c);return}q=!0;let me=S._readableState,se=S._writableState,H=se||me;me&&(me.constructed=!0),se&&(se.constructed=!0),H.destroyed?S.emit(p,Y):Y?L(S,Y,!0):t.nextTick(k,S)}try{S._construct(Y=>{t.nextTick(re,Y)})}catch(Y){t.nextTick(re,Y)}}function k(S){S.emit(g)}function M(S){return(S==null?void 0:S.setHeader)&&typeof S.abort=="function"}function W(S){S.emit("close")}function J(S,q){S.emit("error",q),t.nextTick(W,S)}function ne(S,q){!S||o(S)||(!q&&!l(S)&&(q=new n),f(S)?(S.socket=null,S.destroy(q)):M(S)?S.abort():M(S.req)?S.req.abort():typeof S.destroy=="function"?S.destroy(q):typeof S.close=="function"?S.close():q?t.nextTick(J,S,q):t.nextTick(W,S),S.destroyed||(S[s]=!0))}i.exports={construct:F,destroyer:ne,destroy:A,undestroy:v,errorOrDestroy:L}});function Re(){Re.init.call(this)}function br(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function Eo(e){return e._maxListeners===void 0?Re.defaultMaxListeners:e._maxListeners}function So(e,i,t,a){var c,n,r,s;if(br(t),(n=e._events)===void 0?(n=e._events=Object.create(null),e._eventsCount=0):(n.newListener!==void 0&&(e.emit("newListener",i,t.listener?t.listener:t),n=e._events),r=n[i]),r===void 0)r=n[i]=t,++e._eventsCount;else if(typeof r=="function"?r=n[i]=a?[t,r]:[r,t]:a?r.unshift(t):r.push(t),(c=Eo(e))>0&&r.length>c&&!r.warned){r.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+r.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=e,o.type=i,o.count=r.length,s=o,console&&console.warn&&console.warn(s)}return e}function $l(){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 Co(e,i,t){var a={fired:!1,wrapFn:void 0,target:e,type:i,listener:t},c=$l.bind(a);return c.listener=t,a.wrapFn=c,c}function Io(e,i,t){var a=e._events;if(a===void 0)return[];var c=a[i];return c===void 0?[]:typeof c=="function"?t?[c.listener||c]:[c]:t?function(n){for(var r=new Array(n.length),s=0;s<r.length;++s)r[s]=n[s].listener||n[s];return r}(c):ko(c,c.length)}function To(e){var i=this._events;if(i!==void 0){var t=i[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}function ko(e,i){for(var t=new Array(i),a=0;a<i;++a)t[a]=e[a];return t}var Bo,Oo,Nt,ri,ni,ii,it,Po=Ge(()=>{ae(),ce(),le(),Nt=typeof Reflect=="object"?Reflect:null,ri=Nt&&typeof Nt.apply=="function"?Nt.apply:function(e,i,t){return Function.prototype.apply.call(e,i,t)},Oo=Nt&&typeof Nt.ownKeys=="function"?Nt.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)},ni=Number.isNaN||function(e){return e!=e},Bo=Re,Re.EventEmitter=Re,Re.prototype._events=void 0,Re.prototype._eventsCount=0,Re.prototype._maxListeners=void 0,ii=10,Object.defineProperty(Re,"defaultMaxListeners",{enumerable:!0,get:function(){return ii},set:function(e){if(typeof e!="number"||e<0||ni(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");ii=e}}),Re.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},Re.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||ni(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},Re.prototype.getMaxListeners=function(){return Eo(this)},Re.prototype.emit=function(e){for(var i=[],t=1;t<arguments.length;t++)i.push(arguments[t]);var a=e==="error",c=this._events;if(c!==void 0)a=a&&c.error===void 0;else if(!a)return!1;if(a){var n;if(i.length>0&&(n=i[0]),n instanceof Error)throw n;var r=new Error("Unhandled error."+(n?" ("+n.message+")":""));throw r.context=n,r}var s=c[e];if(s===void 0)return!1;if(typeof s=="function")ri(s,this,i);else{var o=s.length,l=ko(s,o);for(t=0;t<o;++t)ri(l[t],this,i)}return!0},Re.prototype.addListener=function(e,i){return So(this,e,i,!1)},Re.prototype.on=Re.prototype.addListener,Re.prototype.prependListener=function(e,i){return So(this,e,i,!0)},Re.prototype.once=function(e,i){return br(i),this.on(e,Co(this,e,i)),this},Re.prototype.prependOnceListener=function(e,i){return br(i),this.prependListener(e,Co(this,e,i)),this},Re.prototype.removeListener=function(e,i){var t,a,c,n,r;if(br(i),(a=this._events)===void 0)return this;if((t=a[e])===void 0)return this;if(t===i||t.listener===i)--this._eventsCount==0?this._events=Object.create(null):(delete a[e],a.removeListener&&this.emit("removeListener",e,t.listener||i));else if(typeof t!="function"){for(c=-1,n=t.length-1;n>=0;n--)if(t[n]===i||t[n].listener===i){r=t[n].listener,c=n;break}if(c<0)return this;c===0?t.shift():function(s,o){for(;o+1<s.length;o++)s[o]=s[o+1];s.pop()}(t,c),t.length===1&&(a[e]=t[0]),a.removeListener!==void 0&&this.emit("removeListener",e,r||i)}return this},Re.prototype.off=Re.prototype.removeListener,Re.prototype.removeAllListeners=function(e){var i,t,a;if((t=this._events)===void 0)return this;if(t.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):t[e]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete t[e]),this;if(arguments.length===0){var c,n=Object.keys(t);for(a=0;a<n.length;++a)(c=n[a])!=="removeListener"&&this.removeAllListeners(c);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(i=t[e])=="function")this.removeListener(e,i);else if(i!==void 0)for(a=i.length-1;a>=0;a--)this.removeListener(e,i[a]);return this},Re.prototype.listeners=function(e){return Io(this,e,!0)},Re.prototype.rawListeners=function(e){return Io(this,e,!1)},Re.listenerCount=function(e,i){return typeof e.listenerCount=="function"?e.listenerCount(i):To.call(e,i)},Re.prototype.listenerCount=To,Re.prototype.eventNames=function(){return this._eventsCount>0?Oo(this._events):[]},it=Bo,it.EventEmitter,it.defaultMaxListeners,it.init,it.listenerCount,it.EventEmitter,it.defaultMaxListeners,it.init,it.listenerCount}),Ft={};Mt(Ft,{EventEmitter:()=>xo,default:()=>it,defaultMaxListeners:()=>Ro,init:()=>Mo,listenerCount:()=>Uo,on:()=>Do,once:()=>Lo});var xo,Ro,Mo,Uo,Do,Lo,er=Ge(()=>{ae(),ce(),le(),Po(),Po(),it.once=function(e,i){return new Promise((t,a)=>{function c(...r){n!==void 0&&e.removeListener("error",n),t(r)}let n;i!=="error"&&(n=r=>{e.removeListener(name,c),a(r)},e.once("error",n)),e.once(i,c)})},it.on=function(e,i){let t=[],a=[],c=null,n=!1,r={async next(){let l=t.shift();if(l)return createIterResult(l,!1);if(c){let f=Promise.reject(c);return c=null,f}return n?createIterResult(void 0,!0):new Promise((f,p)=>a.push({resolve:f,reject:p}))},async return(){e.removeListener(i,s),e.removeListener("error",o),n=!0;for(let l of a)l.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(l){c=l,e.removeListener(i,s),e.removeListener("error",o)},[Symbol.asyncIterator](){return this}};return e.on(i,s),e.on("error",o),r;function s(...l){let f=a.shift();f?f.resolve(createIterResult(l,!1)):t.push(l)}function o(l){n=!0;let f=a.shift();f?f.reject(l):c=l,r.return()}},{EventEmitter:xo,defaultMaxListeners:Ro,init:Mo,listenerCount:Uo,on:Do,once:Lo}=it}),oi=Ae((e,i)=>{ae(),ce(),le();var{ArrayIsArray:t,ObjectSetPrototypeOf:a}=qe(),{EventEmitter:c}=(er(),Ue(Ft));function n(s){c.call(this,s)}a(n.prototype,c.prototype),a(n,c),n.prototype.pipe=function(s,o){let l=this;function f(U){s.writable&&s.write(U)===!1&&l.pause&&l.pause()}l.on("data",f);function p(){l.readable&&l.resume&&l.resume()}s.on("drain",p),!s._isStdio&&(!o||o.end!==!1)&&(l.on("end",m),l.on("close",A));let g=!1;function m(){g||(g=!0,s.end())}function A(){g||(g=!0,typeof s.destroy=="function"&&s.destroy())}function b(U){C(),c.listenerCount(this,"error")===0&&this.emit("error",U)}r(l,"error",b),r(s,"error",b);function C(){l.removeListener("data",f),s.removeListener("drain",p),l.removeListener("end",m),l.removeListener("close",A),l.removeListener("error",b),s.removeListener("error",b),l.removeListener("end",C),l.removeListener("close",C),s.removeListener("close",C)}return l.on("end",C),l.on("close",C),s.on("close",C),s.emit("pipe",l),s};function r(s,o,l){if(typeof s.prependListener=="function")return s.prependListener(o,l);!s._events||!s._events[o]?s.on(o,l):t(s._events[o])?s._events[o].unshift(l):s._events[o]=[l,s._events[o]]}i.exports={Stream:n,prependListener:r}}),yr=Ae((e,i)=>{ae(),ce(),le();var{AbortError:t,codes:a}=rt(),{isNodeStream:c,isWebStream:n,kControllerErrorFunction:r}=yt(),s=Ot(),{ERR_INVALID_ARG_TYPE:o}=a,l=(f,p)=>{if(typeof f!="object"||!("aborted"in f))throw new o(p,"AbortSignal",f)};i.exports.addAbortSignal=function(f,p){if(l(f,"signal"),!c(p)&&!n(p))throw new o("stream",["ReadableStream","WritableStream","Stream"],p);return i.exports.addAbortSignalNoValidate(f,p)},i.exports.addAbortSignalNoValidate=function(f,p){if(typeof f!="object"||!("aborted"in f))return p;let g=c(p)?()=>{p.destroy(new t(void 0,{cause:f.reason}))}:()=>{p[r](new t(void 0,{cause:f.reason}))};return f.aborted?g():(f.addEventListener("abort",g),s(p,()=>f.removeEventListener("abort",g))),p}}),zl=Ae((e,i)=>{ae(),ce(),le();var{StringPrototypeSlice:t,SymbolIterator:a,TypedArrayPrototypeSet:c,Uint8Array:n}=qe(),{Buffer:r}=(Ze(),Ue(Je)),{inspect:s}=bt();i.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(o){let l={data:o,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length}unshift(o){let l={data:o,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length}shift(){if(this.length===0)return;let o=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,o}clear(){this.head=this.tail=null,this.length=0}join(o){if(this.length===0)return"";let l=this.head,f=""+l.data;for(;(l=l.next)!==null;)f+=o+l.data;return f}concat(o){if(this.length===0)return r.alloc(0);let l=r.allocUnsafe(o>>>0),f=this.head,p=0;for(;f;)c(l,f.data,p),p+=f.data.length,f=f.next;return l}consume(o,l){let f=this.head.data;if(o<f.length){let p=f.slice(0,o);return this.head.data=f.slice(o),p}return o===f.length?this.shift():l?this._getString(o):this._getBuffer(o)}first(){return this.head.data}*[a](){for(let o=this.head;o;o=o.next)yield o.data}_getString(o){let l="",f=this.head,p=0;do{let g=f.data;if(o>g.length)l+=g,o-=g.length;else{o===g.length?(l+=g,++p,f.next?this.head=f.next:this.head=this.tail=null):(l+=t(g,0,o),this.head=f,f.data=t(g,o));break}++p}while((f=f.next)!==null);return this.length-=p,l}_getBuffer(o){let l=r.allocUnsafe(o),f=o,p=this.head,g=0;do{let m=p.data;if(o>m.length)c(l,m,f-o),o-=m.length;else{o===m.length?(c(l,m,f-o),++g,p.next?this.head=p.next:this.head=this.tail=null):(c(l,new n(m.buffer,m.byteOffset,o),f-o),this.head=p,p.data=m.slice(o));break}++g}while((p=p.next)!==null);return this.length-=g,l}[Symbol.for("nodejs.util.inspect.custom")](o,l){return s(this,{...l,depth:0,customInspect:!1})}}}),si=Ae((e,i)=>{ae(),ce(),le();var{MathFloor:t,NumberIsInteger:a}=qe(),{ERR_INVALID_ARG_VALUE:c}=rt().codes;function n(o,l,f){return o.highWaterMark!=null?o.highWaterMark:l?o[f]:null}function r(o){return o?16:16*1024}function s(o,l,f,p){let g=n(l,p,f);if(g!=null){if(!a(g)||g<0){let m=p?`options.${f}`:"options.highWaterMark";throw new c(m,g)}return t(g)}return r(o.objectMode)}i.exports={getHighWaterMark:s,getDefaultHighWaterMark:r}});function No(e){var i=e.length;if(i%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");return t===-1&&(t=i),[t,t===i?0:4-t%4]}function Yl(e,i,t){for(var a,c,n=[],r=i;r<t;r+=3)a=(e[r]<<16&16711680)+(e[r+1]<<8&65280)+(255&e[r+2]),n.push(at[(c=a)>>18&63]+at[c>>12&63]+at[c>>6&63]+at[63&c]);return n.join("")}function wt(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var i=new Uint8Array(e);return Object.setPrototypeOf(i,pe.prototype),i}function pe(e,i,t){if(typeof e=="number"){if(typeof i=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ai(e)}return Fo(e,i,t)}function Fo(e,i,t){if(typeof e=="string")return function(n,r){if(typeof r=="string"&&r!==""||(r="utf8"),!pe.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var s=0|Vo(n,r),o=wt(s),l=o.write(n,r);return l!==s&&(o=o.slice(0,l)),o}(e,i);if(ArrayBuffer.isView(e))return li(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(vt(e,ArrayBuffer)||e&&vt(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(vt(e,SharedArrayBuffer)||e&&vt(e.buffer,SharedArrayBuffer)))return Gl(e,i,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var a=e.valueOf&&e.valueOf();if(a!=null&&a!==e)return pe.from(a,i,t);var c=function(n){if(pe.isBuffer(n)){var r=0|ci(n.length),s=wt(r);return s.length===0||n.copy(s,0,0,r),s}if(n.length!==void 0)return typeof n.length!="number"||ui(n.length)?wt(0):li(n);if(n.type==="Buffer"&&Array.isArray(n.data))return li(n.data)}(e);if(c)return c;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return pe.from(e[Symbol.toPrimitive]("string"),i,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function jo(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ai(e){return jo(e),wt(e<0?0:0|ci(e))}function li(e){for(var i=e.length<0?0:0|ci(e.length),t=wt(i),a=0;a<i;a+=1)t[a]=255&e[a];return t}function Gl(e,i,t){if(i<0||e.byteLength<i)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<i+(t||0))throw new RangeError('"length" is outside of buffer bounds');var a;return a=i===void 0&&t===void 0?new Uint8Array(e):t===void 0?new Uint8Array(e,i):new Uint8Array(e,i,t),Object.setPrototypeOf(a,pe.prototype),a}function ci(e){if(e>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function Vo(e,i){if(pe.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||vt(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var t=e.length,a=arguments.length>2&&arguments[2]===!0;if(!a&&t===0)return 0;for(var c=!1;;)switch(i){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return hi(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return Yo(e).length;default:if(c)return a?-1:hi(e).length;i=(""+i).toLowerCase(),c=!0}}function Jl(e,i,t){var a=!1;if((i===void 0||i<0)&&(i=0),i>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0)<=(i>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return sc(this,i,t);case"utf8":case"utf-8":return Ho(this,i,t);case"ascii":return ic(this,i,t);case"latin1":case"binary":return oc(this,i,t);case"base64":return nc(this,i,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ac(this,i,t);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function jt(e,i,t){var a=e[i];e[i]=e[t],e[t]=a}function Ko(e,i,t,a,c){if(e.length===0)return-1;if(typeof t=="string"?(a=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),ui(t=+t)&&(t=c?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(c)return-1;t=e.length-1}else if(t<0){if(!c)return-1;t=0}if(typeof i=="string"&&(i=pe.from(i,a)),pe.isBuffer(i))return i.length===0?-1:Wo(e,i,t,a,c);if(typeof i=="number")return i&=255,typeof Uint8Array.prototype.indexOf=="function"?c?Uint8Array.prototype.indexOf.call(e,i,t):Uint8Array.prototype.lastIndexOf.call(e,i,t):Wo(e,[i],t,a,c);throw new TypeError("val must be string, number or Buffer")}function Wo(e,i,t,a,c){var n,r=1,s=e.length,o=i.length;if(a!==void 0&&((a=String(a).toLowerCase())==="ucs2"||a==="ucs-2"||a==="utf16le"||a==="utf-16le")){if(e.length<2||i.length<2)return-1;r=2,s/=2,o/=2,t/=2}function l(m,A){return r===1?m[A]:m.readUInt16BE(A*r)}if(c){var f=-1;for(n=t;n<s;n++)if(l(e,n)===l(i,f===-1?0:n-f)){if(f===-1&&(f=n),n-f+1===o)return f*r}else f!==-1&&(n-=n-f),f=-1}else for(t+o>s&&(t=s-o),n=t;n>=0;n--){for(var p=!0,g=0;g<o;g++)if(l(e,n+g)!==l(i,g)){p=!1;break}if(p)return n}return-1}function Zl(e,i,t,a){t=Number(t)||0;var c=e.length-t;a?(a=Number(a))>c&&(a=c):a=c;var n=i.length;a>n/2&&(a=n/2);for(var r=0;r<a;++r){var s=parseInt(i.substr(2*r,2),16);if(ui(s))return r;e[t+r]=s}return r}function Xl(e,i,t,a){return wr(hi(i,e.length-t),e,t,a)}function Qo(e,i,t,a){return wr(function(c){for(var n=[],r=0;r<c.length;++r)n.push(255&c.charCodeAt(r));return n}(i),e,t,a)}function ec(e,i,t,a){return Qo(e,i,t,a)}function tc(e,i,t,a){return wr(Yo(i),e,t,a)}function rc(e,i,t,a){return wr(function(c,n){for(var r,s,o,l=[],f=0;f<c.length&&!((n-=2)<0);++f)r=c.charCodeAt(f),s=r>>8,o=r%256,l.push(o),l.push(s);return l}(i,e.length-t),e,t,a)}function nc(e,i,t){return i===0&&t===e.length?_r.fromByteArray(e):_r.fromByteArray(e.slice(i,t))}function Ho(e,i,t){t=Math.min(e.length,t);for(var a=[],c=i;c<t;){var n,r,s,o,l=e[c],f=null,p=l>239?4:l>223?3:l>191?2:1;if(c+p<=t)switch(p){case 1:l<128&&(f=l);break;case 2:(192&(n=e[c+1]))==128&&(o=(31&l)<<6|63&n)>127&&(f=o);break;case 3:n=e[c+1],r=e[c+2],(192&n)==128&&(192&r)==128&&(o=(15&l)<<12|(63&n)<<6|63&r)>2047&&(o<55296||o>57343)&&(f=o);break;case 4:n=e[c+1],r=e[c+2],s=e[c+3],(192&n)==128&&(192&r)==128&&(192&s)==128&&(o=(15&l)<<18|(63&n)<<12|(63&r)<<6|63&s)>65535&&o<1114112&&(f=o)}f===null?(f=65533,p=1):f>65535&&(f-=65536,a.push(f>>>10&1023|55296),f=56320|1023&f),a.push(f),c+=p}return function(g){var m=g.length;if(m<=4096)return String.fromCharCode.apply(String,g);for(var A="",b=0;b<m;)A+=String.fromCharCode.apply(String,g.slice(b,b+=4096));return A}(a)}function ic(e,i,t){var a="";t=Math.min(e.length,t);for(var c=i;c<t;++c)a+=String.fromCharCode(127&e[c]);return a}function oc(e,i,t){var a="";t=Math.min(e.length,t);for(var c=i;c<t;++c)a+=String.fromCharCode(e[c]);return a}function sc(e,i,t){var a=e.length;(!i||i<0)&&(i=0),(!t||t<0||t>a)&&(t=a);for(var c="",n=i;n<t;++n)c+=rs[e[n]];return c}function ac(e,i,t){for(var a=e.slice(i,t),c="",n=0;n<a.length;n+=2)c+=String.fromCharCode(a[n]+256*a[n+1]);return c}function $e(e,i,t){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+i>t)throw new RangeError("Trying to access beyond buffer length")}function nt(e,i,t,a,c,n){if(!pe.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>c||i<n)throw new RangeError('"value" argument is out of bounds');if(t+a>e.length)throw new RangeError("Index out of range")}function qo(e,i,t,a,c,n){if(t+a>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function $o(e,i,t,a,c){return i=+i,t>>>=0,c||qo(e,0,t,4),Wt.write(e,i,t,a,23,4),t+4}function zo(e,i,t,a,c){return i=+i,t>>>=0,c||qo(e,0,t,8),Wt.write(e,i,t,a,52,8),t+8}function hi(e,i){var t;i=i||1/0;for(var a=e.length,c=null,n=[],r=0;r<a;++r){if((t=e.charCodeAt(r))>55295&&t<57344){if(!c){if(t>56319){(i-=3)>-1&&n.push(239,191,189);continue}if(r+1===a){(i-=3)>-1&&n.push(239,191,189);continue}c=t;continue}if(t<56320){(i-=3)>-1&&n.push(239,191,189),c=t;continue}t=65536+(c-55296<<10|t-56320)}else c&&(i-=3)>-1&&n.push(239,191,189);if(c=null,t<128){if((i-=1)<0)break;n.push(t)}else if(t<2048){if((i-=2)<0)break;n.push(t>>6|192,63&t|128)}else if(t<65536){if((i-=3)<0)break;n.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((i-=4)<0)break;n.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return n}function Yo(e){return _r.toByteArray(function(i){if((i=(i=i.split("=")[0]).trim().replace(ts,"")).length<2)return"";for(;i.length%4!=0;)i+="=";return i}(e))}function wr(e,i,t,a){for(var c=0;c<a&&!(c+t>=i.length||c>=e.length);++c)i[c+t]=e[c];return c}function vt(e,i){return e instanceof i||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===i.name}function ui(e){return e!=e}function Go(e,i){for(var t in e)i[t]=e[t]}function Vt(e,i,t){return lt(e,i,t)}function ar(e){var i;switch(this.encoding=function(t){var a=function(c){if(!c)return"utf8";for(var n;;)switch(c){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 c;default:if(n)return;c=(""+c).toLowerCase(),n=!0}}(t);if(typeof a!="string"&&(Er.isEncoding===pi||!pi(t)))throw new Error("Unknown encoding: "+t);return a||t}(e),this.encoding){case"utf16le":this.text=cc,this.end=hc,i=4;break;case"utf8":this.fillLast=lc,i=4;break;case"base64":this.text=uc,this.end=fc,i=3;break;default:return this.write=dc,this.end=pc,void 0}this.lastNeed=0,this.lastTotal=0,this.lastChar=Er.allocUnsafe(i)}function fi(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function lc(e){var i=this.lastTotal-this.lastNeed,t=function(a,c,n){if((192&c[0])!=128)return a.lastNeed=0,"�";if(a.lastNeed>1&&c.length>1){if((192&c[1])!=128)return a.lastNeed=1,"�";if(a.lastNeed>2&&c.length>2&&(192&c[2])!=128)return a.lastNeed=2,"�"}}(this,e);return t!==void 0?t:this.lastNeed<=e.length?(e.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,i,0,e.length),this.lastNeed-=e.length,void 0)}function cc(e,i){if((e.length-i)%2==0){var t=e.toString("utf16le",i);if(t){var a=t.charCodeAt(t.length-1);if(a>=55296&&a<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",i,e.length-1)}function hc(e){var i=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,t)}return i}function uc(e,i){var t=(e.length-i)%3;return t===0?e.toString("base64",i):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",i,e.length-t))}function fc(e){var i=e&&e.length?this.write(e):"";return this.lastNeed?i+this.lastChar.toString("base64",0,3-this.lastNeed):i}function dc(e){return e.toString(this.encoding)}function pc(e){return e&&e.length?this.write(e):""}var Jo,at,ot,Zo,vr,Kt,Xo,es,ft,_r,Wt,di,ts,rs,lr,cr,lt,ns,tr,Er,pi,is=Ge(()=>{for(ae(),ce(),le(),Jo={byteLength:function(e){var i=No(e),t=i[0],a=i[1];return 3*(t+a)/4-a},toByteArray:function(e){var i,t,a=No(e),c=a[0],n=a[1],r=new Zo(function(l,f,p){return 3*(f+p)/4-p}(0,c,n)),s=0,o=n>0?c-4:c;for(t=0;t<o;t+=4)i=ot[e.charCodeAt(t)]<<18|ot[e.charCodeAt(t+1)]<<12|ot[e.charCodeAt(t+2)]<<6|ot[e.charCodeAt(t+3)],r[s++]=i>>16&255,r[s++]=i>>8&255,r[s++]=255&i;return n===2&&(i=ot[e.charCodeAt(t)]<<2|ot[e.charCodeAt(t+1)]>>4,r[s++]=255&i),n===1&&(i=ot[e.charCodeAt(t)]<<10|ot[e.charCodeAt(t+1)]<<4|ot[e.charCodeAt(t+2)]>>2,r[s++]=i>>8&255,r[s++]=255&i),r},fromByteArray:function(e){for(var i,t=e.length,a=t%3,c=[],n=0,r=t-a;n<r;n+=16383)c.push(Yl(e,n,n+16383>r?r:n+16383));return a===1?(i=e[t-1],c.push(at[i>>2]+at[i<<4&63]+"==")):a===2&&(i=(e[t-2]<<8)+e[t-1],c.push(at[i>>10]+at[i>>4&63]+at[i<<2&63]+"=")),c.join("")}},at=[],ot=[],Zo=typeof Uint8Array<"u"?Uint8Array:Array,vr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kt=0,Xo=vr.length;Kt<Xo;++Kt)at[Kt]=vr[Kt],ot[vr.charCodeAt(Kt)]=Kt;ot[45]=62,ot[95]=63,es={read:function(e,i,t,a,c){var n,r,s=8*c-a-1,o=(1<<s)-1,l=o>>1,f=-7,p=t?c-1:0,g=t?-1:1,m=e[i+p];for(p+=g,n=m&(1<<-f)-1,m>>=-f,f+=s;f>0;n=256*n+e[i+p],p+=g,f-=8);for(r=n&(1<<-f)-1,n>>=-f,f+=a;f>0;r=256*r+e[i+p],p+=g,f-=8);if(n===0)n=1-l;else{if(n===o)return r?NaN:1/0*(m?-1:1);r+=Math.pow(2,a),n-=l}return(m?-1:1)*r*Math.pow(2,n-a)},write:function(e,i,t,a,c,n){var r,s,o,l=8*n-c-1,f=(1<<l)-1,p=f>>1,g=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=a?0:n-1,A=a?1:-1,b=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(s=isNaN(i)?1:0,r=f):(r=Math.floor(Math.log(i)/Math.LN2),i*(o=Math.pow(2,-r))<1&&(r--,o*=2),(i+=r+p>=1?g/o:g*Math.pow(2,1-p))*o>=2&&(r++,o/=2),r+p>=f?(s=0,r=f):r+p>=1?(s=(i*o-1)*Math.pow(2,c),r+=p):(s=i*Math.pow(2,p-1)*Math.pow(2,c),r=0));c>=8;e[t+m]=255&s,m+=A,s/=256,c-=8);for(r=r<<c|s,l+=c;l>0;e[t+m]=255&r,m+=A,r/=256,l-=8);e[t+m-A]|=128*b}},ft={},_r=Jo,Wt=es,di=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null,ft.Buffer=pe,ft.SlowBuffer=function(e){return+e!=e&&(e=0),pe.alloc(+e)},ft.INSPECT_MAX_BYTES=50,ft.kMaxLength=2147483647,pe.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),i={foo:function(){return 42}};return Object.setPrototypeOf(i,Uint8Array.prototype),Object.setPrototypeOf(e,i),e.foo()===42}catch{return!1}}(),pe.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."),Object.defineProperty(pe.prototype,"parent",{enumerable:!0,get:function(){if(pe.isBuffer(this))return this.buffer}}),Object.defineProperty(pe.prototype,"offset",{enumerable:!0,get:function(){if(pe.isBuffer(this))return this.byteOffset}}),pe.poolSize=8192,pe.from=function(e,i,t){return Fo(e,i,t)},Object.setPrototypeOf(pe.prototype,Uint8Array.prototype),Object.setPrototypeOf(pe,Uint8Array),pe.alloc=function(e,i,t){return function(a,c,n){return jo(a),a<=0?wt(a):c!==void 0?typeof n=="string"?wt(a).fill(c,n):wt(a).fill(c):wt(a)}(e,i,t)},pe.allocUnsafe=function(e){return ai(e)},pe.allocUnsafeSlow=function(e){return ai(e)},pe.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==pe.prototype},pe.compare=function(e,i){if(vt(e,Uint8Array)&&(e=pe.from(e,e.offset,e.byteLength)),vt(i,Uint8Array)&&(i=pe.from(i,i.offset,i.byteLength)),!pe.isBuffer(e)||!pe.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===i)return 0;for(var t=e.length,a=i.length,c=0,n=Math.min(t,a);c<n;++c)if(e[c]!==i[c]){t=e[c],a=i[c];break}return t<a?-1:a<t?1:0},pe.isEncoding=function(e){switch(String(e).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}},pe.concat=function(e,i){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return pe.alloc(0);var t;if(i===void 0)for(i=0,t=0;t<e.length;++t)i+=e[t].length;var a=pe.allocUnsafe(i),c=0;for(t=0;t<e.length;++t){var n=e[t];if(vt(n,Uint8Array)&&(n=pe.from(n)),!pe.isBuffer(n))throw new TypeError('"list" argument must be an Array of Buffers');n.copy(a,c),c+=n.length}return a},pe.byteLength=Vo,pe.prototype._isBuffer=!0,pe.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<e;i+=2)jt(this,i,i+1);return this},pe.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<e;i+=4)jt(this,i,i+3),jt(this,i+1,i+2);return this},pe.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<e;i+=8)jt(this,i,i+7),jt(this,i+1,i+6),jt(this,i+2,i+5),jt(this,i+3,i+4);return this},pe.prototype.toString=function(){var e=this.length;return e===0?"":arguments.length===0?Ho(this,0,e):Jl.apply(this,arguments)},pe.prototype.toLocaleString=pe.prototype.toString,pe.prototype.equals=function(e){if(!pe.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||pe.compare(this,e)===0},pe.prototype.inspect=function(){var e="",i=ft.INSPECT_MAX_BYTES;return e=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(e+=" ... "),"<Buffer "+e+">"},di&&(pe.prototype[di]=pe.prototype.inspect),pe.prototype.compare=function(e,i,t,a,c){if(vt(e,Uint8Array)&&(e=pe.from(e,e.offset,e.byteLength)),!pe.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(i===void 0&&(i=0),t===void 0&&(t=e?e.length:0),a===void 0&&(a=0),c===void 0&&(c=this.length),i<0||t>e.length||a<0||c>this.length)throw new RangeError("out of range index");if(a>=c&&i>=t)return 0;if(a>=c)return-1;if(i>=t)return 1;if(this===e)return 0;for(var n=(c>>>=0)-(a>>>=0),r=(t>>>=0)-(i>>>=0),s=Math.min(n,r),o=this.slice(a,c),l=e.slice(i,t),f=0;f<s;++f)if(o[f]!==l[f]){n=o[f],r=l[f];break}return n<r?-1:r<n?1:0},pe.prototype.includes=function(e,i,t){return this.indexOf(e,i,t)!==-1},pe.prototype.indexOf=function(e,i,t){return Ko(this,e,i,t,!0)},pe.prototype.lastIndexOf=function(e,i,t){return Ko(this,e,i,t,!1)},pe.prototype.write=function(e,i,t,a){if(i===void 0)a="utf8",t=this.length,i=0;else if(t===void 0&&typeof i=="string")a=i,t=this.length,i=0;else{if(!isFinite(i))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");i>>>=0,isFinite(t)?(t>>>=0,a===void 0&&(a="utf8")):(a=t,t=void 0)}var c=this.length-i;if((t===void 0||t>c)&&(t=c),e.length>0&&(t<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var n=!1;;)switch(a){case"hex":return Zl(this,e,i,t);case"utf8":case"utf-8":return Xl(this,e,i,t);case"ascii":return Qo(this,e,i,t);case"latin1":case"binary":return ec(this,e,i,t);case"base64":return tc(this,e,i,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rc(this,e,i,t);default:if(n)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),n=!0}},pe.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},pe.prototype.slice=function(e,i){var t=this.length;(e=~~e)<0?(e+=t)<0&&(e=0):e>t&&(e=t),(i=i===void 0?t:~~i)<0?(i+=t)<0&&(i=0):i>t&&(i=t),i<e&&(i=e);var a=this.subarray(e,i);return Object.setPrototypeOf(a,pe.prototype),a},pe.prototype.readUIntLE=function(e,i,t){e>>>=0,i>>>=0,t||$e(e,i,this.length);for(var a=this[e],c=1,n=0;++n<i&&(c*=256);)a+=this[e+n]*c;return a},pe.prototype.readUIntBE=function(e,i,t){e>>>=0,i>>>=0,t||$e(e,i,this.length);for(var a=this[e+--i],c=1;i>0&&(c*=256);)a+=this[e+--i]*c;return a},pe.prototype.readUInt8=function(e,i){return e>>>=0,i||$e(e,1,this.length),this[e]},pe.prototype.readUInt16LE=function(e,i){return e>>>=0,i||$e(e,2,this.length),this[e]|this[e+1]<<8},pe.prototype.readUInt16BE=function(e,i){return e>>>=0,i||$e(e,2,this.length),this[e]<<8|this[e+1]},pe.prototype.readUInt32LE=function(e,i){return e>>>=0,i||$e(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},pe.prototype.readUInt32BE=function(e,i){return e>>>=0,i||$e(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},pe.prototype.readIntLE=function(e,i,t){e>>>=0,i>>>=0,t||$e(e,i,this.length);for(var a=this[e],c=1,n=0;++n<i&&(c*=256);)a+=this[e+n]*c;return a>=(c*=128)&&(a-=Math.pow(2,8*i)),a},pe.prototype.readIntBE=function(e,i,t){e>>>=0,i>>>=0,t||$e(e,i,this.length);for(var a=i,c=1,n=this[e+--a];a>0&&(c*=256);)n+=this[e+--a]*c;return n>=(c*=128)&&(n-=Math.pow(2,8*i)),n},pe.prototype.readInt8=function(e,i){return e>>>=0,i||$e(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},pe.prototype.readInt16LE=function(e,i){e>>>=0,i||$e(e,2,this.length);var t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},pe.prototype.readInt16BE=function(e,i){e>>>=0,i||$e(e,2,this.length);var t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},pe.prototype.readInt32LE=function(e,i){return e>>>=0,i||$e(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},pe.prototype.readInt32BE=function(e,i){return e>>>=0,i||$e(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},pe.prototype.readFloatLE=function(e,i){return e>>>=0,i||$e(e,4,this.length),Wt.read(this,e,!0,23,4)},pe.prototype.readFloatBE=function(e,i){return e>>>=0,i||$e(e,4,this.length),Wt.read(this,e,!1,23,4)},pe.prototype.readDoubleLE=function(e,i){return e>>>=0,i||$e(e,8,this.length),Wt.read(this,e,!0,52,8)},pe.prototype.readDoubleBE=function(e,i){return e>>>=0,i||$e(e,8,this.length),Wt.read(this,e,!1,52,8)},pe.prototype.writeUIntLE=function(e,i,t,a){e=+e,i>>>=0,t>>>=0,a||nt(this,e,i,t,Math.pow(2,8*t)-1,0);var c=1,n=0;for(this[i]=255&e;++n<t&&(c*=256);)this[i+n]=e/c&255;return i+t},pe.prototype.writeUIntBE=function(e,i,t,a){e=+e,i>>>=0,t>>>=0,a||nt(this,e,i,t,Math.pow(2,8*t)-1,0);var c=t-1,n=1;for(this[i+c]=255&e;--c>=0&&(n*=256);)this[i+c]=e/n&255;return i+t},pe.prototype.writeUInt8=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,1,255,0),this[i]=255&e,i+1},pe.prototype.writeUInt16LE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,2,65535,0),this[i]=255&e,this[i+1]=e>>>8,i+2},pe.prototype.writeUInt16BE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,2,65535,0),this[i]=e>>>8,this[i+1]=255&e,i+2},pe.prototype.writeUInt32LE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,4,4294967295,0),this[i+3]=e>>>24,this[i+2]=e>>>16,this[i+1]=e>>>8,this[i]=255&e,i+4},pe.prototype.writeUInt32BE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,4,4294967295,0),this[i]=e>>>24,this[i+1]=e>>>16,this[i+2]=e>>>8,this[i+3]=255&e,i+4},pe.prototype.writeIntLE=function(e,i,t,a){if(e=+e,i>>>=0,!a){var c=Math.pow(2,8*t-1);nt(this,e,i,t,c-1,-c)}var n=0,r=1,s=0;for(this[i]=255&e;++n<t&&(r*=256);)e<0&&s===0&&this[i+n-1]!==0&&(s=1),this[i+n]=(e/r>>0)-s&255;return i+t},pe.prototype.writeIntBE=function(e,i,t,a){if(e=+e,i>>>=0,!a){var c=Math.pow(2,8*t-1);nt(this,e,i,t,c-1,-c)}var n=t-1,r=1,s=0;for(this[i+n]=255&e;--n>=0&&(r*=256);)e<0&&s===0&&this[i+n+1]!==0&&(s=1),this[i+n]=(e/r>>0)-s&255;return i+t},pe.prototype.writeInt8=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,1,127,-128),e<0&&(e=255+e+1),this[i]=255&e,i+1},pe.prototype.writeInt16LE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,2,32767,-32768),this[i]=255&e,this[i+1]=e>>>8,i+2},pe.prototype.writeInt16BE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,2,32767,-32768),this[i]=e>>>8,this[i+1]=255&e,i+2},pe.prototype.writeInt32LE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,4,2147483647,-2147483648),this[i]=255&e,this[i+1]=e>>>8,this[i+2]=e>>>16,this[i+3]=e>>>24,i+4},pe.prototype.writeInt32BE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[i]=e>>>24,this[i+1]=e>>>16,this[i+2]=e>>>8,this[i+3]=255&e,i+4},pe.prototype.writeFloatLE=function(e,i,t){return $o(this,e,i,!0,t)},pe.prototype.writeFloatBE=function(e,i,t){return $o(this,e,i,!1,t)},pe.prototype.writeDoubleLE=function(e,i,t){return zo(this,e,i,!0,t)},pe.prototype.writeDoubleBE=function(e,i,t){return zo(this,e,i,!1,t)},pe.prototype.copy=function(e,i,t,a){if(!pe.isBuffer(e))throw new TypeError("argument should be a Buffer");if(t||(t=0),a||a===0||(a=this.length),i>=e.length&&(i=e.length),i||(i=0),a>0&&a<t&&(a=t),a===t||e.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(t<0||t>=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-i<a-t&&(a=e.length-i+t);var c=a-t;if(this===e&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(i,t,a);else if(this===e&&t<i&&i<a)for(var n=c-1;n>=0;--n)e[n+i]=this[n+t];else Uint8Array.prototype.set.call(e,this.subarray(t,a),i);return c},pe.prototype.fill=function(e,i,t,a){if(typeof e=="string"){if(typeof i=="string"?(a=i,i=0,t=this.length):typeof t=="string"&&(a=t,t=this.length),a!==void 0&&typeof a!="string")throw new TypeError("encoding must be a string");if(typeof a=="string"&&!pe.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(e.length===1){var c=e.charCodeAt(0);(a==="utf8"&&c<128||a==="latin1")&&(e=c)}}else typeof e=="number"?e&=255:typeof e=="boolean"&&(e=Number(e));if(i<0||this.length<i||this.length<t)throw new RangeError("Out of range index");if(t<=i)return this;var n;if(i>>>=0,t=t===void 0?this.length:t>>>0,e||(e=0),typeof e=="number")for(n=i;n<t;++n)this[n]=e;else{var r=pe.isBuffer(e)?e:pe.from(e,a),s=r.length;if(s===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<t-i;++n)this[n+i]=r[n%s]}return this},ts=/[^+/0-9A-Za-z-_]/g,rs=function(){for(var e=new Array(256),i=0;i<16;++i)for(var t=16*i,a=0;a<16;++a)e[t+a]="0123456789abcdef"[i]+"0123456789abcdef"[a];return e}(),ft.Buffer,ft.INSPECT_MAX_BYTES,ft.kMaxLength,lr={},cr=ft,lt=cr.Buffer,lt.from&<.alloc&<.allocUnsafe&<.allocUnsafeSlow?lr=cr:(Go(cr,lr),lr.Buffer=Vt),Vt.prototype=Object.create(lt.prototype),Go(lt,Vt),Vt.from=function(e,i,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return lt(e,i,t)},Vt.alloc=function(e,i,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var a=lt(e);return i!==void 0?typeof t=="string"?a.fill(i,t):a.fill(i):a.fill(0),a},Vt.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return lt(e)},Vt.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return cr.SlowBuffer(e)},ns=lr,tr={},Er=ns.Buffer,pi=Er.isEncoding||function(e){switch((e=""+e)&&e.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}},tr.StringDecoder=ar,ar.prototype.write=function(e){if(e.length===0)return"";var i,t;if(this.lastNeed){if((i=this.fillLast(e))===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<e.length?i?i+this.text(e,t):this.text(e,t):i||""},ar.prototype.end=function(e){var i=e&&e.length?this.write(e):"";return this.lastNeed?i+"�":i},ar.prototype.text=function(e,i){var t=function(c,n,r){var s=n.length-1;if(s<r)return 0;var o=fi(n[s]);return o>=0?(o>0&&(c.lastNeed=o-1),o):--s<r||o===-2?0:(o=fi(n[s]))>=0?(o>0&&(c.lastNeed=o-2),o):--s<r||o===-2?0:(o=fi(n[s]))>=0?(o>0&&(o===2?o=0:c.lastNeed=o-3),o):0}(this,e,i);if(!this.lastNeed)return e.toString("utf8",i);this.lastTotal=t;var a=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,a),e.toString("utf8",i,a)},ar.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},tr.StringDecoder,tr.StringDecoder}),os={};Mt(os,{StringDecoder:()=>ss,default:()=>tr});var ss,gc=Ge(()=>{ae(),ce(),le(),is(),is(),ss=tr.StringDecoder}),as=Ae((e,i)=>{ae(),ce(),le();var t=Lt(),{PromisePrototypeThen:a,SymbolAsyncIterator:c,SymbolIterator:n}=qe(),{Buffer:r}=(Ze(),Ue(Je)),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_NULL_VALUES:o}=rt().codes;function l(f,p,g){let m;if(typeof p=="string"||p instanceof r)return new f({objectMode:!0,...g,read(){this.push(p),this.push(null)}});let A;if(p&&p[c])A=!0,m=p[c]();else if(p&&p[n])A=!1,m=p[n]();else throw new s("iterable",["Iterable"],p);let b=new f({objectMode:!0,highWaterMark:1,...g}),C=!1;b._read=function(){C||(C=!0,I())},b._destroy=function(v,L){a(U(v),()=>t.nextTick(L,v),F=>t.nextTick(L,F||v))};async function U(v){let L=v!=null,F=typeof m.throw=="function";if(L&&F){let{value:B,done:k}=await m.throw(v);if(await B,k)return}if(typeof m.return=="function"){let{value:B}=await m.return();await B}}async function I(){for(;;){try{let{value:v,done:L}=A?await m.next():m.next();if(L)b.push(null);else{let F=v&&typeof v.then=="function"?await v:v;if(F===null)throw C=!1,new o;if(b.push(F))continue;C=!1}}catch(v){b.destroy(v)}break}}return b}i.exports=l}),Sr=Ae((e,i)=>{ae(),ce(),le();var t=Lt(),{ArrayPrototypeIndexOf:a,NumberIsInteger:c,NumberIsNaN:n,NumberParseInt:r,ObjectDefineProperties:s,ObjectKeys:o,ObjectSetPrototypeOf:l,Promise:f,SafeSet:p,SymbolAsyncIterator:g,Symbol:m}=qe();i.exports=w,w.ReadableState=we;var{EventEmitter:A}=(er(),Ue(Ft)),{Stream:b,prependListener:C}=oi(),{Buffer:U}=(Ze(),Ue(Je)),{addAbortSignal:I}=yr(),v=Ot(),L=bt().debuglog("stream",h=>{L=h}),F=zl(),B=Xt(),{getHighWaterMark:k,getDefaultHighWaterMark:M}=si(),{aggregateTwoErrors:W,codes:{ERR_INVALID_ARG_TYPE:J,ERR_METHOD_NOT_IMPLEMENTED:ne,ERR_OUT_OF_RANGE:S,ERR_STREAM_PUSH_AFTER_EOF:q,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:re}}=rt(),{validateObject:Y}=Ar(),me=m("kPaused"),{StringDecoder:se}=(gc(),Ue(os)),H=as();l(w.prototype,b.prototype),l(w,b);var be=()=>{},{errorOrDestroy:oe}=B;function we(h,d,y){typeof y!="boolean"&&(y=d instanceof _t()),this.objectMode=!!(h&&h.objectMode),y&&(this.objectMode=this.objectMode||!!(h&&h.readableObjectMode)),this.highWaterMark=h?k(this,h,"readableHighWaterMark",y):M(!1),this.buffer=new F,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[me]=null,this.errorEmitted=!1,this.emitClose=!h||h.emitClose!==!1,this.autoDestroy=!h||h.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=h&&h.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,h&&h.encoding&&(this.decoder=new se(h.encoding),this.encoding=h.encoding)}function w(h){if(!(this instanceof w))return new w(h);let d=this instanceof _t();this._readableState=new we(h,this,d),h&&(typeof h.read=="function"&&(this._read=h.read),typeof h.destroy=="function"&&(this._destroy=h.destroy),typeof h.construct=="function"&&(this._construct=h.construct),h.signal&&!d&&I(h.signal,this)),b.call(this,h),B.construct(this,()=>{this._readableState.needReadable&&te(this,this._readableState)})}w.prototype.destroy=B.destroy,w.prototype._undestroy=B.undestroy,w.prototype._destroy=function(h,d){d(h)},w.prototype[A.captureRejectionSymbol]=function(h){this.destroy(h)},w.prototype.push=function(h,d){return G(this,h,d,!1)},w.prototype.unshift=function(h,d){return G(this,h,d,!0)};function G(h,d,y,T){L("readableAddChunk",d);let K=h._readableState,ee;if(K.objectMode||(typeof d=="string"?(y=y||K.defaultEncoding,K.encoding!==y&&(T&&K.encoding?d=U.from(d,y).toString(K.encoding):(d=U.from(d,y),y=""))):d instanceof U?y="":b._isUint8Array(d)?(d=b._uint8ArrayToBuffer(d),y=""):d!=null&&(ee=new J("chunk",["string","Buffer","Uint8Array"],d))),ee)oe(h,ee);else if(d===null)K.reading=!1,E(h,K);else if(K.objectMode||d&&d.length>0)if(T)if(K.endEmitted)oe(h,new re);else{if(K.destroyed||K.errored)return!1;de(h,K,d,!0)}else if(K.ended)oe(h,new q);else{if(K.destroyed||K.errored)return!1;K.reading=!1,K.decoder&&!y?(d=K.decoder.write(d),K.objectMode||d.length!==0?de(h,K,d,!1):te(h,K)):de(h,K,d,!1)}else T||(K.reading=!1,te(h,K));return!K.ended&&(K.length<K.highWaterMark||K.length===0)}function de(h,d,y,T){d.flowing&&d.length===0&&!d.sync&&h.listenerCount("data")>0?(d.multiAwaitDrain?d.awaitDrainWriters.clear():d.awaitDrainWriters=null,d.dataEmitted=!0,h.emit("data",y)):(d.length+=d.objectMode?1:y.length,T?d.buffer.unshift(y):d.buffer.push(y),d.needReadable&&z(h)),te(h,d)}w.prototype.isPaused=function(){let h=this._readableState;return h[me]===!0||h.flowing===!1},w.prototype.setEncoding=function(h){let d=new se(h);this._readableState.decoder=d,this._readableState.encoding=this._readableState.decoder.encoding;let y=this._readableState.buffer,T="";for(let K of y)T+=d.write(K);return y.clear(),T!==""&&y.push(T),this._readableState.length=T.length,this};var ve=1073741824;function ue(h){if(h>ve)throw new S("size","<= 1GiB",h);return h--,h|=h>>>1,h|=h>>>2,h|=h>>>4,h|=h>>>8,h|=h>>>16,h++,h}function R(h,d){return h<=0||d.length===0&&d.ended?0:d.objectMode?1:n(h)?d.flowing&&d.length?d.buffer.first().length:d.length:h<=d.length?h:d.ended?d.length:0}w.prototype.read=function(h){L("read",h),h===void 0?h=NaN:c(h)||(h=r(h,10));let d=this._readableState,y=h;if(h>d.highWaterMark&&(d.highWaterMark=ue(h)),h!==0&&(d.emittedReadable=!1),h===0&&d.needReadable&&((d.highWaterMark!==0?d.length>=d.highWaterMark:d.length>0)||d.ended))return L("read: emitReadable",d.length,d.ended),d.length===0&&d.ended?O(this):z(this),null;if(h=R(h,d),h===0&&d.ended)return d.length===0&&O(this),null;let T=d.needReadable;if(L("need readable",T),(d.length===0||d.length-h<d.highWaterMark)&&(T=!0,L("length less than watermark",T)),d.ended||d.reading||d.destroyed||d.errored||!d.constructed)T=!1,L("reading, ended or constructing",T);else if(T){L("do read"),d.reading=!0,d.sync=!0,d.length===0&&(d.needReadable=!0);try{this._read(d.highWaterMark)}catch(ee){oe(this,ee)}d.sync=!1,d.reading||(h=R(y,d))}let K;return h>0?K=$(h,d):K=null,K===null?(d.needReadable=d.length<=d.highWaterMark,h=0):(d.length-=h,d.multiAwaitDrain?d.awaitDrainWriters.clear():d.awaitDrainWriters=null),d.length===0&&(d.ended||(d.needReadable=!0),y!==h&&d.ended&&O(this)),K!==null&&!d.errorEmitted&&!d.closeEmitted&&(d.dataEmitted=!0,this.emit("data",K)),K};function E(h,d){if(L("onEofChunk"),!d.ended){if(d.decoder){let y=d.decoder.end();y&&y.length&&(d.buffer.push(y),d.length+=d.objectMode?1:y.length)}d.ended=!0,d.sync?z(h):(d.needReadable=!1,d.emittedReadable=!0,fe(h))}}function z(h){let d=h._readableState;L("emitReadable",d.needReadable,d.emittedReadable),d.needReadable=!1,d.emittedReadable||(L("emitReadable",d.flowing),d.emittedReadable=!0,t.nextTick(fe,h))}function fe(h){let d=h._readableState;L("emitReadable_",d.destroyed,d.length,d.ended),!d.destroyed&&!d.errored&&(d.length||d.ended)&&(h.emit("readable"),d.emittedReadable=!1),d.needReadable=!d.flowing&&!d.ended&&d.length<=d.highWaterMark,ie(h)}function te(h,d){!d.readingMore&&d.constructed&&(d.readingMore=!0,t.nextTick(X,h,d))}function X(h,d){for(;!d.reading&&!d.ended&&(d.length<d.highWaterMark||d.flowing&&d.length===0);){let y=d.length;if(L("maybeReadMore read 0"),h.read(0),y===d.length)break}d.readingMore=!1}w.prototype._read=function(h){throw new ne("_read()")},w.prototype.pipe=function(h,d){let y=this,T=this._readableState;T.pipes.length===1&&(T.multiAwaitDrain||(T.multiAwaitDrain=!0,T.awaitDrainWriters=new p(T.awaitDrainWriters?[T.awaitDrainWriters]:[]))),T.pipes.push(h),L("pipe count=%d opts=%j",T.pipes.length,d);let K=(!d||d.end!==!1)&&h!==t.stdout&&h!==t.stderr?Ie:Xe;T.endEmitted?t.nextTick(K):y.once("end",K),h.on("unpipe",ee);function ee(tt,Ye){L("onunpipe"),tt===y&&Ye&&Ye.hasUnpiped===!1&&(Ye.hasUnpiped=!0,Se())}function Ie(){L("onend"),h.end()}let Be,Oe=!1;function Se(){L("cleanup"),h.removeListener("close",ze),h.removeListener("finish",Qe),Be&&h.removeListener("drain",Be),h.removeListener("error",De),h.removeListener("unpipe",ee),y.removeListener("end",Ie),y.removeListener("end",Xe),y.removeListener("data",Te),Oe=!0,Be&&T.awaitDrainWriters&&(!h._writableState||h._writableState.needDrain)&&Be()}function ke(){Oe||(T.pipes.length===1&&T.pipes[0]===h?(L("false write response, pause",0),T.awaitDrainWriters=h,T.multiAwaitDrain=!1):T.pipes.length>1&&T.pipes.includes(h)&&(L("false write response, pause",T.awaitDrainWriters.size),T.awaitDrainWriters.add(h)),y.pause()),Be||(Be=ye(y,h),h.on("drain",Be))}y.on("data",Te);function Te(tt){L("ondata");let Ye=h.write(tt);L("dest.write",Ye),Ye===!1&&ke()}function De(tt){if(L("onerror",tt),Xe(),h.removeListener("error",De),h.listenerCount("error")===0){let Ye=h._writableState||h._readableState;Ye&&!Ye.errorEmitted?oe(h,tt):h.emit("error",tt)}}C(h,"error",De);function ze(){h.removeListener("finish",Qe),Xe()}h.once("close",ze);function Qe(){L("onfinish"),h.removeListener("close",ze),Xe()}h.once("finish",Qe);function Xe(){L("unpipe"),y.unpipe(h)}return h.emit("pipe",y),h.writableNeedDrain===!0?T.flowing&&ke():T.flowing||(L("pipe resume"),y.resume()),h};function ye(h,d){return function(){let y=h._readableState;y.awaitDrainWriters===d?(L("pipeOnDrain",1),y.awaitDrainWriters=null):y.multiAwaitDrain&&(L("pipeOnDrain",y.awaitDrainWriters.size),y.awaitDrainWriters.delete(d)),(!y.awaitDrainWriters||y.awaitDrainWriters.size===0)&&h.listenerCount("data")&&h.resume()}}w.prototype.unpipe=function(h){let d=this._readableState,y={hasUnpiped:!1};if(d.pipes.length===0)return this;if(!h){let K=d.pipes;d.pipes=[],this.pause();for(let ee=0;ee<K.length;ee++)K[ee].emit("unpipe",this,{hasUnpiped:!1});return this}let T=a(d.pipes,h);return T===-1?this:(d.pipes.splice(T,1),d.pipes.length===0&&this.pause(),h.emit("unpipe",this,y),this)},w.prototype.on=function(h,d){let y=b.prototype.on.call(this,h,d),T=this._readableState;return h==="data"?(T.readableListening=this.listenerCount("readable")>0,T.flowing!==!1&&this.resume()):h==="readable"&&!T.endEmitted&&!T.readableListening&&(T.readableListening=T.needReadable=!0,T.flowing=!1,T.emittedReadable=!1,L("on readable",T.length,T.reading),T.length?z(this):T.reading||t.nextTick(P,this)),y},w.prototype.addListener=w.prototype.on,w.prototype.removeListener=function(h,d){let y=b.prototype.removeListener.call(this,h,d);return h==="readable"&&t.nextTick(ge,this),y},w.prototype.off=w.prototype.removeListener,w.prototype.removeAllListeners=function(h){let d=b.prototype.removeAllListeners.apply(this,arguments);return(h==="readable"||h===void 0)&&t.nextTick(ge,this),d};function ge(h){let d=h._readableState;d.readableListening=h.listenerCount("readable")>0,d.resumeScheduled&&d[me]===!1?d.flowing=!0:h.listenerCount("data")>0?h.resume():d.readableListening||(d.flowing=null)}function P(h){L("readable nexttick read 0"),h.read(0)}w.prototype.resume=function(){let h=this._readableState;return h.flowing||(L("resume"),h.flowing=!h.readableListening,j(this,h)),h[me]=!1,this};function j(h,d){d.resumeScheduled||(d.resumeScheduled=!0,t.nextTick(V,h,d))}function V(h,d){L("resume",d.reading),d.reading||h.read(0),d.resumeScheduled=!1,h.emit("resume"),ie(h),d.flowing&&!d.reading&&h.read(0)}w.prototype.pause=function(){return L("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(L("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[me]=!0,this};function ie(h){let d=h._readableState;for(L("flow",d.flowing);d.flowing&&h.read()!==null;);}w.prototype.wrap=function(h){let d=!1;h.on("data",T=>{!this.push(T)&&h.pause&&(d=!0,h.pause())}),h.on("end",()=>{this.push(null)}),h.on("error",T=>{oe(this,T)}),h.on("close",()=>{this.destroy()}),h.on("destroy",()=>{this.destroy()}),this._read=()=>{d&&h.resume&&(d=!1,h.resume())};let y=o(h);for(let T=1;T<y.length;T++){let K=y[T];this[K]===void 0&&typeof h[K]=="function"&&(this[K]=h[K].bind(h))}return this},w.prototype[g]=function(){return Z(this)},w.prototype.iterator=function(h){return h!==void 0&&Y(h,"options"),Z(this,h)};function Z(h,d){typeof h.read!="function"&&(h=w.wrap(h,{objectMode:!0}));let y=D(h,d);return y.stream=h,y}async function*D(h,d){let y=be;function T(Ie){this===h?(y(),y=be):y=Ie}h.on("readable",T);let K,ee=v(h,{writable:!1},Ie=>{K=Ie?W(K,Ie):null,y(),y=be});try{for(;;){let Ie=h.destroyed?null:h.read();if(Ie!==null)yield Ie;else{if(K)throw K;if(K===null)return;await new f(T)}}}catch(Ie){throw K=W(K,Ie),K}finally{(K||(d==null?void 0:d.destroyOnReturn)!==!1)&&(K===void 0||h._readableState.autoDestroy)?B.destroyer(h,null):(h.off("readable",T),ee())}}s(w.prototype,{readable:{__proto__:null,get(){let h=this._readableState;return!!h&&h.readable!==!1&&!h.destroyed&&!h.errorEmitted&&!h.endEmitted},set(h){this._readableState&&(this._readableState.readable=!!h)}},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(h){this._readableState&&(this._readableState.flowing=h)}},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(h){this._readableState&&(this._readableState.destroyed=h)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),s(we.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[me]!==!1},set(h){this[me]=!!h}}}),w._fromList=$;function $(h,d){if(d.length===0)return null;let y;return d.objectMode?y=d.buffer.shift():!h||h>=d.length?(d.decoder?y=d.buffer.join(""):d.buffer.length===1?y=d.buffer.first():y=d.buffer.concat(d.length),d.buffer.clear()):y=d.buffer.consume(h,d.decoder),y}function O(h){let d=h._readableState;L("endReadable",d.endEmitted),d.endEmitted||(d.ended=!0,t.nextTick(N,d,h))}function N(h,d){if(L("endReadableNT",h.endEmitted,h.length),!h.errored&&!h.closeEmitted&&!h.endEmitted&&h.length===0){if(h.endEmitted=!0,d.emit("end"),d.writable&&d.allowHalfOpen===!1)t.nextTick(Q,d);else if(h.autoDestroy){let y=d._writableState;(!y||y.autoDestroy&&(y.finished||y.writable===!1))&&d.destroy()}}}function Q(h){h.writable&&!h.writableEnded&&!h.destroyed&&h.end()}w.from=function(h,d){return H(w,h,d)};var he;function u(){return he===void 0&&(he={}),he}w.fromWeb=function(h,d){return u().newStreamReadableFromReadableStream(h,d)},w.toWeb=function(h,d){return u().newReadableStreamFromStreamReadable(h,d)},w.wrap=function(h,d){var y,T;return new w({objectMode:(y=(T=h.readableObjectMode)!==null&&T!==void 0?T:h.objectMode)!==null&&y!==void 0?y:!0,...d,destroy(K,ee){B.destroyer(h,K),ee(K)}}).wrap(h)}}),ls=Ae((e,i)=>{ae(),ce(),le();var t=Lt(),{ArrayPrototypeSlice:a,Error:c,FunctionPrototypeSymbolHasInstance:n,ObjectDefineProperty:r,ObjectDefineProperties:s,ObjectSetPrototypeOf:o,StringPrototypeToLowerCase:l,Symbol:f,SymbolHasInstance:p}=qe();i.exports=se,se.WritableState=Y;var{EventEmitter:g}=(er(),Ue(Ft)),m=oi().Stream,{Buffer:A}=(Ze(),Ue(Je)),b=Xt(),{addAbortSignal:C}=yr(),{getHighWaterMark:U,getDefaultHighWaterMark:I}=si(),{ERR_INVALID_ARG_TYPE:v,ERR_METHOD_NOT_IMPLEMENTED:L,ERR_MULTIPLE_CALLBACK:F,ERR_STREAM_CANNOT_PIPE:B,ERR_STREAM_DESTROYED:k,ERR_STREAM_ALREADY_FINISHED:M,ERR_STREAM_NULL_VALUES:W,ERR_STREAM_WRITE_AFTER_END:J,ERR_UNKNOWN_ENCODING:ne}=rt().codes,{errorOrDestroy:S}=b;o(se.prototype,m.prototype),o(se,m);function q(){}var re=f("kOnFinished");function Y(P,j,V){typeof V!="boolean"&&(V=j instanceof _t()),this.objectMode=!!(P&&P.objectMode),V&&(this.objectMode=this.objectMode||!!(P&&P.writableObjectMode)),this.highWaterMark=P?U(this,P,"writableHighWaterMark",V):I(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let ie=!!(P&&P.decodeStrings===!1);this.decodeStrings=!ie,this.defaultEncoding=P&&P.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=w.bind(void 0,j),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=!P||P.emitClose!==!1,this.autoDestroy=!P||P.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[re]=[]}function me(P){P.buffered=[],P.bufferedIndex=0,P.allBuffers=!0,P.allNoop=!0}Y.prototype.getBuffer=function(){return a(this.buffered,this.bufferedIndex)},r(Y.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function se(P){let j=this instanceof _t();if(!j&&!n(se,this))return new se(P);this._writableState=new Y(P,this,j),P&&(typeof P.write=="function"&&(this._write=P.write),typeof P.writev=="function"&&(this._writev=P.writev),typeof P.destroy=="function"&&(this._destroy=P.destroy),typeof P.final=="function"&&(this._final=P.final),typeof P.construct=="function"&&(this._construct=P.construct),P.signal&&C(P.signal,this)),m.call(this,P),b.construct(this,()=>{let V=this._writableState;V.writing||ue(this,V),fe(this,V)})}r(se,p,{__proto__:null,value:function(P){return n(this,P)?!0:this!==se?!1:P&&P._writableState instanceof Y}}),se.prototype.pipe=function(){S(this,new B)};function H(P,j,V,ie){let Z=P._writableState;if(typeof V=="function")ie=V,V=Z.defaultEncoding;else{if(!V)V=Z.defaultEncoding;else if(V!=="buffer"&&!A.isEncoding(V))throw new ne(V);typeof ie!="function"&&(ie=q)}if(j===null)throw new W;if(!Z.objectMode)if(typeof j=="string")Z.decodeStrings!==!1&&(j=A.from(j,V),V="buffer");else if(j instanceof A)V="buffer";else if(m._isUint8Array(j))j=m._uint8ArrayToBuffer(j),V="buffer";else throw new v("chunk",["string","Buffer","Uint8Array"],j);let D;return Z.ending?D=new J:Z.destroyed&&(D=new k("write")),D?(t.nextTick(ie,D),S(P,D,!0),D):(Z.pendingcb++,be(P,Z,j,V,ie))}se.prototype.write=function(P,j,V){return H(this,P,j,V)===!0},se.prototype.cork=function(){this._writableState.corked++},se.prototype.uncork=function(){let P=this._writableState;P.corked&&(P.corked--,P.writing||ue(this,P))},se.prototype.setDefaultEncoding=function(P){if(typeof P=="string"&&(P=l(P)),!A.isEncoding(P))throw new ne(P);return this._writableState.defaultEncoding=P,this};function be(P,j,V,ie,Z){let D=j.objectMode?1:V.length;j.length+=D;let $=j.length<j.highWaterMark;return $||(j.needDrain=!0),j.writing||j.corked||j.errored||!j.constructed?(j.buffered.push({chunk:V,encoding:ie,callback:Z}),j.allBuffers&&ie!=="buffer"&&(j.allBuffers=!1),j.allNoop&&Z!==q&&(j.allNoop=!1)):(j.writelen=D,j.writecb=Z,j.writing=!0,j.sync=!0,P._write(V,ie,j.onwrite),j.sync=!1),$&&!j.errored&&!j.destroyed}function oe(P,j,V,ie,Z,D,$){j.writelen=ie,j.writecb=$,j.writing=!0,j.sync=!0,j.destroyed?j.onwrite(new k("write")):V?P._writev(Z,j.onwrite):P._write(Z,D,j.onwrite),j.sync=!1}function we(P,j,V,ie){--j.pendingcb,ie(V),ve(j),S(P,V)}function w(P,j){let V=P._writableState,ie=V.sync,Z=V.writecb;if(typeof Z!="function"){S(P,new F);return}V.writing=!1,V.writecb=null,V.length-=V.writelen,V.writelen=0,j?(j.stack,V.errored||(V.errored=j),P._readableState&&!P._readableState.errored&&(P._readableState.errored=j),ie?t.nextTick(we,P,V,j,Z):we(P,V,j,Z)):(V.buffered.length>V.bufferedIndex&&ue(P,V),ie?V.afterWriteTickInfo!==null&&V.afterWriteTickInfo.cb===Z?V.afterWriteTickInfo.count++:(V.afterWriteTickInfo={count:1,cb:Z,stream:P,state:V},t.nextTick(G,V.afterWriteTickInfo)):de(P,V,1,Z))}function G({stream:P,state:j,count:V,cb:ie}){return j.afterWriteTickInfo=null,de(P,j,V,ie)}function de(P,j,V,ie){for(!j.ending&&!P.destroyed&&j.length===0&&j.needDrain&&(j.needDrain=!1,P.emit("drain"));V-- >0;)j.pendingcb--,ie();j.destroyed&&ve(j),fe(P,j)}function ve(P){if(P.writing)return;for(let Z=P.bufferedIndex;Z<P.buffered.length;++Z){var j;let{chunk:D,callback:$}=P.buffered[Z],O=P.objectMode?1:D.length;P.length-=O,$((j=P.errored)!==null&&j!==void 0?j:new k("write"))}let V=P[re].splice(0);for(let Z=0;Z<V.length;Z++){var ie;V[Z]((ie=P.errored)!==null&&ie!==void 0?ie:new k("end"))}me(P)}function ue(P,j){if(j.corked||j.bufferProcessing||j.destroyed||!j.constructed)return;let{buffered:V,bufferedIndex:ie,objectMode:Z}=j,D=V.length-ie;if(!D)return;let $=ie;if(j.bufferProcessing=!0,D>1&&P._writev){j.pendingcb-=D-1;let O=j.allNoop?q:Q=>{for(let he=$;he<V.length;++he)V[he].callback(Q)},N=j.allNoop&&$===0?V:a(V,$);N.allBuffers=j.allBuffers,oe(P,j,!0,j.length,N,"",O),me(j)}else{do{let{chunk:O,encoding:N,callback:Q}=V[$];V[$++]=null;let he=Z?1:O.length;oe(P,j,!1,he,O,N,Q)}while($<V.length&&!j.writing);$===V.length?me(j):$>256?(V.splice(0,$),j.bufferedIndex=0):j.bufferedIndex=$}j.bufferProcessing=!1}se.prototype._write=function(P,j,V){if(this._writev)this._writev([{chunk:P,encoding:j}],V);else throw new L("_write()")},se.prototype._writev=null,se.prototype.end=function(P,j,V){let ie=this._writableState;typeof P=="function"?(V=P,P=null,j=null):typeof j=="function"&&(V=j,j=null);let Z;if(P!=null){let D=H(this,P,j);D instanceof c&&(Z=D)}return ie.corked&&(ie.corked=1,this.uncork()),Z||(!ie.errored&&!ie.ending?(ie.ending=!0,fe(this,ie,!0),ie.ended=!0):ie.finished?Z=new M("end"):ie.destroyed&&(Z=new k("end"))),typeof V=="function"&&(Z||ie.finished?t.nextTick(V,Z):ie[re].push(V)),this};function R(P){return P.ending&&!P.destroyed&&P.constructed&&P.length===0&&!P.errored&&P.buffered.length===0&&!P.finished&&!P.writing&&!P.errorEmitted&&!P.closeEmitted}function E(P,j){let V=!1;function ie(Z){if(V){S(P,Z??F());return}if(V=!0,j.pendingcb--,Z){let D=j[re].splice(0);for(let $=0;$<D.length;$++)D[$](Z);S(P,Z,j.sync)}else R(j)&&(j.prefinished=!0,P.emit("prefinish"),j.pendingcb++,t.nextTick(te,P,j))}j.sync=!0,j.pendingcb++;try{P._final(ie)}catch(Z){ie(Z)}j.sync=!1}function z(P,j){!j.prefinished&&!j.finalCalled&&(typeof P._final=="function"&&!j.destroyed?(j.finalCalled=!0,E(P,j)):(j.prefinished=!0,P.emit("prefinish")))}function fe(P,j,V){R(j)&&(z(P,j),j.pendingcb===0&&(V?(j.pendingcb++,t.nextTick((ie,Z)=>{R(Z)?te(ie,Z):Z.pendingcb--},P,j)):R(j)&&(j.pendingcb++,te(P,j))))}function te(P,j){j.pendingcb--,j.finished=!0;let V=j[re].splice(0);for(let ie=0;ie<V.length;ie++)V[ie]();if(P.emit("finish"),j.autoDestroy){let ie=P._readableState;(!ie||ie.autoDestroy&&(ie.endEmitted||ie.readable===!1))&&P.destroy()}}s(se.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(P){this._writableState&&(this._writableState.destroyed=P)}},writable:{__proto__:null,get(){let P=this._writableState;return!!P&&P.writable!==!1&&!P.destroyed&&!P.errored&&!P.ending&&!P.ended},set(P){this._writableState&&(this._writableState.writable=!!P)}},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 P=this._writableState;return P?!P.destroyed&&!P.ending&&P.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 X=b.destroy;se.prototype.destroy=function(P,j){let V=this._writableState;return!V.destroyed&&(V.bufferedIndex<V.buffered.length||V[re].length)&&t.nextTick(ve,V),X.call(this,P,j),this},se.prototype._undestroy=b.undestroy,se.prototype._destroy=function(P,j){j(P)},se.prototype[g.captureRejectionSymbol]=function(P){this.destroy(P)};var ye;function ge(){return ye===void 0&&(ye={}),ye}se.fromWeb=function(P,j){return ge().newStreamWritableFromWritableStream(P,j)},se.toWeb=function(P){return ge().newWritableStreamFromStreamWritable(P)}}),mc=Ae((e,i)=>{ae(),ce(),le();var t=Lt(),a=(Ze(),Ue(Je)),{isReadable:c,isWritable:n,isIterable:r,isNodeStream:s,isReadableNodeStream:o,isWritableNodeStream:l,isDuplexNodeStream:f}=yt(),p=Ot(),{AbortError:g,codes:{ERR_INVALID_ARG_TYPE:m,ERR_INVALID_RETURN_VALUE:A}}=rt(),{destroyer:b}=Xt(),C=_t(),U=Sr(),{createDeferredPromise:I}=bt(),v=as(),L=globalThis.Blob||a.Blob,F=typeof L<"u"?function(ne){return ne instanceof L}:function(ne){return!1},B=globalThis.AbortController||ti().AbortController,{FunctionPrototypeCall:k}=qe(),M=class extends C{constructor(ne){super(ne),(ne==null?void 0:ne.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(ne==null?void 0:ne.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};i.exports=function ne(S,q){if(f(S))return S;if(o(S))return J({readable:S});if(l(S))return J({writable:S});if(s(S))return J({writable:!1,readable:!1});if(typeof S=="function"){let{value:Y,write:me,final:se,destroy:H}=W(S);if(r(Y))return v(M,Y,{objectMode:!0,write:me,final:se,destroy:H});let be=Y==null?void 0:Y.then;if(typeof be=="function"){let oe,we=k(be,Y,w=>{if(w!=null)throw new A("nully","body",w)},w=>{b(oe,w)});return oe=new M({objectMode:!0,readable:!1,write:me,final(w){se(async()=>{try{await we,t.nextTick(w,null)}catch(G){t.nextTick(w,G)}})},destroy:H})}throw new A("Iterable, AsyncIterable or AsyncFunction",q,Y)}if(F(S))return ne(S.arrayBuffer());if(r(S))return v(M,S,{objectMode:!0,writable:!1});if(typeof(S==null?void 0:S.writable)=="object"||typeof(S==null?void 0:S.readable)=="object"){let Y=S!=null&&S.readable?o(S==null?void 0:S.readable)?S==null?void 0:S.readable:ne(S.readable):void 0,me=S!=null&&S.writable?l(S==null?void 0:S.writable)?S==null?void 0:S.writable:ne(S.writable):void 0;return J({readable:Y,writable:me})}let re=S==null?void 0:S.then;if(typeof re=="function"){let Y;return k(re,S,me=>{me!=null&&Y.push(me),Y.push(null)},me=>{b(Y,me)}),Y=new M({objectMode:!0,writable:!1,read(){}})}throw new m(q,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],S)};function W(ne){let{promise:S,resolve:q}=I(),re=new B,Y=re.signal;return{value:ne(async function*(){for(;;){let me=S;S=null;let{chunk:se,done:H,cb:be}=await me;if(t.nextTick(be),H)return;if(Y.aborted)throw new g(void 0,{cause:Y.reason});({promise:S,resolve:q}=I()),yield se}}(),{signal:Y}),write(me,se,H){let be=q;q=null,be({chunk:me,done:!1,cb:H})},final(me){let se=q;q=null,se({done:!0,cb:me})},destroy(me,se){re.abort(),se(me)}}}function J(ne){let S=ne.readable&&typeof ne.readable.read!="function"?U.wrap(ne.readable):ne.readable,q=ne.writable,re=!!c(S),Y=!!n(q),me,se,H,be,oe;function we(w){let G=be;be=null,G?G(w):w&&oe.destroy(w)}return oe=new M({readableObjectMode:!!(S!=null&&S.readableObjectMode),writableObjectMode:!!(q!=null&&q.writableObjectMode),readable:re,writable:Y}),Y&&(p(q,w=>{Y=!1,w&&b(S,w),we(w)}),oe._write=function(w,G,de){q.write(w,G)?de():me=de},oe._final=function(w){q.end(),se=w},q.on("drain",function(){if(me){let w=me;me=null,w()}}),q.on("finish",function(){if(se){let w=se;se=null,w()}})),re&&(p(S,w=>{re=!1,w&&b(S,w),we(w)}),S.on("readable",function(){if(H){let w=H;H=null,w()}}),S.on("end",function(){oe.push(null)}),oe._read=function(){for(;;){let w=S.read();if(w===null){H=oe._read;return}if(!oe.push(w))return}}),oe._destroy=function(w,G){!w&&be!==null&&(w=new g),H=null,me=null,se=null,be===null?G(w):(be=G,b(q,w),b(S,w))},oe}}),_t=Ae((e,i)=>{ae(),ce(),le();var{ObjectDefineProperties:t,ObjectGetOwnPropertyDescriptor:a,ObjectKeys:c,ObjectSetPrototypeOf:n}=qe();i.exports=o;var r=Sr(),s=ls();n(o.prototype,r.prototype),n(o,r);{let g=c(s.prototype);for(let m=0;m<g.length;m++){let A=g[m];o.prototype[A]||(o.prototype[A]=s.prototype[A])}}function o(g){if(!(this instanceof o))return new o(g);r.call(this,g),s.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}t(o.prototype,{writable:{__proto__:null,...a(s.prototype,"writable")},writableHighWaterMark:{__proto__:null,...a(s.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...a(s.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...a(s.prototype,"writableBuffer")},writableLength:{__proto__:null,...a(s.prototype,"writableLength")},writableFinished:{__proto__:null,...a(s.prototype,"writableFinished")},writableCorked:{__proto__:null,...a(s.prototype,"writableCorked")},writableEnded:{__proto__:null,...a(s.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...a(s.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 l;function f(){return l===void 0&&(l={}),l}o.fromWeb=function(g,m){return f().newStreamDuplexFromReadableWritablePair(g,m)},o.toWeb=function(g){return f().newReadableWritablePairFromDuplex(g)};var p;o.from=function(g){return p||(p=mc()),p(g,"body")}}),cs=Ae((e,i)=>{ae(),ce(),le();var{ObjectSetPrototypeOf:t,Symbol:a}=qe();i.exports=o;var{ERR_METHOD_NOT_IMPLEMENTED:c}=rt().codes,n=_t(),{getHighWaterMark:r}=si();t(o.prototype,n.prototype),t(o,n);var s=a("kCallback");function o(p){if(!(this instanceof o))return new o(p);let g=p?r(this,p,"readableHighWaterMark",!0):null;g===0&&(p={...p,highWaterMark:null,readableHighWaterMark:g,writableHighWaterMark:p.writableHighWaterMark||0}),n.call(this,p),this._readableState.sync=!1,this[s]=null,p&&(typeof p.transform=="function"&&(this._transform=p.transform),typeof p.flush=="function"&&(this._flush=p.flush)),this.on("prefinish",f)}function l(p){typeof this._flush=="function"&&!this.destroyed?this._flush((g,m)=>{if(g){p?p(g):this.destroy(g);return}m!=null&&this.push(m),this.push(null),p&&p()}):(this.push(null),p&&p())}function f(){this._final!==l&&l.call(this)}o.prototype._final=l,o.prototype._transform=function(p,g,m){throw new c("_transform()")},o.prototype._write=function(p,g,m){let A=this._readableState,b=this._writableState,C=A.length;this._transform(p,g,(U,I)=>{if(U){m(U);return}I!=null&&this.push(I),b.ended||C===A.length||A.length<A.highWaterMark?m():this[s]=m})},o.prototype._read=function(){if(this[s]){let p=this[s];this[s]=null,p()}}}),hs=Ae((e,i)=>{ae(),ce(),le();var{ObjectSetPrototypeOf:t}=qe();i.exports=c;var a=cs();t(c.prototype,a.prototype),t(c,a);function c(n){if(!(this instanceof c))return new c(n);a.call(this,n)}c.prototype._transform=function(n,r,s){s(null,n)}}),gi=Ae((e,i)=>{ae(),ce(),le();var t=Lt(),{ArrayIsArray:a,Promise:c,SymbolAsyncIterator:n}=qe(),r=Ot(),{once:s}=bt(),o=Xt(),l=_t(),{aggregateTwoErrors:f,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:g,ERR_MISSING_ARGS:m,ERR_STREAM_DESTROYED:A,ERR_STREAM_PREMATURE_CLOSE:b},AbortError:C}=rt(),{validateFunction:U,validateAbortSignal:I}=Ar(),{isIterable:v,isReadable:L,isReadableNodeStream:F,isNodeStream:B,isTransformStream:k,isWebStream:M,isReadableStream:W,isReadableEnded:J}=yt(),ne=globalThis.AbortController||ti().AbortController,S,q;function re(G,de,ve){let ue=!1;G.on("close",()=>{ue=!0});let R=r(G,{readable:de,writable:ve},E=>{ue=!E});return{destroy:E=>{ue||(ue=!0,o.destroyer(G,E||new A("pipe")))},cleanup:R}}function Y(G){return U(G[G.length-1],"streams[stream.length - 1]"),G.pop()}function me(G){if(v(G))return G;if(F(G))return se(G);throw new p("val",["Readable","Iterable","AsyncIterable"],G)}async function*se(G){q||(q=Sr()),yield*q.prototype[n].call(G)}async function H(G,de,ve,{end:ue}){let R,E=null,z=X=>{if(X&&(R=X),E){let ye=E;E=null,ye()}},fe=()=>new c((X,ye)=>{R?ye(R):E=()=>{R?ye(R):X()}});de.on("drain",z);let te=r(de,{readable:!1},z);try{de.writableNeedDrain&&await fe();for await(let X of G)de.write(X)||await fe();ue&&de.end(),await fe(),ve()}catch(X){ve(R!==X?f(R,X):X)}finally{te(),de.off("drain",z)}}async function be(G,de,ve,{end:ue}){k(de)&&(de=de.writable);let R=de.getWriter();try{for await(let E of G)await R.ready,R.write(E).catch(()=>{});await R.ready,ue&&await R.close(),ve()}catch(E){try{await R.abort(E),ve(E)}catch(z){ve(z)}}}function oe(...G){return we(G,s(Y(G)))}function we(G,de,ve){if(G.length===1&&a(G[0])&&(G=G[0]),G.length<2)throw new m("streams");let ue=new ne,R=ue.signal,E=ve==null?void 0:ve.signal,z=[];I(E,"options.signal");function fe(){j(new C)}E==null||E.addEventListener("abort",fe);let te,X,ye=[],ge=0;function P(D){j(D,--ge===0)}function j(D,$){if(D&&(!te||te.code==="ERR_STREAM_PREMATURE_CLOSE")&&(te=D),!(!te&&!$)){for(;ye.length;)ye.shift()(te);E==null||E.removeEventListener("abort",fe),ue.abort(),$&&(te||z.forEach(O=>O()),t.nextTick(de,te,X))}}let V;for(let D=0;D<G.length;D++){let $=G[D],O=D<G.length-1,N=D>0,Q=O||(ve==null?void 0:ve.end)!==!1,he=D===G.length-1;if(B($)){let u=function(h){h&&h.name!=="AbortError"&&h.code!=="ERR_STREAM_PREMATURE_CLOSE"&&P(h)};if(Q){let{destroy:h,cleanup:d}=re($,O,N);ye.push(h),L($)&&he&&z.push(d)}$.on("error",u),L($)&&he&&z.push(()=>{$.removeListener("error",u)})}if(D===0)if(typeof $=="function"){if(V=$({signal:R}),!v(V))throw new g("Iterable, AsyncIterable or Stream","source",V)}else v($)||F($)||k($)?V=$:V=l.from($);else if(typeof $=="function"){if(k(V)){var ie;V=me((ie=V)===null||ie===void 0?void 0:ie.readable)}else V=me(V);if(V=$(V,{signal:R}),O){if(!v(V,!0))throw new g("AsyncIterable",`transform[${D-1}]`,V)}else{var Z;S||(S=hs());let u=new S({objectMode:!0}),h=(Z=V)===null||Z===void 0?void 0:Z.then;if(typeof h=="function")ge++,h.call(V,T=>{X=T,T!=null&&u.write(T),Q&&u.end(),t.nextTick(P)},T=>{u.destroy(T),t.nextTick(P,T)});else if(v(V,!0))ge++,H(V,u,P,{end:Q});else if(W(V)||k(V)){let T=V.readable||V;ge++,H(T,u,P,{end:Q})}else throw new g("AsyncIterable or Promise","destination",V);V=u;let{destroy:d,cleanup:y}=re(V,!1,!0);ye.push(d),he&&z.push(y)}}else if(B($)){if(F(V)){ge+=2;let u=w(V,$,P,{end:Q});L($)&&he&&z.push(u)}else if(k(V)||W(V)){let u=V.readable||V;ge++,H(u,$,P,{end:Q})}else if(v(V))ge++,H(V,$,P,{end:Q});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],V);V=$}else if(M($)){if(F(V))ge++,be(me(V),$,P,{end:Q});else if(W(V)||v(V))ge++,be(V,$,P,{end:Q});else if(k(V))ge++,be(V.readable,$,P,{end:Q});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],V);V=$}else V=l.from($)}return(R!=null&&R.aborted||E!=null&&E.aborted)&&t.nextTick(fe),V}function w(G,de,ve,{end:ue}){let R=!1;if(de.on("close",()=>{R||ve(new b)}),G.pipe(de,{end:!1}),ue){let E=function(){R=!0,de.end()};J(G)?t.nextTick(E):G.once("end",E)}else ve();return r(G,{readable:!0,writable:!1},E=>{let z=G._readableState;E&&E.code==="ERR_STREAM_PREMATURE_CLOSE"&&z&&z.ended&&!z.errored&&!z.errorEmitted?G.once("end",ve).once("error",ve):ve(E)}),r(de,{readable:!1,writable:!0},ve)}i.exports={pipelineImpl:we,pipeline:oe}}),us=Ae((e,i)=>{ae(),ce(),le();var{pipeline:t}=gi(),a=_t(),{destroyer:c}=Xt(),{isNodeStream:n,isReadable:r,isWritable:s,isWebStream:o,isTransformStream:l,isWritableStream:f,isReadableStream:p}=yt(),{AbortError:g,codes:{ERR_INVALID_ARG_VALUE:m,ERR_MISSING_ARGS:A}}=rt(),b=Ot();i.exports=function(...C){if(C.length===0)throw new A("streams");if(C.length===1)return a.from(C[0]);let U=[...C];if(typeof C[0]=="function"&&(C[0]=a.from(C[0])),typeof C[C.length-1]=="function"){let S=C.length-1;C[S]=a.from(C[S])}for(let S=0;S<C.length;++S)if(!(!n(C[S])&&!o(C[S]))){if(S<C.length-1&&!(r(C[S])||p(C[S])||l(C[S])))throw new m(`streams[${S}]`,U[S],"must be readable");if(S>0&&!(s(C[S])||f(C[S])||l(C[S])))throw new m(`streams[${S}]`,U[S],"must be writable")}let I,v,L,F,B;function k(S){let q=F;F=null,q?q(S):S?B.destroy(S):!ne&&!J&&B.destroy()}let M=C[0],W=t(C,k),J=!!(s(M)||f(M)||l(M)),ne=!!(r(W)||p(W)||l(W));if(B=new a({writableObjectMode:!!(M!=null&&M.writableObjectMode),readableObjectMode:!!(W!=null&&W.writableObjectMode),writable:J,readable:ne}),J){if(n(M))B._write=function(q,re,Y){M.write(q,re)?Y():I=Y},B._final=function(q){M.end(),v=q},M.on("drain",function(){if(I){let q=I;I=null,q()}});else if(o(M)){let q=(l(M)?M.writable:M).getWriter();B._write=async function(re,Y,me){try{await q.ready,q.write(re).catch(()=>{}),me()}catch(se){me(se)}},B._final=async function(re){try{await q.ready,q.close().catch(()=>{}),v=re}catch(Y){re(Y)}}}let S=l(W)?W.readable:W;b(S,()=>{if(v){let q=v;v=null,q()}})}if(ne){if(n(W))W.on("readable",function(){if(L){let S=L;L=null,S()}}),W.on("end",function(){B.push(null)}),B._read=function(){for(;;){let S=W.read();if(S===null){L=B._read;return}if(!B.push(S))return}};else if(o(W)){let S=(l(W)?W.readable:W).getReader();B._read=async function(){for(;;)try{let{value:q,done:re}=await S.read();if(!B.push(q))return;if(re){B.push(null);return}}catch{return}}}}return B._destroy=function(S,q){!S&&F!==null&&(S=new g),L=null,I=null,v=null,F===null?q(S):(F=q,n(W)&&c(W,S))},B}}),Ac=Ae((e,i)=>{ae(),ce(),le();var t=globalThis.AbortController||ti().AbortController,{codes:{ERR_INVALID_ARG_VALUE:a,ERR_INVALID_ARG_TYPE:c,ERR_MISSING_ARGS:n,ERR_OUT_OF_RANGE:r},AbortError:s}=rt(),{validateAbortSignal:o,validateInteger:l,validateObject:f}=Ar(),p=qe().Symbol("kWeak"),{finished:g}=Ot(),m=us(),{addAbortSignalNoValidate:A}=yr(),{isWritable:b,isNodeStream:C}=yt(),{ArrayPrototypePush:U,MathFloor:I,Number:v,NumberIsNaN:L,Promise:F,PromiseReject:B,PromisePrototypeThen:k,Symbol:M}=qe(),W=M("kEmpty"),J=M("kEof");function ne(ue,R){if(R!=null&&f(R,"options"),(R==null?void 0:R.signal)!=null&&o(R.signal,"options.signal"),C(ue)&&!b(ue))throw new a("stream",ue,"must be writable");let E=m(this,ue);return R!=null&&R.signal&&A(R.signal,E),E}function S(ue,R){if(typeof ue!="function")throw new c("fn",["Function","AsyncFunction"],ue);R!=null&&f(R,"options"),(R==null?void 0:R.signal)!=null&&o(R.signal,"options.signal");let E=1;return(R==null?void 0:R.concurrency)!=null&&(E=I(R.concurrency)),l(E,"concurrency",1),(async function*(){var z,fe;let te=new t,X=this,ye=[],ge=te.signal,P={signal:ge},j=()=>te.abort();R!=null&&(z=R.signal)!==null&&z!==void 0&&z.aborted&&j(),R==null||(fe=R.signal)===null||fe===void 0||fe.addEventListener("abort",j);let V,ie,Z=!1;function D(){Z=!0}async function $(){try{for await(let Q of X){var O;if(Z)return;if(ge.aborted)throw new s;try{Q=ue(Q,P)}catch(he){Q=B(he)}Q!==W&&(typeof((O=Q)===null||O===void 0?void 0:O.catch)=="function"&&Q.catch(D),ye.push(Q),V&&(V(),V=null),!Z&&ye.length&&ye.length>=E&&await new F(he=>{ie=he}))}ye.push(J)}catch(Q){let he=B(Q);k(he,void 0,D),ye.push(he)}finally{var N;Z=!0,V&&(V(),V=null),R==null||(N=R.signal)===null||N===void 0||N.removeEventListener("abort",j)}}$();try{for(;;){for(;ye.length>0;){let O=await ye[0];if(O===J)return;if(ge.aborted)throw new s;O!==W&&(yield O),ye.shift(),ie&&(ie(),ie=null)}await new F(O=>{V=O})}}finally{te.abort(),Z=!0,ie&&(ie(),ie=null)}}).call(this)}function q(ue=void 0){return ue!=null&&f(ue,"options"),(ue==null?void 0:ue.signal)!=null&&o(ue.signal,"options.signal"),(async function*(){let R=0;for await(let z of this){var E;if(ue!=null&&(E=ue.signal)!==null&&E!==void 0&&E.aborted)throw new s({cause:ue.signal.reason});yield[R++,z]}}).call(this)}async function re(ue,R=void 0){for await(let E of H.call(this,ue,R))return!0;return!1}async function Y(ue,R=void 0){if(typeof ue!="function")throw new c("fn",["Function","AsyncFunction"],ue);return!await re.call(this,async(...E)=>!await ue(...E),R)}async function me(ue,R){for await(let E of H.call(this,ue,R))return E}async function se(ue,R){if(typeof ue!="function")throw new c("fn",["Function","AsyncFunction"],ue);async function E(z,fe){return await ue(z,fe),W}for await(let z of S.call(this,E,R));}function H(ue,R){if(typeof ue!="function")throw new c("fn",["Function","AsyncFunction"],ue);async function E(z,fe){return await ue(z,fe)?z:W}return S.call(this,E,R)}var be=class extends n{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function oe(ue,R,E){var z;if(typeof ue!="function")throw new c("reducer",["Function","AsyncFunction"],ue);E!=null&&f(E,"options"),(E==null?void 0:E.signal)!=null&&o(E.signal,"options.signal");let fe=arguments.length>1;if(E!=null&&(z=E.signal)!==null&&z!==void 0&&z.aborted){let P=new s(void 0,{cause:E.signal.reason});throw this.once("error",()=>{}),await g(this.destroy(P)),P}let te=new t,X=te.signal;if(E!=null&&E.signal){let P={once:!0,[p]:this};E.signal.addEventListener("abort",()=>te.abort(),P)}let ye=!1;try{for await(let P of this){var ge;if(ye=!0,E!=null&&(ge=E.signal)!==null&&ge!==void 0&&ge.aborted)throw new s;fe?R=await ue(R,P,{signal:X}):(R=P,fe=!0)}if(!ye&&!fe)throw new be}finally{te.abort()}return R}async function we(ue){ue!=null&&f(ue,"options"),(ue==null?void 0:ue.signal)!=null&&o(ue.signal,"options.signal");let R=[];for await(let z of this){var E;if(ue!=null&&(E=ue.signal)!==null&&E!==void 0&&E.aborted)throw new s(void 0,{cause:ue.signal.reason});U(R,z)}return R}function w(ue,R){let E=S.call(this,ue,R);return(async function*(){for await(let z of E)yield*z}).call(this)}function G(ue){if(ue=v(ue),L(ue))return 0;if(ue<0)throw new r("number",">= 0",ue);return ue}function de(ue,R=void 0){return R!=null&&f(R,"options"),(R==null?void 0:R.signal)!=null&&o(R.signal,"options.signal"),ue=G(ue),(async function*(){var E;if(R!=null&&(E=R.signal)!==null&&E!==void 0&&E.aborted)throw new s;for await(let fe of this){var z;if(R!=null&&(z=R.signal)!==null&&z!==void 0&&z.aborted)throw new s;ue--<=0&&(yield fe)}}).call(this)}function ve(ue,R=void 0){return R!=null&&f(R,"options"),(R==null?void 0:R.signal)!=null&&o(R.signal,"options.signal"),ue=G(ue),(async function*(){var E;if(R!=null&&(E=R.signal)!==null&&E!==void 0&&E.aborted)throw new s;for await(let fe of this){var z;if(R!=null&&(z=R.signal)!==null&&z!==void 0&&z.aborted)throw new s;if(ue-- >0)yield fe;else return}}).call(this)}i.exports.streamReturningOperators={asIndexedPairs:q,drop:de,filter:H,flatMap:w,map:S,take:ve,compose:ne},i.exports.promiseReturningOperators={every:Y,forEach:se,reduce:oe,toArray:we,some:re,find:me}}),fs=Ae((e,i)=>{ae(),ce(),le();var{ArrayPrototypePop:t,Promise:a}=qe(),{isIterable:c,isNodeStream:n,isWebStream:r}=yt(),{pipelineImpl:s}=gi(),{finished:o}=Ot();ds();function l(...f){return new a((p,g)=>{let m,A,b=f[f.length-1];if(b&&typeof b=="object"&&!n(b)&&!c(b)&&!r(b)){let C=t(f);m=C.signal,A=C.end}s(f,(C,U)=>{C?g(C):p(U)},{signal:m,end:A})})}i.exports={finished:o,pipeline:l}}),ds=Ae((e,i)=>{ae(),ce(),le();var{Buffer:t}=(Ze(),Ue(Je)),{ObjectDefineProperty:a,ObjectKeys:c,ReflectApply:n}=qe(),{promisify:{custom:r}}=bt(),{streamReturningOperators:s,promiseReturningOperators:o}=Ac(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=rt(),f=us(),{pipeline:p}=gi(),{destroyer:g}=Xt(),m=Ot(),A=fs(),b=yt(),C=i.exports=oi().Stream;C.isDisturbed=b.isDisturbed,C.isErrored=b.isErrored,C.isReadable=b.isReadable,C.Readable=Sr();for(let I of c(s)){let v=function(...F){if(new.target)throw l();return C.Readable.from(n(L,this,F))},L=s[I];a(v,"name",{__proto__:null,value:L.name}),a(v,"length",{__proto__:null,value:L.length}),a(C.Readable.prototype,I,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}for(let I of c(o)){let v=function(...F){if(new.target)throw l();return n(L,this,F)},L=o[I];a(v,"name",{__proto__:null,value:L.name}),a(v,"length",{__proto__:null,value:L.length}),a(C.Readable.prototype,I,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}C.Writable=ls(),C.Duplex=_t(),C.Transform=cs(),C.PassThrough=hs(),C.pipeline=p;var{addAbortSignal:U}=yr();C.addAbortSignal=U,C.finished=m,C.destroy=g,C.compose=f,a(C,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return A}}),a(p,r,{__proto__:null,enumerable:!0,get(){return A.pipeline}}),a(m,r,{__proto__:null,enumerable:!0,get(){return A.finished}}),C.Stream=C,C._isUint8Array=function(I){return I instanceof Uint8Array},C._uint8ArrayToBuffer=function(I){return t.from(I.buffer,I.byteOffset,I.byteLength)}}),Qt=Ae((e,i)=>{ae(),ce(),le();var t=ds(),a=fs(),c=t.Readable.destroy;i.exports=t.Readable,i.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,i.exports._isUint8Array=t._isUint8Array,i.exports.isDisturbed=t.isDisturbed,i.exports.isErrored=t.isErrored,i.exports.isReadable=t.isReadable,i.exports.Readable=t.Readable,i.exports.Writable=t.Writable,i.exports.Duplex=t.Duplex,i.exports.Transform=t.Transform,i.exports.PassThrough=t.PassThrough,i.exports.addAbortSignal=t.addAbortSignal,i.exports.finished=t.finished,i.exports.destroy=t.destroy,i.exports.destroy=c,i.exports.pipeline=t.pipeline,i.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return a}}),i.exports.Stream=t.Stream,i.exports.default=i.exports}),bc=Ae((e,i)=>{ae(),ce(),le(),typeof Object.create=="function"?i.exports=function(t,a){a&&(t.super_=a,t.prototype=Object.create(a.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:i.exports=function(t,a){if(a){t.super_=a;var c=function(){};c.prototype=a.prototype,t.prototype=new c,t.prototype.constructor=t}}}),yc=Ae((e,i)=>{ae(),ce(),le();var{Buffer:t}=(Ze(),Ue(Je)),a=Symbol.for("BufferList");function c(n){if(!(this instanceof c))return new c(n);c._init.call(this,n)}c._init=function(n){Object.defineProperty(this,a,{value:!0}),this._bufs=[],this.length=0,n&&this.append(n)},c.prototype._new=function(n){return new c(n)},c.prototype._offset=function(n){if(n===0)return[0,0];let r=0;for(let s=0;s<this._bufs.length;s++){let o=r+this._bufs[s].length;if(n<o||s===this._bufs.length-1)return[s,n-r];r=o}},c.prototype._reverseOffset=function(n){let r=n[0],s=n[1];for(let o=0;o<r;o++)s+=this._bufs[o].length;return s},c.prototype.get=function(n){if(n>this.length||n<0)return;let r=this._offset(n);return this._bufs[r[0]][r[1]]},c.prototype.slice=function(n,r){return typeof n=="number"&&n<0&&(n+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,n,r)},c.prototype.copy=function(n,r,s,o){if((typeof s!="number"||s<0)&&(s=0),(typeof o!="number"||o>this.length)&&(o=this.length),s>=this.length||o<=0)return n||t.alloc(0);let l=!!n,f=this._offset(s),p=o-s,g=p,m=l&&r||0,A=f[1];if(s===0&&o===this.length){if(!l)return this._bufs.length===1?this._bufs[0]:t.concat(this._bufs,this.length);for(let b=0;b<this._bufs.length;b++)this._bufs[b].copy(n,m),m+=this._bufs[b].length;return n}if(g<=this._bufs[f[0]].length-A)return l?this._bufs[f[0]].copy(n,r,A,A+g):this._bufs[f[0]].slice(A,A+g);l||(n=t.allocUnsafe(p));for(let b=f[0];b<this._bufs.length;b++){let C=this._bufs[b].length-A;if(g>C)this._bufs[b].copy(n,m,A),m+=C;else{this._bufs[b].copy(n,m,A,A+g),m+=C;break}g-=C,A&&(A=0)}return n.length>m?n.slice(0,m):n},c.prototype.shallowSlice=function(n,r){if(n=n||0,r=typeof r!="number"?this.length:r,n<0&&(n+=this.length),r<0&&(r+=this.length),n===r)return this._new();let s=this._offset(n),o=this._offset(r),l=this._bufs.slice(s[0],o[0]+1);return o[1]===0?l.pop():l[l.length-1]=l[l.length-1].slice(0,o[1]),s[1]!==0&&(l[0]=l[0].slice(s[1])),this._new(l)},c.prototype.toString=function(n,r,s){return this.slice(r,s).toString(n)},c.prototype.consume=function(n){if(n=Math.trunc(n),Number.isNaN(n)||n<=0)return this;for(;this._bufs.length;)if(n>=this._bufs[0].length)n-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(n),this.length-=n;break}return this},c.prototype.duplicate=function(){let n=this._new();for(let r=0;r<this._bufs.length;r++)n.append(this._bufs[r]);return n},c.prototype.append=function(n){if(n==null)return this;if(n.buffer)this._appendBuffer(t.from(n.buffer,n.byteOffset,n.byteLength));else if(Array.isArray(n))for(let r=0;r<n.length;r++)this.append(n[r]);else if(this._isBufferList(n))for(let r=0;r<n._bufs.length;r++)this.append(n._bufs[r]);else typeof n=="number"&&(n=n.toString()),this._appendBuffer(t.from(n));return this},c.prototype._appendBuffer=function(n){this._bufs.push(n),this.length+=n.length},c.prototype.indexOf=function(n,r,s){if(s===void 0&&typeof r=="string"&&(s=r,r=void 0),typeof n=="function"||Array.isArray(n))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof n=="number"?n=t.from([n]):typeof n=="string"?n=t.from(n,s):this._isBufferList(n)?n=n.slice():Array.isArray(n.buffer)?n=t.from(n.buffer,n.byteOffset,n.byteLength):t.isBuffer(n)||(n=t.from(n)),r=Number(r||0),isNaN(r)&&(r=0),r<0&&(r=this.length+r),r<0&&(r=0),n.length===0)return r>this.length?this.length:r;let o=this._offset(r),l=o[0],f=o[1];for(;l<this._bufs.length;l++){let p=this._bufs[l];for(;f<p.length;)if(p.length-f>=n.length){let g=p.indexOf(n,f);if(g!==-1)return this._reverseOffset([l,g]);f=p.length-n.length+1}else{let g=this._reverseOffset([l,f]);if(this._match(g,n))return g;f++}f=0}return-1},c.prototype._match=function(n,r){if(this.length-n<r.length)return!1;for(let s=0;s<r.length;s++)if(this.get(n+s)!==r[s])return!1;return!0},function(){let n={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 r in n)(function(s){n[s]===null?c.prototype[s]=function(o,l){return this.slice(o,o+l)[s](0,l)}:c.prototype[s]=function(o=0){return this.slice(o,o+n[s])[s](0)}})(r)}(),c.prototype._isBufferList=function(n){return n instanceof c||c.isBufferList(n)},c.isBufferList=function(n){return n!=null&&n[a]},i.exports=c}),wc=Ae((e,i)=>{ae(),ce(),le();var t=Qt().Duplex,a=bc(),c=yc();function n(r){if(!(this instanceof n))return new n(r);if(typeof r=="function"){this._callback=r;let s=(function(o){this._callback&&(this._callback(o),this._callback=null)}).bind(this);this.on("pipe",function(o){o.on("error",s)}),this.on("unpipe",function(o){o.removeListener("error",s)}),r=null}c._init.call(this,r),t.call(this)}a(n,t),Object.assign(n.prototype,c.prototype),n.prototype._new=function(r){return new n(r)},n.prototype._write=function(r,s,o){this._appendBuffer(r),typeof o=="function"&&o()},n.prototype._read=function(r){if(!this.length)return this.push(null);r=Math.min(r,this.length),this.push(this.slice(0,r)),this.consume(r)},n.prototype.end=function(r){t.prototype.end.call(this,r),this._callback&&(this._callback(null,this.slice()),this._callback=null)},n.prototype._destroy=function(r,s){this._bufs.length=0,this.length=0,s(r)},n.prototype._isBufferList=function(r){return r instanceof n||r instanceof c||n.isBufferList(r)},n.isBufferList=c.isBufferList,i.exports=n,i.exports.BufferListStream=n,i.exports.BufferList=c}),vc=Ae((e,i)=>{ae(),ce(),le();var t=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}};i.exports=t}),ps=Ae((e,i)=>{ae(),ce(),le();var t=i.exports,{Buffer:a}=(Ze(),Ue(Je));t.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"},t.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},t.requiredHeaderFlagsErrors={};for(let n in t.requiredHeaderFlags){let r=t.requiredHeaderFlags[n];t.requiredHeaderFlagsErrors[n]="Invalid header flag bits, must be 0x"+r.toString(16)+" for "+t.types[n]+" packet"}t.codes={};for(let n in t.types){let r=t.types[n];t.codes[r]=n}t.CMD_SHIFT=4,t.CMD_MASK=240,t.DUP_MASK=8,t.QOS_MASK=3,t.QOS_SHIFT=1,t.RETAIN_MASK=1,t.VARBYTEINT_MASK=127,t.VARBYTEINT_FIN_MASK=128,t.VARBYTEINT_MAX=268435455,t.SESSIONPRESENT_MASK=1,t.SESSIONPRESENT_HEADER=a.from([t.SESSIONPRESENT_MASK]),t.CONNACK_HEADER=a.from([t.codes.connack<<t.CMD_SHIFT]),t.USERNAME_MASK=128,t.PASSWORD_MASK=64,t.WILL_RETAIN_MASK=32,t.WILL_QOS_MASK=24,t.WILL_QOS_SHIFT=3,t.WILL_FLAG_MASK=4,t.CLEAN_SESSION_MASK=2,t.CONNECT_HEADER=a.from([t.codes.connect<<t.CMD_SHIFT]),t.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},t.propertiesCodes={};for(let n in t.properties){let r=t.properties[n];t.propertiesCodes[r]=n}t.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 c(n){return[0,1,2].map(r=>[0,1].map(s=>[0,1].map(o=>{let l=a.alloc(1);return l.writeUInt8(t.codes[n]<<t.CMD_SHIFT|(s?t.DUP_MASK:0)|r<<t.QOS_SHIFT|o,0,!0),l})))}t.PUBLISH_HEADER=c("publish"),t.SUBSCRIBE_HEADER=c("subscribe"),t.SUBSCRIBE_OPTIONS_QOS_MASK=3,t.SUBSCRIBE_OPTIONS_NL_MASK=1,t.SUBSCRIBE_OPTIONS_NL_SHIFT=2,t.SUBSCRIBE_OPTIONS_RAP_MASK=1,t.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,t.SUBSCRIBE_OPTIONS_RH_MASK=3,t.SUBSCRIBE_OPTIONS_RH_SHIFT=4,t.SUBSCRIBE_OPTIONS_RH=[0,16,32],t.SUBSCRIBE_OPTIONS_NL=4,t.SUBSCRIBE_OPTIONS_RAP=8,t.SUBSCRIBE_OPTIONS_QOS=[0,1,2],t.UNSUBSCRIBE_HEADER=c("unsubscribe"),t.ACKS={unsuback:c("unsuback"),puback:c("puback"),pubcomp:c("pubcomp"),pubrel:c("pubrel"),pubrec:c("pubrec")},t.SUBACK_HEADER=a.from([t.codes.suback<<t.CMD_SHIFT]),t.VERSION3=a.from([3]),t.VERSION4=a.from([4]),t.VERSION5=a.from([5]),t.VERSION131=a.from([131]),t.VERSION132=a.from([132]),t.QOS=[0,1,2].map(n=>a.from([n])),t.EMPTY={pingreq:a.from([t.codes.pingreq<<4,0]),pingresp:a.from([t.codes.pingresp<<4,0]),disconnect:a.from([t.codes.disconnect<<4,0])},t.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"},t.MQTT5_PUBREL_PUBCOMP_CODES={0:"Success",146:"Packet Identifier not found"},t.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"},t.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"},t.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"},t.MQTT5_AUTH_CODES={0:"Success",24:"Continue authentication",25:"Re-authenticate"}}),_c=Ae((e,i)=>{ae(),ce(),le();var t=1e3,a=t*60,c=a*60,n=c*24,r=n*7,s=n*365.25;i.exports=function(g,m){m=m||{};var A=typeof g;if(A==="string"&&g.length>0)return o(g);if(A==="number"&&isFinite(g))return m.long?f(g):l(g);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(g))};function o(g){if(g=String(g),!(g.length>100)){var m=/^(-?(?:\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(m){var A=parseFloat(m[1]),b=(m[2]||"ms").toLowerCase();switch(b){case"years":case"year":case"yrs":case"yr":case"y":return A*s;case"weeks":case"week":case"w":return A*r;case"days":case"day":case"d":return A*n;case"hours":case"hour":case"hrs":case"hr":case"h":return A*c;case"minutes":case"minute":case"mins":case"min":case"m":return A*a;case"seconds":case"second":case"secs":case"sec":case"s":return A*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return A;default:return}}}}function l(g){var m=Math.abs(g);return m>=n?Math.round(g/n)+"d":m>=c?Math.round(g/c)+"h":m>=a?Math.round(g/a)+"m":m>=t?Math.round(g/t)+"s":g+"ms"}function f(g){var m=Math.abs(g);return m>=n?p(g,m,n,"day"):m>=c?p(g,m,c,"hour"):m>=a?p(g,m,a,"minute"):m>=t?p(g,m,t,"second"):g+" ms"}function p(g,m,A,b){var C=m>=A*1.5;return Math.round(g/A)+" "+b+(C?"s":"")}}),Ec=Ae((e,i)=>{ae(),ce(),le();function t(a){n.debug=n,n.default=n,n.coerce=p,n.disable=o,n.enable=s,n.enabled=l,n.humanize=_c(),n.destroy=g,Object.keys(a).forEach(m=>{n[m]=a[m]}),n.names=[],n.skips=[],n.formatters={};function c(m){let A=0;for(let b=0;b<m.length;b++)A=(A<<5)-A+m.charCodeAt(b),A|=0;return n.colors[Math.abs(A)%n.colors.length]}n.selectColor=c;function n(m){let A,b=null,C,U;function I(...v){if(!I.enabled)return;let L=I,F=Number(new Date),B=F-(A||F);L.diff=B,L.prev=A,L.curr=F,A=F,v[0]=n.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let k=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(M,W)=>{if(M==="%%")return"%";k++;let J=n.formatters[W];if(typeof J=="function"){let ne=v[k];M=J.call(L,ne),v.splice(k,1),k--}return M}),n.formatArgs.call(L,v),(L.log||n.log).apply(L,v)}return I.namespace=m,I.useColors=n.useColors(),I.color=n.selectColor(m),I.extend=r,I.destroy=n.destroy,Object.defineProperty(I,"enabled",{enumerable:!0,configurable:!1,get:()=>b!==null?b:(C!==n.namespaces&&(C=n.namespaces,U=n.enabled(m)),U),set:v=>{b=v}}),typeof n.init=="function"&&n.init(I),I}function r(m,A){let b=n(this.namespace+(typeof A>"u"?":":A)+m);return b.log=this.log,b}function s(m){n.save(m),n.namespaces=m,n.names=[],n.skips=[];let A,b=(typeof m=="string"?m:"").split(/[\s,]+/),C=b.length;for(A=0;A<C;A++)b[A]&&(m=b[A].replace(/\*/g,".*?"),m[0]==="-"?n.skips.push(new RegExp("^"+m.slice(1)+"$")):n.names.push(new RegExp("^"+m+"$")))}function o(){let m=[...n.names.map(f),...n.skips.map(f).map(A=>"-"+A)].join(",");return n.enable(""),m}function l(m){if(m[m.length-1]==="*")return!0;let A,b;for(A=0,b=n.skips.length;A<b;A++)if(n.skips[A].test(m))return!1;for(A=0,b=n.names.length;A<b;A++)if(n.names[A].test(m))return!0;return!1}function f(m){return m.toString().substring(2,m.toString().length-2).replace(/\.\*\?$/,"*")}function p(m){return m instanceof Error?m.stack||m.message:m}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 n.enable(n.load()),n}i.exports=t}),Et=Ae((e,i)=>{ae(),ce(),le(),e.formatArgs=a,e.save=c,e.load=n,e.useColors=t,e.storage=r(),e.destroy=(()=>{let o=!1;return()=>{o||(o=!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`."))}})(),e.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 t(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1: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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+i.exports.humanize(this.diff),!this.useColors)return;let l="color: "+this.color;o.splice(1,0,l,"color: inherit");let f=0,p=0;o[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(f++,g==="%c"&&(p=f))}),o.splice(p,0,l)}e.log=console.debug||console.log||(()=>{});function c(o){try{o?e.storage.setItem("debug",o):e.storage.removeItem("debug")}catch{}}function n(){let o;try{o=e.storage.getItem("debug")}catch{}return!o&&typeof xe<"u"&&"env"in xe&&(o=xe.env.DEBUG),o}function r(){try{return localStorage}catch{}}i.exports=Ec()(e);var{formatters:s}=i.exports;s.j=function(o){try{return JSON.stringify(o)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}}),Sc=Ae((e,i)=>{ae(),ce(),le();var t=wc(),{EventEmitter:a}=(er(),Ue(Ft)),c=vc(),n=ps(),r=Et()("mqtt-packet:parser"),s=class Ui extends a{constructor(){super(),this.parser=this.constructor.parser}static parser(l){return this instanceof Ui?(this.settings=l||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new Ui().parser(l)}_resetState(){r("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new c,this.error=null,this._list=t(),this._stateCounter=0}parse(l){for(this.error&&this._resetState(),this._list.append(l),r("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++,r("parse: state complete. _stateCounter is now: %d",this._stateCounter),r("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return r("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){let l=this._list.readUInt8(0),f=l>>n.CMD_SHIFT;this.packet.cmd=n.types[f];let p=l&15,g=n.requiredHeaderFlags[f];return g!=null&&p!==g?this._emitError(new Error(n.requiredHeaderFlagsErrors[f])):(this.packet.retain=(l&n.RETAIN_MASK)!==0,this.packet.qos=l>>n.QOS_SHIFT&n.QOS_MASK,this.packet.qos>2?this._emitError(new Error("Packet must not have both QoS bits set to 1")):(this.packet.dup=(l&n.DUP_MASK)!==0,r("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0))}_parseLength(){let l=this._parseVarByteNum(!0);return l&&(this.packet.length=l.value,this._list.consume(l.bytes)),r("_parseLength %d",l.value),!!l}_parsePayload(){r("_parsePayload: payload %O",this._list);let l=!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"))}l=!0}return r("_parsePayload complete result: %s",l),l}_parseConnect(){r("_parseConnect");let l,f,p,g,m={},A=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(A.protocolId=b,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(A.protocolVersion=this._list.readUInt8(this._pos),A.protocolVersion>=128&&(A.bridgeMode=!0,A.protocolVersion=A.protocolVersion-128),A.protocolVersion!==3&&A.protocolVersion!==4&&A.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"));m.username=this._list.readUInt8(this._pos)&n.USERNAME_MASK,m.password=this._list.readUInt8(this._pos)&n.PASSWORD_MASK,m.will=this._list.readUInt8(this._pos)&n.WILL_FLAG_MASK;let C=!!(this._list.readUInt8(this._pos)&n.WILL_RETAIN_MASK),U=(this._list.readUInt8(this._pos)&n.WILL_QOS_MASK)>>n.WILL_QOS_SHIFT;if(m.will)A.will={},A.will.retain=C,A.will.qos=U;else{if(C)return this._emitError(new Error("Will Retain Flag must be set to zero when Will Flag is set to 0"));if(U)return this._emitError(new Error("Will QoS must be set to zero when Will Flag is set to 0"))}if(A.clean=(this._list.readUInt8(this._pos)&n.CLEAN_SESSION_MASK)!==0,this._pos++,A.keepalive=this._parseNum(),A.keepalive===-1)return this._emitError(new Error("Packet too short"));if(A.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(A.properties=v)}let I=this._parseString();if(I===null)return this._emitError(new Error("Packet too short"));if(A.clientId=I,r("_parseConnect: packet.clientId: %s",A.clientId),m.will){if(A.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(A.will.properties=v)}if(l=this._parseString(),l===null)return this._emitError(new Error("Cannot parse will topic"));if(A.will.topic=l,r("_parseConnect: packet.will.topic: %s",A.will.topic),f=this._parseBuffer(),f===null)return this._emitError(new Error("Cannot parse will payload"));A.will.payload=f,r("_parseConnect: packet.will.paylaod: %s",A.will.payload)}if(m.username){if(g=this._parseString(),g===null)return this._emitError(new Error("Cannot parse username"));A.username=g,r("_parseConnect: packet.username: %s",A.username)}if(m.password){if(p=this._parseBuffer(),p===null)return this._emitError(new Error("Cannot parse password"));A.password=p}return this.settings=A,r("_parseConnect: complete"),A}_parseConnack(){r("_parseConnack");let l=this.packet;if(this._list.length<1)return null;let f=this._list.readUInt8(this._pos++);if(f>1)return this._emitError(new Error("Invalid connack flags, bits 7-1 must be set to 0"));if(l.sessionPresent=!!(f&n.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?l.reasonCode=this._list.readUInt8(this._pos++):l.reasonCode=0;else{if(this._list.length<2)return null;l.returnCode=this._list.readUInt8(this._pos++)}if(l.returnCode===-1||l.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){let p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(l.properties=p)}r("_parseConnack: complete")}_parsePublish(){r("_parsePublish");let l=this.packet;if(l.topic=this._parseString(),l.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(l.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(l.properties=f)}l.payload=this._list.slice(this._pos,l.length),r("_parsePublish: payload from buffer list: %o",l.payload)}}_parseSubscribe(){r("_parseSubscribe");let l=this.packet,f,p,g,m,A,b,C;if(l.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let U=this._parseProperties();Object.getOwnPropertyNames(U).length&&(l.properties=U)}if(l.length<=0)return this._emitError(new Error("Malformed subscribe, no payload specified"));for(;this._pos<l.length;){if(f=this._parseString(),f===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=l.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&n.SUBSCRIBE_OPTIONS_QOS_MASK,g>2)return this._emitError(new Error("Invalid subscribe QoS, must be <= 2"));if(b=(p>>n.SUBSCRIBE_OPTIONS_NL_SHIFT&n.SUBSCRIBE_OPTIONS_NL_MASK)!==0,A=(p>>n.SUBSCRIBE_OPTIONS_RAP_SHIFT&n.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,m=p>>n.SUBSCRIBE_OPTIONS_RH_SHIFT&n.SUBSCRIBE_OPTIONS_RH_MASK,m>2)return this._emitError(new Error("Invalid retain handling, must be <= 2"));C={topic:f,qos:g},this.settings.protocolVersion===5?(C.nl=b,C.rap=A,C.rh=m):this.settings.bridgeMode&&(C.rh=0,C.rap=!0,C.nl=!0),r("_parseSubscribe: push subscription `%s` to subscription",C),l.subscriptions.push(C)}}}_parseSuback(){r("_parseSuback");let l=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(l.properties=f)}if(l.length<=0)return this._emitError(new Error("Malformed suback, no payload specified"));for(;this._pos<this.packet.length;){let f=this._list.readUInt8(this._pos++);if(this.settings.protocolVersion===5){if(!n.MQTT5_SUBACK_CODES[f])return this._emitError(new Error("Invalid suback code"))}else if(f>2&&f!==128)return this._emitError(new Error("Invalid suback QoS, must be 0, 1, 2 or 128"));this.packet.granted.push(f)}}}_parseUnsubscribe(){r("_parseUnsubscribe");let l=this.packet;if(l.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(l.properties=f)}if(l.length<=0)return this._emitError(new Error("Malformed unsubscribe, no payload specified"));for(;this._pos<l.length;){let f=this._parseString();if(f===null)return this._emitError(new Error("Cannot parse topic"));r("_parseUnsubscribe: push topic `%s` to unsubscriptions",f),l.unsubscriptions.push(f)}}}_parseUnsuback(){r("_parseUnsuback");let l=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if((this.settings.protocolVersion===3||this.settings.protocolVersion===4)&&l.length!==2)return this._emitError(new Error("Malformed unsuback, payload length must be 2"));if(l.length<=0)return this._emitError(new Error("Malformed unsuback, no payload specified"));if(this.settings.protocolVersion===5){let f=this._parseProperties();for(Object.getOwnPropertyNames(f).length&&(l.properties=f),l.granted=[];this._pos<this.packet.length;){let p=this._list.readUInt8(this._pos++);if(!n.MQTT5_UNSUBACK_CODES[p])return this._emitError(new Error("Invalid unsuback code"));this.packet.granted.push(p)}}}_parseConfirmation(){r("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);let l=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5){if(l.length>2){switch(l.reasonCode=this._parseByte(),this.packet.cmd){case"puback":case"pubrec":if(!n.MQTT5_PUBACK_PUBREC_CODES[l.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break;case"pubrel":case"pubcomp":if(!n.MQTT5_PUBREL_PUBCOMP_CODES[l.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break}r("_parseConfirmation: packet.reasonCode `%d`",l.reasonCode)}else l.reasonCode=0;if(l.length>3){let f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(l.properties=f)}}return!0}_parseDisconnect(){let l=this.packet;if(r("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?(l.reasonCode=this._parseByte(),n.MQTT5_DISCONNECT_CODES[l.reasonCode]||this._emitError(new Error("Invalid disconnect reason code"))):l.reasonCode=0;let f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(l.properties=f)}return r("_parseDisconnect result: true"),!0}_parseAuth(){r("_parseAuth");let l=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));if(l.reasonCode=this._parseByte(),!n.MQTT5_AUTH_CODES[l.reasonCode])return this._emitError(new Error("Invalid auth reason code"));let f=this._parseProperties();return Object.getOwnPropertyNames(f).length&&(l.properties=f),r("_parseAuth: result: true"),!0}_parseMessageId(){let l=this.packet;return l.messageId=this._parseNum(),l.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(r("_parseMessageId: packet.messageId %d",l.messageId),!0)}_parseString(l){let f=this._parseNum(),p=f+this._pos;if(f===-1||p>this._list.length||p>this.packet.length)return null;let g=this._list.toString("utf8",this._pos,p);return this._pos+=f,r("_parseString: result: %s",g),g}_parseStringPair(){return r("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let l=this._parseNum(),f=l+this._pos;if(l===-1||f>this._list.length||f>this.packet.length)return null;let p=this._list.slice(this._pos,f);return this._pos+=l,r("_parseBuffer: result: %o",p),p}_parseNum(){if(this._list.length-this._pos<2)return-1;let l=this._list.readUInt16BE(this._pos);return this._pos+=2,r("_parseNum: result: %s",l),l}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;let l=this._list.readUInt32BE(this._pos);return this._pos+=4,r("_parse4ByteNum: result: %s",l),l}_parseVarByteNum(l){r("_parseVarByteNum");let f=4,p=0,g=1,m=0,A=!1,b,C=this._pos?this._pos:0;for(;p<f&&C+p<this._list.length;){if(b=this._list.readUInt8(C+p++),m+=g*(b&n.VARBYTEINT_MASK),g*=128,!(b&n.VARBYTEINT_FIN_MASK)){A=!0;break}if(this._list.length<=p)break}return!A&&p===f&&this._list.length>=p&&this._emitError(new Error("Invalid variable byte integer")),C&&(this._pos+=p),A?l?A={bytes:p,value:m}:A=m:A=!1,r("_parseVarByteNum: result: %o",A),A}_parseByte(){let l;return this._pos<this._list.length&&(l=this._list.readUInt8(this._pos),this._pos++),r("_parseByte: result: %o",l),l}_parseByType(l){switch(r("_parseByType: type: %s",l),l){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(){r("_parseProperties");let l=this._parseVarByteNum(),f=this._pos+l,p={};for(;this._pos<f;){let g=this._parseByte();if(!g)return this._emitError(new Error("Cannot parse property code type")),!1;let m=n.propertiesCodes[g];if(!m)return this._emitError(new Error("Unknown property")),!1;if(m==="userProperties"){p[m]||(p[m]=Object.create(null));let A=this._parseByType(n.propertiesTypes[m]);if(p[m][A.name])if(Array.isArray(p[m][A.name]))p[m][A.name].push(A.value);else{let b=p[m][A.name];p[m][A.name]=[b],p[m][A.name].push(A.value)}else p[m][A.name]=A.value;continue}p[m]?Array.isArray(p[m])?p[m].push(this._parseByType(n.propertiesTypes[m])):(p[m]=[p[m]],p[m].push(this._parseByType(n.propertiesTypes[m]))):p[m]=this._parseByType(n.propertiesTypes[m])}return p}_newPacket(){return r("_newPacket"),this.packet&&(this._list.consume(this.packet.length),r("_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)),r("_newPacket: new packet"),this.packet=new c,this._pos=0,!0}_emitError(l){r("_emitError",l),this.error=l,this.emit("error",l)}};i.exports=s}),Cc=Ae((e,i)=>{ae(),ce(),le();var{Buffer:t}=(Ze(),Ue(Je)),a=65536,c={},n=t.isBuffer(t.from([1,2]).subarray(0,1));function r(f){let p=t.allocUnsafe(2);return p.writeUInt8(f>>8,0),p.writeUInt8(f&255,1),p}function s(){for(let f=0;f<a;f++)c[f]=r(f)}function o(f){let p=0,g=0,m=t.allocUnsafe(4);do p=f%128|0,f=f/128|0,f>0&&(p=p|128),m.writeUInt8(p,g++);while(f>0&&g<4);return f>0&&(g=0),n?m.subarray(0,g):m.slice(0,g)}function l(f){let p=t.allocUnsafe(4);return p.writeUInt32BE(f,0),p}i.exports={cache:c,generateCache:s,generateNumber:r,genBufVariableByteInt:o,generate4ByteBuffer:l}}),Ic=Ae((e,i)=>{ae(),ce(),le(),typeof xe>"u"||!xe.version||xe.version.indexOf("v0.")===0||xe.version.indexOf("v1.")===0&&xe.version.indexOf("v1.8.")!==0?i.exports={nextTick:t}:i.exports=xe;function t(a,c,n,r){if(typeof a!="function")throw new TypeError('"callback" argument must be a function');var s=arguments.length,o,l;switch(s){case 0:case 1:return xe.nextTick(a);case 2:return xe.nextTick(function(){a.call(null,c)});case 3:return xe.nextTick(function(){a.call(null,c,n)});case 4:return xe.nextTick(function(){a.call(null,c,n,r)});default:for(o=new Array(s-1),l=0;l<o.length;)o[l++]=arguments[l];return xe.nextTick(function(){a.apply(null,o)})}}}),gs=Ae((e,i)=>{ae(),ce(),le();var t=ps(),{Buffer:a}=(Ze(),Ue(Je)),c=a.allocUnsafe(0),n=a.from([0]),r=Cc(),s=Ic().nextTick,o=Et()("mqtt-packet:writeToStream"),l=r.cache,f=r.generateNumber,p=r.generateCache,g=r.genBufVariableByteInt,m=r.generate4ByteBuffer,A=se,b=!0;function C(R,E,z){switch(o("generate called"),E.cork&&(E.cork(),s(U,E)),b&&(b=!1,p()),o("generate: packet.cmd: %s",R.cmd),R.cmd){case"connect":return I(R,E);case"connack":return v(R,E,z);case"publish":return L(R,E,z);case"puback":case"pubrec":case"pubrel":case"pubcomp":return F(R,E,z);case"subscribe":return B(R,E,z);case"suback":return k(R,E,z);case"unsubscribe":return M(R,E,z);case"unsuback":return W(R,E,z);case"pingreq":case"pingresp":return J(R,E);case"disconnect":return ne(R,E,z);case"auth":return S(R,E,z);default:return E.destroy(new Error("Unknown command")),!1}}Object.defineProperty(C,"cacheNumbers",{get(){return A===se},set(R){R?((!l||Object.keys(l).length===0)&&(b=!0),A=se):(b=!1,A=H)}});function U(R){R.uncork()}function I(R,E,z){let fe=R||{},te=fe.protocolId||"MQTT",X=fe.protocolVersion||4,ye=fe.will,ge=fe.clean,P=fe.keepalive||0,j=fe.clientId||"",V=fe.username,ie=fe.password,Z=fe.properties;ge===void 0&&(ge=!0);let D=0;if(!te||typeof te!="string"&&!a.isBuffer(te))return E.destroy(new Error("Invalid protocolId")),!1;if(D+=te.length+2,X!==3&&X!==4&&X!==5)return E.destroy(new Error("Invalid protocol version")),!1;if(D+=1,(typeof j=="string"||a.isBuffer(j))&&(j||X>=4)&&(j||ge))D+=a.byteLength(j)+2;else{if(X<4)return E.destroy(new Error("clientId must be supplied before 3.1.1")),!1;if(ge*1===0)return E.destroy(new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof P!="number"||P<0||P>65535||P%1!==0)return E.destroy(new Error("Invalid keepalive")),!1;D+=2,D+=1;let $,O;if(X===5){if($=we(E,Z),!$)return!1;D+=$.length}if(ye){if(typeof ye!="object")return E.destroy(new Error("Invalid will")),!1;if(!ye.topic||typeof ye.topic!="string")return E.destroy(new Error("Invalid will topic")),!1;if(D+=a.byteLength(ye.topic)+2,D+=2,ye.payload)if(ye.payload.length>=0)typeof ye.payload=="string"?D+=a.byteLength(ye.payload):D+=ye.payload.length;else return E.destroy(new Error("Invalid will payload")),!1;if(O={},X===5){if(O=we(E,ye.properties),!O)return!1;D+=O.length}}let N=!1;if(V!=null)if(ue(V))N=!0,D+=a.byteLength(V)+2;else return E.destroy(new Error("Invalid username")),!1;if(ie!=null){if(!N)return E.destroy(new Error("Username is required to use password")),!1;if(ue(ie))D+=ve(ie)+2;else return E.destroy(new Error("Invalid password")),!1}E.write(t.CONNECT_HEADER),re(E,D),oe(E,te),fe.bridgeMode&&(X+=128),E.write(X===131?t.VERSION131:X===132?t.VERSION132:X===4?t.VERSION4:X===5?t.VERSION5:t.VERSION3);let Q=0;return Q|=V!=null?t.USERNAME_MASK:0,Q|=ie!=null?t.PASSWORD_MASK:0,Q|=ye&&ye.retain?t.WILL_RETAIN_MASK:0,Q|=ye&&ye.qos?ye.qos<<t.WILL_QOS_SHIFT:0,Q|=ye?t.WILL_FLAG_MASK:0,Q|=ge?t.CLEAN_SESSION_MASK:0,E.write(a.from([Q])),A(E,P),X===5&&$.write(),oe(E,j),ye&&(X===5&&O.write(),Y(E,ye.topic),oe(E,ye.payload)),V!=null&&oe(E,V),ie!=null&&oe(E,ie),!0}function v(R,E,z){let fe=z?z.protocolVersion:4,te=R||{},X=fe===5?te.reasonCode:te.returnCode,ye=te.properties,ge=2;if(typeof X!="number")return E.destroy(new Error("Invalid return code")),!1;let P=null;if(fe===5){if(P=we(E,ye),!P)return!1;ge+=P.length}return E.write(t.CONNACK_HEADER),re(E,ge),E.write(te.sessionPresent?t.SESSIONPRESENT_HEADER:n),E.write(a.from([X])),P==null||P.write(),!0}function L(R,E,z){o("publish: packet: %o",R);let fe=z?z.protocolVersion:4,te=R||{},X=te.qos||0,ye=te.retain?t.RETAIN_MASK:0,ge=te.topic,P=te.payload||c,j=te.messageId,V=te.properties,ie=0;if(typeof ge=="string")ie+=a.byteLength(ge)+2;else if(a.isBuffer(ge))ie+=ge.length+2;else return E.destroy(new Error("Invalid topic")),!1;if(a.isBuffer(P)?ie+=P.length:ie+=a.byteLength(P),X&&typeof j!="number")return E.destroy(new Error("Invalid messageId")),!1;X&&(ie+=2);let Z=null;if(fe===5){if(Z=we(E,V),!Z)return!1;ie+=Z.length}return E.write(t.PUBLISH_HEADER[X][te.dup?1:0][ye?1:0]),re(E,ie),A(E,ve(ge)),E.write(ge),X>0&&A(E,j),Z==null||Z.write(),o("publish: payload: %o",P),E.write(P)}function F(R,E,z){let fe=z?z.protocolVersion:4,te=R||{},X=te.cmd||"puback",ye=te.messageId,ge=te.dup&&X==="pubrel"?t.DUP_MASK:0,P=0,j=te.reasonCode,V=te.properties,ie=fe===5?3:2;if(X==="pubrel"&&(P=1),typeof ye!="number")return E.destroy(new Error("Invalid messageId")),!1;let Z=null;if(fe===5&&typeof V=="object"){if(Z=w(E,V,z,ie),!Z)return!1;ie+=Z.length}return E.write(t.ACKS[X][P][ge][0]),ie===3&&(ie+=j!==0?1:-1),re(E,ie),A(E,ye),fe===5&&ie!==2&&E.write(a.from([j])),Z!==null?Z.write():ie===4&&E.write(a.from([0])),!0}function B(R,E,z){o("subscribe: packet: ");let fe=z?z.protocolVersion:4,te=R||{},X=te.dup?t.DUP_MASK:0,ye=te.messageId,ge=te.subscriptions,P=te.properties,j=0;if(typeof ye!="number")return E.destroy(new Error("Invalid messageId")),!1;j+=2;let V=null;if(fe===5){if(V=we(E,P),!V)return!1;j+=V.length}if(typeof ge=="object"&&ge.length)for(let Z=0;Z<ge.length;Z+=1){let D=ge[Z].topic,$=ge[Z].qos;if(typeof D!="string")return E.destroy(new Error("Invalid subscriptions - invalid topic")),!1;if(typeof $!="number")return E.destroy(new Error("Invalid subscriptions - invalid qos")),!1;if(fe===5){if(typeof(ge[Z].nl||!1)!="boolean")return E.destroy(new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(ge[Z].rap||!1)!="boolean")return E.destroy(new Error("Invalid subscriptions - invalid Retain as Published")),!1;let O=ge[Z].rh||0;if(typeof O!="number"||O>2)return E.destroy(new Error("Invalid subscriptions - invalid Retain Handling")),!1}j+=a.byteLength(D)+2+1}else return E.destroy(new Error("Invalid subscriptions")),!1;o("subscribe: writing to stream: %o",t.SUBSCRIBE_HEADER),E.write(t.SUBSCRIBE_HEADER[1][X?1:0][0]),re(E,j),A(E,ye),V!==null&&V.write();let ie=!0;for(let Z of ge){let D=Z.topic,$=Z.qos,O=+Z.nl,N=+Z.rap,Q=Z.rh,he;Y(E,D),he=t.SUBSCRIBE_OPTIONS_QOS[$],fe===5&&(he|=O?t.SUBSCRIBE_OPTIONS_NL:0,he|=N?t.SUBSCRIBE_OPTIONS_RAP:0,he|=Q?t.SUBSCRIBE_OPTIONS_RH[Q]:0),ie=E.write(a.from([he]))}return ie}function k(R,E,z){let fe=z?z.protocolVersion:4,te=R||{},X=te.messageId,ye=te.granted,ge=te.properties,P=0;if(typeof X!="number")return E.destroy(new Error("Invalid messageId")),!1;if(P+=2,typeof ye=="object"&&ye.length)for(let V=0;V<ye.length;V+=1){if(typeof ye[V]!="number")return E.destroy(new Error("Invalid qos vector")),!1;P+=1}else return E.destroy(new Error("Invalid qos vector")),!1;let j=null;if(fe===5){if(j=w(E,ge,z,P),!j)return!1;P+=j.length}return E.write(t.SUBACK_HEADER),re(E,P),A(E,X),j!==null&&j.write(),E.write(a.from(ye))}function M(R,E,z){let fe=z?z.protocolVersion:4,te=R||{},X=te.messageId,ye=te.dup?t.DUP_MASK:0,ge=te.unsubscriptions,P=te.properties,j=0;if(typeof X!="number")return E.destroy(new Error("Invalid messageId")),!1;if(j+=2,typeof ge=="object"&&ge.length)for(let Z=0;Z<ge.length;Z+=1){if(typeof ge[Z]!="string")return E.destroy(new Error("Invalid unsubscriptions")),!1;j+=a.byteLength(ge[Z])+2}else return E.destroy(new Error("Invalid unsubscriptions")),!1;let V=null;if(fe===5){if(V=we(E,P),!V)return!1;j+=V.length}E.write(t.UNSUBSCRIBE_HEADER[1][ye?1:0][0]),re(E,j),A(E,X),V!==null&&V.write();let ie=!0;for(let Z=0;Z<ge.length;Z++)ie=Y(E,ge[Z]);return ie}function W(R,E,z){let fe=z?z.protocolVersion:4,te=R||{},X=te.messageId,ye=te.dup?t.DUP_MASK:0,ge=te.granted,P=te.properties,j=te.cmd,V=0,ie=2;if(typeof X!="number")return E.destroy(new Error("Invalid messageId")),!1;if(fe===5)if(typeof ge=="object"&&ge.length)for(let D=0;D<ge.length;D+=1){if(typeof ge[D]!="number")return E.destroy(new Error("Invalid qos vector")),!1;ie+=1}else return E.destroy(new Error("Invalid qos vector")),!1;let Z=null;if(fe===5){if(Z=w(E,P,z,ie),!Z)return!1;ie+=Z.length}return E.write(t.ACKS[j][V][ye][0]),re(E,ie),A(E,X),Z!==null&&Z.write(),fe===5&&E.write(a.from(ge)),!0}function J(R,E,z){return E.write(t.EMPTY[R.cmd])}function ne(R,E,z){let fe=z?z.protocolVersion:4,te=R||{},X=te.reasonCode,ye=te.properties,ge=fe===5?1:0,P=null;if(fe===5){if(P=w(E,ye,z,ge),!P)return!1;ge+=P.length}return E.write(a.from([t.codes.disconnect<<4])),re(E,ge),fe===5&&E.write(a.from([X])),P!==null&&P.write(),!0}function S(R,E,z){let fe=z?z.protocolVersion:4,te=R||{},X=te.reasonCode,ye=te.properties,ge=fe===5?1:0;fe!==5&&E.destroy(new Error("Invalid mqtt version for auth packet"));let P=w(E,ye,z,ge);return P?(ge+=P.length,E.write(a.from([t.codes.auth<<4])),re(E,ge),E.write(a.from([X])),P!==null&&P.write(),!0):!1}var q={};function re(R,E){if(E>t.VARBYTEINT_MAX)return R.destroy(new Error(`Invalid variable byte integer: ${E}`)),!1;let z=q[E];return z||(z=g(E),E<16384&&(q[E]=z)),o("writeVarByteInt: writing to stream: %o",z),R.write(z)}function Y(R,E){let z=a.byteLength(E);return A(R,z),o("writeString: %s",E),R.write(E,"utf8")}function me(R,E,z){Y(R,E),Y(R,z)}function se(R,E){return o("writeNumberCached: number: %d",E),o("writeNumberCached: %o",l[E]),R.write(l[E])}function H(R,E){let z=f(E);return o("writeNumberGenerated: %o",z),R.write(z)}function be(R,E){let z=m(E);return o("write4ByteNumber: %o",z),R.write(z)}function oe(R,E){typeof E=="string"?Y(R,E):E?(A(R,E.length),R.write(E)):A(R,0)}function we(R,E){if(typeof E!="object"||E.length!=null)return{length:1,write(){de(R,{},0)}};let z=0;function fe(te,X){let ye=t.propertiesTypes[te],ge=0;switch(ye){case"byte":{if(typeof X!="boolean")return R.destroy(new Error(`Invalid ${te}: ${X}`)),!1;ge+=2;break}case"int8":{if(typeof X!="number"||X<0||X>255)return R.destroy(new Error(`Invalid ${te}: ${X}`)),!1;ge+=2;break}case"binary":{if(X&&X===null)return R.destroy(new Error(`Invalid ${te}: ${X}`)),!1;ge+=1+a.byteLength(X)+2;break}case"int16":{if(typeof X!="number"||X<0||X>65535)return R.destroy(new Error(`Invalid ${te}: ${X}`)),!1;ge+=3;break}case"int32":{if(typeof X!="number"||X<0||X>4294967295)return R.destroy(new Error(`Invalid ${te}: ${X}`)),!1;ge+=5;break}case"var":{if(typeof X!="number"||X<0||X>268435455)return R.destroy(new Error(`Invalid ${te}: ${X}`)),!1;ge+=1+a.byteLength(g(X));break}case"string":{if(typeof X!="string")return R.destroy(new Error(`Invalid ${te}: ${X}`)),!1;ge+=3+a.byteLength(X.toString());break}case"pair":{if(typeof X!="object")return R.destroy(new Error(`Invalid ${te}: ${X}`)),!1;ge+=Object.getOwnPropertyNames(X).reduce((P,j)=>{let V=X[j];return Array.isArray(V)?P+=V.reduce((ie,Z)=>(ie+=3+a.byteLength(j.toString())+2+a.byteLength(Z.toString()),ie),0):P+=3+a.byteLength(j.toString())+2+a.byteLength(X[j].toString()),P},0);break}default:return R.destroy(new Error(`Invalid property ${te}: ${X}`)),!1}return ge}if(E)for(let te in E){let X=0,ye=0,ge=E[te];if(Array.isArray(ge))for(let P=0;P<ge.length;P++){if(ye=fe(te,ge[P]),!ye)return!1;X+=ye}else{if(ye=fe(te,ge),!ye)return!1;X=ye}if(!X)return!1;z+=X}return{length:a.byteLength(g(z))+z,write(){de(R,E,z)}}}function w(R,E,z,fe){let te=["reasonString","userProperties"],X=z&&z.properties&&z.properties.maximumPacketSize?z.properties.maximumPacketSize:0,ye=we(R,E);if(X)for(;fe+ye.length>X;){let ge=te.shift();if(ge&&E[ge])delete E[ge],ye=we(R,E);else return!1}return ye}function G(R,E,z){switch(t.propertiesTypes[E]){case"byte":{R.write(a.from([t.properties[E]])),R.write(a.from([+z]));break}case"int8":{R.write(a.from([t.properties[E]])),R.write(a.from([z]));break}case"binary":{R.write(a.from([t.properties[E]])),oe(R,z);break}case"int16":{R.write(a.from([t.properties[E]])),A(R,z);break}case"int32":{R.write(a.from([t.properties[E]])),be(R,z);break}case"var":{R.write(a.from([t.properties[E]])),re(R,z);break}case"string":{R.write(a.from([t.properties[E]])),Y(R,z);break}case"pair":{Object.getOwnPropertyNames(z).forEach(fe=>{let te=z[fe];Array.isArray(te)?te.forEach(X=>{R.write(a.from([t.properties[E]])),me(R,fe.toString(),X.toString())}):(R.write(a.from([t.properties[E]])),me(R,fe.toString(),te.toString()))});break}default:return R.destroy(new Error(`Invalid property ${E} value: ${z}`)),!1}}function de(R,E,z){re(R,z);for(let fe in E)if(Object.prototype.hasOwnProperty.call(E,fe)&&E[fe]!==null){let te=E[fe];if(Array.isArray(te))for(let X=0;X<te.length;X++)G(R,fe,te[X]);else G(R,fe,te)}}function ve(R){return R?R instanceof a?R.length:a.byteLength(R):0}function ue(R){return typeof R=="string"||R instanceof a}i.exports=C}),Tc=Ae((e,i)=>{ae(),ce(),le();var t=gs(),{EventEmitter:a}=(er(),Ue(Ft)),{Buffer:c}=(Ze(),Ue(Je));function n(s,o){let l=new r;return t(s,l,o),l.concat()}var r=class extends a{constructor(){super(),this._array=new Array(20),this._i=0}write(s){return this._array[this._i++]=s,!0}concat(){let s=0,o=new Array(this._array.length),l=this._array,f=0,p;for(p=0;p<l.length&&l[p]!==void 0;p++)typeof l[p]!="string"?o[p]=l[p].length:o[p]=c.byteLength(l[p]),s+=o[p];let g=c.allocUnsafe(s);for(p=0;p<l.length&&l[p]!==void 0;p++)typeof l[p]!="string"?(l[p].copy(g,f),f+=o[p]):(g.write(l[p],f),f+=o[p]);return g}destroy(s){s&&this.emit("error",s)}};i.exports=n}),kc=Ae(e=>{ae(),ce(),le(),e.parser=Sc().parser,e.generate=Tc(),e.writeToStream=gs()}),ms=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=class{constructor(){this.nextId=Math.max(1,Math.floor(Math.random()*65535))}allocate(){let t=this.nextId++;return this.nextId===65536&&(this.nextId=1),t}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(t){return!0}deallocate(t){}clear(){}};e.default=i}),Bc=Ae((e,i)=>{ae(),ce(),le(),i.exports=a;function t(n){return n instanceof mr?mr.from(n):new n.constructor(n.buffer.slice(),n.byteOffset,n.length)}function a(n){if(n=n||{},n.circles)return c(n);return n.proto?o:s;function r(l,f){for(var p=Object.keys(l),g=new Array(p.length),m=0;m<p.length;m++){var A=p[m],b=l[A];typeof b!="object"||b===null?g[A]=b:b instanceof Date?g[A]=new Date(b):ArrayBuffer.isView(b)?g[A]=t(b):g[A]=f(b)}return g}function s(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return r(l,s);if(l instanceof Map)return new Map(r(Array.from(l),s));if(l instanceof Set)return new Set(r(Array.from(l),s));var f={};for(var p in l)if(Object.hasOwnProperty.call(l,p)!==!1){var g=l[p];typeof g!="object"||g===null?f[p]=g:g instanceof Date?f[p]=new Date(g):g instanceof Map?f[p]=new Map(r(Array.from(g),s)):g instanceof Set?f[p]=new Set(r(Array.from(g),s)):ArrayBuffer.isView(g)?f[p]=t(g):f[p]=s(g)}return f}function o(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return r(l,o);if(l instanceof Map)return new Map(r(Array.from(l),o));if(l instanceof Set)return new Set(r(Array.from(l),o));var f={};for(var p in l){var g=l[p];typeof g!="object"||g===null?f[p]=g:g instanceof Date?f[p]=new Date(g):g instanceof Map?f[p]=new Map(r(Array.from(g),o)):g instanceof Set?f[p]=new Set(r(Array.from(g),o)):ArrayBuffer.isView(g)?f[p]=t(g):f[p]=o(g)}return f}}function c(n){var r=[],s=[];return n.proto?f:l;function o(p,g){for(var m=Object.keys(p),A=new Array(m.length),b=0;b<m.length;b++){var C=m[b],U=p[C];if(typeof U!="object"||U===null)A[C]=U;else if(U instanceof Date)A[C]=new Date(U);else if(ArrayBuffer.isView(U))A[C]=t(U);else{var I=r.indexOf(U);I!==-1?A[C]=s[I]:A[C]=g(U)}}return A}function l(p){if(typeof p!="object"||p===null)return p;if(p instanceof Date)return new Date(p);if(Array.isArray(p))return o(p,l);if(p instanceof Map)return new Map(o(Array.from(p),l));if(p instanceof Set)return new Set(o(Array.from(p),l));var g={};r.push(p),s.push(g);for(var m in p)if(Object.hasOwnProperty.call(p,m)!==!1){var A=p[m];if(typeof A!="object"||A===null)g[m]=A;else if(A instanceof Date)g[m]=new Date(A);else if(A instanceof Map)g[m]=new Map(o(Array.from(A),l));else if(A instanceof Set)g[m]=new Set(o(Array.from(A),l));else if(ArrayBuffer.isView(A))g[m]=t(A);else{var b=r.indexOf(A);b!==-1?g[m]=s[b]:g[m]=l(A)}}return r.pop(),s.pop(),g}function f(p){if(typeof p!="object"||p===null)return p;if(p instanceof Date)return new Date(p);if(Array.isArray(p))return o(p,f);if(p instanceof Map)return new Map(o(Array.from(p),f));if(p instanceof Set)return new Set(o(Array.from(p),f));var g={};r.push(p),s.push(g);for(var m in p){var A=p[m];if(typeof A!="object"||A===null)g[m]=A;else if(A instanceof Date)g[m]=new Date(A);else if(A instanceof Map)g[m]=new Map(o(Array.from(A),f));else if(A instanceof Set)g[m]=new Set(o(Array.from(A),f));else if(ArrayBuffer.isView(A))g[m]=t(A);else{var b=r.indexOf(A);b!==-1?g[m]=s[b]:g[m]=f(A)}}return r.pop(),s.pop(),g}}}),Oc=Ae((e,i)=>{ae(),ce(),le(),i.exports=Bc()()}),Pc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0}),e.validateTopics=e.validateTopic=void 0;function i(a){let c=a.split("/");for(let n=0;n<c.length;n++)if(c[n]!=="+"){if(c[n]==="#")return n===c.length-1;if(c[n].indexOf("+")!==-1||c[n].indexOf("#")!==-1)return!1}return!0}e.validateTopic=i;function t(a){if(a.length===0)return"empty_topic_list";for(let c=0;c<a.length;c++)if(!i(a[c]))return a[c];return null}e.validateTopics=t}),As=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=Qt(),t={objectMode:!0},a={clean:!0},c=class{constructor(n){this.options=n||{},this.options=Object.assign(Object.assign({},a),n),this._inflights=new Map}put(n,r){return this._inflights.set(n.messageId,n),r&&r(),this}createStream(){let n=new i.Readable(t),r=[],s=!1,o=0;return this._inflights.forEach((l,f)=>{r.push(l)}),n._read=()=>{!s&&o<r.length?n.push(r[o++]):n.push(null)},n.destroy=l=>{if(!s)return s=!0,setTimeout(()=>{n.emit("close")},0),n},n}del(n,r){let s=this._inflights.get(n.messageId);return s?(this._inflights.delete(n.messageId),r(null,s)):r&&r(new Error("missing packet")),this}get(n,r){let s=this._inflights.get(n.messageId);return s?r(null,s):r&&r(new Error("missing packet")),this}close(n){this.options.clean&&(this._inflights=null),n&&n()}};e.default=c}),xc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=[0,16,128,131,135,144,145,151,153],t=(a,c,n)=>{a.log("handlePublish: packet %o",c),n=typeof n<"u"?n:a.noop;let r=c.topic.toString(),s=c.payload,{qos:o}=c,{messageId:l}=c,{options:f}=a;if(a.options.protocolVersion===5){let p;if(c.properties&&(p=c.properties.topicAlias),typeof p<"u")if(r.length===0)if(p>0&&p<=65535){let g=a.topicAliasRecv.getTopicByAlias(p);if(g)r=g,a.log("handlePublish :: topic complemented by alias. topic: %s - alias: %d",r,p);else{a.log("handlePublish :: unregistered topic alias. alias: %d",p),a.emit("error",new Error("Received unregistered Topic Alias"));return}}else{a.log("handlePublish :: topic alias out of range. alias: %d",p),a.emit("error",new Error("Received Topic Alias is out of range"));return}else if(a.topicAliasRecv.put(r,p))a.log("handlePublish :: registered topic: %s - alias: %d",r,p);else{a.log("handlePublish :: topic alias out of range. alias: %d",p),a.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(a.log("handlePublish: qos %d",o),o){case 2:{f.customHandleAcks(r,s,c,(p,g)=>{if(typeof p=="number"&&(g=p,p=null),p)return a.emit("error",p);if(i.indexOf(g)===-1)return a.emit("error",new Error("Wrong reason code for pubrec"));g?a._sendPacket({cmd:"pubrec",messageId:l,reasonCode:g},n):a.incomingStore.put(c,()=>{a._sendPacket({cmd:"pubrec",messageId:l},n)})});break}case 1:{f.customHandleAcks(r,s,c,(p,g)=>{if(typeof p=="number"&&(g=p,p=null),p)return a.emit("error",p);if(i.indexOf(g)===-1)return a.emit("error",new Error("Wrong reason code for puback"));g||a.emit("message",r,s,c),a.handleMessage(c,m=>{if(m)return n&&n(m);a._sendPacket({cmd:"puback",messageId:l,reasonCode:g},n)})});break}case 0:a.emit("message",r,s,c),a.handleMessage(c,n);break;default:a.log("handlePublish: unknown QoS. Doing nothing.");break}};e.default=t}),Rc=Ae((e,i)=>{i.exports={version:"5.10.1"}}),rr=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0}),e.MQTTJS_VERSION=e.nextTick=e.applyMixin=e.ErrorWithReasonCode=void 0;var i=class Ma extends Error{constructor(c,n){super(c),this.code=n,Object.setPrototypeOf(this,Ma.prototype),Object.getPrototypeOf(this).name="ErrorWithReasonCode"}};e.ErrorWithReasonCode=i;function t(a,c,n=!1){var r;let s=[c];for(;;){let o=s[0],l=Object.getPrototypeOf(o);if(l!=null&&l.prototype)s.unshift(l);else break}for(let o of s)for(let l of Object.getOwnPropertyNames(o.prototype))(n||l!=="constructor")&&Object.defineProperty(a.prototype,l,(r=Object.getOwnPropertyDescriptor(o.prototype,l))!==null&&r!==void 0?r:Object.create(null))}e.applyMixin=t,e.nextTick=typeof(xe==null?void 0:xe.nextTick)=="function"?xe.nextTick:a=>{setTimeout(a,0)},e.MQTTJS_VERSION=Rc().version}),Cr=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonCodes=void 0;var i=rr();e.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 t=(a,c)=>{let{messageId:n}=c,r=c.cmd,s=null,o=a.outgoing[n]?a.outgoing[n].cb:null,l=null;if(!o){a.log("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(a.log("_handleAck :: packet type",r),r){case"pubcomp":case"puback":{let f=c.reasonCode;f&&f>0&&f!==16?(l=new i.ErrorWithReasonCode(`Publish error: ${e.ReasonCodes[f]}`,f),a._removeOutgoingAndStoreMessage(n,()=>{o(l,c)})):a._removeOutgoingAndStoreMessage(n,o);break}case"pubrec":{s={cmd:"pubrel",qos:2,messageId:n};let f=c.reasonCode;f&&f>0&&f!==16?(l=new i.ErrorWithReasonCode(`Publish error: ${e.ReasonCodes[f]}`,f),a._removeOutgoingAndStoreMessage(n,()=>{o(l,c)})):a._sendPacket(s);break}case"suback":{delete a.outgoing[n],a.messageIdProvider.deallocate(n);let f=c.granted;for(let p=0;p<f.length;p++){let g=f[p];if(g&128){l=new Error(`Subscribe error: ${e.ReasonCodes[g]}`),l.code=g;let m=a.messageIdToTopic[n];m&&m.forEach(A=>{delete a._resubscribeTopics[A]})}}delete a.messageIdToTopic[n],a._invokeStoreProcessingQueue(),o(l,c);break}case"unsuback":{delete a.outgoing[n],a.messageIdProvider.deallocate(n),a._invokeStoreProcessingQueue(),o(null,c);break}default:a.emit("error",new Error("unrecognized packet type"))}a.disconnecting&&Object.keys(a.outgoing).length===0&&a.emit("outgoingEmpty")};e.default=t}),Mc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=rr(),t=Cr(),a=(c,n)=>{let{options:r}=c,s=r.protocolVersion,o=s===5?n.reasonCode:n.returnCode;if(s!==5){let l=new i.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${s}`,o);c.emit("error",l);return}c.handleAuth(n,(l,f)=>{if(l){c.emit("error",l);return}if(o===24)c.reconnecting=!1,c._sendPacket(f);else{let p=new i.ErrorWithReasonCode(`Connection refused: ${t.ReasonCodes[o]}`,o);c.emit("error",p)}})};e.default=a}),Uc=Ae(e=>{var m,A,b,C,U,I,v,L,F,B,k,M,W,J,ne,S,q,re,Y,me,se,H,be,oe,we,w,Di,de,ve,ue,R,Ua,z,fe,te,xt,Rt,Li,Nr,Fr,Fe,Ni,fr,D;ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var i=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,t=new Set,a=typeof xe=="object"&&xe?xe:{},c=($,O,N,Q)=>{typeof a.emitWarning=="function"?a.emitWarning($,O,N,Q):console.error(`[${N}] ${O}: ${$}`)},n=globalThis.AbortController,r=globalThis.AbortSignal;if(typeof n>"u"){r=class{constructor(){Ve(this,"onabort");Ve(this,"_onabort",[]);Ve(this,"reason");Ve(this,"aborted",!1)}addEventListener(N,Q){this._onabort.push(Q)}},n=class{constructor(){Ve(this,"signal",new r);O()}abort(N){var Q,he;if(!this.signal.aborted){this.signal.reason=N,this.signal.aborted=!0;for(let u of this.signal._onabort)u(N);(he=(Q=this.signal).onabort)==null||he.call(Q,N)}}};let $=((m=a.env)==null?void 0:m.LRU_CACHE_IGNORE_AC_WARNING)!=="1",O=()=>{$&&($=!1,c("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",O))}}var s=$=>!t.has($),o=$=>$&&$===Math.floor($)&&$>0&&isFinite($),l=$=>o($)?$<=Math.pow(2,8)?Uint8Array:$<=Math.pow(2,16)?Uint16Array:$<=Math.pow(2,32)?Uint32Array:$<=Number.MAX_SAFE_INTEGER?f:null:null,f=class extends Array{constructor($){super($),this.fill(0)}},p=(A=class{constructor(O,N){Ve(this,"heap");Ve(this,"length");if(!x(A,b))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new N(O),this.length=0}static create(O){let N=l(O);if(!N)return[];Ce(A,b,!0);let Q=new A(O,N);return Ce(A,b,!1),Q}push(O){this.heap[this.length++]=O}pop(){return this.heap[--this.length]}},b=new WeakMap,Pe(A,b,!1),A),g=(D=class{constructor(O){Pe(this,w);Pe(this,C);Pe(this,U);Pe(this,I);Pe(this,v);Pe(this,L);Ve(this,"ttl");Ve(this,"ttlResolution");Ve(this,"ttlAutopurge");Ve(this,"updateAgeOnGet");Ve(this,"updateAgeOnHas");Ve(this,"allowStale");Ve(this,"noDisposeOnSet");Ve(this,"noUpdateTTL");Ve(this,"maxEntrySize");Ve(this,"sizeCalculation");Ve(this,"noDeleteOnFetchRejection");Ve(this,"noDeleteOnStaleGet");Ve(this,"allowStaleOnFetchAbort");Ve(this,"allowStaleOnFetchRejection");Ve(this,"ignoreFetchAbort");Pe(this,F);Pe(this,B);Pe(this,k);Pe(this,M);Pe(this,W);Pe(this,J);Pe(this,ne);Pe(this,S);Pe(this,q);Pe(this,re);Pe(this,Y);Pe(this,me);Pe(this,se);Pe(this,H);Pe(this,be);Pe(this,oe);Pe(this,we);Pe(this,de,()=>{});Pe(this,ve,()=>{});Pe(this,ue,()=>{});Pe(this,R,()=>!1);Pe(this,z,O=>{});Pe(this,fe,(O,N,Q)=>{});Pe(this,te,(O,N,Q,he)=>{if(Q||he)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});let{max:N=0,ttl:Q,ttlResolution:he=1,ttlAutopurge:u,updateAgeOnGet:h,updateAgeOnHas:d,allowStale:y,dispose:T,disposeAfter:K,noDisposeOnSet:ee,noUpdateTTL:Ie,maxSize:Be=0,maxEntrySize:Oe=0,sizeCalculation:Se,fetchMethod:ke,noDeleteOnFetchRejection:Te,noDeleteOnStaleGet:De,allowStaleOnFetchRejection:ze,allowStaleOnFetchAbort:Qe,ignoreFetchAbort:Xe}=O;if(N!==0&&!o(N))throw new TypeError("max option must be a nonnegative integer");let tt=N?l(N):Array;if(!tt)throw new Error("invalid max value: "+N);if(Ce(this,C,N),Ce(this,U,Be),this.maxEntrySize=Oe||x(this,U),this.sizeCalculation=Se,this.sizeCalculation){if(!x(this,U)&&!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(ke!==void 0&&typeof ke!="function")throw new TypeError("fetchMethod must be a function if specified");if(Ce(this,L,ke),Ce(this,oe,!!ke),Ce(this,k,new Map),Ce(this,M,new Array(N).fill(void 0)),Ce(this,W,new Array(N).fill(void 0)),Ce(this,J,new tt(N)),Ce(this,ne,new tt(N)),Ce(this,S,0),Ce(this,q,0),Ce(this,re,p.create(N)),Ce(this,F,0),Ce(this,B,0),typeof T=="function"&&Ce(this,I,T),typeof K=="function"?(Ce(this,v,K),Ce(this,Y,[])):(Ce(this,v,void 0),Ce(this,Y,void 0)),Ce(this,be,!!x(this,I)),Ce(this,we,!!x(this,v)),this.noDisposeOnSet=!!ee,this.noUpdateTTL=!!Ie,this.noDeleteOnFetchRejection=!!Te,this.allowStaleOnFetchRejection=!!ze,this.allowStaleOnFetchAbort=!!Qe,this.ignoreFetchAbort=!!Xe,this.maxEntrySize!==0){if(x(this,U)!==0&&!o(x(this,U)))throw new TypeError("maxSize must be a positive integer if specified");if(!o(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");Ee(this,w,Ua).call(this)}if(this.allowStale=!!y,this.noDeleteOnStaleGet=!!De,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!d,this.ttlResolution=o(he)||he===0?he:1,this.ttlAutopurge=!!u,this.ttl=Q||0,this.ttl){if(!o(this.ttl))throw new TypeError("ttl must be a positive integer if specified");Ee(this,w,Di).call(this)}if(x(this,C)===0&&this.ttl===0&&x(this,U)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!x(this,C)&&!x(this,U)){let Ye="LRU_CACHE_UNBOUNDED";s(Ye)&&(t.add(Ye),c("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Ye,D))}}static unsafeExposeInternals(O){return{starts:x(O,se),ttls:x(O,H),sizes:x(O,me),keyMap:x(O,k),keyList:x(O,M),valList:x(O,W),next:x(O,J),prev:x(O,ne),get head(){return x(O,S)},get tail(){return x(O,q)},free:x(O,re),isBackgroundFetch:N=>{var Q;return Ee(Q=O,w,Fe).call(Q,N)},backgroundFetch:(N,Q,he,u)=>{var h;return Ee(h=O,w,Fr).call(h,N,Q,he,u)},moveToTail:N=>{var Q;return Ee(Q=O,w,fr).call(Q,N)},indexes:N=>{var Q;return Ee(Q=O,w,xt).call(Q,N)},rindexes:N=>{var Q;return Ee(Q=O,w,Rt).call(Q,N)},isStale:N=>{var Q;return x(Q=O,R).call(Q,N)}}}get max(){return x(this,C)}get maxSize(){return x(this,U)}get calculatedSize(){return x(this,B)}get size(){return x(this,F)}get fetchMethod(){return x(this,L)}get dispose(){return x(this,I)}get disposeAfter(){return x(this,v)}getRemainingTTL(O){return x(this,k).has(O)?1/0:0}*entries(){for(let O of Ee(this,w,xt).call(this))x(this,W)[O]!==void 0&&x(this,M)[O]!==void 0&&!Ee(this,w,Fe).call(this,x(this,W)[O])&&(yield[x(this,M)[O],x(this,W)[O]])}*rentries(){for(let O of Ee(this,w,Rt).call(this))x(this,W)[O]!==void 0&&x(this,M)[O]!==void 0&&!Ee(this,w,Fe).call(this,x(this,W)[O])&&(yield[x(this,M)[O],x(this,W)[O]])}*keys(){for(let O of Ee(this,w,xt).call(this)){let N=x(this,M)[O];N!==void 0&&!Ee(this,w,Fe).call(this,x(this,W)[O])&&(yield N)}}*rkeys(){for(let O of Ee(this,w,Rt).call(this)){let N=x(this,M)[O];N!==void 0&&!Ee(this,w,Fe).call(this,x(this,W)[O])&&(yield N)}}*values(){for(let O of Ee(this,w,xt).call(this))x(this,W)[O]!==void 0&&!Ee(this,w,Fe).call(this,x(this,W)[O])&&(yield x(this,W)[O])}*rvalues(){for(let O of Ee(this,w,Rt).call(this))x(this,W)[O]!==void 0&&!Ee(this,w,Fe).call(this,x(this,W)[O])&&(yield x(this,W)[O])}[Symbol.iterator](){return this.entries()}find(O,N={}){for(let Q of Ee(this,w,xt).call(this)){let he=x(this,W)[Q],u=Ee(this,w,Fe).call(this,he)?he.__staleWhileFetching:he;if(u!==void 0&&O(u,x(this,M)[Q],this))return this.get(x(this,M)[Q],N)}}forEach(O,N=this){for(let Q of Ee(this,w,xt).call(this)){let he=x(this,W)[Q],u=Ee(this,w,Fe).call(this,he)?he.__staleWhileFetching:he;u!==void 0&&O.call(N,u,x(this,M)[Q],this)}}rforEach(O,N=this){for(let Q of Ee(this,w,Rt).call(this)){let he=x(this,W)[Q],u=Ee(this,w,Fe).call(this,he)?he.__staleWhileFetching:he;u!==void 0&&O.call(N,u,x(this,M)[Q],this)}}purgeStale(){let O=!1;for(let N of Ee(this,w,Rt).call(this,{allowStale:!0}))x(this,R).call(this,N)&&(this.delete(x(this,M)[N]),O=!0);return O}dump(){let O=[];for(let N of Ee(this,w,xt).call(this,{allowStale:!0})){let Q=x(this,M)[N],he=x(this,W)[N],u=Ee(this,w,Fe).call(this,he)?he.__staleWhileFetching:he;if(u===void 0||Q===void 0)continue;let h={value:u};if(x(this,H)&&x(this,se)){h.ttl=x(this,H)[N];let d=i.now()-x(this,se)[N];h.start=Math.floor(Date.now()-d)}x(this,me)&&(h.size=x(this,me)[N]),O.unshift([Q,h])}return O}load(O){this.clear();for(let[N,Q]of O){if(Q.start){let he=Date.now()-Q.start;Q.start=i.now()-he}this.set(N,Q.value,Q)}}set(O,N,Q={}){var Ie,Be,Oe,Se,ke;if(N===void 0)return this.delete(O),this;let{ttl:he=this.ttl,start:u,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:d=this.sizeCalculation,status:y}=Q,{noUpdateTTL:T=this.noUpdateTTL}=Q,K=x(this,te).call(this,O,N,Q.size||0,d);if(this.maxEntrySize&&K>this.maxEntrySize)return y&&(y.set="miss",y.maxEntrySizeExceeded=!0),this.delete(O),this;let ee=x(this,F)===0?void 0:x(this,k).get(O);if(ee===void 0)ee=x(this,F)===0?x(this,q):x(this,re).length!==0?x(this,re).pop():x(this,F)===x(this,C)?Ee(this,w,Nr).call(this,!1):x(this,F),x(this,M)[ee]=O,x(this,W)[ee]=N,x(this,k).set(O,ee),x(this,J)[x(this,q)]=ee,x(this,ne)[ee]=x(this,q),Ce(this,q,ee),Lr(this,F)._++,x(this,fe).call(this,ee,K,y),y&&(y.set="add"),T=!1;else{Ee(this,w,fr).call(this,ee);let Te=x(this,W)[ee];if(N!==Te){if(x(this,oe)&&Ee(this,w,Fe).call(this,Te)){Te.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:De}=Te;De!==void 0&&!h&&(x(this,be)&&((Ie=x(this,I))==null||Ie.call(this,De,O,"set")),x(this,we)&&((Be=x(this,Y))==null||Be.push([De,O,"set"])))}else h||(x(this,be)&&((Oe=x(this,I))==null||Oe.call(this,Te,O,"set")),x(this,we)&&((Se=x(this,Y))==null||Se.push([Te,O,"set"])));if(x(this,z).call(this,ee),x(this,fe).call(this,ee,K,y),x(this,W)[ee]=N,y){y.set="replace";let De=Te&&Ee(this,w,Fe).call(this,Te)?Te.__staleWhileFetching:Te;De!==void 0&&(y.oldValue=De)}}else y&&(y.set="update")}if(he!==0&&!x(this,H)&&Ee(this,w,Di).call(this),x(this,H)&&(T||x(this,ue).call(this,ee,he,u),y&&x(this,ve).call(this,y,ee)),!h&&x(this,we)&&x(this,Y)){let Te=x(this,Y),De;for(;De=Te==null?void 0:Te.shift();)(ke=x(this,v))==null||ke.call(this,...De)}return this}pop(){var O;try{for(;x(this,F);){let N=x(this,W)[x(this,S)];if(Ee(this,w,Nr).call(this,!0),Ee(this,w,Fe).call(this,N)){if(N.__staleWhileFetching)return N.__staleWhileFetching}else if(N!==void 0)return N}}finally{if(x(this,we)&&x(this,Y)){let N=x(this,Y),Q;for(;Q=N==null?void 0:N.shift();)(O=x(this,v))==null||O.call(this,...Q)}}}has(O,N={}){let{updateAgeOnHas:Q=this.updateAgeOnHas,status:he}=N,u=x(this,k).get(O);if(u!==void 0){let h=x(this,W)[u];if(Ee(this,w,Fe).call(this,h)&&h.__staleWhileFetching===void 0)return!1;if(x(this,R).call(this,u))he&&(he.has="stale",x(this,ve).call(this,he,u));else return Q&&x(this,de).call(this,u),he&&(he.has="hit",x(this,ve).call(this,he,u)),!0}else he&&(he.has="miss");return!1}peek(O,N={}){let{allowStale:Q=this.allowStale}=N,he=x(this,k).get(O);if(he!==void 0&&(Q||!x(this,R).call(this,he))){let u=x(this,W)[he];return Ee(this,w,Fe).call(this,u)?u.__staleWhileFetching:u}}async fetch(O,N={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:he=this.updateAgeOnGet,noDeleteOnStaleGet:u=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:y=0,sizeCalculation:T=this.sizeCalculation,noUpdateTTL:K=this.noUpdateTTL,noDeleteOnFetchRejection:ee=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:Ie=this.allowStaleOnFetchRejection,ignoreFetchAbort:Be=this.ignoreFetchAbort,allowStaleOnFetchAbort:Oe=this.allowStaleOnFetchAbort,context:Se,forceRefresh:ke=!1,status:Te,signal:De}=N;if(!x(this,oe))return Te&&(Te.fetch="get"),this.get(O,{allowStale:Q,updateAgeOnGet:he,noDeleteOnStaleGet:u,status:Te});let ze={allowStale:Q,updateAgeOnGet:he,noDeleteOnStaleGet:u,ttl:h,noDisposeOnSet:d,size:y,sizeCalculation:T,noUpdateTTL:K,noDeleteOnFetchRejection:ee,allowStaleOnFetchRejection:Ie,allowStaleOnFetchAbort:Oe,ignoreFetchAbort:Be,status:Te,signal:De},Qe=x(this,k).get(O);if(Qe===void 0){Te&&(Te.fetch="miss");let Xe=Ee(this,w,Fr).call(this,O,Qe,ze,Se);return Xe.__returned=Xe}else{let Xe=x(this,W)[Qe];if(Ee(this,w,Fe).call(this,Xe)){let xa=Q&&Xe.__staleWhileFetching!==void 0;return Te&&(Te.fetch="inflight",xa&&(Te.returnedStale=!0)),xa?Xe.__staleWhileFetching:Xe.__returned=Xe}let tt=x(this,R).call(this,Qe);if(!ke&&!tt)return Te&&(Te.fetch="hit"),Ee(this,w,fr).call(this,Qe),he&&x(this,de).call(this,Qe),Te&&x(this,ve).call(this,Te,Qe),Xe;let Ye=Ee(this,w,Fr).call(this,O,Qe,ze,Se),Pa=Ye.__staleWhileFetching!==void 0&&Q;return Te&&(Te.fetch=tt?"stale":"refresh",Pa&&tt&&(Te.returnedStale=!0)),Pa?Ye.__staleWhileFetching:Ye.__returned=Ye}}get(O,N={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:he=this.updateAgeOnGet,noDeleteOnStaleGet:u=this.noDeleteOnStaleGet,status:h}=N,d=x(this,k).get(O);if(d!==void 0){let y=x(this,W)[d],T=Ee(this,w,Fe).call(this,y);return h&&x(this,ve).call(this,h,d),x(this,R).call(this,d)?(h&&(h.get="stale"),T?(h&&Q&&y.__staleWhileFetching!==void 0&&(h.returnedStale=!0),Q?y.__staleWhileFetching:void 0):(u||this.delete(O),h&&Q&&(h.returnedStale=!0),Q?y:void 0)):(h&&(h.get="hit"),T?y.__staleWhileFetching:(Ee(this,w,fr).call(this,d),he&&x(this,de).call(this,d),y))}else h&&(h.get="miss")}delete(O){var Q,he,u,h;let N=!1;if(x(this,F)!==0){let d=x(this,k).get(O);if(d!==void 0)if(N=!0,x(this,F)===1)this.clear();else{x(this,z).call(this,d);let y=x(this,W)[d];Ee(this,w,Fe).call(this,y)?y.__abortController.abort(new Error("deleted")):(x(this,be)||x(this,we))&&(x(this,be)&&((Q=x(this,I))==null||Q.call(this,y,O,"delete")),x(this,we)&&((he=x(this,Y))==null||he.push([y,O,"delete"]))),x(this,k).delete(O),x(this,M)[d]=void 0,x(this,W)[d]=void 0,d===x(this,q)?Ce(this,q,x(this,ne)[d]):d===x(this,S)?Ce(this,S,x(this,J)[d]):(x(this,J)[x(this,ne)[d]]=x(this,J)[d],x(this,ne)[x(this,J)[d]]=x(this,ne)[d]),Lr(this,F)._--,x(this,re).push(d)}}if(x(this,we)&&((u=x(this,Y))!=null&&u.length)){let d=x(this,Y),y;for(;y=d==null?void 0:d.shift();)(h=x(this,v))==null||h.call(this,...y)}return N}clear(){var O,N,Q;for(let he of Ee(this,w,Rt).call(this,{allowStale:!0})){let u=x(this,W)[he];if(Ee(this,w,Fe).call(this,u))u.__abortController.abort(new Error("deleted"));else{let h=x(this,M)[he];x(this,be)&&((O=x(this,I))==null||O.call(this,u,h,"delete")),x(this,we)&&((N=x(this,Y))==null||N.push([u,h,"delete"]))}}if(x(this,k).clear(),x(this,W).fill(void 0),x(this,M).fill(void 0),x(this,H)&&x(this,se)&&(x(this,H).fill(0),x(this,se).fill(0)),x(this,me)&&x(this,me).fill(0),Ce(this,S,0),Ce(this,q,0),x(this,re).length=0,Ce(this,B,0),Ce(this,F,0),x(this,we)&&x(this,Y)){let he=x(this,Y),u;for(;u=he==null?void 0:he.shift();)(Q=x(this,v))==null||Q.call(this,...u)}}},C=new WeakMap,U=new WeakMap,I=new WeakMap,v=new WeakMap,L=new WeakMap,F=new WeakMap,B=new WeakMap,k=new WeakMap,M=new WeakMap,W=new WeakMap,J=new WeakMap,ne=new WeakMap,S=new WeakMap,q=new WeakMap,re=new WeakMap,Y=new WeakMap,me=new WeakMap,se=new WeakMap,H=new WeakMap,be=new WeakMap,oe=new WeakMap,we=new WeakMap,w=new WeakSet,Di=function(){let O=new f(x(this,C)),N=new f(x(this,C));Ce(this,H,O),Ce(this,se,N),Ce(this,ue,(u,h,d=i.now())=>{if(N[u]=h!==0?d:0,O[u]=h,h!==0&&this.ttlAutopurge){let y=setTimeout(()=>{x(this,R).call(this,u)&&this.delete(x(this,M)[u])},h+1);y.unref&&y.unref()}}),Ce(this,de,u=>{N[u]=O[u]!==0?i.now():0}),Ce(this,ve,(u,h)=>{if(O[h]){let d=O[h],y=N[h];u.ttl=d,u.start=y,u.now=Q||he();let T=u.now-y;u.remainingTTL=d-T}});let Q=0,he=()=>{let u=i.now();if(this.ttlResolution>0){Q=u;let h=setTimeout(()=>Q=0,this.ttlResolution);h.unref&&h.unref()}return u};this.getRemainingTTL=u=>{let h=x(this,k).get(u);if(h===void 0)return 0;let d=O[h],y=N[h];if(d===0||y===0)return 1/0;let T=(Q||he())-y;return d-T},Ce(this,R,u=>O[u]!==0&&N[u]!==0&&(Q||he())-N[u]>O[u])},de=new WeakMap,ve=new WeakMap,ue=new WeakMap,R=new WeakMap,Ua=function(){let O=new f(x(this,C));Ce(this,B,0),Ce(this,me,O),Ce(this,z,N=>{Ce(this,B,x(this,B)-O[N]),O[N]=0}),Ce(this,te,(N,Q,he,u)=>{if(Ee(this,w,Fe).call(this,Q))return 0;if(!o(he))if(u){if(typeof u!="function")throw new TypeError("sizeCalculation must be a function");if(he=u(Q,N),!o(he))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 he}),Ce(this,fe,(N,Q,he)=>{if(O[N]=Q,x(this,U)){let u=x(this,U)-O[N];for(;x(this,B)>u;)Ee(this,w,Nr).call(this,!0)}Ce(this,B,x(this,B)+O[N]),he&&(he.entrySize=Q,he.totalCalculatedSize=x(this,B))})},z=new WeakMap,fe=new WeakMap,te=new WeakMap,xt=function*({allowStale:O=this.allowStale}={}){if(x(this,F))for(let N=x(this,q);!(!Ee(this,w,Li).call(this,N)||((O||!x(this,R).call(this,N))&&(yield N),N===x(this,S)));)N=x(this,ne)[N]},Rt=function*({allowStale:O=this.allowStale}={}){if(x(this,F))for(let N=x(this,S);!(!Ee(this,w,Li).call(this,N)||((O||!x(this,R).call(this,N))&&(yield N),N===x(this,q)));)N=x(this,J)[N]},Li=function(O){return O!==void 0&&x(this,k).get(x(this,M)[O])===O},Nr=function(O){var u,h;let N=x(this,S),Q=x(this,M)[N],he=x(this,W)[N];return x(this,oe)&&Ee(this,w,Fe).call(this,he)?he.__abortController.abort(new Error("evicted")):(x(this,be)||x(this,we))&&(x(this,be)&&((u=x(this,I))==null||u.call(this,he,Q,"evict")),x(this,we)&&((h=x(this,Y))==null||h.push([he,Q,"evict"]))),x(this,z).call(this,N),O&&(x(this,M)[N]=void 0,x(this,W)[N]=void 0,x(this,re).push(N)),x(this,F)===1?(Ce(this,S,Ce(this,q,0)),x(this,re).length=0):Ce(this,S,x(this,J)[N]),x(this,k).delete(Q),Lr(this,F)._--,N},Fr=function(O,N,Q,he){let u=N===void 0?void 0:x(this,W)[N];if(Ee(this,w,Fe).call(this,u))return u;let h=new n,{signal:d}=Q;d==null||d.addEventListener("abort",()=>h.abort(d.reason),{signal:h.signal});let y={signal:h.signal,options:Q,context:he},T=(Se,ke=!1)=>{let{aborted:Te}=h.signal,De=Q.ignoreFetchAbort&&Se!==void 0;if(Q.status&&(Te&&!ke?(Q.status.fetchAborted=!0,Q.status.fetchError=h.signal.reason,De&&(Q.status.fetchAbortIgnored=!0)):Q.status.fetchResolved=!0),Te&&!De&&!ke)return ee(h.signal.reason);let ze=Be;return x(this,W)[N]===Be&&(Se===void 0?ze.__staleWhileFetching?x(this,W)[N]=ze.__staleWhileFetching:this.delete(O):(Q.status&&(Q.status.fetchUpdated=!0),this.set(O,Se,y.options))),Se},K=Se=>(Q.status&&(Q.status.fetchRejected=!0,Q.status.fetchError=Se),ee(Se)),ee=Se=>{let{aborted:ke}=h.signal,Te=ke&&Q.allowStaleOnFetchAbort,De=Te||Q.allowStaleOnFetchRejection,ze=De||Q.noDeleteOnFetchRejection,Qe=Be;if(x(this,W)[N]===Be&&(!ze||Qe.__staleWhileFetching===void 0?this.delete(O):Te||(x(this,W)[N]=Qe.__staleWhileFetching)),De)return Q.status&&Qe.__staleWhileFetching!==void 0&&(Q.status.returnedStale=!0),Qe.__staleWhileFetching;if(Qe.__returned===Qe)throw Se},Ie=(Se,ke)=>{var De;let Te=(De=x(this,L))==null?void 0:De.call(this,O,u,y);Te&&Te instanceof Promise&&Te.then(ze=>Se(ze===void 0?void 0:ze),ke),h.signal.addEventListener("abort",()=>{(!Q.ignoreFetchAbort||Q.allowStaleOnFetchAbort)&&(Se(void 0),Q.allowStaleOnFetchAbort&&(Se=ze=>T(ze,!0)))})};Q.status&&(Q.status.fetchDispatched=!0);let Be=new Promise(Ie).then(T,K),Oe=Object.assign(Be,{__abortController:h,__staleWhileFetching:u,__returned:void 0});return N===void 0?(this.set(O,Oe,{...y.options,status:void 0}),N=x(this,k).get(O)):x(this,W)[N]=Oe,Oe},Fe=function(O){if(!x(this,oe))return!1;let N=O;return!!N&&N instanceof Promise&&N.hasOwnProperty("__staleWhileFetching")&&N.__abortController instanceof n},Ni=function(O,N){x(this,ne)[N]=O,x(this,J)[O]=N},fr=function(O){O!==x(this,q)&&(O===x(this,S)?Ce(this,S,x(this,J)[O]):Ee(this,w,Ni).call(this,x(this,ne)[O],x(this,J)[O]),Ee(this,w,Ni).call(this,x(this,q),O),Ce(this,q,O))},D);e.LRUCache=g}),St=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.ContainerIterator=e.Container=e.Base=void 0;var i=class{constructor(c=0){this.iteratorType=c}equals(c){return this.o===c.o}};e.ContainerIterator=i;var t=class{constructor(){this.i=0}get length(){return this.i}size(){return this.i}empty(){return this.i===0}};e.Base=t;var a=class extends t{};e.Container=a}),Dc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=St(),t=class extends i.Base{constructor(c=[]){super(),this.S=[];let n=this;c.forEach(function(r){n.push(r)})}clear(){this.i=0,this.S=[]}push(c){return this.S.push(c),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=t;e.default=a}),Lc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=St(),t=class extends i.Base{constructor(c=[]){super(),this.j=0,this.q=[];let n=this;c.forEach(function(r){n.push(r)})}clear(){this.q=[],this.i=this.j=0}push(c){let n=this.q.length;if(this.j/n>.5&&this.j+this.i>=n&&n>4096){let r=this.i;for(let s=0;s<r;++s)this.q[s]=this.q[this.j+s];this.j=0,this.q[this.i]=c}else this.q[this.j+this.i]=c;return++this.i}pop(){if(this.i===0)return;let c=this.q[this.j++];return this.i-=1,c}front(){if(this.i!==0)return this.q[this.j]}},a=t;e.default=a}),Nc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=St(),t=class extends i.Base{constructor(c=[],n=function(s,o){return s>o?-1:s<o?1:0},r=!0){if(super(),this.v=n,Array.isArray(c))this.C=r?[...c]:c;else{this.C=[];let o=this;c.forEach(function(l){o.C.push(l)})}this.i=this.C.length;let s=this.i>>1;for(let o=this.i-1>>1;o>=0;--o)this.k(o,s)}m(c){let n=this.C[c];for(;c>0;){let r=c-1>>1,s=this.C[r];if(this.v(s,n)<=0)break;this.C[c]=s,c=r}this.C[c]=n}k(c,n){let r=this.C[c];for(;c<n;){let s=c<<1|1,o=s+1,l=this.C[s];if(o<this.i&&this.v(l,this.C[o])>0&&(s=o,l=this.C[o]),this.v(l,r)>=0)break;this.C[c]=l,c=s}this.C[c]=r}clear(){this.i=0,this.C.length=0}push(c){this.C.push(c),this.m(this.i),this.i+=1}pop(){if(this.i===0)return;let c=this.C[0],n=this.C.pop();return this.i-=1,this.i&&(this.C[0]=n,this.k(0,this.i>>1)),c}top(){return this.C[0]}find(c){return this.C.indexOf(c)>=0}remove(c){let n=this.C.indexOf(c);return n<0?!1:(n===0?this.pop():n===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(n,1,this.C.pop()),this.i-=1,this.m(n),this.k(n,this.i>>1)),!0)}updateItem(c){let n=this.C.indexOf(c);return n<0?!1:(this.m(n),this.k(n,this.i>>1),!0)}toArray(){return[...this.C]}},a=t;e.default=a}),mi=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=St(),t=class extends i.Container{},a=t;e.default=a}),Ct=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.throwIteratorAccessError=i;function i(){throw new RangeError("Iterator access denied!")}}),bs=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.RandomIterator=void 0;var i=St(),t=Ct(),a=class extends i.ContainerIterator{constructor(c,n){super(n),this.o=c,this.iteratorType===0?(this.pre=function(){return this.o===0&&(0,t.throwIteratorAccessError)(),this.o-=1,this},this.next=function(){return this.o===this.container.size()&&(0,t.throwIteratorAccessError)(),this.o+=1,this}):(this.pre=function(){return this.o===this.container.size()-1&&(0,t.throwIteratorAccessError)(),this.o+=1,this},this.next=function(){return this.o===-1&&(0,t.throwIteratorAccessError)(),this.o-=1,this})}get pointer(){return this.container.getElementByPos(this.o)}set pointer(c){this.container.setElementByPos(this.o,c)}};e.RandomIterator=a}),Fc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=a(mi()),t=bs();function a(s){return s&&s.t?s:{default:s}}var c=class Da extends t.RandomIterator{constructor(o,l,f){super(o,f),this.container=l}copy(){return new Da(this.o,this.container,this.iteratorType)}},n=class extends i.default{constructor(s=[],o=!0){if(super(),Array.isArray(s))this.J=o?[...s]:s,this.i=s.length;else{this.J=[];let l=this;s.forEach(function(f){l.pushBack(f)})}}clear(){this.i=0,this.J.length=0}begin(){return new c(0,this)}end(){return new c(this.i,this)}rBegin(){return new c(this.i-1,this,1)}rEnd(){return new c(-1,this,1)}front(){return this.J[0]}back(){return this.J[this.i-1]}getElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;return this.J[s]}eraseElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;return this.J.splice(s,1),this.i-=1,this.i}eraseElementByValue(s){let o=0;for(let l=0;l<this.i;++l)this.J[l]!==s&&(this.J[o++]=this.J[l]);return this.i=this.J.length=o,this.i}eraseElementByIterator(s){let o=s.o;return s=s.next(),this.eraseElementByPos(o),s}pushBack(s){return this.J.push(s),this.i+=1,this.i}popBack(){if(this.i!==0)return this.i-=1,this.J.pop()}setElementByPos(s,o){if(s<0||s>this.i-1)throw new RangeError;this.J[s]=o}insert(s,o,l=1){if(s<0||s>this.i)throw new RangeError;return this.J.splice(s,0,...new Array(l).fill(o)),this.i+=l,this.i}find(s){for(let o=0;o<this.i;++o)if(this.J[o]===s)return new c(o,this);return this.end()}reverse(){this.J.reverse()}unique(){let s=1;for(let o=1;o<this.i;++o)this.J[o]!==this.J[o-1]&&(this.J[s++]=this.J[o]);return this.i=this.J.length=s,this.i}sort(s){this.J.sort(s)}forEach(s){for(let o=0;o<this.i;++o)s(this.J[o],o,this)}[Symbol.iterator](){return(function*(){yield*this.J}).bind(this)()}},r=n;e.default=r}),jc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=c(mi()),t=St(),a=Ct();function c(o){return o&&o.t?o:{default:o}}var n=class La extends t.ContainerIterator{constructor(l,f,p,g){super(g),this.o=l,this.h=f,this.container=p,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(l){this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o.l=l}copy(){return new La(this.o,this.h,this.container,this.iteratorType)}},r=class extends i.default{constructor(o=[]){super(),this.h={},this.p=this._=this.h.L=this.h.B=this.h;let l=this;o.forEach(function(f){l.pushBack(f)})}V(o){let{L:l,B:f}=o;l.B=f,f.L=l,o===this.p&&(this.p=f),o===this._&&(this._=l),this.i-=1}G(o,l){let f=l.B,p={l:o,L:l,B:f};l.B=p,f.L=p,l===this.h&&(this.p=p),f===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 n(this.p,this.h,this)}end(){return new n(this.h,this.h,this)}rBegin(){return new n(this._,this.h,this,1)}rEnd(){return new n(this.h,this.h,this,1)}front(){return this.p.l}back(){return this._.l}getElementByPos(o){if(o<0||o>this.i-1)throw new RangeError;let l=this.p;for(;o--;)l=l.B;return l.l}eraseElementByPos(o){if(o<0||o>this.i-1)throw new RangeError;let l=this.p;for(;o--;)l=l.B;return this.V(l),this.i}eraseElementByValue(o){let l=this.p;for(;l!==this.h;)l.l===o&&this.V(l),l=l.B;return this.i}eraseElementByIterator(o){let l=o.o;return l===this.h&&(0,a.throwIteratorAccessError)(),o=o.next(),this.V(l),o}pushBack(o){return this.G(o,this._),this.i}popBack(){if(this.i===0)return;let o=this._.l;return this.V(this._),o}pushFront(o){return this.G(o,this.h),this.i}popFront(){if(this.i===0)return;let o=this.p.l;return this.V(this.p),o}setElementByPos(o,l){if(o<0||o>this.i-1)throw new RangeError;let f=this.p;for(;o--;)f=f.B;f.l=l}insert(o,l,f=1){if(o<0||o>this.i)throw new RangeError;if(f<=0)return this.i;if(o===0)for(;f--;)this.pushFront(l);else if(o===this.i)for(;f--;)this.pushBack(l);else{let p=this.p;for(let m=1;m<o;++m)p=p.B;let g=p.B;for(this.i+=f;f--;)p.B={l,L:p},p.B.L=p,p=p.B;p.B=g,g.L=p}return this.i}find(o){let l=this.p;for(;l!==this.h;){if(l.l===o)return new n(l,this.h,this);l=l.B}return this.end()}reverse(){if(this.i<=1)return;let o=this.p,l=this._,f=0;for(;f<<1<this.i;){let p=o.l;o.l=l.l,l.l=p,o=o.B,l=l.L,f+=1}}unique(){if(this.i<=1)return this.i;let o=this.p;for(;o!==this.h;){let l=o;for(;l.B!==this.h&&l.l===l.B.l;)l=l.B,this.i-=1;o.B=l.B,o.B.L=o,o=o.B}return this.i}sort(o){if(this.i<=1)return;let l=[];this.forEach(function(p){l.push(p)}),l.sort(o);let f=this.p;l.forEach(function(p){f.l=p,f=f.B})}merge(o){let l=this;if(this.i===0)o.forEach(function(f){l.pushBack(f)});else{let f=this.p;o.forEach(function(p){for(;f!==l.h&&f.l<=p;)f=f.B;l.G(p,f.L)})}return this.i}forEach(o){let l=this.p,f=0;for(;l!==this.h;)o(l.l,f++,this),l=l.B}[Symbol.iterator](){return(function*(){if(this.i===0)return;let o=this.p;for(;o!==this.h;)yield o.l,o=o.B}).bind(this)()}},s=r;e.default=s}),Vc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=a(mi()),t=bs();function a(s){return s&&s.t?s:{default:s}}var c=class Na extends t.RandomIterator{constructor(o,l,f){super(o,f),this.container=l}copy(){return new Na(this.o,this.container,this.iteratorType)}},n=class extends i.default{constructor(s=[],o=4096){super(),this.j=0,this.D=0,this.R=0,this.N=0,this.P=0,this.A=[];let l=(()=>{if(typeof s.length=="number")return s.length;if(typeof s.size=="number")return s.size;if(typeof s.size=="function")return s.size();throw new TypeError("Cannot get the length or size of the container")})();this.F=o,this.P=Math.max(Math.ceil(l/this.F),1);for(let g=0;g<this.P;++g)this.A.push(new Array(this.F));let f=Math.ceil(l/this.F);this.j=this.R=(this.P>>1)-(f>>1),this.D=this.N=this.F-l%this.F>>1;let p=this;s.forEach(function(g){p.pushBack(g)})}T(){let s=[],o=Math.max(this.P>>1,1);for(let l=0;l<o;++l)s[l]=new Array(this.F);for(let l=this.j;l<this.P;++l)s[s.length]=this.A[l];for(let l=0;l<this.R;++l)s[s.length]=this.A[l];s[s.length]=[...this.A[this.R]],this.j=o,this.R=s.length-1;for(let l=0;l<o;++l)s[s.length]=new Array(this.F);this.A=s,this.P=s.length}O(s){let o=this.D+s+1,l=o%this.F,f=l-1,p=this.j+(o-l)/this.F;return l===0&&(p-=1),p%=this.P,f<0&&(f+=this.F),{curNodeBucketIndex:p,curNodePointerIndex:f}}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 c(0,this)}end(){return new c(this.i,this)}rBegin(){return new c(this.i-1,this,1)}rEnd(){return new c(-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(s){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]=s,this.i}popBack(){if(this.i===0)return;let s=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,s}pushFront(s){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]=s,this.i}popFront(){if(this.i===0)return;let s=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,s}getElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;let{curNodeBucketIndex:o,curNodePointerIndex:l}=this.O(s);return this.A[o][l]}setElementByPos(s,o){if(s<0||s>this.i-1)throw new RangeError;let{curNodeBucketIndex:l,curNodePointerIndex:f}=this.O(s);this.A[l][f]=o}insert(s,o,l=1){if(s<0||s>this.i)throw new RangeError;if(s===0)for(;l--;)this.pushFront(o);else if(s===this.i)for(;l--;)this.pushBack(o);else{let f=[];for(let p=s;p<this.i;++p)f.push(this.getElementByPos(p));this.cut(s-1);for(let p=0;p<l;++p)this.pushBack(o);for(let p=0;p<f.length;++p)this.pushBack(f[p])}return this.i}cut(s){if(s<0)return this.clear(),0;let{curNodeBucketIndex:o,curNodePointerIndex:l}=this.O(s);return this.R=o,this.N=l,this.i=s+1,this.i}eraseElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;if(s===0)this.popFront();else if(s===this.i-1)this.popBack();else{let o=[];for(let f=s+1;f<this.i;++f)o.push(this.getElementByPos(f));this.cut(s),this.popBack();let l=this;o.forEach(function(f){l.pushBack(f)})}return this.i}eraseElementByValue(s){if(this.i===0)return 0;let o=[];for(let f=0;f<this.i;++f){let p=this.getElementByPos(f);p!==s&&o.push(p)}let l=o.length;for(let f=0;f<l;++f)this.setElementByPos(f,o[f]);return this.cut(l-1)}eraseElementByIterator(s){let o=s.o;return this.eraseElementByPos(o),s=s.next(),s}find(s){for(let o=0;o<this.i;++o)if(this.getElementByPos(o)===s)return new c(o,this);return this.end()}reverse(){let s=0,o=this.i-1;for(;s<o;){let l=this.getElementByPos(s);this.setElementByPos(s,this.getElementByPos(o)),this.setElementByPos(o,l),s+=1,o-=1}}unique(){if(this.i<=1)return this.i;let s=1,o=this.getElementByPos(0);for(let l=1;l<this.i;++l){let f=this.getElementByPos(l);f!==o&&(o=f,this.setElementByPos(s++,f))}for(;this.i>s;)this.popBack();return this.i}sort(s){let o=[];for(let l=0;l<this.i;++l)o.push(this.getElementByPos(l));o.sort(s);for(let l=0;l<this.i;++l)this.setElementByPos(l,o[l])}shrinkToFit(){if(this.i===0)return;let s=[];this.forEach(function(o){s.push(o)}),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 o=0;o<this.P;++o)this.A.push(new Array(this.F));for(let o=0;o<s.length;++o)this.pushBack(s[o])}forEach(s){for(let o=0;o<this.i;++o)s(this.getElementByPos(o),o,this)}[Symbol.iterator](){return(function*(){for(let s=0;s<this.i;++s)yield this.getElementByPos(s)}).bind(this)()}},r=n;e.default=r}),Kc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.TreeNodeEnableIndex=e.TreeNode=void 0;var i=class{constructor(a,c){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=c}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 c=a.tt;for(;c.U===a;)a=c,c=a.tt;a=c}return a}B(){let a=this;if(a.W){for(a=a.W;a.U;)a=a.U;return a}else{let c=a.tt;for(;c.W===a;)a=c,c=a.tt;return a.W!==c?c:a}}te(){let a=this.tt,c=this.W,n=c.U;return a.tt===this?a.tt=c:a.U===this?a.U=c:a.W=c,c.tt=a,c.U=this,this.tt=c,this.W=n,n&&(n.tt=this),c}se(){let a=this.tt,c=this.U,n=c.W;return a.tt===this?a.tt=c:a.U===this?a.U=c:a.W=c,c.tt=a,c.W=this,this.tt=c,this.U=n,n&&(n.tt=this),c}};e.TreeNode=i;var t=class extends i{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)}};e.TreeNodeEnableIndex=t}),ys=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=Kc(),t=St(),a=Ct(),c=class extends t.Container{constructor(r=function(o,l){return o<l?-1:o>l?1:0},s=!1){super(),this.Y=void 0,this.v=r,s?(this.re=i.TreeNodeEnableIndex,this.M=function(o,l,f){let p=this.ne(o,l,f);if(p){let g=p.tt;for(;g!==this.h;)g.rt+=1,g=g.tt;let m=this.he(p);if(m){let{parentNode:A,grandParent:b,curNode:C}=m;A.ie(),b.ie(),C.ie()}}return this.i},this.V=function(o){let l=this.fe(o);for(;l!==this.h;)l.rt-=1,l=l.tt}):(this.re=i.TreeNode,this.M=function(o,l,f){let p=this.ne(o,l,f);return p&&this.he(p),this.i},this.V=this.fe),this.h=new this.re}X(r,s){let o=this.h;for(;r;){let l=this.v(r.u,s);if(l<0)r=r.W;else if(l>0)o=r,r=r.U;else return r}return o}Z(r,s){let o=this.h;for(;r;)this.v(r.u,s)<=0?r=r.W:(o=r,r=r.U);return o}$(r,s){let o=this.h;for(;r;){let l=this.v(r.u,s);if(l<0)o=r,r=r.W;else if(l>0)r=r.U;else return r}return o}rr(r,s){let o=this.h;for(;r;)this.v(r.u,s)<0?(o=r,r=r.W):r=r.U;return o}ue(r){for(;;){let s=r.tt;if(s===this.h)return;if(r.ee===1){r.ee=0;return}if(r===s.U){let o=s.W;if(o.ee===1)o.ee=0,s.ee=1,s===this.Y?this.Y=s.te():s.te();else if(o.W&&o.W.ee===1){o.ee=s.ee,s.ee=0,o.W.ee=0,s===this.Y?this.Y=s.te():s.te();return}else o.U&&o.U.ee===1?(o.ee=1,o.U.ee=0,o.se()):(o.ee=1,r=s)}else{let o=s.U;if(o.ee===1)o.ee=0,s.ee=1,s===this.Y?this.Y=s.se():s.se();else if(o.U&&o.U.ee===1){o.ee=s.ee,s.ee=0,o.U.ee=0,s===this.Y?this.Y=s.se():s.se();return}else o.W&&o.W.ee===1?(o.ee=1,o.W.ee=0,o.te()):(o.ee=1,r=s)}}}fe(r){if(this.i===1)return this.clear(),this.h;let s=r;for(;s.U||s.W;){if(s.W)for(s=s.W;s.U;)s=s.U;else s=s.U;[r.u,s.u]=[s.u,r.u],[r.l,s.l]=[s.l,r.l],r=s}this.h.U===s?this.h.U=s.tt:this.h.W===s&&(this.h.W=s.tt),this.ue(s);let o=s.tt;return s===o.U?o.U=void 0:o.W=void 0,this.i-=1,this.Y.ee=0,o}oe(r,s){return r===void 0?!1:this.oe(r.U,s)||s(r)?!0:this.oe(r.W,s)}he(r){for(;;){let s=r.tt;if(s.ee===0)return;let o=s.tt;if(s===o.U){let l=o.W;if(l&&l.ee===1){if(l.ee=s.ee=0,o===this.Y)return;o.ee=1,r=o;continue}else if(r===s.W){if(r.ee=0,r.U&&(r.U.tt=s),r.W&&(r.W.tt=o),s.W=r.U,o.U=r.W,r.U=s,r.W=o,o===this.Y)this.Y=r,this.h.tt=r;else{let f=o.tt;f.U===o?f.U=r:f.W=r}return r.tt=o.tt,s.tt=r,o.tt=r,o.ee=1,{parentNode:s,grandParent:o,curNode:r}}else s.ee=0,o===this.Y?this.Y=o.se():o.se(),o.ee=1}else{let l=o.U;if(l&&l.ee===1){if(l.ee=s.ee=0,o===this.Y)return;o.ee=1,r=o;continue}else if(r===s.U){if(r.ee=0,r.U&&(r.U.tt=o),r.W&&(r.W.tt=s),o.W=r.U,s.U=r.W,r.U=o,r.W=s,o===this.Y)this.Y=r,this.h.tt=r;else{let f=o.tt;f.U===o?f.U=r:f.W=r}return r.tt=o.tt,s.tt=r,o.tt=r,o.ee=1,{parentNode:s,grandParent:o,curNode:r}}else s.ee=0,o===this.Y?this.Y=o.te():o.te(),o.ee=1}return}}ne(r,s,o){if(this.Y===void 0){this.i+=1,this.Y=new this.re(r,s),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 l,f=this.h.U,p=this.v(f.u,r);if(p===0){f.l=s;return}else if(p>0)f.U=new this.re(r,s),f.U.tt=f,l=f.U,this.h.U=l;else{let g=this.h.W,m=this.v(g.u,r);if(m===0){g.l=s;return}else if(m<0)g.W=new this.re(r,s),g.W.tt=g,l=g.W,this.h.W=l;else{if(o!==void 0){let A=o.o;if(A!==this.h){let b=this.v(A.u,r);if(b===0){A.l=s;return}else if(b>0){let C=A.L(),U=this.v(C.u,r);if(U===0){C.l=s;return}else U<0&&(l=new this.re(r,s),C.W===void 0?(C.W=l,l.tt=C):(A.U=l,l.tt=A))}}}if(l===void 0)for(l=this.Y;;){let A=this.v(l.u,r);if(A>0){if(l.U===void 0){l.U=new this.re(r,s),l.U.tt=l,l=l.U;break}l=l.U}else if(A<0){if(l.W===void 0){l.W=new this.re(r,s),l.W.tt=l,l=l.W;break}l=l.W}else{l.l=s;return}}}}return this.i+=1,l}I(r,s){for(;r;){let o=this.v(r.u,s);if(o<0)r=r.W;else if(o>0)r=r.U;else return r}return r||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0}updateKeyByIterator(r,s){let o=r.o;if(o===this.h&&(0,a.throwIteratorAccessError)(),this.i===1)return o.u=s,!0;if(o===this.h.U)return this.v(o.B().u,s)>0?(o.u=s,!0):!1;if(o===this.h.W)return this.v(o.L().u,s)<0?(o.u=s,!0):!1;let l=o.L().u;if(this.v(l,s)>=0)return!1;let f=o.B().u;return this.v(f,s)<=0?!1:(o.u=s,!0)}eraseElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let s=0,o=this;return this.oe(this.Y,function(l){return r===s?(o.V(l),!0):(s+=1,!1)}),this.i}eraseElementByKey(r){if(this.i===0)return!1;let s=this.I(this.Y,r);return s===this.h?!1:(this.V(s),!0)}eraseElementByIterator(r){let s=r.o;s===this.h&&(0,a.throwIteratorAccessError)();let o=s.W===void 0;return r.iteratorType===0?o&&r.next():(!o||s.U===void 0)&&r.next(),this.V(s),r}forEach(r){let s=0;for(let o of this)r(o,s++,this)}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let s,o=0;for(let l of this){if(o===r){s=l;break}o+=1}return s}getHeight(){if(this.i===0)return 0;let r=function(s){return s?Math.max(r(s.U),r(s.W))+1:0};return r(this.Y)}},n=c;e.default=n}),ws=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=St(),t=Ct(),a=class extends i.ContainerIterator{constructor(n,r,s){super(s),this.o=n,this.h=r,this.iteratorType===0?(this.pre=function(){return this.o===this.h.U&&(0,t.throwIteratorAccessError)(),this.o=this.o.L(),this},this.next=function(){return this.o===this.h&&(0,t.throwIteratorAccessError)(),this.o=this.o.B(),this}):(this.pre=function(){return this.o===this.h.W&&(0,t.throwIteratorAccessError)(),this.o=this.o.B(),this},this.next=function(){return this.o===this.h&&(0,t.throwIteratorAccessError)(),this.o=this.o.L(),this})}get index(){let n=this.o,r=this.h.tt;if(n===this.h)return r?r.rt-1:0;let s=0;for(n.U&&(s+=n.U.rt);n!==r;){let o=n.tt;n===o.W&&(s+=1,o.U&&(s+=o.U.rt)),n=o}return s}},c=a;e.default=c}),Wc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=c(ys()),t=c(ws()),a=Ct();function c(o){return o&&o.t?o:{default:o}}var n=class Fa extends t.default{constructor(l,f,p,g){super(l,f,g),this.container=p}get pointer(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o.u}copy(){return new Fa(this.o,this.h,this.container,this.iteratorType)}},r=class extends i.default{constructor(o=[],l,f){super(l,f);let p=this;o.forEach(function(g){p.insert(g)})}*K(o){o!==void 0&&(yield*this.K(o.U),yield o.u,yield*this.K(o.W))}begin(){return new n(this.h.U||this.h,this.h,this)}end(){return new n(this.h,this.h,this)}rBegin(){return new n(this.h.W||this.h,this.h,this,1)}rEnd(){return new n(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(o,l){return this.M(o,void 0,l)}find(o){let l=this.I(this.Y,o);return new n(l,this.h,this)}lowerBound(o){let l=this.X(this.Y,o);return new n(l,this.h,this)}upperBound(o){let l=this.Z(this.Y,o);return new n(l,this.h,this)}reverseLowerBound(o){let l=this.$(this.Y,o);return new n(l,this.h,this)}reverseUpperBound(o){let l=this.rr(this.Y,o);return new n(l,this.h,this)}union(o){let l=this;return o.forEach(function(f){l.insert(f)}),this.i}[Symbol.iterator](){return this.K(this.Y)}},s=r;e.default=s}),Qc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=c(ys()),t=c(ws()),a=Ct();function c(o){return o&&o.t?o:{default:o}}var n=class ja extends t.default{constructor(l,f,p,g){super(l,f,g),this.container=p}get pointer(){this.o===this.h&&(0,a.throwIteratorAccessError)();let l=this;return new Proxy([],{get(f,p){if(p==="0")return l.o.u;if(p==="1")return l.o.l},set(f,p,g){if(p!=="1")throw new TypeError("props must be 1");return l.o.l=g,!0}})}copy(){return new ja(this.o,this.h,this.container,this.iteratorType)}},r=class extends i.default{constructor(o=[],l,f){super(l,f);let p=this;o.forEach(function(g){p.setElement(g[0],g[1])})}*K(o){o!==void 0&&(yield*this.K(o.U),yield[o.u,o.l],yield*this.K(o.W))}begin(){return new n(this.h.U||this.h,this.h,this)}end(){return new n(this.h,this.h,this)}rBegin(){return new n(this.h.W||this.h,this.h,this,1)}rEnd(){return new n(this.h,this.h,this,1)}front(){if(this.i===0)return;let o=this.h.U;return[o.u,o.l]}back(){if(this.i===0)return;let o=this.h.W;return[o.u,o.l]}lowerBound(o){let l=this.X(this.Y,o);return new n(l,this.h,this)}upperBound(o){let l=this.Z(this.Y,o);return new n(l,this.h,this)}reverseLowerBound(o){let l=this.$(this.Y,o);return new n(l,this.h,this)}reverseUpperBound(o){let l=this.rr(this.Y,o);return new n(l,this.h,this)}setElement(o,l,f){return this.M(o,l,f)}find(o){let l=this.I(this.Y,o);return new n(l,this.h,this)}getElementByKey(o){return this.I(this.Y,o).l}union(o){let l=this;return o.forEach(function(f){l.setElement(f[0],f[1])}),this.i}[Symbol.iterator](){return this.K(this.Y)}},s=r;e.default=s}),vs=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=i;function i(t){let a=typeof t;return a==="object"&&t!==null||a==="function"}}),_s=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.HashContainerIterator=e.HashContainer=void 0;var i=St(),t=c(vs()),a=Ct();function c(s){return s&&s.t?s:{default:s}}var n=class extends i.ContainerIterator{constructor(s,o,l){super(l),this.o=s,this.h=o,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})}};e.HashContainerIterator=n;var r=class extends i.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(s){let{L:o,B:l}=s;o.B=l,l.L=o,s===this.p&&(this.p=l),s===this._&&(this._=o),this.i-=1}M(s,o,l){l===void 0&&(l=(0,t.default)(s));let f;if(l){let p=s[this.HASH_TAG];if(p!==void 0)return this.H[p].l=o,this.i;Object.defineProperty(s,this.HASH_TAG,{value:this.H.length,configurable:!0}),f={u:s,l:o,L:this._,B:this.h},this.H.push(f)}else{let p=this.g[s];if(p)return p.l=o,this.i;f={u:s,l:o,L:this._,B:this.h},this.g[s]=f}return this.i===0?(this.p=f,this.h.B=f):this._.B=f,this._=f,this.h.L=f,++this.i}I(s,o){if(o===void 0&&(o=(0,t.default)(s)),o){let l=s[this.HASH_TAG];return l===void 0?this.h:this.H[l]}else return this.g[s]||this.h}clear(){let s=this.HASH_TAG;this.H.forEach(function(o){delete o.u[s]}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h}eraseElementByKey(s,o){let l;if(o===void 0&&(o=(0,t.default)(s)),o){let f=s[this.HASH_TAG];if(f===void 0)return!1;delete s[this.HASH_TAG],l=this.H[f],delete this.H[f]}else{if(l=this.g[s],l===void 0)return!1;delete this.g[s]}return this.V(l),!0}eraseElementByIterator(s){let o=s.o;return o===this.h&&(0,a.throwIteratorAccessError)(),this.V(o),s.next()}eraseElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;let o=this.p;for(;s--;)o=o.B;return this.V(o),this.i}};e.HashContainer=r}),Hc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=_s(),t=Ct(),a=class Va extends i.HashContainerIterator{constructor(s,o,l,f){super(s,o,f),this.container=l}get pointer(){return this.o===this.h&&(0,t.throwIteratorAccessError)(),this.o.u}copy(){return new Va(this.o,this.h,this.container,this.iteratorType)}},c=class extends i.HashContainer{constructor(r=[]){super();let s=this;r.forEach(function(o){s.insert(o)})}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(r,s){return this.M(r,void 0,s)}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let s=this.p;for(;r--;)s=s.B;return s.u}find(r,s){let o=this.I(r,s);return new a(o,this.h,this)}forEach(r){let s=0,o=this.p;for(;o!==this.h;)r(o.u,s++,this),o=o.B}[Symbol.iterator](){return(function*(){let r=this.p;for(;r!==this.h;)yield r.u,r=r.B}).bind(this)()}},n=c;e.default=n}),qc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=_s(),t=c(vs()),a=Ct();function c(o){return o&&o.t?o:{default:o}}var n=class Ka extends i.HashContainerIterator{constructor(l,f,p,g){super(l,f,g),this.container=p}get pointer(){this.o===this.h&&(0,a.throwIteratorAccessError)();let l=this;return new Proxy([],{get(f,p){if(p==="0")return l.o.u;if(p==="1")return l.o.l},set(f,p,g){if(p!=="1")throw new TypeError("props must be 1");return l.o.l=g,!0}})}copy(){return new Ka(this.o,this.h,this.container,this.iteratorType)}},r=class extends i.HashContainer{constructor(o=[]){super();let l=this;o.forEach(function(f){l.setElement(f[0],f[1])})}begin(){return new n(this.p,this.h,this)}end(){return new n(this.h,this.h,this)}rBegin(){return new n(this._,this.h,this,1)}rEnd(){return new n(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(o,l,f){return this.M(o,l,f)}getElementByKey(o,l){if(l===void 0&&(l=(0,t.default)(o)),l){let p=o[this.HASH_TAG];return p!==void 0?this.H[p].l:void 0}let f=this.g[o];return f?f.l:void 0}getElementByPos(o){if(o<0||o>this.i-1)throw new RangeError;let l=this.p;for(;o--;)l=l.B;return[l.u,l.l]}find(o,l){let f=this.I(o,l);return new n(f,this.h,this)}forEach(o){let l=0,f=this.p;for(;f!==this.h;)o([f.u,f.l],l++,this),f=f.B}[Symbol.iterator](){return(function*(){let o=this.p;for(;o!==this.h;)yield[o.u,o.l],o=o.B}).bind(this)()}},s=r;e.default=s}),$c=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"t",{value:!0}),Object.defineProperty(e,"Deque",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"HashMap",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"HashSet",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"LinkList",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"OrderedMap",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"OrderedSet",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"PriorityQueue",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Queue",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"Stack",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"Vector",{enumerable:!0,get:function(){return c.default}});var i=p(Dc()),t=p(Lc()),a=p(Nc()),c=p(Fc()),n=p(jc()),r=p(Vc()),s=p(Wc()),o=p(Qc()),l=p(Hc()),f=p(qc());function p(g){return g&&g.t?g:{default:g}}}),zc=Ae((e,i)=>{ae(),ce(),le();var t=$c().OrderedSet,a=Et()("number-allocator:trace"),c=Et()("number-allocator:error");function n(s,o){this.low=s,this.high=o}n.prototype.equals=function(s){return this.low===s.low&&this.high===s.high},n.prototype.compare=function(s){return this.low<s.low&&this.high<s.low?-1:s.low<this.low&&s.high<this.low?1:0};function r(s,o){if(!(this instanceof r))return new r(s,o);this.min=s,this.max=o,this.ss=new t([],(l,f)=>l.compare(f)),a("Create"),this.clear()}r.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},r.prototype.alloc=function(){if(this.ss.size()===0)return a("alloc():empty"),null;let s=this.ss.begin(),o=s.pointer.low,l=s.pointer.high,f=o;return f+1<=l?this.ss.updateKeyByIterator(s,new n(o+1,l)):this.ss.eraseElementByPos(0),a("alloc():"+f),f},r.prototype.use=function(s){let o=new n(s,s),l=this.ss.lowerBound(o);if(!l.equals(this.ss.end())){let f=l.pointer.low,p=l.pointer.high;return l.pointer.equals(o)?(this.ss.eraseElementByIterator(l),a("use():"+s),!0):f>s?!1:f===s?(this.ss.updateKeyByIterator(l,new n(f+1,p)),a("use():"+s),!0):p===s?(this.ss.updateKeyByIterator(l,new n(f,p-1)),a("use():"+s),!0):(this.ss.updateKeyByIterator(l,new n(s+1,p)),this.ss.insert(new n(f,s-1)),a("use():"+s),!0)}return a("use():failed"),!1},r.prototype.free=function(s){if(s<this.min||s>this.max){c("free():"+s+" is out of range");return}let o=new n(s,s),l=this.ss.upperBound(o);if(l.equals(this.ss.end())){if(l.equals(this.ss.begin())){this.ss.insert(o);return}l.pre();let f=l.pointer.high;l.pointer.high+1===s?this.ss.updateKeyByIterator(l,new n(f,s)):this.ss.insert(o)}else if(l.equals(this.ss.begin()))if(s+1===l.pointer.low){let f=l.pointer.high;this.ss.updateKeyByIterator(l,new n(s,f))}else this.ss.insert(o);else{let f=l.pointer.low,p=l.pointer.high;l.pre();let g=l.pointer.low;l.pointer.high+1===s?s+1===f?(this.ss.eraseElementByIterator(l),this.ss.updateKeyByIterator(l,new n(g,p))):this.ss.updateKeyByIterator(l,new n(g,s)):s+1===f?(this.ss.eraseElementByIterator(l.next()),this.ss.insert(new n(s,p))):this.ss.insert(o)}a("free():"+s)},r.prototype.clear=function(){a("clear()"),this.ss.clear(),this.ss.insert(new n(this.min,this.max))},r.prototype.intervalCount=function(){return this.ss.size()},r.prototype.dump=function(){console.log("length:"+this.ss.size());for(let s of this.ss)console.log(s)},i.exports=r}),Es=Ae((e,i)=>{ae(),ce(),le();var t=zc();i.exports.NumberAllocator=t}),Yc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=Uc(),t=Es(),a=class{constructor(c){c>0&&(this.aliasToTopic=new i.LRUCache({max:c}),this.topicToAlias={},this.numberAllocator=new t.NumberAllocator(1,c),this.max=c,this.length=0)}put(c,n){if(n===0||n>this.max)return!1;let r=this.aliasToTopic.get(n);return r&&delete this.topicToAlias[r],this.aliasToTopic.set(n,c),this.topicToAlias[c]=n,this.numberAllocator.use(n),this.length=this.aliasToTopic.size,!0}getTopicByAlias(c){return this.aliasToTopic.get(c)}getAliasByTopic(c){let n=this.topicToAlias[c];return typeof n<"u"&&this.aliasToTopic.get(n),n}clear(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0}getLruAlias(){return this.numberAllocator.firstVacant()||[...this.aliasToTopic.keys()][this.aliasToTopic.size-1]}};e.default=a}),Gc=Ae(e=>{ae(),ce(),le();var i=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0});var t=Cr(),a=i(Yc()),c=rr(),n=(r,s)=>{r.log("_handleConnack");let{options:o}=r,l=o.protocolVersion===5?s.reasonCode:s.returnCode;if(clearTimeout(r.connackTimer),delete r.topicAliasSend,s.properties){if(s.properties.topicAliasMaximum){if(s.properties.topicAliasMaximum>65535){r.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}s.properties.topicAliasMaximum>0&&(r.topicAliasSend=new a.default(s.properties.topicAliasMaximum))}s.properties.serverKeepAlive&&o.keepalive&&(o.keepalive=s.properties.serverKeepAlive),s.properties.maximumPacketSize&&(o.properties||(o.properties={}),o.properties.maximumPacketSize=s.properties.maximumPacketSize)}if(l===0)r.reconnecting=!1,r._onConnect(s);else if(l>0){let f=new c.ErrorWithReasonCode(`Connection refused: ${t.ReasonCodes[l]}`,l);r.emit("error",f)}};e.default=n}),Jc=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=(t,a,c)=>{t.log("handling pubrel packet");let n=typeof c<"u"?c:t.noop,{messageId:r}=a,s={cmd:"pubcomp",messageId:r};t.incomingStore.get(a,(o,l)=>{o?t._sendPacket(s,n):(t.emit("message",l.topic,l.payload,l),t.handleMessage(l,f=>{if(f)return n(f);t.incomingStore.del(l,t.noop),t._sendPacket(s,n)}))})};e.default=i}),Zc=Ae(e=>{ae(),ce(),le();var i=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0});var t=i(xc()),a=i(Mc()),c=i(Gc()),n=i(Cr()),r=i(Jc()),s=(o,l,f)=>{let{options:p}=o;if(p.protocolVersion===5&&p.properties&&p.properties.maximumPacketSize&&p.properties.maximumPacketSize<l.length)return o.emit("error",new Error(`exceeding packets size ${l.cmd}`)),o.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),o;switch(o.log("_handlePacket :: emitting packetreceive"),o.emit("packetreceive",l),l.cmd){case"publish":(0,t.default)(o,l,f);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":o.reschedulePing(),(0,n.default)(o,l),f();break;case"pubrel":o.reschedulePing(),(0,r.default)(o,l,f);break;case"connack":(0,c.default)(o,l),f();break;case"auth":o.reschedulePing(),(0,a.default)(o,l),f();break;case"pingresp":o.log("_handlePacket :: received pingresp"),o.reschedulePing(!0),f();break;case"disconnect":o.emit("disconnect",l),f();break;default:o.log("_handlePacket :: unknown command"),f();break}};e.default=s}),Xc=Ae(e=>{ae(),ce(),le();var i=e&&e.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(e,"__esModule",{value:!0}),e.TypedEventEmitter=void 0;var t=i((er(),Ue(Ft))),a=rr(),c=class{};e.TypedEventEmitter=c,(0,a.applyMixin)(c,t.default)}),Ir=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0}),e.isReactNativeBrowser=e.isWebWorker=void 0;var i=()=>{var n;return typeof window<"u"?typeof navigator<"u"&&((n=navigator.userAgent)===null||n===void 0?void 0:n.toLowerCase().indexOf(" electron/"))>-1&&xe!=null&&xe.versions?!Object.prototype.hasOwnProperty.call(xe.versions,"electron"):typeof window.document<"u":!1},t=()=>{var n,r;return!!(typeof self=="object"&&!((r=(n=self==null?void 0:self.constructor)===null||n===void 0?void 0:n.name)===null||r===void 0)&&r.includes("WorkerGlobalScope"))},a=()=>typeof navigator<"u"&&navigator.product==="ReactNative",c=i()||t()||a();e.isWebWorker=t(),e.isReactNativeBrowser=a(),e.default=c}),eh=Ae((e,i)=>{ae(),ce(),le(),function(t,a){typeof e=="object"&&typeof i<"u"?a(e):typeof define=="function"&&define.amd?define(["exports"],a):(t=typeof globalThis<"u"?globalThis:t||self,a(t.fastUniqueNumbers={}))}(e,function(t){var a=function(m){return function(A){var b=m(A);return A.add(b),b}},c=function(m){return function(A,b){return m.set(A,b),b}},n=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,r=536870912,s=r*2,o=function(m,A){return function(b){var C=A.get(b),U=C===void 0?b.size:C<s?C+1:0;if(!b.has(U))return m(b,U);if(b.size<r){for(;b.has(U);)U=Math.floor(Math.random()*s);return m(b,U)}if(b.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;b.has(U);)U=Math.floor(Math.random()*n);return m(b,U)}},l=new WeakMap,f=c(l),p=o(f,l),g=a(p);t.addUniqueNumber=g,t.generateUniqueNumber=p})}),th=Ae((e,i)=>{ae(),ce(),le(),function(t,a){typeof e=="object"&&typeof i<"u"?a(e,eh()):typeof define=="function"&&define.amd?define(["exports","fast-unique-numbers"],a):(t=typeof globalThis<"u"?globalThis:t||self,a(t.workerTimersBroker={},t.fastUniqueNumbers))}(e,function(t,a){var c=function(s){return s.method!==void 0&&s.method==="call"},n=function(s){return s.error===null&&typeof s.id=="number"},r=function(s){var o=new Map([[0,function(){}]]),l=new Map([[0,function(){}]]),f=new Map,p=new Worker(s);p.addEventListener("message",function(C){var U=C.data;if(c(U)){var I=U.params,v=I.timerId,L=I.timerType;if(L==="interval"){var F=o.get(v);if(typeof F=="number"){var B=f.get(F);if(B===void 0||B.timerId!==v||B.timerType!==L)throw new Error("The timer is in an undefined state.")}else if(typeof F<"u")F();else throw new Error("The timer is in an undefined state.")}else if(L==="timeout"){var k=l.get(v);if(typeof k=="number"){var M=f.get(k);if(M===void 0||M.timerId!==v||M.timerType!==L)throw new Error("The timer is in an undefined state.")}else if(typeof k<"u")k(),l.delete(v);else throw new Error("The timer is in an undefined state.")}}else if(n(U)){var W=U.id,J=f.get(W);if(J===void 0)throw new Error("The timer is in an undefined state.");var ne=J.timerId,S=J.timerType;f.delete(W),S==="interval"?o.delete(ne):l.delete(ne)}else{var q=U.error.message;throw new Error(q)}});var g=function(C){var U=a.generateUniqueNumber(f);f.set(U,{timerId:C,timerType:"interval"}),o.set(C,U),p.postMessage({id:U,method:"clear",params:{timerId:C,timerType:"interval"}})},m=function(C){var U=a.generateUniqueNumber(f);f.set(U,{timerId:C,timerType:"timeout"}),l.set(C,U),p.postMessage({id:U,method:"clear",params:{timerId:C,timerType:"timeout"}})},A=function(C){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,I=a.generateUniqueNumber(o);return o.set(I,function(){C(),typeof o.get(I)=="function"&&p.postMessage({id:null,method:"set",params:{delay:U,now:performance.now(),timerId:I,timerType:"interval"}})}),p.postMessage({id:null,method:"set",params:{delay:U,now:performance.now(),timerId:I,timerType:"interval"}}),I},b=function(C){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,I=a.generateUniqueNumber(l);return l.set(I,C),p.postMessage({id:null,method:"set",params:{delay:U,now:performance.now(),timerId:I,timerType:"timeout"}}),I};return{clearInterval:g,clearTimeout:m,setInterval:A,setTimeout:b}};t.load=r})}),rh=Ae((e,i)=>{ae(),ce(),le(),function(t,a){typeof e=="object"&&typeof i<"u"?a(e,th()):typeof define=="function"&&define.amd?define(["exports","worker-timers-broker"],a):(t=typeof globalThis<"u"?globalThis:t||self,a(t.workerTimers={},t.workerTimersBroker))}(e,function(t,a){var c=function(p,g){var m=null;return function(){if(m!==null)return m;var A=new Blob([g],{type:"application/javascript; charset=utf-8"}),b=URL.createObjectURL(A);return m=p(b),setTimeout(function(){return URL.revokeObjectURL(b)}),m}},n=`(()=>{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)})()})();`,r=c(a.load,n),s=function(p){return r().clearInterval(p)},o=function(p){return r().clearTimeout(p)},l=function(){var p;return(p=r()).setInterval.apply(p,arguments)},f=function(){var p;return(p=r()).setTimeout.apply(p,arguments)};t.clearInterval=s,t.clearTimeout=o,t.setInterval=l,t.setTimeout=f})}),nh=Ae(e=>{ae(),ce(),le();var i=e&&e.__createBinding||(Object.create?function(l,f,p,g){g===void 0&&(g=p);var m=Object.getOwnPropertyDescriptor(f,p);(!m||("get"in m?!f.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return f[p]}}),Object.defineProperty(l,g,m)}:function(l,f,p,g){g===void 0&&(g=p),l[g]=f[p]}),t=e&&e.__setModuleDefault||(Object.create?function(l,f){Object.defineProperty(l,"default",{enumerable:!0,value:f})}:function(l,f){l.default=f}),a=e&&e.__importStar||function(l){if(l&&l.__esModule)return l;var f={};if(l!=null)for(var p in l)p!=="default"&&Object.prototype.hasOwnProperty.call(l,p)&&i(f,l,p);return t(f,l),f};Object.defineProperty(e,"__esModule",{value:!0});var c=a(Ir()),n=rh(),r={set:n.setInterval,clear:n.clearInterval},s={set:(l,f)=>setInterval(l,f),clear:l=>clearInterval(l)},o=l=>{switch(l){case"native":return s;case"worker":return r;case"auto":default:return c.default&&!c.isWebWorker&&!c.isReactNativeBrowser?r:s}};e.default=o}),Ss=Ae(e=>{ae(),ce(),le();var i=e&&e.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0});var t=i(nh()),a=class{get keepaliveTimeoutTimestamp(){return this._keepaliveTimeoutTimestamp}get intervalEvery(){return this._intervalEvery}get keepalive(){return this._keepalive}constructor(c,n){this.destroyed=!1,this.client=c,this.timer=typeof n=="object"&&"set"in n&&"clear"in n?n:(0,t.default)(n),this.setKeepalive(c.options.keepalive)}clear(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null)}setKeepalive(c){if(c*=1e3,isNaN(c)||c<=0||c>2147483647)throw new Error(`Keepalive value must be an integer between 0 and 2147483647. Provided value is ${c}`);this._keepalive=c,this.reschedule(),this.client.log(`KeepaliveManager: set keepalive to ${c}ms`)}destroy(){this.clear(),this.destroyed=!0}reschedule(){if(this.destroyed)return;this.clear(),this.counter=0;let c=Math.ceil(this._keepalive*1.5);this._keepaliveTimeoutTimestamp=Date.now()+c,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)}};e.default=a}),Ai=Ae(e=>{ae(),ce(),le();var i=e&&e.__createBinding||(Object.create?function(F,B,k,M){M===void 0&&(M=k);var W=Object.getOwnPropertyDescriptor(B,k);(!W||("get"in W?!B.__esModule:W.writable||W.configurable))&&(W={enumerable:!0,get:function(){return B[k]}}),Object.defineProperty(F,M,W)}:function(F,B,k,M){M===void 0&&(M=k),F[M]=B[k]}),t=e&&e.__setModuleDefault||(Object.create?function(F,B){Object.defineProperty(F,"default",{enumerable:!0,value:B})}:function(F,B){F.default=B}),a=e&&e.__importStar||function(F){if(F&&F.__esModule)return F;var B={};if(F!=null)for(var k in F)k!=="default"&&Object.prototype.hasOwnProperty.call(F,k)&&i(B,F,k);return t(B,F),B},c=e&&e.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};Object.defineProperty(e,"__esModule",{value:!0});var n=c(ql()),r=c(kc()),s=c(ms()),o=Qt(),l=c(Oc()),f=a(Pc()),p=c(Et()),g=c(As()),m=c(Zc()),A=rr(),b=Xc(),C=c(Ss()),U=a(Ir()),I=globalThis.setImmediate||((...F)=>{let B=F.shift();(0,A.nextTick)(()=>{B(...F)})}),v={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,writeCache:!0,timerVariant:"auto"},L=class Fi extends b.TypedEventEmitter{static defaultId(){return`mqttjs_${Math.random().toString(16).substr(2,8)}`}constructor(B,k){super(),this.options=k||{};for(let M in v)typeof this.options[M]>"u"?this.options[M]=v[M]:this.options[M]=k[M];this.log=this.options.log||(0,p.default)("mqttjs:client"),this.noop=this._noop.bind(this),this.log("MqttClient :: version:",Fi.VERSION),U.isWebWorker?this.log("MqttClient :: environment","webworker"):this.log("MqttClient :: environment",U.default?"browser":"node"),this.log("MqttClient :: options.protocol",k.protocol),this.log("MqttClient :: options.protocolVersion",k.protocolVersion),this.log("MqttClient :: options.username",k.username),this.log("MqttClient :: options.keepalive",k.keepalive),this.log("MqttClient :: options.reconnectPeriod",k.reconnectPeriod),this.log("MqttClient :: options.rejectUnauthorized",k.rejectUnauthorized),this.log("MqttClient :: options.properties.topicAliasMaximum",k.properties?k.properties.topicAliasMaximum:void 0),this.options.clientId=typeof k.clientId=="string"?k.clientId:Fi.defaultId(),this.log("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=k.protocolVersion===5&&k.customHandleAcks?k.customHandleAcks:(...M)=>{M[3](null,0)},this.options.writeCache||(r.default.writeToStream.cacheNumbers=!1),this.streamBuilder=B,this.messageIdProvider=typeof this.options.messageIdProvider>"u"?new s.default:this.options.messageIdProvider,this.outgoingStore=k.outgoingStore||new g.default,this.incomingStore=k.incomingStore||new g.default,this.queueQoSZero=k.queueQoSZero===void 0?!0:k.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,k.properties&&k.properties.topicAliasMaximum>0&&(k.properties.topicAliasMaximum>65535?this.log("MqttClient :: options.properties.topicAliasMaximum is out of range"):this.topicAliasRecv=new n.default(k.properties.topicAliasMaximum)),this.on("connect",()=>{let{queue:M}=this,W=()=>{let J=M.shift();this.log("deliver :: entry %o",J);let ne=null;if(!J){this._resubscribe();return}ne=J.packet,this.log("deliver :: call _sendPacket for %o",ne);let S=!0;ne.messageId&&ne.messageId!==0&&(this.messageIdProvider.register(ne.messageId)||(S=!1)),S?this._sendPacket(ne,q=>{J.cb&&J.cb(q),W()}):(this.log("messageId: %d has already used. The message is skipped and removed.",ne.messageId),W())};this.log("connect :: sending queued packets"),W()}),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(B,k){k()}handleMessage(B,k){k()}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){var B;let k=new o.Writable,M=r.default.parser(this.options),W=null,J=[];this.log("connect :: calling method to clear reconnect"),this._clearReconnect(),this.disconnected&&!this.reconnecting&&(this.incomingStore=this.options.incomingStore||new g.default,this.outgoingStore=this.options.outgoingStore||new g.default,this.disconnecting=!1,this.disconnected=!1),this.log("connect :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),M.on("packet",Y=>{this.log("parser :: on packet push to packets array."),J.push(Y)});let ne=()=>{this.log("work :: getting next packet in queue");let Y=J.shift();if(Y)this.log("work :: packet pulled from queue"),(0,m.default)(this,Y,S);else{this.log("work :: no packets in queue");let me=W;W=null,this.log("work :: done flag is %s",!!me),me&&me()}},S=()=>{if(J.length)(0,A.nextTick)(ne);else{let Y=W;W=null,Y()}};k._write=(Y,me,se)=>{W=se,this.log("writable stream :: parsing buffer"),M.parse(Y),ne()};let q=Y=>{this.log("streamErrorHandler :: error",Y.message),Y.code?(this.log("streamErrorHandler :: emitting error"),this.emit("error",Y)):this.noop(Y)};this.log("connect :: pipe stream to writable stream"),this.stream.pipe(k),this.stream.on("error",q),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 re={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&&(re.will=Object.assign(Object.assign({},this.options.will),{payload:(B=this.options.will)===null||B===void 0?void 0:B.payload})),this.topicAliasRecv&&(re.properties||(re.properties={}),this.topicAliasRecv&&(re.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(re),M.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 Y=Object.assign({cmd:"auth",reasonCode:0},this.options.authPacket);this._writePacket(Y)}}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(B,k,M,W){this.log("publish :: message `%s` to topic `%s`",k,B);let{options:J}=this;typeof M=="function"&&(W=M,M=null),M=M||{},M=Object.assign(Object.assign({},{qos:0,retain:!1,dup:!1}),M);let{qos:ne,retain:S,dup:q,properties:re,cbStorePut:Y}=M;if(this._checkDisconnecting(W))return this;let me=()=>{let se=0;if((ne===1||ne===2)&&(se=this._nextId(),se===null))return this.log("No messageId left"),!1;let H={cmd:"publish",topic:B,payload:k,qos:ne,retain:S,messageId:se,dup:q};switch(J.protocolVersion===5&&(H.properties=re),this.log("publish :: qos",ne),ne){case 1:case 2:this.outgoing[H.messageId]={volatile:!1,cb:W||this.noop},this.log("MqttClient:publish: packet cmd: %s",H.cmd),this._sendPacket(H,void 0,Y);break;default:this.log("MqttClient:publish: packet cmd: %s",H.cmd),this._sendPacket(H,W,Y);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!me())&&this._storeProcessingQueue.push({invoke:me,cbStorePut:M.cbStorePut,callback:W}),this}publishAsync(B,k,M){return new Promise((W,J)=>{this.publish(B,k,M,(ne,S)=>{ne?J(ne):W(S)})})}subscribe(B,k,M){let W=this.options.protocolVersion;typeof k=="function"&&(M=k),M=M||this.noop;let J=!1,ne=[];typeof B=="string"?(B=[B],ne=B):Array.isArray(B)?ne=B:typeof B=="object"&&(J=B.resubscribe,delete B.resubscribe,ne=Object.keys(B));let S=f.validateTopics(ne);if(S!==null)return I(M,new Error(`Invalid topic ${S}`)),this;if(this._checkDisconnecting(M))return this.log("subscribe: discconecting true"),this;let q={qos:0};W===5&&(q.nl=!1,q.rap=!1,q.rh=0),k=Object.assign(Object.assign({},q),k);let re=k.properties,Y=[],me=(H,be)=>{if(be=be||k,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,H)||this._resubscribeTopics[H].qos<be.qos||J){let oe={topic:H,qos:be.qos};W===5&&(oe.nl=be.nl,oe.rap=be.rap,oe.rh=be.rh,oe.properties=re),this.log("subscribe: pushing topic `%s` and qos `%s` to subs list",oe.topic,oe.qos),Y.push(oe)}};if(Array.isArray(B)?B.forEach(H=>{this.log("subscribe: array topic %s",H),me(H)}):Object.keys(B).forEach(H=>{this.log("subscribe: object topic %s, %o",H,B[H]),me(H,B[H])}),!Y.length)return M(null,[]),this;let se=()=>{let H=this._nextId();if(H===null)return this.log("No messageId left"),!1;let be={cmd:"subscribe",subscriptions:Y,messageId:H};if(re&&(be.properties=re),this.options.resubscribe){this.log("subscribe :: resubscribe true");let oe=[];Y.forEach(we=>{if(this.options.reconnectPeriod>0){let w={qos:we.qos};W===5&&(w.nl=we.nl||!1,w.rap=we.rap||!1,w.rh=we.rh||0,w.properties=we.properties),this._resubscribeTopics[we.topic]=w,oe.push(we.topic)}}),this.messageIdToTopic[be.messageId]=oe}return this.outgoing[be.messageId]={volatile:!0,cb(oe,we){if(!oe){let{granted:w}=we;for(let G=0;G<w.length;G+=1)Y[G].qos=w[G]}M(oe,Y,we)}},this.log("subscribe :: call _sendPacket"),this._sendPacket(be),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!se())&&this._storeProcessingQueue.push({invoke:se,callback:M}),this}subscribeAsync(B,k){return new Promise((M,W)=>{this.subscribe(B,k,(J,ne)=>{J?W(J):M(ne)})})}unsubscribe(B,k,M){typeof B=="string"&&(B=[B]),typeof k=="function"&&(M=k),M=M||this.noop;let W=f.validateTopics(B);if(W!==null)return I(M,new Error(`Invalid topic ${W}`)),this;if(this._checkDisconnecting(M))return this;let J=()=>{let ne=this._nextId();if(ne===null)return this.log("No messageId left"),!1;let S={cmd:"unsubscribe",messageId:ne,unsubscriptions:[]};return typeof B=="string"?S.unsubscriptions=[B]:Array.isArray(B)&&(S.unsubscriptions=B),this.options.resubscribe&&S.unsubscriptions.forEach(q=>{delete this._resubscribeTopics[q]}),typeof k=="object"&&k.properties&&(S.properties=k.properties),this.outgoing[S.messageId]={volatile:!0,cb:M},this.log("unsubscribe: call _sendPacket"),this._sendPacket(S),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!J())&&this._storeProcessingQueue.push({invoke:J,callback:M}),this}unsubscribeAsync(B,k){return new Promise((M,W)=>{this.unsubscribe(B,k,(J,ne)=>{J?W(J):M(ne)})})}end(B,k,M){this.log("end :: (%s)",this.options.clientId),(B==null||typeof B!="boolean")&&(M=M||k,k=B,B=!1),typeof k!="object"&&(M=M||k,k=null),this.log("end :: cb? %s",!!M),(!M||typeof M!="function")&&(M=this.noop);let W=()=>{this.log("end :: closeStores: closing incoming and outgoing stores"),this.disconnected=!0,this.incomingStore.close(ne=>{this.outgoingStore.close(S=>{if(this.log("end :: closeStores: emitting end"),this.emit("end"),M){let q=ne||S;this.log("end :: closeStores: invoking callback with args"),M(q)}})}),this._deferredReconnect?this._deferredReconnect():(this.options.reconnectPeriod===0||this.options.manualConnect)&&(this.disconnecting=!1)},J=()=>{this.log("end :: (%s) :: finish :: calling _cleanUp with force %s",this.options.clientId,B),this._cleanUp(B,()=>{this.log("end :: finish :: calling process.nextTick on closeStores"),(0,A.nextTick)(W)},k)};return this.disconnecting?(M(),this):(this._clearReconnect(),this.disconnecting=!0,!B&&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,J,10))):(this.log("end :: (%s) :: immediately calling finish",this.options.clientId),J()),this)}endAsync(B,k){return new Promise((M,W)=>{this.end(B,k,J=>{J?W(J):M()})})}removeOutgoingMessage(B){if(this.outgoing[B]){let{cb:k}=this.outgoing[B];this._removeOutgoingAndStoreMessage(B,()=>{k(new Error("Message removed"))})}return this}reconnect(B){this.log("client reconnect");let k=()=>{B?(this.options.incomingStore=B.incomingStore,this.options.outgoingStore=B.outgoingStore):(this.options.incomingStore=null,this.options.outgoingStore=null),this.incomingStore=this.options.incomingStore||new g.default,this.outgoingStore=this.options.outgoingStore||new g.default,this.disconnecting=!1,this.disconnected=!1,this._deferredReconnect=null,this._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=k:k(),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(B=>{this.outgoing[B].volatile&&typeof this.outgoing[B].cb=="function"&&(this.outgoing[B].cb(new Error("Connection closed")),delete this.outgoing[B])}))}_flush(){this.outgoing&&(this.log("_flush: queue exists? %b",!!this.outgoing),Object.keys(this.outgoing).forEach(B=>{typeof this.outgoing[B].cb=="function"&&(this.outgoing[B].cb(new Error("Connection closed")),delete this.outgoing[B])}))}_removeTopicAliasAndRecoverTopicName(B){let k;B.properties&&(k=B.properties.topicAlias);let M=B.topic.toString();if(this.log("_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o",k,M),M.length===0){if(typeof k>"u")return new Error("Unregistered Topic Alias");if(M=this.topicAliasSend.getTopicByAlias(k),typeof M>"u")return new Error("Unregistered Topic Alias");B.topic=M}k&&delete B.properties.topicAlias}_checkDisconnecting(B){return this.disconnecting&&(B&&B!==this.noop?B(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(B,k,M={}){if(k&&(this.log("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",k)),this.log("_cleanUp :: forced? %s",B),B)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let W=Object.assign({cmd:"disconnect"},M);this.log("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(W,()=>{this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),I(()=>{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(),k&&!this.connected&&(this.log("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",k),k())}_storeAndSend(B,k,M){this.log("storeAndSend :: store packet with cmd %s to outgoingStore",B.cmd);let W=B,J;if(W.cmd==="publish"&&(W=(0,l.default)(B),J=this._removeTopicAliasAndRecoverTopicName(W),J))return k&&k(J);this.outgoingStore.put(W,ne=>{if(ne)return k&&k(ne);M(),this._writePacket(B,k)})}_applyTopicAlias(B){if(this.options.protocolVersion===5&&B.cmd==="publish"){let k;B.properties&&(k=B.properties.topicAlias);let M=B.topic.toString();if(this.topicAliasSend)if(k){if(M.length!==0&&(this.log("applyTopicAlias :: register topic: %s - alias: %d",M,k),!this.topicAliasSend.put(M,k)))return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",M,k),new Error("Sending Topic Alias out of range")}else M.length!==0&&(this.options.autoAssignTopicAlias?(k=this.topicAliasSend.getAliasByTopic(M),k?(B.topic="",B.properties=Object.assign(Object.assign({},B.properties),{topicAlias:k}),this.log("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",M,k)):(k=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(M,k),B.properties=Object.assign(Object.assign({},B.properties),{topicAlias:k}),this.log("applyTopicAlias :: auto assign topic: %s - alias: %d",M,k))):this.options.autoUseTopicAlias&&(k=this.topicAliasSend.getAliasByTopic(M),k&&(B.topic="",B.properties=Object.assign(Object.assign({},B.properties),{topicAlias:k}),this.log("applyTopicAlias :: auto use topic: %s - alias: %d",M,k))));else if(k)return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",M,k),new Error("Sending Topic Alias out of range")}}_noop(B){this.log("noop ::",B)}_writePacket(B,k){this.log("_writePacket :: packet: %O",B),this.log("_writePacket :: emitting `packetsend`"),this.emit("packetsend",B),this.log("_writePacket :: writing to stream");let M=r.default.writeToStream(B,this.stream,this.options);this.log("_writePacket :: writeToStream result %s",M),!M&&k&&k!==this.noop?(this.log("_writePacket :: handle events on `drain` once through callback."),this.stream.once("drain",k)):k&&(this.log("_writePacket :: invoking cb"),k())}_sendPacket(B,k,M,W){this.log("_sendPacket :: (%s) :: start",this.options.clientId),M=M||this.noop,k=k||this.noop;let J=this._applyTopicAlias(B);if(J){k(J);return}if(!this.connected){if(B.cmd==="auth"){this._writePacket(B,k);return}this.log("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(B,k,M);return}if(W){this._writePacket(B,k);return}switch(B.cmd){case"publish":break;case"pubrel":this._storeAndSend(B,k,M);return;default:this._writePacket(B,k);return}switch(B.qos){case 2:case 1:this._storeAndSend(B,k,M);break;case 0:default:this._writePacket(B,k);break}this.log("_sendPacket :: (%s) :: end",this.options.clientId)}_storePacket(B,k,M){this.log("_storePacket :: packet: %o",B),this.log("_storePacket :: cb? %s",!!k),M=M||this.noop;let W=B;if(W.cmd==="publish"){W=(0,l.default)(B);let ne=this._removeTopicAliasAndRecoverTopicName(W);if(ne)return k&&k(ne)}let J=W.qos||0;J===0&&this.queueQoSZero||W.cmd!=="publish"?this.queue.push({packet:W,cb:k}):J>0?(k=this.outgoing[W.messageId]?this.outgoing[W.messageId].cb:null,this.outgoingStore.put(W,ne=>{if(ne)return k&&k(ne);M()})):k&&k(new Error("No connection to broker"))}_setupKeepaliveManager(){this.log("_setupKeepaliveManager :: keepalive %d (seconds)",this.options.keepalive),!this.keepaliveManager&&this.options.keepalive&&(this.keepaliveManager=new C.default(this,this.options.timerVariant))}_destroyKeepaliveManager(){this.keepaliveManager&&(this.log("_destroyKeepaliveManager :: destroying keepalive manager"),this.keepaliveManager.destroy(),this.keepaliveManager=null)}reschedulePing(B=!1){this.keepaliveManager&&this.options.keepalive&&(B||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 B=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&B.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log("_resubscribe: protocolVersion 5");for(let k=0;k<B.length;k++){let M={};M[B[k]]=this._resubscribeTopics[B[k]],M.resubscribe=!0,this.subscribe(M,{properties:M[B[k]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1}_onConnect(B){if(this.disconnected){this.emit("connect",B);return}this.connackPacket=B,this.messageIdProvider.clear(),this._setupKeepaliveManager(),this.connected=!0;let k=()=>{let M=this.outgoingStore.createStream(),W=()=>{M.destroy(),M=null,this._flushStoreProcessingQueue(),J()},J=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={}};this.once("close",W),M.on("error",S=>{J(),this._flushStoreProcessingQueue(),this.removeListener("close",W),this.emit("error",S)});let ne=()=>{if(!M)return;let S=M.read(1),q;if(!S){M.once("readable",ne);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[S.messageId]){ne();return}!this.disconnecting&&!this.reconnectTimer?(q=this.outgoing[S.messageId]?this.outgoing[S.messageId].cb:null,this.outgoing[S.messageId]={volatile:!1,cb(re,Y){q&&q(re,Y),ne()}},this._packetIdsDuringStoreProcessing[S.messageId]=!0,this.messageIdProvider.register(S.messageId)?this._sendPacket(S,void 0,void 0,!0):this.log("messageId: %d has already used.",S.messageId)):M.destroy&&M.destroy()};M.on("end",()=>{let S=!0;for(let q in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[q]){S=!1;break}this.removeListener("close",W),S?(J(),this._invokeAllStoreProcessingQueue(),this.emit("connect",B)):k()}),ne()};k()}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let B=this._storeProcessingQueue[0];if(B&&B.invoke())return this._storeProcessingQueue.shift(),!0}return!1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let B of this._storeProcessingQueue)B.cbStorePut&&B.cbStorePut(new Error("Connection closed")),B.callback&&B.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)}_removeOutgoingAndStoreMessage(B,k){delete this.outgoing[B],this.outgoingStore.del({messageId:B},(M,W)=>{k(M,W),this.messageIdProvider.deallocate(B),this._invokeStoreProcessingQueue()})}};L.VERSION=A.MQTTJS_VERSION,e.default=L}),ih=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=Es(),t=class{constructor(){this.numberAllocator=new i.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()}};e.default=t});function Ht(e){throw new RangeError(Os[e])}function Cs(e,i){let t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);let c=function(n,r){let s=[],o=n.length;for(;o--;)s[o]=r(n[o]);return s}((e=e.replace(Bs,".")).split("."),i).join(".");return a+c}function Is(e){let i=[],t=0,a=e.length;for(;t<a;){let c=e.charCodeAt(t++);if(c>=55296&&c<=56319&&t<a){let n=e.charCodeAt(t++);(64512&n)==56320?i.push(((1023&c)<<10)+(1023&n)+65536):(i.push(c),t--)}else i.push(c)}return i}var Ts,ks,Bs,Os,ct,Tr,bi,yi,wi,vi,Pt,oh=Ge(()=>{ae(),ce(),le(),Ts=/^xn--/,ks=/[^\0-\x7E]/,Bs=/[\x2E\u3002\uFF0E\uFF61]/g,Os={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ct=Math.floor,Tr=String.fromCharCode,bi=function(e,i){return e+22+75*(e<26)-((i!=0)<<5)},yi=function(e,i,t){let a=0;for(e=t?ct(e/700):e>>1,e+=ct(e/i);e>455;a+=36)e=ct(e/35);return ct(a+36*e/(e+38))},wi=function(e){let i=[],t=e.length,a=0,c=128,n=72,r=e.lastIndexOf("-");r<0&&(r=0);for(let o=0;o<r;++o)e.charCodeAt(o)>=128&&Ht("not-basic"),i.push(e.charCodeAt(o));for(let o=r>0?r+1:0;o<t;){let l=a;for(let p=1,g=36;;g+=36){o>=t&&Ht("invalid-input");let m=(s=e.charCodeAt(o++))-48<10?s-22:s-65<26?s-65:s-97<26?s-97:36;(m>=36||m>ct((2147483647-a)/p))&&Ht("overflow"),a+=m*p;let A=g<=n?1:g>=n+26?26:g-n;if(m<A)break;let b=36-A;p>ct(2147483647/b)&&Ht("overflow"),p*=b}let f=i.length+1;n=yi(a-l,f,l==0),ct(a/f)>2147483647-c&&Ht("overflow"),c+=ct(a/f),a%=f,i.splice(a++,0,c)}var s;return String.fromCodePoint(...i)},vi=function(e){let i=[],t=(e=Is(e)).length,a=128,c=0,n=72;for(let o of e)o<128&&i.push(Tr(o));let r=i.length,s=r;for(r&&i.push("-");s<t;){let o=2147483647;for(let f of e)f>=a&&f<o&&(o=f);let l=s+1;o-a>ct((2147483647-c)/l)&&Ht("overflow"),c+=(o-a)*l,a=o;for(let f of e)if(f<a&&++c>2147483647&&Ht("overflow"),f==a){let p=c;for(let g=36;;g+=36){let m=g<=n?1:g>=n+26?26:g-n;if(p<m)break;let A=p-m,b=36-m;i.push(Tr(bi(m+A%b,0))),p=ct(A/b)}i.push(Tr(bi(p,0))),n=yi(c,l,s==r),c=0,++s}++c,++a}return i.join("")},Pt={version:"2.1.0",ucs2:{decode:Is,encode:e=>String.fromCodePoint(...e)},decode:wi,encode:vi,toASCII:function(e){return Cs(e,function(i){return ks.test(i)?"xn--"+vi(i):i})},toUnicode:function(e){return Cs(e,function(i){return Ts.test(i)?wi(i.slice(4).toLowerCase()):i})}},Pt.decode,Pt.encode,Pt.toASCII,Pt.toUnicode,Pt.ucs2,Pt.version});function sh(e,i){return Object.prototype.hasOwnProperty.call(e,i)}var Ps,nr,xs,dt,ah=Ge(()=>{ae(),ce(),le(),Ps=function(e,i,t,a){i=i||"&",t=t||"=";var c={};if(typeof e!="string"||e.length===0)return c;var n=/\+/g;e=e.split(i);var r=1e3;a&&typeof a.maxKeys=="number"&&(r=a.maxKeys);var s=e.length;r>0&&s>r&&(s=r);for(var o=0;o<s;++o){var l,f,p,g,m=e[o].replace(n,"%20"),A=m.indexOf(t);A>=0?(l=m.substr(0,A),f=m.substr(A+1)):(l=m,f=""),p=decodeURIComponent(l),g=decodeURIComponent(f),sh(c,p)?Array.isArray(c[p])?c[p].push(g):c[p]=[c[p],g]:c[p]=g}return c},nr=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},xs=function(e,i,t,a){return i=i||"&",t=t||"=",e===null&&(e=void 0),typeof e=="object"?Object.keys(e).map(function(c){var n=encodeURIComponent(nr(c))+t;return Array.isArray(e[c])?e[c].map(function(r){return n+encodeURIComponent(nr(r))}).join(i):n+encodeURIComponent(nr(e[c]))}).join(i):a?encodeURIComponent(nr(a))+t+encodeURIComponent(nr(e)):""},dt={},dt.decode=dt.parse=Ps,dt.encode=dt.stringify=xs,dt.decode,dt.encode,dt.parse,dt.stringify});function _i(){throw new Error("setTimeout has not been defined")}function Ei(){throw new Error("clearTimeout has not been defined")}function Rs(e){if(Tt===setTimeout)return setTimeout(e,0);if((Tt===_i||!Tt)&&setTimeout)return Tt=setTimeout,setTimeout(e,0);try{return Tt(e,0)}catch{try{return Tt.call(null,e,0)}catch{return Tt.call(this||qt,e,0)}}}function lh(){zt&&$t&&(zt=!1,$t.length?pt=$t.concat(pt):hr=-1,pt.length&&Ms())}function Ms(){if(!zt){var e=Rs(lh);zt=!0;for(var i=pt.length;i;){for($t=pt,pt=[];++hr<i;)$t&&$t[hr].run();hr=-1,i=pt.length}$t=null,zt=!1,function(t){if(kt===clearTimeout)return clearTimeout(t);if((kt===Ei||!kt)&&clearTimeout)return kt=clearTimeout,clearTimeout(t);try{kt(t)}catch{try{return kt.call(null,t)}catch{return kt.call(this||qt,t)}}}(e)}}function Us(e,i){(this||qt).fun=e,(this||qt).array=i}function It(){}var Ds,Tt,kt,qt,We,$t,pt,zt,hr,je,ch=Ge(()=>{ae(),ce(),le(),qt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,We=Ds={},function(){try{Tt=typeof setTimeout=="function"?setTimeout:_i}catch{Tt=_i}try{kt=typeof clearTimeout=="function"?clearTimeout:Ei}catch{kt=Ei}}(),pt=[],zt=!1,hr=-1,We.nextTick=function(e){var i=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)i[t-1]=arguments[t];pt.push(new Us(e,i)),pt.length!==1||zt||Rs(Ms)},Us.prototype.run=function(){(this||qt).fun.apply(null,(this||qt).array)},We.title="browser",We.browser=!0,We.env={},We.argv=[],We.version="",We.versions={},We.on=It,We.addListener=It,We.once=It,We.off=It,We.removeListener=It,We.removeAllListeners=It,We.emit=It,We.prependListener=It,We.prependOnceListener=It,We.listeners=function(e){return[]},We.binding=function(e){throw new Error("process.binding is not supported")},We.cwd=function(){return"/"},We.chdir=function(e){throw new Error("process.chdir is not supported")},We.umask=function(){return 0},je=Ds,je.addListener,je.argv,je.binding,je.browser,je.chdir,je.cwd,je.emit,je.env,je.listeners,je.nextTick,je.off,je.on,je.once,je.prependListener,je.prependOnceListener,je.removeAllListeners,je.removeListener,je.title,je.umask,je.version,je.versions});function hh(){if(Si)return kr;Si=!0;var e=kr={},i,t;function a(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?i=setTimeout:i=a}catch{i=a}try{typeof clearTimeout=="function"?t=clearTimeout:t=c}catch{t=c}})();function n(b){if(i===setTimeout)return setTimeout(b,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(b,0);try{return i(b,0)}catch{try{return i.call(null,b,0)}catch{return i.call(this||Yt,b,0)}}}function r(b){if(t===clearTimeout)return clearTimeout(b);if((t===c||!t)&&clearTimeout)return t=clearTimeout,clearTimeout(b);try{return t(b)}catch{try{return t.call(null,b)}catch{return t.call(this||Yt,b)}}}var s=[],o=!1,l,f=-1;function p(){!o||!l||(o=!1,l.length?s=l.concat(s):f=-1,s.length&&g())}function g(){if(!o){var b=n(p);o=!0;for(var C=s.length;C;){for(l=s,s=[];++f<C;)l&&l[f].run();f=-1,C=s.length}l=null,o=!1,r(b)}}e.nextTick=function(b){var C=new Array(arguments.length-1);if(arguments.length>1)for(var U=1;U<arguments.length;U++)C[U-1]=arguments[U];s.push(new m(b,C)),s.length===1&&!o&&n(g)};function m(b,C){(this||Yt).fun=b,(this||Yt).array=C}m.prototype.run=function(){(this||Yt).fun.apply(null,(this||Yt).array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={};function A(){}return e.on=A,e.addListener=A,e.once=A,e.off=A,e.removeListener=A,e.removeAllListeners=A,e.emit=A,e.prependListener=A,e.prependOnceListener=A,e.listeners=function(b){return[]},e.binding=function(b){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(b){throw new Error("process.chdir is not supported")},e.umask=function(){return 0},kr}var kr,Si,Yt,Le,Ls=Ge(()=>{ae(),ce(),le(),kr={},Si=!1,Yt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Le=hh(),Le.platform="browser",Le.addListener,Le.argv,Le.binding,Le.browser,Le.chdir,Le.cwd,Le.emit,Le.env,Le.listeners,Le.nextTick,Le.off,Le.on,Le.once,Le.prependListener,Le.prependOnceListener,Le.removeAllListeners,Le.removeListener,Le.title,Le.umask,Le.version,Le.versions});function uh(){if(Ci)return Br;Ci=!0;var e=Le;function i(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}function t(n,r){for(var s="",o=0,l=-1,f=0,p,g=0;g<=n.length;++g){if(g<n.length)p=n.charCodeAt(g);else{if(p===47)break;p=47}if(p===47){if(!(l===g-1||f===1))if(l!==g-1&&f===2){if(s.length<2||o!==2||s.charCodeAt(s.length-1)!==46||s.charCodeAt(s.length-2)!==46){if(s.length>2){var m=s.lastIndexOf("/");if(m!==s.length-1){m===-1?(s="",o=0):(s=s.slice(0,m),o=s.length-1-s.lastIndexOf("/")),l=g,f=0;continue}}else if(s.length===2||s.length===1){s="",o=0,l=g,f=0;continue}}r&&(s.length>0?s+="/..":s="..",o=2)}else s.length>0?s+="/"+n.slice(l+1,g):s=n.slice(l+1,g),o=g-l-1;l=g,f=0}else p===46&&f!==-1?++f:f=-1}return s}function a(n,r){var s=r.dir||r.root,o=r.base||(r.name||"")+(r.ext||"");return s?s===r.root?s+o:s+n+o:o}var c={resolve:function(){for(var n="",r=!1,s,o=arguments.length-1;o>=-1&&!r;o--){var l;o>=0?l=arguments[o]:(s===void 0&&(s=e.cwd()),l=s),i(l),l.length!==0&&(n=l+"/"+n,r=l.charCodeAt(0)===47)}return n=t(n,!r),r?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(n){if(i(n),n.length===0)return".";var r=n.charCodeAt(0)===47,s=n.charCodeAt(n.length-1)===47;return n=t(n,!r),n.length===0&&!r&&(n="."),n.length>0&&s&&(n+="/"),r?"/"+n:n},isAbsolute:function(n){return i(n),n.length>0&&n.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var n,r=0;r<arguments.length;++r){var s=arguments[r];i(s),s.length>0&&(n===void 0?n=s:n+="/"+s)}return n===void 0?".":c.normalize(n)},relative:function(n,r){if(i(n),i(r),n===r||(n=c.resolve(n),r=c.resolve(r),n===r))return"";for(var s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var o=n.length,l=o-s,f=1;f<r.length&&r.charCodeAt(f)===47;++f);for(var p=r.length,g=p-f,m=l<g?l:g,A=-1,b=0;b<=m;++b){if(b===m){if(g>m){if(r.charCodeAt(f+b)===47)return r.slice(f+b+1);if(b===0)return r.slice(f+b)}else l>m&&(n.charCodeAt(s+b)===47?A=b:b===0&&(A=0));break}var C=n.charCodeAt(s+b),U=r.charCodeAt(f+b);if(C!==U)break;C===47&&(A=b)}var I="";for(b=s+A+1;b<=o;++b)(b===o||n.charCodeAt(b)===47)&&(I.length===0?I+="..":I+="/..");return I.length>0?I+r.slice(f+A):(f+=A,r.charCodeAt(f)===47&&++f,r.slice(f))},_makeLong:function(n){return n},dirname:function(n){if(i(n),n.length===0)return".";for(var r=n.charCodeAt(0),s=r===47,o=-1,l=!0,f=n.length-1;f>=1;--f)if(r=n.charCodeAt(f),r===47){if(!l){o=f;break}}else l=!1;return o===-1?s?"/":".":s&&o===1?"//":n.slice(0,o)},basename:function(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');i(n);var s=0,o=-1,l=!0,f;if(r!==void 0&&r.length>0&&r.length<=n.length){if(r.length===n.length&&r===n)return"";var p=r.length-1,g=-1;for(f=n.length-1;f>=0;--f){var m=n.charCodeAt(f);if(m===47){if(!l){s=f+1;break}}else g===-1&&(l=!1,g=f+1),p>=0&&(m===r.charCodeAt(p)?--p===-1&&(o=f):(p=-1,o=g))}return s===o?o=g:o===-1&&(o=n.length),n.slice(s,o)}else{for(f=n.length-1;f>=0;--f)if(n.charCodeAt(f)===47){if(!l){s=f+1;break}}else o===-1&&(l=!1,o=f+1);return o===-1?"":n.slice(s,o)}},extname:function(n){i(n);for(var r=-1,s=0,o=-1,l=!0,f=0,p=n.length-1;p>=0;--p){var g=n.charCodeAt(p);if(g===47){if(!l){s=p+1;break}continue}o===-1&&(l=!1,o=p+1),g===46?r===-1?r=p:f!==1&&(f=1):r!==-1&&(f=-1)}return r===-1||o===-1||f===0||f===1&&r===o-1&&r===s+1?"":n.slice(r,o)},format:function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return a("/",n)},parse:function(n){i(n);var r={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return r;var s=n.charCodeAt(0),o=s===47,l;o?(r.root="/",l=1):l=0;for(var f=-1,p=0,g=-1,m=!0,A=n.length-1,b=0;A>=l;--A){if(s=n.charCodeAt(A),s===47){if(!m){p=A+1;break}continue}g===-1&&(m=!1,g=A+1),s===46?f===-1?f=A:b!==1&&(b=1):f!==-1&&(b=-1)}return f===-1||g===-1||b===0||b===1&&f===g-1&&f===p+1?g!==-1&&(p===0&&o?r.base=r.name=n.slice(1,g):r.base=r.name=n.slice(p,g)):(p===0&&o?(r.name=n.slice(1,f),r.base=n.slice(1,g)):(r.name=n.slice(p,f),r.base=n.slice(p,g)),r.ext=n.slice(f,g)),p>0?r.dir=n.slice(0,p-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};return c.posix=c,Br=c,Br}var Br,Ci,Ii,fh=Ge(()=>{ae(),ce(),le(),Ls(),Br={},Ci=!1,Ii=uh()}),Ns={};Mt(Ns,{URL:()=>ua,Url:()=>sa,default:()=>Me,fileURLToPath:()=>Fs,format:()=>aa,parse:()=>ha,pathToFileURL:()=>js,resolve:()=>la,resolveObject:()=>ca});function st(){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 ur(e,i,t){if(e&&ht.isObject(e)&&e instanceof st)return e;var a=new st;return a.parse(e,i,t),a}function dh(){if(Oi)return Rr;Oi=!0;var e=je;function i(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}function t(n,r){for(var s="",o=0,l=-1,f=0,p,g=0;g<=n.length;++g){if(g<n.length)p=n.charCodeAt(g);else{if(p===47)break;p=47}if(p===47){if(!(l===g-1||f===1))if(l!==g-1&&f===2){if(s.length<2||o!==2||s.charCodeAt(s.length-1)!==46||s.charCodeAt(s.length-2)!==46){if(s.length>2){var m=s.lastIndexOf("/");if(m!==s.length-1){m===-1?(s="",o=0):(s=s.slice(0,m),o=s.length-1-s.lastIndexOf("/")),l=g,f=0;continue}}else if(s.length===2||s.length===1){s="",o=0,l=g,f=0;continue}}r&&(s.length>0?s+="/..":s="..",o=2)}else s.length>0?s+="/"+n.slice(l+1,g):s=n.slice(l+1,g),o=g-l-1;l=g,f=0}else p===46&&f!==-1?++f:f=-1}return s}function a(n,r){var s=r.dir||r.root,o=r.base||(r.name||"")+(r.ext||"");return s?s===r.root?s+o:s+n+o:o}var c={resolve:function(){for(var n="",r=!1,s,o=arguments.length-1;o>=-1&&!r;o--){var l;o>=0?l=arguments[o]:(s===void 0&&(s=e.cwd()),l=s),i(l),l.length!==0&&(n=l+"/"+n,r=l.charCodeAt(0)===47)}return n=t(n,!r),r?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(n){if(i(n),n.length===0)return".";var r=n.charCodeAt(0)===47,s=n.charCodeAt(n.length-1)===47;return n=t(n,!r),n.length===0&&!r&&(n="."),n.length>0&&s&&(n+="/"),r?"/"+n:n},isAbsolute:function(n){return i(n),n.length>0&&n.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var n,r=0;r<arguments.length;++r){var s=arguments[r];i(s),s.length>0&&(n===void 0?n=s:n+="/"+s)}return n===void 0?".":c.normalize(n)},relative:function(n,r){if(i(n),i(r),n===r||(n=c.resolve(n),r=c.resolve(r),n===r))return"";for(var s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var o=n.length,l=o-s,f=1;f<r.length&&r.charCodeAt(f)===47;++f);for(var p=r.length,g=p-f,m=l<g?l:g,A=-1,b=0;b<=m;++b){if(b===m){if(g>m){if(r.charCodeAt(f+b)===47)return r.slice(f+b+1);if(b===0)return r.slice(f+b)}else l>m&&(n.charCodeAt(s+b)===47?A=b:b===0&&(A=0));break}var C=n.charCodeAt(s+b),U=r.charCodeAt(f+b);if(C!==U)break;C===47&&(A=b)}var I="";for(b=s+A+1;b<=o;++b)(b===o||n.charCodeAt(b)===47)&&(I.length===0?I+="..":I+="/..");return I.length>0?I+r.slice(f+A):(f+=A,r.charCodeAt(f)===47&&++f,r.slice(f))},_makeLong:function(n){return n},dirname:function(n){if(i(n),n.length===0)return".";for(var r=n.charCodeAt(0),s=r===47,o=-1,l=!0,f=n.length-1;f>=1;--f)if(r=n.charCodeAt(f),r===47){if(!l){o=f;break}}else l=!1;return o===-1?s?"/":".":s&&o===1?"//":n.slice(0,o)},basename:function(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');i(n);var s=0,o=-1,l=!0,f;if(r!==void 0&&r.length>0&&r.length<=n.length){if(r.length===n.length&&r===n)return"";var p=r.length-1,g=-1;for(f=n.length-1;f>=0;--f){var m=n.charCodeAt(f);if(m===47){if(!l){s=f+1;break}}else g===-1&&(l=!1,g=f+1),p>=0&&(m===r.charCodeAt(p)?--p===-1&&(o=f):(p=-1,o=g))}return s===o?o=g:o===-1&&(o=n.length),n.slice(s,o)}else{for(f=n.length-1;f>=0;--f)if(n.charCodeAt(f)===47){if(!l){s=f+1;break}}else o===-1&&(l=!1,o=f+1);return o===-1?"":n.slice(s,o)}},extname:function(n){i(n);for(var r=-1,s=0,o=-1,l=!0,f=0,p=n.length-1;p>=0;--p){var g=n.charCodeAt(p);if(g===47){if(!l){s=p+1;break}continue}o===-1&&(l=!1,o=p+1),g===46?r===-1?r=p:f!==1&&(f=1):r!==-1&&(f=-1)}return r===-1||o===-1||f===0||f===1&&r===o-1&&r===s+1?"":n.slice(r,o)},format:function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return a("/",n)},parse:function(n){i(n);var r={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return r;var s=n.charCodeAt(0),o=s===47,l;o?(r.root="/",l=1):l=0;for(var f=-1,p=0,g=-1,m=!0,A=n.length-1,b=0;A>=l;--A){if(s=n.charCodeAt(A),s===47){if(!m){p=A+1;break}continue}g===-1&&(m=!1,g=A+1),s===46?f===-1?f=A:b!==1&&(b=1):f!==-1&&(b=-1)}return f===-1||g===-1||b===0||b===1&&f===g-1&&f===p+1?g!==-1&&(p===0&&o?r.base=r.name=n.slice(1,g):r.base=r.name=n.slice(p,g)):(p===0&&o?(r.name=n.slice(1,f),r.base=n.slice(1,g)):(r.name=n.slice(p,f),r.base=n.slice(p,g)),r.ext=n.slice(f,g)),p>0?r.dir=n.slice(0,p-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};return c.posix=c,Rr=c,Rr}function ph(e){if(typeof e=="string")e=new URL(e);else if(!(e instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(e.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return Mr?gh(e):mh(e)}function gh(e){let i=e.hostname,t=e.pathname;for(let a=0;a<t.length;a++)if(t[a]==="%"){let c=t.codePointAt(a+2)||32;if(t[a+1]==="2"&&c===102||t[a+1]==="5"&&c===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(t=t.replace(Xs,"\\"),t=decodeURIComponent(t),i!=="")return`\\\\${i}${t}`;{let a=t.codePointAt(1)|32,c=t[2];if(a<Js||a>Zs||c!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return t.slice(1)}}function mh(e){if(e.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let i=e.pathname;for(let t=0;t<i.length;t++)if(i[t]==="%"){let a=i.codePointAt(t+2)||32;if(i[t+1]==="2"&&a===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(i)}function Ah(e){let i=Pi.resolve(e),t=e.charCodeAt(e.length-1);(t===Gs||Mr&&t===Ys)&&i[i.length-1]!==Pi.sep&&(i+="/");let a=new URL("file://");return i.includes("%")&&(i=i.replace(ea,"%25")),!Mr&&i.includes("\\")&&(i=i.replace(ta,"%5C")),i.includes(`
|
|
4
|
-
`)&&(i=i.replace(ra,"%0A")),i.includes("\r")&&(i=i.replace(na,"%0D")),i.includes(" ")&&(i=i.replace(ia,"%09")),a.pathname=i,a}function Fs(e){if(typeof e=="string")e=new URL(e);else if(!(e instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(e.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return
|
|
5
|
-
`)&&(i=i.replace(ya,"%0A")),i.includes("\r")&&(i=i.replace(wa,"%0D")),i.includes(" ")&&(i=i.replace(va,"%09")),a.pathname=i,a}var Me,Vs,
|
|
6
|
-
`," "]),Or=["'"].concat(Hs),Ti=["%","/","?",";","#"].concat(Or),ki=["/","?","#"],Bi=/^[+a-z0-9A-Z_-]{0,63}$/,qs=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,$s={javascript:!0,"javascript:":!0},Pr={javascript:!0,"javascript:":!0},Gt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},xr=dt,st.prototype.parse=function(e,i,t){if(!ht.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),c=a!==-1&&a<e.indexOf("#")?"?":"#",n=e.split(c);n[0]=n[0].replace(/\\/g,"/");var r=e=n.join(c);if(r=r.trim(),!t&&e.split("#").length===1){var s=Qs.exec(r);if(s)return this.path=r,this.href=r,this.pathname=s[1],s[2]?(this.search=s[2],this.query=i?xr.parse(this.search.substr(1)):this.search.substr(1)):i&&(this.search="",this.query={}),this}var o=Ks.exec(r);if(o){var l=(o=o[0]).toLowerCase();this.protocol=l,r=r.substr(o.length)}if(t||o||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var f=r.substr(0,2)==="//";!f||o&&Pr[o]||(r=r.substr(2),this.slashes=!0)}if(!Pr[o]&&(f||o&&!Gt[o])){for(var p,g,m=-1,A=0;A<ki.length;A++)(b=r.indexOf(ki[A]))!==-1&&(m===-1||b<m)&&(m=b);for((g=m===-1?r.lastIndexOf("@"):r.lastIndexOf("@",m))!==-1&&(p=r.slice(0,g),r=r.slice(g+1),this.auth=decodeURIComponent(p)),m=-1,A=0;A<Ti.length;A++){var b;(b=r.indexOf(Ti[A]))!==-1&&(m===-1||b<m)&&(m=b)}m===-1&&(m=r.length),this.host=r.slice(0,m),r=r.slice(m),this.parseHost(),this.hostname=this.hostname||"";var C=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!C)for(var U=this.hostname.split(/\./),I=(A=0,U.length);A<I;A++){var v=U[A];if(v&&!v.match(Bi)){for(var L="",F=0,B=v.length;F<B;F++)v.charCodeAt(F)>127?L+="x":L+=v[F];if(!L.match(Bi)){var k=U.slice(0,A),M=U.slice(A+1),W=v.match(qs);W&&(k.push(W[1]),M.unshift(W[2])),M.length&&(r="/"+M.join(".")+r),this.hostname=k.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=Vs.toASCII(this.hostname));var J=this.port?":"+this.port:"",ne=this.hostname||"";this.host=ne+J,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),r[0]!=="/"&&(r="/"+r))}if(!$s[l])for(A=0,I=Or.length;A<I;A++){var S=Or[A];if(r.indexOf(S)!==-1){var q=encodeURIComponent(S);q===S&&(q=escape(S)),r=r.split(S).join(q)}}var re=r.indexOf("#");re!==-1&&(this.hash=r.substr(re),r=r.slice(0,re));var Y=r.indexOf("?");if(Y!==-1?(this.search=r.substr(Y),this.query=r.substr(Y+1),i&&(this.query=xr.parse(this.query)),r=r.slice(0,Y)):i&&(this.search="",this.query={}),r&&(this.pathname=r),Gt[l]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){J=this.pathname||"";var me=this.search||"";this.path=J+me}return this.href=this.format(),this},st.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var i=this.protocol||"",t=this.pathname||"",a=this.hash||"",c=!1,n="";this.host?c=e+this.host:this.hostname&&(c=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(c+=":"+this.port)),this.query&&ht.isObject(this.query)&&Object.keys(this.query).length&&(n=xr.stringify(this.query));var r=this.search||n&&"?"+n||"";return i&&i.substr(-1)!==":"&&(i+=":"),this.slashes||(!i||Gt[i])&&c!==!1?(c="//"+(c||""),t&&t.charAt(0)!=="/"&&(t="/"+t)):c||(c=""),a&&a.charAt(0)!=="#"&&(a="#"+a),r&&r.charAt(0)!=="?"&&(r="?"+r),i+c+(t=t.replace(/[?#]/g,function(s){return encodeURIComponent(s)}))+(r=r.replace("#","%23"))+a},st.prototype.resolve=function(e){return this.resolveObject(ur(e,!1,!0)).format()},st.prototype.resolveObject=function(e){if(ht.isString(e)){var i=new st;i.parse(e,!1,!0),e=i}for(var t=new st,a=Object.keys(this),c=0;c<a.length;c++){var n=a[c];t[n]=this[n]}if(t.hash=e.hash,e.href==="")return t.href=t.format(),t;if(e.slashes&&!e.protocol){for(var r=Object.keys(e),s=0;s<r.length;s++){var o=r[s];o!=="protocol"&&(t[o]=e[o])}return Gt[t.protocol]&&t.hostname&&!t.pathname&&(t.path=t.pathname="/"),t.href=t.format(),t}if(e.protocol&&e.protocol!==t.protocol){if(!Gt[e.protocol]){for(var l=Object.keys(e),f=0;f<l.length;f++){var p=l[f];t[p]=e[p]}return t.href=t.format(),t}if(t.protocol=e.protocol,e.host||Pr[e.protocol])t.pathname=e.pathname;else{for(var g=(e.pathname||"").split("/");g.length&&!(e.host=g.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),g[0]!==""&&g.unshift(""),g.length<2&&g.unshift(""),t.pathname=g.join("/")}if(t.search=e.search,t.query=e.query,t.host=e.host||"",t.auth=e.auth,t.hostname=e.hostname||e.host,t.port=e.port,t.pathname||t.search){var m=t.pathname||"",A=t.search||"";t.path=m+A}return t.slashes=t.slashes||e.slashes,t.href=t.format(),t}var b=t.pathname&&t.pathname.charAt(0)==="/",C=e.host||e.pathname&&e.pathname.charAt(0)==="/",U=C||b||t.host&&e.pathname,I=U,v=t.pathname&&t.pathname.split("/")||[],L=(g=e.pathname&&e.pathname.split("/")||[],t.protocol&&!Gt[t.protocol]);if(L&&(t.hostname="",t.port=null,t.host&&(v[0]===""?v[0]=t.host:v.unshift(t.host)),t.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(g[0]===""?g[0]=e.host:g.unshift(e.host)),e.host=null),U=U&&(g[0]===""||v[0]==="")),C)t.host=e.host||e.host===""?e.host:t.host,t.hostname=e.hostname||e.hostname===""?e.hostname:t.hostname,t.search=e.search,t.query=e.query,v=g;else if(g.length)v||(v=[]),v.pop(),v=v.concat(g),t.search=e.search,t.query=e.query;else if(!ht.isNullOrUndefined(e.search))return L&&(t.hostname=t.host=v.shift(),(W=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@"))&&(t.auth=W.shift(),t.host=t.hostname=W.shift())),t.search=e.search,t.query=e.query,ht.isNull(t.pathname)&&ht.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t;if(!v.length)return t.pathname=null,t.search?t.path="/"+t.search:t.path=null,t.href=t.format(),t;for(var F=v.slice(-1)[0],B=(t.host||e.host||v.length>1)&&(F==="."||F==="..")||F==="",k=0,M=v.length;M>=0;M--)(F=v[M])==="."?v.splice(M,1):F===".."?(v.splice(M,1),k++):k&&(v.splice(M,1),k--);if(!U&&!I)for(;k--;k)v.unshift("..");!U||v[0]===""||v[0]&&v[0].charAt(0)==="/"||v.unshift(""),B&&v.join("/").substr(-1)!=="/"&&v.push("");var W,J=v[0]===""||v[0]&&v[0].charAt(0)==="/";return L&&(t.hostname=t.host=J?"":v.length?v.shift():"",(W=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@"))&&(t.auth=W.shift(),t.host=t.hostname=W.shift())),(U=U||t.host&&v.length)&&!J&&v.unshift(""),v.length?t.pathname=v.join("/"):(t.pathname=null,t.path=null),ht.isNull(t.pathname)&&ht.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=e.auth||t.auth,t.slashes=t.slashes||e.slashes,t.href=t.format(),t},st.prototype.parseHost=function(){var e=this.host,i=Ws.exec(e);i&&((i=i[0])!==":"&&(this.port=i.substr(1)),e=e.substr(0,e.length-i.length)),e&&(this.hostname=e)},Me.Url,Me.format,Me.resolve,Me.resolveObject,Rr={},Oi=!1,Pi=dh(),zs=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,Me.URL=typeof URL<"u"?URL:null,Me.pathToFileURL=Ah,Me.fileURLToPath=ph,Me.Url,Me.format,Me.resolve,Me.resolveObject,Me.URL,Ys=92,Gs=47,Js=97,Zs=122,Mr=zs==="win32",Xs=/\//g,ea=/%/g,ta=/\\/g,ra=/\n/g,na=/\r/g,ia=/\t/g,oa=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,Me.URL=typeof URL<"u"?URL:null,Me.pathToFileURL=js,Me.fileURLToPath=Fs,sa=Me.Url,aa=Me.format,la=Me.resolve,ca=Me.resolveObject,ha=Me.parse,ua=Me.URL,fa=92,da=47,pa=97,ga=122,Ur=oa==="win32",ma=/\//g,Aa=/%/g,ba=/\\/g,ya=/\n/g,wa=/\r/g,va=/\t/g}),vh=Ae((e,i)=>{ae(),ce(),le(),i.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}),xi=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0}),e.BufferedDuplex=e.writev=void 0;var i=Qt(),t=(Ze(),Ue(Je));function a(n,r){let s=new Array(n.length);for(let o=0;o<n.length;o++)typeof n[o].chunk=="string"?s[o]=t.Buffer.from(n[o].chunk,"utf8"):s[o]=n[o].chunk;this._write(t.Buffer.concat(s),"binary",r)}e.writev=a;var c=class extends i.Duplex{constructor(n,r,s){super({objectMode:!0}),this.proxy=r,this.socket=s,this.writeQueue=[],n.objectMode||(this._writev=a.bind(this)),this.isSocketOpen=!1,this.proxy.on("data",o=>{this.destroyed||this.push(o)})}_read(n){this.proxy.read(n)}_write(n,r,s){this.isSocketOpen?this.writeToProxy(n,r,s):this.writeQueue.push({chunk:n,encoding:r,cb:s})}_final(n){this.writeQueue=[],this.proxy.end(n)}_destroy(n,r){this.writeQueue=[],this.proxy.destroy(),r(n)}socketReady(){this.emit("connect"),this.isSocketOpen=!0,this.processWriteQueue()}writeToProxy(n,r,s){this.proxy.write(n,r)===!1?this.proxy.once("drain",s):s()}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:n,encoding:r,cb:s}=this.writeQueue.shift();this.writeToProxy(n,r,s)}}};e.BufferedDuplex=c}),Dr=Ae(e=>{ae(),ce(),le();var i=e&&e.__importDefault||function(U){return U&&U.__esModule?U:{default:U}};Object.defineProperty(e,"__esModule",{value:!0}),e.streamBuilder=e.browserStreamBuilder=void 0;var t=(Ze(),Ue(Je)),a=i(vh()),c=i(Et()),n=Qt(),r=i(Ir()),s=xi(),o=(0,c.default)("mqttjs:ws"),l=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];function f(U,I){let v=`${U.protocol}://${U.hostname}:${U.port}${U.path}`;return typeof U.transformWsUrl=="function"&&(v=U.transformWsUrl(v,U,I)),v}function p(U){let I=U;return U.port||(U.protocol==="wss"?I.port=443:I.port=80),U.path||(I.path="/"),U.wsOptions||(I.wsOptions={}),!r.default&&!U.forceNativeWebSocket&&U.protocol==="wss"&&l.forEach(v=>{Object.prototype.hasOwnProperty.call(U,v)&&!Object.prototype.hasOwnProperty.call(U.wsOptions,v)&&(I.wsOptions[v]=U[v])}),I}function g(U){let I=p(U);if(I.hostname||(I.hostname=I.host),!I.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let v=new URL(document.URL);I.hostname=v.hostname,I.port||(I.port=Number(v.port))}return I.objectMode===void 0&&(I.objectMode=!(I.binary===!0||I.binary===void 0)),I}function m(U,I,v){o("createWebSocket"),o(`protocol: ${v.protocolId} ${v.protocolVersion}`);let L=v.protocolId==="MQIsdp"&&v.protocolVersion===3?"mqttv3.1":"mqtt";o(`creating new Websocket for url: ${I} and protocol: ${L}`);let F;return v.createWebsocket?F=v.createWebsocket(I,[L],v):F=new a.default(I,[L],v.wsOptions),F}function A(U,I){let v=I.protocolId==="MQIsdp"&&I.protocolVersion===3?"mqttv3.1":"mqtt",L=f(I,U),F;return I.createWebsocket?F=I.createWebsocket(L,[v],I):F=new WebSocket(L,[v]),F.binaryType="arraybuffer",F}var b=(U,I)=>{o("streamBuilder");let v=p(I);v.hostname=v.hostname||v.host||"localhost";let L=f(v,U),F=m(U,L,v),B=a.default.createWebSocketStream(F,v.wsOptions);return B.url=L,F.on("close",()=>{B.destroy()}),B};e.streamBuilder=b;var C=(U,I)=>{o("browserStreamBuilder");let v,L=g(I).browserBufferSize||1024*512,F=I.browserBufferTimeout||1e3,B=!I.objectMode,k=A(U,I),M=J(I,Y,me);I.objectMode||(M._writev=s.writev.bind(M)),M.on("close",()=>{k.close()});let W=typeof k.addEventListener<"u";k.readyState===k.OPEN?(v=M,v.socket=k):(v=new s.BufferedDuplex(I,M,k),W?k.addEventListener("open",ne):k.onopen=ne),W?(k.addEventListener("close",S),k.addEventListener("error",q),k.addEventListener("message",re)):(k.onclose=S,k.onerror=q,k.onmessage=re);function J(se,H,be){let oe=new n.Transform({objectMode:se.objectMode});return oe._write=H,oe._flush=be,oe}function ne(){o("WebSocket onOpen"),v instanceof s.BufferedDuplex&&v.socketReady()}function S(se){o("WebSocket onClose",se),v.end(),v.destroy()}function q(se){o("WebSocket onError",se);let H=new Error("WebSocket error");H.event=se,v.destroy(H)}async function re(se){let{data:H}=se;H instanceof ArrayBuffer?H=t.Buffer.from(H):H instanceof Blob?H=t.Buffer.from(await new Response(H).arrayBuffer()):H=t.Buffer.from(H,"utf8"),M&&!M.destroyed&&M.push(H)}function Y(se,H,be){if(k.bufferedAmount>L){setTimeout(Y,F,se,H,be);return}B&&typeof se=="string"&&(se=t.Buffer.from(se,"utf8"));try{k.send(se)}catch(oe){return be(oe)}be()}function me(se){k.close(),se()}return v};e.browserStreamBuilder=C}),Ri={};Mt(Ri,{Server:()=>Ne,Socket:()=>Ne,Stream:()=>Ne,_createServerHandle:()=>Ne,_normalizeArgs:()=>Ne,_setSimultaneousAccepts:()=>Ne,connect:()=>Ne,createConnection:()=>Ne,createServer:()=>Ne,default:()=>_a,isIP:()=>Ne,isIPv4:()=>Ne,isIPv6:()=>Ne});function Ne(){throw new Error("Node.js net module is not supported by JSPM core outside of Node.js")}var _a,Ea=Ge(()=>{ae(),ce(),le(),_a={_createServerHandle:Ne,_normalizeArgs:Ne,_setSimultaneousAccepts:Ne,connect:Ne,createConnection:Ne,createServer:Ne,isIP:Ne,isIPv4:Ne,isIPv6:Ne,Server:Ne,Socket:Ne,Stream:Ne}}),Sa=Ae(e=>{ae(),ce(),le();var i=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0});var t=i((Ea(),Ue(Ri))),a=i(Et()),c=(0,a.default)("mqttjs:tcp"),n=(r,s)=>{s.port=s.port||1883,s.hostname=s.hostname||s.host||"localhost";let{port:o,path:l}=s,f=s.hostname;return c("port %d and host %s",o,f),t.default.createConnection({port:o,host:f,path:l})};e.default=n}),Ca={};Mt(Ca,{default:()=>Ia});var Ia,_h=Ge(()=>{ae(),ce(),le(),Ia={}}),Ta=Ae(e=>{ae(),ce(),le();var i=e&&e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0});var t=i((_h(),Ue(Ca))),a=i((Ea(),Ue(Ri))),c=i(Et()),n=(0,c.default)("mqttjs:tls"),r=(s,o)=>{o.port=o.port||8883,o.host=o.hostname||o.host||"localhost",a.default.isIP(o.host)===0&&(o.servername=o.host),o.rejectUnauthorized=o.rejectUnauthorized!==!1,delete o.path,n("port %d host %s rejectUnauthorized %b",o.port,o.host,o.rejectUnauthorized);let l=t.default.connect(o);l.on("secureConnect",()=>{o.rejectUnauthorized&&!l.authorized?l.emit("error",new Error("TLS not authorized")):l.removeListener("error",f)});function f(p){o.rejectUnauthorized&&s.emit("error",p),l.end()}return l.on("error",f),l};e.default=r}),ka=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=(Ze(),Ue(Je)),t=Qt(),a=xi(),c,n,r;function s(){let g=new t.Transform;return g._write=(m,A,b)=>{c.send({data:m.buffer,success(){b()},fail(C){b(new Error(C))}})},g._flush=m=>{c.close({success(){m()}})},g}function o(g){g.hostname||(g.hostname="localhost"),g.path||(g.path="/"),g.wsOptions||(g.wsOptions={})}function l(g,m){let A=g.protocol==="wxs"?"wss":"ws",b=`${A}://${g.hostname}${g.path}`;return g.port&&g.port!==80&&g.port!==443&&(b=`${A}://${g.hostname}:${g.port}${g.path}`),typeof g.transformWsUrl=="function"&&(b=g.transformWsUrl(b,g,m)),b}function f(){c.onOpen(()=>{r.socketReady()}),c.onMessage(g=>{let{data:m}=g;m instanceof ArrayBuffer?m=i.Buffer.from(m):m=i.Buffer.from(m,"utf8"),n.push(m)}),c.onClose(()=>{r.emit("close"),r.end(),r.destroy()}),c.onError(g=>{let m=new Error(g.errMsg);r.destroy(m)})}var p=(g,m)=>{if(m.hostname=m.hostname||m.host,!m.hostname)throw new Error("Could not determine host. Specify host manually.");let A=m.protocolId==="MQIsdp"&&m.protocolVersion===3?"mqttv3.1":"mqtt";o(m);let b=l(m,g);c=wx.connectSocket({url:b,protocols:[A]}),n=s(),r=new a.BufferedDuplex(m,n,c),r._destroy=(U,I)=>{c.close({success(){I&&I(U)}})};let C=r.destroy;return r.destroy=(U,I)=>(r.destroy=C,setTimeout(()=>{c.close({fail(){r._destroy(U,I)}})},0),r),f(),r};e.default=p}),Ba=Ae(e=>{ae(),ce(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=(Ze(),Ue(Je)),t=Qt(),a=xi(),c,n,r,s=!1;function o(){let m=new t.Transform;return m._write=(A,b,C)=>{c.sendSocketMessage({data:A.buffer,success(){C()},fail(){C(new Error)}})},m._flush=A=>{c.closeSocket({success(){A()}})},m}function l(m){m.hostname||(m.hostname="localhost"),m.path||(m.path="/"),m.wsOptions||(m.wsOptions={})}function f(m,A){let b=m.protocol==="alis"?"wss":"ws",C=`${b}://${m.hostname}${m.path}`;return m.port&&m.port!==80&&m.port!==443&&(C=`${b}://${m.hostname}:${m.port}${m.path}`),typeof m.transformWsUrl=="function"&&(C=m.transformWsUrl(C,m,A)),C}function p(){s||(s=!0,c.onSocketOpen(()=>{r.socketReady()}),c.onSocketMessage(m=>{if(typeof m.data=="string"){let A=i.Buffer.from(m.data,"base64");n.push(A)}else{let A=new FileReader;A.addEventListener("load",()=>{let b=A.result;b instanceof ArrayBuffer?b=i.Buffer.from(b):b=i.Buffer.from(b,"utf8"),n.push(b)}),A.readAsArrayBuffer(m.data)}}),c.onSocketClose(()=>{r.end(),r.destroy()}),c.onSocketError(m=>{r.destroy(m)}))}var g=(m,A)=>{if(A.hostname=A.hostname||A.host,!A.hostname)throw new Error("Could not determine host. Specify host manually.");let b=A.protocolId==="MQIsdp"&&A.protocolVersion===3?"mqttv3.1":"mqtt";l(A);let C=f(A,m);return c=A.my,c.connectSocket({url:C,protocols:b}),n=o(),r=new a.BufferedDuplex(A,n,c),p(),r};e.default=g}),Eh=Ae(e=>{ae(),ce(),le();var i=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.connectAsync=void 0;var t=i(Et()),a=i((wh(),Ue(Ns))),c=i(Ai()),n=i(Ir());typeof(xe==null?void 0:xe.nextTick)!="function"&&(xe.nextTick=setImmediate);var r=(0,t.default)("mqttjs"),s=null;function o(p){let g;p.auth&&(g=p.auth.match(/^(.+):(.+)$/),g?(p.username=g[1],p.password=g[2]):p.username=p.auth)}function l(p,g){var m,A,b,C;if(r("connecting to an MQTT broker..."),typeof p=="object"&&!g&&(g=p,p=""),g=g||{},p&&typeof p=="string"){let v=a.default.parse(p,!0),L={};if(v.port!=null&&(L.port=Number(v.port)),L.host=v.hostname,L.query=v.query,L.auth=v.auth,L.protocol=v.protocol,L.path=v.path,L.protocol=(m=L.protocol)===null||m===void 0?void 0:m.replace(/:$/,""),g=Object.assign(Object.assign({},L),g),!g.protocol)throw new Error("Missing protocol")}if(g.unixSocket=g.unixSocket||((A=g.protocol)===null||A===void 0?void 0:A.includes("+unix")),g.unixSocket?g.protocol=g.protocol.replace("+unix",""):!(!((b=g.protocol)===null||b===void 0)&&b.startsWith("ws"))&&!(!((C=g.protocol)===null||C===void 0)&&C.startsWith("wx"))&&delete g.path,o(g),g.query&&typeof g.query.clientId=="string"&&(g.clientId=g.query.clientId),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(s||(s={},!n.default&&!g.forceNativeWebSocket?(s.ws=Dr().streamBuilder,s.wss=Dr().streamBuilder,s.mqtt=Sa().default,s.tcp=Sa().default,s.ssl=Ta().default,s.tls=s.ssl,s.mqtts=Ta().default):(s.ws=Dr().browserStreamBuilder,s.wss=Dr().browserStreamBuilder,s.wx=ka().default,s.wxs=ka().default,s.ali=Ba().default,s.alis=Ba().default)),!s[g.protocol]){let v=["mqtts","wss"].indexOf(g.protocol)!==-1;g.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((L,F)=>v&&F%2===0?!1:typeof s[L]=="function")[0]}if(g.clean===!1&&!g.clientId)throw new Error("Missing clientId for unclean clients");g.protocol&&(g.defaultProtocol=g.protocol);function U(v){return g.servers&&((!v._reconnectCount||v._reconnectCount===g.servers.length)&&(v._reconnectCount=0),g.host=g.servers[v._reconnectCount].host,g.port=g.servers[v._reconnectCount].port,g.protocol=g.servers[v._reconnectCount].protocol?g.servers[v._reconnectCount].protocol:g.defaultProtocol,g.hostname=g.host,v._reconnectCount++),r("calling streambuilder for",g.protocol),s[g.protocol](v,g)}let I=new c.default(U,g);return I.on("error",()=>{}),I}function f(p,g,m=!0){return new Promise((A,b)=>{let C=l(p,g),U={connect:v=>{I(),A(C)},end:()=>{I(),A(C)},error:v=>{I(),C.end(),b(v)}};m===!1&&(U.close=()=>{U.error(new Error("Couldn't connect to server"))});function I(){Object.keys(U).forEach(v=>{C.off(v,U[v])})}Object.keys(U).forEach(v=>{C.on(v,U[v])})})}e.connectAsync=f,e.default=l}),Oa=Ae(e=>{ae(),ce(),le();var i=e&&e.__createBinding||(Object.create?function(m,A,b,C){C===void 0&&(C=b);var U=Object.getOwnPropertyDescriptor(A,b);(!U||("get"in U?!A.__esModule:U.writable||U.configurable))&&(U={enumerable:!0,get:function(){return A[b]}}),Object.defineProperty(m,C,U)}:function(m,A,b,C){C===void 0&&(C=b),m[C]=A[b]}),t=e&&e.__setModuleDefault||(Object.create?function(m,A){Object.defineProperty(m,"default",{enumerable:!0,value:A})}:function(m,A){m.default=A}),a=e&&e.__importStar||function(m){if(m&&m.__esModule)return m;var A={};if(m!=null)for(var b in m)b!=="default"&&Object.prototype.hasOwnProperty.call(m,b)&&i(A,m,b);return t(A,m),A},c=e&&e.__exportStar||function(m,A){for(var b in m)b!=="default"&&!Object.prototype.hasOwnProperty.call(A,b)&&i(A,m,b)},n=e&&e.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonCodes=e.KeepaliveManager=e.UniqueMessageIdProvider=e.DefaultMessageIdProvider=e.Store=e.MqttClient=e.connectAsync=e.connect=e.Client=void 0;var r=n(Ai());e.MqttClient=r.default;var s=n(ms());e.DefaultMessageIdProvider=s.default;var o=n(ih());e.UniqueMessageIdProvider=o.default;var l=n(As());e.Store=l.default;var f=a(Eh());e.connect=f.default,Object.defineProperty(e,"connectAsync",{enumerable:!0,get:function(){return f.connectAsync}});var p=n(Ss());e.KeepaliveManager=p.default,e.Client=r.default,c(Ai(),e),c(rr(),e);var g=Cr();Object.defineProperty(e,"ReasonCodes",{enumerable:!0,get:function(){return g.ReasonCodes}})}),Sh=Ae(e=>{ae(),ce(),le();var i=e&&e.__createBinding||(Object.create?function(r,s,o,l){l===void 0&&(l=o);var f=Object.getOwnPropertyDescriptor(s,o);(!f||("get"in f?!s.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(r,l,f)}:function(r,s,o,l){l===void 0&&(l=o),r[l]=s[o]}),t=e&&e.__setModuleDefault||(Object.create?function(r,s){Object.defineProperty(r,"default",{enumerable:!0,value:s})}:function(r,s){r.default=s}),a=e&&e.__importStar||function(r){if(r&&r.__esModule)return r;var s={};if(r!=null)for(var o in r)o!=="default"&&Object.prototype.hasOwnProperty.call(r,o)&&i(s,r,o);return t(s,r),s},c=e&&e.__exportStar||function(r,s){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&i(s,r,o)};Object.defineProperty(e,"__esModule",{value:!0});var n=a(Oa());e.default=n,c(Oa(),e)});const Ch=Sh();/*! Bundled license information:
|
|
1
|
+
(function(_e,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],_):(_e=typeof globalThis<"u"?globalThis:_e||self,_(_e["@stonecrop/beam"]={},_e.Vue))})(this,function(_e,_){"use strict";var Pc=Object.defineProperty;var Ra=_e=>{throw TypeError(_e)};var xc=(_e,_,Ke)=>_ in _e?Pc(_e,_,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):_e[_]=Ke;var Ve=(_e,_,Ke)=>xc(_e,typeof _!="symbol"?_+"":_,Ke),Ui=(_e,_,Ke)=>_.has(_e)||Ra("Cannot "+Ke);var x=(_e,_,Ke)=>(Ui(_e,_,"read from private field"),Ke?Ke.call(_e):_.get(_e)),Pe=(_e,_,Ke)=>_.has(_e)?Ra("Cannot add the same private member more than once"):_ instanceof WeakSet?_.add(_e):_.set(_e,Ke),Ce=(_e,_,Ke,Jt)=>(Ui(_e,_,"write to private field"),Jt?Jt.call(_e,Ke):_.set(_e,Ke),Ke),Ee=(_e,_,Ke)=>(Ui(_e,_,"access private method"),Ke);var Nr=(_e,_,Ke,Jt)=>({set _(Vr){Ce(_e,_,Vr,Ke)},get _(){return x(_e,_,Jt)}});var Ke=document.createElement("style");Ke.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-94fbdac5]{align-self:center;flex-grow:1;position:relative;display:flex;align-items:center}.beam_metadata_arrow-body[data-v-94fbdac5]{width:100%;height:10px;background:#c4c4c4}.beam_metadata_arrow-head svg[data-v-94fbdac5]{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-bf372581]{overflow:hidden;box-sizing:border-box;transition:all .2s ease-in-out;border-bottom:1px solid var(--sc-row-border-color);background:#fff}.beam_filters-heading[data-v-bf372581]{background:var(--sc-primary-color);cursor:pointer;display:flex;align-items:center;padding-left:1rem;box-sizing:border-box;font-size:1rem;padding:0 2rem}.beam_filters-heading>h1[data-v-bf372581]{font-size:1rem}.beam_filters-options[data-v-bf372581]{display:flex;flex-direction:row;column-gap:1rem;background:#fff;box-sizing:border-box;padding:0 1rem;margin:1rem 0}@media (max-width: 479px){.beam_filters-options[data-v-bf372581]{flex-direction:column}}.beam_filter-option[data-v-ba8898f7]{cursor:pointer;position:relative;margin-bottom:1rem}.beam_filter-option-heading[data-v-ba8898f7]{font-size:1rem;padding-bottom:.25rem}.beam_filter-option-select[data-v-ba8898f7]{position:relative;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--sc-row-border-color);font-weight:700;color:var(--sc-primary-text-color);font-size:.8rem;font-family:var(--sc-font-family);display:flex;align-items:stretch}label[data-v-ba8898f7]{cursor:pointer;padding:.5rem}.beam_filter-arrow[data-v-ba8898f7]{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-ba8898f7]{display:flex;align-items:center}svg[data-v-ba8898f7]{fill:var(--sc-primary-text-color);width:5px;transform:rotate(90deg)}.beam_filter-select-menu[data-v-ba8898f7]{z-index:100;border-top:none;left:0;border:1px solid var(--sc-row-border-color);padding:0rem;list-style:none;width:100%;box-sizing:border-box;max-height:200px;overflow-y:scroll;margin:0}.beam_filter-select-option[data-v-ba8898f7]{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-ba8898f7]:hover{background:var(--sc-primary-color)}.selected[data-v-ba8898f7],.selected[data-v-ba8898f7]:hover{background:var(--sc-row-border-color)}.beam_filter-container[data-v-ba8898f7]{flex-grow:1;max-width:300px;width:50%}@media (max-width: 479px){.beam_filter-container[data-v-ba8898f7]{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-4f3f0253]{position:fixed;top:0;right:0;bottom:0;left: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-14a5f31b]{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-14a5f31b]{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.checkmark[data-v-14a5f31b]{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-14a5f31b]{background-color:#fff}.container input:checked~.checkmark[data-v-14a5f31b]{background-color:var(--sc-brand-secondary)}.checkmark[data-v-14a5f31b]:after{content:"";position:absolute;display:none}.container input:checked~.checkmark[data-v-14a5f31b]:after{display:block}.container .checkmark[data-v-14a5f31b]: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-ec1a0218]{font-size:1.3125rem;color:var(--sc-primary-text-color)}.beam_item-count span[data-v-ec1a0218]{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-140e435e]{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-140e435e]{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-c65440c0]{display:flex;flex-direction:row;justify-content:space-between;align-items:baseline;gap:1rem}@media screen and (max-width: 400px){.two-column[data-v-c65440c0]{flex-direction:column;gap:0}}.column[data-v-c65440c0]{flex-grow:1;width:50%}@media screen and (max-width: 400px){.column[data-v-c65440c0]{width:100%}}.column-right[data-v-c65440c0]{text-align:right}@media screen and (max-width: 400px){.column-right[data-v-c65440c0]{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(Ke);const Jt={class:"beam_action-footer"},Vr={class:"footer-action-wrapper"},Wa=_.defineComponent({__name:"ActionFooter",emits:["click"],setup(e,{emit:i}){const t=i,a=()=>{t("click")};return(u,n)=>{const r=_.resolveComponent("BeamBtn");return _.openBlock(),_.createElementBlock("footer",Jt,[_.createElementVNode("span",Vr,[_.createVNode(r,{onClick:a},{default:_.withCtx(()=>[_.renderSlot(u.$slots,"default",{},void 0,!0)]),_:3})])])}}}),He=(e,i)=>{const t=e.__vccOpts||e;for(const[a,u]of i)t[a]=u;return t},Vi=He(Wa,[["__scopeId","data-v-37933bd1"]]),Qa={class:"beam_metadata_arrow"},Ha={class:"beam_metadata_arrow-head"},qa={id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6.74 7.78"},Ki=He(_.defineComponent({__name:"BeamArrow",props:{color:{}},setup(e){return(i,t)=>(_.openBlock(),_.createElementBlock("div",Qa,[_.createElementVNode("div",{class:"beam_metadata_arrow-body",style:_.normalizeStyle({background:i.color||"#c4c4c4"})},null,4),_.createElementVNode("div",Ha,[(_.openBlock(),_.createElementBlock("svg",qa,[_.createElementVNode("polygon",{points:"6.74 3.89 0 0 0 7.78 6.74 3.89",style:_.normalizeStyle([{fill:"#c4c4c4"},{fill:i.color||"#c4c4c4"}])},null,4)]))])]))}}),[["__scopeId","data-v-94fbdac5"]]),$a={},za={class:"beam_btn"};function Ya(e,i){return _.openBlock(),_.createElementBlock("button",za,[_.renderSlot(e.$slots,"default",{},()=>[i[0]||(i[0]=_.createTextVNode("Action"))],!0)])}const Wi=He($a,[["render",Ya],["__scopeId","data-v-bc768596"]]),Ga={class:"beam_day-divider"},Kr=He(_.defineComponent({__name:"BeamDayDivider",props:{item:{}},setup(e){const i=_.computed(()=>{if(!e.item.date||isNaN(Date.parse(e.item.date)))return e.item.date;const t=new Date(e.item.date);if(e.item.dateFormat)switch(e.item.dateFormat.toLowerCase()){case"iso":return t.toISOString()}return t.toDateString()});return(t,a)=>(_.openBlock(),_.createElementBlock(_.Fragment,null,[_.createElementVNode("div",Ga,[_.createElementVNode("h2",null,_.toDisplayString(i.value),1)]),_.renderSlot(t.$slots,"default",{},void 0,!0)],64))}}),[["__scopeId","data-v-160cf6ef"]]),Ja={class:"beam_filters-options"},Qi=He(_.defineComponent({__name:"BeamFilter",setup(e){const i=_.useTemplateRef("beam-filters-header"),t=_.useTemplateRef("beam-filters"),a=_.ref(!1),u=_.ref(),n=_.ref(),r=()=>{a.value=!a.value};_.onMounted(()=>{i.value&&t.value&&(u.value=s(i.value),n.value=s(t.value),t.value.style.height=u.value)});const s=o=>{const l=o.getBoundingClientRect().height,f=parseInt(getComputedStyle(o).marginTop),p=parseInt(getComputedStyle(o).marginBottom);return l+f+p+"px"};return(o,l)=>{const f=_.resolveComponent("ToggleArrow"),p=_.resolveComponent("BeamHeading");return _.openBlock(),_.createElementBlock("div",{ref:"beam-filters",class:"beam_filters",style:_.normalizeStyle({height:a.value?"100%":u.value})},[_.createElementVNode("div",{ref:"beam-filters-header",onClick:r,class:"beam_filters-heading"},[_.createVNode(f,{open:a.value},null,8,["open"]),_.createVNode(p,null,{default:_.withCtx(()=>l[0]||(l[0]=[_.createTextVNode("Filter")])),_:1})],512),_.createElementVNode("div",Ja,[_.renderSlot(o.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-bf372581"]]),Za={class:"beam_filter-container"},Xa={class:"beam_filter-option-select"},el={class:"beam_filter-label"},tl={key:0,ref:"menu",class:"beam_filter-select-menu"},rl=["data-value","onClick"],Hi=He(_.defineComponent({__name:"BeamFilterOption",props:{choices:{default:()=>[]},title:{default:"title"}},emits:["select"],setup(e,{emit:i}){const t=i,a=_.ref(!1),u=_.ref(e.choices[0].label),n=_.ref(e.choices[0].value),r=s=>{u.value=s.label,n.value=s.value,t("select",s)};return(s,o)=>{const l=_.resolveComponent("BeamHeading");return _.openBlock(),_.createElementBlock("div",Za,[_.createVNode(l,{class:"beam_filter-option-heading"},{default:_.withCtx(()=>[_.createTextVNode(_.toDisplayString(s.title),1)]),_:1}),_.createElementVNode("div",{onClick:o[0]||(o[0]=f=>a.value=!a.value),class:"beam_filter-option"},[_.createElementVNode("div",Xa,[o[1]||(o[1]=_.createElementVNode("div",{class:"beam_filter-arrow"},[_.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[_.createElementVNode("polygon",{points:"0 70.71 0 0 35.36 35.36 0 70.71"})])],-1)),_.createElementVNode("div",el,[_.createElementVNode("label",null,_.toDisplayString(u.value),1)])]),a.value?(_.openBlock(),_.createElementBlock("ul",tl,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(s.choices,f=>(_.openBlock(),_.createElementBlock("li",{class:_.normalizeClass([{selected:u.value==f.label},"beam_filter-select-option"]),"data-value":f.value,key:f.value,onClick:p=>r(f)},_.toDisplayString(f.label),11,rl))),128))],512)):_.createCommentVNode("",!0)])])}}}),[["__scopeId","data-v-ba8898f7"]]),nl={},il={class:"beam_header"};function ol(e,i){return _.openBlock(),_.createElementBlock("h1",il,[_.renderSlot(e.$slots,"default",{},void 0,!0)])}const qi=He(nl,[["render",ol],["__scopeId","data-v-5182a4d5"]]),sl={class:"beam_metadata"},al={class:"beam_metadata_content"},ll={class:"beam_metadata_block"},ul={class:"beam_metadata_heading"},$i=He(_.defineComponent({__name:"BeamMetadata",props:{order:{}},setup(e){return(i,t)=>(_.openBlock(),_.createElementBlock("div",sl,[_.createElementVNode("div",al,[_.renderSlot(i.$slots,"default",{},()=>[t[1]||(t[1]=_.createElementVNode("div",{class:"beam_metadata_header beam_metadata--two-column"},null,-1)),_.createElementVNode("div",ll,[_.createElementVNode("p",ul,[t[0]||(t[0]=_.createTextVNode(" Status: ")),_.createElementVNode("span",{class:_.normalizeClass([{alert:!i.order.complete},"beam_metadata--normal"])},_.toDisplayString(i.order.complete?"Complete":"In Progress"),3)])]),t[2]||(t[2]=_.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)]),t[3]||(t[3]=_.createElementVNode("hr",null,null,-1))]))}}),[["__scopeId","data-v-80484331"]]),cl={class:"beam_modal"},zi=He(_.defineComponent({__name:"BeamModal",props:{showModal:{type:Boolean}},setup(e){return(i,t)=>{const a=_.resolveComponent("BeamBtn"),u=_.resolveComponent("portal");return _.openBlock(),_.createBlock(u,{to:"beam_modal_outlet"},{default:_.withCtx(()=>[_.withDirectives(_.createElementVNode("div",cl,[_.createVNode(a,{onClick:t[0]||(t[0]=n=>i.$emit("closemodal"))},{default:_.withCtx(()=>t[3]||(t[3]=[_.createTextVNode("Close Modal")])),_:1}),_.renderSlot(i.$slots,"default",{onClosemodal:t[1]||(t[1]=n=>i.$emit("closemodal")),onConfirmmodal:t[2]||(t[2]=n=>i.$emit("confirmmodal"))},void 0,!0)],512),[[_.vShow,i.showModal]])]),_:3})}}}),[["__scopeId","data-v-4f3f0253"]]),Yi=_.defineComponent({__name:"BeamModalOutlet",emits:["confirmmodal","closemodal"],setup(e){return(i,t)=>{const a=_.resolveComponent("portal-target");return _.openBlock(),_.createBlock(a,{name:"beam_modal_outlet"})}}}),hl={class:"beam_metadata_heading"},Gi=_.defineComponent({__name:"BeamProgress",props:{label:{default:"Status"},progressMessage:{default:"In Progress"},completeMessage:{default:"Complete"},complete:{type:Boolean,default:!1}},setup(e){const i=_.computed(()=>e.complete?e.completeMessage:e.progressMessage);return(t,a)=>(_.openBlock(),_.createElementBlock("p",hl,[_.createTextVNode(_.toDisplayString(t.label)+": ",1),_.createElementVNode("span",{class:_.normalizeClass([{"beam--alert":!t.complete},"beam--normal"])},_.toDisplayString(i.value),3)]))}}),fl={},dl={class:"beam_modal-confirm"};function pl(e,i){const t=_.resolveComponent("BeamBtn");return _.openBlock(),_.createElementBlock("div",dl,[i[4]||(i[4]=_.createElementVNode("h2",null,"Would you like to continue?",-1)),_.createVNode(t,{onClick:i[0]||(i[0]=a=>e.$emit("confirmmodal"))},{default:_.withCtx(()=>i[2]||(i[2]=[_.createTextVNode("Yes")])),_:1}),_.createVNode(t,{onClick:i[1]||(i[1]=a=>e.$emit("confirmmodal"))},{default:_.withCtx(()=>i[3]||(i[3]=[_.createTextVNode("No")])),_:1})])}const Ji=He(fl,[["render",pl],["__scopeId","data-v-5b430dca"]]),gl={},ml={class:"fixed-top"};function Al(e,i){return _.openBlock(),_.createElementBlock("div",ml,[_.renderSlot(e.$slots,"default",{},void 0,!0)])}const Zi=He(gl,[["render",Al],["__scopeId","data-v-a38a41d0"]]),bl={class:"container"},Wr=He(_.defineComponent({__name:"ItemCheck",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(e){const i=_.useModel(e,"modelValue");return(t,a)=>(_.openBlock(),_.createElementBlock("label",bl,[_.withDirectives(_.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":a[0]||(a[0]=u=>i.value=u),tabindex:"-1"},null,512),[[_.vModelCheckbox,i.value]]),a[1]||(a[1]=_.createElementVNode("div",{class:"checkmark",tabindex:"0"},null,-1))]))}}),[["__scopeId","data-v-14a5f31b"]]);typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Xi=()=>{};function yl(e,i){function t(...a){return new Promise((u,n)=>{Promise.resolve(e(()=>i.apply(this,a),{fn:i,thisArg:this,args:a})).then(u).catch(n)})}return t}function wl(e,i={}){let t,a,u=Xi;const n=o=>{clearTimeout(o),u(),u=Xi};let r;return o=>{const l=_.toValue(e),f=_.toValue(i.maxWait);return t&&n(t),l<=0||f!==void 0&&f<=0?(a&&(n(a),a=null),Promise.resolve(o())):new Promise((p,g)=>{u=i.rejectOnCancel?g:p,r=o,f&&!a&&(a=setTimeout(()=>{t&&n(t),a=null,p(r())},f)),t=setTimeout(()=>{a&&n(a),a=null,p(o())},l)})}}function vl(e,i=200,t={}){return yl(wl(i,t),e)}const _l={class:"beam_item-count"},El=["contenteditable"],Sl={key:0},Cl={key:1},Qr=He(_.defineComponent({__name:"ItemCount",props:_.mergeModels({denominator:{},debounce:{default:300},editable:{default:!0},uom:{default:""}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const i=_.useModel(e,"modelValue"),t=_.computed(()=>i.value===e.denominator),a=r=>{const s=Number(r.target.innerHTML)||0;i.value=Math.min(s,e.denominator)},u=vl(r=>a(r),e.debounce),n=async r=>await u(r);return(r,s)=>(_.openBlock(),_.createElementBlock("div",_l,[_.createElementVNode("span",{contenteditable:r.editable,class:_.normalizeClass({"beam--alert":!t.value}),onClick:_.withModifiers(a,["stop","prevent"]),onInput:_.withModifiers(n,["stop","prevent"]),onPaste:a},_.toDisplayString(i.value),43,El),r.denominator?(_.openBlock(),_.createElementBlock("span",Sl,"/"+_.toDisplayString(r.denominator),1)):_.createCommentVNode("",!0),r.uom?(_.openBlock(),_.createElementBlock("span",Cl," "+_.toDisplayString(r.uom),1)):_.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-ec1a0218"]]),Il=["href"],eo=He(_.defineComponent({__name:"ListAnchor",props:{to:{default:""}},setup(e){return(i,t)=>(_.openBlock(),_.createElementBlock("a",{href:i.to,class:"beam_list-anchor"},[_.renderSlot(i.$slots,"default",{},void 0,!0)],8,Il))}}),[["__scopeId","data-v-7e3ecf0d"]]),Tl={tabindex:"0",class:"beam_list-item"},kl={class:"beam_list-text"},Bl={class:"beam--bold"},dr=He(_.defineComponent({__name:"ListItem",props:{item:{}},emits:["update"],setup(e,{emit:i}){const t=i,a=_.ref(e.item);return _.watch(a,u=>{t("update",u)},{deep:!0}),(u,n)=>(_.openBlock(),_.createElementBlock("li",Tl,[_.createElementVNode("div",kl,[_.createElementVNode("label",Bl,_.toDisplayString(a.value.label),1),_.createElementVNode("p",null,_.toDisplayString(a.value.description),1)]),a.value.count?(_.openBlock(),_.createBlock(Qr,{key:0,modelValue:a.value.count.count,"onUpdate:modelValue":n[0]||(n[0]=r=>a.value.count.count=r),debounce:a.value.debounce,denominator:a.value.count.of,editable:!0,uom:a.value.count.uom},null,8,["modelValue","debounce","denominator","uom"])):_.createCommentVNode("",!0),a.value.hasOwnProperty("checked")?(_.openBlock(),_.createBlock(Wr,{key:1,modelValue:a.value.checked,"onUpdate:modelValue":n[1]||(n[1]=r=>a.value.checked=r)},null,8,["modelValue"])):_.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-634dd647"]]),Ol={class:"beam_list-view"},to=He(_.defineComponent({__name:"ListView",props:{items:{}},emits:["update","scrollbottom"],setup(e,{emit:i}){const t=i;_.onMounted(()=>{window.addEventListener("scroll",u)}),_.onUnmounted(()=>{window.removeEventListener("scroll",u)});const a=n=>t("update",n),u=()=>{const n=document.documentElement.scrollHeight-window.innerHeight,r=document.documentElement.scrollTop;n-r<=2&&t("scrollbottom")};return(n,r)=>(_.openBlock(),_.createElementBlock("ul",Ol,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(n.items,s=>(_.openBlock(),_.createElementBlock("li",{key:s.barcode||s.label},[s.linkComponent=="BeamDayDivider"?(_.openBlock(),_.createBlock(Kr,{key:0,item:s},null,8,["item"])):s.linkComponent?(_.openBlock(),_.createBlock(_.resolveDynamicComponent(s.linkComponent),{key:1,to:s.route,tabindex:"-1"},{default:_.withCtx(()=>[_.createVNode(dr,{item:s,onUpdate:a},null,8,["item"])]),_:2},1032,["to"])):(_.openBlock(),_.createBlock(dr,{key:2,item:s,onUpdate:a},null,8,["item"]))]))),128))]))}}),[["__scopeId","data-v-d536b2a7"]]),Pl={class:"beam_navbar"},ro=He(_.defineComponent({__name:"Navbar",emits:["click"],setup(e,{emit:i}){const t=i,a=()=>{t("click")};return(u,n)=>{const r=_.resolveComponent("BeamHeading"),s=_.resolveComponent("BeamBtn");return _.openBlock(),_.createElementBlock("nav",Pl,[_.renderSlot(u.$slots,"title",{},()=>[_.createVNode(r,null,{default:_.withCtx(()=>n[0]||(n[0]=[_.createTextVNode("TITLE")])),_:1})],!0),_.createVNode(s,{onClick:a},{default:_.withCtx(()=>[_.renderSlot(u.$slots,"navbaraction",{},()=>[n[1]||(n[1]=_.createTextVNode("Action"))],!0)]),_:3})])}}}),[["__scopeId","data-v-cfc4c14e"]]);function xl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pr={exports:{}},Rl=pr.exports,no;function Ml(){return no||(no=1,function(e,i){(function(t,a){e.exports=a()})(Rl,function(){var t={attachTo:function(a,u){if(a.scannerDetectionData!==void 0)throw new Error("onScan.js is already initialized for DOM element "+a);var n={onScan:function(r,s){},onScanError:function(r){},onKeyProcess:function(r,s){},onKeyDetect:function(r,s){},onPaste:function(r,s){},keyCodeMapper:function(r){return t.decodeKeyEvent(r)},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 u=this._mergeOptions(n,u),a.scannerDetectionData={options:u,vars:{firstCharTime:0,lastCharTime:0,accumulatedString:"",testTimer:!1,longPressTimeStart:0,longPressed:!1}},u.reactToPaste===!0&&a.addEventListener("paste",this._handlePaste,u.captureEvents),u.scanButtonKeyCode!==!1&&a.addEventListener("keyup",this._handleKeyUp,u.captureEvents),(u.reactToKeydown===!0||u.scanButtonKeyCode!==!1)&&a.addEventListener("keydown",this._handleKeyDown,u.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,u){switch(a.scannerDetectionData.options.reactToPaste){case!0:u.reactToPaste===!1&&a.removeEventListener("paste",this._handlePaste);break;case!1:u.reactToPaste===!0&&a.addEventListener("paste",this._handlePaste);break}switch(a.scannerDetectionData.options.scanButtonKeyCode){case!1:u.scanButtonKeyCode!==!1&&a.addEventListener("keyup",this._handleKeyUp);break;default:u.scanButtonKeyCode===!1&&a.removeEventListener("keyup",this._handleKeyUp);break}return a.scannerDetectionData.options=this._mergeOptions(a.scannerDetectionData.options,u),this._reinitialize(a),this},decodeKeyEvent:function(a){var u=this._getNormalizedKeyNum(a);switch(!0){case(u>=48&&u<=90):case(u>=106&&u<=111):if(a.key!==void 0&&a.key!=="")return a.key;var n=String.fromCharCode(u);switch(a.shiftKey){case!1:n=n.toLowerCase();break;case!0:n=n.toUpperCase();break}return n;case(u>=96&&u<=105):return 0+(u-96)}return""},simulate:function(a,u){return this._reinitialize(a),Array.isArray(u)?u.forEach(function(n){var r={};(typeof n=="object"||typeof n=="function")&&n!==null?r=n:r.keyCode=parseInt(n);var s=new KeyboardEvent("keydown",r);document.dispatchEvent(s)}):this._validateScanCode(a,u),this},_reinitialize:function(a){var u=a.scannerDetectionData.vars;u.firstCharTime=0,u.lastCharTime=0,u.accumulatedString=""},_isFocusOnIgnoredElement:function(a){var u=a.scannerDetectionData.options.ignoreIfFocusOn;if(!u)return!1;var n=document.activeElement;if(Array.isArray(u)){for(var r=0;r<u.length;r++)if(n.matches(u[r])===!0)return!0}else if(n.matches(u))return!0;return!1},_validateScanCode:function(a,u){var n=a.scannerDetectionData,r=n.options,s=n.options.singleScanQty,o=n.vars.firstCharTime,l=n.vars.lastCharTime,f={},p;switch(!0){case u.length<r.minLength:f={message:"Receieved code is shorter then minimal length"};break;case l-o>u.length*r.avgTimeByChar:f={message:"Receieved code was not entered in time"};break;default:return r.onScan.call(a,u,s),p=new CustomEvent("scan",{detail:{scanCode:u,qty:s}}),a.dispatchEvent(p),t._reinitialize(a),!0}return f.scanCode=u,f.scanDuration=l-o,f.avgTimeByChar=r.avgTimeByChar,f.minLength=r.minLength,r.onScanError.call(a,f),p=new CustomEvent("scanError",{detail:f}),a.dispatchEvent(p),t._reinitialize(a),!1},_mergeOptions:function(a,u){var n={},r;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(n[r]=a[r]);for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(n[r]=u[r]);return n},_getNormalizedKeyNum:function(a){return a.which||a.keyCode},_handleKeyDown:function(a){var u=t._getNormalizedKeyNum(a),n=this.scannerDetectionData.options,r=this.scannerDetectionData.vars,s=!1;if(n.onKeyDetect.call(this,u,a)!==!1&&!t._isFocusOnIgnoredElement(this)){if(n.scanButtonKeyCode!==!1&&u==n.scanButtonKeyCode){r.longPressed||(r.longPressTimer=setTimeout(n.onScanButtonLongPress,n.scanButtonLongPressTime,this),r.longPressed=!0);return}switch(!0){case(r.firstCharTime&&n.suffixKeyCodes.indexOf(u)!==-1):a.preventDefault(),a.stopImmediatePropagation(),s=!0;break;case(!r.firstCharTime&&n.prefixKeyCodes.indexOf(u)!==-1):a.preventDefault(),a.stopImmediatePropagation(),s=!1;break;default:var o=n.keyCodeMapper.call(this,a);if(o===null)return;r.accumulatedString+=o,n.preventDefault&&a.preventDefault(),n.stopPropagation&&a.stopImmediatePropagation(),s=!1;break}r.firstCharTime||(r.firstCharTime=Date.now()),r.lastCharTime=Date.now(),r.testTimer&&clearTimeout(r.testTimer),s?(t._validateScanCode(this,r.accumulatedString),r.testTimer=!1):r.testTimer=setTimeout(t._validateScanCode,n.timeBeforeScanTest,this,r.accumulatedString),n.onKeyProcess.call(this,o,a)}},_handlePaste:function(a){var u=this.scannerDetectionData.options,n=this.scannerDetectionData.vars,r=(event.clipboardData||window.clipboardData).getData("text");t._isFocusOnIgnoredElement(this)||(a.preventDefault(),u.stopPropagation&&a.stopImmediatePropagation(),u.onPaste.call(this,r,event),n.firstCharTime=0,n.lastCharTime=0,t._validateScanCode(this,r))},_handleKeyUp:function(a){if(!t._isFocusOnIgnoredElement(this)){var u=t._getNormalizedKeyNum(a);u==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 t})}(pr)),pr.exports}var Ul=Ml();const io=xl(Ul),Dl={id:"scan_input"},oo=_.defineComponent({__name:"ScanInput",props:{scanHandler:{type:Function}},emits:["scanInstance"],setup(e,{emit:i}){const t=i,a=e;return _.onMounted(()=>{const u=io.attachTo(window,{onScan:a.scanHandler});t("scanInstance",u)}),_.onUnmounted(()=>{io.detachFrom(window)}),(u,n)=>(_.openBlock(),_.createElementBlock("div",Dl))}}),so=He(_.defineComponent({__name:"SegmentedDisplay",props:{displayInput:{default:120.2568},decimalPlaces:{default:2},displayColor:{default:"gray"},textColor:{default:"white"}},setup(e){const i=_.computed(()=>e.displayInput===0?0 .toFixed(e.decimalPlaces):e.displayInput.toFixed(e.decimalPlaces)),t=a=>a.substr(0,2)=="--"?`var(${a})`:a;return(a,u)=>(_.openBlock(),_.createElementBlock("div",{class:"segmented-display",style:_.normalizeStyle({background:t(a.displayColor)})},[_.createElementVNode("h1",{class:"segmented-display-output",style:_.normalizeStyle({color:t(a.textColor)})},_.toDisplayString(i.value),5)],4))}}),[["__scopeId","data-v-140e435e"]]),Ll={class:"column column-left"},Nl={class:"column column-right"},ao=He(_.defineComponent({__name:"SplitColumn",props:{justifyContent:{},alignItems:{}},setup(e){return(i,t)=>(_.openBlock(),_.createElementBlock("div",{class:"two-column",style:_.normalizeStyle({justifyContent:i.justifyContent||"space-between",alignItems:i.alignItems||"flex-start"})},[_.createElementVNode("div",Ll,[_.renderSlot(i.$slots,"left",{},void 0,!0)]),_.createElementVNode("div",Nl,[_.renderSlot(i.$slots,"right",{},void 0,!0)])],4))}}),[["__scopeId","data-v-c65440c0"]]),lo=He(_.defineComponent({__name:"ToggleArrow",props:{open:{type:Boolean}},setup(e){return(i,t)=>(_.openBlock(),_.createElementBlock("div",{class:_.normalizeClass(["arrow-icon",{open:i.open}])},t[0]||(t[0]=[_.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35.36 70.71"},[_.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,Fl=Object.getOwnPropertyDescriptor,jl=Object.getOwnPropertyNames,Vl=Object.prototype.hasOwnProperty,Ge=(e,i)=>()=>(e&&(i=e(e=0)),i),Ae=(e,i)=>()=>(i||e((i={exports:{}}).exports,i),i.exports),Mt=(e,i)=>{for(var t in i)Hr(e,t,{get:i[t],enumerable:!0})},Kl=(e,i,t,a)=>{if(i&&typeof i=="object"||typeof i=="function")for(let u of jl(i))!Vl.call(e,u)&&u!==t&&Hr(e,u,{get:()=>i[u],enumerable:!(a=Fl(i,u))||a.enumerable});return e},Ue=e=>Kl(Hr({},"__esModule",{value:!0}),e),ae=Ge(()=>{}),xe={};Mt(xe,{_debugEnd:()=>In,_debugProcess:()=>Cn,_events:()=>Kn,_eventsCount:()=>Wn,_exiting:()=>hn,_fatalExceptions:()=>_n,_getActiveHandles:()=>mo,_getActiveRequests:()=>go,_kill:()=>pn,_linkedBinding:()=>fo,_maxListeners:()=>Vn,_preload_modules:()=>Nn,_rawDebug:()=>ln,_startProfilerIdleNotifier:()=>Tn,_stopProfilerIdleNotifier:()=>kn,_tickCallback:()=>Sn,abort:()=>xn,addListener:()=>Qn,allowedNodeEnvironmentFlags:()=>wn,arch:()=>zr,argv:()=>Jr,argv0:()=>Ln,assert:()=>Ao,binding:()=>rn,chdir:()=>sn,config:()=>fn,cpuUsage:()=>or,cwd:()=>on,debugPort:()=>Dn,default:()=>Zn,dlopen:()=>po,domain:()=>cn,emit:()=>Yn,emitWarning:()=>tn,env:()=>Gr,execArgv:()=>Zr,execPath:()=>Un,exit:()=>bn,features:()=>vn,hasUncaughtExceptionCaptureCallback:()=>bo,hrtime:()=>gr,kill:()=>An,listeners:()=>wo,memoryUsage:()=>mn,moduleLoadList:()=>un,nextTick:()=>co,off:()=>qn,on:()=>gt,once:()=>Hn,openStdin:()=>yn,pid:()=>Rn,platform:()=>Yr,ppid:()=>Mn,prependListener:()=>Gn,prependOnceListener:()=>Jn,reallyExit:()=>dn,release:()=>an,removeAllListeners:()=>zn,removeListener:()=>$n,resourceUsage:()=>gn,setSourceMapsEnabled:()=>Fn,setUncaughtExceptionCaptureCallback:()=>En,stderr:()=>On,stdin:()=>Pn,stdout:()=>Bn,title:()=>$r,umask:()=>nn,uptime:()=>yo,version:()=>Xr,versions:()=>en});function qr(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function Wl(){!Ut||!Dt||(Ut=!1,Dt.length?ht=Dt.concat(ht):ir=-1,ht.length&&uo())}function uo(){if(!Ut){var e=setTimeout(Wl,0);Ut=!0;for(var i=ht.length;i;){for(Dt=ht,ht=[];++ir<i;)Dt&&Dt[ir].run();ir=-1,i=ht.length}Dt=null,Ut=!1,clearTimeout(e)}}function co(e){var i=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)i[t-1]=arguments[t];ht.push(new ho(e,i)),ht.length===1&&!Ut&&setTimeout(uo,0)}function ho(e,i){this.fun=e,this.array=i}function et(){}function fo(e){qr("_linkedBinding")}function po(e){qr("dlopen")}function go(){return[]}function mo(){return[]}function Ao(e,i){if(!e)throw new Error(i||"assertion error")}function bo(){return!1}function yo(){return mt.now()/1e3}function gr(e){var i=Math.floor((Date.now()-mt.now())*.001),t=mt.now()*.001,a=Math.floor(t)+i,u=Math.floor(t%1*1e9);return e&&(a=a-e[0],u=u-e[1],u<0&&(a--,u+=mr)),[a,u]}function gt(){return Zn}function wo(e){return[]}var ht,Ut,Dt,ir,$r,zr,Yr,Gr,Jr,Zr,Xr,en,tn,rn,nn,on,sn,an,ln,un,cn,hn,fn,dn,pn,or,gn,mn,An,bn,yn,wn,vn,_n,En,Sn,Cn,In,Tn,kn,Bn,On,Pn,xn,Rn,Mn,Un,Dn,Ln,Nn,Fn,mt,jn,mr,Vn,Kn,Wn,Qn,Hn,qn,$n,zn,Yn,Gn,Jn,Zn,Ql=Ge(()=>{ae(),ue(),le(),ht=[],Ut=!1,ir=-1,ho.prototype.run=function(){this.fun.apply(null,this.array)},$r="browser",zr="x64",Yr="browser",Gr={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},Jr=["/usr/bin/node"],Zr=[],Xr="v16.8.0",en={},tn=function(e,i){console.warn((i?i+": ":"")+e)},rn=function(e){qr("binding")},nn=function(e){return 0},on=function(){return"/"},sn=function(e){},an={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},ln=et,un=[],cn={},hn=!1,fn={},dn=et,pn=et,or=function(){return{}},gn=or,mn=or,An=et,bn=et,yn=et,wn={},vn={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},_n=et,En=et,Sn=et,Cn=et,In=et,Tn=et,kn=et,Bn=void 0,On=void 0,Pn=void 0,xn=et,Rn=2,Mn=1,Un="/bin/usr/node",Dn=9229,Ln="node",Nn=[],Fn=et,mt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},mt.now===void 0&&(jn=Date.now(),mt.timing&&mt.timing.navigationStart&&(jn=mt.timing.navigationStart),mt.now=()=>Date.now()-jn),mr=1e9,gr.bigint=function(e){var i=gr(e);return typeof BigInt>"u"?i[0]*mr+i[1]:BigInt(i[0]*mr)+BigInt(i[1])},Vn=10,Kn={},Wn=0,Qn=gt,Hn=gt,qn=gt,$n=gt,zn=gt,Yn=et,Gn=gt,Jn=gt,Zn={version:Xr,versions:en,arch:zr,platform:Yr,release:an,_rawDebug:ln,moduleLoadList:un,binding:rn,_linkedBinding:fo,_events:Kn,_eventsCount:Wn,_maxListeners:Vn,on:gt,addListener:Qn,once:Hn,off:qn,removeListener:$n,removeAllListeners:zn,emit:Yn,prependListener:Gn,prependOnceListener:Jn,listeners:wo,domain:cn,_exiting:hn,config:fn,dlopen:po,uptime:yo,_getActiveRequests:go,_getActiveHandles:mo,reallyExit:dn,_kill:pn,cpuUsage:or,resourceUsage:gn,memoryUsage:mn,kill:An,exit:bn,openStdin:yn,allowedNodeEnvironmentFlags:wn,assert:Ao,features:vn,_fatalExceptions:_n,setUncaughtExceptionCaptureCallback:En,hasUncaughtExceptionCaptureCallback:bo,emitWarning:tn,nextTick:co,_tickCallback:Sn,_debugProcess:Cn,_debugEnd:In,_startProfilerIdleNotifier:Tn,_stopProfilerIdleNotifier:kn,stdout:Bn,stdin:Pn,stderr:On,abort:xn,umask:nn,chdir:sn,cwd:on,env:Gr,title:$r,argv:Jr,execArgv:Zr,pid:Rn,ppid:Mn,execPath:Un,debugPort:Dn,hrtime:gr,argv0:Ln,_preload_modules:Nn,setSourceMapsEnabled:Fn}}),le=Ge(()=>{Ql()}),Je={};Mt(Je,{Buffer:()=>Ar,INSPECT_MAX_BYTES:()=>vo,default:()=>At,kMaxLength:()=>_o});function Hl(){if(Xn)return Zt;Xn=!0,Zt.byteLength=s,Zt.toByteArray=l,Zt.fromByteArray=g;for(var e=[],i=[],t=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,n=a.length;u<n;++u)e[u]=a[u],i[a.charCodeAt(u)]=u;i[45]=62,i[95]=63;function r(m){var A=m.length;if(A%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=m.indexOf("=");b===-1&&(b=A);var C=b===A?0:4-b%4;return[b,C]}function s(m){var A=r(m),b=A[0],C=A[1];return(b+C)*3/4-C}function o(m,A,b){return(A+b)*3/4-b}function l(m){var A,b=r(m),C=b[0],U=b[1],I=new t(o(m,C,U)),v=0,L=U>0?C-4:C,F;for(F=0;F<L;F+=4)A=i[m.charCodeAt(F)]<<18|i[m.charCodeAt(F+1)]<<12|i[m.charCodeAt(F+2)]<<6|i[m.charCodeAt(F+3)],I[v++]=A>>16&255,I[v++]=A>>8&255,I[v++]=A&255;return U===2&&(A=i[m.charCodeAt(F)]<<2|i[m.charCodeAt(F+1)]>>4,I[v++]=A&255),U===1&&(A=i[m.charCodeAt(F)]<<10|i[m.charCodeAt(F+1)]<<4|i[m.charCodeAt(F+2)]>>2,I[v++]=A>>8&255,I[v++]=A&255),I}function f(m){return e[m>>18&63]+e[m>>12&63]+e[m>>6&63]+e[m&63]}function p(m,A,b){for(var C,U=[],I=A;I<b;I+=3)C=(m[I]<<16&16711680)+(m[I+1]<<8&65280)+(m[I+2]&255),U.push(f(C));return U.join("")}function g(m){for(var A,b=m.length,C=b%3,U=[],I=16383,v=0,L=b-C;v<L;v+=I)U.push(p(m,v,v+I>L?L:v+I));return C===1?(A=m[b-1],U.push(e[A>>2]+e[A<<4&63]+"==")):C===2&&(A=(m[b-2]<<8)+m[b-1],U.push(e[A>>10]+e[A>>4&63]+e[A<<2&63]+"=")),U.join("")}return Zt}function ql(){return ei?sr:(ei=!0,sr.read=function(e,i,t,a,u){var n,r,s=u*8-a-1,o=(1<<s)-1,l=o>>1,f=-7,p=t?u-1:0,g=t?-1:1,m=e[i+p];for(p+=g,n=m&(1<<-f)-1,m>>=-f,f+=s;f>0;n=n*256+e[i+p],p+=g,f-=8);for(r=n&(1<<-f)-1,n>>=-f,f+=a;f>0;r=r*256+e[i+p],p+=g,f-=8);if(n===0)n=1-l;else{if(n===o)return r?NaN:(m?-1:1)*(1/0);r=r+Math.pow(2,a),n=n-l}return(m?-1:1)*r*Math.pow(2,n-a)},sr.write=function(e,i,t,a,u,n){var r,s,o,l=n*8-u-1,f=(1<<l)-1,p=f>>1,g=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=a?0:n-1,A=a?1:-1,b=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(s=isNaN(i)?1:0,r=f):(r=Math.floor(Math.log(i)/Math.LN2),i*(o=Math.pow(2,-r))<1&&(r--,o*=2),r+p>=1?i+=g/o:i+=g*Math.pow(2,1-p),i*o>=2&&(r++,o/=2),r+p>=f?(s=0,r=f):r+p>=1?(s=(i*o-1)*Math.pow(2,u),r=r+p):(s=i*Math.pow(2,p-1)*Math.pow(2,u),r=0));u>=8;e[t+m]=s&255,m+=A,s/=256,u-=8);for(r=r<<u|s,l+=u;l>0;e[t+m]=r&255,m+=A,r/=256,l-=8);e[t+m-A]|=b*128},sr)}function $l(){if(ti)return Bt;ti=!0;let e=Hl(),i=ql(),t=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Bt.Buffer=r,Bt.SlowBuffer=U,Bt.INSPECT_MAX_BYTES=50;let a=2147483647;Bt.kMaxLength=a,r.TYPED_ARRAY_SUPPORT=u(),!r.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 u(){try{let h=new Uint8Array(1),c={foo:function(){return 42}};return Object.setPrototypeOf(c,Uint8Array.prototype),Object.setPrototypeOf(h,c),h.foo()===42}catch{return!1}}Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}});function n(h){if(h>a)throw new RangeError('The value "'+h+'" is invalid for option "size"');let c=new Uint8Array(h);return Object.setPrototypeOf(c,r.prototype),c}function r(h,c,d){if(typeof h=="number"){if(typeof c=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(h)}return s(h,c,d)}r.poolSize=8192;function s(h,c,d){if(typeof h=="string")return p(h,c);if(ArrayBuffer.isView(h))return m(h);if(h==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h);if($(h,ArrayBuffer)||h&&$(h.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($(h,SharedArrayBuffer)||h&&$(h.buffer,SharedArrayBuffer)))return A(h,c,d);if(typeof h=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let y=h.valueOf&&h.valueOf();if(y!=null&&y!==h)return r.from(y,c,d);let T=b(h);if(T)return T;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof h[Symbol.toPrimitive]=="function")return r.from(h[Symbol.toPrimitive]("string"),c,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h)}r.from=function(h,c,d){return s(h,c,d)},Object.setPrototypeOf(r.prototype,Uint8Array.prototype),Object.setPrototypeOf(r,Uint8Array);function o(h){if(typeof h!="number")throw new TypeError('"size" argument must be of type number');if(h<0)throw new RangeError('The value "'+h+'" is invalid for option "size"')}function l(h,c,d){return o(h),h<=0?n(h):c!==void 0?typeof d=="string"?n(h).fill(c,d):n(h).fill(c):n(h)}r.alloc=function(h,c,d){return l(h,c,d)};function f(h){return o(h),n(h<0?0:C(h)|0)}r.allocUnsafe=function(h){return f(h)},r.allocUnsafeSlow=function(h){return f(h)};function p(h,c){if((typeof c!="string"||c==="")&&(c="utf8"),!r.isEncoding(c))throw new TypeError("Unknown encoding: "+c);let d=I(h,c)|0,y=n(d),T=y.write(h,c);return T!==d&&(y=y.slice(0,T)),y}function g(h){let c=h.length<0?0:C(h.length)|0,d=n(c);for(let y=0;y<c;y+=1)d[y]=h[y]&255;return d}function m(h){if($(h,Uint8Array)){let c=new Uint8Array(h);return A(c.buffer,c.byteOffset,c.byteLength)}return g(h)}function A(h,c,d){if(c<0||h.byteLength<c)throw new RangeError('"offset" is outside of buffer bounds');if(h.byteLength<c+(d||0))throw new RangeError('"length" is outside of buffer bounds');let y;return c===void 0&&d===void 0?y=new Uint8Array(h):d===void 0?y=new Uint8Array(h,c):y=new Uint8Array(h,c,d),Object.setPrototypeOf(y,r.prototype),y}function b(h){if(r.isBuffer(h)){let c=C(h.length)|0,d=n(c);return d.length===0||h.copy(d,0,0,c),d}if(h.length!==void 0)return typeof h.length!="number"||O(h.length)?n(0):g(h);if(h.type==="Buffer"&&Array.isArray(h.data))return g(h.data)}function C(h){if(h>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return h|0}function U(h){return+h!=h&&(h=0),r.alloc(+h)}r.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==r.prototype},r.compare=function(h,c){if($(h,Uint8Array)&&(h=r.from(h,h.offset,h.byteLength)),$(c,Uint8Array)&&(c=r.from(c,c.offset,c.byteLength)),!r.isBuffer(h)||!r.isBuffer(c))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===c)return 0;let d=h.length,y=c.length;for(let T=0,K=Math.min(d,y);T<K;++T)if(h[T]!==c[T]){d=h[T],y=c[T];break}return d<y?-1:y<d?1:0},r.isEncoding=function(h){switch(String(h).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}},r.concat=function(h,c){if(!Array.isArray(h))throw new TypeError('"list" argument must be an Array of Buffers');if(h.length===0)return r.alloc(0);let d;if(c===void 0)for(c=0,d=0;d<h.length;++d)c+=h[d].length;let y=r.allocUnsafe(c),T=0;for(d=0;d<h.length;++d){let K=h[d];if($(K,Uint8Array))T+K.length>y.length?(r.isBuffer(K)||(K=r.from(K)),K.copy(y,T)):Uint8Array.prototype.set.call(y,K,T);else if(r.isBuffer(K))K.copy(y,T);else throw new TypeError('"list" argument must be an Array of Buffers');T+=K.length}return y};function I(h,c){if(r.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||$(h,ArrayBuffer))return h.byteLength;if(typeof h!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof h);let d=h.length,y=arguments.length>2&&arguments[2]===!0;if(!y&&d===0)return 0;let T=!1;for(;;)switch(c){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return j(h).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return Z(h).length;default:if(T)return y?-1:j(h).length;c=(""+c).toLowerCase(),T=!0}}r.byteLength=I;function v(h,c,d){let y=!1;if((c===void 0||c<0)&&(c=0),c>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,c>>>=0,d<=c))return"";for(h||(h="utf8");;)switch(h){case"hex":return H(this,c,d);case"utf8":case"utf-8":return q(this,c,d);case"ascii":return me(this,c,d);case"latin1":case"binary":return se(this,c,d);case"base64":return S(this,c,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be(this,c,d);default:if(y)throw new TypeError("Unknown encoding: "+h);h=(h+"").toLowerCase(),y=!0}}r.prototype._isBuffer=!0;function L(h,c,d){let y=h[c];h[c]=h[d],h[d]=y}r.prototype.swap16=function(){let h=this.length;if(h%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let c=0;c<h;c+=2)L(this,c,c+1);return this},r.prototype.swap32=function(){let h=this.length;if(h%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let c=0;c<h;c+=4)L(this,c,c+3),L(this,c+1,c+2);return this},r.prototype.swap64=function(){let h=this.length;if(h%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let c=0;c<h;c+=8)L(this,c,c+7),L(this,c+1,c+6),L(this,c+2,c+5),L(this,c+3,c+4);return this},r.prototype.toString=function(){let h=this.length;return h===0?"":arguments.length===0?q(this,0,h):v.apply(this,arguments)},r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=function(h){if(!r.isBuffer(h))throw new TypeError("Argument must be a Buffer");return this===h?!0:r.compare(this,h)===0},r.prototype.inspect=function(){let h="",c=Bt.INSPECT_MAX_BYTES;return h=this.toString("hex",0,c).replace(/(.{2})/g,"$1 ").trim(),this.length>c&&(h+=" ... "),"<Buffer "+h+">"},t&&(r.prototype[t]=r.prototype.inspect),r.prototype.compare=function(h,c,d,y,T){if($(h,Uint8Array)&&(h=r.from(h,h.offset,h.byteLength)),!r.isBuffer(h))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(c===void 0&&(c=0),d===void 0&&(d=h?h.length:0),y===void 0&&(y=0),T===void 0&&(T=this.length),c<0||d>h.length||y<0||T>this.length)throw new RangeError("out of range index");if(y>=T&&c>=d)return 0;if(y>=T)return-1;if(c>=d)return 1;if(c>>>=0,d>>>=0,y>>>=0,T>>>=0,this===h)return 0;let K=T-y,ee=d-c,Ie=Math.min(K,ee),Be=this.slice(y,T),Oe=h.slice(c,d);for(let Se=0;Se<Ie;++Se)if(Be[Se]!==Oe[Se]){K=Be[Se],ee=Oe[Se];break}return K<ee?-1:ee<K?1:0};function F(h,c,d,y,T){if(h.length===0)return-1;if(typeof d=="string"?(y=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,O(d)&&(d=T?0:h.length-1),d<0&&(d=h.length+d),d>=h.length){if(T)return-1;d=h.length-1}else if(d<0)if(T)d=0;else return-1;if(typeof c=="string"&&(c=r.from(c,y)),r.isBuffer(c))return c.length===0?-1:B(h,c,d,y,T);if(typeof c=="number")return c=c&255,typeof Uint8Array.prototype.indexOf=="function"?T?Uint8Array.prototype.indexOf.call(h,c,d):Uint8Array.prototype.lastIndexOf.call(h,c,d):B(h,[c],d,y,T);throw new TypeError("val must be string, number or Buffer")}function B(h,c,d,y,T){let K=1,ee=h.length,Ie=c.length;if(y!==void 0&&(y=String(y).toLowerCase(),y==="ucs2"||y==="ucs-2"||y==="utf16le"||y==="utf-16le")){if(h.length<2||c.length<2)return-1;K=2,ee/=2,Ie/=2,d/=2}function Be(Se,ke){return K===1?Se[ke]:Se.readUInt16BE(ke*K)}let Oe;if(T){let Se=-1;for(Oe=d;Oe<ee;Oe++)if(Be(h,Oe)===Be(c,Se===-1?0:Oe-Se)){if(Se===-1&&(Se=Oe),Oe-Se+1===Ie)return Se*K}else Se!==-1&&(Oe-=Oe-Se),Se=-1}else for(d+Ie>ee&&(d=ee-Ie),Oe=d;Oe>=0;Oe--){let Se=!0;for(let ke=0;ke<Ie;ke++)if(Be(h,Oe+ke)!==Be(c,ke)){Se=!1;break}if(Se)return Oe}return-1}r.prototype.includes=function(h,c,d){return this.indexOf(h,c,d)!==-1},r.prototype.indexOf=function(h,c,d){return F(this,h,c,d,!0)},r.prototype.lastIndexOf=function(h,c,d){return F(this,h,c,d,!1)};function k(h,c,d,y){d=Number(d)||0;let T=h.length-d;y?(y=Number(y),y>T&&(y=T)):y=T;let K=c.length;y>K/2&&(y=K/2);let ee;for(ee=0;ee<y;++ee){let Ie=parseInt(c.substr(ee*2,2),16);if(O(Ie))return ee;h[d+ee]=Ie}return ee}function M(h,c,d,y){return D(j(c,h.length-d),h,d,y)}function W(h,c,d,y){return D(V(c),h,d,y)}function J(h,c,d,y){return D(Z(c),h,d,y)}function ne(h,c,d,y){return D(ie(c,h.length-d),h,d,y)}r.prototype.write=function(h,c,d,y){if(c===void 0)y="utf8",d=this.length,c=0;else if(d===void 0&&typeof c=="string")y=c,d=this.length,c=0;else if(isFinite(c))c=c>>>0,isFinite(d)?(d=d>>>0,y===void 0&&(y="utf8")):(y=d,d=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let T=this.length-c;if((d===void 0||d>T)&&(d=T),h.length>0&&(d<0||c<0)||c>this.length)throw new RangeError("Attempt to write outside buffer bounds");y||(y="utf8");let K=!1;for(;;)switch(y){case"hex":return k(this,h,c,d);case"utf8":case"utf-8":return M(this,h,c,d);case"ascii":case"latin1":case"binary":return W(this,h,c,d);case"base64":return J(this,h,c,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,h,c,d);default:if(K)throw new TypeError("Unknown encoding: "+y);y=(""+y).toLowerCase(),K=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(h,c,d){return c===0&&d===h.length?e.fromByteArray(h):e.fromByteArray(h.slice(c,d))}function q(h,c,d){d=Math.min(h.length,d);let y=[],T=c;for(;T<d;){let K=h[T],ee=null,Ie=K>239?4:K>223?3:K>191?2:1;if(T+Ie<=d){let Be,Oe,Se,ke;switch(Ie){case 1:K<128&&(ee=K);break;case 2:Be=h[T+1],(Be&192)===128&&(ke=(K&31)<<6|Be&63,ke>127&&(ee=ke));break;case 3:Be=h[T+1],Oe=h[T+2],(Be&192)===128&&(Oe&192)===128&&(ke=(K&15)<<12|(Be&63)<<6|Oe&63,ke>2047&&(ke<55296||ke>57343)&&(ee=ke));break;case 4:Be=h[T+1],Oe=h[T+2],Se=h[T+3],(Be&192)===128&&(Oe&192)===128&&(Se&192)===128&&(ke=(K&15)<<18|(Be&63)<<12|(Oe&63)<<6|Se&63,ke>65535&&ke<1114112&&(ee=ke))}}ee===null?(ee=65533,Ie=1):ee>65535&&(ee-=65536,y.push(ee>>>10&1023|55296),ee=56320|ee&1023),y.push(ee),T+=Ie}return Y(y)}let te=4096;function Y(h){let c=h.length;if(c<=te)return String.fromCharCode.apply(String,h);let d="",y=0;for(;y<c;)d+=String.fromCharCode.apply(String,h.slice(y,y+=te));return d}function me(h,c,d){let y="";d=Math.min(h.length,d);for(let T=c;T<d;++T)y+=String.fromCharCode(h[T]&127);return y}function se(h,c,d){let y="";d=Math.min(h.length,d);for(let T=c;T<d;++T)y+=String.fromCharCode(h[T]);return y}function H(h,c,d){let y=h.length;(!c||c<0)&&(c=0),(!d||d<0||d>y)&&(d=y);let T="";for(let K=c;K<d;++K)T+=N[h[K]];return T}function be(h,c,d){let y=h.slice(c,d),T="";for(let K=0;K<y.length-1;K+=2)T+=String.fromCharCode(y[K]+y[K+1]*256);return T}r.prototype.slice=function(h,c){let d=this.length;h=~~h,c=c===void 0?d:~~c,h<0?(h+=d,h<0&&(h=0)):h>d&&(h=d),c<0?(c+=d,c<0&&(c=0)):c>d&&(c=d),c<h&&(c=h);let y=this.subarray(h,c);return Object.setPrototypeOf(y,r.prototype),y};function oe(h,c,d){if(h%1!==0||h<0)throw new RangeError("offset is not uint");if(h+c>d)throw new RangeError("Trying to access beyond buffer length")}r.prototype.readUintLE=r.prototype.readUIntLE=function(h,c,d){h=h>>>0,c=c>>>0,d||oe(h,c,this.length);let y=this[h],T=1,K=0;for(;++K<c&&(T*=256);)y+=this[h+K]*T;return y},r.prototype.readUintBE=r.prototype.readUIntBE=function(h,c,d){h=h>>>0,c=c>>>0,d||oe(h,c,this.length);let y=this[h+--c],T=1;for(;c>0&&(T*=256);)y+=this[h+--c]*T;return y},r.prototype.readUint8=r.prototype.readUInt8=function(h,c){return h=h>>>0,c||oe(h,1,this.length),this[h]},r.prototype.readUint16LE=r.prototype.readUInt16LE=function(h,c){return h=h>>>0,c||oe(h,2,this.length),this[h]|this[h+1]<<8},r.prototype.readUint16BE=r.prototype.readUInt16BE=function(h,c){return h=h>>>0,c||oe(h,2,this.length),this[h]<<8|this[h+1]},r.prototype.readUint32LE=r.prototype.readUInt32LE=function(h,c){return h=h>>>0,c||oe(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216},r.prototype.readUint32BE=r.prototype.readUInt32BE=function(h,c){return h=h>>>0,c||oe(h,4,this.length),this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])},r.prototype.readBigUInt64LE=Q(function(h){h=h>>>0,X(h,"offset");let c=this[h],d=this[h+7];(c===void 0||d===void 0)&&ye(h,this.length-8);let y=c+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24,T=this[++h]+this[++h]*2**8+this[++h]*2**16+d*2**24;return BigInt(y)+(BigInt(T)<<BigInt(32))}),r.prototype.readBigUInt64BE=Q(function(h){h=h>>>0,X(h,"offset");let c=this[h],d=this[h+7];(c===void 0||d===void 0)&&ye(h,this.length-8);let y=c*2**24+this[++h]*2**16+this[++h]*2**8+this[++h],T=this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+d;return(BigInt(y)<<BigInt(32))+BigInt(T)}),r.prototype.readIntLE=function(h,c,d){h=h>>>0,c=c>>>0,d||oe(h,c,this.length);let y=this[h],T=1,K=0;for(;++K<c&&(T*=256);)y+=this[h+K]*T;return T*=128,y>=T&&(y-=Math.pow(2,8*c)),y},r.prototype.readIntBE=function(h,c,d){h=h>>>0,c=c>>>0,d||oe(h,c,this.length);let y=c,T=1,K=this[h+--y];for(;y>0&&(T*=256);)K+=this[h+--y]*T;return T*=128,K>=T&&(K-=Math.pow(2,8*c)),K},r.prototype.readInt8=function(h,c){return h=h>>>0,c||oe(h,1,this.length),this[h]&128?(255-this[h]+1)*-1:this[h]},r.prototype.readInt16LE=function(h,c){h=h>>>0,c||oe(h,2,this.length);let d=this[h]|this[h+1]<<8;return d&32768?d|4294901760:d},r.prototype.readInt16BE=function(h,c){h=h>>>0,c||oe(h,2,this.length);let d=this[h+1]|this[h]<<8;return d&32768?d|4294901760:d},r.prototype.readInt32LE=function(h,c){return h=h>>>0,c||oe(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},r.prototype.readInt32BE=function(h,c){return h=h>>>0,c||oe(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},r.prototype.readBigInt64LE=Q(function(h){h=h>>>0,X(h,"offset");let c=this[h],d=this[h+7];(c===void 0||d===void 0)&&ye(h,this.length-8);let y=this[h+4]+this[h+5]*2**8+this[h+6]*2**16+(d<<24);return(BigInt(y)<<BigInt(32))+BigInt(c+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24)}),r.prototype.readBigInt64BE=Q(function(h){h=h>>>0,X(h,"offset");let c=this[h],d=this[h+7];(c===void 0||d===void 0)&&ye(h,this.length-8);let y=(c<<24)+this[++h]*2**16+this[++h]*2**8+this[++h];return(BigInt(y)<<BigInt(32))+BigInt(this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+d)}),r.prototype.readFloatLE=function(h,c){return h=h>>>0,c||oe(h,4,this.length),i.read(this,h,!0,23,4)},r.prototype.readFloatBE=function(h,c){return h=h>>>0,c||oe(h,4,this.length),i.read(this,h,!1,23,4)},r.prototype.readDoubleLE=function(h,c){return h=h>>>0,c||oe(h,8,this.length),i.read(this,h,!0,52,8)},r.prototype.readDoubleBE=function(h,c){return h=h>>>0,c||oe(h,8,this.length),i.read(this,h,!1,52,8)};function we(h,c,d,y,T,K){if(!r.isBuffer(h))throw new TypeError('"buffer" argument must be a Buffer instance');if(c>T||c<K)throw new RangeError('"value" argument is out of bounds');if(d+y>h.length)throw new RangeError("Index out of range")}r.prototype.writeUintLE=r.prototype.writeUIntLE=function(h,c,d,y){if(h=+h,c=c>>>0,d=d>>>0,!y){let ee=Math.pow(2,8*d)-1;we(this,h,c,d,ee,0)}let T=1,K=0;for(this[c]=h&255;++K<d&&(T*=256);)this[c+K]=h/T&255;return c+d},r.prototype.writeUintBE=r.prototype.writeUIntBE=function(h,c,d,y){if(h=+h,c=c>>>0,d=d>>>0,!y){let ee=Math.pow(2,8*d)-1;we(this,h,c,d,ee,0)}let T=d-1,K=1;for(this[c+T]=h&255;--T>=0&&(K*=256);)this[c+T]=h/K&255;return c+d},r.prototype.writeUint8=r.prototype.writeUInt8=function(h,c,d){return h=+h,c=c>>>0,d||we(this,h,c,1,255,0),this[c]=h&255,c+1},r.prototype.writeUint16LE=r.prototype.writeUInt16LE=function(h,c,d){return h=+h,c=c>>>0,d||we(this,h,c,2,65535,0),this[c]=h&255,this[c+1]=h>>>8,c+2},r.prototype.writeUint16BE=r.prototype.writeUInt16BE=function(h,c,d){return h=+h,c=c>>>0,d||we(this,h,c,2,65535,0),this[c]=h>>>8,this[c+1]=h&255,c+2},r.prototype.writeUint32LE=r.prototype.writeUInt32LE=function(h,c,d){return h=+h,c=c>>>0,d||we(this,h,c,4,4294967295,0),this[c+3]=h>>>24,this[c+2]=h>>>16,this[c+1]=h>>>8,this[c]=h&255,c+4},r.prototype.writeUint32BE=r.prototype.writeUInt32BE=function(h,c,d){return h=+h,c=c>>>0,d||we(this,h,c,4,4294967295,0),this[c]=h>>>24,this[c+1]=h>>>16,this[c+2]=h>>>8,this[c+3]=h&255,c+4};function w(h,c,d,y,T){re(c,y,T,h,d,7);let K=Number(c&BigInt(4294967295));h[d++]=K,K=K>>8,h[d++]=K,K=K>>8,h[d++]=K,K=K>>8,h[d++]=K;let ee=Number(c>>BigInt(32)&BigInt(4294967295));return h[d++]=ee,ee=ee>>8,h[d++]=ee,ee=ee>>8,h[d++]=ee,ee=ee>>8,h[d++]=ee,d}function G(h,c,d,y,T){re(c,y,T,h,d,7);let K=Number(c&BigInt(4294967295));h[d+7]=K,K=K>>8,h[d+6]=K,K=K>>8,h[d+5]=K,K=K>>8,h[d+4]=K;let ee=Number(c>>BigInt(32)&BigInt(4294967295));return h[d+3]=ee,ee=ee>>8,h[d+2]=ee,ee=ee>>8,h[d+1]=ee,ee=ee>>8,h[d]=ee,d+8}r.prototype.writeBigUInt64LE=Q(function(h,c=0){return w(this,h,c,BigInt(0),BigInt("0xffffffffffffffff"))}),r.prototype.writeBigUInt64BE=Q(function(h,c=0){return G(this,h,c,BigInt(0),BigInt("0xffffffffffffffff"))}),r.prototype.writeIntLE=function(h,c,d,y){if(h=+h,c=c>>>0,!y){let Ie=Math.pow(2,8*d-1);we(this,h,c,d,Ie-1,-Ie)}let T=0,K=1,ee=0;for(this[c]=h&255;++T<d&&(K*=256);)h<0&&ee===0&&this[c+T-1]!==0&&(ee=1),this[c+T]=(h/K>>0)-ee&255;return c+d},r.prototype.writeIntBE=function(h,c,d,y){if(h=+h,c=c>>>0,!y){let Ie=Math.pow(2,8*d-1);we(this,h,c,d,Ie-1,-Ie)}let T=d-1,K=1,ee=0;for(this[c+T]=h&255;--T>=0&&(K*=256);)h<0&&ee===0&&this[c+T+1]!==0&&(ee=1),this[c+T]=(h/K>>0)-ee&255;return c+d},r.prototype.writeInt8=function(h,c,d){return h=+h,c=c>>>0,d||we(this,h,c,1,127,-128),h<0&&(h=255+h+1),this[c]=h&255,c+1},r.prototype.writeInt16LE=function(h,c,d){return h=+h,c=c>>>0,d||we(this,h,c,2,32767,-32768),this[c]=h&255,this[c+1]=h>>>8,c+2},r.prototype.writeInt16BE=function(h,c,d){return h=+h,c=c>>>0,d||we(this,h,c,2,32767,-32768),this[c]=h>>>8,this[c+1]=h&255,c+2},r.prototype.writeInt32LE=function(h,c,d){return h=+h,c=c>>>0,d||we(this,h,c,4,2147483647,-2147483648),this[c]=h&255,this[c+1]=h>>>8,this[c+2]=h>>>16,this[c+3]=h>>>24,c+4},r.prototype.writeInt32BE=function(h,c,d){return h=+h,c=c>>>0,d||we(this,h,c,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),this[c]=h>>>24,this[c+1]=h>>>16,this[c+2]=h>>>8,this[c+3]=h&255,c+4},r.prototype.writeBigInt64LE=Q(function(h,c=0){return w(this,h,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),r.prototype.writeBigInt64BE=Q(function(h,c=0){return G(this,h,c,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function de(h,c,d,y,T,K){if(d+y>h.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function ve(h,c,d,y,T){return c=+c,d=d>>>0,T||de(h,c,d,4),i.write(h,c,d,y,23,4),d+4}r.prototype.writeFloatLE=function(h,c,d){return ve(this,h,c,!0,d)},r.prototype.writeFloatBE=function(h,c,d){return ve(this,h,c,!1,d)};function he(h,c,d,y,T){return c=+c,d=d>>>0,T||de(h,c,d,8),i.write(h,c,d,y,52,8),d+8}r.prototype.writeDoubleLE=function(h,c,d){return he(this,h,c,!0,d)},r.prototype.writeDoubleBE=function(h,c,d){return he(this,h,c,!1,d)},r.prototype.copy=function(h,c,d,y){if(!r.isBuffer(h))throw new TypeError("argument should be a Buffer");if(d||(d=0),!y&&y!==0&&(y=this.length),c>=h.length&&(c=h.length),c||(c=0),y>0&&y<d&&(y=d),y===d||h.length===0||this.length===0)return 0;if(c<0)throw new RangeError("targetStart out of bounds");if(d<0||d>=this.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("sourceEnd out of bounds");y>this.length&&(y=this.length),h.length-c<y-d&&(y=h.length-c+d);let T=y-d;return this===h&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(c,d,y):Uint8Array.prototype.set.call(h,this.subarray(d,y),c),T},r.prototype.fill=function(h,c,d,y){if(typeof h=="string"){if(typeof c=="string"?(y=c,c=0,d=this.length):typeof d=="string"&&(y=d,d=this.length),y!==void 0&&typeof y!="string")throw new TypeError("encoding must be a string");if(typeof y=="string"&&!r.isEncoding(y))throw new TypeError("Unknown encoding: "+y);if(h.length===1){let K=h.charCodeAt(0);(y==="utf8"&&K<128||y==="latin1")&&(h=K)}}else typeof h=="number"?h=h&255:typeof h=="boolean"&&(h=Number(h));if(c<0||this.length<c||this.length<d)throw new RangeError("Out of range index");if(d<=c)return this;c=c>>>0,d=d===void 0?this.length:d>>>0,h||(h=0);let T;if(typeof h=="number")for(T=c;T<d;++T)this[T]=h;else{let K=r.isBuffer(h)?h:r.from(h,y),ee=K.length;if(ee===0)throw new TypeError('The value "'+h+'" is invalid for argument "value"');for(T=0;T<d-c;++T)this[T+c]=K[T%ee]}return this};let R={};function E(h,c,d){R[h]=class extends d{constructor(){super(),Object.defineProperty(this,"message",{value:c.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${h}]`,this.stack,delete this.name}get code(){return h}set code(y){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:y,writable:!0})}toString(){return`${this.name} [${h}]: ${this.message}`}}}E("ERR_BUFFER_OUT_OF_BOUNDS",function(h){return h?`${h} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),E("ERR_INVALID_ARG_TYPE",function(h,c){return`The "${h}" argument must be of type number. Received type ${typeof c}`},TypeError),E("ERR_OUT_OF_RANGE",function(h,c,d){let y=`The value of "${h}" is out of range.`,T=d;return Number.isInteger(d)&&Math.abs(d)>2**32?T=z(String(d)):typeof d=="bigint"&&(T=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(T=z(T)),T+="n"),y+=` It must be ${c}. Received ${T}`,y},RangeError);function z(h){let c="",d=h.length,y=h[0]==="-"?1:0;for(;d>=y+4;d-=3)c=`_${h.slice(d-3,d)}${c}`;return`${h.slice(0,d)}${c}`}function fe(h,c,d){X(c,"offset"),(h[c]===void 0||h[c+d]===void 0)&&ye(c,h.length-(d+1))}function re(h,c,d,y,T,K){if(h>d||h<c){let ee=typeof c=="bigint"?"n":"",Ie;throw c===0||c===BigInt(0)?Ie=`>= 0${ee} and < 2${ee} ** ${(K+1)*8}${ee}`:Ie=`>= -(2${ee} ** ${(K+1)*8-1}${ee}) and < 2 ** ${(K+1)*8-1}${ee}`,new R.ERR_OUT_OF_RANGE("value",Ie,h)}fe(y,T,K)}function X(h,c){if(typeof h!="number")throw new R.ERR_INVALID_ARG_TYPE(c,"number",h)}function ye(h,c,d){throw Math.floor(h)!==h?(X(h,d),new R.ERR_OUT_OF_RANGE("offset","an integer",h)):c<0?new R.ERR_BUFFER_OUT_OF_BOUNDS:new R.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${c}`,h)}let ge=/[^+/0-9A-Za-z-_]/g;function P(h){if(h=h.split("=")[0],h=h.trim().replace(ge,""),h.length<2)return"";for(;h.length%4!==0;)h=h+"=";return h}function j(h,c){c=c||1/0;let d,y=h.length,T=null,K=[];for(let ee=0;ee<y;++ee){if(d=h.charCodeAt(ee),d>55295&&d<57344){if(!T){if(d>56319){(c-=3)>-1&&K.push(239,191,189);continue}else if(ee+1===y){(c-=3)>-1&&K.push(239,191,189);continue}T=d;continue}if(d<56320){(c-=3)>-1&&K.push(239,191,189),T=d;continue}d=(T-55296<<10|d-56320)+65536}else T&&(c-=3)>-1&&K.push(239,191,189);if(T=null,d<128){if((c-=1)<0)break;K.push(d)}else if(d<2048){if((c-=2)<0)break;K.push(d>>6|192,d&63|128)}else if(d<65536){if((c-=3)<0)break;K.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((c-=4)<0)break;K.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return K}function V(h){let c=[];for(let d=0;d<h.length;++d)c.push(h.charCodeAt(d)&255);return c}function ie(h,c){let d,y,T,K=[];for(let ee=0;ee<h.length&&!((c-=2)<0);++ee)d=h.charCodeAt(ee),y=d>>8,T=d%256,K.push(T),K.push(y);return K}function Z(h){return e.toByteArray(P(h))}function D(h,c,d,y){let T;for(T=0;T<y&&!(T+d>=c.length||T>=h.length);++T)c[T+d]=h[T];return T}function $(h,c){return h instanceof c||h!=null&&h.constructor!=null&&h.constructor.name!=null&&h.constructor.name===c.name}function O(h){return h!==h}let N=function(){let h="0123456789abcdef",c=new Array(256);for(let d=0;d<16;++d){let y=d*16;for(let T=0;T<16;++T)c[y+T]=h[d]+h[T]}return c}();function Q(h){return typeof BigInt>"u"?ce:h}function ce(){throw new Error("BigInt not supported")}return Bt}var Zt,Xn,sr,ei,Bt,ti,At,Ar,vo,_o,Ze=Ge(()=>{ae(),ue(),le(),Zt={},Xn=!1,sr={},ei=!1,Bt={},ti=!1,At=$l(),At.Buffer,At.SlowBuffer,At.INSPECT_MAX_BYTES,At.kMaxLength,Ar=At.Buffer,vo=At.INSPECT_MAX_BYTES,_o=At.kMaxLength}),ue=Ge(()=>{Ze()}),zl=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=class{constructor(t){this.aliasToTopic={},this.max=t}put(t,a){return a===0||a>this.max?!1:(this.aliasToTopic[a]=t,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(t){return this.aliasToTopic[t]}clear(){this.aliasToTopic={}}};e.default=i}),qe=Ae((e,i)=>{ae(),ue(),le(),i.exports={ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,a){return t.includes(a)},ArrayPrototypeIndexOf(t,a){return t.indexOf(a)},ArrayPrototypeJoin(t,a){return t.join(a)},ArrayPrototypeMap(t,a){return t.map(a)},ArrayPrototypePop(t,a){return t.pop(a)},ArrayPrototypePush(t,a){return t.push(a)},ArrayPrototypeSlice(t,a,u){return t.slice(a,u)},Error,FunctionPrototypeCall(t,a,...u){return t.call(a,...u)},FunctionPrototypeSymbolHasInstance(t,a){return Function.prototype[Symbol.hasInstance].call(t,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(t,a){return Object.defineProperties(t,a)},ObjectDefineProperty(t,a,u){return Object.defineProperty(t,a,u)},ObjectGetOwnPropertyDescriptor(t,a){return Object.getOwnPropertyDescriptor(t,a)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,a){return Object.setPrototypeOf(t,a)},Promise,PromisePrototypeCatch(t,a){return t.catch(a)},PromisePrototypeThen(t,a,u){return t.then(a,u)},PromiseReject(t){return Promise.reject(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,a){return t.test(a)},SafeSet:Set,String,StringPrototypeSlice(t,a,u){return t.slice(a,u)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(t,a,u){return t.set(a,u)},Uint8Array}}),bt=Ae((e,i)=>{ae(),ue(),le();var t=(Ze(),Ue(Je)),a=Object.getPrototypeOf(async function(){}).constructor,u=globalThis.Blob||t.Blob,n=typeof u<"u"?function(s){return s instanceof u}:function(s){return!1},r=class extends Error{constructor(s){if(!Array.isArray(s))throw new TypeError(`Expected input to be an Array, got ${typeof s}`);let o="";for(let l=0;l<s.length;l++)o+=` ${s[l].stack}
|
|
3
|
+
`;super(o),this.name="AggregateError",this.errors=s}};i.exports={AggregateError:r,kEmptyObject:Object.freeze({}),once(s){let o=!1;return function(...l){o||(o=!0,s.apply(this,l))}},createDeferredPromise:function(){let s,o;return{promise:new Promise((l,f)=>{s=l,o=f}),resolve:s,reject:o}},promisify(s){return new Promise((o,l)=>{s((f,...p)=>f?l(f):o(...p))})},debuglog(){return function(){}},format(s,...o){return s.replace(/%([sdifj])/g,function(...[l,f]){let p=o.shift();return f==="f"?p.toFixed(6):f==="j"?JSON.stringify(p):f==="s"&&typeof p=="object"?`${p.constructor!==Object?p.constructor.name:""} {}`.trim():p.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"{}"}},types:{isAsyncFunction(s){return s instanceof a},isArrayBufferView(s){return ArrayBuffer.isView(s)}},isBlob:n},i.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),ri=Ae((e,i)=>{ae(),ue(),le();var{AbortController:t,AbortSignal:a}=typeof self<"u"?self:typeof window<"u"?window:void 0;i.exports=t,i.exports.AbortSignal=a,i.exports.default=t}),rt=Ae((e,i)=>{ae(),ue(),le();var{format:t,inspect:a,AggregateError:u}=bt(),n=globalThis.AggregateError||u,r=Symbol("kIsNodeError"),s=["string","function","number","object","Function","Object","boolean","bigint","symbol"],o=/^([A-Z][a-z0-9]*)+$/,l="__node_internal_",f={};function p(I,v){if(!I)throw new f.ERR_INTERNAL_ASSERTION(v)}function g(I){let v="",L=I.length,F=I[0]==="-"?1:0;for(;L>=F+4;L-=3)v=`_${I.slice(L-3,L)}${v}`;return`${I.slice(0,L)}${v}`}function m(I,v,L){if(typeof v=="function")return p(v.length<=L.length,`Code: ${I}; The provided arguments length (${L.length}) does not match the required ones (${v.length}).`),v(...L);let F=(v.match(/%[dfijoOs]/g)||[]).length;return p(F===L.length,`Code: ${I}; The provided arguments length (${L.length}) does not match the required ones (${F}).`),L.length===0?v:t(v,...L)}function A(I,v,L){L||(L=Error);class F extends L{constructor(...k){super(m(I,v,k))}toString(){return`${this.name} [${I}]: ${this.message}`}}Object.defineProperties(F.prototype,{name:{value:L.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${I}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),F.prototype.code=I,F.prototype[r]=!0,f[I]=F}function b(I){let v=l+I.name;return Object.defineProperty(I,"name",{value:v}),I}function C(I,v){if(I&&v&&I!==v){if(Array.isArray(v.errors))return v.errors.push(I),v;let L=new n([v,I],v.message);return L.code=v.code,L}return I||v}var U=class extends Error{constructor(I="The operation was aborted",v=void 0){if(v!==void 0&&typeof v!="object")throw new f.ERR_INVALID_ARG_TYPE("options","Object",v);super(I,v),this.code="ABORT_ERR",this.name="AbortError"}};A("ERR_ASSERTION","%s",Error),A("ERR_INVALID_ARG_TYPE",(I,v,L)=>{p(typeof I=="string","'name' must be a string"),Array.isArray(v)||(v=[v]);let F="The ";I.endsWith(" argument")?F+=`${I} `:F+=`"${I}" ${I.includes(".")?"property":"argument"} `,F+="must be ";let B=[],k=[],M=[];for(let J of v)p(typeof J=="string","All expected entries have to be of type string"),s.includes(J)?B.push(J.toLowerCase()):o.test(J)?k.push(J):(p(J!=="object",'The value "object" should be written as "Object"'),M.push(J));if(k.length>0){let J=B.indexOf("object");J!==-1&&(B.splice(B,J,1),k.push("Object"))}if(B.length>0){switch(B.length){case 1:F+=`of type ${B[0]}`;break;case 2:F+=`one of type ${B[0]} or ${B[1]}`;break;default:{let J=B.pop();F+=`one of type ${B.join(", ")}, or ${J}`}}(k.length>0||M.length>0)&&(F+=" or ")}if(k.length>0){switch(k.length){case 1:F+=`an instance of ${k[0]}`;break;case 2:F+=`an instance of ${k[0]} or ${k[1]}`;break;default:{let J=k.pop();F+=`an instance of ${k.join(", ")}, or ${J}`}}M.length>0&&(F+=" or ")}switch(M.length){case 0:break;case 1:M[0].toLowerCase()!==M[0]&&(F+="an "),F+=`${M[0]}`;break;case 2:F+=`one of ${M[0]} or ${M[1]}`;break;default:{let J=M.pop();F+=`one of ${M.join(", ")}, or ${J}`}}if(L==null)F+=`. Received ${L}`;else if(typeof L=="function"&&L.name)F+=`. Received function ${L.name}`;else if(typeof L=="object"){var W;if((W=L.constructor)!==null&&W!==void 0&&W.name)F+=`. Received an instance of ${L.constructor.name}`;else{let J=a(L,{depth:-1});F+=`. Received ${J}`}}else{let J=a(L,{colors:!1});J.length>25&&(J=`${J.slice(0,25)}...`),F+=`. Received type ${typeof L} (${J})`}return F},TypeError),A("ERR_INVALID_ARG_VALUE",(I,v,L="is invalid")=>{let F=a(v);return F.length>128&&(F=F.slice(0,128)+"..."),`The ${I.includes(".")?"property":"argument"} '${I}' ${L}. Received ${F}`},TypeError),A("ERR_INVALID_RETURN_VALUE",(I,v,L)=>{var F;let B=L!=null&&(F=L.constructor)!==null&&F!==void 0&&F.name?`instance of ${L.constructor.name}`:`type ${typeof L}`;return`Expected ${I} to be returned from the "${v}" function but got ${B}.`},TypeError),A("ERR_MISSING_ARGS",(...I)=>{p(I.length>0,"At least one arg needs to be specified");let v,L=I.length;switch(I=(Array.isArray(I)?I:[I]).map(F=>`"${F}"`).join(" or "),L){case 1:v+=`The ${I[0]} argument`;break;case 2:v+=`The ${I[0]} and ${I[1]} arguments`;break;default:{let F=I.pop();v+=`The ${I.join(", ")}, and ${F} arguments`}break}return`${v} must be specified`},TypeError),A("ERR_OUT_OF_RANGE",(I,v,L)=>{p(v,'Missing "range" argument');let F;return Number.isInteger(L)&&Math.abs(L)>2**32?F=g(String(L)):typeof L=="bigint"?(F=String(L),(L>2n**32n||L<-(2n**32n))&&(F=g(F)),F+="n"):F=a(L),`The value of "${I}" is out of range. It must be ${v}. Received ${F}`},RangeError),A("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),A("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),A("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),A("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),A("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),A("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),A("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),A("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),A("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),A("ERR_STREAM_WRITE_AFTER_END","write after end",Error),A("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),i.exports={AbortError:U,aggregateTwoErrors:b(C),hideStackFrames:b,codes:f}}),br=Ae((e,i)=>{ae(),ue(),le();var{ArrayIsArray:t,ArrayPrototypeIncludes:a,ArrayPrototypeJoin:u,ArrayPrototypeMap:n,NumberIsInteger:r,NumberIsNaN:s,NumberMAX_SAFE_INTEGER:o,NumberMIN_SAFE_INTEGER:l,NumberParseInt:f,ObjectPrototypeHasOwnProperty:p,RegExpPrototypeExec:g,String:m,StringPrototypeToUpperCase:A,StringPrototypeTrim:b}=qe(),{hideStackFrames:C,codes:{ERR_SOCKET_BAD_PORT:U,ERR_INVALID_ARG_TYPE:I,ERR_INVALID_ARG_VALUE:v,ERR_OUT_OF_RANGE:L,ERR_UNKNOWN_SIGNAL:F}}=rt(),{normalizeEncoding:B}=bt(),{isAsyncFunction:k,isArrayBufferView:M}=bt().types,W={};function J(D){return D===(D|0)}function ne(D){return D===D>>>0}var S=/^[0-7]+$/,q="must be a 32-bit unsigned integer or an octal string";function te(D,$,O){if(typeof D>"u"&&(D=O),typeof D=="string"){if(g(S,D)===null)throw new v($,D,q);D=f(D,8)}return se(D,$),D}var Y=C((D,$,O=l,N=o)=>{if(typeof D!="number")throw new I($,"number",D);if(!r(D))throw new L($,"an integer",D);if(D<O||D>N)throw new L($,`>= ${O} && <= ${N}`,D)}),me=C((D,$,O=-2147483648,N=2147483647)=>{if(typeof D!="number")throw new I($,"number",D);if(!r(D))throw new L($,"an integer",D);if(D<O||D>N)throw new L($,`>= ${O} && <= ${N}`,D)}),se=C((D,$,O=!1)=>{if(typeof D!="number")throw new I($,"number",D);if(!r(D))throw new L($,"an integer",D);let N=O?1:0,Q=4294967295;if(D<N||D>Q)throw new L($,`>= ${N} && <= ${Q}`,D)});function H(D,$){if(typeof D!="string")throw new I($,"string",D)}function be(D,$,O=void 0,N){if(typeof D!="number")throw new I($,"number",D);if(O!=null&&D<O||N!=null&&D>N||(O!=null||N!=null)&&s(D))throw new L($,`${O!=null?`>= ${O}`:""}${O!=null&&N!=null?" && ":""}${N!=null?`<= ${N}`:""}`,D)}var oe=C((D,$,O)=>{if(!a(O,D)){let N="must be one of: "+u(n(O,Q=>typeof Q=="string"?`'${Q}'`:m(Q)),", ");throw new v($,D,N)}});function we(D,$){if(typeof D!="boolean")throw new I($,"boolean",D)}function w(D,$,O){return D==null||!p(D,$)?O:D[$]}var G=C((D,$,O=null)=>{let N=w(O,"allowArray",!1),Q=w(O,"allowFunction",!1);if(!w(O,"nullable",!1)&&D===null||!N&&t(D)||typeof D!="object"&&(!Q||typeof D!="function"))throw new I($,"Object",D)}),de=C((D,$)=>{if(D!=null&&typeof D!="object"&&typeof D!="function")throw new I($,"a dictionary",D)}),ve=C((D,$,O=0)=>{if(!t(D))throw new I($,"Array",D);if(D.length<O){let N=`must be longer than ${O}`;throw new v($,D,N)}});function he(D,$){ve(D,$);for(let O=0;O<D.length;O++)H(D[O],`${$}[${O}]`)}function R(D,$){ve(D,$);for(let O=0;O<D.length;O++)we(D[O],`${$}[${O}]`)}function E(D,$="signal"){if(H(D,$),W[D]===void 0)throw W[A(D)]!==void 0?new F(D+" (signals must use all capital letters)"):new F(D)}var z=C((D,$="buffer")=>{if(!M(D))throw new I($,["Buffer","TypedArray","DataView"],D)});function fe(D,$){let O=B($),N=D.length;if(O==="hex"&&N%2!==0)throw new v("encoding",$,`is invalid for data of length ${N}`)}function re(D,$="Port",O=!0){if(typeof D!="number"&&typeof D!="string"||typeof D=="string"&&b(D).length===0||+D!==+D>>>0||D>65535||D===0&&!O)throw new U($,D,O);return D|0}var X=C((D,$)=>{if(D!==void 0&&(D===null||typeof D!="object"||!("aborted"in D)))throw new I($,"AbortSignal",D)}),ye=C((D,$)=>{if(typeof D!="function")throw new I($,"Function",D)}),ge=C((D,$)=>{if(typeof D!="function"||k(D))throw new I($,"Function",D)}),P=C((D,$)=>{if(D!==void 0)throw new I($,"undefined",D)});function j(D,$,O){if(!a(O,D))throw new I($,`('${u(O,"|")}')`,D)}var V=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function ie(D,$){if(typeof D>"u"||!g(V,D))throw new v($,D,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function Z(D){if(typeof D=="string")return ie(D,"hints"),D;if(t(D)){let $=D.length,O="";if($===0)return O;for(let N=0;N<$;N++){let Q=D[N];ie(Q,"hints"),O+=Q,N!==$-1&&(O+=", ")}return O}throw new v("hints",D,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}i.exports={isInt32:J,isUint32:ne,parseFileMode:te,validateArray:ve,validateStringArray:he,validateBooleanArray:R,validateBoolean:we,validateBuffer:z,validateDictionary:de,validateEncoding:fe,validateFunction:ye,validateInt32:me,validateInteger:Y,validateNumber:be,validateObject:G,validateOneOf:oe,validatePlainFunction:ge,validatePort:re,validateSignalName:E,validateString:H,validateUint32:se,validateUndefined:P,validateUnion:j,validateAbortSignal:X,validateLinkHeaderValue:Z}}),Lt=Ae((e,i)=>{ae(),ue(),le();var t=i.exports={},a,u;function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?a=setTimeout:a=n}catch{a=n}try{typeof clearTimeout=="function"?u=clearTimeout:u=r}catch{u=r}})();function s(U){if(a===setTimeout)return setTimeout(U,0);if((a===n||!a)&&setTimeout)return a=setTimeout,setTimeout(U,0);try{return a(U,0)}catch{try{return a.call(null,U,0)}catch{return a.call(this,U,0)}}}function o(U){if(u===clearTimeout)return clearTimeout(U);if((u===r||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(U);try{return u(U)}catch{try{return u.call(null,U)}catch{return u.call(this,U)}}}var l=[],f=!1,p,g=-1;function m(){!f||!p||(f=!1,p.length?l=p.concat(l):g=-1,l.length&&A())}function A(){if(!f){var U=s(m);f=!0;for(var I=l.length;I;){for(p=l,l=[];++g<I;)p&&p[g].run();g=-1,I=l.length}p=null,f=!1,o(U)}}t.nextTick=function(U){var I=new Array(arguments.length-1);if(arguments.length>1)for(var v=1;v<arguments.length;v++)I[v-1]=arguments[v];l.push(new b(U,I)),l.length===1&&!f&&s(A)};function b(U,I){this.fun=U,this.array=I}b.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={};function C(){}t.on=C,t.addListener=C,t.once=C,t.off=C,t.removeListener=C,t.removeAllListeners=C,t.emit=C,t.prependListener=C,t.prependOnceListener=C,t.listeners=function(U){return[]},t.binding=function(U){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(U){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}}),yt=Ae((e,i)=>{ae(),ue(),le();var{Symbol:t,SymbolAsyncIterator:a,SymbolIterator:u,SymbolFor:n}=qe(),r=t("kDestroyed"),s=t("kIsErrored"),o=t("kIsReadable"),l=t("kIsDisturbed"),f=n("nodejs.webstream.isClosedPromise"),p=n("nodejs.webstream.controllerErrorFunction");function g(w,G=!1){var de;return!!(w&&typeof w.pipe=="function"&&typeof w.on=="function"&&(!G||typeof w.pause=="function"&&typeof w.resume=="function")&&(!w._writableState||((de=w._readableState)===null||de===void 0?void 0:de.readable)!==!1)&&(!w._writableState||w._readableState))}function m(w){var G;return!!(w&&typeof w.write=="function"&&typeof w.on=="function"&&(!w._readableState||((G=w._writableState)===null||G===void 0?void 0:G.writable)!==!1))}function A(w){return!!(w&&typeof w.pipe=="function"&&w._readableState&&typeof w.on=="function"&&typeof w.write=="function")}function b(w){return w&&(w._readableState||w._writableState||typeof w.write=="function"&&typeof w.on=="function"||typeof w.pipe=="function"&&typeof w.on=="function")}function C(w){return!!(w&&!b(w)&&typeof w.pipeThrough=="function"&&typeof w.getReader=="function"&&typeof w.cancel=="function")}function U(w){return!!(w&&!b(w)&&typeof w.getWriter=="function"&&typeof w.abort=="function")}function I(w){return!!(w&&!b(w)&&typeof w.readable=="object"&&typeof w.writable=="object")}function v(w){return C(w)||U(w)||I(w)}function L(w,G){return w==null?!1:G===!0?typeof w[a]=="function":G===!1?typeof w[u]=="function":typeof w[a]=="function"||typeof w[u]=="function"}function F(w){if(!b(w))return null;let G=w._writableState,de=w._readableState,ve=G||de;return!!(w.destroyed||w[r]||ve!=null&&ve.destroyed)}function B(w){if(!m(w))return null;if(w.writableEnded===!0)return!0;let G=w._writableState;return G!=null&&G.errored?!1:typeof(G==null?void 0:G.ended)!="boolean"?null:G.ended}function k(w,G){if(!m(w))return null;if(w.writableFinished===!0)return!0;let de=w._writableState;return de!=null&&de.errored?!1:typeof(de==null?void 0:de.finished)!="boolean"?null:!!(de.finished||G===!1&&de.ended===!0&&de.length===0)}function M(w){if(!g(w))return null;if(w.readableEnded===!0)return!0;let G=w._readableState;return!G||G.errored?!1:typeof(G==null?void 0:G.ended)!="boolean"?null:G.ended}function W(w,G){if(!g(w))return null;let de=w._readableState;return de!=null&&de.errored?!1:typeof(de==null?void 0:de.endEmitted)!="boolean"?null:!!(de.endEmitted||G===!1&&de.ended===!0&&de.length===0)}function J(w){return w&&w[o]!=null?w[o]:typeof(w==null?void 0:w.readable)!="boolean"?null:F(w)?!1:g(w)&&w.readable&&!W(w)}function ne(w){return typeof(w==null?void 0:w.writable)!="boolean"?null:F(w)?!1:m(w)&&w.writable&&!B(w)}function S(w,G){return b(w)?F(w)?!0:!((G==null?void 0:G.readable)!==!1&&J(w)||(G==null?void 0:G.writable)!==!1&&ne(w)):null}function q(w){var G,de;return b(w)?w.writableErrored?w.writableErrored:(G=(de=w._writableState)===null||de===void 0?void 0:de.errored)!==null&&G!==void 0?G:null:null}function te(w){var G,de;return b(w)?w.readableErrored?w.readableErrored:(G=(de=w._readableState)===null||de===void 0?void 0:de.errored)!==null&&G!==void 0?G:null:null}function Y(w){if(!b(w))return null;if(typeof w.closed=="boolean")return w.closed;let G=w._writableState,de=w._readableState;return typeof(G==null?void 0:G.closed)=="boolean"||typeof(de==null?void 0:de.closed)=="boolean"?(G==null?void 0:G.closed)||(de==null?void 0:de.closed):typeof w._closed=="boolean"&&me(w)?w._closed:null}function me(w){return typeof w._closed=="boolean"&&typeof w._defaultKeepAlive=="boolean"&&typeof w._removedConnection=="boolean"&&typeof w._removedContLen=="boolean"}function se(w){return typeof w._sent100=="boolean"&&me(w)}function H(w){var G;return typeof w._consuming=="boolean"&&typeof w._dumped=="boolean"&&((G=w.req)===null||G===void 0?void 0:G.upgradeOrConnect)===void 0}function be(w){if(!b(w))return null;let G=w._writableState,de=w._readableState,ve=G||de;return!ve&&se(w)||!!(ve&&ve.autoDestroy&&ve.emitClose&&ve.closed===!1)}function oe(w){var G;return!!(w&&((G=w[l])!==null&&G!==void 0?G:w.readableDidRead||w.readableAborted))}function we(w){var G,de,ve,he,R,E,z,fe,re,X;return!!(w&&((G=(de=(ve=(he=(R=(E=w[s])!==null&&E!==void 0?E:w.readableErrored)!==null&&R!==void 0?R:w.writableErrored)!==null&&he!==void 0?he:(z=w._readableState)===null||z===void 0?void 0:z.errorEmitted)!==null&&ve!==void 0?ve:(fe=w._writableState)===null||fe===void 0?void 0:fe.errorEmitted)!==null&&de!==void 0?de:(re=w._readableState)===null||re===void 0?void 0:re.errored)!==null&&G!==void 0?G:!((X=w._writableState)===null||X===void 0)&&X.errored))}i.exports={kDestroyed:r,isDisturbed:oe,kIsDisturbed:l,isErrored:we,kIsErrored:s,isReadable:J,kIsReadable:o,kIsClosedPromise:f,kControllerErrorFunction:p,isClosed:Y,isDestroyed:F,isDuplexNodeStream:A,isFinished:S,isIterable:L,isReadableNodeStream:g,isReadableStream:C,isReadableEnded:M,isReadableFinished:W,isReadableErrored:te,isNodeStream:b,isWebStream:v,isWritable:ne,isWritableNodeStream:m,isWritableStream:U,isWritableEnded:B,isWritableFinished:k,isWritableErrored:q,isServerRequest:H,isServerResponse:se,willEmitClose:be,isTransformStream:I}}),Ot=Ae((e,i)=>{ae(),ue(),le();var t=Lt(),{AbortError:a,codes:u}=rt(),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_PREMATURE_CLOSE:r}=u,{kEmptyObject:s,once:o}=bt(),{validateAbortSignal:l,validateFunction:f,validateObject:p,validateBoolean:g}=br(),{Promise:m,PromisePrototypeThen:A}=qe(),{isClosed:b,isReadable:C,isReadableNodeStream:U,isReadableStream:I,isReadableFinished:v,isReadableErrored:L,isWritable:F,isWritableNodeStream:B,isWritableStream:k,isWritableFinished:M,isWritableErrored:W,isNodeStream:J,willEmitClose:ne,kIsClosedPromise:S}=yt();function q(H){return H.setHeader&&typeof H.abort=="function"}var te=()=>{};function Y(H,be,oe){var we,w;if(arguments.length===2?(oe=be,be=s):be==null?be=s:p(be,"options"),f(oe,"callback"),l(be.signal,"options.signal"),oe=o(oe),I(H)||k(H))return me(H,be,oe);if(!J(H))throw new n("stream",["ReadableStream","WritableStream","Stream"],H);let G=(we=be.readable)!==null&&we!==void 0?we:U(H),de=(w=be.writable)!==null&&w!==void 0?w:B(H),ve=H._writableState,he=H._readableState,R=()=>{H.writable||fe()},E=ne(H)&&U(H)===G&&B(H)===de,z=M(H,!1),fe=()=>{z=!0,H.destroyed&&(E=!1),!(E&&(!H.readable||G))&&(!G||re)&&oe.call(H)},re=v(H,!1),X=()=>{re=!0,H.destroyed&&(E=!1),!(E&&(!H.writable||de))&&(!de||z)&&oe.call(H)},ye=Z=>{oe.call(H,Z)},ge=b(H),P=()=>{ge=!0;let Z=W(H)||L(H);if(Z&&typeof Z!="boolean")return oe.call(H,Z);if(G&&!re&&U(H,!0)&&!v(H,!1))return oe.call(H,new r);if(de&&!z&&!M(H,!1))return oe.call(H,new r);oe.call(H)},j=()=>{ge=!0;let Z=W(H)||L(H);if(Z&&typeof Z!="boolean")return oe.call(H,Z);oe.call(H)},V=()=>{H.req.on("finish",fe)};q(H)?(H.on("complete",fe),E||H.on("abort",P),H.req?V():H.on("request",V)):de&&!ve&&(H.on("end",R),H.on("close",R)),!E&&typeof H.aborted=="boolean"&&H.on("aborted",P),H.on("end",X),H.on("finish",fe),be.error!==!1&&H.on("error",ye),H.on("close",P),ge?t.nextTick(P):ve!=null&&ve.errorEmitted||he!=null&&he.errorEmitted?E||t.nextTick(j):(!G&&(!E||C(H))&&(z||F(H)===!1)||!de&&(!E||F(H))&&(re||C(H)===!1)||he&&H.req&&H.aborted)&&t.nextTick(j);let ie=()=>{oe=te,H.removeListener("aborted",P),H.removeListener("complete",fe),H.removeListener("abort",P),H.removeListener("request",V),H.req&&H.req.removeListener("finish",fe),H.removeListener("end",R),H.removeListener("close",R),H.removeListener("finish",fe),H.removeListener("end",X),H.removeListener("error",ye),H.removeListener("close",P)};if(be.signal&&!ge){let Z=()=>{let D=oe;ie(),D.call(H,new a(void 0,{cause:be.signal.reason}))};if(be.signal.aborted)t.nextTick(Z);else{let D=oe;oe=o((...$)=>{be.signal.removeEventListener("abort",Z),D.apply(H,$)}),be.signal.addEventListener("abort",Z)}}return ie}function me(H,be,oe){let we=!1,w=te;if(be.signal)if(w=()=>{we=!0,oe.call(H,new a(void 0,{cause:be.signal.reason}))},be.signal.aborted)t.nextTick(w);else{let de=oe;oe=o((...ve)=>{be.signal.removeEventListener("abort",w),de.apply(H,ve)}),be.signal.addEventListener("abort",w)}let G=(...de)=>{we||t.nextTick(()=>oe.apply(H,de))};return A(H[S].promise,G,G),te}function se(H,be){var oe;let we=!1;return be===null&&(be=s),(oe=be)!==null&&oe!==void 0&&oe.cleanup&&(g(be.cleanup,"cleanup"),we=be.cleanup),new m((w,G)=>{let de=Y(H,be,ve=>{we&&de(),ve?G(ve):w()})})}i.exports=Y,i.exports.finished=se}),Xt=Ae((e,i)=>{ae(),ue(),le();var t=Lt(),{aggregateTwoErrors:a,codes:{ERR_MULTIPLE_CALLBACK:u},AbortError:n}=rt(),{Symbol:r}=qe(),{kDestroyed:s,isDestroyed:o,isFinished:l,isServerRequest:f}=yt(),p=r("kDestroy"),g=r("kConstruct");function m(S,q,te){S&&(S.stack,q&&!q.errored&&(q.errored=S),te&&!te.errored&&(te.errored=S))}function A(S,q){let te=this._readableState,Y=this._writableState,me=Y||te;return Y!=null&&Y.destroyed||te!=null&&te.destroyed?(typeof q=="function"&&q(),this):(m(S,Y,te),Y&&(Y.destroyed=!0),te&&(te.destroyed=!0),me.constructed?b(this,S,q):this.once(p,function(se){b(this,a(se,S),q)}),this)}function b(S,q,te){let Y=!1;function me(se){if(Y)return;Y=!0;let H=S._readableState,be=S._writableState;m(se,be,H),be&&(be.closed=!0),H&&(H.closed=!0),typeof te=="function"&&te(se),se?t.nextTick(C,S,se):t.nextTick(U,S)}try{S._destroy(q||null,me)}catch(se){me(se)}}function C(S,q){I(S,q),U(S)}function U(S){let q=S._readableState,te=S._writableState;te&&(te.closeEmitted=!0),q&&(q.closeEmitted=!0),(te!=null&&te.emitClose||q!=null&&q.emitClose)&&S.emit("close")}function I(S,q){let te=S._readableState,Y=S._writableState;Y!=null&&Y.errorEmitted||te!=null&&te.errorEmitted||(Y&&(Y.errorEmitted=!0),te&&(te.errorEmitted=!0),S.emit("error",q))}function v(){let S=this._readableState,q=this._writableState;S&&(S.constructed=!0,S.closed=!1,S.closeEmitted=!1,S.destroyed=!1,S.errored=null,S.errorEmitted=!1,S.reading=!1,S.ended=S.readable===!1,S.endEmitted=S.readable===!1),q&&(q.constructed=!0,q.destroyed=!1,q.closed=!1,q.closeEmitted=!1,q.errored=null,q.errorEmitted=!1,q.finalCalled=!1,q.prefinished=!1,q.ended=q.writable===!1,q.ending=q.writable===!1,q.finished=q.writable===!1)}function L(S,q,te){let Y=S._readableState,me=S._writableState;if(me!=null&&me.destroyed||Y!=null&&Y.destroyed)return this;Y!=null&&Y.autoDestroy||me!=null&&me.autoDestroy?S.destroy(q):q&&(q.stack,me&&!me.errored&&(me.errored=q),Y&&!Y.errored&&(Y.errored=q),te?t.nextTick(I,S,q):I(S,q))}function F(S,q){if(typeof S._construct!="function")return;let te=S._readableState,Y=S._writableState;te&&(te.constructed=!1),Y&&(Y.constructed=!1),S.once(g,q),!(S.listenerCount(g)>1)&&t.nextTick(B,S)}function B(S){let q=!1;function te(Y){if(q){L(S,Y??new u);return}q=!0;let me=S._readableState,se=S._writableState,H=se||me;me&&(me.constructed=!0),se&&(se.constructed=!0),H.destroyed?S.emit(p,Y):Y?L(S,Y,!0):t.nextTick(k,S)}try{S._construct(Y=>{t.nextTick(te,Y)})}catch(Y){t.nextTick(te,Y)}}function k(S){S.emit(g)}function M(S){return(S==null?void 0:S.setHeader)&&typeof S.abort=="function"}function W(S){S.emit("close")}function J(S,q){S.emit("error",q),t.nextTick(W,S)}function ne(S,q){!S||o(S)||(!q&&!l(S)&&(q=new n),f(S)?(S.socket=null,S.destroy(q)):M(S)?S.abort():M(S.req)?S.req.abort():typeof S.destroy=="function"?S.destroy(q):typeof S.close=="function"?S.close():q?t.nextTick(J,S,q):t.nextTick(W,S),S.destroyed||(S[s]=!0))}i.exports={construct:F,destroyer:ne,destroy:A,undestroy:v,errorOrDestroy:L}});function Re(){Re.init.call(this)}function yr(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function Eo(e){return e._maxListeners===void 0?Re.defaultMaxListeners:e._maxListeners}function So(e,i,t,a){var u,n,r,s;if(yr(t),(n=e._events)===void 0?(n=e._events=Object.create(null),e._eventsCount=0):(n.newListener!==void 0&&(e.emit("newListener",i,t.listener?t.listener:t),n=e._events),r=n[i]),r===void 0)r=n[i]=t,++e._eventsCount;else if(typeof r=="function"?r=n[i]=a?[t,r]:[r,t]:a?r.unshift(t):r.push(t),(u=Eo(e))>0&&r.length>u&&!r.warned){r.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+r.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=e,o.type=i,o.count=r.length,s=o,console&&console.warn&&console.warn(s)}return e}function Yl(){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 Co(e,i,t){var a={fired:!1,wrapFn:void 0,target:e,type:i,listener:t},u=Yl.bind(a);return u.listener=t,a.wrapFn=u,u}function Io(e,i,t){var a=e._events;if(a===void 0)return[];var u=a[i];return u===void 0?[]:typeof u=="function"?t?[u.listener||u]:[u]:t?function(n){for(var r=new Array(n.length),s=0;s<r.length;++s)r[s]=n[s].listener||n[s];return r}(u):ko(u,u.length)}function To(e){var i=this._events;if(i!==void 0){var t=i[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}function ko(e,i){for(var t=new Array(i),a=0;a<i;++a)t[a]=e[a];return t}var Bo,Oo,Nt,ni,ii,oi,it,Po=Ge(()=>{ae(),ue(),le(),Nt=typeof Reflect=="object"?Reflect:null,ni=Nt&&typeof Nt.apply=="function"?Nt.apply:function(e,i,t){return Function.prototype.apply.call(e,i,t)},Oo=Nt&&typeof Nt.ownKeys=="function"?Nt.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)},ii=Number.isNaN||function(e){return e!=e},Bo=Re,Re.EventEmitter=Re,Re.prototype._events=void 0,Re.prototype._eventsCount=0,Re.prototype._maxListeners=void 0,oi=10,Object.defineProperty(Re,"defaultMaxListeners",{enumerable:!0,get:function(){return oi},set:function(e){if(typeof e!="number"||e<0||ii(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");oi=e}}),Re.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},Re.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||ii(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},Re.prototype.getMaxListeners=function(){return Eo(this)},Re.prototype.emit=function(e){for(var i=[],t=1;t<arguments.length;t++)i.push(arguments[t]);var a=e==="error",u=this._events;if(u!==void 0)a=a&&u.error===void 0;else if(!a)return!1;if(a){var n;if(i.length>0&&(n=i[0]),n instanceof Error)throw n;var r=new Error("Unhandled error."+(n?" ("+n.message+")":""));throw r.context=n,r}var s=u[e];if(s===void 0)return!1;if(typeof s=="function")ni(s,this,i);else{var o=s.length,l=ko(s,o);for(t=0;t<o;++t)ni(l[t],this,i)}return!0},Re.prototype.addListener=function(e,i){return So(this,e,i,!1)},Re.prototype.on=Re.prototype.addListener,Re.prototype.prependListener=function(e,i){return So(this,e,i,!0)},Re.prototype.once=function(e,i){return yr(i),this.on(e,Co(this,e,i)),this},Re.prototype.prependOnceListener=function(e,i){return yr(i),this.prependListener(e,Co(this,e,i)),this},Re.prototype.removeListener=function(e,i){var t,a,u,n,r;if(yr(i),(a=this._events)===void 0)return this;if((t=a[e])===void 0)return this;if(t===i||t.listener===i)--this._eventsCount==0?this._events=Object.create(null):(delete a[e],a.removeListener&&this.emit("removeListener",e,t.listener||i));else if(typeof t!="function"){for(u=-1,n=t.length-1;n>=0;n--)if(t[n]===i||t[n].listener===i){r=t[n].listener,u=n;break}if(u<0)return this;u===0?t.shift():function(s,o){for(;o+1<s.length;o++)s[o]=s[o+1];s.pop()}(t,u),t.length===1&&(a[e]=t[0]),a.removeListener!==void 0&&this.emit("removeListener",e,r||i)}return this},Re.prototype.off=Re.prototype.removeListener,Re.prototype.removeAllListeners=function(e){var i,t,a;if((t=this._events)===void 0)return this;if(t.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):t[e]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete t[e]),this;if(arguments.length===0){var u,n=Object.keys(t);for(a=0;a<n.length;++a)(u=n[a])!=="removeListener"&&this.removeAllListeners(u);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(i=t[e])=="function")this.removeListener(e,i);else if(i!==void 0)for(a=i.length-1;a>=0;a--)this.removeListener(e,i[a]);return this},Re.prototype.listeners=function(e){return Io(this,e,!0)},Re.prototype.rawListeners=function(e){return Io(this,e,!1)},Re.listenerCount=function(e,i){return typeof e.listenerCount=="function"?e.listenerCount(i):To.call(e,i)},Re.prototype.listenerCount=To,Re.prototype.eventNames=function(){return this._eventsCount>0?Oo(this._events):[]},it=Bo,it.EventEmitter,it.defaultMaxListeners,it.init,it.listenerCount,it.EventEmitter,it.defaultMaxListeners,it.init,it.listenerCount}),Ft={};Mt(Ft,{EventEmitter:()=>xo,default:()=>it,defaultMaxListeners:()=>Ro,init:()=>Mo,listenerCount:()=>Uo,on:()=>Do,once:()=>Lo});var xo,Ro,Mo,Uo,Do,Lo,er=Ge(()=>{ae(),ue(),le(),Po(),Po(),it.once=function(e,i){return new Promise((t,a)=>{function u(...r){n!==void 0&&e.removeListener("error",n),t(r)}let n;i!=="error"&&(n=r=>{e.removeListener(name,u),a(r)},e.once("error",n)),e.once(i,u)})},it.on=function(e,i){let t=[],a=[],u=null,n=!1,r={async next(){let l=t.shift();if(l)return createIterResult(l,!1);if(u){let f=Promise.reject(u);return u=null,f}return n?createIterResult(void 0,!0):new Promise((f,p)=>a.push({resolve:f,reject:p}))},async return(){e.removeListener(i,s),e.removeListener("error",o),n=!0;for(let l of a)l.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(l){u=l,e.removeListener(i,s),e.removeListener("error",o)},[Symbol.asyncIterator](){return this}};return e.on(i,s),e.on("error",o),r;function s(...l){let f=a.shift();f?f.resolve(createIterResult(l,!1)):t.push(l)}function o(l){n=!0;let f=a.shift();f?f.reject(l):u=l,r.return()}},{EventEmitter:xo,defaultMaxListeners:Ro,init:Mo,listenerCount:Uo,on:Do,once:Lo}=it}),si=Ae((e,i)=>{ae(),ue(),le();var{ArrayIsArray:t,ObjectSetPrototypeOf:a}=qe(),{EventEmitter:u}=(er(),Ue(Ft));function n(s){u.call(this,s)}a(n.prototype,u.prototype),a(n,u),n.prototype.pipe=function(s,o){let l=this;function f(U){s.writable&&s.write(U)===!1&&l.pause&&l.pause()}l.on("data",f);function p(){l.readable&&l.resume&&l.resume()}s.on("drain",p),!s._isStdio&&(!o||o.end!==!1)&&(l.on("end",m),l.on("close",A));let g=!1;function m(){g||(g=!0,s.end())}function A(){g||(g=!0,typeof s.destroy=="function"&&s.destroy())}function b(U){C(),u.listenerCount(this,"error")===0&&this.emit("error",U)}r(l,"error",b),r(s,"error",b);function C(){l.removeListener("data",f),s.removeListener("drain",p),l.removeListener("end",m),l.removeListener("close",A),l.removeListener("error",b),s.removeListener("error",b),l.removeListener("end",C),l.removeListener("close",C),s.removeListener("close",C)}return l.on("end",C),l.on("close",C),s.on("close",C),s.emit("pipe",l),s};function r(s,o,l){if(typeof s.prependListener=="function")return s.prependListener(o,l);!s._events||!s._events[o]?s.on(o,l):t(s._events[o])?s._events[o].unshift(l):s._events[o]=[l,s._events[o]]}i.exports={Stream:n,prependListener:r}}),wr=Ae((e,i)=>{ae(),ue(),le();var{AbortError:t,codes:a}=rt(),{isNodeStream:u,isWebStream:n,kControllerErrorFunction:r}=yt(),s=Ot(),{ERR_INVALID_ARG_TYPE:o}=a,l=(f,p)=>{if(typeof f!="object"||!("aborted"in f))throw new o(p,"AbortSignal",f)};i.exports.addAbortSignal=function(f,p){if(l(f,"signal"),!u(p)&&!n(p))throw new o("stream",["ReadableStream","WritableStream","Stream"],p);return i.exports.addAbortSignalNoValidate(f,p)},i.exports.addAbortSignalNoValidate=function(f,p){if(typeof f!="object"||!("aborted"in f))return p;let g=u(p)?()=>{p.destroy(new t(void 0,{cause:f.reason}))}:()=>{p[r](new t(void 0,{cause:f.reason}))};return f.aborted?g():(f.addEventListener("abort",g),s(p,()=>f.removeEventListener("abort",g))),p}}),Gl=Ae((e,i)=>{ae(),ue(),le();var{StringPrototypeSlice:t,SymbolIterator:a,TypedArrayPrototypeSet:u,Uint8Array:n}=qe(),{Buffer:r}=(Ze(),Ue(Je)),{inspect:s}=bt();i.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(o){let l={data:o,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length}unshift(o){let l={data:o,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length}shift(){if(this.length===0)return;let o=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,o}clear(){this.head=this.tail=null,this.length=0}join(o){if(this.length===0)return"";let l=this.head,f=""+l.data;for(;(l=l.next)!==null;)f+=o+l.data;return f}concat(o){if(this.length===0)return r.alloc(0);let l=r.allocUnsafe(o>>>0),f=this.head,p=0;for(;f;)u(l,f.data,p),p+=f.data.length,f=f.next;return l}consume(o,l){let f=this.head.data;if(o<f.length){let p=f.slice(0,o);return this.head.data=f.slice(o),p}return o===f.length?this.shift():l?this._getString(o):this._getBuffer(o)}first(){return this.head.data}*[a](){for(let o=this.head;o;o=o.next)yield o.data}_getString(o){let l="",f=this.head,p=0;do{let g=f.data;if(o>g.length)l+=g,o-=g.length;else{o===g.length?(l+=g,++p,f.next?this.head=f.next:this.head=this.tail=null):(l+=t(g,0,o),this.head=f,f.data=t(g,o));break}++p}while((f=f.next)!==null);return this.length-=p,l}_getBuffer(o){let l=r.allocUnsafe(o),f=o,p=this.head,g=0;do{let m=p.data;if(o>m.length)u(l,m,f-o),o-=m.length;else{o===m.length?(u(l,m,f-o),++g,p.next?this.head=p.next:this.head=this.tail=null):(u(l,new n(m.buffer,m.byteOffset,o),f-o),this.head=p,p.data=m.slice(o));break}++g}while((p=p.next)!==null);return this.length-=g,l}[Symbol.for("nodejs.util.inspect.custom")](o,l){return s(this,{...l,depth:0,customInspect:!1})}}}),ai=Ae((e,i)=>{ae(),ue(),le();var{MathFloor:t,NumberIsInteger:a}=qe(),{ERR_INVALID_ARG_VALUE:u}=rt().codes;function n(o,l,f){return o.highWaterMark!=null?o.highWaterMark:l?o[f]:null}function r(o){return o?16:16*1024}function s(o,l,f,p){let g=n(l,p,f);if(g!=null){if(!a(g)||g<0){let m=p?`options.${f}`:"options.highWaterMark";throw new u(m,g)}return t(g)}return r(o.objectMode)}i.exports={getHighWaterMark:s,getDefaultHighWaterMark:r}});function No(e){var i=e.length;if(i%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");return t===-1&&(t=i),[t,t===i?0:4-t%4]}function Jl(e,i,t){for(var a,u,n=[],r=i;r<t;r+=3)a=(e[r]<<16&16711680)+(e[r+1]<<8&65280)+(255&e[r+2]),n.push(at[(u=a)>>18&63]+at[u>>12&63]+at[u>>6&63]+at[63&u]);return n.join("")}function wt(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var i=new Uint8Array(e);return Object.setPrototypeOf(i,pe.prototype),i}function pe(e,i,t){if(typeof e=="number"){if(typeof i=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return li(e)}return Fo(e,i,t)}function Fo(e,i,t){if(typeof e=="string")return function(n,r){if(typeof r=="string"&&r!==""||(r="utf8"),!pe.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var s=0|Vo(n,r),o=wt(s),l=o.write(n,r);return l!==s&&(o=o.slice(0,l)),o}(e,i);if(ArrayBuffer.isView(e))return ui(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(vt(e,ArrayBuffer)||e&&vt(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(vt(e,SharedArrayBuffer)||e&&vt(e.buffer,SharedArrayBuffer)))return Zl(e,i,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var a=e.valueOf&&e.valueOf();if(a!=null&&a!==e)return pe.from(a,i,t);var u=function(n){if(pe.isBuffer(n)){var r=0|ci(n.length),s=wt(r);return s.length===0||n.copy(s,0,0,r),s}if(n.length!==void 0)return typeof n.length!="number"||fi(n.length)?wt(0):ui(n);if(n.type==="Buffer"&&Array.isArray(n.data))return ui(n.data)}(e);if(u)return u;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return pe.from(e[Symbol.toPrimitive]("string"),i,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function jo(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function li(e){return jo(e),wt(e<0?0:0|ci(e))}function ui(e){for(var i=e.length<0?0:0|ci(e.length),t=wt(i),a=0;a<i;a+=1)t[a]=255&e[a];return t}function Zl(e,i,t){if(i<0||e.byteLength<i)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<i+(t||0))throw new RangeError('"length" is outside of buffer bounds');var a;return a=i===void 0&&t===void 0?new Uint8Array(e):t===void 0?new Uint8Array(e,i):new Uint8Array(e,i,t),Object.setPrototypeOf(a,pe.prototype),a}function ci(e){if(e>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function Vo(e,i){if(pe.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||vt(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var t=e.length,a=arguments.length>2&&arguments[2]===!0;if(!a&&t===0)return 0;for(var u=!1;;)switch(i){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return hi(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return Yo(e).length;default:if(u)return a?-1:hi(e).length;i=(""+i).toLowerCase(),u=!0}}function Xl(e,i,t){var a=!1;if((i===void 0||i<0)&&(i=0),i>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0)<=(i>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return lu(this,i,t);case"utf8":case"utf-8":return Ho(this,i,t);case"ascii":return su(this,i,t);case"latin1":case"binary":return au(this,i,t);case"base64":return ou(this,i,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return uu(this,i,t);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function jt(e,i,t){var a=e[i];e[i]=e[t],e[t]=a}function Ko(e,i,t,a,u){if(e.length===0)return-1;if(typeof t=="string"?(a=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),fi(t=+t)&&(t=u?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(u)return-1;t=e.length-1}else if(t<0){if(!u)return-1;t=0}if(typeof i=="string"&&(i=pe.from(i,a)),pe.isBuffer(i))return i.length===0?-1:Wo(e,i,t,a,u);if(typeof i=="number")return i&=255,typeof Uint8Array.prototype.indexOf=="function"?u?Uint8Array.prototype.indexOf.call(e,i,t):Uint8Array.prototype.lastIndexOf.call(e,i,t):Wo(e,[i],t,a,u);throw new TypeError("val must be string, number or Buffer")}function Wo(e,i,t,a,u){var n,r=1,s=e.length,o=i.length;if(a!==void 0&&((a=String(a).toLowerCase())==="ucs2"||a==="ucs-2"||a==="utf16le"||a==="utf-16le")){if(e.length<2||i.length<2)return-1;r=2,s/=2,o/=2,t/=2}function l(m,A){return r===1?m[A]:m.readUInt16BE(A*r)}if(u){var f=-1;for(n=t;n<s;n++)if(l(e,n)===l(i,f===-1?0:n-f)){if(f===-1&&(f=n),n-f+1===o)return f*r}else f!==-1&&(n-=n-f),f=-1}else for(t+o>s&&(t=s-o),n=t;n>=0;n--){for(var p=!0,g=0;g<o;g++)if(l(e,n+g)!==l(i,g)){p=!1;break}if(p)return n}return-1}function eu(e,i,t,a){t=Number(t)||0;var u=e.length-t;a?(a=Number(a))>u&&(a=u):a=u;var n=i.length;a>n/2&&(a=n/2);for(var r=0;r<a;++r){var s=parseInt(i.substr(2*r,2),16);if(fi(s))return r;e[t+r]=s}return r}function tu(e,i,t,a){return vr(hi(i,e.length-t),e,t,a)}function Qo(e,i,t,a){return vr(function(u){for(var n=[],r=0;r<u.length;++r)n.push(255&u.charCodeAt(r));return n}(i),e,t,a)}function ru(e,i,t,a){return Qo(e,i,t,a)}function nu(e,i,t,a){return vr(Yo(i),e,t,a)}function iu(e,i,t,a){return vr(function(u,n){for(var r,s,o,l=[],f=0;f<u.length&&!((n-=2)<0);++f)r=u.charCodeAt(f),s=r>>8,o=r%256,l.push(o),l.push(s);return l}(i,e.length-t),e,t,a)}function ou(e,i,t){return i===0&&t===e.length?Er.fromByteArray(e):Er.fromByteArray(e.slice(i,t))}function Ho(e,i,t){t=Math.min(e.length,t);for(var a=[],u=i;u<t;){var n,r,s,o,l=e[u],f=null,p=l>239?4:l>223?3:l>191?2:1;if(u+p<=t)switch(p){case 1:l<128&&(f=l);break;case 2:(192&(n=e[u+1]))==128&&(o=(31&l)<<6|63&n)>127&&(f=o);break;case 3:n=e[u+1],r=e[u+2],(192&n)==128&&(192&r)==128&&(o=(15&l)<<12|(63&n)<<6|63&r)>2047&&(o<55296||o>57343)&&(f=o);break;case 4:n=e[u+1],r=e[u+2],s=e[u+3],(192&n)==128&&(192&r)==128&&(192&s)==128&&(o=(15&l)<<18|(63&n)<<12|(63&r)<<6|63&s)>65535&&o<1114112&&(f=o)}f===null?(f=65533,p=1):f>65535&&(f-=65536,a.push(f>>>10&1023|55296),f=56320|1023&f),a.push(f),u+=p}return function(g){var m=g.length;if(m<=4096)return String.fromCharCode.apply(String,g);for(var A="",b=0;b<m;)A+=String.fromCharCode.apply(String,g.slice(b,b+=4096));return A}(a)}function su(e,i,t){var a="";t=Math.min(e.length,t);for(var u=i;u<t;++u)a+=String.fromCharCode(127&e[u]);return a}function au(e,i,t){var a="";t=Math.min(e.length,t);for(var u=i;u<t;++u)a+=String.fromCharCode(e[u]);return a}function lu(e,i,t){var a=e.length;(!i||i<0)&&(i=0),(!t||t<0||t>a)&&(t=a);for(var u="",n=i;n<t;++n)u+=rs[e[n]];return u}function uu(e,i,t){for(var a=e.slice(i,t),u="",n=0;n<a.length;n+=2)u+=String.fromCharCode(a[n]+256*a[n+1]);return u}function $e(e,i,t){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+i>t)throw new RangeError("Trying to access beyond buffer length")}function nt(e,i,t,a,u,n){if(!pe.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>u||i<n)throw new RangeError('"value" argument is out of bounds');if(t+a>e.length)throw new RangeError("Index out of range")}function qo(e,i,t,a,u,n){if(t+a>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function $o(e,i,t,a,u){return i=+i,t>>>=0,u||qo(e,0,t,4),Wt.write(e,i,t,a,23,4),t+4}function zo(e,i,t,a,u){return i=+i,t>>>=0,u||qo(e,0,t,8),Wt.write(e,i,t,a,52,8),t+8}function hi(e,i){var t;i=i||1/0;for(var a=e.length,u=null,n=[],r=0;r<a;++r){if((t=e.charCodeAt(r))>55295&&t<57344){if(!u){if(t>56319){(i-=3)>-1&&n.push(239,191,189);continue}if(r+1===a){(i-=3)>-1&&n.push(239,191,189);continue}u=t;continue}if(t<56320){(i-=3)>-1&&n.push(239,191,189),u=t;continue}t=65536+(u-55296<<10|t-56320)}else u&&(i-=3)>-1&&n.push(239,191,189);if(u=null,t<128){if((i-=1)<0)break;n.push(t)}else if(t<2048){if((i-=2)<0)break;n.push(t>>6|192,63&t|128)}else if(t<65536){if((i-=3)<0)break;n.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((i-=4)<0)break;n.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return n}function Yo(e){return Er.toByteArray(function(i){if((i=(i=i.split("=")[0]).trim().replace(ts,"")).length<2)return"";for(;i.length%4!=0;)i+="=";return i}(e))}function vr(e,i,t,a){for(var u=0;u<a&&!(u+t>=i.length||u>=e.length);++u)i[u+t]=e[u];return u}function vt(e,i){return e instanceof i||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===i.name}function fi(e){return e!=e}function Go(e,i){for(var t in e)i[t]=e[t]}function Vt(e,i,t){return lt(e,i,t)}function ar(e){var i;switch(this.encoding=function(t){var a=function(u){if(!u)return"utf8";for(var n;;)switch(u){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 u;default:if(n)return;u=(""+u).toLowerCase(),n=!0}}(t);if(typeof a!="string"&&(Sr.isEncoding===gi||!gi(t)))throw new Error("Unknown encoding: "+t);return a||t}(e),this.encoding){case"utf16le":this.text=hu,this.end=fu,i=4;break;case"utf8":this.fillLast=cu,i=4;break;case"base64":this.text=du,this.end=pu,i=3;break;default:return this.write=gu,this.end=mu,void 0}this.lastNeed=0,this.lastTotal=0,this.lastChar=Sr.allocUnsafe(i)}function di(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function cu(e){var i=this.lastTotal-this.lastNeed,t=function(a,u,n){if((192&u[0])!=128)return a.lastNeed=0,"�";if(a.lastNeed>1&&u.length>1){if((192&u[1])!=128)return a.lastNeed=1,"�";if(a.lastNeed>2&&u.length>2&&(192&u[2])!=128)return a.lastNeed=2,"�"}}(this,e);return t!==void 0?t:this.lastNeed<=e.length?(e.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,i,0,e.length),this.lastNeed-=e.length,void 0)}function hu(e,i){if((e.length-i)%2==0){var t=e.toString("utf16le",i);if(t){var a=t.charCodeAt(t.length-1);if(a>=55296&&a<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",i,e.length-1)}function fu(e){var i=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,t)}return i}function du(e,i){var t=(e.length-i)%3;return t===0?e.toString("base64",i):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",i,e.length-t))}function pu(e){var i=e&&e.length?this.write(e):"";return this.lastNeed?i+this.lastChar.toString("base64",0,3-this.lastNeed):i}function gu(e){return e.toString(this.encoding)}function mu(e){return e&&e.length?this.write(e):""}var Jo,at,ot,Zo,_r,Kt,Xo,es,ft,Er,Wt,pi,ts,rs,lr,ur,lt,ns,tr,Sr,gi,is=Ge(()=>{for(ae(),ue(),le(),Jo={byteLength:function(e){var i=No(e),t=i[0],a=i[1];return 3*(t+a)/4-a},toByteArray:function(e){var i,t,a=No(e),u=a[0],n=a[1],r=new Zo(function(l,f,p){return 3*(f+p)/4-p}(0,u,n)),s=0,o=n>0?u-4:u;for(t=0;t<o;t+=4)i=ot[e.charCodeAt(t)]<<18|ot[e.charCodeAt(t+1)]<<12|ot[e.charCodeAt(t+2)]<<6|ot[e.charCodeAt(t+3)],r[s++]=i>>16&255,r[s++]=i>>8&255,r[s++]=255&i;return n===2&&(i=ot[e.charCodeAt(t)]<<2|ot[e.charCodeAt(t+1)]>>4,r[s++]=255&i),n===1&&(i=ot[e.charCodeAt(t)]<<10|ot[e.charCodeAt(t+1)]<<4|ot[e.charCodeAt(t+2)]>>2,r[s++]=i>>8&255,r[s++]=255&i),r},fromByteArray:function(e){for(var i,t=e.length,a=t%3,u=[],n=0,r=t-a;n<r;n+=16383)u.push(Jl(e,n,n+16383>r?r:n+16383));return a===1?(i=e[t-1],u.push(at[i>>2]+at[i<<4&63]+"==")):a===2&&(i=(e[t-2]<<8)+e[t-1],u.push(at[i>>10]+at[i>>4&63]+at[i<<2&63]+"=")),u.join("")}},at=[],ot=[],Zo=typeof Uint8Array<"u"?Uint8Array:Array,_r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kt=0,Xo=_r.length;Kt<Xo;++Kt)at[Kt]=_r[Kt],ot[_r.charCodeAt(Kt)]=Kt;ot[45]=62,ot[95]=63,es={read:function(e,i,t,a,u){var n,r,s=8*u-a-1,o=(1<<s)-1,l=o>>1,f=-7,p=t?u-1:0,g=t?-1:1,m=e[i+p];for(p+=g,n=m&(1<<-f)-1,m>>=-f,f+=s;f>0;n=256*n+e[i+p],p+=g,f-=8);for(r=n&(1<<-f)-1,n>>=-f,f+=a;f>0;r=256*r+e[i+p],p+=g,f-=8);if(n===0)n=1-l;else{if(n===o)return r?NaN:1/0*(m?-1:1);r+=Math.pow(2,a),n-=l}return(m?-1:1)*r*Math.pow(2,n-a)},write:function(e,i,t,a,u,n){var r,s,o,l=8*n-u-1,f=(1<<l)-1,p=f>>1,g=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=a?0:n-1,A=a?1:-1,b=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(s=isNaN(i)?1:0,r=f):(r=Math.floor(Math.log(i)/Math.LN2),i*(o=Math.pow(2,-r))<1&&(r--,o*=2),(i+=r+p>=1?g/o:g*Math.pow(2,1-p))*o>=2&&(r++,o/=2),r+p>=f?(s=0,r=f):r+p>=1?(s=(i*o-1)*Math.pow(2,u),r+=p):(s=i*Math.pow(2,p-1)*Math.pow(2,u),r=0));u>=8;e[t+m]=255&s,m+=A,s/=256,u-=8);for(r=r<<u|s,l+=u;l>0;e[t+m]=255&r,m+=A,r/=256,l-=8);e[t+m-A]|=128*b}},ft={},Er=Jo,Wt=es,pi=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null,ft.Buffer=pe,ft.SlowBuffer=function(e){return+e!=e&&(e=0),pe.alloc(+e)},ft.INSPECT_MAX_BYTES=50,ft.kMaxLength=2147483647,pe.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),i={foo:function(){return 42}};return Object.setPrototypeOf(i,Uint8Array.prototype),Object.setPrototypeOf(e,i),e.foo()===42}catch{return!1}}(),pe.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."),Object.defineProperty(pe.prototype,"parent",{enumerable:!0,get:function(){if(pe.isBuffer(this))return this.buffer}}),Object.defineProperty(pe.prototype,"offset",{enumerable:!0,get:function(){if(pe.isBuffer(this))return this.byteOffset}}),pe.poolSize=8192,pe.from=function(e,i,t){return Fo(e,i,t)},Object.setPrototypeOf(pe.prototype,Uint8Array.prototype),Object.setPrototypeOf(pe,Uint8Array),pe.alloc=function(e,i,t){return function(a,u,n){return jo(a),a<=0?wt(a):u!==void 0?typeof n=="string"?wt(a).fill(u,n):wt(a).fill(u):wt(a)}(e,i,t)},pe.allocUnsafe=function(e){return li(e)},pe.allocUnsafeSlow=function(e){return li(e)},pe.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==pe.prototype},pe.compare=function(e,i){if(vt(e,Uint8Array)&&(e=pe.from(e,e.offset,e.byteLength)),vt(i,Uint8Array)&&(i=pe.from(i,i.offset,i.byteLength)),!pe.isBuffer(e)||!pe.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===i)return 0;for(var t=e.length,a=i.length,u=0,n=Math.min(t,a);u<n;++u)if(e[u]!==i[u]){t=e[u],a=i[u];break}return t<a?-1:a<t?1:0},pe.isEncoding=function(e){switch(String(e).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}},pe.concat=function(e,i){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return pe.alloc(0);var t;if(i===void 0)for(i=0,t=0;t<e.length;++t)i+=e[t].length;var a=pe.allocUnsafe(i),u=0;for(t=0;t<e.length;++t){var n=e[t];if(vt(n,Uint8Array)&&(n=pe.from(n)),!pe.isBuffer(n))throw new TypeError('"list" argument must be an Array of Buffers');n.copy(a,u),u+=n.length}return a},pe.byteLength=Vo,pe.prototype._isBuffer=!0,pe.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<e;i+=2)jt(this,i,i+1);return this},pe.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<e;i+=4)jt(this,i,i+3),jt(this,i+1,i+2);return this},pe.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<e;i+=8)jt(this,i,i+7),jt(this,i+1,i+6),jt(this,i+2,i+5),jt(this,i+3,i+4);return this},pe.prototype.toString=function(){var e=this.length;return e===0?"":arguments.length===0?Ho(this,0,e):Xl.apply(this,arguments)},pe.prototype.toLocaleString=pe.prototype.toString,pe.prototype.equals=function(e){if(!pe.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||pe.compare(this,e)===0},pe.prototype.inspect=function(){var e="",i=ft.INSPECT_MAX_BYTES;return e=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(e+=" ... "),"<Buffer "+e+">"},pi&&(pe.prototype[pi]=pe.prototype.inspect),pe.prototype.compare=function(e,i,t,a,u){if(vt(e,Uint8Array)&&(e=pe.from(e,e.offset,e.byteLength)),!pe.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(i===void 0&&(i=0),t===void 0&&(t=e?e.length:0),a===void 0&&(a=0),u===void 0&&(u=this.length),i<0||t>e.length||a<0||u>this.length)throw new RangeError("out of range index");if(a>=u&&i>=t)return 0;if(a>=u)return-1;if(i>=t)return 1;if(this===e)return 0;for(var n=(u>>>=0)-(a>>>=0),r=(t>>>=0)-(i>>>=0),s=Math.min(n,r),o=this.slice(a,u),l=e.slice(i,t),f=0;f<s;++f)if(o[f]!==l[f]){n=o[f],r=l[f];break}return n<r?-1:r<n?1:0},pe.prototype.includes=function(e,i,t){return this.indexOf(e,i,t)!==-1},pe.prototype.indexOf=function(e,i,t){return Ko(this,e,i,t,!0)},pe.prototype.lastIndexOf=function(e,i,t){return Ko(this,e,i,t,!1)},pe.prototype.write=function(e,i,t,a){if(i===void 0)a="utf8",t=this.length,i=0;else if(t===void 0&&typeof i=="string")a=i,t=this.length,i=0;else{if(!isFinite(i))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");i>>>=0,isFinite(t)?(t>>>=0,a===void 0&&(a="utf8")):(a=t,t=void 0)}var u=this.length-i;if((t===void 0||t>u)&&(t=u),e.length>0&&(t<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var n=!1;;)switch(a){case"hex":return eu(this,e,i,t);case"utf8":case"utf-8":return tu(this,e,i,t);case"ascii":return Qo(this,e,i,t);case"latin1":case"binary":return ru(this,e,i,t);case"base64":return nu(this,e,i,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return iu(this,e,i,t);default:if(n)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),n=!0}},pe.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},pe.prototype.slice=function(e,i){var t=this.length;(e=~~e)<0?(e+=t)<0&&(e=0):e>t&&(e=t),(i=i===void 0?t:~~i)<0?(i+=t)<0&&(i=0):i>t&&(i=t),i<e&&(i=e);var a=this.subarray(e,i);return Object.setPrototypeOf(a,pe.prototype),a},pe.prototype.readUIntLE=function(e,i,t){e>>>=0,i>>>=0,t||$e(e,i,this.length);for(var a=this[e],u=1,n=0;++n<i&&(u*=256);)a+=this[e+n]*u;return a},pe.prototype.readUIntBE=function(e,i,t){e>>>=0,i>>>=0,t||$e(e,i,this.length);for(var a=this[e+--i],u=1;i>0&&(u*=256);)a+=this[e+--i]*u;return a},pe.prototype.readUInt8=function(e,i){return e>>>=0,i||$e(e,1,this.length),this[e]},pe.prototype.readUInt16LE=function(e,i){return e>>>=0,i||$e(e,2,this.length),this[e]|this[e+1]<<8},pe.prototype.readUInt16BE=function(e,i){return e>>>=0,i||$e(e,2,this.length),this[e]<<8|this[e+1]},pe.prototype.readUInt32LE=function(e,i){return e>>>=0,i||$e(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},pe.prototype.readUInt32BE=function(e,i){return e>>>=0,i||$e(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},pe.prototype.readIntLE=function(e,i,t){e>>>=0,i>>>=0,t||$e(e,i,this.length);for(var a=this[e],u=1,n=0;++n<i&&(u*=256);)a+=this[e+n]*u;return a>=(u*=128)&&(a-=Math.pow(2,8*i)),a},pe.prototype.readIntBE=function(e,i,t){e>>>=0,i>>>=0,t||$e(e,i,this.length);for(var a=i,u=1,n=this[e+--a];a>0&&(u*=256);)n+=this[e+--a]*u;return n>=(u*=128)&&(n-=Math.pow(2,8*i)),n},pe.prototype.readInt8=function(e,i){return e>>>=0,i||$e(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},pe.prototype.readInt16LE=function(e,i){e>>>=0,i||$e(e,2,this.length);var t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},pe.prototype.readInt16BE=function(e,i){e>>>=0,i||$e(e,2,this.length);var t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},pe.prototype.readInt32LE=function(e,i){return e>>>=0,i||$e(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},pe.prototype.readInt32BE=function(e,i){return e>>>=0,i||$e(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},pe.prototype.readFloatLE=function(e,i){return e>>>=0,i||$e(e,4,this.length),Wt.read(this,e,!0,23,4)},pe.prototype.readFloatBE=function(e,i){return e>>>=0,i||$e(e,4,this.length),Wt.read(this,e,!1,23,4)},pe.prototype.readDoubleLE=function(e,i){return e>>>=0,i||$e(e,8,this.length),Wt.read(this,e,!0,52,8)},pe.prototype.readDoubleBE=function(e,i){return e>>>=0,i||$e(e,8,this.length),Wt.read(this,e,!1,52,8)},pe.prototype.writeUIntLE=function(e,i,t,a){e=+e,i>>>=0,t>>>=0,a||nt(this,e,i,t,Math.pow(2,8*t)-1,0);var u=1,n=0;for(this[i]=255&e;++n<t&&(u*=256);)this[i+n]=e/u&255;return i+t},pe.prototype.writeUIntBE=function(e,i,t,a){e=+e,i>>>=0,t>>>=0,a||nt(this,e,i,t,Math.pow(2,8*t)-1,0);var u=t-1,n=1;for(this[i+u]=255&e;--u>=0&&(n*=256);)this[i+u]=e/n&255;return i+t},pe.prototype.writeUInt8=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,1,255,0),this[i]=255&e,i+1},pe.prototype.writeUInt16LE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,2,65535,0),this[i]=255&e,this[i+1]=e>>>8,i+2},pe.prototype.writeUInt16BE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,2,65535,0),this[i]=e>>>8,this[i+1]=255&e,i+2},pe.prototype.writeUInt32LE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,4,4294967295,0),this[i+3]=e>>>24,this[i+2]=e>>>16,this[i+1]=e>>>8,this[i]=255&e,i+4},pe.prototype.writeUInt32BE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,4,4294967295,0),this[i]=e>>>24,this[i+1]=e>>>16,this[i+2]=e>>>8,this[i+3]=255&e,i+4},pe.prototype.writeIntLE=function(e,i,t,a){if(e=+e,i>>>=0,!a){var u=Math.pow(2,8*t-1);nt(this,e,i,t,u-1,-u)}var n=0,r=1,s=0;for(this[i]=255&e;++n<t&&(r*=256);)e<0&&s===0&&this[i+n-1]!==0&&(s=1),this[i+n]=(e/r>>0)-s&255;return i+t},pe.prototype.writeIntBE=function(e,i,t,a){if(e=+e,i>>>=0,!a){var u=Math.pow(2,8*t-1);nt(this,e,i,t,u-1,-u)}var n=t-1,r=1,s=0;for(this[i+n]=255&e;--n>=0&&(r*=256);)e<0&&s===0&&this[i+n+1]!==0&&(s=1),this[i+n]=(e/r>>0)-s&255;return i+t},pe.prototype.writeInt8=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,1,127,-128),e<0&&(e=255+e+1),this[i]=255&e,i+1},pe.prototype.writeInt16LE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,2,32767,-32768),this[i]=255&e,this[i+1]=e>>>8,i+2},pe.prototype.writeInt16BE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,2,32767,-32768),this[i]=e>>>8,this[i+1]=255&e,i+2},pe.prototype.writeInt32LE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,4,2147483647,-2147483648),this[i]=255&e,this[i+1]=e>>>8,this[i+2]=e>>>16,this[i+3]=e>>>24,i+4},pe.prototype.writeInt32BE=function(e,i,t){return e=+e,i>>>=0,t||nt(this,e,i,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[i]=e>>>24,this[i+1]=e>>>16,this[i+2]=e>>>8,this[i+3]=255&e,i+4},pe.prototype.writeFloatLE=function(e,i,t){return $o(this,e,i,!0,t)},pe.prototype.writeFloatBE=function(e,i,t){return $o(this,e,i,!1,t)},pe.prototype.writeDoubleLE=function(e,i,t){return zo(this,e,i,!0,t)},pe.prototype.writeDoubleBE=function(e,i,t){return zo(this,e,i,!1,t)},pe.prototype.copy=function(e,i,t,a){if(!pe.isBuffer(e))throw new TypeError("argument should be a Buffer");if(t||(t=0),a||a===0||(a=this.length),i>=e.length&&(i=e.length),i||(i=0),a>0&&a<t&&(a=t),a===t||e.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(t<0||t>=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-i<a-t&&(a=e.length-i+t);var u=a-t;if(this===e&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(i,t,a);else if(this===e&&t<i&&i<a)for(var n=u-1;n>=0;--n)e[n+i]=this[n+t];else Uint8Array.prototype.set.call(e,this.subarray(t,a),i);return u},pe.prototype.fill=function(e,i,t,a){if(typeof e=="string"){if(typeof i=="string"?(a=i,i=0,t=this.length):typeof t=="string"&&(a=t,t=this.length),a!==void 0&&typeof a!="string")throw new TypeError("encoding must be a string");if(typeof a=="string"&&!pe.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(e.length===1){var u=e.charCodeAt(0);(a==="utf8"&&u<128||a==="latin1")&&(e=u)}}else typeof e=="number"?e&=255:typeof e=="boolean"&&(e=Number(e));if(i<0||this.length<i||this.length<t)throw new RangeError("Out of range index");if(t<=i)return this;var n;if(i>>>=0,t=t===void 0?this.length:t>>>0,e||(e=0),typeof e=="number")for(n=i;n<t;++n)this[n]=e;else{var r=pe.isBuffer(e)?e:pe.from(e,a),s=r.length;if(s===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<t-i;++n)this[n+i]=r[n%s]}return this},ts=/[^+/0-9A-Za-z-_]/g,rs=function(){for(var e=new Array(256),i=0;i<16;++i)for(var t=16*i,a=0;a<16;++a)e[t+a]="0123456789abcdef"[i]+"0123456789abcdef"[a];return e}(),ft.Buffer,ft.INSPECT_MAX_BYTES,ft.kMaxLength,lr={},ur=ft,lt=ur.Buffer,lt.from&<.alloc&<.allocUnsafe&<.allocUnsafeSlow?lr=ur:(Go(ur,lr),lr.Buffer=Vt),Vt.prototype=Object.create(lt.prototype),Go(lt,Vt),Vt.from=function(e,i,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return lt(e,i,t)},Vt.alloc=function(e,i,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var a=lt(e);return i!==void 0?typeof t=="string"?a.fill(i,t):a.fill(i):a.fill(0),a},Vt.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return lt(e)},Vt.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ur.SlowBuffer(e)},ns=lr,tr={},Sr=ns.Buffer,gi=Sr.isEncoding||function(e){switch((e=""+e)&&e.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}},tr.StringDecoder=ar,ar.prototype.write=function(e){if(e.length===0)return"";var i,t;if(this.lastNeed){if((i=this.fillLast(e))===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<e.length?i?i+this.text(e,t):this.text(e,t):i||""},ar.prototype.end=function(e){var i=e&&e.length?this.write(e):"";return this.lastNeed?i+"�":i},ar.prototype.text=function(e,i){var t=function(u,n,r){var s=n.length-1;if(s<r)return 0;var o=di(n[s]);return o>=0?(o>0&&(u.lastNeed=o-1),o):--s<r||o===-2?0:(o=di(n[s]))>=0?(o>0&&(u.lastNeed=o-2),o):--s<r||o===-2?0:(o=di(n[s]))>=0?(o>0&&(o===2?o=0:u.lastNeed=o-3),o):0}(this,e,i);if(!this.lastNeed)return e.toString("utf8",i);this.lastTotal=t;var a=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,a),e.toString("utf8",i,a)},ar.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},tr.StringDecoder,tr.StringDecoder}),os={};Mt(os,{StringDecoder:()=>ss,default:()=>tr});var ss,Au=Ge(()=>{ae(),ue(),le(),is(),is(),ss=tr.StringDecoder}),as=Ae((e,i)=>{ae(),ue(),le();var t=Lt(),{PromisePrototypeThen:a,SymbolAsyncIterator:u,SymbolIterator:n}=qe(),{Buffer:r}=(Ze(),Ue(Je)),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_NULL_VALUES:o}=rt().codes;function l(f,p,g){let m;if(typeof p=="string"||p instanceof r)return new f({objectMode:!0,...g,read(){this.push(p),this.push(null)}});let A;if(p&&p[u])A=!0,m=p[u]();else if(p&&p[n])A=!1,m=p[n]();else throw new s("iterable",["Iterable"],p);let b=new f({objectMode:!0,highWaterMark:1,...g}),C=!1;b._read=function(){C||(C=!0,I())},b._destroy=function(v,L){a(U(v),()=>t.nextTick(L,v),F=>t.nextTick(L,F||v))};async function U(v){let L=v!=null,F=typeof m.throw=="function";if(L&&F){let{value:B,done:k}=await m.throw(v);if(await B,k)return}if(typeof m.return=="function"){let{value:B}=await m.return();await B}}async function I(){for(;;){try{let{value:v,done:L}=A?await m.next():m.next();if(L)b.push(null);else{let F=v&&typeof v.then=="function"?await v:v;if(F===null)throw C=!1,new o;if(b.push(F))continue;C=!1}}catch(v){b.destroy(v)}break}}return b}i.exports=l}),Cr=Ae((e,i)=>{ae(),ue(),le();var t=Lt(),{ArrayPrototypeIndexOf:a,NumberIsInteger:u,NumberIsNaN:n,NumberParseInt:r,ObjectDefineProperties:s,ObjectKeys:o,ObjectSetPrototypeOf:l,Promise:f,SafeSet:p,SymbolAsyncIterator:g,Symbol:m}=qe();i.exports=w,w.ReadableState=we;var{EventEmitter:A}=(er(),Ue(Ft)),{Stream:b,prependListener:C}=si(),{Buffer:U}=(Ze(),Ue(Je)),{addAbortSignal:I}=wr(),v=Ot(),L=bt().debuglog("stream",c=>{L=c}),F=Gl(),B=Xt(),{getHighWaterMark:k,getDefaultHighWaterMark:M}=ai(),{aggregateTwoErrors:W,codes:{ERR_INVALID_ARG_TYPE:J,ERR_METHOD_NOT_IMPLEMENTED:ne,ERR_OUT_OF_RANGE:S,ERR_STREAM_PUSH_AFTER_EOF:q,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:te}}=rt(),{validateObject:Y}=br(),me=m("kPaused"),{StringDecoder:se}=(Au(),Ue(os)),H=as();l(w.prototype,b.prototype),l(w,b);var be=()=>{},{errorOrDestroy:oe}=B;function we(c,d,y){typeof y!="boolean"&&(y=d instanceof _t()),this.objectMode=!!(c&&c.objectMode),y&&(this.objectMode=this.objectMode||!!(c&&c.readableObjectMode)),this.highWaterMark=c?k(this,c,"readableHighWaterMark",y):M(!1),this.buffer=new F,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[me]=null,this.errorEmitted=!1,this.emitClose=!c||c.emitClose!==!1,this.autoDestroy=!c||c.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=c&&c.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,c&&c.encoding&&(this.decoder=new se(c.encoding),this.encoding=c.encoding)}function w(c){if(!(this instanceof w))return new w(c);let d=this instanceof _t();this._readableState=new we(c,this,d),c&&(typeof c.read=="function"&&(this._read=c.read),typeof c.destroy=="function"&&(this._destroy=c.destroy),typeof c.construct=="function"&&(this._construct=c.construct),c.signal&&!d&&I(c.signal,this)),b.call(this,c),B.construct(this,()=>{this._readableState.needReadable&&re(this,this._readableState)})}w.prototype.destroy=B.destroy,w.prototype._undestroy=B.undestroy,w.prototype._destroy=function(c,d){d(c)},w.prototype[A.captureRejectionSymbol]=function(c){this.destroy(c)},w.prototype.push=function(c,d){return G(this,c,d,!1)},w.prototype.unshift=function(c,d){return G(this,c,d,!0)};function G(c,d,y,T){L("readableAddChunk",d);let K=c._readableState,ee;if(K.objectMode||(typeof d=="string"?(y=y||K.defaultEncoding,K.encoding!==y&&(T&&K.encoding?d=U.from(d,y).toString(K.encoding):(d=U.from(d,y),y=""))):d instanceof U?y="":b._isUint8Array(d)?(d=b._uint8ArrayToBuffer(d),y=""):d!=null&&(ee=new J("chunk",["string","Buffer","Uint8Array"],d))),ee)oe(c,ee);else if(d===null)K.reading=!1,E(c,K);else if(K.objectMode||d&&d.length>0)if(T)if(K.endEmitted)oe(c,new te);else{if(K.destroyed||K.errored)return!1;de(c,K,d,!0)}else if(K.ended)oe(c,new q);else{if(K.destroyed||K.errored)return!1;K.reading=!1,K.decoder&&!y?(d=K.decoder.write(d),K.objectMode||d.length!==0?de(c,K,d,!1):re(c,K)):de(c,K,d,!1)}else T||(K.reading=!1,re(c,K));return!K.ended&&(K.length<K.highWaterMark||K.length===0)}function de(c,d,y,T){d.flowing&&d.length===0&&!d.sync&&c.listenerCount("data")>0?(d.multiAwaitDrain?d.awaitDrainWriters.clear():d.awaitDrainWriters=null,d.dataEmitted=!0,c.emit("data",y)):(d.length+=d.objectMode?1:y.length,T?d.buffer.unshift(y):d.buffer.push(y),d.needReadable&&z(c)),re(c,d)}w.prototype.isPaused=function(){let c=this._readableState;return c[me]===!0||c.flowing===!1},w.prototype.setEncoding=function(c){let d=new se(c);this._readableState.decoder=d,this._readableState.encoding=this._readableState.decoder.encoding;let y=this._readableState.buffer,T="";for(let K of y)T+=d.write(K);return y.clear(),T!==""&&y.push(T),this._readableState.length=T.length,this};var ve=1073741824;function he(c){if(c>ve)throw new S("size","<= 1GiB",c);return c--,c|=c>>>1,c|=c>>>2,c|=c>>>4,c|=c>>>8,c|=c>>>16,c++,c}function R(c,d){return c<=0||d.length===0&&d.ended?0:d.objectMode?1:n(c)?d.flowing&&d.length?d.buffer.first().length:d.length:c<=d.length?c:d.ended?d.length:0}w.prototype.read=function(c){L("read",c),c===void 0?c=NaN:u(c)||(c=r(c,10));let d=this._readableState,y=c;if(c>d.highWaterMark&&(d.highWaterMark=he(c)),c!==0&&(d.emittedReadable=!1),c===0&&d.needReadable&&((d.highWaterMark!==0?d.length>=d.highWaterMark:d.length>0)||d.ended))return L("read: emitReadable",d.length,d.ended),d.length===0&&d.ended?O(this):z(this),null;if(c=R(c,d),c===0&&d.ended)return d.length===0&&O(this),null;let T=d.needReadable;if(L("need readable",T),(d.length===0||d.length-c<d.highWaterMark)&&(T=!0,L("length less than watermark",T)),d.ended||d.reading||d.destroyed||d.errored||!d.constructed)T=!1,L("reading, ended or constructing",T);else if(T){L("do read"),d.reading=!0,d.sync=!0,d.length===0&&(d.needReadable=!0);try{this._read(d.highWaterMark)}catch(ee){oe(this,ee)}d.sync=!1,d.reading||(c=R(y,d))}let K;return c>0?K=$(c,d):K=null,K===null?(d.needReadable=d.length<=d.highWaterMark,c=0):(d.length-=c,d.multiAwaitDrain?d.awaitDrainWriters.clear():d.awaitDrainWriters=null),d.length===0&&(d.ended||(d.needReadable=!0),y!==c&&d.ended&&O(this)),K!==null&&!d.errorEmitted&&!d.closeEmitted&&(d.dataEmitted=!0,this.emit("data",K)),K};function E(c,d){if(L("onEofChunk"),!d.ended){if(d.decoder){let y=d.decoder.end();y&&y.length&&(d.buffer.push(y),d.length+=d.objectMode?1:y.length)}d.ended=!0,d.sync?z(c):(d.needReadable=!1,d.emittedReadable=!0,fe(c))}}function z(c){let d=c._readableState;L("emitReadable",d.needReadable,d.emittedReadable),d.needReadable=!1,d.emittedReadable||(L("emitReadable",d.flowing),d.emittedReadable=!0,t.nextTick(fe,c))}function fe(c){let d=c._readableState;L("emitReadable_",d.destroyed,d.length,d.ended),!d.destroyed&&!d.errored&&(d.length||d.ended)&&(c.emit("readable"),d.emittedReadable=!1),d.needReadable=!d.flowing&&!d.ended&&d.length<=d.highWaterMark,ie(c)}function re(c,d){!d.readingMore&&d.constructed&&(d.readingMore=!0,t.nextTick(X,c,d))}function X(c,d){for(;!d.reading&&!d.ended&&(d.length<d.highWaterMark||d.flowing&&d.length===0);){let y=d.length;if(L("maybeReadMore read 0"),c.read(0),y===d.length)break}d.readingMore=!1}w.prototype._read=function(c){throw new ne("_read()")},w.prototype.pipe=function(c,d){let y=this,T=this._readableState;T.pipes.length===1&&(T.multiAwaitDrain||(T.multiAwaitDrain=!0,T.awaitDrainWriters=new p(T.awaitDrainWriters?[T.awaitDrainWriters]:[]))),T.pipes.push(c),L("pipe count=%d opts=%j",T.pipes.length,d);let K=(!d||d.end!==!1)&&c!==t.stdout&&c!==t.stderr?Ie:Xe;T.endEmitted?t.nextTick(K):y.once("end",K),c.on("unpipe",ee);function ee(tt,Ye){L("onunpipe"),tt===y&&Ye&&Ye.hasUnpiped===!1&&(Ye.hasUnpiped=!0,Se())}function Ie(){L("onend"),c.end()}let Be,Oe=!1;function Se(){L("cleanup"),c.removeListener("close",ze),c.removeListener("finish",Qe),Be&&c.removeListener("drain",Be),c.removeListener("error",De),c.removeListener("unpipe",ee),y.removeListener("end",Ie),y.removeListener("end",Xe),y.removeListener("data",Te),Oe=!0,Be&&T.awaitDrainWriters&&(!c._writableState||c._writableState.needDrain)&&Be()}function ke(){Oe||(T.pipes.length===1&&T.pipes[0]===c?(L("false write response, pause",0),T.awaitDrainWriters=c,T.multiAwaitDrain=!1):T.pipes.length>1&&T.pipes.includes(c)&&(L("false write response, pause",T.awaitDrainWriters.size),T.awaitDrainWriters.add(c)),y.pause()),Be||(Be=ye(y,c),c.on("drain",Be))}y.on("data",Te);function Te(tt){L("ondata");let Ye=c.write(tt);L("dest.write",Ye),Ye===!1&&ke()}function De(tt){if(L("onerror",tt),Xe(),c.removeListener("error",De),c.listenerCount("error")===0){let Ye=c._writableState||c._readableState;Ye&&!Ye.errorEmitted?oe(c,tt):c.emit("error",tt)}}C(c,"error",De);function ze(){c.removeListener("finish",Qe),Xe()}c.once("close",ze);function Qe(){L("onfinish"),c.removeListener("close",ze),Xe()}c.once("finish",Qe);function Xe(){L("unpipe"),y.unpipe(c)}return c.emit("pipe",y),c.writableNeedDrain===!0?T.flowing&&ke():T.flowing||(L("pipe resume"),y.resume()),c};function ye(c,d){return function(){let y=c._readableState;y.awaitDrainWriters===d?(L("pipeOnDrain",1),y.awaitDrainWriters=null):y.multiAwaitDrain&&(L("pipeOnDrain",y.awaitDrainWriters.size),y.awaitDrainWriters.delete(d)),(!y.awaitDrainWriters||y.awaitDrainWriters.size===0)&&c.listenerCount("data")&&c.resume()}}w.prototype.unpipe=function(c){let d=this._readableState,y={hasUnpiped:!1};if(d.pipes.length===0)return this;if(!c){let K=d.pipes;d.pipes=[],this.pause();for(let ee=0;ee<K.length;ee++)K[ee].emit("unpipe",this,{hasUnpiped:!1});return this}let T=a(d.pipes,c);return T===-1?this:(d.pipes.splice(T,1),d.pipes.length===0&&this.pause(),c.emit("unpipe",this,y),this)},w.prototype.on=function(c,d){let y=b.prototype.on.call(this,c,d),T=this._readableState;return c==="data"?(T.readableListening=this.listenerCount("readable")>0,T.flowing!==!1&&this.resume()):c==="readable"&&!T.endEmitted&&!T.readableListening&&(T.readableListening=T.needReadable=!0,T.flowing=!1,T.emittedReadable=!1,L("on readable",T.length,T.reading),T.length?z(this):T.reading||t.nextTick(P,this)),y},w.prototype.addListener=w.prototype.on,w.prototype.removeListener=function(c,d){let y=b.prototype.removeListener.call(this,c,d);return c==="readable"&&t.nextTick(ge,this),y},w.prototype.off=w.prototype.removeListener,w.prototype.removeAllListeners=function(c){let d=b.prototype.removeAllListeners.apply(this,arguments);return(c==="readable"||c===void 0)&&t.nextTick(ge,this),d};function ge(c){let d=c._readableState;d.readableListening=c.listenerCount("readable")>0,d.resumeScheduled&&d[me]===!1?d.flowing=!0:c.listenerCount("data")>0?c.resume():d.readableListening||(d.flowing=null)}function P(c){L("readable nexttick read 0"),c.read(0)}w.prototype.resume=function(){let c=this._readableState;return c.flowing||(L("resume"),c.flowing=!c.readableListening,j(this,c)),c[me]=!1,this};function j(c,d){d.resumeScheduled||(d.resumeScheduled=!0,t.nextTick(V,c,d))}function V(c,d){L("resume",d.reading),d.reading||c.read(0),d.resumeScheduled=!1,c.emit("resume"),ie(c),d.flowing&&!d.reading&&c.read(0)}w.prototype.pause=function(){return L("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(L("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[me]=!0,this};function ie(c){let d=c._readableState;for(L("flow",d.flowing);d.flowing&&c.read()!==null;);}w.prototype.wrap=function(c){let d=!1;c.on("data",T=>{!this.push(T)&&c.pause&&(d=!0,c.pause())}),c.on("end",()=>{this.push(null)}),c.on("error",T=>{oe(this,T)}),c.on("close",()=>{this.destroy()}),c.on("destroy",()=>{this.destroy()}),this._read=()=>{d&&c.resume&&(d=!1,c.resume())};let y=o(c);for(let T=1;T<y.length;T++){let K=y[T];this[K]===void 0&&typeof c[K]=="function"&&(this[K]=c[K].bind(c))}return this},w.prototype[g]=function(){return Z(this)},w.prototype.iterator=function(c){return c!==void 0&&Y(c,"options"),Z(this,c)};function Z(c,d){typeof c.read!="function"&&(c=w.wrap(c,{objectMode:!0}));let y=D(c,d);return y.stream=c,y}async function*D(c,d){let y=be;function T(Ie){this===c?(y(),y=be):y=Ie}c.on("readable",T);let K,ee=v(c,{writable:!1},Ie=>{K=Ie?W(K,Ie):null,y(),y=be});try{for(;;){let Ie=c.destroyed?null:c.read();if(Ie!==null)yield Ie;else{if(K)throw K;if(K===null)return;await new f(T)}}}catch(Ie){throw K=W(K,Ie),K}finally{(K||(d==null?void 0:d.destroyOnReturn)!==!1)&&(K===void 0||c._readableState.autoDestroy)?B.destroyer(c,null):(c.off("readable",T),ee())}}s(w.prototype,{readable:{__proto__:null,get(){let c=this._readableState;return!!c&&c.readable!==!1&&!c.destroyed&&!c.errorEmitted&&!c.endEmitted},set(c){this._readableState&&(this._readableState.readable=!!c)}},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(c){this._readableState&&(this._readableState.flowing=c)}},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(c){this._readableState&&(this._readableState.destroyed=c)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),s(we.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[me]!==!1},set(c){this[me]=!!c}}}),w._fromList=$;function $(c,d){if(d.length===0)return null;let y;return d.objectMode?y=d.buffer.shift():!c||c>=d.length?(d.decoder?y=d.buffer.join(""):d.buffer.length===1?y=d.buffer.first():y=d.buffer.concat(d.length),d.buffer.clear()):y=d.buffer.consume(c,d.decoder),y}function O(c){let d=c._readableState;L("endReadable",d.endEmitted),d.endEmitted||(d.ended=!0,t.nextTick(N,d,c))}function N(c,d){if(L("endReadableNT",c.endEmitted,c.length),!c.errored&&!c.closeEmitted&&!c.endEmitted&&c.length===0){if(c.endEmitted=!0,d.emit("end"),d.writable&&d.allowHalfOpen===!1)t.nextTick(Q,d);else if(c.autoDestroy){let y=d._writableState;(!y||y.autoDestroy&&(y.finished||y.writable===!1))&&d.destroy()}}}function Q(c){c.writable&&!c.writableEnded&&!c.destroyed&&c.end()}w.from=function(c,d){return H(w,c,d)};var ce;function h(){return ce===void 0&&(ce={}),ce}w.fromWeb=function(c,d){return h().newStreamReadableFromReadableStream(c,d)},w.toWeb=function(c,d){return h().newReadableStreamFromStreamReadable(c,d)},w.wrap=function(c,d){var y,T;return new w({objectMode:(y=(T=c.readableObjectMode)!==null&&T!==void 0?T:c.objectMode)!==null&&y!==void 0?y:!0,...d,destroy(K,ee){B.destroyer(c,K),ee(K)}}).wrap(c)}}),ls=Ae((e,i)=>{ae(),ue(),le();var t=Lt(),{ArrayPrototypeSlice:a,Error:u,FunctionPrototypeSymbolHasInstance:n,ObjectDefineProperty:r,ObjectDefineProperties:s,ObjectSetPrototypeOf:o,StringPrototypeToLowerCase:l,Symbol:f,SymbolHasInstance:p}=qe();i.exports=se,se.WritableState=Y;var{EventEmitter:g}=(er(),Ue(Ft)),m=si().Stream,{Buffer:A}=(Ze(),Ue(Je)),b=Xt(),{addAbortSignal:C}=wr(),{getHighWaterMark:U,getDefaultHighWaterMark:I}=ai(),{ERR_INVALID_ARG_TYPE:v,ERR_METHOD_NOT_IMPLEMENTED:L,ERR_MULTIPLE_CALLBACK:F,ERR_STREAM_CANNOT_PIPE:B,ERR_STREAM_DESTROYED:k,ERR_STREAM_ALREADY_FINISHED:M,ERR_STREAM_NULL_VALUES:W,ERR_STREAM_WRITE_AFTER_END:J,ERR_UNKNOWN_ENCODING:ne}=rt().codes,{errorOrDestroy:S}=b;o(se.prototype,m.prototype),o(se,m);function q(){}var te=f("kOnFinished");function Y(P,j,V){typeof V!="boolean"&&(V=j instanceof _t()),this.objectMode=!!(P&&P.objectMode),V&&(this.objectMode=this.objectMode||!!(P&&P.writableObjectMode)),this.highWaterMark=P?U(this,P,"writableHighWaterMark",V):I(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let ie=!!(P&&P.decodeStrings===!1);this.decodeStrings=!ie,this.defaultEncoding=P&&P.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=w.bind(void 0,j),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=!P||P.emitClose!==!1,this.autoDestroy=!P||P.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[te]=[]}function me(P){P.buffered=[],P.bufferedIndex=0,P.allBuffers=!0,P.allNoop=!0}Y.prototype.getBuffer=function(){return a(this.buffered,this.bufferedIndex)},r(Y.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function se(P){let j=this instanceof _t();if(!j&&!n(se,this))return new se(P);this._writableState=new Y(P,this,j),P&&(typeof P.write=="function"&&(this._write=P.write),typeof P.writev=="function"&&(this._writev=P.writev),typeof P.destroy=="function"&&(this._destroy=P.destroy),typeof P.final=="function"&&(this._final=P.final),typeof P.construct=="function"&&(this._construct=P.construct),P.signal&&C(P.signal,this)),m.call(this,P),b.construct(this,()=>{let V=this._writableState;V.writing||he(this,V),fe(this,V)})}r(se,p,{__proto__:null,value:function(P){return n(this,P)?!0:this!==se?!1:P&&P._writableState instanceof Y}}),se.prototype.pipe=function(){S(this,new B)};function H(P,j,V,ie){let Z=P._writableState;if(typeof V=="function")ie=V,V=Z.defaultEncoding;else{if(!V)V=Z.defaultEncoding;else if(V!=="buffer"&&!A.isEncoding(V))throw new ne(V);typeof ie!="function"&&(ie=q)}if(j===null)throw new W;if(!Z.objectMode)if(typeof j=="string")Z.decodeStrings!==!1&&(j=A.from(j,V),V="buffer");else if(j instanceof A)V="buffer";else if(m._isUint8Array(j))j=m._uint8ArrayToBuffer(j),V="buffer";else throw new v("chunk",["string","Buffer","Uint8Array"],j);let D;return Z.ending?D=new J:Z.destroyed&&(D=new k("write")),D?(t.nextTick(ie,D),S(P,D,!0),D):(Z.pendingcb++,be(P,Z,j,V,ie))}se.prototype.write=function(P,j,V){return H(this,P,j,V)===!0},se.prototype.cork=function(){this._writableState.corked++},se.prototype.uncork=function(){let P=this._writableState;P.corked&&(P.corked--,P.writing||he(this,P))},se.prototype.setDefaultEncoding=function(P){if(typeof P=="string"&&(P=l(P)),!A.isEncoding(P))throw new ne(P);return this._writableState.defaultEncoding=P,this};function be(P,j,V,ie,Z){let D=j.objectMode?1:V.length;j.length+=D;let $=j.length<j.highWaterMark;return $||(j.needDrain=!0),j.writing||j.corked||j.errored||!j.constructed?(j.buffered.push({chunk:V,encoding:ie,callback:Z}),j.allBuffers&&ie!=="buffer"&&(j.allBuffers=!1),j.allNoop&&Z!==q&&(j.allNoop=!1)):(j.writelen=D,j.writecb=Z,j.writing=!0,j.sync=!0,P._write(V,ie,j.onwrite),j.sync=!1),$&&!j.errored&&!j.destroyed}function oe(P,j,V,ie,Z,D,$){j.writelen=ie,j.writecb=$,j.writing=!0,j.sync=!0,j.destroyed?j.onwrite(new k("write")):V?P._writev(Z,j.onwrite):P._write(Z,D,j.onwrite),j.sync=!1}function we(P,j,V,ie){--j.pendingcb,ie(V),ve(j),S(P,V)}function w(P,j){let V=P._writableState,ie=V.sync,Z=V.writecb;if(typeof Z!="function"){S(P,new F);return}V.writing=!1,V.writecb=null,V.length-=V.writelen,V.writelen=0,j?(j.stack,V.errored||(V.errored=j),P._readableState&&!P._readableState.errored&&(P._readableState.errored=j),ie?t.nextTick(we,P,V,j,Z):we(P,V,j,Z)):(V.buffered.length>V.bufferedIndex&&he(P,V),ie?V.afterWriteTickInfo!==null&&V.afterWriteTickInfo.cb===Z?V.afterWriteTickInfo.count++:(V.afterWriteTickInfo={count:1,cb:Z,stream:P,state:V},t.nextTick(G,V.afterWriteTickInfo)):de(P,V,1,Z))}function G({stream:P,state:j,count:V,cb:ie}){return j.afterWriteTickInfo=null,de(P,j,V,ie)}function de(P,j,V,ie){for(!j.ending&&!P.destroyed&&j.length===0&&j.needDrain&&(j.needDrain=!1,P.emit("drain"));V-- >0;)j.pendingcb--,ie();j.destroyed&&ve(j),fe(P,j)}function ve(P){if(P.writing)return;for(let Z=P.bufferedIndex;Z<P.buffered.length;++Z){var j;let{chunk:D,callback:$}=P.buffered[Z],O=P.objectMode?1:D.length;P.length-=O,$((j=P.errored)!==null&&j!==void 0?j:new k("write"))}let V=P[te].splice(0);for(let Z=0;Z<V.length;Z++){var ie;V[Z]((ie=P.errored)!==null&&ie!==void 0?ie:new k("end"))}me(P)}function he(P,j){if(j.corked||j.bufferProcessing||j.destroyed||!j.constructed)return;let{buffered:V,bufferedIndex:ie,objectMode:Z}=j,D=V.length-ie;if(!D)return;let $=ie;if(j.bufferProcessing=!0,D>1&&P._writev){j.pendingcb-=D-1;let O=j.allNoop?q:Q=>{for(let ce=$;ce<V.length;++ce)V[ce].callback(Q)},N=j.allNoop&&$===0?V:a(V,$);N.allBuffers=j.allBuffers,oe(P,j,!0,j.length,N,"",O),me(j)}else{do{let{chunk:O,encoding:N,callback:Q}=V[$];V[$++]=null;let ce=Z?1:O.length;oe(P,j,!1,ce,O,N,Q)}while($<V.length&&!j.writing);$===V.length?me(j):$>256?(V.splice(0,$),j.bufferedIndex=0):j.bufferedIndex=$}j.bufferProcessing=!1}se.prototype._write=function(P,j,V){if(this._writev)this._writev([{chunk:P,encoding:j}],V);else throw new L("_write()")},se.prototype._writev=null,se.prototype.end=function(P,j,V){let ie=this._writableState;typeof P=="function"?(V=P,P=null,j=null):typeof j=="function"&&(V=j,j=null);let Z;if(P!=null){let D=H(this,P,j);D instanceof u&&(Z=D)}return ie.corked&&(ie.corked=1,this.uncork()),Z||(!ie.errored&&!ie.ending?(ie.ending=!0,fe(this,ie,!0),ie.ended=!0):ie.finished?Z=new M("end"):ie.destroyed&&(Z=new k("end"))),typeof V=="function"&&(Z||ie.finished?t.nextTick(V,Z):ie[te].push(V)),this};function R(P){return P.ending&&!P.destroyed&&P.constructed&&P.length===0&&!P.errored&&P.buffered.length===0&&!P.finished&&!P.writing&&!P.errorEmitted&&!P.closeEmitted}function E(P,j){let V=!1;function ie(Z){if(V){S(P,Z??F());return}if(V=!0,j.pendingcb--,Z){let D=j[te].splice(0);for(let $=0;$<D.length;$++)D[$](Z);S(P,Z,j.sync)}else R(j)&&(j.prefinished=!0,P.emit("prefinish"),j.pendingcb++,t.nextTick(re,P,j))}j.sync=!0,j.pendingcb++;try{P._final(ie)}catch(Z){ie(Z)}j.sync=!1}function z(P,j){!j.prefinished&&!j.finalCalled&&(typeof P._final=="function"&&!j.destroyed?(j.finalCalled=!0,E(P,j)):(j.prefinished=!0,P.emit("prefinish")))}function fe(P,j,V){R(j)&&(z(P,j),j.pendingcb===0&&(V?(j.pendingcb++,t.nextTick((ie,Z)=>{R(Z)?re(ie,Z):Z.pendingcb--},P,j)):R(j)&&(j.pendingcb++,re(P,j))))}function re(P,j){j.pendingcb--,j.finished=!0;let V=j[te].splice(0);for(let ie=0;ie<V.length;ie++)V[ie]();if(P.emit("finish"),j.autoDestroy){let ie=P._readableState;(!ie||ie.autoDestroy&&(ie.endEmitted||ie.readable===!1))&&P.destroy()}}s(se.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(P){this._writableState&&(this._writableState.destroyed=P)}},writable:{__proto__:null,get(){let P=this._writableState;return!!P&&P.writable!==!1&&!P.destroyed&&!P.errored&&!P.ending&&!P.ended},set(P){this._writableState&&(this._writableState.writable=!!P)}},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 P=this._writableState;return P?!P.destroyed&&!P.ending&&P.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 X=b.destroy;se.prototype.destroy=function(P,j){let V=this._writableState;return!V.destroyed&&(V.bufferedIndex<V.buffered.length||V[te].length)&&t.nextTick(ve,V),X.call(this,P,j),this},se.prototype._undestroy=b.undestroy,se.prototype._destroy=function(P,j){j(P)},se.prototype[g.captureRejectionSymbol]=function(P){this.destroy(P)};var ye;function ge(){return ye===void 0&&(ye={}),ye}se.fromWeb=function(P,j){return ge().newStreamWritableFromWritableStream(P,j)},se.toWeb=function(P){return ge().newWritableStreamFromStreamWritable(P)}}),bu=Ae((e,i)=>{ae(),ue(),le();var t=Lt(),a=(Ze(),Ue(Je)),{isReadable:u,isWritable:n,isIterable:r,isNodeStream:s,isReadableNodeStream:o,isWritableNodeStream:l,isDuplexNodeStream:f}=yt(),p=Ot(),{AbortError:g,codes:{ERR_INVALID_ARG_TYPE:m,ERR_INVALID_RETURN_VALUE:A}}=rt(),{destroyer:b}=Xt(),C=_t(),U=Cr(),{createDeferredPromise:I}=bt(),v=as(),L=globalThis.Blob||a.Blob,F=typeof L<"u"?function(ne){return ne instanceof L}:function(ne){return!1},B=globalThis.AbortController||ri().AbortController,{FunctionPrototypeCall:k}=qe(),M=class extends C{constructor(ne){super(ne),(ne==null?void 0:ne.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(ne==null?void 0:ne.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};i.exports=function ne(S,q){if(f(S))return S;if(o(S))return J({readable:S});if(l(S))return J({writable:S});if(s(S))return J({writable:!1,readable:!1});if(typeof S=="function"){let{value:Y,write:me,final:se,destroy:H}=W(S);if(r(Y))return v(M,Y,{objectMode:!0,write:me,final:se,destroy:H});let be=Y==null?void 0:Y.then;if(typeof be=="function"){let oe,we=k(be,Y,w=>{if(w!=null)throw new A("nully","body",w)},w=>{b(oe,w)});return oe=new M({objectMode:!0,readable:!1,write:me,final(w){se(async()=>{try{await we,t.nextTick(w,null)}catch(G){t.nextTick(w,G)}})},destroy:H})}throw new A("Iterable, AsyncIterable or AsyncFunction",q,Y)}if(F(S))return ne(S.arrayBuffer());if(r(S))return v(M,S,{objectMode:!0,writable:!1});if(typeof(S==null?void 0:S.writable)=="object"||typeof(S==null?void 0:S.readable)=="object"){let Y=S!=null&&S.readable?o(S==null?void 0:S.readable)?S==null?void 0:S.readable:ne(S.readable):void 0,me=S!=null&&S.writable?l(S==null?void 0:S.writable)?S==null?void 0:S.writable:ne(S.writable):void 0;return J({readable:Y,writable:me})}let te=S==null?void 0:S.then;if(typeof te=="function"){let Y;return k(te,S,me=>{me!=null&&Y.push(me),Y.push(null)},me=>{b(Y,me)}),Y=new M({objectMode:!0,writable:!1,read(){}})}throw new m(q,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],S)};function W(ne){let{promise:S,resolve:q}=I(),te=new B,Y=te.signal;return{value:ne(async function*(){for(;;){let me=S;S=null;let{chunk:se,done:H,cb:be}=await me;if(t.nextTick(be),H)return;if(Y.aborted)throw new g(void 0,{cause:Y.reason});({promise:S,resolve:q}=I()),yield se}}(),{signal:Y}),write(me,se,H){let be=q;q=null,be({chunk:me,done:!1,cb:H})},final(me){let se=q;q=null,se({done:!0,cb:me})},destroy(me,se){te.abort(),se(me)}}}function J(ne){let S=ne.readable&&typeof ne.readable.read!="function"?U.wrap(ne.readable):ne.readable,q=ne.writable,te=!!u(S),Y=!!n(q),me,se,H,be,oe;function we(w){let G=be;be=null,G?G(w):w&&oe.destroy(w)}return oe=new M({readableObjectMode:!!(S!=null&&S.readableObjectMode),writableObjectMode:!!(q!=null&&q.writableObjectMode),readable:te,writable:Y}),Y&&(p(q,w=>{Y=!1,w&&b(S,w),we(w)}),oe._write=function(w,G,de){q.write(w,G)?de():me=de},oe._final=function(w){q.end(),se=w},q.on("drain",function(){if(me){let w=me;me=null,w()}}),q.on("finish",function(){if(se){let w=se;se=null,w()}})),te&&(p(S,w=>{te=!1,w&&b(S,w),we(w)}),S.on("readable",function(){if(H){let w=H;H=null,w()}}),S.on("end",function(){oe.push(null)}),oe._read=function(){for(;;){let w=S.read();if(w===null){H=oe._read;return}if(!oe.push(w))return}}),oe._destroy=function(w,G){!w&&be!==null&&(w=new g),H=null,me=null,se=null,be===null?G(w):(be=G,b(q,w),b(S,w))},oe}}),_t=Ae((e,i)=>{ae(),ue(),le();var{ObjectDefineProperties:t,ObjectGetOwnPropertyDescriptor:a,ObjectKeys:u,ObjectSetPrototypeOf:n}=qe();i.exports=o;var r=Cr(),s=ls();n(o.prototype,r.prototype),n(o,r);{let g=u(s.prototype);for(let m=0;m<g.length;m++){let A=g[m];o.prototype[A]||(o.prototype[A]=s.prototype[A])}}function o(g){if(!(this instanceof o))return new o(g);r.call(this,g),s.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}t(o.prototype,{writable:{__proto__:null,...a(s.prototype,"writable")},writableHighWaterMark:{__proto__:null,...a(s.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...a(s.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...a(s.prototype,"writableBuffer")},writableLength:{__proto__:null,...a(s.prototype,"writableLength")},writableFinished:{__proto__:null,...a(s.prototype,"writableFinished")},writableCorked:{__proto__:null,...a(s.prototype,"writableCorked")},writableEnded:{__proto__:null,...a(s.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...a(s.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 l;function f(){return l===void 0&&(l={}),l}o.fromWeb=function(g,m){return f().newStreamDuplexFromReadableWritablePair(g,m)},o.toWeb=function(g){return f().newReadableWritablePairFromDuplex(g)};var p;o.from=function(g){return p||(p=bu()),p(g,"body")}}),us=Ae((e,i)=>{ae(),ue(),le();var{ObjectSetPrototypeOf:t,Symbol:a}=qe();i.exports=o;var{ERR_METHOD_NOT_IMPLEMENTED:u}=rt().codes,n=_t(),{getHighWaterMark:r}=ai();t(o.prototype,n.prototype),t(o,n);var s=a("kCallback");function o(p){if(!(this instanceof o))return new o(p);let g=p?r(this,p,"readableHighWaterMark",!0):null;g===0&&(p={...p,highWaterMark:null,readableHighWaterMark:g,writableHighWaterMark:p.writableHighWaterMark||0}),n.call(this,p),this._readableState.sync=!1,this[s]=null,p&&(typeof p.transform=="function"&&(this._transform=p.transform),typeof p.flush=="function"&&(this._flush=p.flush)),this.on("prefinish",f)}function l(p){typeof this._flush=="function"&&!this.destroyed?this._flush((g,m)=>{if(g){p?p(g):this.destroy(g);return}m!=null&&this.push(m),this.push(null),p&&p()}):(this.push(null),p&&p())}function f(){this._final!==l&&l.call(this)}o.prototype._final=l,o.prototype._transform=function(p,g,m){throw new u("_transform()")},o.prototype._write=function(p,g,m){let A=this._readableState,b=this._writableState,C=A.length;this._transform(p,g,(U,I)=>{if(U){m(U);return}I!=null&&this.push(I),b.ended||C===A.length||A.length<A.highWaterMark?m():this[s]=m})},o.prototype._read=function(){if(this[s]){let p=this[s];this[s]=null,p()}}}),cs=Ae((e,i)=>{ae(),ue(),le();var{ObjectSetPrototypeOf:t}=qe();i.exports=u;var a=us();t(u.prototype,a.prototype),t(u,a);function u(n){if(!(this instanceof u))return new u(n);a.call(this,n)}u.prototype._transform=function(n,r,s){s(null,n)}}),mi=Ae((e,i)=>{ae(),ue(),le();var t=Lt(),{ArrayIsArray:a,Promise:u,SymbolAsyncIterator:n}=qe(),r=Ot(),{once:s}=bt(),o=Xt(),l=_t(),{aggregateTwoErrors:f,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:g,ERR_MISSING_ARGS:m,ERR_STREAM_DESTROYED:A,ERR_STREAM_PREMATURE_CLOSE:b},AbortError:C}=rt(),{validateFunction:U,validateAbortSignal:I}=br(),{isIterable:v,isReadable:L,isReadableNodeStream:F,isNodeStream:B,isTransformStream:k,isWebStream:M,isReadableStream:W,isReadableEnded:J}=yt(),ne=globalThis.AbortController||ri().AbortController,S,q;function te(G,de,ve){let he=!1;G.on("close",()=>{he=!0});let R=r(G,{readable:de,writable:ve},E=>{he=!E});return{destroy:E=>{he||(he=!0,o.destroyer(G,E||new A("pipe")))},cleanup:R}}function Y(G){return U(G[G.length-1],"streams[stream.length - 1]"),G.pop()}function me(G){if(v(G))return G;if(F(G))return se(G);throw new p("val",["Readable","Iterable","AsyncIterable"],G)}async function*se(G){q||(q=Cr()),yield*q.prototype[n].call(G)}async function H(G,de,ve,{end:he}){let R,E=null,z=X=>{if(X&&(R=X),E){let ye=E;E=null,ye()}},fe=()=>new u((X,ye)=>{R?ye(R):E=()=>{R?ye(R):X()}});de.on("drain",z);let re=r(de,{readable:!1},z);try{de.writableNeedDrain&&await fe();for await(let X of G)de.write(X)||await fe();he&&de.end(),await fe(),ve()}catch(X){ve(R!==X?f(R,X):X)}finally{re(),de.off("drain",z)}}async function be(G,de,ve,{end:he}){k(de)&&(de=de.writable);let R=de.getWriter();try{for await(let E of G)await R.ready,R.write(E).catch(()=>{});await R.ready,he&&await R.close(),ve()}catch(E){try{await R.abort(E),ve(E)}catch(z){ve(z)}}}function oe(...G){return we(G,s(Y(G)))}function we(G,de,ve){if(G.length===1&&a(G[0])&&(G=G[0]),G.length<2)throw new m("streams");let he=new ne,R=he.signal,E=ve==null?void 0:ve.signal,z=[];I(E,"options.signal");function fe(){j(new C)}E==null||E.addEventListener("abort",fe);let re,X,ye=[],ge=0;function P(D){j(D,--ge===0)}function j(D,$){if(D&&(!re||re.code==="ERR_STREAM_PREMATURE_CLOSE")&&(re=D),!(!re&&!$)){for(;ye.length;)ye.shift()(re);E==null||E.removeEventListener("abort",fe),he.abort(),$&&(re||z.forEach(O=>O()),t.nextTick(de,re,X))}}let V;for(let D=0;D<G.length;D++){let $=G[D],O=D<G.length-1,N=D>0,Q=O||(ve==null?void 0:ve.end)!==!1,ce=D===G.length-1;if(B($)){let h=function(c){c&&c.name!=="AbortError"&&c.code!=="ERR_STREAM_PREMATURE_CLOSE"&&P(c)};if(Q){let{destroy:c,cleanup:d}=te($,O,N);ye.push(c),L($)&&ce&&z.push(d)}$.on("error",h),L($)&&ce&&z.push(()=>{$.removeListener("error",h)})}if(D===0)if(typeof $=="function"){if(V=$({signal:R}),!v(V))throw new g("Iterable, AsyncIterable or Stream","source",V)}else v($)||F($)||k($)?V=$:V=l.from($);else if(typeof $=="function"){if(k(V)){var ie;V=me((ie=V)===null||ie===void 0?void 0:ie.readable)}else V=me(V);if(V=$(V,{signal:R}),O){if(!v(V,!0))throw new g("AsyncIterable",`transform[${D-1}]`,V)}else{var Z;S||(S=cs());let h=new S({objectMode:!0}),c=(Z=V)===null||Z===void 0?void 0:Z.then;if(typeof c=="function")ge++,c.call(V,T=>{X=T,T!=null&&h.write(T),Q&&h.end(),t.nextTick(P)},T=>{h.destroy(T),t.nextTick(P,T)});else if(v(V,!0))ge++,H(V,h,P,{end:Q});else if(W(V)||k(V)){let T=V.readable||V;ge++,H(T,h,P,{end:Q})}else throw new g("AsyncIterable or Promise","destination",V);V=h;let{destroy:d,cleanup:y}=te(V,!1,!0);ye.push(d),ce&&z.push(y)}}else if(B($)){if(F(V)){ge+=2;let h=w(V,$,P,{end:Q});L($)&&ce&&z.push(h)}else if(k(V)||W(V)){let h=V.readable||V;ge++,H(h,$,P,{end:Q})}else if(v(V))ge++,H(V,$,P,{end:Q});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],V);V=$}else if(M($)){if(F(V))ge++,be(me(V),$,P,{end:Q});else if(W(V)||v(V))ge++,be(V,$,P,{end:Q});else if(k(V))ge++,be(V.readable,$,P,{end:Q});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],V);V=$}else V=l.from($)}return(R!=null&&R.aborted||E!=null&&E.aborted)&&t.nextTick(fe),V}function w(G,de,ve,{end:he}){let R=!1;if(de.on("close",()=>{R||ve(new b)}),G.pipe(de,{end:!1}),he){let E=function(){R=!0,de.end()};J(G)?t.nextTick(E):G.once("end",E)}else ve();return r(G,{readable:!0,writable:!1},E=>{let z=G._readableState;E&&E.code==="ERR_STREAM_PREMATURE_CLOSE"&&z&&z.ended&&!z.errored&&!z.errorEmitted?G.once("end",ve).once("error",ve):ve(E)}),r(de,{readable:!1,writable:!0},ve)}i.exports={pipelineImpl:we,pipeline:oe}}),hs=Ae((e,i)=>{ae(),ue(),le();var{pipeline:t}=mi(),a=_t(),{destroyer:u}=Xt(),{isNodeStream:n,isReadable:r,isWritable:s,isWebStream:o,isTransformStream:l,isWritableStream:f,isReadableStream:p}=yt(),{AbortError:g,codes:{ERR_INVALID_ARG_VALUE:m,ERR_MISSING_ARGS:A}}=rt(),b=Ot();i.exports=function(...C){if(C.length===0)throw new A("streams");if(C.length===1)return a.from(C[0]);let U=[...C];if(typeof C[0]=="function"&&(C[0]=a.from(C[0])),typeof C[C.length-1]=="function"){let S=C.length-1;C[S]=a.from(C[S])}for(let S=0;S<C.length;++S)if(!(!n(C[S])&&!o(C[S]))){if(S<C.length-1&&!(r(C[S])||p(C[S])||l(C[S])))throw new m(`streams[${S}]`,U[S],"must be readable");if(S>0&&!(s(C[S])||f(C[S])||l(C[S])))throw new m(`streams[${S}]`,U[S],"must be writable")}let I,v,L,F,B;function k(S){let q=F;F=null,q?q(S):S?B.destroy(S):!ne&&!J&&B.destroy()}let M=C[0],W=t(C,k),J=!!(s(M)||f(M)||l(M)),ne=!!(r(W)||p(W)||l(W));if(B=new a({writableObjectMode:!!(M!=null&&M.writableObjectMode),readableObjectMode:!!(W!=null&&W.writableObjectMode),writable:J,readable:ne}),J){if(n(M))B._write=function(q,te,Y){M.write(q,te)?Y():I=Y},B._final=function(q){M.end(),v=q},M.on("drain",function(){if(I){let q=I;I=null,q()}});else if(o(M)){let q=(l(M)?M.writable:M).getWriter();B._write=async function(te,Y,me){try{await q.ready,q.write(te).catch(()=>{}),me()}catch(se){me(se)}},B._final=async function(te){try{await q.ready,q.close().catch(()=>{}),v=te}catch(Y){te(Y)}}}let S=l(W)?W.readable:W;b(S,()=>{if(v){let q=v;v=null,q()}})}if(ne){if(n(W))W.on("readable",function(){if(L){let S=L;L=null,S()}}),W.on("end",function(){B.push(null)}),B._read=function(){for(;;){let S=W.read();if(S===null){L=B._read;return}if(!B.push(S))return}};else if(o(W)){let S=(l(W)?W.readable:W).getReader();B._read=async function(){for(;;)try{let{value:q,done:te}=await S.read();if(!B.push(q))return;if(te){B.push(null);return}}catch{return}}}}return B._destroy=function(S,q){!S&&F!==null&&(S=new g),L=null,I=null,v=null,F===null?q(S):(F=q,n(W)&&u(W,S))},B}}),yu=Ae((e,i)=>{ae(),ue(),le();var t=globalThis.AbortController||ri().AbortController,{codes:{ERR_INVALID_ARG_VALUE:a,ERR_INVALID_ARG_TYPE:u,ERR_MISSING_ARGS:n,ERR_OUT_OF_RANGE:r},AbortError:s}=rt(),{validateAbortSignal:o,validateInteger:l,validateObject:f}=br(),p=qe().Symbol("kWeak"),{finished:g}=Ot(),m=hs(),{addAbortSignalNoValidate:A}=wr(),{isWritable:b,isNodeStream:C}=yt(),{ArrayPrototypePush:U,MathFloor:I,Number:v,NumberIsNaN:L,Promise:F,PromiseReject:B,PromisePrototypeThen:k,Symbol:M}=qe(),W=M("kEmpty"),J=M("kEof");function ne(he,R){if(R!=null&&f(R,"options"),(R==null?void 0:R.signal)!=null&&o(R.signal,"options.signal"),C(he)&&!b(he))throw new a("stream",he,"must be writable");let E=m(this,he);return R!=null&&R.signal&&A(R.signal,E),E}function S(he,R){if(typeof he!="function")throw new u("fn",["Function","AsyncFunction"],he);R!=null&&f(R,"options"),(R==null?void 0:R.signal)!=null&&o(R.signal,"options.signal");let E=1;return(R==null?void 0:R.concurrency)!=null&&(E=I(R.concurrency)),l(E,"concurrency",1),(async function*(){var z,fe;let re=new t,X=this,ye=[],ge=re.signal,P={signal:ge},j=()=>re.abort();R!=null&&(z=R.signal)!==null&&z!==void 0&&z.aborted&&j(),R==null||(fe=R.signal)===null||fe===void 0||fe.addEventListener("abort",j);let V,ie,Z=!1;function D(){Z=!0}async function $(){try{for await(let Q of X){var O;if(Z)return;if(ge.aborted)throw new s;try{Q=he(Q,P)}catch(ce){Q=B(ce)}Q!==W&&(typeof((O=Q)===null||O===void 0?void 0:O.catch)=="function"&&Q.catch(D),ye.push(Q),V&&(V(),V=null),!Z&&ye.length&&ye.length>=E&&await new F(ce=>{ie=ce}))}ye.push(J)}catch(Q){let ce=B(Q);k(ce,void 0,D),ye.push(ce)}finally{var N;Z=!0,V&&(V(),V=null),R==null||(N=R.signal)===null||N===void 0||N.removeEventListener("abort",j)}}$();try{for(;;){for(;ye.length>0;){let O=await ye[0];if(O===J)return;if(ge.aborted)throw new s;O!==W&&(yield O),ye.shift(),ie&&(ie(),ie=null)}await new F(O=>{V=O})}}finally{re.abort(),Z=!0,ie&&(ie(),ie=null)}}).call(this)}function q(he=void 0){return he!=null&&f(he,"options"),(he==null?void 0:he.signal)!=null&&o(he.signal,"options.signal"),(async function*(){let R=0;for await(let z of this){var E;if(he!=null&&(E=he.signal)!==null&&E!==void 0&&E.aborted)throw new s({cause:he.signal.reason});yield[R++,z]}}).call(this)}async function te(he,R=void 0){for await(let E of H.call(this,he,R))return!0;return!1}async function Y(he,R=void 0){if(typeof he!="function")throw new u("fn",["Function","AsyncFunction"],he);return!await te.call(this,async(...E)=>!await he(...E),R)}async function me(he,R){for await(let E of H.call(this,he,R))return E}async function se(he,R){if(typeof he!="function")throw new u("fn",["Function","AsyncFunction"],he);async function E(z,fe){return await he(z,fe),W}for await(let z of S.call(this,E,R));}function H(he,R){if(typeof he!="function")throw new u("fn",["Function","AsyncFunction"],he);async function E(z,fe){return await he(z,fe)?z:W}return S.call(this,E,R)}var be=class extends n{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function oe(he,R,E){var z;if(typeof he!="function")throw new u("reducer",["Function","AsyncFunction"],he);E!=null&&f(E,"options"),(E==null?void 0:E.signal)!=null&&o(E.signal,"options.signal");let fe=arguments.length>1;if(E!=null&&(z=E.signal)!==null&&z!==void 0&&z.aborted){let P=new s(void 0,{cause:E.signal.reason});throw this.once("error",()=>{}),await g(this.destroy(P)),P}let re=new t,X=re.signal;if(E!=null&&E.signal){let P={once:!0,[p]:this};E.signal.addEventListener("abort",()=>re.abort(),P)}let ye=!1;try{for await(let P of this){var ge;if(ye=!0,E!=null&&(ge=E.signal)!==null&&ge!==void 0&&ge.aborted)throw new s;fe?R=await he(R,P,{signal:X}):(R=P,fe=!0)}if(!ye&&!fe)throw new be}finally{re.abort()}return R}async function we(he){he!=null&&f(he,"options"),(he==null?void 0:he.signal)!=null&&o(he.signal,"options.signal");let R=[];for await(let z of this){var E;if(he!=null&&(E=he.signal)!==null&&E!==void 0&&E.aborted)throw new s(void 0,{cause:he.signal.reason});U(R,z)}return R}function w(he,R){let E=S.call(this,he,R);return(async function*(){for await(let z of E)yield*z}).call(this)}function G(he){if(he=v(he),L(he))return 0;if(he<0)throw new r("number",">= 0",he);return he}function de(he,R=void 0){return R!=null&&f(R,"options"),(R==null?void 0:R.signal)!=null&&o(R.signal,"options.signal"),he=G(he),(async function*(){var E;if(R!=null&&(E=R.signal)!==null&&E!==void 0&&E.aborted)throw new s;for await(let fe of this){var z;if(R!=null&&(z=R.signal)!==null&&z!==void 0&&z.aborted)throw new s;he--<=0&&(yield fe)}}).call(this)}function ve(he,R=void 0){return R!=null&&f(R,"options"),(R==null?void 0:R.signal)!=null&&o(R.signal,"options.signal"),he=G(he),(async function*(){var E;if(R!=null&&(E=R.signal)!==null&&E!==void 0&&E.aborted)throw new s;for await(let fe of this){var z;if(R!=null&&(z=R.signal)!==null&&z!==void 0&&z.aborted)throw new s;if(he-- >0)yield fe;else return}}).call(this)}i.exports.streamReturningOperators={asIndexedPairs:q,drop:de,filter:H,flatMap:w,map:S,take:ve,compose:ne},i.exports.promiseReturningOperators={every:Y,forEach:se,reduce:oe,toArray:we,some:te,find:me}}),fs=Ae((e,i)=>{ae(),ue(),le();var{ArrayPrototypePop:t,Promise:a}=qe(),{isIterable:u,isNodeStream:n,isWebStream:r}=yt(),{pipelineImpl:s}=mi(),{finished:o}=Ot();ds();function l(...f){return new a((p,g)=>{let m,A,b=f[f.length-1];if(b&&typeof b=="object"&&!n(b)&&!u(b)&&!r(b)){let C=t(f);m=C.signal,A=C.end}s(f,(C,U)=>{C?g(C):p(U)},{signal:m,end:A})})}i.exports={finished:o,pipeline:l}}),ds=Ae((e,i)=>{ae(),ue(),le();var{Buffer:t}=(Ze(),Ue(Je)),{ObjectDefineProperty:a,ObjectKeys:u,ReflectApply:n}=qe(),{promisify:{custom:r}}=bt(),{streamReturningOperators:s,promiseReturningOperators:o}=yu(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=rt(),f=hs(),{pipeline:p}=mi(),{destroyer:g}=Xt(),m=Ot(),A=fs(),b=yt(),C=i.exports=si().Stream;C.isDisturbed=b.isDisturbed,C.isErrored=b.isErrored,C.isReadable=b.isReadable,C.Readable=Cr();for(let I of u(s)){let v=function(...F){if(new.target)throw l();return C.Readable.from(n(L,this,F))},L=s[I];a(v,"name",{__proto__:null,value:L.name}),a(v,"length",{__proto__:null,value:L.length}),a(C.Readable.prototype,I,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}for(let I of u(o)){let v=function(...F){if(new.target)throw l();return n(L,this,F)},L=o[I];a(v,"name",{__proto__:null,value:L.name}),a(v,"length",{__proto__:null,value:L.length}),a(C.Readable.prototype,I,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}C.Writable=ls(),C.Duplex=_t(),C.Transform=us(),C.PassThrough=cs(),C.pipeline=p;var{addAbortSignal:U}=wr();C.addAbortSignal=U,C.finished=m,C.destroy=g,C.compose=f,a(C,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return A}}),a(p,r,{__proto__:null,enumerable:!0,get(){return A.pipeline}}),a(m,r,{__proto__:null,enumerable:!0,get(){return A.finished}}),C.Stream=C,C._isUint8Array=function(I){return I instanceof Uint8Array},C._uint8ArrayToBuffer=function(I){return t.from(I.buffer,I.byteOffset,I.byteLength)}}),Qt=Ae((e,i)=>{ae(),ue(),le();var t=ds(),a=fs(),u=t.Readable.destroy;i.exports=t.Readable,i.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,i.exports._isUint8Array=t._isUint8Array,i.exports.isDisturbed=t.isDisturbed,i.exports.isErrored=t.isErrored,i.exports.isReadable=t.isReadable,i.exports.Readable=t.Readable,i.exports.Writable=t.Writable,i.exports.Duplex=t.Duplex,i.exports.Transform=t.Transform,i.exports.PassThrough=t.PassThrough,i.exports.addAbortSignal=t.addAbortSignal,i.exports.finished=t.finished,i.exports.destroy=t.destroy,i.exports.destroy=u,i.exports.pipeline=t.pipeline,i.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return a}}),i.exports.Stream=t.Stream,i.exports.default=i.exports}),wu=Ae((e,i)=>{ae(),ue(),le(),typeof Object.create=="function"?i.exports=function(t,a){a&&(t.super_=a,t.prototype=Object.create(a.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:i.exports=function(t,a){if(a){t.super_=a;var u=function(){};u.prototype=a.prototype,t.prototype=new u,t.prototype.constructor=t}}}),vu=Ae((e,i)=>{ae(),ue(),le();var{Buffer:t}=(Ze(),Ue(Je)),a=Symbol.for("BufferList");function u(n){if(!(this instanceof u))return new u(n);u._init.call(this,n)}u._init=function(n){Object.defineProperty(this,a,{value:!0}),this._bufs=[],this.length=0,n&&this.append(n)},u.prototype._new=function(n){return new u(n)},u.prototype._offset=function(n){if(n===0)return[0,0];let r=0;for(let s=0;s<this._bufs.length;s++){let o=r+this._bufs[s].length;if(n<o||s===this._bufs.length-1)return[s,n-r];r=o}},u.prototype._reverseOffset=function(n){let r=n[0],s=n[1];for(let o=0;o<r;o++)s+=this._bufs[o].length;return s},u.prototype.get=function(n){if(n>this.length||n<0)return;let r=this._offset(n);return this._bufs[r[0]][r[1]]},u.prototype.slice=function(n,r){return typeof n=="number"&&n<0&&(n+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,n,r)},u.prototype.copy=function(n,r,s,o){if((typeof s!="number"||s<0)&&(s=0),(typeof o!="number"||o>this.length)&&(o=this.length),s>=this.length||o<=0)return n||t.alloc(0);let l=!!n,f=this._offset(s),p=o-s,g=p,m=l&&r||0,A=f[1];if(s===0&&o===this.length){if(!l)return this._bufs.length===1?this._bufs[0]:t.concat(this._bufs,this.length);for(let b=0;b<this._bufs.length;b++)this._bufs[b].copy(n,m),m+=this._bufs[b].length;return n}if(g<=this._bufs[f[0]].length-A)return l?this._bufs[f[0]].copy(n,r,A,A+g):this._bufs[f[0]].slice(A,A+g);l||(n=t.allocUnsafe(p));for(let b=f[0];b<this._bufs.length;b++){let C=this._bufs[b].length-A;if(g>C)this._bufs[b].copy(n,m,A),m+=C;else{this._bufs[b].copy(n,m,A,A+g),m+=C;break}g-=C,A&&(A=0)}return n.length>m?n.slice(0,m):n},u.prototype.shallowSlice=function(n,r){if(n=n||0,r=typeof r!="number"?this.length:r,n<0&&(n+=this.length),r<0&&(r+=this.length),n===r)return this._new();let s=this._offset(n),o=this._offset(r),l=this._bufs.slice(s[0],o[0]+1);return o[1]===0?l.pop():l[l.length-1]=l[l.length-1].slice(0,o[1]),s[1]!==0&&(l[0]=l[0].slice(s[1])),this._new(l)},u.prototype.toString=function(n,r,s){return this.slice(r,s).toString(n)},u.prototype.consume=function(n){if(n=Math.trunc(n),Number.isNaN(n)||n<=0)return this;for(;this._bufs.length;)if(n>=this._bufs[0].length)n-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(n),this.length-=n;break}return this},u.prototype.duplicate=function(){let n=this._new();for(let r=0;r<this._bufs.length;r++)n.append(this._bufs[r]);return n},u.prototype.append=function(n){if(n==null)return this;if(n.buffer)this._appendBuffer(t.from(n.buffer,n.byteOffset,n.byteLength));else if(Array.isArray(n))for(let r=0;r<n.length;r++)this.append(n[r]);else if(this._isBufferList(n))for(let r=0;r<n._bufs.length;r++)this.append(n._bufs[r]);else typeof n=="number"&&(n=n.toString()),this._appendBuffer(t.from(n));return this},u.prototype._appendBuffer=function(n){this._bufs.push(n),this.length+=n.length},u.prototype.indexOf=function(n,r,s){if(s===void 0&&typeof r=="string"&&(s=r,r=void 0),typeof n=="function"||Array.isArray(n))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof n=="number"?n=t.from([n]):typeof n=="string"?n=t.from(n,s):this._isBufferList(n)?n=n.slice():Array.isArray(n.buffer)?n=t.from(n.buffer,n.byteOffset,n.byteLength):t.isBuffer(n)||(n=t.from(n)),r=Number(r||0),isNaN(r)&&(r=0),r<0&&(r=this.length+r),r<0&&(r=0),n.length===0)return r>this.length?this.length:r;let o=this._offset(r),l=o[0],f=o[1];for(;l<this._bufs.length;l++){let p=this._bufs[l];for(;f<p.length;)if(p.length-f>=n.length){let g=p.indexOf(n,f);if(g!==-1)return this._reverseOffset([l,g]);f=p.length-n.length+1}else{let g=this._reverseOffset([l,f]);if(this._match(g,n))return g;f++}f=0}return-1},u.prototype._match=function(n,r){if(this.length-n<r.length)return!1;for(let s=0;s<r.length;s++)if(this.get(n+s)!==r[s])return!1;return!0},function(){let n={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 r in n)(function(s){n[s]===null?u.prototype[s]=function(o,l){return this.slice(o,o+l)[s](0,l)}:u.prototype[s]=function(o=0){return this.slice(o,o+n[s])[s](0)}})(r)}(),u.prototype._isBufferList=function(n){return n instanceof u||u.isBufferList(n)},u.isBufferList=function(n){return n!=null&&n[a]},i.exports=u}),_u=Ae((e,i)=>{ae(),ue(),le();var t=Qt().Duplex,a=wu(),u=vu();function n(r){if(!(this instanceof n))return new n(r);if(typeof r=="function"){this._callback=r;let s=(function(o){this._callback&&(this._callback(o),this._callback=null)}).bind(this);this.on("pipe",function(o){o.on("error",s)}),this.on("unpipe",function(o){o.removeListener("error",s)}),r=null}u._init.call(this,r),t.call(this)}a(n,t),Object.assign(n.prototype,u.prototype),n.prototype._new=function(r){return new n(r)},n.prototype._write=function(r,s,o){this._appendBuffer(r),typeof o=="function"&&o()},n.prototype._read=function(r){if(!this.length)return this.push(null);r=Math.min(r,this.length),this.push(this.slice(0,r)),this.consume(r)},n.prototype.end=function(r){t.prototype.end.call(this,r),this._callback&&(this._callback(null,this.slice()),this._callback=null)},n.prototype._destroy=function(r,s){this._bufs.length=0,this.length=0,s(r)},n.prototype._isBufferList=function(r){return r instanceof n||r instanceof u||n.isBufferList(r)},n.isBufferList=u.isBufferList,i.exports=n,i.exports.BufferListStream=n,i.exports.BufferList=u}),Eu=Ae((e,i)=>{ae(),ue(),le();var t=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}};i.exports=t}),ps=Ae((e,i)=>{ae(),ue(),le();var t=i.exports,{Buffer:a}=(Ze(),Ue(Je));t.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"},t.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},t.requiredHeaderFlagsErrors={};for(let n in t.requiredHeaderFlags){let r=t.requiredHeaderFlags[n];t.requiredHeaderFlagsErrors[n]="Invalid header flag bits, must be 0x"+r.toString(16)+" for "+t.types[n]+" packet"}t.codes={};for(let n in t.types){let r=t.types[n];t.codes[r]=n}t.CMD_SHIFT=4,t.CMD_MASK=240,t.DUP_MASK=8,t.QOS_MASK=3,t.QOS_SHIFT=1,t.RETAIN_MASK=1,t.VARBYTEINT_MASK=127,t.VARBYTEINT_FIN_MASK=128,t.VARBYTEINT_MAX=268435455,t.SESSIONPRESENT_MASK=1,t.SESSIONPRESENT_HEADER=a.from([t.SESSIONPRESENT_MASK]),t.CONNACK_HEADER=a.from([t.codes.connack<<t.CMD_SHIFT]),t.USERNAME_MASK=128,t.PASSWORD_MASK=64,t.WILL_RETAIN_MASK=32,t.WILL_QOS_MASK=24,t.WILL_QOS_SHIFT=3,t.WILL_FLAG_MASK=4,t.CLEAN_SESSION_MASK=2,t.CONNECT_HEADER=a.from([t.codes.connect<<t.CMD_SHIFT]),t.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},t.propertiesCodes={};for(let n in t.properties){let r=t.properties[n];t.propertiesCodes[r]=n}t.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 u(n){return[0,1,2].map(r=>[0,1].map(s=>[0,1].map(o=>{let l=a.alloc(1);return l.writeUInt8(t.codes[n]<<t.CMD_SHIFT|(s?t.DUP_MASK:0)|r<<t.QOS_SHIFT|o,0,!0),l})))}t.PUBLISH_HEADER=u("publish"),t.SUBSCRIBE_HEADER=u("subscribe"),t.SUBSCRIBE_OPTIONS_QOS_MASK=3,t.SUBSCRIBE_OPTIONS_NL_MASK=1,t.SUBSCRIBE_OPTIONS_NL_SHIFT=2,t.SUBSCRIBE_OPTIONS_RAP_MASK=1,t.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,t.SUBSCRIBE_OPTIONS_RH_MASK=3,t.SUBSCRIBE_OPTIONS_RH_SHIFT=4,t.SUBSCRIBE_OPTIONS_RH=[0,16,32],t.SUBSCRIBE_OPTIONS_NL=4,t.SUBSCRIBE_OPTIONS_RAP=8,t.SUBSCRIBE_OPTIONS_QOS=[0,1,2],t.UNSUBSCRIBE_HEADER=u("unsubscribe"),t.ACKS={unsuback:u("unsuback"),puback:u("puback"),pubcomp:u("pubcomp"),pubrel:u("pubrel"),pubrec:u("pubrec")},t.SUBACK_HEADER=a.from([t.codes.suback<<t.CMD_SHIFT]),t.VERSION3=a.from([3]),t.VERSION4=a.from([4]),t.VERSION5=a.from([5]),t.VERSION131=a.from([131]),t.VERSION132=a.from([132]),t.QOS=[0,1,2].map(n=>a.from([n])),t.EMPTY={pingreq:a.from([t.codes.pingreq<<4,0]),pingresp:a.from([t.codes.pingresp<<4,0]),disconnect:a.from([t.codes.disconnect<<4,0])},t.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"},t.MQTT5_PUBREL_PUBCOMP_CODES={0:"Success",146:"Packet Identifier not found"},t.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"},t.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"},t.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"},t.MQTT5_AUTH_CODES={0:"Success",24:"Continue authentication",25:"Re-authenticate"}}),Su=Ae((e,i)=>{ae(),ue(),le();var t=1e3,a=t*60,u=a*60,n=u*24,r=n*7,s=n*365.25;i.exports=function(g,m){m=m||{};var A=typeof g;if(A==="string"&&g.length>0)return o(g);if(A==="number"&&isFinite(g))return m.long?f(g):l(g);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(g))};function o(g){if(g=String(g),!(g.length>100)){var m=/^(-?(?:\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(m){var A=parseFloat(m[1]),b=(m[2]||"ms").toLowerCase();switch(b){case"years":case"year":case"yrs":case"yr":case"y":return A*s;case"weeks":case"week":case"w":return A*r;case"days":case"day":case"d":return A*n;case"hours":case"hour":case"hrs":case"hr":case"h":return A*u;case"minutes":case"minute":case"mins":case"min":case"m":return A*a;case"seconds":case"second":case"secs":case"sec":case"s":return A*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return A;default:return}}}}function l(g){var m=Math.abs(g);return m>=n?Math.round(g/n)+"d":m>=u?Math.round(g/u)+"h":m>=a?Math.round(g/a)+"m":m>=t?Math.round(g/t)+"s":g+"ms"}function f(g){var m=Math.abs(g);return m>=n?p(g,m,n,"day"):m>=u?p(g,m,u,"hour"):m>=a?p(g,m,a,"minute"):m>=t?p(g,m,t,"second"):g+" ms"}function p(g,m,A,b){var C=m>=A*1.5;return Math.round(g/A)+" "+b+(C?"s":"")}}),Cu=Ae((e,i)=>{ae(),ue(),le();function t(a){n.debug=n,n.default=n,n.coerce=p,n.disable=o,n.enable=s,n.enabled=l,n.humanize=Su(),n.destroy=g,Object.keys(a).forEach(m=>{n[m]=a[m]}),n.names=[],n.skips=[],n.formatters={};function u(m){let A=0;for(let b=0;b<m.length;b++)A=(A<<5)-A+m.charCodeAt(b),A|=0;return n.colors[Math.abs(A)%n.colors.length]}n.selectColor=u;function n(m){let A,b=null,C,U;function I(...v){if(!I.enabled)return;let L=I,F=Number(new Date),B=F-(A||F);L.diff=B,L.prev=A,L.curr=F,A=F,v[0]=n.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let k=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(M,W)=>{if(M==="%%")return"%";k++;let J=n.formatters[W];if(typeof J=="function"){let ne=v[k];M=J.call(L,ne),v.splice(k,1),k--}return M}),n.formatArgs.call(L,v),(L.log||n.log).apply(L,v)}return I.namespace=m,I.useColors=n.useColors(),I.color=n.selectColor(m),I.extend=r,I.destroy=n.destroy,Object.defineProperty(I,"enabled",{enumerable:!0,configurable:!1,get:()=>b!==null?b:(C!==n.namespaces&&(C=n.namespaces,U=n.enabled(m)),U),set:v=>{b=v}}),typeof n.init=="function"&&n.init(I),I}function r(m,A){let b=n(this.namespace+(typeof A>"u"?":":A)+m);return b.log=this.log,b}function s(m){n.save(m),n.namespaces=m,n.names=[],n.skips=[];let A,b=(typeof m=="string"?m:"").split(/[\s,]+/),C=b.length;for(A=0;A<C;A++)b[A]&&(m=b[A].replace(/\*/g,".*?"),m[0]==="-"?n.skips.push(new RegExp("^"+m.slice(1)+"$")):n.names.push(new RegExp("^"+m+"$")))}function o(){let m=[...n.names.map(f),...n.skips.map(f).map(A=>"-"+A)].join(",");return n.enable(""),m}function l(m){if(m[m.length-1]==="*")return!0;let A,b;for(A=0,b=n.skips.length;A<b;A++)if(n.skips[A].test(m))return!1;for(A=0,b=n.names.length;A<b;A++)if(n.names[A].test(m))return!0;return!1}function f(m){return m.toString().substring(2,m.toString().length-2).replace(/\.\*\?$/,"*")}function p(m){return m instanceof Error?m.stack||m.message:m}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 n.enable(n.load()),n}i.exports=t}),Et=Ae((e,i)=>{ae(),ue(),le(),e.formatArgs=a,e.save=u,e.load=n,e.useColors=t,e.storage=r(),e.destroy=(()=>{let o=!1;return()=>{o||(o=!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`."))}})(),e.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 t(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1: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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+i.exports.humanize(this.diff),!this.useColors)return;let l="color: "+this.color;o.splice(1,0,l,"color: inherit");let f=0,p=0;o[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(f++,g==="%c"&&(p=f))}),o.splice(p,0,l)}e.log=console.debug||console.log||(()=>{});function u(o){try{o?e.storage.setItem("debug",o):e.storage.removeItem("debug")}catch{}}function n(){let o;try{o=e.storage.getItem("debug")}catch{}return!o&&typeof xe<"u"&&"env"in xe&&(o=xe.env.DEBUG),o}function r(){try{return localStorage}catch{}}i.exports=Cu()(e);var{formatters:s}=i.exports;s.j=function(o){try{return JSON.stringify(o)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}}),Iu=Ae((e,i)=>{ae(),ue(),le();var t=_u(),{EventEmitter:a}=(er(),Ue(Ft)),u=Eu(),n=ps(),r=Et()("mqtt-packet:parser"),s=class Di extends a{constructor(){super(),this.parser=this.constructor.parser}static parser(l){return this instanceof Di?(this.settings=l||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new Di().parser(l)}_resetState(){r("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new u,this.error=null,this._list=t(),this._stateCounter=0}parse(l){for(this.error&&this._resetState(),this._list.append(l),r("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++,r("parse: state complete. _stateCounter is now: %d",this._stateCounter),r("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return r("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){let l=this._list.readUInt8(0),f=l>>n.CMD_SHIFT;this.packet.cmd=n.types[f];let p=l&15,g=n.requiredHeaderFlags[f];return g!=null&&p!==g?this._emitError(new Error(n.requiredHeaderFlagsErrors[f])):(this.packet.retain=(l&n.RETAIN_MASK)!==0,this.packet.qos=l>>n.QOS_SHIFT&n.QOS_MASK,this.packet.qos>2?this._emitError(new Error("Packet must not have both QoS bits set to 1")):(this.packet.dup=(l&n.DUP_MASK)!==0,r("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0))}_parseLength(){let l=this._parseVarByteNum(!0);return l&&(this.packet.length=l.value,this._list.consume(l.bytes)),r("_parseLength %d",l.value),!!l}_parsePayload(){r("_parsePayload: payload %O",this._list);let l=!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"))}l=!0}return r("_parsePayload complete result: %s",l),l}_parseConnect(){r("_parseConnect");let l,f,p,g,m={},A=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(A.protocolId=b,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(A.protocolVersion=this._list.readUInt8(this._pos),A.protocolVersion>=128&&(A.bridgeMode=!0,A.protocolVersion=A.protocolVersion-128),A.protocolVersion!==3&&A.protocolVersion!==4&&A.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"));m.username=this._list.readUInt8(this._pos)&n.USERNAME_MASK,m.password=this._list.readUInt8(this._pos)&n.PASSWORD_MASK,m.will=this._list.readUInt8(this._pos)&n.WILL_FLAG_MASK;let C=!!(this._list.readUInt8(this._pos)&n.WILL_RETAIN_MASK),U=(this._list.readUInt8(this._pos)&n.WILL_QOS_MASK)>>n.WILL_QOS_SHIFT;if(m.will)A.will={},A.will.retain=C,A.will.qos=U;else{if(C)return this._emitError(new Error("Will Retain Flag must be set to zero when Will Flag is set to 0"));if(U)return this._emitError(new Error("Will QoS must be set to zero when Will Flag is set to 0"))}if(A.clean=(this._list.readUInt8(this._pos)&n.CLEAN_SESSION_MASK)!==0,this._pos++,A.keepalive=this._parseNum(),A.keepalive===-1)return this._emitError(new Error("Packet too short"));if(A.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(A.properties=v)}let I=this._parseString();if(I===null)return this._emitError(new Error("Packet too short"));if(A.clientId=I,r("_parseConnect: packet.clientId: %s",A.clientId),m.will){if(A.protocolVersion===5){let v=this._parseProperties();Object.getOwnPropertyNames(v).length&&(A.will.properties=v)}if(l=this._parseString(),l===null)return this._emitError(new Error("Cannot parse will topic"));if(A.will.topic=l,r("_parseConnect: packet.will.topic: %s",A.will.topic),f=this._parseBuffer(),f===null)return this._emitError(new Error("Cannot parse will payload"));A.will.payload=f,r("_parseConnect: packet.will.paylaod: %s",A.will.payload)}if(m.username){if(g=this._parseString(),g===null)return this._emitError(new Error("Cannot parse username"));A.username=g,r("_parseConnect: packet.username: %s",A.username)}if(m.password){if(p=this._parseBuffer(),p===null)return this._emitError(new Error("Cannot parse password"));A.password=p}return this.settings=A,r("_parseConnect: complete"),A}_parseConnack(){r("_parseConnack");let l=this.packet;if(this._list.length<1)return null;let f=this._list.readUInt8(this._pos++);if(f>1)return this._emitError(new Error("Invalid connack flags, bits 7-1 must be set to 0"));if(l.sessionPresent=!!(f&n.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?l.reasonCode=this._list.readUInt8(this._pos++):l.reasonCode=0;else{if(this._list.length<2)return null;l.returnCode=this._list.readUInt8(this._pos++)}if(l.returnCode===-1||l.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){let p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(l.properties=p)}r("_parseConnack: complete")}_parsePublish(){r("_parsePublish");let l=this.packet;if(l.topic=this._parseString(),l.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(l.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(l.properties=f)}l.payload=this._list.slice(this._pos,l.length),r("_parsePublish: payload from buffer list: %o",l.payload)}}_parseSubscribe(){r("_parseSubscribe");let l=this.packet,f,p,g,m,A,b,C;if(l.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let U=this._parseProperties();Object.getOwnPropertyNames(U).length&&(l.properties=U)}if(l.length<=0)return this._emitError(new Error("Malformed subscribe, no payload specified"));for(;this._pos<l.length;){if(f=this._parseString(),f===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=l.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&n.SUBSCRIBE_OPTIONS_QOS_MASK,g>2)return this._emitError(new Error("Invalid subscribe QoS, must be <= 2"));if(b=(p>>n.SUBSCRIBE_OPTIONS_NL_SHIFT&n.SUBSCRIBE_OPTIONS_NL_MASK)!==0,A=(p>>n.SUBSCRIBE_OPTIONS_RAP_SHIFT&n.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,m=p>>n.SUBSCRIBE_OPTIONS_RH_SHIFT&n.SUBSCRIBE_OPTIONS_RH_MASK,m>2)return this._emitError(new Error("Invalid retain handling, must be <= 2"));C={topic:f,qos:g},this.settings.protocolVersion===5?(C.nl=b,C.rap=A,C.rh=m):this.settings.bridgeMode&&(C.rh=0,C.rap=!0,C.nl=!0),r("_parseSubscribe: push subscription `%s` to subscription",C),l.subscriptions.push(C)}}}_parseSuback(){r("_parseSuback");let l=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(l.properties=f)}if(l.length<=0)return this._emitError(new Error("Malformed suback, no payload specified"));for(;this._pos<this.packet.length;){let f=this._list.readUInt8(this._pos++);if(this.settings.protocolVersion===5){if(!n.MQTT5_SUBACK_CODES[f])return this._emitError(new Error("Invalid suback code"))}else if(f>2&&f!==128)return this._emitError(new Error("Invalid suback QoS, must be 0, 1, 2 or 128"));this.packet.granted.push(f)}}}_parseUnsubscribe(){r("_parseUnsubscribe");let l=this.packet;if(l.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(l.properties=f)}if(l.length<=0)return this._emitError(new Error("Malformed unsubscribe, no payload specified"));for(;this._pos<l.length;){let f=this._parseString();if(f===null)return this._emitError(new Error("Cannot parse topic"));r("_parseUnsubscribe: push topic `%s` to unsubscriptions",f),l.unsubscriptions.push(f)}}}_parseUnsuback(){r("_parseUnsuback");let l=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if((this.settings.protocolVersion===3||this.settings.protocolVersion===4)&&l.length!==2)return this._emitError(new Error("Malformed unsuback, payload length must be 2"));if(l.length<=0)return this._emitError(new Error("Malformed unsuback, no payload specified"));if(this.settings.protocolVersion===5){let f=this._parseProperties();for(Object.getOwnPropertyNames(f).length&&(l.properties=f),l.granted=[];this._pos<this.packet.length;){let p=this._list.readUInt8(this._pos++);if(!n.MQTT5_UNSUBACK_CODES[p])return this._emitError(new Error("Invalid unsuback code"));this.packet.granted.push(p)}}}_parseConfirmation(){r("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);let l=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5){if(l.length>2){switch(l.reasonCode=this._parseByte(),this.packet.cmd){case"puback":case"pubrec":if(!n.MQTT5_PUBACK_PUBREC_CODES[l.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break;case"pubrel":case"pubcomp":if(!n.MQTT5_PUBREL_PUBCOMP_CODES[l.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break}r("_parseConfirmation: packet.reasonCode `%d`",l.reasonCode)}else l.reasonCode=0;if(l.length>3){let f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(l.properties=f)}}return!0}_parseDisconnect(){let l=this.packet;if(r("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?(l.reasonCode=this._parseByte(),n.MQTT5_DISCONNECT_CODES[l.reasonCode]||this._emitError(new Error("Invalid disconnect reason code"))):l.reasonCode=0;let f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(l.properties=f)}return r("_parseDisconnect result: true"),!0}_parseAuth(){r("_parseAuth");let l=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));if(l.reasonCode=this._parseByte(),!n.MQTT5_AUTH_CODES[l.reasonCode])return this._emitError(new Error("Invalid auth reason code"));let f=this._parseProperties();return Object.getOwnPropertyNames(f).length&&(l.properties=f),r("_parseAuth: result: true"),!0}_parseMessageId(){let l=this.packet;return l.messageId=this._parseNum(),l.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(r("_parseMessageId: packet.messageId %d",l.messageId),!0)}_parseString(l){let f=this._parseNum(),p=f+this._pos;if(f===-1||p>this._list.length||p>this.packet.length)return null;let g=this._list.toString("utf8",this._pos,p);return this._pos+=f,r("_parseString: result: %s",g),g}_parseStringPair(){return r("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let l=this._parseNum(),f=l+this._pos;if(l===-1||f>this._list.length||f>this.packet.length)return null;let p=this._list.slice(this._pos,f);return this._pos+=l,r("_parseBuffer: result: %o",p),p}_parseNum(){if(this._list.length-this._pos<2)return-1;let l=this._list.readUInt16BE(this._pos);return this._pos+=2,r("_parseNum: result: %s",l),l}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;let l=this._list.readUInt32BE(this._pos);return this._pos+=4,r("_parse4ByteNum: result: %s",l),l}_parseVarByteNum(l){r("_parseVarByteNum");let f=4,p=0,g=1,m=0,A=!1,b,C=this._pos?this._pos:0;for(;p<f&&C+p<this._list.length;){if(b=this._list.readUInt8(C+p++),m+=g*(b&n.VARBYTEINT_MASK),g*=128,!(b&n.VARBYTEINT_FIN_MASK)){A=!0;break}if(this._list.length<=p)break}return!A&&p===f&&this._list.length>=p&&this._emitError(new Error("Invalid variable byte integer")),C&&(this._pos+=p),A?l?A={bytes:p,value:m}:A=m:A=!1,r("_parseVarByteNum: result: %o",A),A}_parseByte(){let l;return this._pos<this._list.length&&(l=this._list.readUInt8(this._pos),this._pos++),r("_parseByte: result: %o",l),l}_parseByType(l){switch(r("_parseByType: type: %s",l),l){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(){r("_parseProperties");let l=this._parseVarByteNum(),f=this._pos+l,p={};for(;this._pos<f;){let g=this._parseByte();if(!g)return this._emitError(new Error("Cannot parse property code type")),!1;let m=n.propertiesCodes[g];if(!m)return this._emitError(new Error("Unknown property")),!1;if(m==="userProperties"){p[m]||(p[m]=Object.create(null));let A=this._parseByType(n.propertiesTypes[m]);if(p[m][A.name])if(Array.isArray(p[m][A.name]))p[m][A.name].push(A.value);else{let b=p[m][A.name];p[m][A.name]=[b],p[m][A.name].push(A.value)}else p[m][A.name]=A.value;continue}p[m]?Array.isArray(p[m])?p[m].push(this._parseByType(n.propertiesTypes[m])):(p[m]=[p[m]],p[m].push(this._parseByType(n.propertiesTypes[m]))):p[m]=this._parseByType(n.propertiesTypes[m])}return p}_newPacket(){return r("_newPacket"),this.packet&&(this._list.consume(this.packet.length),r("_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)),r("_newPacket: new packet"),this.packet=new u,this._pos=0,!0}_emitError(l){r("_emitError",l),this.error=l,this.emit("error",l)}};i.exports=s}),Tu=Ae((e,i)=>{ae(),ue(),le();var{Buffer:t}=(Ze(),Ue(Je)),a=65536,u={},n=t.isBuffer(t.from([1,2]).subarray(0,1));function r(f){let p=t.allocUnsafe(2);return p.writeUInt8(f>>8,0),p.writeUInt8(f&255,1),p}function s(){for(let f=0;f<a;f++)u[f]=r(f)}function o(f){let p=0,g=0,m=t.allocUnsafe(4);do p=f%128|0,f=f/128|0,f>0&&(p=p|128),m.writeUInt8(p,g++);while(f>0&&g<4);return f>0&&(g=0),n?m.subarray(0,g):m.slice(0,g)}function l(f){let p=t.allocUnsafe(4);return p.writeUInt32BE(f,0),p}i.exports={cache:u,generateCache:s,generateNumber:r,genBufVariableByteInt:o,generate4ByteBuffer:l}}),ku=Ae((e,i)=>{ae(),ue(),le(),typeof xe>"u"||!xe.version||xe.version.indexOf("v0.")===0||xe.version.indexOf("v1.")===0&&xe.version.indexOf("v1.8.")!==0?i.exports={nextTick:t}:i.exports=xe;function t(a,u,n,r){if(typeof a!="function")throw new TypeError('"callback" argument must be a function');var s=arguments.length,o,l;switch(s){case 0:case 1:return xe.nextTick(a);case 2:return xe.nextTick(function(){a.call(null,u)});case 3:return xe.nextTick(function(){a.call(null,u,n)});case 4:return xe.nextTick(function(){a.call(null,u,n,r)});default:for(o=new Array(s-1),l=0;l<o.length;)o[l++]=arguments[l];return xe.nextTick(function(){a.apply(null,o)})}}}),gs=Ae((e,i)=>{ae(),ue(),le();var t=ps(),{Buffer:a}=(Ze(),Ue(Je)),u=a.allocUnsafe(0),n=a.from([0]),r=Tu(),s=ku().nextTick,o=Et()("mqtt-packet:writeToStream"),l=r.cache,f=r.generateNumber,p=r.generateCache,g=r.genBufVariableByteInt,m=r.generate4ByteBuffer,A=se,b=!0;function C(R,E,z){switch(o("generate called"),E.cork&&(E.cork(),s(U,E)),b&&(b=!1,p()),o("generate: packet.cmd: %s",R.cmd),R.cmd){case"connect":return I(R,E);case"connack":return v(R,E,z);case"publish":return L(R,E,z);case"puback":case"pubrec":case"pubrel":case"pubcomp":return F(R,E,z);case"subscribe":return B(R,E,z);case"suback":return k(R,E,z);case"unsubscribe":return M(R,E,z);case"unsuback":return W(R,E,z);case"pingreq":case"pingresp":return J(R,E);case"disconnect":return ne(R,E,z);case"auth":return S(R,E,z);default:return E.destroy(new Error("Unknown command")),!1}}Object.defineProperty(C,"cacheNumbers",{get(){return A===se},set(R){R?((!l||Object.keys(l).length===0)&&(b=!0),A=se):(b=!1,A=H)}});function U(R){R.uncork()}function I(R,E,z){let fe=R||{},re=fe.protocolId||"MQTT",X=fe.protocolVersion||4,ye=fe.will,ge=fe.clean,P=fe.keepalive||0,j=fe.clientId||"",V=fe.username,ie=fe.password,Z=fe.properties;ge===void 0&&(ge=!0);let D=0;if(typeof re!="string"&&!a.isBuffer(re))return E.destroy(new Error("Invalid protocolId")),!1;if(D+=re.length+2,X!==3&&X!==4&&X!==5)return E.destroy(new Error("Invalid protocol version")),!1;if(D+=1,(typeof j=="string"||a.isBuffer(j))&&(j||X>=4)&&(j||ge))D+=a.byteLength(j)+2;else{if(X<4)return E.destroy(new Error("clientId must be supplied before 3.1.1")),!1;if(ge*1===0)return E.destroy(new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof P!="number"||P<0||P>65535||P%1!==0)return E.destroy(new Error("Invalid keepalive")),!1;D+=2,D+=1;let $,O;if(X===5){if($=we(E,Z),!$)return!1;D+=$.length}if(ye){if(typeof ye!="object")return E.destroy(new Error("Invalid will")),!1;if(!ye.topic||typeof ye.topic!="string")return E.destroy(new Error("Invalid will topic")),!1;if(D+=a.byteLength(ye.topic)+2,D+=2,ye.payload)if(ye.payload.length>=0)typeof ye.payload=="string"?D+=a.byteLength(ye.payload):D+=ye.payload.length;else return E.destroy(new Error("Invalid will payload")),!1;if(O={},X===5){if(O=we(E,ye.properties),!O)return!1;D+=O.length}}let N=!1;if(V!=null)if(he(V))N=!0,D+=a.byteLength(V)+2;else return E.destroy(new Error("Invalid username")),!1;if(ie!=null){if(!N)return E.destroy(new Error("Username is required to use password")),!1;if(he(ie))D+=ve(ie)+2;else return E.destroy(new Error("Invalid password")),!1}E.write(t.CONNECT_HEADER),te(E,D),oe(E,re),fe.bridgeMode&&(X+=128),E.write(X===131?t.VERSION131:X===132?t.VERSION132:X===4?t.VERSION4:X===5?t.VERSION5:t.VERSION3);let Q=0;return Q|=V!=null?t.USERNAME_MASK:0,Q|=ie!=null?t.PASSWORD_MASK:0,Q|=ye&&ye.retain?t.WILL_RETAIN_MASK:0,Q|=ye&&ye.qos?ye.qos<<t.WILL_QOS_SHIFT:0,Q|=ye?t.WILL_FLAG_MASK:0,Q|=ge?t.CLEAN_SESSION_MASK:0,E.write(a.from([Q])),A(E,P),X===5&&$.write(),oe(E,j),ye&&(X===5&&O.write(),Y(E,ye.topic),oe(E,ye.payload)),V!=null&&oe(E,V),ie!=null&&oe(E,ie),!0}function v(R,E,z){let fe=z?z.protocolVersion:4,re=R||{},X=fe===5?re.reasonCode:re.returnCode,ye=re.properties,ge=2;if(typeof X!="number")return E.destroy(new Error("Invalid return code")),!1;let P=null;if(fe===5){if(P=we(E,ye),!P)return!1;ge+=P.length}return E.write(t.CONNACK_HEADER),te(E,ge),E.write(re.sessionPresent?t.SESSIONPRESENT_HEADER:n),E.write(a.from([X])),P==null||P.write(),!0}function L(R,E,z){o("publish: packet: %o",R);let fe=z?z.protocolVersion:4,re=R||{},X=re.qos||0,ye=re.retain?t.RETAIN_MASK:0,ge=re.topic,P=re.payload||u,j=re.messageId,V=re.properties,ie=0;if(typeof ge=="string")ie+=a.byteLength(ge)+2;else if(a.isBuffer(ge))ie+=ge.length+2;else return E.destroy(new Error("Invalid topic")),!1;if(a.isBuffer(P)?ie+=P.length:ie+=a.byteLength(P),X&&typeof j!="number")return E.destroy(new Error("Invalid messageId")),!1;X&&(ie+=2);let Z=null;if(fe===5){if(Z=we(E,V),!Z)return!1;ie+=Z.length}return E.write(t.PUBLISH_HEADER[X][re.dup?1:0][ye?1:0]),te(E,ie),A(E,ve(ge)),E.write(ge),X>0&&A(E,j),Z==null||Z.write(),o("publish: payload: %o",P),E.write(P)}function F(R,E,z){let fe=z?z.protocolVersion:4,re=R||{},X=re.cmd||"puback",ye=re.messageId,ge=re.dup&&X==="pubrel"?t.DUP_MASK:0,P=0,j=re.reasonCode,V=re.properties,ie=fe===5?3:2;if(X==="pubrel"&&(P=1),typeof ye!="number")return E.destroy(new Error("Invalid messageId")),!1;let Z=null;if(fe===5&&typeof V=="object"){if(Z=w(E,V,z,ie),!Z)return!1;ie+=Z.length}return E.write(t.ACKS[X][P][ge][0]),ie===3&&(ie+=j!==0?1:-1),te(E,ie),A(E,ye),fe===5&&ie!==2&&E.write(a.from([j])),Z!==null?Z.write():ie===4&&E.write(a.from([0])),!0}function B(R,E,z){o("subscribe: packet: ");let fe=z?z.protocolVersion:4,re=R||{},X=re.dup?t.DUP_MASK:0,ye=re.messageId,ge=re.subscriptions,P=re.properties,j=0;if(typeof ye!="number")return E.destroy(new Error("Invalid messageId")),!1;j+=2;let V=null;if(fe===5){if(V=we(E,P),!V)return!1;j+=V.length}if(typeof ge=="object"&&ge.length)for(let Z=0;Z<ge.length;Z+=1){let D=ge[Z].topic,$=ge[Z].qos;if(typeof D!="string")return E.destroy(new Error("Invalid subscriptions - invalid topic")),!1;if(typeof $!="number")return E.destroy(new Error("Invalid subscriptions - invalid qos")),!1;if(fe===5){if(typeof(ge[Z].nl||!1)!="boolean")return E.destroy(new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(ge[Z].rap||!1)!="boolean")return E.destroy(new Error("Invalid subscriptions - invalid Retain as Published")),!1;let O=ge[Z].rh||0;if(typeof O!="number"||O>2)return E.destroy(new Error("Invalid subscriptions - invalid Retain Handling")),!1}j+=a.byteLength(D)+2+1}else return E.destroy(new Error("Invalid subscriptions")),!1;o("subscribe: writing to stream: %o",t.SUBSCRIBE_HEADER),E.write(t.SUBSCRIBE_HEADER[1][X?1:0][0]),te(E,j),A(E,ye),V!==null&&V.write();let ie=!0;for(let Z of ge){let D=Z.topic,$=Z.qos,O=+Z.nl,N=+Z.rap,Q=Z.rh,ce;Y(E,D),ce=t.SUBSCRIBE_OPTIONS_QOS[$],fe===5&&(ce|=O?t.SUBSCRIBE_OPTIONS_NL:0,ce|=N?t.SUBSCRIBE_OPTIONS_RAP:0,ce|=Q?t.SUBSCRIBE_OPTIONS_RH[Q]:0),ie=E.write(a.from([ce]))}return ie}function k(R,E,z){let fe=z?z.protocolVersion:4,re=R||{},X=re.messageId,ye=re.granted,ge=re.properties,P=0;if(typeof X!="number")return E.destroy(new Error("Invalid messageId")),!1;if(P+=2,typeof ye=="object"&&ye.length)for(let V=0;V<ye.length;V+=1){if(typeof ye[V]!="number")return E.destroy(new Error("Invalid qos vector")),!1;P+=1}else return E.destroy(new Error("Invalid qos vector")),!1;let j=null;if(fe===5){if(j=w(E,ge,z,P),!j)return!1;P+=j.length}return E.write(t.SUBACK_HEADER),te(E,P),A(E,X),j!==null&&j.write(),E.write(a.from(ye))}function M(R,E,z){let fe=z?z.protocolVersion:4,re=R||{},X=re.messageId,ye=re.dup?t.DUP_MASK:0,ge=re.unsubscriptions,P=re.properties,j=0;if(typeof X!="number")return E.destroy(new Error("Invalid messageId")),!1;if(j+=2,typeof ge=="object"&&ge.length)for(let Z=0;Z<ge.length;Z+=1){if(typeof ge[Z]!="string")return E.destroy(new Error("Invalid unsubscriptions")),!1;j+=a.byteLength(ge[Z])+2}else return E.destroy(new Error("Invalid unsubscriptions")),!1;let V=null;if(fe===5){if(V=we(E,P),!V)return!1;j+=V.length}E.write(t.UNSUBSCRIBE_HEADER[1][ye?1:0][0]),te(E,j),A(E,X),V!==null&&V.write();let ie=!0;for(let Z=0;Z<ge.length;Z++)ie=Y(E,ge[Z]);return ie}function W(R,E,z){let fe=z?z.protocolVersion:4,re=R||{},X=re.messageId,ye=re.dup?t.DUP_MASK:0,ge=re.granted,P=re.properties,j=re.cmd,V=0,ie=2;if(typeof X!="number")return E.destroy(new Error("Invalid messageId")),!1;if(fe===5)if(typeof ge=="object"&&ge.length)for(let D=0;D<ge.length;D+=1){if(typeof ge[D]!="number")return E.destroy(new Error("Invalid qos vector")),!1;ie+=1}else return E.destroy(new Error("Invalid qos vector")),!1;let Z=null;if(fe===5){if(Z=w(E,P,z,ie),!Z)return!1;ie+=Z.length}return E.write(t.ACKS[j][V][ye][0]),te(E,ie),A(E,X),Z!==null&&Z.write(),fe===5&&E.write(a.from(ge)),!0}function J(R,E,z){return E.write(t.EMPTY[R.cmd])}function ne(R,E,z){let fe=z?z.protocolVersion:4,re=R||{},X=re.reasonCode,ye=re.properties,ge=fe===5?1:0,P=null;if(fe===5){if(P=w(E,ye,z,ge),!P)return!1;ge+=P.length}return E.write(a.from([t.codes.disconnect<<4])),te(E,ge),fe===5&&E.write(a.from([X])),P!==null&&P.write(),!0}function S(R,E,z){let fe=z?z.protocolVersion:4,re=R||{},X=re.reasonCode,ye=re.properties,ge=fe===5?1:0;fe!==5&&E.destroy(new Error("Invalid mqtt version for auth packet"));let P=w(E,ye,z,ge);return P?(ge+=P.length,E.write(a.from([t.codes.auth<<4])),te(E,ge),E.write(a.from([X])),P!==null&&P.write(),!0):!1}var q={};function te(R,E){if(E>t.VARBYTEINT_MAX)return R.destroy(new Error(`Invalid variable byte integer: ${E}`)),!1;let z=q[E];return z||(z=g(E),E<16384&&(q[E]=z)),o("writeVarByteInt: writing to stream: %o",z),R.write(z)}function Y(R,E){let z=a.byteLength(E);return A(R,z),o("writeString: %s",E),R.write(E,"utf8")}function me(R,E,z){Y(R,E),Y(R,z)}function se(R,E){return o("writeNumberCached: number: %d",E),o("writeNumberCached: %o",l[E]),R.write(l[E])}function H(R,E){let z=f(E);return o("writeNumberGenerated: %o",z),R.write(z)}function be(R,E){let z=m(E);return o("write4ByteNumber: %o",z),R.write(z)}function oe(R,E){typeof E=="string"?Y(R,E):E?(A(R,E.length),R.write(E)):A(R,0)}function we(R,E){if(typeof E!="object"||E.length!=null)return{length:1,write(){de(R,{},0)}};let z=0;function fe(re,X){let ye=t.propertiesTypes[re],ge=0;switch(ye){case"byte":{if(typeof X!="boolean")return R.destroy(new Error(`Invalid ${re}: ${X}`)),!1;ge+=2;break}case"int8":{if(typeof X!="number"||X<0||X>255)return R.destroy(new Error(`Invalid ${re}: ${X}`)),!1;ge+=2;break}case"binary":{if(X&&X===null)return R.destroy(new Error(`Invalid ${re}: ${X}`)),!1;ge+=1+a.byteLength(X)+2;break}case"int16":{if(typeof X!="number"||X<0||X>65535)return R.destroy(new Error(`Invalid ${re}: ${X}`)),!1;ge+=3;break}case"int32":{if(typeof X!="number"||X<0||X>4294967295)return R.destroy(new Error(`Invalid ${re}: ${X}`)),!1;ge+=5;break}case"var":{if(typeof X!="number"||X<0||X>268435455)return R.destroy(new Error(`Invalid ${re}: ${X}`)),!1;ge+=1+a.byteLength(g(X));break}case"string":{if(typeof X!="string")return R.destroy(new Error(`Invalid ${re}: ${X}`)),!1;ge+=3+a.byteLength(X.toString());break}case"pair":{if(typeof X!="object")return R.destroy(new Error(`Invalid ${re}: ${X}`)),!1;ge+=Object.getOwnPropertyNames(X).reduce((P,j)=>{let V=X[j];return Array.isArray(V)?P+=V.reduce((ie,Z)=>(ie+=3+a.byteLength(j.toString())+2+a.byteLength(Z.toString()),ie),0):P+=3+a.byteLength(j.toString())+2+a.byteLength(X[j].toString()),P},0);break}default:return R.destroy(new Error(`Invalid property ${re}: ${X}`)),!1}return ge}if(E)for(let re in E){let X=0,ye=0,ge=E[re];if(Array.isArray(ge))for(let P=0;P<ge.length;P++){if(ye=fe(re,ge[P]),!ye)return!1;X+=ye}else{if(ye=fe(re,ge),!ye)return!1;X=ye}if(!X)return!1;z+=X}return{length:a.byteLength(g(z))+z,write(){de(R,E,z)}}}function w(R,E,z,fe){let re=["reasonString","userProperties"],X=z&&z.properties&&z.properties.maximumPacketSize?z.properties.maximumPacketSize:0,ye=we(R,E);if(X)for(;fe+ye.length>X;){let ge=re.shift();if(ge&&E[ge])delete E[ge],ye=we(R,E);else return!1}return ye}function G(R,E,z){switch(t.propertiesTypes[E]){case"byte":{R.write(a.from([t.properties[E]])),R.write(a.from([+z]));break}case"int8":{R.write(a.from([t.properties[E]])),R.write(a.from([z]));break}case"binary":{R.write(a.from([t.properties[E]])),oe(R,z);break}case"int16":{R.write(a.from([t.properties[E]])),A(R,z);break}case"int32":{R.write(a.from([t.properties[E]])),be(R,z);break}case"var":{R.write(a.from([t.properties[E]])),te(R,z);break}case"string":{R.write(a.from([t.properties[E]])),Y(R,z);break}case"pair":{Object.getOwnPropertyNames(z).forEach(fe=>{let re=z[fe];Array.isArray(re)?re.forEach(X=>{R.write(a.from([t.properties[E]])),me(R,fe.toString(),X.toString())}):(R.write(a.from([t.properties[E]])),me(R,fe.toString(),re.toString()))});break}default:return R.destroy(new Error(`Invalid property ${E} value: ${z}`)),!1}}function de(R,E,z){te(R,z);for(let fe in E)if(Object.prototype.hasOwnProperty.call(E,fe)&&E[fe]!==null){let re=E[fe];if(Array.isArray(re))for(let X=0;X<re.length;X++)G(R,fe,re[X]);else G(R,fe,re)}}function ve(R){return R?R instanceof a?R.length:a.byteLength(R):0}function he(R){return typeof R=="string"||R instanceof a}i.exports=C}),Bu=Ae((e,i)=>{ae(),ue(),le();var t=gs(),{EventEmitter:a}=(er(),Ue(Ft)),{Buffer:u}=(Ze(),Ue(Je));function n(s,o){let l=new r;return t(s,l,o),l.concat()}var r=class extends a{constructor(){super(),this._array=new Array(20),this._i=0}write(s){return this._array[this._i++]=s,!0}concat(){let s=0,o=new Array(this._array.length),l=this._array,f=0,p;for(p=0;p<l.length&&l[p]!==void 0;p++)typeof l[p]!="string"?o[p]=l[p].length:o[p]=u.byteLength(l[p]),s+=o[p];let g=u.allocUnsafe(s);for(p=0;p<l.length&&l[p]!==void 0;p++)typeof l[p]!="string"?(l[p].copy(g,f),f+=o[p]):(g.write(l[p],f),f+=o[p]);return g}destroy(s){s&&this.emit("error",s)}};i.exports=n}),Ou=Ae(e=>{ae(),ue(),le(),e.parser=Iu().parser,e.generate=Bu(),e.writeToStream=gs()}),ms=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=class{constructor(){this.nextId=Math.max(1,Math.floor(Math.random()*65535))}allocate(){let t=this.nextId++;return this.nextId===65536&&(this.nextId=1),t}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(t){return!0}deallocate(t){}clear(){}};e.default=i}),Pu=Ae((e,i)=>{ae(),ue(),le(),i.exports=a;function t(n){return n instanceof Ar?Ar.from(n):new n.constructor(n.buffer.slice(),n.byteOffset,n.length)}function a(n){if(n=n||{},n.circles)return u(n);return n.proto?o:s;function r(l,f){for(var p=Object.keys(l),g=new Array(p.length),m=0;m<p.length;m++){var A=p[m],b=l[A];typeof b!="object"||b===null?g[A]=b:b instanceof Date?g[A]=new Date(b):ArrayBuffer.isView(b)?g[A]=t(b):g[A]=f(b)}return g}function s(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return r(l,s);if(l instanceof Map)return new Map(r(Array.from(l),s));if(l instanceof Set)return new Set(r(Array.from(l),s));var f={};for(var p in l)if(Object.hasOwnProperty.call(l,p)!==!1){var g=l[p];typeof g!="object"||g===null?f[p]=g:g instanceof Date?f[p]=new Date(g):g instanceof Map?f[p]=new Map(r(Array.from(g),s)):g instanceof Set?f[p]=new Set(r(Array.from(g),s)):ArrayBuffer.isView(g)?f[p]=t(g):f[p]=s(g)}return f}function o(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return r(l,o);if(l instanceof Map)return new Map(r(Array.from(l),o));if(l instanceof Set)return new Set(r(Array.from(l),o));var f={};for(var p in l){var g=l[p];typeof g!="object"||g===null?f[p]=g:g instanceof Date?f[p]=new Date(g):g instanceof Map?f[p]=new Map(r(Array.from(g),o)):g instanceof Set?f[p]=new Set(r(Array.from(g),o)):ArrayBuffer.isView(g)?f[p]=t(g):f[p]=o(g)}return f}}function u(n){var r=[],s=[];return n.proto?f:l;function o(p,g){for(var m=Object.keys(p),A=new Array(m.length),b=0;b<m.length;b++){var C=m[b],U=p[C];if(typeof U!="object"||U===null)A[C]=U;else if(U instanceof Date)A[C]=new Date(U);else if(ArrayBuffer.isView(U))A[C]=t(U);else{var I=r.indexOf(U);I!==-1?A[C]=s[I]:A[C]=g(U)}}return A}function l(p){if(typeof p!="object"||p===null)return p;if(p instanceof Date)return new Date(p);if(Array.isArray(p))return o(p,l);if(p instanceof Map)return new Map(o(Array.from(p),l));if(p instanceof Set)return new Set(o(Array.from(p),l));var g={};r.push(p),s.push(g);for(var m in p)if(Object.hasOwnProperty.call(p,m)!==!1){var A=p[m];if(typeof A!="object"||A===null)g[m]=A;else if(A instanceof Date)g[m]=new Date(A);else if(A instanceof Map)g[m]=new Map(o(Array.from(A),l));else if(A instanceof Set)g[m]=new Set(o(Array.from(A),l));else if(ArrayBuffer.isView(A))g[m]=t(A);else{var b=r.indexOf(A);b!==-1?g[m]=s[b]:g[m]=l(A)}}return r.pop(),s.pop(),g}function f(p){if(typeof p!="object"||p===null)return p;if(p instanceof Date)return new Date(p);if(Array.isArray(p))return o(p,f);if(p instanceof Map)return new Map(o(Array.from(p),f));if(p instanceof Set)return new Set(o(Array.from(p),f));var g={};r.push(p),s.push(g);for(var m in p){var A=p[m];if(typeof A!="object"||A===null)g[m]=A;else if(A instanceof Date)g[m]=new Date(A);else if(A instanceof Map)g[m]=new Map(o(Array.from(A),f));else if(A instanceof Set)g[m]=new Set(o(Array.from(A),f));else if(ArrayBuffer.isView(A))g[m]=t(A);else{var b=r.indexOf(A);b!==-1?g[m]=s[b]:g[m]=f(A)}}return r.pop(),s.pop(),g}}}),xu=Ae((e,i)=>{ae(),ue(),le(),i.exports=Pu()()}),Ru=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0}),e.validateTopics=e.validateTopic=void 0;function i(a){let u=a.split("/");for(let n=0;n<u.length;n++)if(u[n]!=="+"){if(u[n]==="#")return n===u.length-1;if(u[n].indexOf("+")!==-1||u[n].indexOf("#")!==-1)return!1}return!0}e.validateTopic=i;function t(a){if(a.length===0)return"empty_topic_list";for(let u=0;u<a.length;u++)if(!i(a[u]))return a[u];return null}e.validateTopics=t}),As=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=Qt(),t={objectMode:!0},a={clean:!0},u=class{constructor(n){this.options=n||{},this.options=Object.assign(Object.assign({},a),n),this._inflights=new Map}put(n,r){return this._inflights.set(n.messageId,n),r&&r(),this}createStream(){let n=new i.Readable(t),r=[],s=!1,o=0;return this._inflights.forEach((l,f)=>{r.push(l)}),n._read=()=>{!s&&o<r.length?n.push(r[o++]):n.push(null)},n.destroy=l=>{if(!s)return s=!0,setTimeout(()=>{n.emit("close")},0),n},n}del(n,r){let s=this._inflights.get(n.messageId);return s?(this._inflights.delete(n.messageId),r(null,s)):r&&r(new Error("missing packet")),this}get(n,r){let s=this._inflights.get(n.messageId);return s?r(null,s):r&&r(new Error("missing packet")),this}close(n){this.options.clean&&(this._inflights=null),n&&n()}};e.default=u}),Mu=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=[0,16,128,131,135,144,145,151,153],t=(a,u,n)=>{a.log("handlePublish: packet %o",u),n=typeof n<"u"?n:a.noop;let r=u.topic.toString(),s=u.payload,{qos:o}=u,{messageId:l}=u,{options:f}=a;if(a.options.protocolVersion===5){let p;if(u.properties&&(p=u.properties.topicAlias),typeof p<"u")if(r.length===0)if(p>0&&p<=65535){let g=a.topicAliasRecv.getTopicByAlias(p);if(g)r=g,a.log("handlePublish :: topic complemented by alias. topic: %s - alias: %d",r,p);else{a.log("handlePublish :: unregistered topic alias. alias: %d",p),a.emit("error",new Error("Received unregistered Topic Alias"));return}}else{a.log("handlePublish :: topic alias out of range. alias: %d",p),a.emit("error",new Error("Received Topic Alias is out of range"));return}else if(a.topicAliasRecv.put(r,p))a.log("handlePublish :: registered topic: %s - alias: %d",r,p);else{a.log("handlePublish :: topic alias out of range. alias: %d",p),a.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(a.log("handlePublish: qos %d",o),o){case 2:{f.customHandleAcks(r,s,u,(p,g)=>{if(typeof p=="number"&&(g=p,p=null),p)return a.emit("error",p);if(i.indexOf(g)===-1)return a.emit("error",new Error("Wrong reason code for pubrec"));g?a._sendPacket({cmd:"pubrec",messageId:l,reasonCode:g},n):a.incomingStore.put(u,()=>{a._sendPacket({cmd:"pubrec",messageId:l},n)})});break}case 1:{f.customHandleAcks(r,s,u,(p,g)=>{if(typeof p=="number"&&(g=p,p=null),p)return a.emit("error",p);if(i.indexOf(g)===-1)return a.emit("error",new Error("Wrong reason code for puback"));g||a.emit("message",r,s,u),a.handleMessage(u,m=>{if(m)return n&&n(m);a._sendPacket({cmd:"puback",messageId:l,reasonCode:g},n)})});break}case 0:a.emit("message",r,s,u),a.handleMessage(u,n);break;default:a.log("handlePublish: unknown QoS. Doing nothing.");break}};e.default=t}),Uu=Ae((e,i)=>{i.exports={version:"5.10.3"}}),rr=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0}),e.MQTTJS_VERSION=e.nextTick=e.applyMixin=e.ErrorWithReasonCode=void 0;var i=class Ma extends Error{constructor(u,n){super(u),this.code=n,Object.setPrototypeOf(this,Ma.prototype),Object.getPrototypeOf(this).name="ErrorWithReasonCode"}};e.ErrorWithReasonCode=i;function t(a,u,n=!1){var r;let s=[u];for(;;){let o=s[0],l=Object.getPrototypeOf(o);if(l!=null&&l.prototype)s.unshift(l);else break}for(let o of s)for(let l of Object.getOwnPropertyNames(o.prototype))(n||l!=="constructor")&&Object.defineProperty(a.prototype,l,(r=Object.getOwnPropertyDescriptor(o.prototype,l))!==null&&r!==void 0?r:Object.create(null))}e.applyMixin=t,e.nextTick=typeof(xe==null?void 0:xe.nextTick)=="function"?xe.nextTick:a=>{setTimeout(a,0)},e.MQTTJS_VERSION=Uu().version}),Ir=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonCodes=void 0;var i=rr();e.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 t=(a,u)=>{let{messageId:n}=u,r=u.cmd,s=null,o=a.outgoing[n]?a.outgoing[n].cb:null,l=null;if(!o){a.log("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(a.log("_handleAck :: packet type",r),r){case"pubcomp":case"puback":{let f=u.reasonCode;f&&f>0&&f!==16?(l=new i.ErrorWithReasonCode(`Publish error: ${e.ReasonCodes[f]}`,f),a._removeOutgoingAndStoreMessage(n,()=>{o(l,u)})):a._removeOutgoingAndStoreMessage(n,o);break}case"pubrec":{s={cmd:"pubrel",qos:2,messageId:n};let f=u.reasonCode;f&&f>0&&f!==16?(l=new i.ErrorWithReasonCode(`Publish error: ${e.ReasonCodes[f]}`,f),a._removeOutgoingAndStoreMessage(n,()=>{o(l,u)})):a._sendPacket(s);break}case"suback":{delete a.outgoing[n],a.messageIdProvider.deallocate(n);let f=u.granted;for(let p=0;p<f.length;p++){let g=f[p];if(g&128){l=new Error(`Subscribe error: ${e.ReasonCodes[g]}`),l.code=g;let m=a.messageIdToTopic[n];m&&m.forEach(A=>{delete a._resubscribeTopics[A]})}}delete a.messageIdToTopic[n],a._invokeStoreProcessingQueue(),o(l,u);break}case"unsuback":{delete a.outgoing[n],a.messageIdProvider.deallocate(n),a._invokeStoreProcessingQueue(),o(null,u);break}default:a.emit("error",new Error("unrecognized packet type"))}a.disconnecting&&Object.keys(a.outgoing).length===0&&a.emit("outgoingEmpty")};e.default=t}),Du=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=rr(),t=Ir(),a=(u,n)=>{let{options:r}=u,s=r.protocolVersion,o=s===5?n.reasonCode:n.returnCode;if(s!==5){let l=new i.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${s}`,o);u.emit("error",l);return}u.handleAuth(n,(l,f)=>{if(l){u.emit("error",l);return}if(o===24)u.reconnecting=!1,u._sendPacket(f);else{let p=new i.ErrorWithReasonCode(`Connection refused: ${t.ReasonCodes[o]}`,o);u.emit("error",p)}})};e.default=a}),Lu=Ae(e=>{var m,A,b,C,U,I,v,L,F,B,k,M,W,J,ne,S,q,te,Y,me,se,H,be,oe,we,w,Li,de,ve,he,R,Ua,z,fe,re,xt,Rt,Ni,Fr,jr,Fe,Fi,fr,D;ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var i=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,t=new Set,a=typeof xe=="object"&&xe?xe:{},u=($,O,N,Q)=>{typeof a.emitWarning=="function"?a.emitWarning($,O,N,Q):console.error(`[${N}] ${O}: ${$}`)},n=globalThis.AbortController,r=globalThis.AbortSignal;if(typeof n>"u"){r=class{constructor(){Ve(this,"onabort");Ve(this,"_onabort",[]);Ve(this,"reason");Ve(this,"aborted",!1)}addEventListener(N,Q){this._onabort.push(Q)}},n=class{constructor(){Ve(this,"signal",new r);O()}abort(N){var Q,ce;if(!this.signal.aborted){this.signal.reason=N,this.signal.aborted=!0;for(let h of this.signal._onabort)h(N);(ce=(Q=this.signal).onabort)==null||ce.call(Q,N)}}};let $=((m=a.env)==null?void 0:m.LRU_CACHE_IGNORE_AC_WARNING)!=="1",O=()=>{$&&($=!1,u("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",O))}}var s=$=>!t.has($),o=$=>$&&$===Math.floor($)&&$>0&&isFinite($),l=$=>o($)?$<=Math.pow(2,8)?Uint8Array:$<=Math.pow(2,16)?Uint16Array:$<=Math.pow(2,32)?Uint32Array:$<=Number.MAX_SAFE_INTEGER?f:null:null,f=class extends Array{constructor($){super($),this.fill(0)}},p=(A=class{constructor(O,N){Ve(this,"heap");Ve(this,"length");if(!x(A,b))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new N(O),this.length=0}static create(O){let N=l(O);if(!N)return[];Ce(A,b,!0);let Q=new A(O,N);return Ce(A,b,!1),Q}push(O){this.heap[this.length++]=O}pop(){return this.heap[--this.length]}},b=new WeakMap,Pe(A,b,!1),A),g=(D=class{constructor(O){Pe(this,w);Pe(this,C);Pe(this,U);Pe(this,I);Pe(this,v);Pe(this,L);Ve(this,"ttl");Ve(this,"ttlResolution");Ve(this,"ttlAutopurge");Ve(this,"updateAgeOnGet");Ve(this,"updateAgeOnHas");Ve(this,"allowStale");Ve(this,"noDisposeOnSet");Ve(this,"noUpdateTTL");Ve(this,"maxEntrySize");Ve(this,"sizeCalculation");Ve(this,"noDeleteOnFetchRejection");Ve(this,"noDeleteOnStaleGet");Ve(this,"allowStaleOnFetchAbort");Ve(this,"allowStaleOnFetchRejection");Ve(this,"ignoreFetchAbort");Pe(this,F);Pe(this,B);Pe(this,k);Pe(this,M);Pe(this,W);Pe(this,J);Pe(this,ne);Pe(this,S);Pe(this,q);Pe(this,te);Pe(this,Y);Pe(this,me);Pe(this,se);Pe(this,H);Pe(this,be);Pe(this,oe);Pe(this,we);Pe(this,de,()=>{});Pe(this,ve,()=>{});Pe(this,he,()=>{});Pe(this,R,()=>!1);Pe(this,z,O=>{});Pe(this,fe,(O,N,Q)=>{});Pe(this,re,(O,N,Q,ce)=>{if(Q||ce)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});let{max:N=0,ttl:Q,ttlResolution:ce=1,ttlAutopurge:h,updateAgeOnGet:c,updateAgeOnHas:d,allowStale:y,dispose:T,disposeAfter:K,noDisposeOnSet:ee,noUpdateTTL:Ie,maxSize:Be=0,maxEntrySize:Oe=0,sizeCalculation:Se,fetchMethod:ke,noDeleteOnFetchRejection:Te,noDeleteOnStaleGet:De,allowStaleOnFetchRejection:ze,allowStaleOnFetchAbort:Qe,ignoreFetchAbort:Xe}=O;if(N!==0&&!o(N))throw new TypeError("max option must be a nonnegative integer");let tt=N?l(N):Array;if(!tt)throw new Error("invalid max value: "+N);if(Ce(this,C,N),Ce(this,U,Be),this.maxEntrySize=Oe||x(this,U),this.sizeCalculation=Se,this.sizeCalculation){if(!x(this,U)&&!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(ke!==void 0&&typeof ke!="function")throw new TypeError("fetchMethod must be a function if specified");if(Ce(this,L,ke),Ce(this,oe,!!ke),Ce(this,k,new Map),Ce(this,M,new Array(N).fill(void 0)),Ce(this,W,new Array(N).fill(void 0)),Ce(this,J,new tt(N)),Ce(this,ne,new tt(N)),Ce(this,S,0),Ce(this,q,0),Ce(this,te,p.create(N)),Ce(this,F,0),Ce(this,B,0),typeof T=="function"&&Ce(this,I,T),typeof K=="function"?(Ce(this,v,K),Ce(this,Y,[])):(Ce(this,v,void 0),Ce(this,Y,void 0)),Ce(this,be,!!x(this,I)),Ce(this,we,!!x(this,v)),this.noDisposeOnSet=!!ee,this.noUpdateTTL=!!Ie,this.noDeleteOnFetchRejection=!!Te,this.allowStaleOnFetchRejection=!!ze,this.allowStaleOnFetchAbort=!!Qe,this.ignoreFetchAbort=!!Xe,this.maxEntrySize!==0){if(x(this,U)!==0&&!o(x(this,U)))throw new TypeError("maxSize must be a positive integer if specified");if(!o(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");Ee(this,w,Ua).call(this)}if(this.allowStale=!!y,this.noDeleteOnStaleGet=!!De,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!d,this.ttlResolution=o(ce)||ce===0?ce:1,this.ttlAutopurge=!!h,this.ttl=Q||0,this.ttl){if(!o(this.ttl))throw new TypeError("ttl must be a positive integer if specified");Ee(this,w,Li).call(this)}if(x(this,C)===0&&this.ttl===0&&x(this,U)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!x(this,C)&&!x(this,U)){let Ye="LRU_CACHE_UNBOUNDED";s(Ye)&&(t.add(Ye),u("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Ye,D))}}static unsafeExposeInternals(O){return{starts:x(O,se),ttls:x(O,H),sizes:x(O,me),keyMap:x(O,k),keyList:x(O,M),valList:x(O,W),next:x(O,J),prev:x(O,ne),get head(){return x(O,S)},get tail(){return x(O,q)},free:x(O,te),isBackgroundFetch:N=>{var Q;return Ee(Q=O,w,Fe).call(Q,N)},backgroundFetch:(N,Q,ce,h)=>{var c;return Ee(c=O,w,jr).call(c,N,Q,ce,h)},moveToTail:N=>{var Q;return Ee(Q=O,w,fr).call(Q,N)},indexes:N=>{var Q;return Ee(Q=O,w,xt).call(Q,N)},rindexes:N=>{var Q;return Ee(Q=O,w,Rt).call(Q,N)},isStale:N=>{var Q;return x(Q=O,R).call(Q,N)}}}get max(){return x(this,C)}get maxSize(){return x(this,U)}get calculatedSize(){return x(this,B)}get size(){return x(this,F)}get fetchMethod(){return x(this,L)}get dispose(){return x(this,I)}get disposeAfter(){return x(this,v)}getRemainingTTL(O){return x(this,k).has(O)?1/0:0}*entries(){for(let O of Ee(this,w,xt).call(this))x(this,W)[O]!==void 0&&x(this,M)[O]!==void 0&&!Ee(this,w,Fe).call(this,x(this,W)[O])&&(yield[x(this,M)[O],x(this,W)[O]])}*rentries(){for(let O of Ee(this,w,Rt).call(this))x(this,W)[O]!==void 0&&x(this,M)[O]!==void 0&&!Ee(this,w,Fe).call(this,x(this,W)[O])&&(yield[x(this,M)[O],x(this,W)[O]])}*keys(){for(let O of Ee(this,w,xt).call(this)){let N=x(this,M)[O];N!==void 0&&!Ee(this,w,Fe).call(this,x(this,W)[O])&&(yield N)}}*rkeys(){for(let O of Ee(this,w,Rt).call(this)){let N=x(this,M)[O];N!==void 0&&!Ee(this,w,Fe).call(this,x(this,W)[O])&&(yield N)}}*values(){for(let O of Ee(this,w,xt).call(this))x(this,W)[O]!==void 0&&!Ee(this,w,Fe).call(this,x(this,W)[O])&&(yield x(this,W)[O])}*rvalues(){for(let O of Ee(this,w,Rt).call(this))x(this,W)[O]!==void 0&&!Ee(this,w,Fe).call(this,x(this,W)[O])&&(yield x(this,W)[O])}[Symbol.iterator](){return this.entries()}find(O,N={}){for(let Q of Ee(this,w,xt).call(this)){let ce=x(this,W)[Q],h=Ee(this,w,Fe).call(this,ce)?ce.__staleWhileFetching:ce;if(h!==void 0&&O(h,x(this,M)[Q],this))return this.get(x(this,M)[Q],N)}}forEach(O,N=this){for(let Q of Ee(this,w,xt).call(this)){let ce=x(this,W)[Q],h=Ee(this,w,Fe).call(this,ce)?ce.__staleWhileFetching:ce;h!==void 0&&O.call(N,h,x(this,M)[Q],this)}}rforEach(O,N=this){for(let Q of Ee(this,w,Rt).call(this)){let ce=x(this,W)[Q],h=Ee(this,w,Fe).call(this,ce)?ce.__staleWhileFetching:ce;h!==void 0&&O.call(N,h,x(this,M)[Q],this)}}purgeStale(){let O=!1;for(let N of Ee(this,w,Rt).call(this,{allowStale:!0}))x(this,R).call(this,N)&&(this.delete(x(this,M)[N]),O=!0);return O}dump(){let O=[];for(let N of Ee(this,w,xt).call(this,{allowStale:!0})){let Q=x(this,M)[N],ce=x(this,W)[N],h=Ee(this,w,Fe).call(this,ce)?ce.__staleWhileFetching:ce;if(h===void 0||Q===void 0)continue;let c={value:h};if(x(this,H)&&x(this,se)){c.ttl=x(this,H)[N];let d=i.now()-x(this,se)[N];c.start=Math.floor(Date.now()-d)}x(this,me)&&(c.size=x(this,me)[N]),O.unshift([Q,c])}return O}load(O){this.clear();for(let[N,Q]of O){if(Q.start){let ce=Date.now()-Q.start;Q.start=i.now()-ce}this.set(N,Q.value,Q)}}set(O,N,Q={}){var Ie,Be,Oe,Se,ke;if(N===void 0)return this.delete(O),this;let{ttl:ce=this.ttl,start:h,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:d=this.sizeCalculation,status:y}=Q,{noUpdateTTL:T=this.noUpdateTTL}=Q,K=x(this,re).call(this,O,N,Q.size||0,d);if(this.maxEntrySize&&K>this.maxEntrySize)return y&&(y.set="miss",y.maxEntrySizeExceeded=!0),this.delete(O),this;let ee=x(this,F)===0?void 0:x(this,k).get(O);if(ee===void 0)ee=x(this,F)===0?x(this,q):x(this,te).length!==0?x(this,te).pop():x(this,F)===x(this,C)?Ee(this,w,Fr).call(this,!1):x(this,F),x(this,M)[ee]=O,x(this,W)[ee]=N,x(this,k).set(O,ee),x(this,J)[x(this,q)]=ee,x(this,ne)[ee]=x(this,q),Ce(this,q,ee),Nr(this,F)._++,x(this,fe).call(this,ee,K,y),y&&(y.set="add"),T=!1;else{Ee(this,w,fr).call(this,ee);let Te=x(this,W)[ee];if(N!==Te){if(x(this,oe)&&Ee(this,w,Fe).call(this,Te)){Te.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:De}=Te;De!==void 0&&!c&&(x(this,be)&&((Ie=x(this,I))==null||Ie.call(this,De,O,"set")),x(this,we)&&((Be=x(this,Y))==null||Be.push([De,O,"set"])))}else c||(x(this,be)&&((Oe=x(this,I))==null||Oe.call(this,Te,O,"set")),x(this,we)&&((Se=x(this,Y))==null||Se.push([Te,O,"set"])));if(x(this,z).call(this,ee),x(this,fe).call(this,ee,K,y),x(this,W)[ee]=N,y){y.set="replace";let De=Te&&Ee(this,w,Fe).call(this,Te)?Te.__staleWhileFetching:Te;De!==void 0&&(y.oldValue=De)}}else y&&(y.set="update")}if(ce!==0&&!x(this,H)&&Ee(this,w,Li).call(this),x(this,H)&&(T||x(this,he).call(this,ee,ce,h),y&&x(this,ve).call(this,y,ee)),!c&&x(this,we)&&x(this,Y)){let Te=x(this,Y),De;for(;De=Te==null?void 0:Te.shift();)(ke=x(this,v))==null||ke.call(this,...De)}return this}pop(){var O;try{for(;x(this,F);){let N=x(this,W)[x(this,S)];if(Ee(this,w,Fr).call(this,!0),Ee(this,w,Fe).call(this,N)){if(N.__staleWhileFetching)return N.__staleWhileFetching}else if(N!==void 0)return N}}finally{if(x(this,we)&&x(this,Y)){let N=x(this,Y),Q;for(;Q=N==null?void 0:N.shift();)(O=x(this,v))==null||O.call(this,...Q)}}}has(O,N={}){let{updateAgeOnHas:Q=this.updateAgeOnHas,status:ce}=N,h=x(this,k).get(O);if(h!==void 0){let c=x(this,W)[h];if(Ee(this,w,Fe).call(this,c)&&c.__staleWhileFetching===void 0)return!1;if(x(this,R).call(this,h))ce&&(ce.has="stale",x(this,ve).call(this,ce,h));else return Q&&x(this,de).call(this,h),ce&&(ce.has="hit",x(this,ve).call(this,ce,h)),!0}else ce&&(ce.has="miss");return!1}peek(O,N={}){let{allowStale:Q=this.allowStale}=N,ce=x(this,k).get(O);if(ce!==void 0&&(Q||!x(this,R).call(this,ce))){let h=x(this,W)[ce];return Ee(this,w,Fe).call(this,h)?h.__staleWhileFetching:h}}async fetch(O,N={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:ce=this.updateAgeOnGet,noDeleteOnStaleGet:h=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:y=0,sizeCalculation:T=this.sizeCalculation,noUpdateTTL:K=this.noUpdateTTL,noDeleteOnFetchRejection:ee=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:Ie=this.allowStaleOnFetchRejection,ignoreFetchAbort:Be=this.ignoreFetchAbort,allowStaleOnFetchAbort:Oe=this.allowStaleOnFetchAbort,context:Se,forceRefresh:ke=!1,status:Te,signal:De}=N;if(!x(this,oe))return Te&&(Te.fetch="get"),this.get(O,{allowStale:Q,updateAgeOnGet:ce,noDeleteOnStaleGet:h,status:Te});let ze={allowStale:Q,updateAgeOnGet:ce,noDeleteOnStaleGet:h,ttl:c,noDisposeOnSet:d,size:y,sizeCalculation:T,noUpdateTTL:K,noDeleteOnFetchRejection:ee,allowStaleOnFetchRejection:Ie,allowStaleOnFetchAbort:Oe,ignoreFetchAbort:Be,status:Te,signal:De},Qe=x(this,k).get(O);if(Qe===void 0){Te&&(Te.fetch="miss");let Xe=Ee(this,w,jr).call(this,O,Qe,ze,Se);return Xe.__returned=Xe}else{let Xe=x(this,W)[Qe];if(Ee(this,w,Fe).call(this,Xe)){let xa=Q&&Xe.__staleWhileFetching!==void 0;return Te&&(Te.fetch="inflight",xa&&(Te.returnedStale=!0)),xa?Xe.__staleWhileFetching:Xe.__returned=Xe}let tt=x(this,R).call(this,Qe);if(!ke&&!tt)return Te&&(Te.fetch="hit"),Ee(this,w,fr).call(this,Qe),ce&&x(this,de).call(this,Qe),Te&&x(this,ve).call(this,Te,Qe),Xe;let Ye=Ee(this,w,jr).call(this,O,Qe,ze,Se),Pa=Ye.__staleWhileFetching!==void 0&&Q;return Te&&(Te.fetch=tt?"stale":"refresh",Pa&&tt&&(Te.returnedStale=!0)),Pa?Ye.__staleWhileFetching:Ye.__returned=Ye}}get(O,N={}){let{allowStale:Q=this.allowStale,updateAgeOnGet:ce=this.updateAgeOnGet,noDeleteOnStaleGet:h=this.noDeleteOnStaleGet,status:c}=N,d=x(this,k).get(O);if(d!==void 0){let y=x(this,W)[d],T=Ee(this,w,Fe).call(this,y);return c&&x(this,ve).call(this,c,d),x(this,R).call(this,d)?(c&&(c.get="stale"),T?(c&&Q&&y.__staleWhileFetching!==void 0&&(c.returnedStale=!0),Q?y.__staleWhileFetching:void 0):(h||this.delete(O),c&&Q&&(c.returnedStale=!0),Q?y:void 0)):(c&&(c.get="hit"),T?y.__staleWhileFetching:(Ee(this,w,fr).call(this,d),ce&&x(this,de).call(this,d),y))}else c&&(c.get="miss")}delete(O){var Q,ce,h,c;let N=!1;if(x(this,F)!==0){let d=x(this,k).get(O);if(d!==void 0)if(N=!0,x(this,F)===1)this.clear();else{x(this,z).call(this,d);let y=x(this,W)[d];Ee(this,w,Fe).call(this,y)?y.__abortController.abort(new Error("deleted")):(x(this,be)||x(this,we))&&(x(this,be)&&((Q=x(this,I))==null||Q.call(this,y,O,"delete")),x(this,we)&&((ce=x(this,Y))==null||ce.push([y,O,"delete"]))),x(this,k).delete(O),x(this,M)[d]=void 0,x(this,W)[d]=void 0,d===x(this,q)?Ce(this,q,x(this,ne)[d]):d===x(this,S)?Ce(this,S,x(this,J)[d]):(x(this,J)[x(this,ne)[d]]=x(this,J)[d],x(this,ne)[x(this,J)[d]]=x(this,ne)[d]),Nr(this,F)._--,x(this,te).push(d)}}if(x(this,we)&&((h=x(this,Y))!=null&&h.length)){let d=x(this,Y),y;for(;y=d==null?void 0:d.shift();)(c=x(this,v))==null||c.call(this,...y)}return N}clear(){var O,N,Q;for(let ce of Ee(this,w,Rt).call(this,{allowStale:!0})){let h=x(this,W)[ce];if(Ee(this,w,Fe).call(this,h))h.__abortController.abort(new Error("deleted"));else{let c=x(this,M)[ce];x(this,be)&&((O=x(this,I))==null||O.call(this,h,c,"delete")),x(this,we)&&((N=x(this,Y))==null||N.push([h,c,"delete"]))}}if(x(this,k).clear(),x(this,W).fill(void 0),x(this,M).fill(void 0),x(this,H)&&x(this,se)&&(x(this,H).fill(0),x(this,se).fill(0)),x(this,me)&&x(this,me).fill(0),Ce(this,S,0),Ce(this,q,0),x(this,te).length=0,Ce(this,B,0),Ce(this,F,0),x(this,we)&&x(this,Y)){let ce=x(this,Y),h;for(;h=ce==null?void 0:ce.shift();)(Q=x(this,v))==null||Q.call(this,...h)}}},C=new WeakMap,U=new WeakMap,I=new WeakMap,v=new WeakMap,L=new WeakMap,F=new WeakMap,B=new WeakMap,k=new WeakMap,M=new WeakMap,W=new WeakMap,J=new WeakMap,ne=new WeakMap,S=new WeakMap,q=new WeakMap,te=new WeakMap,Y=new WeakMap,me=new WeakMap,se=new WeakMap,H=new WeakMap,be=new WeakMap,oe=new WeakMap,we=new WeakMap,w=new WeakSet,Li=function(){let O=new f(x(this,C)),N=new f(x(this,C));Ce(this,H,O),Ce(this,se,N),Ce(this,he,(h,c,d=i.now())=>{if(N[h]=c!==0?d:0,O[h]=c,c!==0&&this.ttlAutopurge){let y=setTimeout(()=>{x(this,R).call(this,h)&&this.delete(x(this,M)[h])},c+1);y.unref&&y.unref()}}),Ce(this,de,h=>{N[h]=O[h]!==0?i.now():0}),Ce(this,ve,(h,c)=>{if(O[c]){let d=O[c],y=N[c];h.ttl=d,h.start=y,h.now=Q||ce();let T=h.now-y;h.remainingTTL=d-T}});let Q=0,ce=()=>{let h=i.now();if(this.ttlResolution>0){Q=h;let c=setTimeout(()=>Q=0,this.ttlResolution);c.unref&&c.unref()}return h};this.getRemainingTTL=h=>{let c=x(this,k).get(h);if(c===void 0)return 0;let d=O[c],y=N[c];if(d===0||y===0)return 1/0;let T=(Q||ce())-y;return d-T},Ce(this,R,h=>O[h]!==0&&N[h]!==0&&(Q||ce())-N[h]>O[h])},de=new WeakMap,ve=new WeakMap,he=new WeakMap,R=new WeakMap,Ua=function(){let O=new f(x(this,C));Ce(this,B,0),Ce(this,me,O),Ce(this,z,N=>{Ce(this,B,x(this,B)-O[N]),O[N]=0}),Ce(this,re,(N,Q,ce,h)=>{if(Ee(this,w,Fe).call(this,Q))return 0;if(!o(ce))if(h){if(typeof h!="function")throw new TypeError("sizeCalculation must be a function");if(ce=h(Q,N),!o(ce))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 ce}),Ce(this,fe,(N,Q,ce)=>{if(O[N]=Q,x(this,U)){let h=x(this,U)-O[N];for(;x(this,B)>h;)Ee(this,w,Fr).call(this,!0)}Ce(this,B,x(this,B)+O[N]),ce&&(ce.entrySize=Q,ce.totalCalculatedSize=x(this,B))})},z=new WeakMap,fe=new WeakMap,re=new WeakMap,xt=function*({allowStale:O=this.allowStale}={}){if(x(this,F))for(let N=x(this,q);!(!Ee(this,w,Ni).call(this,N)||((O||!x(this,R).call(this,N))&&(yield N),N===x(this,S)));)N=x(this,ne)[N]},Rt=function*({allowStale:O=this.allowStale}={}){if(x(this,F))for(let N=x(this,S);!(!Ee(this,w,Ni).call(this,N)||((O||!x(this,R).call(this,N))&&(yield N),N===x(this,q)));)N=x(this,J)[N]},Ni=function(O){return O!==void 0&&x(this,k).get(x(this,M)[O])===O},Fr=function(O){var h,c;let N=x(this,S),Q=x(this,M)[N],ce=x(this,W)[N];return x(this,oe)&&Ee(this,w,Fe).call(this,ce)?ce.__abortController.abort(new Error("evicted")):(x(this,be)||x(this,we))&&(x(this,be)&&((h=x(this,I))==null||h.call(this,ce,Q,"evict")),x(this,we)&&((c=x(this,Y))==null||c.push([ce,Q,"evict"]))),x(this,z).call(this,N),O&&(x(this,M)[N]=void 0,x(this,W)[N]=void 0,x(this,te).push(N)),x(this,F)===1?(Ce(this,S,Ce(this,q,0)),x(this,te).length=0):Ce(this,S,x(this,J)[N]),x(this,k).delete(Q),Nr(this,F)._--,N},jr=function(O,N,Q,ce){let h=N===void 0?void 0:x(this,W)[N];if(Ee(this,w,Fe).call(this,h))return h;let c=new n,{signal:d}=Q;d==null||d.addEventListener("abort",()=>c.abort(d.reason),{signal:c.signal});let y={signal:c.signal,options:Q,context:ce},T=(Se,ke=!1)=>{let{aborted:Te}=c.signal,De=Q.ignoreFetchAbort&&Se!==void 0;if(Q.status&&(Te&&!ke?(Q.status.fetchAborted=!0,Q.status.fetchError=c.signal.reason,De&&(Q.status.fetchAbortIgnored=!0)):Q.status.fetchResolved=!0),Te&&!De&&!ke)return ee(c.signal.reason);let ze=Be;return x(this,W)[N]===Be&&(Se===void 0?ze.__staleWhileFetching?x(this,W)[N]=ze.__staleWhileFetching:this.delete(O):(Q.status&&(Q.status.fetchUpdated=!0),this.set(O,Se,y.options))),Se},K=Se=>(Q.status&&(Q.status.fetchRejected=!0,Q.status.fetchError=Se),ee(Se)),ee=Se=>{let{aborted:ke}=c.signal,Te=ke&&Q.allowStaleOnFetchAbort,De=Te||Q.allowStaleOnFetchRejection,ze=De||Q.noDeleteOnFetchRejection,Qe=Be;if(x(this,W)[N]===Be&&(!ze||Qe.__staleWhileFetching===void 0?this.delete(O):Te||(x(this,W)[N]=Qe.__staleWhileFetching)),De)return Q.status&&Qe.__staleWhileFetching!==void 0&&(Q.status.returnedStale=!0),Qe.__staleWhileFetching;if(Qe.__returned===Qe)throw Se},Ie=(Se,ke)=>{var De;let Te=(De=x(this,L))==null?void 0:De.call(this,O,h,y);Te&&Te instanceof Promise&&Te.then(ze=>Se(ze===void 0?void 0:ze),ke),c.signal.addEventListener("abort",()=>{(!Q.ignoreFetchAbort||Q.allowStaleOnFetchAbort)&&(Se(void 0),Q.allowStaleOnFetchAbort&&(Se=ze=>T(ze,!0)))})};Q.status&&(Q.status.fetchDispatched=!0);let Be=new Promise(Ie).then(T,K),Oe=Object.assign(Be,{__abortController:c,__staleWhileFetching:h,__returned:void 0});return N===void 0?(this.set(O,Oe,{...y.options,status:void 0}),N=x(this,k).get(O)):x(this,W)[N]=Oe,Oe},Fe=function(O){if(!x(this,oe))return!1;let N=O;return!!N&&N instanceof Promise&&N.hasOwnProperty("__staleWhileFetching")&&N.__abortController instanceof n},Fi=function(O,N){x(this,ne)[N]=O,x(this,J)[O]=N},fr=function(O){O!==x(this,q)&&(O===x(this,S)?Ce(this,S,x(this,J)[O]):Ee(this,w,Fi).call(this,x(this,ne)[O],x(this,J)[O]),Ee(this,w,Fi).call(this,x(this,q),O),Ce(this,q,O))},D);e.LRUCache=g}),St=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.ContainerIterator=e.Container=e.Base=void 0;var i=class{constructor(u=0){this.iteratorType=u}equals(u){return this.o===u.o}};e.ContainerIterator=i;var t=class{constructor(){this.i=0}get length(){return this.i}size(){return this.i}empty(){return this.i===0}};e.Base=t;var a=class extends t{};e.Container=a}),Nu=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=St(),t=class extends i.Base{constructor(u=[]){super(),this.S=[];let n=this;u.forEach(function(r){n.push(r)})}clear(){this.i=0,this.S=[]}push(u){return this.S.push(u),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=t;e.default=a}),Fu=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=St(),t=class extends i.Base{constructor(u=[]){super(),this.j=0,this.q=[];let n=this;u.forEach(function(r){n.push(r)})}clear(){this.q=[],this.i=this.j=0}push(u){let n=this.q.length;if(this.j/n>.5&&this.j+this.i>=n&&n>4096){let r=this.i;for(let s=0;s<r;++s)this.q[s]=this.q[this.j+s];this.j=0,this.q[this.i]=u}else this.q[this.j+this.i]=u;return++this.i}pop(){if(this.i===0)return;let u=this.q[this.j++];return this.i-=1,u}front(){if(this.i!==0)return this.q[this.j]}},a=t;e.default=a}),ju=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=St(),t=class extends i.Base{constructor(u=[],n=function(s,o){return s>o?-1:s<o?1:0},r=!0){if(super(),this.v=n,Array.isArray(u))this.C=r?[...u]:u;else{this.C=[];let o=this;u.forEach(function(l){o.C.push(l)})}this.i=this.C.length;let s=this.i>>1;for(let o=this.i-1>>1;o>=0;--o)this.k(o,s)}m(u){let n=this.C[u];for(;u>0;){let r=u-1>>1,s=this.C[r];if(this.v(s,n)<=0)break;this.C[u]=s,u=r}this.C[u]=n}k(u,n){let r=this.C[u];for(;u<n;){let s=u<<1|1,o=s+1,l=this.C[s];if(o<this.i&&this.v(l,this.C[o])>0&&(s=o,l=this.C[o]),this.v(l,r)>=0)break;this.C[u]=l,u=s}this.C[u]=r}clear(){this.i=0,this.C.length=0}push(u){this.C.push(u),this.m(this.i),this.i+=1}pop(){if(this.i===0)return;let u=this.C[0],n=this.C.pop();return this.i-=1,this.i&&(this.C[0]=n,this.k(0,this.i>>1)),u}top(){return this.C[0]}find(u){return this.C.indexOf(u)>=0}remove(u){let n=this.C.indexOf(u);return n<0?!1:(n===0?this.pop():n===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(n,1,this.C.pop()),this.i-=1,this.m(n),this.k(n,this.i>>1)),!0)}updateItem(u){let n=this.C.indexOf(u);return n<0?!1:(this.m(n),this.k(n,this.i>>1),!0)}toArray(){return[...this.C]}},a=t;e.default=a}),Ai=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=St(),t=class extends i.Container{},a=t;e.default=a}),Ct=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.throwIteratorAccessError=i;function i(){throw new RangeError("Iterator access denied!")}}),bs=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.RandomIterator=void 0;var i=St(),t=Ct(),a=class extends i.ContainerIterator{constructor(u,n){super(n),this.o=u,this.iteratorType===0?(this.pre=function(){return this.o===0&&(0,t.throwIteratorAccessError)(),this.o-=1,this},this.next=function(){return this.o===this.container.size()&&(0,t.throwIteratorAccessError)(),this.o+=1,this}):(this.pre=function(){return this.o===this.container.size()-1&&(0,t.throwIteratorAccessError)(),this.o+=1,this},this.next=function(){return this.o===-1&&(0,t.throwIteratorAccessError)(),this.o-=1,this})}get pointer(){return this.container.getElementByPos(this.o)}set pointer(u){this.container.setElementByPos(this.o,u)}};e.RandomIterator=a}),Vu=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=a(Ai()),t=bs();function a(s){return s&&s.t?s:{default:s}}var u=class Da extends t.RandomIterator{constructor(o,l,f){super(o,f),this.container=l}copy(){return new Da(this.o,this.container,this.iteratorType)}},n=class extends i.default{constructor(s=[],o=!0){if(super(),Array.isArray(s))this.J=o?[...s]:s,this.i=s.length;else{this.J=[];let l=this;s.forEach(function(f){l.pushBack(f)})}}clear(){this.i=0,this.J.length=0}begin(){return new u(0,this)}end(){return new u(this.i,this)}rBegin(){return new u(this.i-1,this,1)}rEnd(){return new u(-1,this,1)}front(){return this.J[0]}back(){return this.J[this.i-1]}getElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;return this.J[s]}eraseElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;return this.J.splice(s,1),this.i-=1,this.i}eraseElementByValue(s){let o=0;for(let l=0;l<this.i;++l)this.J[l]!==s&&(this.J[o++]=this.J[l]);return this.i=this.J.length=o,this.i}eraseElementByIterator(s){let o=s.o;return s=s.next(),this.eraseElementByPos(o),s}pushBack(s){return this.J.push(s),this.i+=1,this.i}popBack(){if(this.i!==0)return this.i-=1,this.J.pop()}setElementByPos(s,o){if(s<0||s>this.i-1)throw new RangeError;this.J[s]=o}insert(s,o,l=1){if(s<0||s>this.i)throw new RangeError;return this.J.splice(s,0,...new Array(l).fill(o)),this.i+=l,this.i}find(s){for(let o=0;o<this.i;++o)if(this.J[o]===s)return new u(o,this);return this.end()}reverse(){this.J.reverse()}unique(){let s=1;for(let o=1;o<this.i;++o)this.J[o]!==this.J[o-1]&&(this.J[s++]=this.J[o]);return this.i=this.J.length=s,this.i}sort(s){this.J.sort(s)}forEach(s){for(let o=0;o<this.i;++o)s(this.J[o],o,this)}[Symbol.iterator](){return(function*(){yield*this.J}).bind(this)()}},r=n;e.default=r}),Ku=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=u(Ai()),t=St(),a=Ct();function u(o){return o&&o.t?o:{default:o}}var n=class La extends t.ContainerIterator{constructor(l,f,p,g){super(g),this.o=l,this.h=f,this.container=p,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(l){this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o.l=l}copy(){return new La(this.o,this.h,this.container,this.iteratorType)}},r=class extends i.default{constructor(o=[]){super(),this.h={},this.p=this._=this.h.L=this.h.B=this.h;let l=this;o.forEach(function(f){l.pushBack(f)})}V(o){let{L:l,B:f}=o;l.B=f,f.L=l,o===this.p&&(this.p=f),o===this._&&(this._=l),this.i-=1}G(o,l){let f=l.B,p={l:o,L:l,B:f};l.B=p,f.L=p,l===this.h&&(this.p=p),f===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 n(this.p,this.h,this)}end(){return new n(this.h,this.h,this)}rBegin(){return new n(this._,this.h,this,1)}rEnd(){return new n(this.h,this.h,this,1)}front(){return this.p.l}back(){return this._.l}getElementByPos(o){if(o<0||o>this.i-1)throw new RangeError;let l=this.p;for(;o--;)l=l.B;return l.l}eraseElementByPos(o){if(o<0||o>this.i-1)throw new RangeError;let l=this.p;for(;o--;)l=l.B;return this.V(l),this.i}eraseElementByValue(o){let l=this.p;for(;l!==this.h;)l.l===o&&this.V(l),l=l.B;return this.i}eraseElementByIterator(o){let l=o.o;return l===this.h&&(0,a.throwIteratorAccessError)(),o=o.next(),this.V(l),o}pushBack(o){return this.G(o,this._),this.i}popBack(){if(this.i===0)return;let o=this._.l;return this.V(this._),o}pushFront(o){return this.G(o,this.h),this.i}popFront(){if(this.i===0)return;let o=this.p.l;return this.V(this.p),o}setElementByPos(o,l){if(o<0||o>this.i-1)throw new RangeError;let f=this.p;for(;o--;)f=f.B;f.l=l}insert(o,l,f=1){if(o<0||o>this.i)throw new RangeError;if(f<=0)return this.i;if(o===0)for(;f--;)this.pushFront(l);else if(o===this.i)for(;f--;)this.pushBack(l);else{let p=this.p;for(let m=1;m<o;++m)p=p.B;let g=p.B;for(this.i+=f;f--;)p.B={l,L:p},p.B.L=p,p=p.B;p.B=g,g.L=p}return this.i}find(o){let l=this.p;for(;l!==this.h;){if(l.l===o)return new n(l,this.h,this);l=l.B}return this.end()}reverse(){if(this.i<=1)return;let o=this.p,l=this._,f=0;for(;f<<1<this.i;){let p=o.l;o.l=l.l,l.l=p,o=o.B,l=l.L,f+=1}}unique(){if(this.i<=1)return this.i;let o=this.p;for(;o!==this.h;){let l=o;for(;l.B!==this.h&&l.l===l.B.l;)l=l.B,this.i-=1;o.B=l.B,o.B.L=o,o=o.B}return this.i}sort(o){if(this.i<=1)return;let l=[];this.forEach(function(p){l.push(p)}),l.sort(o);let f=this.p;l.forEach(function(p){f.l=p,f=f.B})}merge(o){let l=this;if(this.i===0)o.forEach(function(f){l.pushBack(f)});else{let f=this.p;o.forEach(function(p){for(;f!==l.h&&f.l<=p;)f=f.B;l.G(p,f.L)})}return this.i}forEach(o){let l=this.p,f=0;for(;l!==this.h;)o(l.l,f++,this),l=l.B}[Symbol.iterator](){return(function*(){if(this.i===0)return;let o=this.p;for(;o!==this.h;)yield o.l,o=o.B}).bind(this)()}},s=r;e.default=s}),Wu=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=a(Ai()),t=bs();function a(s){return s&&s.t?s:{default:s}}var u=class Na extends t.RandomIterator{constructor(o,l,f){super(o,f),this.container=l}copy(){return new Na(this.o,this.container,this.iteratorType)}},n=class extends i.default{constructor(s=[],o=4096){super(),this.j=0,this.D=0,this.R=0,this.N=0,this.P=0,this.A=[];let l=(()=>{if(typeof s.length=="number")return s.length;if(typeof s.size=="number")return s.size;if(typeof s.size=="function")return s.size();throw new TypeError("Cannot get the length or size of the container")})();this.F=o,this.P=Math.max(Math.ceil(l/this.F),1);for(let g=0;g<this.P;++g)this.A.push(new Array(this.F));let f=Math.ceil(l/this.F);this.j=this.R=(this.P>>1)-(f>>1),this.D=this.N=this.F-l%this.F>>1;let p=this;s.forEach(function(g){p.pushBack(g)})}T(){let s=[],o=Math.max(this.P>>1,1);for(let l=0;l<o;++l)s[l]=new Array(this.F);for(let l=this.j;l<this.P;++l)s[s.length]=this.A[l];for(let l=0;l<this.R;++l)s[s.length]=this.A[l];s[s.length]=[...this.A[this.R]],this.j=o,this.R=s.length-1;for(let l=0;l<o;++l)s[s.length]=new Array(this.F);this.A=s,this.P=s.length}O(s){let o=this.D+s+1,l=o%this.F,f=l-1,p=this.j+(o-l)/this.F;return l===0&&(p-=1),p%=this.P,f<0&&(f+=this.F),{curNodeBucketIndex:p,curNodePointerIndex:f}}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 u(0,this)}end(){return new u(this.i,this)}rBegin(){return new u(this.i-1,this,1)}rEnd(){return new u(-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(s){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]=s,this.i}popBack(){if(this.i===0)return;let s=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,s}pushFront(s){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]=s,this.i}popFront(){if(this.i===0)return;let s=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,s}getElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;let{curNodeBucketIndex:o,curNodePointerIndex:l}=this.O(s);return this.A[o][l]}setElementByPos(s,o){if(s<0||s>this.i-1)throw new RangeError;let{curNodeBucketIndex:l,curNodePointerIndex:f}=this.O(s);this.A[l][f]=o}insert(s,o,l=1){if(s<0||s>this.i)throw new RangeError;if(s===0)for(;l--;)this.pushFront(o);else if(s===this.i)for(;l--;)this.pushBack(o);else{let f=[];for(let p=s;p<this.i;++p)f.push(this.getElementByPos(p));this.cut(s-1);for(let p=0;p<l;++p)this.pushBack(o);for(let p=0;p<f.length;++p)this.pushBack(f[p])}return this.i}cut(s){if(s<0)return this.clear(),0;let{curNodeBucketIndex:o,curNodePointerIndex:l}=this.O(s);return this.R=o,this.N=l,this.i=s+1,this.i}eraseElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;if(s===0)this.popFront();else if(s===this.i-1)this.popBack();else{let o=[];for(let f=s+1;f<this.i;++f)o.push(this.getElementByPos(f));this.cut(s),this.popBack();let l=this;o.forEach(function(f){l.pushBack(f)})}return this.i}eraseElementByValue(s){if(this.i===0)return 0;let o=[];for(let f=0;f<this.i;++f){let p=this.getElementByPos(f);p!==s&&o.push(p)}let l=o.length;for(let f=0;f<l;++f)this.setElementByPos(f,o[f]);return this.cut(l-1)}eraseElementByIterator(s){let o=s.o;return this.eraseElementByPos(o),s=s.next(),s}find(s){for(let o=0;o<this.i;++o)if(this.getElementByPos(o)===s)return new u(o,this);return this.end()}reverse(){let s=0,o=this.i-1;for(;s<o;){let l=this.getElementByPos(s);this.setElementByPos(s,this.getElementByPos(o)),this.setElementByPos(o,l),s+=1,o-=1}}unique(){if(this.i<=1)return this.i;let s=1,o=this.getElementByPos(0);for(let l=1;l<this.i;++l){let f=this.getElementByPos(l);f!==o&&(o=f,this.setElementByPos(s++,f))}for(;this.i>s;)this.popBack();return this.i}sort(s){let o=[];for(let l=0;l<this.i;++l)o.push(this.getElementByPos(l));o.sort(s);for(let l=0;l<this.i;++l)this.setElementByPos(l,o[l])}shrinkToFit(){if(this.i===0)return;let s=[];this.forEach(function(o){s.push(o)}),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 o=0;o<this.P;++o)this.A.push(new Array(this.F));for(let o=0;o<s.length;++o)this.pushBack(s[o])}forEach(s){for(let o=0;o<this.i;++o)s(this.getElementByPos(o),o,this)}[Symbol.iterator](){return(function*(){for(let s=0;s<this.i;++s)yield this.getElementByPos(s)}).bind(this)()}},r=n;e.default=r}),Qu=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.TreeNodeEnableIndex=e.TreeNode=void 0;var i=class{constructor(a,u){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=u}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 u=a.tt;for(;u.U===a;)a=u,u=a.tt;a=u}return a}B(){let a=this;if(a.W){for(a=a.W;a.U;)a=a.U;return a}else{let u=a.tt;for(;u.W===a;)a=u,u=a.tt;return a.W!==u?u:a}}te(){let a=this.tt,u=this.W,n=u.U;return a.tt===this?a.tt=u:a.U===this?a.U=u:a.W=u,u.tt=a,u.U=this,this.tt=u,this.W=n,n&&(n.tt=this),u}se(){let a=this.tt,u=this.U,n=u.W;return a.tt===this?a.tt=u:a.U===this?a.U=u:a.W=u,u.tt=a,u.W=this,this.tt=u,this.U=n,n&&(n.tt=this),u}};e.TreeNode=i;var t=class extends i{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)}};e.TreeNodeEnableIndex=t}),ys=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=Qu(),t=St(),a=Ct(),u=class extends t.Container{constructor(r=function(o,l){return o<l?-1:o>l?1:0},s=!1){super(),this.Y=void 0,this.v=r,s?(this.re=i.TreeNodeEnableIndex,this.M=function(o,l,f){let p=this.ne(o,l,f);if(p){let g=p.tt;for(;g!==this.h;)g.rt+=1,g=g.tt;let m=this.he(p);if(m){let{parentNode:A,grandParent:b,curNode:C}=m;A.ie(),b.ie(),C.ie()}}return this.i},this.V=function(o){let l=this.fe(o);for(;l!==this.h;)l.rt-=1,l=l.tt}):(this.re=i.TreeNode,this.M=function(o,l,f){let p=this.ne(o,l,f);return p&&this.he(p),this.i},this.V=this.fe),this.h=new this.re}X(r,s){let o=this.h;for(;r;){let l=this.v(r.u,s);if(l<0)r=r.W;else if(l>0)o=r,r=r.U;else return r}return o}Z(r,s){let o=this.h;for(;r;)this.v(r.u,s)<=0?r=r.W:(o=r,r=r.U);return o}$(r,s){let o=this.h;for(;r;){let l=this.v(r.u,s);if(l<0)o=r,r=r.W;else if(l>0)r=r.U;else return r}return o}rr(r,s){let o=this.h;for(;r;)this.v(r.u,s)<0?(o=r,r=r.W):r=r.U;return o}ue(r){for(;;){let s=r.tt;if(s===this.h)return;if(r.ee===1){r.ee=0;return}if(r===s.U){let o=s.W;if(o.ee===1)o.ee=0,s.ee=1,s===this.Y?this.Y=s.te():s.te();else if(o.W&&o.W.ee===1){o.ee=s.ee,s.ee=0,o.W.ee=0,s===this.Y?this.Y=s.te():s.te();return}else o.U&&o.U.ee===1?(o.ee=1,o.U.ee=0,o.se()):(o.ee=1,r=s)}else{let o=s.U;if(o.ee===1)o.ee=0,s.ee=1,s===this.Y?this.Y=s.se():s.se();else if(o.U&&o.U.ee===1){o.ee=s.ee,s.ee=0,o.U.ee=0,s===this.Y?this.Y=s.se():s.se();return}else o.W&&o.W.ee===1?(o.ee=1,o.W.ee=0,o.te()):(o.ee=1,r=s)}}}fe(r){if(this.i===1)return this.clear(),this.h;let s=r;for(;s.U||s.W;){if(s.W)for(s=s.W;s.U;)s=s.U;else s=s.U;[r.u,s.u]=[s.u,r.u],[r.l,s.l]=[s.l,r.l],r=s}this.h.U===s?this.h.U=s.tt:this.h.W===s&&(this.h.W=s.tt),this.ue(s);let o=s.tt;return s===o.U?o.U=void 0:o.W=void 0,this.i-=1,this.Y.ee=0,o}oe(r,s){return r===void 0?!1:this.oe(r.U,s)||s(r)?!0:this.oe(r.W,s)}he(r){for(;;){let s=r.tt;if(s.ee===0)return;let o=s.tt;if(s===o.U){let l=o.W;if(l&&l.ee===1){if(l.ee=s.ee=0,o===this.Y)return;o.ee=1,r=o;continue}else if(r===s.W){if(r.ee=0,r.U&&(r.U.tt=s),r.W&&(r.W.tt=o),s.W=r.U,o.U=r.W,r.U=s,r.W=o,o===this.Y)this.Y=r,this.h.tt=r;else{let f=o.tt;f.U===o?f.U=r:f.W=r}return r.tt=o.tt,s.tt=r,o.tt=r,o.ee=1,{parentNode:s,grandParent:o,curNode:r}}else s.ee=0,o===this.Y?this.Y=o.se():o.se(),o.ee=1}else{let l=o.U;if(l&&l.ee===1){if(l.ee=s.ee=0,o===this.Y)return;o.ee=1,r=o;continue}else if(r===s.U){if(r.ee=0,r.U&&(r.U.tt=o),r.W&&(r.W.tt=s),o.W=r.U,s.U=r.W,r.U=o,r.W=s,o===this.Y)this.Y=r,this.h.tt=r;else{let f=o.tt;f.U===o?f.U=r:f.W=r}return r.tt=o.tt,s.tt=r,o.tt=r,o.ee=1,{parentNode:s,grandParent:o,curNode:r}}else s.ee=0,o===this.Y?this.Y=o.te():o.te(),o.ee=1}return}}ne(r,s,o){if(this.Y===void 0){this.i+=1,this.Y=new this.re(r,s),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 l,f=this.h.U,p=this.v(f.u,r);if(p===0){f.l=s;return}else if(p>0)f.U=new this.re(r,s),f.U.tt=f,l=f.U,this.h.U=l;else{let g=this.h.W,m=this.v(g.u,r);if(m===0){g.l=s;return}else if(m<0)g.W=new this.re(r,s),g.W.tt=g,l=g.W,this.h.W=l;else{if(o!==void 0){let A=o.o;if(A!==this.h){let b=this.v(A.u,r);if(b===0){A.l=s;return}else if(b>0){let C=A.L(),U=this.v(C.u,r);if(U===0){C.l=s;return}else U<0&&(l=new this.re(r,s),C.W===void 0?(C.W=l,l.tt=C):(A.U=l,l.tt=A))}}}if(l===void 0)for(l=this.Y;;){let A=this.v(l.u,r);if(A>0){if(l.U===void 0){l.U=new this.re(r,s),l.U.tt=l,l=l.U;break}l=l.U}else if(A<0){if(l.W===void 0){l.W=new this.re(r,s),l.W.tt=l,l=l.W;break}l=l.W}else{l.l=s;return}}}}return this.i+=1,l}I(r,s){for(;r;){let o=this.v(r.u,s);if(o<0)r=r.W;else if(o>0)r=r.U;else return r}return r||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0}updateKeyByIterator(r,s){let o=r.o;if(o===this.h&&(0,a.throwIteratorAccessError)(),this.i===1)return o.u=s,!0;if(o===this.h.U)return this.v(o.B().u,s)>0?(o.u=s,!0):!1;if(o===this.h.W)return this.v(o.L().u,s)<0?(o.u=s,!0):!1;let l=o.L().u;if(this.v(l,s)>=0)return!1;let f=o.B().u;return this.v(f,s)<=0?!1:(o.u=s,!0)}eraseElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let s=0,o=this;return this.oe(this.Y,function(l){return r===s?(o.V(l),!0):(s+=1,!1)}),this.i}eraseElementByKey(r){if(this.i===0)return!1;let s=this.I(this.Y,r);return s===this.h?!1:(this.V(s),!0)}eraseElementByIterator(r){let s=r.o;s===this.h&&(0,a.throwIteratorAccessError)();let o=s.W===void 0;return r.iteratorType===0?o&&r.next():(!o||s.U===void 0)&&r.next(),this.V(s),r}forEach(r){let s=0;for(let o of this)r(o,s++,this)}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let s,o=0;for(let l of this){if(o===r){s=l;break}o+=1}return s}getHeight(){if(this.i===0)return 0;let r=function(s){return s?Math.max(r(s.U),r(s.W))+1:0};return r(this.Y)}},n=u;e.default=n}),ws=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=St(),t=Ct(),a=class extends i.ContainerIterator{constructor(n,r,s){super(s),this.o=n,this.h=r,this.iteratorType===0?(this.pre=function(){return this.o===this.h.U&&(0,t.throwIteratorAccessError)(),this.o=this.o.L(),this},this.next=function(){return this.o===this.h&&(0,t.throwIteratorAccessError)(),this.o=this.o.B(),this}):(this.pre=function(){return this.o===this.h.W&&(0,t.throwIteratorAccessError)(),this.o=this.o.B(),this},this.next=function(){return this.o===this.h&&(0,t.throwIteratorAccessError)(),this.o=this.o.L(),this})}get index(){let n=this.o,r=this.h.tt;if(n===this.h)return r?r.rt-1:0;let s=0;for(n.U&&(s+=n.U.rt);n!==r;){let o=n.tt;n===o.W&&(s+=1,o.U&&(s+=o.U.rt)),n=o}return s}},u=a;e.default=u}),Hu=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=u(ys()),t=u(ws()),a=Ct();function u(o){return o&&o.t?o:{default:o}}var n=class Fa extends t.default{constructor(l,f,p,g){super(l,f,g),this.container=p}get pointer(){return this.o===this.h&&(0,a.throwIteratorAccessError)(),this.o.u}copy(){return new Fa(this.o,this.h,this.container,this.iteratorType)}},r=class extends i.default{constructor(o=[],l,f){super(l,f);let p=this;o.forEach(function(g){p.insert(g)})}*K(o){o!==void 0&&(yield*this.K(o.U),yield o.u,yield*this.K(o.W))}begin(){return new n(this.h.U||this.h,this.h,this)}end(){return new n(this.h,this.h,this)}rBegin(){return new n(this.h.W||this.h,this.h,this,1)}rEnd(){return new n(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(o,l){return this.M(o,void 0,l)}find(o){let l=this.I(this.Y,o);return new n(l,this.h,this)}lowerBound(o){let l=this.X(this.Y,o);return new n(l,this.h,this)}upperBound(o){let l=this.Z(this.Y,o);return new n(l,this.h,this)}reverseLowerBound(o){let l=this.$(this.Y,o);return new n(l,this.h,this)}reverseUpperBound(o){let l=this.rr(this.Y,o);return new n(l,this.h,this)}union(o){let l=this;return o.forEach(function(f){l.insert(f)}),this.i}[Symbol.iterator](){return this.K(this.Y)}},s=r;e.default=s}),qu=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=u(ys()),t=u(ws()),a=Ct();function u(o){return o&&o.t?o:{default:o}}var n=class ja extends t.default{constructor(l,f,p,g){super(l,f,g),this.container=p}get pointer(){this.o===this.h&&(0,a.throwIteratorAccessError)();let l=this;return new Proxy([],{get(f,p){if(p==="0")return l.o.u;if(p==="1")return l.o.l},set(f,p,g){if(p!=="1")throw new TypeError("props must be 1");return l.o.l=g,!0}})}copy(){return new ja(this.o,this.h,this.container,this.iteratorType)}},r=class extends i.default{constructor(o=[],l,f){super(l,f);let p=this;o.forEach(function(g){p.setElement(g[0],g[1])})}*K(o){o!==void 0&&(yield*this.K(o.U),yield[o.u,o.l],yield*this.K(o.W))}begin(){return new n(this.h.U||this.h,this.h,this)}end(){return new n(this.h,this.h,this)}rBegin(){return new n(this.h.W||this.h,this.h,this,1)}rEnd(){return new n(this.h,this.h,this,1)}front(){if(this.i===0)return;let o=this.h.U;return[o.u,o.l]}back(){if(this.i===0)return;let o=this.h.W;return[o.u,o.l]}lowerBound(o){let l=this.X(this.Y,o);return new n(l,this.h,this)}upperBound(o){let l=this.Z(this.Y,o);return new n(l,this.h,this)}reverseLowerBound(o){let l=this.$(this.Y,o);return new n(l,this.h,this)}reverseUpperBound(o){let l=this.rr(this.Y,o);return new n(l,this.h,this)}setElement(o,l,f){return this.M(o,l,f)}find(o){let l=this.I(this.Y,o);return new n(l,this.h,this)}getElementByKey(o){return this.I(this.Y,o).l}union(o){let l=this;return o.forEach(function(f){l.setElement(f[0],f[1])}),this.i}[Symbol.iterator](){return this.K(this.Y)}},s=r;e.default=s}),vs=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=i;function i(t){let a=typeof t;return a==="object"&&t!==null||a==="function"}}),_s=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.HashContainerIterator=e.HashContainer=void 0;var i=St(),t=u(vs()),a=Ct();function u(s){return s&&s.t?s:{default:s}}var n=class extends i.ContainerIterator{constructor(s,o,l){super(l),this.o=s,this.h=o,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})}};e.HashContainerIterator=n;var r=class extends i.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(s){let{L:o,B:l}=s;o.B=l,l.L=o,s===this.p&&(this.p=l),s===this._&&(this._=o),this.i-=1}M(s,o,l){l===void 0&&(l=(0,t.default)(s));let f;if(l){let p=s[this.HASH_TAG];if(p!==void 0)return this.H[p].l=o,this.i;Object.defineProperty(s,this.HASH_TAG,{value:this.H.length,configurable:!0}),f={u:s,l:o,L:this._,B:this.h},this.H.push(f)}else{let p=this.g[s];if(p)return p.l=o,this.i;f={u:s,l:o,L:this._,B:this.h},this.g[s]=f}return this.i===0?(this.p=f,this.h.B=f):this._.B=f,this._=f,this.h.L=f,++this.i}I(s,o){if(o===void 0&&(o=(0,t.default)(s)),o){let l=s[this.HASH_TAG];return l===void 0?this.h:this.H[l]}else return this.g[s]||this.h}clear(){let s=this.HASH_TAG;this.H.forEach(function(o){delete o.u[s]}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h}eraseElementByKey(s,o){let l;if(o===void 0&&(o=(0,t.default)(s)),o){let f=s[this.HASH_TAG];if(f===void 0)return!1;delete s[this.HASH_TAG],l=this.H[f],delete this.H[f]}else{if(l=this.g[s],l===void 0)return!1;delete this.g[s]}return this.V(l),!0}eraseElementByIterator(s){let o=s.o;return o===this.h&&(0,a.throwIteratorAccessError)(),this.V(o),s.next()}eraseElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;let o=this.p;for(;s--;)o=o.B;return this.V(o),this.i}};e.HashContainer=r}),$u=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=_s(),t=Ct(),a=class Va extends i.HashContainerIterator{constructor(s,o,l,f){super(s,o,f),this.container=l}get pointer(){return this.o===this.h&&(0,t.throwIteratorAccessError)(),this.o.u}copy(){return new Va(this.o,this.h,this.container,this.iteratorType)}},u=class extends i.HashContainer{constructor(r=[]){super();let s=this;r.forEach(function(o){s.insert(o)})}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(r,s){return this.M(r,void 0,s)}getElementByPos(r){if(r<0||r>this.i-1)throw new RangeError;let s=this.p;for(;r--;)s=s.B;return s.u}find(r,s){let o=this.I(r,s);return new a(o,this.h,this)}forEach(r){let s=0,o=this.p;for(;o!==this.h;)r(o.u,s++,this),o=o.B}[Symbol.iterator](){return(function*(){let r=this.p;for(;r!==this.h;)yield r.u,r=r.B}).bind(this)()}},n=u;e.default=n}),zu=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var i=_s(),t=u(vs()),a=Ct();function u(o){return o&&o.t?o:{default:o}}var n=class Ka extends i.HashContainerIterator{constructor(l,f,p,g){super(l,f,g),this.container=p}get pointer(){this.o===this.h&&(0,a.throwIteratorAccessError)();let l=this;return new Proxy([],{get(f,p){if(p==="0")return l.o.u;if(p==="1")return l.o.l},set(f,p,g){if(p!=="1")throw new TypeError("props must be 1");return l.o.l=g,!0}})}copy(){return new Ka(this.o,this.h,this.container,this.iteratorType)}},r=class extends i.HashContainer{constructor(o=[]){super();let l=this;o.forEach(function(f){l.setElement(f[0],f[1])})}begin(){return new n(this.p,this.h,this)}end(){return new n(this.h,this.h,this)}rBegin(){return new n(this._,this.h,this,1)}rEnd(){return new n(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(o,l,f){return this.M(o,l,f)}getElementByKey(o,l){if(l===void 0&&(l=(0,t.default)(o)),l){let p=o[this.HASH_TAG];return p!==void 0?this.H[p].l:void 0}let f=this.g[o];return f?f.l:void 0}getElementByPos(o){if(o<0||o>this.i-1)throw new RangeError;let l=this.p;for(;o--;)l=l.B;return[l.u,l.l]}find(o,l){let f=this.I(o,l);return new n(f,this.h,this)}forEach(o){let l=0,f=this.p;for(;f!==this.h;)o([f.u,f.l],l++,this),f=f.B}[Symbol.iterator](){return(function*(){let o=this.p;for(;o!==this.h;)yield[o.u,o.l],o=o.B}).bind(this)()}},s=r;e.default=s}),Yu=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"t",{value:!0}),Object.defineProperty(e,"Deque",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"HashMap",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"HashSet",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"LinkList",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"OrderedMap",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"OrderedSet",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"PriorityQueue",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"Queue",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"Stack",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"Vector",{enumerable:!0,get:function(){return u.default}});var i=p(Nu()),t=p(Fu()),a=p(ju()),u=p(Vu()),n=p(Ku()),r=p(Wu()),s=p(Hu()),o=p(qu()),l=p($u()),f=p(zu());function p(g){return g&&g.t?g:{default:g}}}),Gu=Ae((e,i)=>{ae(),ue(),le();var t=Yu().OrderedSet,a=Et()("number-allocator:trace"),u=Et()("number-allocator:error");function n(s,o){this.low=s,this.high=o}n.prototype.equals=function(s){return this.low===s.low&&this.high===s.high},n.prototype.compare=function(s){return this.low<s.low&&this.high<s.low?-1:s.low<this.low&&s.high<this.low?1:0};function r(s,o){if(!(this instanceof r))return new r(s,o);this.min=s,this.max=o,this.ss=new t([],(l,f)=>l.compare(f)),a("Create"),this.clear()}r.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},r.prototype.alloc=function(){if(this.ss.size()===0)return a("alloc():empty"),null;let s=this.ss.begin(),o=s.pointer.low,l=s.pointer.high,f=o;return f+1<=l?this.ss.updateKeyByIterator(s,new n(o+1,l)):this.ss.eraseElementByPos(0),a("alloc():"+f),f},r.prototype.use=function(s){let o=new n(s,s),l=this.ss.lowerBound(o);if(!l.equals(this.ss.end())){let f=l.pointer.low,p=l.pointer.high;return l.pointer.equals(o)?(this.ss.eraseElementByIterator(l),a("use():"+s),!0):f>s?!1:f===s?(this.ss.updateKeyByIterator(l,new n(f+1,p)),a("use():"+s),!0):p===s?(this.ss.updateKeyByIterator(l,new n(f,p-1)),a("use():"+s),!0):(this.ss.updateKeyByIterator(l,new n(s+1,p)),this.ss.insert(new n(f,s-1)),a("use():"+s),!0)}return a("use():failed"),!1},r.prototype.free=function(s){if(s<this.min||s>this.max){u("free():"+s+" is out of range");return}let o=new n(s,s),l=this.ss.upperBound(o);if(l.equals(this.ss.end())){if(l.equals(this.ss.begin())){this.ss.insert(o);return}l.pre();let f=l.pointer.high;l.pointer.high+1===s?this.ss.updateKeyByIterator(l,new n(f,s)):this.ss.insert(o)}else if(l.equals(this.ss.begin()))if(s+1===l.pointer.low){let f=l.pointer.high;this.ss.updateKeyByIterator(l,new n(s,f))}else this.ss.insert(o);else{let f=l.pointer.low,p=l.pointer.high;l.pre();let g=l.pointer.low;l.pointer.high+1===s?s+1===f?(this.ss.eraseElementByIterator(l),this.ss.updateKeyByIterator(l,new n(g,p))):this.ss.updateKeyByIterator(l,new n(g,s)):s+1===f?(this.ss.eraseElementByIterator(l.next()),this.ss.insert(new n(s,p))):this.ss.insert(o)}a("free():"+s)},r.prototype.clear=function(){a("clear()"),this.ss.clear(),this.ss.insert(new n(this.min,this.max))},r.prototype.intervalCount=function(){return this.ss.size()},r.prototype.dump=function(){console.log("length:"+this.ss.size());for(let s of this.ss)console.log(s)},i.exports=r}),Es=Ae((e,i)=>{ae(),ue(),le();var t=Gu();i.exports.NumberAllocator=t}),Ju=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=Lu(),t=Es(),a=class{constructor(u){u>0&&(this.aliasToTopic=new i.LRUCache({max:u}),this.topicToAlias={},this.numberAllocator=new t.NumberAllocator(1,u),this.max=u,this.length=0)}put(u,n){if(n===0||n>this.max)return!1;let r=this.aliasToTopic.get(n);return r&&delete this.topicToAlias[r],this.aliasToTopic.set(n,u),this.topicToAlias[u]=n,this.numberAllocator.use(n),this.length=this.aliasToTopic.size,!0}getTopicByAlias(u){return this.aliasToTopic.get(u)}getAliasByTopic(u){let n=this.topicToAlias[u];return typeof n<"u"&&this.aliasToTopic.get(n),n}clear(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0}getLruAlias(){return this.numberAllocator.firstVacant()||[...this.aliasToTopic.keys()][this.aliasToTopic.size-1]}};e.default=a}),Zu=Ae(e=>{ae(),ue(),le();var i=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0});var t=Ir(),a=i(Ju()),u=rr(),n=(r,s)=>{r.log("_handleConnack");let{options:o}=r,l=o.protocolVersion===5?s.reasonCode:s.returnCode;if(clearTimeout(r.connackTimer),delete r.topicAliasSend,s.properties){if(s.properties.topicAliasMaximum){if(s.properties.topicAliasMaximum>65535){r.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}s.properties.topicAliasMaximum>0&&(r.topicAliasSend=new a.default(s.properties.topicAliasMaximum))}s.properties.serverKeepAlive&&o.keepalive&&(o.keepalive=s.properties.serverKeepAlive),s.properties.maximumPacketSize&&(o.properties||(o.properties={}),o.properties.maximumPacketSize=s.properties.maximumPacketSize)}if(l===0)r.reconnecting=!1,r._onConnect(s);else if(l>0){let f=new u.ErrorWithReasonCode(`Connection refused: ${t.ReasonCodes[l]}`,l);r.emit("error",f),r.options.reconnectOnConnackError&&r._cleanUp(!0)}};e.default=n}),Xu=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=(t,a,u)=>{t.log("handling pubrel packet");let n=typeof u<"u"?u:t.noop,{messageId:r}=a,s={cmd:"pubcomp",messageId:r};t.incomingStore.get(a,(o,l)=>{o?t._sendPacket(s,n):(t.emit("message",l.topic,l.payload,l),t.handleMessage(l,f=>{if(f)return n(f);t.incomingStore.del(l,t.noop),t._sendPacket(s,n)}))})};e.default=i}),ec=Ae(e=>{ae(),ue(),le();var i=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0});var t=i(Mu()),a=i(Du()),u=i(Zu()),n=i(Ir()),r=i(Xu()),s=(o,l,f)=>{let{options:p}=o;if(p.protocolVersion===5&&p.properties&&p.properties.maximumPacketSize&&p.properties.maximumPacketSize<l.length)return o.emit("error",new Error(`exceeding packets size ${l.cmd}`)),o.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),o;switch(o.log("_handlePacket :: emitting packetreceive"),o.emit("packetreceive",l),l.cmd){case"publish":(0,t.default)(o,l,f);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":o.reschedulePing(),(0,n.default)(o,l),f();break;case"pubrel":o.reschedulePing(),(0,r.default)(o,l,f);break;case"connack":(0,u.default)(o,l),f();break;case"auth":o.reschedulePing(),(0,a.default)(o,l),f();break;case"pingresp":o.log("_handlePacket :: received pingresp"),o.reschedulePing(!0),f();break;case"disconnect":o.emit("disconnect",l),f();break;default:o.log("_handlePacket :: unknown command"),f();break}};e.default=s}),tc=Ae(e=>{ae(),ue(),le();var i=e&&e.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(e,"__esModule",{value:!0}),e.TypedEventEmitter=void 0;var t=i((er(),Ue(Ft))),a=rr(),u=class{};e.TypedEventEmitter=u,(0,a.applyMixin)(u,t.default)}),Tr=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0}),e.isReactNativeBrowser=e.isWebWorker=void 0;var i=()=>{var n;return typeof window<"u"?typeof navigator<"u"&&((n=navigator.userAgent)===null||n===void 0?void 0:n.toLowerCase().indexOf(" electron/"))>-1&&xe!=null&&xe.versions?!Object.prototype.hasOwnProperty.call(xe.versions,"electron"):typeof window.document<"u":!1},t=()=>{var n,r;return!!(typeof self=="object"&&!((r=(n=self==null?void 0:self.constructor)===null||n===void 0?void 0:n.name)===null||r===void 0)&&r.includes("WorkerGlobalScope"))},a=()=>typeof navigator<"u"&&navigator.product==="ReactNative",u=i()||t()||a();e.isWebWorker=t(),e.isReactNativeBrowser=a(),e.default=u}),rc=Ae((e,i)=>{ae(),ue(),le(),function(t,a){typeof e=="object"&&typeof i<"u"?a(e):typeof define=="function"&&define.amd?define(["exports"],a):(t=typeof globalThis<"u"?globalThis:t||self,a(t.fastUniqueNumbers={}))}(e,function(t){var a=function(m){return function(A){var b=m(A);return A.add(b),b}},u=function(m){return function(A,b){return m.set(A,b),b}},n=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,r=536870912,s=r*2,o=function(m,A){return function(b){var C=A.get(b),U=C===void 0?b.size:C<s?C+1:0;if(!b.has(U))return m(b,U);if(b.size<r){for(;b.has(U);)U=Math.floor(Math.random()*s);return m(b,U)}if(b.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;b.has(U);)U=Math.floor(Math.random()*n);return m(b,U)}},l=new WeakMap,f=u(l),p=o(f,l),g=a(p);t.addUniqueNumber=g,t.generateUniqueNumber=p})}),nc=Ae((e,i)=>{ae(),ue(),le(),function(t,a){typeof e=="object"&&typeof i<"u"?a(e,rc()):typeof define=="function"&&define.amd?define(["exports","fast-unique-numbers"],a):(t=typeof globalThis<"u"?globalThis:t||self,a(t.workerTimersBroker={},t.fastUniqueNumbers))}(e,function(t,a){var u=function(s){return s.method!==void 0&&s.method==="call"},n=function(s){return s.error===null&&typeof s.id=="number"},r=function(s){var o=new Map([[0,function(){}]]),l=new Map([[0,function(){}]]),f=new Map,p=new Worker(s);p.addEventListener("message",function(C){var U=C.data;if(u(U)){var I=U.params,v=I.timerId,L=I.timerType;if(L==="interval"){var F=o.get(v);if(typeof F=="number"){var B=f.get(F);if(B===void 0||B.timerId!==v||B.timerType!==L)throw new Error("The timer is in an undefined state.")}else if(typeof F<"u")F();else throw new Error("The timer is in an undefined state.")}else if(L==="timeout"){var k=l.get(v);if(typeof k=="number"){var M=f.get(k);if(M===void 0||M.timerId!==v||M.timerType!==L)throw new Error("The timer is in an undefined state.")}else if(typeof k<"u")k(),l.delete(v);else throw new Error("The timer is in an undefined state.")}}else if(n(U)){var W=U.id,J=f.get(W);if(J===void 0)throw new Error("The timer is in an undefined state.");var ne=J.timerId,S=J.timerType;f.delete(W),S==="interval"?o.delete(ne):l.delete(ne)}else{var q=U.error.message;throw new Error(q)}});var g=function(C){var U=a.generateUniqueNumber(f);f.set(U,{timerId:C,timerType:"interval"}),o.set(C,U),p.postMessage({id:U,method:"clear",params:{timerId:C,timerType:"interval"}})},m=function(C){var U=a.generateUniqueNumber(f);f.set(U,{timerId:C,timerType:"timeout"}),l.set(C,U),p.postMessage({id:U,method:"clear",params:{timerId:C,timerType:"timeout"}})},A=function(C){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,I=a.generateUniqueNumber(o);return o.set(I,function(){C(),typeof o.get(I)=="function"&&p.postMessage({id:null,method:"set",params:{delay:U,now:performance.now(),timerId:I,timerType:"interval"}})}),p.postMessage({id:null,method:"set",params:{delay:U,now:performance.now(),timerId:I,timerType:"interval"}}),I},b=function(C){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,I=a.generateUniqueNumber(l);return l.set(I,C),p.postMessage({id:null,method:"set",params:{delay:U,now:performance.now(),timerId:I,timerType:"timeout"}}),I};return{clearInterval:g,clearTimeout:m,setInterval:A,setTimeout:b}};t.load=r})}),ic=Ae((e,i)=>{ae(),ue(),le(),function(t,a){typeof e=="object"&&typeof i<"u"?a(e,nc()):typeof define=="function"&&define.amd?define(["exports","worker-timers-broker"],a):(t=typeof globalThis<"u"?globalThis:t||self,a(t.workerTimers={},t.workerTimersBroker))}(e,function(t,a){var u=function(p,g){var m=null;return function(){if(m!==null)return m;var A=new Blob([g],{type:"application/javascript; charset=utf-8"}),b=URL.createObjectURL(A);return m=p(b),setTimeout(function(){return URL.revokeObjectURL(b)}),m}},n=`(()=>{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)})()})();`,r=u(a.load,n),s=function(p){return r().clearInterval(p)},o=function(p){return r().clearTimeout(p)},l=function(){var p;return(p=r()).setInterval.apply(p,arguments)},f=function(){var p;return(p=r()).setTimeout.apply(p,arguments)};t.clearInterval=s,t.clearTimeout=o,t.setInterval=l,t.setTimeout=f})}),oc=Ae(e=>{ae(),ue(),le();var i=e&&e.__createBinding||(Object.create?function(l,f,p,g){g===void 0&&(g=p);var m=Object.getOwnPropertyDescriptor(f,p);(!m||("get"in m?!f.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return f[p]}}),Object.defineProperty(l,g,m)}:function(l,f,p,g){g===void 0&&(g=p),l[g]=f[p]}),t=e&&e.__setModuleDefault||(Object.create?function(l,f){Object.defineProperty(l,"default",{enumerable:!0,value:f})}:function(l,f){l.default=f}),a=e&&e.__importStar||function(l){if(l&&l.__esModule)return l;var f={};if(l!=null)for(var p in l)p!=="default"&&Object.prototype.hasOwnProperty.call(l,p)&&i(f,l,p);return t(f,l),f};Object.defineProperty(e,"__esModule",{value:!0});var u=a(Tr()),n=ic(),r={set:n.setInterval,clear:n.clearInterval},s={set:(l,f)=>setInterval(l,f),clear:l=>clearInterval(l)},o=l=>{switch(l){case"native":return s;case"worker":return r;case"auto":default:return u.default&&!u.isWebWorker&&!u.isReactNativeBrowser?r:s}};e.default=o}),Ss=Ae(e=>{ae(),ue(),le();var i=e&&e.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0});var t=i(oc()),a=class{get keepaliveTimeoutTimestamp(){return this._keepaliveTimeoutTimestamp}get intervalEvery(){return this._intervalEvery}get keepalive(){return this._keepalive}constructor(u,n){this.destroyed=!1,this.client=u,this.timer=typeof n=="object"&&"set"in n&&"clear"in n?n:(0,t.default)(n),this.setKeepalive(u.options.keepalive)}clear(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null)}setKeepalive(u){if(u*=1e3,isNaN(u)||u<=0||u>2147483647)throw new Error(`Keepalive value must be an integer between 0 and 2147483647. Provided value is ${u}`);this._keepalive=u,this.reschedule(),this.client.log(`KeepaliveManager: set keepalive to ${u}ms`)}destroy(){this.clear(),this.destroyed=!0}reschedule(){if(this.destroyed)return;this.clear(),this.counter=0;let u=Math.ceil(this._keepalive*1.5);this._keepaliveTimeoutTimestamp=Date.now()+u,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)}};e.default=a}),bi=Ae(e=>{ae(),ue(),le();var i=e&&e.__createBinding||(Object.create?function(F,B,k,M){M===void 0&&(M=k);var W=Object.getOwnPropertyDescriptor(B,k);(!W||("get"in W?!B.__esModule:W.writable||W.configurable))&&(W={enumerable:!0,get:function(){return B[k]}}),Object.defineProperty(F,M,W)}:function(F,B,k,M){M===void 0&&(M=k),F[M]=B[k]}),t=e&&e.__setModuleDefault||(Object.create?function(F,B){Object.defineProperty(F,"default",{enumerable:!0,value:B})}:function(F,B){F.default=B}),a=e&&e.__importStar||function(F){if(F&&F.__esModule)return F;var B={};if(F!=null)for(var k in F)k!=="default"&&Object.prototype.hasOwnProperty.call(F,k)&&i(B,F,k);return t(B,F),B},u=e&&e.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};Object.defineProperty(e,"__esModule",{value:!0});var n=u(zl()),r=u(Ou()),s=u(ms()),o=Qt(),l=u(xu()),f=a(Ru()),p=u(Et()),g=u(As()),m=u(ec()),A=rr(),b=tc(),C=u(Ss()),U=a(Tr()),I=globalThis.setImmediate||((...F)=>{let B=F.shift();(0,A.nextTick)(()=>{B(...F)})}),v={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,writeCache:!0,timerVariant:"auto"},L=class ji extends b.TypedEventEmitter{static defaultId(){return`mqttjs_${Math.random().toString(16).substr(2,8)}`}constructor(B,k){super(),this.options=k||{};for(let M in v)typeof this.options[M]>"u"?this.options[M]=v[M]:this.options[M]=k[M];this.log=this.options.log||(0,p.default)("mqttjs:client"),this.noop=this._noop.bind(this),this.log("MqttClient :: version:",ji.VERSION),U.isWebWorker?this.log("MqttClient :: environment","webworker"):this.log("MqttClient :: environment",U.default?"browser":"node"),this.log("MqttClient :: options.protocol",k.protocol),this.log("MqttClient :: options.protocolVersion",k.protocolVersion),this.log("MqttClient :: options.username",k.username),this.log("MqttClient :: options.keepalive",k.keepalive),this.log("MqttClient :: options.reconnectPeriod",k.reconnectPeriod),this.log("MqttClient :: options.rejectUnauthorized",k.rejectUnauthorized),this.log("MqttClient :: options.properties.topicAliasMaximum",k.properties?k.properties.topicAliasMaximum:void 0),this.options.clientId=typeof k.clientId=="string"?k.clientId:ji.defaultId(),this.log("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=k.protocolVersion===5&&k.customHandleAcks?k.customHandleAcks:(...M)=>{M[3](null,0)},this.options.writeCache||(r.default.writeToStream.cacheNumbers=!1),this.streamBuilder=B,this.messageIdProvider=typeof this.options.messageIdProvider>"u"?new s.default:this.options.messageIdProvider,this.outgoingStore=k.outgoingStore||new g.default,this.incomingStore=k.incomingStore||new g.default,this.queueQoSZero=k.queueQoSZero===void 0?!0:k.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,k.properties&&k.properties.topicAliasMaximum>0&&(k.properties.topicAliasMaximum>65535?this.log("MqttClient :: options.properties.topicAliasMaximum is out of range"):this.topicAliasRecv=new n.default(k.properties.topicAliasMaximum)),this.on("connect",()=>{let{queue:M}=this,W=()=>{let J=M.shift();this.log("deliver :: entry %o",J);let ne=null;if(!J){this._resubscribe();return}ne=J.packet,this.log("deliver :: call _sendPacket for %o",ne);let S=!0;ne.messageId&&ne.messageId!==0&&(this.messageIdProvider.register(ne.messageId)||(S=!1)),S?this._sendPacket(ne,q=>{J.cb&&J.cb(q),W()}):(this.log("messageId: %d has already used. The message is skipped and removed.",ne.messageId),W())};this.log("connect :: sending queued packets"),W()}),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(B,k){k()}handleMessage(B,k){k()}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){var B;let k=new o.Writable,M=r.default.parser(this.options),W=null,J=[];this.log("connect :: calling method to clear reconnect"),this._clearReconnect(),this.disconnected&&!this.reconnecting&&(this.incomingStore=this.options.incomingStore||new g.default,this.outgoingStore=this.options.outgoingStore||new g.default,this.disconnecting=!1,this.disconnected=!1),this.log("connect :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),M.on("packet",Y=>{this.log("parser :: on packet push to packets array."),J.push(Y)});let ne=()=>{this.log("work :: getting next packet in queue");let Y=J.shift();if(Y)this.log("work :: packet pulled from queue"),(0,m.default)(this,Y,S);else{this.log("work :: no packets in queue");let me=W;W=null,this.log("work :: done flag is %s",!!me),me&&me()}},S=()=>{if(J.length)(0,A.nextTick)(ne);else{let Y=W;W=null,Y()}};k._write=(Y,me,se)=>{W=se,this.log("writable stream :: parsing buffer"),M.parse(Y),ne()};let q=Y=>{this.log("streamErrorHandler :: error",Y.message),Y.code?(this.log("streamErrorHandler :: emitting error"),this.emit("error",Y)):this.noop(Y)};this.log("connect :: pipe stream to writable stream"),this.stream.pipe(k),this.stream.on("error",q),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 te={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&&(te.will=Object.assign(Object.assign({},this.options.will),{payload:(B=this.options.will)===null||B===void 0?void 0:B.payload})),this.topicAliasRecv&&(te.properties||(te.properties={}),this.topicAliasRecv&&(te.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(te),M.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 Y=Object.assign({cmd:"auth",reasonCode:0},this.options.authPacket);this._writePacket(Y)}}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(B,k,M,W){this.log("publish :: message `%s` to topic `%s`",k,B);let{options:J}=this;typeof M=="function"&&(W=M,M=null),M=M||{},M=Object.assign(Object.assign({},{qos:0,retain:!1,dup:!1}),M);let{qos:ne,retain:S,dup:q,properties:te,cbStorePut:Y}=M;if(this._checkDisconnecting(W))return this;let me=()=>{let se=0;if((ne===1||ne===2)&&(se=this._nextId(),se===null))return this.log("No messageId left"),!1;let H={cmd:"publish",topic:B,payload:k,qos:ne,retain:S,messageId:se,dup:q};switch(J.protocolVersion===5&&(H.properties=te),this.log("publish :: qos",ne),ne){case 1:case 2:this.outgoing[H.messageId]={volatile:!1,cb:W||this.noop},this.log("MqttClient:publish: packet cmd: %s",H.cmd),this._sendPacket(H,void 0,Y);break;default:this.log("MqttClient:publish: packet cmd: %s",H.cmd),this._sendPacket(H,W,Y);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!me())&&this._storeProcessingQueue.push({invoke:me,cbStorePut:M.cbStorePut,callback:W}),this}publishAsync(B,k,M){return new Promise((W,J)=>{this.publish(B,k,M,(ne,S)=>{ne?J(ne):W(S)})})}subscribe(B,k,M){let W=this.options.protocolVersion;typeof k=="function"&&(M=k),M=M||this.noop;let J=!1,ne=[];typeof B=="string"?(B=[B],ne=B):Array.isArray(B)?ne=B:typeof B=="object"&&(J=B.resubscribe,delete B.resubscribe,ne=Object.keys(B));let S=f.validateTopics(ne);if(S!==null)return I(M,new Error(`Invalid topic ${S}`)),this;if(this._checkDisconnecting(M))return this.log("subscribe: discconecting true"),this;let q={qos:0};W===5&&(q.nl=!1,q.rap=!1,q.rh=0),k=Object.assign(Object.assign({},q),k);let te=k.properties,Y=[],me=(H,be)=>{if(be=be||k,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,H)||this._resubscribeTopics[H].qos<be.qos||J){let oe={topic:H,qos:be.qos};W===5&&(oe.nl=be.nl,oe.rap=be.rap,oe.rh=be.rh,oe.properties=te),this.log("subscribe: pushing topic `%s` and qos `%s` to subs list",oe.topic,oe.qos),Y.push(oe)}};if(Array.isArray(B)?B.forEach(H=>{this.log("subscribe: array topic %s",H),me(H)}):Object.keys(B).forEach(H=>{this.log("subscribe: object topic %s, %o",H,B[H]),me(H,B[H])}),!Y.length)return M(null,[]),this;let se=()=>{let H=this._nextId();if(H===null)return this.log("No messageId left"),!1;let be={cmd:"subscribe",subscriptions:Y,messageId:H};if(te&&(be.properties=te),this.options.resubscribe){this.log("subscribe :: resubscribe true");let oe=[];Y.forEach(we=>{if(this.options.reconnectPeriod>0){let w={qos:we.qos};W===5&&(w.nl=we.nl||!1,w.rap=we.rap||!1,w.rh=we.rh||0,w.properties=we.properties),this._resubscribeTopics[we.topic]=w,oe.push(we.topic)}}),this.messageIdToTopic[be.messageId]=oe}return this.outgoing[be.messageId]={volatile:!0,cb(oe,we){if(!oe){let{granted:w}=we;for(let G=0;G<w.length;G+=1)Y[G].qos=w[G]}M(oe,Y,we)}},this.log("subscribe :: call _sendPacket"),this._sendPacket(be),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!se())&&this._storeProcessingQueue.push({invoke:se,callback:M}),this}subscribeAsync(B,k){return new Promise((M,W)=>{this.subscribe(B,k,(J,ne)=>{J?W(J):M(ne)})})}unsubscribe(B,k,M){typeof B=="string"&&(B=[B]),typeof k=="function"&&(M=k),M=M||this.noop;let W=f.validateTopics(B);if(W!==null)return I(M,new Error(`Invalid topic ${W}`)),this;if(this._checkDisconnecting(M))return this;let J=()=>{let ne=this._nextId();if(ne===null)return this.log("No messageId left"),!1;let S={cmd:"unsubscribe",messageId:ne,unsubscriptions:[]};return typeof B=="string"?S.unsubscriptions=[B]:Array.isArray(B)&&(S.unsubscriptions=B),this.options.resubscribe&&S.unsubscriptions.forEach(q=>{delete this._resubscribeTopics[q]}),typeof k=="object"&&k.properties&&(S.properties=k.properties),this.outgoing[S.messageId]={volatile:!0,cb:M},this.log("unsubscribe: call _sendPacket"),this._sendPacket(S),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!J())&&this._storeProcessingQueue.push({invoke:J,callback:M}),this}unsubscribeAsync(B,k){return new Promise((M,W)=>{this.unsubscribe(B,k,(J,ne)=>{J?W(J):M(ne)})})}end(B,k,M){this.log("end :: (%s)",this.options.clientId),(B==null||typeof B!="boolean")&&(M=M||k,k=B,B=!1),typeof k!="object"&&(M=M||k,k=null),this.log("end :: cb? %s",!!M),(!M||typeof M!="function")&&(M=this.noop);let W=()=>{this.log("end :: closeStores: closing incoming and outgoing stores"),this.disconnected=!0,this.incomingStore.close(ne=>{this.outgoingStore.close(S=>{if(this.log("end :: closeStores: emitting end"),this.emit("end"),M){let q=ne||S;this.log("end :: closeStores: invoking callback with args"),M(q)}})}),this._deferredReconnect?this._deferredReconnect():(this.options.reconnectPeriod===0||this.options.manualConnect)&&(this.disconnecting=!1)},J=()=>{this.log("end :: (%s) :: finish :: calling _cleanUp with force %s",this.options.clientId,B),this._cleanUp(B,()=>{this.log("end :: finish :: calling process.nextTick on closeStores"),(0,A.nextTick)(W)},k)};return this.disconnecting?(M(),this):(this._clearReconnect(),this.disconnecting=!0,!B&&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,J,10))):(this.log("end :: (%s) :: immediately calling finish",this.options.clientId),J()),this)}endAsync(B,k){return new Promise((M,W)=>{this.end(B,k,J=>{J?W(J):M()})})}removeOutgoingMessage(B){if(this.outgoing[B]){let{cb:k}=this.outgoing[B];this._removeOutgoingAndStoreMessage(B,()=>{k(new Error("Message removed"))})}return this}reconnect(B){this.log("client reconnect");let k=()=>{B?(this.options.incomingStore=B.incomingStore,this.options.outgoingStore=B.outgoingStore):(this.options.incomingStore=null,this.options.outgoingStore=null),this.incomingStore=this.options.incomingStore||new g.default,this.outgoingStore=this.options.outgoingStore||new g.default,this.disconnecting=!1,this.disconnected=!1,this._deferredReconnect=null,this._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=k:k(),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(B=>{this.outgoing[B].volatile&&typeof this.outgoing[B].cb=="function"&&(this.outgoing[B].cb(new Error("Connection closed")),delete this.outgoing[B])}))}_flush(){this.outgoing&&(this.log("_flush: queue exists? %b",!!this.outgoing),Object.keys(this.outgoing).forEach(B=>{typeof this.outgoing[B].cb=="function"&&(this.outgoing[B].cb(new Error("Connection closed")),delete this.outgoing[B])}))}_removeTopicAliasAndRecoverTopicName(B){let k;B.properties&&(k=B.properties.topicAlias);let M=B.topic.toString();if(this.log("_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o",k,M),M.length===0){if(typeof k>"u")return new Error("Unregistered Topic Alias");if(M=this.topicAliasSend.getTopicByAlias(k),typeof M>"u")return new Error("Unregistered Topic Alias");B.topic=M}k&&delete B.properties.topicAlias}_checkDisconnecting(B){return this.disconnecting&&(B&&B!==this.noop?B(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(B,k,M={}){if(k&&(this.log("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",k)),this.log("_cleanUp :: forced? %s",B),B)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let W=Object.assign({cmd:"disconnect"},M);this.log("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(W,()=>{this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),I(()=>{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(),k&&!this.connected&&(this.log("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",k),k())}_storeAndSend(B,k,M){this.log("storeAndSend :: store packet with cmd %s to outgoingStore",B.cmd);let W=B,J;if(W.cmd==="publish"&&(W=(0,l.default)(B),J=this._removeTopicAliasAndRecoverTopicName(W),J))return k&&k(J);this.outgoingStore.put(W,ne=>{if(ne)return k&&k(ne);M(),this._writePacket(B,k)})}_applyTopicAlias(B){if(this.options.protocolVersion===5&&B.cmd==="publish"){let k;B.properties&&(k=B.properties.topicAlias);let M=B.topic.toString();if(this.topicAliasSend)if(k){if(M.length!==0&&(this.log("applyTopicAlias :: register topic: %s - alias: %d",M,k),!this.topicAliasSend.put(M,k)))return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",M,k),new Error("Sending Topic Alias out of range")}else M.length!==0&&(this.options.autoAssignTopicAlias?(k=this.topicAliasSend.getAliasByTopic(M),k?(B.topic="",B.properties=Object.assign(Object.assign({},B.properties),{topicAlias:k}),this.log("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",M,k)):(k=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(M,k),B.properties=Object.assign(Object.assign({},B.properties),{topicAlias:k}),this.log("applyTopicAlias :: auto assign topic: %s - alias: %d",M,k))):this.options.autoUseTopicAlias&&(k=this.topicAliasSend.getAliasByTopic(M),k&&(B.topic="",B.properties=Object.assign(Object.assign({},B.properties),{topicAlias:k}),this.log("applyTopicAlias :: auto use topic: %s - alias: %d",M,k))));else if(k)return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",M,k),new Error("Sending Topic Alias out of range")}}_noop(B){this.log("noop ::",B)}_writePacket(B,k){this.log("_writePacket :: packet: %O",B),this.log("_writePacket :: emitting `packetsend`"),this.emit("packetsend",B),this.log("_writePacket :: writing to stream");let M=r.default.writeToStream(B,this.stream,this.options);this.log("_writePacket :: writeToStream result %s",M),!M&&k&&k!==this.noop?(this.log("_writePacket :: handle events on `drain` once through callback."),this.stream.once("drain",k)):k&&(this.log("_writePacket :: invoking cb"),k())}_sendPacket(B,k,M,W){this.log("_sendPacket :: (%s) :: start",this.options.clientId),M=M||this.noop,k=k||this.noop;let J=this._applyTopicAlias(B);if(J){k(J);return}if(!this.connected){if(B.cmd==="auth"){this._writePacket(B,k);return}this.log("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(B,k,M);return}if(W){this._writePacket(B,k);return}switch(B.cmd){case"publish":break;case"pubrel":this._storeAndSend(B,k,M);return;default:this._writePacket(B,k);return}switch(B.qos){case 2:case 1:this._storeAndSend(B,k,M);break;case 0:default:this._writePacket(B,k);break}this.log("_sendPacket :: (%s) :: end",this.options.clientId)}_storePacket(B,k,M){this.log("_storePacket :: packet: %o",B),this.log("_storePacket :: cb? %s",!!k),M=M||this.noop;let W=B;if(W.cmd==="publish"){W=(0,l.default)(B);let ne=this._removeTopicAliasAndRecoverTopicName(W);if(ne)return k&&k(ne)}let J=W.qos||0;J===0&&this.queueQoSZero||W.cmd!=="publish"?this.queue.push({packet:W,cb:k}):J>0?(k=this.outgoing[W.messageId]?this.outgoing[W.messageId].cb:null,this.outgoingStore.put(W,ne=>{if(ne)return k&&k(ne);M()})):k&&k(new Error("No connection to broker"))}_setupKeepaliveManager(){this.log("_setupKeepaliveManager :: keepalive %d (seconds)",this.options.keepalive),!this.keepaliveManager&&this.options.keepalive&&(this.keepaliveManager=new C.default(this,this.options.timerVariant))}_destroyKeepaliveManager(){this.keepaliveManager&&(this.log("_destroyKeepaliveManager :: destroying keepalive manager"),this.keepaliveManager.destroy(),this.keepaliveManager=null)}reschedulePing(B=!1){this.keepaliveManager&&this.options.keepalive&&(B||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 B=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&B.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log("_resubscribe: protocolVersion 5");for(let k=0;k<B.length;k++){let M={};M[B[k]]=this._resubscribeTopics[B[k]],M.resubscribe=!0,this.subscribe(M,{properties:M[B[k]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1}_onConnect(B){if(this.disconnected){this.emit("connect",B);return}this.connackPacket=B,this.messageIdProvider.clear(),this._setupKeepaliveManager(),this.connected=!0;let k=()=>{let M=this.outgoingStore.createStream(),W=()=>{M.destroy(),M=null,this._flushStoreProcessingQueue(),J()},J=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={}};this.once("close",W),M.on("error",S=>{J(),this._flushStoreProcessingQueue(),this.removeListener("close",W),this.emit("error",S)});let ne=()=>{if(!M)return;let S=M.read(1),q;if(!S){M.once("readable",ne);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[S.messageId]){ne();return}!this.disconnecting&&!this.reconnectTimer?(q=this.outgoing[S.messageId]?this.outgoing[S.messageId].cb:null,this.outgoing[S.messageId]={volatile:!1,cb(te,Y){q&&q(te,Y),ne()}},this._packetIdsDuringStoreProcessing[S.messageId]=!0,this.messageIdProvider.register(S.messageId)?this._sendPacket(S,void 0,void 0,!0):this.log("messageId: %d has already used.",S.messageId)):M.destroy&&M.destroy()};M.on("end",()=>{let S=!0;for(let q in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[q]){S=!1;break}this.removeListener("close",W),S?(J(),this._invokeAllStoreProcessingQueue(),this.emit("connect",B)):k()}),ne()};k()}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let B=this._storeProcessingQueue[0];if(B&&B.invoke())return this._storeProcessingQueue.shift(),!0}return!1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let B of this._storeProcessingQueue)B.cbStorePut&&B.cbStorePut(new Error("Connection closed")),B.callback&&B.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)}_removeOutgoingAndStoreMessage(B,k){delete this.outgoing[B],this.outgoingStore.del({messageId:B},(M,W)=>{k(M,W),this.messageIdProvider.deallocate(B),this._invokeStoreProcessingQueue()})}};L.VERSION=A.MQTTJS_VERSION,e.default=L}),sc=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=Es(),t=class{constructor(){this.numberAllocator=new i.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()}};e.default=t});function Ht(e){throw new RangeError(Os[e])}function Cs(e,i){let t=e.split("@"),a="";t.length>1&&(a=t[0]+"@",e=t[1]);let u=function(n,r){let s=[],o=n.length;for(;o--;)s[o]=r(n[o]);return s}((e=e.replace(Bs,".")).split("."),i).join(".");return a+u}function Is(e){let i=[],t=0,a=e.length;for(;t<a;){let u=e.charCodeAt(t++);if(u>=55296&&u<=56319&&t<a){let n=e.charCodeAt(t++);(64512&n)==56320?i.push(((1023&u)<<10)+(1023&n)+65536):(i.push(u),t--)}else i.push(u)}return i}var Ts,ks,Bs,Os,ut,kr,yi,wi,vi,_i,Pt,ac=Ge(()=>{ae(),ue(),le(),Ts=/^xn--/,ks=/[^\0-\x7E]/,Bs=/[\x2E\u3002\uFF0E\uFF61]/g,Os={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ut=Math.floor,kr=String.fromCharCode,yi=function(e,i){return e+22+75*(e<26)-((i!=0)<<5)},wi=function(e,i,t){let a=0;for(e=t?ut(e/700):e>>1,e+=ut(e/i);e>455;a+=36)e=ut(e/35);return ut(a+36*e/(e+38))},vi=function(e){let i=[],t=e.length,a=0,u=128,n=72,r=e.lastIndexOf("-");r<0&&(r=0);for(let o=0;o<r;++o)e.charCodeAt(o)>=128&&Ht("not-basic"),i.push(e.charCodeAt(o));for(let o=r>0?r+1:0;o<t;){let l=a;for(let p=1,g=36;;g+=36){o>=t&&Ht("invalid-input");let m=(s=e.charCodeAt(o++))-48<10?s-22:s-65<26?s-65:s-97<26?s-97:36;(m>=36||m>ut((2147483647-a)/p))&&Ht("overflow"),a+=m*p;let A=g<=n?1:g>=n+26?26:g-n;if(m<A)break;let b=36-A;p>ut(2147483647/b)&&Ht("overflow"),p*=b}let f=i.length+1;n=wi(a-l,f,l==0),ut(a/f)>2147483647-u&&Ht("overflow"),u+=ut(a/f),a%=f,i.splice(a++,0,u)}var s;return String.fromCodePoint(...i)},_i=function(e){let i=[],t=(e=Is(e)).length,a=128,u=0,n=72;for(let o of e)o<128&&i.push(kr(o));let r=i.length,s=r;for(r&&i.push("-");s<t;){let o=2147483647;for(let f of e)f>=a&&f<o&&(o=f);let l=s+1;o-a>ut((2147483647-u)/l)&&Ht("overflow"),u+=(o-a)*l,a=o;for(let f of e)if(f<a&&++u>2147483647&&Ht("overflow"),f==a){let p=u;for(let g=36;;g+=36){let m=g<=n?1:g>=n+26?26:g-n;if(p<m)break;let A=p-m,b=36-m;i.push(kr(yi(m+A%b,0))),p=ut(A/b)}i.push(kr(yi(p,0))),n=wi(u,l,s==r),u=0,++s}++u,++a}return i.join("")},Pt={version:"2.1.0",ucs2:{decode:Is,encode:e=>String.fromCodePoint(...e)},decode:vi,encode:_i,toASCII:function(e){return Cs(e,function(i){return ks.test(i)?"xn--"+_i(i):i})},toUnicode:function(e){return Cs(e,function(i){return Ts.test(i)?vi(i.slice(4).toLowerCase()):i})}},Pt.decode,Pt.encode,Pt.toASCII,Pt.toUnicode,Pt.ucs2,Pt.version});function lc(e,i){return Object.prototype.hasOwnProperty.call(e,i)}var Ps,nr,xs,dt,uc=Ge(()=>{ae(),ue(),le(),Ps=function(e,i,t,a){i=i||"&",t=t||"=";var u={};if(typeof e!="string"||e.length===0)return u;var n=/\+/g;e=e.split(i);var r=1e3;a&&typeof a.maxKeys=="number"&&(r=a.maxKeys);var s=e.length;r>0&&s>r&&(s=r);for(var o=0;o<s;++o){var l,f,p,g,m=e[o].replace(n,"%20"),A=m.indexOf(t);A>=0?(l=m.substr(0,A),f=m.substr(A+1)):(l=m,f=""),p=decodeURIComponent(l),g=decodeURIComponent(f),lc(u,p)?Array.isArray(u[p])?u[p].push(g):u[p]=[u[p],g]:u[p]=g}return u},nr=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},xs=function(e,i,t,a){return i=i||"&",t=t||"=",e===null&&(e=void 0),typeof e=="object"?Object.keys(e).map(function(u){var n=encodeURIComponent(nr(u))+t;return Array.isArray(e[u])?e[u].map(function(r){return n+encodeURIComponent(nr(r))}).join(i):n+encodeURIComponent(nr(e[u]))}).join(i):a?encodeURIComponent(nr(a))+t+encodeURIComponent(nr(e)):""},dt={},dt.decode=dt.parse=Ps,dt.encode=dt.stringify=xs,dt.decode,dt.encode,dt.parse,dt.stringify});function Ei(){throw new Error("setTimeout has not been defined")}function Si(){throw new Error("clearTimeout has not been defined")}function Rs(e){if(Tt===setTimeout)return setTimeout(e,0);if((Tt===Ei||!Tt)&&setTimeout)return Tt=setTimeout,setTimeout(e,0);try{return Tt(e,0)}catch{try{return Tt.call(null,e,0)}catch{return Tt.call(this||qt,e,0)}}}function cc(){zt&&$t&&(zt=!1,$t.length?pt=$t.concat(pt):cr=-1,pt.length&&Ms())}function Ms(){if(!zt){var e=Rs(cc);zt=!0;for(var i=pt.length;i;){for($t=pt,pt=[];++cr<i;)$t&&$t[cr].run();cr=-1,i=pt.length}$t=null,zt=!1,function(t){if(kt===clearTimeout)return clearTimeout(t);if((kt===Si||!kt)&&clearTimeout)return kt=clearTimeout,clearTimeout(t);try{kt(t)}catch{try{return kt.call(null,t)}catch{return kt.call(this||qt,t)}}}(e)}}function Us(e,i){(this||qt).fun=e,(this||qt).array=i}function It(){}var Ds,Tt,kt,qt,We,$t,pt,zt,cr,je,hc=Ge(()=>{ae(),ue(),le(),qt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,We=Ds={},function(){try{Tt=typeof setTimeout=="function"?setTimeout:Ei}catch{Tt=Ei}try{kt=typeof clearTimeout=="function"?clearTimeout:Si}catch{kt=Si}}(),pt=[],zt=!1,cr=-1,We.nextTick=function(e){var i=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)i[t-1]=arguments[t];pt.push(new Us(e,i)),pt.length!==1||zt||Rs(Ms)},Us.prototype.run=function(){(this||qt).fun.apply(null,(this||qt).array)},We.title="browser",We.browser=!0,We.env={},We.argv=[],We.version="",We.versions={},We.on=It,We.addListener=It,We.once=It,We.off=It,We.removeListener=It,We.removeAllListeners=It,We.emit=It,We.prependListener=It,We.prependOnceListener=It,We.listeners=function(e){return[]},We.binding=function(e){throw new Error("process.binding is not supported")},We.cwd=function(){return"/"},We.chdir=function(e){throw new Error("process.chdir is not supported")},We.umask=function(){return 0},je=Ds,je.addListener,je.argv,je.binding,je.browser,je.chdir,je.cwd,je.emit,je.env,je.listeners,je.nextTick,je.off,je.on,je.once,je.prependListener,je.prependOnceListener,je.removeAllListeners,je.removeListener,je.title,je.umask,je.version,je.versions});function fc(){if(Ci)return Br;Ci=!0;var e=Br={},i,t;function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?i=setTimeout:i=a}catch{i=a}try{typeof clearTimeout=="function"?t=clearTimeout:t=u}catch{t=u}})();function n(b){if(i===setTimeout)return setTimeout(b,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(b,0);try{return i(b,0)}catch{try{return i.call(null,b,0)}catch{return i.call(this||Yt,b,0)}}}function r(b){if(t===clearTimeout)return clearTimeout(b);if((t===u||!t)&&clearTimeout)return t=clearTimeout,clearTimeout(b);try{return t(b)}catch{try{return t.call(null,b)}catch{return t.call(this||Yt,b)}}}var s=[],o=!1,l,f=-1;function p(){!o||!l||(o=!1,l.length?s=l.concat(s):f=-1,s.length&&g())}function g(){if(!o){var b=n(p);o=!0;for(var C=s.length;C;){for(l=s,s=[];++f<C;)l&&l[f].run();f=-1,C=s.length}l=null,o=!1,r(b)}}e.nextTick=function(b){var C=new Array(arguments.length-1);if(arguments.length>1)for(var U=1;U<arguments.length;U++)C[U-1]=arguments[U];s.push(new m(b,C)),s.length===1&&!o&&n(g)};function m(b,C){(this||Yt).fun=b,(this||Yt).array=C}m.prototype.run=function(){(this||Yt).fun.apply(null,(this||Yt).array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={};function A(){}return e.on=A,e.addListener=A,e.once=A,e.off=A,e.removeListener=A,e.removeAllListeners=A,e.emit=A,e.prependListener=A,e.prependOnceListener=A,e.listeners=function(b){return[]},e.binding=function(b){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(b){throw new Error("process.chdir is not supported")},e.umask=function(){return 0},Br}var Br,Ci,Yt,Le,Ls=Ge(()=>{ae(),ue(),le(),Br={},Ci=!1,Yt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Le=fc(),Le.platform="browser",Le.addListener,Le.argv,Le.binding,Le.browser,Le.chdir,Le.cwd,Le.emit,Le.env,Le.listeners,Le.nextTick,Le.off,Le.on,Le.once,Le.prependListener,Le.prependOnceListener,Le.removeAllListeners,Le.removeListener,Le.title,Le.umask,Le.version,Le.versions});function dc(){if(Ii)return Or;Ii=!0;var e=Le;function i(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}function t(n,r){for(var s="",o=0,l=-1,f=0,p,g=0;g<=n.length;++g){if(g<n.length)p=n.charCodeAt(g);else{if(p===47)break;p=47}if(p===47){if(!(l===g-1||f===1))if(l!==g-1&&f===2){if(s.length<2||o!==2||s.charCodeAt(s.length-1)!==46||s.charCodeAt(s.length-2)!==46){if(s.length>2){var m=s.lastIndexOf("/");if(m!==s.length-1){m===-1?(s="",o=0):(s=s.slice(0,m),o=s.length-1-s.lastIndexOf("/")),l=g,f=0;continue}}else if(s.length===2||s.length===1){s="",o=0,l=g,f=0;continue}}r&&(s.length>0?s+="/..":s="..",o=2)}else s.length>0?s+="/"+n.slice(l+1,g):s=n.slice(l+1,g),o=g-l-1;l=g,f=0}else p===46&&f!==-1?++f:f=-1}return s}function a(n,r){var s=r.dir||r.root,o=r.base||(r.name||"")+(r.ext||"");return s?s===r.root?s+o:s+n+o:o}var u={resolve:function(){for(var n="",r=!1,s,o=arguments.length-1;o>=-1&&!r;o--){var l;o>=0?l=arguments[o]:(s===void 0&&(s=e.cwd()),l=s),i(l),l.length!==0&&(n=l+"/"+n,r=l.charCodeAt(0)===47)}return n=t(n,!r),r?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(n){if(i(n),n.length===0)return".";var r=n.charCodeAt(0)===47,s=n.charCodeAt(n.length-1)===47;return n=t(n,!r),n.length===0&&!r&&(n="."),n.length>0&&s&&(n+="/"),r?"/"+n:n},isAbsolute:function(n){return i(n),n.length>0&&n.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var n,r=0;r<arguments.length;++r){var s=arguments[r];i(s),s.length>0&&(n===void 0?n=s:n+="/"+s)}return n===void 0?".":u.normalize(n)},relative:function(n,r){if(i(n),i(r),n===r||(n=u.resolve(n),r=u.resolve(r),n===r))return"";for(var s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var o=n.length,l=o-s,f=1;f<r.length&&r.charCodeAt(f)===47;++f);for(var p=r.length,g=p-f,m=l<g?l:g,A=-1,b=0;b<=m;++b){if(b===m){if(g>m){if(r.charCodeAt(f+b)===47)return r.slice(f+b+1);if(b===0)return r.slice(f+b)}else l>m&&(n.charCodeAt(s+b)===47?A=b:b===0&&(A=0));break}var C=n.charCodeAt(s+b),U=r.charCodeAt(f+b);if(C!==U)break;C===47&&(A=b)}var I="";for(b=s+A+1;b<=o;++b)(b===o||n.charCodeAt(b)===47)&&(I.length===0?I+="..":I+="/..");return I.length>0?I+r.slice(f+A):(f+=A,r.charCodeAt(f)===47&&++f,r.slice(f))},_makeLong:function(n){return n},dirname:function(n){if(i(n),n.length===0)return".";for(var r=n.charCodeAt(0),s=r===47,o=-1,l=!0,f=n.length-1;f>=1;--f)if(r=n.charCodeAt(f),r===47){if(!l){o=f;break}}else l=!1;return o===-1?s?"/":".":s&&o===1?"//":n.slice(0,o)},basename:function(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');i(n);var s=0,o=-1,l=!0,f;if(r!==void 0&&r.length>0&&r.length<=n.length){if(r.length===n.length&&r===n)return"";var p=r.length-1,g=-1;for(f=n.length-1;f>=0;--f){var m=n.charCodeAt(f);if(m===47){if(!l){s=f+1;break}}else g===-1&&(l=!1,g=f+1),p>=0&&(m===r.charCodeAt(p)?--p===-1&&(o=f):(p=-1,o=g))}return s===o?o=g:o===-1&&(o=n.length),n.slice(s,o)}else{for(f=n.length-1;f>=0;--f)if(n.charCodeAt(f)===47){if(!l){s=f+1;break}}else o===-1&&(l=!1,o=f+1);return o===-1?"":n.slice(s,o)}},extname:function(n){i(n);for(var r=-1,s=0,o=-1,l=!0,f=0,p=n.length-1;p>=0;--p){var g=n.charCodeAt(p);if(g===47){if(!l){s=p+1;break}continue}o===-1&&(l=!1,o=p+1),g===46?r===-1?r=p:f!==1&&(f=1):r!==-1&&(f=-1)}return r===-1||o===-1||f===0||f===1&&r===o-1&&r===s+1?"":n.slice(r,o)},format:function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return a("/",n)},parse:function(n){i(n);var r={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return r;var s=n.charCodeAt(0),o=s===47,l;o?(r.root="/",l=1):l=0;for(var f=-1,p=0,g=-1,m=!0,A=n.length-1,b=0;A>=l;--A){if(s=n.charCodeAt(A),s===47){if(!m){p=A+1;break}continue}g===-1&&(m=!1,g=A+1),s===46?f===-1?f=A:b!==1&&(b=1):f!==-1&&(b=-1)}return f===-1||g===-1||b===0||b===1&&f===g-1&&f===p+1?g!==-1&&(p===0&&o?r.base=r.name=n.slice(1,g):r.base=r.name=n.slice(p,g)):(p===0&&o?(r.name=n.slice(1,f),r.base=n.slice(1,g)):(r.name=n.slice(p,f),r.base=n.slice(p,g)),r.ext=n.slice(f,g)),p>0?r.dir=n.slice(0,p-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};return u.posix=u,Or=u,Or}var Or,Ii,Ti,pc=Ge(()=>{ae(),ue(),le(),Ls(),Or={},Ii=!1,Ti=dc()}),Ns={};Mt(Ns,{URL:()=>ha,Url:()=>sa,default:()=>Me,fileURLToPath:()=>Fs,format:()=>aa,parse:()=>ca,pathToFileURL:()=>js,resolve:()=>la,resolveObject:()=>ua});function st(){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 hr(e,i,t){if(e&&ct.isObject(e)&&e instanceof st)return e;var a=new st;return a.parse(e,i,t),a}function gc(){if(Pi)return Mr;Pi=!0;var e=je;function i(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}function t(n,r){for(var s="",o=0,l=-1,f=0,p,g=0;g<=n.length;++g){if(g<n.length)p=n.charCodeAt(g);else{if(p===47)break;p=47}if(p===47){if(!(l===g-1||f===1))if(l!==g-1&&f===2){if(s.length<2||o!==2||s.charCodeAt(s.length-1)!==46||s.charCodeAt(s.length-2)!==46){if(s.length>2){var m=s.lastIndexOf("/");if(m!==s.length-1){m===-1?(s="",o=0):(s=s.slice(0,m),o=s.length-1-s.lastIndexOf("/")),l=g,f=0;continue}}else if(s.length===2||s.length===1){s="",o=0,l=g,f=0;continue}}r&&(s.length>0?s+="/..":s="..",o=2)}else s.length>0?s+="/"+n.slice(l+1,g):s=n.slice(l+1,g),o=g-l-1;l=g,f=0}else p===46&&f!==-1?++f:f=-1}return s}function a(n,r){var s=r.dir||r.root,o=r.base||(r.name||"")+(r.ext||"");return s?s===r.root?s+o:s+n+o:o}var u={resolve:function(){for(var n="",r=!1,s,o=arguments.length-1;o>=-1&&!r;o--){var l;o>=0?l=arguments[o]:(s===void 0&&(s=e.cwd()),l=s),i(l),l.length!==0&&(n=l+"/"+n,r=l.charCodeAt(0)===47)}return n=t(n,!r),r?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(n){if(i(n),n.length===0)return".";var r=n.charCodeAt(0)===47,s=n.charCodeAt(n.length-1)===47;return n=t(n,!r),n.length===0&&!r&&(n="."),n.length>0&&s&&(n+="/"),r?"/"+n:n},isAbsolute:function(n){return i(n),n.length>0&&n.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var n,r=0;r<arguments.length;++r){var s=arguments[r];i(s),s.length>0&&(n===void 0?n=s:n+="/"+s)}return n===void 0?".":u.normalize(n)},relative:function(n,r){if(i(n),i(r),n===r||(n=u.resolve(n),r=u.resolve(r),n===r))return"";for(var s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var o=n.length,l=o-s,f=1;f<r.length&&r.charCodeAt(f)===47;++f);for(var p=r.length,g=p-f,m=l<g?l:g,A=-1,b=0;b<=m;++b){if(b===m){if(g>m){if(r.charCodeAt(f+b)===47)return r.slice(f+b+1);if(b===0)return r.slice(f+b)}else l>m&&(n.charCodeAt(s+b)===47?A=b:b===0&&(A=0));break}var C=n.charCodeAt(s+b),U=r.charCodeAt(f+b);if(C!==U)break;C===47&&(A=b)}var I="";for(b=s+A+1;b<=o;++b)(b===o||n.charCodeAt(b)===47)&&(I.length===0?I+="..":I+="/..");return I.length>0?I+r.slice(f+A):(f+=A,r.charCodeAt(f)===47&&++f,r.slice(f))},_makeLong:function(n){return n},dirname:function(n){if(i(n),n.length===0)return".";for(var r=n.charCodeAt(0),s=r===47,o=-1,l=!0,f=n.length-1;f>=1;--f)if(r=n.charCodeAt(f),r===47){if(!l){o=f;break}}else l=!1;return o===-1?s?"/":".":s&&o===1?"//":n.slice(0,o)},basename:function(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');i(n);var s=0,o=-1,l=!0,f;if(r!==void 0&&r.length>0&&r.length<=n.length){if(r.length===n.length&&r===n)return"";var p=r.length-1,g=-1;for(f=n.length-1;f>=0;--f){var m=n.charCodeAt(f);if(m===47){if(!l){s=f+1;break}}else g===-1&&(l=!1,g=f+1),p>=0&&(m===r.charCodeAt(p)?--p===-1&&(o=f):(p=-1,o=g))}return s===o?o=g:o===-1&&(o=n.length),n.slice(s,o)}else{for(f=n.length-1;f>=0;--f)if(n.charCodeAt(f)===47){if(!l){s=f+1;break}}else o===-1&&(l=!1,o=f+1);return o===-1?"":n.slice(s,o)}},extname:function(n){i(n);for(var r=-1,s=0,o=-1,l=!0,f=0,p=n.length-1;p>=0;--p){var g=n.charCodeAt(p);if(g===47){if(!l){s=p+1;break}continue}o===-1&&(l=!1,o=p+1),g===46?r===-1?r=p:f!==1&&(f=1):r!==-1&&(f=-1)}return r===-1||o===-1||f===0||f===1&&r===o-1&&r===s+1?"":n.slice(r,o)},format:function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return a("/",n)},parse:function(n){i(n);var r={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return r;var s=n.charCodeAt(0),o=s===47,l;o?(r.root="/",l=1):l=0;for(var f=-1,p=0,g=-1,m=!0,A=n.length-1,b=0;A>=l;--A){if(s=n.charCodeAt(A),s===47){if(!m){p=A+1;break}continue}g===-1&&(m=!1,g=A+1),s===46?f===-1?f=A:b!==1&&(b=1):f!==-1&&(b=-1)}return f===-1||g===-1||b===0||b===1&&f===g-1&&f===p+1?g!==-1&&(p===0&&o?r.base=r.name=n.slice(1,g):r.base=r.name=n.slice(p,g)):(p===0&&o?(r.name=n.slice(1,f),r.base=n.slice(1,g)):(r.name=n.slice(p,f),r.base=n.slice(p,g)),r.ext=n.slice(f,g)),p>0?r.dir=n.slice(0,p-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};return u.posix=u,Mr=u,Mr}function mc(e){if(typeof e=="string")e=new URL(e);else if(!(e instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(e.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return Ur?Ac(e):bc(e)}function Ac(e){let i=e.hostname,t=e.pathname;for(let a=0;a<t.length;a++)if(t[a]==="%"){let u=t.codePointAt(a+2)||32;if(t[a+1]==="2"&&u===102||t[a+1]==="5"&&u===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(t=t.replace(Xs,"\\"),t=decodeURIComponent(t),i!=="")return`\\\\${i}${t}`;{let a=t.codePointAt(1)|32,u=t[2];if(a<Js||a>Zs||u!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return t.slice(1)}}function bc(e){if(e.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let i=e.pathname;for(let t=0;t<i.length;t++)if(i[t]==="%"){let a=i.codePointAt(t+2)||32;if(i[t+1]==="2"&&a===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(i)}function yc(e){let i=xi.resolve(e),t=e.charCodeAt(e.length-1);(t===Gs||Ur&&t===Ys)&&i[i.length-1]!==xi.sep&&(i+="/");let a=new URL("file://");return i.includes("%")&&(i=i.replace(ea,"%25")),!Ur&&i.includes("\\")&&(i=i.replace(ta,"%5C")),i.includes(`
|
|
4
|
+
`)&&(i=i.replace(ra,"%0A")),i.includes("\r")&&(i=i.replace(na,"%0D")),i.includes(" ")&&(i=i.replace(ia,"%09")),a.pathname=i,a}function Fs(e){if(typeof e=="string")e=new URL(e);else if(!(e instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(e.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return Dr?wc(e):vc(e)}function wc(e){let i=e.hostname,t=e.pathname;for(let a=0;a<t.length;a++)if(t[a]==="%"){let u=t.codePointAt(a+2)||32;if(t[a+1]==="2"&&u===102||t[a+1]==="5"&&u===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(t=t.replace(ma,"\\"),t=decodeURIComponent(t),i!=="")return`\\\\${i}${t}`;{let a=t.codePointAt(1)|32,u=t[2];if(a<pa||a>ga||u!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return t.slice(1)}}function vc(e){if(e.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let i=e.pathname;for(let t=0;t<i.length;t++)if(i[t]==="%"){let a=i.codePointAt(t+2)||32;if(i[t+1]==="2"&&a===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(i)}function js(e){let i=Ti.resolve(e),t=e.charCodeAt(e.length-1);(t===da||Dr&&t===fa)&&i[i.length-1]!==Ti.sep&&(i+="/");let a=new URL("file://");return i.includes("%")&&(i=i.replace(Aa,"%25")),!Dr&&i.includes("\\")&&(i=i.replace(ba,"%5C")),i.includes(`
|
|
5
|
+
`)&&(i=i.replace(ya,"%0A")),i.includes("\r")&&(i=i.replace(wa,"%0D")),i.includes(" ")&&(i=i.replace(va,"%09")),a.pathname=i,a}var Me,Vs,ct,Ks,Ws,Qs,Hs,Pr,ki,Bi,Oi,qs,$s,xr,Gt,Rr,Mr,Pi,xi,zs,Ys,Gs,Js,Zs,Ur,Xs,ea,ta,ra,na,ia,oa,sa,aa,la,ua,ca,ha,fa,da,pa,ga,Dr,ma,Aa,ba,ya,wa,va,_c=Ge(()=>{ae(),ue(),le(),ac(),uc(),hc(),pc(),Ls(),Me={},Vs=Pt,ct={isString:function(e){return typeof e=="string"},isObject:function(e){return typeof e=="object"&&e!==null},isNull:function(e){return e===null},isNullOrUndefined:function(e){return e==null}},Me.parse=hr,Me.resolve=function(e,i){return hr(e,!1,!0).resolve(i)},Me.resolveObject=function(e,i){return e?hr(e,!1,!0).resolveObject(i):i},Me.format=function(e){return ct.isString(e)&&(e=hr(e)),e instanceof st?e.format():st.prototype.format.call(e)},Me.Url=st,Ks=/^([a-z0-9.+-]+:)/i,Ws=/:[0-9]*$/,Qs=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Hs=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
|
|
6
|
+
`," "]),Pr=["'"].concat(Hs),ki=["%","/","?",";","#"].concat(Pr),Bi=["/","?","#"],Oi=/^[+a-z0-9A-Z_-]{0,63}$/,qs=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,$s={javascript:!0,"javascript:":!0},xr={javascript:!0,"javascript:":!0},Gt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Rr=dt,st.prototype.parse=function(e,i,t){if(!ct.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),u=a!==-1&&a<e.indexOf("#")?"?":"#",n=e.split(u);n[0]=n[0].replace(/\\/g,"/");var r=e=n.join(u);if(r=r.trim(),!t&&e.split("#").length===1){var s=Qs.exec(r);if(s)return this.path=r,this.href=r,this.pathname=s[1],s[2]?(this.search=s[2],this.query=i?Rr.parse(this.search.substr(1)):this.search.substr(1)):i&&(this.search="",this.query={}),this}var o=Ks.exec(r);if(o){var l=(o=o[0]).toLowerCase();this.protocol=l,r=r.substr(o.length)}if(t||o||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var f=r.substr(0,2)==="//";!f||o&&xr[o]||(r=r.substr(2),this.slashes=!0)}if(!xr[o]&&(f||o&&!Gt[o])){for(var p,g,m=-1,A=0;A<Bi.length;A++)(b=r.indexOf(Bi[A]))!==-1&&(m===-1||b<m)&&(m=b);for((g=m===-1?r.lastIndexOf("@"):r.lastIndexOf("@",m))!==-1&&(p=r.slice(0,g),r=r.slice(g+1),this.auth=decodeURIComponent(p)),m=-1,A=0;A<ki.length;A++){var b;(b=r.indexOf(ki[A]))!==-1&&(m===-1||b<m)&&(m=b)}m===-1&&(m=r.length),this.host=r.slice(0,m),r=r.slice(m),this.parseHost(),this.hostname=this.hostname||"";var C=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!C)for(var U=this.hostname.split(/\./),I=(A=0,U.length);A<I;A++){var v=U[A];if(v&&!v.match(Oi)){for(var L="",F=0,B=v.length;F<B;F++)v.charCodeAt(F)>127?L+="x":L+=v[F];if(!L.match(Oi)){var k=U.slice(0,A),M=U.slice(A+1),W=v.match(qs);W&&(k.push(W[1]),M.unshift(W[2])),M.length&&(r="/"+M.join(".")+r),this.hostname=k.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=Vs.toASCII(this.hostname));var J=this.port?":"+this.port:"",ne=this.hostname||"";this.host=ne+J,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),r[0]!=="/"&&(r="/"+r))}if(!$s[l])for(A=0,I=Pr.length;A<I;A++){var S=Pr[A];if(r.indexOf(S)!==-1){var q=encodeURIComponent(S);q===S&&(q=escape(S)),r=r.split(S).join(q)}}var te=r.indexOf("#");te!==-1&&(this.hash=r.substr(te),r=r.slice(0,te));var Y=r.indexOf("?");if(Y!==-1?(this.search=r.substr(Y),this.query=r.substr(Y+1),i&&(this.query=Rr.parse(this.query)),r=r.slice(0,Y)):i&&(this.search="",this.query={}),r&&(this.pathname=r),Gt[l]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){J=this.pathname||"";var me=this.search||"";this.path=J+me}return this.href=this.format(),this},st.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var i=this.protocol||"",t=this.pathname||"",a=this.hash||"",u=!1,n="";this.host?u=e+this.host:this.hostname&&(u=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(u+=":"+this.port)),this.query&&ct.isObject(this.query)&&Object.keys(this.query).length&&(n=Rr.stringify(this.query));var r=this.search||n&&"?"+n||"";return i&&i.substr(-1)!==":"&&(i+=":"),this.slashes||(!i||Gt[i])&&u!==!1?(u="//"+(u||""),t&&t.charAt(0)!=="/"&&(t="/"+t)):u||(u=""),a&&a.charAt(0)!=="#"&&(a="#"+a),r&&r.charAt(0)!=="?"&&(r="?"+r),i+u+(t=t.replace(/[?#]/g,function(s){return encodeURIComponent(s)}))+(r=r.replace("#","%23"))+a},st.prototype.resolve=function(e){return this.resolveObject(hr(e,!1,!0)).format()},st.prototype.resolveObject=function(e){if(ct.isString(e)){var i=new st;i.parse(e,!1,!0),e=i}for(var t=new st,a=Object.keys(this),u=0;u<a.length;u++){var n=a[u];t[n]=this[n]}if(t.hash=e.hash,e.href==="")return t.href=t.format(),t;if(e.slashes&&!e.protocol){for(var r=Object.keys(e),s=0;s<r.length;s++){var o=r[s];o!=="protocol"&&(t[o]=e[o])}return Gt[t.protocol]&&t.hostname&&!t.pathname&&(t.path=t.pathname="/"),t.href=t.format(),t}if(e.protocol&&e.protocol!==t.protocol){if(!Gt[e.protocol]){for(var l=Object.keys(e),f=0;f<l.length;f++){var p=l[f];t[p]=e[p]}return t.href=t.format(),t}if(t.protocol=e.protocol,e.host||xr[e.protocol])t.pathname=e.pathname;else{for(var g=(e.pathname||"").split("/");g.length&&!(e.host=g.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),g[0]!==""&&g.unshift(""),g.length<2&&g.unshift(""),t.pathname=g.join("/")}if(t.search=e.search,t.query=e.query,t.host=e.host||"",t.auth=e.auth,t.hostname=e.hostname||e.host,t.port=e.port,t.pathname||t.search){var m=t.pathname||"",A=t.search||"";t.path=m+A}return t.slashes=t.slashes||e.slashes,t.href=t.format(),t}var b=t.pathname&&t.pathname.charAt(0)==="/",C=e.host||e.pathname&&e.pathname.charAt(0)==="/",U=C||b||t.host&&e.pathname,I=U,v=t.pathname&&t.pathname.split("/")||[],L=(g=e.pathname&&e.pathname.split("/")||[],t.protocol&&!Gt[t.protocol]);if(L&&(t.hostname="",t.port=null,t.host&&(v[0]===""?v[0]=t.host:v.unshift(t.host)),t.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(g[0]===""?g[0]=e.host:g.unshift(e.host)),e.host=null),U=U&&(g[0]===""||v[0]==="")),C)t.host=e.host||e.host===""?e.host:t.host,t.hostname=e.hostname||e.hostname===""?e.hostname:t.hostname,t.search=e.search,t.query=e.query,v=g;else if(g.length)v||(v=[]),v.pop(),v=v.concat(g),t.search=e.search,t.query=e.query;else if(!ct.isNullOrUndefined(e.search))return L&&(t.hostname=t.host=v.shift(),(W=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@"))&&(t.auth=W.shift(),t.host=t.hostname=W.shift())),t.search=e.search,t.query=e.query,ct.isNull(t.pathname)&&ct.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t;if(!v.length)return t.pathname=null,t.search?t.path="/"+t.search:t.path=null,t.href=t.format(),t;for(var F=v.slice(-1)[0],B=(t.host||e.host||v.length>1)&&(F==="."||F==="..")||F==="",k=0,M=v.length;M>=0;M--)(F=v[M])==="."?v.splice(M,1):F===".."?(v.splice(M,1),k++):k&&(v.splice(M,1),k--);if(!U&&!I)for(;k--;k)v.unshift("..");!U||v[0]===""||v[0]&&v[0].charAt(0)==="/"||v.unshift(""),B&&v.join("/").substr(-1)!=="/"&&v.push("");var W,J=v[0]===""||v[0]&&v[0].charAt(0)==="/";return L&&(t.hostname=t.host=J?"":v.length?v.shift():"",(W=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@"))&&(t.auth=W.shift(),t.host=t.hostname=W.shift())),(U=U||t.host&&v.length)&&!J&&v.unshift(""),v.length?t.pathname=v.join("/"):(t.pathname=null,t.path=null),ct.isNull(t.pathname)&&ct.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=e.auth||t.auth,t.slashes=t.slashes||e.slashes,t.href=t.format(),t},st.prototype.parseHost=function(){var e=this.host,i=Ws.exec(e);i&&((i=i[0])!==":"&&(this.port=i.substr(1)),e=e.substr(0,e.length-i.length)),e&&(this.hostname=e)},Me.Url,Me.format,Me.resolve,Me.resolveObject,Mr={},Pi=!1,xi=gc(),zs=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,Me.URL=typeof URL<"u"?URL:null,Me.pathToFileURL=yc,Me.fileURLToPath=mc,Me.Url,Me.format,Me.resolve,Me.resolveObject,Me.URL,Ys=92,Gs=47,Js=97,Zs=122,Ur=zs==="win32",Xs=/\//g,ea=/%/g,ta=/\\/g,ra=/\n/g,na=/\r/g,ia=/\t/g,oa=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,Me.URL=typeof URL<"u"?URL:null,Me.pathToFileURL=js,Me.fileURLToPath=Fs,sa=Me.Url,aa=Me.format,la=Me.resolve,ua=Me.resolveObject,ca=Me.parse,ha=Me.URL,fa=92,da=47,pa=97,ga=122,Dr=oa==="win32",ma=/\//g,Aa=/%/g,ba=/\\/g,ya=/\n/g,wa=/\r/g,va=/\t/g}),Ec=Ae((e,i)=>{ae(),ue(),le(),i.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}),Ri=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0}),e.BufferedDuplex=e.writev=void 0;var i=Qt(),t=(Ze(),Ue(Je));function a(n,r){let s=new Array(n.length);for(let o=0;o<n.length;o++)typeof n[o].chunk=="string"?s[o]=t.Buffer.from(n[o].chunk,"utf8"):s[o]=n[o].chunk;this._write(t.Buffer.concat(s),"binary",r)}e.writev=a;var u=class extends i.Duplex{constructor(n,r,s){super({objectMode:!0}),this.proxy=r,this.socket=s,this.writeQueue=[],n.objectMode||(this._writev=a.bind(this)),this.isSocketOpen=!1,this.proxy.on("data",o=>{this.destroyed||this.push(o)})}_read(n){this.proxy.read(n)}_write(n,r,s){this.isSocketOpen?this.writeToProxy(n,r,s):this.writeQueue.push({chunk:n,encoding:r,cb:s})}_final(n){this.writeQueue=[],this.proxy.end(n)}_destroy(n,r){this.writeQueue=[],this.proxy.destroy(),r(n)}socketReady(){this.emit("connect"),this.isSocketOpen=!0,this.processWriteQueue()}writeToProxy(n,r,s){this.proxy.write(n,r)===!1?this.proxy.once("drain",s):s()}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:n,encoding:r,cb:s}=this.writeQueue.shift();this.writeToProxy(n,r,s)}}};e.BufferedDuplex=u}),Lr=Ae(e=>{ae(),ue(),le();var i=e&&e.__importDefault||function(U){return U&&U.__esModule?U:{default:U}};Object.defineProperty(e,"__esModule",{value:!0}),e.streamBuilder=e.browserStreamBuilder=void 0;var t=(Ze(),Ue(Je)),a=i(Ec()),u=i(Et()),n=Qt(),r=i(Tr()),s=Ri(),o=(0,u.default)("mqttjs:ws"),l=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];function f(U,I){let v=`${U.protocol}://${U.hostname}:${U.port}${U.path}`;return typeof U.transformWsUrl=="function"&&(v=U.transformWsUrl(v,U,I)),v}function p(U){let I=U;return U.port||(U.protocol==="wss"?I.port=443:I.port=80),U.path||(I.path="/"),U.wsOptions||(I.wsOptions={}),!r.default&&!U.forceNativeWebSocket&&U.protocol==="wss"&&l.forEach(v=>{Object.prototype.hasOwnProperty.call(U,v)&&!Object.prototype.hasOwnProperty.call(U.wsOptions,v)&&(I.wsOptions[v]=U[v])}),I}function g(U){let I=p(U);if(I.hostname||(I.hostname=I.host),!I.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let v=new URL(document.URL);I.hostname=v.hostname,I.port||(I.port=Number(v.port))}return I.objectMode===void 0&&(I.objectMode=!(I.binary===!0||I.binary===void 0)),I}function m(U,I,v){o("createWebSocket"),o(`protocol: ${v.protocolId} ${v.protocolVersion}`);let L=v.protocolId==="MQIsdp"&&v.protocolVersion===3?"mqttv3.1":"mqtt";o(`creating new Websocket for url: ${I} and protocol: ${L}`);let F;return v.createWebsocket?F=v.createWebsocket(I,[L],v):F=new a.default(I,[L],v.wsOptions),F}function A(U,I){let v=I.protocolId==="MQIsdp"&&I.protocolVersion===3?"mqttv3.1":"mqtt",L=f(I,U),F;return I.createWebsocket?F=I.createWebsocket(L,[v],I):F=new WebSocket(L,[v]),F.binaryType="arraybuffer",F}var b=(U,I)=>{o("streamBuilder");let v=p(I);v.hostname=v.hostname||v.host||"localhost";let L=f(v,U),F=m(U,L,v),B=a.default.createWebSocketStream(F,v.wsOptions);return B.url=L,F.on("close",()=>{B.destroy()}),B};e.streamBuilder=b;var C=(U,I)=>{o("browserStreamBuilder");let v,L=g(I).browserBufferSize||1024*512,F=I.browserBufferTimeout||1e3,B=!I.objectMode,k=A(U,I),M=J(I,Y,me);I.objectMode||(M._writev=s.writev.bind(M)),M.on("close",()=>{k.close()});let W=typeof k.addEventListener<"u";k.readyState===k.OPEN?(v=M,v.socket=k):(v=new s.BufferedDuplex(I,M,k),W?k.addEventListener("open",ne):k.onopen=ne),W?(k.addEventListener("close",S),k.addEventListener("error",q),k.addEventListener("message",te)):(k.onclose=S,k.onerror=q,k.onmessage=te);function J(se,H,be){let oe=new n.Transform({objectMode:se.objectMode});return oe._write=H,oe._flush=be,oe}function ne(){o("WebSocket onOpen"),v instanceof s.BufferedDuplex&&v.socketReady()}function S(se){o("WebSocket onClose",se),v.end(),v.destroy()}function q(se){o("WebSocket onError",se);let H=new Error("WebSocket error");H.event=se,v.destroy(H)}async function te(se){let{data:H}=se;H instanceof ArrayBuffer?H=t.Buffer.from(H):H instanceof Blob?H=t.Buffer.from(await new Response(H).arrayBuffer()):H=t.Buffer.from(H,"utf8"),M&&!M.destroyed&&M.push(H)}function Y(se,H,be){if(k.bufferedAmount>L){setTimeout(Y,F,se,H,be);return}B&&typeof se=="string"&&(se=t.Buffer.from(se,"utf8"));try{k.send(se)}catch(oe){return be(oe)}be()}function me(se){k.close(),se()}return v};e.browserStreamBuilder=C}),Mi={};Mt(Mi,{Server:()=>Ne,Socket:()=>Ne,Stream:()=>Ne,_createServerHandle:()=>Ne,_normalizeArgs:()=>Ne,_setSimultaneousAccepts:()=>Ne,connect:()=>Ne,createConnection:()=>Ne,createServer:()=>Ne,default:()=>_a,isIP:()=>Ne,isIPv4:()=>Ne,isIPv6:()=>Ne});function Ne(){throw new Error("Node.js net module is not supported by JSPM core outside of Node.js")}var _a,Ea=Ge(()=>{ae(),ue(),le(),_a={_createServerHandle:Ne,_normalizeArgs:Ne,_setSimultaneousAccepts:Ne,connect:Ne,createConnection:Ne,createServer:Ne,isIP:Ne,isIPv4:Ne,isIPv6:Ne,Server:Ne,Socket:Ne,Stream:Ne}}),Sa=Ae(e=>{ae(),ue(),le();var i=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0});var t=i((Ea(),Ue(Mi))),a=i(Et()),u=(0,a.default)("mqttjs:tcp"),n=(r,s)=>{s.port=s.port||1883,s.hostname=s.hostname||s.host||"localhost";let{port:o,path:l}=s,f=s.hostname;return u("port %d and host %s",o,f),t.default.createConnection({port:o,host:f,path:l})};e.default=n}),Ca={};Mt(Ca,{default:()=>Ia});var Ia,Sc=Ge(()=>{ae(),ue(),le(),Ia={}}),Ta=Ae(e=>{ae(),ue(),le();var i=e&&e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0});var t=i((Sc(),Ue(Ca))),a=i((Ea(),Ue(Mi))),u=i(Et()),n=(0,u.default)("mqttjs:tls"),r=(s,o)=>{o.port=o.port||8883,o.host=o.hostname||o.host||"localhost",a.default.isIP(o.host)===0&&(o.servername=o.host),o.rejectUnauthorized=o.rejectUnauthorized!==!1,delete o.path,n("port %d host %s rejectUnauthorized %b",o.port,o.host,o.rejectUnauthorized);let l=t.default.connect(o);l.on("secureConnect",()=>{o.rejectUnauthorized&&!l.authorized?l.emit("error",new Error("TLS not authorized")):l.removeListener("error",f)});function f(p){o.rejectUnauthorized&&s.emit("error",p),l.end()}return l.on("error",f),l};e.default=r}),ka=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=(Ze(),Ue(Je)),t=Qt(),a=Ri(),u,n,r;function s(){let g=new t.Transform;return g._write=(m,A,b)=>{u.send({data:m.buffer,success(){b()},fail(C){b(new Error(C))}})},g._flush=m=>{u.close({success(){m()}})},g}function o(g){g.hostname||(g.hostname="localhost"),g.path||(g.path="/"),g.wsOptions||(g.wsOptions={})}function l(g,m){let A=g.protocol==="wxs"?"wss":"ws",b=`${A}://${g.hostname}${g.path}`;return g.port&&g.port!==80&&g.port!==443&&(b=`${A}://${g.hostname}:${g.port}${g.path}`),typeof g.transformWsUrl=="function"&&(b=g.transformWsUrl(b,g,m)),b}function f(){u.onOpen(()=>{r.socketReady()}),u.onMessage(g=>{let{data:m}=g;m instanceof ArrayBuffer?m=i.Buffer.from(m):m=i.Buffer.from(m,"utf8"),n.push(m)}),u.onClose(()=>{r.emit("close"),r.end(),r.destroy()}),u.onError(g=>{let m=new Error(g.errMsg);r.destroy(m)})}var p=(g,m)=>{if(m.hostname=m.hostname||m.host,!m.hostname)throw new Error("Could not determine host. Specify host manually.");let A=m.protocolId==="MQIsdp"&&m.protocolVersion===3?"mqttv3.1":"mqtt";o(m);let b=l(m,g);u=wx.connectSocket({url:b,protocols:[A]}),n=s(),r=new a.BufferedDuplex(m,n,u),r._destroy=(U,I)=>{u.close({success(){I&&I(U)}})};let C=r.destroy;return r.destroy=(U,I)=>(r.destroy=C,setTimeout(()=>{u.close({fail(){r._destroy(U,I)}})},0),r),f(),r};e.default=p}),Ba=Ae(e=>{ae(),ue(),le(),Object.defineProperty(e,"__esModule",{value:!0});var i=(Ze(),Ue(Je)),t=Qt(),a=Ri(),u,n,r,s=!1;function o(){let m=new t.Transform;return m._write=(A,b,C)=>{u.sendSocketMessage({data:A.buffer,success(){C()},fail(){C(new Error)}})},m._flush=A=>{u.closeSocket({success(){A()}})},m}function l(m){m.hostname||(m.hostname="localhost"),m.path||(m.path="/"),m.wsOptions||(m.wsOptions={})}function f(m,A){let b=m.protocol==="alis"?"wss":"ws",C=`${b}://${m.hostname}${m.path}`;return m.port&&m.port!==80&&m.port!==443&&(C=`${b}://${m.hostname}:${m.port}${m.path}`),typeof m.transformWsUrl=="function"&&(C=m.transformWsUrl(C,m,A)),C}function p(){s||(s=!0,u.onSocketOpen(()=>{r.socketReady()}),u.onSocketMessage(m=>{if(typeof m.data=="string"){let A=i.Buffer.from(m.data,"base64");n.push(A)}else{let A=new FileReader;A.addEventListener("load",()=>{let b=A.result;b instanceof ArrayBuffer?b=i.Buffer.from(b):b=i.Buffer.from(b,"utf8"),n.push(b)}),A.readAsArrayBuffer(m.data)}}),u.onSocketClose(()=>{r.end(),r.destroy()}),u.onSocketError(m=>{r.destroy(m)}))}var g=(m,A)=>{if(A.hostname=A.hostname||A.host,!A.hostname)throw new Error("Could not determine host. Specify host manually.");let b=A.protocolId==="MQIsdp"&&A.protocolVersion===3?"mqttv3.1":"mqtt";l(A);let C=f(A,m);return u=A.my,u.connectSocket({url:C,protocols:b}),n=o(),r=new a.BufferedDuplex(A,n,u),p(),r};e.default=g}),Cc=Ae(e=>{ae(),ue(),le();var i=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.connectAsync=void 0;var t=i(Et()),a=i((_c(),Ue(Ns))),u=i(bi()),n=i(Tr());typeof(xe==null?void 0:xe.nextTick)!="function"&&(xe.nextTick=setImmediate);var r=(0,t.default)("mqttjs"),s=null;function o(p){let g;p.auth&&(g=p.auth.match(/^(.+):(.+)$/),g?(p.username=g[1],p.password=g[2]):p.username=p.auth)}function l(p,g){var m,A,b,C;if(r("connecting to an MQTT broker..."),typeof p=="object"&&!g&&(g=p,p=""),g=g||{},p&&typeof p=="string"){let v=a.default.parse(p,!0),L={};if(v.port!=null&&(L.port=Number(v.port)),L.host=v.hostname,L.query=v.query,L.auth=v.auth,L.protocol=v.protocol,L.path=v.path,L.protocol=(m=L.protocol)===null||m===void 0?void 0:m.replace(/:$/,""),g=Object.assign(Object.assign({},L),g),!g.protocol)throw new Error("Missing protocol")}if(g.unixSocket=g.unixSocket||((A=g.protocol)===null||A===void 0?void 0:A.includes("+unix")),g.unixSocket?g.protocol=g.protocol.replace("+unix",""):!(!((b=g.protocol)===null||b===void 0)&&b.startsWith("ws"))&&!(!((C=g.protocol)===null||C===void 0)&&C.startsWith("wx"))&&delete g.path,o(g),g.query&&typeof g.query.clientId=="string"&&(g.clientId=g.query.clientId),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(s||(s={},!n.default&&!g.forceNativeWebSocket?(s.ws=Lr().streamBuilder,s.wss=Lr().streamBuilder,s.mqtt=Sa().default,s.tcp=Sa().default,s.ssl=Ta().default,s.tls=s.ssl,s.mqtts=Ta().default):(s.ws=Lr().browserStreamBuilder,s.wss=Lr().browserStreamBuilder,s.wx=ka().default,s.wxs=ka().default,s.ali=Ba().default,s.alis=Ba().default)),!s[g.protocol]){let v=["mqtts","wss"].indexOf(g.protocol)!==-1;g.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((L,F)=>v&&F%2===0?!1:typeof s[L]=="function")[0]}if(g.clean===!1&&!g.clientId)throw new Error("Missing clientId for unclean clients");g.protocol&&(g.defaultProtocol=g.protocol);function U(v){return g.servers&&((!v._reconnectCount||v._reconnectCount===g.servers.length)&&(v._reconnectCount=0),g.host=g.servers[v._reconnectCount].host,g.port=g.servers[v._reconnectCount].port,g.protocol=g.servers[v._reconnectCount].protocol?g.servers[v._reconnectCount].protocol:g.defaultProtocol,g.hostname=g.host,v._reconnectCount++),r("calling streambuilder for",g.protocol),s[g.protocol](v,g)}let I=new u.default(U,g);return I.on("error",()=>{}),I}function f(p,g,m=!0){return new Promise((A,b)=>{let C=l(p,g),U={connect:v=>{I(),A(C)},end:()=>{I(),A(C)},error:v=>{I(),C.end(),b(v)}};m===!1&&(U.close=()=>{U.error(new Error("Couldn't connect to server"))});function I(){Object.keys(U).forEach(v=>{C.off(v,U[v])})}Object.keys(U).forEach(v=>{C.on(v,U[v])})})}e.connectAsync=f,e.default=l}),Oa=Ae(e=>{ae(),ue(),le();var i=e&&e.__createBinding||(Object.create?function(m,A,b,C){C===void 0&&(C=b);var U=Object.getOwnPropertyDescriptor(A,b);(!U||("get"in U?!A.__esModule:U.writable||U.configurable))&&(U={enumerable:!0,get:function(){return A[b]}}),Object.defineProperty(m,C,U)}:function(m,A,b,C){C===void 0&&(C=b),m[C]=A[b]}),t=e&&e.__setModuleDefault||(Object.create?function(m,A){Object.defineProperty(m,"default",{enumerable:!0,value:A})}:function(m,A){m.default=A}),a=e&&e.__importStar||function(m){if(m&&m.__esModule)return m;var A={};if(m!=null)for(var b in m)b!=="default"&&Object.prototype.hasOwnProperty.call(m,b)&&i(A,m,b);return t(A,m),A},u=e&&e.__exportStar||function(m,A){for(var b in m)b!=="default"&&!Object.prototype.hasOwnProperty.call(A,b)&&i(A,m,b)},n=e&&e.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonCodes=e.KeepaliveManager=e.UniqueMessageIdProvider=e.DefaultMessageIdProvider=e.Store=e.MqttClient=e.connectAsync=e.connect=e.Client=void 0;var r=n(bi());e.MqttClient=r.default;var s=n(ms());e.DefaultMessageIdProvider=s.default;var o=n(sc());e.UniqueMessageIdProvider=o.default;var l=n(As());e.Store=l.default;var f=a(Cc());e.connect=f.default,Object.defineProperty(e,"connectAsync",{enumerable:!0,get:function(){return f.connectAsync}});var p=n(Ss());e.KeepaliveManager=p.default,e.Client=r.default,u(bi(),e),u(rr(),e);var g=Ir();Object.defineProperty(e,"ReasonCodes",{enumerable:!0,get:function(){return g.ReasonCodes}})}),Ic=Ae(e=>{ae(),ue(),le();var i=e&&e.__createBinding||(Object.create?function(r,s,o,l){l===void 0&&(l=o);var f=Object.getOwnPropertyDescriptor(s,o);(!f||("get"in f?!s.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(r,l,f)}:function(r,s,o,l){l===void 0&&(l=o),r[l]=s[o]}),t=e&&e.__setModuleDefault||(Object.create?function(r,s){Object.defineProperty(r,"default",{enumerable:!0,value:s})}:function(r,s){r.default=s}),a=e&&e.__importStar||function(r){if(r&&r.__esModule)return r;var s={};if(r!=null)for(var o in r)o!=="default"&&Object.prototype.hasOwnProperty.call(r,o)&&i(s,r,o);return t(s,r),s},u=e&&e.__exportStar||function(r,s){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&i(s,r,o)};Object.defineProperty(e,"__esModule",{value:!0});var n=a(Oa());e.default=n,u(Oa(),e)});const Tc=Ic();/*! Bundled license information:
|
|
7
7
|
|
|
8
8
|
@jspm/core/nodelibs/browser/buffer.js:
|
|
9
9
|
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
10
|
-
*/const
|
|
10
|
+
*/const kc=async e=>{if(e.host&&e.port&&!await Bc(e.host,e.port))return;const i=_.ref(),t=_.ref({});return _.onMounted(()=>{i.value=Tc.connect(e),e.topics||(e.topics=["#"]);for(const a of e.topics)i.value.subscribe(a,u=>{if(u)throw u});i.value.on("message",(a,u)=>{t.value[a]||(t.value[a]=[]),t.value[a].push(u.toString())})}),_.onUnmounted(()=>{var a;(a=i.value)==null||a.end()}),{messages:t}},Bc=async(e,i)=>{try{const t=new AbortController,a=setTimeout(()=>t.abort(),2e3);try{return await fetch(`${e}:${i}`,{mode:"no-cors",signal:t.signal}),clearTimeout(a),!0}catch(u){if(clearTimeout(a),u instanceof DOMException&&u.name==="AbortError")return!1;const n=String(u);return!(n.includes("NetworkError")||n.includes("Failed to fetch")||n.includes("net::ERR_CONNECTION_REFUSED"))}}catch{return!1}};function Oc(e){e.component("ActionFooter",Vi),e.component("BeamArrow",Ki),e.component("BeamBtn",Wi),e.component("BeamDayDivider",Kr),e.component("BeamFilter",Qi),e.component("BeamFilterOption",Hi),e.component("BeamHeading",qi),e.component("BeamMetadata",$i),e.component("BeamModal",zi),e.component("BeamModalOutlet",Yi),e.component("BeamProgress",Gi),e.component("Confirm",Ji),e.component("FixedTop",Zi),e.component("ItemCheck",Wr),e.component("ItemCount",Qr),e.component("ListAnchor",eo),e.component("ListItem",dr),e.component("ListView",to),e.component("Navbar",ro),e.component("ScanInput",oo),e.component("SegmentedDisplay",so),e.component("SplitColumn",ao),e.component("ToggleArrow",lo)}_e.ActionFooter=Vi,_e.BeamArrow=Ki,_e.BeamBtn=Wi,_e.BeamDayDivider=Kr,_e.BeamFilter=Qi,_e.BeamFilterOption=Hi,_e.BeamHeading=qi,_e.BeamMetadata=$i,_e.BeamModal=zi,_e.BeamModalOutlet=Yi,_e.BeamProgress=Gi,_e.Confirm=Ji,_e.FixedTop=Zi,_e.ItemCheck=Wr,_e.ItemCount=Qr,_e.ListAnchor=eo,_e.ListItem=dr,_e.ListView=to,_e.Navbar=ro,_e.ScanInput=oo,_e.SegmentedDisplay=so,_e.SplitColumn=ao,_e.ToggleArrow=lo,_e.install=Oc,_e.useMqttStream=kc,Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"})});
|
|
11
11
|
//# sourceMappingURL=beam.umd.cjs.map
|