Greasy Fork is available in English.

115不大助手 (full)

Make 115 taerg again!

// ==UserScript==
// @name         115不大助手 (full)
// @namespace    com.cloud115.enhancer
// @version      0.5.54
// @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
// ==/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 FL=Object.defineProperty;var jL=(Vo,Rn,Ko)=>Rn in Vo?FL(Vo,Rn,{enumerable:!0,configurable:!0,writable:!0,value:Ko}):Vo[Rn]=Ko;var Ie=(Vo,Rn,Ko)=>(jL(Vo,typeof Rn!="symbol"?Rn+"":Rn,Ko),Ko);(function(){"use strict";const Vo="",Rn="",Ko="",UL="",HL="",qL="",zL="",Tm=typeof btoa=="function",aa=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const Lc=typeof TextEncoder=="function"?new TextEncoder:void 0,Om="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ci=Array.prototype.slice.call(Om);(e=>{let t={};return e.forEach((n,o)=>t[n]=o),t})(Ci);const sn=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const Lm=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),Mc=Tm?e=>btoa(e):aa?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,o,i,s="";const r=e.length%3;for(let a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|o<<8|i,s+=Ci[t>>18&63]+Ci[t>>12&63]+Ci[t>>6&63]+Ci[t&63]}return r?s.slice(0,r-3)+"===".substring(r):s},Mm=aa?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let o=0,i=e.length;o<i;o+=4096)n.push(sn.apply(null,e.subarray(o,o+4096)));return Mc(n.join(""))},Nm=e=>{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)}},Bm=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Dm=e=>e.replace(Bm,Nm),Nc=aa?e=>Buffer.from(e,"utf8").toString("base64"):Lc?e=>Mm(Lc.encode(e)):e=>Mc(Dm(e)),Bc=(e,t=!1)=>t?Lm(Nc(e)):Nc(e);var uo=window,la=(()=>uo.GM_setValue)(),Rm=(()=>uo.GM_deleteValue)(),Fm=(()=>uo.GM_openInTab)(),ca=(()=>uo.GM_registerMenuCommand)(),jm=(()=>uo.GM_xmlhttpRequest)(),$i=(()=>uo.GM_setClipboard)(),ks=(()=>uo.GM_getValue)(),Fn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Um(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;g<l.length;g++)u.indexOf(l[g])===-1&&u.push(l[g]);return u},d=l=>l.charAt(0).toUpperCase()+l.slice(1),p=l=>{console.warn(`${a} ${typeof l=="object"?l.join(" "):l}`)},h=l=>{console.error(`${a} ${l}`)},y=[],x=l=>{y.includes(l)||(y.push(l),p(l))},_=(l,u)=>{x(`"${l}" is deprecated and will be removed in the next major release. Please use "${u}" instead.`)},S=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
`,Ut=()=>{const l=Array.from(j().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((g,v)=>{const F=parseInt(g.getAttribute("tabindex")),$e=parseInt(v.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))},Ht=()=>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 v=new DOMParser().parseFromString(u,"text/html");Array.from(v.querySelector("head").childNodes).forEach(F=>{l.appendChild(F)}),Array.from(v.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 v=0;v<g.length;v++)if(!l.classList.contains(g[v]))return!1;return!0},co=(l,u)=>{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(co(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(v=>{Array.isArray(l)?l.forEach(F=>{g?F.classList.add(v):F.classList.remove(v)}):g?l.classList.add(v):l.classList.remove(v)}))},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 v=0;v<g.length;v++){const F=g[v];if(F instanceof HTMLElement&&ot(F,u))return F}},le=(l,u,g)=>{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,v)=>{const F=l.querySelector(u);F&&(F.style[g]=v)},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"),v=parseFloat(u.getPropertyValue("transition-duration")||"0");return g>0||v>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),v=u/g*100;l.style.width=`${v}%`},L=100,E={},q=()=>{E.previousActiveElement instanceof HTMLElement?(E.previousActiveElement.focus(),E.previousActiveElement=null):document.body&&document.body.focus()},V=l=>new Promise(u=>{if(!l)return u();const g=window.scrollX,v=window.scrollY;E.restoreFocusTimeout=setTimeout(()=>{q(),u()},L),window.scrollTo(g,v)}),te=()=>typeof window>"u"||typeof document>"u",Pe=`
 <div aria-labelledby="${s.title}" aria-describedby="${s["html-container"]}" class="${s.popup}" tabindex="-1">
   <button type="button" class="${s.close}"></button>
   <ul class="${s["progress-steps"]}"></ul>
   <div class="${s.icon}"></div>
   <img class="${s.image}" />
   <h2 class="${s.title}" id="${s.title}"></h2>
   <div class="${s["html-container"]}" id="${s["html-container"]}"></div>
   <input class="${s.input}" />
   <input type="file" class="${s.file}" />
   <div class="${s.range}">
     <input type="range" />
     <output></output>
   </div>
   <select class="${s.select}"></select>
   <div class="${s.radio}"></div>
   <label for="${s.checkbox}" class="${s.checkbox}">
     <input type="checkbox" />
     <span class="${s.label}"></span>
   </label>
   <textarea class="${s.textarea}"></textarea>
   <div class="${s["validation-message"]}" id="${s["validation-message"]}"></div>
   <div class="${s.actions}">
     <div class="${s.loader}"></div>
     <button type="button" class="${s.confirm}"></button>
     <button type="button" class="${s.deny}"></button>
     <button type="button" class="${s.cancel}"></button>
   </div>
   <div class="${s.footer}"></div>
   <div class="${s["timer-progress-bar-container"]}">
     <div class="${s["timer-progress-bar"]}"></div>
   </div>
 </div>
`.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=()=>{E.currentInstance.resetValidationMessage()},je=()=>{const l=j(),u=oe(l,s.input),g=oe(l,s.file),v=l.querySelector(`.${s.range} input`),F=l.querySelector(`.${s.range} output`),$e=oe(l,s.select),Je=l.querySelector(`.${s.checkbox} input`),qt=oe(l,s.textarea);u.oninput=_e,g.onchange=_e,$e.onchange=_e,Je.onchange=_e,qt.oninput=_e,v.oninput=()=>{_e(),F.value=v.value},v.onchange=()=>{_e(),F.value=v.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 v=Ct(l.target);v.appendChild(g),gt(l),bs(v),je()},xc=(l,u)=>{l instanceof HTMLElement?u.appendChild(l):typeof l=="object"?gT(l,u):l&&ft(u,l)},gT=(l,u)=>{l.jquery?yT(u,l):ft(u,l.toString())},yT=(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})(),wT=()=>{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},bT=(l,u)=>{const g=me(),v=D();!u.showConfirmButton&&!u.showDenyButton&&!u.showCancelButton?Z(g):J(g),dt(g,u,"actions"),_T(g,v,u),ft(v,u.loaderHtml),dt(v,u,"loader")};function _T(l,u,g){const v=Y(),F=M(),$e=ve();Cc(v,"confirm",g),Cc(F,"deny",g),Cc($e,"cancel",g),vT(v,F,$e,g),g.reverseButtons&&(g.toast?(l.insertBefore($e,v),l.insertBefore(F,v)):(l.insertBefore($e,u),l.insertBefore(F,u),l.insertBefore(v,u)))}function vT(l,u,g,v){if(!v.buttonsStyling){z([l,u,g],s.styled);return}N([l,u,g],s.styled),v.confirmButtonColor&&(l.style.backgroundColor=v.confirmButtonColor,N(l,s["default-outline"])),v.denyButtonColor&&(u.style.backgroundColor=v.denyButtonColor,N(u,s["default-outline"])),v.cancelButtonColor&&(g.style.backgroundColor=v.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 xT=(l,u)=>{const g=Fe();ft(g,u.closeButtonHtml),dt(g,u,"closeButton"),we(g,u.showCloseButton),g.setAttribute("aria-label",u.closeButtonAriaLabel)},CT=(l,u)=>{const g=I();!g||($T(g,u.backdrop),kT(g,u.position),ET(g,u.grow),dt(g,u,"container"))};function $T(l,u){typeof u=="string"?l.style.background=u:u||N([document.documentElement,document.body],s["no-backdrop"])}function kT(l,u){u in s?N(l,s[u]):(p('The "position" parameter is not valid, defaulting to "center"'),N(l,s.center))}function ET(l,u){if(u&&typeof u=="string"){const g=`grow-${u}`;g in s&&N(l,s[g])}}const ST=["input","file","range","select","radio","checkbox","textarea"],AT=(l,u)=>{const g=j(),v=n.innerParams.get(l),F=!v||u.input!==v.input;ST.forEach($e=>{const Je=oe(g,s[$e]);TT($e,u.inputAttributes),Je.className=s[$e],F&&Z(Je)}),u.input&&(F&&PT(u),OT(u))},PT=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=tm(l.input),g=Nt[l.input](u,l);J(u),l.inputAutoFocus&&setTimeout(()=>{A(g)})},IT=l=>{for(let u=0;u<l.attributes.length;u++){const g=l.attributes[u].name;["type","value","style"].includes(g)||l.removeAttribute(g)}},TT=(l,u)=>{const g=b(j(),l);if(!!g){IT(g);for(const v in u)g.setAttribute(v,u[v])}},OT=l=>{const u=tm(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 v=document.createElement("label"),F=s["input-label"];v.setAttribute("for",l.id),v.className=F,typeof g.customClass=="object"&&N(v,g.customClass.inputLabel),v.innerText=g.inputLabel,u.insertAdjacentElement("beforebegin",v)}},tm=l=>oe(j(),s[l]||s.input),oa=(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)=>(oa(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"),v=l.querySelector("output");return oa(g,u.inputValue),g.type=u.input,oa(v,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 v=l.querySelector("span");return ft(v,u.inputPlaceholder),g},Nt.textarea=(l,u)=>{oa(l,u.inputValue),$c(l,u),xs(l,l,u);const g=v=>parseInt(window.getComputedStyle(v).marginLeft)+parseInt(window.getComputedStyle(v).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const v=parseInt(window.getComputedStyle(j()).width),F=()=>{const $e=l.offsetWidth+g(l);$e>v?j().style.width=`${$e}px`:j().style.width=null};new MutationObserver(F).observe(l,{attributes:!0,attributeFilter:["style"]})}}),l};const LT=(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),AT(l,u)},MT=(l,u)=>{const g=ke();we(g,u.footer),u.footer&&xc(u.footer,g),dt(g,u,"footer")},NT=(l,u)=>{const g=n.innerParams.get(l),v=ne();if(g&&u.icon===g.icon){om(v,u),nm(v,u);return}if(!u.icon&&!u.iconHtml){Z(v);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(v);return}J(v),om(v,u),nm(v,u),N(v,u.showClass.icon)},nm=(l,u)=>{for(const g in r)u.icon!==g&&z(l,r[g]);N(l,r[u.icon]),FT(l,u),BT(),dt(l,u,"icon")},BT=()=>{const l=j(),u=window.getComputedStyle(l).getPropertyValue("background-color"),g=l.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let v=0;v<g.length;v++)g[v].style.backgroundColor=u},DT=`
  <div class="swal2-success-circular-line-left"></div>
  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
  <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
  <div class="swal2-success-circular-line-right"></div>
`,RT=`
  <span class="swal2-x-mark">
    <span class="swal2-x-mark-line-left"></span>
    <span class="swal2-x-mark-line-right"></span>
  </span>
`,om=(l,u)=>{let g=l.innerHTML,v;u.iconHtml?v=im(u.iconHtml):u.icon==="success"?(v=DT,g=g.replace(/ style=".*?"/g,"")):u.icon==="error"?v=RT:v=im({question:"?",warning:"!",info:"i"}[u.icon]),g.trim()!==v.trim()&&ft(l,v)},FT=(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)}},im=l=>`<div class="${s["icon-content"]}">${l}</div>`,jT=(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")},UT=(l,u)=>{const g=I(),v=j();u.toast?(le(g,"width",u.width),v.style.width="100%",v.insertBefore(D(),ne())):le(v,"width",u.width),le(v,"padding",u.padding),u.color&&(v.style.color=u.color),u.background&&(v.style.background=u.background),Z(se()),HT(v,u)},HT=(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}`])},qT=(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((v,F)=>{const $e=zT(v);if(g.appendChild($e),F===u.currentProgressStep&&N($e,s["active-progress-step"]),F!==u.progressSteps.length-1){const Je=VT(u);g.appendChild(Je)}})},zT=l=>{const u=document.createElement("li");return N(u,s["progress-step"]),ft(u,l),u},VT=l=>{const u=document.createElement("li");return N(u,s["progress-step-line"]),l.progressStepsDistance&&le(u,"width",l.progressStepsDistance),u},KT=(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")},sm=(l,u)=>{UT(l,u),CT(l,u),qT(l,u),NT(l,u),jT(l,u),KT(l,u),xT(l,u),LT(l,u),bT(l,u),MT(l,u),typeof u.didRender=="function"&&u.didRender(j())};function rm(){const l=n.innerParams.get(this);if(!l)return;const u=n.domCache.get(this);Z(u.loader),Dn()?l.icon&&J(ne()):WT(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 WT=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 GT(l){const u=n.innerParams.get(l||this),g=n.domCache.get(l||this);return g?b(g.popup,u.input):null}const JT=()=>U(j()),am=()=>Y()&&Y().click(),YT=()=>M()&&M().click(),QT=()=>ve()&&ve().click(),wi=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),lm=l=>{l.keydownTarget&&l.keydownHandlerAdded&&(l.keydownTarget.removeEventListener("keydown",l.keydownHandler,{capture:l.keydownListenerCapture}),l.keydownHandlerAdded=!1)},XT=(l,u,g,v)=>{lm(u),g.toast||(u.keydownHandler=F=>eO(l,F,v),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=Ut();if(g.length){l=l+u,l===g.length?l=0:l===-1&&(l=g.length-1),g[l].focus();return}j().focus()},cm=["ArrowRight","ArrowDown"],ZT=["ArrowLeft","ArrowUp"],eO=(l,u,g)=>{const v=n.innerParams.get(l);!v||u.isComposing||u.keyCode===229||(v.stopKeydownPropagation&&u.stopPropagation(),u.key==="Enter"?tO(l,u,v):u.key==="Tab"?nO(u):[...cm,...ZT].includes(u.key)?oO(u.key):u.key==="Escape"&&iO(u,v,g))},tO=(l,u,g)=>{if(!!S(g.allowEnterKey)&&u.target&&l.getInput()&&u.target instanceof HTMLElement&&u.target.outerHTML===l.getInput().outerHTML){if(["textarea","file"].includes(g.input))return;am(),u.preventDefault()}},nO=l=>{const u=l.target,g=Ut();let v=-1;for(let F=0;F<g.length;F++)if(u===g[F]){v=F;break}l.shiftKey?kc(v,-1):kc(v,1),l.stopPropagation(),l.preventDefault()},oO=l=>{const u=Y(),g=M(),v=ve(),F=[u,g,v];if(document.activeElement instanceof HTMLElement&&!F.includes(document.activeElement))return;const $e=cm.includes(l)?"nextElementSibling":"previousElementSibling";let Je=document.activeElement;for(let qt=0;qt<me().children.length;qt++){if(Je=Je[$e],!Je)return;if(Je instanceof HTMLButtonElement&&U(Je))break}Je instanceof HTMLButtonElement&&Je.focus()},iO=(l,u,g)=>{S(u.allowEscapeKey)&&(l.preventDefault(),g(wi.esc))};var Cs={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const sO=()=>{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"))})},um=()=>{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")})},rO=()=>{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),lO(),aO()}},aO=()=>{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`)},lO=()=>{const l=I();let u;l.ontouchstart=g=>{u=cO(g)},l.ontouchmove=g=>{u&&(g.preventDefault(),g.stopPropagation())}},cO=l=>{const u=l.target,g=I();return uO(l)||dO(l)?!1:u===g||!m(g)&&u instanceof HTMLElement&&u.tagName!=="INPUT"&&u.tagName!=="TEXTAREA"&&!(m(Ae())&&Ae().contains(u))},uO=l=>l.touches&&l.touches.length&&l.touches[0].touchType==="stylus",dO=l=>l.touches&&l.touches.length>1,fO=()=>{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}},pO=()=>{xt.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(xt.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${xt.previousBodyPadding+wT()}px`)},hO=()=>{xt.previousBodyPadding!==null&&(document.body.style.paddingRight=`${xt.previousBodyPadding}px`,xt.previousBodyPadding=null)};function dm(l,u,g,v){Dn()?fm(l,v):(V(g).then(()=>fm(l,v)),lm(E)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(u.setAttribute("style","display:none !important"),u.removeAttribute("class"),u.innerHTML=""):u.remove(),Ht()&&(hO(),fO(),um()),mO()}function mO(){z([document.documentElement,document.body],[s.shown,s["height-auto"],s["no-backdrop"],s["toast-shown"]])}function ia(l){l=bO(l);const u=Cs.swalPromiseResolve.get(this),g=yO(this);this.isAwaitingPromise()?l.isDismissed||($s(this),u(l)):g&&u(l)}function gO(){return!!n.awaitingPromise.get(this)}const yO=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 v=I();return z(v,g.showClass.backdrop),N(v,g.hideClass.backdrop),_O(l,u,g),!0};function wO(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())},bO=l=>typeof l>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},l),_O=(l,u,g)=>{const v=I(),F=vs&&w(u);typeof g.willClose=="function"&&g.willClose(u),F?vO(l,u,v,g.returnFocus,g.didClose):dm(l,v,g.returnFocus,g.didClose)},vO=(l,u,g,v,F)=>{E.swalCloseEventFinishedCallback=dm.bind(null,l,g,v,F),u.addEventListener(vs,function($e){$e.target===u&&(E.swalCloseEventFinishedCallback(),delete E.swalCloseEventFinishedCallback)})},fm=(l,u)=>{setTimeout(()=>{typeof u=="function"&&u.bind(l.params)(),l._destroy()})};function pm(l,u,g){const v=n.domCache.get(l);u.forEach(F=>{v[F].disabled=g})}function hm(l,u){if(!!l)if(l.type==="radio"){const v=l.parentNode.parentNode.querySelectorAll("input");for(let F=0;F<v.length;F++)v[F].disabled=u}else l.disabled=u}function xO(){pm(this,["confirmButton","denyButton","cancelButton"],!1)}function CO(){pm(this,["confirmButton","denyButton","cancelButton"],!0)}function $O(){hm(this.getInput(),!1)}function kO(){hm(this.getInput(),!0)}function EO(l){const u=n.domCache.get(this),g=n.innerParams.get(this);ft(u.validationMessage,l),u.validationMessage.className=s["validation-message"],g.customClass&&g.customClass.validationMessage&&N(u.validationMessage,g.customClass.validationMessage),J(u.validationMessage);const v=this.getInput();v&&(v.setAttribute("aria-invalid",!0),v.setAttribute("aria-describedby",s["validation-message"]),A(v),N(v,s.inputerror))}function SO(){const l=n.domCache.get(this);l.validationMessage&&Z(l.validationMessage);const u=this.getInput();u&&(u.removeAttribute("aria-invalid"),u.removeAttribute("aria-describedby"),z(u,s.inputerror))}const bi={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},AO=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],PO={},IO=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],mm=l=>Object.prototype.hasOwnProperty.call(bi,l),gm=l=>AO.indexOf(l)!==-1,Ec=l=>PO[l],TO=l=>{mm(l)||p(`Unknown parameter "${l}"`)},OO=l=>{IO.includes(l)&&p(`The parameter "${l}" is incompatible with toasts`)},LO=l=>{Ec(l)&&_(l,Ec(l))},MO=l=>{l.backdrop===!1&&l.allowOutsideClick&&p('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const u in l)TO(u),l.toast&&OO(u),LO(u)};function NO(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 v=BO(l),F=Object.assign({},g,v);sm(this,F),n.innerParams.set(this,F),Object.defineProperties(this,{params:{value:Object.assign({},this.params,l),writable:!1,enumerable:!0}})}const BO=l=>{const u={};return Object.keys(l).forEach(g=>{gm(g)?u[g]=l[g]:p(`Invalid parameter to update: ${g}`)}),u};function DO(){const l=n.domCache.get(this),u=n.innerParams.get(this);if(!u){ym(this);return}l.popup&&E.swalCloseEventFinishedCallback&&(E.swalCloseEventFinishedCallback(),delete E.swalCloseEventFinishedCallback),typeof u.didDestroy=="function"&&u.didDestroy(),RO(this)}const RO=l=>{ym(l),delete l.params,delete E.keydownHandler,delete E.keydownTarget,delete E.currentInstance},ym=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 wm=Object.freeze({__proto__:null,_destroy:DO,close:ia,closeModal:ia,closePopup:ia,closeToast:ia,disableButtons:CO,disableInput:kO,disableLoading:rm,enableButtons:xO,enableInput:$O,getInput:GT,handleAwaitingPromise:$s,hideLoading:rm,isAwaitingPromise:gO,rejectPromise:wO,resetValidationMessage:SO,showValidationMessage:EO,update:NO});const _i=l=>{let u=j();u||new ra,u=j();const g=D();Dn()?Z(ne()):FO(u,l),J(g),u.setAttribute("data-loading","true"),u.setAttribute("aria-busy","true"),u.focus()},FO=(l,u)=>{const g=me(),v=D();!u&&U(Y())&&(u=Y()),J(g),u&&(Z(u),v.setAttribute("data-button-to-replace",u.className)),v.parentNode.insertBefore(v,u),N([l,g],s.loading)},jO=(l,u)=>{u.input==="select"||u.input==="radio"?VO(l,u):["text","email","number","tel","textarea"].includes(u.input)&&(T(u.inputValue)||P(u.inputValue))&&(_i(Y()),KO(l,u))},UO=(l,u)=>{const g=l.getInput();if(!g)return null;switch(u.input){case"checkbox":return HO(g);case"radio":return qO(g);case"file":return zO(g);default:return u.inputAutoTrim?g.value.trim():g.value}},HO=l=>l.checked?1:0,qO=l=>l.checked?l.value:null,zO=l=>l.files.length?l.getAttribute("multiple")!==null?l.files:l.files[0]:null,VO=(l,u)=>{const g=j(),v=F=>{WO[u.input](g,Ac(F),u)};T(u.inputOptions)||P(u.inputOptions)?(_i(Y()),B(u.inputOptions).then(F=>{l.hideLoading(),v(F)})):typeof u.inputOptions=="object"?v(u.inputOptions):h(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof u.inputOptions}`)},KO=(l,u)=>{const g=l.getInput();Z(g),B(u.inputValue).then(v=>{g.value=u.input==="number"?`${parseFloat(v)||0}`:`${v}`,J(g),g.focus(),l.hideLoading()}).catch(v=>{h(`Error in inputValue promise: ${v}`),g.value="",J(g),g.focus(),l.hideLoading()})},WO={select:(l,u,g)=>{const v=oe(l,s.select),F=($e,Je,qt)=>{const $t=document.createElement("option");$t.value=qt,ft($t,Je),$t.selected=bm(qt,g.inputValue),$e.appendChild($t)};u.forEach($e=>{const Je=$e[0],qt=$e[1];if(Array.isArray(qt)){const $t=document.createElement("optgroup");$t.label=Je,$t.disabled=!1,v.appendChild($t),qt.forEach(xi=>F($t,xi[1],xi[0]))}else F(v,qt,Je)}),v.focus()},radio:(l,u,g)=>{const v=oe(l,s.radio);u.forEach($e=>{const Je=$e[0],qt=$e[1],$t=document.createElement("input"),xi=document.createElement("label");$t.type="radio",$t.name=s.radio,$t.value=Je,bm(Je,g.inputValue)&&($t.checked=!0);const Oc=document.createElement("span");ft(Oc,qt),Oc.className=s.label,xi.appendChild($t),xi.appendChild(Oc),v.appendChild(xi)});const F=v.querySelectorAll("input");F.length&&F[0].focus()}},Ac=l=>{const u=[];return typeof Map<"u"&&l instanceof Map?l.forEach((g,v)=>{let F=g;typeof F=="object"&&(F=Ac(F)),u.push([v,F])}):Object.keys(l).forEach(g=>{let v=l[g];typeof v=="object"&&(v=Ac(v)),u.push([g,v])}),u},bm=(l,u)=>u&&u.toString()===l.toString(),GO=l=>{const u=n.innerParams.get(l);l.disableButtons(),u.input?_m(l,"confirm"):Ic(l,!0)},JO=l=>{const u=n.innerParams.get(l);l.disableButtons(),u.returnInputValueOnDeny?_m(l,"deny"):Pc(l,!1)},YO=(l,u)=>{l.disableButtons(),u(wi.cancel)},_m=(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 v=UO(l,g);g.inputValidator?QO(l,v,u):l.getInput().checkValidity()?u==="deny"?Pc(l,v):Ic(l,v):(l.enableButtons(),l.showValidationMessage(g.validationMessage))},QO=(l,u,g)=>{const v=n.innerParams.get(l);l.disableInput(),Promise.resolve().then(()=>B(v.inputValidator(u,v.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&&_i(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=>xm(l||void 0,F))):l.close({isDenied:!0,value:u})},vm=(l,u)=>{l.close({isConfirmed:!0,value:u})},xm=(l,u)=>{l.rejectPromise(u)},Ic=(l,u)=>{const g=n.innerParams.get(l||void 0);g.showLoaderOnConfirm&&_i(),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)):vm(l,typeof F>"u"?u:F)}).catch(F=>xm(l||void 0,F))):vm(l,u)},XO=(l,u,g)=>{n.innerParams.get(l).toast?ZO(l,u,g):(tL(u),nL(u),oL(l,u,g))},ZO=(l,u,g)=>{u.popup.onclick=()=>{const v=n.innerParams.get(l);v&&(eL(v)||v.timer||v.input)||g(wi.close)}},eL=l=>l.showConfirmButton||l.showDenyButton||l.showCancelButton||l.showCloseButton;let sa=!1;const tL=l=>{l.popup.onmousedown=()=>{l.container.onmouseup=function(u){l.container.onmouseup=void 0,u.target===l.container&&(sa=!0)}}},nL=l=>{l.container.onmousedown=()=>{l.popup.onmouseup=function(u){l.popup.onmouseup=void 0,(u.target===l.popup||l.popup.contains(u.target))&&(sa=!0)}}},oL=(l,u,g)=>{u.container.onclick=v=>{const F=n.innerParams.get(l);if(sa){sa=!1;return}v.target===u.container&&S(F.allowOutsideClick)&&g(wi.backdrop)}},iL=l=>typeof l=="object"&&l.jquery,Cm=l=>l instanceof Element||iL(l),sL=l=>{const u={};return typeof l[0]=="object"&&!Cm(l[0])?Object.assign(u,l[0]):["title","html","icon"].forEach((g,v)=>{const F=l[v];typeof F=="string"||Cm(F)?u[g]=F:F!==void 0&&h(`Unexpected type of ${g}! Expected "string" or "Element", got ${typeof F}`)}),u};function rL(){const l=this;for(var u=arguments.length,g=new Array(u),v=0;v<u;v++)g[v]=arguments[v];return new l(...g)}function aL(l){class u extends this{_main(v,F){return super._main(v,Object.assign({},l,F))}}return u}const lL=()=>E.timeout&&E.timeout.getTimerLeft(),$m=()=>{if(E.timeout)return k(),E.timeout.stop()},km=()=>{if(E.timeout){const l=E.timeout.start();return C(l),l}},cL=()=>{const l=E.timeout;return l&&(l.running?$m():km())},uL=l=>{if(E.timeout){const u=E.timeout.increase(l);return C(u,!0),u}},dL=()=>E.timeout&&E.timeout.isRunning();let Em=!1;const Tc={};function fL(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";Tc[l]=this,Em||(document.body.addEventListener("click",pL),Em=!0)}const pL=l=>{for(let u=l.target;u&&u!==document;u=u.parentNode)for(const g in Tc){const v=u.getAttribute(g);if(v){Tc[g].fire({template:v});return}}};var hL=Object.freeze({__proto__:null,argsToParams:sL,bindClickHandler:fL,clickCancel:QT,clickConfirm:am,clickDeny:YT,enableLoading:_i,fire:rL,getActions:me,getCancelButton:ve,getCloseButton:Fe,getConfirmButton:Y,getContainer:I,getDenyButton:M,getFocusableElements:Ut,getFooter:ke,getHtmlContainer:Ae,getIcon:ne,getIconContent:ae,getImage:ge,getInputLabel:G,getLoader:D,getPopup:j,getProgressSteps:O,getTimerLeft:lL,getTimerProgressBar:Le,getTitle:pe,getValidationMessage:se,increaseTimer:uL,isDeprecatedParameter:Ec,isLoading:vt,isTimerRunning:dL,isUpdatableParameter:gm,isValidParameter:mm,isVisible:JT,mixin:aL,resumeTimer:km,showLoading:_i,stopTimer:$m,toggleTimer:cL});class mL{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 Sm=["swal-title","swal-html","swal-footer"],gL=l=>{const u=typeof l.template=="string"?document.querySelector(l.template):l.template;if(!u)return{};const g=u.content;return $L(g),Object.assign(yL(g),wL(g),bL(g),_L(g),vL(g),xL(g),CL(g,Sm))},yL=l=>{const u={};return Array.from(l.querySelectorAll("swal-param")).forEach(v=>{zo(v,["name","value"]);const F=v.getAttribute("name"),$e=v.getAttribute("value");typeof bi[F]=="boolean"?u[F]=$e!=="false":typeof bi[F]=="object"?u[F]=JSON.parse($e):u[F]=$e}),u},wL=l=>{const u={};return Array.from(l.querySelectorAll("swal-function-param")).forEach(v=>{const F=v.getAttribute("name"),$e=v.getAttribute("value");u[F]=new Function(`return ${$e}`)()}),u},bL=l=>{const u={};return Array.from(l.querySelectorAll("swal-button")).forEach(v=>{zo(v,["type","color","aria-label"]);const F=v.getAttribute("type");u[`${F}ButtonText`]=v.innerHTML,u[`show${d(F)}Button`]=!0,v.hasAttribute("color")&&(u[`${F}ButtonColor`]=v.getAttribute("color")),v.hasAttribute("aria-label")&&(u[`${F}ButtonAriaLabel`]=v.getAttribute("aria-label"))}),u},_L=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},vL=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},xL=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 v=Array.from(l.querySelectorAll("swal-input-option"));return v.length&&(u.inputOptions={},v.forEach(F=>{zo(F,["value"]);const $e=F.getAttribute("value"),Je=F.innerHTML;u.inputOptions[$e]=Je})),u},CL=(l,u)=>{const g={};for(const v in u){const F=u[v],$e=l.querySelector(F);$e&&(zo($e,[]),g[F.replace(/^swal-/,"")]=$e.innerHTML.trim())}return g},$L=l=>{const u=Sm.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(l.children).forEach(g=>{const v=g.tagName.toLowerCase();u.includes(v)||p(`Unrecognized element <${v}>`)})},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."}`])})},Am=10,kL=l=>{const u=I(),g=j();typeof l.willOpen=="function"&&l.willOpen(g);const F=window.getComputedStyle(document.body).overflowY;AL(u,g,l),setTimeout(()=>{EL(u,g)},Am),Ht()&&(SL(u,l.scrollbarPadding,F),sO()),!Dn()&&!E.previousActiveElement&&(E.previousActiveElement=document.activeElement),typeof l.didOpen=="function"&&setTimeout(()=>l.didOpen(g)),z(u,s["no-transition"])},Pm=l=>{const u=j();if(l.target!==u)return;const g=I();u.removeEventListener(vs,Pm),g.style.overflowY="auto"},EL=(l,u)=>{vs&&w(u)?(l.style.overflowY="hidden",u.addEventListener(vs,Pm)):l.style.overflowY="auto"},SL=(l,u,g)=>{rO(),u&&g!=="hidden"&&pO(),setTimeout(()=>{l.scrollTop=0})},AL=(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")},Am),N([document.documentElement,document.body],s.shown),g.heightAuto&&g.backdrop&&!g.toast&&N([document.documentElement,document.body],s["height-auto"])};var Im={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 PL(l){l.inputValidator||Object.keys(Im).forEach(u=>{l.input===u&&(l.inputValidator=Im[u])})}function IL(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 TL(l){PL(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`),IL(l),typeof l.title=="string"&&(l.title=l.title.split(`
`).join("<br />")),_s(l)}let yn;class vi{constructor(){if(typeof window>"u")return;yn=this;for(var u=arguments.length,g=new Array(u),v=0;v<u;v++)g[v]=arguments[v];const F=Object.freeze(this.constructor.argsToParams(g));Object.defineProperties(this,{params:{value:F,writable:!1,enumerable:!0,configurable:!0}});const $e=yn._main(yn.params);n.promise.set(this,$e)}_main(u){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};MO(Object.assign({},g,u)),E.currentInstance&&(E.currentInstance._destroy(),Ht()&&um()),E.currentInstance=yn;const v=LL(u,g);TL(v),Object.freeze(v),E.timeout&&(E.timeout.stop(),delete E.timeout),clearTimeout(E.restoreFocusTimeout);const F=ML(yn);return sm(yn,v),n.innerParams.set(yn,v),OL(yn,F,v)}then(u){return n.promise.get(this).then(u)}finally(u){return n.promise.get(this).finally(u)}}const OL=(l,u,g)=>new Promise((v,F)=>{const $e=Je=>{l.close({isDismissed:!0,dismiss:Je})};Cs.swalPromiseResolve.set(l,v),Cs.swalPromiseReject.set(l,F),u.confirmButton.onclick=()=>{GO(l)},u.denyButton.onclick=()=>{JO(l)},u.cancelButton.onclick=()=>{YO(l,$e)},u.closeButton.onclick=()=>{$e(wi.close)},XO(l,u,$e),XT(l,E,g,$e),jO(l,g),kL(g),NL(E,g,$e),BL(u,g),setTimeout(()=>{u.container.scrollTop=0})}),LL=(l,u)=>{const g=gL(l),v=Object.assign({},bi,u,g,l);return v.showClass=Object.assign({},bi.showClass,v.showClass),v.hideClass=Object.assign({},bi.hideClass,v.hideClass),v},ML=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},NL=(l,u,g)=>{const v=Le();Z(v),u.timer&&(l.timeout=new mL(()=>{g("timer"),delete l.timeout},u.timer),u.timerProgressBar&&(J(v),dt(v,u,"timerProgressBar"),setTimeout(()=>{l.timeout&&l.timeout.running&&C(u.timer)})))},BL=(l,u)=>{if(!u.toast){if(!S(u.allowEnterKey)){RL();return}DL(l,u)||kc(-1,1)}},DL=(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,RL=()=>{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(vi.prototype,wm),Object.assign(vi,hL),Object.keys(wm).forEach(l=>{vi[l]=function(){if(yn)return yn[l](...arguments)}}),vi.DismissReason=wi,vi.version="11.7.2";const ra=vi;return ra.default=ra,ra}),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,Hm=["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"],qm=["jpg","jpeg","png","gif","bmp","svg"],zm=["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 Vm(e){return new Promise((t,n)=>{jm({onload:o=>t(o),onerror:o=>n(o),...e})})}function ki(){return Math.floor(Date.now()/1e3)}function ua(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 $i=="function")return $i(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 Km(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 Wm(e,t=!0){return(t?/^([a-z\d]{32})$|^([a-z\d]{40})$/i:/^[a-z\d]{32,40}$/i).test(e)}function Gm(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;s<i.snapshotLength;s++){const r=i.snapshotItem(s);r&&o.push(r)}return o}async function Ei(e,t=100,n=12e4,o=document){const i=await fo(e,t,n,o);if(i.length)return i[0];throw new Error(`未找到元素:${e}`)}async function fo(e,t=100,n=12e4,o=document){const i=e.indexOf("//")===0;function s(r){if(i){const a=zc(e);a.length>0&&r(a)}else{const a=o.querySelectorAll(e);a.length&&r(Array.from(a))}}try{return await Si(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 Si(i,t,n)}catch(s){throw console.warn("[findWithJQuery]",s),new Error(`查找元素超时:${e}`)}}async function Si(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 da(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 po(e,t,n){if(n){const o=ks(e,{});la(e,{...o,...t})}else la(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 Jm(e){return e?Hm.indexOf(e.toLowerCase())>-1:!1}function Ym(e){return e?qm.indexOf(e.toLowerCase())>-1:!1}function Qm(e){return e?zm.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||{}),Ai=(e=>(e.listItemHover="列表项悬浮菜单",e.listItemHoverSub="列表项悬浮子菜单",e.listItemContext="列表项右键菜单",e.listItemContextSub="列表项右键子菜单",e.selection="选中项菜单",e.selectionSub="选中项子菜单",e.dirContext="当前目录右键菜单",e.dirContextSub="当前目录右键子菜单",e))(Ai||{}),ho=(e=>(e[e.after=0]="after",e[e.before=1]="before",e))(ho||{});const Ze={get:async(e,t)=>ks(e,t),set:async(e,t)=>la(e,t),remove:async e=>Rm(e)},Vc="clouddrive_configs";var Kc=(e=>(e.windows="windows",e.macos="macos",e.linux="linux",e.android="android",e))(Kc||{});function fa(e){return{active:!1,url:"http://localhost:19798",root:"/115",memo:"",platform:void 0,...e}}async function Wc(){const e=[fa()],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 Pi(){return(await Wc()).find(t=>t.active)||fa()}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 pa(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 Xm={[-1]:"失败",[0]:"违规",[1]:"下载中",[2]:"成功"};var St=(e=>(e.all="all",e.failed="failed",e.success="success",e.magnet="magnet",e.magnetEd2k="magnetEd2k",e))(St||{}),ha=(e=>(e[e.true=1]="true",e[e.false=0]="false",e))(ha||{}),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 Zm(e){return{offset:0,limit:1150,aid:1,cid:"",format:"json",o:"user_ptime",asc:0,search_value:"",...e}}function Ii(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:ma}=Object,ga=(e=>t=>{const n=Xc.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),wn=e=>(e=e.toLowerCase(),t=>ga(t)===e),Is=e=>t=>typeof t===e,{isArray:Go}=Array,Ti=Is("undefined");function eg(e){return e!==null&&!Ti(e)&&e.constructor!==null&&!Ti(e.constructor)&&jn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Zc=wn("ArrayBuffer");function tg(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Zc(e.buffer),t}const ng=Is("string"),jn=Is("function"),eu=Is("number"),ya=e=>e!==null&&typeof e=="object",og=e=>e===!0||e===!1,Ts=e=>{if(ga(e)!=="object")return!1;const t=ma(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ig=wn("Date"),sg=wn("File"),rg=wn("Blob"),ag=wn("FileList"),lg=e=>ya(e)&&jn(e.pipe),cg=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||Xc.call(e)===t||jn(e.toString)&&e.toString()===t)},ug=wn("URLSearchParams"),dg=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Oi(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;o<i;o++)t.call(null,e[o],o,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),r=s.length;let a;for(o=0;o<r;o++)a=s[o],t.call(null,e[a],a,e)}}function tu(e,t){t=t.toLowerCase();const n=Object.keys(e);let o=n.length,i;for(;o-- >0;)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=>!Ti(e)&&e!==nu;function wa(){const{caseless:e}=ou(this)&&this||{},t={},n=(o,i)=>{const s=e&&tu(t,i)||i;Ts(t[s])&&Ts(o)?t[s]=wa(t[s],o):Ts(o)?t[s]=wa({},o):Go(o)?t[s]=o.slice():t[s]=o};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&Oi(arguments[o],n);return t}const fg=(e,t,n,{allOwnKeys:o}={})=>(Oi(t,(i,s)=>{n&&jn(i)?e[s]=Qc(i,n):e[s]=i},{allOwnKeys:o}),e),pg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),hg=(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)},mg=(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&&ma(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},gg=(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},yg=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},wg=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ma(Uint8Array)),bg=(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])}},_g=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},vg=wn("HTMLFormElement"),xg=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),Cg=wn("RegExp"),su=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};Oi(n,(i,s)=>{t(i,s,e)!==!1&&(o[s]=i)}),Object.defineProperties(e,o)},$g=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+"'")})}})},kg=(e,t)=>{const n={},o=i=>{i.forEach(s=>{n[s]=!0})};return Go(e)?o(e):o(String(e).split(t)),n},Eg=()=>{},Sg=(e,t)=>(e=+e,Number.isFinite(e)?e:t),ba="abcdefghijklmnopqrstuvwxyz",ru="0123456789",au={DIGIT:ru,ALPHA:ba,ALPHA_DIGIT:ba+ba.toUpperCase()+ru},Ag=(e=16,t=au.ALPHA_DIGIT)=>{let n="";const{length:o}=t;for(;e--;)n+=t[Math.random()*o|0];return n};function Pg(e){return!!(e&&jn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const K={isArray:Go,isArrayBuffer:Zc,isBuffer:eg,isFormData:cg,isArrayBufferView:tg,isString:ng,isNumber:eu,isBoolean:og,isObject:ya,isPlainObject:Ts,isUndefined:Ti,isDate:ig,isFile:sg,isBlob:rg,isRegExp:Cg,isFunction:jn,isStream:lg,isURLSearchParams:ug,isTypedArray:wg,isFileList:ag,forEach:Oi,merge:wa,extend:fg,trim:dg,stripBOM:pg,inherits:hg,toFlatObject:mg,kindOf:ga,kindOfTest:wn,endsWith:gg,toArray:yg,forEachEntry:bg,matchAll:_g,isHTMLForm:vg,hasOwnProperty:iu,hasOwnProp:iu,reduceDescriptors:su,freezeMethods:$g,toObjectSet:kg,toCamelCase:xg,noop:Eg,toFiniteNumber:Sg,findKey:tu,global:nu,isContextDefined:ou,ALPHABET:au,generateString:Ag,isSpecCompliantForm:Pg,toJSONObject:e=>{const t=new Array(10),n=(o,i)=>{if(ya(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[i]=o;const s=Go(o)?[]:{};return Oi(o,(r,a)=>{const c=n(r,i+1);!Ti(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 Ig=null;function _a(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 Tg(e){return K.isArray(e)&&!e.some(_a)}const Og=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(S,T){return!K.isUndefined(T[S])});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(_,S,T){let B=_;if(_&&!T&&typeof _=="object"){if(K.endsWith(S,"{}"))S=o?S:S.slice(0,-2),_=JSON.stringify(_);else if(K.isArray(_)&&Tg(_)||(K.isFileList(_)||K.endsWith(S,"[]"))&&(B=K.toArray(_)))return S=uu(S),B.forEach(function(I,H){!(K.isUndefined(I)||I===null)&&t.append(r===!0?du([S],H,s):r===null?S:S+"[]",d(I))}),!1}return _a(_)?!0:(t.append(du(T,S,s),d(_)),!1)}const h=[],y=Object.assign(Og,{defaultVisitor:p,convertValue:d,isVisitable:_a});function x(_,S){if(!K.isUndefined(_)){if(h.indexOf(_)!==-1)throw Error("Circular reference detected in "+S.join("."));h.push(_),K.forEach(_,function(B,P){(!(K.isUndefined(B)||B===null)&&i.call(t,B,K.isString(P)?P.trim():P,S,y))===!0&&x(B,S?S.concat(P):[P])}),h.pop()}}if(!K.isObject(e))throw new TypeError("data must be an object");return x(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 va(e,t){this._pairs=[],e&&Os(e,this,t)}const pu=va.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 Lg(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||Lg,i=n&&n.serialize;let s;if(i?s=i(t,n):s=K.isURLSearchParams(t)?t.toString():new va(t,n).toString(o),s){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Mg{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=Mg,gu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ng=typeof URLSearchParams<"u"?URLSearchParams:va,Bg=typeof FormData<"u"?FormData:null,Dg=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Rg=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),an={isBrowser:!0,classes:{URLSearchParams:Ng,FormData:Bg,Blob},isStandardBrowserEnv:Dg,isStandardBrowserWebWorkerEnv:Rg,protocols:["http","https","file","blob","url","data"]};function Fg(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 jg(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ug(e){const t={},n=Object.keys(e);let o;const i=n.length;let s;for(o=0;o<i;o++)s=n[o],t[s]=e[s];return t}function yu(e){function t(n,o,i,s){let r=n[s++];const a=Number.isFinite(+r),c=s>=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]=Ug(i[r])),!a)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,(o,i)=>{t(jg(o),i,n,0)}),n}return null}const Hg={"Content-Type":void 0};function qg(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 Fg(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),qg(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(Hg)});const xa=Ls,zg=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"]),Vg=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]&&zg[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 Li(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 Kg(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 Wg(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function Ca(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 Gg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function Jg(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=Li(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())&&!Wg(t)?r(Vg(t),n):t!=null&&s(n,t,o),this}get(t,n){if(t=Li(t),t){const o=K.findKey(this,t);if(o){const i=this[o];if(!n)return i;if(n===!0)return Kg(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=Li(t),t){const o=K.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||Ca(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let i=!1;function s(r){if(r=Li(r),r){const a=K.findKey(o,r);a&&(!n||Ca(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||Ca(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?Gg(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=Li(r);o[a]||(Jg(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 bn=Ns;function $a(e,t){const n=this||xa,o=t||n,i=bn.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 Mi(e,t,n){He.call(this,e==null?"canceled":e,He.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(Mi,He,{__CANCEL__:!0});function Yg(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 Qg=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 Xg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Zg(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function _u(e,t){return e&&!Xg(t)?Zg(e,t):t}const ey=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 ty(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ny(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<t)return;const x=p&&d-p;return x?Math.round(y*1e3/x):void 0}}function vu(e,t){let n=0;const o=ny(50,250);return i=>{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:Ig,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){let i=e.data;const s=bn.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 x=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(x+":"+_))}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 x=bn.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),S={data:!r||r==="text"||r==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:x,config:e,request:d};Yg(function(B){n(B),c()},function(B){o(B),c()},S),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 S=e.transitional||gu;e.timeoutErrorMessage&&(_=e.timeoutErrorMessage),o(new He(_,S.clarifyTimeoutError?He.ETIMEDOUT:He.ECONNABORTED,e,d)),d=null},an.isStandardBrowserEnv){const x=(e.withCredentials||ey(p))&&e.xsrfCookieName&&Qg.read(e.xsrfCookieName);x&&s.set(e.xsrfHeaderName,x)}i===void 0&&s.setContentType(null),"setRequestHeader"in d&&K.forEach(s.toJSON(),function(_,S){d.setRequestHeader(S,_)}),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=x=>{!d||(o(!x||x.type?new Mi(null,e,d):x),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const y=ty(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 oy={getAdapter:e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let n,o;for(let i=0;i<t&&(n=e[i],!(o=K.isString(n)?Bs[n.toLowerCase()]:n));i++);if(!o)throw o===!1?new He(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(K.hasOwnProp(Bs,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!K.isFunction(o))throw new TypeError("adapter is not a function");return o},adapters:Bs};function ka(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Mi(null,e)}function xu(e){return ka(e),e.headers=bn.from(e.headers),e.data=$a.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),oy.getAdapter(e.adapter||xa.adapter)(e).then(function(o){return ka(e),o.data=$a.call(e,e.transformResponse,o),o.headers=bn.from(o.headers),o},function(o){return bu(o)||(ka(e),o&&o.response&&(o.response.data=$a.call(e,e.transformResponse,o.response),o.response.headers=bn.from(o.response.headers))),Promise.reject(o)})}const Cu=e=>e instanceof bn?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",Ea={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ea[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const ku={};Ea.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 iy(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 Sa={assertOptions:iy,validators:Ea},Un=Sa.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&&Sa.assertOptions(o,{silentJSONParsing:Un.transitional(Un.boolean),forcedJSONParsing:Un.transitional(Un.boolean),clarifyTimeoutError:Un.transitional(Un.boolean)},!1),i!==void 0&&Sa.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=bn.concat(r,s);const a=[];let c=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(c=c&&S.synchronous,a.unshift(S.fulfilled,S.rejected))});const d=[];this.interceptors.response.forEach(function(S){d.push(S.fulfilled,S.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<y;)p=p.then(_[h++],_[h++]);return p}y=a.length;let x=n;for(h=0;h<y;){const _=a[h++],S=a[h++];try{x=_(x)}catch(T){S.call(this,T);break}}try{p=xu.call(this,x)}catch(_){return Promise.reject(_)}for(h=0,y=d.length;h<y;)p=p.then(d[h++],d[h++]);return p}getUri(t){t=Jo(this.defaults,t);const n=_u(t.baseURL,t.url);return hu(n,t.params,t.paramsSerializer)}}K.forEach(["delete","get","head","options"],function(t){Ds.prototype[t]=function(n,o){return this.request(Jo(o||{},{method:t,url:n,data:(o||{}).data}))}}),K.forEach(["post","put","patch"],function(t){function n(o){return function(s,r,a){return this.request(Jo(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:r}))}}Ds.prototype[t]=n(),Ds.prototype[t+"Form"]=n(!0)});const Rs=Ds;class Aa{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(i=>{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 Mi(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 Aa(function(i){t=i}),cancel:t}}}const sy=Aa;function ry(e){return function(n){return e.apply(null,n)}}function ay(e){return K.isObject(e)&&e.isAxiosError===!0}const Pa={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(Pa).forEach(([e,t])=>{Pa[t]=e});const ly=Pa;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(xa);rt.Axios=Rs,rt.CanceledError=Mi,rt.CancelToken=sy,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=ry,rt.isAxiosError=ay,rt.mergeConfig=Jo,rt.AxiosHeaders=bn,rt.formToJSON=e=>yu(K.isHTMLForm(e)?new FormData(e):e),rt.HttpStatusCode=ly,rt.default=rt;const Su=rt,{Axios:XL,AxiosError:cy,CanceledError:ZL,isCancel:eM,CancelToken:tM,VERSION:nM,all:oM,Cancel:iM,isAxiosError:sM,spread:rM,toFormData:uy,AxiosHeaders:aM,HttpStatusCode:lM,formToJSON:cM,mergeConfig:uM}=Su;class Au extends Error{}class Ia extends Au{constructor(){super(...arguments);Ie(this,"message","搜索失败!")}}class Pu extends Ia{constructor(){super(...arguments);Ie(this,"message","搜索请求响应内容为空!")}}class Iu extends Au{constructor(){super(...arguments);Ie(this,"message","目录不存在!")}toString(){return this.message}}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<t.length;r+=1){if(s=t.charCodeAt(r),s<128)n[i++]=s;else if(s<2048)n[i++]=(s>>>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<n.length;s+=1)this._buffer8[s]=n.charCodeAt(s)}end(t=!1){const n=this._bufferLength,o=this._buffer8,i=this._buffer32,s=(n>>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 dy={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 x(m){return-s<m&&m<s}function _(m){return m<1e7?[m]:m<1e14?[m%1e7,Math.floor(m/1e7)]:[m%1e7,Math.floor(m/1e7)%1e7,Math.floor(m/1e14)]}function S(m){T(m);var w=m.length;if(w<4&&ke(m,r)<0)switch(w){case 0:return 0;case 1:return m[0];case 2:return m[0]+m[1]*o;default:return m[0]+(m[1]+m[2]*o)*o}return m}function T(m){for(var w=m.length;m[--w]===0;);m.length=w+1}function B(m){for(var w=new Array(m),C=-1;++C<m;)w[C]=0;return w}function P(m){return m>0?Math.floor(m):Math.ceil(m)}function I(m,w){var C=m.length,k=w.length,L=new Array(C),E=0,q=o,V,te;for(te=0;te<k;te++)V=m[te]+w[te]+E,E=V>=q?1:0,L[te]=V-E*q;for(;te<C;)V=m[te]+E,E=V===q?1:0,L[te++]=V-E*q;return E>0&&L.push(E),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,E,q;for(q=0;q<C;q++)E=m[q]-L+w,w=Math.floor(E/L),k[q]=E-w*L,w+=1;for(;w>0;)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(x(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),E=0,q=o,V,te;for(V=0;V<k;V++)te=m[V]-E-w[V],te<0?(te+=q,E=1):E=0,L[V]=te;for(V=k;V<C;V++){if(te=m[V]-E,te<0)te+=q;else{L[V++]=te;break}L[V]=te}for(;V<C;V++)L[V]=m[V];return T(L),L}function ne(m,w,C){var k;return ke(m,w)>=0?k=j(m,w):(k=j(w,m),C=!C),k=S(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),E=-w,q=o,V,te;for(V=0;V<k;V++)te=m[V]+E,E=Math.floor(te/q),te%=q,L[V]=te<0?te+q:te;return L=S(L),typeof L=="number"?(C&&(L=-L),new h(L)):new p(L,C)}p.prototype.subtract=function(m){var w=U(m);if(this.sign!==w.sign)return this.add(w.negate());var C=this.value,k=w.value;return w.isSmall?ae(C,Math.abs(k),this.sign):ne(C,k,this.sign)},p.prototype.minus=p.prototype.subtract,h.prototype.subtract=function(m){var w=U(m),C=this.value;if(C<0!==w.sign)return this.add(w.negate());var k=w.value;return w.isSmall?new h(C-k):ae(k,Math.abs(C),C>=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,E=B(L),q=o,V,te,Pe,Ee,_e;for(Pe=0;Pe<C;++Pe){Ee=m[Pe];for(var je=0;je<k;++je)_e=w[je],V=Ee*_e+E[Pe+je],te=Math.floor(V/q),E[Pe+je]=V-te*q,E[Pe+je+1]+=te}return T(E),E}function Ae(m,w){var C=m.length,k=new Array(C),L=o,E=0,q,V;for(V=0;V<C;V++)q=m[V]*w+E,E=Math.floor(q/L),k[V]=q-E*L;for(;E>0;)k[V++]=E%L,E=Math.floor(E/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),E=w.slice(C),q=w.slice(0,C),V=O(L,q),te=O(k,E),Pe=O(H(L,k),H(q,E)),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,E;if(w.isSmall){if(k===0)return d[0];if(k===1)return this;if(k===-1)return this.negate();if(E=Math.abs(k),E<o)return new p(Ae(C,E),L);k=_(E)}return se(C.length,k.length)?new p(O(C,k),L):new p(pe(C,k),L)},p.prototype.times=p.prototype.multiply;function Y(m,w,C){return m<o?new p(Ae(w,m),C):new p(pe(w,_(m)),C)}h.prototype._multiplyBySmall=function(m){return x(m.value*this.value)?new h(m.value*this.value):Y(Math.abs(m.value),_(Math.abs(this.value)),this.sign!==m.sign)},p.prototype._multiplyBySmall=function(m){return m.value===0?d[0]:m.value===1?this:m.value===-1?this.negate():Y(Math.abs(m.value),this.value,this.sign!==m.sign)},h.prototype.multiply=function(m){return U(m)._multiplyBySmall(this)},h.prototype.times=h.prototype.multiply,y.prototype.multiply=function(m){return new y(this.value*U(m).value)},y.prototype.times=y.prototype.multiply;function ve(m){var w=m.length,C=B(w+w),k=o,L,E,q,V,te;for(q=0;q<w;q++){V=m[q],E=0-V*V;for(var Pe=q;Pe<w;Pe++)te=m[Pe],L=2*(V*te)+C[q+Pe]+E,E=Math.floor(L/k),C[q+Pe]=L-E*k;C[q+w]=E}return T(C),C}p.prototype.square=function(){return new p(ve(this.value),!1)},h.prototype.square=function(){var m=this.value*this.value;return x(m)?new h(m):new p(ve(_(Math.abs(this.value))),!1)},y.prototype.square=function(m){return new y(this.value*this.value)};function M(m,w){var C=m.length,k=w.length,L=o,E=B(w.length),q=w[k-1],V=Math.ceil(L/(2*q)),te=Ae(m,V),Pe=Ae(w,V),Ee,_e,je,Ct,gt,bs,_s;for(te.length<=C&&te.push(0),Pe.push(0),q=Pe[k-1],_e=C-k;_e>=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;gt<bs;gt++)je+=Ee*Pe[gt],_s=Math.floor(je/L),Ct+=te[_e+gt]-(je-_s*L),je=_s,Ct<0?(te[_e+gt]=Ct+L,Ct=-1):(te[_e+gt]=Ct,Ct=0);for(;Ct!==0;){for(Ee-=1,je=0,gt=0;gt<bs;gt++)je+=te[_e+gt]-L+Pe[gt],je<0?(te[_e+gt]=je+L,je=0):(te[_e+gt]=je,je=1);Ct+=je}E[_e]=Ee}return te=D(te,V)[0],[S(E),S(te)]}function G(m,w){for(var C=m.length,k=w.length,L=[],E=[],q=o,V,te,Pe,Ee,_e;C;){if(E.unshift(m[--C]),T(E),ke(E,w)<0){L.push(0);continue}te=E.length,Pe=E[te-1]*q+E[te-2],Ee=w[k-1]*q+w[k-2],te>k&&(Pe=(Pe+1)*q),V=Math.ceil(Pe/Ee);do{if(_e=Ae(w,V),ke(_e,E)<=0)break;V--}while(V);L.push(V),E=j(E,_e)}return L.reverse(),[S(L),S(E)]}function D(m,w){var C=m.length,k=B(C),L=o,E,q,V,te;for(V=0,E=C-1;E>=0;--E)te=V*L+m[E],q=P(te/w),V=te-q*w,k[E]=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,E=k.value,q;if(E===0)throw new Error("Cannot divide by zero");if(m.isSmall)return k.isSmall?[new h(P(L/E)),new h(L%E)]:[d[0],m];if(k.isSmall){if(E===1)return[m,d[0]];if(E==-1)return[m.negate(),d[0]];var V=Math.abs(E);if(V<o){C=D(L,V),q=S(C[0]);var te=C[1];return m.sign&&(te=-te),typeof q=="number"?(m.sign!==k.sign&&(q=-q),[new h(q),new h(te)]):[new p(q,m.sign!==k.sign),new h(te)]}E=_(V)}var Pe=ke(L,E);if(Pe===-1)return[d[0],m];if(Pe===0)return[d[m.sign===k.sign?1:-1],d[0]];L.length+E.length<=200?C=M(L,E):C=G(L,E),q=C[0];var Ee=m.sign!==k.sign,_e=C[1],je=m.sign;return typeof q=="number"?(Ee&&(q=-q),q=new h(q)):q=new p(q,Ee),typeof _e=="number"?(je&&(_e=-_e),_e=new h(_e)):_e=new p(_e,je),[q,_e]}p.prototype.divmod=function(m){var w=me(this,m);return{quotient:w[0],remainder:w[1]}},y.prototype.divmod=h.prototype.divmod=p.prototype.divmod,p.prototype.divide=function(m){return me(this,m)[0]},y.prototype.over=y.prototype.divide=function(m){return new y(this.value/U(m).value)},h.prototype.over=h.prototype.divide=p.prototype.over=p.prototype.divide,p.prototype.mod=function(m){return me(this,m)[1]},y.prototype.mod=y.prototype.remainder=function(m){return new y(this.value%U(m).value)},h.prototype.remainder=h.prototype.mod=p.prototype.remainder=p.prototype.mod,p.prototype.pow=function(m){var w=U(m),C=this.value,k=w.value,L,E,q;if(k===0)return d[1];if(C===0)return d[0];if(C===1)return d[1];if(C===-1)return w.isEven()?d[1]:d[-1];if(w.sign)return d[0];if(!w.isSmall)throw new Error("The exponent "+w.toString()+" is too large.");if(this.isSmall&&x(L=Math.pow(C,k)))return new h(P(L));for(E=this,q=d[1];k&!0&&(q=q.times(E),--k),k!==0;)k/=2,E=E.square();return q},h.prototype.pow=p.prototype.pow,y.prototype.pow=function(m){var w=U(m),C=this.value,k=w.value,L=BigInt(0),E=BigInt(1),q=BigInt(2);if(k===L)return d[1];if(C===L)return d[0];if(C===E)return d[1];if(C===BigInt(-1))return w.isEven()?d[1]:d[-1];if(w.isNegative())return new y(L);for(var V=this,te=d[1];(k&E)===E&&(te=te.times(V),--k),k!==L;)k/=q,V=V.square();return te},p.prototype.modPow=function(m,w){if(m=U(m),w=U(w),w.isZero())throw new Error("Cannot take modPow with modulus 0");var C=d[1],k=this.mod(w);for(m.isNegative()&&(m=m.multiply(d[-1]),k=k.modInv(w));m.isPositive();){if(k.isZero())return d[0];m.isOdd()&&(C=C.multiply(k).mod(w)),m=m.divide(2),k=k.square().mod(w)}return C},y.prototype.modPow=h.prototype.modPow=p.prototype.modPow;function ke(m,w){if(m.length!==w.length)return m.length>w.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,E,q,V;k.isEven();)k=k.divide(2),L++;e:for(q=0;q<w.length;q++)if(!m.lesser(w[q])&&(V=t(w[q]).modPow(k,m),!(V.isUnit()||V.equals(C)))){for(E=L-1;E!=0;E--){if(V=V.square().mod(m),V.isUnit())return!1;if(V.equals(C))continue e}return!1}return!0}p.prototype.isPrime=function(m){var w=Le(this);if(w!==n)return w;var C=this.abs(),k=C.bitLength();if(k<=64)return Fe(C,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var L=Math.log(2)*k.toJSNumber(),E=Math.ceil(m===!0?2*Math.pow(L,2):L),q=[],V=0;V<E;V++)q.push(t(V+2));return Fe(C,q)},y.prototype.isPrime=h.prototype.isPrime=p.prototype.isPrime,p.prototype.isProbablePrime=function(m,w){var C=Le(this);if(C!==n)return C;for(var k=this.abs(),L=m===n?5:m,E=[],q=0;q<L;q++)E.push(t.randBetween(2,k.minus(2),w));return Fe(k,E)},y.prototype.isProbablePrime=h.prototype.isProbablePrime=p.prototype.isProbablePrime,p.prototype.modInv=function(m){for(var w=t.zero,C=t.one,k=U(m),L=this.abs(),E,q,V;!L.isZero();)E=k.divide(L),q=w,V=k,w=C,k=L,C=q.subtract(E.multiply(C)),L=V.subtract(E.multiply(L));if(!k.isUnit())throw new Error(this.toString()+" and "+m.toString()+" are not co-prime");return w.compare(0)===-1&&(w=w.add(m)),this.isNegative()?w.negate():w},y.prototype.modInv=h.prototype.modInv=p.prototype.modInv,p.prototype.next=function(){var m=this.value;return this.sign?ae(m,1,this.sign):new p(ie(m,1),this.sign)},h.prototype.next=function(){var m=this.value;return m+1<s?new h(m+1):new p(r,!1)},y.prototype.next=function(){return new y(this.value+BigInt(1))},p.prototype.prev=function(){var m=this.value;return this.sign?new p(ie(m,1),!0):ae(m,1,this.sign)},h.prototype.prev=function(){var m=this.value;return m-1>-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 Ut=Xe.length,Ht=Xe[Ut-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>=Ut;)C=C.multiply(Ht),w-=Ut-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>=Ut;){if(k.isZero()||k.isNegative()&&k.isUnit())return k;w=me(k,Ht),k=w[1].isNegative()?w[0].prev():w[0],C-=Ut-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(),E=k?m.not():m,q=L?w.not():w,V=0,te=0,Pe=null,Ee=null,_e=[];!E.isZero()||!q.isZero();)Pe=me(E,Ht),V=Pe[1].toJSNumber(),k&&(V=Ht-1-V),Ee=me(q,Ht),te=Ee[1].toJSNumber(),L&&(te=Ht-1-te),E=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(Ht).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 co(m,w){if(w.compareTo(m)<=0){var C=co(m,w.square(w)),k=C.p,L=C.e,E=k.multiply(w);return E.compareTo(m)<=0?{p:E,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(co(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),E=dt(m,w),q=E.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<V.length;Ee++){var _e=Pe?V[Ee]+(Ee+1<V.length?V[Ee+1]/o:0):o,je=P(k()*_e);te.push(je),je<V[Ee]&&(Pe=!1)}return L.add(d.fromArray(te,o,!1))}var z=function(m,w,C,k){C=C||a,m=String(m),k||(m=m.toLowerCase(),C=C.toLowerCase());var L=m.length,E,q=Math.abs(w),V={};for(E=0;E<C.length;E++)V[C[E]]=E;for(E=0;E<L;E++){var te=m[E];if(te!=="-"&&te in V&&V[te]>=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(E=Ee?1:0;E<m.length;E++){var te=m[E];if(te in V)Pe.push(U(V[te]));else if(te==="<"){var _e=E;do E++;while(m[E]!==">"&&E<m.length);Pe.push(U(m.slice(_e+1,E)))}else throw new Error(te+" is not a valid character")}return oe(Pe,w,Ee)};function oe(m,w,C){var k=d[0],L=d[1],E;for(E=m.length-1;E>=0;E--)k=k.add(m[E].times(L)),L=L.times(w);return C?k.negate():k}function le(m,w){return w=w||a,m<w.length?w[m]:"<"+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=[],E=m,q;E.isNegative()||E.compareAbs(w)>=0;){q=E.divmod(w),E=q.quotient;var V=q.remainder;V.isNegative()&&(V=w.minus(V).abs(),E=E.next()),L.push(V.toJSNumber())}return L.push(E.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]),E="0000000",q;--k>=0;)q=String(C[k]),L+=E.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(x(+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)||!x(L))throw new Error("Invalid integer: "+L+" is not a valid exponent.");var E=k[0],q=E.indexOf(".");if(q>=0&&(L-=E.length-q-1,E=E.slice(0,q)+E.slice(q+1)),L<0)throw new Error("Cannot include negative exponent part for integers");E+=new Array(L+1).join("0"),m=E}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(x(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)})(dy);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'!")}},fy=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]})}},py=fy,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 Ta=Fs,hy=py,Tu=At;var mo=class extends Ta{constructor(t={}){super(t),this.inMemoryBlockOnConsumed=t.inMemoryBlockOnConsumed,this.inMemoryBlockDuration=t.inMemoryBlockDuration,this.insuranceLimiter=t.insuranceLimiter,this._inMemoryBlockedKeys=new hy}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<this.execEvenlyMinDelayMs&&(c=a.consumedPoints*this.execEvenlyMinDelayMs),setTimeout(t,c,a)}else t(a)}_handleError(t,n,o,i,s,r=!1,a={}){this.insuranceLimiter instanceof Ta?this.insuranceLimiter[n](s,r,a).then(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 Ta))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 Tu(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 Tu(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 my=mo,gy=At,yy="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 wy extends my{constructor(t){super(t),this.client=t.storeClient,this._rejectIfRedisNotReady=!!t.rejectIfRedisNotReady,this._incrTtlLuaScript=t.customIncrTtlLuaScript||yy,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 gy;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 by=wy;const _y=mo,vy=At;function Ou(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 Oa extends _y{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=Ou(this.client)}):(this._initCollection(),this._driverVersion=Ou(this.client))}get dbName(){return this._dbName}set dbName(t){this._dbName=typeof t>"u"?Oa.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 vy;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 x=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(x,_,d).then(S=>{p(S)}).catch(S=>{S&&S.code===11e3?this._upsert(t,n,o,i).then(T=>p(T)).catch(T=>h(T)):h(S)})}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 xy=Oa;const Cy=mo,$y=At;class ky extends Cy{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 $y,[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,x=>{if(x)return t.rollback(),a(x);t.query("SELECT points, expire FROM ??.?? WHERE `key` = ?;",[this.dbName,this.tableName,n],(_,S)=>{if(_)return t.rollback(),a(_);t.query("COMMIT",T=>{if(T)return t.rollback(),a(T);r(S)})})})})})}_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 Ey=ky;const Sy=mo,Ay=At;class Py extends Sy{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 Ay,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 Iy=Py;const Lu=Um(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ty=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 Oy=Ty,La=At;var Ly=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 La(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 Oy(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 La(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 La(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 My=Fs,Ny=Ly,Mu=At;class By extends My{constructor(t={}){super(t),this._memoryStorage=new Ny}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<this.execEvenlyMinDelayMs&&(d=c.consumedPoints*this.execEvenlyMinDelayMs),setTimeout(i,d,c)}else i(c)})}penalty(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)})}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 Mu(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 Mu(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 Nu=By;const Bu=Lu,Dy=Lu,Ry=Fs,Du=Nu,Fy=At,zt="rate_limiter_flexible";let Yo=null;const Ru=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:zt,keyPrefix:t.keyPrefix,promiseId:t.promiseId,type:n,data:i})},Fu=function(e){setTimeout(()=>{this._initiated?process.send(e):typeof this._promises[e.promiseId]<"u"&&Fu.call(this,e)},30)},Qo=function(e,t,n,o,i){const s={channel:zt,keyPrefix:this.keyPrefix,func:e,promiseId:t,data:{key:n,arg:o,opts:i}};this._initiated?process.send(s):Fu.call(this,s)},ju=function(e,t){if(!t||t.channel!==zt||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=>{Ru(e,t,"resolve",o)}).catch(o=>{Ru(e,t,"reject",o)})},jy=function(e){if(!e||e.channel!==zt||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 Fy(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]}},Uy=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+=Dy.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 Hy{constructor(){if(Yo)return Yo;this._rateLimiters={},Bu.setMaxListeners(0),Bu.on("message",(t,n)=>{n&&n.channel===zt&&n.type==="init"?(typeof this._rateLimiters[n.opts.keyPrefix]>"u"&&(this._rateLimiters[n.opts.keyPrefix]=new Du(n.opts)),t.send({channel:zt,type:"init",keyPrefix:n.opts.keyPrefix})):ju.call(this,t,n)}),Yo=this}}class qy{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===zt&&s.type==="init")typeof this._rateLimiters[s.opts.keyPrefix]>"u"&&(this._rateLimiters[s.opts.keyPrefix]=new Du(s.opts)),t.sendDataToProcessId(i.process.pm_id,{data:{},topic:zt,channel:zt,type:"init",keyPrefix:s.opts.keyPrefix},(r,a)=>{r&&console.log(r,a)});else{const r={send:a=>{const c=a;c.topic=zt,typeof c.data>"u"&&(c.data={}),t.sendDataToProcessId(i.process.pm_id,c,(d,p)=>{d&&console.log(d,p)})}};ju.call(this,r,s)}})}),Yo=this}}class zy extends Ry{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===zt&&n.type==="init"&&n.keyPrefix===this.keyPrefix?this._initiated=!0:jy.call(this,n)}),process.send({channel:zt,type:"init",opts:Uy.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 Vy={RateLimiterClusterMaster:Hy,RateLimiterClusterMasterPM2:qy,RateLimiterCluster:zy};const Ky=mo,Wy=At;class Gy extends Ky{constructor(t){super(t),this.client=t.storeClient}_getRateLimiterRes(t,n,o){const i=new Wy;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,x)=>{if(y||!x)if(typeof s.attemptNumber>"u"||s.attemptNumber<3){const _=Object.assign({},s);_.attemptNumber=_.attemptNumber?_.attemptNumber+1:1,this._upsert(t,n,o,i,_).then(S=>r(S)).catch(S=>a(S))}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,x)=>{if(y)a(y);else{const _=x===!1?0:x,S={consumedPoints:h,msBeforeNext:_>=0?Math.max(_-c,0):-1};r(S)}})})})}_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 Jy=Gy;const Uu=At;var Yy=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 Uu(0,Number.MAX_SAFE_INTEGER,0,!1)}getWhiteRes(){return new Uu(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 Qy=Fs;var Xy=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 Qy))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;d<r.length;d++)c&&r[d].rejected===!0?a[this._limiters[d].keyPrefix]=r[d].rej:c||(a[this._limiters[d].keyPrefix]=r[d]);c?i(a):o(a)})})}},Zy=class extends Error{constructor(t,n){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="CustomError",this.message=t,n&&(this.extra=n)}};const Hu=Zy,qu=4294967295,Ma="limiter";var ew=class{constructor(t,n={maxQueueSize:qu}){this._queueLimiters={KEY_DEFAULT:new zu(t,n)},this._limiterFlexible=t,this._maxQueueSize=n.maxQueueSize}getTokensRemaining(t=Ma){return this._queueLimiters[t]?this._queueLimiters[t].getTokensRemaining():Promise.resolve(this._limiterFlexible.points)}removeTokens(t,n=Ma){return this._queueLimiters[n]||(this._queueLimiters[n]=new zu(this._limiterFlexible,{key:n,maxQueueSize:this._maxQueueSize})),this._queueLimiters[n].removeTokens(t)}};class zu{constructor(t,n={maxQueueSize:qu,key:Ma}){this._key=n.key,this._waitTimeout=null,this._queue=[],this._limiterFlexible=t,this._maxQueueSize=n.maxQueueSize}getTokensRemaining(){return this._limiterFlexible.get(this._key).then(t=>t!==null?t.remainingPoints:this._limiterFlexible.points)}removeTokens(t){const n=this;return new Promise((o,i)=>{if(t>n._limiterFlexible.points){i(new Hu(`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<i._maxQueueSize?i._queue.push({resolve:t,reject:n,tokens:o}):n(new Hu(`Number of requests reached it's maximum ${i._maxQueueSize}`))}_processFIFO(){const t=this;if(t._waitTimeout!==null&&(clearTimeout(t._waitTimeout),t._waitTimeout=null),t._queue.length===0)return;const n=t._queue.shift();t._limiterFlexible.consume(t._key,n.tokens).then(o=>{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 Na=At;var tw=class{constructor(t,n){this._rateLimiter=t,this._burstLimiter=n}_combineRes(t,n){return t?new Na(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 Na?this._burstLimiter.consume(t,n,o).then(s=>Promise.resolve(this._combineRes(i,s))).catch(s=>s instanceof Na?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 nw=At,ow=mo;class Vu{constructor(t,n,o){this.key=t,this.points=n,this.expire=o}}const iw=25,sw=25;class rw extends ow{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:iw,WriteCapacityUnits:t&&t.writeCapacityUnits?t.writeCapacityUnits:sw}};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 Vu(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 Vu(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 nw;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 aw=rw;const lw=mo,cw=At;class uw extends lw{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 cw;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 dw=uw;const fw=by,pw=xy,hw=Ey,mw=Iy,{RateLimiterClusterMaster:gw,RateLimiterClusterMasterPM2:yw,RateLimiterCluster:ww}=Vy;var Ku={RateLimiterRedis:fw,RateLimiterMongo:pw,RateLimiterMySQL:hw,RateLimiterPostgres:mw,RateLimiterMemory:Nu,RateLimiterMemcache:Jy,RateLimiterClusterMaster:gw,RateLimiterClusterMasterPM2:yw,RateLimiterCluster:ww,RLWrapperBlackAndWhite:Yy,RateLimiterUnion:Xy,RateLimiterQueue:ew,BurstyRateLimiter:tw,RateLimiterRes:At,RateLimiterDynamo:aw,RateLimiterPrisma:dw};const bw="pan115_api",_w={points:5,duration:1};function vw(e){return{clientId:bw,rateLimit:_w,msDelayAdjustment:30,...e}}function xw(e){const t=vw(e),n=Su.create(),o=new Ku.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 Ku.RateLimiterRes){const r=s.msBeforeNext+t.msDelayAdjustment;return console.log(`[axios] Delay ${r}ms for next request...`),await kt(r),i}else throw new cy(s)}},i=>(console.warn("[axios] onRejected:",i),Promise.reject(i))),n}const Dt=xw();async function Wu(e,t,n){const o=new URLSearchParams({page:e.toString(),uid:n.toString(),sign:t,time:ki().toString()});return(await Dt.post("https://115.com/web/lixian/?ct=lixian&ac=task_lists",o,{withCredentials:!0,timeout:6e4})).data}async function Gu(){return(await Dt.get(`https://115.com/?ct=offline&ac=space&_=${Date.now()}`,{timeout:3e4,withCredentials:!0})).data}async function Ju(){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 Yu(e){const t=da(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 Qu(e,t=500){const n=await Ba(e,t);for(let o=0;o<n.length;o++){const i=n[o];if(i.fid)continue;const s=Ii({cid:i.cid,limit:e.limit||115}),r=await Qu(s,t);i.children=r}return n}async function Ba(e,t=500){let n=[],o=0;for(;;){e.offset=o;const i=await Yu(e);if(!i.data||!i.data.length||(n=[...n,...i.data],o+=e.limit,o>=i.count))break;await kt(t)}return n}async function Cw(e){const t=da(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 Ia(o.error)}async function $w(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){const h=r-c;d=Math.min(h,d)}i>=r&&(d=a)}e.offset=i,e.limit=d;const p=await Cw(e);if(!p.data||!p.data.length||(o=[...o,...p.data],i+=d,i>=p.count))break;await kt(t)}return o}async function kw(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 Xu(e,t,n,o){let i=0,s=0;for(;;){const r=t.slice(i,i+n);if((await kw(e,r)).state&&(s+=r.length),i+=n,i>=t.length)break;await kt(o)}return s}async function Zu(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 Ew(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 Sw(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 go(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 Da(e,t,n,o){const i={uid:o.toString(),sign:t.sign,time:ki().toString()};n&&(i.flag="1");const s=uy(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 Aw(e){if(!(await go(e)).play_long)throw new Error("该目录下没有可以播放的媒体文件![by_attr]");const o=(await Ba(Ii({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 Pw(e){/^\d+$/.test(e.target)&&(e.target=`U_1_${e.target}`);const t=da(e);return(await Dt.post("https://uplb.115.com/3.0/sampleinitupload.php",t,{timeout:12e4,withCredentials:!0})).data}async function Iw(e,t){const n=await Pw(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 Tw(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 ed(e="",t=""){return e+Date.now().toString()+Math.random().toString(36).substring(5)+t}async function Ow(e,t,n=!1){var s;const o=new Map;if(!e.length)return o;t=t||await Pi();let i=new Map;n||(ue({text:"正在获取上级目录路径...",timer:0}),fe.showLoading());try{i=await Gw(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.length;r++){const a=(s=i.get(e[r].parentId))==null?void 0:s.slice(1).join("/"),c=e[r].name,d=Km(a+"/"+c,!0),p=e[r].isFile?await Wo(t,d,Ps.play):await pa(t,d);o.set(d,p)}return console.log("[buildCloudDriveUrlsForFileItems] pathToUrl:",o),o}async function Lw(e,t){const n=await Wo(e,t);return(await Vm({method:"HEAD",url:n})).status===200}async function Mw(e,t,n,o){const s=`waitFileExist_${ed()} path: ${t}`;console.time(s);async function r(a){const c=await Lw(e,t);c===!0&&a(c)}try{await Si(r,n,o)}catch{throw new Error(`[waitFileExist] 检查文件存在超时!文件路径: ${t}`)}finally{console.timeEnd(s)}}async function Nw(e){let t=`#EXTM3U
`;for(const[n,o]of e)t+=`#EXTINF:0,${n}
${o}
`;return t}var yo=(e=>(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 Bw(e){return e.startsWith("/")}function Dw(e){return e===""||e==="/"||e==="\\"}function td(e,t,n="/"){if(Bw(t))return t;const o=new URL(e,"http://example.com");o.pathname=Rw(o.pathname,t);let i=decodeURIComponent(o.pathname);return Us(i,n)}function Rw(e,t){const n=e.endsWith("/")?e:e+"/",o=t.startsWith("/")?t.slice(1):t;return n+o}async function Vt(e=!0){const t=bo().GetCurWangPanCid();return!t&&e?(bo().Core.MinMessage.Show({text:'不支持"根目录"!',timeout:1e3}),""):t}async function Fw(e,t){let n=$(`li.temp-el[cate_id="${e}"]`);if(!n.length){const o=`
      <li class="selected temp-el" file_type="${0}">
        <input type="checkbox" value="${e}"/>
        <div class="checkbox" menu="file_check_one"></div>
        <div class="file-name-wrap">
          <span class="file-name" rel="file_name">
            <em>
              <a class="name" href="javascript:;" cate="1" menu="open" aid="1" cid="${e}" rel="view_folder">
                <span>名称</span>
              </a>
            </em>
          </span>
        </div>
      </li>
    `;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 _n(e){const t=await Zo(e);return Ni(t)}async function Zo(e){const t=e.attr("file_size"),n=e.attr("iv")==="1",o=await sd(),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 zw(e);return jw(t)}async function jw(e){const t=[];for(let n=0;n<e.length;n++){const o=await Ni(e[n]);t.push(o)}return t}async function Ni(e){var o,i;const t=!!e.fid,n={id:t?e.fid:e.cid,name:e.n,hash:e.sha,parentId:t?e.cid:e.pid,sizeRaw:e.s,sizeDesc:(o=e.s)==null?void 0:o.toString(),sizeBytes:0,isFile:t,isDir:!t,isVideo:e.iv===!0||((i=e.iv)==null?void 0:i.toString())==="1",pickCode:e.pc,playDuration:e.play_long};return typeof e.s=="number"?n.sizeBytes=e.s:typeof e.s=="string"&&/^\d+$/.test(e.s)&&(n.sizeBytes=parseInt(e.s)),n.sizeDesc=Ss(n.sizeBytes||0),n}function bo(){return unsafeWindow.TOP?unsafeWindow.TOP:unsafeWindow}function Uw(){return unsafeWindow.top===unsafeWindow?unsafeWindow.Ext:unsafeWindow.top.Ext}async function Hw(e){return new Promise((t,n)=>{bo().Core.DataAccess.Dir.GetDetail("1",e,o=>t(o))})}async function qw(){const e=await Vt(),t=await Hw(e),n=await Fw(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 ei(){return(await Hs()).find(".list-contents, .list-thumb")}async function nd(e){const t=await ei();return e?t.find("li.selected:not(.ce-temp-cur-dir)"):t.find("li:not(.ce-temp-cur-dir)")}async function zw(e){const t=await nd(e),n=[];for(let o=0;o<t.length;o++){const i=t.eq(o),s=await Zo(i);n.push(s)}return n}async function Ra(e="/"){const t=await od();return e+t.slice(1).join(e)}async function od(){const e=await Hs(),t=[];return e.find("#js_top_header_file_path_box .top-file-path > .file-path").children().each(function(){t.push($(this).text().trim().replace(/[›]$/,""))}),t}async function Vw(){const e=await Vt();(await ei()).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 Hn(e=!1){const t=await Vt();if(!t)return null;const n=await ei(),o=await qw();return e||o.hide(),n.find(`li[cate_id="${t}"]`).length||n.append(o),o}async function Fa(e,t,n){n&&await Vw(),bo().Core.FileMenu.DoEvent([e],t,null)}function id(e){return`https://115.com/?${new URLSearchParams({cid:e}).toString()}&offset=0&mode=wangpan`}async function sd(e=location.href){return e.includes("ac=search")}function ja(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 rd(e){return`https://v.anxia.com/?${new URLSearchParams({pickcode:e,share_id:"0"}).toString()}`}async function Kw(e){unsafeWindow.Main.ReInstance({type:e.type,offset:0,o:Yc.userPtime,asc:ha.false,star:e.star,suffix:e.suffix})}async function Ww(){return(await ei()).find("li.selected")}async function ad(){const e=await Ww();return e?await Zo(e):null}function ld(e){return e.replace(/[/\\:*?"<>|]/g,"_")}async function Ua(e){const n=(await go(e.id)).paths.slice(1).map(s=>s.file_name).join("/"),o=ld(e.name);return`/${n}/${o}`.replace(/^[\/]+/g,"/")}async function Gw(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 go(r.id);await kt(t),i.set(r.parentId,a.paths.map(c=>c.file_name))}return i}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 go(r.id);await kt(t),i.set(r.parentId,a.paths)}return i}async function Yw(e,t){const n=new File([e],t.filename,{type:"text/plain"});return Iw(n,t)}async function Qw(e,t,n){const o=await Ow(e),i=await Nw(o);n=n||ed();let s=t;return/m3u8$/.test(n)||(n+=".m3u8"),await Yw(i,{filename:n,target:s})}const Ha=new Map;async function cd(e,t=!0){if(e=Us(e,yo.unix),e=e.replace(/^[\/]+/,"").replace(/[\/]+$/,""),t&&Ha.has(e))return Ha.get(e);if(e===""||e==="/")return"0";const n=await Sw(e);if(!n.state)throw new Error(`根据路径"${e}"获取目录ID失败: ${n.error}`);if(n.id&&n.id.toString()!=="0")return Ha.set(e,n.id.toString()),n.id.toString();throw new Iu(`根据路径"${e}"获取目录ID失败: 目录不存在!`)}async function Xw(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 cd(i),t.pathToId.set(i,r)}catch(a){if(a instanceof Iu){const c=await Zu(o,s);if(!c.state)throw new Error(`创建目录"${s}"失败: ${c.error}`);r=c.cid.toString()}else throw a}o=r,t.pathToId.set(i,r)}return t.id=o,t}async function ud(e){if(!location.search.includes("ac=search")||!e.enableInSearch)return;const n=(await fo("#js_data_list"))[0],o=[{label:"移动",body:'<a href="javascript:;" menu="move" style=""><i class="icon-operate ifo-move" menu="move"></i><span menu="move">移动</span></a>',enabled:!0},{label:"重命名",body:'<a href="javascript:;" menu="edit_name" style=""><i class="icon-operate ifo-rename" menu="edit_name"></i><span menu="edit_name">重命名</span></a>',enabled:!0},{label:"删除",body:'<a href="javascript:;" menu="delete" style=""><i class="icon-operate ifo-remove" menu="delete"></i><span menu="delete">删除</span></a>',enabled:!0},{label:"属性",body:'<a href="javascript:;" menu="attribute" style=""><i class="icon-operate ifo-property" menu="attribute"></i><span menu="attribute">属性</span></a>',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<c.length;p++){const h=c[p];if(h.querySelector(".file-opr"))continue;const y=document.createElement("div");y.className="file-opr",y.setAttribute("rel","menu"),y.innerHTML=d,h.classList.add(a),h.appendChild(y)}};s(),new MutationObserver(async([a])=>{a.type==="childList"&&s()}).observe(n,{childList:!0})}async function Zw(e){if(!e.hideSelectionMenuLabel)return;const n=(await fo("#js_operate_box"))[0];new MutationObserver(async([i])=>{if(i.type==="childList"){const s=n.querySelectorAll("li[menu]");for(let r=0;r<s.length;r++){const a=s[r],c=a.textContent;a.setAttribute("title",c||"")}}}).observe(n,{childList:!0}),n.classList.add("only-icon")}async function eb(e,t){const n=[],o=await ni(),i=o.keyToTriggerManual;for(const s of t){const r=Es(e,{key:`_ce_s_${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===ln.alt&&_.altKey||i===ln.ctrl&&_.ctrlKey||i===ln.shift&&_.shiftKey||i===ln.meta&&_.metaKey)&&(d={names:[Va.manual],position:o.injectManualFuncPosition})}const p=$(c.target).closest("li"),h=await _n(p),y=await Pi(),x=await Vs(h,s,y,d);if(console.log("[search url]",x),!x)throw new Error("无法获取有效的搜索链接!");Fm(x,{active:!s.openInBackground})}catch(d){console.error(d),ue({title:"搜索失败",text:d.toString(),icon:"error"})}}});n.push(r)}return n}async function qa(e,t){if(console.log("[playDirOnAnxia]",e,t),!t)try{ue({title:"正在查找可播放的文件...",text:"请稍等...",icon:"info"}),fe.showLoading(),t=await Aw(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=rd(t.pickCode);window.open(n,"_blank","noopener noreferrer")}async function tb(e,t){const n=[],o=await ni(),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===ln.alt&&_.altKey||i===ln.ctrl&&_.ctrlKey||i===ln.shift&&_.shiftKey||i===ln.meta&&_.metaKey)&&(d={names:[Va.manual],position:o.injectManualFuncPosition})}const p=$(c.target).closest("li"),h=await _n(p),y=await Pi(),x=await Vs(h,s,y,d);if(h.isDir&&x.includes("v.anxia.com")){qa(h.id);return}if(console.log("[play url]",x),!x)throw new Error("无法获取有效的播放链接!");window.open(x,"_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 za(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 nb(e){return async(t,n)=>{const o=await Vt(),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}const{value:a}=await fe.fire({title:"文件移动到同名目录",text:e?`当前已选中${r.length}个文件,是否继续?`:`当前目录共有${r.length}个文件,是否继续?`,icon:"warning",showCancelButton:!0,confirmButtonText:"继续",cancelButtonText:"取消"});if(!!a){fe.fire({title:"文件移动到同名目录",html:"正在处理...",didOpen:()=>{fe.showLoading()}});for(let c=0;c<r.length;c++){const d=r[c],p=await Zo($(d));if(!p.fid)continue;const h=p.n,y=h.replace(/\.[^\.]+$/,""),x=`${c+1} / ${r.length} - `+Math.round(c/r.length*100)+"%";fe.update({html:`${x} 正在为文件「${h}」创建目录「${y}」`});const _=await Zu(o,y);fe.update({html:`${x} 正在移动文件「${h}」到目录「${y}」`}),await Ew(_.cid,[p.fid]),await kt(500)}fe.hideLoading(),fe.update({html:"处理完成",icon:"success"})}}}function ob(e,t){const n=[];for(let o=t?1:0;o<e.length;o++)n.push(e[o].file_name);return n}async function dd(e,t){const n=await Jw(e),o=[];for(let i=0;i<e.length;i++){const s=n.get(e[i].parentId);if(!s)throw new Error(`无法获取文件 "${e[i].name}" 的上级目录路径!`);const r=ob(s,!0),a=js([...r,e[i].name],yo.unix);o.push(await za(e[i],a,t))}return o}async function fd(e){try{const n=+(await go(e.id)).folder_count+1;ue({text:`正在获取文件列表数据... 目录数量: ${n}。请保持当前页面在当前浏览器窗口处于激活状态,不要做其他网盘操作。`,timer:0}),fe.showLoading();const o=await Qu(Ii({cid:e.id,limit:1150}),3e3);console.log("[tree]",o);const i=`115-dir_list_data-${e.id}-${ld(e.name)}.json`;ua(JSON.stringify(o),i),ue({text:`获取文件列表数据成功,已保存为 ${i}`,timer:0,icon:"success",showConfirmButton:!0})}catch(t){console.error(t),ue({text:`获取文件列表数据失败: ${t}`,timer:0,icon:"error",showCloseButton:!0})}finally{fe.hideLoading()}}function pd(e){const t=e.target;e.key==="a"&&(e.ctrlKey||e.metaKey)&&t.select()}function hd(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement}function ib(e){e.addEventListener("keydown",t=>{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 sb(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 Va=(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))(Va||{});const rb=[{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 ab(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],x=h.replace(/[{}]/g,"").replace(/^[^:]+:/,"");let _=((d=e[s[y]])==null?void 0:d.toString())||"",S="";switch(p.includes(y)&&(S=await Ua(e)),y){case"pure_name":r?_=e.name.replace(/\.[^.]+$/,""):_=e.name;break;case"file_path":_=S;break;case"file_dir":_=S.replace(/\/[^/]+$/,"");break;case"clouddrive_stream_url":r?_=await Wo(n,S,Ps.download):_=await pa(n,S);break;case"clouddrive_down_url":_=await Wo(n,S,Ps.download);break;case"clouddrive_playlist_url":let T="";r?T=S.replace(/\/[^/]+$/,""):T=S,_=await pa(n,T);break;case"user_agent":_=navigator.userAgent;break}if(_=_.toString(),x){let T=x.split(":");o&&(T=ab(T,o,!1)),console.log(`[buildCustomUrl] functions: ${x}, after merge: ${T.join(":")}`);for(const B of T)switch(B){case"search":_=ja({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=>{ib(H),sb(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 lb(i,e,t,n):i}async function lb(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 ti(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 ln=(e=>(e.none="none",e.alt="alt",e.ctrl="ctrl",e.shift="shift",e.meta="meta",e))(ln||{});const yd="ce_menu_config";function cb(e){return{enabled:!0,openInNewTab:!0,search:!0,play:!0,getDownloadUrl:!0,copyNames:!0,exportList:!1,...e}}function ub(e){return{enabled:!0,copyNames:!0,...e}}function db(e){return{enabled:!0,moveToSelfNameDir:!0,copyNames:!0,play:!0,...e}}function fb(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 pb(e){return{enabled:!0,hideSelectionMenuLabel:!1,enableInSearch:!0,manageOfficialMenus:!1,keyToTriggerManual:"none",injectManualFuncPosition:"first",m3u8TempDir:".ce-m3u8-temp",[Me.listItemHover]:cb(e==null?void 0:e[Me.listItemHover]),[Me.listItemContext]:ub(e==null?void 0:e[Me.listItemContext]),[Me.selection]:db(e==null?void 0:e[Me.selection]),[Me.dirContext]:fb(e==null?void 0:e[Me.dirContext]),...e}}async function ni(){const e=pb(),t=await Ze.get(yd,e);return{...e,...t}}async function hb(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:`<li id="{key}" class="ce-menu dir-context-menu">
        <a href="javascript:;">{icon}<span>{label}</span></a>
      </li>`,bodyForMulti:`<li id="{key}" class="ce-menu ce-menu-parent dir-context-menu">
        {icon}<span class="ce-menu-trigger">{label}</span>
        <div class="ce-menu-dropdown sub-items"></div>
        </span>`,divider:'<li class="ce-menu-divider"></li>'},[Me.dirContextSub]:{body:`<span id="{key}" class="ce-menu dir-context-menu-sub sub-item">
        {icon}<span>{label}</span>
      </span>`,divider:'<span class="ce-menu-divider"></span>'},[Me.listItemContext]:{body:`<li id="{key}" class="ce-menu list-item-context-menu">
        <a href="javascript:;">{icon}<span>{label}</span></a>
      </li>`,bodyForMulti:`<li id="{key}" class="ce-menu ce-menu-parent list-item-context-menu">
        {icon}<span class="ce-menu-trigger">{label}</span>
        <div class="ce-menu-dropdown sub-items"></div>
        </span>`,divider:'<li class="ce-menu-divider"></li>'},[Me.listItemContextSub]:{body:'<span id="{key}" class="ce-menu list-item-context-menu-sub sub-item">{label}</span>',divider:'<span class="ce-menu-divider"></span>'},[Me.listItemHover]:{body:`<a href="javascript:;" id="{key}" class="ce-menu list-item-hover-menu" style="">
        {icon}<span>{label}</span>
      </a>`,bodyForMulti:`<span class="ce-menu ce-menu-parent list-item-hover-menu">
        {icon}<span class="ce-menu-trigger">{label}</span>
        <div class="ce-menu-dropdown sub-items"></div>
        </span>`,divider:'<a class="ce-menu-divider"></a>'},[Me.listItemHoverSub]:{body:`<a href="javascript:;" id="{key}" class="ce-menu list-item-hover-menu-sub" style="">
        {icon}<span>{label}</span>
      </a>`,divider:'<a class="ce-menu-divider"></a>'},[Me.selection]:{body:'<li id="{key}" class="ce-menu selection-menu">{icon}<span>{label}</span></li>',bodyForMulti:`<li class="ce-menu ce-menu-parent selection-menu">
        {icon}<span class="ce-menu-trigger">{label}</span>
        <div class="ce-menu-dropdown sub-items"></div>
        </li>`,divider:'<li class="ce-menu-divider"></li>'},[Me.selectionSub]:{body:`<a href="javascript:;" id="{key}" class="ce-menu selection-menu-sub" style="">
        {icon}<span>{label}</span>
      </a>`,divider:'<a class="ce-menu-divider"></a>'}});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=`<img class="ce-menu-icon" src="${this.icon}" />`:this.icon.match(/^data-text:/)?i=`<i class="ce-menu-icon">${this.icon.replace(/^data-text:/,"")}</i>`:i=`<i class="ce-menu-icon ${this.icon}"></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 Kt=vc;Ie(Kt,"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 Kt{constructor(n){super(n);Ie(this,"menuType",Me.dirContext);this.onMouseOver=Ks,this.onMouseOut=Ws}}class mb extends Kt{constructor(){super(...arguments);Ie(this,"menuType",Me.dirContextSub)}}class Ka extends Kt{constructor(n){super(n);Ie(this,"menuType",Me.listItemContext);this.onMouseOver=Ks,this.onMouseOut=Ws}}class Gs extends Kt{constructor(n){super(n);Ie(this,"menuType",Me.listItemHover);this.onMouseOver=Ks,this.onMouseOut=Ws}}class Bi extends Kt{constructor(){super(...arguments);Ie(this,"menuType",Me.listItemHoverSub)}}class Wa extends Kt{constructor(n){super(n);Ie(this,"menuType",Me.selection);this.onMouseOver=Ks,this.onMouseOut=Ws}}class Js extends Kt{constructor(){super(...arguments);Ie(this,"menuType",Me.selectionSub)}}class Ys extends Kt{constructor(){super(...arguments);Ie(this,"isDivider",!0)}}class gb extends Ys{}class yb 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 fo(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===ho.after&&(o=o.reverse());for(let i=0;i<o.length;i++){const s=o[i];if(!await this.shouldInjectMenuItem(t,s))continue;const r=await s.render();this.position===ho.before?n.insertAdjacentElement("beforebegin",r):n.insertAdjacentElement("afterend",r),await s.decorateContainer(t)}}async isFileContainer(t){return!!t.getAttribute("file_id")}async isDirContainer(t){return!!t.getAttribute("cate_id")}async inject(){if(!!this.menuType)if(this.useObserver)await this.observe();else{const t=await this.getObserveTarget();if(!t)return;await this.injectToContainer(t)}}}class wb extends Qs{constructor(){super(...arguments);Ie(this,"menuType",Me.dirContext);Ie(this,"useObserver",!0);Ie(this,"observeTarget",document.body);Ie(this,"disposeObserverAfterInjection",!0)}}class bb extends Qs{constructor(){super(...arguments);Ie(this,"menuType",Me.listItemContext)}}class _b extends Qs{constructor(n){super(n);Ie(this,"menuType",Me.listItemHover);Ie(this,"useObserver",!0);Ie(this,"observeTarget","#js_data_list");Ie(this,"disposeObserverAfterInjection",!1);this.handleLoadAll()}async inject(){const n=document.querySelector("#js_data_list");if(n){const o=n.querySelectorAll(".list-contents > 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 Si(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 ni();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 vb 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 Ga(e,t){return!!$(t).closest("li").attr("cate_id")}async function xb(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?Jm(o)||Qm(o)||Ym(o):!1}function qn(e,t){const n=Object.create(null),o=e.split(",");for(let i=0;i<o.length;i++)n[o[i]]=!0;return t?i=>!!n[i.toLowerCase()]:i=>!!n[i]}function xn(e){if(xe(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=Qe(o)?Eb(o):xn(o);if(i)for(const s in i)t[s]=i[s]}return t}else{if(Qe(e))return e;if(Ve(e))return e}}const Cb=/;(?![^(]*\))/g,$b=/:([^]+)/,kb=/\/\*.*?\*\//gs;function Eb(e){const t={};return e.replace(kb,"").split(Cb).forEach(n=>{if(n){const o=n.split($b);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;n<e.length;n++){const o=Ye(e[n]);o&&(t+=o+" ")}else if(Ve(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Sb(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Qe(t)&&(e.class=Ye(t)),n&&(e.style=xn(n)),e}const Ab="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",Pb="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Ib=qn(Ab),Tb=qn(Pb),Ob=qn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function _d(e){return!!e||e===""}function Lb(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=Di(e[o],t[o]);return n}function Di(e,t){if(e===t)return!0;let n=Cd(e),o=Cd(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=Fi(e),o=Fi(t),n||o)return e===t;if(n=xe(e),o=xe(t),n||o)return n&&o?Lb(e,t):!1;if(n=Ve(e),o=Ve(t),n||o){if(!n||!o)return!1;const i=Object.keys(e).length,s=Object.keys(t).length;if(i!==s)return!1;for(const r in e){const a=e.hasOwnProperty(r),c=t.hasOwnProperty(r);if(a&&!c||!a&&c||!Di(e[r],t[r]))return!1}}return String(e)===String(t)}function Ja(e,t){return e.findIndex(n=>Di(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),{})}:ii(t)?{[`Set(${t.size})`]:[...t.values()]}:Ve(t)&&!xe(t)&&!kd(t)?String(t):t,Ke=Object.freeze({}),oi=Object.freeze([]),It=()=>{},xd=()=>!1,Mb=/^on[^a-z]/,Ri=e=>Mb.test(e),Xs=e=>e.startsWith("onUpdate:"),it=Object.assign,Ya=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Nb=Object.prototype.hasOwnProperty,Re=(e,t)=>Nb.call(e,t),xe=Array.isArray,_o=e=>ji(e)==="[object Map]",ii=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),Qa=e=>ji(e).slice(8,-1),kd=e=>ji(e)==="[object Object]",Xa=e=>Qe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,er=qn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Bb=qn("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))},Db=/-(\w)/g,cn=tr(e=>e.replace(Db,(t,n)=>n?n.toUpperCase():"")),Rb=/\B([A-Z])/g,Cn=tr(e=>e.replace(Rb,"-$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),si=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},nr=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},or=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Fb=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 Za(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let en;class jb{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 Za("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<o;n++)this.effects[n].stop();for(n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.scopes)for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function Ub(e,t=en){t&&t.active&&t.effects.push(e)}function Hb(){return en}const el=e=>{const t=new Set(e);return t.w=0,t.n=0,t},Ad=e=>(e.w&zn)>0,Pd=e=>(e.n&zn)>0,qb=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=zn},zb=e=>{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o<t.length;o++){const i=t[o];Ad(i)&&!Pd(i)?i.delete(e):t[n++]=i,i.w&=~zn,i.n&=~zn}t.length=n}},ir=new WeakMap;let Hi=0,zn=1;const tl=30;let wt;const Co=Symbol("iterate"),nl=Symbol("Map key iterate");class ol{constructor(t,n=null,o){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,Ub(this,o)}run(){if(!this.active)return this.fn();let t=wt,n=Vn;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=wt,wt=this,Vn=!0,zn=1<<++Hi,Hi<=tl?qb(this):Id(this),this.fn()}finally{Hi<=tl&&zb(this),zn=1<<--Hi,wt=this.parent,Vn=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){wt===this?this.deferStop=!0:this.active&&(Id(this),this.onStop&&this.onStop(),this.active=!1)}}function Id(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let Vn=!0;const Td=[];function $o(){Td.push(Vn),Vn=!1}function ko(){const e=Td.pop();Vn=e===void 0?!0:e}function Tt(e,t,n){if(Vn&&wt){let o=ir.get(e);o||ir.set(e,o=new Map);let i=o.get(n);i||o.set(n,i=el()),Od(i,{effect:wt,target:e,type:t,key:n})}}function Od(e,t){let n=!1;Hi<=tl?Pd(e)||(e.n|=zn,n=!Ad(e)):n=!e.has(wt),n&&(e.add(wt),wt.deps.push(e),wt.onTrack&&wt.onTrack(Object.assign({effect:wt},t)))}function $n(e,t,n,o,i,s){const r=ir.get(e);if(!r)return;let a=[];if(t==="clear")a=[...r.values()];else if(n==="length"&&xe(e)){const d=Number(o);r.forEach((p,h)=>{(h==="length"||h>=d)&&a.push(p)})}else switch(n!==void 0&&a.push(r.get(n)),t){case"add":xe(e)?Xa(n)&&a.push(r.get("length")):(a.push(r.get(Co)),_o(e)&&a.push(r.get(nl)));break;case"delete":xe(e)||(a.push(r.get(Co)),_o(e)&&a.push(r.get(nl)));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]&&il(a[0],c);else{const d=[];for(const p of a)p&&d.push(...p);il(el(d),c)}}function il(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 Vb(e,t){var n;return(n=ir.get(e))===null||n===void 0?void 0:n.get(t)}const Kb=qn("__proto__,__v_isRef,__isVue"),Md=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Fi)),Wb=sr(),Gb=sr(!1,!0),Jb=sr(!0),Yb=sr(!0,!0),Nd=Qb();function Qb(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const o=Ne(this);for(let s=0,r=this.length;s<r;s++)Tt(o,"get",s+"");const i=o[t](...n);return i===-1||i===!1?o[t](...n.map(Ne)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){$o();const o=Ne(this)[t].apply(this,n);return ko(),o}}),e}function Xb(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 Xb}const a=Reflect.get(o,i,s);return(Fi(i)?Md.has(i):Kb(i))||(e||Tt(o,"get",i),t)?a:st(a)?r&&Xa(i)?a:a.value:Ve(a)?e?Gd(a):pr(a):a}}const Zb=Bd(),e_=Bd(!0);function Bd(e=!1){return function(n,o,i,s){let r=n[o];if(Wn(r)&&st(r)&&!st(i))return!1;if(!e&&(!mr(i)&&!Wn(i)&&(r=Ne(r),i=Ne(i)),!xe(n)&&st(r)&&!st(i)))return r.value=i,!0;const a=xe(n)&&Xa(o)?Number(o)<n.length:Re(n,o),c=Reflect.set(n,o,i,s);return n===Ne(s)&&(a?Ui(i,r)&&$n(n,"set",o,i,r):$n(n,"add",o,i)),c}}function t_(e,t){const n=Re(e,t),o=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&$n(e,"delete",t,void 0,o),i}function n_(e,t){const n=Reflect.has(e,t);return(!Fi(t)||!Md.has(t))&&Tt(e,"has",t),n}function o_(e){return Tt(e,"iterate",xe(e)?"length":Co),Reflect.ownKeys(e)}const Dd={get:Wb,set:Zb,deleteProperty:t_,has:n_,ownKeys:o_},Rd={get:Jb,set(e,t){return Za(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return Za(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},i_=it({},Dd,{get:Gb,set:e_}),s_=it({},Rd,{get:Yb}),sl=e=>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?sl:n?rl: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?sl:e?rl: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?sl:t?rl:qi;return!t&&Tt(s,"iterate",c?nl: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 Kn(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 r_(){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:Kn("add"),set:Kn("set"),delete:Kn("delete"),clear:Kn("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:Kn("add"),set:Kn("set"),delete:Kn("delete"),clear:Kn("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[a_,l_,c_,u_]=r_();function fr(e,t){const n=t?e?u_:c_:e?l_:a_;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 d_={get:fr(!1,!1)},f_={get:fr(!1,!0)},p_={get:fr(!0,!1)},h_={get:fr(!0,!0)};function qd(e,t,n){const o=Ne(n);if(o!==n&&t.call(e,o)){const i=Qa(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 m_(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function g_(e){return e.__v_skip||!Object.isExtensible(e)?0:m_(Qa(e))}function pr(e){return Wn(e)?e:hr(e,!1,Dd,d_,zd)}function y_(e){return hr(e,!1,i_,f_,Vd)}function Gd(e){return hr(e,!0,Rd,p_,Kd)}function ri(e){return hr(e,!0,s_,h_,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=g_(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 Wn(e)?Eo(e.__v_raw):!!(e&&e.__v_isReactive)}function Wn(e){return!!(e&&e.__v_isReadonly)}function mr(e){return!!(e&&e.__v_isShallow)}function gr(e){return Eo(e)||Wn(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,rl=e=>Ve(e)?Gd(e):e;function Yd(e){Vn&&wt&&(e=Ne(e),Od(e.dep||(e.dep=el()),{target:e,type:"get",key:"value"}))}function Qd(e,t){e=Ne(e);const n=e.dep;n&&il(n,{target:e,type:"set",key:"value",newValue:t})}function st(e){return!!(e&&e.__v_isRef===!0)}function he(e){return w_(e,!1)}function w_(e,t){return st(e)?e:new b_(e,t)}class b_{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)||Wn(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 __={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,__)}function v_(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]=C_(e,n);return t}class x_{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 Vb(Ne(this._object),this._key)}}function C_(e,t,n){const o=e[t];return st(o)?o:new x_(e,t,n)}var Zd;class $_{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 ol(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 k_(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 $_(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=E_();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(`
`,...S_(i)),console.warn(...s)}ko()}function E_(){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 S_(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
`],...A_(n))}),t}function A_({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,...P_(e.props),s]:[i+s]}function P_(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 I_(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 al={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<e.length;s++)i.push(tn(e[s],t,n,o));return i}function Ki(e,t,n,o=!0){const i=t?t.vnode:null;if(t){let s=t.parent;const r=t.proxy,a=al[n];for(;s;){const d=s.ec;if(d){for(let p=0;p<d.length;p++)if(d[p](e,r,a)===!1)return}s=s.parent}const c=t.appContext.config.errorHandler;if(c){kn(c,null,10,[e,r,a]);return}}T_(e,n,i,o)}function T_(e,t,n,o=!0){{const i=al[t];if(n&&zi(n),re(`Unhandled error${i?` during execution of ${i}`:""}`),n&&Vi(),o)throw e;console.error(e)}}let Wi=!1,ll=!1;const mt=[];let un=0;const ai=[];let dn=null,Gn=0;const tf=Promise.resolve();let cl=null;const O_=100;function Gi(e){const t=cl||tf;return e?t.then(this?e.bind(this):e):t}function L_(e){let t=un+1,n=mt.length;for(;t<n;){const o=t+n>>>1;Ji(mt[o])<e?t=o+1:n=o}return t}function yr(e){(!mt.length||!mt.includes(e,Wi&&e.allowRecurse?un+1:un))&&(e.id==null?mt.push(e):mt.splice(L_(e.id),0,e),nf())}function nf(){!Wi&&!ll&&(ll=!0,cl=tf.then(rf))}function M_(e){const t=mt.indexOf(e);t>un&&mt.splice(t,1)}function ul(e){xe(e)?ai.push(...e):(!dn||!dn.includes(e,e.allowRecurse?Gn+1:Gn))&&ai.push(e),nf()}function of(e,t=Wi?un+1:0){for(e=e||new Map;t<mt.length;t++){const n=mt[t];if(n&&n.pre){if(dl(e,n))continue;mt.splice(t,1),t--,n()}}}function sf(e){if(ai.length){const t=[...new Set(ai)];if(ai.length=0,dn){dn.push(...t);return}for(dn=t,e=e||new Map,dn.sort((n,o)=>Ji(n)-Ji(o)),Gn=0;Gn<dn.length;Gn++)dl(e,dn[Gn])||dn[Gn]();dn=null,Gn=0}}const Ji=e=>e.id==null?1/0:e.id,N_=(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){ll=!1,Wi=!0,e=e||new Map,mt.sort(N_);const t=n=>dl(e,n);try{for(un=0;un<mt.length;un++){const n=mt[un];if(n&&n.active!==!1){if(t(n))continue;kn(n,null,14)}}}finally{un=0,mt.length=0,sf(e),Wi=!1,cl=null,(mt.length||ai.length)&&rf(e)}}function dl(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>O_){const o=t.ownerInstance,i=o&&Bl(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 li=new Set;Sd().__VUE_HMR_RUNTIME__={createRecord:fl(af),rerender:fl(R_),reload:fl(F_)};const Po=new Map;function B_(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 D_(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 R_(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 F_(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);li.has(s)||(s!==n.initialDef&&lf(s,t),li.add(s)),i.appContext.optionsCache.delete(i.type),i.ceReload?(li.add(s),i.ceReload(t.styles),li.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.")}ul(()=>{for(const i of o)li.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 fl(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 fn,Qi=[],pl=!1;function Xi(e,...t){fn?fn.emit(e,...t):pl||Qi.push({event:e,args:t})}function cf(e,t){var n,o;fn=e,fn?(fn.enabled=!0,Qi.forEach(({event:i,args:s})=>fn.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(()=>{fn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,pl=!0,Qi=[])},3e3)):(pl=!0,Qi=[])}function j_(e,t){Xi("app:init",e,t,{Fragment:De,Text:ss,Comment:_t,Static:rs})}function U_(e){Xi("app:unmount",e)}const H_=hl("component:added"),uf=hl("component:updated"),q_=hl("component:removed"),z_=e=>{fn&&typeof fn.cleanupBuffer=="function"&&!fn.cleanupBuffer(e)&&q_(e)};function hl(e){return t=>{Xi(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const V_=df("perf:start"),K_=df("perf:end");function df(e){return(t,n,o)=>{Xi(e,t.appContext.app,t.uid,t,n,o)}}function W_(e,t,n){Xi("component:emit",e.appContext.app,e,t,n)}function G_(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(x=>Qe(x)?x.trim():x)),h&&(i=n.map(or))}W_(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(cn(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 J_(e){br=e}function Y_(){br=null}const Q_=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 ml=!1;function vr(){ml=!0}function gl(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:x,ctx:_,inheritAttrs:S}=e;let T,B;const P=_r(e);ml=!1;try{if(n.shapeFlag&4){const ie=i||o;T=Jt(p.call(ie,ie,h,s,x,y,_)),B=c}else{const ie=t;c===s&&vr(),T=Jt(ie.length>1?ie(s,{get attrs(){return vr(),c},slots:a,emit:d}):ie(s,null)),B=t.props?c:Z_(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]=X_(T)),B&&S!==!1){const ie=Object.keys(B),{shapeFlag:j}=I;if(ie.length){if(j&7)r&&ie.some(Xs)&&(B=ev(B,r)),I=Qn(I,B);else if(!ml&&I.type!==_t){const ne=Object.keys(c),ae=[],pe=[];for(let Ae=0,ge=ne.length;Ae<ge;Ae++){const O=ne[Ae];Ri(O)?Xs(O)||ae.push(O[2].toLowerCase()+O.slice(3)):pe.push(O)}pe.length&&re(`Extraneous non-props attributes (${pe.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),ae.length&&re(`Extraneous non-emits event listeners (${ae.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(pf(I)||re("Runtime directive used on component with non-element root node. The directives will not function as intended."),I=Qn(I),I.dirs=I.dirs?I.dirs.concat(n.dirs):n.dirs),n.transition&&(pf(I)||re("Component inside <Transition> renders non-element root node that cannot be animated."),I.transition=n.transition),H?H(I):T=I,_r(P),T}const X_=e=>{const t=e.children,n=e.dynamicChildren,o=yl(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[Jt(o),r]};function yl(e){let t;for(let n=0;n<e.length;n++){const o=e[n];if(di(o)){if(o.type!==_t||o.children==="v-if"){if(t)return;t=o}}else return}return t}const Z_=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ri(n))&&((t||(t={}))[n]=e[n]);return t},ev=(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 tv(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;h<p.length;h++){const y=p[h];if(r[y]!==o[y]&&!wr(d,y))return!0}}}else return(i||a)&&(!a||!a.$stable)?!0:o===r?!1:o?r?hf(o,r,d):!0:!!r;return!1}function hf(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i<o.length;i++){const s=o[i];if(t[s]!==e[s]&&!wr(n,s))return!0}return!1}function wl({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const nv=e=>e.__isSuspense,mf={name:"Suspense",__isSuspense:!0,process(e,t,n,o,i,s,r,a,c,d){e==null?ov(t,n,o,i,s,r,a,c,d):iv(e,t,n,o,i,r,a,c,d)},hydrate:sv,create:bl,normalize:rv};function Zi(e,t){const n=e.props&&e.props[t];Te(n)&&n()}function ov(e,t,n,o,i,s,r,a,c){const{p:d,o:{createElement:p}}=c,h=p("div"),y=e.suspense=bl(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),ci(y,e.ssFallback)):y.resolve()}function iv(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,x=t.ssFallback,{activeBranch:_,pendingBranch:S,isInFallback:T,isHydrating:B}=h;if(S)h.pendingBranch=y,Yn(y,S)?(c(S,y,h.hiddenContainer,null,i,h,s,r,a),h.deps<=0?h.resolve():T&&(c(_,x,n,o,i,null,s,r,a),ci(h,x))):(h.pendingId++,B?(h.isHydrating=!1,h.activeBranch=S):d(S,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(_,x,n,o,i,null,s,r,a),ci(h,x))):_&&Yn(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(_&&Yn(y,_))c(_,y,n,o,i,h,s,r,a),ci(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(x)},P):P===0&&h.fallback(x)}}let gf=!1;function bl(e,t,n,o,i,s,r,a,c,d,p=!1){gf||(gf=!0,console[console.info?"info":"log"]("<Suspense> is an experimental feature and its API will likely change."));const{p:h,m:y,um:x,n:_,o:{parentNode:S,remove:T}}=d,B=e.props?Fb(e.props.timeout):void 0;I_(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),x(ie,pe,P,!0)),se||y(j,Ae,Y,0)}ci(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||ul(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),ci(P,I))},ge=I.transition&&I.transition.mode==="out-in";ge&&(ie.transition.afterLeave=Ae),P.isInFallback=!0,x(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),Ml(I,ne,!1),j&&(ae.el=j);const pe=!j&&I.subTree.el;H(I,ae,S(j||I.subTree.el),j?null:_(I.subTree),P,r,c),pe&&T(pe),wl(I,ae.el),Vi(),ie&&--P.deps===0&&P.resolve()})},unmount(I,H){P.isUnmounted=!0,P.activeBranch&&x(P.activeBranch,n,I,H),P.pendingBranch&&x(P.pendingBranch,n,I,H)}};return P}function sv(e,t,n,o,i,s,r,a,c){const d=t.suspense=bl(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 rv(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=ui&&e._c;n&&(e._d=!1,W()),e=e(),n&&(e._d=!0,t=Wt,Uf())}if(xe(e)){const n=yl(e);n||re("<Suspense> slots expect a single root node."),e=n}return e=Jt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function av(e,t){t&&t.pendingBranch?xe(e)?t.effects.push(...e):t.effects.push(e):ul(e)}function ci(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e,i=n.el=t.el;o&&o.subTree===n&&(o.vnode.el=i,wl(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=Hb()===(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,[x])}:(d=It,a(e)),t&&o){const H=d;d=()=>Io(H())}let y,x=H=>{y=P.onStop=()=>{kn(H,c,4)}},_;if(ls)if(x=It,t?n&&tn(t,c,3,[d(),h?[]:void 0,x]):d(),i==="sync"){const H=u0();_=H.__watcherHandles||(H.__watcherHandles=[])}else return It;let S=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,S[j])):Ui(H,S)))&&(y&&y(),tn(t,c,3,[H,S===xr?void 0:h&&S[0]===xr?[]:S,x]),S=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 ol(d,B);P.onTrack=s,P.onTrigger=r,t?n?T():S=P.run():i==="post"?Lt(P.run.bind(P),c&&c.suspense):P.run();const I=()=>{P.stop(),c&&c.scope&&Ya(c.scope.effects,P)};return _&&_.push(I),I}function lv(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;Zn(this);const a=wf(i,s.bind(o),n);return r?Zn(r):eo(),a}function bf(e,t){const n=t.split(".");return()=>{let o=e;for(let i=0;i<n.length&&o;i++)o=o[n[i]];return o}}function Io(e,t){if(!Ve(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),st(e))Io(e.value,t);else if(xe(e))for(let n=0;n<e.length;n++)Io(e[n],t);else if(ii(e)||_o(e))e.forEach(n=>{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,_l=e=>e.type.__isKeepAlive;function cv(e,t){_f(e,"a",t)}function uv(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;)_l(i.parent.vnode)&&dv(o,t,n,i),i=i.parent}}function dv(e,t,n,o){const i=Cr(t,e,o,!0);os(()=>{Ya(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(),Zn(n);const a=tn(t,n,e,r);return eo(),ko(),a});return o?i.unshift(s):i.push(s),s}else{const i=xo(al[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"),fv=En("bu"),pv=En("u"),vf=En("bum"),os=En("um"),hv=En("sp"),mv=En("rtg"),gv=En("rtc");function yv(e,t=et){Cr("ec",e,t)}function xf(e){Bb(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;s<t.length;s++){let[r,a,c,d=Ke]=t[s];r&&(Te(r)&&(r={mounted:r,updated:r}),r.deep&&Io(a),i.push({dir:r,instance:o,value:a,oldValue:void 0,arg:c,modifiers:d}))}return e}function To(e,t,n,o){const i=e.dirs,s=t&&t.dirs;for(let r=0;r<i.length;r++){const a=i[r];s&&(a.oldValue=s[r].value);let c=a.dir[o];c&&($o(),tn(c,n,8,[e.el,a,e,t]),ko())}}const vl="components";function Oo(e,t){return bv(vl,e,!0,t)||e}const wv=Symbol();function bv(e,t,n=!0,o=!1){const i=lt||et;if(i){const s=i.type;if(e===vl){const a=Bl(s,!1);if(a&&(a===t||a===cn(t)||a===vo(cn(t))))return s}const r=Cf(i[e]||s[e],t)||Cf(i.appContext[e],t);if(!r&&o)return s;if(n&&!r){const a=e===vl?`
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`:"";re(`Failed to resolve ${e.slice(0,-1)}: ${t}${a}`)}return r}else re(`resolve${vo(e.slice(0,-1))} can only be used in render() or setup().`)}function Cf(e,t){return e&&(e[t]||e[cn(t)]||e[vo(cn(t))])}function nt(e,t,n,o){let i;const s=n&&n[o];if(xe(e)||Qe(e)){i=new Array(e.length);for(let r=0,a=e.length;r<a;r++)i[r]=t(e[r],r,void 0,s&&s[r])}else if(typeof e=="number"){Number.isInteger(e)||re(`The v-for range expect an integer value but got ${e}.`),i=new Array(e);for(let r=0;r<e;r++)i[r]=t(r+1,r,void 0,s&&s[r])}else if(Ve(e))if(e[Symbol.iterator])i=Array.from(e,(r,a)=>t(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;a<c;a++){const d=r[a];i[a]=t(e[d],d,a,s&&s[a])}}else i=[];return n&&(n[o]=i),i}function Sn(e,t,n={},o,i){if(lt.isCE||lt.parent&&ns(lt.parent)&&lt.parent.isCE)return t!=="default"&&(n.name=t),Ce("slot",n,o&&o());let s=e[t];s&&s.length>1&&(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=Gt(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=>di(t)?!(t.type===_t||t.type===De&&!$f(t.children)):!0)?e:null}const xl=e=>e?Gf(e)?Pr(e)||e.proxy:xl(e.parent):null,Lo=it(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>ri(e.props),$attrs:e=>ri(e.attrs),$slots:e=>ri(e.slots),$refs:e=>ri(e.refs),$parent:e=>xl(e.parent),$root:e=>xl(e.root),$emit:e=>e.emit,$options:e=>El(e),$forceUpdate:e=>e.f||(e.f=()=>yr(e.update)),$nextTick:e=>e.n||(e.n=Gi.bind(e.proxy)),$watch:e=>lv.bind(e)}),Cl=e=>e==="_"||e==="$",$l=(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 x=r[t];if(x!==void 0)switch(x){case 1:return o[t];case 2:return i[t];case 4:return n[t];case 3:return s[t]}else{if($l(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];kl&&(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&&Cl(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 $l(i,t)?(i[t]=n,!0):i.__isScriptSetup&&Re(i,t)?(re(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):o!==Ke&&Re(o,t)?(o[t]=n,!0):Re(e.props,t)?(re(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(re(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(t in e.appContext.config.globalProperties?Object.defineProperty(s,t,{enumerable:!0,configurable:!0,value:n}):s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:i,propsOptions:s}},r){let a;return!!n[r]||e!==Ke&&Re(e,r)||$l(t,r)||(a=s[0])&&Re(a,r)||Re(o,r)||Re(Lo,r)||Re(i.config.globalProperties,r)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Re(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};kf.ownKeys=e=>(re("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e));function _v(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(Lo).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>Lo[n](e),set:It})}),t}function vv(e){const{ctx:t,propsOptions:[n]}=e;n&&Object.keys(n).forEach(o=>{Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>e.props[o],set:It})})}function xv(e){const{ctx:t,setupState:n}=e;Object.keys(Ne(n)).forEach(o=>{if(!n.__isScriptSetup){if(Cl(o[0])){re(`setup() return property ${JSON.stringify(o)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>n[o],set:It})}})}function Cv(){const e=Object.create(null);return(t,n)=>{e[n]?re(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let kl=!0;function $v(e){const t=El(e),n=e.proxy,o=e.ctx;kl=!1,t.beforeCreate&&Ef(t.beforeCreate,e,"bc");const{data:i,computed:s,methods:r,watch:a,provide:c,inject:d,created:p,beforeMount:h,mounted:y,beforeUpdate:x,updated:_,activated:S,deactivated:T,beforeDestroy:B,beforeUnmount:P,destroyed:I,unmounted:H,render:ie,renderTracked:j,renderTriggered:ne,errorCaptured:ae,serverPrefetch:pe,expose:Ae,inheritAttrs:ge,components:O,directives:se,filters:Y}=t,ve=Cv();{const[G]=e.propsOptions;if(G)for(const D in G)ve("Props",D)}if(d&&kv(d,o,ve,e.appContext.config.unwrapInjectedRef),r)for(const G in r){const D=r[G];Te(D)?(Object.defineProperty(o,G,{value:D.bind(n),configurable:!0,enumerable:!0,writable:!0}),ve("Methods",G)):re(`Method "${G}" has type "${typeof D}" in the component definition. Did you reference the function correctly?`)}if(i){Te(i)||re("The data option must be a function. Plain object usage is no longer supported.");const G=i.call(n,n);if(Zs(G)&&re("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Ve(G))re("data() should return an object.");else{e.data=pr(G);for(const D in G)ve("Data",D),Cl(D[0])||Object.defineProperty(o,D,{configurable:!0,enumerable:!0,get:()=>G[D],set:It})}}if(kl=!0,s)for(const G in s){const D=s[G],me=Te(D)?D.bind(n,n):Te(D.get)?D.get.bind(n,n):It;me===It&&re(`Computed property "${G}" has no getter.`);const ke=!Te(D)&&Te(D.set)?D.set.bind(n):()=>{re(`Write operation failed: computed property "${G}" is readonly.`)},Le=to({get:me,set:ke});Object.defineProperty(o,G,{enumerable:!0,configurable:!0,get:()=>Le.value,set:Fe=>Le.value=Fe}),ve("Computed",G)}if(a)for(const G in a)Sf(a[G],o,n,G);if(c){const G=Te(c)?c.call(n):c;Reflect.ownKeys(G).forEach(D=>{es(D,G[D])})}p&&Ef(p,e,"c");function M(G,D){xe(D)?D.forEach(me=>G(me.bind(n))):D&&G(D.bind(n))}if(M(Ot,h),M(Ft,y),M(fv,x),M(pv,_),M(cv,S),M(uv,T),M(yv,ae),M(gv,j),M(mv,ne),M(vf,P),M(os,H),M(hv,pe),xe(Ae))if(Ae.length){const G=e.exposed||(e.exposed={});Ae.forEach(D=>{Object.defineProperty(G,D,{get:()=>n[D],set:me=>n[D]=me})})}else e.exposed||(e.exposed={});ie&&e.render===It&&(e.render=ie),ge!=null&&(e.inheritAttrs=ge),O&&(e.components=O),se&&(e.directives=se)}function kv(e,t,n=It,o=!1){xe(e)&&(e=Sl(e));for(const i in e){const s=e[i];let r;Ve(s)?"default"in s?r=ts(s.from||i,s.default,!0):r=ts(s.from||i):r=ts(s),st(r)?o?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:a=>r.value=a}):(re(`injected property "${i}" is a ref and will be auto-unwrapped and no longer needs \`.value\` in the next minor release. To opt-in to the new behavior now, set \`app.config.unwrapInjectedRef = true\` (this config is temporary and will not be needed in the future.)`),t[i]=r):t[i]=r,n("Inject",i)}}function Ef(e,t,n){tn(xe(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function Sf(e,t,n,o){const i=o.includes(".")?bf(n,o):()=>n[o];if(Qe(e)){const s=t[e];Te(s)?ct(i,s):re(`Invalid watch handler specified by key "${e}"`,s)}else if(Te(e))ct(i,e.bind(n));else if(Ve(e))if(xe(e))e.forEach(s=>Sf(s,t,n,o));else{const s=Te(e.handler)?e.handler.bind(n):t[e.handler];Te(s)?ct(i,s,e):re(`Invalid watch handler specified by key "${e.handler}"`,s)}else re(`Invalid watch option: "${o}"`,e)}function El(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:s,config:{optionMergeStrategies:r}}=e.appContext,a=s.get(t);let c;return a?c=a:!i.length&&!n&&!o?c=t:(c={},i.length&&i.forEach(d=>$r(c,d,r,!0)),$r(c,t,r)),Ve(t)&&s.set(t,c),c}function $r(e,t,n,o=!1){const{mixins:i,extends:s}=t;s&&$r(e,s,n,!0),i&&i.forEach(r=>$r(e,r,n,!0));for(const r in t)if(o&&r==="expose")re('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Ev[r]||n&&n[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const Ev={data:Af,props:Mo,emits:Mo,methods:Mo,computed:Mo,beforeCreate:bt,created:bt,beforeMount:bt,mounted:bt,beforeUpdate:bt,updated:bt,beforeDestroy:bt,beforeUnmount:bt,destroyed:bt,unmounted:bt,activated:bt,deactivated:bt,errorCaptured:bt,serverPrefetch:bt,components:Mo,directives:Mo,watch:Av,provide:Af,inject:Sv};function Af(e,t){return t?e?function(){return it(Te(e)?e.call(this,this):e,Te(t)?t.call(this,this):t)}:t:e}function Sv(e,t){return Mo(Sl(e),Sl(t))}function Sl(e){if(xe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function bt(e,t){return e?[...new Set([].concat(e,t))]:t}function Mo(e,t){return e?it(it(Object.create(null),e),t):t}function Av(e,t){if(!e)return t;if(!t)return e;const n=it(Object.create(null),e);for(const o in t)n[o]=bt(e[o],t[o]);return n}function Pv(e,t,n,o=!1){const i={},s={};nr(s,Sr,1),e.propsDefaults=Object.create(null),Pf(e,t,i,s);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);Mf(t||{},i,e),n?e.props=o?i:y_(i):e.type.props?e.props=i:e.props=s,e.attrs=s}function Iv(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function Tv(e,t,n,o){const{props:i,attrs:s,vnode:{patchFlag:r}}=e,a=Ne(i),[c]=e.propsOptions;let d=!1;if(!Iv(e)&&(o||r>0)&&!(r&16)){if(r&8){const p=e.vnode.dynamicProps;for(let h=0;h<p.length;h++){let y=p[h];if(wr(e.emitsOptions,y))continue;const x=t[y];if(c)if(Re(s,y))x!==s[y]&&(s[y]=x,d=!0);else{const _=cn(y);i[_]=Al(c,a,_,x,e,!1)}else x!==s[y]&&(s[y]=x,d=!0)}}}else{Pf(e,t,i,s)&&(d=!0);let p;for(const h in a)(!t||!Re(t,h)&&((p=Cn(h))===h||!Re(t,p)))&&(c?n&&(n[h]!==void 0||n[p]!==void 0)&&(i[h]=Al(c,a,h,void 0,e,!0)):delete i[h]);if(s!==a)for(const h in s)(!t||!Re(t,h)&&!0)&&(delete s[h],d=!0)}d&&$n(e,"set","$attrs"),Mf(t||{},i,e)}function Pf(e,t,n,o){const[i,s]=e.propsOptions;let r=!1,a;if(t)for(let c in t){if(er(c))continue;const d=t[c];let p;i&&Re(i,p=cn(c))?!s||!s.includes(p)?n[p]=d:(a||(a={}))[p]=d:wr(e.emitsOptions,c)||(!(c in o)||d!==o[c])&&(o[c]=d,r=!0)}if(s){const c=Ne(n),d=a||Ke;for(let p=0;p<s.length;p++){const h=s[p];n[h]=Al(i,c,h,d[h],e,!Re(d,h))}}return r}function Al(e,t,n,o,i,s){const r=e[n];if(r!=null){const a=Re(r,"default");if(a&&o===void 0){const c=r.default;if(r.type!==Function&&Te(c)){const{propsDefaults:d}=i;n in d?o=d[n]:(Zn(i),o=d[n]=c.call(null,t),eo())}else o=c}r[0]&&(s&&!a?o=!1:r[1]&&(o===""||o===Cn(n))&&(o=!0))}return o}function If(e,t,n=!1){const o=t.propsCache,i=o.get(e);if(i)return i;const s=e.props,r={},a=[];let c=!1;if(!Te(e)){const p=h=>{c=!0;const[y,x]=If(h,t,!0);it(r,y),x&&a.push(...x)};!n&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!s&&!c)return Ve(e)&&o.set(e,oi),oi;if(xe(s))for(let p=0;p<s.length;p++){Qe(s[p])||re("props must be strings when using array syntax.",s[p]);const h=cn(s[p]);Tf(h)&&(r[h]=Ke)}else if(s){Ve(s)||re("invalid props options",s);for(const p in s){const h=cn(p);if(Tf(h)){const y=s[p],x=r[h]=xe(y)||Te(y)?{type:y}:Object.assign({},y);if(x){const _=Lf(Boolean,x.type),S=Lf(String,x.type);x[0]=_>-1,x[1]=S<0||_<S,(_>-1||Re(x,"default"))&&a.push(h)}}}}const d=[r,a];return Ve(e)&&o.set(e,d),d}function Tf(e){return e[0]!=="$"?!0:(re(`Invalid prop name: "${e}" is a reserved property.`),!1)}function Pl(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Of(e,t){return Pl(e)===Pl(t)}function Lf(e,t){return xe(t)?t.findIndex(n=>Of(n,e)):Te(t)&&Of(t,e)?0:-1}function Mf(e,t,n){const o=Ne(t),i=n.propsOptions[0];for(const s in i){let r=i[s];r!=null&&Ov(s,o[s],r,!Re(e,s)&&!Re(e,Cn(s)))}}function Ov(e,t,n,o){const{type:i,required:s,validator:r}=n;if(s&&o){re('Missing required prop: "'+e+'"');return}if(!(t==null&&!n.required)){if(i!=null&&i!==!0){let a=!1;const c=xe(i)?i:[i],d=[];for(let p=0;p<c.length&&!a;p++){const{valid:h,expectedType:y}=Mv(t,c[p]);d.push(y||""),a=h}if(!a){re(Nv(e,t,d));return}}r&&!r(t)&&re('Invalid prop: custom validator check failed for prop "'+e+'".')}}const Lv=qn("String,Number,Boolean,Function,Symbol,BigInt");function Mv(e,t){let n;const o=Pl(t);if(Lv(o)){const i=typeof e;n=i===o.toLowerCase(),!n&&i==="object"&&(n=e instanceof t)}else o==="Object"?n=Ve(e):o==="Array"?n=xe(e):o==="null"?n=e===null:n=e instanceof t;return{valid:n,expectedType:o}}function Nv(e,t,n){let o=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(vo).join(" | ")}`;const i=n[0],s=Qa(t),r=Nf(t,i),a=Nf(t,s);return n.length===1&&Bf(i)&&!Bv(i,s)&&(o+=` with value ${r}`),o+=`, got ${s} `,Bf(s)&&(o+=`with value ${a}.`),o}function Nf(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function Bf(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function Bv(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Df=e=>e[0]==="_"||e==="$stable",Il=e=>xe(e)?e.map(Jt):[Jt(e)],Dv=(e,t,n)=>{if(t._n)return t;const o=We((...i)=>(et&&re(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),Il(t(...i))),n);return o._c=!1,o},Rf=(e,t,n)=>{const o=e._ctx;for(const i in e){if(Df(i))continue;const s=e[i];if(Te(s))t[i]=Dv(i,s,o);else if(s!=null){re(`Non-function value encountered for slot "${i}". Prefer function slots for better performance.`);const r=Il(s);t[i]=()=>r}}},Ff=(e,t)=>{_l(e.vnode)||re("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=Il(t);e.slots.default=()=>n},Rv=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Ne(t),nr(t,"_",n)):Rf(t,e.slots={})}else e.slots={},t&&Ff(e,t);nr(e.slots,Sr,1)},Fv=(e,t,n)=>{const{vnode:o,slots:i}=e;let s=!0,r=Ke;if(o.shapeFlag&32){const a=t._;a?Ao?it(i,t):n&&a===1?s=!1:(it(i,t),!n&&a===1&&delete i._):(s=!t.$stable,Rf(t,i)),r=t}else t&&(Ff(e,t),r={default:1});if(s)for(const a in i)!Df(a)&&!(a in r)&&delete i[a]};function jf(){return{app:null,config:{isNativeTag:xd,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let jv=0;function Uv(e,t){return function(o,i=null){Te(o)||(o=Object.assign({},o)),i!=null&&!Ve(i)&&(re("root props passed to app.mount() must be an object."),i=null);const s=jf(),r=new Set;let a=!1;const c=s.app={_uid:jv++,_component:o,_props:i,_container:null,_context:s,_instance:null,version:Qf,get config(){return s.config},set config(d){re("app.config cannot be replaced. Modify individual options instead.")},use(d,...p){return r.has(d)?re("Plugin has already been applied to target app."):d&&Te(d.install)?(r.add(d),d.install(c,...p)):Te(d)?(r.add(d),d(c,...p)):re('A plugin must either be a function or an object with an "install" function.'),c},mixin(d){return s.mixins.includes(d)?re("Mixin has already been applied to target app"+(d.name?`: ${d.name}`:"")):s.mixins.push(d),c},component(d,p){return Ll(d,s.config),p?(s.components[d]&&re(`Component "${d}" has already been registered in target app.`),s.components[d]=p,c):s.components[d]},directive(d,p){return xf(d),p?(s.directives[d]&&re(`Directive "${d}" has already been registered in target app.`),s.directives[d]=p,c):s.directives[d]},mount(d,p,h){if(a)re("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{d.__vue_app__&&re("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const y=Ce(o,i);return y.appContext=s,s.reload=()=>{e(Qn(y),d,h)},p&&t?t(y,d):e(y,d,h),a=!0,c._container=d,d.__vue_app__=c,c._instance=y.component,j_(c,Qf),Pr(y.component)||y.component.proxy}},unmount(){a?(e(null,c._container),c._instance=null,U_(c),delete c._container.__vue_app__):re("Cannot unmount an app that is not mounted.")},provide(d,p){return d in s.provides&&re(`App already provides property with key "${String(d)}". It will be overwritten with the new value.`),s.provides[d]=p,c}};return c}}function Tl(e,t,n,o,i=!1){if(xe(e)){e.forEach((y,x)=>Tl(y,t&&(xe(t)?t[x]:t),n,o,i));return}if(ns(o)&&!i)return;const s=o.shapeFlag&4?Pr(o.component)||o.component.proxy:o.el,r=i?null:s,{i:a,r:c}=e;if(!a){re("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const d=t&&t.r,p=a.refs===Ke?a.refs={}:a.refs,h=a.setupState;if(d!=null&&d!==c&&(Qe(d)?(p[d]=null,Re(h,d)&&(h[d]=null)):st(d)&&(d.value=null)),Te(c))kn(c,a,12,[r,p]);else{const y=Qe(c),x=st(c);if(y||x){const _=()=>{if(e.f){const S=y?Re(h,c)?h[c]:p[c]:c.value;i?xe(S)&&Ya(S,s):xe(S)?S.includes(s)||S.push(s):y?(p[c]=[s],Re(h,c)&&(h[c]=p[c])):(c.value=[s],e.k&&(p[e.k]=c.value))}else y?(p[c]=r,Re(h,c)&&(h[c]=r)):x?(c.value=r,e.k&&(p[e.k]=r)):re("Invalid template ref type:",c,`(${typeof c})`)};r?(_.id=-1,Lt(_,n)):_()}else re("Invalid template ref type:",c,`(${typeof c})`)}}let is,Jn;function An(e,t){e.appContext.config.performance&&kr()&&Jn.mark(`vue-${t}-${e.uid}`),V_(e,t,kr()?Jn.now():Date.now())}function Pn(e,t){if(e.appContext.config.performance&&kr()){const n=`vue-${t}-${e.uid}`,o=n+":end";Jn.mark(o),Jn.measure(`<${Ir(e,e.type)}> ${t}`,n,o),Jn.clearMarks(n),Jn.clearMarks(o)}K_(e,t,kr()?Jn.now():Date.now())}function kr(){return is!==void 0||(typeof window<"u"&&window.performance?(is=!0,Jn=window.performance):is=!1),is}function Hv(){const e=[];if(e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.

For more details, see https://link.vuejs.org/feature-flags.`)}}const Lt=av;function qv(e){return zv(e)}function zv(e,t){Hv();const n=Sd();n.__VUE__=!0,cf(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:o,remove:i,patchProp:s,createElement:r,createText:a,createComment:c,setText:d,setElementText:p,parentNode:h,nextSibling:y,setScopeId:x=It,insertStaticContent:_}=e,S=(b,A,R,N=null,z=null,oe=null,le=!1,J=null,Z=Ao?!1:!!A.dynamicChildren)=>{if(b===A)return;b&&!Yn(b,A)&&(N=xt(b),Xe(b,z,oe,!0),b=null),A.patchFlag===-2&&(Z=!1,A.dynamicChildren=null);const{type:Q,ref:we,shapeFlag:U}=A;switch(Q){case ss:T(b,A,R,N);break;case _t:B(b,A,R,N);break;case rs:b==null?P(A,R,N,le):I(b,A,R,le);break;case De:se(b,A,R,N,z,oe,le,J,Z);break;default:U&1?j(b,A,R,N,z,oe,le,J,Z):U&6?Y(b,A,R,N,z,oe,le,J,Z):U&64||U&128?Q.process(b,A,R,N,z,oe,le,J,Z,ot):re("Invalid VNode type:",Q,`(${typeof Q})`)}we!=null&&z&&Tl(we,b&&b.ref,oe,A||b,!A)},T=(b,A,R,N)=>{if(b==null)o(A.el=a(A.children),R,N);else{const z=A.el=b.el;A.children!==b.children&&d(z,A.children)}},B=(b,A,R,N)=>{b==null?o(A.el=c(A.children||""),R,N):A.el=b.el},P=(b,A,R,N)=>{[b.el,b.anchor]=_(b.children,A,R,N,b.el,b.anchor)},I=(b,A,R,N)=>{if(A.children!==b.children){const z=y(b.anchor);ie(b),[A.el,A.anchor]=_(A.children,R,z,N)}else A.el=b.el,A.anchor=b.anchor},H=({el:b,anchor:A},R,N)=>{let z;for(;b&&b!==A;)z=y(b),o(b,R,N),b=z;o(A,R,N)},ie=({el:b,anchor:A})=>{let R;for(;b&&b!==A;)R=y(b),i(b),b=R;i(A)},j=(b,A,R,N,z,oe,le,J,Z)=>{le=le||A.type==="svg",b==null?ne(A,R,N,z,oe,le,J,Z):Ae(b,A,z,oe,le,J,Z)},ne=(b,A,R,N,z,oe,le,J)=>{let Z,Q;const{type:we,props:U,shapeFlag:be,transition:m,dirs:w}=b;if(Z=b.el=r(b.type,oe,U&&U.is,U),be&8?p(Z,b.children):be&16&&pe(b.children,Z,null,N,z,oe&&we!=="foreignObject",le,J),w&&To(b,null,N,"created"),ae(Z,b,b.scopeId,le,N),U){for(const k in U)k!=="value"&&!er(k)&&s(Z,k,null,U[k],oe,b.children,N,z,vt);"value"in U&&s(Z,"value",null,U.value),(Q=U.onVnodeBeforeMount)&&pn(Q,N,b)}Object.defineProperty(Z,"__vnode",{value:b,enumerable:!1}),Object.defineProperty(Z,"__vueParentComponent",{value:N,enumerable:!1}),w&&To(b,null,N,"beforeMount");const C=(!z||z&&!z.pendingBranch)&&m&&!m.persisted;C&&m.beforeEnter(Z),o(Z,A,R),((Q=U&&U.onVnodeMounted)||C||w)&&Lt(()=>{Q&&pn(Q,N,b),C&&m.enter(Z),w&&To(b,null,N,"mounted")},z)},ae=(b,A,R,N,z)=>{if(R&&x(b,R),N)for(let oe=0;oe<N.length;oe++)x(b,N[oe]);if(z){let oe=z.subTree;if(oe.patchFlag>0&&oe.patchFlag&2048&&(oe=yl(oe.children)||oe),A===oe){const le=z.vnode;ae(b,le,le.scopeId,le.slotScopeIds,z.parent)}}},pe=(b,A,R,N,z,oe,le,J,Z=0)=>{for(let Q=Z;Q<b.length;Q++){const we=b[Q]=J?Xn(b[Q]):Jt(b[Q]);S(null,we,A,R,N,z,oe,le,J)}},Ae=(b,A,R,N,z,oe,le)=>{const J=A.el=b.el;let{patchFlag:Z,dynamicChildren:Q,dirs:we}=A;Z|=b.patchFlag&16;const U=b.props||Ke,be=A.props||Ke;let m;R&&No(R,!1),(m=be.onVnodeBeforeUpdate)&&pn(m,R,A,b),we&&To(A,b,R,"beforeUpdate"),R&&No(R,!0),Ao&&(Z=0,le=!1,Q=null);const w=z&&A.type!=="foreignObject";if(Q?(ge(b.dynamicChildren,Q,J,R,N,w,oe),R&&R.type.__hmrId&&Er(b,A)):le||me(b,A,J,null,R,N,w,oe,!1),Z>0){if(Z&16)O(J,A,U,be,R,N,z);else if(Z&2&&U.class!==be.class&&s(J,"class",null,be.class,z),Z&4&&s(J,"style",U.style,be.style,z),Z&8){const C=A.dynamicProps;for(let k=0;k<C.length;k++){const L=C[k],E=U[L],q=be[L];(q!==E||L==="value")&&s(J,L,E,q,z,b.children,R,N,vt)}}Z&1&&b.children!==A.children&&p(J,A.children)}else!le&&Q==null&&O(J,A,U,be,R,N,z);((m=be.onVnodeUpdated)||we)&&Lt(()=>{m&&pn(m,R,A,b),we&&To(A,b,R,"updated")},N)},ge=(b,A,R,N,z,oe,le)=>{for(let J=0;J<A.length;J++){const Z=b[J],Q=A[J],we=Z.el&&(Z.type===De||!Yn(Z,Q)||Z.shapeFlag&70)?h(Z.el):R;S(Z,Q,we,null,N,z,oe,le,!0)}},O=(b,A,R,N,z,oe,le)=>{if(R!==N){if(R!==Ke)for(const J in R)!er(J)&&!(J in N)&&s(b,J,R[J],null,le,A.children,z,oe,vt);for(const J in N){if(er(J))continue;const Z=N[J],Q=R[J];Z!==Q&&J!=="value"&&s(b,J,Q,Z,le,A.children,z,oe,vt)}"value"in N&&s(b,"value",R.value,N.value)}},se=(b,A,R,N,z,oe,le,J,Z)=>{const Q=A.el=b?b.el:a(""),we=A.anchor=b?b.anchor:a("");let{patchFlag:U,dynamicChildren:be,slotScopeIds:m}=A;(Ao||U&2048)&&(U=0,Z=!1,be=null),m&&(J=J?J.concat(m):m),b==null?(o(Q,R,N),o(we,R,N),pe(A.children,R,we,z,oe,le,J,Z)):U>0&&U&64&&be&&b.dynamicChildren?(ge(b.dynamicChildren,be,R,z,oe,le,J),z&&z.type.__hmrId?Er(b,A):(A.key!=null||z&&A===z.subTree)&&Er(b,A,!0)):me(b,A,R,we,z,oe,le,J,Z)},Y=(b,A,R,N,z,oe,le,J,Z)=>{A.slotScopeIds=J,b==null?A.shapeFlag&512?z.ctx.activate(A,R,N,le,Z):ve(A,R,N,z,oe,le,Z):M(b,A,Z)},ve=(b,A,R,N,z,oe,le)=>{const J=b.component=Xv(b,N,z);if(J.type.__hmrId&&B_(J),zi(b),An(J,"mount"),_l(b)&&(J.ctx.renderer=ot),An(J,"init"),t0(J),Pn(J,"init"),J.asyncDep){if(z&&z.registerDep(J,G),!b.el){const Z=J.subTree=Ce(_t);B(null,Z,A,R)}return}G(J,b,A,R,z,oe,le),Vi(),Pn(J,"mount")},M=(b,A,R)=>{const N=A.component=b.component;if(tv(b,A,R))if(N.asyncDep&&!N.asyncResolved){zi(A),D(N,A,R),Vi();return}else N.next=A,M_(N.update),N.update();else A.el=b.el,N.vnode=A},G=(b,A,R,N,z,oe,le)=>{const J=()=>{if(b.isMounted){let{next:we,bu:U,u:be,parent:m,vnode:w}=b,C=we,k;zi(we||b.vnode),No(b,!1),we?(we.el=w.el,D(b,we,le)):we=w,U&&si(U),(k=we.props&&we.props.onVnodeBeforeUpdate)&&pn(k,m,we,w),No(b,!0),An(b,"render");const L=gl(b);Pn(b,"render");const E=b.subTree;b.subTree=L,An(b,"patch"),S(E,L,h(E.el),xt(E),b,z,oe),Pn(b,"patch"),we.el=L.el,C===null&&wl(b,L.el),be&&Lt(be,z),(k=we.props&&we.props.onVnodeUpdated)&&Lt(()=>pn(k,m,we,w),z),uf(b),Vi()}else{let we;const{el:U,props:be}=A,{bm:m,m:w,parent:C}=b,k=ns(A);if(No(b,!1),m&&si(m),!k&&(we=be&&be.onVnodeBeforeMount)&&pn(we,C,A),No(b,!0),U&&dt){const L=()=>{An(b,"render"),b.subTree=gl(b),Pn(b,"render"),An(b,"hydrate"),dt(U,b.subTree,b,z,null),Pn(b,"hydrate")};k?A.type.__asyncLoader().then(()=>!b.isUnmounted&&L()):L()}else{An(b,"render");const L=b.subTree=gl(b);Pn(b,"render"),An(b,"patch"),S(null,L,R,N,b,z,oe),Pn(b,"patch"),A.el=L.el}if(w&&Lt(w,z),!k&&(we=be&&be.onVnodeMounted)){const L=A;Lt(()=>pn(we,C,L),z)}(A.shapeFlag&256||C&&ns(C.vnode)&&C.vnode.shapeFlag&256)&&b.a&&Lt(b.a,z),b.isMounted=!0,H_(b),A=R=N=null}},Z=b.effect=new ol(J,()=>yr(Q),b.scope),Q=b.update=()=>Z.run();Q.id=b.uid,No(b,!0),Z.onTrack=b.rtc?we=>si(b.rtc,we):void 0,Z.onTrigger=b.rtg?we=>si(b.rtg,we):void 0,Q.ownerInstance=b,Q()},D=(b,A,R)=>{A.component=b;const N=b.vnode.props;b.vnode=A,b.next=null,Tv(b,A.props,N,R),Fv(b,A.children,R),$o(),of(),ko()},me=(b,A,R,N,z,oe,le,J,Z=!1)=>{const Q=b&&b.children,we=b?b.shapeFlag:0,U=A.children,{patchFlag:be,shapeFlag:m}=A;if(be>0){if(be&128){Le(Q,U,R,N,z,oe,le,J,Z);return}else if(be&256){ke(Q,U,R,N,z,oe,le,J,Z);return}}m&8?(we&16&&vt(Q,z,oe),U!==Q&&p(R,U)):we&16?m&16?Le(Q,U,R,N,z,oe,le,J,Z):vt(Q,z,oe,!0):(we&8&&p(R,""),m&16&&pe(U,R,N,z,oe,le,J,Z))},ke=(b,A,R,N,z,oe,le,J,Z)=>{b=b||oi,A=A||oi;const Q=b.length,we=A.length,U=Math.min(Q,we);let be;for(be=0;be<U;be++){const m=A[be]=Z?Xn(A[be]):Jt(A[be]);S(b[be],m,R,null,z,oe,le,J,Z)}Q>we?vt(b,z,oe,!0,!1,U):pe(A,R,N,z,oe,le,J,Z,U)},Le=(b,A,R,N,z,oe,le,J,Z)=>{let Q=0;const we=A.length;let U=b.length-1,be=we-1;for(;Q<=U&&Q<=be;){const m=b[Q],w=A[Q]=Z?Xn(A[Q]):Jt(A[Q]);if(Yn(m,w))S(m,w,R,null,z,oe,le,J,Z);else break;Q++}for(;Q<=U&&Q<=be;){const m=b[U],w=A[be]=Z?Xn(A[be]):Jt(A[be]);if(Yn(m,w))S(m,w,R,null,z,oe,le,J,Z);else break;U--,be--}if(Q>U){if(Q<=be){const m=be+1,w=m<we?A[m].el:N;for(;Q<=be;)S(null,A[Q]=Z?Xn(A[Q]):Jt(A[Q]),R,w,z,oe,le,J,Z),Q++}}else if(Q>be)for(;Q<=U;)Xe(b[Q],z,oe,!0),Q++;else{const m=Q,w=Q,C=new Map;for(Q=w;Q<=be;Q++){const Ee=A[Q]=Z?Xn(A[Q]):Jt(A[Q]);Ee.key!=null&&(C.has(Ee.key)&&re("Duplicate keys found during update:",JSON.stringify(Ee.key),"Make sure keys are unique."),C.set(Ee.key,Q))}let k,L=0;const E=be-w+1;let q=!1,V=0;const te=new Array(E);for(Q=0;Q<E;Q++)te[Q]=0;for(Q=m;Q<=U;Q++){const Ee=b[Q];if(L>=E){Xe(Ee,z,oe,!0);continue}let _e;if(Ee.key!=null)_e=C.get(Ee.key);else for(k=w;k<=be;k++)if(te[k-w]===0&&Yn(Ee,A[k])){_e=k;break}_e===void 0?Xe(Ee,z,oe,!0):(te[_e-w]=Q+1,_e>=V?V=_e:q=!0,S(Ee,A[_e],R,null,z,oe,le,J,Z),L++)}const Pe=q?Vv(te):oi;for(k=Pe.length-1,Q=E-1;Q>=0;Q--){const Ee=w+Q,_e=A[Ee],je=Ee+1<we?A[Ee+1].el:N;te[Q]===0?S(null,_e,R,je,z,oe,le,J,Z):q&&(k<0||Q!==Pe[k]?Fe(_e,R,je,2):k--)}}},Fe=(b,A,R,N,z=null)=>{const{el:oe,type:le,transition:J,children:Z,shapeFlag:Q}=b;if(Q&6){Fe(b.component.subTree,A,R,N);return}if(Q&128){b.suspense.move(A,R,N);return}if(Q&64){le.move(b,A,R,ot);return}if(le===De){o(oe,A,R);for(let U=0;U<Z.length;U++)Fe(Z[U],A,R,N);o(b.anchor,A,R);return}if(le===rs){H(b,A,R);return}if(N!==2&&Q&1&&J)if(N===0)J.beforeEnter(oe),o(oe,A,R),Lt(()=>J.enter(oe),z);else{const{leave:U,delayLeave:be,afterLeave:m}=J,w=()=>o(oe,A,R),C=()=>{U(oe,()=>{w(),m&&m()})};be?be(oe,w,C):C()}else o(oe,A,R)},Xe=(b,A,R,N=!1,z=!1)=>{const{type:oe,props:le,ref:J,children:Z,dynamicChildren:Q,shapeFlag:we,patchFlag:U,dirs:be}=b;if(J!=null&&Tl(J,null,R,b,!0),we&256){A.ctx.deactivate(b);return}const m=we&1&&be,w=!ns(b);let C;if(w&&(C=le&&le.onVnodeBeforeUnmount)&&pn(C,A,b),we&6)Dn(b.component,R,N);else{if(we&128){b.suspense.unmount(R,N);return}m&&To(b,null,A,"beforeUnmount"),we&64?b.type.remove(b,A,R,z,ot,N):Q&&(oe!==De||U>0&&U&64)?vt(Q,A,R,!1,!0):(oe===De&&U&384||!z&&we&16)&&vt(Z,A,R),N&&Ut(b)}(w&&(C=le&&le.onVnodeUnmounted)||m)&&Lt(()=>{C&&pn(C,A,b),m&&To(b,null,A,"unmounted")},R)},Ut=b=>{const{type:A,el:R,anchor:N,transition:z}=b;if(A===De){b.patchFlag>0&&b.patchFlag&2048&&z&&!z.persisted?b.children.forEach(le=>{le.type===_t?i(le.el):Ut(le)}):Ht(R,N);return}if(A===rs){ie(b);return}const oe=()=>{i(R),z&&!z.persisted&&z.afterLeave&&z.afterLeave()};if(b.shapeFlag&1&&z&&!z.persisted){const{leave:le,delayLeave:J}=z,Z=()=>le(R,oe);J?J(b.el,oe,Z):Z()}else oe()},Ht=(b,A)=>{let R;for(;b!==A;)R=y(b),i(b),b=R;i(A)},Dn=(b,A,R)=>{b.type.__hmrId&&D_(b);const{bum:N,scope:z,update:oe,subTree:le,um:J}=b;N&&si(N),z.stop(),oe&&(oe.active=!1,Xe(le,b,A,R)),J&&Lt(J,A),Lt(()=>{b.isUnmounted=!0},A),A&&A.pendingBranch&&!A.isUnmounted&&b.asyncDep&&!b.asyncResolved&&b.suspenseId===A.pendingId&&(A.deps--,A.deps===0&&A.resolve()),z_(b)},vt=(b,A,R,N=!1,z=!1,oe=0)=>{for(let le=oe;le<b.length;le++)Xe(b[le],A,R,N,z)},xt=b=>b.shapeFlag&6?xt(b.component.subTree):b.shapeFlag&128?b.suspense.next():y(b.anchor||b.el),ft=(b,A,R)=>{b==null?A._vnode&&Xe(A._vnode,null,null,!0):S(A._vnode||null,b,A,null,null,null,R),of(),sf(),A._vnode=b},ot={p:S,um:Xe,m:Fe,r:Ut,mt:ve,mc:pe,pc:me,pbc:ge,n:xt,o:e};let co,dt;return t&&([co,dt]=t(ot)),{render:ft,hydrate:co,createApp:Uv(ft,co)}}function No({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Er(e,t,n=!1){const o=e.children,i=t.children;if(xe(o)&&xe(i))for(let s=0;s<o.length;s++){const r=o[s];let a=i[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[s]=Xn(i[s]),a.el=r.el),n||Er(r,a)),a.type===ss&&(a.el=r.el),a.type===_t&&!a.el&&(a.el=r.el)}}function Vv(e){const t=e.slice(),n=[0];let o,i,s,r,a;const c=e.length;for(o=0;o<c;o++){const d=e[o];if(d!==0){if(i=n[n.length-1],e[i]<d){t[o]=i,n.push(o);continue}for(s=0,r=n.length-1;s<r;)a=s+r>>1,e[n[a]]<d?s=a+1:r=a;d<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,r=n[s-1];s-- >0;)n[s]=r,r=t[r];return n}const Kv=e=>e.__isTeleport,De=Symbol("Fragment"),ss=Symbol("Text"),_t=Symbol("Comment"),rs=Symbol("Static"),as=[];let Wt=null;function W(e=!1){as.push(Wt=e?null:[])}function Uf(){as.pop(),Wt=as[as.length-1]||null}let ui=1;function Hf(e){ui+=e}function qf(e){return e.dynamicChildren=ui>0?Wt||oi:null,Uf(),ui>0&&Wt&&Wt.push(e),e}function X(e,t,n,o,i,s){return qf(f(e,t,n,o,i,s,!0))}function Gt(e,t,n,o,i){return qf(Ce(e,t,n,o,i,!0))}function di(e){return e?e.__v_isVNode===!0:!1}function Yn(e,t){return t.shapeFlag&6&&li.has(t.type)?(e.shapeFlag&=-257,t.shapeFlag&=-513,!1):e.type===t.type&&e.key===t.key}const Wv=(...e)=>Gv(...e),Sr="__vInternal",zf=({key:e})=>e!=null?e:null,Ar=({ref:e,ref_key:t,ref_for:n})=>e!=null?Qe(e)||st(e)||Te(e)?{i:lt,r:e,k:t,f:!!n}:e:null;function f(e,t=null,n=null,o=0,i=null,s=e===De?0:1,r=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&zf(t),ref:t&&Ar(t),scopeId:br,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:lt};return a?(Ol(c,n),s&128&&e.normalize(c)):n&&(c.shapeFlag|=Qe(n)?8:16),c.key!==c.key&&re("VNode created with invalid key (NaN). VNode type:",c.type),ui>0&&!r&&Wt&&(c.patchFlag>0||s&6)&&c.patchFlag!==32&&Wt.push(c),c}const Ce=Wv;function Gv(e,t=null,n=null,o=0,i=null,s=!1){if((!e||e===wv)&&(e||re(`Invalid vnode type when creating vnode: ${e}.`),e=_t),di(e)){const a=Qn(e,t,!0);return n&&Ol(a,n),ui>0&&!s&&Wt&&(a.shapeFlag&6?Wt[Wt.indexOf(e)]=a:Wt.push(a)),a.patchFlag|=-2,a}if(Yf(e)&&(e=e.__vccOpts),t){t=Vf(t);let{class:a,style:c}=t;a&&!Qe(a)&&(t.class=Ye(a)),Ve(c)&&(gr(c)&&!xe(c)&&(c=it({},c)),t.style=xn(c))}const r=Qe(e)?1:nv(e)?128:Kv(e)?64:Ve(e)?4:Te(e)?2:0;return r&4&&gr(e)&&(e=Ne(e),re("Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
Component that was made reactive: `,e)),f(e,t,n,o,i,r,s,!0)}function Vf(e){return e?gr(e)||Sr in e?it({},e):e:null}function Qn(e,t,n=!1){const{props:o,ref:i,patchFlag:s,children:r}=e,a=t?Wf(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&zf(a),ref:t&&t.ref?n&&i?xe(i)?i.concat(Ar(t)):[i,Ar(t)]:Ar(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s===-1&&xe(r)?r.map(Kf):r,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==De?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Qn(e.ssContent),ssFallback:e.ssFallback&&Qn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Kf(e){const t=Qn(e);return xe(e.children)&&(t.children=e.children.map(Kf)),t}function ce(e=" ",t=0){return Ce(ss,null,e,t)}function Jv(e,t){const n=Ce(rs,null,e);return n.staticCount=t,n}function Ge(e="",t=!1){return t?(W(),Gt(_t,null,e)):Ce(_t,null,e)}function Jt(e){return e==null||typeof e=="boolean"?Ce(_t):xe(e)?Ce(De,null,e.slice()):typeof e=="object"?Xn(e):Ce(ss,null,String(e))}function Xn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Qn(e)}function Ol(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(xe(t))n=16;else if(typeof t=="object")if(o&65){const i=t.default;i&&(i._c&&(i._d=!1),Ol(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(Sr in t)?t._ctx=lt:i===3&&lt&&(lt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Te(t)?(t={default:t,_ctx:lt},n=32):(t=String(t),o&64?(n=16,t=[ce(t)]):n=8);e.children=t,e.shapeFlag|=n}function Wf(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const i in o)if(i==="class")t.class!==o.class&&(t.class=Ye([t.class,o.class]));else if(i==="style")t.style=xn([t.style,o.style]);else if(Ri(i)){const s=t[i],r=o[i];r&&s!==r&&!(xe(s)&&s.includes(r))&&(t[i]=s?[].concat(s,r):r)}else i!==""&&(t[i]=o[i])}return t}function pn(e,t,n,o=null){tn(e,t,7,[n,o])}const Yv=jf();let Qv=0;function Xv(e,t,n){const o=e.type,i=(t?t.appContext:e.appContext)||Yv,s={uid:Qv++,vnode:e,type:o,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new jb(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:If(o,i),emitsOptions:ff(o,i),emit:null,emitted:null,propsDefaults:Ke,inheritAttrs:o.inheritAttrs,ctx:Ke,data:Ke,props:Ke,attrs:Ke,slots:Ke,refs:Ke,setupState:Ke,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx=_v(s),s.root=t?t.root:s,s.emit=G_.bind(null,s),e.ce&&e.ce(s),s}let et=null;const Zv=()=>et||lt,Zn=e=>{et=e,e.scope.on()},eo=()=>{et&&et.scope.off(),et=null},e0=qn("slot,component");function Ll(e,t){const n=t.isNativeTag||xd;(e0(e)||n(e))&&re("Do not use built-in or reserved HTML elements as component id: "+e)}function Gf(e){return e.vnode.shapeFlag&4}let ls=!1;function t0(e,t=!1){ls=t;const{props:n,children:o}=e.vnode,i=Gf(e);Pv(e,n,i,t),Rv(e,o);const s=i?n0(e,t):void 0;return ls=!1,s}function n0(e,t){var n;const o=e.type;{if(o.name&&Ll(o.name,e.appContext.config),o.components){const s=Object.keys(o.components);for(let r=0;r<s.length;r++)Ll(s[r],e.appContext.config)}if(o.directives){const s=Object.keys(o.directives);for(let r=0;r<s.length;r++)xf(s[r])}o.compilerOptions&&o0()&&re('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=Jd(new Proxy(e.ctx,kf)),vv(e);const{setup:i}=o;if(i){const s=e.setupContext=i.length>1?s0(e):null;Zn(e),$o();const r=kn(i,e,0,[ri(e.props),s]);if(ko(),eo(),Zs(r)){if(r.then(eo,eo),t)return r.then(a=>{Ml(e,a,t)}).catch(a=>{Ki(a,e,0)});if(e.asyncDep=r,!e.suspense){const a=(n=o.name)!==null&&n!==void 0?n:"Anonymous";re(`Component <${a}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else Ml(e,r,t)}else Jf(e,t)}function Ml(e,t,n){Te(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ve(t)?(di(t)&&re("setup() should not return VNodes directly - return a render function instead."),e.devtoolsRawSetupState=t,e.setupState=Xd(t),xv(e)):t!==void 0&&re(`setup() should return an object. Received: ${t===null?"null":typeof t}`),Jf(e,n)}let Nl;const o0=()=>!Nl;function Jf(e,t,n){const o=e.type;if(!e.render){if(!t&&Nl&&!o.render){const i=o.template||El(e).template;if(i){An(e,"compile");const{isCustomElement:s,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:c}=o,d=it(it({isCustomElement:s,delimiters:a},r),c);o.render=Nl(i,d),Pn(e,"compile")}}e.render=o.render||It}Zn(e),$o(),$v(e),ko(),eo(),!o.render&&e.render===It&&!t&&(o.template?re('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):re("Component is missing template or render function."))}function i0(e){return new Proxy(e.attrs,{get(t,n){return vr(),Tt(e,"get","$attrs"),t[n]},set(){return re("setupContext.attrs is readonly."),!1},deleteProperty(){return re("setupContext.attrs is readonly."),!1}})}function s0(e){const t=o=>{if(e.exposed&&re("expose() should be called only once per setup()."),o!=null){let i=typeof o;i==="object"&&(xe(o)?i="array":st(o)&&(i="ref")),i!=="object"&&re(`expose() should be passed a plain object, received ${i}.`)}e.exposed=o||{}};let n;return Object.freeze({get attrs(){return n||(n=i0(e))},get slots(){return ri(e.slots)},get emit(){return(o,...i)=>e.emit(o,...i)},expose:t})}function Pr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Xd(Jd(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Lo)return Lo[n](e)},has(t,n){return n in t||n in Lo}}))}const r0=/(?:^|[-_])(\w)/g,a0=e=>e.replace(r0,t=>t.toUpperCase()).replace(/[-_]/g,"");function Bl(e,t=!0){return Te(e)?e.displayName||e.name:e.name||t&&e.__name}function Ir(e,t,n=!1){let o=Bl(t);if(!o&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(o=i[1])}if(!o&&e&&e.parent){const i=s=>{for(const r in s)if(s[r]===t)return r};o=i(e.components||e.parent.type.components)||i(e.appContext.components)}return o?a0(o):n?"App":"Anonymous"}function Yf(e){return Te(e)&&"__vccOpts"in e}const to=(e,t)=>k_(e,t,ls);function nn(e){const t=Zv();t||re("withAsyncContext called without active current instance. This is likely a bug.");let n=e();return eo(),Zs(n)&&(n=n.catch(o=>{throw Zn(t),o})),[n,()=>Zn(t)]}function l0(e,t,n){const o=arguments.length;return o===2?Ve(t)&&!xe(t)?di(t)?Ce(e,null,[t]):Ce(e,t):Ce(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&di(n)&&(n=[n]),Ce(e,t,n))}const c0=Symbol("ssrContext"),u0=()=>{{const e=ts(c0);return e||re("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function Dl(e){return!!(e&&e.__v_isShallow)}function d0(){if(typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#0b1bc9"},n={style:"color:#b62e24"},o={style:"color:#9d288c"},i={header(h){return Ve(h)?h.__isVue?["div",e,"VueInstance"]:st(h)?["div",{},["span",e,p(h)],"<",a(h.value),">"]:Eo(h)?["div",{},["span",e,Dl(h)?"ShallowReactive":"Reactive"],"<",a(h),`>${Wn(h)?" (readonly)":""}`]:Wn(h)?["div",{},["span",e,Dl(h)?"ShallowReadonly":"Readonly"],"<",a(h),">"]:null:null},hasBody(h){return h&&h.__isVue},body(h){if(h&&h.__isVue)return["div",{},...s(h.$)]}};function s(h){const y=[];h.type.props&&h.props&&y.push(r("props",Ne(h.props))),h.setupState!==Ke&&y.push(r("setup",h.setupState)),h.data!==Ke&&y.push(r("data",Ne(h.data)));const x=c(h,"computed");x&&y.push(r("computed",x));const _=c(h,"inject");return _&&y.push(r("injected",_)),y.push(["div",{},["span",{style:o.style+";opacity:0.66"},"$ (internal): "],["object",{object:h}]]),y}function r(h,y){return y=it({},y),Object.keys(y).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},h],["div",{style:"padding-left:1.25em"},...Object.keys(y).map(x=>["div",{},["span",o,x+": "],a(y[x],!1)])]]:["span",{}]}function a(h,y=!0){return typeof h=="number"?["span",t,h]:typeof h=="string"?["span",n,JSON.stringify(h)]:typeof h=="boolean"?["span",o,h]:Ve(h)?["object",{object:y?Ne(h):h}]:["span",n,String(h)]}function c(h,y){const x=h.type;if(Te(x))return;const _={};for(const S in h.ctx)d(x,S,y)&&(_[S]=h.ctx[S]);return _}function d(h,y,x){const _=h[x];if(xe(_)&&_.includes(y)||Ve(_)&&y in _||h.extends&&d(h.extends,y,x)||h.mixins&&h.mixins.some(S=>d(S,y,x)))return!0}function p(h){return Dl(h)?"ShallowRef":h.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(i):window.devtoolsFormatters=[i]}const Qf="3.2.47",f0="http://www.w3.org/2000/svg",Bo=typeof document<"u"?document:null,Xf=Bo&&Bo.createElement("template"),p0={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i=t?Bo.createElementNS(f0,e):Bo.createElement(e,n?{is:n}:void 0);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>Bo.createTextNode(e),createComment:e=>Bo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Bo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,s){const r=n?n.previousSibling:t.lastChild;if(i&&(i===s||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===s||!(i=i.nextSibling)););else{Xf.innerHTML=o?`<svg>${e}</svg>`:e;const a=Xf.content;if(o){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function h0(e,t,n){const o=e._vtc;o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function m0(e,t,n){const o=e.style,i=Qe(n);if(n&&!i){if(t&&!Qe(t))for(const s in t)n[s]==null&&Rl(o,s,"");for(const s in n)Rl(o,s,n[s])}else{const s=o.display;i?t!==n&&(o.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(o.display=s)}}const g0=/[^\\];\s*$/,Zf=/\s*!important$/;function Rl(e,t,n){if(xe(n))n.forEach(o=>Rl(e,t,o));else if(n==null&&(n=""),g0.test(n)&&re(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const o=y0(e,t);Zf.test(n)?e.setProperty(Cn(o),n.replace(Zf,""),"important"):e[o]=n}}const ep=["Webkit","Moz","ms"],Fl={};function y0(e,t){const n=Fl[t];if(n)return n;let o=cn(t);if(o!=="filter"&&o in e)return Fl[t]=o;o=vo(o);for(let i=0;i<ep.length;i++){const s=ep[i]+o;if(s in e)return Fl[t]=s}return t}const tp="http://www.w3.org/1999/xlink";function w0(e,t,n,o,i){if(o&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(tp,t.slice(6,t.length)):e.setAttributeNS(tp,t,n);else{const s=Ob(t);n==null||s&&!_d(n)?e.removeAttribute(t):e.setAttribute(t,s?"":n)}}function b0(e,t,n,o,i,s,r){if(t==="innerHTML"||t==="textContent"){o&&r(o,i,s),e[t]=n==null?"":n;return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=n;const c=n==null?"":n;(e.value!==c||e.tagName==="OPTION")&&(e.value=c),n==null&&e.removeAttribute(t);return}let a=!1;if(n===""||n==null){const c=typeof e[t];c==="boolean"?n=_d(n):n==null&&c==="string"?(n="",a=!0):c==="number"&&(n=0,a=!0)}try{e[t]=n}catch(c){a||re(`Failed setting prop "${t}" on <${e.tagName.toLowerCase()}>: value ${n} is invalid.`,c)}a&&e.removeAttribute(t)}function no(e,t,n,o){e.addEventListener(t,n,o)}function _0(e,t,n,o){e.removeEventListener(t,n,o)}function v0(e,t,n,o,i=null){const s=e._vei||(e._vei={}),r=s[t];if(o&&r)r.value=o;else{const[a,c]=x0(t);if(o){const d=s[t]=k0(o,i);no(e,a,d,c)}else r&&(_0(e,a,r,c),s[t]=void 0)}}const np=/(?:Once|Passive|Capture)$/;function x0(e){let t;if(np.test(e)){t={};let o;for(;o=e.match(np);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Cn(e.slice(2)),t]}let jl=0;const C0=Promise.resolve(),$0=()=>jl||(C0.then(()=>jl=0),jl=Date.now());function k0(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;tn(E0(o,n.value),t,5,[o])};return n.value=e,n.attached=$0(),n}function E0(e,t){if(xe(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>i=>!i._stopped&&o&&o(i))}else return t}const op=/^on[a-z]/,S0=(e,t,n,o,i=!1,s,r,a,c)=>{t==="class"?h0(e,o,i):t==="style"?m0(e,n,o):Ri(t)?Xs(t)||v0(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):A0(e,t,o,i))?b0(e,t,o,s,r,a,c):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),w0(e,t,o,i))};function A0(e,t,n,o){return o?!!(t==="innerHTML"||t==="textContent"||t in e&&op.test(t)&&Te(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||op.test(t)&&Qe(n)?!1:t in e}const fi=e=>{const t=e.props["onUpdate:modelValue"]||!1;return xe(t)?n=>si(t,n):t};function P0(e){e.target.composing=!0}function ip(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const qe={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e._assign=fi(i);const s=o||i.props&&i.props.type==="number";no(e,t?"change":"input",r=>{if(r.target.composing)return;let a=e.value;n&&(a=a.trim()),s&&(a=or(a)),e._assign(a)}),n&&no(e,"change",()=>{e.value=e.value.trim()}),t||(no(e,"compositionstart",P0),no(e,"compositionend",ip),no(e,"change",ip))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:i}},s){if(e._assign=fi(s),e.composing||document.activeElement===e&&e.type!=="range"&&(n||o&&e.value.trim()===t||(i||e.type==="number")&&or(e.value)===t))return;const r=t==null?"":t;e.value!==r&&(e.value=r)}},Se={deep:!0,created(e,t,n){e._assign=fi(n),no(e,"change",()=>{const o=e._modelValue,i=us(e),s=e.checked,r=e._assign;if(xe(o)){const a=Ja(o,i),c=a!==-1;if(s&&!c)r(o.concat(i));else if(!s&&c){const d=[...o];d.splice(a,1),r(d)}}else if(ii(o)){const a=new Set(o);s?a.add(i):a.delete(i),r(a)}else r(ap(e,s))})},mounted:sp,beforeUpdate(e,t,n){e._assign=fi(n),sp(e,t,n)}};function sp(e,{value:t,oldValue:n},o){e._modelValue=t,xe(t)?e.checked=Ja(t,o.props.value)>-1:ii(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=Di(t,ap(e,!0)))}const cs={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const i=ii(t);no(e,"change",()=>{const s=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?or(us(r)):us(r));e._assign(e.multiple?i?new Set(s):s:s[0])}),e._assign=fi(o)},mounted(e,{value:t}){rp(e,t)},beforeUpdate(e,t,n){e._assign=fi(n)},updated(e,{value:t}){rp(e,t)}};function rp(e,t){const n=e.multiple;if(n&&!xe(t)&&!ii(t)){re(`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(t).slice(8,-1)}.`);return}for(let o=0,i=e.options.length;o<i;o++){const s=e.options[o],r=us(s);if(n)xe(t)?s.selected=Ja(t,r)>-1:s.selected=t.has(r);else if(Di(us(s),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}function us(e){return"_value"in e?e._value:e.value}function ap(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const I0=["ctrl","shift","alt","meta"],T0={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>I0.some(n=>e[`${n}Key`]&&!t.includes(n))},O0=(e,t)=>(n,...o)=>{for(let i=0;i<t.length;i++){const s=T0[t[i]];if(s&&s(n,t))return}return e(n,...o)},L0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},lp=(e,t)=>n=>{if(!("key"in n))return;const o=Cn(n.key);if(t.some(i=>i===o||L0[i]===o))return e(n)},Yt={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ds(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),ds(e,!0),o.enter(e)):o.leave(e,()=>{ds(e,!1)}):ds(e,t))},beforeUnmount(e,{value:t}){ds(e,t)}};function ds(e,t){e.style.display=t?e._vod:"none"}const M0=it({patchProp:S0},p0);let cp;function N0(){return cp||(cp=qv(M0))}const oo=(...e)=>{const t=N0().createApp(...e);B0(t),D0(t);const{mount:n}=t;return t.mount=o=>{const i=R0(o);if(!i)return;const s=t._component;!Te(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.innerHTML="";const r=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t};function B0(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>Ib(t)||Tb(t),writable:!1})}function D0(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){re("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=e.config.compilerOptions,o='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom';Object.defineProperty(e.config,"compilerOptions",{get(){return re(o),n},set(){re(o)}})}}function R0(e){if(Qe(e)){const t=document.querySelector(e);return t||re(`Failed to mount app: mount target selector "${e}" returned null.`),t}return window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&re('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}function F0(){d0()}F0();const j0={key:0,class:"ce-custom-url-help"},U0={class:"ce-custom-url-help-body"},H0=f("hr",null,null,-1),q0={key:0},z0={class:"pure-table pure-table-bordered"},V0=f("thead",null,[f("tr",null,[f("th",{width:"50%"},"变量"),f("th",{width:"50%"},"说明")])],-1),K0=["onClick"],W0=Be({__name:"CustomUrlHelp",setup(e){const t=he(rb),n=he(!1);Ft(async()=>{window.addEventListener("message",i=>{const{event:s}=i.data;s==="customUrlHelp"&&(n.value=!0)},!1)});async function o(i){Xt(i.key),ue({text:"已复制到剪贴板",icon:"success",timer:1e3})}return(i,s)=>n.value?(W(),X("div",j0,[f("div",U0,[f("h1",null,[ce(" 自定义菜单变量说明 "),f("a",{href:"javascript:void(0)",onClick:s[0]||(s[0]=r=>n.value=!1)},"关闭")]),H0,(W(!0),X(De,null,nt(t.value,(r,a)=>(W(),X("div",{key:a},[f("h2",null,ye(r.label),1),r.memo?(W(),X("p",q0,ye(r.memo),1)):Ge("",!0),f("table",z0,[V0,f("tbody",null,[(W(!0),X(De,null,nt(r.items,(c,d)=>(W(),X("tr",{key:d},[f("td",null,[f("span",{class:"ce-variable",onClick:p=>o(c)},ye(c.key),9,K0)]),f("td",null,ye(c.label),1)]))),128))])])]))),128))])])):Ge("",!0)}}),AM="",PM="",up="enabled_custom_urls_for_search",dp="enabled_custom_urls_for_play";async function G0(e){await Ze.set(up,e)}async function J0(e){await Ze.set(dp,e)}async function Y0(){const e=ql,t=e.filter(i=>i.enabled).map(i=>i.key),n=await Ze.get(up,t),o=[];return e.forEach(i=>{n.includes(i.key)&&o.push(i.key)}),o}async function Q0(){const e=Hl,t=e.filter(i=>i.enabled).map(i=>i.key),n=await Ze.get(dp,t),o=[];return e.forEach(i=>{n.includes(i.key)&&o.push(i.key)}),o}async function fp(){const e=await Y0();return ql.forEach(t=>{t.enabled=e.includes(t.key)}),ql}async function Tr(){const e=await Q0();return Hl.forEach(t=>{t.enabled=e.includes(t.key)}),Hl}const pp="data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABu0lEQVRYhe2WsVXDMBCG/xNNSrFBmAB3tBEZIJkAmCBog9gbGLNAwgQwQJ5MSecNYASVaayjcBIrEDvye06V/JVs/777fJJOBi666NxFoUapzQiunAJiAmC4uV2AuACJxKbq5yQAUhsJxhzMuj0SpxsQ2xuA1EbCuRyg28B4BQSpLhCi9SljvpeckUOQgqBrm90TBCkAS++NCOzmocmBlgpIbYZw/O3RJDYbxwe9s1UMUJ24qkIeAtBcAVfWyYgWTckBwGbjGIw6oXPTkOTtABB16WmvzId1RUl9QZMeABBtB4HlLLzxsNHVAWAnqY085um6/UIA/MYSNbo2ktqMvMui0RgOwB+7YcnHt5Yrn3Zjoh4AhHivA2IkZ6YRonomHj1/0uT9q/ZOOFulAD3Xbl6AxNKmKt+siwglz0Goy8/I7eu96gdAGwnHBgFr4E/Y2GYqqAqtu8Cmylbtll+ORvIbEThum7JggC2EzcYagm5Q9X1/gf0A/AJBqio7e18dBhH8PxCqf+fCkem46htg/fWWD+4eCKDtwhwN7p6w/lp+HvIHdcKuqg6u/elo8p4E4D8EB/eFiy46P/0C5gmePG6KKVsAAAAASUVORK5CYII=",Ul="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACAlJREFUaEPtmWuIXVcVx3/7vt9zJ5NOZ5JGkxQDEZroF7WxYGILGoWmLxXamtG0RUhoLSiW4hdFPxRFSytJLVpNRqTE2qq1WqiFGbWhNiCSIClU1EZj0ySTedz3uY+zZN19bjL3zn1NckcNeODAuTPn7L3/6/Ff/7W34Qq/zBW+fv4P4L/tweV4wAf4vVuf9V7O992wCuB6dw3QW3/3vPpZQODYsWM7t2zZ8nzP0Qb4wvHjx2/eunXri0C127C9AMRFJDfAdS17KGNMAsh3+rAbgKSIZJY94wp8YIxJAdl2Q3cCEBIRZwXWcslDGmPCQLl1gHYAzNTU1O3bt29/pr/ZNP8AEXvXRzRg9KFXhPY3g741PT39iR07djyrMy3+qt0MfVrfW7DU4LVHkX8cAX8QXBfExdxxGEwAfIMjq3ZeaAcgJSIL3W2ji3ehVoGnd0E0idQX6l3672oV3+rNsOMr4At4/7g8jxhjhoCmvGw34qiInOkKQK3uVuEHNyGRmAVSydu/GR8SjEIwDr4wUnHw3/1zC8JcnjeMMVcDZ3uF0DUi8s/OAMQutJSFgzuRWhmK8+DkkIpStoFQBOJpiK9GIkkQg/9j34CRTeDTWnhpnjDGrANO9QLwThF5szMAF6pleOJGyJ1BnBw4WSiVEVeTNwCuQDiEJNOQHoX4MAQimFAM3ycnPW8sP8mNMeuBk70AbBCRv3UEoOFTKcHXNuG8WSJ/tAiOgxEX/5oUiW0pqDgWWNBAMoUMj2CSV0EkAbUa/omfQiC87JAyxmwE/n75AJwCPLyOuRdKmFoVqdYsc0ZjpH/5ErUn7wF9x5kHKSPJGKRXwdAohNOIBPC/93Z877vTS/D+QmqAAPJkP7gWd76AiGA8atan9KtvgJNBfvUY7okjUJxDakWI+pHEECRHkdgI4o+CUyP8hefA31+CDxbADeOQL9TLilaWug0FkkdPWw8XFqCUofrtT9cBUVygpgJTKTc5AhpS4RRSFqJf/CFEV/VM8IECKHx4DMkXl6RK/NVZ8IcstZZykD1L9bE9yPw8bka9UUaCYdxkGpMahdgqYtcFYWgDfORbXUNqoABKH28B4LkhOj0PoZiVFRXH5kL2LPLX1yh//xHcbAa3qLrMhxsbwqRGSNy4GkwIYmvh1ic7ghgoAOe2MShZD9QlkJeH4V8rAC1iPisrlHIrRdBF52YoPHQn5PLUchncSgXxx0nfscqGkOuDPS9bhrpQvS86eaAAKnePQbFog3+RvAo+2wCgBcvTS7WqpV4nD5mzOI8/ROXPr1M7N0voHWWi74lAZBj8Mdj2eXj/HqurWgreQAFU93gAWrIg8HQDgOqfBjKt3lo/HCgXIDMDc6dwf3wXPpm1C/VHLID0RnhgGgIhr2tdIQ/U7hkDpyWEfOCfXAxgkbpTMPWQcmw4PXU95DKQX4CqCkM/KLWuvx4+9zMrR+pt9woBcO8bQ4rFeuw37Gz84DvYBYCG0us/gT9+F7LnYe4MZLJQrIIEIZSCh/8Aw2sguOIAxqFQuLg3obkQMPiemvOSuCGhG9K7Cs/fYjc1ijk4/xbMKACt2KZeoQlH4ctHITa08iHk7rsWk80gbgWMYFS8hQP49r+1CIAX+8UZmLoXVOwVsjD7NszOQEaFoA9CwxBKwt5nYHgdRJTFlARWKoQ0EX/xVeTlw5bnTQ3iUcz6a+GBF0H7AdX+KrtfeRDyp6BagfwczJ2F+TnIFMGNQGgEQgn47CSk19QrdZ2B2vQOg2EhlQPlEuTOIY/stDrGJ+CvYO5/AYbGrfuVdV66FQhCOQ+587BwDhYyUNA9qwSE0rD9Qdh4AwyNQThuv613d83W11QeHABNxlIesqctGL1CYUiOWeufOQInHrdtZ3EBFtTqs5DNQSUEgTQEEnDXJMRHIJq2rKOWv9BDL1WogwOgpbdRnCq60yEQCFpvTH3KVlGly/yMtXpmAXJlkBgEh2F0M3z065BQeR23i9eYv7CT0V5eDwiAmlt3Hjx2UW7XcKkW4JUJ63pVnzlNUg0ZTVQtVEMQTMGuJyA1DonVEIp6smFxr9y5N+gXwHoRaep6lnZnLRU2dxp+fy/4DJTm6/nBwhyoWq1ELEUGE3DbjzwZnbA8r17rYfWWQrYBaGp328Ht0RMvHtK18uC5bVYKaLLmz0M+A44mqoZHGq7bDZt31ZuZulINhm241a/+e+N+e+K1ItLU+Xftj5VSD38AnDKU5mxxcwMQ0pBJwi2TENNE1d9q9QbLNGzXXzvpsdA1wL969cRXiUjT3ktHAMrzCuB3X4KTv4VCHqpirZxYAzc9Cqmr7W+N9z4SteNclkZHgXO9ACREpO1O8JLBGzsUGvN/OgAnf2OF2Ye+CUPrIK5toyaqWn3xflD/Vm/JgSTQtN3fbqTAoUOHPrN79+7vdbOG/Z+qyKqtxsr3yj56aXOi9HgJidppzsnJyfsmJiYOth54tN2dBnR78e3eABpUqjRatmCUVTRBL1h9eYnaaU5jzJi3rdhzd1rHUIp4l4ic6A3CO8rSetBYa9P2+qWFS0vovBv4S7vjpm6j64HCJhE53htEk1EWvT6QxW8B3gDaHrj0mkEb0/H9+/ffvHfv3u/0BjK4Nw4cOHD/vn379GBRN5oqHUOrjykVpLZHaUD35/V5acPax0A9XtEYVGGl6lDPJ+a9507uvRixy5hbwTSESy/vLWPY+qu60MZ5cddFN+XHcmf5X3t/0Fb8j+O74gH8G0lHhV4uXv6RAAAAAElFTkSuQmCC",Hl=[pt({enabled:!0,key:"p_builtin_iina",label:"IINA播放",icon:"https://iina.io/images/iina-icon-60.png",memo:"调用IINA播放视频(使用CloudDrive链接)",url:"iina://weblink?url={clouddrive_stream_url:encode}"}),pt({enabled:!0,key:"p_builtin_vlc",label:"VLC播放",icon:"https://images.videolan.org/images/favicon.ico",memo:"调用VLC播放视频(使用CloudDrive链接)",extraMemo:'<a href="https://github.com/stefansundin/vlc-protocol" target="_blank" rel="noreferer">安装VLC协议</a>',url:"vlc://{clouddrive_stream_url}"}),pt({enabled:!0,key:"p_builtin_mpv",label:"MPV播放",icon:"https://mpv.io/images/mpv-logo-128-0baae5aa.png",memo:"调用MPV播放视频(使用CloudDrive链接)",extraMemo:'<a href="https://github.com/akiirui/mpv-handler/blob/main/README.zh-Hans.md" target="_blank" rel="noreferer">安装MPV协议</a>',url:"mpv://{clouddrive_stream_url}"}),pt({enabled:!0,key:"p_builtin_potplayer",label:"PotPlayer播放",icon:"https://t1.daumcdn.net/potplayer/main/img/favicon.ico",memo:"调用PotPlayer播放视频(使用CloudDrive链接)",url:"potplayer://{clouddrive_stream_url}"}),pt({enabled:!0,key:"p_builtin_infuse",label:"Infuse播放",icon:Ul,memo:"调用Infuse播放视频(使用CloudDrive链接)",url:"infuse://x-callback-url/play?url={clouddrive_stream_url:encode}"}),pt({enabled:!1,key:"p_builtin_nplayer_mac",label:"nPlayer-mac播放",icon:Ul,memo:"调用nPlayer(mac版)播放视频(使用CloudDrive链接)",url:"nplayer-mac://weblink?url={clouddrive_stream_url:encode}&new_window=1"}),pt({enabled:!1,key:"p_builtin_nplayer_win",label:"nPlayer-win播放",icon:Ul,memo:"调用nPlayer(非mac版)播放视频(使用CloudDrive链接)",url:"nplayer-{clouddrive_stream_url:encode}"}),pt({enabled:!0,key:"p_builtin_online",label:"在线播放",icon:"https://115.com/favicon.ico",memo:"115官方在线播放(转码)",url:"https://v.anxia.com/?pickcode={pick_code}&share_id=0"})],ql=[pt({enabled:!0,key:"s_builtin_115_pure_name",label:"115-不含后缀",icon:"https://115.com/favicon.ico",memo:"使用115搜索文件名(不含后缀)",url:"{pure_name:search}"}),pt({enabled:!1,key:"s_builtin_115_full_name",label:"115-完整名称",icon:"https://115.com/favicon.ico",memo:"使用115搜索文件名(完整文件名)",url:"{full_name:search}"}),pt({enabled:!0,key:"s_builtin_google_pure_name",label:"Google-不含后缀",icon:"https://www.google.com/favicon.ico",memo:"使用Google搜索文件名(不含后缀)",url:"https://www.google.com/search?q={pure_name:encode}"}),pt({enabled:!1,key:"s_builtin_google_full_name",label:"Google-完整名称",icon:"https://www.google.com/favicon.ico",memo:"使用Google搜索文件名(完整文件名)",url:"https://www.google.com/search?q={full_name:encode}"}),pt({enabled:!0,key:"s_builtin_bing_pure_name",label:"Bing-不含后缀",icon:pp,memo:"使用Bing搜索文件名(不含后缀)",url:"https://cn.bing.com/search?q={pure_name:encode}"}),pt({enabled:!1,key:"s_builtin_bing_full_name",label:"Bing-完整名称",icon:pp,memo:"使用Bing搜索文件名(完整文件名)",url:"https://cn.bing.com/search?q={full_name:encode}"}),pt({enabled:!0,key:"s_builtin_115_pure_name_manual",label:"115-不含后缀-手动",icon:"https://115.com/favicon.ico",memo:"使用115搜索文件名(不含后缀),手动编辑后搜索",url:"{pure_name:manual:search}"})];var Mt=(e=>(e.openConfig="openConfig",e.closeConfig="closeConfig",e.basicConfigChange="basicConfigChange",e.listConfigChange="listConfigChange",e.searchConfigChange="searchConfigChange",e.toolsConfigChange="toolsConfigChange",e.listRendered="listRendered",e))(Mt||{}),Qt=(e=>(e.basic="basic",e.clouddrive="clouddrive",e.list="list",e.search="search",e.menus="menus",e.searchMenus="searchMenus",e.playMenus="playMenus",e.offline="offline",e.tools="tools",e.about="about",e))(Qt||{});const hn={basic:"基础设置",clouddrive:"CloudDrive",list:"列表增强",search:"搜索增强",menus:"菜单设置",searchMenus:"搜索菜单",playMenus:"播放菜单",offline:"离线管理",tools:"工具",about:"关于"},hp="list_config";function X0(e){return{sizeSorter:!0,sizeSorterDirAttrInterval:100,showSha1:!1,showFolderSizeButton:!0,showCopyButtonOnPathBar:!1,showGotoButtonOnPathBar:!1,...e}}async function Or(){const e=X0(),t=await Ze.get(hp,e);return{...e,...t}}async function Z0(e){await Ze.set(hp,e)}var mp=(e=>(e[e.asc=0]="asc",e[e.desc=1]="desc",e))(mp||{});async function e1(e,t,n=!1){const o=await Or(),i=await Vt(!1),s=await ei(),r=await wo(!1);console.log("[items]",r),ue({html:"正在获取子文件夹大小...",icon:"info",position:"top-end",timer:0}),fe.showLoading();for(let a=0;a<r.length;a++){const c=r[a];if(!c.isDir)continue;const d=s.find(`li[cate_id="${c.id}"]`);if(!d.length)continue;const p=d.find(".file-size span:eq(0)");if(p.text()!==""&&!n)continue;const h=await go(c.id);fe.update({html:`[${a+1} / ${r.length}] 正在获取子文件夹大小:${c.name}`}),p.text(h.size),d.addClass("ce-size-got"),a<r.length-1&&await kt(o.sizeSorterDirAttrInterval)}return fe.hideLoading(),e&&await t1(i),i}async function Lr(e,t,n,o){const i=await ei();i.find('li[file_type="0"]:not(.ce-size-got)').length>0&&await e1(n);const r=i.find("ul"),a=r.children("li").toArray();a.sort(function(d,p){const h=$(d),y=$(p),x=qc(h.find(".file-size span:eq(0)").text()),_=qc(y.find(".file-size span:eq(0)").text());return t===0?x-_:_-x});const c=$("<ul></ul>");$.each(a,function(d,p){c.append(p)}),r.replaceWith(c),n?fe.update({title:"排序完成",html:`已完成排序: ${t===0?"小 > 大":"大 > 小"}`,icon:"success"}):ue({html:`已完成排序: ${t===0?"小 > 大":"大 > 小"}`,icon:"success",timer:1500,position:"top-end"})}async function t1(e){fe.fire({toast:!0,title:"获取子文件夹大小",html:"获取子文件夹大小完成",icon:"success",showConfirmButton:!0,confirmButtonText:"大 > 小",confirmButtonColor:"#3085d6",showDenyButton:!0,denyButtonText:"小 > 大",denyButtonColor:"#d33",position:"top-end",showCloseButton:!0,closeButtonAriaLabel:"关闭",preConfirm:async()=>(console.log("preConfirm"),Lr(e,1,!0),!1),preDeny:async()=>(console.log("preDeny"),Lr(e,0,!0),!1)})}async function n1(){await zl();const t=(await fo("#js_data_list"))[0];o1(),new MutationObserver(async([o])=>{o.type==="childList"&&(window.postMessage({event:Mt.listRendered}),await zl())}).observe(t,{childList:!0})}async function o1(){if(window.top===window.self)return;const e=document.querySelector("#js_pagination_box");if(!e){console.warn("[list.handleLoadAll] 未找到「#js_pagination_box」元素");return}function t(n){!document.querySelector("#js_data_list .list-contents > ul > li")||n(!0)}e.addEventListener("click",async n=>{n.preventDefault(),n.stopPropagation();const o=n.target;let i=!1;if((o.getAttribute("menu")==="load_all_file"||o.closest('[menu="load_all_file"]'))&&(i=!0),!i)return;console.log("[list.handleLoadAll] 点击了「加载全部」按钮"),await Si(t,500,3e5);const s=document.querySelector("#js_data_list .list-contents > ul");s==null||s.removeAttribute("ce-done2");const r=document.querySelector("#js_data_list");if(r){const a=".list-contents > ul:not([ce-done2]) > li";r.querySelectorAll(a).length&&(s==null||s.setAttribute("ce-done2",""),await zl())}})}async function zl(){const e=await Or();a1(e);const t=await nd(!1);for(let n=0;n<t.length;n++){const o=t.eq(n),i=await _n(o);await i1(e,o,i)}}async function i1(e,t,n){await s1(e,t,n),await r1(e,t,n)}async function s1(e,t,n){if(!e.showSha1||!n.hash)return;t.addClass("ce-show-sha1");const o=t.find(".file-name"),i=document.createElement("span");i.classList.add("ce-file-sha1"),i.title="文件SHA1,点击复制",i.textContent=n.hash,i.addEventListener("click",async s=>{s.preventDefault(),s.stopPropagation(),Xt(n.hash),ue({title:"复制SHA1",text:"已复制文件SHA1",icon:"success",timer:1500})}),o.append(i)}async function r1(e,t,n){if(!e.showFolderSizeButton||!n.isDir)return;const o=t.find(".file-size"),i=document.createElement("span");i.classList.add("ce-btn-folder-size"),i.title="点击获取该文件夹大小",i.textContent="大小",i.addEventListener("click",async s=>{s.preventDefault(),s.stopPropagation();const r=await go(n.id);o.find("span:eq(0)").text(r.size),t.addClass("ce-size-got"),ue({title:"获取大小",text:"已获取文件夹大小",icon:"success",timer:1500})}),o.append(i)}async function a1(e){if(!e.sizeSorter)return;console.log("renderHeaderShowSubFolderSize");const t=document.querySelector(".header-size");if(!t||t.classList.contains("ce-injected"))return;const n=t,o=document.createElement("a");o.classList.add("btn-sort"),o.classList.add("ce-size-sort"),o.title="显示当前目录下已加载的子文件夹的大小,然后按大小排序",o.innerHTML=`
    <span>排序</span>
    <i icon_rel="file_size" class="icon-sort-asc"></i>
    <i icon_rel="file_size" class="icon-sort-desc"></i>
  `,o.addEventListener("click",async i=>{if(i.preventDefault(),i.stopPropagation(),!o.classList.contains("el-size-sort-ing"))try{o.classList.add("ce-size-sort-ing");let s=1;o.classList.contains("by-desc")?s=0:s=1;const r=await Vt(!1);await Lr(r,s,!1,!1),s===0?(o.classList.remove("by-desc"),o.classList.add("by-asc")):(o.classList.remove("by-asc"),o.classList.add("by-desc"))}catch(s){console.error(s)}finally{o.classList.remove("ce-size-sort-ing")}}),n.appendChild(o),n.classList.add("ce-injected")}async function gp(e,t){const n=[];for(const o of t){const i=Es(e,{key:`_ce_p_${o.key}`,label:o.label,icon:o.icon,title:o.memo,onClick:async(s,r)=>{r.stopPropagation(),r.preventDefault();try{const a=await Hn();if(!a)return;const c=await _n(a),d=await Pi(),p=await Vs(c,o,d);if(p.includes("v.anxia.com")){const y=(await wo(!1)).find(x=>x.playDuration&&x.playDuration>0);qa(c.id,y);return}if(console.log("[play url]",p),!p)throw new Error("无法获取有效的播放链接!");window.open(p,"_blank","noopener noreferrer")}catch(a){console.error(a),ue({title:"播放失败",text:a.toString(),icon:"error"})}}});n.push(i)}return n}async function l1(e){const t=[...(await Tr()).filter(n=>n.enabled),...(await ti(vn.play)).filter(n=>n.enabled)];return e&&t.length===1?(await gp(Pt,t))[0]:new Pt({key:"_play_with_x",label:"播放全部",icon:"icon-operate ifo-video-play",title:"",onClick:async(n,o)=>{},subItems:[...await gp(mb,t)]})}async function c1(){return new Pt({key:"_rename_dir",label:"重命名文件夹",icon:"icon-operate ifo-rename",title:'重命名当前目录,支持"高级模式"',onClick:async(e,t)=>{await e.closeMenu();const n=await Hn();!n||unsafeWindow.Core.Dir.Rename("1",n.attr("cate_id"),n.attr("title"))}})}async function u1(){return new Pt({key:"_get_tree",label:"导出目录列表数据",icon:"icon-operate ifo-move",title:"获取当前目录的全部层级的文件列表数据,并导出为JSON文件",onClick:async(e,t)=>{await e.closeMenu();const n=await Hn();if(!n)return;const o=await _n(n);await fd(o)}})}async function d1(){return new Pt({key:"_move_dir",label:"移动文件夹",icon:"icon-operate ifo-move",title:"移动当前文件夹到其他位置",onClick:async(e,t)=>{await e.closeMenu();const n=await Hn();!n||await Fa(n,"move",!0)}})}async function f1(){return new Pt({key:"_del_dir",label:"删除文件夹",icon:"icon-operate ifo-remove",title:"删除当前文件夹",onClick:async(e,t)=>{await e.closeMenu();const n=await Hn();if(!n)return;const o=await Hs();unsafeWindow.Core.FileAPI.DeleteFile([n],i=>{n.remove(),o.find("#js_top_header_file_path_box .top-file-path > .file-path").children(":last").prev()[0].click()},!0)}})}async function p1(){return new Pt({key:"_copy_dir",label:"复制文件夹",icon:"icon-operate ifo-copy",title:"复制当前文件夹",onClick:async(e,t)=>{await e.closeMenu();const n=await Hn();!n||await Fa(n,"set_copy",!0)}})}async function h1(){return new Pt({key:"_copy_dir_to",label:"复制文件夹到",icon:"icon-operate ifo-copyto",title:"复制当前文件夹到其他位置",onClick:async(e,t)=>{await e.closeMenu();const n=await Hn();!n||await Fa(n,"copy_list",!0)}})}async function m1(){return new Pt({key:"view_dir_attribute",label:"查看属性",icon:"icon-operate ifo-prop",onClick:async(e,t)=>{await e.closeMenu();const n=await Hn();!n||bo().Core.FileAPI.getAttribute(n,{showPlayLongChange:function(o,i,s){Uw().CACHE.FileMain.List.ResetPlayLongText(o,i,s)}},function(){console.log("查看属性 ok")})}})}async function Mr(e,t){return new Pt({key:`_d_copy_names_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制当前目录下已加载的所有文件名称",onClick:async(n,o)=>{let s=(await wo(!1)).map(r=>r.name);s=await qs(s,t),Xt(s.join(`
`)),ue({title:"复制名称",text:`已复制选中文件名。数量:${s.length},复制类型:${e}`,icon:"success"})}})}async function yp(e,t){return new Pt({key:`_d_copy_paths_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制当前目录下已加载的所有文件路径",onClick:async(n,o)=>{await n.closeMenu();const i=await wo(!1);let s=[];ue({text:"正在获取文件路径...",timer:0}),fe.showLoading();try{s=await dd(i,t),fe.close()}catch(r){console.error(r),ue({text:`获取文件路径失败: ${r}`,timer:6e4,icon:"error"});return}finally{fe.hideLoading()}Xt(s.join(`
`)),ue({title:"复制路径",text:`已复制文件的路径。数量:${s.length},复制类型:${e}`,icon:"success"})}})}async function g1(){return new Pt({key:"show_sub_folder_size",label:"子文件夹大小",title:"显示当前目录下已加载的所有子文件夹的大小,并进行排序",icon:"icon-operate ifo-prop",onClick:async(e,t)=>{await e.closeMenu(),await Lr("",mp.desc,!0)}})}async function wp(e,t){return new Ka({key:`_l_copy_name_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制名称",onClick:async(n,o)=>{await n.closeMenu();const i=await ad();if(!i||!i.n){ue({text:"无法获取名称",timer:1200});return}let s=[i.n];s=await qs(s,t),Xt(s.join(`
`)),ue({title:"复制名称",text:"已复制选中文件名",icon:"success"})}})}async function bp(e,t){return new Ka({key:`_l_copy_path_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制路径",onClick:async(n,o)=>{await n.closeMenu();const i=await ad();if(!i||!i.n){ue({text:"无法获取路径",timer:1200});return}const s=await Ni(i),r=await Ua(s),a=await za(s,r,t);Xt(a),ue({title:"复制路径",text:"已复制文件路径",icon:"success"})}})}let y1=[];async function w1(){const e=[...(await Tr()).filter(t=>t.enabled),...(await ti(vn.play)).filter(t=>t.enabled)];return new Gs({key:"_play_with_x_d",label:"播放",injectDecider:xb,title:"115在线播放",onClick:async(t,n)=>{n.stopPropagation(),n.preventDefault();const o=$(n.target).closest("li"),i=await _n(o),s=rd(i.pickCode);i.isDir&&s.includes("v.anxia.com")?qa(i.id):window.open(s,"_blank","noopener noreferrer")},subItems:[...await tb(Bi,e)]})}async function b1(){const e=[...(await fp()).filter(t=>t.enabled),...y1.filter(t=>t.enabled),...(await ti(vn.search)).filter(t=>t.enabled)];return new Gs({key:"_search_with_name_d",label:"搜索",icon:"",title:"使用名称搜索",onClick:async(t,n)=>{n.stopPropagation(),n.preventDefault();const o=$(n.target).closest("li"),i=await Zo(o),s=ja({search_value:i.n,cid:await Vt()});window.open(s,"_blank","noopener noreferrer")},subItems:[...await eb(Bi,e)]})}async function _1(){return new Bi({injectDecider:Ga,key:"_lh_get_tree",label:"导出目录列表数据",icon:"icon-operate ifo-move",title:"获取该目录的全部层级的文件列表数据,并导出为JSON文件",onClick:async(e,t)=>{t.stopPropagation(),t.preventDefault();const n=$(t.target).closest("li"),o=await _n(n);if(!o.isDir){ue({text:"该功能仅对目录有效",icon:"warning",timer:2e3});return}await fd(o)}})}async function v1(e){const t=[await _p("完整名称",Rt.full),await _p("不含后缀",Rt.pure),new wd({}),await Nr("路径(Unix)",Zt.unixPath),await Nr("路径(Windows)",Zt.winPath),await Nr("上级路径(Unix)",Zt.unixParentPath),await Nr("上级路径(Windows)",Zt.winParentPath)];return e.exportList&&t.push(new wd({injectDecider:Ga}),await _1()),new Gs({key:"_lh_copy_name_path",label:"名称路径",title:"复制文件名称路径",onClick:async(n,o)=>{},subItems:t})}async function _p(e,t){return new Bi({key:`_lh_copy_name_${t}`,label:e,icon:"icon-operate ifo-copy",title:e,onClick:async(n,o)=>{o.stopPropagation(),o.preventDefault();const i=$(o.target).closest("li");let r=[(await Zo(i)).n];r=await qs(r,t),Xt(r.join(`
`)),ue({title:"复制名称",text:`已复制选中文件名,复制类型:${e}`,icon:"success"})}})}async function Nr(e,t){return new Bi({key:`_lh_copy_path_${t}`,label:e,icon:"icon-operate ifo-copy",title:e,onClick:async(n,o)=>{o.stopPropagation(),o.preventDefault();const i=$(o.target).closest("li"),s=await _n(i),r=await Ua(s),a=await za(s,r,t);Xt(a),ue({title:"复制路径",text:`已复制选中路径,复制类型:${e}`,icon:"success"})}})}async function x1(){return new Gs({injectDecider:Ga,key:"_open_in_new_tab",label:"新标签页",icon:"",title:"在新标签页打开",onClick:async(e,t)=>{t.stopPropagation(),t.preventDefault();const n=$(t.target).closest("li"),o=await _n(n);if(!o||!o.id){ue({text:"无法获取目录ID",timer:1200});return}const i=id(o.id);window.open(i,"_blank","noopener noreferrer")}})}async function C1(){return new Wa({key:"_s_smart_mkdir",label:"同名目录",icon:"icon-operate ifo-move",title:"将选中的文件移动到同名目录",onClick:await nb(!0)})}async function $1(){return new Wa({key:"_s_copy_names_paths",label:"名称路径",icon:"icon-operate ifo-copy",showIcon:!1,title:"复制选中文件的名称路径",onClick:async(e,t)=>{},subItems:[await Br("完整名称",Rt.full),await Br("不含后缀",Rt.pure),await Br("完整文件名,去重",Rt.fullUnique),await Br("不含后缀,去重",Rt.pureUnique),new bd({}),await vp("路径(Unix)",Zt.unixPath),await vp("路径(Windows)",Zt.winPath)]})}async function Br(e,t){return new Js({key:`_s_copy_names_${t}`,label:e,icon:"icon-operate ifo-copy",showIcon:!1,title:e,onClick:async(n,o)=>{let s=(await wo(!0)).map(r=>r.name);s=await qs(s,t),Xt(s.join(`
`)),ue({title:"复制名称",text:`已复制选中文件名。数量:${s.length},复制类型:${e}`,icon:"success"})}})}async function vp(e,t){return new Js({key:`_s_copy_path_${t}`,label:e,icon:"icon-operate ifo-copy",showIcon:!1,title:e,onClick:async(n,o)=>{const i=await wo(!0);let s=[];ue({text:"正在获取已选文件路径...",timer:0}),fe.showLoading();try{s=await dd(i,t),fe.close()}catch(r){console.error(r),ue({text:`获取已选文件路径失败: ${r}`,timer:6e4,icon:"error"});return}finally{fe.hideLoading()}Xt(s.join(`
`)),ue({title:"复制路径",text:`已复制选中文件的路径。数量:${s.length},复制类型:${e}`,icon:"success"})}})}async function k1(){const e=[...(await Tr()).filter(t=>t.enabled),...(await ti(vn.play)).filter(t=>t.enabled)];return new Wa({key:"_s_play_with_x_d",label:"播放",title:"播放选中的文件",onClick:async(t,n)=>{throw n.stopPropagation(),n.preventDefault(),new Error("not supported!")},subItems:[...await S1(Js,e),new bd({}),new Js({label:"关于选中播放",onClick:async(t,n)=>{ue({title:"关于选中播放",html:`<p>1.这是一个实验功能。<p>
              <p>2.原理: 生成m3u8文件,上传m3u8文件到115,调用播放该m3u8的CloudDrive2直链。<p>
              <p>3.设定: m3u8默认放在网盘根目录下的「.ce-m3u8-temp」目录下,不会自动清理。<p>
              <p>4.作为使用者需做的: 在CloudDrive2里设置「.ce-m3u8-temp」目录缓存时间为1秒。</p>
              <p>5.导致播放失败的可能: CloudDrive2目录缓存工作异常,导致请求不到m3u8文件,这是已知问题;其他原因,待观察。</p>
            `,showConfirmButton:!0,timer:18e5})},icon:"data-text:❓"})]})}async function E1(e){if(e=e.trim(),!e)throw new Error("m3u8临时目录路径为空!");const t=await Xw(e);if(t.id)return console.log("[ensureM3u8TempDir] result:",t),t.id;throw new Error("创建m3u8临时目录失败!")}async function S1(e,t){const n=[];for(const o of t){const i=Es(e,{key:`_ce_p_${o.key}`,label:o.label,icon:o.icon,title:o.memo,onClick:async(s,r)=>{r.stopPropagation(),r.preventDefault();const a=await ni();try{let c=await wo(!0);if(c=c.filter(T=>T.isDir||T.isVideo||T.isImage),c.length===0){ue({title:"播放失败",text:"没有可以播放的目录或媒体文件!",icon:"error",timer:2e3});return}const d=await E1(a.m3u8TempDir),p=await Qw(c,d);console.log("[selection.buildPlayMenuItems generatePlaylistOn115]",p);const h=p.data,y=await Pi(),x={id:h.file_id,name:h.file_name,parentId:h.cid,sizeBytes:h.file_size,pickCode:h.pick_code,isDir:!1,isFile:!0},_=js([a.m3u8TempDir,x.name],yo.unix);ue({title:"检查m3u8文件",text:"正在检查m3u8文件是否已准备就绪...",icon:"info",timer:0}),fe.showLoading(),await Mw(y,_,1e3,6e4),ue({icon:"success",text:"m3u8文件已准备就绪,即将开始播放..."});const S=await Vs(x,o,y);window.open(S,"_blank","noopener noreferrer")}catch(c){console.error(c),ue({title:"播放失败",text:c.toString(),icon:"error",timer:6e4,showConfirmButton:!0})}finally{fe.hideLoading()}}});n.push(i)}return n}const xp={label:"选中项菜单",key:"selection",selector:"div.list-operate.lo-right",itemSelector:"li[menu={key}]",items:[{enabled:!0,label:"下载",key:"download"},{enabled:!0,label:"移动",key:"move"},{enabled:!0,label:"标签",key:"edit_file_label"},{enabled:!0,label:"重命名",key:"edit_name"},{enabled:!0,label:"备注",key:"edit"},{enabled:!0,label:"星标",key:"star"},{enabled:!0,label:"删除",key:"delete"},{enabled:!0,label:"分享",key:"public_share"},{enabled:!0,label:"设置共享",key:"setShare"},{enabled:!0,label:"取消共享",key:"cancelShare"},{enabled:!0,label:"复制",key:"set_copy"},{enabled:!0,label:"复制到...",key:"copy_list"},{enabled:!0,label:"加密隐藏",key:"hide_file"},{enabled:!0,label:"取消加密",key:"show_file"},{enabled:!0,label:"评分",key:"file_score"},{enabled:!0,label:"设为快捷入口",key:"set_category"},{enabled:!0,label:"显示时长",key:"show_play_long"},{enabled:!0,label:"修改封面",key:"cover"},{enabled:!0,label:"一键排重",key:"same"},{enabled:!0,label:"导出目录树",key:"export_dir"},{enabled:!0,label:"显示属性",key:"attribute"},{enabled:!0,label:"转存至相册",key:"trans_to_album"},{enabled:!0,label:"更多",key:"operate_more"}]},Cp={label:"列表项右键菜单",key:"context",selector:"div.context-menu.menu-upward",itemSelector:"li[val={key}]",items:[{enabled:!0,label:"打开文件",key:"view"},{enabled:!0,label:"打开文件夹",key:"open_dir"},{enabled:!0,label:"下载文件",key:"download"},{enabled:!0,label:"下载文件夹",key:"download_dir"},{enabled:!0,label:"打包下载",key:"bale_download"},{enabled:!0,label:"刷新",key:"refresh"},{enabled:!0,label:"复制",key:"set_copy"},{enabled:!0,label:"复制到...",key:"copy_list"},{enabled:!0,label:"加密隐藏",key:"hide_file"},{enabled:!0,label:"取消加密",key:"show_file"},{enabled:!0,label:"评分",key:"file_score"},{enabled:!0,label:"显示时长",key:"show_play_long"},{enabled:!0,label:"取消时长",key:"hide_play_long"},{enabled:!0,label:"添加到我听",key:"listen"},{enabled:!0,label:"美化",key:"magic"},{enabled:!0,label:"修改封面",key:"cover"},{enabled:!0,label:"删除封面",key:"del_cover"},{enabled:!0,label:"一键排重",key:"same"},{enabled:!0,label:"移动",key:"move"},{enabled:!0,label:"重命名",key:"edit_name"},{enabled:!0,label:"备注",key:"edit"},{enabled:!0,label:"显示属性",key:"attribute"},{enabled:!0,label:"删除",key:"delete"},{enabled:!0,label:"播放器播放",key:"player"},{enabled:!0,label:"转存到相册",key:"trans_to_album"},{enabled:!0,label:"举报",key:"report"}]},$p={label:"列表项悬浮菜单",key:"hover",selector:"div.file-opr[rel=menu]",itemSelector:"a[menu={key}]",items:[{enabled:!0,label:"星标",key:"star"},{enabled:!0,label:"下载文件",key:"download_one"},{enabled:!0,label:"下载文件夹",key:"download_dir_one"},{enabled:!0,label:"移动",key:"move"},{enabled:!0,label:"标签",key:"edit_file_label"},{enabled:!0,label:"重命名",key:"edit_name"},{enabled:!0,label:"备注",key:"edit"},{enabled:!0,label:"删除",key:"delete"},{enabled:!0,label:"分享",key:"public_share"},{enabled:!0,label:"取消加密",key:"show_file"},{enabled:!0,label:"评分",key:"file_score"},{enabled:!0,label:"设置共享",key:"setShare"},{enabled:!0,label:"取消共享",key:"cancelShare"},{enabled:!0,label:"复制",key:"set_copy"},{enabled:!0,label:"更多",key:"more",selector:'[menu_btn="more"]'}]},kp="enabled_official_menu_keys";async function A1(){let e=await Ze.get(kp,["__default__"]);return e.length===1&&e[0]==="__default__"&&(e=await Sp([xp,Cp,$p]),await Ep(e)),e}async function Ep(e){await Ze.set(kp,e)}async function Sp(e){const t=[];return e.forEach(n=>{n.items.forEach(o=>{o.enabled&&t.push(`${n.key}_${o.key}`)})}),t}async function Ap(){const e=[xp,Cp,$p],t=await A1();return e.forEach(n=>{n.items.forEach(o=>{const i=`${n.key}_${o.key}`;t.includes(i)||o.enabled===void 0?o.enabled=!0:o.enabled=!1})}),e}async function P1(){const e=await Ap(),t=[];return e.forEach(n=>{n.items.forEach(o=>{let i=o.enabled?"block":"none";if(t.push(`${n.selector} ${n.itemSelector.replace("{key}",o.key)} { display: ${i} !important; }`),o.selector){t.push(`${n.selector} ${o.selector} { display: ${i} !important; }`);return}const s=n.itemSelector.replace("{key}",o.key);t.push(`${n.selector} ${s} { display: ${i} !important; }`)})}),t.join(`
`)}async function I1(){const e="cloud115EnhancerOfficialMenuStyle",t=await P1();let n=document.getElementById(e);if(n){n.innerHTML=t;return}n=document.createElement("style"),n.id=e,n.innerHTML=t,document.body.appendChild(n)}async function T1(){const{host:e,search:t}=location;if(!e.includes("115.com"))return;console.log("[Cloud115 Enhancer - menu] running..."),O1(),document.addEventListener(Kt.EVENT_CLOSE_MENU,o=>{$("#"+o.detail.menu.key).closest(".context-menu").hide()});const n=await ni();!n.enabled||(L1(n),await ud(n),window.top===window.self&&M1(n),B1(n),(t.includes("ct=file")||t.includes("mode=search"))&&(N1(n),D1(n),Zw(n)))}async function O1(){console.log("[Cloud115 Enhancer - menu] injectUI");const e="ceCustomUrlHelp",t=document.createElement("div");t.id=e,document.body.appendChild(t),oo(W0).mount(`#${e}`)}async function L1(e){!e.manageOfficialMenus||I1()}const Vl=async(e,t)=>{};async function M1(e){const{[Me.dirContext]:t}=e;if(!t.enabled)return;const n=[];t.rename&&n.push(await c1()),t.delete&&n.push(await f1()),t.play&&n.push(await l1(!0)),t.copyNames&&n.push(new Pt({key:"_dir_copy_names",label:"名称路径",icon:"icon-operate ifo-copy",onClick:Vl,subItems:[await Mr("完整名称",Rt.full),await Mr("不含后缀",Rt.pure),await Mr("完整名称,去重",Rt.fullUnique),await Mr("不含后缀,去重",Rt.pureUnique),new gb({}),await yp("路径(Unix)",Zt.unixPath),await yp("路径(Windows)",Zt.winPath)]}));const o=[];t.move&&o.push(await d1()),t.viewProp&&o.push(await m1()),t.showSubFolderSize&&o.push(await g1()),t.copy&&o.push(await p1()),t.copyTo&&o.push(await h1()),t.exportList&&o.push(await u1()),o.length===1?n.push(o[0]):o.length>1&&n.push(new Pt({key:"_dir_more",label:"更多",icon:"icon-operate ifo-open",onClick:Vl,subItems:o})),await new wb({items:n,siblingSelector:'[val="add_dir"]',position:ho.after}).inject(),$(".ce-menu-parent .ce-menu-trigger").on("mouseover",function(){$(this).find(".ce-menu-dropdown").show()}).on("mouseout",function(){$(this).find(".ce-menu-dropdown").hide()})}async function N1(e){const{[Me.listItemHover]:t}=e;if(!t.enabled)return;const n=[];t.openInNewTab&&n.push(await x1()),t.search&&n.push(await b1()),t.play&&n.push(await w1()),t.copyNames&&n.push(await v1(t)),new _b({items:n,position:ho.after,siblingSelector:'[menu="move"]'}).inject()}async function B1(e){const{[Me.listItemContext]:t}=e;if(!t.enabled)return;const n=[];t.copyNames&&n.push(new Ka({key:"_list_item_copy_name_path",label:"名称路径",icon:"icon-operate ifo-copy",onClick:Vl,subItems:[await wp("完整名称",Rt.full),await wp("不含后缀",Rt.pure),new yb({}),await bp("路径(Unix)",Zt.unixPath),await bp("路径(Windows)",Zt.winPath)]})),new bb({items:n,position:ho.after,siblingSelector:'[val="refresh"]',useObserver:!0,observeTarget:document.body,disposeObserverAfterInjection:!1}).inject()}async function D1(e){const{[Me.selection]:t}=e;if(!t.enabled)return;const n=[];location.search.includes("ac=search")||t.moveToSelfNameDir&&n.push(await C1()),t.copyNames&&n.push(await $1()),t.play&&n.push(await k1()),new vb({items:n,position:ho.before,siblingSelector:"ul li"}).inject()}const Pp="offlineExporterConfig";var Kl=(e=>(e.name="name",e.infoHash="infoHash",e.url="url",e))(Kl||{});const R1={name:"名称",infoHash:"哈希",url:"链接"};function F1(e){return{onlyMagnetEd2k:!1,enableOptimization:!0,reqInterval:500,maxPage:0,showInfoHash:!0,enableListManagement:!0,fixGotoPage:!1,enableSearcher:!0,searchMaxPage:5,searchKeywordType:"name",searchStatus:Et.any,searchStopOnFound:!1,searchReqInterval:10,...e}}async function Do(){const e=F1(),t=await Ze.get(Pp,e);return{...e,...t}}async function Ip(e){await Ze.set(Pp,e),window.postMessage({event:pi.configChanged,body:JSON.parse(JSON.stringify(e))},"*")}async function j1(e){const t=await fo("#js-warp"),o=t[0].querySelectorAll("li[complete]");o.length>0&&o.forEach(async s=>{await Tp(s,e)}),z1(e),new MutationObserver(async([s])=>{if(s.type==="childList"){s.addedNodes.forEach(async a=>{await Tp(a,e)});const r=document.querySelector(".ce-checkbox-all input");r.checked=!1,await Dr([])}}).observe(t[0],{childList:!0})}async function U1(e){const t=e;return{complete:t.getAttribute("complete"),cate_id:t.getAttribute("cate_id"),delete_id:t.getAttribute("delete_id"),status:t.getAttribute("status"),suffix:t.getAttribute("suffix"),name:t.getAttribute("name"),hash:t.getAttribute("hash")}}async function Tp(e,t){const n=e,o=await U1(e);V1(n,t,o),H1(n,t,o),q1(n,t,o)}async function H1(e,t,n){if(!t.showInfoHash||e.querySelector(".info-hash"))return;const o=e.querySelector(".file-name"),i=document.createElement("div");i.classList.add("info-hash"),i.textContent=n.hash,i.title=`点击复制${n.hash}`,o.after(i),i.addEventListener("click",()=>{$i(n.hash,"text"),ue({text:"已复制",icon:"success",timer:800})});const s=e.querySelector(".desc-tips");s&&s.style.display!=="none"&&e.classList.add("ce-task-trouble")}async function q1(e,t,n){const o=e.querySelector(".file-operate");if(o.querySelector(".ce-buttons"))return;const i=document.createElement("span");i.className="ce-buttons";const s=document.createElement("a");s.className="pure-button button-mini button-info",s.href=id(n.cate_id),s.target="_blank",s.textContent="打开",s.title="在新标签页打开目录",i.append(s),o.prepend(i)}async function z1(e){if(!e.enableListManagement)return;const t=await fo("#js-main .header-name");if(t.length===0){console.warn("[renderCheckboxAll] 找不到`#js-main .header-name`");return}const n=t[0];let o=n.querySelector(".ce-checkbox-all");o||(o=document.createElement("div"),o.classList.add("ce-checkbox"),o.classList.add("ce-checkbox-all"),o.innerHTML=`
      <input type="checkbox"/>
    `,n.prepend(o)),o.addEventListener("click",()=>{const i=o.querySelector("input").checked;document.querySelectorAll("#js-warp li").forEach(r=>{const a=r.querySelector("input");a.checked=i,r.classList.toggle("ce-selected",i)}),Wl().then(r=>{Dr(r)})})}async function V1(e,t,n){if(!t.enableListManagement||e.querySelector(".ce-checkbox"))return;const o=e.querySelector(".file-name-wrap"),i=document.createElement("div");i.classList.add("ce-checkbox"),i.innerHTML=`
    <input type="checkbox" data-id="${n.hash}" />
  `,o.prepend(i),e.classList.add("ce-show-checkbox"),i.addEventListener("click",async s=>{s.shiftKey?await W1(s,e):await K1(s,e)})}async function K1(e,t){t.classList.toggle("ce-selected");const n=document.querySelector(".ce-checkbox-all input"),o=await Lp(!1);let i=0;for(const r of o)r.classList.contains("ce-selected")&&i++;const s=i===o.length;n.checked=s,n.indeterminate=!s&&i>0,Wl().then(r=>{Dr(r)})}async function W1(e,t){const n=await Lp(!1),o=n.indexOf(t);let i=-1;for(let p=0;p<o;p++)if(n[p].classList.contains("ce-selected")){i=p;break}if(i===-1){for(let p=n.length-1;p>o;p--)if(n[p].classList.contains("ce-selected")){i=p;break}}i=i===-1?o:i;const s=Math.min(i,o),r=Math.max(i,o);let a=0;for(let p=0;p<n.length;p++){const h=n[p],y=h.querySelector(".ce-checkbox input"),x=p>=s&&p<=r;y.checked=x,x&&a++,h.classList.toggle("ce-selected",x)}const c=s===0&&r===n.length-1,d=document.querySelector(".ce-checkbox-all input");d.checked=c,d.indeterminate=!c&&a>0,Wl().then(p=>{Dr(p)})}async function Op(e){const t={info_hash:e.getAttribute("hash"),status:Number(e.getAttribute("status")),name:e.getAttribute("name"),file_id:e.getAttribute("cate_id"),delete_file_id:e.getAttribute("delete_id")};return t.name||(t.name=e.querySelector(".file-name").textContent.trim()),t}async function Lp(e){const t=document.querySelectorAll("#js-warp li"),n=[];return t.forEach(async o=>{const i=o;(!e||i.classList.contains("ce-selected"))&&n.push(i)}),n}async function Wl(){const e=document.querySelectorAll("#js-warp li"),t=[];return e.forEach(async n=>{const o=n;if(o.classList.contains("ce-selected")){const i=await Op(o);t.push(i)}}),t}var pi=(e=>(e.selection="ce-offline-selection",e.configChanged="ce-offline-config-changed",e.searchPageChanged="ce-offline-search-page-changed",e))(pi||{});async function Dr(e){window.postMessage({event:"ce-offline-selection",body:e},"*")}async function Gl(e){document.querySelectorAll("#js-warp li").forEach(async n=>{const o=n,i=o.getAttribute("hash");e.includes(i)&&(o.style.transition="opacity 0.5s",o.style.opacity="0.2",setTimeout(()=>{o.remove()},500))})}async function G1(e,t,n,o){var y;const i=[],s=n.maxPage||5;let r="",a="",c="",d="";n.name!==void 0&&(r=n.caseSensitive?n.name:n.name.toLowerCase()),n.infoHash!==void 0&&(a=n.caseSensitive?n.infoHash:n.infoHash.toLowerCase()),n.url!==void 0&&(c=n.caseSensitive?n.url:n.url.toLowerCase()),n.status!==void 0&&n.status!==Et.any&&n.status.toString()!==""&&(d=n.status.toString());let p=n.stopOnFound||!1;(a||c)&&(p=!0);let h=-1;for(let x=1;x<=s&&!(h>-1&&x>h);x++){window.postMessage({event:"ce-offline-search-page-changed",body:x},"*");const _=await Wu(x,e,t);h===-1&&(h=_.page_count);const S=_.tasks;for(const T of S){const B=n.caseSensitive?T.name:T.name.toLowerCase(),P=n.caseSensitive?T.info_hash:T.info_hash.toLowerCase(),I=n.caseSensitive?T.url:(y=T.url)==null?void 0:y.toLowerCase(),H=r&&n.fuzzyName?B.includes(r):!1,ie=a&&P===a,j=c&&I===c;if((d?d===T.status.toString():!0)&&(H||ie||j)&&(i.push(T),p))break}if(p&&i.length)break;x<s&&await kt(o.searchReqInterval||50)}return i}async function J1(){if(!(await Do()).fixGotoPage)return;const t=await Ei("#js-page");if(!t){console.warn("[fixGotoPage] 找不到`#js-page`");return}const n=async r=>{if(r.key!=="Enter")return;const a=r.target,c=parseInt(a.value);if(isNaN(c)){a.select();return}parent.window.Core.OFFL5Plug.ChangePage(c)},o=async(r=!1)=>{const a=t.querySelector('input[rel="page_jump"]');if(!a)return;const c=document.createElement("input");c.setAttribute("rel","page_jump"),c.type="text",c.style.backgroundColor="#fefcea",c.title="这是 115不大助手 替换的输入框,如果想恢复原有的输入框,请在「离线设置」中关闭「修复输入页码跳转」选项",c.addEventListener("keydown",n),a.insertAdjacentElement("beforebegin",c),a.remove(),r&&c.focus()},i=Bt(async r=>{o(!0)},50),s=new MutationObserver(async([r])=>{r.type==="childList"&&i(r)});o(!1),s.observe(t,{childList:!0})}const Y1={class:"ce-config ce-offline-config"},Q1={class:"pure-form pure-form-aligned offline-exporter-config-form"},X1={class:"pure-control-group"},Z1=f("label",{for:"enableListManagement"},"启用批量管理",-1),ex=f("div",{class:"pure-form-message text-success"}," 可以选中多个任务进行操作,支持shift多选。 ",-1),tx={class:"pure-control-group"},nx=f("label",{for:"showInfoHash"},"显示链接哈希",-1),ox=f("div",{class:"pure-form-message text-success"}," 显示离线任务的哈希文本,点击可以复制。 ",-1),ix={class:"pure-control-group"},sx=f("label",{for:"fixGotoPage"},"修复输入页码跳转",-1),rx=f("div",{class:"pure-form-message text-success"}," 如果官方的输入页码跳转功能异常,可开启此选项。 ",-1),ax=f("div",{class:"ce-tips"},"以下是导出链接相关选项",-1),lx={class:"pure-control-group"},cx=f("label",{for:"onlyMagnetEd2k"},"只取磁力和ED2K链接",-1),ux=f("div",{class:"pure-form-message text-success"}," 导出链接时,只取磁力和ED2K链接,其他比如http链接会被略过。 ",-1),dx={class:"pure-control-group"},fx=f("label",{for:"enableOptimization"},"启用导出优化",-1),px=f("div",{class:"pure-form-message text-success"}," 据观察,离线记录列表是将未完成的记录放在最前面的。如果只需导出未完成链接, 当获取到一个已完成的记录时,便可以停止继续获取后面的记录,节省时间。 ",-1),hx={class:"pure-control-group"},mx=f("label",{for:"reqInterval"},"导出请求数据间隔",-1),gx=f("div",{class:"pure-form-message text-success"}," 导出时请求分页的间隔,单位为毫秒,默认500。 ",-1),yx={class:"pure-control-group"},wx=f("label",{for:"maxPage"},"最多导出页数",-1),bx=f("div",{class:"pure-form-message text-success"}," 0表示不限制,否则表示最多导出的页数。 ",-1),_x=f("div",{class:"ce-tips"},[ce("以下是搜索离线任务相关选项。"),f("small",{class:"text-info"},"提示: 除了关键词,其他搜索条件都会持久保存。")],-1),vx={class:"pure-control-group"},xx=f("label",{for:"reqInterval"},"搜索请求数据间隔",-1),Cx=f("div",{class:"pure-form-message text-success"}," 搜索时请求分页的间隔,单位为毫秒,默认10。 ",-1),Mp=Be({__name:"Config",async setup(e){let t,n;const o=he(([t,n]=nn(()=>Do()),t=await t,n(),t));return Ot(async()=>{}),ct(o,Bt(async i=>{await Ip(i),ue({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0}),(i,s)=>(W(),X("div",Y1,[f("form",Q1,[f("fieldset",null,[f("div",X1,[Z1,ee(f("input",{id:"enableListManagement",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=r=>o.value.enableListManagement=r)},null,512),[[Se,o.value.enableListManagement]]),ex]),f("div",tx,[nx,ee(f("input",{id:"showInfoHash",type:"checkbox","onUpdate:modelValue":s[1]||(s[1]=r=>o.value.showInfoHash=r)},null,512),[[Se,o.value.showInfoHash]]),ox]),f("div",ix,[sx,ee(f("input",{id:"fixGotoPage",type:"checkbox","onUpdate:modelValue":s[2]||(s[2]=r=>o.value.fixGotoPage=r)},null,512),[[Se,o.value.fixGotoPage]]),rx]),ax,f("div",lx,[cx,ee(f("input",{id:"onlyMagnetEd2k",type:"checkbox","onUpdate:modelValue":s[3]||(s[3]=r=>o.value.onlyMagnetEd2k=r)},null,512),[[Se,o.value.onlyMagnetEd2k]]),ux]),f("div",dx,[fx,ee(f("input",{id:"enableOptimization",type:"checkbox","onUpdate:modelValue":s[4]||(s[4]=r=>o.value.enableOptimization=r)},null,512),[[Se,o.value.enableOptimization]]),px]),f("div",hx,[mx,ee(f("input",{id:"reqInterval",type:"number","onUpdate:modelValue":s[5]||(s[5]=r=>o.value.reqInterval=r),min:50},null,512),[[qe,o.value.reqInterval]]),gx]),f("div",yx,[wx,ee(f("input",{id:"maxPage",type:"number","onUpdate:modelValue":s[6]||(s[6]=r=>o.value.maxPage=r),min:0},null,512),[[qe,o.value.maxPage]]),bx]),_x,f("div",vx,[xx,ee(f("input",{id:"reqInterval",type:"number","onUpdate:modelValue":s[7]||(s[7]=r=>o.value.searchReqInterval=r),min:10},null,512),[[qe,o.value.searchReqInterval]]),Cx])])])]))}}),IM="",$x={class:"ce-offline-exporter"},kx={key:0},Ex=f("button",{type:"button",class:"pure-button button-mini"},"设置",-1),Sx=Be({__name:"OflineExporter",setup(e){const t=`\r
`;let n,o;const i=he([]);let s={};Ft(async()=>{s=await Do(),n=await Ju(),console.log("[profile]",n),o=await Gu(),console.log("[space]",o),r(),await j1(s)});async function r(){window.addEventListener("message",S=>{const{event:T,body:B}=S.data;switch(T){case pi.selection:i.value=B;break;case pi.configChanged:s=B;break}},!1)}async function a(S=!1,T=""){const{isConfirmed:B,value:P}=await fe.fire({title:"根据链接删除离线任务",html:`
      <div>每行一个链接,支持磁力链接和ED2K链接</div>
      <div>
        <label class="swal2-checkbox" style="display: flex;">
          <input type="checkbox" id="swalDeleteFile">
          <span class="swal2-label">同时删除文件</span>
        </label>
      </div>
      <div>
        <textarea id="swalUrls" aria-label="每行一个链接" class="swal2-textarea" placeholder="每行一个链接" style="width:80%;"></textarea>
      </div>
    `,focusConfirm:!1,didOpen:()=>{const ie=document.getElementById("swalDeleteFile");ie.checked=S;const j=document.getElementById("swalUrls");j.value=T,j.focus()},preConfirm:()=>{const ie=document.getElementById("swalDeleteFile"),j=document.getElementById("swalUrls");return{deleteFile:ie?ie.checked:!1,urls:j?j.value:""}},width:620,inputPlaceholder:"每行一个",inputAttributes:{"aria-label":"每行一个"},showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消"});if(!B)return;if(P===void 0){alert("请输入链接!");return}const I=[],H=P.urls.trim().split(`
`);for(let ie=0;ie<H.length;ie++){const j=H[ie].trim();if(Fc(j)||jc(j)){const ne=Hc(j);ne&&I.push(ne.toLowerCase())}}fe.showLoading(),fe.update({html:"正在删除..."}),await Da(I,o,P.deleteFile,n.user_id),ue({icon:"success",title:"删除成功!请刷新页面查看最新的列表。",timer:3e4,position:"top-end"}),await Gl(I)}async function c(){const S=i.value.map(I=>I.info_hash);if(!S.length)return;const{isConfirmed:T,value:B}=await fe.fire({title:"批量删除",icon:"warning",html:`确定要删除选中的 ${S.length} 个离线记录吗?`,input:"checkbox",inputValue:0,inputPlaceholder:"同时删除文件",showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消"});if(!T)return;const P=!!B;fe.showLoading(),fe.update({html:"正在删除..."}),await Da(S,o,P,n.user_id),ue({icon:"success",title:"删除成功",timer:800,position:"top-end"}),await Gl(S),i.value=[]}async function d(S){const T=[S];s.onlyMagnetEd2k&&T.push(St.magnetEd2k),console.log("[filters]",T),await _(o.sign,n.user_id,T)}function p(S,T){if(!T.length||T.length===1&&T[0]==="all")return S;const B={[Et.failed]:St.failed,[Et.illegal]:St.failed,[Et.ing]:St.failed,[Et.success]:St.success};return S=S.filter(P=>{if(!P.url&&!P.info_hash)return!1;const I=B[P.status];return T.includes(St.all)||I&&T.includes(I)?!(T.includes(St.magnetEd2k)&&(!Wm(P.info_hash)||P.url&&!Fc(P.url)&&!jc(P.url))):!1}),S}async function h(S,T,B){let P=[],I=1,H=0;for(;;){fe.update({html:`正在导出... 进度:第 ${I} 页`+(H?` / ${H}`:"")});const ie=await Wu(I,S,T);if(!ie.tasks||!ie.tasks.length)break;if(H===0&&s.maxPage>0?H=Math.min(ie.page_count,s.maxPage):H=ie.page_count,P=[...P,...p(ie.tasks,B)],s.enableOptimization&&B.includes(St.failed)&&y(ie.tasks)){console.warn("由于开启了导出优化,且检测到已获取的记录中至少有一个「已完成」的记录,将不再获取剩下的记录");break}if(I>=H)break;I++,await kt(s.reqInterval)}return P}function y(S){for(const T of S)if(T.status===Et.success)return!0;return!1}async function x(){const S=[St.all];s.onlyMagnetEd2k&&S.push(St.magnetEd2k),console.log("[filters]",S);const T=i.value;if(!T.length)return;const B=[];T.forEach(P=>{!P.url&&P.info_hash&&(P.url=Uc(P.info_hash)),B.push(P.url)}),B.length&&($i(B.join(t),"text"),console.log("[links]",B),await fe.fire({title:"导出成功",icon:"success",html:`成功导出 ${B.length} 个链接,请粘贴到文本文件。`,showDenyButton:!0,denyButtonText:"保存到txt",allowEscapeKey:!1,allowOutsideClick:!1,preDeny:async()=>(console.log("[saveAs]"),ua(B.join(t),`115离线链接_数量${B.length}_${ki()}.txt`),!1)}))}async function _(S,T,B){fe.fire({title:"导出离线链接",html:"正在导出...",didOpen:()=>{fe.showLoading()}});const P=await h(S,T,B);if(fe.hideLoading(),!P.length){await fe.fire({title:"导出失败",icon:"error",html:"查询不到符合条件的离线记录!"});return}const I=[];if(P.forEach(H=>{!H.url&&H.info_hash&&(H.url=Uc(H.info_hash)),I.push(H.url)}),!I.length){await fe.fire({title:"导出失败",icon:"error",html:"未完成的离线记录中没有磁力或HTTP链接!"});return}$i(I.join(t),"text"),console.log("[links]",I),await fe.fire({title:"导出成功",icon:"success",html:`成功导出 ${I.length} 个链接,请粘贴到文本文件。`,showDenyButton:!0,denyButtonText:"保存到txt",allowEscapeKey:!1,allowOutsideClick:!1,preDeny:async()=>(console.log("[saveAs]"),ua(I.join(t),`115离线链接_数量${I.length}_${ki()}.txt`),!1)})}return(S,T)=>{const B=Oo("VDropdown");return W(),X("span",$x,[i.value.length?(W(),X("span",kx,[f("button",{type:"button",class:"pure-button button-small button-error",onClick:c},[ce("删除("),f("span",null,ye(i.value.length),1),ce(")")]),ce("      ")])):Ge("",!0),f("button",{type:"button",class:"pure-button button-mini button-error",onClick:T[0]||(T[0]=P=>a(!1,"")),title:"填写链接以删除对应的离线任务"},"根据链接删除"),ce("   "),i.value.length?(W(),X("button",{key:1,type:"button",class:"pure-button button-mini button-warning",onClick:x,title:"导出选中任务的链接"},[ce("导出已选"),f("span",null,"("+ye(i.value.length)+")",1)])):Ge("",!0),f("button",{type:"button",class:"pure-button button-mini button-error",onClick:T[1]||(T[1]=P=>d(de(St).failed)),title:"导出未完成链接"},"导出未完成"),f("button",{type:"button",class:"pure-button button-mini button-success",onClick:T[2]||(T[2]=P=>d(de(St).success)),title:"导出已完成链接"},"导出已完成"),f("button",{type:"button",class:"pure-button button-mini button-warning",onClick:T[3]||(T[3]=P=>d(de(St).all)),title:"导出全部链接"},"导出全部"),ce("   "),Ce(B,{distance:5,"arrow-padding":10},{popper:We(()=>[(W(),Gt(mf,null,{default:We(()=>[Ce(Mp)]),_:1}))]),default:We(()=>[Ex]),_:1})])}}}),TM="",Ax=["cate_id","delete_id","status","hash"],Px={class:"file-name-wrap"},Ix={class:"file-name"},Tx={task_popup:"goto",href:"javascript:;",class:"name"},Ox={rel:"name"},Lx={class:"desc-tips",rel:"file_down_violations"},Mx={class:"txt-red",rel:"file_down_tips"},Nx=["filename"],Bx={class:"file-size"},Dx={class:"file-process"},Rx=f("i",{class:"icon-file-status ifst-failure"},null,-1),Fx=f("span",{rel:"progress"},"下载失败",-1),jx=f("i",{class:"icon-file-status ifst-success"},null,-1),Ux=f("span",{rel:"progress"},"下载成功",-1),Hx=f("i",{class:"icon-file-status ifst-downing"},null,-1),qx={rel:"progress"},zx=f("i",{class:"icon-file-status ifst-violation"},null,-1),Vx=f("span",{rel:"progress"},"违规",-1),Kx=f("i",{class:"icon-file-status ifst-failure"},null,-1),Wx=f("span",{rel:"progress"},"[未知]",-1),Gx={class:"file-operate",rel:"opt"},Jx=f("a",{href:"javascript:;",task_popup:"goto"},[f("i",{class:"icon-operate ifo-opendir"}),f("s",null,"跳转到目录")],-1),Yx=["cp_href"],Qx=[f("i",{class:"icon-operate ifo-copy"},null,-1),f("s",null,"复制",-1)],Xx=f("a",{href:"javascript:;",class:"btn-delete-offline"},[f("i",{class:"icon-operate ifo-remove"}),f("s",null,"删除")],-1),Zx=Be({__name:"OfflineItem",props:{item:null,space:null,profile:null},setup(e){const t=e,n=to(()=>t.item.percentDone?parseInt(t.item.percentDone.toString()):0),o=to(()=>{const{name:r,del_path:a}=t.item;let c=r.replace(/^.*\./,"");return a&&/\/$/.test(a)&&(c="folder"),/^[a-z\d]+$/i.test(c)||(c="unknown"),c}),i=to(()=>t.item.err===10016?"文件内含违规内容":""),s=to(()=>t.item.can_appeal===1);return(r,a)=>(W(),X("li",{complete:"",cate_id:e.item.file_id,delete_id:e.item.delete_file_id,status:e.item.status,hash:e.item.info_hash},[f("div",Px,[f("i",{class:Ye(["file-type",`tp-${de(o)}`])},null,2),f("div",Ix,[f("em",null,[f("a",Tx,[f("span",Ox,ye(e.item.name),1)])])]),ee(f("div",Lx,[f("span",Mx,ye(de(i)),1),ee(f("a",{href:"javascript:;",class:"btn-link",filename:e.item.name,rel:"violations_down_btn"},"去申诉",8,Nx),[[Yt,de(s)]])],512),[[Yt,de(i)]])]),f("div",Bx,[f("span",null,ye(de(Ss)(e.item.size)),1)]),f("div",Dx,[e.item.status===de(Et).failed?(W(),X(De,{key:0},[Rx,Fx],64)):e.item.status===de(Et).success?(W(),X(De,{key:1},[jx,Ux],64)):e.item.status===de(Et).ing?(W(),X(De,{key:2},[Hx,f("span",qx,ye(de(n))+"%",1)],64)):e.item.status===de(Et).illegal?(W(),X(De,{key:3},[zx,Vx],64)):(W(),X(De,{key:4},[Kx,Wx],64))]),f("div",Gx,[Jx,f("a",{href:"javascript:;",cp_href:e.item.url,task_popup:"copy"},Qx,8,Yx),Xx])],8,Ax))}}),eC={class:"ce-offline-list"},tC=Be({__name:"OfflineList",props:{items:null,space:null,profile:null},setup(e){return(t,n)=>(W(),X("div",eC,[f("ul",null,[(W(!0),X(De,null,nt(e.items,(o,i)=>(W(),Gt(Zx,{Key:i,item:o,space:e.space,profile:e.profile},null,8,["Key","item","space","profile"]))),256))])]))}}),nC={inline:"",class:"pure-form search-form",size:"small"},oC={class:"form-item",label:"关键词"},iC=["value"],sC={class:"form-item"},rC=["onKeyup"],aC={class:"form-item",label:"状态"},lC=["value"],cC=["value"],uC={class:"form-item",label:"页数"},dC=f("small",null,"页",-1),fC={class:"form-item"},pC={key:0,title:"根据「名称」查找时,是否在找到一个结果时停止继续查找"},hC={key:0,class:"search-tips"},mC={class:"tips-body"},gC={key:0},yC=Be({__name:"OfflineSearcher",setup(e){let t,n;const o=he(),i=he({KeywordType:Kl.name,keyword:"",status:Et.any,maxPage:5,stopOnFound:!1});let s={...i.value};const r=he(null),a=he(!1),c=he([]),d=he(null),p=he({content:"",subContent:"",visible:!1});Ft(async()=>{t=await Ju(),n=await Gu(),o.value=await Do(),i.value.KeywordType=o.value.searchKeywordType,i.value.status=o.value.searchStatus,i.value.maxPage=o.value.searchMaxPage,i.value.stopOnFound=o.value.searchStopOnFound,s={...i.value},document.body.addEventListener("click",j=>{H(j)}),h()}),ct(i,Bt(async j=>{console.log("[searchParams changed]",Rc(j)),x()},200),{deep:!0});async function h(){window.addEventListener("message",j=>{const{event:ne,body:ae}=j.data;switch(ne){case pi.searchPageChanged:y(ae);break;case pi.configChanged:o.value={...ae};break}},!1)}async function y(j){console.log("[handleSearchPageChanged]",j),await ie({subContent:`正在搜索第 ${j} 页...`,visible:!0})}async function x(){const j=await Do();let ne=0;s.KeywordType!==i.value.KeywordType&&(j.searchKeywordType=i.value.KeywordType,ne++),s.status!==i.value.status&&(j.searchStatus=i.value.status,ne++),s.maxPage!==i.value.maxPage&&(j.searchMaxPage=i.value.maxPage,ne++),s.stopOnFound!==i.value.stopOnFound&&(j.searchStopOnFound=i.value.stopOnFound,ne++),ne&&(await Ip(j),console.log("[handleSearchParamsChange]",j),o.value={...j}),s={...i.value}}async function _(j){var ne;(ne=r.value)==null||ne.select()}async function S(j){var ne;i.value.keyword="",(ne=r.value)==null||ne.focus()}async function T(){c.value=[],i.value.keyword="",s={...i.value},await ie({visible:!1}),await P(!1);try{parent.window.Core.OFFL5Plug.ChangePage(1)}catch(j){console.error(j)}}async function B(){var ne;c.value=[];let{keyword:j}=i.value;if(j=j.trim(),j===""){await Gi(),(ne=r.value)==null||ne.select(),zs.fire({icon:"warning",title:"关键词不能为空!"});return}a.value=!0,await ie({content:"正在搜索...",subContent:"",visible:!0});try{const ae={status:i.value.status,maxPage:i.value.maxPage,fuzzyName:!0,caseSensitive:!1,stopOnFound:i.value.stopOnFound};ae[i.value.KeywordType]=i.value.keyword,ae.infoHash&&(ae.infoHash=Hc(ae.infoHash)),console.log("[search filter]",ae);const pe=await G1(n.sign,t.user_id,ae,o.value);c.value=pe,console.log("[search result]",pe),pe.length>0?await ie({visible:!1}):await ie({content:"没有符合条件的离线任务",subContent:"",visible:!0}),await P(!0)}catch(ae){console.warn("[search error]",ae),zs.fire({icon:"error",title:ae.toString()}),await ie({content:"搜索失败!",subContent:ae.toString(),visible:!0})}finally{a.value=!1}}async function P(j=!0){var pe,Ae;!c.value.length&&j&&zs.fire({icon:"warning",html:"没有符合条件的离线任务"}),await Gi();const ne=(pe=d.value)==null?void 0:pe.querySelector("ul");if(!ne)return;const ae=document.querySelector("ul#js-warp");ae&&(ae.innerHTML=ne.innerHTML),await I(),(Ae=r.value)==null||Ae.focus()}async function I(){const j=c.value.length,ne=document.querySelector("#js-page");if(!ne)return;const ae=ne.querySelector(".left-bvf span");ae.textContent=`共搜索到 ${j} 个结果`;const pe=ne.querySelector(".pagination .con");pe.style.display="none"}async function H(j){let ne=j.target;if(ne.classList.contains("ifo-remove")&&(ne=ne.closest("a")),!ne.classList.contains("btn-delete-offline"))return;const ae=ne.closest("li"),pe=await Op(ae),Ae=[pe.info_hash];let ge={title:"删除离线记录",icon:"warning",html:`确定要删除「${pe.name}」吗?`,showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消"};pe.delete_file_id&&(ge={...ge,input:"checkbox",inputValue:0,inputPlaceholder:"同时删除文件"});const{isConfirmed:O,value:se}=await fe.fire(ge);if(!O)return;const Y=!!se;fe.showLoading(),fe.update({html:"正在删除..."}),await Da(Ae,n,Y,t.user_id),ue({icon:"success",title:"删除成功",timer:800,position:"top-end"}),await Gl(Ae)}async function ie(j){p.value={...p.value,...j}}return(j,ne)=>(W(),X("div",{class:Ye(["ce-offline-searcher",{loading:a.value}])},[f("form",nC,[f("fieldset",null,[f("div",oC,[ee(f("select",{"onUpdate:modelValue":ne[0]||(ne[0]=ae=>i.value.KeywordType=ae),size:"small",onChange:_},[(W(!0),X(De,null,nt(de(R1),(ae,pe)=>(W(),X("option",{key:pe,value:pe},ye(ae),9,iC))),128))],544),[[cs,i.value.KeywordType]])]),f("div",sC,[f("div",{class:Ye(["clearable-wrap",{"is-empty":i.value.keyword===""}])},[ee(f("input",{ref_key:"refKeyword",ref:r,"onUpdate:modelValue":ne[1]||(ne[1]=ae=>i.value.keyword=ae),placeholder:"请输入关键词",clearable:"",onKeyup:lp(B,["enter"])},null,40,rC),[[qe,i.value.keyword]]),f("button",{type:"button",class:"pure-button pure-button-default button-xsmall btn-clear",onClick:S},"×")],2)]),f("div",aC,[ee(f("select",{"onUpdate:modelValue":ne[2]||(ne[2]=ae=>i.value.status=ae),placeholder:"请选择",clearable:"",style:{width:"90px"}},[f("option",{value:de(Et).any},"-状态-",8,lC),(W(!0),X(De,null,nt(de(Xm),(ae,pe)=>(W(),X("option",{key:pe,value:pe},ye(ae),9,cC))),128))],512),[[cs,i.value.status]])]),f("div",uC,[ee(f("input",{type:"number","onUpdate:modelValue":ne[3]||(ne[3]=ae=>i.value.maxPage=ae),min:1,max:1e5,title:"最多查找页数"},null,512),[[qe,i.value.maxPage]]),dC]),f("div",fC,[i.value.KeywordType===de(Kl).name?(W(),X("label",pC,[ee(f("input",{type:"checkbox","onUpdate:modelValue":ne[4]||(ne[4]=ae=>i.value.stopOnFound=ae),class:"stop-on-found"},null,512),[[Se,i.value.stopOnFound]]),ce(" 找到即停 ")])):Ge("",!0),f("button",{type:"button",class:"pure-button pure-button-primary button-small",onClick:B},"查找"),ce("    "),f("button",{type:"button",class:"pure-button pure-button-default button-xsmall",onClick:T,title:"清空关键词;重置列表到非查找状态"},"重置")])])]),f("div",{ref_key:"refList",ref:d,class:"list"},[Ce(tC,{items:c.value,space:de(n),profile:de(t)},null,8,["items","space","profile"])],512),p.value.visible?(W(),X("div",hC,[f("div",mC,[f("h2",null,ye(p.value.content),1),p.value.subContent?(W(),X("p",gC,ye(p.value.subContent),1)):Ge("",!0)])])):Ge("",!0)],2))}}),MM="";function In(e){return e.split("-")[0]}function hi(e){return e.split("-")[1]}function fs(e){return["top","bottom"].includes(In(e))?"x":"y"}function Jl(e){return e==="y"?"height":"width"}function Np(e){let{reference:t,floating:n,placement:o}=e;const i=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2;let r;switch(In(o)){case"top":r={x:i,y:t.y-n.height};break;case"bottom":r={x:i,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:s};break;case"left":r={x:t.x-n.width,y:s};break;default:r={x:t.x,y:t.y}}const a=fs(o),c=Jl(a);switch(hi(o)){case"start":r[a]=r[a]-(t[c]/2-n[c]/2);break;case"end":r[a]=r[a]+(t[c]/2-n[c]/2);break}return r}const wC=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n;if(r==null&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),s.filter(x=>{let{name:_}=x;return _==="autoPlacement"||_==="flip"}).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement`","middleware detected. This will lead to an infinite loop. Ensure only","one of either has been passed to the `middleware` array."].join(" "));let a=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=Np({...a,placement:o}),p=o,h={},y=0;for(let x=0;x<s.length;x++){if(y++,y>100)throw new Error(["Floating UI: The middleware lifecycle appears to be","running in an infinite loop. This is usually caused by a `reset`","continually being returned without a break condition."].join(" "));const{name:_,fn:S}=s[x],{x:T,y:B,data:P,reset:I}=await S({x:c,y:d,initialPlacement:o,placement:p,strategy:i,middlewareData:h,rects:a,platform:r,elements:{reference:e,floating:t}});if(c=T!=null?T:c,d=B!=null?B:d,h={...h,[_]:P!=null?P:{}},I){typeof I=="object"&&(I.placement&&(p=I.placement),I.rects&&(a=I.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x:c,y:d}=Np({...a,placement:p})),x=-1;continue}}return{x:c,y:d,placement:p,strategy:i,middlewareData:h}};function bC(e){return{top:0,right:0,bottom:0,left:0,...e}}function Bp(e){return typeof e!="number"?bC(e):{top:e,right:e,bottom:e,left:e}}function Yl(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Rr(e,t){t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:r,strategy:a}=e,{boundary:c="clippingParents",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:y=0}=t,x=Bp(y),S=r[h?p==="floating"?"reference":"floating":p],T=await i.getClippingClientRect({element:await i.isElement(S)?S:S.contextElement||await i.getDocumentElement({element:r.floating}),boundary:c,rootBoundary:d}),B=Yl(await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p==="floating"?{...s.floating,x:n,y:o}:s.reference,offsetParent:await i.getOffsetParent({element:r.floating}),strategy:a}));return{top:T.top-B.top+x.top,bottom:B.bottom-T.bottom+x.bottom,left:T.left-B.left+x.left,right:B.right-T.right+x.right}}const _C=Math.min,Ro=Math.max;function Ql(e,t,n){return Ro(e,_C(t,n))}const vC=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:o=0}=e!=null?e:{},{x:i,y:s,placement:r,rects:a,platform:c}=t;if(n==null)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const d=Bp(o),p={x:i,y:s},h=In(r),y=fs(h),x=Jl(y),_=await c.getDimensions({element:n}),S=y==="y"?"top":"left",T=y==="y"?"bottom":"right",B=a.reference[x]+a.reference[y]-p[y]-a.floating[x],P=p[y]-a.reference[y],I=await c.getOffsetParent({element:n}),H=I?y==="y"?I.clientHeight||0:I.clientWidth||0:0,ie=B/2-P/2,j=d[S],ne=H-_[x]-d[T],ae=H/2-_[x]/2+ie,pe=Ql(j,ae,ne);return{data:{[y]:pe,centerOffset:ae-pe}}}}),xC={left:"right",right:"left",bottom:"top",top:"bottom"};function Fr(e){return e.replace(/left|right|bottom|top/g,t=>xC[t])}function Dp(e,t){const n=hi(e)==="start",o=fs(e),i=Jl(o);let s=o==="x"?n?"right":"left":n?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Fr(s)),{main:s,cross:Fr(s)}}const CC={start:"end",end:"start"};function Xl(e){return e.replace(/start|end/g,t=>CC[t])}const $C=["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function kC(e,t,n){return(e?[...n.filter(i=>hi(i)===e),...n.filter(i=>hi(i)!==e)]:n.filter(i=>In(i)===i)).filter(i=>e?hi(i)===e||(t?Xl(i)!==i:!1):!0)}const EC=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,i,s,r,a;const{x:c,y:d,rects:p,middlewareData:h,placement:y}=t,{alignment:x=null,allowedPlacements:_=$C,autoAlignment:S=!0,...T}=e;if((n=h.autoPlacement)!=null&&n.skip)return{};const B=kC(x,S,_),P=await Rr(t,T),I=(o=(i=h.autoPlacement)==null?void 0:i.index)!=null?o:0,H=B[I],{main:ie,cross:j}=Dp(H,p);if(y!==H)return{x:c,y:d,reset:{placement:B[0]}};const ne=[P[In(H)],P[ie],P[j]],ae=[...(s=(r=h.autoPlacement)==null?void 0:r.overflows)!=null?s:[],{placement:H,overflows:ne}],pe=B[I+1];if(pe)return{data:{index:I+1,overflows:ae},reset:{placement:pe}};const Ae=ae.slice().sort((O,se)=>O.overflows[0]-se.overflows[0]),ge=(a=Ae.find(O=>{let{overflows:se}=O;return se.every(Y=>Y<=0)}))==null?void 0:a.placement;return{data:{skip:!0},reset:{placement:ge!=null?ge:Ae[0].placement}}}}};function SC(e){const t=Fr(e);return[Xl(e),t,Xl(t)]}const AC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:a}=t;if((n=s.flip)!=null&&n.skip)return{};const{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",flipAlignment:y=!0,...x}=e,_=In(i),T=p||(_===a||!y?[Fr(a)]:SC(a)),B=[a,...T],P=await Rr(t,x),I=[];let H=((o=s.flip)==null?void 0:o.overflows)||[];if(c&&I.push(P[_]),d){const{main:ae,cross:pe}=Dp(i,r);I.push(P[ae],P[pe])}if(H=[...H,{placement:i,overflows:I}],!I.every(ae=>ae<=0)){var ie,j;const ae=((ie=(j=s.flip)==null?void 0:j.index)!=null?ie:0)+1,pe=B[ae];if(pe)return{data:{index:ae,overflows:H},reset:{placement:pe}};let Ae="bottom";switch(h){case"bestFit":{var ne;const ge=(ne=H.slice().sort((O,se)=>O.overflows.filter(Y=>Y>0).reduce((Y,ve)=>Y+ve,0)-se.overflows.filter(Y=>Y>0).reduce((Y,ve)=>Y+ve,0))[0])==null?void 0:ne.placement;ge&&(Ae=ge);break}case"initialPlacement":Ae=a;break}return{data:{skip:!0},reset:{placement:Ae}}}return{}}}};function PC(e){let{placement:t,rects:n,value:o}=e;const i=In(t),s=["left","top"].includes(i)?-1:1,r=typeof o=="function"?o({...n,placement:t}):o,{mainAxis:a,crossAxis:c}=typeof r=="number"?{mainAxis:r,crossAxis:0}:{mainAxis:0,crossAxis:0,...r};return fs(i)==="x"?{x:c,y:a*s}:{x:a*s,y:c}}const IC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(t){const{x:n,y:o,placement:i,rects:s}=t,r=PC({placement:i,rects:s,value:e});return{x:n+r.x,y:o+r.y,data:r}}}};function TC(e){return e==="x"?"y":"x"}const OC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:a={fn:T=>{let{x:B,y:P}=T;return{x:B,y:P}}},...c}=e,d={x:n,y:o},p=await Rr(t,c),h=fs(In(i)),y=TC(h);let x=d[h],_=d[y];if(s){const T=h==="y"?"top":"left",B=h==="y"?"bottom":"right",P=x+p[T],I=x-p[B];x=Ql(P,x,I)}if(r){const T=y==="y"?"top":"left",B=y==="y"?"bottom":"right",P=_+p[T],I=_-p[B];_=Ql(P,_,I)}const S=a.fn({...t,[h]:x,[y]:_});return{...S,data:{x:S.x-n,y:S.y-o}}}}},LC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n;const{placement:o,rects:i,middlewareData:s}=t,{apply:r,...a}=e;if((n=s.size)!=null&&n.skip)return{};const c=await Rr(t,a),d=In(o),p=hi(o)==="end";let h,y;d==="top"||d==="bottom"?(h=d,y=p?"left":"right"):(y=d,h=p?"top":"bottom");const x=Ro(c.left,0),_=Ro(c.right,0),S=Ro(c.top,0),T=Ro(c.bottom,0),B={height:i.floating.height-(["left","right"].includes(o)?2*(S!==0||T!==0?S+T:Ro(c.top,c.bottom)):c[h]),width:i.floating.width-(["top","bottom"].includes(o)?2*(x!==0||_!==0?x+_:Ro(c.left,c.right)):c[y])};return r==null||r({...B,...i}),{data:{skip:!0},reset:{rects:!0}}}}};function Zl(e){return(e==null?void 0:e.toString())==="[object Window]"}function io(e){if(e==null)return window;if(!Zl(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function jr(e){return io(e).getComputedStyle(e)}function Tn(e){return Zl(e)?"":e?(e.nodeName||"").toLowerCase():""}function On(e){return e instanceof io(e).HTMLElement}function Ur(e){return e instanceof io(e).Element}function MC(e){return e instanceof io(e).Node}function Rp(e){const t=io(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Hr(e){const{overflow:t,overflowX:n,overflowY:o}=jr(e);return/auto|scroll|overlay|hidden/.test(t+o+n)}function NC(e){return["table","td","th"].includes(Tn(e))}function Fp(e){const t=navigator.userAgent.toLowerCase().includes("firefox"),n=jr(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}const jp=Math.min,ps=Math.max,qr=Math.round;function mi(e,t){t===void 0&&(t=!1);const n=e.getBoundingClientRect();let o=1,i=1;return t&&On(e)&&(o=e.offsetWidth>0&&qr(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&qr(n.height)/e.offsetHeight||1),{width:n.width/o,height:n.height/i,top:n.top/i,right:n.right/o,bottom:n.bottom/i,left:n.left/o,x:n.left/o,y:n.top/i}}function so(e){return((MC(e)?e.ownerDocument:e.document)||window.document).documentElement}function zr(e){return Zl(e)?{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}:{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Up(e){return mi(so(e)).left+zr(e).scrollLeft}function BC(e){const t=mi(e);return qr(t.width)!==e.offsetWidth||qr(t.height)!==e.offsetHeight}function DC(e,t,n){const o=On(t),i=so(t),s=mi(e,o&&BC(t));let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(o||!o&&n!=="fixed")if((Tn(t)!=="body"||Hr(i))&&(r=zr(t)),On(t)){const c=mi(t,!0);a.x=c.x+t.clientLeft,a.y=c.y+t.clientTop}else i&&(a.x=Up(i));return{x:s.left+r.scrollLeft-a.x,y:s.top+r.scrollTop-a.y,width:s.width,height:s.height}}function Vr(e){return Tn(e)==="html"?e:e.assignedSlot||e.parentNode||(Rp(e)?e.host:null)||so(e)}function Hp(e){return!On(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function RC(e){let t=Vr(e);for(;On(t)&&!["html","body"].includes(Tn(t));){if(Fp(t))return t;t=t.parentNode}return null}function ec(e){const t=io(e);let n=Hp(e);for(;n&&NC(n)&&getComputedStyle(n).position==="static";)n=Hp(n);return n&&(Tn(n)==="html"||Tn(n)==="body"&&getComputedStyle(n).position==="static"&&!Fp(n))?t:n||RC(e)||t}function qp(e){return{width:e.offsetWidth,height:e.offsetHeight}}function FC(e){let{rect:t,offsetParent:n,strategy:o}=e;const i=On(n),s=so(n);if(n===s)return t;let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((i||!i&&o!=="fixed")&&((Tn(n)!=="body"||Hr(s))&&(r=zr(n)),On(n))){const c=mi(n,!0);a.x=c.x+n.clientLeft,a.y=c.y+n.clientTop}return{...t,x:t.x-r.scrollLeft+a.x,y:t.y-r.scrollTop+a.y}}function jC(e){const t=io(e),n=so(e),o=t.visualViewport;let i=n.clientWidth,s=n.clientHeight,r=0,a=0;return o&&(i=o.width,s=o.height,Math.abs(t.innerWidth/o.scale-o.width)<.01&&(r=o.offsetLeft,a=o.offsetTop)),{width:i,height:s,x:r,y:a}}function UC(e){var t;const n=so(e),o=zr(e),i=(t=e.ownerDocument)==null?void 0:t.body,s=ps(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),r=ps(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let a=-o.scrollLeft+Up(e);const c=-o.scrollTop;return jr(i||n).direction==="rtl"&&(a+=ps(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:r,x:a,y:c}}function zp(e){return["html","body","#document"].includes(Tn(e))?e.ownerDocument.body:On(e)&&Hr(e)?e:zp(Vr(e))}function Kr(e,t){var n;t===void 0&&(t=[]);const o=zp(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=io(o),r=i?[s].concat(s.visualViewport||[],Hr(o)?o:[]):o,a=t.concat(r);return i?a:a.concat(Kr(Vr(r)))}function HC(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Rp(n)){let o=t;do{if(o&&e===o)return!0;o=o.parentNode||o.host}while(o)}return!1}function qC(e){const t=mi(e),n=t.top+e.clientTop,o=t.left+e.clientLeft;return{top:n,left:o,x:o,y:n,right:o+e.clientWidth,bottom:n+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function Vp(e,t){return t==="viewport"?Yl(jC(e)):Ur(t)?qC(t):Yl(UC(so(e)))}function zC(e){const t=Kr(Vr(e)),o=["absolute","fixed"].includes(jr(e).position)&&On(e)?ec(e):e;return Ur(o)?t.filter(i=>Ur(i)&&HC(i,o)&&Tn(i)!=="body"):[]}function VC(e){let{element:t,boundary:n,rootBoundary:o}=e;const s=[...n==="clippingParents"?zC(t):[].concat(n),o],r=s[0],a=s.reduce((c,d)=>{const p=Vp(t,d);return c.top=ps(p.top,c.top),c.right=jp(p.right,c.right),c.bottom=jp(p.bottom,c.bottom),c.left=ps(p.left,c.left),c},Vp(t,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}const KC={getElementRects:e=>{let{reference:t,floating:n,strategy:o}=e;return{reference:DC(t,ec(n),o),floating:{...qp(n),x:0,y:0}}},convertOffsetParentRelativeRectToViewportRelativeRect:e=>FC(e),getOffsetParent:e=>{let{element:t}=e;return ec(t)},isElement:e=>Ur(e),getDocumentElement:e=>{let{element:t}=e;return so(t)},getClippingClientRect:e=>VC(e),getDimensions:e=>{let{element:t}=e;return qp(t)},getClientRects:e=>{let{element:t}=e;return t.getClientRects()}},WC=(e,t,n)=>wC(e,t,{platform:KC,...n});var GC=Object.defineProperty,JC=Object.defineProperties,YC=Object.getOwnPropertyDescriptors,Kp=Object.getOwnPropertySymbols,QC=Object.prototype.hasOwnProperty,XC=Object.prototype.propertyIsEnumerable,Wp=(e,t,n)=>t in e?GC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ln=(e,t)=>{for(var n in t||(t={}))QC.call(t,n)&&Wp(e,n,t[n]);if(Kp)for(var n of Kp(t))XC.call(t,n)&&Wp(e,n,t[n]);return e},hs=(e,t)=>JC(e,YC(t));function Gp(e,t){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(typeof t[n]=="object"&&e[n]?Gp(e[n],t[n]):e[n]=t[n])}const Mn={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:5e3,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover","focus"],delay:{show:0,hide:400}}}};function gi(e,t){let n=Mn.themes[e]||{},o;do o=n[t],typeof o>"u"?n.$extend?n=Mn.themes[n.$extend]||{}:(n=null,o=Mn[t]):n=null;while(n);return o}function ZC(e){const t=[e];let n=Mn.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=Mn.themes[n.$extend]||{}):n=null;while(n);return t.map(o=>`v-popper--theme-${o}`)}function Jp(e){const t=[e];let n=Mn.themes[e]||{};do n.$extend?(t.push(n.$extend),n=Mn.themes[n.$extend]||{}):n=null;while(n);return t}let Fo=!1;if(typeof window<"u"){Fo=!1;try{const e=Object.defineProperty({},"passive",{get(){Fo=!0}});window.addEventListener("test",null,e)}catch{}}let Yp=!1;typeof window<"u"&&typeof navigator<"u"&&(Yp=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Qp=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),Xp={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart"},Zp={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend"};function eh(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}function tc(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const on=[];let jo=null;const th={};function nh(e){let t=th[e];return t||(t=th[e]=[]),t}let nc=function(){};typeof window<"u"&&(nc=window.Element);function ze(e){return function(t){return gi(t.theme,e)}}const oc="__floating-vue__popper";var oh=()=>Be({name:"VPopper",provide(){return{[oc]:{parentPopper:this}}},inject:{[oc]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:ze("disabled")},positioningDisabled:{type:Boolean,default:ze("positioningDisabled")},placement:{type:String,default:ze("placement"),validator:e=>Qp.includes(e)},delay:{type:[String,Number,Object],default:ze("delay")},distance:{type:[Number,String],default:ze("distance")},skidding:{type:[Number,String],default:ze("skidding")},triggers:{type:Array,default:ze("triggers")},showTriggers:{type:[Array,Function],default:ze("showTriggers")},hideTriggers:{type:[Array,Function],default:ze("hideTriggers")},popperTriggers:{type:Array,default:ze("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:ze("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:ze("popperHideTriggers")},container:{type:[String,Object,nc,Boolean],default:ze("container")},boundary:{type:[String,nc],default:ze("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:ze("strategy")},autoHide:{type:[Boolean,Function],default:ze("autoHide")},handleResize:{type:Boolean,default:ze("handleResize")},instantMove:{type:Boolean,default:ze("instantMove")},eagerMount:{type:Boolean,default:ze("eagerMount")},popperClass:{type:[String,Array,Object],default:ze("popperClass")},computeTransformOrigin:{type:Boolean,default:ze("computeTransformOrigin")},autoMinSize:{type:Boolean,default:ze("autoMinSize")},autoSize:{type:[Boolean,String],default:ze("autoSize")},autoMaxSize:{type:Boolean,default:ze("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:ze("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:ze("preventOverflow")},overflowPadding:{type:[Number,String],default:ze("overflowPadding")},arrowPadding:{type:[Number,String],default:ze("arrowPadding")},arrowOverflow:{type:Boolean,default:ze("arrowOverflow")},flip:{type:Boolean,default:ze("flip")},shift:{type:Boolean,default:ze("shift")},shiftCrossAxis:{type:Boolean,default:ze("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:ze("noAutoFocus")}},emits:["show","hide","update:shown","apply-show","apply-hide","close-group","close-directive","auto-hide","resize","dispose"],data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},shownChildren:new Set,lastAutoHide:!0}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:hs(Ln({},this.classes),{popperClass:this.popperClass}),result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[oc])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:Ln(Ln({shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())}},["triggers","positioningDisabled"].reduce((e,t)=>(e[t]="$_refreshListeners",e),{})),["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})),created(){this.$_isDisposed=!0,this.randomId=`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var o,i;((o=this.parentPopper)==null?void 0:o.lockedChild)&&this.parentPopper.lockedChild!==this||(this.$_pendingHide=!1,(n||!this.disabled)&&(((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.$_pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e,t;!this.$_isDisposed||(this.$_isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=(t=(e=this.referenceNode)==null?void 0:e.call(this))!=null?t:this.$el,this.$_targetNodes=this.targetNodes().filter(n=>n.nodeType===n.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.$_isDisposed||(this.$_isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"),this.$emit("dispose"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){var e;if(this.$_isDisposed||this.positioningDisabled)return;const t={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&t.middleware.push(IC({mainAxis:this.distance,crossAxis:this.skidding}));const n=this.placement.startsWith("auto");if(n?t.middleware.push(EC({alignment:(e=this.placement.split("-")[1])!=null?e:""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(OC({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!n&&this.flip&&t.middleware.push(AC({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(vC({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&t.middleware.push({name:"arrowOverflow",fn:({placement:i,rects:s,middlewareData:r})=>{let a;const{centerOffset:c}=r.arrow;return i.startsWith("top")||i.startsWith("bottom")?a=Math.abs(c)>s.reference.width/2:a=Math.abs(c)>s.reference.height/2,{data:{overflow:a}}}}),this.autoMinSize||this.autoSize){const i=this.autoSize?this.autoSize:this.autoMinSize?"min":null;t.middleware.push({name:"autoSize",fn:({rects:s,placement:r,middlewareData:a})=>{var c;if((c=a.autoSize)!=null&&c.skip)return{};let d,p;return r.startsWith("top")||r.startsWith("bottom")?d=s.reference.width:p=s.reference.height,this.$_innerNode.style[i==="min"?"minWidth":i==="max"?"maxWidth":"width"]=d!=null?`${d}px`:null,this.$_innerNode.style[i==="min"?"minHeight":i==="max"?"maxHeight":"height"]=p!=null?`${p}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,t.middleware.push(LC({boundary:this.boundary,padding:this.overflowPadding,apply:({width:i,height:s})=>{this.$_innerNode.style.maxWidth=i!=null?`${i}px`:null,this.$_innerNode.style.maxHeight=s!=null?`${s}px`:null}})));const o=await WC(this.$_referenceNode,this.$_popperNode,t);Object.assign(this.result,{x:o.x,y:o.y,placement:o.placement,strategy:o.strategy,arrow:Ln(Ln({},o.middlewareData.arrow),o.middlewareData.arrowOverflow)})},$_scheduleShow(e=null,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),jo&&this.instantMove&&jo.instantMove&&jo!==this.parentPopper){jo.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e=null,t=!1){if(this.shownChildren.size>0){this.$_pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(jo=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await tc(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Kr(this.$_referenceNode),...Kr(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),n=this.$_popperNode.querySelector(".v-popper__wrapper"),o=n.parentNode.getBoundingClientRect(),i=t.x+t.width/2-(o.left+n.offsetLeft),s=t.y+t.height/2-(o.top+n.offsetTop);this.result.transformOrigin=`${i}px ${s}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let n=0;n<on.length;n++)t=on[n],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}on.push(this),document.body.classList.add("v-popper--some-open");for(const t of Jp(this.theme))nh(t).push(this),document.body.classList.add(`v-popper--some-open--${t}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await tc(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.$_pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,eh(on,this),on.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of Jp(this.theme)){const o=nh(n);eh(o,this),o.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}jo===this&&(jo=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=gi(this.theme,"disposeTimeout");t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await tc(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.$_isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=n=>{this.isShown&&!this.$_hideInProgress||(n.usedByTooltip=!0,!this.$_preventShow&&this.show({event:n}))};this.$_registerTriggerListeners(this.$_targetNodes,Xp,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],Xp,this.popperTriggers,this.popperShowTriggers,e);const t=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,Zp,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],Zp,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(o=>o.addEventListener(t,n,Fo?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,o,i){let s=n;o!=null&&(s=typeof o=="function"?o(s):o),s.forEach(r=>{const a=t[r];a&&this.$_registerEventListeners(e,a,i)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(n=>{const{targetNodes:o,eventType:i,handler:s}=n;!e||e===i?o.forEach(r=>r.removeEventListener(i,s)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.$_isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const n of this.$_targetNodes){const o=n.getAttribute(e);o&&(n.removeAttribute(e),n.setAttribute(t,o))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const n in e){const o=e[n];o==null?t.removeAttribute(n):t.setAttribute(n,o)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.$_pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(ms>=e.left&&ms<=e.right&&gs>=e.top&&gs<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),n=ms-ro,o=gs-ao,s=t.left+t.width/2-ro+(t.top+t.height/2)-ao+t.width+t.height,r=ro+n*s,a=ao+o*s;return Wr(ro,ao,r,a,t.left,t.top,t.left,t.bottom)||Wr(ro,ao,r,a,t.left,t.top,t.right,t.top)||Wr(ro,ao,r,a,t.right,t.top,t.right,t.bottom)||Wr(ro,ao,r,a,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});typeof document<"u"&&typeof window<"u"&&(Yp?(document.addEventListener("touchstart",ih,Fo?{passive:!0,capture:!0}:!0),document.addEventListener("touchend",t$,Fo?{passive:!0,capture:!0}:!0)):(window.addEventListener("mousedown",ih,!0),window.addEventListener("click",e$,!0)),window.addEventListener("resize",i$));function ih(e){for(let t=0;t<on.length;t++){const n=on[t];try{const o=n.popperNode();n.$_mouseDownContains=o.contains(e.target)}catch{}}}function e$(e){sh(e)}function t$(e){sh(e,!0)}function sh(e,t=!1){const n={};for(let o=on.length-1;o>=0;o--){const i=on[o];try{const s=i.$_containsGlobalTarget=n$(i,e);i.$_pendingHide=!1,requestAnimationFrame(()=>{if(i.$_pendingHide=!1,!n[i.randomId]&&rh(i,s,e)){if(i.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&s){let a=i.parentPopper;for(;a;)n[a.randomId]=!0,a=a.parentPopper;return}let r=i.parentPopper;for(;r&&rh(r,r.$_containsGlobalTarget,e);){r.$_handleGlobalClose(e,t);r=r.parentPopper}}})}catch{}}}function n$(e,t){const n=e.popperNode();return e.$_mouseDownContains||n.contains(t.target)}function rh(e,t,n){return n.closeAllPopover||n.closePopover&&t||o$(e,n)&&!t}function o$(e,t){if(typeof e.autoHide=="function"){const n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function i$(e){for(let t=0;t<on.length;t++)on[t].$_computePosition(e)}let ro=0,ao=0,ms=0,gs=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{ro=ms,ao=gs,ms=e.clientX,gs=e.clientY},Fo?{passive:!0}:void 0);function Wr(e,t,n,o,i,s,r,a){const c=((r-i)*(t-s)-(a-s)*(e-i))/((a-s)*(n-e)-(r-i)*(o-t)),d=((n-e)*(t-s)-(o-t)*(e-i))/((a-s)*(n-e)-(r-i)*(o-t));return c>=0&&c<=1&&d>=0&&d<=1}var Gr=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n};const s$={extends:oh()};function r$(e,t,n,o,i,s){return W(),X("div",{ref:"reference",class:Ye(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[Sn(e.$slots,"default",Sb(Vf(e.slotData)))],2)}var a$=Gr(s$,[["render",r$]]);function l$(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}let Jr;function ic(){ic.init||(ic.init=!0,Jr=l$()!==-1)}var Yr={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){ic(),Gi(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Jr&&this.$el.appendChild(e),e.data="about:blank",Jr||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Jr&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const c$=Q_();J_("data-v-b329ee4c");const u$={class:"resize-observer",tabindex:"-1"};Y_();const d$=c$((e,t,n,o,i,s)=>(W(),Gt("div",u$)));Yr.render=d$,Yr.__scopeId="data-v-b329ee4c",Yr.__file="src/components/ResizeObserver.vue";var ah=(e="theme")=>({computed:{themeClass(){return ZC(this[e])}}});const f$=Be({name:"VPopperContent",components:{ResizeObserver:Yr},mixins:[ah()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),p$=["id","aria-hidden","tabindex","data-popper-placement"],h$={ref:"inner",class:"v-popper__inner"},m$=[f("div",{class:"v-popper__arrow-outer"},null,-1),f("div",{class:"v-popper__arrow-inner"},null,-1)];function g$(e,t,n,o,i,s){const r=Oo("ResizeObserver");return W(),X("div",{id:e.popperId,ref:"popover",class:Ye(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:xn(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=lp(a=>e.autoHide&&e.$emit("hide"),["esc"]))},[f("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=a=>e.autoHide&&e.$emit("hide"))}),f("div",{class:"v-popper__wrapper",style:xn(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[f("div",h$,[e.mounted?(W(),X(De,{key:0},[f("div",null,[Sn(e.$slots,"default")]),e.handleResize?(W(),Gt(r,{key:0,onNotify:t[1]||(t[1]=a=>e.$emit("resize",a))})):Ge("",!0)],64)):Ge("",!0)],512),f("div",{ref:"arrow",class:"v-popper__arrow-container",style:xn(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},m$,4)],4)],46,p$)}var lh=Gr(f$,[["render",g$]]),ch={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};const y$=Be({name:"VPopperWrapper",components:{Popper:a$,PopperContent:lh},mixins:[ch,ah("finalTheme")],props:{theme:{type:String,default:null}},computed:{finalTheme(){var e;return(e=this.theme)!=null?e:this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function w$(e,t,n,o,i,s){const r=Oo("PopperContent"),a=Oo("Popper");return W(),Gt(a,{ref:"popper",theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:Ye([e.themeClass])},{default:We(({popperId:c,isShown:d,shouldMountContent:p,skipTransition:h,autoHide:y,show:x,hide:_,handleResize:S,onResize:T,classes:B,result:P})=>[Sn(e.$slots,"default",{shown:d,show:x,hide:_}),Ce(r,{ref:"popperContent","popper-id":c,theme:e.finalTheme,shown:d,mounted:p,"skip-transition":h,"auto-hide":y,"handle-resize":S,classes:B,result:P,onHide:_,onResize:T},{default:We(()=>[Sn(e.$slots,"popper",{shown:d,hide:_})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},8,["theme","target-nodes","popper-node","class"])}var sc=Gr(y$,[["render",w$]]);const b$=Be(hs(Ln({},sc),{name:"VDropdown",vPopperTheme:"dropdown"})),_$=Be(hs(Ln({},sc),{name:"VMenu",vPopperTheme:"menu"})),v$=Be(hs(Ln({},sc),{name:"VTooltip",vPopperTheme:"tooltip"})),x$=Be({name:"VTooltipDirective",components:{Popper:oh(),PopperContent:lh},mixins:[ch],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>gi(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>gi(e.theme,"loadingContent")}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,n=this.content(this);n.then?n.then(o=>this.onResult(t,o)):this.onResult(t,n)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),C$=["innerHTML"],$$=["textContent"];function k$(e,t,n,o,i,s){const r=Oo("PopperContent"),a=Oo("Popper");return W(),Gt(a,Wf({ref:"popper"},e.$attrs,{theme:e.theme,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:We(({popperId:c,isShown:d,shouldMountContent:p,skipTransition:h,autoHide:y,hide:x,handleResize:_,onResize:S,classes:T,result:B})=>[Ce(r,{ref:"popperContent",class:Ye({"v-popper--tooltip-loading":e.loading}),"popper-id":c,theme:e.theme,shown:d,mounted:p,"skip-transition":h,"auto-hide":y,"handle-resize":_,classes:T,result:B,onHide:x,onResize:S},{default:We(()=>[e.html?(W(),X("div",{key:0,innerHTML:e.finalContent},null,8,C$)):(W(),X("div",{key:1,textContent:ye(e.finalContent)},null,8,$$))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","popper-node","onApplyShow","onApplyHide"])}var E$=Gr(x$,[["render",k$]]);const uh="v-popper--has-tooltip";function S$(e,t){let n=e.placement;if(!n&&t)for(const o of Qp)t[o]&&(n=o);return n||(n=gi(e.theme||"tooltip","placement")),n}function dh(e,t,n){let o;const i=typeof t;return i==="string"?o={content:t}:t&&i==="object"?o=t:o={content:!1},o.placement=S$(o,n),o.targetNodes=()=>[e],o.referenceNode=()=>e,o}let rc,ys,A$=0;function P$(){if(rc)return;ys=he([]),rc=oo({name:"VTooltipDirectiveApp",setup(){return{directives:ys}},render(){return this.directives.map(t=>l0(E$,hs(Ln({},t.options),{shown:t.shown||t.options.shown,key:t.id})))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),rc.mount(e)}function I$(e,t,n){P$();const o=he(dh(e,t,n)),i=he(!1),s={id:A$++,options:o,shown:i};return ys.value.push(s),e.classList&&e.classList.add(uh),e.$_popper={options:o,item:s,show(){i.value=!0},hide(){i.value=!1}}}function fh(e){if(e.$_popper){const t=ys.value.indexOf(e.$_popper.item);t!==-1&&ys.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(uh)}function ph(e,{value:t,modifiers:n}){const o=dh(e,t,n);if(!o.content||gi(o.theme||"tooltip","disabled"))fh(e);else{let i;e.$_popper?(i=e.$_popper,i.options.value=o):i=I$(e,t,n),typeof t.shown<"u"&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?i.show():i.hide())}}var T$={beforeMount:ph,updated:ph,beforeUnmount(e){fh(e)}};function hh(e){e.addEventListener("click",gh),e.addEventListener("touchstart",yh,Fo?{passive:!0}:!1)}function mh(e){e.removeEventListener("click",gh),e.removeEventListener("touchstart",yh),e.removeEventListener("touchend",wh),e.removeEventListener("touchcancel",bh)}function gh(e){const t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function yh(e){if(e.changedTouches.length===1){const t=e.currentTarget;t.$_vclosepopover_touch=!0;const n=e.changedTouches[0];t.$_vclosepopover_touchPoint=n,t.addEventListener("touchend",wh),t.addEventListener("touchcancel",bh)}}function wh(e){const t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){const n=e.changedTouches[0],o=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-o.screenY)<20&&Math.abs(n.screenX-o.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function bh(e){const t=e.currentTarget;t.$_vclosepopover_touch=!1}var O$={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>"u"||t)&&hh(e)},updated(e,{value:t,oldValue:n,modifiers:o}){e.$_closePopoverModifiers=o,t!==n&&(typeof t>"u"||t?hh(e):mh(e))},beforeUnmount(e){mh(e)}};function L$(e,t={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,Gp(Mn,t),e.directive("tooltip",T$),e.directive("close-popper",O$),e.component("VTooltip",v$),e.component("VDropdown",b$),e.component("VMenu",_$))}const ac={version:"2.0.0-beta.20",install:L$,options:Mn},RM="",_h="basic_config",lc={name:"115不大助手",version:"0.5.54",author:{name:"生瓜太保",email:"mailme@miao.com"},greasyforkUrl:"https://greasyfork.org/zh-CN/scripts/474231-115%E4%B8%8D%E5%A4%A7%E5%8A%A9%E6%89%8B-full?locale_override=1"};function M$(e){return{hideSidebar:!0,showOfflineEntry:!1,offlineEntryLabel:"云下载",showAddOffline:!1,addOfflineLabel:"添加",transferDefaultOffline:!1,showFavEntry:!1,favEntryLabel:"星标",hideWatermark:!0,fakeAccountEnabled:!1,fakeAccountId:"",fakeAccountName:"",fakeAccountAvatar:"",fakeAccountVip:"",...e}}async function Qr(){const e=M$(),t=await Ze.get(_h,e);return{...e,...t}}async function N$(e){await Ze.set(_h,e)}async function B$(e){!e.hideSidebar||(console.log("[Cloud115 Enhancer] hideSidebar"),window.top!==window.self?(await rn('[rel="page_top_btn"]')).show():(await rn("#site_left_bar")).hide())}async function D$(e){if(!e.showOfflineEntry)return;const{search:t}=location;if(!t.includes("ct=file"))return;console.log("[Cloud115 Enhancer] showOfflineEntry");const n=await rn("a#js_filter_btn"),o="https://115.com/?ct=index&ac=offline_new_tpl&offline=1&tab=offline",i="background:#fffcea;",s=`点击跳转到「云下载」页面。该按钮由 ${lc.name} 注入`,r=e.offlineEntryLabel?`<span>${e.offlineEntryLabel}</span>`:"",a=$(`<a href="javascript:;" class="button btn-line" title="${s}" tab_btn="wangpan" mode-tab="offline" style="${i}">
    <i class="icon-operate ifo-linktask"></i>
    ${r}
  </a>`);n.after(a),a.on("click",()=>{try{bo().oofUtil.urlMaintain.changeMode("wangpan",{tab:"offline"})}catch(c){console.log('[Cloud115 Enhancer] showOfflineEntry failed with "top.oofUtil.urlMaintain.changeMode".',c),location.href=o}})}async function R$(e){if(!e.showAddOffline)return;const{search:t}=location;if(!t.includes("ct=file"))return;console.log("[Cloud115 Enhancer] showAddOffline");const n=await rn("a#js_filter_btn"),o="background:#fffcea;",i=`点击打开到「添加云下载」对话框。该按钮由 ${lc.name} 注入`,s=e.addOfflineLabel?`<span>${e.addOfflineLabel}</span>`:"",r=$(`<a href="javascript:;" class="button btn-line" menu="offline_task" style="${o}" title="${i}">
    <i class="icon-operate ifo-linktask"></i>${s}
  </a>`);n.after(r)}async function F$(e){if(!e.showFavEntry)return;const{search:t}=location;if(!t.includes("ct=file"))return;console.log("[Cloud115 Enhancer] showFavEntry");const n=await rn("a#js_filter_btn"),o="https://115.com/?tab=label&show_label=1&label_id=-1&mode=wangpan",i="background:#fffcea;",s=`点击跳转到「星标」页面。该按钮由 ${lc.name} 注入`,r=e.favEntryLabel?`<span>${e.favEntryLabel}</span>`:"",a=$(`<a href="javascript:;" class="button btn-line" title="${s}" tab_btn="wangpan" mode-tab="{tab:'label',label_id:-1,show_label:1}" style="${i}">
    <i class="icon-operate ifo-fav"></i>
    ${r}
  </a>`);n.after(a),a.on("click",()=>{try{bo().oofUtil.urlMaintain.changeMode("wangpan",{tab:"label",label_id:-1,show_label:1})}catch(c){console.log('[Cloud115 Enhancer] showFavEntry failed with "top.oofUtil.urlMaintain.changeMode".',c),location.href=o}})}async function j$(e){if(!e.transferDefaultOffline)return;const{search:t}=location;if(window.top!==window||!t.includes("mode=wangpan"))return;console.log("[Cloud115 Enhancer] makeTransferDefaultOffline");const n=await rn('#js_sub_nav_scroller a[mode-tab="upload"]');n.attr("mode-tab","offline").attr("href","https://115.com/?tab=offline&mode=wangpan"),n.find("i").removeClass("icon-ns-transfer").removeClass("icon-nv-file inf-transmit").addClass("icon-operate ifo-linktask").css({filter:"invert(0.6)",marginRight:12,zoom:1.2})}async function U$(e){if(!!e.hideWatermark){console.log("[Cloud115 Enhancer] hideWatermark");try{const t=await Ei('div[class^="fp-"]');t.classList.add("hidden-watermark"),t.style.display="none"}catch(t){console.error("[Cloud115 Enhancer] hideWatermark",t.message)}}}async function H$(e){window.top===window.self&&(await kt(1e3),cc(e),window.addEventListener("message",async t=>{const n=t.data.event,o=t.data.body;n===Mt.basicConfigChange&&(console.log("[Cloud115 Enhancer] basicConfigChange"),cc(o))}))}let ws=null;async function q$(){ws&&clearTimeout(ws),ws=setTimeout(async()=>{const e=await Qr();cc(e)},5e3)}async function cc(e){ws&&clearTimeout(ws);const t=async(n,o)=>{const i=await rn('[rel="user_id"]',100);i.data("origin")||i.data("origin",i.text()),o?i.text(i.data("origin")):i.text(n.fakeAccountId);const s=await rn('[rel="user_name"]',100);s.data("origin")||s.data("origin",$(s[0]).text()),o?s.text(s.data("origin")):s.text(n.fakeAccountName);const r=await rn('img[rel="user_face"], .user-avatar img',100);r.data("origin")||r.data("origin",r.attr("src")),o?r.attr("src",r.data("origin")):(r.attr("rel","noreferrer"),r.attr("src",n.fakeAccountAvatar));const a=await rn(".sign-vip-card",100);a.data("origin")||a.data("origin",$(a[0]).text()),o?a.text(a.data("origin")):a.text(n.fakeAccountVip)};try{e.fakeAccountEnabled?await t(e,!1):await t(e,!0)}catch(n){console.error(n)}finally{e.fakeAccountEnabled&&q$()}}async function z$(){const{host:e,search:t}=location;e!=="115.com"||!t.includes("offline=1&tab=offline")||(await V$(),await K$(),W$(),J1())}async function V$(){console.log("[Cloud115 Enhancer] Injecting offline exporter...");const e="cloud115OfflineExporter",t=await Do();document.body.classList.add("cloud115-page-offline"),t.enableListManagement&&document.body.classList.add("ce-list-m"),$("body").append(`<div id="${e}"/>`);const n=oo(Sx);n.use(ac),n.mount(`#${e}`)}async function K$(){console.log("[Cloud115 Enhancer] Injecting offline searcher...");const e="cloud115OfflineSearcher",t=await Do();document.body.classList.add("cloud115-page-offline"),t.enableSearcher&&document.body.classList.add("ce-list-s"),$("body").append(`<div id="${e}"/>`);const n=oo(yC);n.use(ac),n.mount(`#${e}`)}async function W$(){(await Qr()).hideSidebar&&($('.more-box[rel="transfer_top_btn"]').show(),$('a[menu="upload"]').show(),$('.clp-box[rel="transfer_top_btn"]').show())}var Nn=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.OPEN_CLEANER=1]="OPEN_CLEANER",e[e.CLOSE_CLEANER=2]="CLOSE_CLEANER",e[e.CLEANER_OPENED=3]="CLEANER_OPENED",e[e.INVOKE_FILTER=4]="INVOKE_FILTER",e))(Nn||{});const G$={class:"cloud115-eh-cleaner-trigger"},J$=[f("span",null,"清理文件",-1)],Y$=Be({__name:"Trigger",setup(e){he(!1);const t=he(!0);async function n(a){switch(a.data.type){case Nn.INVOKE_FILTER:await Kw(a.data.payload);break;case Nn.CLEANER_OPENED:await r(a.data.payload);break}}Ft(async()=>{console.log("[CleanerTrigger onMounted]"),window.addEventListener("message",n)}),os(()=>{console.log("[CleanerTrigger onUnmounted]"),window.removeEventListener("message",n)});async function o(){await s(),As({type:Nn.OPEN_CLEANER},window.parent)}let i=0;async function s(){const a=Gm("cid");!a||a==="0"||(clearTimeout(i),i=window.setTimeout(async()=>{ue({icon:"error",text:"打开清理工具失败!"})},1e3))}async function r(a){console.log("成功打开Cleaner"),clearTimeout(i)}return(a,c)=>ee((W(),X("span",G$,[Sn(a.$slots,"default",{},()=>[f("span",{class:"btn-open pure-button pure-button-primary",onClick:o},J$)])],512)),[[Yt,t.value]])}}),jM="";var Ue=(e=>(e[e.suffix=0]="suffix",e[e.keyword=1]="keyword",e))(Ue||{}),ht=(e=>(e[e.append=0]="append",e[e.cover=1]="cover",e[e.clear=2]="clear",e[e.reset=3]="reset",e[e.assign=4]="assign",e))(ht||{}),ut=(e=>(e.none="",e.prepare="查询文件...",e.prepared="查询文件完成",e.prepareFailed="查询失败",e.deleting="删除文件中...",e.success="清理完成",e.failed="清理失败",e))(ut||{});yt.all,tt.all,yt.video,tt.video,yt.audio,tt.audio,yt.image,tt.image,yt.doc,tt.doc,yt.app,tt.app,yt.archive,tt.archive;const Q$=new Map([[tt.all,yt.all],[tt.video,yt.video],[tt.audio,yt.audio],[tt.image,yt.image],[tt.doc,yt.doc],[tt.app,yt.app],[tt.archive,yt.archive]]),Xr="#",vh="#",X$=[{type:Ue.suffix,queryOnly:!1,label:"默认",memo:"请谨慎使用!",size:5,values:["txt","url","html","htm","mht"]},{type:Ue.suffix,queryOnly:!0,label:"🔍115筛选",memo:"仅用于查询",size:102400,values:["#视频","#音频","#图片","#文档","#应用","#压缩包"]}],Z$=["#論壇文宣","#宣傳文本","最新地址","最新网址","论坛地址","永久地址","地址发布","扫码 安装","扫码 下载","免費 掃碼","澳门 赌场","皇冠 赌场","免费18禁手游","免费黄游手游","在线影城","秀场 小视频","裸秀 主播 免费看","第一会所 宣传","SIS 影视联盟",'"最 新 位 址 獲 取"','"社 區 最 新 情 報"','"聚 合 全 網 H 直 播"'],ek=["#論壇文宣","美女 裸聊","秀场 视频","澳门 赌场","皇冠 赌场","影视 联盟","2048 社区","1024 社区","会所 宣传","扫码 安装","社区 关注","免費 掃碼","找回家","防屏蔽","封殺00","秀场 小视频","裸秀 主播 免费看",'"Free Adult Movie"',"奔驰宝马","最新网址","最新免費","免费试用","美女荷官","凤凰娛樂","观看指南","女神在线","更多无水印","免费在线","国产精品","免費原版","獨家資源","成人光碟","最新AV","FDZone","发布器","QR-1024","在這等你","激情祼聊","看妹不用等","真人祼聊","zz.jpg","X8B9.COM.gif","第一会所 宣传","SIS 影视联盟","淘精網","激情咖啡","手機影城","免费手机看片","U視娛樂","加微信","我愛看片手機版","平台正式上線"],tk=[{type:Ue.keyword,queryOnly:!1,label:"默认",memo:"请谨慎使用!",size:100,values:Z$},{type:Ue.keyword,queryOnly:!1,label:"⚠️大杀器⚠️",memo:"请谨慎使用!",size:100,values:ek},{type:Ue.keyword,queryOnly:!0,label:"只查询示例",memo:"这是一个示例",size:10240,values:["奔驰宝马","美女荷官",'"最 新 位 址 獲 取"']}];function Uo(e){return{id:Date.now().toString(),type:e,queryOnly:!1,label:"",values:"",memo:"",size:0,sort:0,createdAt:0,updatedAt:0}}function xh(e,t){e=e.trim();const n=t===Ue.keyword&&nk(e),o=t===Ue.suffix&&ok(e);let i=e;return n&&(i=ik(e)),o&&(i=sk(e).toString()),{type:t,value:e,forDir:n,isFilter:o,pattern:i,num:-1,fileIds:[],size:-1,status:ut.none}}function Ch(e){return[ut.prepare,ut.deleting].includes(e.status)}function nk(e){return new RegExp(`^${Xr}[\\S]{2,}`).test(e)}function ok(e){return new RegExp(`^${vh}[\\S]{2,}`).test(e)}function ik(e){const t=new RegExp(`^${Xr}`);return e.replace(t,"")}function sk(e){const t=new RegExp(`^${vh}`);let n=e.replace(t,"");const o=Q$.get(n);if(!o)throw new Error(`"${e}"不是有效的筛选!`);return o}async function Ho(e,t){let n;typeof e=="string"?n=e.split(/[\r\n]+/):n=e;const o=new Set;for(let s=0;s<n.length;s++){const r=n[s].trim();r.length>1&&o.add(r)}const i=[];return o.forEach(s=>{i.push(xh(s,t))}),i}function $h(e){return/(^'.+'$)|(^".+"$)/.test(e)}function uc(e){return $h(e)?e.replace(/^['"]|['"]$/g,""):e}function rk(e,t){if(e===""||t==="")return!1;if(e=e.toLowerCase(),$h(t))return e.includes(uc(t).toLowerCase());const n=t.split(/\s+/);for(let o=0;o<n.length;o++)if(!e.includes(n[o].toLowerCase()))return!1;return!0}async function kh(e,t,n){const o=xh(e.value,e.type);o.num=0,o.size=0,o.fileIds=[];const i=new Set;let s=0;n.maxSize&&(s=n.maxSize*1024*1024);for(let r=0;r<t.length;r++){const a=!!t[r].fid,c=a?t[r].fid:t[r].cid;if(!c||e.type===Ue.keyword&&(a&&e.forDir||!a&&!e.forDir))continue;const d=parseFloat(t[r].s);s&&a&&d>s||e.type===Ue.keyword&&!rk(t[r].n,e.pattern)||i.has(c)||(i.add(c),o.size+=d)}return o.fileIds=Array.from(i),o.num=o.fileIds.length,o}const ak={class:"group-manager"},lk={key:0,class:"label-readonly",title:"当前分组只可用于查询"},ck=["title"],uk=f("small",null,"分组:",-1),dk={class:"pure-form pure-form-stacked group-form"},fk=f("label",{for:"groupLabel"},"标题",-1),pk=f("label",{for:"groupMemo"},"备注",-1),hk={for:"groupValues"},mk={key:0,class:"text-info"},gk={key:1,class:"text-info"},yk=["onClick"],wk=f("small",{class:"text-primary"},"(点击添加)",-1),bk=f("label",{for:"groupMemo"},[ce(" 文件大小 "),f("span",{class:"text-info"},[ce("只清理小于该大小的文件,单位"),f("b",null,"MB")])],-1),_k={class:"groups-list"},vk={key:0,class:"text-danger"},xk=f("span",{class:"text-info"},"或",-1),Ck=f("br",null,null,-1),$k=f("br",null,null,-1),kk={class:"pure-table pure-table-bordered"},Ek=f("thead",null,[f("tr",null,[f("th",{width:"25"},"#"),f("th",{width:"70"},"只查询"),f("th",{width:"150"},"名称"),f("th",{width:"150"},"备注"),f("th",{width:"70"},[ce("大小"),f("small",null,"MB")]),f("th",{width:"220"},"操作")])],-1),Sk={align:"center"},Ak=["onClick"],Pk=f("button",{type:"button",class:"pure-button button-xsmall text-danger"},"删除",-1),Ik={class:"group-confirm-delete"},Tk=["onClick"],Ok=["onClick"],Eh=Be({__name:"GroupManager",props:{type:null,storageKey:null,config:null},emits:["change"],setup(e,{emit:t}){const n=e,o=he(Uo(n.type)),i=he([]),s=he(!1),r=he(Uo(n.type)),a=he(null),c=he(!1),d=he(null),p=[tt.video,tt.audio,tt.image,tt.doc,tt.app,tt.archive];ct(i,async ge=>{console.log("[groups change]",ge),po(n.storageKey,ge,!1),ge.length||(s.value=!1,c.value=!1)},{deep:!0});let h=!1;Ft(async()=>{if(console.log("[GroupManager onMounted]"),!h){h=!0,i.value=ks(n.storageKey,[]),console.log("[groups]",i.value);const{suffixGroup:ge,keywordGroup:O}=n.config;if(i.value.length){const se=i.value.find(Y=>Y.id===(n.type===Ue.suffix?ge:O));console.log("[group last choosen]",se),o.value=se||i.value[0],t("change",o.value)}else n.type===Ue.suffix&&!ge&&(await j(),po("cleanerConfig",{suffixGroup:o.value.id},!0)),n.type===Ue.keyword&&!O&&(await j(),po("cleanerConfig",{keywordGroup:o.value.id},!0))}}),os(async()=>{console.log("[GroupManager onUnmounted]")});async function y(ge){const O=`#${ge}`;r.value.values.includes(O)||(r.value.values+=(`
`+O).trim()+`
`)}async function x(){s.value=!0,c.value=!1}async function _(){s.value=!1}async function S(){a.value.show()}async function T(){a.value.hide()}async function B(){c.value=!1}async function P(){c.value=!0,s.value=!1}async function I(){d.value.show()}async function H(){d.value.hide()}async function ie(){r.value.createdAt&&(r.value=Uo(n.type)),r.value.size=5,n.type===Ue.keyword&&(r.value.size=100),await S()}async function j(){let ge=[];n.type===Ue.suffix?ge=X$:ge=tk;for(let O=0;O<ge.length;O++){const se={...Uo(ge[O].type),...ge[O]};r.value=se,r.value.type=se.type,r.value.queryOnly=se.queryOnly,r.value.size=se.size,r.value.label=se.label,r.value.memo=se.memo,r.value.createdAt=0,r.value.updatedAt=0,Array.isArray(se.values)?r.value.values=se.values.join(`
`):r.value.values=se.values,await pe(),await H()}i.value.length&&await Ae(i.value[0])}async function ne(ge,O=!1){if(!O){const{isConfirmed:Y}=await fe.fire({html:`确定删除"${o.value.label}"?`,icon:"question"});if(!Y)return}let se=-1;for(let Y=0;Y<i.value.length;Y++)if(i.value[Y].id===o.value.id){se=Y;break}i.value.splice(se,1),i.value.length?o.value=i.value[0]:o.value=Uo(n.type),t("change",o.value),await ue({icon:"success",title:"删除成功!",timer:1500})}async function ae(ge){r.value=ge,await S()}async function pe(){let ge=[];try{ge=await Ho(r.value.values,r.value.type)}catch(M){await fe.fire({icon:"error",text:M.message});return}if(r.value.label=r.value.label.trim(),r.value.memo=r.value.memo.trim(),r.value.label===""){await ue({icon:"warning",text:"请输入标题!"});return}let O=-1;for(let M=0;M<i.value.length;M++)if(i.value[M].id===r.value.id&&r.value.id){O=M;break}const se=ki();r.value.updatedAt=se,r.value.createdAt||(r.value.createdAt=se);let Y=[];for(let M=0;M<ge.length;M++)Y.push(ge[M].value);r.value.values=Y.join(`
`).trim(),console.log("[saveGroup]",r.value,O),O===-1?(i.value.push(r.value),ue({icon:"success",text:"添加成功"})):(i.value[O]=r.value,ue({icon:"success",text:"更新成功"}));const ve=!o.value.createdAt;ve&&(o.value=r.value),(r.value.id===o.value.id||ve)&&t("change",r.value),await T()}async function Ae(ge){o.value=ge;const{id:O}=o.value;n.type===Ue.suffix&&(n.config.suffixGroup=O,po("cleanerConfig",{suffixGroup:O},!0)),n.type===Ue.keyword&&(n.config.keywordGroup=O,po("cleanerConfig",{keywordGroup:O},!0)),t("change",ge)}return(ge,O)=>{const se=Oo("VDropdown");return W(),X("div",ak,[o.value.queryOnly?(W(),X("span",lk," 只查询 ")):Ge("",!0),o.value.createdAt?(W(),X("a",{key:1,class:"group-label",href:"javascript:void(0)",title:`当前使用的分组: ${o.value.label}`,onClick:O[0]||(O[0]=Y=>ae(o.value))},[f("span",null,[uk,ce(" "+ye(o.value.label),1)])],8,ck)):Ge("",!0),Ce(se,{ref_key:"form",ref:a,onHide:_,onShow:x,distance:5,"arrow-padding":100},{popper:We(()=>[f("form",dk,[f("fieldset",null,[f("div",null,[fk,ee(f("input",{type:"text","onUpdate:modelValue":O[1]||(O[1]=Y=>r.value.label=Y),id:"groupLabel",class:"pure-input-1-2",placeholder:"分组标题"},null,512),[[qe,r.value.label]]),ce("    "),r.value.queryOnly?(W(),X("button",{key:0,type:"button",class:"pure-button button-small button-warning",onClick:O[2]||(O[2]=Y=>r.value.queryOnly=!1)},"已设置为仅用于查询 | 点击取消设置")):Ge("",!0),r.value.queryOnly?Ge("",!0):(W(),X("button",{key:1,type:"button",class:"pure-button button-small pure-button-primary",onClick:O[3]||(O[3]=Y=>r.value.queryOnly=!0)},"设置为仅用于查询"))]),f("div",null,[pk,ee(f("input",{type:"text","onUpdate:modelValue":O[4]||(O[4]=Y=>r.value.memo=Y),id:"groupMemo",placeholder:"分组备注"},null,512),[[qe,r.value.memo]])]),f("div",null,[f("label",hk,[ce(" 特征列表 "),n.type===de(Ue).keyword?(W(),X("span",mk,[ce(" 默认只匹配文件名。前面带"),f("b",null,ye(de(Xr)),1),ce("则只匹配目录名。 ")])):Ge("",!0),n.type===de(Ue).suffix?(W(),X("span",gk,[ce(" 支持115自带筛选: "),(W(),X(De,null,nt(p,(Y,ve)=>f("span",{class:"filter-label text-success",key:ve,onClick:M=>y(Y)}," #"+ye(Y),9,yk)),64)),wk])):Ge("",!0)]),ee(f("textarea",{id:"groupValues","onUpdate:modelValue":O[5]||(O[5]=Y=>r.value.values=Y),rows:"5",placeholder:"每行一个"},null,512),[[qe,r.value.values]])]),f("div",null,[bk,ee(f("input",{type:"number","onUpdate:modelValue":O[6]||(O[6]=Y=>r.value.size=Y),class:"pure-input-1-2",placeholder:"文件大小小于该数值才清理"},null,512),[[qe,r.value.size]])]),f("button",{type:"button",class:"pure-button pure-button-primary",onClick:pe},ye(r.value.createdAt?"更新":"添加"),1),ce("      "),f("button",{type:"button",class:"pure-button",onClick:T},"取消")])])]),default:We(()=>[f("a",{href:"javascript:void(0)",class:"text-primary",onClick:ie},"新增分组")]),_:1},512),Ce(se,{ref_key:"list",ref:d,onHide:B,onShow:P,distance:5},{popper:We(()=>[f("div",_k,[i.value.length?Ge("",!0):(W(),X("h3",vk,[ce(" 还没有添加任何分组。你可以: "),f("button",{type:"button",class:"pure-button button-small",onClick:ie},"添加"),ce("   "),xk,ce("   "),f("button",{type:"button",class:"pure-button button-small",onClick:j},"使用脚本内置"),Ck,$k])),f("table",kk,[Ek,f("tbody",null,[(W(!0),X(De,null,nt(i.value,(Y,ve)=>(W(),X("tr",{key:ve},[f("td",null,ye(ve+1),1),f("td",Sk,ye(Y.queryOnly?"是":"否"),1),f("td",null,ye(Y.label),1),f("td",null,ye(Y.memo),1),f("td",null,ye(Y.size),1),f("td",null,[f("button",{type:"button",class:"pure-button button-xsmall text-primary",onClick:M=>Ae(Y)},"载入",8,Ak),ce("   "),Ce(se,null,{popper:We(()=>[f("div",Ik,[f("button",{type:"button",class:"pure-button button-error",onClick:M=>ne(Y,!0)},"确定",8,Tk)])]),default:We(()=>[Pk]),_:2},1024),ce("   "),f("button",{type:"button",class:"pure-button button-xsmall",onClick:M=>ae(Y)},"编辑",8,Ok)])]))),128))])])])]),default:We(()=>[f("a",{href:"javascript:void(0)",class:"text-primary",onClick:I},"分组列表")]),_:1},512)])}}}),UM="",Lk={class:"cloud115-eh-cleaner"},Mk=[f("span",null,"清理文件",-1)],Nk={key:0,class:"cloud115-eh-cleaner-help"},Bk=[Jv('<div><h2>免责声明</h2><div><p>该工具仅作为学习测试用途,使用该工具造成的任何结果由使用人承担。</p></div><hr><h2>说明</h2><ul style="color:#f40;"><li class="text-primary">始于清理,但不止于清理!</li><li>* 仅对当前查看的目录及其子目录生效。</li><li>* 通过『新增分组 / 分组列表』管理你的清理特征。</li><li>* 建议整理自己的特征,也欢迎在交流中分享你的特征。</li><li>* 『只查询』按钮,只会进行查询。</li><li>* 『一键清理』是先查询,再进行删除!</li><li>* 由于搜索接口限制,如果某个关键词结果数量超过1万,可能会清理不完全,可以多执行几次清理。</li><li>* <b>清理期间,请保持当前页面处于激活状态!</b></li><li>* <b>请谨慎操作!请谨慎操作!请谨慎操作!</b></li></ul><hr><h3>按 后缀名 清理</h3><div><p>1. 点击『分组列表』,选择一个分组;</p><p>2. 确认一下后缀名和文件大小限制等的设定;</p><p>3. 点击『一键清理』按钮,耐心等待。</p></div><hr><h3>按 关键词 清理</h3><div> 基本同上,略。 <br><br><p>P.S. 关键词按『全包含』进行匹配,不区分大小写。</p><p>关键词`免费在线`,匹配文件名&quot;blabla-免费在线.mp4&quot;,<b class="text-danger">不匹配</b>文件名`blabla-免费的xxx在线.mp4`。</p><p>关键词`免费 在线`,匹配文件名&quot;blabla-免费在线.mp4&quot;,<b class="text-success">也匹配</b>文件名`blabla-免费的xxx在线.mp4`。</p><p class="text-danger">如需要 `免费 在线` 作为一个整体去匹配,可以使用`英文单/双引号`包裹,如`&quot;免费 在线&quot;`</p></div></div>',1)],Dk={class:"header actions-bar"},Rk=f("span",{class:"title"},"文件清理工具",-1),Fk={type:"button",class:"pure-button button-success"},jk=f("i",{class:"file-type tp-folder",style:{}},null,-1),Uk=["disabled"],Hk=["disabled"],qk=f("small",null,"毫秒",-1),zk=["disabled"],Vk=f("br",null,null,-1),Kk={class:"by-box by-suffix"},Wk={class:"by-header"},Gk=f("span",{class:"title"},[ce("按"),f("b",null,"后缀名"),ce("清理")],-1),Jk={class:"pure-button-group",role:"group"},Yk=["disabled"],Qk={class:"pure-table pure-table-bordered"},Xk=f("thead",null,[f("tr",null,[f("th",{width:"25"},"#"),f("th",{width:"100"},"后缀名"),f("th",{width:"95"},"文件数量"),f("th",{width:"80"},"合计大小"),f("th",{width:"150"},"操作"),f("th",{width:"200"},"状态")])],-1),Zk=["onClick"],eE=["onClick"],tE=["onClick"],nE=f("br",null,null,-1),oE={class:"by-box by-keyword"},iE={class:"by-header"},sE=f("span",{class:"title"},[ce("按"),f("b",null,"关键词"),ce("清理")],-1),rE={class:"pure-button-group",role:"group"},aE=["disabled"],lE={class:"pure-table pure-table-bordered"},cE=f("thead",null,[f("tr",null,[f("th",{width:"25"},"#"),f("th",{width:"100"},"关键词"),f("th",{width:"95"},"文件/目录数量"),f("th",{width:"80"},"合计大小"),f("th",{width:"150"},"操作"),f("th",{width:"200"},"状态")])],-1),uE=["href"],dE={class:"file-type tp-folder"},fE=["onClick"],pE=["onClick"],hE=f("br",null,null,-1),mE={class:"footer actions-bar"},gE=f("span",{class:"title"},"文件清理工具",-1),yE={type:"button",class:"pure-button button-success"},wE=f("i",{class:"file-type tp-folder",style:{}},null,-1),bE=Be({__name:"Cleaner",setup(e){const t=he(!1),n=he(!0),o=he(Uo(Ue.suffix)),i=he(Uo(Ue.keyword)),s=he({maxSize:5,matchName:!1}),r=he({maxSize:100,matchName:!0}),a=he([]),c=he([]),d=he(!1),p=he({initialized:!1,pageSize:1150,reqInterval:800,deleteSize:1150,...ks("cleanerConfig",{})}),h=he(!0),y=he(""),x=he([]);async function _(M){M.data.type===Nn.OPEN_CLEANER&&(await S(M.data.payload),As({type:Nn.CLEANER_OPENED},M.source))}Ft(async()=>{console.log("[Cleaner onMounted]"),p.value.initialized||(p.value.initialized=!0,po("cleanerConfig",p.value,!1)),window.addEventListener("message",_)}),os(()=>{console.log("[Cleaner onUnmounted]"),window.removeEventListener("message",_)});async function S(M){t.value=!0;const G=await Vt();if(G==="0"||G===""){await T(),await fe.fire({icon:"warning",html:"<h2>不允许在根目录使用该工具!</h2>"});return}y.value&&y.value!==G&&(console.warn("目录变化,重置"),await H(ht.reset),await ie(ht.reset)),x.value=await od(),y.value=G}async function T(){t.value=!1}async function B(){po("cleanerConfig",p.value,!1),ue({icon:"success",text:"保存成功",timer:1800}),h.value=!0}async function P(M){const G={};M.isFilter?G.type=M.pattern:G.suffix=M.pattern;let D=unsafeWindow.frames[0];for(let me=0;me<unsafeWindow.frames.length;me++)if(unsafeWindow.frames[me].name==="wangpan"){D=unsafeWindow.frames[me];break}As({type:Nn.INVOKE_FILTER,payload:G},D),await T(),ue({icon:"info",text:`已调用115筛选: ${M.value}`,timer:2500})}async function I(M,G){const{value:D}=await fe.fire({input:"textarea",title:M,html:"每行一个,最短两个字符。"+(G===Ue.keyword?`<br>默认只匹配文件名,不匹配目录名。<br>使用 "<b>${Xr}目录名关键词</b>" 格式指定只匹配目录名的关键词。`:""),width:620,inputPlaceholder:"每行一个,最短两个字符",inputAttributes:{"aria-label":"每行一个,最短两个字符"},showCancelButton:!0});return D!==void 0?D.trim():""}async function H(M,G){let D="",me=[];switch(M){case ht.assign:D=G.trim(),D.trim()===""?a.value=[]:(me=await Ho(D,Ue.suffix),a.value=me);break;case ht.append:D=await I("添加后缀",Ue.suffix),me=await Ho(D,Ue.suffix);const ke=[];a.value.forEach(Le=>ke.push(Le.value.toLowerCase())),me.forEach(Le=>{ke.includes(Le.value.toLowerCase())||a.value.push(Le)});break;case ht.cover:D=await I("覆盖后缀",Ue.suffix),D.trim()!==""&&(me=await Ho(D,Ue.suffix),a.value=me);break;case ht.clear:a.value=[];break;case ht.reset:a.value.forEach(Le=>{Le.num=-1,Le.fileIds=[],Le.status=ut.none,Le.size=-1});break}}async function ie(M,G){let D="",me=[];switch(M){case ht.assign:D=G.trim(),D.trim()===""?c.value=[]:(me=await Ho(D,Ue.keyword),c.value=me);break;case ht.append:D=await I("添加关键词",Ue.keyword),me=await Ho(D,Ue.keyword);const ke=[];c.value.forEach(Le=>ke.push(Le.value.toLowerCase())),me.forEach(Le=>{ke.includes(Le.value.toLowerCase())||c.value.push(Le)});break;case ht.cover:D=await I("覆盖关键词",Ue.keyword),D.trim()!==""&&(me=await Ho(D,Ue.keyword),c.value=me);break;case ht.clear:c.value=[];break;case ht.reset:c.value.forEach(Le=>{Le.num=-1,Le.fileIds=[],Le.status=ut.none,Le.size=-1});break}}async function j(M){if(console.log("[cleanBySuffix]",M),await H(ht.reset),!a.value.length){await fe.fire({icon:"warning",text:"请先设置后缀!"});return}if(!M){const{isConfirmed:G}=await fe.fire({icon:"warning",html:'请在清理前确认"后缀和大小限制的设置"是否符合预期!',confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!G)return}d.value=!0;try{for(let G=0;G<a.value.length;G++){const D=a.value[G];await ne(D,M,!1,!0),await kt(p.value.reqInterval)}}catch(G){console.error(G)}d.value=!1}async function ne(M,G,D,me){if(console.log("[cleanBySuffixSingle]",M,G),!G&&!me){const{isConfirmed:ke}=await fe.fire({icon:"warning",html:`确认执行条件 "后缀: <b class="text-primary">${M.pattern}</b>, 小于: <b>${s.value.maxSize}</b> MB" 的清理?`,confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!ke)return}try{if(!D){d.value=!0,M.fileIds=[],M.size=-1,M.num=-1,M.status=ut.prepare;const ke=await Ae(M);M.status=ut.prepared;const{fileIds:Le,size:Fe}=await kh(M,ke,s.value);M.fileIds=Le,M.size=Fe,M.num=Le.length,d.value=!1}if(!G)if(M.num>0){M.status=ut.deleting,d.value=!0;const ke=await Xu(y.value,M.fileIds,p.value.deleteSize,1e3);d.value=!1,ke>0?M.status=ut.success+` / 数量 <= ${ke}`:M.status=ut.failed}else M.status=ut.success+" / 无"}catch(ke){console.error(ke),d.value=!1,await fe.fire({title:"cleanBySuffixSingle - 发生错误",html:ke.toString()})}}async function ae(M){if(console.log("[cleanByKeyword]",M),await ie(ht.reset),!c.value.length){await fe.fire({icon:"warning",text:"请先设置关键词!"});return}if(!M){const{isConfirmed:G}=await fe.fire({icon:"warning",html:'请在清理前确认"关键词和大小限制的设置"是否符合预期!',confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!G)return}d.value=!0;try{for(let G=0;G<c.value.length;G++){const D=c.value[G];await pe(D,M,!1,!0),await kt(p.value.reqInterval)}}catch(G){console.error(G)}d.value=!1}async function pe(M,G,D,me){if(console.log("[cleanByKeywordSingle]",M,G),!G&&!me){const{isConfirmed:ke}=await fe.fire({icon:"warning",html:`确认执行条件 "关键词: <b class="text-primary">${M.pattern}</b>, 小于: <b class="text-primary">${r.value.maxSize}</b> MB" 的清理?`,confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!ke)return}try{if(!D){d.value=!0,M.fileIds=[],M.size=-1,M.num=-1,M.status=ut.prepare;const ke=await ge(M);M.status=ut.prepared;const{fileIds:Le,size:Fe,num:Xe}=await kh(M,ke,r.value);M.fileIds=Le,M.size=Fe,M.num=Xe,d.value=!1}if(!G)if(M.num>0){M.status=ut.deleting,d.value=!0;const ke=await Xu(y.value,M.fileIds,p.value.deleteSize,1e3);d.value=!1,ke>0?M.status=ut.success+` / 数量 <= ${ke}`:M.status=ut.failed,M.num>9e3&&(console.warn("[cleanByKeywordSingle] 补充处理..."),await pe(M,G,!1,!0))}else M.status=ut.success+" / 无"}catch(ke){console.error(ke),d.value=!1;let Le=!0;const Fe={title:"cleanByKeywordSingle - 发生错误",html:ke.toString()};ke instanceof Ia&&(M.status=ut.prepareFailed+` / ${ke.message}`,ke instanceof Pu&&(Fe.timer=2e3,Le=!1)),Le?await fe.fire(Fe):fe.fire(Fe)}}async function Ae(M){const G=await Vt(),D=Ii({cid:G,limit:p.value.pageSize});M.isFilter?D.type=M.pattern:D.suffix=M.value;const me=await Ba(D,p.value.reqInterval);return console.log("[files]",me),me}async function ge(M){const G=await Vt(),D=Zm({search_value:uc(M.pattern),cid:G,limit:p.value.pageSize}),me=await $w(D,p.value.reqInterval,!0);return console.log("[files]",me),me}function O(M){return ja({search_value:uc(M.pattern),cid:y.value},x.value[x.value.length-1])}async function se(M){console.log("[onSuffixGroupChange]",M),o.value=M,s.value.maxSize=M.size,await H(ht.assign,M.values)}async function Y(M){console.log("[onKeywordGroupChange]",M),i.value=M,r.value.maxSize=M.size,await ie(ht.assign,M.values)}async function ve(){document.querySelector(".cloud115-eh-cleaner-drawer").scrollTo(0,0)}return(M,G)=>ee((W(),X("span",Lk,[Sn(M.$slots,"default",{},()=>[f("span",{class:"btn-open pure-button pure-button-primary",onClick:S},Mk)]),t.value?(W(),X("div",Nk,Bk)):Ge("",!0),ee(f("div",{class:Ye(["cloud115-eh-cleaner-drawer",{loading:d.value}])},[f("div",Dk,[Rk,f("span",{class:"close"},[f("button",{type:"button",class:"pure-button button-error",onClick:T},"关闭")]),f("button",Fk,[f("b",null,[jk,ce(" "+ye(x.value.join(" / ")),1)])])]),f("div",null,[ce(" 请求分页: "),ee(f("input",{type:"number","onUpdate:modelValue":G[0]||(G[0]=D=>p.value.pageSize=D),min:30,max:1150,disabled:h.value},null,8,Uk),[[qe,p.value.pageSize]]),ce(" 请求间隔: "),ee(f("input",{type:"number","onUpdate:modelValue":G[1]||(G[1]=D=>p.value.reqInterval=D),min:200,max:1e6,disabled:h.value},null,8,Hk),[[qe,p.value.reqInterval]]),qk,ce(" 每次删除: "),ee(f("input",{type:"number","onUpdate:modelValue":G[2]||(G[2]=D=>p.value.deleteSize=D),min:1,max:1150,disabled:h.value},null,8,zk),[[qe,p.value.deleteSize]]),f("span",{class:"config-toggle",onClick:G[3]||(G[3]=D=>h.value=!h.value)},"设置参数"),h.value?Ge("",!0):(W(),X("button",{key:0,type:"button",class:"pure-button pure-button-primary button-small",onClick:B}," 保存配置 "))]),Vk,f("div",Kk,[f("div",Wk,[Gk,ce("      "),f("div",Jk,[f("button",{type:"button",class:"pure-button",onClick:G[4]||(G[4]=D=>j(!0))},"只查询"),f("button",{type:"button",class:"pure-button pure-button-primary",onClick:G[5]||(G[5]=D=>j(!1)),disabled:o.value.queryOnly}," 一键清理 ",8,Yk)]),ce(" 小于 "),ee(f("input",{type:"number","onUpdate:modelValue":G[6]||(G[6]=D=>s.value.maxSize=D),class:"filter-size"},null,512),[[qe,s.value.maxSize]]),ce(" MB (0表示不限制) "),Ce(Eh,{type:de(Ue).suffix,"storage-key":"suffixGroups",onChange:se,config:p.value},null,8,["type","config"])]),f("table",Qk,[Xk,f("tbody",null,[(W(!0),X(De,null,nt(a.value,(D,me)=>(W(),X("tr",{key:me,class:Ye({active:de(Ch)(D),"is-filter":D.isFilter})},[f("td",null,ye(me+1),1),f("td",null,[f("a",{href:"javascript:void(0)",class:"pattern",onClick:ke=>P(D),title:"筛选"},ye(D.value),9,Zk)]),f("td",null,ye(D.num>=0?D.num:""),1),f("td",null,ye(D.size>0?de(Ss)(D.size):""),1),f("td",null,[f("button",{type:"button",class:"pure-button button-xsmall",onClick:ke=>ne(D,!0,!1,!0)},"查询",8,eE),ce("   "),D.num>0&&!o.value.queryOnly?(W(),X("button",{key:0,type:"button",class:"pure-button button-warning button-xsmall",onClick:ke=>ne(D,!1,!0,!1)},"清理",8,tE)):Ge("",!0)]),f("td",null,ye(D.status),1)],2))),128))])])]),nE,f("div",oE,[f("div",iE,[sE,ce("      "),f("div",rE,[f("button",{type:"button",class:"pure-button",onClick:G[7]||(G[7]=D=>ae(!0))},"只查询"),f("button",{type:"button",class:"pure-button pure-button-primary",onClick:G[8]||(G[8]=D=>ae(!1)),disabled:i.value.queryOnly}," 一键清理 ",8,aE)]),ce(" 小于 "),ee(f("input",{type:"number","onUpdate:modelValue":G[9]||(G[9]=D=>r.value.maxSize=D),class:"filter-size"},null,512),[[qe,r.value.maxSize]]),ce(" MB (0表示不限制) "),Ce(Eh,{type:de(Ue).keyword,"storage-key":"keywordGroups",onChange:Y,config:p.value},null,8,["type","config"])]),f("table",lE,[cE,f("tbody",null,[(W(!0),X(De,null,nt(c.value,(D,me)=>(W(),X("tr",{key:me,class:Ye({active:de(Ch)(D),"is-dir":D.forDir})},[f("td",null,ye(me+1),1),f("td",null,[f("a",{href:O(D),target:"_blank",class:"pattern",title:"搜索"},[ee(f("i",dE,null,512),[[Yt,D.forDir]]),ce(" "+ye(D.pattern),1)],8,uE)]),f("td",null,ye(D.num>=0?D.num:""),1),f("td",null,ye(D.size>0?de(Ss)(D.size):""),1),f("td",null,[f("button",{type:"button",class:"pure-button button-xsmall",onClick:ke=>pe(D,!0,!1,!0)},"查询",8,fE),ce("   "),D.num>0&&!i.value.queryOnly?(W(),X("button",{key:0,type:"button",class:"pure-button button-warning button-xsmall",onClick:ke=>pe(D,!1,!0,!1)}," 清理 ",8,pE)):Ge("",!0)]),f("td",null,ye(D.status),1)],2))),128))])])]),hE,f("div",mE,[gE,f("span",{class:"close"},[f("button",{type:"button",class:"pure-button button-error",onClick:T},"关闭")]),f("button",yE,[f("b",null,[wE,ce(" "+ye(x.value.join(" / ")),1)])]),ce("     "),f("button",{type:"button",class:"pure-button button-small",onClick:ve}," 回到顶部 ")])],2),[[Yt,t.value]])],512)),[[Yt,n.value]])}}),zM="",VM="";async function _E(){const{host:e,search:t}=location;e==="115.com"&&(console.log("[Cleaner] running..."),t.includes("ct=file")?await vE():await xE())}async function Sh(){return typeof window.$<"u"}async function vE(){await Sh()||console.log("[Cleaner injectTrigger] JQuery not found");const e="cloud115Cleaner",t=await Ei("#js_path_add_dir"),n=document.createElement("span");n.id=e,t.insertAdjacentElement("afterend",n),oo(Y$).mount(`#${e}`)}async function xE(){await Sh()||console.log("[Cleaner injectUI] JQuery not found");const e="cloud115Cleaner",t=document.createElement("div");t.id=e,document.body.appendChild(t);const n=oo(bE);n.use(ac),n.mount(`#${e}`),ca("清理文件",async()=>{As({type:Nn.OPEN_CLEANER},window.parent)})}async function CE(){const e=await Qr(),{host:t,search:n}=location;!/115\.com$/.test(t)||(U$(e),B$(e),D$(e),R$(e),F$(e),j$(e),H$(e))}const Ah=Symbol("addTab"),Ph=Symbol("updateTab"),Ih=Symbol("deleteTab"),Th=Symbol("tabsProvider");function Zr(e,t){const n=ts(e,t);if(typeof n>"u")throw new Error(`Could not resolve ${e.description}`);return n}const $E=["data-tab-id","aria-hidden"],mn=Be({__name:"Tab",props:{panelClass:{type:[String,Object,Array],default:"tabs-component-panel"},id:{type:String,default:null},name:{type:String,required:!0},prefix:{type:String,default:""},suffix:{type:String,default:""},isDisabled:{type:Boolean,default:!1},navItemClass:{type:[String,Object,Array],required:!1,default:null},navItemLinkClass:{type:[String,Object,Array],required:!1,default:null}},setup(e,{expose:t}){const n=e,o=he(!1),i=Zr(Th),s=Zr(Ah),r=Zr(Ph),a=Zr(Ih),c=n.prefix+n.name+n.suffix,d=n.id?n.id:n.name.toLowerCase().replace(/ /g,"-"),p=d+"-pane",h=to(()=>"#"+(n.isDisabled?"":d));return ct(()=>i.activeTabHash,()=>{o.value=h.value===i.activeTabHash}),ct(()=>Object.assign({},n),()=>{r(d,{name:n.name,header:n.prefix+n.name+n.suffix,isDisabled:n.isDisabled,hash:h.value,index:i.tabs.length,computedId:d,paneId:p,navItemClass:n.navItemClass,navItemLinkClass:n.navItemLinkClass})}),Ot(()=>{s({name:n.name,header:c,isDisabled:n.isDisabled,hash:h.value,index:i.tabs.length,computedId:d,paneId:p,navItemClass:n.navItemClass,navItemLinkClass:n.navItemLinkClass})}),vf(()=>{a(d)}),t({header:c,computedId:d,paneId:p,hash:h,isActive:o}),(y,x)=>ee((W(),X("section",{ref:"tab",id:p,"data-tab-id":de(d),"aria-hidden":!o.value,class:Ye(e.panelClass),role:"tabpanel",tabindex:"-1"},[Sn(y.$slots,"default")],10,$E)),[[Yt,o.value]])}});class kE{get(t){const n=localStorage.getItem(t);if(n===null)return null;const o=JSON.parse(n);return o?new Date(o.expires)<new Date?(localStorage.removeItem(t),null):o.value:null}set(t,n,o){const i=new Date().getTime(),s=new Date(i+o*6e4);localStorage.setItem(t,JSON.stringify({value:n,expires:s}))}}const Oh=new kE,EE=["aria-controls","aria-selected","href","onClick","innerHTML"],SE=Be({__name:"Tabs",props:{cacheLifetime:{type:Number,default:5},options:{type:Object,required:!1,default:()=>({useUrlFragment:!0,defaultTabHash:null})},wrapperClass:{type:[String,Object,Array],default:"tabs-component"},panelsWrapperClass:{type:[String,Object,Array],default:"tabs-component-panels"},navClass:{type:[String,Object,Array],default:"tabs-component-tabs"},navItemClass:{type:[String,Object,Array],default:"tabs-component-tab"},navItemDisabledClass:{type:[String,Object,Array],default:"is-disabled"},navItemActiveClass:{type:[String,Object,Array],default:"is-active"},navItemInactiveClass:{type:[String,Object,Array],default:"is-inactive"},navItemLinkClass:{type:[String,Object,Array],default:"tabs-component-tab-a"},navItemLinkActiveClass:{type:[String,Object,Array],default:"is-active"},navItemLinkInactiveClass:{type:[String,Object,Array],default:"is-inactive"},navItemLinkDisabledClass:{type:[String,Object,Array],default:"is-disabled"}},emits:["changed","clicked"],setup(e,{expose:t,emit:n}){const o=e,i=pr({activeTabHash:"",lastActiveTabHash:"",tabs:[]});es(Th,i),es(Ah,a=>{i.tabs.push(a)}),es(Ph,(a,c)=>{const d=i.tabs.findIndex(p=>p.computedId===a);c.isActive=i.tabs[d].isActive,i.tabs[d]=c}),es(Ih,a=>{const c=i.tabs.findIndex(d=>d.computedId===a);i.tabs.splice(c,1)});const s=(a,c)=>{c&&!o.options.useUrlFragment&&c.preventDefault();const d=r(a);if(!d)return;if(c&&d.isDisabled){c.preventDefault();return}if(i.lastActiveTabHash===d.hash){n("clicked",{tab:d});return}if(i.tabs.forEach(h=>{h.isActive=h.hash===d.hash}),n("changed",{tab:d}),i.lastActiveTabHash=i.activeTabHash=d.hash,o.cacheLifetime<=0)return;const p=`vue-tabs-component.cache.${window.location.host}${window.location.pathname}`;Oh.set(p,d.hash,o.cacheLifetime)},r=a=>i.tabs.find(c=>c.hash===a);return Ft(()=>{if(i.tabs.length){if(window.addEventListener("hashchange",()=>s(window.location.hash)),r(window.location.hash)){s(window.location.hash);return}if(o.cacheLifetime>0){const a=`vue-tabs-component.cache.${window.location.host}${window.location.pathname}`,c=Oh.get(a);if(c!==null&&r(c)){s(c);return}if(o.options.defaultTabHash&&r("#"+o.options.defaultTabHash)){s("#"+o.options.defaultTabHash);return}}s(i.tabs[0].hash)}}),t({...v_(i),selectTab:s,findTab:r}),(a,c)=>(W(),X("div",{class:Ye(e.wrapperClass)},[f("ul",{role:"tablist",class:Ye(e.navClass)},[(W(!0),X(De,null,nt(i.tabs,(d,p)=>{var h,y;return W(),X("li",{key:p,class:Ye([(h=d.navItemClass)!=null?h:e.navItemClass,d.isDisabled?e.navItemDisabledClass:"",d.isActive?e.navItemActiveClass:d.isDisabled?"":e.navItemInactiveClass]),role:"presentation"},[f("a",{role:"tab",class:Ye([(y=d.navItemLinkClass)!=null?y:e.navItemLinkClass,d.isDisabled?e.navItemLinkDisabledClass:"",d.isActive?e.navItemLinkActiveClass:d.isDisabled?"":e.navItemLinkInactiveClass]),"aria-controls":d.paneId,"aria-selected":d.isActive,href:d.hash,onClick:x=>s(d.hash,x),innerHTML:d.header,tabindex:"0"},null,10,EE)],2)}),128))],2),f("div",{class:Ye(e.panelsWrapperClass)},[Sn(a.$slots,"default")],2)],2))}}),AE={class:"ce-config ce-basic-config"},PE={class:"pure-form pure-form-aligned"},IE=f("legend",null,"UI优化",-1),TE={class:"pure-control-group"},OE=f("label",{for:"basic_hideSidebar"}," 隐藏侧边栏 ",-1),LE=f("div",{class:"pure-form-message text-success"},[ce(" 如果官方不能记住隐藏状态,可以开启该选项。"),f("span",{class:"text-info"},"目前官方已支持记住状态,该功能将会被废弃和移除。")],-1),ME={class:"pure-control-group"},NE=f("label",{for:"basic_showOfflineEntry"},"显示云下载入口按钮",-1),BE={class:"pure-form-message text-success"},DE={class:"pure-control-group"},RE=f("label",{for:"basic_showAddOffline"},"显示添加云下载按钮",-1),FE={class:"pure-form-message text-success"},jE={class:"pure-control-group"},UE=f("label",{for:"basic_transferDefaultOffline"},"近期传输默认云下载",-1),HE=f("div",{class:"pure-form-message text-success"}," 点击左边栏的「传输」默认进入「云下载」页面。 ",-1),qE={class:"pure-control-group"},zE=f("label",{for:"basic_showFavEntry"},"显示星标入口按钮",-1),VE={class:"pure-form-message text-success"},KE=f("legend",null,"隐私保护",-1),WE={class:"pure-control-group"},GE=f("label",{for:"basic_hideWatermark"},"隐藏水印",-1),JE=f("div",{class:"pure-form-message text-success"}," 网页水印是肉眼看不到的,但通过一些处理可以看到,水印内容是你的账号标识。 如果你需要截图并发给别人,可以考虑开启隐藏。 ",-1),YE={class:"pure-control-group"},QE=f("label",{for:"basic_fakeAccountEnabled"},"隐藏身份",-1),XE=f("div",{class:"pure-form-message text-success"}," 修改右上角显示的账号信息,不会真的修改。编辑后即可生效,无需刷新页面。 ",-1),ZE={class:"pure-control-group"},eS=f("label",null,"账号ID",-1),tS={class:"pure-control-group"},nS=f("label",null,"用户名",-1),oS={class:"pure-control-group"},iS=f("label",null,"头像",-1),sS={class:"avatar-preview"},rS=["src"],aS={class:"pure-control-group"},lS=f("label",null,"VIP等级",-1),cS=Be({__name:"Config",async setup(e){let t,n;const o=he(([t,n]=nn(()=>Qr()),t=await t,n(),t));return Ot(async()=>{}),ct(o,Bt(async i=>{await N$(i),ue({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:Mt.basicConfigChange,body:Rc(i)})},500),{deep:!0}),(i,s)=>(W(),X("div",AE,[f("form",PE,[f("fieldset",null,[IE,f("div",TE,[OE,ee(f("input",{id:"basic_hideSidebar",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=r=>o.value.hideSidebar=r)},null,512),[[Se,o.value.hideSidebar]]),LE]),f("div",ME,[NE,ee(f("input",{id:"basic_showOfflineEntry",type:"checkbox","onUpdate:modelValue":s[1]||(s[1]=r=>o.value.showOfflineEntry=r)},null,512),[[Se,o.value.showOfflineEntry]]),f("div",BE,[ce(" 在「网盘」页面顶部工具栏显示「云下载」入口按钮。按钮文本为 "),ee(f("input",{"onUpdate:modelValue":s[2]||(s[2]=r=>o.value.offlineEntryLabel=r),class:"input-small",placeholder:"可以为空"},null,512),[[qe,o.value.offlineEntryLabel]])])]),f("div",DE,[RE,ee(f("input",{id:"basic_showAddOffline",type:"checkbox","onUpdate:modelValue":s[3]||(s[3]=r=>o.value.showAddOffline=r)},null,512),[[Se,o.value.showAddOffline]]),f("div",FE,[ce(" 在「网盘」页面顶部工具栏显示「添加云下载」按钮。按钮文本为 "),ee(f("input",{"onUpdate:modelValue":s[4]||(s[4]=r=>o.value.addOfflineLabel=r),class:"input-small",placeholder:"可以为空"},null,512),[[qe,o.value.addOfflineLabel]])])]),f("div",jE,[UE,ee(f("input",{id:"basic_transferDefaultOffline",type:"checkbox","onUpdate:modelValue":s[5]||(s[5]=r=>o.value.transferDefaultOffline=r)},null,512),[[Se,o.value.transferDefaultOffline]]),HE]),f("div",qE,[zE,ee(f("input",{id:"basic_showFavEntry",type:"checkbox","onUpdate:modelValue":s[6]||(s[6]=r=>o.value.showFavEntry=r)},null,512),[[Se,o.value.showFavEntry]]),f("div",VE,[ce(" 在「网盘」页面顶部工具栏显示「星标」入口按钮。按钮文本为 "),ee(f("input",{"onUpdate:modelValue":s[7]||(s[7]=r=>o.value.favEntryLabel=r),class:"input-small",placeholder:"可以为空"},null,512),[[qe,o.value.favEntryLabel]])])]),KE,f("div",WE,[GE,ee(f("input",{id:"basic_hideWatermark",type:"checkbox","onUpdate:modelValue":s[8]||(s[8]=r=>o.value.hideWatermark=r)},null,512),[[Se,o.value.hideWatermark]]),JE]),f("div",YE,[QE,ee(f("input",{id:"basic_fakeAccountEnabled",type:"checkbox","onUpdate:modelValue":s[9]||(s[9]=r=>o.value.fakeAccountEnabled=r)},null,512),[[Se,o.value.fakeAccountEnabled]]),XE]),f("div",ZE,[eS,ee(f("input",{"onUpdate:modelValue":s[10]||(s[10]=r=>o.value.fakeAccountId=r),placeholder:"自定义账号ID",class:"pure-input-2-3"},null,512),[[qe,o.value.fakeAccountId]])]),f("div",tS,[nS,ee(f("input",{"onUpdate:modelValue":s[11]||(s[11]=r=>o.value.fakeAccountName=r),placeholder:"自定义用户名",class:"pure-input-2-3"},null,512),[[qe,o.value.fakeAccountName]])]),f("div",oS,[iS,ee(f("input",{"onUpdate:modelValue":s[12]||(s[12]=r=>o.value.fakeAccountAvatar=r),placeholder:"支持网络图片地址或base64编码",class:"pure-input-2-3"},null,512),[[qe,o.value.fakeAccountAvatar]]),f("span",sS,[o.value.fakeAccountAvatar?(W(),X("img",{key:0,src:o.value.fakeAccountAvatar,alt:"头像预览",width:"20",height:"20"},null,8,rS)):Ge("",!0)])]),f("div",aS,[lS,ee(f("input",{"onUpdate:modelValue":s[13]||(s[13]=r=>o.value.fakeAccountVip=r),placeholder:"自定义VIP等级",class:"pure-input-2-3"},null,512),[[qe,o.value.fakeAccountVip]])])])])]))}}),KM="",uS={class:"pure-form pure-form-aligned"},dS=["disabled"],fS={class:"pure-control-group"},pS=f("label",null,[f("span",{class:"text-danger"},"*"),ce(" 地址")],-1),hS={class:"pure-control-group"},mS=f("label",null,[f("span",{class:"text-danger"},"*"),ce(" 资源根路径")],-1),gS={class:"pure-control-group"},yS=f("label",null,"备注",-1),wS={class:"pure-control-group"},bS=f("label",null,"平台",-1),_S=["value"],vS=f("small",{class:"text-info"},"如果是macOS版,而且有包含日韩文的文件或目录,建议选上,可以避免播放链接无效的问题。",-1),xS=Be({__name:"ConfigItem",props:{config:null,deletable:{type:Boolean}},emits:["change","delete","activate"],setup(e,{emit:t}){const n=e;Ot(async()=>{});async function o(){n.config.active=!0,t("activate",n.config)}async function i(){t("delete")}return ct(n.config,Bt(async s=>{t("change",s)},500),{deep:!0}),(s,r)=>(W(),X("div",{class:Ye(["ce-clouddrive-config-item",{active:e.config.active}])},[f("form",uS,[f("fieldset",null,[f("legend",null,[f("button",{type:"button",class:Ye(["pure-button button-small",[e.config.active?"button-success":"pure-button-primary"]]),onClick:o,disabled:e.config.active},ye(e.config.active?"当前使用该配置":"使用该配置"),11,dS),e.deletable?(W(),X("button",{key:0,type:"button",class:"pure-button button-error button-small",onClick:i}," 删除 ")):Ge("",!0)]),f("div",fS,[pS,ee(f("input",{"onUpdate:modelValue":r[0]||(r[0]=a=>e.config.url=a),placeholder:"CloudDrive服务地址,如「http://localhost:19798」",class:"pure-input-2-3"},null,512),[[qe,e.config.url]])]),f("div",hS,[mS,ee(f("input",{"onUpdate:modelValue":r[1]||(r[1]=a=>e.config.root=a),placeholder:"即当前115账号在CloudDrive中的资源名称,如「115」",class:"pure-input-2-3"},null,512),[[qe,e.config.root]])]),f("div",gS,[yS,ee(f("input",{"onUpdate:modelValue":r[2]||(r[2]=a=>e.config.memo=a),placeholder:"备注信息",class:"pure-input-2-3"},null,512),[[qe,e.config.memo]])]),f("div",wS,[bS,ee(f("select",{"onUpdate:modelValue":r[3]||(r[3]=a=>e.config.platform=a)},[(W(!0),X(De,null,nt(de(Kc),a=>(W(),X("option",{key:a,value:a},ye(a),9,_S))),128))],512),[[cs,e.config.platform]]),ce("   "),vS])])])],2))}}),WM="",CS={class:"ce-config ce-clouddrive-config"},$S=f("div",{class:"ce-tips cd-tips"},[f("p",null,[f("a",{href:"https://www.clouddrive2.com/?ref=cloud115-enhancer",rel:"noreferer",target:"_blank",class:"text-bold text-primary"},"CloudDrive"),ce(" 是一个强大的多云盘管理工具,为用户提供包含云盘本地挂载的一站式的多云盘解决方案。")]),f("p",null,"本脚本主要是借助CloudDrive实现原码视频播放的功能(具体可以在「播放菜单」面板中查看)。")],-1),kS={class:"ce-list"},ES=f("div",{class:"ce-tips"},[f("p",{class:"text-primary"}," 暂时发现IINA是支持`file://`协议的,这时候播放器可以读取到同目录的字幕文件。 配置地址示例: file:///Users/you/115,根路径不用填。 ")],-1),SS=f("div",{class:"ce-tips"}," 编辑配置后,请记得点击「保存全部配置」。 ",-1),AS={class:"ce-actions"},PS=["disabled"],IS=Be({__name:"Config",async setup(e){let t,n;const o=he(([t,n]=nn(()=>Wc()),t=await t,n(),t));Ot(async()=>{});async function i(){await Gc(o.value),ue({icon:"success",title:"设置已保存。",timer:800,position:"top-end"})}async function s(){o.value.push(fa())}async function r(c,d){const{isConfirmed:p}=await fe.fire({icon:"warning",html:`确定要删除第 ${d+1} 个配置「${c.url}」吗?`});!p||(o.value.splice(d,1),await i(),ue({icon:"success",title:`「${c.url}」已删除!`}))}async function a(c,d){c.forEach((p,h)=>{p.active=h===d}),await Gc(c),ue({icon:"success",title:"设置已保存。",timer:800,position:"top-end"})}return(c,d)=>(W(),X("div",CS,[$S,f("div",kS,[(W(!0),X(De,null,nt(o.value,(p,h)=>(W(),Gt(xS,{key:h,config:p,index:h,deletable:o.value.length>1,onDelete:y=>r(p,h),onActivate:y=>a(o.value,h)},null,8,["config","index","deletable","onDelete","onActivate"]))),128))]),ES,SS,f("div",AS,[f("button",{type:"button",class:"pure-button pure-button-primary button-large",onClick:i,disabled:!o.value.length}," 保存全部配置 ",8,PS),ce("      "),f("button",{type:"button",class:"pure-button pure-button-success button-large",onClick:s}," 添加配置 ")])]))}}),GM="",TS={class:"ce-config ce-list-config"},OS={class:"pure-form pure-form-aligned"},LS={class:"pure-control-group"},MS=f("label",{for:"sizeSorter"},"大小排序",-1),NS=f("div",{class:"pure-form-message text-success"},[f("div",null,"在官方的「大小」列头部增加「排序」按钮,可以获取文件夹的大小,然后进行排序。"),f("div",null,"请注意该功能只会对当前加载的文件进行排序,如果有多页文件并需要对全部文件进行排序,请先点击「加载全部」后再使用该排序功能。")],-1),BS={class:"pure-control-group"},DS=f("label",{for:"sizeSorterDirAttrInterval"},"大小排序-获取目录大小间隔",-1),RS=f("div",{class:"pure-form-message text-success"}," 「大小排序」功能需要获取文件夹大小,这个设置是获取文件夹大小的间隔时间,单位是豪秒。 ",-1),FS={class:"pure-control-group"},jS=f("label",{for:"showSha1"},"显示文件SHA1",-1),US=f("div",{class:"pure-form-message text-success"}," 在文件名下方显示文件SHA1,点击可以复制。 ",-1),HS={class:"pure-control-group"},qS=f("label",{for:"showFolderSizeButton"},"显示文件夹获取大小按钮",-1),zS=f("div",{class:"pure-form-message text-success"}," 点击按钮可以获取单个文件夹的大小。 ",-1),VS={class:"pure-control-group"},KS=f("label",{for:"showCopyButtonOnPathBar"},"在路径栏显示复制按钮",-1),WS=f("div",{class:"pure-form-message text-success"}," 点击后,复制当前路径到剪贴板。 ",-1),GS={class:"pure-control-group"},JS=f("label",{for:"showGotoButtonOnPathBar"},[ce(" 在路径栏显示前往按钮 "),f("small",{class:"text-danger"},"Beta")],-1),YS=f("div",{class:"pure-form-message text-success"}," 点击后,路径栏变为可输入状态,输入路径后按回车即可前往该路径。 ",-1),QS=Be({__name:"Config",async setup(e){let t,n;const o=he(([t,n]=nn(()=>Or()),t=await t,n(),t));return Ot(async()=>{}),ct(o,Bt(async i=>{await Z0(i),ue({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:Mt.listConfigChange,body:JSON.parse(JSON.stringify(i))})},500),{deep:!0}),(i,s)=>(W(),X("div",TS,[f("form",OS,[f("fieldset",null,[f("div",LS,[MS,ee(f("input",{id:"sizeSorter",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=r=>o.value.sizeSorter=r)},null,512),[[Se,o.value.sizeSorter]]),NS]),f("div",BS,[DS,ee(f("input",{id:"sizeSorterDirAttrInterval",type:"number","onUpdate:modelValue":s[1]||(s[1]=r=>o.value.sizeSorterDirAttrInterval=r),min:"50",max:"999999"},null,512),[[qe,o.value.sizeSorterDirAttrInterval]]),ce(" 毫秒 "),RS]),f("div",FS,[jS,ee(f("input",{id:"showSha1",type:"checkbox","onUpdate:modelValue":s[2]||(s[2]=r=>o.value.showSha1=r)},null,512),[[Se,o.value.showSha1]]),US]),f("div",HS,[qS,ee(f("input",{id:"showFolderSizeButton",type:"checkbox","onUpdate:modelValue":s[3]||(s[3]=r=>o.value.showFolderSizeButton=r)},null,512),[[Se,o.value.showFolderSizeButton]]),zS]),f("div",VS,[KS,ee(f("input",{id:"showCopyButtonOnPathBar",type:"checkbox","onUpdate:modelValue":s[4]||(s[4]=r=>o.value.showCopyButtonOnPathBar=r)},null,512),[[Se,o.value.showCopyButtonOnPathBar]]),WS]),f("div",GS,[JS,ee(f("input",{id:"showGotoButtonOnPathBar",type:"checkbox","onUpdate:modelValue":s[5]||(s[5]=r=>o.value.showGotoButtonOnPathBar=r)},null,512),[[Se,o.value.showGotoButtonOnPathBar]]),YS])])])]))}}),JM="",Lh="search_config";function XS(e){return{showSelectTargetButtonOnPathBar:!0,...e}}async function Mh(){const e=XS(),t=await Ze.get(Lh,e);return{...e,...t}}async function ZS(e){await Ze.set(Lh,e)}const e2={class:"ce-config ce-search-config"},t2={class:"pure-form pure-form-aligned"},n2={class:"pure-control-group"},o2=f("label",{for:"showSelectTargetButtonOnPathBar"},"显示选择目标目录按钮",-1),i2=f("div",{class:"pure-form-message text-success"}," 在路径栏显示选择目标目录按钮。即可以在搜索结果页直接选择其他目录进行搜索,而不必返回列表页进入目录后再搜索。 ",-1),s2=Be({__name:"Config",async setup(e){let t,n;const o=he(([t,n]=nn(()=>Mh()),t=await t,n(),t));return Ot(async()=>{}),ct(o,Bt(async i=>{await ZS(i),ue({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:Mt.searchConfigChange,body:JSON.parse(JSON.stringify(i))})},500),{deep:!0}),(i,s)=>(W(),X("div",e2,[f("form",t2,[f("fieldset",null,[f("div",n2,[o2,ee(f("input",{id:"showSelectTargetButtonOnPathBar",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=r=>o.value.showSelectTargetButtonOnPathBar=r)},null,512),[[Se,o.value.showSelectTargetButtonOnPathBar]]),i2])])])]))}}),YM="";async function r2(e){const t=`https://qrcodeapi.115.com/api/1.0/${e}/1.0/token/`;return(await fetch(t)).json()}const a2={[0]:"等待扫码",[1]:"已扫码",[2]:"登录成功",[-1]:"已失效",[-2]:"已取消"};let dc=new AbortController;async function l2(){dc.abort()}async function c2(e){const t=new URLSearchParams;t.append("uid",e.uid),t.append("time",e.time.toString()),t.append("sign",e.sign);const n="https://qrcodeapi.115.com/get/status/?"+t.toString();return dc=new AbortController,(await fetch(n,{signal:dc.signal})).json()}function u2(e){return{domain:"",hostOnly:!1,httpOnly:!0,name:"",path:"",sameSite:"",secure:!1,session:!1,storeId:"0",value:"",id:0,...e}}async function d2(e){return`UID=${e.UID}; CID=${e.CID}; SEID=${e.SEID}`}async function f2(e){const t=[],n=Object.keys(e),o={domain:"115.com",hostOnly:!1,httpOnly:!0,path:"/",sameSite:"unspecified",secure:!1,session:!1,storeId:"0"};for(let i=0;i<n.length;i++){const s=n[i],r=e[s];t.push(u2({...o,name:s,value:r,id:i+1}))}return t}async function p2(e,t){const n=new FormData;n.append("app",t),n.append("account",e);const o=`https://passportapi.115.com/app/1.0/${t}/1.0/login/qrcode/`;return(await fetch(o,{method:"POST",body:n})).json()}async function h2(e,t){const n=`https://qrcodeapi.115.com/api/1.0/web/1.0/qrcode?uid=${t}`;return(await fetch(n)).blob()}var Nh=(e=>(e.web="web",e.android="android",e.ios="ios",e.linux="linux",e.mac="mac",e.windows="windows",e.tv="tv",e.alipaymini="alipaymini",e.wechatmini="wechatmini",e.qandroid="qandroid",e))(Nh||{});const m2={web:"网页版",android:"115生活(Android端)",ios:"115生活(iOS端)",linux:"115生活(Linux端)",mac:"115生活(macOS端)",windows:"115生活(Windows端)",tv:"115网盘(Android电视端)",alipaymini:"115生活(支付宝小程序)",wechatmini:"115生活(微信小程序)",qandroid:"115管理(Android端)"};async function g2(e,t){return new Promise((n,o)=>{const i=new FileReader;i.onloadend=()=>{if(typeof i.result=="string"){if(t instanceof HTMLImageElement)t.src=i.result;else{const s=document.createElement("img");s.src=i.result,t.appendChild(s)}n()}else console.error("[renderQrcode]","reader.result is not string!"),o("reader.result is not string!")},i.onerror=s=>{console.error("[renderQrcode]",s),o(s)},i.readAsDataURL(e)})}async function y2(e){document.addEventListener("qrcodeStatusChange",t=>{const n=t.detail;e(n)})}async function w2(e){const t=new CustomEvent("qrcodeStatusChange",{detail:e});document.dispatchEvent(t)}async function b2(e,t,n=6e4){return new Promise(async(o,i)=>{console.log("[qrcodeLogin]",e,t,n);const s=await r2(e),r=await h2(e,s.data.uid);await g2(r,t);let a=!0,c=setTimeout(()=>{a=!1,i("[qrcode login] timeout!")},n),d="";for(;a;)try{const h=(await c2(s.data)).data.status;if(w2(h),h===0)console.log(`[qrcode login] status=${h} - waiting.`);else if(h===1)console.log(`[qrcode login] status=${h} - scanned.`);else if(h===2){console.log(`[qrcode login] status=${h} - signed.`);break}else if(h===-1){clearTimeout(c),d=`[qrcode login] status=${h} - expired.`;break}else if(h===-2){clearTimeout(c),d=`[qrcode login] status=${h} - canceled.`;break}}catch(p){console.error("[qrcode login]",p),d=p;break}clearTimeout(c),d?i(d):o(p2(s.data.uid,e))})}const Bh="tools_config";function _2(e){return{scanApp:Nh.alipaymini,...e}}async function v2(){const e=_2(),t=await Ze.get(Bh,e);return{...e,...t}}async function x2(e){await Ze.set(Bh,e)}const C2={class:"ce-tools-item"},$2={class:"pure-form pure-form-aligned"},k2=f("legend",null,"扫码获取Cookie",-1),E2={class:"pure-control-group"},S2=["disabled"],A2=["value"],P2=["disabled"],I2={key:0,class:"text-warning text-bold"},T2={key:1},O2=f("div",{class:"text-danger"},"扫码登录后,所选设备之前的登录将会失效,所以请尽量选不常用的。",-1),L2={class:"pure-control-group"},M2=Be({__name:"GetCookie",props:{app:null},emits:["app-change"],setup(e,{emit:t}){const o=he(e.app),i=he(!1),s=he(!1),r=he(!1),a=he(),c=6e4,d=he(),p=to(()=>d.value?a2[d.value]:"");ct(o,B=>{t("app-change",B),y()}),Ot(async()=>{}),Ft(async()=>{await y2(_)});async function h(){await y();try{const B=document.querySelector("#ceGetCookieQrcode"),P=await b2(o.value,B,c);a.value=P.data}catch(B){if(console.error(B),B.name==="AbortError")return;fe.fire({icon:"error",title:"扫码失败",text:B.toString()})}finally{i.value=!1,s.value=!1,d.value=void 0}}async function y(){a.value=void 0,s.value=!1,r.value=!1,i.value=!1,d.value=void 0,await T()}async function x(){s.value=!0}async function _(B){console.log("[handleStatusChange]",B),d.value=B}async function S(B){var H;const P=(H=a.value)==null?void 0:H.cookie;if(!P)return;let I="";if(B==="text")I=await d2(P);else if(B==="json"){const ie=await f2(P);I=JSON.stringify(ie,null,2)}Tw(I),zs.fire({icon:"success",title:"已复制到剪贴板",timer:1500})}async function T(){await l2()}return(B,P)=>(W(),X("div",C2,[f("form",$2,[f("fieldset",null,[k2,f("div",E2,[ee(f("select",{"onUpdate:modelValue":P[0]||(P[0]=I=>o.value=I),disabled:i.value},[(W(!0),X(De,null,nt(de(m2),(I,H)=>(W(),X("option",{value:H,key:H},ye(I),9,A2))),128))],8,S2),[[cs,o.value]]),ce("    "),f("button",{type:"button",class:"pure-button pure-button-primary",onClick:h,disabled:i.value}," 开始 ",8,P2),ce("    "),de(p)?(W(),X("span",I2,ye(de(p)),1)):Ge("",!0),a.value?(W(),X("span",T2,[ce("      "),f("button",{type:"button",class:"pure-button button-success",onClick:P[1]||(P[1]=I=>S("text"))}," 复制文本格式Cookie "),ce("    "),f("button",{type:"button",class:"pure-button button-success",onClick:P[2]||(P[2]=I=>S("json"))}," 复制JSON格式Cookie ")])):Ge("",!0)]),O2,ee(f("div",L2,[f("img",{id:"ceGetCookieQrcode",alt:"qrcode",onLoad:x},null,32)],512),[[Yt,s.value]])])])]))}}),N2={class:"ce-tools-item"},B2={class:"pure-form pure-form-aligned"},D2=f("legend",null,"文件清理",-1),R2={class:"pure-control-group"},F2=Be({__name:"Cleaner",setup(e){async function t(o){o&&(await n(),await kt(1e3)),window.postMessage({event:Mt.closeConfig}),postMessage({type:Nn.OPEN_CLEANER})}async function n(){return new Promise(async(o,i)=>{unsafeWindow.parent.Core.FileSelectDG.Open((s,r)=>{console.log("[Core.FileSelectDG.Open]",s,r);const a=s[s.length-1];unsafeWindow.parent.wangpan.Main.GotoDir(1,a.cid,0,""),o()},{select:1,nf:1,show_record:0,show_copy:1,btn_txt:"打开清理工具",select_txt:"清理"})})}return(o,i)=>(W(),X("div",N2,[f("form",B2,[f("fieldset",null,[D2,f("div",R2,[f("button",{type:"button",class:"pure-button button-success",onClick:i[0]||(i[0]=s=>t(!1))}," 清理当前文件夹 "),ce("      "),f("button",{type:"button",class:"pure-button button-success",onClick:i[1]||(i[1]=s=>t(!0))}," 清理指定文件夹 ")])])])]))}}),j2={class:"ce-config ce-tools-config"},U2={class:"item"},H2=Be({__name:"Config",async setup(e){let t,n;const o=he(([t,n]=nn(()=>v2()),t=await t,n(),t));Ot(async()=>{}),ct(o,Bt(async s=>{await x2(s),window.postMessage({event:Mt.toolsConfigChange,body:JSON.parse(JSON.stringify(s))})},100),{deep:!0});async function i(s){o.value.scanApp=s}return(s,r)=>(W(),X("div",j2,[f("div",U2,[Ce(M2,{app:o.value.scanApp,onAppChange:i},null,8,["app"]),Ce(F2)])]))}}),QM="",q2={class:"menu-config-block menu-basic-config"},z2={class:"pure-form pure-form-stacked"},V2=f("legend",null,"全局设置",-1),K2={class:"pure-control-group"},W2=f("label",{for:"basic_enabled"},"启用",-1),G2={class:"pure-control-group"},J2=f("label",{for:"basic_hideSelectionMenuLabel"},"隐藏顶部菜单文本",-1),Y2={class:"pure-control-group"},Q2=f("label",{for:"basic_enableInSearch"},"在搜索结果页中启用",-1),X2={class:"pure-control-group"},Z2=f("label",{for:"basic_manageOfficialMenus"},"控制官方菜单",-1),eA={class:"pure-control-group"},tA=f("label",{for:"basic_forceManualBeforeOpenOnKey"},"强制使用手动输入模式的辅助键",-1),nA=["value"],oA={class:"pure-control-group"},iA=f("label",{for:"basic_m3u8TempDirName"},"M3U8临时目录",-1),sA=Be({__name:"BasicConfig",props:{config:null},setup(e,{emit:t}){const n=e;return(o,i)=>(W(),X("div",q2,[f("form",z2,[f("fieldset",null,[V2,f("div",K2,[W2,ee(f("input",{id:"basic_enabled",type:"checkbox","onUpdate:modelValue":i[0]||(i[0]=s=>n.config.enabled=s)},null,512),[[Se,n.config.enabled]])]),f("div",G2,[J2,ee(f("input",{id:"basic_hideSelectionMenuLabel",type:"checkbox","onUpdate:modelValue":i[1]||(i[1]=s=>n.config.hideSelectionMenuLabel=s)},null,512),[[Se,n.config.hideSelectionMenuLabel]])]),f("div",Y2,[Q2,ee(f("input",{id:"basic_enableInSearch",type:"checkbox","onUpdate:modelValue":i[2]||(i[2]=s=>n.config.enableInSearch=s)},null,512),[[Se,n.config.enableInSearch]])]),f("div",X2,[Z2,ee(f("input",{id:"basic_manageOfficialMenus",type:"checkbox","onUpdate:modelValue":i[3]||(i[3]=s=>n.config.manageOfficialMenus=s)},null,512),[[Se,n.config.manageOfficialMenus]])]),f("div",eA,[tA,ee(f("select",{id:"basic_forceManualBeforeOpenOnKey","onUpdate:modelValue":i[4]||(i[4]=s=>n.config.keyToTriggerManual=s)},[(W(!0),X(De,null,nt(de(ln),(s,r)=>(W(),X("option",{key:r,value:r},ye(s),9,nA))),128))],512),[[cs,n.config.keyToTriggerManual]])]),f("div",oA,[iA,ee(f("input",{id:"basic_m3u8TempDirName","onUpdate:modelValue":i[5]||(i[5]=s=>n.config.m3u8TempDir=s)},null,512),[[qe,n.config.m3u8TempDir]])])])])]))}}),XM="",rA={class:"menu-config-block"},aA={class:"pure-form pure-form-stacked"},lA=f("label",{for:"listItemHover_enabled"},"启用",-1),cA=f("label",{for:"listItemHover_openInNewTab"},"新标签页打开",-1),uA=f("label",{for:"listItemHover_search",class:"text-primary"},"搜索",-1),dA=f("label",{for:"listItemHover_play",class:"text-primary"},"播放",-1),fA=f("label",{for:"listItemHover_copyFileName"},"名称路径",-1),pA=f("label",{for:"listItemHover_exportList"},"导出列表数据",-1),hA=Be({__name:"ListItemHoverConfig",props:{config:null},setup(e){return(t,n)=>(W(),X("div",rA,[f("form",aA,[f("fieldset",null,[f("legend",null,ye(de(Ai).listItemHover),1),f("div",null,[lA,ee(f("input",{id:"listItemHover_enabled",type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=o=>e.config.enabled=o)},null,512),[[Se,e.config.enabled]])]),f("div",null,[cA,ee(f("input",{id:"listItemHover_openInNewTab",type:"checkbox","onUpdate:modelValue":n[1]||(n[1]=o=>e.config.openInNewTab=o)},null,512),[[Se,e.config.openInNewTab]])]),f("div",null,[uA,ee(f("input",{id:"listItemHover_search",type:"checkbox","onUpdate:modelValue":n[2]||(n[2]=o=>e.config.search=o)},null,512),[[Se,e.config.search]])]),f("div",null,[dA,ee(f("input",{id:"listItemHover_play",type:"checkbox","onUpdate:modelValue":n[3]||(n[3]=o=>e.config.play=o)},null,512),[[Se,e.config.play]])]),f("div",null,[fA,ee(f("input",{id:"listItemHover_copyFileName",type:"checkbox","onUpdate:modelValue":n[4]||(n[4]=o=>e.config.copyNames=o)},null,512),[[Se,e.config.copyNames]])]),f("div",null,[pA,ee(f("input",{id:"listItemHover_exportList",type:"checkbox","onUpdate:modelValue":n[5]||(n[5]=o=>e.config.exportList=o)},null,512),[[Se,e.config.exportList]])])])])]))}}),mA={class:"menu-config-block"},gA={class:"pure-form pure-form-stacked"},yA=f("label",{for:"listItemContext_enabled"},"启用",-1),wA=f("label",{for:"listItemContext_copyFileName"},"名称路径",-1),bA=Be({__name:"ListItemContextConfig",props:{config:null},setup(e){return(t,n)=>(W(),X("div",mA,[f("form",gA,[f("fieldset",null,[f("legend",null,ye(de(Ai).listItemContext),1),f("div",null,[yA,ee(f("input",{id:"listItemContext_enabled",type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=o=>e.config.enabled=o)},null,512),[[Se,e.config.enabled]])]),f("div",null,[wA,ee(f("input",{id:"listItemContext_copyFileName",type:"checkbox","onUpdate:modelValue":n[1]||(n[1]=o=>e.config.copyNames=o)},null,512),[[Se,e.config.copyNames]])])])])]))}}),_A={class:"menu-config-block"},vA={class:"pure-form pure-form-stacked"},xA=f("label",{for:"selection_enabled"},"启用",-1),CA=f("label",{for:"selection_moveToSelfNameDir"},"移动到同名目录",-1),$A=f("label",{for:"selection_copyFileName"},"名称路径",-1),kA=f("label",{for:"selection_play"},"播放",-1),EA=Be({__name:"SelectionConfig",props:{config:null},setup(e){return(t,n)=>(W(),X("div",_A,[f("form",vA,[f("fieldset",null,[f("legend",null,ye(de(Ai).selection),1),f("div",null,[xA,ee(f("input",{id:"selection_enabled",type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=o=>e.config.enabled=o)},null,512),[[Se,e.config.enabled]])]),f("div",null,[CA,ee(f("input",{id:"selection_moveToSelfNameDir",type:"checkbox","onUpdate:modelValue":n[1]||(n[1]=o=>e.config.moveToSelfNameDir=o)},null,512),[[Se,e.config.moveToSelfNameDir]])]),f("div",null,[$A,ee(f("input",{id:"selection_copyFileName",type:"checkbox","onUpdate:modelValue":n[2]||(n[2]=o=>e.config.copyNames=o)},null,512),[[Se,e.config.copyNames]])]),f("div",null,[kA,ee(f("input",{id:"selection_play",type:"checkbox","onUpdate:modelValue":n[3]||(n[3]=o=>e.config.play=o)},null,512),[[Se,e.config.play]])])])])]))}}),SA={class:"menu-config-block"},AA={class:"pure-form pure-form-stacked"},PA=f("label",{for:"dirContext_enabled"},"启用",-1),IA=f("label",{for:"dirContext_rename"},"重命名",-1),TA=f("label",{for:"dirContext_delete"},"删除",-1),OA=f("label",{for:"dirContext_play"},"播放全部",-1),LA=f("label",{for:"dirContext_copyFileName"},"名称路径",-1),MA=f("label",{for:"dirContext_move"},"移动",-1),NA=f("label",{for:"dirContext_copy"},"复制",-1),BA=f("label",{for:"dirContext_copyTo"},"复制到",-1),DA=f("label",{for:"dirContext_viewProperties"},"查看属性",-1),RA=f("label",{for:"dirContext_showSubFolderSize"},"子文件夹大小",-1),FA=f("label",{for:"dirContext_exportList"},"导出列表数据",-1),jA=Be({__name:"DirContextConfig",props:{config:null},setup(e){return(t,n)=>(W(),X("div",SA,[f("form",AA,[f("fieldset",null,[f("legend",null,ye(de(Ai).dirContext),1),f("div",null,[PA,ee(f("input",{id:"dirContext_enabled",type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=o=>e.config.enabled=o)},null,512),[[Se,e.config.enabled]])]),f("div",null,[IA,ee(f("input",{id:"dirContext_rename",type:"checkbox","onUpdate:modelValue":n[1]||(n[1]=o=>e.config.rename=o)},null,512),[[Se,e.config.rename]])]),f("div",null,[TA,ee(f("input",{id:"dirContext_delete",type:"checkbox","onUpdate:modelValue":n[2]||(n[2]=o=>e.config.delete=o)},null,512),[[Se,e.config.delete]])]),f("div",null,[OA,ee(f("input",{id:"dirContext_play",type:"checkbox","onUpdate:modelValue":n[3]||(n[3]=o=>e.config.play=o)},null,512),[[Se,e.config.play]])]),f("div",null,[LA,ee(f("input",{id:"dirContext_copyFileName",type:"checkbox","onUpdate:modelValue":n[4]||(n[4]=o=>e.config.copyNames=o)},null,512),[[Se,e.config.copyNames]])]),f("div",null,[MA,ee(f("input",{id:"dirContext_move",type:"checkbox","onUpdate:modelValue":n[5]||(n[5]=o=>e.config.move=o)},null,512),[[Se,e.config.move]])]),f("div",null,[NA,ee(f("input",{id:"dirContext_copy",type:"checkbox","onUpdate:modelValue":n[6]||(n[6]=o=>e.config.copy=o)},null,512),[[Se,e.config.copy]])]),f("div",null,[BA,ee(f("input",{id:"dirContext_copyTo",type:"checkbox","onUpdate:modelValue":n[7]||(n[7]=o=>e.config.copyTo=o)},null,512),[[Se,e.config.copyTo]])]),f("div",null,[DA,ee(f("input",{id:"dirContext_viewProperties",type:"checkbox","onUpdate:modelValue":n[8]||(n[8]=o=>e.config.viewProp=o)},null,512),[[Se,e.config.viewProp]])]),f("div",null,[RA,ee(f("input",{id:"dirContext_showSubFolderSize",type:"checkbox","onUpdate:modelValue":n[9]||(n[9]=o=>e.config.showSubFolderSize=o)},null,512),[[Se,e.config.showSubFolderSize]])]),f("div",null,[FA,ee(f("input",{id:"dirContext_exportList",type:"checkbox","onUpdate:modelValue":n[10]||(n[10]=o=>e.config.exportList=o)},null,512),[[Se,e.config.exportList]])])])])]))}}),UA={class:"official-menu-config"},HA=f("div",{class:"ce-tips"},[f("p",null,[ce("开启「全局设置 - 控制官方菜单」后生效。"),f("b",{class:"text-danger"},"暂不建议开启。")]),f("p",{class:"text-danger"},"目前的控制效果并不好,比如会把文件专用的菜单显示在目录上(反之亦然)。")],-1),qA={class:"pure-form pure-form-stacked"},zA=["for"],VA=["id","onUpdate:modelValue"],KA=Be({__name:"OfficialMenuConfig",setup(e){const t=he([]),n=he(!1);return Ot(async()=>{t.value=await Ap(),console.log("official menu groups",t.value,location.href)}),Ft(()=>{document.body.addEventListener("click",()=>{n.value||(n.value=!0)})}),ct(t,Bt(async o=>{if(!n.value)return;const i=await Sp(o);await Ep(i),ue({icon:"success",title:"官方菜单设置已保存,刷新页面生效。",timer:1e3,position:"top-end"})},500),{deep:!0}),(o,i)=>(W(),X("div",UA,[HA,(W(!0),X(De,null,nt(t.value,(s,r)=>(W(),X("div",{key:r,class:"menu-config-block"},[f("form",qA,[f("fieldset",null,[f("legend",null,ye(s.label),1),(W(!0),X(De,null,nt(s.items,(a,c)=>(W(),X("div",{key:c},[f("label",{for:`m_${r}_${c}_enabled`},[ce(ye(a.label)+" ",1),f("small",null,ye(a.key),1)],8,zA),ee(f("input",{id:`m_${r}_${c}_enabled`,type:"checkbox","onUpdate:modelValue":d=>a.enabled=d},null,8,VA),[[Se,a.enabled]])]))),128))])])]))),128))]))}}),ZM="",WA={key:0,class:"ce-menu-config"},GA=f("div",{class:"ce-tips"},[f("p",null,"「搜索」功能菜单支持自定义,可在「搜索菜单」设置面板中添加和管理。"),f("p",null,"「播放」功能菜单支持自定义,可在「播放菜单」设置面板中添加和管理。")],-1),JA=f("hr",{class:"ce-hr"},null,-1),YA=f("h1",null,"官方菜单设置",-1),QA=Be({__name:"MenuConfig",async setup(e){let t,n;const o=he(([t,n]=nn(()=>ni()),t=await t,n(),t));return he(!1),Ot(async()=>{}),ct(o,Bt(async i=>{await hb(i),ue({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0}),(i,s)=>o.value.enabled!==void 0?(W(),X("div",WA,[GA,Ce(sA,{config:o.value},null,8,["config"]),Ce(hA,{config:o.value.listItemHover},null,8,["config"]),Ce(bA,{config:o.value.listItemContext},null,8,["config"]),Ce(EA,{config:o.value.selection},null,8,["config"]),Ce(jA,{config:o.value.dirContext},null,8,["config"]),JA,f("div",null,[YA,f("div",null,[Ce(KA)])])])):Ge("",!0)}}),eN="",XA={class:"ce-custom-url"},ZA={class:"pure-form pure-form-aligned"},eP={class:"ce-custom-url-index"},tP={class:"pure-control-group"},nP=f("label",null,"启用",-1),oP={class:"pure-control-group"},iP=f("label",null,"唯一标识",-1),sP={class:"pure-control-group"},rP=f("label",null,"显示名称",-1),aP={class:"pure-control-group"},lP=f("label",null,"图标",-1),cP={class:"pure-control-group"},uP={class:"pure-control-group"},dP=f("label",null,"后台打开",-1),fP={class:"pure-control-group"},pP=f("label",null,"备注",-1),hP={key:0,class:"pure-control-group"},mP=f("label",null,"Mutation",-1),Dh=Be({__name:"CustomUrl",props:{item:null,index:null},emits:["delete"],setup(e,{emit:t}){const n=he(!0);function o(){t("delete")}async function i(){n.value=!n.value,n.value&&ue({title:"已开启高级模式",text:"请谨慎修改,不正确的代码可能会导致脚本崩溃。",icon:"info",timer:2e3})}async function s(){window.postMessage({event:"customUrlHelp"},"*")}async function r(){const a=`
  <div style="text-align:left;">
    <p>自定义代码,用于生成最终的链接。</p><br>
    <p>代码会被包含在一个async匿名函数中执行,最终应该返回一个链接字符串。</p>
    <p>传入的参数名为「payload」,其结构如下:</p>
    <p>- url: 之前自动处理得到的链接</p>
    <p>- file:当前文件信息</p>
    <p>- customUrl:当前自定义规则信息</p>
    <p>- cloudDriveConfig:CloudDrive设置信息</p><br>
    <p>示例:</p>
    <pre style="text-align:left;font-size:12px;">
    const {
      url,
      file,
      customUrl,
      cloudDriveConfig
    } = payload
    const sth = await fetch(\`https://api.sth.com/foo?bar=\${file.pc}\`)
    return \`https://example.com/do?key=\${sth}\`
    </pre>
  </div>
  `;await fe.fire({title:"Mutation 说明",html:a,width:480,position:"top-start",backdrop:!1})}return(a,c)=>(W(),X("div",XA,[f("form",ZA,[f("fieldset",null,[f("legend",null,[f("span",eP,"# "+ye(e.index+1),1),f("button",{type:"button",class:"pure-button button-error button-small",onClick:o}," 删除 ")]),f("div",tP,[nP,ee(f("input",{"onUpdate:modelValue":c[0]||(c[0]=d=>e.item.enabled=d),type:"checkbox",id:"customUrl_enabled"},null,512),[[Se,e.item.enabled]])]),f("div",oP,[iP,ee(f("input",{"onUpdate:modelValue":c[1]||(c[1]=d=>e.item.key=d),id:"customUrl_key",class:"pure-input-2-3",placeholder:"英文、数字或下划线"},null,512),[[qe,e.item.key]])]),f("div",sP,[rP,ee(f("input",{"onUpdate:modelValue":c[2]||(c[2]=d=>e.item.label=d),id:"customUrl_label",class:"pure-input-2-3",placeholder:"菜单文本,尽量简洁"},null,512),[[qe,e.item.label]])]),f("div",aP,[lP,ee(f("input",{"onUpdate:modelValue":c[3]||(c[3]=d=>e.item.icon=d),id:"customUrl_icon",class:"pure-input-2-3",placeholder:"图标class、图片链接或图片data:image"},null,512),[[qe,e.item.icon]])]),f("div",cP,[f("label",{onDblclick:i}," 链接 ",32),ee(f("textarea",{"onUpdate:modelValue":c[4]||(c[4]=d=>e.item.url=d),id:"customUrl_url",class:"pure-input-2-3",placeholder:"链接地址,支持变量,变量列表请点击右侧「查看变量」"},null,512),[[qe,e.item.url]]),ce("   "),f("a",{href:"javascript:void(0)",class:"text-primary",onClick:s},"查看变量")]),f("div",uP,[dP,ee(f("input",{"onUpdate:modelValue":c[5]||(c[5]=d=>e.item.openInBackground=d),id:"customUrl_openInBackground",type:"checkbox"},null,512),[[Se,e.item.openInBackground]])]),f("div",fP,[pP,ee(f("input",{"onUpdate:modelValue":c[6]||(c[6]=d=>e.item.memo=d),id:"customUrl_memo",class:"pure-input-2-3"},null,512),[[qe,e.item.memo]])]),n.value?(W(),X("div",hP,[mP,ee(f("textarea",{"onUpdate:modelValue":c[7]||(c[7]=d=>e.item.mutation=d),id:"customUrl_mutation",class:"pure-input-2-3",placeholder:"自定义代码生成最终链接,具体请看右侧「查看说明」"},null,512),[[qe,e.item.mutation]]),ce("   "),f("a",{href:"javascript:void(0)",class:"text-primary",onClick:r},"查看说明")])):Ge("",!0)])])]))}}),tN="",gP={class:"ce-config ce-search-urls ce-custom-urls"},yP={class:"ce-menu-urls-builtin"},wP={class:"pure-form pure-form-aligned"},bP=["for"],_P=["id","onUpdate:modelValue"],vP={class:"text-info"},xP=["onClick"],CP={class:"ce-custom-urls-list"},$P={class:"ce-custom-urls-actions"},kP=["disabled"],EP=Be({__name:"SearchUrls",async setup(e){let t,n;const o=he(([t,n]=nn(()=>fp()),t=await t,n(),t)),i=he(([t,n]=nn(()=>ti(vn.search)),t=await t,n(),t));Ot(async()=>{}),ct(o,Bt(async p=>{const h=[];p.forEach(y=>{y.enabled&&h.push(y.key)}),await G0(h),ue({icon:"success",title:"预置搜索菜单设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0});async function s(){const p=[];for(const h of i.value){if(!await r(h,p.length))return;if(p.includes(h.key)){ue({icon:"error",title:`第 ${p.length+1} 个记录的「唯一标识: ${h.key}」重复!`});return}p.push(h.key)}await gd(vn.search,i.value),ue({icon:"success",title:"保存成功!"})}async function r(p,h){const y=/^\w+$/;return p.key=p.key.trim(),y.test(p.key)?(p.label=p.label.trim(),p.label===""?(ue({icon:"error",title:`第 ${h+1} 个记录的「显示名称」不能为空!`}),!1):(p.url=p.url.trim(),p.url===""?(ue({icon:"error",title:`第 ${h+1} 个记录的「链接」不能为空!`}),!1):(p.icon=p.icon.trim(),p.memo=p.memo.trim(),!0))):(ue({icon:"error",title:`第 ${h+1} 个记录的「唯一标识」错误!只能包含字母、数字、下划线。`}),!1)}async function a(){i.value.push(pt())}async function c(p,h){const{isConfirmed:y}=await fe.fire({icon:"warning",html:`确定要删除第 ${h+1} 个记录「${p.label}」吗?`});!y||(i.value.splice(h,1),await s(),ue({icon:"success",title:`「${p.label}」已删除!`}))}async function d(p){const h=JSON.stringify(p,null,2),y=`ce-url-item-denifition-${p.key}`,{isConfirmed:x}=await fe.fire({title:`「${p.label}」的定义`,html:`<h3>${p.memo}</h3>
      <pre id="${y}" style="text-align:left;font-size:12px;"></pre>`,confirmButtonText:"复制",showCancelButton:!0,position:"top-left",heightAuto:!0,didOpen:()=>{document.getElementById(y).textContent=h}});!x||(navigator.clipboard.writeText(h),ue({icon:"success",title:"已复制到剪贴板!"}))}return(p,h)=>(W(),X("div",gP,[f("h1",null,[ce("预置搜索菜单 "),ee(f("small",null,"( "+ye(o.value.length)+" )",513),[[Yt,o.value.length]])]),f("div",yP,[f("form",wP,[f("fieldset",null,[(W(!0),X(De,null,nt(o.value,(y,x)=>(W(),X("div",{key:x,class:"pure-control-group"},[f("label",{for:`builtin_${y.key}`},ye(y.label),9,bP),ee(f("input",{id:`builtin_${y.key}`,type:"checkbox","onUpdate:modelValue":_=>y.enabled=_},null,8,_P),[[Se,y.enabled]]),ce("      "),f("span",vP,ye(y.memo),1),ce("      "),f("button",{type:"button",class:"pure-button button-small",onClick:_=>d(y)},"查看定义",8,xP)]))),128))])])]),f("h1",null,[ce("自定义搜索菜单 "),ee(f("small",null,"( "+ye(i.value.length)+" )",513),[[Yt,i.value.length]])]),f("div",CP,[(W(!0),X(De,null,nt(i.value,(y,x)=>(W(),Gt(Dh,{key:x,item:y,index:x,onDelete:_=>c(y,x)},null,8,["item","index","onDelete"]))),128))]),f("div",$P,[f("button",{type:"button",class:"pure-button pure-button-primary button-large",onClick:s,disabled:!i.value.length}," 保存自定义搜索菜单 ",8,kP),ce("      "),f("button",{type:"button",class:"pure-button pure-button-success button-large",onClick:a}," 添加自定义搜索菜单 ")])]))}}),nN="",SP={class:"ce-config ce-play-urls ce-custom-urls"},AP=f("div",{class:"ce-tips"},[f("p",null,[ce("支持常见的视频、音频和图片格式,也支持目录播放。预置播放菜单使用的链接变量是 "),f("b",null,"{clouddrive_stream_url}"),ce(" , 会根据文件或目录自动使用相应的链接。")]),f("p",null,"播放功能依赖CloudDrive,请先在「CloudDrive」设置面板中进行配置。")],-1),PP={class:"ce-menu-urls-builtin"},IP={class:"pure-form pure-form-aligned"},TP=["for"],OP=["id","onUpdate:modelValue"],LP={class:"text-info"},MP=["onClick"],NP=["innerHTML"],BP={class:"ce-custom-urls-list"},DP=f("div",{class:"ce-tips"}," 编辑后,请记得点击「保存自定义播放菜单」。 ",-1),RP={class:"ce-custom-urls-actions"},FP=["disabled"],jP=Be({__name:"PlayUrls",async setup(e){let t,n;const o=he(([t,n]=nn(()=>Tr()),t=await t,n(),t)),i=he(([t,n]=nn(()=>ti(vn.play)),t=await t,n(),t));Ot(async()=>{}),ct(o,Bt(async p=>{const h=[];p.forEach(y=>{y.enabled&&h.push(y.key)}),await J0(h),ue({icon:"success",title:"预置搜索菜单设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0});async function s(){const p=[];for(const h of i.value){if(!await r(h,p.length))return;if(p.includes(h.key)){ue({icon:"error",title:`第 ${p.length+1} 个记录的「唯一标识: ${h.key}」重复!`});return}p.push(h.key)}await gd(vn.play,i.value),ue({icon:"success",title:"保存成功!"})}async function r(p,h){const y=/^\w+$/;return p.key=p.key.trim(),y.test(p.key)?(p.label=p.label.trim(),p.label===""?(ue({icon:"error",title:`第 ${h+1} 个记录的「显示名称」不能为空!`}),!1):(p.url=p.url.trim(),p.url===""?(ue({icon:"error",title:`第 ${h+1} 个记录的「链接」不能为空!`}),!1):(p.icon=p.icon.trim(),p.memo=p.memo.trim(),!0))):(ue({icon:"error",title:`第 ${h+1} 个记录的「唯一标识」错误!只能包含字母、数字、下划线。`}),!1)}async function a(){i.value.push(pt())}async function c(p,h){const{isConfirmed:y}=await fe.fire({icon:"warning",html:`确定要删除第 ${h+1} 个记录「${p.label}」吗?`});!y||(i.value.splice(h,1),await s(),ue({icon:"success",title:`「${p.label}」已删除!`}))}async function d(p){const h=JSON.stringify(p,null,2),y=`ce-url-item-denifition-${p.key}`,{isConfirmed:x}=await fe.fire({title:`「${p.label}」的定义`,html:`<h3>${p.memo}</h3>
      <pre id="${y}" style="text-align:left;font-size:12px;"></pre>`,confirmButtonText:"复制",showCancelButton:!0,position:"top-left",heightAuto:!0,didOpen:()=>{document.getElementById(y).innerText=h}});!x||(navigator.clipboard.writeText(h),ue({icon:"success",title:"已复制到剪贴板!"}))}return(p,h)=>(W(),X("div",SP,[f("h1",null,[ce("预置播放菜单 "),ee(f("small",null,"( "+ye(o.value.length)+" )",513),[[Yt,o.value.length]])]),AP,f("div",PP,[f("form",IP,[f("fieldset",null,[(W(!0),X(De,null,nt(o.value,(y,x)=>(W(),X("div",{key:x,class:"pure-control-group"},[f("label",{for:`builtin_${y.key}`},ye(y.label),9,TP),ee(f("input",{id:`builtin_${y.key}`,type:"checkbox","onUpdate:modelValue":_=>y.enabled=_},null,8,OP),[[Se,y.enabled]]),ce("      "),f("span",LP,ye(y.memo),1),ce("      "),f("button",{type:"button",class:"pure-button button-small",onClick:_=>d(y)},"查看定义",8,MP),y.extraMemo?(W(),X("span",{key:0,innerHTML:y.extraMemo,class:"extra-memo"},null,8,NP)):Ge("",!0)]))),128))])])]),f("h1",null,[ce("自定义播放菜单 "),ee(f("small",null,"( "+ye(i.value.length)+" )",513),[[Yt,i.value.length]])]),f("div",BP,[(W(!0),X(De,null,nt(i.value,(y,x)=>(W(),Gt(Dh,{key:x,item:y,index:x,onDelete:_=>c(y,x)},null,8,["item","index","onDelete"]))),128))]),DP,f("div",RP,[f("button",{type:"button",class:"pure-button pure-button-primary button-large",onClick:s,disabled:!i.value.length}," 保存自定义播放菜单 ",8,FP),ce("      "),f("button",{type:"button",class:"pure-button pure-button-success button-large",onClick:a}," 添加自定义播放菜单 ")])]))}}),oN="",Rh=function(){return document.ontouchstart!==null?"click":"touchstart"},ea="__vue_click_away__",Fh=function(e,t,n){jh(e);let o=n.context,i=t.value,s=!1;setTimeout(function(){s=!0},0),e[ea]=function(r){if((!e||!e.contains(r.target))&&i&&s&&typeof i=="function")return i.call(o,r)},document.addEventListener(Rh(),e[ea],!1)},jh=function(e){document.removeEventListener(Rh(),e[ea],!1),delete e[ea]},UP={mounted:Fh,updated:function(e,t,n){t.value!==t.oldValue&&Fh(e,t,n)},unmounted:jh},HP=Be({__name:"Drawer",props:{isOpen:{type:Boolean,required:!1,default:!1},maxWidth:{type:String,required:!1,default:"600px"},speed:{type:Number,required:!1,default:100},backgroundColor:{type:String,required:!1,default:"#fafafa"}},emits:["close"],setup(e,{emit:t}){const n=e,o=he(!1),i=he(!1),s=a=>{const c=document.querySelector("body");c.style.overflow=a?"hidden":""},r=a=>{!a.target.classList.contains("ce-drawer__overlay")||i.value||t("close")};return Ft(()=>{o.value=n.isOpen}),ct(()=>n.isOpen,a=>{i.value=!0,a?(s(!0),o.value=!0):(s(!1),setTimeout(()=>o.value=!1,n.speed)),setTimeout(()=>i.value=!1,n.speed)}),(a,c)=>(W(),X("div",null,[f("div",{class:Ye(["ce-drawer",{"is-open":e.isOpen,"is-visible":o.value}])},[f("div",{class:"ce-drawer__overlay",style:xn({transitionDuration:`${e.speed}ms`})},null,4),ee((W(),X("div",{class:"ce-drawer__content",style:xn({maxWidth:e.maxWidth,transitionDuration:`${e.speed}ms`,backgroundColor:e.backgroundColor})},[Sn(a.$slots,"default")],4)),[[de(UP),r]])],2)]))}}),sN="",qP={class:"ce-about"},zP=f("p",null,"115不大助手(以下简称「脚本」),是一个仅用于学习编程的小脚本。",-1),VP=f("br",null,null,-1),KP=f("p",null,"脚本不会收集您的任何个人信息。",-1),WP=f("p",null,"脚本仅借助了官方已有的功能,无任何破解行为。",-1),GP=f("p",null,"脚本代码本身已包含全部依赖,无任何远程引用。",-1),JP=f("br",null,null,-1),YP=f("br",null,null,-1),QP=f("br",null,null,-1),XP=f("hr",{class:"ce-hr"},null,-1),ZP=["href"],eI=Be({__name:"About",setup(e){const t={name:"115不大助手",version:"0.5.54",author:{name:"生瓜太保",email:"mailme@miao.com"},greasyforkUrl:"https://greasyfork.org/zh-CN/scripts/474231-115%E4%B8%8D%E5%A4%A7%E5%8A%A9%E6%89%8B-full?locale_override=1"};return(n,o)=>(W(),X("div",qP,[zP,VP,KP,WP,GP,JP,YP,QP,XP,f("div",null,[f("a",{href:de(t).greasyforkUrl,class:"text-bold text-primary",target:"_blank",rel:"noreferrer noopener",title:"到Greasyfork查看"},[ce(ye(de(t).name)+" ",1),f("small",null,"v"+ye(de(t).version),1)],8,ZP),ce("  "),f("small",null,"by "+ye(de(t).author.name),1)])]))}}),tI={class:"ce-config-main"},nI={class:"ce-config-main-header"},oI=f("h1",null,"设置",-1),iI={class:"ce-intro"},sI=["href"],rI={class:"ce-config-main-body"},aI=Be({__name:"Config",setup(e){const t={name:"115不大助手",version:"0.5.54",author:{name:"生瓜太保",email:"mailme@miao.com"},greasyforkUrl:"https://greasyfork.org/zh-CN/scripts/474231-115%E4%B8%8D%E5%A4%A7%E5%8A%A9%E6%89%8B-full?locale_override=1"},n=he(!1),o=he(!1),i=he();Ft(async()=>{window.addEventListener("message",d=>{const{event:p,body:h}=d.data;p===Mt.openConfig&&(n.value||(n.value=!0),s(h)),p===Mt.closeConfig&&r()},!1)});async function s(d){var p;o.value=!0,console.log("[openDrawer]",d),d&&(await Gi(),(p=i.value)==null||p.selectTab(`#${d}`))}async function r(){o.value=!1}async function a(...d){console.log("[tabClicked]",d)}async function c(...d){console.log("[tabChanged]",d)}return(d,p)=>(W(),Gt(mf,null,{default:We(()=>[f("div",tI,[Ce(HP,{"is-open":o.value,onClose:r,"max-width":"1030px",speed:500},{default:We(()=>[f("div",nI,[oI,f("span",iI,[f("a",{href:de(t).greasyforkUrl,class:"text-bold text-primary",target:"_blank",rel:"noreferrer noopener",title:"到Greasyfork查看"},[ce(ye(de(t).name)+" ",1),f("small",null,"v"+ye(de(t).version),1)],8,sI),ce("  "),f("small",null,"by "+ye(de(t).author.name),1)]),f("div",{class:"ce-config-main-close",onClick:r},"关闭")]),f("div",rI,[Ce(de(SE),{ref_key:"refTabs",ref:i,options:{useUrlFragment:!1},onClicked:a,onChanged:c},{default:We(()=>[Ce(de(mn),{id:de(Qt).basic,name:de(hn).basic},{default:We(()=>[Ce(cS)]),_:1},8,["id","name"]),Ce(de(mn),{id:de(Qt).clouddrive,name:de(hn).clouddrive},{default:We(()=>[Ce(IS)]),_:1},8,["id","name"]),Ce(de(mn),{id:de(Qt).list,name:de(hn).list},{default:We(()=>[Ce(QS)]),_:1},8,["id","name"]),Ce(de(mn),{id:de(Qt).search,name:de(hn).search},{default:We(()=>[Ce(s2)]),_:1},8,["id","name"]),Ce(de(mn),{id:de(Qt).menus,name:de(hn).menus},{default:We(()=>[Ce(QA)]),_:1},8,["id","name"]),Ce(de(mn),{id:de(Qt).searchMenus,name:de(hn).searchMenus},{default:We(()=>[Ce(EP)]),_:1},8,["id","name"]),Ce(de(mn),{id:de(Qt).playMenus,name:de(hn).playMenus},{default:We(()=>[Ce(jP)]),_:1},8,["id","name"]),Ce(de(mn),{id:de(Qt).offline,name:de(hn).offline},{default:We(()=>[Ce(Mp)]),_:1},8,["id","name"]),Ce(de(mn),{id:de(Qt).tools,name:de(hn).tools},{default:We(()=>[Ce(H2)]),_:1},8,["id","name"]),Ce(de(mn),{id:de(Qt).about,name:de(hn).about},{default:We(()=>[Ce(eI)]),_:1},8,["id","name"])]),_:1},512)])]),_:1},8,["is-open"])])]),_:1}))}}),rN="",aN="";async function lI(){const{host:e}=location;!e.includes("115.com")||window.top===window.self&&(console.log("[Cloud115 Enhancer - main] running..."),cI(),uI())}async function cI(){console.log("[Cloud115 Enhancer - main] injectUI");const e="cloud115ConfigMain",t=document.createElement("div");t.id=e,document.body.appendChild(t),oo(aI).mount(`#${e}`),ca("设置",async()=>{window.postMessage({event:Mt.openConfig})}),ca("扫码获取Cookie",async()=>{window.postMessage({event:Mt.openConfig,body:Qt.tools})}),fI()}async function uI(){const e=document.querySelector(".bottom-side .navigation-ceiling ul");if(!e){hI();return}const t=document.createElement("li"),n=document.createElement("a");n.href="javascript:;",n.style.textAlign="center",n.style.backgroundColor="#fefcea",n.style.padding="4px 10px 4px",n.addEventListener("click",fc),n.title="打开「115不大助手」设置",n.innerHTML='<i class="isn-setting"></i><span>不大助手</span>',t.appendChild(n),e.insertBefore(t,e.firstChild)}async function dI(){return!!document.querySelector("#js-login-box")}async function fI(){console.log("[handleLoginPage]"),await dI()&&(document.body.classList.add("ce-login-page"),pI())}async function pI(){console.log("[injectOpenConfigButtonOnLoginPage");const e=document.querySelector(".header .top-link a");if(!e){console.warn("[injectOpenConfigButtonOnLoginPage] '#js-login_box .top-link a' not found");return}const t=document.createElement("a");t.href="javascript:;",t.className="ce-entry",t.addEventListener("click",fc),t.title="打开「115不大助手」设置",t.innerHTML='<i class="isn-setting"></i><span>115不大助手</span>',e.insertAdjacentElement("beforebegin",t)}async function hI(){const e=document.querySelector(".sub-footer ul");if(!e)return;const t=document.createElement("li"),n=document.createElement("a");n.href="javascript:;",n.addEventListener("click",fc),n.title="打开「115不大助手」设置",n.innerHTML='<i class="isn-setting"></i><span>115不大助手</span>',t.appendChild(n),e.insertBefore(t,e.firstChild)}async function fc(){window.postMessage({event:Mt.openConfig})}const lN="";function Bn(e){return Array.isArray?Array.isArray(e):qh(e)==="[object Array]"}const mI=1/0;function gI(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-mI?"-0":t}function yI(e){return e==null?"":gI(e)}function gn(e){return typeof e=="string"}function Uh(e){return typeof e=="number"}function wI(e){return e===!0||e===!1||bI(e)&&qh(e)=="[object Boolean]"}function Hh(e){return typeof e=="object"}function bI(e){return Hh(e)&&e!==null}function jt(e){return e!=null}function pc(e){return!e.trim().length}function qh(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const cN="Extended search is not available",_I="Incorrect 'index' type",vI=e=>`Invalid value for key ${e}`,xI=e=>`Pattern length exceeds max of ${e}.`,CI=e=>`Missing ${e} property in key`,$I=e=>`Property 'weight' in key '${e}' must be a positive integer`,zh=Object.prototype.hasOwnProperty;class kI{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(o=>{let i=Vh(o);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(o=>{o.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Vh(e){let t=null,n=null,o=null,i=1,s=null;if(gn(e)||Bn(e))o=e,t=Kh(e),n=hc(e);else{if(!zh.call(e,"name"))throw new Error(CI("name"));const r=e.name;if(o=r,zh.call(e,"weight")&&(i=e.weight,i<=0))throw new Error($I(r));t=Kh(r),n=hc(r),s=e.getFn}return{path:t,id:n,weight:i,src:o,getFn:s}}function Kh(e){return Bn(e)?e:e.split(".")}function hc(e){return Bn(e)?e.join("."):e}function EI(e,t){let n=[],o=!1;const i=(s,r,a)=>{if(!!jt(s))if(!r[a])n.push(s);else{let c=r[a];const d=s[c];if(!jt(d))return;if(a===r.length-1&&(gn(d)||Uh(d)||wI(d)))n.push(yI(d));else if(Bn(d)){o=!0;for(let p=0,h=d.length;p<h;p+=1)i(d[p],r,a+1)}else r.length&&i(d,r,a+1)}};return i(e,gn(t)?t.split("."):t,0),o?n:n[0]}var Oe={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:EI,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const SI=/[^ ]+/g;function AI(e=1,t=3){const n=new Map,o=Math.pow(10,t);return{get(i){const s=i.match(SI).length;if(n.has(s))return n.get(s);const r=1/Math.pow(s,.5*e),a=parseFloat(Math.round(r*o)/o);return n.set(s,a),a},clear(){n.clear()}}}class mc{constructor({getFn:t=Oe.getFn,fieldNormWeight:n=Oe.fieldNormWeight}={}){this.norm=AI(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,o)=>{this._keysMap[n.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,gn(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();gn(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,o=this.size();n<o;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!jt(t)||pc(t))return;let o={v:t,i:n,n:this.norm.get(t)};this.records.push(o)}_addObject(t,n){let o={i:n,$:{}};this.keys.forEach((i,s)=>{let r=i.getFn?i.getFn(t):this.getFn(t,i.path);if(!!jt(r)){if(Bn(r)){let a=[];const c=[{nestedArrIndex:-1,value:r}];for(;c.length;){const{nestedArrIndex:d,value:p}=c.pop();if(!!jt(p))if(gn(p)&&!pc(p)){let h={v:p,i:d,n:this.norm.get(p)};a.push(h)}else Bn(p)&&p.forEach((h,y)=>{c.push({nestedArrIndex:y,value:h})})}o.$[s]=a}else if(gn(r)&&!pc(r)){let a={v:r,n:this.norm.get(r)};o.$[s]=a}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function Wh(e,t,{getFn:n=Oe.getFn,fieldNormWeight:o=Oe.fieldNormWeight}={}){const i=new mc({getFn:n,fieldNormWeight:o});return i.setKeys(e.map(Vh)),i.setSources(t),i.create(),i}function PI(e,{getFn:t=Oe.getFn,fieldNormWeight:n=Oe.fieldNormWeight}={}){const{keys:o,records:i}=e,s=new mc({getFn:t,fieldNormWeight:n});return s.setKeys(o),s.setIndexRecords(i),s}function ta(e,{errors:t=0,currentLocation:n=0,expectedLocation:o=0,distance:i=Oe.distance,ignoreLocation:s=Oe.ignoreLocation}={}){const r=t/e.length;if(s)return r;const a=Math.abs(o-n);return i?r+a/i:a?1:r}function II(e=[],t=Oe.minMatchCharLength){let n=[],o=-1,i=-1,s=0;for(let r=e.length;s<r;s+=1){let a=e[s];a&&o===-1?o=s:!a&&o!==-1&&(i=s-1,i-o+1>=t&&n.push([o,i]),o=-1)}return e[s-1]&&s-o>=t&&n.push([o,s-1]),n}const qo=32;function TI(e,t,n,{location:o=Oe.location,distance:i=Oe.distance,threshold:s=Oe.threshold,findAllMatches:r=Oe.findAllMatches,minMatchCharLength:a=Oe.minMatchCharLength,includeMatches:c=Oe.includeMatches,ignoreLocation:d=Oe.ignoreLocation}={}){if(t.length>qo)throw new Error(xI(qo));const p=t.length,h=e.length,y=Math.max(0,Math.min(o,h));let x=s,_=y;const S=a>1||c,T=S?Array(h):[];let B;for(;(B=e.indexOf(t,_))>-1;){let ne=ta(t,{currentLocation:B,expectedLocation:y,distance:i,ignoreLocation:d});if(x=Math.min(ne,x),_=B+p,S){let ae=0;for(;ae<p;)T[B+ae]=1,ae+=1}}_=-1;let P=[],I=1,H=p+h;const ie=1<<p-1;for(let ne=0;ne<p;ne+=1){let ae=0,pe=H;for(;ae<pe;)ta(t,{errors:ne,currentLocation:y+pe,expectedLocation:y,distance:i,ignoreLocation:d})<=x?ae=pe:H=pe,pe=Math.floor((H-ae)/2+ae);H=pe;let Ae=Math.max(1,y-pe+1),ge=r?h:Math.min(y+pe,h)+p,O=Array(ge+2);O[ge+1]=(1<<ne)-1;for(let Y=ge;Y>=Ae;Y-=1){let ve=Y-1,M=n[e.charAt(ve)];if(S&&(T[ve]=+!!M),O[Y]=(O[Y+1]<<1|1)&M,ne&&(O[Y]|=(P[Y+1]|P[Y])<<1|1|P[Y+1]),O[Y]&ie&&(I=ta(t,{errors:ne,currentLocation:ve,expectedLocation:y,distance:i,ignoreLocation:d}),I<=x)){if(x=I,_=ve,_<=y)break;Ae=Math.max(1,2*y-_)}}if(ta(t,{errors:ne+1,currentLocation:y,expectedLocation:y,distance:i,ignoreLocation:d})>x)break;P=O}const j={isMatch:_>=0,score:Math.max(.001,I)};if(S){const ne=II(T,a);ne.length?c&&(j.indices=ne):j.isMatch=!1}return j}function OI(e){let t={};for(let n=0,o=e.length;n<o;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<o-n-1}return t}class Gh{constructor(t,{location:n=Oe.location,threshold:o=Oe.threshold,distance:i=Oe.distance,includeMatches:s=Oe.includeMatches,findAllMatches:r=Oe.findAllMatches,minMatchCharLength:a=Oe.minMatchCharLength,isCaseSensitive:c=Oe.isCaseSensitive,ignoreLocation:d=Oe.ignoreLocation}={}){if(this.options={location:n,threshold:o,distance:i,includeMatches:s,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:c,ignoreLocation:d},this.pattern=c?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const p=(y,x)=>{this.chunks.push({pattern:y,alphabet:OI(y),startIndex:x})},h=this.pattern.length;if(h>qo){let y=0;const x=h%qo,_=h-x;for(;y<_;)p(this.pattern.substr(y,qo),y),y+=qo;if(x){const S=h-qo;p(this.pattern.substr(S),S)}}else p(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,includeMatches:o}=this.options;if(n||(t=t.toLowerCase()),this.pattern===t){let _={isMatch:!0,score:0};return o&&(_.indices=[[0,t.length-1]]),_}const{location:i,distance:s,threshold:r,findAllMatches:a,minMatchCharLength:c,ignoreLocation:d}=this.options;let p=[],h=0,y=!1;this.chunks.forEach(({pattern:_,alphabet:S,startIndex:T})=>{const{isMatch:B,score:P,indices:I}=TI(t,_,S,{location:i+T,distance:s,threshold:r,findAllMatches:a,minMatchCharLength:c,includeMatches:o,ignoreLocation:d});B&&(y=!0),h+=P,B&&I&&(p=[...p,...I])});let x={isMatch:y,score:y?h/this.chunks.length:1};return y&&o&&(x.indices=p),x}}class lo{constructor(t){this.pattern=t}static isMultiMatch(t){return Jh(t,this.multiRegex)}static isSingleMatch(t){return Jh(t,this.singleRegex)}search(){}}function Jh(e,t){const n=e.match(t);return n?n[1]:null}class LI extends lo{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class MI extends lo{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const o=t.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,t.length-1]}}}class NI extends lo{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class BI extends lo{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class DI extends lo{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class RI extends lo{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Yh extends lo{constructor(t,{location:n=Oe.location,threshold:o=Oe.threshold,distance:i=Oe.distance,includeMatches:s=Oe.includeMatches,findAllMatches:r=Oe.findAllMatches,minMatchCharLength:a=Oe.minMatchCharLength,isCaseSensitive:c=Oe.isCaseSensitive,ignoreLocation:d=Oe.ignoreLocation}={}){super(t),this._bitapSearch=new Gh(t,{location:n,threshold:o,distance:i,includeMatches:s,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:c,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class Qh extends lo{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,o;const i=[],s=this.pattern.length;for(;(o=t.indexOf(this.pattern,n))>-1;)n=o+s,i.push([o,n-1]);const r=!!i.length;return{isMatch:r,score:r?0:1,indices:i}}}const gc=[LI,Qh,NI,BI,RI,DI,MI,Yh],Xh=gc.length,FI=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,jI="|";function UI(e,t={}){return e.split(jI).map(n=>{let o=n.trim().split(FI).filter(s=>s&&!!s.trim()),i=[];for(let s=0,r=o.length;s<r;s+=1){const a=o[s];let c=!1,d=-1;for(;!c&&++d<Xh;){const p=gc[d];let h=p.isMultiMatch(a);h&&(i.push(new p(h,t)),c=!0)}if(!c)for(d=-1;++d<Xh;){const p=gc[d];let h=p.isSingleMatch(a);if(h){i.push(new p(h,t));break}}}return i})}const HI=new Set([Yh.type,Qh.type]);class qI{constructor(t,{isCaseSensitive:n=Oe.isCaseSensitive,includeMatches:o=Oe.includeMatches,minMatchCharLength:i=Oe.minMatchCharLength,ignoreLocation:s=Oe.ignoreLocation,findAllMatches:r=Oe.findAllMatches,location:a=Oe.location,threshold:c=Oe.threshold,distance:d=Oe.distance}={}){this.query=null,this.options={isCaseSensitive:n,includeMatches:o,minMatchCharLength:i,findAllMatches:r,ignoreLocation:s,location:a,threshold:c,distance:d},this.pattern=n?t:t.toLowerCase(),this.query=UI(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:i}=this.options;t=i?t:t.toLowerCase();let s=0,r=[],a=0;for(let c=0,d=n.length;c<d;c+=1){const p=n[c];r.length=0,s=0;for(let h=0,y=p.length;h<y;h+=1){const x=p[h],{isMatch:_,indices:S,score:T}=x.search(t);if(_){if(s+=1,a+=T,o){const B=x.constructor.type;HI.has(B)?r=[...r,...S]:r.push(S)}}else{a=0,s=0,r.length=0;break}}if(s){let h={isMatch:!0,score:a/s};return o&&(h.indices=r),h}}return{isMatch:!1,score:1}}}const yc=[];function zI(...e){yc.push(...e)}function wc(e,t){for(let n=0,o=yc.length;n<o;n+=1){let i=yc[n];if(i.condition(e,t))return new i(e,t)}return new Gh(e,t)}const na={AND:"$and",OR:"$or"},bc={PATH:"$path",PATTERN:"$val"},_c=e=>!!(e[na.AND]||e[na.OR]),VI=e=>!!e[bc.PATH],KI=e=>!Bn(e)&&Hh(e)&&!_c(e),Zh=e=>({[na.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function em(e,t,{auto:n=!0}={}){const o=i=>{let s=Object.keys(i);const r=VI(i);if(!r&&s.length>1&&!_c(i))return o(Zh(i));if(KI(i)){const c=r?i[bc.PATH]:s[0],d=r?i[bc.PATTERN]:i[c];if(!gn(d))throw new Error(vI(c));const p={keyId:hc(c),pattern:d};return n&&(p.searcher=wc(d,t)),p}let a={children:[],operator:s[0]};return s.forEach(c=>{const d=i[c];Bn(d)&&d.forEach(p=>{a.children.push(o(p))})}),a};return _c(e)||(e=Zh(e)),o(e)}function WI(e,{ignoreFieldNorm:t=Oe.ignoreFieldNorm}){e.forEach(n=>{let o=1;n.matches.forEach(({key:i,norm:s,score:r})=>{const a=i?i.weight:null;o*=Math.pow(r===0&&a?Number.EPSILON:r,(a||1)*(t?1:s))}),n.score=o})}function GI(e,t){const n=e.matches;t.matches=[],jt(n)&&n.forEach(o=>{if(!jt(o.indices)||!o.indices.length)return;const{indices:i,value:s}=o;let r={indices:i,value:s};o.key&&(r.key=o.key.src),o.idx>-1&&(r.refIndex=o.idx),t.matches.push(r)})}function JI(e,t){t.score=e.score}function YI(e,t,{includeMatches:n=Oe.includeMatches,includeScore:o=Oe.includeScore}={}){const i=[];return n&&i.push(GI),o&&i.push(JI),e.map(s=>{const{idx:r}=s,a={item:t[r],refIndex:r};return i.length&&i.forEach(c=>{c(s,a)}),a})}class yi{constructor(t,n={},o){this.options={...Oe,...n},this.options.useExtendedSearch,this._keyStore=new kI(this.options.keys),this.setCollection(t,o)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof mc))throw new Error(_I);this._myIndex=n||Wh(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){!jt(t)||(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let o=0,i=this._docs.length;o<i;o+=1){const s=this._docs[o];t(s,o)&&(this.removeAt(o),o-=1,i-=1,n.push(s))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:o,includeScore:i,shouldSort:s,sortFn:r,ignoreFieldNorm:a}=this.options;let c=gn(t)?gn(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return WI(c,{ignoreFieldNorm:a}),s&&c.sort(r),Uh(n)&&n>-1&&(c=c.slice(0,n)),YI(c,this._docs,{includeMatches:o,includeScore:i})}_searchStringList(t){const n=wc(t,this.options),{records:o}=this._myIndex,i=[];return o.forEach(({v:s,i:r,n:a})=>{if(!jt(s))return;const{isMatch:c,score:d,indices:p}=n.searchIn(s);c&&i.push({item:s,idx:r,matches:[{score:d,value:s,norm:a,indices:p}]})}),i}_searchLogical(t){const n=em(t,this.options),o=(a,c,d)=>{if(!a.children){const{keyId:h,searcher:y}=a,x=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(c,h),searcher:y});return x&&x.length?[{idx:d,item:c,matches:x}]:[]}const p=[];for(let h=0,y=a.children.length;h<y;h+=1){const x=a.children[h],_=o(x,c,d);if(_.length)p.push(..._);else if(a.operator===na.AND)return[]}return p},i=this._myIndex.records,s={},r=[];return i.forEach(({$:a,i:c})=>{if(jt(a)){let d=o(n,a,c);d.length&&(s[c]||(s[c]={idx:c,item:a,matches:[]},r.push(s[c])),d.forEach(({matches:p})=>{s[c].matches.push(...p)}))}}),r}_searchObjectList(t){const n=wc(t,this.options),{keys:o,records:i}=this._myIndex,s=[];return i.forEach(({$:r,i:a})=>{if(!jt(r))return;let c=[];o.forEach((d,p)=>{c.push(...this._findMatches({key:d,value:r[p],searcher:n}))}),c.length&&s.push({idx:a,item:r,matches:c})}),s}_findMatches({key:t,value:n,searcher:o}){if(!jt(n))return[];let i=[];if(Bn(n))n.forEach(({v:s,i:r,n:a})=>{if(!jt(s))return;const{isMatch:c,score:d,indices:p}=o.searchIn(s);c&&i.push({score:d,key:t,value:s,idx:r,norm:a,indices:p})});else{const{v:s,n:r}=n,{isMatch:a,score:c,indices:d}=o.searchIn(s);a&&i.push({score:c,key:t,value:s,norm:r,indices:d})}return i}}yi.version="7.0.0",yi.createIndex=Wh,yi.parseIndex=PI,yi.config=Oe,yi.parseQuery=em,zI(qI);const QI={class:"ce-goto-input-wrap"},XI=["disabled"],ZI=["disabled"],eT={class:"ce-goto-sug"},tT=["onMousedown","sid"],nT={class:"ce-goto-sug-index"},oT={class:"ce-goto-sug-prefix"},iT=f("span",{class:"ce-goto-sep"},"/",-1),sT={class:"ce-goto-sug-name"},rT=Be({__name:"GotoPath",setup(e){const t=he(!1),n=he(!1),o=he(null),i=he(null),s=he(""),r=he([]),a=he(!1),c=to(()=>s.value.trim().length>0);let d="";Ft(async()=>{var O;t.value=!0,(O=i.value)==null||O.focus(),window.addEventListener("message",async se=>{if(se.data.event===Mt.listRendered){const ve=await Vt(!1);ve!==d&&(r.value=[],await ne(!1)),d=ve}})});async function p(O){if(console.log("[handleKeydown]",O.key),pd(O),O.key==="Enter"){H.value>-1?pe():await Ae(s.value);return}if(O.key==="Escape"){await ge();return}["ArrowUp","ArrowDown"].includes(O.key)?ie(O):h(O)}const h=Bt(async O=>{y()},200);async function y(){try{r.value=[],await ne(!1);const O={keyword:"",parentId:await Vt(!1),parentPath:await Ra(),isSubOfCurrent:!0};console.log("[getSug] searchData:",O);const se=await P(O,!1);if(console.log("[searchData] items:",se),!se.length){ue({icon:"warning",text:"没有匹配的建议",timer:1500,position:"top-right"});return}const Y=await x(se,O);console.log("[searchData] sugs:",Y),r.value=Y,H.value=-1,await ne(Y.length>0)}catch(O){console.warn(O),await ne(!1),ue({icon:"error",text:O.toString(),timer:2e3,position:"top-right"})}}async function x(O,se){const Y=[];for(let D=0;D<O.length;D++){const me=O[D];Y.push({id:me.id,prefix:se.parentPath==="/"?"":se.parentPath,name:me.name,active:!1})}const ve=s.value.trim();if(!ve)return Y;const M=/^(\.\/)?[^\/]+/.test(ve),G=td(ve,"../");if(console.log("[toSug] isSubOfCurrent:",M,"kwParentPath:",G),M||G===se.parentPath){const D=new yi(Y,{keys:["name"],threshold:.6,includeScore:!0});let me=ve;if(G===se.parentPath){const Fe=ve.split(/[\\/]/).filter(Boolean);me=Fe[Fe.length-1]}const ke=D.search(me);console.log("[toSug] fuse res:",ke);let Le=!1;return ke.forEach(Fe=>{Fe.score===void 0?(console.warn("[toSug] r.score is undefined:",Fe),Le=!0,Fe.score=0):Fe.score!==void 0&&isNaN(Fe.score)&&(console.warn("[toSug] r.score is NaN:",Fe),Le=!0,Fe.score=0)}),Le&&ke.sort((Fe,Xe)=>Fe.score-Xe.score),ke.map(Fe=>Fe.item)}return Y}const _=new Map,S=new Map;async function T(O){return _.get(O)||!1}async function B(O,se){_.set(O,se)}async function P(O,se){const Y=S.get(O.parentPath);if(Y)return console.log(`[getSubDirs] path "${O.parentPath}" is cached`),Y.items;if(await T(O.parentPath))return console.warn(`[getSubDirs] path "${O.parentPath}" is loading`),[];await B(O.parentPath,!0);try{const ve=Ii({cid:O.parentId,limit:1150,show_dir:ha.true}),M=await Yu(ve);if(!M.count)return[];const G=[];for(let D=0;D<M.data.length;D++){const me=await Ni(M.data[D]);if(me.isDir)G.push(me);else if(se)break}return S.set(O.parentPath,{count:G.length,dirPath:O.parentPath,dirId:O.parentId,items:G}),G}catch(ve){console.warn(ve)}finally{await B(O.parentPath,!1)}return[]}async function I(O,se){console.log("[handleSugClick]",O,se);const Y=js([O.prefix,O.name]);console.log("[handleSugClick] path:",Y),await Ae(Y)}const H=he(-1);async function ie(O){var M;console.log("[navigateSug]",O.key),O.preventDefault(),O.stopPropagation();let se=H.value;if(O.key==="ArrowUp")se--;else if(O.key==="ArrowDown")se++;else if(O.key==="Enter"){const G=r.value[H.value];G&&await I(G,O);return}else return;se<0?se=0:se>=r.value.length&&(se=r.value.length-1),H.value=se,r.value.forEach((G,D)=>{G.active=D===se});const Y=r.value[se];if(!Y)return;const ve=(M=o.value)==null?void 0:M.querySelector(`[sid="${Y.id}"]`);ve==null||ve.scrollIntoView()}async function j(){var O;s.value="",(O=i.value)==null||O.focus(),await y()}async function ne(O){var se;a.value=O,O&&((se=i.value)==null||se.focus())}async function ae(O){if(Dw(O))return"0";const se=await Ra();return O=Us(O,yo.unix),O=td(se,O,yo.unix),await cd(O)}async function pe(){const O=r.value[H.value];if(!O)return;const se=js([O.prefix,O.name],yo.unix);console.log("[gotoByCurrentSug] path:",se),await Ae(se)}async function Ae(O){var se;if(!n.value){O=O.trim(),ue({text:"正在获取路径信息...",timer:0,position:"top-right"}),fe.showLoading(),n.value=!0;try{const Y=await ae(O);unsafeWindow.Main.GotoDir(1,Y,0,""),ue({icon:"success",text:"获取路径信息成功,现在打开...",timer:1e3,position:"top-right"}),(se=i.value)==null||se.focus(),r.value=[],H.value=-1}catch(Y){fe.fire({icon:"error",title:"跳转失败",text:Y.message})}finally{fe.hideLoading(),n.value=!1}}}async function ge(){if(H.value>-1)r.value.forEach(O=>O.active=!1),H.value=-1,await ne(!1);else{const O=document.querySelector("#ceGotoPathApp");O==null||O.style.setProperty("display","none");const se=document.querySelector(".ce-goto-path-active");se==null||se.classList.remove("ce-goto-path-active"),t.value=!1}}return(O,se)=>(W(),X("div",{ref_key:"refMain",ref:o,class:Ye(["ce-goto-main",{"ce-goto-sug-shown":a.value}])},[f("div",QI,[ee(f("input",{ref_key:"refInput",ref:i,"onUpdate:modelValue":se[0]||(se[0]=Y=>s.value=Y),class:"ce-goto-input",placeholder:"回车确认跳转 | Esc关闭 | 可搜索当前目录的子目录显示下拉列表,上下方向键选择",onKeydown:p},null,544),[[qe,s.value]]),f("button",{type:"button",class:"ce-goto-input-btn","data-cmd":"clear",onClick:j,title:"清空输入框",disabled:!de(c)},"清空",8,XI),f("button",{type:"button",class:"ce-goto-input-btn","data-cmd":"toggle",onClick:se[1]||(se[1]=Y=>ne(!1)),title:"收起建议列表",disabled:!a.value},"收起",8,ZI)]),f("div",eT,[(W(!0),X(De,null,nt(r.value,(Y,ve)=>(W(),X("div",{key:ve,class:Ye(["ce-goto-sug-item",{active:Y.active}]),onMousedown:O0(M=>I(Y,M),["left","stop","prevent"]),sid:Y.id},[f("span",nT,ye(ve+1),1),f("span",oT,ye(Y.prefix),1),iT,f("span",sT,ye(Y.name),1)],42,tT))),128))])],2))}}),hN="";async function aT(){const e=await Or(),{host:t,search:n}=location;!/115\.com$/.test(t)||(console.log("[List] running...",e),(n.includes("ct=file")||n.includes("mode=search"))&&n1(),lT(e))}async function lT(e){const{host:t,search:n}=location;if(!n.includes("ct=file"))return;const o=await Ei("#js_top_header_file_path_box");e.showGotoButtonOnPathBar&&uT(e,o),e.showCopyButtonOnPathBar&&cT(e,o)}async function cT(e,t){const n="ceCopyPath";let o=t.querySelector(`#${n}`);const i=async()=>{const r=await Ra();Xt(r),ue({icon:"success",text:"路径已复制",timer:1e3,position:"top-right"})};o||(o=await(async()=>{const r=document.createElement("button");return r.className="pure-button button-mini ce-path-btn",r.id=n,r.title="复制路径",r.innerHTML="<span>复制</span>",r.addEventListener("click",i),r})(),t.prepend(o))}async function uT(e,t){const n=t.querySelector(".top-file-path"),o="ceGotoPath";let i=t.querySelector(`#${o}`);const s=oo(rT),r="ceGotoPathApp",a=async()=>{await c()},c=async()=>{if(t.classList.toggle("ce-goto-path-active"),t.classList.contains("ce-goto-path-active"))await d();else{const y=t.querySelector(`#${r}`);y&&(y.style.display="none")}},d=async()=>{let y=t.querySelector(`#${r}`);y||(y=await h(),n.after(y)),y.querySelector(".ce-goto-main")?setTimeout(()=>{const _=document.querySelector(".ce-goto-input");_==null||_.focus()},200):s.mount(y),y.style.display="block"},p=async()=>{const y=document.createElement("button");return y.className="pure-button button-mini ce-path-btn text-primary",y.id=o,y.title=`
      【这是一个实验功能】
      跳转到指定路径。使用:
      - 空白、单个斜杠: 根目录
      - 相对路径1: 开头不带斜杠,当前目录下的子路径
      - 相对路径2: 开头带有../,当前目录的上级目录,可以多级
      - 绝对路径: 开头带有斜杠,从根目录开始的路径

      斜杠风格不限,支持模糊搜索当前目录的子目录。
      回车键跳转,Esc键关闭输入框。`,y.innerHTML="<span>跳转</span>",y.addEventListener("click",a),y},h=async()=>{const y=document.createElement("div");return y.id=r,y.style.width="50%",y};i||(i=await p(),t.prepend(i))}const mN="";async function dT(){const e=await Mh();!await sd()||(console.log("[Search] running...",e),hT(),fT(e))}async function fT(e){const t=await Ei(".top-file-path");e.showSelectTargetButtonOnPathBar&&pT(e,t)}async function pT(e,t){console.log("[showSelectTargetButtonOnPathBar]");const n="ce-btn-select";let o=t.querySelector(`.${n}`);const i=async()=>{unsafeWindow.parent.Core.FileSelectDG.Open((r,a)=>{console.log("[Core.FileSelectDG.Open]",r,a);const c=r[r.length-1],d=document.createElement("a");d.href="javascript:;",d.className="dir-tab",d.textContent=c.cname,d.style.display="none",d.setAttribute("search_btn_file",c.cid),t.querySelector(".file-path").append(d),d.click()},{select:1,nf:1,show_record:0,show_copy:1,btn_txt:"在该目录下搜索",select_txt:"搜索"})};o||(o=await(async()=>{const r=document.createElement("a");return r.className=`dir-tab ${n}`,r.href="javascript:;",r.title="选择目录",r.textContent="选择目录",r.addEventListener("click",i),r})(),t.append(o))}async function hT(e){document.body.classList.add("ce-search-page"),parent.document.body.classList.add("ce-search-page")}const gN="";async function mT(){console.log("[Tools] running...")}location.host==="115.com"&&(window.COMMONHEADERUSERINFO=window.COMMONHEADERUSERINFO||{}),(async()=>(console.log("Cloud115 Enhancer launched!"),T1(),z$(),_E(),CE(),aT(),dT(),mT(),lI()))()})();