// ==UserScript== // @name 115不大助手 (full) // @namespace com.cloud115.enhancer // @version 0.5.57 // @author 生瓜太保 // @description Make 115 taerg again! // @license MIT // @homepage https://greasyfork.org/zh-CN/scripts/474231-115不大助手?locale_override=1 // @supportURL https://greasyfork.org/zh-CN/scripts/474231-115不大助手?locale_override=1 // @match https://*.115.com/* // @match https://115.com/* // @connect * // @grant GM_addStyle // @grant GM_deleteValue // @grant GM_getValue // @grant GM_openInTab // @grant GM_registerMenuCommand // @grant GM_setClipboard // @grant GM_setValue // @grant GM_xmlhttpRequest // @grant unsafeWindow // @run-at document-body // @downloadURL none // ==/UserScript== (o=>{const e=document.createElement("style");e.dataset.source="vite-plugin-monkey",e.innerText=o,document.head.appendChild(e)})(`@charset "UTF-8";.pure-button{display:inline-block;line-height:normal;white-space:nowrap;vertical-align:middle;text-align:center;cursor:pointer;-webkit-user-drag:none;-webkit-user-select:none;user-select:none;box-sizing:border-box}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button-group{letter-spacing:-.31em;text-rendering:optimizespeed}.opera-only :-o-prefocus,.pure-button-group{word-spacing:-.43em}.pure-button-group .pure-button{letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-button{font-family:inherit;font-size:100%;padding:.5em 1em;color:#000c;border:none transparent;background-color:#e6e6e6;text-decoration:none;border-radius:2px}.pure-button-hover,.pure-button:focus,.pure-button:hover{background-image:linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1))}.pure-button:focus{outline:0}.pure-button-active,.pure-button:active{box-shadow:0 0 0 1px #00000026 inset,0 0 6px #0003 inset;border-color:#000}.pure-button-disabled,.pure-button-disabled:active,.pure-button-disabled:focus,.pure-button-disabled:hover,.pure-button[disabled]{border:none;background-image:none;opacity:.4;cursor:not-allowed;box-shadow:none;pointer-events:none}.pure-button-hidden{display:none}.pure-button-primary,.pure-button-selected,a.pure-button-primary,a.pure-button-selected{background-color:#0078e7;color:#fff}.pure-button-group .pure-button{margin:0;border-radius:0;border-right:1px solid rgba(0,0,0,.2)}.pure-button-group .pure-button:first-child{border-top-left-radius:2px;border-bottom-left-radius:2px}.pure-button-group .pure-button:last-child{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:none}.pure-table{border-collapse:collapse;border-spacing:0;empty-cells:show;border:1px solid #cbcbcb}.pure-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.pure-table td,.pure-table th{border-left:1px solid #cbcbcb;border-width:0 0 0 1px;font-size:inherit;margin:0;overflow:visible;padding:.5em 1em}.pure-table thead{background-color:#e0e0e0;color:#000;text-align:left;vertical-align:bottom}.pure-table td{background-color:transparent}.pure-table-odd td{background-color:#f2f2f2}.pure-table-striped tr:nth-child(2n-1) td{background-color:#f2f2f2}.pure-table-bordered td{border-bottom:1px solid #cbcbcb}.pure-table-bordered tbody>tr:last-child>td{border-bottom-width:0}.pure-table-horizontal td,.pure-table-horizontal th{border-width:0 0 1px 0;border-bottom:1px solid #cbcbcb}.pure-table-horizontal tbody>tr:last-child>td{border-bottom-width:0}/*! Pure v3.0.0 Copyright 2013 Yahoo! Licensed under the BSD License. https://github.com/pure-css/pure/blob/master/LICENSE */.pure-form input[type=color],.pure-form input[type=date],.pure-form input[type=datetime-local],.pure-form input[type=datetime],.pure-form input[type=email],.pure-form input[type=month],.pure-form input[type=number],.pure-form input[type=password],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=text],.pure-form input[type=time],.pure-form input[type=url],.pure-form input[type=week],.pure-form select,.pure-form textarea{padding:.5em .6em;display:inline-block;border:1px solid #ccc;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;vertical-align:middle;box-sizing:border-box}.pure-form input:not([type]){padding:.5em .6em;display:inline-block;border:1px solid #ccc;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;box-sizing:border-box}.pure-form input[type=color]{padding:.2em .5em}.pure-form input[type=color]:focus,.pure-form input[type=date]:focus,.pure-form input[type=datetime-local]:focus,.pure-form input[type=datetime]:focus,.pure-form input[type=email]:focus,.pure-form input[type=month]:focus,.pure-form input[type=number]:focus,.pure-form input[type=password]:focus,.pure-form input[type=search]:focus,.pure-form input[type=tel]:focus,.pure-form input[type=text]:focus,.pure-form input[type=time]:focus,.pure-form input[type=url]:focus,.pure-form input[type=week]:focus,.pure-form select:focus,.pure-form textarea:focus{outline:0;border-color:#129fea}.pure-form input:not([type]):focus{outline:0;border-color:#129fea}.pure-form input[type=checkbox]:focus,.pure-form input[type=file]:focus,.pure-form input[type=radio]:focus{outline:thin solid #129FEA;outline:1px auto #129FEA}.pure-form .pure-checkbox,.pure-form .pure-radio{margin:.5em 0;display:block}.pure-form input[type=color][disabled],.pure-form input[type=date][disabled],.pure-form input[type=datetime-local][disabled],.pure-form input[type=datetime][disabled],.pure-form input[type=email][disabled],.pure-form input[type=month][disabled],.pure-form input[type=number][disabled],.pure-form input[type=password][disabled],.pure-form input[type=search][disabled],.pure-form input[type=tel][disabled],.pure-form input[type=text][disabled],.pure-form input[type=time][disabled],.pure-form input[type=url][disabled],.pure-form input[type=week][disabled],.pure-form select[disabled],.pure-form textarea[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input:not([type])[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input[readonly],.pure-form select[readonly],.pure-form textarea[readonly]{background-color:#eee;color:#777;border-color:#ccc}.pure-form input:focus:invalid,.pure-form select:focus:invalid,.pure-form textarea:focus:invalid{color:#b94a48;border-color:#e9322d}.pure-form input[type=checkbox]:focus:invalid:focus,.pure-form input[type=file]:focus:invalid:focus,.pure-form input[type=radio]:focus:invalid:focus{outline-color:#e9322d}.pure-form select{height:2.25em;border:1px solid #ccc;background-color:#fff}.pure-form select[multiple]{height:auto}.pure-form label{margin:.5em 0 .2em}.pure-form fieldset{margin:0;padding:.35em 0 .75em;border:0}.pure-form legend{display:block;width:100%;padding:.3em 0;margin-bottom:.3em;color:#333;border-bottom:1px solid #e5e5e5}.pure-form-stacked input[type=color],.pure-form-stacked input[type=date],.pure-form-stacked input[type=datetime-local],.pure-form-stacked input[type=datetime],.pure-form-stacked input[type=email],.pure-form-stacked input[type=file],.pure-form-stacked input[type=month],.pure-form-stacked input[type=number],.pure-form-stacked input[type=password],.pure-form-stacked input[type=search],.pure-form-stacked input[type=tel],.pure-form-stacked input[type=text],.pure-form-stacked input[type=time],.pure-form-stacked input[type=url],.pure-form-stacked input[type=week],.pure-form-stacked label,.pure-form-stacked select,.pure-form-stacked textarea{display:block;margin:.25em 0}.pure-form-stacked input:not([type]){display:block;margin:.25em 0}.pure-form-aligned input,.pure-form-aligned select,.pure-form-aligned textarea,.pure-form-message-inline{display:inline-block;vertical-align:middle}.pure-form-aligned textarea{vertical-align:top}.pure-form-aligned .pure-control-group{margin-bottom:.5em}.pure-form-aligned .pure-control-group label{text-align:right;display:inline-block;vertical-align:middle;width:10em;margin:0 1em 0 0}.pure-form-aligned .pure-controls{margin:1.5em 0 0 11em}.pure-form .pure-input-rounded,.pure-form input.pure-input-rounded{border-radius:2em;padding:.5em 1em}.pure-form .pure-group fieldset{margin-bottom:10px}.pure-form .pure-group input,.pure-form .pure-group textarea{display:block;padding:10px;margin:0 0 -1px;border-radius:0;position:relative;top:-1px}.pure-form .pure-group input:focus,.pure-form .pure-group textarea:focus{z-index:3}.pure-form .pure-group input:first-child,.pure-form .pure-group textarea:first-child{top:1px;border-radius:4px 4px 0 0;margin:0}.pure-form .pure-group input:first-child:last-child,.pure-form .pure-group textarea:first-child:last-child{top:1px;border-radius:4px;margin:0}.pure-form .pure-group input:last-child,.pure-form .pure-group textarea:last-child{top:-2px;border-radius:0 0 4px 4px;margin:0}.pure-form .pure-group button{margin:.35em 0}.pure-form .pure-input-1{width:100%}.pure-form .pure-input-3-4{width:75%}.pure-form .pure-input-2-3{width:66%}.pure-form .pure-input-1-2{width:50%}.pure-form .pure-input-1-3{width:33%}.pure-form .pure-input-1-4{width:25%}.pure-form-message-inline{display:inline-block;padding-left:.3em;color:#666;vertical-align:middle;font-size:.875em}.pure-form-message{display:block;color:#666;font-size:.875em}@media only screen and (max-width :480px){.pure-form button[type=submit]{margin:.7em 0 0}.pure-form input:not([type]),.pure-form input[type=color],.pure-form input[type=date],.pure-form input[type=datetime-local],.pure-form input[type=datetime],.pure-form input[type=email],.pure-form input[type=month],.pure-form input[type=number],.pure-form input[type=password],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=text],.pure-form input[type=time],.pure-form input[type=url],.pure-form input[type=week],.pure-form label{margin-bottom:.3em;display:block}.pure-group input:not([type]),.pure-group input[type=color],.pure-group input[type=date],.pure-group input[type=datetime-local],.pure-group input[type=datetime],.pure-group input[type=email],.pure-group input[type=month],.pure-group input[type=number],.pure-group input[type=password],.pure-group input[type=search],.pure-group input[type=tel],.pure-group input[type=text],.pure-group input[type=time],.pure-group input[type=url],.pure-group input[type=week]{margin-bottom:0}.pure-form-aligned .pure-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.pure-form-aligned .pure-controls{margin:1.5em 0 0}.pure-form-message,.pure-form-message-inline{display:block;font-size:.75em;padding:.2em 0 .8em}}.resize-observer[data-v-b329ee4c]{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;border:none;background-color:transparent;pointer-events:none;display:block;overflow:hidden;opacity:0}.resize-observer[data-v-b329ee4c] object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}.v-popper__popper{z-index:10000;top:0;left:0;outline:none}.v-popper__popper.v-popper__popper--hidden{visibility:hidden;opacity:0;transition:opacity .15s,visibility .15s;pointer-events:none}.v-popper__popper.v-popper__popper--shown{visibility:visible;opacity:1;transition:opacity .15s}.v-popper__popper.v-popper__popper--skip-transition,.v-popper__popper.v-popper__popper--skip-transition>.v-popper__wrapper{transition:none!important}.v-popper__backdrop{position:absolute;top:0;left:0;width:100%;height:100%;display:none}.v-popper__inner{position:relative;box-sizing:border-box;overflow-y:auto}.v-popper__inner>div{position:relative;z-index:1;max-width:inherit;max-height:inherit}.v-popper__arrow-container{position:absolute;width:10px;height:10px}.v-popper__popper--arrow-overflow .v-popper__arrow-container,.v-popper__popper--no-positioning .v-popper__arrow-container{display:none}.v-popper__arrow-inner,.v-popper__arrow-outer{border-style:solid;position:absolute;top:0;left:0;width:0;height:0}.v-popper__arrow-inner{visibility:hidden;border-width:7px}.v-popper__arrow-outer{border-width:6px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner{left:-2px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-outer,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{left:-1px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-outer{border-bottom-width:0;border-left-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner{top:-2px}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-container{top:0}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{border-top-width:0;border-left-color:transparent!important;border-right-color:transparent!important;border-top-color:transparent!important}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner{top:-4px}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{top:-6px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner{top:-2px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-outer,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{top:-1px}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{border-left-width:0;border-left-color:transparent!important;border-top-color:transparent!important;border-bottom-color:transparent!important}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner{left:-4px}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{left:-6px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-container{right:-10px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-outer{border-right-width:0;border-top-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner{left:-2px}.v-popper--theme-dropdown .v-popper__inner{background:#fff;color:#000;border-radius:6px;border:1px solid #ddd;box-shadow:0 6px 30px #0000001a}.v-popper--theme-dropdown .v-popper__arrow-inner{visibility:visible;border-color:#fff}.v-popper--theme-dropdown .v-popper__arrow-outer{border-color:#ddd}.v-popper--theme-tooltip .v-popper__inner{background:rgba(0,0,0,.8);color:#fff;border-radius:6px;padding:7px 12px 6px}.v-popper--theme-tooltip .v-popper__arrow-outer{border-color:#000c}.tabs-component .tabs-component-tabs{border:solid 1px #ddd;border-radius:6px;margin-bottom:5px}@media (min-width: 700px){.tabs-component .tabs-component-tabs{border:0;align-items:stretch;display:flex;justify-content:flex-start;margin-bottom:1px}}.tabs-component .tabs-component-tabs .tabs-component-tab{color:#999;font-size:14px;font-weight:600;margin-right:0;list-style:none;border-bottom:dotted 1px #ddd}.tabs-component .tabs-component-tabs .tabs-component-tab:hover{color:#666}.tabs-component .tabs-component-tabs .tabs-component-tab.is-disabled *{color:#cdcdcd;cursor:not-allowed!important}.tabs-component .tabs-component-tabs .tabs-component-tab.is-active{color:#000}.tabs-component .tabs-component-tabs .tabs-component-tab .tabs-component-tab-a{align-items:center;color:inherit;display:flex;padding:.75em 1em;text-decoration:none}@media (min-width: 700px){.tabs-component .tabs-component-tabs .tabs-component-tab{background-color:#fff;border:solid 1px #ddd;border-radius:3px 3px 0 0;margin-right:.5em;transform:translateY(2px);transition:transform .3s ease}.tabs-component .tabs-component-tabs .tabs-component-tab.is-active{border-bottom:solid 1px #fff;z-index:2;transform:translateY(2px)}}.tabs-component .tabs-component-panels{padding:1em 0}@media (min-width: 700px){.tabs-component .tabs-component-panels{background-color:#fff;border:solid 1px #ddd;border-radius:0 6px 6px;box-shadow:0 0 10px #0000000d;padding:1em 2em}}.tabs-component .tabs-component-btn{cursor:pointer;background:#e1ecf4;border-radius:3px;border:1px solid #7aa7c7;padding:4px 8px;color:#39739d}.tabs-component .tabs-component-btn:hover{background-color:#b3d3ea;color:#2c5777}.tabs-component .tabs-component-btn:active{background-color:#a0c7e4;box-shadow:none;color:#2c5777}.ce-tips{background:#eee;border-radius:4px;padding:4px;font-size:12px;color:#595959;margin-bottom:10px}.ce-hr{border:0;height:1px;background-image:linear-gradient(to right,rgba(0,0,0,0),#ccc,rgba(0,0,0,0))}.ce-config input[type=checkbox]{width:18px;height:18px;cursor:pointer}div[class^=fp-].hidden-watermark{display:none!important}.ce-custom-url-help{position:fixed;top:0;left:0;z-index:10000;width:430px;height:100%;background:#fff;font-size:12px}.ce-custom-url-help .ce-custom-url-help-body{height:80%;overflow-y:auto;padding:20px 20px 300px}.ce-custom-url-help h1 a{float:right;color:#1e87f0;font-size:14px}.ce-custom-url-help h1 a:hover{color:#1e87f0;text-decoration:underline}.ce-custom-url-help table{width:100%;margin-bottom:20px}.ce-custom-url-help .ce-variable{cursor:pointer;color:#1e87f0;font-size:14px}.ce-custom-url-help .ce-variable:hover{color:#093d71}.ce-menu:not(.sub-item){background:#fffcea}.ce-menu img.ce-menu-icon{float:left;width:12px;height:12px;margin-right:4px}.ce-menu.list-item-hover-menu i.ce-menu-icon.icon-operate{scale:.75}.ce-menu.list-item-hover-menu.ce-menu-parent{position:relative;float:left;cursor:pointer}.ce-menu.list-item-hover-menu.ce-menu-parent:after{content:"";position:absolute;top:50%;right:0;width:1px;height:14px;margin-top:-7px;background:rgba(39,119,248,.8);pointer-events:none}.ce-menu.list-item-hover-menu.ce-menu-parent .ce-menu-trigger{padding:0 12px;color:#2777f8}.ce-menu.list-item-hover-menu.ce-menu-parent .ce-menu-trigger:before{content:"\\2228";margin-right:4px;font-size:12px}.ce-menu.list-item-hover-menu.ce-menu-parent .ce-menu-dropdown{position:absolute;background:#fff;box-shadow:0 1px 5px #2777f866;z-index:99999999;left:0;padding:4px;border-radius:4px;display:none;text-align:center;width:160px}.ce-menu.list-item-hover-menu.ce-menu-parent .ce-menu-dropdown.ce-menu-dropdown-active{display:block}.ce-menu.list-item-hover-menu.ce-menu-parent .ce-menu-dropdown .list-item-hover-menu-sub{margin:2px 0;background:#eee;color:#2877f8;width:100%;border-radius:4px;padding:6px 12px;line-height:12px;box-sizing:border-box}.ce-menu.list-item-hover-menu.ce-menu-parent .ce-menu-dropdown .list-item-hover-menu-sub:hover{background-color:#f3e882}.ce-menu.list-item-hover-menu.ce-menu-parent .ce-menu-dropdown .list-item-hover-menu-sub:after{display:none}.ce-menu.selection-menu.ce-menu-parent{position:relative;float:left;cursor:pointer}.ce-menu.selection-menu.ce-menu-parent:after{content:"";position:absolute;top:50%;right:0;width:1px;height:14px;margin-top:-7px;background:rgba(39,119,248,.8);pointer-events:none}.ce-menu.selection-menu.ce-menu-parent .ce-menu-trigger{color:#2777f8}.ce-menu.selection-menu.ce-menu-parent .ce-menu-trigger:before{content:"\\2228";margin-right:4px;font-size:12px}.ce-menu.selection-menu.ce-menu-parent.ce-menu-dropdown-opened .ce-menu-trigger{color:#fff}.ce-menu.selection-menu.ce-menu-parent .ce-menu-dropdown{position:absolute;background:#fff;box-shadow:0 1px 5px #2777f866;z-index:99999999;top:30px;left:0;width:160px;padding:4px;border-radius:4px;display:none;text-align:left}.ce-menu.selection-menu.ce-menu-parent .ce-menu-dropdown.ce-menu-dropdown-active{display:block}.ce-menu.selection-menu.ce-menu-parent .ce-menu-dropdown .selection-menu-sub{color:#2877f8;width:60px;border-radius:4px;text-align:left;display:block;width:100%;box-sizing:border-box;padding-left:4px;padding-right:4px;font-size:12px;background:transparent;cursor:pointer}.ce-menu.selection-menu.ce-menu-parent .ce-menu-dropdown .selection-menu-sub span{font-weight:400;float:inherit}.ce-menu.selection-menu.ce-menu-parent .ce-menu-dropdown .selection-menu-sub .ce-menu-icon{float:unset}.ce-menu.selection-menu.ce-menu-parent .ce-menu-dropdown .selection-menu-sub:hover{background-color:#f3e882}.ce-menu.dir-context-menu>a img.ce-menu-icon{float:none;width:18px;height:18px;position:absolute;top:50%;left:14px;margin-top:-10px}.ce-menu.dir-context-menu.ce-menu-parent{position:relative;cursor:pointer;padding:6px 0}.ce-menu.dir-context-menu.ce-menu-parent:after{content:">";position:absolute;opacity:.5;right:10px;pointer-events:none}.ce-menu.dir-context-menu.ce-menu-parent .ce-menu-trigger{margin-left:43px;color:#2777f8}.ce-menu.dir-context-menu.ce-menu-parent.ce-menu-dropdown-opened{background:#f3e882}.ce-menu.dir-context-menu.ce-menu-parent.ce-menu-dropdown-opened .ce-menu-trigger{color:#1c0ccf}.ce-menu.dir-context-menu.ce-menu-parent.ce-menu-dropdown-opened:after{opacity:0}.ce-menu.dir-context-menu.ce-menu-parent .ce-menu-dropdown{position:absolute;background:#fff;box-shadow:0 1px 5px #2777f866;z-index:99999999;top:0;left:100%;width:160px;padding:4px;border-radius:4px;display:none;text-align:left}.ce-menu.dir-context-menu.ce-menu-parent .ce-menu-dropdown.ce-menu-dropdown-active{display:block}.ce-menu.dir-context-menu.ce-menu-parent .ce-menu-dropdown .dir-context-menu-sub{color:#2877f8;width:60px;border-radius:4px;text-align:left;display:block;width:100%;box-sizing:border-box;padding:4px 8px;font-size:12px;background:transparent;cursor:pointer}.ce-menu.dir-context-menu.ce-menu-parent .ce-menu-dropdown .dir-context-menu-sub span{font-weight:400;float:inherit}.ce-menu.dir-context-menu.ce-menu-parent .ce-menu-dropdown .dir-context-menu-sub:hover{background-color:#f3e882}.ce-menu.dir-context-menu.ce-menu-parent .ce-menu-icon{width:18px;height:18px;margin-right:8px}.ce-menu.list-item-context-menu.ce-menu-parent{position:relative;cursor:pointer;padding:6px 0}.ce-menu.list-item-context-menu.ce-menu-parent:after{content:">";position:absolute;opacity:.5;right:10px;pointer-events:none}.ce-menu.list-item-context-menu.ce-menu-parent .ce-menu-trigger{margin-left:43px;color:#2777f8}.ce-menu.list-item-context-menu.ce-menu-parent.ce-menu-dropdown-opened{background:#f3e882}.ce-menu.list-item-context-menu.ce-menu-parent.ce-menu-dropdown-opened .ce-menu-trigger{color:#1c0ccf}.ce-menu.list-item-context-menu.ce-menu-parent.ce-menu-dropdown-opened:after{opacity:0}.ce-menu.list-item-context-menu.ce-menu-parent .ce-menu-dropdown{position:absolute;background:#fff;box-shadow:0 1px 5px #2777f866;z-index:99999999;top:0;left:100%;width:160px;padding:4px;border-radius:4px;display:none;text-align:left}.ce-menu.list-item-context-menu.ce-menu-parent .ce-menu-dropdown.ce-menu-dropdown-active{display:block}.ce-menu.list-item-context-menu.ce-menu-parent .ce-menu-dropdown .list-item-context-menu-sub{color:#2877f8;width:60px;border-radius:4px;text-align:left;display:block;width:100%;box-sizing:border-box;padding:4px 8px;font-size:12px;background:transparent;cursor:pointer}.ce-menu.list-item-context-menu.ce-menu-parent .ce-menu-dropdown .list-item-context-menu-sub span{font-weight:400;float:inherit}.ce-menu.list-item-context-menu.ce-menu-parent .ce-menu-dropdown .list-item-context-menu-sub:hover{background-color:#f3e882}.context-menu.menu-upward{max-height:400px!important;overflow:unset!important}.ce-menu-divider{height:1px!important;display:block!important;background-color:#edeeef!important}.ce-menu-divider:after{display:none!important}.list-item-hover-menu .ce-menu-divider{height:6px!important;background-color:transparent!important}div#js_operate_box.only-icon li[menu] span{display:none}.list-contents{padding-bottom:300px}.header-size a.ce-size-sort{cursor:pointer;background:#f2f4f8;border-radius:4px;padding:0 6px;color:#8c97a0;margin-left:10px}.header-size a.ce-size-sort i{display:none}.header-size a.ce-size-sort.by-desc{background-color:#fdc94a;color:#1a2734}.header-size a.ce-size-sort.by-desc i.icon-sort-desc{display:inline-block}.header-size a.ce-size-sort.by-asc{background-color:#fdc94a;color:#1a2734}.header-size a.ce-size-sort.by-asc i.icon-sort-asc{display:inline-block}.header-size a.ce-size-sort.ce-size-sort-ing{cursor:no-drop}.ce-offline-config{max-height:70vh;overflow-y:auto}.ce-offline-config .ce-tips{margin-top:20px;margin-left:56px}.ce-offline-config .pure-form-message{margin-left:56px}.ce-offline-exporter{position:absolute;left:140px;top:62px;background:#f4f2ff;padding:6px 10px;border-radius:4px}.ce-offline-exporter button{margin-right:6px}.offline-exporter-config-form{width:550px;padding:10px}.swal2-input#swalDeleteFile{width:20px;padding:0;height:20px;margin:0;vertical-align:sub;cursor:pointer}body.ce-list-s #js-main{padding-top:40px}body.ce-list-s .ce-offline-exporter{top:92px}.ce-offline-searcher{position:absolute;left:140px;top:58px;background:#f4f2ff;padding:4px 10px;border-radius:4px}.ce-offline-searcher.loading form{opacity:.5;pointer-events:none;cursor:wait}.ce-offline-searcher fieldset{padding:0}.ce-offline-searcher .clearable-wrap{position:relative;width:320px}.ce-offline-searcher .clearable-wrap.is-empty .btn-clear{display:none}.ce-offline-searcher .clearable-wrap input{width:300px;padding-right:35px!important}.ce-offline-searcher .clearable-wrap .btn-clear{position:absolute;right:30px;top:4px;display:block}.ce-offline-searcher .form-item{display:inline-block;margin-right:10px;vertical-align:middle}.ce-offline-searcher .form-item input{padding:.3em}.ce-offline-searcher .form-item select{height:2em;padding:.1em .3em}.ce-offline-searcher .form-item label{margin-right:5px}.ce-offline-searcher .help-trigger{font-size:12px}.ce-offline-searcher .list{display:none}.ce-offline-searcher .stop-on-found{width:16px;height:16px;vertical-align:middle;cursor:pointer}.ce-offline-searcher .search-tips{position:fixed;top:146px;bottom:30px;left:0;width:100%;background:#fff;z-index:9999}.ce-offline-searcher .search-tips .tips-body{padding:20px;position:absolute;top:70px;left:50%;transform:translate(-50%,-50%);background:#f4f2ff;width:80%;border-radius:6px}.cloud115-page-offline.ce-list-m .list-contents .file-name-wrap .desc-tips{left:75px}.cloud115-page-offline.ce-list-m li.ce-task-trouble .info-hash{left:210px!important}.cloud115-page-offline li .ce-buttons{float:left;margin-right:6px}.cloud115-page-offline .ce-checkbox{width:30px}.cloud115-page-offline .ce-checkbox input{display:block!important;width:20px;height:20px;cursor:pointer}.cloud115-page-offline #js-warp .info-hash{position:absolute;left:47px;top:25px;color:#ababab;cursor:pointer}.cloud115-page-offline #js-warp .info-hash.hover{color:#6ab2ff}.cloud115-page-offline #js-warp li.ce-selected:before{background:#ffe296!important}.cloud115-page-offline #js-warp li.ce-show-checkbox .info-hash{left:60px}.cloud115-page-offline #js-warp li.ce-show-checkbox .file-name{margin-left:15px}.cloud115-page-offline #js-warp li.ce-show-checkbox .file-type{left:25px!important}.cloud115-page-offline #js-warp li .ce-checkbox{width:30px;position:absolute;left:0}.cloud115-page-offline #js-warp li .ce-checkbox input{display:block!important;width:20px;height:20px;cursor:pointer}.cloud115-page-offline #js-warp li .desc-tips{position:absolute;left:60px;top:25px}.cloud115-eh-cleaner-trigger .btn-open{padding:0 6px;vertical-align:text-top;line-height:30px;border-radius:4px;background:#4faa4f}.v-popper.v-popper--theme-dropdown{display:inline-block}.group-manager{width:750px}.group-manager a{font-size:12px;padding:0 4px;margin-right:8px}.group-manager .group-label{color:#fff;font-size:12px;margin-right:10px;border-radius:4px;padding:2px 8px;background:#66acf9}.group-manager .label-readonly{background:#c93c3c;color:#fff;padding:0 4px;border-radius:4px;vertical-align:middle;margin-right:6px}.append-form{background:#fff;width:350px;padding:10px;border-radius:4px}.append-form input,.append-form textarea{width:100%}.group-form{background:#fff;width:540px;padding:10px;border-radius:4px}.group-form input,.group-form textarea{width:100%}.group-form .filter-label{cursor:pointer;padding:0 4px;text-decoration:underline}.group-form input#groupLabel{display:inline-block}.groups-list{background:#fff;width:565px;padding:10px;border-radius:4px;box-shadow:0 0 4px #d8d8d8}.groups-list table th,.groups-list table td{padding:4px 6px}.groups-list ul li{border-bottom:1px solid #eee;padding:4px}.groups-list ul li:nth-last-child(1){border-bottom:none}.groups-list span{display:inline-block}.groups-list .p-index{width:30px}.groups-list .p-label{width:120px}.groups-list .p-actions button{margin-right:8px}.group-confirm-delete{padding:20px}#cloud115Cleaner{margin-left:10px}.v-popper__arrow-container{display:none}.cloud115-eh-cleaner .btn-open{padding:0 6px;vertical-align:text-top;line-height:30px;border-radius:4px;background:#4faa4f;display:none}.cloud115-eh-cleaner .actions-bar{padding-bottom:10px}.cloud115-eh-cleaner .actions-bar .title{font-size:18px;font-weight:700;color:#15110c}.cloud115-eh-cleaner .actions-bar .close{margin-left:20px;margin-right:10px;color:#f40}.cloud115-eh-cleaner .actions-bar i.tp-folder{width:18px;height:18px;vertical-align:sub}.cloud115-eh-cleaner-help{position:fixed;top:60px;right:0;bottom:0;width:470px;z-index:1051;padding:10px 10px 150px 8px;background:#fdffdf;overflow-y:auto}.cloud115-eh-cleaner-help ul{list-style:decimal}.cloud115-eh-cleaner-drawer{position:fixed;top:60px;right:0;bottom:0;left:260px;background:#fff;z-index:1050;padding:10px 20px 200px;overflow-y:auto;box-shadow:-2px 2px 6px #bbb}.cloud115-eh-cleaner-drawer.loading{cursor:wait}.cloud115-eh-cleaner-drawer.loading button,.cloud115-eh-cleaner-drawer.loading input{cursor:no-drop;pointer-events:none}.cloud115-eh-cleaner-drawer .config-toggle{display:inline-block;background:#eee;border-radius:4px;opacity:.2;padding:2px 4px;cursor:pointer}.cloud115-eh-cleaner-drawer .config-toggle.hover{opacity:.7}.cloud115-eh-cleaner-drawer .by-box .by-header{padding-bottom:10px}.cloud115-eh-cleaner-drawer .by-box .by-header .title{font-size:16px;margin-right:8px;color:#0078e6;font-weight:400}.cloud115-eh-cleaner-drawer .by-box .by-header .filter-size{width:100px;font-size:14px;font-weight:700;color:#0078e6;text-indent:6px}.cloud115-eh-cleaner-drawer .by-box .pure-button-group{display:inline-block}.cloud115-eh-cleaner-drawer .by-box .pure-button-group .pure-button{vertical-align:inherit}.cloud115-eh-cleaner-drawer .by-box .pattern-groups{width:750px;text-align:right}.cloud115-eh-cleaner-drawer .by-box .pattern-groups a{font-size:12px;padding:0 4px;margin-right:8px}.cloud115-eh-cleaner-drawer .by-box table tr.active{background:#f7ffc3}.cloud115-eh-cleaner-drawer .by-box table tr.is-dir .pattern{color:#f40}.cloud115-eh-cleaner-drawer .by-box table tr th,.cloud115-eh-cleaner-drawer .by-box table tr td{padding:.5em;font-size:12px}.cloud115-eh-cleaner-drawer .by-box table td a{color:#2877f8}.cloud115-eh-cleaner-drawer .by-box table td .tp-folder{width:16px;height:16px;vertical-align:sub}.button-xsmall,.button-mini{font-size:12px;padding:.2em .5em}.button-small{font-size:85%}.button-large{font-size:110%}.button-xlarge{font-size:125%}.button-success,.button-error,.button-warning,.button-secondary{color:#fff;border-radius:4px;text-shadow:0 1px 1px rgba(0,0,0,.2)}.button-success{background:rgb(28,184,65)}.button-error{background:rgb(202,60,60)}.button-warning{background:rgb(223,117,20)}.button-secondary{background:rgb(66,184,221)}.pure-form select{height:2.5em;font-size:12px}.ce-basic-config .pure-form-message{margin-left:82px}.ce-basic-config .avatar-preview{display:inline-block;vertical-align:middle;margin-left:10px}.ce-basic-config .pure-control-group input.input-small{padding:2px 4px;width:auto}.ce-clouddrive-config-item{margin-bottom:20px;border:1px solid #cbcbcb;border-radius:0;padding:4px}.ce-clouddrive-config-item.active{background:#fefcea}.ce-clouddrive-config-item input:not([type]){font-size:12px}.ce-clouddrive-config-item .button-error{float:right}.ce-clouddrive-config .cd-tips a{text-decoration:underline}.ce-clouddrive-config .cd-code{font-size:110%;cursor:pointer;user-select:none}.ce-list-config .pure-control-group label{width:15em}.ce-list-config .pure-form-message{margin-left:3em}.ce-search-config .pure-control-group label{width:15em}.ce-search-config .pure-form-message{margin-left:3em}.text-center{text-align:center}.text-bold{font-weight:700}.text-cross{text-decoration:line-through}.text-primary{color:#1890ff}.text-success{color:#13ce66}.text-warning{color:#ffba00}.text-danger{color:#ff4949}.text-info{color:#909399}.ce-tools-config .pure-control-group label{width:15em}.ce-tools-config .pure-form-message{margin-left:3em}.ce-tools-config legend{font-size:16px;color:#1890ff}.menu-basic-config .pure-control-group label,.official-menu-config .pure-form label{width:170px!important}.official-menu-config .pure-form label small{color:#999}.ce-menu-config .menu-config-block{display:inline-block;border-radius:6px;margin:4px;vertical-align:top;padding:0 6px;background:#f9f9f9}.ce-menu-config .menu-config-block>form>legend{border:none;text-align:center;font-size:14px;color:#5092ff;padding:4px;margin-bottom:0}.ce-menu-config .menu-config-block>form>fieldset>div{background:#fff;margin-bottom:1px;padding:4px}.ce-menu-config .menu-config-block>form>fieldset>div:hover{background:#fefcea}.ce-menu-config .menu-config-block label{display:inline-block;width:120px;font-size:12px;line-height:20px;vertical-align:middle;cursor:pointer}.ce-menu-config input[type=checkbox]{margin-right:10px;width:18px;height:18px;cursor:pointer;vertical-align:middle}.ce-menu-config .btn-view-info{display:inline-block;margin-right:6px;vertical-align:middle;cursor:help}.ce-custom-url{border-radius:4px;box-shadow:0 0 5px #eee;border:1px solid #eee;margin-bottom:20px;padding:0 10px;background:#fff}.ce-custom-url label{cursor:pointer}.ce-custom-url input:not([type]){font-size:12px}.ce-custom-url textarea{font-size:12px;resize:vertical}.ce-custom-url input[type=checkbox]{width:18px;height:18px;cursor:pointer}.ce-custom-url .ce-custom-url-index{font-size:14px;font-weight:700;margin-right:20px}.ce-custom-url legend .button-error{float:right}.ce-custom-url fieldset>div{margin-bottom:1px;padding:4px}.ce-custom-url fieldset>div:hover{background:#fefcea}.ce-custom-urls,.ce-play-urls{padding-bottom:100px}.ce-play-urls .extra-memo{font-size:12px;margin-left:10px}.ce-play-urls .extra-memo a{text-decoration:underline;color:#337ab7}.ce-drawer{visibility:hidden}.ce-drawer.is-visible{visibility:visible}.ce-drawer.is-open .ce-drawer__overlay{opacity:.5}.ce-drawer.is-open .ce-drawer__content{transform:translate(0)}.ce-drawer__overlay{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;z-index:200;opacity:0;transition-property:opacity;background-color:#000;user-select:none}.ce-drawer__content{position:fixed;top:0;right:0;bottom:0;height:100%;width:100%;z-index:9999;overflow:auto;transition-property:transform;display:flex;flex-direction:column;transform:translate(100%);box-shadow:0 2px 6px #777}.ce-config-main .ce-intro{margin-left:35%;color:#7676ff}.ce-config-main .ce-intro small{color:#999}.ce-config-main .ce-config-main-body{padding:10px}.ce-config-main .ce-config-main-header{padding:10px;position:sticky;top:0;background:#fff;z-index:100000;box-shadow:0 1px 2px #e9e9e9}.ce-config-main .ce-config-main-header h1{display:inline;font-size:18px}.ce-config-main .ce-config-main-header .ce-config-main-close{float:right;vertical-align:top;color:#89929b;cursor:pointer;padding:2px 20px;border-radius:6px}.ce-config-main .ce-config-main-header .ce-config-main-close:hover{background:#fefcea;color:#0275ff}.ce-config-main .ce-offline-config{max-height:unset}.ce-login-page a.ce-entry{display:inline-block;background:#fefcea;padding:2px 8px;border-radius:4px;border:1px solid #98bbfc}.list-contents ul li .ce-btn-folder-size{background:#f2f4f8;border-radius:6px;padding:4px;cursor:pointer}.list-contents ul li .ce-file-sha1{position:absolute;top:20px;color:#999;cursor:pointer;font-size:90%}.list-contents ul li.ce-show-sha1 .file-name{height:40px}.list-contents ul li.ce-size-got .ce-btn-folder-size{opacity:.6;margin-left:6px}.list-contents ul li.ce-size-got .ce-btn-folder-size:hover{opacity:1}#js_top_header_file_path_box .ce-path-btn{background-color:#f4f6fc;height:32px}#js_top_header_file_path_box .ce-path-btn#ceGotoPath{margin-right:6px}#js_top_header_file_path_box.ce-goto-path-active{height:60px}#js_top_header_file_path_box.ce-goto-path-active div#js_path_add_dir{height:32px}#js_top_header_file_path_box #ceGotoPathApp{position:absolute;top:40px}.ce-goto-main{position:relative;margin-right:5px}.ce-goto-main.ce-goto-sug-shown .ce-goto-input-wrap{border-radius:6px 6px 0 0}.ce-goto-main.ce-goto-sug-shown .ce-goto-sug{display:block}.ce-goto-main .ce-goto-input-wrap{position:relative;overflow:hidden;border:1px solid #cfcccc;border-radius:6px}.ce-goto-main .ce-goto-input-wrap .ce-goto-input{border-radius:6px 6px 0 0;border:none;padding:4px 10px;width:100%;box-sizing:border-box;color:#2877f8;border-bottom:none}.ce-goto-main .ce-goto-input-wrap .ce-goto-input-btn{position:absolute;border:none}.ce-goto-main .ce-goto-input-wrap .ce-goto-input-btn:hover{color:#ff723e}.ce-goto-main .ce-goto-input-wrap .ce-goto-input-btn[data-cmd]{top:5px;font-size:12px;background:#aeaeae;color:#fff;padding:0 4px;border-radius:4px;cursor:pointer}.ce-goto-main .ce-goto-input-wrap .ce-goto-input-btn[data-cmd]:hover{background:#ff723e}.ce-goto-main .ce-goto-input-wrap .ce-goto-input-btn[data-cmd][disabled]{background:#d7d7d7;cursor:not-allowed}.ce-goto-main .ce-goto-input-wrap .ce-goto-input-btn[data-cmd=clear]{right:10px}.ce-goto-main .ce-goto-input-wrap .ce-goto-input-btn[data-cmd=toggle]{right:50px}.ce-goto-main .ce-goto-sug{display:none;position:absolute;background:#ffffff;width:100%;padding:10px 10px 10px 8px;max-height:250px;z-index:999999;overflow-y:auto;box-shadow:0 5px 8px #ededed;border-radius:0 0 6px 6px;border:1px solid #cfcccc;box-sizing:border-box;border-top:none}.ce-goto-main .ce-goto-sug .ce-goto-sug-item{padding:4px 10px;background:#f4f6fc;margin-bottom:4px;cursor:pointer;border-radius:4px;font-size:12px;color:#353535}.ce-goto-main .ce-goto-sug .ce-goto-sug-item:hover{background:#d7d7d7}.ce-goto-main .ce-goto-sug .ce-goto-sug-item.active{background:#f4e1cf;color:#2877f8}.ce-goto-main .ce-goto-sug .ce-goto-sug-item span.ce-goto-sug-prefix,.ce-goto-main .ce-goto-sug .ce-goto-sug-item span.ce-goto-sep{color:#a4a4a4}.ce-goto-main .ce-goto-sug .ce-goto-sug-item span.ce-goto-sug-index{display:inline-block;background:#6ab2ff;font-size:10px;min-width:20px;color:#fff;border-radius:4px;text-align:center;padding:0 2px;margin-right:4px}.ce-search-page .top-file-path .file-path{float:left}.ce-search-page .dir-tab.ce-btn-select{background:#fffcea;color:#2877f8;display:inline-block;height:32px;line-height:24px;font-size:12px;padding:4px 8px;box-sizing:border-box;border:1px solid #2877f8;border-radius:4px}.ce-search-page .dir-tab.ce-btn-select:hover{background:#ffff00} `); var HL=Object.defineProperty;var qL=(Vo,Rn,Ko)=>Rn in Vo?HL(Vo,Rn,{enumerable:!0,configurable:!0,writable:!0,value:Ko}):Vo[Rn]=Ko;var Ie=(Vo,Rn,Ko)=>(qL(Vo,typeof Rn!="symbol"?Rn+"":Rn,Ko),Ko);(function(){"use strict";const Vo="",Rn="",Ko="",zL="",VL="",KL="",WL="",Om=typeof btoa=="function",la=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const Lc=typeof TextEncoder=="function"?new TextEncoder:void 0,Lm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",xi=Array.prototype.slice.call(Lm);(e=>{let t={};return e.forEach((n,o)=>t[n]=o),t})(xi);const sn=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const Mm=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),Mc=Om?e=>btoa(e):la?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,o,i,s="";const r=e.length%3;for(let a=0;a255||(o=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|o<<8|i,s+=xi[t>>18&63]+xi[t>>12&63]+xi[t>>6&63]+xi[t&63]}return r?s.slice(0,r-3)+"===".substring(r):s},Nm=la?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let o=0,i=e.length;o{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?sn(192|t>>>6)+sn(128|t&63):sn(224|t>>>12&15)+sn(128|t>>>6&63)+sn(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return sn(240|t>>>18&7)+sn(128|t>>>12&63)+sn(128|t>>>6&63)+sn(128|t&63)}},Dm=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Rm=e=>e.replace(Dm,Bm),Nc=la?e=>Buffer.from(e,"utf8").toString("base64"):Lc?e=>Nm(Lc.encode(e)):e=>Mc(Rm(e)),Bc=(e,t=!1)=>t?Mm(Nc(e)):Nc(e);var fo=window,ca=(()=>fo.GM_setValue)(),Fm=(()=>fo.GM_deleteValue)(),jm=(()=>fo.GM_openInTab)(),ua=(()=>fo.GM_registerMenuCommand)(),Um=(()=>fo.GM_xmlhttpRequest)(),Ci=(()=>fo.GM_setClipboard)(),ks=(()=>fo.GM_getValue)(),Fn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hm(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),n}var Dc={exports:{}};/*! * sweetalert2 v11.7.2 * Released under the MIT License. */(function(e,t){(function(n,o){e.exports=o()})(Fn,function(){var n={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const o="swal2-",i=l=>{const u={};for(const g in l)u[l[g]]=o+l[g];return u},s=i(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),r=i(["success","warning","info","question","error"]),a="SweetAlert2:",c=l=>{const u=[];for(let g=0;gl.charAt(0).toUpperCase()+l.slice(1),p=l=>{console.warn(`${a} ${typeof l=="object"?l.join(" "):l}`)},h=l=>{console.error(`${a} ${l}`)},y=[],v=l=>{y.includes(l)||(y.push(l),p(l))},_=(l,u)=>{v(`"${l}" is deprecated and will be removed in the next major release. Please use "${u}" instead.`)},E=l=>typeof l=="function"?l():l,T=l=>l&&typeof l.toPromise=="function",B=l=>T(l)?l.toPromise():Promise.resolve(l),P=l=>l&&Promise.resolve(l)===l,I=()=>document.body.querySelector(`.${s.container}`),H=l=>{const u=I();return u?u.querySelector(l):null},ie=l=>H(`.${l}`),j=()=>ie(s.popup),ne=()=>ie(s.icon),ae=()=>ie(s["icon-content"]),pe=()=>ie(s.title),Ae=()=>ie(s["html-container"]),ge=()=>ie(s.image),O=()=>ie(s["progress-steps"]),se=()=>ie(s["validation-message"]),Y=()=>H(`.${s.actions} .${s.confirm}`),ve=()=>H(`.${s.actions} .${s.cancel}`),M=()=>H(`.${s.actions} .${s.deny}`),G=()=>ie(s["input-label"]),D=()=>H(`.${s.loader}`),me=()=>ie(s.actions),ke=()=>ie(s.footer),Le=()=>ie(s["timer-progress-bar"]),Fe=()=>ie(s.close),Xe=` a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable], audio[controls], video[controls], summary `,Ht=()=>{const l=Array.from(j().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((g,x)=>{const F=parseInt(g.getAttribute("tabindex")),$e=parseInt(x.getAttribute("tabindex"));return F>$e?1:F<$e?-1:0}),u=Array.from(j().querySelectorAll(Xe)).filter(g=>g.getAttribute("tabindex")!=="-1");return c(l.concat(u)).filter(g=>U(g))},qt=()=>ot(document.body,s.shown)&&!ot(document.body,s["toast-shown"])&&!ot(document.body,s["no-backdrop"]),Dn=()=>j()&&ot(j(),s.toast),vt=()=>j().hasAttribute("data-loading"),xt={previousBodyPadding:null},ft=(l,u)=>{if(l.textContent="",u){const x=new DOMParser().parseFromString(u,"text/html");Array.from(x.querySelector("head").childNodes).forEach(F=>{l.appendChild(F)}),Array.from(x.querySelector("body").childNodes).forEach(F=>{F instanceof HTMLVideoElement||F instanceof HTMLAudioElement?l.appendChild(F.cloneNode(!0)):l.appendChild(F)})}},ot=(l,u)=>{if(!u)return!1;const g=u.split(/\s+/);for(let x=0;x{Array.from(l.classList).forEach(g=>{!Object.values(s).includes(g)&&!Object.values(r).includes(g)&&!Object.values(u.showClass).includes(g)&&l.classList.remove(g)})},dt=(l,u,g)=>{if(uo(l,u),u.customClass&&u.customClass[g]){if(typeof u.customClass[g]!="string"&&!u.customClass[g].forEach){p(`Invalid type of customClass.${g}! Expected string or iterable object, got "${typeof u.customClass[g]}"`);return}N(l,u.customClass[g])}},b=(l,u)=>{if(!u)return null;switch(u){case"select":case"textarea":case"file":return l.querySelector(`.${s.popup} > .${s[u]}`);case"checkbox":return l.querySelector(`.${s.popup} > .${s.checkbox} input`);case"radio":return l.querySelector(`.${s.popup} > .${s.radio} input:checked`)||l.querySelector(`.${s.popup} > .${s.radio} input:first-child`);case"range":return l.querySelector(`.${s.popup} > .${s.range} input`);default:return l.querySelector(`.${s.popup} > .${s.input}`)}},A=l=>{if(l.focus(),l.type!=="file"){const u=l.value;l.value="",l.value=u}},R=(l,u,g)=>{!l||!u||(typeof u=="string"&&(u=u.split(/\s+/).filter(Boolean)),u.forEach(x=>{Array.isArray(l)?l.forEach(F=>{g?F.classList.add(x):F.classList.remove(x)}):g?l.classList.add(x):l.classList.remove(x)}))},N=(l,u)=>{R(l,u,!0)},z=(l,u)=>{R(l,u,!1)},oe=(l,u)=>{const g=Array.from(l.children);for(let x=0;x{g===`${parseInt(g)}`&&(g=parseInt(g)),g||parseInt(g)===0?l.style[u]=typeof g=="number"?`${g}px`:g:l.style.removeProperty(u)},J=function(l){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"flex";l.style.display=u},Z=l=>{l.style.display="none"},Q=(l,u,g,x)=>{const F=l.querySelector(u);F&&(F.style[g]=x)},we=function(l,u){let g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"flex";u?J(l,g):Z(l)},U=l=>!!(l&&(l.offsetWidth||l.offsetHeight||l.getClientRects().length)),be=()=>!U(Y())&&!U(M())&&!U(ve()),m=l=>l.scrollHeight>l.clientHeight,w=l=>{const u=window.getComputedStyle(l),g=parseFloat(u.getPropertyValue("animation-duration")||"0"),x=parseFloat(u.getPropertyValue("transition-duration")||"0");return g>0||x>0},C=function(l){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const g=Le();U(g)&&(u&&(g.style.transition="none",g.style.width="100%"),setTimeout(()=>{g.style.transition=`width ${l/1e3}s linear`,g.style.width="0%"},10))},k=()=>{const l=Le(),u=parseInt(window.getComputedStyle(l).width);l.style.removeProperty("transition"),l.style.width="100%";const g=parseInt(window.getComputedStyle(l).width),x=u/g*100;l.style.width=`${x}%`},L=100,S={},q=()=>{S.previousActiveElement instanceof HTMLElement?(S.previousActiveElement.focus(),S.previousActiveElement=null):document.body&&document.body.focus()},V=l=>new Promise(u=>{if(!l)return u();const g=window.scrollX,x=window.scrollY;S.restoreFocusTimeout=setTimeout(()=>{q(),u()},L),window.scrollTo(g,x)}),te=()=>typeof window>"u"||typeof document>"u",Pe=`

    `.replace(/(^|\n)\s*/g,""),Ee=()=>{const l=I();return l?(l.remove(),z([document.documentElement,document.body],[s["no-backdrop"],s["toast-shown"],s["has-column"]]),!0):!1},_e=()=>{S.currentInstance.resetValidationMessage()},je=()=>{const l=j(),u=oe(l,s.input),g=oe(l,s.file),x=l.querySelector(`.${s.range} input`),F=l.querySelector(`.${s.range} output`),$e=oe(l,s.select),Je=l.querySelector(`.${s.checkbox} input`),zt=oe(l,s.textarea);u.oninput=_e,g.onchange=_e,$e.onchange=_e,Je.onchange=_e,zt.oninput=_e,x.oninput=()=>{_e(),F.value=x.value},x.onchange=()=>{_e(),F.value=x.value}},Ct=l=>typeof l=="string"?document.querySelector(l):l,gt=l=>{const u=j();u.setAttribute("role",l.toast?"alert":"dialog"),u.setAttribute("aria-live",l.toast?"polite":"assertive"),l.toast||u.setAttribute("aria-modal","true")},bs=l=>{window.getComputedStyle(l).direction==="rtl"&&N(I(),s.rtl)},_s=l=>{const u=Ee();if(te()){h("SweetAlert2 requires document to initialize");return}const g=document.createElement("div");g.className=s.container,u&&N(g,s["no-transition"]),ft(g,Pe);const x=Ct(l.target);x.appendChild(g),gt(l),bs(x),je()},xc=(l,u)=>{l instanceof HTMLElement?u.appendChild(l):typeof l=="object"?bT(l,u):l&&ft(u,l)},bT=(l,u)=>{l.jquery?_T(u,l):ft(u,l.toString())},_T=(l,u)=>{if(l.textContent="",0 in u)for(let g=0;g in u;g++)l.appendChild(u[g].cloneNode(!0));else l.appendChild(u.cloneNode(!0))},vs=(()=>{if(te())return!1;const l=document.createElement("div"),u={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const g in u)if(Object.prototype.hasOwnProperty.call(u,g)&&typeof l.style[g]<"u")return u[g];return!1})(),vT=()=>{const l=document.createElement("div");l.className=s["scrollbar-measure"],document.body.appendChild(l);const u=l.getBoundingClientRect().width-l.clientWidth;return document.body.removeChild(l),u},xT=(l,u)=>{const g=me(),x=D();!u.showConfirmButton&&!u.showDenyButton&&!u.showCancelButton?Z(g):J(g),dt(g,u,"actions"),CT(g,x,u),ft(x,u.loaderHtml),dt(x,u,"loader")};function CT(l,u,g){const x=Y(),F=M(),$e=ve();Cc(x,"confirm",g),Cc(F,"deny",g),Cc($e,"cancel",g),$T(x,F,$e,g),g.reverseButtons&&(g.toast?(l.insertBefore($e,x),l.insertBefore(F,x)):(l.insertBefore($e,u),l.insertBefore(F,u),l.insertBefore(x,u)))}function $T(l,u,g,x){if(!x.buttonsStyling){z([l,u,g],s.styled);return}N([l,u,g],s.styled),x.confirmButtonColor&&(l.style.backgroundColor=x.confirmButtonColor,N(l,s["default-outline"])),x.denyButtonColor&&(u.style.backgroundColor=x.denyButtonColor,N(u,s["default-outline"])),x.cancelButtonColor&&(g.style.backgroundColor=x.cancelButtonColor,N(g,s["default-outline"]))}function Cc(l,u,g){we(l,g[`show${d(u)}Button`],"inline-block"),ft(l,g[`${u}ButtonText`]),l.setAttribute("aria-label",g[`${u}ButtonAriaLabel`]),l.className=s[u],dt(l,g,`${u}Button`),N(l,g[`${u}ButtonClass`])}const kT=(l,u)=>{const g=Fe();ft(g,u.closeButtonHtml),dt(g,u,"closeButton"),we(g,u.showCloseButton),g.setAttribute("aria-label",u.closeButtonAriaLabel)},ET=(l,u)=>{const g=I();!g||(ST(g,u.backdrop),AT(g,u.position),PT(g,u.grow),dt(g,u,"container"))};function ST(l,u){typeof u=="string"?l.style.background=u:u||N([document.documentElement,document.body],s["no-backdrop"])}function AT(l,u){u in s?N(l,s[u]):(p('The "position" parameter is not valid, defaulting to "center"'),N(l,s.center))}function PT(l,u){if(u&&typeof u=="string"){const g=`grow-${u}`;g in s&&N(l,s[g])}}const IT=["input","file","range","select","radio","checkbox","textarea"],TT=(l,u)=>{const g=j(),x=n.innerParams.get(l),F=!x||u.input!==x.input;IT.forEach($e=>{const Je=oe(g,s[$e]);MT($e,u.inputAttributes),Je.className=s[$e],F&&Z(Je)}),u.input&&(F&&OT(u),NT(u))},OT=l=>{if(!Nt[l.input]){h(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${l.input}"`);return}const u=nm(l.input),g=Nt[l.input](u,l);J(u),l.inputAutoFocus&&setTimeout(()=>{A(g)})},LT=l=>{for(let u=0;u{const g=b(j(),l);if(!!g){LT(g);for(const x in u)g.setAttribute(x,u[x])}},NT=l=>{const u=nm(l.input);typeof l.customClass=="object"&&N(u,l.customClass.input)},$c=(l,u)=>{(!l.placeholder||u.inputPlaceholder)&&(l.placeholder=u.inputPlaceholder)},xs=(l,u,g)=>{if(g.inputLabel){l.id=s.input;const x=document.createElement("label"),F=s["input-label"];x.setAttribute("for",l.id),x.className=F,typeof g.customClass=="object"&&N(x,g.customClass.inputLabel),x.innerText=g.inputLabel,u.insertAdjacentElement("beforebegin",x)}},nm=l=>oe(j(),s[l]||s.input),ia=(l,u)=>{["string","number"].includes(typeof u)?l.value=`${u}`:P(u)||p(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof u}"`)},Nt={};Nt.text=Nt.email=Nt.password=Nt.number=Nt.tel=Nt.url=(l,u)=>(ia(l,u.inputValue),xs(l,l,u),$c(l,u),l.type=u.input,l),Nt.file=(l,u)=>(xs(l,l,u),$c(l,u),l),Nt.range=(l,u)=>{const g=l.querySelector("input"),x=l.querySelector("output");return ia(g,u.inputValue),g.type=u.input,ia(x,u.inputValue),xs(g,l,u),l},Nt.select=(l,u)=>{if(l.textContent="",u.inputPlaceholder){const g=document.createElement("option");ft(g,u.inputPlaceholder),g.value="",g.disabled=!0,g.selected=!0,l.appendChild(g)}return xs(l,l,u),l},Nt.radio=l=>(l.textContent="",l),Nt.checkbox=(l,u)=>{const g=b(j(),"checkbox");g.value="1",g.id=s.checkbox,g.checked=Boolean(u.inputValue);const x=l.querySelector("span");return ft(x,u.inputPlaceholder),g},Nt.textarea=(l,u)=>{ia(l,u.inputValue),$c(l,u),xs(l,l,u);const g=x=>parseInt(window.getComputedStyle(x).marginLeft)+parseInt(window.getComputedStyle(x).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const x=parseInt(window.getComputedStyle(j()).width),F=()=>{const $e=l.offsetWidth+g(l);$e>x?j().style.width=`${$e}px`:j().style.width=null};new MutationObserver(F).observe(l,{attributes:!0,attributeFilter:["style"]})}}),l};const BT=(l,u)=>{const g=Ae();dt(g,u,"htmlContainer"),u.html?(xc(u.html,g),J(g,"block")):u.text?(g.textContent=u.text,J(g,"block")):Z(g),TT(l,u)},DT=(l,u)=>{const g=ke();we(g,u.footer),u.footer&&xc(u.footer,g),dt(g,u,"footer")},RT=(l,u)=>{const g=n.innerParams.get(l),x=ne();if(g&&u.icon===g.icon){im(x,u),om(x,u);return}if(!u.icon&&!u.iconHtml){Z(x);return}if(u.icon&&Object.keys(r).indexOf(u.icon)===-1){h(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${u.icon}"`),Z(x);return}J(x),im(x,u),om(x,u),N(x,u.showClass.icon)},om=(l,u)=>{for(const g in r)u.icon!==g&&z(l,r[g]);N(l,r[u.icon]),HT(l,u),FT(),dt(l,u,"icon")},FT=()=>{const l=j(),u=window.getComputedStyle(l).getPropertyValue("background-color"),g=l.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let x=0;x
    `,UT=` `,im=(l,u)=>{let g=l.innerHTML,x;u.iconHtml?x=sm(u.iconHtml):u.icon==="success"?(x=jT,g=g.replace(/ style=".*?"/g,"")):u.icon==="error"?x=UT:x=sm({question:"?",warning:"!",info:"i"}[u.icon]),g.trim()!==x.trim()&&ft(l,x)},HT=(l,u)=>{if(!!u.iconColor){l.style.color=u.iconColor,l.style.borderColor=u.iconColor;for(const g of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])Q(l,g,"backgroundColor",u.iconColor);Q(l,".swal2-success-ring","borderColor",u.iconColor)}},sm=l=>`
    ${l}
    `,qT=(l,u)=>{const g=ge();if(!u.imageUrl){Z(g);return}J(g,""),g.setAttribute("src",u.imageUrl),g.setAttribute("alt",u.imageAlt),le(g,"width",u.imageWidth),le(g,"height",u.imageHeight),g.className=s.image,dt(g,u,"image")},zT=(l,u)=>{const g=I(),x=j();u.toast?(le(g,"width",u.width),x.style.width="100%",x.insertBefore(D(),ne())):le(x,"width",u.width),le(x,"padding",u.padding),u.color&&(x.style.color=u.color),u.background&&(x.style.background=u.background),Z(se()),VT(x,u)},VT=(l,u)=>{l.className=`${s.popup} ${U(l)?u.showClass.popup:""}`,u.toast?(N([document.documentElement,document.body],s["toast-shown"]),N(l,s.toast)):N(l,s.modal),dt(l,u,"popup"),typeof u.customClass=="string"&&N(l,u.customClass),u.icon&&N(l,s[`icon-${u.icon}`])},KT=(l,u)=>{const g=O();if(!u.progressSteps||u.progressSteps.length===0){Z(g);return}J(g),g.textContent="",u.currentProgressStep>=u.progressSteps.length&&p("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),u.progressSteps.forEach((x,F)=>{const $e=WT(x);if(g.appendChild($e),F===u.currentProgressStep&&N($e,s["active-progress-step"]),F!==u.progressSteps.length-1){const Je=GT(u);g.appendChild(Je)}})},WT=l=>{const u=document.createElement("li");return N(u,s["progress-step"]),ft(u,l),u},GT=l=>{const u=document.createElement("li");return N(u,s["progress-step-line"]),l.progressStepsDistance&&le(u,"width",l.progressStepsDistance),u},JT=(l,u)=>{const g=pe();we(g,u.title||u.titleText,"block"),u.title&&xc(u.title,g),u.titleText&&(g.innerText=u.titleText),dt(g,u,"title")},rm=(l,u)=>{zT(l,u),ET(l,u),KT(l,u),RT(l,u),qT(l,u),JT(l,u),kT(l,u),BT(l,u),xT(l,u),DT(l,u),typeof u.didRender=="function"&&u.didRender(j())};function am(){const l=n.innerParams.get(this);if(!l)return;const u=n.domCache.get(this);Z(u.loader),Dn()?l.icon&&J(ne()):YT(u),z([u.popup,u.actions],s.loading),u.popup.removeAttribute("aria-busy"),u.popup.removeAttribute("data-loading"),u.confirmButton.disabled=!1,u.denyButton.disabled=!1,u.cancelButton.disabled=!1}const YT=l=>{const u=l.popup.getElementsByClassName(l.loader.getAttribute("data-button-to-replace"));u.length?J(u[0],"inline-block"):be()&&Z(l.actions)};function QT(l){const u=n.innerParams.get(l||this),g=n.domCache.get(l||this);return g?b(g.popup,u.input):null}const XT=()=>U(j()),lm=()=>Y()&&Y().click(),ZT=()=>M()&&M().click(),eO=()=>ve()&&ve().click(),yi=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),cm=l=>{l.keydownTarget&&l.keydownHandlerAdded&&(l.keydownTarget.removeEventListener("keydown",l.keydownHandler,{capture:l.keydownListenerCapture}),l.keydownHandlerAdded=!1)},tO=(l,u,g,x)=>{cm(u),g.toast||(u.keydownHandler=F=>oO(l,F,x),u.keydownTarget=g.keydownListenerCapture?window:j(),u.keydownListenerCapture=g.keydownListenerCapture,u.keydownTarget.addEventListener("keydown",u.keydownHandler,{capture:u.keydownListenerCapture}),u.keydownHandlerAdded=!0)},kc=(l,u)=>{const g=Ht();if(g.length){l=l+u,l===g.length?l=0:l===-1&&(l=g.length-1),g[l].focus();return}j().focus()},um=["ArrowRight","ArrowDown"],nO=["ArrowLeft","ArrowUp"],oO=(l,u,g)=>{const x=n.innerParams.get(l);!x||u.isComposing||u.keyCode===229||(x.stopKeydownPropagation&&u.stopPropagation(),u.key==="Enter"?iO(l,u,x):u.key==="Tab"?sO(u):[...um,...nO].includes(u.key)?rO(u.key):u.key==="Escape"&&aO(u,x,g))},iO=(l,u,g)=>{if(!!E(g.allowEnterKey)&&u.target&&l.getInput()&&u.target instanceof HTMLElement&&u.target.outerHTML===l.getInput().outerHTML){if(["textarea","file"].includes(g.input))return;lm(),u.preventDefault()}},sO=l=>{const u=l.target,g=Ht();let x=-1;for(let F=0;F{const u=Y(),g=M(),x=ve(),F=[u,g,x];if(document.activeElement instanceof HTMLElement&&!F.includes(document.activeElement))return;const $e=um.includes(l)?"nextElementSibling":"previousElementSibling";let Je=document.activeElement;for(let zt=0;zt{E(u.allowEscapeKey)&&(l.preventDefault(),g(yi.esc))};var Cs={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const lO=()=>{Array.from(document.body.children).forEach(u=>{u===I()||u.contains(I())||(u.hasAttribute("aria-hidden")&&u.setAttribute("data-previous-aria-hidden",u.getAttribute("aria-hidden")),u.setAttribute("aria-hidden","true"))})},dm=()=>{Array.from(document.body.children).forEach(u=>{u.hasAttribute("data-previous-aria-hidden")?(u.setAttribute("aria-hidden",u.getAttribute("data-previous-aria-hidden")),u.removeAttribute("data-previous-aria-hidden")):u.removeAttribute("aria-hidden")})},cO=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!ot(document.body,s.iosfix)){const u=document.body.scrollTop;document.body.style.top=`${u*-1}px`,N(document.body,s.iosfix),dO(),uO()}},uO=()=>{const l=navigator.userAgent,u=!!l.match(/iPad/i)||!!l.match(/iPhone/i),g=!!l.match(/WebKit/i);u&&g&&!l.match(/CriOS/i)&&j().scrollHeight>window.innerHeight-44&&(I().style.paddingBottom=`${44}px`)},dO=()=>{const l=I();let u;l.ontouchstart=g=>{u=fO(g)},l.ontouchmove=g=>{u&&(g.preventDefault(),g.stopPropagation())}},fO=l=>{const u=l.target,g=I();return pO(l)||hO(l)?!1:u===g||!m(g)&&u instanceof HTMLElement&&u.tagName!=="INPUT"&&u.tagName!=="TEXTAREA"&&!(m(Ae())&&Ae().contains(u))},pO=l=>l.touches&&l.touches.length&&l.touches[0].touchType==="stylus",hO=l=>l.touches&&l.touches.length>1,mO=()=>{if(ot(document.body,s.iosfix)){const l=parseInt(document.body.style.top,10);z(document.body,s.iosfix),document.body.style.top="",document.body.scrollTop=l*-1}},gO=()=>{xt.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(xt.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${xt.previousBodyPadding+vT()}px`)},yO=()=>{xt.previousBodyPadding!==null&&(document.body.style.paddingRight=`${xt.previousBodyPadding}px`,xt.previousBodyPadding=null)};function fm(l,u,g,x){Dn()?pm(l,x):(V(g).then(()=>pm(l,x)),cm(S)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(u.setAttribute("style","display:none !important"),u.removeAttribute("class"),u.innerHTML=""):u.remove(),qt()&&(yO(),mO(),dm()),wO()}function wO(){z([document.documentElement,document.body],[s.shown,s["height-auto"],s["no-backdrop"],s["toast-shown"]])}function sa(l){l=xO(l);const u=Cs.swalPromiseResolve.get(this),g=_O(this);this.isAwaitingPromise()?l.isDismissed||($s(this),u(l)):g&&u(l)}function bO(){return!!n.awaitingPromise.get(this)}const _O=l=>{const u=j();if(!u)return!1;const g=n.innerParams.get(l);if(!g||ot(u,g.hideClass.popup))return!1;z(u,g.showClass.popup),N(u,g.hideClass.popup);const x=I();return z(x,g.showClass.backdrop),N(x,g.hideClass.backdrop),CO(l,u,g),!0};function vO(l){const u=Cs.swalPromiseReject.get(this);$s(this),u&&u(l)}const $s=l=>{l.isAwaitingPromise()&&(n.awaitingPromise.delete(l),n.innerParams.get(l)||l._destroy())},xO=l=>typeof l>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},l),CO=(l,u,g)=>{const x=I(),F=vs&&w(u);typeof g.willClose=="function"&&g.willClose(u),F?$O(l,u,x,g.returnFocus,g.didClose):fm(l,x,g.returnFocus,g.didClose)},$O=(l,u,g,x,F)=>{S.swalCloseEventFinishedCallback=fm.bind(null,l,g,x,F),u.addEventListener(vs,function($e){$e.target===u&&(S.swalCloseEventFinishedCallback(),delete S.swalCloseEventFinishedCallback)})},pm=(l,u)=>{setTimeout(()=>{typeof u=="function"&&u.bind(l.params)(),l._destroy()})};function hm(l,u,g){const x=n.domCache.get(l);u.forEach(F=>{x[F].disabled=g})}function mm(l,u){if(!!l)if(l.type==="radio"){const x=l.parentNode.parentNode.querySelectorAll("input");for(let F=0;FObject.prototype.hasOwnProperty.call(wi,l),ym=l=>TO.indexOf(l)!==-1,Ec=l=>OO[l],MO=l=>{gm(l)||p(`Unknown parameter "${l}"`)},NO=l=>{LO.includes(l)&&p(`The parameter "${l}" is incompatible with toasts`)},BO=l=>{Ec(l)&&_(l,Ec(l))},DO=l=>{l.backdrop===!1&&l.allowOutsideClick&&p('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const u in l)MO(u),l.toast&&NO(u),BO(u)};function RO(l){const u=j(),g=n.innerParams.get(this);if(!u||ot(u,g.hideClass.popup)){p("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");return}const x=FO(l),F=Object.assign({},g,x);rm(this,F),n.innerParams.set(this,F),Object.defineProperties(this,{params:{value:Object.assign({},this.params,l),writable:!1,enumerable:!0}})}const FO=l=>{const u={};return Object.keys(l).forEach(g=>{ym(g)?u[g]=l[g]:p(`Invalid parameter to update: ${g}`)}),u};function jO(){const l=n.domCache.get(this),u=n.innerParams.get(this);if(!u){wm(this);return}l.popup&&S.swalCloseEventFinishedCallback&&(S.swalCloseEventFinishedCallback(),delete S.swalCloseEventFinishedCallback),typeof u.didDestroy=="function"&&u.didDestroy(),UO(this)}const UO=l=>{wm(l),delete l.params,delete S.keydownHandler,delete S.keydownTarget,delete S.currentInstance},wm=l=>{l.isAwaitingPromise()?(Sc(n,l),n.awaitingPromise.set(l,!0)):(Sc(Cs,l),Sc(n,l))},Sc=(l,u)=>{for(const g in l)l[g].delete(u)};var bm=Object.freeze({__proto__:null,_destroy:jO,close:sa,closeModal:sa,closePopup:sa,closeToast:sa,disableButtons:EO,disableInput:AO,disableLoading:am,enableButtons:kO,enableInput:SO,getInput:QT,handleAwaitingPromise:$s,hideLoading:am,isAwaitingPromise:bO,rejectPromise:vO,resetValidationMessage:IO,showValidationMessage:PO,update:RO});const bi=l=>{let u=j();u||new aa,u=j();const g=D();Dn()?Z(ne()):HO(u,l),J(g),u.setAttribute("data-loading","true"),u.setAttribute("aria-busy","true"),u.focus()},HO=(l,u)=>{const g=me(),x=D();!u&&U(Y())&&(u=Y()),J(g),u&&(Z(u),x.setAttribute("data-button-to-replace",u.className)),x.parentNode.insertBefore(x,u),N([l,g],s.loading)},qO=(l,u)=>{u.input==="select"||u.input==="radio"?GO(l,u):["text","email","number","tel","textarea"].includes(u.input)&&(T(u.inputValue)||P(u.inputValue))&&(bi(Y()),JO(l,u))},zO=(l,u)=>{const g=l.getInput();if(!g)return null;switch(u.input){case"checkbox":return VO(g);case"radio":return KO(g);case"file":return WO(g);default:return u.inputAutoTrim?g.value.trim():g.value}},VO=l=>l.checked?1:0,KO=l=>l.checked?l.value:null,WO=l=>l.files.length?l.getAttribute("multiple")!==null?l.files:l.files[0]:null,GO=(l,u)=>{const g=j(),x=F=>{YO[u.input](g,Ac(F),u)};T(u.inputOptions)||P(u.inputOptions)?(bi(Y()),B(u.inputOptions).then(F=>{l.hideLoading(),x(F)})):typeof u.inputOptions=="object"?x(u.inputOptions):h(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof u.inputOptions}`)},JO=(l,u)=>{const g=l.getInput();Z(g),B(u.inputValue).then(x=>{g.value=u.input==="number"?`${parseFloat(x)||0}`:`${x}`,J(g),g.focus(),l.hideLoading()}).catch(x=>{h(`Error in inputValue promise: ${x}`),g.value="",J(g),g.focus(),l.hideLoading()})},YO={select:(l,u,g)=>{const x=oe(l,s.select),F=($e,Je,zt)=>{const $t=document.createElement("option");$t.value=zt,ft($t,Je),$t.selected=_m(zt,g.inputValue),$e.appendChild($t)};u.forEach($e=>{const Je=$e[0],zt=$e[1];if(Array.isArray(zt)){const $t=document.createElement("optgroup");$t.label=Je,$t.disabled=!1,x.appendChild($t),zt.forEach(vi=>F($t,vi[1],vi[0]))}else F(x,zt,Je)}),x.focus()},radio:(l,u,g)=>{const x=oe(l,s.radio);u.forEach($e=>{const Je=$e[0],zt=$e[1],$t=document.createElement("input"),vi=document.createElement("label");$t.type="radio",$t.name=s.radio,$t.value=Je,_m(Je,g.inputValue)&&($t.checked=!0);const Oc=document.createElement("span");ft(Oc,zt),Oc.className=s.label,vi.appendChild($t),vi.appendChild(Oc),x.appendChild(vi)});const F=x.querySelectorAll("input");F.length&&F[0].focus()}},Ac=l=>{const u=[];return typeof Map<"u"&&l instanceof Map?l.forEach((g,x)=>{let F=g;typeof F=="object"&&(F=Ac(F)),u.push([x,F])}):Object.keys(l).forEach(g=>{let x=l[g];typeof x=="object"&&(x=Ac(x)),u.push([g,x])}),u},_m=(l,u)=>u&&u.toString()===l.toString(),QO=l=>{const u=n.innerParams.get(l);l.disableButtons(),u.input?vm(l,"confirm"):Ic(l,!0)},XO=l=>{const u=n.innerParams.get(l);l.disableButtons(),u.returnInputValueOnDeny?vm(l,"deny"):Pc(l,!1)},ZO=(l,u)=>{l.disableButtons(),u(yi.cancel)},vm=(l,u)=>{const g=n.innerParams.get(l);if(!g.input){h(`The "input" parameter is needed to be set when using returnInputValueOn${d(u)}`);return}const x=zO(l,g);g.inputValidator?eL(l,x,u):l.getInput().checkValidity()?u==="deny"?Pc(l,x):Ic(l,x):(l.enableButtons(),l.showValidationMessage(g.validationMessage))},eL=(l,u,g)=>{const x=n.innerParams.get(l);l.disableInput(),Promise.resolve().then(()=>B(x.inputValidator(u,x.validationMessage))).then($e=>{l.enableButtons(),l.enableInput(),$e?l.showValidationMessage($e):g==="deny"?Pc(l,u):Ic(l,u)})},Pc=(l,u)=>{const g=n.innerParams.get(l||void 0);g.showLoaderOnDeny&&bi(M()),g.preDeny?(n.awaitingPromise.set(l||void 0,!0),Promise.resolve().then(()=>B(g.preDeny(u,g.validationMessage))).then(F=>{F===!1?(l.hideLoading(),$s(l)):l.close({isDenied:!0,value:typeof F>"u"?u:F})}).catch(F=>Cm(l||void 0,F))):l.close({isDenied:!0,value:u})},xm=(l,u)=>{l.close({isConfirmed:!0,value:u})},Cm=(l,u)=>{l.rejectPromise(u)},Ic=(l,u)=>{const g=n.innerParams.get(l||void 0);g.showLoaderOnConfirm&&bi(),g.preConfirm?(l.resetValidationMessage(),n.awaitingPromise.set(l||void 0,!0),Promise.resolve().then(()=>B(g.preConfirm(u,g.validationMessage))).then(F=>{U(se())||F===!1?(l.hideLoading(),$s(l)):xm(l,typeof F>"u"?u:F)}).catch(F=>Cm(l||void 0,F))):xm(l,u)},tL=(l,u,g)=>{n.innerParams.get(l).toast?nL(l,u,g):(iL(u),sL(u),rL(l,u,g))},nL=(l,u,g)=>{u.popup.onclick=()=>{const x=n.innerParams.get(l);x&&(oL(x)||x.timer||x.input)||g(yi.close)}},oL=l=>l.showConfirmButton||l.showDenyButton||l.showCancelButton||l.showCloseButton;let ra=!1;const iL=l=>{l.popup.onmousedown=()=>{l.container.onmouseup=function(u){l.container.onmouseup=void 0,u.target===l.container&&(ra=!0)}}},sL=l=>{l.container.onmousedown=()=>{l.popup.onmouseup=function(u){l.popup.onmouseup=void 0,(u.target===l.popup||l.popup.contains(u.target))&&(ra=!0)}}},rL=(l,u,g)=>{u.container.onclick=x=>{const F=n.innerParams.get(l);if(ra){ra=!1;return}x.target===u.container&&E(F.allowOutsideClick)&&g(yi.backdrop)}},aL=l=>typeof l=="object"&&l.jquery,$m=l=>l instanceof Element||aL(l),lL=l=>{const u={};return typeof l[0]=="object"&&!$m(l[0])?Object.assign(u,l[0]):["title","html","icon"].forEach((g,x)=>{const F=l[x];typeof F=="string"||$m(F)?u[g]=F:F!==void 0&&h(`Unexpected type of ${g}! Expected "string" or "Element", got ${typeof F}`)}),u};function cL(){const l=this;for(var u=arguments.length,g=new Array(u),x=0;xS.timeout&&S.timeout.getTimerLeft(),km=()=>{if(S.timeout)return k(),S.timeout.stop()},Em=()=>{if(S.timeout){const l=S.timeout.start();return C(l),l}},fL=()=>{const l=S.timeout;return l&&(l.running?km():Em())},pL=l=>{if(S.timeout){const u=S.timeout.increase(l);return C(u,!0),u}},hL=()=>S.timeout&&S.timeout.isRunning();let Sm=!1;const Tc={};function mL(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";Tc[l]=this,Sm||(document.body.addEventListener("click",gL),Sm=!0)}const gL=l=>{for(let u=l.target;u&&u!==document;u=u.parentNode)for(const g in Tc){const x=u.getAttribute(g);if(x){Tc[g].fire({template:x});return}}};var yL=Object.freeze({__proto__:null,argsToParams:lL,bindClickHandler:mL,clickCancel:eO,clickConfirm:lm,clickDeny:ZT,enableLoading:bi,fire:cL,getActions:me,getCancelButton:ve,getCloseButton:Fe,getConfirmButton:Y,getContainer:I,getDenyButton:M,getFocusableElements:Ht,getFooter:ke,getHtmlContainer:Ae,getIcon:ne,getIconContent:ae,getImage:ge,getInputLabel:G,getLoader:D,getPopup:j,getProgressSteps:O,getTimerLeft:dL,getTimerProgressBar:Le,getTitle:pe,getValidationMessage:se,increaseTimer:pL,isDeprecatedParameter:Ec,isLoading:vt,isTimerRunning:hL,isUpdatableParameter:ym,isValidParameter:gm,isVisible:XT,mixin:uL,resumeTimer:Em,showLoading:bi,stopTimer:km,toggleTimer:fL});class wL{constructor(u,g){this.callback=u,this.remaining=g,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(u){const g=this.running;return g&&this.stop(),this.remaining+=u,g&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const Am=["swal-title","swal-html","swal-footer"],bL=l=>{const u=typeof l.template=="string"?document.querySelector(l.template):l.template;if(!u)return{};const g=u.content;return SL(g),Object.assign(_L(g),vL(g),xL(g),CL(g),$L(g),kL(g),EL(g,Am))},_L=l=>{const u={};return Array.from(l.querySelectorAll("swal-param")).forEach(x=>{zo(x,["name","value"]);const F=x.getAttribute("name"),$e=x.getAttribute("value");typeof wi[F]=="boolean"?u[F]=$e!=="false":typeof wi[F]=="object"?u[F]=JSON.parse($e):u[F]=$e}),u},vL=l=>{const u={};return Array.from(l.querySelectorAll("swal-function-param")).forEach(x=>{const F=x.getAttribute("name"),$e=x.getAttribute("value");u[F]=new Function(`return ${$e}`)()}),u},xL=l=>{const u={};return Array.from(l.querySelectorAll("swal-button")).forEach(x=>{zo(x,["type","color","aria-label"]);const F=x.getAttribute("type");u[`${F}ButtonText`]=x.innerHTML,u[`show${d(F)}Button`]=!0,x.hasAttribute("color")&&(u[`${F}ButtonColor`]=x.getAttribute("color")),x.hasAttribute("aria-label")&&(u[`${F}ButtonAriaLabel`]=x.getAttribute("aria-label"))}),u},CL=l=>{const u={},g=l.querySelector("swal-image");return g&&(zo(g,["src","width","height","alt"]),g.hasAttribute("src")&&(u.imageUrl=g.getAttribute("src")),g.hasAttribute("width")&&(u.imageWidth=g.getAttribute("width")),g.hasAttribute("height")&&(u.imageHeight=g.getAttribute("height")),g.hasAttribute("alt")&&(u.imageAlt=g.getAttribute("alt"))),u},$L=l=>{const u={},g=l.querySelector("swal-icon");return g&&(zo(g,["type","color"]),g.hasAttribute("type")&&(u.icon=g.getAttribute("type")),g.hasAttribute("color")&&(u.iconColor=g.getAttribute("color")),u.iconHtml=g.innerHTML),u},kL=l=>{const u={},g=l.querySelector("swal-input");g&&(zo(g,["type","label","placeholder","value"]),u.input=g.getAttribute("type")||"text",g.hasAttribute("label")&&(u.inputLabel=g.getAttribute("label")),g.hasAttribute("placeholder")&&(u.inputPlaceholder=g.getAttribute("placeholder")),g.hasAttribute("value")&&(u.inputValue=g.getAttribute("value")));const x=Array.from(l.querySelectorAll("swal-input-option"));return x.length&&(u.inputOptions={},x.forEach(F=>{zo(F,["value"]);const $e=F.getAttribute("value"),Je=F.innerHTML;u.inputOptions[$e]=Je})),u},EL=(l,u)=>{const g={};for(const x in u){const F=u[x],$e=l.querySelector(F);$e&&(zo($e,[]),g[F.replace(/^swal-/,"")]=$e.innerHTML.trim())}return g},SL=l=>{const u=Am.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(l.children).forEach(g=>{const x=g.tagName.toLowerCase();u.includes(x)||p(`Unrecognized element <${x}>`)})},zo=(l,u)=>{Array.from(l.attributes).forEach(g=>{u.indexOf(g.name)===-1&&p([`Unrecognized attribute "${g.name}" on <${l.tagName.toLowerCase()}>.`,`${u.length?`Allowed attributes are: ${u.join(", ")}`:"To set the value, use HTML within the element."}`])})},Pm=10,AL=l=>{const u=I(),g=j();typeof l.willOpen=="function"&&l.willOpen(g);const F=window.getComputedStyle(document.body).overflowY;TL(u,g,l),setTimeout(()=>{PL(u,g)},Pm),qt()&&(IL(u,l.scrollbarPadding,F),lO()),!Dn()&&!S.previousActiveElement&&(S.previousActiveElement=document.activeElement),typeof l.didOpen=="function"&&setTimeout(()=>l.didOpen(g)),z(u,s["no-transition"])},Im=l=>{const u=j();if(l.target!==u)return;const g=I();u.removeEventListener(vs,Im),g.style.overflowY="auto"},PL=(l,u)=>{vs&&w(u)?(l.style.overflowY="hidden",u.addEventListener(vs,Im)):l.style.overflowY="auto"},IL=(l,u,g)=>{cO(),u&&g!=="hidden"&&gO(),setTimeout(()=>{l.scrollTop=0})},TL=(l,u,g)=>{N(l,g.showClass.backdrop),u.style.setProperty("opacity","0","important"),J(u,"grid"),setTimeout(()=>{N(u,g.showClass.popup),u.style.removeProperty("opacity")},Pm),N([document.documentElement,document.body],s.shown),g.heightAuto&&g.backdrop&&!g.toast&&N([document.documentElement,document.body],s["height-auto"])};var Tm={email:(l,u)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(l)?Promise.resolve():Promise.resolve(u||"Invalid email address"),url:(l,u)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(l)?Promise.resolve():Promise.resolve(u||"Invalid URL")};function OL(l){l.inputValidator||Object.keys(Tm).forEach(u=>{l.input===u&&(l.inputValidator=Tm[u])})}function LL(l){(!l.target||typeof l.target=="string"&&!document.querySelector(l.target)||typeof l.target!="string"&&!l.target.appendChild)&&(p('Target parameter is not valid, defaulting to "body"'),l.target="body")}function ML(l){OL(l),l.showLoaderOnConfirm&&!l.preConfirm&&p(`showLoaderOnConfirm is set to true, but preConfirm is not defined. showLoaderOnConfirm should be used together with preConfirm, see usage example: https://sweetalert2.github.io/#ajax-request`),LL(l),typeof l.title=="string"&&(l.title=l.title.split(` `).join("
    ")),_s(l)}let wn;class _i{constructor(){if(typeof window>"u")return;wn=this;for(var u=arguments.length,g=new Array(u),x=0;x1&&arguments[1]!==void 0?arguments[1]:{};DO(Object.assign({},g,u)),S.currentInstance&&(S.currentInstance._destroy(),qt()&&dm()),S.currentInstance=wn;const x=BL(u,g);ML(x),Object.freeze(x),S.timeout&&(S.timeout.stop(),delete S.timeout),clearTimeout(S.restoreFocusTimeout);const F=DL(wn);return rm(wn,x),n.innerParams.set(wn,x),NL(wn,F,x)}then(u){return n.promise.get(this).then(u)}finally(u){return n.promise.get(this).finally(u)}}const NL=(l,u,g)=>new Promise((x,F)=>{const $e=Je=>{l.close({isDismissed:!0,dismiss:Je})};Cs.swalPromiseResolve.set(l,x),Cs.swalPromiseReject.set(l,F),u.confirmButton.onclick=()=>{QO(l)},u.denyButton.onclick=()=>{XO(l)},u.cancelButton.onclick=()=>{ZO(l,$e)},u.closeButton.onclick=()=>{$e(yi.close)},tL(l,u,$e),tO(l,S,g,$e),qO(l,g),AL(g),RL(S,g,$e),FL(u,g),setTimeout(()=>{u.container.scrollTop=0})}),BL=(l,u)=>{const g=bL(l),x=Object.assign({},wi,u,g,l);return x.showClass=Object.assign({},wi.showClass,x.showClass),x.hideClass=Object.assign({},wi.hideClass,x.hideClass),x},DL=l=>{const u={popup:j(),container:I(),actions:me(),confirmButton:Y(),denyButton:M(),cancelButton:ve(),loader:D(),closeButton:Fe(),validationMessage:se(),progressSteps:O()};return n.domCache.set(l,u),u},RL=(l,u,g)=>{const x=Le();Z(x),u.timer&&(l.timeout=new wL(()=>{g("timer"),delete l.timeout},u.timer),u.timerProgressBar&&(J(x),dt(x,u,"timerProgressBar"),setTimeout(()=>{l.timeout&&l.timeout.running&&C(u.timer)})))},FL=(l,u)=>{if(!u.toast){if(!E(u.allowEnterKey)){UL();return}jL(l,u)||kc(-1,1)}},jL=(l,u)=>u.focusDeny&&U(l.denyButton)?(l.denyButton.focus(),!0):u.focusCancel&&U(l.cancelButton)?(l.cancelButton.focus(),!0):u.focusConfirm&&U(l.confirmButton)?(l.confirmButton.focus(),!0):!1,UL=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const l=new Date,u=localStorage.getItem("swal-initiation");u?(l.getTime()-Date.parse(u))/(1e3*60*60*24)>3&&setTimeout(()=>{document.body.style.pointerEvents="none";const g=document.createElement("audio");g.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",g.loop=!0,document.body.appendChild(g),setTimeout(()=>{g.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation",`${l}`)}Object.assign(_i.prototype,bm),Object.assign(_i,yL),Object.keys(bm).forEach(l=>{_i[l]=function(){if(wn)return wn[l](...arguments)}}),_i.DismissReason=yi,_i.version="11.7.2";const aa=_i;return aa.default=aa,aa}),typeof Fn<"u"&&Fn.Sweetalert2&&(Fn.swal=Fn.sweetAlert=Fn.Swal=Fn.SweetAlert=Fn.Sweetalert2),typeof document<"u"&&function(n,o){var i=n.createElement("style");if(n.getElementsByTagName("head")[0].appendChild(i),i.styleSheet)i.styleSheet.disabled||(i.styleSheet.cssText=o);else try{i.innerHTML=o}catch{i.innerText=o}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:rgba(0,0,0,0) !important}.swal2-container.swal2-top-start,.swal2-container.swal2-center-start,.swal2-container.swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}.swal2-container.swal2-top,.swal2-container.swal2-center,.swal2-container.swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}.swal2-container.swal2-top-end,.swal2-container.swal2-center-end,.swal2-container.swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-start>.swal2-popup,.swal2-container.swal2-center-left>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-start>.swal2-popup,.swal2-container.swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-row>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none !important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:none}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:rgba(0,0,0,0);color:#f27474}.swal2-close:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-input,.swal2-file,.swal2-textarea,.swal2-select,.swal2-radio,.swal2-checkbox{margin:1em 2em 3px}.swal2-input,.swal2-file,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-input.swal2-inputerror,.swal2-file.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}.swal2-input:focus,.swal2-file:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-input::placeholder,.swal2-file::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-radio,.swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-radio label,.swal2-checkbox label{margin:0 .6em;font-size:1.125em}.swal2-radio input,.swal2-checkbox input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}')})(Dc);const fe=Dc.exports,qm=["ts","wmv","3pg","mp4","mpg","m4v","iso","mkv","avi","dvd","wmv","i00","i01","i02","i03","i04","i05","i06","i07","i08","i09","i10","i11","i12","mpeg","mov","m2ts","bup","vob","rmvb","md0","md1","md2","md3","md4","md5","mdf","mds","nrg","flv"],zm=["jpg","jpeg","png","gif","bmp","svg"],Vm=["mp3","wav","wma","ogg","ape","flac","aac"];function Rc(e){return JSON.parse(JSON.stringify(e))}function Es(e,...t){return new e(t[0])}async function Km(e){return new Promise((t,n)=>{Um({onload:o=>t(o),onerror:o=>n(o),...e})})}function $i(){return Math.floor(Date.now()/1e3)}function da(e,t,n="text/plain"){const o=document.createElement("a");document.body.appendChild(o),o.setAttribute("style","display:none");const i=new Blob([e],{type:n}),s=window.URL.createObjectURL(i);o.href=s,o.download=t,o.click(),window.URL.revokeObjectURL(s)}function Xt(e){if(typeof Ci=="function")return Ci(e,"text"),!0;const t=n=>{var o;(o=n.clipboardData)==null||o.setData("text/plain",e),n.preventDefault(),document.removeEventListener("copy",t)};return document.addEventListener("copy",t),document.execCommand("copy")}function Wm(e,t){return e=e.replace(/^[\\]+/g,""),t?"/"+e:e}function Fc(e){return/^magnet:\?xt=urn:btih/.test(e)}function jc(e){return/^ed2k:\/\/\|file\|/.test(e)}function Uc(e){return`magnet:?xt=urn:btih:${e.toUpperCase()}`}function Hc(e){const t=e.match(/([a-z\d]{32,40})/i);return t?t[1]:""}function Gm(e,t=!0){return(t?/^([a-z\d]{32})$|^([a-z\d]{40})$/i:/^[a-z\d]{32,40}$/i).test(e)}function Jm(e,t=location.href){const n=new RegExp("(\\?|#|&)"+e+"=([^&#]*)(&|#|$)"),o=t.match(n);return o?o[2]:""}function Ss(e,t=2){if(Number.isNaN(e)||(e=typeof e=="string"?parseInt(e):e,!e))return"0";const n=1024,o=t,i=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,s)).toFixed(o))+" "+i[s]}function qc(e){const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],n=new RegExp(`^(\\d+(?:\\.\\d+)?)(${t.join("|")})$`,"i"),o=e.match(n);if(!o)throw new Error(`无效的文件大小!${e}`);const i=parseFloat(o[1]),s=o[2].toUpperCase(),r=t.indexOf(s);if(r<0)throw new Error(`无效的文件大小!${e}`);return i*Math.pow(1024,r)}function zc(e,t=document,n=XPathResult.ORDERED_NODE_SNAPSHOT_TYPE){const o=[],i=document.evaluate(e,t,null,n,null);for(let s=0;s0&&r(a)}else{const a=o.querySelectorAll(e);a.length&&r(Array.from(a))}}try{return await Ei(s,t,n)}catch(r){throw console.warn("[find]",r),new Error(`查找元素超时:${e}`)}}async function rn(e,t=100,n=12e4){const o=e.indexOf("//")===0;function i(s){if(o){const r=zc(e);r.length>0&&s(unsafeWindow.$(r))}else{const r=unsafeWindow.$(e);r.length&&s(r)}}try{return await Ei(i,t,n)}catch(s){throw console.warn("[findWithJQuery]",s),new Error(`查找元素超时:${e}`)}}async function Ei(e,t,n){return new Promise(async(o,i)=>{if(typeof e!="function"){i("提供的参数`fulfill`不是一个Function!");return}let s=!1;e(c=>{s=!0,o(c)});let r=setInterval(async()=>{if(s){clearTimeout(a),clearInterval(r);return}e(c=>{clearTimeout(a),clearInterval(r),o(c)})},t),a=setTimeout(()=>{clearInterval(r),i("超时")},n)})}async function kt(e){return new Promise(t=>{setTimeout(t,e)})}function fa(e){const t=new URLSearchParams;let n;for(n in e)t.append(n,e[n].toString());return t.toString()}async function ue(e){return fe.fire({toast:!0,position:"top",showConfirmButton:!1,timer:3e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",fe.stopTimer),t.addEventListener("mouseleave",fe.resumeTimer)},...e})}function As(e,t){t=t||window,t.postMessage(e)}function ho(e,t,n){if(n){const o=ks(e,{});ca(e,{...o,...t})}else ca(e,t)}function Bt(e,t,n){let o;return function(...i){const s=()=>{o=void 0,n||e.apply(this,i)},r=n&&o===void 0;clearTimeout(o),o=setTimeout(s,t),r&&e.apply(this,i)}}function Ym(e){return e?qm.indexOf(e.toLowerCase())>-1:!1}function Qm(e){return e?zm.indexOf(e.toLowerCase())>-1:!1}function Xm(e){return e?Vm.indexOf(e.toLowerCase())>-1:!1}var Me=(e=>(e.listItemHover="listItemHover",e.listItemHoverSub="listItemHoverSub",e.listItemContext="listItemContext",e.listItemContextSub="listItemContextSub",e.selection="selection",e.selectionSub="selectionSub",e.dirContext="dirContext",e.dirContextSub="dirContextSub",e))(Me||{}),Si=(e=>(e.listItemHover="列表项悬浮菜单",e.listItemHoverSub="列表项悬浮子菜单",e.listItemContext="列表项右键菜单",e.listItemContextSub="列表项右键子菜单",e.selection="选中项菜单",e.selectionSub="选中项子菜单",e.dirContext="当前目录右键菜单",e.dirContextSub="当前目录右键子菜单",e))(Si||{}),mo=(e=>(e[e.after=0]="after",e[e.before=1]="before",e))(mo||{});const Ze={get:async(e,t)=>ks(e,t),set:async(e,t)=>ca(e,t),remove:async e=>Fm(e)},Vc="clouddrive_configs";var Kc=(e=>(e.windows="windows",e.macos="macos",e.linux="linux",e.android="android",e))(Kc||{});function pa(e){return{active:!1,url:"http://localhost:19798",root:"/115",memo:"",platform:void 0,...e}}async function Wc(){const e=[pa()],t=await Ze.get(Vc,e);return t||e}async function Gc(e){e.some(t=>t.active)||(e[0].active=!0),await Ze.set(Vc,e)}async function Ai(){return(await Wc()).find(t=>t.active)||pa()}var Ps=(e=>(e.play="play",e.download="download",e))(Ps||{});function Jc(e){return e.startsWith("file://")}async function Wo(e,t,n="play"){e.platform==="macos"&&(t=t.normalize("NFD"));let{url:o,root:i}=e;if(!o)throw new Error("未设置CloudDrive地址!");(o.startsWith("/")||o.startsWith("\\"))&&(o=`file:///${o}`),Jc(o);const s=/^https?:\/\//.test(o);if(s&&!i)throw new Error("当协议为http/https时,必须设置CloudDrive资源根路径!");i&&(i=i.replace(/^(\/+)?/g,"/")),t=t.replace(/^(\/+)?/g,"/");const r=`${i}${t}`,a=n==="play"?"True":"False";let c="";return s?c=`${o}/static/${o.replace("://","/")}/${a}/${encodeURIComponent(r)}`:(o=o.replace(/\/+$/,""),c=`${o}${r}`),console.log("[Cloud115 Enhancer] buildCloudDriveUrl",c),c}async function ha(e,t){let{url:n,root:o}=e;if(!n)throw new Error("未设置CloudDrive地址!");return(n.startsWith("/")||n.startsWith("\\"))&&(n=`file:///${n}`),Jc(n)?await Wo(e,t,"play"):await Wo(e,t,"play")+".clfsplaylist.m3u"}var Et=(e=>(e[e.any=-999]="any",e[e.failed=-1]="failed",e[e.illegal=0]="illegal",e[e.ing=1]="ing",e[e.success=2]="success",e))(Et||{});const Zm={[-1]:"失败",[0]:"违规",[1]:"下载中",[2]:"成功"};var St=(e=>(e.all="all",e.failed="failed",e.success="success",e.magnet="magnet",e.magnetEd2k="magnetEd2k",e))(St||{}),ma=(e=>(e[e.true=1]="true",e[e.false=0]="false",e))(ma||{}),yt=(e=>(e[e.all=0]="all",e[e.video=4]="video",e[e.audio=3]="audio",e[e.image=2]="image",e[e.doc=1]="doc",e[e.app=6]="app",e[e.archive=5]="archive",e))(yt||{}),tt=(e=>(e.all="全部",e.video="视频",e.audio="音频",e.image="图片",e.doc="文档",e.app="应用",e.archive="压缩包",e))(tt||{}),Yc=(e=>(e.userPtime="user_ptime",e.fileName="file_name",e.fileSize="file_size",e.fileType="file_type",e))(Yc||{});function eg(e){return{offset:0,limit:1150,aid:1,cid:"",format:"json",o:"user_ptime",asc:0,search_value:"",...e}}function Pi(e){return{aid:1,cid:"",o:"user_ptime",asc:0,offset:0,show_dir:1,limit:115,natsort:0,format:"json",...e}}function Qc(e,t){return function(){return e.apply(t,arguments)}}const{toString:Xc}=Object.prototype,{getPrototypeOf:ga}=Object,ya=(e=>t=>{const n=Xc.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),bn=e=>(e=e.toLowerCase(),t=>ya(t)===e),Is=e=>t=>typeof t===e,{isArray:Go}=Array,Ii=Is("undefined");function tg(e){return e!==null&&!Ii(e)&&e.constructor!==null&&!Ii(e.constructor)&&jn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Zc=bn("ArrayBuffer");function ng(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Zc(e.buffer),t}const og=Is("string"),jn=Is("function"),eu=Is("number"),wa=e=>e!==null&&typeof e=="object",ig=e=>e===!0||e===!1,Ts=e=>{if(ya(e)!=="object")return!1;const t=ga(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},sg=bn("Date"),rg=bn("File"),ag=bn("Blob"),lg=bn("FileList"),cg=e=>wa(e)&&jn(e.pipe),ug=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||Xc.call(e)===t||jn(e.toString)&&e.toString()===t)},dg=bn("URLSearchParams"),fg=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ti(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,i;if(typeof e!="object"&&(e=[e]),Go(e))for(o=0,i=e.length;o0;)if(i=n[o],t===i.toLowerCase())return i;return null}const nu=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),ou=e=>!Ii(e)&&e!==nu;function ba(){const{caseless:e}=ou(this)&&this||{},t={},n=(o,i)=>{const s=e&&tu(t,i)||i;Ts(t[s])&&Ts(o)?t[s]=ba(t[s],o):Ts(o)?t[s]=ba({},o):Go(o)?t[s]=o.slice():t[s]=o};for(let o=0,i=arguments.length;o(Ti(t,(i,s)=>{n&&jn(i)?e[s]=Qc(i,n):e[s]=i},{allOwnKeys:o}),e),hg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mg=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},gg=(e,t,n,o)=>{let i,s,r;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)r=i[s],(!o||o(r,e,t))&&!a[r]&&(t[r]=e[r],a[r]=!0);e=n!==!1&&ga(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},yg=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},wg=e=>{if(!e)return null;if(Go(e))return e;let t=e.length;if(!eu(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},bg=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ga(Uint8Array)),_g=(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=o.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},vg=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},xg=bn("HTMLFormElement"),Cg=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,i){return o.toUpperCase()+i}),iu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$g=bn("RegExp"),su=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};Ti(n,(i,s)=>{t(i,s,e)!==!1&&(o[s]=i)}),Object.defineProperties(e,o)},kg=e=>{su(e,(t,n)=>{if(jn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(!!jn(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Eg=(e,t)=>{const n={},o=i=>{i.forEach(s=>{n[s]=!0})};return Go(e)?o(e):o(String(e).split(t)),n},Sg=()=>{},Ag=(e,t)=>(e=+e,Number.isFinite(e)?e:t),_a="abcdefghijklmnopqrstuvwxyz",ru="0123456789",au={DIGIT:ru,ALPHA:_a,ALPHA_DIGIT:_a+_a.toUpperCase()+ru},Pg=(e=16,t=au.ALPHA_DIGIT)=>{let n="";const{length:o}=t;for(;e--;)n+=t[Math.random()*o|0];return n};function Ig(e){return!!(e&&jn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const K={isArray:Go,isArrayBuffer:Zc,isBuffer:tg,isFormData:ug,isArrayBufferView:ng,isString:og,isNumber:eu,isBoolean:ig,isObject:wa,isPlainObject:Ts,isUndefined:Ii,isDate:sg,isFile:rg,isBlob:ag,isRegExp:$g,isFunction:jn,isStream:cg,isURLSearchParams:dg,isTypedArray:bg,isFileList:lg,forEach:Ti,merge:ba,extend:pg,trim:fg,stripBOM:hg,inherits:mg,toFlatObject:gg,kindOf:ya,kindOfTest:bn,endsWith:yg,toArray:wg,forEachEntry:_g,matchAll:vg,isHTMLForm:xg,hasOwnProperty:iu,hasOwnProp:iu,reduceDescriptors:su,freezeMethods:kg,toObjectSet:Eg,toCamelCase:Cg,noop:Sg,toFiniteNumber:Ag,findKey:tu,global:nu,isContextDefined:ou,ALPHABET:au,generateString:Pg,isSpecCompliantForm:Ig,toJSONObject:e=>{const t=new Array(10),n=(o,i)=>{if(wa(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[i]=o;const s=Go(o)?[]:{};return Ti(o,(r,a)=>{const c=n(r,i+1);!Ii(c)&&(s[a]=c)}),t[i]=void 0,s}}return o};return n(e,0)}};function He(e,t,n,o,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),i&&(this.response=i)}K.inherits(He,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const lu=He.prototype,cu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{cu[e]={value:e}}),Object.defineProperties(He,cu),Object.defineProperty(lu,"isAxiosError",{value:!0}),He.from=(e,t,n,o,i,s)=>{const r=Object.create(lu);return K.toFlatObject(e,r,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),He.call(r,e.message,t,n,o,i),r.cause=e,r.name=e.name,s&&Object.assign(r,s),r};const Tg=null;function va(e){return K.isPlainObject(e)||K.isArray(e)}function uu(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function du(e,t,n){return e?e.concat(t).map(function(i,s){return i=uu(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function Og(e){return K.isArray(e)&&!e.some(va)}const Lg=K.toFlatObject(K,{},null,function(t){return/^is[A-Z]/.test(t)});function Os(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,T){return!K.isUndefined(T[E])});const o=n.metaTokens,i=n.visitor||p,s=n.dots,r=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(i))throw new TypeError("visitor must be a function");function d(_){if(_===null)return"";if(K.isDate(_))return _.toISOString();if(!c&&K.isBlob(_))throw new He("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(_)||K.isTypedArray(_)?c&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function p(_,E,T){let B=_;if(_&&!T&&typeof _=="object"){if(K.endsWith(E,"{}"))E=o?E:E.slice(0,-2),_=JSON.stringify(_);else if(K.isArray(_)&&Og(_)||(K.isFileList(_)||K.endsWith(E,"[]"))&&(B=K.toArray(_)))return E=uu(E),B.forEach(function(I,H){!(K.isUndefined(I)||I===null)&&t.append(r===!0?du([E],H,s):r===null?E:E+"[]",d(I))}),!1}return va(_)?!0:(t.append(du(T,E,s),d(_)),!1)}const h=[],y=Object.assign(Lg,{defaultVisitor:p,convertValue:d,isVisitable:va});function v(_,E){if(!K.isUndefined(_)){if(h.indexOf(_)!==-1)throw Error("Circular reference detected in "+E.join("."));h.push(_),K.forEach(_,function(B,P){(!(K.isUndefined(B)||B===null)&&i.call(t,B,K.isString(P)?P.trim():P,E,y))===!0&&v(B,E?E.concat(P):[P])}),h.pop()}}if(!K.isObject(e))throw new TypeError("data must be an object");return v(e),t}function fu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function xa(e,t){this._pairs=[],e&&Os(e,this,t)}const pu=xa.prototype;pu.append=function(t,n){this._pairs.push([t,n])},pu.toString=function(t){const n=t?function(o){return t.call(this,o,fu)}:fu;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Mg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function hu(e,t,n){if(!t)return e;const o=n&&n.encode||Mg,i=n&&n.serialize;let s;if(i?s=i(t,n):s=K.isURLSearchParams(t)?t.toString():new xa(t,n).toString(o),s){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Ng{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){K.forEach(this.handlers,function(o){o!==null&&t(o)})}}const mu=Ng,gu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Bg=typeof URLSearchParams<"u"?URLSearchParams:xa,Dg=typeof FormData<"u"?FormData:null,Rg=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Fg=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),an={isBrowser:!0,classes:{URLSearchParams:Bg,FormData:Dg,Blob},isStandardBrowserEnv:Rg,isStandardBrowserWebWorkerEnv:Fg,protocols:["http","https","file","blob","url","data"]};function jg(e,t){return Os(e,new an.classes.URLSearchParams,Object.assign({visitor:function(n,o,i,s){return an.isNode&&K.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Ug(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Hg(e){const t={},n=Object.keys(e);let o;const i=n.length;let s;for(o=0;o=n.length;return r=!r&&K.isArray(i)?i.length:r,c?(K.hasOwnProp(i,r)?i[r]=[i[r],o]:i[r]=o,!a):((!i[r]||!K.isObject(i[r]))&&(i[r]=[]),t(n,o,i[r],s)&&K.isArray(i[r])&&(i[r]=Hg(i[r])),!a)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,(o,i)=>{t(Ug(o),i,n,0)}),n}return null}const qg={"Content-Type":void 0};function zg(e,t,n){if(K.isString(e))try{return(t||JSON.parse)(e),K.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const Ls={transitional:gu,adapter:["xhr","http"],transformRequest:[function(t,n){const o=n.getContentType()||"",i=o.indexOf("application/json")>-1,s=K.isObject(t);if(s&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return i&&i?JSON.stringify(yu(t)):t;if(K.isArrayBuffer(t)||K.isBuffer(t)||K.isStream(t)||K.isFile(t)||K.isBlob(t))return t;if(K.isArrayBufferView(t))return t.buffer;if(K.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return jg(t,this.formSerializer).toString();if((a=K.isFileList(t))||o.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Os(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),zg(t)):t}],transformResponse:[function(t){const n=this.transitional||Ls.transitional,o=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&K.isString(t)&&(o&&!this.responseType||i)){const r=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(r)throw a.name==="SyntaxError"?He.from(a,He.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:an.classes.FormData,Blob:an.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};K.forEach(["delete","get","head"],function(t){Ls.headers[t]={}}),K.forEach(["post","put","patch"],function(t){Ls.headers[t]=K.merge(qg)});const Ca=Ls,Vg=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Kg=e=>{const t={};let n,o,i;return e&&e.split(` `).forEach(function(r){i=r.indexOf(":"),n=r.substring(0,i).trim().toLowerCase(),o=r.substring(i+1).trim(),!(!n||t[n]&&Vg[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},wu=Symbol("internals");function Oi(e){return e&&String(e).trim().toLowerCase()}function Ms(e){return e===!1||e==null?e:K.isArray(e)?e.map(Ms):String(e)}function Wg(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}function Gg(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function $a(e,t,n,o,i){if(K.isFunction(o))return o.call(this,t,n);if(i&&(t=n),!!K.isString(t)){if(K.isString(o))return t.indexOf(o)!==-1;if(K.isRegExp(o))return o.test(t)}}function Jg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function Yg(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(i,s,r){return this[o].call(this,t,i,s,r)},configurable:!0})})}class Ns{constructor(t){t&&this.set(t)}set(t,n,o){const i=this;function s(a,c,d){const p=Oi(c);if(!p)throw new Error("header name must be a non-empty string");const h=K.findKey(i,p);(!h||i[h]===void 0||d===!0||d===void 0&&i[h]!==!1)&&(i[h||c]=Ms(a))}const r=(a,c)=>K.forEach(a,(d,p)=>s(d,p,c));return K.isPlainObject(t)||t instanceof this.constructor?r(t,n):K.isString(t)&&(t=t.trim())&&!Gg(t)?r(Kg(t),n):t!=null&&s(n,t,o),this}get(t,n){if(t=Oi(t),t){const o=K.findKey(this,t);if(o){const i=this[o];if(!n)return i;if(n===!0)return Wg(i);if(K.isFunction(n))return n.call(this,i,o);if(K.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Oi(t),t){const o=K.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||$a(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let i=!1;function s(r){if(r=Oi(r),r){const a=K.findKey(o,r);a&&(!n||$a(o,o[a],a,n))&&(delete o[a],i=!0)}}return K.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let o=n.length,i=!1;for(;o--;){const s=n[o];(!t||$a(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,o={};return K.forEach(this,(i,s)=>{const r=K.findKey(o,s);if(r){n[r]=Ms(i),delete n[s];return}const a=t?Jg(s):String(s).trim();a!==s&&delete n[s],n[a]=Ms(i),o[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return K.forEach(this,(o,i)=>{o!=null&&o!==!1&&(n[i]=t&&K.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(i=>o.set(i)),o}static accessor(t){const o=(this[wu]=this[wu]={accessors:{}}).accessors,i=this.prototype;function s(r){const a=Oi(r);o[a]||(Yg(i,r),o[a]=!0)}return K.isArray(t)?t.forEach(s):s(t),this}}Ns.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.freezeMethods(Ns.prototype),K.freezeMethods(Ns);const _n=Ns;function ka(e,t){const n=this||Ca,o=t||n,i=_n.from(o.headers);let s=o.data;return K.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function bu(e){return!!(e&&e.__CANCEL__)}function Li(e,t,n){He.call(this,e==null?"canceled":e,He.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(Li,He,{__CANCEL__:!0});function Qg(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new He("Request failed with status code "+n.status,[He.ERR_BAD_REQUEST,He.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Xg=an.isStandardBrowserEnv?function(){return{write:function(n,o,i,s,r,a){const c=[];c.push(n+"="+encodeURIComponent(o)),K.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),K.isString(s)&&c.push("path="+s),K.isString(r)&&c.push("domain="+r),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const o=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Zg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ey(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function _u(e,t){return e&&!Zg(t)?ey(e,t):t}const ty=an.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function i(s){let r=s;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=i(window.location.href),function(r){const a=K.isString(r)?i(r):r;return a.protocol===o.protocol&&a.host===o.host}}():function(){return function(){return!0}}();function ny(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function oy(e,t){e=e||10;const n=new Array(e),o=new Array(e);let i=0,s=0,r;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),p=o[s];r||(r=d),n[i]=c,o[i]=d;let h=s,y=0;for(;h!==i;)y+=n[h++],h=h%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),d-r{const s=i.loaded,r=i.lengthComputable?i.total:void 0,a=s-n,c=o(a),d=s<=r;n=s;const p={loaded:s,total:r,progress:r?s/r:void 0,bytes:a,rate:c||void 0,estimated:c&&r&&d?(r-s)/c:void 0,event:i};p[t?"download":"upload"]=!0,e(p)}}const Bs={http:Tg,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){let i=e.data;const s=_n.from(e.headers).normalize(),r=e.responseType;let a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}K.isFormData(i)&&(an.isStandardBrowserEnv||an.isStandardBrowserWebWorkerEnv)&&s.setContentType(!1);let d=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(v+":"+_))}const p=_u(e.baseURL,e.url);d.open(e.method.toUpperCase(),hu(p,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function h(){if(!d)return;const v=_n.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),E={data:!r||r==="text"||r==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:v,config:e,request:d};Qg(function(B){n(B),c()},function(B){o(B),c()},E),d=null}if("onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(h)},d.onabort=function(){!d||(o(new He("Request aborted",He.ECONNABORTED,e,d)),d=null)},d.onerror=function(){o(new He("Network Error",He.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let _=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const E=e.transitional||gu;e.timeoutErrorMessage&&(_=e.timeoutErrorMessage),o(new He(_,E.clarifyTimeoutError?He.ETIMEDOUT:He.ECONNABORTED,e,d)),d=null},an.isStandardBrowserEnv){const v=(e.withCredentials||ty(p))&&e.xsrfCookieName&&Xg.read(e.xsrfCookieName);v&&s.set(e.xsrfHeaderName,v)}i===void 0&&s.setContentType(null),"setRequestHeader"in d&&K.forEach(s.toJSON(),function(_,E){d.setRequestHeader(E,_)}),K.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),r&&r!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",vu(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",vu(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=v=>{!d||(o(!v||v.type?new Li(null,e,d):v),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const y=ny(p);if(y&&an.protocols.indexOf(y)===-1){o(new He("Unsupported protocol "+y+":",He.ERR_BAD_REQUEST,e));return}d.send(i||null)})}};K.forEach(Bs,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const iy={getAdapter:e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let n,o;for(let i=0;ie instanceof _n?e.toJSON():e;function Jo(e,t){t=t||{};const n={};function o(d,p,h){return K.isPlainObject(d)&&K.isPlainObject(p)?K.merge.call({caseless:h},d,p):K.isPlainObject(p)?K.merge({},p):K.isArray(p)?p.slice():p}function i(d,p,h){if(K.isUndefined(p)){if(!K.isUndefined(d))return o(void 0,d,h)}else return o(d,p,h)}function s(d,p){if(!K.isUndefined(p))return o(void 0,p)}function r(d,p){if(K.isUndefined(p)){if(!K.isUndefined(d))return o(void 0,d)}else return o(void 0,p)}function a(d,p,h){if(h in t)return o(d,p);if(h in e)return o(void 0,d)}const c={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(d,p)=>i(Cu(d),Cu(p),!0)};return K.forEach(Object.keys(e).concat(Object.keys(t)),function(p){const h=c[p]||i,y=h(e[p],t[p],p);K.isUndefined(y)&&h!==a||(n[p]=y)}),n}const $u="1.3.3",Sa={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Sa[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const ku={};Sa.transitional=function(t,n,o){function i(s,r){return"[Axios v"+$u+"] Transitional option '"+s+"'"+r+(o?". "+o:"")}return(s,r,a)=>{if(t===!1)throw new He(i(r," has been removed"+(n?" in "+n:"")),He.ERR_DEPRECATED);return n&&!ku[r]&&(ku[r]=!0,console.warn(i(r," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,r,a):!0}};function sy(e,t,n){if(typeof e!="object")throw new He("options must be an object",He.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let i=o.length;for(;i-- >0;){const s=o[i],r=t[s];if(r){const a=e[s],c=a===void 0||r(a,s,e);if(c!==!0)throw new He("option "+s+" must be "+c,He.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new He("Unknown option "+s,He.ERR_BAD_OPTION)}}const Aa={assertOptions:sy,validators:Sa},Un=Aa.validators;class Ds{constructor(t){this.defaults=t,this.interceptors={request:new mu,response:new mu}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Jo(this.defaults,n);const{transitional:o,paramsSerializer:i,headers:s}=n;o!==void 0&&Aa.assertOptions(o,{silentJSONParsing:Un.transitional(Un.boolean),forcedJSONParsing:Un.transitional(Un.boolean),clarifyTimeoutError:Un.transitional(Un.boolean)},!1),i!==void 0&&Aa.assertOptions(i,{encode:Un.function,serialize:Un.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r;r=s&&K.merge(s.common,s[n.method]),r&&K.forEach(["delete","get","head","post","put","patch","common"],_=>{delete s[_]}),n.headers=_n.concat(r,s);const a=[];let c=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(c=c&&E.synchronous,a.unshift(E.fulfilled,E.rejected))});const d=[];this.interceptors.response.forEach(function(E){d.push(E.fulfilled,E.rejected)});let p,h=0,y;if(!c){const _=[xu.bind(this),void 0];for(_.unshift.apply(_,a),_.push.apply(_,d),y=_.length,p=Promise.resolve(n);h{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](i);o._listeners=null}),this.promise.then=i=>{let s;const r=new Promise(a=>{o.subscribe(a),s=a}).then(i);return r.cancel=function(){o.unsubscribe(s)},r},t(function(s,r,a){o.reason||(o.reason=new Li(s,r,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Pa(function(i){t=i}),cancel:t}}}const ry=Pa;function ay(e){return function(n){return e.apply(null,n)}}function ly(e){return K.isObject(e)&&e.isAxiosError===!0}const Ia={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ia).forEach(([e,t])=>{Ia[t]=e});const cy=Ia;function Eu(e){const t=new Rs(e),n=Qc(Rs.prototype.request,t);return K.extend(n,Rs.prototype,t,{allOwnKeys:!0}),K.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Eu(Jo(e,i))},n}const rt=Eu(Ca);rt.Axios=Rs,rt.CanceledError=Li,rt.CancelToken=ry,rt.isCancel=bu,rt.VERSION=$u,rt.toFormData=Os,rt.AxiosError=He,rt.Cancel=rt.CanceledError,rt.all=function(t){return Promise.all(t)},rt.spread=ay,rt.isAxiosError=ly,rt.mergeConfig=Jo,rt.AxiosHeaders=_n,rt.formToJSON=e=>yu(K.isHTMLForm(e)?new FormData(e):e),rt.HttpStatusCode=cy,rt.default=rt;const Su=rt,{Axios:tM,AxiosError:uy,CanceledError:nM,isCancel:oM,CancelToken:iM,VERSION:sM,all:rM,Cancel:aM,isAxiosError:lM,spread:cM,toFormData:dy,AxiosHeaders:uM,HttpStatusCode:dM,formToJSON:fM,mergeConfig:pM}=Su;class Au extends Error{}class Ta extends Au{constructor(){super(...arguments);Ie(this,"message","搜索失败!")}}class Pu extends Ta{constructor(){super(...arguments);Ie(this,"message","搜索请求响应内容为空!")}}class Iu extends Au{constructor(){super(...arguments);Ie(this,"message","目录不存在!")}toString(){return this.message}}var Tu=(e=>(e[e.exist=20004]="exist",e))(Tu||{});class at{constructor(){this._dataLength=0,this._bufferLength=0,this._state=new Int32Array(4),this._buffer=new ArrayBuffer(68),this._buffer8=new Uint8Array(this._buffer,0,68),this._buffer32=new Uint32Array(this._buffer,0,17),this.start()}static hashStr(t,n=!1){return this.onePassHasher.start().appendStr(t).end(n)}static hashAsciiStr(t,n=!1){return this.onePassHasher.start().appendAsciiStr(t).end(n)}static _hex(t){const n=at.hexChars,o=at.hexOut;let i,s,r,a;for(a=0;a<4;a+=1)for(s=a*8,i=t[a],r=0;r<8;r+=2)o[s+1+r]=n.charAt(i&15),i>>>=4,o[s+0+r]=n.charAt(i&15),i>>>=4;return o.join("")}static _md5cycle(t,n){let o=t[0],i=t[1],s=t[2],r=t[3];o+=(i&s|~i&r)+n[0]-680876936|0,o=(o<<7|o>>>25)+i|0,r+=(o&i|~o&s)+n[1]-389564586|0,r=(r<<12|r>>>20)+o|0,s+=(r&o|~r&i)+n[2]+606105819|0,s=(s<<17|s>>>15)+r|0,i+=(s&r|~s&o)+n[3]-1044525330|0,i=(i<<22|i>>>10)+s|0,o+=(i&s|~i&r)+n[4]-176418897|0,o=(o<<7|o>>>25)+i|0,r+=(o&i|~o&s)+n[5]+1200080426|0,r=(r<<12|r>>>20)+o|0,s+=(r&o|~r&i)+n[6]-1473231341|0,s=(s<<17|s>>>15)+r|0,i+=(s&r|~s&o)+n[7]-45705983|0,i=(i<<22|i>>>10)+s|0,o+=(i&s|~i&r)+n[8]+1770035416|0,o=(o<<7|o>>>25)+i|0,r+=(o&i|~o&s)+n[9]-1958414417|0,r=(r<<12|r>>>20)+o|0,s+=(r&o|~r&i)+n[10]-42063|0,s=(s<<17|s>>>15)+r|0,i+=(s&r|~s&o)+n[11]-1990404162|0,i=(i<<22|i>>>10)+s|0,o+=(i&s|~i&r)+n[12]+1804603682|0,o=(o<<7|o>>>25)+i|0,r+=(o&i|~o&s)+n[13]-40341101|0,r=(r<<12|r>>>20)+o|0,s+=(r&o|~r&i)+n[14]-1502002290|0,s=(s<<17|s>>>15)+r|0,i+=(s&r|~s&o)+n[15]+1236535329|0,i=(i<<22|i>>>10)+s|0,o+=(i&r|s&~r)+n[1]-165796510|0,o=(o<<5|o>>>27)+i|0,r+=(o&s|i&~s)+n[6]-1069501632|0,r=(r<<9|r>>>23)+o|0,s+=(r&i|o&~i)+n[11]+643717713|0,s=(s<<14|s>>>18)+r|0,i+=(s&o|r&~o)+n[0]-373897302|0,i=(i<<20|i>>>12)+s|0,o+=(i&r|s&~r)+n[5]-701558691|0,o=(o<<5|o>>>27)+i|0,r+=(o&s|i&~s)+n[10]+38016083|0,r=(r<<9|r>>>23)+o|0,s+=(r&i|o&~i)+n[15]-660478335|0,s=(s<<14|s>>>18)+r|0,i+=(s&o|r&~o)+n[4]-405537848|0,i=(i<<20|i>>>12)+s|0,o+=(i&r|s&~r)+n[9]+568446438|0,o=(o<<5|o>>>27)+i|0,r+=(o&s|i&~s)+n[14]-1019803690|0,r=(r<<9|r>>>23)+o|0,s+=(r&i|o&~i)+n[3]-187363961|0,s=(s<<14|s>>>18)+r|0,i+=(s&o|r&~o)+n[8]+1163531501|0,i=(i<<20|i>>>12)+s|0,o+=(i&r|s&~r)+n[13]-1444681467|0,o=(o<<5|o>>>27)+i|0,r+=(o&s|i&~s)+n[2]-51403784|0,r=(r<<9|r>>>23)+o|0,s+=(r&i|o&~i)+n[7]+1735328473|0,s=(s<<14|s>>>18)+r|0,i+=(s&o|r&~o)+n[12]-1926607734|0,i=(i<<20|i>>>12)+s|0,o+=(i^s^r)+n[5]-378558|0,o=(o<<4|o>>>28)+i|0,r+=(o^i^s)+n[8]-2022574463|0,r=(r<<11|r>>>21)+o|0,s+=(r^o^i)+n[11]+1839030562|0,s=(s<<16|s>>>16)+r|0,i+=(s^r^o)+n[14]-35309556|0,i=(i<<23|i>>>9)+s|0,o+=(i^s^r)+n[1]-1530992060|0,o=(o<<4|o>>>28)+i|0,r+=(o^i^s)+n[4]+1272893353|0,r=(r<<11|r>>>21)+o|0,s+=(r^o^i)+n[7]-155497632|0,s=(s<<16|s>>>16)+r|0,i+=(s^r^o)+n[10]-1094730640|0,i=(i<<23|i>>>9)+s|0,o+=(i^s^r)+n[13]+681279174|0,o=(o<<4|o>>>28)+i|0,r+=(o^i^s)+n[0]-358537222|0,r=(r<<11|r>>>21)+o|0,s+=(r^o^i)+n[3]-722521979|0,s=(s<<16|s>>>16)+r|0,i+=(s^r^o)+n[6]+76029189|0,i=(i<<23|i>>>9)+s|0,o+=(i^s^r)+n[9]-640364487|0,o=(o<<4|o>>>28)+i|0,r+=(o^i^s)+n[12]-421815835|0,r=(r<<11|r>>>21)+o|0,s+=(r^o^i)+n[15]+530742520|0,s=(s<<16|s>>>16)+r|0,i+=(s^r^o)+n[2]-995338651|0,i=(i<<23|i>>>9)+s|0,o+=(s^(i|~r))+n[0]-198630844|0,o=(o<<6|o>>>26)+i|0,r+=(i^(o|~s))+n[7]+1126891415|0,r=(r<<10|r>>>22)+o|0,s+=(o^(r|~i))+n[14]-1416354905|0,s=(s<<15|s>>>17)+r|0,i+=(r^(s|~o))+n[5]-57434055|0,i=(i<<21|i>>>11)+s|0,o+=(s^(i|~r))+n[12]+1700485571|0,o=(o<<6|o>>>26)+i|0,r+=(i^(o|~s))+n[3]-1894986606|0,r=(r<<10|r>>>22)+o|0,s+=(o^(r|~i))+n[10]-1051523|0,s=(s<<15|s>>>17)+r|0,i+=(r^(s|~o))+n[1]-2054922799|0,i=(i<<21|i>>>11)+s|0,o+=(s^(i|~r))+n[8]+1873313359|0,o=(o<<6|o>>>26)+i|0,r+=(i^(o|~s))+n[15]-30611744|0,r=(r<<10|r>>>22)+o|0,s+=(o^(r|~i))+n[6]-1560198380|0,s=(s<<15|s>>>17)+r|0,i+=(r^(s|~o))+n[13]+1309151649|0,i=(i<<21|i>>>11)+s|0,o+=(s^(i|~r))+n[4]-145523070|0,o=(o<<6|o>>>26)+i|0,r+=(i^(o|~s))+n[11]-1120210379|0,r=(r<<10|r>>>22)+o|0,s+=(o^(r|~i))+n[2]+718787259|0,s=(s<<15|s>>>17)+r|0,i+=(r^(s|~o))+n[9]-343485551|0,i=(i<<21|i>>>11)+s|0,t[0]=o+t[0]|0,t[1]=i+t[1]|0,t[2]=s+t[2]|0,t[3]=r+t[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(at.stateIdentity),this}appendStr(t){const n=this._buffer8,o=this._buffer32;let i=this._bufferLength,s,r;for(r=0;r>>6)+192,n[i++]=s&63|128;else if(s<55296||s>56319)n[i++]=(s>>>12)+224,n[i++]=s>>>6&63|128,n[i++]=s&63|128;else{if(s=(s-55296)*1024+(t.charCodeAt(++r)-56320)+65536,s>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");n[i++]=(s>>>18)+240,n[i++]=s>>>12&63|128,n[i++]=s>>>6&63|128,n[i++]=s&63|128}i>=64&&(this._dataLength+=64,at._md5cycle(this._state,o),i-=64,o[0]=o[16])}return this._bufferLength=i,this}appendAsciiStr(t){const n=this._buffer8,o=this._buffer32;let i=this._bufferLength,s,r=0;for(;;){for(s=Math.min(t.length-r,64-i);s--;)n[i++]=t.charCodeAt(r++);if(i<64)break;this._dataLength+=64,at._md5cycle(this._state,o),i=0}return this._bufferLength=i,this}appendByteArray(t){const n=this._buffer8,o=this._buffer32;let i=this._bufferLength,s,r=0;for(;;){for(s=Math.min(t.length-r,64-i);s--;)n[i++]=t[r++];if(i<64)break;this._dataLength+=64,at._md5cycle(this._state,o),i=0}return this._bufferLength=i,this}getState(){const t=this._state;return{buffer:String.fromCharCode.apply(null,Array.from(this._buffer8)),buflen:this._bufferLength,length:this._dataLength,state:[t[0],t[1],t[2],t[3]]}}setState(t){const n=t.buffer,o=t.state,i=this._state;let s;for(this._dataLength=t.length,this._bufferLength=t.buflen,i[0]=o[0],i[1]=o[1],i[2]=o[2],i[3]=o[3],s=0;s>2)+1;this._dataLength+=n;const r=this._dataLength*8;if(o[n]=128,o[n+1]=o[n+2]=o[n+3]=0,i.set(at.buffer32Identity.subarray(s),s),n>55&&(at._md5cycle(this._state,i),i.set(at.buffer32Identity)),r<=4294967295)i[14]=r;else{const a=r.toString(16).match(/(.*?)(.{0,8})$/);if(a===null)return;const c=parseInt(a[2],16),d=parseInt(a[1],16)||0;i[14]=c,i[15]=d}return at._md5cycle(this._state,i),t?this._state:at._hex(this._state)}}if(at.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),at.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),at.hexChars="0123456789abcdef",at.hexOut=[],at.onePassHasher=new at,at.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592")throw new Error("Md5 self test failed.");var fy={exports:{}};(function(e){var t=function(n){var o=1e7,i=7,s=9007199254740992,r=_(s),a="0123456789abcdefghijklmnopqrstuvwxyz",c=typeof BigInt=="function";function d(m,w,C,k){return typeof m>"u"?d[0]:typeof w<"u"?+w==10&&!C?U(m):z(m,w,C,k):U(m)}function p(m,w){this.value=m,this.sign=w,this.isSmall=!1}p.prototype=Object.create(d.prototype);function h(m){this.value=m,this.sign=m<0,this.isSmall=!0}h.prototype=Object.create(d.prototype);function y(m){this.value=m}y.prototype=Object.create(d.prototype);function v(m){return-s0?Math.floor(m):Math.ceil(m)}function I(m,w){var C=m.length,k=w.length,L=new Array(C),S=0,q=o,V,te;for(te=0;te=q?1:0,L[te]=V-S*q;for(;te0&&L.push(S),L}function H(m,w){return m.length>=w.length?I(m,w):I(w,m)}function ie(m,w){var C=m.length,k=new Array(C),L=o,S,q;for(q=0;q0;)k[q++]=w%L,w=Math.floor(w/L);return k}p.prototype.add=function(m){var w=U(m);if(this.sign!==w.sign)return this.subtract(w.negate());var C=this.value,k=w.value;return w.isSmall?new p(ie(C,Math.abs(k)),this.sign):new p(H(C,k),this.sign)},p.prototype.plus=p.prototype.add,h.prototype.add=function(m){var w=U(m),C=this.value;if(C<0!==w.sign)return this.subtract(w.negate());var k=w.value;if(w.isSmall){if(v(C+k))return new h(C+k);k=_(Math.abs(k))}return new p(ie(k,Math.abs(C)),C<0)},h.prototype.plus=h.prototype.add,y.prototype.add=function(m){return new y(this.value+U(m).value)},y.prototype.plus=y.prototype.add;function j(m,w){var C=m.length,k=w.length,L=new Array(C),S=0,q=o,V,te;for(V=0;V=0?k=j(m,w):(k=j(w,m),C=!C),k=E(k),typeof k=="number"?(C&&(k=-k),new h(k)):new p(k,C)}function ae(m,w,C){var k=m.length,L=new Array(k),S=-w,q=o,V,te;for(V=0;V=0)},h.prototype.minus=h.prototype.subtract,y.prototype.subtract=function(m){return new y(this.value-U(m).value)},y.prototype.minus=y.prototype.subtract,p.prototype.negate=function(){return new p(this.value,!this.sign)},h.prototype.negate=function(){var m=this.sign,w=new h(-this.value);return w.sign=!m,w},y.prototype.negate=function(){return new y(-this.value)},p.prototype.abs=function(){return new p(this.value,!1)},h.prototype.abs=function(){return new h(Math.abs(this.value))},y.prototype.abs=function(){return new y(this.value>=0?this.value:-this.value)};function pe(m,w){var C=m.length,k=w.length,L=C+k,S=B(L),q=o,V,te,Pe,Ee,_e;for(Pe=0;Pe0;)k[V++]=S%L,S=Math.floor(S/L);return k}function ge(m,w){for(var C=[];w-- >0;)C.push(0);return C.concat(m)}function O(m,w){var C=Math.max(m.length,w.length);if(C<=30)return pe(m,w);C=Math.ceil(C/2);var k=m.slice(C),L=m.slice(0,C),S=w.slice(C),q=w.slice(0,C),V=O(L,q),te=O(k,S),Pe=O(H(L,k),H(q,S)),Ee=H(H(V,ge(j(j(Pe,V),te),C)),ge(te,2*C));return T(Ee),Ee}function se(m,w){return-.012*m-.012*w+15e-6*m*w>0}p.prototype.multiply=function(m){var w=U(m),C=this.value,k=w.value,L=this.sign!==w.sign,S;if(w.isSmall){if(k===0)return d[0];if(k===1)return this;if(k===-1)return this.negate();if(S=Math.abs(k),S=0;_e--){for(Ee=L-1,te[_e+k]!==q&&(Ee=Math.floor((te[_e+k]*L+te[_e+k-1])/q)),je=0,Ct=0,bs=Pe.length,gt=0;gtk&&(Pe=(Pe+1)*q),V=Math.ceil(Pe/Ee);do{if(_e=Ae(w,V),ke(_e,S)<=0)break;V--}while(V);L.push(V),S=j(S,_e)}return L.reverse(),[E(L),E(S)]}function D(m,w){var C=m.length,k=B(C),L=o,S,q,V,te;for(V=0,S=C-1;S>=0;--S)te=V*L+m[S],q=P(te/w),V=te-q*w,k[S]=q|0;return[k,V|0]}function me(m,w){var C,k=U(w);if(c)return[new y(m.value/k.value),new y(m.value%k.value)];var L=m.value,S=k.value,q;if(S===0)throw new Error("Cannot divide by zero");if(m.isSmall)return k.isSmall?[new h(P(L/S)),new h(L%S)]:[d[0],m];if(k.isSmall){if(S===1)return[m,d[0]];if(S==-1)return[m.negate(),d[0]];var V=Math.abs(S);if(Vw.length?1:-1;for(var C=m.length-1;C>=0;C--)if(m[C]!==w[C])return m[C]>w[C]?1:-1;return 0}p.prototype.compareAbs=function(m){var w=U(m),C=this.value,k=w.value;return w.isSmall?1:ke(C,k)},h.prototype.compareAbs=function(m){var w=U(m),C=Math.abs(this.value),k=w.value;return w.isSmall?(k=Math.abs(k),C===k?0:C>k?1:-1):-1},y.prototype.compareAbs=function(m){var w=this.value,C=U(m).value;return w=w>=0?w:-w,C=C>=0?C:-C,w===C?0:w>C?1:-1},p.prototype.compare=function(m){if(m===1/0)return-1;if(m===-1/0)return 1;var w=U(m),C=this.value,k=w.value;return this.sign!==w.sign?w.sign?1:-1:w.isSmall?this.sign?-1:1:ke(C,k)*(this.sign?-1:1)},p.prototype.compareTo=p.prototype.compare,h.prototype.compare=function(m){if(m===1/0)return-1;if(m===-1/0)return 1;var w=U(m),C=this.value,k=w.value;return w.isSmall?C==k?0:C>k?1:-1:C<0!==w.sign?C<0?-1:1:C<0?1:-1},h.prototype.compareTo=h.prototype.compare,y.prototype.compare=function(m){if(m===1/0)return-1;if(m===-1/0)return 1;var w=this.value,C=U(m).value;return w===C?0:w>C?1:-1},y.prototype.compareTo=y.prototype.compare,p.prototype.equals=function(m){return this.compare(m)===0},y.prototype.eq=y.prototype.equals=h.prototype.eq=h.prototype.equals=p.prototype.eq=p.prototype.equals,p.prototype.notEquals=function(m){return this.compare(m)!==0},y.prototype.neq=y.prototype.notEquals=h.prototype.neq=h.prototype.notEquals=p.prototype.neq=p.prototype.notEquals,p.prototype.greater=function(m){return this.compare(m)>0},y.prototype.gt=y.prototype.greater=h.prototype.gt=h.prototype.greater=p.prototype.gt=p.prototype.greater,p.prototype.lesser=function(m){return this.compare(m)<0},y.prototype.lt=y.prototype.lesser=h.prototype.lt=h.prototype.lesser=p.prototype.lt=p.prototype.lesser,p.prototype.greaterOrEquals=function(m){return this.compare(m)>=0},y.prototype.geq=y.prototype.greaterOrEquals=h.prototype.geq=h.prototype.greaterOrEquals=p.prototype.geq=p.prototype.greaterOrEquals,p.prototype.lesserOrEquals=function(m){return this.compare(m)<=0},y.prototype.leq=y.prototype.lesserOrEquals=h.prototype.leq=h.prototype.lesserOrEquals=p.prototype.leq=p.prototype.lesserOrEquals,p.prototype.isEven=function(){return(this.value[0]&1)===0},h.prototype.isEven=function(){return(this.value&1)===0},y.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},p.prototype.isOdd=function(){return(this.value[0]&1)===1},h.prototype.isOdd=function(){return(this.value&1)===1},y.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},p.prototype.isPositive=function(){return!this.sign},h.prototype.isPositive=function(){return this.value>0},y.prototype.isPositive=h.prototype.isPositive,p.prototype.isNegative=function(){return this.sign},h.prototype.isNegative=function(){return this.value<0},y.prototype.isNegative=h.prototype.isNegative,p.prototype.isUnit=function(){return!1},h.prototype.isUnit=function(){return Math.abs(this.value)===1},y.prototype.isUnit=function(){return this.abs().value===BigInt(1)},p.prototype.isZero=function(){return!1},h.prototype.isZero=function(){return this.value===0},y.prototype.isZero=function(){return this.value===BigInt(0)},p.prototype.isDivisibleBy=function(m){var w=U(m);return w.isZero()?!1:w.isUnit()?!0:w.compareAbs(2)===0?this.isEven():this.mod(w).isZero()},y.prototype.isDivisibleBy=h.prototype.isDivisibleBy=p.prototype.isDivisibleBy;function Le(m){var w=m.abs();if(w.isUnit())return!1;if(w.equals(2)||w.equals(3)||w.equals(5))return!0;if(w.isEven()||w.isDivisibleBy(3)||w.isDivisibleBy(5))return!1;if(w.lesser(49))return!0}function Fe(m,w){for(var C=m.prev(),k=C,L=0,S,q,V;k.isEven();)k=k.divide(2),L++;e:for(q=0;q-s?new h(m-1):new p(r,!0)},y.prototype.prev=function(){return new y(this.value-BigInt(1))};for(var Xe=[1];2*Xe[Xe.length-1]<=o;)Xe.push(2*Xe[Xe.length-1]);var Ht=Xe.length,qt=Xe[Ht-1];function Dn(m){return Math.abs(m)<=o}p.prototype.shiftLeft=function(m){var w=U(m).toJSNumber();if(!Dn(w))throw new Error(String(w)+" is too large for shifting.");if(w<0)return this.shiftRight(-w);var C=this;if(C.isZero())return C;for(;w>=Ht;)C=C.multiply(qt),w-=Ht-1;return C.multiply(Xe[w])},y.prototype.shiftLeft=h.prototype.shiftLeft=p.prototype.shiftLeft,p.prototype.shiftRight=function(m){var w,C=U(m).toJSNumber();if(!Dn(C))throw new Error(String(C)+" is too large for shifting.");if(C<0)return this.shiftLeft(-C);for(var k=this;C>=Ht;){if(k.isZero()||k.isNegative()&&k.isUnit())return k;w=me(k,qt),k=w[1].isNegative()?w[0].prev():w[0],C-=Ht-1}return w=me(k,Xe[C]),w[1].isNegative()?w[0].prev():w[0]},y.prototype.shiftRight=h.prototype.shiftRight=p.prototype.shiftRight;function vt(m,w,C){w=U(w);for(var k=m.isNegative(),L=w.isNegative(),S=k?m.not():m,q=L?w.not():w,V=0,te=0,Pe=null,Ee=null,_e=[];!S.isZero()||!q.isZero();)Pe=me(S,qt),V=Pe[1].toJSNumber(),k&&(V=qt-1-V),Ee=me(q,qt),te=Ee[1].toJSNumber(),L&&(te=qt-1-te),S=Pe[0],q=Ee[0],_e.push(C(V,te));for(var je=C(k?1:0,L?1:0)!==0?t(-1):t(0),Ct=_e.length-1;Ct>=0;Ct-=1)je=je.multiply(qt).add(t(_e[Ct]));return je}p.prototype.not=function(){return this.negate().prev()},y.prototype.not=h.prototype.not=p.prototype.not,p.prototype.and=function(m){return vt(this,m,function(w,C){return w&C})},y.prototype.and=h.prototype.and=p.prototype.and,p.prototype.or=function(m){return vt(this,m,function(w,C){return w|C})},y.prototype.or=h.prototype.or=p.prototype.or,p.prototype.xor=function(m){return vt(this,m,function(w,C){return w^C})},y.prototype.xor=h.prototype.xor=p.prototype.xor;var xt=1<<30,ft=(o&-o)*(o&-o)|xt;function ot(m){var w=m.value,C=typeof w=="number"?w|xt:typeof w=="bigint"?w|BigInt(xt):w[0]+w[1]*o|ft;return C&-C}function uo(m,w){if(w.compareTo(m)<=0){var C=uo(m,w.square(w)),k=C.p,L=C.e,S=k.multiply(w);return S.compareTo(m)<=0?{p:S,e:L*2+1}:{p:k,e:L*2}}return{p:t(1),e:0}}p.prototype.bitLength=function(){var m=this;return m.compareTo(t(0))<0&&(m=m.negate().subtract(t(1))),m.compareTo(t(0))===0?t(0):t(uo(m,t(2)).e).add(t(1))},y.prototype.bitLength=h.prototype.bitLength=p.prototype.bitLength;function dt(m,w){return m=U(m),w=U(w),m.greater(w)?m:w}function b(m,w){return m=U(m),w=U(w),m.lesser(w)?m:w}function A(m,w){if(m=U(m).abs(),w=U(w).abs(),m.equals(w))return m;if(m.isZero())return w;if(w.isZero())return m;for(var C=d[1],k,L;m.isEven()&&w.isEven();)k=b(ot(m),ot(w)),m=m.divide(k),w=w.divide(k),C=C.multiply(k);for(;m.isEven();)m=m.divide(ot(m));do{for(;w.isEven();)w=w.divide(ot(w));m.greater(w)&&(L=w,w=m,m=L),w=w.subtract(m)}while(!w.isZero());return C.isUnit()?m:m.multiply(C)}function R(m,w){return m=U(m).abs(),w=U(w).abs(),m.divide(A(m,w)).multiply(w)}function N(m,w,C){m=U(m),w=U(w);var k=C||Math.random,L=b(m,w),S=dt(m,w),q=S.subtract(L).add(1);if(q.isSmall)return L.add(Math.floor(k()*q));for(var V=J(q,o).value,te=[],Pe=!0,Ee=0;Ee=q){if(te==="1"&&q===1)continue;throw new Error(te+" is not a valid digit in base "+w+".")}}w=U(w);var Pe=[],Ee=m[0]==="-";for(S=Ee?1:0;S"&&S=0;S--)k=k.add(m[S].times(L)),L=L.times(w);return C?k.negate():k}function le(m,w){return w=w||a,m"}function J(m,w){if(w=t(w),w.isZero()){if(m.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(w.equals(-1)){if(m.isZero())return{value:[0],isNegative:!1};if(m.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-m.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var C=Array.apply(null,Array(m.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return C.unshift([1]),{value:[].concat.apply([],C),isNegative:!1}}var k=!1;if(m.isNegative()&&w.isPositive()&&(k=!0,m=m.abs()),w.isUnit())return m.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(m.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:k};for(var L=[],S=m,q;S.isNegative()||S.compareAbs(w)>=0;){q=S.divmod(w),S=q.quotient;var V=q.remainder;V.isNegative()&&(V=w.minus(V).abs(),S=S.next()),L.push(V.toJSNumber())}return L.push(S.toJSNumber()),{value:L.reverse(),isNegative:k}}function Z(m,w,C){var k=J(m,w);return(k.isNegative?"-":"")+k.value.map(function(L){return le(L,C)}).join("")}p.prototype.toArray=function(m){return J(this,m)},h.prototype.toArray=function(m){return J(this,m)},y.prototype.toArray=function(m){return J(this,m)},p.prototype.toString=function(m,w){if(m===n&&(m=10),m!==10)return Z(this,m,w);for(var C=this.value,k=C.length,L=String(C[--k]),S="0000000",q;--k>=0;)q=String(C[k]),L+=S.slice(q.length)+q;var V=this.sign?"-":"";return V+L},h.prototype.toString=function(m,w){return m===n&&(m=10),m!=10?Z(this,m,w):String(this.value)},y.prototype.toString=h.prototype.toString,y.prototype.toJSON=p.prototype.toJSON=h.prototype.toJSON=function(){return this.toString()},p.prototype.valueOf=function(){return parseInt(this.toString(),10)},p.prototype.toJSNumber=p.prototype.valueOf,h.prototype.valueOf=function(){return this.value},h.prototype.toJSNumber=h.prototype.valueOf,y.prototype.valueOf=y.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function Q(m){if(v(+m)){var w=+m;if(w===P(w))return c?new y(BigInt(w)):new h(w);throw new Error("Invalid integer: "+m)}var C=m[0]==="-";C&&(m=m.slice(1));var k=m.split(/e/i);if(k.length>2)throw new Error("Invalid integer: "+k.join("e"));if(k.length===2){var L=k[1];if(L[0]==="+"&&(L=L.slice(1)),L=+L,L!==P(L)||!v(L))throw new Error("Invalid integer: "+L+" is not a valid exponent.");var S=k[0],q=S.indexOf(".");if(q>=0&&(L-=S.length-q-1,S=S.slice(0,q)+S.slice(q+1)),L<0)throw new Error("Cannot include negative exponent part for integers");S+=new Array(L+1).join("0"),m=S}var V=/^([0-9][0-9]*)$/.test(m);if(!V)throw new Error("Invalid integer: "+m);if(c)return new y(BigInt(C?"-"+m:m));for(var te=[],Pe=m.length,Ee=i,_e=Pe-Ee;Pe>0;)te.push(+m.slice(_e,Pe)),_e-=Ee,_e<0&&(_e=0),Pe-=Ee;return T(te),new p(te,C)}function we(m){if(c)return new y(BigInt(m));if(v(m)){if(m!==P(m))throw new Error(m+" is not an integer.");return new h(m)}return Q(m.toString())}function U(m){return typeof m=="number"?we(m):typeof m=="string"?Q(m):typeof m=="bigint"?new y(m):m}for(var be=0;be<1e3;be++)d[be]=U(be),be>0&&(d[-be]=U(-be));return d.one=d[1],d.zero=d[0],d.minusOne=d[-1],d.max=dt,d.min=b,d.gcd=A,d.lcm=R,d.isInstance=function(m){return m instanceof p||m instanceof h||m instanceof y},d.randBetween=N,d.fromArray=function(m,w,C){return oe(m.map(U),U(w||10),C)},d}();e.hasOwnProperty("exports")&&(e.exports=t)})(fy);var Fs=class{constructor(t={}){this.points=t.points,this.duration=t.duration,this.blockDuration=t.blockDuration,this.execEvenly=t.execEvenly,this.execEvenlyMinDelayMs=t.execEvenlyMinDelayMs,this.keyPrefix=t.keyPrefix}get points(){return this._points}set points(t){this._points=t>=0?t:4}get duration(){return this._duration}set duration(t){this._duration=typeof t>"u"?1:t}get msDuration(){return this.duration*1e3}get blockDuration(){return this._blockDuration}set blockDuration(t){this._blockDuration=typeof t>"u"?0:t}get msBlockDuration(){return this.blockDuration*1e3}get execEvenly(){return this._execEvenly}set execEvenly(t){this._execEvenly=typeof t>"u"?!1:Boolean(t)}get execEvenlyMinDelayMs(){return this._execEvenlyMinDelayMs}set execEvenlyMinDelayMs(t){this._execEvenlyMinDelayMs=typeof t>"u"?Math.ceil(this.msDuration/this.points):t}get keyPrefix(){return this._keyPrefix}set keyPrefix(t){if(typeof t>"u"&&(t="rlflx"),typeof t!="string")throw new Error("keyPrefix must be string");this._keyPrefix=t}_getKeySecDuration(t={}){return t&&t.customDuration>=0?t.customDuration:this.duration}getKey(t){return this.keyPrefix.length>0?`${this.keyPrefix}:${t}`:t}parseKey(t){return t.substring(this.keyPrefix.length)}consume(){throw new Error("You have to implement the method 'consume'!")}penalty(){throw new Error("You have to implement the method 'penalty'!")}reward(){throw new Error("You have to implement the method 'reward'!")}get(){throw new Error("You have to implement the method 'get'!")}set(){throw new Error("You have to implement the method 'set'!")}block(){throw new Error("You have to implement the method 'block'!")}delete(){throw new Error("You have to implement the method 'delete'!")}},py=class{constructor(){this._keys={},this._addedKeysAmount=0}collectExpired(){const t=Date.now();Object.keys(this._keys).forEach(n=>{this._keys[n]<=t&&delete this._keys[n]}),this._addedKeysAmount=Object.keys(this._keys).length}add(t,n){this.addMs(t,n*1e3)}addMs(t,n){this._keys[t]=Date.now()+n,this._addedKeysAmount++,this._addedKeysAmount>999&&this.collectExpired()}msBeforeExpire(t){const n=this._keys[t];if(n&&n>=Date.now()){this.collectExpired();const o=Date.now();return n>=o?n-o:0}return 0}delete(t){t?delete this._keys[t]:Object.keys(this._keys).forEach(n=>{delete this._keys[n]})}},hy=py,At=class{constructor(t,n,o,i){this.remainingPoints=typeof t>"u"?0:t,this.msBeforeNext=typeof n>"u"?0:n,this.consumedPoints=typeof o>"u"?0:o,this.isFirstInDuration=typeof i>"u"?!1:i}get msBeforeNext(){return this._msBeforeNext}set msBeforeNext(t){return this._msBeforeNext=t,this}get remainingPoints(){return this._remainingPoints}set remainingPoints(t){return this._remainingPoints=t,this}get consumedPoints(){return this._consumedPoints}set consumedPoints(t){return this._consumedPoints=t,this}get isFirstInDuration(){return this._isFirstInDuration}set isFirstInDuration(t){this._isFirstInDuration=Boolean(t)}_getDecoratedProperties(){return{remainingPoints:this.remainingPoints,msBeforeNext:this.msBeforeNext,consumedPoints:this.consumedPoints,isFirstInDuration:this.isFirstInDuration}}[Symbol.for("nodejs.util.inspect.custom")](){return this._getDecoratedProperties()}toString(){return JSON.stringify(this._getDecoratedProperties())}toJSON(){return this._getDecoratedProperties()}};const Oa=Fs,my=hy,Ou=At;var go=class extends Oa{constructor(t={}){super(t),this.inMemoryBlockOnConsumed=t.inMemoryBlockOnConsumed,this.inMemoryBlockDuration=t.inMemoryBlockDuration,this.insuranceLimiter=t.insuranceLimiter,this._inMemoryBlockedKeys=new my}get client(){return this._client}set client(t){if(typeof t>"u")throw new Error("storeClient is not set");this._client=t}_afterConsume(t,n,o,i,s,r={}){const a=this._getRateLimiterRes(o,i,s);if(this.inMemoryBlockOnConsumed>0&&!(this.inMemoryBlockDuration>0)&&a.consumedPoints>=this.inMemoryBlockOnConsumed)return this._inMemoryBlockedKeys.addMs(o,a.msBeforeNext),a.consumedPoints>this.points?n(a):t(a);if(a.consumedPoints>this.points){let c=Promise.resolve();this.blockDuration>0&&a.consumedPoints<=this.points+i&&(a.msBeforeNext=this.msBlockDuration,c=this._block(o,a.consumedPoints,this.msBlockDuration,r)),this.inMemoryBlockOnConsumed>0&&a.consumedPoints>=this.inMemoryBlockOnConsumed&&(this._inMemoryBlockedKeys.add(o,this.inMemoryBlockDuration),a.msBeforeNext=this.msInMemoryBlockDuration),c.then(()=>{n(a)}).catch(d=>{n(d)})}else if(this.execEvenly&&a.msBeforeNext>0&&!a.isFirstInDuration){let c=Math.ceil(a.msBeforeNext/(a.remainingPoints+2));c{o(c)}).catch(c=>{i(c)}):i(t)}getInMemoryBlockMsBeforeExpire(t){return this.inMemoryBlockOnConsumed>0?this._inMemoryBlockedKeys.msBeforeExpire(t):0}get inMemoryBlockOnConsumed(){return this._inMemoryBlockOnConsumed}set inMemoryBlockOnConsumed(t){if(this._inMemoryBlockOnConsumed=t?parseInt(t):0,this.inMemoryBlockOnConsumed>0&&this.points>this.inMemoryBlockOnConsumed)throw new Error('inMemoryBlockOnConsumed option must be greater or equal "points" option')}get inMemoryBlockDuration(){return this._inMemoryBlockDuration}set inMemoryBlockDuration(t){if(this._inMemoryBlockDuration=t?parseInt(t):0,this.inMemoryBlockDuration>0&&this.inMemoryBlockOnConsumed===0)throw new Error("inMemoryBlockOnConsumed option must be set up")}get msInMemoryBlockDuration(){return this._inMemoryBlockDuration*1e3}get insuranceLimiter(){return this._insuranceLimiter}set insuranceLimiter(t){if(typeof t<"u"&&!(t instanceof Oa))throw new Error("insuranceLimiter must be instance of RateLimiterAbstract");this._insuranceLimiter=t,this._insuranceLimiter&&(this._insuranceLimiter.blockDuration=this.blockDuration,this._insuranceLimiter.execEvenly=this.execEvenly)}block(t,n,o={}){const i=n*1e3;return this._block(this.getKey(t),this.points+1,i,o)}set(t,n,o,i={}){const s=(o>=0?o:this.duration)*1e3;return this._block(this.getKey(t),n,s,i)}consume(t,n=1,o={}){return new Promise((i,s)=>{const r=this.getKey(t),a=this.getInMemoryBlockMsBeforeExpire(r);if(a>0)return s(new Ou(0,a));this._upsert(r,n,this._getKeySecDuration(o)*1e3,!1,o).then(c=>{this._afterConsume(i,s,r,n,c)}).catch(c=>{this._handleError(c,"consume",i,s,t,n,o)})})}penalty(t,n=1,o={}){const i=this.getKey(t);return new Promise((s,r)=>{this._upsert(i,n,this._getKeySecDuration(o)*1e3,!1,o).then(a=>{s(this._getRateLimiterRes(i,n,a))}).catch(a=>{this._handleError(a,"penalty",s,r,t,n,o)})})}reward(t,n=1,o={}){const i=this.getKey(t);return new Promise((s,r)=>{this._upsert(i,-n,this._getKeySecDuration(o)*1e3,!1,o).then(a=>{s(this._getRateLimiterRes(i,-n,a))}).catch(a=>{this._handleError(a,"reward",s,r,t,n,o)})})}get(t,n={}){const o=this.getKey(t);return new Promise((i,s)=>{this._get(o,n).then(r=>{i(r===null||typeof r>"u"?null:this._getRateLimiterRes(o,0,r))}).catch(r=>{this._handleError(r,"get",i,s,t,n)})})}delete(t,n={}){const o=this.getKey(t);return new Promise((i,s)=>{this._delete(o,n).then(r=>{this._inMemoryBlockedKeys.delete(o),i(r)}).catch(r=>{this._handleError(r,"delete",i,s,t,n)})})}deleteInMemoryBlockedAll(){this._inMemoryBlockedKeys.delete()}_getRateLimiterRes(t,n,o){throw new Error("You have to implement the method '_getRateLimiterRes'!")}_block(t,n,o,i={}){return new Promise((s,r)=>{this._upsert(t,n,o,!0,i).then(()=>{s(new Ou(0,o>0?o:-1,n))}).catch(a=>{this._handleError(a,"block",s,r,this.parseKey(t),o/1e3,i)})})}_get(t,n={}){throw new Error("You have to implement the method '_get'!")}_delete(t,n={}){throw new Error("You have to implement the method '_delete'!")}_upsert(t,n,o,i=!1,s={}){throw new Error("You have to implement the method '_upsert'!")}};const gy=go,yy=At,wy="redis.call('set', KEYS[1], 0, 'EX', ARGV[2], 'NX') local consumed = redis.call('incrby', KEYS[1], ARGV[1]) local ttl = redis.call('pttl', KEYS[1]) if ttl == -1 then redis.call('expire', KEYS[1], ARGV[2]) ttl = 1000 * ARGV[2] end return {consumed, ttl} ";class by extends gy{constructor(t){super(t),this.client=t.storeClient,this._rejectIfRedisNotReady=!!t.rejectIfRedisNotReady,this._incrTtlLuaScript=t.customIncrTtlLuaScript||wy,this.useRedisPackage=t.useRedisPackage||this.client.constructor.name==="Commander"||!1,this.useRedis3AndLowerPackage=t.useRedis3AndLowerPackage,typeof this.client.defineCommand=="function"&&this.client.defineCommand("rlflxIncr",{numberOfKeys:1,lua:this._incrTtlLuaScript})}_isRedisReady(){return this._rejectIfRedisNotReady?!(this.client.status&&this.client.status!=="ready"||typeof this.client.isReady=="function"&&!this.client.isReady()):!0}_getRateLimiterRes(t,n,o){let[i,s]=o;Array.isArray(i)&&([,i]=i,[,s]=s);const r=new yy;return r.consumedPoints=parseInt(i),r.isFirstInDuration=r.consumedPoints===n,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=s,r}async _upsert(t,n,o,i=!1){if(!this._isRedisReady())throw new Error("Redis connection is not ready");const s=Math.floor(o/1e3),r=this.client.multi();return i?(s>0?!this.useRedisPackage&&!this.useRedis3AndLowerPackage?r.set(t,n,"EX",s):r.set(t,n,{EX:s}):r.set(t,n),!this.useRedisPackage&&!this.useRedis3AndLowerPackage?r.pttl(t).exec(!0):r.pTTL(t).exec(!0)):s>0?!this.useRedisPackage&&!this.useRedis3AndLowerPackage?this.client.rlflxIncr([t].concat([String(n),String(s),String(this.points),String(this.duration)])):this.useRedis3AndLowerPackage?new Promise((a,c)=>{const d=function(p,h){return p?c(p):a(h)};typeof this.client.rlflxIncr=="function"?this.client.rlflxIncr(t,n,s,this.points,this.duration,d):this.client.eval(this._incrTtlLuaScript,1,t,n,s,this.points,this.duration,d)}):this.client.eval(this._incrTtlLuaScript,{keys:[t],arguments:[String(n),String(s),String(this.points),String(this.duration)]}):!this.useRedisPackage&&!this.useRedis3AndLowerPackage?r.incrby(t,n).pttl(t).exec(!0):r.incrBy(t,n).pTTL(t).exec(!0)}async _get(t){if(!this._isRedisReady())throw new Error("Redis connection is not ready");return!this.useRedisPackage&&!this.useRedis3AndLowerPackage?this.client.multi().get(t).pttl(t).exec().then(n=>{const[[,o]]=n;return o===null?null:n}):this.client.multi().get(t).pTTL(t).exec(!0).then(n=>{const[o]=n;return o===null?null:n})}_delete(t){return this.client.del(t).then(n=>n>0)}}var _y=by;const vy=go,xy=At;function Lu(e){try{const t=e.client?e.client:e;let n=[0,0,0];if(typeof t.topology>"u"){const{version:o}=t.options.metadata.driver;n=o.split("|",1)[0].split(".").map(i=>parseInt(i))}else{const{version:o}=t.topology.s.options.metadata.driver;n=o.split(".").map(i=>parseInt(i))}return{major:n[0],feature:n[1],patch:n[2]}}catch{return{major:0,feature:0,patch:0}}}class La extends vy{constructor(t){super(t),this.dbName=t.dbName,this.tableName=t.tableName,this.indexKeyPrefix=t.indexKeyPrefix,t.mongo?this.client=t.mongo:this.client=t.storeClient,typeof this.client.then=="function"?this.client.then(n=>{this.client=n,this._initCollection(),this._driverVersion=Lu(this.client)}):(this._initCollection(),this._driverVersion=Lu(this.client))}get dbName(){return this._dbName}set dbName(t){this._dbName=typeof t>"u"?La.getDbName():t}static getDbName(){return"node-rate-limiter-flexible"}get tableName(){return this._tableName}set tableName(t){this._tableName=typeof t>"u"?this.keyPrefix:t}get client(){return this._client}set client(t){if(typeof t>"u")throw new Error("mongo is not set");this._client=t}get indexKeyPrefix(){return this._indexKeyPrefix}set indexKeyPrefix(t){this._indexKeyPrefix=t||{}}_initCollection(){const n=(typeof this.client.db=="function"?this.client.db(this.dbName):this.client).collection(this.tableName);n.createIndex({expire:-1},{expireAfterSeconds:0}),n.createIndex(Object.assign({},this.indexKeyPrefix,{key:1}),{unique:!0}),this._collection=n}_getRateLimiterRes(t,n,o){const i=new xy;let s;return typeof o.value>"u"?s=o:s=o.value,i.isFirstInDuration=s.points===n,i.consumedPoints=s.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=s.expire!==null?Math.max(new Date(s.expire).getTime()-Date.now(),0):-1,i}_upsert(t,n,o,i=!1,s={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const r=s.attrs||{};let a,c;i?(a={key:t},a=Object.assign(a,r),c={$set:{key:t,points:n,expire:o>0?new Date(Date.now()+o):null}},c.$set=Object.assign(c.$set,r)):(a={$or:[{expire:{$gt:new Date}},{expire:{$eq:null}}],key:t},a=Object.assign(a,r),c={$setOnInsert:{key:t,expire:o>0?new Date(Date.now()+o):null},$inc:{points:n}},c.$setOnInsert=Object.assign(c.$setOnInsert,r));const d={upsert:!0};return this._driverVersion.major>=4||this._driverVersion.major===3&&this._driverVersion.feature>=7||this._driverVersion.feature>=6&&this._driverVersion.patch>=7?d.returnDocument="after":d.returnOriginal=!1,new Promise((p,h)=>{this._collection.findOneAndUpdate(a,c,d).then(y=>{p(y)}).catch(y=>{if(y&&y.code===11e3){const v=Object.assign({$or:[{expire:{$lte:new Date}},{expire:{$eq:null}}],key:t},r),_={$set:Object.assign({key:t,points:n,expire:o>0?new Date(Date.now()+o):null},r)};this._collection.findOneAndUpdate(v,_,d).then(E=>{p(E)}).catch(E=>{E&&E.code===11e3?this._upsert(t,n,o,i).then(T=>p(T)).catch(T=>h(T)):h(E)})}else h(y)})})}_get(t,n={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const o=n.attrs||{},i=Object.assign({key:t,$or:[{expire:{$gt:new Date}},{expire:{$eq:null}}]},o);return this._collection.findOne(i)}_delete(t,n={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const o=n.attrs||{},i=Object.assign({key:t},o);return this._collection.deleteOne(i).then(s=>s.deletedCount>0)}}var Cy=La;const $y=go,ky=At;class Ey extends $y{constructor(t,n=null){super(t),this.client=t.storeClient,this.clientType=t.storeType,this.dbName=t.dbName,this.tableName=t.tableName,this.clearExpiredByTimeout=t.clearExpiredByTimeout,this.tableCreated=t.tableCreated,this.tableCreated?(this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),typeof n=="function"&&n()):this._createDbAndTable().then(()=>{this.tableCreated=!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),typeof n=="function"&&n()}).catch(o=>{if(typeof n=="function")n(o);else throw o})}clearExpired(t){return new Promise(n=>{this._getConnection().then(o=>{o.query("DELETE FROM ??.?? WHERE expire < ?",[this.dbName,this.tableName,t],()=>{this._releaseConnection(o),n()})}).catch(()=>{n()})})}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(()=>{this.clearExpired(Date.now()-36e5).then(()=>{this._clearExpiredHourAgo()})},3e5),this._clearExpiredTimeoutId.unref()}_getConnection(){switch(this.clientType){case"pool":return new Promise((t,n)=>{this.client.getConnection((o,i)=>{if(o)return n(o);t(i)})});case"sequelize":return this.client.connectionManager.getConnection();case"knex":return this.client.client.acquireConnection();default:return Promise.resolve(this.client)}}_releaseConnection(t){switch(this.clientType){case"pool":return t.release();case"sequelize":return this.client.connectionManager.releaseConnection(t);case"knex":return this.client.client.releaseConnection(t);default:return!0}}_createDbAndTable(){return new Promise((t,n)=>{this._getConnection().then(o=>{o.query(`CREATE DATABASE IF NOT EXISTS \`${this.dbName}\`;`,i=>{if(i)return this._releaseConnection(o),n(i);o.query(this._getCreateTableStmt(),s=>{if(s)return this._releaseConnection(o),n(s);this._releaseConnection(o),t()})})}).catch(o=>{n(o)})})}_getCreateTableStmt(){return`CREATE TABLE IF NOT EXISTS \`${this.dbName}\`.\`${this.tableName}\` (\`key\` VARCHAR(255) CHARACTER SET utf8 NOT NULL,\`points\` INT(9) NOT NULL default 0,\`expire\` BIGINT UNSIGNED,PRIMARY KEY (\`key\`)) ENGINE = INNODB;`}get clientType(){return this._clientType}set clientType(t){if(typeof t>"u")if(this.client.constructor.name==="Connection")t="connection";else if(this.client.constructor.name==="Pool")t="pool";else if(this.client.constructor.name==="Sequelize")t="sequelize";else throw new Error("storeType is not defined");this._clientType=t.toLowerCase()}get dbName(){return this._dbName}set dbName(t){this._dbName=typeof t>"u"?"rtlmtrflx":t}get tableName(){return this._tableName}set tableName(t){this._tableName=typeof t>"u"?this.keyPrefix:t}get tableCreated(){return this._tableCreated}set tableCreated(t){this._tableCreated=typeof t>"u"?!1:!!t}get clearExpiredByTimeout(){return this._clearExpiredByTimeout}set clearExpiredByTimeout(t){this._clearExpiredByTimeout=typeof t>"u"?!0:Boolean(t)}_getRateLimiterRes(t,n,o){const i=new ky,[s]=o;return i.isFirstInDuration=n===s.points,i.consumedPoints=i.isFirstInDuration?n:s.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=s.expire?Math.max(s.expire-Date.now(),0):-1,i}_upsertTransaction(t,n,o,i,s){return new Promise((r,a)=>{t.query("BEGIN",c=>{if(c)return t.rollback(),a(c);const d=Date.now(),p=i>0?d+i:null;let h,y;s?(h=`INSERT INTO ??.?? VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE points = ?, expire = ?;`,y=[this.dbName,this.tableName,n,o,p,o,p]):(h=`INSERT INTO ??.?? VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE points = IF(expire <= ?, ?, points + (?)), expire = IF(expire <= ?, ?, expire);`,y=[this.dbName,this.tableName,n,o,p,d,o,o,d,p]),t.query(h,y,v=>{if(v)return t.rollback(),a(v);t.query("SELECT points, expire FROM ??.?? WHERE `key` = ?;",[this.dbName,this.tableName,n],(_,E)=>{if(_)return t.rollback(),a(_);t.query("COMMIT",T=>{if(T)return t.rollback(),a(T);r(E)})})})})})}_upsert(t,n,o,i=!1){return this.tableCreated?new Promise((s,r)=>{this._getConnection().then(a=>{this._upsertTransaction(a,t,n,o,i).then(c=>{s(c),this._releaseConnection(a)}).catch(c=>{r(c),this._releaseConnection(a)})}).catch(a=>{r(a)})}):Promise.reject(Error("Table is not created yet"))}_get(t){return this.tableCreated?new Promise((n,o)=>{this._getConnection().then(i=>{i.query("SELECT points, expire FROM ??.?? WHERE `key` = ? AND (`expire` > ? OR `expire` IS NULL)",[this.dbName,this.tableName,t,Date.now()],(s,r)=>{s?o(s):r.length===0?n(null):n(r),this._releaseConnection(i)})}).catch(i=>{o(i)})}):Promise.reject(Error("Table is not created yet"))}_delete(t){return this.tableCreated?new Promise((n,o)=>{this._getConnection().then(i=>{i.query("DELETE FROM ??.?? WHERE `key` = ?",[this.dbName,this.tableName,t],(s,r)=>{s?o(s):n(r.affectedRows>0),this._releaseConnection(i)})}).catch(i=>{o(i)})}):Promise.reject(Error("Table is not created yet"))}}var Sy=Ey;const Ay=go,Py=At;class Iy extends Ay{constructor(t,n=null){super(t),this.client=t.storeClient,this.clientType=t.storeType,this.tableName=t.tableName,this.schemaName=t.schemaName,this.clearExpiredByTimeout=t.clearExpiredByTimeout,this.tableCreated=t.tableCreated,this.tableCreated?(this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),typeof n=="function"&&n()):this._createTable().then(()=>{this.tableCreated=!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),typeof n=="function"&&n()}).catch(o=>{if(typeof n=="function")n(o);else throw o})}_getTableIdentifier(){return this.schemaName?`"${this.schemaName}"."${this.tableName}"`:`"${this.tableName}"`}clearExpired(t){return new Promise(n=>{const o={name:"rlflx-clear-expired",text:`DELETE FROM ${this._getTableIdentifier()} WHERE expire < $1`,values:[t]};this._query(o).then(()=>{n()}).catch(()=>{n()})})}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(()=>{this.clearExpired(Date.now()-36e5).then(()=>{this._clearExpiredHourAgo()})},3e5),this._clearExpiredTimeoutId.unref()}_getConnection(){switch(this.clientType){case"pool":return Promise.resolve(this.client);case"sequelize":return this.client.connectionManager.getConnection();case"knex":return this.client.client.acquireConnection();case"typeorm":return Promise.resolve(this.client.driver.master);default:return Promise.resolve(this.client)}}_releaseConnection(t){switch(this.clientType){case"pool":return!0;case"sequelize":return this.client.connectionManager.releaseConnection(t);case"knex":return this.client.client.releaseConnection(t);case"typeorm":return!0;default:return!0}}_createTable(){return new Promise((t,n)=>{this._query({text:this._getCreateTableStmt()}).then(()=>{t()}).catch(o=>{o.code==="23505"?t():n(o)})})}_getCreateTableStmt(){return`CREATE TABLE IF NOT EXISTS ${this._getTableIdentifier()} ( key varchar(255) PRIMARY KEY, points integer NOT NULL DEFAULT 0, expire bigint );`}get clientType(){return this._clientType}set clientType(t){const n=this.client.constructor.name;if(typeof t>"u")if(n==="Client")t="client";else if(n==="Pool"||n==="BoundPool")t="pool";else if(n==="Sequelize")t="sequelize";else throw new Error("storeType is not defined");this._clientType=t.toLowerCase()}get tableName(){return this._tableName}set tableName(t){this._tableName=typeof t>"u"?this.keyPrefix:t}get schemaName(){return this._schemaName}set schemaName(t){this._schemaName=t}get tableCreated(){return this._tableCreated}set tableCreated(t){this._tableCreated=typeof t>"u"?!1:!!t}get clearExpiredByTimeout(){return this._clearExpiredByTimeout}set clearExpiredByTimeout(t){this._clearExpiredByTimeout=typeof t>"u"?!0:Boolean(t)}_getRateLimiterRes(t,n,o){const i=new Py,s=o.rows[0];return i.isFirstInDuration=n===s.points,i.consumedPoints=i.isFirstInDuration?n:s.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=s.expire?Math.max(s.expire-Date.now(),0):-1,i}_query(t){const o={name:`${this.tableName.toLowerCase()}:${t.name}`,text:t.text,values:t.values};return new Promise((i,s)=>{this._getConnection().then(r=>{r.query(o).then(a=>{i(a),this._releaseConnection(r)}).catch(a=>{s(a),this._releaseConnection(r)})}).catch(r=>{s(r)})})}_upsert(t,n,o,i=!1){if(!this.tableCreated)return Promise.reject(Error("Table is not created yet"));const s=o>0?Date.now()+o:null,r=i?" $3 ":` CASE WHEN ${this._getTableIdentifier()}.expire <= $4 THEN $3 ELSE ${this._getTableIdentifier()}.expire END `;return this._query({name:i?"rlflx-upsert-force":"rlflx-upsert",text:` INSERT INTO ${this._getTableIdentifier()} VALUES ($1, $2, $3) ON CONFLICT(key) DO UPDATE SET points = CASE WHEN (${this._getTableIdentifier()}.expire <= $4 OR 1=${i?1:0}) THEN $2 ELSE ${this._getTableIdentifier()}.points + ($2) END, expire = ${r} RETURNING points, expire;`,values:[t,n,s,Date.now()]})}_get(t){return this.tableCreated?new Promise((n,o)=>{this._query({name:"rlflx-get",text:` SELECT points, expire FROM ${this._getTableIdentifier()} WHERE key = $1 AND (expire > $2 OR expire IS NULL);`,values:[t,Date.now()]}).then(i=>{i.rowCount===0&&(i=null),n(i)}).catch(i=>{o(i)})}):Promise.reject(Error("Table is not created yet"))}_delete(t){return this.tableCreated?this._query({name:"rlflx-delete",text:`DELETE FROM ${this._getTableIdentifier()} WHERE key = $1`,values:[t]}).then(n=>n.rowCount>0):Promise.reject(Error("Table is not created yet"))}}var Ty=Iy;const Mu=Hm(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Oy=class{constructor(t,n,o=null){this.value=t,this.expiresAt=n,this.timeoutId=o}get value(){return this._value}set value(t){this._value=parseInt(t)}get expiresAt(){return this._expiresAt}set expiresAt(t){!(t instanceof Date)&&Number.isInteger(t)&&(t=new Date(t)),this._expiresAt=t}get timeoutId(){return this._timeoutId}set timeoutId(t){this._timeoutId=t}};const Ly=Oy,Ma=At;var My=class{constructor(){this._storage={}}incrby(t,n,o){if(this._storage[t]){const i=this._storage[t].expiresAt?this._storage[t].expiresAt.getTime()-new Date().getTime():-1;return!this._storage[t].expiresAt||i>0?(this._storage[t].value=this._storage[t].value+n,new Ma(0,i,this._storage[t].value,!1)):this.set(t,n,o)}return this.set(t,n,o)}set(t,n,o){const i=o*1e3;return this._storage[t]&&this._storage[t].timeoutId&&clearTimeout(this._storage[t].timeoutId),this._storage[t]=new Ly(n,i>0?new Date(Date.now()+i):null),i>0&&(this._storage[t].timeoutId=setTimeout(()=>{delete this._storage[t]},i),this._storage[t].timeoutId.unref&&this._storage[t].timeoutId.unref()),new Ma(0,i===0?-1:i,this._storage[t].value,!0)}get(t){if(this._storage[t]){const n=this._storage[t].expiresAt?this._storage[t].expiresAt.getTime()-new Date().getTime():-1;return new Ma(0,n,this._storage[t].value,!1)}return null}delete(t){return this._storage[t]?(this._storage[t].timeoutId&&clearTimeout(this._storage[t].timeoutId),delete this._storage[t],!0):!1}};const Ny=Fs,By=My,Nu=At;class Dy extends Ny{constructor(t={}){super(t),this._memoryStorage=new By}consume(t,n=1,o={}){return new Promise((i,s)=>{const r=this.getKey(t),a=this._getKeySecDuration(o);let c=this._memoryStorage.incrby(r,n,a);if(c.remainingPoints=Math.max(this.points-c.consumedPoints,0),c.consumedPoints>this.points)this.blockDuration>0&&c.consumedPoints<=this.points+n&&(c=this._memoryStorage.set(r,c.consumedPoints,this.blockDuration)),s(c);else if(this.execEvenly&&c.msBeforeNext>0&&!c.isFirstInDuration){let d=Math.ceil(c.msBeforeNext/(c.remainingPoints+2));d{const r=this._getKeySecDuration(o),a=this._memoryStorage.incrby(i,n,r);a.remainingPoints=Math.max(this.points-a.consumedPoints,0),s(a)})}reward(t,n=1,o={}){const i=this.getKey(t);return new Promise(s=>{const r=this._getKeySecDuration(o),a=this._memoryStorage.incrby(i,-n,r);a.remainingPoints=Math.max(this.points-a.consumedPoints,0),s(a)})}block(t,n){const o=n*1e3,i=this.points+1;return this._memoryStorage.set(this.getKey(t),i,n),Promise.resolve(new Nu(0,o===0?-1:o,i))}set(t,n,o){const i=(o>=0?o:this.duration)*1e3;return this._memoryStorage.set(this.getKey(t),n,o),Promise.resolve(new Nu(0,i===0?-1:i,n))}get(t){const n=this._memoryStorage.get(this.getKey(t));return n!==null&&(n.remainingPoints=Math.max(this.points-n.consumedPoints,0)),Promise.resolve(n)}delete(t){return Promise.resolve(this._memoryStorage.delete(this.getKey(t)))}}var Bu=Dy;const Du=Mu,Ry=Mu,Fy=Fs,Ru=Bu,jy=At,Vt="rate_limiter_flexible";let Yo=null;const Fu=function(e,t,n,o){let i;o===null||o===!0||o===!1?i=o:i={remainingPoints:o.remainingPoints,msBeforeNext:o.msBeforeNext,consumedPoints:o.consumedPoints,isFirstInDuration:o.isFirstInDuration},e.send({channel:Vt,keyPrefix:t.keyPrefix,promiseId:t.promiseId,type:n,data:i})},ju=function(e){setTimeout(()=>{this._initiated?process.send(e):typeof this._promises[e.promiseId]<"u"&&ju.call(this,e)},30)},Qo=function(e,t,n,o,i){const s={channel:Vt,keyPrefix:this.keyPrefix,func:e,promiseId:t,data:{key:n,arg:o,opts:i}};this._initiated?process.send(s):ju.call(this,s)},Uu=function(e,t){if(!t||t.channel!==Vt||typeof this._rateLimiters[t.keyPrefix]>"u")return!1;let n;switch(t.func){case"consume":n=this._rateLimiters[t.keyPrefix].consume(t.data.key,t.data.arg,t.data.opts);break;case"penalty":n=this._rateLimiters[t.keyPrefix].penalty(t.data.key,t.data.arg,t.data.opts);break;case"reward":n=this._rateLimiters[t.keyPrefix].reward(t.data.key,t.data.arg,t.data.opts);break;case"block":n=this._rateLimiters[t.keyPrefix].block(t.data.key,t.data.arg,t.data.opts);break;case"get":n=this._rateLimiters[t.keyPrefix].get(t.data.key,t.data.opts);break;case"delete":n=this._rateLimiters[t.keyPrefix].delete(t.data.key,t.data.opts);break;default:return!1}n&&n.then(o=>{Fu(e,t,"resolve",o)}).catch(o=>{Fu(e,t,"reject",o)})},Uy=function(e){if(!e||e.channel!==Vt||e.keyPrefix!==this.keyPrefix)return!1;if(this._promises[e.promiseId]){clearTimeout(this._promises[e.promiseId].timeoutId);let t;switch(e.data===null||e.data===!0||e.data===!1?t=e.data:t=new jy(e.data.remainingPoints,e.data.msBeforeNext,e.data.consumedPoints,e.data.isFirstInDuration),e.type){case"resolve":this._promises[e.promiseId].resolve(t);break;case"reject":this._promises[e.promiseId].reject(t);break;default:throw new Error(`RateLimiterCluster: no such message type '${e.type}'`)}delete this._promises[e.promiseId]}},Hy=function(){return{points:this.points,duration:this.duration,blockDuration:this.blockDuration,execEvenly:this.execEvenly,execEvenlyMinDelayMs:this.execEvenlyMinDelayMs,keyPrefix:this.keyPrefix}},Xo=function(e,t){const n=process.hrtime();let o=n[0].toString()+n[1].toString();return typeof this._promises[o]<"u"&&(o+=Ry.randomBytes(12).toString("base64")),this._promises[o]={resolve:e,reject:t,timeoutId:setTimeout(()=>{delete this._promises[o],t(new Error("RateLimiterCluster timeout: no answer from master in time"))},this.timeoutMs)},o};class qy{constructor(){if(Yo)return Yo;this._rateLimiters={},Du.setMaxListeners(0),Du.on("message",(t,n)=>{n&&n.channel===Vt&&n.type==="init"?(typeof this._rateLimiters[n.opts.keyPrefix]>"u"&&(this._rateLimiters[n.opts.keyPrefix]=new Ru(n.opts)),t.send({channel:Vt,type:"init",keyPrefix:n.opts.keyPrefix})):Uu.call(this,t,n)}),Yo=this}}class zy{constructor(t){if(Yo)return Yo;this._rateLimiters={},t.launchBus((n,o)=>{o.on("process:msg",i=>{const s=i.raw;if(s&&s.channel===Vt&&s.type==="init")typeof this._rateLimiters[s.opts.keyPrefix]>"u"&&(this._rateLimiters[s.opts.keyPrefix]=new Ru(s.opts)),t.sendDataToProcessId(i.process.pm_id,{data:{},topic:Vt,channel:Vt,type:"init",keyPrefix:s.opts.keyPrefix},(r,a)=>{r&&console.log(r,a)});else{const r={send:a=>{const c=a;c.topic=Vt,typeof c.data>"u"&&(c.data={}),t.sendDataToProcessId(i.process.pm_id,c,(d,p)=>{d&&console.log(d,p)})}};Uu.call(this,r,s)}})}),Yo=this}}class Vy extends Fy{get timeoutMs(){return this._timeoutMs}set timeoutMs(t){this._timeoutMs=typeof t>"u"?5e3:Math.abs(parseInt(t))}constructor(t={}){super(t),process.setMaxListeners(0),this.timeoutMs=t.timeoutMs,this._initiated=!1,process.on("message",n=>{n&&n.channel===Vt&&n.type==="init"&&n.keyPrefix===this.keyPrefix?this._initiated=!0:Uy.call(this,n)}),process.send({channel:Vt,type:"init",opts:Hy.call(this)}),this._promises={}}consume(t,n=1,o={}){return new Promise((i,s)=>{const r=Xo.call(this,i,s);Qo.call(this,"consume",r,t,n,o)})}penalty(t,n=1,o={}){return new Promise((i,s)=>{const r=Xo.call(this,i,s);Qo.call(this,"penalty",r,t,n,o)})}reward(t,n=1,o={}){return new Promise((i,s)=>{const r=Xo.call(this,i,s);Qo.call(this,"reward",r,t,n,o)})}block(t,n,o={}){return new Promise((i,s)=>{const r=Xo.call(this,i,s);Qo.call(this,"block",r,t,n,o)})}get(t,n={}){return new Promise((o,i)=>{const s=Xo.call(this,o,i);Qo.call(this,"get",s,t,n)})}delete(t,n={}){return new Promise((o,i)=>{const s=Xo.call(this,o,i);Qo.call(this,"delete",s,t,n)})}}var Ky={RateLimiterClusterMaster:qy,RateLimiterClusterMasterPM2:zy,RateLimiterCluster:Vy};const Wy=go,Gy=At;class Jy extends Wy{constructor(t){super(t),this.client=t.storeClient}_getRateLimiterRes(t,n,o){const i=new Gy;return i.consumedPoints=parseInt(o.consumedPoints),i.isFirstInDuration=o.consumedPoints===n,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=o.msBeforeNext,i}_upsert(t,n,o,i=!1,s={}){return new Promise((r,a)=>{const c=Date.now(),d=Math.floor(o/1e3);i?this.client.set(t,n,d,p=>{p?a(p):this.client.set(`${t}_expire`,d>0?c+d*1e3:-1,d,()=>{const h={consumedPoints:n,msBeforeNext:d>0?d*1e3:-1};r(h)})}):this.client.incr(t,n,(p,h)=>{p||h===!1?this.client.add(t,n,d,(y,v)=>{if(y||!v)if(typeof s.attemptNumber>"u"||s.attemptNumber<3){const _=Object.assign({},s);_.attemptNumber=_.attemptNumber?_.attemptNumber+1:1,this._upsert(t,n,o,i,_).then(E=>r(E)).catch(E=>a(E))}else a(new Error("Can not add key"));else this.client.add(`${t}_expire`,d>0?c+d*1e3:-1,d,()=>{const _={consumedPoints:n,msBeforeNext:d>0?d*1e3:-1};r(_)})}):this.client.get(`${t}_expire`,(y,v)=>{if(y)a(y);else{const _=v===!1?0:v,E={consumedPoints:h,msBeforeNext:_>=0?Math.max(_-c,0):-1};r(E)}})})})}_get(t){return new Promise((n,o)=>{const i=Date.now();this.client.get(t,(s,r)=>{r?this.client.get(`${t}_expire`,(a,c)=>{if(a)o(a);else{const d=c===!1?0:c,p={consumedPoints:r,msBeforeNext:d>=0?Math.max(d-i,0):-1};n(p)}}):n(null)})})}_delete(t){return new Promise((n,o)=>{this.client.del(t,(i,s)=>{i?o(i):s===!1?n(s):this.client.del(`${t}_expire`,r=>{r?o(r):n(s)})})})}}var Yy=Jy;const Hu=At;var Qy=class{constructor(t={}){this.limiter=t.limiter,this.blackList=t.blackList,this.whiteList=t.whiteList,this.isBlackListed=t.isBlackListed,this.isWhiteListed=t.isWhiteListed,this.runActionAnyway=t.runActionAnyway}get limiter(){return this._limiter}set limiter(t){if(typeof t>"u")throw new Error("limiter is not set");this._limiter=t}get runActionAnyway(){return this._runActionAnyway}set runActionAnyway(t){this._runActionAnyway=typeof t>"u"?!1:t}get blackList(){return this._blackList}set blackList(t){this._blackList=Array.isArray(t)?t:[]}get isBlackListed(){return this._isBlackListed}set isBlackListed(t){if(typeof t>"u"&&(t=()=>!1),typeof t!="function")throw new Error("isBlackListed must be function");this._isBlackListed=t}get whiteList(){return this._whiteList}set whiteList(t){this._whiteList=Array.isArray(t)?t:[]}get isWhiteListed(){return this._isWhiteListed}set isWhiteListed(t){if(typeof t>"u"&&(t=()=>!1),typeof t!="function")throw new Error("isWhiteListed must be function");this._isWhiteListed=t}isBlackListedSomewhere(t){return this.blackList.indexOf(t)>=0||this.isBlackListed(t)}isWhiteListedSomewhere(t){return this.whiteList.indexOf(t)>=0||this.isWhiteListed(t)}getBlackRes(){return new Hu(0,Number.MAX_SAFE_INTEGER,0,!1)}getWhiteRes(){return new Hu(Number.MAX_SAFE_INTEGER,0,0,!1)}rejectBlack(){return Promise.reject(this.getBlackRes())}resolveBlack(){return Promise.resolve(this.getBlackRes())}resolveWhite(){return Promise.resolve(this.getWhiteRes())}consume(t,n=1){let o;return this.isWhiteListedSomewhere(t)?o=this.resolveWhite():this.isBlackListedSomewhere(t)&&(o=this.rejectBlack()),typeof o>"u"?this.limiter.consume(t,n):(this.runActionAnyway&&this.limiter.consume(t,n).catch(()=>{}),o)}block(t,n){let o;return this.isWhiteListedSomewhere(t)?o=this.resolveWhite():this.isBlackListedSomewhere(t)&&(o=this.resolveBlack()),typeof o>"u"?this.limiter.block(t,n):(this.runActionAnyway&&this.limiter.block(t,n).catch(()=>{}),o)}penalty(t,n){let o;return this.isWhiteListedSomewhere(t)?o=this.resolveWhite():this.isBlackListedSomewhere(t)&&(o=this.resolveBlack()),typeof o>"u"?this.limiter.penalty(t,n):(this.runActionAnyway&&this.limiter.penalty(t,n).catch(()=>{}),o)}reward(t,n){let o;return this.isWhiteListedSomewhere(t)?o=this.resolveWhite():this.isBlackListedSomewhere(t)&&(o=this.resolveBlack()),typeof o>"u"?this.limiter.reward(t,n):(this.runActionAnyway&&this.limiter.reward(t,n).catch(()=>{}),o)}get(t){let n;return this.isWhiteListedSomewhere(t)?n=this.resolveWhite():this.isBlackListedSomewhere(t)&&(n=this.resolveBlack()),typeof n>"u"||this.runActionAnyway?this.limiter.get(t):n}delete(t){return this.limiter.delete(t)}};const Xy=Fs;var Zy=class{constructor(...t){if(t.length<1)throw new Error("RateLimiterUnion: at least one limiter have to be passed");t.forEach(n=>{if(!(n instanceof Xy))throw new Error("RateLimiterUnion: all limiters have to be instance of RateLimiterAbstract")}),this._limiters=t}consume(t,n=1){return new Promise((o,i)=>{const s=[];this._limiters.forEach(r=>{s.push(r.consume(t,n).catch(a=>({rejected:!0,rej:a})))}),Promise.all(s).then(r=>{const a={};let c=!1;r.forEach(d=>{d.rejected===!0&&(c=!0)});for(let d=0;dt!==null?t.remainingPoints:this._limiterFlexible.points)}removeTokens(t){const n=this;return new Promise((o,i)=>{if(t>n._limiterFlexible.points){i(new qu(`Requested tokens ${t} exceeds maximum ${n._limiterFlexible.points} tokens per interval`));return}n._queue.length>0?n._queueRequest.call(n,o,i,t):n._limiterFlexible.consume(n._key,t).then(s=>{o(s.remainingPoints)}).catch(s=>{s instanceof Error?i(s):(n._queueRequest.call(n,o,i,t),n._waitTimeout===null&&(n._waitTimeout=setTimeout(n._processFIFO.bind(n),s.msBeforeNext)))})})}_queueRequest(t,n,o){const i=this;i._queue.length{n.resolve(o.remainingPoints),t._processFIFO.call(t)}).catch(o=>{o instanceof Error?(n.reject(o),t._processFIFO.call(t)):(t._queue.unshift(n),t._waitTimeout===null&&(t._waitTimeout=setTimeout(t._processFIFO.bind(t),o.msBeforeNext)))})}}const Ba=At;var nw=class{constructor(t,n){this._rateLimiter=t,this._burstLimiter=n}_combineRes(t,n){return t?new Ba(t.remainingPoints,Math.min(t.msBeforeNext,n?n.msBeforeNext:0),t.consumedPoints,t.isFirstInDuration):null}consume(t,n=1,o={}){return this._rateLimiter.consume(t,n,o).catch(i=>i instanceof Ba?this._burstLimiter.consume(t,n,o).then(s=>Promise.resolve(this._combineRes(i,s))).catch(s=>s instanceof Ba?Promise.reject(this._combineRes(i,s)):Promise.reject(s)):Promise.reject(i))}get(t){return Promise.all([this._rateLimiter.get(t),this._burstLimiter.get(t)]).then(([n,o])=>this._combineRes(n,o))}get points(){return this._rateLimiter.points}};const ow=At,iw=go;class Ku{constructor(t,n,o){this.key=t,this.points=n,this.expire=o}}const sw=25,rw=25;class aw extends iw{constructor(t,n=null){super(t),this.client=t.storeClient,this.tableName=t.tableName,this.tableCreated=t.tableCreated,this.tableCreated?this._setTTL().finally(()=>{typeof n=="function"&&n()}):this._createTable(t.dynamoTableOpts).then(o=>{this.tableCreated=!0,this._setTTL().finally(()=>{typeof n=="function"&&n()})}).catch(o=>{if(typeof n=="function")n(o);else throw o})}get tableName(){return this._tableName}set tableName(t){this._tableName=typeof t>"u"?"node-rate-limiter-flexible":t}get tableCreated(){return this._tableCreated}set tableCreated(t){this._tableCreated=typeof t>"u"?!1:!!t}async _createTable(t){const n={TableName:this.tableName,AttributeDefinitions:[{AttributeName:"key",AttributeType:"S"}],KeySchema:[{AttributeName:"key",KeyType:"HASH"}],ProvisionedThroughput:{ReadCapacityUnits:t&&t.readCapacityUnits?t.readCapacityUnits:sw,WriteCapacityUnits:t&&t.writeCapacityUnits?t.writeCapacityUnits:rw}};try{return await this.client.createTable(n)}catch(o){if(o.__type&&o.__type.includes("ResourceInUseException"))return null;throw o}}async _get(t){if(!this.tableCreated)throw new Error("Table is not created yet");const n={TableName:this.tableName,Key:{key:{S:t}}},o=await this.client.getItem(n);return o.Item?new Ku(o.Item.key.S,Number(o.Item.points.N),Number(o.Item.expire.N)):null}async _delete(t){if(!this.tableCreated)throw new Error("Table is not created yet");const n={TableName:this.tableName,Key:{key:{S:t}},ConditionExpression:"attribute_exists(#k)",ExpressionAttributeNames:{"#k":"key"}};try{return(await this._client.deleteItem(n)).$metadata.httpStatusCode===200}catch(o){if(o.__type&&o.__type.includes("ConditionalCheckFailedException"))return!1;throw o}}async _upsert(t,n,o,i=!1,s={}){if(!this.tableCreated)throw new Error("Table is not created yet");const r=Date.now(),a=r/1e3,c=o>0?(r+o)/1e3:-1;if(i)return await this._baseUpsert({TableName:this.tableName,Key:{key:{S:t}},UpdateExpression:"SET points = :points, expire = :expire",ExpressionAttributeValues:{":points":{N:n.toString()},":expire":{N:c.toString()}},ReturnValues:"ALL_NEW"});try{return await this._baseUpsert({TableName:this.tableName,Key:{key:{S:t}},UpdateExpression:"SET points = :new_points, expire = :new_expire",ExpressionAttributeValues:{":new_points":{N:n.toString()},":new_expire":{N:c.toString()},":where_expire":{N:a.toString()}},ConditionExpression:"expire <= :where_expire OR attribute_not_exists(points)",ReturnValues:"ALL_NEW"})}catch{return await this._baseUpsert({TableName:this.tableName,Key:{key:{S:t}},UpdateExpression:"SET points = points + :new_points",ExpressionAttributeValues:{":new_points":{N:n.toString()},":where_expire":{N:a.toString()}},ConditionExpression:"expire > :where_expire",ReturnValues:"ALL_NEW"})}}async _baseUpsert(t){if(!this.tableCreated)throw new Error("Table is not created yet");try{const n=await this.client.updateItem(t);return new Ku(n.Attributes.key.S,Number(n.Attributes.points.N),Number(n.Attributes.expire.N))}catch(n){throw n}}async _setTTL(){if(!this.tableCreated)throw new Error("Table is not created yet");try{if(await this._isTTLSet())return;const n={TableName:this.tableName,TimeToLiveSpecification:{AttributeName:"expire",Enabled:!0}};return await this.client.updateTimeToLive(n)}catch(t){throw t}}async _isTTLSet(){if(!this.tableCreated)throw new Error("Table is not created yet");try{const t=await this.client.describeTimeToLive({TableName:this.tableName});return t.$metadata.httpStatusCode==200&&t.TimeToLiveDescription.TimeToLiveStatus==="ENABLED"&&t.TimeToLiveDescription.AttributeName==="expire"}catch(t){throw t}}_getRateLimiterRes(t,n,o){const i=new ow;return i.isFirstInDuration=n===o.points,i.consumedPoints=i.isFirstInDuration?n:o.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=o.expire!=-1?Math.max(o.expire*1e3-Date.now(),0):-1,i}}var lw=aw;const cw=go,uw=At;class dw extends cw{constructor(t){if(super(t),this.modelName=t.tableName||"RateLimiterFlexible",this.prismaClient=t.storeClient,this.clearExpiredByTimeout=t.clearExpiredByTimeout||!0,!this.prismaClient)throw new Error("Prisma client is not provided");this.clearExpiredByTimeout&&this._clearExpiredHourAgo()}_getRateLimiterRes(t,n,o){const i=new uw;let s=o;return i.isFirstInDuration=s.points===n,i.consumedPoints=s.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=s.expire!==null?Math.max(new Date(s.expire).getTime()-Date.now(),0):-1,i}_upsert(t,n,o,i=!1){if(!this.prismaClient)return Promise.reject(new Error("Prisma client is not established"));const s=new Date,r=o>0?new Date(s.getTime()+o):null;return this.prismaClient.$transaction(async a=>{const c=await a[this.modelName].findFirst({where:{key:t}});if(c){const d=i||!c.expire||c.expire<=s||r===null;return a[this.modelName].update({where:{key:t},data:{points:d?n:c.points+n,...d&&{expire:r}}})}else return a[this.modelName].create({data:{key:t,points:n,expire:r}})})}_get(t){return this.prismaClient?this.prismaClient[this.modelName].findFirst({where:{AND:[{key:t},{OR:[{expire:{gt:new Date}},{expire:null}]}]}}):Promise.reject(new Error("Prisma client is not established"))}_delete(t){return this.prismaClient?this.prismaClient[this.modelName].deleteMany({where:{key:t}}).then(n=>n.count>0):Promise.reject(new Error("Prisma client is not established"))}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(async()=>{await this.prismaClient[this.modelName].deleteMany({where:{expire:{lt:new Date(Date.now()-36e5)}}}),this._clearExpiredHourAgo()},3e5)}}var fw=dw;const pw=_y,hw=Cy,mw=Sy,gw=Ty,{RateLimiterClusterMaster:yw,RateLimiterClusterMasterPM2:ww,RateLimiterCluster:bw}=Ky;var Wu={RateLimiterRedis:pw,RateLimiterMongo:hw,RateLimiterMySQL:mw,RateLimiterPostgres:gw,RateLimiterMemory:Bu,RateLimiterMemcache:Yy,RateLimiterClusterMaster:yw,RateLimiterClusterMasterPM2:ww,RateLimiterCluster:bw,RLWrapperBlackAndWhite:Qy,RateLimiterUnion:Zy,RateLimiterQueue:tw,BurstyRateLimiter:nw,RateLimiterRes:At,RateLimiterDynamo:lw,RateLimiterPrisma:fw};const _w="pan115_api",vw={points:5,duration:1};function xw(e){return{clientId:_w,rateLimit:vw,msDelayAdjustment:30,...e}}function Cw(e){const t=xw(e),n=Su.create(),o=new Wu.RateLimiterMemory(t.rateLimit);return n.interceptors.request.use(async i=>{try{const s=await o.consume(t.clientId);return i}catch(s){if(console.warn("[axios] RateLimiter:",s),s instanceof Wu.RateLimiterRes){const r=s.msBeforeNext+t.msDelayAdjustment;return console.log(`[axios] Delay ${r}ms for next request...`),await kt(r),i}else throw new uy(s)}},i=>(console.warn("[axios] onRejected:",i),Promise.reject(i))),n}const Dt=Cw();async function Gu(e,t,n){const o=new URLSearchParams({page:e.toString(),uid:n.toString(),sign:t,time:$i().toString()});return(await Dt.post("https://115.com/web/lixian/?ct=lixian&ac=task_lists",o,{withCredentials:!0,timeout:6e4})).data}async function Ju(){return(await Dt.get(`https://115.com/?ct=offline&ac=space&_=${Date.now()}`,{timeout:3e4,withCredentials:!0})).data}async function Yu(){const t=(await Dt.get("https://my.115.com/?ct=ajax&ac=nav",{timeout:3e4,withCredentials:!0})).data;if(t.state)return t.data;throw new Error(t.error)}async function Qu(e){const t=fa(e),o=(await Dt.get("https://webapi.115.com/files?"+t,{timeout:12e4,withCredentials:!0})).data;if(o.state)return o;throw new Error(o.error)}async function Xu(e,t=500){const n=await Da(e,t);for(let o=0;o=i.count))break;await kt(t)}return n}async function $w(e){const t=fa(e),n=await Dt.get("https://webapi.115.com/files/search?"+t,{timeout:12e4,withCredentials:!0});if(n.data==="")throw new Pu;const o=n.data;if(o.state)return o;throw new Ta(o.error)}async function kw(e,t=500,n=!1){let o=[],i=0,s=e.limit;const r=1e4,a=115,c=r-r%s;let d=s;for(;;){if(n){if(i>=c&&i=r&&(d=a)}e.offset=i,e.limit=d;const p=await $w(e);if(!p.data||!p.data.length||(o=[...o,...p.data],i+=d,i>=p.count))break;await kt(t)}return o}async function Ew(e,t){const n=new URLSearchParams({pid:e,ignore_warn:"1"});return t.forEach((i,s)=>{n.append(`fid[${s}]`,i)}),(await Dt.post("https://webapi.115.com/rb/delete",n,{timeout:12e4,withCredentials:!0})).data}async function Zu(e,t,n,o){let i=0,s=0;for(;;){const r=t.slice(i,i+n);if((await Ew(e,r)).state&&(s+=r.length),i+=n,i>=t.length)break;await kt(o)}return s}async function ed(e,t){const n=new URLSearchParams({pid:e,cname:t});return(await Dt.post("https://webapi.115.com/files/add",n,{timeout:12e4,withCredentials:!0})).data}async function Sw(e,t){const n=new URLSearchParams({pid:e});return t.forEach((i,s)=>{n.append(`fid[${s}]`,i)}),(await Dt.post("https://webapi.115.com/files/move",n,{timeout:12e4,withCredentials:!0})).data}async function Aw(e){const t=new URLSearchParams({path:e});return(await Dt.get("https://webapi.115.com/files/getid?"+t.toString(),{timeout:12e4,withCredentials:!0})).data}async function Hn(e){const t=new URLSearchParams({cid:e});return(await Dt.get("https://webapi.115.com/category/get?"+t.toString(),{timeout:12e4,withCredentials:!0})).data}async function Ra(e,t,n,o){const i={uid:o.toString(),sign:t.sign,time:$i().toString()};n&&(i.flag="1");const s=dy(i);return e.forEach((a,c)=>{s.append(`hash[${c}]`,a)}),(await Dt.post("https://115.com/web/lixian/?ct=lixian&ac=task_del",s,{timeout:12e4,withCredentials:!0})).data}async function Pw(e){if(!(await Hn(e)).play_long)throw new Error("该目录下没有可以播放的媒体文件![by_attr]");const o=(await Da(Pi({cid:e,limit:1150}))).find(i=>i.play_long&&i.play_long>0);if(!o)throw new Error("该目录下没有可以播放的媒体文件![by_files]");return Ni(o)}async function Iw(e){/^\d+$/.test(e.target)&&(e.target=`U_1_${e.target}`);const t=fa(e);return(await Dt.post("https://uplb.115.com/3.0/sampleinitupload.php",t,{timeout:12e4,withCredentials:!0})).data}async function Tw(e,t){const n=await Iw(t),o=new FormData;o.append("name",t.filename),o.append("key",n.object),o.append("policy",n.policy),o.append("OSSAccessKeyId",n.accessid),o.append("success_action_status","200"),o.append("callback",n.callback),o.append("signature",n.signature),o.append("file",e);const i=n.host.replace(/^http:/,"https:");return(await Dt.post(i,o,{timeout:18e5})).data}function Ow(e){if(navigator.clipboard){navigator.clipboard.writeText(e);return}if(document.execCommand){const t=document.createElement("input");t.style.position="fixed",t.style.opacity="0",t.value=e,document.body.appendChild(t),t.select(),document.execCommand("Copy"),document.body.removeChild(t);return}prompt("请复制以下内容:",e)}function td(e="",t=""){return e+Date.now().toString()+Math.random().toString(36).substring(5)+t}async function Lw(e,t,n=!1){var s;const o=new Map;if(!e.length)return o;t=t||await Ai();let i=new Map;n||(ue({text:"正在获取上级目录路径...",timer:0}),fe.showLoading());try{i=await Jw(e),n||fe.close()}catch(r){return console.error(r),n||ue({text:`获取上级目录路径失败: ${r}`,timer:1200,icon:"error"}),o}finally{n||fe.hideLoading()}if(i.size===0)return o;for(let r=0;r(e.unix="/",e.windows="\\",e))(yo||{});function js(e,t="/"){return e.map((n,o)=>o===0?n:Us(n,t)).join(t)}function Us(e,t="/"){return e=e.replace(/[\\/]/g,t),t==="/"?e=e.replace(/\/+/g,t):e=e.replace(/\\+/g,t),e.length>1&&e.endsWith(t)&&(e=e.slice(0,-1)),e}function Dw(e){return e.startsWith("/")}function Rw(e){return e===""||e==="/"||e==="\\"}function nd(e,t,n="/"){if(Dw(t))return t;const o=new URL(e,"http://example.com");o.pathname=Fw(o.pathname,t);let i=decodeURIComponent(o.pathname);return Us(i,n)}function Fw(e,t){const n=e.endsWith("/")?e:e+"/",o=t.startsWith("/")?t.slice(1):t;return n+o}async function Kt(e=!0){const t=bo().GetCurWangPanCid();return!t&&e?(bo().Core.MinMessage.Show({text:'不支持"根目录"!',timeout:1e3}),""):t}async function jw(e,t){let n=$(`li.temp-el[cate_id="${e}"]`);if(!n.length){const o=`
  • `;n=$(o)}n.attr("title",t.file_name),n.find("a.name > span").text(t.file_name);for(let o in t){const i=typeof t[o];["string","number"].indexOf(i)>-1&&n.attr(o,t[o])}return n.attr("cate_id",e),n.attr("p_id",t.paths[t.paths.length-1].file_id),n}async function ln(e){const t=await Mi(e);return Ni(t)}async function Mi(e){const t=e.attr("file_size"),n=e.attr("iv")==="1",o=await rd(),i=e.attr("file_id")||"",s=!!i,r={n:e.attr("title")||"",s:t?parseInt(t):0,pc:e.attr("pick_code")||"",t:e.attr("user_ptime")||"",te:"",tp:"",ico:e.attr("ico")||"",sha:e.attr("sha1")||"",iv:n};let a={n:r.n};if(!o)a={fid:i,cid:(s?e.attr("cid"):e.attr("cate_id"))||"",pid:s?"":e.attr("p_id")||"",...r};else if(a={fid:i,cid:(s?e.attr("cid"):e.attr("cate_id"))||"",...r},!s){const c=e.find(".file-directory a[cid]");if(c.length)a.pid=c.attr("cid");else throw console.warn("无法获取上级目录ID!",e),new Error("无法获取上级目录ID!")}return{...a,...r}}async function wo(e){const t=await Vw(e);return Uw(t)}async function Uw(e){const t=[];for(let n=0;n{bo().Core.DataAccess.Dir.GetDetail("1",e,o=>t(o))})}async function zw(){const e=await Kt(),t=await qw(e),n=await jw(e,t);return n.addClass("ce-temp-cur-dir"),n}async function Hs(){return window.top!==window?$(document):$('iframe[name="wangpan"], .wrap-view iframe:eq(0)').contents()}async function Zo(){return(await Hs()).find(".list-contents, .list-thumb")}async function od(e){const t=await Zo();return e?t.find("li.selected:not(.ce-temp-cur-dir)"):t.find("li:not(.ce-temp-cur-dir)")}async function Vw(e){const t=await od(e),n=[];for(let o=0;o .file-path").children().each(function(){t.push($(this).text().trim().replace(/[›]$/,""))}),t}async function Kw(){const e=await Kt();(await Zo()).find("li.selected").each(function(){const n=$(this);n.attr("cate_id")!==e&&(n.find('input[type="checkbox"]').prop("checked",!1),n.removeClass("selected"))})}async function qn(e=!1){const t=await Kt();if(!t)return null;const n=await Zo(),o=await zw();return e||o.hide(),n.find(`li[cate_id="${t}"]`).length||n.append(o),o}async function ja(e,t,n){n&&await Kw(),bo().Core.FileMenu.DoEvent([e],t,null)}function sd(e){return`https://115.com/?${new URLSearchParams({cid:e}).toString()}&offset=0&mode=wangpan`}async function rd(e=location.href){return e.includes("ac=search")}function Ua(e,t=""){const n=new URLSearchParams({aid:"1",cid:e.cid||"",old_cid:e.cid||"",old_cid_name:t,search_value:e.search_value,ct:"file",ac:"search",is_wl_tpl:"1"});return"https://115.com/?url="+encodeURIComponent(`/?${n.toString()}`)+"&submode=wangpan&mode=search"}function ad(e){return`https://v.anxia.com/?${new URLSearchParams({pickcode:e,share_id:"0"}).toString()}`}async function Ww(e){unsafeWindow.Main.ReInstance({type:e.type,offset:0,o:Yc.userPtime,asc:ma.false,star:e.star,suffix:e.suffix})}async function Gw(){return(await Zo()).find("li.selected")}async function ld(){const e=await Gw();return e?await Mi(e):null}function cd(e){return e.replace(/[/\\:*?"<>|]/g,"_")}async function Ha(e){const n=(await Hn(e.id)).paths.slice(1).map(s=>s.file_name).join("/"),o=cd(e.name);return`/${n}/${o}`.replace(/^[\/]+/g,"/")}async function Jw(e,t=100){var s;const n=new Map;for(const r of e){const a=r.parentId;if(!a)throw new Error(`文件"${r.name}"没有父级目录ID!`);n.has(a)?(s=n.get(a))==null||s.push(r):n.set(a,[r])}const o=[];for(const r of n.values())o.push(r[0]);const i=new Map;for(const r of o){const a=await Hn(r.id);await kt(t),i.set(r.parentId,a.paths.map(c=>c.file_name))}return i}async function Yw(e,t=100){var s;const n=new Map;for(const r of e){const a=r.parentId;if(!a)throw new Error(`文件"${r.name}"没有父级目录ID!`);n.has(a)?(s=n.get(a))==null||s.push(r):n.set(a,[r])}const o=[];for(const r of n.values())o.push(r[0]);const i=new Map;for(const r of o){const a=await Hn(r.id);await kt(t),i.set(r.parentId,a.paths)}return i}async function Qw(e,t){const n=new File([e],t.filename,{type:"text/plain"});return Tw(n,t)}async function Xw(e,t,n){const o=await Lw(e),i=await Bw(o);n=n||td();let s=t;return/m3u8$/.test(n)||(n+=".m3u8"),await Qw(i,{filename:n,target:s})}const qa=new Map;async function za(e,t=!0){if(e=Us(e,yo.unix),e=e.replace(/^[\/]+/,"").replace(/[\/]+$/,""),t&&qa.has(e))return qa.get(e);if(e===""||e==="/")return"0";const n=await Aw(e);if(!n.state)throw new Error(`根据路径"${e}"获取目录ID失败: ${n.error}`);if(n.id&&n.id.toString()!=="0")return qa.set(e,n.id.toString()),n.id.toString();throw new Iu(`根据路径"${e}"获取目录ID失败: 目录不存在!`)}async function Zw(e){e=e.replace(/^\//,"").replace(/\/$/,"");const t={id:"",created:!1,pathToId:new Map};if(e===""||e==="/")return t.id="0",t;const n=e.split("/").filter(s=>s);let o="0",i="";for(const s of n){i+="/"+s;let r="";try{r=await za(i,!0),t.pathToId.set(i,r)}catch(a){if(a instanceof Iu){const c=await ed(o,s);if(!c.state)throw new Error(`创建目录"${s}"失败: ${c.error} - ${c.error}`);r=c.cid.toString()}else throw a}o=r,t.pathToId.set(i,r)}return t.id=o,t}async function eb(e,t,n=!0){let o="";const i=await ed(t,e);if(i.state)o=i.cid.toString();else{if(i.errno===Tu.exist&&n){const s=await Hn(t);if(!s.pick_code)throw new Error(`获取目录"${t}"属性失败: ${s.errno} - ${s.error}`);const r=[...s.paths.slice(1).map(a=>a.file_name),s.file_name,e].join("/");return await za(r,!0)}throw new Error(`创建目录"${e}"失败: ${i.errno} - ${i.error}`)}return o}async function ud(e){if(!location.search.includes("ac=search")||!e.enableInSearch)return;const n=(await po("#js_data_list"))[0],o=[{label:"移动",body:'移动',enabled:!0},{label:"重命名",body:'重命名',enabled:!0},{label:"删除",body:'删除',enabled:!0},{label:"属性",body:'属性',enabled:!0}],i=a=>{let c="";for(const d of a)!d.enabled||(c+=d.body);return c},s=()=>{const a="ce-menu-init",c=document.querySelectorAll(`li[rel="item"]:not(.${a})`),d=i(o);for(let p=0;p{a.type==="childList"&&s()}).observe(n,{childList:!0})}async function tb(e){if(!e.hideSelectionMenuLabel)return;const n=(await po("#js_operate_box"))[0];new MutationObserver(async([i])=>{if(i.type==="childList"){const s=n.querySelectorAll("li[menu]");for(let r=0;r{c.stopPropagation(),c.preventDefault();try{let d;if(i){const _=c;(i===cn.alt&&_.altKey||i===cn.ctrl&&_.ctrlKey||i===cn.shift&&_.shiftKey||i===cn.meta&&_.metaKey)&&(d={names:[Wa.manual],position:o.injectManualFuncPosition})}const p=$(c.target).closest("li"),h=await ln(p),y=await Ai(),v=await Vs(h,s,y,d);if(console.log("[search url]",v),!v)throw new Error("无法获取有效的搜索链接!");jm(v,{active:!s.openInBackground})}catch(d){console.error(d),ue({title:"搜索失败",text:d.toString(),icon:"error"})}}});n.push(r)}return n}async function Va(e,t){if(console.log("[playDirOnAnxia]",e,t),!t)try{ue({title:"正在查找可播放的文件...",text:"请稍等...",icon:"info"}),fe.showLoading(),t=await Pw(e),console.log("[playDirOnAnxia] file",t)}catch(o){console.error(o),ue({title:"播放失败",text:o.toString(),icon:"error"});return}t||ue({title:"播放失败",text:"没有在该目录下找到可播放的文件![file_null]",icon:"error"});const n=ad(t.pickCode);window.open(n,"_blank","noopener noreferrer")}async function ob(e,t){const n=[],o=await ti(),i=o.keyToTriggerManual;for(const s of t){const r=Es(e,{key:`_ce_p_${s.key}`,label:s.label,icon:s.icon,title:s.memo,onClick:async(a,c)=>{c.stopPropagation(),c.preventDefault();try{let d;if(i){const _=c;(i===cn.alt&&_.altKey||i===cn.ctrl&&_.ctrlKey||i===cn.shift&&_.shiftKey||i===cn.meta&&_.metaKey)&&(d={names:[Wa.manual],position:o.injectManualFuncPosition})}const p=$(c.target).closest("li"),h=await ln(p),y=await Ai(),v=await Vs(h,s,y,d);if(h.isDir&&v.includes("v.anxia.com")){Va(h.id);return}if(console.log("[play url]",v),!v)throw new Error("无法获取有效的播放链接!");window.open(v,"_blank","noopener noreferrer")}catch(d){console.error(d),ue({title:"播放失败",text:d.toString(),icon:"error"})}}});n.push(r)}return n}var Rt=(e=>(e[e.full=0]="full",e[e.pure=1]="pure",e[e.fullUnique=2]="fullUnique",e[e.pureUnique=3]="pureUnique",e))(Rt||{});async function qs(e,t){if(t===0)return e;if(t===2)return Array.from(new Set(e));const n=[];for(const o of e){const i=o.replace(/\.[^.]+$/,"");t===1?n.push(i):t===3&&(n.includes(i)||n.push(i))}return n}var Zt=(e=>(e[e.unixPath=0]="unixPath",e[e.winPath=1]="winPath",e[e.unixParentPath=2]="unixParentPath",e[e.winParentPath=3]="winParentPath",e))(Zt||{});async function Ka(e,t,n){const o=n===1||n===3;let s=n===2||n===3?t.replace(/\/[^/]+$/,""):t;return s.startsWith("/")||(s="/"+s),o&&(s=s.replace(/\//g,"\\")),s}async function ib(e){return async(t,n)=>{const o=await Kt(),i=await Hs(),s=e?"li[file_id].selected":"li[file_id]",r=i[0].querySelectorAll(s);if(!r.length){ue({title:"文件移动到同名目录",text:e?"当前目录没有选中文件":"当前目录没有文件",icon:"warning"});return}let a=e?`当前已选中${r.length}个文件,是否继续?`:`当前目录共有${r.length}个文件,是否继续?`;a+=`
    处理逻辑:

    0.「同名目录」取自纯文件名(不带后缀名)。

    1.如果同名目录已存在,会直接使用已存在的目录。

    2.同名目录相同的文件,会被移动到同一个目录里面。

    `;const{value:c}=await fe.fire({title:"文件移动到同名目录",html:a,icon:"warning",showCancelButton:!0,confirmButtonText:"继续",cancelButtonText:"取消"});if(!!c){fe.fire({title:"文件移动到同名目录",html:"正在处理...",didOpen:()=>{fe.showLoading()}});for(let d=0;d{const n=t.target;hd(n)&&pd(t)})}const zs=fe.mixin({toast:!0,position:"top-end",showConfirmButton:!1,timer:3e3,timerProgressBar:!0,didOpen:e=>{e.addEventListener("mouseenter",fe.stopTimer),e.addEventListener("mouseleave",fe.resumeTimer)},customClass:"swal-toast"});async function ab(e,t){e.addEventListener("keydown",n=>{const o=n.target;if(!hd(o))return;let i=!1;(t==="enter"&&n.key==="Enter"||t==="ctrl+enter"&&n.key==="Enter"&&n.ctrlKey||t==="meta+enter"&&n.key==="Enter"&&n.metaKey)&&(i=!0),i&&fe.clickConfirm()})}var Wa=(e=>(e.search="search",e.encode="encode",e.base64="base64",e.base64safe="base64safe",e.upper="upper",e.lower="lower",e.number="number",e.manual="manual",e))(Wa||{});const lb=[{label:"文件属性变量",items:[{key:"{dir_id}",label:"文件夹ID"},{key:"{file_id}",label:"文件ID"},{key:"{pick_code}",label:"提取码"},{key:"{pure_name}",label:"不含后缀的文件名"},{key:"{full_name}",label:"完整名称"},{key:"{file_suffix}",label:"文件后缀名"},{key:"{file_hash}",label:"文件hash"},{key:"{file_size}",label:"文件大小"},{key:"{file_path}",label:"文件路径"},{key:"{file_dir}",label:"文件目录路径"}]},{label:"高级变量",items:[{key:"{clouddrive_stream_url}",label:"CloudDrive链接(用于播放,目录链接是m3u)"},{key:"{clouddrive_down_url}",label:"CloudDrive文件链接"},{key:"{clouddrive_playlist_url}",label:"CloudDrive播放列表链接"},{key:"{user_agent}",label:"浏览器UA"}]},{label:"变量函数处理",memo:"支持多个函数,函数之间使用英文冒号分隔,如:{变量名:encode:base64}。调用顺序从左到右。",items:[{key:"{变量名:search}",label:"搜索链接"},{key:"{变量名:encode}",label:"url编码"},{key:"{变量名:base64}",label:"base64编码"},{key:"{变量名:base64safe}",label:"base64安全编码"},{key:"{变量名:upper}",label:"转大写"},{key:"{变量名:lower}",label:"转小写"},{key:"{变量名:number}",label:"转数字"},{key:"{变量名:manual}",label:"手动输入"}]}];function cb(e,t,n){const{names:o,position:i}=t;let s=[];return i==="first"?s=[...o,...e]:s=[...e,...o],n?Array.from(new Set(s)):s}async function Vs(e,t,n,o){var d;let i=t.url;const s={dir_id:"id",file_id:"id",pick_code:"pickCode",full_name:"name",file_suffix:"suffix",file_hash:"hash",file_size:"sizeBytes"},r=e.isFile,a=/{(\w+)(:\w+(:\w+)?)?}/g,c=i.match(a);if(c){const p=["file_path","file_dir","clouddrive_stream_url","clouddrive_down_url","clouddrive_playlist_url"];for(const h of c){const y=h.replace(/[{}]/g,"").split(":")[0],v=h.replace(/[{}]/g,"").replace(/^[^:]+:/,"");let _=((d=e[s[y]])==null?void 0:d.toString())||"",E="";switch(p.includes(y)&&(E=await Ha(e)),y){case"pure_name":r?_=e.name.replace(/\.[^.]+$/,""):_=e.name;break;case"file_path":_=E;break;case"file_dir":_=E.replace(/\/[^/]+$/,"");break;case"clouddrive_stream_url":r?_=await Wo(n,E,Ps.download):_=await ha(n,E);break;case"clouddrive_down_url":_=await Wo(n,E,Ps.download);break;case"clouddrive_playlist_url":let T="";r?T=E.replace(/\/[^/]+$/,""):T=E,_=await ha(n,T);break;case"user_agent":_=navigator.userAgent;break}if(_=_.toString(),v){let T=v.split(":");o&&(T=cb(T,o,!1)),console.log(`[buildCustomUrl] functions: ${v}, after merge: ${T.join(":")}`);for(const B of T)switch(B){case"search":_=Ua({search_value:_});break;case"encode":_=encodeURIComponent(_);break;case"base64":_=Bc(_);break;case"base64safe":_=Bc(_,!0);break;case"upper":_=_.toUpperCase();break;case"lower":_=_.toLowerCase();break;case"number":_=_.replace(/\D/g,"");break;case"manual":let{isConfirmed:P,value:I}=await fe.fire({title:"手动输入",text:"按下「Ctrl + 回车」或「Command + 回车」确认",input:"textarea",inputValue:_,showCancelButton:!0,inputValidator:H=>H?null:"输入不能为空!",didOpen:H=>{rb(H),ab(H,"meta+enter")}});if(!P)throw new Error("已取消手动输入。");if(I=(I==null?void 0:I.trim())||"",I==="")throw new Error("输入不能为空!");_=I;break}}i=i.replace(h,_)}}return t.mutation?await ub(i,e,t,n):i}async function ub(e,t,n,o){return await new Function("payload",n.mutation)({url:e,file:t,customUrl:n,cloudDriveConfig:o})}var vn=(e=>(e.search="search",e.play="play",e))(vn||{});const md={search:"menu_custom_urls_for_search",play:"menu_custom_urls_for_play"};async function ei(e){return await Ze.get(md[e],[])}async function gd(e,t){await Ze.set(md[e],t)}function pt(e){return{enabled:!0,key:"",label:"",icon:"",memo:"",extraMemo:"",url:"",openInBackground:!1,...e}}var cn=(e=>(e.none="none",e.alt="alt",e.ctrl="ctrl",e.shift="shift",e.meta="meta",e))(cn||{});const yd="ce_menu_config";function db(e){return{enabled:!0,openInNewTab:!0,search:!0,play:!0,getDownloadUrl:!0,copyNames:!0,exportList:!1,...e}}function fb(e){return{enabled:!0,copyNames:!0,...e}}function pb(e){return{enabled:!0,moveToSelfNameDir:!0,copyNames:!0,play:!0,...e}}function hb(e){return{enabled:!0,rename:!0,delete:!0,play:!0,copyNames:!0,move:!0,copy:!0,copyTo:!0,viewProp:!0,showSubFolderSize:!0,exportList:!1,...e}}function mb(e){return{enabled:!0,hideSelectionMenuLabel:!1,enableInSearch:!0,manageOfficialMenus:!1,keyToTriggerManual:"none",injectManualFuncPosition:"first",m3u8TempDir:".ce-m3u8-temp",[Me.listItemHover]:db(e==null?void 0:e[Me.listItemHover]),[Me.listItemContext]:fb(e==null?void 0:e[Me.listItemContext]),[Me.selection]:pb(e==null?void 0:e[Me.selection]),[Me.dirContext]:hb(e==null?void 0:e[Me.dirContext]),...e}}async function ti(){const e=mb(),t=await Ze.get(yd,e);return{...e,...t}}async function gb(e){await Ze.set(yd,e)}const vc=class{constructor(t){Ie(this,"menuType",Me.listItemHover);Ie(this,"injectDecider");Ie(this,"keyAttributeName","id");Ie(this,"key","");Ie(this,"label","");Ie(this,"icon","");Ie(this,"showIcon",!0);Ie(this,"title","");Ie(this,"onClick",async(t,n)=>{});Ie(this,"onMouseOver");Ie(this,"onMouseOut");Ie(this,"subItems",[]);Ie(this,"isDivider",!1);Ie(this,"menuItemTemplates",{[Me.dirContext]:{body:`
  • {icon}{label}
  • `,bodyForMulti:`
  • {icon}{label}
    `,divider:'
  • '},[Me.dirContextSub]:{body:` {icon}{label} `,divider:''},[Me.listItemContext]:{body:`
  • {icon}{label}
  • `,bodyForMulti:`
  • {icon}{label}
    `,divider:'
  • '},[Me.listItemContextSub]:{body:'{label}',divider:''},[Me.listItemHover]:{body:` {icon}{label} `,bodyForMulti:` {icon}{label}
    `,divider:''},[Me.listItemHoverSub]:{body:` {icon}{label} `,divider:''},[Me.selection]:{body:'
  • {icon}{label}
  • ',bodyForMulti:`
  • {icon}{label}
  • `,divider:'
  • '},[Me.selectionSub]:{body:` {icon}{label} `,divider:''}});t.menuType&&(this.menuType=t.menuType),t.injectDecider&&(this.injectDecider=t.injectDecider),t.isDivider&&(this.isDivider=!0),t.key&&(this.key=t.key),t.label&&(this.label=t.label),t.icon&&(this.icon=t.icon),t.showIcon!==void 0&&(this.showIcon=t.showIcon),t.title&&(this.title=t.title),t.onClick&&(this.onClick=t.onClick),t.onMouseOver&&(this.onMouseOver=t.onMouseOver),t.onMouseOut&&(this.onMouseOut=t.onMouseOut),t.subItems&&(this.subItems=t.subItems),t.key&&(this.key=t.key),t.label&&(this.label=t.label),t.onClick&&(this.onClick=t.onClick)}async decideInject(t){return this.injectDecider?await this.injectDecider(this,t):!0}async render(){if(!this.menuType)throw new Error("未指定菜单类型");const t=this.menuItemTemplates[this.menuType];if(!t)throw new Error(`未找到菜单模板:${this.menuType}`);if(this.isDivider){if(!t.divider)throw new Error("未定义模版的divider内容!");const r=document.createElement("div");return r.innerHTML=t.divider,r.firstElementChild}let n=t.body;if(this.subItems.length>0){if(!t.bodyForMulti)throw new Error("未找到 bodyFormMulti 模版");n=t.bodyForMulti}const o=document.createElement("div");let i="";this.icon&&this.showIcon&&(this.icon.match(/^(http|https|data:image)/)?i=``:this.icon.match(/^data-text:/)?i=`${this.icon.replace(/^data-text:/,"")}`:i=``),o.innerHTML=n.replace(/{key}/g,this.key).replace(/{label}/g,this.label).replace(/{icon}/g,i);const s=o.firstElementChild;if(s.setAttribute("title",this.title||""),this.onClick&&s.addEventListener("click",async r=>{this.onClick(this,r)}),this.onMouseOver&&s.addEventListener("mouseover",async r=>{this.onMouseOver&&this.onMouseOver(this,r)}),this.onMouseOut&&s.addEventListener("mouseout",async r=>{this.onMouseOut&&this.onMouseOut(this,r)}),this.subItems.length>0){const r=s.querySelector(".sub-items"),a=[];for(const c of this.subItems){const d=await c.render();a.push(d)}r==null||r.append(...a)}return s}async closeMenu(){unsafeWindow.Core.FileMenu.HideRight(),document.dispatchEvent(new CustomEvent(vc.EVENT_CLOSE_MENU,{detail:{menu:this}}))}async decorateContainer(t){}};let Wt=vc;Ie(Wt,"EVENT_CLOSE_MENU","__closeMenu");async function Ks(e,t){t.stopPropagation(),t.preventDefault();const n=t.target,o=$(n).closest(".ce-menu-parent"),i=o.find(".ce-menu-dropdown");o.addClass("ce-menu-dropdown-opened"),i.addClass("ce-menu-dropdown-active")}async function Ws(e,t){t.stopPropagation(),t.preventDefault();const n=t.target,o=$(n).closest(".ce-menu-parent"),i=o.find(".ce-menu-dropdown");o.removeClass("ce-menu-dropdown-opened"),i.removeClass("ce-menu-dropdown-active")}class Pt extends Wt{constructor(n){super(n);Ie(this,"menuType",Me.dirContext);this.onMouseOver=Ks,this.onMouseOut=Ws}}class yb extends Wt{constructor(){super(...arguments);Ie(this,"menuType",Me.dirContextSub)}}class Ga extends Wt{constructor(n){super(n);Ie(this,"menuType",Me.listItemContext);this.onMouseOver=Ks,this.onMouseOut=Ws}}class Gs extends Wt{constructor(n){super(n);Ie(this,"menuType",Me.listItemHover);this.onMouseOver=Ks,this.onMouseOut=Ws}}class Bi extends Wt{constructor(){super(...arguments);Ie(this,"menuType",Me.listItemHoverSub)}}class Ja extends Wt{constructor(n){super(n);Ie(this,"menuType",Me.selection);this.onMouseOver=Ks,this.onMouseOut=Ws}}class Js extends Wt{constructor(){super(...arguments);Ie(this,"menuType",Me.selectionSub)}}class Ys extends Wt{constructor(){super(...arguments);Ie(this,"isDivider",!0)}}class wb extends Ys{}class bb extends Ys{}class wd extends Ys{}class bd extends Ys{}class Qs{constructor(t){Ie(this,"items");Ie(this,"siblingSelector");Ie(this,"position");Ie(this,"useObserver",!0);Ie(this,"observeTarget",document.body);Ie(this,"disposeObserverAfterInjection",!0);Ie(this,"menuType");Ie(this,"_observer");Ie(this,"injectDecider");t.menuType&&(this.menuType=t.menuType),t.injectDecider&&(this.injectDecider=t.injectDecider),this.items=t.items,this.siblingSelector=t.siblingSelector,this.position=t.position,this.useObserver=t.useObserver,this.observeTarget=t.observeTarget,this.disposeObserverAfterInjection=t.disposeObserverAfterInjection}async createObserver(){return new MutationObserver(async([n])=>{n.type==="childList"&&await this.handleChildListMutation(n)})}async observe(){if(this._observer=await this.createObserver(),!this._observer)return;const t=await this.getObserveTarget();!t||this.startObserver(t)}async startObserver(t){!this._observer||this._observer.observe(t,{childList:!0})}async disposeObserver(){this.disposeObserverAfterInjection&&this._observer&&this._observer.disconnect()}async getObserveTarget(){return typeof this.observeTarget=="string"?(await po(this.observeTarget,800,6048e5))[0]:this.observeTarget}async isMutationMatch(t){const n=t.addedNodes[0];if(n&&n.nodeType!==Node.ELEMENT_NODE)return!1;switch(this.menuType,Me.dirContext,this.menuType){case Me.listItemHover:return!0;case Me.listItemContext:return n&&n.classList.contains("context-menu")&&!!n.querySelector('[val="report"]');case Me.selection:return!0;case Me.dirContext:return n&&n.classList.contains("context-menu")&&!!n.querySelector('[val="upload"]');default:return!1}}async handleChildListMutation(t){if(!await this.isMutationMatch(t))return;const n=await this.getContainers(t);await this.perform(n)}async perform(t){for(const n of t)await this.injectToContainer(n)}async getSibling(t){return t.querySelector(this.siblingSelector)}async getContainers(t){let n=[];const o=t.addedNodes[0];switch(this.menuType){case Me.listItemHover:document.querySelectorAll("#js_data_list .list-contents > ul:not([ce-done]) > li .file-opr").forEach(i=>{n.push(i)});break;case Me.listItemContext:n=[o];break;case Me.selection:document.querySelectorAll("#js_top_panel_box #js_operate_box").forEach(i=>{n.push(i)});break;case Me.dirContext:n=[o];break}return n}async shouldInjectMenuItem(t,n){return await n.decideInject(t)?await this.decideInject(n,t):!1}async decideInject(t,n){return this.injectDecider?await this.injectDecider(t,n):!0}async injectToContainer(t){const n=await this.getSibling(t);if(!n)return;let o=this.items.slice();this.position===mo.after&&(o=o.reverse());for(let i=0;i ul:not([ce-done]) > li .file-opr");o.length&&await this.perform(Array.from(o))}super.inject()}async handleLoadAll(){if(window.top===window.self)return;const n=document.querySelector("#js_pagination_box");if(!n){console.warn("[ListItemHoverMenuInjector.handleLoadAll] 未找到「#js_pagination_box」元素");return}function o(i){const s=document.querySelector("#js_data_list .list-contents > ul > li");!s||s.querySelector(".ce-menu")||i(!0)}n.addEventListener("click",async i=>{i.preventDefault(),i.stopPropagation();const s=i.target;let r=!1;if((s.getAttribute("menu")==="load_all_file"||s.closest('[menu="load_all_file"]'))&&(r=!0),!r)return;console.log("[ListItemHoverMenuInjector.handleLoadAll] 点击了「加载全部」按钮"),await Ei(o,500,3e5);const a=document.querySelector("#js_data_list .list-contents > ul");a==null||a.removeAttribute("ce-done");const c=document.querySelector("#js_data_list");if(c){const d=".list-contents > ul:not([ce-done]) > li .file-opr";if(!document.querySelector(d)){const h=await ti();await ud(h)}const p=c.querySelectorAll(d);p.length&&await this.perform(Array.from(p))}})}async perform(n){await super.perform(n);const o=document.querySelector("#js_data_list .list-contents > ul");o==null||o.setAttribute("ce-done","")}}class Cb extends Qs{constructor(){super(...arguments);Ie(this,"menuType",Me.selection);Ie(this,"useObserver",!0);Ie(this,"observeTarget","#js_top_panel_box #js_operate_box");Ie(this,"disposeObserverAfterInjection",!1)}}async function Ya(e,t){return!!$(t).closest("li").attr("cate_id")}async function $b(e,t){const n=$(t).closest("li");if(n.attr("cate_id")||n.attr("iv")==="1")return!0;const o=n.attr("ico");return o?Ym(o)||Xm(o)||Qm(o):!1}function zn(e,t){const n=Object.create(null),o=e.split(",");for(let i=0;i!!n[i.toLowerCase()]:i=>!!n[i]}function xn(e){if(xe(e)){const t={};for(let n=0;n{if(n){const o=n.split(Eb);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Ye(e){let t="";if(Qe(e))t=e;else if(xe(e))for(let n=0;nDi(n,t))}const ye=e=>Qe(e)?e:e==null?"":xe(e)||Ve(e)&&(e.toString===$d||!Te(e.toString))?JSON.stringify(e,vd,2):String(e),vd=(e,t)=>t&&t.__v_isRef?vd(e,t.value):_o(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,i])=>(n[`${o} =>`]=i,n),{})}:oi(t)?{[`Set(${t.size})`]:[...t.values()]}:Ve(t)&&!xe(t)&&!kd(t)?String(t):t,Ke=Object.freeze({}),ni=Object.freeze([]),It=()=>{},xd=()=>!1,Bb=/^on[^a-z]/,Ri=e=>Bb.test(e),Xs=e=>e.startsWith("onUpdate:"),it=Object.assign,Xa=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Db=Object.prototype.hasOwnProperty,Re=(e,t)=>Db.call(e,t),xe=Array.isArray,_o=e=>ji(e)==="[object Map]",oi=e=>ji(e)==="[object Set]",Cd=e=>ji(e)==="[object Date]",Te=e=>typeof e=="function",Qe=e=>typeof e=="string",Fi=e=>typeof e=="symbol",Ve=e=>e!==null&&typeof e=="object",Zs=e=>Ve(e)&&Te(e.then)&&Te(e.catch),$d=Object.prototype.toString,ji=e=>$d.call(e),Za=e=>ji(e).slice(8,-1),kd=e=>ji(e)==="[object Object]",el=e=>Qe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,er=zn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Rb=zn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),tr=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Fb=/-(\w)/g,un=tr(e=>e.replace(Fb,(t,n)=>n?n.toUpperCase():"")),jb=/\B([A-Z])/g,Cn=tr(e=>e.replace(jb,"-$1").toLowerCase()),vo=tr(e=>e.charAt(0).toUpperCase()+e.slice(1)),xo=tr(e=>e?`on${vo(e)}`:""),Ui=(e,t)=>!Object.is(e,t),ii=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},or=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ub=e=>{const t=Qe(e)?Number(e):NaN;return isNaN(t)?e:t};let Ed;const Sd=()=>Ed||(Ed=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function tl(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let en;class Hb{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=en,!t&&en&&(this.index=(en.scopes||(en.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=en;try{return en=this,t()}finally{en=n}}else tl("cannot run an inactive effect scope.")}on(){en=this}off(){en=this.parent}stop(t){if(this._active){let n,o;for(n=0,o=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},Ad=e=>(e.w&Vn)>0,Pd=e=>(e.n&Vn)>0,Vb=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o{(h==="length"||h>=d)&&a.push(p)})}else switch(n!==void 0&&a.push(r.get(n)),t){case"add":xe(e)?el(n)&&a.push(r.get("length")):(a.push(r.get(Co)),_o(e)&&a.push(r.get(il)));break;case"delete":xe(e)||(a.push(r.get(Co)),_o(e)&&a.push(r.get(il)));break;case"set":_o(e)&&a.push(r.get(Co));break}const c={target:e,type:t,key:n,newValue:o,oldValue:i,oldTarget:s};if(a.length===1)a[0]&&rl(a[0],c);else{const d=[];for(const p of a)p&&d.push(...p);rl(nl(d),c)}}function rl(e,t){const n=xe(e)?e:[...e];for(const o of n)o.computed&&Ld(o,t);for(const o of n)o.computed||Ld(o,t)}function Ld(e,t){(e!==wt||e.allowRecurse)&&(e.onTrigger&&e.onTrigger(it({effect:e},t)),e.scheduler?e.scheduler():e.run())}function Wb(e,t){var n;return(n=ir.get(e))===null||n===void 0?void 0:n.get(t)}const Gb=zn("__proto__,__v_isRef,__isVue"),Md=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Fi)),Jb=sr(),Yb=sr(!1,!0),Qb=sr(!0),Xb=sr(!0,!0),Nd=Zb();function Zb(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const o=Ne(this);for(let s=0,r=this.length;s{e[t]=function(...n){$o();const o=Ne(this)[t].apply(this,n);return ko(),o}}),e}function e_(e){const t=Ne(this);return Tt(t,"has",e),t.hasOwnProperty(e)}function sr(e=!1,t=!1){return function(o,i,s){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&s===(e?t?Wd:Kd:t?Vd:zd).get(o))return o;const r=xe(o);if(!e){if(r&&Re(Nd,i))return Reflect.get(Nd,i,s);if(i==="hasOwnProperty")return e_}const a=Reflect.get(o,i,s);return(Fi(i)?Md.has(i):Gb(i))||(e||Tt(o,"get",i),t)?a:st(a)?r&&el(i)?a:a.value:Ve(a)?e?Gd(a):pr(a):a}}const t_=Bd(),n_=Bd(!0);function Bd(e=!1){return function(n,o,i,s){let r=n[o];if(Gn(r)&&st(r)&&!st(i))return!1;if(!e&&(!mr(i)&&!Gn(i)&&(r=Ne(r),i=Ne(i)),!xe(n)&&st(r)&&!st(i)))return r.value=i,!0;const a=xe(n)&&el(o)?Number(o)e,rr=e=>Reflect.getPrototypeOf(e);function ar(e,t,n=!1,o=!1){e=e.__v_raw;const i=Ne(e),s=Ne(t);n||(t!==s&&Tt(i,"get",t),Tt(i,"get",s));const{has:r}=rr(i),a=o?al:n?ll:qi;if(r.call(i,t))return a(e.get(t));if(r.call(i,s))return a(e.get(s));e!==i&&e.get(t)}function lr(e,t=!1){const n=this.__v_raw,o=Ne(n),i=Ne(e);return t||(e!==i&&Tt(o,"has",e),Tt(o,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function cr(e,t=!1){return e=e.__v_raw,!t&&Tt(Ne(e),"iterate",Co),Reflect.get(e,"size",e)}function Fd(e){e=Ne(e);const t=Ne(this);return rr(t).has.call(t,e)||(t.add(e),$n(t,"add",e,e)),this}function jd(e,t){t=Ne(t);const n=Ne(this),{has:o,get:i}=rr(n);let s=o.call(n,e);s?qd(n,o,e):(e=Ne(e),s=o.call(n,e));const r=i.call(n,e);return n.set(e,t),s?Ui(t,r)&&$n(n,"set",e,t,r):$n(n,"add",e,t),this}function Ud(e){const t=Ne(this),{has:n,get:o}=rr(t);let i=n.call(t,e);i?qd(t,n,e):(e=Ne(e),i=n.call(t,e));const s=o?o.call(t,e):void 0,r=t.delete(e);return i&&$n(t,"delete",e,void 0,s),r}function Hd(){const e=Ne(this),t=e.size!==0,n=_o(e)?new Map(e):new Set(e),o=e.clear();return t&&$n(e,"clear",void 0,void 0,n),o}function ur(e,t){return function(o,i){const s=this,r=s.__v_raw,a=Ne(r),c=t?al:e?ll:qi;return!e&&Tt(a,"iterate",Co),r.forEach((d,p)=>o.call(i,c(d),c(p),s))}}function dr(e,t,n){return function(...o){const i=this.__v_raw,s=Ne(i),r=_o(s),a=e==="entries"||e===Symbol.iterator&&r,c=e==="keys"&&r,d=i[e](...o),p=n?al:t?ll:qi;return!t&&Tt(s,"iterate",c?il:Co),{next(){const{value:h,done:y}=d.next();return y?{value:h,done:y}:{value:a?[p(h[0]),p(h[1])]:p(h),done:y}},[Symbol.iterator](){return this}}}}function Wn(e){return function(...t){{const n=t[0]?`on key "${t[0]}" `:"";console.warn(`${vo(e)} operation ${n}failed: target is readonly.`,Ne(this))}return e==="delete"?!1:this}}function l_(){const e={get(s){return ar(this,s)},get size(){return cr(this)},has:lr,add:Fd,set:jd,delete:Ud,clear:Hd,forEach:ur(!1,!1)},t={get(s){return ar(this,s,!1,!0)},get size(){return cr(this)},has:lr,add:Fd,set:jd,delete:Ud,clear:Hd,forEach:ur(!1,!0)},n={get(s){return ar(this,s,!0)},get size(){return cr(this,!0)},has(s){return lr.call(this,s,!0)},add:Wn("add"),set:Wn("set"),delete:Wn("delete"),clear:Wn("clear"),forEach:ur(!0,!1)},o={get(s){return ar(this,s,!0,!0)},get size(){return cr(this,!0)},has(s){return lr.call(this,s,!0)},add:Wn("add"),set:Wn("set"),delete:Wn("delete"),clear:Wn("clear"),forEach:ur(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=dr(s,!1,!1),n[s]=dr(s,!0,!1),t[s]=dr(s,!1,!0),o[s]=dr(s,!0,!0)}),[e,n,t,o]}const[c_,u_,d_,f_]=l_();function fr(e,t){const n=t?e?f_:d_:e?u_:c_;return(o,i,s)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?o:Reflect.get(Re(n,i)&&i in o?n:o,i,s)}const p_={get:fr(!1,!1)},h_={get:fr(!1,!0)},m_={get:fr(!0,!1)},g_={get:fr(!0,!0)};function qd(e,t,n){const o=Ne(n);if(o!==n&&t.call(e,o)){const i=Za(e);console.warn(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const zd=new WeakMap,Vd=new WeakMap,Kd=new WeakMap,Wd=new WeakMap;function y_(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function w_(e){return e.__v_skip||!Object.isExtensible(e)?0:y_(Za(e))}function pr(e){return Gn(e)?e:hr(e,!1,Dd,p_,zd)}function b_(e){return hr(e,!1,r_,h_,Vd)}function Gd(e){return hr(e,!0,Rd,m_,Kd)}function si(e){return hr(e,!0,a_,g_,Wd)}function hr(e,t,n,o,i){if(!Ve(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=i.get(e);if(s)return s;const r=w_(e);if(r===0)return e;const a=new Proxy(e,r===2?o:n);return i.set(e,a),a}function Eo(e){return Gn(e)?Eo(e.__v_raw):!!(e&&e.__v_isReactive)}function Gn(e){return!!(e&&e.__v_isReadonly)}function mr(e){return!!(e&&e.__v_isShallow)}function gr(e){return Eo(e)||Gn(e)}function Ne(e){const t=e&&e.__v_raw;return t?Ne(t):e}function Jd(e){return nr(e,"__v_skip",!0),e}const qi=e=>Ve(e)?pr(e):e,ll=e=>Ve(e)?Gd(e):e;function Yd(e){Kn&&wt&&(e=Ne(e),Od(e.dep||(e.dep=nl()),{target:e,type:"get",key:"value"}))}function Qd(e,t){e=Ne(e);const n=e.dep;n&&rl(n,{target:e,type:"set",key:"value",newValue:t})}function st(e){return!!(e&&e.__v_isRef===!0)}function he(e){return __(e,!1)}function __(e,t){return st(e)?e:new v_(e,t)}class v_{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Ne(t),this._value=n?t:qi(t)}get value(){return Yd(this),this._value}set value(t){const n=this.__v_isShallow||mr(t)||Gn(t);t=n?t:Ne(t),Ui(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:qi(t),Qd(this,t))}}function de(e){return st(e)?e.value:e}const x_={get:(e,t,n)=>de(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return st(i)&&!st(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function Xd(e){return Eo(e)?e:new Proxy(e,x_)}function C_(e){gr(e)||console.warn("toRefs() expects a reactive object but received a plain one.");const t=xe(e)?new Array(e.length):{};for(const n in e)t[n]=k_(e,n);return t}class $_{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Wb(Ne(this._object),this._key)}}function k_(e,t,n){const o=e[t];return st(o)?o:new $_(e,t,n)}var Zd;class E_{constructor(t,n,o,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[Zd]=!1,this._dirty=!0,this.effect=new sl(t,()=>{this._dirty||(this._dirty=!0,Qd(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=o}get value(){const t=Ne(this);return Yd(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}Zd="__v_isReadonly";function S_(e,t,n=!1){let o,i;const s=Te(e);s?(o=e,i=()=>{console.warn("Write operation failed: computed value is readonly")}):(o=e.get,i=e.set);const r=new E_(o,i,s||!i,n);return t&&!n&&(r.effect.onTrack=t.onTrack,r.effect.onTrigger=t.onTrigger),r}const So=[];function zi(e){So.push(e)}function Vi(){So.pop()}function re(e,...t){$o();const n=So.length?So[So.length-1].component:null,o=n&&n.appContext.config.warnHandler,i=A_();if(o)kn(o,n,11,[e+t.join(""),n&&n.proxy,i.map(({vnode:s})=>`at <${Ir(n,s.type)}>`).join(` `),i]);else{const s=[`[Vue warn]: ${e}`,...t];i.length&&s.push(` `,...P_(i)),console.warn(...s)}ko()}function A_(){let e=So[So.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}function P_(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[` `],...I_(n))}),t}function I_({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,i=` at <${Ir(e.component,e.type,o)}`,s=">"+n;return e.props?[i,...T_(e.props),s]:[i+s]}function T_(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...ef(o,e[o]))}),n.length>3&&t.push(" ..."),t}function ef(e,t,n){return Qe(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:st(t)?(t=ef(e,Ne(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):Te(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Ne(t),n?t:[`${e}=`,t])}function O_(e,t){e!==void 0&&(typeof e!="number"?re(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&re(`${t} is NaN - the duration expression might be incorrect.`))}const cl={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",[0]:"setup function",[1]:"render function",[2]:"watcher getter",[3]:"watcher callback",[4]:"watcher cleanup function",[5]:"native event handler",[6]:"component event handler",[7]:"vnode hook",[8]:"directive hook",[9]:"transition hook",[10]:"app errorHandler",[11]:"app warnHandler",[12]:"ref function",[13]:"async component loader",[14]:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"};function kn(e,t,n,o){let i;try{i=o?e(...o):e()}catch(s){Ki(s,t,n)}return i}function tn(e,t,n,o){if(Te(e)){const s=kn(e,t,n,o);return s&&Zs(s)&&s.catch(r=>{Ki(r,t,n)}),s}const i=[];for(let s=0;s>>1;Ji(mt[o])dn&&mt.splice(t,1)}function fl(e){xe(e)?ri.push(...e):(!fn||!fn.includes(e,e.allowRecurse?Jn+1:Jn))&&ri.push(e),nf()}function of(e,t=Wi?dn+1:0){for(e=e||new Map;tJi(n)-Ji(o)),Jn=0;Jne.id==null?1/0:e.id,D_=(e,t)=>{const n=Ji(e)-Ji(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function rf(e){ul=!1,Wi=!0,e=e||new Map,mt.sort(D_);const t=n=>pl(e,n);try{for(dn=0;dnM_){const o=t.ownerInstance,i=o&&Rl(o.type);return re(`Maximum recursive updates exceeded${i?` in component <${i}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),!0}else e.set(t,n+1)}}let Ao=!1;const ai=new Set;Sd().__VUE_HMR_RUNTIME__={createRecord:hl(af),rerender:hl(j_),reload:hl(U_)};const Po=new Map;function R_(e){const t=e.type.__hmrId;let n=Po.get(t);n||(af(t,e.type),n=Po.get(t)),n.instances.add(e)}function F_(e){Po.get(e.type.__hmrId).instances.delete(e)}function af(e,t){return Po.has(e)?!1:(Po.set(e,{initialDef:Yi(t),instances:new Set}),!0)}function Yi(e){return Yf(e)?e.__vccOpts:e}function j_(e,t){const n=Po.get(e);!n||(n.initialDef.render=t,[...n.instances].forEach(o=>{t&&(o.render=t,Yi(o.type).render=t),o.renderCache=[],Ao=!0,o.update(),Ao=!1}))}function U_(e,t){const n=Po.get(e);if(!n)return;t=Yi(t),lf(n.initialDef,t);const o=[...n.instances];for(const i of o){const s=Yi(i.type);ai.has(s)||(s!==n.initialDef&&lf(s,t),ai.add(s)),i.appContext.optionsCache.delete(i.type),i.ceReload?(ai.add(s),i.ceReload(t.styles),ai.delete(s)):i.parent?yr(i.parent.update):i.appContext.reload?i.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}fl(()=>{for(const i of o)ai.delete(Yi(i.type))})}function lf(e,t){it(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function hl(e){return(t,n)=>{try{return e(t,n)}catch(o){console.error(o),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let pn,Qi=[],ml=!1;function Xi(e,...t){pn?pn.emit(e,...t):ml||Qi.push({event:e,args:t})}function cf(e,t){var n,o;pn=e,pn?(pn.enabled=!0,Qi.forEach(({event:i,args:s})=>pn.emit(i,...s)),Qi=[]):typeof window<"u"&&window.HTMLElement&&!(!((o=(n=window.navigator)===null||n===void 0?void 0:n.userAgent)===null||o===void 0)&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{cf(s,t)}),setTimeout(()=>{pn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,ml=!0,Qi=[])},3e3)):(ml=!0,Qi=[])}function H_(e,t){Xi("app:init",e,t,{Fragment:De,Text:ss,Comment:_t,Static:rs})}function q_(e){Xi("app:unmount",e)}const z_=gl("component:added"),uf=gl("component:updated"),V_=gl("component:removed"),K_=e=>{pn&&typeof pn.cleanupBuffer=="function"&&!pn.cleanupBuffer(e)&&V_(e)};function gl(e){return t=>{Xi(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const W_=df("perf:start"),G_=df("perf:end");function df(e){return(t,n,o)=>{Xi(e,t.appContext.app,t.uid,t,n,o)}}function J_(e,t,n){Xi("component:emit",e.appContext.app,e,t,n)}function Y_(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Ke;{const{emitsOptions:p,propsOptions:[h]}=e;if(p)if(!(t in p))(!h||!(xo(t)in h))&&re(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${xo(t)}" prop.`);else{const y=p[t];Te(y)&&(y(...n)||re(`Invalid event arguments: event validation failed for event "${t}".`))}}let i=n;const s=t.startsWith("update:"),r=s&&t.slice(7);if(r&&r in o){const p=`${r==="modelValue"?"model":r}Modifiers`,{number:h,trim:y}=o[p]||Ke;y&&(i=n.map(v=>Qe(v)?v.trim():v)),h&&(i=n.map(or))}J_(e,t,i);{const p=t.toLowerCase();p!==t&&o[xo(p)]&&re(`Event "${p}" is emitted in component ${Ir(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${Cn(t)}" instead of "${t}".`)}let a,c=o[a=xo(t)]||o[a=xo(un(t))];!c&&s&&(c=o[a=xo(Cn(t))]),c&&tn(c,e,6,i);const d=o[a+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,tn(d,e,6,i)}}function ff(e,t,n=!1){const o=t.emitsCache,i=o.get(e);if(i!==void 0)return i;const s=e.emits;let r={},a=!1;if(!Te(e)){const c=d=>{const p=ff(d,t,!0);p&&(a=!0,it(r,p))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!s&&!a?(Ve(e)&&o.set(e,null),null):(xe(s)?s.forEach(c=>r[c]=null):it(r,s),Ve(e)&&o.set(e,r),r)}function wr(e,t){return!e||!Ri(t)?!1:(t=t.slice(2).replace(/Once$/,""),Re(e,t[0].toLowerCase()+t.slice(1))||Re(e,Cn(t))||Re(e,t))}let lt=null,br=null;function _r(e){const t=lt;return lt=e,br=e&&e.type.__scopeId||null,t}function Q_(e){br=e}function X_(){br=null}const Z_=e=>We;function We(e,t=lt,n){if(!t||e._n)return e;const o=(...i)=>{o._d&&Hf(-1);const s=_r(t);let r;try{r=e(...i)}finally{_r(s),o._d&&Hf(1)}return uf(t),r};return o._n=!0,o._c=!0,o._d=!0,o}let yl=!1;function vr(){yl=!0}function wl(e){const{type:t,vnode:n,proxy:o,withProxy:i,props:s,propsOptions:[r],slots:a,attrs:c,emit:d,render:p,renderCache:h,data:y,setupState:v,ctx:_,inheritAttrs:E}=e;let T,B;const P=_r(e);yl=!1;try{if(n.shapeFlag&4){const ie=i||o;T=Yt(p.call(ie,ie,h,s,v,y,_)),B=c}else{const ie=t;c===s&&vr(),T=Yt(ie.length>1?ie(s,{get attrs(){return vr(),c},slots:a,emit:d}):ie(s,null)),B=t.props?c:tv(c)}}catch(ie){as.length=0,Ki(ie,e,1),T=Ce(_t)}let I=T,H;if(T.patchFlag>0&&T.patchFlag&2048&&([I,H]=ev(T)),B&&E!==!1){const ie=Object.keys(B),{shapeFlag:j}=I;if(ie.length){if(j&7)r&&ie.some(Xs)&&(B=nv(B,r)),I=Xn(I,B);else if(!yl&&I.type!==_t){const ne=Object.keys(c),ae=[],pe=[];for(let Ae=0,ge=ne.length;Ae renders non-element root node that cannot be animated."),I.transition=n.transition),H?H(I):T=I,_r(P),T}const ev=e=>{const t=e.children,n=e.dynamicChildren,o=bl(t);if(!o)return[e,void 0];const i=t.indexOf(o),s=n?n.indexOf(o):-1,r=a=>{t[i]=a,n&&(s>-1?n[s]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[Yt(o),r]};function bl(e){let t;for(let n=0;n{let t;for(const n in e)(n==="class"||n==="style"||Ri(n))&&((t||(t={}))[n]=e[n]);return t},nv=(e,t)=>{const n={};for(const o in e)(!Xs(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n},pf=e=>e.shapeFlag&7||e.type===_t;function ov(e,t,n){const{props:o,children:i,component:s}=e,{props:r,children:a,patchFlag:c}=t,d=s.emitsOptions;if((i||a)&&Ao||t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return o?hf(o,r,d):!!r;if(c&8){const p=t.dynamicProps;for(let h=0;he.__isSuspense,mf={name:"Suspense",__isSuspense:!0,process(e,t,n,o,i,s,r,a,c,d){e==null?sv(t,n,o,i,s,r,a,c,d):rv(e,t,n,o,i,r,a,c,d)},hydrate:av,create:vl,normalize:lv};function Zi(e,t){const n=e.props&&e.props[t];Te(n)&&n()}function sv(e,t,n,o,i,s,r,a,c){const{p:d,o:{createElement:p}}=c,h=p("div"),y=e.suspense=vl(e,i,o,t,h,n,s,r,a,c);d(null,y.pendingBranch=e.ssContent,h,null,o,y,s,r),y.deps>0?(Zi(e,"onPending"),Zi(e,"onFallback"),d(null,e.ssFallback,t,n,o,null,s,r),li(y,e.ssFallback)):y.resolve()}function rv(e,t,n,o,i,s,r,a,{p:c,um:d,o:{createElement:p}}){const h=t.suspense=e.suspense;h.vnode=t,t.el=e.el;const y=t.ssContent,v=t.ssFallback,{activeBranch:_,pendingBranch:E,isInFallback:T,isHydrating:B}=h;if(E)h.pendingBranch=y,Qn(y,E)?(c(E,y,h.hiddenContainer,null,i,h,s,r,a),h.deps<=0?h.resolve():T&&(c(_,v,n,o,i,null,s,r,a),li(h,v))):(h.pendingId++,B?(h.isHydrating=!1,h.activeBranch=E):d(E,i,h),h.deps=0,h.effects.length=0,h.hiddenContainer=p("div"),T?(c(null,y,h.hiddenContainer,null,i,h,s,r,a),h.deps<=0?h.resolve():(c(_,v,n,o,i,null,s,r,a),li(h,v))):_&&Qn(y,_)?(c(_,y,n,o,i,h,s,r,a),h.resolve(!0)):(c(null,y,h.hiddenContainer,null,i,h,s,r,a),h.deps<=0&&h.resolve()));else if(_&&Qn(y,_))c(_,y,n,o,i,h,s,r,a),li(h,y);else if(Zi(t,"onPending"),h.pendingBranch=y,h.pendingId++,c(null,y,h.hiddenContainer,null,i,h,s,r,a),h.deps<=0)h.resolve();else{const{timeout:P,pendingId:I}=h;P>0?setTimeout(()=>{h.pendingId===I&&h.fallback(v)},P):P===0&&h.fallback(v)}}let gf=!1;function vl(e,t,n,o,i,s,r,a,c,d,p=!1){gf||(gf=!0,console[console.info?"info":"log"](" is an experimental feature and its API will likely change."));const{p:h,m:y,um:v,n:_,o:{parentNode:E,remove:T}}=d,B=e.props?Ub(e.props.timeout):void 0;O_(B,"Suspense timeout");const P={vnode:e,parent:t,parentComponent:n,isSVG:r,container:o,hiddenContainer:i,anchor:s,deps:0,pendingId:0,timeout:typeof B=="number"?B:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:p,isUnmounted:!1,effects:[],resolve(I=!1){{if(!I&&!P.pendingBranch)throw new Error("suspense.resolve() is called without a pending branch.");if(P.isUnmounted)throw new Error("suspense.resolve() is called on an already unmounted suspense boundary.")}const{vnode:H,activeBranch:ie,pendingBranch:j,pendingId:ne,effects:ae,parentComponent:pe,container:Ae}=P;if(P.isHydrating)P.isHydrating=!1;else if(!I){const se=ie&&j.transition&&j.transition.mode==="out-in";se&&(ie.transition.afterLeave=()=>{ne===P.pendingId&&y(j,Ae,Y,0)});let{anchor:Y}=P;ie&&(Y=_(ie),v(ie,pe,P,!0)),se||y(j,Ae,Y,0)}li(P,j),P.pendingBranch=null,P.isInFallback=!1;let ge=P.parent,O=!1;for(;ge;){if(ge.pendingBranch){ge.effects.push(...ae),O=!0;break}ge=ge.parent}O||fl(ae),P.effects=[],Zi(H,"onResolve")},fallback(I){if(!P.pendingBranch)return;const{vnode:H,activeBranch:ie,parentComponent:j,container:ne,isSVG:ae}=P;Zi(H,"onFallback");const pe=_(ie),Ae=()=>{!P.isInFallback||(h(null,I,ne,pe,j,null,ae,a,c),li(P,I))},ge=I.transition&&I.transition.mode==="out-in";ge&&(ie.transition.afterLeave=Ae),P.isInFallback=!0,v(ie,j,null,!0),ge||Ae()},move(I,H,ie){P.activeBranch&&y(P.activeBranch,I,H,ie),P.container=I},next(){return P.activeBranch&&_(P.activeBranch)},registerDep(I,H){const ie=!!P.pendingBranch;ie&&P.deps++;const j=I.vnode.el;I.asyncDep.catch(ne=>{Ki(ne,I,0)}).then(ne=>{if(I.isUnmounted||P.isUnmounted||P.pendingId!==I.suspenseId)return;I.asyncResolved=!0;const{vnode:ae}=I;zi(ae),Bl(I,ne,!1),j&&(ae.el=j);const pe=!j&&I.subTree.el;H(I,ae,E(j||I.subTree.el),j?null:_(I.subTree),P,r,c),pe&&T(pe),_l(I,ae.el),Vi(),ie&&--P.deps===0&&P.resolve()})},unmount(I,H){P.isUnmounted=!0,P.activeBranch&&v(P.activeBranch,n,I,H),P.pendingBranch&&v(P.pendingBranch,n,I,H)}};return P}function av(e,t,n,o,i,s,r,a,c){const d=t.suspense=vl(t,o,n,e.parentNode,document.createElement("div"),null,i,s,r,a,!0),p=c(e,d.pendingBranch=t.ssContent,n,d,s,r);return d.deps===0&&d.resolve(),p}function lv(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=yf(o?n.default:n),e.ssFallback=o?yf(n.fallback):Ce(_t)}function yf(e){let t;if(Te(e)){const n=ci&&e._c;n&&(e._d=!1,W()),e=e(),n&&(e._d=!0,t=Gt,Uf())}if(xe(e)){const n=bl(e);n||re(" slots expect a single root node."),e=n}return e=Yt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function cv(e,t){t&&t.pendingBranch?xe(e)?t.effects.push(...e):t.effects.push(e):fl(e)}function li(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e,i=n.el=t.el;o&&o.subTree===n&&(o.vnode.el=i,_l(o,i))}function es(e,t){if(!et)re("provide() can only be used inside setup().");else{let n=et.provides;const o=et.parent&&et.parent.provides;o===n&&(n=et.provides=Object.create(o)),n[e]=t}}function ts(e,t,n=!1){const o=et||lt;if(o){const i=o.parent==null?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&Te(t)?t.call(o.proxy):t;re(`injection "${String(e)}" not found.`)}else re("inject() can only be used inside setup() or functional components.")}const xr={};function ct(e,t,n){return Te(t)||re("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),wf(e,t,n)}function wf(e,t,{immediate:n,deep:o,flush:i,onTrack:s,onTrigger:r}=Ke){t||(n!==void 0&&re('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&re('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'));const a=H=>{re("Invalid watch source: ",H,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=zb()===(et==null?void 0:et.scope)?et:null;let d,p=!1,h=!1;if(st(e)?(d=()=>e.value,p=mr(e)):Eo(e)?(d=()=>e,o=!0):xe(e)?(h=!0,p=e.some(H=>Eo(H)||mr(H)),d=()=>e.map(H=>{if(st(H))return H.value;if(Eo(H))return Io(H);if(Te(H))return kn(H,c,2);a(H)})):Te(e)?t?d=()=>kn(e,c,2):d=()=>{if(!(c&&c.isUnmounted))return y&&y(),tn(e,c,3,[v])}:(d=It,a(e)),t&&o){const H=d;d=()=>Io(H())}let y,v=H=>{y=P.onStop=()=>{kn(H,c,4)}},_;if(ls)if(v=It,t?n&&tn(t,c,3,[d(),h?[]:void 0,v]):d(),i==="sync"){const H=f0();_=H.__watcherHandles||(H.__watcherHandles=[])}else return It;let E=h?new Array(e.length).fill(xr):xr;const T=()=>{if(!!P.active)if(t){const H=P.run();(o||p||(h?H.some((ie,j)=>Ui(ie,E[j])):Ui(H,E)))&&(y&&y(),tn(t,c,3,[H,E===xr?void 0:h&&E[0]===xr?[]:E,v]),E=H)}else P.run()};T.allowRecurse=!!t;let B;i==="sync"?B=T:i==="post"?B=()=>Lt(T,c&&c.suspense):(T.pre=!0,c&&(T.id=c.uid),B=()=>yr(T));const P=new sl(d,B);P.onTrack=s,P.onTrigger=r,t?n?T():E=P.run():i==="post"?Lt(P.run.bind(P),c&&c.suspense):P.run();const I=()=>{P.stop(),c&&c.scope&&Xa(c.scope.effects,P)};return _&&_.push(I),I}function uv(e,t,n){const o=this.proxy,i=Qe(e)?e.includes(".")?bf(o,e):()=>o[e]:e.bind(o,o);let s;Te(t)?s=t:(s=t.handler,n=t);const r=et;eo(this);const a=wf(i,s.bind(o),n);return r?eo(r):to(),a}function bf(e,t){const n=t.split(".");return()=>{let o=e;for(let i=0;i{Io(n,t)});else if(kd(e))for(const n in e)Io(e[n],t);return e}function Be(e){return Te(e)?{setup:e,name:e.name}:e}const ns=e=>!!e.type.__asyncLoader,xl=e=>e.type.__isKeepAlive;function dv(e,t){_f(e,"a",t)}function fv(e,t){_f(e,"da",t)}function _f(e,t,n=et){const o=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Cr(t,o,n),n){let i=n.parent;for(;i&&i.parent;)xl(i.parent.vnode)&&pv(o,t,n,i),i=i.parent}}function pv(e,t,n,o){const i=Cr(t,e,o,!0);os(()=>{Xa(o[t],i)},n)}function Cr(e,t,n=et,o=!1){if(n){const i=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...r)=>{if(n.isUnmounted)return;$o(),eo(n);const a=tn(t,n,e,r);return to(),ko(),a});return o?i.unshift(s):i.push(s),s}else{const i=xo(cl[e].replace(/ hook$/,""));re(`${i} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const En=e=>(t,n=et)=>(!ls||e==="sp")&&Cr(e,(...o)=>t(...o),n),Ot=En("bm"),Ft=En("m"),hv=En("bu"),mv=En("u"),vf=En("bum"),os=En("um"),gv=En("sp"),yv=En("rtg"),wv=En("rtc");function bv(e,t=et){Cr("ec",e,t)}function xf(e){Rb(e)&&re("Do not use built-in directive ids as custom directive id: "+e)}function ee(e,t){const n=lt;if(n===null)return re("withDirectives can only be used inside render functions."),e;const o=Pr(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let s=0;st(r,a,void 0,s&&s[a]));else{const r=Object.keys(e);i=new Array(r.length);for(let a=0,c=r.length;a1&&(re("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),s=()=>[]),s&&s._c&&(s._d=!1),W();const r=s&&$f(s(n)),a=Jt(De,{key:n.key||r&&r.key||`_${t}`},r||(o?o():[]),r&&e._===1?64:-2);return!i&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function $f(e){return e.some(t=>ui(t)?!(t.type===_t||t.type===De&&!$f(t.children)):!0)?e:null}const $l=e=>e?Gf(e)?Pr(e)||e.proxy:$l(e.parent):null,Lo=it(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>si(e.props),$attrs:e=>si(e.attrs),$slots:e=>si(e.slots),$refs:e=>si(e.refs),$parent:e=>$l(e.parent),$root:e=>$l(e.root),$emit:e=>e.emit,$options:e=>Al(e),$forceUpdate:e=>e.f||(e.f=()=>yr(e.update)),$nextTick:e=>e.n||(e.n=Gi.bind(e.proxy)),$watch:e=>uv.bind(e)}),kl=e=>e==="_"||e==="$",El=(e,t)=>e!==Ke&&!e.__isScriptSetup&&Re(e,t),kf={get({_:e},t){const{ctx:n,setupState:o,data:i,props:s,accessCache:r,type:a,appContext:c}=e;if(t==="__isVue")return!0;let d;if(t[0]!=="$"){const v=r[t];if(v!==void 0)switch(v){case 1:return o[t];case 2:return i[t];case 4:return n[t];case 3:return s[t]}else{if(El(o,t))return r[t]=1,o[t];if(i!==Ke&&Re(i,t))return r[t]=2,i[t];if((d=e.propsOptions[0])&&Re(d,t))return r[t]=3,s[t];if(n!==Ke&&Re(n,t))return r[t]=4,n[t];Sl&&(r[t]=0)}}const p=Lo[t];let h,y;if(p)return t==="$attrs"&&(Tt(e,"get",t),vr()),p(e);if((h=a.__cssModules)&&(h=h[t]))return h;if(n!==Ke&&Re(n,t))return r[t]=4,n[t];if(y=c.config.globalProperties,Re(y,t))return y[t];lt&&(!Qe(t)||t.indexOf("__v")!==0)&&(i!==Ke&&kl(t[0])&&Re(i,t)?re(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===lt&&re(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:o,setupState:i,ctx:s}=e;return El(i,t)?(i[t]=n,!0):i.__isScriptSetup&&Re(i,t)?(re(`Cannot mutate