Greasy Fork

Greasy Fork is available in English.

115不大助手 (full)

Make 115 taerg again!

当前为 2024-08-14 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         115不大助手 (full)
// @namespace    com.cloud115.enhancer
// @version      0.6.14
// @author       生瓜太保
// @description  Make 115 taerg again!
// @license      MIT
// @homepage     http://greasyfork.icu/zh-CN/scripts/474231-115不大助手?locale_override=1
// @supportURL   http://greasyfork.icu/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-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-size a.ce-size-sort{cursor:pointer;background:#f2f4f8;border-radius:4px;padding:0 6px;color:#8c97a0;margin-left:10px}.header-size a.ce-size-sort i{display:none}.header-size a.ce-size-sort.by-desc{background-color:#fdc94a;color:#1a2734}.header-size a.ce-size-sort.by-desc i.icon-sort-desc{display:inline-block}.header-size a.ce-size-sort.by-asc{background-color:#fdc94a;color:#1a2734}.header-size a.ce-size-sort.by-asc i.icon-sort-asc{display:inline-block}.header-size a.ce-size-sort.ce-size-sort-ing{cursor:no-drop}.ce-offline-config{max-height:70vh;overflow-y:auto}.ce-offline-config .ce-tips{margin-top:20px;margin-left:56px}.ce-offline-config .pure-form-message{margin-left:56px}.ce-offline-exporter{position:absolute;left:140px;top:62px;background:#f4f2ff;padding:6px 10px;border-radius:4px}.ce-offline-exporter button{margin-right:6px}.offline-exporter-config-form{width:550px;padding:10px}.swal2-input#swalDeleteFile{width:20px;padding:0;height:20px;margin:0;vertical-align:sub;cursor:pointer}body.ce-list-s #js-main{padding-top:40px}body.ce-list-s .ce-offline-exporter{top:92px}.ce-offline-searcher{position:absolute;left:140px;top:58px;background:#f4f2ff;padding:4px 10px;border-radius:4px}.ce-offline-searcher.loading form{opacity:.5;pointer-events:none;cursor:wait}.ce-offline-searcher fieldset{padding:0}.ce-offline-searcher .clearable-wrap{position:relative;width:320px}.ce-offline-searcher .clearable-wrap.is-empty .btn-clear{display:none}.ce-offline-searcher .clearable-wrap input{width:300px;padding-right:35px!important}.ce-offline-searcher .clearable-wrap .btn-clear{position:absolute;right:30px;top:4px;display:block}.ce-offline-searcher .form-item{display:inline-block;margin-right:10px;vertical-align:middle}.ce-offline-searcher .form-item input{padding:.3em}.ce-offline-searcher .form-item select{height:2em;padding:.1em .3em}.ce-offline-searcher .form-item label{margin-right:5px}.ce-offline-searcher .help-trigger{font-size:12px}.ce-offline-searcher .list{display:none}.ce-offline-searcher .stop-on-found{width:16px;height:16px;vertical-align:middle;cursor:pointer}.ce-offline-searcher .search-tips{position:fixed;top:146px;bottom:30px;left:0;width:100%;background:#fff;z-index:9999}.ce-offline-searcher .search-tips .tips-body{padding:20px;position:absolute;top:70px;left:50%;transform:translate(-50%,-50%);background:#f4f2ff;width:80%;border-radius:6px}.cloud115-page-offline.ce-list-m .list-contents .file-name-wrap .desc-tips{left:75px}.cloud115-page-offline.ce-list-m li.ce-task-trouble .info-hash{left:210px!important}.cloud115-page-offline li .ce-buttons{float:left;margin-right:6px}.cloud115-page-offline .ce-checkbox{width:30px}.cloud115-page-offline .ce-checkbox input{display:block!important;width:20px;height:20px;cursor:pointer}.cloud115-page-offline #js-warp .info-hash{position:absolute;left:47px;top:25px;color:#ababab;cursor:pointer}.cloud115-page-offline #js-warp .info-hash.hover{color:#6ab2ff}.cloud115-page-offline #js-warp li.ce-selected:before{background:#ffe296!important}.cloud115-page-offline #js-warp li.ce-show-checkbox .info-hash{left:60px}.cloud115-page-offline #js-warp li.ce-show-checkbox .file-name{margin-left:15px}.cloud115-page-offline #js-warp li.ce-show-checkbox .file-type{left:25px!important}.cloud115-page-offline #js-warp li .ce-checkbox{width:30px;position:absolute;left:0}.cloud115-page-offline #js-warp li .ce-checkbox input{display:block!important;width:20px;height:20px;cursor:pointer}.cloud115-page-offline #js-warp li .desc-tips{position:absolute;left:60px;top:25px}.cloud115-eh-cleaner-trigger .btn-open{padding:0 6px;vertical-align:text-top;line-height:30px;border-radius:4px;background:#4faa4f}.v-popper.v-popper--theme-dropdown{display:inline-block}.group-manager{width:750px}.group-manager a{font-size:12px;padding:0 4px;margin-right:8px}.group-manager .group-label{color:#fff;font-size:12px;margin-right:10px;border-radius:4px;padding:2px 8px;background:#66acf9}.group-manager .label-readonly{background:#c93c3c;color:#fff;padding:0 4px;border-radius:4px;vertical-align:middle;margin-right:6px}.append-form{background:#fff;width:350px;padding:10px;border-radius:4px}.append-form input,.append-form textarea{width:100%}.group-form{background:#fff;width:540px;padding:10px;border-radius:4px}.group-form input,.group-form textarea{width:100%}.group-form .filter-label{cursor:pointer;padding:0 4px;text-decoration:underline}.group-form input#groupLabel{display:inline-block}.groups-list{background:#fff;width:565px;padding:10px;border-radius:4px;box-shadow:0 0 4px #d8d8d8}.groups-list table th,.groups-list table td{padding:4px 6px}.groups-list ul li{border-bottom:1px solid #eee;padding:4px}.groups-list ul li:nth-last-child(1){border-bottom:none}.groups-list span{display:inline-block}.groups-list .p-index{width:30px}.groups-list .p-label{width:120px}.groups-list .p-actions button{margin-right:8px}.group-confirm-delete{padding:20px}#cloud115Cleaner{margin-left:10px}.cloud115-eh-cleaner .btn-open{padding:0 6px;vertical-align:text-top;line-height:30px;border-radius:4px;background:#4faa4f;display:none}.cloud115-eh-cleaner .actions-bar{padding-bottom:10px}.cloud115-eh-cleaner .actions-bar .title{font-size:18px;font-weight:700;color:#15110c}.cloud115-eh-cleaner .actions-bar .close{margin-left:20px;margin-right:10px;color:#f40}.cloud115-eh-cleaner .actions-bar i.tp-folder{width:18px;height:18px;vertical-align:sub}.cloud115-eh-cleaner-help{position:fixed;top:60px;right:0;bottom:0;width:470px;z-index:1051;padding:10px 10px 150px 8px;background:#fdffdf;overflow-y:auto}.cloud115-eh-cleaner-help ul{list-style:decimal}.cloud115-eh-cleaner-drawer{position:fixed;top:60px;right:0;bottom:0;left:260px;background:#fff;z-index:1050;padding:10px 20px 200px;overflow-y:auto;box-shadow:-2px 2px 6px #bbb}.cloud115-eh-cleaner-drawer.loading{cursor:wait}.cloud115-eh-cleaner-drawer.loading button,.cloud115-eh-cleaner-drawer.loading input{cursor:no-drop;pointer-events:none}.cloud115-eh-cleaner-drawer .config-toggle{display:inline-block;background:#eee;border-radius:4px;opacity:.2;padding:2px 4px;cursor:pointer}.cloud115-eh-cleaner-drawer .config-toggle.hover{opacity:.7}.cloud115-eh-cleaner-drawer .by-box .by-header{padding-bottom:10px}.cloud115-eh-cleaner-drawer .by-box .by-header .title{font-size:16px;margin-right:8px;color:#0078e6;font-weight:400}.cloud115-eh-cleaner-drawer .by-box .by-header .filter-size{width:100px;font-size:14px;font-weight:700;color:#0078e6;text-indent:6px}.cloud115-eh-cleaner-drawer .by-box .pure-button-group{display:inline-block}.cloud115-eh-cleaner-drawer .by-box .pure-button-group .pure-button{vertical-align:inherit}.cloud115-eh-cleaner-drawer .by-box .pattern-groups{width:750px;text-align:right}.cloud115-eh-cleaner-drawer .by-box .pattern-groups a{font-size:12px;padding:0 4px;margin-right:8px}.cloud115-eh-cleaner-drawer .by-box table tr.active{background:#f7ffc3}.cloud115-eh-cleaner-drawer .by-box table tr.is-dir .pattern{color:#f40}.cloud115-eh-cleaner-drawer .by-box table tr th,.cloud115-eh-cleaner-drawer .by-box table tr td{padding:.5em;font-size:12px}.cloud115-eh-cleaner-drawer .by-box table td a{color:#2877f8}.cloud115-eh-cleaner-drawer .by-box table td .tp-folder{width:16px;height:16px;vertical-align:sub}.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-414bf5e0]{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-414bf5e0]{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:4px;text-shadow:0 1px 1px rgba(0,0,0,.2)}.button-success{background:rgb(28,184,65)}.button-error{background:rgb(202,60,60)}.button-warning{background:rgb(223,117,20)}.button-secondary{background:rgb(66,184,221)}.pure-form select{height:2.5em;font-size:12px}.ce-basic-config .pure-form-message{margin-left:82px}.ce-basic-config .avatar-preview{display:inline-block;vertical-align:middle;margin-left:10px}.ce-basic-config .pure-control-group input.input-small{padding:2px 4px;width:auto}.ce-clouddrive-config-item{margin-bottom:20px;border:1px solid #cbcbcb;border-radius:0;padding:4px}.ce-clouddrive-config-item.active{background:#fefcea}.ce-clouddrive-config-item input:not([type]){font-size:12px}.ce-clouddrive-config-item .button-error{float:right}.ce-clouddrive-config .cd-tips a{text-decoration:underline}.ce-clouddrive-config .cd-code{font-size:110%;cursor:pointer;user-select:none}.ce-list-config .pure-control-group label{width: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}.ce-tools-config legend{font-size:16px;color:#1890ff}.menu-basic-config .pure-control-group label,.official-menu-config .pure-form label{width:170px!important}.official-menu-config .pure-form label small{color:#999}.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 .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 h5=Object.defineProperty;var m5=(Qo,Hn,Xo)=>Hn in Qo?h5(Qo,Hn,{enumerable:!0,configurable:!0,writable:!0,value:Xo}):Qo[Hn]=Xo;var _e=(Qo,Hn,Xo)=>(m5(Qo,typeof Hn!="symbol"?Hn+"":Hn,Xo),Xo);(function(){"use strict";const Qo="",Hn="",Xo="",g5="",y5="",w5="",b5="",Xm=typeof btoa=="function",wa=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const zc=typeof TextEncoder=="function"?new TextEncoder:void 0,Zm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Oi=Array.prototype.slice.call(Zm);(e=>{let t={};return e.forEach((n,o)=>t[n]=o),t})(Oi);const fn=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const eg=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),Vc=Xm?e=>btoa(e):wa?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,o,i,s="";const r=e.length%3;for(let a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|o<<8|i,s+=Oi[t>>18&63]+Oi[t>>12&63]+Oi[t>>6&63]+Oi[t&63]}return r?s.slice(0,r-3)+"===".substring(r):s},tg=wa?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let o=0,i=e.length;o<i;o+=4096)n.push(fn.apply(null,e.subarray(o,o+4096)));return Vc(n.join(""))},ng=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?fn(192|t>>>6)+fn(128|t&63):fn(224|t>>>12&15)+fn(128|t>>>6&63)+fn(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return fn(240|t>>>18&7)+fn(128|t>>>12&63)+fn(128|t>>>6&63)+fn(128|t&63)}},og=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ig=e=>e.replace(og,ng),Wc=wa?e=>Buffer.from(e,"utf8").toString("base64"):zc?e=>tg(zc.encode(e)):e=>Vc(ig(e)),Kc=(e,t=!1)=>t?eg(Wc(e)):Wc(e);var bo=window,ba=(()=>bo.GM_setValue)(),sg=(()=>bo.GM_deleteValue)(),rg=(()=>bo.GM_openInTab)(),Os=(()=>bo.GM_registerMenuCommand)(),Gc=(()=>bo.GM_xmlhttpRequest)(),Li=(()=>bo.GM_setClipboard)(),Ls=(()=>bo.GM_getValue)(),qn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ag(e){var t=e.default;if(typeof t=="function"){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),n}var Yc={exports:{}};/*!
* sweetalert2 v11.7.2
* Released under the MIT License.
*/(function(e,t){(function(n,o){e.exports=o()})(qn,function(){var n={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const o="swal2-",i=d=>{const p={};for(const y in d)p[d[y]]=o+d[y];return p},s=i(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),r=i(["success","warning","info","question","error"]),a="SweetAlert2:",l=d=>{const p=[];for(let y=0;y<d.length;y++)p.indexOf(d[y])===-1&&p.push(d[y]);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}`)},g=[],b=d=>{g.includes(d)||(g.push(d),f(d))},_=(d,p)=>{b(`"${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",M=d=>T(d)?d.toPromise():Promise.resolve(d),P=d=>d&&Promise.resolve(d)===d,I=()=>document.body.querySelector(`.${s.container}`),H=d=>{const p=I();return p?p.querySelector(d):null},ie=d=>H(`.${d}`),j=()=>ie(s.popup),Z=()=>ie(s.icon),ce=()=>ie(s["icon-content"]),ye=()=>ie(s.title),Te=()=>ie(s["html-container"]),be=()=>ie(s.image),O=()=>ie(s["progress-steps"]),re=()=>ie(s["validation-message"]),J=()=>H(`.${s.actions} .${s.confirm}`),$e=()=>H(`.${s.actions} .${s.cancel}`),D=()=>H(`.${s.actions} .${s.deny}`),K=()=>ie(s["input-label"]),N=()=>H(`.${s.loader}`),we=()=>ie(s.actions),Ae=()=>ie(s.footer),De=()=>ie(s["timer-progress-bar"]),pe=()=>ie(s.close),ue=`
  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
`,He=()=>{const d=Array.from(j().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((y,x)=>{const U=parseInt(y.getAttribute("tabindex")),Pe=parseInt(x.getAttribute("tabindex"));return U>Pe?1:U<Pe?-1:0}),p=Array.from(j().querySelectorAll(ue)).filter(y=>y.getAttribute("tabindex")!=="-1");return l(d.concat(p)).filter(y=>q(y))},ot=()=>ct(document.body,s.shown)&&!ct(document.body,s["toast-shown"])&&!ct(document.body,s["no-backdrop"]),Me=()=>j()&&ct(j(),s.toast),et=()=>j().hasAttribute("data-loading"),it={previousBodyPadding:null},_t=(d,p)=>{if(d.textContent="",p){const x=new DOMParser().parseFromString(p,"text/html");Array.from(x.querySelector("head").childNodes).forEach(U=>{d.appendChild(U)}),Array.from(x.querySelector("body").childNodes).forEach(U=>{U instanceof HTMLVideoElement||U instanceof HTMLAudioElement?d.appendChild(U.cloneNode(!0)):d.appendChild(U)})}},ct=(d,p)=>{if(!p)return!1;const y=p.split(/\s+/);for(let x=0;x<y.length;x++)if(!d.classList.contains(y[x]))return!1;return!0},wo=(d,p)=>{Array.from(d.classList).forEach(y=>{!Object.values(s).includes(y)&&!Object.values(r).includes(y)&&!Object.values(p.showClass).includes(y)&&d.classList.remove(y)})},yt=(d,p,y)=>{if(wo(d,p),p.customClass&&p.customClass[y]){if(typeof p.customClass[y]!="string"&&!p.customClass[y].forEach){f(`Invalid type of customClass.${y}! Expected string or iterable object, got "${typeof p.customClass[y]}"`);return}R(d,p.customClass[y])}},v=(d,p)=>{if(!p)return null;switch(p){case"select":case"textarea":case"file":return d.querySelector(`.${s.popup} > .${s[p]}`);case"checkbox":return d.querySelector(`.${s.popup} > .${s.checkbox} input`);case"radio":return d.querySelector(`.${s.popup} > .${s.radio} input:checked`)||d.querySelector(`.${s.popup} > .${s.radio} input:first-child`);case"range":return d.querySelector(`.${s.popup} > .${s.range} input`);default:return d.querySelector(`.${s.popup} > .${s.input}`)}},A=d=>{if(d.focus(),d.type!=="file"){const p=d.value;d.value="",d.value=p}},F=(d,p,y)=>{!d||!p||(typeof p=="string"&&(p=p.split(/\s+/).filter(Boolean)),p.forEach(x=>{Array.isArray(d)?d.forEach(U=>{y?U.classList.add(x):U.classList.remove(x)}):y?d.classList.add(x):d.classList.remove(x)}))},R=(d,p)=>{F(d,p,!0)},W=(d,p)=>{F(d,p,!1)},se=(d,p)=>{const y=Array.from(d.children);for(let x=0;x<y.length;x++){const U=y[x];if(U instanceof HTMLElement&&ct(U,p))return U}},he=(d,p,y)=>{y===`${parseInt(y)}`&&(y=parseInt(y)),y||parseInt(y)===0?d.style[p]=typeof y=="number"?`${y}px`:y:d.style.removeProperty(p)},Q=function(d){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"flex";d.style.display=p},ne=d=>{d.style.display="none"},te=(d,p,y,x)=>{const U=d.querySelector(p);U&&(U.style[y]=x)},ve=function(d,p){let y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"flex";p?Q(d,y):ne(d)},q=d=>!!(d&&(d.offsetWidth||d.offsetHeight||d.getClientRects().length)),xe=()=>!q(J())&&!q(D())&&!q($e()),m=d=>d.scrollHeight>d.clientHeight,w=d=>{const p=window.getComputedStyle(d),y=parseFloat(p.getPropertyValue("animation-duration")||"0"),x=parseFloat(p.getPropertyValue("transition-duration")||"0");return y>0||x>0},C=function(d){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const y=De();q(y)&&(p&&(y.style.transition="none",y.style.width="100%"),setTimeout(()=>{y.style.transition=`width ${d/1e3}s linear`,y.style.width="0%"},10))},k=()=>{const d=De(),p=parseInt(window.getComputedStyle(d).width);d.style.removeProperty("transition"),d.style.width="100%";const y=parseInt(window.getComputedStyle(d).width),x=p/y*100;d.style.width=`${x}%`},L=100,S={},V=()=>{S.previousActiveElement instanceof HTMLElement?(S.previousActiveElement.focus(),S.previousActiveElement=null):document.body&&document.body.focus()},G=d=>new Promise(p=>{if(!d)return p();const y=window.scrollX,x=window.scrollY;S.restoreFocusTimeout=setTimeout(()=>{V(),p()},L),window.scrollTo(y,x)}),oe=()=>typeof window>"u"||typeof document>"u",Oe=`
 <div aria-labelledby="${s.title}" aria-describedby="${s["html-container"]}" class="${s.popup}" tabindex="-1">
   <button type="button" class="${s.close}"></button>
   <ul class="${s["progress-steps"]}"></ul>
   <div class="${s.icon}"></div>
   <img class="${s.image}" />
   <h2 class="${s.title}" id="${s.title}"></h2>
   <div class="${s["html-container"]}" id="${s["html-container"]}"></div>
   <input class="${s.input}" />
   <input type="file" class="${s.file}" />
   <div class="${s.range}">
     <input type="range" />
     <output></output>
   </div>
   <select class="${s.select}"></select>
   <div class="${s.radio}"></div>
   <label for="${s.checkbox}" class="${s.checkbox}">
     <input type="checkbox" />
     <span class="${s.label}"></span>
   </label>
   <textarea class="${s.textarea}"></textarea>
   <div class="${s["validation-message"]}" id="${s["validation-message"]}"></div>
   <div class="${s.actions}">
     <div class="${s.loader}"></div>
     <button type="button" class="${s.confirm}"></button>
     <button type="button" class="${s.deny}"></button>
     <button type="button" class="${s.cancel}"></button>
   </div>
   <div class="${s.footer}"></div>
   <div class="${s["timer-progress-bar-container"]}">
     <div class="${s["timer-progress-bar"]}"></div>
   </div>
 </div>
`.replace(/(^|\n)\s*/g,""),Ie=()=>{const d=I();return d?(d.remove(),W([document.documentElement,document.body],[s["no-backdrop"],s["toast-shown"],s["has-column"]]),!0):!1},Ce=()=>{S.currentInstance.resetValidationMessage()},ze=()=>{const d=j(),p=se(d,s.input),y=se(d,s.file),x=d.querySelector(`.${s.range} input`),U=d.querySelector(`.${s.range} output`),Pe=se(d,s.select),Ze=d.querySelector(`.${s.checkbox} input`),Yt=se(d,s.textarea);p.oninput=Ce,y.onchange=Ce,Pe.onchange=Ce,Ze.onchange=Ce,Yt.oninput=Ce,x.oninput=()=>{Ce(),U.value=x.value},x.onchange=()=>{Ce(),U.value=x.value}},Mt=d=>typeof d=="string"?document.querySelector(d):d,Ct=d=>{const p=j();p.setAttribute("role",d.toast?"alert":"dialog"),p.setAttribute("aria-live",d.toast?"polite":"assertive"),d.toast||p.setAttribute("aria-modal","true")},ks=d=>{window.getComputedStyle(d).direction==="rtl"&&R(I(),s.rtl)},Ss=d=>{const p=Ie();if(oe()){h("SweetAlert2 requires document to initialize");return}const y=document.createElement("div");y.className=s.container,p&&R(y,s["no-transition"]),_t(y,Oe);const x=Mt(d.target);x.appendChild(y),Ct(d),ks(x),ze()},Lc=(d,p)=>{d instanceof HTMLElement?p.appendChild(d):typeof d=="object"?VL(d,p):d&&_t(p,d)},VL=(d,p)=>{d.jquery?WL(p,d):_t(p,d.toString())},WL=(d,p)=>{if(d.textContent="",0 in p)for(let y=0;y in p;y++)d.appendChild(p[y].cloneNode(!0));else d.appendChild(p.cloneNode(!0))},As=(()=>{if(oe())return!1;const d=document.createElement("div"),p={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const y in p)if(Object.prototype.hasOwnProperty.call(p,y)&&typeof d.style[y]<"u")return p[y];return!1})(),KL=()=>{const d=document.createElement("div");d.className=s["scrollbar-measure"],document.body.appendChild(d);const p=d.getBoundingClientRect().width-d.clientWidth;return document.body.removeChild(d),p},GL=(d,p)=>{const y=we(),x=N();!p.showConfirmButton&&!p.showDenyButton&&!p.showCancelButton?ne(y):Q(y),yt(y,p,"actions"),YL(y,x,p),_t(x,p.loaderHtml),yt(x,p,"loader")};function YL(d,p,y){const x=J(),U=D(),Pe=$e();Mc(x,"confirm",y),Mc(U,"deny",y),Mc(Pe,"cancel",y),JL(x,U,Pe,y),y.reverseButtons&&(y.toast?(d.insertBefore(Pe,x),d.insertBefore(U,x)):(d.insertBefore(Pe,p),d.insertBefore(U,p),d.insertBefore(x,p)))}function JL(d,p,y,x){if(!x.buttonsStyling){W([d,p,y],s.styled);return}R([d,p,y],s.styled),x.confirmButtonColor&&(d.style.backgroundColor=x.confirmButtonColor,R(d,s["default-outline"])),x.denyButtonColor&&(p.style.backgroundColor=x.denyButtonColor,R(p,s["default-outline"])),x.cancelButtonColor&&(y.style.backgroundColor=x.cancelButtonColor,R(y,s["default-outline"]))}function Mc(d,p,y){ve(d,y[`show${u(p)}Button`],"inline-block"),_t(d,y[`${p}ButtonText`]),d.setAttribute("aria-label",y[`${p}ButtonAriaLabel`]),d.className=s[p],yt(d,y,`${p}Button`),R(d,y[`${p}ButtonClass`])}const QL=(d,p)=>{const y=pe();_t(y,p.closeButtonHtml),yt(y,p,"closeButton"),ve(y,p.showCloseButton),y.setAttribute("aria-label",p.closeButtonAriaLabel)},XL=(d,p)=>{const y=I();!y||(ZL(y,p.backdrop),eM(y,p.position),tM(y,p.grow),yt(y,p,"container"))};function ZL(d,p){typeof p=="string"?d.style.background=p:p||R([document.documentElement,document.body],s["no-backdrop"])}function eM(d,p){p in s?R(d,s[p]):(f('The "position" parameter is not valid, defaulting to "center"'),R(d,s.center))}function tM(d,p){if(p&&typeof p=="string"){const y=`grow-${p}`;y in s&&R(d,s[y])}}const nM=["input","file","range","select","radio","checkbox","textarea"],oM=(d,p)=>{const y=j(),x=n.innerParams.get(d),U=!x||p.input!==x.input;nM.forEach(Pe=>{const Ze=se(y,s[Pe]);rM(Pe,p.inputAttributes),Ze.className=s[Pe],U&&ne(Ze)}),p.input&&(U&&iM(p),aM(p))},iM=d=>{if(!Vt[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=xm(d.input),y=Vt[d.input](p,d);Q(p),d.inputAutoFocus&&setTimeout(()=>{A(y)})},sM=d=>{for(let p=0;p<d.attributes.length;p++){const y=d.attributes[p].name;["type","value","style"].includes(y)||d.removeAttribute(y)}},rM=(d,p)=>{const y=v(j(),d);if(!!y){sM(y);for(const x in p)y.setAttribute(x,p[x])}},aM=d=>{const p=xm(d.input);typeof d.customClass=="object"&&R(p,d.customClass.input)},Dc=(d,p)=>{(!d.placeholder||p.inputPlaceholder)&&(d.placeholder=p.inputPlaceholder)},Ps=(d,p,y)=>{if(y.inputLabel){d.id=s.input;const x=document.createElement("label"),U=s["input-label"];x.setAttribute("for",d.id),x.className=U,typeof y.customClass=="object"&&R(x,y.customClass.inputLabel),x.innerText=y.inputLabel,p.insertAdjacentElement("beforebegin",x)}},xm=d=>se(j(),s[d]||s.input),ha=(d,p)=>{["string","number"].includes(typeof p)?d.value=`${p}`:P(p)||f(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof p}"`)},Vt={};Vt.text=Vt.email=Vt.password=Vt.number=Vt.tel=Vt.url=(d,p)=>(ha(d,p.inputValue),Ps(d,d,p),Dc(d,p),d.type=p.input,d),Vt.file=(d,p)=>(Ps(d,d,p),Dc(d,p),d),Vt.range=(d,p)=>{const y=d.querySelector("input"),x=d.querySelector("output");return ha(y,p.inputValue),y.type=p.input,ha(x,p.inputValue),Ps(y,d,p),d},Vt.select=(d,p)=>{if(d.textContent="",p.inputPlaceholder){const y=document.createElement("option");_t(y,p.inputPlaceholder),y.value="",y.disabled=!0,y.selected=!0,d.appendChild(y)}return Ps(d,d,p),d},Vt.radio=d=>(d.textContent="",d),Vt.checkbox=(d,p)=>{const y=v(j(),"checkbox");y.value="1",y.id=s.checkbox,y.checked=Boolean(p.inputValue);const x=d.querySelector("span");return _t(x,p.inputPlaceholder),y},Vt.textarea=(d,p)=>{ha(d,p.inputValue),Dc(d,p),Ps(d,d,p);const y=x=>parseInt(window.getComputedStyle(x).marginLeft)+parseInt(window.getComputedStyle(x).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const x=parseInt(window.getComputedStyle(j()).width),U=()=>{const Pe=d.offsetWidth+y(d);Pe>x?j().style.width=`${Pe}px`:j().style.width=null};new MutationObserver(U).observe(d,{attributes:!0,attributeFilter:["style"]})}}),d};const lM=(d,p)=>{const y=Te();yt(y,p,"htmlContainer"),p.html?(Lc(p.html,y),Q(y,"block")):p.text?(y.textContent=p.text,Q(y,"block")):ne(y),oM(d,p)},cM=(d,p)=>{const y=Ae();ve(y,p.footer),p.footer&&Lc(p.footer,y),yt(y,p,"footer")},uM=(d,p)=>{const y=n.innerParams.get(d),x=Z();if(y&&p.icon===y.icon){$m(x,p),Cm(x,p);return}if(!p.icon&&!p.iconHtml){ne(x);return}if(p.icon&&Object.keys(r).indexOf(p.icon)===-1){h(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${p.icon}"`),ne(x);return}Q(x),$m(x,p),Cm(x,p),R(x,p.showClass.icon)},Cm=(d,p)=>{for(const y in r)p.icon!==y&&W(d,r[y]);R(d,r[p.icon]),hM(d,p),dM(),yt(d,p,"icon")},dM=()=>{const d=j(),p=window.getComputedStyle(d).getPropertyValue("background-color"),y=d.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let x=0;x<y.length;x++)y[x].style.backgroundColor=p},fM=`
  <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>
`,pM=`
  <span class="swal2-x-mark">
    <span class="swal2-x-mark-line-left"></span>
    <span class="swal2-x-mark-line-right"></span>
  </span>
`,$m=(d,p)=>{let y=d.innerHTML,x;p.iconHtml?x=Em(p.iconHtml):p.icon==="success"?(x=fM,y=y.replace(/ style=".*?"/g,"")):p.icon==="error"?x=pM:x=Em({question:"?",warning:"!",info:"i"}[p.icon]),y.trim()!==x.trim()&&_t(d,x)},hM=(d,p)=>{if(!!p.iconColor){d.style.color=p.iconColor,d.style.borderColor=p.iconColor;for(const y of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])te(d,y,"backgroundColor",p.iconColor);te(d,".swal2-success-ring","borderColor",p.iconColor)}},Em=d=>`<div class="${s["icon-content"]}">${d}</div>`,mM=(d,p)=>{const y=be();if(!p.imageUrl){ne(y);return}Q(y,""),y.setAttribute("src",p.imageUrl),y.setAttribute("alt",p.imageAlt),he(y,"width",p.imageWidth),he(y,"height",p.imageHeight),y.className=s.image,yt(y,p,"image")},gM=(d,p)=>{const y=I(),x=j();p.toast?(he(y,"width",p.width),x.style.width="100%",x.insertBefore(N(),Z())):he(x,"width",p.width),he(x,"padding",p.padding),p.color&&(x.style.color=p.color),p.background&&(x.style.background=p.background),ne(re()),yM(x,p)},yM=(d,p)=>{d.className=`${s.popup} ${q(d)?p.showClass.popup:""}`,p.toast?(R([document.documentElement,document.body],s["toast-shown"]),R(d,s.toast)):R(d,s.modal),yt(d,p,"popup"),typeof p.customClass=="string"&&R(d,p.customClass),p.icon&&R(d,s[`icon-${p.icon}`])},wM=(d,p)=>{const y=O();if(!p.progressSteps||p.progressSteps.length===0){ne(y);return}Q(y),y.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((x,U)=>{const Pe=bM(x);if(y.appendChild(Pe),U===p.currentProgressStep&&R(Pe,s["active-progress-step"]),U!==p.progressSteps.length-1){const Ze=_M(p);y.appendChild(Ze)}})},bM=d=>{const p=document.createElement("li");return R(p,s["progress-step"]),_t(p,d),p},_M=d=>{const p=document.createElement("li");return R(p,s["progress-step-line"]),d.progressStepsDistance&&he(p,"width",d.progressStepsDistance),p},vM=(d,p)=>{const y=ye();ve(y,p.title||p.titleText,"block"),p.title&&Lc(p.title,y),p.titleText&&(y.innerText=p.titleText),yt(y,p,"title")},km=(d,p)=>{gM(d,p),XL(d,p),wM(d,p),uM(d,p),mM(d,p),vM(d,p),QL(d,p),lM(d,p),GL(d,p),cM(d,p),typeof p.didRender=="function"&&p.didRender(j())};function Sm(){const d=n.innerParams.get(this);if(!d)return;const p=n.domCache.get(this);ne(p.loader),Me()?d.icon&&Q(Z()):xM(p),W([p.popup,p.actions],s.loading),p.popup.removeAttribute("aria-busy"),p.popup.removeAttribute("data-loading"),p.confirmButton.disabled=!1,p.denyButton.disabled=!1,p.cancelButton.disabled=!1}const xM=d=>{const p=d.popup.getElementsByClassName(d.loader.getAttribute("data-button-to-replace"));p.length?Q(p[0],"inline-block"):xe()&&ne(d.actions)};function CM(d){const p=n.innerParams.get(d||this),y=n.domCache.get(d||this);return y?v(y.popup,p.input):null}const $M=()=>q(j()),Am=()=>J()&&J().click(),EM=()=>D()&&D().click(),kM=()=>$e()&&$e().click(),Si=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Pm=d=>{d.keydownTarget&&d.keydownHandlerAdded&&(d.keydownTarget.removeEventListener("keydown",d.keydownHandler,{capture:d.keydownListenerCapture}),d.keydownHandlerAdded=!1)},SM=(d,p,y,x)=>{Pm(p),y.toast||(p.keydownHandler=U=>PM(d,U,x),p.keydownTarget=y.keydownListenerCapture?window:j(),p.keydownListenerCapture=y.keydownListenerCapture,p.keydownTarget.addEventListener("keydown",p.keydownHandler,{capture:p.keydownListenerCapture}),p.keydownHandlerAdded=!0)},Rc=(d,p)=>{const y=He();if(y.length){d=d+p,d===y.length?d=0:d===-1&&(d=y.length-1),y[d].focus();return}j().focus()},Tm=["ArrowRight","ArrowDown"],AM=["ArrowLeft","ArrowUp"],PM=(d,p,y)=>{const x=n.innerParams.get(d);!x||p.isComposing||p.keyCode===229||(x.stopKeydownPropagation&&p.stopPropagation(),p.key==="Enter"?TM(d,p,x):p.key==="Tab"?IM(p):[...Tm,...AM].includes(p.key)?OM(p.key):p.key==="Escape"&&LM(p,x,y))},TM=(d,p,y)=>{if(!!E(y.allowEnterKey)&&p.target&&d.getInput()&&p.target instanceof HTMLElement&&p.target.outerHTML===d.getInput().outerHTML){if(["textarea","file"].includes(y.input))return;Am(),p.preventDefault()}},IM=d=>{const p=d.target,y=He();let x=-1;for(let U=0;U<y.length;U++)if(p===y[U]){x=U;break}d.shiftKey?Rc(x,-1):Rc(x,1),d.stopPropagation(),d.preventDefault()},OM=d=>{const p=J(),y=D(),x=$e(),U=[p,y,x];if(document.activeElement instanceof HTMLElement&&!U.includes(document.activeElement))return;const Pe=Tm.includes(d)?"nextElementSibling":"previousElementSibling";let Ze=document.activeElement;for(let Yt=0;Yt<we().children.length;Yt++){if(Ze=Ze[Pe],!Ze)return;if(Ze instanceof HTMLButtonElement&&q(Ze))break}Ze instanceof HTMLButtonElement&&Ze.focus()},LM=(d,p,y)=>{E(p.allowEscapeKey)&&(d.preventDefault(),y(Si.esc))};var Ts={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const MM=()=>{Array.from(document.body.children).forEach(p=>{p===I()||p.contains(I())||(p.hasAttribute("aria-hidden")&&p.setAttribute("data-previous-aria-hidden",p.getAttribute("aria-hidden")),p.setAttribute("aria-hidden","true"))})},Im=()=>{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")})},DM=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!ct(document.body,s.iosfix)){const p=document.body.scrollTop;document.body.style.top=`${p*-1}px`,R(document.body,s.iosfix),NM(),RM()}},RM=()=>{const d=navigator.userAgent,p=!!d.match(/iPad/i)||!!d.match(/iPhone/i),y=!!d.match(/WebKit/i);p&&y&&!d.match(/CriOS/i)&&j().scrollHeight>window.innerHeight-44&&(I().style.paddingBottom=`${44}px`)},NM=()=>{const d=I();let p;d.ontouchstart=y=>{p=BM(y)},d.ontouchmove=y=>{p&&(y.preventDefault(),y.stopPropagation())}},BM=d=>{const p=d.target,y=I();return FM(d)||jM(d)?!1:p===y||!m(y)&&p instanceof HTMLElement&&p.tagName!=="INPUT"&&p.tagName!=="TEXTAREA"&&!(m(Te())&&Te().contains(p))},FM=d=>d.touches&&d.touches.length&&d.touches[0].touchType==="stylus",jM=d=>d.touches&&d.touches.length>1,UM=()=>{if(ct(document.body,s.iosfix)){const d=parseInt(document.body.style.top,10);W(document.body,s.iosfix),document.body.style.top="",document.body.scrollTop=d*-1}},HM=()=>{it.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(it.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${it.previousBodyPadding+KL()}px`)},qM=()=>{it.previousBodyPadding!==null&&(document.body.style.paddingRight=`${it.previousBodyPadding}px`,it.previousBodyPadding=null)};function Om(d,p,y,x){Me()?Lm(d,x):(G(y).then(()=>Lm(d,x)),Pm(S)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(p.setAttribute("style","display:none !important"),p.removeAttribute("class"),p.innerHTML=""):p.remove(),ot()&&(qM(),UM(),Im()),zM()}function zM(){W([document.documentElement,document.body],[s.shown,s["height-auto"],s["no-backdrop"],s["toast-shown"]])}function ma(d){d=GM(d);const p=Ts.swalPromiseResolve.get(this),y=WM(this);this.isAwaitingPromise()?d.isDismissed||(Is(this),p(d)):y&&p(d)}function VM(){return!!n.awaitingPromise.get(this)}const WM=d=>{const p=j();if(!p)return!1;const y=n.innerParams.get(d);if(!y||ct(p,y.hideClass.popup))return!1;W(p,y.showClass.popup),R(p,y.hideClass.popup);const x=I();return W(x,y.showClass.backdrop),R(x,y.hideClass.backdrop),YM(d,p,y),!0};function KM(d){const p=Ts.swalPromiseReject.get(this);Is(this),p&&p(d)}const Is=d=>{d.isAwaitingPromise()&&(n.awaitingPromise.delete(d),n.innerParams.get(d)||d._destroy())},GM=d=>typeof d>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},d),YM=(d,p,y)=>{const x=I(),U=As&&w(p);typeof y.willClose=="function"&&y.willClose(p),U?JM(d,p,x,y.returnFocus,y.didClose):Om(d,x,y.returnFocus,y.didClose)},JM=(d,p,y,x,U)=>{S.swalCloseEventFinishedCallback=Om.bind(null,d,y,x,U),p.addEventListener(As,function(Pe){Pe.target===p&&(S.swalCloseEventFinishedCallback(),delete S.swalCloseEventFinishedCallback)})},Lm=(d,p)=>{setTimeout(()=>{typeof p=="function"&&p.bind(d.params)(),d._destroy()})};function Mm(d,p,y){const x=n.domCache.get(d);p.forEach(U=>{x[U].disabled=y})}function Dm(d,p){if(!!d)if(d.type==="radio"){const x=d.parentNode.parentNode.querySelectorAll("input");for(let U=0;U<x.length;U++)x[U].disabled=p}else d.disabled=p}function QM(){Mm(this,["confirmButton","denyButton","cancelButton"],!1)}function XM(){Mm(this,["confirmButton","denyButton","cancelButton"],!0)}function ZM(){Dm(this.getInput(),!1)}function eD(){Dm(this.getInput(),!0)}function tD(d){const p=n.domCache.get(this),y=n.innerParams.get(this);_t(p.validationMessage,d),p.validationMessage.className=s["validation-message"],y.customClass&&y.customClass.validationMessage&&R(p.validationMessage,y.customClass.validationMessage),Q(p.validationMessage);const x=this.getInput();x&&(x.setAttribute("aria-invalid",!0),x.setAttribute("aria-describedby",s["validation-message"]),A(x),R(x,s.inputerror))}function nD(){const d=n.domCache.get(this);d.validationMessage&&ne(d.validationMessage);const p=this.getInput();p&&(p.removeAttribute("aria-invalid"),p.removeAttribute("aria-describedby"),W(p,s.inputerror))}const Ai={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},oD=["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"],iD={},sD=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Rm=d=>Object.prototype.hasOwnProperty.call(Ai,d),Nm=d=>oD.indexOf(d)!==-1,Nc=d=>iD[d],rD=d=>{Rm(d)||f(`Unknown parameter "${d}"`)},aD=d=>{sD.includes(d)&&f(`The parameter "${d}" is incompatible with toasts`)},lD=d=>{Nc(d)&&_(d,Nc(d))},cD=d=>{d.backdrop===!1&&d.allowOutsideClick&&f('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const p in d)rD(p),d.toast&&aD(p),lD(p)};function uD(d){const p=j(),y=n.innerParams.get(this);if(!p||ct(p,y.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 x=dD(d),U=Object.assign({},y,x);km(this,U),n.innerParams.set(this,U),Object.defineProperties(this,{params:{value:Object.assign({},this.params,d),writable:!1,enumerable:!0}})}const dD=d=>{const p={};return Object.keys(d).forEach(y=>{Nm(y)?p[y]=d[y]:f(`Invalid parameter to update: ${y}`)}),p};function fD(){const d=n.domCache.get(this),p=n.innerParams.get(this);if(!p){Bm(this);return}d.popup&&S.swalCloseEventFinishedCallback&&(S.swalCloseEventFinishedCallback(),delete S.swalCloseEventFinishedCallback),typeof p.didDestroy=="function"&&p.didDestroy(),pD(this)}const pD=d=>{Bm(d),delete d.params,delete S.keydownHandler,delete S.keydownTarget,delete S.currentInstance},Bm=d=>{d.isAwaitingPromise()?(Bc(n,d),n.awaitingPromise.set(d,!0)):(Bc(Ts,d),Bc(n,d))},Bc=(d,p)=>{for(const y in d)d[y].delete(p)};var Fm=Object.freeze({__proto__:null,_destroy:fD,close:ma,closeModal:ma,closePopup:ma,closeToast:ma,disableButtons:XM,disableInput:eD,disableLoading:Sm,enableButtons:QM,enableInput:ZM,getInput:CM,handleAwaitingPromise:Is,hideLoading:Sm,isAwaitingPromise:VM,rejectPromise:KM,resetValidationMessage:nD,showValidationMessage:tD,update:uD});const Pi=d=>{let p=j();p||new ya,p=j();const y=N();Me()?ne(Z()):hD(p,d),Q(y),p.setAttribute("data-loading","true"),p.setAttribute("aria-busy","true"),p.focus()},hD=(d,p)=>{const y=we(),x=N();!p&&q(J())&&(p=J()),Q(y),p&&(ne(p),x.setAttribute("data-button-to-replace",p.className)),x.parentNode.insertBefore(x,p),R([d,y],s.loading)},mD=(d,p)=>{p.input==="select"||p.input==="radio"?_D(d,p):["text","email","number","tel","textarea"].includes(p.input)&&(T(p.inputValue)||P(p.inputValue))&&(Pi(J()),vD(d,p))},gD=(d,p)=>{const y=d.getInput();if(!y)return null;switch(p.input){case"checkbox":return yD(y);case"radio":return wD(y);case"file":return bD(y);default:return p.inputAutoTrim?y.value.trim():y.value}},yD=d=>d.checked?1:0,wD=d=>d.checked?d.value:null,bD=d=>d.files.length?d.getAttribute("multiple")!==null?d.files:d.files[0]:null,_D=(d,p)=>{const y=j(),x=U=>{xD[p.input](y,Fc(U),p)};T(p.inputOptions)||P(p.inputOptions)?(Pi(J()),M(p.inputOptions).then(U=>{d.hideLoading(),x(U)})):typeof p.inputOptions=="object"?x(p.inputOptions):h(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof p.inputOptions}`)},vD=(d,p)=>{const y=d.getInput();ne(y),M(p.inputValue).then(x=>{y.value=p.input==="number"?`${parseFloat(x)||0}`:`${x}`,Q(y),y.focus(),d.hideLoading()}).catch(x=>{h(`Error in inputValue promise: ${x}`),y.value="",Q(y),y.focus(),d.hideLoading()})},xD={select:(d,p,y)=>{const x=se(d,s.select),U=(Pe,Ze,Yt)=>{const Dt=document.createElement("option");Dt.value=Yt,_t(Dt,Ze),Dt.selected=jm(Yt,y.inputValue),Pe.appendChild(Dt)};p.forEach(Pe=>{const Ze=Pe[0],Yt=Pe[1];if(Array.isArray(Yt)){const Dt=document.createElement("optgroup");Dt.label=Ze,Dt.disabled=!1,x.appendChild(Dt),Yt.forEach(Ii=>U(Dt,Ii[1],Ii[0]))}else U(x,Yt,Ze)}),x.focus()},radio:(d,p,y)=>{const x=se(d,s.radio);p.forEach(Pe=>{const Ze=Pe[0],Yt=Pe[1],Dt=document.createElement("input"),Ii=document.createElement("label");Dt.type="radio",Dt.name=s.radio,Dt.value=Ze,jm(Ze,y.inputValue)&&(Dt.checked=!0);const qc=document.createElement("span");_t(qc,Yt),qc.className=s.label,Ii.appendChild(Dt),Ii.appendChild(qc),x.appendChild(Ii)});const U=x.querySelectorAll("input");U.length&&U[0].focus()}},Fc=d=>{const p=[];return typeof Map<"u"&&d instanceof Map?d.forEach((y,x)=>{let U=y;typeof U=="object"&&(U=Fc(U)),p.push([x,U])}):Object.keys(d).forEach(y=>{let x=d[y];typeof x=="object"&&(x=Fc(x)),p.push([y,x])}),p},jm=(d,p)=>p&&p.toString()===d.toString(),CD=d=>{const p=n.innerParams.get(d);d.disableButtons(),p.input?Um(d,"confirm"):Uc(d,!0)},$D=d=>{const p=n.innerParams.get(d);d.disableButtons(),p.returnInputValueOnDeny?Um(d,"deny"):jc(d,!1)},ED=(d,p)=>{d.disableButtons(),p(Si.cancel)},Um=(d,p)=>{const y=n.innerParams.get(d);if(!y.input){h(`The "input" parameter is needed to be set when using returnInputValueOn${u(p)}`);return}const x=gD(d,y);y.inputValidator?kD(d,x,p):d.getInput().checkValidity()?p==="deny"?jc(d,x):Uc(d,x):(d.enableButtons(),d.showValidationMessage(y.validationMessage))},kD=(d,p,y)=>{const x=n.innerParams.get(d);d.disableInput(),Promise.resolve().then(()=>M(x.inputValidator(p,x.validationMessage))).then(Pe=>{d.enableButtons(),d.enableInput(),Pe?d.showValidationMessage(Pe):y==="deny"?jc(d,p):Uc(d,p)})},jc=(d,p)=>{const y=n.innerParams.get(d||void 0);y.showLoaderOnDeny&&Pi(D()),y.preDeny?(n.awaitingPromise.set(d||void 0,!0),Promise.resolve().then(()=>M(y.preDeny(p,y.validationMessage))).then(U=>{U===!1?(d.hideLoading(),Is(d)):d.close({isDenied:!0,value:typeof U>"u"?p:U})}).catch(U=>qm(d||void 0,U))):d.close({isDenied:!0,value:p})},Hm=(d,p)=>{d.close({isConfirmed:!0,value:p})},qm=(d,p)=>{d.rejectPromise(p)},Uc=(d,p)=>{const y=n.innerParams.get(d||void 0);y.showLoaderOnConfirm&&Pi(),y.preConfirm?(d.resetValidationMessage(),n.awaitingPromise.set(d||void 0,!0),Promise.resolve().then(()=>M(y.preConfirm(p,y.validationMessage))).then(U=>{q(re())||U===!1?(d.hideLoading(),Is(d)):Hm(d,typeof U>"u"?p:U)}).catch(U=>qm(d||void 0,U))):Hm(d,p)},SD=(d,p,y)=>{n.innerParams.get(d).toast?AD(d,p,y):(TD(p),ID(p),OD(d,p,y))},AD=(d,p,y)=>{p.popup.onclick=()=>{const x=n.innerParams.get(d);x&&(PD(x)||x.timer||x.input)||y(Si.close)}},PD=d=>d.showConfirmButton||d.showDenyButton||d.showCancelButton||d.showCloseButton;let ga=!1;const TD=d=>{d.popup.onmousedown=()=>{d.container.onmouseup=function(p){d.container.onmouseup=void 0,p.target===d.container&&(ga=!0)}}},ID=d=>{d.container.onmousedown=()=>{d.popup.onmouseup=function(p){d.popup.onmouseup=void 0,(p.target===d.popup||d.popup.contains(p.target))&&(ga=!0)}}},OD=(d,p,y)=>{p.container.onclick=x=>{const U=n.innerParams.get(d);if(ga){ga=!1;return}x.target===p.container&&E(U.allowOutsideClick)&&y(Si.backdrop)}},LD=d=>typeof d=="object"&&d.jquery,zm=d=>d instanceof Element||LD(d),MD=d=>{const p={};return typeof d[0]=="object"&&!zm(d[0])?Object.assign(p,d[0]):["title","html","icon"].forEach((y,x)=>{const U=d[x];typeof U=="string"||zm(U)?p[y]=U:U!==void 0&&h(`Unexpected type of ${y}! Expected "string" or "Element", got ${typeof U}`)}),p};function DD(){const d=this;for(var p=arguments.length,y=new Array(p),x=0;x<p;x++)y[x]=arguments[x];return new d(...y)}function RD(d){class p extends this{_main(x,U){return super._main(x,Object.assign({},d,U))}}return p}const ND=()=>S.timeout&&S.timeout.getTimerLeft(),Vm=()=>{if(S.timeout)return k(),S.timeout.stop()},Wm=()=>{if(S.timeout){const d=S.timeout.start();return C(d),d}},BD=()=>{const d=S.timeout;return d&&(d.running?Vm():Wm())},FD=d=>{if(S.timeout){const p=S.timeout.increase(d);return C(p,!0),p}},jD=()=>S.timeout&&S.timeout.isRunning();let Km=!1;const Hc={};function UD(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";Hc[d]=this,Km||(document.body.addEventListener("click",HD),Km=!0)}const HD=d=>{for(let p=d.target;p&&p!==document;p=p.parentNode)for(const y in Hc){const x=p.getAttribute(y);if(x){Hc[y].fire({template:x});return}}};var qD=Object.freeze({__proto__:null,argsToParams:MD,bindClickHandler:UD,clickCancel:kM,clickConfirm:Am,clickDeny:EM,enableLoading:Pi,fire:DD,getActions:we,getCancelButton:$e,getCloseButton:pe,getConfirmButton:J,getContainer:I,getDenyButton:D,getFocusableElements:He,getFooter:Ae,getHtmlContainer:Te,getIcon:Z,getIconContent:ce,getImage:be,getInputLabel:K,getLoader:N,getPopup:j,getProgressSteps:O,getTimerLeft:ND,getTimerProgressBar:De,getTitle:ye,getValidationMessage:re,increaseTimer:FD,isDeprecatedParameter:Nc,isLoading:et,isTimerRunning:jD,isUpdatableParameter:Nm,isValidParameter:Rm,isVisible:$M,mixin:RD,resumeTimer:Wm,showLoading:Pi,stopTimer:Vm,toggleTimer:BD});class zD{constructor(p,y){this.callback=p,this.remaining=y,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 y=this.running;return y&&this.stop(),this.remaining+=p,y&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const Gm=["swal-title","swal-html","swal-footer"],VD=d=>{const p=typeof d.template=="string"?document.querySelector(d.template):d.template;if(!p)return{};const y=p.content;return ZD(y),Object.assign(WD(y),KD(y),GD(y),YD(y),JD(y),QD(y),XD(y,Gm))},WD=d=>{const p={};return Array.from(d.querySelectorAll("swal-param")).forEach(x=>{Jo(x,["name","value"]);const U=x.getAttribute("name"),Pe=x.getAttribute("value");typeof Ai[U]=="boolean"?p[U]=Pe!=="false":typeof Ai[U]=="object"?p[U]=JSON.parse(Pe):p[U]=Pe}),p},KD=d=>{const p={};return Array.from(d.querySelectorAll("swal-function-param")).forEach(x=>{const U=x.getAttribute("name"),Pe=x.getAttribute("value");p[U]=new Function(`return ${Pe}`)()}),p},GD=d=>{const p={};return Array.from(d.querySelectorAll("swal-button")).forEach(x=>{Jo(x,["type","color","aria-label"]);const U=x.getAttribute("type");p[`${U}ButtonText`]=x.innerHTML,p[`show${u(U)}Button`]=!0,x.hasAttribute("color")&&(p[`${U}ButtonColor`]=x.getAttribute("color")),x.hasAttribute("aria-label")&&(p[`${U}ButtonAriaLabel`]=x.getAttribute("aria-label"))}),p},YD=d=>{const p={},y=d.querySelector("swal-image");return y&&(Jo(y,["src","width","height","alt"]),y.hasAttribute("src")&&(p.imageUrl=y.getAttribute("src")),y.hasAttribute("width")&&(p.imageWidth=y.getAttribute("width")),y.hasAttribute("height")&&(p.imageHeight=y.getAttribute("height")),y.hasAttribute("alt")&&(p.imageAlt=y.getAttribute("alt"))),p},JD=d=>{const p={},y=d.querySelector("swal-icon");return y&&(Jo(y,["type","color"]),y.hasAttribute("type")&&(p.icon=y.getAttribute("type")),y.hasAttribute("color")&&(p.iconColor=y.getAttribute("color")),p.iconHtml=y.innerHTML),p},QD=d=>{const p={},y=d.querySelector("swal-input");y&&(Jo(y,["type","label","placeholder","value"]),p.input=y.getAttribute("type")||"text",y.hasAttribute("label")&&(p.inputLabel=y.getAttribute("label")),y.hasAttribute("placeholder")&&(p.inputPlaceholder=y.getAttribute("placeholder")),y.hasAttribute("value")&&(p.inputValue=y.getAttribute("value")));const x=Array.from(d.querySelectorAll("swal-input-option"));return x.length&&(p.inputOptions={},x.forEach(U=>{Jo(U,["value"]);const Pe=U.getAttribute("value"),Ze=U.innerHTML;p.inputOptions[Pe]=Ze})),p},XD=(d,p)=>{const y={};for(const x in p){const U=p[x],Pe=d.querySelector(U);Pe&&(Jo(Pe,[]),y[U.replace(/^swal-/,"")]=Pe.innerHTML.trim())}return y},ZD=d=>{const p=Gm.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(d.children).forEach(y=>{const x=y.tagName.toLowerCase();p.includes(x)||f(`Unrecognized element <${x}>`)})},Jo=(d,p)=>{Array.from(d.attributes).forEach(y=>{p.indexOf(y.name)===-1&&f([`Unrecognized attribute "${y.name}" on <${d.tagName.toLowerCase()}>.`,`${p.length?`Allowed attributes are: ${p.join(", ")}`:"To set the value, use HTML within the element."}`])})},Ym=10,e5=d=>{const p=I(),y=j();typeof d.willOpen=="function"&&d.willOpen(y);const U=window.getComputedStyle(document.body).overflowY;o5(p,y,d),setTimeout(()=>{t5(p,y)},Ym),ot()&&(n5(p,d.scrollbarPadding,U),MM()),!Me()&&!S.previousActiveElement&&(S.previousActiveElement=document.activeElement),typeof d.didOpen=="function"&&setTimeout(()=>d.didOpen(y)),W(p,s["no-transition"])},Jm=d=>{const p=j();if(d.target!==p)return;const y=I();p.removeEventListener(As,Jm),y.style.overflowY="auto"},t5=(d,p)=>{As&&w(p)?(d.style.overflowY="hidden",p.addEventListener(As,Jm)):d.style.overflowY="auto"},n5=(d,p,y)=>{DM(),p&&y!=="hidden"&&HM(),setTimeout(()=>{d.scrollTop=0})},o5=(d,p,y)=>{R(d,y.showClass.backdrop),p.style.setProperty("opacity","0","important"),Q(p,"grid"),setTimeout(()=>{R(p,y.showClass.popup),p.style.removeProperty("opacity")},Ym),R([document.documentElement,document.body],s.shown),y.heightAuto&&y.backdrop&&!y.toast&&R([document.documentElement,document.body],s["height-auto"])};var Qm={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 i5(d){d.inputValidator||Object.keys(Qm).forEach(p=>{d.input===p&&(d.inputValidator=Qm[p])})}function s5(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 r5(d){i5(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`),s5(d),typeof d.title=="string"&&(d.title=d.title.split(`
`).join("<br />")),Ss(d)}let $n;class Ti{constructor(){if(typeof window>"u")return;$n=this;for(var p=arguments.length,y=new Array(p),x=0;x<p;x++)y[x]=arguments[x];const U=Object.freeze(this.constructor.argsToParams(y));Object.defineProperties(this,{params:{value:U,writable:!1,enumerable:!0,configurable:!0}});const Pe=$n._main($n.params);n.promise.set(this,Pe)}_main(p){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};cD(Object.assign({},y,p)),S.currentInstance&&(S.currentInstance._destroy(),ot()&&Im()),S.currentInstance=$n;const x=l5(p,y);r5(x),Object.freeze(x),S.timeout&&(S.timeout.stop(),delete S.timeout),clearTimeout(S.restoreFocusTimeout);const U=c5($n);return km($n,x),n.innerParams.set($n,x),a5($n,U,x)}then(p){return n.promise.get(this).then(p)}finally(p){return n.promise.get(this).finally(p)}}const a5=(d,p,y)=>new Promise((x,U)=>{const Pe=Ze=>{d.close({isDismissed:!0,dismiss:Ze})};Ts.swalPromiseResolve.set(d,x),Ts.swalPromiseReject.set(d,U),p.confirmButton.onclick=()=>{CD(d)},p.denyButton.onclick=()=>{$D(d)},p.cancelButton.onclick=()=>{ED(d,Pe)},p.closeButton.onclick=()=>{Pe(Si.close)},SD(d,p,Pe),SM(d,S,y,Pe),mD(d,y),e5(y),u5(S,y,Pe),d5(p,y),setTimeout(()=>{p.container.scrollTop=0})}),l5=(d,p)=>{const y=VD(d),x=Object.assign({},Ai,p,y,d);return x.showClass=Object.assign({},Ai.showClass,x.showClass),x.hideClass=Object.assign({},Ai.hideClass,x.hideClass),x},c5=d=>{const p={popup:j(),container:I(),actions:we(),confirmButton:J(),denyButton:D(),cancelButton:$e(),loader:N(),closeButton:pe(),validationMessage:re(),progressSteps:O()};return n.domCache.set(d,p),p},u5=(d,p,y)=>{const x=De();ne(x),p.timer&&(d.timeout=new zD(()=>{y("timer"),delete d.timeout},p.timer),p.timerProgressBar&&(Q(x),yt(x,p,"timerProgressBar"),setTimeout(()=>{d.timeout&&d.timeout.running&&C(p.timer)})))},d5=(d,p)=>{if(!p.toast){if(!E(p.allowEnterKey)){p5();return}f5(d,p)||Rc(-1,1)}},f5=(d,p)=>p.focusDeny&&q(d.denyButton)?(d.denyButton.focus(),!0):p.focusCancel&&q(d.cancelButton)?(d.cancelButton.focus(),!0):p.focusConfirm&&q(d.confirmButton)?(d.confirmButton.focus(),!0):!1,p5=()=>{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 y=document.createElement("audio");y.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",y.loop=!0,document.body.appendChild(y),setTimeout(()=>{y.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation",`${d}`)}Object.assign(Ti.prototype,Fm),Object.assign(Ti,qD),Object.keys(Fm).forEach(d=>{Ti[d]=function(){if($n)return $n[d](...arguments)}}),Ti.DismissReason=Si,Ti.version="11.7.2";const ya=Ti;return ya.default=ya,ya}),typeof qn<"u"&&qn.Sweetalert2&&(qn.swal=qn.sweetAlert=qn.Swal=qn.SweetAlert=qn.Sweetalert2),typeof document<"u"&&function(n,o){var i=n.createElement("style");if(n.getElementsByTagName("head")[0].appendChild(i),i.styleSheet)i.styleSheet.disabled||(i.styleSheet.cssText=o);else try{i.innerHTML=o}catch{i.innerText=o}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start     top            top-end" "center-start  center         center-end" "bottom-start  bottom-center  bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:rgba(0,0,0,0) !important}.swal2-container.swal2-top-start,.swal2-container.swal2-center-start,.swal2-container.swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}.swal2-container.swal2-top,.swal2-container.swal2-center,.swal2-container.swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}.swal2-container.swal2-top-end,.swal2-container.swal2-center-end,.swal2-container.swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-start>.swal2-popup,.swal2-container.swal2-center-left>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-start>.swal2-popup,.swal2-container.swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-row>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none !important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:none}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:rgba(0,0,0,0);color:#f27474}.swal2-close:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-input,.swal2-file,.swal2-textarea,.swal2-select,.swal2-radio,.swal2-checkbox{margin:1em 2em 3px}.swal2-input,.swal2-file,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-input.swal2-inputerror,.swal2-file.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}.swal2-input:focus,.swal2-file:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-input::placeholder,.swal2-file::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-radio,.swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-radio label,.swal2-checkbox label{margin:0 .6em;font-size:1.125em}.swal2-radio input,.swal2-checkbox input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}')})(Yc);const me=Yc.exports,lg=["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"],cg=["jpg","jpeg","png","gif","bmp","svg"],ug=["mp3","wav","wma","ogg","ape","flac","aac"];function Jc(e){return JSON.parse(JSON.stringify(e))}function Ms(e,...t){return new e(t[0])}async function dg(e){return new Promise((t,n)=>{Gc({onload:o=>t(o),onerror:o=>n(o),...e})})}function Mi(){return Math.floor(Date.now()/1e3)}function Di(e,t,n="text/plain"){const o=document.createElement("a");document.body.appendChild(o),o.setAttribute("style","display:none");const i=new Blob([e],{type:n}),s=window.URL.createObjectURL(i);o.href=s,o.download=t,o.click(),window.URL.revokeObjectURL(s)}function nn(e){if(typeof Li=="function")return Li(e,"text"),!0;const t=n=>{var o;(o=n.clipboardData)==null||o.setData("text/plain",e),n.preventDefault(),document.removeEventListener("copy",t)};return document.addEventListener("copy",t),document.execCommand("copy")}function Qc(e,t){return e=e.replace(/^[\/]+/g,""),t?"/"+e:e}function Xc(e){return/^magnet:\?xt=urn:btih/.test(e)}function Zc(e){return/^ed2k:\/\/\|file\|/.test(e)}function eu(e){return`magnet:?xt=urn:btih:${e.toUpperCase()}`}function tu(e){const t=e.match(/([a-z\d]{32,40})/i);return t?t[1]:""}function fg(e,t=!0){return(t?/^([a-z\d]{32})$|^([a-z\d]{40})$/i:/^[a-z\d]{32,40}$/i).test(e)}function nu(e,t=location.href){const n=new RegExp("(\\?|#|&)"+e+"=([^&#]*)(&|#|$)"),o=t.match(n);return o?o[2]:""}function Ds(e,t=2){if(Number.isNaN(e)||(e=typeof e=="string"?parseInt(e):e,!e))return"0";const n=1024,o=t,i=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,s)).toFixed(o))+" "+i[s]}function ou(e){const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],n=new RegExp(`^(\\d+(?:\\.\\d+)?)(${t.join("|")})$`,"i"),o=e.match(n);if(!o)throw new Error(`无效的文件大小!${e}`);const i=parseFloat(o[1]),s=o[2].toUpperCase(),r=t.indexOf(s);if(r<0)throw new Error(`无效的文件大小!${e}`);return i*Math.pow(1024,r)}function iu(e,t=document,n=XPathResult.ORDERED_NODE_SNAPSHOT_TYPE){const o=[],i=document.evaluate(e,t,null,n,null);for(let s=0;s<i.snapshotLength;s++){const r=i.snapshotItem(s);r&&o.push(r)}return o}async function En(e,t=100,n=12e4,o=document){const i=await _o(e,t,n,o);if(i.length)return i[0];throw new Error(`未找到元素:${e}`)}async function _o(e,t=100,n=12e4,o=document){const i=e.indexOf("//")===0;function s(r){if(i){const a=iu(e);a.length>0&&r(a)}else{const a=o.querySelectorAll(e);a.length&&r(Array.from(a))}}try{return await Vn(s,t,n)}catch(r){throw console.warn("[find]",r),new Error(`查找元素超时:${e}`)}}async function zn(e,t=100,n=12e4){const o=e.indexOf("//")===0;function i(s){if(o){const r=iu(e);r.length>0&&s(unsafeWindow.$(r))}else{const r=unsafeWindow.$(e);r.length&&s(r)}}try{return await Vn(i,t,n)}catch(s){throw console.warn("[findWithJQuery]",s),new Error(`查找元素超时:${e}`)}}async function Vn(e,t,n){return new Promise(async(o,i)=>{if(typeof e!="function"){i("提供的参数`fulfill`不是一个Function!");return}let s=!1;e(l=>{s=!0,o(l)});let r=setInterval(async()=>{if(s){clearTimeout(a),clearInterval(r);return}e(l=>{clearTimeout(a),clearInterval(r),o(l)})},t),a=setTimeout(()=>{clearInterval(r),i("超时")},n)})}async function wt(e){return new Promise(t=>{setTimeout(t,e)})}function Rs(e){const t=new URLSearchParams;let n;for(n in e)t.append(n,e[n].toString());return t.toString()}function pg(e,t=!1){const n=[];for(const o in e){let i=e[o].toString();i=t?encodeURIComponent(i):i,n.push(`${o}=${i}`)}return n.join("&")}async function ae(e){return me.fire({toast:!0,position:"top",showConfirmButton:!1,timer:3e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",me.stopTimer),t.addEventListener("mouseleave",me.resumeTimer)},...e})}function vo(e,t){t=t||window,t.postMessage(e)}function xo(e,t,n){if(n){const o=Ls(e,{});ba(e,{...o,...t})}else ba(e,t)}function Rt(e,t,n){let o;return function(...i){const s=()=>{o=void 0,n||e.apply(this,i)},r=n&&o===void 0;clearTimeout(o),o=setTimeout(s,t),r&&e.apply(this,i)}}function hg(e){return e?lg.indexOf(e.toLowerCase())>-1:!1}function mg(e){return e?cg.indexOf(e.toLowerCase())>-1:!1}function gg(e){return e?ug.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||{}),Ri=(e=>(e.listItemHover="列表项悬浮菜单",e.listItemHoverSub="列表项悬浮子菜单",e.listItemContext="列表项右键菜单",e.listItemContextSub="列表项右键子菜单",e.selection="选中项菜单",e.selectionSub="选中项子菜单",e.dirContext="当前目录右键菜单",e.dirContextSub="当前目录右键子菜单",e))(Ri||{}),Co=(e=>(e[e.after=0]="after",e[e.before=1]="before",e))(Co||{});const tt={get:async(e,t)=>Ls(e,t),set:async(e,t)=>ba(e,t),remove:async e=>sg(e)},su="clouddrive_configs";var ru=(e=>(e.windows="windows",e.macos="macos",e.linux="linux",e.android="android",e))(ru||{});function _a(e){return{active:!1,url:"http://localhost:19798",root:"/115",memo:"",platform:void 0,...e}}async function au(){const e=[_a()],t=await tt.get(su,e);return t||e}async function lu(e){e.some(t=>t.active)||(e[0].active=!0),await tt.set(su,e)}async function Ni(){return(await au()).find(t=>t.active)||_a()}var Ns=(e=>(e.play="play",e.download="download",e))(Ns||{});function cu(e){return e.startsWith("file://")}async function Zo(e,t,n="play"){e.platform==="macos"&&(t=t.normalize("NFD"));let{url:o,root:i}=e;if(!o)throw new Error("未设置CloudDrive地址!");(o.startsWith("/")||o.startsWith("\\"))&&(o=`file:///${o}`),cu(o);const s=/^https?:\/\//.test(o);if(s&&!i)throw new Error("当协议为http/https时,必须设置CloudDrive资源根路径!");i&&(i=i.replace(/^(\/+)?/g,"/")),t=t.replace(/^(\/+)?/g,"/");const r=`${i}${t}`,a=n==="play"?"True":"False";let l="";return o=o.replace(/\/+$/,""),s?l=`${o}/static/${o.replace("://","/")}/${a}/${encodeURIComponent(r)}`:l=`${o}${r}`,console.log("[Cloud115 Enhancer] buildCloudDriveUrl",l),l}async function va(e,t){let{url:n,root:o}=e;if(!n)throw new Error("未设置CloudDrive地址!");return(n.startsWith("/")||n.startsWith("\\"))&&(n=`file:///${n}`),cu(n)?await Zo(e,t,"play"):await Zo(e,t,"play")+".clfsplaylist.m3u"}var Nt=(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))(Nt||{});const yg={[-1]:"失败",[0]:"违规",[1]:"下载中",[2]:"成功"};var Bt=(e=>(e.all="all",e.failed="failed",e.success="success",e.magnet="magnet",e.magnetEd2k="magnetEd2k",e))(Bt||{}),xa=(e=>(e[e.true=1]="true",e[e.false=0]="false",e))(xa||{}),$t=(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))($t||{}),at=(e=>(e.all="全部",e.video="视频",e.audio="音频",e.image="图片",e.doc="文档",e.app="应用",e.archive="压缩包",e))(at||{}),uu=(e=>(e.userPtime="user_ptime",e.fileName="file_name",e.fileSize="file_size",e.fileType="file_type",e))(uu||{});function wg(e){return{offset:0,limit:1150,aid:1,cid:"",format:"json",o:"user_ptime",asc:0,search_value:"",...e}}function Wn(e){return{aid:1,cid:"",o:"user_ptime",asc:0,offset:0,show_dir:1,limit:115,natsort:0,format:"json",...e}}function du(e,t){return function(){return e.apply(t,arguments)}}const{toString:fu}=Object.prototype,{getPrototypeOf:Ca}=Object,$a=(e=>t=>{const n=fu.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kn=e=>(e=e.toLowerCase(),t=>$a(t)===e),Bs=e=>t=>typeof t===e,{isArray:ei}=Array,Bi=Bs("undefined");function bg(e){return e!==null&&!Bi(e)&&e.constructor!==null&&!Bi(e.constructor)&&Kn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const pu=kn("ArrayBuffer");function _g(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&pu(e.buffer),t}const vg=Bs("string"),Kn=Bs("function"),hu=Bs("number"),Ea=e=>e!==null&&typeof e=="object",xg=e=>e===!0||e===!1,Fs=e=>{if($a(e)!=="object")return!1;const t=Ca(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Cg=kn("Date"),$g=kn("File"),Eg=kn("Blob"),kg=kn("FileList"),Sg=e=>Ea(e)&&Kn(e.pipe),Ag=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||fu.call(e)===t||Kn(e.toString)&&e.toString()===t)},Pg=kn("URLSearchParams"),Tg=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,i;if(typeof e!="object"&&(e=[e]),ei(e))for(o=0,i=e.length;o<i;o++)t.call(null,e[o],o,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),r=s.length;let a;for(o=0;o<r;o++)a=s[o],t.call(null,e[a],a,e)}}function mu(e,t){t=t.toLowerCase();const n=Object.keys(e);let o=n.length,i;for(;o-- >0;)if(i=n[o],t===i.toLowerCase())return i;return null}const gu=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),yu=e=>!Bi(e)&&e!==gu;function ka(){const{caseless:e}=yu(this)&&this||{},t={},n=(o,i)=>{const s=e&&mu(t,i)||i;Fs(t[s])&&Fs(o)?t[s]=ka(t[s],o):Fs(o)?t[s]=ka({},o):ei(o)?t[s]=o.slice():t[s]=o};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&Fi(arguments[o],n);return t}const Ig=(e,t,n,{allOwnKeys:o}={})=>(Fi(t,(i,s)=>{n&&Kn(i)?e[s]=du(i,n):e[s]=i},{allOwnKeys:o}),e),Og=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Lg=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Mg=(e,t,n,o)=>{let i,s,r;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)r=i[s],(!o||o(r,e,t))&&!a[r]&&(t[r]=e[r],a[r]=!0);e=n!==!1&&Ca(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Dg=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},Rg=e=>{if(!e)return null;if(ei(e))return e;let t=e.length;if(!hu(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Ng=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ca(Uint8Array)),Bg=(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=o.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},Fg=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},jg=kn("HTMLFormElement"),Ug=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,i){return o.toUpperCase()+i}),wu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Hg=kn("RegExp"),bu=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};Fi(n,(i,s)=>{t(i,s,e)!==!1&&(o[s]=i)}),Object.defineProperties(e,o)},qg=e=>{bu(e,(t,n)=>{if(Kn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(!!Kn(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},zg=(e,t)=>{const n={},o=i=>{i.forEach(s=>{n[s]=!0})};return ei(e)?o(e):o(String(e).split(t)),n},Vg=()=>{},Wg=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Sa="abcdefghijklmnopqrstuvwxyz",_u="0123456789",vu={DIGIT:_u,ALPHA:Sa,ALPHA_DIGIT:Sa+Sa.toUpperCase()+_u},Kg=(e=16,t=vu.ALPHA_DIGIT)=>{let n="";const{length:o}=t;for(;e--;)n+=t[Math.random()*o|0];return n};function Gg(e){return!!(e&&Kn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Y={isArray:ei,isArrayBuffer:pu,isBuffer:bg,isFormData:Ag,isArrayBufferView:_g,isString:vg,isNumber:hu,isBoolean:xg,isObject:Ea,isPlainObject:Fs,isUndefined:Bi,isDate:Cg,isFile:$g,isBlob:Eg,isRegExp:Hg,isFunction:Kn,isStream:Sg,isURLSearchParams:Pg,isTypedArray:Ng,isFileList:kg,forEach:Fi,merge:ka,extend:Ig,trim:Tg,stripBOM:Og,inherits:Lg,toFlatObject:Mg,kindOf:$a,kindOfTest:kn,endsWith:Dg,toArray:Rg,forEachEntry:Bg,matchAll:Fg,isHTMLForm:jg,hasOwnProperty:wu,hasOwnProp:wu,reduceDescriptors:bu,freezeMethods:qg,toObjectSet:zg,toCamelCase:Ug,noop:Vg,toFiniteNumber:Wg,findKey:mu,global:gu,isContextDefined:yu,ALPHABET:vu,generateString:Kg,isSpecCompliantForm:Gg,toJSONObject:e=>{const t=new Array(10),n=(o,i)=>{if(Ea(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[i]=o;const s=ei(o)?[]:{};return Fi(o,(r,a)=>{const l=n(r,i+1);!Bi(l)&&(s[a]=l)}),t[i]=void 0,s}}return o};return n(e,0)}};function We(e,t,n,o,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),i&&(this.response=i)}Y.inherits(We,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:Y.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const xu=We.prototype,Cu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Cu[e]={value:e}}),Object.defineProperties(We,Cu),Object.defineProperty(xu,"isAxiosError",{value:!0}),We.from=(e,t,n,o,i,s)=>{const r=Object.create(xu);return Y.toFlatObject(e,r,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),We.call(r,e.message,t,n,o,i),r.cause=e,r.name=e.name,s&&Object.assign(r,s),r};const Yg=null;function Aa(e){return Y.isPlainObject(e)||Y.isArray(e)}function $u(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function Eu(e,t,n){return e?e.concat(t).map(function(i,s){return i=$u(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function Jg(e){return Y.isArray(e)&&!e.some(Aa)}const Qg=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function js(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,T){return!Y.isUndefined(T[E])});const o=n.metaTokens,i=n.visitor||f,s=n.dots,r=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Y.isSpecCompliantForm(t);if(!Y.isFunction(i))throw new TypeError("visitor must be a function");function u(_){if(_===null)return"";if(Y.isDate(_))return _.toISOString();if(!l&&Y.isBlob(_))throw new We("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(_)||Y.isTypedArray(_)?l&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function f(_,E,T){let M=_;if(_&&!T&&typeof _=="object"){if(Y.endsWith(E,"{}"))E=o?E:E.slice(0,-2),_=JSON.stringify(_);else if(Y.isArray(_)&&Jg(_)||(Y.isFileList(_)||Y.endsWith(E,"[]"))&&(M=Y.toArray(_)))return E=$u(E),M.forEach(function(I,H){!(Y.isUndefined(I)||I===null)&&t.append(r===!0?Eu([E],H,s):r===null?E:E+"[]",u(I))}),!1}return Aa(_)?!0:(t.append(Eu(T,E,s),u(_)),!1)}const h=[],g=Object.assign(Qg,{defaultVisitor:f,convertValue:u,isVisitable:Aa});function b(_,E){if(!Y.isUndefined(_)){if(h.indexOf(_)!==-1)throw Error("Circular reference detected in "+E.join("."));h.push(_),Y.forEach(_,function(M,P){(!(Y.isUndefined(M)||M===null)&&i.call(t,M,Y.isString(P)?P.trim():P,E,g))===!0&&b(M,E?E.concat(P):[P])}),h.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return b(e),t}function ku(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function Pa(e,t){this._pairs=[],e&&js(e,this,t)}const Su=Pa.prototype;Su.append=function(t,n){this._pairs.push([t,n])},Su.toString=function(t){const n=t?function(o){return t.call(this,o,ku)}:ku;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Xg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Au(e,t,n){if(!t)return e;const o=n&&n.encode||Xg,i=n&&n.serialize;let s;if(i?s=i(t,n):s=Y.isURLSearchParams(t)?t.toString():new Pa(t,n).toString(o),s){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Zg{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Y.forEach(this.handlers,function(o){o!==null&&t(o)})}}const Pu=Zg,Tu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ey=typeof URLSearchParams<"u"?URLSearchParams:Pa,ty=typeof FormData<"u"?FormData:null,ny=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),oy=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),pn={isBrowser:!0,classes:{URLSearchParams:ey,FormData:ty,Blob},isStandardBrowserEnv:ny,isStandardBrowserWebWorkerEnv:oy,protocols:["http","https","file","blob","url","data"]};function iy(e,t){return js(e,new pn.classes.URLSearchParams,Object.assign({visitor:function(n,o,i,s){return pn.isNode&&Y.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function sy(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ry(e){const t={},n=Object.keys(e);let o;const i=n.length;let s;for(o=0;o<i;o++)s=n[o],t[s]=e[s];return t}function Iu(e){function t(n,o,i,s){let r=n[s++];const a=Number.isFinite(+r),l=s>=n.length;return r=!r&&Y.isArray(i)?i.length:r,l?(Y.hasOwnProp(i,r)?i[r]=[i[r],o]:i[r]=o,!a):((!i[r]||!Y.isObject(i[r]))&&(i[r]=[]),t(n,o,i[r],s)&&Y.isArray(i[r])&&(i[r]=ry(i[r])),!a)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(o,i)=>{t(sy(o),i,n,0)}),n}return null}const ay={"Content-Type":void 0};function ly(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const Us={transitional:Tu,adapter:["xhr","http"],transformRequest:[function(t,n){const o=n.getContentType()||"",i=o.indexOf("application/json")>-1,s=Y.isObject(t);if(s&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return i&&i?JSON.stringify(Iu(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return iy(t,this.formSerializer).toString();if((a=Y.isFileList(t))||o.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return js(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),ly(t)):t}],transformResponse:[function(t){const n=this.transitional||Us.transitional,o=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&Y.isString(t)&&(o&&!this.responseType||i)){const r=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(r)throw a.name==="SyntaxError"?We.from(a,We.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:pn.classes.FormData,Blob:pn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Y.forEach(["delete","get","head"],function(t){Us.headers[t]={}}),Y.forEach(["post","put","patch"],function(t){Us.headers[t]=Y.merge(ay)});const Ta=Us,cy=Y.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"]),uy=e=>{const t={};let n,o,i;return e&&e.split(`
`).forEach(function(r){i=r.indexOf(":"),n=r.substring(0,i).trim().toLowerCase(),o=r.substring(i+1).trim(),!(!n||t[n]&&cy[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},Ou=Symbol("internals");function ji(e){return e&&String(e).trim().toLowerCase()}function Hs(e){return e===!1||e==null?e:Y.isArray(e)?e.map(Hs):String(e)}function dy(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}function fy(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function Ia(e,t,n,o,i){if(Y.isFunction(o))return o.call(this,t,n);if(i&&(t=n),!!Y.isString(t)){if(Y.isString(o))return t.indexOf(o)!==-1;if(Y.isRegExp(o))return o.test(t)}}function py(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function hy(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(i,s,r){return this[o].call(this,t,i,s,r)},configurable:!0})})}class qs{constructor(t){t&&this.set(t)}set(t,n,o){const i=this;function s(a,l,u){const f=ji(l);if(!f)throw new Error("header name must be a non-empty string");const h=Y.findKey(i,f);(!h||i[h]===void 0||u===!0||u===void 0&&i[h]!==!1)&&(i[h||l]=Hs(a))}const r=(a,l)=>Y.forEach(a,(u,f)=>s(u,f,l));return Y.isPlainObject(t)||t instanceof this.constructor?r(t,n):Y.isString(t)&&(t=t.trim())&&!fy(t)?r(uy(t),n):t!=null&&s(n,t,o),this}get(t,n){if(t=ji(t),t){const o=Y.findKey(this,t);if(o){const i=this[o];if(!n)return i;if(n===!0)return dy(i);if(Y.isFunction(n))return n.call(this,i,o);if(Y.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ji(t),t){const o=Y.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||Ia(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let i=!1;function s(r){if(r=ji(r),r){const a=Y.findKey(o,r);a&&(!n||Ia(o,o[a],a,n))&&(delete o[a],i=!0)}}return Y.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let o=n.length,i=!1;for(;o--;){const s=n[o];(!t||Ia(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,o={};return Y.forEach(this,(i,s)=>{const r=Y.findKey(o,s);if(r){n[r]=Hs(i),delete n[s];return}const a=t?py(s):String(s).trim();a!==s&&delete n[s],n[a]=Hs(i),o[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Y.forEach(this,(o,i)=>{o!=null&&o!==!1&&(n[i]=t&&Y.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(i=>o.set(i)),o}static accessor(t){const o=(this[Ou]=this[Ou]={accessors:{}}).accessors,i=this.prototype;function s(r){const a=ji(r);o[a]||(hy(i,r),o[a]=!0)}return Y.isArray(t)?t.forEach(s):s(t),this}}qs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.freezeMethods(qs.prototype),Y.freezeMethods(qs);const Sn=qs;function Oa(e,t){const n=this||Ta,o=t||n,i=Sn.from(o.headers);let s=o.data;return Y.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Lu(e){return!!(e&&e.__CANCEL__)}function Ui(e,t,n){We.call(this,e==null?"canceled":e,We.ERR_CANCELED,t,n),this.name="CanceledError"}Y.inherits(Ui,We,{__CANCEL__:!0});function my(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new We("Request failed with status code "+n.status,[We.ERR_BAD_REQUEST,We.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const gy=pn.isStandardBrowserEnv?function(){return{write:function(n,o,i,s,r,a){const l=[];l.push(n+"="+encodeURIComponent(o)),Y.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),Y.isString(s)&&l.push("path="+s),Y.isString(r)&&l.push("domain="+r),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const o=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function yy(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function wy(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Mu(e,t){return e&&!yy(t)?wy(e,t):t}const by=pn.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function i(s){let r=s;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=i(window.location.href),function(r){const a=Y.isString(r)?i(r):r;return a.protocol===o.protocol&&a.host===o.host}}():function(){return function(){return!0}}();function _y(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function vy(e,t){e=e||10;const n=new Array(e),o=new Array(e);let i=0,s=0,r;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=o[s];r||(r=u),n[i]=l,o[i]=u;let h=s,g=0;for(;h!==i;)g+=n[h++],h=h%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-r<t)return;const b=f&&u-f;return b?Math.round(g*1e3/b):void 0}}function Du(e,t){let n=0;const o=vy(50,250);return i=>{const s=i.loaded,r=i.lengthComputable?i.total:void 0,a=s-n,l=o(a),u=s<=r;n=s;const f={loaded:s,total:r,progress:r?s/r:void 0,bytes:a,rate:l||void 0,estimated:l&&r&&u?(r-s)/l:void 0,event:i};f[t?"download":"upload"]=!0,e(f)}}const zs={http:Yg,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){let i=e.data;const s=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)}Y.isFormData(i)&&(pn.isStandardBrowserEnv||pn.isStandardBrowserWebWorkerEnv)&&s.setContentType(!1);let u=new XMLHttpRequest;if(e.auth){const b=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(b+":"+_))}const f=Mu(e.baseURL,e.url);u.open(e.method.toUpperCase(),Au(f,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function h(){if(!u)return;const b=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:b,config:e,request:u};my(function(M){n(M),l()},function(M){o(M),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||(o(new We("Request aborted",We.ECONNABORTED,e,u)),u=null)},u.onerror=function(){o(new We("Network Error",We.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let _=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const E=e.transitional||Tu;e.timeoutErrorMessage&&(_=e.timeoutErrorMessage),o(new We(_,E.clarifyTimeoutError?We.ETIMEDOUT:We.ECONNABORTED,e,u)),u=null},pn.isStandardBrowserEnv){const b=(e.withCredentials||by(f))&&e.xsrfCookieName&&gy.read(e.xsrfCookieName);b&&s.set(e.xsrfHeaderName,b)}i===void 0&&s.setContentType(null),"setRequestHeader"in u&&Y.forEach(s.toJSON(),function(_,E){u.setRequestHeader(E,_)}),Y.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),r&&r!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",Du(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",Du(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=b=>{!u||(o(!b||b.type?new Ui(null,e,u):b),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const g=_y(f);if(g&&pn.protocols.indexOf(g)===-1){o(new We("Unsupported protocol "+g+":",We.ERR_BAD_REQUEST,e));return}u.send(i||null)})}};Y.forEach(zs,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const xy={getAdapter:e=>{e=Y.isArray(e)?e:[e];const{length:t}=e;let n,o;for(let i=0;i<t&&(n=e[i],!(o=Y.isString(n)?zs[n.toLowerCase()]:n));i++);if(!o)throw o===!1?new We(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(Y.hasOwnProp(zs,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!Y.isFunction(o))throw new TypeError("adapter is not a function");return o},adapters:zs};function La(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ui(null,e)}function Ru(e){return La(e),e.headers=Sn.from(e.headers),e.data=Oa.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xy.getAdapter(e.adapter||Ta.adapter)(e).then(function(o){return La(e),o.data=Oa.call(e,e.transformResponse,o),o.headers=Sn.from(o.headers),o},function(o){return Lu(o)||(La(e),o&&o.response&&(o.response.data=Oa.call(e,e.transformResponse,o.response),o.response.headers=Sn.from(o.response.headers))),Promise.reject(o)})}const Nu=e=>e instanceof Sn?e.toJSON():e;function ti(e,t){t=t||{};const n={};function o(u,f,h){return Y.isPlainObject(u)&&Y.isPlainObject(f)?Y.merge.call({caseless:h},u,f):Y.isPlainObject(f)?Y.merge({},f):Y.isArray(f)?f.slice():f}function i(u,f,h){if(Y.isUndefined(f)){if(!Y.isUndefined(u))return o(void 0,u,h)}else return o(u,f,h)}function s(u,f){if(!Y.isUndefined(f))return o(void 0,f)}function r(u,f){if(Y.isUndefined(f)){if(!Y.isUndefined(u))return o(void 0,u)}else return o(void 0,f)}function a(u,f,h){if(h in t)return o(u,f);if(h in e)return o(void 0,u)}const l={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(u,f)=>i(Nu(u),Nu(f),!0)};return Y.forEach(Object.keys(e).concat(Object.keys(t)),function(f){const h=l[f]||i,g=h(e[f],t[f],f);Y.isUndefined(g)&&h!==a||(n[f]=g)}),n}const Bu="1.3.3",Ma={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ma[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const Fu={};Ma.transitional=function(t,n,o){function i(s,r){return"[Axios v"+Bu+"] Transitional option '"+s+"'"+r+(o?". "+o:"")}return(s,r,a)=>{if(t===!1)throw new We(i(r," has been removed"+(n?" in "+n:"")),We.ERR_DEPRECATED);return n&&!Fu[r]&&(Fu[r]=!0,console.warn(i(r," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,r,a):!0}};function Cy(e,t,n){if(typeof e!="object")throw new We("options must be an object",We.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let i=o.length;for(;i-- >0;){const s=o[i],r=t[s];if(r){const a=e[s],l=a===void 0||r(a,s,e);if(l!==!0)throw new We("option "+s+" must be "+l,We.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new We("Unknown option "+s,We.ERR_BAD_OPTION)}}const Da={assertOptions:Cy,validators:Ma},Gn=Da.validators;class Vs{constructor(t){this.defaults=t,this.interceptors={request:new Pu,response:new Pu}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ti(this.defaults,n);const{transitional:o,paramsSerializer:i,headers:s}=n;o!==void 0&&Da.assertOptions(o,{silentJSONParsing:Gn.transitional(Gn.boolean),forcedJSONParsing:Gn.transitional(Gn.boolean),clarifyTimeoutError:Gn.transitional(Gn.boolean)},!1),i!==void 0&&Da.assertOptions(i,{encode:Gn.function,serialize:Gn.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r;r=s&&Y.merge(s.common,s[n.method]),r&&Y.forEach(["delete","get","head","post","put","patch","common"],_=>{delete s[_]}),n.headers=Sn.concat(r,s);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,g;if(!l){const _=[Ru.bind(this),void 0];for(_.unshift.apply(_,a),_.push.apply(_,u),g=_.length,f=Promise.resolve(n);h<g;)f=f.then(_[h++],_[h++]);return f}g=a.length;let b=n;for(h=0;h<g;){const _=a[h++],E=a[h++];try{b=_(b)}catch(T){E.call(this,T);break}}try{f=Ru.call(this,b)}catch(_){return Promise.reject(_)}for(h=0,g=u.length;h<g;)f=f.then(u[h++],u[h++]);return f}getUri(t){t=ti(this.defaults,t);const n=Mu(t.baseURL,t.url);return Au(n,t.params,t.paramsSerializer)}}Y.forEach(["delete","get","head","options"],function(t){Vs.prototype[t]=function(n,o){return this.request(ti(o||{},{method:t,url:n,data:(o||{}).data}))}}),Y.forEach(["post","put","patch"],function(t){function n(o){return function(s,r,a){return this.request(ti(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:r}))}}Vs.prototype[t]=n(),Vs.prototype[t+"Form"]=n(!0)});const Ws=Vs;class Ra{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(i=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](i);o._listeners=null}),this.promise.then=i=>{let s;const r=new Promise(a=>{o.subscribe(a),s=a}).then(i);return r.cancel=function(){o.unsubscribe(s)},r},t(function(s,r,a){o.reason||(o.reason=new Ui(s,r,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Ra(function(i){t=i}),cancel:t}}}const $y=Ra;function Ey(e){return function(n){return e.apply(null,n)}}function ky(e){return Y.isObject(e)&&e.isAxiosError===!0}const Na={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(Na).forEach(([e,t])=>{Na[t]=e});const Sy=Na;function ju(e){const t=new Ws(e),n=du(Ws.prototype.request,t);return Y.extend(n,Ws.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return ju(ti(e,i))},n}const ht=ju(Ta);ht.Axios=Ws,ht.CanceledError=Ui,ht.CancelToken=$y,ht.isCancel=Lu,ht.VERSION=Bu,ht.toFormData=js,ht.AxiosError=We,ht.Cancel=ht.CanceledError,ht.all=function(t){return Promise.all(t)},ht.spread=Ey,ht.isAxiosError=ky,ht.mergeConfig=ti,ht.AxiosHeaders=Sn,ht.formToJSON=e=>Iu(Y.isHTMLForm(e)?new FormData(e):e),ht.HttpStatusCode=Sy,ht.default=ht;const Uu=ht,{Axios:S5,AxiosError:Ay,CanceledError:A5,isCancel:P5,CancelToken:T5,VERSION:I5,all:O5,Cancel:L5,isAxiosError:M5,spread:D5,toFormData:Py,AxiosHeaders:R5,HttpStatusCode:N5,formToJSON:B5,mergeConfig:F5}=Uu;class Hu extends Error{}class Ba extends Hu{constructor(){super(...arguments);_e(this,"message","搜索失败!")}}class qu extends Ba{constructor(){super(...arguments);_e(this,"message","搜索请求响应内容为空!")}}class Fa extends Hu{constructor(){super(...arguments);_e(this,"message","目录不存在!")}toString(){return this.message}}var zu=(e=>(e[e.exist=20004]="exist",e))(zu||{});const Ty={[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,o=ut.hexOut;let i,s,r,a;for(a=0;a<4;a+=1)for(s=a*8,i=t[a],r=0;r<8;r+=2)o[s+1+r]=n.charAt(i&15),i>>>=4,o[s+0+r]=n.charAt(i&15),i>>>=4;return o.join("")}static _md5cycle(t,n){let o=t[0],i=t[1],s=t[2],r=t[3];o+=(i&s|~i&r)+n[0]-680876936|0,o=(o<<7|o>>>25)+i|0,r+=(o&i|~o&s)+n[1]-389564586|0,r=(r<<12|r>>>20)+o|0,s+=(r&o|~r&i)+n[2]+606105819|0,s=(s<<17|s>>>15)+r|0,i+=(s&r|~s&o)+n[3]-1044525330|0,i=(i<<22|i>>>10)+s|0,o+=(i&s|~i&r)+n[4]-176418897|0,o=(o<<7|o>>>25)+i|0,r+=(o&i|~o&s)+n[5]+1200080426|0,r=(r<<12|r>>>20)+o|0,s+=(r&o|~r&i)+n[6]-1473231341|0,s=(s<<17|s>>>15)+r|0,i+=(s&r|~s&o)+n[7]-45705983|0,i=(i<<22|i>>>10)+s|0,o+=(i&s|~i&r)+n[8]+1770035416|0,o=(o<<7|o>>>25)+i|0,r+=(o&i|~o&s)+n[9]-1958414417|0,r=(r<<12|r>>>20)+o|0,s+=(r&o|~r&i)+n[10]-42063|0,s=(s<<17|s>>>15)+r|0,i+=(s&r|~s&o)+n[11]-1990404162|0,i=(i<<22|i>>>10)+s|0,o+=(i&s|~i&r)+n[12]+1804603682|0,o=(o<<7|o>>>25)+i|0,r+=(o&i|~o&s)+n[13]-40341101|0,r=(r<<12|r>>>20)+o|0,s+=(r&o|~r&i)+n[14]-1502002290|0,s=(s<<17|s>>>15)+r|0,i+=(s&r|~s&o)+n[15]+1236535329|0,i=(i<<22|i>>>10)+s|0,o+=(i&r|s&~r)+n[1]-165796510|0,o=(o<<5|o>>>27)+i|0,r+=(o&s|i&~s)+n[6]-1069501632|0,r=(r<<9|r>>>23)+o|0,s+=(r&i|o&~i)+n[11]+643717713|0,s=(s<<14|s>>>18)+r|0,i+=(s&o|r&~o)+n[0]-373897302|0,i=(i<<20|i>>>12)+s|0,o+=(i&r|s&~r)+n[5]-701558691|0,o=(o<<5|o>>>27)+i|0,r+=(o&s|i&~s)+n[10]+38016083|0,r=(r<<9|r>>>23)+o|0,s+=(r&i|o&~i)+n[15]-660478335|0,s=(s<<14|s>>>18)+r|0,i+=(s&o|r&~o)+n[4]-405537848|0,i=(i<<20|i>>>12)+s|0,o+=(i&r|s&~r)+n[9]+568446438|0,o=(o<<5|o>>>27)+i|0,r+=(o&s|i&~s)+n[14]-1019803690|0,r=(r<<9|r>>>23)+o|0,s+=(r&i|o&~i)+n[3]-187363961|0,s=(s<<14|s>>>18)+r|0,i+=(s&o|r&~o)+n[8]+1163531501|0,i=(i<<20|i>>>12)+s|0,o+=(i&r|s&~r)+n[13]-1444681467|0,o=(o<<5|o>>>27)+i|0,r+=(o&s|i&~s)+n[2]-51403784|0,r=(r<<9|r>>>23)+o|0,s+=(r&i|o&~i)+n[7]+1735328473|0,s=(s<<14|s>>>18)+r|0,i+=(s&o|r&~o)+n[12]-1926607734|0,i=(i<<20|i>>>12)+s|0,o+=(i^s^r)+n[5]-378558|0,o=(o<<4|o>>>28)+i|0,r+=(o^i^s)+n[8]-2022574463|0,r=(r<<11|r>>>21)+o|0,s+=(r^o^i)+n[11]+1839030562|0,s=(s<<16|s>>>16)+r|0,i+=(s^r^o)+n[14]-35309556|0,i=(i<<23|i>>>9)+s|0,o+=(i^s^r)+n[1]-1530992060|0,o=(o<<4|o>>>28)+i|0,r+=(o^i^s)+n[4]+1272893353|0,r=(r<<11|r>>>21)+o|0,s+=(r^o^i)+n[7]-155497632|0,s=(s<<16|s>>>16)+r|0,i+=(s^r^o)+n[10]-1094730640|0,i=(i<<23|i>>>9)+s|0,o+=(i^s^r)+n[13]+681279174|0,o=(o<<4|o>>>28)+i|0,r+=(o^i^s)+n[0]-358537222|0,r=(r<<11|r>>>21)+o|0,s+=(r^o^i)+n[3]-722521979|0,s=(s<<16|s>>>16)+r|0,i+=(s^r^o)+n[6]+76029189|0,i=(i<<23|i>>>9)+s|0,o+=(i^s^r)+n[9]-640364487|0,o=(o<<4|o>>>28)+i|0,r+=(o^i^s)+n[12]-421815835|0,r=(r<<11|r>>>21)+o|0,s+=(r^o^i)+n[15]+530742520|0,s=(s<<16|s>>>16)+r|0,i+=(s^r^o)+n[2]-995338651|0,i=(i<<23|i>>>9)+s|0,o+=(s^(i|~r))+n[0]-198630844|0,o=(o<<6|o>>>26)+i|0,r+=(i^(o|~s))+n[7]+1126891415|0,r=(r<<10|r>>>22)+o|0,s+=(o^(r|~i))+n[14]-1416354905|0,s=(s<<15|s>>>17)+r|0,i+=(r^(s|~o))+n[5]-57434055|0,i=(i<<21|i>>>11)+s|0,o+=(s^(i|~r))+n[12]+1700485571|0,o=(o<<6|o>>>26)+i|0,r+=(i^(o|~s))+n[3]-1894986606|0,r=(r<<10|r>>>22)+o|0,s+=(o^(r|~i))+n[10]-1051523|0,s=(s<<15|s>>>17)+r|0,i+=(r^(s|~o))+n[1]-2054922799|0,i=(i<<21|i>>>11)+s|0,o+=(s^(i|~r))+n[8]+1873313359|0,o=(o<<6|o>>>26)+i|0,r+=(i^(o|~s))+n[15]-30611744|0,r=(r<<10|r>>>22)+o|0,s+=(o^(r|~i))+n[6]-1560198380|0,s=(s<<15|s>>>17)+r|0,i+=(r^(s|~o))+n[13]+1309151649|0,i=(i<<21|i>>>11)+s|0,o+=(s^(i|~r))+n[4]-145523070|0,o=(o<<6|o>>>26)+i|0,r+=(i^(o|~s))+n[11]-1120210379|0,r=(r<<10|r>>>22)+o|0,s+=(o^(r|~i))+n[2]+718787259|0,s=(s<<15|s>>>17)+r|0,i+=(r^(s|~o))+n[9]-343485551|0,i=(i<<21|i>>>11)+s|0,t[0]=o+t[0]|0,t[1]=i+t[1]|0,t[2]=s+t[2]|0,t[3]=r+t[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(ut.stateIdentity),this}appendStr(t){const n=this._buffer8,o=this._buffer32;let i=this._bufferLength,s,r;for(r=0;r<t.length;r+=1){if(s=t.charCodeAt(r),s<128)n[i++]=s;else if(s<2048)n[i++]=(s>>>6)+192,n[i++]=s&63|128;else if(s<55296||s>56319)n[i++]=(s>>>12)+224,n[i++]=s>>>6&63|128,n[i++]=s&63|128;else{if(s=(s-55296)*1024+(t.charCodeAt(++r)-56320)+65536,s>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");n[i++]=(s>>>18)+240,n[i++]=s>>>12&63|128,n[i++]=s>>>6&63|128,n[i++]=s&63|128}i>=64&&(this._dataLength+=64,ut._md5cycle(this._state,o),i-=64,o[0]=o[16])}return this._bufferLength=i,this}appendAsciiStr(t){const n=this._buffer8,o=this._buffer32;let i=this._bufferLength,s,r=0;for(;;){for(s=Math.min(t.length-r,64-i);s--;)n[i++]=t.charCodeAt(r++);if(i<64)break;this._dataLength+=64,ut._md5cycle(this._state,o),i=0}return this._bufferLength=i,this}appendByteArray(t){const n=this._buffer8,o=this._buffer32;let i=this._bufferLength,s,r=0;for(;;){for(s=Math.min(t.length-r,64-i);s--;)n[i++]=t[r++];if(i<64)break;this._dataLength+=64,ut._md5cycle(this._state,o),i=0}return this._bufferLength=i,this}getState(){const t=this._state;return{buffer:String.fromCharCode.apply(null,Array.from(this._buffer8)),buflen:this._bufferLength,length:this._dataLength,state:[t[0],t[1],t[2],t[3]]}}setState(t){const n=t.buffer,o=t.state,i=this._state;let s;for(this._dataLength=t.length,this._bufferLength=t.buflen,i[0]=o[0],i[1]=o[1],i[2]=o[2],i[3]=o[3],s=0;s<n.length;s+=1)this._buffer8[s]=n.charCodeAt(s)}end(t=!1){const n=this._bufferLength,o=this._buffer8,i=this._buffer32,s=(n>>2)+1;this._dataLength+=n;const r=this._dataLength*8;if(o[n]=128,o[n+1]=o[n+2]=o[n+3]=0,i.set(ut.buffer32Identity.subarray(s),s),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 Vu={exports:{}};(function(e){var t=function(n){var o=1e7,i=7,s=9007199254740992,r=_(s),a="0123456789abcdefghijklmnopqrstuvwxyz",l=typeof BigInt=="function";function u(m,w,C,k){return typeof m>"u"?u[0]:typeof w<"u"?+w==10&&!C?q(m):W(m,w,C,k):q(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 g(m){this.value=m}g.prototype=Object.create(u.prototype);function b(m){return-s<m&&m<s}function _(m){return m<1e7?[m]:m<1e14?[m%1e7,Math.floor(m/1e7)]:[m%1e7,Math.floor(m/1e7)%1e7,Math.floor(m/1e14)]}function E(m){T(m);var w=m.length;if(w<4&&Ae(m,r)<0)switch(w){case 0:return 0;case 1:return m[0];case 2:return m[0]+m[1]*o;default:return m[0]+(m[1]+m[2]*o)*o}return m}function T(m){for(var w=m.length;m[--w]===0;);m.length=w+1}function M(m){for(var w=new Array(m),C=-1;++C<m;)w[C]=0;return w}function P(m){return m>0?Math.floor(m):Math.ceil(m)}function I(m,w){var C=m.length,k=w.length,L=new Array(C),S=0,V=o,G,oe;for(oe=0;oe<k;oe++)G=m[oe]+w[oe]+S,S=G>=V?1:0,L[oe]=G-S*V;for(;oe<C;)G=m[oe]+S,S=G===V?1:0,L[oe++]=G-S*V;return S>0&&L.push(S),L}function H(m,w){return m.length>=w.length?I(m,w):I(w,m)}function ie(m,w){var C=m.length,k=new Array(C),L=o,S,V;for(V=0;V<C;V++)S=m[V]-L+w,w=Math.floor(S/L),k[V]=S-w*L,w+=1;for(;w>0;)k[V++]=w%L,w=Math.floor(w/L);return k}f.prototype.add=function(m){var w=q(m);if(this.sign!==w.sign)return this.subtract(w.negate());var C=this.value,k=w.value;return w.isSmall?new f(ie(C,Math.abs(k)),this.sign):new f(H(C,k),this.sign)},f.prototype.plus=f.prototype.add,h.prototype.add=function(m){var w=q(m),C=this.value;if(C<0!==w.sign)return this.subtract(w.negate());var k=w.value;if(w.isSmall){if(b(C+k))return new h(C+k);k=_(Math.abs(k))}return new f(ie(k,Math.abs(C)),C<0)},h.prototype.plus=h.prototype.add,g.prototype.add=function(m){return new g(this.value+q(m).value)},g.prototype.plus=g.prototype.add;function j(m,w){var C=m.length,k=w.length,L=new Array(C),S=0,V=o,G,oe;for(G=0;G<k;G++)oe=m[G]-S-w[G],oe<0?(oe+=V,S=1):S=0,L[G]=oe;for(G=k;G<C;G++){if(oe=m[G]-S,oe<0)oe+=V;else{L[G++]=oe;break}L[G]=oe}for(;G<C;G++)L[G]=m[G];return T(L),L}function Z(m,w,C){var k;return Ae(m,w)>=0?k=j(m,w):(k=j(w,m),C=!C),k=E(k),typeof k=="number"?(C&&(k=-k),new h(k)):new f(k,C)}function ce(m,w,C){var k=m.length,L=new Array(k),S=-w,V=o,G,oe;for(G=0;G<k;G++)oe=m[G]+S,S=Math.floor(oe/V),oe%=V,L[G]=oe<0?oe+V:oe;return L=E(L),typeof L=="number"?(C&&(L=-L),new h(L)):new f(L,C)}f.prototype.subtract=function(m){var w=q(m);if(this.sign!==w.sign)return this.add(w.negate());var C=this.value,k=w.value;return w.isSmall?ce(C,Math.abs(k),this.sign):Z(C,k,this.sign)},f.prototype.minus=f.prototype.subtract,h.prototype.subtract=function(m){var w=q(m),C=this.value;if(C<0!==w.sign)return this.add(w.negate());var k=w.value;return w.isSmall?new h(C-k):ce(k,Math.abs(C),C>=0)},h.prototype.minus=h.prototype.subtract,g.prototype.subtract=function(m){return new g(this.value-q(m).value)},g.prototype.minus=g.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},g.prototype.negate=function(){return new g(-this.value)},f.prototype.abs=function(){return new f(this.value,!1)},h.prototype.abs=function(){return new h(Math.abs(this.value))},g.prototype.abs=function(){return new g(this.value>=0?this.value:-this.value)};function ye(m,w){var C=m.length,k=w.length,L=C+k,S=M(L),V=o,G,oe,Oe,Ie,Ce;for(Oe=0;Oe<C;++Oe){Ie=m[Oe];for(var ze=0;ze<k;++ze)Ce=w[ze],G=Ie*Ce+S[Oe+ze],oe=Math.floor(G/V),S[Oe+ze]=G-oe*V,S[Oe+ze+1]+=oe}return T(S),S}function Te(m,w){var C=m.length,k=new Array(C),L=o,S=0,V,G;for(G=0;G<C;G++)V=m[G]*w+S,S=Math.floor(V/L),k[G]=V-S*L;for(;S>0;)k[G++]=S%L,S=Math.floor(S/L);return k}function be(m,w){for(var C=[];w-- >0;)C.push(0);return C.concat(m)}function O(m,w){var C=Math.max(m.length,w.length);if(C<=30)return ye(m,w);C=Math.ceil(C/2);var k=m.slice(C),L=m.slice(0,C),S=w.slice(C),V=w.slice(0,C),G=O(L,V),oe=O(k,S),Oe=O(H(L,k),H(V,S)),Ie=H(H(G,be(j(j(Oe,G),oe),C)),be(oe,2*C));return T(Ie),Ie}function re(m,w){return-.012*m-.012*w+15e-6*m*w>0}f.prototype.multiply=function(m){var w=q(m),C=this.value,k=w.value,L=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<o)return new f(Te(C,S),L);k=_(S)}return re(C.length,k.length)?new f(O(C,k),L):new f(ye(C,k),L)},f.prototype.times=f.prototype.multiply;function J(m,w,C){return m<o?new f(Te(w,m),C):new f(ye(w,_(m)),C)}h.prototype._multiplyBySmall=function(m){return b(m.value*this.value)?new h(m.value*this.value):J(Math.abs(m.value),_(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():J(Math.abs(m.value),this.value,this.sign!==m.sign)},h.prototype.multiply=function(m){return q(m)._multiplyBySmall(this)},h.prototype.times=h.prototype.multiply,g.prototype.multiply=function(m){return new g(this.value*q(m).value)},g.prototype.times=g.prototype.multiply;function $e(m){var w=m.length,C=M(w+w),k=o,L,S,V,G,oe;for(V=0;V<w;V++){G=m[V],S=0-G*G;for(var Oe=V;Oe<w;Oe++)oe=m[Oe],L=2*(G*oe)+C[V+Oe]+S,S=Math.floor(L/k),C[V+Oe]=L-S*k;C[V+w]=S}return T(C),C}f.prototype.square=function(){return new f($e(this.value),!1)},h.prototype.square=function(){var m=this.value*this.value;return b(m)?new h(m):new f($e(_(Math.abs(this.value))),!1)},g.prototype.square=function(m){return new g(this.value*this.value)};function D(m,w){var C=m.length,k=w.length,L=o,S=M(w.length),V=w[k-1],G=Math.ceil(L/(2*V)),oe=Te(m,G),Oe=Te(w,G),Ie,Ce,ze,Mt,Ct,ks,Ss;for(oe.length<=C&&oe.push(0),Oe.push(0),V=Oe[k-1],Ce=C-k;Ce>=0;Ce--){for(Ie=L-1,oe[Ce+k]!==V&&(Ie=Math.floor((oe[Ce+k]*L+oe[Ce+k-1])/V)),ze=0,Mt=0,ks=Oe.length,Ct=0;Ct<ks;Ct++)ze+=Ie*Oe[Ct],Ss=Math.floor(ze/L),Mt+=oe[Ce+Ct]-(ze-Ss*L),ze=Ss,Mt<0?(oe[Ce+Ct]=Mt+L,Mt=-1):(oe[Ce+Ct]=Mt,Mt=0);for(;Mt!==0;){for(Ie-=1,ze=0,Ct=0;Ct<ks;Ct++)ze+=oe[Ce+Ct]-L+Oe[Ct],ze<0?(oe[Ce+Ct]=ze+L,ze=0):(oe[Ce+Ct]=ze,ze=1);Mt+=ze}S[Ce]=Ie}return oe=N(oe,G)[0],[E(S),E(oe)]}function K(m,w){for(var C=m.length,k=w.length,L=[],S=[],V=o,G,oe,Oe,Ie,Ce;C;){if(S.unshift(m[--C]),T(S),Ae(S,w)<0){L.push(0);continue}oe=S.length,Oe=S[oe-1]*V+S[oe-2],Ie=w[k-1]*V+w[k-2],oe>k&&(Oe=(Oe+1)*V),G=Math.ceil(Oe/Ie);do{if(Ce=Te(w,G),Ae(Ce,S)<=0)break;G--}while(G);L.push(G),S=j(S,Ce)}return L.reverse(),[E(L),E(S)]}function N(m,w){var C=m.length,k=M(C),L=o,S,V,G,oe;for(G=0,S=C-1;S>=0;--S)oe=G*L+m[S],V=P(oe/w),G=oe-V*w,k[S]=V|0;return[k,G|0]}function we(m,w){var C,k=q(w);if(l)return[new g(m.value/k.value),new g(m.value%k.value)];var L=m.value,S=k.value,V;if(S===0)throw new Error("Cannot divide by zero");if(m.isSmall)return k.isSmall?[new h(P(L/S)),new h(L%S)]:[u[0],m];if(k.isSmall){if(S===1)return[m,u[0]];if(S==-1)return[m.negate(),u[0]];var G=Math.abs(S);if(G<o){C=N(L,G),V=E(C[0]);var oe=C[1];return m.sign&&(oe=-oe),typeof V=="number"?(m.sign!==k.sign&&(V=-V),[new h(V),new h(oe)]):[new f(V,m.sign!==k.sign),new h(oe)]}S=_(G)}var Oe=Ae(L,S);if(Oe===-1)return[u[0],m];if(Oe===0)return[u[m.sign===k.sign?1:-1],u[0]];L.length+S.length<=200?C=D(L,S):C=K(L,S),V=C[0];var Ie=m.sign!==k.sign,Ce=C[1],ze=m.sign;return typeof V=="number"?(Ie&&(V=-V),V=new h(V)):V=new f(V,Ie),typeof Ce=="number"?(ze&&(Ce=-Ce),Ce=new h(Ce)):Ce=new f(Ce,ze),[V,Ce]}f.prototype.divmod=function(m){var w=we(this,m);return{quotient:w[0],remainder:w[1]}},g.prototype.divmod=h.prototype.divmod=f.prototype.divmod,f.prototype.divide=function(m){return we(this,m)[0]},g.prototype.over=g.prototype.divide=function(m){return new g(this.value/q(m).value)},h.prototype.over=h.prototype.divide=f.prototype.over=f.prototype.divide,f.prototype.mod=function(m){return we(this,m)[1]},g.prototype.mod=g.prototype.remainder=function(m){return new g(this.value%q(m).value)},h.prototype.remainder=h.prototype.mod=f.prototype.remainder=f.prototype.mod,f.prototype.pow=function(m){var w=q(m),C=this.value,k=w.value,L,S,V;if(k===0)return u[1];if(C===0)return u[0];if(C===1)return u[1];if(C===-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&&b(L=Math.pow(C,k)))return new h(P(L));for(S=this,V=u[1];k&!0&&(V=V.times(S),--k),k!==0;)k/=2,S=S.square();return V},h.prototype.pow=f.prototype.pow,g.prototype.pow=function(m){var w=q(m),C=this.value,k=w.value,L=BigInt(0),S=BigInt(1),V=BigInt(2);if(k===L)return u[1];if(C===L)return u[0];if(C===S)return u[1];if(C===BigInt(-1))return w.isEven()?u[1]:u[-1];if(w.isNegative())return new g(L);for(var G=this,oe=u[1];(k&S)===S&&(oe=oe.times(G),--k),k!==L;)k/=V,G=G.square();return oe},f.prototype.modPow=function(m,w){if(m=q(m),w=q(w),w.isZero())throw new Error("Cannot take modPow with modulus 0");var C=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()&&(C=C.multiply(k).mod(w)),m=m.divide(2),k=k.square().mod(w)}return C},g.prototype.modPow=h.prototype.modPow=f.prototype.modPow;function Ae(m,w){if(m.length!==w.length)return m.length>w.length?1:-1;for(var C=m.length-1;C>=0;C--)if(m[C]!==w[C])return m[C]>w[C]?1:-1;return 0}f.prototype.compareAbs=function(m){var w=q(m),C=this.value,k=w.value;return w.isSmall?1:Ae(C,k)},h.prototype.compareAbs=function(m){var w=q(m),C=Math.abs(this.value),k=w.value;return w.isSmall?(k=Math.abs(k),C===k?0:C>k?1:-1):-1},g.prototype.compareAbs=function(m){var w=this.value,C=q(m).value;return w=w>=0?w:-w,C=C>=0?C:-C,w===C?0:w>C?1:-1},f.prototype.compare=function(m){if(m===1/0)return-1;if(m===-1/0)return 1;var w=q(m),C=this.value,k=w.value;return this.sign!==w.sign?w.sign?1:-1:w.isSmall?this.sign?-1:1:Ae(C,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=q(m),C=this.value,k=w.value;return w.isSmall?C==k?0:C>k?1:-1:C<0!==w.sign?C<0?-1:1:C<0?1:-1},h.prototype.compareTo=h.prototype.compare,g.prototype.compare=function(m){if(m===1/0)return-1;if(m===-1/0)return 1;var w=this.value,C=q(m).value;return w===C?0:w>C?1:-1},g.prototype.compareTo=g.prototype.compare,f.prototype.equals=function(m){return this.compare(m)===0},g.prototype.eq=g.prototype.equals=h.prototype.eq=h.prototype.equals=f.prototype.eq=f.prototype.equals,f.prototype.notEquals=function(m){return this.compare(m)!==0},g.prototype.neq=g.prototype.notEquals=h.prototype.neq=h.prototype.notEquals=f.prototype.neq=f.prototype.notEquals,f.prototype.greater=function(m){return this.compare(m)>0},g.prototype.gt=g.prototype.greater=h.prototype.gt=h.prototype.greater=f.prototype.gt=f.prototype.greater,f.prototype.lesser=function(m){return this.compare(m)<0},g.prototype.lt=g.prototype.lesser=h.prototype.lt=h.prototype.lesser=f.prototype.lt=f.prototype.lesser,f.prototype.greaterOrEquals=function(m){return this.compare(m)>=0},g.prototype.geq=g.prototype.greaterOrEquals=h.prototype.geq=h.prototype.greaterOrEquals=f.prototype.geq=f.prototype.greaterOrEquals,f.prototype.lesserOrEquals=function(m){return this.compare(m)<=0},g.prototype.leq=g.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},g.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},g.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},g.prototype.isPositive=h.prototype.isPositive,f.prototype.isNegative=function(){return this.sign},h.prototype.isNegative=function(){return this.value<0},g.prototype.isNegative=h.prototype.isNegative,f.prototype.isUnit=function(){return!1},h.prototype.isUnit=function(){return Math.abs(this.value)===1},g.prototype.isUnit=function(){return this.abs().value===BigInt(1)},f.prototype.isZero=function(){return!1},h.prototype.isZero=function(){return this.value===0},g.prototype.isZero=function(){return this.value===BigInt(0)},f.prototype.isDivisibleBy=function(m){var w=q(m);return w.isZero()?!1:w.isUnit()?!0:w.compareAbs(2)===0?this.isEven():this.mod(w).isZero()},g.prototype.isDivisibleBy=h.prototype.isDivisibleBy=f.prototype.isDivisibleBy;function De(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 pe(m,w){for(var C=m.prev(),k=C,L=0,S,V,G;k.isEven();)k=k.divide(2),L++;e:for(V=0;V<w.length;V++)if(!m.lesser(w[V])&&(G=t(w[V]).modPow(k,m),!(G.isUnit()||G.equals(C)))){for(S=L-1;S!=0;S--){if(G=G.square().mod(m),G.isUnit())return!1;if(G.equals(C))continue e}return!1}return!0}f.prototype.isPrime=function(m){var w=De(this);if(w!==n)return w;var C=this.abs(),k=C.bitLength();if(k<=64)return pe(C,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var L=Math.log(2)*k.toJSNumber(),S=Math.ceil(m===!0?2*Math.pow(L,2):L),V=[],G=0;G<S;G++)V.push(t(G+2));return pe(C,V)},g.prototype.isPrime=h.prototype.isPrime=f.prototype.isPrime,f.prototype.isProbablePrime=function(m,w){var C=De(this);if(C!==n)return C;for(var k=this.abs(),L=m===n?5:m,S=[],V=0;V<L;V++)S.push(t.randBetween(2,k.minus(2),w));return pe(k,S)},g.prototype.isProbablePrime=h.prototype.isProbablePrime=f.prototype.isProbablePrime,f.prototype.modInv=function(m){for(var w=t.zero,C=t.one,k=q(m),L=this.abs(),S,V,G;!L.isZero();)S=k.divide(L),V=w,G=k,w=C,k=L,C=V.subtract(S.multiply(C)),L=G.subtract(S.multiply(L));if(!k.isUnit())throw new Error(this.toString()+" and "+m.toString()+" are not co-prime");return w.compare(0)===-1&&(w=w.add(m)),this.isNegative()?w.negate():w},g.prototype.modInv=h.prototype.modInv=f.prototype.modInv,f.prototype.next=function(){var m=this.value;return this.sign?ce(m,1,this.sign):new f(ie(m,1),this.sign)},h.prototype.next=function(){var m=this.value;return m+1<s?new h(m+1):new f(r,!1)},g.prototype.next=function(){return new g(this.value+BigInt(1))},f.prototype.prev=function(){var m=this.value;return this.sign?new f(ie(m,1),!0):ce(m,1,this.sign)},h.prototype.prev=function(){var m=this.value;return m-1>-s?new h(m-1):new f(r,!0)},g.prototype.prev=function(){return new g(this.value-BigInt(1))};for(var ue=[1];2*ue[ue.length-1]<=o;)ue.push(2*ue[ue.length-1]);var He=ue.length,ot=ue[He-1];function Me(m){return Math.abs(m)<=o}f.prototype.shiftLeft=function(m){var w=q(m).toJSNumber();if(!Me(w))throw new Error(String(w)+" is too large for shifting.");if(w<0)return this.shiftRight(-w);var C=this;if(C.isZero())return C;for(;w>=He;)C=C.multiply(ot),w-=He-1;return C.multiply(ue[w])},g.prototype.shiftLeft=h.prototype.shiftLeft=f.prototype.shiftLeft,f.prototype.shiftRight=function(m){var w,C=q(m).toJSNumber();if(!Me(C))throw new Error(String(C)+" is too large for shifting.");if(C<0)return this.shiftLeft(-C);for(var k=this;C>=He;){if(k.isZero()||k.isNegative()&&k.isUnit())return k;w=we(k,ot),k=w[1].isNegative()?w[0].prev():w[0],C-=He-1}return w=we(k,ue[C]),w[1].isNegative()?w[0].prev():w[0]},g.prototype.shiftRight=h.prototype.shiftRight=f.prototype.shiftRight;function et(m,w,C){w=q(w);for(var k=m.isNegative(),L=w.isNegative(),S=k?m.not():m,V=L?w.not():w,G=0,oe=0,Oe=null,Ie=null,Ce=[];!S.isZero()||!V.isZero();)Oe=we(S,ot),G=Oe[1].toJSNumber(),k&&(G=ot-1-G),Ie=we(V,ot),oe=Ie[1].toJSNumber(),L&&(oe=ot-1-oe),S=Oe[0],V=Ie[0],Ce.push(C(G,oe));for(var ze=C(k?1:0,L?1:0)!==0?t(-1):t(0),Mt=Ce.length-1;Mt>=0;Mt-=1)ze=ze.multiply(ot).add(t(Ce[Mt]));return ze}f.prototype.not=function(){return this.negate().prev()},g.prototype.not=h.prototype.not=f.prototype.not,f.prototype.and=function(m){return et(this,m,function(w,C){return w&C})},g.prototype.and=h.prototype.and=f.prototype.and,f.prototype.or=function(m){return et(this,m,function(w,C){return w|C})},g.prototype.or=h.prototype.or=f.prototype.or,f.prototype.xor=function(m){return et(this,m,function(w,C){return w^C})},g.prototype.xor=h.prototype.xor=f.prototype.xor;var it=1<<30,_t=(o&-o)*(o&-o)|it;function ct(m){var w=m.value,C=typeof w=="number"?w|it:typeof w=="bigint"?w|BigInt(it):w[0]+w[1]*o|_t;return C&-C}function wo(m,w){if(w.compareTo(m)<=0){var C=wo(m,w.square(w)),k=C.p,L=C.e,S=k.multiply(w);return S.compareTo(m)<=0?{p:S,e:L*2+1}:{p:k,e:L*2}}return{p:t(1),e:0}}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(wo(m,t(2)).e).add(t(1))},g.prototype.bitLength=h.prototype.bitLength=f.prototype.bitLength;function yt(m,w){return m=q(m),w=q(w),m.greater(w)?m:w}function v(m,w){return m=q(m),w=q(w),m.lesser(w)?m:w}function A(m,w){if(m=q(m).abs(),w=q(w).abs(),m.equals(w))return m;if(m.isZero())return w;if(w.isZero())return m;for(var C=u[1],k,L;m.isEven()&&w.isEven();)k=v(ct(m),ct(w)),m=m.divide(k),w=w.divide(k),C=C.multiply(k);for(;m.isEven();)m=m.divide(ct(m));do{for(;w.isEven();)w=w.divide(ct(w));m.greater(w)&&(L=w,w=m,m=L),w=w.subtract(m)}while(!w.isZero());return C.isUnit()?m:m.multiply(C)}function F(m,w){return m=q(m).abs(),w=q(w).abs(),m.divide(A(m,w)).multiply(w)}function R(m,w,C){m=q(m),w=q(w);var k=C||Math.random,L=v(m,w),S=yt(m,w),V=S.subtract(L).add(1);if(V.isSmall)return L.add(Math.floor(k()*V));for(var G=Q(V,o).value,oe=[],Oe=!0,Ie=0;Ie<G.length;Ie++){var Ce=Oe?G[Ie]+(Ie+1<G.length?G[Ie+1]/o:0):o,ze=P(k()*Ce);oe.push(ze),ze<G[Ie]&&(Oe=!1)}return L.add(u.fromArray(oe,o,!1))}var W=function(m,w,C,k){C=C||a,m=String(m),k||(m=m.toLowerCase(),C=C.toLowerCase());var L=m.length,S,V=Math.abs(w),G={};for(S=0;S<C.length;S++)G[C[S]]=S;for(S=0;S<L;S++){var oe=m[S];if(oe!=="-"&&oe in G&&G[oe]>=V){if(oe==="1"&&V===1)continue;throw new Error(oe+" is not a valid digit in base "+w+".")}}w=q(w);var Oe=[],Ie=m[0]==="-";for(S=Ie?1:0;S<m.length;S++){var oe=m[S];if(oe in G)Oe.push(q(G[oe]));else if(oe==="<"){var Ce=S;do S++;while(m[S]!==">"&&S<m.length);Oe.push(q(m.slice(Ce+1,S)))}else throw new Error(oe+" is not a valid character")}return se(Oe,w,Ie)};function se(m,w,C){var k=u[0],L=u[1],S;for(S=m.length-1;S>=0;S--)k=k.add(m[S].times(L)),L=L.times(w);return C?k.negate():k}function he(m,w){return w=w||a,m<w.length?w[m]:"<"+m+">"}function Q(m,w){if(w=t(w),w.isZero()){if(m.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(w.equals(-1)){if(m.isZero())return{value:[0],isNegative:!1};if(m.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-m.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var C=Array.apply(null,Array(m.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return C.unshift([1]),{value:[].concat.apply([],C),isNegative:!1}}var k=!1;if(m.isNegative()&&w.isPositive()&&(k=!0,m=m.abs()),w.isUnit())return m.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(m.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:k};for(var L=[],S=m,V;S.isNegative()||S.compareAbs(w)>=0;){V=S.divmod(w),S=V.quotient;var G=V.remainder;G.isNegative()&&(G=w.minus(G).abs(),S=S.next()),L.push(G.toJSNumber())}return L.push(S.toJSNumber()),{value:L.reverse(),isNegative:k}}function ne(m,w,C){var k=Q(m,w);return(k.isNegative?"-":"")+k.value.map(function(L){return he(L,C)}).join("")}f.prototype.toArray=function(m){return Q(this,m)},h.prototype.toArray=function(m){return Q(this,m)},g.prototype.toArray=function(m){return Q(this,m)},f.prototype.toString=function(m,w){if(m===n&&(m=10),m!==10)return ne(this,m,w);for(var C=this.value,k=C.length,L=String(C[--k]),S="0000000",V;--k>=0;)V=String(C[k]),L+=S.slice(V.length)+V;var G=this.sign?"-":"";return G+L},h.prototype.toString=function(m,w){return m===n&&(m=10),m!=10?ne(this,m,w):String(this.value)},g.prototype.toString=h.prototype.toString,g.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,g.prototype.valueOf=g.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function te(m){if(b(+m)){var w=+m;if(w===P(w))return l?new g(BigInt(w)):new h(w);throw new Error("Invalid integer: "+m)}var C=m[0]==="-";C&&(m=m.slice(1));var k=m.split(/e/i);if(k.length>2)throw new Error("Invalid integer: "+k.join("e"));if(k.length===2){var L=k[1];if(L[0]==="+"&&(L=L.slice(1)),L=+L,L!==P(L)||!b(L))throw new Error("Invalid integer: "+L+" is not a valid exponent.");var S=k[0],V=S.indexOf(".");if(V>=0&&(L-=S.length-V-1,S=S.slice(0,V)+S.slice(V+1)),L<0)throw new Error("Cannot include negative exponent part for integers");S+=new Array(L+1).join("0"),m=S}var G=/^([0-9][0-9]*)$/.test(m);if(!G)throw new Error("Invalid integer: "+m);if(l)return new g(BigInt(C?"-"+m:m));for(var oe=[],Oe=m.length,Ie=i,Ce=Oe-Ie;Oe>0;)oe.push(+m.slice(Ce,Oe)),Ce-=Ie,Ce<0&&(Ce=0),Oe-=Ie;return T(oe),new f(oe,C)}function ve(m){if(l)return new g(BigInt(m));if(b(m)){if(m!==P(m))throw new Error(m+" is not an integer.");return new h(m)}return te(m.toString())}function q(m){return typeof m=="number"?ve(m):typeof m=="string"?te(m):typeof m=="bigint"?new g(m):m}for(var xe=0;xe<1e3;xe++)u[xe]=q(xe),xe>0&&(u[-xe]=q(-xe));return u.one=u[1],u.zero=u[0],u.minusOne=u[-1],u.max=yt,u.min=v,u.gcd=A,u.lcm=F,u.isInstance=function(m){return m instanceof f||m instanceof h||m instanceof g},u.randBetween=R,u.fromArray=function(m,w,C){return se(m.map(q),q(w||10),C)},u}();e.hasOwnProperty("exports")&&(e.exports=t)})(Vu);const Ks=Vu.exports;class Iy{constructor(){_e(this,"n");_e(this,"e");this.n=Ks("8686980c0f5a24c4b9d43020cd2c22703ff3f450756529058b1cf88f09b8602136477198a6e2683149659bd122c33592fdb5ad47944ad1ea4d36c6b172aad6338c3bb6ac6227502d010993ac967d1aef00f0c8e038de2e4d3bc2ec368af2e9f10a6f1eda4f7262f136420c07c331b871bf139f74f3010e3c4fe57df3afb71683",16),this.e=Ks("10001",16)}a2hex(t){let n="",o;for(let i=0;i<t.length;i++)o=t[i].toString(16),o.length<2&&(o="0"+o),n+=o;return n}hex2a(t){let n="";for(let o=0;o<t.length;o+=2)n+=String.fromCharCode(parseInt(t.substr(o,2),16));return n}pkcs1pad2(t,n){if(n<t.length+11)return null;let o=[],i=t.length-1;for(;i>=0&&n>0;)o[--n]=t.charCodeAt(i--);for(o[--n]=0;n>2;)o[--n]=255;o[--n]=2,o[--n]=0;let s=this.a2hex(o);return Ks(s,16)}pkcs1unpad2(t){let n=t.toString(16);n.length%2!==0&&(n="0"+n);let o=this.hex2a(n),i=1;for(;o.charCodeAt(i)!==0;)i++;return o.slice(i+1)}encrypt(t){let n=this.pkcs1pad2(t,128),o=n==null?void 0:n.modPow(this.e,this.n),i=(o==null?void 0:o.toString(16))||"";for(;i.length<128*2;)i="0"+i;return i}decrypt(t){const n=[];let o=0;for(;o<t.length;)n[o]=t.charCodeAt(o),o+=1;const s=Ks(this.a2hex(n),16).modPow(this.e,this.n);return this.pkcs1unpad2(s)}}class Oy{constructor(){_e(this,"rsa");_e(this,"kts");_e(this,"keyS");_e(this,"keyL");this.rsa=new Iy,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,o,i){let s,r,a,l,u,f,h,g;if(l=n%4,g=[],l!==0)for(s=r=0,u=l;u>=0?r<u:r>u;s=u>=0?++r:--r)g.push(t[s]^o[s%i]);for(s=a=f=l,h=n;f<=h?a<h:a>h;s=f<=h?++a:--a)g.push(t[s]^o[(s-l)%i]);return g}getkey(t,n){let o;return n!=null?(()=>{let i,s,r;for(r=[],o=i=0,s=t;s>=0?i<s:i>s;o=s>=0?++i:--i)r.push(n[o]+this.kts[t*o]&255^this.kts[t*(t-1-o)]);return r})():t===12?this.keyL.slice(0):this.keyS.slice(0)}asymEncode(t,n){let o,i,s,r,a;for(s=128-11,a="",o=i=0,r=Math.floor((n+s-1)/s);r>=0?i<r:i>r;o=r>=0?++i:--i)a+=this.rsa.encrypt(this.bytesToString(t.slice(o*s,Math.min((o+1)*s,n))));return window.btoa(this.rsa.hex2a(a))}asymDecode(t,n){let o,i,s,r,a;for(s=128,a="",o=i=0,r=Math.floor((n+s-1)/s);r>=0?i<r:i>r;o=r>=0?++i:--i)a+=this.rsa.decrypt(this.bytesToString(t.slice(o*s,Math.min((o+1)*s,n))));return this.stringToBytes(a)}symEncode(t,n,o,i){let s,r,a;return s=this.getkey(4,o),r=this.getkey(12,i),a=this.xor115Enc(t,n,s,4),a.reverse(),a=this.xor115Enc(a,n,r,12),a}symDecode(t,n,o,i){let s,r,a;return s=this.getkey(4,o),r=this.getkey(12,i),a=this.xor115Enc(t,n,r,12),a.reverse(),a=this.xor115Enc(a,n,s,4),a}bytesToString(t){let n,o,i,s;for(s="",o=0,i=t.length;o<i;o++)n=t[o],s+=String.fromCharCode(n);return s}stringToBytes(t){let n,o,i;for(i=[],n=0,o=t.length;n<o;n++)i.push(t.charCodeAt(n));return i}encode(t,n){const o=this.stringToBytes(ut.hashStr(`!@###@#${n}DFDR@#@#`));let i=this.stringToBytes(t);return i=this.symEncode(i,i.length,o,null),i=o.slice(0,16).concat(i),{data:this.asymEncode(i,i.length),key:o}}decode(t,n){let o=this.stringToBytes(window.atob(t));return o=this.asymDecode(o,o.length),this.bytesToString(this.symDecode(o.slice(16),o.length-16,n,o.slice(0,16)))}}const Ly=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 My=e=>!Ly.has(e&&e.code);const ja="axios-retry";function Wu(e){const t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:My(e)}const Ku=["get","head","options"],Dy=Ku.concat(["put","delete"]);function Ua(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function Ry(e){var t;return(t=e.config)!=null&&t.method?Ua(e)&&Ku.indexOf(e.config.method)!==-1:!1}function Gu(e){var t;return(t=e.config)!=null&&t.method?Ua(e)&&Dy.indexOf(e.config.method)!==-1:!1}function Yu(e){return Wu(e)||Gu(e)}function Ju(e=void 0){var o;const t=(o=e==null?void 0:e.response)==null?void 0:o.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 Ny(e=0,t=void 0){return Math.max(0,Ju(t))}function By(e=0,t=void 0,n=100){const o=2**e*n,i=Math.max(o,Ju(t)),s=i*.2*Math.random();return i+s}const Fy={retries:3,retryCondition:Yu,retryDelay:Ny,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function jy(e,t){return{...Fy,...t,...e[ja]}}function Qu(e,t){const n=jy(e,t||{});return n.retryCount=n.retryCount||0,n.lastRequestTime=n.lastRequestTime||Date.now(),e[ja]=n,n}function Uy(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:o}=e,i=(e.retryCount||0)<n&&o(t);if(typeof i=="object")try{return await i!==!1}catch{return!1}return i}async function qy(e,t,n,o){var l;t.retryCount+=1;const{retryDelay:i,shouldResetTimeout:s,onRetry:r}=t,a=i(t.retryCount,n);if(Uy(e,o),!s&&o.timeout&&t.lastRequestTime){const u=Date.now()-t.lastRequestTime,f=o.timeout-u-a;if(f<=0)return Promise.reject(n);o.timeout=f}return o.transformRequest=[u=>u],await r(t.retryCount,n,o),(l=o.signal)!=null&&l.aborted?Promise.resolve(e(o)):new Promise(u=>{var g;const f=()=>{clearTimeout(h),u(e(o))},h=setTimeout(()=>{var b;u(e(o)),(b=o.signal)!=null&&b.removeEventListener&&o.signal.removeEventListener("abort",f)},a);(g=o.signal)!=null&&g.addEventListener&&o.signal.addEventListener("abort",f,{once:!0})})}async function zy(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}const $o=(e,t)=>{const n=e.interceptors.request.use(i=>{var s;return Qu(i,t),(s=i[ja])!=null&&s.validateResponse&&(i.validateStatus=()=>!1),i}),o=e.interceptors.response.use(null,async i=>{var a;const{config:s}=i;if(!s)return Promise.reject(i);const r=Qu(s,t);return i.response&&((a=r.validateResponse)==null?void 0:a.call(r,i.response))?i.response:await Hy(r,i)?qy(e,r,i,s):(await zy(r,i),Promise.reject(i))});return{requestInterceptorId:n,responseInterceptorId:o}};$o.isNetworkError=Wu,$o.isSafeRequestError=Ry,$o.isIdempotentRequestError=Gu,$o.isNetworkOrIdempotentRequestError=Yu,$o.exponentialDelay=By,$o.isRetryableError=Ua;var Gs=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'!")}},Vy=class{constructor(){this._keys={},this._addedKeysAmount=0}collectExpired(){const t=Date.now();Object.keys(this._keys).forEach(n=>{this._keys[n]<=t&&delete this._keys[n]}),this._addedKeysAmount=Object.keys(this._keys).length}add(t,n){this.addMs(t,n*1e3)}addMs(t,n){this._keys[t]=Date.now()+n,this._addedKeysAmount++,this._addedKeysAmount>999&&this.collectExpired()}msBeforeExpire(t){const n=this._keys[t];if(n&&n>=Date.now()){this.collectExpired();const o=Date.now();return n>=o?n-o:0}return 0}delete(t){t?delete this._keys[t]:Object.keys(this._keys).forEach(n=>{delete this._keys[n]})}},Wy=Vy,Ft=class{constructor(t,n,o,i){this.remainingPoints=typeof t>"u"?0:t,this.msBeforeNext=typeof n>"u"?0:n,this.consumedPoints=typeof o>"u"?0:o,this.isFirstInDuration=typeof i>"u"?!1:i}get msBeforeNext(){return this._msBeforeNext}set msBeforeNext(t){return this._msBeforeNext=t,this}get remainingPoints(){return this._remainingPoints}set remainingPoints(t){return this._remainingPoints=t,this}get consumedPoints(){return this._consumedPoints}set consumedPoints(t){return this._consumedPoints=t,this}get isFirstInDuration(){return this._isFirstInDuration}set isFirstInDuration(t){this._isFirstInDuration=Boolean(t)}_getDecoratedProperties(){return{remainingPoints:this.remainingPoints,msBeforeNext:this.msBeforeNext,consumedPoints:this.consumedPoints,isFirstInDuration:this.isFirstInDuration}}[Symbol.for("nodejs.util.inspect.custom")](){return this._getDecoratedProperties()}toString(){return JSON.stringify(this._getDecoratedProperties())}toJSON(){return this._getDecoratedProperties()}};const Ha=Gs,Ky=Wy,Xu=Ft;var Eo=class extends Ha{constructor(t={}){super(t),this.inMemoryBlockOnConsumed=t.inMemoryBlockOnConsumed,this.inMemoryBlockDuration=t.inMemoryBlockDuration,this.insuranceLimiter=t.insuranceLimiter,this._inMemoryBlockedKeys=new Ky}get client(){return this._client}set client(t){if(typeof t>"u")throw new Error("storeClient is not set");this._client=t}_afterConsume(t,n,o,i,s,r={}){const a=this._getRateLimiterRes(o,i,s);if(this.inMemoryBlockOnConsumed>0&&!(this.inMemoryBlockDuration>0)&&a.consumedPoints>=this.inMemoryBlockOnConsumed)return this._inMemoryBlockedKeys.addMs(o,a.msBeforeNext),a.consumedPoints>this.points?n(a):t(a);if(a.consumedPoints>this.points){let l=Promise.resolve();this.blockDuration>0&&a.consumedPoints<=this.points+i&&(a.msBeforeNext=this.msBlockDuration,l=this._block(o,a.consumedPoints,this.msBlockDuration,r)),this.inMemoryBlockOnConsumed>0&&a.consumedPoints>=this.inMemoryBlockOnConsumed&&(this._inMemoryBlockedKeys.add(o,this.inMemoryBlockDuration),a.msBeforeNext=this.msInMemoryBlockDuration),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,o,i,s,r=!1,a={}){this.insuranceLimiter instanceof Ha?this.insuranceLimiter[n](s,r,a).then(l=>{o(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 Ha))throw new Error("insuranceLimiter must be instance of RateLimiterAbstract");this._insuranceLimiter=t,this._insuranceLimiter&&(this._insuranceLimiter.blockDuration=this.blockDuration,this._insuranceLimiter.execEvenly=this.execEvenly)}block(t,n,o={}){const i=n*1e3;return this._block(this.getKey(t),this.points+1,i,o)}set(t,n,o,i={}){const s=(o>=0?o:this.duration)*1e3;return this._block(this.getKey(t),n,s,i)}consume(t,n=1,o={}){return new Promise((i,s)=>{const r=this.getKey(t),a=this.getInMemoryBlockMsBeforeExpire(r);if(a>0)return s(new Xu(0,a));this._upsert(r,n,this._getKeySecDuration(o)*1e3,!1,o).then(l=>{this._afterConsume(i,s,r,n,l)}).catch(l=>{this._handleError(l,"consume",i,s,t,n,o)})})}penalty(t,n=1,o={}){const i=this.getKey(t);return new Promise((s,r)=>{this._upsert(i,n,this._getKeySecDuration(o)*1e3,!1,o).then(a=>{s(this._getRateLimiterRes(i,n,a))}).catch(a=>{this._handleError(a,"penalty",s,r,t,n,o)})})}reward(t,n=1,o={}){const i=this.getKey(t);return new Promise((s,r)=>{this._upsert(i,-n,this._getKeySecDuration(o)*1e3,!1,o).then(a=>{s(this._getRateLimiterRes(i,-n,a))}).catch(a=>{this._handleError(a,"reward",s,r,t,n,o)})})}get(t,n={}){const o=this.getKey(t);return new Promise((i,s)=>{this._get(o,n).then(r=>{i(r===null||typeof r>"u"?null:this._getRateLimiterRes(o,0,r))}).catch(r=>{this._handleError(r,"get",i,s,t,n)})})}delete(t,n={}){const o=this.getKey(t);return new Promise((i,s)=>{this._delete(o,n).then(r=>{this._inMemoryBlockedKeys.delete(o),i(r)}).catch(r=>{this._handleError(r,"delete",i,s,t,n)})})}deleteInMemoryBlockedAll(){this._inMemoryBlockedKeys.delete()}_getRateLimiterRes(t,n,o){throw new Error("You have to implement the method '_getRateLimiterRes'!")}_block(t,n,o,i={}){return new Promise((s,r)=>{this._upsert(t,n,o,!0,i).then(()=>{s(new Xu(0,o>0?o:-1,n))}).catch(a=>{this._handleError(a,"block",s,r,this.parseKey(t),o/1e3,i)})})}_get(t,n={}){throw new Error("You have to implement the method '_get'!")}_delete(t,n={}){throw new Error("You have to implement the method '_delete'!")}_upsert(t,n,o,i=!1,s={}){throw new Error("You have to implement the method '_upsert'!")}};const Gy=Eo,Yy=Ft,Jy="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 Qy extends Gy{constructor(t){super(t),this.client=t.storeClient,this._rejectIfRedisNotReady=!!t.rejectIfRedisNotReady,this._incrTtlLuaScript=t.customIncrTtlLuaScript||Jy,this.useRedisPackage=t.useRedisPackage||this.client.constructor.name==="Commander"||!1,this.useRedis3AndLowerPackage=t.useRedis3AndLowerPackage,typeof this.client.defineCommand=="function"&&this.client.defineCommand("rlflxIncr",{numberOfKeys:1,lua:this._incrTtlLuaScript})}_isRedisReady(){return this._rejectIfRedisNotReady?!(this.client.status&&this.client.status!=="ready"||typeof this.client.isReady=="function"&&!this.client.isReady()):!0}_getRateLimiterRes(t,n,o){let[i,s]=o;Array.isArray(i)&&([,i]=i,[,s]=s);const r=new Yy;return r.consumedPoints=parseInt(i),r.isFirstInDuration=r.consumedPoints===n,r.remainingPoints=Math.max(this.points-r.consumedPoints,0),r.msBeforeNext=s,r}async _upsert(t,n,o,i=!1){if(!this._isRedisReady())throw new Error("Redis connection is not ready");const s=Math.floor(o/1e3),r=this.client.multi();return i?(s>0?!this.useRedisPackage&&!this.useRedis3AndLowerPackage?r.set(t,n,"EX",s):r.set(t,n,{EX:s}):r.set(t,n),!this.useRedisPackage&&!this.useRedis3AndLowerPackage?r.pttl(t).exec(!0):r.pTTL(t).exec(!0)):s>0?!this.useRedisPackage&&!this.useRedis3AndLowerPackage?this.client.rlflxIncr([t].concat([String(n),String(s),String(this.points),String(this.duration)])):this.useRedis3AndLowerPackage?new Promise((a,l)=>{const u=function(f,h){return f?l(f):a(h)};typeof this.client.rlflxIncr=="function"?this.client.rlflxIncr(t,n,s,this.points,this.duration,u):this.client.eval(this._incrTtlLuaScript,1,t,n,s,this.points,this.duration,u)}):this.client.eval(this._incrTtlLuaScript,{keys:[t],arguments:[String(n),String(s),String(this.points),String(this.duration)]}):!this.useRedisPackage&&!this.useRedis3AndLowerPackage?r.incrby(t,n).pttl(t).exec(!0):r.incrBy(t,n).pTTL(t).exec(!0)}async _get(t){if(!this._isRedisReady())throw new Error("Redis connection is not ready");return!this.useRedisPackage&&!this.useRedis3AndLowerPackage?this.client.multi().get(t).pttl(t).exec().then(n=>{const[[,o]]=n;return o===null?null:n}):this.client.multi().get(t).pTTL(t).exec(!0).then(n=>{const[o]=n;return o===null?null:n})}_delete(t){return this.client.del(t).then(n=>n>0)}}var Xy=Qy;const Zy=Eo,ew=Ft;function Zu(e){try{const t=e.client?e.client:e;let n=[0,0,0];if(typeof t.topology>"u"){const{version:o}=t.options.metadata.driver;n=o.split("|",1)[0].split(".").map(i=>parseInt(i))}else{const{version:o}=t.topology.s.options.metadata.driver;n=o.split(".").map(i=>parseInt(i))}return{major:n[0],feature:n[1],patch:n[2]}}catch{return{major:0,feature:0,patch:0}}}class qa extends Zy{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=Zu(this.client)}):(this._initCollection(),this._driverVersion=Zu(this.client))}get dbName(){return this._dbName}set dbName(t){this._dbName=typeof t>"u"?qa.getDbName():t}static getDbName(){return"node-rate-limiter-flexible"}get tableName(){return this._tableName}set tableName(t){this._tableName=typeof t>"u"?this.keyPrefix:t}get client(){return this._client}set client(t){if(typeof t>"u")throw new Error("mongo is not set");this._client=t}get indexKeyPrefix(){return this._indexKeyPrefix}set indexKeyPrefix(t){this._indexKeyPrefix=t||{}}_initCollection(){const n=(typeof this.client.db=="function"?this.client.db(this.dbName):this.client).collection(this.tableName);n.createIndex({expire:-1},{expireAfterSeconds:0}),n.createIndex(Object.assign({},this.indexKeyPrefix,{key:1}),{unique:!0}),this._collection=n}_getRateLimiterRes(t,n,o){const i=new ew;let s;return typeof o.value>"u"?s=o:s=o.value,i.isFirstInDuration=s.points===n,i.consumedPoints=s.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=s.expire!==null?Math.max(new Date(s.expire).getTime()-Date.now(),0):-1,i}_upsert(t,n,o,i=!1,s={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const r=s.attrs||{};let a,l;i?(a={key:t},a=Object.assign(a,r),l={$set:{key:t,points:n,expire:o>0?new Date(Date.now()+o):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:o>0?new Date(Date.now()+o):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(g=>{f(g)}).catch(g=>{if(g&&g.code===11e3){const b=Object.assign({$or:[{expire:{$lte:new Date}},{expire:{$eq:null}}],key:t},r),_={$set:Object.assign({key:t,points:n,expire:o>0?new Date(Date.now()+o):null},r)};this._collection.findOneAndUpdate(b,_,u).then(E=>{f(E)}).catch(E=>{E&&E.code===11e3?this._upsert(t,n,o,i).then(T=>f(T)).catch(T=>h(T)):h(E)})}else h(g)})})}_get(t,n={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const o=n.attrs||{},i=Object.assign({key:t,$or:[{expire:{$gt:new Date}},{expire:{$eq:null}}]},o);return this._collection.findOne(i)}_delete(t,n={}){if(!this._collection)return Promise.reject(Error("Mongo connection is not established"));const o=n.attrs||{},i=Object.assign({key:t},o);return this._collection.deleteOne(i).then(s=>s.deletedCount>0)}}var tw=qa;const nw=Eo,ow=Ft;class iw extends nw{constructor(t,n=null){super(t),this.client=t.storeClient,this.clientType=t.storeType,this.dbName=t.dbName,this.tableName=t.tableName,this.clearExpiredByTimeout=t.clearExpiredByTimeout,this.tableCreated=t.tableCreated,this.tableCreated?(this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),typeof n=="function"&&n()):this._createDbAndTable().then(()=>{this.tableCreated=!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),typeof n=="function"&&n()}).catch(o=>{if(typeof n=="function")n(o);else throw o})}clearExpired(t){return new Promise(n=>{this._getConnection().then(o=>{o.query("DELETE FROM ??.?? WHERE expire < ?",[this.dbName,this.tableName,t],()=>{this._releaseConnection(o),n()})}).catch(()=>{n()})})}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(()=>{this.clearExpired(Date.now()-36e5).then(()=>{this._clearExpiredHourAgo()})},3e5),this._clearExpiredTimeoutId.unref()}_getConnection(){switch(this.clientType){case"pool":return new Promise((t,n)=>{this.client.getConnection((o,i)=>{if(o)return n(o);t(i)})});case"sequelize":return this.client.connectionManager.getConnection();case"knex":return this.client.client.acquireConnection();default:return Promise.resolve(this.client)}}_releaseConnection(t){switch(this.clientType){case"pool":return t.release();case"sequelize":return this.client.connectionManager.releaseConnection(t);case"knex":return this.client.client.releaseConnection(t);default:return!0}}_createDbAndTable(){return new Promise((t,n)=>{this._getConnection().then(o=>{o.query(`CREATE DATABASE IF NOT EXISTS \`${this.dbName}\`;`,i=>{if(i)return this._releaseConnection(o),n(i);o.query(this._getCreateTableStmt(),s=>{if(s)return this._releaseConnection(o),n(s);this._releaseConnection(o),t()})})}).catch(o=>{n(o)})})}_getCreateTableStmt(){return`CREATE TABLE IF NOT EXISTS \`${this.dbName}\`.\`${this.tableName}\` (\`key\` VARCHAR(255) CHARACTER SET utf8 NOT NULL,\`points\` INT(9) NOT NULL default 0,\`expire\` BIGINT UNSIGNED,PRIMARY KEY (\`key\`)) ENGINE = INNODB;`}get clientType(){return this._clientType}set clientType(t){if(typeof t>"u")if(this.client.constructor.name==="Connection")t="connection";else if(this.client.constructor.name==="Pool")t="pool";else if(this.client.constructor.name==="Sequelize")t="sequelize";else throw new Error("storeType is not defined");this._clientType=t.toLowerCase()}get dbName(){return this._dbName}set dbName(t){this._dbName=typeof t>"u"?"rtlmtrflx":t}get tableName(){return this._tableName}set tableName(t){this._tableName=typeof t>"u"?this.keyPrefix:t}get tableCreated(){return this._tableCreated}set tableCreated(t){this._tableCreated=typeof t>"u"?!1:!!t}get clearExpiredByTimeout(){return this._clearExpiredByTimeout}set clearExpiredByTimeout(t){this._clearExpiredByTimeout=typeof t>"u"?!0:Boolean(t)}_getRateLimiterRes(t,n,o){const i=new ow,[s]=o;return i.isFirstInDuration=n===s.points,i.consumedPoints=i.isFirstInDuration?n:s.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=s.expire?Math.max(s.expire-Date.now(),0):-1,i}_upsertTransaction(t,n,o,i,s){return new Promise((r,a)=>{t.query("BEGIN",l=>{if(l)return t.rollback(),a(l);const u=Date.now(),f=i>0?u+i:null;let h,g;s?(h=`INSERT INTO ??.?? VALUES (?, ?, ?)
          ON DUPLICATE KEY UPDATE 
            points = ?, 
            expire = ?;`,g=[this.dbName,this.tableName,n,o,f,o,f]):(h=`INSERT INTO ??.?? VALUES (?, ?, ?)
          ON DUPLICATE KEY UPDATE 
            points = IF(expire <= ?, ?, points + (?)), 
            expire = IF(expire <= ?, ?, expire);`,g=[this.dbName,this.tableName,n,o,f,u,o,o,u,f]),t.query(h,g,b=>{if(b)return t.rollback(),a(b);t.query("SELECT points, expire FROM ??.?? WHERE `key` = ?;",[this.dbName,this.tableName,n],(_,E)=>{if(_)return t.rollback(),a(_);t.query("COMMIT",T=>{if(T)return t.rollback(),a(T);r(E)})})})})})}_upsert(t,n,o,i=!1){return this.tableCreated?new Promise((s,r)=>{this._getConnection().then(a=>{this._upsertTransaction(a,t,n,o,i).then(l=>{s(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,o)=>{this._getConnection().then(i=>{i.query("SELECT points, expire FROM ??.?? WHERE `key` = ? AND (`expire` > ? OR `expire` IS NULL)",[this.dbName,this.tableName,t,Date.now()],(s,r)=>{s?o(s):r.length===0?n(null):n(r),this._releaseConnection(i)})}).catch(i=>{o(i)})}):Promise.reject(Error("Table is not created yet"))}_delete(t){return this.tableCreated?new Promise((n,o)=>{this._getConnection().then(i=>{i.query("DELETE FROM ??.?? WHERE `key` = ?",[this.dbName,this.tableName,t],(s,r)=>{s?o(s):n(r.affectedRows>0),this._releaseConnection(i)})}).catch(i=>{o(i)})}):Promise.reject(Error("Table is not created yet"))}}var sw=iw;const rw=Eo,aw=Ft;class lw extends rw{constructor(t,n=null){super(t),this.client=t.storeClient,this.clientType=t.storeType,this.tableName=t.tableName,this.schemaName=t.schemaName,this.clearExpiredByTimeout=t.clearExpiredByTimeout,this.tableCreated=t.tableCreated,this.tableCreated?(this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),typeof n=="function"&&n()):this._createTable().then(()=>{this.tableCreated=!0,this.clearExpiredByTimeout&&this._clearExpiredHourAgo(),typeof n=="function"&&n()}).catch(o=>{if(typeof n=="function")n(o);else throw o})}_getTableIdentifier(){return this.schemaName?`"${this.schemaName}"."${this.tableName}"`:`"${this.tableName}"`}clearExpired(t){return new Promise(n=>{const o={name:"rlflx-clear-expired",text:`DELETE FROM ${this._getTableIdentifier()} WHERE expire < $1`,values:[t]};this._query(o).then(()=>{n()}).catch(()=>{n()})})}_clearExpiredHourAgo(){this._clearExpiredTimeoutId&&clearTimeout(this._clearExpiredTimeoutId),this._clearExpiredTimeoutId=setTimeout(()=>{this.clearExpired(Date.now()-36e5).then(()=>{this._clearExpiredHourAgo()})},3e5),this._clearExpiredTimeoutId.unref()}_getConnection(){switch(this.clientType){case"pool":return Promise.resolve(this.client);case"sequelize":return this.client.connectionManager.getConnection();case"knex":return this.client.client.acquireConnection();case"typeorm":return Promise.resolve(this.client.driver.master);default:return Promise.resolve(this.client)}}_releaseConnection(t){switch(this.clientType){case"pool":return!0;case"sequelize":return this.client.connectionManager.releaseConnection(t);case"knex":return this.client.client.releaseConnection(t);case"typeorm":return!0;default:return!0}}_createTable(){return new Promise((t,n)=>{this._query({text:this._getCreateTableStmt()}).then(()=>{t()}).catch(o=>{o.code==="23505"?t():n(o)})})}_getCreateTableStmt(){return`CREATE TABLE IF NOT EXISTS ${this._getTableIdentifier()} (
      key varchar(255) PRIMARY KEY,
      points integer NOT NULL DEFAULT 0,
      expire bigint
    );`}get clientType(){return this._clientType}set clientType(t){const n=this.client.constructor.name;if(typeof t>"u")if(n==="Client")t="client";else if(n==="Pool"||n==="BoundPool")t="pool";else if(n==="Sequelize")t="sequelize";else throw new Error("storeType is not defined");this._clientType=t.toLowerCase()}get tableName(){return this._tableName}set tableName(t){this._tableName=typeof t>"u"?this.keyPrefix:t}get schemaName(){return this._schemaName}set schemaName(t){this._schemaName=t}get tableCreated(){return this._tableCreated}set tableCreated(t){this._tableCreated=typeof t>"u"?!1:!!t}get clearExpiredByTimeout(){return this._clearExpiredByTimeout}set clearExpiredByTimeout(t){this._clearExpiredByTimeout=typeof t>"u"?!0:Boolean(t)}_getRateLimiterRes(t,n,o){const i=new aw,s=o.rows[0];return i.isFirstInDuration=n===s.points,i.consumedPoints=i.isFirstInDuration?n:s.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=s.expire?Math.max(s.expire-Date.now(),0):-1,i}_query(t){const o={name:`${this.tableName.toLowerCase()}:${t.name}`,text:t.text,values:t.values};return new Promise((i,s)=>{this._getConnection().then(r=>{r.query(o).then(a=>{i(a),this._releaseConnection(r)}).catch(a=>{s(a),this._releaseConnection(r)})}).catch(r=>{s(r)})})}_upsert(t,n,o,i=!1){if(!this.tableCreated)return Promise.reject(Error("Table is not created yet"));const s=o>0?Date.now()+o:null,r=i?" $3 ":` CASE
             WHEN ${this._getTableIdentifier()}.expire <= $4 THEN $3
             ELSE ${this._getTableIdentifier()}.expire
            END `;return this._query({name:i?"rlflx-upsert-force":"rlflx-upsert",text:`
            INSERT INTO ${this._getTableIdentifier()} VALUES ($1, $2, $3)
              ON CONFLICT(key) DO UPDATE SET
                points = CASE
                          WHEN (${this._getTableIdentifier()}.expire <= $4 OR 1=${i?1:0}) THEN $2
                          ELSE ${this._getTableIdentifier()}.points + ($2)
                         END,
                expire = ${r}
            RETURNING points, expire;`,values:[t,n,s,Date.now()]})}_get(t){return this.tableCreated?new Promise((n,o)=>{this._query({name:"rlflx-get",text:`
            SELECT points, expire FROM ${this._getTableIdentifier()} WHERE key = $1 AND (expire > $2 OR expire IS NULL);`,values:[t,Date.now()]}).then(i=>{i.rowCount===0&&(i=null),n(i)}).catch(i=>{o(i)})}):Promise.reject(Error("Table is not created yet"))}_delete(t){return this.tableCreated?this._query({name:"rlflx-delete",text:`DELETE FROM ${this._getTableIdentifier()} WHERE key = $1`,values:[t]}).then(n=>n.rowCount>0):Promise.reject(Error("Table is not created yet"))}}var cw=lw;const ed=ag(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var uw=class{constructor(t,n,o=null){this.value=t,this.expiresAt=n,this.timeoutId=o}get value(){return this._value}set value(t){this._value=parseInt(t)}get expiresAt(){return this._expiresAt}set expiresAt(t){!(t instanceof Date)&&Number.isInteger(t)&&(t=new Date(t)),this._expiresAt=t}get timeoutId(){return this._timeoutId}set timeoutId(t){this._timeoutId=t}};const dw=uw,za=Ft;var fw=class{constructor(){this._storage={}}incrby(t,n,o){if(this._storage[t]){const i=this._storage[t].expiresAt?this._storage[t].expiresAt.getTime()-new Date().getTime():-1;return!this._storage[t].expiresAt||i>0?(this._storage[t].value=this._storage[t].value+n,new za(0,i,this._storage[t].value,!1)):this.set(t,n,o)}return this.set(t,n,o)}set(t,n,o){const i=o*1e3;return this._storage[t]&&this._storage[t].timeoutId&&clearTimeout(this._storage[t].timeoutId),this._storage[t]=new dw(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 za(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 za(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 pw=Gs,hw=fw,td=Ft;class mw extends pw{constructor(t={}){super(t),this._memoryStorage=new hw}consume(t,n=1,o={}){return new Promise((i,s)=>{const r=this.getKey(t),a=this._getKeySecDuration(o);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)),s(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,o={}){const i=this.getKey(t);return new Promise(s=>{const r=this._getKeySecDuration(o),a=this._memoryStorage.incrby(i,n,r);a.remainingPoints=Math.max(this.points-a.consumedPoints,0),s(a)})}reward(t,n=1,o={}){const i=this.getKey(t);return new Promise(s=>{const r=this._getKeySecDuration(o),a=this._memoryStorage.incrby(i,-n,r);a.remainingPoints=Math.max(this.points-a.consumedPoints,0),s(a)})}block(t,n){const o=n*1e3,i=this.points+1;return this._memoryStorage.set(this.getKey(t),i,n),Promise.resolve(new td(0,o===0?-1:o,i))}set(t,n,o){const i=(o>=0?o:this.duration)*1e3;return this._memoryStorage.set(this.getKey(t),n,o),Promise.resolve(new td(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 nd=mw;const od=ed,gw=ed,yw=Gs,id=nd,ww=Ft,Jt="rate_limiter_flexible";let ni=null;const sd=function(e,t,n,o){let i;o===null||o===!0||o===!1?i=o:i={remainingPoints:o.remainingPoints,msBeforeNext:o.msBeforeNext,consumedPoints:o.consumedPoints,isFirstInDuration:o.isFirstInDuration},e.send({channel:Jt,keyPrefix:t.keyPrefix,promiseId:t.promiseId,type:n,data:i})},rd=function(e){setTimeout(()=>{this._initiated?process.send(e):typeof this._promises[e.promiseId]<"u"&&rd.call(this,e)},30)},oi=function(e,t,n,o,i){const s={channel:Jt,keyPrefix:this.keyPrefix,func:e,promiseId:t,data:{key:n,arg:o,opts:i}};this._initiated?process.send(s):rd.call(this,s)},ad=function(e,t){if(!t||t.channel!==Jt||typeof this._rateLimiters[t.keyPrefix]>"u")return!1;let n;switch(t.func){case"consume":n=this._rateLimiters[t.keyPrefix].consume(t.data.key,t.data.arg,t.data.opts);break;case"penalty":n=this._rateLimiters[t.keyPrefix].penalty(t.data.key,t.data.arg,t.data.opts);break;case"reward":n=this._rateLimiters[t.keyPrefix].reward(t.data.key,t.data.arg,t.data.opts);break;case"block":n=this._rateLimiters[t.keyPrefix].block(t.data.key,t.data.arg,t.data.opts);break;case"get":n=this._rateLimiters[t.keyPrefix].get(t.data.key,t.data.opts);break;case"delete":n=this._rateLimiters[t.keyPrefix].delete(t.data.key,t.data.opts);break;default:return!1}n&&n.then(o=>{sd(e,t,"resolve",o)}).catch(o=>{sd(e,t,"reject",o)})},bw=function(e){if(!e||e.channel!==Jt||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 ww(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]}},_w=function(){return{points:this.points,duration:this.duration,blockDuration:this.blockDuration,execEvenly:this.execEvenly,execEvenlyMinDelayMs:this.execEvenlyMinDelayMs,keyPrefix:this.keyPrefix}},ii=function(e,t){const n=process.hrtime();let o=n[0].toString()+n[1].toString();return typeof this._promises[o]<"u"&&(o+=gw.randomBytes(12).toString("base64")),this._promises[o]={resolve:e,reject:t,timeoutId:setTimeout(()=>{delete this._promises[o],t(new Error("RateLimiterCluster timeout: no answer from master in time"))},this.timeoutMs)},o};class vw{constructor(){if(ni)return ni;this._rateLimiters={},od.setMaxListeners(0),od.on("message",(t,n)=>{n&&n.channel===Jt&&n.type==="init"?(typeof this._rateLimiters[n.opts.keyPrefix]>"u"&&(this._rateLimiters[n.opts.keyPrefix]=new id(n.opts)),t.send({channel:Jt,type:"init",keyPrefix:n.opts.keyPrefix})):ad.call(this,t,n)}),ni=this}}class xw{constructor(t){if(ni)return ni;this._rateLimiters={},t.launchBus((n,o)=>{o.on("process:msg",i=>{const s=i.raw;if(s&&s.channel===Jt&&s.type==="init")typeof this._rateLimiters[s.opts.keyPrefix]>"u"&&(this._rateLimiters[s.opts.keyPrefix]=new id(s.opts)),t.sendDataToProcessId(i.process.pm_id,{data:{},topic:Jt,channel:Jt,type:"init",keyPrefix:s.opts.keyPrefix},(r,a)=>{r&&console.log(r,a)});else{const r={send:a=>{const l=a;l.topic=Jt,typeof l.data>"u"&&(l.data={}),t.sendDataToProcessId(i.process.pm_id,l,(u,f)=>{u&&console.log(u,f)})}};ad.call(this,r,s)}})}),ni=this}}class Cw extends yw{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===Jt&&n.type==="init"&&n.keyPrefix===this.keyPrefix?this._initiated=!0:bw.call(this,n)}),process.send({channel:Jt,type:"init",opts:_w.call(this)}),this._promises={}}consume(t,n=1,o={}){return new Promise((i,s)=>{const r=ii.call(this,i,s);oi.call(this,"consume",r,t,n,o)})}penalty(t,n=1,o={}){return new Promise((i,s)=>{const r=ii.call(this,i,s);oi.call(this,"penalty",r,t,n,o)})}reward(t,n=1,o={}){return new Promise((i,s)=>{const r=ii.call(this,i,s);oi.call(this,"reward",r,t,n,o)})}block(t,n,o={}){return new Promise((i,s)=>{const r=ii.call(this,i,s);oi.call(this,"block",r,t,n,o)})}get(t,n={}){return new Promise((o,i)=>{const s=ii.call(this,o,i);oi.call(this,"get",s,t,n)})}delete(t,n={}){return new Promise((o,i)=>{const s=ii.call(this,o,i);oi.call(this,"delete",s,t,n)})}}var $w={RateLimiterClusterMaster:vw,RateLimiterClusterMasterPM2:xw,RateLimiterCluster:Cw};const Ew=Eo,kw=Ft;class Sw extends Ew{constructor(t){super(t),this.client=t.storeClient}_getRateLimiterRes(t,n,o){const i=new kw;return i.consumedPoints=parseInt(o.consumedPoints),i.isFirstInDuration=o.consumedPoints===n,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=o.msBeforeNext,i}_upsert(t,n,o,i=!1,s={}){return new Promise((r,a)=>{const l=Date.now(),u=Math.floor(o/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,(g,b)=>{if(g||!b)if(typeof s.attemptNumber>"u"||s.attemptNumber<3){const _=Object.assign({},s);_.attemptNumber=_.attemptNumber?_.attemptNumber+1:1,this._upsert(t,n,o,i,_).then(E=>r(E)).catch(E=>a(E))}else a(new Error("Can not add key"));else this.client.add(`${t}_expire`,u>0?l+u*1e3:-1,u,()=>{const _={consumedPoints:n,msBeforeNext:u>0?u*1e3:-1};r(_)})}):this.client.get(`${t}_expire`,(g,b)=>{if(g)a(g);else{const _=b===!1?0:b,E={consumedPoints:h,msBeforeNext:_>=0?Math.max(_-l,0):-1};r(E)}})})})}_get(t){return new Promise((n,o)=>{const i=Date.now();this.client.get(t,(s,r)=>{r?this.client.get(`${t}_expire`,(a,l)=>{if(a)o(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,o)=>{this.client.del(t,(i,s)=>{i?o(i):s===!1?n(s):this.client.del(`${t}_expire`,r=>{r?o(r):n(s)})})})}}var Aw=Sw;const ld=Ft;var Pw=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 ld(0,Number.MAX_SAFE_INTEGER,0,!1)}getWhiteRes(){return new ld(Number.MAX_SAFE_INTEGER,0,0,!1)}rejectBlack(){return Promise.reject(this.getBlackRes())}resolveBlack(){return Promise.resolve(this.getBlackRes())}resolveWhite(){return Promise.resolve(this.getWhiteRes())}consume(t,n=1){let o;return this.isWhiteListedSomewhere(t)?o=this.resolveWhite():this.isBlackListedSomewhere(t)&&(o=this.rejectBlack()),typeof o>"u"?this.limiter.consume(t,n):(this.runActionAnyway&&this.limiter.consume(t,n).catch(()=>{}),o)}block(t,n){let o;return this.isWhiteListedSomewhere(t)?o=this.resolveWhite():this.isBlackListedSomewhere(t)&&(o=this.resolveBlack()),typeof o>"u"?this.limiter.block(t,n):(this.runActionAnyway&&this.limiter.block(t,n).catch(()=>{}),o)}penalty(t,n){let o;return this.isWhiteListedSomewhere(t)?o=this.resolveWhite():this.isBlackListedSomewhere(t)&&(o=this.resolveBlack()),typeof o>"u"?this.limiter.penalty(t,n):(this.runActionAnyway&&this.limiter.penalty(t,n).catch(()=>{}),o)}reward(t,n){let o;return this.isWhiteListedSomewhere(t)?o=this.resolveWhite():this.isBlackListedSomewhere(t)&&(o=this.resolveBlack()),typeof o>"u"?this.limiter.reward(t,n):(this.runActionAnyway&&this.limiter.reward(t,n).catch(()=>{}),o)}get(t){let n;return this.isWhiteListedSomewhere(t)?n=this.resolveWhite():this.isBlackListedSomewhere(t)&&(n=this.resolveBlack()),typeof n>"u"||this.runActionAnyway?this.limiter.get(t):n}delete(t){return this.limiter.delete(t)}};const Tw=Gs;var Iw=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 Tw))throw new Error("RateLimiterUnion: all limiters have to be instance of RateLimiterAbstract")}),this._limiters=t}consume(t,n=1){return new Promise((o,i)=>{const s=[];this._limiters.forEach(r=>{s.push(r.consume(t,n).catch(a=>({rejected:!0,rej:a})))}),Promise.all(s).then(r=>{const a={};let 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):o(a)})})}},Ow=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 cd=Ow,ud=4294967295,Va="limiter";var Lw=class{constructor(t,n={maxQueueSize:ud}){this._queueLimiters={KEY_DEFAULT:new dd(t,n)},this._limiterFlexible=t,this._maxQueueSize=n.maxQueueSize}getTokensRemaining(t=Va){return this._queueLimiters[t]?this._queueLimiters[t].getTokensRemaining():Promise.resolve(this._limiterFlexible.points)}removeTokens(t,n=Va){return this._queueLimiters[n]||(this._queueLimiters[n]=new dd(this._limiterFlexible,{key:n,maxQueueSize:this._maxQueueSize})),this._queueLimiters[n].removeTokens(t)}};class dd{constructor(t,n={maxQueueSize:ud,key:Va}){this._key=n.key,this._waitTimeout=null,this._queue=[],this._limiterFlexible=t,this._maxQueueSize=n.maxQueueSize}getTokensRemaining(){return this._limiterFlexible.get(this._key).then(t=>t!==null?t.remainingPoints:this._limiterFlexible.points)}removeTokens(t){const n=this;return new Promise((o,i)=>{if(t>n._limiterFlexible.points){i(new cd(`Requested tokens ${t} exceeds maximum ${n._limiterFlexible.points} tokens per interval`));return}n._queue.length>0?n._queueRequest.call(n,o,i,t):n._limiterFlexible.consume(n._key,t).then(s=>{o(s.remainingPoints)}).catch(s=>{s instanceof Error?i(s):(n._queueRequest.call(n,o,i,t),n._waitTimeout===null&&(n._waitTimeout=setTimeout(n._processFIFO.bind(n),s.msBeforeNext)))})})}_queueRequest(t,n,o){const i=this;i._queue.length<i._maxQueueSize?i._queue.push({resolve:t,reject:n,tokens:o}):n(new cd(`Number of requests reached it's maximum ${i._maxQueueSize}`))}_processFIFO(){const t=this;if(t._waitTimeout!==null&&(clearTimeout(t._waitTimeout),t._waitTimeout=null),t._queue.length===0)return;const n=t._queue.shift();t._limiterFlexible.consume(t._key,n.tokens).then(o=>{n.resolve(o.remainingPoints),t._processFIFO.call(t)}).catch(o=>{o instanceof Error?(n.reject(o),t._processFIFO.call(t)):(t._queue.unshift(n),t._waitTimeout===null&&(t._waitTimeout=setTimeout(t._processFIFO.bind(t),o.msBeforeNext)))})}}const Wa=Ft;var Mw=class{constructor(t,n){this._rateLimiter=t,this._burstLimiter=n}_combineRes(t,n){return t?new Wa(t.remainingPoints,Math.min(t.msBeforeNext,n?n.msBeforeNext:0),t.consumedPoints,t.isFirstInDuration):null}consume(t,n=1,o={}){return this._rateLimiter.consume(t,n,o).catch(i=>i instanceof Wa?this._burstLimiter.consume(t,n,o).then(s=>Promise.resolve(this._combineRes(i,s))).catch(s=>s instanceof Wa?Promise.reject(this._combineRes(i,s)):Promise.reject(s)):Promise.reject(i))}get(t){return Promise.all([this._rateLimiter.get(t),this._burstLimiter.get(t)]).then(([n,o])=>this._combineRes(n,o))}get points(){return this._rateLimiter.points}};const Dw=Ft,Rw=Eo;class fd{constructor(t,n,o){this.key=t,this.points=n,this.expire=o}}const Nw=25,Bw=25;class Fw extends Rw{constructor(t,n=null){super(t),this.client=t.storeClient,this.tableName=t.tableName,this.tableCreated=t.tableCreated,this.tableCreated?this._setTTL().finally(()=>{typeof n=="function"&&n()}):this._createTable(t.dynamoTableOpts).then(o=>{this.tableCreated=!0,this._setTTL().finally(()=>{typeof n=="function"&&n()})}).catch(o=>{if(typeof n=="function")n(o);else throw o})}get tableName(){return this._tableName}set tableName(t){this._tableName=typeof t>"u"?"node-rate-limiter-flexible":t}get tableCreated(){return this._tableCreated}set tableCreated(t){this._tableCreated=typeof t>"u"?!1:!!t}async _createTable(t){const n={TableName:this.tableName,AttributeDefinitions:[{AttributeName:"key",AttributeType:"S"}],KeySchema:[{AttributeName:"key",KeyType:"HASH"}],ProvisionedThroughput:{ReadCapacityUnits:t&&t.readCapacityUnits?t.readCapacityUnits:Nw,WriteCapacityUnits:t&&t.writeCapacityUnits?t.writeCapacityUnits:Bw}};try{return await this.client.createTable(n)}catch(o){if(o.__type&&o.__type.includes("ResourceInUseException"))return null;throw o}}async _get(t){if(!this.tableCreated)throw new Error("Table is not created yet");const n={TableName:this.tableName,Key:{key:{S:t}}},o=await this.client.getItem(n);return o.Item?new fd(o.Item.key.S,Number(o.Item.points.N),Number(o.Item.expire.N)):null}async _delete(t){if(!this.tableCreated)throw new Error("Table is not created yet");const n={TableName:this.tableName,Key:{key:{S:t}},ConditionExpression:"attribute_exists(#k)",ExpressionAttributeNames:{"#k":"key"}};try{return(await this._client.deleteItem(n)).$metadata.httpStatusCode===200}catch(o){if(o.__type&&o.__type.includes("ConditionalCheckFailedException"))return!1;throw o}}async _upsert(t,n,o,i=!1,s={}){if(!this.tableCreated)throw new Error("Table is not created yet");const r=Date.now(),a=r/1e3,l=o>0?(r+o)/1e3:-1;if(i)return await this._baseUpsert({TableName:this.tableName,Key:{key:{S:t}},UpdateExpression:"SET points = :points, expire = :expire",ExpressionAttributeValues:{":points":{N:n.toString()},":expire":{N: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 fd(n.Attributes.key.S,Number(n.Attributes.points.N),Number(n.Attributes.expire.N))}catch(n){throw n}}async _setTTL(){if(!this.tableCreated)throw new Error("Table is not created yet");try{if(await this._isTTLSet())return;const n={TableName:this.tableName,TimeToLiveSpecification:{AttributeName:"expire",Enabled:!0}};return await this.client.updateTimeToLive(n)}catch(t){throw t}}async _isTTLSet(){if(!this.tableCreated)throw new Error("Table is not created yet");try{const t=await this.client.describeTimeToLive({TableName:this.tableName});return t.$metadata.httpStatusCode==200&&t.TimeToLiveDescription.TimeToLiveStatus==="ENABLED"&&t.TimeToLiveDescription.AttributeName==="expire"}catch(t){throw t}}_getRateLimiterRes(t,n,o){const i=new Dw;return i.isFirstInDuration=n===o.points,i.consumedPoints=i.isFirstInDuration?n:o.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=o.expire!=-1?Math.max(o.expire*1e3-Date.now(),0):-1,i}}var jw=Fw;const Uw=Eo,Hw=Ft;class qw extends Uw{constructor(t){if(super(t),this.modelName=t.tableName||"RateLimiterFlexible",this.prismaClient=t.storeClient,this.clearExpiredByTimeout=t.clearExpiredByTimeout||!0,!this.prismaClient)throw new Error("Prisma client is not provided");this.clearExpiredByTimeout&&this._clearExpiredHourAgo()}_getRateLimiterRes(t,n,o){const i=new Hw;let s=o;return i.isFirstInDuration=s.points===n,i.consumedPoints=s.points,i.remainingPoints=Math.max(this.points-i.consumedPoints,0),i.msBeforeNext=s.expire!==null?Math.max(new Date(s.expire).getTime()-Date.now(),0):-1,i}_upsert(t,n,o,i=!1){if(!this.prismaClient)return Promise.reject(new Error("Prisma client is not established"));const s=new Date,r=o>0?new Date(s.getTime()+o):null;return this.prismaClient.$transaction(async a=>{const l=await a[this.modelName].findFirst({where:{key:t}});if(l){const u=i||!l.expire||l.expire<=s||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 zw=qw;const Vw=Xy,Ww=tw,Kw=sw,Gw=cw,{RateLimiterClusterMaster:Yw,RateLimiterClusterMasterPM2:Jw,RateLimiterCluster:Qw}=$w;var pd={RateLimiterRedis:Vw,RateLimiterMongo:Ww,RateLimiterMySQL:Kw,RateLimiterPostgres:Gw,RateLimiterMemory:nd,RateLimiterMemcache:Aw,RateLimiterClusterMaster:Yw,RateLimiterClusterMasterPM2:Jw,RateLimiterCluster:Qw,RLWrapperBlackAndWhite:Pw,RateLimiterUnion:Iw,RateLimiterQueue:Lw,BurstyRateLimiter:Mw,RateLimiterRes:Ft,RateLimiterDynamo:jw,RateLimiterPrisma:zw};const Xw="pan115_api",Zw={points:5,duration:1};function eb(e){return{clientId:Xw,rateLimit:Zw,msDelayAdjustment:30,...e}}function tb(e){const t=eb(e),n=Uu.create();$o(n,{retries:5,shouldResetTimeout:!0,retryDelay:i=>(console.log(`[axios] Retry ${i}...`),i*1e3)});const o=new pd.RateLimiterMemory(t.rateLimit);return n.interceptors.request.use(async i=>{try{const s=await o.consume(t.clientId);return i}catch(s){if(console.warn("[axios] RateLimiter:",s),s instanceof pd.RateLimiterRes){const r=s.msBeforeNext+t.msDelayAdjustment;return console.log(`[axios] Delay ${r}ms for next request...`),await wt(r),i}else throw new Ay(s)}},i=>(console.warn("[axios] onRejected:",i),Promise.reject(i))),n}const Et=tb();async function hd(e,t,n){const o=new URLSearchParams({page:e.toString(),uid:n.toString(),sign:t,time:Mi().toString()});return(await Et.post("https://115.com/web/lixian/?ct=lixian&ac=task_lists",o,{withCredentials:!0,timeout:6e4})).data}async function md(){return(await Et.get(`https://115.com/?ct=offline&ac=space&_=${Date.now()}`,{timeout:3e4,withCredentials:!0})).data}async function gd(){const t=(await Et.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 yd(e){const t=Rs(e),o=(await Et.get("https://webapi.115.com/files?"+t,{timeout:12e4,withCredentials:!0})).data;if(o.state)return o;throw new Error(o.error)}async function wd(e,t=500){const n=await si(e,t);for(let o=0;o<n.length;o++){const i=n[o];if(i.fid)continue;const s=Wn({cid:i.cid,limit:e.limit||115}),r=await wd(s,t);i.children=r}return n}async function si(e,t=500){let n=[],o=0;for(;;){e.offset=o;const i=await yd(e);if(!i.data||!i.data.length||(n=[...n,...i.data],o+=e.limit,o>=i.count))break;await wt(t)}return n}async function nb(e){const t=Rs(e),n=await Et.get("https://webapi.115.com/files/search?"+t,{timeout:12e4,withCredentials:!0});if(n.data==="")throw new qu;const o=n.data;if(o.state)return o;throw new Ba(o.error)}async function ob(e,t=500,n=!1){let o=[],i=0,s=e.limit;const r=1e4,a=115,l=r-r%s;let u=s;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 nb(e);if(!f.data||!f.data.length||(o=[...o,...f.data],i+=u,i>=f.count))break;await wt(t)}return o}async function Ka(e,t){const n=new URLSearchParams({pid:e,ignore_warn:"1"});return t.forEach((i,s)=>{n.append(`fid[${s}]`,i)}),(await Et.post("https://webapi.115.com/rb/delete",n,{timeout:12e4,withCredentials:!0})).data}async function bd(e,t,n,o){let i=0,s=0;for(;;){const r=t.slice(i,i+n);if((await Ka(e,r)).state&&(s+=r.length),i+=n,i>=t.length)break;await wt(o)}return s}async function _d(e,t){const n=new URLSearchParams({pid:e,cname:t});return(await Et.post("https://webapi.115.com/files/add",n,{timeout:12e4,withCredentials:!0})).data}async function ib(e,t){const n=new URLSearchParams({pid:e});return t.forEach((i,s)=>{n.append(`fid[${s}]`,i)}),(await Et.post("https://webapi.115.com/files/move",n,{timeout:12e4,withCredentials:!0})).data}async function sb(e){const t={path:e};return(await Et.get("https://webapi.115.com/files/getid?"+Rs(t),{timeout:12e4,withCredentials:!0})).data}async function kt(e){const t=new URLSearchParams({cid:e});return(await Et.get("https://webapi.115.com/category/get?"+t.toString(),{timeout:12e4,withCredentials:!0})).data}async function Ga(e,t,n,o){const i={uid:o.toString(),sign:t.sign,time:Mi().toString()};n&&(i.flag="1");const s=Py(i);return e.forEach((a,l)=>{s.append(`hash[${l}]`,a)}),(await Et.post("https://115.com/web/lixian/?ct=lixian&ac=task_del",s,{timeout:12e4,withCredentials:!0})).data}async function rb(e){return new Promise((t,n)=>{const o=JSON.stringify({pickcode:e}),i=Math.floor(Date.now()).toString(),s=new Oy,{data:r,key:a}=s.encode(o,i);Gc({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=s.decode(u.data,a);if(f){const h=JSON.parse(f),g=Object.keys(h)[0],b=h[g];b.file_id=g;const _=l.responseHeaders.split(/[\r\n]+/).filter(E=>E.match(/set-cookie/i));_.length&&(_.forEach((E,T)=>{_[T]=E.replace(/set-cookie:[\s]*/i,"").split(";")[0]}),b.cookie=_.join("; ")),t(b)}else n({state:!1,error:"解密失败"})}else n(u)},onerror:l=>{n(l)}})})}async function ab(e){if(!(await kt(e)).play_long)throw new Error("该目录下没有可以播放的媒体文件![by_attr]");const o=(await si(Wn({cid:e,limit:1150}))).find(i=>i.play_long&&i.play_long>0);if(!o)throw new Error("该目录下没有可以播放的媒体文件![by_files]");return qi(o)}async function lb(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 Et.post("https://webapi.115.com/files/export_dir",n,{timeout:12e4,withCredentials:!0})).data}async function cb(e,t=1e3,n=12e4){const o=new URLSearchParams({export_id:e.toString()}),i=async()=>(await Et.get("https://webapi.115.com/files/export_dir?"+o.toString(),{timeout:12e4,withCredentials:!0})).data;async function s(r){const a=await i();a.data&&!!a.data.pick_code&&r(a)}try{return await Vn(s,t,n)}catch(r){throw new Error(`导出目录树结果获取失败:${r.message}`)}}async function ub(e){/^\d+$/.test(e.target)&&(e.target=`U_1_${e.target}`);const t=Rs(e);return(await Et.post("https://uplb.115.com/3.0/sampleinitupload.php",t,{timeout:12e4,withCredentials:!0})).data}async function db(e,t){const n=await ub(t),o=new FormData;o.append("name",t.filename),o.append("key",n.object),o.append("policy",n.policy),o.append("OSSAccessKeyId",n.accessid),o.append("success_action_status","200"),o.append("callback",n.callback),o.append("signature",n.signature),o.append("file",e);const i=n.host.replace(/^http:/,"https:");return(await Et.post(i,o,{timeout:18e5})).data}function fb(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 vd(e="",t=""){return e+Date.now().toString()+Math.random().toString(36).substring(5)+t}async function xd(e,t=!1){try{return await navigator.clipboard.writeText(e),!0}catch(n){return console.warn("[copy]",n),t?(prompt("请复制内容:",e),!0):!1}}async function pb(e,t,n=!1){var s;const o=new Map;if(!e.length)return o;t=t||await Ni();let i=new Map;n||(ae({text:"正在获取上级目录路径...",timer:0}),me.showLoading());try{i=await Ib(e),n||me.close()}catch(r){return console.error(r),n||ae({text:`获取上级目录路径失败: ${r}`,timer:1200,icon:"error"}),o}finally{n||me.hideLoading()}if(i.size===0)return o;for(let r=0;r<e.length;r++){const a=(s=i.get(e[r].parentId))==null?void 0:s.slice(1).join("/"),l=e[r].name,u=Qc(a+"/"+l,!0),f=e[r].isFile?await Zo(t,u,Ns.play):await va(t,u);o.set(u,f)}return console.log("[buildCloudDriveUrlsForFileItems] pathToUrl:",o),o}async function hb(e,t){const n=await Zo(e,t);return(await dg({method:"HEAD",url:n})).status===200}async function mb(e,t,n,o){const s=`waitFileExist_${vd()} path: ${t}`;console.time(s);async function r(a){const l=await hb(e,t);l===!0&&a(l)}try{await Vn(r,n,o)}catch{throw new Error(`[waitFileExist] 检查文件存在超时!文件路径: ${t}`)}finally{console.timeEnd(s)}}async function gb(e){let t=`#EXTM3U
`;for(const[n,o]of e)t+=`#EXTINF:0,${n}
${o}
`;return t}var Yn=(e=>(e.unix="/",e.windows="\\",e))(Yn||{});function Ys(e,t="/"){return e.map((n,o)=>o===0?n:Js(n,t)).join(t)}function Js(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 yb(e){return e.startsWith("/")}function wb(e){return e===""||e==="/"||e==="\\"}function Ya(e,t,n="/"){if(yb(t))return t;const o=new URL(e,"http://example.com");o.pathname=bb(o.pathname,t);let i=decodeURIComponent(o.pathname);return Js(i,n)}function bb(e,t){const n=e.endsWith("/")?e:e+"/",o=t.startsWith("/")?t.slice(1):t;return n+o}function _b(e,t=/^\w+$/){const n=e.lastIndexOf(".");if(n===-1)return"";const o=e.slice(n+1);return t&&!t.test(o)?"":o}async function Wt(e=!0){const t=on().GetCurWangPanCid();return!t&&e?(on().Core.MinMessage.Show({text:'不支持"根目录"!',timeout:1e3}),""):t}async function vb(e,t){let n=$(`li.temp-el[cate_id="${e}"]`);if(!n.length){const o=`
      <li class="selected temp-el" file_type="${0}">
        <input type="checkbox" value="${e}"/>
        <div class="checkbox" menu="file_check_one"></div>
        <div class="file-name-wrap">
          <span class="file-name" rel="file_name">
            <em>
              <a class="name" href="javascript:;" cate="1" menu="open" aid="1" cid="${e}" rel="view_folder">
                <span>名称</span>
              </a>
            </em>
          </span>
        </div>
      </li>
    `;n=$(o)}n.attr("title",t.file_name),n.find("a.name > span").text(t.file_name);for(let o in t){const i=typeof t[o];["string","number"].indexOf(i)>-1&&n.attr(o,t[o])}return n.attr("cate_id",e),n.attr("p_id",t.paths[t.paths.length-1].file_id),n}async function hn(e){const t=await Hi(e);return qi(t)}async function Hi(e){const t=e.attr("file_size"),n=e.attr("iv")==="1",o=await Ed(),i=e.attr("file_id")||"",s=!!i,r={n:e.attr("title")||"",s:t?parseInt(t):0,pc:e.attr("pick_code")||"",t:e.attr("user_ptime")||"",te:"",tp:"",ico:e.attr("ico")||"",sha:e.attr("sha1")||"",iv:n};let a={n:r.n};if(!o)a={fid:i,cid:(s?e.attr("cid"):e.attr("cate_id"))||"",pid:s?"":e.attr("p_id")||"",...r};else if(a={fid:i,cid:(s?e.attr("cid"):e.attr("cate_id"))||"",...r},!s){const l=e.find(".file-directory a[cid]");if(l.length)a.pid=l.attr("cid");else throw console.warn("无法获取上级目录ID!",e),new Error("无法获取上级目录ID!")}return{...a,...r}}async function Jn(e){const t=await kb(e);return xb(t)}async function xb(e){const t=[];for(let n=0;n<e.length;n++){const o=await qi(e[n]);t.push(o)}return t}async function qi(e){var o,i;const t=!!e.fid,n={id:t?e.fid:e.cid,name:e.n,hash:e.sha,parentId:t?e.cid:e.pid,sizeRaw:e.s,sizeDesc:(o=e.s)==null?void 0:o.toString(),sizeBytes:0,isFile:t,isDir:!t,isVideo:e.iv===!0||((i=e.iv)==null?void 0:i.toString())==="1",pickCode:e.pc,playDuration:e.play_long};return typeof e.s=="number"?n.sizeBytes=e.s:typeof e.s=="string"&&/^\d+$/.test(e.s)&&(n.sizeBytes=parseInt(e.s)),n.sizeDesc=Ds(n.sizeBytes||0),n}function on(){return unsafeWindow.TOP?unsafeWindow.TOP:unsafeWindow}function Cb(){return unsafeWindow.top===unsafeWindow?unsafeWindow.Ext:unsafeWindow.top.Ext}async function $b(e){return new Promise((t,n)=>{on().Core.DataAccess.Dir.GetDetail("1",e,o=>t(o))})}async function Eb(){const e=await Wt(),t=await $b(e),n=await vb(e,t);return n.addClass("ce-temp-cur-dir"),n}async function zi(){return window.top!==window?$(document):$('iframe[name="wangpan"], .wrap-view iframe:eq(0)').contents()}async function ri(){return(await zi()).find(".list-contents, .list-thumb")}async function Cd(e){const t=await ri();return e?t.find("li.selected:not(.ce-temp-cur-dir)"):t.find("li:not(.ce-temp-cur-dir)")}async function kb(e){const t=await Cd(e),n=[];for(let o=0;o<t.length;o++){const i=t.eq(o),s=await Hi(i);n.push(s)}return n}async function Ja(e="/"){const t=await $d();return e+t.slice(1).join(e)}async function $d(){const e=await zi(),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 Sb(){const e=await Wt();(await ri()).find("li.selected").each(function(){const n=$(this);n.attr("cate_id")!==e&&(n.find('input[type="checkbox"]').prop("checked",!1),n.removeClass("selected"))})}async function Qn(e=!1){const t=await Wt();if(!t)return null;const n=await ri(),o=await Eb();return e||o.hide(),n.find(`li[cate_id="${t}"]`).length||n.append(o),o}async function Qa(e,t,n){n&&await Sb(),on().Core.FileMenu.DoEvent([e],t,null)}function Ab(e,t=""){return`https://115.com/?ct=preview&ac=location&pickcode=${e}&sha1=${t}`}function Vi(e){return`https://115.com/?${new URLSearchParams({cid:e}).toString()}&offset=0&mode=wangpan`}async function Ed(e=location.href){return e.includes("ac=search")}function Xa(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(`/?${pg(n)}`)+"&submode=wangpan&mode=search"}function Za(e){return`https://v.anxia.com/?${new URLSearchParams({pickcode:e,share_id:"0"}).toString()}`}async function Pb(e){unsafeWindow.Main.ReInstance({type:e.type,offset:0,o:uu.userPtime,asc:xa.false,star:e.star,suffix:e.suffix})}async function Tb(){return(await ri()).find("li.selected")}async function kd(){const e=await Tb();return e?await Hi(e):null}function Sd(e){return e.replace(/[/\\:*?"<>|]/g,"_")}async function el(e){const n=(await kt(e.id)).paths.slice(1).map(s=>s.file_name).join("/"),o=Sd(e.name);return`/${n}/${o}`.replace(/^[\/]+/g,"/")}async function Ib(e,t=100){var s;const n=new Map;for(const r of e){const a=r.parentId;if(!a)throw new Error(`文件"${r.name}"没有父级目录ID!`);n.has(a)?(s=n.get(a))==null||s.push(r):n.set(a,[r])}const o=[];for(const r of n.values())o.push(r[0]);const i=new Map;for(const r of o){const a=await kt(r.id);await wt(t),i.set(r.parentId,a.paths.map(l=>l.file_name))}return i}async function Ob(e,t=100){var s;const n=new Map;for(const r of e){const a=r.parentId;if(!a)throw new Error(`文件"${r.name}"没有父级目录ID!`);n.has(a)?(s=n.get(a))==null||s.push(r):n.set(a,[r])}const o=[];for(const r of n.values())o.push(r[0]);const i=new Map;for(const r of o){const a=await kt(r.id);await wt(t),i.set(r.parentId,a.paths)}return i}async function Lb(e,t){const n=new File([e],t.filename,{type:"text/plain"});return db(n,t)}async function Mb(e,t,n){const o=await pb(e),i=await gb(o);n=n||vd();let s=t;return/m3u8$/.test(n)||(n+=".m3u8"),await Lb(i,{filename:n,target:s})}const tl=new Map;async function ai(e,t=!0){if(e=Js(e,Yn.unix),e=e.replace(/^[\/]+/,"").replace(/[\/]+$/,""),t&&tl.has(e))return tl.get(e);if(e===""||e==="/")return"0";const n=await sb(e);if(!n.state)throw new Error(`根据路径"${e}"获取目录ID失败: ${n.error}`);if(n.id&&n.id.toString()!=="0")return tl.set(e,n.id.toString()),n.id.toString();throw new Fa(`根据路径"${e}"获取目录ID失败: 目录不存在!`)}async function Db(e){e=e.replace(/^\//,"").replace(/\/$/,"");const t={id:"",created:!1,pathToId:new Map};if(e===""||e==="/")return t.id="0",t;const n=e.split("/").filter(s=>s);let o="0",i="";for(const s of n){i+="/"+s;let r="";try{r=await ai(i,!0),t.pathToId.set(i,r)}catch(a){if(a instanceof Fa){const l=await _d(o,s);if(!l.state)throw new Error(`创建目录"${s}"失败: ${l.error} - ${l.error}`);r=l.cid.toString()}else throw a}o=r,t.pathToId.set(i,r)}return t.id=o,t}async function Rb(e,t,n=!0){let o="";const i=await _d(t,e);if(i.state)o=i.cid.toString();else{if(i.errno===zu.exist&&n){const s=await kt(t);if(!s.pick_code)throw new Error(`获取目录"${t}"属性失败: ${s.errno} - ${s.error}`);const r=[...s.paths.slice(1).map(a=>a.file_name),s.file_name,e].join("/");return await ai(r,!0)}throw new Error(`创建目录"${e}"失败: ${i.errno} - ${i.error}`)}return o}async function Ad(e){if(!location.search.includes("ac=search")||!e.enableInSearch)return;const n=(await _o("#js_data_list"))[0],o=[{label:"移动",body:'<a href="javascript:;" menu="move" style=""><i class="icon-operate ifo-move" menu="move"></i><span menu="move">移动</span></a>',enabled:!0},{label:"重命名",body:'<a href="javascript:;" menu="edit_name" style=""><i class="icon-operate ifo-rename" menu="edit_name"></i><span menu="edit_name">重命名</span></a>',enabled:!0},{label:"删除",body:'<a href="javascript:;" menu="delete" style=""><i class="icon-operate ifo-remove" menu="delete"></i><span menu="delete">删除</span></a>',enabled:!0},{label:"属性",body:'<a href="javascript:;" menu="attribute" style=""><i class="icon-operate ifo-property" menu="attribute"></i><span menu="attribute">属性</span></a>',enabled:!0}],i=a=>{let l="";for(const u of a)!u.enabled||(l+=u.body);return l},s=()=>{const a="ce-menu-init",l=document.querySelectorAll(`li[rel="item"]:not(.${a})`),u=i(o);for(let f=0;f<l.length;f++){const h=l[f];if(h.querySelector(".file-opr"))continue;const g=document.createElement("div");g.className="file-opr",g.setAttribute("rel","menu"),g.innerHTML=u,h.classList.add(a),h.appendChild(g)}};s(),new MutationObserver(async([a])=>{a.type==="childList"&&s()}).observe(n,{childList:!0})}async function Nb(e){if(!e.hideSelectionMenuLabel)return;const n=(await _o("#js_operate_box"))[0];new MutationObserver(async([i])=>{if(i.type==="childList"){const s=n.querySelectorAll("li[menu]");for(let r=0;r<s.length;r++){const a=s[r],l=a.textContent;a.setAttribute("title",l||"")}}}).observe(n,{childList:!0}),n.classList.add("only-icon")}async function Bb(e,t){const n=[],o=await ci(),i=o.keyToTriggerManual;for(const s of t){const r=Ms(e,{key:`_ce_s_${s.key}`,label:s.label,icon:s.icon,title:s.memo,onClick:async(a,l)=>{l.stopPropagation(),l.preventDefault();try{let u;if(i){const _=l;(i===mn.alt&&_.altKey||i===mn.ctrl&&_.ctrlKey||i===mn.shift&&_.shiftKey||i===mn.meta&&_.metaKey)&&(u={names:[il.manual],position:o.injectManualFuncPosition})}const f=$(l.target).closest("li"),h=await hn(f),g=await Ni(),b=await Zs(h,s,g,u);if(console.log("[search url]",b),!b)throw new Error("无法获取有效的搜索链接!");rg(b,{active:!s.openInBackground})}catch(u){console.error(u),ae({title:"搜索失败",text:u.toString(),icon:"error"})}}});n.push(r)}return n}async function nl(e,t){if(console.log("[playDirOnAnxia]",e,t),!t)try{ae({title:"正在查找可播放的文件...",text:"请稍等...",icon:"info"}),me.showLoading(),t=await ab(e),console.log("[playDirOnAnxia] file",t)}catch(o){console.error(o),ae({title:"播放失败",text:o.toString(),icon:"error"});return}t||ae({title:"播放失败",text:"没有在该目录下找到可播放的文件![file_null]",icon:"error"});const n=Za(t.pickCode);window.open(n,"_blank","noopener noreferrer")}async function Fb(e,t){const n=[],o=await ci(),i=o.keyToTriggerManual;for(const s of t){const r=Ms(e,{key:`_ce_p_${s.key}`,label:s.label,icon:s.icon,title:s.memo,onClick:async(a,l)=>{l.stopPropagation(),l.preventDefault();try{let u;if(i){const _=l;(i===mn.alt&&_.altKey||i===mn.ctrl&&_.ctrlKey||i===mn.shift&&_.shiftKey||i===mn.meta&&_.metaKey)&&(u={names:[il.manual],position:o.injectManualFuncPosition})}const f=$(l.target).closest("li"),h=await hn(f),g=await Ni(),b=await Zs(h,s,g,u);if(h.isDir&&b.includes("v.anxia.com")){nl(h.id);return}if(console.log("[play url]",b),!b)throw new Error("无法获取有效的播放链接!");window.open(b,"_blank","noopener noreferrer")}catch(u){console.error(u),ae({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 Qs(e,t){if(t===0)return e;if(t===2)return Array.from(new Set(e));const n=[];for(const o of e){const i=o.replace(/\.[^.]+$/,"");t===1?n.push(i):t===3&&(n.includes(i)||n.push(i))}return n}var sn=(e=>(e[e.unixPath=0]="unixPath",e[e.winPath=1]="winPath",e[e.unixParentPath=2]="unixParentPath",e[e.winParentPath=3]="winParentPath",e))(sn||{});async function ol(e,t,n){const o=n===1||n===3;let s=n===2||n===3?t.replace(/\/[^/]+$/,""):t;return s.startsWith("/")||(s="/"+s),o&&(s=s.replace(/\//g,"\\")),s}async function jb(e){return async(t,n)=>{const o=await Wt(),i=await zi(),s=e?"li[file_id].selected":"li[file_id]",r=i[0].querySelectorAll(s);if(!r.length){ae({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>
      </div>`;const{value:l}=await me.fire({title:"文件移动到同名目录",html:a,icon:"warning",showCancelButton:!0,confirmButtonText:"继续",cancelButtonText:"取消"});if(!!l){me.fire({title:"文件移动到同名目录",html:"正在处理...",didOpen:()=>{me.showLoading()}});for(let u=0;u<r.length;u++){const f=r[u],h=await hn($(f));if(!h.isFile)continue;const g=h.name,b=g.replace(/\.[^\.]+$/,""),_=`${u+1} / ${r.length} - `+Math.round(u/r.length*100)+"%";me.update({html:`${_} 正在为文件「${g}」创建目录「${b}」`});const E=await Rb(b,o,!0);me.update({html:`创建目录「${b}」成功。id=${E}`}),me.update({html:`${_} 正在移动文件「${g}」到目录「${b}」`}),await ib(E,[h.id]),await wt(500)}me.hideLoading(),me.update({html:"处理完成。刷新列表后查看最新的文件数据。",icon:"success"})}}}function Ub(e,t){const n=[];for(let o=t?1:0;o<e.length;o++)n.push(e[o].file_name);return n}async function Pd(e,t){const n=await Ob(e),o=[];for(let i=0;i<e.length;i++){const s=n.get(e[i].parentId);if(!s)throw new Error(`无法获取文件 "${e[i].name}" 的上级目录路径!`);const r=Ub(s,!0),a=Ys([...r,e[i].name],Yn.unix);o.push(await ol(e[i],a,t))}return o}async function Td(e){try{const n=+(await kt(e.id)).folder_count+1;ae({text:`正在获取文件列表数据... 目录数量: ${n}。请保持当前页面在当前浏览器窗口处于激活状态,不要做其他网盘操作。`,timer:0}),me.showLoading();const o=await wd(Wn({cid:e.id,limit:1150}),3e3);console.log("[tree]",o);const i=`115-dir_list_data-${e.id}-${Sd(e.name)}.json`;Di(JSON.stringify(o),i),ae({text:`获取文件列表数据成功,已保存为 ${i}`,timer:0,icon:"success",showConfirmButton:!0})}catch(t){console.error(t),ae({text:`获取文件列表数据失败: ${t}`,timer:0,icon:"error",showCloseButton:!0})}finally{me.hideLoading()}}function Id(e){const t=e.target;e.key==="a"&&(e.ctrlKey||e.metaKey)&&t.select()}function Od(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement}function Hb(e){e.addEventListener("keydown",t=>{const n=t.target;Od(n)&&Id(t)})}function Ld(e,t=.2,n=.5){e.style.transition=`opacity ${n}s`,e.style.opacity=t.toString(),setTimeout(()=>{e.remove()},500)}const Xs=me.mixin({toast:!0,position:"top-end",showConfirmButton:!1,timer:3e3,timerProgressBar:!0,didOpen:e=>{e.addEventListener("mouseenter",me.stopTimer),e.addEventListener("mouseleave",me.resumeTimer)},customClass:"swal-toast"});async function qb(e,t){e.addEventListener("keydown",n=>{const o=n.target;if(!Od(o))return;let i=!1;(t==="enter"&&n.key==="Enter"||t==="ctrl+enter"&&n.key==="Enter"&&n.ctrlKey||t==="meta+enter"&&n.key==="Enter"&&n.metaKey)&&(i=!0),i&&me.clickConfirm()})}var il=(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))(il||{});const zb=[{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 Vb(e,t,n){const{names:o,position:i}=t;let s=[];return i==="first"?s=[...o,...e]:s=[...e,...o],n?Array.from(new Set(s)):s}async function Zs(e,t,n,o){var u;let i=t.url;const s={dir_id:"id",file_id:"id",pick_code:"pickCode",full_name:"name",file_suffix:"suffix",file_hash:"hash",file_size:"sizeBytes"},r=e.isFile,a=/{(\w+)(:\w+(:\w+)?)?}/g,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 g=h.replace(/[{}]/g,"").split(":")[0],b=h.replace(/[{}]/g,"").replace(/^[^:]+:/,"");let _=((u=e[s[g]])==null?void 0:u.toString())||"",E="";switch(f.includes(g)&&(E=await el(e)),g){case"pure_name":r?_=e.name.replace(/\.[^.]+$/,""):_=e.name;break;case"file_path":_=E;break;case"file_dir":_=E.replace(/\/[^/]+$/,"");break;case"clouddrive_stream_url":r?_=await Zo(n,E,Ns.download):_=await va(n,E);break;case"clouddrive_down_url":_=await Zo(n,E,Ns.download);break;case"clouddrive_playlist_url":let T="";r?T=E.replace(/\/[^/]+$/,""):T=E,_=await va(n,T);break;case"user_agent":_=navigator.userAgent;break}if(_=_.toString(),b){let T=b.split(":");o&&(T=Vb(T,o,!1)),console.log(`[buildCustomUrl] functions: ${b}, after merge: ${T.join(":")}`);for(const M of T)switch(M){case"search":_=Xa({search_value:_});break;case"encode":_=encodeURIComponent(_);break;case"base64":_=Kc(_);break;case"base64safe":_=Kc(_,!0);break;case"upper":_=_.toUpperCase();break;case"lower":_=_.toLowerCase();break;case"number":_=_.replace(/\D/g,"");break;case"manual":let{isConfirmed:P,value:I}=await me.fire({title:"手动输入",text:"按下「Ctrl + 回车」或「Command + 回车」确认",input:"textarea",inputValue:_,showCancelButton:!0,inputValidator:H=>H?null:"输入不能为空!",didOpen:H=>{Hb(H),qb(H,"meta+enter")}});if(!P)throw new Error("已取消手动输入。");if(I=(I==null?void 0:I.trim())||"",I==="")throw new Error("输入不能为空!");_=I;break}}i=i.replace(h,_)}}return t.mutation?await Wb(i,e,t,n):i}async function Wb(e,t,n,o){return await new Function("payload",n.mutation)({url:e,file:t,customUrl:n,cloudDriveConfig:o})}var An=(e=>(e.search="search",e.play="play",e))(An||{});const Md={search:"menu_custom_urls_for_search",play:"menu_custom_urls_for_play"};async function li(e){return await tt.get(Md[e],[])}async function Dd(e,t){await tt.set(Md[e],t)}function bt(e){return{enabled:!0,key:"",label:"",icon:"",memo:"",extraMemo:"",url:"",openInBackground:!1,...e}}var mn=(e=>(e.none="none",e.alt="alt",e.ctrl="ctrl",e.shift="shift",e.meta="meta",e))(mn||{});const Rd="ce_menu_config";function Kb(e){return{enabled:!0,openInNewTab:!0,search:!0,play:!0,getDownloadUrl:!0,copyNames:!0,exportList:!1,...e}}function Gb(e){return{enabled:!0,copyNames:!0,...e}}function Yb(e){return{enabled:!0,moveToSelfNameDir:!0,copyNames:!0,play:!0,...e}}function Jb(e){return{enabled:!0,rename:!0,delete:!0,play:!0,copyNames:!0,move:!0,copy:!0,copyTo:!0,viewProp:!0,showSubFolderSize:!0,exportList:!1,...e}}function Qb(e){return{enabled:!0,hideSelectionMenuLabel:!1,enableInSearch:!0,manageOfficialMenus:!1,keyToTriggerManual:"none",injectManualFuncPosition:"first",m3u8TempDir:".ce-m3u8-temp",[Be.listItemHover]:Kb(e==null?void 0:e[Be.listItemHover]),[Be.listItemContext]:Gb(e==null?void 0:e[Be.listItemContext]),[Be.selection]:Yb(e==null?void 0:e[Be.selection]),[Be.dirContext]:Jb(e==null?void 0:e[Be.dirContext]),...e}}async function ci(){const e=Qb(),t=await tt.get(Rd,e);return{...e,...t}}async function Xb(e){await tt.set(Rd,e)}const Oc=class{constructor(t){_e(this,"menuType",Be.listItemHover);_e(this,"injectDecider");_e(this,"keyAttributeName","id");_e(this,"key","");_e(this,"label","");_e(this,"icon","");_e(this,"showIcon",!0);_e(this,"title","");_e(this,"onClick",async(t,n)=>{});_e(this,"onMouseOver");_e(this,"onMouseOut");_e(this,"subItems",[]);_e(this,"isDivider",!1);_e(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 o=document.createElement("div");let i="";this.icon&&this.showIcon&&(this.icon.match(/^(http|https|data:image)/)?i=`<img class="ce-menu-icon" src="${this.icon}" />`:this.icon.match(/^data-text:/)?i=`<i class="ce-menu-icon">${this.icon.replace(/^data-text:/,"")}</i>`:i=`<i class="ce-menu-icon ${this.icon}"></i>`),o.innerHTML=n.replace(/{key}/g,this.key).replace(/{label}/g,this.label).replace(/{icon}/g,i);const s=o.firstElementChild;if(s.setAttribute("title",this.title||""),this.onClick&&s.addEventListener("click",async r=>{this.onClick(this,r)}),this.onMouseOver&&s.addEventListener("mouseover",async r=>{this.onMouseOver&&this.onMouseOver(this,r)}),this.onMouseOut&&s.addEventListener("mouseout",async r=>{this.onMouseOut&&this.onMouseOut(this,r)}),this.subItems.length>0){const r=s.querySelector(".sub-items"),a=[];for(const l of this.subItems){const u=await l.render();a.push(u)}r==null||r.append(...a)}return s}async closeMenu(){unsafeWindow.Core.FileMenu.HideRight(),document.dispatchEvent(new CustomEvent(Oc.EVENT_CLOSE_MENU,{detail:{menu:this}}))}async decorateContainer(t){}};let Qt=Oc;_e(Qt,"EVENT_CLOSE_MENU","__closeMenu");async function er(e,t){t.stopPropagation(),t.preventDefault();const n=t.target,o=$(n).closest(".ce-menu-parent"),i=o.find(".ce-menu-dropdown");o.addClass("ce-menu-dropdown-opened"),i.addClass("ce-menu-dropdown-active")}async function tr(e,t){t.stopPropagation(),t.preventDefault();const n=t.target,o=$(n).closest(".ce-menu-parent"),i=o.find(".ce-menu-dropdown");o.removeClass("ce-menu-dropdown-opened"),i.removeClass("ce-menu-dropdown-active")}class jt extends Qt{constructor(n){super(n);_e(this,"menuType",Be.dirContext);this.onMouseOver=er,this.onMouseOut=tr}}class Zb extends Qt{constructor(){super(...arguments);_e(this,"menuType",Be.dirContextSub)}}class sl extends Qt{constructor(n){super(n);_e(this,"menuType",Be.listItemContext);this.onMouseOver=er,this.onMouseOut=tr}}class nr extends Qt{constructor(n){super(n);_e(this,"menuType",Be.listItemHover);this.onMouseOver=er,this.onMouseOut=tr}}class Wi extends Qt{constructor(){super(...arguments);_e(this,"menuType",Be.listItemHoverSub)}}class rl extends Qt{constructor(n){super(n);_e(this,"menuType",Be.selection);this.onMouseOver=er,this.onMouseOut=tr}}class or extends Qt{constructor(){super(...arguments);_e(this,"menuType",Be.selectionSub)}}class ir extends Qt{constructor(){super(...arguments);_e(this,"isDivider",!0)}}class e_ extends ir{}class t_ extends ir{}class Nd extends ir{}class Bd extends ir{}class sr{constructor(t){_e(this,"items");_e(this,"siblingSelector");_e(this,"position");_e(this,"useObserver",!0);_e(this,"observeTarget",document.body);_e(this,"disposeObserverAfterInjection",!0);_e(this,"menuType");_e(this,"_observer");_e(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 _o(this.observeTarget,800,6048e5))[0]:this.observeTarget}async isMutationMatch(t){const n=t.addedNodes[0];if(n&&n.nodeType!==Node.ELEMENT_NODE)return!1;switch(this.menuType,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 o=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=[o];break;case Be.selection:document.querySelectorAll("#js_top_panel_box #js_operate_box").forEach(i=>{n.push(i)});break;case Be.dirContext:n=[o];break}return n}async shouldInjectMenuItem(t,n){return await n.decideInject(t)?await this.decideInject(n,t):!1}async decideInject(t,n){return this.injectDecider?await this.injectDecider(t,n):!0}async injectToContainer(t){const n=await this.getSibling(t);if(!n)return;let o=this.items.slice();this.position===Co.after&&(o=o.reverse());for(let i=0;i<o.length;i++){const s=o[i];if(!await this.shouldInjectMenuItem(t,s))continue;const r=await s.render();this.position===Co.before?n.insertAdjacentElement("beforebegin",r):n.insertAdjacentElement("afterend",r),await s.decorateContainer(t)}}async isFileContainer(t){return!!t.getAttribute("file_id")}async isDirContainer(t){return!!t.getAttribute("cate_id")}async inject(){if(!!this.menuType)if(this.useObserver)await this.observe();else{const t=await this.getObserveTarget();if(!t)return;await this.injectToContainer(t)}}}class n_ extends sr{constructor(){super(...arguments);_e(this,"menuType",Be.dirContext);_e(this,"useObserver",!0);_e(this,"observeTarget",document.body);_e(this,"disposeObserverAfterInjection",!0)}}class o_ extends sr{constructor(){super(...arguments);_e(this,"menuType",Be.listItemContext)}}class i_ extends sr{constructor(n){super(n);_e(this,"menuType",Be.listItemHover);_e(this,"useObserver",!0);_e(this,"observeTarget","#js_data_list");_e(this,"disposeObserverAfterInjection",!1);this.handleLoadAll()}async inject(){const n=document.querySelector("#js_data_list");if(n){const o=n.querySelectorAll(".list-contents > ul:not([ce-done]) > li .file-opr");o.length&&await this.perform(Array.from(o))}super.inject()}async handleLoadAll(){if(window.top===window.self)return;const n=document.querySelector("#js_pagination_box");if(!n){console.warn("[ListItemHoverMenuInjector.handleLoadAll] 未找到「#js_pagination_box」元素");return}function o(i){const s=document.querySelector("#js_data_list .list-contents > ul > li");!s||s.querySelector(".ce-menu")||i(!0)}n.addEventListener("click",async i=>{i.preventDefault(),i.stopPropagation();const s=i.target;let r=!1;if((s.getAttribute("menu")==="load_all_file"||s.closest('[menu="load_all_file"]'))&&(r=!0),!r)return;console.log("[ListItemHoverMenuInjector.handleLoadAll] 点击了「加载全部」按钮"),await Vn(o,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 ci();await Ad(h)}const f=l.querySelectorAll(u);f.length&&await this.perform(Array.from(f))}})}async perform(n){await super.perform(n);const o=document.querySelector("#js_data_list .list-contents > ul");o==null||o.setAttribute("ce-done","")}}class s_ extends sr{constructor(){super(...arguments);_e(this,"menuType",Be.selection);_e(this,"useObserver",!0);_e(this,"observeTarget","#js_top_panel_box #js_operate_box");_e(this,"disposeObserverAfterInjection",!1)}}async function al(e,t){return!!$(t).closest("li").attr("cate_id")}async function r_(e,t){const n=$(t).closest("li");if(n.attr("cate_id")||n.attr("iv")==="1")return!0;const o=n.attr("ico");return o?hg(o)||gg(o)||mg(o):!1}function Xn(e,t){const n=Object.create(null),o=e.split(",");for(let i=0;i<o.length;i++)n[o[i]]=!0;return t?i=>!!n[i.toLowerCase()]:i=>!!n[i]}function Pn(e){if(ke(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=nt(o)?u_(o):Pn(o);if(i)for(const s in i)t[s]=i[s]}return t}else{if(nt(e))return e;if(Ye(e))return e}}const a_=/;(?![^(]*\))/g,l_=/:([^]+)/,c_=/\/\*.*?\*\//gs;function u_(e){const t={};return e.replace(c_,"").split(a_).forEach(n=>{if(n){const o=n.split(l_);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Qe(e){let t="";if(nt(e))t=e;else if(ke(e))for(let n=0;n<e.length;n++){const o=Qe(e[n]);o&&(t+=o+" ")}else if(Ye(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function d_(e){if(!e)return null;let{class:t,style:n}=e;return t&&!nt(t)&&(e.class=Qe(t)),n&&(e.style=Pn(n)),e}const f_="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",p_="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",h_=Xn(f_),m_=Xn(p_),g_=Xn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Fd(e){return!!e||e===""}function y_(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=Ki(e[o],t[o]);return n}function Ki(e,t){if(e===t)return!0;let n=Hd(e),o=Hd(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=Yi(e),o=Yi(t),n||o)return e===t;if(n=ke(e),o=ke(t),n||o)return n&&o?y_(e,t):!1;if(n=Ye(e),o=Ye(t),n||o){if(!n||!o)return!1;const i=Object.keys(e).length,s=Object.keys(t).length;if(i!==s)return!1;for(const r in e){const a=e.hasOwnProperty(r),l=t.hasOwnProperty(r);if(a&&!l||!a&&l||!Ki(e[r],t[r]))return!1}}return String(e)===String(t)}function ll(e,t){return e.findIndex(n=>Ki(n,t))}const ge=e=>nt(e)?e:e==null?"":ke(e)||Ye(e)&&(e.toString===qd||!Le(e.toString))?JSON.stringify(e,jd,2):String(e),jd=(e,t)=>t&&t.__v_isRef?jd(e,t.value):ko(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,i])=>(n[`${o} =>`]=i,n),{})}:di(t)?{[`Set(${t.size})`]:[...t.values()]}:Ye(t)&&!ke(t)&&!zd(t)?String(t):t,Xe=Object.freeze({}),ui=Object.freeze([]),Ut=()=>{},Ud=()=>!1,w_=/^on[^a-z]/,Gi=e=>w_.test(e),rr=e=>e.startsWith("onUpdate:"),dt=Object.assign,cl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},b_=Object.prototype.hasOwnProperty,Ue=(e,t)=>b_.call(e,t),ke=Array.isArray,ko=e=>Ji(e)==="[object Map]",di=e=>Ji(e)==="[object Set]",Hd=e=>Ji(e)==="[object Date]",Le=e=>typeof e=="function",nt=e=>typeof e=="string",Yi=e=>typeof e=="symbol",Ye=e=>e!==null&&typeof e=="object",ar=e=>Ye(e)&&Le(e.then)&&Le(e.catch),qd=Object.prototype.toString,Ji=e=>qd.call(e),ul=e=>Ji(e).slice(8,-1),zd=e=>Ji(e)==="[object Object]",dl=e=>nt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,lr=Xn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),__=Xn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),cr=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},v_=/-(\w)/g,gn=cr(e=>e.replace(v_,(t,n)=>n?n.toUpperCase():"")),x_=/\B([A-Z])/g,Tn=cr(e=>e.replace(x_,"-$1").toLowerCase()),So=cr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ao=cr(e=>e?`on${So(e)}`:""),Qi=(e,t)=>!Object.is(e,t),fi=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},ur=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},dr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},C_=e=>{const t=nt(e)?Number(e):NaN;return isNaN(t)?e:t};let Vd;const Wd=()=>Vd||(Vd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function fl(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let rn;class $_{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}}else fl("cannot run an inactive effect scope.")}on(){rn=this}off(){rn=this.parent}stop(t){if(this._active){let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.scopes)for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function E_(e,t=rn){t&&t.active&&t.effects.push(e)}function k_(){return rn}const pl=e=>{const t=new Set(e);return t.w=0,t.n=0,t},Kd=e=>(e.w&Zn)>0,Gd=e=>(e.n&Zn)>0,S_=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=Zn},A_=e=>{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o<t.length;o++){const i=t[o];Kd(i)&&!Gd(i)?i.delete(e):t[n++]=i,i.w&=~Zn,i.n&=~Zn}t.length=n}},fr=new WeakMap;let Xi=0,Zn=1;const hl=30;let St;const Po=Symbol("iterate"),ml=Symbol("Map key iterate");class gl{constructor(t,n=null,o){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,E_(this,o)}run(){if(!this.active)return this.fn();let t=St,n=eo;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=St,St=this,eo=!0,Zn=1<<++Xi,Xi<=hl?S_(this):Yd(this),this.fn()}finally{Xi<=hl&&A_(this),Zn=1<<--Xi,St=this.parent,eo=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){St===this?this.deferStop=!0:this.active&&(Yd(this),this.onStop&&this.onStop(),this.active=!1)}}function Yd(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let eo=!0;const Jd=[];function To(){Jd.push(eo),eo=!1}function Io(){const e=Jd.pop();eo=e===void 0?!0:e}function Ht(e,t,n){if(eo&&St){let o=fr.get(e);o||fr.set(e,o=new Map);let i=o.get(n);i||o.set(n,i=pl()),Qd(i,{effect:St,target:e,type:t,key:n})}}function Qd(e,t){let n=!1;Xi<=hl?Gd(e)||(e.n|=Zn,n=!Kd(e)):n=!e.has(St),n&&(e.add(St),St.deps.push(e),St.onTrack&&St.onTrack(Object.assign({effect:St},t)))}function In(e,t,n,o,i,s){const r=fr.get(e);if(!r)return;let a=[];if(t==="clear")a=[...r.values()];else if(n==="length"&&ke(e)){const u=Number(o);r.forEach((f,h)=>{(h==="length"||h>=u)&&a.push(f)})}else switch(n!==void 0&&a.push(r.get(n)),t){case"add":ke(e)?dl(n)&&a.push(r.get("length")):(a.push(r.get(Po)),ko(e)&&a.push(r.get(ml)));break;case"delete":ke(e)||(a.push(r.get(Po)),ko(e)&&a.push(r.get(ml)));break;case"set":ko(e)&&a.push(r.get(Po));break}const l={target:e,type:t,key:n,newValue:o,oldValue:i,oldTarget:s};if(a.length===1)a[0]&&yl(a[0],l);else{const u=[];for(const f of a)f&&u.push(...f);yl(pl(u),l)}}function yl(e,t){const n=ke(e)?e:[...e];for(const o of n)o.computed&&Xd(o,t);for(const o of n)o.computed||Xd(o,t)}function Xd(e,t){(e!==St||e.allowRecurse)&&(e.onTrigger&&e.onTrigger(dt({effect:e},t)),e.scheduler?e.scheduler():e.run())}function P_(e,t){var n;return(n=fr.get(e))===null||n===void 0?void 0:n.get(t)}const T_=Xn("__proto__,__v_isRef,__isVue"),Zd=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Yi)),I_=pr(),O_=pr(!1,!0),L_=pr(!0),M_=pr(!0,!0),ef=D_();function D_(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const o=Fe(this);for(let s=0,r=this.length;s<r;s++)Ht(o,"get",s+"");const i=o[t](...n);return i===-1||i===!1?o[t](...n.map(Fe)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){To();const o=Fe(this)[t].apply(this,n);return Io(),o}}),e}function R_(e){const t=Fe(this);return Ht(t,"has",e),t.hasOwnProperty(e)}function pr(e=!1,t=!1){return function(o,i,s){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&s===(e?t?pf:ff:t?df:uf).get(o))return o;const r=ke(o);if(!e){if(r&&Ue(ef,i))return Reflect.get(ef,i,s);if(i==="hasOwnProperty")return R_}const a=Reflect.get(o,i,s);return(Yi(i)?Zd.has(i):T_(i))||(e||Ht(o,"get",i),t)?a:ft(a)?r&&dl(i)?a:a.value:Ye(a)?e?hf(a):vr(a):a}}const N_=tf(),B_=tf(!0);function tf(e=!1){return function(n,o,i,s){let r=n[o];if(no(r)&&ft(r)&&!ft(i))return!1;if(!e&&(!Cr(i)&&!no(i)&&(r=Fe(r),i=Fe(i)),!ke(n)&&ft(r)&&!ft(i)))return r.value=i,!0;const a=ke(n)&&dl(o)?Number(o)<n.length:Ue(n,o),l=Reflect.set(n,o,i,s);return n===Fe(s)&&(a?Qi(i,r)&&In(n,"set",o,i,r):In(n,"add",o,i)),l}}function F_(e,t){const n=Ue(e,t),o=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&In(e,"delete",t,void 0,o),i}function j_(e,t){const n=Reflect.has(e,t);return(!Yi(t)||!Zd.has(t))&&Ht(e,"has",t),n}function U_(e){return Ht(e,"iterate",ke(e)?"length":Po),Reflect.ownKeys(e)}const nf={get:I_,set:N_,deleteProperty:F_,has:j_,ownKeys:U_},of={get:L_,set(e,t){return fl(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return fl(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},H_=dt({},nf,{get:O_,set:B_}),q_=dt({},of,{get:M_}),wl=e=>e,hr=e=>Reflect.getPrototypeOf(e);function mr(e,t,n=!1,o=!1){e=e.__v_raw;const i=Fe(e),s=Fe(t);n||(t!==s&&Ht(i,"get",t),Ht(i,"get",s));const{has:r}=hr(i),a=o?wl:n?bl:Zi;if(r.call(i,t))return a(e.get(t));if(r.call(i,s))return a(e.get(s));e!==i&&e.get(t)}function gr(e,t=!1){const n=this.__v_raw,o=Fe(n),i=Fe(e);return t||(e!==i&&Ht(o,"has",e),Ht(o,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function yr(e,t=!1){return e=e.__v_raw,!t&&Ht(Fe(e),"iterate",Po),Reflect.get(e,"size",e)}function sf(e){e=Fe(e);const t=Fe(this);return hr(t).has.call(t,e)||(t.add(e),In(t,"add",e,e)),this}function rf(e,t){t=Fe(t);const n=Fe(this),{has:o,get:i}=hr(n);let s=o.call(n,e);s?cf(n,o,e):(e=Fe(e),s=o.call(n,e));const r=i.call(n,e);return n.set(e,t),s?Qi(t,r)&&In(n,"set",e,t,r):In(n,"add",e,t),this}function af(e){const t=Fe(this),{has:n,get:o}=hr(t);let i=n.call(t,e);i?cf(t,n,e):(e=Fe(e),i=n.call(t,e));const s=o?o.call(t,e):void 0,r=t.delete(e);return i&&In(t,"delete",e,void 0,s),r}function lf(){const e=Fe(this),t=e.size!==0,n=ko(e)?new Map(e):new Set(e),o=e.clear();return t&&In(e,"clear",void 0,void 0,n),o}function wr(e,t){return function(o,i){const s=this,r=s.__v_raw,a=Fe(r),l=t?wl:e?bl:Zi;return!e&&Ht(a,"iterate",Po),r.forEach((u,f)=>o.call(i,l(u),l(f),s))}}function br(e,t,n){return function(...o){const i=this.__v_raw,s=Fe(i),r=ko(s),a=e==="entries"||e===Symbol.iterator&&r,l=e==="keys"&&r,u=i[e](...o),f=n?wl:t?bl:Zi;return!t&&Ht(s,"iterate",l?ml:Po),{next(){const{value:h,done:g}=u.next();return g?{value:h,done:g}:{value:a?[f(h[0]),f(h[1])]:f(h),done:g}},[Symbol.iterator](){return this}}}}function to(e){return function(...t){{const n=t[0]?`on key "${t[0]}" `:"";console.warn(`${So(e)} operation ${n}failed: target is readonly.`,Fe(this))}return e==="delete"?!1:this}}function z_(){const e={get(s){return mr(this,s)},get size(){return yr(this)},has:gr,add:sf,set:rf,delete:af,clear:lf,forEach:wr(!1,!1)},t={get(s){return mr(this,s,!1,!0)},get size(){return yr(this)},has:gr,add:sf,set:rf,delete:af,clear:lf,forEach:wr(!1,!0)},n={get(s){return mr(this,s,!0)},get size(){return yr(this,!0)},has(s){return gr.call(this,s,!0)},add:to("add"),set:to("set"),delete:to("delete"),clear:to("clear"),forEach:wr(!0,!1)},o={get(s){return mr(this,s,!0,!0)},get size(){return yr(this,!0)},has(s){return gr.call(this,s,!0)},add:to("add"),set:to("set"),delete:to("delete"),clear:to("clear"),forEach:wr(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=br(s,!1,!1),n[s]=br(s,!0,!1),t[s]=br(s,!1,!0),o[s]=br(s,!0,!0)}),[e,n,t,o]}const[V_,W_,K_,G_]=z_();function _r(e,t){const n=t?e?G_:K_:e?W_:V_;return(o,i,s)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?o:Reflect.get(Ue(n,i)&&i in o?n:o,i,s)}const Y_={get:_r(!1,!1)},J_={get:_r(!1,!0)},Q_={get:_r(!0,!1)},X_={get:_r(!0,!0)};function cf(e,t,n){const o=Fe(n);if(o!==n&&t.call(e,o)){const i=ul(e);console.warn(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const uf=new WeakMap,df=new WeakMap,ff=new WeakMap,pf=new WeakMap;function Z_(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ev(e){return e.__v_skip||!Object.isExtensible(e)?0:Z_(ul(e))}function vr(e){return no(e)?e:xr(e,!1,nf,Y_,uf)}function tv(e){return xr(e,!1,H_,J_,df)}function hf(e){return xr(e,!0,of,Q_,ff)}function pi(e){return xr(e,!0,q_,X_,pf)}function xr(e,t,n,o,i){if(!Ye(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=i.get(e);if(s)return s;const r=ev(e);if(r===0)return e;const a=new Proxy(e,r===2?o:n);return i.set(e,a),a}function Oo(e){return no(e)?Oo(e.__v_raw):!!(e&&e.__v_isReactive)}function no(e){return!!(e&&e.__v_isReadonly)}function Cr(e){return!!(e&&e.__v_isShallow)}function $r(e){return Oo(e)||no(e)}function Fe(e){const t=e&&e.__v_raw;return t?Fe(t):e}function mf(e){return ur(e,"__v_skip",!0),e}const Zi=e=>Ye(e)?vr(e):e,bl=e=>Ye(e)?hf(e):e;function gf(e){eo&&St&&(e=Fe(e),Qd(e.dep||(e.dep=pl()),{target:e,type:"get",key:"value"}))}function yf(e,t){e=Fe(e);const n=e.dep;n&&yl(n,{target:e,type:"set",key:"value",newValue:t})}function ft(e){return!!(e&&e.__v_isRef===!0)}function de(e){return nv(e,!1)}function nv(e,t){return ft(e)?e:new ov(e,t)}class ov{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Fe(t),this._value=n?t:Zi(t)}get value(){return gf(this),this._value}set value(t){const n=this.__v_isShallow||Cr(t)||no(t);t=n?t:Fe(t),Qi(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:Zi(t),yf(this,t))}}function fe(e){return ft(e)?e.value:e}const iv={get:(e,t,n)=>fe(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return ft(i)&&!ft(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function wf(e){return Oo(e)?e:new Proxy(e,iv)}function sv(e){$r(e)||console.warn("toRefs() expects a reactive object but received a plain one.");const t=ke(e)?new Array(e.length):{};for(const n in e)t[n]=av(e,n);return t}class rv{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return P_(Fe(this._object),this._key)}}function av(e,t,n){const o=e[t];return ft(o)?o:new rv(e,t,n)}var bf;class lv{constructor(t,n,o,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[bf]=!1,this._dirty=!0,this.effect=new gl(t,()=>{this._dirty||(this._dirty=!0,yf(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=o}get value(){const t=Fe(this);return gf(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}bf="__v_isReadonly";function cv(e,t,n=!1){let o,i;const s=Le(e);s?(o=e,i=()=>{console.warn("Write operation failed: computed value is readonly")}):(o=e.get,i=e.set);const r=new lv(o,i,s||!i,n);return t&&!n&&(r.effect.onTrack=t.onTrack,r.effect.onTrigger=t.onTrigger),r}const Lo=[];function es(e){Lo.push(e)}function ts(){Lo.pop()}function le(e,...t){To();const n=Lo.length?Lo[Lo.length-1].component:null,o=n&&n.appContext.config.warnHandler,i=uv();if(o)On(o,n,11,[e+t.join(""),n&&n.proxy,i.map(({vnode:s})=>`at <${Br(n,s.type)}>`).join(`
`),i]);else{const s=[`[Vue warn]: ${e}`,...t];i.length&&s.push(`
`,...dv(i)),console.warn(...s)}Io()}function uv(){let e=Lo[Lo.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}function dv(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
`],...fv(n))}),t}function fv({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,i=` at <${Br(e.component,e.type,o)}`,s=">"+n;return e.props?[i,...pv(e.props),s]:[i+s]}function pv(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(..._f(o,e[o]))}),n.length>3&&t.push(" ..."),t}function _f(e,t,n){return nt(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:ft(t)?(t=_f(e,Fe(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):Le(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Fe(t),n?t:[`${e}=`,t])}function hv(e,t){e!==void 0&&(typeof e!="number"?le(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&le(`${t} is NaN - the duration expression might be incorrect.`))}const _l={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",[0]:"setup function",[1]:"render function",[2]:"watcher getter",[3]:"watcher callback",[4]:"watcher cleanup function",[5]:"native event handler",[6]:"component event handler",[7]:"vnode hook",[8]:"directive hook",[9]:"transition hook",[10]:"app errorHandler",[11]:"app warnHandler",[12]:"ref function",[13]:"async component loader",[14]:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"};function On(e,t,n,o){let i;try{i=o?e(...o):e()}catch(s){ns(s,t,n)}return i}function an(e,t,n,o){if(Le(e)){const s=On(e,t,n,o);return s&&ar(s)&&s.catch(r=>{ns(r,t,n)}),s}const i=[];for(let s=0;s<e.length;s++)i.push(an(e[s],t,n,o));return i}function ns(e,t,n,o=!0){const i=t?t.vnode:null;if(t){let s=t.parent;const r=t.proxy,a=_l[n];for(;s;){const u=s.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](e,r,a)===!1)return}s=s.parent}const l=t.appContext.config.errorHandler;if(l){On(l,null,10,[e,r,a]);return}}mv(e,n,i,o)}function mv(e,t,n,o=!0){{const i=_l[t];if(n&&es(n),le(`Unhandled error${i?` during execution of ${i}`:""}`),n&&ts(),o)throw e;console.error(e)}}let os=!1,vl=!1;const xt=[];let yn=0;const hi=[];let wn=null,oo=0;const vf=Promise.resolve();let xl=null;const gv=100;function mi(e){const t=xl||vf;return e?t.then(this?e.bind(this):e):t}function yv(e){let t=yn+1,n=xt.length;for(;t<n;){const o=t+n>>>1;is(xt[o])<e?t=o+1:n=o}return t}function Er(e){(!xt.length||!xt.includes(e,os&&e.allowRecurse?yn+1:yn))&&(e.id==null?xt.push(e):xt.splice(yv(e.id),0,e),xf())}function xf(){!os&&!vl&&(vl=!0,xl=vf.then(Ef))}function wv(e){const t=xt.indexOf(e);t>yn&&xt.splice(t,1)}function Cl(e){ke(e)?hi.push(...e):(!wn||!wn.includes(e,e.allowRecurse?oo+1:oo))&&hi.push(e),xf()}function Cf(e,t=os?yn+1:0){for(e=e||new Map;t<xt.length;t++){const n=xt[t];if(n&&n.pre){if($l(e,n))continue;xt.splice(t,1),t--,n()}}}function $f(e){if(hi.length){const t=[...new Set(hi)];if(hi.length=0,wn){wn.push(...t);return}for(wn=t,e=e||new Map,wn.sort((n,o)=>is(n)-is(o)),oo=0;oo<wn.length;oo++)$l(e,wn[oo])||wn[oo]();wn=null,oo=0}}const is=e=>e.id==null?1/0:e.id,bv=(e,t)=>{const n=is(e)-is(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Ef(e){vl=!1,os=!0,e=e||new Map,xt.sort(bv);const t=n=>$l(e,n);try{for(yn=0;yn<xt.length;yn++){const n=xt[yn];if(n&&n.active!==!1){if(t(n))continue;On(n,null,14)}}}finally{yn=0,xt.length=0,$f(e),os=!1,xl=null,(xt.length||hi.length)&&Ef(e)}}function $l(e,t){if(!e.has(t))e.set(t,1);else{const n=e.get(t);if(n>gv){const o=t.ownerInstance,i=o&&Yl(o.type);return le(`Maximum recursive updates exceeded${i?` in component <${i}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),!0}else e.set(t,n+1)}}let Mo=!1;const gi=new Set;Wd().__VUE_HMR_RUNTIME__={createRecord:El(kf),rerender:El(xv),reload:El(Cv)};const Do=new Map;function _v(e){const t=e.type.__hmrId;let n=Do.get(t);n||(kf(t,e.type),n=Do.get(t)),n.instances.add(e)}function vv(e){Do.get(e.type.__hmrId).instances.delete(e)}function kf(e,t){return Do.has(e)?!1:(Do.set(e,{initialDef:ss(t),instances:new Set}),!0)}function ss(e){return gp(e)?e.__vccOpts:e}function xv(e,t){const n=Do.get(e);!n||(n.initialDef.render=t,[...n.instances].forEach(o=>{t&&(o.render=t,ss(o.type).render=t),o.renderCache=[],Mo=!0,o.update(),Mo=!1}))}function Cv(e,t){const n=Do.get(e);if(!n)return;t=ss(t),Sf(n.initialDef,t);const o=[...n.instances];for(const i of o){const s=ss(i.type);gi.has(s)||(s!==n.initialDef&&Sf(s,t),gi.add(s)),i.appContext.optionsCache.delete(i.type),i.ceReload?(gi.add(s),i.ceReload(t.styles),gi.delete(s)):i.parent?Er(i.parent.update):i.appContext.reload?i.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}Cl(()=>{for(const i of o)gi.delete(ss(i.type))})}function Sf(e,t){dt(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function El(e){return(t,n)=>{try{return e(t,n)}catch(o){console.error(o),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let bn,rs=[],kl=!1;function as(e,...t){bn?bn.emit(e,...t):kl||rs.push({event:e,args:t})}function Af(e,t){var n,o;bn=e,bn?(bn.enabled=!0,rs.forEach(({event:i,args:s})=>bn.emit(i,...s)),rs=[]):typeof window<"u"&&window.HTMLElement&&!(!((o=(n=window.navigator)===null||n===void 0?void 0:n.userAgent)===null||o===void 0)&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{Af(s,t)}),setTimeout(()=>{bn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,kl=!0,rs=[])},3e3)):(kl=!0,rs=[])}function $v(e,t){as("app:init",e,t,{Fragment:je,Text:ps,Comment:It,Static:hs})}function Ev(e){as("app:unmount",e)}const kv=Sl("component:added"),Pf=Sl("component:updated"),Sv=Sl("component:removed"),Av=e=>{bn&&typeof bn.cleanupBuffer=="function"&&!bn.cleanupBuffer(e)&&Sv(e)};function Sl(e){return t=>{as(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const Pv=Tf("perf:start"),Tv=Tf("perf:end");function Tf(e){return(t,n,o)=>{as(e,t.appContext.app,t.uid,t,n,o)}}function Iv(e,t,n){as("component:emit",e.appContext.app,e,t,n)}function Ov(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Xe;{const{emitsOptions:f,propsOptions:[h]}=e;if(f)if(!(t in f))(!h||!(Ao(t)in h))&&le(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Ao(t)}" prop.`);else{const g=f[t];Le(g)&&(g(...n)||le(`Invalid event arguments: event validation failed for event "${t}".`))}}let i=n;const s=t.startsWith("update:"),r=s&&t.slice(7);if(r&&r in o){const f=`${r==="modelValue"?"model":r}Modifiers`,{number:h,trim:g}=o[f]||Xe;g&&(i=n.map(b=>nt(b)?b.trim():b)),h&&(i=n.map(dr))}Iv(e,t,i);{const f=t.toLowerCase();f!==t&&o[Ao(f)]&&le(`Event "${f}" is emitted in component ${Br(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${Tn(t)}" instead of "${t}".`)}let a,l=o[a=Ao(t)]||o[a=Ao(gn(t))];!l&&s&&(l=o[a=Ao(Tn(t))]),l&&an(l,e,6,i);const u=o[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,an(u,e,6,i)}}function If(e,t,n=!1){const o=t.emitsCache,i=o.get(e);if(i!==void 0)return i;const s=e.emits;let r={},a=!1;if(!Le(e)){const l=u=>{const f=If(u,t,!0);f&&(a=!0,dt(r,f))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(Ye(e)&&o.set(e,null),null):(ke(s)?s.forEach(l=>r[l]=null):dt(r,s),Ye(e)&&o.set(e,r),r)}function kr(e,t){return!e||!Gi(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ue(e,t[0].toLowerCase()+t.slice(1))||Ue(e,Tn(t))||Ue(e,t))}let mt=null,Sr=null;function Ar(e){const t=mt;return mt=e,Sr=e&&e.type.__scopeId||null,t}function Lv(e){Sr=e}function Mv(){Sr=null}const Dv=e=>Je;function Je(e,t=mt,n){if(!t||e._n)return e;const o=(...i)=>{o._d&&ap(-1);const s=Ar(t);let r;try{r=e(...i)}finally{Ar(s),o._d&&ap(1)}return Pf(t),r};return o._n=!0,o._c=!0,o._d=!0,o}let Al=!1;function Pr(){Al=!0}function Pl(e){const{type:t,vnode:n,proxy:o,withProxy:i,props:s,propsOptions:[r],slots:a,attrs:l,emit:u,render:f,renderCache:h,data:g,setupState:b,ctx:_,inheritAttrs:E}=e;let T,M;const P=Ar(e);Al=!1;try{if(n.shapeFlag&4){const ie=i||o;T=en(f.call(ie,ie,h,s,b,g,_)),M=l}else{const ie=t;l===s&&Pr(),T=en(ie.length>1?ie(s,{get attrs(){return Pr(),l},slots:a,emit:u}):ie(s,null)),M=t.props?l:Nv(l)}}catch(ie){ms.length=0,ns(ie,e,1),T=Ee(It)}let I=T,H;if(T.patchFlag>0&&T.patchFlag&2048&&([I,H]=Rv(T)),M&&E!==!1){const ie=Object.keys(M),{shapeFlag:j}=I;if(ie.length){if(j&7)r&&ie.some(rr)&&(M=Bv(M,r)),I=ro(I,M);else if(!Al&&I.type!==It){const Z=Object.keys(l),ce=[],ye=[];for(let Te=0,be=Z.length;Te<be;Te++){const O=Z[Te];Gi(O)?rr(O)||ce.push(O[2].toLowerCase()+O.slice(3)):ye.push(O)}ye.length&&le(`Extraneous non-props attributes (${ye.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),ce.length&&le(`Extraneous non-emits event listeners (${ce.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(Of(I)||le("Runtime directive used on component with non-element root node. The directives will not function as intended."),I=ro(I),I.dirs=I.dirs?I.dirs.concat(n.dirs):n.dirs),n.transition&&(Of(I)||le("Component inside <Transition> renders non-element root node that cannot be animated."),I.transition=n.transition),H?H(I):T=I,Ar(P),T}const Rv=e=>{const t=e.children,n=e.dynamicChildren,o=Tl(t);if(!o)return[e,void 0];const i=t.indexOf(o),s=n?n.indexOf(o):-1,r=a=>{t[i]=a,n&&(s>-1?n[s]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[en(o),r]};function Tl(e){let t;for(let n=0;n<e.length;n++){const o=e[n];if(bi(o)){if(o.type!==It||o.children==="v-if"){if(t)return;t=o}}else return}return t}const Nv=e=>{let t;for(const n in e)(n==="class"||n==="style"||Gi(n))&&((t||(t={}))[n]=e[n]);return t},Bv=(e,t)=>{const n={};for(const o in e)(!rr(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n},Of=e=>e.shapeFlag&7||e.type===It;function Fv(e,t,n){const{props:o,children:i,component:s}=e,{props:r,children:a,patchFlag:l}=t,u=s.emitsOptions;if((i||a)&&Mo||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return o?Lf(o,r,u):!!r;if(l&8){const f=t.dynamicProps;for(let h=0;h<f.length;h++){const g=f[h];if(r[g]!==o[g]&&!kr(u,g))return!0}}}else return(i||a)&&(!a||!a.$stable)?!0:o===r?!1:o?r?Lf(o,r,u):!0:!!r;return!1}function Lf(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i<o.length;i++){const s=o[i];if(t[s]!==e[s]&&!kr(n,s))return!0}return!1}function Il({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const jv=e=>e.__isSuspense,Mf={name:"Suspense",__isSuspense:!0,process(e,t,n,o,i,s,r,a,l,u){e==null?Uv(t,n,o,i,s,r,a,l,u):Hv(e,t,n,o,i,r,a,l,u)},hydrate:qv,create:Ol,normalize:zv};function ls(e,t){const n=e.props&&e.props[t];Le(n)&&n()}function Uv(e,t,n,o,i,s,r,a,l){const{p:u,o:{createElement:f}}=l,h=f("div"),g=e.suspense=Ol(e,i,o,t,h,n,s,r,a,l);u(null,g.pendingBranch=e.ssContent,h,null,o,g,s,r),g.deps>0?(ls(e,"onPending"),ls(e,"onFallback"),u(null,e.ssFallback,t,n,o,null,s,r),yi(g,e.ssFallback)):g.resolve()}function Hv(e,t,n,o,i,s,r,a,{p:l,um:u,o:{createElement:f}}){const h=t.suspense=e.suspense;h.vnode=t,t.el=e.el;const g=t.ssContent,b=t.ssFallback,{activeBranch:_,pendingBranch:E,isInFallback:T,isHydrating:M}=h;if(E)h.pendingBranch=g,so(g,E)?(l(E,g,h.hiddenContainer,null,i,h,s,r,a),h.deps<=0?h.resolve():T&&(l(_,b,n,o,i,null,s,r,a),yi(h,b))):(h.pendingId++,M?(h.isHydrating=!1,h.activeBranch=E):u(E,i,h),h.deps=0,h.effects.length=0,h.hiddenContainer=f("div"),T?(l(null,g,h.hiddenContainer,null,i,h,s,r,a),h.deps<=0?h.resolve():(l(_,b,n,o,i,null,s,r,a),yi(h,b))):_&&so(g,_)?(l(_,g,n,o,i,h,s,r,a),h.resolve(!0)):(l(null,g,h.hiddenContainer,null,i,h,s,r,a),h.deps<=0&&h.resolve()));else if(_&&so(g,_))l(_,g,n,o,i,h,s,r,a),yi(h,g);else if(ls(t,"onPending"),h.pendingBranch=g,h.pendingId++,l(null,g,h.hiddenContainer,null,i,h,s,r,a),h.deps<=0)h.resolve();else{const{timeout:P,pendingId:I}=h;P>0?setTimeout(()=>{h.pendingId===I&&h.fallback(b)},P):P===0&&h.fallback(b)}}let Df=!1;function Ol(e,t,n,o,i,s,r,a,l,u,f=!1){Df||(Df=!0,console[console.info?"info":"log"]("<Suspense> is an experimental feature and its API will likely change."));const{p:h,m:g,um:b,n:_,o:{parentNode:E,remove:T}}=u,M=e.props?C_(e.props.timeout):void 0;hv(M,"Suspense timeout");const P={vnode:e,parent:t,parentComponent:n,isSVG:r,container:o,hiddenContainer:i,anchor:s,deps:0,pendingId:0,timeout:typeof M=="number"?M:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:f,isUnmounted:!1,effects:[],resolve(I=!1){{if(!I&&!P.pendingBranch)throw new Error("suspense.resolve() is called without a pending branch.");if(P.isUnmounted)throw new Error("suspense.resolve() is called on an already unmounted suspense boundary.")}const{vnode:H,activeBranch:ie,pendingBranch:j,pendingId:Z,effects:ce,parentComponent:ye,container:Te}=P;if(P.isHydrating)P.isHydrating=!1;else if(!I){const re=ie&&j.transition&&j.transition.mode==="out-in";re&&(ie.transition.afterLeave=()=>{Z===P.pendingId&&g(j,Te,J,0)});let{anchor:J}=P;ie&&(J=_(ie),b(ie,ye,P,!0)),re||g(j,Te,J,0)}yi(P,j),P.pendingBranch=null,P.isInFallback=!1;let be=P.parent,O=!1;for(;be;){if(be.pendingBranch){be.effects.push(...ce),O=!0;break}be=be.parent}O||Cl(ce),P.effects=[],ls(H,"onResolve")},fallback(I){if(!P.pendingBranch)return;const{vnode:H,activeBranch:ie,parentComponent:j,container:Z,isSVG:ce}=P;ls(H,"onFallback");const ye=_(ie),Te=()=>{!P.isInFallback||(h(null,I,Z,ye,j,null,ce,a,l),yi(P,I))},be=I.transition&&I.transition.mode==="out-in";be&&(ie.transition.afterLeave=Te),P.isInFallback=!0,b(ie,j,null,!0),be||Te()},move(I,H,ie){P.activeBranch&&g(P.activeBranch,I,H,ie),P.container=I},next(){return P.activeBranch&&_(P.activeBranch)},registerDep(I,H){const ie=!!P.pendingBranch;ie&&P.deps++;const j=I.vnode.el;I.asyncDep.catch(Z=>{ns(Z,I,0)}).then(Z=>{if(I.isUnmounted||P.isUnmounted||P.pendingId!==I.suspenseId)return;I.asyncResolved=!0;const{vnode:ce}=I;es(ce),Kl(I,Z,!1),j&&(ce.el=j);const ye=!j&&I.subTree.el;H(I,ce,E(j||I.subTree.el),j?null:_(I.subTree),P,r,l),ye&&T(ye),Il(I,ce.el),ts(),ie&&--P.deps===0&&P.resolve()})},unmount(I,H){P.isUnmounted=!0,P.activeBranch&&b(P.activeBranch,n,I,H),P.pendingBranch&&b(P.pendingBranch,n,I,H)}};return P}function qv(e,t,n,o,i,s,r,a,l){const u=t.suspense=Ol(t,o,n,e.parentNode,document.createElement("div"),null,i,s,r,a,!0),f=l(e,u.pendingBranch=t.ssContent,n,u,s,r);return u.deps===0&&u.resolve(),f}function zv(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=Rf(o?n.default:n),e.ssFallback=o?Rf(n.fallback):Ee(It)}function Rf(e){let t;if(Le(e)){const n=wi&&e._c;n&&(e._d=!1,B()),e=e(),n&&(e._d=!0,t=Xt,rp())}if(ke(e)){const n=Tl(e);n||le("<Suspense> slots expect a single root node."),e=n}return e=en(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Vv(e,t){t&&t.pendingBranch?ke(e)?t.effects.push(...e):t.effects.push(e):Cl(e)}function yi(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e,i=n.el=t.el;o&&o.subTree===n&&(o.vnode.el=i,Il(o,i))}function cs(e,t){if(!rt)le("provide() can only be used inside setup().");else{let n=rt.provides;const o=rt.parent&&rt.parent.provides;o===n&&(n=rt.provides=Object.create(o)),n[e]=t}}function us(e,t,n=!1){const o=rt||mt;if(o){const i=o.parent==null?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&Le(t)?t.call(o.proxy):t;le(`injection "${String(e)}" not found.`)}else le("inject() can only be used inside setup() or functional components.")}const Tr={};function pt(e,t,n){return Le(t)||le("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Nf(e,t,n)}function Nf(e,t,{immediate:n,deep:o,flush:i,onTrack:s,onTrigger:r}=Xe){t||(n!==void 0&&le('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&le('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'));const a=H=>{le("Invalid watch source: ",H,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},l=k_()===(rt==null?void 0:rt.scope)?rt:null;let u,f=!1,h=!1;if(ft(e)?(u=()=>e.value,f=Cr(e)):Oo(e)?(u=()=>e,o=!0):ke(e)?(h=!0,f=e.some(H=>Oo(H)||Cr(H)),u=()=>e.map(H=>{if(ft(H))return H.value;if(Oo(H))return Ro(H);if(Le(H))return On(H,l,2);a(H)})):Le(e)?t?u=()=>On(e,l,2):u=()=>{if(!(l&&l.isUnmounted))return g&&g(),an(e,l,3,[b])}:(u=Ut,a(e)),t&&o){const H=u;u=()=>Ro(H())}let g,b=H=>{g=P.onStop=()=>{On(H,l,4)}},_;if(gs)if(b=Ut,t?n&&an(t,l,3,[u(),h?[]:void 0,b]):u(),i==="sync"){const H=K1();_=H.__watcherHandles||(H.__watcherHandles=[])}else return Ut;let E=h?new Array(e.length).fill(Tr):Tr;const T=()=>{if(!!P.active)if(t){const H=P.run();(o||f||(h?H.some((ie,j)=>Qi(ie,E[j])):Qi(H,E)))&&(g&&g(),an(t,l,3,[H,E===Tr?void 0:h&&E[0]===Tr?[]:E,b]),E=H)}else P.run()};T.allowRecurse=!!t;let M;i==="sync"?M=T:i==="post"?M=()=>qt(T,l&&l.suspense):(T.pre=!0,l&&(T.id=l.uid),M=()=>Er(T));const P=new gl(u,M);P.onTrack=s,P.onTrigger=r,t?n?T():E=P.run():i==="post"?qt(P.run.bind(P),l&&l.suspense):P.run();const I=()=>{P.stop(),l&&l.scope&&cl(l.scope.effects,P)};return _&&_.push(I),I}function Wv(e,t,n){const o=this.proxy,i=nt(e)?e.includes(".")?Bf(o,e):()=>o[e]:e.bind(o,o);let s;Le(t)?s=t:(s=t.handler,n=t);const r=rt;lo(this);const a=Nf(i,s.bind(o),n);return r?lo(r):co(),a}function Bf(e,t){const n=t.split(".");return()=>{let o=e;for(let i=0;i<n.length&&o;i++)o=o[n[i]];return o}}function Ro(e,t){if(!Ye(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),ft(e))Ro(e.value,t);else if(ke(e))for(let n=0;n<e.length;n++)Ro(e[n],t);else if(di(e)||ko(e))e.forEach(n=>{Ro(n,t)});else if(zd(e))for(const n in e)Ro(e[n],t);return e}function Ne(e){return Le(e)?{setup:e,name:e.name}:e}const ds=e=>!!e.type.__asyncLoader,Ll=e=>e.type.__isKeepAlive;function Kv(e,t){Ff(e,"a",t)}function Gv(e,t){Ff(e,"da",t)}function Ff(e,t,n=rt){const o=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Ir(t,o,n),n){let i=n.parent;for(;i&&i.parent;)Ll(i.parent.vnode)&&Yv(o,t,n,i),i=i.parent}}function Yv(e,t,n,o){const i=Ir(t,e,o,!0);No(()=>{cl(o[t],i)},n)}function Ir(e,t,n=rt,o=!1){if(n){const i=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...r)=>{if(n.isUnmounted)return;To(),lo(n);const a=an(t,n,e,r);return co(),Io(),a});return o?i.unshift(s):i.push(s),s}else{const i=Ao(_l[e].replace(/ hook$/,""));le(`${i} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const Ln=e=>(t,n=rt)=>(!gs||e==="sp")&&Ir(e,(...o)=>t(...o),n),At=Ln("bm"),Pt=Ln("m"),Jv=Ln("bu"),Qv=Ln("u"),jf=Ln("bum"),No=Ln("um"),Xv=Ln("sp"),Zv=Ln("rtg"),e1=Ln("rtc");function t1(e,t=rt){Ir("ec",e,t)}function Uf(e){__(e)&&le("Do not use built-in directive ids as custom directive id: "+e)}function X(e,t){const n=mt;if(n===null)return le("withDirectives can only be used inside render functions."),e;const o=Nr(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[r,a,l,u=Xe]=t[s];r&&(Le(r)&&(r={mounted:r,updated:r}),r.deep&&Ro(a),i.push({dir:r,instance:o,value:a,oldValue:void 0,arg:l,modifiers:u}))}return e}function Bo(e,t,n,o){const i=e.dirs,s=t&&t.dirs;for(let r=0;r<i.length;r++){const a=i[r];s&&(a.oldValue=s[r].value);let l=a.dir[o];l&&(To(),an(l,n,8,[e.el,a,e,t]),Io())}}const Ml="components";function Fo(e,t){return o1(Ml,e,!0,t)||e}const n1=Symbol();function o1(e,t,n=!0,o=!1){const i=mt||rt;if(i){const s=i.type;if(e===Ml){const a=Yl(s,!1);if(a&&(a===t||a===gn(t)||a===So(gn(t))))return s}const r=Hf(i[e]||s[e],t)||Hf(i.appContext[e],t);if(!r&&o)return s;if(n&&!r){const a=e===Ml?`
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`:"";le(`Failed to resolve ${e.slice(0,-1)}: ${t}${a}`)}return r}else le(`resolve${So(e.slice(0,-1))} can only be used in render() or setup().`)}function Hf(e,t){return e&&(e[t]||e[gn(t)]||e[So(gn(t))])}function st(e,t,n,o){let i;const s=n&&n[o];if(ke(e)||nt(e)){i=new Array(e.length);for(let r=0,a=e.length;r<a;r++)i[r]=t(e[r],r,void 0,s&&s[r])}else if(typeof e=="number"){Number.isInteger(e)||le(`The v-for range expect an integer value but got ${e}.`),i=new Array(e);for(let r=0;r<e;r++)i[r]=t(r+1,r,void 0,s&&s[r])}else if(Ye(e))if(e[Symbol.iterator])i=Array.from(e,(r,a)=>t(r,a,void 0,s&&s[a]));else{const r=Object.keys(e);i=new Array(r.length);for(let a=0,l=r.length;a<l;a++){const u=r[a];i[a]=t(e[u],u,a,s&&s[a])}}else i=[];return n&&(n[o]=i),i}function ln(e,t,n={},o,i){if(mt.isCE||mt.parent&&ds(mt.parent)&&mt.parent.isCE)return t!=="default"&&(n.name=t),Ee("slot",n,o&&o());let s=e[t];s&&s.length>1&&(le("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),s=()=>[]),s&&s._c&&(s._d=!1),B();const r=s&&qf(s(n)),a=Zt(je,{key:n.key||r&&r.key||`_${t}`},r||(o?o():[]),r&&e._===1?64:-2);return!i&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),s&&s._c&&(s._d=!0),a}function qf(e){return e.some(t=>bi(t)?!(t.type===It||t.type===je&&!qf(t.children)):!0)?e:null}const Dl=e=>e?hp(e)?Nr(e)||e.proxy:Dl(e.parent):null,jo=dt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>pi(e.props),$attrs:e=>pi(e.attrs),$slots:e=>pi(e.slots),$refs:e=>pi(e.refs),$parent:e=>Dl(e.parent),$root:e=>Dl(e.root),$emit:e=>e.emit,$options:e=>Fl(e),$forceUpdate:e=>e.f||(e.f=()=>Er(e.update)),$nextTick:e=>e.n||(e.n=mi.bind(e.proxy)),$watch:e=>Wv.bind(e)}),Rl=e=>e==="_"||e==="$",Nl=(e,t)=>e!==Xe&&!e.__isScriptSetup&&Ue(e,t),zf={get({_:e},t){const{ctx:n,setupState:o,data:i,props:s,accessCache:r,type:a,appContext:l}=e;if(t==="__isVue")return!0;let u;if(t[0]!=="$"){const b=r[t];if(b!==void 0)switch(b){case 1:return o[t];case 2:return i[t];case 4:return n[t];case 3:return s[t]}else{if(Nl(o,t))return r[t]=1,o[t];if(i!==Xe&&Ue(i,t))return r[t]=2,i[t];if((u=e.propsOptions[0])&&Ue(u,t))return r[t]=3,s[t];if(n!==Xe&&Ue(n,t))return r[t]=4,n[t];Bl&&(r[t]=0)}}const f=jo[t];let h,g;if(f)return t==="$attrs"&&(Ht(e,"get",t),Pr()),f(e);if((h=a.__cssModules)&&(h=h[t]))return h;if(n!==Xe&&Ue(n,t))return r[t]=4,n[t];if(g=l.config.globalProperties,Ue(g,t))return g[t];mt&&(!nt(t)||t.indexOf("__v")!==0)&&(i!==Xe&&Rl(t[0])&&Ue(i,t)?le(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===mt&&le(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:o,setupState:i,ctx:s}=e;return Nl(i,t)?(i[t]=n,!0):i.__isScriptSetup&&Ue(i,t)?(le(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):o!==Xe&&Ue(o,t)?(o[t]=n,!0):Ue(e.props,t)?(le(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(le(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(t in e.appContext.config.globalProperties?Object.defineProperty(s,t,{enumerable:!0,configurable:!0,value:n}):s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:i,propsOptions:s}},r){let a;return!!n[r]||e!==Xe&&Ue(e,r)||Nl(t,r)||(a=s[0])&&Ue(a,r)||Ue(o,r)||Ue(jo,r)||Ue(i.config.globalProperties,r)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ue(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};zf.ownKeys=e=>(le("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e));function i1(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(jo).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>jo[n](e),set:Ut})}),t}function s1(e){const{ctx:t,propsOptions:[n]}=e;n&&Object.keys(n).forEach(o=>{Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>e.props[o],set:Ut})})}function r1(e){const{ctx:t,setupState:n}=e;Object.keys(Fe(n)).forEach(o=>{if(!n.__isScriptSetup){if(Rl(o[0])){le(`setup() return property ${JSON.stringify(o)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>n[o],set:Ut})}})}function a1(){const e=Object.create(null);return(t,n)=>{e[n]?le(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let Bl=!0;function l1(e){const t=Fl(e),n=e.proxy,o=e.ctx;Bl=!1,t.beforeCreate&&Vf(t.beforeCreate,e,"bc");const{data:i,computed:s,methods:r,watch:a,provide:l,inject:u,created:f,beforeMount:h,mounted:g,beforeUpdate:b,updated:_,activated:E,deactivated:T,beforeDestroy:M,beforeUnmount:P,destroyed:I,unmounted:H,render:ie,renderTracked:j,renderTriggered:Z,errorCaptured:ce,serverPrefetch:ye,expose:Te,inheritAttrs:be,components:O,directives:re,filters:J}=t,$e=a1();{const[K]=e.propsOptions;if(K)for(const N in K)$e("Props",N)}if(u&&c1(u,o,$e,e.appContext.config.unwrapInjectedRef),r)for(const K in r){const N=r[K];Le(N)?(Object.defineProperty(o,K,{value:N.bind(n),configurable:!0,enumerable:!0,writable:!0}),$e("Methods",K)):le(`Method "${K}" has type "${typeof N}" in the component definition. Did you reference the function correctly?`)}if(i){Le(i)||le("The data option must be a function. Plain object usage is no longer supported.");const K=i.call(n,n);if(ar(K)&&le("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Ye(K))le("data() should return an object.");else{e.data=vr(K);for(const N in K)$e("Data",N),Rl(N[0])||Object.defineProperty(o,N,{configurable:!0,enumerable:!0,get:()=>K[N],set:Ut})}}if(Bl=!0,s)for(const K in s){const N=s[K],we=Le(N)?N.bind(n,n):Le(N.get)?N.get.bind(n,n):Ut;we===Ut&&le(`Computed property "${K}" has no getter.`);const Ae=!Le(N)&&Le(N.set)?N.set.bind(n):()=>{le(`Write operation failed: computed property "${K}" is readonly.`)},De=vn({get:we,set:Ae});Object.defineProperty(o,K,{enumerable:!0,configurable:!0,get:()=>De.value,set:pe=>De.value=pe}),$e("Computed",K)}if(a)for(const K in a)Wf(a[K],o,n,K);if(l){const K=Le(l)?l.call(n):l;Reflect.ownKeys(K).forEach(N=>{cs(N,K[N])})}f&&Vf(f,e,"c");function D(K,N){ke(N)?N.forEach(we=>K(we.bind(n))):N&&K(N.bind(n))}if(D(At,h),D(Pt,g),D(Jv,b),D(Qv,_),D(Kv,E),D(Gv,T),D(t1,ce),D(e1,j),D(Zv,Z),D(jf,P),D(No,H),D(Xv,ye),ke(Te))if(Te.length){const K=e.exposed||(e.exposed={});Te.forEach(N=>{Object.defineProperty(K,N,{get:()=>n[N],set:we=>n[N]=we})})}else e.exposed||(e.exposed={});ie&&e.render===Ut&&(e.render=ie),be!=null&&(e.inheritAttrs=be),O&&(e.components=O),re&&(e.directives=re)}function c1(e,t,n=Ut,o=!1){ke(e)&&(e=jl(e));for(const i in e){const s=e[i];let r;Ye(s)?"default"in s?r=us(s.from||i,s.default,!0):r=us(s.from||i):r=us(s),ft(r)?o?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:a=>r.value=a}):(le(`injected property "${i}" is a ref and will be auto-unwrapped and no longer needs \`.value\` in the next minor release. To opt-in to the new behavior now, set \`app.config.unwrapInjectedRef = true\` (this config is temporary and will not be needed in the future.)`),t[i]=r):t[i]=r,n("Inject",i)}}function Vf(e,t,n){an(ke(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function Wf(e,t,n,o){const i=o.includes(".")?Bf(n,o):()=>n[o];if(nt(e)){const s=t[e];Le(s)?pt(i,s):le(`Invalid watch handler specified by key "${e}"`,s)}else if(Le(e))pt(i,e.bind(n));else if(Ye(e))if(ke(e))e.forEach(s=>Wf(s,t,n,o));else{const s=Le(e.handler)?e.handler.bind(n):t[e.handler];Le(s)?pt(i,s,e):le(`Invalid watch handler specified by key "${e.handler}"`,s)}else le(`Invalid watch option: "${o}"`,e)}function Fl(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:s,config:{optionMergeStrategies:r}}=e.appContext,a=s.get(t);let l;return a?l=a:!i.length&&!n&&!o?l=t:(l={},i.length&&i.forEach(u=>Or(l,u,r,!0)),Or(l,t,r)),Ye(t)&&s.set(t,l),l}function Or(e,t,n,o=!1){const{mixins:i,extends:s}=t;s&&Or(e,s,n,!0),i&&i.forEach(r=>Or(e,r,n,!0));for(const r in t)if(o&&r==="expose")le('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=u1[r]||n&&n[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const u1={data:Kf,props:Uo,emits:Uo,methods:Uo,computed:Uo,beforeCreate:Tt,created:Tt,beforeMount:Tt,mounted:Tt,beforeUpdate:Tt,updated:Tt,beforeDestroy:Tt,beforeUnmount:Tt,destroyed:Tt,unmounted:Tt,activated:Tt,deactivated:Tt,errorCaptured:Tt,serverPrefetch:Tt,components:Uo,directives:Uo,watch:f1,provide:Kf,inject:d1};function Kf(e,t){return t?e?function(){return dt(Le(e)?e.call(this,this):e,Le(t)?t.call(this,this):t)}:t:e}function d1(e,t){return Uo(jl(e),jl(t))}function jl(e){if(ke(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Tt(e,t){return e?[...new Set([].concat(e,t))]:t}function Uo(e,t){return e?dt(dt(Object.create(null),e),t):t}function f1(e,t){if(!e)return t;if(!t)return e;const n=dt(Object.create(null),e);for(const o in t)n[o]=Tt(e[o],t[o]);return n}function p1(e,t,n,o=!1){const i={},s={};ur(s,Dr,1),e.propsDefaults=Object.create(null),Gf(e,t,i,s);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);Zf(t||{},i,e),n?e.props=o?i:tv(i):e.type.props?e.props=i:e.props=s,e.attrs=s}function h1(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function m1(e,t,n,o){const{props:i,attrs:s,vnode:{patchFlag:r}}=e,a=Fe(i),[l]=e.propsOptions;let u=!1;if(!h1(e)&&(o||r>0)&&!(r&16)){if(r&8){const f=e.vnode.dynamicProps;for(let h=0;h<f.length;h++){let g=f[h];if(kr(e.emitsOptions,g))continue;const b=t[g];if(l)if(Ue(s,g))b!==s[g]&&(s[g]=b,u=!0);else{const _=gn(g);i[_]=Ul(l,a,_,b,e,!1)}else b!==s[g]&&(s[g]=b,u=!0)}}}else{Gf(e,t,i,s)&&(u=!0);let f;for(const h in a)(!t||!Ue(t,h)&&((f=Tn(h))===h||!Ue(t,f)))&&(l?n&&(n[h]!==void 0||n[f]!==void 0)&&(i[h]=Ul(l,a,h,void 0,e,!0)):delete i[h]);if(s!==a)for(const h in s)(!t||!Ue(t,h)&&!0)&&(delete s[h],u=!0)}u&&In(e,"set","$attrs"),Zf(t||{},i,e)}function Gf(e,t,n,o){const[i,s]=e.propsOptions;let r=!1,a;if(t)for(let l in t){if(lr(l))continue;const u=t[l];let f;i&&Ue(i,f=gn(l))?!s||!s.includes(f)?n[f]=u:(a||(a={}))[f]=u:kr(e.emitsOptions,l)||(!(l in o)||u!==o[l])&&(o[l]=u,r=!0)}if(s){const l=Fe(n),u=a||Xe;for(let f=0;f<s.length;f++){const h=s[f];n[h]=Ul(i,l,h,u[h],e,!Ue(u,h))}}return r}function Ul(e,t,n,o,i,s){const r=e[n];if(r!=null){const a=Ue(r,"default");if(a&&o===void 0){const l=r.default;if(r.type!==Function&&Le(l)){const{propsDefaults:u}=i;n in u?o=u[n]:(lo(i),o=u[n]=l.call(null,t),co())}else o=l}r[0]&&(s&&!a?o=!1:r[1]&&(o===""||o===Tn(n))&&(o=!0))}return o}function Yf(e,t,n=!1){const o=t.propsCache,i=o.get(e);if(i)return i;const s=e.props,r={},a=[];let l=!1;if(!Le(e)){const f=h=>{l=!0;const[g,b]=Yf(h,t,!0);dt(r,g),b&&a.push(...b)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!s&&!l)return Ye(e)&&o.set(e,ui),ui;if(ke(s))for(let f=0;f<s.length;f++){nt(s[f])||le("props must be strings when using array syntax.",s[f]);const h=gn(s[f]);Jf(h)&&(r[h]=Xe)}else if(s){Ye(s)||le("invalid props options",s);for(const f in s){const h=gn(f);if(Jf(h)){const g=s[f],b=r[h]=ke(g)||Le(g)?{type:g}:Object.assign({},g);if(b){const _=Xf(Boolean,b.type),E=Xf(String,b.type);b[0]=_>-1,b[1]=E<0||_<E,(_>-1||Ue(b,"default"))&&a.push(h)}}}}const u=[r,a];return Ye(e)&&o.set(e,u),u}function Jf(e){return e[0]!=="$"?!0:(le(`Invalid prop name: "${e}" is a reserved property.`),!1)}function Hl(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Qf(e,t){return Hl(e)===Hl(t)}function Xf(e,t){return ke(t)?t.findIndex(n=>Qf(n,e)):Le(t)&&Qf(t,e)?0:-1}function Zf(e,t,n){const o=Fe(t),i=n.propsOptions[0];for(const s in i){let r=i[s];r!=null&&g1(s,o[s],r,!Ue(e,s)&&!Ue(e,Tn(s)))}}function g1(e,t,n,o){const{type:i,required:s,validator:r}=n;if(s&&o){le('Missing required prop: "'+e+'"');return}if(!(t==null&&!n.required)){if(i!=null&&i!==!0){let a=!1;const l=ke(i)?i:[i],u=[];for(let f=0;f<l.length&&!a;f++){const{valid:h,expectedType:g}=w1(t,l[f]);u.push(g||""),a=h}if(!a){le(b1(e,t,u));return}}r&&!r(t)&&le('Invalid prop: custom validator check failed for prop "'+e+'".')}}const y1=Xn("String,Number,Boolean,Function,Symbol,BigInt");function w1(e,t){let n;const o=Hl(t);if(y1(o)){const i=typeof e;n=i===o.toLowerCase(),!n&&i==="object"&&(n=e instanceof t)}else o==="Object"?n=Ye(e):o==="Array"?n=ke(e):o==="null"?n=e===null:n=e instanceof t;return{valid:n,expectedType:o}}function b1(e,t,n){let o=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(So).join(" | ")}`;const i=n[0],s=ul(t),r=ep(t,i),a=ep(t,s);return n.length===1&&tp(i)&&!_1(i,s)&&(o+=` with value ${r}`),o+=`, got ${s} `,tp(s)&&(o+=`with value ${a}.`),o}function ep(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function tp(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function _1(...e){return e.some(t=>t.toLowerCase()==="boolean")}const np=e=>e[0]==="_"||e==="$stable",ql=e=>ke(e)?e.map(en):[en(e)],v1=(e,t,n)=>{if(t._n)return t;const o=Je((...i)=>(rt&&le(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),ql(t(...i))),n);return o._c=!1,o},op=(e,t,n)=>{const o=e._ctx;for(const i in e){if(np(i))continue;const s=e[i];if(Le(s))t[i]=v1(i,s,o);else if(s!=null){le(`Non-function value encountered for slot "${i}". Prefer function slots for better performance.`);const r=ql(s);t[i]=()=>r}}},ip=(e,t)=>{Ll(e.vnode)||le("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=ql(t);e.slots.default=()=>n},x1=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Fe(t),ur(t,"_",n)):op(t,e.slots={})}else e.slots={},t&&ip(e,t);ur(e.slots,Dr,1)},C1=(e,t,n)=>{const{vnode:o,slots:i}=e;let s=!0,r=Xe;if(o.shapeFlag&32){const a=t._;a?Mo?dt(i,t):n&&a===1?s=!1:(dt(i,t),!n&&a===1&&delete i._):(s=!t.$stable,op(t,i)),r=t}else t&&(ip(e,t),r={default:1});if(s)for(const a in i)!np(a)&&!(a in r)&&delete i[a]};function sp(){return{app:null,config:{isNativeTag:Ud,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 $1=0;function E1(e,t){return function(o,i=null){Le(o)||(o=Object.assign({},o)),i!=null&&!Ye(i)&&(le("root props passed to app.mount() must be an object."),i=null);const s=sp(),r=new Set;let a=!1;const l=s.app={_uid:$1++,_component:o,_props:i,_container:null,_context:s,_instance:null,version:yp,get config(){return s.config},set config(u){le("app.config cannot be replaced. Modify individual options instead.")},use(u,...f){return r.has(u)?le("Plugin has already been applied to target app."):u&&Le(u.install)?(r.add(u),u.install(l,...f)):Le(u)?(r.add(u),u(l,...f)):le('A plugin must either be a function or an object with an "install" function.'),l},mixin(u){return s.mixins.includes(u)?le("Mixin has already been applied to target app"+(u.name?`: ${u.name}`:"")):s.mixins.push(u),l},component(u,f){return Wl(u,s.config),f?(s.components[u]&&le(`Component "${u}" has already been registered in target app.`),s.components[u]=f,l):s.components[u]},directive(u,f){return Uf(u),f?(s.directives[u]&&le(`Directive "${u}" has already been registered in target app.`),s.directives[u]=f,l):s.directives[u]},mount(u,f,h){if(a)le("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{u.__vue_app__&&le("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const g=Ee(o,i);return g.appContext=s,s.reload=()=>{e(ro(g),u,h)},f&&t?t(g,u):e(g,u,h),a=!0,l._container=u,u.__vue_app__=l,l._instance=g.component,$v(l,yp),Nr(g.component)||g.component.proxy}},unmount(){a?(e(null,l._container),l._instance=null,Ev(l),delete l._container.__vue_app__):le("Cannot unmount an app that is not mounted.")},provide(u,f){return u in s.provides&&le(`App already provides property with key "${String(u)}". It will be overwritten with the new value.`),s.provides[u]=f,l}};return l}}function zl(e,t,n,o,i=!1){if(ke(e)){e.forEach((g,b)=>zl(g,t&&(ke(t)?t[b]:t),n,o,i));return}if(ds(o)&&!i)return;const s=o.shapeFlag&4?Nr(o.component)||o.component.proxy:o.el,r=i?null:s,{i:a,r:l}=e;if(!a){le("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const u=t&&t.r,f=a.refs===Xe?a.refs={}:a.refs,h=a.setupState;if(u!=null&&u!==l&&(nt(u)?(f[u]=null,Ue(h,u)&&(h[u]=null)):ft(u)&&(u.value=null)),Le(l))On(l,a,12,[r,f]);else{const g=nt(l),b=ft(l);if(g||b){const _=()=>{if(e.f){const E=g?Ue(h,l)?h[l]:f[l]:l.value;i?ke(E)&&cl(E,s):ke(E)?E.includes(s)||E.push(s):g?(f[l]=[s],Ue(h,l)&&(h[l]=f[l])):(l.value=[s],e.k&&(f[e.k]=l.value))}else g?(f[l]=r,Ue(h,l)&&(h[l]=r)):b?(l.value=r,e.k&&(f[e.k]=r)):le("Invalid template ref type:",l,`(${typeof l})`)};r?(_.id=-1,qt(_,n)):_()}else le("Invalid template ref type:",l,`(${typeof l})`)}}let fs,io;function Mn(e,t){e.appContext.config.performance&&Lr()&&io.mark(`vue-${t}-${e.uid}`),Pv(e,t,Lr()?io.now():Date.now())}function Dn(e,t){if(e.appContext.config.performance&&Lr()){const n=`vue-${t}-${e.uid}`,o=n+":end";io.mark(o),io.measure(`<${Br(e,e.type)}> ${t}`,n,o),io.clearMarks(n),io.clearMarks(o)}Tv(e,t,Lr()?io.now():Date.now())}function Lr(){return fs!==void 0||(typeof window<"u"&&window.performance?(fs=!0,io=window.performance):fs=!1),fs}function k1(){const e=[];if(e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.

For more details, see https://link.vuejs.org/feature-flags.`)}}const qt=Vv;function S1(e){return A1(e)}function A1(e,t){k1();const n=Wd();n.__VUE__=!0,Af(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:o,remove:i,patchProp:s,createElement:r,createText:a,createComment:l,setText:u,setElementText:f,parentNode:h,nextSibling:g,setScopeId:b=Ut,insertStaticContent:_}=e,E=(v,A,F,R=null,W=null,se=null,he=!1,Q=null,ne=Mo?!1:!!A.dynamicChildren)=>{if(v===A)return;v&&!so(v,A)&&(R=it(v),ue(v,W,se,!0),v=null),A.patchFlag===-2&&(ne=!1,A.dynamicChildren=null);const{type:te,ref:ve,shapeFlag:q}=A;switch(te){case ps:T(v,A,F,R);break;case It:M(v,A,F,R);break;case hs:v==null?P(A,F,R,he):I(v,A,F,he);break;case je:re(v,A,F,R,W,se,he,Q,ne);break;default:q&1?j(v,A,F,R,W,se,he,Q,ne):q&6?J(v,A,F,R,W,se,he,Q,ne):q&64||q&128?te.process(v,A,F,R,W,se,he,Q,ne,ct):le("Invalid VNode type:",te,`(${typeof te})`)}ve!=null&&W&&zl(ve,v&&v.ref,se,A||v,!A)},T=(v,A,F,R)=>{if(v==null)o(A.el=a(A.children),F,R);else{const W=A.el=v.el;A.children!==v.children&&u(W,A.children)}},M=(v,A,F,R)=>{v==null?o(A.el=l(A.children||""),F,R):A.el=v.el},P=(v,A,F,R)=>{[v.el,v.anchor]=_(v.children,A,F,R,v.el,v.anchor)},I=(v,A,F,R)=>{if(A.children!==v.children){const W=g(v.anchor);ie(v),[A.el,A.anchor]=_(A.children,F,W,R)}else A.el=v.el,A.anchor=v.anchor},H=({el:v,anchor:A},F,R)=>{let W;for(;v&&v!==A;)W=g(v),o(v,F,R),v=W;o(A,F,R)},ie=({el:v,anchor:A})=>{let F;for(;v&&v!==A;)F=g(v),i(v),v=F;i(A)},j=(v,A,F,R,W,se,he,Q,ne)=>{he=he||A.type==="svg",v==null?Z(A,F,R,W,se,he,Q,ne):Te(v,A,W,se,he,Q,ne)},Z=(v,A,F,R,W,se,he,Q)=>{let ne,te;const{type:ve,props:q,shapeFlag:xe,transition:m,dirs:w}=v;if(ne=v.el=r(v.type,se,q&&q.is,q),xe&8?f(ne,v.children):xe&16&&ye(v.children,ne,null,R,W,se&&ve!=="foreignObject",he,Q),w&&Bo(v,null,R,"created"),ce(ne,v,v.scopeId,he,R),q){for(const k in q)k!=="value"&&!lr(k)&&s(ne,k,null,q[k],se,v.children,R,W,et);"value"in q&&s(ne,"value",null,q.value),(te=q.onVnodeBeforeMount)&&_n(te,R,v)}Object.defineProperty(ne,"__vnode",{value:v,enumerable:!1}),Object.defineProperty(ne,"__vueParentComponent",{value:R,enumerable:!1}),w&&Bo(v,null,R,"beforeMount");const C=(!W||W&&!W.pendingBranch)&&m&&!m.persisted;C&&m.beforeEnter(ne),o(ne,A,F),((te=q&&q.onVnodeMounted)||C||w)&&qt(()=>{te&&_n(te,R,v),C&&m.enter(ne),w&&Bo(v,null,R,"mounted")},W)},ce=(v,A,F,R,W)=>{if(F&&b(v,F),R)for(let se=0;se<R.length;se++)b(v,R[se]);if(W){let se=W.subTree;if(se.patchFlag>0&&se.patchFlag&2048&&(se=Tl(se.children)||se),A===se){const he=W.vnode;ce(v,he,he.scopeId,he.slotScopeIds,W.parent)}}},ye=(v,A,F,R,W,se,he,Q,ne=0)=>{for(let te=ne;te<v.length;te++){const ve=v[te]=Q?ao(v[te]):en(v[te]);E(null,ve,A,F,R,W,se,he,Q)}},Te=(v,A,F,R,W,se,he)=>{const Q=A.el=v.el;let{patchFlag:ne,dynamicChildren:te,dirs:ve}=A;ne|=v.patchFlag&16;const q=v.props||Xe,xe=A.props||Xe;let m;F&&Ho(F,!1),(m=xe.onVnodeBeforeUpdate)&&_n(m,F,A,v),ve&&Bo(A,v,F,"beforeUpdate"),F&&Ho(F,!0),Mo&&(ne=0,he=!1,te=null);const w=W&&A.type!=="foreignObject";if(te?(be(v.dynamicChildren,te,Q,F,R,w,se),F&&F.type.__hmrId&&Mr(v,A)):he||we(v,A,Q,null,F,R,w,se,!1),ne>0){if(ne&16)O(Q,A,q,xe,F,R,W);else if(ne&2&&q.class!==xe.class&&s(Q,"class",null,xe.class,W),ne&4&&s(Q,"style",q.style,xe.style,W),ne&8){const C=A.dynamicProps;for(let k=0;k<C.length;k++){const L=C[k],S=q[L],V=xe[L];(V!==S||L==="value")&&s(Q,L,S,V,W,v.children,F,R,et)}}ne&1&&v.children!==A.children&&f(Q,A.children)}else!he&&te==null&&O(Q,A,q,xe,F,R,W);((m=xe.onVnodeUpdated)||ve)&&qt(()=>{m&&_n(m,F,A,v),ve&&Bo(A,v,F,"updated")},R)},be=(v,A,F,R,W,se,he)=>{for(let Q=0;Q<A.length;Q++){const ne=v[Q],te=A[Q],ve=ne.el&&(ne.type===je||!so(ne,te)||ne.shapeFlag&70)?h(ne.el):F;E(ne,te,ve,null,R,W,se,he,!0)}},O=(v,A,F,R,W,se,he)=>{if(F!==R){if(F!==Xe)for(const Q in F)!lr(Q)&&!(Q in R)&&s(v,Q,F[Q],null,he,A.children,W,se,et);for(const Q in R){if(lr(Q))continue;const ne=R[Q],te=F[Q];ne!==te&&Q!=="value"&&s(v,Q,te,ne,he,A.children,W,se,et)}"value"in R&&s(v,"value",F.value,R.value)}},re=(v,A,F,R,W,se,he,Q,ne)=>{const te=A.el=v?v.el:a(""),ve=A.anchor=v?v.anchor:a("");let{patchFlag:q,dynamicChildren:xe,slotScopeIds:m}=A;(Mo||q&2048)&&(q=0,ne=!1,xe=null),m&&(Q=Q?Q.concat(m):m),v==null?(o(te,F,R),o(ve,F,R),ye(A.children,F,ve,W,se,he,Q,ne)):q>0&&q&64&&xe&&v.dynamicChildren?(be(v.dynamicChildren,xe,F,W,se,he,Q),W&&W.type.__hmrId?Mr(v,A):(A.key!=null||W&&A===W.subTree)&&Mr(v,A,!0)):we(v,A,F,ve,W,se,he,Q,ne)},J=(v,A,F,R,W,se,he,Q,ne)=>{A.slotScopeIds=Q,v==null?A.shapeFlag&512?W.ctx.activate(A,F,R,he,ne):$e(A,F,R,W,se,he,ne):D(v,A,ne)},$e=(v,A,F,R,W,se,he)=>{const Q=v.component=D1(v,R,W);if(Q.type.__hmrId&&_v(Q),es(v),Mn(Q,"mount"),Ll(v)&&(Q.ctx.renderer=ct),Mn(Q,"init"),B1(Q),Dn(Q,"init"),Q.asyncDep){if(W&&W.registerDep(Q,K),!v.el){const ne=Q.subTree=Ee(It);M(null,ne,A,F)}return}K(Q,v,A,F,W,se,he),ts(),Dn(Q,"mount")},D=(v,A,F)=>{const R=A.component=v.component;if(Fv(v,A,F))if(R.asyncDep&&!R.asyncResolved){es(A),N(R,A,F),ts();return}else R.next=A,wv(R.update),R.update();else A.el=v.el,R.vnode=A},K=(v,A,F,R,W,se,he)=>{const Q=()=>{if(v.isMounted){let{next:ve,bu:q,u:xe,parent:m,vnode:w}=v,C=ve,k;es(ve||v.vnode),Ho(v,!1),ve?(ve.el=w.el,N(v,ve,he)):ve=w,q&&fi(q),(k=ve.props&&ve.props.onVnodeBeforeUpdate)&&_n(k,m,ve,w),Ho(v,!0),Mn(v,"render");const L=Pl(v);Dn(v,"render");const S=v.subTree;v.subTree=L,Mn(v,"patch"),E(S,L,h(S.el),it(S),v,W,se),Dn(v,"patch"),ve.el=L.el,C===null&&Il(v,L.el),xe&&qt(xe,W),(k=ve.props&&ve.props.onVnodeUpdated)&&qt(()=>_n(k,m,ve,w),W),Pf(v),ts()}else{let ve;const{el:q,props:xe}=A,{bm:m,m:w,parent:C}=v,k=ds(A);if(Ho(v,!1),m&&fi(m),!k&&(ve=xe&&xe.onVnodeBeforeMount)&&_n(ve,C,A),Ho(v,!0),q&&yt){const L=()=>{Mn(v,"render"),v.subTree=Pl(v),Dn(v,"render"),Mn(v,"hydrate"),yt(q,v.subTree,v,W,null),Dn(v,"hydrate")};k?A.type.__asyncLoader().then(()=>!v.isUnmounted&&L()):L()}else{Mn(v,"render");const L=v.subTree=Pl(v);Dn(v,"render"),Mn(v,"patch"),E(null,L,F,R,v,W,se),Dn(v,"patch"),A.el=L.el}if(w&&qt(w,W),!k&&(ve=xe&&xe.onVnodeMounted)){const L=A;qt(()=>_n(ve,C,L),W)}(A.shapeFlag&256||C&&ds(C.vnode)&&C.vnode.shapeFlag&256)&&v.a&&qt(v.a,W),v.isMounted=!0,kv(v),A=F=R=null}},ne=v.effect=new gl(Q,()=>Er(te),v.scope),te=v.update=()=>ne.run();te.id=v.uid,Ho(v,!0),ne.onTrack=v.rtc?ve=>fi(v.rtc,ve):void 0,ne.onTrigger=v.rtg?ve=>fi(v.rtg,ve):void 0,te.ownerInstance=v,te()},N=(v,A,F)=>{A.component=v;const R=v.vnode.props;v.vnode=A,v.next=null,m1(v,A.props,R,F),C1(v,A.children,F),To(),Cf(),Io()},we=(v,A,F,R,W,se,he,Q,ne=!1)=>{const te=v&&v.children,ve=v?v.shapeFlag:0,q=A.children,{patchFlag:xe,shapeFlag:m}=A;if(xe>0){if(xe&128){De(te,q,F,R,W,se,he,Q,ne);return}else if(xe&256){Ae(te,q,F,R,W,se,he,Q,ne);return}}m&8?(ve&16&&et(te,W,se),q!==te&&f(F,q)):ve&16?m&16?De(te,q,F,R,W,se,he,Q,ne):et(te,W,se,!0):(ve&8&&f(F,""),m&16&&ye(q,F,R,W,se,he,Q,ne))},Ae=(v,A,F,R,W,se,he,Q,ne)=>{v=v||ui,A=A||ui;const te=v.length,ve=A.length,q=Math.min(te,ve);let xe;for(xe=0;xe<q;xe++){const m=A[xe]=ne?ao(A[xe]):en(A[xe]);E(v[xe],m,F,null,W,se,he,Q,ne)}te>ve?et(v,W,se,!0,!1,q):ye(A,F,R,W,se,he,Q,ne,q)},De=(v,A,F,R,W,se,he,Q,ne)=>{let te=0;const ve=A.length;let q=v.length-1,xe=ve-1;for(;te<=q&&te<=xe;){const m=v[te],w=A[te]=ne?ao(A[te]):en(A[te]);if(so(m,w))E(m,w,F,null,W,se,he,Q,ne);else break;te++}for(;te<=q&&te<=xe;){const m=v[q],w=A[xe]=ne?ao(A[xe]):en(A[xe]);if(so(m,w))E(m,w,F,null,W,se,he,Q,ne);else break;q--,xe--}if(te>q){if(te<=xe){const m=xe+1,w=m<ve?A[m].el:R;for(;te<=xe;)E(null,A[te]=ne?ao(A[te]):en(A[te]),F,w,W,se,he,Q,ne),te++}}else if(te>xe)for(;te<=q;)ue(v[te],W,se,!0),te++;else{const m=te,w=te,C=new Map;for(te=w;te<=xe;te++){const Ie=A[te]=ne?ao(A[te]):en(A[te]);Ie.key!=null&&(C.has(Ie.key)&&le("Duplicate keys found during update:",JSON.stringify(Ie.key),"Make sure keys are unique."),C.set(Ie.key,te))}let k,L=0;const S=xe-w+1;let V=!1,G=0;const oe=new Array(S);for(te=0;te<S;te++)oe[te]=0;for(te=m;te<=q;te++){const Ie=v[te];if(L>=S){ue(Ie,W,se,!0);continue}let Ce;if(Ie.key!=null)Ce=C.get(Ie.key);else for(k=w;k<=xe;k++)if(oe[k-w]===0&&so(Ie,A[k])){Ce=k;break}Ce===void 0?ue(Ie,W,se,!0):(oe[Ce-w]=te+1,Ce>=G?G=Ce:V=!0,E(Ie,A[Ce],F,null,W,se,he,Q,ne),L++)}const Oe=V?P1(oe):ui;for(k=Oe.length-1,te=S-1;te>=0;te--){const Ie=w+te,Ce=A[Ie],ze=Ie+1<ve?A[Ie+1].el:R;oe[te]===0?E(null,Ce,F,ze,W,se,he,Q,ne):V&&(k<0||te!==Oe[k]?pe(Ce,F,ze,2):k--)}}},pe=(v,A,F,R,W=null)=>{const{el:se,type:he,transition:Q,children:ne,shapeFlag:te}=v;if(te&6){pe(v.component.subTree,A,F,R);return}if(te&128){v.suspense.move(A,F,R);return}if(te&64){he.move(v,A,F,ct);return}if(he===je){o(se,A,F);for(let q=0;q<ne.length;q++)pe(ne[q],A,F,R);o(v.anchor,A,F);return}if(he===hs){H(v,A,F);return}if(R!==2&&te&1&&Q)if(R===0)Q.beforeEnter(se),o(se,A,F),qt(()=>Q.enter(se),W);else{const{leave:q,delayLeave:xe,afterLeave:m}=Q,w=()=>o(se,A,F),C=()=>{q(se,()=>{w(),m&&m()})};xe?xe(se,w,C):C()}else o(se,A,F)},ue=(v,A,F,R=!1,W=!1)=>{const{type:se,props:he,ref:Q,children:ne,dynamicChildren:te,shapeFlag:ve,patchFlag:q,dirs:xe}=v;if(Q!=null&&zl(Q,null,F,v,!0),ve&256){A.ctx.deactivate(v);return}const m=ve&1&&xe,w=!ds(v);let C;if(w&&(C=he&&he.onVnodeBeforeUnmount)&&_n(C,A,v),ve&6)Me(v.component,F,R);else{if(ve&128){v.suspense.unmount(F,R);return}m&&Bo(v,null,A,"beforeUnmount"),ve&64?v.type.remove(v,A,F,W,ct,R):te&&(se!==je||q>0&&q&64)?et(te,A,F,!1,!0):(se===je&&q&384||!W&&ve&16)&&et(ne,A,F),R&&He(v)}(w&&(C=he&&he.onVnodeUnmounted)||m)&&qt(()=>{C&&_n(C,A,v),m&&Bo(v,null,A,"unmounted")},F)},He=v=>{const{type:A,el:F,anchor:R,transition:W}=v;if(A===je){v.patchFlag>0&&v.patchFlag&2048&&W&&!W.persisted?v.children.forEach(he=>{he.type===It?i(he.el):He(he)}):ot(F,R);return}if(A===hs){ie(v);return}const se=()=>{i(F),W&&!W.persisted&&W.afterLeave&&W.afterLeave()};if(v.shapeFlag&1&&W&&!W.persisted){const{leave:he,delayLeave:Q}=W,ne=()=>he(F,se);Q?Q(v.el,se,ne):ne()}else se()},ot=(v,A)=>{let F;for(;v!==A;)F=g(v),i(v),v=F;i(A)},Me=(v,A,F)=>{v.type.__hmrId&&vv(v);const{bum:R,scope:W,update:se,subTree:he,um:Q}=v;R&&fi(R),W.stop(),se&&(se.active=!1,ue(he,v,A,F)),Q&&qt(Q,A),qt(()=>{v.isUnmounted=!0},A),A&&A.pendingBranch&&!A.isUnmounted&&v.asyncDep&&!v.asyncResolved&&v.suspenseId===A.pendingId&&(A.deps--,A.deps===0&&A.resolve()),Av(v)},et=(v,A,F,R=!1,W=!1,se=0)=>{for(let he=se;he<v.length;he++)ue(v[he],A,F,R,W)},it=v=>v.shapeFlag&6?it(v.component.subTree):v.shapeFlag&128?v.suspense.next():g(v.anchor||v.el),_t=(v,A,F)=>{v==null?A._vnode&&ue(A._vnode,null,null,!0):E(A._vnode||null,v,A,null,null,null,F),Cf(),$f(),A._vnode=v},ct={p:E,um:ue,m:pe,r:He,mt:$e,mc:ye,pc:we,pbc:be,n:it,o:e};let wo,yt;return t&&([wo,yt]=t(ct)),{render:_t,hydrate:wo,createApp:E1(_t,wo)}}function Ho({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Mr(e,t,n=!1){const o=e.children,i=t.children;if(ke(o)&&ke(i))for(let s=0;s<o.length;s++){const r=o[s];let a=i[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[s]=ao(i[s]),a.el=r.el),n||Mr(r,a)),a.type===ps&&(a.el=r.el),a.type===It&&!a.el&&(a.el=r.el)}}function P1(e){const t=e.slice(),n=[0];let o,i,s,r,a;const l=e.length;for(o=0;o<l;o++){const u=e[o];if(u!==0){if(i=n[n.length-1],e[i]<u){t[o]=i,n.push(o);continue}for(s=0,r=n.length-1;s<r;)a=s+r>>1,e[n[a]]<u?s=a+1:r=a;u<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,r=n[s-1];s-- >0;)n[s]=r,r=t[r];return n}const T1=e=>e.__isTeleport,je=Symbol("Fragment"),ps=Symbol("Text"),It=Symbol("Comment"),hs=Symbol("Static"),ms=[];let Xt=null;function B(e=!1){ms.push(Xt=e?null:[])}function rp(){ms.pop(),Xt=ms[ms.length-1]||null}let wi=1;function ap(e){wi+=e}function lp(e){return e.dynamicChildren=wi>0?Xt||ui:null,rp(),wi>0&&Xt&&Xt.push(e),e}function z(e,t,n,o,i,s){return lp(c(e,t,n,o,i,s,!0))}function Zt(e,t,n,o,i){return lp(Ee(e,t,n,o,i,!0))}function bi(e){return e?e.__v_isVNode===!0:!1}function so(e,t){return t.shapeFlag&6&&gi.has(t.type)?(e.shapeFlag&=-257,t.shapeFlag&=-513,!1):e.type===t.type&&e.key===t.key}const I1=(...e)=>O1(...e),Dr="__vInternal",cp=({key:e})=>e!=null?e:null,Rr=({ref:e,ref_key:t,ref_for:n})=>e!=null?nt(e)||ft(e)||Le(e)?{i:mt,r:e,k:t,f:!!n}:e:null;function c(e,t=null,n=null,o=0,i=null,s=e===je?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&cp(t),ref:t&&Rr(t),scopeId:Sr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:mt};return a?(Vl(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=nt(n)?8:16),l.key!==l.key&&le("VNode created with invalid key (NaN). VNode type:",l.type),wi>0&&!r&&Xt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Xt.push(l),l}const Ee=I1;function O1(e,t=null,n=null,o=0,i=null,s=!1){if((!e||e===n1)&&(e||le(`Invalid vnode type when creating vnode: ${e}.`),e=It),bi(e)){const a=ro(e,t,!0);return n&&Vl(a,n),wi>0&&!s&&Xt&&(a.shapeFlag&6?Xt[Xt.indexOf(e)]=a:Xt.push(a)),a.patchFlag|=-2,a}if(gp(e)&&(e=e.__vccOpts),t){t=up(t);let{class:a,style:l}=t;a&&!nt(a)&&(t.class=Qe(a)),Ye(l)&&($r(l)&&!ke(l)&&(l=dt({},l)),t.style=Pn(l))}const r=nt(e)?1:jv(e)?128:T1(e)?64:Ye(e)?4:Le(e)?2:0;return r&4&&$r(e)&&(e=Fe(e),le("Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
Component that was made reactive: `,e)),c(e,t,n,o,i,r,s,!0)}function up(e){return e?$r(e)||Dr in e?dt({},e):e:null}function ro(e,t,n=!1){const{props:o,ref:i,patchFlag:s,children:r}=e,a=t?pp(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&cp(a),ref:t&&t.ref?n&&i?ke(i)?i.concat(Rr(t)):[i,Rr(t)]:Rr(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s===-1&&ke(r)?r.map(dp):r,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==je?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ro(e.ssContent),ssFallback:e.ssFallback&&ro(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function dp(e){const t=ro(e);return ke(e.children)&&(t.children=e.children.map(dp)),t}function ee(e=" ",t=0){return Ee(ps,null,e,t)}function fp(e,t){const n=Ee(hs,null,e);return n.staticCount=t,n}function qe(e="",t=!1){return t?(B(),Zt(It,null,e)):Ee(It,null,e)}function en(e){return e==null||typeof e=="boolean"?Ee(It):ke(e)?Ee(je,null,e.slice()):typeof e=="object"?ao(e):Ee(ps,null,String(e))}function ao(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ro(e)}function Vl(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(ke(t))n=16;else if(typeof t=="object")if(o&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&&!(Dr in t)?t._ctx=mt:i===3&&mt&&(mt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Le(t)?(t={default:t,_ctx:mt},n=32):(t=String(t),o&64?(n=16,t=[ee(t)]):n=8);e.children=t,e.shapeFlag|=n}function pp(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const i in o)if(i==="class")t.class!==o.class&&(t.class=Qe([t.class,o.class]));else if(i==="style")t.style=Pn([t.style,o.style]);else if(Gi(i)){const s=t[i],r=o[i];r&&s!==r&&!(ke(s)&&s.includes(r))&&(t[i]=s?[].concat(s,r):r)}else i!==""&&(t[i]=o[i])}return t}function _n(e,t,n,o=null){an(e,t,7,[n,o])}const L1=sp();let M1=0;function D1(e,t,n){const o=e.type,i=(t?t.appContext:e.appContext)||L1,s={uid:M1++,vnode:e,type:o,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new $_(!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:Yf(o,i),emitsOptions:If(o,i),emit:null,emitted:null,propsDefaults:Xe,inheritAttrs:o.inheritAttrs,ctx:Xe,data:Xe,props:Xe,attrs:Xe,slots:Xe,refs:Xe,setupState:Xe,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx=i1(s),s.root=t?t.root:s,s.emit=Ov.bind(null,s),e.ce&&e.ce(s),s}let rt=null;const R1=()=>rt||mt,lo=e=>{rt=e,e.scope.on()},co=()=>{rt&&rt.scope.off(),rt=null},N1=Xn("slot,component");function Wl(e,t){const n=t.isNativeTag||Ud;(N1(e)||n(e))&&le("Do not use built-in or reserved HTML elements as component id: "+e)}function hp(e){return e.vnode.shapeFlag&4}let gs=!1;function B1(e,t=!1){gs=t;const{props:n,children:o}=e.vnode,i=hp(e);p1(e,n,i,t),x1(e,o);const s=i?F1(e,t):void 0;return gs=!1,s}function F1(e,t){var n;const o=e.type;{if(o.name&&Wl(o.name,e.appContext.config),o.components){const s=Object.keys(o.components);for(let r=0;r<s.length;r++)Wl(s[r],e.appContext.config)}if(o.directives){const s=Object.keys(o.directives);for(let r=0;r<s.length;r++)Uf(s[r])}o.compilerOptions&&j1()&&le('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=mf(new Proxy(e.ctx,zf)),s1(e);const{setup:i}=o;if(i){const s=e.setupContext=i.length>1?H1(e):null;lo(e),To();const r=On(i,e,0,[pi(e.props),s]);if(Io(),co(),ar(r)){if(r.then(co,co),t)return r.then(a=>{Kl(e,a,t)}).catch(a=>{ns(a,e,0)});if(e.asyncDep=r,!e.suspense){const a=(n=o.name)!==null&&n!==void 0?n:"Anonymous";le(`Component <${a}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else Kl(e,r,t)}else mp(e,t)}function Kl(e,t,n){Le(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ye(t)?(bi(t)&&le("setup() should not return VNodes directly - return a render function instead."),e.devtoolsRawSetupState=t,e.setupState=wf(t),r1(e)):t!==void 0&&le(`setup() should return an object. Received: ${t===null?"null":typeof t}`),mp(e,n)}let Gl;const j1=()=>!Gl;function mp(e,t,n){const o=e.type;if(!e.render){if(!t&&Gl&&!o.render){const i=o.template||Fl(e).template;if(i){Mn(e,"compile");const{isCustomElement:s,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:l}=o,u=dt(dt({isCustomElement:s,delimiters:a},r),l);o.render=Gl(i,u),Dn(e,"compile")}}e.render=o.render||Ut}lo(e),To(),l1(e),Io(),co(),!o.render&&e.render===Ut&&!t&&(o.template?le('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):le("Component is missing template or render function."))}function U1(e){return new Proxy(e.attrs,{get(t,n){return Pr(),Ht(e,"get","$attrs"),t[n]},set(){return le("setupContext.attrs is readonly."),!1},deleteProperty(){return le("setupContext.attrs is readonly."),!1}})}function H1(e){const t=o=>{if(e.exposed&&le("expose() should be called only once per setup()."),o!=null){let i=typeof o;i==="object"&&(ke(o)?i="array":ft(o)&&(i="ref")),i!=="object"&&le(`expose() should be passed a plain object, received ${i}.`)}e.exposed=o||{}};let n;return Object.freeze({get attrs(){return n||(n=U1(e))},get slots(){return pi(e.slots)},get emit(){return(o,...i)=>e.emit(o,...i)},expose:t})}function Nr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(wf(mf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in jo)return jo[n](e)},has(t,n){return n in t||n in jo}}))}const q1=/(?:^|[-_])(\w)/g,z1=e=>e.replace(q1,t=>t.toUpperCase()).replace(/[-_]/g,"");function Yl(e,t=!0){return Le(e)?e.displayName||e.name:e.name||t&&e.__name}function Br(e,t,n=!1){let o=Yl(t);if(!o&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(o=i[1])}if(!o&&e&&e.parent){const i=s=>{for(const r in s)if(s[r]===t)return r};o=i(e.components||e.parent.type.components)||i(e.appContext.components)}return o?z1(o):n?"App":"Anonymous"}function gp(e){return Le(e)&&"__vccOpts"in e}const vn=(e,t)=>cv(e,t,gs);function tn(e){const t=R1();t||le("withAsyncContext called without active current instance. This is likely a bug.");let n=e();return co(),ar(n)&&(n=n.catch(o=>{throw lo(t),o})),[n,()=>lo(t)]}function V1(e,t,n){const o=arguments.length;return o===2?Ye(t)&&!ke(t)?bi(t)?Ee(e,null,[t]):Ee(e,t):Ee(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&bi(n)&&(n=[n]),Ee(e,t,n))}const W1=Symbol("ssrContext"),K1=()=>{{const e=us(W1);return e||le("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function Jl(e){return!!(e&&e.__v_isShallow)}function G1(){if(typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#0b1bc9"},n={style:"color:#b62e24"},o={style:"color:#9d288c"},i={header(h){return Ye(h)?h.__isVue?["div",e,"VueInstance"]:ft(h)?["div",{},["span",e,f(h)],"<",a(h.value),">"]:Oo(h)?["div",{},["span",e,Jl(h)?"ShallowReactive":"Reactive"],"<",a(h),`>${no(h)?" (readonly)":""}`]:no(h)?["div",{},["span",e,Jl(h)?"ShallowReadonly":"Readonly"],"<",a(h),">"]:null:null},hasBody(h){return h&&h.__isVue},body(h){if(h&&h.__isVue)return["div",{},...s(h.$)]}};function s(h){const g=[];h.type.props&&h.props&&g.push(r("props",Fe(h.props))),h.setupState!==Xe&&g.push(r("setup",h.setupState)),h.data!==Xe&&g.push(r("data",Fe(h.data)));const b=l(h,"computed");b&&g.push(r("computed",b));const _=l(h,"inject");return _&&g.push(r("injected",_)),g.push(["div",{},["span",{style:o.style+";opacity:0.66"},"$ (internal): "],["object",{object:h}]]),g}function r(h,g){return g=dt({},g),Object.keys(g).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},h],["div",{style:"padding-left:1.25em"},...Object.keys(g).map(b=>["div",{},["span",o,b+": "],a(g[b],!1)])]]:["span",{}]}function a(h,g=!0){return typeof h=="number"?["span",t,h]:typeof h=="string"?["span",n,JSON.stringify(h)]:typeof h=="boolean"?["span",o,h]:Ye(h)?["object",{object:g?Fe(h):h}]:["span",n,String(h)]}function l(h,g){const b=h.type;if(Le(b))return;const _={};for(const E in h.ctx)u(b,E,g)&&(_[E]=h.ctx[E]);return _}function u(h,g,b){const _=h[b];if(ke(_)&&_.includes(g)||Ye(_)&&g in _||h.extends&&u(h.extends,g,b)||h.mixins&&h.mixins.some(E=>u(E,g,b)))return!0}function f(h){return Jl(h)?"ShallowRef":h.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(i):window.devtoolsFormatters=[i]}const yp="3.2.47",Y1="http://www.w3.org/2000/svg",qo=typeof document<"u"?document:null,wp=qo&&qo.createElement("template"),J1={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i=t?qo.createElementNS(Y1,e):qo.createElement(e,n?{is:n}:void 0);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>qo.createTextNode(e),createComment:e=>qo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>qo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,s){const r=n?n.previousSibling:t.lastChild;if(i&&(i===s||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===s||!(i=i.nextSibling)););else{wp.innerHTML=o?`<svg>${e}</svg>`:e;const a=wp.content;if(o){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 Q1(e,t,n){const o=e._vtc;o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function X1(e,t,n){const o=e.style,i=nt(n);if(n&&!i){if(t&&!nt(t))for(const s in t)n[s]==null&&Ql(o,s,"");for(const s in n)Ql(o,s,n[s])}else{const s=o.display;i?t!==n&&(o.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(o.display=s)}}const Z1=/[^\\];\s*$/,bp=/\s*!important$/;function Ql(e,t,n){if(ke(n))n.forEach(o=>Ql(e,t,o));else if(n==null&&(n=""),Z1.test(n)&&le(`Unexpected semicolon at the end of '${t}' style value: '${n}'`),t.startsWith("--"))e.setProperty(t,n);else{const o=e0(e,t);bp.test(n)?e.setProperty(Tn(o),n.replace(bp,""),"important"):e[o]=n}}const _p=["Webkit","Moz","ms"],Xl={};function e0(e,t){const n=Xl[t];if(n)return n;let o=gn(t);if(o!=="filter"&&o in e)return Xl[t]=o;o=So(o);for(let i=0;i<_p.length;i++){const s=_p[i]+o;if(s in e)return Xl[t]=s}return t}const vp="http://www.w3.org/1999/xlink";function t0(e,t,n,o,i){if(o&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(vp,t.slice(6,t.length)):e.setAttributeNS(vp,t,n);else{const s=g_(t);n==null||s&&!Fd(n)?e.removeAttribute(t):e.setAttribute(t,s?"":n)}}function n0(e,t,n,o,i,s,r){if(t==="innerHTML"||t==="textContent"){o&&r(o,i,s),e[t]=n==null?"":n;return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=n;const 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=Fd(n):n==null&&l==="string"?(n="",a=!0):l==="number"&&(n=0,a=!0)}try{e[t]=n}catch(l){a||le(`Failed setting prop "${t}" on <${e.tagName.toLowerCase()}>: value ${n} is invalid.`,l)}a&&e.removeAttribute(t)}function uo(e,t,n,o){e.addEventListener(t,n,o)}function o0(e,t,n,o){e.removeEventListener(t,n,o)}function i0(e,t,n,o,i=null){const s=e._vei||(e._vei={}),r=s[t];if(o&&r)r.value=o;else{const[a,l]=s0(t);if(o){const u=s[t]=l0(o,i);uo(e,a,u,l)}else r&&(o0(e,a,r,l),s[t]=void 0)}}const xp=/(?:Once|Passive|Capture)$/;function s0(e){let t;if(xp.test(e)){t={};let o;for(;o=e.match(xp);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Tn(e.slice(2)),t]}let Zl=0;const r0=Promise.resolve(),a0=()=>Zl||(r0.then(()=>Zl=0),Zl=Date.now());function l0(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;an(c0(o,n.value),t,5,[o])};return n.value=e,n.attached=a0(),n}function c0(e,t){if(ke(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>i=>!i._stopped&&o&&o(i))}else return t}const Cp=/^on[a-z]/,u0=(e,t,n,o,i=!1,s,r,a,l)=>{t==="class"?Q1(e,o,i):t==="style"?X1(e,n,o):Gi(t)?rr(t)||i0(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):d0(e,t,o,i))?n0(e,t,o,s,r,a,l):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),t0(e,t,o,i))};function d0(e,t,n,o){return o?!!(t==="innerHTML"||t==="textContent"||t in e&&Cp.test(t)&&Le(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Cp.test(t)&&nt(n)?!1:t in e}const _i=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ke(t)?n=>fi(t,n):t};function f0(e){e.target.composing=!0}function $p(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ke={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e._assign=_i(i);const s=o||i.props&&i.props.type==="number";uo(e,t?"change":"input",r=>{if(r.target.composing)return;let a=e.value;n&&(a=a.trim()),s&&(a=dr(a)),e._assign(a)}),n&&uo(e,"change",()=>{e.value=e.value.trim()}),t||(uo(e,"compositionstart",f0),uo(e,"compositionend",$p),uo(e,"change",$p))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:i}},s){if(e._assign=_i(s),e.composing||document.activeElement===e&&e.type!=="range"&&(n||o&&e.value.trim()===t||(i||e.type==="number")&&dr(e.value)===t))return;const r=t==null?"":t;e.value!==r&&(e.value=r)}},Se={deep:!0,created(e,t,n){e._assign=_i(n),uo(e,"change",()=>{const o=e._modelValue,i=ys(e),s=e.checked,r=e._assign;if(ke(o)){const a=ll(o,i),l=a!==-1;if(s&&!l)r(o.concat(i));else if(!s&&l){const u=[...o];u.splice(a,1),r(u)}}else if(di(o)){const a=new Set(o);s?a.add(i):a.delete(i),r(a)}else r(Sp(e,s))})},mounted:Ep,beforeUpdate(e,t,n){e._assign=_i(n),Ep(e,t,n)}};function Ep(e,{value:t,oldValue:n},o){e._modelValue=t,ke(t)?e.checked=ll(t,o.props.value)>-1:di(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=Ki(t,Sp(e,!0)))}const vi={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const i=di(t);uo(e,"change",()=>{const s=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?dr(ys(r)):ys(r));e._assign(e.multiple?i?new Set(s):s:s[0])}),e._assign=_i(o)},mounted(e,{value:t}){kp(e,t)},beforeUpdate(e,t,n){e._assign=_i(n)},updated(e,{value:t}){kp(e,t)}};function kp(e,t){const n=e.multiple;if(n&&!ke(t)&&!di(t)){le(`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(t).slice(8,-1)}.`);return}for(let o=0,i=e.options.length;o<i;o++){const s=e.options[o],r=ys(s);if(n)ke(t)?s.selected=ll(t,r)>-1:s.selected=t.has(r);else if(Ki(ys(s),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}function ys(e){return"_value"in e?e._value:e.value}function Sp(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const p0=["ctrl","shift","alt","meta"],h0={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)=>p0.some(n=>e[`${n}Key`]&&!t.includes(n))},m0=(e,t)=>(n,...o)=>{for(let i=0;i<t.length;i++){const s=h0[t[i]];if(s&&s(n,t))return}return e(n,...o)},g0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ap=(e,t)=>n=>{if(!("key"in n))return;const o=Tn(n.key);if(t.some(i=>i===o||g0[i]===o))return e(n)},Ot={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ws(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),ws(e,!0),o.enter(e)):o.leave(e,()=>{ws(e,!1)}):ws(e,t))},beforeUnmount(e,{value:t}){ws(e,t)}};function ws(e,t){e.style.display=t?e._vod:"none"}const y0=dt({patchProp:u0},J1);let Pp;function w0(){return Pp||(Pp=S1(y0))}const xn=(...e)=>{const t=w0().createApp(...e);b0(t),_0(t);const{mount:n}=t;return t.mount=o=>{const i=v0(o);if(!i)return;const s=t._component;!Le(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.innerHTML="";const r=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t};function b0(e){Object.defineProperty(e.config,"isNativeTag",{value:t=>h_(t)||m_(t),writable:!1})}function _0(e){{const t=e.config.isCustomElement;Object.defineProperty(e.config,"isCustomElement",{get(){return t},set(){le("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=e.config.compilerOptions,o='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom';Object.defineProperty(e.config,"compilerOptions",{get(){return le(o),n},set(){le(o)}})}}function v0(e){if(nt(e)){const t=document.querySelector(e);return t||le(`Failed to mount app: mount target selector "${e}" returned null.`),t}return window.ShadowRoot&&e instanceof window.ShadowRoot&&e.mode==="closed"&&le('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),e}function x0(){G1()}x0();const C0={key:0,class:"ce-custom-url-help"},$0={class:"ce-custom-url-help-body"},E0=c("hr",null,null,-1),k0={key:0},S0={class:"pure-table pure-table-bordered"},A0=c("thead",null,[c("tr",null,[c("th",{width:"50%"},"变量"),c("th",{width:"50%"},"说明")])],-1),P0=["onClick"],T0=Ne({__name:"CustomUrlHelp",setup(e){const t=de(zb),n=de(!1);Pt(async()=>{window.addEventListener("message",i=>{const{event:s}=i.data;s==="customUrlHelp"&&(n.value=!0)},!1)});async function o(i){nn(i.key),ae({text:"已复制到剪贴板",icon:"success",timer:1e3})}return(i,s)=>n.value?(B(),z("div",C0,[c("div",$0,[c("h1",null,[ee(" 自定义菜单变量说明 "),c("a",{href:"javascript:void(0)",onClick:s[0]||(s[0]=r=>n.value=!1)},"关闭")]),E0,(B(!0),z(je,null,st(t.value,(r,a)=>(B(),z("div",{key:a},[c("h2",null,ge(r.label),1),r.memo?(B(),z("p",k0,ge(r.memo),1)):qe("",!0),c("table",S0,[A0,c("tbody",null,[(B(!0),z(je,null,st(r.items,(l,u)=>(B(),z("tr",{key:u},[c("td",null,[c("span",{class:"ce-variable",onClick:f=>o(l)},ge(l.key),9,P0)]),c("td",null,ge(l.label),1)]))),128))])])]))),128))])])):qe("",!0)}}),oR="",iR="",Tp="enabled_custom_urls_for_search",Ip="enabled_custom_urls_for_play";async function I0(e){await tt.set(Tp,e)}async function O0(e){await tt.set(Ip,e)}async function L0(){const e=tc,t=e.filter(i=>i.enabled).map(i=>i.key),n=await tt.get(Tp,t),o=[];return e.forEach(i=>{n.includes(i.key)&&o.push(i.key)}),o}async function M0(){const e=ec,t=e.filter(i=>i.enabled).map(i=>i.key),n=await tt.get(Ip,t),o=[];return e.forEach(i=>{n.includes(i.key)&&o.push(i.key)}),o}async function Op(){const e=await L0();return tc.forEach(t=>{t.enabled=e.includes(t.key)}),tc}async function Fr(){const e=await M0();return ec.forEach(t=>{t.enabled=e.includes(t.key)}),ec}const Lp="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=",D0="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",Mp="https://nplayer.com/assets/img/logo_main.png",ec=[bt({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}"}),bt({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}"}),bt({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}"}),bt({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}"}),bt({enabled:!0,key:"p_builtin_infuse",label:"Infuse播放",icon:D0,memo:"调用Infuse播放视频(使用CloudDrive链接)",url:"infuse://x-callback-url/play?url={clouddrive_stream_url:encode}"}),bt({enabled:!1,key:"p_builtin_nplayer_mac",label:"nPlayer-mac播放",icon:Mp,memo:"调用nPlayer(mac版)播放视频(使用CloudDrive链接)",url:"nplayer-mac://weblink?url={clouddrive_stream_url:encode}&new_window=1"}),bt({enabled:!1,key:"p_builtin_nplayer_win",label:"nPlayer-win播放",icon:Mp,memo:"调用nPlayer(非mac版)播放视频(使用CloudDrive链接)",url:"nplayer-{clouddrive_stream_url:encode}"}),bt({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"})],tc=[bt({enabled:!0,key:"s_builtin_115_pure_name",label:"115-不含后缀",icon:"https://115.com/favicon.ico",memo:"使用115搜索文件名(不含后缀)",url:"{pure_name:search}"}),bt({enabled:!1,key:"s_builtin_115_full_name",label:"115-完整名称",icon:"https://115.com/favicon.ico",memo:"使用115搜索文件名(完整文件名)",url:"{full_name:search}"}),bt({enabled:!0,key:"s_builtin_115_sha",label:"115-sha1",icon:"https://115.com/favicon.ico",memo:"使用115搜索sha1相同的文件(仅适用于文件)",url:"{file_hash:search}"}),bt({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}"}),bt({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}"}),bt({enabled:!0,key:"s_builtin_bing_pure_name",label:"Bing-不含后缀",icon:Lp,memo:"使用Bing搜索文件名(不含后缀)",url:"https://cn.bing.com/search?q={pure_name:encode}"}),bt({enabled:!1,key:"s_builtin_bing_full_name",label:"Bing-完整名称",icon:Lp,memo:"使用Bing搜索文件名(完整文件名)",url:"https://cn.bing.com/search?q={full_name:encode}"}),bt({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 lt=(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))(lt||{}),zt=(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))(zt||{});const cn={basic:"基础设置",clouddrive:"CloudDrive",list:"列表增强",search:"搜索增强",menus:"菜单设置",searchMenus:"搜索菜单",playMenus:"播放菜单",offline:"离线管理",tools:"工具",anxia:"在线播放",about:"关于"},Dp="list_config";function R0(e){return{sizeSorter:!0,sizeSorterDirAttrInterval:100,showSha1:!1,showFolderSizeButton:!0,showCopyButtonOnPathBar:!1,showGotoButtonOnPathBar:!1,noUpdateDirAfterRename:!1,noReloadAfterMove:!1,fileSelectorDefaultView:"_",...e}}async function jr(){const e=R0(),t=await tt.get(Dp,e);return{...e,...t}}async function N0(e){await tt.set(Dp,e)}var Rp=(e=>(e[e.asc=0]="asc",e[e.desc=1]="desc",e))(Rp||{});async function B0(e,t,n=!1){const o=await jr(),i=await Wt(!1),s=await ri(),r=await Jn(!1);console.log("[items]",r),ae({html:"正在获取子文件夹大小...",icon:"info",position:"top-end",timer:0}),me.showLoading();for(let a=0;a<r.length;a++){const l=r[a];if(!l.isDir)continue;const u=s.find(`li[cate_id="${l.id}"]`);if(!u.length)continue;const f=u.find(".file-size span:eq(0)");if(f.text()!==""&&!n)continue;const h=await kt(l.id);me.update({html:`[${a+1} / ${r.length}] 正在获取子文件夹大小:${l.name}`}),f.text(h.size),u.addClass("ce-size-got"),a<r.length-1&&await wt(o.sizeSorterDirAttrInterval)}return me.hideLoading(),e&&await F0(i),i}async function Ur(e,t,n,o){const i=await ri();i.find('li[file_type="0"]:not(.ce-size-got)').length>0&&await B0(n);const r=i.find("ul"),a=r.children("li").toArray();a.sort(function(u,f){const h=$(u),g=$(f),b=ou(h.find(".file-size span:eq(0)").text()),_=ou(g.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?me.update({title:"排序完成",html:`已完成排序: ${t===0?"小 > 大":"大 > 小"}`,icon:"success"}):ae({html:`已完成排序: ${t===0?"小 > 大":"大 > 小"}`,icon:"success",timer:1500,position:"top-end"})}async function F0(e){me.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"),Ur(e,1,!0),!1),preDeny:async()=>(console.log("preDeny"),Ur(e,0,!0),!1)})}async function j0(){await nc();const t=(await _o("#js_data_list"))[0];U0(),new MutationObserver(async([o])=>{o.type==="childList"&&(window.postMessage({event:lt.listRendered}),await nc())}).observe(t,{childList:!0})}async function U0(){if(window.top===window.self)return;const e=document.querySelector("#js_pagination_box");if(!e){console.warn("[list.handleLoadAll] 未找到「#js_pagination_box」元素");return}function t(n){!document.querySelector("#js_data_list .list-contents > ul > li")||n(!0)}e.addEventListener("click",async n=>{n.preventDefault(),n.stopPropagation();const o=n.target;let i=!1;if((o.getAttribute("menu")==="load_all_file"||o.closest('[menu="load_all_file"]'))&&(i=!0),!i)return;console.log("[list.handleLoadAll] 点击了「加载全部」按钮"),await Vn(t,500,3e5);const s=document.querySelector("#js_data_list .list-contents > ul");s==null||s.removeAttribute("ce-done2");const r=document.querySelector("#js_data_list");if(r){const a=".list-contents > ul:not([ce-done2]) > li";r.querySelectorAll(a).length&&(s==null||s.setAttribute("ce-done2",""),await nc())}})}async function nc(){const e=await jr();V0(e);const t=await Cd(!1);for(let n=0;n<t.length;n++){const o=t.eq(n),i=await hn(o);await H0(e,o,i)}}async function H0(e,t,n){await q0(e,t,n),await z0(e,t,n)}async function q0(e,t,n){if(!e.showSha1||!n.hash)return;t.addClass("ce-show-sha1");const o=t.find(".file-name"),i=document.createElement("span");i.classList.add("ce-file-sha1"),i.title="文件SHA1,点击复制",i.textContent=n.hash,i.addEventListener("click",async s=>{s.preventDefault(),s.stopPropagation(),nn(n.hash),ae({title:"复制SHA1",text:"已复制文件SHA1",icon:"success",timer:1500})}),o.append(i)}async function z0(e,t,n){if(!e.showFolderSizeButton||!n.isDir)return;const o=t.find(".file-size"),i=document.createElement("span");i.classList.add("ce-btn-folder-size"),i.title="点击获取该文件夹大小",i.textContent="大小",i.addEventListener("click",async s=>{s.preventDefault(),s.stopPropagation();const r=await kt(n.id);o.find("span:eq(0)").text(r.size),t.addClass("ce-size-got"),ae({title:"获取大小",text:"已获取文件夹大小",icon:"success",timer:1500})}),o.append(i)}async function V0(e){if(!e.sizeSorter)return;console.log("renderHeaderShowSubFolderSize");const t=document.querySelector(".header-size");if(!t||t.classList.contains("ce-injected"))return;const n=t,o=document.createElement("a");o.classList.add("btn-sort"),o.classList.add("ce-size-sort"),o.title="显示当前目录下已加载的子文件夹的大小,然后按大小排序",o.innerHTML=`
    <span>排序</span>
    <i icon_rel="file_size" class="icon-sort-asc"></i>
    <i icon_rel="file_size" class="icon-sort-desc"></i>
  `,o.addEventListener("click",async i=>{if(i.preventDefault(),i.stopPropagation(),!o.classList.contains("el-size-sort-ing"))try{o.classList.add("ce-size-sort-ing");let s=1;o.classList.contains("by-desc")?s=0:s=1;const r=await Wt(!1);await Ur(r,s,!1,!1),s===0?(o.classList.remove("by-desc"),o.classList.add("by-asc")):(o.classList.remove("by-asc"),o.classList.add("by-desc"))}catch(s){console.error(s)}finally{o.classList.remove("ce-size-sort-ing")}}),n.appendChild(o),n.classList.add("ce-injected")}async function Np(e,t){const n=[];for(const o of t){const i=Ms(e,{key:`_ce_p_${o.key}`,label:o.label,icon:o.icon,title:o.memo,onClick:async(s,r)=>{r.stopPropagation(),r.preventDefault();try{const a=await Qn();if(!a)return;const l=await hn(a),u=await Ni(),f=await Zs(l,o,u);if(f.includes("v.anxia.com")){const g=(await Jn(!1)).find(b=>b.playDuration&&b.playDuration>0);nl(l.id,g);return}if(console.log("[play url]",f),!f)throw new Error("无法获取有效的播放链接!");window.open(f,"_blank","noopener noreferrer")}catch(a){console.error(a),ae({title:"播放失败",text:a.toString(),icon:"error"})}}});n.push(i)}return n}async function W0(e){const t=[...(await Fr()).filter(n=>n.enabled),...(await li(An.play)).filter(n=>n.enabled)];return e&&t.length===1?(await Np(jt,t))[0]:new jt({key:"_play_with_x",label:"播放全部",icon:"icon-operate ifo-video-play",title:"",onClick:async(n,o)=>{},subItems:[...await Np(Zb,t)]})}async function K0(){return new jt({key:"_rename_dir",label:"重命名文件夹",icon:"icon-operate ifo-rename",title:'重命名当前目录,支持"高级模式"',onClick:async(e,t)=>{await e.closeMenu();const n=await Qn();!n||unsafeWindow.Core.Dir.Rename("1",n.attr("cate_id"),n.attr("title"))}})}async function G0(){return new jt({key:"_get_tree",label:"导出目录列表数据",icon:"icon-operate ifo-move",title:"获取当前目录的全部层级的文件列表数据,并导出为JSON文件",onClick:async(e,t)=>{await e.closeMenu();const n=await Qn();if(!n)return;const o=await hn(n);await Td(o)}})}async function Y0(){return new jt({key:"_move_dir",label:"移动文件夹",icon:"icon-operate ifo-move",title:"移动当前文件夹到其他位置",onClick:async(e,t)=>{await e.closeMenu();const n=await Qn();!n||await Qa(n,"move",!0)}})}async function J0(){return new jt({key:"_del_dir",label:"删除文件夹",icon:"icon-operate ifo-remove",title:"删除当前文件夹",onClick:async(e,t)=>{await e.closeMenu();const n=await Qn();if(!n)return;const o=await zi();unsafeWindow.Core.FileAPI.DeleteFile([n],i=>{n.remove(),o.find("#js_top_header_file_path_box .top-file-path > .file-path").children(":last").prev()[0].click()},!0)}})}async function Q0(){return new jt({key:"_copy_dir",label:"复制文件夹",icon:"icon-operate ifo-copy",title:"复制当前文件夹",onClick:async(e,t)=>{await e.closeMenu();const n=await Qn();!n||await Qa(n,"set_copy",!0)}})}async function X0(){return new jt({key:"_copy_dir_to",label:"复制文件夹到",icon:"icon-operate ifo-copyto",title:"复制当前文件夹到其他位置",onClick:async(e,t)=>{await e.closeMenu();const n=await Qn();!n||await Qa(n,"copy_list",!0)}})}async function Z0(){return new jt({key:"view_dir_attribute",label:"查看属性",icon:"icon-operate ifo-prop",onClick:async(e,t)=>{await e.closeMenu();const n=await Qn();!n||on().Core.FileAPI.getAttribute(n,{showPlayLongChange:function(o,i,s){Cb().CACHE.FileMain.List.ResetPlayLongText(o,i,s)}},function(){console.log("查看属性 ok")})}})}async function Hr(e,t){return new jt({key:`_d_copy_names_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制当前目录下已加载的所有文件名称",onClick:async(n,o)=>{let s=(await Jn(!1)).map(r=>r.name);s=await Qs(s,t),nn(s.join(`
`)),ae({title:"复制名称",text:`已复制选中文件名。数量:${s.length},复制类型:${e}`,icon:"success"})}})}async function Bp(e,t){return new jt({key:`_d_copy_paths_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制当前目录下已加载的所有文件路径",onClick:async(n,o)=>{await n.closeMenu();const i=await Jn(!1);let s=[];ae({text:"正在获取文件路径...",timer:0}),me.showLoading();try{s=await Pd(i,t),me.close()}catch(r){console.error(r),ae({text:`获取文件路径失败: ${r}`,timer:6e4,icon:"error"});return}finally{me.hideLoading()}nn(s.join(`
`)),ae({title:"复制路径",text:`已复制文件的路径。数量:${s.length},复制类型:${e}`,icon:"success"})}})}async function ex(){return new jt({key:"show_sub_folder_size",label:"子文件夹大小",title:"显示当前目录下已加载的所有子文件夹的大小,并进行排序",icon:"icon-operate ifo-prop",onClick:async(e,t)=>{await e.closeMenu(),await Ur("",Rp.desc,!0)}})}async function Fp(e,t){return new sl({key:`_l_copy_name_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制名称",onClick:async(n,o)=>{await n.closeMenu();const i=await kd();if(!i||!i.n){ae({text:"无法获取名称",timer:1200});return}let s=[i.n];s=await Qs(s,t),nn(s.join(`
`)),ae({title:"复制名称",text:"已复制选中文件名",icon:"success"})}})}async function jp(e,t){return new sl({key:`_l_copy_path_${t}`,label:e,icon:"icon-operate ifo-copy",title:"复制路径",onClick:async(n,o)=>{await n.closeMenu();const i=await kd();if(!i||!i.n){ae({text:"无法获取路径",timer:1200});return}const s=await qi(i),r=await el(s),a=await ol(s,r,t);nn(a),ae({title:"复制路径",text:"已复制文件路径",icon:"success"})}})}let tx=[];async function nx(){const e=[...(await Fr()).filter(t=>t.enabled),...(await li(An.play)).filter(t=>t.enabled)];return new nr({key:"_play_with_x_d",label:"播放",injectDecider:r_,title:"115在线播放",onClick:async(t,n)=>{n.stopPropagation(),n.preventDefault();const o=$(n.target).closest("li"),i=await hn(o),s=Za(i.pickCode);i.isDir&&s.includes("v.anxia.com")?nl(i.id):window.open(s,"_blank","noopener noreferrer")},subItems:[...await Fb(Wi,e)]})}async function ox(){const e=[...(await Op()).filter(t=>t.enabled),...tx.filter(t=>t.enabled),...(await li(An.search)).filter(t=>t.enabled)];return new nr({key:"_search_with_name_d",label:"搜索",icon:"",title:"使用名称搜索",onClick:async(t,n)=>{n.stopPropagation(),n.preventDefault();const o=$(n.target).closest("li"),i=await Hi(o),s=Xa({search_value:i.n,cid:await Wt()});window.open(s,"_blank","noopener noreferrer")},subItems:[...await Bb(Wi,e)]})}async function ix(){return new Wi({injectDecider:al,key:"_lh_get_tree",label:"导出目录列表数据",icon:"icon-operate ifo-move",title:"获取该目录的全部层级的文件列表数据,并导出为JSON文件",onClick:async(e,t)=>{t.stopPropagation(),t.preventDefault();const n=$(t.target).closest("li"),o=await hn(n);if(!o.isDir){ae({text:"该功能仅对目录有效",icon:"warning",timer:2e3});return}await Td(o)}})}async function sx(e){const t=[await Up("完整名称",Kt.full),await Up("不含后缀",Kt.pure),new Nd({}),await qr("路径(Unix)",sn.unixPath),await qr("路径(Windows)",sn.winPath),await qr("上级路径(Unix)",sn.unixParentPath),await qr("上级路径(Windows)",sn.winParentPath)];return e.exportList&&t.push(new Nd({injectDecider:al}),await ix()),new nr({key:"_lh_copy_name_path",label:"名称路径",title:"复制文件名称路径",onClick:async(n,o)=>{},subItems:t})}async function Up(e,t){return new Wi({key:`_lh_copy_name_${t}`,label:e,icon:"icon-operate ifo-copy",title:e,onClick:async(n,o)=>{o.stopPropagation(),o.preventDefault();const i=$(o.target).closest("li");let r=[(await Hi(i)).n];r=await Qs(r,t),nn(r.join(`
`)),ae({title:"复制名称",text:`已复制选中文件名,复制类型:${e}`,icon:"success"})}})}async function qr(e,t){return new Wi({key:`_lh_copy_path_${t}`,label:e,icon:"icon-operate ifo-copy",title:e,onClick:async(n,o)=>{o.stopPropagation(),o.preventDefault();const i=$(o.target).closest("li"),s=await hn(i),r=await el(s),a=await ol(s,r,t);nn(a),ae({title:"复制路径",text:`已复制选中路径,复制类型:${e}`,icon:"success"})}})}async function rx(){return new nr({injectDecider:al,key:"_open_in_new_tab",label:"新标签页",icon:"",title:"在新标签页打开",onClick:async(e,t)=>{t.stopPropagation(),t.preventDefault();const n=$(t.target).closest("li"),o=await hn(n);if(!o||!o.id){ae({text:"无法获取目录ID",timer:1200});return}const i=Vi(o.id);window.open(i,"_blank","noopener noreferrer")}})}async function ax(){return new rl({key:"_s_smart_mkdir",label:"同名目录",icon:"icon-operate ifo-move",title:"将选中的文件移动到同名目录",onClick:await jb(!0)})}async function lx(){return new rl({key:"_s_copy_names_paths",label:"名称路径",icon:"icon-operate ifo-copy",showIcon:!1,title:"复制选中文件的名称路径",onClick:async(e,t)=>{},subItems:[await zr("完整名称",Kt.full),await zr("不含后缀",Kt.pure),await zr("完整文件名,去重",Kt.fullUnique),await zr("不含后缀,去重",Kt.pureUnique),new Bd({}),await Hp("路径(Unix)",sn.unixPath),await Hp("路径(Windows)",sn.winPath)]})}async function zr(e,t){return new or({key:`_s_copy_names_${t}`,label:e,icon:"icon-operate ifo-copy",showIcon:!1,title:e,onClick:async(n,o)=>{let s=(await Jn(!0)).map(r=>r.name);s=await Qs(s,t),nn(s.join(`
`)),ae({title:"复制名称",text:`已复制选中文件名。数量:${s.length},复制类型:${e}`,icon:"success"})}})}async function Hp(e,t){return new or({key:`_s_copy_path_${t}`,label:e,icon:"icon-operate ifo-copy",showIcon:!1,title:e,onClick:async(n,o)=>{const i=await Jn(!0);let s=[];ae({text:"正在获取已选文件路径...",timer:0}),me.showLoading();try{s=await Pd(i,t),me.close()}catch(r){console.error(r),ae({text:`获取已选文件路径失败: ${r}`,timer:6e4,icon:"error"});return}finally{me.hideLoading()}nn(s.join(`
`)),ae({title:"复制路径",text:`已复制选中文件的路径。数量:${s.length},复制类型:${e}`,icon:"success"})}})}async function qp(){const e=await Jn(!0);if(!e.length)return;const t=Date.now().toString(),n=unsafeWindow.open(Za("xxx"),t);await wt(1e3);let o=10;for(;o>0;)n==null||n.postMessage({event:"play",body:{id:t,files:e}},"https://v.anxia.com"),await wt(1e3),o--}async function cx(){const e=[...(await Fr()).filter(t=>t.enabled),...(await li(An.play)).filter(t=>t.enabled)];return new rl({key:"_s_play_with_x_d",label:"播放",title:"播放选中的文件",onClick:async(t,n)=>{n.stopPropagation(),n.preventDefault(),await qp()},subItems:[...await dx(or,e),new Bd({}),new or({label:"关于选中播放",onClick:async(t,n)=>{n.stopPropagation(),n.preventDefault(),ae({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 ux(e){if(e=e.trim(),!e)throw new Error("m3u8临时目录路径为空!");const t=await Db(e);if(t.id)return console.log("[ensureM3u8TempDir] result:",t),t.id;throw new Error("创建m3u8临时目录失败!")}async function dx(e,t){const n=[];for(const o of t){const i=Ms(e,{key:`_ce_p_${o.key}`,label:o.label,icon:o.icon,title:o.memo,onClick:async(s,r)=>{if(r.stopPropagation(),r.preventDefault(),s.key==="_ce_p_p_builtin_online"){await qp();return}const a=await ci();try{let l=await Jn(!0);if(l=l.filter(T=>T.isDir||T.isVideo||T.isImage),l.length===0){ae({title:"播放失败",text:"没有可以播放的目录或媒体文件!",icon:"error",timer:2e3});return}const u=await ux(a.m3u8TempDir),f=await Mb(l,u);console.log("[selection.buildPlayMenuItems generatePlaylistOn115]",f);const h=f.data,g=await Ni(),b={id:h.file_id,name:h.file_name,parentId:h.cid,sizeBytes:h.file_size,pickCode:h.pick_code,isDir:!1,isFile:!0},_=Ys([a.m3u8TempDir,b.name],Yn.unix);ae({title:"检查m3u8文件",text:"正在检查m3u8文件是否已准备就绪...",icon:"info",timer:0}),me.showLoading(),await mb(g,_,1e3,6e4),ae({icon:"success",text:"m3u8文件已准备就绪,即将开始播放..."});const E=await Zs(b,o,g);window.open(E,"_blank","noopener noreferrer")}catch(l){console.error(l),ae({title:"播放失败",text:l.toString(),icon:"error",timer:6e4,showConfirmButton:!0})}finally{me.hideLoading()}}});n.push(i)}return n}const fx={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:"show_play_long"},{label:"修改封面",key:"cover"},{label:"一键排重",key:"same"},{label:"导出目录树",key:"export_dir"},{label:"显示属性",key:"attribute"},{label:"转存至相册",key:"trans_to_album"}]},px={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"}]},hx={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;"},{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"}]},zp="hidden_official_menu_keys";async function Vp(){return await tt.get(zp,[])}async function mx(e,t=!1){var n;await tt.set(zp,e),t&&(unsafeWindow.postMessage({event:lt.officialMenuStyleChange},"*"),(n=unsafeWindow.frames.wangpan)==null||n.postMessage({event:lt.officialMenuStyleChange},"*"))}async function gx(e){const t=[];return e.forEach(n=>{n.items.forEach(o=>{o.hidden&&t.push(`${n.key}_${o.key}`)})}),t}async function Wp(){const e=[fx,px,hx],t=await Vp();return e.forEach(n=>{n.items.forEach(o=>{const i=`${n.key}_${o.key}`;t.includes(i)?o.hidden=!0:o.hidden=!1})}),e}async function yx(){const e=await Wp(),t=[];return e.forEach(n=>{n.hiddenStyles.forEach(o=>{const i=[];n.items.forEach(s=>{!s.hidden||i.push(o.selector.replace("{key}",s.key))}),i.length&&t.push(i.join(`,
`)+" { "+o.css+" }")})}),t.join(`
`)}async function Kp(){const e="cloud115EnhancerOfficialMenuStyle",t=await yx();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 wx(){const{host:e,search:t}=location;if(!e.includes("115.com"))return;console.log("[Cloud115 Enhancer - menu] running..."),bx(),document.addEventListener(Qt.EVENT_CLOSE_MENU,o=>{$("#"+o.detail.menu.key).closest(".context-menu").hide()});const n=await ci();!n.enabled||(_x(n),await Ad(n),window.top===window.self&&vx(n),Cx(n),(t.includes("ct=file")||t.includes("mode=search"))&&(xx(n),$x(n),Nb(n)))}async function bx(){console.log("[Cloud115 Enhancer - menu] injectUI");const e="ceCustomUrlHelp",t=document.createElement("div");t.id=e,document.body.appendChild(t),xn(T0).mount(`#${e}`)}async function _x(e){!e.manageOfficialMenus||(Kp(),window.addEventListener("message",async t=>{t.data.event===lt.officialMenuStyleChange&&(console.log("[Cloud115 Enhancer - menu] officialMenuStyleChange",location.href),await wt(1e3),console.log(await Vp()),Kp())}))}const oc=async(e,t)=>{};async function vx(e){const{[Be.dirContext]:t}=e;if(!t.enabled)return;const n=[];t.rename&&n.push(await K0()),t.delete&&n.push(await J0()),t.play&&n.push(await W0(!0)),t.copyNames&&n.push(new jt({key:"_dir_copy_names",label:"名称路径",icon:"icon-operate ifo-copy",onClick:oc,subItems:[await Hr("完整名称",Kt.full),await Hr("不含后缀",Kt.pure),await Hr("完整名称,去重",Kt.fullUnique),await Hr("不含后缀,去重",Kt.pureUnique),new e_({}),await Bp("路径(Unix)",sn.unixPath),await Bp("路径(Windows)",sn.winPath)]}));const o=[];t.move&&o.push(await Y0()),t.viewProp&&o.push(await Z0()),t.showSubFolderSize&&o.push(await ex()),t.copy&&o.push(await Q0()),t.copyTo&&o.push(await X0()),t.exportList&&o.push(await G0()),o.length===1?n.push(o[0]):o.length>1&&n.push(new jt({key:"_dir_more",label:"更多",icon:"icon-operate ifo-open",onClick:oc,subItems:o})),await new n_({items:n,siblingSelector:'[val="add_dir"]',position:Co.after}).inject(),$(".ce-menu-parent .ce-menu-trigger").on("mouseover",function(){$(this).find(".ce-menu-dropdown").show()}).on("mouseout",function(){$(this).find(".ce-menu-dropdown").hide()})}async function xx(e){const{[Be.listItemHover]:t}=e;if(!t.enabled)return;const n=[];t.openInNewTab&&n.push(await rx()),t.search&&n.push(await ox()),t.play&&n.push(await nx()),t.copyNames&&n.push(await sx(t)),new i_({items:n,position:Co.after,siblingSelector:'[menu="move"], [menu="delete"]'}).inject()}async function Cx(e){const{[Be.listItemContext]:t}=e;if(!t.enabled)return;const n=[];t.copyNames&&n.push(new sl({key:"_list_item_copy_name_path",label:"名称路径",icon:"icon-operate ifo-copy",onClick:oc,subItems:[await Fp("完整名称",Kt.full),await Fp("不含后缀",Kt.pure),new t_({}),await jp("路径(Unix)",sn.unixPath),await jp("路径(Windows)",sn.winPath)]})),new o_({items:n,position:Co.after,siblingSelector:'[val="refresh"]',useObserver:!0,observeTarget:document.body,disposeObserverAfterInjection:!1}).inject()}async function $x(e){const{[Be.selection]:t}=e;if(!t.enabled)return;const n=[];location.search.includes("ac=search")||t.moveToSelfNameDir&&n.push(await ax()),t.copyNames&&n.push(await lx()),t.play&&n.push(await cx()),new s_({items:n,position:Co.before,siblingSelector:"ul li"}).inject()}const Gp="offlineExporterConfig";var Vr=(e=>(e.name="name",e.nameRegex="nameRegex",e.infoHash="infoHash",e.url="url",e))(Vr||{});const Ex={name:"名称",nameRegex:"名称正则",infoHash:"哈希",url:"链接"};function kx(e){return{onlyMagnetEd2k:!1,enableOptimization:!0,reqInterval:500,maxPage:0,showInfoHash:!0,enableListManagement:!0,fixGotoPage:!1,enableSearcher:!0,searchMaxPage:5,searchKeywordType:"name",searchStatus:Nt.any,searchStopOnFound:!1,searchReqInterval:10,noGotoTaskPage:!0,...e}}async function fo(){const e=kx(),t=await tt.get(Gp,e);return{...e,...t}}async function Yp(e){await tt.set(Gp,e),window.postMessage({event:xi.configChanged,body:JSON.parse(JSON.stringify(e))},"*")}async function Sx(e){const t=await _o("#js-warp"),o=t[0].querySelectorAll("li[complete]");o.length>0&&o.forEach(async s=>{await Jp(s,e)}),Ix(e),new MutationObserver(async([s])=>{if(s.type==="childList"){s.addedNodes.forEach(async a=>{await Jp(a,e)});const r=document.querySelector(".ce-checkbox-all input");r.checked=!1,await Wr([])}}).observe(t[0],{childList:!0})}async function Ax(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 Jp(e,t){const n=e,o=await Ax(e);Ox(n,t,o),Px(n,t,o),Tx(n,t,o)}async function Px(e,t,n){if(!t.showInfoHash||e.querySelector(".info-hash"))return;const o=e.querySelector(".file-name"),i=document.createElement("div");i.classList.add("info-hash"),i.textContent=n.hash,i.title=`点击复制${n.hash}`,o.after(i),i.addEventListener("click",()=>{Li(n.hash,"text"),ae({text:"已复制",icon:"success",timer:800})});const s=e.querySelector(".desc-tips");s&&s.style.display!=="none"&&e.classList.add("ce-task-trouble")}async function Tx(e,t,n){const o=e.querySelector(".file-operate");if(o.querySelector(".ce-buttons"))return;const i=document.createElement("span");i.className="ce-buttons";const s=document.createElement("a");s.className="pure-button button-mini button-info",s.href=Vi(n.cate_id),s.target="_blank",s.textContent="打开",s.title="在新标签页打开目录",i.append(s),o.prepend(i)}async function Ix(e){if(!e.enableListManagement)return;const t=await _o("#js-main .header-name");if(t.length===0){console.warn("[renderCheckboxAll] 找不到`#js-main .header-name`");return}const n=t[0];let o=n.querySelector(".ce-checkbox-all");o||(o=document.createElement("div"),o.classList.add("ce-checkbox"),o.classList.add("ce-checkbox-all"),o.innerHTML=`
      <input type="checkbox"/>
    `,n.prepend(o)),o.addEventListener("click",()=>{const i=o.querySelector("input").checked;document.querySelectorAll("#js-warp li").forEach(r=>{const a=r.querySelector("input");a.checked=i,r.classList.toggle("ce-selected",i)}),ic().then(r=>{Wr(r)})})}async function Ox(e,t,n){if(!t.enableListManagement||e.querySelector(".ce-checkbox"))return;const o=e.querySelector(".file-name-wrap"),i=document.createElement("div");i.classList.add("ce-checkbox"),i.innerHTML=`
    <input type="checkbox" data-id="${n.hash}" />
  `,o.prepend(i),e.classList.add("ce-show-checkbox"),i.addEventListener("click",async s=>{s.shiftKey?await Mx(s,e):await Lx(s,e)})}async function Lx(e,t){t.classList.toggle("ce-selected");const n=document.querySelector(".ce-checkbox-all input"),o=await Xp(!1);let i=0;for(const r of o)r.classList.contains("ce-selected")&&i++;const s=i===o.length;n.checked=s,n.indeterminate=!s&&i>0,ic().then(r=>{Wr(r)})}async function Mx(e,t){const n=await Xp(!1),o=n.indexOf(t);let i=-1;for(let f=0;f<o;f++)if(n[f].classList.contains("ce-selected")){i=f;break}if(i===-1){for(let f=n.length-1;f>o;f--)if(n[f].classList.contains("ce-selected")){i=f;break}}i=i===-1?o:i;const s=Math.min(i,o),r=Math.max(i,o);let a=0;for(let f=0;f<n.length;f++){const h=n[f],g=h.querySelector(".ce-checkbox input"),b=f>=s&&f<=r;g.checked=b,b&&a++,h.classList.toggle("ce-selected",b)}const l=s===0&&r===n.length-1,u=document.querySelector(".ce-checkbox-all input");u.checked=l,u.indeterminate=!l&&a>0,ic().then(f=>{Wr(f)})}async function Qp(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 Xp(e){const t=document.querySelectorAll("#js-warp li"),n=[];return t.forEach(async o=>{const i=o;(!e||i.classList.contains("ce-selected"))&&n.push(i)}),n}async function ic(){const e=document.querySelectorAll("#js-warp li"),t=[];return e.forEach(async n=>{const o=n;if(o.classList.contains("ce-selected")){const i=await Qp(o);t.push(i)}}),t}var xi=(e=>(e.selection="ce-offline-selection",e.configChanged="ce-offline-config-changed",e.searchPageChanged="ce-offline-search-page-changed",e))(xi||{});async function Wr(e){window.postMessage({event:"ce-offline-selection",body:e},"*")}async function sc(e){document.querySelectorAll("#js-warp li").forEach(async n=>{const o=n,i=o.getAttribute("hash");e.includes(i)&&Ld(o)})}async function Dx(e,t,n,o){var b;const i=[],s=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!==Nt.any&&n.status.toString()!==""&&(f=n.status.toString());let h=n.stopOnFound||!1;(l||u)&&(h=!0);let g=-1;for(let _=1;_<=s&&!(g>-1&&_>g);_++){window.postMessage({event:"ce-offline-search-page-changed",body:_},"*");const E=await hd(_,e,t);g===-1&&(g=E.page_count);const T=E.tasks;for(const M of T){const P=n.caseSensitive?M.name:M.name.toLowerCase(),I=n.caseSensitive?M.info_hash:M.info_hash.toLowerCase(),H=n.caseSensitive?M.url:(b=M.url)==null?void 0:b.toLowerCase(),ie=r&&n.fuzzyName?P.includes(r):!1,j=a?a.test(P):!1,Z=l&&I===l,ce=u&&H===u;if((f?f===M.status.toString():!0)&&(ie||j||Z||ce)&&(i.push(M),h))break}if(h&&i.length)break;_<s&&await wt(o.searchReqInterval||50)}return i}async function Rx(){if(!(await fo()).fixGotoPage)return;const t=await En("#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)},o=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=Rt(async r=>{o(!0)},50),s=new MutationObserver(async([r])=>{r.type==="childList"&&i(r)});o(!1),s.observe(t,{childList:!0})}const Nx={class:"ce-config ce-offline-config"},Bx={class:"pure-form pure-form-aligned offline-exporter-config-form"},Fx={class:"pure-control-group"},jx=c("label",{for:"noGotoTaskPage"},"添加任务后不跳转",-1),Ux={class:"pure-control-group"},Hx=c("label",{for:"enableListManagement"},"启用批量管理",-1),qx=c("div",{class:"pure-form-message text-success"}," 可以选中多个任务进行操作,支持shift多选。 ",-1),zx={class:"pure-control-group"},Vx=c("label",{for:"showInfoHash"},"显示链接哈希",-1),Wx=c("div",{class:"pure-form-message text-success"}," 显示离线任务的哈希文本,点击可以复制。 ",-1),Kx={class:"pure-control-group"},Gx=c("label",{for:"fixGotoPage"},"修复输入页码跳转",-1),Yx=c("div",{class:"pure-form-message text-success"}," 如果官方的输入页码跳转功能异常,可开启此选项。 ",-1),Jx=c("div",{class:"ce-tips"},"以下是导出链接相关选项",-1),Qx={class:"pure-control-group"},Xx=c("label",{for:"onlyMagnetEd2k"},"只取磁力和ED2K链接",-1),Zx=c("div",{class:"pure-form-message text-success"}," 导出链接时,只取磁力和ED2K链接,其他比如http链接会被略过。 ",-1),eC={class:"pure-control-group"},tC=c("label",{for:"enableOptimization"},"启用导出优化",-1),nC=c("div",{class:"pure-form-message text-success"}," 据观察,离线记录列表是将未完成的记录放在最前面的。如果只需导出未完成链接, 当获取到一个已完成的记录时,便可以停止继续获取后面的记录,节省时间。 ",-1),oC={class:"pure-control-group"},iC=c("label",{for:"reqInterval"},"导出请求数据间隔",-1),sC=c("div",{class:"pure-form-message text-success"}," 导出时请求分页的间隔,单位为毫秒,默认500。 ",-1),rC={class:"pure-control-group"},aC=c("label",{for:"maxPage"},"最多导出页数",-1),lC=c("div",{class:"pure-form-message text-success"}," 0表示不限制,否则表示最多导出的页数。 ",-1),cC=c("div",{class:"ce-tips"},[ee("以下是搜索离线任务相关选项。"),c("small",{class:"text-info"},"提示: 除了关键词,其他搜索条件都会持久保存。")],-1),uC={class:"pure-control-group"},dC=c("label",{for:"reqInterval"},"搜索请求数据间隔",-1),fC=c("div",{class:"pure-form-message text-success"}," 搜索时请求分页的间隔,单位为毫秒,默认10。 ",-1),Zp=Ne({__name:"Config",async setup(e){let t,n;const o=de(([t,n]=tn(()=>fo()),t=await t,n(),t));return At(async()=>{}),pt(o,Rt(async i=>{await Yp(i),ae({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0}),(i,s)=>(B(),z("div",Nx,[c("form",Bx,[c("fieldset",null,[c("div",Fx,[jx,X(c("input",{id:"noGotoTaskPage",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=r=>o.value.noGotoTaskPage=r)},null,512),[[Se,o.value.noGotoTaskPage]])]),c("div",Ux,[Hx,X(c("input",{id:"enableListManagement",type:"checkbox","onUpdate:modelValue":s[1]||(s[1]=r=>o.value.enableListManagement=r)},null,512),[[Se,o.value.enableListManagement]]),qx]),c("div",zx,[Vx,X(c("input",{id:"showInfoHash",type:"checkbox","onUpdate:modelValue":s[2]||(s[2]=r=>o.value.showInfoHash=r)},null,512),[[Se,o.value.showInfoHash]]),Wx]),c("div",Kx,[Gx,X(c("input",{id:"fixGotoPage",type:"checkbox","onUpdate:modelValue":s[3]||(s[3]=r=>o.value.fixGotoPage=r)},null,512),[[Se,o.value.fixGotoPage]]),Yx]),Jx,c("div",Qx,[Xx,X(c("input",{id:"onlyMagnetEd2k",type:"checkbox","onUpdate:modelValue":s[4]||(s[4]=r=>o.value.onlyMagnetEd2k=r)},null,512),[[Se,o.value.onlyMagnetEd2k]]),Zx]),c("div",eC,[tC,X(c("input",{id:"enableOptimization",type:"checkbox","onUpdate:modelValue":s[5]||(s[5]=r=>o.value.enableOptimization=r)},null,512),[[Se,o.value.enableOptimization]]),nC]),c("div",oC,[iC,X(c("input",{id:"reqInterval",type:"number","onUpdate:modelValue":s[6]||(s[6]=r=>o.value.reqInterval=r),min:50},null,512),[[Ke,o.value.reqInterval]]),sC]),c("div",rC,[aC,X(c("input",{id:"maxPage",type:"number","onUpdate:modelValue":s[7]||(s[7]=r=>o.value.maxPage=r),min:0},null,512),[[Ke,o.value.maxPage]]),lC]),cC,c("div",uC,[dC,X(c("input",{id:"reqInterval",type:"number","onUpdate:modelValue":s[8]||(s[8]=r=>o.value.searchReqInterval=r),min:10},null,512),[[Ke,o.value.searchReqInterval]]),fC])])])]))}}),sR="",pC={class:"ce-offline-exporter"},hC={key:0},mC=c("button",{type:"button",class:"pure-button button-mini"},"设置",-1),gC=Ne({__name:"OflineExporter",setup(e){const t=`\r
`;let n,o;const i=de([]);let s={};Pt(async()=>{s=await fo(),n=await gd(),console.log("[profile]",n),o=await md(),console.log("[space]",o),r(),await Sx(s)});async function r(){window.addEventListener("message",E=>{const{event:T,body:M}=E.data;switch(T){case xi.selection:i.value=M;break;case xi.configChanged:s=M;break}},!1)}async function a(E=!1,T=""){const{isConfirmed:M,value:P}=await me.fire({title:"根据链接删除离线任务",html:`
      <div>每行一个链接,支持磁力链接和ED2K链接</div>
      <div>
        <label class="swal2-checkbox" style="display: flex;">
          <input type="checkbox" id="swalDeleteFile">
          <span class="swal2-label">同时删除文件</span>
        </label>
      </div>
      <div>
        <textarea id="swalUrls" aria-label="每行一个链接" class="swal2-textarea" placeholder="每行一个链接" style="width:80%;"></textarea>
      </div>
    `,focusConfirm:!1,didOpen:()=>{const ie=document.getElementById("swalDeleteFile");ie.checked=E;const j=document.getElementById("swalUrls");j.value=T,j.focus()},preConfirm:()=>{const ie=document.getElementById("swalDeleteFile"),j=document.getElementById("swalUrls");return{deleteFile:ie?ie.checked:!1,urls:j?j.value:""}},width:620,inputPlaceholder:"每行一个",inputAttributes:{"aria-label":"每行一个"},showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消"});if(!M)return;if(P===void 0){alert("请输入链接!");return}const I=[],H=P.urls.trim().split(`
`);for(let ie=0;ie<H.length;ie++){const j=H[ie].trim();if(Xc(j)||Zc(j)){const Z=tu(j);Z&&I.push(Z.toLowerCase())}}me.showLoading(),me.update({html:"正在删除..."}),await Ga(I,o,P.deleteFile,n.user_id),ae({icon:"success",title:"删除成功!请刷新页面查看最新的列表。",timer:3e4,position:"top-end"}),await sc(I)}async function l(){const E=i.value.map(I=>I.info_hash);if(!E.length)return;const{isConfirmed:T,value:M}=await me.fire({title:"批量删除",icon:"warning",html:`确定要删除选中的 ${E.length} 个离线记录吗?`,input:"checkbox",inputValue:0,inputPlaceholder:"同时删除文件",showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消"});if(!T)return;const P=!!M;me.showLoading(),me.update({html:"正在删除..."}),await Ga(E,o,P,n.user_id),ae({icon:"success",title:"删除成功",timer:800,position:"top-end"}),await sc(E),i.value=[]}async function u(E){const T=[E];s.onlyMagnetEd2k&&T.push(Bt.magnetEd2k),console.log("[filters]",T),await _(o.sign,n.user_id,T)}function f(E,T){if(!T.length||T.length===1&&T[0]==="all")return E;const M={[Nt.failed]:Bt.failed,[Nt.illegal]:Bt.failed,[Nt.ing]:Bt.failed,[Nt.success]:Bt.success};return E=E.filter(P=>{if(!P.url&&!P.info_hash)return!1;const I=M[P.status];return T.includes(Bt.all)||I&&T.includes(I)?!(T.includes(Bt.magnetEd2k)&&(!fg(P.info_hash)||P.url&&!Xc(P.url)&&!Zc(P.url))):!1}),E}async function h(E,T,M){let P=[],I=1,H=0;for(;;){me.update({html:`正在导出... 进度:第 ${I} 页`+(H?` / ${H}`:"")});const ie=await hd(I,E,T);if(!ie.tasks||!ie.tasks.length)break;if(H===0&&s.maxPage>0?H=Math.min(ie.page_count,s.maxPage):H=ie.page_count,P=[...P,...f(ie.tasks,M)],s.enableOptimization&&M.includes(Bt.failed)&&g(ie.tasks)){console.warn("由于开启了导出优化,且检测到已获取的记录中至少有一个「已完成」的记录,将不再获取剩下的记录");break}if(I>=H)break;I++,await wt(s.reqInterval)}return P}function g(E){for(const T of E)if(T.status===Nt.success)return!0;return!1}async function b(){const E=[Bt.all];s.onlyMagnetEd2k&&E.push(Bt.magnetEd2k),console.log("[filters]",E);const T=i.value;if(!T.length)return;const M=[];T.forEach(P=>{!P.url&&P.info_hash&&(P.url=eu(P.info_hash)),M.push(P.url)}),M.length&&(Li(M.join(t),"text"),console.log("[links]",M),await me.fire({title:"导出成功",icon:"success",html:`成功导出 ${M.length} 个链接,请粘贴到文本文件。`,showDenyButton:!0,denyButtonText:"保存到txt",allowEscapeKey:!1,allowOutsideClick:!1,preDeny:async()=>(console.log("[saveAs]"),Di(M.join(t),`115离线链接_数量${M.length}_${Mi()}.txt`),!1)}))}async function _(E,T,M){me.fire({title:"导出离线链接",html:"正在导出...",didOpen:()=>{me.showLoading()}});const P=await h(E,T,M);if(me.hideLoading(),!P.length){await me.fire({title:"导出失败",icon:"error",html:"查询不到符合条件的离线记录!"});return}const I=[];if(P.forEach(H=>{!H.url&&H.info_hash&&(H.url=eu(H.info_hash)),I.push(H.url)}),!I.length){await me.fire({title:"导出失败",icon:"error",html:"未完成的离线记录中没有磁力或HTTP链接!"});return}Li(I.join(t),"text"),console.log("[links]",I),await me.fire({title:"导出成功",icon:"success",html:`成功导出 ${I.length} 个链接,请粘贴到文本文件。`,showDenyButton:!0,denyButtonText:"保存到txt",allowEscapeKey:!1,allowOutsideClick:!1,preDeny:async()=>(console.log("[saveAs]"),Di(I.join(t),`115离线链接_数量${I.length}_${Mi()}.txt`),!1)})}return(E,T)=>{const M=Fo("VDropdown");return B(),z("span",pC,[i.value.length?(B(),z("span",hC,[c("button",{type:"button",class:"pure-button button-small button-error",onClick:l},[ee("删除("),c("span",null,ge(i.value.length),1),ee(")")]),ee("      ")])):qe("",!0),c("button",{type:"button",class:"pure-button button-mini button-error",onClick:T[0]||(T[0]=P=>a(!1,"")),title:"填写链接以删除对应的离线任务"},"根据链接删除"),ee("   "),i.value.length?(B(),z("button",{key:1,type:"button",class:"pure-button button-mini button-warning",onClick:b,title:"导出选中任务的链接"},[ee("导出已选"),c("span",null,"("+ge(i.value.length)+")",1)])):qe("",!0),c("button",{type:"button",class:"pure-button button-mini button-error",onClick:T[1]||(T[1]=P=>u(fe(Bt).failed)),title:"导出未完成链接"},"导出未完成"),c("button",{type:"button",class:"pure-button button-mini button-success",onClick:T[2]||(T[2]=P=>u(fe(Bt).success)),title:"导出已完成链接"},"导出已完成"),c("button",{type:"button",class:"pure-button button-mini button-warning",onClick:T[3]||(T[3]=P=>u(fe(Bt).all)),title:"导出全部链接"},"导出全部"),ee("   "),Ee(M,{distance:5,"arrow-padding":10},{popper:Je(()=>[(B(),Zt(Mf,null,{default:Je(()=>[Ee(Zp)]),_:1}))]),default:Je(()=>[mC]),_:1})])}}}),rR="",yC=["cate_id","delete_id","status","hash"],wC={class:"file-name-wrap"},bC={class:"file-name"},_C={task_popup:"goto",href:"javascript:;",class:"name"},vC={rel:"name"},xC={class:"desc-tips",rel:"file_down_violations"},CC={class:"txt-red",rel:"file_down_tips"},$C=["filename"],EC={class:"file-size"},kC={class:"file-process"},SC=c("i",{class:"icon-file-status ifst-failure"},null,-1),AC=c("span",{rel:"progress"},"下载失败",-1),PC=c("i",{class:"icon-file-status ifst-success"},null,-1),TC=c("span",{rel:"progress"},"下载成功",-1),IC=c("i",{class:"icon-file-status ifst-downing"},null,-1),OC={rel:"progress"},LC=c("i",{class:"icon-file-status ifst-violation"},null,-1),MC=c("span",{rel:"progress"},"违规",-1),DC=c("i",{class:"icon-file-status ifst-failure"},null,-1),RC=c("span",{rel:"progress"},"[未知]",-1),NC={class:"file-operate",rel:"opt"},BC=c("a",{href:"javascript:;",task_popup:"goto"},[c("i",{class:"icon-operate ifo-opendir"}),c("s",null,"跳转到目录")],-1),FC=["cp_href"],jC=[c("i",{class:"icon-operate ifo-copy"},null,-1),c("s",null,"复制",-1)],UC=c("a",{href:"javascript:;",class:"btn-delete-offline"},[c("i",{class:"icon-operate ifo-remove"}),c("s",null,"删除")],-1),HC=Ne({__name:"OfflineItem",props:{item:null,space:null,profile:null},setup(e){const t=e,n=vn(()=>t.item.percentDone?parseInt(t.item.percentDone.toString()):0),o=vn(()=>{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=vn(()=>{const{err:r}=t.item;return r?Ty[r]:""}),s=vn(()=>t.item.can_appeal===1);return(r,a)=>(B(),z("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",wC,[c("i",{class:Qe(["file-type",`tp-${fe(o)}`])},null,2),c("div",bC,[c("em",null,[c("a",_C,[c("span",vC,ge(e.item.name),1)])])]),X(c("div",xC,[c("span",CC,ge(fe(i)),1),X(c("a",{href:"javascript:;",class:"btn-link",filename:e.item.name,rel:"violations_down_btn"},"去申诉",8,$C),[[Ot,fe(s)]])],512),[[Ot,fe(i)]])]),c("div",EC,[c("span",null,ge(fe(Ds)(e.item.size)),1)]),c("div",kC,[e.item.status===fe(Nt).failed?(B(),z(je,{key:0},[SC,AC],64)):e.item.status===fe(Nt).success?(B(),z(je,{key:1},[PC,TC],64)):e.item.status===fe(Nt).ing?(B(),z(je,{key:2},[IC,c("span",OC,ge(fe(n))+"%",1)],64)):e.item.status===fe(Nt).illegal?(B(),z(je,{key:3},[LC,MC],64)):(B(),z(je,{key:4},[DC,RC],64))]),c("div",NC,[BC,c("a",{href:"javascript:;",cp_href:e.item.url,task_popup:"copy"},jC,8,FC),UC])],8,yC))}}),qC={class:"ce-offline-list"},zC=Ne({__name:"OfflineList",props:{items:null,space:null,profile:null},setup(e){return(t,n)=>(B(),z("div",qC,[c("ul",null,[(B(!0),z(je,null,st(e.items,(o,i)=>(B(),Zt(HC,{Key:i,item:o,space:e.space,profile:e.profile},null,8,["Key","item","space","profile"]))),256))])]))}}),VC={inline:"",class:"pure-form search-form",size:"small"},WC={class:"form-item",label:"关键词"},KC=["value"],GC={class:"form-item"},YC=["onKeyup"],JC={class:"form-item",label:"状态"},QC=["value"],XC=["value"],ZC={class:"form-item",label:"页数"},e$=c("small",null,"页",-1),t$={class:"form-item"},n$={key:0,title:"根据「名称/名称正则」查找时,是否在找到一个结果时停止继续查找"},o$={key:0,class:"search-tips"},i$={class:"tips-body"},s$={key:0},r$=Ne({__name:"OfflineSearcher",setup(e){let t,n;const o=de(),i=de({KeywordType:Vr.name,keyword:"",status:Nt.any,maxPage:5,stopOnFound:!1});let s={...i.value};const r=de(null),a=de(!1),l=de([]),u=de(null),f=de({content:"",subContent:"",visible:!1});Pt(async()=>{t=await gd(),n=await md(),o.value=await fo(),i.value.KeywordType=o.value.searchKeywordType,i.value.status=o.value.searchStatus,i.value.maxPage=o.value.searchMaxPage,i.value.stopOnFound=o.value.searchStopOnFound,s={...i.value},document.body.addEventListener("click",j=>{H(j)}),h()}),pt(i,Rt(async j=>{console.log("[searchParams changed]",Jc(j)),b()},200),{deep:!0});async function h(){window.addEventListener("message",j=>{const{event:Z,body:ce}=j.data;switch(Z){case xi.searchPageChanged:g(ce);break;case xi.configChanged:o.value={...ce};break}},!1)}async function g(j){console.log("[handleSearchPageChanged]",j),await ie({subContent:`正在搜索第 ${j} 页...`,visible:!0})}async function b(){const j=await fo();let Z=0;s.KeywordType!==i.value.KeywordType&&(j.searchKeywordType=i.value.KeywordType,Z++),s.status!==i.value.status&&(j.searchStatus=i.value.status,Z++),s.maxPage!==i.value.maxPage&&(j.searchMaxPage=i.value.maxPage,Z++),s.stopOnFound!==i.value.stopOnFound&&(j.searchStopOnFound=i.value.stopOnFound,Z++),Z&&(await Yp(j),console.log("[handleSearchParamsChange]",j),o.value={...j}),s={...i.value}}async function _(j){var Z;(Z=r.value)==null||Z.select()}async function E(j){var Z;i.value.keyword="",(Z=r.value)==null||Z.focus()}async function T(){l.value=[],i.value.keyword="",s={...i.value},await ie({visible:!1}),await P(!1);try{parent.window.Core.OFFL5Plug.ChangePage(1)}catch(j){console.error(j)}}async function M(){var Z;l.value=[];let{keyword:j}=i.value;if(j=j.trim(),j===""){await mi(),(Z=r.value)==null||Z.select(),Xs.fire({icon:"warning",title:"关键词不能为空!"});return}a.value=!0,await ie({content:"正在搜索...",subContent:"",visible:!0});try{const ce={status:i.value.status,maxPage:i.value.maxPage,fuzzyName:!0,caseSensitive:!1,stopOnFound:i.value.stopOnFound};ce[i.value.KeywordType]=i.value.keyword,ce.infoHash&&(ce.infoHash=tu(ce.infoHash)),console.log("[search filter]",ce);const ye=await Dx(n.sign,t.user_id,ce,o.value);l.value=ye,console.log("[search result]",ye),ye.length>0?await ie({visible:!1}):await ie({content:"没有符合条件的离线任务",subContent:"",visible:!0}),await P(!0)}catch(ce){console.warn("[search error]",ce),Xs.fire({icon:"error",title:ce.toString()}),await ie({content:"搜索失败!",subContent:ce.toString(),visible:!0})}finally{a.value=!1}}async function P(j=!0){var ye,Te;!l.value.length&&j&&Xs.fire({icon:"warning",html:"没有符合条件的离线任务"}),await mi();const Z=(ye=u.value)==null?void 0:ye.querySelector("ul");if(!Z)return;const ce=document.querySelector("ul#js-warp");ce&&(ce.innerHTML=Z.innerHTML),await I(),(Te=r.value)==null||Te.focus()}async function I(){const j=l.value.length,Z=document.querySelector("#js-page");if(!Z)return;const ce=Z.querySelector(".left-bvf span");ce.textContent=`共搜索到 ${j} 个结果`;const ye=Z.querySelector(".pagination .con");ye.style.display="none"}async function H(j){let Z=j.target;if(Z.classList.contains("ifo-remove")&&(Z=Z.closest("a")),!Z.classList.contains("btn-delete-offline"))return;const ce=Z.closest("li"),ye=await Qp(ce),Te=[ye.info_hash];let be={title:"删除离线记录",icon:"warning",html:`确定要删除「${ye.name}」吗?`,showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消"};ye.delete_file_id&&(be={...be,input:"checkbox",inputValue:0,inputPlaceholder:"同时删除文件"});const{isConfirmed:O,value:re}=await me.fire(be);if(!O)return;const J=!!re;me.showLoading(),me.update({html:"正在删除..."}),await Ga(Te,n,J,t.user_id),ae({icon:"success",title:"删除成功",timer:800,position:"top-end"}),await sc(Te)}async function ie(j){f.value={...f.value,...j}}return(j,Z)=>(B(),z("div",{class:Qe(["ce-offline-searcher",{loading:a.value}])},[c("form",VC,[c("fieldset",null,[c("div",WC,[X(c("select",{"onUpdate:modelValue":Z[0]||(Z[0]=ce=>i.value.KeywordType=ce),size:"small",onChange:_},[(B(!0),z(je,null,st(fe(Ex),(ce,ye)=>(B(),z("option",{key:ye,value:ye},ge(ce),9,KC))),128))],544),[[vi,i.value.KeywordType]])]),c("div",GC,[c("div",{class:Qe(["clearable-wrap",{"is-empty":i.value.keyword===""}])},[X(c("input",{ref_key:"refKeyword",ref:r,"onUpdate:modelValue":Z[1]||(Z[1]=ce=>i.value.keyword=ce),placeholder:"请输入关键词",clearable:"",onKeyup:Ap(M,["enter"])},null,40,YC),[[Ke,i.value.keyword]]),c("button",{type:"button",class:"pure-button pure-button-default button-xsmall btn-clear",onClick:E},"×")],2)]),c("div",JC,[X(c("select",{"onUpdate:modelValue":Z[2]||(Z[2]=ce=>i.value.status=ce),placeholder:"请选择",clearable:"",style:{width:"90px"}},[c("option",{value:fe(Nt).any},"-状态-",8,QC),(B(!0),z(je,null,st(fe(yg),(ce,ye)=>(B(),z("option",{key:ye,value:ye},ge(ce),9,XC))),128))],512),[[vi,i.value.status]])]),c("div",ZC,[X(c("input",{type:"number","onUpdate:modelValue":Z[3]||(Z[3]=ce=>i.value.maxPage=ce),min:1,max:1e5,title:"最多查找页数"},null,512),[[Ke,i.value.maxPage]]),e$]),c("div",t$,[[fe(Vr).name,fe(Vr).nameRegex].includes(i.value.KeywordType)?(B(),z("label",n$,[X(c("input",{type:"checkbox","onUpdate:modelValue":Z[4]||(Z[4]=ce=>i.value.stopOnFound=ce),class:"stop-on-found"},null,512),[[Se,i.value.stopOnFound]]),ee(" 找到即停 ")])):qe("",!0),c("button",{type:"button",class:"pure-button pure-button-primary button-small",onClick:M},"查找"),ee("    "),c("button",{type:"button",class:"pure-button pure-button-default button-xsmall",onClick:T,title:"清空关键词;重置列表到非查找状态"},"重置")])])]),c("div",{ref_key:"refList",ref:u,class:"list"},[Ee(zC,{items:l.value,space:fe(n),profile:fe(t)},null,8,["items","space","profile"])],512),f.value.visible?(B(),z("div",o$,[c("div",i$,[c("h2",null,ge(f.value.content),1),f.value.subContent?(B(),z("p",s$,ge(f.value.subContent),1)):qe("",!0)])])):qe("",!0)],2))}}),cR="";function Rn(e){return e.split("-")[0]}function Ci(e){return e.split("-")[1]}function bs(e){return["top","bottom"].includes(Rn(e))?"x":"y"}function rc(e){return e==="y"?"height":"width"}function eh(e){let{reference:t,floating:n,placement:o}=e;const i=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2;let r;switch(Rn(o)){case"top":r={x:i,y:t.y-n.height};break;case"bottom":r={x:i,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:s};break;case"left":r={x:t.x-n.width,y:s};break;default:r={x:t.x,y:t.y}}const a=bs(o),l=rc(a);switch(Ci(o)){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 a$=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n;if(r==null&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),s.filter(b=>{let{name:_}=b;return _==="autoPlacement"||_==="flip"}).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement`","middleware detected. This will lead to an infinite loop. Ensure only","one of either has been passed to the `middleware` array."].join(" "));let a=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:l,y:u}=eh({...a,placement:o}),f=o,h={},g=0;for(let b=0;b<s.length;b++){if(g++,g>100)throw new Error(["Floating UI: The middleware lifecycle appears to be","running in an infinite loop. This is usually caused by a `reset`","continually being returned without a break condition."].join(" "));const{name:_,fn:E}=s[b],{x:T,y:M,data:P,reset:I}=await E({x:l,y:u,initialPlacement:o,placement:f,strategy:i,middlewareData:h,rects:a,platform:r,elements:{reference:e,floating:t}});if(l=T!=null?T:l,u=M!=null?M:u,h={...h,[_]:P!=null?P:{}},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}=eh({...a,placement:f})),b=-1;continue}}return{x:l,y:u,placement:f,strategy:i,middlewareData:h}};function l$(e){return{top:0,right:0,bottom:0,left:0,...e}}function th(e){return typeof e!="number"?l$(e):{top:e,right:e,bottom:e,left:e}}function ac(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Kr(e,t){t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:r,strategy:a}=e,{boundary:l="clippingParents",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:g=0}=t,b=th(g),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}),M=ac(await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:f==="floating"?{...s.floating,x:n,y:o}:s.reference,offsetParent:await i.getOffsetParent({element:r.floating}),strategy:a}));return{top:T.top-M.top+b.top,bottom:M.bottom-T.bottom+b.bottom,left:T.left-M.left+b.left,right:M.right-T.right+b.right}}const c$=Math.min,zo=Math.max;function lc(e,t,n){return zo(e,c$(t,n))}const u$=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:o=0}=e!=null?e:{},{x:i,y:s,placement:r,rects:a,platform:l}=t;if(n==null)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const u=th(o),f={x:i,y:s},h=Rn(r),g=bs(h),b=rc(g),_=await l.getDimensions({element:n}),E=g==="y"?"top":"left",T=g==="y"?"bottom":"right",M=a.reference[b]+a.reference[g]-f[g]-a.floating[b],P=f[g]-a.reference[g],I=await l.getOffsetParent({element:n}),H=I?g==="y"?I.clientHeight||0:I.clientWidth||0:0,ie=M/2-P/2,j=u[E],Z=H-_[b]-u[T],ce=H/2-_[b]/2+ie,ye=lc(j,ce,Z);return{data:{[g]:ye,centerOffset:ce-ye}}}}),d$={left:"right",right:"left",bottom:"top",top:"bottom"};function Gr(e){return e.replace(/left|right|bottom|top/g,t=>d$[t])}function nh(e,t){const n=Ci(e)==="start",o=bs(e),i=rc(o);let s=o==="x"?n?"right":"left":n?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Gr(s)),{main:s,cross:Gr(s)}}const f$={start:"end",end:"start"};function cc(e){return e.replace(/start|end/g,t=>f$[t])}const p$=["top","right","bottom","left"].reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function h$(e,t,n){return(e?[...n.filter(i=>Ci(i)===e),...n.filter(i=>Ci(i)!==e)]:n.filter(i=>Rn(i)===i)).filter(i=>e?Ci(i)===e||(t?cc(i)!==i:!1):!0)}const m$=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,i,s,r,a;const{x:l,y:u,rects:f,middlewareData:h,placement:g}=t,{alignment:b=null,allowedPlacements:_=p$,autoAlignment:E=!0,...T}=e;if((n=h.autoPlacement)!=null&&n.skip)return{};const M=h$(b,E,_),P=await Kr(t,T),I=(o=(i=h.autoPlacement)==null?void 0:i.index)!=null?o:0,H=M[I],{main:ie,cross:j}=nh(H,f);if(g!==H)return{x:l,y:u,reset:{placement:M[0]}};const Z=[P[Rn(H)],P[ie],P[j]],ce=[...(s=(r=h.autoPlacement)==null?void 0:r.overflows)!=null?s:[],{placement:H,overflows:Z}],ye=M[I+1];if(ye)return{data:{index:I+1,overflows:ce},reset:{placement:ye}};const Te=ce.slice().sort((O,re)=>O.overflows[0]-re.overflows[0]),be=(a=Te.find(O=>{let{overflows:re}=O;return re.every(J=>J<=0)}))==null?void 0:a.placement;return{data:{skip:!0},reset:{placement:be!=null?be:Te[0].placement}}}}};function g$(e){const t=Gr(e);return[cc(e),t,cc(t)]}const y$=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:a}=t;if((n=s.flip)!=null&&n.skip)return{};const{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",flipAlignment:g=!0,...b}=e,_=Rn(i),T=f||(_===a||!g?[Gr(a)]:g$(a)),M=[a,...T],P=await Kr(t,b),I=[];let H=((o=s.flip)==null?void 0:o.overflows)||[];if(l&&I.push(P[_]),u){const{main:ce,cross:ye}=nh(i,r);I.push(P[ce],P[ye])}if(H=[...H,{placement:i,overflows:I}],!I.every(ce=>ce<=0)){var ie,j;const ce=((ie=(j=s.flip)==null?void 0:j.index)!=null?ie:0)+1,ye=M[ce];if(ye)return{data:{index:ce,overflows:H},reset:{placement:ye}};let Te="bottom";switch(h){case"bestFit":{var Z;const be=(Z=H.slice().sort((O,re)=>O.overflows.filter(J=>J>0).reduce((J,$e)=>J+$e,0)-re.overflows.filter(J=>J>0).reduce((J,$e)=>J+$e,0))[0])==null?void 0:Z.placement;be&&(Te=be);break}case"initialPlacement":Te=a;break}return{data:{skip:!0},reset:{placement:Te}}}return{}}}};function w$(e){let{placement:t,rects:n,value:o}=e;const i=Rn(t),s=["left","top"].includes(i)?-1:1,r=typeof o=="function"?o({...n,placement:t}):o,{mainAxis:a,crossAxis:l}=typeof r=="number"?{mainAxis:r,crossAxis:0}:{mainAxis:0,crossAxis:0,...r};return bs(i)==="x"?{x:l,y:a*s}:{x:a*s,y:l}}const b$=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(t){const{x:n,y:o,placement:i,rects:s}=t,r=w$({placement:i,rects:s,value:e});return{x:n+r.x,y:o+r.y,data:r}}}};function _$(e){return e==="x"?"y":"x"}const v$=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:a={fn:T=>{let{x:M,y:P}=T;return{x:M,y:P}}},...l}=e,u={x:n,y:o},f=await Kr(t,l),h=bs(Rn(i)),g=_$(h);let b=u[h],_=u[g];if(s){const T=h==="y"?"top":"left",M=h==="y"?"bottom":"right",P=b+f[T],I=b-f[M];b=lc(P,b,I)}if(r){const T=g==="y"?"top":"left",M=g==="y"?"bottom":"right",P=_+f[T],I=_-f[M];_=lc(P,_,I)}const E=a.fn({...t,[h]:b,[g]:_});return{...E,data:{x:E.x-n,y:E.y-o}}}}},x$=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n;const{placement:o,rects:i,middlewareData:s}=t,{apply:r,...a}=e;if((n=s.size)!=null&&n.skip)return{};const l=await Kr(t,a),u=Rn(o),f=Ci(o)==="end";let h,g;u==="top"||u==="bottom"?(h=u,g=f?"left":"right"):(g=u,h=f?"top":"bottom");const b=zo(l.left,0),_=zo(l.right,0),E=zo(l.top,0),T=zo(l.bottom,0),M={height:i.floating.height-(["left","right"].includes(o)?2*(E!==0||T!==0?E+T:zo(l.top,l.bottom)):l[h]),width:i.floating.width-(["top","bottom"].includes(o)?2*(b!==0||_!==0?b+_:zo(l.left,l.right)):l[g])};return r==null||r({...M,...i}),{data:{skip:!0},reset:{rects:!0}}}}};function uc(e){return(e==null?void 0:e.toString())==="[object Window]"}function po(e){if(e==null)return window;if(!uc(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Yr(e){return po(e).getComputedStyle(e)}function Nn(e){return uc(e)?"":e?(e.nodeName||"").toLowerCase():""}function Bn(e){return e instanceof po(e).HTMLElement}function Jr(e){return e instanceof po(e).Element}function C$(e){return e instanceof po(e).Node}function oh(e){const t=po(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Qr(e){const{overflow:t,overflowX:n,overflowY:o}=Yr(e);return/auto|scroll|overlay|hidden/.test(t+o+n)}function $$(e){return["table","td","th"].includes(Nn(e))}function ih(e){const t=navigator.userAgent.toLowerCase().includes("firefox"),n=Yr(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 sh=Math.min,_s=Math.max,Xr=Math.round;function $i(e,t){t===void 0&&(t=!1);const n=e.getBoundingClientRect();let o=1,i=1;return t&&Bn(e)&&(o=e.offsetWidth>0&&Xr(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Xr(n.height)/e.offsetHeight||1),{width:n.width/o,height:n.height/i,top:n.top/i,right:n.right/o,bottom:n.bottom/i,left:n.left/o,x:n.left/o,y:n.top/i}}function ho(e){return((C$(e)?e.ownerDocument:e.document)||window.document).documentElement}function Zr(e){return uc(e)?{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}:{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function rh(e){return $i(ho(e)).left+Zr(e).scrollLeft}function E$(e){const t=$i(e);return Xr(t.width)!==e.offsetWidth||Xr(t.height)!==e.offsetHeight}function k$(e,t,n){const o=Bn(t),i=ho(t),s=$i(e,o&&E$(t));let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(o||!o&&n!=="fixed")if((Nn(t)!=="body"||Qr(i))&&(r=Zr(t)),Bn(t)){const l=$i(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}else i&&(a.x=rh(i));return{x:s.left+r.scrollLeft-a.x,y:s.top+r.scrollTop-a.y,width:s.width,height:s.height}}function ea(e){return Nn(e)==="html"?e:e.assignedSlot||e.parentNode||(oh(e)?e.host:null)||ho(e)}function ah(e){return!Bn(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function S$(e){let t=ea(e);for(;Bn(t)&&!["html","body"].includes(Nn(t));){if(ih(t))return t;t=t.parentNode}return null}function dc(e){const t=po(e);let n=ah(e);for(;n&&$$(n)&&getComputedStyle(n).position==="static";)n=ah(n);return n&&(Nn(n)==="html"||Nn(n)==="body"&&getComputedStyle(n).position==="static"&&!ih(n))?t:n||S$(e)||t}function lh(e){return{width:e.offsetWidth,height:e.offsetHeight}}function A$(e){let{rect:t,offsetParent:n,strategy:o}=e;const i=Bn(n),s=ho(n);if(n===s)return t;let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((i||!i&&o!=="fixed")&&((Nn(n)!=="body"||Qr(s))&&(r=Zr(n)),Bn(n))){const l=$i(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 P$(e){const t=po(e),n=ho(e),o=t.visualViewport;let i=n.clientWidth,s=n.clientHeight,r=0,a=0;return o&&(i=o.width,s=o.height,Math.abs(t.innerWidth/o.scale-o.width)<.01&&(r=o.offsetLeft,a=o.offsetTop)),{width:i,height:s,x:r,y:a}}function T$(e){var t;const n=ho(e),o=Zr(e),i=(t=e.ownerDocument)==null?void 0:t.body,s=_s(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),r=_s(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let a=-o.scrollLeft+rh(e);const l=-o.scrollTop;return Yr(i||n).direction==="rtl"&&(a+=_s(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function ch(e){return["html","body","#document"].includes(Nn(e))?e.ownerDocument.body:Bn(e)&&Qr(e)?e:ch(ea(e))}function ta(e,t){var n;t===void 0&&(t=[]);const o=ch(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=po(o),r=i?[s].concat(s.visualViewport||[],Qr(o)?o:[]):o,a=t.concat(r);return i?a:a.concat(ta(ea(r)))}function I$(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&oh(n)){let o=t;do{if(o&&e===o)return!0;o=o.parentNode||o.host}while(o)}return!1}function O$(e){const t=$i(e),n=t.top+e.clientTop,o=t.left+e.clientLeft;return{top:n,left:o,x:o,y:n,right:o+e.clientWidth,bottom:n+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function uh(e,t){return t==="viewport"?ac(P$(e)):Jr(t)?O$(t):ac(T$(ho(e)))}function L$(e){const t=ta(ea(e)),o=["absolute","fixed"].includes(Yr(e).position)&&Bn(e)?dc(e):e;return Jr(o)?t.filter(i=>Jr(i)&&I$(i,o)&&Nn(i)!=="body"):[]}function M$(e){let{element:t,boundary:n,rootBoundary:o}=e;const s=[...n==="clippingParents"?L$(t):[].concat(n),o],r=s[0],a=s.reduce((l,u)=>{const f=uh(t,u);return l.top=_s(f.top,l.top),l.right=sh(f.right,l.right),l.bottom=sh(f.bottom,l.bottom),l.left=_s(f.left,l.left),l},uh(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 D$={getElementRects:e=>{let{reference:t,floating:n,strategy:o}=e;return{reference:k$(t,dc(n),o),floating:{...lh(n),x:0,y:0}}},convertOffsetParentRelativeRectToViewportRelativeRect:e=>A$(e),getOffsetParent:e=>{let{element:t}=e;return dc(t)},isElement:e=>Jr(e),getDocumentElement:e=>{let{element:t}=e;return ho(t)},getClippingClientRect:e=>M$(e),getDimensions:e=>{let{element:t}=e;return lh(t)},getClientRects:e=>{let{element:t}=e;return t.getClientRects()}},R$=(e,t,n)=>a$(e,t,{platform:D$,...n});var N$=Object.defineProperty,B$=Object.defineProperties,F$=Object.getOwnPropertyDescriptors,dh=Object.getOwnPropertySymbols,j$=Object.prototype.hasOwnProperty,U$=Object.prototype.propertyIsEnumerable,fh=(e,t,n)=>t in e?N$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fn=(e,t)=>{for(var n in t||(t={}))j$.call(t,n)&&fh(e,n,t[n]);if(dh)for(var n of dh(t))U$.call(t,n)&&fh(e,n,t[n]);return e},vs=(e,t)=>B$(e,F$(t));function ph(e,t){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(typeof t[n]=="object"&&e[n]?ph(e[n],t[n]):e[n]=t[n])}const jn={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 Ei(e,t){let n=jn.themes[e]||{},o;do o=n[t],typeof o>"u"?n.$extend?n=jn.themes[n.$extend]||{}:(n=null,o=jn[t]):n=null;while(n);return o}function H$(e){const t=[e];let n=jn.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=jn.themes[n.$extend]||{}):n=null;while(n);return t.map(o=>`v-popper--theme-${o}`)}function hh(e){const t=[e];let n=jn.themes[e]||{};do n.$extend?(t.push(n.$extend),n=jn.themes[n.$extend]||{}):n=null;while(n);return t}let Vo=!1;if(typeof window<"u"){Vo=!1;try{const e=Object.defineProperty({},"passive",{get(){Vo=!0}});window.addEventListener("test",null,e)}catch{}}let mh=!1;typeof window<"u"&&typeof navigator<"u"&&(mh=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const gh=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),yh={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart"},wh={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend"};function bh(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}function fc(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const un=[];let Wo=null;const _h={};function vh(e){let t=_h[e];return t||(t=_h[e]=[]),t}let pc=function(){};typeof window<"u"&&(pc=window.Element);function Ge(e){return function(t){return Ei(t.theme,e)}}const hc="__floating-vue__popper";var xh=()=>Ne({name:"VPopper",provide(){return{[hc]:{parentPopper:this}}},inject:{[hc]:{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:Ge("disabled")},positioningDisabled:{type:Boolean,default:Ge("positioningDisabled")},placement:{type:String,default:Ge("placement"),validator:e=>gh.includes(e)},delay:{type:[String,Number,Object],default:Ge("delay")},distance:{type:[Number,String],default:Ge("distance")},skidding:{type:[Number,String],default:Ge("skidding")},triggers:{type:Array,default:Ge("triggers")},showTriggers:{type:[Array,Function],default:Ge("showTriggers")},hideTriggers:{type:[Array,Function],default:Ge("hideTriggers")},popperTriggers:{type:Array,default:Ge("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:Ge("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:Ge("popperHideTriggers")},container:{type:[String,Object,pc,Boolean],default:Ge("container")},boundary:{type:[String,pc],default:Ge("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:Ge("strategy")},autoHide:{type:[Boolean,Function],default:Ge("autoHide")},handleResize:{type:Boolean,default:Ge("handleResize")},instantMove:{type:Boolean,default:Ge("instantMove")},eagerMount:{type:Boolean,default:Ge("eagerMount")},popperClass:{type:[String,Array,Object],default:Ge("popperClass")},computeTransformOrigin:{type:Boolean,default:Ge("computeTransformOrigin")},autoMinSize:{type:Boolean,default:Ge("autoMinSize")},autoSize:{type:[Boolean,String],default:Ge("autoSize")},autoMaxSize:{type:Boolean,default:Ge("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:Ge("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:Ge("preventOverflow")},overflowPadding:{type:[Number,String],default:Ge("overflowPadding")},arrowPadding:{type:[Number,String],default:Ge("arrowPadding")},arrowOverflow:{type:Boolean,default:Ge("arrowOverflow")},flip:{type:Boolean,default:Ge("flip")},shift:{type:Boolean,default:Ge("shift")},shiftCrossAxis:{type:Boolean,default:Ge("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:Ge("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:vs(Fn({},this.classes),{popperClass:this.popperClass}),result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[hc])==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:Fn(Fn({shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())}},["triggers","positioningDisabled"].reduce((e,t)=>(e[t]="$_refreshListeners",e),{})),["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})),created(){this.$_isDisposed=!0,this.randomId=`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var o,i;((o=this.parentPopper)==null?void 0:o.lockedChild)&&this.parentPopper.lockedChild!==this||(this.$_pendingHide=!1,(n||!this.disabled)&&(((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.$_pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e,t;!this.$_isDisposed||(this.$_isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=(t=(e=this.referenceNode)==null?void 0:e.call(this))!=null?t:this.$el,this.$_targetNodes=this.targetNodes().filter(n=>n.nodeType===n.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.$_isDisposed||(this.$_isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"),this.$emit("dispose"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){var e;if(this.$_isDisposed||this.positioningDisabled)return;const t={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&t.middleware.push(b$({mainAxis:this.distance,crossAxis:this.skidding}));const n=this.placement.startsWith("auto");if(n?t.middleware.push(m$({alignment:(e=this.placement.split("-")[1])!=null?e:""})):t.placement=this.placement,this.preventOverflow&&(this.shift&&t.middleware.push(v$({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!n&&this.flip&&t.middleware.push(y$({padding:this.overflowPadding,boundary:this.boundary}))),t.middleware.push(u$({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&t.middleware.push({name:"arrowOverflow",fn:({placement:i,rects:s,middlewareData:r})=>{let a;const{centerOffset:l}=r.arrow;return i.startsWith("top")||i.startsWith("bottom")?a=Math.abs(l)>s.reference.width/2:a=Math.abs(l)>s.reference.height/2,{data:{overflow:a}}}}),this.autoMinSize||this.autoSize){const i=this.autoSize?this.autoSize:this.autoMinSize?"min":null;t.middleware.push({name:"autoSize",fn:({rects:s,placement:r,middlewareData:a})=>{var l;if((l=a.autoSize)!=null&&l.skip)return{};let u,f;return r.startsWith("top")||r.startsWith("bottom")?u=s.reference.width:f=s.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(x$({boundary:this.boundary,padding:this.overflowPadding,apply:({width:i,height:s})=>{this.$_innerNode.style.maxWidth=i!=null?`${i}px`:null,this.$_innerNode.style.maxHeight=s!=null?`${s}px`:null}})));const o=await R$(this.$_referenceNode,this.$_popperNode,t);Object.assign(this.result,{x:o.x,y:o.y,placement:o.placement,strategy:o.strategy,arrow:Fn(Fn({},o.middlewareData.arrow),o.middlewareData.arrowOverflow)})},$_scheduleShow(e=null,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),Wo&&this.instantMove&&Wo.instantMove&&Wo!==this.parentPopper){Wo.$_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&&(Wo=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 fc(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...ta(this.$_referenceNode),...ta(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),n=this.$_popperNode.querySelector(".v-popper__wrapper"),o=n.parentNode.getBoundingClientRect(),i=t.x+t.width/2-(o.left+n.offsetLeft),s=t.y+t.height/2-(o.top+n.offsetTop);this.result.transformOrigin=`${i}px ${s}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let n=0;n<un.length;n++)t=un[n],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}un.push(this),document.body.classList.add("v-popper--some-open");for(const t of hh(this.theme))vh(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 fc(),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,bh(un,this),un.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of hh(this.theme)){const o=vh(n);bh(o,this),o.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}Wo===this&&(Wo=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=Ei(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 fc(),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,yh,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],yh,this.popperTriggers,this.popperShowTriggers,e);const t=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,wh,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],wh,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(o=>o.addEventListener(t,n,Vo?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,o,i){let s=n;o!=null&&(s=typeof o=="function"?o(s):o),s.forEach(r=>{const a=t[r];a&&this.$_registerEventListeners(e,a,i)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(n=>{const{targetNodes:o,eventType:i,handler:s}=n;!e||e===i?o.forEach(r=>r.removeEventListener(i,s)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.$_isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const n of this.$_targetNodes){const o=n.getAttribute(e);o&&(n.removeAttribute(e),n.setAttribute(t,o))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const n in e){const o=e[n];o==null?t.removeAttribute(n):t.setAttribute(n,o)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.$_pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(xs>=e.left&&xs<=e.right&&Cs>=e.top&&Cs<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),n=xs-mo,o=Cs-go,s=t.left+t.width/2-mo+(t.top+t.height/2)-go+t.width+t.height,r=mo+n*s,a=go+o*s;return na(mo,go,r,a,t.left,t.top,t.left,t.bottom)||na(mo,go,r,a,t.left,t.top,t.right,t.top)||na(mo,go,r,a,t.right,t.top,t.right,t.bottom)||na(mo,go,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"&&(mh?(document.addEventListener("touchstart",Ch,Vo?{passive:!0,capture:!0}:!0),document.addEventListener("touchend",z$,Vo?{passive:!0,capture:!0}:!0)):(window.addEventListener("mousedown",Ch,!0),window.addEventListener("click",q$,!0)),window.addEventListener("resize",K$));function Ch(e){for(let t=0;t<un.length;t++){const n=un[t];try{const o=n.popperNode();n.$_mouseDownContains=o.contains(e.target)}catch{}}}function q$(e){$h(e)}function z$(e){$h(e,!0)}function $h(e,t=!1){const n={};for(let o=un.length-1;o>=0;o--){const i=un[o];try{const s=i.$_containsGlobalTarget=V$(i,e);i.$_pendingHide=!1,requestAnimationFrame(()=>{if(i.$_pendingHide=!1,!n[i.randomId]&&Eh(i,s,e)){if(i.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&s){let a=i.parentPopper;for(;a;)n[a.randomId]=!0,a=a.parentPopper;return}let r=i.parentPopper;for(;r&&Eh(r,r.$_containsGlobalTarget,e);){r.$_handleGlobalClose(e,t);r=r.parentPopper}}})}catch{}}}function V$(e,t){const n=e.popperNode();return e.$_mouseDownContains||n.contains(t.target)}function Eh(e,t,n){return n.closeAllPopover||n.closePopover&&t||W$(e,n)&&!t}function W$(e,t){if(typeof e.autoHide=="function"){const n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function K$(e){for(let t=0;t<un.length;t++)un[t].$_computePosition(e)}let mo=0,go=0,xs=0,Cs=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{mo=xs,go=Cs,xs=e.clientX,Cs=e.clientY},Vo?{passive:!0}:void 0);function na(e,t,n,o,i,s,r,a){const l=((r-i)*(t-s)-(a-s)*(e-i))/((a-s)*(n-e)-(r-i)*(o-t)),u=((n-e)*(t-s)-(o-t)*(e-i))/((a-s)*(n-e)-(r-i)*(o-t));return l>=0&&l<=1&&u>=0&&u<=1}var oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n};const G$={extends:xh()};function Y$(e,t,n,o,i,s){return B(),z("div",{ref:"reference",class:Qe(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[ln(e.$slots,"default",d_(up(e.slotData)))],2)}var J$=oa(G$,[["render",Y$]]);function Q$(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var i=e.indexOf("Edge/");return i>0?parseInt(e.substring(i+5,e.indexOf(".",i)),10):-1}let ia;function mc(){mc.init||(mc.init=!0,ia=Q$()!==-1)}var sa={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){mc(),mi(()=>{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",ia&&this.$el.appendChild(e),e.data="about:blank",ia||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&&(!ia&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const X$=Dv();Lv("data-v-b329ee4c");const Z$={class:"resize-observer",tabindex:"-1"};Mv();const eE=X$((e,t,n,o,i,s)=>(B(),Zt("div",Z$)));sa.render=eE,sa.__scopeId="data-v-b329ee4c",sa.__file="src/components/ResizeObserver.vue";var kh=(e="theme")=>({computed:{themeClass(){return H$(this[e])}}});const tE=Ne({name:"VPopperContent",components:{ResizeObserver:sa},mixins:[kh()],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}}}),nE=["id","aria-hidden","tabindex","data-popper-placement"],oE={ref:"inner",class:"v-popper__inner"},iE=[c("div",{class:"v-popper__arrow-outer"},null,-1),c("div",{class:"v-popper__arrow-inner"},null,-1)];function sE(e,t,n,o,i,s){const r=Fo("ResizeObserver");return B(),z("div",{id:e.popperId,ref:"popover",class:Qe(["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:Pn(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]=Ap(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:Pn(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[c("div",oE,[e.mounted?(B(),z(je,{key:0},[c("div",null,[ln(e.$slots,"default")]),e.handleResize?(B(),Zt(r,{key:0,onNotify:t[1]||(t[1]=a=>e.$emit("resize",a))})):qe("",!0)],64)):qe("",!0)],512),c("div",{ref:"arrow",class:"v-popper__arrow-container",style:Pn(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},iE,4)],4)],46,nE)}var Sh=oa(tE,[["render",sE]]),Ah={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 rE=Ne({name:"VPopperWrapper",components:{Popper:J$,PopperContent:Sh},mixins:[Ah,kh("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 aE(e,t,n,o,i,s){const r=Fo("PopperContent"),a=Fo("Popper");return B(),Zt(a,{ref:"popper",theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:Qe([e.themeClass])},{default:Je(({popperId:l,isShown:u,shouldMountContent:f,skipTransition:h,autoHide:g,show:b,hide:_,handleResize:E,onResize:T,classes:M,result:P})=>[ln(e.$slots,"default",{shown:u,show:b,hide:_}),Ee(r,{ref:"popperContent","popper-id":l,theme:e.finalTheme,shown:u,mounted:f,"skip-transition":h,"auto-hide":g,"handle-resize":E,classes:M,result:P,onHide:_,onResize:T},{default:Je(()=>[ln(e.$slots,"popper",{shown:u,hide:_})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},8,["theme","target-nodes","popper-node","class"])}var gc=oa(rE,[["render",aE]]);const lE=Ne(vs(Fn({},gc),{name:"VDropdown",vPopperTheme:"dropdown"})),cE=Ne(vs(Fn({},gc),{name:"VMenu",vPopperTheme:"menu"})),uE=Ne(vs(Fn({},gc),{name:"VTooltip",vPopperTheme:"tooltip"})),dE=Ne({name:"VTooltipDirective",components:{Popper:xh(),PopperContent:Sh},mixins:[Ah],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>Ei(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>Ei(e.theme,"loadingContent")}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,n=this.content(this);n.then?n.then(o=>this.onResult(t,o)):this.onResult(t,n)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),fE=["innerHTML"],pE=["textContent"];function hE(e,t,n,o,i,s){const r=Fo("PopperContent"),a=Fo("Popper");return B(),Zt(a,pp({ref:"popper"},e.$attrs,{theme:e.theme,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:Je(({popperId:l,isShown:u,shouldMountContent:f,skipTransition:h,autoHide:g,hide:b,handleResize:_,onResize:E,classes:T,result:M})=>[Ee(r,{ref:"popperContent",class:Qe({"v-popper--tooltip-loading":e.loading}),"popper-id":l,theme:e.theme,shown:u,mounted:f,"skip-transition":h,"auto-hide":g,"handle-resize":_,classes:T,result:M,onHide:b,onResize:E},{default:Je(()=>[e.html?(B(),z("div",{key:0,innerHTML:e.finalContent},null,8,fE)):(B(),z("div",{key:1,textContent:ge(e.finalContent)},null,8,pE))]),_: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 mE=oa(dE,[["render",hE]]);const Ph="v-popper--has-tooltip";function gE(e,t){let n=e.placement;if(!n&&t)for(const o of gh)t[o]&&(n=o);return n||(n=Ei(e.theme||"tooltip","placement")),n}function Th(e,t,n){let o;const i=typeof t;return i==="string"?o={content:t}:t&&i==="object"?o=t:o={content:!1},o.placement=gE(o,n),o.targetNodes=()=>[e],o.referenceNode=()=>e,o}let yc,$s,yE=0;function wE(){if(yc)return;$s=de([]),yc=xn({name:"VTooltipDirectiveApp",setup(){return{directives:$s}},render(){return this.directives.map(t=>V1(mE,vs(Fn({},t.options),{shown:t.shown||t.options.shown,key:t.id})))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),yc.mount(e)}function bE(e,t,n){wE();const o=de(Th(e,t,n)),i=de(!1),s={id:yE++,options:o,shown:i};return $s.value.push(s),e.classList&&e.classList.add(Ph),e.$_popper={options:o,item:s,show(){i.value=!0},hide(){i.value=!1}}}function Ih(e){if(e.$_popper){const t=$s.value.indexOf(e.$_popper.item);t!==-1&&$s.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(Ph)}function Oh(e,{value:t,modifiers:n}){const o=Th(e,t,n);if(!o.content||Ei(o.theme||"tooltip","disabled"))Ih(e);else{let i;e.$_popper?(i=e.$_popper,i.options.value=o):i=bE(e,t,n),typeof t.shown<"u"&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?i.show():i.hide())}}var _E={beforeMount:Oh,updated:Oh,beforeUnmount(e){Ih(e)}};function Lh(e){e.addEventListener("click",Dh),e.addEventListener("touchstart",Rh,Vo?{passive:!0}:!1)}function Mh(e){e.removeEventListener("click",Dh),e.removeEventListener("touchstart",Rh),e.removeEventListener("touchend",Nh),e.removeEventListener("touchcancel",Bh)}function Dh(e){const t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function Rh(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",Nh),t.addEventListener("touchcancel",Bh)}}function Nh(e){const t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){const n=e.changedTouches[0],o=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-o.screenY)<20&&Math.abs(n.screenX-o.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function Bh(e){const t=e.currentTarget;t.$_vclosepopover_touch=!1}var vE={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>"u"||t)&&Lh(e)},updated(e,{value:t,oldValue:n,modifiers:o}){e.$_closePopoverModifiers=o,t!==n&&(typeof t>"u"||t?Lh(e):Mh(e))},beforeUnmount(e){Mh(e)}};function xE(e,t={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,ph(jn,t),e.directive("tooltip",_E),e.directive("close-popper",vE),e.component("VTooltip",uE),e.component("VDropdown",lE),e.component("VMenu",cE))}const ra={version:"2.0.0-beta.20",install:xE,options:jn},pR="";async function CE(){const e=await fo(),{host:t,search:n}=location;t==="115.com"&&$E(e),!(t!=="115.com"||!n.includes("offline=1&tab=offline"))&&(await EE(),await kE(),Rx())}async function $E(e){const t=on();if(!e.noGotoTaskPage||window!==window.top||t.Core.OFFL5Plug)return;async function n(o){t.Core&&o(!0)}try{await Vn(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(o){throw new Error(`[disableGotoTaskPage] wait Core failed:${o.message}`)}}async function EE(){console.log("[Cloud115 Enhancer] Injecting offline exporter...");const e="cloud115OfflineExporter",t=await fo();document.body.classList.add("cloud115-page-offline"),t.enableListManagement&&document.body.classList.add("ce-list-m"),$("body").append(`<div id="${e}"/>`);const n=xn(gC);n.use(ra),n.mount(`#${e}`)}async function kE(){console.log("[Cloud115 Enhancer] Injecting offline searcher...");const e="cloud115OfflineSearcher",t=await fo();document.body.classList.add("cloud115-page-offline"),t.enableSearcher&&document.body.classList.add("ce-list-s"),$("body").append(`<div id="${e}"/>`);const n=xn(r$);n.use(ra),n.mount(`#${e}`)}var Lt=(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))(Lt||{});const SE={class:"cloud115-eh-cleaner-trigger"},AE=[c("span",null,"清理文件",-1)],PE=Ne({__name:"Trigger",setup(e){de(!1);const t=de(!0);async function n(a){switch(a.data.type){case Lt.INVOKE_FILTER:await Pb(a.data.payload);break;case Lt.CLEANER_OPENED:await r(a.data.payload);break}}Pt(async()=>{console.log("[CleanerTrigger onMounted]"),window.addEventListener("message",n)}),No(()=>{console.log("[CleanerTrigger onUnmounted]"),window.removeEventListener("message",n)});async function o(){await s(),vo({type:Lt.OPEN_CLEANER},window.parent)}let i=0;async function s(){const a=nu("cid");!a||a==="0"||(clearTimeout(i),i=window.setTimeout(async()=>{ae({icon:"error",text:"打开清理工具失败!"})},1e3))}async function r(a){console.log("成功打开Cleaner"),clearTimeout(i)}return(a,l)=>X((B(),z("span",SE,[ln(a.$slots,"default",{},()=>[c("span",{class:"btn-open pure-button pure-button-primary",onClick:o,title:"打开清理文件工具"},AE)])],512)),[[Ot,t.value]])}}),mR="";var Ve=(e=>(e[e.suffix=0]="suffix",e[e.keyword=1]="keyword",e))(Ve||{}),vt=(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))(vt||{}),gt=(e=>(e.none="",e.prepare="查询文件...",e.prepared="查询文件完成",e.prepareFailed="查询失败",e.deleting="删除文件中...",e.success="清理完成",e.failed="清理失败",e))(gt||{});$t.all,at.all,$t.video,at.video,$t.audio,at.audio,$t.image,at.image,$t.doc,at.doc,$t.app,at.app,$t.archive,at.archive;const TE=new Map([[at.all,$t.all],[at.video,$t.video],[at.audio,$t.audio],[at.image,$t.image],[at.doc,$t.doc],[at.app,$t.app],[at.archive,$t.archive]]),aa="#",Fh="#",IE=[{type:Ve.suffix,queryOnly:!1,label:"默认",memo:"请谨慎使用!",size:5,values:["txt","url","html","htm","mht"]},{type:Ve.suffix,queryOnly:!0,label:"🔍115筛选",memo:"仅用于查询",size:102400,values:["#视频","#音频","#图片","#文档","#应用","#压缩包"]}],OE=["#論壇文宣","#宣傳文本","最新地址","最新网址","论坛地址","永久地址","地址发布","扫码 安装","扫码 下载","免費 掃碼","澳门 赌场","皇冠 赌场","免费18禁手游","免费黄游手游","在线影城","秀场 小视频","裸秀 主播 免费看","第一会所 宣传","SIS 影视联盟",'"最 新 位 址 獲 取"','"社 區 最 新 情 報"','"聚 合 全 網 H 直 播"'],LE=["#論壇文宣","美女 裸聊","秀场 视频","澳门 赌场","皇冠 赌场","影视 联盟","2048 社区","1024 社区","会所 宣传","扫码 安装","社区 关注","免費 掃碼","找回家","防屏蔽","封殺00","秀场 小视频","裸秀 主播 免费看",'"Free Adult Movie"',"奔驰宝马","最新网址","最新免費","免费试用","美女荷官","凤凰娛樂","观看指南","女神在线","更多无水印","免费在线","国产精品","免費原版","獨家資源","成人光碟","最新AV","FDZone","发布器","QR-1024","在這等你","激情祼聊","看妹不用等","真人祼聊","zz.jpg","X8B9.COM.gif","第一会所 宣传","SIS 影视联盟","淘精網","激情咖啡","手機影城","免费手机看片","U視娛樂","加微信","我愛看片手機版","平台正式上線"],ME=[{type:Ve.keyword,queryOnly:!1,label:"默认",memo:"请谨慎使用!",size:100,values:OE},{type:Ve.keyword,queryOnly:!1,label:"⚠️大杀器⚠️",memo:"请谨慎使用!",size:100,values:LE},{type:Ve.keyword,queryOnly:!0,label:"只查询示例",memo:"这是一个示例",size:10240,values:["奔驰宝马","美女荷官",'"最 新 位 址 獲 取"']}];function Ko(e){return{id:Date.now().toString(),type:e,queryOnly:!1,label:"",values:"",memo:"",size:0,sort:0,createdAt:0,updatedAt:0}}function jh(e,t){e=e.trim();const n=t===Ve.keyword&&DE(e),o=t===Ve.suffix&&RE(e);let i=e;return n&&(i=NE(e)),o&&(i=BE(e).toString()),{type:t,value:e,forDir:n,isFilter:o,pattern:i,num:-1,fileIds:[],size:-1,status:gt.none}}function Uh(e){return[gt.prepare,gt.deleting].includes(e.status)}function DE(e){return new RegExp(`^${aa}[\\S]{2,}`).test(e)}function RE(e){return new RegExp(`^${Fh}[\\S]{2,}`).test(e)}function NE(e){const t=new RegExp(`^${aa}`);return e.replace(t,"")}function BE(e){const t=new RegExp(`^${Fh}`);let n=e.replace(t,"");const o=TE.get(n);if(!o)throw new Error(`"${e}"不是有效的筛选!`);return o}async function Go(e,t){let n;typeof e=="string"?n=e.split(/[\r\n]+/):n=e;const o=new Set;for(let s=0;s<n.length;s++){const r=n[s].trim();r.length>1&&o.add(r)}const i=[];return o.forEach(s=>{i.push(jh(s,t))}),i}function Hh(e){return/(^'.+'$)|(^".+"$)/.test(e)}function wc(e){return Hh(e)?e.replace(/^['"]|['"]$/g,""):e}function FE(e,t){if(e===""||t==="")return!1;if(e=e.toLowerCase(),Hh(t))return e.includes(wc(t).toLowerCase());const n=t.split(/\s+/);for(let o=0;o<n.length;o++)if(!e.includes(n[o].toLowerCase()))return!1;return!0}async function qh(e,t,n){const o=jh(e.value,e.type);o.num=0,o.size=0,o.fileIds=[];const i=new Set;let s=0;n.maxSize&&(s=n.maxSize*1024*1024);for(let r=0;r<t.length;r++){const a=!!t[r].fid,l=a?t[r].fid:t[r].cid;if(!l||e.type===Ve.keyword&&(a&&e.forDir||!a&&!e.forDir))continue;const u=parseFloat(t[r].s);s&&a&&u>s||e.type===Ve.keyword&&!FE(t[r].n,e.pattern)||i.has(l)||(i.add(l),o.size+=u)}return o.fileIds=Array.from(i),o.num=o.fileIds.length,o}const jE={class:"group-manager"},UE={key:0,class:"label-readonly",title:"当前分组只可用于查询"},HE=["title"],qE=c("small",null,"分组:",-1),zE={class:"pure-form pure-form-stacked group-form"},VE=c("label",{for:"groupLabel"},"标题",-1),WE=c("label",{for:"groupMemo"},"备注",-1),KE={for:"groupValues"},GE={key:0,class:"text-info"},YE={key:1,class:"text-info"},JE=["onClick"],QE=c("small",{class:"text-primary"},"(点击添加)",-1),XE=c("label",{for:"groupMemo"},[ee(" 文件大小 "),c("span",{class:"text-info"},[ee("只清理小于该大小的文件,单位"),c("b",null,"MB")])],-1),ZE={class:"groups-list"},ek={key:0,class:"text-danger"},tk=c("span",{class:"text-info"},"或",-1),nk=c("br",null,null,-1),ok=c("br",null,null,-1),ik={class:"pure-table pure-table-bordered"},sk=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"},[ee("大小"),c("small",null,"MB")]),c("th",{width:"220"},"操作")])],-1),rk={align:"center"},ak=["onClick"],lk=c("button",{type:"button",class:"pure-button button-xsmall text-danger"},"删除",-1),ck={class:"group-confirm-delete"},uk=["onClick"],dk=["onClick"],zh=Ne({__name:"GroupManager",props:{type:null,storageKey:null,config:null},emits:["change"],setup(e,{emit:t}){const n=e,o=de(Ko(n.type)),i=de([]),s=de(!1),r=de(Ko(n.type)),a=de(null),l=de(!1),u=de(null),f=[at.video,at.audio,at.image,at.doc,at.app,at.archive];pt(i,async be=>{console.log("[groups change]",be),xo(n.storageKey,be,!1),be.length||(s.value=!1,l.value=!1)},{deep:!0});let h=!1;Pt(async()=>{if(console.log("[GroupManager onMounted]"),!h){h=!0,i.value=Ls(n.storageKey,[]),console.log("[groups]",i.value);const{suffixGroup:be,keywordGroup:O}=n.config;if(i.value.length){const re=i.value.find(J=>J.id===(n.type===Ve.suffix?be:O));console.log("[group last choosen]",re),o.value=re||i.value[0],t("change",o.value)}else n.type===Ve.suffix&&!be&&(await j(),xo("cleanerConfig",{suffixGroup:o.value.id},!0)),n.type===Ve.keyword&&!O&&(await j(),xo("cleanerConfig",{keywordGroup:o.value.id},!0))}}),No(async()=>{console.log("[GroupManager onUnmounted]")});async function g(be){const O=`#${be}`;r.value.values.includes(O)||(r.value.values+=(`
`+O).trim()+`
`)}async function b(){s.value=!0,l.value=!1}async function _(){s.value=!1}async function E(){a.value.show()}async function T(){a.value.hide()}async function M(){l.value=!1}async function P(){l.value=!0,s.value=!1}async function I(){u.value.show()}async function H(){u.value.hide()}async function ie(){r.value.createdAt&&(r.value=Ko(n.type)),r.value.size=5,n.type===Ve.keyword&&(r.value.size=100),await E()}async function j(){let be=[];n.type===Ve.suffix?be=IE:be=ME;for(let O=0;O<be.length;O++){const re={...Ko(be[O].type),...be[O]};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 H()}i.value.length&&await Te(i.value[0])}async function Z(be,O=!1){if(!O){const{isConfirmed:J}=await me.fire({html:`确定删除"${o.value.label}"?`,icon:"question"});if(!J)return}let re=-1;for(let J=0;J<i.value.length;J++)if(i.value[J].id===o.value.id){re=J;break}i.value.splice(re,1),i.value.length?o.value=i.value[0]:o.value=Ko(n.type),t("change",o.value),await ae({icon:"success",title:"删除成功!",timer:1500})}async function ce(be){r.value=be,await E()}async function ye(){let be=[];try{be=await Go(r.value.values,r.value.type)}catch(D){await me.fire({icon:"error",text:D.message});return}if(r.value.label=r.value.label.trim(),r.value.memo=r.value.memo.trim(),r.value.label===""){await ae({icon:"warning",text:"请输入标题!"});return}let O=-1;for(let D=0;D<i.value.length;D++)if(i.value[D].id===r.value.id&&r.value.id){O=D;break}const re=Mi();r.value.updatedAt=re,r.value.createdAt||(r.value.createdAt=re);let J=[];for(let D=0;D<be.length;D++)J.push(be[D].value);r.value.values=J.join(`
`).trim(),console.log("[saveGroup]",r.value,O),O===-1?(i.value.push(r.value),ae({icon:"success",text:"添加成功"})):(i.value[O]=r.value,ae({icon:"success",text:"更新成功"}));const $e=!o.value.createdAt;$e&&(o.value=r.value),(r.value.id===o.value.id||$e)&&t("change",r.value),await T()}async function Te(be){o.value=be;const{id:O}=o.value;n.type===Ve.suffix&&(n.config.suffixGroup=O,xo("cleanerConfig",{suffixGroup:O},!0)),n.type===Ve.keyword&&(n.config.keywordGroup=O,xo("cleanerConfig",{keywordGroup:O},!0)),t("change",be)}return(be,O)=>{const re=Fo("VDropdown");return B(),z("div",jE,[o.value.queryOnly?(B(),z("span",UE," 只查询 ")):qe("",!0),o.value.createdAt?(B(),z("a",{key:1,class:"group-label",href:"javascript:void(0)",title:`当前使用的分组: ${o.value.label}`,onClick:O[0]||(O[0]=J=>ce(o.value))},[c("span",null,[qE,ee(" "+ge(o.value.label),1)])],8,HE)):qe("",!0),Ee(re,{ref_key:"form",ref:a,onHide:_,onShow:b,distance:5,"arrow-padding":100},{popper:Je(()=>[c("form",zE,[c("fieldset",null,[c("div",null,[VE,X(c("input",{type:"text","onUpdate:modelValue":O[1]||(O[1]=J=>r.value.label=J),id:"groupLabel",class:"pure-input-1-2",placeholder:"分组标题"},null,512),[[Ke,r.value.label]]),ee("    "),r.value.queryOnly?(B(),z("button",{key:0,type:"button",class:"pure-button button-small button-warning",onClick:O[2]||(O[2]=J=>r.value.queryOnly=!1)},"已设置为仅用于查询 | 点击取消设置")):qe("",!0),r.value.queryOnly?qe("",!0):(B(),z("button",{key:1,type:"button",class:"pure-button button-small pure-button-primary",onClick:O[3]||(O[3]=J=>r.value.queryOnly=!0)},"设置为仅用于查询"))]),c("div",null,[WE,X(c("input",{type:"text","onUpdate:modelValue":O[4]||(O[4]=J=>r.value.memo=J),id:"groupMemo",placeholder:"分组备注"},null,512),[[Ke,r.value.memo]])]),c("div",null,[c("label",KE,[ee(" 特征列表 "),n.type===fe(Ve).keyword?(B(),z("span",GE,[ee(" 默认只匹配文件名。前面带"),c("b",null,ge(fe(aa)),1),ee("则只匹配目录名。 ")])):qe("",!0),n.type===fe(Ve).suffix?(B(),z("span",YE,[ee(" 支持115自带筛选: "),(B(),z(je,null,st(f,(J,$e)=>c("span",{class:"filter-label text-success",key:$e,onClick:D=>g(J)}," #"+ge(J),9,JE)),64)),QE])):qe("",!0)]),X(c("textarea",{id:"groupValues","onUpdate:modelValue":O[5]||(O[5]=J=>r.value.values=J),rows:"5",placeholder:"每行一个"},null,512),[[Ke,r.value.values]])]),c("div",null,[XE,X(c("input",{type:"number","onUpdate:modelValue":O[6]||(O[6]=J=>r.value.size=J),class:"pure-input-1-2",placeholder:"文件大小小于该数值才清理"},null,512),[[Ke,r.value.size]])]),c("button",{type:"button",class:"pure-button pure-button-primary",onClick:ye},ge(r.value.createdAt?"更新":"添加"),1),ee("      "),c("button",{type:"button",class:"pure-button",onClick:T},"取消")])])]),default:Je(()=>[c("a",{href:"javascript:void(0)",class:"text-primary",onClick:ie},"新增分组")]),_:1},512),Ee(re,{ref_key:"list",ref:u,onHide:M,onShow:P,distance:5},{popper:Je(()=>[c("div",ZE,[i.value.length?qe("",!0):(B(),z("h3",ek,[ee(" 还没有添加任何分组。你可以: "),c("button",{type:"button",class:"pure-button button-small",onClick:ie},"添加"),ee("   "),tk,ee("   "),c("button",{type:"button",class:"pure-button button-small",onClick:j},"使用脚本内置"),nk,ok])),c("table",ik,[sk,c("tbody",null,[(B(!0),z(je,null,st(i.value,(J,$e)=>(B(),z("tr",{key:$e},[c("td",null,ge($e+1),1),c("td",rk,ge(J.queryOnly?"是":"否"),1),c("td",null,ge(J.label),1),c("td",null,ge(J.memo),1),c("td",null,ge(J.size),1),c("td",null,[c("button",{type:"button",class:"pure-button button-xsmall text-primary",onClick:D=>Te(J)},"载入",8,ak),ee("   "),Ee(re,null,{popper:Je(()=>[c("div",ck,[c("button",{type:"button",class:"pure-button button-error",onClick:D=>Z(J,!0)},"确定",8,uk)])]),default:Je(()=>[lk]),_:2},1024),ee("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:D=>ce(J)},"编辑",8,dk)])]))),128))])])])]),default:Je(()=>[c("a",{href:"javascript:void(0)",class:"text-primary",onClick:I},"分组列表")]),_:1},512)])}}}),gR="",fk={class:"cloud115-eh-cleaner"},pk=[c("span",null,"清理文件",-1)],hk={key:0,class:"cloud115-eh-cleaner-help"},mk=[fp('<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)],gk={class:"header actions-bar"},yk=c("span",{class:"title"},"文件清理工具",-1),wk={type:"button",class:"pure-button button-success"},bk=c("i",{class:"file-type tp-folder",style:{}},null,-1),_k=["disabled"],vk=["disabled"],xk=c("small",null,"毫秒",-1),Ck=["disabled"],$k=c("br",null,null,-1),Ek={class:"by-box by-suffix"},kk={class:"by-header"},Sk=c("span",{class:"title"},[ee("按"),c("b",null,"后缀名"),ee("清理")],-1),Ak={class:"pure-button-group",role:"group"},Pk=["disabled"],Tk={class:"pure-table pure-table-bordered"},Ik=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),Ok=["onClick"],Lk=["onClick"],Mk=["onClick"],Dk=c("br",null,null,-1),Rk={class:"by-box by-keyword"},Nk={class:"by-header"},Bk=c("span",{class:"title"},[ee("按"),c("b",null,"关键词"),ee("清理")],-1),Fk={class:"pure-button-group",role:"group"},jk=["disabled"],Uk={class:"pure-table pure-table-bordered"},Hk=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),qk=["href"],zk={class:"file-type tp-folder"},Vk=["onClick"],Wk=["onClick"],Kk=c("br",null,null,-1),Gk={class:"footer actions-bar"},Yk=c("span",{class:"title"},"文件清理工具",-1),Jk={type:"button",class:"pure-button button-success"},Qk=c("i",{class:"file-type tp-folder",style:{}},null,-1),Xk=Ne({__name:"Cleaner",setup(e){const t=de(!1),n=de(!0),o=de(Ko(Ve.suffix)),i=de(Ko(Ve.keyword)),s=de({maxSize:5,matchName:!1}),r=de({maxSize:100,matchName:!0}),a=de([]),l=de([]),u=de(!1),f=de({initialized:!1,pageSize:1150,reqInterval:800,deleteSize:1150,...Ls("cleanerConfig",{})}),h=de(!0),g=de(""),b=de([]);async function _(D){D.data.type===Lt.OPEN_CLEANER&&(await E(D.data.payload),vo({type:Lt.CLEANER_OPENED},D.source))}Pt(async()=>{console.log("[Cleaner onMounted]"),f.value.initialized||(f.value.initialized=!0,xo("cleanerConfig",f.value,!1)),window.addEventListener("message",_)}),No(()=>{console.log("[Cleaner onUnmounted]"),window.removeEventListener("message",_)});async function E(D){t.value=!0;const K=await Wt();if(K==="0"||K===""){await T(),await me.fire({icon:"warning",html:"<h2>不允许在根目录使用该工具!</h2>"});return}g.value&&g.value!==K&&(console.warn("目录变化,重置"),await H(vt.reset),await ie(vt.reset)),b.value=await $d(),g.value=K}async function T(){t.value=!1}async function M(){xo("cleanerConfig",f.value,!1),ae({icon:"success",text:"保存成功",timer:1800}),h.value=!0}async function P(D){const K={};D.isFilter?K.type=D.pattern:K.suffix=D.pattern;let N=unsafeWindow.frames[0];for(let we=0;we<unsafeWindow.frames.length;we++)if(unsafeWindow.frames[we].name==="wangpan"){N=unsafeWindow.frames[we];break}vo({type:Lt.INVOKE_FILTER,payload:K},N),await T(),ae({icon:"info",text:`已调用115筛选: ${D.value}`,timer:2500})}async function I(D,K){const{value:N}=await me.fire({input:"textarea",title:D,html:"每行一个,最短两个字符。"+(K===Ve.keyword?`<br>默认只匹配文件名,不匹配目录名。<br>使用 "<b>${aa}目录名关键词</b>" 格式指定只匹配目录名的关键词。`:""),width:620,inputPlaceholder:"每行一个,最短两个字符",inputAttributes:{"aria-label":"每行一个,最短两个字符"},showCancelButton:!0});return N!==void 0?N.trim():""}async function H(D,K){let N="",we=[];switch(D){case vt.assign:N=K.trim(),N.trim()===""?a.value=[]:(we=await Go(N,Ve.suffix),a.value=we);break;case vt.append:N=await I("添加后缀",Ve.suffix),we=await Go(N,Ve.suffix);const Ae=[];a.value.forEach(De=>Ae.push(De.value.toLowerCase())),we.forEach(De=>{Ae.includes(De.value.toLowerCase())||a.value.push(De)});break;case vt.cover:N=await I("覆盖后缀",Ve.suffix),N.trim()!==""&&(we=await Go(N,Ve.suffix),a.value=we);break;case vt.clear:a.value=[];break;case vt.reset:a.value.forEach(De=>{De.num=-1,De.fileIds=[],De.status=gt.none,De.size=-1});break}}async function ie(D,K){let N="",we=[];switch(D){case vt.assign:N=K.trim(),N.trim()===""?l.value=[]:(we=await Go(N,Ve.keyword),l.value=we);break;case vt.append:N=await I("添加关键词",Ve.keyword),we=await Go(N,Ve.keyword);const Ae=[];l.value.forEach(De=>Ae.push(De.value.toLowerCase())),we.forEach(De=>{Ae.includes(De.value.toLowerCase())||l.value.push(De)});break;case vt.cover:N=await I("覆盖关键词",Ve.keyword),N.trim()!==""&&(we=await Go(N,Ve.keyword),l.value=we);break;case vt.clear:l.value=[];break;case vt.reset:l.value.forEach(De=>{De.num=-1,De.fileIds=[],De.status=gt.none,De.size=-1});break}}async function j(D){if(console.log("[cleanBySuffix]",D),await H(vt.reset),!a.value.length){await me.fire({icon:"warning",text:"请先设置后缀!"});return}if(!D){const{isConfirmed:K}=await me.fire({icon:"warning",html:'请在清理前确认"后缀和大小限制的设置"是否符合预期!',confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!K)return}u.value=!0;try{for(let K=0;K<a.value.length;K++){const N=a.value[K];await Z(N,D,!1,!0),await wt(f.value.reqInterval)}}catch(K){console.error(K)}u.value=!1}async function Z(D,K,N,we){if(console.log("[cleanBySuffixSingle]",D,K),!K&&!we){const{isConfirmed:Ae}=await me.fire({icon:"warning",html:`确认执行条件 "后缀: <b class="text-primary">${D.pattern}</b>, 小于: <b>${s.value.maxSize}</b> MB" 的清理?`,confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!Ae)return}try{if(!N){u.value=!0,D.fileIds=[],D.size=-1,D.num=-1,D.status=gt.prepare;const Ae=await Te(D);D.status=gt.prepared;const{fileIds:De,size:pe}=await qh(D,Ae,s.value);D.fileIds=De,D.size=pe,D.num=De.length,u.value=!1}if(!K)if(D.num>0){D.status=gt.deleting,u.value=!0;const Ae=await bd(g.value,D.fileIds,f.value.deleteSize,1e3);u.value=!1,Ae>0?D.status=gt.success+` / 数量 <= ${Ae}`:D.status=gt.failed}else D.status=gt.success+" / 无"}catch(Ae){console.error(Ae),u.value=!1,await me.fire({title:"cleanBySuffixSingle - 发生错误",html:Ae.toString()})}}async function ce(D){if(console.log("[cleanByKeyword]",D),await ie(vt.reset),!l.value.length){await me.fire({icon:"warning",text:"请先设置关键词!"});return}if(!D){const{isConfirmed:K}=await me.fire({icon:"warning",html:'请在清理前确认"关键词和大小限制的设置"是否符合预期!',confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!K)return}u.value=!0;try{for(let K=0;K<l.value.length;K++){const N=l.value[K];await ye(N,D,!1,!0),await wt(f.value.reqInterval)}}catch(K){console.error(K)}u.value=!1}async function ye(D,K,N,we){if(console.log("[cleanByKeywordSingle]",D,K),!K&&!we){const{isConfirmed:Ae}=await me.fire({icon:"warning",html:`确认执行条件 "关键词: <b class="text-primary">${D.pattern}</b>, 小于: <b class="text-primary">${r.value.maxSize}</b> MB" 的清理?`,confirmButtonText:"没问题,开始清理",showDenyButton:!0,denyButtonText:"等会"});if(!Ae)return}try{if(!N){u.value=!0,D.fileIds=[],D.size=-1,D.num=-1,D.status=gt.prepare;const Ae=await be(D);D.status=gt.prepared;const{fileIds:De,size:pe,num:ue}=await qh(D,Ae,r.value);D.fileIds=De,D.size=pe,D.num=ue,u.value=!1}if(!K)if(D.num>0){D.status=gt.deleting,u.value=!0;const Ae=await bd(g.value,D.fileIds,f.value.deleteSize,1e3);u.value=!1,Ae>0?D.status=gt.success+` / 数量 <= ${Ae}`:D.status=gt.failed,D.num>9e3&&(console.warn("[cleanByKeywordSingle] 补充处理..."),await ye(D,K,!1,!0))}else D.status=gt.success+" / 无"}catch(Ae){console.error(Ae),u.value=!1;let De=!0;const pe={title:"cleanByKeywordSingle - 发生错误",html:Ae.toString()};Ae instanceof Ba&&(D.status=gt.prepareFailed+` / ${Ae.message}`,Ae instanceof qu&&(pe.timer=2e3,De=!1)),De?await me.fire(pe):me.fire(pe)}}async function Te(D){const K=await Wt(),N=Wn({cid:K,limit:f.value.pageSize});D.isFilter?N.type=D.pattern:N.suffix=D.value;const we=await si(N,f.value.reqInterval);return console.log("[files]",we),we}async function be(D){const K=await Wt(),N=wg({search_value:wc(D.pattern),cid:K,limit:f.value.pageSize}),we=await ob(N,f.value.reqInterval,!0);return console.log("[files]",we),we}function O(D){return Xa({search_value:wc(D.pattern),cid:g.value},b.value[b.value.length-1])}async function re(D){console.log("[onSuffixGroupChange]",D),o.value=D,s.value.maxSize=D.size,await H(vt.assign,D.values)}async function J(D){console.log("[onKeywordGroupChange]",D),i.value=D,r.value.maxSize=D.size,await ie(vt.assign,D.values)}async function $e(){document.querySelector(".cloud115-eh-cleaner-drawer").scrollTo(0,0)}return(D,K)=>X((B(),z("span",fk,[ln(D.$slots,"default",{},()=>[c("span",{class:"btn-open pure-button pure-button-primary",onClick:E},pk)]),t.value?(B(),z("div",hk,mk)):qe("",!0),X(c("div",{class:Qe(["cloud115-eh-cleaner-drawer",{loading:u.value}])},[c("div",gk,[yk,c("span",{class:"close"},[c("button",{type:"button",class:"pure-button button-error",onClick:T},"关闭")]),c("button",wk,[c("b",null,[bk,ee(" "+ge(b.value.join(" / ")),1)])])]),c("div",null,[ee(" 请求分页: "),X(c("input",{type:"number","onUpdate:modelValue":K[0]||(K[0]=N=>f.value.pageSize=N),min:30,max:1150,disabled:h.value},null,8,_k),[[Ke,f.value.pageSize]]),ee(" 请求间隔: "),X(c("input",{type:"number","onUpdate:modelValue":K[1]||(K[1]=N=>f.value.reqInterval=N),min:200,max:1e6,disabled:h.value},null,8,vk),[[Ke,f.value.reqInterval]]),xk,ee(" 每次删除: "),X(c("input",{type:"number","onUpdate:modelValue":K[2]||(K[2]=N=>f.value.deleteSize=N),min:1,max:1150,disabled:h.value},null,8,Ck),[[Ke,f.value.deleteSize]]),c("span",{class:"config-toggle",onClick:K[3]||(K[3]=N=>h.value=!h.value)},"设置参数"),h.value?qe("",!0):(B(),z("button",{key:0,type:"button",class:"pure-button pure-button-primary button-small",onClick:M}," 保存配置 "))]),$k,c("div",Ek,[c("div",kk,[Sk,ee("      "),c("div",Ak,[c("button",{type:"button",class:"pure-button",onClick:K[4]||(K[4]=N=>j(!0))},"只查询"),c("button",{type:"button",class:"pure-button pure-button-primary",onClick:K[5]||(K[5]=N=>j(!1)),disabled:o.value.queryOnly}," 一键清理 ",8,Pk)]),ee(" 小于 "),X(c("input",{type:"number","onUpdate:modelValue":K[6]||(K[6]=N=>s.value.maxSize=N),class:"filter-size"},null,512),[[Ke,s.value.maxSize]]),ee(" MB (0表示不限制) "),Ee(zh,{type:fe(Ve).suffix,"storage-key":"suffixGroups",onChange:re,config:f.value},null,8,["type","config"])]),c("table",Tk,[Ik,c("tbody",null,[(B(!0),z(je,null,st(a.value,(N,we)=>(B(),z("tr",{key:we,class:Qe({active:fe(Uh)(N),"is-filter":N.isFilter})},[c("td",null,ge(we+1),1),c("td",null,[c("a",{href:"javascript:void(0)",class:"pattern",onClick:Ae=>P(N),title:"筛选"},ge(N.value),9,Ok)]),c("td",null,ge(N.num>=0?N.num:""),1),c("td",null,ge(N.size>0?fe(Ds)(N.size):""),1),c("td",null,[c("button",{type:"button",class:"pure-button button-xsmall",onClick:Ae=>Z(N,!0,!1,!0)},"查询",8,Lk),ee("   "),N.num>0&&!o.value.queryOnly?(B(),z("button",{key:0,type:"button",class:"pure-button button-warning button-xsmall",onClick:Ae=>Z(N,!1,!0,!1)},"清理",8,Mk)):qe("",!0)]),c("td",null,ge(N.status),1)],2))),128))])])]),Dk,c("div",Rk,[c("div",Nk,[Bk,ee("      "),c("div",Fk,[c("button",{type:"button",class:"pure-button",onClick:K[7]||(K[7]=N=>ce(!0))},"只查询"),c("button",{type:"button",class:"pure-button pure-button-primary",onClick:K[8]||(K[8]=N=>ce(!1)),disabled:i.value.queryOnly}," 一键清理 ",8,jk)]),ee(" 小于 "),X(c("input",{type:"number","onUpdate:modelValue":K[9]||(K[9]=N=>r.value.maxSize=N),class:"filter-size"},null,512),[[Ke,r.value.maxSize]]),ee(" MB (0表示不限制) "),Ee(zh,{type:fe(Ve).keyword,"storage-key":"keywordGroups",onChange:J,config:f.value},null,8,["type","config"])]),c("table",Uk,[Hk,c("tbody",null,[(B(!0),z(je,null,st(l.value,(N,we)=>(B(),z("tr",{key:we,class:Qe({active:fe(Uh)(N),"is-dir":N.forDir})},[c("td",null,ge(we+1),1),c("td",null,[c("a",{href:O(N),target:"_blank",class:"pattern",title:"搜索"},[X(c("i",zk,null,512),[[Ot,N.forDir]]),ee(" "+ge(N.pattern),1)],8,qk)]),c("td",null,ge(N.num>=0?N.num:""),1),c("td",null,ge(N.size>0?fe(Ds)(N.size):""),1),c("td",null,[c("button",{type:"button",class:"pure-button button-xsmall",onClick:Ae=>ye(N,!0,!1,!0)},"查询",8,Vk),ee("   "),N.num>0&&!i.value.queryOnly?(B(),z("button",{key:0,type:"button",class:"pure-button button-warning button-xsmall",onClick:Ae=>ye(N,!1,!0,!1)}," 清理 ",8,Wk)):qe("",!0)]),c("td",null,ge(N.status),1)],2))),128))])])]),Kk,c("div",Gk,[Yk,c("span",{class:"close"},[c("button",{type:"button",class:"pure-button button-error",onClick:T},"关闭")]),c("button",Jk,[c("b",null,[Qk,ee(" "+ge(b.value.join(" / ")),1)])]),ee("     "),c("button",{type:"button",class:"pure-button button-small",onClick:$e}," 回到顶部 ")])],2),[[Ot,t.value]])],512)),[[Ot,n.value]])}}),bR="",Zk={class:"ce-empty-cleaner-trigger"},eS=[c("span",null,"空文件夹",-1)],tS=Ne({__name:"Trigger",setup(e){de(!1);const t=de(!0);async function n(a){switch(a.data.type){case Lt.EMPTY_CLEANER_OPENED:await r(a.data.payload);break}}Pt(async()=>{console.log("[EmptyCleanerTrigger onMounted]"),window.addEventListener("message",n)}),No(()=>{console.log("[EmptyCleanerTrigger onUnmounted]"),window.removeEventListener("message",n)});async function o(){await s(),vo({type:Lt.OPEN_EMPTY_CLEANER},window.parent)}let i=0;async function s(){const a=nu("cid");!a||a==="0"||(clearTimeout(i),i=window.setTimeout(async()=>{ae({icon:"error",text:"打开清理空文件夹工具失败!"})},1e3))}async function r(a){console.log("成功打开EmptyCleaner"),clearTimeout(i)}return(a,l)=>X((B(),z("span",Zk,[ln(a.$slots,"default",{},()=>[c("span",{class:"btn-open pure-button pure-button-primary",onClick:o,title:"打开清理空文件夹工具"},eS)])],512)),[[Ot,t.value]])}}),vR="",nS=/^(?:\| )+\|-/;async function*oS(e){const t=["/"],n=e.trim().split(`
`);let o=0;for(const i of n){const s=nS.exec(i);if(s===null)continue;const a=s[0].length,l=a/2-1,u=i.slice(a);l>=t.length?t.push(u):t[l]=u,o+=1;const f=t.slice(0,l+1).join("/");yield{index:o,name:u,path:Qc(f,!0)}}}function Vh(e={}){return{name:"",path:"",id:"",url:"",checked:!1,deleted:!1,disabled:!1,repeated:!1,ensured:!1,...e}}function bc(){return{suffixes:new Set,nameCounter:{},nameToPaths:{},repeatedPaths:new Set,maybeDirs:{}}}class iS{constructor(t,n=!1){_e(this,"logs",[]);_e(this,"_dirId","");_e(this,"_dirPath","");_e(this,"_dirAttr",null);_e(this,"_treeText","");_e(this,"_keepTree",!1);_e(this,"_treeFile",null);_e(this,"_tailData",bc());_e(this,"_emptyItems",new Map);_e(this,"logSubscribers",[]);_e(this,"emptyItemSubscribers",[]);_e(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 kt(t);const n=[...this._dirAttr.paths.slice(1).map(o=>o.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 o;if(!await this.isReady()){this.log(`运行异常!未获取到目录路径,目录ID=${this._dirId}`);return}if(((o=this._dirAttr)==null?void 0:o.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 lb(this._dirId);console.log("exportTree",n),this.log("已发起导出处理,等待导出完成...");const o=await cb(n.data.export_id);console.log("exportTree",o),this.log(`导出目录树成功,PickCode为${o.data.pick_code}`);const i=await rb(o.data.pick_code);console.log("downloadItem",i),this.log("正在读取目录树文件内容...");const r=await(await fetch(i.url.url,{credentials:"include",headers:{Cookie:i.cookie}})).blob();if(this._treeText=await r.text(),this.log("目录树文件内容读取完成"),this._keepTree)this.onTreeFileGenerated(i),this.log(`目录树文件保留,不会被删除。文件: ${i.file_name}`);else{const l=await Ka(this._dirId,[i.file_id]);console.log("deleteResult",l),this.log("目录树文件已删除")}const a=((Date.now()-t)/1e3).toFixed(2);this.log(`导出目录树完成,耗时 ${a} 秒`),this.log("=".repeat(60))}async parseTree(){const t=Date.now();this.log("解析目录树...");const n=bc(),o=[],i=this._dirPath.split("/").slice(0,-1).join("/");console.log("[parseTree] parentPath:",i);for await(const r of oS(this._treeText)){const a=i+r.path;o.includes(a)&&n.repeatedPaths.add(a),o.push(a)}for(let r=0;r<o.length;r++){if(o[r+1]&&o[r+1].startsWith(o[r]+"/"))continue;let a=o[r].split("/").pop();if(!a)a=o[r];else{const l=_b(a,/^\w+$/);if(l)n.suffixes.add(l.toLowerCase());else{const u=o[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(o[r]),n.nameCounter[a]||(n.nameCounter[a]=0),n.nameCounter[a]+=1}console.log("[parseTree] result:",n);const s=((Date.now()-t)/1e3).toFixed(2);this.log(`解析目录树完成,耗时 ${s} 秒`),this.log("=".repeat(60)),this._tailData=n}async queryFiles(){const t=Date.now(),n=this._tailData,o=n.suffixes.size;this.log(`根据后缀(数量: ${o})获取文件列表...`);let i=0;for(const r of n.suffixes){const a=Wn({suffix:r,limit:1150,cid:this._dirId});try{const l=Date.now();this.log(`[${i+1} / ${o}] 正在获取后缀"${r}"的文件列表...`);const u=await si(a),f=((Date.now()-l)/1e3).toFixed(2);this.log(`[${i+1} / ${o}] 获取后缀"${r}"的文件列表成功,文件数量:${u.length}。耗时 ${f} 秒`);for(const h of u)n.nameCounter[h.n]&&n.nameCounter[h.n]--}catch(l){console.error(`[queryFiles] getFiles error! suffix: ${r}, error:`,l),this.log(`[${i+1} / ${o}] 获取后缀"${r}"的文件列表失败!错误: ${l.toString()}`)}i++}const s=((Date.now()-t)/1e3).toFixed(2);this.log(`根据后缀获取文件列表完成。耗时 ${s} 秒`),this.log("=".repeat(60))}async handleMaybeDirs(){const t=Date.now(),n=this._tailData;this.log("========根据上级路径排除无后缀文件========");const o=Object.keys(n.maybeDirs).length;let i=0;for(const[r,a]of Object.entries(n.maybeDirs)){const l=await ai(r),u=Wn({limit:1150,cid:l});try{const f=Date.now();this.log(`[${i+1} / ${o}] 正在获取上级路径 "${r}" 的文件列表...`);const h=await si(u),g=((Date.now()-f)/1e3).toFixed(2);this.log(`[${i+1} / ${o}] 获取上级路径 "${r}" 的文件列表成功,文件数量:${h.length}。耗时 ${g} 秒`);for(const b of h)a.has(b.n)&&b.fid&&(this.log(`[${i+1} / ${o}] 上级路径 "${r}" 下的 "${b.n}" 是一个文件`),n.nameCounter[b.n]&&n.nameCounter[b.n]--)}catch(f){console.error(`[handleMaybeDirs] getFiles error! cid: ${l}, error:`,f),this.log(`[${i+1} / ${o}] 获取上级路径(cid=${l}) "${r}" 的文件列表失败!错误: ${f.toString()}`)}i++}const s=((Date.now()-t)/1e3).toFixed(2);this.log(`根据上级路径排除无后缀文件完成。耗时 ${s} 秒`),this.log("=".repeat(60))}async detectEmpty(){const t=Date.now(),n=this._tailData;this.log("========开始检测路径========");let o=0,i=Object.keys(n.nameCounter).length;for(const[r,a]of Object.entries(n.nameCounter)){if(!a){o++;continue}const l=n.nameToPaths[r];this.log(`[${o+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(`[${o+1} / ${i}] 正在检测名称 "${r}" 第 ${u+1}/${a} 个路径: ${f}`);try{const h=await ai(f,!1);if(h){this.log(`检测到该末端路径 "${f}" 是一个空目录(ID: ${h})`);const g=Vh({id:h,name:r,path:f,url:Vi(h),ensured:!1});await this.addEmptyItem(g)}}catch(h){h instanceof Fa?this.log(`路径 "${f}" 不是一个目录`):(console.error(`[detectEmpty] getDirIdByPath failed! path: ${f}, error:`,h),this.log(`获取路径 "${f}" 的ID失败!错误: ${h.toString()}`))}}o++}const s=((Date.now()-t)/1e3).toFixed(2);this.log(`检测路径完成,耗时 ${s} 秒`),this.log("=".repeat(60))}async checkDirContainsRepeated(t){const n=Ya(t,"..",Yn.unix),o=t.split("/").pop();console.log("[checkDirContainsRepeated] parentPath:",n);let i="";try{if(i=await ai(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 s=Wn({limit:1150,cid:i});try{const r=Date.now();this.log(`正在获取目录(id=${i})的文件列表...`);const a=await si(s),l=((Date.now()-r)/1e3).toFixed(2);this.log(`获取目录(id=${i})的文件列表成功,文件数量:${a.length}。耗时 ${l} 秒`);for(const u of a)if(!(u.fid||u.n!==o))try{const f=await kt(u.cid);if(f.file_name)if(f.folder_count===0&&f.count===0){this.log(`目录(id=${i})的子目录(id=${u.cid})为空`);const h=Vh({id:u.cid,name:f.file_name,path:f.paths.map(g=>g.file_name).slice(1).join("/"),url:Vi(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 o of this._emptyItems.values())if(!o.ensured)try{const i=await kt(o.id);o.ensured=!0,o.attr=i,i.count===0&&i.folder_count===0?this.log(`目录(id=${o.id}) "${o.path}" 确认为空`):(o.disabled=!0,o.memo="目录不为空,请手动检查和处理",this.log(`目录(id=${o.id}) "${o.path}" 确认不为空,请手动检查和处理`))}catch(i){console.error(`[checkRealEmpty] getAttr error! cid: ${o.id}, error:`,i),this.log(`获取目录(id=${o.id}) "${o.path}" 属性失败!异常: ${i.toString()}`),o.disabled=!0,o.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=bc(),this._treeFile=null}}const xR="",sS=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},rS={},aS={class:"ce-empty-cleaner-help"},lS=[fp('<div data-v-414bf5e0><h2 data-v-414bf5e0>免责声明</h2><div data-v-414bf5e0><p data-v-414bf5e0>该工具仅作为学习测试用途,使用该工具造成的任何结果由使用人承担。</p></div><hr data-v-414bf5e0><h2 data-v-414bf5e0>说明</h2><ul style="color:#00f;" data-v-414bf5e0><li class="text-danger text-bold" data-v-414bf5e0> * <span style="font-size:120%;" data-v-414bf5e0>不要</span>直接清理一个巨大的文件夹!比如包含超过5万个文件夹。 太大的文件夹可能会导出目录树失败,且可能导致账号被系统风控。 </li><li data-v-414bf5e0>* 对于巨大的文件夹,可以分开清理下级文件夹。</li><li data-v-414bf5e0>* 只有违规文件的文件夹也会被检测到并列出,需要手动处理。</li><li data-v-414bf5e0>* 请谨慎操作!请谨慎操作!请谨慎操作!</li></ul><hr data-v-414bf5e0><h2 data-v-414bf5e0>流程</h2><ul style="color:#f40;" data-v-414bf5e0><li data-v-414bf5e0>1.确认当前显示的目录是否为需要进行清理的目录。</li><li data-v-414bf5e0>2.点击「检测空文件夹」按钮。</li><li data-v-414bf5e0>3.保持当前页面处于激活状态,留意日志区域的输出,耐心等待。</li><li data-v-414bf5e0>4.当看到「空文件夹检测已完成」的提示时,说明检测完成。</li><li data-v-414bf5e0>5.如果有空文件夹,会在空文件夹列表显示。</li><li data-v-414bf5e0>6.每个空文件夹都可以单独进行打开、获取详情、删除等操作。</li><li data-v-414bf5e0>7.批量删除: 勾选需要删除的空文件夹,点击「删除选中」进行删除。</li></ul><hr data-v-414bf5e0><h3 data-v-414bf5e0>原理和优劣</h3><div class="text-primary" data-v-414bf5e0> 本工具原理是导出目录树,然后根据后缀名查询文件,接着排除目录树中的文件,最后再判断目录树中剩余的项是否为空文件夹。 </div><ul data-v-414bf5e0><li class="text-bold text-success" data-v-414bf5e0>优点:</li><li class="text-success" data-v-414bf5e0>在子文件夹数量较多时,比逐层逐个查询文件列表要快得多。</li><li class="text-warning text-bold" data-v-414bf5e0>缺点:</li><li class="text-warning" data-v-414bf5e0>* 后缀名数量较多时,查询文件数据耗时较长。</li><li class="text-warning" data-v-414bf5e0>* 排除真实文件后,如剩余需判断项较多,耗时较长。</li><li class="text-warning" data-v-414bf5e0>* 不能判断大小为0且有空子文件夹的文件夹。</li></ul></div>',1)];function cS(e,t){return B(),z("div",aS,lS)}const uS=sS(rS,[["render",cS],["__scopeId","data-v-414bf5e0"]]),dS={class:"ce-empty-cleaner"},fS=[c("span",null,"清理空文件夹",-1)],pS={key:0},hS={class:"header actions-bar"},mS=c("span",{class:"title"},"空文件夹清理工具",-1),gS={class:"ce-path ce-label ce-label-primary-plain"},yS=["href"],wS=c("i",{class:"file-type tp-folder",style:{}},null,-1),bS={class:"top-actions"},_S={class:"pure-form pure-form-aligned"},vS={class:"pure-control-group"},xS={key:0},CS=c("span",null,"文件夹数量:",-1),$S={class:"text-primary"},ES={key:1},kS=c("span",null,"文件数量:",-1),SS={class:"text-primary"},AS=c("span",{title:"不会删除目录树文件"},"保留目录树文件",-1),PS={key:0},TS=["href"],IS={key:0},OS={key:0},LS={class:"text-primary"},MS={class:"ec-items"},DS={class:"pure-table pure-table-bordered"},RS=c("th",{width:"25"},"#",-1),NS={width:"30"},BS=["disabled"],FS=c("th",{width:"140"},"ID",-1),jS=c("th",null,"路径",-1),US=c("th",{width:"150"},"操作",-1),HS=["onUpdate:modelValue","onChange","disabled"],qS={key:0},zS={class:"ce-label ce-label-danger"},VS={key:0},WS=[c("span",{class:"label-danger"},"已删除",-1)],KS={key:1},GS=["onClick","disabled"],YS=["onClick"],JS=["href"],QS={key:0},XS=c("br",null,null,-1),ZS={class:"footer actions-bar"},e2=c("span",{class:"title"},"空文件夹清理工具",-1),t2={class:"ce-path ce-label ce-label-primary-plain"},n2=["href"],o2=c("i",{class:"file-type tp-folder",style:{}},null,-1),i2=Ne({__name:"EmptyCleaner",setup(e){const t=de(!1),n=de(!0),o=de(!1),i=de(""),s=de([]),r=de(null),a=de([]),l=de(!1),u=de(null),f=de([]),h=de([]),g=de(null),b=de(null),_=vn(()=>b.value?Ab(b.value.pick_code):""),E=vn(()=>i.value?Vi(i.value):"");let T;const M=de({keepTree:!1});async function P(pe){pe.data.type===Lt.OPEN_EMPTY_CLEANER&&(await I(pe.data.payload),vo({type:Lt.EMPTY_CLEANER_OPENED},pe.source))}Pt(async()=>{console.log("[EmptyCleaner onMounted]"),window.addEventListener("message",P),T=new iS(i.value),T.addLogSubscriber($e),T.addEmptyItemSubscriber(D),T.addTreeFileSubscriber(J)}),No(()=>{console.log("[EmptyCleaner onUnmounted]"),window.removeEventListener("message",P)});async function I(pe){t.value=!0;const ue=await Wt();if(ue==="0"||ue===""){await Ae(),await me.fire({icon:"warning",html:"<h2>不允许在根目录使用该工具!</h2>"});return}i.value&&i.value!==ue&&console.warn("目录变化,重置"),r.value=await kt(ue),s.value=[...r.value.paths.slice(1).map(He=>He.file_name),r.value.file_name],i.value=ue}async function H(){l.value=!1,f.value=[],h.value=[],a.value=[],b.value=null}async function ie(){try{o.value=!0,await H(),await T.reset(),await T.setKeepTree(M.value.keepTree),await T.setDirId(i.value),await T.run(),me.fire({title:"空文件夹检测已完成"})}catch(pe){console.error(pe),me.fire({title:"空文件夹检测失败",text:pe.toString()})}finally{o.value=!1}}async function j(pe){const ue=h.value.join(`
`);if(pe==="copy")await xd(ue)?ae({text:"已复制清理空文件夹日志",timer:1200}):ae({text:"复制清理空文件夹日志失败",timer:1200});else if(pe==="download"){let He=`清理空文件夹日志-${i.value}.txt`;Di(ue,He)}}async function Z(pe,ue,He="path"){const ot=ue==="all"?a.value:f.value;let Me="";He==="path"?Me=ot.map(it=>it.path).join(`
`):He==="full"&&(Me=JSON.stringify(ot,null,2));const et=He==="path"?"路径":"数据";if(pe==="copy")await xd(Me)?ae({text:`已复制${et}到剪贴板`,timer:1200}):ae({text:`复制${et}失败`,timer:1200});else if(pe==="download"){let it=`空文件夹${et}-${i.value}-数量${ot.length}`;Di(Me,`${it}.${He==="path"?"txt":"json"}`)}}async function ce(pe){const ue=pe==="all"?a.value:f.value;for(const He of ue)window.open(He.url),await wt(100)}async function ye(){unsafeWindow.parent.Core.FileSelectDG.Open(async(pe,ue)=>{console.log("[Core.FileSelectDG.Open]",pe,ue);const He=pe[pe.length-1];await H(),i.value=He.cid,r.value=await kt(He.cid),s.value=[...r.value.paths.slice(1).map(ot=>ot.file_name),r.value.file_name]},{select:1,nf:1,show_record:0,show_copy:1,btn_txt:"选择该目录",select_txt:"清理空文件夹"})}async function Te(pe,ue){if(pe.deleted){ae({text:"该目录已删除,不能再次删除!",timer:2e3,showConfirmButton:!0});return}o.value=!0,await O([pe.id])&&(pe.deleted=!0),o.value=!1}async function be(){if(!f.value.length)return;const pe=f.value.filter(ue=>!ue.deleted).map(ue=>ue.id);if(!pe.length){ae({text:"没有可删除的目录!",timer:2e3,showConfirmButton:!0});return}if(o.value=!0,await O(pe))for(const ue of f.value)ue.deleted=!0;o.value=!1}async function O(pe){try{const ue=await Ka(i.value,pe);if(ue.state)return!0;ae({text:`删除失败: ${ue.errno} - ${ue.error}`,timer:1200})}catch(ue){console.error(ue),ae({text:`删除失败!${ue.toString()}`,timer:1200})}return!1}async function re(pe){o.value=!0;try{const ue=await kt(pe.id),He=Me=>new Date(Number(Me)*1e3).toLocaleString(),{isConfirmed:ot}=await me.fire({title:"目录属性",html:`<div class="ce-ec-detail">
        <p><span>类型:</span> 文件夹</p>
        <p><span>大小:</span> ${ue.size}</p>
        <p><span>创建时间:</span> ${He(ue.ptime)}</p>
        <p><span>修改时间:</span> ${He(ue.utime)}</p>
        <p><span>位置:</span> ${pe.path}</p>
      </div>
      `,showDenyButton:!0,denyButtonText:"关闭",showConfirmButton:!0,confirmButtonText:"查看目录"});ot&&window.open(pe.url)}catch(ue){ae({text:`获取目录属性失败!${ue.toString()}`,timer:1e4,showConfirmButton:!0})}finally{o.value=!1}}async function J(pe){b.value=pe}async function $e(pe){h.value.push(pe),await mi(),g.value.scrollTop=g.value.scrollHeight}async function D(pe){a.value.push(pe)}async function K(){console.log("[onAllCheckedChange]",l.value);for(const pe of a.value)pe.disabled||(pe.checked=l.value);await we()}async function N(pe,ue){console.log("[onCheckChange]",pe,ue),l.value=a.value.every(He=>He.checked),u.value.indeterminate=!l.value&&a.value.some(He=>He.checked),await we()}async function we(){f.value=a.value.filter(pe=>pe.checked)}async function Ae(){t.value=!1}async function De(){document.querySelector(".ce-empty-cleaner-drawer").scrollTo(0,0)}return(pe,ue)=>{var He,ot;return X((B(),z("span",dS,[ln(pe.$slots,"default",{},()=>[c("span",{class:"btn-open pure-button pure-button-primary",onClick:I},fS)]),t.value?(B(),z("div",pS,[Ee(uS)])):qe("",!0),X(c("div",{class:Qe(["ce-empty-cleaner-drawer",{loading:o.value}])},[c("div",hS,[mS,c("span",{class:"close"},[c("button",{type:"button",class:"pure-button button-error",onClick:Ae},"关闭")]),c("div",gS,[c("a",{target:"_blank",href:fe(E),title:"打开目录"},[wS,ee(" "+ge(s.value.join(" / ")),1)],8,yS)])]),c("div",null,[c("div",bS,[c("div",null,[c("button",{type:"button",class:"pure-button pure-button-primary",onClick:ie},"检测空文件夹"),ee("     "),c("button",{type:"button",class:"pure-button button-success",onClick:ye},"切换目录")]),c("div",null,[c("form",_S,[c("fieldset",null,[c("div",vS,[r.value?(B(),z("label",xS,[CS,ee("  "),c("b",$S,ge((He=r.value)==null?void 0:He.folder_count),1)])):qe("",!0),r.value?(B(),z("label",ES,[kS,ee("  "),c("b",SS,ge((ot=r.value)==null?void 0:ot.count),1)])):qe("",!0),c("label",null,[X(c("input",{type:"checkbox",class:"ce-checkbox","onUpdate:modelValue":ue[0]||(ue[0]=Me=>M.value.keepTree=Me)},null,512),[[Se,M.value.keepTree]]),ee("  "),AS,b.value?(B(),z("span",PS,[ee("    "),c("a",{href:fe(_),class:"text-primary",target:"_blank"},"查看目录树文件",8,TS)])):qe("",!0)])])])])])]),c("h3",null,[ee(" 日志 "),h.value.length?(B(),z("span",IS,[ee("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:ue[1]||(ue[1]=Me=>j("copy"))},"复制日志"),ee("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:ue[2]||(ue[2]=Me=>j("download"))},"保存日志")])):qe("",!0)]),c("div",{ref_key:"refLogs",ref:g,class:"ec-logs"},[(B(!0),z(je,null,st(h.value,(Me,et)=>(B(),z("div",{key:et},ge(Me),1))),128))],512),c("h3",null,[ee(" 空文件夹 "),a.value.length?(B(),z("span",OS,[c("span",LS," ( "+ge(a.value.length)+" )",1),ee("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:ue[3]||(ue[3]=Me=>Z("copy","all","path"))},"复制路径"),ee("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:ue[4]||(ue[4]=Me=>Z("copy","all","full"))},"复制数据"),ee("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:ue[5]||(ue[5]=Me=>Z("download","all","path"))},"保存路径"),ee("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:ue[6]||(ue[6]=Me=>Z("download","all","full"))},"保存数据")])):qe("",!0)]),c("div",MS,[c("table",DS,[c("thead",null,[c("tr",null,[RS,c("th",NS,[X(c("input",{ref_key:"refAllChecked",ref:u,type:"checkbox",class:"ce-checkbox","onUpdate:modelValue":ue[7]||(ue[7]=Me=>l.value=Me),onChange:K,disabled:!a.value.length},null,40,BS),[[Se,l.value]])]),FS,jS,US])]),c("tbody",null,[(B(!0),z(je,null,st(a.value,(Me,et)=>(B(),z("tr",{key:et,class:Qe({"tr-deleted":Me.deleted})},[c("td",null,ge(et+1),1),c("td",null,[X(c("input",{type:"checkbox",class:"ce-checkbox","onUpdate:modelValue":it=>Me.checked=it,onChange:it=>N(Me,et),disabled:Me.disabled},null,40,HS),[[Se,Me.checked]])]),c("td",null,ge(Me.id),1),c("td",null,[c("div",null,ge(Me.path),1),Me.memo?(B(),z("div",qS,[c("span",zS,ge(Me.memo),1)])):qe("",!0)]),c("td",null,[Me.deleted?(B(),z("div",VS,WS)):(B(),z("div",KS,[c("button",{type:"button",class:"pure-button button-xsmall button-error",onClick:it=>Te(Me),disabled:Me.disabled},"删除",8,GS),ee("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:it=>re(Me)},"详情",8,YS),ee("   "),c("a",{class:"pure-button button-xsmall",href:Me.url,target:"_blank"},"打开",8,JS)]))])],2))),128))])]),f.value.length?(B(),z("div",QS,[XS,c("button",{type:"button",class:"pure-button button-error",onClick:be},"删除选中 ("+ge(f.value.length)+")",1),ee("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:ue[8]||(ue[8]=Me=>Z("copy","checked","path"))},"复制已选路径"),ee("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:ue[9]||(ue[9]=Me=>Z("copy","checked","full"))},"复制已选数据"),ee("     "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:ue[10]||(ue[10]=Me=>Z("download","checked","path"))},"保存已选路径"),ee("   "),c("button",{type:"button",class:"pure-button button-xsmall",onClick:ue[11]||(ue[11]=Me=>Z("download","checked","full"))},"保存已选数据"),ee("     "),c("button",{type:"button",class:"pure-button button-success button-xsmall",onClick:ue[12]||(ue[12]=Me=>ce("checked"))},"打开已选")])):qe("",!0)])]),c("div",ZS,[e2,c("span",{class:"close"},[c("button",{type:"button",class:"pure-button button-error",onClick:Ae},"关闭")]),ee("     "),c("button",{type:"button",class:"pure-button button-small",onClick:De}," 回到顶部 "),c("div",t2,[c("a",{target:"_blank",href:fe(E),title:"打开目录"},[o2,ee(" "+ge(s.value.join(" / ")),1)],8,n2)])])],2),[[Ot,t.value]])],512)),[[Ot,n.value]])}}}),kR="",SR="";async function s2(){const{host:e,search:t}=location;e==="115.com"&&(console.log("[Cleaner] running..."),t.includes("ct=file")?(await r2(),await a2()):(await l2(),await c2()))}async function la(){return typeof window.$<"u"}async function r2(){await la()||console.log("[Cleaner injectTrigger] JQuery not found");const e="cloud115Cleaner",t=await En("#js_path_add_dir"),n=document.createElement("span");n.id=e,t.insertAdjacentElement("afterend",n),xn(PE).mount(`#${e}`)}async function a2(){await la()||console.log("[Cleaner injectEmptyTrigger] JQuery not found");const e="cloud115EmptyCleaner",t=await En("#js_path_add_dir"),n=document.createElement("span");n.id=e,t.insertAdjacentElement("afterend",n),xn(tS).mount(`#${e}`)}async function l2(){await la()||console.log("[Cleaner injectUI] JQuery not found");const e="cloud115Cleaner",t=document.createElement("div");t.id=e,document.body.appendChild(t);const n=xn(Xk);n.use(ra),n.mount(`#${e}`),Os("清理文件",async()=>{vo({type:Lt.OPEN_CLEANER},window.parent)})}async function c2(){await la()||console.log("[Cleaner injectEmptyUI] JQuery not found");const e="cloud115EmptyCleaner",t=document.createElement("div");t.id=e,document.body.appendChild(t);const n=xn(i2);n.use(ra),n.mount(`#${e}`),Os("清理空目录",async()=>{vo({type:Lt.OPEN_EMPTY_CLEANER},window.parent)})}const Wh="basic_config",_c={name:"115不大助手",version:"0.6.14",author:{name:"生瓜太保",email:"[email protected]"},greasyforkUrl:"http://greasyfork.icu/zh-CN/scripts/474231-115%E4%B8%8D%E5%A4%A7%E5%8A%A9%E6%89%8B-full?locale_override=1"};function u2(e){return{showOfflineEntry:!1,offlineEntryLabel:"云下载",showAddOffline:!1,addOfflineLabel:"添加",transferDefaultOffline:!1,showFavEntry:!1,favEntryLabel:"星标",hideWatermark:!0,fakeAccountEnabled:!1,fakeAccountId:"",fakeAccountName:"",fakeAccountAvatar:"",fakeAccountVip:"",...e}}async function vc(){const e=u2(),t=await tt.get(Wh,e);return{...e,...t}}async function d2(e){await tt.set(Wh,e)}async function f2(e){if(!e.showOfflineEntry)return;const{search:t}=location;if(!t.includes("ct=file"))return;console.log("[Cloud115 Enhancer] showOfflineEntry");const n=await zn("a#js_filter_btn"),o="https://115.com/?ct=index&ac=offline_new_tpl&offline=1&tab=offline",i="background:#fffcea;",s=`点击跳转到「云下载」页面。该按钮由 ${_c.name} 注入`,r=e.offlineEntryLabel?`<span>${e.offlineEntryLabel}</span>`:"",a=$(`<a href="javascript:;" class="button btn-line" title="${s}" tab_btn="wangpan" mode-tab="offline" style="${i}">
    <i class="icon-operate ifo-linktask"></i>
    ${r}
  </a>`);n.after(a),a.on("click",()=>{try{on().oofUtil.urlMaintain.changeMode("wangpan",{tab:"offline"})}catch(l){console.log('[Cloud115 Enhancer] showOfflineEntry failed with "top.oofUtil.urlMaintain.changeMode".',l),location.href=o}})}async function p2(e){if(!e.showAddOffline)return;const{search:t}=location;if(!t.includes("ct=file"))return;console.log("[Cloud115 Enhancer] showAddOffline");const n=await zn("a#js_filter_btn"),o="background:#fffcea;",i=`点击打开到「添加云下载」对话框。该按钮由 ${_c.name} 注入`,s=e.addOfflineLabel?`<span>${e.addOfflineLabel}</span>`:"",r=$(`<a href="javascript:;" class="button btn-line" menu="offline_task" style="${o}" title="${i}">
    <i class="icon-operate ifo-linktask"></i>${s}
  </a>`);n.after(r)}async function h2(e){if(!e.showFavEntry)return;const{search:t}=location;if(!t.includes("ct=file"))return;console.log("[Cloud115 Enhancer] showFavEntry");const n=await zn("a#js_filter_btn"),o="https://115.com/?tab=label&show_label=1&label_id=-1&mode=wangpan",i="background:#fffcea;",s=`点击跳转到「星标」页面。该按钮由 ${_c.name} 注入`,r=e.favEntryLabel?`<span>${e.favEntryLabel}</span>`:"",a=$(`<a href="javascript:;" class="button btn-line" title="${s}" tab_btn="wangpan" mode-tab="{tab:'label',label_id:-1,show_label:1}" style="${i}">
    <i class="icon-operate ifo-fav"></i>
    ${r}
  </a>`);n.after(a),a.on("click",()=>{try{on().oofUtil.urlMaintain.changeMode("wangpan",{tab:"label",label_id:-1,show_label:1})}catch(l){console.log('[Cloud115 Enhancer] showFavEntry failed with "top.oofUtil.urlMaintain.changeMode".',l),location.href=o}})}async function m2(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 zn('#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 g2(e){if(!!e.hideWatermark){console.log("[Cloud115 Enhancer] hideWatermark");try{const t=await En('div[class^="fp-"]');t.classList.add("hidden-watermark"),t.style.display="none"}catch(t){console.error("[Cloud115 Enhancer] hideWatermark",t.message)}}}async function y2(e){window.top===window.self&&(await wt(1e3),xc(e),window.addEventListener("message",async t=>{const n=t.data.event,o=t.data.body;n===lt.basicConfigChange&&(console.log("[Cloud115 Enhancer] basicConfigChange"),xc(o))}))}let Es=null;async function w2(){Es&&clearTimeout(Es),Es=setTimeout(async()=>{const e=await vc();xc(e)},5e3)}async function xc(e){Es&&clearTimeout(Es);const t=async(n,o)=>{const i=await zn('[rel="user_id"]',100);i.data("origin")||i.data("origin",i.text()),o?i.text(i.data("origin")):i.text(n.fakeAccountId);const s=await zn('[rel="user_name"]',100);s.data("origin")||s.data("origin",$(s[0]).text()),o?s.text(s.data("origin")):s.text(n.fakeAccountName);const r=await zn('img[rel="user_face"], .user-avatar img',100);r.data("origin")||r.data("origin",r.attr("src")),o?r.attr("src",r.data("origin")):(r.attr("rel","noreferrer"),r.attr("src",n.fakeAccountAvatar));const a=await zn(".sign-vip-card",100);a.data("origin")||a.data("origin",$(a[0]).text()),o?a.text(a.data("origin")):a.text(n.fakeAccountVip)};try{e.fakeAccountEnabled?await t(e,!1):await t(e,!0)}catch(n){console.error(n)}finally{e.fakeAccountEnabled&&w2()}}async function b2(){const e=await vc(),{host:t,search:n}=location;!/115\.com$/.test(t)||(g2(e),f2(e),p2(e),h2(e),m2(e),y2(e))}const Kh=Symbol("addTab"),Gh=Symbol("updateTab"),Yh=Symbol("deleteTab"),Jh=Symbol("tabsProvider");function ca(e,t){const n=us(e,t);if(typeof n>"u")throw new Error(`Could not resolve ${e.description}`);return n}const _2=["data-tab-id","aria-hidden"],dn=Ne({__name:"Tab",props:{panelClass:{type:[String,Object,Array],default:"tabs-component-panel"},id:{type:String,default:null},name:{type:String,required:!0},prefix:{type:String,default:""},suffix:{type:String,default:""},isDisabled:{type:Boolean,default:!1},navItemClass:{type:[String,Object,Array],required:!1,default:null},navItemLinkClass:{type:[String,Object,Array],required:!1,default:null}},setup(e,{expose:t}){const n=e,o=de(!1),i=ca(Jh),s=ca(Kh),r=ca(Gh),a=ca(Yh),l=n.prefix+n.name+n.suffix,u=n.id?n.id:n.name.toLowerCase().replace(/ /g,"-"),f=u+"-pane",h=vn(()=>"#"+(n.isDisabled?"":u));return pt(()=>i.activeTabHash,()=>{o.value=h.value===i.activeTabHash}),pt(()=>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})}),At(()=>{s({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})}),jf(()=>{a(u)}),t({header:l,computedId:u,paneId:f,hash:h,isActive:o}),(g,b)=>X((B(),z("section",{ref:"tab",id:f,"data-tab-id":fe(u),"aria-hidden":!o.value,class:Qe(e.panelClass),role:"tabpanel",tabindex:"-1"},[ln(g.$slots,"default")],10,_2)),[[Ot,o.value]])}});class v2{get(t){const n=localStorage.getItem(t);if(n===null)return null;const o=JSON.parse(n);return o?new Date(o.expires)<new Date?(localStorage.removeItem(t),null):o.value:null}set(t,n,o){const i=new Date().getTime(),s=new Date(i+o*6e4);localStorage.setItem(t,JSON.stringify({value:n,expires:s}))}}const Qh=new v2,x2=["aria-controls","aria-selected","href","onClick","innerHTML"],C2=Ne({__name:"Tabs",props:{cacheLifetime:{type:Number,default:5},options:{type:Object,required:!1,default:()=>({useUrlFragment:!0,defaultTabHash:null})},wrapperClass:{type:[String,Object,Array],default:"tabs-component"},panelsWrapperClass:{type:[String,Object,Array],default:"tabs-component-panels"},navClass:{type:[String,Object,Array],default:"tabs-component-tabs"},navItemClass:{type:[String,Object,Array],default:"tabs-component-tab"},navItemDisabledClass:{type:[String,Object,Array],default:"is-disabled"},navItemActiveClass:{type:[String,Object,Array],default:"is-active"},navItemInactiveClass:{type:[String,Object,Array],default:"is-inactive"},navItemLinkClass:{type:[String,Object,Array],default:"tabs-component-tab-a"},navItemLinkActiveClass:{type:[String,Object,Array],default:"is-active"},navItemLinkInactiveClass:{type:[String,Object,Array],default:"is-inactive"},navItemLinkDisabledClass:{type:[String,Object,Array],default:"is-disabled"}},emits:["changed","clicked"],setup(e,{expose:t,emit:n}){const o=e,i=vr({activeTabHash:"",lastActiveTabHash:"",tabs:[]});cs(Jh,i),cs(Kh,a=>{i.tabs.push(a)}),cs(Gh,(a,l)=>{const u=i.tabs.findIndex(f=>f.computedId===a);l.isActive=i.tabs[u].isActive,i.tabs[u]=l}),cs(Yh,a=>{const l=i.tabs.findIndex(u=>u.computedId===a);i.tabs.splice(l,1)});const s=(a,l)=>{l&&!o.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,o.cacheLifetime<=0)return;const f=`vue-tabs-component.cache.${window.location.host}${window.location.pathname}`;Qh.set(f,u.hash,o.cacheLifetime)},r=a=>i.tabs.find(l=>l.hash===a);return Pt(()=>{if(i.tabs.length){if(window.addEventListener("hashchange",()=>s(window.location.hash)),r(window.location.hash)){s(window.location.hash);return}if(o.cacheLifetime>0){const a=`vue-tabs-component.cache.${window.location.host}${window.location.pathname}`,l=Qh.get(a);if(l!==null&&r(l)){s(l);return}if(o.options.defaultTabHash&&r("#"+o.options.defaultTabHash)){s("#"+o.options.defaultTabHash);return}}s(i.tabs[0].hash)}}),t({...sv(i),selectTab:s,findTab:r}),(a,l)=>(B(),z("div",{class:Qe(e.wrapperClass)},[c("ul",{role:"tablist",class:Qe(e.navClass)},[(B(!0),z(je,null,st(i.tabs,(u,f)=>{var h,g;return B(),z("li",{key:f,class:Qe([(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:Qe([(g=u.navItemLinkClass)!=null?g: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:b=>s(u.hash,b),innerHTML:u.header,tabindex:"0"},null,10,x2)],2)}),128))],2),c("div",{class:Qe(e.panelsWrapperClass)},[ln(a.$slots,"default")],2)],2))}}),$2={class:"ce-config ce-basic-config"},E2={class:"pure-form pure-form-aligned"},k2=c("legend",null,"UI优化",-1),S2={class:"pure-control-group"},A2=c("label",{for:"basic_showOfflineEntry"},"显示云下载入口按钮",-1),P2={class:"pure-form-message text-success"},T2={class:"pure-control-group"},I2=c("label",{for:"basic_showAddOffline"},"显示添加云下载按钮",-1),O2={class:"pure-form-message text-success"},L2={class:"pure-control-group"},M2=c("label",{for:"basic_transferDefaultOffline"},"近期传输默认云下载",-1),D2=c("div",{class:"pure-form-message text-success"}," 点击左边栏的「传输」默认进入「云下载」页面。 ",-1),R2={class:"pure-control-group"},N2=c("label",{for:"basic_showFavEntry"},"显示星标入口按钮",-1),B2={class:"pure-form-message text-success"},F2=c("legend",null,"隐私保护",-1),j2={class:"pure-control-group"},U2=c("label",{for:"basic_hideWatermark"},"隐藏水印",-1),H2=c("div",{class:"pure-form-message text-success"}," 网页水印是肉眼看不到的,但通过一些处理可以看到,水印内容是你的账号标识。 如果你需要截图并发给别人,可以考虑开启隐藏。 ",-1),q2={class:"pure-control-group"},z2=c("label",{for:"basic_fakeAccountEnabled"},"隐藏身份",-1),V2=c("div",{class:"pure-form-message text-success"}," 修改右上角显示的账号信息,不会真的修改。编辑后即可生效,无需刷新页面。 ",-1),W2={class:"pure-control-group"},K2=c("label",null,"账号ID",-1),G2={class:"pure-control-group"},Y2=c("label",null,"用户名",-1),J2={class:"pure-control-group"},Q2=c("label",null,"头像",-1),X2={class:"avatar-preview"},Z2=["src"],eA={class:"pure-control-group"},tA=c("label",null,"VIP等级",-1),nA=Ne({__name:"Config",async setup(e){let t,n;const o=de(([t,n]=tn(()=>vc()),t=await t,n(),t));return At(async()=>{}),pt(o,Rt(async i=>{await d2(i),ae({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:lt.basicConfigChange,body:Jc(i)})},500),{deep:!0}),(i,s)=>(B(),z("div",$2,[c("form",E2,[c("fieldset",null,[k2,c("div",S2,[A2,X(c("input",{id:"basic_showOfflineEntry",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=r=>o.value.showOfflineEntry=r)},null,512),[[Se,o.value.showOfflineEntry]]),c("div",P2,[ee(" 在「网盘」页面顶部工具栏显示「云下载」入口按钮。按钮文本为 "),X(c("input",{"onUpdate:modelValue":s[1]||(s[1]=r=>o.value.offlineEntryLabel=r),class:"input-small",placeholder:"可以为空"},null,512),[[Ke,o.value.offlineEntryLabel]])])]),c("div",T2,[I2,X(c("input",{id:"basic_showAddOffline",type:"checkbox","onUpdate:modelValue":s[2]||(s[2]=r=>o.value.showAddOffline=r)},null,512),[[Se,o.value.showAddOffline]]),c("div",O2,[ee(" 在「网盘」页面顶部工具栏显示「添加云下载」按钮。按钮文本为 "),X(c("input",{"onUpdate:modelValue":s[3]||(s[3]=r=>o.value.addOfflineLabel=r),class:"input-small",placeholder:"可以为空"},null,512),[[Ke,o.value.addOfflineLabel]])])]),c("div",L2,[M2,X(c("input",{id:"basic_transferDefaultOffline",type:"checkbox","onUpdate:modelValue":s[4]||(s[4]=r=>o.value.transferDefaultOffline=r)},null,512),[[Se,o.value.transferDefaultOffline]]),D2]),c("div",R2,[N2,X(c("input",{id:"basic_showFavEntry",type:"checkbox","onUpdate:modelValue":s[5]||(s[5]=r=>o.value.showFavEntry=r)},null,512),[[Se,o.value.showFavEntry]]),c("div",B2,[ee(" 在「网盘」页面顶部工具栏显示「星标」入口按钮。按钮文本为 "),X(c("input",{"onUpdate:modelValue":s[6]||(s[6]=r=>o.value.favEntryLabel=r),class:"input-small",placeholder:"可以为空"},null,512),[[Ke,o.value.favEntryLabel]])])]),F2,c("div",j2,[U2,X(c("input",{id:"basic_hideWatermark",type:"checkbox","onUpdate:modelValue":s[7]||(s[7]=r=>o.value.hideWatermark=r)},null,512),[[Se,o.value.hideWatermark]]),H2]),c("div",q2,[z2,X(c("input",{id:"basic_fakeAccountEnabled",type:"checkbox","onUpdate:modelValue":s[8]||(s[8]=r=>o.value.fakeAccountEnabled=r)},null,512),[[Se,o.value.fakeAccountEnabled]]),V2]),c("div",W2,[K2,X(c("input",{"onUpdate:modelValue":s[9]||(s[9]=r=>o.value.fakeAccountId=r),placeholder:"自定义账号ID",class:"pure-input-2-3"},null,512),[[Ke,o.value.fakeAccountId]])]),c("div",G2,[Y2,X(c("input",{"onUpdate:modelValue":s[10]||(s[10]=r=>o.value.fakeAccountName=r),placeholder:"自定义用户名",class:"pure-input-2-3"},null,512),[[Ke,o.value.fakeAccountName]])]),c("div",J2,[Q2,X(c("input",{"onUpdate:modelValue":s[11]||(s[11]=r=>o.value.fakeAccountAvatar=r),placeholder:"支持网络图片地址或base64编码",class:"pure-input-2-3"},null,512),[[Ke,o.value.fakeAccountAvatar]]),c("span",X2,[o.value.fakeAccountAvatar?(B(),z("img",{key:0,src:o.value.fakeAccountAvatar,alt:"头像预览",width:"20",height:"20"},null,8,Z2)):qe("",!0)])]),c("div",eA,[tA,X(c("input",{"onUpdate:modelValue":s[12]||(s[12]=r=>o.value.fakeAccountVip=r),placeholder:"自定义VIP等级",class:"pure-input-2-3"},null,512),[[Ke,o.value.fakeAccountVip]])])])])]))}}),AR="",oA={class:"pure-form pure-form-aligned"},iA=["disabled"],sA={class:"pure-control-group"},rA=c("label",null,[c("span",{class:"text-danger"},"*"),ee(" 地址")],-1),aA={class:"pure-control-group"},lA=c("label",null,[c("span",{class:"text-danger"},"*"),ee(" 资源根路径")],-1),cA={class:"pure-control-group"},uA=c("label",null,"备注",-1),dA={class:"pure-control-group"},fA=c("label",null,"平台",-1),pA=["value"],hA=c("small",{class:"text-info"},"如果是macOS版,而且有包含日韩文的文件或目录,建议选上,可以避免播放链接无效的问题。",-1),mA=Ne({__name:"ConfigItem",props:{config:null,deletable:{type:Boolean}},emits:["change","delete","activate"],setup(e,{emit:t}){const n=e;At(async()=>{});async function o(){n.config.active=!0,t("activate",n.config)}async function i(){t("delete")}return pt(n.config,Rt(async s=>{t("change",s)},500),{deep:!0}),(s,r)=>(B(),z("div",{class:Qe(["ce-clouddrive-config-item",{active:e.config.active}])},[c("form",oA,[c("fieldset",null,[c("legend",null,[c("button",{type:"button",class:Qe(["pure-button button-small",[e.config.active?"button-success":"pure-button-primary"]]),onClick:o,disabled:e.config.active},ge(e.config.active?"当前使用该配置":"使用该配置"),11,iA),e.deletable?(B(),z("button",{key:0,type:"button",class:"pure-button button-error button-small",onClick:i}," 删除 ")):qe("",!0)]),c("div",sA,[rA,X(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),[[Ke,e.config.url]])]),c("div",aA,[lA,X(c("input",{"onUpdate:modelValue":r[1]||(r[1]=a=>e.config.root=a),placeholder:"即当前115账号在CloudDrive中的资源名称,如「115」",class:"pure-input-2-3"},null,512),[[Ke,e.config.root]])]),c("div",cA,[uA,X(c("input",{"onUpdate:modelValue":r[2]||(r[2]=a=>e.config.memo=a),placeholder:"备注信息",class:"pure-input-2-3"},null,512),[[Ke,e.config.memo]])]),c("div",dA,[fA,X(c("select",{"onUpdate:modelValue":r[3]||(r[3]=a=>e.config.platform=a)},[(B(!0),z(je,null,st(fe(ru),a=>(B(),z("option",{key:a,value:a},ge(a),9,pA))),128))],512),[[vi,e.config.platform]]),ee("   "),hA])])])],2))}}),PR="",gA={class:"ce-config ce-clouddrive-config"},yA=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"),ee(" 是一个强大的多云盘管理工具,为用户提供包含云盘本地挂载的一站式的多云盘解决方案。 ")]),c("p",null,"本脚本主要是借助CloudDrive实现原码视频播放的功能(具体可以在「播放菜单」面板中查看)。")],-1),wA={class:"ce-list"},bA=c("div",{class:"ce-tips"},[c("p",{class:"text-primary"}," 暂时发现IINA是支持`file://`协议的,这时候播放器可以读取到同目录的字幕文件。 配置地址示例: file:///Users/you/115,根路径不用填。 ")],-1),_A=c("div",{class:"ce-tips"}," 编辑配置后,请记得点击「保存全部配置」。 ",-1),vA={class:"ce-actions"},xA=["disabled"],CA=Ne({__name:"Config",async setup(e){let t,n;const o=de(([t,n]=tn(()=>au()),t=await t,n(),t));At(async()=>{});async function i(){await lu(o.value),ae({icon:"success",title:"设置已保存。",timer:800,position:"top-end"})}async function s(){o.value.push(_a())}async function r(l,u){const{isConfirmed:f}=await me.fire({icon:"warning",html:`确定要删除第 ${u+1} 个配置「${l.url}」吗?`});!f||(o.value.splice(u,1),await i(),ae({icon:"success",title:`「${l.url}」已删除!`}))}async function a(l,u){l.forEach((f,h)=>{f.active=h===u}),await lu(l),ae({icon:"success",title:"设置已保存。",timer:800,position:"top-end"})}return(l,u)=>(B(),z("div",gA,[yA,c("div",wA,[(B(!0),z(je,null,st(o.value,(f,h)=>(B(),Zt(mA,{key:h,config:f,index:h,deletable:o.value.length>1,onDelete:g=>r(f,h),onActivate:g=>a(o.value,h)},null,8,["config","index","deletable","onDelete","onActivate"]))),128))]),bA,_A,c("div",vA,[c("button",{type:"button",class:"pure-button pure-button-primary button-large",onClick:i,disabled:!o.value.length}," 保存全部配置 ",8,xA),ee("      "),c("button",{type:"button",class:"pure-button pure-button-success button-large",onClick:s}," 添加配置 ")])]))}}),TR="",$A={class:"ce-config ce-list-config"},EA={class:"pure-form pure-form-aligned"},kA={class:"pure-control-group"},SA=c("label",{for:"sizeSorter"},"大小排序",-1),AA=c("div",{class:"pure-form-message text-success"},[c("div",null,"在官方的「大小」列头部增加「排序」按钮,可以获取文件夹的大小,然后进行排序。"),c("div",null,"请注意该功能只会对当前加载的文件进行排序,如果有多页文件并需要对全部文件进行排序,请先点击「加载全部」后再使用该排序功能。")],-1),PA={class:"pure-control-group"},TA=c("label",{for:"sizeSorterDirAttrInterval"},"大小排序-获取目录大小间隔",-1),IA=c("div",{class:"pure-form-message text-success"}," 「大小排序」功能需要获取文件夹大小,这个设置是获取文件夹大小的间隔时间,单位是豪秒。 ",-1),OA={class:"pure-control-group"},LA=c("label",{for:"showSha1"},"显示文件SHA1",-1),MA=c("div",{class:"pure-form-message text-success"}," 在文件名下方显示文件SHA1,点击可以复制。 ",-1),DA={class:"pure-control-group"},RA=c("label",{for:"showFolderSizeButton"},"显示文件夹获取大小按钮",-1),NA=c("div",{class:"pure-form-message text-success"}," 点击按钮可以获取单个文件夹的大小。 ",-1),BA={class:"pure-control-group"},FA=c("label",{for:"showCopyButtonOnPathBar"},"在路径栏显示复制按钮",-1),jA=c("div",{class:"pure-form-message text-success"}," 点击后,复制当前路径到剪贴板。 ",-1),UA={class:"pure-control-group"},HA=c("label",{for:"showGotoButtonOnPathBar"},[ee(" 在路径栏显示前往按钮 "),c("small",{class:"ce-label"},"DEV")],-1),qA=c("div",{class:"pure-form-message text-success"}," 点击后,路径栏变为可输入状态,输入路径后按回车即可前往该路径。 ",-1),zA={class:"pure-control-group"},VA=c("label",{for:"noUpdateDirAfterRename"}," 重命名后不刷新文件列表 ",-1),WA=c("div",{class:"pure-form-message text-success"}," 仅支持单个文件或目录的重命名。在使用当前目录增强菜单项「重命名文件夹」时会忽略该选项。 ",-1),KA={class:"pure-control-group"},GA=c("label",{for:"noUpdateDirAfterMove"}," 移动后不刷新文件列表 ",-1),YA=c("div",{class:"pure-form-message text-success text-linethrough"},[c("b",null,"启用后如果进行了移动操作,列表的全选会受影响,如已选数量不准确。"),c("br"),c("b",{class:"text-danger"},"该功能主要目的是持续高效地在进行移动操作,如果在移动后还需要其他操作,请记得手动刷新列表!")],-1),JA={class:"pure-control-group"},QA=c("label",{for:"fileSelectorDefaultView"},"文件选择器默认视图",-1),XA=[c("option",{value:"view"},"大图标",-1),c("option",{value:"list"},"列表",-1),c("option",{value:"_"},"系统默认",-1)],ZA=c("div",{class:"pure-form-message text-success"},[c("div",null,"设置打开页面后初次使用的视图。"),c("div",{class:"text-warning"},"如果在刷新页面前在选择器切换到了其他视图,该选项将不会生效,但刷新页面后会恢复。")],-1),eP=Ne({__name:"Config",async setup(e){let t,n;const o=de(([t,n]=tn(()=>jr()),t=await t,n(),t));return At(async()=>{}),pt(o,Rt(async i=>{await N0(i),ae({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:lt.listConfigChange,body:JSON.parse(JSON.stringify(i))})},500),{deep:!0}),(i,s)=>(B(),z("div",$A,[c("form",EA,[c("fieldset",null,[c("div",kA,[SA,X(c("input",{id:"sizeSorter",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=r=>o.value.sizeSorter=r)},null,512),[[Se,o.value.sizeSorter]]),AA]),c("div",PA,[TA,X(c("input",{id:"sizeSorterDirAttrInterval",type:"number","onUpdate:modelValue":s[1]||(s[1]=r=>o.value.sizeSorterDirAttrInterval=r),min:"50",max:"999999"},null,512),[[Ke,o.value.sizeSorterDirAttrInterval]]),ee(" 毫秒 "),IA]),c("div",OA,[LA,X(c("input",{id:"showSha1",type:"checkbox","onUpdate:modelValue":s[2]||(s[2]=r=>o.value.showSha1=r)},null,512),[[Se,o.value.showSha1]]),MA]),c("div",DA,[RA,X(c("input",{id:"showFolderSizeButton",type:"checkbox","onUpdate:modelValue":s[3]||(s[3]=r=>o.value.showFolderSizeButton=r)},null,512),[[Se,o.value.showFolderSizeButton]]),NA]),c("div",BA,[FA,X(c("input",{id:"showCopyButtonOnPathBar",type:"checkbox","onUpdate:modelValue":s[4]||(s[4]=r=>o.value.showCopyButtonOnPathBar=r)},null,512),[[Se,o.value.showCopyButtonOnPathBar]]),jA]),c("div",UA,[HA,X(c("input",{id:"showGotoButtonOnPathBar",type:"checkbox","onUpdate:modelValue":s[5]||(s[5]=r=>o.value.showGotoButtonOnPathBar=r)},null,512),[[Se,o.value.showGotoButtonOnPathBar]]),qA]),c("div",zA,[VA,X(c("input",{id:"noUpdateDirAfterRename",type:"checkbox","onUpdate:modelValue":s[6]||(s[6]=r=>o.value.noUpdateDirAfterRename=r)},null,512),[[Se,o.value.noUpdateDirAfterRename]]),WA]),c("div",KA,[GA,X(c("input",{id:"noUpdateDirAfterMove",type:"checkbox","onUpdate:modelValue":s[7]||(s[7]=r=>o.value.noReloadAfterMove=r)},null,512),[[Se,o.value.noReloadAfterMove]]),YA])]),c("fieldset",null,[c("div",JA,[QA,X(c("select",{id:"fileSelectorDefaultView","onUpdate:modelValue":s[8]||(s[8]=r=>o.value.fileSelectorDefaultView=r)},XA,512),[[vi,o.value.fileSelectorDefaultView]]),ZA])])])]))}}),MR="",Xh="search_config";function tP(e){return{showSelectTargetButtonOnPathBar:!0,...e}}async function Zh(){const e=tP(),t=await tt.get(Xh,e);return{...e,...t}}async function nP(e){await tt.set(Xh,e)}const oP={class:"ce-config ce-search-config"},iP={class:"pure-form pure-form-aligned"},sP={class:"pure-control-group"},rP=c("label",{for:"showSelectTargetButtonOnPathBar"},"显示选择目标目录按钮",-1),aP=c("div",{class:"pure-form-message text-success"}," 在路径栏显示选择目标目录按钮。即可以在搜索结果页直接选择其他目录进行搜索,而不必返回列表页进入目录后再搜索。 ",-1),lP=Ne({__name:"Config",async setup(e){let t,n;const o=de(([t,n]=tn(()=>Zh()),t=await t,n(),t));return At(async()=>{}),pt(o,Rt(async i=>{await nP(i),ae({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:lt.searchConfigChange,body:JSON.parse(JSON.stringify(i))})},500),{deep:!0}),(i,s)=>(B(),z("div",oP,[c("form",iP,[c("fieldset",null,[c("div",sP,[rP,X(c("input",{id:"showSelectTargetButtonOnPathBar",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=r=>o.value.showSelectTargetButtonOnPathBar=r)},null,512),[[Se,o.value.showSelectTargetButtonOnPathBar]]),aP])])])]))}}),DR="";async function cP(e){const t=`https://qrcodeapi.115.com/api/1.0/${e}/1.0/token/`;return(await fetch(t)).json()}const uP={[0]:"等待扫码",[1]:"已扫码",[2]:"登录成功",[-1]:"已失效",[-2]:"已取消"};let Cc=new AbortController;async function dP(){Cc.abort()}async function fP(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 Cc=new AbortController,(await fetch(n,{signal:Cc.signal})).json()}function pP(e){return{domain:"",hostOnly:!1,httpOnly:!0,name:"",path:"",sameSite:"",secure:!1,session:!1,storeId:"0",value:"",id:0,...e}}async function hP(e){return`UID=${e.UID}; CID=${e.CID}; SEID=${e.SEID}`}async function mP(e,t=[]){const n=[],o=Object.keys(e);let i=["115.com",...t];i=[...new Set(i)];const s={hostOnly:!1,httpOnly:!0,path:"/",sameSite:"unspecified",secure:!1,session:!1,storeId:"0"};let r=1;for(let a=0;a<o.length;a++){const l=o[a],u=[];for(const f of i)u.push(pP({...s,name:l,value:e[l],domain:f,id:r++}));n.push(...u)}return n}async function gP(e,t){const n=new FormData;n.append("app",t),n.append("account",e);const o=`https://passportapi.115.com/app/1.0/${t}/1.0/login/qrcode/`;return(await fetch(o,{method:"POST",body:n})).json()}async function yP(e,t){const n=`https://qrcodeapi.115.com/api/1.0/web/1.0/qrcode?uid=${t}`;return(await fetch(n)).blob()}var em=(e=>(e.web="web",e.android="android",e._115android="115android",e.ios="ios",e._115ipad="115ipad",e.ipad="ipad",e.linux="linux",e.mac="mac",e.windows="windows",e.tv="tv",e.alipaymini="alipaymini",e.wechatmini="wechatmini",e.qandroid="qandroid",e.qios="qios",e.qipad="qipad",e._115ios="115ios",e))(em||{});const wP={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端)"};async function bP(e,t){return new Promise((n,o)=>{const i=new FileReader;i.onloadend=()=>{if(typeof i.result=="string"){if(t instanceof HTMLImageElement)t.src=i.result;else{const s=document.createElement("img");s.src=i.result,t.appendChild(s)}n()}else console.error("[renderQrcode]","reader.result is not string!"),o("reader.result is not string!")},i.onerror=s=>{console.error("[renderQrcode]",s),o(s)},i.readAsDataURL(e)})}async function _P(e){document.addEventListener("qrcodeStatusChange",t=>{const n=t.detail;e(n)})}async function vP(e){const t=new CustomEvent("qrcodeStatusChange",{detail:e});document.dispatchEvent(t)}async function xP(e,t,n=6e4){return new Promise(async(o,i)=>{console.log("[qrcodeLogin]",e,t,n);const s=await cP(e),r=await yP(e,s.data.uid);await bP(r,t);let a=!0,l=setTimeout(()=>{a=!1,i("[qrcode login] timeout!")},n),u="";for(;a;)try{const h=(await fP(s.data)).data.status;if(vP(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):o(gP(s.data.uid,e))})}const tm="tools_config";function CP(e){return{scanApp:em.alipaymini,...e}}async function $P(){const e=CP(),t=await tt.get(tm,e);return{...e,...t}}async function EP(e){await tt.set(tm,e)}const kP={class:"ce-tools-item"},SP={class:"pure-form pure-form-aligned"},AP=c("legend",null,"扫码获取Cookie",-1),PP={class:"pure-control-group"},TP=["disabled"],IP=["value"],OP=["disabled"],LP={key:0,class:"text-warning text-bold"},MP={key:1},DP=c("div",{class:"text-danger"},"扫码登录后,所选设备之前的登录将会失效,所以请尽量选不常用的。",-1),RP=c("div",{class:"text-primary"},"请注意,扫码得到的Cookie会跟随发起扫码的设备,如果发起扫码的设备退出登录,扫码得到的Cookie也会随之失效。",-1),NP=c("div",{class:"text-success"},"如要避免上述问题,可以考虑使用手机验证码登录小程序并获取其Cookie。",-1),BP={class:"pure-control-group"},FP=Ne({__name:"GetCookie",props:{app:null},emits:["app-change"],setup(e,{emit:t}){const o=de(e.app),i=de(!1),s=de(!1),r=de(!1),a=de(),l=6e4,u=de(),f=vn(()=>u.value?uP[u.value]:"");pt(o,M=>{t("app-change",M),g()}),At(async()=>{}),Pt(async()=>{await _P(_)});async function h(){await g();try{const M=document.querySelector("#ceGetCookieQrcode"),P=await xP(o.value,M,l);a.value=P.data}catch(M){if(console.error(M),M.name==="AbortError")return;me.fire({icon:"error",title:"扫码失败",text:M.toString()})}finally{i.value=!1,s.value=!1,u.value=void 0}}async function g(){a.value=void 0,s.value=!1,r.value=!1,i.value=!1,u.value=void 0,await T()}async function b(){s.value=!0}async function _(M){console.log("[handleStatusChange]",M),u.value=M}async function E(M){var H;const P=(H=a.value)==null?void 0:H.cookie;if(!P)return;let I="";if(M==="text")I=await hP(P);else if(M==="json"){const ie=await mP(P);I=JSON.stringify(ie,null,2)}fb(I),Xs.fire({icon:"success",title:"已复制到剪贴板",timer:1500})}async function T(){await dP()}return(M,P)=>(B(),z("div",kP,[c("form",SP,[c("fieldset",null,[AP,c("div",PP,[X(c("select",{"onUpdate:modelValue":P[0]||(P[0]=I=>o.value=I),disabled:i.value},[(B(!0),z(je,null,st(fe(wP),(I,H)=>(B(),z("option",{value:H,key:H},ge(I),9,IP))),128))],8,TP),[[vi,o.value]]),ee("    "),c("button",{type:"button",class:"pure-button pure-button-primary",onClick:h,disabled:i.value}," 开始 ",8,OP),ee("    "),fe(f)?(B(),z("span",LP,ge(fe(f)),1)):qe("",!0),a.value?(B(),z("span",MP,[ee("      "),c("button",{type:"button",class:"pure-button button-success",onClick:P[1]||(P[1]=I=>E("text"))}," 复制文本格式Cookie "),ee("    "),c("button",{type:"button",class:"pure-button button-success",onClick:P[2]||(P[2]=I=>E("json"))}," 复制JSON格式Cookie ")])):qe("",!0)]),DP,RP,NP,X(c("div",BP,[c("img",{id:"ceGetCookieQrcode",alt:"qrcode",onLoad:b},null,32)],512),[[Ot,s.value]])])])]))}}),jP={class:"ce-tools-item"},UP={class:"pure-form pure-form-aligned"},HP=c("legend",null,"文件清理",-1),qP={class:"pure-control-group"},zP=c("div",{class:"ce-tips"},"根据后缀、大小和名称等条件进行文件清理。请在「网盘」页中点击以下按钮。",-1),VP=c("br",null,null,-1),WP={class:"pure-control-group"},KP=c("div",{class:"ce-tips"},"尽快找到空文件夹进行清理。请在「网盘」页中点击以下按钮。",-1),GP=Ne({__name:"Cleaner",setup(e){async function t(o,i){o&&(await n(),await wt(1e3)),window.postMessage({event:lt.closeConfig}),postMessage({type:i==="Cleaner"?Lt.OPEN_CLEANER:Lt.OPEN_EMPTY_CLEANER})}async function n(){return new Promise(async(o,i)=>{unsafeWindow.parent.Core.FileSelectDG.Open((s,r)=>{console.log("[Core.FileSelectDG.Open]",s,r);const a=s[s.length-1],l=unsafeWindow.parent.wangpan;try{l.Main.GotoDir(1,a.cid,0,""),o()}catch(u){me.fire({icon:"error",title:"打开文件夹失败",text:`请在文件列表页面中打开!不要在离线任务之类的页面打开。异常: ${u.toString()}`})}},{select:1,nf:1,show_record:0,show_copy:1,btn_txt:"打开清理工具",select_txt:"清理"})})}return(o,i)=>(B(),z("div",jP,[c("form",UP,[c("fieldset",null,[HP,c("div",qP,[zP,c("button",{type:"button",class:"pure-button button-success",onClick:i[0]||(i[0]=s=>t(!1,"Cleaner"))}," 清理当前文件夹 "),ee("      "),c("button",{type:"button",class:"pure-button button-success",onClick:i[1]||(i[1]=s=>t(!0,"Cleaner"))}," 清理指定文件夹 ")]),VP,c("div",WP,[KP,c("button",{type:"button",class:"pure-button button-warning",onClick:i[2]||(i[2]=s=>t(!1,"EmptyCleaner"))}," 清理当前文件夹下的空文件夹 "),ee("      "),c("button",{type:"button",class:"pure-button button-warning",onClick:i[3]||(i[3]=s=>t(!0,"EmptyCleaner"))}," 清理指定文件夹下的空文件夹 ")])])])]))}}),YP={class:"ce-config ce-tools-config"},JP={class:"item"},QP=Ne({__name:"Config",async setup(e){let t,n;const o=de(([t,n]=tn(()=>$P()),t=await t,n(),t));At(async()=>{}),pt(o,Rt(async s=>{await EP(s),window.postMessage({event:lt.toolsConfigChange,body:JSON.parse(JSON.stringify(s))})},100),{deep:!0});async function i(s){o.value.scanApp=s}return(s,r)=>(B(),z("div",YP,[c("div",JP,[Ee(FP,{app:o.value.scanApp,onAppChange:i},null,8,["app"]),Ee(GP)])]))}}),RR="",XP={class:"menu-config-block menu-basic-config"},ZP={class:"pure-form pure-form-stacked"},eT=c("legend",null,"全局设置",-1),tT={class:"pure-control-group"},nT=c("label",{for:"basic_enabled"},"启用",-1),oT={class:"pure-control-group"},iT=c("label",{for:"basic_hideSelectionMenuLabel"},"隐藏顶部菜单文本",-1),sT={class:"pure-control-group"},rT=c("label",{for:"basic_enableInSearch"},"在搜索结果页中启用",-1),aT={class:"pure-control-group"},lT=c("label",{for:"basic_manageOfficialMenus"},"控制官方菜单",-1),cT={class:"pure-control-group"},uT=c("label",{for:"basic_forceManualBeforeOpenOnKey"},"强制使用手动输入模式的辅助键",-1),dT=["value"],fT={class:"pure-control-group"},pT=c("label",{for:"basic_m3u8TempDirName"},"M3U8临时目录",-1),hT=Ne({__name:"BasicConfig",props:{config:null},setup(e,{emit:t}){const n=e;async function o(i){const r={keyToTriggerManual:"在按下该按键时点击菜单项,会触发手动输入模式,此时会打开一个输入框,修改文本后,点击「确定」或按下Ctrl+Enter,即可继续完成菜单项的操作。",m3u8TempDir:"「M3U8临时目录」用于临时存放生成的m3u8文件。在选中多个视频文件后,在顶部菜单栏会有一个「播放」菜单项,点击后会生成对应的m3u8文件,然后调用播放器播放这个m3u8以实现播放多个视频的效果。"}[i];r&&me.fire({html:r})}return(i,s)=>(B(),z("div",XP,[c("form",ZP,[c("fieldset",null,[eT,c("div",tT,[nT,X(c("input",{id:"basic_enabled",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=r=>n.config.enabled=r)},null,512),[[Se,n.config.enabled]])]),c("div",oT,[iT,X(c("input",{id:"basic_hideSelectionMenuLabel",type:"checkbox","onUpdate:modelValue":s[1]||(s[1]=r=>n.config.hideSelectionMenuLabel=r)},null,512),[[Se,n.config.hideSelectionMenuLabel]])]),c("div",sT,[rT,X(c("input",{id:"basic_enableInSearch",type:"checkbox","onUpdate:modelValue":s[2]||(s[2]=r=>n.config.enableInSearch=r)},null,512),[[Se,n.config.enableInSearch]])]),c("div",aT,[lT,X(c("input",{id:"basic_manageOfficialMenus",type:"checkbox","onUpdate:modelValue":s[3]||(s[3]=r=>n.config.manageOfficialMenus=r)},null,512),[[Se,n.config.manageOfficialMenus]])]),c("div",cT,[uT,c("span",{class:"ce-label ce-label-warning ce-config-help",onClick:s[4]||(s[4]=r=>o("keyToTriggerManual"))},"说明"),X(c("select",{id:"basic_forceManualBeforeOpenOnKey","onUpdate:modelValue":s[5]||(s[5]=r=>n.config.keyToTriggerManual=r)},[(B(!0),z(je,null,st(fe(mn),(r,a)=>(B(),z("option",{key:a,value:a},ge(r),9,dT))),128))],512),[[vi,n.config.keyToTriggerManual]])]),c("div",fT,[pT,c("span",{class:"ce-label ce-label-warning ce-config-help",onClick:s[6]||(s[6]=r=>o("m3u8TempDir"))},"说明"),X(c("input",{id:"basic_m3u8TempDirName","onUpdate:modelValue":s[7]||(s[7]=r=>n.config.m3u8TempDir=r)},null,512),[[Ke,n.config.m3u8TempDir]])])])])]))}}),NR="",mT={class:"menu-config-block"},gT={class:"pure-form pure-form-stacked"},yT=c("label",{for:"listItemHover_enabled"},"启用",-1),wT=c("label",{for:"listItemHover_openInNewTab"},"新标签页打开",-1),bT=c("label",{for:"listItemHover_search",class:"text-primary"},"搜索",-1),_T=c("label",{for:"listItemHover_play",class:"text-primary"},"播放",-1),vT=c("label",{for:"listItemHover_copyFileName"},"名称路径",-1),xT=c("label",{for:"listItemHover_exportList"},"导出列表数据",-1),CT=Ne({__name:"ListItemHoverConfig",props:{config:null},setup(e){return(t,n)=>(B(),z("div",mT,[c("form",gT,[c("fieldset",null,[c("legend",null,ge(fe(Ri).listItemHover),1),c("div",null,[yT,X(c("input",{id:"listItemHover_enabled",type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=o=>e.config.enabled=o)},null,512),[[Se,e.config.enabled]])]),c("div",null,[wT,X(c("input",{id:"listItemHover_openInNewTab",type:"checkbox","onUpdate:modelValue":n[1]||(n[1]=o=>e.config.openInNewTab=o)},null,512),[[Se,e.config.openInNewTab]])]),c("div",null,[bT,X(c("input",{id:"listItemHover_search",type:"checkbox","onUpdate:modelValue":n[2]||(n[2]=o=>e.config.search=o)},null,512),[[Se,e.config.search]])]),c("div",null,[_T,X(c("input",{id:"listItemHover_play",type:"checkbox","onUpdate:modelValue":n[3]||(n[3]=o=>e.config.play=o)},null,512),[[Se,e.config.play]])]),c("div",null,[vT,X(c("input",{id:"listItemHover_copyFileName",type:"checkbox","onUpdate:modelValue":n[4]||(n[4]=o=>e.config.copyNames=o)},null,512),[[Se,e.config.copyNames]])]),c("div",null,[xT,X(c("input",{id:"listItemHover_exportList",type:"checkbox","onUpdate:modelValue":n[5]||(n[5]=o=>e.config.exportList=o)},null,512),[[Se,e.config.exportList]])])])])]))}}),$T={class:"menu-config-block"},ET={class:"pure-form pure-form-stacked"},kT=c("label",{for:"listItemContext_enabled"},"启用",-1),ST=c("label",{for:"listItemContext_copyFileName"},"名称路径",-1),AT=Ne({__name:"ListItemContextConfig",props:{config:null},setup(e){return(t,n)=>(B(),z("div",$T,[c("form",ET,[c("fieldset",null,[c("legend",null,ge(fe(Ri).listItemContext),1),c("div",null,[kT,X(c("input",{id:"listItemContext_enabled",type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=o=>e.config.enabled=o)},null,512),[[Se,e.config.enabled]])]),c("div",null,[ST,X(c("input",{id:"listItemContext_copyFileName",type:"checkbox","onUpdate:modelValue":n[1]||(n[1]=o=>e.config.copyNames=o)},null,512),[[Se,e.config.copyNames]])])])])]))}}),PT={class:"menu-config-block"},TT={class:"pure-form pure-form-stacked"},IT=c("label",{for:"selection_enabled"},"启用",-1),OT=c("label",{for:"selection_moveToSelfNameDir"},"移动到同名目录",-1),LT=c("label",{for:"selection_copyFileName"},"名称路径",-1),MT=c("label",{for:"selection_play"},"播放",-1),DT=Ne({__name:"SelectionConfig",props:{config:null},setup(e){return(t,n)=>(B(),z("div",PT,[c("form",TT,[c("fieldset",null,[c("legend",null,ge(fe(Ri).selection),1),c("div",null,[IT,X(c("input",{id:"selection_enabled",type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=o=>e.config.enabled=o)},null,512),[[Se,e.config.enabled]])]),c("div",null,[OT,X(c("input",{id:"selection_moveToSelfNameDir",type:"checkbox","onUpdate:modelValue":n[1]||(n[1]=o=>e.config.moveToSelfNameDir=o)},null,512),[[Se,e.config.moveToSelfNameDir]])]),c("div",null,[LT,X(c("input",{id:"selection_copyFileName",type:"checkbox","onUpdate:modelValue":n[2]||(n[2]=o=>e.config.copyNames=o)},null,512),[[Se,e.config.copyNames]])]),c("div",null,[MT,X(c("input",{id:"selection_play",type:"checkbox","onUpdate:modelValue":n[3]||(n[3]=o=>e.config.play=o)},null,512),[[Se,e.config.play]])])])])]))}}),RT={class:"menu-config-block"},NT={class:"pure-form pure-form-stacked"},BT=c("label",{for:"dirContext_enabled"},"启用",-1),FT=c("label",{for:"dirContext_rename"},"重命名",-1),jT=c("label",{for:"dirContext_delete"},"删除",-1),UT=c("label",{for:"dirContext_play"},"播放全部",-1),HT=c("label",{for:"dirContext_copyFileName"},"名称路径",-1),qT=c("label",{for:"dirContext_move"},"移动",-1),zT=c("label",{for:"dirContext_copy"},"复制",-1),VT=c("label",{for:"dirContext_copyTo"},"复制到",-1),WT=c("label",{for:"dirContext_viewProperties"},"查看属性",-1),KT=c("label",{for:"dirContext_showSubFolderSize"},"子文件夹大小",-1),GT=c("label",{for:"dirContext_exportList"},"导出列表数据",-1),YT=Ne({__name:"DirContextConfig",props:{config:null},setup(e){async function t(){const n="当前目录右键菜单的打开方式: <br>1.右键单击文件列表表头;<br>2.右键单击文件列表空白处。";me.fire({html:n,customClass:"ce-swal-text-left"})}return(n,o)=>(B(),z("div",RT,[c("form",NT,[c("fieldset",null,[c("legend",null,[ee(ge(fe(Ri).dirContext)+" ",1),c("span",{class:"ce-label ce-label-warning ce-config-help",onClick:t},"说明")]),c("div",null,[BT,X(c("input",{id:"dirContext_enabled",type:"checkbox","onUpdate:modelValue":o[0]||(o[0]=i=>e.config.enabled=i)},null,512),[[Se,e.config.enabled]])]),c("div",null,[FT,X(c("input",{id:"dirContext_rename",type:"checkbox","onUpdate:modelValue":o[1]||(o[1]=i=>e.config.rename=i)},null,512),[[Se,e.config.rename]])]),c("div",null,[jT,X(c("input",{id:"dirContext_delete",type:"checkbox","onUpdate:modelValue":o[2]||(o[2]=i=>e.config.delete=i)},null,512),[[Se,e.config.delete]])]),c("div",null,[UT,X(c("input",{id:"dirContext_play",type:"checkbox","onUpdate:modelValue":o[3]||(o[3]=i=>e.config.play=i)},null,512),[[Se,e.config.play]])]),c("div",null,[HT,X(c("input",{id:"dirContext_copyFileName",type:"checkbox","onUpdate:modelValue":o[4]||(o[4]=i=>e.config.copyNames=i)},null,512),[[Se,e.config.copyNames]])]),c("div",null,[qT,X(c("input",{id:"dirContext_move",type:"checkbox","onUpdate:modelValue":o[5]||(o[5]=i=>e.config.move=i)},null,512),[[Se,e.config.move]])]),c("div",null,[zT,X(c("input",{id:"dirContext_copy",type:"checkbox","onUpdate:modelValue":o[6]||(o[6]=i=>e.config.copy=i)},null,512),[[Se,e.config.copy]])]),c("div",null,[VT,X(c("input",{id:"dirContext_copyTo",type:"checkbox","onUpdate:modelValue":o[7]||(o[7]=i=>e.config.copyTo=i)},null,512),[[Se,e.config.copyTo]])]),c("div",null,[WT,X(c("input",{id:"dirContext_viewProperties",type:"checkbox","onUpdate:modelValue":o[8]||(o[8]=i=>e.config.viewProp=i)},null,512),[[Se,e.config.viewProp]])]),c("div",null,[KT,X(c("input",{id:"dirContext_showSubFolderSize",type:"checkbox","onUpdate:modelValue":o[9]||(o[9]=i=>e.config.showSubFolderSize=i)},null,512),[[Se,e.config.showSubFolderSize]])]),c("div",null,[GT,X(c("input",{id:"dirContext_exportList",type:"checkbox","onUpdate:modelValue":o[10]||(o[10]=i=>e.config.exportList=i)},null,512),[[Se,e.config.exportList]])])])])]))}}),JT={class:"official-menu-config"},QT=c("div",{class:"ce-tips"},[c("p",null,"开启「菜单设置 - 全局设置 - 控制官方菜单」后才会生效。"),c("p",{class:"text-primary"},"该功能仅支持隐藏菜单。点击「隐藏」后刷新页面生效,如需取消请点击「取消隐藏」。")],-1),XT={class:"pure-form pure-form-stacked"},ZT=["onClick"],eI=["onClick"],tI=Ne({__name:"OfficialMenuConfig",setup(e){const t=de([]),n=de(!1);At(async()=>{t.value=await Wp(),console.log("official menu groups",t.value,location.href)}),Pt(()=>{document.body.addEventListener("click",()=>{n.value||(n.value=!0)})}),pt(t,Rt(async s=>{if(!n.value)return;const r=await gx(s);await mx(r,!0),ae({icon:"success",title:"官方菜单设置已保存,已生效。",timer:1e3,position:"top-end"})},500),{deep:!0});async function o(s){s.hidden=!s.hidden}async function i(s){const{isConfirmed:r}=await me.fire({icon:"warning",html:`确认要重置分组「${s.label}」的隐藏状态吗?`,confirmButtonText:"确认",showDenyButton:!0,denyButtonText:"关闭"});!r||s.items.forEach(a=>{a.hidden=!1})}return(s,r)=>(B(),z("div",JT,[QT,(B(!0),z(je,null,st(t.value,(a,l)=>(B(),z("div",{key:l,class:"menu-config-block"},[c("form",XT,[c("fieldset",null,[c("legend",null,[ee(ge(a.label)+" ",1),c("span",{class:"ce-label ce-label-warning",title:"取消该分组下全部的隐藏设置",onClick:u=>i(a)}," 重置 ",8,ZT)]),(B(!0),z(je,null,st(a.items,(u,f)=>(B(),z("div",{key:f,class:Qe({hidden:u.hidden})},[c("label",null,[ee(ge(u.label)+" ",1),c("small",null,ge(u.key),1)]),c("span",{class:"ce-toggle",onClick:h=>o(u)},ge(u.hidden?"取消隐藏":"隐藏"),9,eI)],2))),128))])])]))),128))]))}}),BR="",nI={key:0,class:"ce-menu-config"},oI=c("div",{class:"ce-tips"},[c("p",null,"「搜索」功能菜单支持自定义,可在「搜索菜单」设置面板中添加和管理。"),c("p",null,"「播放」功能菜单支持自定义,可在「播放菜单」设置面板中添加和管理。")],-1),iI=c("hr",{class:"ce-hr"},null,-1),sI=c("h1",null,"官方菜单设置",-1),rI=Ne({__name:"MenuConfig",async setup(e){let t,n;const o=de(([t,n]=tn(()=>ci()),t=await t,n(),t));return de(!1),At(async()=>{}),pt(o,Rt(async i=>{await Xb(i),ae({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0}),(i,s)=>o.value.enabled!==void 0?(B(),z("div",nI,[oI,Ee(hT,{config:o.value},null,8,["config"]),Ee(CT,{config:o.value.listItemHover},null,8,["config"]),Ee(AT,{config:o.value.listItemContext},null,8,["config"]),Ee(DT,{config:o.value.selection},null,8,["config"]),Ee(YT,{config:o.value.dirContext},null,8,["config"]),iI,c("div",null,[sI,c("div",null,[Ee(tI)])])])):qe("",!0)}}),FR="",aI={class:"ce-custom-url"},lI={class:"pure-form pure-form-aligned"},cI={class:"ce-custom-url-index"},uI={class:"pure-control-group"},dI=c("label",null,"启用",-1),fI={class:"pure-control-group"},pI=c("label",null,"唯一标识",-1),hI={class:"pure-control-group"},mI=c("label",null,"显示名称",-1),gI={class:"pure-control-group"},yI=c("label",null,"图标",-1),wI={class:"pure-control-group"},bI={class:"pure-control-group"},_I=c("label",null,"后台打开",-1),vI={class:"pure-control-group"},xI=c("label",null,"备注",-1),CI={key:0,class:"pure-control-group"},$I=c("label",null,"Mutation",-1),nm=Ne({__name:"CustomUrl",props:{item:null,index:null},emits:["delete"],setup(e,{emit:t}){const n=de(!0);function o(){t("delete")}async function i(){n.value=!n.value,n.value&&ae({title:"已开启高级模式",text:"请谨慎修改,不正确的代码可能会导致脚本崩溃。",icon:"info",timer:2e3})}async function s(){window.postMessage({event:"customUrlHelp"},"*")}async function r(){const a=`
  <div style="text-align:left;">
    <p>自定义代码,用于生成最终的链接。</p><br>
    <p>代码会被包含在一个async匿名函数中执行,最终应该返回一个链接字符串。</p>
    <p>传入的参数名为「payload」,其结构如下:</p>
    <p>- url: 之前自动处理得到的链接</p>
    <p>- file:当前文件信息</p>
    <p>- customUrl:当前自定义规则信息</p>
    <p>- cloudDriveConfig:CloudDrive设置信息</p><br>
    <p>示例:</p>
    <pre style="text-align:left;font-size:12px;">
    const {
      url,
      file,
      customUrl,
      cloudDriveConfig
    } = payload
    const sth = await fetch(\`https://api.sth.com/foo?bar=\${file.pc}\`)
    return \`https://example.com/do?key=\${sth}\`
    </pre>
  </div>
  `;await me.fire({title:"Mutation 说明",html:a,width:480,position:"top-start",backdrop:!1})}return(a,l)=>(B(),z("div",aI,[c("form",lI,[c("fieldset",null,[c("legend",null,[c("span",cI,"# "+ge(e.index+1),1),c("button",{type:"button",class:"pure-button button-error button-small",onClick:o}," 删除 ")]),c("div",uI,[dI,X(c("input",{"onUpdate:modelValue":l[0]||(l[0]=u=>e.item.enabled=u),type:"checkbox",id:"customUrl_enabled"},null,512),[[Se,e.item.enabled]])]),c("div",fI,[pI,X(c("input",{"onUpdate:modelValue":l[1]||(l[1]=u=>e.item.key=u),id:"customUrl_key",class:"pure-input-2-3",placeholder:"英文、数字或下划线"},null,512),[[Ke,e.item.key]])]),c("div",hI,[mI,X(c("input",{"onUpdate:modelValue":l[2]||(l[2]=u=>e.item.label=u),id:"customUrl_label",class:"pure-input-2-3",placeholder:"菜单文本,尽量简洁"},null,512),[[Ke,e.item.label]])]),c("div",gI,[yI,X(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),[[Ke,e.item.icon]])]),c("div",wI,[c("label",{onDblclick:i}," 链接 ",32),X(c("textarea",{"onUpdate:modelValue":l[4]||(l[4]=u=>e.item.url=u),id:"customUrl_url",class:"pure-input-2-3",placeholder:"链接地址,支持变量,变量列表请点击右侧「查看变量」"},null,512),[[Ke,e.item.url]]),ee("   "),c("a",{href:"javascript:void(0)",class:"text-primary",onClick:s},"查看变量")]),c("div",bI,[_I,X(c("input",{"onUpdate:modelValue":l[5]||(l[5]=u=>e.item.openInBackground=u),id:"customUrl_openInBackground",type:"checkbox"},null,512),[[Se,e.item.openInBackground]])]),c("div",vI,[xI,X(c("input",{"onUpdate:modelValue":l[6]||(l[6]=u=>e.item.memo=u),id:"customUrl_memo",class:"pure-input-2-3"},null,512),[[Ke,e.item.memo]])]),n.value?(B(),z("div",CI,[$I,X(c("textarea",{"onUpdate:modelValue":l[7]||(l[7]=u=>e.item.mutation=u),id:"customUrl_mutation",class:"pure-input-2-3",placeholder:"自定义代码生成最终链接,具体请看右侧「查看说明」"},null,512),[[Ke,e.item.mutation]]),ee("   "),c("a",{href:"javascript:void(0)",class:"text-primary",onClick:r},"查看说明")])):qe("",!0)])])]))}}),jR="",EI={class:"ce-config ce-search-urls ce-custom-urls"},kI={class:"ce-menu-urls-builtin"},SI={class:"pure-form pure-form-aligned"},AI=["for"],PI=["id","onUpdate:modelValue"],TI={class:"text-info item-memo"},II=["onClick"],OI={class:"ce-custom-urls-list"},LI={class:"ce-custom-urls-actions"},MI=["disabled"],DI=Ne({__name:"SearchUrls",async setup(e){let t,n;const o=de(([t,n]=tn(()=>Op()),t=await t,n(),t)),i=de(([t,n]=tn(()=>li(An.search)),t=await t,n(),t));At(async()=>{}),pt(o,Rt(async f=>{const h=[];f.forEach(g=>{g.enabled&&h.push(g.key)}),await I0(h),ae({icon:"success",title:"预置搜索菜单设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0});async function s(){const f=[];for(const h of i.value){if(!await r(h,f.length))return;if(f.includes(h.key)){ae({icon:"error",title:`第 ${f.length+1} 个记录的「唯一标识: ${h.key}」重复!`});return}f.push(h.key)}await Dd(An.search,i.value),ae({icon:"success",title:"保存成功!"})}async function r(f,h){const g=/^\w+$/;return f.key=f.key.trim(),g.test(f.key)?(f.label=f.label.trim(),f.label===""?(ae({icon:"error",title:`第 ${h+1} 个记录的「显示名称」不能为空!`}),!1):(f.url=f.url.trim(),f.url===""?(ae({icon:"error",title:`第 ${h+1} 个记录的「链接」不能为空!`}),!1):(f.icon=f.icon.trim(),f.memo=f.memo.trim(),!0))):(ae({icon:"error",title:`第 ${h+1} 个记录的「唯一标识」错误!只能包含字母、数字、下划线。`}),!1)}async function a(){i.value.push(bt())}async function l(f,h){const{isConfirmed:g}=await me.fire({icon:"warning",html:`确定要删除第 ${h+1} 个记录「${f.label}」吗?`});!g||(i.value.splice(h,1),await s(),ae({icon:"success",title:`「${f.label}」已删除!`}))}async function u(f){const h=JSON.stringify(f,null,2),g=`ce-url-item-denifition-${f.key}`,{isConfirmed:b}=await me.fire({title:`「${f.label}」的定义`,html:`<h3>${f.memo}</h3>
      <pre id="${g}" style="text-align:left;font-size:12px;"></pre>`,confirmButtonText:"复制",showCancelButton:!0,position:"top-left",heightAuto:!0,didOpen:()=>{document.getElementById(g).textContent=h}});!b||(navigator.clipboard.writeText(h),ae({icon:"success",title:"已复制到剪贴板!"}))}return(f,h)=>(B(),z("div",EI,[c("h1",null,[ee("预置搜索菜单 "),X(c("small",null,"( "+ge(o.value.length)+" )",513),[[Ot,o.value.length]])]),c("div",kI,[c("form",SI,[c("fieldset",null,[(B(!0),z(je,null,st(o.value,(g,b)=>(B(),z("div",{key:b,class:"pure-control-group"},[c("label",{for:`builtin_${g.key}`},ge(g.label),9,AI),X(c("input",{id:`builtin_${g.key}`,type:"checkbox","onUpdate:modelValue":_=>g.enabled=_},null,8,PI),[[Se,g.enabled]]),ee("      "),c("span",TI,ge(g.memo),1),ee("      "),c("button",{type:"button",class:"pure-button button-small",onClick:_=>u(g)},"查看定义",8,II)]))),128))])])]),c("h1",null,[ee("自定义搜索菜单 "),X(c("small",null,"( "+ge(i.value.length)+" )",513),[[Ot,i.value.length]])]),c("div",OI,[(B(!0),z(je,null,st(i.value,(g,b)=>(B(),Zt(nm,{key:b,item:g,index:b,onDelete:_=>l(g,b)},null,8,["item","index","onDelete"]))),128))]),c("div",LI,[c("button",{type:"button",class:"pure-button pure-button-primary button-large",onClick:s,disabled:!i.value.length}," 保存自定义搜索菜单 ",8,MI),ee("      "),c("button",{type:"button",class:"pure-button pure-button-success button-large",onClick:a}," 添加自定义搜索菜单 ")])]))}}),UR="",RI={class:"ce-config ce-play-urls ce-custom-urls"},NI=c("div",{class:"ce-tips"},[c("p",null,[ee("支持常见的视频、音频和图片格式,也支持目录播放。预置播放菜单使用的链接变量是 "),c("b",null,"{clouddrive_stream_url}"),ee(" , 会根据文件或目录自动使用相应的链接。")]),c("p",null,"播放功能依赖CloudDrive,请先在「CloudDrive」设置面板中进行配置。")],-1),BI={class:"ce-menu-urls-builtin"},FI={class:"pure-form pure-form-aligned"},jI=["for"],UI=["id","onUpdate:modelValue"],HI={class:"text-info item-memo"},qI=["onClick"],zI=["innerHTML"],VI={class:"ce-custom-urls-list"},WI=c("div",{class:"ce-tips"}," 编辑后,请记得点击「保存自定义播放菜单」。 ",-1),KI={class:"ce-custom-urls-actions"},GI=["disabled"],YI=Ne({__name:"PlayUrls",async setup(e){let t,n;const o=de(([t,n]=tn(()=>Fr()),t=await t,n(),t)),i=de(([t,n]=tn(()=>li(An.play)),t=await t,n(),t));At(async()=>{}),pt(o,Rt(async f=>{const h=[];f.forEach(g=>{g.enabled&&h.push(g.key)}),await O0(h),ae({icon:"success",title:"预置搜索菜单设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"})},500),{deep:!0});async function s(){const f=[];for(const h of i.value){if(!await r(h,f.length))return;if(f.includes(h.key)){ae({icon:"error",title:`第 ${f.length+1} 个记录的「唯一标识: ${h.key}」重复!`});return}f.push(h.key)}await Dd(An.play,i.value),ae({icon:"success",title:"保存成功!"})}async function r(f,h){const g=/^\w+$/;return f.key=f.key.trim(),g.test(f.key)?(f.label=f.label.trim(),f.label===""?(ae({icon:"error",title:`第 ${h+1} 个记录的「显示名称」不能为空!`}),!1):(f.url=f.url.trim(),f.url===""?(ae({icon:"error",title:`第 ${h+1} 个记录的「链接」不能为空!`}),!1):(f.icon=f.icon.trim(),f.memo=f.memo.trim(),!0))):(ae({icon:"error",title:`第 ${h+1} 个记录的「唯一标识」错误!只能包含字母、数字、下划线。`}),!1)}async function a(){i.value.push(bt())}async function l(f,h){const{isConfirmed:g}=await me.fire({icon:"warning",html:`确定要删除第 ${h+1} 个记录「${f.label}」吗?`});!g||(i.value.splice(h,1),await s(),ae({icon:"success",title:`「${f.label}」已删除!`}))}async function u(f){const h=JSON.stringify(f,null,2),g=`ce-url-item-denifition-${f.key}`,{isConfirmed:b}=await me.fire({title:`「${f.label}」的定义`,html:`<h3>${f.memo}</h3>
      <pre id="${g}" style="text-align:left;font-size:12px;"></pre>`,confirmButtonText:"复制",showCancelButton:!0,position:"top-left",heightAuto:!0,didOpen:()=>{document.getElementById(g).innerText=h}});!b||(navigator.clipboard.writeText(h),ae({icon:"success",title:"已复制到剪贴板!"}))}return(f,h)=>(B(),z("div",RI,[c("h1",null,[ee("预置播放菜单 "),X(c("small",null,"( "+ge(o.value.length)+" )",513),[[Ot,o.value.length]])]),NI,c("div",BI,[c("form",FI,[c("fieldset",null,[(B(!0),z(je,null,st(o.value,(g,b)=>(B(),z("div",{key:b,class:"pure-control-group"},[c("label",{for:`builtin_${g.key}`},ge(g.label),9,jI),X(c("input",{id:`builtin_${g.key}`,type:"checkbox","onUpdate:modelValue":_=>g.enabled=_},null,8,UI),[[Se,g.enabled]]),ee("      "),c("span",HI,ge(g.memo),1),ee("      "),c("button",{type:"button",class:"pure-button button-small",onClick:_=>u(g)},"查看定义",8,qI),g.extraMemo?(B(),z("span",{key:0,innerHTML:g.extraMemo,class:"extra-memo"},null,8,zI)):qe("",!0)]))),128))])])]),c("h1",null,[ee("自定义播放菜单 "),X(c("small",null,"( "+ge(i.value.length)+" )",513),[[Ot,i.value.length]])]),c("div",VI,[(B(!0),z(je,null,st(i.value,(g,b)=>(B(),Zt(nm,{key:b,item:g,index:b,onDelete:_=>l(g,b)},null,8,["item","index","onDelete"]))),128))]),WI,c("div",KI,[c("button",{type:"button",class:"pure-button pure-button-primary button-large",onClick:s,disabled:!i.value.length}," 保存自定义播放菜单 ",8,GI),ee("      "),c("button",{type:"button",class:"pure-button pure-button-success button-large",onClick:a}," 添加自定义播放菜单 ")])]))}}),HR="",om="anxia_config";function JI(e){return{defaultWebFull:!1,defaultOpenPlayList:!1,...e}}async function im(){const e=JI(),t=await tt.get(om,e);return{...e,...t}}async function QI(e){await tt.set(om,e)}const XI={class:"ce-config ce-anxia-config"},ZI={class:"pure-form pure-form-aligned"},eO={class:"pure-control-group"},tO=c("label",{for:"defaultWebFull"},"自动网页全屏",-1),nO=c("div",{class:"pure-form-message text-success"},[c("div",null,"进入播放页后自动使播放器网页全屏。")],-1),oO={class:"pure-control-group"},iO=c("label",{for:"defaultOpenPlayList"},"自动展开播放列表",-1),sO=c("div",{class:"pure-form-message text-success"},[c("div",null,"进入播放页后自动展开播放列表。")],-1),rO=Ne({__name:"Config",async setup(e){let t,n;const o=de(([t,n]=tn(()=>im()),t=await t,n(),t));return At(async()=>{}),pt(o,Rt(async i=>{await QI(i),ae({icon:"success",title:"设置已保存,刷新页面以使全部更改生效。",timer:1e3,position:"top-end"}),window.postMessage({event:lt.listConfigChange,body:JSON.parse(JSON.stringify(i))})},500),{deep:!0}),(i,s)=>(B(),z("div",XI,[c("form",ZI,[c("fieldset",null,[c("div",eO,[tO,X(c("input",{id:"defaultWebFull",type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=r=>o.value.defaultWebFull=r)},null,512),[[Se,o.value.defaultWebFull]]),nO]),c("div",oO,[iO,X(c("input",{id:"defaultOpenPlayList",type:"checkbox","onUpdate:modelValue":s[1]||(s[1]=r=>o.value.defaultOpenPlayList=r)},null,512),[[Se,o.value.defaultOpenPlayList]]),sO])])])]))}}),qR="",sm=function(){return document.ontouchstart!==null?"click":"touchstart"},ua="__vue_click_away__",rm=function(e,t,n){am(e);let o=n.context,i=t.value,s=!1;setTimeout(function(){s=!0},0),e[ua]=function(r){if((!e||!e.contains(r.target))&&i&&s&&typeof i=="function")return i.call(o,r)},document.addEventListener(sm(),e[ua],!1)},am=function(e){document.removeEventListener(sm(),e[ua],!1),delete e[ua]},aO={mounted:rm,updated:function(e,t,n){t.value!==t.oldValue&&rm(e,t,n)},unmounted:am},lO=Ne({__name:"Drawer",props:{isOpen:{type:Boolean,required:!1,default:!1},maxWidth:{type:String,required:!1,default:"600px"},speed:{type:Number,required:!1,default:100},backgroundColor:{type:String,required:!1,default:"#fafafa"}},emits:["close"],setup(e,{emit:t}){const n=e,o=de(!1),i=de(!1),s=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 Pt(()=>{o.value=n.isOpen}),pt(()=>n.isOpen,a=>{i.value=!0,a?(s(!0),o.value=!0):(s(!1),setTimeout(()=>o.value=!1,n.speed)),setTimeout(()=>i.value=!1,n.speed)}),(a,l)=>(B(),z("div",null,[c("div",{class:Qe(["ce-drawer",{"is-open":e.isOpen,"is-visible":o.value}])},[c("div",{class:"ce-drawer__overlay",style:Pn({transitionDuration:`${e.speed}ms`})},null,4),X((B(),z("div",{class:"ce-drawer__content",style:Pn({maxWidth:e.maxWidth,transitionDuration:`${e.speed}ms`,backgroundColor:e.backgroundColor})},[ln(a.$slots,"default")],4)),[[fe(aO),r]])],2)]))}}),VR="",cO={class:"ce-about"},uO=c("p",null,"115不大助手(以下简称「脚本」),是一个仅用于学习编程的小脚本。",-1),dO=c("br",null,null,-1),fO=c("p",null,"脚本不会收集您的任何个人信息。",-1),pO=c("p",null,"脚本仅借助了官方已有的功能,无任何破解行为。",-1),hO=c("p",null,"脚本代码本身已包含全部依赖,无任何远程引用。",-1),mO=c("br",null,null,-1),gO=c("br",null,null,-1),yO=c("br",null,null,-1),wO=c("hr",{class:"ce-hr"},null,-1),bO=["href"],_O=Ne({__name:"About",setup(e){const t={name:"115不大助手",version:"0.6.14",author:{name:"生瓜太保",email:"[email protected]"},greasyforkUrl:"http://greasyfork.icu/zh-CN/scripts/474231-115%E4%B8%8D%E5%A4%A7%E5%8A%A9%E6%89%8B-full?locale_override=1"};return(n,o)=>(B(),z("div",cO,[uO,dO,fO,pO,hO,mO,gO,yO,wO,c("div",null,[c("a",{href:fe(t).greasyforkUrl,class:"text-bold text-primary",target:"_blank",rel:"noreferrer noopener",title:"到Greasyfork查看"},[ee(ge(fe(t).name)+" ",1),c("small",null,"v"+ge(fe(t).version),1)],8,bO),ee("  "),c("small",null,"by "+ge(fe(t).author.name),1)])]))}}),vO={class:"ce-config-main"},xO={class:"ce-config-main-header"},CO=c("h1",null,"设置",-1),$O={class:"ce-intro"},EO=["href"],kO={class:"ce-config-main-body"},SO=Ne({__name:"Config",setup(e){const t={name:"115不大助手",version:"0.6.14",author:{name:"生瓜太保",email:"[email protected]"},greasyforkUrl:"http://greasyfork.icu/zh-CN/scripts/474231-115%E4%B8%8D%E5%A4%A7%E5%8A%A9%E6%89%8B-full?locale_override=1"},n=de(!1),o=de(!1),i=de();Pt(async()=>{window.addEventListener("message",u=>{const{event:f,body:h}=u.data;f===lt.openConfig&&(n.value||(n.value=!0),s(h)),f===lt.closeConfig&&r()},!1)});async function s(u){var f;o.value=!0,console.log("[openDrawer]",u),u&&(await mi(),(f=i.value)==null||f.selectTab(`#${u}`))}async function r(){o.value=!1}async function a(...u){console.log("[tabClicked]",u)}async function l(...u){console.log("[tabChanged]",u)}return(u,f)=>(B(),Zt(Mf,null,{default:Je(()=>[c("div",vO,[Ee(lO,{"is-open":o.value,onClose:r,"max-width":"1030px",speed:500},{default:Je(()=>[c("div",xO,[CO,c("span",$O,[c("a",{href:fe(t).greasyforkUrl,class:"text-bold text-primary",target:"_blank",rel:"noreferrer noopener",title:"到Greasyfork查看"},[ee(ge(fe(t).name)+" ",1),c("small",null,"v"+ge(fe(t).version),1)],8,EO),ee("  "),c("small",null,"by "+ge(fe(t).author.name),1)]),c("div",{class:"ce-config-main-close",onClick:r},"关闭")]),c("div",kO,[Ee(fe(C2),{ref_key:"refTabs",ref:i,options:{useUrlFragment:!1},onClicked:a,onChanged:l},{default:Je(()=>[Ee(fe(dn),{id:fe(zt).basic,name:fe(cn).basic},{default:Je(()=>[Ee(nA)]),_:1},8,["id","name"]),Ee(fe(dn),{id:fe(zt).clouddrive,name:fe(cn).clouddrive},{default:Je(()=>[Ee(CA)]),_:1},8,["id","name"]),Ee(fe(dn),{id:fe(zt).list,name:fe(cn).list},{default:Je(()=>[Ee(eP)]),_:1},8,["id","name"]),Ee(fe(dn),{id:fe(zt).search,name:fe(cn).search},{default:Je(()=>[Ee(lP)]),_:1},8,["id","name"]),Ee(fe(dn),{id:fe(zt).menus,name:fe(cn).menus},{default:Je(()=>[Ee(rI)]),_:1},8,["id","name"]),Ee(fe(dn),{id:fe(zt).searchMenus,name:fe(cn).searchMenus},{default:Je(()=>[Ee(DI)]),_:1},8,["id","name"]),Ee(fe(dn),{id:fe(zt).playMenus,name:fe(cn).playMenus},{default:Je(()=>[Ee(YI)]),_:1},8,["id","name"]),Ee(fe(dn),{id:fe(zt).offline,name:fe(cn).offline},{default:Je(()=>[Ee(Zp)]),_:1},8,["id","name"]),Ee(fe(dn),{id:fe(zt).tools,name:fe(cn).tools},{default:Je(()=>[Ee(QP)]),_:1},8,["id","name"]),Ee(fe(dn),{id:fe(zt).anxia,name:fe(cn).anxia},{default:Je(()=>[Ee(rO)]),_:1},8,["id","name"]),Ee(fe(dn),{id:fe(zt).about,name:fe(cn).about},{default:Je(()=>[Ee(_O)]),_:1},8,["id","name"])]),_:1},512)])]),_:1},8,["is-open"])])]),_:1}))}}),WR="",KR="";async function AO(){const{host:e}=location;!e.includes("115.com")||window.top===window.self&&(console.log("[Cloud115 Enhancer - main] running..."),PO(),IO(),TO())}async function PO(){console.log("[Cloud115 Enhancer - main] injectUI");const e="cloud115ConfigMain",t=document.createElement("div");t.id=e,document.body.appendChild(t),xn(SO).mount(`#${e}`),Os("设置",async()=>{window.postMessage({event:lt.openConfig})}),Os("扫码获取Cookie",async()=>{window.postMessage({event:lt.openConfig,body:zt.tools})}),LO()}async function TO(){if(window!==window.parent)return;new MutationObserver(async([t])=>{t.type==="childList"&&window.postMessage({event:lt.topDomChanged})}).observe(document.body,{childList:!0})}async function IO(){const e=document.querySelector(".bottom-side .navigation-ceiling ul");if(!e){DO();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 o=>{await da()}),n.title="打开「115不大助手」设置",n.innerHTML='<i class="isn-setting"></i><span>不大助手</span>',t.appendChild(n),e.insertBefore(t,e.firstChild)}async function OO(){return!!document.querySelector("#js-login-box")}async function LO(){console.log("[handleLoginPage]"),await OO()&&(document.body.classList.add("ce-login-page"),MO())}async function MO(){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 o=>{await da()}),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 o=>{await da(zt.tools)}),n.title="打开扫码获取Cookie",n.innerHTML='<i class="isn-scan"></i><span>扫码获取Cookie</span>',e.insertAdjacentElement("beforebegin",n)}async function DO(){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 o=>{await da()}),n.title="打开「115不大助手」设置",n.innerHTML='<i class="isn-setting"></i><span>115不大助手</span>',t.appendChild(n),e.insertBefore(t,e.firstChild)}async function da(e){window.postMessage({event:lt.openConfig,body:e})}const GR="";function Un(e){return Array.isArray?Array.isArray(e):um(e)==="[object Array]"}const RO=1/0;function NO(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-RO?"-0":t}function BO(e){return e==null?"":NO(e)}function Cn(e){return typeof e=="string"}function lm(e){return typeof e=="number"}function FO(e){return e===!0||e===!1||jO(e)&&um(e)=="[object Boolean]"}function cm(e){return typeof e=="object"}function jO(e){return cm(e)&&e!==null}function Gt(e){return e!=null}function $c(e){return!e.trim().length}function um(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const YR="Extended search is not available",UO="Incorrect 'index' type",HO=e=>`Invalid value for key ${e}`,qO=e=>`Pattern length exceeds max of ${e}.`,zO=e=>`Missing ${e} property in key`,VO=e=>`Property 'weight' in key '${e}' must be a positive integer`,dm=Object.prototype.hasOwnProperty;class WO{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(o=>{let i=fm(o);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(o=>{o.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function fm(e){let t=null,n=null,o=null,i=1,s=null;if(Cn(e)||Un(e))o=e,t=pm(e),n=Ec(e);else{if(!dm.call(e,"name"))throw new Error(zO("name"));const r=e.name;if(o=r,dm.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(VO(r));t=pm(r),n=Ec(r),s=e.getFn}return{path:t,id:n,weight:i,src:o,getFn:s}}function pm(e){return Un(e)?e:e.split(".")}function Ec(e){return Un(e)?e.join("."):e}function KO(e,t){let n=[],o=!1;const i=(s,r,a)=>{if(!!Gt(s))if(!r[a])n.push(s);else{let l=r[a];const u=s[l];if(!Gt(u))return;if(a===r.length-1&&(Cn(u)||lm(u)||FO(u)))n.push(BO(u));else if(Un(u)){o=!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),o?n:n[0]}var Re={...{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:KO,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const GO=/[^ ]+/g;function YO(e=1,t=3){const n=new Map,o=Math.pow(10,t);return{get(i){const s=i.match(GO).length;if(n.has(s))return n.get(s);const r=1/Math.pow(s,.5*e),a=parseFloat(Math.round(r*o)/o);return n.set(s,a),a},clear(){n.clear()}}}class kc{constructor({getFn:t=Re.getFn,fieldNormWeight:n=Re.fieldNormWeight}={}){this.norm=YO(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,o)=>{this._keysMap[n.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,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,o=this.size();n<o;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!Gt(t)||$c(t))return;let o={v:t,i:n,n:this.norm.get(t)};this.records.push(o)}_addObject(t,n){let o={i:n,$:{}};this.keys.forEach((i,s)=>{let r=i.getFn?i.getFn(t):this.getFn(t,i.path);if(!!Gt(r)){if(Un(r)){let a=[];const l=[{nestedArrIndex:-1,value:r}];for(;l.length;){const{nestedArrIndex:u,value:f}=l.pop();if(!!Gt(f))if(Cn(f)&&!$c(f)){let h={v:f,i:u,n:this.norm.get(f)};a.push(h)}else Un(f)&&f.forEach((h,g)=>{l.push({nestedArrIndex:g,value:h})})}o.$[s]=a}else if(Cn(r)&&!$c(r)){let a={v:r,n:this.norm.get(r)};o.$[s]=a}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function hm(e,t,{getFn:n=Re.getFn,fieldNormWeight:o=Re.fieldNormWeight}={}){const i=new kc({getFn:n,fieldNormWeight:o});return i.setKeys(e.map(fm)),i.setSources(t),i.create(),i}function JO(e,{getFn:t=Re.getFn,fieldNormWeight:n=Re.fieldNormWeight}={}){const{keys:o,records:i}=e,s=new kc({getFn:t,fieldNormWeight:n});return s.setKeys(o),s.setIndexRecords(i),s}function fa(e,{errors:t=0,currentLocation:n=0,expectedLocation:o=0,distance:i=Re.distance,ignoreLocation:s=Re.ignoreLocation}={}){const r=t/e.length;if(s)return r;const a=Math.abs(o-n);return i?r+a/i:a?1:r}function QO(e=[],t=Re.minMatchCharLength){let n=[],o=-1,i=-1,s=0;for(let r=e.length;s<r;s+=1){let a=e[s];a&&o===-1?o=s:!a&&o!==-1&&(i=s-1,i-o+1>=t&&n.push([o,i]),o=-1)}return e[s-1]&&s-o>=t&&n.push([o,s-1]),n}const Yo=32;function XO(e,t,n,{location:o=Re.location,distance:i=Re.distance,threshold:s=Re.threshold,findAllMatches:r=Re.findAllMatches,minMatchCharLength:a=Re.minMatchCharLength,includeMatches:l=Re.includeMatches,ignoreLocation:u=Re.ignoreLocation}={}){if(t.length>Yo)throw new Error(qO(Yo));const f=t.length,h=e.length,g=Math.max(0,Math.min(o,h));let b=s,_=g;const E=a>1||l,T=E?Array(h):[];let M;for(;(M=e.indexOf(t,_))>-1;){let Z=fa(t,{currentLocation:M,expectedLocation:g,distance:i,ignoreLocation:u});if(b=Math.min(Z,b),_=M+f,E){let ce=0;for(;ce<f;)T[M+ce]=1,ce+=1}}_=-1;let P=[],I=1,H=f+h;const ie=1<<f-1;for(let Z=0;Z<f;Z+=1){let ce=0,ye=H;for(;ce<ye;)fa(t,{errors:Z,currentLocation:g+ye,expectedLocation:g,distance:i,ignoreLocation:u})<=b?ce=ye:H=ye,ye=Math.floor((H-ce)/2+ce);H=ye;let Te=Math.max(1,g-ye+1),be=r?h:Math.min(g+ye,h)+f,O=Array(be+2);O[be+1]=(1<<Z)-1;for(let J=be;J>=Te;J-=1){let $e=J-1,D=n[e.charAt($e)];if(E&&(T[$e]=+!!D),O[J]=(O[J+1]<<1|1)&D,Z&&(O[J]|=(P[J+1]|P[J])<<1|1|P[J+1]),O[J]&ie&&(I=fa(t,{errors:Z,currentLocation:$e,expectedLocation:g,distance:i,ignoreLocation:u}),I<=b)){if(b=I,_=$e,_<=g)break;Te=Math.max(1,2*g-_)}}if(fa(t,{errors:Z+1,currentLocation:g,expectedLocation:g,distance:i,ignoreLocation:u})>b)break;P=O}const j={isMatch:_>=0,score:Math.max(.001,I)};if(E){const Z=QO(T,a);Z.length?l&&(j.indices=Z):j.isMatch=!1}return j}function ZO(e){let t={};for(let n=0,o=e.length;n<o;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<o-n-1}return t}class mm{constructor(t,{location:n=Re.location,threshold:o=Re.threshold,distance:i=Re.distance,includeMatches:s=Re.includeMatches,findAllMatches:r=Re.findAllMatches,minMatchCharLength:a=Re.minMatchCharLength,isCaseSensitive:l=Re.isCaseSensitive,ignoreLocation:u=Re.ignoreLocation}={}){if(this.options={location:n,threshold:o,distance:i,includeMatches:s,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:u},this.pattern=l?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const f=(g,b)=>{this.chunks.push({pattern:g,alphabet:ZO(g),startIndex:b})},h=this.pattern.length;if(h>Yo){let g=0;const b=h%Yo,_=h-b;for(;g<_;)f(this.pattern.substr(g,Yo),g),g+=Yo;if(b){const E=h-Yo;f(this.pattern.substr(E),E)}}else f(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,includeMatches:o}=this.options;if(n||(t=t.toLowerCase()),this.pattern===t){let _={isMatch:!0,score:0};return o&&(_.indices=[[0,t.length-1]]),_}const{location:i,distance:s,threshold:r,findAllMatches:a,minMatchCharLength:l,ignoreLocation:u}=this.options;let f=[],h=0,g=!1;this.chunks.forEach(({pattern:_,alphabet:E,startIndex:T})=>{const{isMatch:M,score:P,indices:I}=XO(t,_,E,{location:i+T,distance:s,threshold:r,findAllMatches:a,minMatchCharLength:l,includeMatches:o,ignoreLocation:u});M&&(g=!0),h+=P,M&&I&&(f=[...f,...I])});let b={isMatch:g,score:g?h/this.chunks.length:1};return g&&o&&(b.indices=f),b}}class yo{constructor(t){this.pattern=t}static isMultiMatch(t){return gm(t,this.multiRegex)}static isSingleMatch(t){return gm(t,this.singleRegex)}search(){}}function gm(e,t){const n=e.match(t);return n?n[1]:null}class eL extends yo{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 tL extends yo{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const o=t.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,t.length-1]}}}class nL extends yo{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 oL extends yo{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 iL extends yo{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 sL extends yo{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 ym extends yo{constructor(t,{location:n=Re.location,threshold:o=Re.threshold,distance:i=Re.distance,includeMatches:s=Re.includeMatches,findAllMatches:r=Re.findAllMatches,minMatchCharLength:a=Re.minMatchCharLength,isCaseSensitive:l=Re.isCaseSensitive,ignoreLocation:u=Re.ignoreLocation}={}){super(t),this._bitapSearch=new mm(t,{location:n,threshold:o,distance:i,includeMatches:s,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 wm extends yo{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,o;const i=[],s=this.pattern.length;for(;(o=t.indexOf(this.pattern,n))>-1;)n=o+s,i.push([o,n-1]);const r=!!i.length;return{isMatch:r,score:r?0:1,indices:i}}}const Sc=[eL,wm,nL,oL,sL,iL,tL,ym],bm=Sc.length,rL=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,aL="|";function lL(e,t={}){return e.split(aL).map(n=>{let o=n.trim().split(rL).filter(s=>s&&!!s.trim()),i=[];for(let s=0,r=o.length;s<r;s+=1){const a=o[s];let l=!1,u=-1;for(;!l&&++u<bm;){const f=Sc[u];let h=f.isMultiMatch(a);h&&(i.push(new f(h,t)),l=!0)}if(!l)for(u=-1;++u<bm;){const f=Sc[u];let h=f.isSingleMatch(a);if(h){i.push(new f(h,t));break}}}return i})}const cL=new Set([ym.type,wm.type]);class uL{constructor(t,{isCaseSensitive:n=Re.isCaseSensitive,includeMatches:o=Re.includeMatches,minMatchCharLength:i=Re.minMatchCharLength,ignoreLocation:s=Re.ignoreLocation,findAllMatches:r=Re.findAllMatches,location:a=Re.location,threshold:l=Re.threshold,distance:u=Re.distance}={}){this.query=null,this.options={isCaseSensitive:n,includeMatches:o,minMatchCharLength:i,findAllMatches:r,ignoreLocation:s,location:a,threshold:l,distance:u},this.pattern=n?t:t.toLowerCase(),this.query=lL(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:i}=this.options;t=i?t:t.toLowerCase();let s=0,r=[],a=0;for(let l=0,u=n.length;l<u;l+=1){const f=n[l];r.length=0,s=0;for(let h=0,g=f.length;h<g;h+=1){const b=f[h],{isMatch:_,indices:E,score:T}=b.search(t);if(_){if(s+=1,a+=T,o){const M=b.constructor.type;cL.has(M)?r=[...r,...E]:r.push(E)}}else{a=0,s=0,r.length=0;break}}if(s){let h={isMatch:!0,score:a/s};return o&&(h.indices=r),h}}return{isMatch:!1,score:1}}}const Ac=[];function dL(...e){Ac.push(...e)}function Pc(e,t){for(let n=0,o=Ac.length;n<o;n+=1){let i=Ac[n];if(i.condition(e,t))return new i(e,t)}return new mm(e,t)}const pa={AND:"$and",OR:"$or"},Tc={PATH:"$path",PATTERN:"$val"},Ic=e=>!!(e[pa.AND]||e[pa.OR]),fL=e=>!!e[Tc.PATH],pL=e=>!Un(e)&&cm(e)&&!Ic(e),_m=e=>({[pa.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function vm(e,t,{auto:n=!0}={}){const o=i=>{let s=Object.keys(i);const r=fL(i);if(!r&&s.length>1&&!Ic(i))return o(_m(i));if(pL(i)){const l=r?i[Tc.PATH]:s[0],u=r?i[Tc.PATTERN]:i[l];if(!Cn(u))throw new Error(HO(l));const f={keyId:Ec(l),pattern:u};return n&&(f.searcher=Pc(u,t)),f}let a={children:[],operator:s[0]};return s.forEach(l=>{const u=i[l];Un(u)&&u.forEach(f=>{a.children.push(o(f))})}),a};return Ic(e)||(e=_m(e)),o(e)}function hL(e,{ignoreFieldNorm:t=Re.ignoreFieldNorm}){e.forEach(n=>{let o=1;n.matches.forEach(({key:i,norm:s,score:r})=>{const a=i?i.weight:null;o*=Math.pow(r===0&&a?Number.EPSILON:r,(a||1)*(t?1:s))}),n.score=o})}function mL(e,t){const n=e.matches;t.matches=[],Gt(n)&&n.forEach(o=>{if(!Gt(o.indices)||!o.indices.length)return;const{indices:i,value:s}=o;let r={indices:i,value:s};o.key&&(r.key=o.key.src),o.idx>-1&&(r.refIndex=o.idx),t.matches.push(r)})}function gL(e,t){t.score=e.score}function yL(e,t,{includeMatches:n=Re.includeMatches,includeScore:o=Re.includeScore}={}){const i=[];return n&&i.push(mL),o&&i.push(gL),e.map(s=>{const{idx:r}=s,a={item:t[r],refIndex:r};return i.length&&i.forEach(l=>{l(s,a)}),a})}class ki{constructor(t,n={},o){this.options={...Re,...n},this.options.useExtendedSearch,this._keyStore=new WO(this.options.keys),this.setCollection(t,o)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof kc))throw new Error(UO);this._myIndex=n||hm(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){!Gt(t)||(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let o=0,i=this._docs.length;o<i;o+=1){const s=this._docs[o];t(s,o)&&(this.removeAt(o),o-=1,i-=1,n.push(s))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:o,includeScore:i,shouldSort:s,sortFn:r,ignoreFieldNorm:a}=this.options;let l=Cn(t)?Cn(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return hL(l,{ignoreFieldNorm:a}),s&&l.sort(r),lm(n)&&n>-1&&(l=l.slice(0,n)),yL(l,this._docs,{includeMatches:o,includeScore:i})}_searchStringList(t){const n=Pc(t,this.options),{records:o}=this._myIndex,i=[];return o.forEach(({v:s,i:r,n:a})=>{if(!Gt(s))return;const{isMatch:l,score:u,indices:f}=n.searchIn(s);l&&i.push({item:s,idx:r,matches:[{score:u,value:s,norm:a,indices:f}]})}),i}_searchLogical(t){const n=vm(t,this.options),o=(a,l,u)=>{if(!a.children){const{keyId:h,searcher:g}=a,b=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(l,h),searcher:g});return b&&b.length?[{idx:u,item:l,matches:b}]:[]}const f=[];for(let h=0,g=a.children.length;h<g;h+=1){const b=a.children[h],_=o(b,l,u);if(_.length)f.push(..._);else if(a.operator===pa.AND)return[]}return f},i=this._myIndex.records,s={},r=[];return i.forEach(({$:a,i:l})=>{if(Gt(a)){let u=o(n,a,l);u.length&&(s[l]||(s[l]={idx:l,item:a,matches:[]},r.push(s[l])),u.forEach(({matches:f})=>{s[l].matches.push(...f)}))}}),r}_searchObjectList(t){const n=Pc(t,this.options),{keys:o,records:i}=this._myIndex,s=[];return i.forEach(({$:r,i:a})=>{if(!Gt(r))return;let l=[];o.forEach((u,f)=>{l.push(...this._findMatches({key:u,value:r[f],searcher:n}))}),l.length&&s.push({idx:a,item:r,matches:l})}),s}_findMatches({key:t,value:n,searcher:o}){if(!Gt(n))return[];let i=[];if(Un(n))n.forEach(({v:s,i:r,n:a})=>{if(!Gt(s))return;const{isMatch:l,score:u,indices:f}=o.searchIn(s);l&&i.push({score:u,key:t,value:s,idx:r,norm:a,indices:f})});else{const{v:s,n:r}=n,{isMatch:a,score:l,indices:u}=o.searchIn(s);a&&i.push({score:l,key:t,value:s,norm:r,indices:u})}return i}}ki.version="7.0.0",ki.createIndex=hm,ki.parseIndex=JO,ki.config=Re,ki.parseQuery=vm,dL(uL);const wL={class:"ce-goto-input-wrap"},bL=["disabled"],_L=["disabled"],vL={class:"ce-goto-sug"},xL=["onMousedown","sid"],CL={class:"ce-goto-sug-index"},$L={class:"ce-goto-sug-prefix"},EL=c("span",{class:"ce-goto-sep"},"/",-1),kL={class:"ce-goto-sug-name"},SL=Ne({__name:"GotoPath",setup(e){const t=de(!1),n=de(!1),o=de(null),i=de(null),s=de(""),r=de([]),a=de(!1),l=vn(()=>s.value.trim().length>0);let u="";Pt(async()=>{var O;t.value=!0,(O=i.value)==null||O.focus(),window.addEventListener("message",async re=>{if(re.data.event===lt.listRendered){const $e=await Wt(!1);$e!==u&&(r.value=[],await Z(!1)),u=$e}})});async function f(O){if(console.log("[handleKeydown]",O.key),Id(O),O.key==="Enter"){H.value>-1?ye():await Te(s.value);return}if(O.key==="Escape"){await be();return}["ArrowUp","ArrowDown"].includes(O.key)?ie(O):h(O)}const h=Rt(async O=>{g()},200);async function g(){try{r.value=[],await Z(!1);const O={keyword:"",parentId:await Wt(!1),parentPath:await Ja(),isSubOfCurrent:!0};console.log("[getSug] searchData:",O);const re=await P(O,!1);if(console.log("[searchData] items:",re),!re.length){ae({icon:"warning",text:"没有匹配的建议",timer:1500,position:"top-right"});return}const J=await b(re,O);console.log("[searchData] sugs:",J),r.value=J,H.value=-1,await Z(J.length>0)}catch(O){console.warn(O),await Z(!1),ae({icon:"error",text:O.toString(),timer:2e3,position:"top-right"})}}async function b(O,re){const J=[];for(let N=0;N<O.length;N++){const we=O[N];J.push({id:we.id,prefix:re.parentPath==="/"?"":re.parentPath,name:we.name,active:!1})}const $e=s.value.trim();if(!$e)return J;const D=/^(\.\/)?[^\/]+/.test($e),K=Ya($e,"../");if(console.log("[toSug] isSubOfCurrent:",D,"kwParentPath:",K),D||K===re.parentPath){const N=new ki(J,{keys:["name"],threshold:.6,includeScore:!0});let we=$e;if(K===re.parentPath){const pe=$e.split(/[\\/]/).filter(Boolean);we=pe[pe.length-1]}const Ae=N.search(we);console.log("[toSug] fuse res:",Ae);let De=!1;return Ae.forEach(pe=>{pe.score===void 0?(console.warn("[toSug] r.score is undefined:",pe),De=!0,pe.score=0):pe.score!==void 0&&isNaN(pe.score)&&(console.warn("[toSug] r.score is NaN:",pe),De=!0,pe.score=0)}),De&&Ae.sort((pe,ue)=>pe.score-ue.score),Ae.map(pe=>pe.item)}return J}const _=new Map,E=new Map;async function T(O){return _.get(O)||!1}async function M(O,re){_.set(O,re)}async function P(O,re){const J=E.get(O.parentPath);if(J)return console.log(`[getSubDirs] path "${O.parentPath}" is cached`),J.items;if(await T(O.parentPath))return console.warn(`[getSubDirs] path "${O.parentPath}" is loading`),[];await M(O.parentPath,!0);try{const $e=Wn({cid:O.parentId,limit:1150,show_dir:xa.true}),D=await yd($e);if(!D.count)return[];const K=[];for(let N=0;N<D.data.length;N++){const we=await qi(D.data[N]);if(we.isDir)K.push(we);else if(re)break}return E.set(O.parentPath,{count:K.length,dirPath:O.parentPath,dirId:O.parentId,items:K}),K}catch($e){console.warn($e)}finally{await M(O.parentPath,!1)}return[]}async function I(O,re){console.log("[handleSugClick]",O,re);const J=Ys([O.prefix,O.name]);console.log("[handleSugClick] path:",J),await Te(J)}const H=de(-1);async function ie(O){var D;console.log("[navigateSug]",O.key),O.preventDefault(),O.stopPropagation();let re=H.value;if(O.key==="ArrowUp")re--;else if(O.key==="ArrowDown")re++;else if(O.key==="Enter"){const K=r.value[H.value];K&&await I(K,O);return}else return;re<0?re=0:re>=r.value.length&&(re=r.value.length-1),H.value=re,r.value.forEach((K,N)=>{K.active=N===re});const J=r.value[re];if(!J)return;const $e=(D=o.value)==null?void 0:D.querySelector(`[sid="${J.id}"]`);$e==null||$e.scrollIntoView()}async function j(){var O;s.value="",(O=i.value)==null||O.focus(),await g()}async function Z(O){var re;a.value=O,O&&((re=i.value)==null||re.focus())}async function ce(O){if(wb(O))return"0";const re=await Ja();return O=Js(O,Yn.unix),O=Ya(re,O,Yn.unix),await ai(O)}async function ye(){const O=r.value[H.value];if(!O)return;const re=Ys([O.prefix,O.name],Yn.unix);console.log("[gotoByCurrentSug] path:",re),await Te(re)}async function Te(O){var re;if(!n.value){O=O.trim(),ae({text:"正在获取路径信息...",timer:0,position:"top-right"}),me.showLoading(),n.value=!0;try{const J=await ce(O);unsafeWindow.Main.GotoDir(1,J,0,""),ae({icon:"success",text:"获取路径信息成功,现在打开...",timer:1e3,position:"top-right"}),(re=i.value)==null||re.focus(),r.value=[],H.value=-1}catch(J){me.fire({icon:"error",title:"跳转失败",text:J.message})}finally{me.hideLoading(),n.value=!1}}}async function be(){if(H.value>-1)r.value.forEach(O=>O.active=!1),H.value=-1,await Z(!1);else{const O=document.querySelector("#ceGotoPathApp");O==null||O.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(O,re)=>(B(),z("div",{ref_key:"refMain",ref:o,class:Qe(["ce-goto-main",{"ce-goto-sug-shown":a.value}])},[c("div",wL,[X(c("input",{ref_key:"refInput",ref:i,"onUpdate:modelValue":re[0]||(re[0]=J=>s.value=J),class:"ce-goto-input",placeholder:"回车确认跳转 | Esc关闭 | 可搜索当前目录的子目录显示下拉列表,上下方向键选择",onKeydown:f},null,544),[[Ke,s.value]]),c("button",{type:"button",class:"ce-goto-input-btn","data-cmd":"clear",onClick:j,title:"清空输入框",disabled:!fe(l)},"清空",8,bL),c("button",{type:"button",class:"ce-goto-input-btn","data-cmd":"toggle",onClick:re[1]||(re[1]=J=>Z(!1)),title:"收起建议列表",disabled:!a.value},"收起",8,_L)]),c("div",vL,[(B(!0),z(je,null,st(r.value,(J,$e)=>(B(),z("div",{key:$e,class:Qe(["ce-goto-sug-item",{active:J.active}]),onMousedown:m0(D=>I(J,D),["left","stop","prevent"]),sid:J.id},[c("span",CL,ge($e+1),1),c("span",$L,ge(J.prefix),1),EL,c("span",kL,ge(J.name),1)],42,xL))),128))])],2))}}),eN="";async function AL(){const e=await jr(),{host:t,search:n}=location;!/115\.com$/.test(t)||(console.log("[List] running...",e),(n.includes("ct=file")||n.includes("mode=search"))&&j0(),TL(e),PL(e),setTimeout(async()=>{await LL(),ML(e),DL(e)},2e3))}async function PL(e){const{fileSelectorDefaultView:t}=e;t&&(console.log("[setSelectorView]",t),unsafeWindow.localStorage.setItem("FS_view",t))}async function TL(e){const{host:t,search:n}=location;if(!n.includes("ct=file"))return;const o=await En("#js_top_header_file_path_box");e.showGotoButtonOnPathBar&&OL(e,o),e.showCopyButtonOnPathBar&&IL(e,o)}async function IL(e,t){const n="ceCopyPath";let o=t.querySelector(`#${n}`);const i=async()=>{const r=await Ja();nn(r),ae({icon:"success",text:"路径已复制",timer:1e3,position:"top-right"})};o||(o=await(async()=>{const r=document.createElement("button");return r.className="pure-button button-mini ce-path-btn",r.id=n,r.title="复制路径",r.innerHTML="<span>复制</span>",r.addEventListener("click",i),r})(),t.prepend(o))}async function OL(e,t){const n=t.querySelector(".top-file-path"),o="ceGotoPath";let i=t.querySelector(`#${o}`);const s=xn(SL),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 g=t.querySelector(`#${r}`);g&&(g.style.display="none")}},u=async()=>{let g=t.querySelector(`#${r}`);g||(g=await h(),n.after(g)),g.querySelector(".ce-goto-main")?setTimeout(()=>{const _=document.querySelector(".ce-goto-input");_==null||_.focus()},200):s.mount(g),g.style.display="block"},f=async()=>{const g=document.createElement("button");return g.className="pure-button button-mini ce-path-btn text-primary",g.id=o,g.title=`
      【这是一个实验功能】
      跳转到指定路径。使用:
      - 空白、单个斜杠: 根目录
      - 相对路径1: 开头不带斜杠,当前目录下的子路径
      - 相对路径2: 开头带有../,当前目录的上级目录,可以多级
      - 绝对路径: 开头带有斜杠,从根目录开始的路径

      斜杠风格不限,支持模糊搜索当前目录的子目录。
      回车键跳转,Esc键关闭输入框。`,g.innerHTML="<span>跳转</span>",g.addEventListener("click",a),g},h=async()=>{const g=document.createElement("div");return g.id=r,g.style.width="50%",g};i||(i=await f(),t.prepend(i))}async function LL(){if(window!==window.top)return;async function e(t){var o,i;const n=on();n&&((i=(o=n.Core)==null?void 0:o.FileConfig)==null?void 0:i.DataAPI)&&t(!0)}try{return await Vn(e,250,3e4)}catch(t){throw new Error(`awaitDataAPI failed:${t.toString()}`)}}async function ML(e){if(!e.noUpdateDirAfterRename||window!==window.top)return;let t=!0,n="",o=!1;const i=on(),s=Core.FileReNameDG.Show,r=i.Core.Dir.Rename,a=i.Core.FileConfig.DataAPI.UpdateDir;i.Core.FileReNameDG.Show=async(...l)=>{n=l[0],o=!0,s(...l)},i.Core.Dir.Rename=async(...l)=>{n=l[1],o=!1,r(...l)},i.Core.FileConfig.DataAPI.UpdateDir=async l=>{if(t){const u=await zi();let f=`li[file_id="${n}"]`;o||(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"),ae({icon:"warning",text:"重命名的是当前目录,忽略「重命名后不刷新列表」选项"}),a(l);return}if(ae({icon:"info",text:"启用了「重命名后不刷新列表」选项,不会刷新文件列表"}),h.find(".file-modified span").text("刚刚"),!o){const g=await kt(n),{file_name:b}=g;h.attr("cate_name",b),h.attr("title",b);const _=h.find(".file-name a.name");_.length?(_.attr("title",b).text(b),_.text(b)):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===lt.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 g=document.querySelector("div.dialog-box.window-current .file-rename");if(!g){console.warn("[list handleNoUpdateDirAfterRename] .file-rename not found");return}const b=document.createElement("div"),_=`
          <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>`;b.innerHTML=_,g.insertAdjacentElement("afterend",b);const E=document.querySelector("#cbNoUpdateDir");E&&(E.checked=t,E.addEventListener("change",()=>{t=E.checked}))}}})}async function DL(e){if(!e.noReloadAfterMove||window!==window.top)return;let t=!0,n=[];const o=on(),i=o.Core.FileMenu.DoEvent,s=o.Core.FileConfig.DataAPI.Reload;o.Core.FileConfig.DataAPI.Reload=async(...r)=>{if(t){ae({icon:"info",text:"启用了「移动后不刷新文本列表」选项,不会刷新文件列表"});for(let a=0;a<n.length;a++)Ld(n[a][0])}else s(...r)},o.Core.FileMenu.DoEvent=async(...r)=>{n=r[0],i(...r)},window.addEventListener("message",async r=>{var l;if(r.data.event===lt.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 g=document.createElement("div"),b=`
            <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>`;g.innerHTML=b,f.insertAdjacentElement("afterend",g),h=document.querySelector("#cbNoReload"),h&&(h.checked=t,h.addEventListener("change",()=>{t=h.checked}))}}}})}const tN="";async function RL(){const e=await Zh();!await Ed()||(console.log("[Search] running...",e),FL(),NL(e))}async function NL(e){const t=await En(".top-file-path");e.showSelectTargetButtonOnPathBar&&BL(e,t)}async function BL(e,t){console.log("[showSelectTargetButtonOnPathBar]");const n="ce-btn-select";let o=t.querySelector(`.${n}`);const i=async()=>{unsafeWindow.parent.Core.FileSelectDG.Open((r,a)=>{console.log("[Core.FileSelectDG.Open]",r,a);const l=r[r.length-1],u=document.createElement("a");u.href="javascript:;",u.className="dir-tab",u.textContent=l.cname,u.style.display="none",u.setAttribute("search_btn_file",l.cid),t.querySelector(".file-path").append(u),u.click()},{select:1,nf:1,show_record:0,show_copy:1,btn_txt:"在该目录下搜索",select_txt:"搜索"})};o||(o=await(async()=>{const r=document.createElement("a");return r.className=`dir-tab ${n}`,r.href="javascript:;",r.title="选择目录",r.textContent="选择目录",r.addEventListener("click",i),r})(),t.append(o))}async function FL(e){document.body.classList.add("ce-search-page"),parent.document.body.classList.add("ce-search-page")}const nN="";async function jL(){console.log("[Tools] running...")}const oN="";async function UL(){const{host:e,search:t}=location;if(!e.includes("anxia.com"))return;console.log("[anxia] run");const n=await im();qL(n),zL(n),HL()}async function HL(e){const t=async o=>{const i=document.createElement("li");i.setAttribute("pickcode",o.pickCode),i.setAttribute("style","padding:0px;");const s=document.createElement("a");return s.href="/?hls=1&pickcode="+o.pickCode,s.setAttribute("style","height:auto;text-decoration:none;padding:5px 0 5px 5px;"),s.setAttribute("title",o.name),s.innerHTML='<span style="word-break:break-all">'+o.name+"</span>",i.appendChild(s),i};let n="";window.addEventListener("message",async o=>{if(o.data.event==="play"){const i=await En("ul#js-video_list"),s=o.data.body.id;if(n&&n===s)if(i.childElementCount){console.log(`[playSelected] same id: ${s} 但是播放列表已经渲染过了,忽略`);return}else console.warn(`[playSelected] same id: ${s} 但是播放列表为空,将会进行渲染`);n=s;const r=o.data.body.files;console.log(`[playSelected] id: ${s}, 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 qL(e){if(!e.defaultWebFull)return;const t=await En('[rel="web_fullscreen"]');t.querySelector('[rel="tooltips"]').innerText==="网页全屏"&&t.click()}async function zL(e){if(!e.defaultOpenPlayList)return;const t=await En("a#js_pl_control_expand");t.querySelector('[rel="tooltips"]').innerText==="展开播放列表"&&t.click()}location.host==="115.com"&&(window.COMMONHEADERUSERINFO=window.COMMONHEADERUSERINFO||{}),(async()=>(console.log("Cloud115 Enhancer launched!"),wx(),CE(),s2(),b2(),AL(),RL(),jL(),UL(),AO()))()})();