115不大助手 (full)

Make 115 taerg again!

// ==UserScript==
// @name         115不大助手 (full)
// @namespace    com.cloud115.enhancer
// @version      0.6.32
// @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/*
// @match        https://v.anxia.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}.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-label{padding:2px 4px;background:#909399;color:#fff;border-radius:4px}.ce-label.ce-label-primary{background:#1890ff}.ce-label.ce-label-warning{background:#ffba00}.ce-label.ce-label-danger{background:#ff4949}.ce-label.ce-label-success{background:#13ce66}.ce-label.ce-label-primary-plain{color:#409eff;background:#ecf5ff}input.ce-checkbox{width:20px;height:20px;cursor:pointer}.ce-hidden{display:none!important}.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}.ce-config legend{font-size:16px;color:#1890ff}.ce-config-help{font-size:11px;cursor:pointer}.ce-ec-detail{text-align:left;font-size:14px}.ce-ec-detail span{color:#1890ff;display:inline-block;width:90px;text-align:right}.ce-swal-text-left{text-align:left!important}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;margin-top:-4px}.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-name a.ce-open-dir-context-menu{cursor:pointer;background:#f2f4f8;border-radius:4px;padding:0 6px;color:#1890ff;margin-left:10px}.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}.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}#cloud115Cleaner{margin-left:10px}.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-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}.ce-empty-cleaner-trigger .btn-open{padding:0 6px;vertical-align:text-top;line-height:30px;border-radius:4px;background:#4faa4f}.ce-empty-cleaner-help[data-v-60ac6015]{position:fixed;top:60px;right:0;bottom:0;width:360px;z-index:1051;padding:10px 10px 150px 8px;background:#fdffdf;overflow-y:auto}.ce-empty-cleaner-help ul[data-v-60ac6015]{list-style:decimal}#cloud115EmptyCleaner{margin-left:10px}.v-popper__arrow-container{display:none}.ce-empty-cleaner .btn-open{padding:0 6px;vertical-align:text-top;line-height:30px;border-radius:4px;background:#4faa4f;display:none}.ce-empty-cleaner .top-actions .pure-control-group label{width:auto;text-align:left}.ce-empty-cleaner .actions-bar{padding-bottom:10px;width:72%}.ce-empty-cleaner .actions-bar .title{font-size:18px;font-weight:700;color:#15110c}.ce-empty-cleaner .actions-bar .close{margin-left:20px;margin-right:10px;color:#f40}.ce-empty-cleaner .actions-bar i.tp-folder{width:18px;height:18px;vertical-align:sub}.ce-empty-cleaner .actions-bar .ce-path{font-size:14px;margin-top:4px}.ce-empty-cleaner .actions-bar .ce-path a:hover{text-decoration:underline}.ce-empty-cleaner .ec-logs{max-height:250px;overflow-y:auto;max-width:72%;background:#f4f4f4;padding:10px;line-height:22px;font-size:12px;margin-bottom:20px}.ce-empty-cleaner .ec-items{margin-bottom:30px}.ce-empty-cleaner .ec-items table{font-size:12px;width:72%}.ce-empty-cleaner .ec-items table .tr-deleted>td:not(:last-child){text-decoration:line-through}.ce-empty-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}.ce-empty-cleaner-drawer.loading{cursor:wait}.ce-empty-cleaner-drawer.loading button,.ce-empty-cleaner-drawer.loading input{cursor:no-drop;pointer-events:none}.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:2px;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}.pure-form input[type=number]{min-width:100px}.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:16em}.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}.ce-tools-config .pure-control-group label{width:15em}.ce-tools-config .pure-form-message{margin-left:3em}.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}.official-menu-config .pure-form legend .ce-label{cursor:pointer;font-size:12px;float:right}.official-menu-config .pure-form .ce-toggle{font-size:12px;cursor:pointer;color:#909399}.official-menu-config .pure-form .menu-key{opacity:0}.official-menu-config .pure-form .menu-item:hover .menu-key{opacity:1}.official-menu-config .pure-form .hidden .ce-toggle{color:#1890ff}.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{padding-bottom:100px}.ce-custom-urls .item-memo{display:inline-block;width:320px}.ce-play-urls{padding-bottom:100px}.ce-play-urls .item-memo{display:inline-block;width:340px}.ce-play-urls .extra-memo{font-size:12px;margin-left:10px}.ce-play-urls .extra-memo a{text-decoration:underline;color:#337ab7}.ce-anxia-config .pure-control-group label{width:9em}.ce-anxia-config .pure-form-message{margin-left:3em}.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 6px;border-radius:4px;border:1px solid #234888;margin:0 4px}.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 PM=Object.defineProperty;var IM=(Ns,Un,Bs)=>Un in Ns?PM(Ns,Un,{enumerable:!0,configurable:!0,writable:!0,value:Bs}):Ns[Un]=Bs;var be=(Ns,Un,Bs)=>(IM(Ns,typeof Un!="symbol"?Un+"":Un,Bs),Bs);(function(){"use strict";const Ns="",Un="",Bs="",TM="",LM="",OM="",DM="",wm=typeof btoa=="function",Zr=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const mc=typeof TextEncoder=="function"?new TextEncoder:void 0,bm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_i=Array.prototype.slice.call(bm);(e=>{let t={};return e.forEach((n,s)=>t[n]=s),t})(_i);const mn=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const _m=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),gc=wm?e=>btoa(e):Zr?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,s,i,o="";const r=e.length%3;for(let a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(s=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|s<<8|i,o+=_i[t>>18&63]+_i[t>>12&63]+_i[t>>6&63]+_i[t&63]}return r?o.slice(0,r-3)+"===".substring(r):o},vm=Zr?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let s=0,i=e.length;s<i;s+=4096)n.push(mn.apply(null,e.subarray(s,s+4096)));return gc(n.join(""))},xm=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?mn(192|t>>>6)+mn(128|t&63):mn(224|t>>>12&15)+mn(128|t>>>6&63)+mn(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return mn(240|t>>>18&7)+mn(128|t>>>12&63)+mn(128|t>>>6&63)+mn(128|t&63)}},Cm=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,$m=e=>e.replace(Cm,xm),yc=Zr?e=>Buffer.from(e,"utf8").toString("base64"):mc?e=>vm(mc.encode(e)):e=>gc($m(e)),wc=(e,t=!1)=>t?_m(yc(e)):yc(e);var fs=window,ea=(()=>fs.GM_setValue)(),Em=(()=>fs.GM_deleteValue)(),km=(()=>fs.GM_openInTab)(),po=(()=>fs.GM_registerMenuCommand)(),ta=(()=>fs.GM_xmlhttpRequest)(),vi=(()=>fs.GM_setClipboard)(),ho=(()=>fs.GM_getValue)(),jn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sm(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(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),n}var bc={exports:{}};/*!
* sweetalert2 v11.7.2
* Released under the MIT License.
*/(function(e,t){(function(n,s){e.exports=s()})(jn,function(){var n={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const s="swal2-",i=d=>{const p={};for(const g in d)p[d[g]]=s+d[g];return p},o=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:",l=d=>{const p=[];for(let g=0;g<d.length;g++)p.indexOf(d[g])===-1&&p.push(d[g]);return p},u=d=>d.charAt(0).toUpperCase()+d.slice(1),f=d=>{console.warn(`${a} ${typeof d=="object"?d.join(" "):d}`)},h=d=>{console.error(`${a} ${d}`)},y=[],_=d=>{y.includes(d)||(y.push(d),f(d))},b=(d,p)=>{_(`"${d}" is deprecated and will be removed in the next major release. Please use "${p}" instead.`)},E=d=>typeof d=="function"?d():d,T=d=>d&&typeof d.toPromise=="function",D=d=>T(d)?d.toPromise():Promise.resolve(d),I=d=>d&&Promise.resolve(d)===d,P=()=>document.body.querySelector(`.${o.container}`),V=d=>{const p=P();return p?p.querySelector(d):null},ae=d=>V(`.${d}`),U=()=>ae(o.popup),X=()=>ae(o.icon),ue=()=>ae(o["icon-content"]),ye=()=>ae(o.title),Le=()=>ae(o["html-container"]),ge=()=>ae(o.image),L=()=>ae(o["progress-steps"]),re=()=>ae(o["validation-message"]),G=()=>V(`.${o.actions} .${o.confirm}`),Se=()=>V(`.${o.actions} .${o.cancel}`),xe=()=>V(`.${o.actions} .${o.deny}`),Re=()=>ae(o["input-label"]),M=()=>V(`.${o.loader}`),se=()=>ae(o.actions),ee=()=>ae(o.footer),Ee=()=>ae(o["timer-progress-bar"]),Z=()=>ae(o.close),z=`
  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
`,Fe=()=>{const d=Array.from(U().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((g,v)=>{const F=parseInt(g.getAttribute("tabindex")),Pe=parseInt(v.getAttribute("tabindex"));return F>Pe?1:F<Pe?-1:0}),p=Array.from(U().querySelectorAll(z)).filter(g=>g.getAttribute("tabindex")!=="-1");return l(d.concat(p)).filter(g=>J(g))},Ye=()=>wt(document.body,o.shown)&&!wt(document.body,o["toast-shown"])&&!wt(document.body,o["no-backdrop"]),ke=()=>U()&&wt(U(),o.toast),ft=()=>U().hasAttribute("data-loading"),it={previousBodyPadding:null},ot=(d,p)=>{if(d.textContent="",p){const v=new DOMParser().parseFromString(p,"text/html");Array.from(v.querySelector("head").childNodes).forEach(F=>{d.appendChild(F)}),Array.from(v.querySelector("body").childNodes).forEach(F=>{F instanceof HTMLVideoElement||F instanceof HTMLAudioElement?d.appendChild(F.cloneNode(!0)):d.appendChild(F)})}},wt=(d,p)=>{if(!p)return!1;const g=p.split(/\s+/);for(let v=0;v<g.length;v++)if(!d.classList.contains(g[v]))return!1;return!0},ds=(d,p)=>{Array.from(d.classList).forEach(g=>{!Object.values(o).includes(g)&&!Object.values(r).includes(g)&&!Object.values(p.showClass).includes(g)&&d.classList.remove(g)})},C=(d,p,g)=>{if(ds(d,p),p.customClass&&p.customClass[g]){if(typeof p.customClass[g]!="string"&&!p.customClass[g].forEach){f(`Invalid type of customClass.${g}! Expected string or iterable object, got "${typeof p.customClass[g]}"`);return}R(d,p.customClass[g])}},A=(d,p)=>{if(!p)return null;switch(p){case"select":case"textarea":case"file":return d.querySelector(`.${o.popup} > .${o[p]}`);case"checkbox":return d.querySelector(`.${o.popup} > .${o.checkbox} input`);case"radio":return d.querySelector(`.${o.popup} > .${o.radio} input:checked`)||d.querySelector(`.${o.popup} > .${o.radio} input:first-child`);case"range":return d.querySelector(`.${o.popup} > .${o.range} input`);default:return d.querySelector(`.${o.popup} > .${o.input}`)}},B=d=>{if(d.focus(),d.type!=="file"){const p=d.value;d.value="",d.value=p}},te=(d,p,g)=>{!d||!p||(typeof p=="string"&&(p=p.split(/\s+/).filter(Boolean)),p.forEach(v=>{Array.isArray(d)?d.forEach(F=>{g?F.classList.add(v):F.classList.remove(v)}):g?d.classList.add(v):d.classList.remove(v)}))},R=(d,p)=>{te(d,p,!0)},le=(d,p)=>{te(d,p,!1)},he=(d,p)=>{const g=Array.from(d.children);for(let v=0;v<g.length;v++){const F=g[v];if(F instanceof HTMLElement&&wt(F,p))return F}},ce=(d,p,g)=>{g===`${parseInt(g)}`&&(g=parseInt(g)),g||parseInt(g)===0?d.style[p]=typeof g=="number"?`${g}px`:g:d.style.removeProperty(p)},ne=function(d){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"flex";d.style.display=p},Y=d=>{d.style.display="none"},$e=(d,p,g,v)=>{const F=d.querySelector(p);F&&(F.style[g]=v)},we=function(d,p){let g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"flex";p?ne(d,g):Y(d)},J=d=>!!(d&&(d.offsetWidth||d.offsetHeight||d.getClientRects().length)),Ae=()=>!J(G())&&!J(xe())&&!J(Se()),m=d=>d.scrollHeight>d.clientHeight,w=d=>{const p=window.getComputedStyle(d),g=parseFloat(p.getPropertyValue("animation-duration")||"0"),v=parseFloat(p.getPropertyValue("transition-duration")||"0");return g>0||v>0},x=function(d){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const g=Ee();J(g)&&(p&&(g.style.transition="none",g.style.width="100%"),setTimeout(()=>{g.style.transition=`width ${d/1e3}s linear`,g.style.width="0%"},10))},k=()=>{const d=Ee(),p=parseInt(window.getComputedStyle(d).width);d.style.removeProperty("transition"),d.style.width="100%";const g=parseInt(window.getComputedStyle(d).width),v=p/g*100;d.style.width=`${v}%`},O=100,S={},W=()=>{S.previousActiveElement instanceof HTMLElement?(S.previousActiveElement.focus(),S.previousActiveElement=null):document.body&&document.body.focus()},H=d=>new Promise(p=>{if(!d)return p();const g=window.scrollX,v=window.scrollY;S.restoreFocusTimeout=setTimeout(()=>{W(),p()},O),window.scrollTo(g,v)}),ie=()=>typeof window>"u"||typeof document>"u",ve=`
 <div aria-labelledby="${o.title}" aria-describedby="${o["html-container"]}" class="${o.popup}" tabindex="-1">
   <button type="button" class="${o.close}"></button>
   <ul class="${o["progress-steps"]}"></ul>
   <div class="${o.icon}"></div>
   <img class="${o.image}" />
   <h2 class="${o.title}" id="${o.title}"></h2>
   <div class="${o["html-container"]}" id="${o["html-container"]}"></div>
   <input class="${o.input}" />
   <input type="file" class="${o.file}" />
   <div class="${o.range}">
     <input type="range" />
     <output></output>
   </div>
   <select class="${o.select}"></select>
   <div class="${o.radio}"></div>
   <label for="${o.checkbox}" class="${o.checkbox}">
     <input type="checkbox" />
     <span class="${o.label}"></span>
   </label>
   <textarea class="${o.textarea}"></textarea>
   <div class="${o["validation-message"]}" id="${o["validation-message"]}"></div>
   <div class="${o.actions}">
     <div class="${o.loader}"></div>
     <button type="button" class="${o.confirm}"></button>
     <button type="button" class="${o.deny}"></button>
     <button type="button" class="${o.cancel}"></button>
   </div>
   <div class="${o.footer}"></div>
   <div class="${o["timer-progress-bar-container"]}">
     <div class="${o["timer-progress-bar"]}"></div>
   </div>
 </div>
`.replace(/(^|\n)\s*/g,""),Oe=()=>{const d=P();return d?(d.remove(),le([document.documentElement,document.body],[o["no-backdrop"],o["toast-shown"],o["has-column"]]),!0):!1},Ie=()=>{S.currentInstance.resetValidationMessage()},Ke=()=>{const d=U(),p=he(d,o.input),g=he(d,o.file),v=d.querySelector(`.${o.range} input`),F=d.querySelector(`.${o.range} output`),Pe=he(d,o.select),Ze=d.querySelector(`.${o.checkbox} input`),Xt=he(d,o.textarea);p.oninput=Ie,g.onchange=Ie,Pe.onchange=Ie,Ze.onchange=Ie,Xt.oninput=Ie,v.oninput=()=>{Ie(),F.value=v.value},v.onchange=()=>{Ie(),F.value=v.value}},Mt=d=>typeof d=="string"?document.querySelector(d):d,$t=d=>{const p=U();p.setAttribute("role",d.toast?"alert":"dialog"),p.setAttribute("aria-live",d.toast?"polite":"assertive"),d.toast||p.setAttribute("aria-modal","true")},ro=d=>{window.getComputedStyle(d).direction==="rtl"&&R(P(),o.rtl)},ao=d=>{const p=Oe();if(ie()){h("SweetAlert2 requires document to initialize");return}const g=document.createElement("div");g.className=o.container,p&&R(g,o["no-transition"]),ot(g,ve);const v=Mt(d.target);v.appendChild(g),$t(d),ro(v),Ke()},ic=(d,p)=>{d instanceof HTMLElement?p.appendChild(d):typeof d=="object"?rO(d,p):d&&ot(p,d)},rO=(d,p)=>{d.jquery?aO(p,d):ot(p,d.toString())},aO=(d,p)=>{if(d.textContent="",0 in p)for(let g=0;g in p;g++)d.appendChild(p[g].cloneNode(!0));else d.appendChild(p.cloneNode(!0))},lo=(()=>{if(ie())return!1;const d=document.createElement("div"),p={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const g in p)if(Object.prototype.hasOwnProperty.call(p,g)&&typeof d.style[g]<"u")return p[g];return!1})(),lO=()=>{const d=document.createElement("div");d.className=o["scrollbar-measure"],document.body.appendChild(d);const p=d.getBoundingClientRect().width-d.clientWidth;return document.body.removeChild(d),p},cO=(d,p)=>{const g=se(),v=M();!p.showConfirmButton&&!p.showDenyButton&&!p.showCancelButton?Y(g):ne(g),C(g,p,"actions"),uO(g,v,p),ot(v,p.loaderHtml),C(v,p,"loader")};function uO(d,p,g){const v=G(),F=xe(),Pe=Se();oc(v,"confirm",g),oc(F,"deny",g),oc(Pe,"cancel",g),dO(v,F,Pe,g),g.reverseButtons&&(g.toast?(d.insertBefore(Pe,v),d.insertBefore(F,v)):(d.insertBefore(Pe,p),d.insertBefore(F,p),d.insertBefore(v,p)))}function dO(d,p,g,v){if(!v.buttonsStyling){le([d,p,g],o.styled);return}R([d,p,g],o.styled),v.confirmButtonColor&&(d.style.backgroundColor=v.confirmButtonColor,R(d,o["default-outline"])),v.denyButtonColor&&(p.style.backgroundColor=v.denyButtonColor,R(p,o["default-outline"])),v.cancelButtonColor&&(g.style.backgroundColor=v.cancelButtonColor,R(g,o["default-outline"]))}function oc(d,p,g){we(d,g[`show${u(p)}Button`],"inline-block"),ot(d,g[`${p}ButtonText`]),d.setAttribute("aria-label",g[`${p}ButtonAriaLabel`]),d.className=o[p],C(d,g,`${p}Button`),R(d,g[`${p}ButtonClass`])}const fO=(d,p)=>{const g=Z();ot(g,p.closeButtonHtml),C(g,p,"closeButton"),we(g,p.showCloseButton),g.setAttribute("aria-label",p.closeButtonAriaLabel)},pO=(d,p)=>{const g=P();!g||(hO(g,p.backdrop),mO(g,p.position),gO(g,p.grow),C(g,p,"container"))};function hO(d,p){typeof p=="string"?d.style.background=p:p||R([document.documentElement,document.body],o["no-backdrop"])}function mO(d,p){p in o?R(d,o[p]):(f('The "position" parameter is not valid, defaulting to "center"'),R(d,o.center))}function gO(d,p){if(p&&typeof p=="string"){const g=`grow-${p}`;g in o&&R(d,o[g])}}const yO=["input","file","range","select","radio","checkbox","textarea"],wO=(d,p)=>{const g=U(),v=n.innerParams.get(d),F=!v||p.input!==v.input;yO.forEach(Pe=>{const Ze=he(g,o[Pe]);vO(Pe,p.inputAttributes),Ze.className=o[Pe],F&&Y(Ze)}),p.input&&(F&&bO(p),xO(p))},bO=d=>{if(!zt[d.input]){h(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${d.input}"`);return}const p=Hh(d.input),g=zt[d.input](p,d);ne(p),d.inputAutoFocus&&setTimeout(()=>{B(g)})},_O=d=>{for(let p=0;p<d.attributes.length;p++){const g=d.attributes[p].name;["type","value","style"].includes(g)||d.removeAttribute(g)}},vO=(d,p)=>{const g=A(U(),d);if(!!g){_O(g);for(const v in p)g.setAttribute(v,p[v])}},xO=d=>{const p=Hh(d.input);typeof d.customClass=="object"&&R(p,d.customClass.input)},rc=(d,p)=>{(!d.placeholder||p.inputPlaceholder)&&(d.placeholder=p.inputPlaceholder)},co=(d,p,g)=>{if(g.inputLabel){d.id=o.input;const v=document.createElement("label"),F=o["input-label"];v.setAttribute("for",d.id),v.className=F,typeof g.customClass=="object"&&R(v,g.customClass.inputLabel),v.innerText=g.inputLabel,p.insertAdjacentElement("beforebegin",v)}},Hh=d=>he(U(),o[d]||o.input),Yr=(d,p)=>{["string","number"].includes(typeof p)?d.value=`${p}`:I(p)||f(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof p}"`)},zt={};zt.text=zt.email=zt.password=zt.number=zt.tel=zt.url=(d,p)=>(Yr(d,p.inputValue),co(d,d,p),rc(d,p),d.type=p.input,d),zt.file=(d,p)=>(co(d,d,p),rc(d,p),d),zt.range=(d,p)=>{const g=d.querySelector("input"),v=d.querySelector("output");return Yr(g,p.inputValue),g.type=p.input,Yr(v,p.inputValue),co(g,d,p),d},zt.select=(d,p)=>{if(d.textContent="",p.inputPlaceholder){const g=document.createElement("option");ot(g,p.inputPlaceholder),g.value="",g.disabled=!0,g.selected=!0,d.appendChild(g)}return co(d,d,p),d},zt.radio=d=>(d.textContent="",d),zt.checkbox=(d,p)=>{const g=A(U(),"checkbox");g.value="1",g.id=o.checkbox,g.checked=Boolean(p.inputValue);const v=d.querySelector("span");return ot(v,p.inputPlaceholder),g},zt.textarea=(d,p)=>{Yr(d,p.inputValue),rc(d,p),co(d,d,p);const g=v=>parseInt(window.getComputedStyle(v).marginLeft)+parseInt(window.getComputedStyle(v).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const v=parseInt(window.getComputedStyle(U()).width),F=()=>{const Pe=d.offsetWidth+g(d);Pe>v?U().style.width=`${Pe}px`:U().style.width=null};new MutationObserver(F).observe(d,{attributes:!0,attributeFilter:["style"]})}}),d};const CO=(d,p)=>{const g=Le();C(g,p,"htmlContainer"),p.html?(ic(p.html,g),ne(g,"block")):p.text?(g.textContent=p.text,ne(g,"block")):Y(g),wO(d,p)},$O=(d,p)=>{const g=ee();we(g,p.footer),p.footer&&ic(p.footer,g),C(g,p,"footer")},EO=(d,p)=>{const g=n.innerParams.get(d),v=X();if(g&&p.icon===g.icon){zh(v,p),qh(v,p);return}if(!p.icon&&!p.iconHtml){Y(v);return}if(p.icon&&Object.keys(r).indexOf(p.icon)===-1){h(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${p.icon}"`),Y(v);return}ne(v),zh(v,p),qh(v,p),R(v,p.showClass.icon)},qh=(d,p)=>{for(const g in r)p.icon!==g&&le(d,r[g]);R(d,r[p.icon]),PO(d,p),kO(),C(d,p,"icon")},kO=()=>{const d=U(),p=window.getComputedStyle(d).getPropertyValue("background-color"),g=d.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let v=0;v<g.length;v++)g[v].style.backgroundColor=p},SO=`
  <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>
`,AO=`
  <span class="swal2-x-mark">
    <span class="swal2-x-mark-line-left"></span>
    <span class="swal2-x-mark-line-right"></span>
  </span>
`,zh=(d,p)=>{let g=d.innerHTML,v;p.iconHtml?v=Vh(p.iconHtml):p.icon==="success"?(v=SO,g=g.replace(/ style=".*?"/g,"")):p.icon==="error"?v=AO:v=Vh({question:"?",warning:"!",info:"i"}[p.icon]),g.trim()!==v.trim()&&ot(d,v)},PO=(d,p)=>{if(!!p.iconColor){d.style.color=p.iconColor,d.style.borderColor=p.iconColor;for(const g of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])$e(d,g,"backgroundColor",p.iconColor);$e(d,".swal2-success-ring","borderColor",p.iconColor)}},Vh=d=>`<div class="${o["icon-content"]}">${d}</div>`,IO=(d,p)=>{const g=ge();if(!p.imageUrl){Y(g);return}ne(g,""),g.setAttribute("src",p.imageUrl),g.setAttribute("alt",p.imageAlt),ce(g,"width",p.imageWidth),ce(g,"height",p.imageHeight),g.className=o.image,C(g,p,"image")},TO=(d,p)=>{const g=P(),v=U();p.toast?(ce(g,"width",p.width),v.style.width="100%",v.insertBefore(M(),X())):ce(v,"width",p.width),ce(v,"padding",p.padding),p.color&&(v.style.color=p.color),p.background&&(v.style.background=p.background),Y(re()),LO(v,p)},LO=(d,p)=>{d.className=`${o.popup} ${J(d)?p.showClass.popup:""}`,p.toast?(R([document.documentElement,document.body],o["toast-shown"]),R(d,o.toast)):R(d,o.modal),C(d,p,"popup"),typeof p.customClass=="string"&&R(d,p.customClass),p.icon&&R(d,o[`icon-${p.icon}`])},OO=(d,p)=>{const g=L();if(!p.progressSteps||p.progressSteps.length===0){Y(g);return}ne(g),g.textContent="",p.currentProgressStep>=p.progressSteps.length&&f("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),p.progressSteps.forEach((v,F)=>{const Pe=DO(v);if(g.appendChild(Pe),F===p.currentProgressStep&&R(Pe,o["active-progress-step"]),F!==p.progressSteps.length-1){const Ze=MO(p);g.appendChild(Ze)}})},DO=d=>{const p=document.createElement("li");return R(p,o["progress-step"]),ot(p,d),p},MO=d=>{const p=document.createElement("li");return R(p,o["progress-step-line"]),d.progressStepsDistance&&ce(p,"width",d.progressStepsDistance),p},RO=(d,p)=>{const g=ye();we(g,p.title||p.titleText,"block"),p.title&&ic(p.title,g),p.titleText&&(g.innerText=p.titleText),C(g,p,"title")},Wh=(d,p)=>{TO(d,p),pO(d,p),OO(d,p),EO(d,p),IO(d,p),RO(d,p),fO(d,p),CO(d,p),cO(d,p),$O(d,p),typeof p.didRender=="function"&&p.didRender(U())};function Kh(){const d=n.innerParams.get(this);if(!d)return;const p=n.domCache.get(this);Y(p.loader),ke()?d.icon&&ne(X()):NO(p),le([p.popup,p.actions],o.loading),p.popup.removeAttribute("aria-busy"),p.popup.removeAttribute("data-loading"),p.confirmButton.disabled=!1,p.denyButton.disabled=!1,p.cancelButton.disabled=!1}const NO=d=>{const p=d.popup.getElementsByClassName(d.loader.getAttribute("data-button-to-replace"));p.length?ne(p[0],"inline-block"):Ae()&&Y(d.actions)};function BO(d){const p=n.innerParams.get(d||this),g=n.domCache.get(d||this);return g?A(g.popup,p.input):null}const FO=()=>J(U()),Gh=()=>G()&&G().click(),UO=()=>xe()&&xe().click(),jO=()=>Se()&&Se().click(),mi=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Yh=d=>{d.keydownTarget&&d.keydownHandlerAdded&&(d.keydownTarget.removeEventListener("keydown",d.keydownHandler,{capture:d.keydownListenerCapture}),d.keydownHandlerAdded=!1)},HO=(d,p,g,v)=>{Yh(p),g.toast||(p.keydownHandler=F=>zO(d,F,v),p.keydownTarget=g.keydownListenerCapture?window:U(),p.keydownListenerCapture=g.keydownListenerCapture,p.keydownTarget.addEventListener("keydown",p.keydownHandler,{capture:p.keydownListenerCapture}),p.keydownHandlerAdded=!0)},ac=(d,p)=>{const g=Fe();if(g.length){d=d+p,d===g.length?d=0:d===-1&&(d=g.length-1),g[d].focus();return}U().focus()},Jh=["ArrowRight","ArrowDown"],qO=["ArrowLeft","ArrowUp"],zO=(d,p,g)=>{const v=n.innerParams.get(d);!v||p.isComposing||p.keyCode===229||(v.stopKeydownPropagation&&p.stopPropagation(),p.key==="Enter"?VO(d,p,v):p.key==="Tab"?WO(p):[...Jh,...qO].includes(p.key)?KO(p.key):p.key==="Escape"&&GO(p,v,g))},VO=(d,p,g)=>{if(!!E(g.allowEnterKey)&&p.target&&d.getInput()&&p.target instanceof HTMLElement&&p.target.outerHTML===d.getInput().outerHTML){if(["textarea","file"].includes(g.input))return;Gh(),p.preventDefault()}},WO=d=>{const p=d.target,g=Fe();let v=-1;for(let F=0;F<g.length;F++)if(p===g[F]){v=F;break}d.shiftKey?ac(v,-1):ac(v,1),d.stopPropagation(),d.preventDefault()},KO=d=>{const p=G(),g=xe(),v=Se(),F=[p,g,v];if(document.activeElement instanceof HTMLElement&&!F.includes(document.activeElement))return;const Pe=Jh.includes(d)?"nextElementSibling":"previousElementSibling";let Ze=document.activeElement;for(let Xt=0;Xt<se().children.length;Xt++){if(Ze=Ze[Pe],!Ze)return;if(Ze instanceof HTMLButtonElement&&J(Ze))break}Ze instanceof HTMLButtonElement&&Ze.focus()},GO=(d,p,g)=>{E(p.allowEscapeKey)&&(d.preventDefault(),g(mi.esc))};var uo={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const YO=()=>{Array.from(document.body.children).forEach(p=>{p===P()||p.contains(P())||(p.hasAttribute("aria-hidden")&&p.setAttribute("data-previous-aria-hidden",p.getAttribute("aria-hidden")),p.setAttribute("aria-hidden","true"))})},Qh=()=>{Array.from(document.body.children).forEach(p=>{p.hasAttribute("data-previous-aria-hidden")?(p.setAttribute("aria-hidden",p.getAttribute("data-previous-aria-hidden")),p.removeAttribute("data-previous-aria-hidden")):p.removeAttribute("aria-hidden")})},JO=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!wt(document.body,o.iosfix)){const p=document.body.scrollTop;document.body.style.top=`${p*-1}px`,R(document.body,o.iosfix),XO(),QO()}},QO=()=>{const d=navigator.userAgent,p=!!d.match(/iPad/i)||!!d.match(/iPhone/i),g=!!d.match(/WebKit/i);p&&g&&!d.match(/CriOS/i)&&U().scrollHeight>window.innerHeight-44&&(P().style.paddingBottom=`${44}px`)},XO=()=>{const d=P();let p;d.ontouchstart=g=>{p=ZO(g)},d.ontouchmove=g=>{p&&(g.preventDefault(),g.stopPropagation())}},ZO=d=>{const p=d.target,g=P();return eD(d)||tD(d)?!1:p===g||!m(g)&&p instanceof HTMLElement&&p.tagName!=="INPUT"&&p.tagName!=="TEXTAREA"&&!(m(Le())&&Le().contains(p))},eD=d=>d.touches&&d.touches.length&&d.touches[0].touchType==="stylus",tD=d=>d.touches&&d.touches.length>1,nD=()=>{if(wt(document.body,o.iosfix)){const d=parseInt(document.body.style.top,10);le(document.body,o.iosfix),document.body.style.top="",document.body.scrollTop=d*-1}},sD=()=>{it.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(it.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${it.previousBodyPadding+lO()}px`)},iD=()=>{it.previousBodyPadding!==null&&(document.body.style.paddingRight=`${it.previousBodyPadding}px`,it.previousBodyPadding=null)};function Xh(d,p,g,v){ke()?Zh(d,v):(H(g).then(()=>Zh(d,v)),Yh(S)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(p.setAttribute("style","display:none !important"),p.removeAttribute("class"),p.innerHTML=""):p.remove(),Ye()&&(iD(),nD(),Qh()),oD()}function oD(){le([document.documentElement,document.body],[o.shown,o["height-auto"],o["no-backdrop"],o["toast-shown"]])}function Jr(d){d=cD(d);const p=uo.swalPromiseResolve.get(this),g=aD(this);this.isAwaitingPromise()?d.isDismissed||(fo(this),p(d)):g&&p(d)}function rD(){return!!n.awaitingPromise.get(this)}const aD=d=>{const p=U();if(!p)return!1;const g=n.innerParams.get(d);if(!g||wt(p,g.hideClass.popup))return!1;le(p,g.showClass.popup),R(p,g.hideClass.popup);const v=P();return le(v,g.showClass.backdrop),R(v,g.hideClass.backdrop),uD(d,p,g),!0};function lD(d){const p=uo.swalPromiseReject.get(this);fo(this),p&&p(d)}const fo=d=>{d.isAwaitingPromise()&&(n.awaitingPromise.delete(d),n.innerParams.get(d)||d._destroy())},cD=d=>typeof d>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},d),uD=(d,p,g)=>{const v=P(),F=lo&&w(p);typeof g.willClose=="function"&&g.willClose(p),F?dD(d,p,v,g.returnFocus,g.didClose):Xh(d,v,g.returnFocus,g.didClose)},dD=(d,p,g,v,F)=>{S.swalCloseEventFinishedCallback=Xh.bind(null,d,g,v,F),p.addEventListener(lo,function(Pe){Pe.target===p&&(S.swalCloseEventFinishedCallback(),delete S.swalCloseEventFinishedCallback)})},Zh=(d,p)=>{setTimeout(()=>{typeof p=="function"&&p.bind(d.params)(),d._destroy()})};function em(d,p,g){const v=n.domCache.get(d);p.forEach(F=>{v[F].disabled=g})}function tm(d,p){if(!!d)if(d.type==="radio"){const v=d.parentNode.parentNode.querySelectorAll("input");for(let F=0;F<v.length;F++)v[F].disabled=p}else d.disabled=p}function fD(){em(this,["confirmButton","denyButton","cancelButton"],!1)}function pD(){em(this,["confirmButton","denyButton","cancelButton"],!0)}function hD(){tm(this.getInput(),!1)}function mD(){tm(this.getInput(),!0)}function gD(d){const p=n.domCache.get(this),g=n.innerParams.get(this);ot(p.validationMessage,d),p.validationMessage.className=o["validation-message"],g.customClass&&g.customClass.validationMessage&&R(p.validationMessage,g.customClass.validationMessage),ne(p.validationMessage);const v=this.getInput();v&&(v.setAttribute("aria-invalid",!0),v.setAttribute("aria-describedby",o["validation-message"]),B(v),R(v,o.inputerror))}function yD(){const d=n.domCache.get(this);d.validationMessage&&Y(d.validationMessage);const p=this.getInput();p&&(p.removeAttribute("aria-invalid"),p.removeAttribute("aria-describedby"),le(p,o.inputerror))}const gi={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},wD=["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"],bD={},_D=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],nm=d=>Object.prototype.hasOwnProperty.call(gi,d),sm=d=>wD.indexOf(d)!==-1,lc=d=>bD[d],vD=d=>{nm(d)||f(`Unknown parameter "${d}"`)},xD=d=>{_D.includes(d)&&f(`The parameter "${d}" is incompatible with toasts`)},CD=d=>{lc(d)&&b(d,lc(d))},$D=d=>{d.backdrop===!1&&d.allowOutsideClick&&f('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const p in d)vD(p),d.toast&&xD(p),CD(p)};function ED(d){const p=U(),g=n.innerParams.get(this);if(!p||wt(p,g.hideClass.popup)){f("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=kD(d),F=Object.assign({},g,v);Wh(this,F),n.innerParams.set(this,F),Object.defineProperties(this,{params:{value:Object.assign({},this.params,d),writable:!1,enumerable:!0}})}const kD=d=>{const p={};return Object.keys(d).forEach(g=>{sm(g)?p[g]=d[g]:f(`Invalid parameter to update: ${g}`)}),p};function SD(){const d=n.domCache.get(this),p=n.innerParams.get(this);if(!p){im(this);return}d.popup&&S.swalCloseEventFinishedCallback&&(S.swalCloseEventFinishedCallback(),delete S.swalCloseEventFinishedCallback),typeof p.didDestroy=="function"&&p.didDestroy(),AD(this)}const AD=d=>{im(d),delete d.params,delete S.keydownHandler,delete S.keydownTarget,delete S.currentInstance},im=d=>{d.isAwaitingPromise()?(cc(n,d),n.awaitingPromise.set(d,!0)):(cc(uo,d),cc(n,d))},cc=(d,p)=>{for(const g in d)d[g].delete(p)};var om=Object.freeze({__proto__:null,_destroy:SD,close:Jr,closeModal:Jr,closePopup:Jr,closeToast:Jr,disableButtons:pD,disableInput:mD,disableLoading:Kh,enableButtons:fD,enableInput:hD,getInput:BO,handleAwaitingPromise:fo,hideLoading:Kh,isAwaitingPromise:rD,rejectPromise:lD,resetValidationMessage:yD,showValidationMessage:gD,update:ED});const yi=d=>{let p=U();p||new Xr,p=U();const g=M();ke()?Y(X()):PD(p,d),ne(g),p.setAttribute("data-loading","true"),p.setAttribute("aria-busy","true"),p.focus()},PD=(d,p)=>{const g=se(),v=M();!p&&J(G())&&(p=G()),ne(g),p&&(Y(p),v.setAttribute("data-button-to-replace",p.className)),v.parentNode.insertBefore(v,p),R([d,g],o.loading)},ID=(d,p)=>{p.input==="select"||p.input==="radio"?MD(d,p):["text","email","number","tel","textarea"].includes(p.input)&&(T(p.inputValue)||I(p.inputValue))&&(yi(G()),RD(d,p))},TD=(d,p)=>{const g=d.getInput();if(!g)return null;switch(p.input){case"checkbox":return LD(g);case"radio":return OD(g);case"file":return DD(g);default:return p.inputAutoTrim?g.value.trim():g.value}},LD=d=>d.checked?1:0,OD=d=>d.checked?d.value:null,DD=d=>d.files.length?d.getAttribute("multiple")!==null?d.files:d.files[0]:null,MD=(d,p)=>{const g=U(),v=F=>{ND[p.input](g,uc(F),p)};T(p.inputOptions)||I(p.inputOptions)?(yi(G()),D(p.inputOptions).then(F=>{d.hideLoading(),v(F)})):typeof p.inputOptions=="object"?v(p.inputOptions):h(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof p.inputOptions}`)},RD=(d,p)=>{const g=d.getInput();Y(g),D(p.inputValue).then(v=>{g.value=p.input==="number"?`${parseFloat(v)||0}`:`${v}`,ne(g),g.focus(),d.hideLoading()}).catch(v=>{h(`Error in inputValue promise: ${v}`),g.value="",ne(g),g.focus(),d.hideLoading()})},ND={select:(d,p,g)=>{const v=he(d,o.select),F=(Pe,Ze,Xt)=>{const Rt=document.createElement("option");Rt.value=Xt,ot(Rt,Ze),Rt.selected=rm(Xt,g.inputValue),Pe.appendChild(Rt)};p.forEach(Pe=>{const Ze=Pe[0],Xt=Pe[1];if(Array.isArray(Xt)){const Rt=document.createElement("optgroup");Rt.label=Ze,Rt.disabled=!1,v.appendChild(Rt),Xt.forEach(bi=>F(Rt,bi[1],bi[0]))}else F(v,Xt,Ze)}),v.focus()},radio:(d,p,g)=>{const v=he(d,o.radio);p.forEach(Pe=>{const Ze=Pe[0],Xt=Pe[1],Rt=document.createElement("input"),bi=document.createElement("label");Rt.type="radio",Rt.name=o.radio,Rt.value=Ze,rm(Ze,g.inputValue)&&(Rt.checked=!0);const hc=document.createElement("span");ot(hc,Xt),hc.className=o.label,bi.appendChild(Rt),bi.appendChild(hc),v.appendChild(bi)});const F=v.querySelectorAll("input");F.length&&F[0].focus()}},uc=d=>{const p=[];return typeof Map<"u"&&d instanceof Map?d.forEach((g,v)=>{let F=g;typeof F=="object"&&(F=uc(F)),p.push([v,F])}):Object.keys(d).forEach(g=>{let v=d[g];typeof v=="object"&&(v=uc(v)),p.push([g,v])}),p},rm=(d,p)=>p&&p.toString()===d.toString(),BD=d=>{const p=n.innerParams.get(d);d.disableButtons(),p.input?am(d,"confirm"):fc(d,!0)},FD=d=>{const p=n.innerParams.get(d);d.disableButtons(),p.returnInputValueOnDeny?am(d,"deny"):dc(d,!1)},UD=(d,p)=>{d.disableButtons(),p(mi.cancel)},am=(d,p)=>{const g=n.innerParams.get(d);if(!g.input){h(`The "input" parameter is needed to be set when using returnInputValueOn${u(p)}`);return}const v=TD(d,g);g.inputValidator?jD(d,v,p):d.getInput().checkValidity()?p==="deny"?dc(d,v):fc(d,v):(d.enableButtons(),d.showValidationMessage(g.validationMessage))},jD=(d,p,g)=>{const v=n.innerParams.get(d);d.disableInput(),Promise.resolve().then(()=>D(v.inputValidator(p,v.validationMessage))).then(Pe=>{d.enableButtons(),d.enableInput(),Pe?d.showValidationMessage(Pe):g==="deny"?dc(d,p):fc(d,p)})},dc=(d,p)=>{const g=n.innerParams.get(d||void 0);g.showLoaderOnDeny&&yi(xe()),g.preDeny?(n.awaitingPromise.set(d||void 0,!0),Promise.resolve().then(()=>D(g.preDeny(p,g.validationMessage))).then(F=>{F===!1?(d.hideLoading(),fo(d)):d.close({isDenied:!0,value:typeof F>"u"?p:F})}).catch(F=>cm(d||void 0,F))):d.close({isDenied:!0,value:p})},lm=(d,p)=>{d.close({isConfirmed:!0,value:p})},cm=(d,p)=>{d.rejectPromise(p)},fc=(d,p)=>{const g=n.innerParams.get(d||void 0);g.showLoaderOnConfirm&&yi(),g.preConfirm?(d.resetValidationMessage(),n.awaitingPromise.set(d||void 0,!0),Promise.resolve().then(()=>D(g.preConfirm(p,g.validationMessage))).then(F=>{J(re())||F===!1?(d.hideLoading(),fo(d)):lm(d,typeof F>"u"?p:F)}).catch(F=>cm(d||void 0,F))):lm(d,p)},HD=(d,p,g)=>{n.innerParams.get(d).toast?qD(d,p,g):(VD(p),WD(p),KD(d,p,g))},qD=(d,p,g)=>{p.popup.onclick=()=>{const v=n.innerParams.get(d);v&&(zD(v)||v.timer||v.input)||g(mi.close)}},zD=d=>d.showConfirmButton||d.showDenyButton||d.showCancelButton||d.showCloseButton;let Qr=!1;const VD=d=>{d.popup.onmousedown=()=>{d.container.onmouseup=function(p){d.container.onmouseup=void 0,p.target===d.container&&(Qr=!0)}}},WD=d=>{d.container.onmousedown=()=>{d.popup.onmouseup=function(p){d.popup.onmouseup=void 0,(p.target===d.popup||d.popup.contains(p.target))&&(Qr=!0)}}},KD=(d,p,g)=>{p.container.onclick=v=>{const F=n.innerParams.get(d);if(Qr){Qr=!1;return}v.target===p.container&&E(F.allowOutsideClick)&&g(mi.backdrop)}},GD=d=>typeof d=="object"&&d.jquery,um=d=>d instanceof Element||GD(d),YD=d=>{const p={};return typeof d[0]=="object"&&!um(d[0])?Object.assign(p,d[0]):["title","html","icon"].forEach((g,v)=>{const F=d[v];typeof F=="string"||um(F)?p[g]=F:F!==void 0&&h(`Unexpected type of ${g}! Expected "string" or "Element", got ${typeof F}`)}),p};function JD(){const d=this;for(var p=arguments.length,g=new Array(p),v=0;v<p;v++)g[v]=arguments[v];return new d(...g)}function QD(d){class p extends this{_main(v,F){return super._main(v,Object.assign({},d,F))}}return p}const XD=()=>S.timeout&&S.timeout.getTimerLeft(),dm=()=>{if(S.timeout)return k(),S.timeout.stop()},fm=()=>{if(S.timeout){const d=S.timeout.start();return x(d),d}},ZD=()=>{const d=S.timeout;return d&&(d.running?dm():fm())},eM=d=>{if(S.timeout){const p=S.timeout.increase(d);return x(p,!0),p}},tM=()=>S.timeout&&S.timeout.isRunning();let pm=!1;const pc={};function nM(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";pc[d]=this,pm||(document.body.addEventListener("click",sM),pm=!0)}const sM=d=>{for(let p=d.target;p&&p!==document;p=p.parentNode)for(const g in pc){const v=p.getAttribute(g);if(v){pc[g].fire({template:v});return}}};var iM=Object.freeze({__proto__:null,argsToParams:YD,bindClickHandler:nM,clickCancel:jO,clickConfirm:Gh,clickDeny:UO,enableLoading:yi,fire:JD,getActions:se,getCancelButton:Se,getCloseButton:Z,getConfirmButton:G,getContainer:P,getDenyButton:xe,getFocusableElements:Fe,getFooter:ee,getHtmlContainer:Le,getIcon:X,getIconContent:ue,getImage:ge,getInputLabel:Re,getLoader:M,getPopup:U,getProgressSteps:L,getTimerLeft:XD,getTimerProgressBar:Ee,getTitle:ye,getValidationMessage:re,increaseTimer:eM,isDeprecatedParameter:lc,isLoading:ft,isTimerRunning:tM,isUpdatableParameter:sm,isValidParameter:nm,isVisible:FO,mixin:QD,resumeTimer:fm,showLoading:yi,stopTimer:dm,toggleTimer:ZD});class oM{constructor(p,g){this.callback=p,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(p){const g=this.running;return g&&this.stop(),this.remaining+=p,g&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const hm=["swal-title","swal-html","swal-footer"],rM=d=>{const p=typeof d.template=="string"?document.querySelector(d.template):d.template;if(!p)return{};const g=p.content;return hM(g),Object.assign(aM(g),lM(g),cM(g),uM(g),dM(g),fM(g),pM(g,hm))},aM=d=>{const p={};return Array.from(d.querySelectorAll("swal-param")).forEach(v=>{Rs(v,["name","value"]);const F=v.getAttribute("name"),Pe=v.getAttribute("value");typeof gi[F]=="boolean"?p[F]=Pe!=="false":typeof gi[F]=="object"?p[F]=JSON.parse(Pe):p[F]=Pe}),p},lM=d=>{const p={};return Array.from(d.querySelectorAll("swal-function-param")).forEach(v=>{const F=v.getAttribute("name"),Pe=v.getAttribute("value");p[F]=new Function(`return ${Pe}`)()}),p},cM=d=>{const p={};return Array.from(d.querySelectorAll("swal-button")).forEach(v=>{Rs(v,["type","color","aria-label"]);const F=v.getAttribute("type");p[`${F}ButtonText`]=v.innerHTML,p[`show${u(F)}Button`]=!0,v.hasAttribute("color")&&(p[`${F}ButtonColor`]=v.getAttribute("color")),v.hasAttribute("aria-label")&&(p[`${F}ButtonAriaLabel`]=v.getAttribute("aria-label"))}),p},uM=d=>{const p={},g=d.querySelector("swal-image");return g&&(Rs(g,["src","width","height","alt"]),g.hasAttribute("src")&&(p.imageUrl=g.getAttribute("src")),g.hasAttribute("width")&&(p.imageWidth=g.getAttribute("width")),g.hasAttribute("height")&&(p.imageHeight=g.getAttribute("height")),g.hasAttribute("alt")&&(p.imageAlt=g.getAttribute("alt"))),p},dM=d=>{const p={},g=d.querySelector("swal-icon");return g&&(Rs(g,["type","color"]),g.hasAttribute("type")&&(p.icon=g.getAttribute("type")),g.hasAttribute("color")&&(p.iconColor=g.getAttribute("color")),p.iconHtml=g.innerHTML),p},fM=d=>{const p={},g=d.querySelector("swal-input");g&&(Rs(g,["type","label","placeholder","value"]),p.input=g.getAttribute("type")||"text",g.hasAttribute("label")&&(p.inputLabel=g.getAttribute("label")),g.hasAttribute("placeholder")&&(p.inputPlaceholder=g.getAttribute("placeholder")),g.hasAttribute("value")&&(p.inputValue=g.getAttribute("value")));const v=Array.from(d.querySelectorAll("swal-input-option"));return v.length&&(p.inputOptions={},v.forEach(F=>{Rs(F,["value"]);const Pe=F.getAttribute("value"),Ze=F.innerHTML;p.inputOptions[Pe]=Ze})),p},pM=(d,p)=>{const g={};for(const v in p){const F=p[v],Pe=d.querySelector(F);Pe&&(Rs(Pe,[]),g[F.replace(/^swal-/,"")]=Pe.innerHTML.trim())}return g},hM=d=>{const p=hm.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(d.children).forEach(g=>{const v=g.tagName.toLowerCase();p.includes(v)||f(`Unrecognized element <${v}>`)})},Rs=(d,p)=>{Array.from(d.attributes).forEach(g=>{p.indexOf(g.name)===-1&&f([`Unrecognized attribute "${g.name}" on <${d.tagName.toLowerCase()}>.`,`${p.length?`Allowed attributes are: ${p.join(", ")}`:"To set the value, use HTML within the element."}`])})},mm=10,mM=d=>{const p=P(),g=U();typeof d.willOpen=="function"&&d.willOpen(g);const F=window.getComputedStyle(document.body).overflowY;wM(p,g,d),setTimeout(()=>{gM(p,g)},mm),Ye()&&(yM(p,d.scrollbarPadding,F),YO()),!ke()&&!S.previousActiveElement&&(S.previousActiveElement=document.activeElement),typeof d.didOpen=="function"&&setTimeout(()=>d.didOpen(g)),le(p,o["no-transition"])},gm=d=>{const p=U();if(d.target!==p)return;const g=P();p.removeEventListener(lo,gm),g.style.overflowY="auto"},gM=(d,p)=>{lo&&w(p)?(d.style.overflowY="hidden",p.addEventListener(lo,gm)):d.style.overflowY="auto"},yM=(d,p,g)=>{JO(),p&&g!=="hidden"&&sD(),setTimeout(()=>{d.scrollTop=0})},wM=(d,p,g)=>{R(d,g.showClass.backdrop),p.style.setProperty("opacity","0","important"),ne(p,"grid"),setTimeout(()=>{R(p,g.showClass.popup),p.style.removeProperty("opacity")},mm),R([document.documentElement,document.body],o.shown),g.heightAuto&&g.backdrop&&!g.toast&&R([document.documentElement,document.body],o["height-auto"])};var ym={email:(d,p)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(d)?Promise.resolve():Promise.resolve(p||"Invalid email address"),url:(d,p)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(d)?Promise.resolve():Promise.resolve(p||"Invalid URL")};function bM(d){d.inputValidator||Object.keys(ym).forEach(p=>{d.input===p&&(d.inputValidator=ym[p])})}function _M(d){(!d.target||typeof d.target=="string"&&!document.querySelector(d.target)||typeof d.target!="string"&&!d.target.appendChild)&&(f('Target parameter is not valid, defaulting to "body"'),d.target="body")}function vM(d){bM(d),d.showLoaderOnConfirm&&!d.preConfirm&&f(`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`),_M(d),typeof d.title=="string"&&(d.title=d.title.split(`
`).join("<br />")),ao(d)}let $n;class wi{constructor(){if(typeof window>"u")return;$n=this;for(var p=arguments.length,g=new Array(p),v=0;v<p;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 Pe=$n._main($n.params);n.promise.set(this,Pe)}_main(p){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$D(Object.assign({},g,p)),S.currentInstance&&(S.currentInstance._destroy(),Ye()&&Qh()),S.currentInstance=$n;const v=CM(p,g);vM(v),Object.freeze(v),S.timeout&&(S.timeout.stop(),delete S.timeout),clearTimeout(S.restoreFocusTimeout);const F=$M($n);return Wh($n,v),n.innerParams.set($n,v),xM($n,F,v)}then(p){return n.promise.get(this).then(p)}finally(p){return n.promise.get(this).finally(p)}}const xM=(d,p,g)=>new Promise((v,F)=>{const Pe=Ze=>{d.close({isDismissed:!0,dismiss:Ze})};uo.swalPromiseResolve.set(d,v),uo.swalPromiseReject.set(d,F),p.confirmButton.onclick=()=>{BD(d)},p.denyButton.onclick=()=>{FD(d)},p.cancelButton.onclick=()=>{UD(d,Pe)},p.closeButton.onclick=()=>{Pe(mi.close)},HD(d,p,Pe),HO(d,S,g,Pe),ID(d,g),mM(g),EM(S,g,Pe),kM(p,g),setTimeout(()=>{p.container.scrollTop=0})}),CM=(d,p)=>{const g=rM(d),v=Object.assign({},gi,p,g,d);return v.showClass=Object.assign({},gi.showClass,v.showClass),v.hideClass=Object.assign({},gi.hideClass,v.hideClass),v},$M=d=>{const p={popup:U(),container:P(),actions:se(),confirmButton:G(),denyButton:xe(),cancelButton:Se(),loader:M(),closeButton:Z(),validationMessage:re(),progressSteps:L()};return n.domCache.set(d,p),p},EM=(d,p,g)=>{const v=Ee();Y(v),p.timer&&(d.timeout=new oM(()=>{g("timer"),delete d.timeout},p.timer),p.timerProgressBar&&(ne(v),C(v,p,"timerProgressBar"),setTimeout(()=>{d.timeout&&d.timeout.running&&x(p.timer)})))},kM=(d,p)=>{if(!p.toast){if(!E(p.allowEnterKey)){AM();return}SM(d,p)||ac(-1,1)}},SM=(d,p)=>p.focusDeny&&J(d.denyButton)?(d.denyButton.focus(),!0):p.focusCancel&&J(d.cancelButton)?(d.cancelButton.focus(),!0):p.focusConfirm&&J(d.confirmButton)?(d.confirmButton.focus(),!0):!1,AM=()=>{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 d=new Date,p=localStorage.getItem("swal-initiation");p?(d.getTime()-Date.parse(p))/(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",`${d}`)}Object.assign(wi.prototype,om),Object.assign(wi,iM),Object.keys(om).forEach(d=>{wi[d]=function(){if($n)return $n[d](...arguments)}}),wi.DismissReason=mi,wi.version="11.7.2";const Xr=wi;return Xr.default=Xr,Xr}),typeof jn<"u"&&jn.Sweetalert2&&(jn.swal=jn.sweetAlert=jn.Swal=jn.SweetAlert=jn.Sweetalert2),typeof document<"u"&&function(n,s){var i=n.createElement("style");if(n.getElementsByTagName("head")[0].appendChild(i),i.styleSheet)i.styleSheet.disabled||(i.styleSheet.cssText=s);else try{i.innerHTML=s}catch{i.innerText=s}}(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}')})(bc);const pe=bc.exports,Am=["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"],Pm=["jpg","jpeg","png","gif","bmp","svg"],Im=["mp3","wav","wma","ogg","ape","flac","aac"];function _c(e){return JSON.parse(JSON.stringify(e))}function vc(e){return e&&typeof e=="object"&&!Array.isArray(e)}function xc(...e){const t={};for(const n of e)for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(vc(n[s])&&vc(t[s])?t[s]=xc(t[s],n[s]):t[s]=n[s]);return t}function mo(e,...t){return new e(t[0])}async function Tm(e){return new Promise((t,n)=>{ta({onload:s=>t(s),onerror:s=>n(s),...e})})}function xi(){return Math.floor(Date.now()/1e3)}function Ci(e,t,n="text/plain"){const s=document.createElement("a");document.body.appendChild(s),s.setAttribute("style","display:none");const i=new Blob([e],{type:n}),o=window.URL.createObjectURL(i);s.href=o,s.download=t,s.click(),window.URL.revokeObjectURL(o)}function sn(e){if(typeof vi=="function")return vi(e,"text"),!0;const t=n=>{var s;(s=n.clipboardData)==null||s.setData("text/plain",e),n.preventDefault(),document.removeEventListener("copy",t)};return document.addEventListener("copy",t),document.execCommand("copy")}function Cc(e,t){return e=e.replace(/^[\/]+/g,""),t?"/"+e:e}function $c(e){return/^magnet:\?xt=urn:btih/.test(e)}function Ec(e){return/^ed2k:\/\/\|file\|/.test(e)}function kc(e){return`magnet:?xt=urn:btih:${e.toUpperCase()}`}function Sc(e){const t=e.match(/([a-z\d]{32,40})/i);return t?t[1]:""}function Lm(e,t=!0){return(t?/^([a-z\d]{32})$|^([a-z\d]{40})$/i:/^[a-z\d]{32,40}$/i).test(e)}function na(e,t=location.href){const n=new RegExp("(\\?|#|&)"+e+"=([^&#]*)(&|#|$)"),s=t.match(n);return s?s[2]:""}function go(e,t=2){if(Number.isNaN(e)||(e=typeof e=="string"?parseInt(e):e,!e))return"0";const n=1024,s=t,i=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,o)).toFixed(s))+" "+i[o]}function Ac(e){const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],n=new RegExp(`^(\\d+(?:\\.\\d+)?)(${t.join("|")})$`,"i"),s=e.match(n);if(!s)throw new Error(`无效的文件大小!${e}`);const i=parseFloat(s[1]),o=s[2].toUpperCase(),r=t.indexOf(o);if(r<0)throw new Error(`无效的文件大小!${e}`);return i*Math.pow(1024,r)}function Pc(e,t=document,n=XPathResult.ORDERED_NODE_SNAPSHOT_TYPE){const s=[],i=document.evaluate(e,t,null,n,null);for(let o=0;o<i.snapshotLength;o++){const r=i.snapshotItem(o);r&&s.push(r)}return s}async function bt(e,t=100,n=12e4,s=document){const i=await Ic(e,t,n,s);if(i.length)return i[0];throw new Error(`未找到元素:${e}`)}async function Ic(e,t=100,n=12e4,s=document){const i=e.indexOf("//")===0;function o(r){if(i){const a=Pc(e);a.length>0&&r(a)}else{const a=s.querySelectorAll(e);a.length&&r(Array.from(a))}}try{return await qn(o,t,n)}catch(r){throw console.warn("[find]",r),new Error(`查找元素超时:${e}`)}}async function Hn(e,t=100,n=12e4){const s=e.indexOf("//")===0;function i(o){if(s){const r=Pc(e);r.length>0&&o(unsafeWindow.$(r))}else{const r=unsafeWindow.$(e);r.length&&o(r)}}try{return await qn(i,t,n)}catch(o){throw console.warn("[findWithJQuery]",o),new Error(`查找元素超时:${e}`)}}async function qn(e,t,n){return new Promise(async(s,i)=>{if(typeof e!="function"){i("提供的参数`fulfill`不是一个Function!");return}let o=!1;e(l=>{o=!0,s(l)});let r=setInterval(async()=>{if(o){clearTimeout(a),clearInterval(r);return}e(l=>{clearTimeout(a),clearInterval(r),s(l)})},t),a=setTimeout(()=>{clearInterval(r),i("超时")},n)})}async function Et(e){return new Promise(t=>{setTimeout(t,e)})}function yo(e){const t=new URLSearchParams;let n;for(n in e)t.append(n,e[n].toString());return t.toString()}function Om(e,t=!1){const n=[];for(const s in e){let i=e[s].toString();i=t?encodeURIComponent(i):i,n.push(`${s}=${i}`)}return n.join("&")}async function oe(e){return pe.fire({toast:!0,position:"top",showConfirmButton:!1,timer:3e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",pe.stopTimer),t.addEventListener("mouseleave",pe.resumeTimer)},...e})}function ps(e,t){t=t||window,t.postMessage(e)}function hs(e,t,n){if(n){const s=ho(e,{});ea(e,{...s,...t})}else ea(e,t)}function Nt(e,t,n){let s;return function(...i){const o=()=>{s=void 0,n||e.apply(this,i)},r=n&&s===void 0;clearTimeout(s),s=setTimeout(o,t),r&&e.apply(this,i)}}function Dm(e){return e?Am.indexOf(e.toLowerCase())>-1:!1}function Mm(e){return e?Pm.indexOf(e.toLowerCase())>-1:!1}function Rm(e){return e?Im.indexOf(e.toLowerCase())>-1:!1}var Be=(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))(Be||{}),$i=(e=>(e.listItemHover="列表项悬浮菜单",e.listItemHoverSub="列表项悬浮子菜单",e.listItemContext="列表项右键菜单",e.listItemContextSub="列表项右键子菜单",e.selection="选中项菜单",e.selectionSub="选中项子菜单",e.dirContext="当前目录右键菜单",e.dirContextSub="当前目录右键子菜单",e))($i||{}),ms=(e=>(e[e.after=0]="after",e[e.before=1]="before",e))(ms||{}),st=(e=>(e.basic="basic_config",e.anxia="anxia_config",e.clouddrive="clouddrive_configs",e.list="list_config",e.enabledCustomUrlsForSearch="enabled_custom_urls_for_search",e.enabledCustomUrlsForPlay="enabled_custom_urls_for_play",e.menuCustomUrlsForSearch="menu_custom_urls_for_search",e.menuCustomUrlsForPlay="menu_custom_urls_for_play",e.menu="ce_menu_config",e.hiddenOfficialMenuKeys="hidden_official_menu_keys",e.offline="offlineExporterConfig",e.search="search_config",e.tools="tools_config",e.cleanerConfig="cleanerConfig",e.cleanerSuffixGroups="suffixGroups",e.cleanerKeywordGroups="keywordGroups",e))(st||{});const sa=Object.values(st),Tc=async(e,t)=>ho(e,t),Nm=async(e,t)=>ea(e,t),Lc=async e=>Em(e),Bm=async()=>{for(const e of sa)await Lc(e)},Oc=async()=>{const e={};for(const t of sa)e[t]=await Tc(t,{});return e};async function Fm(){const e=await Oc(),t={name:"115不大助手",version:"0.6.32",author:{name:"生瓜太保",email:"[email protected]"},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"};e._meta={name:t.name,version:t.version,time:new Date().toLocaleString(),browser:navigator.userAgent},e._schema="pan115_enhancer_configs";const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([JSON.stringify(e,null,2)],{type:"application/json"})),n.download=`${t.name}-v${t.version}-配置.json`,n.click()}async function Um(){return new Promise((e,t)=>{const n=document.createElement("input");n.type="file",n.accept="application/json",n.oncancel=()=>{t("取消选择文件!")},n.onchange=async()=>{const s=n.files&&n.files[0];if(!s){t("未选择文件!");return}const i=await new Promise((r,a)=>{const l=new FileReader;l.onload=()=>{try{r(JSON.parse(l.result))}catch(u){a(u)}},l.onerror=()=>{a(l.error)},l.readAsText(s)});if(i._schema!=="pan115_enhancer_configs"){t("这不是一个脚本配置文件!");return}const o=[];for(const r of sa)o.push(r),i[r]&&await et.set(r,i[r]);e({data:i,importedKeys:o})},n.click()})}const et={get:Tc,set:Nm,remove:Lc,clear:Bm,getAll:Oc};function jm(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 Dc(e="",t=""){return e+Date.now().toString()+Math.random().toString(36).substring(5)+t}async function Mc(e,t=!1){try{return await navigator.clipboard.writeText(e),!0}catch(n){return console.warn("[copy]",n),t?(prompt("请复制内容:",e),!0):!1}}function Rc(e,t="NFD"){return e.normalize(t)}const Nc=st.clouddrive;var Bc=(e=>(e.windows="windows",e.macos="macos",e.linux="linux",e.android="android",e))(Bc||{});function ia(e){return{active:!1,url:"http://localhost:19798",root:"/115",memo:"",platform:void 0,...e}}async function Fc(){const e=[ia()],t=await et.get(Nc,e);return t||e}async function Uc(e){e.some(t=>t.active)||(e[0].active=!0),await et.set(Nc,e)}async function Fs(){return(await Fc()).find(t=>t.active)||ia()}var wo=(e=>(e.play="play",e.download="download",e))(wo||{});function jc(e){return e.startsWith("file://")}async function Us(e,t,n="play"){e.platform==="macos"&&(t=Rc(t,"NFD"));let{url:s,root:i}=e;if(!s)throw new Error("未设置CloudDrive地址!");(s.startsWith("/")||s.startsWith("\\"))&&(s=`file:///${s}`),jc(s);const o=/^https?:\/\//.test(s);if(o&&!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 l="";return s=s.replace(/\/+$/,""),o?l=`${s}/static/${s.replace("://","/")}/${a}/${encodeURIComponent(r)}`:l=`${s}${r}`,console.log("[Cloud115 Enhancer] buildCloudDriveUrl",l),l}async function oa(e,t){let{url:n,root:s}=e;if(!n)throw new Error("未设置CloudDrive地址!");return(n.startsWith("/")||n.startsWith("\\"))&&(n=`file:///${n}`),jc(n)?await Us(e,t,"play"):await Us(e,t,"play")+".clfsplaylist.m3u"}async function Hm(e,t){let{url:n}=e;if(!n)throw new Error("未设置CloudDrive地址!");return n.startsWith("http")||(n=`http://${n}`),n=n.replace(/\/+$/,""),t=e.root.replace(/\/+$/,"")+t,t=t.replace(/^(\/+)?/g,"/"),e.platform==="macos"&&(t=Rc(t,"NFD")),`${n}/#${t}?a=1`}var Bt=(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))(Bt||{});const qm={[-1]:"失败",[0]:"违规",[1]:"下载中",[2]:"成功"};var Ft=(e=>(e.all="all",e.failed="failed",e.success="success",e.magnet="magnet",e.magnetEd2k="magnetEd2k",e))(Ft||{}),ra=(e=>(e[e.true=1]="true",e[e.false=0]="false",e))(ra||{}),mt=(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[e.file=99]="file",e))(mt||{}),rt=(e=>(e.all="全部",e.video="视频",e.audio="音频",e.image="图片",e.doc="文档",e.app="应用",e.archive="压缩包",e.file="仅文件",e))(rt||{}),Hc=(e=>(e.userPtime="user_ptime",e.fileName="file_name",e.fileSize="file_size",e.fileType="file_type",e))(Hc||{});function zm(e){return{offset:0,limit:1150,aid:1,cid:"",format:"json",o:"user_ptime",asc:0,search_value:"",...e}}function En(e){return{aid:1,cid:"",o:"user_ptime",asc:0,offset:0,show_dir:1,limit:115,natsort:0,format:"json",...e}}var aa=(e=>(e[e.normal=0]="normal",e[e.violation=1]="violation",e[e.auditing=2]="auditing",e))(aa||{});function qc(e,t){return function(){return e.apply(t,arguments)}}const{toString:zc}=Object.prototype,{getPrototypeOf:la}=Object,ca=(e=>t=>{const n=zc.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kn=e=>(e=e.toLowerCase(),t=>ca(t)===e),bo=e=>t=>typeof t===e,{isArray:js}=Array,Ei=bo("undefined");function Vm(e){return e!==null&&!Ei(e)&&e.constructor!==null&&!Ei(e.constructor)&&zn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Vc=kn("ArrayBuffer");function Wm(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Vc(e.buffer),t}const Km=bo("string"),zn=bo("function"),Wc=bo("number"),ua=e=>e!==null&&typeof e=="object",Gm=e=>e===!0||e===!1,_o=e=>{if(ca(e)!=="object")return!1;const t=la(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Ym=kn("Date"),Jm=kn("File"),Qm=kn("Blob"),Xm=kn("FileList"),Zm=e=>ua(e)&&zn(e.pipe),eg=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||zc.call(e)===t||zn(e.toString)&&e.toString()===t)},tg=kn("URLSearchParams"),ng=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ki(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,i;if(typeof e!="object"&&(e=[e]),js(e))for(s=0,i=e.length;s<i;s++)t.call(null,e[s],s,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),r=o.length;let a;for(s=0;s<r;s++)a=o[s],t.call(null,e[a],a,e)}}function Kc(e,t){t=t.toLowerCase();const n=Object.keys(e);let s=n.length,i;for(;s-- >0;)if(i=n[s],t===i.toLowerCase())return i;return null}const Gc=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Yc=e=>!Ei(e)&&e!==Gc;function da(){const{caseless:e}=Yc(this)&&this||{},t={},n=(s,i)=>{const o=e&&Kc(t,i)||i;_o(t[o])&&_o(s)?t[o]=da(t[o],s):_o(s)?t[o]=da({},s):js(s)?t[o]=s.slice():t[o]=s};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&ki(arguments[s],n);return t}const sg=(e,t,n,{allOwnKeys:s}={})=>(ki(t,(i,o)=>{n&&zn(i)?e[o]=qc(i,n):e[o]=i},{allOwnKeys:s}),e),ig=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),og=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},rg=(e,t,n,s)=>{let i,o,r;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)r=i[o],(!s||s(r,e,t))&&!a[r]&&(t[r]=e[r],a[r]=!0);e=n!==!1&&la(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ag=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},lg=e=>{if(!e)return null;if(js(e))return e;let t=e.length;if(!Wc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},cg=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&la(Uint8Array)),ug=(e,t)=>{const s=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=s.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},dg=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},fg=kn("HTMLFormElement"),pg=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,i){return s.toUpperCase()+i}),Jc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),hg=kn("RegExp"),Qc=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};ki(n,(i,o)=>{t(i,o,e)!==!1&&(s[o]=i)}),Object.defineProperties(e,s)},mg=e=>{Qc(e,(t,n)=>{if(zn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(!!zn(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},gg=(e,t)=>{const n={},s=i=>{i.forEach(o=>{n[o]=!0})};return js(e)?s(e):s(String(e).split(t)),n},yg=()=>{},wg=(e,t)=>(e=+e,Number.isFinite(e)?e:t),fa="abcdefghijklmnopqrstuvwxyz",Xc="0123456789",Zc={DIGIT:Xc,ALPHA:fa,ALPHA_DIGIT:fa+fa.toUpperCase()+Xc},bg=(e=16,t=Zc.ALPHA_DIGIT)=>{let n="";const{length:s}=t;for(;e--;)n+=t[Math.random()*s|0];return n};function _g(e){return!!(e&&zn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const K={isArray:js,isArrayBuffer:Vc,isBuffer:Vm,isFormData:eg,isArrayBufferView:Wm,isString:Km,isNumber:Wc,isBoolean:Gm,isObject:ua,isPlainObject:_o,isUndefined:Ei,isDate:Ym,isFile:Jm,isBlob:Qm,isRegExp:hg,isFunction:zn,isStream:Zm,isURLSearchParams:tg,isTypedArray:cg,isFileList:Xm,forEach:ki,merge:da,extend:sg,trim:ng,stripBOM:ig,inherits:og,toFlatObject:rg,kindOf:ca,kindOfTest:kn,endsWith:ag,toArray:lg,forEachEntry:ug,matchAll:dg,isHTMLForm:fg,hasOwnProperty:Jc,hasOwnProp:Jc,reduceDescriptors:Qc,freezeMethods:mg,toObjectSet:gg,toCamelCase:pg,noop:yg,toFiniteNumber:wg,findKey:Kc,global:Gc,isContextDefined:Yc,ALPHABET:Zc,generateString:bg,isSpecCompliantForm:_g,toJSONObject:e=>{const t=new Array(10),n=(s,i)=>{if(ua(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[i]=s;const o=js(s)?[]:{};return ki(s,(r,a)=>{const l=n(r,i+1);!Ei(l)&&(o[a]=l)}),t[i]=void 0,o}}return s};return n(e,0)}};function qe(e,t,n,s,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),s&&(this.request=s),i&&(this.response=i)}K.inherits(qe,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 eu=qe.prototype,tu={};["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=>{tu[e]={value:e}}),Object.defineProperties(qe,tu),Object.defineProperty(eu,"isAxiosError",{value:!0}),qe.from=(e,t,n,s,i,o)=>{const r=Object.create(eu);return K.toFlatObject(e,r,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),qe.call(r,e.message,t,n,s,i),r.cause=e,r.name=e.name,o&&Object.assign(r,o),r};const vg=null;function pa(e){return K.isPlainObject(e)||K.isArray(e)}function nu(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function su(e,t,n){return e?e.concat(t).map(function(i,o){return i=nu(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function xg(e){return K.isArray(e)&&!e.some(pa)}const Cg=K.toFlatObject(K,{},null,function(t){return/^is[A-Z]/.test(t)});function vo(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,T){return!K.isUndefined(T[E])});const s=n.metaTokens,i=n.visitor||f,o=n.dots,r=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(i))throw new TypeError("visitor must be a function");function u(b){if(b===null)return"";if(K.isDate(b))return b.toISOString();if(!l&&K.isBlob(b))throw new qe("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(b)||K.isTypedArray(b)?l&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,E,T){let D=b;if(b&&!T&&typeof b=="object"){if(K.endsWith(E,"{}"))E=s?E:E.slice(0,-2),b=JSON.stringify(b);else if(K.isArray(b)&&xg(b)||(K.isFileList(b)||K.endsWith(E,"[]"))&&(D=K.toArray(b)))return E=nu(E),D.forEach(function(P,V){!(K.isUndefined(P)||P===null)&&t.append(r===!0?su([E],V,o):r===null?E:E+"[]",u(P))}),!1}return pa(b)?!0:(t.append(su(T,E,o),u(b)),!1)}const h=[],y=Object.assign(Cg,{defaultVisitor:f,convertValue:u,isVisitable:pa});function _(b,E){if(!K.isUndefined(b)){if(h.indexOf(b)!==-1)throw Error("Circular reference detected in "+E.join("."));h.push(b),K.forEach(b,function(D,I){(!(K.isUndefined(D)||D===null)&&i.call(t,D,K.isString(I)?I.trim():I,E,y))===!0&&_(D,E?E.concat(I):[I])}),h.pop()}}if(!K.isObject(e))throw new TypeError("data must be an object");return _(e),t}function iu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function ha(e,t){this._pairs=[],e&&vo(e,this,t)}const ou=ha.prototype;ou.append=function(t,n){this._pairs.push([t,n])},ou.toString=function(t){const n=t?function(s){return t.call(this,s,iu)}:iu;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function $g(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ru(e,t,n){if(!t)return e;const s=n&&n.encode||$g,i=n&&n.serialize;let o;if(i?o=i(t,n):o=K.isURLSearchParams(t)?t.toString():new ha(t,n).toString(s),o){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Eg{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.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(s){s!==null&&t(s)})}}const au=Eg,lu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kg=typeof URLSearchParams<"u"?URLSearchParams:ha,Sg=typeof FormData<"u"?FormData:null,Ag=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Pg=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),gn={isBrowser:!0,classes:{URLSearchParams:kg,FormData:Sg,Blob},isStandardBrowserEnv:Ag,isStandardBrowserWebWorkerEnv:Pg,protocols:["http","https","file","blob","url","data"]};function Ig(e,t){return vo(e,new gn.classes.URLSearchParams,Object.assign({visitor:function(n,s,i,o){return gn.isNode&&K.isBuffer(n)?(this.append(s,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Tg(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Lg(e){const t={},n=Object.keys(e);let s;const i=n.length;let o;for(s=0;s<i;s++)o=n[s],t[o]=e[o];return t}function cu(e){function t(n,s,i,o){let r=n[o++];const a=Number.isFinite(+r),l=o>=n.length;return r=!r&&K.isArray(i)?i.length:r,l?(K.hasOwnProp(i,r)?i[r]=[i[r],s]:i[r]=s,!a):((!i[r]||!K.isObject(i[r]))&&(i[r]=[]),t(n,s,i[r],o)&&K.isArray(i[r])&&(i[r]=Lg(i[r])),!a)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,(s,i)=>{t(Tg(s),i,n,0)}),n}return null}const Og={"Content-Type":void 0};function Dg(e,t,n){if(K.isString(e))try{return(t||JSON.parse)(e),K.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const xo={transitional:lu,adapter:["xhr","http"],transformRequest:[function(t,n){const s=n.getContentType()||"",i=s.indexOf("application/json")>-1,o=K.isObject(t);if(o&&K.isHTMLForm(t)&&(t=new FormData(t)),K.isFormData(t))return i&&i?JSON.stringify(cu(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(o){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Ig(t,this.formSerializer).toString();if((a=K.isFileList(t))||s.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return vo(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Dg(t)):t}],transformResponse:[function(t){const n=this.transitional||xo.transitional,s=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&K.isString(t)&&(s&&!this.responseType||i)){const r=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(r)throw a.name==="SyntaxError"?qe.from(a,qe.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:gn.classes.FormData,Blob:gn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};K.forEach(["delete","get","head"],function(t){xo.headers[t]={}}),K.forEach(["post","put","patch"],function(t){xo.headers[t]=K.merge(Og)});const ma=xo,Mg=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"]),Rg=e=>{const t={};let n,s,i;return e&&e.split(`
`).forEach(function(r){i=r.indexOf(":"),n=r.substring(0,i).trim().toLowerCase(),s=r.substring(i+1).trim(),!(!n||t[n]&&Mg[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},uu=Symbol("internals");function Si(e){return e&&String(e).trim().toLowerCase()}function Co(e){return e===!1||e==null?e:K.isArray(e)?e.map(Co):String(e)}function Ng(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}function Bg(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function ga(e,t,n,s,i){if(K.isFunction(s))return s.call(this,t,n);if(i&&(t=n),!!K.isString(t)){if(K.isString(s))return t.indexOf(s)!==-1;if(K.isRegExp(s))return s.test(t)}}function Fg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function Ug(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(i,o,r){return this[s].call(this,t,i,o,r)},configurable:!0})})}class $o{constructor(t){t&&this.set(t)}set(t,n,s){const i=this;function o(a,l,u){const f=Si(l);if(!f)throw new Error("header name must be a non-empty string");const h=K.findKey(i,f);(!h||i[h]===void 0||u===!0||u===void 0&&i[h]!==!1)&&(i[h||l]=Co(a))}const r=(a,l)=>K.forEach(a,(u,f)=>o(u,f,l));return K.isPlainObject(t)||t instanceof this.constructor?r(t,n):K.isString(t)&&(t=t.trim())&&!Bg(t)?r(Rg(t),n):t!=null&&o(n,t,s),this}get(t,n){if(t=Si(t),t){const s=K.findKey(this,t);if(s){const i=this[s];if(!n)return i;if(n===!0)return Ng(i);if(K.isFunction(n))return n.call(this,i,s);if(K.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Si(t),t){const s=K.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||ga(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let i=!1;function o(r){if(r=Si(r),r){const a=K.findKey(s,r);a&&(!n||ga(s,s[a],a,n))&&(delete s[a],i=!0)}}return K.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let s=n.length,i=!1;for(;s--;){const o=n[s];(!t||ga(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,s={};return K.forEach(this,(i,o)=>{const r=K.findKey(s,o);if(r){n[r]=Co(i),delete n[o];return}const a=t?Fg(o):String(o).trim();a!==o&&delete n[o],n[a]=Co(i),s[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return K.forEach(this,(s,i)=>{s!=null&&s!==!1&&(n[i]=t&&K.isArray(s)?s.join(", "):s)}),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 s=new this(t);return n.forEach(i=>s.set(i)),s}static accessor(t){const s=(this[uu]=this[uu]={accessors:{}}).accessors,i=this.prototype;function o(r){const a=Si(r);s[a]||(Ug(i,r),s[a]=!0)}return K.isArray(t)?t.forEach(o):o(t),this}}$o.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.freezeMethods($o.prototype),K.freezeMethods($o);const Sn=$o;function ya(e,t){const n=this||ma,s=t||n,i=Sn.from(s.headers);let o=s.data;return K.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function du(e){return!!(e&&e.__CANCEL__)}function Ai(e,t,n){qe.call(this,e==null?"canceled":e,qe.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(Ai,qe,{__CANCEL__:!0});function jg(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new qe("Request failed with status code "+n.status,[qe.ERR_BAD_REQUEST,qe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Hg=gn.isStandardBrowserEnv?function(){return{write:function(n,s,i,o,r,a){const l=[];l.push(n+"="+encodeURIComponent(s)),K.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),K.isString(o)&&l.push("path="+o),K.isString(r)&&l.push("domain="+r),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const s=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return s?decodeURIComponent(s[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function qg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function zg(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function fu(e,t){return e&&!qg(t)?zg(e,t):t}const Vg=gn.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let s;function i(o){let r=o;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 s=i(window.location.href),function(r){const a=K.isString(r)?i(r):r;return a.protocol===s.protocol&&a.host===s.host}}():function(){return function(){return!0}}();function Wg(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Kg(e,t){e=e||10;const n=new Array(e),s=new Array(e);let i=0,o=0,r;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=s[o];r||(r=u),n[i]=l,s[i]=u;let h=o,y=0;for(;h!==i;)y+=n[h++],h=h%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-r<t)return;const _=f&&u-f;return _?Math.round(y*1e3/_):void 0}}function pu(e,t){let n=0;const s=Kg(50,250);return i=>{const o=i.loaded,r=i.lengthComputable?i.total:void 0,a=o-n,l=s(a),u=o<=r;n=o;const f={loaded:o,total:r,progress:r?o/r:void 0,bytes:a,rate:l||void 0,estimated:l&&r&&u?(r-o)/l:void 0,event:i};f[t?"download":"upload"]=!0,e(f)}}const Eo={http:vg,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,s){let i=e.data;const o=Sn.from(e.headers).normalize(),r=e.responseType;let a;function l(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}K.isFormData(i)&&(gn.isStandardBrowserEnv||gn.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let u=new XMLHttpRequest;if(e.auth){const _=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(_+":"+b))}const f=fu(e.baseURL,e.url);u.open(e.method.toUpperCase(),ru(f,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function h(){if(!u)return;const _=Sn.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!r||r==="text"||r==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:_,config:e,request:u};jg(function(D){n(D),l()},function(D){s(D),l()},E),u=null}if("onloadend"in u?u.onloadend=h:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(h)},u.onabort=function(){!u||(s(new qe("Request aborted",qe.ECONNABORTED,e,u)),u=null)},u.onerror=function(){s(new qe("Network Error",qe.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let b=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const E=e.transitional||lu;e.timeoutErrorMessage&&(b=e.timeoutErrorMessage),s(new qe(b,E.clarifyTimeoutError?qe.ETIMEDOUT:qe.ECONNABORTED,e,u)),u=null},gn.isStandardBrowserEnv){const _=(e.withCredentials||Vg(f))&&e.xsrfCookieName&&Hg.read(e.xsrfCookieName);_&&o.set(e.xsrfHeaderName,_)}i===void 0&&o.setContentType(null),"setRequestHeader"in u&&K.forEach(o.toJSON(),function(b,E){u.setRequestHeader(E,b)}),K.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),r&&r!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",pu(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",pu(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=_=>{!u||(s(!_||_.type?new Ai(null,e,u):_),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const y=Wg(f);if(y&&gn.protocols.indexOf(y)===-1){s(new qe("Unsupported protocol "+y+":",qe.ERR_BAD_REQUEST,e));return}u.send(i||null)})}};K.forEach(Eo,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Gg={getAdapter:e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let n,s;for(let i=0;i<t&&(n=e[i],!(s=K.isString(n)?Eo[n.toLowerCase()]:n));i++);if(!s)throw s===!1?new qe(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(K.hasOwnProp(Eo,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!K.isFunction(s))throw new TypeError("adapter is not a function");return s},adapters:Eo};function wa(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ai(null,e)}function hu(e){return wa(e),e.headers=Sn.from(e.headers),e.data=ya.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Gg.getAdapter(e.adapter||ma.adapter)(e).then(function(s){return wa(e),s.data=ya.call(e,e.transformResponse,s),s.headers=Sn.from(s.headers),s},function(s){return du(s)||(wa(e),s&&s.response&&(s.response.data=ya.call(e,e.transformResponse,s.response),s.response.headers=Sn.from(s.response.headers))),Promise.reject(s)})}const mu=e=>e instanceof Sn?e.toJSON():e;function Hs(e,t){t=t||{};const n={};function s(u,f,h){return K.isPlainObject(u)&&K.isPlainObject(f)?K.merge.call({caseless:h},u,f):K.isPlainObject(f)?K.merge({},f):K.isArray(f)?f.slice():f}function i(u,f,h){if(K.isUndefined(f)){if(!K.isUndefined(u))return s(void 0,u,h)}else return s(u,f,h)}function o(u,f){if(!K.isUndefined(f))return s(void 0,f)}function r(u,f){if(K.isUndefined(f)){if(!K.isUndefined(u))return s(void 0,u)}else return s(void 0,f)}function a(u,f,h){if(h in t)return s(u,f);if(h in e)return s(void 0,u)}const l={url:o,method:o,data:o,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:(u,f)=>i(mu(u),mu(f),!0)};return K.forEach(Object.keys(e).concat(Object.keys(t)),function(f){const h=l[f]||i,y=h(e[f],t[f],f);K.isUndefined(y)&&h!==a||(n[f]=y)}),n}const gu="1.3.3",ba={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ba[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const yu={};ba.transitional=function(t,n,s){function i(o,r){return"[Axios v"+gu+"] Transitional option '"+o+"'"+r+(s?". "+s:"")}return(o,r,a)=>{if(t===!1)throw new qe(i(r," has been removed"+(n?" in "+n:"")),qe.ERR_DEPRECATED);return n&&!yu[r]&&(yu[r]=!0,console.warn(i(r," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,r,a):!0}};function Yg(e,t,n){if(typeof e!="object")throw new qe("options must be an object",qe.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let i=s.length;for(;i-- >0;){const o=s[i],r=t[o];if(r){const a=e[o],l=a===void 0||r(a,o,e);if(l!==!0)throw new qe("option "+o+" must be "+l,qe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new qe("Unknown option "+o,qe.ERR_BAD_OPTION)}}const _a={assertOptions:Yg,validators:ba},Vn=_a.validators;class ko{constructor(t){this.defaults=t,this.interceptors={request:new au,response:new au}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hs(this.defaults,n);const{transitional:s,paramsSerializer:i,headers:o}=n;s!==void 0&&_a.assertOptions(s,{silentJSONParsing:Vn.transitional(Vn.boolean),forcedJSONParsing:Vn.transitional(Vn.boolean),clarifyTimeoutError:Vn.transitional(Vn.boolean)},!1),i!==void 0&&_a.assertOptions(i,{encode:Vn.function,serialize:Vn.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r;r=o&&K.merge(o.common,o[n.method]),r&&K.forEach(["delete","get","head","post","put","patch","common"],b=>{delete o[b]}),n.headers=Sn.concat(r,o);const a=[];let l=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(l=l&&E.synchronous,a.unshift(E.fulfilled,E.rejected))});const u=[];this.interceptors.response.forEach(function(E){u.push(E.fulfilled,E.rejected)});let f,h=0,y;if(!l){const b=[hu.bind(this),void 0];for(b.unshift.apply(b,a),b.push.apply(b,u),y=b.length,f=Promise.resolve(n);h<y;)f=f.then(b[h++],b[h++]);return f}y=a.length;let _=n;for(h=0;h<y;){const b=a[h++],E=a[h++];try{_=b(_)}catch(T){E.call(this,T);break}}try{f=hu.call(this,_)}catch(b){return Promise.reject(b)}for(h=0,y=u.length;h<y;)f=f.then(u[h++],u[h++]);return f}getUri(t){t=Hs(this.defaults,t);const n=fu(t.baseURL,t.url);return ru(n,t.params,t.paramsSerializer)}}K.forEach(["delete","get","head","options"],function(t){ko.prototype[t]=function(n,s){return this.request(Hs(s||{},{method:t,url:n,data:(s||{}).data}))}}),K.forEach(["post","put","patch"],function(t){function n(s){return function(o,r,a){return this.request(Hs(a||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}ko.prototype[t]=n(),ko.prototype[t+"Form"]=n(!0)});const So=ko;class va{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const s=this;this.promise.then(i=>{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](i);s._listeners=null}),this.promise.then=i=>{let o;const r=new Promise(a=>{s.subscribe(a),o=a}).then(i);return r.cancel=function(){s.unsubscribe(o)},r},t(function(o,r,a){s.reason||(s.reason=new Ai(o,r,a),n(s.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 va(function(i){t=i}),cancel:t}}}const Jg=va;function Qg(e){return function(n){return e.apply(null,n)}}function Xg(e){return K.isObject(e)&&e.isAxiosError===!0}const xa={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(xa).forEach(([e,t])=>{xa[t]=e});const Zg=xa;function wu(e){const t=new So(e),n=qc(So.prototype.request,t);return K.extend(n,So.prototype,t,{allOwnKeys:!0}),K.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return wu(Hs(e,i))},n}const pt=wu(ma);pt.Axios=So,pt.CanceledError=Ai,pt.CancelToken=Jg,pt.isCancel=du,pt.VERSION=gu,pt.toFormData=vo,pt.AxiosError=qe,pt.Cancel=pt.CanceledError,pt.all=function(t){return Promise.all(t)},pt.spread=Qg,pt.isAxiosError=Xg,pt.mergeConfig=Hs,pt.AxiosHeaders=Sn,pt.formToJSON=e=>cu(K.isHTMLForm(e)?new FormData(e):e),pt.HttpStatusCode=Zg,pt.default=pt;const bu=pt,{Axios:FM,AxiosError:ey,CanceledError:UM,isCancel:jM,CancelToken:HM,VERSION:qM,all:zM,Cancel:VM,isAxiosError:WM,spread:KM,toFormData:ty,AxiosHeaders:GM,HttpStatusCode:YM,formToJSON:JM,mergeConfig:QM}=bu;class _u extends Error{}class Ca extends _u{constructor(){super(...arguments);be(this,"message","搜索失败!")}}class vu extends Ca{constructor(){super(...arguments);be(this,"message","搜索请求响应内容为空!")}}class $a extends _u{constructor(){super(...arguments);be(this,"message","目录不存在!")}toString(){return this.message}}var xu=(e=>(e[e.exist=20004]="exist",e))(xu||{});const ny={[10013]:"超出任务大小限制",[10018]:"审核中...",[10016]:"文件内含违规内容"};class ut{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=ut.hexChars,s=ut.hexOut;let i,o,r,a;for(a=0;a<4;a+=1)for(o=a*8,i=t[a],r=0;r<8;r+=2)s[o+1+r]=n.charAt(i&15),i>>>=4,s[o+0+r]=n.charAt(i&15),i>>>=4;return s.join("")}static _md5cycle(t,n){let s=t[0],i=t[1],o=t[2],r=t[3];s+=(i&o|~i&r)+n[0]-680876936|0,s=(s<<7|s>>>25)+i|0,r+=(s&i|~s&o)+n[1]-389564586|0,r=(r<<12|r>>>20)+s|0,o+=(r&s|~r&i)+n[2]+606105819|0,o=(o<<17|o>>>15)+r|0,i+=(o&r|~o&s)+n[3]-1044525330|0,i=(i<<22|i>>>10)+o|0,s+=(i&o|~i&r)+n[4]-176418897|0,s=(s<<7|s>>>25)+i|0,r+=(s&i|~s&o)+n[5]+1200080426|0,r=(r<<12|r>>>20)+s|0,o+=(r&s|~r&i)+n[6]-1473231341|0,o=(o<<17|o>>>15)+r|0,i+=(o&r|~o&s)+n[7]-45705983|0,i=(i<<22|i>>>10)+o|0,s+=(i&o|~i&r)+n[8]+1770035416|0,s=(s<<7|s>>>25)+i|0,r+=(s&i|~s&o)+n[9]-1958414417|0,r=(r<<12|r>>>20)+s|0,o+=(r&s|~r&i)+n[10]-42063|0,o=(o<<17|o>>>15)+r|0,i+=(o&r|~o&s)+n[11]-1990404162|0,i=(i<<22|i>>>10)+o|0,s+=(i&o|~i&r)+n[12]+1804603682|0,s=(s<<7|s>>>25)+i|0,r+=(s&i|~s&o)+n[13]-40341101|0,r=(r<<12|r>>>20)+s|0,o+=(r&s|~r&i)+n[14]-1502002290|0,o=(o<<17|o>>>15)+r|0,i+=(o&r|~o&s)+n[15]+1236535329|0,i=(i<<22|i>>>10)+o|0,s+=(i&r|o&~r)+n[1]-165796510|0,s=(s<<5|s>>>27)+i|0,r+=(s&o|i&~o)+n[6]-1069501632|0,r=(r<<9|r>>>23)+s|0,o+=(r&i|s&~i)+n[11]+643717713|0,o=(o<<14|o>>>18)+r|0,i+=(o&s|r&~s)+n[0]-373897302|0,i=(i<<20|i>>>12)+o|0,s+=(i&r|o&~r)+n[5]-701558691|0,s=(s<<5|s>>>27)+i|0,r+=(s&o|i&~o)+n[10]+38016083|0,r=(r<<9|r>>>23)+s|0,o+=(r&i|s&~i)+n[15]-660478335|0,o=(o<<14|o>>>18)+r|0,i+=(o&s|r&~s)+n[4]-405537848|0,i=(i<<20|i>>>12)+o|0,s+=(i&r|o&~r)+n[9]+568446438|0,s=(s<<5|s>>>27)+i|0,r+=(s&o|i&~o)+n[14]-1019803690|0,r=(r<<9|r>>>23)+s|0,o+=(r&i|s&~i)+n[3]-187363961|0,o=(o<<14|o>>>18)+r|0,i+=(o&s|r&~s)+n[8]+1163531501|0,i=(i<<20|i>>>12)+o|0,s+=(i&r|o&~r)+n[13]-1444681467|0,s=(s<<5|s>>>27)+i|0,r+=(s&o|i&~o)+n[2]-51403784|0,r=(r<<9|r>>>23)+s|0,o+=(r&i|s&~i)+n[7]+1735328473|0,o=(o<<14|o>>>18)+r|0,i+=(o&s|r&~s)+n[12]-1926607734|0,i=(i<<20|i>>>12)+o|0,s+=(i^o^r)+n[5]-378558|0,s=(s<<4|s>>>28)+i|0,r+=(s^i^o)+n[8]-2022574463|0,r=(r<<11|r>>>21)+s|0,o+=(r^s^i)+n[11]+1839030562|0,o=(o<<16|o>>>16)+r|0,i+=(o^r^s)+n[14]-35309556|0,i=(i<<23|i>>>9)+o|0,s+=(i^o^r)+n[1]-1530992060|0,s=(s<<4|s>>>28)+i|0,r+=(s^i^o)+n[4]+1272893353|0,r=(r<<11|r>>>21)+s|0,o+=(r^s^i)+n[7]-155497632|0,o=(o<<16|o>>>16)+r|0,i+=(o^r^s)+n[10]-1094730640|0,i=(i<<23|i>>>9)+o|0,s+=(i^o^r)+n[13]+681279174|0,s=(s<<4|s>>>28)+i|0,r+=(s^i^o)+n[0]-358537222|0,r=(r<<11|r>>>21)+s|0,o+=(r^s^i)+n[3]-722521979|0,o=(o<<16|o>>>16)+r|0,i+=(o^r^s)+n[6]+76029189|0,i=(i<<23|i>>>9)+o|0,s+=(i^o^r)+n[9]-640364487|0,s=(s<<4|s>>>28)+i|0,r+=(s^i^o)+n[12]-421815835|0,r=(r<<11|r>>>21)+s|0,o+=(r^s^i)+n[15]+530742520|0,o=(o<<16|o>>>16)+r|0,i+=(o^r^s)+n[2]-995338651|0,i=(i<<23|i>>>9)+o|0,s+=(o^(i|~r))+n[0]-198630844|0,s=(s<<6|s>>>26)+i|0,r+=(i^(s|~o))+n[7]+1126891415|0,r=(r<<10|r>>>22)+s|0,o+=(s^(r|~i))+n[14]-1416354905|0,o=(o<<15|o>>>17)+r|0,i+=(r^(o|~s))+n[5]-57434055|0,i=(i<<21|i>>>11)+o|0,s+=(o^(i|~r))+n[12]+1700485571|0,s=(s<<6|s>>>26)+i|0,r+=(i^(s|~o))+n[3]-1894986606|0,r=(r<<10|r>>>22)+s|0,o+=(s^(r|~i))+n[10]-1051523|0,o=(o<<15|o>>>17)+r|0,i+=(r^(o|~s))+n[1]-2054922799|0,i=(i<<21|i>>>11)+o|0,s+=(o^(i|~r))+n[8]+1873313359|0,s=(s<<6|s>>>26)+i|0,r+=(i^(s|~o))+n[15]-30611744|0,r=(r<<10|r>>>22)+s|0,o+=(s^(r|~i))+n[6]-1560198380|0,o=(o<<15|o>>>17)+r|0,i+=(r^(o|~s))+n[13]+1309151649|0,i=(i<<21|i>>>11)+o|0,s+=(o^(i|~r))+n[4]-145523070|0,s=(s<<6|s>>>26)+i|0,r+=(i^(s|~o))+n[11]-1120210379|0,r=(r<<10|r>>>22)+s|0,o+=(s^(r|~i))+n[2]+718787259|0,o=(o<<15|o>>>17)+r|0,i+=(r^(o|~s))+n[9]-343485551|0,i=(i<<21|i>>>11)+o|0,t[0]=s+t[0]|0,t[1]=i+t[1]|0,t[2]=o+t[2]|0,t[3]=r+t[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(ut.stateIdentity),this}appendStr(t){const n=this._buffer8,s=this._buffer32;let i=this._bufferLength,o,r;for(r=0;r<t.length;r+=1){if(o=t.charCodeAt(r),o<128)n[i++]=o;else if(o<2048)n[i++]=(o>>>6)+192,n[i++]=o&63|128;else if(o<55296||o>56319)n[i++]=(o>>>12)+224,n[i++]=o>>>6&63|128,n[i++]=o&63|128;else{if(o=(o-55296)*1024+(t.charCodeAt(++r)-56320)+65536,o>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");n[i++]=(o>>>18)+240,n[i++]=o>>>12&63|128,n[i++]=o>>>6&63|128,n[i++]=o&63|128}i>=64&&(this._dataLength+=64,ut._md5cycle(this._state,s),i-=64,s[0]=s[16])}return this._bufferLength=i,this}appendAsciiStr(t){const n=this._buffer8,s=this._buffer32;let i=this._bufferLength,o,r=0;for(;;){for(o=Math.min(t.length-r,64-i);o--;)n[i++]=t.charCodeAt(r++);if(i<64)break;this._dataLength+=64,ut._md5cycle(this._state,s),i=0}return this._bufferLength=i,this}appendByteArray(t){const n=this._buffer8,s=this._buffer32;let i=this._bufferLength,o,r=0;for(;;){for(o=Math.min(t.length-r,64-i);o--;)n[i++]=t[r++];if(i<64)break;this._dataLength+=64,ut._md5cycle(this._state,s),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,s=t.state,i=this._state;let o;for(this._dataLength=t.length,this._bufferLength=t.buflen,i[0]=s[0],i[1]=s[1],i[2]=s[2],i[3]=s[3],o=0;o<n.length;o+=1)this._buffer8[o]=n.charCodeAt(o)}end(t=!1){const n=this._bufferLength,s=this._buffer8,i=this._buffer32,o=(n>>2)+1;this._dataLength+=n;const r=this._dataLength*8;if(s[n]=128,s[n+1]=s[n+2]=s[n+3]=0,i.set(ut.buffer32Identity.subarray(o),o),n>55&&(ut._md5cycle(this._state,i),i.set(ut.buffer32Identity)),r<=4294967295)i[14]=r;else{const a=r.toString(16).match(/(.*?)(.{0,8})$/);if(a===null)return;const l=parseInt(a[2],16),u=parseInt(a[1],16)||0;i[14]=l,i[15]=u}return ut._md5cycle(this._state,i),t?this._state:ut._hex(this._state)}}if(ut.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),ut.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),ut.hexChars="0123456789abcdef",ut.hexOut=[],ut.onePassHasher=new ut,ut.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592")throw new Error("Md5 self test failed.");var Cu={exports:{}};(function(e){var t=function(n){var s=1e7,i=7,o=9007199254740992,r=b(o),a="0123456789abcdefghijklmnopqrstuvwxyz",l=typeof BigInt=="function";function u(m,w,x,k){return typeof m>"u"?u[0]:typeof w<"u"?+w==10&&!x?J(m):le(m,w,x,k):J(m)}function f(m,w){this.value=m,this.sign=w,this.isSmall=!1}f.prototype=Object.create(u.prototype);function h(m){this.value=m,this.sign=m<0,this.isSmall=!0}h.prototype=Object.create(u.prototype);function y(m){this.value=m}y.prototype=Object.create(u.prototype);function _(m){return-o<m&&m<o}function b(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 E(m){T(m);var w=m.length;if(w<4&&ee(m,r)<0)switch(w){case 0:return 0;case 1:return m[0];case 2:return m[0]+m[1]*s;default:return m[0]+(m[1]+m[2]*s)*s}return m}function T(m){for(var w=m.length;m[--w]===0;);m.length=w+1}function D(m){for(var w=new Array(m),x=-1;++x<m;)w[x]=0;return w}function I(m){return m>0?Math.floor(m):Math.ceil(m)}function P(m,w){var x=m.length,k=w.length,O=new Array(x),S=0,W=s,H,ie;for(ie=0;ie<k;ie++)H=m[ie]+w[ie]+S,S=H>=W?1:0,O[ie]=H-S*W;for(;ie<x;)H=m[ie]+S,S=H===W?1:0,O[ie++]=H-S*W;return S>0&&O.push(S),O}function V(m,w){return m.length>=w.length?P(m,w):P(w,m)}function ae(m,w){var x=m.length,k=new Array(x),O=s,S,W;for(W=0;W<x;W++)S=m[W]-O+w,w=Math.floor(S/O),k[W]=S-w*O,w+=1;for(;w>0;)k[W++]=w%O,w=Math.floor(w/O);return k}f.prototype.add=function(m){var w=J(m);if(this.sign!==w.sign)return this.subtract(w.negate());var x=this.value,k=w.value;return w.isSmall?new f(ae(x,Math.abs(k)),this.sign):new f(V(x,k),this.sign)},f.prototype.plus=f.prototype.add,h.prototype.add=function(m){var w=J(m),x=this.value;if(x<0!==w.sign)return this.subtract(w.negate());var k=w.value;if(w.isSmall){if(_(x+k))return new h(x+k);k=b(Math.abs(k))}return new f(ae(k,Math.abs(x)),x<0)},h.prototype.plus=h.prototype.add,y.prototype.add=function(m){return new y(this.value+J(m).value)},y.prototype.plus=y.prototype.add;function U(m,w){var x=m.length,k=w.length,O=new Array(x),S=0,W=s,H,ie;for(H=0;H<k;H++)ie=m[H]-S-w[H],ie<0?(ie+=W,S=1):S=0,O[H]=ie;for(H=k;H<x;H++){if(ie=m[H]-S,ie<0)ie+=W;else{O[H++]=ie;break}O[H]=ie}for(;H<x;H++)O[H]=m[H];return T(O),O}function X(m,w,x){var k;return ee(m,w)>=0?k=U(m,w):(k=U(w,m),x=!x),k=E(k),typeof k=="number"?(x&&(k=-k),new h(k)):new f(k,x)}function ue(m,w,x){var k=m.length,O=new Array(k),S=-w,W=s,H,ie;for(H=0;H<k;H++)ie=m[H]+S,S=Math.floor(ie/W),ie%=W,O[H]=ie<0?ie+W:ie;return O=E(O),typeof O=="number"?(x&&(O=-O),new h(O)):new f(O,x)}f.prototype.subtract=function(m){var w=J(m);if(this.sign!==w.sign)return this.add(w.negate());var x=this.value,k=w.value;return w.isSmall?ue(x,Math.abs(k),this.sign):X(x,k,this.sign)},f.prototype.minus=f.prototype.subtract,h.prototype.subtract=function(m){var w=J(m),x=this.value;if(x<0!==w.sign)return this.add(w.negate());var k=w.value;return w.isSmall?new h(x-k):ue(k,Math.abs(x),x>=0)},h.prototype.minus=h.prototype.subtract,y.prototype.subtract=function(m){return new y(this.value-J(m).value)},y.prototype.minus=y.prototype.subtract,f.prototype.negate=function(){return new f(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)},f.prototype.abs=function(){return new f(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 ye(m,w){var x=m.length,k=w.length,O=x+k,S=D(O),W=s,H,ie,ve,Oe,Ie;for(ve=0;ve<x;++ve){Oe=m[ve];for(var Ke=0;Ke<k;++Ke)Ie=w[Ke],H=Oe*Ie+S[ve+Ke],ie=Math.floor(H/W),S[ve+Ke]=H-ie*W,S[ve+Ke+1]+=ie}return T(S),S}function Le(m,w){var x=m.length,k=new Array(x),O=s,S=0,W,H;for(H=0;H<x;H++)W=m[H]*w+S,S=Math.floor(W/O),k[H]=W-S*O;for(;S>0;)k[H++]=S%O,S=Math.floor(S/O);return k}function ge(m,w){for(var x=[];w-- >0;)x.push(0);return x.concat(m)}function L(m,w){var x=Math.max(m.length,w.length);if(x<=30)return ye(m,w);x=Math.ceil(x/2);var k=m.slice(x),O=m.slice(0,x),S=w.slice(x),W=w.slice(0,x),H=L(O,W),ie=L(k,S),ve=L(V(O,k),V(W,S)),Oe=V(V(H,ge(U(U(ve,H),ie),x)),ge(ie,2*x));return T(Oe),Oe}function re(m,w){return-.012*m-.012*w+15e-6*m*w>0}f.prototype.multiply=function(m){var w=J(m),x=this.value,k=w.value,O=this.sign!==w.sign,S;if(w.isSmall){if(k===0)return u[0];if(k===1)return this;if(k===-1)return this.negate();if(S=Math.abs(k),S<s)return new f(Le(x,S),O);k=b(S)}return re(x.length,k.length)?new f(L(x,k),O):new f(ye(x,k),O)},f.prototype.times=f.prototype.multiply;function G(m,w,x){return m<s?new f(Le(w,m),x):new f(ye(w,b(m)),x)}h.prototype._multiplyBySmall=function(m){return _(m.value*this.value)?new h(m.value*this.value):G(Math.abs(m.value),b(Math.abs(this.value)),this.sign!==m.sign)},f.prototype._multiplyBySmall=function(m){return m.value===0?u[0]:m.value===1?this:m.value===-1?this.negate():G(Math.abs(m.value),this.value,this.sign!==m.sign)},h.prototype.multiply=function(m){return J(m)._multiplyBySmall(this)},h.prototype.times=h.prototype.multiply,y.prototype.multiply=function(m){return new y(this.value*J(m).value)},y.prototype.times=y.prototype.multiply;function Se(m){var w=m.length,x=D(w+w),k=s,O,S,W,H,ie;for(W=0;W<w;W++){H=m[W],S=0-H*H;for(var ve=W;ve<w;ve++)ie=m[ve],O=2*(H*ie)+x[W+ve]+S,S=Math.floor(O/k),x[W+ve]=O-S*k;x[W+w]=S}return T(x),x}f.prototype.square=function(){return new f(Se(this.value),!1)},h.prototype.square=function(){var m=this.value*this.value;return _(m)?new h(m):new f(Se(b(Math.abs(this.value))),!1)},y.prototype.square=function(m){return new y(this.value*this.value)};function xe(m,w){var x=m.length,k=w.length,O=s,S=D(w.length),W=w[k-1],H=Math.ceil(O/(2*W)),ie=Le(m,H),ve=Le(w,H),Oe,Ie,Ke,Mt,$t,ro,ao;for(ie.length<=x&&ie.push(0),ve.push(0),W=ve[k-1],Ie=x-k;Ie>=0;Ie--){for(Oe=O-1,ie[Ie+k]!==W&&(Oe=Math.floor((ie[Ie+k]*O+ie[Ie+k-1])/W)),Ke=0,Mt=0,ro=ve.length,$t=0;$t<ro;$t++)Ke+=Oe*ve[$t],ao=Math.floor(Ke/O),Mt+=ie[Ie+$t]-(Ke-ao*O),Ke=ao,Mt<0?(ie[Ie+$t]=Mt+O,Mt=-1):(ie[Ie+$t]=Mt,Mt=0);for(;Mt!==0;){for(Oe-=1,Ke=0,$t=0;$t<ro;$t++)Ke+=ie[Ie+$t]-O+ve[$t],Ke<0?(ie[Ie+$t]=Ke+O,Ke=0):(ie[Ie+$t]=Ke,Ke=1);Mt+=Ke}S[Ie]=Oe}return ie=M(ie,H)[0],[E(S),E(ie)]}function Re(m,w){for(var x=m.length,k=w.length,O=[],S=[],W=s,H,ie,ve,Oe,Ie;x;){if(S.unshift(m[--x]),T(S),ee(S,w)<0){O.push(0);continue}ie=S.length,ve=S[ie-1]*W+S[ie-2],Oe=w[k-1]*W+w[k-2],ie>k&&(ve=(ve+1)*W),H=Math.ceil(ve/Oe);do{if(Ie=Le(w,H),ee(Ie,S)<=0)break;H--}while(H);O.push(H),S=U(S,Ie)}return O.reverse(),[E(O),E(S)]}function M(m,w){var x=m.length,k=D(x),O=s,S,W,H,ie;for(H=0,S=x-1;S>=0;--S)ie=H*O+m[S],W=I(ie/w),H=ie-W*w,k[S]=W|0;return[k,H|0]}function se(m,w){var x,k=J(w);if(l)return[new y(m.value/k.value),new y(m.value%k.value)];var O=m.value,S=k.value,W;if(S===0)throw new Error("Cannot divide by zero");if(m.isSmall)return k.isSmall?[new h(I(O/S)),new h(O%S)]:[u[0],m];if(k.isSmall){if(S===1)return[m,u[0]];if(S==-1)return[m.negate(),u[0]];var H=Math.abs(S);if(H<s){x=M(O,H),W=E(x[0]);var ie=x[1];return m.sign&&(ie=-ie),typeof W=="number"?(m.sign!==k.sign&&(W=-W),[new h(W),new h(ie)]):[new f(W,m.sign!==k.sign),new h(ie)]}S=b(H)}var ve=ee(O,S);if(ve===-1)return[u[0],m];if(ve===0)return[u[m.sign===k.sign?1:-1],u[0]];O.length+S.length<=200?x=xe(O,S):x=Re(O,S),W=x[0];var Oe=m.sign!==k.sign,Ie=x[1],Ke=m.sign;return typeof W=="number"?(Oe&&(W=-W),W=new h(W)):W=new f(W,Oe),typeof Ie=="number"?(Ke&&(Ie=-Ie),Ie=new h(Ie)):Ie=new f(Ie,Ke),[W,Ie]}f.prototype.divmod=function(m){var w=se(this,m);return{quotient:w[0],remainder:w[1]}},y.prototype.divmod=h.prototype.divmod=f.prototype.divmod,f.prototype.divide=function(m){return se(this,m)[0]},y.prototype.over=y.prototype.divide=function(m){return new y(this.value/J(m).value)},h.prototype.over=h.prototype.divide=f.prototype.over=f.prototype.divide,f.prototype.mod=function(m){return se(this,m)[1]},y.prototype.mod=y.prototype.remainder=function(m){return new y(this.value%J(m).value)},h.prototype.remainder=h.prototype.mod=f.prototype.remainder=f.prototype.mod,f.prototype.pow=function(m){var w=J(m),x=this.value,k=w.value,O,S,W;if(k===0)return u[1];if(x===0)return u[0];if(x===1)return u[1];if(x===-1)return w.isEven()?u[1]:u[-1];if(w.sign)return u[0];if(!w.isSmall)throw new Error("The exponent "+w.toString()+" is too large.");if(this.isSmall&&_(O=Math.pow(x,k)))return new h(I(O));for(S=this,W=u[1];k&!0&&(W=W.times(S),--k),k!==0;)k/=2,S=S.square();return W},h.prototype.pow=f.prototype.pow,y.prototype.pow=function(m){var w=J(m),x=this.value,k=w.value,O=BigInt(0),S=BigInt(1),W=BigInt(2);if(k===O)return u[1];if(x===O)return u[0];if(x===S)return u[1];if(x===BigInt(-1))return w.isEven()?u[1]:u[-1];if(w.isNegative())return new y(O);for(var H=this,ie=u[1];(k&S)===S&&(ie=ie.times(H),--k),k!==O;)k/=W,H=H.square();return ie},f.prototype.modPow=function(m,w){if(m=J(m),w=J(w),w.isZero())throw new Error("Cannot take modPow with modulus 0");var x=u[1],k=this.mod(w);for(m.isNegative()&&(m=m.multiply(u[-1]),k=k.modInv(w));m.isPositive();){if(k.isZero())return u[0];m.isOdd()&&(x=x.multiply(k).mod(w)),m=m.divide(2),k=k.square().mod(w)}return x},y.prototype.modPow=h.prototype.modPow=f.prototype.modPow;function ee(m,w){if(m.length!==w.length)return m.length>w.length?1:-1;for(var x=m.length-1;x>=0;x--)if(m[x]!==w[x])return m[x]>w[x]?1:-1;return 0}f.prototype.compareAbs=function(m){var w=J(m),x=this.value,k=w.value;return w.isSmall?1:ee(x,k)},h.prototype.compareAbs=function(m){var w=J(m),x=Math.abs(this.value),k=w.value;return w.isSmall?(k=Math.abs(k),x===k?0:x>k?1:-1):-1},y.prototype.compareAbs=function(m){var w=this.value,x=J(m).value;return w=w>=0?w:-w,x=x>=0?x:-x,w===x?0:w>x?1:-1},f.prototype.compare=function(m){if(m===1/0)return-1;if(m===-1/0)return 1;var w=J(m),x=this.value,k=w.value;return this.sign!==w.sign?w.sign?1:-1:w.isSmall?this.sign?-1:1:ee(x,k)*(this.sign?-1:1)},f.prototype.compareTo=f.prototype.compare,h.prototype.compare=function(m){if(m===1/0)return-1;if(m===-1/0)return 1;var w=J(m),x=this.value,k=w.value;return w.isSmall?x==k?0:x>k?1:-1:x<0!==w.sign?x<0?-1:1:x<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,x=J(m).value;return w===x?0:w>x?1:-1},y.prototype.compareTo=y.prototype.compare,f.prototype.equals=function(m){return this.compare(m)===0},y.prototype.eq=y.prototype.equals=h.prototype.eq=h.prototype.equals=f.prototype.eq=f.prototype.equals,f.prototype.notEquals=function(m){return this.compare(m)!==0},y.prototype.neq=y.prototype.notEquals=h.prototype.neq=h.prototype.notEquals=f.prototype.neq=f.prototype.notEquals,f.prototype.greater=function(m){return this.compare(m)>0},y.prototype.gt=y.prototype.greater=h.prototype.gt=h.prototype.greater=f.prototype.gt=f.prototype.greater,f.prototype.lesser=function(m){return this.compare(m)<0},y.prototype.lt=y.prototype.lesser=h.prototype.lt=h.prototype.lesser=f.prototype.lt=f.prototype.lesser,f.prototype.greaterOrEquals=function(m){return this.compare(m)>=0},y.prototype.geq=y.prototype.greaterOrEquals=h.prototype.geq=h.prototype.greaterOrEquals=f.prototype.geq=f.prototype.greaterOrEquals,f.prototype.lesserOrEquals=function(m){return this.compare(m)<=0},y.prototype.leq=y.prototype.lesserOrEquals=h.prototype.leq=h.prototype.lesserOrEquals=f.prototype.leq=f.prototype.lesserOrEquals,f.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)},f.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)},f.prototype.isPositive=function(){return!this.sign},h.prototype.isPositive=function(){return this.value>0},y.prototype.isPositive=h.prototype.isPositive,f.prototype.isNegative=function(){return this.sign},h.prototype.isNegative=function(){return this.value<0},y.prototype.isNegative=h.prototype.isNegative,f.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)},f.prototype.isZero=function(){return!1},h.prototype.isZero=function(){return this.value===0},y.prototype.isZero=function(){return this.value===BigInt(0)},f.prototype.isDivisibleBy=function(m){var w=J(m);return w.isZero()?!1:w.isUnit()?!0:w.compareAbs(2)===0?this.isEven():this.mod(w).isZero()},y.prototype.isDivisibleBy=h.prototype.isDivisibleBy=f.prototype.isDivisibleBy;function Ee(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 Z(m,w){for(var x=m.prev(),k=x,O=0,S,W,H;k.isEven();)k=k.divide(2),O++;e:for(W=0;W<w.length;W++)if(!m.lesser(w[W])&&(H=t(w[W]).modPow(k,m),!(H.isUnit()||H.equals(x)))){for(S=O-1;S!=0;S--){if(H=H.square().mod(m),H.isUnit())return!1;if(H.equals(x))continue e}return!1}return!0}f.prototype.isPrime=function(m){var w=Ee(this);if(w!==n)return w;var x=this.abs(),k=x.bitLength();if(k<=64)return Z(x,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var O=Math.log(2)*k.toJSNumber(),S=Math.ceil(m===!0?2*Math.pow(O,2):O),W=[],H=0;H<S;H++)W.push(t(H+2));return Z(x,W)},y.prototype.isPrime=h.prototype.isPrime=f.prototype.isPrime,f.prototype.isProbablePrime=function(m,w){var x=Ee(this);if(x!==n)return x;for(var k=this.abs(),O=m===n?5:m,S=[],W=0;W<O;W++)S.push(t.randBetween(2,k.minus(2),w));return Z(k,S)},y.prototype.isProbablePrime=h.prototype.isProbablePrime=f.prototype.isProbablePrime,f.prototype.modInv=function(m){for(var w=t.zero,x=t.one,k=J(m),O=this.abs(),S,W,H;!O.isZero();)S=k.divide(O),W=w,H=k,w=x,k=O,x=W.subtract(S.multiply(x)),O=H.subtract(S.multiply(O));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=f.prototype.modInv,f.prototype.next=function(){var m=this.value;return this.sign?ue(m,1,this.sign):new f(ae(m,1),this.sign)},h.prototype.next=function(){var m=this.value;return m+1<o?new h(m+1):new f(r,!1)},y.prototype.next=function(){return new y(this.value+BigInt(1))},f.prototype.prev=function(){var m=this.value;return this.sign?new f(ae(m,1),!0):ue(m,1,this.sign)},h.prototype.prev=function(){var m=this.value;return m-1>-o?new h(m-1):new f(r,!0)},y.prototype.prev=function(){return new y(this.value-BigInt(1))};for(var z=[1];2*z[z.length-1]<=s;)z.push(2*z[z.length-1]);var Fe=z.length,Ye=z[Fe-1];function ke(m){return Math.abs(m)<=s}f.prototype.shiftLeft=function(m){var w=J(m).toJSNumber();if(!ke(w))throw new Error(String(w)+" is too large for shifting.");if(w<0)return this.shiftRight(-w);var x=this;if(x.isZero())return x;for(;w>=Fe;)x=x.multiply(Ye),w-=Fe-1;return x.multiply(z[w])},y.prototype.shiftLeft=h.prototype.shiftLeft=f.prototype.shiftLeft,f.prototype.shiftRight=function(m){var w,x=J(m).toJSNumber();if(!ke(x))throw new Error(String(x)+" is too large for shifting.");if(x<0)return this.shiftLeft(-x);for(var k=this;x>=Fe;){if(k.isZero()||k.isNegative()&&k.isUnit())return k;w=se(k,Ye),k=w[1].isNegative()?w[0].prev():w[0],x-=Fe-1}return w=se(k,z[x]),w[1].isNegative()?w[0].prev():w[0]},y.prototype.shiftRight=h.prototype.shiftRight=f.prototype.shiftRight;function ft(m,w,x){w=J(w);for(var k=m.isNegative(),O=w.isNegative(),S=k?m.not():m,W=O?w.not():w,H=0,ie=0,ve=null,Oe=null,Ie=[];!S.isZero()||!W.isZero();)ve=se(S,Ye),H=ve[1].toJSNumber(),k&&(H=Ye-1-H),Oe=se(W,Ye),ie=Oe[1].toJSNumber(),O&&(ie=Ye-1-ie),S=ve[0],W=Oe[0],Ie.push(x(H,ie));for(var Ke=x(k?1:0,O?1:0)!==0?t(-1):t(0),Mt=Ie.length-1;Mt>=0;Mt-=1)Ke=Ke.multiply(Ye).add(t(Ie[Mt]));return Ke}f.prototype.not=function(){return this.negate().prev()},y.prototype.not=h.prototype.not=f.prototype.not,f.prototype.and=function(m){return ft(this,m,function(w,x){return w&x})},y.prototype.and=h.prototype.and=f.prototype.and,f.prototype.or=function(m){return ft(this,m,function(w,x){return w|x})},y.prototype.or=h.prototype.or=f.prototype.or,f.prototype.xor=function(m){return ft(this,m,function(w,x){return w^x})},y.prototype.xor=h.prototype.xor=f.prototype.xor;var it=1<<30,ot=(s&-s)*(s&-s)|it;function wt(m){var w=m.value,x=typeof w=="number"?w|it:typeof w=="bigint"?w|BigInt(it):w[0]+w[1]*s|ot;return x&-x}function ds(m,w){if(w.compareTo(m)<=0){var x=ds(m,w.square(w)),k=x.p,O=x.e,S=k.multiply(w);return S.compareTo(m)<=0?{p:S,e:O*2+1}:{p:k,e:O*2}}return{p:t(1),e:0}}f.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(ds(m,t(2)).e).add(t(1))},y.prototype.bitLength=h.prototype.bitLength=f.prototype.bitLength;function C(m,w){return m=J(m),w=J(w),m.greater(w)?m:w}function A(m,w){return m=J(m),w=J(w),m.lesser(w)?m:w}function B(m,w){if(m=J(m).abs(),w=J(w).abs(),m.equals(w))return m;if(m.isZero())return w;if(w.isZero())return m;for(var x=u[1],k,O;m.isEven()&&w.isEven();)k=A(wt(m),wt(w)),m=m.divide(k),w=w.divide(k),x=x.multiply(k);for(;m.isEven();)m=m.divide(wt(m));do{for(;w.isEven();)w=w.divide(wt(w));m.greater(w)&&(O=w,w=m,m=O),w=w.subtract(m)}while(!w.isZero());return x.isUnit()?m:m.multiply(x)}function te(m,w){return m=J(m).abs(),w=J(w).abs(),m.divide(B(m,w)).multiply(w)}function R(m,w,x){m=J(m),w=J(w);var k=x||Math.random,O=A(m,w),S=C(m,w),W=S.subtract(O).add(1);if(W.isSmall)return O.add(Math.floor(k()*W));for(var H=ne(W,s).value,ie=[],ve=!0,Oe=0;Oe<H.length;Oe++){var Ie=ve?H[Oe]+(Oe+1<H.length?H[Oe+1]/s:0):s,Ke=I(k()*Ie);ie.push(Ke),Ke<H[Oe]&&(ve=!1)}return O.add(u.fromArray(ie,s,!1))}var le=function(m,w,x,k){x=x||a,m=String(m),k||(m=m.toLowerCase(),x=x.toLowerCase());var O=m.length,S,W=Math.abs(w),H={};for(S=0;S<x.length;S++)H[x[S]]=S;for(S=0;S<O;S++){var ie=m[S];if(ie!=="-"&&ie in H&&H[ie]>=W){if(ie==="1"&&W===1)continue;throw new Error(ie+" is not a valid digit in base "+w+".")}}w=J(w);var ve=[],Oe=m[0]==="-";for(S=Oe?1:0;S<m.length;S++){var ie=m[S];if(ie in H)ve.push(J(H[ie]));else if(ie==="<"){var Ie=S;do S++;while(m[S]!==">"&&S<m.length);ve.push(J(m.slice(Ie+1,S)))}else throw new Error(ie+" is not a valid character")}return he(ve,w,Oe)};function he(m,w,x){var k=u[0],O=u[1],S;for(S=m.length-1;S>=0;S--)k=k.add(m[S].times(O)),O=O.times(w);return x?k.negate():k}function ce(m,w){return w=w||a,m<w.length?w[m]:"<"+m+">"}function ne(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 x=Array.apply(null,Array(m.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return x.unshift([1]),{value:[].concat.apply([],x),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 O=[],S=m,W;S.isNegative()||S.compareAbs(w)>=0;){W=S.divmod(w),S=W.quotient;var H=W.remainder;H.isNegative()&&(H=w.minus(H).abs(),S=S.next()),O.push(H.toJSNumber())}return O.push(S.toJSNumber()),{value:O.reverse(),isNegative:k}}function Y(m,w,x){var k=ne(m,w);return(k.isNegative?"-":"")+k.value.map(function(O){return ce(O,x)}).join("")}f.prototype.toArray=function(m){return ne(this,m)},h.prototype.toArray=function(m){return ne(this,m)},y.prototype.toArray=function(m){return ne(this,m)},f.prototype.toString=function(m,w){if(m===n&&(m=10),m!==10)return Y(this,m,w);for(var x=this.value,k=x.length,O=String(x[--k]),S="0000000",W;--k>=0;)W=String(x[k]),O+=S.slice(W.length)+W;var H=this.sign?"-":"";return H+O},h.prototype.toString=function(m,w){return m===n&&(m=10),m!=10?Y(this,m,w):String(this.value)},y.prototype.toString=h.prototype.toString,y.prototype.toJSON=f.prototype.toJSON=h.prototype.toJSON=function(){return this.toString()},f.prototype.valueOf=function(){return parseInt(this.toString(),10)},f.prototype.toJSNumber=f.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 $e(m){if(_(+m)){var w=+m;if(w===I(w))return l?new y(BigInt(w)):new h(w);throw new Error("Invalid integer: "+m)}var x=m[0]==="-";x&&(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 O=k[1];if(O[0]==="+"&&(O=O.slice(1)),O=+O,O!==I(O)||!_(O))throw new Error("Invalid integer: "+O+" is not a valid exponent.");var S=k[0],W=S.indexOf(".");if(W>=0&&(O-=S.length-W-1,S=S.slice(0,W)+S.slice(W+1)),O<0)throw new Error("Cannot include negative exponent part for integers");S+=new Array(O+1).join("0"),m=S}var H=/^([0-9][0-9]*)$/.test(m);if(!H)throw new Error("Invalid integer: "+m);if(l)return new y(BigInt(x?"-"+m:m));for(var ie=[],ve=m.length,Oe=i,Ie=ve-Oe;ve>0;)ie.push(+m.slice(Ie,ve)),Ie-=Oe,Ie<0&&(Ie=0),ve-=Oe;return T(ie),new f(ie,x)}function we(m){if(l)return new y(BigInt(m));if(_(m)){if(m!==I(m))throw new Error(m+" is not an integer.");return new h(m)}return $e(m.toString())}function J(m){return typeof m=="number"?we(m):typeof m=="string"?$e(m):typeof m=="bigint"?new y(m):m}for(var Ae=0;Ae<1e3;Ae++)u[Ae]=J(Ae),Ae>0&&(u[-Ae]=J(-Ae));return u.one=u[1],u.zero=u[0],u.minusOne=u[-1],u.max=C,u.min=A,u.gcd=B,u.lcm=te,u.isInstance=function(m){return m instanceof f||m instanceof h||m instanceof y},u.randBetween=R,u.fromArray=function(m,w,x){return he(m.map(J),J(w||10),x)},u}();e.hasOwnProperty("exports")&&(e.exports=t)})(Cu);const Ao=Cu.exports;class sy{constructor(){be(this,"n");be(this,"e");this.n=Ao("8686980c0f5a24c4b9d43020cd2c22703ff3f450756529058b1cf88f09b8602136477198a6e2683149659bd122c33592fdb5ad47944ad1ea4d36c6b172aad6338c3bb6ac6227502d010993ac967d1aef00f0c8e038de2e4d3bc2ec368af2e9f10a6f1eda4f7262f136420c07c331b871bf139f74f3010e3c4fe57df3afb71683",16),this.e=Ao("10001",16)}a2hex(t){let n="",s;for(let i=0;i<t.length;i++)s=t[i].toString(16),s.length<2&&(s="0"+s),n+=s;return n}hex2a(t){let n="";for(let s=0;s<t.length;s+=2)n+=String.fromCharCode(parseInt(t.substr(s,2),16));return n}pkcs1pad2(t,n){if(n<t.length+11)return null;let s=[],i=t.length-1;for(;i>=0&&n>0;)s[--n]=t.charCodeAt(i--);for(s[--n]=0;n>2;)s[--n]=255;s[--n]=2,s[--n]=0;let o=this.a2hex(s);return Ao(o,16)}pkcs1unpad2(t){let n=t.toString(16);n.length%2!==0&&(n="0"+n);let s=this.hex2a(n),i=1;for(;s.charCodeAt(i)!==0;)i++;return s.slice(i+1)}encrypt(t){let n=this.pkcs1pad2(t,128),s=n==null?void 0:n.modPow(this.e,this.n),i=(s==null?void 0:s.toString(16))||"";for(;i.length<128*2;)i="0"+i;return i}decrypt(t){const n=[];let s=0;for(;s<t.length;)n[s]=t.charCodeAt(s),s+=1;const o=Ao(this.a2hex(n),16).modPow(this.e,this.n);return this.pkcs1unpad2(o)}}class iy{constructor(){be(this,"rsa");be(this,"kts");be(this,"keyS");be(this,"keyL");this.rsa=new sy,this.kts=[240,229,105,174,191,220,191,138,26,69,232,190,125,166,115,184,222,143,231,196,69,218,134,196,155,100,139,20,106,180,241,170,56,1,53,158,38,105,44,134,0,107,79,165,54,52,98,166,42,150,104,24,242,74,253,189,107,151,143,77,143,137,19,183,108,142,147,237,14,13,72,62,215,47,136,216,254,254,126,134,80,149,79,209,235,131,38,52,219,102,123,156,126,157,122,129,50,234,182,51,222,58,169,89,52,102,59,170,186,129,96,72,185,213,129,156,248,108,132,119,255,84,120,38,95,190,232,30,54,159,52,128,92,69,44,155,118,213,27,143,204,195,184,245],this.keyS=[41,35,33,94],this.keyL=[120,6,173,76,51,134,93,24,76,1,63,70]}xor115Enc(t,n,s,i){let o,r,a,l,u,f,h,y;if(l=n%4,y=[],l!==0)for(o=r=0,u=l;u>=0?r<u:r>u;o=u>=0?++r:--r)y.push(t[o]^s[o%i]);for(o=a=f=l,h=n;f<=h?a<h:a>h;o=f<=h?++a:--a)y.push(t[o]^s[(o-l)%i]);return y}getkey(t,n){let s;return n!=null?(()=>{let i,o,r;for(r=[],s=i=0,o=t;o>=0?i<o:i>o;s=o>=0?++i:--i)r.push(n[s]+this.kts[t*s]&255^this.kts[t*(t-1-s)]);return r})():t===12?this.keyL.slice(0):this.keyS.slice(0)}asymEncode(t,n){let s,i,o,r,a;for(o=128-11,a="",s=i=0,r=Math.floor((n+o-1)/o);r>=0?i<r:i>r;s=r>=0?++i:--i)a+=this.rsa.encrypt(this.bytesToString(t.slice(s*o,Math.min((s+1)*o,n))));return window.btoa(this.rsa.hex2a(a))}asymDecode(t,n){let s,i,o,r,a;for(o=128,a="",s=i=0,r=Math.floor((n+o-1)/o);r>=0?i<r:i>r;s=r>=0?++i:--i)a+=this.rsa.decrypt(this.bytesToString(t.slice(s*o,Math.min((s+1)*o,n))));return this.stringToBytes(a)}symEncode(t,n,s,i){let o,r,a;return o=this.getkey(4,s),r=this.getkey(12,i),a=this.xor115Enc(t,n,o,4),a.reverse(),a=this.xor115Enc(a,n,r,12),a}symDecode(t,n,s,i){let o,r,a;return o=this.getkey(4,s),r=this.getkey(12,i),a=this.xor115Enc(t,n,r,12),a.reverse(),a=this.xor115Enc(a,n,o,4),a}bytesToString(t){let n,s,i,o;for(o="",s=0,i=t.length;s<i;s++)n=t[s],o+=String.fromCharCode(n);return o}stringToBytes(t){let n,s,i;for(i=[],n=0,s=t.length;n<s;n++)i.push(t.charCodeAt(n));return i}encode(t,n){const s=this.stringToBytes(ut.hashStr(`!@###@#${n}DFDR@#@#`));let i=this.stringToBytes(t);return i=this.symEncode(i,i.length,s,null),i=s.slice(0,16).concat(i),{data:this.asymEncode(i,i.length),key:s}}decode(t,n){let s=this.stringToBytes(window.atob(t));return s=this.asymDecode(s,s.length),this.bytesToString(this.symDecode(s.slice(16),s.length-16,n,s.slice(0,16)))}}const oy=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var ry=e=>!oy.has(e&&e.code);const Ea="axios-retry";function $u(e){const t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:ry(e)}const Eu=["get","head","options"],ay=Eu.concat(["put","delete"]);function ka(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function ly(e){var t;return(t=e.config)!=null&&t.method?ka(e)&&Eu.indexOf(e.config.method)!==-1:!1}function ku(e){var t;return(t=e.config)!=null&&t.method?ka(e)&&ay.indexOf(e.config.method)!==-1:!1}function Su(e){return $u(e)||ku(e)}function Au(e=void 0){var s;const t=(s=e==null?void 0:e.response)==null?void 0:s.headers["retry-after"];if(!t)return 0;let n=(Number(t)||0)*1e3;return n===0&&(n=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,n)}function cy(e=0,t=void 0){return Math.max(0,Au(t))}function uy(e=0,t=void 0,n=100){const s=2**e*n,i=Math.max(s,Au(t)),o=i*.2*Math.random();return i+o}const dy={retries:3,retryCondition:Su,retryDelay:cy,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function fy(e,t){return{...dy,...t,...e[Ea]}}function Pu(e,t){const n=fy(e,t||{});return n.retryCount=n.retryCount||0,n.lastRequestTime=n.lastRequestTime||Date.now(),e[Ea]=n,n}function py(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function hy(e,t){const{retries:n,retryCondition:s}=e,i=(e.retryCount||0)<n&&s(t);if(typeof i=="object")try{return await i!==!1}catch{return!1}return i}async function my(e,t,n,s){var l;t.retryCount+=1;const{retryDelay:i,shouldResetTimeout:o,onRetry:r}=t,a=i(t.retryCount,n);if(py(e,s),!o&&s.timeout&&t.lastRequestTime){const u=Date.now()-t.lastRequestTime,f=s.timeout-u-a;if(f<=0)return Promise.reject(n);s.timeout=f}return s.transformRequest=[u=>u],await r(t.retryCount,n,s),(l=s.signal)!=null&&l.aborted?Promise.resolve(e(s)):new Promise(u=>{var y;const f=()=>{clearTimeout(h),u(e(s))},h=setTimeout(()=>{var _;u(e(s)),(_=s.signal)!=null&&_.removeEventListener&&s.signal.removeEventListener("abort",f)},a);(y=s.signal)!=null&&y.addEventListener&&s.signal.addEventListener("abort",f,{once:!0})})}async function gy(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}const gs=(e,t)=>{const n=e.interceptors.request.use(i=>{var o;return Pu(i,t),(o=i[Ea])!=null&&o.validateResponse&&(i.validateStatus=()=>!1),i}),s=e.interceptors.response.use(null,async i=>{var a;const{config:o}=i;if(!o)return Promise.reject(i);const r=Pu(o,t);return i.response&&((a=r.validateResponse)==null?void 0:a.call(r,i.response))?i.response:await hy(r,i)?my(e,r,i,o):(await gy(r,i),Promise.reject(i))});return{requestInterceptorId:n,responseInterceptorId:s}};gs.isNetworkError=$u,gs.isSafeRequestError=ly,gs.isIdempotentRequestError=ku,gs.isNetworkOrIdempotentRequestError=Su,gs.exponentialDelay=uy,gs.isRetryableError=ka;var Po=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'!")}},yy=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 s=Date.now();return n>=s?n-s:0}return 0}delete(t){t?delete this._keys[t]:Object.keys(this._keys).forEach(n=>{delete this._keys[n]})}},wy=yy,Ut=class{constructor(t,n,s,i){this.remainingPoints=typeof t>"u"?0:t,this.msBeforeNext=typeof n>"u"?0:n,this.consumedPoints=typeof s>"u"?0:s,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 Sa=Po,by=wy,Iu=Ut;var ys=class extends Sa{constructor(t={}){super(t),this.inMemoryBlockOnConsumed=t.inMemoryBlockOnConsumed,this.inMemoryBlockDuration=t.inMemoryBlockDuration,this.insuranceLimiter=t.insuranceLimiter,this._inMemoryBlockedKeys=new by}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,s,i,o,r={}){const a=this._getRateLimiterRes(s,i,o);if(this.inMemoryBlockOnConsumed>0&&!(this.inMemoryBlockDuration>0)&&a.consumedPoints>=this.inMemoryBlockOnConsumed)return this._inMemoryBlockedKeys.addMs(s,a.msBeforeNext),a.consumedPoints>this.points?n(a):t(a);if(a.consumedPoints>this.points){let l=Promise.resolve();this.blockDuration>0&&a.consumedPoints<=this.points+i&&(a.msBeforeNext=this.msBlockDuration,l=this._block(s,a.consumedPoints,this.msBlockDuration,r)),this.inMemoryBlockOnConsumed>0&&a.consumedPoints>=this.inMemoryBlockOnConsumed&&(this._inMemoryBlockedKeys.add(s,this.inMemoryBlockDuration),a.msBeforeNext=this.msInMemoryBlockDuration),l.then(()=>{n(a)}).catch(u=>{n(u)})}else if(this.execEvenly&&a.msBeforeNext>0&&!a.isFirstInDuration){let l=Math.ceil(a.msBeforeNext/(a.remainingPoints+2));l<this.execEvenlyMinDelayMs&&(l=a.consumedPoints*this.execEvenlyMinDelayMs),setTimeout(t,l,a)}else t(a)}_handleError(t,n,s,i,o,r=!1,a={}){this.insuranceLimiter instanceof Sa?this.insuranceLimiter[n](o,r,a).then(l=>{s(l)}).catch(l=>{i(l)}):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 Sa))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,s={}){const i=n*1e3;return this._block(this.getKey(t),this.points+1,i,s)}set(t,n,s,i={}){const o=(s>=0?s:this.duration)*1e3;return this._block(this.getKey(t),n,o,i)}consume(t,n=1,s={}){return new Promise((i,o)=>{const r=this.getKey(t),a=this.getInMemoryBlockMsBeforeExpire(r);if(a>0)return o(new Iu(0,a));this._upsert(r,n,this._getKeySecDuration(s)*1e3,!1,s).then(l=>{this._afterConsume(i,o,r,n,l)}).catch(l=>{this._handleError(l,"consume",i,o,t,n,s)})})}penalty(t,n=1,s={}){const i=this.getKey(t);return new Promise((o,r)=>{this._upsert(i,n,this._getKeySecDuration(s)*1e3,!1,s).then(a=>{o(this._getRateLimiterRes(i,n,a))}).catch(a=>{this._handleError(a,"penalty",o,r,t,n,s)})})}reward(t,n=1,s={}){const i=this.getKey(t);return new Promise((o,r)=>{this._upsert(i,-n,this._getKeySecDuration(s)*1e3,!1,s).then(a=>{o(this._getRateLimiterRes(i,-n,a))}).catch(a=>{this._handleError(a,"reward",o,r,t,n,s)})})}get(t,n={}){const s=this.getKey(t);return new Promise((i,o)=>{this._get(s,n).then(r=>{i(r===null||typeof r>"u"?null:this._getRateLimiterRes(s,0,r))}).catch(r=>{this._handleError(r,"get",i,o,t,n)})})}delete(t,n={}){const s=this.getKey(t);return new Promise((i,o)=>{this._delete(s,n).then(r=>{this._inMemoryBlockedKeys.delete(s),i(r)}).catch(r=>{this._handleError(r,"delete",i,o,t,n)})})}deleteInMemoryBlockedAll(){this._inMemoryBlockedKeys.delete()}_getRateLimiterRes(t,n,s){throw new Error("You have to implement the method '_getRateLimiterRes'!")}_block(t,n,s,i={}){return new Promise((o,r)=>{this._upsert(t,n,s,!0,i).then(()=>{o(new Iu(0,s>0?s:-1,n))}).catch(a=>{this._handleError(a,"block",o,r,this.parseKey(t),s/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,s,i=!1,o={}){throw new Error("You have to implement the method '_upsert'!")}};const _y=ys,vy=Ut,xy="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 Cy extends _y{constructor(t){super(t),this.client=t.storeClient,this._rejectIfRedisNotReady=!!t.rejectIfRedisNotReady,this._incrTtlLuaScript=t.customIncrTtlLuaScript||xy,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,s){let[i,o]=s;Array.isArray(i)&&([,i]=i,[,o]=o);const r=new vy;return r.consumedPoints=parseInt(i),r.isFirstInDuration=r.consumedPoints===n,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=o,r}async _upsert(t,n,s,i=!1){if(!this._isRedisReady())throw new Error("Redis connection is not ready");const o=Math.floor(s/1e3),r=this.client.multi();return i?(o>0?!this.useRedisPackage&&!this.useRedis3AndLowerPackage?r.set(t,n,"EX",o):r.set(t,n,{EX:o}):r.set(t,n),!this.useRedisPackage&&!this.useRedis3AndLowerPackage?r.pttl(t).exec(!0):r.pTTL(t).exec(!0)):o>0?!this.useRedisPackage&&!this.useRedis3AndLowerPackage?this.client.rlflxIncr([t].concat([String(n),String(o),String(this.points),String(this.duration)])):this.useRedis3AndLowerPackage?new Promise((a,l)=>{const u=function(f,h){return f?l(f):a(h)};typeof this.client.rlflxIncr=="function"?this.client.rlflxIncr(t,n,o,this.points,this.duration,u):this.client.eval(this._incrTtlLuaScript,1,t,n,o,this.points,this.duration,u)}):this.client.eval(this._incrTtlLuaScript,{keys:[t],arguments:[String(n),String(o),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[[,s]]=n;return s===null?null:n}):this.client.multi().get(t).pTTL(t).exec(!0).then(n=>{const[s]=n;return s===null?null:n})}_delete(t){return this.client.del(t).then(n=>n>0)}}var $y=Cy;const Ey=ys,ky=Ut;function Tu(e){try{const t=e.client?e.client:e;let n=[0,0,0];if(typeof t.topology>"u"){const{version:s}=t.options.metadata.driver;n=s.split("|",1)[0].split(".").map(i=>parseInt(i))}else{const{version:s}=t.topology.s.options.metadata.driver;n=s.split(".").map(i=>parseInt(i))}return{major:n[0],feature:n[1],patch:n[2]}}catch{return{major:0,feature:0,patch:0}}}class Aa extends Ey{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=Tu(this.client)}):(this._initCollection(),this._driverVersion=Tu(this.client))}get dbName(){return this._dbName}set dbName(t){this._dbName=typeof t>"u"?Aa.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,s){const i=new ky;let o;return typeof s.value>"u"?o=s:o=s.value,i.isFirstInDuration=o.points===n,i.consumedPoints=o.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=o.expire!==null?Math.max(new Date(o.expire).getTime()-Date.now(),0):-1,i}_upsert(t,n,s,i=!1,o={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const r=o.attrs||{};let a,l;i?(a={key:t},a=Object.assign(a,r),l={$set:{key:t,points:n,expire:s>0?new Date(Date.now()+s):null}},l.$set=Object.assign(l.$set,r)):(a={$or:[{expire:{$gt:new Date}},{expire:{$eq:null}}],key:t},a=Object.assign(a,r),l={$setOnInsert:{key:t,expire:s>0?new Date(Date.now()+s):null},$inc:{points:n}},l.$setOnInsert=Object.assign(l.$setOnInsert,r));const u={upsert:!0};return this._driverVersion.major>=4||this._driverVersion.major===3&&this._driverVersion.feature>=7||this._driverVersion.feature>=6&&this._driverVersion.patch>=7?u.returnDocument="after":u.returnOriginal=!1,new Promise((f,h)=>{this._collection.findOneAndUpdate(a,l,u).then(y=>{f(y)}).catch(y=>{if(y&&y.code===11e3){const _=Object.assign({$or:[{expire:{$lte:new Date}},{expire:{$eq:null}}],key:t},r),b={$set:Object.assign({key:t,points:n,expire:s>0?new Date(Date.now()+s):null},r)};this._collection.findOneAndUpdate(_,b,u).then(E=>{f(E)}).catch(E=>{E&&E.code===11e3?this._upsert(t,n,s,i).then(T=>f(T)).catch(T=>h(T)):h(E)})}else h(y)})})}_get(t,n={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const s=n.attrs||{},i=Object.assign({key:t,$or:[{expire:{$gt:new Date}},{expire:{$eq:null}}]},s);return this._collection.findOne(i)}_delete(t,n={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const s=n.attrs||{},i=Object.assign({key:t},s);return this._collection.deleteOne(i).then(o=>o.deletedCount>0)}}var Sy=Aa;const Ay=ys,Py=Ut;class Iy extends Ay{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(s=>{if(typeof n=="function")n(s);else throw s})}clearExpired(t){return new Promise(n=>{this._getConnection().then(s=>{s.query("DELETE FROM ??.?? WHERE expire < ?",[this.dbName,this.tableName,t],()=>{this._releaseConnection(s),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((s,i)=>{if(s)return n(s);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(s=>{s.query(`CREATE DATABASE IF NOT EXISTS \`${this.dbName}\`;`,i=>{if(i)return this._releaseConnection(s),n(i);s.query(this._getCreateTableStmt(),o=>{if(o)return this._releaseConnection(s),n(o);this._releaseConnection(s),t()})})}).catch(s=>{n(s)})})}_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,s){const i=new Py,[o]=s;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?Math.max(o.expire-Date.now(),0):-1,i}_upsertTransaction(t,n,s,i,o){return new Promise((r,a)=>{t.query("BEGIN",l=>{if(l)return t.rollback(),a(l);const u=Date.now(),f=i>0?u+i:null;let h,y;o?(h=`INSERT INTO ??.?? VALUES (?, ?, ?)
          ON DUPLICATE KEY UPDATE 
            points = ?, 
            expire = ?;`,y=[this.dbName,this.tableName,n,s,f,s,f]):(h=`INSERT INTO ??.?? VALUES (?, ?, ?)
          ON DUPLICATE KEY UPDATE 
            points = IF(expire <= ?, ?, points + (?)), 
            expire = IF(expire <= ?, ?, expire);`,y=[this.dbName,this.tableName,n,s,f,u,s,s,u,f]),t.query(h,y,_=>{if(_)return t.rollback(),a(_);t.query("SELECT points, expire FROM ??.?? WHERE `key` = ?;",[this.dbName,this.tableName,n],(b,E)=>{if(b)return t.rollback(),a(b);t.query("COMMIT",T=>{if(T)return t.rollback(),a(T);r(E)})})})})})}_upsert(t,n,s,i=!1){return this.tableCreated?new Promise((o,r)=>{this._getConnection().then(a=>{this._upsertTransaction(a,t,n,s,i).then(l=>{o(l),this._releaseConnection(a)}).catch(l=>{r(l),this._releaseConnection(a)})}).catch(a=>{r(a)})}):Promise.reject(Error("Table is not created yet"))}_get(t){return this.tableCreated?new Promise((n,s)=>{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()],(o,r)=>{o?s(o):r.length===0?n(null):n(r),this._releaseConnection(i)})}).catch(i=>{s(i)})}):Promise.reject(Error("Table is not created yet"))}_delete(t){return this.tableCreated?new Promise((n,s)=>{this._getConnection().then(i=>{i.query("DELETE FROM ??.?? WHERE `key` = ?",[this.dbName,this.tableName,t],(o,r)=>{o?s(o):n(r.affectedRows>0),this._releaseConnection(i)})}).catch(i=>{s(i)})}):Promise.reject(Error("Table is not created yet"))}}var Ty=Iy;const Ly=ys,Oy=Ut;class Dy extends Ly{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(s=>{if(typeof n=="function")n(s);else throw s})}_getTableIdentifier(){return this.schemaName?`"${this.schemaName}"."${this.tableName}"`:`"${this.tableName}"`}clearExpired(t){return new Promise(n=>{const s={name:"rlflx-clear-expired",text:`DELETE FROM ${this._getTableIdentifier()} WHERE expire < $1`,values:[t]};this._query(s).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(s=>{s.code==="23505"?t():n(s)})})}_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,s){const i=new Oy,o=s.rows[0];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?Math.max(o.expire-Date.now(),0):-1,i}_query(t){const s={name:`${this.tableName.toLowerCase()}:${t.name}`,text:t.text,values:t.values};return new Promise((i,o)=>{this._getConnection().then(r=>{r.query(s).then(a=>{i(a),this._releaseConnection(r)}).catch(a=>{o(a),this._releaseConnection(r)})}).catch(r=>{o(r)})})}_upsert(t,n,s,i=!1){if(!this.tableCreated)return Promise.reject(Error("Table is not created yet"));const o=s>0?Date.now()+s: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,o,Date.now()]})}_get(t){return this.tableCreated?new Promise((n,s)=>{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=>{s(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 My=Dy;const Lu=Sm(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ry=class{constructor(t,n,s=null){this.value=t,this.expiresAt=n,this.timeoutId=s}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 Ny=Ry,Pa=Ut;var By=class{constructor(){this._storage={}}incrby(t,n,s){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 Pa(0,i,this._storage[t].value,!1)):this.set(t,n,s)}return this.set(t,n,s)}set(t,n,s){const i=s*1e3;return this._storage[t]&&this._storage[t].timeoutId&&clearTimeout(this._storage[t].timeoutId),this._storage[t]=new Ny(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 Pa(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 Pa(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 Fy=Po,Uy=By,Ou=Ut;class jy extends Fy{constructor(t={}){super(t),this._memoryStorage=new Uy}consume(t,n=1,s={}){return new Promise((i,o)=>{const r=this.getKey(t),a=this._getKeySecDuration(s);let l=this._memoryStorage.incrby(r,n,a);if(l.remainingPoints=Math.max(this.points-l.consumedPoints,0),l.consumedPoints>this.points)this.blockDuration>0&&l.consumedPoints<=this.points+n&&(l=this._memoryStorage.set(r,l.consumedPoints,this.blockDuration)),o(l);else if(this.execEvenly&&l.msBeforeNext>0&&!l.isFirstInDuration){let u=Math.ceil(l.msBeforeNext/(l.remainingPoints+2));u<this.execEvenlyMinDelayMs&&(u=l.consumedPoints*this.execEvenlyMinDelayMs),setTimeout(i,u,l)}else i(l)})}penalty(t,n=1,s={}){const i=this.getKey(t);return new Promise(o=>{const r=this._getKeySecDuration(s),a=this._memoryStorage.incrby(i,n,r);a.remainingPoints=Math.max(this.points-a.consumedPoints,0),o(a)})}reward(t,n=1,s={}){const i=this.getKey(t);return new Promise(o=>{const r=this._getKeySecDuration(s),a=this._memoryStorage.incrby(i,-n,r);a.remainingPoints=Math.max(this.points-a.consumedPoints,0),o(a)})}block(t,n){const s=n*1e3,i=this.points+1;return this._memoryStorage.set(this.getKey(t),i,n),Promise.resolve(new Ou(0,s===0?-1:s,i))}set(t,n,s){const i=(s>=0?s:this.duration)*1e3;return this._memoryStorage.set(this.getKey(t),n,s),Promise.resolve(new Ou(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 Du=jy;const Mu=Lu,Hy=Lu,qy=Po,Ru=Du,zy=Ut,Zt="rate_limiter_flexible";let qs=null;const Nu=function(e,t,n,s){let i;s===null||s===!0||s===!1?i=s:i={remainingPoints:s.remainingPoints,msBeforeNext:s.msBeforeNext,consumedPoints:s.consumedPoints,isFirstInDuration:s.isFirstInDuration},e.send({channel:Zt,keyPrefix:t.keyPrefix,promiseId:t.promiseId,type:n,data:i})},Bu=function(e){setTimeout(()=>{this._initiated?process.send(e):typeof this._promises[e.promiseId]<"u"&&Bu.call(this,e)},30)},zs=function(e,t,n,s,i){const o={channel:Zt,keyPrefix:this.keyPrefix,func:e,promiseId:t,data:{key:n,arg:s,opts:i}};this._initiated?process.send(o):Bu.call(this,o)},Fu=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(s=>{Nu(e,t,"resolve",s)}).catch(s=>{Nu(e,t,"reject",s)})},Vy=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 zy(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]}},Wy=function(){return{points:this.points,duration:this.duration,blockDuration:this.blockDuration,execEvenly:this.execEvenly,execEvenlyMinDelayMs:this.execEvenlyMinDelayMs,keyPrefix:this.keyPrefix}},Vs=function(e,t){const n=process.hrtime();let s=n[0].toString()+n[1].toString();return typeof this._promises[s]<"u"&&(s+=Hy.randomBytes(12).toString("base64")),this._promises[s]={resolve:e,reject:t,timeoutId:setTimeout(()=>{delete this._promises[s],t(new Error("RateLimiterCluster timeout: no answer from master in time"))},this.timeoutMs)},s};class Ky{constructor(){if(qs)return qs;this._rateLimiters={},Mu.setMaxListeners(0),Mu.on("message",(t,n)=>{n&&n.channel===Zt&&n.type==="init"?(typeof this._rateLimiters[n.opts.keyPrefix]>"u"&&(this._rateLimiters[n.opts.keyPrefix]=new Ru(n.opts)),t.send({channel:Zt,type:"init",keyPrefix:n.opts.keyPrefix})):Fu.call(this,t,n)}),qs=this}}class Gy{constructor(t){if(qs)return qs;this._rateLimiters={},t.launchBus((n,s)=>{s.on("process:msg",i=>{const o=i.raw;if(o&&o.channel===Zt&&o.type==="init")typeof this._rateLimiters[o.opts.keyPrefix]>"u"&&(this._rateLimiters[o.opts.keyPrefix]=new Ru(o.opts)),t.sendDataToProcessId(i.process.pm_id,{data:{},topic:Zt,channel:Zt,type:"init",keyPrefix:o.opts.keyPrefix},(r,a)=>{r&&console.log(r,a)});else{const r={send:a=>{const l=a;l.topic=Zt,typeof l.data>"u"&&(l.data={}),t.sendDataToProcessId(i.process.pm_id,l,(u,f)=>{u&&console.log(u,f)})}};Fu.call(this,r,o)}})}),qs=this}}class Yy extends qy{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:Vy.call(this,n)}),process.send({channel:Zt,type:"init",opts:Wy.call(this)}),this._promises={}}consume(t,n=1,s={}){return new Promise((i,o)=>{const r=Vs.call(this,i,o);zs.call(this,"consume",r,t,n,s)})}penalty(t,n=1,s={}){return new Promise((i,o)=>{const r=Vs.call(this,i,o);zs.call(this,"penalty",r,t,n,s)})}reward(t,n=1,s={}){return new Promise((i,o)=>{const r=Vs.call(this,i,o);zs.call(this,"reward",r,t,n,s)})}block(t,n,s={}){return new Promise((i,o)=>{const r=Vs.call(this,i,o);zs.call(this,"block",r,t,n,s)})}get(t,n={}){return new Promise((s,i)=>{const o=Vs.call(this,s,i);zs.call(this,"get",o,t,n)})}delete(t,n={}){return new Promise((s,i)=>{const o=Vs.call(this,s,i);zs.call(this,"delete",o,t,n)})}}var Jy={RateLimiterClusterMaster:Ky,RateLimiterClusterMasterPM2:Gy,RateLimiterCluster:Yy};const Qy=ys,Xy=Ut;class Zy extends Qy{constructor(t){super(t),this.client=t.storeClient}_getRateLimiterRes(t,n,s){const i=new Xy;return i.consumedPoints=parseInt(s.consumedPoints),i.isFirstInDuration=s.consumedPoints===n,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=s.msBeforeNext,i}_upsert(t,n,s,i=!1,o={}){return new Promise((r,a)=>{const l=Date.now(),u=Math.floor(s/1e3);i?this.client.set(t,n,u,f=>{f?a(f):this.client.set(`${t}_expire`,u>0?l+u*1e3:-1,u,()=>{const h={consumedPoints:n,msBeforeNext:u>0?u*1e3:-1};r(h)})}):this.client.incr(t,n,(f,h)=>{f||h===!1?this.client.add(t,n,u,(y,_)=>{if(y||!_)if(typeof o.attemptNumber>"u"||o.attemptNumber<3){const b=Object.assign({},o);b.attemptNumber=b.attemptNumber?b.attemptNumber+1:1,this._upsert(t,n,s,i,b).then(E=>r(E)).catch(E=>a(E))}else a(new Error("Can not add key"));else this.client.add(`${t}_expire`,u>0?l+u*1e3:-1,u,()=>{const b={consumedPoints:n,msBeforeNext:u>0?u*1e3:-1};r(b)})}):this.client.get(`${t}_expire`,(y,_)=>{if(y)a(y);else{const b=_===!1?0:_,E={consumedPoints:h,msBeforeNext:b>=0?Math.max(b-l,0):-1};r(E)}})})})}_get(t){return new Promise((n,s)=>{const i=Date.now();this.client.get(t,(o,r)=>{r?this.client.get(`${t}_expire`,(a,l)=>{if(a)s(a);else{const u=l===!1?0:l,f={consumedPoints:r,msBeforeNext:u>=0?Math.max(u-i,0):-1};n(f)}}):n(null)})})}_delete(t){return new Promise((n,s)=>{this.client.del(t,(i,o)=>{i?s(i):o===!1?n(o):this.client.del(`${t}_expire`,r=>{r?s(r):n(o)})})})}}var ew=Zy;const Uu=Ut;var tw=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 s;return this.isWhiteListedSomewhere(t)?s=this.resolveWhite():this.isBlackListedSomewhere(t)&&(s=this.rejectBlack()),typeof s>"u"?this.limiter.consume(t,n):(this.runActionAnyway&&this.limiter.consume(t,n).catch(()=>{}),s)}block(t,n){let s;return this.isWhiteListedSomewhere(t)?s=this.resolveWhite():this.isBlackListedSomewhere(t)&&(s=this.resolveBlack()),typeof s>"u"?this.limiter.block(t,n):(this.runActionAnyway&&this.limiter.block(t,n).catch(()=>{}),s)}penalty(t,n){let s;return this.isWhiteListedSomewhere(t)?s=this.resolveWhite():this.isBlackListedSomewhere(t)&&(s=this.resolveBlack()),typeof s>"u"?this.limiter.penalty(t,n):(this.runActionAnyway&&this.limiter.penalty(t,n).catch(()=>{}),s)}reward(t,n){let s;return this.isWhiteListedSomewhere(t)?s=this.resolveWhite():this.isBlackListedSomewhere(t)&&(s=this.resolveBlack()),typeof s>"u"?this.limiter.reward(t,n):(this.runActionAnyway&&this.limiter.reward(t,n).catch(()=>{}),s)}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 nw=Po;var sw=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 nw))throw new Error("RateLimiterUnion: all limiters have to be instance of RateLimiterAbstract")}),this._limiters=t}consume(t,n=1){return new Promise((s,i)=>{const o=[];this._limiters.forEach(r=>{o.push(r.consume(t,n).catch(a=>({rejected:!0,rej:a})))}),Promise.all(o).then(r=>{const a={};let l=!1;r.forEach(u=>{u.rejected===!0&&(l=!0)});for(let u=0;u<r.length;u++)l&&r[u].rejected===!0?a[this._limiters[u].keyPrefix]=r[u].rej:l||(a[this._limiters[u].keyPrefix]=r[u]);l?i(a):s(a)})})}},iw=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 ju=iw,Hu=4294967295,Ia="limiter";var ow=class{constructor(t,n={maxQueueSize:Hu}){this._queueLimiters={KEY_DEFAULT:new qu(t,n)},this._limiterFlexible=t,this._maxQueueSize=n.maxQueueSize}getTokensRemaining(t=Ia){return this._queueLimiters[t]?this._queueLimiters[t].getTokensRemaining():Promise.resolve(this._limiterFlexible.points)}removeTokens(t,n=Ia){return this._queueLimiters[n]||(this._queueLimiters[n]=new qu(this._limiterFlexible,{key:n,maxQueueSize:this._maxQueueSize})),this._queueLimiters[n].removeTokens(t)}};class qu{constructor(t,n={maxQueueSize:Hu,key:Ia}){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((s,i)=>{if(t>n._limiterFlexible.points){i(new ju(`Requested tokens ${t} exceeds maximum ${n._limiterFlexible.points} tokens per interval`));return}n._queue.length>0?n._queueRequest.call(n,s,i,t):n._limiterFlexible.consume(n._key,t).then(o=>{s(o.remainingPoints)}).catch(o=>{o instanceof Error?i(o):(n._queueRequest.call(n,s,i,t),n._waitTimeout===null&&(n._waitTimeout=setTimeout(n._processFIFO.bind(n),o.msBeforeNext)))})})}_queueRequest(t,n,s){const i=this;i._queue.length<i._maxQueueSize?i._queue.push({resolve:t,reject:n,tokens:s}):n(new ju(`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(s=>{n.resolve(s.remainingPoints),t._processFIFO.call(t)}).catch(s=>{s instanceof Error?(n.reject(s),t._processFIFO.call(t)):(t._queue.unshift(n),t._waitTimeout===null&&(t._waitTimeout=setTimeout(t._processFIFO.bind(t),s.msBeforeNext)))})}}const Ta=Ut;var rw=class{constructor(t,n){this._rateLimiter=t,this._burstLimiter=n}_combineRes(t,n){return t?new Ta(t.remainingPoints,Math.min(t.msBeforeNext,n?n.msBeforeNext:0),t.consumedPoints,t.isFirstInDuration):null}consume(t,n=1,s={}){return this._rateLimiter.consume(t,n,s).catch(i=>i instanceof Ta?this._burstLimiter.consume(t,n,s).then(o=>Promise.resolve(this._combineRes(i,o))).catch(o=>o instanceof Ta?Promise.reject(this._combineRes(i,o)):Promise.reject(o)):Promise.reject(i))}get(t){return Promise.all([this._rateLimiter.get(t),this._burstLimiter.get(t)]).then(([n,s])=>this._combineRes(n,s))}get points(){return this._rateLimiter.points}};const aw=Ut,lw=ys;class zu{constructor(t,n,s){this.key=t,this.points=n,this.expire=s}}const cw=25,uw=25;class dw extends lw{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(s=>{this.tableCreated=!0,this._setTTL().finally(()=>{typeof n=="function"&&n()})}).catch(s=>{if(typeof n=="function")n(s);else throw s})}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:cw,WriteCapacityUnits:t&&t.writeCapacityUnits?t.writeCapacityUnits:uw}};try{return await this.client.createTable(n)}catch(s){if(s.__type&&s.__type.includes("ResourceInUseException"))return null;throw s}}async _get(t){if(!this.tableCreated)throw new Error("Table is not created yet");const n={TableName:this.tableName,Key:{key:{S:t}}},s=await this.client.getItem(n);return s.Item?new zu(s.Item.key.S,Number(s.Item.points.N),Number(s.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(s){if(s.__type&&s.__type.includes("ConditionalCheckFailedException"))return!1;throw s}}async _upsert(t,n,s,i=!1,o={}){if(!this.tableCreated)throw new Error("Table is not created yet");const r=Date.now(),a=r/1e3,l=s>0?(r+s)/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:l.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:l.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 zu(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,s){const i=new aw;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!=-1?Math.max(s.expire*1e3-Date.now(),0):-1,i}}var fw=dw;const pw=ys,hw=Ut;class mw extends pw{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,s){const i=new hw;let o=s;return i.isFirstInDuration=o.points===n,i.consumedPoints=o.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=o.expire!==null?Math.max(new Date(o.expire).getTime()-Date.now(),0):-1,i}_upsert(t,n,s,i=!1){if(!this.prismaClient)return Promise.reject(new Error("Prisma client is not established"));const o=new Date,r=s>0?new Date(o.getTime()+s):null;return this.prismaClient.$transaction(async a=>{const l=await a[this.modelName].findFirst({where:{key:t}});if(l){const u=i||!l.expire||l.expire<=o||r===null;return a[this.modelName].update({where:{key:t},data:{points:u?n:l.points+n,...u&&{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 gw=mw;const yw=$y,ww=Sy,bw=Ty,_w=My,{RateLimiterClusterMaster:vw,RateLimiterClusterMasterPM2:xw,RateLimiterCluster:Cw}=Jy;var Vu={RateLimiterRedis:yw,RateLimiterMongo:ww,RateLimiterMySQL:bw,RateLimiterPostgres:_w,RateLimiterMemory:Du,RateLimiterMemcache:ew,RateLimiterClusterMaster:vw,RateLimiterClusterMasterPM2:xw,RateLimiterCluster:Cw,RLWrapperBlackAndWhite:tw,RateLimiterUnion:sw,RateLimiterQueue:ow,BurstyRateLimiter:rw,RateLimiterRes:Ut,RateLimiterDynamo:fw,RateLimiterPrisma:gw};const $w="pan115_api",Wu={points:5,duration:1,execEvenly:!0};function Ku(e){return{clientId:$w,rateLimit:Wu,msDelayAdjustment:30,...e}}function Gu(e){const t=Ku(e),n=bu.create();gs(n,{retries:5,shouldResetTimeout:!0,retryDelay:i=>(console.log(`[axios] Retry ${i}...`),i*1e3)});const s=new Vu.RateLimiterMemory(t.rateLimit);return n.interceptors.request.use(async i=>{try{const o=await s.consume(t.clientId);return i}catch(o){if(console.warn("[axios] RateLimiter:",o),o instanceof Vu.RateLimiterRes){const r=o.msBeforeNext+t.msDelayAdjustment;return console.log(`[axios] Delay ${r}ms for next request...`),await Et(r),i}else throw new ey(o)}},i=>(console.warn("[axios] onRejected:",i),Promise.reject(i))),n}let Yu=Gu();async function Ew(e){Yu=e}const kt=Yu;async function Ju(e,t,n){const s=new URLSearchParams({page:e.toString(),uid:n.toString(),sign:t,time:xi().toString()});return(await kt.post("https://115.com/web/lixian/?ct=lixian&ac=task_lists",s,{withCredentials:!0,timeout:6e4})).data}async function Qu(){return(await kt.get(`https://115.com/?ct=offline&ac=space&_=${Date.now()}`,{timeout:3e4,withCredentials:!0})).data}async function Xu(){const t=(await kt.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 Zu(e){const t=yo(e),s=(await kt.get("https://webapi.115.com/files?"+t,{timeout:12e4,withCredentials:!0})).data;if(s.state)return s;throw new Error(s.error)}async function ed(e,t=500){const n=await ws(e,t);for(let s=0;s<n.length;s++){const i=n[s];if(i.fid)continue;const o=En({cid:i.cid,limit:e.limit||115}),r=await ed(o,t);i.children=r}return n}async function ws(e,t=500){let n=[],s=0;for(;;){e.offset=s;const i=await Zu(e);if(!i.data||!i.data.length||(n=[...n,...i.data],s+=e.limit,s>=i.count))break;await Et(t)}return n}async function kw(e){const t=yo(e),n=await kt.get("https://webapi.115.com/files/search?"+t,{timeout:12e4,withCredentials:!0});if(n.data==="")throw new vu;const s=n.data;if(s.state)return s;throw new Ca(s.error)}async function Sw(e,t=500,n=!1){let s=[],i=0,o=e.limit;const r=1e4,a=115,l=r-r%o;let u=o;for(;;){if(n){if(i>=l&&i<r){const h=r-l;u=Math.min(h,u)}i>=r&&(u=a)}e.offset=i,e.limit=u;const f=await kw(e);if(!f.data||!f.data.length||(s=[...s,...f.data],i+=u,i>=f.count))break;await Et(t)}return s}async function La(e,t){const n=new URLSearchParams({pid:e,ignore_warn:"1"});return t.forEach((i,o)=>{n.append(`fid[${o}]`,i)}),(await kt.post("https://webapi.115.com/rb/delete",n,{timeout:12e4,withCredentials:!0})).data}async function td(e,t,n,s){let i=0,o=0;for(;;){const r=t.slice(i,i+n);if((await La(e,r)).state&&(o+=r.length),i+=n,i>=t.length)break;await Et(s)}return o}async function nd(e,t){const n=new URLSearchParams({pid:e,cname:t});return(await kt.post("https://webapi.115.com/files/add",n,{timeout:12e4,withCredentials:!0})).data}async function Aw(e,t){const n=new URLSearchParams({pid:e});return t.forEach((i,o)=>{n.append(`fid[${o}]`,i)}),(await kt.post("https://webapi.115.com/files/move",n,{timeout:12e4,withCredentials:!0})).data}async function Pw(e){const t={path:e};return(await kt.get("https://webapi.115.com/files/getid?"+yo(t),{timeout:12e4,withCredentials:!0})).data}async function St(e){const t=new URLSearchParams({cid:e});return(await kt.get("https://webapi.115.com/category/get?"+t.toString(),{timeout:12e4,withCredentials:!0})).data}async function Oa(e,t,n,s){const i={uid:s.toString(),sign:t.sign,time:xi().toString()};n&&(i.flag="1");const o=ty(i);return e.forEach((a,l)=>{o.append(`hash[${l}]`,a)}),(await kt.post("https://115.com/web/lixian/?ct=lixian&ac=task_del",o,{timeout:12e4,withCredentials:!0})).data}async function Iw(e){return new Promise((t,n)=>{const s=JSON.stringify({pickcode:e}),i=Math.floor(Date.now()).toString(),o=new iy,{data:r,key:a}=o.encode(s,i);ta({method:"POST",url:`https://proapi.115.com/app/chrome/downurl?t=${i}`,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","User-Agent":navigator.userAgent,Accept:"application/json, text/javascript, */*; q=0.01"},data:`data=${encodeURIComponent(r)}`,responseType:"json",onload:l=>{const u=JSON.parse(l.responseText);if(u.state){const f=o.decode(u.data,a);if(f){const h=JSON.parse(f),y=Object.keys(h)[0],_=h[y];_.file_id=y;const b=l.responseHeaders.split(/[\r\n]+/).filter(E=>E.match(/set-cookie/i));b.length&&(b.forEach((E,T)=>{b[T]=E.replace(/set-cookie:[\s]*/i,"").split(";")[0]}),_.cookie=b.join("; ")),t(_)}else n({state:!1,error:"解密失败"})}else n(u)},onerror:l=>{n(l)}})})}async function Tw(e){if(!(await St(e)).play_long)throw new Error("该目录下没有可以播放的媒体文件![by_attr]");const s=(await ws(En({cid:e,limit:1150}))).find(i=>i.play_long&&i.play_long>0);if(!s)throw new Error("该目录下没有可以播放的媒体文件![by_files]");return Ii(s)}async function Lw(e,t){if(e=typeof e=="string"?e:e.join(","),!t){if(e.includes(","))throw new Error("target参数不能为空!");t=e}t=t.startsWith("U_1_")?t:`U_1_${t}`;const n=new URLSearchParams({file_ids:e,target:t});return(await kt.post("https://webapi.115.com/files/export_dir",n,{timeout:12e4,withCredentials:!0})).data}async function Ow(e,t=1e3,n=12e4){const s=new URLSearchParams({export_id:e.toString()}),i=async()=>(await kt.get("https://webapi.115.com/files/export_dir?"+s.toString(),{timeout:12e4,withCredentials:!0})).data;async function o(r){const a=await i();a.data&&!!a.data.pick_code&&r(a)}try{return await qn(o,t,n)}catch(r){throw new Error(`导出目录树结果获取失败:${r.message}`)}}async function Dw(e){/^\d+$/.test(e.target)&&(e.target=`U_1_${e.target}`);const t=yo(e);return(await kt.post("https://uplb.115.com/3.0/sampleinitupload.php",t,{timeout:12e4,withCredentials:!0})).data}async function Mw(e,t){const n=await Dw(t),s=new FormData;s.append("name",t.filename),s.append("key",n.object),s.append("policy",n.policy),s.append("OSSAccessKeyId",n.accessid),s.append("success_action_status","200"),s.append("callback",n.callback),s.append("signature",n.signature),s.append("file",e);const i=n.host.replace(/^http:/,"https:");return(await kt.post(i,s,{timeout:18e5})).data}async function Rw(e,t,n=!1){var o;const s=new Map;if(!e.length)return s;t=t||await Fs();let i=new Map;n||(oe({text:"正在获取上级目录路径...",timer:0}),pe.showLoading());try{i=await Zw(e),n||pe.close()}catch(r){return console.error(r),n||oe({text:`获取上级目录路径失败: ${r}`,timer:1200,icon:"error"}),s}finally{n||pe.hideLoading()}if(i.size===0)return s;for(let r=0;r<e.length;r++){const a=(o=i.get(e[r].parentId))==null?void 0:o.slice(1).join("/"),l=e[r].name,u=Cc(a+"/"+l,!0),f=e[r].isFile?await Us(t,u,wo.play):await oa(t,u);s.set(u,f)}return console.log("[buildCloudDriveUrlsForFileItems] pathToUrl:",s),s}async function Nw(e,t){const n=await Us(e,t);return(await Tm({method:"HEAD",url:n})).status===200}async function Bw(e,t,n,s){const o=`waitFileExist_${Dc()} path: ${t}`;console.time(o);async function r(a){const l=await Nw(e,t);l===!0&&a(l)}try{await qn(r,n,s)}catch{throw new Error(`[waitFileExist] 检查文件存在超时!文件路径: ${t}`)}finally{console.timeEnd(o)}}async function Fw(e){let t=`#EXTM3U
`;for(const[n,s]of e)t+=`#EXTINF:0,${n}
${s}
`;return t}var Wn=(e=>(e.unix="/",e.windows="\\",e))(Wn||{});function Io(e,t="/"){return e.map((n,s)=>s===0?n:To(n,t)).join(t)}function To(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 Uw(e){return e.startsWith("/")}function jw(e){return e===""||e==="/"||e==="\\"}function Da(e,t,n="/"){if(Uw(t))return t;const s=new URL(e,"http://example.com");s.pathname=Hw(s.pathname,t);let i=decodeURIComponent(s.pathname);return To(i,n)}function Hw(e,t){const n=e.endsWith("/")?e:e+"/",s=t.startsWith("/")?t.slice(1):t;return n+s}function qw(e,t=/^\w+$/){const n=e.lastIndexOf(".");if(n===-1)return"";const s=e.slice(n+1);return t&&!t.test(s)?"":s}async function gt(e=!0){const t=Wt().GetCurWangPanCid();return!t&&e?(Wt().Core.MinMessage.Show({text:'不支持"根目录"!',timeout:1e3}),""):t}async function zw(e,t){let n=$(`li.temp-el[cate_id="${e}"]`);if(!n.length){const s=`
      <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=$(s)}n.attr("title",t.file_name),n.find("a.name > span").text(t.file_name);for(let s in t){const i=typeof t[s];["string","number"].indexOf(i)>-1&&n.attr(s,t[s])}return n.attr("cate_id",e),n.attr("p_id",t.paths[t.paths.length-1].file_id),n}async function Vt(e){const t=await Pi(e);return Ii(t)}async function Pi(e){const t=e.attr("file_size"),n=e.attr("iv")==="1",s=Yn(),i=e.attr("file_id")||"",o=!!i,r=e.attr("c")||"",a=e.attr("fvs")||"",l={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,c:r?parseInt(r):0,fuuid:e.attr("fuuid"),fvs:a?parseInt(a):0};let u={n:l.n};if(!s)u={fid:i,cid:(o?e.attr("cid"):e.attr("cate_id"))||"",pid:o?"":e.attr("p_id")||"",...l};else if(u={fid:i,cid:(o?e.attr("cid"):e.attr("cate_id"))||"",...l},!o){const f=e.find(".file-directory a[cid]");if(f.length)u.pid=f.attr("cid");else throw console.warn("无法获取上级目录ID!",e),new Error("无法获取上级目录ID!")}return{...u,...l}}async function Kn(e){const t=await Yw(e);return Vw(t)}async function Vw(e){const t=[];for(let n=0;n<e.length;n++){const s=await Ii(e[n]);t.push(s)}return t}async function Ii(e){var s,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:(s=e.s)==null?void 0:s.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=go(n.sizeBytes||0),n}function Wt(){return unsafeWindow.TOP?unsafeWindow.TOP:unsafeWindow}function Ww(){return unsafeWindow.top===unsafeWindow?unsafeWindow.Ext:unsafeWindow.top.Ext}async function Kw(e){return new Promise((t,n)=>{Wt().Core.DataAccess.Dir.GetDetail("1",e,s=>t(s))})}async function Gw(){const e=await gt(),t=await Kw(e),n=await zw(e,t);return n.addClass("ce-temp-cur-dir"),n}async function Ti(){return window.top!==window?$(document):$('iframe[name="wangpan"], .wrap-view iframe:eq(0)').contents()}async function Ws(){return(await Ti()).find(".list-contents, .list-thumb")}async function sd(e){const t=await Ws();return e?t.find("li.selected:not(.ce-temp-cur-dir)"):t.find("li:not(.ce-temp-cur-dir)")}async function Yw(e){const t=await sd(e),n=[];for(let s=0;s<t.length;s++){const i=t.eq(s),o=await Pi(i);n.push(o)}return n}async function Ma(e="/"){const t=await id();return e+t.slice(1).join(e)}async function id(){const e=await Ti(),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 Jw(){const e=await gt();(await Ws()).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 An(e=!1){const t=await gt();if(!t)return null;const n=await Ws(),s=await Gw();return e||s.hide(),n.find(`li[cate_id="${t}"]`).length||n.append(s),s}async function Ra(e,t,n){n&&await Jw(),Wt().Core.FileMenu.DoEvent([e],t,null)}function Qw(e,t=""){return`https://115.com/?ct=preview&ac=location&pickcode=${e}&sha1=${t}`}function Li(e){return`https://115.com/?${new URLSearchParams({cid:e}).toString()}&offset=0&mode=wangpan`}function Gn(e=location.href){return e.includes("ac=userfile")}function Yn(e=location.href){return e.includes("ac=search")}function Na(e,t=""){const n={aid:"1",cid:e.cid||"",old_cid:e.cid||"",old_cid_name:t,search_value:encodeURIComponent(e.search_value),ct:"file",ac:"search",is_wl_tpl:"1"};return"https://115.com/?url="+encodeURIComponent(`/?${Om(n)}`)+"&submode=wangpan&mode=search"}function Ba(e){return`https://v.anxia.com/?${new URLSearchParams({pickcode:e,share_id:"0"}).toString()}`}async function Xw(e){unsafeWindow.Main.ReInstance({type:e.type,offset:0,o:Hc.userPtime,asc:ra.false,star:e.star,suffix:e.suffix})}async function od(){return(await Ws()).find("li.selected")}async function rd(){const e=await od();return e?await Pi(e):null}function ad(e){return e.replace(/[/\\:*?"<>|]/g,"_")}async function Lo(e){const n=(await St(e.id)).paths.slice(1).map(o=>o.file_name).join("/"),s=ad(e.name);return`/${n}/${s}`.replace(/^[\/]+/g,"/")}async function Zw(e,t=100){var o;const n=new Map;for(const r of e){const a=r.parentId;if(!a)throw new Error(`文件"${r.name}"没有父级目录ID!`);n.has(a)?(o=n.get(a))==null||o.push(r):n.set(a,[r])}const s=[];for(const r of n.values())s.push(r[0]);const i=new Map;for(const r of s){const a=await St(r.id);await Et(t),i.set(r.parentId,a.paths.map(l=>l.file_name))}return i}async function eb(e,t=100){var o;const n=new Map;for(const r of e){const a=r.parentId;if(!a)throw new Error(`文件"${r.name}"没有父级目录ID!`);n.has(a)?(o=n.get(a))==null||o.push(r):n.set(a,[r])}const s=[];for(const r of n.values())s.push(r[0]);const i=new Map;for(const r of s){const a=await St(r.id);await Et(t),i.set(r.parentId,a.paths)}return i}async function tb(e,t){const n=new File([e],t.filename,{type:"text/plain"});return Mw(n,t)}async function nb(e,t,n){const s=await Rw(e),i=await Fw(s);n=n||Dc();let o=t;return/m3u8$/.test(n)||(n+=".m3u8"),await tb(i,{filename:n,target:o})}const Fa=new Map;async function Ks(e,t=!0){if(e=To(e,Wn.unix),e=e.replace(/^[\/]+/,"").replace(/[\/]+$/,""),t&&Fa.has(e))return Fa.get(e);if(e===""||e==="/")return"0";const n=await Pw(e);if(!n.state)throw new Error(`根据路径"${e}"获取目录ID失败: ${n.error}`);if(n.id&&n.id.toString()!=="0")return Fa.set(e,n.id.toString()),n.id.toString();throw new $a(`根据路径"${e}"获取目录ID失败: 目录不存在!`)}async function sb(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(o=>o);let s="0",i="";for(const o of n){i+="/"+o;let r="";try{r=await Ks(i,!0),t.pathToId.set(i,r)}catch(a){if(a instanceof $a){const l=await nd(s,o);if(!l.state)throw new Error(`创建目录"${o}"失败: ${l.error} - ${l.error}`);r=l.cid.toString()}else throw a}s=r,t.pathToId.set(i,r)}return t.id=s,t}async function ib(e,t,n=!0){let s="";const i=await nd(t,e);if(i.state)s=i.cid.toString();else{if(i.errno===xu.exist&&n){const o=await St(t);if(!o.pick_code)throw new Error(`获取目录"${t}"属性失败: ${o.errno} - ${o.error}`);const r=[...o.paths.slice(1).map(a=>a.file_name),o.file_name,e].join("/");return await Ks(r,!0)}throw new Error(`创建目录"${e}"失败: ${i.errno} - ${i.error}`)}return s}async function ld(e){if(!Yn()||!e.enableInSearch)return;const t=await bt("#js_data_list"),n=[{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}],s=r=>{let a="";for(const l of r)!l.enabled||(a+=l.body);return a},i=()=>{const r="ce-menu-init",a=document.querySelectorAll(`li[rel="item"]:not(.${r})`),l=s(n);for(let u=0;u<a.length;u++){const f=a[u];if(f.querySelector(".file-opr"))continue;const h=document.createElement("div");h.className="file-opr",h.setAttribute("rel","menu"),h.innerHTML=l,f.classList.add(r),f.appendChild(h)}};i(),new MutationObserver(async([r])=>{r.type==="childList"&&i()}).observe(t,{childList:!0})}async function ob(e){if(!e.hideSelectionMenuLabel)return;const t=await bt("#js_operate_box");new MutationObserver(async([s])=>{if(s.type==="childList"){const i=t.querySelectorAll("li[menu]");for(let o=0;o<i.length;o++){const r=i[o],a=r.textContent;r.setAttribute("title",a||"")}}}).observe(t,{childList:!0}),t.classList.add("only-icon")}async function rb(e,t){const n=[],s=await Ys(),i=s.keyToTriggerManual;for(const o of t){const r=mo(e,{key:`_ce_s_${o.key}`,label:o.label,icon:o.icon,title:o.memo,onClick:async(a,l)=>{l.stopPropagation(),l.preventDefault();try{let u;if(i){const b=l;(i===yn.alt&&b.altKey||i===yn.ctrl&&b.ctrlKey||i===yn.shift&&b.shiftKey||i===yn.meta&&b.metaKey)&&(u={names:[ja.manual],position:s.injectManualFuncPosition})}const f=$(l.target).closest("li"),h=await Vt(f),y=await Fs(),_=await Ro(h,o,y,u);if(console.log("[search url]",_),!_)throw new Error("无法获取有效的搜索链接!");km(_,{active:!o.openInBackground})}catch(u){console.error(u),oe({title:"搜索失败",text:u.toString(),icon:"error"})}}});n.push(r)}return n}async function Ua(e,t){if(console.log("[playDirOnAnxia]",e,t),!t)try{oe({title:"正在查找可播放的文件...",text:"请稍等...",icon:"info"}),pe.showLoading(),t=await Tw(e),console.log("[playDirOnAnxia] file",t)}catch(s){console.error(s),oe({title:"播放失败",text:s.toString(),icon:"error"});return}t||oe({title:"播放失败",text:"没有在该目录下找到可播放的文件![file_null]",icon:"error"});const n=Ba(t.pickCode);window.open(n,"_blank","noopener noreferrer")}async function ab(e,t){const n=[],s=await Ys(),i=s.keyToTriggerManual;for(const o of t){const r=mo(e,{key:`_ce_p_${o.key}`,label:o.label,icon:o.icon,title:o.memo,onClick:async(a,l)=>{l.stopPropagation(),l.preventDefault();try{let u;if(i){const b=l;(i===yn.alt&&b.altKey||i===yn.ctrl&&b.ctrlKey||i===yn.shift&&b.shiftKey||i===yn.meta&&b.metaKey)&&(u={names:[ja.manual],position:s.injectManualFuncPosition})}const f=$(l.target).closest("li"),h=await Vt(f),y=await Fs(),_=await Ro(h,o,y,u);if(h.isDir&&_.includes("v.anxia.com")){Ua(h.id);return}if(console.log("[play url]",_),!_)throw new Error("无法获取有效的播放链接!");window.open(_,"_blank","noopener noreferrer")}catch(u){console.error(u),oe({title:"播放失败",text:u.toString(),icon:"error"})}}});n.push(r)}return n}var Kt=(e=>(e[e.full=0]="full",e[e.pure=1]="pure",e[e.fullUnique=2]="fullUnique",e[e.pureUnique=3]="pureUnique",e))(Kt||{});async function Oo(e,t){if(t===0)return e;if(t===2)return Array.from(new Set(e));const n=[];for(const s of e){const i=s.replace(/\.[^.]+$/,"");t===1?n.push(i):t===3&&(n.includes(i)||n.push(i))}return n}var Gt=(e=>(e[e.unixPath=0]="unixPath",e[e.winPath=1]="winPath",e[e.unixParentPath=2]="unixParentPath",e[e.winParentPath=3]="winParentPath",e))(Gt||{});async function Do(e,t,n){const s=n===1||n===3;let o=n===2||n===3?t.replace(/\/[^/]+$/,""):t;return o.startsWith("/")||(o="/"+o),s&&(o=o.replace(/\//g,"\\")),o}async function lb(e){return async(t,n)=>{const s=await gt(),i=await Ti(),o=e?"li[file_id].selected":"li[file_id]",r=i[0].querySelectorAll(o);if(!r.length){oe({title:"文件移动到同名目录",text:e?"当前目录没有选中文件":"当前目录没有文件",icon:"warning"});return}let a=e?`当前已选中${r.length}个文件,是否继续?`:`当前目录共有${r.length}个文件,是否继续?`;a+=`<br><div style="text-align:left">
      <b>处理逻辑:</b>
      <p>0.「同名目录」取自纯文件名(不带后缀名)。</p>
      <p>1.如果同名目录已存在,会直接使用已存在的目录。</p>
      <p>2.同名目录相同的文件,会被移动到同一个目录里面。</p>
      <p class="text-primary">示例: <span>movie.mp4</span> 的同名目录为 <span>movie</span></p>
      </div>`;const{value:l}=await pe.fire({title:"文件移动到同名目录",html:a,icon:"warning",showCancelButton:!0,confirmButtonText:"继续",cancelButtonText:"取消"});if(!!l){pe.fire({title:"文件移动到同名目录",html:"正在处理...",didOpen:()=>{pe.showLoading()}});for(let u=0;u<r.length;u++){const f=r[u],h=await Vt($(f));if(!h.isFile)continue;const y=h.name,_=y.replace(/\.[^\.]+$/,""),b=`${u+1} / ${r.length} - `+Math.round(u/r.length*100)+"%";pe.update({html:`${b} 正在为文件「${y}」创建目录「${_}」`});const E=await ib(_,s,!0);pe.update({html:`创建目录「${_}」成功。id=${E}`}),pe.update({html:`${b} 正在移动文件「${y}」到目录「${_}」`}),await Aw(E,[h.id]),await Et(500)}pe.hideLoading(),pe.update({html:"处理完成。刷新列表后查看最新的文件数据。",icon:"success"})}}}function cb(e,t){const n=[];for(let s=t?1:0;s<e.length;s++)n.push(e[s].file_name);return n}async function cd(e,t){const n=await eb(e),s=[];for(let i=0;i<e.length;i++){const o=n.get(e[i].parentId);if(!o)throw new Error(`无法获取文件 "${e[i].name}" 的上级目录路径!`);const r=cb(o,!0),a=Io([...r,e[i].name],Wn.unix);s.push(await Do(e[i],a,t))}return s}async function ud(e){try{const n=+(await St(e.id)).folder_count+1;oe({text:`正在获取文件列表数据... 目录数量: ${n}。请保持当前页面在当前浏览器窗口处于激活状态,不要做其他网盘操作。`,timer:0}),pe.showLoading();const s=await ed(En({cid:e.id,limit:1150}),3e3);console.log("[tree]",s);const i=`115-dir_list_data-${e.id}-${ad(e.name)}.json`;Ci(JSON.stringify(s),i),oe({text:`获取文件列表数据成功,已保存为 ${i}`,timer:0,icon:"success",showConfirmButton:!0})}catch(t){console.error(t),oe({text:`获取文件列表数据失败: ${t}`,timer:0,icon:"error",showCloseButton:!0})}finally{pe.hideLoading()}}async function Mo(e){let t="";if(e.id==="0")t="/";else{const i=await Lo(e);t=await Do(e,i,e.isDir?0:2)}const n=await Fs(),s=await Hm(n,t);console.log("url: ",s),window.open(s,"_blank","noopener noreferrer"),oe({title:"在CloudDrive2中查看",text:`已打开CloudDrive2链接: ${s}`,icon:"success"})}function dd(e){const t=e.target;e.key==="a"&&(e.ctrlKey||e.metaKey)&&t.select()}function fd(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement}function ub(e){e.addEventListener("keydown",t=>{const n=t.target;fd(n)&&dd(t)})}function pd(e,t=.2,n=.5){e.style.transition=`opacity ${n}s`,e.style.opacity=t.toString(),setTimeout(()=>{e.remove()},500)}function Yt(e){const t=document.createElement("div");if(t.innerHTML=e.trim(),t.childNodes.length!==1||!(t.firstChild instanceof HTMLElement))throw new Error("Invalid HTML string. It must contain exactly one root element.");return t.firstChild}const Oi=pe.mixin({toast:!0,position:"top-end",showConfirmButton:!1,timer:3e3,timerProgressBar:!0,didOpen:e=>{e.addEventListener("mouseenter",pe.stopTimer),e.addEventListener("mouseleave",pe.resumeTimer)},customClass:"swal-toast"});async function db(e,t){e.addEventListener("keydown",n=>{const s=n.target;if(!fd(s))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&&pe.clickConfirm()})}var ja=(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))(ja||{});const fb=[{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 pb(e,t,n){const{names:s,position:i}=t;let o=[];return i==="first"?o=[...s,...e]:o=[...e,...s],n?Array.from(new Set(o)):o}async function Ro(e,t,n,s){var u;let i=t.url;const o={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,l=i.match(a);if(l){const f=["file_path","file_dir","clouddrive_stream_url","clouddrive_down_url","clouddrive_playlist_url"];for(const h of l){const y=h.replace(/[{}]/g,"").split(":")[0],_=h.replace(/[{}]/g,"").replace(/^[^:]+:/,"");let b=((u=e[o[y]])==null?void 0:u.toString())||"",E="";switch(f.includes(y)&&(E=await Lo(e)),y){case"pure_name":r?b=e.name.replace(/\.[^.]+$/,""):b=e.name;break;case"file_path":b=E;break;case"file_dir":b=E.replace(/\/[^/]+$/,"");break;case"clouddrive_stream_url":r?b=await Us(n,E,wo.download):b=await oa(n,E);break;case"clouddrive_down_url":b=await Us(n,E,wo.download);break;case"clouddrive_playlist_url":let T="";r?T=E.replace(/\/[^/]+$/,""):T=E,b=await oa(n,T);break;case"user_agent":b=navigator.userAgent;break}if(b=b.toString(),_){let T=_.split(":");s&&(T=pb(T,s,!1)),console.log(`[buildCustomUrl] functions: ${_}, after merge: ${T.join(":")}`);for(const D of T)switch(D){case"search":b=Na({search_value:b});break;case"encode":b=encodeURIComponent(b);break;case"base64":b=wc(b);break;case"base64safe":b=wc(b,!0);break;case"upper":b=b.toUpperCase();break;case"lower":b=b.toLowerCase();break;case"number":b=b.replace(/\D/g,"");break;case"manual":let{isConfirmed:I,value:P}=await pe.fire({title:"手动输入",text:"按下「Ctrl + 回车」或「Command + 回车」确认",input:"textarea",inputValue:b,showCancelButton:!0,inputValidator:V=>V?null:"输入不能为空!",didOpen:V=>{ub(V),db(V,"meta+enter")}});if(!I)throw new Error("已取消手动输入。");if(P=(P==null?void 0:P.trim())||"",P==="")throw new Error("输入不能为空!");b=P;break}}i=i.replace(h,b)}}return t.mutation?await hb(i,e,t,n):i}async function hb(e,t,n,s){return await new Function("payload",n.mutation)({url:e,file:t,customUrl:n,cloudDriveConfig:s})}var Pn=(e=>(e.search="search",e.play="play",e))(Pn||{});const mb=st.menuCustomUrlsForSearch,gb=st.menuCustomUrlsForPlay,hd={search:mb,play:gb};async function Gs(e){return await et.get(hd[e],[])}async function md(e,t){await et.set(hd[e],t)}function yt(e){return{enabled:!0,key:"",label:"",icon:"",memo:"",extraMemo:"",url:"",openInBackground:!1,...e}}var yn=(e=>(e.none="none",e.alt="alt",e.ctrl="ctrl",e.shift="shift",e.meta="meta",e))(yn||{});const gd=st.menu;function yb(e){return{enabled:!0,openInNewTab:!0,search:!0,play:!0,getDownloadUrl:!0,copyNames:!0,exportList:!1,viewInCloudDrive:!0,...e}}function wb(e){return{enabled:!0,copyNames:!0,viewInCloudDrive:!0,...e}}function bb(e){return{enabled:!0,moveToSelfNameDir:!0,copyNames:!0,play:!0,...e}}function _b(e){return{enabled:!0,rename:!0,delete:!0,play:!0,copyNames:!0,move:!0,copy:!0,copyTo:!0,viewProp:!0,showSubFolderSize:!0,exportList:!1,viewInCloudDrive:!0,...e}}function vb(e){return{enabled:!0,hideSelectionMenuLabel:!1,enableInSearch:!0,manageOfficialMenus:!1,keyToTriggerManual:"none",injectManualFuncPosition:"first",m3u8TempDir:".ce-m3u8-temp",[Be.listItemHover]:yb(e==null?void 0:e[Be.listItemHover]),[Be.listItemContext]:wb(e==null?void 0:e[Be.listItemContext]),[Be.selection]:bb(e==null?void 0:e[Be.selection]),[Be.dirContext]:_b(e==null?void 0:e[Be.dirContext]),...e}}async function Ys(){const e=vb(),t=await et.get(gd,e);return xc(e,t)}async function xb(e){await et.set(gd,e)}const sc=class{constructor(t){be(this,"menuType",Be.listItemHover);be(this,"injectDecider");be(this,"keyAttributeName","id");be(this,"key","");be(this,"label","");be(this,"icon","");be(this,"showIcon",!0);be(this,"title","");be(this,"onClick",async(t,n)=>{});be(this,"onMouseOver");be(this,"onMouseOut");be(this,"subItems",[]);be(this,"isDivider",!1);be(this,"menuItemTemplates",{[Be.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>'},[Be.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>'},[Be.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>'},[Be.listItemContextSub]:{body:'<span id="{key}" class="ce-menu list-item-context-menu-sub sub-item">{label}</span>',divider:'<span class="ce-menu-divider"></span>'},[Be.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>'},[Be.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>'},[Be.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>'},[Be.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 s=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>`),s.innerHTML=n.replace(/{key}/g,this.key).replace(/{label}/g,this.label).replace(/{icon}/g,i);const o=s.firstElementChild;if(o.setAttribute("title",this.title||""),this.onClick&&o.addEventListener("click",async r=>{this.onClick(this,r)}),this.onMouseOver&&o.addEventListener("mouseover",async r=>{this.onMouseOver&&this.onMouseOver(this,r)}),this.onMouseOut&&o.addEventListener("mouseout",async r=>{this.onMouseOut&&this.onMouseOut(this,r)}),this.subItems.length>0){const r=o.querySelector(".sub-items"),a=[];for(const l of this.subItems){const u=await l.render();a.push(u)}r==null||r.append(...a)}return o}async closeMenu(){unsafeWindow.Core.FileMenu.HideRight(),document.dispatchEvent(new CustomEvent(sc.EVENT_CLOSE_MENU,{detail:{menu:this}}))}async decorateContainer(t){}};let en=sc;be(en,"EVENT_CLOSE_MENU","__closeMenu");async function No(e,t){t.stopPropagation(),t.preventDefault();const n=t.target,s=$(n).closest(".ce-menu-parent"),i=s.find(".ce-menu-dropdown");s.addClass("ce-menu-dropdown-opened"),i.addClass("ce-menu-dropdown-active")}async function Bo(e,t){t.stopPropagation(),t.preventDefault();const n=t.target,s=$(n).closest(".ce-menu-parent"),i=s.find(".ce-menu-dropdown");s.removeClass("ce-menu-dropdown-opened"),i.removeClass("ce-menu-dropdown-active")}class At extends en{constructor(n){super(n);be(this,"menuType",Be.dirContext);this.onMouseOver=No,this.onMouseOut=Bo}}class Cb extends en{constructor(){super(...arguments);be(this,"menuType",Be.dirContextSub)}}class Fo extends en{constructor(n){super(n);be(this,"menuType",Be.listItemContext);this.onMouseOver=No,this.onMouseOut=Bo}}class Uo extends en{constructor(n){super(n);be(this,"menuType",Be.listItemHover);this.onMouseOver=No,this.onMouseOut=Bo}}class Js extends en{constructor(){super(...arguments);be(this,"menuType",Be.listItemHoverSub)}}class Ha extends en{constructor(n){super(n);be(this,"menuType",Be.selection);this.onMouseOver=No,this.onMouseOut=Bo}}class jo extends en{constructor(){super(...arguments);be(this,"menuType",Be.selectionSub)}}class Ho extends en{constructor(){super(...arguments);be(this,"isDivider",!0)}}class $b extends Ho{}class yd extends Ho{}class qa extends Ho{}class wd extends Ho{}class qo{constructor(t){be(this,"items");be(this,"siblingSelector");be(this,"position");be(this,"useObserver",!0);be(this,"observeTarget",document.body);be(this,"disposeObserverAfterInjection",!0);be(this,"menuType");be(this,"_observer");be(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 bt(this.observeTarget,800,864e5*7):this.observeTarget}async isMutationMatch(t){const n=t.addedNodes[0];if(n&&n.nodeType!==Node.ELEMENT_NODE)return!1;switch(this.menuType,Be.dirContext,this.menuType){case Be.listItemHover:return!0;case Be.listItemContext:return n&&n.classList.contains("context-menu")&&!!n.querySelector('[val="report"]');case Be.selection:return!0;case Be.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 s=t.addedNodes[0];switch(this.menuType){case Be.listItemHover:document.querySelectorAll("#js_data_list .list-contents > ul:not([ce-done]) > li .file-opr").forEach(i=>{n.push(i)});break;case Be.listItemContext:n=[s];break;case Be.selection:document.querySelectorAll("#js_top_panel_box #js_operate_box").forEach(i=>{n.push(i)});break;case Be.dirContext:n=[s];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 s=this.items.slice();this.position===ms.after&&(s=s.reverse());for(let i=0;i<s.length;i++){const o=s[i];if(!await this.shouldInjectMenuItem(t,o))continue;const r=await o.render();this.position===ms.before?n.insertAdjacentElement("beforebegin",r):n.insertAdjacentElement("afterend",r),await o.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 Eb extends qo{constructor(){super(...arguments);be(this,"menuType",Be.dirContext);be(this,"useObserver",!0);be(this,"observeTarget",document.body);be(this,"disposeObserverAfterInjection",!0)}}class kb extends qo{constructor(){super(...arguments);be(this,"menuType",Be.listItemContext)}}class Sb extends qo{constructor(n){super(n);be(this,"menuType",Be.listItemHover);be(this,"useObserver",!0);be(this,"observeTarget","#js_data_list");be(this,"disposeObserverAfterInjection",!1);this.handleLoadAll()}async inject(){const n=document.querySelector("#js_data_list");if(n){const s=n.querySelectorAll(".list-contents > ul:not([ce-done]) > li .file-opr");s.length&&await this.perform(Array.from(s))}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 s(i){const o=document.querySelector("#js_data_list .list-contents > ul > li");!o||o.querySelector(".ce-menu")||i(!0)}n.addEventListener("click",async i=>{i.preventDefault(),i.stopPropagation();const o=i.target;let r=!1;if((o.getAttribute("menu")==="load_all_file"||o.closest('[menu="load_all_file"]'))&&(r=!0),!r)return;console.log("[ListItemHoverMenuInjector.handleLoadAll] 点击了「加载全部」按钮"),await qn(s,500,3e5);const a=document.querySelector("#js_data_list .list-contents > ul");a==null||a.removeAttribute("ce-done");const l=document.querySelector("#js_data_list");if(l){const u=".list-contents > ul:not([ce-done]) > li .file-opr";if(!document.querySelector(u)){const h=await Ys();await ld(h)}const f=l.querySelectorAll(u);f.length&&await this.perform(Array.from(f))}})}async perform(n){await super.perform(n);const s=document.querySelector("#js_data_list .list-contents > ul");s==null||s.setAttribute("ce-done","")}}class Ab extends qo{constructor(){super(...arguments);be(this,"menuType",Be.selection);be(this,"useObserver",!0);be(this,"observeTarget","#js_top_panel_box #js_operate_box");be(this,"disposeObserverAfterInjection",!1)}}async function bd(e,t){return!!$(t).closest("li").attr("cate_id")}async function Pb(e,t){const n=$(t).closest("li");if(n.attr("cate_id")||n.attr("iv")==="1")return!0;const s=n.attr("ico");return s?Dm(s)||Rm(s)||Mm(s):!1}function za(e,t){const n=Object.create(null),s=e.split(",");for(let i=0;i<s.length;i++)n[s[i]]=!0;return t?i=>!!n[i.toLowerCase()]:i=>!!n[i]}function In(e){if(Te(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],i=at(s)?Ob(s):In(s);if(i)for(const o in i)t[o]=i[o]}return t}else{if(at(e))return e;if(Xe(e))return e}}const Ib=/;(?![^(]*\))/g,Tb=/:([^]+)/,Lb=/\/\*.*?\*\//gs;function Ob(e){const t={};return e.replace(Lb,"").split(Ib).forEach(n=>{if(n){const s=n.split(Tb);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Je(e){let t="";if(at(e))t=e;else if(Te(e))for(let n=0;n<e.length;n++){const s=Je(e[n]);s&&(t+=s+" ")}else if(Xe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Db(e){if(!e)return null;let{class:t,style:n}=e;return t&&!at(t)&&(e.class=Je(t)),n&&(e.style=In(n)),e}const Mb=za("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function _d(e){return!!e||e===""}function Rb(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Di(e[s],t[s]);return n}function Di(e,t){if(e===t)return!0;let n=xd(e),s=xd(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Mi(e),s=Mi(t),n||s)return e===t;if(n=Te(e),s=Te(t),n||s)return n&&s?Rb(e,t):!1;if(n=Xe(e),s=Xe(t),n||s){if(!n||!s)return!1;const i=Object.keys(e).length,o=Object.keys(t).length;if(i!==o)return!1;for(const r in e){const a=e.hasOwnProperty(r),l=t.hasOwnProperty(r);if(a&&!l||!a&&l||!Di(e[r],t[r]))return!1}}return String(e)===String(t)}function Va(e,t){return e.findIndex(n=>Di(n,t))}const me=e=>at(e)?e:e==null?"":Te(e)||Xe(e)&&(e.toString===Cd||!Ne(e.toString))?JSON.stringify(e,vd,2):String(e),vd=(e,t)=>t&&t.__v_isRef?vd(e,t.value):Xs(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,i])=>(n[`${s} =>`]=i,n),{})}:Zs(t)?{[`Set(${t.size})`]:[...t.values()]}:Xe(t)&&!Te(t)&&!$d(t)?String(t):t,tt={},Qs=[],on=()=>{},Nb=()=>!1,Bb=/^on[^a-z]/,zo=e=>Bb.test(e),Wa=e=>e.startsWith("onUpdate:"),Pt=Object.assign,Ka=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Fb=Object.prototype.hasOwnProperty,ze=(e,t)=>Fb.call(e,t),Te=Array.isArray,Xs=e=>Ri(e)==="[object Map]",Zs=e=>Ri(e)==="[object Set]",xd=e=>Ri(e)==="[object Date]",Ne=e=>typeof e=="function",at=e=>typeof e=="string",Mi=e=>typeof e=="symbol",Xe=e=>e!==null&&typeof e=="object",Ga=e=>Xe(e)&&Ne(e.then)&&Ne(e.catch),Cd=Object.prototype.toString,Ri=e=>Cd.call(e),Ub=e=>Ri(e).slice(8,-1),$d=e=>Ri(e)==="[object Object]",Ya=e=>at(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Vo=za(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Wo=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},jb=/-(\w)/g,wn=Wo(e=>e.replace(jb,(t,n)=>n?n.toUpperCase():"")),Hb=/\B([A-Z])/g,bs=Wo(e=>e.replace(Hb,"-$1").toLowerCase()),Ko=Wo(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ja=Wo(e=>e?`on${Ko(e)}`:""),Ni=(e,t)=>!Object.is(e,t),Go=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Yo=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Jo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},qb=e=>{const t=at(e)?Number(e):NaN;return isNaN(t)?e:t};let Ed;const zb=()=>Ed||(Ed=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let rn;class Vb{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=rn,!t&&rn&&(this.index=(rn.scopes||(rn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=rn;try{return rn=this,t()}finally{rn=n}}}on(){rn=this}off(){rn=this.parent}stop(t){if(this._active){let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.scopes)for(n=0,s=this.scopes.length;n<s;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 Wb(e,t=rn){t&&t.active&&t.effects.push(e)}function Kb(){return rn}const Qa=e=>{const t=new Set(e);return t.w=0,t.n=0,t},kd=e=>(e.w&Jn)>0,Sd=e=>(e.n&Jn)>0,Gb=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=Jn},Yb=e=>{const{deps:t}=e;if(t.length){let n=0;for(let s=0;s<t.length;s++){const i=t[s];kd(i)&&!Sd(i)?i.delete(e):t[n++]=i,i.w&=~Jn,i.n&=~Jn}t.length=n}},Qo=new WeakMap;let Bi=0,Jn=1;const Xa=30;let an;const _s=Symbol(""),Za=Symbol("");class el{constructor(t,n=null,s){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,Wb(this,s)}run(){if(!this.active)return this.fn();let t=an,n=Qn;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=an,an=this,Qn=!0,Jn=1<<++Bi,Bi<=Xa?Gb(this):Ad(this),this.fn()}finally{Bi<=Xa&&Yb(this),Jn=1<<--Bi,an=this.parent,Qn=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){an===this?this.deferStop=!0:this.active&&(Ad(this),this.onStop&&this.onStop(),this.active=!1)}}function Ad(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let Qn=!0;const Pd=[];function ei(){Pd.push(Qn),Qn=!1}function ti(){const e=Pd.pop();Qn=e===void 0?!0:e}function jt(e,t,n){if(Qn&&an){let s=Qo.get(e);s||Qo.set(e,s=new Map);let i=s.get(n);i||s.set(n,i=Qa()),Id(i)}}function Id(e,t){let n=!1;Bi<=Xa?Sd(e)||(e.n|=Jn,n=!kd(e)):n=!e.has(an),n&&(e.add(an),an.deps.push(e))}function Tn(e,t,n,s,i,o){const r=Qo.get(e);if(!r)return;let a=[];if(t==="clear")a=[...r.values()];else if(n==="length"&&Te(e)){const l=Number(s);r.forEach((u,f)=>{(f==="length"||f>=l)&&a.push(u)})}else switch(n!==void 0&&a.push(r.get(n)),t){case"add":Te(e)?Ya(n)&&a.push(r.get("length")):(a.push(r.get(_s)),Xs(e)&&a.push(r.get(Za)));break;case"delete":Te(e)||(a.push(r.get(_s)),Xs(e)&&a.push(r.get(Za)));break;case"set":Xs(e)&&a.push(r.get(_s));break}if(a.length===1)a[0]&&tl(a[0]);else{const l=[];for(const u of a)u&&l.push(...u);tl(Qa(l))}}function tl(e,t){const n=Te(e)?e:[...e];for(const s of n)s.computed&&Td(s);for(const s of n)s.computed||Td(s)}function Td(e,t){(e!==an||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function Jb(e,t){var n;return(n=Qo.get(e))===null||n===void 0?void 0:n.get(t)}const Qb=za("__proto__,__v_isRef,__isVue"),Ld=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Mi)),Xb=nl(),Zb=nl(!1,!0),e_=nl(!0),Od=t_();function t_(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=We(this);for(let o=0,r=this.length;o<r;o++)jt(s,"get",o+"");const i=s[t](...n);return i===-1||i===!1?s[t](...n.map(We)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){ei();const s=We(this)[t].apply(this,n);return ti(),s}}),e}function n_(e){const t=We(this);return jt(t,"has",e),t.hasOwnProperty(e)}function nl(e=!1,t=!1){return function(s,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&o===(e?t?w_:Hd:t?jd:Ud).get(s))return s;const r=Te(s);if(!e){if(r&&ze(Od,i))return Reflect.get(Od,i,o);if(i==="hasOwnProperty")return n_}const a=Reflect.get(s,i,o);return(Mi(i)?Ld.has(i):Qb(i))||(e||jt(s,"get",i),t)?a:_t(a)?r&&Ya(i)?a:a.value:Xe(a)?e?qd(a):ir(a):a}}const s_=Dd(),i_=Dd(!0);function Dd(e=!1){return function(n,s,i,o){let r=n[s];if(si(r)&&_t(r)&&!_t(i))return!1;if(!e&&(!or(i)&&!si(i)&&(r=We(r),i=We(i)),!Te(n)&&_t(r)&&!_t(i)))return r.value=i,!0;const a=Te(n)&&Ya(s)?Number(s)<n.length:ze(n,s),l=Reflect.set(n,s,i,o);return n===We(o)&&(a?Ni(i,r)&&Tn(n,"set",s,i):Tn(n,"add",s,i)),l}}function o_(e,t){const n=ze(e,t);e[t];const s=Reflect.deleteProperty(e,t);return s&&n&&Tn(e,"delete",t,void 0),s}function r_(e,t){const n=Reflect.has(e,t);return(!Mi(t)||!Ld.has(t))&&jt(e,"has",t),n}function a_(e){return jt(e,"iterate",Te(e)?"length":_s),Reflect.ownKeys(e)}const Md={get:Xb,set:s_,deleteProperty:o_,has:r_,ownKeys:a_},l_={get:e_,set(e,t){return!0},deleteProperty(e,t){return!0}},c_=Pt({},Md,{get:Zb,set:i_}),sl=e=>e,Xo=e=>Reflect.getPrototypeOf(e);function Zo(e,t,n=!1,s=!1){e=e.__v_raw;const i=We(e),o=We(t);n||(t!==o&&jt(i,"get",t),jt(i,"get",o));const{has:r}=Xo(i),a=s?sl:n?rl:Fi;if(r.call(i,t))return a(e.get(t));if(r.call(i,o))return a(e.get(o));e!==i&&e.get(t)}function er(e,t=!1){const n=this.__v_raw,s=We(n),i=We(e);return t||(e!==i&&jt(s,"has",e),jt(s,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function tr(e,t=!1){return e=e.__v_raw,!t&&jt(We(e),"iterate",_s),Reflect.get(e,"size",e)}function Rd(e){e=We(e);const t=We(this);return Xo(t).has.call(t,e)||(t.add(e),Tn(t,"add",e,e)),this}function Nd(e,t){t=We(t);const n=We(this),{has:s,get:i}=Xo(n);let o=s.call(n,e);o||(e=We(e),o=s.call(n,e));const r=i.call(n,e);return n.set(e,t),o?Ni(t,r)&&Tn(n,"set",e,t):Tn(n,"add",e,t),this}function Bd(e){const t=We(this),{has:n,get:s}=Xo(t);let i=n.call(t,e);i||(e=We(e),i=n.call(t,e)),s&&s.call(t,e);const o=t.delete(e);return i&&Tn(t,"delete",e,void 0),o}function Fd(){const e=We(this),t=e.size!==0,n=e.clear();return t&&Tn(e,"clear",void 0,void 0),n}function nr(e,t){return function(s,i){const o=this,r=o.__v_raw,a=We(r),l=t?sl:e?rl:Fi;return!e&&jt(a,"iterate",_s),r.forEach((u,f)=>s.call(i,l(u),l(f),o))}}function sr(e,t,n){return function(...s){const i=this.__v_raw,o=We(i),r=Xs(o),a=e==="entries"||e===Symbol.iterator&&r,l=e==="keys"&&r,u=i[e](...s),f=n?sl:t?rl:Fi;return!t&&jt(o,"iterate",l?Za:_s),{next(){const{value:h,done:y}=u.next();return y?{value:h,done:y}:{value:a?[f(h[0]),f(h[1])]:f(h),done:y}},[Symbol.iterator](){return this}}}}function Xn(e){return function(...t){return e==="delete"?!1:this}}function u_(){const e={get(o){return Zo(this,o)},get size(){return tr(this)},has:er,add:Rd,set:Nd,delete:Bd,clear:Fd,forEach:nr(!1,!1)},t={get(o){return Zo(this,o,!1,!0)},get size(){return tr(this)},has:er,add:Rd,set:Nd,delete:Bd,clear:Fd,forEach:nr(!1,!0)},n={get(o){return Zo(this,o,!0)},get size(){return tr(this,!0)},has(o){return er.call(this,o,!0)},add:Xn("add"),set:Xn("set"),delete:Xn("delete"),clear:Xn("clear"),forEach:nr(!0,!1)},s={get(o){return Zo(this,o,!0,!0)},get size(){return tr(this,!0)},has(o){return er.call(this,o,!0)},add:Xn("add"),set:Xn("set"),delete:Xn("delete"),clear:Xn("clear"),forEach:nr(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=sr(o,!1,!1),n[o]=sr(o,!0,!1),t[o]=sr(o,!1,!0),s[o]=sr(o,!0,!0)}),[e,n,t,s]}const[d_,f_,p_,h_]=u_();function il(e,t){const n=t?e?h_:p_:e?f_:d_;return(s,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?s:Reflect.get(ze(n,i)&&i in s?n:s,i,o)}const m_={get:il(!1,!1)},g_={get:il(!1,!0)},y_={get:il(!0,!1)},Ud=new WeakMap,jd=new WeakMap,Hd=new WeakMap,w_=new WeakMap;function b_(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function __(e){return e.__v_skip||!Object.isExtensible(e)?0:b_(Ub(e))}function ir(e){return si(e)?e:ol(e,!1,Md,m_,Ud)}function v_(e){return ol(e,!1,c_,g_,jd)}function qd(e){return ol(e,!0,l_,y_,Hd)}function ol(e,t,n,s,i){if(!Xe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const r=__(e);if(r===0)return e;const a=new Proxy(e,r===2?s:n);return i.set(e,a),a}function ni(e){return si(e)?ni(e.__v_raw):!!(e&&e.__v_isReactive)}function si(e){return!!(e&&e.__v_isReadonly)}function or(e){return!!(e&&e.__v_isShallow)}function zd(e){return ni(e)||si(e)}function We(e){const t=e&&e.__v_raw;return t?We(t):e}function Vd(e){return Yo(e,"__v_skip",!0),e}const Fi=e=>Xe(e)?ir(e):e,rl=e=>Xe(e)?qd(e):e;function Wd(e){Qn&&an&&(e=We(e),Id(e.dep||(e.dep=Qa())))}function Kd(e,t){e=We(e);const n=e.dep;n&&tl(n)}function _t(e){return!!(e&&e.__v_isRef===!0)}function fe(e){return x_(e,!1)}function x_(e,t){return _t(e)?e:new C_(e,t)}class C_{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:We(t),this._value=n?t:Fi(t)}get value(){return Wd(this),this._value}set value(t){const n=this.__v_isShallow||or(t)||si(t);t=n?t:We(t),Ni(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:Fi(t),Kd(this))}}function de(e){return _t(e)?e.value:e}const $_={get:(e,t,n)=>de(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const i=e[t];return _t(i)&&!_t(n)?(i.value=n,!0):Reflect.set(e,t,n,s)}};function Gd(e){return ni(e)?e:new Proxy(e,$_)}function E_(e){const t=Te(e)?new Array(e.length):{};for(const n in e)t[n]=S_(e,n);return t}class k_{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,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 Jb(We(this._object),this._key)}}function S_(e,t,n){const s=e[t];return _t(s)?s:new k_(e,t,n)}var Yd;class A_{constructor(t,n,s,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[Yd]=!1,this._dirty=!0,this.effect=new el(t,()=>{this._dirty||(this._dirty=!0,Kd(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=s}get value(){const t=We(this);return Wd(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}Yd="__v_isReadonly";function P_(e,t,n=!1){let s,i;const o=Ne(e);return o?(s=e,i=on):(s=e.get,i=e.set),new A_(s,i,o||!i,n)}function f5(e,...t){}function Zn(e,t,n,s){let i;try{i=s?e(...s):e()}catch(o){Ui(o,t,n)}return i}function ln(e,t,n,s){if(Ne(e)){const o=Zn(e,t,n,s);return o&&Ga(o)&&o.catch(r=>{Ui(r,t,n)}),o}const i=[];for(let o=0;o<e.length;o++)i.push(ln(e[o],t,n,s));return i}function Ui(e,t,n,s=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const r=t.proxy,a=n;for(;o;){const u=o.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](e,r,a)===!1)return}o=o.parent}const l=t.appContext.config.errorHandler;if(l){Zn(l,null,10,[e,r,a]);return}}I_(e,n,i,s)}function I_(e,t,n,s=!0){console.error(e)}let ji=!1,al=!1;const Ct=[];let bn=0;const ii=[];let Ln=null,vs=0;const Jd=Promise.resolve();let ll=null;function oi(e){const t=ll||Jd;return e?t.then(this?e.bind(this):e):t}function T_(e){let t=bn+1,n=Ct.length;for(;t<n;){const s=t+n>>>1;Hi(Ct[s])<e?t=s+1:n=s}return t}function cl(e){(!Ct.length||!Ct.includes(e,ji&&e.allowRecurse?bn+1:bn))&&(e.id==null?Ct.push(e):Ct.splice(T_(e.id),0,e),Qd())}function Qd(){!ji&&!al&&(al=!0,ll=Jd.then(tf))}function L_(e){const t=Ct.indexOf(e);t>bn&&Ct.splice(t,1)}function Xd(e){Te(e)?ii.push(...e):(!Ln||!Ln.includes(e,e.allowRecurse?vs+1:vs))&&ii.push(e),Qd()}function Zd(e,t=ji?bn+1:0){for(;t<Ct.length;t++){const n=Ct[t];n&&n.pre&&(Ct.splice(t,1),t--,n())}}function ef(e){if(ii.length){const t=[...new Set(ii)];if(ii.length=0,Ln){Ln.push(...t);return}for(Ln=t,Ln.sort((n,s)=>Hi(n)-Hi(s)),vs=0;vs<Ln.length;vs++)Ln[vs]();Ln=null,vs=0}}const Hi=e=>e.id==null?1/0:e.id,O_=(e,t)=>{const n=Hi(e)-Hi(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function tf(e){al=!1,ji=!0,Ct.sort(O_);const t=on;try{for(bn=0;bn<Ct.length;bn++){const n=Ct[bn];n&&n.active!==!1&&Zn(n,null,14)}}finally{bn=0,Ct.length=0,ef(),ji=!1,ll=null,(Ct.length||ii.length)&&tf()}}function D_(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||tt;let i=n;const o=t.startsWith("update:"),r=o&&t.slice(7);if(r&&r in s){const f=`${r==="modelValue"?"model":r}Modifiers`,{number:h,trim:y}=s[f]||tt;y&&(i=n.map(_=>at(_)?_.trim():_)),h&&(i=n.map(Jo))}let a,l=s[a=Ja(t)]||s[a=Ja(wn(t))];!l&&o&&(l=s[a=Ja(bs(t))]),l&&ln(l,e,6,i);const u=s[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,ln(u,e,6,i)}}function nf(e,t,n=!1){const s=t.emitsCache,i=s.get(e);if(i!==void 0)return i;const o=e.emits;let r={},a=!1;if(!Ne(e)){const l=u=>{const f=nf(u,t,!0);f&&(a=!0,Pt(r,f))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(Xe(e)&&s.set(e,null),null):(Te(o)?o.forEach(l=>r[l]=null):Pt(r,o),Xe(e)&&s.set(e,r),r)}function rr(e,t){return!e||!zo(t)?!1:(t=t.slice(2).replace(/Once$/,""),ze(e,t[0].toLowerCase()+t.slice(1))||ze(e,bs(t))||ze(e,t))}let vt=null,ar=null;function lr(e){const t=vt;return vt=e,ar=e&&e.type.__scopeId||null,t}function M_(e){ar=e}function R_(){ar=null}const N_=e=>Qe;function Qe(e,t=vt,n){if(!t||e._n)return e;const s=(...i)=>{s._d&&If(-1);const o=lr(t);let r;try{r=e(...i)}finally{lr(o),s._d&&If(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function p5(){}function ul(e){const{type:t,vnode:n,proxy:s,withProxy:i,props:o,propsOptions:[r],slots:a,attrs:l,emit:u,render:f,renderCache:h,data:y,setupState:_,ctx:b,inheritAttrs:E}=e;let T,D;const I=lr(e);try{if(n.shapeFlag&4){const V=i||s;T=un(f.call(V,V,h,o,_,y,b)),D=l}else{const V=t;T=un(V.length>1?V(o,{attrs:l,slots:a,emit:u}):V(o,null)),D=t.props?l:F_(l)}}catch(V){Gi.length=0,Ui(V,e,1),T=Ce(_n)}let P=T;if(D&&E!==!1){const V=Object.keys(D),{shapeFlag:ae}=P;V.length&&ae&7&&(r&&V.some(Wa)&&(D=U_(D,r)),P=li(P,D))}return n.dirs&&(P=li(P),P.dirs=P.dirs?P.dirs.concat(n.dirs):n.dirs),n.transition&&(P.transition=n.transition),T=P,lr(I),T}function B_(e){let t;for(let n=0;n<e.length;n++){const s=e[n];if(Yi(s)){if(s.type!==_n||s.children==="v-if"){if(t)return;t=s}}else return}return t}const F_=e=>{let t;for(const n in e)(n==="class"||n==="style"||zo(n))&&((t||(t={}))[n]=e[n]);return t},U_=(e,t)=>{const n={};for(const s in e)(!Wa(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function j_(e,t,n){const{props:s,children:i,component:o}=e,{props:r,children:a,patchFlag:l}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?sf(s,r,u):!!r;if(l&8){const f=t.dynamicProps;for(let h=0;h<f.length;h++){const y=f[h];if(r[y]!==s[y]&&!rr(u,y))return!0}}}else return(i||a)&&(!a||!a.$stable)?!0:s===r?!1:s?r?sf(s,r,u):!0:!!r;return!1}function sf(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let i=0;i<s.length;i++){const o=s[i];if(t[o]!==e[o]&&!rr(n,o))return!0}return!1}function dl({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const H_=e=>e.__isSuspense,of={name:"Suspense",__isSuspense:!0,process(e,t,n,s,i,o,r,a,l,u){e==null?q_(t,n,s,i,o,r,a,l,u):z_(e,t,n,s,i,r,a,l,u)},hydrate:V_,create:fl,normalize:W_};function qi(e,t){const n=e.props&&e.props[t];Ne(n)&&n()}function q_(e,t,n,s,i,o,r,a,l){const{p:u,o:{createElement:f}}=l,h=f("div"),y=e.suspense=fl(e,i,s,t,h,n,o,r,a,l);u(null,y.pendingBranch=e.ssContent,h,null,s,y,o,r),y.deps>0?(qi(e,"onPending"),qi(e,"onFallback"),u(null,e.ssFallback,t,n,s,null,o,r),ri(y,e.ssFallback)):y.resolve()}function z_(e,t,n,s,i,o,r,a,{p:l,um:u,o:{createElement:f}}){const h=t.suspense=e.suspense;h.vnode=t,t.el=e.el;const y=t.ssContent,_=t.ssFallback,{activeBranch:b,pendingBranch:E,isInFallback:T,isHydrating:D}=h;if(E)h.pendingBranch=y,es(y,E)?(l(E,y,h.hiddenContainer,null,i,h,o,r,a),h.deps<=0?h.resolve():T&&(l(b,_,n,s,i,null,o,r,a),ri(h,_))):(h.pendingId++,D?(h.isHydrating=!1,h.activeBranch=E):u(E,i,h),h.deps=0,h.effects.length=0,h.hiddenContainer=f("div"),T?(l(null,y,h.hiddenContainer,null,i,h,o,r,a),h.deps<=0?h.resolve():(l(b,_,n,s,i,null,o,r,a),ri(h,_))):b&&es(y,b)?(l(b,y,n,s,i,h,o,r,a),h.resolve(!0)):(l(null,y,h.hiddenContainer,null,i,h,o,r,a),h.deps<=0&&h.resolve()));else if(b&&es(y,b))l(b,y,n,s,i,h,o,r,a),ri(h,y);else if(qi(t,"onPending"),h.pendingBranch=y,h.pendingId++,l(null,y,h.hiddenContainer,null,i,h,o,r,a),h.deps<=0)h.resolve();else{const{timeout:I,pendingId:P}=h;I>0?setTimeout(()=>{h.pendingId===P&&h.fallback(_)},I):I===0&&h.fallback(_)}}function fl(e,t,n,s,i,o,r,a,l,u,f=!1){const{p:h,m:y,um:_,n:b,o:{parentNode:E,remove:T}}=u,D=e.props?qb(e.props.timeout):void 0,I={vnode:e,parent:t,parentComponent:n,isSVG:r,container:s,hiddenContainer:i,anchor:o,deps:0,pendingId:0,timeout:typeof D=="number"?D:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:f,isUnmounted:!1,effects:[],resolve(P=!1){const{vnode:V,activeBranch:ae,pendingBranch:U,pendingId:X,effects:ue,parentComponent:ye,container:Le}=I;if(I.isHydrating)I.isHydrating=!1;else if(!P){const re=ae&&U.transition&&U.transition.mode==="out-in";re&&(ae.transition.afterLeave=()=>{X===I.pendingId&&y(U,Le,G,0)});let{anchor:G}=I;ae&&(G=b(ae),_(ae,ye,I,!0)),re||y(U,Le,G,0)}ri(I,U),I.pendingBranch=null,I.isInFallback=!1;let ge=I.parent,L=!1;for(;ge;){if(ge.pendingBranch){ge.effects.push(...ue),L=!0;break}ge=ge.parent}L||Xd(ue),I.effects=[],qi(V,"onResolve")},fallback(P){if(!I.pendingBranch)return;const{vnode:V,activeBranch:ae,parentComponent:U,container:X,isSVG:ue}=I;qi(V,"onFallback");const ye=b(ae),Le=()=>{!I.isInFallback||(h(null,P,X,ye,U,null,ue,a,l),ri(I,P))},ge=P.transition&&P.transition.mode==="out-in";ge&&(ae.transition.afterLeave=Le),I.isInFallback=!0,_(ae,U,null,!0),ge||Le()},move(P,V,ae){I.activeBranch&&y(I.activeBranch,P,V,ae),I.container=P},next(){return I.activeBranch&&b(I.activeBranch)},registerDep(P,V){const ae=!!I.pendingBranch;ae&&I.deps++;const U=P.vnode.el;P.asyncDep.catch(X=>{Ui(X,P,0)}).then(X=>{if(P.isUnmounted||I.isUnmounted||I.pendingId!==P.suspenseId)return;P.asyncResolved=!0;const{vnode:ue}=P;xl(P,X,!1),U&&(ue.el=U);const ye=!U&&P.subTree.el;V(P,ue,E(U||P.subTree.el),U?null:b(P.subTree),I,r,l),ye&&T(ye),dl(P,ue.el),ae&&--I.deps===0&&I.resolve()})},unmount(P,V){I.isUnmounted=!0,I.activeBranch&&_(I.activeBranch,n,P,V),I.pendingBranch&&_(I.pendingBranch,n,P,V)}};return I}function V_(e,t,n,s,i,o,r,a,l){const u=t.suspense=fl(t,s,n,e.parentNode,document.createElement("div"),null,i,o,r,a,!0),f=l(e,u.pendingBranch=t.ssContent,n,u,o,r);return u.deps===0&&u.resolve(),f}function W_(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=rf(s?n.default:n),e.ssFallback=s?rf(n.fallback):Ce(_n)}function rf(e){let t;if(Ne(e)){const n=ai&&e._c;n&&(e._d=!1,N()),e=e(),n&&(e._d=!0,t=tn,Pf())}return Te(e)&&(e=B_(e)),e=un(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function K_(e,t){t&&t.pendingBranch?Te(e)?t.effects.push(...e):t.effects.push(e):Xd(e)}function ri(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e,i=n.el=t.el;s&&s.subTree===n&&(s.vnode.el=i,dl(s,i))}function zi(e,t){if(lt){let n=lt.provides;const s=lt.parent&&lt.parent.provides;s===n&&(n=lt.provides=Object.create(s)),n[e]=t}}function Vi(e,t,n=!1){const s=lt||vt;if(s){const i=s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&Ne(t)?t.call(s.proxy):t}}const cr={};function dt(e,t,n){return af(e,t,n)}function af(e,t,{immediate:n,deep:s,flush:i,onTrack:o,onTrigger:r}=tt){const a=Kb()===(lt==null?void 0:lt.scope)?lt:null;let l,u=!1,f=!1;if(_t(e)?(l=()=>e.value,u=or(e)):ni(e)?(l=()=>e,s=!0):Te(e)?(f=!0,u=e.some(P=>ni(P)||or(P)),l=()=>e.map(P=>{if(_t(P))return P.value;if(ni(P))return xs(P);if(Ne(P))return Zn(P,a,2)})):Ne(e)?t?l=()=>Zn(e,a,2):l=()=>{if(!(a&&a.isUnmounted))return h&&h(),ln(e,a,3,[y])}:l=on,t&&s){const P=l;l=()=>xs(P())}let h,y=P=>{h=D.onStop=()=>{Zn(P,a,4)}},_;if(Ji)if(y=on,t?n&&ln(t,a,3,[l(),f?[]:void 0,y]):l(),i==="sync"){const P=Rv();_=P.__watcherHandles||(P.__watcherHandles=[])}else return on;let b=f?new Array(e.length).fill(cr):cr;const E=()=>{if(!!D.active)if(t){const P=D.run();(s||u||(f?P.some((V,ae)=>Ni(V,b[ae])):Ni(P,b)))&&(h&&h(),ln(t,a,3,[P,b===cr?void 0:f&&b[0]===cr?[]:b,y]),b=P)}else D.run()};E.allowRecurse=!!t;let T;i==="sync"?T=E:i==="post"?T=()=>Ht(E,a&&a.suspense):(E.pre=!0,a&&(E.id=a.uid),T=()=>cl(E));const D=new el(l,T);t?n?E():b=D.run():i==="post"?Ht(D.run.bind(D),a&&a.suspense):D.run();const I=()=>{D.stop(),a&&a.scope&&Ka(a.scope.effects,D)};return _&&_.push(I),I}function G_(e,t,n){const s=this.proxy,i=at(e)?e.includes(".")?lf(s,e):()=>s[e]:e.bind(s,s);let o;Ne(t)?o=t:(o=t.handler,n=t);const r=lt;ns(this);const a=af(i,o.bind(s),n);return r?ns(r):ss(),a}function lf(e,t){const n=t.split(".");return()=>{let s=e;for(let i=0;i<n.length&&s;i++)s=s[n[i]];return s}}function xs(e,t){if(!Xe(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),_t(e))xs(e.value,t);else if(Te(e))for(let n=0;n<e.length;n++)xs(e[n],t);else if(Zs(e)||Xs(e))e.forEach(n=>{xs(n,t)});else if($d(e))for(const n in e)xs(e[n],t);return e}function Me(e){return Ne(e)?{setup:e,name:e.name}:e}const Wi=e=>!!e.type.__asyncLoader,cf=e=>e.type.__isKeepAlive;function Y_(e,t){uf(e,"a",t)}function J_(e,t){uf(e,"da",t)}function uf(e,t,n=lt){const s=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(ur(t,s,n),n){let i=n.parent;for(;i&&i.parent;)cf(i.parent.vnode)&&Q_(s,t,n,i),i=i.parent}}function Q_(e,t,n,s){const i=ur(t,e,s,!0);Cs(()=>{Ka(s[t],i)},n)}function ur(e,t,n=lt,s=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{if(n.isUnmounted)return;ei(),ns(n);const a=ln(t,n,e,r);return ss(),ti(),a});return s?i.unshift(o):i.push(o),o}}const On=e=>(t,n=lt)=>(!Ji||e==="sp")&&ur(e,(...s)=>t(...s),n),It=On("bm"),Tt=On("m"),X_=On("bu"),Z_=On("u"),df=On("bum"),Cs=On("um"),ev=On("sp"),tv=On("rtg"),nv=On("rtc");function sv(e,t=lt){ur("ec",e,t)}function q(e,t){const n=vt;if(n===null)return e;const s=gr(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,a,l,u=tt]=t[o];r&&(Ne(r)&&(r={mounted:r,updated:r}),r.deep&&xs(a),i.push({dir:r,instance:s,value:a,oldValue:void 0,arg:l,modifiers:u}))}return e}function $s(e,t,n,s){const i=e.dirs,o=t&&t.dirs;for(let r=0;r<i.length;r++){const a=i[r];o&&(a.oldValue=o[r].value);let l=a.dir[s];l&&(ei(),ln(l,n,8,[e.el,a,e,t]),ti())}}const ff="components";function Es(e,t){return ov(ff,e,!0,t)||e}const iv=Symbol();function ov(e,t,n=!0,s=!1){const i=vt||lt;if(i){const o=i.type;if(e===ff){const a=Lv(o,!1);if(a&&(a===t||a===wn(t)||a===Ko(wn(t))))return o}const r=pf(i[e]||o[e],t)||pf(i.appContext[e],t);return!r&&s?o:r}}function pf(e,t){return e&&(e[t]||e[wn(t)]||e[Ko(wn(t))])}function nt(e,t,n,s){let i;const o=n&&n[s];if(Te(e)||at(e)){i=new Array(e.length);for(let r=0,a=e.length;r<a;r++)i[r]=t(e[r],r,void 0,o&&o[r])}else if(typeof e=="number"){i=new Array(e);for(let r=0;r<e;r++)i[r]=t(r+1,r,void 0,o&&o[r])}else if(Xe(e))if(e[Symbol.iterator])i=Array.from(e,(r,a)=>t(r,a,void 0,o&&o[a]));else{const r=Object.keys(e);i=new Array(r.length);for(let a=0,l=r.length;a<l;a++){const u=r[a];i[a]=t(e[u],u,a,o&&o[a])}}else i=[];return n&&(n[s]=i),i}function cn(e,t,n={},s,i){if(vt.isCE||vt.parent&&Wi(vt.parent)&&vt.parent.isCE)return t!=="default"&&(n.name=t),Ce("slot",n,s&&s());let o=e[t];o&&o._c&&(o._d=!1),N();const r=o&&hf(o(n)),a=Jt(Ue,{key:n.key||r&&r.key||`_${t}`},r||(s?s():[]),r&&e._===1?64:-2);return!i&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function hf(e){return e.some(t=>Yi(t)?!(t.type===_n||t.type===Ue&&!hf(t.children)):!0)?e:null}const pl=e=>e?Rf(e)?gr(e)||e.proxy:pl(e.parent):null,Ki=Pt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>pl(e.parent),$root:e=>pl(e.root),$emit:e=>e.emit,$options:e=>gl(e),$forceUpdate:e=>e.f||(e.f=()=>cl(e.update)),$nextTick:e=>e.n||(e.n=oi.bind(e.proxy)),$watch:e=>G_.bind(e)}),hl=(e,t)=>e!==tt&&!e.__isScriptSetup&&ze(e,t),rv={get({_:e},t){const{ctx:n,setupState:s,data:i,props:o,accessCache:r,type:a,appContext:l}=e;let u;if(t[0]!=="$"){const _=r[t];if(_!==void 0)switch(_){case 1:return s[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(hl(s,t))return r[t]=1,s[t];if(i!==tt&&ze(i,t))return r[t]=2,i[t];if((u=e.propsOptions[0])&&ze(u,t))return r[t]=3,o[t];if(n!==tt&&ze(n,t))return r[t]=4,n[t];ml&&(r[t]=0)}}const f=Ki[t];let h,y;if(f)return t==="$attrs"&&jt(e,"get",t),f(e);if((h=a.__cssModules)&&(h=h[t]))return h;if(n!==tt&&ze(n,t))return r[t]=4,n[t];if(y=l.config.globalProperties,ze(y,t))return y[t]},set({_:e},t,n){const{data:s,setupState:i,ctx:o}=e;return hl(i,t)?(i[t]=n,!0):s!==tt&&ze(s,t)?(s[t]=n,!0):ze(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:i,propsOptions:o}},r){let a;return!!n[r]||e!==tt&&ze(e,r)||hl(t,r)||(a=o[0])&&ze(a,r)||ze(s,r)||ze(Ki,r)||ze(i.config.globalProperties,r)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ze(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let ml=!0;function av(e){const t=gl(e),n=e.proxy,s=e.ctx;ml=!1,t.beforeCreate&&mf(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:r,watch:a,provide:l,inject:u,created:f,beforeMount:h,mounted:y,beforeUpdate:_,updated:b,activated:E,deactivated:T,beforeDestroy:D,beforeUnmount:I,destroyed:P,unmounted:V,render:ae,renderTracked:U,renderTriggered:X,errorCaptured:ue,serverPrefetch:ye,expose:Le,inheritAttrs:ge,components:L,directives:re,filters:G}=t;if(u&&lv(u,s,null,e.appContext.config.unwrapInjectedRef),r)for(const Re in r){const M=r[Re];Ne(M)&&(s[Re]=M.bind(n))}if(i){const Re=i.call(n,n);Xe(Re)&&(e.data=ir(Re))}if(ml=!0,o)for(const Re in o){const M=o[Re],se=Ne(M)?M.bind(n,n):Ne(M.get)?M.get.bind(n,n):on,ee=!Ne(M)&&Ne(M.set)?M.set.bind(n):on,Ee=dn({get:se,set:ee});Object.defineProperty(s,Re,{enumerable:!0,configurable:!0,get:()=>Ee.value,set:Z=>Ee.value=Z})}if(a)for(const Re in a)gf(a[Re],s,n,Re);if(l){const Re=Ne(l)?l.call(n):l;Reflect.ownKeys(Re).forEach(M=>{zi(M,Re[M])})}f&&mf(f,e,"c");function xe(Re,M){Te(M)?M.forEach(se=>Re(se.bind(n))):M&&Re(M.bind(n))}if(xe(It,h),xe(Tt,y),xe(X_,_),xe(Z_,b),xe(Y_,E),xe(J_,T),xe(sv,ue),xe(nv,U),xe(tv,X),xe(df,I),xe(Cs,V),xe(ev,ye),Te(Le))if(Le.length){const Re=e.exposed||(e.exposed={});Le.forEach(M=>{Object.defineProperty(Re,M,{get:()=>n[M],set:se=>n[M]=se})})}else e.exposed||(e.exposed={});ae&&e.render===on&&(e.render=ae),ge!=null&&(e.inheritAttrs=ge),L&&(e.components=L),re&&(e.directives=re)}function lv(e,t,n=on,s=!1){Te(e)&&(e=yl(e));for(const i in e){const o=e[i];let r;Xe(o)?"default"in o?r=Vi(o.from||i,o.default,!0):r=Vi(o.from||i):r=Vi(o),_t(r)&&s?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:a=>r.value=a}):t[i]=r}}function mf(e,t,n){ln(Te(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function gf(e,t,n,s){const i=s.includes(".")?lf(n,s):()=>n[s];if(at(e)){const o=t[e];Ne(o)&&dt(i,o)}else if(Ne(e))dt(i,e.bind(n));else if(Xe(e))if(Te(e))e.forEach(o=>gf(o,t,n,s));else{const o=Ne(e.handler)?e.handler.bind(n):t[e.handler];Ne(o)&&dt(i,o,e)}}function gl(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,a=o.get(t);let l;return a?l=a:!i.length&&!n&&!s?l=t:(l={},i.length&&i.forEach(u=>dr(l,u,r,!0)),dr(l,t,r)),Xe(t)&&o.set(t,l),l}function dr(e,t,n,s=!1){const{mixins:i,extends:o}=t;o&&dr(e,o,n,!0),i&&i.forEach(r=>dr(e,r,n,!0));for(const r in t)if(!(s&&r==="expose")){const a=cv[r]||n&&n[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const cv={data:yf,props:ks,emits:ks,methods:ks,computed:ks,beforeCreate:Lt,created:Lt,beforeMount:Lt,mounted:Lt,beforeUpdate:Lt,updated:Lt,beforeDestroy:Lt,beforeUnmount:Lt,destroyed:Lt,unmounted:Lt,activated:Lt,deactivated:Lt,errorCaptured:Lt,serverPrefetch:Lt,components:ks,directives:ks,watch:dv,provide:yf,inject:uv};function yf(e,t){return t?e?function(){return Pt(Ne(e)?e.call(this,this):e,Ne(t)?t.call(this,this):t)}:t:e}function uv(e,t){return ks(yl(e),yl(t))}function yl(e){if(Te(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Lt(e,t){return e?[...new Set([].concat(e,t))]:t}function ks(e,t){return e?Pt(Pt(Object.create(null),e),t):t}function dv(e,t){if(!e)return t;if(!t)return e;const n=Pt(Object.create(null),e);for(const s in t)n[s]=Lt(e[s],t[s]);return n}function fv(e,t,n,s=!1){const i={},o={};Yo(o,hr,1),e.propsDefaults=Object.create(null),wf(e,t,i,o);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);n?e.props=s?i:v_(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function pv(e,t,n,s){const{props:i,attrs:o,vnode:{patchFlag:r}}=e,a=We(i),[l]=e.propsOptions;let u=!1;if((s||r>0)&&!(r&16)){if(r&8){const f=e.vnode.dynamicProps;for(let h=0;h<f.length;h++){let y=f[h];if(rr(e.emitsOptions,y))continue;const _=t[y];if(l)if(ze(o,y))_!==o[y]&&(o[y]=_,u=!0);else{const b=wn(y);i[b]=wl(l,a,b,_,e,!1)}else _!==o[y]&&(o[y]=_,u=!0)}}}else{wf(e,t,i,o)&&(u=!0);let f;for(const h in a)(!t||!ze(t,h)&&((f=bs(h))===h||!ze(t,f)))&&(l?n&&(n[h]!==void 0||n[f]!==void 0)&&(i[h]=wl(l,a,h,void 0,e,!0)):delete i[h]);if(o!==a)for(const h in o)(!t||!ze(t,h)&&!0)&&(delete o[h],u=!0)}u&&Tn(e,"set","$attrs")}function wf(e,t,n,s){const[i,o]=e.propsOptions;let r=!1,a;if(t)for(let l in t){if(Vo(l))continue;const u=t[l];let f;i&&ze(i,f=wn(l))?!o||!o.includes(f)?n[f]=u:(a||(a={}))[f]=u:rr(e.emitsOptions,l)||(!(l in s)||u!==s[l])&&(s[l]=u,r=!0)}if(o){const l=We(n),u=a||tt;for(let f=0;f<o.length;f++){const h=o[f];n[h]=wl(i,l,h,u[h],e,!ze(u,h))}}return r}function wl(e,t,n,s,i,o){const r=e[n];if(r!=null){const a=ze(r,"default");if(a&&s===void 0){const l=r.default;if(r.type!==Function&&Ne(l)){const{propsDefaults:u}=i;n in u?s=u[n]:(ns(i),s=u[n]=l.call(null,t),ss())}else s=l}r[0]&&(o&&!a?s=!1:r[1]&&(s===""||s===bs(n))&&(s=!0))}return s}function bf(e,t,n=!1){const s=t.propsCache,i=s.get(e);if(i)return i;const o=e.props,r={},a=[];let l=!1;if(!Ne(e)){const f=h=>{l=!0;const[y,_]=bf(h,t,!0);Pt(r,y),_&&a.push(..._)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!o&&!l)return Xe(e)&&s.set(e,Qs),Qs;if(Te(o))for(let f=0;f<o.length;f++){const h=wn(o[f]);_f(h)&&(r[h]=tt)}else if(o)for(const f in o){const h=wn(f);if(_f(h)){const y=o[f],_=r[h]=Te(y)||Ne(y)?{type:y}:Object.assign({},y);if(_){const b=Cf(Boolean,_.type),E=Cf(String,_.type);_[0]=b>-1,_[1]=E<0||b<E,(b>-1||ze(_,"default"))&&a.push(h)}}}const u=[r,a];return Xe(e)&&s.set(e,u),u}function _f(e){return e[0]!=="$"}function vf(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function xf(e,t){return vf(e)===vf(t)}function Cf(e,t){return Te(t)?t.findIndex(n=>xf(n,e)):Ne(t)&&xf(t,e)?0:-1}const $f=e=>e[0]==="_"||e==="$stable",bl=e=>Te(e)?e.map(un):[un(e)],hv=(e,t,n)=>{if(t._n)return t;const s=Qe((...i)=>bl(t(...i)),n);return s._c=!1,s},Ef=(e,t,n)=>{const s=e._ctx;for(const i in e){if($f(i))continue;const o=e[i];if(Ne(o))t[i]=hv(i,o,s);else if(o!=null){const r=bl(o);t[i]=()=>r}}},kf=(e,t)=>{const n=bl(t);e.slots.default=()=>n},mv=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=We(t),Yo(t,"_",n)):Ef(t,e.slots={})}else e.slots={},t&&kf(e,t);Yo(e.slots,hr,1)},gv=(e,t,n)=>{const{vnode:s,slots:i}=e;let o=!0,r=tt;if(s.shapeFlag&32){const a=t._;a?n&&a===1?o=!1:(Pt(i,t),!n&&a===1&&delete i._):(o=!t.$stable,Ef(t,i)),r=t}else t&&(kf(e,t),r={default:1});if(o)for(const a in i)!$f(a)&&!(a in r)&&delete i[a]};function Sf(){return{app:null,config:{isNativeTag:Nb,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 yv=0;function wv(e,t){return function(s,i=null){Ne(s)||(s=Object.assign({},s)),i!=null&&!Xe(i)&&(i=null);const o=Sf(),r=new Set;let a=!1;const l=o.app={_uid:yv++,_component:s,_props:i,_container:null,_context:o,_instance:null,version:Nv,get config(){return o.config},set config(u){},use(u,...f){return r.has(u)||(u&&Ne(u.install)?(r.add(u),u.install(l,...f)):Ne(u)&&(r.add(u),u(l,...f))),l},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),l},component(u,f){return f?(o.components[u]=f,l):o.components[u]},directive(u,f){return f?(o.directives[u]=f,l):o.directives[u]},mount(u,f,h){if(!a){const y=Ce(s,i);return y.appContext=o,f&&t?t(y,u):e(y,u,h),a=!0,l._container=u,u.__vue_app__=l,gr(y.component)||y.component.proxy}},unmount(){a&&(e(null,l._container),delete l._container.__vue_app__)},provide(u,f){return o.provides[u]=f,l}};return l}}function _l(e,t,n,s,i=!1){if(Te(e)){e.forEach((y,_)=>_l(y,t&&(Te(t)?t[_]:t),n,s,i));return}if(Wi(s)&&!i)return;const o=s.shapeFlag&4?gr(s.component)||s.component.proxy:s.el,r=i?null:o,{i:a,r:l}=e,u=t&&t.r,f=a.refs===tt?a.refs={}:a.refs,h=a.setupState;if(u!=null&&u!==l&&(at(u)?(f[u]=null,ze(h,u)&&(h[u]=null)):_t(u)&&(u.value=null)),Ne(l))Zn(l,a,12,[r,f]);else{const y=at(l),_=_t(l);if(y||_){const b=()=>{if(e.f){const E=y?ze(h,l)?h[l]:f[l]:l.value;i?Te(E)&&Ka(E,o):Te(E)?E.includes(o)||E.push(o):y?(f[l]=[o],ze(h,l)&&(h[l]=f[l])):(l.value=[o],e.k&&(f[e.k]=l.value))}else y?(f[l]=r,ze(h,l)&&(h[l]=r)):_&&(l.value=r,e.k&&(f[e.k]=r))};r?(b.id=-1,Ht(b,n)):b()}}}const Ht=K_;function bv(e){return _v(e)}function _v(e,t){const n=zb();n.__VUE__=!0;const{insert:s,remove:i,patchProp:o,createElement:r,createText:a,createComment:l,setText:u,setElementText:f,parentNode:h,nextSibling:y,setScopeId:_=on,insertStaticContent:b}=e,E=(C,A,B,te=null,R=null,le=null,he=!1,ce=null,ne=!!A.dynamicChildren)=>{if(C===A)return;C&&!es(C,A)&&(te=ft(C),Z(C,R,le,!0),C=null),A.patchFlag===-2&&(ne=!1,A.dynamicChildren=null);const{type:Y,ref:$e,shapeFlag:we}=A;switch(Y){case fr:T(C,A,B,te);break;case _n:D(C,A,B,te);break;case pr:C==null&&I(A,B,te,he);break;case Ue:L(C,A,B,te,R,le,he,ce,ne);break;default:we&1?ae(C,A,B,te,R,le,he,ce,ne):we&6?re(C,A,B,te,R,le,he,ce,ne):(we&64||we&128)&&Y.process(C,A,B,te,R,le,he,ce,ne,ot)}$e!=null&&R&&_l($e,C&&C.ref,le,A||C,!A)},T=(C,A,B,te)=>{if(C==null)s(A.el=a(A.children),B,te);else{const R=A.el=C.el;A.children!==C.children&&u(R,A.children)}},D=(C,A,B,te)=>{C==null?s(A.el=l(A.children||""),B,te):A.el=C.el},I=(C,A,B,te)=>{[C.el,C.anchor]=b(C.children,A,B,te,C.el,C.anchor)},P=({el:C,anchor:A},B,te)=>{let R;for(;C&&C!==A;)R=y(C),s(C,B,te),C=R;s(A,B,te)},V=({el:C,anchor:A})=>{let B;for(;C&&C!==A;)B=y(C),i(C),C=B;i(A)},ae=(C,A,B,te,R,le,he,ce,ne)=>{he=he||A.type==="svg",C==null?U(A,B,te,R,le,he,ce,ne):ye(C,A,R,le,he,ce,ne)},U=(C,A,B,te,R,le,he,ce)=>{let ne,Y;const{type:$e,props:we,shapeFlag:J,transition:Ae,dirs:m}=C;if(ne=C.el=r(C.type,le,we&&we.is,we),J&8?f(ne,C.children):J&16&&ue(C.children,ne,null,te,R,le&&$e!=="foreignObject",he,ce),m&&$s(C,null,te,"created"),X(ne,C,C.scopeId,he,te),we){for(const x in we)x!=="value"&&!Vo(x)&&o(ne,x,null,we[x],le,C.children,te,R,ke);"value"in we&&o(ne,"value",null,we.value),(Y=we.onVnodeBeforeMount)&&vn(Y,te,C)}m&&$s(C,null,te,"beforeMount");const w=(!R||R&&!R.pendingBranch)&&Ae&&!Ae.persisted;w&&Ae.beforeEnter(ne),s(ne,A,B),((Y=we&&we.onVnodeMounted)||w||m)&&Ht(()=>{Y&&vn(Y,te,C),w&&Ae.enter(ne),m&&$s(C,null,te,"mounted")},R)},X=(C,A,B,te,R)=>{if(B&&_(C,B),te)for(let le=0;le<te.length;le++)_(C,te[le]);if(R){let le=R.subTree;if(A===le){const he=R.vnode;X(C,he,he.scopeId,he.slotScopeIds,R.parent)}}},ue=(C,A,B,te,R,le,he,ce,ne=0)=>{for(let Y=ne;Y<C.length;Y++){const $e=C[Y]=ce?ts(C[Y]):un(C[Y]);E(null,$e,A,B,te,R,le,he,ce)}},ye=(C,A,B,te,R,le,he)=>{const ce=A.el=C.el;let{patchFlag:ne,dynamicChildren:Y,dirs:$e}=A;ne|=C.patchFlag&16;const we=C.props||tt,J=A.props||tt;let Ae;B&&Ss(B,!1),(Ae=J.onVnodeBeforeUpdate)&&vn(Ae,B,A,C),$e&&$s(A,C,B,"beforeUpdate"),B&&Ss(B,!0);const m=R&&A.type!=="foreignObject";if(Y?Le(C.dynamicChildren,Y,ce,B,te,m,le):he||M(C,A,ce,null,B,te,m,le,!1),ne>0){if(ne&16)ge(ce,A,we,J,B,te,R);else if(ne&2&&we.class!==J.class&&o(ce,"class",null,J.class,R),ne&4&&o(ce,"style",we.style,J.style,R),ne&8){const w=A.dynamicProps;for(let x=0;x<w.length;x++){const k=w[x],O=we[k],S=J[k];(S!==O||k==="value")&&o(ce,k,O,S,R,C.children,B,te,ke)}}ne&1&&C.children!==A.children&&f(ce,A.children)}else!he&&Y==null&&ge(ce,A,we,J,B,te,R);((Ae=J.onVnodeUpdated)||$e)&&Ht(()=>{Ae&&vn(Ae,B,A,C),$e&&$s(A,C,B,"updated")},te)},Le=(C,A,B,te,R,le,he)=>{for(let ce=0;ce<A.length;ce++){const ne=C[ce],Y=A[ce],$e=ne.el&&(ne.type===Ue||!es(ne,Y)||ne.shapeFlag&70)?h(ne.el):B;E(ne,Y,$e,null,te,R,le,he,!0)}},ge=(C,A,B,te,R,le,he)=>{if(B!==te){if(B!==tt)for(const ce in B)!Vo(ce)&&!(ce in te)&&o(C,ce,B[ce],null,he,A.children,R,le,ke);for(const ce in te){if(Vo(ce))continue;const ne=te[ce],Y=B[ce];ne!==Y&&ce!=="value"&&o(C,ce,Y,ne,he,A.children,R,le,ke)}"value"in te&&o(C,"value",B.value,te.value)}},L=(C,A,B,te,R,le,he,ce,ne)=>{const Y=A.el=C?C.el:a(""),$e=A.anchor=C?C.anchor:a("");let{patchFlag:we,dynamicChildren:J,slotScopeIds:Ae}=A;Ae&&(ce=ce?ce.concat(Ae):Ae),C==null?(s(Y,B,te),s($e,B,te),ue(A.children,B,$e,R,le,he,ce,ne)):we>0&&we&64&&J&&C.dynamicChildren?(Le(C.dynamicChildren,J,B,R,le,he,ce),(A.key!=null||R&&A===R.subTree)&&Af(C,A,!0)):M(C,A,B,$e,R,le,he,ce,ne)},re=(C,A,B,te,R,le,he,ce,ne)=>{A.slotScopeIds=ce,C==null?A.shapeFlag&512?R.ctx.activate(A,B,te,he,ne):G(A,B,te,R,le,he,ne):Se(C,A,ne)},G=(C,A,B,te,R,le,he)=>{const ce=C.component=kv(C,te,R);if(cf(C)&&(ce.ctx.renderer=ot),Av(ce),ce.asyncDep){if(R&&R.registerDep(ce,xe),!C.el){const ne=ce.subTree=Ce(_n);D(null,ne,A,B)}return}xe(ce,C,A,B,R,le,he)},Se=(C,A,B)=>{const te=A.component=C.component;if(j_(C,A,B))if(te.asyncDep&&!te.asyncResolved){Re(te,A,B);return}else te.next=A,L_(te.update),te.update();else A.el=C.el,te.vnode=A},xe=(C,A,B,te,R,le,he)=>{const ce=()=>{if(C.isMounted){let{next:$e,bu:we,u:J,parent:Ae,vnode:m}=C,w=$e,x;Ss(C,!1),$e?($e.el=m.el,Re(C,$e,he)):$e=m,we&&Go(we),(x=$e.props&&$e.props.onVnodeBeforeUpdate)&&vn(x,Ae,$e,m),Ss(C,!0);const k=ul(C),O=C.subTree;C.subTree=k,E(O,k,h(O.el),ft(O),C,R,le),$e.el=k.el,w===null&&dl(C,k.el),J&&Ht(J,R),(x=$e.props&&$e.props.onVnodeUpdated)&&Ht(()=>vn(x,Ae,$e,m),R)}else{let $e;const{el:we,props:J}=A,{bm:Ae,m,parent:w}=C,x=Wi(A);if(Ss(C,!1),Ae&&Go(Ae),!x&&($e=J&&J.onVnodeBeforeMount)&&vn($e,w,A),Ss(C,!0),we&&ds){const k=()=>{C.subTree=ul(C),ds(we,C.subTree,C,R,null)};x?A.type.__asyncLoader().then(()=>!C.isUnmounted&&k()):k()}else{const k=C.subTree=ul(C);E(null,k,B,te,C,R,le),A.el=k.el}if(m&&Ht(m,R),!x&&($e=J&&J.onVnodeMounted)){const k=A;Ht(()=>vn($e,w,k),R)}(A.shapeFlag&256||w&&Wi(w.vnode)&&w.vnode.shapeFlag&256)&&C.a&&Ht(C.a,R),C.isMounted=!0,A=B=te=null}},ne=C.effect=new el(ce,()=>cl(Y),C.scope),Y=C.update=()=>ne.run();Y.id=C.uid,Ss(C,!0),Y()},Re=(C,A,B)=>{A.component=C;const te=C.vnode.props;C.vnode=A,C.next=null,pv(C,A.props,te,B),gv(C,A.children,B),ei(),Zd(),ti()},M=(C,A,B,te,R,le,he,ce,ne=!1)=>{const Y=C&&C.children,$e=C?C.shapeFlag:0,we=A.children,{patchFlag:J,shapeFlag:Ae}=A;if(J>0){if(J&128){ee(Y,we,B,te,R,le,he,ce,ne);return}else if(J&256){se(Y,we,B,te,R,le,he,ce,ne);return}}Ae&8?($e&16&&ke(Y,R,le),we!==Y&&f(B,we)):$e&16?Ae&16?ee(Y,we,B,te,R,le,he,ce,ne):ke(Y,R,le,!0):($e&8&&f(B,""),Ae&16&&ue(we,B,te,R,le,he,ce,ne))},se=(C,A,B,te,R,le,he,ce,ne)=>{C=C||Qs,A=A||Qs;const Y=C.length,$e=A.length,we=Math.min(Y,$e);let J;for(J=0;J<we;J++){const Ae=A[J]=ne?ts(A[J]):un(A[J]);E(C[J],Ae,B,null,R,le,he,ce,ne)}Y>$e?ke(C,R,le,!0,!1,we):ue(A,B,te,R,le,he,ce,ne,we)},ee=(C,A,B,te,R,le,he,ce,ne)=>{let Y=0;const $e=A.length;let we=C.length-1,J=$e-1;for(;Y<=we&&Y<=J;){const Ae=C[Y],m=A[Y]=ne?ts(A[Y]):un(A[Y]);if(es(Ae,m))E(Ae,m,B,null,R,le,he,ce,ne);else break;Y++}for(;Y<=we&&Y<=J;){const Ae=C[we],m=A[J]=ne?ts(A[J]):un(A[J]);if(es(Ae,m))E(Ae,m,B,null,R,le,he,ce,ne);else break;we--,J--}if(Y>we){if(Y<=J){const Ae=J+1,m=Ae<$e?A[Ae].el:te;for(;Y<=J;)E(null,A[Y]=ne?ts(A[Y]):un(A[Y]),B,m,R,le,he,ce,ne),Y++}}else if(Y>J)for(;Y<=we;)Z(C[Y],R,le,!0),Y++;else{const Ae=Y,m=Y,w=new Map;for(Y=m;Y<=J;Y++){const ve=A[Y]=ne?ts(A[Y]):un(A[Y]);ve.key!=null&&w.set(ve.key,Y)}let x,k=0;const O=J-m+1;let S=!1,W=0;const H=new Array(O);for(Y=0;Y<O;Y++)H[Y]=0;for(Y=Ae;Y<=we;Y++){const ve=C[Y];if(k>=O){Z(ve,R,le,!0);continue}let Oe;if(ve.key!=null)Oe=w.get(ve.key);else for(x=m;x<=J;x++)if(H[x-m]===0&&es(ve,A[x])){Oe=x;break}Oe===void 0?Z(ve,R,le,!0):(H[Oe-m]=Y+1,Oe>=W?W=Oe:S=!0,E(ve,A[Oe],B,null,R,le,he,ce,ne),k++)}const ie=S?vv(H):Qs;for(x=ie.length-1,Y=O-1;Y>=0;Y--){const ve=m+Y,Oe=A[ve],Ie=ve+1<$e?A[ve+1].el:te;H[Y]===0?E(null,Oe,B,Ie,R,le,he,ce,ne):S&&(x<0||Y!==ie[x]?Ee(Oe,B,Ie,2):x--)}}},Ee=(C,A,B,te,R=null)=>{const{el:le,type:he,transition:ce,children:ne,shapeFlag:Y}=C;if(Y&6){Ee(C.component.subTree,A,B,te);return}if(Y&128){C.suspense.move(A,B,te);return}if(Y&64){he.move(C,A,B,ot);return}if(he===Ue){s(le,A,B);for(let we=0;we<ne.length;we++)Ee(ne[we],A,B,te);s(C.anchor,A,B);return}if(he===pr){P(C,A,B);return}if(te!==2&&Y&1&&ce)if(te===0)ce.beforeEnter(le),s(le,A,B),Ht(()=>ce.enter(le),R);else{const{leave:we,delayLeave:J,afterLeave:Ae}=ce,m=()=>s(le,A,B),w=()=>{we(le,()=>{m(),Ae&&Ae()})};J?J(le,m,w):w()}else s(le,A,B)},Z=(C,A,B,te=!1,R=!1)=>{const{type:le,props:he,ref:ce,children:ne,dynamicChildren:Y,shapeFlag:$e,patchFlag:we,dirs:J}=C;if(ce!=null&&_l(ce,null,B,C,!0),$e&256){A.ctx.deactivate(C);return}const Ae=$e&1&&J,m=!Wi(C);let w;if(m&&(w=he&&he.onVnodeBeforeUnmount)&&vn(w,A,C),$e&6)Ye(C.component,B,te);else{if($e&128){C.suspense.unmount(B,te);return}Ae&&$s(C,null,A,"beforeUnmount"),$e&64?C.type.remove(C,A,B,R,ot,te):Y&&(le!==Ue||we>0&&we&64)?ke(Y,A,B,!1,!0):(le===Ue&&we&384||!R&&$e&16)&&ke(ne,A,B),te&&z(C)}(m&&(w=he&&he.onVnodeUnmounted)||Ae)&&Ht(()=>{w&&vn(w,A,C),Ae&&$s(C,null,A,"unmounted")},B)},z=C=>{const{type:A,el:B,anchor:te,transition:R}=C;if(A===Ue){Fe(B,te);return}if(A===pr){V(C);return}const le=()=>{i(B),R&&!R.persisted&&R.afterLeave&&R.afterLeave()};if(C.shapeFlag&1&&R&&!R.persisted){const{leave:he,delayLeave:ce}=R,ne=()=>he(B,le);ce?ce(C.el,le,ne):ne()}else le()},Fe=(C,A)=>{let B;for(;C!==A;)B=y(C),i(C),C=B;i(A)},Ye=(C,A,B)=>{const{bum:te,scope:R,update:le,subTree:he,um:ce}=C;te&&Go(te),R.stop(),le&&(le.active=!1,Z(he,C,A,B)),ce&&Ht(ce,A),Ht(()=>{C.isUnmounted=!0},A),A&&A.pendingBranch&&!A.isUnmounted&&C.asyncDep&&!C.asyncResolved&&C.suspenseId===A.pendingId&&(A.deps--,A.deps===0&&A.resolve())},ke=(C,A,B,te=!1,R=!1,le=0)=>{for(let he=le;he<C.length;he++)Z(C[he],A,B,te,R)},ft=C=>C.shapeFlag&6?ft(C.component.subTree):C.shapeFlag&128?C.suspense.next():y(C.anchor||C.el),it=(C,A,B)=>{C==null?A._vnode&&Z(A._vnode,null,null,!0):E(A._vnode||null,C,A,null,null,null,B),Zd(),ef(),A._vnode=C},ot={p:E,um:Z,m:Ee,r:z,mt:G,mc:ue,pc:M,pbc:Le,n:ft,o:e};let wt,ds;return t&&([wt,ds]=t(ot)),{render:it,hydrate:wt,createApp:wv(it,wt)}}function Ss({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Af(e,t,n=!1){const s=e.children,i=t.children;if(Te(s)&&Te(i))for(let o=0;o<s.length;o++){const r=s[o];let a=i[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[o]=ts(i[o]),a.el=r.el),n||Af(r,a)),a.type===fr&&(a.el=r.el)}}function vv(e){const t=e.slice(),n=[0];let s,i,o,r,a;const l=e.length;for(s=0;s<l;s++){const u=e[s];if(u!==0){if(i=n[n.length-1],e[i]<u){t[s]=i,n.push(s);continue}for(o=0,r=n.length-1;o<r;)a=o+r>>1,e[n[a]]<u?o=a+1:r=a;u<e[n[o]]&&(o>0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=t[r];return n}const xv=e=>e.__isTeleport,Ue=Symbol(void 0),fr=Symbol(void 0),_n=Symbol(void 0),pr=Symbol(void 0),Gi=[];let tn=null;function N(e=!1){Gi.push(tn=e?null:[])}function Pf(){Gi.pop(),tn=Gi[Gi.length-1]||null}let ai=1;function If(e){ai+=e}function Tf(e){return e.dynamicChildren=ai>0?tn||Qs:null,Pf(),ai>0&&tn&&tn.push(e),e}function j(e,t,n,s,i,o){return Tf(c(e,t,n,s,i,o,!0))}function Jt(e,t,n,s,i){return Tf(Ce(e,t,n,s,i,!0))}function Yi(e){return e?e.__v_isVNode===!0:!1}function es(e,t){return e.type===t.type&&e.key===t.key}const hr="__vInternal",Lf=({key:e})=>e!=null?e:null,mr=({ref:e,ref_key:t,ref_for:n})=>e!=null?at(e)||_t(e)||Ne(e)?{i:vt,r:e,k:t,f:!!n}:e:null;function c(e,t=null,n=null,s=0,i=null,o=e===Ue?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Lf(t),ref:t&&mr(t),scopeId:ar,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:o,patchFlag:s,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:vt};return a?(vl(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=at(n)?8:16),ai>0&&!r&&tn&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&tn.push(l),l}const Ce=Cv;function Cv(e,t=null,n=null,s=0,i=null,o=!1){if((!e||e===iv)&&(e=_n),Yi(e)){const a=li(e,t,!0);return n&&vl(a,n),ai>0&&!o&&tn&&(a.shapeFlag&6?tn[tn.indexOf(e)]=a:tn.push(a)),a.patchFlag|=-2,a}if(Ov(e)&&(e=e.__vccOpts),t){t=Of(t);let{class:a,style:l}=t;a&&!at(a)&&(t.class=Je(a)),Xe(l)&&(zd(l)&&!Te(l)&&(l=Pt({},l)),t.style=In(l))}const r=at(e)?1:H_(e)?128:xv(e)?64:Xe(e)?4:Ne(e)?2:0;return c(e,t,n,s,i,r,o,!0)}function Of(e){return e?zd(e)||hr in e?Pt({},e):e:null}function li(e,t,n=!1){const{props:s,ref:i,patchFlag:o,children:r}=e,a=t?Mf(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&Lf(a),ref:t&&t.ref?n&&i?Te(i)?i.concat(mr(t)):[i,mr(t)]:mr(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ue?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&li(e.ssContent),ssFallback:e.ssFallback&&li(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Q(e=" ",t=0){return Ce(fr,null,e,t)}function Df(e,t){const n=Ce(pr,null,e);return n.staticCount=t,n}function je(e="",t=!1){return t?(N(),Jt(_n,null,e)):Ce(_n,null,e)}function un(e){return e==null||typeof e=="boolean"?Ce(_n):Te(e)?Ce(Ue,null,e.slice()):typeof e=="object"?ts(e):Ce(fr,null,String(e))}function ts(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:li(e)}function vl(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Te(t))n=16;else if(typeof t=="object")if(s&65){const i=t.default;i&&(i._c&&(i._d=!1),vl(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(hr in t)?t._ctx=vt:i===3&&vt&&(vt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ne(t)?(t={default:t,_ctx:vt},n=32):(t=String(t),s&64?(n=16,t=[Q(t)]):n=8);e.children=t,e.shapeFlag|=n}function Mf(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const i in s)if(i==="class")t.class!==s.class&&(t.class=Je([t.class,s.class]));else if(i==="style")t.style=In([t.style,s.style]);else if(zo(i)){const o=t[i],r=s[i];r&&o!==r&&!(Te(o)&&o.includes(r))&&(t[i]=o?[].concat(o,r):r)}else i!==""&&(t[i]=s[i])}return t}function vn(e,t,n,s=null){ln(e,t,7,[n,s])}const $v=Sf();let Ev=0;function kv(e,t,n){const s=e.type,i=(t?t.appContext:e.appContext)||$v,o={uid:Ev++,vnode:e,type:s,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new Vb(!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:bf(s,i),emitsOptions:nf(s,i),emit:null,emitted:null,propsDefaults:tt,inheritAttrs:s.inheritAttrs,ctx:tt,data:tt,props:tt,attrs:tt,slots:tt,refs:tt,setupState:tt,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 o.ctx={_:o},o.root=t?t.root:o,o.emit=D_.bind(null,o),e.ce&&e.ce(o),o}let lt=null;const Sv=()=>lt||vt,ns=e=>{lt=e,e.scope.on()},ss=()=>{lt&&lt.scope.off(),lt=null};function Rf(e){return e.vnode.shapeFlag&4}let Ji=!1;function Av(e,t=!1){Ji=t;const{props:n,children:s}=e.vnode,i=Rf(e);fv(e,n,i,t),mv(e,s);const o=i?Pv(e,t):void 0;return Ji=!1,o}function Pv(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Vd(new Proxy(e.ctx,rv));const{setup:s}=n;if(s){const i=e.setupContext=s.length>1?Tv(e):null;ns(e),ei();const o=Zn(s,e,0,[e.props,i]);if(ti(),ss(),Ga(o)){if(o.then(ss,ss),t)return o.then(r=>{xl(e,r,t)}).catch(r=>{Ui(r,e,0)});e.asyncDep=o}else xl(e,o,t)}else Bf(e,t)}function xl(e,t,n){Ne(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Xe(t)&&(e.setupState=Gd(t)),Bf(e,n)}let Nf;function Bf(e,t,n){const s=e.type;if(!e.render){if(!t&&Nf&&!s.render){const i=s.template||gl(e).template;if(i){const{isCustomElement:o,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:l}=s,u=Pt(Pt({isCustomElement:o,delimiters:a},r),l);s.render=Nf(i,u)}}e.render=s.render||on}ns(e),ei(),av(e),ti(),ss()}function Iv(e){return new Proxy(e.attrs,{get(t,n){return jt(e,"get","$attrs"),t[n]}})}function Tv(e){const t=s=>{e.exposed=s||{}};let n;return{get attrs(){return n||(n=Iv(e))},slots:e.slots,emit:e.emit,expose:t}}function gr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Gd(Vd(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ki)return Ki[n](e)},has(t,n){return n in t||n in Ki}}))}function Lv(e,t=!0){return Ne(e)?e.displayName||e.name:e.name||t&&e.__name}function Ov(e){return Ne(e)&&"__vccOpts"in e}const dn=(e,t)=>P_(e,t,Ji);function nn(e){const t=Sv();let n=e();return ss(),Ga(n)&&(n=n.catch(s=>{throw ns(t),s})),[n,()=>ns(t)]}function Dv(e,t,n){const s=arguments.length;return s===2?Xe(t)&&!Te(t)?Yi(t)?Ce(e,null,[t]):Ce(e,t):Ce(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Yi(n)&&(n=[n]),Ce(e,t,n))}const Mv=Symbol(""),Rv=()=>Vi(Mv),Nv="3.2.47",Bv="http://www.w3.org/2000/svg",As=typeof document<"u"?document:null,Ff=As&&As.createElement("template"),Fv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const i=t?As.createElementNS(Bv,e):As.createElement(e,n?{is:n}:void 0);return e==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:e=>As.createTextNode(e),createComment:e=>As.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>As.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,i,o){const r=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{Ff.innerHTML=s?`<svg>${e}</svg>`:e;const a=Ff.content;if(s){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Uv(e,t,n){const s=e._vtc;s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function jv(e,t,n){const s=e.style,i=at(n);if(n&&!i){if(t&&!at(t))for(const o in t)n[o]==null&&Cl(s,o,"");for(const o in n)Cl(s,o,n[o])}else{const o=s.display;i?t!==n&&(s.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(s.display=o)}}const Uf=/\s*!important$/;function Cl(e,t,n){if(Te(n))n.forEach(s=>Cl(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Hv(e,t);Uf.test(n)?e.setProperty(bs(s),n.replace(Uf,""),"important"):e[s]=n}}const jf=["Webkit","Moz","ms"],$l={};function Hv(e,t){const n=$l[t];if(n)return n;let s=wn(t);if(s!=="filter"&&s in e)return $l[t]=s;s=Ko(s);for(let i=0;i<jf.length;i++){const o=jf[i]+s;if(o in e)return $l[t]=o}return t}const Hf="http://www.w3.org/1999/xlink";function qv(e,t,n,s,i){if(s&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(Hf,t.slice(6,t.length)):e.setAttributeNS(Hf,t,n);else{const o=Mb(t);n==null||o&&!_d(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}function zv(e,t,n,s,i,o,r){if(t==="innerHTML"||t==="textContent"){s&&r(s,i,o),e[t]=n==null?"":n;return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=n;const l=n==null?"":n;(e.value!==l||e.tagName==="OPTION")&&(e.value=l),n==null&&e.removeAttribute(t);return}let a=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=_d(n):n==null&&l==="string"?(n="",a=!0):l==="number"&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(t)}function is(e,t,n,s){e.addEventListener(t,n,s)}function Vv(e,t,n,s){e.removeEventListener(t,n,s)}function Wv(e,t,n,s,i=null){const o=e._vei||(e._vei={}),r=o[t];if(s&&r)r.value=s;else{const[a,l]=Kv(t);if(s){const u=o[t]=Jv(s,i);is(e,a,u,l)}else r&&(Vv(e,a,r,l),o[t]=void 0)}}const qf=/(?:Once|Passive|Capture)$/;function Kv(e){let t;if(qf.test(e)){t={};let s;for(;s=e.match(qf);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):bs(e.slice(2)),t]}let El=0;const Gv=Promise.resolve(),Yv=()=>El||(Gv.then(()=>El=0),El=Date.now());function Jv(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;ln(Qv(s,n.value),t,5,[s])};return n.value=e,n.attached=Yv(),n}function Qv(e,t){if(Te(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>i=>!i._stopped&&s&&s(i))}else return t}const zf=/^on[a-z]/,Xv=(e,t,n,s,i=!1,o,r,a,l)=>{t==="class"?Uv(e,s,i):t==="style"?jv(e,n,s):zo(t)?Wa(t)||Wv(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Zv(e,t,s,i))?zv(e,t,s,o,r,a,l):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),qv(e,t,s,i))};function Zv(e,t,n,s){return s?!!(t==="innerHTML"||t==="textContent"||t in e&&zf.test(t)&&Ne(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||zf.test(t)&&at(n)?!1:t in e}const ci=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Te(t)?n=>Go(t,n):t};function e1(e){e.target.composing=!0}function Vf(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ge={created(e,{modifiers:{lazy:t,trim:n,number:s}},i){e._assign=ci(i);const o=s||i.props&&i.props.type==="number";is(e,t?"change":"input",r=>{if(r.target.composing)return;let a=e.value;n&&(a=a.trim()),o&&(a=Jo(a)),e._assign(a)}),n&&is(e,"change",()=>{e.value=e.value.trim()}),t||(is(e,"compositionstart",e1),is(e,"compositionend",Vf),is(e,"change",Vf))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:s,number:i}},o){if(e._assign=ci(o),e.composing||document.activeElement===e&&e.type!=="range"&&(n||s&&e.value.trim()===t||(i||e.type==="number")&&Jo(e.value)===t))return;const r=t==null?"":t;e.value!==r&&(e.value=r)}},_e={deep:!0,created(e,t,n){e._assign=ci(n),is(e,"change",()=>{const s=e._modelValue,i=Qi(e),o=e.checked,r=e._assign;if(Te(s)){const a=Va(s,i),l=a!==-1;if(o&&!l)r(s.concat(i));else if(!o&&l){const u=[...s];u.splice(a,1),r(u)}}else if(Zs(s)){const a=new Set(s);o?a.add(i):a.delete(i),r(a)}else r(Gf(e,o))})},mounted:Wf,beforeUpdate(e,t,n){e._assign=ci(n),Wf(e,t,n)}};function Wf(e,{value:t,oldValue:n},s){e._modelValue=t,Te(t)?e.checked=Va(t,s.props.value)>-1:Zs(t)?e.checked=t.has(s.props.value):t!==n&&(e.checked=Di(t,Gf(e,!0)))}const Ps={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const i=Zs(t);is(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?Jo(Qi(r)):Qi(r));e._assign(e.multiple?i?new Set(o):o:o[0])}),e._assign=ci(s)},mounted(e,{value:t}){Kf(e,t)},beforeUpdate(e,t,n){e._assign=ci(n)},updated(e,{value:t}){Kf(e,t)}};function Kf(e,t){const n=e.multiple;if(!(n&&!Te(t)&&!Zs(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],r=Qi(o);if(n)Te(t)?o.selected=Va(t,r)>-1:o.selected=t.has(r);else if(Di(Qi(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Qi(e){return"_value"in e?e._value:e.value}function Gf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const t1=["ctrl","shift","alt","meta"],n1={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)=>t1.some(n=>e[`${n}Key`]&&!t.includes(n))},s1=(e,t)=>(n,...s)=>{for(let i=0;i<t.length;i++){const o=n1[t[i]];if(o&&o(n,t))return}return e(n,...s)},i1={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Yf=(e,t)=>n=>{if(!("key"in n))return;const s=bs(n.key);if(t.some(i=>i===s||i1[i]===s))return e(n)},Ot={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Xi(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Xi(e,!0),s.enter(e)):s.leave(e,()=>{Xi(e,!1)}):Xi(e,t))},beforeUnmount(e,{value:t}){Xi(e,t)}};function Xi(e,t){e.style.display=t?e._vod:"none"}const o1=Pt({patchProp:Xv},Fv);let Jf;function r1(){return Jf||(Jf=bv(o1))}const xn=(...e)=>{const t=r1().createApp(...e),{mount:n}=t;return t.mount=s=>{const i=a1(s);if(!i)return;const o=t._component;!Ne(o)&&!o.render&&!o.template&&(o.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 a1(e){return at(e)?document.querySelector(e):e}const l1={key:0,class:"ce-custom-url-help"},c1={class:"ce-custom-url-help-body"},u1=c("hr",null,null,-1),d1={key:0},f1={class:"pure-table pure-table-bordered"},p1=c("thead",null,[c("tr",null,[c("th",{width:"50%"},"变量"),c("th",{width:"50%"},"说明")])],-1),h1=["onClick"],m1=Me({__name:"CustomUrlHelp",setup(e){const t=fe(fb),n=fe(!1);Tt(async()=>{window.addEventListener("message",i=>{const{event:o}=i.data;o==="customUrlHelp"&&(n.value=!0)},!1)});async function s(i){sn(i.key),oe({text:"已复制到剪贴板",icon:"success",timer:1e3})}return(i,o)=>n.value?(N(),j("div",l1,[c("div",c1,[c("h1",null,[Q(" 自定义菜单变量说明 "),c("a",{href:"javascript:void(0)",onClick:o[0]||(o[0]=r=>n.value=!1)},"关闭")]),u1,(N(!0),j(Ue,null,nt(t.value,(r,a)=>(N(),j("div",{key:a},[c("h2",null,me(r.label),1),r.memo?(N(),j("p",d1,me(r.memo),1)):je("",!0),c("table",f1,[p1,c("tbody",null,[(N(!0),j(Ue,null,nt(r.items,(l,u)=>(N(),j("tr",{key:u},[c("td",null,[c("span",{class:"ce-variable",onClick:f=>s(l)},me(l.key),9,h1)]),c("td",null,me(l.label),1)]))),128))])])]))),128))])])):je("",!0)}}),m5="",g5="",Qf=st.enabledCustomUrlsForSearch,Xf=st.enabledCustomUrlsForPlay;async function g1(e){await et.set(Qf,e)}async function y1(e){await et.set(Xf,e)}async function w1(){const e=Sl,t=e.filter(i=>i.enabled).map(i=>i.key),n=await et.get(Qf,t),s=[];return e.forEach(i=>{n.includes(i.key)&&s.push(i.key)}),s}async function b1(){const e=kl,t=e.filter(i=>i.enabled).map(i=>i.key),n=await et.get(Xf,t),s=[];return e.forEach(i=>{n.includes(i.key)&&s.push(i.key)}),s}async function Zf(){const e=await w1();return Sl.forEach(t=>{t.enabled=e.includes(t.key)}),Sl}async function yr(){const e=await b1();return kl.forEach(t=>{t.enabled=e.includes(t.key)}),kl}const ep="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=",_1="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",tp="https://nplayer.com/assets/img/logo_main.png",kl=[yt({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}"}),yt({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}"}),yt({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}"}),yt({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}"}),yt({enabled:!0,key:"p_builtin_infuse",label:"Infuse播放",icon:_1,memo:"调用Infuse播放视频(使用CloudDrive链接)",url:"infuse://x-callback-url/play?url={clouddrive_stream_url:encode}"}),yt({enabled:!1,key:"p_builtin_nplayer_mac",label:"nPlayer-mac播放",icon:tp,memo:"调用nPlayer(mac版)播放视频(使用CloudDrive链接)",url:"nplayer-mac://weblink?url={clouddrive_stream_url:encode}&new_window=1"}),yt({enabled:!1,key:"p_builtin_nplayer_win",label:"nPlayer-win播放",icon:tp,memo:"调用nPlayer(非mac版)播放视频(使用CloudDrive链接)",url:"nplayer-{clouddrive_stream_url:encode}"}),yt({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"})],Sl=[yt({enabled:!0,key:"s_builtin_115_pure_name",label:"115-不含后缀",icon:"https://115.com/favicon.ico",memo:"使用115搜索文件名(不含后缀)",url:"{pure_name:search}"}),yt({enabled:!1,key:"s_builtin_115_full_name",label:"115-完整名称",icon:"https://115.com/favicon.ico",memo:"使用115搜索文件名(完整文件名)",url:"{full_name:search}"}),yt({enabled:!0,key:"s_builtin_115_sha",label:"115-sha1",icon:"https://115.com/favicon.ico",memo:"使用115搜索sha1相同的文件(仅适用于文件)",url:"{file_hash:search}"}),yt({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}"}),yt({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}"}),yt({enabled:!0,key:"s_builtin_bing_pure_name",label:"Bing-不含后缀",icon:ep,memo:"使用Bing搜索文件名(不含后缀)",url:"https://cn.bing.com/search?q={pure_name:encode}"}),yt({enabled:!1,key:"s_builtin_bing_full_name",label:"Bing-完整名称",icon:ep,memo:"使用Bing搜索文件名(完整文件名)",url:"https://cn.bing.com/search?q={full_name:encode}"}),yt({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 ct=(e=>(e.openConfig="openConfig",e.closeConfig="closeConfig",e.basicConfigChange="basicConfigChange",e.listConfigChange="listConfigChange",e.searchConfigChange="searchConfigChange",e.toolsConfigChange="toolsConfigChange",e.listRendered="listRendered",e.topDomChanged="topDomChange",e.officialMenuStyleChange="officialMenuStyleChange",e))(ct||{}),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.anxia="anxia",e.about="about",e))(qt||{});const fn={basic:"基础设置",clouddrive:"CloudDrive",list:"列表增强",search:"搜索增强",menus:"菜单设置",searchMenus:"搜索菜单",playMenus:"播放菜单",offline:"离线管理",tools:"工具",anxia:"在线播放",about:"关于"},np=st.list;function v1(e){return{sizeSorter:!0,sizeSorterDirAttrInterval:100,showSha1:!1,showFolderSizeButton:!0,showOpenDirContextMenu:!0,hoverShowDirContextMenu:!1,showCopyButtonOnPathBar:!1,showGotoButtonOnPathBar:!1,noUpdateDirAfterRename:!1,noReloadAfterMove:!1,fileSelectorDefaultView:"_",followHistoryState:!1,showOnlyFileFilter:!1,...e}}async function wr(){const e=v1(),t=await et.get(np,e);return{...e,...t}}async function x1(e){await et.set(np,e)}var sp=(e=>(e[e.asc=0]="asc",e[e.desc=1]="desc",e))(sp||{});async function C1(e,t,n=!1){await wr();const s=await gt(!1),i=await Ws(),o=await Kn(!1);console.log("[items]",o),oe({html:"正在获取子文件夹大小...",icon:"info",position:"top-end",timer:0}),pe.showLoading();for(let r=0;r<o.length;r++){const a=o[r];if(!a.isDir)continue;const l=i.find(`li[cate_id="${a.id}"]`);if(!l.length)continue;const u=l.find(".file-size span:eq(0)");if(u.text()!==""&&!n)continue;const f=await St(a.id);pe.update({html:`[${r+1} / ${o.length}] 正在获取子文件夹大小:${a.name}`}),u.text(f.size),l.addClass("ce-size-got")}return pe.hideLoading(),e&&await $1(s),s}async function br(e,t,n,s){const i=await Ws();i.find('li[file_type="0"]:not(.ce-size-got)').length>0&&await C1(n);const r=i.find("ul"),a=r.children("li").toArray();a.sort(function(u,f){const h=$(u),y=$(f),_=Ac(h.find(".file-size span:eq(0)").text()),b=Ac(y.find(".file-size span:eq(0)").text());return t===0?_-b:b-_});const l=$("<ul></ul>");$.each(a,function(u,f){l.append(f)}),r.replaceWith(l),n?pe.update({title:"排序完成",html:`已完成排序: ${t===0?"小 > 大":"大 > 小"}`,icon:"success"}):oe({html:`已完成排序: ${t===0?"小 > 大":"大 > 小"}`,icon:"success",timer:1500,position:"top-end"})}async function $1(e){pe.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"),br(e,1,!0),!1),preDeny:async()=>(console.log("preDeny"),br(e,0,!0),!1)})}async function E1(){await Al();const e=await bt("#js_data_list");k1(),new MutationObserver(async([n])=>{n.type==="childList"&&(window.postMessage({event:ct.listRendered}),await Al())}).observe(e,{childList:!0})}async function k1(){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 s=n.target;let i=!1;if((s.getAttribute("menu")==="load_all_file"||s.closest('[menu="load_all_file"]'))&&(i=!0),!i)return;console.log("[list.handleLoadAll] 点击了「加载全部」按钮"),await qn(t,500,3e5);const o=document.querySelector("#js_data_list .list-contents > ul");o==null||o.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&&(o==null||o.setAttribute("ce-done2",""),await Al())}})}async function Al(){const e=await wr();I1(e),T1(e);const t=await sd(!1);for(let n=0;n<t.length;n++){const s=t.eq(n),i=await Vt(s);await S1(e,s,i)}}async function S1(e,t,n){await A1(e,t,n),await P1(e,t,n)}async function A1(e,t,n){if(!e.showSha1||!n.hash)return;t.addClass("ce-show-sha1");const s=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 o=>{o.preventDefault(),o.stopPropagation(),sn(n.hash),oe({title:"复制SHA1",text:"已复制文件SHA1",icon:"success",timer:1500})}),s.append(i)}async function P1(e,t,n){if(!e.showFolderSizeButton||!n.isDir)return;const s=t.find(".file-size"),i=document.createElement("span");i.classList.add("ce-btn-folder-size"),i.title="点击获取该文件夹大小",i.textContent="大小",i.addEventListener("click",async o=>{o.preventDefault(),o.stopPropagation();const r=await St(n.id);s.find("span:eq(0)").text(r.size),t.addClass("ce-size-got"),oe({title:"获取大小",text:"已获取文件夹大小",icon:"success",timer:1500})}),s.append(i)}async function I1(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,s=Yt(`
    <a class="btn-sort ce-size-sort" title="显示当前目录下已加载的子文件夹的大小,然后按大小排序">
      <span>排序</span>
      <i icon_rel="file_size" class="icon-sort-asc"></i>
      <i icon_rel="file_size" class="icon-sort-desc"></i>
    </a>
  `);s.addEventListener("click",async i=>{if(i.preventDefault(),i.stopPropagation(),!s.classList.contains("el-size-sort-ing"))try{s.classList.add("ce-size-sort-ing");let o=1;s.classList.contains("by-desc")?o=0:o=1;const r=await gt(!1);await br(r,o,!1,!1),o===0?(s.classList.remove("by-desc"),s.classList.add("by-asc")):(s.classList.remove("by-asc"),s.classList.add("by-desc"))}catch(o){console.error(o)}finally{s.classList.remove("ce-size-sort-ing")}}),n.appendChild(s),n.classList.add("ce-injected")}async function T1(e){if(!e.showOpenDirContextMenu||await gt(!1)===""||Yn())return;console.log("renderHeaderOpenDirContextMenu");const n=document.querySelector(".header-name");if(!n||n.classList.contains("ce-injected"))return;const s=n,i=document.createElement("a");i.classList.add("ce-open-dir-context-menu"),i.title="打开当前目录的功能菜单",i.innerHTML="<span>目录功能菜单</span>";let o;const r=async a=>{console.log(a.clientX,a.clientY),o&&clearTimeout(o),a.preventDefault(),a.stopPropagation();try{const l=Wt(),u=await gt(!1),f=i.getBoundingClientRect();l.Core.FileMenu.FileRight("1",u,!1,f.x,f.y+8,void 0,!1)}catch(l){console.error(l)}};i.addEventListener("click",r),e.hoverShowDirContextMenu&&(i.addEventListener("mouseenter",async a=>{o=setTimeout(async()=>{await r(a)},300)}),i.addEventListener("mouseleave",()=>{o&&clearTimeout(o)})),s.appendChild(i),s.classList.add("ce-injected")}async function ip(e,t){const n=[];for(const s of t){const i=mo(e,{key:`_ce_p_${s.key}`,label:s.label,icon:s.icon,title:s.memo,onClick:async(o,r)=>{r.stopPropagation(),r.preventDefault();try{const a=await An();if(!a)return;const l=await Vt(a),u=await Fs(),f=await Ro(l,s,u);if(f.includes("v.anxia.com")){const y=(await Kn(!1)).find(_=>_.playDuration&&_.playDuration>0);Ua(l.id,y);return}if(console.log("[play url]",f),!f)throw new Error("无法获取有效的播放链接!");window.open(f,"_blank","noopener noreferrer")}catch(a){console.error(a),oe({title:"播放失败",text:a.toString(),icon:"error"})}}});n.push(i)}return n}async function L1(e){const t=[...(await yr()).filter(n=>n.enabled),...(await Gs(Pn.play)).filter(n=>n.enabled)];return e&&t.length===1?(await ip(At,t))[0]:new At({key:"_play_with_x",label:"播放全部",icon:"icon-operate ifo-video-play",title:"",onClick:async(n,s)=>{},subItems:[...await ip(Cb,t)]})}async function O1(){return new At({key:"_rename_dir",label:"重命名文件夹",icon:"icon-operate ifo-rename",title:'重命名当前目录,支持"高级模式"',onClick:async(e,t)=>{await e.closeMenu();const n=await An();!n||unsafeWindow.Core.Dir.Rename("1",n.attr("cate_id"),n.attr("title"))}})}async function D1(){return new At({key:"_get_tree",label:"导出目录列表数据",icon:"icon-operate ifo-move",title:"获取当前目录的全部层级的文件列表数据,并导出为JSON文件",onClick:async(e,t)=>{await e.closeMenu();const n=await An();if(!n)return;const s=await Vt(n);await ud(s)}})}async function M1(){return new At({key:"_dc_view_in_clouddrive",label:"在CloudDrive中查看",icon:"icon-operate ifo-exportdir",title:"在CloudDrive2 Web页面中查看",onClick:async(e,t)=>{t.stopPropagation(),t.preventDefault(),await e.closeMenu();const n=await gt(!1);if(!n||n==="0"){await Mo({id:"0",name:"根目录",isDir:!0});return}const s=await An();if(!s)return;const i=await Vt(s);await Mo(i)}})}async function R1(){return new At({key:"_move_dir",label:"移动文件夹",icon:"icon-operate ifo-move",title:"移动当前文件夹到其他位置",onClick:async(e,t)=>{await e.closeMenu();const n=await An();!n||await Ra(n,"move",!0)}})}async function N1(){return new At({key:"_del_dir",label:"删除文件夹",icon:"icon-operate ifo-remove",title:"删除当前文件夹",onClick:async(e,t)=>{await e.closeMenu();const n=await An();if(!n)return;const s=await Ti();unsafeWindow.Core.FileAPI.DeleteFile([n],i=>{n.remove(),s.find("#js_top_header_file_path_box .top-file-path > .file-path").children(":last").prev()[0].click()},!0)}})}async function B1(){return new At({key:"_copy_dir",label:"复制文件夹",icon:"icon-operate ifo-copy",title:"复制当前文件夹",onClick:async(e,t)=>{await e.closeMenu();const n=await An();!n||await Ra(n,"set_copy",!0)}})}async function F1(){return new At({key:"_copy_dir_to",label:"复制文件夹到",icon:"icon-operate ifo-copyto",title:"复制当前文件夹到其他位置",onClick:async(e,t)=>{await e.closeMenu();const n=await An();!n||await Ra(n,"copy_list",!0)}})}async function U1(){return new At({key:"view_dir_attribute",label:"查看属性",icon:"icon-operate ifo-prop",onClick:async(e,t)=>{await e.closeMenu();const n=await An();!n||Wt().Core.FileAPI.getAttribute(n,{showPlayLongChange:function(s,i,o){Ww().CACHE.FileMain.List.ResetPlayLongText(s,i,o)}},function(){console.log("查看属性 ok")})}})}async function _r(e,t){return new At({key:`_d_copy_names_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制当前目录下已加载的所有文件名称",onClick:async(n,s)=>{let o=(await Kn(!1)).map(r=>r.name);o=await Oo(o,t),sn(o.join(`
`)),oe({title:"复制名称",text:`已复制选中文件名。数量:${o.length},复制类型:${e}`,icon:"success"})}})}async function op(e,t){return new At({key:`_d_copy_paths_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制当前目录下已加载的所有文件路径",onClick:async(n,s)=>{await n.closeMenu();const i=await Kn(!1);let o=[];oe({text:"正在获取文件路径...",timer:0}),pe.showLoading();try{o=await cd(i,t),pe.close()}catch(r){console.error(r),oe({text:`获取文件路径失败: ${r}`,timer:6e4,icon:"error"});return}finally{pe.hideLoading()}sn(o.join(`
`)),oe({title:"复制路径",text:`已复制文件的路径。数量:${o.length},复制类型:${e}`,icon:"success"})}})}async function j1(){return new At({key:"show_sub_folder_size",label:"子文件夹大小",title:"显示当前目录下已加载的所有子文件夹的大小,并进行排序",icon:"icon-operate ifo-prop",onClick:async(e,t)=>{await e.closeMenu(),await br("",sp.desc,!0)}})}async function rp(e,t){return new Fo({key:`_l_copy_name_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制名称",onClick:async(n,s)=>{await n.closeMenu();const i=await rd();if(!i||!i.n){oe({text:"无法获取名称",timer:1200});return}let o=[i.n];o=await Oo(o,t),sn(o.join(`
`)),oe({title:"复制名称",text:"已复制选中文件名",icon:"success"})}})}async function vr(e,t){return new Fo({key:`_l_copy_path_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制路径",onClick:async(n,s)=>{await n.closeMenu();const i=await rd();if(!i||!i.n){oe({text:"无法获取路径",timer:1200});return}const o=await Ii(i),r=await Lo(o),a=await Do(o,r,t);sn(a),oe({title:"复制路径",text:"已复制文件路径",icon:"success"})}})}async function H1(){return new Fo({key:"_lc_view_in_clouddrive",label:"在CloudDrive中查看",icon:"icon-operate ifo-exportdir",title:"在CloudDrive2 Web页面中查看",onClick:async(e,t)=>{await e.closeMenu();const n=await od();if(!n||!n.length){oe({text:"无法获取文件信息",timer:1200});return}const s=await Vt(n);await Mo(s)}})}let q1=[];async function z1(){const e=[...(await yr()).filter(t=>t.enabled),...(await Gs(Pn.play)).filter(t=>t.enabled)];return new Uo({key:"_play_with_x_d",label:"播放",injectDecider:Pb,title:"115在线播放",onClick:async(t,n)=>{n.stopPropagation(),n.preventDefault();const s=$(n.target).closest("li"),i=await Vt(s),o=Ba(i.pickCode);i.isDir&&o.includes("v.anxia.com")?Ua(i.id):window.open(o,"_blank","noopener noreferrer")},subItems:[...await ab(Js,e)]})}async function V1(){const e=[...(await Zf()).filter(t=>t.enabled),...q1.filter(t=>t.enabled),...(await Gs(Pn.search)).filter(t=>t.enabled)];return new Uo({key:"_search_with_name_d",label:"搜索",icon:"",title:"使用名称搜索",onClick:async(t,n)=>{n.stopPropagation(),n.preventDefault();const s=$(n.target).closest("li"),i=await Pi(s),o=Na({search_value:i.n,cid:await gt()});window.open(o,"_blank","noopener noreferrer")},subItems:[...await rb(Js,e)]})}async function W1(){return new Js({injectDecider:bd,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"),s=await Vt(n);if(!s.isDir){oe({text:"该功能仅对目录有效",icon:"warning",timer:2e3});return}await ud(s)}})}async function K1(){return new Js({key:"_lh_view_in_clouddrive",label:"在CloudDrive中查看",icon:"icon-operate ifo-exportdir",title:"在CloudDrive2 Web页面中查看",onClick:async(e,t)=>{t.stopPropagation(),t.preventDefault();const n=$(t.target).closest("li"),s=await Vt(n);await Mo(s)}})}async function G1(e){const t=[await ap("完整名称",Kt.full),await ap("不含后缀",Kt.pure),new qa({}),await xr("路径(Unix)",Gt.unixPath),await xr("路径(Windows)",Gt.winPath),await xr("上级路径(Unix)",Gt.unixParentPath),await xr("上级路径(Windows)",Gt.winParentPath)];return e.exportList&&t.push(new qa({}),await W1()),e.viewInCloudDrive&&t.push(new qa({}),await K1()),new Uo({key:"_lh_copy_name_path",label:"名称路径",title:"复制文件名称路径",onClick:async(n,s)=>{},subItems:t})}async function ap(e,t){return new Js({key:`_lh_copy_name_${t}`,label:e,icon:"icon-operate ifo-copy",title:e,onClick:async(n,s)=>{s.stopPropagation(),s.preventDefault();const i=$(s.target).closest("li");let r=[(await Pi(i)).n];r=await Oo(r,t),sn(r.join(`
`)),oe({title:"复制名称",text:`已复制选中文件名,复制类型:${e}`,icon:"success",timer:1e3})}})}async function xr(e,t){return new Js({key:`_lh_copy_path_${t}`,label:e,icon:"icon-operate ifo-copy",title:e,onClick:async(n,s)=>{s.stopPropagation(),s.preventDefault();const i=$(s.target).closest("li"),o=await Vt(i),r=await Lo(o),a=await Do(o,r,t);sn(a),oe({title:"复制路径",text:`已复制选中路径,复制类型:${e}`,icon:"success",timer:1e3})}})}async function Y1(){return new Uo({injectDecider:bd,key:"_open_in_new_tab",label:"新标签页",icon:"",title:"在新标签页打开",onClick:async(e,t)=>{t.stopPropagation(),t.preventDefault();const n=$(t.target).closest("li"),s=await Vt(n);if(!s||!s.id){oe({text:"无法获取目录ID",timer:1200});return}const i=Li(s.id);window.open(i,"_blank","noopener noreferrer")}})}async function J1(){return new Ha({key:"_s_smart_mkdir",label:"同名目录",icon:"icon-operate ifo-move",title:"将选中的文件移动到同名目录",onClick:await lb(!0)})}async function Q1(){return new Ha({key:"_s_copy_names_paths",label:"名称路径",icon:"icon-operate ifo-copy",showIcon:!1,title:"复制选中文件的名称路径",onClick:async(e,t)=>{},subItems:[await Cr("完整名称",Kt.full),await Cr("不含后缀",Kt.pure),await Cr("完整文件名,去重",Kt.fullUnique),await Cr("不含后缀,去重",Kt.pureUnique),new wd({}),await lp("路径(Unix)",Gt.unixPath),await lp("路径(Windows)",Gt.winPath)]})}async function Cr(e,t){return new jo({key:`_s_copy_names_${t}`,label:e,icon:"icon-operate ifo-copy",showIcon:!1,title:e,onClick:async(n,s)=>{let o=(await Kn(!0)).map(r=>r.name);o=await Oo(o,t),sn(o.join(`
`)),oe({title:"复制名称",text:`已复制选中文件名。数量:${o.length},复制类型:${e}`,icon:"success",timer:1e3})}})}async function lp(e,t){return new jo({key:`_s_copy_path_${t}`,label:e,icon:"icon-operate ifo-copy",showIcon:!1,title:e,onClick:async(n,s)=>{const i=await Kn(!0);let o=[];oe({text:"正在获取已选文件路径...",timer:0}),pe.showLoading();try{o=await cd(i,t),pe.close()}catch(r){console.error(r),oe({text:`获取已选文件路径失败: ${r}`,timer:6e4,icon:"error"});return}finally{pe.hideLoading()}sn(o.join(`
`)),oe({title:"复制路径",text:`已复制选中文件的路径。数量:${o.length},复制类型:${e}`,icon:"success",timer:1e3})}})}async function cp(){const e=await Kn(!0);if(!e.length)return;const t=Date.now().toString(),n=unsafeWindow.open(Ba("xxx"),t);await Et(1e3);let s=10;for(;s>0;)n==null||n.postMessage({event:"play",body:{id:t,files:e}},"https://v.anxia.com"),await Et(1e3),s--}async function X1(){const e=[...(await yr()).filter(t=>t.enabled),...(await Gs(Pn.play)).filter(t=>t.enabled)];return new Ha({key:"_s_play_with_x_d",label:"播放",title:"播放选中的文件",onClick:async(t,n)=>{n.stopPropagation(),n.preventDefault(),await cp()},subItems:[...await e0(jo,e),new wd({}),new jo({label:"关于选中播放",onClick:async(t,n)=>{n.stopPropagation(),n.preventDefault(),oe({title:"关于选中播放",html:`
              <p>点击主按钮(即「播放」)或「在线播放」会在线播放选中的视频。</p><br>
              <p>如果是点击调用本地播放器播放:<p>
              <p>原理: 生成m3u8文件,上传m3u8文件到115,调用播放该m3u8的CloudDrive2直链。<p>
              <p>设定: m3u8默认放在网盘根目录下的「.ce-m3u8-temp」目录下,不会自动清理。<p>
              <p>作为使用者需做的: 在CloudDrive2里设置「.ce-m3u8-temp」目录缓存时间为1秒。</p>
              <p class="text-info" style="font-size:12px;">这个目录会在首次播放时自动创建,如果想提前设置目录缓存时间,可以自己创建。另外,可以在「设置 - 菜单设置 - 全局设置」中修改「M3U8临时目录」以设置目录位置。</p>
              <br><p class="text-danger">导致播放失败的可能: CloudDrive2目录缓存工作异常,导致请求不到m3u8文件。</p>
            `,showConfirmButton:!0,width:600,timer:18e5})},icon:"data-text:❓"})]})}async function Z1(e){if(e=e.trim(),!e)throw new Error("m3u8临时目录路径为空!");const t=await sb(e);if(t.id)return console.log("[ensureM3u8TempDir] result:",t),t.id;throw new Error("创建m3u8临时目录失败!")}async function e0(e,t){const n=[];for(const s of t){const i=mo(e,{key:`_ce_p_${s.key}`,label:s.label,icon:s.icon,title:s.memo,onClick:async(o,r)=>{if(r.stopPropagation(),r.preventDefault(),o.key==="_ce_p_p_builtin_online"){await cp();return}const a=await Ys();try{let l=await Kn(!0);if(l=l.filter(T=>T.isDir||T.isVideo||T.isImage),l.length===0){oe({title:"播放失败",text:"没有可以播放的目录或媒体文件!",icon:"error",timer:2e3});return}const u=await Z1(a.m3u8TempDir),f=await nb(l,u);console.log("[selection.buildPlayMenuItems generatePlaylistOn115]",f);const h=f.data,y=await Fs(),_={id:h.file_id,name:h.file_name,parentId:h.cid,sizeBytes:h.file_size,pickCode:h.pick_code,isDir:!1,isFile:!0},b=Io([a.m3u8TempDir,_.name],Wn.unix);oe({title:"检查m3u8文件",text:"正在检查m3u8文件是否已准备就绪...",icon:"info",timer:0}),pe.showLoading(),await Bw(y,b,1e3,6e4),oe({icon:"success",text:"m3u8文件已准备就绪,即将开始播放..."});const E=await Ro(_,s,y);window.open(E,"_blank","noopener noreferrer")}catch(l){console.error(l),oe({title:"播放失败",text:l.toString(),icon:"error",timer:6e4,showConfirmButton:!0})}finally{pe.hideLoading()}}});n.push(i)}return n}const t0={label:"选中项菜单",key:"selection",hiddenStyles:[{selector:"div.list-operate.lo-right li[menu={key}]",css:"width: 0 !important; opacity: 0 !important; padding: 0 !important; margin: 0 !important;"}],items:[{label:"下载",key:"download"},{label:"移动",key:"move"},{label:"标签",key:"edit_file_label"},{label:"重命名",key:"edit_name"},{label:"备注",key:"edit"},{label:"星标",key:"star"},{label:"删除",key:"delete"},{label:"分享",key:"public_share"},{label:"设置共享",key:"setShare"},{label:"取消共享",key:"cancelShare"},{label:"复制",key:"set_copy"},{label:"复制到...",key:"copy_list"},{label:"加密隐藏",key:"hide_file"},{label:"取消加密",key:"show_file"},{label:"评分",key:"file_score"},{label:"设为快捷入口",key:"set_category"},{label:"取消快捷入口",key:"unset_category"},{label:"显示时长",key:"show_play_long"},{label:"修改封面",key:"cover"},{label:"一键排重",key:"same"},{label:"导出目录树",key:"export_dir"},{label:"显示属性",key:"attribute"},{label:"转存至相册",key:"trans_to_album"}]},n0={label:"列表项右键菜单",key:"context",hiddenStyles:[{selector:"div.context-menu.menu-upward li[val={key}] a",css:"display: none !important;"}],items:[{label:"打开文件",key:"view"},{label:"打开文件夹",key:"open_dir"},{label:"下载文件",key:"download"},{label:"下载文件夹",key:"download_dir"},{label:"打包下载",key:"bale_download"},{label:"刷新",key:"refresh"},{label:"复制",key:"set_copy"},{label:"复制到...",key:"copy_list"},{label:"加密隐藏",key:"hide_file"},{label:"取消加密",key:"show_file"},{label:"评分",key:"file_score"},{label:"显示时长",key:"show_play_long"},{label:"取消时长",key:"hide_play_long"},{label:"添加到我听",key:"listen"},{label:"美化",key:"magic"},{label:"修改封面",key:"cover"},{label:"删除封面",key:"del_cover"},{label:"一键排重",key:"same"},{label:"移动",key:"move"},{label:"重命名",key:"edit_name"},{label:"备注",key:"edit"},{label:"显示属性",key:"attribute"},{label:"删除",key:"delete"},{label:"播放器播放",key:"player"},{label:"转存到相册",key:"trans_to_album"},{label:"举报",key:"report"}]},s0={label:"列表项悬浮菜单",key:"hover",hiddenStyles:[{selector:"div.file-opr[rel=menu] a[menu={key}]",css:"width: 0 !important; opacity: 0 !important; padding: 0 !important; margin: 0 !important; overflow: hidden !important;"},{selector:"div.context-menu li[menu={key}] a",css:"display: none !important;"}],items:[{label:"星标",key:"star"},{label:"下载文件",key:"download_one"},{label:"下载文件夹",key:"download_dir_one"},{label:"移动",key:"move"},{label:"标签",key:"edit_file_label"},{label:"重命名",key:"edit_name"},{label:"备注",key:"edit"},{label:"删除",key:"delete"},{label:"分享",key:"public_share"},{label:"取消加密",key:"show_file"},{label:"评分",key:"file_score"},{label:"设置共享",key:"setShare"},{label:"取消共享",key:"cancelShare"},{label:"复制",key:"set_copy"},{label:"显示时长",key:"show_play_long"},{label:"修改封面",key:"cover"},{label:"一键排重",key:"same"},{label:"导出目录树",key:"export_dir"},{label:"显示属性",key:"attribute"},{label:"转存至相册",key:"trans_to_album"},{label:"设为快捷入口",key:"set_category"},{label:"取消快捷入口",key:"unset_category"}]},up=st.hiddenOfficialMenuKeys;async function dp(){return await et.get(up,[])}async function i0(e,t=!1){var n;await et.set(up,e),t&&(unsafeWindow.postMessage({event:ct.officialMenuStyleChange},"*"),(n=unsafeWindow.frames.wangpan)==null||n.postMessage({event:ct.officialMenuStyleChange},"*"))}async function o0(e){const t=[];return e.forEach(n=>{n.items.forEach(s=>{s.hidden&&t.push(`${n.key}_${s.key}`)})}),t}async function fp(){const e=[t0,n0,s0],t=await dp();return e.forEach(n=>{n.items.forEach(s=>{const i=`${n.key}_${s.key}`;t.includes(i)?s.hidden=!0:s.hidden=!1})}),e}async function r0(){const e=await fp(),t=[];return e.forEach(n=>{n.hiddenStyles.forEach(s=>{const i=[];n.items.forEach(o=>{!o.hidden||i.push(s.selector.replace("{key}",o.key))}),i.length&&t.push(i.join(`,
`)+" { "+s.css+" }")})}),t.join(`
`)}async function pp(){const e="cloud115EnhancerOfficialMenuStyle",t=await r0();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 a0(){const{host:e,search:t}=location;if(!e.includes("115.com"))return;console.log("[Cloud115 Enhancer - menu] running..."),l0(),document.addEventListener(en.EVENT_CLOSE_MENU,s=>{$("#"+s.detail.menu.key).closest(".context-menu").hide()});const n=await Ys();!n.enabled||(c0(n),await ld(n),window.top===window.self&&u0(n),f0(n),(Gn()||Yn())&&(d0(n),p0(n),ob(n)))}async function l0(){console.log("[Cloud115 Enhancer - menu] injectUI");const e="ceCustomUrlHelp",t=document.createElement("div");t.id=e,document.body.appendChild(t),xn(m1).mount(`#${e}`)}async function c0(e){!e.manageOfficialMenus||(pp(),window.addEventListener("message",async t=>{t.data.event===ct.officialMenuStyleChange&&(console.log("[Cloud115 Enhancer - menu] officialMenuStyleChange",location.href),await Et(1e3),console.log(await dp()),pp())}))}const Pl=async(e,t)=>{};async function u0(e){const{[Be.dirContext]:t}=e;if(!t.enabled)return;const n=[];t.rename&&n.push(await O1()),t.delete&&n.push(await N1()),t.play&&n.push(await L1(!0)),t.copyNames&&n.push(new At({key:"_dir_copy_names",label:"名称路径",icon:"icon-operate ifo-copy",onClick:Pl,subItems:[await _r("完整名称",Kt.full),await _r("不含后缀",Kt.pure),await _r("完整名称,去重",Kt.fullUnique),await _r("不含后缀,去重",Kt.pureUnique),new $b({}),await op("路径(Unix)",Gt.unixPath),await op("路径(Windows)",Gt.winPath)]}));const s=[];t.move&&s.push(await R1()),t.viewProp&&s.push(await U1()),t.showSubFolderSize&&s.push(await j1()),t.copy&&s.push(await B1()),t.copyTo&&s.push(await F1()),t.exportList&&s.push(await D1()),t.viewInCloudDrive&&s.push(await M1()),s.length===1?n.push(s[0]):s.length>1&&n.push(new At({key:"_dir_more",label:"更多",icon:"icon-operate ifo-open",onClick:Pl,subItems:s})),await new Eb({items:n,siblingSelector:'[val="upload"]',position:ms.before}).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 d0(e){const{[Be.listItemHover]:t}=e;if(!t.enabled)return;const n=[];t.openInNewTab&&n.push(await Y1()),t.search&&n.push(await V1()),t.play&&n.push(await z1()),t.copyNames&&n.push(await G1(t)),new Sb({items:n,position:ms.after,siblingSelector:'[menu="move"], [menu="delete"]'}).inject()}async function f0(e){const{[Be.listItemContext]:t}=e;if(!t.enabled)return;const n=[],s=[];t.copyNames&&s.push(await rp("完整名称",Kt.full),await rp("不含后缀",Kt.pure),new yd({}),await vr("路径(Unix)",Gt.unixPath),await vr("路径(Windows)",Gt.winPath),await vr("上级路径(Unix)",Gt.unixParentPath),await vr("上级路径(Windows)",Gt.winParentPath)),t.viewInCloudDrive&&s.push(new yd({}),await H1()),s.length&&n.push(new Fo({key:"_list_item_copy_name_path",label:"名称路径",icon:"icon-operate ifo-copy",onClick:Pl,subItems:s})),new kb({items:n,position:ms.after,siblingSelector:'[val="refresh"]',useObserver:!0,observeTarget:document.body,disposeObserverAfterInjection:!1}).inject()}async function p0(e){const{[Be.selection]:t}=e;if(!t.enabled)return;const n=[];Yn()||t.moveToSelfNameDir&&n.push(await J1()),t.copyNames&&n.push(await Q1()),t.play&&n.push(await X1()),new Ab({items:n,position:ms.before,siblingSelector:"ul li"}).inject()}const hp=st.offline;var $r=(e=>(e.name="name",e.nameRegex="nameRegex",e.infoHash="infoHash",e.url="url",e))($r||{});const h0={name:"名称",nameRegex:"名称正则",infoHash:"哈希",url:"链接"};function m0(e){return{onlyMagnetEd2k:!1,enableOptimization:!0,reqInterval:500,maxPage:0,showInfoHash:!0,enableListManagement:!0,fixGotoPage:!1,enableSearcher:!0,searchMaxPage:5,searchKeywordType:"name",searchStatus:Bt.any,searchStopOnFound:!1,searchReqInterval:10,noGotoTaskPage:!0,...e}}async function os(){const e=m0(),t=await et.get(hp,e);return{...e,...t}}async function mp(e){await et.set(hp,e),window.postMessage({event:ui.configChanged,body:JSON.parse(JSON.stringify(e))},"*")}async function g0(e){const t=await bt("#js-warp"),n=t.querySelectorAll("li[complete]");if(n.length>0)for(const i of Array.from(n))await gp(i,e);_0(e),new MutationObserver(async([i])=>{if(i.type==="childList"){i.addedNodes.forEach(async a=>{await gp(a,e)});const o=document.querySelector(".ce-checkbox-all input"),r=await Er();if(!r.length)o.checked=!1,o.indeterminate=!1;else{const a=t.querySelectorAll("li[complete]");o.checked=r.length===a.length,o.indeterminate=!o.checked}await kr(r)}}).observe(t,{childList:!0})}async function y0(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 gp(e,t){const n=e,s=await y0(e);v0(n,t,s),w0(n,t,s),b0(n,t,s)}async function w0(e,t,n){if(!t.showInfoHash||e.querySelector(".info-hash"))return;const s=e.querySelector(".file-name"),i=document.createElement("div");i.classList.add("info-hash"),i.textContent=n.hash,i.title=`点击复制${n.hash}`,s.after(i),i.addEventListener("click",()=>{vi(n.hash,"text"),oe({text:"已复制",icon:"success",timer:800})});const o=e.querySelector(".desc-tips");o&&o.style.display!=="none"&&e.classList.add("ce-task-trouble")}async function b0(e,t,n){const s=e.querySelector(".file-operate");if(s.querySelector(".ce-buttons"))return;const i=document.createElement("span");i.className="ce-buttons";const o=document.createElement("a");o.className="pure-button button-mini button-info",o.href=Li(n.cate_id),o.target="_blank",o.textContent="打开",o.title="在新标签页打开目录",i.append(o),s.prepend(i)}async function _0(e){if(!e.enableListManagement)return;const t=await bt("#js-main .header-name");let n=t.querySelector(".ce-checkbox-all");n||(n=document.createElement("div"),n.classList.add("ce-checkbox"),n.classList.add("ce-checkbox-all"),n.innerHTML=`
      <input type="checkbox"/>
    `,t.prepend(n)),n.addEventListener("click",()=>{const s=n.querySelector("input").checked;document.querySelectorAll("#js-warp li").forEach(o=>{const r=o.querySelector("input");r.checked=s,o.classList.toggle("ce-selected",s)}),Er().then(o=>{kr(o)})})}async function v0(e,t,n){if(!t.enableListManagement||e.querySelector(".ce-checkbox"))return;const s=e.querySelector(".file-name-wrap"),i=document.createElement("div");i.classList.add("ce-checkbox"),i.innerHTML=`
    <input type="checkbox" data-id="${n.hash}" />
  `,s.prepend(i),e.classList.add("ce-show-checkbox"),i.addEventListener("click",async o=>{o.shiftKey?await C0(o,e):await x0(o,e)})}async function x0(e,t){t.classList.toggle("ce-selected");const n=document.querySelector(".ce-checkbox-all input"),s=await wp(!1);let i=0;for(const r of s)r.classList.contains("ce-selected")&&i++;const o=i===s.length;n.checked=o,n.indeterminate=!o&&i>0,Er().then(r=>{kr(r)})}async function C0(e,t){const n=await wp(!1),s=n.indexOf(t);let i=-1;for(let f=0;f<s;f++)if(n[f].classList.contains("ce-selected")){i=f;break}if(i===-1){for(let f=n.length-1;f>s;f--)if(n[f].classList.contains("ce-selected")){i=f;break}}i=i===-1?s:i;const o=Math.min(i,s),r=Math.max(i,s);let a=0;for(let f=0;f<n.length;f++){const h=n[f],y=h.querySelector(".ce-checkbox input"),_=f>=o&&f<=r;y.checked=_,_&&a++,h.classList.toggle("ce-selected",_)}const l=o===0&&r===n.length-1,u=document.querySelector(".ce-checkbox-all input");u.checked=l,u.indeterminate=!l&&a>0,Er().then(f=>{kr(f)})}async function yp(e){var n;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"),url:((n=e.querySelector(".file-operate a[cp_href]"))==null?void 0:n.getAttribute("cp_href"))||""};return t.name||(t.name=e.querySelector(".file-name").textContent.trim()),t}async function wp(e){const t=document.querySelectorAll("#js-warp li"),n=[];return t.forEach(async s=>{const i=s;(!e||i.classList.contains("ce-selected"))&&n.push(i)}),n}async function Er(){const e=document.querySelectorAll("#js-warp li"),t=[];return e.forEach(async n=>{const s=n;if(s.classList.contains("ce-selected")){const i=await yp(s);t.push(i)}}),t}var ui=(e=>(e.selection="ce-offline-selection",e.configChanged="ce-offline-config-changed",e.searchPageChanged="ce-offline-search-page-changed",e))(ui||{});async function kr(e){window.postMessage({event:"ce-offline-selection",body:e},"*")}async function Il(e){document.querySelectorAll("#js-warp li").forEach(async n=>{const s=n,i=s.getAttribute("hash");e.includes(i)&&pd(s)})}async function $0(e,t,n,s){var _;const i=[],o=n.maxPage||5;let r="",a=null,l="",u="",f="";n.name!==void 0&&(r=n.caseSensitive?n.name:n.name.toLowerCase()),n.nameRegex!==void 0&&(a=new RegExp(n.nameRegex)),n.infoHash!==void 0&&(l=n.caseSensitive?n.infoHash:n.infoHash.toLowerCase()),n.url!==void 0&&(u=n.caseSensitive?n.url:n.url.toLowerCase()),n.status!==void 0&&n.status!==Bt.any&&n.status.toString()!==""&&(f=n.status.toString());let h=n.stopOnFound||!1;(l||u)&&(h=!0);let y=-1;for(let b=1;b<=o&&!(y>-1&&b>y);b++){window.postMessage({event:"ce-offline-search-page-changed",body:b},"*");const E=await Ju(b,e,t);y===-1&&(y=E.page_count);const T=E.tasks;for(const D of T){const I=n.caseSensitive?D.name:D.name.toLowerCase(),P=n.caseSensitive?D.info_hash:D.info_hash.toLowerCase(),V=n.caseSensitive?D.url:(_=D.url)==null?void 0:_.toLowerCase(),ae=r&&n.fuzzyName?I.includes(r):!1,U=a?a.test(I):!1,X=l&&P===l,ue=u&&V===u;if((f?f===D.status.toString():!0)&&(ae||U||X||ue)&&(i.push(D),h))break}if(h&&i.length)break}return i}async function E0(){if(!(await os()).fixGotoPage)return;const t=await bt("#js-page");if(!t){console.warn("[fixGotoPage] 找不到`#js-page`");return}const n=async r=>{if(r.key!=="Enter")return;const a=r.target,l=parseInt(a.value);if(isNaN(l)){a.select();return}parent.window.Core.OFFL5Plug.ChangePage(l)},s=async(r=!1)=>{const a=t.querySelector('input[rel="page_jump"]');if(!a)return;const l=document.createElement("input");l.setAttribute("rel","page_jump"),l.type="text",l.style.backgroundColor="#fefcea",l.title="这是 115不大助手 替换的输入框,如果想恢复原有的输入框,请在「离线设置」中关闭「修复输入页码跳转」选项",l.addEventListener("keydown",n),a.insertAdjacentElement("beforebegin",l),a.remove(),r&&l.focus()},i=Nt(async r=>{s(!0)},50),o=new MutationObserver(async([r])=>{r.type==="childList"&&i(r)});s(!1),o.observe(t,{childList:!0})}const k0={class:"ce-config ce-offline-config"},S0={class:"pure-form pure-form-aligned offline-exporter-config-form"},A0={class:"pure-control-group"},P0=c("label",{for:"noGotoTaskPage"},"添加任务后不跳转",-1),I0=c("div",{class:"pure-form-message text-success"}," 官方的添加离线任务在添加任务后可能会跳转到任务列表页,开启此选项可以避免跳转。 ",-1),T0={class:"pure-control-group"},L0=c("label",{for:"enableListManagement"},"启用批量管理",-1),O0=c("div",{class:"pure-form-message text-success"}," 可以选中多个任务进行操作,支持shift多选。 ",-1),D0={class:"pure-control-group"},M0=c("label",{for:"showInfoHash"},"显示链接哈希",-1),R0=c("div",{class:"pure-form-message text-success"}," 显示离线任务的哈希文本,点击可以复制。 ",-1),N0={class:"pure-control-group"},B0=c("label",{for:"fixGotoPage"},"修复输入页码跳转",-1),F0=c("div",{class:"pure-form-message text-success"}," 如果官方的输入页码跳转功能异常,可开启此选项。 ",-1),U0=c("div",{class:"ce-tips"},"以下是导出链接相关选项",-1),j0={class:"pure-control-group"},H0=c("label",{for:"onlyMagnetEd2k"},"只取磁力和ED2K链接",-1),q0=c("div",{class:"pure-form-message text-success"}," 导出链接时,只取磁力和ED2K链接,其他比如http链接会被略过。 ",-1),z0={class:"pure-control-group"},V0=c("label",{for:"enableOptimization"},"启用导出优化",-1),W0=c("div",{class:"pure-form-message text-success"}," 据观察,离线记录列表是将未完成的记录放在最前面的。如果只需导出未完成链接, 当获取到一个已完成的记录时,便可以停止继续获取后面的记录,节省时间。 ",-1),K0={class:"pure-control-group"},G0=c("label",{for:"maxPage"},"最多导出页数",-1),Y0=c("div",{class:"pure-form-message text-success"}," 0表示不限制,否则表示最多导出的页数。 ",-1),bp=Me({__name:"Config",async setup(e){let t,n;const s=fe(([t,n]=nn(()=>os()),t=await t,n(),t));return It(async()=>{}),dt(s,Nt(async i=>{await mp(i),oe({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0}),(i,o)=>(N(),j("div",k0,[c("form",S0,[c("fieldset",null,[c("div",A0,[P0,q(c("input",{id:"noGotoTaskPage",type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=r=>s.value.noGotoTaskPage=r)},null,512),[[_e,s.value.noGotoTaskPage]]),I0]),c("div",T0,[L0,q(c("input",{id:"enableListManagement",type:"checkbox","onUpdate:modelValue":o[1]||(o[1]=r=>s.value.enableListManagement=r)},null,512),[[_e,s.value.enableListManagement]]),O0]),c("div",D0,[M0,q(c("input",{id:"showInfoHash",type:"checkbox","onUpdate:modelValue":o[2]||(o[2]=r=>s.value.showInfoHash=r)},null,512),[[_e,s.value.showInfoHash]]),R0]),c("div",N0,[B0,q(c("input",{id:"fixGotoPage",type:"checkbox","onUpdate:modelValue":o[3]||(o[3]=r=>s.value.fixGotoPage=r)},null,512),[[_e,s.value.fixGotoPage]]),F0]),U0,c("div",j0,[H0,q(c("input",{id:"onlyMagnetEd2k",type:"checkbox","onUpdate:modelValue":o[4]||(o[4]=r=>s.value.onlyMagnetEd2k=r)},null,512),[[_e,s.value.onlyMagnetEd2k]]),q0]),c("div",z0,[V0,q(c("input",{id:"enableOptimization",type:"checkbox","onUpdate:modelValue":o[5]||(o[5]=r=>s.value.enableOptimization=r)},null,512),[[_e,s.value.enableOptimization]]),W0]),c("div",K0,[G0,q(c("input",{id:"maxPage",type:"number","onUpdate:modelValue":o[6]||(o[6]=r=>s.value.maxPage=r),min:0},null,512),[[Ge,s.value.maxPage]]),Y0])])])]))}}),y5="",J0={class:"ce-offline-exporter"},Q0={key:0},X0=c("button",{type:"button",class:"pure-button button-mini"},"设置",-1),Z0=Me({__name:"OflineExporter",setup(e){const t=`\r
`;let n,s;const i=fe([]);let o={};Tt(async()=>{o=await os(),n=await Xu(),console.log("[profile]",n),s=await Qu(),console.log("[space]",s),r(),await g0(o)});async function r(){window.addEventListener("message",E=>{const{event:T,body:D}=E.data;switch(T){case ui.selection:i.value=D;break;case ui.configChanged:o=D;break}},!1)}async function a(E=!1,T=""){const{isConfirmed:D,value:I}=await pe.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 ae=document.getElementById("swalDeleteFile");ae.checked=E;const U=document.getElementById("swalUrls");U.value=T,U.focus()},preConfirm:()=>{const ae=document.getElementById("swalDeleteFile"),U=document.getElementById("swalUrls");return{deleteFile:ae?ae.checked:!1,urls:U?U.value:""}},width:620,inputPlaceholder:"每行一个",inputAttributes:{"aria-label":"每行一个"},showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消"});if(!D)return;if(I===void 0){alert("请输入链接!");return}const P=[],V=I.urls.trim().split(`
`);for(let ae=0;ae<V.length;ae++){const U=V[ae].trim();if($c(U)||Ec(U)){const X=Sc(U);X&&P.push(X.toLowerCase())}}pe.showLoading(),pe.update({html:"正在删除..."}),await Oa(P,s,I.deleteFile,n.user_id),oe({icon:"success",title:"删除成功!请刷新页面查看最新的列表。",timer:3e4,position:"top-end"}),await Il(P)}async function l(){const E=i.value.map(P=>P.info_hash);if(!E.length)return;const{isConfirmed:T,value:D}=await pe.fire({title:"批量删除",icon:"warning",html:`确定要删除选中的 ${E.length} 个离线记录吗?`,input:"checkbox",inputValue:0,inputPlaceholder:"同时删除文件",showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消"});if(!T)return;const I=!!D;pe.showLoading(),pe.update({html:"正在删除..."}),await Oa(E,s,I,n.user_id),oe({icon:"success",title:"删除成功",timer:800,position:"top-end"}),await Il(E),i.value=[]}async function u(E){const T=[E];o.onlyMagnetEd2k&&T.push(Ft.magnetEd2k),console.log("[filters]",T),await b(s.sign,n.user_id,T)}function f(E,T){if(!T.length||T.length===1&&T[0]==="all")return E;const D={[Bt.failed]:Ft.failed,[Bt.illegal]:Ft.failed,[Bt.ing]:Ft.failed,[Bt.success]:Ft.success};return E=E.filter(I=>{if(!I.url&&!I.info_hash)return!1;const P=D[I.status];return T.includes(Ft.all)||P&&T.includes(P)?!(T.includes(Ft.magnetEd2k)&&(!Lm(I.info_hash)||I.url&&!$c(I.url)&&!Ec(I.url))):!1}),E}async function h(E,T,D){let I=[],P=1,V=0;for(;;){pe.update({html:`正在导出... 进度:第 ${P} 页`+(V?` / ${V}`:""),allowOutsideClick:!1});const ae=await Ju(P,E,T);if(!ae.tasks||!ae.tasks.length)break;if(V===0&&o.maxPage>0?V=Math.min(ae.page_count,o.maxPage):V=ae.page_count,I=[...I,...f(ae.tasks,D)],o.enableOptimization&&D.includes(Ft.failed)&&y(ae.tasks)){console.warn("由于开启了导出优化,且检测到已获取的记录中至少有一个「已完成」的记录,将不再获取剩下的记录");break}if(P>=V)break;P++}return I}function y(E){for(const T of E)if(T.status===Bt.success)return!0;return!1}async function _(){const E=[Ft.all];o.onlyMagnetEd2k&&E.push(Ft.magnetEd2k),console.log("[filters]",E);const T=i.value;if(!T.length)return;const D=[];T.forEach(I=>{!I.url&&I.info_hash&&(I.url=kc(I.info_hash)),D.push(I.url)}),D.length&&(vi(D.join(t),"text"),console.log("[links]",D),await pe.fire({title:"导出成功",icon:"success",html:`成功导出 ${D.length} 个链接,请粘贴到文本文件。`,showDenyButton:!0,denyButtonText:"保存到txt",allowEscapeKey:!1,allowOutsideClick:!1,preDeny:async()=>(console.log("[saveAs]"),Ci(D.join(t),`115离线链接_数量${D.length}_${xi()}.txt`),!1)}))}async function b(E,T,D){pe.fire({title:"导出离线链接",html:"正在导出...",didOpen:()=>{pe.showLoading()}});const I=await h(E,T,D);if(pe.hideLoading(),!I.length){await pe.fire({title:"导出失败",icon:"error",html:"查询不到符合条件的离线记录!"});return}const P=[];if(I.forEach(V=>{!V.url&&V.info_hash&&(V.url=kc(V.info_hash)),P.push(V.url)}),!P.length){await pe.fire({title:"导出失败",icon:"error",html:"未完成的离线记录中没有磁力或HTTP链接!"});return}vi(P.join(t),"text"),console.log("[links]",P),await pe.fire({title:"导出成功",icon:"success",html:`成功导出 ${P.length} 个链接,请粘贴到文本文件。`,showDenyButton:!0,denyButtonText:"保存到txt",allowEscapeKey:!1,allowOutsideClick:!1,preDeny:async()=>(console.log("[saveAs]"),Ci(P.join(t),`115离线链接_数量${P.length}_${xi()}.txt`),!1)})}return(E,T)=>{const D=Es("VDropdown");return N(),j("span",J0,[i.value.length?(N(),j("span",Q0,[c("button",{type:"button",class:"pure-button button-small button-error",onClick:l},[Q("删除("),c("span",null,me(i.value.length),1),Q(")")]),Q("      ")])):je("",!0),c("button",{type:"button",class:"pure-button button-mini button-error",onClick:T[0]||(T[0]=I=>a(!1,"")),title:"填写链接以删除对应的离线任务"},"根据链接删除"),Q("   "),i.value.length?(N(),j("button",{key:1,type:"button",class:"pure-button button-mini button-warning",onClick:_,title:"导出选中任务的链接"},[Q("导出已选"),c("span",null,"("+me(i.value.length)+")",1)])):je("",!0),c("button",{type:"button",class:"pure-button button-mini button-error",onClick:T[1]||(T[1]=I=>u(de(Ft).failed)),title:"导出未完成链接"},"导出未完成"),c("button",{type:"button",class:"pure-button button-mini button-success",onClick:T[2]||(T[2]=I=>u(de(Ft).success)),title:"导出已完成链接"},"导出已完成"),c("button",{type:"button",class:"pure-button button-mini button-warning",onClick:T[3]||(T[3]=I=>u(de(Ft).all)),title:"导出全部链接"},"导出全部"),Q("   "),Ce(D,{distance:5,"arrow-padding":10},{popper:Qe(()=>[(N(),Jt(of,null,{default:Qe(()=>[Ce(bp)]),_:1}))]),default:Qe(()=>[X0]),_:1})])}}}),w5="",ex=["cate_id","delete_id","status","hash"],tx={class:"file-name-wrap"},nx={class:"file-name"},sx={task_popup:"goto",href:"javascript:;",class:"name"},ix={rel:"name"},ox={class:"desc-tips",rel:"file_down_violations"},rx={class:"txt-red",rel:"file_down_tips"},ax=["filename"],lx={class:"file-size"},cx={class:"file-process"},ux=c("i",{class:"icon-file-status ifst-failure"},null,-1),dx=c("span",{rel:"progress"},"下载失败",-1),fx=c("i",{class:"icon-file-status ifst-success"},null,-1),px=c("span",{rel:"progress"},"下载成功",-1),hx=c("i",{class:"icon-file-status ifst-downing"},null,-1),mx={rel:"progress"},gx=c("i",{class:"icon-file-status ifst-violation"},null,-1),yx=c("span",{rel:"progress"},"违规",-1),wx=c("i",{class:"icon-file-status ifst-failure"},null,-1),bx=c("span",{rel:"progress"},"[未知]",-1),_x={class:"file-operate",rel:"opt"},vx=c("a",{href:"javascript:;",task_popup:"goto"},[c("i",{class:"icon-operate ifo-opendir"}),c("s",null,"跳转到目录")],-1),xx=["cp_href"],Cx=[c("i",{class:"icon-operate ifo-copy"},null,-1),c("s",null,"复制",-1)],$x=c("a",{href:"javascript:;",class:"btn-delete-offline"},[c("i",{class:"icon-operate ifo-remove"}),c("s",null,"删除")],-1),Ex=Me({__name:"OfflineItem",props:{item:null,space:null,profile:null},setup(e){const t=e,n=dn(()=>t.item.percentDone?parseInt(t.item.percentDone.toString()):0),s=dn(()=>{const{name:r,del_path:a}=t.item;let l=r.replace(/^.*\./,"");return a&&/\/$/.test(a)&&(l="folder"),/^[a-z\d]+$/i.test(l)||(l="unknown"),l}),i=dn(()=>{const{err:r}=t.item;return r?ny[r]:""}),o=dn(()=>t.item.can_appeal===1);return(r,a)=>(N(),j("li",{complete:"",cate_id:e.item.file_id,delete_id:e.item.delete_file_id,status:e.item.status,hash:e.item.info_hash},[c("div",tx,[c("i",{class:Je(["file-type",`tp-${de(s)}`])},null,2),c("div",nx,[c("em",null,[c("a",sx,[c("span",ix,me(e.item.name),1)])])]),q(c("div",ox,[c("span",rx,me(de(i)),1),q(c("a",{href:"javascript:;",class:"btn-link",filename:e.item.name,rel:"violations_down_btn"},"去申诉",8,ax),[[Ot,de(o)]])],512),[[Ot,de(i)]])]),c("div",lx,[c("span",null,me(de(go)(e.item.size)),1)]),c("div",cx,[e.item.status===de(Bt).failed?(N(),j(Ue,{key:0},[ux,dx],64)):e.item.status===de(Bt).success?(N(),j(Ue,{key:1},[fx,px],64)):e.item.status===de(Bt).ing?(N(),j(Ue,{key:2},[hx,c("span",mx,me(de(n))+"%",1)],64)):e.item.status===de(Bt).illegal?(N(),j(Ue,{key:3},[gx,yx],64)):(N(),j(Ue,{key:4},[wx,bx],64))]),c("div",_x,[vx,c("a",{href:"javascript:;",cp_href:e.item.url,task_popup:"copy"},Cx,8,xx),$x])],8,ex))}}),kx={class:"ce-offline-list"},Sx=Me({__name:"OfflineList",props:{items:null,space:null,profile:null},setup(e){return(t,n)=>(N(),j("div",kx,[c("ul",null,[(N(!0),j(Ue,null,nt(e.items,(s,i)=>(N(),Jt(Ex,{Key:i,item:s,space:e.space,profile:e.profile},null,8,["Key","item","space","profile"]))),256))])]))}}),Ax={inline:"",class:"pure-form search-form",size:"small"},Px={class:"form-item",label:"关键词"},Ix=["value"],Tx={class:"form-item"},Lx=["onKeyup"],Ox={class:"form-item",label:"状态"},Dx=["value"],Mx=["value"],Rx={class:"form-item",label:"页数"},Nx=c("small",null,"页",-1),Bx={class:"form-item"},Fx={key:0,title:"根据「名称/名称正则」查找时,是否在找到一个结果时停止继续查找"},Ux={key:0,class:"search-tips"},jx={class:"tips-body"},Hx={key:0},qx=Me({__name:"OfflineSearcher",setup(e){let t,n;const s=fe(),i=fe({KeywordType:$r.name,keyword:"",status:Bt.any,maxPage:5,stopOnFound:!1});let o={...i.value};const r=fe(null),a=fe(!1),l=fe([]),u=fe(null),f=fe({content:"",subContent:"",visible:!1});Tt(async()=>{t=await Xu(),n=await Qu(),s.value=await os(),i.value.KeywordType=s.value.searchKeywordType,i.value.status=s.value.searchStatus,i.value.maxPage=s.value.searchMaxPage,i.value.stopOnFound=s.value.searchStopOnFound,o={...i.value},document.body.addEventListener("click",U=>{V(U)}),h()}),dt(i,Nt(async U=>{console.log("[searchParams changed]",_c(U)),_()},200),{deep:!0});async function h(){window.addEventListener("message",U=>{const{event:X,body:ue}=U.data;switch(X){case ui.searchPageChanged:y(ue);break;case ui.configChanged:s.value={...ue};break}},!1)}async function y(U){console.log("[handleSearchPageChanged]",U),await ae({subContent:`正在搜索第 ${U} 页...`,visible:!0})}async function _(){const U=await os();let X=0;o.KeywordType!==i.value.KeywordType&&(U.searchKeywordType=i.value.KeywordType,X++),o.status!==i.value.status&&(U.searchStatus=i.value.status,X++),o.maxPage!==i.value.maxPage&&(U.searchMaxPage=i.value.maxPage,X++),o.stopOnFound!==i.value.stopOnFound&&(U.searchStopOnFound=i.value.stopOnFound,X++),X&&(await mp(U),console.log("[handleSearchParamsChange]",U),s.value={...U}),o={...i.value}}async function b(U){var X;(X=r.value)==null||X.select()}async function E(U){var X;i.value.keyword="",(X=r.value)==null||X.focus()}async function T(){l.value=[],i.value.keyword="",o={...i.value},await ae({visible:!1}),await I(!1);try{parent.window.Core.OFFL5Plug.ChangePage(1)}catch(U){console.error(U)}}async function D(){var X;l.value=[];let{keyword:U}=i.value;if(U=U.trim(),U===""){await oi(),(X=r.value)==null||X.select(),Oi.fire({icon:"warning",title:"关键词不能为空!"});return}a.value=!0,await ae({content:"正在搜索...",subContent:"",visible:!0});try{const ue={status:i.value.status,maxPage:i.value.maxPage,fuzzyName:!0,caseSensitive:!1,stopOnFound:i.value.stopOnFound};ue[i.value.KeywordType]=i.value.keyword,ue.infoHash&&(ue.infoHash=Sc(ue.infoHash)),console.log("[search filter]",ue);const ye=await $0(n.sign,t.user_id,ue,s.value);l.value=ye,console.log("[search result]",ye),ye.length>0?await ae({visible:!1}):await ae({content:"没有符合条件的离线任务",subContent:"",visible:!0}),await I(!0)}catch(ue){console.warn("[search error]",ue),Oi.fire({icon:"error",title:ue.toString()}),await ae({content:"搜索失败!",subContent:ue.toString(),visible:!0})}finally{a.value=!1}}async function I(U=!0){var ye,Le;!l.value.length&&U&&Oi.fire({icon:"warning",html:"没有符合条件的离线任务"}),await oi();const X=(ye=u.value)==null?void 0:ye.querySelector("ul");if(!X)return;const ue=document.querySelector("ul#js-warp");ue&&(ue.innerHTML=X.innerHTML),await P(),(Le=r.value)==null||Le.focus()}async function P(){const U=l.value.length,X=document.querySelector("#js-page");if(!X)return;const ue=X.querySelector(".left-bvf span");ue.textContent=`共搜索到 ${U} 个结果`;const ye=X.querySelector(".pagination .con");ye.style.display="none"}async function V(U){let X=U.target;if(X.classList.contains("ifo-remove")&&(X=X.closest("a")),!X.classList.contains("btn-delete-offline"))return;const ue=X.closest("li"),ye=await yp(ue),Le=[ye.info_hash];let ge={title:"删除离线记录",icon:"warning",html:`确定要删除「${ye.name}」吗?`,showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消"};ye.delete_file_id&&(ge={...ge,input:"checkbox",inputValue:0,inputPlaceholder:"同时删除文件"});const{isConfirmed:L,value:re}=await pe.fire(ge);if(!L)return;const G=!!re;pe.showLoading(),pe.update({html:"正在删除..."}),await Oa(Le,n,G,t.user_id),oe({icon:"success",title:"删除成功",timer:800,position:"top-end"}),await Il(Le)}async function ae(U){f.value={...f.value,...U}}return(U,X)=>(N(),j("div",{class:Je(["ce-offline-searcher",{loading:a.value}])},[c("form",Ax,[c("fieldset",null,[c("div",Px,[q(c("select",{"onUpdate:modelValue":X[0]||(X[0]=ue=>i.value.KeywordType=ue),size:"small",onChange:b},[(N(!0),j(Ue,null,nt(de(h0),(ue,ye)=>(N(),j("option",{key:ye,value:ye},me(ue),9,Ix))),128))],544),[[Ps,i.value.KeywordType]])]),c("div",Tx,[c("div",{class:Je(["clearable-wrap",{"is-empty":i.value.keyword===""}])},[q(c("input",{ref_key:"refKeyword",ref:r,"onUpdate:modelValue":X[1]||(X[1]=ue=>i.value.keyword=ue),placeholder:"请输入关键词",clearable:"",onKeyup:Yf(D,["enter"])},null,40,Lx),[[Ge,i.value.keyword]]),c("button",{type:"button",class:"pure-button pure-button-default button-xsmall btn-clear",onClick:E},"×")],2)]),c("div",Ox,[q(c("select",{"onUpdate:modelValue":X[2]||(X[2]=ue=>i.value.status=ue),placeholder:"请选择",clearable:"",style:{width:"90px"}},[c("option",{value:de(Bt).any},"-状态-",8,Dx),(N(!0),j(Ue,null,nt(de(qm),(ue,ye)=>(N(),j("option",{key:ye,value:ye},me(ue),9,Mx))),128))],512),[[Ps,i.value.status]])]),c("div",Rx,[q(c("input",{type:"number","onUpdate:modelValue":X[3]||(X[3]=ue=>i.value.maxPage=ue),min:1,max:1e5,title:"最多查找页数"},null,512),[[Ge,i.value.maxPage]]),Nx]),c("div",Bx,[[de($r).name,de($r).nameRegex].includes(i.value.KeywordType)?(N(),j("label",Fx,[q(c("input",{type:"checkbox","onUpdate:modelValue":X[4]||(X[4]=ue=>i.value.stopOnFound=ue),class:"stop-on-found"},null,512),[[_e,i.value.stopOnFound]]),Q(" 找到即停 ")])):je("",!0),c("button",{type:"button",class:"pure-button pure-button-primary button-small",onClick:D},"查找"),Q("    "),c("button",{type:"button",class:"pure-button pure-button-default button-xsmall",onClick:T,title:"清空关键词;重置列表到非查找状态"},"重置")])])]),c("div",{ref_key:"refList",ref:u,class:"list"},[Ce(Sx,{items:l.value,space:de(n),profile:de(t)},null,8,["items","space","profile"])],512),f.value.visible?(N(),j("div",Ux,[c("div",jx,[c("h2",null,me(f.value.content),1),f.value.subContent?(N(),j("p",Hx,me(f.value.subContent),1)):je("",!0)])])):je("",!0)],2))}}),v5="";function Dn(e){return e.split("-")[0]}function di(e){return e.split("-")[1]}function Zi(e){return["top","bottom"].includes(Dn(e))?"x":"y"}function Tl(e){return e==="y"?"height":"width"}function _p(e){let{reference:t,floating:n,placement:s}=e;const i=t.x+t.width/2-n.width/2,o=t.y+t.height/2-n.height/2;let r;switch(Dn(s)){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:o};break;case"left":r={x:t.x-n.width,y:o};break;default:r={x:t.x,y:t.y}}const a=Zi(s),l=Tl(a);switch(di(s)){case"start":r[a]=r[a]-(t[l]/2-n[l]/2);break;case"end":r[a]=r[a]+(t[l]/2-n[l]/2);break}return r}const zx=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:o=[],platform:r}=n;let a=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:l,y:u}=_p({...a,placement:s}),f=s,h={};for(let y=0;y<o.length;y++){const{name:_,fn:b}=o[y],{x:E,y:T,data:D,reset:I}=await b({x:l,y:u,initialPlacement:s,placement:f,strategy:i,middlewareData:h,rects:a,platform:r,elements:{reference:e,floating:t}});if(l=E!=null?E:l,u=T!=null?T:u,h={...h,[_]:D!=null?D:{}},I){typeof I=="object"&&(I.placement&&(f=I.placement),I.rects&&(a=I.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):I.rects),{x:l,y:u}=_p({...a,placement:f})),y=-1;continue}}return{x:l,y:u,placement:f,strategy:i,middlewareData:h}};function Vx(e){return{top:0,right:0,bottom:0,left:0,...e}}function vp(e){return typeof e!="number"?Vx(e):{top:e,right:e,bottom:e,left:e}}function Ll(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Sr(e,t){t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:r,strategy:a}=e,{boundary:l="clippingParents",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:y=0}=t,_=vp(y),E=r[h?f==="floating"?"reference":"floating":f],T=await i.getClippingClientRect({element:await i.isElement(E)?E:E.contextElement||await i.getDocumentElement({element:r.floating}),boundary:l,rootBoundary:u}),D=Ll(await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:f==="floating"?{...o.floating,x:n,y:s}:o.reference,offsetParent:await i.getOffsetParent({element:r.floating}),strategy:a}));return{top:T.top-D.top+_.top,bottom:D.bottom-T.bottom+_.bottom,left:T.left-D.left+_.left,right:D.right-T.right+_.right}}const Wx=Math.min,Is=Math.max;function Ol(e,t,n){return Is(e,Wx(t,n))}const Kx=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:s=0}=e!=null?e:{},{x:i,y:o,placement:r,rects:a,platform:l}=t;if(n==null)return{};const u=vp(s),f={x:i,y:o},h=Dn(r),y=Zi(h),_=Tl(y),b=await l.getDimensions({element:n}),E=y==="y"?"top":"left",T=y==="y"?"bottom":"right",D=a.reference[_]+a.reference[y]-f[y]-a.floating[_],I=f[y]-a.reference[y],P=await l.getOffsetParent({element:n}),V=P?y==="y"?P.clientHeight||0:P.clientWidth||0:0,ae=D/2-I/2,U=u[E],X=V-b[_]-u[T],ue=V/2-b[_]/2+ae,ye=Ol(U,ue,X);return{data:{[y]:ye,centerOffset:ue-ye}}}}),Gx={left:"right",right:"left",bottom:"top",top:"bottom"};function Ar(e){return e.replace(/left|right|bottom|top/g,t=>Gx[t])}function xp(e,t){const n=di(e)==="start",s=Zi(e),i=Tl(s);let o=s==="x"?n?"right":"left":n?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Ar(o)),{main:o,cross:Ar(o)}}const Yx={start:"end",end:"start"};function Dl(e){return e.replace(/start|end/g,t=>Yx[t])}const Jx=["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function Qx(e,t,n){return(e?[...n.filter(i=>di(i)===e),...n.filter(i=>di(i)!==e)]:n.filter(i=>Dn(i)===i)).filter(i=>e?di(i)===e||(t?Dl(i)!==i:!1):!0)}const Xx=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,s,i,o,r,a;const{x:l,y:u,rects:f,middlewareData:h,placement:y}=t,{alignment:_=null,allowedPlacements:b=Jx,autoAlignment:E=!0,...T}=e;if((n=h.autoPlacement)!=null&&n.skip)return{};const D=Qx(_,E,b),I=await Sr(t,T),P=(s=(i=h.autoPlacement)==null?void 0:i.index)!=null?s:0,V=D[P],{main:ae,cross:U}=xp(V,f);if(y!==V)return{x:l,y:u,reset:{placement:D[0]}};const X=[I[Dn(V)],I[ae],I[U]],ue=[...(o=(r=h.autoPlacement)==null?void 0:r.overflows)!=null?o:[],{placement:V,overflows:X}],ye=D[P+1];if(ye)return{data:{index:P+1,overflows:ue},reset:{placement:ye}};const Le=ue.slice().sort((L,re)=>L.overflows[0]-re.overflows[0]),ge=(a=Le.find(L=>{let{overflows:re}=L;return re.every(G=>G<=0)}))==null?void 0:a.placement;return{data:{skip:!0},reset:{placement:ge!=null?ge:Le[0].placement}}}}};function Zx(e){const t=Ar(e);return[Dl(e),t,Dl(t)]}const eC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:i,middlewareData:o,rects:r,initialPlacement:a}=t;if((n=o.flip)!=null&&n.skip)return{};const{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",flipAlignment:y=!0,..._}=e,b=Dn(i),T=f||(b===a||!y?[Ar(a)]:Zx(a)),D=[a,...T],I=await Sr(t,_),P=[];let V=((s=o.flip)==null?void 0:s.overflows)||[];if(l&&P.push(I[b]),u){const{main:ue,cross:ye}=xp(i,r);P.push(I[ue],I[ye])}if(V=[...V,{placement:i,overflows:P}],!P.every(ue=>ue<=0)){var ae,U;const ue=((ae=(U=o.flip)==null?void 0:U.index)!=null?ae:0)+1,ye=D[ue];if(ye)return{data:{index:ue,overflows:V},reset:{placement:ye}};let Le="bottom";switch(h){case"bestFit":{var X;const ge=(X=V.slice().sort((L,re)=>L.overflows.filter(G=>G>0).reduce((G,Se)=>G+Se,0)-re.overflows.filter(G=>G>0).reduce((G,Se)=>G+Se,0))[0])==null?void 0:X.placement;ge&&(Le=ge);break}case"initialPlacement":Le=a;break}return{data:{skip:!0},reset:{placement:Le}}}return{}}}};function tC(e){let{placement:t,rects:n,value:s}=e;const i=Dn(t),o=["left","top"].includes(i)?-1:1,r=typeof s=="function"?s({...n,placement:t}):s,{mainAxis:a,crossAxis:l}=typeof r=="number"?{mainAxis:r,crossAxis:0}:{mainAxis:0,crossAxis:0,...r};return Zi(i)==="x"?{x:l,y:a*o}:{x:a*o,y:l}}const nC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(t){const{x:n,y:s,placement:i,rects:o}=t,r=tC({placement:i,rects:o,value:e});return{x:n+r.x,y:s+r.y,data:r}}}};function sC(e){return e==="x"?"y":"x"}const iC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:i}=t,{mainAxis:o=!0,crossAxis:r=!1,limiter:a={fn:T=>{let{x:D,y:I}=T;return{x:D,y:I}}},...l}=e,u={x:n,y:s},f=await Sr(t,l),h=Zi(Dn(i)),y=sC(h);let _=u[h],b=u[y];if(o){const T=h==="y"?"top":"left",D=h==="y"?"bottom":"right",I=_+f[T],P=_-f[D];_=Ol(I,_,P)}if(r){const T=y==="y"?"top":"left",D=y==="y"?"bottom":"right",I=b+f[T],P=b-f[D];b=Ol(I,b,P)}const E=a.fn({...t,[h]:_,[y]:b});return{...E,data:{x:E.x-n,y:E.y-s}}}}},oC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n;const{placement:s,rects:i,middlewareData:o}=t,{apply:r,...a}=e;if((n=o.size)!=null&&n.skip)return{};const l=await Sr(t,a),u=Dn(s),f=di(s)==="end";let h,y;u==="top"||u==="bottom"?(h=u,y=f?"left":"right"):(y=u,h=f?"top":"bottom");const _=Is(l.left,0),b=Is(l.right,0),E=Is(l.top,0),T=Is(l.bottom,0),D={height:i.floating.height-(["left","right"].includes(s)?2*(E!==0||T!==0?E+T:Is(l.top,l.bottom)):l[h]),width:i.floating.width-(["top","bottom"].includes(s)?2*(_!==0||b!==0?_+b:Is(l.left,l.right)):l[y])};return r==null||r({...D,...i}),{data:{skip:!0},reset:{rects:!0}}}}};function Ml(e){return(e==null?void 0:e.toString())==="[object Window]"}function rs(e){if(e==null)return window;if(!Ml(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Pr(e){return rs(e).getComputedStyle(e)}function Mn(e){return Ml(e)?"":e?(e.nodeName||"").toLowerCase():""}function Rn(e){return e instanceof rs(e).HTMLElement}function Ir(e){return e instanceof rs(e).Element}function rC(e){return e instanceof rs(e).Node}function Cp(e){const t=rs(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Tr(e){const{overflow:t,overflowX:n,overflowY:s}=Pr(e);return/auto|scroll|overlay|hidden/.test(t+s+n)}function aC(e){return["table","td","th"].includes(Mn(e))}function $p(e){const t=navigator.userAgent.toLowerCase().includes("firefox"),n=Pr(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 Ep=Math.min,eo=Math.max,Lr=Math.round;function fi(e,t){t===void 0&&(t=!1);const n=e.getBoundingClientRect();let s=1,i=1;return t&&Rn(e)&&(s=e.offsetWidth>0&&Lr(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Lr(n.height)/e.offsetHeight||1),{width:n.width/s,height:n.height/i,top:n.top/i,right:n.right/s,bottom:n.bottom/i,left:n.left/s,x:n.left/s,y:n.top/i}}function as(e){return((rC(e)?e.ownerDocument:e.document)||window.document).documentElement}function Or(e){return Ml(e)?{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}:{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function kp(e){return fi(as(e)).left+Or(e).scrollLeft}function lC(e){const t=fi(e);return Lr(t.width)!==e.offsetWidth||Lr(t.height)!==e.offsetHeight}function cC(e,t,n){const s=Rn(t),i=as(t),o=fi(e,s&&lC(t));let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(s||!s&&n!=="fixed")if((Mn(t)!=="body"||Tr(i))&&(r=Or(t)),Rn(t)){const l=fi(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}else i&&(a.x=kp(i));return{x:o.left+r.scrollLeft-a.x,y:o.top+r.scrollTop-a.y,width:o.width,height:o.height}}function Dr(e){return Mn(e)==="html"?e:e.assignedSlot||e.parentNode||(Cp(e)?e.host:null)||as(e)}function Sp(e){return!Rn(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function uC(e){let t=Dr(e);for(;Rn(t)&&!["html","body"].includes(Mn(t));){if($p(t))return t;t=t.parentNode}return null}function Rl(e){const t=rs(e);let n=Sp(e);for(;n&&aC(n)&&getComputedStyle(n).position==="static";)n=Sp(n);return n&&(Mn(n)==="html"||Mn(n)==="body"&&getComputedStyle(n).position==="static"&&!$p(n))?t:n||uC(e)||t}function Ap(e){return{width:e.offsetWidth,height:e.offsetHeight}}function dC(e){let{rect:t,offsetParent:n,strategy:s}=e;const i=Rn(n),o=as(n);if(n===o)return t;let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((i||!i&&s!=="fixed")&&((Mn(n)!=="body"||Tr(o))&&(r=Or(n)),Rn(n))){const l=fi(n,!0);a.x=l.x+n.clientLeft,a.y=l.y+n.clientTop}return{...t,x:t.x-r.scrollLeft+a.x,y:t.y-r.scrollTop+a.y}}function fC(e){const t=rs(e),n=as(e),s=t.visualViewport;let i=n.clientWidth,o=n.clientHeight,r=0,a=0;return s&&(i=s.width,o=s.height,Math.abs(t.innerWidth/s.scale-s.width)<.01&&(r=s.offsetLeft,a=s.offsetTop)),{width:i,height:o,x:r,y:a}}function pC(e){var t;const n=as(e),s=Or(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=eo(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),r=eo(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let a=-s.scrollLeft+kp(e);const l=-s.scrollTop;return Pr(i||n).direction==="rtl"&&(a+=eo(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Pp(e){return["html","body","#document"].includes(Mn(e))?e.ownerDocument.body:Rn(e)&&Tr(e)?e:Pp(Dr(e))}function Mr(e,t){var n;t===void 0&&(t=[]);const s=Pp(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=rs(s),r=i?[o].concat(o.visualViewport||[],Tr(s)?s:[]):s,a=t.concat(r);return i?a:a.concat(Mr(Dr(r)))}function hC(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Cp(n)){let s=t;do{if(s&&e===s)return!0;s=s.parentNode||s.host}while(s)}return!1}function mC(e){const t=fi(e),n=t.top+e.clientTop,s=t.left+e.clientLeft;return{top:n,left:s,x:s,y:n,right:s+e.clientWidth,bottom:n+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function Ip(e,t){return t==="viewport"?Ll(fC(e)):Ir(t)?mC(t):Ll(pC(as(e)))}function gC(e){const t=Mr(Dr(e)),s=["absolute","fixed"].includes(Pr(e).position)&&Rn(e)?Rl(e):e;return Ir(s)?t.filter(i=>Ir(i)&&hC(i,s)&&Mn(i)!=="body"):[]}function yC(e){let{element:t,boundary:n,rootBoundary:s}=e;const o=[...n==="clippingParents"?gC(t):[].concat(n),s],r=o[0],a=o.reduce((l,u)=>{const f=Ip(t,u);return l.top=eo(f.top,l.top),l.right=Ep(f.right,l.right),l.bottom=Ep(f.bottom,l.bottom),l.left=eo(f.left,l.left),l},Ip(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 wC={getElementRects:e=>{let{reference:t,floating:n,strategy:s}=e;return{reference:cC(t,Rl(n),s),floating:{...Ap(n),x:0,y:0}}},convertOffsetParentRelativeRectToViewportRelativeRect:e=>dC(e),getOffsetParent:e=>{let{element:t}=e;return Rl(t)},isElement:e=>Ir(e),getDocumentElement:e=>{let{element:t}=e;return as(t)},getClippingClientRect:e=>yC(e),getDimensions:e=>{let{element:t}=e;return Ap(t)},getClientRects:e=>{let{element:t}=e;return t.getClientRects()}},bC=(e,t,n)=>zx(e,t,{platform:wC,...n});var _C=Object.defineProperty,vC=Object.defineProperties,xC=Object.getOwnPropertyDescriptors,Tp=Object.getOwnPropertySymbols,CC=Object.prototype.hasOwnProperty,$C=Object.prototype.propertyIsEnumerable,Lp=(e,t,n)=>t in e?_C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nn=(e,t)=>{for(var n in t||(t={}))CC.call(t,n)&&Lp(e,n,t[n]);if(Tp)for(var n of Tp(t))$C.call(t,n)&&Lp(e,n,t[n]);return e},to=(e,t)=>vC(e,xC(t));function Op(e,t){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(typeof t[n]=="object"&&e[n]?Op(e[n],t[n]):e[n]=t[n])}const Bn={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 pi(e,t){let n=Bn.themes[e]||{},s;do s=n[t],typeof s>"u"?n.$extend?n=Bn.themes[n.$extend]||{}:(n=null,s=Bn[t]):n=null;while(n);return s}function EC(e){const t=[e];let n=Bn.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=Bn.themes[n.$extend]||{}):n=null;while(n);return t.map(s=>`v-popper--theme-${s}`)}function Dp(e){const t=[e];let n=Bn.themes[e]||{};do n.$extend?(t.push(n.$extend),n=Bn.themes[n.$extend]||{}):n=null;while(n);return t}let Ts=!1;if(typeof window<"u"){Ts=!1;try{const e=Object.defineProperty({},"passive",{get(){Ts=!0}});window.addEventListener("test",null,e)}catch{}}let Mp=!1;typeof window<"u"&&typeof navigator<"u"&&(Mp=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Rp=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),Np={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart"},Bp={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend"};function Fp(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}function Nl(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const pn=[];let Ls=null;const Up={};function jp(e){let t=Up[e];return t||(t=Up[e]=[]),t}let Bl=function(){};typeof window<"u"&&(Bl=window.Element);function Ve(e){return function(t){return pi(t.theme,e)}}const Fl="__floating-vue__popper";var Hp=()=>Me({name:"VPopper",provide(){return{[Fl]:{parentPopper:this}}},inject:{[Fl]:{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:Ve("disabled")},positioningDisabled:{type:Boolean,default:Ve("positioningDisabled")},placement:{type:String,default:Ve("placement"),validator:e=>Rp.includes(e)},delay:{type:[String,Number,Object],default:Ve("delay")},distance:{type:[Number,String],default:Ve("distance")},skidding:{type:[Number,String],default:Ve("skidding")},triggers:{type:Array,default:Ve("triggers")},showTriggers:{type:[Array,Function],default:Ve("showTriggers")},hideTriggers:{type:[Array,Function],default:Ve("hideTriggers")},popperTriggers:{type:Array,default:Ve("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:Ve("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:Ve("popperHideTriggers")},container:{type:[String,Object,Bl,Boolean],default:Ve("container")},boundary:{type:[String,Bl],default:Ve("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:Ve("strategy")},autoHide:{type:[Boolean,Function],default:Ve("autoHide")},handleResize:{type:Boolean,default:Ve("handleResize")},instantMove:{type:Boolean,default:Ve("instantMove")},eagerMount:{type:Boolean,default:Ve("eagerMount")},popperClass:{type:[String,Array,Object],default:Ve("popperClass")},computeTransformOrigin:{type:Boolean,default:Ve("computeTransformOrigin")},autoMinSize:{type:Boolean,default:Ve("autoMinSize")},autoSize:{type:[Boolean,String],default:Ve("autoSize")},autoMaxSize:{type:Boolean,default:Ve("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:Ve("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:Ve("preventOverflow")},overflowPadding:{type:[Number,String],default:Ve("overflowPadding")},arrowPadding:{type:[Number,String],default:Ve("arrowPadding")},arrowOverflow:{type:Boolean,default:Ve("arrowOverflow")},flip:{type:Boolean,default:Ve("flip")},shift:{type:Boolean,default:Ve("shift")},shiftCrossAxis:{type:Boolean,default:Ve("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:Ve("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:to(Nn({},this.classes),{popperClass:this.popperClass}),result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[Fl])==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:Nn(Nn({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 s,i;((s=this.parentPopper)==null?void 0:s.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(nC({mainAxis:this.distance,crossAxis:this.skidding}));const n=this.placement.startsWith("auto");if(n?t.middleware.push(Xx({alignment:(e=this.placement.split("-")[1])!=null?e:""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(iC({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!n&&this.flip&&t.middleware.push(eC({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(Kx({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&t.middleware.push({name:"arrowOverflow",fn:({placement:i,rects:o,middlewareData:r})=>{let a;const{centerOffset:l}=r.arrow;return i.startsWith("top")||i.startsWith("bottom")?a=Math.abs(l)>o.reference.width/2:a=Math.abs(l)>o.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:o,placement:r,middlewareData:a})=>{var l;if((l=a.autoSize)!=null&&l.skip)return{};let u,f;return r.startsWith("top")||r.startsWith("bottom")?u=o.reference.width:f=o.reference.height,this.$_innerNode.style[i==="min"?"minWidth":i==="max"?"maxWidth":"width"]=u!=null?`${u}px`:null,this.$_innerNode.style[i==="min"?"minHeight":i==="max"?"maxHeight":"height"]=f!=null?`${f}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(oC({boundary:this.boundary,padding:this.overflowPadding,apply:({width:i,height:o})=>{this.$_innerNode.style.maxWidth=i!=null?`${i}px`:null,this.$_innerNode.style.maxHeight=o!=null?`${o}px`:null}})));const s=await bC(this.$_referenceNode,this.$_popperNode,t);Object.assign(this.result,{x:s.x,y:s.y,placement:s.placement,strategy:s.strategy,arrow:Nn(Nn({},s.middlewareData.arrow),s.middlewareData.arrowOverflow)})},$_scheduleShow(e=null,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),Ls&&this.instantMove&&Ls.instantMove&&Ls!==this.parentPopper){Ls.$_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&&(Ls=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 Nl(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Mr(this.$_referenceNode),...Mr(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"),s=n.parentNode.getBoundingClientRect(),i=t.x+t.width/2-(s.left+n.offsetLeft),o=t.y+t.height/2-(s.top+n.offsetTop);this.result.transformOrigin=`${i}px ${o}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<pn.length;n++)t=pn[n],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}pn.push(this),document.body.classList.add("v-popper--some-open");for(const t of Dp(this.theme))jp(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 Nl(),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,Fp(pn,this),pn.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of Dp(this.theme)){const s=jp(n);Fp(s,this),s.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}Ls===this&&(Ls=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=pi(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 Nl(),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,Np,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],Np,this.popperTriggers,this.popperShowTriggers,e);const t=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,Bp,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],Bp,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(s=>s.addEventListener(t,n,Ts?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,s,i){let o=n;s!=null&&(o=typeof s=="function"?s(o):s),o.forEach(r=>{const a=t[r];a&&this.$_registerEventListeners(e,a,i)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(n=>{const{targetNodes:s,eventType:i,handler:o}=n;!e||e===i?s.forEach(r=>r.removeEventListener(i,o)):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 s=n.getAttribute(e);s&&(n.removeAttribute(e),n.setAttribute(t,s))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const n in e){const s=e[n];s==null?t.removeAttribute(n):t.setAttribute(n,s)}},$_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(no>=e.left&&no<=e.right&&so>=e.top&&so<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),n=no-ls,s=so-cs,o=t.left+t.width/2-ls+(t.top+t.height/2)-cs+t.width+t.height,r=ls+n*o,a=cs+s*o;return Rr(ls,cs,r,a,t.left,t.top,t.left,t.bottom)||Rr(ls,cs,r,a,t.left,t.top,t.right,t.top)||Rr(ls,cs,r,a,t.right,t.top,t.right,t.bottom)||Rr(ls,cs,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"&&(Mp?(document.addEventListener("touchstart",qp,Ts?{passive:!0,capture:!0}:!0),document.addEventListener("touchend",SC,Ts?{passive:!0,capture:!0}:!0)):(window.addEventListener("mousedown",qp,!0),window.addEventListener("click",kC,!0)),window.addEventListener("resize",IC));function qp(e){for(let t=0;t<pn.length;t++){const n=pn[t];try{const s=n.popperNode();n.$_mouseDownContains=s.contains(e.target)}catch{}}}function kC(e){zp(e)}function SC(e){zp(e,!0)}function zp(e,t=!1){const n={};for(let s=pn.length-1;s>=0;s--){const i=pn[s];try{const o=i.$_containsGlobalTarget=AC(i,e);i.$_pendingHide=!1,requestAnimationFrame(()=>{if(i.$_pendingHide=!1,!n[i.randomId]&&Vp(i,o,e)){if(i.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&o){let a=i.parentPopper;for(;a;)n[a.randomId]=!0,a=a.parentPopper;return}let r=i.parentPopper;for(;r&&Vp(r,r.$_containsGlobalTarget,e);){r.$_handleGlobalClose(e,t);r=r.parentPopper}}})}catch{}}}function AC(e,t){const n=e.popperNode();return e.$_mouseDownContains||n.contains(t.target)}function Vp(e,t,n){return n.closeAllPopover||n.closePopover&&t||PC(e,n)&&!t}function PC(e,t){if(typeof e.autoHide=="function"){const n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function IC(e){for(let t=0;t<pn.length;t++)pn[t].$_computePosition(e)}let ls=0,cs=0,no=0,so=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{ls=no,cs=so,no=e.clientX,so=e.clientY},Ts?{passive:!0}:void 0);function Rr(e,t,n,s,i,o,r,a){const l=((r-i)*(t-o)-(a-o)*(e-i))/((a-o)*(n-e)-(r-i)*(s-t)),u=((n-e)*(t-o)-(s-t)*(e-i))/((a-o)*(n-e)-(r-i)*(s-t));return l>=0&&l<=1&&u>=0&&u<=1}var Nr=(e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n};const TC={extends:Hp()};function LC(e,t,n,s,i,o){return N(),j("div",{ref:"reference",class:Je(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[cn(e.$slots,"default",Db(Of(e.slotData)))],2)}var OC=Nr(TC,[["render",LC]]);function DC(){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 s=e.indexOf("rv:");return parseInt(e.substring(s+3,e.indexOf(".",s)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}let Br;function Ul(){Ul.init||(Ul.init=!0,Br=DC()!==-1)}var Fr={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Ul(),oi(()=>{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",Br&&this.$el.appendChild(e),e.data="about:blank",Br||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&&(!Br&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const MC=N_();M_("data-v-b329ee4c");const RC={class:"resize-observer",tabindex:"-1"};R_();const NC=MC((e,t,n,s,i,o)=>(N(),Jt("div",RC)));Fr.render=NC,Fr.__scopeId="data-v-b329ee4c",Fr.__file="src/components/ResizeObserver.vue";var Wp=(e="theme")=>({computed:{themeClass(){return EC(this[e])}}});const BC=Me({name:"VPopperContent",components:{ResizeObserver:Fr},mixins:[Wp()],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}}}),FC=["id","aria-hidden","tabindex","data-popper-placement"],UC={ref:"inner",class:"v-popper__inner"},jC=[c("div",{class:"v-popper__arrow-outer"},null,-1),c("div",{class:"v-popper__arrow-inner"},null,-1)];function HC(e,t,n,s,i,o){const r=Es("ResizeObserver");return N(),j("div",{id:e.popperId,ref:"popover",class:Je(["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:In(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]=Yf(a=>e.autoHide&&e.$emit("hide"),["esc"]))},[c("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=a=>e.autoHide&&e.$emit("hide"))}),c("div",{class:"v-popper__wrapper",style:In(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[c("div",UC,[e.mounted?(N(),j(Ue,{key:0},[c("div",null,[cn(e.$slots,"default")]),e.handleResize?(N(),Jt(r,{key:0,onNotify:t[1]||(t[1]=a=>e.$emit("resize",a))})):je("",!0)],64)):je("",!0)],512),c("div",{ref:"arrow",class:"v-popper__arrow-container",style:In(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},jC,4)],4)],46,FC)}var Kp=Nr(BC,[["render",HC]]),Gp={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 qC=Me({name:"VPopperWrapper",components:{Popper:OC,PopperContent:Kp},mixins:[Gp,Wp("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 zC(e,t,n,s,i,o){const r=Es("PopperContent"),a=Es("Popper");return N(),Jt(a,{ref:"popper",theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:Je([e.themeClass])},{default:Qe(({popperId:l,isShown:u,shouldMountContent:f,skipTransition:h,autoHide:y,show:_,hide:b,handleResize:E,onResize:T,classes:D,result:I})=>[cn(e.$slots,"default",{shown:u,show:_,hide:b}),Ce(r,{ref:"popperContent","popper-id":l,theme:e.finalTheme,shown:u,mounted:f,"skip-transition":h,"auto-hide":y,"handle-resize":E,classes:D,result:I,onHide:b,onResize:T},{default:Qe(()=>[cn(e.$slots,"popper",{shown:u,hide:b})]),_: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 jl=Nr(qC,[["render",zC]]);const VC=Me(to(Nn({},jl),{name:"VDropdown",vPopperTheme:"dropdown"})),WC=Me(to(Nn({},jl),{name:"VMenu",vPopperTheme:"menu"})),KC=Me(to(Nn({},jl),{name:"VTooltip",vPopperTheme:"tooltip"})),GC=Me({name:"VTooltipDirective",components:{Popper:Hp(),PopperContent:Kp},mixins:[Gp],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>pi(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>pi(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(s=>this.onResult(t,s)):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}}}),YC=["innerHTML"],JC=["textContent"];function QC(e,t,n,s,i,o){const r=Es("PopperContent"),a=Es("Popper");return N(),Jt(a,Mf({ref:"popper"},e.$attrs,{theme:e.theme,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:Qe(({popperId:l,isShown:u,shouldMountContent:f,skipTransition:h,autoHide:y,hide:_,handleResize:b,onResize:E,classes:T,result:D})=>[Ce(r,{ref:"popperContent",class:Je({"v-popper--tooltip-loading":e.loading}),"popper-id":l,theme:e.theme,shown:u,mounted:f,"skip-transition":h,"auto-hide":y,"handle-resize":b,classes:T,result:D,onHide:_,onResize:E},{default:Qe(()=>[e.html?(N(),j("div",{key:0,innerHTML:e.finalContent},null,8,YC)):(N(),j("div",{key:1,textContent:me(e.finalContent)},null,8,JC))]),_: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 XC=Nr(GC,[["render",QC]]);const Yp="v-popper--has-tooltip";function ZC(e,t){let n=e.placement;if(!n&&t)for(const s of Rp)t[s]&&(n=s);return n||(n=pi(e.theme||"tooltip","placement")),n}function Jp(e,t,n){let s;const i=typeof t;return i==="string"?s={content:t}:t&&i==="object"?s=t:s={content:!1},s.placement=ZC(s,n),s.targetNodes=()=>[e],s.referenceNode=()=>e,s}let Hl,io,e$=0;function t$(){if(Hl)return;io=fe([]),Hl=xn({name:"VTooltipDirectiveApp",setup(){return{directives:io}},render(){return this.directives.map(t=>Dv(XC,to(Nn({},t.options),{shown:t.shown||t.options.shown,key:t.id})))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),Hl.mount(e)}function n$(e,t,n){t$();const s=fe(Jp(e,t,n)),i=fe(!1),o={id:e$++,options:s,shown:i};return io.value.push(o),e.classList&&e.classList.add(Yp),e.$_popper={options:s,item:o,show(){i.value=!0},hide(){i.value=!1}}}function Qp(e){if(e.$_popper){const t=io.value.indexOf(e.$_popper.item);t!==-1&&io.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(Yp)}function Xp(e,{value:t,modifiers:n}){const s=Jp(e,t,n);if(!s.content||pi(s.theme||"tooltip","disabled"))Qp(e);else{let i;e.$_popper?(i=e.$_popper,i.options.value=s):i=n$(e,t,n),typeof t.shown<"u"&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?i.show():i.hide())}}var s$={beforeMount:Xp,updated:Xp,beforeUnmount(e){Qp(e)}};function Zp(e){e.addEventListener("click",th),e.addEventListener("touchstart",nh,Ts?{passive:!0}:!1)}function eh(e){e.removeEventListener("click",th),e.removeEventListener("touchstart",nh),e.removeEventListener("touchend",sh),e.removeEventListener("touchcancel",ih)}function th(e){const t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function nh(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",sh),t.addEventListener("touchcancel",ih)}}function sh(e){const t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){const n=e.changedTouches[0],s=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-s.screenY)<20&&Math.abs(n.screenX-s.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function ih(e){const t=e.currentTarget;t.$_vclosepopover_touch=!1}var i$={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>"u"||t)&&Zp(e)},updated(e,{value:t,oldValue:n,modifiers:s}){e.$_closePopoverModifiers=s,t!==n&&(typeof t>"u"||t?Zp(e):eh(e))},beforeUnmount(e){eh(e)}};function o$(e,t={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,Op(Bn,t),e.directive("tooltip",s$),e.directive("close-popper",i$),e.component("VTooltip",KC),e.component("VDropdown",VC),e.component("VMenu",WC))}const Ur={version:"2.0.0-beta.20",install:o$,options:Bn},E5="";async function r$(){const e=await os(),{host:t,search:n}=location;t==="115.com"&&a$(e),!(t!=="115.com"||!n.includes("offline=1&tab=offline"))&&(await l$(),await c$(),E0())}async function a$(e){const t=Wt();if(!e.noGotoTaskPage||window!==window.top||t.Core.OFFL5Plug)return;async function n(s){t.Core&&s(!0)}try{await qn(n,250,3e4),t.Core.OFFL5Plug||t.$.getScript("https://cdnres.115.com/site/static/plug/offline_wl/offline5.0.js",()=>{t.Core.OFFL5Plug.AddClient({})})}catch(s){throw new Error(`[disableGotoTaskPage] wait Core failed:${s.message}`)}}async function l$(){console.log("[Cloud115 Enhancer] Injecting offline exporter...");const e="cloud115OfflineExporter",t=await os();document.body.classList.add("cloud115-page-offline"),t.enableListManagement&&document.body.classList.add("ce-list-m"),$("body").append(`<div id="${e}"/>`);const n=xn(Z0);n.use(Ur),n.mount(`#${e}`)}async function c$(){console.log("[Cloud115 Enhancer] Injecting offline searcher...");const e="cloud115OfflineSearcher",t=await os();document.body.classList.add("cloud115-page-offline"),t.enableSearcher&&document.body.classList.add("ce-list-s"),$("body").append(`<div id="${e}"/>`);const n=xn(qx);n.use(Ur),n.mount(`#${e}`)}var Dt=(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[e.OPEN_EMPTY_CLEANER=5]="OPEN_EMPTY_CLEANER",e[e.CLOSE_EMPTY_CLEANER=6]="CLOSE_EMPTY_CLEANER",e[e.EMPTY_CLEANER_OPENED=7]="EMPTY_CLEANER_OPENED",e))(Dt||{});const u$={class:"cloud115-eh-cleaner-trigger"},d$=[c("span",null,"清理文件",-1)],f$=Me({__name:"Trigger",setup(e){fe(!1);const t=fe(!0);async function n(a){switch(a.data.type){case Dt.INVOKE_FILTER:await Xw(a.data.payload);break;case Dt.CLEANER_OPENED:await r(a.data.payload);break}}Tt(async()=>{console.log("[CleanerTrigger onMounted]"),window.addEventListener("message",n)}),Cs(()=>{console.log("[CleanerTrigger onUnmounted]"),window.removeEventListener("message",n)});async function s(){await o(),ps({type:Dt.OPEN_CLEANER},window.parent)}let i=0;async function o(){const a=na("cid");!a||a==="0"||(clearTimeout(i),i=window.setTimeout(async()=>{oe({icon:"error",text:"打开清理工具失败!"})},1e3))}async function r(a){console.log("成功打开Cleaner"),clearTimeout(i)}return(a,l)=>q((N(),j("span",u$,[cn(a.$slots,"default",{},()=>[c("span",{class:"btn-open pure-button pure-button-primary",onClick:s,title:"打开清理文件工具"},d$)])],512)),[[Ot,t.value]])}}),S5="";var He=(e=>(e[e.suffix=0]="suffix",e[e.keyword=1]="keyword",e))(He||{}),xt=(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))(xt||{}),ht=(e=>(e.none="",e.prepare="查询文件...",e.prepared="查询文件完成",e.prepareFailed="查询失败",e.deleting="删除文件中...",e.success="清理完成",e.failed="清理失败",e))(ht||{});mt.all,rt.all,mt.video,rt.video,mt.audio,rt.audio,mt.image,rt.image,mt.doc,rt.doc,mt.app,rt.app,mt.archive,rt.archive;const p$=new Map([[rt.all,mt.all],[rt.video,mt.video],[rt.audio,mt.audio],[rt.image,mt.image],[rt.doc,mt.doc],[rt.app,mt.app],[rt.archive,mt.archive]]),jr="#",oh="#",h$=[{type:He.suffix,queryOnly:!1,label:"默认",memo:"请谨慎使用!",size:5,values:["txt","url","html","htm","mht"]},{type:He.suffix,queryOnly:!0,label:"🔍115筛选",memo:"仅用于查询",size:102400,values:["#视频","#音频","#图片","#文档","#应用","#压缩包"]}],m$=["#論壇文宣","#宣傳文本","最新地址","最新网址","论坛地址","永久地址","地址发布","扫码 安装","扫码 下载","免費 掃碼","澳门 赌场","皇冠 赌场","免费18禁手游","免费黄游手游","在线影城","秀场 小视频","裸秀 主播 免费看","第一会所 宣传","SIS 影视联盟",'"最 新 位 址 獲 取"','"社 區 最 新 情 報"','"聚 合 全 網 H 直 播"'],g$=["#論壇文宣","美女 裸聊","秀场 视频","澳门 赌场","皇冠 赌场","影视 联盟","2048 社区","1024 社区","会所 宣传","扫码 安装","社区 关注","免費 掃碼","找回家","防屏蔽","封殺00","秀场 小视频","裸秀 主播 免费看",'"Free Adult Movie"',"奔驰宝马","最新网址","最新免費","免费试用","美女荷官","凤凰娛樂","观看指南","女神在线","更多无水印","免费在线","国产精品","免費原版","獨家資源","成人光碟","最新AV","FDZone","发布器","QR-1024","在這等你","激情祼聊","看妹不用等","真人祼聊","zz.jpg","X8B9.COM.gif","第一会所 宣传","SIS 影视联盟","淘精網","激情咖啡","手機影城","免费手机看片","U視娛樂","加微信","我愛看片手機版","平台正式上線"],y$=[{type:He.keyword,queryOnly:!1,label:"默认",memo:"请谨慎使用!",size:100,values:m$},{type:He.keyword,queryOnly:!1,label:"⚠️大杀器⚠️",memo:"请谨慎使用!",size:100,values:g$},{type:He.keyword,queryOnly:!0,label:"只查询示例",memo:"这是一个示例",size:10240,values:["奔驰宝马","美女荷官",'"最 新 位 址 獲 取"']}];function Os(e){return{id:Date.now().toString(),type:e,queryOnly:!1,label:"",values:"",memo:"",size:0,sort:0,createdAt:0,updatedAt:0}}function rh(e,t){e=e.trim();const n=t===He.keyword&&w$(e),s=t===He.suffix&&b$(e);let i=e;return n&&(i=_$(e)),s&&(i=v$(e).toString()),{type:t,value:e,forDir:n,isFilter:s,pattern:i,num:-1,fileIds:[],size:-1,status:ht.none}}function ah(e){return[ht.prepare,ht.deleting].includes(e.status)}function w$(e){return new RegExp(`^${jr}[\\S]{2,}`).test(e)}function b$(e){return new RegExp(`^${oh}[\\S]{2,}`).test(e)}function _$(e){const t=new RegExp(`^${jr}`);return e.replace(t,"")}function v$(e){const t=new RegExp(`^${oh}`);let n=e.replace(t,"");const s=p$.get(n);if(!s)throw new Error(`"${e}"不是有效的筛选!`);return s}async function Ds(e,t){let n;typeof e=="string"?n=e.split(/[\r\n]+/):n=e;const s=new Set;for(let o=0;o<n.length;o++){const r=n[o].trim();r.length>1&&s.add(r)}const i=[];return s.forEach(o=>{i.push(rh(o,t))}),i}function lh(e){return/(^'.+'$)|(^".+"$)/.test(e)}function ql(e){return lh(e)?e.replace(/^['"]|['"]$/g,""):e}function x$(e,t){if(e===""||t==="")return!1;if(e=e.toLowerCase(),lh(t))return e.includes(ql(t).toLowerCase());const n=t.split(/\s+/);for(let s=0;s<n.length;s++)if(!e.includes(n[s].toLowerCase()))return!1;return!0}async function ch(e,t,n){const s=rh(e.value,e.type);s.num=0,s.size=0,s.fileIds=[];const i=new Set;let o=0;n.maxSize&&(o=n.maxSize*1024*1024);for(let r=0;r<t.length;r++){const a=!!t[r].fid,l=a?t[r].fid:t[r].cid;if(!l||e.type===He.keyword&&(a&&e.forDir||!a&&!e.forDir))continue;const u=parseFloat(t[r].s);o&&a&&u>o||e.type===He.keyword&&!x$(t[r].n,e.pattern)||i.has(l)||(i.add(l),s.size+=u)}return s.fileIds=Array.from(i),s.num=s.fileIds.length,s}const C$={class:"group-manager"},$$={key:0,class:"label-readonly",title:"当前分组只可用于查询"},E$=["title"],k$=c("small",null,"分组:",-1),S$={class:"pure-form pure-form-stacked group-form"},A$=c("label",{for:"groupLabel"},"标题",-1),P$=c("label",{for:"groupMemo"},"备注",-1),I$={for:"groupValues"},T$={key:0,class:"text-info"},L$={key:1,class:"text-info"},O$=["onClick"],D$=c("small",{class:"text-primary"},"(点击添加)",-1),M$=c("label",{for:"groupMemo"},[Q(" 文件大小 "),c("span",{class:"text-info"},[Q("只清理小于该大小的文件,单位"),c("b",null,"MB")])],-1),R$={class:"groups-list"},N$={key:0,class:"text-danger"},B$=c("span",{class:"text-info"},"或",-1),F$=c("br",null,null,-1),U$=c("br",null,null,-1),j$={class:"pure-table pure-table-bordered"},H$=c("thead",null,[c("tr",null,[c("th",{width:"25"},"#"),c("th",{width:"70"},"只查询"),c("th",{width:"150"},"名称"),c("th",{width:"150"},"备注"),c("th",{width:"70"},[Q("大小"),c("small",null,"MB")]),c("th",{width:"220"},"操作")])],-1),q$={align:"center"},z$=["onClick"],V$=c("button",{type:"button",class:"pure-button button-xsmall text-danger"},"删除",-1),W$={class:"group-confirm-delete"},K$=["onClick"],G$=["onClick"],uh=Me({__name:"GroupManager",props:{type:null,storageKey:null,config:null},emits:["change"],setup(e,{emit:t}){const n=e,s=fe(Os(n.type)),i=fe([]),o=fe(!1),r=fe(Os(n.type)),a=fe(null),l=fe(!1),u=fe(null),f=[rt.video,rt.audio,rt.image,rt.doc,rt.app,rt.archive];dt(i,async ge=>{console.log("[groups change]",ge),hs(n.storageKey,ge,!1),ge.length||(o.value=!1,l.value=!1)},{deep:!0});let h=!1;Tt(async()=>{if(console.log("[GroupManager onMounted]"),!h){h=!0,i.value=ho(n.storageKey,[]),console.log("[groups]",i.value);const{suffixGroup:ge,keywordGroup:L}=n.config;if(i.value.length){const re=i.value.find(G=>G.id===(n.type===He.suffix?ge:L));console.log("[group last choosen]",re),s.value=re||i.value[0],t("change",s.value)}else n.type===He.suffix&&!ge&&(await U(),hs(st.cleanerConfig,{suffixGroup:s.value.id},!0)),n.type===He.keyword&&!L&&(await U(),hs(st.cleanerConfig,{keywordGroup:s.value.id},!0))}}),Cs(async()=>{console.log("[GroupManager onUnmounted]")});async function y(ge){const L=`#${ge}`;r.value.values.includes(L)||(r.value.values+=(`
`+L).trim()+`
`)}async function _(){o.value=!0,l.value=!1}async function b(){o.value=!1}async function E(){a.value.show()}async function T(){a.value.hide()}async function D(){l.value=!1}async function I(){l.value=!0,o.value=!1}async function P(){u.value.show()}async function V(){u.value.hide()}async function ae(){r.value.createdAt&&(r.value=Os(n.type)),r.value.size=5,n.type===He.keyword&&(r.value.size=100),await E()}async function U(){let ge=[];n.type===He.suffix?ge=h$:ge=y$;for(let L=0;L<ge.length;L++){const re={...Os(ge[L].type),...ge[L]};r.value=re,r.value.type=re.type,r.value.queryOnly=re.queryOnly,r.value.size=re.size,r.value.label=re.label,r.value.memo=re.memo,r.value.createdAt=0,r.value.updatedAt=0,Array.isArray(re.values)?r.value.values=re.values.join(`
`):r.value.values=re.values,await ye(),await V()}i.value.length&&await Le(i.value[0])}async function X(ge,L=!1){if(!L){const{isConfirmed:G}=await pe.fire({html:`确定删除"${s.value.label}"?`,icon:"question"});if(!G)return}let re=-1;for(let G=0;G<i.value.length;G++)if(i.value[G].id===s.value.id){re=G;break}i.value.splice(re,1),i.value.length?s.value=i.value[0]:s.value=Os(n.type),t("change",s.value),await oe({icon:"success",title:"删除成功!",timer:1500})}async function ue(ge){r.value=ge,await E()}async function ye(){let ge=[];try{ge=await Ds(r.value.values,r.value.type)}catch(xe){await pe.fire({icon:"error",text:xe.message});return}if(r.value.label=r.value.label.trim(),r.value.memo=r.value.memo.trim(),r.value.label===""){await oe({icon:"warning",text:"请输入标题!"});return}let L=-1;for(let xe=0;xe<i.value.length;xe++)if(i.value[xe].id===r.value.id&&r.value.id){L=xe;break}const re=xi();r.value.updatedAt=re,r.value.createdAt||(r.value.createdAt=re);let G=[];for(let xe=0;xe<ge.length;xe++)G.push(ge[xe].value);r.value.values=G.join(`
`).trim(),console.log("[saveGroup]",r.value,L),L===-1?(i.value.push(r.value),oe({icon:"success",text:"添加成功"})):(i.value[L]=r.value,oe({icon:"success",text:"更新成功"}));const Se=!s.value.createdAt;Se&&(s.value=r.value),(r.value.id===s.value.id||Se)&&t("change",r.value),await T()}async function Le(ge){s.value=ge;const{id:L}=s.value;n.type===He.suffix&&(n.config.suffixGroup=L,hs(st.cleanerConfig,{suffixGroup:L},!0)),n.type===He.keyword&&(n.config.keywordGroup=L,hs(st.cleanerConfig,{keywordGroup:L},!0)),t("change",ge)}return(ge,L)=>{const re=Es("VDropdown");return N(),j("div",C$,[s.value.queryOnly?(N(),j("span",$$," 只查询 ")):je("",!0),s.value.createdAt?(N(),j("a",{key:1,class:"group-label",href:"javascript:void(0)",title:`当前使用的分组: ${s.value.label}`,onClick:L[0]||(L[0]=G=>ue(s.value))},[c("span",null,[k$,Q(" "+me(s.value.label),1)])],8,E$)):je("",!0),Ce(re,{ref_key:"form",ref:a,onHide:b,onShow:_,distance:5,"arrow-padding":100},{popper:Qe(()=>[c("form",S$,[c("fieldset",null,[c("div",null,[A$,q(c("input",{type:"text","onUpdate:modelValue":L[1]||(L[1]=G=>r.value.label=G),id:"groupLabel",class:"pure-input-1-2",placeholder:"分组标题"},null,512),[[Ge,r.value.label]]),Q("    "),r.value.queryOnly?(N(),j("button",{key:0,type:"button",class:"pure-button button-small button-warning",onClick:L[2]||(L[2]=G=>r.value.queryOnly=!1)},"已设置为仅用于查询 | 点击取消设置")):je("",!0),r.value.queryOnly?je("",!0):(N(),j("button",{key:1,type:"button",class:"pure-button button-small pure-button-primary",onClick:L[3]||(L[3]=G=>r.value.queryOnly=!0)},"设置为仅用于查询"))]),c("div",null,[P$,q(c("input",{type:"text","onUpdate:modelValue":L[4]||(L[4]=G=>r.value.memo=G),id:"groupMemo",placeholder:"分组备注"},null,512),[[Ge,r.value.memo]])]),c("div",null,[c("label",I$,[Q(" 特征列表 "),n.type===de(He).keyword?(N(),j("span",T$,[Q(" 默认只匹配文件名。前面带"),c("b",null,me(de(jr)),1),Q("则只匹配目录名。 ")])):je("",!0),n.type===de(He).suffix?(N(),j("span",L$,[Q(" 支持115自带筛选: "),(N(),j(Ue,null,nt(f,(G,Se)=>c("span",{class:"filter-label text-success",key:Se,onClick:xe=>y(G)}," #"+me(G),9,O$)),64)),D$])):je("",!0)]),q(c("textarea",{id:"groupValues","onUpdate:modelValue":L[5]||(L[5]=G=>r.value.values=G),rows:"5",placeholder:"每行一个"},null,512),[[Ge,r.value.values]])]),c("div",null,[M$,q(c("input",{type:"number","onUpdate:modelValue":L[6]||(L[6]=G=>r.value.size=G),class:"pure-input-1-2",placeholder:"文件大小小于该数值才清理"},null,512),[[Ge,r.value.size]])]),c("button",{type:"button",class:"pure-button pure-button-primary",onClick:ye},me(r.value.createdAt?"更新":"添加"),1),Q("      "),c("button",{type:"button",class:"pure-button",onClick:T},"取消")])])]),default:Qe(()=>[c("a",{href:"javascript:void(0)",class:"text-primary",onClick:ae},"新增分组")]),_:1},512),Ce(re,{ref_key:"list",ref:u,onHide:D,onShow:I,distance:5},{popper:Qe(()=>[c("div",R$,[i.value.length?je("",!0):(N(),j("h3",N$,[Q(" 还没有添加任何分组。你可以: "),c("button",{type:"button",class:"pure-button button-small",onClick:ae},"添加"),Q("   "),B$,Q("   "),c("button",{type:"button",class:"pure-button button-small",onClick:U},"使用脚本内置"),F$,U$])),c("table",j$,[H$,c("tbody",null,[(N(!0),j(Ue,null,nt(i.value,(G,Se)=>(N(),j("tr",{key:Se},[c("td",null,me(Se+1),1),c("td",q$,me(G.queryOnly?"是":"否"),1),c("td",null,me(G.label),1),c("td",null,me(G.memo),1),c("td",null,me(G.size),1),c("td",null,[c("button",{type:"button",class:"pure-button button-xsmall text-primary",onClick:xe=>Le(G)},"载入",8,z$),Q("   "),Ce(re,null,{popper:Qe(()=>[c("div",W$,[c("button",{type:"button",class:"pure-button button-error",onClick:xe=>X(G,!0)},"确定",8,K$)])]),default:Qe(()=>[V$]),_:2},1024),Q("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:xe=>ue(G)},"编辑",8,G$)])]))),128))])])])]),default:Qe(()=>[c("a",{href:"javascript:void(0)",class:"text-primary",onClick:P},"分组列表")]),_:1},512)])}}}),A5="",Y$={class:"cloud115-eh-cleaner-help"},J$=[Df('<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)],Q$=Me({__name:"Help",setup(e){return(t,n)=>(N(),j("div",Y$,J$))}}),I5="",X$={class:"cloud115-eh-cleaner"},Z$=[c("span",null,"清理文件",-1)],eE={class:"header actions-bar"},tE=c("span",{class:"title"},"文件清理工具",-1),nE={type:"button",class:"pure-button button-success"},sE=c("i",{class:"file-type tp-folder",style:{}},null,-1),iE=["disabled"],oE=["disabled"],rE=c("small",null,"毫秒",-1),aE=["disabled"],lE=c("br",null,null,-1),cE={class:"by-box by-suffix"},uE={class:"by-header"},dE=c("span",{class:"title"},[Q("按"),c("b",null,"后缀名"),Q("清理")],-1),fE={class:"pure-button-group",role:"group"},pE=["disabled"],hE={class:"pure-table pure-table-bordered"},mE=c("thead",null,[c("tr",null,[c("th",{width:"25"},"#"),c("th",{width:"100"},"后缀名"),c("th",{width:"95"},"文件数量"),c("th",{width:"80"},"合计大小"),c("th",{width:"150"},"操作"),c("th",{width:"200"},"状态")])],-1),gE=["onClick"],yE=["onClick"],wE=["onClick"],bE=c("br",null,null,-1),_E={class:"by-box by-keyword"},vE={class:"by-header"},xE=c("span",{class:"title"},[Q("按"),c("b",null,"关键词"),Q("清理")],-1),CE={class:"pure-button-group",role:"group"},$E=["disabled"],EE={class:"pure-table pure-table-bordered"},kE=c("thead",null,[c("tr",null,[c("th",{width:"25"},"#"),c("th",{width:"100"},"关键词"),c("th",{width:"95"},"文件/目录数量"),c("th",{width:"80"},"合计大小"),c("th",{width:"150"},"操作"),c("th",{width:"200"},"状态")])],-1),SE=["href"],AE={class:"file-type tp-folder"},PE=["onClick"],IE=["onClick"],TE=c("br",null,null,-1),LE={class:"footer actions-bar"},OE=c("span",{class:"title"},"文件清理工具",-1),DE={type:"button",class:"pure-button button-success"},ME=c("i",{class:"file-type tp-folder",style:{}},null,-1),RE=Me({__name:"Cleaner",setup(e){const t=fe(!1),n=fe(!0),s=fe(Os(He.suffix)),i=fe(Os(He.keyword)),o=fe({maxSize:5,matchName:!1}),r=fe({maxSize:100,matchName:!0}),a=fe([]),l=fe([]),u=fe(!1),f=fe({initialized:!1,pageSize:1150,reqInterval:800,deleteSize:1150,...ho(st.cleanerConfig,{})}),h=fe(!0),y=fe(""),_=fe([]);async function b(M){M.data.type===Dt.OPEN_CLEANER&&(await E(M.data.payload),ps({type:Dt.CLEANER_OPENED},M.source))}Tt(async()=>{console.log("[Cleaner onMounted]"),f.value.initialized||(f.value.initialized=!0,hs(st.cleanerConfig,f.value,!1)),window.addEventListener("message",b)}),Cs(()=>{console.log("[Cleaner onUnmounted]"),window.removeEventListener("message",b)});async function E(M){t.value=!0;const se=await gt();if(se==="0"||se===""){await T(),await pe.fire({icon:"warning",html:"<h2>不允许在根目录使用该工具!</h2>"});return}y.value&&y.value!==se&&(console.warn("目录变化,重置"),await V(xt.reset),await ae(xt.reset)),_.value=await id(),y.value=se}async function T(){t.value=!1}async function D(){hs(st.cleanerConfig,f.value,!1),oe({icon:"success",text:"保存成功",timer:1800}),h.value=!0}async function I(M){const se={};M.isFilter?se.type=M.pattern:se.suffix=M.pattern;let ee=unsafeWindow.frames[0];for(let Ee=0;Ee<unsafeWindow.frames.length;Ee++)if(unsafeWindow.frames[Ee].name==="wangpan"){ee=unsafeWindow.frames[Ee];break}ps({type:Dt.INVOKE_FILTER,payload:se},ee),await T(),oe({icon:"info",text:`已调用115筛选: ${M.value}`,timer:2500})}async function P(M,se){const{value:ee}=await pe.fire({input:"textarea",title:M,html:"每行一个,最短两个字符。"+(se===He.keyword?`<br>默认只匹配文件名,不匹配目录名。<br>使用 "<b>${jr}目录名关键词</b>" 格式指定只匹配目录名的关键词。`:""),width:620,inputPlaceholder:"每行一个,最短两个字符",inputAttributes:{"aria-label":"每行一个,最短两个字符"},showCancelButton:!0});return ee!==void 0?ee.trim():""}async function V(M,se){let ee="",Ee=[];switch(M){case xt.assign:ee=se.trim(),ee.trim()===""?a.value=[]:(Ee=await Ds(ee,He.suffix),a.value=Ee);break;case xt.append:ee=await P("添加后缀",He.suffix),Ee=await Ds(ee,He.suffix);const Z=[];a.value.forEach(z=>Z.push(z.value.toLowerCase())),Ee.forEach(z=>{Z.includes(z.value.toLowerCase())||a.value.push(z)});break;case xt.cover:ee=await P("覆盖后缀",He.suffix),ee.trim()!==""&&(Ee=await Ds(ee,He.suffix),a.value=Ee);break;case xt.clear:a.value=[];break;case xt.reset:a.value.forEach(z=>{z.num=-1,z.fileIds=[],z.status=ht.none,z.size=-1});break}}async function ae(M,se){let ee="",Ee=[];switch(M){case xt.assign:ee=se.trim(),ee.trim()===""?l.value=[]:(Ee=await Ds(ee,He.keyword),l.value=Ee);break;case xt.append:ee=await P("添加关键词",He.keyword),Ee=await Ds(ee,He.keyword);const Z=[];l.value.forEach(z=>Z.push(z.value.toLowerCase())),Ee.forEach(z=>{Z.includes(z.value.toLowerCase())||l.value.push(z)});break;case xt.cover:ee=await P("覆盖关键词",He.keyword),ee.trim()!==""&&(Ee=await Ds(ee,He.keyword),l.value=Ee);break;case xt.clear:l.value=[];break;case xt.reset:l.value.forEach(z=>{z.num=-1,z.fileIds=[],z.status=ht.none,z.size=-1});break}}async function U(M){if(console.log("[cleanBySuffix]",M),await V(xt.reset),!a.value.length){await pe.fire({icon:"warning",text:"请先设置后缀!"});return}if(!M){const{isConfirmed:se}=await pe.fire({icon:"warning",html:'请在清理前确认"后缀和大小限制的设置"是否符合预期!',confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!se)return}u.value=!0;try{for(let se=0;se<a.value.length;se++){const ee=a.value[se];await X(ee,M,!1,!0),await Et(f.value.reqInterval)}}catch(se){console.error(se)}u.value=!1}async function X(M,se,ee,Ee){if(console.log("[cleanBySuffixSingle]",M,se),!se&&!Ee){const{isConfirmed:Z}=await pe.fire({icon:"warning",html:`确认执行条件 "后缀: <b class="text-primary">${M.pattern}</b>, 小于: <b>${o.value.maxSize}</b> MB" 的清理?`,confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!Z)return}try{if(!ee){u.value=!0,M.fileIds=[],M.size=-1,M.num=-1,M.status=ht.prepare;const Z=await L(M);M.status=ht.prepared;const{fileIds:z,size:Fe}=await ch(M,Z,o.value);M.fileIds=z,M.size=Fe,M.num=z.length,u.value=!1}if(!se)if(M.num>0){M.status=ht.deleting,u.value=!0;const Z=await td(y.value,M.fileIds,f.value.deleteSize,1e3);u.value=!1,Z>0?M.status=ht.success+` / 数量 <= ${Z}`:M.status=ht.failed}else M.status=ht.success+" / 无"}catch(Z){console.error(Z),u.value=!1,await pe.fire({title:"cleanBySuffixSingle - 发生错误",html:Z.toString()})}}async function ue(){return l.value.length>10}async function ye(M){if(console.log("[cleanByKeyword]",M),await ae(xt.reset),!l.value.length){await pe.fire({icon:"warning",text:"请先设置关键词!"});return}if(!M){const{isConfirmed:se}=await pe.fire({icon:"warning",html:'请在清理前确认"关键词和大小限制的设置"是否符合预期!',confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!se)return}u.value=!0,console.time("cleanByKeyword");try{let se;await ue()&&(se=await Le());for(let ee=0;ee<l.value.length;ee++){const Ee=l.value[ee];await ge(Ee,M,!1,!0,se),await Et(f.value.reqInterval)}}catch(se){console.error(se)}finally{console.timeEnd("cleanByKeyword")}u.value=!1}async function Le(){const M=await gt(),se=En({cid:M,limit:2e3,type:mt.file,record_open_time:0});return await ws(se)}async function ge(M,se,ee,Ee,Z){if(console.log("[cleanByKeywordSingle]",M,se),!se&&!Ee){const{isConfirmed:z}=await pe.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(!z)return}try{if(!ee){u.value=!0,M.fileIds=[],M.size=-1,M.num=-1,M.status=ht.prepare;let z=[];!M.forDir&&Z!==void 0?z=Z:z=await re(M),M.status=ht.prepared;const{fileIds:Fe,size:Ye,num:ke}=await ch(M,z,r.value);M.fileIds=Fe,M.size=Ye,M.num=ke,u.value=!1}if(!se)if(M.num>0){M.status=ht.deleting,u.value=!0;const z=await td(y.value,M.fileIds,f.value.deleteSize,1e3);u.value=!1,z>0?M.status=ht.success+` / 数量 <= ${z}`:M.status=ht.failed,M.num>9e3&&Z===void 0&&(console.warn("[cleanByKeywordSingle] 补充处理..."),await ge(M,se,!1,!0))}else M.status=ht.success+" / 无"}catch(z){console.error(z),u.value=!1;let Fe=!0;const Ye={title:"cleanByKeywordSingle - 发生错误",html:z.toString()};z instanceof Ca&&(M.status=ht.prepareFailed+` / ${z.message}`,z instanceof vu&&(Ye.timer=2e3,Fe=!1)),Fe?await pe.fire(Ye):pe.fire(Ye)}}async function L(M){const se=await gt(),ee=En({cid:se,limit:f.value.pageSize});M.isFilter?ee.type=M.pattern:ee.suffix=M.value;const Ee=await ws(ee,f.value.reqInterval);return console.log("[files]",Ee),Ee}async function re(M){const se=await gt(),ee=zm({search_value:ql(M.pattern),cid:se,limit:f.value.pageSize}),Ee=await Sw(ee,f.value.reqInterval,!0);return console.log("[files]",Ee),Ee}function G(M){return Na({search_value:ql(M.pattern),cid:y.value},_.value[_.value.length-1])}async function Se(M){console.log("[onSuffixGroupChange]",M),s.value=M,o.value.maxSize=M.size,await V(xt.assign,M.values)}async function xe(M){console.log("[onKeywordGroupChange]",M),i.value=M,r.value.maxSize=M.size,await ae(xt.assign,M.values)}async function Re(){document.querySelector(".cloud115-eh-cleaner-drawer").scrollTo(0,0)}return(M,se)=>q((N(),j("span",X$,[cn(M.$slots,"default",{},()=>[c("span",{class:"btn-open pure-button pure-button-primary",onClick:E},Z$)]),t.value?(N(),Jt(Q$,{key:0})):je("",!0),q(c("div",{class:Je(["cloud115-eh-cleaner-drawer",{loading:u.value}])},[c("div",eE,[tE,c("span",{class:"close"},[c("button",{type:"button",class:"pure-button button-error",onClick:T},"关闭")]),c("button",nE,[c("b",null,[sE,Q(" "+me(_.value.join(" / ")),1)])])]),c("div",null,[Q(" 请求分页: "),q(c("input",{type:"number","onUpdate:modelValue":se[0]||(se[0]=ee=>f.value.pageSize=ee),min:30,max:1150,disabled:h.value},null,8,iE),[[Ge,f.value.pageSize]]),Q(" 请求间隔: "),q(c("input",{type:"number","onUpdate:modelValue":se[1]||(se[1]=ee=>f.value.reqInterval=ee),min:200,max:1e6,disabled:h.value},null,8,oE),[[Ge,f.value.reqInterval]]),rE,Q(" 每次删除: "),q(c("input",{type:"number","onUpdate:modelValue":se[2]||(se[2]=ee=>f.value.deleteSize=ee),min:1,max:1150,disabled:h.value},null,8,aE),[[Ge,f.value.deleteSize]]),c("span",{class:"config-toggle",onClick:se[3]||(se[3]=ee=>h.value=!h.value)},"设置参数"),h.value?je("",!0):(N(),j("button",{key:0,type:"button",class:"pure-button pure-button-primary button-small",onClick:D}," 保存配置 "))]),lE,c("div",cE,[c("div",uE,[dE,Q("      "),c("div",fE,[c("button",{type:"button",class:"pure-button",onClick:se[4]||(se[4]=ee=>U(!0))},"只查询"),c("button",{type:"button",class:"pure-button pure-button-primary",onClick:se[5]||(se[5]=ee=>U(!1)),disabled:s.value.queryOnly}," 一键清理 ",8,pE)]),Q(" 小于 "),q(c("input",{type:"number","onUpdate:modelValue":se[6]||(se[6]=ee=>o.value.maxSize=ee),class:"filter-size"},null,512),[[Ge,o.value.maxSize]]),Q(" MB (0表示不限制) "),Ce(uh,{type:de(He).suffix,"storage-key":"suffixGroups",onChange:Se,config:f.value},null,8,["type","config"])]),c("table",hE,[mE,c("tbody",null,[(N(!0),j(Ue,null,nt(a.value,(ee,Ee)=>(N(),j("tr",{key:Ee,class:Je({active:de(ah)(ee),"is-filter":ee.isFilter})},[c("td",null,me(Ee+1),1),c("td",null,[c("a",{href:"javascript:void(0)",class:"pattern",onClick:Z=>I(ee),title:"筛选"},me(ee.value),9,gE)]),c("td",null,me(ee.num>=0?ee.num:""),1),c("td",null,me(ee.size>0?de(go)(ee.size):""),1),c("td",null,[c("button",{type:"button",class:"pure-button button-xsmall",onClick:Z=>X(ee,!0,!1,!0)},"查询",8,yE),Q("   "),ee.num>0&&!s.value.queryOnly?(N(),j("button",{key:0,type:"button",class:"pure-button button-warning button-xsmall",onClick:Z=>X(ee,!1,!0,!1)},"清理",8,wE)):je("",!0)]),c("td",null,me(ee.status),1)],2))),128))])])]),bE,c("div",_E,[c("div",vE,[xE,Q("      "),c("div",CE,[c("button",{type:"button",class:"pure-button",onClick:se[7]||(se[7]=ee=>ye(!0))},"只查询"),c("button",{type:"button",class:"pure-button pure-button-primary",onClick:se[8]||(se[8]=ee=>ye(!1)),disabled:i.value.queryOnly}," 一键清理 ",8,$E)]),Q(" 小于 "),q(c("input",{type:"number","onUpdate:modelValue":se[9]||(se[9]=ee=>r.value.maxSize=ee),class:"filter-size"},null,512),[[Ge,r.value.maxSize]]),Q(" MB (0表示不限制) "),Ce(uh,{type:de(He).keyword,"storage-key":"keywordGroups",onChange:xe,config:f.value},null,8,["type","config"])]),c("table",EE,[kE,c("tbody",null,[(N(!0),j(Ue,null,nt(l.value,(ee,Ee)=>(N(),j("tr",{key:Ee,class:Je({active:de(ah)(ee),"is-dir":ee.forDir})},[c("td",null,me(Ee+1),1),c("td",null,[c("a",{href:G(ee),target:"_blank",class:"pattern",title:"搜索"},[q(c("i",AE,null,512),[[Ot,ee.forDir]]),Q(" "+me(ee.pattern),1)],8,SE)]),c("td",null,me(ee.num>=0?ee.num:""),1),c("td",null,me(ee.size>0?de(go)(ee.size):""),1),c("td",null,[c("button",{type:"button",class:"pure-button button-xsmall",onClick:Z=>ge(ee,!0,!1,!0)},"查询",8,PE),Q("   "),ee.num>0&&!i.value.queryOnly?(N(),j("button",{key:0,type:"button",class:"pure-button button-warning button-xsmall",onClick:Z=>ge(ee,!1,!0,!1)}," 清理 ",8,IE)):je("",!0)]),c("td",null,me(ee.status),1)],2))),128))])])]),TE,c("div",LE,[OE,c("span",{class:"close"},[c("button",{type:"button",class:"pure-button button-error",onClick:T},"关闭")]),c("button",DE,[c("b",null,[ME,Q(" "+me(_.value.join(" / ")),1)])]),Q("     "),c("button",{type:"button",class:"pure-button button-small",onClick:Re}," 回到顶部 ")])],2),[[Ot,t.value]])],512)),[[Ot,n.value]])}}),L5="",NE={class:"ce-empty-cleaner-trigger"},BE=[c("span",null,"空文件夹",-1)],FE=Me({__name:"Trigger",setup(e){fe(!1);const t=fe(!0);async function n(a){switch(a.data.type){case Dt.EMPTY_CLEANER_OPENED:await r(a.data.payload);break}}Tt(async()=>{console.log("[EmptyCleanerTrigger onMounted]"),window.addEventListener("message",n)}),Cs(()=>{console.log("[EmptyCleanerTrigger onUnmounted]"),window.removeEventListener("message",n)});async function s(){await o(),ps({type:Dt.OPEN_EMPTY_CLEANER},window.parent)}let i=0;async function o(){const a=na("cid");!a||a==="0"||(clearTimeout(i),i=window.setTimeout(async()=>{oe({icon:"error",text:"打开清理空文件夹工具失败!"})},1e3))}async function r(a){console.log("成功打开EmptyCleaner"),clearTimeout(i)}return(a,l)=>q((N(),j("span",NE,[cn(a.$slots,"default",{},()=>[c("span",{class:"btn-open pure-button pure-button-primary",onClick:s,title:"打开清理空文件夹工具"},BE)])],512)),[[Ot,t.value]])}}),D5="",UE=/^(?:\| )+\|-/;async function*jE(e){const t=["/"],n=e.trim().split(`
`);let s=0;for(const i of n){const o=UE.exec(i);if(o===null)continue;const a=o[0].length,l=a/2-1,u=i.slice(a);l>=t.length?t.push(u):t[l]=u,s+=1;const f=t.slice(0,l+1).join("/");yield{index:s,name:u,path:Cc(f,!0)}}}function dh(e={}){return{name:"",path:"",id:"",url:"",checked:!1,deleted:!1,disabled:!1,repeated:!1,ensured:!1,...e}}function zl(){return{suffixes:new Set,nameCounter:{},nameToPaths:{},repeatedPaths:new Set,maybeDirs:{}}}class HE{constructor(t,n=!1){be(this,"logs",[]);be(this,"_dirId","");be(this,"_dirPath","");be(this,"_dirAttr",null);be(this,"_treeText","");be(this,"_keepTree",!1);be(this,"_treeFile",null);be(this,"_tailData",zl());be(this,"_emptyItems",new Map);be(this,"logSubscribers",[]);be(this,"emptyItemSubscribers",[]);be(this,"treeFileSubscribers",[]);t&&this.setDirId(t),this._keepTree=n}addLogSubscriber(t){this.logSubscribers.push(t)}addEmptyItemSubscriber(t){this.emptyItemSubscribers.push(t)}addTreeFileSubscriber(t){this.treeFileSubscribers.push(t)}async setDirId(t){this._dirId=t,this._dirAttr=await St(t);const n=[...this._dirAttr.paths.slice(1).map(s=>s.file_name),this._dirAttr.file_name];this._dirPath=n.join("/")}async setKeepTree(t){this._keepTree=t}getTreeFile(){return this._treeFile}async isReady(){return!!this._dirPath}async run(){var s;if(!await this.isReady()){this.log(`运行异常!未获取到目录路径,目录ID=${this._dirId}`);return}if(((s=this._dirAttr)==null?void 0:s.folder_count)===0){this.log(`目录(id=${this._dirId}) "${this._dirPath}" 没有子目录,无需清理`);return}const t=Date.now();await this.exportTree(),await this.parseTree(),await this.queryFiles(),await this.handleMaybeDirs(),await this.detectEmpty(),await this.checkRealEmpty();const n=((Date.now()-t)/1e3).toFixed(2);this.log(`清理空目录检测阶段完成,合计耗时 ${n} 秒`),console.log("emptyItems:",this._emptyItems)}async exportTree(){const t=Date.now();this.log(`========导出目录树(目录ID=${this._dirId}, 路径=${this._dirPath})========`);const n=await Lw(this._dirId);console.log("exportTree",n),this.log("已发起导出处理,等待导出完成...");const s=await Ow(n.data.export_id);console.log("exportTree",s),this.log(`导出目录树成功,PickCode为${s.data.pick_code}`);const i=await Iw(s.data.pick_code);console.log("downloadItem",i),this.log("正在读取目录树文件内容...");let o=!0;try{this._treeText=await this._readFile(i),this.log("目录树文件内容读取完成")}catch(a){this.log(`读取目录树文件内容失败,${a.toString()}`),o=!1}if(this._keepTree)this.onTreeFileGenerated(i),this.log(`目录树文件保留,不会被删除。文件: ${i.file_name}`);else{const a=await La(this._dirId,[i.file_id]);console.log("deleteResult",a),this.log("目录树文件已删除")}const r=((Date.now()-t)/1e3).toFixed(2);o?this.log(`导出目录树完成,耗时 ${r} 秒`):this.log(`导出目录树失败,耗时 ${r} 秒`),this.log("=".repeat(60))}async _readFile(t){return new Promise((n,s)=>{ta({method:"GET",url:t.url.url,responseType:"blob",onload:async i=>{[200,206].includes(i.status)||s(new Error(`读取目录树文件内容失败,${i.status} ${i.statusText}`));let o=i.response,r=new FileReader;r.onload=a=>{var u;console.log("[_readFile] onload",a);let l=(u=a.target)==null?void 0:u.result;typeof l=="string"?l===""?s(new Error("读取目录树文件内容失败,读取结果为空字符串")):n(l):s(new Error("读取目录树文件内容失败,读取结果不是字符串"))},r.readAsText(o,"utf-16le")},onerror:i=>{s(i)}})})}async parseTree(){const t=Date.now();this.log("解析目录树...");const n=zl(),s=[],i=this._dirPath.split("/").slice(0,-1).join("/");console.log("[parseTree] parentPath:",i);for await(const r of jE(this._treeText)){const a=i+r.path;s.includes(a)&&n.repeatedPaths.add(a),s.push(a)}for(let r=0;r<s.length;r++){if(s[r+1]&&s[r+1].startsWith(s[r]+"/"))continue;let a=s[r].split("/").pop();if(!a)a=s[r];else{const l=qw(a,/^\w+$/);if(l)n.suffixes.add(l.toLowerCase());else{const u=s[r].replace(/\/[^\/]+$/,"");n.maybeDirs[u]||(n.maybeDirs[u]=new Set),n.maybeDirs[u].add(a)}}n.nameToPaths[a]||(n.nameToPaths[a]=[]),n.nameToPaths[a].push(s[r]),n.nameCounter[a]||(n.nameCounter[a]=0),n.nameCounter[a]+=1}console.log("[parseTree] result:",n);const o=((Date.now()-t)/1e3).toFixed(2);this.log(`解析目录树完成,耗时 ${o} 秒`),this.log("=".repeat(60)),this._tailData=n}async queryFiles(){const t=Date.now(),n=this._tailData;this.log("获取文件列表...");const s=En({type:mt.file,limit:1150,cid:this._dirId});try{const o=Date.now(),r=await ws(s),a=((Date.now()-o)/1e3).toFixed(2);this.log(`获取文件列表成功,文件数量:${r.length}。耗时 ${a} 秒`);for(const l of r)l.c===aa.violation?console.warn(`违规: id=${l.fid}, pc=${l.pc}, cid=${l.cid}, name=${l.n}`):l.c===aa.auditing&&console.warn(`审核中: id=${l.fid}, pc=${l.pc}, cid=${l.cid}, name=${l.n}`),n.nameCounter[l.n]&&n.nameCounter[l.n]--}catch(o){console.error("[queryFiles] getFiles error! error:",o),this.log(`获取文件列表失败!错误: ${o.toString()}`)}const i=((Date.now()-t)/1e3).toFixed(2);this.log(`获取文件列表完成。耗时 ${i} 秒`),this.log("=".repeat(60))}async handleMaybeDirs(){const t=Date.now(),n=this._tailData;this.log("========根据上级路径排除无后缀文件========");const s=Object.keys(n.maybeDirs).length;let i=0;for(const[r,a]of Object.entries(n.maybeDirs)){const l=await Ks(r),u=En({limit:1150,cid:l});try{const f=Date.now();this.log(`[${i+1} / ${s}] 正在获取上级路径 "${r}" 的文件列表...`);const h=await ws(u),y=((Date.now()-f)/1e3).toFixed(2);this.log(`[${i+1} / ${s}] 获取上级路径 "${r}" 的文件列表成功,文件数量:${h.length}。耗时 ${y} 秒`);for(const _ of h)a.has(_.n)&&_.fid&&(this.log(`[${i+1} / ${s}] 上级路径 "${r}" 下的 "${_.n}" 是一个文件`),n.nameCounter[_.n]&&n.nameCounter[_.n]--)}catch(f){console.error(`[handleMaybeDirs] getFiles error! cid: ${l}, error:`,f),this.log(`[${i+1} / ${s}] 获取上级路径(cid=${l}) "${r}" 的文件列表失败!错误: ${f.toString()}`)}i++}const o=((Date.now()-t)/1e3).toFixed(2);this.log(`根据上级路径排除无后缀文件完成。耗时 ${o} 秒`),this.log("=".repeat(60))}async detectEmpty(){const t=Date.now(),n=this._tailData;this.log("========开始检测路径========");let s=0,i=Object.keys(n.nameCounter).length;for(const[r,a]of Object.entries(n.nameCounter)){if(!a){s++;continue}const l=n.nameToPaths[r];this.log(`[${s+1} / ${i}] 名称 "${r}" 有 ${a} 个路径需要检测`);for(let u=0;u<l.length;u++){const f=l[u];if(this._emptyItems.has(f)){console.log(`[detectEmpty] path "${f}" already exists in _emptyItems`);continue}if(n.repeatedPaths.has(f)){this.log(`名称 "${r}" 路径 "${f}" 存在重复,将对其所在的目录进行检测`),await this.checkDirContainsRepeated(f);continue}this.log(`[${s+1} / ${i}] 正在检测名称 "${r}" 第 ${u+1}/${a} 个路径: ${f}`);try{const h=await Ks(f,!1);if(h){this.log(`检测到该末端路径 "${f}" 是一个空目录(ID: ${h})`);const y=dh({id:h,name:r,path:f,url:Li(h),ensured:!1});await this.addEmptyItem(y)}}catch(h){h instanceof $a?this.log(`路径 "${f}" 不是一个目录`):(console.error(`[detectEmpty] getDirIdByPath failed! path: ${f}, error:`,h),this.log(`获取路径 "${f}" 的ID失败!错误: ${h.toString()}`))}}s++}const o=((Date.now()-t)/1e3).toFixed(2);this.log(`检测路径完成,耗时 ${o} 秒`),this.log("=".repeat(60))}async checkDirContainsRepeated(t){const n=Da(t,"..",Wn.unix),s=t.split("/").pop();console.log("[checkDirContainsRepeated] parentPath:",n);let i="";try{if(i=await Ks(n,!1),!i){this.log(`❌ 根据路径"${n}"获取目录ID失败: 目录不存在!`);return}}catch(r){console.error(`[checkDirContainsRepeated] getDirIdByPath error! path: ${n}, error:`,r),this.log(`获取路径 "${n}" 的ID失败!错误: ${r.toString()}`);return}const o=En({limit:1150,cid:i});try{const r=Date.now();this.log(`正在获取目录(id=${i})的文件列表...`);const a=await ws(o),l=((Date.now()-r)/1e3).toFixed(2);this.log(`获取目录(id=${i})的文件列表成功,文件数量:${a.length}。耗时 ${l} 秒`);for(const u of a)if(!(u.fid||u.n!==s))try{const f=await St(u.cid);if(f.file_name)if(f.folder_count===0&&f.count===0){this.log(`目录(id=${i})的子目录(id=${u.cid})为空`);const h=dh({id:u.cid,name:f.file_name,path:f.paths.map(y=>y.file_name).slice(1).join("/"),url:Li(u.cid),repeated:!0,ensured:!0,attr:f});await this.addEmptyItem(h)}else this.log(`目录(id=${i})的子目录(id=${u.cid})不为空`);else this.log(`❌ 获取目录(id=${u.cid})属性失败!`)}catch(f){console.error(`[checkDirContainsRepeated] getAttr error! cid: ${u.cid}, error:`,f),this.log(`获取目录(id=${u.cid})属性失败!异常: ${f.toString()}`)}}catch(r){console.error(`[checkDirContainsRepeated] getFiles error! cid: ${i}, error:`,r),this.log(`获取目录(id=${i})的文件列表失败!错误: ${r.toString()}`)}}async checkRealEmpty(){const t=Date.now();this.log("========确认是否真的为空目录========");for(const s of this._emptyItems.values())if(!s.ensured)try{const i=await St(s.id);s.ensured=!0,s.attr=i,i.count===0&&i.folder_count===0?this.log(`目录(id=${s.id}) "${s.path}" 确认为空`):(s.disabled=!0,s.memo="目录不为空,请手动检查和处理",this.log(`目录(id=${s.id}) "${s.path}" 确认不为空,请手动检查和处理`))}catch(i){console.error(`[checkRealEmpty] getAttr error! cid: ${s.id}, error:`,i),this.log(`获取目录(id=${s.id}) "${s.path}" 属性失败!异常: ${i.toString()}`),s.disabled=!0,s.memo="确认是否为空目录失败,请手动检查和处理"}const n=((Date.now()-t)/1e3).toFixed(2);this.log(`确认是否真的为空目录完成,耗时 ${n} 秒`),this.log("=".repeat(60))}async onTreeFileGenerated(t){this._treeFile=t;for(const n of this.treeFileSubscribers)n(t)}async addEmptyItem(t){if(this._emptyItems.has(t.id)){console.log(`[addEmptyItem] path(id=${t.id}) "${t.path}" already exists in _emptyItems`);return}this._emptyItems.set(t.id,t);for(const n of this.emptyItemSubscribers)n(t)}async getEmptyItems(){return Array.from(this._emptyItems.values())}async log(t){t=`[${new Date().toLocaleString()}] ${t}`,this.logs.push(t);for(const n of this.logSubscribers)n(t)}async reset(){this.logs=[],this._emptyItems=new Map,this._tailData=zl(),this._treeFile=null}}const M5="",qE=(e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n},zE={},VE={class:"ce-empty-cleaner-help"},WE=[Df('<div data-v-60ac6015><h2 data-v-60ac6015>免责声明</h2><div data-v-60ac6015><p data-v-60ac6015>该工具仅作为学习测试用途,使用该工具造成的任何结果由使用人承担。</p></div><hr data-v-60ac6015><h2 data-v-60ac6015>说明</h2><ul style="color:#00f;" data-v-60ac6015><li class="text-danger text-bold" data-v-60ac6015> * <span style="font-size:120%;" data-v-60ac6015>不要</span>直接清理一个巨大的文件夹!比如包含超过5万个文件夹。 太大的文件夹可能会导出目录树失败,且可能导致账号被系统风控。 </li><li data-v-60ac6015>* 对于巨大的文件夹,可以分开清理下级文件夹。</li><li data-v-60ac6015>* 只有违规文件的文件夹也会被检测到并列出,需要手动处理。</li><li data-v-60ac6015>* 请谨慎操作!请谨慎操作!请谨慎操作!</li></ul><hr data-v-60ac6015><h2 data-v-60ac6015>流程</h2><ul style="color:#f40;" data-v-60ac6015><li data-v-60ac6015>1.确认当前显示的目录是否为需要进行清理的目录。</li><li data-v-60ac6015>2.点击「检测空文件夹」按钮。</li><li data-v-60ac6015>3.保持当前页面处于激活状态,留意日志区域的输出,耐心等待。</li><li data-v-60ac6015>4.当看到「空文件夹检测已完成」的提示时,说明检测完成。</li><li data-v-60ac6015>5.如果有空文件夹,会在空文件夹列表显示。</li><li data-v-60ac6015>6.每个空文件夹都可以单独进行打开、获取详情、删除等操作。</li><li data-v-60ac6015>7.批量删除: 勾选需要删除的空文件夹,点击「删除选中」进行删除。</li></ul><hr data-v-60ac6015><h3 data-v-60ac6015>原理和优劣</h3><div class="text-primary" data-v-60ac6015> 本工具原理是导出目录树,然后查询文件,接着排除目录树中的文件,最后再判断目录树中剩余的项是否为空文件夹。 </div><ul data-v-60ac6015><li class="text-bold text-success" data-v-60ac6015>优点:</li><li class="text-success" data-v-60ac6015>在子文件夹数量较多时,比逐层逐个查询文件列表要快得多。</li><li class="text-warning text-bold" data-v-60ac6015>缺点:</li><li class="text-warning" data-v-60ac6015>* 后缀名数量较多时,查询文件数据耗时较长。</li><li class="text-warning" data-v-60ac6015>* 排除真实文件后,如剩余需判断项较多,耗时较长。</li><li class="text-warning" data-v-60ac6015>* 不能判断大小为0且有空子文件夹的文件夹。</li></ul></div>',1)];function KE(e,t){return N(),j("div",VE,WE)}const GE=qE(zE,[["render",KE],["__scopeId","data-v-60ac6015"]]),YE={class:"ce-empty-cleaner"},JE=[c("span",null,"清理空文件夹",-1)],QE={key:0},XE={class:"header actions-bar"},ZE=c("span",{class:"title"},"空文件夹清理工具",-1),ek={class:"ce-path ce-label ce-label-primary-plain"},tk=["href"],nk=c("i",{class:"file-type tp-folder",style:{}},null,-1),sk={class:"top-actions"},ik={class:"pure-form pure-form-aligned"},ok={class:"pure-control-group"},rk={key:0},ak=c("span",null,"文件夹数量:",-1),lk={class:"text-primary"},ck={key:1},uk=c("span",null,"文件数量:",-1),dk={class:"text-primary"},fk=c("span",{title:"不会删除目录树文件"},"保留目录树文件",-1),pk={key:0},hk=["href"],mk={key:0},gk={key:0},yk={class:"text-primary"},wk={class:"ec-items"},bk={class:"pure-table pure-table-bordered"},_k=c("th",{width:"25"},"#",-1),vk={width:"30"},xk=["disabled"],Ck=c("th",{width:"140"},"ID",-1),$k=c("th",null,"路径",-1),Ek=c("th",{width:"150"},"操作",-1),kk=["onUpdate:modelValue","onChange","disabled"],Sk={key:0},Ak={class:"ce-label ce-label-danger"},Pk={key:0},Ik=[c("span",{class:"label-danger"},"已删除",-1)],Tk={key:1},Lk=["onClick","disabled"],Ok=["onClick"],Dk=["href"],Mk={key:0},Rk=c("br",null,null,-1),Nk={class:"footer actions-bar"},Bk=c("span",{class:"title"},"空文件夹清理工具",-1),Fk={class:"ce-path ce-label ce-label-primary-plain"},Uk=["href"],jk=c("i",{class:"file-type tp-folder",style:{}},null,-1),Hk=Me({__name:"EmptyCleaner",setup(e){const t=fe(!1),n=fe(!0),s=fe(!1),i=fe(""),o=fe([]),r=fe(null),a=fe([]),l=fe(!1),u=fe(null),f=fe([]),h=fe([]),y=fe(null),_=fe(null),b=dn(()=>_.value?Qw(_.value.pick_code):""),E=dn(()=>i.value?Li(i.value):"");let T;const D=fe({keepTree:!1});async function I(Z){Z.data.type===Dt.OPEN_EMPTY_CLEANER&&(await P(Z.data.payload),ps({type:Dt.EMPTY_CLEANER_OPENED},Z.source))}Tt(async()=>{console.log("[EmptyCleaner onMounted]"),window.addEventListener("message",I),T=new HE(i.value),T.addLogSubscriber(Se),T.addEmptyItemSubscriber(xe),T.addTreeFileSubscriber(G)}),Cs(()=>{console.log("[EmptyCleaner onUnmounted]"),window.removeEventListener("message",I)});async function P(Z){t.value=!0;const z=await gt();if(z==="0"||z===""){await ee(),await pe.fire({icon:"warning",html:"<h2>不允许在根目录使用该工具!</h2>"});return}i.value&&i.value!==z&&console.warn("目录变化,重置"),r.value=await St(z),o.value=[...r.value.paths.slice(1).map(Fe=>Fe.file_name),r.value.file_name],i.value=z}async function V(){l.value=!1,f.value=[],h.value=[],a.value=[],_.value=null}async function ae(){try{s.value=!0,await V(),await T.reset(),await T.setKeepTree(D.value.keepTree),await T.setDirId(i.value),await T.run(),pe.fire({title:"空文件夹检测已完成"})}catch(Z){console.error(Z),pe.fire({title:"空文件夹检测失败",text:Z.toString()})}finally{s.value=!1}}async function U(Z){const z=h.value.join(`
`);if(Z==="copy")await Mc(z)?oe({text:"已复制清理空文件夹日志",timer:1200}):oe({text:"复制清理空文件夹日志失败",timer:1200});else if(Z==="download"){let Fe=`清理空文件夹日志-${i.value}.txt`;Ci(z,Fe)}}async function X(Z,z,Fe="path"){const Ye=z==="all"?a.value:f.value;let ke="";Fe==="path"?ke=Ye.map(it=>it.path).join(`
`):Fe==="full"&&(ke=JSON.stringify(Ye,null,2));const ft=Fe==="path"?"路径":"数据";if(Z==="copy")await Mc(ke)?oe({text:`已复制${ft}到剪贴板`,timer:1200}):oe({text:`复制${ft}失败`,timer:1200});else if(Z==="download"){let it=`空文件夹${ft}-${i.value}-数量${Ye.length}`;Ci(ke,`${it}.${Fe==="path"?"txt":"json"}`)}}async function ue(Z){const z=Z==="all"?a.value:f.value;for(const Fe of z)window.open(Fe.url),await Et(100)}async function ye(){unsafeWindow.parent.Core.FileSelectDG.Open(async(Z,z)=>{console.log("[Core.FileSelectDG.Open]",Z,z);const Fe=Z[Z.length-1];await V(),i.value=Fe.cid,r.value=await St(Fe.cid),o.value=[...r.value.paths.slice(1).map(Ye=>Ye.file_name),r.value.file_name]},{select:1,nf:1,show_record:0,show_copy:1,btn_txt:"选择该目录",select_txt:"清理空文件夹"})}async function Le(Z,z){if(Z.deleted){oe({text:"该目录已删除,不能再次删除!",timer:2e3,showConfirmButton:!0});return}s.value=!0,await L([Z.id])&&(Z.deleted=!0),s.value=!1}async function ge(){if(!f.value.length)return;const Z=f.value.filter(z=>!z.deleted).map(z=>z.id);if(!Z.length){oe({text:"没有可删除的目录!",timer:2e3,showConfirmButton:!0});return}if(s.value=!0,await L(Z))for(const z of f.value)z.deleted=!0;s.value=!1}async function L(Z){try{const z=await La(i.value,Z);if(z.state)return!0;oe({text:`删除失败: ${z.errno} - ${z.error}`,timer:1200})}catch(z){console.error(z),oe({text:`删除失败!${z.toString()}`,timer:1200})}return!1}async function re(Z){s.value=!0;try{const z=await St(Z.id),Fe=ke=>new Date(Number(ke)*1e3).toLocaleString(),{isConfirmed:Ye}=await pe.fire({title:"目录属性",html:`<div class="ce-ec-detail">
        <p><span>类型:</span> 文件夹</p>
        <p><span>大小:</span> ${z.size}</p>
        <p><span>创建时间:</span> ${Fe(z.ptime)}</p>
        <p><span>修改时间:</span> ${Fe(z.utime)}</p>
        <p><span>位置:</span> ${Z.path}</p>
      </div>
      `,showDenyButton:!0,denyButtonText:"关闭",showConfirmButton:!0,confirmButtonText:"查看目录"});Ye&&window.open(Z.url)}catch(z){oe({text:`获取目录属性失败!${z.toString()}`,timer:1e4,showConfirmButton:!0})}finally{s.value=!1}}async function G(Z){_.value=Z}async function Se(Z){h.value.push(Z),await oi(),y.value.scrollTop=y.value.scrollHeight}async function xe(Z){a.value.push(Z)}async function Re(){console.log("[onAllCheckedChange]",l.value);for(const Z of a.value)Z.disabled||(Z.checked=l.value);await se()}async function M(Z,z){console.log("[onCheckChange]",Z,z),l.value=a.value.every(Fe=>Fe.checked),u.value.indeterminate=!l.value&&a.value.some(Fe=>Fe.checked),await se()}async function se(){f.value=a.value.filter(Z=>Z.checked)}async function ee(){t.value=!1}async function Ee(){document.querySelector(".ce-empty-cleaner-drawer").scrollTo(0,0)}return(Z,z)=>{var Fe,Ye;return q((N(),j("span",YE,[cn(Z.$slots,"default",{},()=>[c("span",{class:"btn-open pure-button pure-button-primary",onClick:P},JE)]),t.value?(N(),j("div",QE,[Ce(GE)])):je("",!0),q(c("div",{class:Je(["ce-empty-cleaner-drawer",{loading:s.value}])},[c("div",XE,[ZE,c("span",{class:"close"},[c("button",{type:"button",class:"pure-button button-error",onClick:ee},"关闭")]),c("div",ek,[c("a",{target:"_blank",href:de(E),title:"打开目录"},[nk,Q(" "+me(o.value.join(" / ")),1)],8,tk)])]),c("div",null,[c("div",sk,[c("div",null,[c("button",{type:"button",class:"pure-button pure-button-primary",onClick:ae},"检测空文件夹"),Q("     "),c("button",{type:"button",class:"pure-button button-success",onClick:ye},"切换目录")]),c("div",null,[c("form",ik,[c("fieldset",null,[c("div",ok,[r.value?(N(),j("label",rk,[ak,Q("  "),c("b",lk,me((Fe=r.value)==null?void 0:Fe.folder_count),1)])):je("",!0),r.value?(N(),j("label",ck,[uk,Q("  "),c("b",dk,me((Ye=r.value)==null?void 0:Ye.count),1)])):je("",!0),c("label",null,[q(c("input",{type:"checkbox",class:"ce-checkbox","onUpdate:modelValue":z[0]||(z[0]=ke=>D.value.keepTree=ke)},null,512),[[_e,D.value.keepTree]]),Q("  "),fk,_.value?(N(),j("span",pk,[Q("    "),c("a",{href:de(b),class:"text-primary",target:"_blank"},"查看目录树文件",8,hk)])):je("",!0)])])])])])]),c("h3",null,[Q(" 日志 "),h.value.length?(N(),j("span",mk,[Q("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:z[1]||(z[1]=ke=>U("copy"))},"复制日志"),Q("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:z[2]||(z[2]=ke=>U("download"))},"保存日志")])):je("",!0)]),c("div",{ref_key:"refLogs",ref:y,class:"ec-logs"},[(N(!0),j(Ue,null,nt(h.value,(ke,ft)=>(N(),j("div",{key:ft},me(ke),1))),128))],512),c("h3",null,[Q(" 空文件夹 "),a.value.length?(N(),j("span",gk,[c("span",yk," ( "+me(a.value.length)+" )",1),Q("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:z[3]||(z[3]=ke=>X("copy","all","path"))},"复制路径"),Q("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:z[4]||(z[4]=ke=>X("copy","all","full"))},"复制数据"),Q("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:z[5]||(z[5]=ke=>X("download","all","path"))},"保存路径"),Q("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:z[6]||(z[6]=ke=>X("download","all","full"))},"保存数据")])):je("",!0)]),c("div",wk,[c("table",bk,[c("thead",null,[c("tr",null,[_k,c("th",vk,[q(c("input",{ref_key:"refAllChecked",ref:u,type:"checkbox",class:"ce-checkbox","onUpdate:modelValue":z[7]||(z[7]=ke=>l.value=ke),onChange:Re,disabled:!a.value.length},null,40,xk),[[_e,l.value]])]),Ck,$k,Ek])]),c("tbody",null,[(N(!0),j(Ue,null,nt(a.value,(ke,ft)=>(N(),j("tr",{key:ft,class:Je({"tr-deleted":ke.deleted})},[c("td",null,me(ft+1),1),c("td",null,[q(c("input",{type:"checkbox",class:"ce-checkbox","onUpdate:modelValue":it=>ke.checked=it,onChange:it=>M(ke,ft),disabled:ke.disabled},null,40,kk),[[_e,ke.checked]])]),c("td",null,me(ke.id),1),c("td",null,[c("div",null,me(ke.path),1),ke.memo?(N(),j("div",Sk,[c("span",Ak,me(ke.memo),1)])):je("",!0)]),c("td",null,[ke.deleted?(N(),j("div",Pk,Ik)):(N(),j("div",Tk,[c("button",{type:"button",class:"pure-button button-xsmall button-error",onClick:it=>Le(ke),disabled:ke.disabled},"删除",8,Lk),Q("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:it=>re(ke)},"详情",8,Ok),Q("   "),c("a",{class:"pure-button button-xsmall",href:ke.url,target:"_blank"},"打开",8,Dk)]))])],2))),128))])]),f.value.length?(N(),j("div",Mk,[Rk,c("button",{type:"button",class:"pure-button button-error",onClick:ge},"删除选中 ("+me(f.value.length)+")",1),Q("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:z[8]||(z[8]=ke=>X("copy","checked","path"))},"复制已选路径"),Q("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:z[9]||(z[9]=ke=>X("copy","checked","full"))},"复制已选数据"),Q("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:z[10]||(z[10]=ke=>X("download","checked","path"))},"保存已选路径"),Q("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:z[11]||(z[11]=ke=>X("download","checked","full"))},"保存已选数据"),Q("     "),c("button",{type:"button",class:"pure-button button-success button-xsmall",onClick:z[12]||(z[12]=ke=>ue("checked"))},"打开已选")])):je("",!0)])]),c("div",Nk,[Bk,c("span",{class:"close"},[c("button",{type:"button",class:"pure-button button-error",onClick:ee},"关闭")]),Q("     "),c("button",{type:"button",class:"pure-button button-small",onClick:Ee}," 回到顶部 "),c("div",Fk,[c("a",{target:"_blank",href:de(E),title:"打开目录"},[jk,Q(" "+me(o.value.join(" / ")),1)],8,Uk)])])],2),[[Ot,t.value]])],512)),[[Ot,n.value]])}}}),F5="",U5="";async function qk(){const{host:e}=location;e==="115.com"&&(console.log("[Cleaner] running..."),Gn()?(await zk(),await Vk()):(await Wk(),await Kk()))}async function Hr(){return typeof window.$<"u"}async function zk(){await Hr()||console.log("[Cleaner injectTrigger] JQuery not found");const e="cloud115Cleaner",t=await bt("#js_path_add_dir"),n=Yt(`<span id="${e}"/>`);t.insertAdjacentElement("afterend",n),xn(f$).mount(`#${e}`)}async function Vk(){await Hr()||console.log("[Cleaner injectEmptyTrigger] JQuery not found");const e="cloud115EmptyCleaner",t=await bt("#js_path_add_dir"),n=Yt(`<span id="${e}"/>`);t.insertAdjacentElement("afterend",n),xn(FE).mount(`#${e}`)}async function Wk(){await Hr()||console.log("[Cleaner injectUI] JQuery not found");const e="cloud115Cleaner",t=Yt(`<div id="${e}"/>`);document.body.appendChild(t);const n=xn(RE);n.use(Ur),n.mount(`#${e}`),po("清理文件",async()=>{ps({type:Dt.OPEN_CLEANER},window.parent)})}async function Kk(){await Hr()||console.log("[Cleaner injectEmptyUI] JQuery not found");const e="cloud115EmptyCleaner",t=Yt(`<div id="${e}"/>`);document.body.appendChild(t);const n=xn(Hk);n.use(Ur),n.mount(`#${e}`),po("清理空目录",async()=>{ps({type:Dt.OPEN_EMPTY_CLEANER},window.parent)})}const fh=st.basic,Vl={name:"115不大助手",version:"0.6.32",author:{name:"生瓜太保",email:"[email protected]"},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 Gk(e){return{qps:4,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=Gk(),t=await et.get(fh,e);return{...e,...t}}async function Yk(e){await et.set(fh,e)}async function Jk(e){if(!e.showOfflineEntry||!Gn())return;console.log("[Cloud115 Enhancer] showOfflineEntry");const t=await Hn("a#js_filter_btn"),n="https://115.com/?ct=index&ac=offline_new_tpl&offline=1&tab=offline",s="background:#fffcea;",i=`点击跳转到「云下载」页面。该按钮由 ${Vl.name} 注入`,o=e.offlineEntryLabel?`<span>${e.offlineEntryLabel}</span>`:"",r=$(`<a href="javascript:;" class="button btn-line" title="${i}" tab_btn="wangpan" mode-tab="offline" style="${s}">
    <i class="icon-operate ifo-linktask"></i>
    ${o}
  </a>`);t.after(r),r.on("click",()=>{try{Wt().oofUtil.urlMaintain.changeMode("wangpan",{tab:"offline"})}catch(a){console.log('[Cloud115 Enhancer] showOfflineEntry failed with "top.oofUtil.urlMaintain.changeMode".',a),location.href=n}})}async function Qk(e){if(!e.showAddOffline||!Gn())return;console.log("[Cloud115 Enhancer] showAddOffline");const t=await Hn("a#js_filter_btn"),n="background:#fffcea;",s=`点击打开到「添加云下载」对话框。该按钮由 ${Vl.name} 注入`,i=e.addOfflineLabel?`<span>${e.addOfflineLabel}</span>`:"",o=$(`<a href="javascript:;" class="button btn-line" menu="offline_task" style="${n}" title="${s}">
    <i class="icon-operate ifo-linktask"></i>${i}
  </a>`);t.after(o)}async function Xk(e){if(!e.showFavEntry||!Gn())return;console.log("[Cloud115 Enhancer] showFavEntry");const t=await Hn("a#js_filter_btn"),n="https://115.com/?tab=label&show_label=1&label_id=-1&mode=wangpan",s="background:#fffcea;",i=`点击跳转到「星标」页面。该按钮由 ${Vl.name} 注入`,o=e.favEntryLabel?`<span>${e.favEntryLabel}</span>`:"",r=$(`<a href="javascript:;" class="button btn-line" title="${i}" tab_btn="wangpan" mode-tab="{tab:'label',label_id:-1,show_label:1}" style="${s}">
    <i class="icon-operate ifo-fav"></i>
    ${o}
  </a>`);t.after(r),r.on("click",()=>{try{Wt().oofUtil.urlMaintain.changeMode("wangpan",{tab:"label",label_id:-1,show_label:1})}catch(a){console.log('[Cloud115 Enhancer] showFavEntry failed with "top.oofUtil.urlMaintain.changeMode".',a),location.href=n}})}async function Zk(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 Hn('#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 e2(e){if(!!e.hideWatermark){console.log("[Cloud115 Enhancer] hideWatermark");try{const t=await bt('div[class^="fp-"]');t.classList.add("hidden-watermark"),t.style.display="none"}catch(t){console.error("[Cloud115 Enhancer] hideWatermark",t.message)}}}async function t2(e){window.top===window.self&&(await Et(1e3),Wl(e),window.addEventListener("message",async t=>{const n=t.data.event,s=t.data.body;n===ct.basicConfigChange&&(console.log("[Cloud115 Enhancer] basicConfigChange"),Wl(s))}))}let oo=null;async function n2(){oo&&clearTimeout(oo),oo=setTimeout(async()=>{const e=await qr();Wl(e)},5e3)}async function Wl(e){oo&&clearTimeout(oo);const t=async(n,s)=>{const i=await Hn('[rel="user_id"]',100);i.data("origin")||i.data("origin",i.text()),s?i.text(i.data("origin")):i.text(n.fakeAccountId);const o=await Hn('[rel="user_name"]',100);o.data("origin")||o.data("origin",$(o[0]).text()),s?o.text(o.data("origin")):o.text(n.fakeAccountName);const r=await Hn('img[rel="user_face"], .user-avatar img',100);r.data("origin")||r.data("origin",r.attr("src")),s?r.attr("src",r.data("origin")):(r.attr("rel","noreferrer"),r.attr("src",n.fakeAccountAvatar));const a=await Hn(".sign-vip-card",100);a.data("origin")||a.data("origin",$(a[0]).text()),s?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&&n2()}}async function s2(){const e=await qr(),{host:t,search:n}=location;!/115\.com$/.test(t)||(e2(e),Jk(e),Qk(e),Xk(e),Zk(e),t2(e))}const ph=Symbol("addTab"),hh=Symbol("updateTab"),mh=Symbol("deleteTab"),gh=Symbol("tabsProvider");function zr(e,t){const n=Vi(e,t);if(typeof n>"u")throw new Error(`Could not resolve ${e.description}`);return n}const i2=["data-tab-id","aria-hidden"],hn=Me({__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,s=fe(!1),i=zr(gh),o=zr(ph),r=zr(hh),a=zr(mh),l=n.prefix+n.name+n.suffix,u=n.id?n.id:n.name.toLowerCase().replace(/ /g,"-"),f=u+"-pane",h=dn(()=>"#"+(n.isDisabled?"":u));return dt(()=>i.activeTabHash,()=>{s.value=h.value===i.activeTabHash}),dt(()=>Object.assign({},n),()=>{r(u,{name:n.name,header:n.prefix+n.name+n.suffix,isDisabled:n.isDisabled,hash:h.value,index:i.tabs.length,computedId:u,paneId:f,navItemClass:n.navItemClass,navItemLinkClass:n.navItemLinkClass})}),It(()=>{o({name:n.name,header:l,isDisabled:n.isDisabled,hash:h.value,index:i.tabs.length,computedId:u,paneId:f,navItemClass:n.navItemClass,navItemLinkClass:n.navItemLinkClass})}),df(()=>{a(u)}),t({header:l,computedId:u,paneId:f,hash:h,isActive:s}),(y,_)=>q((N(),j("section",{ref:"tab",id:f,"data-tab-id":de(u),"aria-hidden":!s.value,class:Je(e.panelClass),role:"tabpanel",tabindex:"-1"},[cn(y.$slots,"default")],10,i2)),[[Ot,s.value]])}});class o2{get(t){const n=localStorage.getItem(t);if(n===null)return null;const s=JSON.parse(n);return s?new Date(s.expires)<new Date?(localStorage.removeItem(t),null):s.value:null}set(t,n,s){const i=new Date().getTime(),o=new Date(i+s*6e4);localStorage.setItem(t,JSON.stringify({value:n,expires:o}))}}const yh=new o2,r2=["aria-controls","aria-selected","href","onClick","innerHTML"],a2=Me({__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 s=e,i=ir({activeTabHash:"",lastActiveTabHash:"",tabs:[]});zi(gh,i),zi(ph,a=>{i.tabs.push(a)}),zi(hh,(a,l)=>{const u=i.tabs.findIndex(f=>f.computedId===a);l.isActive=i.tabs[u].isActive,i.tabs[u]=l}),zi(mh,a=>{const l=i.tabs.findIndex(u=>u.computedId===a);i.tabs.splice(l,1)});const o=(a,l)=>{l&&!s.options.useUrlFragment&&l.preventDefault();const u=r(a);if(!u)return;if(l&&u.isDisabled){l.preventDefault();return}if(i.lastActiveTabHash===u.hash){n("clicked",{tab:u});return}if(i.tabs.forEach(h=>{h.isActive=h.hash===u.hash}),n("changed",{tab:u}),i.lastActiveTabHash=i.activeTabHash=u.hash,s.cacheLifetime<=0)return;const f=`vue-tabs-component.cache.${window.location.host}${window.location.pathname}`;yh.set(f,u.hash,s.cacheLifetime)},r=a=>i.tabs.find(l=>l.hash===a);return Tt(()=>{if(i.tabs.length){if(window.addEventListener("hashchange",()=>o(window.location.hash)),r(window.location.hash)){o(window.location.hash);return}if(s.cacheLifetime>0){const a=`vue-tabs-component.cache.${window.location.host}${window.location.pathname}`,l=yh.get(a);if(l!==null&&r(l)){o(l);return}if(s.options.defaultTabHash&&r("#"+s.options.defaultTabHash)){o("#"+s.options.defaultTabHash);return}}o(i.tabs[0].hash)}}),t({...E_(i),selectTab:o,findTab:r}),(a,l)=>(N(),j("div",{class:Je(e.wrapperClass)},[c("ul",{role:"tablist",class:Je(e.navClass)},[(N(!0),j(Ue,null,nt(i.tabs,(u,f)=>{var h,y;return N(),j("li",{key:f,class:Je([(h=u.navItemClass)!=null?h:e.navItemClass,u.isDisabled?e.navItemDisabledClass:"",u.isActive?e.navItemActiveClass:u.isDisabled?"":e.navItemInactiveClass]),role:"presentation"},[c("a",{role:"tab",class:Je([(y=u.navItemLinkClass)!=null?y:e.navItemLinkClass,u.isDisabled?e.navItemLinkDisabledClass:"",u.isActive?e.navItemLinkActiveClass:u.isDisabled?"":e.navItemLinkInactiveClass]),"aria-controls":u.paneId,"aria-selected":u.isActive,href:u.hash,onClick:_=>o(u.hash,_),innerHTML:u.header,tabindex:"0"},null,10,r2)],2)}),128))],2),c("div",{class:Je(e.panelsWrapperClass)},[cn(a.$slots,"default")],2)],2))}}),l2={class:"ce-config ce-basic-config"},c2={class:"pure-form pure-form-aligned"},u2=c("legend",null,"API",-1),d2={class:"pure-control-group"},f2=c("label",{for:"basic_qps"},"全局QPS",-1),p2=c("div",{class:"pure-form-message text-success"}," 控制脚本请求115 API的频率,越大频率越高,建议设置5以下。 ",-1),h2=c("legend",null,"UI优化",-1),m2={class:"pure-control-group"},g2=c("label",{for:"basic_showOfflineEntry"},"显示云下载入口按钮",-1),y2={class:"pure-form-message text-success"},w2={class:"pure-control-group"},b2=c("label",{for:"basic_showAddOffline"},"显示添加云下载按钮",-1),_2={class:"pure-form-message text-success"},v2={class:"pure-control-group"},x2=c("label",{for:"basic_transferDefaultOffline"},"近期传输默认云下载",-1),C2=c("div",{class:"pure-form-message text-success"}," 点击左边栏的「传输」默认进入「云下载」页面。 ",-1),$2={class:"pure-control-group"},E2=c("label",{for:"basic_showFavEntry"},"显示星标入口按钮",-1),k2={class:"pure-form-message text-success"},S2=c("legend",null,"配置管理",-1),A2=c("br",null,null,-1),P2=c("br",null,null,-1),I2=c("div",{class:"text-success"},[c("b",null,"导入说明:"),Q(" 如有导入部分配置的需求,可以自行编辑json配置文件,只保留需要的配置key(仅限第一级),但必须保留`_`开头的key。 ")],-1),T2=c("br",null,null,-1),L2=c("legend",null,"隐私保护",-1),O2={class:"pure-control-group"},D2=c("label",{for:"basic_hideWatermark"},"隐藏水印",-1),M2=c("div",{class:"pure-form-message text-success"}," 网页水印是肉眼看不到的,但通过一些处理可以看到,水印内容是你的账号标识。 如果你需要截图并发给别人,可以考虑开启隐藏。 ",-1),R2={class:"pure-control-group"},N2=c("label",{for:"basic_fakeAccountEnabled"},"隐藏身份",-1),B2=c("div",{class:"pure-form-message text-success"}," 修改右上角显示的账号信息,不会真的修改。编辑后即可生效,无需刷新页面。 ",-1),F2={class:"pure-control-group"},U2=c("label",null,"账号ID",-1),j2={class:"pure-control-group"},H2=c("label",null,"用户名",-1),q2={class:"pure-control-group"},z2=c("label",null,"头像",-1),V2={class:"avatar-preview"},W2=["src"],K2={class:"pure-control-group"},G2=c("label",null,"VIP等级",-1),Y2=Me({__name:"Config",async setup(e){let t,n;const s=fe(([t,n]=nn(()=>qr()),t=await t,n(),t));It(async()=>{}),dt(s,Nt(async a=>{await Yk(a),oe({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:ct.basicConfigChange,body:_c(a)})},500),{deep:!0});async function i(a,l,u="warning"){const{isConfirmed:f}=await pe.fire({title:a,text:l,icon:u,showCancelButton:!0,confirmButtonText:"确认"});return f}async function o(){if(!!await i("导出配置","是否确认导出当前配置?"))try{await Fm(),oe({icon:"success",title:"导出成功"})}catch(a){pe.fire(a.toString())}}async function r(){if(!!await i("导入配置","导入后将覆盖当前配置,是否继续?"))try{const a=await Um();console.log(a),Oi.fire({icon:"success",title:"导入成功,刷新页面后生效。将在5秒后自动刷新页面...",timer:5e3}),setTimeout(()=>{window.location.reload()},5e3)}catch(a){pe.fire({title:"导入失败",html:a.toString()+'<br/><p class="text-danger">必须有字段 "_schema": "pan115_enhancer_configs" 。</p>'})}}return(a,l)=>(N(),j("div",l2,[c("form",c2,[c("fieldset",null,[u2,c("div",d2,[f2,q(c("input",{id:"basic_qps",type:"number",min:"1",max:"9",step:"1","onUpdate:modelValue":l[0]||(l[0]=u=>s.value.qps=u)},null,512),[[Ge,s.value.qps]]),p2]),h2,c("div",m2,[g2,q(c("input",{id:"basic_showOfflineEntry",type:"checkbox","onUpdate:modelValue":l[1]||(l[1]=u=>s.value.showOfflineEntry=u)},null,512),[[_e,s.value.showOfflineEntry]]),c("div",y2,[Q(" 在「网盘」页面顶部工具栏显示「云下载」入口按钮。按钮文本为 "),q(c("input",{"onUpdate:modelValue":l[2]||(l[2]=u=>s.value.offlineEntryLabel=u),class:"input-small",placeholder:"可以为空"},null,512),[[Ge,s.value.offlineEntryLabel]])])]),c("div",w2,[b2,q(c("input",{id:"basic_showAddOffline",type:"checkbox","onUpdate:modelValue":l[3]||(l[3]=u=>s.value.showAddOffline=u)},null,512),[[_e,s.value.showAddOffline]]),c("div",_2,[Q(" 在「网盘」页面顶部工具栏显示「添加云下载」按钮。按钮文本为 "),q(c("input",{"onUpdate:modelValue":l[4]||(l[4]=u=>s.value.addOfflineLabel=u),class:"input-small",placeholder:"可以为空"},null,512),[[Ge,s.value.addOfflineLabel]])])]),c("div",v2,[x2,q(c("input",{id:"basic_transferDefaultOffline",type:"checkbox","onUpdate:modelValue":l[5]||(l[5]=u=>s.value.transferDefaultOffline=u)},null,512),[[_e,s.value.transferDefaultOffline]]),C2]),c("div",$2,[E2,q(c("input",{id:"basic_showFavEntry",type:"checkbox","onUpdate:modelValue":l[6]||(l[6]=u=>s.value.showFavEntry=u)},null,512),[[_e,s.value.showFavEntry]]),c("div",k2,[Q(" 在「网盘」页面顶部工具栏显示「星标」入口按钮。按钮文本为 "),q(c("input",{"onUpdate:modelValue":l[7]||(l[7]=u=>s.value.favEntryLabel=u),class:"input-small",placeholder:"可以为空"},null,512),[[Ge,s.value.favEntryLabel]])])]),S2,c("div",{class:"pure-control-group"},[c("button",{type:"button",class:"pure-button pure-button-primary",onClick:o},"导出配置"),Q("      "),c("button",{type:"button",class:"pure-button button-success",onClick:r},"导入配置"),A2,P2,I2,T2]),L2,c("div",O2,[D2,q(c("input",{id:"basic_hideWatermark",type:"checkbox","onUpdate:modelValue":l[8]||(l[8]=u=>s.value.hideWatermark=u)},null,512),[[_e,s.value.hideWatermark]]),M2]),c("div",R2,[N2,q(c("input",{id:"basic_fakeAccountEnabled",type:"checkbox","onUpdate:modelValue":l[9]||(l[9]=u=>s.value.fakeAccountEnabled=u)},null,512),[[_e,s.value.fakeAccountEnabled]]),B2]),c("div",F2,[U2,q(c("input",{"onUpdate:modelValue":l[10]||(l[10]=u=>s.value.fakeAccountId=u),placeholder:"自定义账号ID",class:"pure-input-2-3"},null,512),[[Ge,s.value.fakeAccountId]])]),c("div",j2,[H2,q(c("input",{"onUpdate:modelValue":l[11]||(l[11]=u=>s.value.fakeAccountName=u),placeholder:"自定义用户名",class:"pure-input-2-3"},null,512),[[Ge,s.value.fakeAccountName]])]),c("div",q2,[z2,q(c("input",{"onUpdate:modelValue":l[12]||(l[12]=u=>s.value.fakeAccountAvatar=u),placeholder:"支持网络图片地址或base64编码",class:"pure-input-2-3"},null,512),[[Ge,s.value.fakeAccountAvatar]]),c("span",V2,[s.value.fakeAccountAvatar?(N(),j("img",{key:0,src:s.value.fakeAccountAvatar,alt:"头像预览",width:"20",height:"20"},null,8,W2)):je("",!0)])]),c("div",K2,[G2,q(c("input",{"onUpdate:modelValue":l[13]||(l[13]=u=>s.value.fakeAccountVip=u),placeholder:"自定义VIP等级",class:"pure-input-2-3"},null,512),[[Ge,s.value.fakeAccountVip]])])])])]))}}),j5="",J2={class:"pure-form pure-form-aligned"},Q2=["disabled"],X2={class:"pure-control-group"},Z2=c("label",null,[c("span",{class:"text-danger"},"*"),Q(" 地址")],-1),eS={class:"pure-control-group"},tS=c("label",null,[c("span",{class:"text-danger"},"*"),Q(" 资源根路径")],-1),nS={class:"pure-control-group"},sS=c("label",null,"备注",-1),iS={class:"pure-control-group"},oS=c("label",null,"平台",-1),rS=["value"],aS=c("small",{class:"text-info"},"如果是macOS版,而且有包含日韩文的文件或目录,建议选上,可以避免播放链接无效的问题。",-1),lS=Me({__name:"ConfigItem",props:{config:null,deletable:{type:Boolean}},emits:["change","delete","activate"],setup(e,{emit:t}){const n=e;It(async()=>{});async function s(){n.config.active=!0,t("activate",n.config)}async function i(){t("delete")}return dt(n.config,Nt(async o=>{t("change",o)},500),{deep:!0}),(o,r)=>(N(),j("div",{class:Je(["ce-clouddrive-config-item",{active:e.config.active}])},[c("form",J2,[c("fieldset",null,[c("legend",null,[c("button",{type:"button",class:Je(["pure-button button-small",[e.config.active?"button-success":"pure-button-primary"]]),onClick:s,disabled:e.config.active},me(e.config.active?"当前使用该配置":"使用该配置"),11,Q2),e.deletable?(N(),j("button",{key:0,type:"button",class:"pure-button button-error button-small",onClick:i}," 删除 ")):je("",!0)]),c("div",X2,[Z2,q(c("input",{"onUpdate:modelValue":r[0]||(r[0]=a=>e.config.url=a),placeholder:"CloudDrive服务地址,如「http://localhost:19798」",class:"pure-input-2-3"},null,512),[[Ge,e.config.url]])]),c("div",eS,[tS,q(c("input",{"onUpdate:modelValue":r[1]||(r[1]=a=>e.config.root=a),placeholder:"即当前115账号在CloudDrive中的资源名称,如「115」",class:"pure-input-2-3"},null,512),[[Ge,e.config.root]])]),c("div",nS,[sS,q(c("input",{"onUpdate:modelValue":r[2]||(r[2]=a=>e.config.memo=a),placeholder:"备注信息",class:"pure-input-2-3"},null,512),[[Ge,e.config.memo]])]),c("div",iS,[oS,q(c("select",{"onUpdate:modelValue":r[3]||(r[3]=a=>e.config.platform=a)},[(N(!0),j(Ue,null,nt(de(Bc),a=>(N(),j("option",{key:a,value:a},me(a),9,rS))),128))],512),[[Ps,e.config.platform]]),Q("   "),aS])])])],2))}}),H5="",cS={class:"ce-config ce-clouddrive-config"},uS=c("div",{class:"ce-tips cd-tips"},[c("p",null,[c("a",{href:"https://www.clouddrive2.com/?ref=cloud115-enhancer",rel:"noreferer",target:"_blank",class:"text-bold text-primary"},"CloudDrive"),Q(" 是一个强大的多云盘管理工具,为用户提供包含云盘本地挂载的一站式的多云盘解决方案。 ")]),c("p",null,"本脚本主要是借助CloudDrive实现原码视频播放的功能(具体可以在「播放菜单」面板中查看)。")],-1),dS={class:"ce-list"},fS=c("div",{class:"ce-tips"},[c("p",{class:"text-primary"}," 暂时发现IINA是支持`file://`协议的,这时候播放器可以读取到同目录的字幕文件。 配置地址示例: file:///Users/you/115,根路径不用填。 ")],-1),pS=c("div",{class:"ce-tips"}," 编辑配置后,请记得点击「保存全部配置」。 ",-1),hS={class:"ce-actions"},mS=["disabled"],gS=Me({__name:"Config",async setup(e){let t,n;const s=fe(([t,n]=nn(()=>Fc()),t=await t,n(),t));It(async()=>{});async function i(){await Uc(s.value),oe({icon:"success",title:"设置已保存。",timer:800,position:"top-end"})}async function o(){s.value.push(ia())}async function r(l,u){const{isConfirmed:f}=await pe.fire({icon:"warning",html:`确定要删除第 ${u+1} 个配置「${l.url}」吗?`});!f||(s.value.splice(u,1),await i(),oe({icon:"success",title:`「${l.url}」已删除!`}))}async function a(l,u){l.forEach((f,h)=>{f.active=h===u}),await Uc(l),oe({icon:"success",title:"设置已保存。",timer:800,position:"top-end"})}return(l,u)=>(N(),j("div",cS,[uS,c("div",dS,[(N(!0),j(Ue,null,nt(s.value,(f,h)=>(N(),Jt(lS,{key:h,config:f,index:h,deletable:s.value.length>1,onDelete:y=>r(f,h),onActivate:y=>a(s.value,h)},null,8,["config","index","deletable","onDelete","onActivate"]))),128))]),fS,pS,c("div",hS,[c("button",{type:"button",class:"pure-button pure-button-primary button-large",onClick:i,disabled:!s.value.length}," 保存全部配置 ",8,mS),Q("      "),c("button",{type:"button",class:"pure-button pure-button-success button-large",onClick:o}," 添加配置 ")])]))}}),q5="",yS={class:"ce-config ce-list-config"},wS={class:"pure-form pure-form-aligned"},bS={class:"pure-control-group"},_S=c("label",{for:"showOpenDirContextMenu"},'显示"目录功能菜单"按钮',-1),vS=c("div",{class:"pure-form-message text-success"},[c("div",null,"在官方的「文件名」列头部增加「目录功能菜单」按钮,点击即可打开当前目录的右键菜单。")],-1),xS={class:"pure-control-group"},CS=c("label",{for:"sizeSorter"},"大小排序",-1),$S=c("div",{class:"pure-form-message text-success"},[c("div",null,"在官方的「大小」列头部增加「排序」按钮,可以获取文件夹的大小,然后进行排序。"),c("div",null,"请注意该功能只会对当前加载的文件进行排序,如果有多页文件并需要对全部文件进行排序,请先点击「加载全部」后再使用该排序功能。")],-1),ES={class:"pure-control-group"},kS=c("label",{for:"showSha1"},"显示文件SHA1",-1),SS=c("div",{class:"pure-form-message text-success"}," 在文件名下方显示文件SHA1,点击可以复制。 ",-1),AS={class:"pure-control-group"},PS=c("label",{for:"showFolderSizeButton"},"显示文件夹获取大小按钮",-1),IS=c("div",{class:"pure-form-message text-success"}," 点击按钮可以获取单个文件夹的大小。 ",-1),TS={class:"pure-control-group"},LS=c("label",{for:"showCopyButtonOnPathBar"},"在路径栏显示复制按钮",-1),OS=c("div",{class:"pure-form-message text-success"}," 点击后,复制当前路径到剪贴板。 ",-1),DS={class:"pure-control-group"},MS=c("label",{for:"showGotoButtonOnPathBar"},[Q(" 在路径栏显示前往按钮 "),c("small",{class:"ce-label"},"DEV")],-1),RS=c("div",{class:"pure-form-message text-success"}," 点击后,路径栏下方会显示路径输入框,输入路径后按回车即可前往该路径。 ",-1),NS={class:"pure-control-group"},BS=c("label",{for:"noUpdateDirAfterRename"}," 重命名后不刷新文件列表 ",-1),FS=c("div",{class:"pure-form-message text-success"}," 仅支持单个文件或目录的重命名。在使用当前目录增强菜单项「重命名文件夹」时会忽略该选项。 ",-1),US={class:"pure-control-group"},jS=c("label",{for:"noUpdateDirAfterMove"}," 移动后不刷新文件列表 ",-1),HS=c("div",{class:"pure-form-message text-success text-linethrough"},[c("b",null,"启用后如果进行了移动操作,列表的全选会受影响,如已选数量不准确。"),c("br"),c("b",{class:"text-danger"},"该功能主要目的是持续高效地在进行移动操作,如果在移动后还需要其他操作,请记得手动刷新列表!")],-1),qS={class:"pure-control-group"},zS=c("label",{for:"fileSelectorDefaultView"},"文件选择器默认视图",-1),VS=[c("option",{value:"view"},"大图标",-1),c("option",{value:"list"},"列表",-1),c("option",{value:"_"},"系统默认",-1)],WS=c("div",{class:"pure-form-message text-success"},[c("div",null,"设置打开页面后初次使用的视图。"),c("div",{class:"text-warning"},"如果在刷新页面前在选择器切换到了其他视图,该选项将不会生效,但刷新页面后会恢复。")],-1),KS={class:"pure-control-group"},GS=c("label",{for:"followHistoryState"},[Q(" 文件列表跟随页面前进后退 "),c("small",{class:"ce-label ce-label-warning"},"BETA")],-1),YS=c("div",{class:"pure-form-message text-success"},[c("div",{class:"text-success"}," 默认情况下,点击浏览器的前进或后退,页面链接中的目录ID虽然会发生变化,但文件列表并没有随之更新。 这个功能尝试解决这个问题,请注意,这是一个测试功能。 ")],-1),JS={class:"pure-control-group"},QS=c("label",{for:"showOnlyFileFilter"},[Q(" 显示「仅文件」筛选 "),c("small",{class:"ce-label"},"DEV")],-1),XS=Me({__name:"Config",async setup(e){let t,n;const s=fe(([t,n]=nn(()=>wr()),t=await t,n(),t));return It(async()=>{}),dt(s,Nt(async i=>{await x1(i),oe({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:ct.listConfigChange,body:JSON.parse(JSON.stringify(i))})},500),{deep:!0}),(i,o)=>(N(),j("div",yS,[c("form",wS,[c("fieldset",null,[c("div",bS,[_S,q(c("input",{id:"showOpenDirContextMenu",type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=r=>s.value.showOpenDirContextMenu=r)},null,512),[[_e,s.value.showOpenDirContextMenu]]),Q("    "),c("small",{onClick:o[1]||(o[1]=r=>s.value.hoverShowDirContextMenu=!s.value.hoverShowDirContextMenu),class:Je(["ce-label",{"ce-label-success":s.value.hoverShowDirContextMenu}]),title:"鼠标悬浮在按钮代替点击操作"},me(s.value.hoverShowDirContextMenu?"✓ 鼠标悬浮触发(已启用)":"× 鼠标悬浮触发(未启用)"),3),vS]),c("div",xS,[CS,q(c("input",{id:"sizeSorter",type:"checkbox","onUpdate:modelValue":o[2]||(o[2]=r=>s.value.sizeSorter=r)},null,512),[[_e,s.value.sizeSorter]]),$S]),c("div",ES,[kS,q(c("input",{id:"showSha1",type:"checkbox","onUpdate:modelValue":o[3]||(o[3]=r=>s.value.showSha1=r)},null,512),[[_e,s.value.showSha1]]),SS]),c("div",AS,[PS,q(c("input",{id:"showFolderSizeButton",type:"checkbox","onUpdate:modelValue":o[4]||(o[4]=r=>s.value.showFolderSizeButton=r)},null,512),[[_e,s.value.showFolderSizeButton]]),IS]),c("div",TS,[LS,q(c("input",{id:"showCopyButtonOnPathBar",type:"checkbox","onUpdate:modelValue":o[5]||(o[5]=r=>s.value.showCopyButtonOnPathBar=r)},null,512),[[_e,s.value.showCopyButtonOnPathBar]]),OS]),c("div",DS,[MS,q(c("input",{id:"showGotoButtonOnPathBar",type:"checkbox","onUpdate:modelValue":o[6]||(o[6]=r=>s.value.showGotoButtonOnPathBar=r)},null,512),[[_e,s.value.showGotoButtonOnPathBar]]),RS]),c("div",NS,[BS,q(c("input",{id:"noUpdateDirAfterRename",type:"checkbox","onUpdate:modelValue":o[7]||(o[7]=r=>s.value.noUpdateDirAfterRename=r)},null,512),[[_e,s.value.noUpdateDirAfterRename]]),FS]),c("div",US,[jS,q(c("input",{id:"noUpdateDirAfterMove",type:"checkbox","onUpdate:modelValue":o[8]||(o[8]=r=>s.value.noReloadAfterMove=r)},null,512),[[_e,s.value.noReloadAfterMove]]),HS])]),c("fieldset",null,[c("div",qS,[zS,q(c("select",{id:"fileSelectorDefaultView","onUpdate:modelValue":o[9]||(o[9]=r=>s.value.fileSelectorDefaultView=r)},VS,512),[[Ps,s.value.fileSelectorDefaultView]]),WS])]),c("fieldset",null,[c("div",KS,[GS,q(c("input",{id:"showOnlyFileFilter",type:"checkbox","onUpdate:modelValue":o[10]||(o[10]=r=>s.value.followHistoryState=r)},null,512),[[_e,s.value.followHistoryState]])]),YS]),c("fieldset",null,[c("div",JS,[QS,q(c("input",{id:"showOnlyFileFilter",type:"checkbox","onUpdate:modelValue":o[11]||(o[11]=r=>s.value.showOnlyFileFilter=r)},null,512),[[_e,s.value.showOnlyFileFilter]])])])])]))}}),K5="",wh=st.search;function ZS(e){return{showSelectTargetButtonOnPathBar:!0,showSelectAllDir:!1,...e}}async function bh(){const e=ZS(),t=await et.get(wh,e);return{...e,...t}}async function eA(e){await et.set(wh,e)}const tA={class:"ce-config ce-search-config"},nA={class:"pure-form pure-form-aligned"},sA={class:"pure-control-group"},iA=c("label",{for:"showSelectTargetButtonOnPathBar"},'显示"选择目录"按钮',-1),oA=c("div",{class:"pure-form-message text-success"},' 在路径栏显示"选择目录"按钮。即可以在搜索结果页直接选择其他目录进行搜索,而不必返回列表页进入目录后再搜索。 ',-1),rA={class:"pure-control-group"},aA=c("label",{for:"showSelectAllDir"},'显示"选中全部文件夹"按钮',-1),lA=c("div",{class:"pure-form-message text-success"},' 在搜索结果文件列表顶部显示"选中全部文件夹"按钮。 ',-1),cA=Me({__name:"Config",async setup(e){let t,n;const s=fe(([t,n]=nn(()=>bh()),t=await t,n(),t));return It(async()=>{}),dt(s,Nt(async i=>{await eA(i),oe({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:ct.searchConfigChange,body:JSON.parse(JSON.stringify(i))})},500),{deep:!0}),(i,o)=>(N(),j("div",tA,[c("form",nA,[c("fieldset",null,[c("div",sA,[iA,q(c("input",{id:"showSelectTargetButtonOnPathBar",type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=r=>s.value.showSelectTargetButtonOnPathBar=r)},null,512),[[_e,s.value.showSelectTargetButtonOnPathBar]]),oA]),c("div",rA,[aA,q(c("input",{id:"showSelectAllDir",type:"checkbox","onUpdate:modelValue":o[1]||(o[1]=r=>s.value.showSelectAllDir=r)},null,512),[[_e,s.value.showSelectAllDir]]),lA])])])]))}}),G5="";async function uA(e){const t=`https://qrcodeapi.115.com/api/1.0/${e}/1.0/token/`;return(await fetch(t)).json()}const dA={[0]:"等待扫码",[1]:"已扫码",[2]:"登录成功",[-1]:"已失效",[-2]:"已取消"};let Kl=new AbortController;async function fA(){Kl.abort()}async function pA(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 Kl=new AbortController,(await fetch(n,{signal:Kl.signal})).json()}function hA(e){return{domain:"",hostOnly:!1,httpOnly:!0,name:"",path:"",sameSite:"",secure:!1,session:!1,storeId:"0",value:"",id:0,...e}}async function mA(e){return`UID=${e.UID}; CID=${e.CID}; SEID=${e.SEID}`}async function gA(e,t=[]){const n=[],s=Object.keys(e);let i=["115.com",...t];i=[...new Set(i)];const o={hostOnly:!1,httpOnly:!0,path:"/",sameSite:"unspecified",secure:!1,session:!1,storeId:"0"};let r=1;for(let a=0;a<s.length;a++){const l=s[a],u=[];for(const f of i)u.push(hA({...o,name:l,value:e[l],domain:f,id:r++}));n.push(...u)}return n}async function yA(e,t){const n=new FormData;n.append("app",t),n.append("account",e);const s=`https://passportapi.115.com/app/1.0/${t}/1.0/login/qrcode/`;return(await fetch(s,{method:"POST",body:n})).json()}async function wA(e,t){const n=`https://qrcodeapi.115.com/api/1.0/web/1.0/qrcode?uid=${t}`;return(await fetch(n)).blob()}var Gl=(e=>(e.web="web",e.android="android",e._115android="115android",e.ios="ios",e._115ipad="115ipad",e.tv="tv",e.alipaymini="alipaymini",e.wechatmini="wechatmini",e.qandroid="qandroid",e._115ios="115ios",e.harmony="harmony",e.ipad="ipad",e.qios="qios",e.qipad="qipad",e.linux="linux",e.mac="mac",e.windows="windows",e))(Gl||{});const bA={web:"网页版",android:"115生活(Android端)",["115android"]:"115(Android端)",ios:"115生活(iOS端)",["115ipad"]:"115(iPad端)",tv:"115网盘(Android电视端)",alipaymini:"115生活(支付宝小程序)",wechatmini:"115生活(微信小程序)",qandroid:"115管理(Android端)",["115ios"]:"115(iOS端)",harmony:"115(Harmony端) - 不能上传下载"};async function _A(e,t){return new Promise((n,s)=>{const i=new FileReader;i.onloadend=()=>{if(typeof i.result=="string"){if(t instanceof HTMLImageElement)t.src=i.result;else{const o=document.createElement("img");o.src=i.result,t.appendChild(o)}n()}else console.error("[renderQrcode]","reader.result is not string!"),s("reader.result is not string!")},i.onerror=o=>{console.error("[renderQrcode]",o),s(o)},i.readAsDataURL(e)})}async function vA(e){document.addEventListener("qrcodeStatusChange",t=>{const n=t.detail;e(n)})}async function xA(e){const t=new CustomEvent("qrcodeStatusChange",{detail:e});document.dispatchEvent(t)}async function CA(e,t,n=6e4){return new Promise(async(s,i)=>{console.log("[qrcodeLogin]",e,t,n);const o=await uA(e),r=await wA(e,o.data.uid);await _A(r,t);let a=!0,l=setTimeout(()=>{a=!1,i("[qrcode login] timeout!")},n),u="";for(;a;)try{const h=(await pA(o.data)).data.status;if(xA(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(l),u=`[qrcode login] status=${h} - expired.`;break}else if(h===-2){clearTimeout(l),u=`[qrcode login] status=${h} - canceled.`;break}}catch(f){console.error("[qrcode login]",f),u=f;break}clearTimeout(l),u?i(u):s(yA(o.data.uid,e))})}const _h=st.tools;function $A(e){return{scanApp:Gl.alipaymini,...e}}async function EA(){const e=$A(),t=await et.get(_h,e);return{...e,...t}}async function kA(e){await et.set(_h,e)}const SA={class:"ce-tools-item"},AA={class:"pure-form pure-form-aligned"},PA=c("legend",null,"扫码获取Cookie",-1),IA={class:"pure-control-group"},TA=["disabled"],LA=["value"],OA=["disabled"],DA={key:0,class:"text-warning text-bold"},MA={key:1},RA=c("div",{class:"text-danger"},"扫码登录后,所选设备之前的登录将会失效,所以请尽量选不常用的。",-1),NA=c("div",{class:"text-primary"},"请注意,扫码得到的Cookie会跟随发起扫码的设备,如果发起扫码的设备退出登录,扫码得到的Cookie也会随之失效。",-1),BA=c("div",{class:"text-success"},"如要避免上述问题,可以考虑使用手机验证码登录小程序并获取其Cookie。",-1),FA={class:"pure-control-group"},UA=Me({__name:"GetCookie",props:{app:null},emits:["app-change"],setup(e,{emit:t}){const s=fe(e.app),i=fe(!1),o=fe(!1),r=fe(!1),a=fe(),l=6e4,u=fe(),f=dn(()=>u.value?dA[u.value]:""),h=dn(()=>{const I=[Gl.harmony],P={};for(const[V,ae]of Object.entries(bA))I.includes(V)||(P[V]=ae);return P});dt(s,I=>{t("app-change",I),_()}),It(async()=>{}),Tt(async()=>{await vA(E)});async function y(){await _();try{const I=document.querySelector("#ceGetCookieQrcode"),P=await CA(s.value,I,l);a.value=P.data}catch(I){if(console.error(I),I.name==="AbortError")return;pe.fire({icon:"error",title:"扫码失败",text:I.toString()})}finally{i.value=!1,o.value=!1,u.value=void 0}}async function _(){a.value=void 0,o.value=!1,r.value=!1,i.value=!1,u.value=void 0,await D()}async function b(){o.value=!0}async function E(I){console.log("[handleStatusChange]",I),u.value=I}async function T(I){var ae;const P=(ae=a.value)==null?void 0:ae.cookie;if(!P)return;let V="";if(I==="text")V=await mA(P);else if(I==="json"){const U=await gA(P);V=JSON.stringify(U,null,2)}jm(V),Oi.fire({icon:"success",title:"已复制到剪贴板",timer:1500})}async function D(){await fA()}return(I,P)=>(N(),j("div",SA,[c("form",AA,[c("fieldset",null,[PA,c("div",IA,[q(c("select",{"onUpdate:modelValue":P[0]||(P[0]=V=>s.value=V),disabled:i.value},[(N(!0),j(Ue,null,nt(de(h),(V,ae)=>(N(),j("option",{value:ae,key:ae},me(V),9,LA))),128))],8,TA),[[Ps,s.value]]),Q("    "),c("button",{type:"button",class:"pure-button pure-button-primary",onClick:y,disabled:i.value}," 开始 ",8,OA),Q("    "),de(f)?(N(),j("span",DA,me(de(f)),1)):je("",!0),a.value?(N(),j("span",MA,[Q("      "),c("button",{type:"button",class:"pure-button button-success",onClick:P[1]||(P[1]=V=>T("text"))}," 复制文本格式Cookie "),Q("    "),c("button",{type:"button",class:"pure-button button-success",onClick:P[2]||(P[2]=V=>T("json"))}," 复制JSON格式Cookie ")])):je("",!0)]),RA,NA,BA,q(c("div",FA,[c("img",{id:"ceGetCookieQrcode",alt:"qrcode",onLoad:b},null,32)],512),[[Ot,o.value]])])])]))}}),jA={class:"ce-tools-item"},HA={class:"pure-form pure-form-aligned"},qA=c("legend",null,"文件清理",-1),zA={class:"pure-control-group"},VA=c("div",{class:"ce-tips"},"根据后缀、大小和名称等条件进行文件清理。请在「网盘」页中点击以下按钮。",-1),WA=c("br",null,null,-1),KA={class:"pure-control-group"},GA=c("div",{class:"ce-tips"},"尽快找到空文件夹进行清理。请在「网盘」页中点击以下按钮。",-1),YA=Me({__name:"Cleaner",setup(e){async function t(s,i){s&&(await n(),await Et(1e3)),window.postMessage({event:ct.closeConfig}),postMessage({type:i==="Cleaner"?Dt.OPEN_CLEANER:Dt.OPEN_EMPTY_CLEANER})}async function n(){return new Promise(async(s,i)=>{unsafeWindow.parent.Core.FileSelectDG.Open((o,r)=>{console.log("[Core.FileSelectDG.Open]",o,r);const a=o[o.length-1],l=unsafeWindow.parent.wangpan;try{l.Main.GotoDir(1,a.cid,0,""),s()}catch(u){pe.fire({icon:"error",title:"打开文件夹失败",text:`请在文件列表页面中打开!不要在离线任务之类的页面打开。异常: ${u.toString()}`})}},{select:1,nf:1,show_record:0,show_copy:1,btn_txt:"打开清理工具",select_txt:"清理"})})}return(s,i)=>(N(),j("div",jA,[c("form",HA,[c("fieldset",null,[qA,c("div",zA,[VA,c("button",{type:"button",class:"pure-button button-success",onClick:i[0]||(i[0]=o=>t(!1,"Cleaner"))}," 清理当前文件夹 "),Q("      "),c("button",{type:"button",class:"pure-button button-success",onClick:i[1]||(i[1]=o=>t(!0,"Cleaner"))}," 清理指定文件夹 ")]),WA,c("div",KA,[GA,c("button",{type:"button",class:"pure-button button-warning",onClick:i[2]||(i[2]=o=>t(!1,"EmptyCleaner"))}," 清理当前文件夹下的空文件夹 "),Q("      "),c("button",{type:"button",class:"pure-button button-warning",onClick:i[3]||(i[3]=o=>t(!0,"EmptyCleaner"))}," 清理指定文件夹下的空文件夹 ")])])])]))}}),JA={class:"ce-config ce-tools-config"},QA={class:"item"},XA=Me({__name:"Config",async setup(e){let t,n;const s=fe(([t,n]=nn(()=>EA()),t=await t,n(),t));It(async()=>{}),dt(s,Nt(async o=>{await kA(o),window.postMessage({event:ct.toolsConfigChange,body:JSON.parse(JSON.stringify(o))})},100),{deep:!0});async function i(o){s.value.scanApp=o}return(o,r)=>(N(),j("div",JA,[c("div",QA,[Ce(UA,{app:s.value.scanApp,onAppChange:i},null,8,["app"]),Ce(YA)])]))}}),Y5="",ZA={class:"menu-config-block menu-basic-config"},eP={class:"pure-form pure-form-stacked"},tP=c("legend",null,"全局设置",-1),nP={class:"pure-control-group"},sP=c("label",{for:"basic_enabled"},"启用",-1),iP={class:"pure-control-group"},oP=c("label",{for:"basic_hideSelectionMenuLabel"},"隐藏顶部菜单文本",-1),rP={class:"pure-control-group"},aP=c("label",{for:"basic_enableInSearch"},"在搜索结果页中启用",-1),lP={class:"pure-control-group"},cP=c("label",{for:"basic_manageOfficialMenus"},"控制官方菜单",-1),uP={class:"pure-control-group"},dP=c("label",{for:"basic_forceManualBeforeOpenOnKey"},"强制使用手动输入模式的辅助键",-1),fP=["value"],pP={class:"pure-control-group"},hP=c("label",{for:"basic_m3u8TempDirName"},"M3U8临时目录",-1),mP=Me({__name:"BasicConfig",props:{config:null},setup(e,{emit:t}){const n=e;async function s(i){const r={keyToTriggerManual:"在按下该按键时点击菜单项,会触发手动输入模式,此时会打开一个输入框,修改文本后,点击「确定」或按下Ctrl+Enter,即可继续完成菜单项的操作。",m3u8TempDir:"「M3U8临时目录」用于临时存放生成的m3u8文件。在选中多个视频文件后,在顶部菜单栏会有一个「播放」菜单项,点击后会生成对应的m3u8文件,然后调用播放器播放这个m3u8以实现播放多个视频的效果。"}[i];r&&pe.fire({html:r})}return(i,o)=>(N(),j("div",ZA,[c("form",eP,[c("fieldset",null,[tP,c("div",nP,[sP,q(c("input",{id:"basic_enabled",type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=r=>n.config.enabled=r)},null,512),[[_e,n.config.enabled]])]),c("div",iP,[oP,q(c("input",{id:"basic_hideSelectionMenuLabel",type:"checkbox","onUpdate:modelValue":o[1]||(o[1]=r=>n.config.hideSelectionMenuLabel=r)},null,512),[[_e,n.config.hideSelectionMenuLabel]])]),c("div",rP,[aP,q(c("input",{id:"basic_enableInSearch",type:"checkbox","onUpdate:modelValue":o[2]||(o[2]=r=>n.config.enableInSearch=r)},null,512),[[_e,n.config.enableInSearch]])]),c("div",lP,[cP,q(c("input",{id:"basic_manageOfficialMenus",type:"checkbox","onUpdate:modelValue":o[3]||(o[3]=r=>n.config.manageOfficialMenus=r)},null,512),[[_e,n.config.manageOfficialMenus]])]),c("div",uP,[dP,c("span",{class:"ce-label ce-label-warning ce-config-help",onClick:o[4]||(o[4]=r=>s("keyToTriggerManual"))},"说明"),q(c("select",{id:"basic_forceManualBeforeOpenOnKey","onUpdate:modelValue":o[5]||(o[5]=r=>n.config.keyToTriggerManual=r)},[(N(!0),j(Ue,null,nt(de(yn),(r,a)=>(N(),j("option",{key:a,value:a},me(r),9,fP))),128))],512),[[Ps,n.config.keyToTriggerManual]])]),c("div",pP,[hP,c("span",{class:"ce-label ce-label-warning ce-config-help",onClick:o[6]||(o[6]=r=>s("m3u8TempDir"))},"说明"),q(c("input",{id:"basic_m3u8TempDirName","onUpdate:modelValue":o[7]||(o[7]=r=>n.config.m3u8TempDir=r)},null,512),[[Ge,n.config.m3u8TempDir]])])])])]))}}),J5="",gP={class:"menu-config-block"},yP={class:"pure-form pure-form-stacked"},wP=c("label",{for:"listItemHover_enabled"},"启用",-1),bP=c("label",{for:"listItemHover_openInNewTab"},"新标签页打开",-1),_P=c("label",{for:"listItemHover_search",class:"text-primary"},"搜索",-1),vP=c("label",{for:"listItemHover_play",class:"text-primary"},"播放",-1),xP=c("label",{for:"listItemHover_copyFileName"},"名称路径",-1),CP=c("label",{for:"listItemHover_exportList"},"导出列表数据",-1),$P=c("label",{for:"listItemHover_viewInCloudDrive"},"在CloudDrive中查看",-1),EP=Me({__name:"ListItemHoverConfig",props:{config:null},setup(e){return(t,n)=>(N(),j("div",gP,[c("form",yP,[c("fieldset",null,[c("legend",null,me(de($i).listItemHover),1),c("div",null,[wP,q(c("input",{id:"listItemHover_enabled",type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=s=>e.config.enabled=s)},null,512),[[_e,e.config.enabled]])]),c("div",null,[bP,q(c("input",{id:"listItemHover_openInNewTab",type:"checkbox","onUpdate:modelValue":n[1]||(n[1]=s=>e.config.openInNewTab=s)},null,512),[[_e,e.config.openInNewTab]])]),c("div",null,[_P,q(c("input",{id:"listItemHover_search",type:"checkbox","onUpdate:modelValue":n[2]||(n[2]=s=>e.config.search=s)},null,512),[[_e,e.config.search]])]),c("div",null,[vP,q(c("input",{id:"listItemHover_play",type:"checkbox","onUpdate:modelValue":n[3]||(n[3]=s=>e.config.play=s)},null,512),[[_e,e.config.play]])]),c("div",null,[xP,q(c("input",{id:"listItemHover_copyFileName",type:"checkbox","onUpdate:modelValue":n[4]||(n[4]=s=>e.config.copyNames=s)},null,512),[[_e,e.config.copyNames]])]),c("div",null,[CP,q(c("input",{id:"listItemHover_exportList",type:"checkbox","onUpdate:modelValue":n[5]||(n[5]=s=>e.config.exportList=s)},null,512),[[_e,e.config.exportList]])]),c("div",null,[$P,q(c("input",{id:"listItemHover_viewInCloudDrive",type:"checkbox","onUpdate:modelValue":n[6]||(n[6]=s=>e.config.viewInCloudDrive=s)},null,512),[[_e,e.config.viewInCloudDrive]])])])])]))}}),kP={class:"menu-config-block"},SP={class:"pure-form pure-form-stacked"},AP=c("label",{for:"listItemContext_enabled"},"启用",-1),PP=c("label",{for:"listItemContext_copyFileName"},"名称路径",-1),IP=c("label",{for:"listItemContext_viewInCloudDrive"},"在CloudDrive中查看",-1),TP=Me({__name:"ListItemContextConfig",props:{config:null},setup(e){return(t,n)=>(N(),j("div",kP,[c("form",SP,[c("fieldset",null,[c("legend",null,me(de($i).listItemContext),1),c("div",null,[AP,q(c("input",{id:"listItemContext_enabled",type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=s=>e.config.enabled=s)},null,512),[[_e,e.config.enabled]])]),c("div",null,[PP,q(c("input",{id:"listItemContext_copyFileName",type:"checkbox","onUpdate:modelValue":n[1]||(n[1]=s=>e.config.copyNames=s)},null,512),[[_e,e.config.copyNames]])]),c("div",null,[IP,q(c("input",{id:"listItemContext_viewInCloudDrive",type:"checkbox","onUpdate:modelValue":n[2]||(n[2]=s=>e.config.viewInCloudDrive=s)},null,512),[[_e,e.config.viewInCloudDrive]])])])])]))}}),LP={class:"menu-config-block"},OP={class:"pure-form pure-form-stacked"},DP=c("label",{for:"selection_enabled"},"启用",-1),MP=c("label",{for:"selection_moveToSelfNameDir"},"移动到同名目录",-1),RP=c("label",{for:"selection_copyFileName"},"名称路径",-1),NP=c("label",{for:"selection_play"},"播放",-1),BP=Me({__name:"SelectionConfig",props:{config:null},setup(e){return(t,n)=>(N(),j("div",LP,[c("form",OP,[c("fieldset",null,[c("legend",null,me(de($i).selection),1),c("div",null,[DP,q(c("input",{id:"selection_enabled",type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=s=>e.config.enabled=s)},null,512),[[_e,e.config.enabled]])]),c("div",null,[MP,q(c("input",{id:"selection_moveToSelfNameDir",type:"checkbox","onUpdate:modelValue":n[1]||(n[1]=s=>e.config.moveToSelfNameDir=s)},null,512),[[_e,e.config.moveToSelfNameDir]])]),c("div",null,[RP,q(c("input",{id:"selection_copyFileName",type:"checkbox","onUpdate:modelValue":n[2]||(n[2]=s=>e.config.copyNames=s)},null,512),[[_e,e.config.copyNames]])]),c("div",null,[NP,q(c("input",{id:"selection_play",type:"checkbox","onUpdate:modelValue":n[3]||(n[3]=s=>e.config.play=s)},null,512),[[_e,e.config.play]])])])])]))}}),FP={class:"menu-config-block"},UP={class:"pure-form pure-form-stacked"},jP=c("label",{for:"dirContext_enabled"},"启用",-1),HP=c("label",{for:"dirContext_rename"},"重命名",-1),qP=c("label",{for:"dirContext_delete"},"删除",-1),zP=c("label",{for:"dirContext_play"},"播放全部",-1),VP=c("label",{for:"dirContext_copyFileName"},"名称路径",-1),WP=c("label",{for:"dirContext_move"},"移动",-1),KP=c("label",{for:"dirContext_copy"},"复制",-1),GP=c("label",{for:"dirContext_copyTo"},"复制到",-1),YP=c("label",{for:"dirContext_viewProperties"},"查看属性",-1),JP=c("label",{for:"dirContext_showSubFolderSize"},"子文件夹大小",-1),QP=c("label",{for:"dirContext_exportList"},"导出列表数据",-1),XP=c("label",{for:"dirContext_viewInCloudDrive"},"在CloudDrive中查看",-1),ZP=Me({__name:"DirContextConfig",props:{config:null},setup(e){async function t(){const n=`当前目录右键菜单的打开方式: 
    <br>1.右键单击文件列表表头;
    <br>2.右键单击文件列表空白处;
    <br>3.「文件名」列头部增加「目录功能菜单」按钮。`;pe.fire({html:n,customClass:"ce-swal-text-left"})}return(n,s)=>(N(),j("div",FP,[c("form",UP,[c("fieldset",null,[c("legend",null,[Q(me(de($i).dirContext)+" ",1),c("span",{class:"ce-label ce-label-warning ce-config-help",onClick:t},"说明")]),c("div",null,[jP,q(c("input",{id:"dirContext_enabled",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=i=>e.config.enabled=i)},null,512),[[_e,e.config.enabled]])]),c("div",null,[HP,q(c("input",{id:"dirContext_rename",type:"checkbox","onUpdate:modelValue":s[1]||(s[1]=i=>e.config.rename=i)},null,512),[[_e,e.config.rename]])]),c("div",null,[qP,q(c("input",{id:"dirContext_delete",type:"checkbox","onUpdate:modelValue":s[2]||(s[2]=i=>e.config.delete=i)},null,512),[[_e,e.config.delete]])]),c("div",null,[zP,q(c("input",{id:"dirContext_play",type:"checkbox","onUpdate:modelValue":s[3]||(s[3]=i=>e.config.play=i)},null,512),[[_e,e.config.play]])]),c("div",null,[VP,q(c("input",{id:"dirContext_copyFileName",type:"checkbox","onUpdate:modelValue":s[4]||(s[4]=i=>e.config.copyNames=i)},null,512),[[_e,e.config.copyNames]])]),c("div",null,[WP,q(c("input",{id:"dirContext_move",type:"checkbox","onUpdate:modelValue":s[5]||(s[5]=i=>e.config.move=i)},null,512),[[_e,e.config.move]])]),c("div",null,[KP,q(c("input",{id:"dirContext_copy",type:"checkbox","onUpdate:modelValue":s[6]||(s[6]=i=>e.config.copy=i)},null,512),[[_e,e.config.copy]])]),c("div",null,[GP,q(c("input",{id:"dirContext_copyTo",type:"checkbox","onUpdate:modelValue":s[7]||(s[7]=i=>e.config.copyTo=i)},null,512),[[_e,e.config.copyTo]])]),c("div",null,[YP,q(c("input",{id:"dirContext_viewProperties",type:"checkbox","onUpdate:modelValue":s[8]||(s[8]=i=>e.config.viewProp=i)},null,512),[[_e,e.config.viewProp]])]),c("div",null,[JP,q(c("input",{id:"dirContext_showSubFolderSize",type:"checkbox","onUpdate:modelValue":s[9]||(s[9]=i=>e.config.showSubFolderSize=i)},null,512),[[_e,e.config.showSubFolderSize]])]),c("div",null,[QP,q(c("input",{id:"dirContext_exportList",type:"checkbox","onUpdate:modelValue":s[10]||(s[10]=i=>e.config.exportList=i)},null,512),[[_e,e.config.exportList]])]),c("div",null,[XP,q(c("input",{id:"dirContext_viewInCloudDrive",type:"checkbox","onUpdate:modelValue":s[11]||(s[11]=i=>e.config.viewInCloudDrive=i)},null,512),[[_e,e.config.viewInCloudDrive]])])])])]))}}),eI={class:"official-menu-config"},tI=c("div",{class:"ce-tips"},[c("p",null,"开启「菜单设置 - 全局设置 - 控制官方菜单」后才会生效。"),c("p",{class:"text-primary"},"该功能仅支持隐藏菜单。点击「隐藏」后刷新页面生效,如需取消请点击「取消隐藏」。")],-1),nI={class:"pure-form pure-form-stacked"},sI=["onClick"],iI={class:"menu-key"},oI=["onClick"],rI=Me({__name:"OfficialMenuConfig",setup(e){const t=fe([]),n=fe(!1);It(async()=>{t.value=await fp(),console.log("official menu groups",t.value,location.href)}),Tt(()=>{document.body.addEventListener("click",()=>{n.value||(n.value=!0)})}),dt(t,Nt(async o=>{if(!n.value)return;const r=await o0(o);await i0(r,!0),oe({icon:"success",title:"官方菜单设置已保存,已生效。",timer:1e3,position:"top-end"})},500),{deep:!0});async function s(o){o.hidden=!o.hidden}async function i(o){const{isConfirmed:r}=await pe.fire({icon:"warning",html:`确认要重置分组「${o.label}」的隐藏状态吗?`,confirmButtonText:"确认",showDenyButton:!0,denyButtonText:"关闭"});!r||o.items.forEach(a=>{a.hidden=!1})}return(o,r)=>(N(),j("div",eI,[tI,(N(!0),j(Ue,null,nt(t.value,(a,l)=>(N(),j("div",{key:l,class:"menu-config-block"},[c("form",nI,[c("fieldset",null,[c("legend",null,[Q(me(a.label)+" ",1),c("span",{class:"ce-label ce-label-warning",title:"取消该分组下全部的隐藏设置",onClick:u=>i(a)}," 重置 ",8,sI)]),(N(!0),j(Ue,null,nt(a.items,(u,f)=>(N(),j("div",{key:f,class:Je([{hidden:u.hidden},"menu-item"])},[c("label",null,[Q(me(u.label)+" ",1),c("small",iI,me(u.key),1)]),c("span",{class:"ce-toggle",onClick:h=>s(u)},me(u.hidden?"取消隐藏":"隐藏"),9,oI)],2))),128))])])]))),128))]))}}),Q5="",aI={key:0,class:"ce-menu-config"},lI=c("div",{class:"ce-tips"},[c("p",null,"「搜索」功能菜单支持自定义,可在「搜索菜单」设置面板中添加和管理。"),c("p",null,"「播放」功能菜单支持自定义,可在「播放菜单」设置面板中添加和管理。")],-1),cI=c("hr",{class:"ce-hr"},null,-1),uI=c("h1",null,"官方菜单设置",-1),dI=Me({__name:"MenuConfig",async setup(e){let t,n;const s=fe(([t,n]=nn(()=>Ys()),t=await t,n(),t));return fe(!1),It(async()=>{}),dt(s,Nt(async i=>{await xb(i),oe({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0}),(i,o)=>s.value.enabled!==void 0?(N(),j("div",aI,[lI,Ce(mP,{config:s.value},null,8,["config"]),Ce(EP,{config:s.value.listItemHover},null,8,["config"]),Ce(TP,{config:s.value.listItemContext},null,8,["config"]),Ce(BP,{config:s.value.selection},null,8,["config"]),Ce(ZP,{config:s.value.dirContext},null,8,["config"]),cI,c("div",null,[uI,c("div",null,[Ce(rI)])])])):je("",!0)}}),X5="",fI={class:"ce-custom-url"},pI={class:"pure-form pure-form-aligned"},hI={class:"ce-custom-url-index"},mI={class:"pure-control-group"},gI=c("label",null,"启用",-1),yI={class:"pure-control-group"},wI=c("label",null,"唯一标识",-1),bI={class:"pure-control-group"},_I=c("label",null,"显示名称",-1),vI={class:"pure-control-group"},xI=c("label",null,"图标",-1),CI={class:"pure-control-group"},$I={class:"pure-control-group"},EI=c("label",null,"后台打开",-1),kI={class:"pure-control-group"},SI=c("label",null,"备注",-1),AI={key:0,class:"pure-control-group"},PI=c("label",null,"Mutation",-1),vh=Me({__name:"CustomUrl",props:{item:null,index:null},emits:["delete"],setup(e,{emit:t}){const n=fe(!0);function s(){t("delete")}async function i(){n.value=!n.value,n.value&&oe({title:"已开启高级模式",text:"请谨慎修改,不正确的代码可能会导致脚本崩溃。",icon:"info",timer:2e3})}async function o(){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 pe.fire({title:"Mutation 说明",html:a,width:480,position:"top-start",backdrop:!1})}return(a,l)=>(N(),j("div",fI,[c("form",pI,[c("fieldset",null,[c("legend",null,[c("span",hI,"# "+me(e.index+1),1),c("button",{type:"button",class:"pure-button button-error button-small",onClick:s}," 删除 ")]),c("div",mI,[gI,q(c("input",{"onUpdate:modelValue":l[0]||(l[0]=u=>e.item.enabled=u),type:"checkbox",id:"customUrl_enabled"},null,512),[[_e,e.item.enabled]])]),c("div",yI,[wI,q(c("input",{"onUpdate:modelValue":l[1]||(l[1]=u=>e.item.key=u),id:"customUrl_key",class:"pure-input-2-3",placeholder:"英文、数字或下划线"},null,512),[[Ge,e.item.key]])]),c("div",bI,[_I,q(c("input",{"onUpdate:modelValue":l[2]||(l[2]=u=>e.item.label=u),id:"customUrl_label",class:"pure-input-2-3",placeholder:"菜单文本,尽量简洁"},null,512),[[Ge,e.item.label]])]),c("div",vI,[xI,q(c("input",{"onUpdate:modelValue":l[3]||(l[3]=u=>e.item.icon=u),id:"customUrl_icon",class:"pure-input-2-3",placeholder:"图标class、图片链接或图片data:image"},null,512),[[Ge,e.item.icon]])]),c("div",CI,[c("label",{onDblclick:i}," 链接 ",32),q(c("textarea",{"onUpdate:modelValue":l[4]||(l[4]=u=>e.item.url=u),id:"customUrl_url",class:"pure-input-2-3",placeholder:"链接地址,支持变量,变量列表请点击右侧「查看变量」"},null,512),[[Ge,e.item.url]]),Q("   "),c("a",{href:"javascript:void(0)",class:"text-primary",onClick:o},"查看变量")]),c("div",$I,[EI,q(c("input",{"onUpdate:modelValue":l[5]||(l[5]=u=>e.item.openInBackground=u),id:"customUrl_openInBackground",type:"checkbox"},null,512),[[_e,e.item.openInBackground]])]),c("div",kI,[SI,q(c("input",{"onUpdate:modelValue":l[6]||(l[6]=u=>e.item.memo=u),id:"customUrl_memo",class:"pure-input-2-3"},null,512),[[Ge,e.item.memo]])]),n.value?(N(),j("div",AI,[PI,q(c("textarea",{"onUpdate:modelValue":l[7]||(l[7]=u=>e.item.mutation=u),id:"customUrl_mutation",class:"pure-input-2-3",placeholder:"自定义代码生成最终链接,具体请看右侧「查看说明」"},null,512),[[Ge,e.item.mutation]]),Q("   "),c("a",{href:"javascript:void(0)",class:"text-primary",onClick:r},"查看说明")])):je("",!0)])])]))}}),Z5="",II={class:"ce-config ce-search-urls ce-custom-urls"},TI={class:"ce-menu-urls-builtin"},LI={class:"pure-form pure-form-aligned"},OI=["for"],DI=["id","onUpdate:modelValue"],MI={class:"text-info item-memo"},RI=["onClick"],NI={class:"ce-custom-urls-list"},BI={class:"ce-custom-urls-actions"},FI=["disabled"],UI=Me({__name:"SearchUrls",async setup(e){let t,n;const s=fe(([t,n]=nn(()=>Zf()),t=await t,n(),t)),i=fe(([t,n]=nn(()=>Gs(Pn.search)),t=await t,n(),t));It(async()=>{}),dt(s,Nt(async f=>{const h=[];f.forEach(y=>{y.enabled&&h.push(y.key)}),await g1(h),oe({icon:"success",title:"预置搜索菜单设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0});async function o(){const f=[];for(const h of i.value){if(!await r(h,f.length))return;if(f.includes(h.key)){oe({icon:"error",title:`第 ${f.length+1} 个记录的「唯一标识: ${h.key}」重复!`});return}f.push(h.key)}await md(Pn.search,i.value),oe({icon:"success",title:"保存成功!"})}async function r(f,h){const y=/^\w+$/;return f.key=f.key.trim(),y.test(f.key)?(f.label=f.label.trim(),f.label===""?(oe({icon:"error",title:`第 ${h+1} 个记录的「显示名称」不能为空!`}),!1):(f.url=f.url.trim(),f.url===""?(oe({icon:"error",title:`第 ${h+1} 个记录的「链接」不能为空!`}),!1):(f.icon=f.icon.trim(),f.memo=f.memo.trim(),!0))):(oe({icon:"error",title:`第 ${h+1} 个记录的「唯一标识」错误!只能包含字母、数字、下划线。`}),!1)}async function a(){i.value.push(yt())}async function l(f,h){const{isConfirmed:y}=await pe.fire({icon:"warning",html:`确定要删除第 ${h+1} 个记录「${f.label}」吗?`});!y||(i.value.splice(h,1),await o(),oe({icon:"success",title:`「${f.label}」已删除!`}))}async function u(f){const h=JSON.stringify(f,null,2),y=`ce-url-item-denifition-${f.key}`,{isConfirmed:_}=await pe.fire({title:`「${f.label}」的定义`,html:`<h3>${f.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}});!_||(navigator.clipboard.writeText(h),oe({icon:"success",title:"已复制到剪贴板!"}))}return(f,h)=>(N(),j("div",II,[c("h1",null,[Q("预置搜索菜单 "),q(c("small",null,"( "+me(s.value.length)+" )",513),[[Ot,s.value.length]])]),c("div",TI,[c("form",LI,[c("fieldset",null,[(N(!0),j(Ue,null,nt(s.value,(y,_)=>(N(),j("div",{key:_,class:"pure-control-group"},[c("label",{for:`builtin_${y.key}`},me(y.label),9,OI),q(c("input",{id:`builtin_${y.key}`,type:"checkbox","onUpdate:modelValue":b=>y.enabled=b},null,8,DI),[[_e,y.enabled]]),Q("      "),c("span",MI,me(y.memo),1),Q("      "),c("button",{type:"button",class:"pure-button button-small",onClick:b=>u(y)},"查看定义",8,RI)]))),128))])])]),c("h1",null,[Q("自定义搜索菜单 "),q(c("small",null,"( "+me(i.value.length)+" )",513),[[Ot,i.value.length]])]),c("div",NI,[(N(!0),j(Ue,null,nt(i.value,(y,_)=>(N(),Jt(vh,{key:_,item:y,index:_,onDelete:b=>l(y,_)},null,8,["item","index","onDelete"]))),128))]),c("div",BI,[c("button",{type:"button",class:"pure-button pure-button-primary button-large",onClick:o,disabled:!i.value.length}," 保存自定义搜索菜单 ",8,FI),Q("      "),c("button",{type:"button",class:"pure-button pure-button-success button-large",onClick:a}," 添加自定义搜索菜单 ")])]))}}),eR="",jI={class:"ce-config ce-play-urls ce-custom-urls"},HI=c("div",{class:"ce-tips"},[c("p",null,[Q("支持常见的视频、音频和图片格式,也支持目录播放。预置播放菜单使用的链接变量是 "),c("b",null,"{clouddrive_stream_url}"),Q(" , 会根据文件或目录自动使用相应的链接。")]),c("p",null,"播放功能依赖CloudDrive,请先在「CloudDrive」设置面板中进行配置。")],-1),qI={class:"ce-menu-urls-builtin"},zI={class:"pure-form pure-form-aligned"},VI=["for"],WI=["id","onUpdate:modelValue"],KI={class:"text-info item-memo"},GI=["onClick"],YI=["innerHTML"],JI={class:"ce-custom-urls-list"},QI=c("div",{class:"ce-tips"}," 编辑后,请记得点击「保存自定义播放菜单」。 ",-1),XI={class:"ce-custom-urls-actions"},ZI=["disabled"],eT=Me({__name:"PlayUrls",async setup(e){let t,n;const s=fe(([t,n]=nn(()=>yr()),t=await t,n(),t)),i=fe(([t,n]=nn(()=>Gs(Pn.play)),t=await t,n(),t));It(async()=>{}),dt(s,Nt(async f=>{const h=[];f.forEach(y=>{y.enabled&&h.push(y.key)}),await y1(h),oe({icon:"success",title:"预置搜索菜单设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0});async function o(){const f=[];for(const h of i.value){if(!await r(h,f.length))return;if(f.includes(h.key)){oe({icon:"error",title:`第 ${f.length+1} 个记录的「唯一标识: ${h.key}」重复!`});return}f.push(h.key)}await md(Pn.play,i.value),oe({icon:"success",title:"保存成功!"})}async function r(f,h){const y=/^\w+$/;return f.key=f.key.trim(),y.test(f.key)?(f.label=f.label.trim(),f.label===""?(oe({icon:"error",title:`第 ${h+1} 个记录的「显示名称」不能为空!`}),!1):(f.url=f.url.trim(),f.url===""?(oe({icon:"error",title:`第 ${h+1} 个记录的「链接」不能为空!`}),!1):(f.icon=f.icon.trim(),f.memo=f.memo.trim(),!0))):(oe({icon:"error",title:`第 ${h+1} 个记录的「唯一标识」错误!只能包含字母、数字、下划线。`}),!1)}async function a(){i.value.push(yt())}async function l(f,h){const{isConfirmed:y}=await pe.fire({icon:"warning",html:`确定要删除第 ${h+1} 个记录「${f.label}」吗?`});!y||(i.value.splice(h,1),await o(),oe({icon:"success",title:`「${f.label}」已删除!`}))}async function u(f){const h=JSON.stringify(f,null,2),y=`ce-url-item-denifition-${f.key}`,{isConfirmed:_}=await pe.fire({title:`「${f.label}」的定义`,html:`<h3>${f.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}});!_||(navigator.clipboard.writeText(h),oe({icon:"success",title:"已复制到剪贴板!"}))}return(f,h)=>(N(),j("div",jI,[c("h1",null,[Q("预置播放菜单 "),q(c("small",null,"( "+me(s.value.length)+" )",513),[[Ot,s.value.length]])]),HI,c("div",qI,[c("form",zI,[c("fieldset",null,[(N(!0),j(Ue,null,nt(s.value,(y,_)=>(N(),j("div",{key:_,class:"pure-control-group"},[c("label",{for:`builtin_${y.key}`},me(y.label),9,VI),q(c("input",{id:`builtin_${y.key}`,type:"checkbox","onUpdate:modelValue":b=>y.enabled=b},null,8,WI),[[_e,y.enabled]]),Q("      "),c("span",KI,me(y.memo),1),Q("      "),c("button",{type:"button",class:"pure-button button-small",onClick:b=>u(y)},"查看定义",8,GI),y.extraMemo?(N(),j("span",{key:0,innerHTML:y.extraMemo,class:"extra-memo"},null,8,YI)):je("",!0)]))),128))])])]),c("h1",null,[Q("自定义播放菜单 "),q(c("small",null,"( "+me(i.value.length)+" )",513),[[Ot,i.value.length]])]),c("div",JI,[(N(!0),j(Ue,null,nt(i.value,(y,_)=>(N(),Jt(vh,{key:_,item:y,index:_,onDelete:b=>l(y,_)},null,8,["item","index","onDelete"]))),128))]),QI,c("div",XI,[c("button",{type:"button",class:"pure-button pure-button-primary button-large",onClick:o,disabled:!i.value.length}," 保存自定义播放菜单 ",8,ZI),Q("      "),c("button",{type:"button",class:"pure-button pure-button-success button-large",onClick:a}," 添加自定义播放菜单 ")])]))}}),tR="",xh=st.anxia,Ch={_3G:"标清",SD:"高清",HD:"超清",UD:"1080P",BD:"4K",YH:"原画"};function tT(e){return{defaultWebFull:!1,defaultOpenPlayList:!1,defaultDefinition:"",...e}}async function $h(){const e=tT(),t=await et.get(xh,e);return{...e,...t}}async function nT(e){await et.set(xh,e)}const sT={class:"ce-config ce-anxia-config"},iT={class:"pure-form pure-form-aligned"},oT={class:"pure-control-group"},rT=c("label",{for:"defaultWebFull"},"自动网页全屏",-1),aT=c("div",{class:"pure-form-message text-success"},[c("div",null,"进入播放页后自动使播放器网页全屏。")],-1),lT={class:"pure-control-group"},cT=c("label",{for:"defaultOpenPlayList"},"自动展开播放列表",-1),uT=c("div",{class:"pure-form-message text-success"},[c("div",null,"进入播放页后自动展开播放列表。")],-1),dT={class:"pure-control-group"},fT=c("label",{for:"defaultDefinition"},"默认清晰度",-1),pT=c("option",{value:""},"官方默认",-1),hT=["value"],mT=c("div",{class:"pure-form-message text-success"},[c("div",{class:"text-warning"},"如果没有该清晰度,则会使用官方默认。")],-1),gT=Me({__name:"Config",async setup(e){let t,n;const s=fe(([t,n]=nn(()=>$h()),t=await t,n(),t));return It(async()=>{}),dt(s,Nt(async i=>{await nT(i),oe({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:ct.listConfigChange,body:JSON.parse(JSON.stringify(i))})},500),{deep:!0}),(i,o)=>(N(),j("div",sT,[c("form",iT,[c("fieldset",null,[c("div",oT,[rT,q(c("input",{id:"defaultWebFull",type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=r=>s.value.defaultWebFull=r)},null,512),[[_e,s.value.defaultWebFull]]),aT]),c("div",lT,[cT,q(c("input",{id:"defaultOpenPlayList",type:"checkbox","onUpdate:modelValue":o[1]||(o[1]=r=>s.value.defaultOpenPlayList=r)},null,512),[[_e,s.value.defaultOpenPlayList]]),uT]),c("div",dT,[fT,q(c("select",{id:"defaultDefinition","onUpdate:modelValue":o[2]||(o[2]=r=>s.value.defaultDefinition=r)},[pT,(N(!0),j(Ue,null,nt(de(Ch),(r,a)=>(N(),j("option",{key:a,value:a},me(r),9,hT))),128))],512),[[Ps,s.value.defaultDefinition]]),mT])])])]))}}),nR="",Eh=function(){return document.ontouchstart!==null?"click":"touchstart"},Vr="__vue_click_away__",kh=function(e,t,n){Sh(e);let s=n.context,i=t.value,o=!1;setTimeout(function(){o=!0},0),e[Vr]=function(r){if((!e||!e.contains(r.target))&&i&&o&&typeof i=="function")return i.call(s,r)},document.addEventListener(Eh(),e[Vr],!1)},Sh=function(e){document.removeEventListener(Eh(),e[Vr],!1),delete e[Vr]},yT={mounted:kh,updated:function(e,t,n){t.value!==t.oldValue&&kh(e,t,n)},unmounted:Sh},wT=Me({__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,s=fe(!1),i=fe(!1),o=a=>{const l=document.querySelector("body");l.style.overflow=a?"hidden":""},r=a=>{!a.target.classList.contains("ce-drawer__overlay")||i.value||t("close")};return Tt(()=>{s.value=n.isOpen}),dt(()=>n.isOpen,a=>{i.value=!0,a?(o(!0),s.value=!0):(o(!1),setTimeout(()=>s.value=!1,n.speed)),setTimeout(()=>i.value=!1,n.speed)}),(a,l)=>(N(),j("div",null,[c("div",{class:Je(["ce-drawer",{"is-open":e.isOpen,"is-visible":s.value}])},[c("div",{class:"ce-drawer__overlay",style:In({transitionDuration:`${e.speed}ms`})},null,4),q((N(),j("div",{class:"ce-drawer__content",style:In({maxWidth:e.maxWidth,transitionDuration:`${e.speed}ms`,backgroundColor:e.backgroundColor})},[cn(a.$slots,"default")],4)),[[de(yT),r]])],2)]))}}),iR="",bT={class:"ce-about"},_T=c("p",null,"115不大助手(以下简称「脚本」),是一个仅用于学习编程的小脚本。",-1),vT=c("br",null,null,-1),xT=c("p",null,"脚本不会收集您的任何个人信息。",-1),CT=c("p",null,"脚本仅借助了官方已有的功能,无任何破解行为。",-1),$T=c("p",null,"脚本代码本身已包含全部依赖,无任何远程引用。",-1),ET=c("br",null,null,-1),kT=c("br",null,null,-1),ST=c("br",null,null,-1),AT=c("hr",{class:"ce-hr"},null,-1),PT=["href"],IT=Me({__name:"About",setup(e){const t={name:"115不大助手",version:"0.6.32",author:{name:"生瓜太保",email:"[email protected]"},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,s)=>(N(),j("div",bT,[_T,vT,xT,CT,$T,ET,kT,ST,AT,c("div",null,[c("a",{href:de(t).greasyforkUrl,class:"text-bold text-primary",target:"_blank",rel:"noreferrer noopener",title:"到Greasyfork查看"},[Q(me(de(t).name)+" ",1),c("small",null,"v"+me(de(t).version),1)],8,PT),Q("  "),c("small",null,"by "+me(de(t).author.name),1)])]))}}),TT={class:"ce-config-main"},LT={class:"ce-config-main-header"},OT=c("h1",null,"设置",-1),DT={class:"ce-intro"},MT=["href"],RT={class:"ce-config-main-body"},NT=Me({__name:"Config",setup(e){const t={name:"115不大助手",version:"0.6.32",author:{name:"生瓜太保",email:"[email protected]"},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=fe(!1),s=fe(!1),i=fe();Tt(async()=>{window.addEventListener("message",u=>{const{event:f,body:h}=u.data;f===ct.openConfig&&(n.value||(n.value=!0),o(h)),f===ct.closeConfig&&r()},!1)});async function o(u){var f;s.value=!0,console.log("[openDrawer]",u),u&&(await oi(),(f=i.value)==null||f.selectTab(`#${u}`))}async function r(){s.value=!1}async function a(...u){console.log("[tabClicked]",u)}async function l(...u){console.log("[tabChanged]",u)}return(u,f)=>(N(),Jt(of,null,{default:Qe(()=>[c("div",TT,[Ce(wT,{"is-open":s.value,onClose:r,"max-width":"1030px",speed:500},{default:Qe(()=>[c("div",LT,[OT,c("span",DT,[c("a",{href:de(t).greasyforkUrl,class:"text-bold text-primary",target:"_blank",rel:"noreferrer noopener",title:"到Greasyfork查看"},[Q(me(de(t).name)+" ",1),c("small",null,"v"+me(de(t).version),1)],8,MT),Q("  "),c("small",null,"by "+me(de(t).author.name),1)]),c("div",{class:"ce-config-main-close",onClick:r},"关闭")]),c("div",RT,[Ce(de(a2),{ref_key:"refTabs",ref:i,options:{useUrlFragment:!1},onClicked:a,onChanged:l},{default:Qe(()=>[Ce(de(hn),{id:de(qt).basic,name:de(fn).basic},{default:Qe(()=>[Ce(Y2)]),_:1},8,["id","name"]),Ce(de(hn),{id:de(qt).clouddrive,name:de(fn).clouddrive},{default:Qe(()=>[Ce(gS)]),_:1},8,["id","name"]),Ce(de(hn),{id:de(qt).list,name:de(fn).list},{default:Qe(()=>[Ce(XS)]),_:1},8,["id","name"]),Ce(de(hn),{id:de(qt).search,name:de(fn).search},{default:Qe(()=>[Ce(cA)]),_:1},8,["id","name"]),Ce(de(hn),{id:de(qt).menus,name:de(fn).menus},{default:Qe(()=>[Ce(dI)]),_:1},8,["id","name"]),Ce(de(hn),{id:de(qt).searchMenus,name:de(fn).searchMenus},{default:Qe(()=>[Ce(UI)]),_:1},8,["id","name"]),Ce(de(hn),{id:de(qt).playMenus,name:de(fn).playMenus},{default:Qe(()=>[Ce(eT)]),_:1},8,["id","name"]),Ce(de(hn),{id:de(qt).offline,name:de(fn).offline},{default:Qe(()=>[Ce(bp)]),_:1},8,["id","name"]),Ce(de(hn),{id:de(qt).tools,name:de(fn).tools},{default:Qe(()=>[Ce(XA)]),_:1},8,["id","name"]),Ce(de(hn),{id:de(qt).anxia,name:de(fn).anxia},{default:Qe(()=>[Ce(gT)]),_:1},8,["id","name"]),Ce(de(hn),{id:de(qt).about,name:de(fn).about},{default:Qe(()=>[Ce(IT)]),_:1},8,["id","name"])]),_:1},512)])]),_:1},8,["is-open"])])]),_:1}))}}),oR="",rR="";async function BT(){const{host:e}=location;!e.includes("115.com")||window.top===window.self&&(console.log("[Cloud115 Enhancer - main] running..."),FT(),jT(),UT())}async function FT(){console.log("[Cloud115 Enhancer - main] injectUI");const e="cloud115ConfigMain",t=document.createElement("div");t.id=e,document.body.appendChild(t),xn(NT).mount(`#${e}`),po("设置",async()=>{window.postMessage({event:ct.openConfig})}),po("扫码获取Cookie",async()=>{window.postMessage({event:ct.openConfig,body:qt.tools})}),qT()}async function UT(){if(window!==window.parent)return;new MutationObserver(async([t])=>{t.type==="childList"&&window.postMessage({event:ct.topDomChanged})}).observe(document.body,{childList:!0})}async function jT(){const e=document.querySelector(".bottom-side .navigation-ceiling ul");if(!e){VT();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",async s=>{await Wr()}),n.title="打开「115不大助手」设置",n.innerHTML='<i class="isn-setting"></i><span>不大助手</span>',t.appendChild(n),e.insertBefore(t,e.firstChild)}async function HT(){return!!document.querySelector("#js-login-box")}async function qT(){console.log("[handleLoginPage]"),await HT()&&(document.body.classList.add("ce-login-page"),zT())}async function zT(){console.log("[injectOpenConfigButtonOnLoginPage");const e=document.querySelector(".right-side a");if(!e){console.warn("[injectOpenConfigButtonOnLoginPage] '.right-side a' not found");return}const t=document.createElement("a");t.href="javascript:;",t.className="ce-entry",t.addEventListener("click",async s=>{await Wr()}),t.title="打开「115不大助手」设置",t.innerHTML='<i class="isn-setting"></i><span>115不大助手</span>',e.insertAdjacentElement("beforebegin",t);const n=document.createElement("a");n.href="javascript:;",n.className="ce-entry",n.addEventListener("click",async s=>{await Wr(qt.tools)}),n.title="打开扫码获取Cookie",n.innerHTML='<i class="isn-scan"></i><span>扫码获取Cookie</span>',e.insertAdjacentElement("beforebegin",n)}async function VT(){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",async s=>{await Wr()}),n.title="打开「115不大助手」设置",n.innerHTML='<i class="isn-setting"></i><span>115不大助手</span>',t.appendChild(n),e.insertBefore(t,e.firstChild)}async function Wr(e){window.postMessage({event:ct.openConfig,body:e})}const aR="";function Fn(e){return Array.isArray?Array.isArray(e):Ih(e)==="[object Array]"}const WT=1/0;function KT(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-WT?"-0":t}function GT(e){return e==null?"":KT(e)}function Cn(e){return typeof e=="string"}function Ah(e){return typeof e=="number"}function YT(e){return e===!0||e===!1||JT(e)&&Ih(e)=="[object Boolean]"}function Ph(e){return typeof e=="object"}function JT(e){return Ph(e)&&e!==null}function Qt(e){return e!=null}function Yl(e){return!e.trim().length}function Ih(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const lR="Extended search is not available",QT="Incorrect 'index' type",XT=e=>`Invalid value for key ${e}`,ZT=e=>`Pattern length exceeds max of ${e}.`,eL=e=>`Missing ${e} property in key`,tL=e=>`Property 'weight' in key '${e}' must be a positive integer`,Th=Object.prototype.hasOwnProperty;class nL{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(s=>{let i=Lh(s);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(s=>{s.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Lh(e){let t=null,n=null,s=null,i=1,o=null;if(Cn(e)||Fn(e))s=e,t=Oh(e),n=Jl(e);else{if(!Th.call(e,"name"))throw new Error(eL("name"));const r=e.name;if(s=r,Th.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(tL(r));t=Oh(r),n=Jl(r),o=e.getFn}return{path:t,id:n,weight:i,src:s,getFn:o}}function Oh(e){return Fn(e)?e:e.split(".")}function Jl(e){return Fn(e)?e.join("."):e}function sL(e,t){let n=[],s=!1;const i=(o,r,a)=>{if(!!Qt(o))if(!r[a])n.push(o);else{let l=r[a];const u=o[l];if(!Qt(u))return;if(a===r.length-1&&(Cn(u)||Ah(u)||YT(u)))n.push(GT(u));else if(Fn(u)){s=!0;for(let f=0,h=u.length;f<h;f+=1)i(u[f],r,a+1)}else r.length&&i(u,r,a+1)}};return i(e,Cn(t)?t.split("."):t,0),s?n:n[0]}var De={...{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:sL,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const iL=/[^ ]+/g;function oL(e=1,t=3){const n=new Map,s=Math.pow(10,t);return{get(i){const o=i.match(iL).length;if(n.has(o))return n.get(o);const r=1/Math.pow(o,.5*e),a=parseFloat(Math.round(r*s)/s);return n.set(o,a),a},clear(){n.clear()}}}class Ql{constructor({getFn:t=De.getFn,fieldNormWeight:n=De.fieldNormWeight}={}){this.norm=oL(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,s)=>{this._keysMap[n.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Cn(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();Cn(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,s=this.size();n<s;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!Qt(t)||Yl(t))return;let s={v:t,i:n,n:this.norm.get(t)};this.records.push(s)}_addObject(t,n){let s={i:n,$:{}};this.keys.forEach((i,o)=>{let r=i.getFn?i.getFn(t):this.getFn(t,i.path);if(!!Qt(r)){if(Fn(r)){let a=[];const l=[{nestedArrIndex:-1,value:r}];for(;l.length;){const{nestedArrIndex:u,value:f}=l.pop();if(!!Qt(f))if(Cn(f)&&!Yl(f)){let h={v:f,i:u,n:this.norm.get(f)};a.push(h)}else Fn(f)&&f.forEach((h,y)=>{l.push({nestedArrIndex:y,value:h})})}s.$[o]=a}else if(Cn(r)&&!Yl(r)){let a={v:r,n:this.norm.get(r)};s.$[o]=a}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function Dh(e,t,{getFn:n=De.getFn,fieldNormWeight:s=De.fieldNormWeight}={}){const i=new Ql({getFn:n,fieldNormWeight:s});return i.setKeys(e.map(Lh)),i.setSources(t),i.create(),i}function rL(e,{getFn:t=De.getFn,fieldNormWeight:n=De.fieldNormWeight}={}){const{keys:s,records:i}=e,o=new Ql({getFn:t,fieldNormWeight:n});return o.setKeys(s),o.setIndexRecords(i),o}function Kr(e,{errors:t=0,currentLocation:n=0,expectedLocation:s=0,distance:i=De.distance,ignoreLocation:o=De.ignoreLocation}={}){const r=t/e.length;if(o)return r;const a=Math.abs(s-n);return i?r+a/i:a?1:r}function aL(e=[],t=De.minMatchCharLength){let n=[],s=-1,i=-1,o=0;for(let r=e.length;o<r;o+=1){let a=e[o];a&&s===-1?s=o:!a&&s!==-1&&(i=o-1,i-s+1>=t&&n.push([s,i]),s=-1)}return e[o-1]&&o-s>=t&&n.push([s,o-1]),n}const Ms=32;function lL(e,t,n,{location:s=De.location,distance:i=De.distance,threshold:o=De.threshold,findAllMatches:r=De.findAllMatches,minMatchCharLength:a=De.minMatchCharLength,includeMatches:l=De.includeMatches,ignoreLocation:u=De.ignoreLocation}={}){if(t.length>Ms)throw new Error(ZT(Ms));const f=t.length,h=e.length,y=Math.max(0,Math.min(s,h));let _=o,b=y;const E=a>1||l,T=E?Array(h):[];let D;for(;(D=e.indexOf(t,b))>-1;){let X=Kr(t,{currentLocation:D,expectedLocation:y,distance:i,ignoreLocation:u});if(_=Math.min(X,_),b=D+f,E){let ue=0;for(;ue<f;)T[D+ue]=1,ue+=1}}b=-1;let I=[],P=1,V=f+h;const ae=1<<f-1;for(let X=0;X<f;X+=1){let ue=0,ye=V;for(;ue<ye;)Kr(t,{errors:X,currentLocation:y+ye,expectedLocation:y,distance:i,ignoreLocation:u})<=_?ue=ye:V=ye,ye=Math.floor((V-ue)/2+ue);V=ye;let Le=Math.max(1,y-ye+1),ge=r?h:Math.min(y+ye,h)+f,L=Array(ge+2);L[ge+1]=(1<<X)-1;for(let G=ge;G>=Le;G-=1){let Se=G-1,xe=n[e.charAt(Se)];if(E&&(T[Se]=+!!xe),L[G]=(L[G+1]<<1|1)&xe,X&&(L[G]|=(I[G+1]|I[G])<<1|1|I[G+1]),L[G]&ae&&(P=Kr(t,{errors:X,currentLocation:Se,expectedLocation:y,distance:i,ignoreLocation:u}),P<=_)){if(_=P,b=Se,b<=y)break;Le=Math.max(1,2*y-b)}}if(Kr(t,{errors:X+1,currentLocation:y,expectedLocation:y,distance:i,ignoreLocation:u})>_)break;I=L}const U={isMatch:b>=0,score:Math.max(.001,P)};if(E){const X=aL(T,a);X.length?l&&(U.indices=X):U.isMatch=!1}return U}function cL(e){let t={};for(let n=0,s=e.length;n<s;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<s-n-1}return t}class Mh{constructor(t,{location:n=De.location,threshold:s=De.threshold,distance:i=De.distance,includeMatches:o=De.includeMatches,findAllMatches:r=De.findAllMatches,minMatchCharLength:a=De.minMatchCharLength,isCaseSensitive:l=De.isCaseSensitive,ignoreLocation:u=De.ignoreLocation}={}){if(this.options={location:n,threshold:s,distance:i,includeMatches:o,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:u},this.pattern=l?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const f=(y,_)=>{this.chunks.push({pattern:y,alphabet:cL(y),startIndex:_})},h=this.pattern.length;if(h>Ms){let y=0;const _=h%Ms,b=h-_;for(;y<b;)f(this.pattern.substr(y,Ms),y),y+=Ms;if(_){const E=h-Ms;f(this.pattern.substr(E),E)}}else f(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,includeMatches:s}=this.options;if(n||(t=t.toLowerCase()),this.pattern===t){let b={isMatch:!0,score:0};return s&&(b.indices=[[0,t.length-1]]),b}const{location:i,distance:o,threshold:r,findAllMatches:a,minMatchCharLength:l,ignoreLocation:u}=this.options;let f=[],h=0,y=!1;this.chunks.forEach(({pattern:b,alphabet:E,startIndex:T})=>{const{isMatch:D,score:I,indices:P}=lL(t,b,E,{location:i+T,distance:o,threshold:r,findAllMatches:a,minMatchCharLength:l,includeMatches:s,ignoreLocation:u});D&&(y=!0),h+=I,D&&P&&(f=[...f,...P])});let _={isMatch:y,score:y?h/this.chunks.length:1};return y&&s&&(_.indices=f),_}}class us{constructor(t){this.pattern=t}static isMultiMatch(t){return Rh(t,this.multiRegex)}static isSingleMatch(t){return Rh(t,this.singleRegex)}search(){}}function Rh(e,t){const n=e.match(t);return n?n[1]:null}class uL extends us{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 dL extends us{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const s=t.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class fL extends us{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 pL extends us{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 hL extends us{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 mL extends us{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 Nh extends us{constructor(t,{location:n=De.location,threshold:s=De.threshold,distance:i=De.distance,includeMatches:o=De.includeMatches,findAllMatches:r=De.findAllMatches,minMatchCharLength:a=De.minMatchCharLength,isCaseSensitive:l=De.isCaseSensitive,ignoreLocation:u=De.ignoreLocation}={}){super(t),this._bitapSearch=new Mh(t,{location:n,threshold:s,distance:i,includeMatches:o,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class Bh extends us{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,s;const i=[],o=this.pattern.length;for(;(s=t.indexOf(this.pattern,n))>-1;)n=s+o,i.push([s,n-1]);const r=!!i.length;return{isMatch:r,score:r?0:1,indices:i}}}const Xl=[uL,Bh,fL,pL,mL,hL,dL,Nh],Fh=Xl.length,gL=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,yL="|";function wL(e,t={}){return e.split(yL).map(n=>{let s=n.trim().split(gL).filter(o=>o&&!!o.trim()),i=[];for(let o=0,r=s.length;o<r;o+=1){const a=s[o];let l=!1,u=-1;for(;!l&&++u<Fh;){const f=Xl[u];let h=f.isMultiMatch(a);h&&(i.push(new f(h,t)),l=!0)}if(!l)for(u=-1;++u<Fh;){const f=Xl[u];let h=f.isSingleMatch(a);if(h){i.push(new f(h,t));break}}}return i})}const bL=new Set([Nh.type,Bh.type]);class _L{constructor(t,{isCaseSensitive:n=De.isCaseSensitive,includeMatches:s=De.includeMatches,minMatchCharLength:i=De.minMatchCharLength,ignoreLocation:o=De.ignoreLocation,findAllMatches:r=De.findAllMatches,location:a=De.location,threshold:l=De.threshold,distance:u=De.distance}={}){this.query=null,this.options={isCaseSensitive:n,includeMatches:s,minMatchCharLength:i,findAllMatches:r,ignoreLocation:o,location:a,threshold:l,distance:u},this.pattern=n?t:t.toLowerCase(),this.query=wL(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:s,isCaseSensitive:i}=this.options;t=i?t:t.toLowerCase();let o=0,r=[],a=0;for(let l=0,u=n.length;l<u;l+=1){const f=n[l];r.length=0,o=0;for(let h=0,y=f.length;h<y;h+=1){const _=f[h],{isMatch:b,indices:E,score:T}=_.search(t);if(b){if(o+=1,a+=T,s){const D=_.constructor.type;bL.has(D)?r=[...r,...E]:r.push(E)}}else{a=0,o=0,r.length=0;break}}if(o){let h={isMatch:!0,score:a/o};return s&&(h.indices=r),h}}return{isMatch:!1,score:1}}}const Zl=[];function vL(...e){Zl.push(...e)}function ec(e,t){for(let n=0,s=Zl.length;n<s;n+=1){let i=Zl[n];if(i.condition(e,t))return new i(e,t)}return new Mh(e,t)}const Gr={AND:"$and",OR:"$or"},tc={PATH:"$path",PATTERN:"$val"},nc=e=>!!(e[Gr.AND]||e[Gr.OR]),xL=e=>!!e[tc.PATH],CL=e=>!Fn(e)&&Ph(e)&&!nc(e),Uh=e=>({[Gr.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function jh(e,t,{auto:n=!0}={}){const s=i=>{let o=Object.keys(i);const r=xL(i);if(!r&&o.length>1&&!nc(i))return s(Uh(i));if(CL(i)){const l=r?i[tc.PATH]:o[0],u=r?i[tc.PATTERN]:i[l];if(!Cn(u))throw new Error(XT(l));const f={keyId:Jl(l),pattern:u};return n&&(f.searcher=ec(u,t)),f}let a={children:[],operator:o[0]};return o.forEach(l=>{const u=i[l];Fn(u)&&u.forEach(f=>{a.children.push(s(f))})}),a};return nc(e)||(e=Uh(e)),s(e)}function $L(e,{ignoreFieldNorm:t=De.ignoreFieldNorm}){e.forEach(n=>{let s=1;n.matches.forEach(({key:i,norm:o,score:r})=>{const a=i?i.weight:null;s*=Math.pow(r===0&&a?Number.EPSILON:r,(a||1)*(t?1:o))}),n.score=s})}function EL(e,t){const n=e.matches;t.matches=[],Qt(n)&&n.forEach(s=>{if(!Qt(s.indices)||!s.indices.length)return;const{indices:i,value:o}=s;let r={indices:i,value:o};s.key&&(r.key=s.key.src),s.idx>-1&&(r.refIndex=s.idx),t.matches.push(r)})}function kL(e,t){t.score=e.score}function SL(e,t,{includeMatches:n=De.includeMatches,includeScore:s=De.includeScore}={}){const i=[];return n&&i.push(EL),s&&i.push(kL),e.map(o=>{const{idx:r}=o,a={item:t[r],refIndex:r};return i.length&&i.forEach(l=>{l(o,a)}),a})}class hi{constructor(t,n={},s){this.options={...De,...n},this.options.useExtendedSearch,this._keyStore=new nL(this.options.keys),this.setCollection(t,s)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Ql))throw new Error(QT);this._myIndex=n||Dh(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){!Qt(t)||(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let s=0,i=this._docs.length;s<i;s+=1){const o=this._docs[s];t(o,s)&&(this.removeAt(s),s-=1,i-=1,n.push(o))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:s,includeScore:i,shouldSort:o,sortFn:r,ignoreFieldNorm:a}=this.options;let l=Cn(t)?Cn(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return $L(l,{ignoreFieldNorm:a}),o&&l.sort(r),Ah(n)&&n>-1&&(l=l.slice(0,n)),SL(l,this._docs,{includeMatches:s,includeScore:i})}_searchStringList(t){const n=ec(t,this.options),{records:s}=this._myIndex,i=[];return s.forEach(({v:o,i:r,n:a})=>{if(!Qt(o))return;const{isMatch:l,score:u,indices:f}=n.searchIn(o);l&&i.push({item:o,idx:r,matches:[{score:u,value:o,norm:a,indices:f}]})}),i}_searchLogical(t){const n=jh(t,this.options),s=(a,l,u)=>{if(!a.children){const{keyId:h,searcher:y}=a,_=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(l,h),searcher:y});return _&&_.length?[{idx:u,item:l,matches:_}]:[]}const f=[];for(let h=0,y=a.children.length;h<y;h+=1){const _=a.children[h],b=s(_,l,u);if(b.length)f.push(...b);else if(a.operator===Gr.AND)return[]}return f},i=this._myIndex.records,o={},r=[];return i.forEach(({$:a,i:l})=>{if(Qt(a)){let u=s(n,a,l);u.length&&(o[l]||(o[l]={idx:l,item:a,matches:[]},r.push(o[l])),u.forEach(({matches:f})=>{o[l].matches.push(...f)}))}}),r}_searchObjectList(t){const n=ec(t,this.options),{keys:s,records:i}=this._myIndex,o=[];return i.forEach(({$:r,i:a})=>{if(!Qt(r))return;let l=[];s.forEach((u,f)=>{l.push(...this._findMatches({key:u,value:r[f],searcher:n}))}),l.length&&o.push({idx:a,item:r,matches:l})}),o}_findMatches({key:t,value:n,searcher:s}){if(!Qt(n))return[];let i=[];if(Fn(n))n.forEach(({v:o,i:r,n:a})=>{if(!Qt(o))return;const{isMatch:l,score:u,indices:f}=s.searchIn(o);l&&i.push({score:u,key:t,value:o,idx:r,norm:a,indices:f})});else{const{v:o,n:r}=n,{isMatch:a,score:l,indices:u}=s.searchIn(o);a&&i.push({score:l,key:t,value:o,norm:r,indices:u})}return i}}hi.version="7.0.0",hi.createIndex=Dh,hi.parseIndex=rL,hi.config=De,hi.parseQuery=jh,vL(_L);const AL={class:"ce-goto-input-wrap"},PL=["disabled"],IL=["disabled"],TL={class:"ce-goto-sug"},LL=["onMousedown","sid"],OL={class:"ce-goto-sug-index"},DL={class:"ce-goto-sug-prefix"},ML=c("span",{class:"ce-goto-sep"},"/",-1),RL={class:"ce-goto-sug-name"},NL=Me({__name:"GotoPath",setup(e){const t=fe(!1),n=fe(!1),s=fe(null),i=fe(null),o=fe(""),r=fe([]),a=fe(!1),l=dn(()=>o.value.trim().length>0);let u="";Tt(async()=>{var L;t.value=!0,(L=i.value)==null||L.focus(),window.addEventListener("message",async re=>{if(re.data.event===ct.listRendered){const Se=await gt(!1);Se!==u&&(r.value=[],await X(!1)),u=Se}})});async function f(L){if(console.log("[handleKeydown]",L.key),dd(L),L.key==="Enter"){V.value>-1?ye():await Le(o.value);return}if(L.key==="Escape"){await ge();return}["ArrowUp","ArrowDown"].includes(L.key)?ae(L):h(L)}const h=Nt(async L=>{y()},200);async function y(){try{r.value=[],await X(!1);const L={keyword:"",parentId:await gt(!1),parentPath:await Ma(),isSubOfCurrent:!0};console.log("[getSug] searchData:",L);const re=await I(L,!1);if(console.log("[searchData] items:",re),!re.length){oe({icon:"warning",text:"没有匹配的建议",timer:1500,position:"top-right"});return}const G=await _(re,L);console.log("[searchData] sugs:",G),r.value=G,V.value=-1,await X(G.length>0)}catch(L){console.warn(L),await X(!1),oe({icon:"error",text:L.toString(),timer:2e3,position:"top-right"})}}async function _(L,re){const G=[];for(let M=0;M<L.length;M++){const se=L[M];G.push({id:se.id,prefix:re.parentPath==="/"?"":re.parentPath,name:se.name,active:!1})}const Se=o.value.trim();if(!Se)return G;const xe=/^(\.\/)?[^\/]+/.test(Se),Re=Da(Se,"../");if(console.log("[toSug] isSubOfCurrent:",xe,"kwParentPath:",Re),xe||Re===re.parentPath){const M=new hi(G,{keys:["name"],threshold:.6,includeScore:!0});let se=Se;if(Re===re.parentPath){const Z=Se.split(/[\\/]/).filter(Boolean);se=Z[Z.length-1]}const ee=M.search(se);console.log("[toSug] fuse res:",ee);let Ee=!1;return ee.forEach(Z=>{Z.score===void 0?(console.warn("[toSug] r.score is undefined:",Z),Ee=!0,Z.score=0):Z.score!==void 0&&isNaN(Z.score)&&(console.warn("[toSug] r.score is NaN:",Z),Ee=!0,Z.score=0)}),Ee&&ee.sort((Z,z)=>Z.score-z.score),ee.map(Z=>Z.item)}return G}const b=new Map,E=new Map;async function T(L){return b.get(L)||!1}async function D(L,re){b.set(L,re)}async function I(L,re){const G=E.get(L.parentPath);if(G)return console.log(`[getSubDirs] path "${L.parentPath}" is cached`),G.items;if(await T(L.parentPath))return console.warn(`[getSubDirs] path "${L.parentPath}" is loading`),[];await D(L.parentPath,!0);try{const Se=En({cid:L.parentId,limit:1150,show_dir:ra.true}),xe=await Zu(Se);if(!xe.count)return[];const Re=[];for(let M=0;M<xe.data.length;M++){const se=await Ii(xe.data[M]);if(se.isDir)Re.push(se);else if(re)break}return E.set(L.parentPath,{count:Re.length,dirPath:L.parentPath,dirId:L.parentId,items:Re}),Re}catch(Se){console.warn(Se)}finally{await D(L.parentPath,!1)}return[]}async function P(L,re){console.log("[handleSugClick]",L,re);const G=Io([L.prefix,L.name]);console.log("[handleSugClick] path:",G),await Le(G)}const V=fe(-1);async function ae(L){var xe;console.log("[navigateSug]",L.key),L.preventDefault(),L.stopPropagation();let re=V.value;if(L.key==="ArrowUp")re--;else if(L.key==="ArrowDown")re++;else if(L.key==="Enter"){const Re=r.value[V.value];Re&&await P(Re,L);return}else return;re<0?re=0:re>=r.value.length&&(re=r.value.length-1),V.value=re,r.value.forEach((Re,M)=>{Re.active=M===re});const G=r.value[re];if(!G)return;const Se=(xe=s.value)==null?void 0:xe.querySelector(`[sid="${G.id}"]`);Se==null||Se.scrollIntoView()}async function U(){var L;o.value="",(L=i.value)==null||L.focus(),await y()}async function X(L){var re;a.value=L,L&&((re=i.value)==null||re.focus())}async function ue(L){if(jw(L))return"0";const re=await Ma();return L=To(L,Wn.unix),L=Da(re,L,Wn.unix),await Ks(L)}async function ye(){const L=r.value[V.value];if(!L)return;const re=Io([L.prefix,L.name],Wn.unix);console.log("[gotoByCurrentSug] path:",re),await Le(re)}async function Le(L){var re;if(!n.value){L=L.trim(),oe({text:"正在获取路径信息...",timer:0,position:"top-right"}),pe.showLoading(),n.value=!0;try{const G=await ue(L);unsafeWindow.Main.GotoDir(1,G,0,""),oe({icon:"success",text:"获取路径信息成功,现在打开...",timer:1e3,position:"top-right"}),(re=i.value)==null||re.focus(),r.value=[],V.value=-1}catch(G){pe.fire({icon:"error",title:"跳转失败",text:G.message})}finally{pe.hideLoading(),n.value=!1}}}async function ge(){if(V.value>-1)r.value.forEach(L=>L.active=!1),V.value=-1,await X(!1);else{const L=document.querySelector("#ceGotoPathApp");L==null||L.style.setProperty("display","none");const re=document.querySelector(".ce-goto-path-active");re==null||re.classList.remove("ce-goto-path-active"),t.value=!1}}return(L,re)=>(N(),j("div",{ref_key:"refMain",ref:s,class:Je(["ce-goto-main",{"ce-goto-sug-shown":a.value}])},[c("div",AL,[q(c("input",{ref_key:"refInput",ref:i,"onUpdate:modelValue":re[0]||(re[0]=G=>o.value=G),class:"ce-goto-input",placeholder:"回车确认跳转 | Esc关闭 | 可搜索当前目录的子目录显示下拉列表,上下方向键选择",onKeydown:f},null,544),[[Ge,o.value]]),c("button",{type:"button",class:"ce-goto-input-btn","data-cmd":"clear",onClick:U,title:"清空输入框",disabled:!de(l)},"清空",8,PL),c("button",{type:"button",class:"ce-goto-input-btn","data-cmd":"toggle",onClick:re[1]||(re[1]=G=>X(!1)),title:"收起建议列表",disabled:!a.value},"收起",8,IL)]),c("div",TL,[(N(!0),j(Ue,null,nt(r.value,(G,Se)=>(N(),j("div",{key:Se,class:Je(["ce-goto-sug-item",{active:G.active}]),onMousedown:s1(xe=>P(G,xe),["left","stop","prevent"]),sid:G.id},[c("span",OL,me(Se+1),1),c("span",DL,me(G.prefix),1),ML,c("span",RL,me(G.name),1)],42,LL))),128))])],2))}}),pR="";async function BL(){const e=await wr(),{host:t,search:n}=location;!/115\.com$/.test(t)||(console.log("[List] running...",e),(Gn()||Yn())&&E1(),UL(e),FL(e),setTimeout(async()=>{await qL(),zL(e),VL(e)},2e3),WL(e),KL(e))}async function FL(e){const{fileSelectorDefaultView:t}=e;t&&(console.log("[setSelectorView]",t),unsafeWindow.localStorage.setItem("FS_view",t))}async function UL(e){if(!Gn())return;const t=await bt("#js_top_header_file_path_box");e.showGotoButtonOnPathBar&&HL(e,t),e.showCopyButtonOnPathBar&&jL(e,t)}async function jL(e,t){const n="ceCopyPath";let s=t.querySelector(`#${n}`);const i=async()=>{const r=await Ma();sn(r),oe({icon:"success",text:"路径已复制",timer:1e3,position:"top-right"})};s||(s=await(async()=>{const r=Yt(`<button class="pure-button button-mini ce-path-btn" id="${n}" title="复制路径">
        <span>复制</span>
      </button>`);return r.addEventListener("click",i),r})(),t.prepend(s))}async function HL(e,t){const n=t.querySelector(".top-file-path"),s="ceGotoPath";let i=t.querySelector(`#${s}`);const o=xn(NL),r="ceGotoPathApp",a=async()=>{await l()},l=async()=>{if(t.classList.toggle("ce-goto-path-active"),t.classList.contains("ce-goto-path-active"))await u();else{const y=t.querySelector(`#${r}`);y&&(y.style.display="none")}},u=async()=>{let y=t.querySelector(`#${r}`);y||(y=await h(),n.after(y)),y.querySelector(".ce-goto-main")?setTimeout(()=>{const b=document.querySelector(".ce-goto-input");b==null||b.focus()},200):o.mount(y),y.style.display="block"},f=async()=>{const y=document.createElement("button");return y.className="pure-button button-mini ce-path-btn text-primary",y.id=s,y.title=`
      【这是一个实验功能】
      跳转到指定路径。使用:
      - 空白、单个斜杠: 根目录
      - 相对路径1: 开头不带斜杠,当前目录下的子路径
      - 相对路径2: 开头带有../,当前目录的上级目录,可以多级
      - 绝对路径: 开头带有斜杠,从根目录开始的路径

      斜杠风格不限,支持模糊搜索当前目录的子目录。
      回车键跳转,Esc键关闭输入框。`,y.innerHTML="<span>跳转</span>",y.addEventListener("click",a),y},h=async()=>Yt(`<div id="${r}" style="width: 50%"/>`);i||(i=await f(),t.prepend(i))}async function qL(){if(window!==window.top)return;async function e(t){var s,i;const n=Wt();n&&((i=(s=n.Core)==null?void 0:s.FileConfig)==null?void 0:i.DataAPI)&&t(!0)}try{return await qn(e,250,3e4)}catch(t){throw new Error(`awaitDataAPI failed:${t.toString()}`)}}async function zL(e){if(!e.noUpdateDirAfterRename||window!==window.top)return;let t=!0,n="",s=!1;const i=Wt(),o=Core.FileReNameDG.Show,r=i.Core.Dir.Rename,a=i.Core.FileConfig.DataAPI.UpdateDir;i.Core.FileReNameDG.Show=async(...l)=>{n=l[0],s=!0,o(...l)},i.Core.Dir.Rename=async(...l)=>{n=l[1],s=!1,r(...l)},i.Core.FileConfig.DataAPI.UpdateDir=async l=>{if(t){const u=await Ti();let f=`li[file_id="${n}"]`;s||(f=`li[cate_id="${n}"]`);const h=u.find(f);if(h.length){if(h.hasClass("ce-temp-cur-dir")){console.warn("[list handleNoUpdateDirAfterRename] $file is ce-temp-cur-dir"),oe({icon:"warning",text:"重命名的是当前目录,忽略「重命名后不刷新列表」选项"}),a(l);return}if(oe({icon:"info",text:"启用了「重命名后不刷新列表」选项,不会刷新文件列表"}),h.find(".file-modified span").text("刚刚"),!s){const y=await St(n),{file_name:_}=y;h.attr("cate_name",_),h.attr("title",_);const b=h.find(".file-name a.name");b.length?(b.attr("title",_).text(_),b.text(_)):console.warn("[list handleNoUpdateDirAfterRename] $name not found")}}else console.warn("[list handleNoUpdateDirAfterRename] $file not found")}else a(l)},window.addEventListener("message",async l=>{var f;if(l.data.event===ct.topDomChanged){const h=document.querySelector("div.dialog-box.window-current > div.dialog-header > h3");if(h&&((f=h.textContent)==null?void 0:f.includes("重命名"))){const y=document.querySelector("div.dialog-box.window-current .file-rename");if(!y){console.warn("[list handleNoUpdateDirAfterRename] .file-rename not found");return}const _=document.createElement("div"),b=`
          <div style="padding: 0px 20px;">
            <label style="font-size: 18px; color: #1890ff;">
              <input id="cbNoUpdateDir" type="checkbox" style="width: 22px; height: 22px; vertical-align: sub;"> 重命名后不刷新列表
            </label>
            <p style="font-size: 12px; color: #ff4949;">在使用当前目录增强菜单项「重命名文件夹」时会忽略该选项。</p>
          </div>`;_.innerHTML=b,y.insertAdjacentElement("afterend",_);const E=document.querySelector("#cbNoUpdateDir");E&&(E.checked=t,E.addEventListener("change",()=>{t=E.checked}))}}})}async function VL(e){if(!e.noReloadAfterMove||window!==window.top)return;let t=!0,n=[];const s=Wt(),i=s.Core.FileMenu.DoEvent,o=s.Core.FileConfig.DataAPI.Reload;s.Core.FileConfig.DataAPI.Reload=async(...r)=>{if(t){oe({icon:"info",text:"启用了「移动后不刷新文本列表」选项,不会刷新文件列表"});for(let a=0;a<n.length;a++)pd(n[a][0])}else o(...r)},s.Core.FileMenu.DoEvent=async(...r)=>{n=r[0],i(...r)},window.addEventListener("message",async r=>{var l;if(r.data.event===ct.topDomChanged){const u=document.querySelector("div.dialog-box.window-current > div.dialog-header > h3");if(u&&((l=u.textContent)==null?void 0:l.includes("打开要移动"))){const f=document.querySelector("div.dialog-box.window-current .select-footer");if(!f){console.warn("[list handleNoUpdateDirAfterMove] .select-footer not found");return}let h=document.querySelector("#cbNoReload");if(!h){const y=document.createElement("div"),_=`
            <div style="padding: 6px 30px 0px;">
              <label style="font-size: 18px; color: #1890ff;">
                <input id="cbNoReload" type="checkbox" style="width: 22px; height: 22px; vertical-align: sub;"> 移动后不刷新列表
              </label>
              <p style="font-size: 14px; color: #ff4949;">启用该功能并且执行过移动操作后,会影响列表的全选功能,此时如需全选,请先手动刷新列表!</p>
            </div>`;y.innerHTML=_,f.insertAdjacentElement("afterend",y),h=document.querySelector("#cbNoReload"),h&&(h.checked=t,h.addEventListener("change",()=>{t=h.checked}))}}}})}async function WL(e){var a;if(!e.showOnlyFileFilter)return;const t=Gn(),n=Yn();if(!t&&!n)return;console.log("[List] injectToListFilter",e,t,n);const s=mt.file,i=Yt(`<a href="javascript:;" menu="filter" val="${s}"><i class="iofl-max"></i><span>仅文件</span></a>`),r=await bt(t?'#js_filter_box a[val="other"]':'#js_search_filter_popup a[val="other"]');(a=r.parentNode)==null||a.insertBefore(i,r)}async function KL(e){if(window!==window.top||!e.followHistoryState)return;const t=async n=>{const s=na("cid"),i=await gt(!1);s!==i&&Wt().wangpan.Main.Action.Handlers.GotoDir({cid:s})};window.addEventListener("popstate",t)}const hR="";async function GL(){const e=await bh();!Yn()||(console.log("[Search] running...",e),XL(),YL(e))}async function YL(e){const t=await bt(".top-file-path");JL(e,t),QL(e,t)}async function JL(e,t){if(!e.showSelectTargetButtonOnPathBar)return;console.log("[showSelectTargetButtonOnPathBar]");const n="ce-btn-select";let s=t.querySelector(`.${n}`);const i=async()=>{unsafeWindow.parent.Core.FileSelectDG.Open((r,a)=>{console.log("[Core.FileSelectDG.Open]",r,a);const l=r[r.length-1],u=Yt(`
        <a href="javascript:;" class="dir-tab" search_btn_file="${l.cid}" style="display: none;">
        ${l.cname}
        </a>
      `);t.querySelector(".file-path").append(u),u.click()},{select:1,nf:1,show_record:0,show_copy:1,btn_txt:"在该目录下搜索",select_txt:"搜索"})};s||(s=await(async()=>{const r=Yt(`
      <a href="javascript:;" class="dir-tab ${n}" title="选择指定目录进行搜索">选择目录</a>
    `);return r.addEventListener("click",i),r})(),t.append(s))}async function QL(e,t){if(!e.showSelectAllDir)return;const n="ce-btn-select-dir";let s=t.querySelector(`.${n}`);const i=async r=>{r.preventDefault(),r.stopPropagation();const a=[],l=document.querySelectorAll('li[rel="item"][file_type="0"]');for(let u=0;u<l.length;u++)a.push($(l[u]));unsafeWindow.Main.List.RecheckFiles(a)};s||(s=await(async()=>{const a=Yt(`
      <button type="button" class="pure-button button-success button-small ${n}" title="仅会选中已加载的文件夹">选中全部文件夹</label>
    `);return a.setAttribute("style","margin-left: 10px;"),a.addEventListener("click",i),a})(),t.append(s))}async function XL(e){document.body.classList.add("ce-search-page"),parent.document.body.classList.add("ce-search-page")}const mR="";async function ZL(){console.log("[Tools] running...")}const gR="";async function eO(){const{host:e,search:t}=location;if(!e.includes("anxia.com"))return;console.log("[anxia] run");const n=await $h();nO(n),sO(n),tO(),iO(n)}async function tO(e){const t=async s=>{const i=Yt(`<li pickcode="${s.pickCode}" style="padding:0px;"></li>`),o=Yt(`
      <a style="height:auto;text-decoration:none;padding:5px 0 5px 5px;">
        <span style="word-break:break-all">${s.name}</span>
      </a>
    `);return o.href="/?hls=1&pickcode="+s.pickCode,o.setAttribute("title",s.name),i.appendChild(o),i};let n="";window.addEventListener("message",async s=>{if(s.data.event==="play"){const i=await bt("ul#js-video_list"),o=s.data.body.id;if(n&&n===o)if(i.childElementCount){console.log(`[playSelected] same id: ${o} 但是播放列表已经渲染过了,忽略`);return}else console.warn(`[playSelected] same id: ${o} 但是播放列表为空,将会进行渲染`);n=o;const r=s.data.body.files;console.log(`[playSelected] id: ${o}, files: `,r);const a=await Promise.all(r.map(t));i==null||i.append(...a);const l=document.querySelector(".video-playlist .vpl-container");l&&(l.style.display="block");const u=i==null?void 0:i.querySelector("a");u==null||u.click();const f=document.querySelector("#js-video_container");f&&f.classList.remove("video-container-nolist")}})}async function nO(e){if(!e.defaultWebFull)return;const t=await bt('[rel="web_fullscreen"]');t.querySelector('[rel="tooltips"]').innerText==="网页全屏"&&t.click()}async function sO(e){if(!e.defaultOpenPlayList)return;const t=await bt("a#js_pl_control_expand");t.querySelector('[rel="tooltips"]').innerText==="展开播放列表"&&t.click()}async function iO(e){if(!e.defaultDefinition)return;const t=Ch[e.defaultDefinition],n=unsafeWindow.__HLS,s=n.setCurrentLevel;(async()=>{var a;const o=await bt('div[rel="level_menu"]'),r=await Ic('a[btn="level"]',100,12e4,o);for(let l=0;l<r.length;l++){const u=r[l],f=u.classList.contains("current");if(((a=u.textContent)==null?void 0:a.trim())===t&&!f){console.log("[setDefinition _first] 找到目标清晰度元素:",u),u.click();break}}})(),n.setCurrentLevel=o=>{const r=n.hls();if(!r||!r.levels){s(o);return}const a=[];r.levels.forEach(u=>{a.push({name:u.name,bitrate:u.bitrate})}),a.sort((u,f)=>u.bitrate-f.bitrate);let l=o;for(let u=0;u<a.length;u++)if(a[u].name===e.defaultDefinition){l=u;break}l!==o&&console.warn(`[level changed] ${o} -> ${l}`),s(l)}}function oO(e,t,n,s){return e<t||e>n?s:e}location.host==="115.com"&&(window.COMMONHEADERUSERINFO=window.COMMONHEADERUSERINFO||{}),(async()=>{console.log("Cloud115 Enhancer launched!");const e=await qr(),t=Ku({rateLimit:{...Wu,duration:1,points:oO(e.qps,1,9,4)}}),n=Gu(t);await Ew(n),a0(),r$(),qk(),s2(),BL(),GL(),ZL(),eO(),BT()})()})();