blockmine 1.17.0 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/backend/src/api/routes/bots.js +1 -1
- package/backend/src/core/BotManager.js +13 -2
- package/backend/src/core/BotProcess.js +11 -0
- package/frontend/dist/assets/{index-BpUwmzIs.js → index-UZUhEwz5.js} +2 -2
- package/frontend/dist/index.html +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
# История версий
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
### [1.17.1](https://github.com/blockmineJS/blockmine/compare/v1.17.0...v1.17.1) (2025-07-24)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### 🐛 Исправления
|
|
8
|
+
|
|
9
|
+
* добавлена синхронизация статусов ботов каждые 10 секунд и обработка события 'bot_ready' ([c9e8bcc](https://github.com/blockmineJS/blockmine/commit/c9e8bcc5f1b31a122aa05b2bb65f3b4127dfb79a))
|
|
10
|
+
* исправление ошибок со скинами. вроде ([459d65b](https://github.com/blockmineJS/blockmine/commit/459d65ba40ec18da5d9a7402992c2cd6aa73a7d2))
|
|
11
|
+
* исправление ошибок со скинами. by сахарок ([433e5c6](https://github.com/blockmineJS/blockmine/commit/433e5c6222e385cfd0ba656c78eecd67f094b0ef))
|
|
12
|
+
* уменьшены лимиты логов для ботов. так много явно не надо ([d690dcd](https://github.com/blockmineJS/blockmine/commit/d690dcd5701603d455d105a2032f9262923cf5f0))
|
|
13
|
+
|
|
4
14
|
## [1.17.0](https://github.com/blockmineJS/blockmine/compare/v1.16.3...v1.17.0) (2025-07-24)
|
|
5
15
|
|
|
6
16
|
|
|
@@ -163,7 +163,7 @@ router.get('/state', conditionalListAuth, (req, res) => {
|
|
|
163
163
|
router.get('/:id/logs', conditionalListAuth, (req, res) => {
|
|
164
164
|
try {
|
|
165
165
|
const botId = parseInt(req.params.id, 10);
|
|
166
|
-
const { limit =
|
|
166
|
+
const { limit = 50, offset = 0 } = req.query;
|
|
167
167
|
|
|
168
168
|
const logs = botManager.getBotLogs(botId);
|
|
169
169
|
|
|
@@ -55,6 +55,7 @@ class BotManager {
|
|
|
55
55
|
|
|
56
56
|
getInstanceId();
|
|
57
57
|
setInterval(() => this.updateAllResourceUsage(), 5000);
|
|
58
|
+
setInterval(() => this.syncBotStatuses(), 10000);
|
|
58
59
|
if (config.telemetry?.enabled) {
|
|
59
60
|
setInterval(() => this.sendHeartbeat(), 5 * 60 * 1000);
|
|
60
61
|
}
|
|
@@ -322,6 +323,14 @@ class BotManager {
|
|
|
322
323
|
if (message) this.appendLog(botId, `[SYSTEM] ${message}`);
|
|
323
324
|
getIO().emit('bot:status', { botId, status, message });
|
|
324
325
|
}
|
|
326
|
+
|
|
327
|
+
syncBotStatuses() {
|
|
328
|
+
for (const [botId, child] of this.bots.entries()) {
|
|
329
|
+
const actualStatus = child.killed ? 'stopped' : 'running';
|
|
330
|
+
const { getIO } = require('../real-time/socketHandler');
|
|
331
|
+
getIO().emit('bot:status', { botId, status: actualStatus });
|
|
332
|
+
}
|
|
333
|
+
}
|
|
325
334
|
|
|
326
335
|
appendLog(botId, logContent) {
|
|
327
336
|
const { getIO } = require('../real-time/socketHandler');
|
|
@@ -330,7 +339,7 @@ class BotManager {
|
|
|
330
339
|
content: logContent,
|
|
331
340
|
};
|
|
332
341
|
const currentLogs = this.logCache.get(botId) || [];
|
|
333
|
-
const newLogs = [...currentLogs.slice(-
|
|
342
|
+
const newLogs = [...currentLogs.slice(-199), logEntry];
|
|
334
343
|
this.logCache.set(botId, newLogs);
|
|
335
344
|
getIO().emit('bot:log', { botId, log: logEntry });
|
|
336
345
|
}
|
|
@@ -380,7 +389,6 @@ class BotManager {
|
|
|
380
389
|
if (decryptedConfig.password) decryptedConfig.password = decrypt(decryptedConfig.password);
|
|
381
390
|
if (decryptedConfig.proxyPassword) decryptedConfig.proxyPassword = decrypt(decryptedConfig.proxyPassword);
|
|
382
391
|
|
|
383
|
-
// Очищаем данные прокси от лишних символов
|
|
384
392
|
if (decryptedConfig.proxyUsername) decryptedConfig.proxyUsername = decryptedConfig.proxyUsername.trim();
|
|
385
393
|
if (decryptedConfig.proxyPassword) decryptedConfig.proxyPassword = decryptedConfig.proxyPassword.trim();
|
|
386
394
|
|
|
@@ -431,6 +439,9 @@ class BotManager {
|
|
|
431
439
|
case 'status':
|
|
432
440
|
this.emitStatusUpdate(botId, message.status);
|
|
433
441
|
break;
|
|
442
|
+
case 'bot_ready':
|
|
443
|
+
this.emitStatusUpdate(botId, 'running', 'Бот успешно подключился к серверу.');
|
|
444
|
+
break;
|
|
434
445
|
case 'validate_and_run_command':
|
|
435
446
|
await this.handleCommandValidation(botConfig, message);
|
|
436
447
|
break;
|
|
@@ -22,6 +22,17 @@ const pendingRequests = new Map();
|
|
|
22
22
|
const entityMoveThrottles = new Map();
|
|
23
23
|
let connectionTimeout = null;
|
|
24
24
|
|
|
25
|
+
const originalJSONParse = JSON.parse
|
|
26
|
+
JSON.parse = function(text, reviver) {
|
|
27
|
+
if (typeof text !== 'string') return originalJSONParse(text, reviver)
|
|
28
|
+
try {
|
|
29
|
+
return originalJSONParse(text, reviver)
|
|
30
|
+
} catch (e) {
|
|
31
|
+
const fixed = text.replace(/([{,])\s*([a-zA-Z0-9_]+)\s*:/g, '$1"$2":')
|
|
32
|
+
return originalJSONParse(fixed, reviver)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
25
36
|
function sendLog(content) {
|
|
26
37
|
if (process.send) {
|
|
27
38
|
process.send({ type: 'log', content });
|
|
@@ -67,7 +67,7 @@ Please change the parent <Route path="${M}"> to <Route path="${M==="/"?"*":`${M}
|
|
|
67
67
|
* LICENSE.md file in the root directory of this source tree.
|
|
68
68
|
*
|
|
69
69
|
* @license MIT
|
|
70
|
-
*/function jve(e){return g.createElement(Bxe,{flushSync:wa.flushSync,...e})}const CQ=e=>{let t;const n=new Set,r=(d,f)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const y=t;t=f??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(v=>v(t,y))}},o=()=>t,l={setState:r,getState:o,getInitialState:()=>h,subscribe:d=>(n.add(d),()=>n.delete(d))},h=t=e(r,o,l);return l},Lve=e=>e?CQ(e):CQ,Ave=e=>e;function Eve(e,t=Ave){const n=ce.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return ce.useDebugValue(n),n}const _Q=e=>{const t=Lve(e),n=r=>Eve(t,r);return Object.assign(n,t),n},qae=e=>e?_Q(e):_Q;var Hae=Symbol.for("immer-nothing"),NQ=Symbol.for("immer-draftable"),Uo=Symbol.for("immer-state");function Fa(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Sp=Object.getPrototypeOf;function Cp(e){return!!e&&!!e[Uo]}function yh(e){var t;return e?Vae(e)||Array.isArray(e)||!!e[NQ]||!!((t=e.constructor)!=null&&t[NQ])||WD(e)||KD(e):!1}var Tve=Object.prototype.constructor.toString();function Vae(e){if(!e||typeof e!="object")return!1;const t=Sp(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Tve}function JP(e,t){XD(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function XD(e){const t=e[Uo];return t?t.type_:Array.isArray(e)?1:WD(e)?2:KD(e)?3:0}function cF(e,t){return XD(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Bae(e,t,n){const r=XD(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Ive(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function WD(e){return e instanceof Map}function KD(e){return e instanceof Set}function bl(e){return e.copy_||e.base_}function lF(e,t){if(WD(e))return new Map(e);if(KD(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Vae(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Uo];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const i=o[a],l=r[i];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[i]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[i]})}return Object.create(Sp(e),r)}else{const r=Sp(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function pG(e,t=!1){return YD(e)||Cp(e)||!yh(e)||(XD(e)>1&&(e.set=e.add=e.clear=e.delete=Rve),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>pG(r,!0))),e}function Rve(){Fa(2)}function YD(e){return Object.isFrozen(e)}var $ve={};function gh(e){const t=$ve[e];return t||Fa(0,e),t}var Mm;function Fae(){return Mm}function Pve(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function jQ(e,t){t&&(gh("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function uF(e){dF(e),e.drafts_.forEach(Dve),e.drafts_=null}function dF(e){e===Mm&&(Mm=e.parent_)}function LQ(e){return Mm=Pve(Mm,e)}function Dve(e){const t=e[Uo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function AQ(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Uo].modified_&&(uF(t),Fa(4)),yh(e)&&(e=QP(t,e),t.parent_||eD(t,e)),t.patches_&&gh("Patches").generateReplacementPatches_(n[Uo].base_,e,t.patches_,t.inversePatches_)):e=QP(t,n,[]),uF(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Hae?e:void 0}function QP(e,t,n){if(YD(t))return t;const r=t[Uo];if(!r)return JP(t,(o,a)=>EQ(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return eD(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,i=!1;r.type_===3&&(a=new Set(o),o.clear(),i=!0),JP(a,(l,h)=>EQ(e,r,o,l,h,n,i)),eD(e,o,!1),n&&e.patches_&&gh("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function EQ(e,t,n,r,o,a,i){if(Cp(o)){const l=a&&t&&t.type_!==3&&!cF(t.assigned_,r)?a.concat(r):void 0,h=QP(e,o,l);if(Bae(n,r,h),Cp(h))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(yh(o)&&!YD(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;QP(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&eD(e,o)}}function eD(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&pG(t,n)}function zve(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Fae(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=mG;n&&(o=[r],a=Sm);const{revoke:i,proxy:l}=Proxy.revocable(o,a);return r.draft_=l,r.revoke_=i,l}var mG={get(e,t){if(t===Uo)return e;const n=bl(e);if(!cF(n,t))return Ove(e,n,t);const r=n[t];return e.finalized_||!yh(r)?r:r===GH(e.base_,t)?(XH(e),e.copy_[t]=fF(r,e)):r},has(e,t){return t in bl(e)},ownKeys(e){return Reflect.ownKeys(bl(e))},set(e,t,n){const r=Uae(bl(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=GH(bl(e),t),a=o==null?void 0:o[Uo];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Ive(n,o)&&(n!==void 0||cF(e.base_,t)))return!0;XH(e),hF(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return GH(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,XH(e),hF(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=bl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Fa(11)},getPrototypeOf(e){return Sp(e.base_)},setPrototypeOf(){Fa(12)}},Sm={};JP(mG,(e,t)=>{Sm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Sm.deleteProperty=function(e,t){return Sm.set.call(this,e,t,void 0)};Sm.set=function(e,t,n){return mG.set.call(this,e[0],t,n,e[0])};function GH(e,t){const n=e[Uo];return(n?bl(n):e)[t]}function Ove(e,t,n){var o;const r=Uae(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Uae(e,t){if(!(t in e))return;let n=Sp(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Sp(n)}}function hF(e){e.modified_||(e.modified_=!0,e.parent_&&hF(e.parent_))}function XH(e){e.copy_||(e.copy_=lF(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var qve=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const i=this;return function(h=a,...d){return i.produce(h,f=>n.call(this,f,...d))}}typeof n!="function"&&Fa(6),r!==void 0&&typeof r!="function"&&Fa(7);let o;if(yh(t)){const a=LQ(this),i=fF(t,void 0);let l=!0;try{o=n(i),l=!1}finally{l?uF(a):dF(a)}return jQ(a,r),AQ(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Hae&&(o=void 0),this.autoFreeze_&&pG(o,!0),r){const a=[],i=[];gh("Patches").generateReplacementPatches_(t,o,a,i),r(a,i)}return o}else Fa(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...l)=>this.produceWithPatches(i,h=>t(h,...l));let r,o;return[this.produce(t,n,(i,l)=>{r=i,o=l}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){yh(e)||Fa(8),Cp(e)&&(e=Hve(e));const t=LQ(this),n=fF(e,void 0);return n[Uo].isManual_=!0,dF(t),n}finishDraft(e,t){const n=e&&e[Uo];(!n||!n.isManual_)&&Fa(9);const{scope_:r}=n;return jQ(r,t),AQ(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=gh("Patches").applyPatches_;return Cp(e)?r(e,t):this.produce(e,o=>r(o,t))}};function fF(e,t){const n=WD(e)?gh("MapSet").proxyMap_(e,t):KD(e)?gh("MapSet").proxySet_(e,t):zve(e,t);return(t?t.scope_:Fae()).drafts_.push(n),n}function Hve(e){return Cp(e)||Fa(10,e),Gae(e)}function Gae(e){if(!yh(e)||YD(e))return e;const t=e[Uo];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=lF(e,t.scope_.immer_.useStrictShallowCopy_)}else n=lF(e,!0);return JP(n,(r,o)=>{Bae(n,r,Gae(o))}),t&&(t.finalized_=!1),n}var Go=new qve,pF=Go.produce;Go.produceWithPatches.bind(Go);Go.setAutoFreeze.bind(Go);Go.setUseStrictShallowCopy.bind(Go);Go.applyPatches.bind(Go);Go.createDraft.bind(Go);Go.finishDraft.bind(Go);const Vve=e=>(t,n,r)=>(r.setState=(o,a,...i)=>{const l=typeof o=="function"?pF(o):o;return t(l,a,...i)},e(r.setState,n,r)),Xae=Vve,Hi=Object.create(null);Hi.open="0";Hi.close="1";Hi.ping="2";Hi.pong="3";Hi.message="4";Hi.upgrade="5";Hi.noop="6";const Gx=Object.create(null);Object.keys(Hi).forEach(e=>{Gx[Hi[e]]=e});const mF={type:"error",data:"parser error"},Wae=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Kae=typeof ArrayBuffer=="function",Yae=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,yG=({type:e,data:t},n,r)=>Wae&&t instanceof Blob?n?r(t):TQ(t,r):Kae&&(t instanceof ArrayBuffer||Yae(t))?n?r(t):TQ(new Blob([t]),r):r(Hi[e]+(t||"")),TQ=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function IQ(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let WH;function Bve(e,t){if(Wae&&e.data instanceof Blob)return e.data.arrayBuffer().then(IQ).then(t);if(Kae&&(e.data instanceof ArrayBuffer||Yae(e.data)))return t(IQ(e.data));yG(e,!1,n=>{WH||(WH=new TextEncoder),t(WH.encode(n))})}const RQ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S2=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<RQ.length;e++)S2[RQ.charCodeAt(e)]=e;const Fve=e=>{let t=e.length*.75,n=e.length,r,o=0,a,i,l,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),f=new Uint8Array(d);for(r=0;r<n;r+=4)a=S2[e.charCodeAt(r)],i=S2[e.charCodeAt(r+1)],l=S2[e.charCodeAt(r+2)],h=S2[e.charCodeAt(r+3)],f[o++]=a<<2|i>>4,f[o++]=(i&15)<<4|l>>2,f[o++]=(l&3)<<6|h&63;return d},Uve=typeof ArrayBuffer=="function",gG=(e,t)=>{if(typeof e!="string")return{type:"message",data:Zae(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Gve(e.substring(1),t)}:Gx[n]?e.length>1?{type:Gx[n],data:e.substring(1)}:{type:Gx[n]}:mF},Gve=(e,t)=>{if(Uve){const n=Fve(e);return Zae(n,t)}else return{base64:!0,data:e}},Zae=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Jae="",Xve=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,i)=>{yG(a,!1,l=>{r[i]=l,++o===n&&t(r.join(Jae))})})},Wve=(e,t)=>{const n=e.split(Jae),r=[];for(let o=0;o<n.length;o++){const a=gG(n[o],t);if(r.push(a),a.type==="error")break}return r};function Kve(){return new TransformStream({transform(e,t){Bve(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let KH;function ox(e){return e.reduce((t,n)=>t+n.length,0)}function ax(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Yve(e,t){KH||(KH=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(i,l){for(n.push(i);;){if(r===0){if(ox(n)<1)break;const h=ax(n,1);a=(h[0]&128)===128,o=h[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(ox(n)<2)break;const h=ax(n,2);o=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),r=3}else if(r===2){if(ox(n)<8)break;const h=ax(n,8),d=new DataView(h.buffer,h.byteOffset,h.length),f=d.getUint32(0);if(f>Math.pow(2,21)-1){l.enqueue(mF);break}o=f*Math.pow(2,32)+d.getUint32(4),r=3}else{if(ox(n)<o)break;const h=ax(n,o);l.enqueue(gG(a?h:KH.decode(h),t)),r=0}if(o===0||o>e){l.enqueue(mF);break}}}})}const Qae=4;function lr(e){if(e)return Zve(e)}function Zve(e){for(var t in lr.prototype)e[t]=lr.prototype[t];return e}lr.prototype.on=lr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};lr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};lr.prototype.off=lr.prototype.removeListener=lr.prototype.removeAllListeners=lr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this};lr.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this};lr.prototype.emitReserved=lr.prototype.emit;lr.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};lr.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ZD=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),xa=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Jve="arraybuffer";function eie(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Qve=xa.setTimeout,eke=xa.clearTimeout;function JD(e,t){t.useNativeTimers?(e.setTimeoutFn=Qve.bind(xa),e.clearTimeoutFn=eke.bind(xa)):(e.setTimeoutFn=xa.setTimeout.bind(xa),e.clearTimeoutFn=xa.clearTimeout.bind(xa))}const tke=1.33;function nke(e){return typeof e=="string"?rke(e):Math.ceil((e.byteLength||e.size)*tke)}function rke(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function tie(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function oke(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function ake(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class ike extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class xG extends lr{constructor(t){super(),this.writable=!1,JD(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new ike(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=gG(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=oke(t);return n.length?"?"+n:""}}class ske extends xG{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Wve(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Xve(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=tie()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let nie=!1;try{nie=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const cke=nie;function lke(){}class uke extends ske{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}let Xf=class Xx extends lr{constructor(t,n,r){super(),this.createRequest=t,JD(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=eie(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=Xx.requestsCount++,Xx.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=lke,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Xx.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Xf.requestsCount=0;Xf.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",$Q);else if(typeof addEventListener=="function"){const e="onpagehide"in xa?"pagehide":"unload";addEventListener(e,$Q,!1)}}function $Q(){for(let e in Xf.requests)Xf.requests.hasOwnProperty(e)&&Xf.requests[e].abort()}const dke=function(){const e=rie({xdomain:!1});return e&&e.responseType!==null}();class hke extends uke{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=dke&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Xf(rie,this.uri(),t)}}function rie(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||cke))return new XMLHttpRequest}catch{}if(!t)try{return new xa[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const oie=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class fke extends xG{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=oie?{}:eie(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;yG(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch{}o&&ZD(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=tie()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const YH=xa.WebSocket||xa.MozWebSocket;class pke extends fke{createSocket(t,n,r){return oie?new YH(t,n,r):n?new YH(t,n):new YH(t)}doWrite(t,n){this.ws.send(n)}}class mke extends xG{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=Yve(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=Kve();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:l,value:h})=>{l||(this.onPacket(h),a())}).catch(l=>{})};a();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&ZD(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const yke={websocket:pke,webtransport:mke,polling:hke},gke=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,xke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function yF(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=gke.exec(e||""),a={},i=14;for(;i--;)a[xke[i]]=o[i]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=vke(a,a.path),a.queryKey=kke(a,a.query),a}function vke(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function kke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const gF=typeof addEventListener=="function"&&typeof removeEventListener=="function",Wx=[];gF&&addEventListener("offline",()=>{Wx.forEach(e=>e())},!1);class Cc extends lr{constructor(t,n){if(super(),this.binaryType=Jve,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=yF(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=yF(n.host).host);JD(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=ake(this.opts.query)),gF&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Wx.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Qae,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Cc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Cc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=nke(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,ZD(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Cc.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),gF&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Wx.indexOf(this._offlineEventListener);r!==-1&&Wx.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Cc.protocol=Qae;class bke extends Cc{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Cc.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Cc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const y=new Error("probe error");y.transport=n.name,this.emitReserved("upgradeError",y)}}))};function a(){r||(r=!0,f(),n.close(),n=null)}const i=m=>{const y=new Error("probe error: "+m);y.transport=n.name,a(),this.emitReserved("upgradeError",y)};function l(){i("transport closed")}function h(){i("socket closed")}function d(m){n&&m.name!==n.name&&a()}const f=()=>{n.removeListener("open",o),n.removeListener("error",i),n.removeListener("close",l),this.off("close",h),this.off("upgrading",d)};n.once("open",o),n.once("error",i),n.once("close",l),this.once("close",h),this.once("upgrading",d),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let wke=class extends bke{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>yke[o]).filter(o=>!!o)),super(t,r)}};function Mke(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=yF(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const Ske=typeof ArrayBuffer=="function",Cke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,aie=Object.prototype.toString,_ke=typeof Blob=="function"||typeof Blob<"u"&&aie.call(Blob)==="[object BlobConstructor]",Nke=typeof File=="function"||typeof File<"u"&&aie.call(File)==="[object FileConstructor]";function vG(e){return Ske&&(e instanceof ArrayBuffer||Cke(e))||_ke&&e instanceof Blob||Nke&&e instanceof File}function Kx(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Kx(e[n]))return!0;return!1}if(vG(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Kx(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Kx(e[n]))return!0;return!1}function jke(e){const t=[],n=e.data,r=e;return r.data=xF(n,t),r.attachments=t.length,{packet:r,buffers:t}}function xF(e,t){if(!e)return e;if(vG(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=xF(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=xF(e[r],t));return n}return e}function Lke(e,t){return e.data=vF(e.data,t),delete e.attachments,e}function vF(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=vF(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=vF(e[n],t));return e}const Ake=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Eke=5;var Tt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Tt||(Tt={}));class Tke{constructor(t){this.replacer=t}encode(t){return(t.type===Tt.EVENT||t.type===Tt.ACK)&&Kx(t)?this.encodeAsBinary({type:t.type===Tt.EVENT?Tt.BINARY_EVENT:Tt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Tt.BINARY_EVENT||t.type===Tt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=jke(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function PQ(e){return Object.prototype.toString.call(e)==="[object Object]"}class kG extends lr{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Tt.BINARY_EVENT;r||n.type===Tt.BINARY_ACK?(n.type=r?Tt.EVENT:Tt.ACK,this.reconstructor=new Ike(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(vG(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Tt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Tt.BINARY_EVENT||r.type===Tt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const i=t.substring(a,n);if(i!=Number(i)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(i)}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const i=t.charAt(n);if(i==null||Number(i)!=i){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(kG.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Tt.CONNECT:return PQ(n);case Tt.DISCONNECT:return n===void 0;case Tt.CONNECT_ERROR:return typeof n=="string"||PQ(n);case Tt.EVENT:case Tt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Ake.indexOf(n[0])===-1);case Tt.ACK:case Tt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ike{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Lke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Rke=Object.freeze(Object.defineProperty({__proto__:null,Decoder:kG,Encoder:Tke,get PacketType(){return Tt},protocol:Eke},Symbol.toStringTag,{value:"Module"}));function Va(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const $ke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class iie extends lr{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Va(t,"open",this.onopen.bind(this)),Va(t,"packet",this.onpacket.bind(this)),Va(t,"error",this.onerror.bind(this)),Va(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if($ke.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const i={type:Tt.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,m=n.pop();this._registerAckCallback(f,m),i.id=f}const l=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,h=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!l||(h?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},o),i=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};i.withError=!0,this.acks[t]=i}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(i,l)=>i?o(i):r(l);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Tt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Tt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Tt.EVENT:case Tt.BINARY_EVENT:this.onevent(t);break;case Tt.ACK:case Tt.BINARY_ACK:this.onack(t);break;case Tt.DISCONNECT:this.ondisconnect();break;case Tt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:Tt.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Tt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Op(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Op.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Op.prototype.reset=function(){this.attempts=0};Op.prototype.setMin=function(e){this.ms=e};Op.prototype.setMax=function(e){this.max=e};Op.prototype.setJitter=function(e){this.jitter=e};class kF extends lr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,JD(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Op({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||Rke;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new wke(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Va(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},i=Va(n,"error",a);if(this._timeout!==!1){const l=this._timeout,h=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},l);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(o),this.subs.push(i),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Va(t,"ping",this.onping.bind(this)),Va(t,"data",this.ondata.bind(this)),Va(t,"error",this.onerror.bind(this)),Va(t,"close",this.onclose.bind(this)),Va(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){ZD(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new iie(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const a2={};function Yx(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Mke(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,i=a2[o]&&a in a2[o].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||i;let h;return l?h=new kF(r,t):(a2[o]||(a2[o]=new kF(r,t)),h=a2[o]),n.query&&!t.query&&(t.query=n.queryKey),h.socket(n.path,t)}Object.assign(Yx,{Manager:kF,Socket:iie,io:Yx,connect:Yx});const Pke=1,Dke=1e6;let ZH=0;function zke(){return ZH=(ZH+1)%Number.MAX_SAFE_INTEGER,ZH.toString()}const JH=new Map,DQ=e=>{if(JH.has(e))return;const t=setTimeout(()=>{JH.delete(e),P2({type:"REMOVE_TOAST",toastId:e})},Dke);JH.set(e,t)},Oke=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Pke)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?DQ(n):e.toasts.forEach(r=>{DQ(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Zx=[];let Jx={toasts:[]};function P2(e){Jx=Oke(Jx,e),Zx.forEach(t=>{t(Jx)})}function Dt({...e}){const t=zke(),n=o=>P2({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>P2({type:"DISMISS_TOAST",toastId:t});return P2({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function cn(){const[e,t]=g.useState(Jx);return g.useEffect(()=>(Zx.push(t),()=>{const n=Zx.indexOf(t);n>-1&&Zx.splice(n,1)}),[e]),{...e,toast:Dt,dismiss:n=>P2({type:"DISMISS_TOAST",toastId:n})}}const Ae=async(e,t={},n)=>{const r=Ee.getState().token,o={...t};o.headers={...t.headers},r&&(o.headers.Authorization=`Bearer ${r}`),o.body instanceof FormData||(o.body&&typeof o.body=="object"?(o.body=JSON.stringify(o.body),o.headers["Content-Type"]="application/json"):o.body&&typeof o.body=="string"&&(o.headers["Content-Type"]="application/json"));try{const a=await fetch(e,o),i=a.headers.get("Content-Type");if(i!=null&&i.includes("application/zip")||i!=null&&i.includes("application/octet-stream")){if(!a.ok)try{const h=await a.json();throw new Error(h.error||"Ошибка при скачивании файла.")}catch{throw new Error(`Ошибка при скачивании файла: ${a.statusText}`)}return await a.blob()}if(a.status===204||a.headers.get("content-length")==="0")return n&&Dt({title:"Успех!",description:n}),!0;const l=await a.json();if(!a.ok){if(a.status===401){if(!e.endsWith("/api/auth/login")){const{logout:h}=Ee.getState();h()}throw new Error(l.error||l.message||"Ошибка авторизации")}throw new Error(l.error||l.message||"Произошла неизвестная ошибка на сервере")}return n&&Dt({title:"Успех!",description:n}),l}catch(a){if(a.message.includes("NetworkError")||a.message.includes("Failed to fetch"))Dt({variant:"destructive",title:"Ошибка сети",description:"Не удается подключиться к серверу"});else if(a.message.includes("Невалидный токен")){const{logout:i}=Ee.getState();i()}else Dt({variant:"destructive",title:"Ошибка",description:a.message});throw a}},i2={get:(e,t)=>Ae(e,{method:"GET"},t),post:(e,t,n)=>Ae(e,{method:"POST",body:t},n),put:(e,t,n)=>Ae(e,{method:"PUT",body:t},n),delete:(e,t)=>Ae(e,{method:"DELETE"},t)},zQ=(e,t=0)=>{const n=Date.now(),r=Math.random();if(typeof e!="object"||e===null)return{id:`gen-primitive-${n}-${t}-${r}`,content:e,timestamp:n};const o=e.id||`gen-object-${e.timestamp||n}-${t}-${r}`,a=e.timestamp||n;return e.content!==void 0?{id:o,content:e.content,timestamp:a}:{id:o,content:JSON.stringify(e),timestamp:a}},qke=(e,t)=>({socket:null,bots:[],servers:[],botStatuses:{},botLogs:{},resourceUsage:{},appVersion:"",botUIExtensions:{},changelog:"",showChangelogDialog:!1,connectSocket:()=>{const n=t().socket;if(n&&(n.connected||n.connecting)){console.log("[Socket] Соединение уже установлено или в процессе.");return}const r=t().token;if(!r){console.log("[Socket] Подключение отложено, нет токена.");return}const o=window.location.origin,a=Yx(o,{path:"/socket.io/",auth:{token:r},reconnectionAttempts:5,reconnectionDelay:2e3,transports:["websocket","polling"]});a.on("connect",()=>console.log("Socket.IO подключен:",a.id)),a.on("disconnect",i=>console.log("Socket.IO отключен:",i)),a.on("connect_error",i=>console.warn(`[Socket] Ошибка подключения: ${i.message}`)),a.on("bot:status",({botId:i,status:l,message:h})=>{e(d=>{d.botStatuses[i]=l}),h&&t().appendLog(i,`[SYSTEM] ${h}`)}),a.on("bot:log",({botId:i,log:l})=>t().appendLog(i,l)),a.on("bots:usage",i=>{const l=i.reduce((h,d)=>({...h,[d.botId]:d}),{});e({resourceUsage:l})}),e({socket:a})},disconnectSocket:()=>{const n=t().socket;n&&(n.disconnect(),e({socket:null}))},fetchInitialData:async()=>{try{const[n,r,o,a]=await Promise.all([Ae("/api/bots"),Ae("/api/servers"),Ae("/api/bots/state"),Ae("/api/version")]),i=a.version||"",l=localStorage.getItem("lastShownVersion");i&&i!==l&&(await t().fetchChangelog(),e({showChangelogDialog:!0}),localStorage.setItem("lastShownVersion",i)),e(h=>{const d=o.logs||{},f={...h.botLogs};for(const m in d){const y=h.botLogs[m]||[],v=d[m]||[],b=[...y,...v].map(zQ),w=Array.from(new Map(b.map(C=>[C.id,C])).values());f[m]=w.slice(-1e3)}return{...h,bots:n||[],servers:r||[],botStatuses:o.statuses||{},appVersion:i,botLogs:f}})}catch(n){console.error("Не удалось загрузить начальные данные:",n.message),e(r=>({...r,bots:[],servers:[],botStatuses:{},appVersion:""}))}},fetchUIExtensions:async n=>{try{const r=await Ae(`/api/bots/${n}/ui-extensions`);e(o=>{o.botUIExtensions[n]=r})}catch(r){console.error(`Не удалось загрузить UI расширения для бота ${n}:`,r),e(o=>{o.botUIExtensions[n]=[]})}},appendLog:(n,r)=>{e(o=>{const a=zQ(r),i=o.botLogs[n]||[];if(i.some(f=>f.id===a.id))return;const h=[...i,a],d=h.length>2e3?h.slice(-2e3):h;o.botLogs[n]=d})},updateBotOrder:n=>{e(r=>{r.bots=n})},fetchChangelog:async()=>{try{const n=await fetch("/api/changelog");if(!n.ok)throw new Error("Failed to fetch changelog");const r=await n.text();e({changelog:r})}catch(n){console.error("Не удалось загрузить changelog:",n),e({changelog:""})}},closeChangelogDialog:()=>{e({showChangelogDialog:!1})}}),Hke=(e,t)=>({createBot:async n=>{const r=await Ae("/api/bots",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},"Новый бот успешно создан.");return r&&await t().fetchInitialData(),r},startBot:async n=>{await Ae(`/api/bots/${n}/start`,{method:"POST"})},stopBot:async n=>{await Ae(`/api/bots/${n}/stop`,{method:"POST"})},restartBot:async n=>{await Ae(`/api/bots/${n}/restart`,{method:"POST"})},deleteBot:async n=>{await Ae(`/api/bots/${n}`,{method:"DELETE"},"Бот успешно удален."),await t().fetchInitialData()},startAllBots:async()=>{await Ae("/api/bots/start-all",{method:"POST"},"Команда на запуск всех ботов отправлена.")},stopAllBots:async()=>{await Ae("/api/bots/stop-all",{method:"POST"},"Команда на остановку всех ботов отправлена.")}}),OQ=async(e,t,n,r,o)=>{try{const a=await Ae(n,r,o);return await e().fetchInstalledPlugins(t),a}catch(a){throw console.error(`[PluginOperation] Failed: ${n}`,{botId:t,endpoint:n,params:r.body?JSON.parse(r.body):{},error:a.message,stack:a.stack}),a}},Vke=(e,t)=>({installedPlugins:{},pluginUpdates:{},pluginCatalog:[],isCatalogLoading:!0,lastUpdateCheck:(()=>{const r={};for(let o=0;o<localStorage.length;o++){const a=localStorage.key(o);if(a&&a.startsWith("plugin_update_check_")){const i=a.replace("plugin_update_check_",""),l=localStorage.getItem(a);l&&(r[i]=parseInt(l,10))}}return r})(),optimisticallyIncrementDownloadCount:r=>{e(o=>{const a=o.pluginCatalog.find(i=>i.name===r);a&&(a.downloads=(a.downloads||0)+1)})},fetchPluginCatalog:async()=>{if(t().pluginCatalog.length>0){e({isCatalogLoading:!1});return}e({isCatalogLoading:!0});try{const r=await Ae("/api/plugins/catalog");let o=new Map;try{await new Promise(h=>setTimeout(h,1e3));const l=await fetch("http://185.65.200.184:3000/api/stats");if(l.ok){const h=await l.json();o=new Map(((h==null?void 0:h.plugins)||[]).map(d=>[d.pluginName,d.downloadCount]))}}catch(l){console.warn("Не удалось загрузить статистику скачиваний плагинов:",l.message)}const i=(r||[]).map(l=>({...l,downloads:o.get(l.name)||0})).sort((l,h)=>(h.downloads||0)-(l.downloads||0)).map((l,h)=>({...l,isTop3:h<3,topPosition:h+1}));e({pluginCatalog:i,isCatalogLoading:!1})}catch(r){console.error("Не удалось загрузить каталог плагинов:",r.message),e({pluginCatalog:[],isCatalogLoading:!1})}},fetchInstalledPlugins:async r=>{try{const a=(await Ae(`/api/plugins/bot/${r}`)).map(i=>{let l;try{l=i.manifest?JSON.parse(i.manifest):{}}catch{console.error(`Ошибка парсинга манифеста для плагина ${i.name}`),l={}}const h=t().pluginCatalog.find(d=>d.name===i.name);return{...i,manifest:l,author:(h==null?void 0:h.author)||l.author||"Неизвестный автор",description:i.description||l.description||"Нет описания",commands:i.commands||[],eventGraphs:i.eventGraphs||[]}});e(i=>{i.installedPlugins[r]=a})}catch(o){console.error("Не удалось загрузить плагины для бота",r,o),e(a=>{a.installedPlugins[r]=[]})}},togglePlugin:async(r,o,a)=>{await Ae(`/api/bots/${r}/plugins/${o}`,{method:"PUT",body:JSON.stringify({isEnabled:a})},"Статус плагина обновлен."),await t().fetchInstalledPlugins(r)},deletePlugin:async(r,o,a)=>{await Ae(`/api/bots/${r}/plugins/${o}`,{method:"DELETE"},`Плагин "${a}" удален.`),await t().fetchInstalledPlugins(r)},installPluginFromRepo:async(r,o,a)=>{a&&t().optimisticallyIncrementDownloadCount(a);try{const i=await Ae(`/api/bots/${r}/plugins/install/github`,{method:"POST",body:JSON.stringify({repoUrl:o})});return Dt({title:"Успех!",description:`Плагин "${i.name}" успешно установлен.`}),await t().fetchInstalledPlugins(r),i}catch(i){throw await t().fetchPluginCatalog(),i}},installPluginFromPath:async(r,o)=>{try{const a=await Ae(`/api/bots/${r}/plugins/install/local`,{method:"POST",body:JSON.stringify({path:o})});return Dt({title:"Успех!",description:`Плагин "${a.name}" успешно установлен.`}),a}catch(a){throw a}finally{await t().fetchInstalledPlugins(r),await t().fetchPluginCatalog()}},checkForUpdates:async(r,o=!1)=>{try{const a=Date.now(),i=`plugin_update_check_${r}`,l=localStorage.getItem(i),h=l?parseInt(l,10):null,d=10*60*1e3;if(!o&&h&&a-h<d)return;const f=await Ae(`/api/plugins/check-updates/${r}`,{method:"POST"}),m=f.reduce((y,v)=>({...y,[v.sourceUri]:v}),{});localStorage.setItem(i,a.toString()),e(y=>{y.pluginUpdates[r]=m,y.lastUpdateCheck[r]=a}),Dt({title:"Проверка завершена",description:`Найдено обновлений: ${f.length}`})}catch(a){console.error("Ошибка проверки обновлений:",a)}},updatePlugin:async(r,o)=>{var i;const a=(i=t().installedPlugins[o])==null?void 0:i.find(l=>l.id===r);await Ae(`/api/plugins/update/${r}`,{method:"POST"},"Плагин обновлен. Перезапустите бота."),a&&e(pF(l=>{var h;(h=l.pluginUpdates[o])!=null&&h[a.sourceUri]&&delete l.pluginUpdates[o][a.sourceUri]})),await t().fetchInstalledPlugins(o)},createIdePlugin:async(r,{name:o,template:a})=>OQ(t,r,`/api/bots/${r}/plugins/ide/create`,{method:"POST",body:JSON.stringify({name:o,template:a})},`Плагин "${o}" успешно создан.`),updatePluginManifest:async(r,o,a)=>{e(pF(i=>{const l=i.installedPlugins.find(h=>h.name===o&&h.botId===r);l&&(l.name=a.name,l.version=a.version,l.description=a.description)}))},forkPlugin:async(r,o)=>OQ(t,r,`/api/bots/${r}/plugins/ide/${o}/fork`,{method:"POST"},`Копия плагина "${o}" успешно создана.`)}),Bke=(e,t)=>({tasks:[],fetchTasks:async()=>{try{const n=await Ae("/api/tasks");e({tasks:n||[]})}catch(n){console.error("Не удалось загрузить задачи:",n.message),e({tasks:[]})}},createTask:async n=>{const r=await Ae("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},"Задача успешно создана.");return r&&e(o=>{o.tasks.unshift(r)}),r},updateTask:async(n,r)=>{const o=await Ae(`/api/tasks/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)},"Задача успешно обновлена.");return o&&e(a=>{const i=a.tasks.findIndex(l=>l.id===n);i!==-1&&(a.tasks[i]={...a.tasks[i],...o})}),o},deleteTask:async n=>{await Ae(`/api/tasks/${n}`,{method:"DELETE"},"Задача успешно удалена."),e(r=>{r.tasks=r.tasks.filter(o=>o.id!==n)})}}),Fke=(e,t)=>({token:localStorage.getItem("authToken")||null,user:null,isAuthenticated:!1,needsSetup:!1,authInitialized:!1,hasPermission:n=>{var o;if(!n)return!0;const r=((o=t().user)==null?void 0:o.permissions)||[];return r.includes("*")||r.includes(n)},initializeAuth:async()=>{try{if((await Ae("/api/auth/status")).needsSetup){e({needsSetup:!0,isAuthenticated:!1,token:null,user:null});return}if(e({needsSetup:!1}),t().token){const o=await Ae("/api/auth/me");e({user:o,isAuthenticated:!0})}else e({isAuthenticated:!1,user:null,token:null})}catch(n){console.error("Auth initialization failed:",n.message),(n.message.includes("Невалидный токен")||n.message.includes("Нет токена"))&&localStorage.removeItem("authToken"),e({isAuthenticated:!1,token:null,user:null})}finally{e({authInitialized:!0})}},login:async(n,r)=>{try{const o=await Ae("/api/auth/login",{method:"POST",body:JSON.stringify({username:n,password:r})});localStorage.setItem("authToken",o.token),e({token:o.token,user:o.user,isAuthenticated:!0})}catch(o){throw console.error("Login failed:",o),o}},setupAdmin:async(n,r)=>{const o=await Ae("/api/auth/setup",{method:"POST",body:JSON.stringify({username:n,password:r})});localStorage.setItem("authToken",o.token),e({token:o.token,user:o.user,isAuthenticated:!0,needsSetup:!1})},logout:()=>{const n=t().socket;n&&n.disconnect(),localStorage.removeItem("authToken"),e({token:null,user:null,isAuthenticated:!1,socket:null})}}),Uke=e=>({theme:localStorage.getItem("blockmine-theme")||"system",setTheme:t=>{const n=window.document.documentElement;n.classList.remove("light","dark");let r="light";t==="system"?(r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",n.classList.add(r)):n.classList.add(t),localStorage.setItem("blockmine-theme",t),e({theme:t})}}),Ee=qae(Xae((...e)=>({...qke(...e),...Hke(...e),...Vke(...e),...Bke(...e),...Fke(...e),...Uke(...e)})));function Le(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function qQ(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vs(...e){return t=>{let n=!1;const r=e.map(o=>{const a=qQ(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():qQ(e[o],null)}}}}function lt(...e){return g.useCallback(vs(...e),e)}function Gke(e,t){const n=g.createContext(t),r=a=>{const{children:i,...l}=a,h=g.useMemo(()=>l,Object.values(l));return s.jsx(n.Provider,{value:h,children:i})};r.displayName=e+"Provider";function o(a){const i=g.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function er(e,t=[]){let n=[];function r(a,i){const l=g.createContext(i),h=n.length;n=[...n,i];const d=m=>{var M;const{scope:y,children:v,...b}=m,w=((M=y==null?void 0:y[e])==null?void 0:M[h])||l,C=g.useMemo(()=>b,Object.values(b));return s.jsx(w.Provider,{value:C,children:v})};d.displayName=a+"Provider";function f(m,y){var w;const v=((w=y==null?void 0:y[e])==null?void 0:w[h])||l,b=g.useContext(v);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=n.map(i=>g.createContext(i));return function(l){const h=(l==null?void 0:l[e])||a;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:h}}),[l,h])}};return o.scopeName=e,[r,Xke(o,...t)]}function Xke(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=r.reduce((l,{useScope:h,scopeName:d})=>{const m=h(a)[`__scope${d}`];return{...l,...m}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function zc(e){const t=Kke(e),n=g.forwardRef((r,o)=>{const{children:a,...i}=r,l=g.Children.toArray(a),h=l.find(Yke);if(h){const d=h.props.children,f=l.map(m=>m===h?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:m);return s.jsx(t,{...i,ref:o,children:g.isValidElement(d)?g.cloneElement(d,void 0,f):null})}return s.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Wke=zc("Slot");function Kke(e){const t=g.forwardRef((n,r)=>{const{children:o,...a}=n;if(g.isValidElement(o)){const i=Jke(o),l=Zke(a,o.props);return o.type!==g.Fragment&&(l.ref=r?vs(r,i):i),g.cloneElement(o,l)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sie=Symbol("radix.slottable");function cie(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=sie,t}function Yke(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sie}function Zke(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...l)=>{const h=a(...l);return o(...l),h}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Jke(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function sy(e){const t=e+"CollectionProvider",[n,r]=er(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=w=>{const{scope:C,children:M}=w,j=ce.useRef(null),_=ce.useRef(new Map).current;return s.jsx(o,{scope:C,itemMap:_,collectionRef:j,children:M})};i.displayName=t;const l=e+"CollectionSlot",h=zc(l),d=ce.forwardRef((w,C)=>{const{scope:M,children:j}=w,_=a(l,M),N=lt(C,_.collectionRef);return s.jsx(h,{ref:N,children:j})});d.displayName=l;const f=e+"CollectionItemSlot",m="data-radix-collection-item",y=zc(f),v=ce.forwardRef((w,C)=>{const{scope:M,children:j,..._}=w,N=ce.useRef(null),T=lt(C,N),A=a(f,M);return ce.useEffect(()=>(A.itemMap.set(N,{ref:N,..._}),()=>void A.itemMap.delete(N))),s.jsx(y,{[m]:"",ref:T,children:j})});v.displayName=f;function b(w){const C=a(e+"CollectionConsumer",w);return ce.useCallback(()=>{const j=C.collectionRef.current;if(!j)return[];const _=Array.from(j.querySelectorAll(`[${m}]`));return Array.from(C.itemMap.values()).sort((A,P)=>_.indexOf(A.ref.current)-_.indexOf(P.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:i,Slot:d,ItemSlot:v},b,r]}var Qke=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$e=Qke.reduce((e,t)=>{const n=zc(`Primitive.${t}`),r=g.forwardRef((o,a)=>{const{asChild:i,...l}=o,h=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(h,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function bG(e,t){e&&wa.flushSync(()=>e.dispatchEvent(t))}function Xn(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function e4e(e,t=globalThis==null?void 0:globalThis.document){const n=Xn(e);g.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var t4e="DismissableLayer",bF="dismissableLayer.update",n4e="dismissableLayer.pointerDownOutside",r4e="dismissableLayer.focusOutside",HQ,lie=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jh=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...h}=e,d=g.useContext(lie),[f,m]=g.useState(null),y=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=g.useState({}),b=lt(t,P=>m(P)),w=Array.from(d.layers),[C]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),M=w.indexOf(C),j=f?w.indexOf(f):-1,_=d.layersWithOutsidePointerEventsDisabled.size>0,N=j>=M,T=a4e(P=>{const R=P.target,V=[...d.branches].some(E=>E.contains(R));!N||V||(o==null||o(P),i==null||i(P),P.defaultPrevented||l==null||l())},y),A=i4e(P=>{const R=P.target;[...d.branches].some(E=>E.contains(R))||(a==null||a(P),i==null||i(P),P.defaultPrevented||l==null||l())},y);return e4e(P=>{j===d.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},y),g.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(HQ=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),VQ(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=HQ)}},[f,y,n,d]),g.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),VQ())},[f,d]),g.useEffect(()=>{const P=()=>v({});return document.addEventListener(bF,P),()=>document.removeEventListener(bF,P)},[]),s.jsx($e.div,{...h,ref:b,style:{pointerEvents:_?N?"auto":"none":void 0,...e.style},onFocusCapture:Le(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Le(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Le(e.onPointerDownCapture,T.onPointerDownCapture)})});jh.displayName=t4e;var o4e="DismissableLayerBranch",uie=g.forwardRef((e,t)=>{const n=g.useContext(lie),r=g.useRef(null),o=lt(t,r);return g.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),s.jsx($e.div,{...e,ref:o})});uie.displayName=o4e;function a4e(e,t=globalThis==null?void 0:globalThis.document){const n=Xn(e),r=g.useRef(!1),o=g.useRef(()=>{});return g.useEffect(()=>{const a=l=>{if(l.target&&!r.current){let h=function(){die(n4e,n,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=h,t.addEventListener("click",o.current,{once:!0})):h()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function i4e(e,t=globalThis==null?void 0:globalThis.document){const n=Xn(e),r=g.useRef(!1);return g.useEffect(()=>{const o=a=>{a.target&&!r.current&&die(r4e,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VQ(){const e=new CustomEvent(bF);document.dispatchEvent(e)}function die(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?bG(o,a):o.dispatchEvent(a)}var s4e=jh,c4e=uie,vr=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},l4e="Portal",Lh=g.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,a]=g.useState(!1);vr(()=>a(!0),[]);const i=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?Nve.createPortal(s.jsx($e.div,{...r,ref:t}),i):null});Lh.displayName=l4e;function u4e(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var tr=e=>{const{present:t,children:n}=e,r=d4e(t),o=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),a=lt(r.ref,h4e(o));return typeof n=="function"||r.isPresent?g.cloneElement(o,{ref:a}):null};tr.displayName="Presence";function d4e(e){const[t,n]=g.useState(),r=g.useRef(null),o=g.useRef(e),a=g.useRef("none"),i=e?"mounted":"unmounted",[l,h]=u4e(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const d=ix(r.current);a.current=l==="mounted"?d:"none"},[l]),vr(()=>{const d=r.current,f=o.current;if(f!==e){const y=a.current,v=ix(d);e?h("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?h("UNMOUNT"):h(f&&y!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,h]),vr(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,m=v=>{const w=ix(r.current).includes(v.animationName);if(v.target===t&&w&&(h("ANIMATION_END"),!o.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},y=v=>{v.target===t&&(a.current=ix(r.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:g.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function ix(e){return(e==null?void 0:e.animationName)||"none"}function h4e(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var f4e=Mp[" useInsertionEffect ".trim().toString()]||vr;function Yr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=p4e({defaultProp:t,onChange:n}),l=e!==void 0,h=l?e:o;{const f=g.useRef(e!==void 0);g.useEffect(()=>{const m=f.current;m!==l&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,r])}const d=g.useCallback(f=>{var m;if(l){const y=m4e(f)?f(e):f;y!==e&&((m=i.current)==null||m.call(i,y))}else a(f)},[l,e,a,i]);return[h,d]}function p4e({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),o=g.useRef(n),a=g.useRef(t);return f4e(()=>{a.current=t},[t]),g.useEffect(()=>{var i;o.current!==n&&((i=a.current)==null||i.call(a,n),o.current=n)},[n,o]),[n,r,a]}function m4e(e){return typeof e=="function"}var hie=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),y4e="VisuallyHidden",QD=g.forwardRef((e,t)=>s.jsx($e.span,{...e,ref:t,style:{...hie,...e.style}}));QD.displayName=y4e;var g4e=QD,wG="ToastProvider",[MG,x4e,v4e]=sy("Toast"),[fie,ben]=er("Toast",[v4e]),[k4e,ez]=fie(wG),pie=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:i}=e,[l,h]=g.useState(null),[d,f]=g.useState(0),m=g.useRef(!1),y=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${wG}\`. Expected non-empty \`string\`.`),s.jsx(MG.Provider,{scope:t,children:s.jsx(k4e,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:a,toastCount:d,viewport:l,onViewportChange:h,onToastAdd:g.useCallback(()=>f(v=>v+1),[]),onToastRemove:g.useCallback(()=>f(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:y,children:i})})};pie.displayName=wG;var mie="ToastViewport",b4e=["F8"],wF="toast.viewportPause",MF="toast.viewportResume",yie=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=b4e,label:o="Notifications ({hotkey})",...a}=e,i=ez(mie,n),l=x4e(n),h=g.useRef(null),d=g.useRef(null),f=g.useRef(null),m=g.useRef(null),y=lt(t,m,i.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=i.toastCount>0;g.useEffect(()=>{const C=M=>{var _;r.length!==0&&r.every(N=>M[N]||M.code===N)&&((_=m.current)==null||_.focus())};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[r]),g.useEffect(()=>{const C=h.current,M=m.current;if(b&&C&&M){const j=()=>{if(!i.isClosePausedRef.current){const A=new CustomEvent(wF);M.dispatchEvent(A),i.isClosePausedRef.current=!0}},_=()=>{if(i.isClosePausedRef.current){const A=new CustomEvent(MF);M.dispatchEvent(A),i.isClosePausedRef.current=!1}},N=A=>{!C.contains(A.relatedTarget)&&_()},T=()=>{C.contains(document.activeElement)||_()};return C.addEventListener("focusin",j),C.addEventListener("focusout",N),C.addEventListener("pointermove",j),C.addEventListener("pointerleave",T),window.addEventListener("blur",j),window.addEventListener("focus",_),()=>{C.removeEventListener("focusin",j),C.removeEventListener("focusout",N),C.removeEventListener("pointermove",j),C.removeEventListener("pointerleave",T),window.removeEventListener("blur",j),window.removeEventListener("focus",_)}}},[b,i.isClosePausedRef]);const w=g.useCallback(({tabbingDirection:C})=>{const j=l().map(_=>{const N=_.ref.current,T=[N,...R4e(N)];return C==="forwards"?T:T.reverse()});return(C==="forwards"?j.reverse():j).flat()},[l]);return g.useEffect(()=>{const C=m.current;if(C){const M=j=>{var T,A,P;const _=j.altKey||j.ctrlKey||j.metaKey;if(j.key==="Tab"&&!_){const R=document.activeElement,V=j.shiftKey;if(j.target===C&&V){(T=d.current)==null||T.focus();return}const z=w({tabbingDirection:V?"backwards":"forwards"}),H=z.findIndex($=>$===R);QH(z.slice(H+1))?j.preventDefault():V?(A=d.current)==null||A.focus():(P=f.current)==null||P.focus()}};return C.addEventListener("keydown",M),()=>C.removeEventListener("keydown",M)}},[l,w]),s.jsxs(c4e,{ref:h,role:"region","aria-label":o.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&s.jsx(SF,{ref:d,onFocusFromOutsideViewport:()=>{const C=w({tabbingDirection:"forwards"});QH(C)}}),s.jsx(MG.Slot,{scope:n,children:s.jsx($e.ol,{tabIndex:-1,...a,ref:y})}),b&&s.jsx(SF,{ref:f,onFocusFromOutsideViewport:()=>{const C=w({tabbingDirection:"backwards"});QH(C)}})]})});yie.displayName=mie;var gie="ToastFocusProxy",SF=g.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,a=ez(gie,n);return s.jsx(QD,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var d;const l=i.relatedTarget;!((d=a.viewport)!=null&&d.contains(l))&&r()}})});SF.displayName=gie;var cy="Toast",w4e="toast.swipeStart",M4e="toast.swipeMove",S4e="toast.swipeCancel",C4e="toast.swipeEnd",xie=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:a,...i}=e,[l,h]=Yr({prop:r,defaultProp:o??!0,onChange:a,caller:cy});return s.jsx(tr,{present:n||l,children:s.jsx(j4e,{open:l,...i,ref:t,onClose:()=>h(!1),onPause:Xn(e.onPause),onResume:Xn(e.onResume),onSwipeStart:Le(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Le(e.onSwipeMove,d=>{const{x:f,y:m}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:Le(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Le(e.onSwipeEnd,d=>{const{x:f,y:m}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),h(!1)})})})});xie.displayName=cy;var[_4e,N4e]=fie(cy,{onClose(){}}),j4e=g.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:a,onClose:i,onEscapeKeyDown:l,onPause:h,onResume:d,onSwipeStart:f,onSwipeMove:m,onSwipeCancel:y,onSwipeEnd:v,...b}=e,w=ez(cy,n),[C,M]=g.useState(null),j=lt(t,$=>M($)),_=g.useRef(null),N=g.useRef(null),T=o||w.duration,A=g.useRef(0),P=g.useRef(T),R=g.useRef(0),{onToastAdd:V,onToastRemove:E}=w,q=Xn(()=>{var F;(C==null?void 0:C.contains(document.activeElement))&&((F=w.viewport)==null||F.focus()),i()}),z=g.useCallback($=>{!$||$===1/0||(window.clearTimeout(R.current),A.current=new Date().getTime(),R.current=window.setTimeout(q,$))},[q]);g.useEffect(()=>{const $=w.viewport;if($){const F=()=>{z(P.current),d==null||d()},D=()=>{const U=new Date().getTime()-A.current;P.current=P.current-U,window.clearTimeout(R.current),h==null||h()};return $.addEventListener(wF,D),$.addEventListener(MF,F),()=>{$.removeEventListener(wF,D),$.removeEventListener(MF,F)}}},[w.viewport,T,h,d,z]),g.useEffect(()=>{a&&!w.isClosePausedRef.current&&z(T)},[a,T,w.isClosePausedRef,z]),g.useEffect(()=>(V(),()=>E()),[V,E]);const H=g.useMemo(()=>C?Cie(C):null,[C]);return w.viewport?s.jsxs(s.Fragment,{children:[H&&s.jsx(L4e,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:H}),s.jsx(_4e,{scope:n,onClose:q,children:wa.createPortal(s.jsx(MG.ItemSlot,{scope:n,children:s.jsx(s4e,{asChild:!0,onEscapeKeyDown:Le(l,()=>{w.isFocusedToastEscapeKeyDownRef.current||q(),w.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx($e.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":w.swipeDirection,...b,ref:j,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Le(e.onKeyDown,$=>{$.key==="Escape"&&(l==null||l($.nativeEvent),$.nativeEvent.defaultPrevented||(w.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:Le(e.onPointerDown,$=>{$.button===0&&(_.current={x:$.clientX,y:$.clientY})}),onPointerMove:Le(e.onPointerMove,$=>{if(!_.current)return;const F=$.clientX-_.current.x,D=$.clientY-_.current.y,U=!!N.current,X=["left","right"].includes(w.swipeDirection),K=["left","up"].includes(w.swipeDirection)?Math.min:Math.max,I=X?K(0,F):0,W=X?0:K(0,D),G=$.pointerType==="touch"?10:2,O={x:I,y:W},Q={originalEvent:$,delta:O};U?(N.current=O,sx(M4e,m,Q,{discrete:!1})):BQ(O,w.swipeDirection,G)?(N.current=O,sx(w4e,f,Q,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(F)>G||Math.abs(D)>G)&&(_.current=null)}),onPointerUp:Le(e.onPointerUp,$=>{const F=N.current,D=$.target;if(D.hasPointerCapture($.pointerId)&&D.releasePointerCapture($.pointerId),N.current=null,_.current=null,F){const U=$.currentTarget,X={originalEvent:$,delta:F};BQ(F,w.swipeDirection,w.swipeThreshold)?sx(C4e,v,X,{discrete:!0}):sx(S4e,y,X,{discrete:!0}),U.addEventListener("click",K=>K.preventDefault(),{once:!0})}})})})}),w.viewport)})]}):null}),L4e=e=>{const{__scopeToast:t,children:n,...r}=e,o=ez(cy,t),[a,i]=g.useState(!1),[l,h]=g.useState(!1);return T4e(()=>i(!0)),g.useEffect(()=>{const d=window.setTimeout(()=>h(!0),1e3);return()=>window.clearTimeout(d)},[]),l?null:s.jsx(Lh,{asChild:!0,children:s.jsx(QD,{...r,children:a&&s.jsxs(s.Fragment,{children:[o.label," ",n]})})})},A4e="ToastTitle",vie=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx($e.div,{...r,ref:t})});vie.displayName=A4e;var E4e="ToastDescription",kie=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx($e.div,{...r,ref:t})});kie.displayName=E4e;var bie="ToastAction",wie=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?s.jsx(Sie,{altText:n,asChild:!0,children:s.jsx(SG,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${bie}\`. Expected non-empty \`string\`.`),null)});wie.displayName=bie;var Mie="ToastClose",SG=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=N4e(Mie,n);return s.jsx(Sie,{asChild:!0,children:s.jsx($e.button,{type:"button",...r,ref:t,onClick:Le(e.onClick,o.onClose)})})});SG.displayName=Mie;var Sie=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return s.jsx($e.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Cie(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),I4e(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!o)if(a){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Cie(r))}}),t}function sx(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?bG(o,a):o.dispatchEvent(a)}var BQ=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),a=r>o;return t==="left"||t==="right"?a&&r>n:!a&&o>n};function T4e(e=()=>{}){const t=Xn(e);vr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function I4e(e){return e.nodeType===e.ELEMENT_NODE}function R4e(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function QH(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var $4e=pie,_ie=yie,Nie=xie,jie=vie,Lie=kie,Aie=wie,Eie=SG;function Tie(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Tie(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gr(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Tie(e))&&(r&&(r+=" "),r+=t);return r}const FQ=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,UQ=gr,qp=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return UQ(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(d=>{const f=n==null?void 0:n[d],m=a==null?void 0:a[d];if(f===null)return null;const y=FQ(f)||FQ(m);return o[d][y]}),l=n&&Object.entries(n).reduce((d,f)=>{let[m,y]=f;return y===void 0||(d[m]=y),d},{}),h=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:m,className:y,...v}=f;return Object.entries(v).every(b=>{let[w,C]=b;return Array.isArray(C)?C.includes({...a,...l}[w]):{...a,...l}[w]===C})?[...d,m,y]:d},[]);return UQ(e,i,h,n==null?void 0:n.class,n==null?void 0:n.className)};/**
|
|
70
|
+
*/function jve(e){return g.createElement(Bxe,{flushSync:wa.flushSync,...e})}const CQ=e=>{let t;const n=new Set,r=(d,f)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const y=t;t=f??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(v=>v(t,y))}},o=()=>t,l={setState:r,getState:o,getInitialState:()=>h,subscribe:d=>(n.add(d),()=>n.delete(d))},h=t=e(r,o,l);return l},Lve=e=>e?CQ(e):CQ,Ave=e=>e;function Eve(e,t=Ave){const n=ce.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return ce.useDebugValue(n),n}const _Q=e=>{const t=Lve(e),n=r=>Eve(t,r);return Object.assign(n,t),n},qae=e=>e?_Q(e):_Q;var Hae=Symbol.for("immer-nothing"),NQ=Symbol.for("immer-draftable"),Uo=Symbol.for("immer-state");function Fa(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Sp=Object.getPrototypeOf;function Cp(e){return!!e&&!!e[Uo]}function yh(e){var t;return e?Vae(e)||Array.isArray(e)||!!e[NQ]||!!((t=e.constructor)!=null&&t[NQ])||WD(e)||KD(e):!1}var Tve=Object.prototype.constructor.toString();function Vae(e){if(!e||typeof e!="object")return!1;const t=Sp(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Tve}function JP(e,t){XD(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function XD(e){const t=e[Uo];return t?t.type_:Array.isArray(e)?1:WD(e)?2:KD(e)?3:0}function cF(e,t){return XD(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Bae(e,t,n){const r=XD(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Ive(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function WD(e){return e instanceof Map}function KD(e){return e instanceof Set}function bl(e){return e.copy_||e.base_}function lF(e,t){if(WD(e))return new Map(e);if(KD(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Vae(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Uo];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const i=o[a],l=r[i];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[i]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[i]})}return Object.create(Sp(e),r)}else{const r=Sp(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function pG(e,t=!1){return YD(e)||Cp(e)||!yh(e)||(XD(e)>1&&(e.set=e.add=e.clear=e.delete=Rve),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>pG(r,!0))),e}function Rve(){Fa(2)}function YD(e){return Object.isFrozen(e)}var $ve={};function gh(e){const t=$ve[e];return t||Fa(0,e),t}var Mm;function Fae(){return Mm}function Pve(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function jQ(e,t){t&&(gh("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function uF(e){dF(e),e.drafts_.forEach(Dve),e.drafts_=null}function dF(e){e===Mm&&(Mm=e.parent_)}function LQ(e){return Mm=Pve(Mm,e)}function Dve(e){const t=e[Uo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function AQ(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Uo].modified_&&(uF(t),Fa(4)),yh(e)&&(e=QP(t,e),t.parent_||eD(t,e)),t.patches_&&gh("Patches").generateReplacementPatches_(n[Uo].base_,e,t.patches_,t.inversePatches_)):e=QP(t,n,[]),uF(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Hae?e:void 0}function QP(e,t,n){if(YD(t))return t;const r=t[Uo];if(!r)return JP(t,(o,a)=>EQ(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return eD(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,i=!1;r.type_===3&&(a=new Set(o),o.clear(),i=!0),JP(a,(l,h)=>EQ(e,r,o,l,h,n,i)),eD(e,o,!1),n&&e.patches_&&gh("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function EQ(e,t,n,r,o,a,i){if(Cp(o)){const l=a&&t&&t.type_!==3&&!cF(t.assigned_,r)?a.concat(r):void 0,h=QP(e,o,l);if(Bae(n,r,h),Cp(h))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(yh(o)&&!YD(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;QP(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&eD(e,o)}}function eD(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&pG(t,n)}function zve(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Fae(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=mG;n&&(o=[r],a=Sm);const{revoke:i,proxy:l}=Proxy.revocable(o,a);return r.draft_=l,r.revoke_=i,l}var mG={get(e,t){if(t===Uo)return e;const n=bl(e);if(!cF(n,t))return Ove(e,n,t);const r=n[t];return e.finalized_||!yh(r)?r:r===GH(e.base_,t)?(XH(e),e.copy_[t]=fF(r,e)):r},has(e,t){return t in bl(e)},ownKeys(e){return Reflect.ownKeys(bl(e))},set(e,t,n){const r=Uae(bl(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=GH(bl(e),t),a=o==null?void 0:o[Uo];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Ive(n,o)&&(n!==void 0||cF(e.base_,t)))return!0;XH(e),hF(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return GH(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,XH(e),hF(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=bl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Fa(11)},getPrototypeOf(e){return Sp(e.base_)},setPrototypeOf(){Fa(12)}},Sm={};JP(mG,(e,t)=>{Sm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Sm.deleteProperty=function(e,t){return Sm.set.call(this,e,t,void 0)};Sm.set=function(e,t,n){return mG.set.call(this,e[0],t,n,e[0])};function GH(e,t){const n=e[Uo];return(n?bl(n):e)[t]}function Ove(e,t,n){var o;const r=Uae(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Uae(e,t){if(!(t in e))return;let n=Sp(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Sp(n)}}function hF(e){e.modified_||(e.modified_=!0,e.parent_&&hF(e.parent_))}function XH(e){e.copy_||(e.copy_=lF(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var qve=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const i=this;return function(h=a,...d){return i.produce(h,f=>n.call(this,f,...d))}}typeof n!="function"&&Fa(6),r!==void 0&&typeof r!="function"&&Fa(7);let o;if(yh(t)){const a=LQ(this),i=fF(t,void 0);let l=!0;try{o=n(i),l=!1}finally{l?uF(a):dF(a)}return jQ(a,r),AQ(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Hae&&(o=void 0),this.autoFreeze_&&pG(o,!0),r){const a=[],i=[];gh("Patches").generateReplacementPatches_(t,o,a,i),r(a,i)}return o}else Fa(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...l)=>this.produceWithPatches(i,h=>t(h,...l));let r,o;return[this.produce(t,n,(i,l)=>{r=i,o=l}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){yh(e)||Fa(8),Cp(e)&&(e=Hve(e));const t=LQ(this),n=fF(e,void 0);return n[Uo].isManual_=!0,dF(t),n}finishDraft(e,t){const n=e&&e[Uo];(!n||!n.isManual_)&&Fa(9);const{scope_:r}=n;return jQ(r,t),AQ(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=gh("Patches").applyPatches_;return Cp(e)?r(e,t):this.produce(e,o=>r(o,t))}};function fF(e,t){const n=WD(e)?gh("MapSet").proxyMap_(e,t):KD(e)?gh("MapSet").proxySet_(e,t):zve(e,t);return(t?t.scope_:Fae()).drafts_.push(n),n}function Hve(e){return Cp(e)||Fa(10,e),Gae(e)}function Gae(e){if(!yh(e)||YD(e))return e;const t=e[Uo];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=lF(e,t.scope_.immer_.useStrictShallowCopy_)}else n=lF(e,!0);return JP(n,(r,o)=>{Bae(n,r,Gae(o))}),t&&(t.finalized_=!1),n}var Go=new qve,pF=Go.produce;Go.produceWithPatches.bind(Go);Go.setAutoFreeze.bind(Go);Go.setUseStrictShallowCopy.bind(Go);Go.applyPatches.bind(Go);Go.createDraft.bind(Go);Go.finishDraft.bind(Go);const Vve=e=>(t,n,r)=>(r.setState=(o,a,...i)=>{const l=typeof o=="function"?pF(o):o;return t(l,a,...i)},e(r.setState,n,r)),Xae=Vve,Hi=Object.create(null);Hi.open="0";Hi.close="1";Hi.ping="2";Hi.pong="3";Hi.message="4";Hi.upgrade="5";Hi.noop="6";const Gx=Object.create(null);Object.keys(Hi).forEach(e=>{Gx[Hi[e]]=e});const mF={type:"error",data:"parser error"},Wae=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Kae=typeof ArrayBuffer=="function",Yae=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,yG=({type:e,data:t},n,r)=>Wae&&t instanceof Blob?n?r(t):TQ(t,r):Kae&&(t instanceof ArrayBuffer||Yae(t))?n?r(t):TQ(new Blob([t]),r):r(Hi[e]+(t||"")),TQ=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function IQ(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let WH;function Bve(e,t){if(Wae&&e.data instanceof Blob)return e.data.arrayBuffer().then(IQ).then(t);if(Kae&&(e.data instanceof ArrayBuffer||Yae(e.data)))return t(IQ(e.data));yG(e,!1,n=>{WH||(WH=new TextEncoder),t(WH.encode(n))})}const RQ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S2=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<RQ.length;e++)S2[RQ.charCodeAt(e)]=e;const Fve=e=>{let t=e.length*.75,n=e.length,r,o=0,a,i,l,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),f=new Uint8Array(d);for(r=0;r<n;r+=4)a=S2[e.charCodeAt(r)],i=S2[e.charCodeAt(r+1)],l=S2[e.charCodeAt(r+2)],h=S2[e.charCodeAt(r+3)],f[o++]=a<<2|i>>4,f[o++]=(i&15)<<4|l>>2,f[o++]=(l&3)<<6|h&63;return d},Uve=typeof ArrayBuffer=="function",gG=(e,t)=>{if(typeof e!="string")return{type:"message",data:Zae(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Gve(e.substring(1),t)}:Gx[n]?e.length>1?{type:Gx[n],data:e.substring(1)}:{type:Gx[n]}:mF},Gve=(e,t)=>{if(Uve){const n=Fve(e);return Zae(n,t)}else return{base64:!0,data:e}},Zae=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Jae="",Xve=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,i)=>{yG(a,!1,l=>{r[i]=l,++o===n&&t(r.join(Jae))})})},Wve=(e,t)=>{const n=e.split(Jae),r=[];for(let o=0;o<n.length;o++){const a=gG(n[o],t);if(r.push(a),a.type==="error")break}return r};function Kve(){return new TransformStream({transform(e,t){Bve(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let KH;function ox(e){return e.reduce((t,n)=>t+n.length,0)}function ax(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Yve(e,t){KH||(KH=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(i,l){for(n.push(i);;){if(r===0){if(ox(n)<1)break;const h=ax(n,1);a=(h[0]&128)===128,o=h[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(ox(n)<2)break;const h=ax(n,2);o=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),r=3}else if(r===2){if(ox(n)<8)break;const h=ax(n,8),d=new DataView(h.buffer,h.byteOffset,h.length),f=d.getUint32(0);if(f>Math.pow(2,21)-1){l.enqueue(mF);break}o=f*Math.pow(2,32)+d.getUint32(4),r=3}else{if(ox(n)<o)break;const h=ax(n,o);l.enqueue(gG(a?h:KH.decode(h),t)),r=0}if(o===0||o>e){l.enqueue(mF);break}}}})}const Qae=4;function lr(e){if(e)return Zve(e)}function Zve(e){for(var t in lr.prototype)e[t]=lr.prototype[t];return e}lr.prototype.on=lr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};lr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};lr.prototype.off=lr.prototype.removeListener=lr.prototype.removeAllListeners=lr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this};lr.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this};lr.prototype.emitReserved=lr.prototype.emit;lr.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};lr.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ZD=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),xa=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Jve="arraybuffer";function eie(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Qve=xa.setTimeout,eke=xa.clearTimeout;function JD(e,t){t.useNativeTimers?(e.setTimeoutFn=Qve.bind(xa),e.clearTimeoutFn=eke.bind(xa)):(e.setTimeoutFn=xa.setTimeout.bind(xa),e.clearTimeoutFn=xa.clearTimeout.bind(xa))}const tke=1.33;function nke(e){return typeof e=="string"?rke(e):Math.ceil((e.byteLength||e.size)*tke)}function rke(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function tie(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function oke(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function ake(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class ike extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class xG extends lr{constructor(t){super(),this.writable=!1,JD(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new ike(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=gG(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=oke(t);return n.length?"?"+n:""}}class ske extends xG{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Wve(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Xve(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=tie()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let nie=!1;try{nie=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const cke=nie;function lke(){}class uke extends ske{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}let Xf=class Xx extends lr{constructor(t,n,r){super(),this.createRequest=t,JD(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=eie(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=Xx.requestsCount++,Xx.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=lke,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Xx.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Xf.requestsCount=0;Xf.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",$Q);else if(typeof addEventListener=="function"){const e="onpagehide"in xa?"pagehide":"unload";addEventListener(e,$Q,!1)}}function $Q(){for(let e in Xf.requests)Xf.requests.hasOwnProperty(e)&&Xf.requests[e].abort()}const dke=function(){const e=rie({xdomain:!1});return e&&e.responseType!==null}();class hke extends uke{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=dke&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Xf(rie,this.uri(),t)}}function rie(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||cke))return new XMLHttpRequest}catch{}if(!t)try{return new xa[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const oie=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class fke extends xG{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=oie?{}:eie(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;yG(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch{}o&&ZD(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=tie()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const YH=xa.WebSocket||xa.MozWebSocket;class pke extends fke{createSocket(t,n,r){return oie?new YH(t,n,r):n?new YH(t,n):new YH(t)}doWrite(t,n){this.ws.send(n)}}class mke extends xG{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=Yve(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=Kve();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:l,value:h})=>{l||(this.onPacket(h),a())}).catch(l=>{})};a();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&ZD(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const yke={websocket:pke,webtransport:mke,polling:hke},gke=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,xke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function yF(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=gke.exec(e||""),a={},i=14;for(;i--;)a[xke[i]]=o[i]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=vke(a,a.path),a.queryKey=kke(a,a.query),a}function vke(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function kke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const gF=typeof addEventListener=="function"&&typeof removeEventListener=="function",Wx=[];gF&&addEventListener("offline",()=>{Wx.forEach(e=>e())},!1);class Cc extends lr{constructor(t,n){if(super(),this.binaryType=Jve,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=yF(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=yF(n.host).host);JD(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=ake(this.opts.query)),gF&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Wx.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Qae,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Cc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Cc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=nke(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,ZD(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Cc.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),gF&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Wx.indexOf(this._offlineEventListener);r!==-1&&Wx.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Cc.protocol=Qae;class bke extends Cc{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Cc.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Cc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const y=new Error("probe error");y.transport=n.name,this.emitReserved("upgradeError",y)}}))};function a(){r||(r=!0,f(),n.close(),n=null)}const i=m=>{const y=new Error("probe error: "+m);y.transport=n.name,a(),this.emitReserved("upgradeError",y)};function l(){i("transport closed")}function h(){i("socket closed")}function d(m){n&&m.name!==n.name&&a()}const f=()=>{n.removeListener("open",o),n.removeListener("error",i),n.removeListener("close",l),this.off("close",h),this.off("upgrading",d)};n.once("open",o),n.once("error",i),n.once("close",l),this.once("close",h),this.once("upgrading",d),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let wke=class extends bke{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>yke[o]).filter(o=>!!o)),super(t,r)}};function Mke(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=yF(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const Ske=typeof ArrayBuffer=="function",Cke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,aie=Object.prototype.toString,_ke=typeof Blob=="function"||typeof Blob<"u"&&aie.call(Blob)==="[object BlobConstructor]",Nke=typeof File=="function"||typeof File<"u"&&aie.call(File)==="[object FileConstructor]";function vG(e){return Ske&&(e instanceof ArrayBuffer||Cke(e))||_ke&&e instanceof Blob||Nke&&e instanceof File}function Kx(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Kx(e[n]))return!0;return!1}if(vG(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Kx(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Kx(e[n]))return!0;return!1}function jke(e){const t=[],n=e.data,r=e;return r.data=xF(n,t),r.attachments=t.length,{packet:r,buffers:t}}function xF(e,t){if(!e)return e;if(vG(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=xF(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=xF(e[r],t));return n}return e}function Lke(e,t){return e.data=vF(e.data,t),delete e.attachments,e}function vF(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=vF(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=vF(e[n],t));return e}const Ake=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Eke=5;var Tt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Tt||(Tt={}));class Tke{constructor(t){this.replacer=t}encode(t){return(t.type===Tt.EVENT||t.type===Tt.ACK)&&Kx(t)?this.encodeAsBinary({type:t.type===Tt.EVENT?Tt.BINARY_EVENT:Tt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Tt.BINARY_EVENT||t.type===Tt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=jke(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function PQ(e){return Object.prototype.toString.call(e)==="[object Object]"}class kG extends lr{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Tt.BINARY_EVENT;r||n.type===Tt.BINARY_ACK?(n.type=r?Tt.EVENT:Tt.ACK,this.reconstructor=new Ike(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(vG(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Tt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Tt.BINARY_EVENT||r.type===Tt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const i=t.substring(a,n);if(i!=Number(i)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(i)}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const i=t.charAt(n);if(i==null||Number(i)!=i){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(kG.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Tt.CONNECT:return PQ(n);case Tt.DISCONNECT:return n===void 0;case Tt.CONNECT_ERROR:return typeof n=="string"||PQ(n);case Tt.EVENT:case Tt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Ake.indexOf(n[0])===-1);case Tt.ACK:case Tt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ike{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Lke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Rke=Object.freeze(Object.defineProperty({__proto__:null,Decoder:kG,Encoder:Tke,get PacketType(){return Tt},protocol:Eke},Symbol.toStringTag,{value:"Module"}));function Va(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const $ke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class iie extends lr{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Va(t,"open",this.onopen.bind(this)),Va(t,"packet",this.onpacket.bind(this)),Va(t,"error",this.onerror.bind(this)),Va(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if($ke.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const i={type:Tt.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,m=n.pop();this._registerAckCallback(f,m),i.id=f}const l=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,h=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!l||(h?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},o),i=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};i.withError=!0,this.acks[t]=i}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(i,l)=>i?o(i):r(l);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Tt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Tt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Tt.EVENT:case Tt.BINARY_EVENT:this.onevent(t);break;case Tt.ACK:case Tt.BINARY_ACK:this.onack(t);break;case Tt.DISCONNECT:this.ondisconnect();break;case Tt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:Tt.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Tt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Op(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Op.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Op.prototype.reset=function(){this.attempts=0};Op.prototype.setMin=function(e){this.ms=e};Op.prototype.setMax=function(e){this.max=e};Op.prototype.setJitter=function(e){this.jitter=e};class kF extends lr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,JD(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Op({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||Rke;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new wke(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Va(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},i=Va(n,"error",a);if(this._timeout!==!1){const l=this._timeout,h=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},l);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(o),this.subs.push(i),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Va(t,"ping",this.onping.bind(this)),Va(t,"data",this.ondata.bind(this)),Va(t,"error",this.onerror.bind(this)),Va(t,"close",this.onclose.bind(this)),Va(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){ZD(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new iie(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const a2={};function Yx(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Mke(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,i=a2[o]&&a in a2[o].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||i;let h;return l?h=new kF(r,t):(a2[o]||(a2[o]=new kF(r,t)),h=a2[o]),n.query&&!t.query&&(t.query=n.queryKey),h.socket(n.path,t)}Object.assign(Yx,{Manager:kF,Socket:iie,io:Yx,connect:Yx});const Pke=1,Dke=1e6;let ZH=0;function zke(){return ZH=(ZH+1)%Number.MAX_SAFE_INTEGER,ZH.toString()}const JH=new Map,DQ=e=>{if(JH.has(e))return;const t=setTimeout(()=>{JH.delete(e),P2({type:"REMOVE_TOAST",toastId:e})},Dke);JH.set(e,t)},Oke=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Pke)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?DQ(n):e.toasts.forEach(r=>{DQ(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Zx=[];let Jx={toasts:[]};function P2(e){Jx=Oke(Jx,e),Zx.forEach(t=>{t(Jx)})}function Dt({...e}){const t=zke(),n=o=>P2({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>P2({type:"DISMISS_TOAST",toastId:t});return P2({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function cn(){const[e,t]=g.useState(Jx);return g.useEffect(()=>(Zx.push(t),()=>{const n=Zx.indexOf(t);n>-1&&Zx.splice(n,1)}),[e]),{...e,toast:Dt,dismiss:n=>P2({type:"DISMISS_TOAST",toastId:n})}}const Ae=async(e,t={},n)=>{const r=Ee.getState().token,o={...t};o.headers={...t.headers},r&&(o.headers.Authorization=`Bearer ${r}`),o.body instanceof FormData||(o.body&&typeof o.body=="object"?(o.body=JSON.stringify(o.body),o.headers["Content-Type"]="application/json"):o.body&&typeof o.body=="string"&&(o.headers["Content-Type"]="application/json"));try{const a=await fetch(e,o),i=a.headers.get("Content-Type");if(i!=null&&i.includes("application/zip")||i!=null&&i.includes("application/octet-stream")){if(!a.ok)try{const h=await a.json();throw new Error(h.error||"Ошибка при скачивании файла.")}catch{throw new Error(`Ошибка при скачивании файла: ${a.statusText}`)}return await a.blob()}if(a.status===204||a.headers.get("content-length")==="0")return n&&Dt({title:"Успех!",description:n}),!0;const l=await a.json();if(!a.ok){if(a.status===401){if(!e.endsWith("/api/auth/login")){const{logout:h}=Ee.getState();h()}throw new Error(l.error||l.message||"Ошибка авторизации")}throw new Error(l.error||l.message||"Произошла неизвестная ошибка на сервере")}return n&&Dt({title:"Успех!",description:n}),l}catch(a){if(a.message.includes("NetworkError")||a.message.includes("Failed to fetch"))Dt({variant:"destructive",title:"Ошибка сети",description:"Не удается подключиться к серверу"});else if(a.message.includes("Невалидный токен")){const{logout:i}=Ee.getState();i()}else Dt({variant:"destructive",title:"Ошибка",description:a.message});throw a}},i2={get:(e,t)=>Ae(e,{method:"GET"},t),post:(e,t,n)=>Ae(e,{method:"POST",body:t},n),put:(e,t,n)=>Ae(e,{method:"PUT",body:t},n),delete:(e,t)=>Ae(e,{method:"DELETE"},t)},zQ=(e,t=0)=>{const n=Date.now(),r=Math.random();if(typeof e!="object"||e===null)return{id:`gen-primitive-${n}-${t}-${r}`,content:e,timestamp:n};const o=e.id||`gen-object-${e.timestamp||n}-${t}-${r}`,a=e.timestamp||n;return e.content!==void 0?{id:o,content:e.content,timestamp:a}:{id:o,content:JSON.stringify(e),timestamp:a}},qke=(e,t)=>({socket:null,bots:[],servers:[],botStatuses:{},botLogs:{},resourceUsage:{},appVersion:"",botUIExtensions:{},changelog:"",showChangelogDialog:!1,connectSocket:()=>{const n=t().socket;if(n&&(n.connected||n.connecting)){console.log("[Socket] Соединение уже установлено или в процессе.");return}const r=t().token;if(!r){console.log("[Socket] Подключение отложено, нет токена.");return}const o=window.location.origin,a=Yx(o,{path:"/socket.io/",auth:{token:r},reconnectionAttempts:5,reconnectionDelay:2e3,transports:["websocket","polling"]});a.on("connect",()=>console.log("Socket.IO подключен:",a.id)),a.on("disconnect",i=>console.log("Socket.IO отключен:",i)),a.on("connect_error",i=>console.warn(`[Socket] Ошибка подключения: ${i.message}`)),a.on("bot:status",({botId:i,status:l,message:h})=>{e(d=>{d.botStatuses[i]=l}),h&&t().appendLog(i,`[SYSTEM] ${h}`)}),a.on("bot:log",({botId:i,log:l})=>t().appendLog(i,l)),a.on("bots:usage",i=>{const l=i.reduce((h,d)=>({...h,[d.botId]:d}),{});e({resourceUsage:l})}),e({socket:a})},disconnectSocket:()=>{const n=t().socket;n&&(n.disconnect(),e({socket:null}))},fetchInitialData:async()=>{try{const[n,r,o,a]=await Promise.all([Ae("/api/bots"),Ae("/api/servers"),Ae("/api/bots/state"),Ae("/api/version")]),i=a.version||"",l=localStorage.getItem("lastShownVersion");i&&i!==l&&(await t().fetchChangelog(),e({showChangelogDialog:!0}),localStorage.setItem("lastShownVersion",i)),e(h=>{const d=o.logs||{},f={...h.botLogs};for(const m in d){const y=h.botLogs[m]||[],v=d[m]||[],b=[...y,...v].map(zQ),w=Array.from(new Map(b.map(C=>[C.id,C])).values());f[m]=w.slice(-200)}return{...h,bots:n||[],servers:r||[],botStatuses:o.statuses||{},appVersion:i,botLogs:f}})}catch(n){console.error("Не удалось загрузить начальные данные:",n.message),e(r=>({...r,bots:[],servers:[],botStatuses:{},appVersion:""}))}},fetchUIExtensions:async n=>{try{const r=await Ae(`/api/bots/${n}/ui-extensions`);e(o=>{o.botUIExtensions[n]=r})}catch(r){console.error(`Не удалось загрузить UI расширения для бота ${n}:`,r),e(o=>{o.botUIExtensions[n]=[]})}},appendLog:(n,r)=>{e(o=>{const a=zQ(r),i=o.botLogs[n]||[];if(i.some(f=>f.id===a.id))return;const h=[...i,a],d=h.length>500?h.slice(-500):h;o.botLogs[n]=d})},updateBotOrder:n=>{e(r=>{r.bots=n})},fetchChangelog:async()=>{try{const n=await fetch("/api/changelog");if(!n.ok)throw new Error("Failed to fetch changelog");const r=await n.text();e({changelog:r})}catch(n){console.error("Не удалось загрузить changelog:",n),e({changelog:""})}},closeChangelogDialog:()=>{e({showChangelogDialog:!1})}}),Hke=(e,t)=>({createBot:async n=>{const r=await Ae("/api/bots",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},"Новый бот успешно создан.");return r&&await t().fetchInitialData(),r},startBot:async n=>{await Ae(`/api/bots/${n}/start`,{method:"POST"})},stopBot:async n=>{await Ae(`/api/bots/${n}/stop`,{method:"POST"})},restartBot:async n=>{await Ae(`/api/bots/${n}/restart`,{method:"POST"})},deleteBot:async n=>{await Ae(`/api/bots/${n}`,{method:"DELETE"},"Бот успешно удален."),await t().fetchInitialData()},startAllBots:async()=>{await Ae("/api/bots/start-all",{method:"POST"},"Команда на запуск всех ботов отправлена.")},stopAllBots:async()=>{await Ae("/api/bots/stop-all",{method:"POST"},"Команда на остановку всех ботов отправлена.")}}),OQ=async(e,t,n,r,o)=>{try{const a=await Ae(n,r,o);return await e().fetchInstalledPlugins(t),a}catch(a){throw console.error(`[PluginOperation] Failed: ${n}`,{botId:t,endpoint:n,params:r.body?JSON.parse(r.body):{},error:a.message,stack:a.stack}),a}},Vke=(e,t)=>({installedPlugins:{},pluginUpdates:{},pluginCatalog:[],isCatalogLoading:!0,lastUpdateCheck:(()=>{const r={};for(let o=0;o<localStorage.length;o++){const a=localStorage.key(o);if(a&&a.startsWith("plugin_update_check_")){const i=a.replace("plugin_update_check_",""),l=localStorage.getItem(a);l&&(r[i]=parseInt(l,10))}}return r})(),optimisticallyIncrementDownloadCount:r=>{e(o=>{const a=o.pluginCatalog.find(i=>i.name===r);a&&(a.downloads=(a.downloads||0)+1)})},fetchPluginCatalog:async()=>{if(t().pluginCatalog.length>0){e({isCatalogLoading:!1});return}e({isCatalogLoading:!0});try{const r=await Ae("/api/plugins/catalog");let o=new Map;try{await new Promise(h=>setTimeout(h,1e3));const l=await fetch("http://185.65.200.184:3000/api/stats");if(l.ok){const h=await l.json();o=new Map(((h==null?void 0:h.plugins)||[]).map(d=>[d.pluginName,d.downloadCount]))}}catch(l){console.warn("Не удалось загрузить статистику скачиваний плагинов:",l.message)}const i=(r||[]).map(l=>({...l,downloads:o.get(l.name)||0})).sort((l,h)=>(h.downloads||0)-(l.downloads||0)).map((l,h)=>({...l,isTop3:h<3,topPosition:h+1}));e({pluginCatalog:i,isCatalogLoading:!1})}catch(r){console.error("Не удалось загрузить каталог плагинов:",r.message),e({pluginCatalog:[],isCatalogLoading:!1})}},fetchInstalledPlugins:async r=>{try{const a=(await Ae(`/api/plugins/bot/${r}`)).map(i=>{let l;try{l=i.manifest?JSON.parse(i.manifest):{}}catch{console.error(`Ошибка парсинга манифеста для плагина ${i.name}`),l={}}const h=t().pluginCatalog.find(d=>d.name===i.name);return{...i,manifest:l,author:(h==null?void 0:h.author)||l.author||"Неизвестный автор",description:i.description||l.description||"Нет описания",commands:i.commands||[],eventGraphs:i.eventGraphs||[]}});e(i=>{i.installedPlugins[r]=a})}catch(o){console.error("Не удалось загрузить плагины для бота",r,o),e(a=>{a.installedPlugins[r]=[]})}},togglePlugin:async(r,o,a)=>{await Ae(`/api/bots/${r}/plugins/${o}`,{method:"PUT",body:JSON.stringify({isEnabled:a})},"Статус плагина обновлен."),await t().fetchInstalledPlugins(r)},deletePlugin:async(r,o,a)=>{await Ae(`/api/bots/${r}/plugins/${o}`,{method:"DELETE"},`Плагин "${a}" удален.`),await t().fetchInstalledPlugins(r)},installPluginFromRepo:async(r,o,a)=>{a&&t().optimisticallyIncrementDownloadCount(a);try{const i=await Ae(`/api/bots/${r}/plugins/install/github`,{method:"POST",body:JSON.stringify({repoUrl:o})});return Dt({title:"Успех!",description:`Плагин "${i.name}" успешно установлен.`}),await t().fetchInstalledPlugins(r),i}catch(i){throw await t().fetchPluginCatalog(),i}},installPluginFromPath:async(r,o)=>{try{const a=await Ae(`/api/bots/${r}/plugins/install/local`,{method:"POST",body:JSON.stringify({path:o})});return Dt({title:"Успех!",description:`Плагин "${a.name}" успешно установлен.`}),a}catch(a){throw a}finally{await t().fetchInstalledPlugins(r),await t().fetchPluginCatalog()}},checkForUpdates:async(r,o=!1)=>{try{const a=Date.now(),i=`plugin_update_check_${r}`,l=localStorage.getItem(i),h=l?parseInt(l,10):null,d=10*60*1e3;if(!o&&h&&a-h<d)return;const f=await Ae(`/api/plugins/check-updates/${r}`,{method:"POST"}),m=f.reduce((y,v)=>({...y,[v.sourceUri]:v}),{});localStorage.setItem(i,a.toString()),e(y=>{y.pluginUpdates[r]=m,y.lastUpdateCheck[r]=a}),Dt({title:"Проверка завершена",description:`Найдено обновлений: ${f.length}`})}catch(a){console.error("Ошибка проверки обновлений:",a)}},updatePlugin:async(r,o)=>{var i;const a=(i=t().installedPlugins[o])==null?void 0:i.find(l=>l.id===r);await Ae(`/api/plugins/update/${r}`,{method:"POST"},"Плагин обновлен. Перезапустите бота."),a&&e(pF(l=>{var h;(h=l.pluginUpdates[o])!=null&&h[a.sourceUri]&&delete l.pluginUpdates[o][a.sourceUri]})),await t().fetchInstalledPlugins(o)},createIdePlugin:async(r,{name:o,template:a})=>OQ(t,r,`/api/bots/${r}/plugins/ide/create`,{method:"POST",body:JSON.stringify({name:o,template:a})},`Плагин "${o}" успешно создан.`),updatePluginManifest:async(r,o,a)=>{e(pF(i=>{const l=i.installedPlugins.find(h=>h.name===o&&h.botId===r);l&&(l.name=a.name,l.version=a.version,l.description=a.description)}))},forkPlugin:async(r,o)=>OQ(t,r,`/api/bots/${r}/plugins/ide/${o}/fork`,{method:"POST"},`Копия плагина "${o}" успешно создана.`)}),Bke=(e,t)=>({tasks:[],fetchTasks:async()=>{try{const n=await Ae("/api/tasks");e({tasks:n||[]})}catch(n){console.error("Не удалось загрузить задачи:",n.message),e({tasks:[]})}},createTask:async n=>{const r=await Ae("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},"Задача успешно создана.");return r&&e(o=>{o.tasks.unshift(r)}),r},updateTask:async(n,r)=>{const o=await Ae(`/api/tasks/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)},"Задача успешно обновлена.");return o&&e(a=>{const i=a.tasks.findIndex(l=>l.id===n);i!==-1&&(a.tasks[i]={...a.tasks[i],...o})}),o},deleteTask:async n=>{await Ae(`/api/tasks/${n}`,{method:"DELETE"},"Задача успешно удалена."),e(r=>{r.tasks=r.tasks.filter(o=>o.id!==n)})}}),Fke=(e,t)=>({token:localStorage.getItem("authToken")||null,user:null,isAuthenticated:!1,needsSetup:!1,authInitialized:!1,hasPermission:n=>{var o;if(!n)return!0;const r=((o=t().user)==null?void 0:o.permissions)||[];return r.includes("*")||r.includes(n)},initializeAuth:async()=>{try{if((await Ae("/api/auth/status")).needsSetup){e({needsSetup:!0,isAuthenticated:!1,token:null,user:null});return}if(e({needsSetup:!1}),t().token){const o=await Ae("/api/auth/me");e({user:o,isAuthenticated:!0})}else e({isAuthenticated:!1,user:null,token:null})}catch(n){console.error("Auth initialization failed:",n.message),(n.message.includes("Невалидный токен")||n.message.includes("Нет токена"))&&localStorage.removeItem("authToken"),e({isAuthenticated:!1,token:null,user:null})}finally{e({authInitialized:!0})}},login:async(n,r)=>{try{const o=await Ae("/api/auth/login",{method:"POST",body:JSON.stringify({username:n,password:r})});localStorage.setItem("authToken",o.token),e({token:o.token,user:o.user,isAuthenticated:!0})}catch(o){throw console.error("Login failed:",o),o}},setupAdmin:async(n,r)=>{const o=await Ae("/api/auth/setup",{method:"POST",body:JSON.stringify({username:n,password:r})});localStorage.setItem("authToken",o.token),e({token:o.token,user:o.user,isAuthenticated:!0,needsSetup:!1})},logout:()=>{const n=t().socket;n&&n.disconnect(),localStorage.removeItem("authToken"),e({token:null,user:null,isAuthenticated:!1,socket:null})}}),Uke=e=>({theme:localStorage.getItem("blockmine-theme")||"system",setTheme:t=>{const n=window.document.documentElement;n.classList.remove("light","dark");let r="light";t==="system"?(r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",n.classList.add(r)):n.classList.add(t),localStorage.setItem("blockmine-theme",t),e({theme:t})}}),Ee=qae(Xae((...e)=>({...qke(...e),...Hke(...e),...Vke(...e),...Bke(...e),...Fke(...e),...Uke(...e)})));function Le(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function qQ(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vs(...e){return t=>{let n=!1;const r=e.map(o=>{const a=qQ(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():qQ(e[o],null)}}}}function lt(...e){return g.useCallback(vs(...e),e)}function Gke(e,t){const n=g.createContext(t),r=a=>{const{children:i,...l}=a,h=g.useMemo(()=>l,Object.values(l));return s.jsx(n.Provider,{value:h,children:i})};r.displayName=e+"Provider";function o(a){const i=g.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function er(e,t=[]){let n=[];function r(a,i){const l=g.createContext(i),h=n.length;n=[...n,i];const d=m=>{var M;const{scope:y,children:v,...b}=m,w=((M=y==null?void 0:y[e])==null?void 0:M[h])||l,C=g.useMemo(()=>b,Object.values(b));return s.jsx(w.Provider,{value:C,children:v})};d.displayName=a+"Provider";function f(m,y){var w;const v=((w=y==null?void 0:y[e])==null?void 0:w[h])||l,b=g.useContext(v);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=n.map(i=>g.createContext(i));return function(l){const h=(l==null?void 0:l[e])||a;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:h}}),[l,h])}};return o.scopeName=e,[r,Xke(o,...t)]}function Xke(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=r.reduce((l,{useScope:h,scopeName:d})=>{const m=h(a)[`__scope${d}`];return{...l,...m}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function zc(e){const t=Kke(e),n=g.forwardRef((r,o)=>{const{children:a,...i}=r,l=g.Children.toArray(a),h=l.find(Yke);if(h){const d=h.props.children,f=l.map(m=>m===h?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:m);return s.jsx(t,{...i,ref:o,children:g.isValidElement(d)?g.cloneElement(d,void 0,f):null})}return s.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Wke=zc("Slot");function Kke(e){const t=g.forwardRef((n,r)=>{const{children:o,...a}=n;if(g.isValidElement(o)){const i=Jke(o),l=Zke(a,o.props);return o.type!==g.Fragment&&(l.ref=r?vs(r,i):i),g.cloneElement(o,l)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sie=Symbol("radix.slottable");function cie(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=sie,t}function Yke(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sie}function Zke(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...l)=>{const h=a(...l);return o(...l),h}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Jke(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function sy(e){const t=e+"CollectionProvider",[n,r]=er(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=w=>{const{scope:C,children:M}=w,j=ce.useRef(null),_=ce.useRef(new Map).current;return s.jsx(o,{scope:C,itemMap:_,collectionRef:j,children:M})};i.displayName=t;const l=e+"CollectionSlot",h=zc(l),d=ce.forwardRef((w,C)=>{const{scope:M,children:j}=w,_=a(l,M),N=lt(C,_.collectionRef);return s.jsx(h,{ref:N,children:j})});d.displayName=l;const f=e+"CollectionItemSlot",m="data-radix-collection-item",y=zc(f),v=ce.forwardRef((w,C)=>{const{scope:M,children:j,..._}=w,N=ce.useRef(null),T=lt(C,N),A=a(f,M);return ce.useEffect(()=>(A.itemMap.set(N,{ref:N,..._}),()=>void A.itemMap.delete(N))),s.jsx(y,{[m]:"",ref:T,children:j})});v.displayName=f;function b(w){const C=a(e+"CollectionConsumer",w);return ce.useCallback(()=>{const j=C.collectionRef.current;if(!j)return[];const _=Array.from(j.querySelectorAll(`[${m}]`));return Array.from(C.itemMap.values()).sort((A,P)=>_.indexOf(A.ref.current)-_.indexOf(P.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:i,Slot:d,ItemSlot:v},b,r]}var Qke=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$e=Qke.reduce((e,t)=>{const n=zc(`Primitive.${t}`),r=g.forwardRef((o,a)=>{const{asChild:i,...l}=o,h=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(h,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function bG(e,t){e&&wa.flushSync(()=>e.dispatchEvent(t))}function Xn(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function e4e(e,t=globalThis==null?void 0:globalThis.document){const n=Xn(e);g.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var t4e="DismissableLayer",bF="dismissableLayer.update",n4e="dismissableLayer.pointerDownOutside",r4e="dismissableLayer.focusOutside",HQ,lie=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jh=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...h}=e,d=g.useContext(lie),[f,m]=g.useState(null),y=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=g.useState({}),b=lt(t,P=>m(P)),w=Array.from(d.layers),[C]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),M=w.indexOf(C),j=f?w.indexOf(f):-1,_=d.layersWithOutsidePointerEventsDisabled.size>0,N=j>=M,T=a4e(P=>{const R=P.target,V=[...d.branches].some(E=>E.contains(R));!N||V||(o==null||o(P),i==null||i(P),P.defaultPrevented||l==null||l())},y),A=i4e(P=>{const R=P.target;[...d.branches].some(E=>E.contains(R))||(a==null||a(P),i==null||i(P),P.defaultPrevented||l==null||l())},y);return e4e(P=>{j===d.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},y),g.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(HQ=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),VQ(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=HQ)}},[f,y,n,d]),g.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),VQ())},[f,d]),g.useEffect(()=>{const P=()=>v({});return document.addEventListener(bF,P),()=>document.removeEventListener(bF,P)},[]),s.jsx($e.div,{...h,ref:b,style:{pointerEvents:_?N?"auto":"none":void 0,...e.style},onFocusCapture:Le(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Le(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Le(e.onPointerDownCapture,T.onPointerDownCapture)})});jh.displayName=t4e;var o4e="DismissableLayerBranch",uie=g.forwardRef((e,t)=>{const n=g.useContext(lie),r=g.useRef(null),o=lt(t,r);return g.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),s.jsx($e.div,{...e,ref:o})});uie.displayName=o4e;function a4e(e,t=globalThis==null?void 0:globalThis.document){const n=Xn(e),r=g.useRef(!1),o=g.useRef(()=>{});return g.useEffect(()=>{const a=l=>{if(l.target&&!r.current){let h=function(){die(n4e,n,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=h,t.addEventListener("click",o.current,{once:!0})):h()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function i4e(e,t=globalThis==null?void 0:globalThis.document){const n=Xn(e),r=g.useRef(!1);return g.useEffect(()=>{const o=a=>{a.target&&!r.current&&die(r4e,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function VQ(){const e=new CustomEvent(bF);document.dispatchEvent(e)}function die(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?bG(o,a):o.dispatchEvent(a)}var s4e=jh,c4e=uie,vr=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},l4e="Portal",Lh=g.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,a]=g.useState(!1);vr(()=>a(!0),[]);const i=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?Nve.createPortal(s.jsx($e.div,{...r,ref:t}),i):null});Lh.displayName=l4e;function u4e(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var tr=e=>{const{present:t,children:n}=e,r=d4e(t),o=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),a=lt(r.ref,h4e(o));return typeof n=="function"||r.isPresent?g.cloneElement(o,{ref:a}):null};tr.displayName="Presence";function d4e(e){const[t,n]=g.useState(),r=g.useRef(null),o=g.useRef(e),a=g.useRef("none"),i=e?"mounted":"unmounted",[l,h]=u4e(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const d=ix(r.current);a.current=l==="mounted"?d:"none"},[l]),vr(()=>{const d=r.current,f=o.current;if(f!==e){const y=a.current,v=ix(d);e?h("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?h("UNMOUNT"):h(f&&y!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,h]),vr(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,m=v=>{const w=ix(r.current).includes(v.animationName);if(v.target===t&&w&&(h("ANIMATION_END"),!o.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},y=v=>{v.target===t&&(a.current=ix(r.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:g.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function ix(e){return(e==null?void 0:e.animationName)||"none"}function h4e(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var f4e=Mp[" useInsertionEffect ".trim().toString()]||vr;function Yr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=p4e({defaultProp:t,onChange:n}),l=e!==void 0,h=l?e:o;{const f=g.useRef(e!==void 0);g.useEffect(()=>{const m=f.current;m!==l&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=l},[l,r])}const d=g.useCallback(f=>{var m;if(l){const y=m4e(f)?f(e):f;y!==e&&((m=i.current)==null||m.call(i,y))}else a(f)},[l,e,a,i]);return[h,d]}function p4e({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),o=g.useRef(n),a=g.useRef(t);return f4e(()=>{a.current=t},[t]),g.useEffect(()=>{var i;o.current!==n&&((i=a.current)==null||i.call(a,n),o.current=n)},[n,o]),[n,r,a]}function m4e(e){return typeof e=="function"}var hie=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),y4e="VisuallyHidden",QD=g.forwardRef((e,t)=>s.jsx($e.span,{...e,ref:t,style:{...hie,...e.style}}));QD.displayName=y4e;var g4e=QD,wG="ToastProvider",[MG,x4e,v4e]=sy("Toast"),[fie,ben]=er("Toast",[v4e]),[k4e,ez]=fie(wG),pie=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:i}=e,[l,h]=g.useState(null),[d,f]=g.useState(0),m=g.useRef(!1),y=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${wG}\`. Expected non-empty \`string\`.`),s.jsx(MG.Provider,{scope:t,children:s.jsx(k4e,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:a,toastCount:d,viewport:l,onViewportChange:h,onToastAdd:g.useCallback(()=>f(v=>v+1),[]),onToastRemove:g.useCallback(()=>f(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:m,isClosePausedRef:y,children:i})})};pie.displayName=wG;var mie="ToastViewport",b4e=["F8"],wF="toast.viewportPause",MF="toast.viewportResume",yie=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=b4e,label:o="Notifications ({hotkey})",...a}=e,i=ez(mie,n),l=x4e(n),h=g.useRef(null),d=g.useRef(null),f=g.useRef(null),m=g.useRef(null),y=lt(t,m,i.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=i.toastCount>0;g.useEffect(()=>{const C=M=>{var _;r.length!==0&&r.every(N=>M[N]||M.code===N)&&((_=m.current)==null||_.focus())};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[r]),g.useEffect(()=>{const C=h.current,M=m.current;if(b&&C&&M){const j=()=>{if(!i.isClosePausedRef.current){const A=new CustomEvent(wF);M.dispatchEvent(A),i.isClosePausedRef.current=!0}},_=()=>{if(i.isClosePausedRef.current){const A=new CustomEvent(MF);M.dispatchEvent(A),i.isClosePausedRef.current=!1}},N=A=>{!C.contains(A.relatedTarget)&&_()},T=()=>{C.contains(document.activeElement)||_()};return C.addEventListener("focusin",j),C.addEventListener("focusout",N),C.addEventListener("pointermove",j),C.addEventListener("pointerleave",T),window.addEventListener("blur",j),window.addEventListener("focus",_),()=>{C.removeEventListener("focusin",j),C.removeEventListener("focusout",N),C.removeEventListener("pointermove",j),C.removeEventListener("pointerleave",T),window.removeEventListener("blur",j),window.removeEventListener("focus",_)}}},[b,i.isClosePausedRef]);const w=g.useCallback(({tabbingDirection:C})=>{const j=l().map(_=>{const N=_.ref.current,T=[N,...R4e(N)];return C==="forwards"?T:T.reverse()});return(C==="forwards"?j.reverse():j).flat()},[l]);return g.useEffect(()=>{const C=m.current;if(C){const M=j=>{var T,A,P;const _=j.altKey||j.ctrlKey||j.metaKey;if(j.key==="Tab"&&!_){const R=document.activeElement,V=j.shiftKey;if(j.target===C&&V){(T=d.current)==null||T.focus();return}const z=w({tabbingDirection:V?"backwards":"forwards"}),H=z.findIndex($=>$===R);QH(z.slice(H+1))?j.preventDefault():V?(A=d.current)==null||A.focus():(P=f.current)==null||P.focus()}};return C.addEventListener("keydown",M),()=>C.removeEventListener("keydown",M)}},[l,w]),s.jsxs(c4e,{ref:h,role:"region","aria-label":o.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&s.jsx(SF,{ref:d,onFocusFromOutsideViewport:()=>{const C=w({tabbingDirection:"forwards"});QH(C)}}),s.jsx(MG.Slot,{scope:n,children:s.jsx($e.ol,{tabIndex:-1,...a,ref:y})}),b&&s.jsx(SF,{ref:f,onFocusFromOutsideViewport:()=>{const C=w({tabbingDirection:"backwards"});QH(C)}})]})});yie.displayName=mie;var gie="ToastFocusProxy",SF=g.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,a=ez(gie,n);return s.jsx(QD,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var d;const l=i.relatedTarget;!((d=a.viewport)!=null&&d.contains(l))&&r()}})});SF.displayName=gie;var cy="Toast",w4e="toast.swipeStart",M4e="toast.swipeMove",S4e="toast.swipeCancel",C4e="toast.swipeEnd",xie=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:a,...i}=e,[l,h]=Yr({prop:r,defaultProp:o??!0,onChange:a,caller:cy});return s.jsx(tr,{present:n||l,children:s.jsx(j4e,{open:l,...i,ref:t,onClose:()=>h(!1),onPause:Xn(e.onPause),onResume:Xn(e.onResume),onSwipeStart:Le(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Le(e.onSwipeMove,d=>{const{x:f,y:m}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${m}px`)}),onSwipeCancel:Le(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Le(e.onSwipeEnd,d=>{const{x:f,y:m}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${m}px`),h(!1)})})})});xie.displayName=cy;var[_4e,N4e]=fie(cy,{onClose(){}}),j4e=g.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:a,onClose:i,onEscapeKeyDown:l,onPause:h,onResume:d,onSwipeStart:f,onSwipeMove:m,onSwipeCancel:y,onSwipeEnd:v,...b}=e,w=ez(cy,n),[C,M]=g.useState(null),j=lt(t,$=>M($)),_=g.useRef(null),N=g.useRef(null),T=o||w.duration,A=g.useRef(0),P=g.useRef(T),R=g.useRef(0),{onToastAdd:V,onToastRemove:E}=w,q=Xn(()=>{var F;(C==null?void 0:C.contains(document.activeElement))&&((F=w.viewport)==null||F.focus()),i()}),z=g.useCallback($=>{!$||$===1/0||(window.clearTimeout(R.current),A.current=new Date().getTime(),R.current=window.setTimeout(q,$))},[q]);g.useEffect(()=>{const $=w.viewport;if($){const F=()=>{z(P.current),d==null||d()},D=()=>{const U=new Date().getTime()-A.current;P.current=P.current-U,window.clearTimeout(R.current),h==null||h()};return $.addEventListener(wF,D),$.addEventListener(MF,F),()=>{$.removeEventListener(wF,D),$.removeEventListener(MF,F)}}},[w.viewport,T,h,d,z]),g.useEffect(()=>{a&&!w.isClosePausedRef.current&&z(T)},[a,T,w.isClosePausedRef,z]),g.useEffect(()=>(V(),()=>E()),[V,E]);const H=g.useMemo(()=>C?Cie(C):null,[C]);return w.viewport?s.jsxs(s.Fragment,{children:[H&&s.jsx(L4e,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:H}),s.jsx(_4e,{scope:n,onClose:q,children:wa.createPortal(s.jsx(MG.ItemSlot,{scope:n,children:s.jsx(s4e,{asChild:!0,onEscapeKeyDown:Le(l,()=>{w.isFocusedToastEscapeKeyDownRef.current||q(),w.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx($e.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":w.swipeDirection,...b,ref:j,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Le(e.onKeyDown,$=>{$.key==="Escape"&&(l==null||l($.nativeEvent),$.nativeEvent.defaultPrevented||(w.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:Le(e.onPointerDown,$=>{$.button===0&&(_.current={x:$.clientX,y:$.clientY})}),onPointerMove:Le(e.onPointerMove,$=>{if(!_.current)return;const F=$.clientX-_.current.x,D=$.clientY-_.current.y,U=!!N.current,X=["left","right"].includes(w.swipeDirection),K=["left","up"].includes(w.swipeDirection)?Math.min:Math.max,I=X?K(0,F):0,W=X?0:K(0,D),G=$.pointerType==="touch"?10:2,O={x:I,y:W},Q={originalEvent:$,delta:O};U?(N.current=O,sx(M4e,m,Q,{discrete:!1})):BQ(O,w.swipeDirection,G)?(N.current=O,sx(w4e,f,Q,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(F)>G||Math.abs(D)>G)&&(_.current=null)}),onPointerUp:Le(e.onPointerUp,$=>{const F=N.current,D=$.target;if(D.hasPointerCapture($.pointerId)&&D.releasePointerCapture($.pointerId),N.current=null,_.current=null,F){const U=$.currentTarget,X={originalEvent:$,delta:F};BQ(F,w.swipeDirection,w.swipeThreshold)?sx(C4e,v,X,{discrete:!0}):sx(S4e,y,X,{discrete:!0}),U.addEventListener("click",K=>K.preventDefault(),{once:!0})}})})})}),w.viewport)})]}):null}),L4e=e=>{const{__scopeToast:t,children:n,...r}=e,o=ez(cy,t),[a,i]=g.useState(!1),[l,h]=g.useState(!1);return T4e(()=>i(!0)),g.useEffect(()=>{const d=window.setTimeout(()=>h(!0),1e3);return()=>window.clearTimeout(d)},[]),l?null:s.jsx(Lh,{asChild:!0,children:s.jsx(QD,{...r,children:a&&s.jsxs(s.Fragment,{children:[o.label," ",n]})})})},A4e="ToastTitle",vie=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx($e.div,{...r,ref:t})});vie.displayName=A4e;var E4e="ToastDescription",kie=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx($e.div,{...r,ref:t})});kie.displayName=E4e;var bie="ToastAction",wie=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?s.jsx(Sie,{altText:n,asChild:!0,children:s.jsx(SG,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${bie}\`. Expected non-empty \`string\`.`),null)});wie.displayName=bie;var Mie="ToastClose",SG=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=N4e(Mie,n);return s.jsx(Sie,{asChild:!0,children:s.jsx($e.button,{type:"button",...r,ref:t,onClick:Le(e.onClick,o.onClose)})})});SG.displayName=Mie;var Sie=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return s.jsx($e.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Cie(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),I4e(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!o)if(a){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Cie(r))}}),t}function sx(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?bG(o,a):o.dispatchEvent(a)}var BQ=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),a=r>o;return t==="left"||t==="right"?a&&r>n:!a&&o>n};function T4e(e=()=>{}){const t=Xn(e);vr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function I4e(e){return e.nodeType===e.ELEMENT_NODE}function R4e(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function QH(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var $4e=pie,_ie=yie,Nie=xie,jie=vie,Lie=kie,Aie=wie,Eie=SG;function Tie(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Tie(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gr(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Tie(e))&&(r&&(r+=" "),r+=t);return r}const FQ=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,UQ=gr,qp=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return UQ(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(d=>{const f=n==null?void 0:n[d],m=a==null?void 0:a[d];if(f===null)return null;const y=FQ(f)||FQ(m);return o[d][y]}),l=n&&Object.entries(n).reduce((d,f)=>{let[m,y]=f;return y===void 0||(d[m]=y),d},{}),h=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:m,className:y,...v}=f;return Object.entries(v).every(b=>{let[w,C]=b;return Array.isArray(C)?C.includes({...a,...l}[w]):{...a,...l}[w]===C})?[...d,m,y]:d},[]);return UQ(e,i,h,n==null?void 0:n.class,n==null?void 0:n.className)};/**
|
|
71
71
|
* @license lucide-react v0.514.0 - ISC
|
|
72
72
|
*
|
|
73
73
|
* This source code is licensed under the ISC license.
|
|
@@ -8167,7 +8167,7 @@ Alternatively, you can use your own component as a description by assigning it a
|
|
|
8167
8167
|
|
|
8168
8168
|
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},art=Rde,irt=$de,srt=Pde,Gde=Dde,Xde=zde,Wde=Bde,Kde=Ude,Yde=qde,Zde=Vde;const EX=art,crt=irt,lrt=srt,Jde=g.forwardRef(({className:e,...t},n)=>s.jsx(Gde,{className:me("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Jde.displayName=Gde.displayName;const Pz=g.forwardRef(({className:e,...t},n)=>s.jsxs(lrt,{children:[s.jsx(Jde,{}),s.jsx(Xde,{ref:n,className:me("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Pz.displayName=Xde.displayName;const Dz=({className:e,...t})=>s.jsx("div",{className:me("flex flex-col space-y-2 text-center sm:text-left",e),...t});Dz.displayName="AlertDialogHeader";const zz=({className:e,...t})=>s.jsx("div",{className:me("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});zz.displayName="AlertDialogFooter";const Oz=g.forwardRef(({className:e,...t},n)=>s.jsx(Yde,{ref:n,className:me("text-lg font-semibold",e),...t}));Oz.displayName=Yde.displayName;const qz=g.forwardRef(({className:e,...t},n)=>s.jsx(Zde,{ref:n,className:me("text-sm text-muted-foreground",e),...t}));qz.displayName=Zde.displayName;const Hz=g.forwardRef(({className:e,...t},n)=>s.jsx(Wde,{ref:n,className:me(tz(),e),...t}));Hz.displayName=Wde.displayName;const Vz=g.forwardRef(({className:e,...t},n)=>s.jsx(Kde,{ref:n,className:me(tz({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Vz.displayName=Kde.displayName;function Zc({open:e,onOpenChange:t,title:n,description:r,onConfirm:o,confirmText:a="Подтвердить",cancelText:i="Отмена"}){return s.jsx(EX,{open:e,onOpenChange:t,children:s.jsxs(Pz,{children:[s.jsxs(Dz,{children:[s.jsx(Oz,{children:n}),s.jsx(qz,{children:r})]}),s.jsxs(zz,{children:[s.jsx(Vz,{children:i}),s.jsx(Hz,{onClick:l=>{l.preventDefault(),o(),t(!1)},className:tz({variant:"destructive"}),children:a})]})]})})}const urt=[];function drt(){const{botId:e}=Ui(),t=Dr();if(!e)return null;const[n,r]=g.useState(!1),[o,a]=g.useState(!1),i=Ee(j=>j.bots),l=Ee(j=>j.botStatuses),h=Ee(j=>j.startBot),d=Ee(j=>j.stopBot),f=Ee(j=>j.restartBot),m=Ee(j=>j.deleteBot),y=Ee(j=>j.hasPermission),v=Ee(j=>j.fetchUIExtensions),b=Ee(j=>j.botUIExtensions[e]||urt),w=g.useMemo(()=>i.find(j=>j.id===parseInt(e)),[i,e]);g.useEffect(()=>{e&&v(parseInt(e,10))},[e]);const C=async()=>{if(w)try{await m(w.id),t("/",{replace:!0})}catch(j){console.error("Не удалось удалить бота:",j)}};if(!w)return s.jsxs("div",{className:"flex items-center justify-center h-full text-muted-foreground gap-2",children:[s.jsx(pt,{className:"h-5 w-5 animate-spin"}),"Загрузка данных бота..."]});const M=l[w.id]==="running";return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-col h-full w-full overflow-hidden",children:[s.jsxs("header",{className:"shrink-0 p-6 bg-gradient-to-br from-background via-muted/20 to-background border-b",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-500 to-purple-500 rounded-lg blur-sm opacity-20"}),s.jsx("div",{className:"relative bg-gradient-to-r from-blue-500 to-purple-500 p-2 rounded-lg",children:s.jsx(gs,{className:"h-6 w-6 text-white"})})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h1",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:w.username}),s.jsxs("div",{className:"text-sm text-muted-foreground mt-1 flex items-center gap-2",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),w.server.host,":",w.server.port]}),w.note&&s.jsx("span",{className:"text-xs bg-muted px-2 py-1 rounded-full",children:w.note})]})]}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsxs("div",{className:me("flex items-center gap-1 px-3 py-1 rounded-full border text-xs font-medium transition-all",M?"bg-green-500/10 border-green-500/20 text-green-600":"bg-red-500/10 border-red-500/20 text-red-600"),children:[s.jsx("div",{className:me("w-2 h-2 rounded-full",M?"bg-green-500 animate-pulse":"bg-red-500")}),s.jsx("span",{className:"uppercase font-bold",children:l[w.id]||"stopped"})]})})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("nav",{className:"flex items-center gap-1 bg-muted/50 backdrop-blur-sm border border-border/50 rounded-lg p-1",children:[s.jsxs(Ro,{to:"console",className:({isActive:j})=>me("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-all",j?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:[s.jsx(fo,{className:"h-4 w-4"}),"Консоль"]}),s.jsxs(Ro,{to:"plugins",className:({isActive:j})=>me("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-all",j?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:[s.jsx(qo,{className:"h-4 w-4"}),"Плагины"]}),b.map(j=>{const _=CG[j.icon]||qo;return s.jsxs(Ro,{to:`plugins/ui/${j.pluginName}/${j.path}`,className:({isActive:N})=>me("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-all",N?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:[s.jsx(_,{className:"h-4 w-4"}),j.label]},j.id)}),s.jsxs(Ro,{to:"settings",className:({isActive:j})=>me("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-all",j?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:[s.jsx(Ho,{className:"h-4 w-4"}),"Настройки"]}),s.jsxs(Ro,{to:"events",className:({isActive:j})=>me("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-all",j?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:[s.jsx(uh,{className:"h-4 w-4"}),"События"]}),s.jsxs(Ro,{to:"management",className:({isActive:j})=>me("flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-all",j?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:[s.jsx(Ec,{className:"h-4 w-4"}),"Управление"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[y("bot:start_stop")&&s.jsxs(s.Fragment,{children:[s.jsxs(se,{variant:"outline",size:"sm",onClick:()=>h(w.id),disabled:M,className:"bg-green-500/10 border-green-500/20 text-green-600 hover:bg-green-500/20 hover:text-green-700",children:[s.jsx(Nc,{className:"h-4 w-4 mr-1"}),"Запустить"]}),s.jsxs(se,{variant:"outline",size:"sm",onClick:()=>d(w.id),disabled:!M,className:"bg-red-500/10 border-red-500/20 text-red-600 hover:bg-red-500/20 hover:text-red-700",children:[s.jsx(Lc,{className:"h-4 w-4 mr-1"}),"Остановить"]}),s.jsxs(se,{variant:"outline",size:"sm",onClick:()=>f(w.id),disabled:!M,className:"bg-yellow-500/10 border-yellow-500/20 text-yellow-600 hover:bg-yellow-500/20 hover:text-yellow-700",children:[s.jsx(lo,{className:"h-4 w-4 mr-1"}),"Перезапустить"]})]}),y("bot:export")&&s.jsxs(Ut,{open:n,onOpenChange:r,children:[s.jsx(Xo,{asChild:!0,children:s.jsx(se,{variant:"outline",size:"icon",title:"Экспортировать бота",className:"bg-blue-500/10 border-blue-500/20 text-blue-600 hover:bg-blue-500/20 hover:text-blue-700",children:s.jsx(Oo,{className:"h-4 w-4"})})}),s.jsx(Knt,{bot:w,onCancel:()=>r(!1)})]}),y("bot:delete")&&s.jsx(se,{variant:"ghost",size:"icon",onClick:()=>a(!0),disabled:M,title:"Удалить бота",className:"text-red-600 hover:text-red-700 hover:bg-red-500/10",children:s.jsx(_r,{className:"h-4 w-4"})})]})]})]}),s.jsx("main",{className:"flex-grow min-h-0 flex flex-col overflow-hidden",children:s.jsx(dG,{})})]}),s.jsx(Zc,{open:o,onOpenChange:a,title:`Удалить бота ${w.username}?`,description:"Это действие необратимо. Вся конфигурация, связанная с этим ботом, будет удалена.",onConfirm:C,confirmText:"Да, удалить бота"})]})}var sB={},za={};const hrt="Á",frt="á",prt="Ă",mrt="ă",yrt="∾",grt="∿",xrt="∾̳",vrt="Â",krt="â",brt="´",wrt="А",Mrt="а",Srt="Æ",Crt="æ",_rt="",Nrt="𝔄",jrt="𝔞",Lrt="À",Art="à",Ert="ℵ",Trt="ℵ",Irt="Α",Rrt="α",$rt="Ā",Prt="ā",Drt="⨿",zrt="&",Ort="&",qrt="⩕",Hrt="⩓",Vrt="∧",Brt="⩜",Frt="⩘",Urt="⩚",Grt="∠",Xrt="⦤",Wrt="∠",Krt="⦨",Yrt="⦩",Zrt="⦪",Jrt="⦫",Qrt="⦬",eot="⦭",tot="⦮",not="⦯",rot="∡",oot="∟",aot="⊾",iot="⦝",sot="∢",cot="Å",lot="⍼",uot="Ą",dot="ą",hot="𝔸",fot="𝕒",pot="⩯",mot="≈",yot="⩰",got="≊",xot="≋",vot="'",kot="",bot="≈",wot="≊",Mot="Å",Sot="å",Cot="𝒜",_ot="𝒶",Not="≔",jot="*",Lot="≈",Aot="≍",Eot="Ã",Tot="ã",Iot="Ä",Rot="ä",$ot="∳",Pot="⨑",Dot="≌",zot="϶",Oot="‵",qot="∽",Hot="⋍",Vot="∖",Bot="⫧",Fot="⊽",Uot="⌅",Got="⌆",Xot="⌅",Wot="⎵",Kot="⎶",Yot="≌",Zot="Б",Jot="б",Qot="„",eat="∵",tat="∵",nat="∵",rat="⦰",oat="϶",aat="ℬ",iat="ℬ",sat="Β",cat="β",lat="ℶ",uat="≬",dat="𝔅",hat="𝔟",fat="⋂",pat="◯",mat="⋃",yat="⨀",gat="⨁",xat="⨂",vat="⨆",kat="★",bat="▽",wat="△",Mat="⨄",Sat="⋁",Cat="⋀",_at="⤍",Nat="⧫",jat="▪",Lat="▴",Aat="▾",Eat="◂",Tat="▸",Iat="␣",Rat="▒",$at="░",Pat="▓",Dat="█",zat="=⃥",Oat="≡⃥",qat="⫭",Hat="⌐",Vat="𝔹",Bat="𝕓",Fat="⊥",Uat="⊥",Gat="⋈",Xat="⧉",Wat="┐",Kat="╕",Yat="╖",Zat="╗",Jat="┌",Qat="╒",eit="╓",tit="╔",nit="─",rit="═",oit="┬",ait="╤",iit="╥",sit="╦",cit="┴",lit="╧",uit="╨",dit="╩",hit="⊟",fit="⊞",pit="⊠",mit="┘",yit="╛",git="╜",xit="╝",vit="└",kit="╘",bit="╙",wit="╚",Mit="│",Sit="║",Cit="┼",_it="╪",Nit="╫",jit="╬",Lit="┤",Ait="╡",Eit="╢",Tit="╣",Iit="├",Rit="╞",$it="╟",Pit="╠",Dit="‵",zit="˘",Oit="˘",qit="¦",Hit="𝒷",Vit="ℬ",Bit="⁏",Fit="∽",Uit="⋍",Git="⧅",Xit="\\",Wit="⟈",Kit="•",Yit="•",Zit="≎",Jit="⪮",Qit="≏",est="≎",tst="≏",nst="Ć",rst="ć",ost="⩄",ast="⩉",ist="⩋",sst="∩",cst="⋒",lst="⩇",ust="⩀",dst="ⅅ",hst="∩︀",fst="⁁",pst="ˇ",mst="ℭ",yst="⩍",gst="Č",xst="č",vst="Ç",kst="ç",bst="Ĉ",wst="ĉ",Mst="∰",Sst="⩌",Cst="⩐",_st="Ċ",Nst="ċ",jst="¸",Lst="¸",Ast="⦲",Est="¢",Tst="·",Ist="·",Rst="𝔠",$st="ℭ",Pst="Ч",Dst="ч",zst="✓",Ost="✓",qst="Χ",Hst="χ",Vst="ˆ",Bst="≗",Fst="↺",Ust="↻",Gst="⊛",Xst="⊚",Wst="⊝",Kst="⊙",Yst="®",Zst="Ⓢ",Jst="⊖",Qst="⊕",ect="⊗",tct="○",nct="⧃",rct="≗",oct="⨐",act="⫯",ict="⧂",sct="∲",cct="”",lct="’",uct="♣",dct="♣",hct=":",fct="∷",pct="⩴",mct="≔",yct="≔",gct=",",xct="@",vct="∁",kct="∘",bct="∁",wct="ℂ",Mct="≅",Sct="⩭",Cct="≡",_ct="∮",Nct="∯",jct="∮",Lct="𝕔",Act="ℂ",Ect="∐",Tct="∐",Ict="©",Rct="©",$ct="℗",Pct="∳",Dct="↵",zct="✗",Oct="⨯",qct="𝒞",Hct="𝒸",Vct="⫏",Bct="⫑",Fct="⫐",Uct="⫒",Gct="⋯",Xct="⤸",Wct="⤵",Kct="⋞",Yct="⋟",Zct="↶",Jct="⤽",Qct="⩈",elt="⩆",tlt="≍",nlt="∪",rlt="⋓",olt="⩊",alt="⊍",ilt="⩅",slt="∪︀",clt="↷",llt="⤼",ult="⋞",dlt="⋟",hlt="⋎",flt="⋏",plt="¤",mlt="↶",ylt="↷",glt="⋎",xlt="⋏",vlt="∲",klt="∱",blt="⌭",wlt="†",Mlt="‡",Slt="ℸ",Clt="↓",_lt="↡",Nlt="⇓",jlt="‐",Llt="⫤",Alt="⊣",Elt="⤏",Tlt="˝",Ilt="Ď",Rlt="ď",$lt="Д",Plt="д",Dlt="‡",zlt="⇊",Olt="ⅅ",qlt="ⅆ",Hlt="⤑",Vlt="⩷",Blt="°",Flt="∇",Ult="Δ",Glt="δ",Xlt="⦱",Wlt="⥿",Klt="𝔇",Ylt="𝔡",Zlt="⥥",Jlt="⇃",Qlt="⇂",eut="´",tut="˙",nut="˝",rut="`",out="˜",aut="⋄",iut="⋄",sut="⋄",cut="♦",lut="♦",uut="¨",dut="ⅆ",hut="ϝ",fut="⋲",put="÷",mut="÷",yut="⋇",gut="⋇",xut="Ђ",vut="ђ",kut="⌞",but="⌍",wut="$",Mut="𝔻",Sut="𝕕",Cut="¨",_ut="˙",Nut="⃜",jut="≐",Lut="≑",Aut="≐",Eut="∸",Tut="∔",Iut="⊡",Rut="⌆",$ut="∯",Put="¨",Dut="⇓",zut="⇐",Out="⇔",qut="⫤",Hut="⟸",Vut="⟺",But="⟹",Fut="⇒",Uut="⊨",Gut="⇑",Xut="⇕",Wut="∥",Kut="⤓",Yut="↓",Zut="↓",Jut="⇓",Qut="⇵",edt="̑",tdt="⇊",ndt="⇃",rdt="⇂",odt="⥐",adt="⥞",idt="⥖",sdt="↽",cdt="⥟",ldt="⥗",udt="⇁",ddt="↧",hdt="⊤",fdt="⤐",pdt="⌟",mdt="⌌",ydt="𝒟",gdt="𝒹",xdt="Ѕ",vdt="ѕ",kdt="⧶",bdt="Đ",wdt="đ",Mdt="⋱",Sdt="▿",Cdt="▾",_dt="⇵",Ndt="⥯",jdt="⦦",Ldt="Џ",Adt="џ",Edt="⟿",Tdt="É",Idt="é",Rdt="⩮",$dt="Ě",Pdt="ě",Ddt="Ê",zdt="ê",Odt="≖",qdt="≕",Hdt="Э",Vdt="э",Bdt="⩷",Fdt="Ė",Udt="ė",Gdt="≑",Xdt="ⅇ",Wdt="≒",Kdt="𝔈",Ydt="𝔢",Zdt="⪚",Jdt="È",Qdt="è",e1t="⪖",t1t="⪘",n1t="⪙",r1t="∈",o1t="⏧",a1t="ℓ",i1t="⪕",s1t="⪗",c1t="Ē",l1t="ē",u1t="∅",d1t="∅",h1t="◻",f1t="∅",p1t="▫",m1t=" ",y1t=" ",g1t=" ",x1t="Ŋ",v1t="ŋ",k1t=" ",b1t="Ę",w1t="ę",M1t="𝔼",S1t="𝕖",C1t="⋕",_1t="⧣",N1t="⩱",j1t="ε",L1t="Ε",A1t="ε",E1t="ϵ",T1t="≖",I1t="≕",R1t="≂",$1t="⪖",P1t="⪕",D1t="⩵",z1t="=",O1t="≂",q1t="≟",H1t="⇌",V1t="≡",B1t="⩸",F1t="⧥",U1t="⥱",G1t="≓",X1t="ℯ",W1t="ℰ",K1t="≐",Y1t="⩳",Z1t="≂",J1t="Η",Q1t="η",eht="Ð",tht="ð",nht="Ë",rht="ë",oht="€",aht="!",iht="∃",sht="∃",cht="ℰ",lht="ⅇ",uht="ⅇ",dht="≒",hht="Ф",fht="ф",pht="♀",mht="ffi",yht="ff",ght="ffl",xht="𝔉",vht="𝔣",kht="fi",bht="◼",wht="▪",Mht="fj",Sht="♭",Cht="fl",_ht="▱",Nht="ƒ",jht="𝔽",Lht="𝕗",Aht="∀",Eht="∀",Tht="⋔",Iht="⫙",Rht="ℱ",$ht="⨍",Pht="½",Dht="⅓",zht="¼",Oht="⅕",qht="⅙",Hht="⅛",Vht="⅔",Bht="⅖",Fht="¾",Uht="⅗",Ght="⅜",Xht="⅘",Wht="⅚",Kht="⅝",Yht="⅞",Zht="⁄",Jht="⌢",Qht="𝒻",eft="ℱ",tft="ǵ",nft="Γ",rft="γ",oft="Ϝ",aft="ϝ",ift="⪆",sft="Ğ",cft="ğ",lft="Ģ",uft="Ĝ",dft="ĝ",hft="Г",fft="г",pft="Ġ",mft="ġ",yft="≥",gft="≧",xft="⪌",vft="⋛",kft="≥",bft="≧",wft="⩾",Mft="⪩",Sft="⩾",Cft="⪀",_ft="⪂",Nft="⪄",jft="⋛︀",Lft="⪔",Aft="𝔊",Eft="𝔤",Tft="≫",Ift="⋙",Rft="⋙",$ft="ℷ",Pft="Ѓ",Dft="ѓ",zft="⪥",Oft="≷",qft="⪒",Hft="⪤",Vft="⪊",Bft="⪊",Fft="⪈",Uft="≩",Gft="⪈",Xft="≩",Wft="⋧",Kft="𝔾",Yft="𝕘",Zft="`",Jft="≥",Qft="⋛",ept="≧",tpt="⪢",npt="≷",rpt="⩾",opt="≳",apt="𝒢",ipt="ℊ",spt="≳",cpt="⪎",lpt="⪐",upt="⪧",dpt="⩺",hpt=">",fpt=">",ppt="≫",mpt="⋗",ypt="⦕",gpt="⩼",xpt="⪆",vpt="⥸",kpt="⋗",bpt="⋛",wpt="⪌",Mpt="≷",Spt="≳",Cpt="≩︀",_pt="≩︀",Npt="ˇ",jpt=" ",Lpt="½",Apt="ℋ",Ept="Ъ",Tpt="ъ",Ipt="⥈",Rpt="↔",$pt="⇔",Ppt="↭",Dpt="^",zpt="ℏ",Opt="Ĥ",qpt="ĥ",Hpt="♥",Vpt="♥",Bpt="…",Fpt="⊹",Upt="𝔥",Gpt="ℌ",Xpt="ℋ",Wpt="⤥",Kpt="⤦",Ypt="⇿",Zpt="∻",Jpt="↩",Qpt="↪",e0t="𝕙",t0t="ℍ",n0t="―",r0t="─",o0t="𝒽",a0t="ℋ",i0t="ℏ",s0t="Ħ",c0t="ħ",l0t="≎",u0t="≏",d0t="⁃",h0t="‐",f0t="Í",p0t="í",m0t="",y0t="Î",g0t="î",x0t="И",v0t="и",k0t="İ",b0t="Е",w0t="е",M0t="¡",S0t="⇔",C0t="𝔦",_0t="ℑ",N0t="Ì",j0t="ì",L0t="ⅈ",A0t="⨌",E0t="∭",T0t="⧜",I0t="℩",R0t="IJ",$0t="ij",P0t="Ī",D0t="ī",z0t="ℑ",O0t="ⅈ",q0t="ℐ",H0t="ℑ",V0t="ı",B0t="ℑ",F0t="⊷",U0t="Ƶ",G0t="⇒",X0t="℅",W0t="∞",K0t="⧝",Y0t="ı",Z0t="⊺",J0t="∫",Q0t="∬",e2t="ℤ",t2t="∫",n2t="⊺",r2t="⋂",o2t="⨗",a2t="⨼",i2t="",s2t="",c2t="Ё",l2t="ё",u2t="Į",d2t="į",h2t="𝕀",f2t="𝕚",p2t="Ι",m2t="ι",y2t="⨼",g2t="¿",x2t="𝒾",v2t="ℐ",k2t="∈",b2t="⋵",w2t="⋹",M2t="⋴",S2t="⋳",C2t="∈",_2t="",N2t="Ĩ",j2t="ĩ",L2t="І",A2t="і",E2t="Ï",T2t="ï",I2t="Ĵ",R2t="ĵ",$2t="Й",P2t="й",D2t="𝔍",z2t="𝔧",O2t="ȷ",q2t="𝕁",H2t="𝕛",V2t="𝒥",B2t="𝒿",F2t="Ј",U2t="ј",G2t="Є",X2t="є",W2t="Κ",K2t="κ",Y2t="ϰ",Z2t="Ķ",J2t="ķ",Q2t="К",emt="к",tmt="𝔎",nmt="𝔨",rmt="ĸ",omt="Х",amt="х",imt="Ќ",smt="ќ",cmt="𝕂",lmt="𝕜",umt="𝒦",dmt="𝓀",hmt="⇚",fmt="Ĺ",pmt="ĺ",mmt="⦴",ymt="ℒ",gmt="Λ",xmt="λ",vmt="⟨",kmt="⟪",bmt="⦑",wmt="⟨",Mmt="⪅",Smt="ℒ",Cmt="«",_mt="⇤",Nmt="⤟",jmt="←",Lmt="↞",Amt="⇐",Emt="⤝",Tmt="↩",Imt="↫",Rmt="⤹",$mt="⥳",Pmt="↢",Dmt="⤙",zmt="⤛",Omt="⪫",qmt="⪭",Hmt="⪭︀",Vmt="⤌",Bmt="⤎",Fmt="❲",Umt="{",Gmt="[",Xmt="⦋",Wmt="⦏",Kmt="⦍",Ymt="Ľ",Zmt="ľ",Jmt="Ļ",Qmt="ļ",eyt="⌈",tyt="{",nyt="Л",ryt="л",oyt="⤶",ayt="“",iyt="„",syt="⥧",cyt="⥋",lyt="↲",uyt="≤",dyt="≦",hyt="⟨",fyt="⇤",pyt="←",myt="←",yyt="⇐",gyt="⇆",xyt="↢",vyt="⌈",kyt="⟦",byt="⥡",wyt="⥙",Myt="⇃",Syt="⌊",Cyt="↽",_yt="↼",Nyt="⇇",jyt="↔",Lyt="↔",Ayt="⇔",Eyt="⇆",Tyt="⇋",Iyt="↭",Ryt="⥎",$yt="↤",Pyt="⊣",Dyt="⥚",zyt="⋋",Oyt="⧏",qyt="⊲",Hyt="⊴",Vyt="⥑",Byt="⥠",Fyt="⥘",Uyt="↿",Gyt="⥒",Xyt="↼",Wyt="⪋",Kyt="⋚",Yyt="≤",Zyt="≦",Jyt="⩽",Qyt="⪨",egt="⩽",tgt="⩿",ngt="⪁",rgt="⪃",ogt="⋚︀",agt="⪓",igt="⪅",sgt="⋖",cgt="⋚",lgt="⪋",ugt="⋚",dgt="≦",hgt="≶",fgt="≶",pgt="⪡",mgt="≲",ygt="⩽",ggt="≲",xgt="⥼",vgt="⌊",kgt="𝔏",bgt="𝔩",wgt="≶",Mgt="⪑",Sgt="⥢",Cgt="↽",_gt="↼",Ngt="⥪",jgt="▄",Lgt="Љ",Agt="љ",Egt="⇇",Tgt="≪",Igt="⋘",Rgt="⌞",$gt="⇚",Pgt="⥫",Dgt="◺",zgt="Ŀ",Ogt="ŀ",qgt="⎰",Hgt="⎰",Vgt="⪉",Bgt="⪉",Fgt="⪇",Ugt="≨",Ggt="⪇",Xgt="≨",Wgt="⋦",Kgt="⟬",Ygt="⇽",Zgt="⟦",Jgt="⟵",Qgt="⟵",ext="⟸",txt="⟷",nxt="⟷",rxt="⟺",oxt="⟼",axt="⟶",ixt="⟶",sxt="⟹",cxt="↫",lxt="↬",uxt="⦅",dxt="𝕃",hxt="𝕝",fxt="⨭",pxt="⨴",mxt="∗",yxt="_",gxt="↙",xxt="↘",vxt="◊",kxt="◊",bxt="⧫",wxt="(",Mxt="⦓",Sxt="⇆",Cxt="⌟",_xt="⇋",Nxt="⥭",jxt="",Lxt="⊿",Axt="‹",Ext="𝓁",Txt="ℒ",Ixt="↰",Rxt="↰",$xt="≲",Pxt="⪍",Dxt="⪏",zxt="[",Oxt="‘",qxt="‚",Hxt="Ł",Vxt="ł",Bxt="⪦",Fxt="⩹",Uxt="<",Gxt="<",Xxt="≪",Wxt="⋖",Kxt="⋋",Yxt="⋉",Zxt="⥶",Jxt="⩻",Qxt="◃",evt="⊴",tvt="◂",nvt="⦖",rvt="⥊",ovt="⥦",avt="≨︀",ivt="≨︀",svt="¯",cvt="♂",lvt="✠",uvt="✠",dvt="↦",hvt="↦",fvt="↧",pvt="↤",mvt="↥",yvt="▮",gvt="⨩",xvt="М",vvt="м",kvt="—",bvt="∺",wvt="∡",Mvt=" ",Svt="ℳ",Cvt="𝔐",_vt="𝔪",Nvt="℧",jvt="µ",Lvt="*",Avt="⫰",Evt="∣",Tvt="·",Ivt="⊟",Rvt="−",$vt="∸",Pvt="⨪",Dvt="∓",zvt="⫛",Ovt="…",qvt="∓",Hvt="⊧",Vvt="𝕄",Bvt="𝕞",Fvt="∓",Uvt="𝓂",Gvt="ℳ",Xvt="∾",Wvt="Μ",Kvt="μ",Yvt="⊸",Zvt="⊸",Jvt="∇",Qvt="Ń",ekt="ń",tkt="∠⃒",nkt="≉",rkt="⩰̸",okt="≋̸",akt="ʼn",ikt="≉",skt="♮",ckt="ℕ",lkt="♮",ukt=" ",dkt="≎̸",hkt="≏̸",fkt="⩃",pkt="Ň",mkt="ň",ykt="Ņ",gkt="ņ",xkt="≇",vkt="⩭̸",kkt="⩂",bkt="Н",wkt="н",Mkt="–",Skt="⤤",Ckt="↗",_kt="⇗",Nkt="↗",jkt="≠",Lkt="≐̸",Akt="",Ekt="",Tkt="",Ikt="",Rkt="≢",$kt="⤨",Pkt="≂̸",Dkt="≫",zkt="≪",Okt=`
|
|
8169
8169
|
`,qkt="∄",Hkt="∄",Vkt="𝔑",Bkt="𝔫",Fkt="≧̸",Ukt="≱",Gkt="≱",Xkt="≧̸",Wkt="⩾̸",Kkt="⩾̸",Ykt="⋙̸",Zkt="≵",Jkt="≫⃒",Qkt="≯",e4t="≯",t4t="≫̸",n4t="↮",r4t="⇎",o4t="⫲",a4t="∋",i4t="⋼",s4t="⋺",c4t="∋",l4t="Њ",u4t="њ",d4t="↚",h4t="⇍",f4t="‥",p4t="≦̸",m4t="≰",y4t="↚",g4t="⇍",x4t="↮",v4t="⇎",k4t="≰",b4t="≦̸",w4t="⩽̸",M4t="⩽̸",S4t="≮",C4t="⋘̸",_4t="≴",N4t="≪⃒",j4t="≮",L4t="⋪",A4t="⋬",E4t="≪̸",T4t="∤",I4t="",R4t=" ",$4t="𝕟",P4t="ℕ",D4t="⫬",z4t="¬",O4t="≢",q4t="≭",H4t="∦",V4t="∉",B4t="≠",F4t="≂̸",U4t="∄",G4t="≯",X4t="≱",W4t="≧̸",K4t="≫̸",Y4t="≹",Z4t="⩾̸",J4t="≵",Q4t="≎̸",e5t="≏̸",t5t="∉",n5t="⋵̸",r5t="⋹̸",o5t="∉",a5t="⋷",i5t="⋶",s5t="⧏̸",c5t="⋪",l5t="⋬",u5t="≮",d5t="≰",h5t="≸",f5t="≪̸",p5t="⩽̸",m5t="≴",y5t="⪢̸",g5t="⪡̸",x5t="∌",v5t="∌",k5t="⋾",b5t="⋽",w5t="⊀",M5t="⪯̸",S5t="⋠",C5t="∌",_5t="⧐̸",N5t="⋫",j5t="⋭",L5t="⊏̸",A5t="⋢",E5t="⊐̸",T5t="⋣",I5t="⊂⃒",R5t="⊈",$5t="⊁",P5t="⪰̸",D5t="⋡",z5t="≿̸",O5t="⊃⃒",q5t="⊉",H5t="≁",V5t="≄",B5t="≇",F5t="≉",U5t="∤",G5t="∦",X5t="∦",W5t="⫽⃥",K5t="∂̸",Y5t="⨔",Z5t="⊀",J5t="⋠",Q5t="⊀",ebt="⪯̸",tbt="⪯̸",nbt="⤳̸",rbt="↛",obt="⇏",abt="↝̸",ibt="↛",sbt="⇏",cbt="⋫",lbt="⋭",ubt="⊁",dbt="⋡",hbt="⪰̸",fbt="𝒩",pbt="𝓃",mbt="∤",ybt="∦",gbt="≁",xbt="≄",vbt="≄",kbt="∤",bbt="∦",wbt="⋢",Mbt="⋣",Sbt="⊄",Cbt="⫅̸",_bt="⊈",Nbt="⊂⃒",jbt="⊈",Lbt="⫅̸",Abt="⊁",Ebt="⪰̸",Tbt="⊅",Ibt="⫆̸",Rbt="⊉",$bt="⊃⃒",Pbt="⊉",Dbt="⫆̸",zbt="≹",Obt="Ñ",qbt="ñ",Hbt="≸",Vbt="⋪",Bbt="⋬",Fbt="⋫",Ubt="⋭",Gbt="Ν",Xbt="ν",Wbt="#",Kbt="№",Ybt=" ",Zbt="≍⃒",Jbt="⊬",Qbt="⊭",e3t="⊮",t3t="⊯",n3t="≥⃒",r3t=">⃒",o3t="⤄",a3t="⧞",i3t="⤂",s3t="≤⃒",c3t="<⃒",l3t="⊴⃒",u3t="⤃",d3t="⊵⃒",h3t="∼⃒",f3t="⤣",p3t="↖",m3t="⇖",y3t="↖",g3t="⤧",x3t="Ó",v3t="ó",k3t="⊛",b3t="Ô",w3t="ô",M3t="⊚",S3t="О",C3t="о",_3t="⊝",N3t="Ő",j3t="ő",L3t="⨸",A3t="⊙",E3t="⦼",T3t="Œ",I3t="œ",R3t="⦿",$3t="𝔒",P3t="𝔬",D3t="˛",z3t="Ò",O3t="ò",q3t="⧁",H3t="⦵",V3t="Ω",B3t="∮",F3t="↺",U3t="⦾",G3t="⦻",X3t="‾",W3t="⧀",K3t="Ō",Y3t="ō",Z3t="Ω",J3t="ω",Q3t="Ο",ewt="ο",twt="⦶",nwt="⊖",rwt="𝕆",owt="𝕠",awt="⦷",iwt="“",swt="‘",cwt="⦹",lwt="⊕",uwt="↻",dwt="⩔",hwt="∨",fwt="⩝",pwt="ℴ",mwt="ℴ",ywt="ª",gwt="º",xwt="⊶",vwt="⩖",kwt="⩗",bwt="⩛",wwt="Ⓢ",Mwt="𝒪",Swt="ℴ",Cwt="Ø",_wt="ø",Nwt="⊘",jwt="Õ",Lwt="õ",Awt="⨶",Ewt="⨷",Twt="⊗",Iwt="Ö",Rwt="ö",$wt="⌽",Pwt="‾",Dwt="⏞",zwt="⎴",Owt="⏜",qwt="¶",Hwt="∥",Vwt="∥",Bwt="⫳",Fwt="⫽",Uwt="∂",Gwt="∂",Xwt="П",Wwt="п",Kwt="%",Ywt=".",Zwt="‰",Jwt="⊥",Qwt="‱",e6t="𝔓",t6t="𝔭",n6t="Φ",r6t="φ",o6t="ϕ",a6t="ℳ",i6t="☎",s6t="Π",c6t="π",l6t="⋔",u6t="ϖ",d6t="ℏ",h6t="ℎ",f6t="ℏ",p6t="⨣",m6t="⊞",y6t="⨢",g6t="+",x6t="∔",v6t="⨥",k6t="⩲",b6t="±",w6t="±",M6t="⨦",S6t="⨧",C6t="±",_6t="ℌ",N6t="⨕",j6t="𝕡",L6t="ℙ",A6t="£",E6t="⪷",T6t="⪻",I6t="≺",R6t="≼",$6t="⪷",P6t="≺",D6t="≼",z6t="≺",O6t="⪯",q6t="≼",H6t="≾",V6t="⪯",B6t="⪹",F6t="⪵",U6t="⋨",G6t="⪯",X6t="⪳",W6t="≾",K6t="′",Y6t="″",Z6t="ℙ",J6t="⪹",Q6t="⪵",e8t="⋨",t8t="∏",n8t="∏",r8t="⌮",o8t="⌒",a8t="⌓",i8t="∝",s8t="∝",c8t="∷",l8t="∝",u8t="≾",d8t="⊰",h8t="𝒫",f8t="𝓅",p8t="Ψ",m8t="ψ",y8t=" ",g8t="𝔔",x8t="𝔮",v8t="⨌",k8t="𝕢",b8t="ℚ",w8t="⁗",M8t="𝒬",S8t="𝓆",C8t="ℍ",_8t="⨖",N8t="?",j8t="≟",L8t='"',A8t='"',E8t="⇛",T8t="∽̱",I8t="Ŕ",R8t="ŕ",$8t="√",P8t="⦳",D8t="⟩",z8t="⟫",O8t="⦒",q8t="⦥",H8t="⟩",V8t="»",B8t="⥵",F8t="⇥",U8t="⤠",G8t="⤳",X8t="→",W8t="↠",K8t="⇒",Y8t="⤞",Z8t="↪",J8t="↬",Q8t="⥅",eMt="⥴",tMt="⤖",nMt="↣",rMt="↝",oMt="⤚",aMt="⤜",iMt="∶",sMt="ℚ",cMt="⤍",lMt="⤏",uMt="⤐",dMt="❳",hMt="}",fMt="]",pMt="⦌",mMt="⦎",yMt="⦐",gMt="Ř",xMt="ř",vMt="Ŗ",kMt="ŗ",bMt="⌉",wMt="}",MMt="Р",SMt="р",CMt="⤷",_Mt="⥩",NMt="”",jMt="”",LMt="↳",AMt="ℜ",EMt="ℛ",TMt="ℜ",IMt="ℝ",RMt="ℜ",$Mt="▭",PMt="®",DMt="®",zMt="∋",OMt="⇋",qMt="⥯",HMt="⥽",VMt="⌋",BMt="𝔯",FMt="ℜ",UMt="⥤",GMt="⇁",XMt="⇀",WMt="⥬",KMt="Ρ",YMt="ρ",ZMt="ϱ",JMt="⟩",QMt="⇥",e7t="→",t7t="→",n7t="⇒",r7t="⇄",o7t="↣",a7t="⌉",i7t="⟧",s7t="⥝",c7t="⥕",l7t="⇂",u7t="⌋",d7t="⇁",h7t="⇀",f7t="⇄",p7t="⇌",m7t="⇉",y7t="↝",g7t="↦",x7t="⊢",v7t="⥛",k7t="⋌",b7t="⧐",w7t="⊳",M7t="⊵",S7t="⥏",C7t="⥜",_7t="⥔",N7t="↾",j7t="⥓",L7t="⇀",A7t="˚",E7t="≓",T7t="⇄",I7t="⇌",R7t="",$7t="⎱",P7t="⎱",D7t="⫮",z7t="⟭",O7t="⇾",q7t="⟧",H7t="⦆",V7t="𝕣",B7t="ℝ",F7t="⨮",U7t="⨵",G7t="⥰",X7t=")",W7t="⦔",K7t="⨒",Y7t="⇉",Z7t="⇛",J7t="›",Q7t="𝓇",eSt="ℛ",tSt="↱",nSt="↱",rSt="]",oSt="’",aSt="’",iSt="⋌",sSt="⋊",cSt="▹",lSt="⊵",uSt="▸",dSt="⧎",hSt="⧴",fSt="⥨",pSt="℞",mSt="Ś",ySt="ś",gSt="‚",xSt="⪸",vSt="Š",kSt="š",bSt="⪼",wSt="≻",MSt="≽",SSt="⪰",CSt="⪴",_St="Ş",NSt="ş",jSt="Ŝ",LSt="ŝ",ASt="⪺",ESt="⪶",TSt="⋩",ISt="⨓",RSt="≿",$St="С",PSt="с",DSt="⊡",zSt="⋅",OSt="⩦",qSt="⤥",HSt="↘",VSt="⇘",BSt="↘",FSt="§",USt=";",GSt="⤩",XSt="∖",WSt="∖",KSt="✶",YSt="𝔖",ZSt="𝔰",JSt="⌢",QSt="♯",eCt="Щ",tCt="щ",nCt="Ш",rCt="ш",oCt="↓",aCt="←",iCt="∣",sCt="∥",cCt="→",lCt="↑",uCt="",dCt="Σ",hCt="σ",fCt="ς",pCt="ς",mCt="∼",yCt="⩪",gCt="≃",xCt="≃",vCt="⪞",kCt="⪠",bCt="⪝",wCt="⪟",MCt="≆",SCt="⨤",CCt="⥲",_Ct="←",NCt="∘",jCt="∖",LCt="⨳",ACt="⧤",ECt="∣",TCt="⌣",ICt="⪪",RCt="⪬",$Ct="⪬︀",PCt="Ь",DCt="ь",zCt="⌿",OCt="⧄",qCt="/",HCt="𝕊",VCt="𝕤",BCt="♠",FCt="♠",UCt="∥",GCt="⊓",XCt="⊓︀",WCt="⊔",KCt="⊔︀",YCt="√",ZCt="⊏",JCt="⊑",QCt="⊏",e_t="⊑",t_t="⊐",n_t="⊒",r_t="⊐",o_t="⊒",a_t="□",i_t="□",s_t="⊓",c_t="⊏",l_t="⊑",u_t="⊐",d_t="⊒",h_t="⊔",f_t="▪",p_t="□",m_t="▪",y_t="→",g_t="𝒮",x_t="𝓈",v_t="∖",k_t="⌣",b_t="⋆",w_t="⋆",M_t="☆",S_t="★",C_t="ϵ",__t="ϕ",N_t="¯",j_t="⊂",L_t="⋐",A_t="⪽",E_t="⫅",T_t="⊆",I_t="⫃",R_t="⫁",$_t="⫋",P_t="⊊",D_t="⪿",z_t="⥹",O_t="⊂",q_t="⋐",H_t="⊆",V_t="⫅",B_t="⊆",F_t="⊊",U_t="⫋",G_t="⫇",X_t="⫕",W_t="⫓",K_t="⪸",Y_t="≻",Z_t="≽",J_t="≻",Q_t="⪰",e9t="≽",t9t="≿",n9t="⪰",r9t="⪺",o9t="⪶",a9t="⋩",i9t="≿",s9t="∋",c9t="∑",l9t="∑",u9t="♪",d9t="¹",h9t="²",f9t="³",p9t="⊃",m9t="⋑",y9t="⪾",g9t="⫘",x9t="⫆",v9t="⊇",k9t="⫄",b9t="⊃",w9t="⊇",M9t="⟉",S9t="⫗",C9t="⥻",_9t="⫂",N9t="⫌",j9t="⊋",L9t="⫀",A9t="⊃",E9t="⋑",T9t="⊇",I9t="⫆",R9t="⊋",$9t="⫌",P9t="⫈",D9t="⫔",z9t="⫖",O9t="⤦",q9t="↙",H9t="⇙",V9t="↙",B9t="⤪",F9t="ß",U9t=" ",G9t="⌖",X9t="Τ",W9t="τ",K9t="⎴",Y9t="Ť",Z9t="ť",J9t="Ţ",Q9t="ţ",eNt="Т",tNt="т",nNt="⃛",rNt="⌕",oNt="𝔗",aNt="𝔱",iNt="∴",sNt="∴",cNt="∴",lNt="Θ",uNt="θ",dNt="ϑ",hNt="ϑ",fNt="≈",pNt="∼",mNt=" ",yNt=" ",gNt=" ",xNt="≈",vNt="∼",kNt="Þ",bNt="þ",wNt="˜",MNt="∼",SNt="≃",CNt="≅",_Nt="≈",NNt="⨱",jNt="⊠",LNt="×",ANt="⨰",ENt="∭",TNt="⤨",INt="⌶",RNt="⫱",$Nt="⊤",PNt="𝕋",DNt="𝕥",zNt="⫚",ONt="⤩",qNt="‴",HNt="™",VNt="™",BNt="▵",FNt="▿",UNt="◃",GNt="⊴",XNt="≜",WNt="▹",KNt="⊵",YNt="◬",ZNt="≜",JNt="⨺",QNt="⃛",ejt="⨹",tjt="⧍",njt="⨻",rjt="⏢",ojt="𝒯",ajt="𝓉",ijt="Ц",sjt="ц",cjt="Ћ",ljt="ћ",ujt="Ŧ",djt="ŧ",hjt="≬",fjt="↞",pjt="↠",mjt="Ú",yjt="ú",gjt="↑",xjt="↟",vjt="⇑",kjt="⥉",bjt="Ў",wjt="ў",Mjt="Ŭ",Sjt="ŭ",Cjt="Û",_jt="û",Njt="У",jjt="у",Ljt="⇅",Ajt="Ű",Ejt="ű",Tjt="⥮",Ijt="⥾",Rjt="𝔘",$jt="𝔲",Pjt="Ù",Djt="ù",zjt="⥣",Ojt="↿",qjt="↾",Hjt="▀",Vjt="⌜",Bjt="⌜",Fjt="⌏",Ujt="◸",Gjt="Ū",Xjt="ū",Wjt="¨",Kjt="_",Yjt="⏟",Zjt="⎵",Jjt="⏝",Qjt="⋃",eLt="⊎",tLt="Ų",nLt="ų",rLt="𝕌",oLt="𝕦",aLt="⤒",iLt="↑",sLt="↑",cLt="⇑",lLt="⇅",uLt="↕",dLt="↕",hLt="⇕",fLt="⥮",pLt="↿",mLt="↾",yLt="⊎",gLt="↖",xLt="↗",vLt="υ",kLt="ϒ",bLt="ϒ",wLt="Υ",MLt="υ",SLt="↥",CLt="⊥",_Lt="⇈",NLt="⌝",jLt="⌝",LLt="⌎",ALt="Ů",ELt="ů",TLt="◹",ILt="𝒰",RLt="𝓊",$Lt="⋰",PLt="Ũ",DLt="ũ",zLt="▵",OLt="▴",qLt="⇈",HLt="Ü",VLt="ü",BLt="⦧",FLt="⦜",ULt="ϵ",GLt="ϰ",XLt="∅",WLt="ϕ",KLt="ϖ",YLt="∝",ZLt="↕",JLt="⇕",QLt="ϱ",eAt="ς",tAt="⊊︀",nAt="⫋︀",rAt="⊋︀",oAt="⫌︀",aAt="ϑ",iAt="⊲",sAt="⊳",cAt="⫨",lAt="⫫",uAt="⫩",dAt="В",hAt="в",fAt="⊢",pAt="⊨",mAt="⊩",yAt="⊫",gAt="⫦",xAt="⊻",vAt="∨",kAt="⋁",bAt="≚",wAt="⋮",MAt="|",SAt="‖",CAt="|",_At="‖",NAt="∣",jAt="|",LAt="❘",AAt="≀",EAt=" ",TAt="𝔙",IAt="𝔳",RAt="⊲",$At="⊂⃒",PAt="⊃⃒",DAt="𝕍",zAt="𝕧",OAt="∝",qAt="⊳",HAt="𝒱",VAt="𝓋",BAt="⫋︀",FAt="⊊︀",UAt="⫌︀",GAt="⊋︀",XAt="⊪",WAt="⦚",KAt="Ŵ",YAt="ŵ",ZAt="⩟",JAt="∧",QAt="⋀",eEt="≙",tEt="℘",nEt="𝔚",rEt="𝔴",oEt="𝕎",aEt="𝕨",iEt="℘",sEt="≀",cEt="≀",lEt="𝒲",uEt="𝓌",dEt="⋂",hEt="◯",fEt="⋃",pEt="▽",mEt="𝔛",yEt="𝔵",gEt="⟷",xEt="⟺",vEt="Ξ",kEt="ξ",bEt="⟵",wEt="⟸",MEt="⟼",SEt="⋻",CEt="⨀",_Et="𝕏",NEt="𝕩",jEt="⨁",LEt="⨂",AEt="⟶",EEt="⟹",TEt="𝒳",IEt="𝓍",REt="⨆",$Et="⨄",PEt="△",DEt="⋁",zEt="⋀",OEt="Ý",qEt="ý",HEt="Я",VEt="я",BEt="Ŷ",FEt="ŷ",UEt="Ы",GEt="ы",XEt="¥",WEt="𝔜",KEt="𝔶",YEt="Ї",ZEt="ї",JEt="𝕐",QEt="𝕪",eTt="𝒴",tTt="𝓎",nTt="Ю",rTt="ю",oTt="ÿ",aTt="Ÿ",iTt="Ź",sTt="ź",cTt="Ž",lTt="ž",uTt="З",dTt="з",hTt="Ż",fTt="ż",pTt="ℨ",mTt="",yTt="Ζ",gTt="ζ",xTt="𝔷",vTt="ℨ",kTt="Ж",bTt="ж",wTt="⇝",MTt="𝕫",STt="ℤ",CTt="𝒵",_Tt="𝓏",NTt="",jTt="",Qde={Aacute:hrt,aacute:frt,Abreve:prt,abreve:mrt,ac:yrt,acd:grt,acE:xrt,Acirc:vrt,acirc:krt,acute:brt,Acy:wrt,acy:Mrt,AElig:Srt,aelig:Crt,af:_rt,Afr:Nrt,afr:jrt,Agrave:Lrt,agrave:Art,alefsym:Ert,aleph:Trt,Alpha:Irt,alpha:Rrt,Amacr:$rt,amacr:Prt,amalg:Drt,amp:zrt,AMP:Ort,andand:qrt,And:Hrt,and:Vrt,andd:Brt,andslope:Frt,andv:Urt,ang:Grt,ange:Xrt,angle:Wrt,angmsdaa:Krt,angmsdab:Yrt,angmsdac:Zrt,angmsdad:Jrt,angmsdae:Qrt,angmsdaf:eot,angmsdag:tot,angmsdah:not,angmsd:rot,angrt:oot,angrtvb:aot,angrtvbd:iot,angsph:sot,angst:cot,angzarr:lot,Aogon:uot,aogon:dot,Aopf:hot,aopf:fot,apacir:pot,ap:mot,apE:yot,ape:got,apid:xot,apos:vot,ApplyFunction:kot,approx:bot,approxeq:wot,Aring:Mot,aring:Sot,Ascr:Cot,ascr:_ot,Assign:Not,ast:jot,asymp:Lot,asympeq:Aot,Atilde:Eot,atilde:Tot,Auml:Iot,auml:Rot,awconint:$ot,awint:Pot,backcong:Dot,backepsilon:zot,backprime:Oot,backsim:qot,backsimeq:Hot,Backslash:Vot,Barv:Bot,barvee:Fot,barwed:Uot,Barwed:Got,barwedge:Xot,bbrk:Wot,bbrktbrk:Kot,bcong:Yot,Bcy:Zot,bcy:Jot,bdquo:Qot,becaus:eat,because:tat,Because:nat,bemptyv:rat,bepsi:oat,bernou:aat,Bernoullis:iat,Beta:sat,beta:cat,beth:lat,between:uat,Bfr:dat,bfr:hat,bigcap:fat,bigcirc:pat,bigcup:mat,bigodot:yat,bigoplus:gat,bigotimes:xat,bigsqcup:vat,bigstar:kat,bigtriangledown:bat,bigtriangleup:wat,biguplus:Mat,bigvee:Sat,bigwedge:Cat,bkarow:_at,blacklozenge:Nat,blacksquare:jat,blacktriangle:Lat,blacktriangledown:Aat,blacktriangleleft:Eat,blacktriangleright:Tat,blank:Iat,blk12:Rat,blk14:$at,blk34:Pat,block:Dat,bne:zat,bnequiv:Oat,bNot:qat,bnot:Hat,Bopf:Vat,bopf:Bat,bot:Fat,bottom:Uat,bowtie:Gat,boxbox:Xat,boxdl:Wat,boxdL:Kat,boxDl:Yat,boxDL:Zat,boxdr:Jat,boxdR:Qat,boxDr:eit,boxDR:tit,boxh:nit,boxH:rit,boxhd:oit,boxHd:ait,boxhD:iit,boxHD:sit,boxhu:cit,boxHu:lit,boxhU:uit,boxHU:dit,boxminus:hit,boxplus:fit,boxtimes:pit,boxul:mit,boxuL:yit,boxUl:git,boxUL:xit,boxur:vit,boxuR:kit,boxUr:bit,boxUR:wit,boxv:Mit,boxV:Sit,boxvh:Cit,boxvH:_it,boxVh:Nit,boxVH:jit,boxvl:Lit,boxvL:Ait,boxVl:Eit,boxVL:Tit,boxvr:Iit,boxvR:Rit,boxVr:$it,boxVR:Pit,bprime:Dit,breve:zit,Breve:Oit,brvbar:qit,bscr:Hit,Bscr:Vit,bsemi:Bit,bsim:Fit,bsime:Uit,bsolb:Git,bsol:Xit,bsolhsub:Wit,bull:Kit,bullet:Yit,bump:Zit,bumpE:Jit,bumpe:Qit,Bumpeq:est,bumpeq:tst,Cacute:nst,cacute:rst,capand:ost,capbrcup:ast,capcap:ist,cap:sst,Cap:cst,capcup:lst,capdot:ust,CapitalDifferentialD:dst,caps:hst,caret:fst,caron:pst,Cayleys:mst,ccaps:yst,Ccaron:gst,ccaron:xst,Ccedil:vst,ccedil:kst,Ccirc:bst,ccirc:wst,Cconint:Mst,ccups:Sst,ccupssm:Cst,Cdot:_st,cdot:Nst,cedil:jst,Cedilla:Lst,cemptyv:Ast,cent:Est,centerdot:Tst,CenterDot:Ist,cfr:Rst,Cfr:$st,CHcy:Pst,chcy:Dst,check:zst,checkmark:Ost,Chi:qst,chi:Hst,circ:Vst,circeq:Bst,circlearrowleft:Fst,circlearrowright:Ust,circledast:Gst,circledcirc:Xst,circleddash:Wst,CircleDot:Kst,circledR:Yst,circledS:Zst,CircleMinus:Jst,CirclePlus:Qst,CircleTimes:ect,cir:tct,cirE:nct,cire:rct,cirfnint:oct,cirmid:act,cirscir:ict,ClockwiseContourIntegral:sct,CloseCurlyDoubleQuote:cct,CloseCurlyQuote:lct,clubs:uct,clubsuit:dct,colon:hct,Colon:fct,Colone:pct,colone:mct,coloneq:yct,comma:gct,commat:xct,comp:vct,compfn:kct,complement:bct,complexes:wct,cong:Mct,congdot:Sct,Congruent:Cct,conint:_ct,Conint:Nct,ContourIntegral:jct,copf:Lct,Copf:Act,coprod:Ect,Coproduct:Tct,copy:Ict,COPY:Rct,copysr:$ct,CounterClockwiseContourIntegral:Pct,crarr:Dct,cross:zct,Cross:Oct,Cscr:qct,cscr:Hct,csub:Vct,csube:Bct,csup:Fct,csupe:Uct,ctdot:Gct,cudarrl:Xct,cudarrr:Wct,cuepr:Kct,cuesc:Yct,cularr:Zct,cularrp:Jct,cupbrcap:Qct,cupcap:elt,CupCap:tlt,cup:nlt,Cup:rlt,cupcup:olt,cupdot:alt,cupor:ilt,cups:slt,curarr:clt,curarrm:llt,curlyeqprec:ult,curlyeqsucc:dlt,curlyvee:hlt,curlywedge:flt,curren:plt,curvearrowleft:mlt,curvearrowright:ylt,cuvee:glt,cuwed:xlt,cwconint:vlt,cwint:klt,cylcty:blt,dagger:wlt,Dagger:Mlt,daleth:Slt,darr:Clt,Darr:_lt,dArr:Nlt,dash:jlt,Dashv:Llt,dashv:Alt,dbkarow:Elt,dblac:Tlt,Dcaron:Ilt,dcaron:Rlt,Dcy:$lt,dcy:Plt,ddagger:Dlt,ddarr:zlt,DD:Olt,dd:qlt,DDotrahd:Hlt,ddotseq:Vlt,deg:Blt,Del:Flt,Delta:Ult,delta:Glt,demptyv:Xlt,dfisht:Wlt,Dfr:Klt,dfr:Ylt,dHar:Zlt,dharl:Jlt,dharr:Qlt,DiacriticalAcute:eut,DiacriticalDot:tut,DiacriticalDoubleAcute:nut,DiacriticalGrave:rut,DiacriticalTilde:out,diam:aut,diamond:iut,Diamond:sut,diamondsuit:cut,diams:lut,die:uut,DifferentialD:dut,digamma:hut,disin:fut,div:put,divide:mut,divideontimes:yut,divonx:gut,DJcy:xut,djcy:vut,dlcorn:kut,dlcrop:but,dollar:wut,Dopf:Mut,dopf:Sut,Dot:Cut,dot:_ut,DotDot:Nut,doteq:jut,doteqdot:Lut,DotEqual:Aut,dotminus:Eut,dotplus:Tut,dotsquare:Iut,doublebarwedge:Rut,DoubleContourIntegral:$ut,DoubleDot:Put,DoubleDownArrow:Dut,DoubleLeftArrow:zut,DoubleLeftRightArrow:Out,DoubleLeftTee:qut,DoubleLongLeftArrow:Hut,DoubleLongLeftRightArrow:Vut,DoubleLongRightArrow:But,DoubleRightArrow:Fut,DoubleRightTee:Uut,DoubleUpArrow:Gut,DoubleUpDownArrow:Xut,DoubleVerticalBar:Wut,DownArrowBar:Kut,downarrow:Yut,DownArrow:Zut,Downarrow:Jut,DownArrowUpArrow:Qut,DownBreve:edt,downdownarrows:tdt,downharpoonleft:ndt,downharpoonright:rdt,DownLeftRightVector:odt,DownLeftTeeVector:adt,DownLeftVectorBar:idt,DownLeftVector:sdt,DownRightTeeVector:cdt,DownRightVectorBar:ldt,DownRightVector:udt,DownTeeArrow:ddt,DownTee:hdt,drbkarow:fdt,drcorn:pdt,drcrop:mdt,Dscr:ydt,dscr:gdt,DScy:xdt,dscy:vdt,dsol:kdt,Dstrok:bdt,dstrok:wdt,dtdot:Mdt,dtri:Sdt,dtrif:Cdt,duarr:_dt,duhar:Ndt,dwangle:jdt,DZcy:Ldt,dzcy:Adt,dzigrarr:Edt,Eacute:Tdt,eacute:Idt,easter:Rdt,Ecaron:$dt,ecaron:Pdt,Ecirc:Ddt,ecirc:zdt,ecir:Odt,ecolon:qdt,Ecy:Hdt,ecy:Vdt,eDDot:Bdt,Edot:Fdt,edot:Udt,eDot:Gdt,ee:Xdt,efDot:Wdt,Efr:Kdt,efr:Ydt,eg:Zdt,Egrave:Jdt,egrave:Qdt,egs:e1t,egsdot:t1t,el:n1t,Element:r1t,elinters:o1t,ell:a1t,els:i1t,elsdot:s1t,Emacr:c1t,emacr:l1t,empty:u1t,emptyset:d1t,EmptySmallSquare:h1t,emptyv:f1t,EmptyVerySmallSquare:p1t,emsp13:m1t,emsp14:y1t,emsp:g1t,ENG:x1t,eng:v1t,ensp:k1t,Eogon:b1t,eogon:w1t,Eopf:M1t,eopf:S1t,epar:C1t,eparsl:_1t,eplus:N1t,epsi:j1t,Epsilon:L1t,epsilon:A1t,epsiv:E1t,eqcirc:T1t,eqcolon:I1t,eqsim:R1t,eqslantgtr:$1t,eqslantless:P1t,Equal:D1t,equals:z1t,EqualTilde:O1t,equest:q1t,Equilibrium:H1t,equiv:V1t,equivDD:B1t,eqvparsl:F1t,erarr:U1t,erDot:G1t,escr:X1t,Escr:W1t,esdot:K1t,Esim:Y1t,esim:Z1t,Eta:J1t,eta:Q1t,ETH:eht,eth:tht,Euml:nht,euml:rht,euro:oht,excl:aht,exist:iht,Exists:sht,expectation:cht,exponentiale:lht,ExponentialE:uht,fallingdotseq:dht,Fcy:hht,fcy:fht,female:pht,ffilig:mht,fflig:yht,ffllig:ght,Ffr:xht,ffr:vht,filig:kht,FilledSmallSquare:bht,FilledVerySmallSquare:wht,fjlig:Mht,flat:Sht,fllig:Cht,fltns:_ht,fnof:Nht,Fopf:jht,fopf:Lht,forall:Aht,ForAll:Eht,fork:Tht,forkv:Iht,Fouriertrf:Rht,fpartint:$ht,frac12:Pht,frac13:Dht,frac14:zht,frac15:Oht,frac16:qht,frac18:Hht,frac23:Vht,frac25:Bht,frac34:Fht,frac35:Uht,frac38:Ght,frac45:Xht,frac56:Wht,frac58:Kht,frac78:Yht,frasl:Zht,frown:Jht,fscr:Qht,Fscr:eft,gacute:tft,Gamma:nft,gamma:rft,Gammad:oft,gammad:aft,gap:ift,Gbreve:sft,gbreve:cft,Gcedil:lft,Gcirc:uft,gcirc:dft,Gcy:hft,gcy:fft,Gdot:pft,gdot:mft,ge:yft,gE:gft,gEl:xft,gel:vft,geq:kft,geqq:bft,geqslant:wft,gescc:Mft,ges:Sft,gesdot:Cft,gesdoto:_ft,gesdotol:Nft,gesl:jft,gesles:Lft,Gfr:Aft,gfr:Eft,gg:Tft,Gg:Ift,ggg:Rft,gimel:$ft,GJcy:Pft,gjcy:Dft,gla:zft,gl:Oft,glE:qft,glj:Hft,gnap:Vft,gnapprox:Bft,gne:Fft,gnE:Uft,gneq:Gft,gneqq:Xft,gnsim:Wft,Gopf:Kft,gopf:Yft,grave:Zft,GreaterEqual:Jft,GreaterEqualLess:Qft,GreaterFullEqual:ept,GreaterGreater:tpt,GreaterLess:npt,GreaterSlantEqual:rpt,GreaterTilde:opt,Gscr:apt,gscr:ipt,gsim:spt,gsime:cpt,gsiml:lpt,gtcc:upt,gtcir:dpt,gt:hpt,GT:fpt,Gt:ppt,gtdot:mpt,gtlPar:ypt,gtquest:gpt,gtrapprox:xpt,gtrarr:vpt,gtrdot:kpt,gtreqless:bpt,gtreqqless:wpt,gtrless:Mpt,gtrsim:Spt,gvertneqq:Cpt,gvnE:_pt,Hacek:Npt,hairsp:jpt,half:Lpt,hamilt:Apt,HARDcy:Ept,hardcy:Tpt,harrcir:Ipt,harr:Rpt,hArr:$pt,harrw:Ppt,Hat:Dpt,hbar:zpt,Hcirc:Opt,hcirc:qpt,hearts:Hpt,heartsuit:Vpt,hellip:Bpt,hercon:Fpt,hfr:Upt,Hfr:Gpt,HilbertSpace:Xpt,hksearow:Wpt,hkswarow:Kpt,hoarr:Ypt,homtht:Zpt,hookleftarrow:Jpt,hookrightarrow:Qpt,hopf:e0t,Hopf:t0t,horbar:n0t,HorizontalLine:r0t,hscr:o0t,Hscr:a0t,hslash:i0t,Hstrok:s0t,hstrok:c0t,HumpDownHump:l0t,HumpEqual:u0t,hybull:d0t,hyphen:h0t,Iacute:f0t,iacute:p0t,ic:m0t,Icirc:y0t,icirc:g0t,Icy:x0t,icy:v0t,Idot:k0t,IEcy:b0t,iecy:w0t,iexcl:M0t,iff:S0t,ifr:C0t,Ifr:_0t,Igrave:N0t,igrave:j0t,ii:L0t,iiiint:A0t,iiint:E0t,iinfin:T0t,iiota:I0t,IJlig:R0t,ijlig:$0t,Imacr:P0t,imacr:D0t,image:z0t,ImaginaryI:O0t,imagline:q0t,imagpart:H0t,imath:V0t,Im:B0t,imof:F0t,imped:U0t,Implies:G0t,incare:X0t,in:"∈",infin:W0t,infintie:K0t,inodot:Y0t,intcal:Z0t,int:J0t,Int:Q0t,integers:e2t,Integral:t2t,intercal:n2t,Intersection:r2t,intlarhk:o2t,intprod:a2t,InvisibleComma:i2t,InvisibleTimes:s2t,IOcy:c2t,iocy:l2t,Iogon:u2t,iogon:d2t,Iopf:h2t,iopf:f2t,Iota:p2t,iota:m2t,iprod:y2t,iquest:g2t,iscr:x2t,Iscr:v2t,isin:k2t,isindot:b2t,isinE:w2t,isins:M2t,isinsv:S2t,isinv:C2t,it:_2t,Itilde:N2t,itilde:j2t,Iukcy:L2t,iukcy:A2t,Iuml:E2t,iuml:T2t,Jcirc:I2t,jcirc:R2t,Jcy:$2t,jcy:P2t,Jfr:D2t,jfr:z2t,jmath:O2t,Jopf:q2t,jopf:H2t,Jscr:V2t,jscr:B2t,Jsercy:F2t,jsercy:U2t,Jukcy:G2t,jukcy:X2t,Kappa:W2t,kappa:K2t,kappav:Y2t,Kcedil:Z2t,kcedil:J2t,Kcy:Q2t,kcy:emt,Kfr:tmt,kfr:nmt,kgreen:rmt,KHcy:omt,khcy:amt,KJcy:imt,kjcy:smt,Kopf:cmt,kopf:lmt,Kscr:umt,kscr:dmt,lAarr:hmt,Lacute:fmt,lacute:pmt,laemptyv:mmt,lagran:ymt,Lambda:gmt,lambda:xmt,lang:vmt,Lang:kmt,langd:bmt,langle:wmt,lap:Mmt,Laplacetrf:Smt,laquo:Cmt,larrb:_mt,larrbfs:Nmt,larr:jmt,Larr:Lmt,lArr:Amt,larrfs:Emt,larrhk:Tmt,larrlp:Imt,larrpl:Rmt,larrsim:$mt,larrtl:Pmt,latail:Dmt,lAtail:zmt,lat:Omt,late:qmt,lates:Hmt,lbarr:Vmt,lBarr:Bmt,lbbrk:Fmt,lbrace:Umt,lbrack:Gmt,lbrke:Xmt,lbrksld:Wmt,lbrkslu:Kmt,Lcaron:Ymt,lcaron:Zmt,Lcedil:Jmt,lcedil:Qmt,lceil:eyt,lcub:tyt,Lcy:nyt,lcy:ryt,ldca:oyt,ldquo:ayt,ldquor:iyt,ldrdhar:syt,ldrushar:cyt,ldsh:lyt,le:uyt,lE:dyt,LeftAngleBracket:hyt,LeftArrowBar:fyt,leftarrow:pyt,LeftArrow:myt,Leftarrow:yyt,LeftArrowRightArrow:gyt,leftarrowtail:xyt,LeftCeiling:vyt,LeftDoubleBracket:kyt,LeftDownTeeVector:byt,LeftDownVectorBar:wyt,LeftDownVector:Myt,LeftFloor:Syt,leftharpoondown:Cyt,leftharpoonup:_yt,leftleftarrows:Nyt,leftrightarrow:jyt,LeftRightArrow:Lyt,Leftrightarrow:Ayt,leftrightarrows:Eyt,leftrightharpoons:Tyt,leftrightsquigarrow:Iyt,LeftRightVector:Ryt,LeftTeeArrow:$yt,LeftTee:Pyt,LeftTeeVector:Dyt,leftthreetimes:zyt,LeftTriangleBar:Oyt,LeftTriangle:qyt,LeftTriangleEqual:Hyt,LeftUpDownVector:Vyt,LeftUpTeeVector:Byt,LeftUpVectorBar:Fyt,LeftUpVector:Uyt,LeftVectorBar:Gyt,LeftVector:Xyt,lEg:Wyt,leg:Kyt,leq:Yyt,leqq:Zyt,leqslant:Jyt,lescc:Qyt,les:egt,lesdot:tgt,lesdoto:ngt,lesdotor:rgt,lesg:ogt,lesges:agt,lessapprox:igt,lessdot:sgt,lesseqgtr:cgt,lesseqqgtr:lgt,LessEqualGreater:ugt,LessFullEqual:dgt,LessGreater:hgt,lessgtr:fgt,LessLess:pgt,lesssim:mgt,LessSlantEqual:ygt,LessTilde:ggt,lfisht:xgt,lfloor:vgt,Lfr:kgt,lfr:bgt,lg:wgt,lgE:Mgt,lHar:Sgt,lhard:Cgt,lharu:_gt,lharul:Ngt,lhblk:jgt,LJcy:Lgt,ljcy:Agt,llarr:Egt,ll:Tgt,Ll:Igt,llcorner:Rgt,Lleftarrow:$gt,llhard:Pgt,lltri:Dgt,Lmidot:zgt,lmidot:Ogt,lmoustache:qgt,lmoust:Hgt,lnap:Vgt,lnapprox:Bgt,lne:Fgt,lnE:Ugt,lneq:Ggt,lneqq:Xgt,lnsim:Wgt,loang:Kgt,loarr:Ygt,lobrk:Zgt,longleftarrow:Jgt,LongLeftArrow:Qgt,Longleftarrow:ext,longleftrightarrow:txt,LongLeftRightArrow:nxt,Longleftrightarrow:rxt,longmapsto:oxt,longrightarrow:axt,LongRightArrow:ixt,Longrightarrow:sxt,looparrowleft:cxt,looparrowright:lxt,lopar:uxt,Lopf:dxt,lopf:hxt,loplus:fxt,lotimes:pxt,lowast:mxt,lowbar:yxt,LowerLeftArrow:gxt,LowerRightArrow:xxt,loz:vxt,lozenge:kxt,lozf:bxt,lpar:wxt,lparlt:Mxt,lrarr:Sxt,lrcorner:Cxt,lrhar:_xt,lrhard:Nxt,lrm:jxt,lrtri:Lxt,lsaquo:Axt,lscr:Ext,Lscr:Txt,lsh:Ixt,Lsh:Rxt,lsim:$xt,lsime:Pxt,lsimg:Dxt,lsqb:zxt,lsquo:Oxt,lsquor:qxt,Lstrok:Hxt,lstrok:Vxt,ltcc:Bxt,ltcir:Fxt,lt:Uxt,LT:Gxt,Lt:Xxt,ltdot:Wxt,lthree:Kxt,ltimes:Yxt,ltlarr:Zxt,ltquest:Jxt,ltri:Qxt,ltrie:evt,ltrif:tvt,ltrPar:nvt,lurdshar:rvt,luruhar:ovt,lvertneqq:avt,lvnE:ivt,macr:svt,male:cvt,malt:lvt,maltese:uvt,Map:"⤅",map:dvt,mapsto:hvt,mapstodown:fvt,mapstoleft:pvt,mapstoup:mvt,marker:yvt,mcomma:gvt,Mcy:xvt,mcy:vvt,mdash:kvt,mDDot:bvt,measuredangle:wvt,MediumSpace:Mvt,Mellintrf:Svt,Mfr:Cvt,mfr:_vt,mho:Nvt,micro:jvt,midast:Lvt,midcir:Avt,mid:Evt,middot:Tvt,minusb:Ivt,minus:Rvt,minusd:$vt,minusdu:Pvt,MinusPlus:Dvt,mlcp:zvt,mldr:Ovt,mnplus:qvt,models:Hvt,Mopf:Vvt,mopf:Bvt,mp:Fvt,mscr:Uvt,Mscr:Gvt,mstpos:Xvt,Mu:Wvt,mu:Kvt,multimap:Yvt,mumap:Zvt,nabla:Jvt,Nacute:Qvt,nacute:ekt,nang:tkt,nap:nkt,napE:rkt,napid:okt,napos:akt,napprox:ikt,natural:skt,naturals:ckt,natur:lkt,nbsp:ukt,nbump:dkt,nbumpe:hkt,ncap:fkt,Ncaron:pkt,ncaron:mkt,Ncedil:ykt,ncedil:gkt,ncong:xkt,ncongdot:vkt,ncup:kkt,Ncy:bkt,ncy:wkt,ndash:Mkt,nearhk:Skt,nearr:Ckt,neArr:_kt,nearrow:Nkt,ne:jkt,nedot:Lkt,NegativeMediumSpace:Akt,NegativeThickSpace:Ekt,NegativeThinSpace:Tkt,NegativeVeryThinSpace:Ikt,nequiv:Rkt,nesear:$kt,nesim:Pkt,NestedGreaterGreater:Dkt,NestedLessLess:zkt,NewLine:Okt,nexist:qkt,nexists:Hkt,Nfr:Vkt,nfr:Bkt,ngE:Fkt,nge:Ukt,ngeq:Gkt,ngeqq:Xkt,ngeqslant:Wkt,nges:Kkt,nGg:Ykt,ngsim:Zkt,nGt:Jkt,ngt:Qkt,ngtr:e4t,nGtv:t4t,nharr:n4t,nhArr:r4t,nhpar:o4t,ni:a4t,nis:i4t,nisd:s4t,niv:c4t,NJcy:l4t,njcy:u4t,nlarr:d4t,nlArr:h4t,nldr:f4t,nlE:p4t,nle:m4t,nleftarrow:y4t,nLeftarrow:g4t,nleftrightarrow:x4t,nLeftrightarrow:v4t,nleq:k4t,nleqq:b4t,nleqslant:w4t,nles:M4t,nless:S4t,nLl:C4t,nlsim:_4t,nLt:N4t,nlt:j4t,nltri:L4t,nltrie:A4t,nLtv:E4t,nmid:T4t,NoBreak:I4t,NonBreakingSpace:R4t,nopf:$4t,Nopf:P4t,Not:D4t,not:z4t,NotCongruent:O4t,NotCupCap:q4t,NotDoubleVerticalBar:H4t,NotElement:V4t,NotEqual:B4t,NotEqualTilde:F4t,NotExists:U4t,NotGreater:G4t,NotGreaterEqual:X4t,NotGreaterFullEqual:W4t,NotGreaterGreater:K4t,NotGreaterLess:Y4t,NotGreaterSlantEqual:Z4t,NotGreaterTilde:J4t,NotHumpDownHump:Q4t,NotHumpEqual:e5t,notin:t5t,notindot:n5t,notinE:r5t,notinva:o5t,notinvb:a5t,notinvc:i5t,NotLeftTriangleBar:s5t,NotLeftTriangle:c5t,NotLeftTriangleEqual:l5t,NotLess:u5t,NotLessEqual:d5t,NotLessGreater:h5t,NotLessLess:f5t,NotLessSlantEqual:p5t,NotLessTilde:m5t,NotNestedGreaterGreater:y5t,NotNestedLessLess:g5t,notni:x5t,notniva:v5t,notnivb:k5t,notnivc:b5t,NotPrecedes:w5t,NotPrecedesEqual:M5t,NotPrecedesSlantEqual:S5t,NotReverseElement:C5t,NotRightTriangleBar:_5t,NotRightTriangle:N5t,NotRightTriangleEqual:j5t,NotSquareSubset:L5t,NotSquareSubsetEqual:A5t,NotSquareSuperset:E5t,NotSquareSupersetEqual:T5t,NotSubset:I5t,NotSubsetEqual:R5t,NotSucceeds:$5t,NotSucceedsEqual:P5t,NotSucceedsSlantEqual:D5t,NotSucceedsTilde:z5t,NotSuperset:O5t,NotSupersetEqual:q5t,NotTilde:H5t,NotTildeEqual:V5t,NotTildeFullEqual:B5t,NotTildeTilde:F5t,NotVerticalBar:U5t,nparallel:G5t,npar:X5t,nparsl:W5t,npart:K5t,npolint:Y5t,npr:Z5t,nprcue:J5t,nprec:Q5t,npreceq:ebt,npre:tbt,nrarrc:nbt,nrarr:rbt,nrArr:obt,nrarrw:abt,nrightarrow:ibt,nRightarrow:sbt,nrtri:cbt,nrtrie:lbt,nsc:ubt,nsccue:dbt,nsce:hbt,Nscr:fbt,nscr:pbt,nshortmid:mbt,nshortparallel:ybt,nsim:gbt,nsime:xbt,nsimeq:vbt,nsmid:kbt,nspar:bbt,nsqsube:wbt,nsqsupe:Mbt,nsub:Sbt,nsubE:Cbt,nsube:_bt,nsubset:Nbt,nsubseteq:jbt,nsubseteqq:Lbt,nsucc:Abt,nsucceq:Ebt,nsup:Tbt,nsupE:Ibt,nsupe:Rbt,nsupset:$bt,nsupseteq:Pbt,nsupseteqq:Dbt,ntgl:zbt,Ntilde:Obt,ntilde:qbt,ntlg:Hbt,ntriangleleft:Vbt,ntrianglelefteq:Bbt,ntriangleright:Fbt,ntrianglerighteq:Ubt,Nu:Gbt,nu:Xbt,num:Wbt,numero:Kbt,numsp:Ybt,nvap:Zbt,nvdash:Jbt,nvDash:Qbt,nVdash:e3t,nVDash:t3t,nvge:n3t,nvgt:r3t,nvHarr:o3t,nvinfin:a3t,nvlArr:i3t,nvle:s3t,nvlt:c3t,nvltrie:l3t,nvrArr:u3t,nvrtrie:d3t,nvsim:h3t,nwarhk:f3t,nwarr:p3t,nwArr:m3t,nwarrow:y3t,nwnear:g3t,Oacute:x3t,oacute:v3t,oast:k3t,Ocirc:b3t,ocirc:w3t,ocir:M3t,Ocy:S3t,ocy:C3t,odash:_3t,Odblac:N3t,odblac:j3t,odiv:L3t,odot:A3t,odsold:E3t,OElig:T3t,oelig:I3t,ofcir:R3t,Ofr:$3t,ofr:P3t,ogon:D3t,Ograve:z3t,ograve:O3t,ogt:q3t,ohbar:H3t,ohm:V3t,oint:B3t,olarr:F3t,olcir:U3t,olcross:G3t,oline:X3t,olt:W3t,Omacr:K3t,omacr:Y3t,Omega:Z3t,omega:J3t,Omicron:Q3t,omicron:ewt,omid:twt,ominus:nwt,Oopf:rwt,oopf:owt,opar:awt,OpenCurlyDoubleQuote:iwt,OpenCurlyQuote:swt,operp:cwt,oplus:lwt,orarr:uwt,Or:dwt,or:hwt,ord:fwt,order:pwt,orderof:mwt,ordf:ywt,ordm:gwt,origof:xwt,oror:vwt,orslope:kwt,orv:bwt,oS:wwt,Oscr:Mwt,oscr:Swt,Oslash:Cwt,oslash:_wt,osol:Nwt,Otilde:jwt,otilde:Lwt,otimesas:Awt,Otimes:Ewt,otimes:Twt,Ouml:Iwt,ouml:Rwt,ovbar:$wt,OverBar:Pwt,OverBrace:Dwt,OverBracket:zwt,OverParenthesis:Owt,para:qwt,parallel:Hwt,par:Vwt,parsim:Bwt,parsl:Fwt,part:Uwt,PartialD:Gwt,Pcy:Xwt,pcy:Wwt,percnt:Kwt,period:Ywt,permil:Zwt,perp:Jwt,pertenk:Qwt,Pfr:e6t,pfr:t6t,Phi:n6t,phi:r6t,phiv:o6t,phmmat:a6t,phone:i6t,Pi:s6t,pi:c6t,pitchfork:l6t,piv:u6t,planck:d6t,planckh:h6t,plankv:f6t,plusacir:p6t,plusb:m6t,pluscir:y6t,plus:g6t,plusdo:x6t,plusdu:v6t,pluse:k6t,PlusMinus:b6t,plusmn:w6t,plussim:M6t,plustwo:S6t,pm:C6t,Poincareplane:_6t,pointint:N6t,popf:j6t,Popf:L6t,pound:A6t,prap:E6t,Pr:T6t,pr:I6t,prcue:R6t,precapprox:$6t,prec:P6t,preccurlyeq:D6t,Precedes:z6t,PrecedesEqual:O6t,PrecedesSlantEqual:q6t,PrecedesTilde:H6t,preceq:V6t,precnapprox:B6t,precneqq:F6t,precnsim:U6t,pre:G6t,prE:X6t,precsim:W6t,prime:K6t,Prime:Y6t,primes:Z6t,prnap:J6t,prnE:Q6t,prnsim:e8t,prod:t8t,Product:n8t,profalar:r8t,profline:o8t,profsurf:a8t,prop:i8t,Proportional:s8t,Proportion:c8t,propto:l8t,prsim:u8t,prurel:d8t,Pscr:h8t,pscr:f8t,Psi:p8t,psi:m8t,puncsp:y8t,Qfr:g8t,qfr:x8t,qint:v8t,qopf:k8t,Qopf:b8t,qprime:w8t,Qscr:M8t,qscr:S8t,quaternions:C8t,quatint:_8t,quest:N8t,questeq:j8t,quot:L8t,QUOT:A8t,rAarr:E8t,race:T8t,Racute:I8t,racute:R8t,radic:$8t,raemptyv:P8t,rang:D8t,Rang:z8t,rangd:O8t,range:q8t,rangle:H8t,raquo:V8t,rarrap:B8t,rarrb:F8t,rarrbfs:U8t,rarrc:G8t,rarr:X8t,Rarr:W8t,rArr:K8t,rarrfs:Y8t,rarrhk:Z8t,rarrlp:J8t,rarrpl:Q8t,rarrsim:eMt,Rarrtl:tMt,rarrtl:nMt,rarrw:rMt,ratail:oMt,rAtail:aMt,ratio:iMt,rationals:sMt,rbarr:cMt,rBarr:lMt,RBarr:uMt,rbbrk:dMt,rbrace:hMt,rbrack:fMt,rbrke:pMt,rbrksld:mMt,rbrkslu:yMt,Rcaron:gMt,rcaron:xMt,Rcedil:vMt,rcedil:kMt,rceil:bMt,rcub:wMt,Rcy:MMt,rcy:SMt,rdca:CMt,rdldhar:_Mt,rdquo:NMt,rdquor:jMt,rdsh:LMt,real:AMt,realine:EMt,realpart:TMt,reals:IMt,Re:RMt,rect:$Mt,reg:PMt,REG:DMt,ReverseElement:zMt,ReverseEquilibrium:OMt,ReverseUpEquilibrium:qMt,rfisht:HMt,rfloor:VMt,rfr:BMt,Rfr:FMt,rHar:UMt,rhard:GMt,rharu:XMt,rharul:WMt,Rho:KMt,rho:YMt,rhov:ZMt,RightAngleBracket:JMt,RightArrowBar:QMt,rightarrow:e7t,RightArrow:t7t,Rightarrow:n7t,RightArrowLeftArrow:r7t,rightarrowtail:o7t,RightCeiling:a7t,RightDoubleBracket:i7t,RightDownTeeVector:s7t,RightDownVectorBar:c7t,RightDownVector:l7t,RightFloor:u7t,rightharpoondown:d7t,rightharpoonup:h7t,rightleftarrows:f7t,rightleftharpoons:p7t,rightrightarrows:m7t,rightsquigarrow:y7t,RightTeeArrow:g7t,RightTee:x7t,RightTeeVector:v7t,rightthreetimes:k7t,RightTriangleBar:b7t,RightTriangle:w7t,RightTriangleEqual:M7t,RightUpDownVector:S7t,RightUpTeeVector:C7t,RightUpVectorBar:_7t,RightUpVector:N7t,RightVectorBar:j7t,RightVector:L7t,ring:A7t,risingdotseq:E7t,rlarr:T7t,rlhar:I7t,rlm:R7t,rmoustache:$7t,rmoust:P7t,rnmid:D7t,roang:z7t,roarr:O7t,robrk:q7t,ropar:H7t,ropf:V7t,Ropf:B7t,roplus:F7t,rotimes:U7t,RoundImplies:G7t,rpar:X7t,rpargt:W7t,rppolint:K7t,rrarr:Y7t,Rrightarrow:Z7t,rsaquo:J7t,rscr:Q7t,Rscr:eSt,rsh:tSt,Rsh:nSt,rsqb:rSt,rsquo:oSt,rsquor:aSt,rthree:iSt,rtimes:sSt,rtri:cSt,rtrie:lSt,rtrif:uSt,rtriltri:dSt,RuleDelayed:hSt,ruluhar:fSt,rx:pSt,Sacute:mSt,sacute:ySt,sbquo:gSt,scap:xSt,Scaron:vSt,scaron:kSt,Sc:bSt,sc:wSt,sccue:MSt,sce:SSt,scE:CSt,Scedil:_St,scedil:NSt,Scirc:jSt,scirc:LSt,scnap:ASt,scnE:ESt,scnsim:TSt,scpolint:ISt,scsim:RSt,Scy:$St,scy:PSt,sdotb:DSt,sdot:zSt,sdote:OSt,searhk:qSt,searr:HSt,seArr:VSt,searrow:BSt,sect:FSt,semi:USt,seswar:GSt,setminus:XSt,setmn:WSt,sext:KSt,Sfr:YSt,sfr:ZSt,sfrown:JSt,sharp:QSt,SHCHcy:eCt,shchcy:tCt,SHcy:nCt,shcy:rCt,ShortDownArrow:oCt,ShortLeftArrow:aCt,shortmid:iCt,shortparallel:sCt,ShortRightArrow:cCt,ShortUpArrow:lCt,shy:uCt,Sigma:dCt,sigma:hCt,sigmaf:fCt,sigmav:pCt,sim:mCt,simdot:yCt,sime:gCt,simeq:xCt,simg:vCt,simgE:kCt,siml:bCt,simlE:wCt,simne:MCt,simplus:SCt,simrarr:CCt,slarr:_Ct,SmallCircle:NCt,smallsetminus:jCt,smashp:LCt,smeparsl:ACt,smid:ECt,smile:TCt,smt:ICt,smte:RCt,smtes:$Ct,SOFTcy:PCt,softcy:DCt,solbar:zCt,solb:OCt,sol:qCt,Sopf:HCt,sopf:VCt,spades:BCt,spadesuit:FCt,spar:UCt,sqcap:GCt,sqcaps:XCt,sqcup:WCt,sqcups:KCt,Sqrt:YCt,sqsub:ZCt,sqsube:JCt,sqsubset:QCt,sqsubseteq:e_t,sqsup:t_t,sqsupe:n_t,sqsupset:r_t,sqsupseteq:o_t,square:a_t,Square:i_t,SquareIntersection:s_t,SquareSubset:c_t,SquareSubsetEqual:l_t,SquareSuperset:u_t,SquareSupersetEqual:d_t,SquareUnion:h_t,squarf:f_t,squ:p_t,squf:m_t,srarr:y_t,Sscr:g_t,sscr:x_t,ssetmn:v_t,ssmile:k_t,sstarf:b_t,Star:w_t,star:M_t,starf:S_t,straightepsilon:C_t,straightphi:__t,strns:N_t,sub:j_t,Sub:L_t,subdot:A_t,subE:E_t,sube:T_t,subedot:I_t,submult:R_t,subnE:$_t,subne:P_t,subplus:D_t,subrarr:z_t,subset:O_t,Subset:q_t,subseteq:H_t,subseteqq:V_t,SubsetEqual:B_t,subsetneq:F_t,subsetneqq:U_t,subsim:G_t,subsub:X_t,subsup:W_t,succapprox:K_t,succ:Y_t,succcurlyeq:Z_t,Succeeds:J_t,SucceedsEqual:Q_t,SucceedsSlantEqual:e9t,SucceedsTilde:t9t,succeq:n9t,succnapprox:r9t,succneqq:o9t,succnsim:a9t,succsim:i9t,SuchThat:s9t,sum:c9t,Sum:l9t,sung:u9t,sup1:d9t,sup2:h9t,sup3:f9t,sup:p9t,Sup:m9t,supdot:y9t,supdsub:g9t,supE:x9t,supe:v9t,supedot:k9t,Superset:b9t,SupersetEqual:w9t,suphsol:M9t,suphsub:S9t,suplarr:C9t,supmult:_9t,supnE:N9t,supne:j9t,supplus:L9t,supset:A9t,Supset:E9t,supseteq:T9t,supseteqq:I9t,supsetneq:R9t,supsetneqq:$9t,supsim:P9t,supsub:D9t,supsup:z9t,swarhk:O9t,swarr:q9t,swArr:H9t,swarrow:V9t,swnwar:B9t,szlig:F9t,Tab:U9t,target:G9t,Tau:X9t,tau:W9t,tbrk:K9t,Tcaron:Y9t,tcaron:Z9t,Tcedil:J9t,tcedil:Q9t,Tcy:eNt,tcy:tNt,tdot:nNt,telrec:rNt,Tfr:oNt,tfr:aNt,there4:iNt,therefore:sNt,Therefore:cNt,Theta:lNt,theta:uNt,thetasym:dNt,thetav:hNt,thickapprox:fNt,thicksim:pNt,ThickSpace:mNt,ThinSpace:yNt,thinsp:gNt,thkap:xNt,thksim:vNt,THORN:kNt,thorn:bNt,tilde:wNt,Tilde:MNt,TildeEqual:SNt,TildeFullEqual:CNt,TildeTilde:_Nt,timesbar:NNt,timesb:jNt,times:LNt,timesd:ANt,tint:ENt,toea:TNt,topbot:INt,topcir:RNt,top:$Nt,Topf:PNt,topf:DNt,topfork:zNt,tosa:ONt,tprime:qNt,trade:HNt,TRADE:VNt,triangle:BNt,triangledown:FNt,triangleleft:UNt,trianglelefteq:GNt,triangleq:XNt,triangleright:WNt,trianglerighteq:KNt,tridot:YNt,trie:ZNt,triminus:JNt,TripleDot:QNt,triplus:ejt,trisb:tjt,tritime:njt,trpezium:rjt,Tscr:ojt,tscr:ajt,TScy:ijt,tscy:sjt,TSHcy:cjt,tshcy:ljt,Tstrok:ujt,tstrok:djt,twixt:hjt,twoheadleftarrow:fjt,twoheadrightarrow:pjt,Uacute:mjt,uacute:yjt,uarr:gjt,Uarr:xjt,uArr:vjt,Uarrocir:kjt,Ubrcy:bjt,ubrcy:wjt,Ubreve:Mjt,ubreve:Sjt,Ucirc:Cjt,ucirc:_jt,Ucy:Njt,ucy:jjt,udarr:Ljt,Udblac:Ajt,udblac:Ejt,udhar:Tjt,ufisht:Ijt,Ufr:Rjt,ufr:$jt,Ugrave:Pjt,ugrave:Djt,uHar:zjt,uharl:Ojt,uharr:qjt,uhblk:Hjt,ulcorn:Vjt,ulcorner:Bjt,ulcrop:Fjt,ultri:Ujt,Umacr:Gjt,umacr:Xjt,uml:Wjt,UnderBar:Kjt,UnderBrace:Yjt,UnderBracket:Zjt,UnderParenthesis:Jjt,Union:Qjt,UnionPlus:eLt,Uogon:tLt,uogon:nLt,Uopf:rLt,uopf:oLt,UpArrowBar:aLt,uparrow:iLt,UpArrow:sLt,Uparrow:cLt,UpArrowDownArrow:lLt,updownarrow:uLt,UpDownArrow:dLt,Updownarrow:hLt,UpEquilibrium:fLt,upharpoonleft:pLt,upharpoonright:mLt,uplus:yLt,UpperLeftArrow:gLt,UpperRightArrow:xLt,upsi:vLt,Upsi:kLt,upsih:bLt,Upsilon:wLt,upsilon:MLt,UpTeeArrow:SLt,UpTee:CLt,upuparrows:_Lt,urcorn:NLt,urcorner:jLt,urcrop:LLt,Uring:ALt,uring:ELt,urtri:TLt,Uscr:ILt,uscr:RLt,utdot:$Lt,Utilde:PLt,utilde:DLt,utri:zLt,utrif:OLt,uuarr:qLt,Uuml:HLt,uuml:VLt,uwangle:BLt,vangrt:FLt,varepsilon:ULt,varkappa:GLt,varnothing:XLt,varphi:WLt,varpi:KLt,varpropto:YLt,varr:ZLt,vArr:JLt,varrho:QLt,varsigma:eAt,varsubsetneq:tAt,varsubsetneqq:nAt,varsupsetneq:rAt,varsupsetneqq:oAt,vartheta:aAt,vartriangleleft:iAt,vartriangleright:sAt,vBar:cAt,Vbar:lAt,vBarv:uAt,Vcy:dAt,vcy:hAt,vdash:fAt,vDash:pAt,Vdash:mAt,VDash:yAt,Vdashl:gAt,veebar:xAt,vee:vAt,Vee:kAt,veeeq:bAt,vellip:wAt,verbar:MAt,Verbar:SAt,vert:CAt,Vert:_At,VerticalBar:NAt,VerticalLine:jAt,VerticalSeparator:LAt,VerticalTilde:AAt,VeryThinSpace:EAt,Vfr:TAt,vfr:IAt,vltri:RAt,vnsub:$At,vnsup:PAt,Vopf:DAt,vopf:zAt,vprop:OAt,vrtri:qAt,Vscr:HAt,vscr:VAt,vsubnE:BAt,vsubne:FAt,vsupnE:UAt,vsupne:GAt,Vvdash:XAt,vzigzag:WAt,Wcirc:KAt,wcirc:YAt,wedbar:ZAt,wedge:JAt,Wedge:QAt,wedgeq:eEt,weierp:tEt,Wfr:nEt,wfr:rEt,Wopf:oEt,wopf:aEt,wp:iEt,wr:sEt,wreath:cEt,Wscr:lEt,wscr:uEt,xcap:dEt,xcirc:hEt,xcup:fEt,xdtri:pEt,Xfr:mEt,xfr:yEt,xharr:gEt,xhArr:xEt,Xi:vEt,xi:kEt,xlarr:bEt,xlArr:wEt,xmap:MEt,xnis:SEt,xodot:CEt,Xopf:_Et,xopf:NEt,xoplus:jEt,xotime:LEt,xrarr:AEt,xrArr:EEt,Xscr:TEt,xscr:IEt,xsqcup:REt,xuplus:$Et,xutri:PEt,xvee:DEt,xwedge:zEt,Yacute:OEt,yacute:qEt,YAcy:HEt,yacy:VEt,Ycirc:BEt,ycirc:FEt,Ycy:UEt,ycy:GEt,yen:XEt,Yfr:WEt,yfr:KEt,YIcy:YEt,yicy:ZEt,Yopf:JEt,yopf:QEt,Yscr:eTt,yscr:tTt,YUcy:nTt,yucy:rTt,yuml:oTt,Yuml:aTt,Zacute:iTt,zacute:sTt,Zcaron:cTt,zcaron:lTt,Zcy:uTt,zcy:dTt,Zdot:hTt,zdot:fTt,zeetrf:pTt,ZeroWidthSpace:mTt,Zeta:yTt,zeta:gTt,zfr:xTt,Zfr:vTt,ZHcy:kTt,zhcy:bTt,zigrarr:wTt,zopf:MTt,Zopf:STt,Zscr:CTt,zscr:_Tt,zwj:NTt,zwnj:jTt},LTt="Á",ATt="á",ETt="Â",TTt="â",ITt="´",RTt="Æ",$Tt="æ",PTt="À",DTt="à",zTt="&",OTt="&",qTt="Å",HTt="å",VTt="Ã",BTt="ã",FTt="Ä",UTt="ä",GTt="¦",XTt="Ç",WTt="ç",KTt="¸",YTt="¢",ZTt="©",JTt="©",QTt="¤",eIt="°",tIt="÷",nIt="É",rIt="é",oIt="Ê",aIt="ê",iIt="È",sIt="è",cIt="Ð",lIt="ð",uIt="Ë",dIt="ë",hIt="½",fIt="¼",pIt="¾",mIt=">",yIt=">",gIt="Í",xIt="í",vIt="Î",kIt="î",bIt="¡",wIt="Ì",MIt="ì",SIt="¿",CIt="Ï",_It="ï",NIt="«",jIt="<",LIt="<",AIt="¯",EIt="µ",TIt="·",IIt=" ",RIt="¬",$It="Ñ",PIt="ñ",DIt="Ó",zIt="ó",OIt="Ô",qIt="ô",HIt="Ò",VIt="ò",BIt="ª",FIt="º",UIt="Ø",GIt="ø",XIt="Õ",WIt="õ",KIt="Ö",YIt="ö",ZIt="¶",JIt="±",QIt="£",eRt='"',tRt='"',nRt="»",rRt="®",oRt="®",aRt="§",iRt="",sRt="¹",cRt="²",lRt="³",uRt="ß",dRt="Þ",hRt="þ",fRt="×",pRt="Ú",mRt="ú",yRt="Û",gRt="û",xRt="Ù",vRt="ù",kRt="¨",bRt="Ü",wRt="ü",MRt="Ý",SRt="ý",CRt="¥",_Rt="ÿ",NRt={Aacute:LTt,aacute:ATt,Acirc:ETt,acirc:TTt,acute:ITt,AElig:RTt,aelig:$Tt,Agrave:PTt,agrave:DTt,amp:zTt,AMP:OTt,Aring:qTt,aring:HTt,Atilde:VTt,atilde:BTt,Auml:FTt,auml:UTt,brvbar:GTt,Ccedil:XTt,ccedil:WTt,cedil:KTt,cent:YTt,copy:ZTt,COPY:JTt,curren:QTt,deg:eIt,divide:tIt,Eacute:nIt,eacute:rIt,Ecirc:oIt,ecirc:aIt,Egrave:iIt,egrave:sIt,ETH:cIt,eth:lIt,Euml:uIt,euml:dIt,frac12:hIt,frac14:fIt,frac34:pIt,gt:mIt,GT:yIt,Iacute:gIt,iacute:xIt,Icirc:vIt,icirc:kIt,iexcl:bIt,Igrave:wIt,igrave:MIt,iquest:SIt,Iuml:CIt,iuml:_It,laquo:NIt,lt:jIt,LT:LIt,macr:AIt,micro:EIt,middot:TIt,nbsp:IIt,not:RIt,Ntilde:$It,ntilde:PIt,Oacute:DIt,oacute:zIt,Ocirc:OIt,ocirc:qIt,Ograve:HIt,ograve:VIt,ordf:BIt,ordm:FIt,Oslash:UIt,oslash:GIt,Otilde:XIt,otilde:WIt,Ouml:KIt,ouml:YIt,para:ZIt,plusmn:JIt,pound:QIt,quot:eRt,QUOT:tRt,raquo:nRt,reg:rRt,REG:oRt,sect:aRt,shy:iRt,sup1:sRt,sup2:cRt,sup3:lRt,szlig:uRt,THORN:dRt,thorn:hRt,times:fRt,Uacute:pRt,uacute:mRt,Ucirc:yRt,ucirc:gRt,Ugrave:xRt,ugrave:vRt,uml:kRt,Uuml:bRt,uuml:wRt,Yacute:MRt,yacute:SRt,yen:CRt,yuml:_Rt},jRt="&",LRt="'",ARt=">",ERt="<",TRt='"',e1e={amp:jRt,apos:LRt,gt:ARt,lt:ERt,quot:TRt};var kf={};const IRt={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376};var Kte;function RRt(){if(Kte)return kf;Kte=1;var e=kf&&kf.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(kf,"__esModule",{value:!0});var t=e(IRt),n=String.fromCodePoint||function(o){var a="";return o>65535&&(o-=65536,a+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),a+=String.fromCharCode(o),a};function r(o){return o>=55296&&o<=57343||o>1114111?"�":(o in t.default&&(o=t.default[o]),n(o))}return kf.default=r,kf}var Yte;function Zte(){if(Yte)return za;Yte=1;var e=za&&za.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(za,"__esModule",{value:!0}),za.decodeHTML=za.decodeHTMLStrict=za.decodeXML=void 0;var t=e(Qde),n=e(NRt),r=e(e1e),o=e(RRt()),a=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;za.decodeXML=i(r.default),za.decodeHTMLStrict=i(t.default);function i(d){var f=h(d);return function(m){return String(m).replace(a,f)}}var l=function(d,f){return d<f?1:-1};za.decodeHTML=function(){for(var d=Object.keys(n.default).sort(l),f=Object.keys(t.default).sort(l),m=0,y=0;m<f.length;m++)d[y]===f[m]?(f[m]+=";?",y++):f[m]+=";";var v=new RegExp("&(?:"+f.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),b=h(t.default);function w(C){return C.substr(-1)!==";"&&(C+=";"),b(C)}return function(C){return String(C).replace(v,w)}}();function h(d){return function(m){if(m.charAt(1)==="#"){var y=m.charAt(2);return y==="X"||y==="x"?o.default(parseInt(m.substr(3),16)):o.default(parseInt(m.substr(2),10))}return d[m.slice(1,-1)]||m}}return za}var Xr={},Jte;function Qte(){if(Jte)return Xr;Jte=1;var e=Xr&&Xr.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.escapeUTF8=Xr.escape=Xr.encodeNonAsciiHTML=Xr.encodeHTML=Xr.encodeXML=void 0;var t=e(e1e),n=l(t.default),r=h(n);Xr.encodeXML=C(n);var o=e(Qde),a=l(o.default),i=h(a);Xr.encodeHTML=y(a,i),Xr.encodeNonAsciiHTML=C(a);function l(M){return Object.keys(M).sort().reduce(function(j,_){return j[M[_]]="&"+_+";",j},{})}function h(M){for(var j=[],_=[],N=0,T=Object.keys(M);N<T.length;N++){var A=T[N];A.length===1?j.push("\\"+A):_.push(A)}j.sort();for(var P=0;P<j.length-1;P++){for(var R=P;R<j.length-1&&j[R].charCodeAt(1)+1===j[R+1].charCodeAt(1);)R+=1;var V=1+R-P;V<3||j.splice(P,V,j[P]+"-"+j[R])}return _.unshift("["+j.join("")+"]"),new RegExp(_.join("|"),"g")}var d=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,f=String.prototype.codePointAt!=null?function(M){return M.codePointAt(0)}:function(M){return(M.charCodeAt(0)-55296)*1024+M.charCodeAt(1)-56320+65536};function m(M){return"&#x"+(M.length>1?f(M):M.charCodeAt(0)).toString(16).toUpperCase()+";"}function y(M,j){return function(_){return _.replace(j,function(N){return M[N]}).replace(d,m)}}var v=new RegExp(r.source+"|"+d.source,"g");function b(M){return M.replace(v,m)}Xr.escape=b;function w(M){return M.replace(r,m)}Xr.escapeUTF8=w;function C(M){return function(j){return j.replace(v,function(_){return M[_]||m(_)})}}return Xr}var ene;function $Rt(){return ene||(ene=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.encodeHTML5=e.encodeHTML4=e.escapeUTF8=e.escape=e.encodeNonAsciiHTML=e.encodeHTML=e.encodeXML=e.encode=e.decodeStrict=e.decode=void 0;var t=Zte(),n=Qte();function r(h,d){return(!d||d<=0?t.decodeXML:t.decodeHTML)(h)}e.decode=r;function o(h,d){return(!d||d<=0?t.decodeXML:t.decodeHTMLStrict)(h)}e.decodeStrict=o;function a(h,d){return(!d||d<=0?n.encodeXML:n.encodeHTML)(h)}e.encode=a;var i=Qte();Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return i.encodeXML}}),Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return i.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return i.encodeNonAsciiHTML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return i.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return i.escapeUTF8}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return i.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return i.encodeHTML}});var l=Zte();Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return l.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return l.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return l.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return l.decodeXML}})}(sB)),sB}var cB,tne;function PRt(){if(tne)return cB;tne=1;function e(z,H){if(!(z instanceof H))throw new TypeError("Cannot call a class as a function")}function t(z,H){for(var $=0;$<H.length;$++){var F=H[$];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(z,F.key,F)}}function n(z,H,$){return H&&t(z.prototype,H),z}function r(z,H){var $=typeof Symbol<"u"&&z[Symbol.iterator]||z["@@iterator"];if(!$){if(Array.isArray(z)||($=o(z))||H){$&&(z=$);var F=0,D=function(){};return{s:D,n:function(){return F>=z.length?{done:!0}:{done:!1,value:z[F++]}},e:function(W){throw W},f:D}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
8170
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var U=!0,X=!1,K;return{s:function(){$=$.call(z)},n:function(){var W=$.next();return U=W.done,W},e:function(W){X=!0,K=W},f:function(){try{!U&&$.return!=null&&$.return()}finally{if(X)throw K}}}}function o(z,H){if(z){if(typeof z=="string")return a(z,H);var $=Object.prototype.toString.call(z).slice(8,-1);if($==="Object"&&z.constructor&&($=z.constructor.name),$==="Map"||$==="Set")return Array.from(z);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return a(z,H)}}function a(z,H){(H==null||H>z.length)&&(H=z.length);for(var $=0,F=new Array(H);$<H;$++)F[$]=z[$];return F}var i=$Rt(),l={fg:"#FFF",bg:"#000",newline:!1,escapeXML:!1,stream:!1,colors:h()};function h(){var z={0:"#000",1:"#A00",2:"#0A0",3:"#A50",4:"#00A",5:"#A0A",6:"#0AA",7:"#AAA",8:"#555",9:"#F55",10:"#5F5",11:"#FF5",12:"#55F",13:"#F5F",14:"#5FF",15:"#FFF"};return C(0,5).forEach(function(H){C(0,5).forEach(function($){C(0,5).forEach(function(F){return d(H,$,F,z)})})}),C(0,23).forEach(function(H){var $=H+232,F=f(H*10+8);z[$]="#"+F+F+F}),z}function d(z,H,$,F){var D=16+z*36+H*6+$,U=z>0?z*40+55:0,X=H>0?H*40+55:0,K=$>0?$*40+55:0;F[D]=m([U,X,K])}function f(z){for(var H=z.toString(16);H.length<2;)H="0"+H;return H}function m(z){var H=[],$=r(z),F;try{for($.s();!(F=$.n()).done;){var D=F.value;H.push(f(D))}}catch(U){$.e(U)}finally{$.f()}return"#"+H.join("")}function y(z,H,$,F){var D;return H==="text"?D=_($,F):H==="display"?D=b(z,$,F):H==="xterm256Foreground"?D=A(z,F.colors[$]):H==="xterm256Background"?D=P(z,F.colors[$]):H==="rgb"&&(D=v(z,$)),D}function v(z,H){H=H.substring(2).slice(0,-1);var $=+H.substr(0,2),F=H.substring(5).split(";"),D=F.map(function(U){return("0"+Number(U).toString(16)).substr(-2)}).join("");return T(z,($===38?"color:#":"background-color:#")+D)}function b(z,H,$){H=parseInt(H,10);var F={"-1":function(){return"<br/>"},0:function(){return z.length&&w(z)},1:function(){return N(z,"b")},3:function(){return N(z,"i")},4:function(){return N(z,"u")},8:function(){return T(z,"display:none")},9:function(){return N(z,"strike")},22:function(){return T(z,"font-weight:normal;text-decoration:none;font-style:normal")},23:function(){return R(z,"i")},24:function(){return R(z,"u")},39:function(){return A(z,$.fg)},49:function(){return P(z,$.bg)},53:function(){return T(z,"text-decoration:overline")}},D;return F[H]?D=F[H]():4<H&&H<7?D=N(z,"blink"):29<H&&H<38?D=A(z,$.colors[H-30]):39<H&&H<48?D=P(z,$.colors[H-40]):89<H&&H<98?D=A(z,$.colors[8+(H-90)]):99<H&&H<108&&(D=P(z,$.colors[8+(H-100)])),D}function w(z){var H=z.slice(0);return z.length=0,H.reverse().map(function($){return"</"+$+">"}).join("")}function C(z,H){for(var $=[],F=z;F<=H;F++)$.push(F);return $}function M(z){return function(H){return(z===null||H.category!==z)&&z!=="all"}}function j(z){z=parseInt(z,10);var H=null;return z===0?H="all":z===1?H="bold":2<z&&z<5?H="underline":4<z&&z<7?H="blink":z===8?H="hide":z===9?H="strike":29<z&&z<38||z===39||89<z&&z<98?H="foreground-color":(39<z&&z<48||z===49||99<z&&z<108)&&(H="background-color"),H}function _(z,H){return H.escapeXML?i.encodeXML(z):z}function N(z,H,$){return $||($=""),z.push(H),"<".concat(H).concat($?' style="'.concat($,'"'):"",">")}function T(z,H){return N(z,"span",H)}function A(z,H){return N(z,"span","color:"+H)}function P(z,H){return N(z,"span","background-color:"+H)}function R(z,H){var $;if(z.slice(-1)[0]===H&&($=z.pop()),$)return"</"+H+">"}function V(z,H,$){var F=!1,D=3;function U(){return""}function X(Te,Ne){return $("xterm256Foreground",Ne),""}function K(Te,Ne){return $("xterm256Background",Ne),""}function I(Te){return H.newline?$("display",-1):$("text",Te),""}function W(Te,Ne){F=!0,Ne.trim().length===0&&(Ne="0"),Ne=Ne.trimRight(";").split(";");var qe=r(Ne),Ye;try{for(qe.s();!(Ye=qe.n()).done;){var Pe=Ye.value;$("display",Pe)}}catch(Re){qe.e(Re)}finally{qe.f()}return""}function G(Te){return $("text",Te),""}function O(Te){return $("rgb",Te),""}var Q=[{pattern:/^\x08+/,sub:U},{pattern:/^\x1b\[[012]?K/,sub:U},{pattern:/^\x1b\[\(B/,sub:U},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:O},{pattern:/^\x1b\[38;5;(\d+)m/,sub:X},{pattern:/^\x1b\[48;5;(\d+)m/,sub:K},{pattern:/^\n/,sub:I},{pattern:/^\r+\n/,sub:I},{pattern:/^\r/,sub:I},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:W},{pattern:/^\x1b\[\d?J/,sub:U},{pattern:/^\x1b\[\d{0,3};\d{0,3}f/,sub:U},{pattern:/^\x1b\[?[\d;]{0,3}/,sub:U},{pattern:/^(([^\x1b\x08\r\n])+)/,sub:G}];function ee(Te,Ne){Ne>D&&F||(F=!1,z=z.replace(Te.pattern,Te.sub))}var ne=[],Z=z,J=Z.length;e:for(;J>0;){for(var oe=0,ie=0,Ce=Q.length;ie<Ce;oe=++ie){var Se=Q[oe];if(ee(Se,oe),z.length!==J){J=z.length;continue e}}if(z.length===J)break;ne.push(0),J=z.length}return ne}function E(z,H,$){return H!=="text"&&(z=z.filter(M(j($))),z.push({token:H,data:$,category:j($)})),z}var q=function(){function z(H){e(this,z),H=H||{},H.colors&&(H.colors=Object.assign({},l.colors,H.colors)),this.options=Object.assign({},l,H),this.stack=[],this.stickyStack=[]}return n(z,[{key:"toHtml",value:function($){var F=this;$=typeof $=="string"?[$]:$;var D=this.stack,U=this.options,X=[];return this.stickyStack.forEach(function(K){var I=y(D,K.token,K.data,U);I&&X.push(I)}),V($.join(""),U,function(K,I){var W=y(D,K,I,U);W&&X.push(W),U.stream&&(F.stickyStack=E(F.stickyStack,K,I))}),D.length&&X.push(w(D)),X.join("")}}]),z}();return cB=q,cB}var DRt=PRt();const zRt=Uc(DRt),ORt=new zRt({fg:"var(--ansi-fg, #e5e7eb)",bg:"var(--ansi-bg, #111827)",newline:!0,escapeXML:!0}),t1e=ce.memo(({log:e})=>{const t=typeof e=="object"&&e!==null&&e.content?e.content:typeof e=="string"?e:"",n=g.useMemo(()=>ORt.toHtml(t),[t]);return s.jsx("div",{className:"log-line leading-relaxed whitespace-pre-wrap break-all px-4 py-1",children:s.jsx("div",{dangerouslySetInnerHTML:{__html:n}})})});t1e.displayName="LogLine";function qRt(){const{botId:e}=Ui(),t=Ee(_=>_.bots),n=Ee(_=>_.botLogs),r=Ee(_=>_.botStatuses),o=g.useMemo(()=>t.find(_=>_.id===parseInt(e)),[t,e]),a=g.useMemo(()=>{const _=n[e]||[],N=_.length>5e3?500:_.length>2e3?1e3:2e3;return _.slice(-N)},[n,e]),i=o&&r[o.id]||"stopped",[l,h]=g.useState(""),[d,f]=g.useState(!1),[m,y]=g.useState(!1),v=g.useRef(null),b=g.useRef(0),w=g.useCallback(()=>{v.current&&(v.current.scrollTop=v.current.scrollHeight)},[]),C=g.useCallback(()=>{if(v.current){const{scrollTop:_,scrollHeight:N,clientHeight:T}=v.current,A=N-T<=_+5;f(!A)}},[]),M=async _=>{if(_.preventDefault(),!(!l.trim()||!o||i!=="running"))try{await Ae(`/api/bots/${o.id}/chat`,{method:"POST",body:JSON.stringify({message:l})}),h(""),f(!1)}catch(N){console.error("Failed to send command:",N)}},j=g.useCallback(()=>{Ee.setState(_=>{_.botLogs[e]&&(_.botLogs[e]=[])}),y(!1)},[e]);return g.useEffect(()=>{f(!1),w()},[e,w]),g.useEffect(()=>{!d&&b.current!==a.length&&w(),b.current=a.length,(n[e]||[]).length>4e3?y(!0):y(!1)},[a.length,n,e,d,w]),s.jsxs("div",{className:"flex flex-col h-full w-full bg-background rounded-lg border border-border relative",children:[s.jsx("div",{className:"flex-1 overflow-hidden",style:{"--ansi-fg":"hsl(var(--foreground))","--ansi-bg":"hsl(var(--background))"},children:s.jsx("div",{ref:v,onScroll:C,className:"h-full overflow-y-auto font-mono text-sm",children:a.map(_=>s.jsx(t1e,{log:_},_.id))})}),s.jsxs("div",{className:"absolute top-2 right-2 flex gap-2",children:[m&&s.jsx(se,{className:"rounded-full h-8 w-8 p-0 bg-yellow-500 hover:bg-yellow-600 text-white",variant:"secondary",size:"sm",title:"Большое количество логов может снизить производительность. Очистите логи для улучшения.",children:s.jsx(mc,{className:"h-4 w-4"})}),d&&s.jsx(se,{onClick:()=>{w(),f(!1)},className:"rounded-full h-8 w-8 p-0 bg-blue-500 hover:bg-blue-600 text-white",variant:"secondary",size:"sm",title:"Прокрутить вниз",children:s.jsx(z2,{className:"h-4 w-4"})}),s.jsx(se,{onClick:j,className:"rounded-full h-8 w-8 p-0 bg-red-500 hover:bg-red-600 text-white",variant:"secondary",size:"sm",title:"Очистить консоль",children:s.jsx(_r,{className:"h-4 w-4"})})]}),s.jsxs("form",{onSubmit:M,className:"flex-shrink-0 flex items-center gap-2 p-2 bg-muted/50 border-t border-border",children:[s.jsx(Oe,{type:"text",placeholder:i==="running"?`Отправить как ${o==null?void 0:o.username}...`:"Запустите бота, чтобы отправлять сообщения",value:l,onChange:_=>h(_.target.value),disabled:i!=="running",className:"flex-1"}),s.jsx(se,{type:"submit",disabled:!l.trim()||i!=="running",size:"sm",children:s.jsx(nm,{className:"h-4 w-4"})})]})]})}var Bz="Tabs",[HRt,jen]=er(Bz,[Kp]),n1e=Kp(),[VRt,TX]=HRt(Bz),r1e=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:h="automatic",...d}=e,f=Ah(l),[m,y]=Yr({prop:r,onChange:o,defaultProp:a??"",caller:Bz});return s.jsx(VRt,{scope:n,baseId:ur(),value:m,onValueChange:y,orientation:i,dir:f,activationMode:h,children:s.jsx($e.div,{dir:f,"data-orientation":i,...d,ref:t})})});r1e.displayName=Bz;var o1e="TabsList",a1e=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=TX(o1e,n),i=n1e(n);return s.jsx(WG,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:s.jsx($e.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});a1e.displayName=o1e;var i1e="TabsTrigger",s1e=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=TX(i1e,n),l=n1e(n),h=u1e(i.baseId,r),d=d1e(i.baseId,r),f=r===i.value;return s.jsx(KG,{asChild:!0,...l,focusable:!o,active:f,children:s.jsx($e.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:h,...a,ref:t,onMouseDown:Le(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?i.onValueChange(r):m.preventDefault()}),onKeyDown:Le(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&i.onValueChange(r)}),onFocus:Le(e.onFocus,()=>{const m=i.activationMode!=="manual";!f&&!o&&m&&i.onValueChange(r)})})})});s1e.displayName=i1e;var c1e="TabsContent",l1e=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,l=TX(c1e,n),h=u1e(l.baseId,r),d=d1e(l.baseId,r),f=r===l.value,m=g.useRef(f);return g.useEffect(()=>{const y=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(y)},[]),s.jsx(tr,{present:o||f,children:({present:y})=>s.jsx($e.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":h,hidden:!y,id:d,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:y&&a})})});l1e.displayName=c1e;function u1e(e,t){return`${e}-trigger-${t}`}function d1e(e,t){return`${e}-content-${t}`}var BRt=r1e,h1e=a1e,f1e=s1e,p1e=l1e;const Ea=BRt,Qo=g.forwardRef(({className:e,...t},n)=>s.jsx(h1e,{ref:n,className:me("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Qo.displayName=h1e.displayName;const Nn=g.forwardRef(({className:e,...t},n)=>s.jsx(f1e,{ref:n,className:me("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Nn.displayName=f1e.displayName;const Nr=g.forwardRef(({className:e,...t},n)=>s.jsx(p1e,{ref:n,className:me("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Nr.displayName=p1e.displayName;var Fz="Switch",[FRt,Len]=er(Fz),[URt,GRt]=FRt(Fz),m1e=g.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:h="on",onCheckedChange:d,form:f,...m}=e,[y,v]=g.useState(null),b=lt(t,_=>v(_)),w=g.useRef(!1),C=y?f||!!y.closest("form"):!0,[M,j]=Yr({prop:o,defaultProp:a??!1,onChange:d,caller:Fz});return s.jsxs(URt,{scope:n,checked:M,disabled:l,children:[s.jsx($e.button,{type:"button",role:"switch","aria-checked":M,"aria-required":i,"data-state":v1e(M),"data-disabled":l?"":void 0,disabled:l,value:h,...m,ref:b,onClick:Le(e.onClick,_=>{j(N=>!N),C&&(w.current=_.isPropagationStopped(),w.current||_.stopPropagation())})}),C&&s.jsx(x1e,{control:y,bubbles:!w.current,name:r,value:h,checked:M,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});m1e.displayName=Fz;var y1e="SwitchThumb",g1e=g.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=GRt(y1e,n);return s.jsx($e.span,{"data-state":v1e(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});g1e.displayName=y1e;var XRt="SwitchBubbleInput",x1e=g.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=g.useRef(null),l=lt(i,a),h=xz(n),d=pz(t);return g.useEffect(()=>{const f=i.current;if(!f)return;const m=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(m,"checked").set;if(h!==n&&v){const b=new Event("click",{bubbles:r});v.call(f,n),f.dispatchEvent(b)}},[h,n,r]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});x1e.displayName=XRt;function v1e(e){return e?"checked":"unchecked"}var k1e=m1e,WRt=g1e;const Zr=g.forwardRef(({className:e,...t},n)=>s.jsx(k1e,{className:me("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:s.jsx(WRt,{className:me("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Zr.displayName=k1e.displayName;var[Uz,Aen]=er("Tooltip",[Xc]),Gz=Xc(),b1e="TooltipProvider",KRt=700,rU="tooltip.open",[YRt,IX]=Uz(b1e),w1e=e=>{const{__scopeTooltip:t,delayDuration:n=KRt,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=g.useRef(!0),l=g.useRef(!1),h=g.useRef(0);return g.useEffect(()=>{const d=h.current;return()=>window.clearTimeout(d)},[]),s.jsx(YRt,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(h.current),i.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:g.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:a})};w1e.displayName=b1e;var Rm="Tooltip",[ZRt,jy]=Uz(Rm),M1e=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,h=IX(Rm,e.__scopeTooltip),d=Gz(t),[f,m]=g.useState(null),y=ur(),v=g.useRef(0),b=i??h.disableHoverableContent,w=l??h.delayDuration,C=g.useRef(!1),[M,j]=Yr({prop:r,defaultProp:o??!1,onChange:P=>{P?(h.onOpen(),document.dispatchEvent(new CustomEvent(rU))):h.onClose(),a==null||a(P)},caller:Rm}),_=g.useMemo(()=>M?C.current?"delayed-open":"instant-open":"closed",[M]),N=g.useCallback(()=>{window.clearTimeout(v.current),v.current=0,C.current=!1,j(!0)},[j]),T=g.useCallback(()=>{window.clearTimeout(v.current),v.current=0,j(!1)},[j]),A=g.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{C.current=!0,j(!0),v.current=0},w)},[w,j]);return g.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),s.jsx(mz,{...d,children:s.jsx(ZRt,{scope:t,contentId:y,open:M,stateAttribute:_,trigger:f,onTriggerChange:m,onTriggerEnter:g.useCallback(()=>{h.isOpenDelayedRef.current?A():N()},[h.isOpenDelayedRef,A,N]),onTriggerLeave:g.useCallback(()=>{b?T():(window.clearTimeout(v.current),v.current=0)},[T,b]),onOpen:N,onClose:T,disableHoverableContent:b,children:n})})};M1e.displayName=Rm;var oU="TooltipTrigger",S1e=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=jy(oU,n),a=IX(oU,n),i=Gz(n),l=g.useRef(null),h=lt(t,l,o.onTriggerChange),d=g.useRef(!1),f=g.useRef(!1),m=g.useCallback(()=>d.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),s.jsx(py,{asChild:!0,...i,children:s.jsx($e.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:h,onPointerMove:Le(e.onPointerMove,y=>{y.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:Le(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:Le(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Le(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:Le(e.onBlur,o.onClose),onClick:Le(e.onClick,o.onClose)})})});S1e.displayName=oU;var RX="TooltipPortal",[JRt,QRt]=Uz(RX,{forceMount:void 0}),C1e=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=jy(RX,t);return s.jsx(JRt,{scope:t,forceMount:n,children:s.jsx(tr,{present:n||a.open,children:s.jsx(Lh,{asChild:!0,container:o,children:r})})})};C1e.displayName=RX;var jp="TooltipContent",_1e=g.forwardRef((e,t)=>{const n=QRt(jp,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=jy(jp,e.__scopeTooltip);return s.jsx(tr,{present:r||i.open,children:i.disableHoverableContent?s.jsx(N1e,{side:o,...a,ref:t}):s.jsx(e$t,{side:o,...a,ref:t})})}),e$t=g.forwardRef((e,t)=>{const n=jy(jp,e.__scopeTooltip),r=IX(jp,e.__scopeTooltip),o=g.useRef(null),a=lt(t,o),[i,l]=g.useState(null),{trigger:h,onClose:d}=n,f=o.current,{onPointerInTransitChange:m}=r,y=g.useCallback(()=>{l(null),m(!1)},[m]),v=g.useCallback((b,w)=>{const C=b.currentTarget,M={x:b.clientX,y:b.clientY},j=a$t(M,C.getBoundingClientRect()),_=i$t(M,j),N=s$t(w.getBoundingClientRect()),T=l$t([..._,...N]);l(T),m(!0)},[m]);return g.useEffect(()=>()=>y(),[y]),g.useEffect(()=>{if(h&&f){const b=C=>v(C,f),w=C=>v(C,h);return h.addEventListener("pointerleave",b),f.addEventListener("pointerleave",w),()=>{h.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",w)}}},[h,f,v,y]),g.useEffect(()=>{if(i){const b=w=>{const C=w.target,M={x:w.clientX,y:w.clientY},j=(h==null?void 0:h.contains(C))||(f==null?void 0:f.contains(C)),_=!c$t(M,i);j?y():_&&(y(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[h,f,i,d,y]),s.jsx(N1e,{...e,ref:a})}),[t$t,n$t]=Uz(Rm,{isInside:!1}),r$t=cie("TooltipContent"),N1e=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,h=jy(jp,n),d=Gz(n),{onClose:f}=h;return g.useEffect(()=>(document.addEventListener(rU,f),()=>document.removeEventListener(rU,f)),[f]),g.useEffect(()=>{if(h.trigger){const m=y=>{const v=y.target;v!=null&&v.contains(h.trigger)&&f()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[h.trigger,f]),s.jsx(jh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:s.jsxs(yz,{"data-state":h.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(r$t,{children:r}),s.jsx(t$t,{scope:n,isInside:!0,children:s.jsx(g4e,{id:h.contentId,role:"tooltip",children:o||r})})]})})});_1e.displayName=jp;var j1e="TooltipArrow",o$t=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Gz(n);return n$t(j1e,n).isInside?null:s.jsx(gz,{...o,...r,ref:t})});o$t.displayName=j1e;function a$t(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function i$t(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function s$t(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function c$t(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],h=t[i],d=l.x,f=l.y,m=h.x,y=h.y;f>r!=y>r&&n<(m-d)*(r-f)/(y-f)+d&&(o=!o)}return o}function l$t(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),u$t(t)}function u$t(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var d$t=w1e,h$t=M1e,f$t=S1e,p$t=C1e,L1e=_1e;const Xz=d$t,Vr=h$t,Br=f$t,$r=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(p$t,{children:s.jsx(L1e,{ref:r,sideOffset:t,className:me("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));$r.displayName=L1e.displayName;const Ta=g.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:me("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));Ta.displayName="Textarea";var Wz="Collapsible",[m$t,A1e]=er(Wz),[y$t,$X]=m$t(Wz),E1e=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[h,d]=Yr({prop:r,defaultProp:o??!1,onChange:i,caller:Wz});return s.jsx(y$t,{scope:n,disabled:a,contentId:ur(),open:h,onOpenToggle:g.useCallback(()=>d(f=>!f),[d]),children:s.jsx($e.div,{"data-state":DX(h),"data-disabled":a?"":void 0,...l,ref:t})})});E1e.displayName=Wz;var T1e="CollapsibleTrigger",I1e=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=$X(T1e,n);return s.jsx($e.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":DX(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:Le(e.onClick,o.onOpenToggle)})});I1e.displayName=T1e;var PX="CollapsibleContent",R1e=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=$X(PX,e.__scopeCollapsible);return s.jsx(tr,{present:n||o.open,children:({present:a})=>s.jsx(g$t,{...r,ref:t,present:a})})});R1e.displayName=PX;var g$t=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=$X(PX,n),[l,h]=g.useState(r),d=g.useRef(null),f=lt(t,d),m=g.useRef(0),y=m.current,v=g.useRef(0),b=v.current,w=i.open||l,C=g.useRef(w),M=g.useRef(void 0);return g.useEffect(()=>{const j=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(j)},[]),vr(()=>{const j=d.current;if(j){M.current=M.current||{transitionDuration:j.style.transitionDuration,animationName:j.style.animationName},j.style.transitionDuration="0s",j.style.animationName="none";const _=j.getBoundingClientRect();m.current=_.height,v.current=_.width,C.current||(j.style.transitionDuration=M.current.transitionDuration,j.style.animationName=M.current.animationName),h(r)}},[i.open,r]),s.jsx($e.div,{"data-state":DX(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!w,...a,ref:f,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:w&&o})});function DX(e){return e?"open":"closed"}var x$t=E1e,v$t=I1e,k$t=R1e,ri="Accordion",b$t=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[zX,w$t,M$t]=sy(ri),[Kz,Een]=er(ri,[M$t,A1e]),OX=A1e(),$1e=ce.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return s.jsx(zX.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?s.jsx(N$t,{...a,ref:t}):s.jsx(_$t,{...o,ref:t})})});$1e.displayName=ri;var[P1e,S$t]=Kz(ri),[D1e,C$t]=Kz(ri,{collapsible:!1}),_$t=ce.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[l,h]=Yr({prop:n,defaultProp:r??"",onChange:o,caller:ri});return s.jsx(P1e,{scope:e.__scopeAccordion,value:ce.useMemo(()=>l?[l]:[],[l]),onItemOpen:h,onItemClose:ce.useCallback(()=>a&&h(""),[a,h]),children:s.jsx(D1e,{scope:e.__scopeAccordion,collapsible:a,children:s.jsx(z1e,{...i,ref:t})})})}),N$t=ce.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,l]=Yr({prop:n,defaultProp:r??[],onChange:o,caller:ri}),h=ce.useCallback(f=>l((m=[])=>[...m,f]),[l]),d=ce.useCallback(f=>l((m=[])=>m.filter(y=>y!==f)),[l]);return s.jsx(P1e,{scope:e.__scopeAccordion,value:i,onItemOpen:h,onItemClose:d,children:s.jsx(D1e,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(z1e,{...a,ref:t})})})}),[j$t,Yz]=Kz(ri),z1e=ce.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...i}=e,l=ce.useRef(null),h=lt(l,t),d=w$t(n),m=Ah(o)==="ltr",y=Le(e.onKeyDown,v=>{var R;if(!b$t.includes(v.key))return;const b=v.target,w=d().filter(V=>{var E;return!((E=V.ref.current)!=null&&E.disabled)}),C=w.findIndex(V=>V.ref.current===b),M=w.length;if(C===-1)return;v.preventDefault();let j=C;const _=0,N=M-1,T=()=>{j=C+1,j>N&&(j=_)},A=()=>{j=C-1,j<_&&(j=N)};switch(v.key){case"Home":j=_;break;case"End":j=N;break;case"ArrowRight":a==="horizontal"&&(m?T():A());break;case"ArrowDown":a==="vertical"&&T();break;case"ArrowLeft":a==="horizontal"&&(m?A():T());break;case"ArrowUp":a==="vertical"&&A();break}const P=j%M;(R=w[P].ref.current)==null||R.focus()});return s.jsx(j$t,{scope:n,disabled:r,direction:o,orientation:a,children:s.jsx(zX.Slot,{scope:n,children:s.jsx($e.div,{...i,"data-orientation":a,ref:h,onKeyDown:r?void 0:y})})})}),vD="AccordionItem",[L$t,qX]=Kz(vD),O1e=ce.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=Yz(vD,n),i=S$t(vD,n),l=OX(n),h=ur(),d=r&&i.value.includes(r)||!1,f=a.disabled||e.disabled;return s.jsx(L$t,{scope:n,open:d,disabled:f,triggerId:h,children:s.jsx(x$t,{"data-orientation":a.orientation,"data-state":U1e(d),...l,...o,ref:t,disabled:f,open:d,onOpenChange:m=>{m?i.onItemOpen(r):i.onItemClose(r)}})})});O1e.displayName=vD;var q1e="AccordionHeader",H1e=ce.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Yz(ri,n),a=qX(q1e,n);return s.jsx($e.h3,{"data-orientation":o.orientation,"data-state":U1e(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});H1e.displayName=q1e;var aU="AccordionTrigger",V1e=ce.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Yz(ri,n),a=qX(aU,n),i=C$t(aU,n),l=OX(n);return s.jsx(zX.ItemSlot,{scope:n,children:s.jsx(v$t,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...r,ref:t})})});V1e.displayName=aU;var B1e="AccordionContent",F1e=ce.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Yz(ri,n),a=qX(B1e,n),i=OX(n);return s.jsx(k$t,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});F1e.displayName=B1e;function U1e(e){return e?"open":"closed"}var A$t=$1e,E$t=O1e,T$t=H1e,G1e=V1e,X1e=F1e;const Zz=A$t,Ly=g.forwardRef(({className:e,...t},n)=>s.jsx(E$t,{ref:n,className:me("border-b",e),...t}));Ly.displayName="AccordionItem";const Ay=g.forwardRef(({className:e,children:t,...n},r)=>s.jsx(T$t,{className:"flex",children:s.jsxs(G1e,{ref:r,className:me("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,s.jsx(th,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));Ay.displayName=G1e.displayName;const Ey=g.forwardRef(({className:e,children:t,...n},r)=>s.jsx(X1e,{ref:r,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:s.jsx("div",{className:me("pb-4 pt-0",e),children:t})}));Ey.displayName=X1e.displayName;function I$t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function rne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nne(Object(n),!0).forEach(function(r){I$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nne(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function R$t(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function $$t(e,t){if(e==null)return{};var n=R$t(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function P$t(e,t){return D$t(e)||z$t(e,t)||O$t(e,t)||q$t()}function D$t(e){if(Array.isArray(e))return e}function z$t(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,a=void 0;try{for(var i=e[Symbol.iterator](),l;!(r=(l=i.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(h){o=!0,a=h}finally{try{!r&&i.return!=null&&i.return()}finally{if(o)throw a}}return n}}function O$t(e,t){if(e){if(typeof e=="string")return one(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return one(e,t)}}function one(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function q$t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
8170
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var U=!0,X=!1,K;return{s:function(){$=$.call(z)},n:function(){var W=$.next();return U=W.done,W},e:function(W){X=!0,K=W},f:function(){try{!U&&$.return!=null&&$.return()}finally{if(X)throw K}}}}function o(z,H){if(z){if(typeof z=="string")return a(z,H);var $=Object.prototype.toString.call(z).slice(8,-1);if($==="Object"&&z.constructor&&($=z.constructor.name),$==="Map"||$==="Set")return Array.from(z);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return a(z,H)}}function a(z,H){(H==null||H>z.length)&&(H=z.length);for(var $=0,F=new Array(H);$<H;$++)F[$]=z[$];return F}var i=$Rt(),l={fg:"#FFF",bg:"#000",newline:!1,escapeXML:!1,stream:!1,colors:h()};function h(){var z={0:"#000",1:"#A00",2:"#0A0",3:"#A50",4:"#00A",5:"#A0A",6:"#0AA",7:"#AAA",8:"#555",9:"#F55",10:"#5F5",11:"#FF5",12:"#55F",13:"#F5F",14:"#5FF",15:"#FFF"};return C(0,5).forEach(function(H){C(0,5).forEach(function($){C(0,5).forEach(function(F){return d(H,$,F,z)})})}),C(0,23).forEach(function(H){var $=H+232,F=f(H*10+8);z[$]="#"+F+F+F}),z}function d(z,H,$,F){var D=16+z*36+H*6+$,U=z>0?z*40+55:0,X=H>0?H*40+55:0,K=$>0?$*40+55:0;F[D]=m([U,X,K])}function f(z){for(var H=z.toString(16);H.length<2;)H="0"+H;return H}function m(z){var H=[],$=r(z),F;try{for($.s();!(F=$.n()).done;){var D=F.value;H.push(f(D))}}catch(U){$.e(U)}finally{$.f()}return"#"+H.join("")}function y(z,H,$,F){var D;return H==="text"?D=_($,F):H==="display"?D=b(z,$,F):H==="xterm256Foreground"?D=A(z,F.colors[$]):H==="xterm256Background"?D=P(z,F.colors[$]):H==="rgb"&&(D=v(z,$)),D}function v(z,H){H=H.substring(2).slice(0,-1);var $=+H.substr(0,2),F=H.substring(5).split(";"),D=F.map(function(U){return("0"+Number(U).toString(16)).substr(-2)}).join("");return T(z,($===38?"color:#":"background-color:#")+D)}function b(z,H,$){H=parseInt(H,10);var F={"-1":function(){return"<br/>"},0:function(){return z.length&&w(z)},1:function(){return N(z,"b")},3:function(){return N(z,"i")},4:function(){return N(z,"u")},8:function(){return T(z,"display:none")},9:function(){return N(z,"strike")},22:function(){return T(z,"font-weight:normal;text-decoration:none;font-style:normal")},23:function(){return R(z,"i")},24:function(){return R(z,"u")},39:function(){return A(z,$.fg)},49:function(){return P(z,$.bg)},53:function(){return T(z,"text-decoration:overline")}},D;return F[H]?D=F[H]():4<H&&H<7?D=N(z,"blink"):29<H&&H<38?D=A(z,$.colors[H-30]):39<H&&H<48?D=P(z,$.colors[H-40]):89<H&&H<98?D=A(z,$.colors[8+(H-90)]):99<H&&H<108&&(D=P(z,$.colors[8+(H-100)])),D}function w(z){var H=z.slice(0);return z.length=0,H.reverse().map(function($){return"</"+$+">"}).join("")}function C(z,H){for(var $=[],F=z;F<=H;F++)$.push(F);return $}function M(z){return function(H){return(z===null||H.category!==z)&&z!=="all"}}function j(z){z=parseInt(z,10);var H=null;return z===0?H="all":z===1?H="bold":2<z&&z<5?H="underline":4<z&&z<7?H="blink":z===8?H="hide":z===9?H="strike":29<z&&z<38||z===39||89<z&&z<98?H="foreground-color":(39<z&&z<48||z===49||99<z&&z<108)&&(H="background-color"),H}function _(z,H){return H.escapeXML?i.encodeXML(z):z}function N(z,H,$){return $||($=""),z.push(H),"<".concat(H).concat($?' style="'.concat($,'"'):"",">")}function T(z,H){return N(z,"span",H)}function A(z,H){return N(z,"span","color:"+H)}function P(z,H){return N(z,"span","background-color:"+H)}function R(z,H){var $;if(z.slice(-1)[0]===H&&($=z.pop()),$)return"</"+H+">"}function V(z,H,$){var F=!1,D=3;function U(){return""}function X(Te,Ne){return $("xterm256Foreground",Ne),""}function K(Te,Ne){return $("xterm256Background",Ne),""}function I(Te){return H.newline?$("display",-1):$("text",Te),""}function W(Te,Ne){F=!0,Ne.trim().length===0&&(Ne="0"),Ne=Ne.trimRight(";").split(";");var qe=r(Ne),Ye;try{for(qe.s();!(Ye=qe.n()).done;){var Pe=Ye.value;$("display",Pe)}}catch(Re){qe.e(Re)}finally{qe.f()}return""}function G(Te){return $("text",Te),""}function O(Te){return $("rgb",Te),""}var Q=[{pattern:/^\x08+/,sub:U},{pattern:/^\x1b\[[012]?K/,sub:U},{pattern:/^\x1b\[\(B/,sub:U},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:O},{pattern:/^\x1b\[38;5;(\d+)m/,sub:X},{pattern:/^\x1b\[48;5;(\d+)m/,sub:K},{pattern:/^\n/,sub:I},{pattern:/^\r+\n/,sub:I},{pattern:/^\r/,sub:I},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:W},{pattern:/^\x1b\[\d?J/,sub:U},{pattern:/^\x1b\[\d{0,3};\d{0,3}f/,sub:U},{pattern:/^\x1b\[?[\d;]{0,3}/,sub:U},{pattern:/^(([^\x1b\x08\r\n])+)/,sub:G}];function ee(Te,Ne){Ne>D&&F||(F=!1,z=z.replace(Te.pattern,Te.sub))}var ne=[],Z=z,J=Z.length;e:for(;J>0;){for(var oe=0,ie=0,Ce=Q.length;ie<Ce;oe=++ie){var Se=Q[oe];if(ee(Se,oe),z.length!==J){J=z.length;continue e}}if(z.length===J)break;ne.push(0),J=z.length}return ne}function E(z,H,$){return H!=="text"&&(z=z.filter(M(j($))),z.push({token:H,data:$,category:j($)})),z}var q=function(){function z(H){e(this,z),H=H||{},H.colors&&(H.colors=Object.assign({},l.colors,H.colors)),this.options=Object.assign({},l,H),this.stack=[],this.stickyStack=[]}return n(z,[{key:"toHtml",value:function($){var F=this;$=typeof $=="string"?[$]:$;var D=this.stack,U=this.options,X=[];return this.stickyStack.forEach(function(K){var I=y(D,K.token,K.data,U);I&&X.push(I)}),V($.join(""),U,function(K,I){var W=y(D,K,I,U);W&&X.push(W),U.stream&&(F.stickyStack=E(F.stickyStack,K,I))}),D.length&&X.push(w(D)),X.join("")}}]),z}();return cB=q,cB}var DRt=PRt();const zRt=Uc(DRt),ORt=new zRt({fg:"var(--ansi-fg, #e5e7eb)",bg:"var(--ansi-bg, #111827)",newline:!0,escapeXML:!0}),t1e=ce.memo(({log:e})=>{const t=typeof e=="object"&&e!==null&&e.content?e.content:typeof e=="string"?e:"",n=g.useMemo(()=>ORt.toHtml(t),[t]);return s.jsx("div",{className:"log-line leading-relaxed whitespace-pre-wrap break-all px-4 py-1",children:s.jsx("div",{dangerouslySetInnerHTML:{__html:n}})})});t1e.displayName="LogLine";function qRt(){const{botId:e}=Ui(),t=Ee(_=>_.bots),n=Ee(_=>_.botLogs),r=Ee(_=>_.botStatuses),o=g.useMemo(()=>t.find(_=>_.id===parseInt(e)),[t,e]),a=g.useMemo(()=>{const _=n[e]||[],N=_.length>1e3?200:_.length>500?300:500;return _.slice(-N)},[n,e]),i=o&&r[o.id]||"stopped",[l,h]=g.useState(""),[d,f]=g.useState(!1),[m,y]=g.useState(!1),v=g.useRef(null),b=g.useRef(0),w=g.useCallback(()=>{v.current&&(v.current.scrollTop=v.current.scrollHeight)},[]),C=g.useCallback(()=>{if(v.current){const{scrollTop:_,scrollHeight:N,clientHeight:T}=v.current,A=N-T<=_+5;f(!A)}},[]),M=async _=>{if(_.preventDefault(),!(!l.trim()||!o||i!=="running"))try{await Ae(`/api/bots/${o.id}/chat`,{method:"POST",body:JSON.stringify({message:l})}),h(""),f(!1)}catch(N){console.error("Failed to send command:",N)}},j=g.useCallback(()=>{Ee.setState(_=>{_.botLogs[e]&&(_.botLogs[e]=[])}),y(!1)},[e]);return g.useEffect(()=>{f(!1),w()},[e,w]),g.useEffect(()=>{!d&&b.current!==a.length&&w(),b.current=a.length,(n[e]||[]).length>800?y(!0):y(!1)},[a.length,n,e,d,w]),s.jsxs("div",{className:"flex flex-col h-full w-full bg-background rounded-lg border border-border relative",children:[s.jsx("div",{className:"flex-1 overflow-hidden",style:{"--ansi-fg":"hsl(var(--foreground))","--ansi-bg":"hsl(var(--background))"},children:s.jsx("div",{ref:v,onScroll:C,className:"h-full overflow-y-auto font-mono text-sm",children:a.map(_=>s.jsx(t1e,{log:_},_.id))})}),s.jsxs("div",{className:"absolute top-2 right-2 flex gap-2",children:[m&&s.jsx(se,{className:"rounded-full h-8 w-8 p-0 bg-yellow-500 hover:bg-yellow-600 text-white",variant:"secondary",size:"sm",title:"Большое количество логов может снизить производительность. Очистите логи для улучшения.",children:s.jsx(mc,{className:"h-4 w-4"})}),d&&s.jsx(se,{onClick:()=>{w(),f(!1)},className:"rounded-full h-8 w-8 p-0 bg-blue-500 hover:bg-blue-600 text-white",variant:"secondary",size:"sm",title:"Прокрутить вниз",children:s.jsx(z2,{className:"h-4 w-4"})}),s.jsx(se,{onClick:j,className:"rounded-full h-8 w-8 p-0 bg-red-500 hover:bg-red-600 text-white",variant:"secondary",size:"sm",title:"Очистить консоль",children:s.jsx(_r,{className:"h-4 w-4"})})]}),s.jsxs("form",{onSubmit:M,className:"flex-shrink-0 flex items-center gap-2 p-2 bg-muted/50 border-t border-border",children:[s.jsx(Oe,{type:"text",placeholder:i==="running"?`Отправить как ${o==null?void 0:o.username}...`:"Запустите бота, чтобы отправлять сообщения",value:l,onChange:_=>h(_.target.value),disabled:i!=="running",className:"flex-1"}),s.jsx(se,{type:"submit",disabled:!l.trim()||i!=="running",size:"sm",children:s.jsx(nm,{className:"h-4 w-4"})})]})]})}var Bz="Tabs",[HRt,jen]=er(Bz,[Kp]),n1e=Kp(),[VRt,TX]=HRt(Bz),r1e=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:h="automatic",...d}=e,f=Ah(l),[m,y]=Yr({prop:r,onChange:o,defaultProp:a??"",caller:Bz});return s.jsx(VRt,{scope:n,baseId:ur(),value:m,onValueChange:y,orientation:i,dir:f,activationMode:h,children:s.jsx($e.div,{dir:f,"data-orientation":i,...d,ref:t})})});r1e.displayName=Bz;var o1e="TabsList",a1e=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=TX(o1e,n),i=n1e(n);return s.jsx(WG,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:s.jsx($e.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});a1e.displayName=o1e;var i1e="TabsTrigger",s1e=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=TX(i1e,n),l=n1e(n),h=u1e(i.baseId,r),d=d1e(i.baseId,r),f=r===i.value;return s.jsx(KG,{asChild:!0,...l,focusable:!o,active:f,children:s.jsx($e.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:h,...a,ref:t,onMouseDown:Le(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?i.onValueChange(r):m.preventDefault()}),onKeyDown:Le(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&i.onValueChange(r)}),onFocus:Le(e.onFocus,()=>{const m=i.activationMode!=="manual";!f&&!o&&m&&i.onValueChange(r)})})})});s1e.displayName=i1e;var c1e="TabsContent",l1e=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,l=TX(c1e,n),h=u1e(l.baseId,r),d=d1e(l.baseId,r),f=r===l.value,m=g.useRef(f);return g.useEffect(()=>{const y=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(y)},[]),s.jsx(tr,{present:o||f,children:({present:y})=>s.jsx($e.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":h,hidden:!y,id:d,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:y&&a})})});l1e.displayName=c1e;function u1e(e,t){return`${e}-trigger-${t}`}function d1e(e,t){return`${e}-content-${t}`}var BRt=r1e,h1e=a1e,f1e=s1e,p1e=l1e;const Ea=BRt,Qo=g.forwardRef(({className:e,...t},n)=>s.jsx(h1e,{ref:n,className:me("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Qo.displayName=h1e.displayName;const Nn=g.forwardRef(({className:e,...t},n)=>s.jsx(f1e,{ref:n,className:me("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Nn.displayName=f1e.displayName;const Nr=g.forwardRef(({className:e,...t},n)=>s.jsx(p1e,{ref:n,className:me("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Nr.displayName=p1e.displayName;var Fz="Switch",[FRt,Len]=er(Fz),[URt,GRt]=FRt(Fz),m1e=g.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:h="on",onCheckedChange:d,form:f,...m}=e,[y,v]=g.useState(null),b=lt(t,_=>v(_)),w=g.useRef(!1),C=y?f||!!y.closest("form"):!0,[M,j]=Yr({prop:o,defaultProp:a??!1,onChange:d,caller:Fz});return s.jsxs(URt,{scope:n,checked:M,disabled:l,children:[s.jsx($e.button,{type:"button",role:"switch","aria-checked":M,"aria-required":i,"data-state":v1e(M),"data-disabled":l?"":void 0,disabled:l,value:h,...m,ref:b,onClick:Le(e.onClick,_=>{j(N=>!N),C&&(w.current=_.isPropagationStopped(),w.current||_.stopPropagation())})}),C&&s.jsx(x1e,{control:y,bubbles:!w.current,name:r,value:h,checked:M,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});m1e.displayName=Fz;var y1e="SwitchThumb",g1e=g.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=GRt(y1e,n);return s.jsx($e.span,{"data-state":v1e(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});g1e.displayName=y1e;var XRt="SwitchBubbleInput",x1e=g.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=g.useRef(null),l=lt(i,a),h=xz(n),d=pz(t);return g.useEffect(()=>{const f=i.current;if(!f)return;const m=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(m,"checked").set;if(h!==n&&v){const b=new Event("click",{bubbles:r});v.call(f,n),f.dispatchEvent(b)}},[h,n,r]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});x1e.displayName=XRt;function v1e(e){return e?"checked":"unchecked"}var k1e=m1e,WRt=g1e;const Zr=g.forwardRef(({className:e,...t},n)=>s.jsx(k1e,{className:me("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:s.jsx(WRt,{className:me("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Zr.displayName=k1e.displayName;var[Uz,Aen]=er("Tooltip",[Xc]),Gz=Xc(),b1e="TooltipProvider",KRt=700,rU="tooltip.open",[YRt,IX]=Uz(b1e),w1e=e=>{const{__scopeTooltip:t,delayDuration:n=KRt,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=g.useRef(!0),l=g.useRef(!1),h=g.useRef(0);return g.useEffect(()=>{const d=h.current;return()=>window.clearTimeout(d)},[]),s.jsx(YRt,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(h.current),i.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:g.useCallback(d=>{l.current=d},[]),disableHoverableContent:o,children:a})};w1e.displayName=b1e;var Rm="Tooltip",[ZRt,jy]=Uz(Rm),M1e=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,h=IX(Rm,e.__scopeTooltip),d=Gz(t),[f,m]=g.useState(null),y=ur(),v=g.useRef(0),b=i??h.disableHoverableContent,w=l??h.delayDuration,C=g.useRef(!1),[M,j]=Yr({prop:r,defaultProp:o??!1,onChange:P=>{P?(h.onOpen(),document.dispatchEvent(new CustomEvent(rU))):h.onClose(),a==null||a(P)},caller:Rm}),_=g.useMemo(()=>M?C.current?"delayed-open":"instant-open":"closed",[M]),N=g.useCallback(()=>{window.clearTimeout(v.current),v.current=0,C.current=!1,j(!0)},[j]),T=g.useCallback(()=>{window.clearTimeout(v.current),v.current=0,j(!1)},[j]),A=g.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{C.current=!0,j(!0),v.current=0},w)},[w,j]);return g.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),s.jsx(mz,{...d,children:s.jsx(ZRt,{scope:t,contentId:y,open:M,stateAttribute:_,trigger:f,onTriggerChange:m,onTriggerEnter:g.useCallback(()=>{h.isOpenDelayedRef.current?A():N()},[h.isOpenDelayedRef,A,N]),onTriggerLeave:g.useCallback(()=>{b?T():(window.clearTimeout(v.current),v.current=0)},[T,b]),onOpen:N,onClose:T,disableHoverableContent:b,children:n})})};M1e.displayName=Rm;var oU="TooltipTrigger",S1e=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=jy(oU,n),a=IX(oU,n),i=Gz(n),l=g.useRef(null),h=lt(t,l,o.onTriggerChange),d=g.useRef(!1),f=g.useRef(!1),m=g.useCallback(()=>d.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),s.jsx(py,{asChild:!0,...i,children:s.jsx($e.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:h,onPointerMove:Le(e.onPointerMove,y=>{y.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:Le(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:Le(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Le(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:Le(e.onBlur,o.onClose),onClick:Le(e.onClick,o.onClose)})})});S1e.displayName=oU;var RX="TooltipPortal",[JRt,QRt]=Uz(RX,{forceMount:void 0}),C1e=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=jy(RX,t);return s.jsx(JRt,{scope:t,forceMount:n,children:s.jsx(tr,{present:n||a.open,children:s.jsx(Lh,{asChild:!0,container:o,children:r})})})};C1e.displayName=RX;var jp="TooltipContent",_1e=g.forwardRef((e,t)=>{const n=QRt(jp,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=jy(jp,e.__scopeTooltip);return s.jsx(tr,{present:r||i.open,children:i.disableHoverableContent?s.jsx(N1e,{side:o,...a,ref:t}):s.jsx(e$t,{side:o,...a,ref:t})})}),e$t=g.forwardRef((e,t)=>{const n=jy(jp,e.__scopeTooltip),r=IX(jp,e.__scopeTooltip),o=g.useRef(null),a=lt(t,o),[i,l]=g.useState(null),{trigger:h,onClose:d}=n,f=o.current,{onPointerInTransitChange:m}=r,y=g.useCallback(()=>{l(null),m(!1)},[m]),v=g.useCallback((b,w)=>{const C=b.currentTarget,M={x:b.clientX,y:b.clientY},j=a$t(M,C.getBoundingClientRect()),_=i$t(M,j),N=s$t(w.getBoundingClientRect()),T=l$t([..._,...N]);l(T),m(!0)},[m]);return g.useEffect(()=>()=>y(),[y]),g.useEffect(()=>{if(h&&f){const b=C=>v(C,f),w=C=>v(C,h);return h.addEventListener("pointerleave",b),f.addEventListener("pointerleave",w),()=>{h.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",w)}}},[h,f,v,y]),g.useEffect(()=>{if(i){const b=w=>{const C=w.target,M={x:w.clientX,y:w.clientY},j=(h==null?void 0:h.contains(C))||(f==null?void 0:f.contains(C)),_=!c$t(M,i);j?y():_&&(y(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[h,f,i,d,y]),s.jsx(N1e,{...e,ref:a})}),[t$t,n$t]=Uz(Rm,{isInside:!1}),r$t=cie("TooltipContent"),N1e=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,h=jy(jp,n),d=Gz(n),{onClose:f}=h;return g.useEffect(()=>(document.addEventListener(rU,f),()=>document.removeEventListener(rU,f)),[f]),g.useEffect(()=>{if(h.trigger){const m=y=>{const v=y.target;v!=null&&v.contains(h.trigger)&&f()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[h.trigger,f]),s.jsx(jh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:s.jsxs(yz,{"data-state":h.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(r$t,{children:r}),s.jsx(t$t,{scope:n,isInside:!0,children:s.jsx(g4e,{id:h.contentId,role:"tooltip",children:o||r})})]})})});_1e.displayName=jp;var j1e="TooltipArrow",o$t=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Gz(n);return n$t(j1e,n).isInside?null:s.jsx(gz,{...o,...r,ref:t})});o$t.displayName=j1e;function a$t(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function i$t(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function s$t(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function c$t(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],h=t[i],d=l.x,f=l.y,m=h.x,y=h.y;f>r!=y>r&&n<(m-d)*(r-f)/(y-f)+d&&(o=!o)}return o}function l$t(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),u$t(t)}function u$t(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var d$t=w1e,h$t=M1e,f$t=S1e,p$t=C1e,L1e=_1e;const Xz=d$t,Vr=h$t,Br=f$t,$r=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(p$t,{children:s.jsx(L1e,{ref:r,sideOffset:t,className:me("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));$r.displayName=L1e.displayName;const Ta=g.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:me("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));Ta.displayName="Textarea";var Wz="Collapsible",[m$t,A1e]=er(Wz),[y$t,$X]=m$t(Wz),E1e=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[h,d]=Yr({prop:r,defaultProp:o??!1,onChange:i,caller:Wz});return s.jsx(y$t,{scope:n,disabled:a,contentId:ur(),open:h,onOpenToggle:g.useCallback(()=>d(f=>!f),[d]),children:s.jsx($e.div,{"data-state":DX(h),"data-disabled":a?"":void 0,...l,ref:t})})});E1e.displayName=Wz;var T1e="CollapsibleTrigger",I1e=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=$X(T1e,n);return s.jsx($e.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":DX(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:Le(e.onClick,o.onOpenToggle)})});I1e.displayName=T1e;var PX="CollapsibleContent",R1e=g.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=$X(PX,e.__scopeCollapsible);return s.jsx(tr,{present:n||o.open,children:({present:a})=>s.jsx(g$t,{...r,ref:t,present:a})})});R1e.displayName=PX;var g$t=g.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=$X(PX,n),[l,h]=g.useState(r),d=g.useRef(null),f=lt(t,d),m=g.useRef(0),y=m.current,v=g.useRef(0),b=v.current,w=i.open||l,C=g.useRef(w),M=g.useRef(void 0);return g.useEffect(()=>{const j=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(j)},[]),vr(()=>{const j=d.current;if(j){M.current=M.current||{transitionDuration:j.style.transitionDuration,animationName:j.style.animationName},j.style.transitionDuration="0s",j.style.animationName="none";const _=j.getBoundingClientRect();m.current=_.height,v.current=_.width,C.current||(j.style.transitionDuration=M.current.transitionDuration,j.style.animationName=M.current.animationName),h(r)}},[i.open,r]),s.jsx($e.div,{"data-state":DX(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!w,...a,ref:f,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:w&&o})});function DX(e){return e?"open":"closed"}var x$t=E1e,v$t=I1e,k$t=R1e,ri="Accordion",b$t=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[zX,w$t,M$t]=sy(ri),[Kz,Een]=er(ri,[M$t,A1e]),OX=A1e(),$1e=ce.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return s.jsx(zX.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?s.jsx(N$t,{...a,ref:t}):s.jsx(_$t,{...o,ref:t})})});$1e.displayName=ri;var[P1e,S$t]=Kz(ri),[D1e,C$t]=Kz(ri,{collapsible:!1}),_$t=ce.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[l,h]=Yr({prop:n,defaultProp:r??"",onChange:o,caller:ri});return s.jsx(P1e,{scope:e.__scopeAccordion,value:ce.useMemo(()=>l?[l]:[],[l]),onItemOpen:h,onItemClose:ce.useCallback(()=>a&&h(""),[a,h]),children:s.jsx(D1e,{scope:e.__scopeAccordion,collapsible:a,children:s.jsx(z1e,{...i,ref:t})})})}),N$t=ce.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,l]=Yr({prop:n,defaultProp:r??[],onChange:o,caller:ri}),h=ce.useCallback(f=>l((m=[])=>[...m,f]),[l]),d=ce.useCallback(f=>l((m=[])=>m.filter(y=>y!==f)),[l]);return s.jsx(P1e,{scope:e.__scopeAccordion,value:i,onItemOpen:h,onItemClose:d,children:s.jsx(D1e,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(z1e,{...a,ref:t})})})}),[j$t,Yz]=Kz(ri),z1e=ce.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...i}=e,l=ce.useRef(null),h=lt(l,t),d=w$t(n),m=Ah(o)==="ltr",y=Le(e.onKeyDown,v=>{var R;if(!b$t.includes(v.key))return;const b=v.target,w=d().filter(V=>{var E;return!((E=V.ref.current)!=null&&E.disabled)}),C=w.findIndex(V=>V.ref.current===b),M=w.length;if(C===-1)return;v.preventDefault();let j=C;const _=0,N=M-1,T=()=>{j=C+1,j>N&&(j=_)},A=()=>{j=C-1,j<_&&(j=N)};switch(v.key){case"Home":j=_;break;case"End":j=N;break;case"ArrowRight":a==="horizontal"&&(m?T():A());break;case"ArrowDown":a==="vertical"&&T();break;case"ArrowLeft":a==="horizontal"&&(m?A():T());break;case"ArrowUp":a==="vertical"&&A();break}const P=j%M;(R=w[P].ref.current)==null||R.focus()});return s.jsx(j$t,{scope:n,disabled:r,direction:o,orientation:a,children:s.jsx(zX.Slot,{scope:n,children:s.jsx($e.div,{...i,"data-orientation":a,ref:h,onKeyDown:r?void 0:y})})})}),vD="AccordionItem",[L$t,qX]=Kz(vD),O1e=ce.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=Yz(vD,n),i=S$t(vD,n),l=OX(n),h=ur(),d=r&&i.value.includes(r)||!1,f=a.disabled||e.disabled;return s.jsx(L$t,{scope:n,open:d,disabled:f,triggerId:h,children:s.jsx(x$t,{"data-orientation":a.orientation,"data-state":U1e(d),...l,...o,ref:t,disabled:f,open:d,onOpenChange:m=>{m?i.onItemOpen(r):i.onItemClose(r)}})})});O1e.displayName=vD;var q1e="AccordionHeader",H1e=ce.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Yz(ri,n),a=qX(q1e,n);return s.jsx($e.h3,{"data-orientation":o.orientation,"data-state":U1e(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});H1e.displayName=q1e;var aU="AccordionTrigger",V1e=ce.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Yz(ri,n),a=qX(aU,n),i=C$t(aU,n),l=OX(n);return s.jsx(zX.ItemSlot,{scope:n,children:s.jsx(v$t,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...r,ref:t})})});V1e.displayName=aU;var B1e="AccordionContent",F1e=ce.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Yz(ri,n),a=qX(B1e,n),i=OX(n);return s.jsx(k$t,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});F1e.displayName=B1e;function U1e(e){return e?"open":"closed"}var A$t=$1e,E$t=O1e,T$t=H1e,G1e=V1e,X1e=F1e;const Zz=A$t,Ly=g.forwardRef(({className:e,...t},n)=>s.jsx(E$t,{ref:n,className:me("border-b",e),...t}));Ly.displayName="AccordionItem";const Ay=g.forwardRef(({className:e,children:t,...n},r)=>s.jsx(T$t,{className:"flex",children:s.jsxs(G1e,{ref:r,className:me("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,s.jsx(th,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));Ay.displayName=G1e.displayName;const Ey=g.forwardRef(({className:e,children:t,...n},r)=>s.jsx(X1e,{ref:r,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:s.jsx("div",{className:me("pb-4 pt-0",e),children:t})}));Ey.displayName=X1e.displayName;function I$t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function rne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nne(Object(n),!0).forEach(function(r){I$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nne(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function R$t(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function $$t(e,t){if(e==null)return{};var n=R$t(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function P$t(e,t){return D$t(e)||z$t(e,t)||O$t(e,t)||q$t()}function D$t(e){if(Array.isArray(e))return e}function z$t(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,a=void 0;try{for(var i=e[Symbol.iterator](),l;!(r=(l=i.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(h){o=!0,a=h}finally{try{!r&&i.return!=null&&i.return()}finally{if(o)throw a}}return n}}function O$t(e,t){if(e){if(typeof e=="string")return one(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return one(e,t)}}function one(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function q$t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
8171
8171
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H$t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ane(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ine(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ane(Object(n),!0).forEach(function(r){H$t(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ane(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function V$t(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(o,a){return a(o)},r)}}function N2(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var i=arguments.length,l=new Array(i),h=0;h<i;h++)l[h]=arguments[h];return t.apply(n,[].concat(o,l))}}}function kD(e){return{}.toString.call(e).includes("Object")}function B$t(e){return!Object.keys(e).length}function $m(e){return typeof e=="function"}function F$t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function U$t(e,t){return kD(t)||Ic("changeType"),Object.keys(t).some(function(n){return!F$t(e,n)})&&Ic("changeField"),t}function G$t(e){$m(e)||Ic("selectorType")}function X$t(e){$m(e)||kD(e)||Ic("handlerType"),kD(e)&&Object.values(e).some(function(t){return!$m(t)})&&Ic("handlersType")}function W$t(e){e||Ic("initialIsRequired"),kD(e)||Ic("initialType"),B$t(e)&&Ic("initialContent")}function K$t(e,t){throw new Error(e[t]||e.default)}var Y$t={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Ic=N2(K$t)(Y$t),bx={changes:U$t,selector:G$t,handler:X$t,initial:W$t};function Z$t(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};bx.initial(e),bx.handler(t);var n={current:e},r=N2(ePt)(n,t),o=N2(Q$t)(n),a=N2(bx.changes)(e),i=N2(J$t)(n);function l(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(f){return f};return bx.selector(d),d(n.current)}function h(d){V$t(r,o,a,i)(d)}return[l,h]}function J$t(e,t){return $m(t)?t(e.current):t}function Q$t(e,t){return e.current=ine(ine({},e.current),t),t}function ePt(e,t,n){return $m(t)?t(e.current):Object.keys(n).forEach(function(r){var o;return(o=t[r])===null||o===void 0?void 0:o.call(t,e.current[r])}),n}var tPt={create:Z$t},nPt={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function rPt(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var i=arguments.length,l=new Array(i),h=0;h<i;h++)l[h]=arguments[h];return t.apply(n,[].concat(o,l))}}}function oPt(e){return{}.toString.call(e).includes("Object")}function aPt(e){return e||sne("configIsRequired"),oPt(e)||sne("configType"),e.urls?(iPt(),{paths:{vs:e.urls.monacoBase}}):e}function iPt(){console.warn(W1e.deprecation)}function sPt(e,t){throw new Error(e[t]||e.default)}var W1e={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
8172
8172
|
You are using deprecated way of configuration.
|
|
8173
8173
|
|
package/frontend/dist/index.html
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<meta name="msapplication-TileColor" content="#da532c">
|
|
43
43
|
<meta name="theme-color" content="#ffffff">
|
|
44
44
|
|
|
45
|
-
<script type="module" crossorigin src="/assets/index-
|
|
45
|
+
<script type="module" crossorigin src="/assets/index-UZUhEwz5.js"></script>
|
|
46
46
|
<link rel="stylesheet" crossorigin href="/assets/index-D3DCCCQP.css">
|
|
47
47
|
</head>
|
|
48
48
|
<body>
|