@nubisco/openbridge 1.8.0 → 1.8.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/dist/__tests__/shell.test.d.ts +2 -0
- package/dist/__tests__/shell.test.d.ts.map +1 -0
- package/dist/__tests__/shell.test.js +22 -0
- package/dist/__tests__/shell.test.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +5 -2
- package/dist/server.js.map +1 -1
- package/dist/shell.d.ts +11 -0
- package/dist/shell.d.ts.map +1 -0
- package/dist/shell.js +26 -0
- package/dist/shell.js.map +1 -0
- package/package.json +5 -5
- package/ui-dist/assets/{index-eZKkjOd6.css → index-BWdUx8PX.css} +1 -1
- package/ui-dist/assets/index-D685dWrS.js +110 -0
- package/ui-dist/index.html +2 -2
- package/ui-dist/assets/index-BvxjfoXi.js +0 -110
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function i(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(r){if(r.ep)return;r.ep=!0;const a=i(r);fetch(r.href,a)}})();/**
|
|
2
|
+
* @vue/shared v3.5.44
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/function uf(e){const t=Object.create(null);for(const i of e.split(","))t[i]=1;return i=>i in t}const dt={},Na=[],Wn=()=>{},ev=()=>!1,vc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),gc=e=>e.startsWith("onUpdate:"),Zt=Object.assign,cf=(e,t)=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)},S5=Object.prototype.hasOwnProperty,pt=(e,t)=>S5.call(e,t),We=Array.isArray,Xr=e=>S0(e)==="[object Map]",Cr=e=>S0(e)==="[object Set]",z2=e=>S0(e)==="[object Date]",Xe=e=>typeof e=="function",Nt=e=>typeof e=="string",rn=e=>typeof e=="symbol",mt=e=>e!==null&&typeof e=="object",tv=e=>(mt(e)||Xe(e))&&Xe(e.then)&&Xe(e.catch),iv=Object.prototype.toString,S0=e=>iv.call(e),C5=e=>S0(e).slice(8,-1),nv=e=>S0(e)==="[object Object]",bc=e=>Nt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Po=uf(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),yc=e=>{const t=Object.create(null);return i=>t[i]||(t[i]=e(i))},k5=/-\w/g,Ti=yc(e=>e.replace(k5,t=>t.slice(1).toUpperCase())),A5=/\B([A-Z])/g,Ar=yc(e=>e.replace(A5,"-$1").toLowerCase()),wc=yc(e=>e.charAt(0).toUpperCase()+e.slice(1)),h1=yc(e=>e?`on${wc(e)}`:""),yi=(e,t)=>!Object.is(e,t),_u=(e,...t)=>{for(let i=0;i<e.length;i++)e[i](...t)},rv=(e,t,i,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:i})},Sc=e=>{const t=parseFloat(e);return isNaN(t)?e:t},$5=e=>{const t=Nt(e)?Number(e):NaN;return isNaN(t)?e:t};let U2;const Cc=()=>U2||(U2=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ft(e){if(We(e)){const t={};for(let i=0;i<e.length;i++){const n=e[i],r=Nt(n)?x5(n):ft(n);if(r)for(const a in r)t[a]=r[a]}return t}else if(Nt(e)||mt(e))return e}const M5=/;(?![^(]*\))/g,L5=/:([^]+)/,E5=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function x5(e){const t={};return e.replace(E5,i=>i.startsWith("/*")?"":i).split(M5).forEach(i=>{if(i){const n=i.split(L5);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Te(e){let t="";if(Nt(e))t=e;else if(We(e))for(let i=0;i<e.length;i++){const n=Te(e[i]);n&&(t+=n+" ")}else if(mt(e))for(const i in e)e[i]&&(t+=i+" ");return t.trim()}function T5(e){if(!e)return null;let{class:t,style:i}=e;return t&&!Nt(t)&&(e.class=Te(t)),i&&(e.style=ft(i)),e}const H5="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly",N5=uf(H5);function av(e){return!!e||e===""}function P5(e,t,i){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=kn(e[r],t[r],i);return n}function W2(e,t,i){if(e.size!==t.size)return!1;const n=Array.from(t),r=new Uint8Array(n.length);for(const a of e){let s=-1;for(let l=0;l<n.length;l++)if(!r[l]&&kn(a,n[l],i)){s=l;break}if(s<0)return!1;r[s]=1}return!0}function O5(e,t,i){let n=Xr(e),r=Xr(t);if(n||r||(n=Cr(e),r=Cr(t),n||r))return n&&r?W2(e,t,i):!1;const a=Object.keys(e).length,s=Object.keys(t).length;if(a!==s)return!1;for(const l in e){const o=e.hasOwnProperty(l),u=t.hasOwnProperty(l);if(o&&!u||!o&&u||!kn(e[l],t[l],i))return!1}return String(e)===String(t)}function j2(e,t,i,n){i||(i=[new Map,new Map]);const[r,a]=i;if(r.has(e)||a.has(t))return r.get(e)===t&&a.get(t)===e;r.set(e,t),a.set(t,e);const s=n(e,t,i);return r.delete(e),a.delete(t),s}function kn(e,t,i){if(e===t)return!0;let n=z2(e),r=z2(t);return n||r?n&&r?e.getTime()===t.getTime():!1:(n=rn(e),r=rn(t),n||r?e===t:(n=We(e),r=We(t),n||r?n&&r?j2(e,t,i,P5):!1:(n=mt(e),r=mt(t),n||r?!n||!r?!1:j2(e,t,i,O5):String(e)===String(t))))}function df(e,t){return e.findIndex(i=>kn(i,t))}const sv=e=>!!(e&&e.__v_isRef===!0),K=e=>Nt(e)?e:e==null?"":We(e)||mt(e)&&(e.toString===iv||!Xe(e.toString))?sv(e)?K(e.value):JSON.stringify(e,lv,2):String(e),lv=(e,t)=>sv(t)?lv(e,t.value):Xr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((i,[n,r],a)=>(i[f1(n,a)+" =>"]=r,i),{})}:Cr(t)?{[`Set(${t.size})`]:[...t.values()].map(i=>f1(i))}:rn(t)?f1(t):mt(t)&&!We(t)&&!nv(t)?String(t):t,f1=(e,t="")=>{var i;return rn(e)?`Symbol(${(i=e.description)!=null?i:t})`:e};/**
|
|
6
|
+
* @vue/reactivity v3.5.44
|
|
7
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
+
* @license MIT
|
|
9
|
+
**/let si;class ov{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&si&&(si.active?(this.parent=si,this.index=(si.scopes||(si.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,i;if(this.scopes){const n=this.scopes.slice();for(t=0,i=n.length;t<i;t++)n[t].pause()}for(t=0,i=this.effects.length;t<i;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,i;if(this.scopes){const r=this.scopes.slice();for(t=0,i=r.length;t<i;t++)r[t].resume()}const n=this.effects.slice();for(t=0,i=n.length;t<i;t++)n[t].resume()}}run(t){if(this._active){const i=si;try{return si=this,t()}finally{si=i}}}on(){++this._on===1&&(this.prevScope=si,si=this)}off(){if(this._on>0&&--this._on===0){if(si===this)si=this.prevScope;else{let t=si;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let i,n;for(i=0,n=this.effects.length;i<n;i++)this.effects[i].stop();for(this.effects.length=0,i=0,n=this.cleanups.length;i<n;i++)this.cleanups[i]();if(this.cleanups.length=0,this.scopes){const r=this.scopes.slice();for(i=0,n=r.length;i<n;i++)r[i].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function hf(e){return new ov(e)}function ff(){return si}function Ko(e,t=!1){si&&si.cleanups.push(e)}let Ht;const p1=new WeakSet;class uv{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,si&&(si.active?si.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,p1.has(this)&&(p1.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||dv(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,K2(this),hv(this);const t=Ht,i=Cn;Ht=this,Cn=!0;try{return this.fn()}finally{fv(this),Ht=t,Cn=i,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)mf(t);this.deps=this.depsTail=void 0,K2(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?p1.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){hd(this)&&this.run()}get dirty(){return hd(this)}}let cv=0,Oo,Io;function dv(e,t=!1){if(e.flags|=8,t){e.next=Io,Io=e;return}e.next=Oo,Oo=e}function pf(){cv++}function _f(){if(--cv>0)return;if(Io){let t=Io;for(Io=void 0;t;){const i=t.next;t.next=void 0,t.flags&=-9,t=i}}let e;for(;Oo;){let t=Oo;for(Oo=void 0;t;){const i=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=i}}if(e)throw e}function hv(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function fv(e){let t,i=e.depsTail,n=i;for(;n;){const r=n.prevDep;n.version===-1?(n===i&&(i=r),mf(n),I5(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=i}function hd(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(pv(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function pv(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===qo)||(e.globalVersion=qo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!hd(e))))return;e.flags|=2;const t=e.dep,i=Ht,n=Cn;Ht=e,Cn=!0;try{hv(e);const r=e.fn(e._value);(t.version===0||yi(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Ht=i,Cn=n,fv(e),e.flags&=-3}}function mf(e,t=!1){const{dep:i,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),i.subs===e&&(i.subs=n,!n&&i.computed)){i.computed.flags&=-5;for(let a=i.computed.deps;a;a=a.nextDep)mf(a,!0)}!t&&!--i.sc&&i.map&&i.map.delete(i.key)}function I5(e){const{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}let Cn=!0;const _v=[];function Jn(){_v.push(Cn),Cn=!1}function Qn(){const e=_v.pop();Cn=e===void 0?!0:e}function K2(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const i=Ht;Ht=void 0;try{t()}finally{Ht=i}}}let qo=0;class R5{constructor(t,i){this.sub=t,this.dep=i,this.version=i.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class kc{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ht||!Cn||Ht===this.computed)return;let i=this.activeLink;if(i===void 0||i.sub!==Ht)i=this.activeLink=new R5(Ht,this),Ht.deps?(i.prevDep=Ht.depsTail,Ht.depsTail.nextDep=i,Ht.depsTail=i):Ht.deps=Ht.depsTail=i,mv(i);else if(i.version===-1&&(i.version=this.version,i.nextDep)){const n=i.nextDep;n.prevDep=i.prevDep,i.prevDep&&(i.prevDep.nextDep=n),i.prevDep=Ht.depsTail,i.nextDep=void 0,Ht.depsTail.nextDep=i,Ht.depsTail=i,Ht.deps===i&&(Ht.deps=n)}return i}trigger(t){this.version++,qo++,this.notify(t)}notify(t){pf();try{for(let i=this.subs;i;i=i.prevSub)i.sub.notify()&&i.sub.dep.notify()}finally{_f()}}}function mv(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)mv(n)}const i=e.dep.subs;i!==e&&(e.prevSub=i,i&&(i.nextSub=e)),e.dep.subs=e}}const xu=new WeakMap,Va=Symbol(""),fd=Symbol(""),Go=Symbol("");function Ei(e,t,i){if(Cn&&Ht){let n=xu.get(e);n||xu.set(e,n=new Map);let r=n.get(i);r||(n.set(i,r=new kc),r.map=n,r.key=i),r.track()}}function pr(e,t,i,n,r,a){const s=xu.get(e);if(!s){qo++;return}const l=o=>{o&&o.trigger()};if(pf(),t==="clear")s.forEach(l);else{const o=We(e),u=o&&bc(i);if(o&&i==="length"){const c=Number(n);s.forEach((d,h)=>{(h==="length"||h===Go||!rn(h)&&h>=c)&&l(d)})}else switch((i!==void 0||s.has(void 0))&&l(s.get(i)),u&&l(s.get(Go)),t){case"add":o?u&&l(s.get("length")):(l(s.get(Va)),Xr(e)&&l(s.get(fd)));break;case"delete":o||(l(s.get(Va)),Xr(e)&&l(s.get(fd)));break;case"set":Xr(e)&&l(s.get(Va));break}}_f()}function D5(e,t){const i=xu.get(e);return i&&i.get(t)}function qa(e){const t=lt(e);return t===e||(Ei(t,"iterate",Go),tn(e))?t:er(e)?jn(e)?t.map(i=>na(gn(i))):t.map(na):t.map(gn)}function Ac(e){return Ei(e=lt(e),"iterate",Go),e}function Bn(e,t){return er(e)?na(jn(e)?gn(t):t):gn(t)}const V5={__proto__:null,[Symbol.iterator](){return _1(this,Symbol.iterator,e=>Bn(this,e))},concat(...e){return qa(this).concat(...e.map(t=>We(t)?qa(t):t))},entries(){return _1(this,"entries",e=>(e[1]=Bn(this,e[1]),e))},every(e,t){return lr(this,"every",e,t,void 0,arguments)},filter(e,t){return lr(this,"filter",e,t,i=>i.map(n=>Bn(this,n)),arguments)},find(e,t){return lr(this,"find",e,t,i=>Bn(this,i),arguments)},findIndex(e,t){return lr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return lr(this,"findLast",e,t,i=>Bn(this,i),arguments)},findLastIndex(e,t){return lr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return lr(this,"forEach",e,t,void 0,arguments)},includes(...e){return m1(this,"includes",e)},indexOf(...e){return m1(this,"indexOf",e)},join(e){return qa(this).join(e)},lastIndexOf(...e){return m1(this,"lastIndexOf",e)},map(e,t){return lr(this,"map",e,t,void 0,arguments)},pop(){return oo(this,"pop")},push(...e){return oo(this,"push",e)},reduce(e,...t){return G2(this,"reduce",e,t)},reduceRight(e,...t){return G2(this,"reduceRight",e,t)},shift(){return oo(this,"shift")},some(e,t){return lr(this,"some",e,t,void 0,arguments)},splice(...e){return oo(this,"splice",e)},toReversed(){return qa(this).toReversed()},toSorted(e){return qa(this).toSorted(e)},toSpliced(...e){return qa(this).toSpliced(...e)},unshift(...e){return oo(this,"unshift",e)},values(){return _1(this,"values",e=>Bn(this,e))}};function _1(e,t,i){const n=Ac(e),r=n[t],a=r.call(n);if(n!==e&&!tn(e)){if(a[Symbol.toStringTag]==="Array Iterator"){const s=Object.create(Object.getPrototypeOf(a));return s.next=()=>q2(a.next(),i),r!==vv[t]&&Object.defineProperties(s,{return:{get(){const l=a.return;return typeof l=="function"?l.bind(a):l}},throw:{get(){const l=a.throw;return typeof l=="function"?l.bind(a):l}}}),s}a._next=a.next,a.next=()=>q2(a._next(),i)}return a}function q2(e,t){return e.done||(e.value=t(e.value)),e}const vv=Array.prototype;function lr(e,t,i,n,r,a){const s=Ac(e),l=s!==e&&!tn(e),o=s[t];if(o!==vv[t]){const d=o.apply(e,a);return l?gn(d):d}let u=i;s!==e&&(l?u=function(d,h){return i.call(this,Bn(e,d),h,e)}:i.length>2&&(u=function(d,h){return i.call(this,d,h,e)}));const c=o.call(s,u,n);return l&&r?r(c):c}function G2(e,t,i,n){const r=Ac(e),a=r!==e&&!tn(e);let s=i,l=!1;r!==e&&(a?(l=n.length===0,s=function(u,c,d){return l&&(l=!1,u=Bn(e,u)),i.call(this,u,Bn(e,c),d,e)}):i.length>3&&(s=function(u,c,d){return i.call(this,u,c,d,e)}));const o=r[t](s,...n);return l?Bn(e,o):o}function m1(e,t,i){const n=lt(e);Ei(n,"iterate",Go);const r=n[t](...i);return(r===-1||r===!1)&&$c(i[0])?(i[0]=lt(i[0]),n[t](...i)):r}function oo(e,t,i=[]){Jn(),pf();const n=lt(e)[t].apply(e,i);return _f(),Qn(),n}const B5=uf("__proto__,__v_isRef,__isVue"),gv=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(rn));function Z5(e){rn(e)||(e=String(e));const t=lt(this);return Ei(t,"has",e),t.hasOwnProperty(e)}class bv{constructor(t=!1,i=!1){this._isReadonly=t,this._isShallow=i}get(t,i,n){if(i==="__v_skip")return t.__v_skip;const r=this._isReadonly,a=this._isShallow;if(i==="__v_isReactive")return!r;if(i==="__v_isReadonly")return r;if(i==="__v_isShallow")return a;if(i==="__v_raw")return n===(r?a?X5:Cv:a?Sv:wv).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const s=We(t);if(!r){let o;if(s&&(o=V5[i]))return o;if(i==="hasOwnProperty")return Z5}const l=Reflect.get(t,i,It(t)?t:n);if((rn(i)?gv.has(i):B5(i))||(r||Ei(t,"get",i),a))return l;if(It(l)){const o=s&&bc(i)?l:l.value;return r&&mt(o)?ia(o):o}return mt(l)?r?ia(l):kr(l):l}}class yv extends bv{constructor(t=!1){super(!1,t)}set(t,i,n,r){let a=t[i];const s=We(t)&&bc(i);if(!this._isShallow){const u=er(a);if(!tn(n)&&!er(n)&&(a=lt(a),n=lt(n)),!s&&It(a)&&!It(n))return u||(a.value=n),!0}const l=s?Number(i)<t.length:pt(t,i),o=Reflect.set(t,i,n,It(t)?t:r);return t===lt(r)&&o&&(l?yi(n,a)&&pr(t,"set",i,n):pr(t,"add",i,n)),o}deleteProperty(t,i){const n=pt(t,i);t[i];const r=Reflect.deleteProperty(t,i);return r&&n&&pr(t,"delete",i,void 0),r}has(t,i){const n=Reflect.has(t,i);return(!rn(i)||!gv.has(i))&&Ei(t,"has",i),n}ownKeys(t){return Ei(t,"iterate",We(t)?"length":Va),Reflect.ownKeys(t)}}class F5 extends bv{constructor(t=!1){super(!0,t)}set(t,i){return!0}deleteProperty(t,i){return!0}}const z5=new yv,U5=new F5,W5=new yv(!0);const pd=e=>e,R0=e=>Reflect.getPrototypeOf(e);function j5(e,t,i){return function(...n){const r=this.__v_raw,a=lt(r),s=Xr(a),l=e==="entries"||e===Symbol.iterator&&s,o=e==="keys"&&s,u=r[e](...n),c=i?pd:t?na:gn;return!t&&Ei(a,"iterate",o?fd:Va),Zt(Object.create(u),{next(){const{value:d,done:h}=u.next();return h?{value:d,done:h}:{value:l?[c(d[0]),c(d[1])]:c(d),done:h}}})}}function D0(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function K5(e,t){const i={get(r){const a=this.__v_raw,s=lt(a),l=lt(r);e||(yi(r,l)&&Ei(s,"get",r),Ei(s,"get",l));const{has:o}=R0(s),u=t?pd:e?na:gn;if(o.call(s,r))return u(a.get(r));if(o.call(s,l))return u(a.get(l));a!==s&&a.get(r)},get size(){const r=this.__v_raw;return!e&&Ei(lt(r),"iterate",Va),r.size},has(r){const a=this.__v_raw,s=lt(a),l=lt(r);return e||(yi(r,l)&&Ei(s,"has",r),Ei(s,"has",l)),r===l?a.has(r):a.has(r)||a.has(l)},forEach(r,a){const s=this,l=s.__v_raw,o=lt(l),u=t?pd:e?na:gn;return!e&&Ei(o,"iterate",Va),l.forEach((c,d)=>r.call(a,u(c),u(d),s))}};return Zt(i,e?{add:D0("add"),set:D0("set"),delete:D0("delete"),clear:D0("clear")}:{add(r){const a=lt(this),s=R0(a),l=lt(r),o=!t&&!tn(r)&&!er(r)?l:r;return s.has.call(a,o)||yi(r,o)&&s.has.call(a,r)||yi(l,o)&&s.has.call(a,l)||(a.add(o),pr(a,"add",o,o)),this},set(r,a){!t&&!tn(a)&&!er(a)&&(a=lt(a));const s=lt(this),{has:l,get:o}=R0(s);let u=l.call(s,r);u||(r=lt(r),u=l.call(s,r));const c=o.call(s,r);return s.set(r,a),u?yi(a,c)&&pr(s,"set",r,a):pr(s,"add",r,a),this},delete(r){const a=lt(this),{has:s,get:l}=R0(a);let o=s.call(a,r);o||(r=lt(r),o=s.call(a,r)),l&&l.call(a,r);const u=a.delete(r);return o&&pr(a,"delete",r,void 0),u},clear(){const r=lt(this),a=r.size!==0,s=r.clear();return a&&pr(r,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(r=>{i[r]=j5(r,e,t)}),i}function vf(e,t){const i=K5(e,t);return(n,r,a)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_isShallow"?t:r==="__v_raw"?n:Reflect.get(pt(i,r)&&r in n?i:n,r,a)}const q5={get:vf(!1,!1)},G5={get:vf(!1,!0)},Y5={get:vf(!0,!1)};const wv=new WeakMap,Sv=new WeakMap,Cv=new WeakMap,X5=new WeakMap;function J5(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function kr(e){return er(e)?e:gf(e,!1,z5,q5,wv)}function kv(e){return gf(e,!1,W5,G5,Sv)}function ia(e){return gf(e,!0,U5,Y5,Cv)}function gf(e,t,i,n,r){if(!mt(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const a=r.get(e);if(a)return a;const s=J5(C5(e));if(s===0)return e;const l=new Proxy(e,s===2?n:i);return r.set(e,l),l}function jn(e){return er(e)?jn(e.__v_raw):!!(e&&e.__v_isReactive)}function er(e){return!!(e&&e.__v_isReadonly)}function tn(e){return!!(e&&e.__v_isShallow)}function $c(e){return e?!!e.__v_raw:!1}function lt(e){const t=e&&e.__v_raw;return t?lt(t):e}function bf(e){return!pt(e,"__v_skip")&&Object.isExtensible(e)&&rv(e,"__v_skip",!0),e}const gn=e=>mt(e)?kr(e):e,na=e=>mt(e)?ia(e):e;function It(e){return e?e.__v_isRef===!0:!1}function X(e){return Av(e,!1)}function An(e){return Av(e,!0)}function Av(e,t){return It(e)?e:new Q5(e,t)}class Q5{constructor(t,i){this.dep=new kc,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=i?t:lt(t),this._value=i?t:gn(t),this.__v_isShallow=i}get value(){return this.dep.track(),this._value}set value(t){const i=this._rawValue,n=this.__v_isShallow||tn(t)||er(t);t=n?t:lt(t),yi(t,i)&&(this._rawValue=t,this._value=n?t:gn(t),this.dep.trigger())}}function Y(e){return It(e)?e.value:e}function $v(e){return Xe(e)?e():Y(e)}const e3={get:(e,t,i)=>t==="__v_raw"?e:Y(Reflect.get(e,t,i)),set:(e,t,i,n)=>{const r=e[t];return It(r)&&!It(i)?(r.value=i,!0):Reflect.set(e,t,i,n)}};function Mv(e){return jn(e)?e:new Proxy(e,e3)}class t3{constructor(t){this.__v_isRef=!0,this._value=void 0;const i=this.dep=new kc,{get:n,set:r}=t(i.track.bind(i),i.trigger.bind(i));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function i3(e){return new t3(e)}function n3(e){const t=We(e)?new Array(e.length):{};for(const i in e)t[i]=Ev(e,i);return t}class r3{constructor(t,i,n){this._object=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=rn(i)?i:String(i),this._raw=lt(t);let r=!0,a=t;if(!We(t)||rn(this._key)||!bc(this._key))do r=!$c(a)||tn(a);while(r&&(a=a.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=Y(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&It(this._raw[this._key])){const i=this._object[this._key];if(It(i)){i.value=t;return}}this._object[this._key]=t}get dep(){return D5(this._raw,this._key)}}class a3{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Lv(e,t,i){return It(e)?e:Xe(e)?new a3(e):mt(e)&&arguments.length>1?Ev(e,t,i):X(e)}function Ev(e,t,i){return new r3(e,t,i)}class s3{constructor(t,i,n){this.fn=t,this.setter=i,this._value=void 0,this.dep=new kc(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=qo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!i,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Ht!==this)return dv(this,!0),!0}get value(){const t=this.dep.track();return pv(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function l3(e,t,i=!1){let n,r;return Xe(e)?n=e:(n=e.get,r=e.set),new s3(n,r,i)}const V0={},Tu=new WeakMap;let Ma;function o3(e,t=!1,i=Ma){if(i){let n=Tu.get(i);n||Tu.set(i,n=[]),n.push(e)}}function u3(e,t,i=dt){const{immediate:n,deep:r,once:a,scheduler:s,augmentJob:l,call:o}=i,u=y=>r?y:tn(y)||r===!1||r===0?_r(y,1):_r(y);let c,d,h,f,_=!1,m=!1;if(It(e)?(d=()=>e.value,_=tn(e)):jn(e)?(d=()=>u(e),_=!0):We(e)?(m=!0,_=e.some(y=>jn(y)||tn(y)),d=()=>e.map(y=>{if(It(y))return y.value;if(jn(y))return u(y);if(Xe(y))return o?o(y,2):y()})):Xe(e)?t?d=o?()=>o(e,2):e:d=()=>{if(h){Jn();try{h()}finally{Qn()}}const y=Ma;Ma=c;try{return o?o(e,3,[f]):e(f)}finally{Ma=y}}:d=Wn,t&&r){const y=d,A=r===!0?1/0:r;d=()=>_r(y(),A)}const g=ff(),v=()=>{c.stop(),g&&g.active&&cf(g.effects,c)};if(a&&t){const y=t;t=(...A)=>{try{return y(...A)}finally{v()}}}let w=m?new Array(e.length).fill(V0):V0;const S=y=>{if(!(!(c.flags&1)||!c.dirty&&!y))if(t){const A=c.run();if(y||r||_||(m?A.some((L,k)=>yi(L,w[k])):yi(A,w))){const L=Ma;Jn();try{h&&h(),Ma=c;const k=[A,w===V0?void 0:m&&w[0]===V0?[]:w,f];w=A,o?o(t,3,k):t(...k)}finally{Ma=L,Qn()}}}else c.run()};return l&&l(S),c=new uv(d),c.scheduler=s?()=>s(S,!1):S,f=y=>o3(y,!1,c),h=c.onStop=()=>{const y=Tu.get(c);if(y){if(o)o(y,4);else for(const A of y)A();Tu.delete(c)}},t?n?S(!0):w=c.run():s?s(S.bind(null,!0),!0):c.run(),v.pause=c.pause.bind(c),v.resume=c.resume.bind(c),v.stop=v,v}function _r(e,t=1/0,i){if(t<=0||!mt(e)||e.__v_skip||(i=i||new Map,(i.get(e)||0)>=t))return e;if(i.set(e,t),t--,It(e))_r(e.value,t,i);else if(We(e))for(let n=0;n<e.length;n++)_r(e[n],t,i);else if(Cr(e)||Xr(e))e.forEach(n=>{_r(n,t,i)});else if(nv(e)){for(const n in e)_r(e[n],t,i);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&_r(e[n],t,i)}return e}/**
|
|
10
|
+
* @vue/runtime-core v3.5.44
|
|
11
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
+
* @license MIT
|
|
13
|
+
**/function C0(e,t,i,n){try{return n?e(...n):e()}catch(r){k0(r,t,i)}}function bn(e,t,i,n){if(Xe(e)){const r=C0(e,t,i,n);return r&&tv(r)&&r.catch(a=>{k0(a,t,i)}),r}if(We(e)){const r=[];for(let a=0;a<e.length;a++)r.push(bn(e[a],t,i,n));return r}}function k0(e,t,i,n=!0){const r=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||dt;if(t){let l=t.parent;const o=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${i}`;for(;l;){const c=l.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,o,u)===!1)return}l=l.parent}if(a){Jn(),C0(a,null,10,[e,o,u]),Qn();return}}c3(e,i,r,n,s)}function c3(e,t,i,n=!0,r=!1){if(r)throw e;console.error(e)}const Vi=[];let wn=-1;const Zn=[];let Wr=null,ts=0;const xv=Promise.resolve();let Hu=null;function wt(e){const t=Hu||xv;return e?t.then(this?e.bind(this):e):t}function d3(e){let t=wn+1,i=Vi.length;for(;t<i;){const n=t+i>>>1,r=Vi[n],a=Yo(r);a<e||a===e&&r.flags&2?t=n+1:i=n}return t}function yf(e){if(!(e.flags&1)){const t=Yo(e),i=Vi[Vi.length-1];!i||!(e.flags&2)&&t>=Yo(i)?Vi.push(e):Vi.splice(d3(t),0,e),e.flags|=1,Tv()}}function Tv(){Hu||(Hu=xv.then(Pv))}function h3(e){if(!We(e))Wr&&e.id===-1?Wr.splice(ts+1,0,e):e.flags&1||(Zn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Zn.push(e[t]);Tv()}function Hv(e,t,i,n=wn+1){for(;n<Vi.length;n++){const r=Vi[n];if(r&&r.flags&2){if(e&&r.id!==e.uid||t!==void 0&&!(r.id>=t))continue;Vi.splice(n,1),n=e?n-1:wn,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Nv(e,t,i=0){if(Zn.length){let n=Zn,r=0;if(t){n=[];for(let s=0;s<Zn.length;s++){const l=Zn[s];(l.i!==void 0?!l.i||l.i.uid<i:t.has(l))?Zn[r++]=l:n.push(l)}}const a=[...new Set(n)].sort((s,l)=>Yo(s)-Yo(l));if(Zn.length=r,Wr){for(let s=0;s<a.length;s++)Wr.push(a[s]);return}for(Wr=a,ts=0;ts<Wr.length;ts++){const s=Wr[ts];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Wr=null,ts=0}}let v1=!1;function f3(e,t){if(v1){e();return}const i=t===void 0?void 0:new Set(Zn);e(),v1=!0;try{Hv(void 0,t),Nv(void 0,i,t)}finally{v1=!1}}const Yo=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Pv(e){try{for(wn=0;wn<Vi.length;wn++){const t=Vi[wn];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),C0(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;wn<Vi.length;wn++){const t=Vi[wn];t&&(t.flags&=-2)}wn=-1,Vi.length=0,Nv(),Hu=null,(Vi.length||Zn.length)&&Pv()}}let Ci=null,Ov=null;function Nu(e){const t=Ci;return Ci=e,Ov=e&&e.type.__scopeId||null,t}function I(e,t=Ci,i){if(!t||e._n)return e;const n=(...r)=>{n._d&&Du(-1);const a=Nu(t),s=Sr.length;let l;try{l=e(...r)}finally{for(let o=Sr.length;o>s;o--)Ef();Nu(a),n._d&&Du(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function ut(e,t){if(Ci===null)return e;const i=Tc(Ci),n=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[a,s,l,o=dt]=t[r];a&&(Xe(a)&&(a={mounted:a,updated:a}),a.deep&&_r(s),n.push({dir:a,instance:i,value:s,oldValue:void 0,arg:l,modifiers:o}))}return e}function ya(e,t,i,n){const r=e.dirs,a=t&&t.dirs;for(let s=0;s<r.length;s++){const l=r[s];a&&(l.oldValue=a[s].value);let o=l.dir[n];o&&(Jn(),bn(o,i,8,[e.el,l,e,t]),Qn())}}function xi(e,t){if(wi){let i=wi.provides;const n=wi.parent&&wi.parent.provides;n===i&&(i=wi.provides=Object.create(n)),i[e]=t}}function At(e,t,i=!1){const n=Jt();if(n||Ba){let r=Ba?Ba._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return i&&Xe(t)?t.call(n&&n.proxy):t}}function p3(){return!!(Jt()||Ba)}const _3=Symbol.for("v-scx"),m3=()=>At(_3);function v3(e,t){return Mc(e,null,t)}function g3(e,t){return Mc(e,null,{flush:"sync"})}function Pe(e,t,i){return Mc(e,t,i)}function Mc(e,t,i=dt){const{immediate:n,deep:r,flush:a,once:s}=i,l=Zt({},i),o=t&&n||!t&&a!=="post";let u;if(fs){if(a==="sync"){const f=m3();u=f.__watcherHandles||(f.__watcherHandles=[])}else if(!o){const f=()=>{};return f.stop=Wn,f.resume=Wn,f.pause=Wn,f}}const c=wi;l.call=(f,_,m)=>bn(f,c,_,m);let d=!1;a==="post"?l.scheduler=f=>{f.i=c,Ii(f,c&&c.suspense)}:a!=="sync"&&(d=!0,l.scheduler=(f,_)=>{_?f():yf(f)}),l.augmentJob=f=>{t&&(f.flags|=4),d&&(f.flags|=2,c&&(f.id=c.uid,f.i=c))};const h=u3(e,t,l);return fs&&(u?u.push(h):o&&h()),h}function b3(e,t,i){const n=this.proxy,r=Nt(e)?e.includes(".")?Iv(n,e):()=>n[e]:e.bind(n,n);let a;Xe(t)?a=t:(a=t.handler,i=t);const s=$0(this),l=Mc(r,a.bind(n),i);return s(),l}function Iv(e,t){const i=t.split(".");return()=>{let n=e;for(let r=0;r<i.length&&n;r++)n=n[i[r]];return n}}const Br=new WeakMap,Rv=Symbol("_vte"),Lc=e=>e.__isTeleport,Ta=e=>e&&(e.disabled||e.disabled===""),y3=e=>e&&(e.defer||e.defer===""),Y2=e=>typeof SVGElement<"u"&&e instanceof SVGElement,X2=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,_d=(e,t)=>{const i=e&&e.to;return Nt(i)?t?t(i):null:i},w3={name:"Teleport",__isTeleport:!0,process(e,t,i,n,r,a,s,l,o,u){const{mc:c,pc:d,pbc:h,o:{insert:f,querySelector:_,createText:m,createComment:g,parentNode:v}}=u,w=Ta(t.props);let{dynamicChildren:S}=t;const y=(k,V,T)=>{k.shapeFlag&16&&c(k.children,V,T,r,a,s,l,o)},A=(k=t)=>{const V=Ta(k.props),T=k.target=_d(k.props,_),J=md(T,k,m,f);T&&(s!=="svg"&&Y2(T)?s="svg":s!=="mathml"&&X2(T)&&(s="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(T),V||(y(k,T,J),Ao(k,!1)))},L=k=>{const V=()=>{if(Br.get(k)===V){if(Br.delete(k),Ta(k.props)){const T=v(k.el)||i;y(k,T,k.anchor),Ao(k,!0)}A(k)}};Br.set(k,V),Ii(V,a)};if(e==null){const k=t.el=m(""),V=t.anchor=m("");if(f(k,i,n),f(V,i,n),y3(t.props)||a&&a.pendingBranch){L(t);return}w&&(y(t,i,V),Ao(t,!0)),A()}else{t.el=e.el;const k=t.anchor=e.anchor,V=Br.get(e);if(V){V.flags|=8,Br.delete(e),L(t);return}t.targetStart=e.targetStart;const T=t.target=e.target,J=t.targetAnchor=e.targetAnchor,x=Ta(e.props),N=x?i:T,O=x?k:J;if(s==="svg"||Y2(T)?s="svg":(s==="mathml"||X2(T))&&(s="mathml"),S?(h(e.dynamicChildren,S,N,r,a,s,l),Lf(e,t,!0)):o||d(e,t,N,O,r,a,s,l,!1),w)x?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):B0(t,i,k,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const R=_d(t.props,_);R&&(t.target=R,B0(t,R,null,u,0))}else x&&B0(t,T,J,u,1);Ao(t,w)}},remove(e,t,i,{um:n,o:{remove:r}},a){const{shapeFlag:s,children:l,anchor:o,targetStart:u,targetAnchor:c,target:d,props:h}=e,f=Ta(h),_=a||!f,m=Br.get(e);if(m&&(m.flags|=8,Br.delete(e)),d&&(r(u),r(c)),a&&r(o),!m&&(f||d)&&s&16)for(let g=0;g<l.length;g++){const v=l[g];n(v,t,i,_,!!v.dynamicChildren)}},move:B0,hydrate:S3};function B0(e,t,i,{o:{insert:n},m:r},a=2){a===0&&(e.targetStart&&n(e.targetStart,t,i),n(e.targetAnchor,t,i),i=e.targetAnchor);const{el:s,anchor:l,shapeFlag:o,children:u,props:c}=e,d=a===2;if(d&&n(s,t,i),!Br.has(e)&&(!d||Ta(c))&&o&16)for(let h=0;h<u.length;h++)r(u[h],t,i,2);d&&n(l,t,i)}function S3(e,t,i,n,r,a,{o:{nextSibling:s,parentNode:l,querySelector:o,insert:u,createText:c}},d){function h(g,v){let w=v;for(;w;){if(w&&w.nodeType===8){if(w.data==="teleport start anchor")t.targetStart=w;else if(w.data==="teleport anchor"){t.targetAnchor=w,g._lpa=t.targetAnchor&&s(t.targetAnchor);break}}w=s(w)}}function f(g,v){v.anchor=d(s(g),v,l(g),i,n,r,a)}const _=t.target=_d(t.props,o),m=Ta(t.props);if(_){const g=_._lpa||_.firstChild;t.shapeFlag&16&&(m?(f(e,t),h(_,g),t.targetAnchor||md(_,t,c,u,l(e)===_?e:null)):(t.anchor=s(e),h(_,g),t.targetAnchor||md(_,t,c,u),d(g&&s(g),t,_,i,n,r,a))),Ao(t,m)}else m&&t.shapeFlag&16&&(f(e,t),t.targetStart=e,t.targetAnchor=s(e));return t.anchor&&s(t.anchor)}const $r=w3;function Ao(e,t){const i=e.ctx;if(i&&i.ut){let n,r;for(t?(n=e.el,r=e.anchor):(n=e.targetStart,r=e.targetAnchor);n&&n!==r;)n.nodeType===1&&n.setAttribute("data-v-owner",i.uid),n=n.nextSibling;i.ut()}}function md(e,t,i,n,r=null){const a=t.targetStart=i(""),s=t.targetAnchor=i("");return a[Rv]=s,e&&(n(a,e,r),n(s,e,r)),s}const hn=Symbol("_leaveCb"),uo=Symbol("_enterCb");function Dv(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return et(()=>{e.isMounted=!0}),Tt(()=>{e.isUnmounting=!0}),e}const un=[Function,Array],Vv={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:un,onEnter:un,onAfterEnter:un,onEnterCancelled:un,onBeforeLeave:un,onLeave:un,onAfterLeave:un,onLeaveCancelled:un,onBeforeAppear:un,onAppear:un,onAfterAppear:un,onAppearCancelled:un},C3={name:"BaseTransition",props:Vv,setup(e,{slots:t}){const i=Jt(),n=Dv();return()=>{const r=t.default&&wf(t.default(),!0),a=r&&r.length?Bv(r):i.subTree?P():void 0;if(!a)return;const s=lt(e),{mode:l}=s;if(n.isLeaving)return g1(a);const o=Pu(a);if(!o)return g1(a);let u=Xo(o,s,n,i,d=>u=d);o.type!==ti&&ra(o,u);let c=i.subTree&&Pu(i.subTree);if(c&&c.type!==ti&&!Ha(c,o)&&Jo(i.subTree)){let d=Xo(c,s,n,i);if(ra(c,d),l==="out-in"&&o.type!==ti)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,i.job.flags&8||i.update(),delete d.afterLeave,c=void 0},g1(a);l==="in-out"&&o.type!==ti?d.delayLeave=(h,f,_)=>{const m=Zv(n,c);m[String(c.key)]=c,h[hn]=()=>{f(),h[hn]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{_(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return a}}};function Bv(e){let t=e[0];if(e.length>1){for(const i of e)if(i.type!==ti){t=i;break}}return t}const k3=C3;function Zv(e,t){const{leavingVNodes:i}=e;let n=i.get(t.type);return n||(n=Object.create(null),i.set(t.type,n)),n}function Xo(e,t,i,n,r){const{appear:a,mode:s,persisted:l=!1,onBeforeEnter:o,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:h,onLeave:f,onAfterLeave:_,onLeaveCancelled:m,onBeforeAppear:g,onAppear:v,onAfterAppear:w,onAppearCancelled:S}=t,y=String(e.key),A=Zv(i,e),L=(T,J)=>{T&&bn(T,n,9,J)},k=(T,J)=>{const x=J[1];L(T,J),We(T)?T.every(N=>N.length<=1)&&x():T.length<=1&&x()},V={mode:s,persisted:l,beforeEnter(T){let J=o;if(!i.isMounted)if(a)J=g||o;else return;T[hn]&&T[hn](!0);const x=A[y];if(x&&Ha(e,x)){let N=x.el[hn];if(!N){const O=Jo(x);N=O&&O.el[hn]}N&&N()}L(J,[T])},enter(T){if(A[y]===e)return;let J=u,x=c,N=d;if(!i.isMounted)if(a)J=v||u,x=w||c,N=S||d;else return;let O=!1;T[uo]=j=>{O||(O=!0,j?L(N,[T]):L(x,[T]),V.delayedLeave&&V.delayedLeave(),T[uo]=void 0)};const R=T[uo].bind(null,!1);J?k(J,[T,R]):R()},leave(T,J){const x=String(e.key);if(T[uo]&&T[uo](!0),i.isUnmounting)return J();L(h,[T]);let N=!1;T[hn]=R=>{N||(N=!0,J(),R?L(m,[T]):L(_,[T]),T[hn]=void 0,A[x]===e&&delete A[x])};const O=T[hn].bind(null,!1);A[x]=e,f?k(f,[T,O]):O()},clone(T){const J=Xo(T,t,i,n,r);return r&&r(J),J}};return V}function g1(e){if(A0(e))return e=aa(e),e.children=null,e}function Pu(e){if(!A0(e))return Lc(e.type)&&e.children?Bv(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:i}=e;if(i){if(t&16)return i[0];if(t&32&&Xe(i.default))return i.default()}}function ra(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const i=e.component.subTree;ra(Lc(i.type)&&Pu(i)||i,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===$e&&We(e.children)){const i=ig(e.children,!1);i&&ra(i,t)}}function wf(e,t=!1,i){let n=[],r=0;for(let a=0;a<e.length;a++){let s=e[a];const l=i==null?s.key:String(i)+String(s.key!=null?s.key:a);s.type===$e?(s.patchFlag&128&&r++,n=n.concat(wf(s.children,t,l))):(t||s.type!==ti)&&n.push(l!=null?aa(s,{key:l}):s)}if(r>1)for(let a=0;a<n.length;a++)n[a].patchFlag=-2;return n}function Jo(e){if(e.component)return Jo(e.component.subTree);if(e.type===$e){const t=We(e.children)&&ig(e.children,!1);return t?Jo(t):void 0}if(e.type!==ti)return e}function Ne(e,t){return Xe(e)?Zt({name:e.name},t,{setup:e}):e}function an(){const e=Jt();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function Sf(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function J2(e,t){let i;return!!((i=Object.getOwnPropertyDescriptor(e,t))&&!i.configurable)}const Ou=new WeakMap;function Ro(e,t,i,n,r=!1){if(We(e)){e.forEach((m,g)=>Ro(m,t&&(We(t)?t[g]:t),i,n,r));return}if(us(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Ro(e,t,i,n.component.subTree);return}const a=n.shapeFlag&4?Tc(n.component):n.el,s=r?null:a,{i:l,r:o}=e,u=t&&t.r,c=l.refs===dt?l.refs={}:l.refs,d=l.setupState,h=lt(d),f=d===dt?ev:m=>J2(c,m)?!1:pt(h,m),_=(m,g)=>!(g&&J2(c,g));if(u!=null&&u!==o){if(Q2(t),Nt(u))c[u]=null,f(u)&&(d[u]=null);else if(It(u)){const m=t;_(u,m.k)&&(u.value=null),m.k&&(c[m.k]=null)}}if(Xe(o))C0(o,l,12,[s,c]);else{const m=Nt(o),g=It(o);if(m||g){const v=()=>{if(e.f){const w=m?f(o)?d[o]:c[o]:_()||!e.k?o.value:c[e.k];if(r)We(w)&&cf(w,a);else if(We(w))w.includes(a)||w.push(a);else if(m)c[o]=[a],f(o)&&(d[o]=c[o]);else{const S=[a];_(o,e.k)&&(o.value=S),e.k&&(c[e.k]=S)}}else m?(c[o]=s,f(o)&&(d[o]=s)):g&&(_(o,e.k)&&(o.value=s),e.k&&(c[e.k]=s))};if(s){const w=()=>{v(),Ou.delete(e)};w.id=-1,Ou.set(e,w),Ii(w,i)}else Q2(e),v()}}}function Q2(e){const t=Ou.get(e);t&&(t.flags|=8,Ou.delete(e))}const ep=e=>e.nodeType===8;Cc().requestIdleCallback;Cc().cancelIdleCallback;function A3(e,t){if(ep(e)&&e.data==="["){let i=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(ep(n))if(n.data==="]"){if(--i===0)break}else n.data==="["&&i++;n=n.nextSibling}}else t(e)}const us=e=>!!e.type.__asyncLoader;function $3(e){Xe(e)&&(e={loader:e});const{loader:t,loadingComponent:i,errorComponent:n,delay:r=200,hydrate:a,timeout:s,suspensible:l=!0,onError:o}=e;let u=null,c,d=0;const h=()=>(d++,u=null,f()),f=()=>{let _;return u||(_=u=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),o)return new Promise((g,v)=>{o(m,()=>g(h()),()=>v(m),d+1)});throw m}).then(m=>_!==u&&u?u:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),c=m,m)))};return Ne({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(_,m,g){const v=_.isConnected;let w=!1;(m.bu||(m.bu=[])).push(()=>w=!0);const S=()=>{w||!_.parentNode||v&&!_.isConnected||g()},y=a?()=>{const A=a(S,L=>A3(_,L));A&&(m.bum||(m.bum=[])).push(A)}:S;c?y():f().then(()=>!m.isUnmounted&&y())},get __asyncResolved(){return c},setup(){const _=wi;if(Sf(_),c)return()=>Z0(c,_);const m=A=>{u=null,k0(A,_,13,!n)};if(l&&_.suspense||fs)return f().then(A=>()=>Z0(A,_)).catch(A=>(m(A),()=>n?ee(n,{error:A}):null));const g=X(!1),v=X(),w=X(!!r);let S,y;return Hi(()=>{S!=null&&clearTimeout(S),y!=null&&clearTimeout(y)}),r&&(y=setTimeout(()=>{_.isUnmounted||(w.value=!1)},r)),s!=null&&(S=setTimeout(()=>{if(!_.isUnmounted&&!g.value&&!v.value){const A=new Error(`Async component timed out after ${s}ms.`);m(A),v.value=A}},s)),f().then(()=>{_.isUnmounted||(g.value=!0,_.parent&&A0(_.parent.vnode)&&_.parent.update())}).catch(A=>{if(_.isUnmounted){u=null;return}m(A),v.value=A}),()=>{if(g.value&&c)return Z0(c,_);if(v.value&&n)return ee(n,{error:v.value});if(i&&!w.value)return Z0(i,_)}}})}function Z0(e,t){const{ref:i,props:n,children:r,ce:a}=t.vnode,s=ee(e,n,r);return s.ref=i,s.ce=a,delete t.vnode.ce,s}const A0=e=>e.type.__isKeepAlive;function Fv(e,t){Uv(e,"a",t)}function zv(e,t){Uv(e,"da",t)}function Uv(e,t,i=wi){const n=e.__wdc||(e.__wdc=()=>{let r=i;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Ec(t,n,i),i){let r=i.parent;for(;r&&r.parent;)A0(r.parent.vnode)&&M3(n,t,i,r),r=r.parent}}function M3(e,t,i,n){const r=Ec(t,e,n,!0);Hi(()=>{cf(n[t],r)},i)}function Ec(e,t,i=wi,n=!1){if(i){const r=i[e]||(i[e]=[]),a=t.__weh||(t.__weh=(...s)=>{Jn();const l=$0(i),o=bn(t,i,e,s);return l(),Qn(),o});return n?r.unshift(a):r.push(a),a}}const Mr=e=>(t,i=wi)=>{(!fs||e==="sp")&&Ec(e,(...n)=>t(...n),i)},L3=Mr("bm"),et=Mr("m"),E3=Mr("bu"),Cf=Mr("u"),Tt=Mr("bum"),Hi=Mr("um"),x3=Mr("sp"),T3=Mr("rtg"),H3=Mr("rtc");function N3(e,t=wi){Ec("ec",e,t)}const kf="components",P3="directives";function Qo(e,t){return Af(kf,e,!0,t)||e}const Wv=Symbol.for("v-ndc");function mi(e){return Nt(e)?Af(kf,e,!1)||e:e||Wv}function Ln(e){return Af(P3,e)}function Af(e,t,i=!0,n=!1){const r=Ci||wi;if(r){const a=r.type;if(e===kf){const l=p7(a,!1);if(l&&(l===t||l===Ti(t)||l===wc(Ti(t))))return a}const s=tp(r[e]||a[e],t)||tp(r.appContext[e],t);return!s&&n?a:s}}function tp(e,t){return e&&(e[t]||e[Ti(t)]||e[wc(Ti(t))])}function Ue(e,t,i,n){let r;const a=i&&i[n],s=We(e);if(s||Nt(e)){const l=s&&jn(e);let o=!1,u=!1;l&&(o=!tn(e),u=er(e),e=Ac(e)),r=new Array(e.length);for(let c=0,d=e.length;c<d;c++)r[c]=t(o?u?na(gn(e[c])):gn(e[c]):e[c],c,void 0,a&&a[c])}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)r=[];else{r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,a&&a[l])}else if(mt(e))if(e[Symbol.iterator])r=Array.from(e,(l,o)=>t(l,o,void 0,a&&a[o]));else{const l=Object.keys(e);r=new Array(l.length);for(let o=0,u=l.length;o<u;o++){const c=l[o];r[o]=t(e[c],c,o,a&&a[o])}}else r=[];return i&&(i[n]=r),r}function tr(e,t){for(let i=0;i<t.length;i++){const n=t[i];if(We(n))for(let r=0;r<n.length;r++)e[n[r].name]=n[r].fn;else n&&(e[n.name]=n.key?(...r)=>{const a=n.fn(...r);return a&&(a.key=n.key),a}:n.fn)}return e}function Ae(e,t,i,n,r,a){if(i==null&&(i={}),Ci.ce||Ci.parent&&us(Ci.parent)&&Ci.parent.ce){const u=a!=null&&i.key==null?Zt({},i,{key:a}):i,c=Object.keys(u).length>0;return t!=="default"&&(u.name=t),p(),le($e,null,[ee("slot",u,n&&n())],c?-2:64)}let s=e[t];s&&s._c&&(s._d=!1);const l=Sr.length;p();let o;try{const u=s&&jv(s(i)),c=i.key||a||u&&u.key;o=le($e,{key:(c&&!rn(c)?c:`_${t}`)+(!u&&n?"_fb":"")},u||(n?n():[]),u&&e._===1?64:-2)}catch(u){for(let c=Sr.length;c>l;c--)Ef();throw u}finally{s&&s._c&&(s._d=!0)}return!r&&o.scopeId&&(o.slotScopeIds=[o.scopeId+"-s"]),o}function jv(e){return e.some(t=>hs(t)?!(t.type===ti||t.type===$e&&!jv(t.children)):!0)?e:null}const vd=e=>e?vg(e)?Tc(e):vd(e.parent):null,Do=Zt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>vd(e.parent),$root:e=>vd(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Xv(e),$forceUpdate:e=>e.f||(e.f=()=>{yf(e.update)}),$nextTick:e=>e.n||(e.n=wt.bind(e.proxy)),$watch:e=>b3.bind(e)}),b1=(e,t)=>e!==dt&&!e.__isScriptSetup&&pt(e,t),O3={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:i,setupState:n,data:r,props:a,accessCache:s,type:l,appContext:o}=e;if(t[0]!=="$"){const h=s[t];if(h!==void 0)switch(h){case 1:return n[t];case 2:return r[t];case 4:return i[t];case 3:return a[t]}else{if(b1(n,t))return s[t]=1,n[t];if(r!==dt&&pt(r,t))return s[t]=2,r[t];if(pt(a,t))return s[t]=3,a[t];if(i!==dt&&pt(i,t))return s[t]=4,i[t];gd&&(s[t]=0)}}const u=Do[t];let c,d;if(u)return t==="$attrs"&&Ei(e.attrs,"get",""),u(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(i!==dt&&pt(i,t))return s[t]=4,i[t];if(d=o.config.globalProperties,pt(d,t))return d[t]},set({_:e},t,i){const{data:n,setupState:r,ctx:a}=e;return b1(r,t)?(r[t]=i,!0):n!==dt&&pt(n,t)?(n[t]=i,!0):pt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=i,!0)},has({_:{data:e,setupState:t,accessCache:i,ctx:n,appContext:r,props:a,type:s}},l){let o;return!!(i[l]||e!==dt&&l[0]!=="$"&&pt(e,l)||b1(t,l)||pt(a,l)||pt(n,l)||pt(Do,l)||pt(r.config.globalProperties,l)||(o=s.__cssModules)&&o[l])},defineProperty(e,t,i){return i.get!=null?e._.accessCache[t]=0:pt(i,"value")&&this.set(e,t,i.value,null),Reflect.defineProperty(e,t,i)}};function vi(){return qv().slots}function Kv(){return qv().attrs}function qv(e){const t=Jt();return t.setupContext||(t.setupContext=bg(t))}function Iu(e){return We(e)?e.reduce((t,i)=>(t[i]=null,t),{}):e}function Gv(e,t){return!e||!t?e||t:We(e)&&We(t)?e.concat(t):Zt({},Iu(e),Iu(t))}let gd=!0;function I3(e){const t=Xv(e),i=e.proxy,n=e.ctx;gd=!1,t.beforeCreate&&ip(t.beforeCreate,e,"bc");const{data:r,computed:a,methods:s,watch:l,provide:o,inject:u,created:c,beforeMount:d,mounted:h,beforeUpdate:f,updated:_,activated:m,deactivated:g,beforeDestroy:v,beforeUnmount:w,destroyed:S,unmounted:y,render:A,renderTracked:L,renderTriggered:k,errorCaptured:V,serverPrefetch:T,expose:J,inheritAttrs:x,components:N,directives:O,filters:R}=t;if(u&&R3(u,n,null),s)for(const ae in s){const q=s[ae];Xe(q)&&(n[ae]=q.bind(i))}if(r){const ae=r.call(i,i);mt(ae)&&(e.data=kr(ae))}if(gd=!0,a)for(const ae in a){const q=a[ae],se=Xe(q)?q.bind(i,i):Xe(q.get)?q.get.bind(i,i):Wn,me=!Xe(q)&&Xe(q.set)?q.set.bind(i):Wn,U=H({get:se,set:me});Object.defineProperty(n,ae,{enumerable:!0,configurable:!0,get:()=>U.value,set:ve=>U.value=ve})}if(l)for(const ae in l)Yv(l[ae],n,i,ae);if(o){const ae=Xe(o)?o.call(i):o;Reflect.ownKeys(ae).forEach(q=>{xi(q,ae[q])})}c&&ip(c,e,"c");function G(ae,q){We(q)?q.forEach(se=>ae(se.bind(i))):q&&ae(q.bind(i))}if(G(L3,d),G(et,h),G(E3,f),G(Cf,_),G(Fv,m),G(zv,g),G(N3,V),G(H3,L),G(T3,k),G(Tt,w),G(Hi,y),G(x3,T),We(J))if(J.length){const ae=e.exposed||(e.exposed={});J.forEach(q=>{Object.defineProperty(ae,q,{get:()=>i[q],set:se=>i[q]=se,enumerable:!0})})}else e.exposed||(e.exposed={});A&&e.render===Wn&&(e.render=A),x!=null&&(e.inheritAttrs=x),N&&(e.components=N),O&&(e.directives=O),T&&Sf(e)}function R3(e,t,i=Wn){We(e)&&(e=bd(e));for(const n in e){const r=e[n];let a;mt(r)?"default"in r?a=At(r.from||n,r.default,!0):a=At(r.from||n):a=At(r),It(a)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>a.value,set:s=>a.value=s}):t[n]=a}}function ip(e,t,i){bn(We(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,i)}function Yv(e,t,i,n){let r=n.includes(".")?Iv(i,n):()=>i[n];if(Nt(e)){const a=t[e];Xe(a)&&Pe(r,a)}else if(Xe(e))Pe(r,e.bind(i));else if(mt(e))if(We(e))e.forEach(a=>Yv(a,t,i,n));else{const a=Xe(e.handler)?e.handler.bind(i):t[e.handler];Xe(a)&&Pe(r,a,e)}}function Xv(e){const t=e.type,{mixins:i,extends:n}=t,{mixins:r,optionsCache:a,config:{optionMergeStrategies:s}}=e.appContext,l=a.get(t);let o;return l?o=l:!r.length&&!i&&!n?o=t:(o={},r.length&&r.forEach(u=>Ru(o,u,s,!0)),Ru(o,t,s)),mt(t)&&a.set(t,o),o}function Ru(e,t,i,n=!1){const{mixins:r,extends:a}=t;a&&Ru(e,a,i,!0),r&&r.forEach(s=>Ru(e,s,i,!0));for(const s in t)if(!(n&&s==="expose")){const l=D3[s]||i&&i[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const D3={data:np,props:rp,emits:rp,methods:$o,computed:$o,beforeCreate:Pi,created:Pi,beforeMount:Pi,mounted:Pi,beforeUpdate:Pi,updated:Pi,beforeDestroy:Pi,beforeUnmount:Pi,destroyed:Pi,unmounted:Pi,activated:Pi,deactivated:Pi,errorCaptured:Pi,serverPrefetch:Pi,components:$o,directives:$o,watch:B3,provide:np,inject:V3};function np(e,t){return t?e?function(){return Zt(Xe(e)?e.call(this,this):e,Xe(t)?t.call(this,this):t)}:t:e}function V3(e,t){return $o(bd(e),bd(t))}function bd(e){if(We(e)){const t={};for(let i=0;i<e.length;i++)t[e[i]]=e[i];return t}return e}function Pi(e,t){return e?[...new Set([].concat(e,t))]:t}function $o(e,t){return e?Zt(Object.create(null),e,t):t}function rp(e,t){return e?We(e)&&We(t)?[...new Set([...e,...t])]:Zt(Object.create(null),Iu(e),Iu(t??{})):t}function B3(e,t){if(!e)return t;if(!t)return e;const i=Zt(Object.create(null),e);for(const n in t)i[n]=Pi(e[n],t[n]);return i}function Jv(){return{app:null,config:{isNativeTag:ev,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Z3=0;function F3(e,t){return function(n,r=null){Xe(n)||(n=Zt({},n)),r!=null&&!mt(r)&&(r=null);const a=Jv(),s=new WeakSet,l=[];let o=!1;const u=a.app={_uid:Z3++,_component:n,_props:r,_container:null,_context:a,_instance:null,version:m7,get config(){return a.config},set config(c){},use(c,...d){return s.has(c)||(c&&Xe(c.install)?(s.add(c),c.install(u,...d)):Xe(c)&&(s.add(c),c(u,...d))),u},mixin(c){return a.mixins.includes(c)||a.mixins.push(c),u},component(c,d){return d?(a.components[c]=d,u):a.components[c]},directive(c,d){return d?(a.directives[c]=d,u):a.directives[c]},mount(c,d,h){if(!o){const f=u._ceVNode||ee(n,r);return f.appContext=a,h===!0?h="svg":h===!1&&(h=void 0),e(f,c,h),o=!0,u._container=c,c.__vue_app__=u,Tc(f.component)}},onUnmount(c){l.push(c)},unmount(){o&&(bn(l,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return a.provides[c]=d,u},runWithContext(c){const d=Ba;Ba=u;try{return c()}finally{Ba=d}}};return u}}let Ba=null;function Qv(e,t,i=dt){const n=Jt(),r=Ti(t),a=Ar(t),s=eg(e,r),l=i3((o,u)=>{let c,d=dt,h;return g3(()=>{const f=e[r];yi(c,f)&&(c=f,u())}),{get(){return o(),i.get?i.get(c):c},set(f){const _=i.set?i.set(f):f;if(!yi(_,c)&&!(d!==dt&&yi(f,d)))return;const m=n.vnode.props,g=!!(m&&(t in m||r in m||a in m)&&(`onUpdate:${t}`in m||`onUpdate:${r}`in m||`onUpdate:${a}`in m));g||(c=f,u()),n.emit(`update:${t}`,_),yi(f,d)&&(yi(f,_)&&!yi(_,h)||g&&d!==dt&&!yi(_,c))&&u(),d=f,h=_}}});return l[Symbol.iterator]=()=>{let o=0;return{next(){return o<2?{value:o++?s||dt:l,done:!1}:{done:!0}}}},l}const eg=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ti(t)}Modifiers`]||e[`${Ar(t)}Modifiers`];function z3(e,t,...i){if(e.isUnmounted)return;const n=e.vnode.props||dt;let r=i;const a=t.startsWith("update:"),s=a&&eg(n,t.slice(7));s&&(s.trim&&(r=i.map(c=>Nt(c)?c.trim():c)),s.number&&(r=r.map(Sc)));let l,o=n[l=h1(t)]||n[l=h1(Ti(t))];!o&&a&&(o=n[l=h1(Ar(t))]),o&&bn(o,e,6,r);const u=n[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,bn(u,e,6,r)}}const U3=new WeakMap;function tg(e,t,i=!1){const n=i?U3:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const a=e.emits;let s={},l=!1;if(!Xe(e)){const o=u=>{const c=tg(u,t,!0);c&&(l=!0,Zt(s,c))};!i&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return!a&&!l?(mt(e)&&n.set(e,null),null):(We(a)?a.forEach(o=>s[o]=null):Zt(s,a),mt(e)&&n.set(e,s),s)}function xc(e,t){return!e||!vc(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),pt(e,t[0].toLowerCase()+t.slice(1))||pt(e,Ar(t))||pt(e,t))}function ap(e){const{type:t,vnode:i,proxy:n,withProxy:r,propsOptions:[a],slots:s,attrs:l,emit:o,render:u,renderCache:c,props:d,data:h,setupState:f,ctx:_,inheritAttrs:m}=e,g=Nu(e);let v,w;try{if(i.shapeFlag&4){const y=r||n,A=y;v=Fn(u.call(A,y,c,d,f,h,_)),w=l}else{const y=t;v=Fn(y.length>1?y(d,{attrs:l,slots:s,emit:o}):y(d,null)),w=t.props?l:W3(l)}}catch(y){Sr.length=0,k0(y,e,1),v=ee(ti)}let S=v;if(w&&m!==!1){const y=Object.keys(w),{shapeFlag:A}=S;y.length&&A&7&&(a&&y.some(gc)&&(w=j3(w,a)),S=aa(S,w,!1,!0))}if(i.dirs&&(S=aa(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(i.dirs):i.dirs),i.transition){const y=Lc(S.type)&&Pu(S)||S;ra(y,i.transition)}return v=S,Nu(g),v}function ig(e,t=!0){let i;for(let n=0;n<e.length;n++){const r=e[n];if(hs(r)){if(r.type!==ti||r.children==="v-if"){if(i)return;i=r}}else return}return i}const W3=e=>{let t;for(const i in e)(i==="class"||i==="style"||vc(i))&&((t||(t={}))[i]=e[i]);return t},j3=(e,t)=>{const i={};for(const n in e)(!gc(n)||!(n.slice(9)in t))&&(i[n]=e[n]);return i};function K3(e,t,i){const{props:n,children:r,component:a}=e,{props:s,children:l,patchFlag:o}=t,u=a.emitsOptions;if(t.dirs||t.transition)return!0;if(i&&o>=0){if(o&1024)return!0;if(o&16)return n?sp(n,s,u):!!s;if(o&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const h=c[d];if(ng(s,n,h)&&!xc(u,h))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:n===s?!1:n?s?sp(n,s,u):!0:!!s;return!1}function sp(e,t,i){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let r=0;r<n.length;r++){const a=n[r];if(!pt(e,a)||ng(t,e,a)&&!xc(i,a))return!0}return!1}function ng(e,t,i){const n=e[i],r=t[i];return i==="style"&&mt(n)&&mt(r)?!kn(n,r):n!==r}function q3({vnode:e,parent:t,suspense:i},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=n,e=r),r===e)(e=t.vnode).el=n,t=t.parent;else break}i&&i.activeBranch===e&&(i.vnode.el=n)}const rg={},ag=()=>Object.create(rg),sg=e=>Object.getPrototypeOf(e)===rg;function G3(e,t,i,n=!1){const r={},a=ag();e.propsDefaults=Object.create(null),lg(e,t,r,a);for(const s in e.propsOptions[0])s in r||(r[s]=void 0);i?e.props=n?r:kv(r):e.type.props?e.props=r:e.props=a,e.attrs=a}function Y3(e,t,i,n){const{props:r,attrs:a,vnode:{patchFlag:s}}=e,l=lt(r),[o]=e.propsOptions;let u=!1;if((n||s>0)&&!(s&16)){if(s&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let h=c[d];if(xc(e.emitsOptions,h))continue;const f=t[h];if(o)if(pt(a,h))f!==a[h]&&(a[h]=f,u=!0);else{const _=Ti(h);r[_]=yd(o,l,_,f,e,!1)}else f!==a[h]&&(a[h]=f,u=!0)}}}else{lg(e,t,r,a)&&(u=!0);let c;for(const d in l)(!t||!pt(t,d)&&((c=Ar(d))===d||!pt(t,c)))&&(o?i&&(i[d]!==void 0||i[c]!==void 0)&&(r[d]=yd(o,l,d,void 0,e,!0)):delete r[d]);if(a!==l)for(const d in a)(!t||!pt(t,d))&&(delete a[d],u=!0)}u&&pr(e.attrs,"set","")}function lg(e,t,i,n){const[r,a]=e.propsOptions;let s=!1,l;if(t)for(let o in t){if(Po(o))continue;const u=t[o];let c;r&&pt(r,c=Ti(o))?!a||!a.includes(c)?i[c]=u:(l||(l={}))[c]=u:xc(e.emitsOptions,o)||(!(o in n)||u!==n[o])&&(n[o]=u,s=!0)}if(a){const o=lt(i),u=l||dt;for(let c=0;c<a.length;c++){const d=a[c];i[d]=yd(r,o,d,u[d],e,!pt(u,d))}}return s}function yd(e,t,i,n,r,a){const s=e[i];if(s!=null){const l=pt(s,"default");if(l&&n===void 0){const o=s.default;if(s.type!==Function&&!s.skipFactory&&Xe(o)){const{propsDefaults:u}=r;if(i in u)n=u[i];else{const c=$0(r);n=u[i]=o.call(null,t),c()}}else n=o;r.ce&&r.ce._setProp(i,n)}s[0]&&(a&&!l?n=!1:s[1]&&(n===""||n===Ar(i))&&(n=!0))}return n}const X3=new WeakMap;function og(e,t,i=!1){const n=i?X3:t.propsCache,r=n.get(e);if(r)return r;const a=e.props,s={},l=[];let o=!1;if(!Xe(e)){const c=d=>{o=!0;const[h,f]=og(d,t,!0);Zt(s,h),f&&l.push(...f)};!i&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!a&&!o)return mt(e)&&n.set(e,Na),Na;if(We(a))for(let c=0;c<a.length;c++){const d=Ti(a[c]);lp(d)&&(s[d]=dt)}else if(a)for(const c in a){const d=Ti(c);if(lp(d)){const h=a[c],f=s[d]=We(h)||Xe(h)?{type:h}:Zt({},h),_=f.type;let m=!1,g=!0;if(We(_))for(let v=0;v<_.length;++v){const w=_[v],S=Xe(w)&&w.name;if(S==="Boolean"){m=!0;break}else S==="String"&&(g=!1)}else m=Xe(_)&&_.name==="Boolean";f[0]=m,f[1]=g,(m||pt(f,"default"))&&l.push(d)}}const u=[s,l];return mt(e)&&n.set(e,u),u}function lp(e){return e[0]!=="$"&&!Po(e)}const $f=e=>e==="_"||e==="_ctx"||e==="$stable",Mf=e=>We(e)?e.map(Fn):[Fn(e)],J3=(e,t,i)=>{if(t._n)return t;const n=I((...r)=>Mf(t(...r)),i);return n._c=!1,n},ug=(e,t,i)=>{const n=e._ctx;for(const r in e){if($f(r))continue;const a=e[r];if(Xe(a))t[r]=J3(r,a,n);else if(a!=null){const s=Mf(a);t[r]=()=>s}}},cg=(e,t)=>{const i=Mf(t);e.slots.default=()=>i},dg=(e,t,i)=>{for(const n in t)(i||!$f(n))&&(e[n]=t[n])},Q3=(e,t,i)=>{const n=e.slots=ag();if(e.vnode.shapeFlag&32){const r=t._;r?(dg(n,t,i),i&&rv(n,"_",r,!0)):ug(t,n)}else t&&cg(e,t)},e7=(e,t,i)=>{const{vnode:n,slots:r}=e;let a=!0,s=dt;if(n.shapeFlag&32){const l=t._;l?i&&l===1?a=!1:dg(r,t,i):(a=!t.$stable,ug(t,r)),s=t}else t&&(cg(e,t),s={default:1});if(a)for(const l in r)!$f(l)&&s[l]==null&&delete r[l]},Ii=a7;function t7(e){return i7(e)}function i7(e,t){const i=Cc();i.__VUE__=!0;const{insert:n,remove:r,patchProp:a,createElement:s,createText:l,createComment:o,setText:u,setElementText:c,parentNode:d,nextSibling:h,setScopeId:f=Wn,insertStaticContent:_}=e,m=(E,F,ie,fe=null,ne=null,Z=null,re=void 0,b=null,C=!!F.dynamicChildren)=>{if(E===F)return;E&&!Ha(E,F)&&(fe=W(E),ve(E,ne,Z,!0),E=null),F.patchFlag===-2&&(C=!1,F.dynamicChildren=null),F.dynamicChildren&&E&&E.dynamicChildren&&E.dynamicChildren.hasOnce&&(F.dynamicChildren===Na&&(F.dynamicChildren=[]),F.dynamicChildren.hasOnce=!0);const{type:B,ref:de,shapeFlag:z}=F;switch(B){case Lr:g(E,F,ie,fe);break;case ti:v(E,F,ie,fe);break;case w1:E==null&&w(F,ie,fe,re);break;case $e:N(E,F,ie,fe,ne,Z,re,b,C);break;default:z&1?A(E,F,ie,fe,ne,Z,re,b,C):z&6?O(E,F,ie,fe,ne,Z,re,b,C):(z&64||z&128)&&B.process(E,F,ie,fe,ne,Z,re,b,C,te)}de!=null&&ne?Ro(de,E&&E.ref,Z,F||E,!F):de==null&&E&&E.ref!=null&&Ro(E.ref,null,Z,E,!0)},g=(E,F,ie,fe)=>{if(E==null)n(F.el=l(F.children),ie,fe);else{const ne=F.el=E.el;F.children!==E.children&&u(ne,F.children)}},v=(E,F,ie,fe)=>{E==null?n(F.el=o(F.children||""),ie,fe):F.el=E.el},w=(E,F,ie,fe)=>{[E.el,E.anchor]=_(E.children,F,ie,fe,E.el,E.anchor)},S=({el:E,anchor:F},ie,fe)=>{let ne;for(;E&&E!==F;)ne=h(E),n(E,ie,fe),E=ne;n(F,ie,fe)},y=({el:E,anchor:F})=>{let ie;for(;E&&E!==F;)ie=h(E),r(E),E=ie;r(F)},A=(E,F,ie,fe,ne,Z,re,b,C)=>{if(F.type==="svg"?re="svg":F.type==="math"&&(re="mathml"),E==null)L(F,ie,fe,ne,Z,re,b,C);else{const B=E.el&&E.el._isVueCE?E.el:null;try{B&&B._beginPatch(),T(E,F,ne,Z,re,b,C)}finally{B&&B._endPatch()}}},L=(E,F,ie,fe,ne,Z,re,b)=>{let C,B;const{props:de,shapeFlag:z,transition:Q,dirs:D}=E;if(C=E.el=s(E.type,Z,de&&de.is,de),z&8?c(C,E.children):z&16&&V(E.children,C,null,fe,ne,y1(E,Z),re,b),D&&ya(E,null,fe,"created"),k(C,E,E.scopeId,re,fe),de){for(const ye in de)ye!=="value"&&!Po(ye)&&a(C,ye,null,de[ye],Z,fe);"value"in de&&a(C,"value",null,de.value,Z),(B=de.onVnodeBeforeMount)&&xn(B,fe,E)}D&&ya(E,null,fe,"beforeMount");const oe=n7(ne,Q);oe&&Q.beforeEnter(C),n(C,F,ie),((B=de&&de.onVnodeMounted)||oe||D)&&Ii(()=>{try{B&&xn(B,fe,E),oe&&Q.enter(C),D&&ya(E,null,fe,"mounted")}finally{}},ne)},k=(E,F,ie,fe,ne)=>{if(ie&&f(E,ie),fe)for(let Z=0;Z<fe.length;Z++)f(E,fe[Z]);if(ne){let Z=ne.subTree;if(F===Z||fg(Z.type)&&(Z.ssContent===F||Z.ssFallback===F)){const re=ne.vnode;k(E,re,re.scopeId,re.slotScopeIds,ne.parent)}}},V=(E,F,ie,fe,ne,Z,re,b,C=0)=>{for(let B=C;B<E.length;B++){const de=E[B]=b?fr(E[B]):Fn(E[B]);m(null,de,F,ie,fe,ne,Z,re,b)}},T=(E,F,ie,fe,ne,Z,re)=>{const b=F.el=E.el;let{patchFlag:C,dynamicChildren:B,dirs:de}=F;C|=E.patchFlag&16;const z=E.props||dt,Q=F.props||dt;let D;if(ie&&wa(ie,!1),(D=Q.onVnodeBeforeUpdate)&&xn(D,ie,F,E),de&&ya(F,E,ie,"beforeUpdate"),ie&&wa(ie,!0),B&&(!E.dynamicChildren||E.dynamicChildren.length!==B.length)&&(C=0,re=!1,B=null),(z.innerHTML&&Q.innerHTML==null||z.textContent&&Q.textContent==null)&&c(b,""),B?J(E.dynamicChildren,B,b,ie,fe,y1(F,ne),Z):re||q(E,F,b,null,ie,fe,y1(F,ne),Z,!1),C>0){if(C&16)x(b,z,Q,ie,ne);else if(C&2&&z.class!==Q.class&&a(b,"class",null,Q.class,ne),C&4&&a(b,"style",z.style,Q.style,ne),C&8){const oe=F.dynamicProps;for(let ye=0;ye<oe.length;ye++){const xe=oe[ye],we=z[xe],Re=Q[xe];(Re!==we||xe==="value")&&a(b,xe,we,Re,ne,ie)}}C&1&&E.children!==F.children&&c(b,F.children)}else!re&&B==null&&x(b,z,Q,ie,ne);((D=Q.onVnodeUpdated)||de)&&Ii(()=>{D&&xn(D,ie,F,E),de&&ya(F,E,ie,"updated")},fe)},J=(E,F,ie,fe,ne,Z,re)=>{for(let b=0;b<F.length;b++){const C=E[b],B=F[b],de=C.el||wd(C),z=de&&(C.type===$e||!Ha(C,B)||C.shapeFlag&198)?d(de):ie;m(C,B,z,null,fe,ne,Z,re,!0)}},x=(E,F,ie,fe,ne)=>{if(F!==ie){if(F!==dt)for(const Z in F)!Po(Z)&&!(Z in ie)&&a(E,Z,F[Z],null,ne,fe);for(const Z in ie){if(Po(Z))continue;const re=ie[Z],b=F[Z];re!==b&&Z!=="value"&&a(E,Z,b,re,ne,fe)}"value"in ie&&a(E,"value",F.value,ie.value,ne)}},N=(E,F,ie,fe,ne,Z,re,b,C)=>{const B=F.el=E?E.el:l(""),de=F.anchor=E?E.anchor:l("");let{patchFlag:z,dynamicChildren:Q,slotScopeIds:D}=F;D&&(b=b?b.concat(D):D),E==null?(n(B,ie,fe),n(de,ie,fe),V(F.children||[],ie,de,ne,Z,re,b,C)):z>0&&z&64&&Q&&E.dynamicChildren&&E.dynamicChildren.length===Q.length?(J(E.dynamicChildren,Q,ie,ne,Z,re,b),(F.key!=null||ne&&F===ne.subTree)&&Lf(E,F,!0)):q(E,F,ie,de,ne,Z,re,b,C)},O=(E,F,ie,fe,ne,Z,re,b,C)=>{F.slotScopeIds=b,E==null?F.shapeFlag&512?ne.ctx.activate(F,ie,fe,re,C):R(F,ie,fe,ne,Z,re,C):j(E,F,C)},R=(E,F,ie,fe,ne,Z,re)=>{const b=E.component=c7(E,fe,ne);if(A0(E)&&(b.ctx.renderer=te),d7(b,!1,re),b.asyncDep){if(ne&&ne.registerDep(b,G,re,Z),!E.el){const C=b.subTree=ee(ti);v(null,C,F,ie),E.placeholder=C.el}}else G(b,E,F,ie,ne,Z,re)},j=(E,F,ie)=>{const fe=F.component=E.component;if(K3(E,F,ie))if(fe.asyncDep&&!fe.asyncResolved){F.el=E.el,F.placeholder=E.placeholder,ae(fe,F,ie);return}else fe.next=F,fe.update();else F.el=E.el,F.placeholder=E.placeholder,fe.vnode=F},G=(E,F,ie,fe,ne,Z,re)=>{const b=()=>{if(E.isMounted){let{next:z,bu:Q,u:D,parent:oe,vnode:ye}=E;{const Ct=hg(E);if(Ct){z&&(z.el=ye.el,ae(E,z,re)),Ct.asyncDep.then(()=>{Ii(()=>{E.isUnmounted||B()},ne)});return}}let xe=z,we;wa(E,!1),z?(z.el=ye.el,ae(E,z,re)):z=ye,Q&&_u(Q),(we=z.props&&z.props.onVnodeBeforeUpdate)&&xn(we,oe,z,ye),wa(E,!0);const Re=ap(E),Ge=E.subTree;E.subTree=Re,m(Ge,Re,d(Ge.el),W(Ge),E,ne,Z),z.el=Re.el,xe===null&&q3(E,Re.el),D&&Ii(D,ne),(we=z.props&&z.props.onVnodeUpdated)&&Ii(()=>xn(we,oe,z,ye),ne)}else{let z;const{el:Q,props:D}=F,{bm:oe,m:ye,parent:xe,root:we,type:Re}=E,Ge=us(F);wa(E,!1),oe&&_u(oe),!Ge&&(z=D&&D.onVnodeBeforeMount)&&xn(z,xe,F),wa(E,!0);{we.ce&&we.ce._hasShadowRoot()&&we.ce._injectChildStyle(Re,E.parent?E.parent.type:void 0);const Ct=E.subTree=ap(E);m(null,Ct,ie,fe,E,ne,Z),F.el=Ct.el}if(ye&&Ii(ye,ne),!Ge&&(z=D&&D.onVnodeMounted)){const Ct=F;Ii(()=>xn(z,xe,Ct),ne)}(F.shapeFlag&256||xe&&us(xe.vnode)&&xe.vnode.shapeFlag&256)&&E.a&&Ii(E.a,ne),E.isMounted=!0,F=ie=fe=null}};E.scope.on();const C=E.effect=new uv(b);E.scope.off();const B=E.update=C.run.bind(C),de=E.job=C.runIfDirty.bind(C);de.i=E,de.id=E.uid,C.scheduler=()=>yf(de),wa(E,!0),B()},ae=(E,F,ie)=>{F.component=E;const fe=E.vnode.props;E.vnode=F,E.next=null,Y3(E,F.props,fe,ie),e7(E,F.children,ie),Jn(),Hv(E),Qn()},q=(E,F,ie,fe,ne,Z,re,b,C=!1)=>{const B=E&&E.children,de=E?E.shapeFlag:0,z=F.children,{patchFlag:Q,shapeFlag:D}=F;if(Q>0){if(Q&128){me(B,z,ie,fe,ne,Z,re,b,C);return}else if(Q&256){se(B,z,ie,fe,ne,Z,re,b,C);return}}D&8?(de&16&&pe(B,ne,Z),z!==B&&c(ie,z)):de&16?D&16?me(B,z,ie,fe,ne,Z,re,b,C):pe(B,ne,Z,!0):(de&8&&c(ie,""),D&16&&V(z,ie,fe,ne,Z,re,b,C))},se=(E,F,ie,fe,ne,Z,re,b,C)=>{E=E||Na,F=F||Na;const B=E.length,de=F.length,z=Math.min(B,de);let Q;for(Q=0;Q<z;Q++){const D=F[Q]=C?fr(F[Q]):Fn(F[Q]);m(E[Q],D,ie,null,ne,Z,re,b,C)}B>de?pe(E,ne,Z,!0,!1,z):V(F,ie,fe,ne,Z,re,b,C,z)},me=(E,F,ie,fe,ne,Z,re,b,C)=>{let B=0;const de=F.length;let z=E.length-1,Q=de-1;for(;B<=z&&B<=Q;){const D=E[B],oe=F[B]=C?fr(F[B]):Fn(F[B]);if(Ha(D,oe))m(D,oe,ie,null,ne,Z,re,b,C);else break;B++}for(;B<=z&&B<=Q;){const D=E[z],oe=F[Q]=C?fr(F[Q]):Fn(F[Q]);if(Ha(D,oe))m(D,oe,ie,null,ne,Z,re,b,C);else break;z--,Q--}if(B>z){if(B<=Q){const D=Q+1,oe=D<de?F[D].el:fe;for(;B<=Q;)m(null,F[B]=C?fr(F[B]):Fn(F[B]),ie,oe,ne,Z,re,b,C),B++}}else if(B>Q)for(;B<=z;)ve(E[B],ne,Z,!0),B++;else{const D=B,oe=B,ye=new Map;for(B=oe;B<=Q;B++){const rt=F[B]=C?fr(F[B]):Fn(F[B]);rt.key!=null&&ye.set(rt.key,B)}let xe,we=0;const Re=Q-oe+1;let Ge=!1,Ct=0;const qt=new Array(Re);for(B=0;B<Re;B++)qt[B]=0;for(B=D;B<=z;B++){const rt=E[B];if(we>=Re){ve(rt,ne,Z,!0);continue}let Se;if(rt.key!=null)Se=ye.get(rt.key);else for(xe=oe;xe<=Q;xe++)if(qt[xe-oe]===0&&Ha(rt,F[xe])){Se=xe;break}Se===void 0?ve(rt,ne,Z,!0):(qt[Se-oe]=B+1,Se>=Ct?Ct=Se:Ge=!0,m(rt,F[Se],ie,null,ne,Z,re,b,C),we++)}const Dt=Ge?r7(qt):Na;for(xe=Dt.length-1,B=Re-1;B>=0;B--){const rt=oe+B,Se=F[rt],Ie=F[rt+1],Ze=rt+1<de?Ie.el||wd(Ie):fe;qt[B]===0?m(null,Se,ie,Ze,ne,Z,re,b,C):Ge&&(xe<0||B!==Dt[xe]?U(Se,ie,Ze,2):xe--)}}},U=(E,F,ie,fe,ne=null)=>{const{el:Z,type:re,transition:b,children:C,shapeFlag:B}=E;if(B&6){U(E.component.subTree,F,ie,fe);return}if(B&128){E.suspense.move(F,ie,fe);return}if(B&64){re.move(E,F,ie,te);return}if(re===$e){n(Z,F,ie);for(let z=0;z<C.length;z++)U(C[z],F,ie,fe);n(E.anchor,F,ie);return}if(re===w1){S(E,F,ie);return}if(fe!==2&&B&1&&b)if(fe===0)b.persisted&&!Z[hn]?n(Z,F,ie):(b.beforeEnter(Z),n(Z,F,ie),Ii(()=>b.enter(Z),ne));else{const{leave:z,delayLeave:Q,afterLeave:D}=b,oe=()=>{E.ctx.isUnmounted?r(Z):n(Z,F,ie)},ye=()=>{const xe=Z._isLeaving||!!Z[hn];Z._isLeaving&&Z[hn](!0),b.persisted&&!xe?oe():z(Z,()=>{oe(),D&&D()})};Q?Q(Z,oe,ye):ye()}else n(Z,F,ie)},ve=(E,F,ie,fe=!1,ne=!1)=>{const{type:Z,props:re,ref:b,children:C,dynamicChildren:B,shapeFlag:de,patchFlag:z,dirs:Q,cacheIndex:D,memo:oe}=E;if((z===-2||B&&B.hasOnce)&&(ne=!1),b!=null&&(Jn(),Ro(b,null,ie,E,!0),Qn()),D!=null&&(!E.ctx||E.ctx===F)&&(F.renderCache[D]=void 0),de&256){F.ctx.deactivate(E);return}const ye=de&1&&Q,xe=!us(E);let we;if(xe&&(we=re&&re.onVnodeBeforeUnmount)&&xn(we,F,E),de&6)ue(E.component,ie,fe);else{if(de&128){E.suspense.unmount(ie,fe);return}ye&&ya(E,null,F,"beforeUnmount"),de&64?E.type.remove(E,F,ie,te,fe):B&&!B.hasOnce&&(Z!==$e||z>0&&z&64)?pe(B,F,ie,!1,!0):(Z===$e&&z&384||!ne&&de&16)&&pe(C,F,ie),fe&&ce(E)}const Re=oe!=null&&D==null;(xe&&(we=re&&re.onVnodeUnmounted)||ye||Re)&&Ii(()=>{we&&xn(we,F,E),ye&&ya(E,null,F,"unmounted"),Re&&(E.el=null)},ie)},ce=E=>{const{type:F,el:ie,anchor:fe,transition:ne}=E,Z=F===$e;if(Z&&!ne){ge(ie,fe);return}if(F===w1){y(E),ne&&!ne.persisted&&ne.afterLeave&&ne.afterLeave();return}const re=Z?Jo(E):E,b=()=>{Z?d(ie)&&ge(ie,fe):r(ie),ne&&!ne.persisted&&ne.afterLeave&&ne.afterLeave()};if(re&&re.shapeFlag&1&&ne&&!ne.persisted){const{leave:C,delayLeave:B}=ne,de=re.el,z=()=>C(de,b);B?B(de,b,z):z()}else b()},ge=(E,F)=>{let ie;for(;E!==F;)ie=h(E),r(E),E=ie;r(F)},ue=(E,F,ie)=>{const{bum:fe,scope:ne,job:Z,subTree:re,um:b,m:C,a:B}=E;op(C),op(B),fe&&_u(fe),ne.stop(),Z?(Z.flags|=8,ve(re,E,F,ie)):E.vnode.el&&re&&(re.transition=E.vnode.transition,ve(re,E,F,ie)),b&&Ii(b,F),Ii(()=>{E.isUnmounted=!0},F)},pe=(E,F,ie,fe=!1,ne=!1,Z=0)=>{for(let re=Z;re<E.length;re++)ve(E[re],F,ie,fe,ne)},W=E=>{if(E.shapeFlag&6)return W(E.component.subTree);if(E.shapeFlag&128)return E.suspense.next();const F=h(E.anchor||E.el),ie=F&&F[Rv];return ie?h(ie):F},he=(E,F,ie)=>{const fe=E&&F._vnode?void 0:E&&E.component?E.component.uid:u7();f3(()=>{E==null?F._vnode&&ve(F._vnode,null,null,!0):m(F._vnode||null,E,F,null,null,null,ie),F._vnode=E},fe)},te={p:m,um:ve,m:U,r:ce,mt:R,mc:V,pc:q,pbc:J,n:W,o:e};return{render:he,hydrate:void 0,createApp:F3(he)}}function y1({type:e,props:t},i){return i==="svg"&&e==="foreignObject"||i==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:i}function wa({effect:e,job:t},i){i?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function n7(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Lf(e,t,i=!1){const n=e.children,r=t.children;if(We(n)&&We(r))for(let a=0;a<n.length;a++){const s=n[a];let l=r[a];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[a]=fr(r[a]),l.el=s.el),!i&&l.patchFlag!==-2&&Lf(s,l)),l.type===Lr&&(l.patchFlag===-1&&(l=r[a]=fr(l)),l.el=s.el),l.type===ti&&!l.el&&(l.el=s.el)}}function r7(e){const t=e.slice(),i=[0];let n,r,a,s,l;const o=e.length;for(n=0;n<o;n++){const u=e[n];if(u!==0){if(r=i[i.length-1],e[r]<u){t[n]=r,i.push(n);continue}for(a=0,s=i.length-1;a<s;)l=a+s>>1,e[i[l]]<u?a=l+1:s=l;u<e[i[a]]&&(a>0&&(t[n]=i[a-1]),i[a]=n)}}for(a=i.length,s=i[a-1];a-- >0;)i[a]=s,s=t[s];return i}function hg(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:hg(t)}function op(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function wd(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?wd(t.subTree):null}const fg=e=>e.__isSuspense;function a7(e,t){t&&t.pendingBranch?We(e)?t.effects.push(...e):t.effects.push(e):h3(e)}const $e=Symbol.for("v-fgt"),Lr=Symbol.for("v-txt"),ti=Symbol.for("v-cmt"),w1=Symbol.for("v-stc"),Sr=[];let Ji=null;function p(e=!1){Sr.push(Ji=e?null:[])}function Ef(){Sr.pop(),Ji=Sr[Sr.length-1]||null}let e0=1;function Du(e,t=!1){e0+=e,e<0&&Ji&&t&&(Ji.hasOnce=!0)}function pg(e){return e.dynamicChildren=e0>0?Ji||Na:null,Ef(),e0>0&&Ji&&Ji.push(e),e}function $(e,t,i,n,r,a){return pg(M(e,t,i,n,r,a,!0))}function le(e,t,i,n,r){return pg(ee(e,t,i,n,r,!0))}function hs(e){return e?e.__v_isVNode===!0:!1}function Ha(e,t){return e.type===t.type&&e.key===t.key}const _g=({key:e})=>e??null,mu=({ref:e,ref_key:t,ref_for:i})=>(typeof e=="number"&&(e=""+e),e!=null?Nt(e)||It(e)||Xe(e)?{i:Ci,r:e,k:t,f:!!i}:e:null);function M(e,t=null,i=null,n=0,r=null,a=e===$e?0:1,s=!1,l=!1){const o={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&_g(t),ref:t&&mu(t),scopeId:Ov,slotScopeIds:null,children:i,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ci};return l?(Vu(o,i),a&128&&e.normalize(o)):i&&(o.shapeFlag|=Nt(i)?8:16),e0>0&&!s&&Ji&&(o.patchFlag>0||a&6)&&o.patchFlag!==32&&Ji.push(o),o}const ee=s7;function s7(e,t=null,i=null,n=0,r=null,a=!1){if((!e||e===Wv)&&(e=ti),hs(e)){const l=aa(e,t,!0);return i&&Vu(l,i),e0>0&&!a&&Ji&&(l.shapeFlag&6?Ji[Ji.indexOf(e)]=l:Ji.push(l)),l.patchFlag=-2,l}if(_7(e)&&(e=e.__vccOpts),t){t=l7(t);let{class:l,style:o}=t;l&&!Nt(l)&&(t.class=Te(l)),mt(o)&&($c(o)&&!We(o)&&(o=Zt({},o)),t.style=ft(o))}const s=Nt(e)?1:fg(e)?128:Lc(e)?64:mt(e)?4:Xe(e)?2:0;return M(e,t,i,n,r,s,a,!0)}function l7(e){return e?$c(e)||sg(e)?Zt({},e):e:null}function aa(e,t,i=!1,n=!1){const{props:r,ref:a,patchFlag:s,children:l,transition:o}=e,u=t?yt(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&_g(u),ref:t&&t.ref?i&&a?We(a)?a.concat(mu(t)):[a,mu(t)]:mu(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==$e?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:o,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&aa(e.ssContent),ssFallback:e.ssFallback&&aa(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return o&&n&&ra(c,o.clone(c)),c}function _e(e=" ",t=0){return ee(Lr,null,e,t)}function P(e="",t=!1){return t?(p(),le(ti,null,e)):ee(ti,null,e)}function Fn(e){return e==null||typeof e=="boolean"?ee(ti):We(e)?ee($e,null,e.slice()):hs(e)?fr(e):ee(Lr,null,String(e))}function fr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:aa(e)}function Vu(e,t){let i=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(We(t))i=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),Vu(e,r()),r._c&&(r._d=!0));return}else{i=32;const r=t._;!r&&!sg(t)?t._ctx=Ci:r===3&&Ci&&(Ci.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Xe(t)){if(n&65){Vu(e,{default:t});return}t={default:t,_ctx:Ci},i=32}else t=String(t),n&64?(i=16,t=[_e(t)]):i=8;e.children=t,e.shapeFlag|=i}function yt(...e){const t={};for(let i=0;i<e.length;i++){const n=e[i];for(const r in n)if(r==="class")t.class!==n.class&&(t.class=Te([t.class,n.class]));else if(r==="style")t.style=ft([t.style,n.style]);else if(vc(r)){const a=t[r],s=n[r];s&&a!==s&&!(We(a)&&a.includes(s))?t[r]=a?[].concat(a,s):s:s==null&&a==null&&!gc(r)&&(t[r]=s)}else r!==""&&(t[r]=n[r])}return t}function xn(e,t,i,n=null){bn(e,t,7,[i,n])}const o7=Jv();let mg=0;function u7(){return mg}function c7(e,t,i){const n=e.type,r=(t?t.appContext:e.appContext)||o7,a={uid:mg++,vnode:e,type:n,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ov(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:og(n,r),emitsOptions:tg(n,r),emit:null,emitted:null,propsDefaults:dt,inheritAttrs:n.inheritAttrs,ctx:dt,data:dt,props:dt,attrs:dt,slots:dt,refs:dt,setupState:dt,setupContext:null,suspense:i,suspenseId:i?i.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=z3.bind(null,a),e.ce&&e.ce(a),a}let wi=null;const Jt=()=>wi||Ci;let Bu,t0;{const e=Cc(),t=(i,n)=>{let r;return(r=e[i])||(r=e[i]=[]),r.push(n),a=>{r.length>1?r.forEach(s=>s(a)):r[0](a)}};Bu=t("__VUE_INSTANCE_SETTERS__",i=>wi=i),t0=t("__VUE_SSR_SETTERS__",i=>fs=i)}const $0=e=>{const t=wi;return Bu(e),e.scope.on(),()=>{e.scope.off(),Bu(t)}},up=()=>{wi&&wi.scope.off(),Bu(null)};function vg(e){return e.vnode.shapeFlag&4}let fs=!1;function d7(e,t=!1,i=!1){t&&t0(t);const{props:n,children:r}=e.vnode,a=vg(e);G3(e,n,a,t),Q3(e,r,i||t);const s=a?h7(e,t):void 0;return t&&t0(!1),s}function h7(e,t){const i=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,O3);const{setup:n}=i;if(n){Jn();const r=e.setupContext=n.length>1?bg(e):null,a=$0(e),s=C0(n,e,0,[e.props,r]),l=tv(s);if(Qn(),a(),(l||e.sp)&&!us(e)&&Sf(e),l){if(s.then(up,up),t)return s.then(o=>{t0(!0);try{cp(e,o,t)}finally{t0(!1)}}).catch(o=>{k0(o,e,0)});e.asyncDep=s}else cp(e,s)}else gg(e)}function cp(e,t,i){Xe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:mt(t)&&(e.setupState=Mv(t)),gg(e)}function gg(e,t,i){const n=e.type;e.render||(e.render=n.render||Wn);{const r=$0(e);Jn();try{I3(e)}finally{Qn(),r()}}}const f7={get(e,t){return Ei(e,"get",""),e[t]}};function bg(e){const t=i=>{e.exposed=i||{}};return{attrs:new Proxy(e.attrs,f7),slots:e.slots,emit:e.emit,expose:t}}function Tc(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Mv(bf(e.exposed)),{get(t,i){if(i in t)return t[i];if(i in Do)return Do[i](e)},has(t,i){return i in t||i in Do}})):e.proxy}function p7(e,t=!0){return Xe(e)?e.displayName||e.name:e.name||t&&e.__name}function _7(e){return Xe(e)&&"__vccOpts"in e}const H=(e,t)=>l3(e,t,fs);function He(e,t,i){try{Du(-1);const n=arguments.length;return n===2?mt(t)&&!We(t)?hs(t)?ee(e,null,[t]):ee(e,t):ee(e,null,t):(n>3?i=Array.prototype.slice.call(arguments,2):n===3&&hs(i)&&(i=[i]),ee(e,t,i))}finally{Du(1)}}const m7="3.5.44";/**
|
|
14
|
+
* @vue/runtime-dom v3.5.44
|
|
15
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
+
* @license MIT
|
|
17
|
+
**/let Sd;const dp=typeof window<"u"&&window.trustedTypes;if(dp)try{Sd=dp.createPolicy("vue",{createHTML:e=>e})}catch{}const yg=Sd?e=>Sd.createHTML(e):e=>e,v7="http://www.w3.org/2000/svg",g7="http://www.w3.org/1998/Math/MathML",hr=typeof document<"u"?document:null,hp=hr&&hr.createElement("template"),b7={insert:(e,t,i)=>{t.insertBefore(e,i||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,i,n)=>{const r=t==="svg"?hr.createElementNS(v7,e):t==="mathml"?hr.createElementNS(g7,e):i?hr.createElement(e,{is:i}):hr.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>hr.createTextNode(e),createComment:e=>hr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>hr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,i,n,r,a){const s=i?i.previousSibling:t.lastChild;if(r&&(r===a||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),i),!(r===a||!(r=r.nextSibling)););else{hp.innerHTML=yg(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=hp.content;if(n==="svg"||n==="mathml"){const o=l.firstChild;for(;o.firstChild;)l.appendChild(o.firstChild);l.removeChild(o)}t.insertBefore(l,i)}return[s?s.nextSibling:t.firstChild,i?i.previousSibling:t.lastChild]}},Or="transition",co="animation",ps=Symbol("_vtc"),wg={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Sg=Zt({},Vv,wg),y7=e=>(e.displayName="Transition",e.props=Sg,e),sa=y7((e,{slots:t})=>He(k3,Cg(e),t)),Sa=(e,t=[])=>{We(e)?e.forEach(i=>i(...t)):e&&e(...t)},fp=e=>e?We(e)?e.some(t=>t.length>1):e.length>1:!1;function Cg(e){const t={};for(const N in e)N in wg||(t[N]=e[N]);if(e.css===!1)return t;const{name:i="v",type:n,duration:r,enterFromClass:a=`${i}-enter-from`,enterActiveClass:s=`${i}-enter-active`,enterToClass:l=`${i}-enter-to`,appearFromClass:o=a,appearActiveClass:u=s,appearToClass:c=l,leaveFromClass:d=`${i}-leave-from`,leaveActiveClass:h=`${i}-leave-active`,leaveToClass:f=`${i}-leave-to`}=e,_=w7(r),m=_&&_[0],g=_&&_[1],{onBeforeEnter:v,onEnter:w,onEnterCancelled:S,onLeave:y,onLeaveCancelled:A,onBeforeAppear:L=v,onAppear:k=w,onAppearCancelled:V=S}=t,T=(N,O,R,j)=>{N._enterCancelled=j,Zr(N,O?c:l),Zr(N,O?u:s),R&&R()},J=(N,O)=>{N._isLeaving=!1,Zr(N,d),Zr(N,f),Zr(N,h),O&&O()},x=N=>(O,R)=>{const j=N?k:w,G=()=>T(O,N,R);Sa(j,[O,G]),pp(()=>{Zr(O,N?o:a),Rn(O,N?c:l),fp(j)||_p(O,n,m,G)})};return Zt(t,{onBeforeEnter(N){Sa(v,[N]),Rn(N,a),Rn(N,s)},onBeforeAppear(N){Sa(L,[N]),Rn(N,o),Rn(N,u)},onEnter:x(!1),onAppear:x(!0),onLeave(N,O){N._isLeaving=!0;const R=()=>J(N,O);Rn(N,d),N._enterCancelled?(Rn(N,h),Cd(N)):(Cd(N),Rn(N,h)),pp(()=>{N._isLeaving&&(Zr(N,d),Rn(N,f),fp(y)||_p(N,n,g,R))}),Sa(y,[N,R])},onEnterCancelled(N){T(N,!1,void 0,!0),Sa(S,[N])},onAppearCancelled(N){T(N,!0,void 0,!0),Sa(V,[N])},onLeaveCancelled(N){J(N),Sa(A,[N])}})}function w7(e){if(e==null)return null;if(mt(e))return[S1(e.enter),S1(e.leave)];{const t=S1(e);return[t,t]}}function S1(e){return $5(e)}function Rn(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.add(i)),(e[ps]||(e[ps]=new Set)).add(t)}function Zr(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const i=e[ps];i&&(i.delete(t),i.size||(e[ps]=void 0))}function pp(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let S7=0;function _p(e,t,i,n){const r=e._endId=++S7,a=()=>{r===e._endId&&n()};if(i!=null)return setTimeout(a,i);const{type:s,timeout:l,propCount:o}=kg(e,t);if(!s)return n();const u=s+"end";let c=0;const d=()=>{e.removeEventListener(u,h),a()},h=f=>{f.target===e&&++c>=o&&d()};setTimeout(()=>{c<o&&d()},l+1),e.addEventListener(u,h)}function kg(e,t){const i=window.getComputedStyle(e),n=_=>(i[_]||"").split(", "),r=n(`${Or}Delay`),a=n(`${Or}Duration`),s=mp(r,a),l=n(`${co}Delay`),o=n(`${co}Duration`),u=mp(l,o);let c=null,d=0,h=0;t===Or?s>0&&(c=Or,d=s,h=a.length):t===co?u>0&&(c=co,d=u,h=o.length):(d=Math.max(s,u),c=d>0?s>u?Or:co:null,h=c?c===Or?a.length:o.length:0);const f=c===Or&&/\b(?:transform|all)(?:,|$)/.test(n(`${Or}Property`).toString());return{type:c,timeout:d,propCount:h,hasTransform:f}}function mp(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((i,n)=>vp(i)+vp(e[n])))}function vp(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Cd(e){return(e?e.ownerDocument:document).body.offsetHeight}function C7(e,t,i){const n=e[ps];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):i?e.setAttribute("class",t):e.className=t}const Zu=Symbol("_vod"),xf=Symbol("_vsh"),Tf={name:"show",beforeMount(e,{value:t},{transition:i}){e[Zu]=e.style.display==="none"?"":e.style.display,i&&t?i.beforeEnter(e):ho(e,t)},mounted(e,{value:t},{transition:i}){i&&t&&i.enter(e)},updated(e,{value:t,oldValue:i},{transition:n}){!t!=!i&&(n?t?(n.beforeEnter(e),ho(e,!0),n.enter(e)):n.leave(e,()=>{ho(e,!1)}):ho(e,t))},beforeUnmount(e,{value:t}){ho(e,t)}};function ho(e,t){e.style.display=t?e[Zu]:"none",e[xf]=!t}const k7=Symbol(""),A7=/(?:^|;)\s*display\s*:/;function $7(e,t,i){const n=e.style,r=Nt(i);let a=!1;if(i&&!r){if(t)if(Nt(t))for(const s of t.split(";")){const l=s.slice(0,s.indexOf(":")).trim();i[l]==null&&Mo(n,l,"")}else for(const s in t)i[s]==null&&Mo(n,s,"");for(const s in i){s==="display"&&(a=!0);const l=i[s];l!=null?L7(e,s,!Nt(t)&&t?t[s]:void 0,l)||Mo(n,s,l):Mo(n,s,"")}}else if(r){if(t!==i){const s=n[k7];s&&(i+=";"+s),n.cssText=i,a=A7.test(i)}}else t&&e.removeAttribute("style");Zu in e&&((!r||t!==i)&&(e[Zu]=a?n.display:""),e[xf]&&(n.display="none"))}const F0=/\s*!important$/;function Mo(e,t,i){if(We(i))i.forEach(n=>Mo(e,t,n));else if(i==null&&(i=""),t.startsWith("--"))F0.test(i)?e.setProperty(t,i.replace(F0,""),"important"):e.setProperty(t,i);else{const n=M7(e,t);F0.test(i)?e.setProperty(Ar(n),i.replace(F0,""),"important"):e[n]=i}}const gp=["Webkit","Moz","ms"],C1={};function M7(e,t){const i=C1[t];if(i)return i;let n=Ti(t);if(n!=="filter"&&n in e)return C1[t]=n;n=wc(n);for(let r=0;r<gp.length;r++){const a=gp[r]+n;if(a in e)return C1[t]=a}return t}function L7(e,t,i,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Nt(n)&&i===n}const bp="http://www.w3.org/1999/xlink";function yp(e,t,i,n,r,a=N5(t)){n&&t.startsWith("xlink:")?i==null?e.removeAttributeNS(bp,t.slice(6,t.length)):e.setAttributeNS(bp,t,i):i==null||a&&!av(i)?e.removeAttribute(t):e.setAttribute(t,a?"":rn(i)?String(i):i)}function wp(e,t,i,n,r){if(t==="innerHTML"||t==="textContent"){i!=null&&(e[t]=t==="innerHTML"?yg(i):i);return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const l=a==="OPTION"?e.getAttribute("value")||"":e.value,o=i==null?e.type==="checkbox"?"on":"":String(i);(l!==o||!("_value"in e))&&(e.value=o),i==null&&e.removeAttribute(t),e._value=i;return}let s=!1;if(i===""||i==null){const l=typeof e[t];l==="boolean"?i=av(i):i==null&&l==="string"?(i="",s=!0):l==="number"&&(i=0,s=!0)}try{e[t]=i}catch{}s&&e.removeAttribute(r||t)}function mr(e,t,i,n){e.addEventListener(t,i,n)}function E7(e,t,i,n){e.removeEventListener(t,i,n)}const Sp=Symbol("_vei");function x7(e,t,i,n,r=null){const a=e[Sp]||(e[Sp]={}),s=a[t];if(n&&s)s.value=n;else{const[l,o]=N7(t);if(n){const u=a[t]=I7(n,r);mr(e,l,u,o)}else s&&(E7(e,l,s,o),a[t]=void 0)}}const T7=/(Once|Passive|Capture)$/,H7=/^on:?(?:Once|Passive|Capture)$/;function N7(e){let t,i;for(;(i=e.match(T7))&&!H7.test(e);)t||(t={}),e=e.slice(0,e.length-i[1].length),t[i[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Ar(e.slice(2)),t]}let k1=0;const P7=Promise.resolve(),O7=()=>k1||(P7.then(()=>k1=0),k1=Date.now());function I7(e,t){const i=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=i.attached)return;const r=i.value;if(We(r)){const a=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{a.call(n),n._stopped=!0};const s=r.slice(),l=[n];for(let o=0;o<s.length&&!n._stopped;o++){const u=s[o];u&&bn(u,t,5,l)}}else bn(r,t,5,[n])};return i.value=e,i.attached=O7(),i}const Cp=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,R7=(e,t,i,n,r,a)=>{const s=r==="svg";t==="class"?C7(e,n,s):t==="style"?$7(e,i,n):vc(t)?gc(t)||x7(e,t,i,n,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):D7(e,t,n,s))?(wp(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&yp(e,t,n,s,a,t!=="value")):e._isVueCE&&(V7(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Nt(n)))?wp(e,Ti(t),n,a,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),yp(e,t,n,s))};function D7(e,t,i,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Cp(t)&&Xe(i));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Cp(t)&&Nt(i)?!1:t in e}function V7(e,t){const i=e._def.props;if(!i)return!1;const n=Ti(t);return Array.isArray(i)?i.some(r=>Ti(r)===n):Object.keys(i).some(r=>Ti(r)===n)}const Ag=new WeakMap,$g=new WeakMap,Fu=Symbol("_moveCb"),kp=Symbol("_enterCb"),kd=new WeakMap,B7=e=>(delete e.props.mode,e),Z7=B7({name:"TransitionGroup",props:Zt({},Sg,{tag:String,moveClass:String}),setup(e,{slots:t}){const i=Jt(),n=Dv();let r,a,s,l;const o=()=>(l===void 0&&(l=r.length>0&&G7(r[0].el,i.vnode.el,Ap(e))),l);return Cf(()=>{if(kd.delete(i),!o()){r=[],s=void 0;return}const u=Ap(e);r.forEach(z7);const c=s&&q7(s,i.vnode.el);s=void 0,r.forEach(h=>U7(h,c));const d=r.filter(W7);Cd(i.vnode.el),d.forEach(h=>{const f=h.el,_=f.style;Rn(f,u),_.transform=_.webkitTransform=_.transitionDuration="";const m=f[Fu]=g=>{g&&g.target!==f||(!g||g.propertyName.endsWith("transform"))&&(f.removeEventListener("transitionend",m),f[Fu]=null,Zr(f,u))};f.addEventListener("transitionend",m)}),r=[]}),()=>{const u=lt(e),c=Cg(u);let d=u.tag||$e;if(r=[],l=void 0,a)for(let h=0;h<a.length;h++){const f=a[h];f.el&&f.el instanceof Element&&!f.el[xf]&&(r.push(f),ra(f,Xo(f,c,n,i)),Ag.set(f,Hc(f.el)))}a=t.default?wf(t.default()):[];for(let h=0;h<a.length;h++){const f=a[h];f.key!=null&&ra(f,Xo(f,c,n,i))}return r.length&&(s=j7(i),kd.set(i,o)),ee(d,null,a)}}}),F7=Z7;function z7(e){const t=e.el;t[Fu]&&t[Fu](),t[kp]&&t[kp]()}function Ap(e){return e.moveClass||`${e.name||"v"}-move`}function U7(e,t){$g.set(e,Hc(e.el,t))}function W7(e){const t=Ag.get(e),i=$g.get(e),n=t.left-i.left,r=t.top-i.top;if(n||r){const a=e.el,s=a.style,l=a.getBoundingClientRect();let o=1,u=1;return a.offsetWidth&&(o=l.width/a.offsetWidth),a.offsetHeight&&(u=l.height/a.offsetHeight),(!Number.isFinite(o)||o===0)&&(o=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(o-1)<.01&&(o=1),Math.abs(u-1)<.01&&(u=1),s.transform=s.webkitTransform=`translate(${n/o}px,${r/u}px)`,s.transitionDuration="0s",e}}function Hc(e,t){const i=e.getBoundingClientRect();return{left:i.left-(t?t.left:0),top:i.top-(t?t.top:0)}}function j7(e){let t;for(let i=e.parent;i;i=i.parent){const n=kd.get(i);if(n){const r=K7(i.vnode.el,e.vnode.el);r&&(t||(t=[])).push(Zt(Hc(r),{item:r,willMove:n}))}}return t}function K7(e,t){const i=e.nodeType===1?e:e.parentNode;for(;t&&t.parentNode!==i;)t=t.parentNode;if(t&&t.nodeType===1)return t}function q7(e,t){const i=e.find(n=>n.willMove()&&n.item.contains(t));return i&&Hc(i.item,i)}function G7(e,t,i){const n=e.cloneNode(),r=e[ps];r&&r.forEach(l=>{l.split(/\s+/).forEach(o=>o&&n.classList.remove(o))}),i.split(/\s+/).forEach(l=>l&&n.classList.add(l)),n.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(n);const{hasTransform:s}=kg(n);return a.removeChild(n),s}const la=e=>{const t=e.props["onUpdate:modelValue"]||!1;return We(t)?i=>_u(t,i):t};function Y7(e){e.target.composing=!0}function $p(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Qi=Symbol("_assign"),z0=Symbol("_initialValue");function A1(e,t,i){return t&&(e=e.trim()),i&&(e=Sc(e)),e}const i0={created(e,{modifiers:{lazy:t,trim:i,number:n}},r){e.parentNode&&(e.type==="text"?e[z0]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[z0]=e.defaultValue.replace(/\r\n?/g,`
|
|
18
|
+
`))),e[Qi]=la(r);const a=n||r.props&&r.props.type==="number";mr(e,t?"change":"input",s=>{s.target.composing||e[Qi](A1(e.value,i,a))}),(i||a)&&mr(e,"change",()=>{e.value=A1(e.value,i,a)}),t||(mr(e,"compositionstart",Y7),mr(e,"compositionend",$p),mr(e,"change",$p))},mounted(e,{value:t,modifiers:{trim:i,number:n}}){const r=t??"",a=e[z0];delete e[z0],a!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==a?e[Qi](A1(e.value,i,n)):e.value=r},beforeUpdate(e,{value:t,oldValue:i,modifiers:{lazy:n,trim:r,number:a}},s){if(e[Qi]=la(s),e.composing)return;const l=(a||e.type==="number")&&!/^0\d/.test(e.value)?Sc(e.value):e.value,o=t??"";if(l===o)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(n&&t===i||r&&e.value.trim()===o)||(e.value=o)}},Mg={deep:!0,created(e,t,i){e[Qi]=la(i),mr(e,"change",()=>{const n=e._modelValue,r=_s(e),a=e.checked,s=e[Qi];if(We(n)){const l=df(n,r),o=l!==-1;if(a&&!o)s(n.concat(r));else if(!a&&o){const u=[...n];u.splice(l,1),s(u)}}else if(Cr(n)){const l=new Set(n);a?l.add(r):l.delete(r),s(l)}else s(Lg(e,a))})},mounted:Mp,beforeUpdate(e,t,i){e[Qi]=la(i),Mp(e,t,i)}};function Mp(e,{value:t,oldValue:i},n){e._modelValue=t;let r;if(We(t))r=df(t,n.props.value)>-1;else if(Cr(t))r=t.has(n.props.value);else{if(t===i)return;r=kn(t,Lg(e,!0))}e.checked!==r&&(e.checked=r)}const X7={created(e,{value:t},i){e.checked=kn(t,i.props.value),e[Qi]=la(i),mr(e,"change",()=>{e[Qi](_s(e))})},beforeUpdate(e,{value:t,oldValue:i},n){e[Qi]=la(n),t!==i&&(e.checked=kn(t,n.props.value))}},J7={deep:!0,created(e,{value:t,modifiers:{number:i}},n){e._modelValue=t,mr(e,"change",()=>{const r=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>i?Sc(_s(o)):_s(o)),a=e.multiple,s=a?Cr(e._modelValue)?new Set(r):r:r[0],l=e._pendingValue=[a,a?We(s)?r.slice():r:s];try{e[Qi](s)}finally{wt(()=>{e._pendingValue===l&&(e._pendingValue=void 0)})}}),e[Qi]=la(n)},mounted(e,{value:t}){Lp(e,t)},beforeUpdate(e,{value:t},i){e._modelValue=t,e[Qi]=la(i)},updated(e,{value:t}){const i=e._pendingValue;e._pendingValue=void 0,(!i||i[0]!==e.multiple||!Q7(t,i[1],i[0]))&&Lp(e,t)}};function Q7(e,t,i){if(!i||We(e))return kn(e,t);if(Cr(e)){if(e.size!==t.length)return!1;for(const n of t)if(!e.has(n))return!1;return!0}return!1}function Lp(e,t){const i=e.multiple,n=We(t);if(!(i&&!n&&!Cr(t))){for(let r=0,a=e.options.length;r<a;r++){const s=e.options[r],l=_s(s);if(i)if(n){const o=typeof l;o==="string"||o==="number"?s.selected=t.some(u=>String(u)===String(l)):s.selected=df(t,l)>-1}else s.selected=t.has(l);else if(kn(_s(s),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!i&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function _s(e){return"_value"in e?e._value:e.value}function Lg(e,t){const i=t?"_trueValue":"_falseValue";return i in e?e[i]:t}const Ep={created(e,t,i){U0(e,t,i,null,"created")},mounted(e,t,i){U0(e,t,i,null,"mounted")},beforeUpdate(e,t,i,n){U0(e,t,i,n,"beforeUpdate")},updated(e,t,i,n){U0(e,t,i,n,"updated")}};function ew(e,t){switch(e){case"SELECT":return J7;case"TEXTAREA":return i0;default:switch(t){case"checkbox":return Mg;case"radio":return X7;default:return i0}}}function U0(e,t,i,n,r){const s=ew(e.tagName,i.props&&i.props.type)[r];s&&s(e,t,i,n)}const tw=["ctrl","shift","alt","meta"],iw={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>tw.some(i=>e[`${i}Key`]&&!t.includes(i))},Qe=(e,t)=>{if(!e)return e;const i=e._withMods||(e._withMods={}),n=t.join(".");return i[n]||(i[n]=(r,...a)=>{for(let s=0;s<t.length;s++){const l=iw[t[s]];if(l&&l(r,t))return}return e(r,...a)})},nw={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Bi=(e,t)=>{const i=e._withKeys||(e._withKeys={}),n=t.join(".");return i[n]||(i[n]=r=>{if(!("key"in r))return;const a=Ar(r.key);if(t.some(s=>s===a||nw[s]===a))return e(r)})},rw=Zt({patchProp:R7},b7);let xp;function aw(){return xp||(xp=t7(rw))}const Eg=(...e)=>{const t=aw().createApp(...e),{mount:i}=t;return t.mount=n=>{const r=lw(n);if(!r)return;const a=t._component;!Xe(a)&&!a.render&&!a.template&&(a.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const s=i(r,!1,sw(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),s},t};function sw(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function lw(e){return Nt(e)?document.querySelector(e):e}/*!
|
|
19
|
+
* pinia v2.3.1
|
|
20
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
21
|
+
* @license MIT
|
|
22
|
+
*/let xg;const Nc=e=>xg=e,Tg=Symbol();function Ad(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Vo;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Vo||(Vo={}));function ow(){const e=hf(!0),t=e.run(()=>X({}));let i=[],n=[];const r=bf({install(a){Nc(r),r._a=a,a.provide(Tg,r),a.config.globalProperties.$pinia=r,n.forEach(s=>i.push(s)),n=[]},use(a){return this._a?i.push(a):n.push(a),this},_p:i,_a:null,_e:e,_s:new Map,state:t});return r}const Hg=()=>{};function Tp(e,t,i,n=Hg){e.push(t);const r=()=>{const a=e.indexOf(t);a>-1&&(e.splice(a,1),n())};return!i&&ff()&&Ko(r),r}function Ga(e,...t){e.slice().forEach(i=>{i(...t)})}const uw=e=>e(),Hp=Symbol(),$1=Symbol();function $d(e,t){e instanceof Map&&t instanceof Map?t.forEach((i,n)=>e.set(n,i)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const i in t){if(!t.hasOwnProperty(i))continue;const n=t[i],r=e[i];Ad(r)&&Ad(n)&&e.hasOwnProperty(i)&&!It(n)&&!jn(n)?e[i]=$d(r,n):e[i]=n}return e}const cw=Symbol();function dw(e){return!Ad(e)||!e.hasOwnProperty(cw)}const{assign:Fr}=Object;function hw(e){return!!(It(e)&&e.effect)}function fw(e,t,i,n){const{state:r,actions:a,getters:s}=t,l=i.state.value[e];let o;function u(){l||(i.state.value[e]=r?r():{});const c=n3(i.state.value[e]);return Fr(c,a,Object.keys(s||{}).reduce((d,h)=>(d[h]=bf(H(()=>{Nc(i);const f=i._s.get(e);return s[h].call(f,f)})),d),{}))}return o=Ng(e,u,t,i,n,!0),o}function Ng(e,t,i={},n,r,a){let s;const l=Fr({actions:{}},i),o={deep:!0};let u,c,d=[],h=[],f;const _=n.state.value[e];!a&&!_&&(n.state.value[e]={});let m;function g(V){let T;u=c=!1,typeof V=="function"?(V(n.state.value[e]),T={type:Vo.patchFunction,storeId:e,events:f}):($d(n.state.value[e],V),T={type:Vo.patchObject,payload:V,storeId:e,events:f});const J=m=Symbol();wt().then(()=>{m===J&&(u=!0)}),c=!0,Ga(d,T,n.state.value[e])}const v=a?function(){const{state:T}=i,J=T?T():{};this.$patch(x=>{Fr(x,J)})}:Hg;function w(){s.stop(),d=[],h=[],n._s.delete(e)}const S=(V,T="")=>{if(Hp in V)return V[$1]=T,V;const J=function(){Nc(n);const x=Array.from(arguments),N=[],O=[];function R(ae){N.push(ae)}function j(ae){O.push(ae)}Ga(h,{args:x,name:J[$1],store:A,after:R,onError:j});let G;try{G=V.apply(this&&this.$id===e?this:A,x)}catch(ae){throw Ga(O,ae),ae}return G instanceof Promise?G.then(ae=>(Ga(N,ae),ae)).catch(ae=>(Ga(O,ae),Promise.reject(ae))):(Ga(N,G),G)};return J[Hp]=!0,J[$1]=T,J},y={_p:n,$id:e,$onAction:Tp.bind(null,h),$patch:g,$reset:v,$subscribe(V,T={}){const J=Tp(d,V,T.detached,()=>x()),x=s.run(()=>Pe(()=>n.state.value[e],N=>{(T.flush==="sync"?c:u)&&V({storeId:e,type:Vo.direct,events:f},N)},Fr({},o,T)));return J},$dispose:w},A=kr(y);n._s.set(e,A);const k=(n._a&&n._a.runWithContext||uw)(()=>n._e.run(()=>(s=hf()).run(()=>t({action:S}))));for(const V in k){const T=k[V];if(It(T)&&!hw(T)||jn(T))a||(_&&dw(T)&&(It(T)?T.value=_[V]:$d(T,_[V])),n.state.value[e][V]=T);else if(typeof T=="function"){const J=S(T,V);k[V]=J,l.actions[V]=T}}return Fr(A,k),Fr(lt(A),k),Object.defineProperty(A,"$state",{get:()=>n.state.value[e],set:V=>{g(T=>{Fr(T,V)})}}),n._p.forEach(V=>{Fr(A,s.run(()=>V({store:A,app:n._a,pinia:n,options:l})))}),_&&a&&i.hydrate&&i.hydrate(A.$state,_),u=!0,c=!0,A}/*! #__NO_SIDE_EFFECTS__ */function Pc(e,t,i){let n,r;const a=typeof t=="function";typeof e=="string"?(n=e,r=a?i:t):(r=e,n=e.id);function s(l,o){const u=p3();return l=l||(u?At(Tg,null):null),l&&Nc(l),l=xg,l._s.has(n)||(a?Ng(n,t,r,l):fw(n,r,l)),l._s.get(n)}return s.$id=n,s}/*!
|
|
23
|
+
* shared v11.3.0
|
|
24
|
+
* (c) 2026 kazuya kawaguchi
|
|
25
|
+
* Released under the MIT License.
|
|
26
|
+
*/function pw(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const zu=typeof window<"u",da=(e,t=!1)=>t?Symbol.for(e):Symbol(e),_w=(e,t,i)=>mw({l:e,k:t,s:i}),mw=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),ii=e=>typeof e=="number"&&isFinite(e),Pg=e=>Hf(e)==="[object Date]",ms=e=>Hf(e)==="[object RegExp]",Oc=e=>ot(e)&&Object.keys(e).length===0,ui=Object.assign,vw=Object.create,Et=(e=null)=>vw(e);let Np;const Pa=()=>Np||(Np=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Et());function Pp(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function Op(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function gw(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(n,r,a)=>`${r}="${Op(a)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(n,r,a)=>`${r}='${Op(a)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(n=>{e=e.replace(n,"$1javascript:")}),e}const bw=Object.prototype.hasOwnProperty;function _n(e,t){return bw.call(e,t)}const Wt=Array.isArray,Ot=e=>typeof e=="function",Be=e=>typeof e=="string",ht=e=>typeof e=="boolean",St=e=>e!==null&&typeof e=="object",yw=e=>St(e)&&Ot(e.then)&&Ot(e.catch),Og=Object.prototype.toString,Hf=e=>Og.call(e),ot=e=>Hf(e)==="[object Object]",ww=e=>e==null?"":Wt(e)||ot(e)&&e.toString===Og?JSON.stringify(e,null,2):String(e);function Nf(e,t=""){return e.reduce((i,n,r)=>r===0?i+n:i+t+n,"")}const W0=e=>!St(e)||Wt(e);function vu(e,t){if(W0(e)||W0(t))throw new Error("Invalid value");const i=[{src:e,des:t}];for(;i.length;){const{src:n,des:r}=i.pop();Object.keys(n).forEach(a=>{a!=="__proto__"&&(St(n[a])&&!St(r[a])&&(r[a]=Array.isArray(n[a])?[]:Et()),W0(r[a])||W0(n[a])?r[a]=n[a]:i.push({src:n[a],des:r[a]}))})}}/*!
|
|
27
|
+
* message-compiler v11.3.0
|
|
28
|
+
* (c) 2026 kazuya kawaguchi
|
|
29
|
+
* Released under the MIT License.
|
|
30
|
+
*/function Sw(e,t,i){return{line:e,column:t,offset:i}}function Md(e,t,i){return{start:e,end:t}}const gt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},Cw=17;function Ic(e,t,i={}){const{domain:n,messages:r,args:a}=i,s=e,l=new SyntaxError(String(s));return l.code=e,t&&(l.location=t),l.domain=n,l}function kw(e){throw e}const Tn=" ",Aw="\r",Li=`
|
|
31
|
+
`,$w="\u2028",Mw="\u2029";function Lw(e){const t=e;let i=0,n=1,r=1,a=0;const s=k=>t[k]===Aw&&t[k+1]===Li,l=k=>t[k]===Li,o=k=>t[k]===Mw,u=k=>t[k]===$w,c=k=>s(k)||l(k)||o(k)||u(k),d=()=>i,h=()=>n,f=()=>r,_=()=>a,m=k=>s(k)||o(k)||u(k)?Li:t[k],g=()=>m(i),v=()=>m(i+a);function w(){return a=0,c(i)&&(n++,r=0),s(i)&&i++,i++,r++,t[i]}function S(){return s(i+a)&&a++,a++,t[i+a]}function y(){i=0,n=1,r=1,a=0}function A(k=0){a=k}function L(){const k=i+a;for(;k!==i;)w();a=0}return{index:d,line:h,column:f,peekOffset:_,charAt:m,currentChar:g,currentPeek:v,next:w,peek:S,reset:y,resetPeek:A,skipToPeek:L}}const or=void 0,Ew=".",Ip="'",xw="tokenizer";function Tw(e,t={}){const i=t.location!==!1,n=Lw(e),r=()=>n.index(),a=()=>Sw(n.line(),n.column(),n.index()),s=a(),l=r(),o={currentType:13,offset:l,startLoc:s,endLoc:s,lastType:13,lastOffset:l,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},u=()=>o,{onError:c}=t;function d(b,C,B,...de){const z=u();if(C.column+=B,C.offset+=B,c){const Q=i?Md(z.startLoc,C):null,D=Ic(b,Q,{domain:xw,args:de});c(D)}}function h(b,C,B){b.endLoc=a(),b.currentType=C;const de={type:C};return i&&(de.loc=Md(b.startLoc,b.endLoc)),B!=null&&(de.value=B),de}const f=b=>h(b,13);function _(b,C){return b.currentChar()===C?(b.next(),C):(d(gt.EXPECTED_TOKEN,a(),0,C),"")}function m(b){let C="";for(;b.currentPeek()===Tn||b.currentPeek()===Li;)C+=b.currentPeek(),b.peek();return C}function g(b){const C=m(b);return b.skipToPeek(),C}function v(b){if(b===or)return!1;const C=b.charCodeAt(0);return C>=97&&C<=122||C>=65&&C<=90||C===95}function w(b){if(b===or)return!1;const C=b.charCodeAt(0);return C>=48&&C<=57}function S(b,C){const{currentType:B}=C;if(B!==2)return!1;m(b);const de=v(b.currentPeek());return b.resetPeek(),de}function y(b,C){const{currentType:B}=C;if(B!==2)return!1;m(b);const de=b.currentPeek()==="-"?b.peek():b.currentPeek(),z=w(de);return b.resetPeek(),z}function A(b,C){const{currentType:B}=C;if(B!==2)return!1;m(b);const de=b.currentPeek()===Ip;return b.resetPeek(),de}function L(b,C){const{currentType:B}=C;if(B!==7)return!1;m(b);const de=b.currentPeek()===".";return b.resetPeek(),de}function k(b,C){const{currentType:B}=C;if(B!==8)return!1;m(b);const de=v(b.currentPeek());return b.resetPeek(),de}function V(b,C){const{currentType:B}=C;if(!(B===7||B===11))return!1;m(b);const de=b.currentPeek()===":";return b.resetPeek(),de}function T(b,C){const{currentType:B}=C;if(B!==9)return!1;const de=()=>{const Q=b.currentPeek();return Q==="{"?v(b.peek()):Q==="@"||Q==="|"||Q===":"||Q==="."||Q===Tn||!Q?!1:Q===Li?(b.peek(),de()):x(b,!1)},z=de();return b.resetPeek(),z}function J(b){m(b);const C=b.currentPeek()==="|";return b.resetPeek(),C}function x(b,C=!0){const B=(z=!1,Q="")=>{const D=b.currentPeek();return D==="{"||D==="@"||!D?z:D==="|"?!(Q===Tn||Q===Li):D===Tn?(b.peek(),B(!0,Tn)):D===Li?(b.peek(),B(!0,Li)):!0},de=B();return C&&b.resetPeek(),de}function N(b,C){const B=b.currentChar();return B===or?or:C(B)?(b.next(),B):null}function O(b){const C=b.charCodeAt(0);return C>=97&&C<=122||C>=65&&C<=90||C>=48&&C<=57||C===95||C===36}function R(b){return N(b,O)}function j(b){const C=b.charCodeAt(0);return C>=97&&C<=122||C>=65&&C<=90||C>=48&&C<=57||C===95||C===36||C===45}function G(b){return N(b,j)}function ae(b){const C=b.charCodeAt(0);return C>=48&&C<=57}function q(b){return N(b,ae)}function se(b){const C=b.charCodeAt(0);return C>=48&&C<=57||C>=65&&C<=70||C>=97&&C<=102}function me(b){return N(b,se)}function U(b){let C="",B="";for(;C=q(b);)B+=C;return B}function ve(b){let C="";for(;;){const B=b.currentChar();if(B==="\\"){const de=b.peek();de==="{"||de==="}"||de==="@"||de==="|"||de==="\\"?(C+=B+de,b.next(),b.next()):(b.resetPeek(),C+=B,b.next())}else{if(B==="{"||B==="}"||B==="@"||B==="|"||!B)break;if(B===Tn||B===Li)if(x(b))C+=B,b.next();else{if(J(b))break;C+=B,b.next()}else C+=B,b.next()}}return C}function ce(b){g(b);let C="",B="";for(;C=G(b);)B+=C;const de=b.currentChar();if(de&&de!=="}"&&de!==or&&de!==Tn&&de!==Li&&de!==" "){const z=be(b);return d(gt.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,B+z),B+z}return b.currentChar()===or&&d(gt.UNTERMINATED_CLOSING_BRACE,a(),0),B}function ge(b){g(b);let C="";return b.currentChar()==="-"?(b.next(),C+=`-${U(b)}`):C+=U(b),b.currentChar()===or&&d(gt.UNTERMINATED_CLOSING_BRACE,a(),0),C}function ue(b){return b!==Ip&&b!==Li}function pe(b){g(b),_(b,"'");let C="",B="";for(;C=N(b,ue);)C==="\\"?B+=W(b):B+=C;const de=b.currentChar();return de===Li||de===or?(d(gt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),de===Li&&(b.next(),_(b,"'")),B):(_(b,"'"),B)}function W(b){const C=b.currentChar();switch(C){case"\\":case"'":return b.next(),`\\${C}`;case"u":return he(b,C,4);case"U":return he(b,C,6);default:return d(gt.UNKNOWN_ESCAPE_SEQUENCE,a(),0,C),""}}function he(b,C,B){_(b,C);let de="";for(let z=0;z<B;z++){const Q=me(b);if(!Q){d(gt.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${C}${de}${b.currentChar()}`);break}de+=Q}return`\\${C}${de}`}function te(b){return b!=="{"&&b!=="}"&&b!==Tn&&b!==Li}function be(b){g(b);let C="",B="";for(;C=N(b,te);)B+=C;return B}function E(b){let C="",B="";for(;C=R(b);)B+=C;return B}function F(b){const C=B=>{const de=b.currentChar();return de==="{"||de==="@"||de==="|"||de==="("||de===")"||!de||de===Tn?B:(B+=de,b.next(),C(B))};return C("")}function ie(b){g(b);const C=_(b,"|");return g(b),C}function fe(b,C){let B=null;switch(b.currentChar()){case"{":return C.braceNest>=1&&d(gt.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),b.next(),B=h(C,2,"{"),g(b),C.braceNest++,B;case"}":return C.braceNest>0&&C.currentType===2&&d(gt.EMPTY_PLACEHOLDER,a(),0),b.next(),B=h(C,3,"}"),C.braceNest--,C.braceNest>0&&g(b),C.inLinked&&C.braceNest===0&&(C.inLinked=!1),B;case"@":return C.braceNest>0&&d(gt.UNTERMINATED_CLOSING_BRACE,a(),0),B=ne(b,C)||f(C),C.braceNest=0,B;default:{let z=!0,Q=!0,D=!0;if(J(b))return C.braceNest>0&&d(gt.UNTERMINATED_CLOSING_BRACE,a(),0),B=h(C,1,ie(b)),C.braceNest=0,C.inLinked=!1,B;if(C.braceNest>0&&(C.currentType===4||C.currentType===5||C.currentType===6))return d(gt.UNTERMINATED_CLOSING_BRACE,a(),0),C.braceNest=0,Z(b,C);if(z=S(b,C))return B=h(C,4,ce(b)),g(b),B;if(Q=y(b,C))return B=h(C,5,ge(b)),g(b),B;if(D=A(b,C))return B=h(C,6,pe(b)),g(b),B;if(!z&&!Q&&!D)return B=h(C,12,be(b)),d(gt.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,B.value),g(b),B;break}}return B}function ne(b,C){const{currentType:B}=C;let de=null;const z=b.currentChar();switch((B===7||B===8||B===11||B===9)&&(z===Li||z===Tn)&&d(gt.INVALID_LINKED_FORMAT,a(),0),z){case"@":return b.next(),de=h(C,7,"@"),C.inLinked=!0,de;case".":return g(b),b.next(),h(C,8,".");case":":return g(b),b.next(),h(C,9,":");default:return J(b)?(de=h(C,1,ie(b)),C.braceNest=0,C.inLinked=!1,de):L(b,C)||V(b,C)?(g(b),ne(b,C)):k(b,C)?(g(b),h(C,11,E(b))):T(b,C)?(g(b),z==="{"?fe(b,C)||de:h(C,10,F(b))):(B===7&&d(gt.INVALID_LINKED_FORMAT,a(),0),C.braceNest=0,C.inLinked=!1,Z(b,C))}}function Z(b,C){let B={type:13};if(C.braceNest>0)return fe(b,C)||f(C);if(C.inLinked)return ne(b,C)||f(C);switch(b.currentChar()){case"{":return fe(b,C)||f(C);case"}":return d(gt.UNBALANCED_CLOSING_BRACE,a(),0),b.next(),h(C,3,"}");case"@":return ne(b,C)||f(C);default:{if(J(b))return B=h(C,1,ie(b)),C.braceNest=0,C.inLinked=!1,B;if(x(b))return h(C,0,ve(b));break}}return B}function re(){const{currentType:b,offset:C,startLoc:B,endLoc:de}=o;return o.lastType=b,o.lastOffset=C,o.lastStartLoc=B,o.lastEndLoc=de,o.offset=r(),o.startLoc=a(),n.currentChar()===or?h(o,13):Z(n,o)}return{nextToken:re,currentOffset:r,currentPosition:a,context:u}}const Hw="parser",Nw=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,Pw=/\\([\\@{}|])/g;function Ow(e,t){return t}function Iw(e,t,i){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const n=parseInt(t||i,16);return n<=55295||n>=57344?String.fromCodePoint(n):"�"}}}function Rw(e={}){const t=e.location!==!1,{onError:i}=e;function n(v,w,S,y,...A){const L=v.currentPosition();if(L.offset+=y,L.column+=y,i){const k=t?Md(S,L):null,V=Ic(w,k,{domain:Hw,args:A});i(V)}}function r(v,w,S){const y={type:v};return t&&(y.start=w,y.end=w,y.loc={start:S,end:S}),y}function a(v,w,S,y){t&&(v.end=w,v.loc&&(v.loc.end=S))}function s(v,w){const S=v.context(),y=r(3,S.offset,S.startLoc);return y.value=w.replace(Pw,Ow),a(y,v.currentOffset(),v.currentPosition()),y}function l(v,w){const S=v.context(),{lastOffset:y,lastStartLoc:A}=S,L=r(5,y,A);return L.index=parseInt(w,10),v.nextToken(),a(L,v.currentOffset(),v.currentPosition()),L}function o(v,w){const S=v.context(),{lastOffset:y,lastStartLoc:A}=S,L=r(4,y,A);return L.key=w,v.nextToken(),a(L,v.currentOffset(),v.currentPosition()),L}function u(v,w){const S=v.context(),{lastOffset:y,lastStartLoc:A}=S,L=r(9,y,A);return L.value=w.replace(Nw,Iw),v.nextToken(),a(L,v.currentOffset(),v.currentPosition()),L}function c(v){const w=v.nextToken(),S=v.context(),{lastOffset:y,lastStartLoc:A}=S,L=r(8,y,A);return w.type!==11?(n(v,gt.UNEXPECTED_EMPTY_LINKED_MODIFIER,S.lastStartLoc,0),L.value="",a(L,y,A),{nextConsumeToken:w,node:L}):(w.value==null&&n(v,gt.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,Hn(w)),L.value=w.value||"",a(L,v.currentOffset(),v.currentPosition()),{node:L})}function d(v,w){const S=v.context(),y=r(7,S.offset,S.startLoc);return y.value=w,a(y,v.currentOffset(),v.currentPosition()),y}function h(v){const w=v.context(),S=r(6,w.offset,w.startLoc);let y=v.nextToken();if(y.type===8){const A=c(v);S.modifier=A.node,y=A.nextConsumeToken||v.nextToken()}switch(y.type!==9&&n(v,gt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Hn(y)),y=v.nextToken(),y.type===2&&(y=v.nextToken()),y.type){case 10:y.value==null&&n(v,gt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Hn(y)),S.key=d(v,y.value||"");break;case 4:y.value==null&&n(v,gt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Hn(y)),S.key=o(v,y.value||"");break;case 5:y.value==null&&n(v,gt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Hn(y)),S.key=l(v,y.value||"");break;case 6:y.value==null&&n(v,gt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Hn(y)),S.key=u(v,y.value||"");break;default:{n(v,gt.UNEXPECTED_EMPTY_LINKED_KEY,w.lastStartLoc,0);const A=v.context(),L=r(7,A.offset,A.startLoc);return L.value="",a(L,A.offset,A.startLoc),S.key=L,a(S,A.offset,A.startLoc),{nextConsumeToken:y,node:S}}}return a(S,v.currentOffset(),v.currentPosition()),{node:S}}function f(v){const w=v.context(),S=w.currentType===1?v.currentOffset():w.offset,y=w.currentType===1?w.endLoc:w.startLoc,A=r(2,S,y);A.items=[];let L=null;do{const T=L||v.nextToken();switch(L=null,T.type){case 0:T.value==null&&n(v,gt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Hn(T)),A.items.push(s(v,T.value||""));break;case 5:T.value==null&&n(v,gt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Hn(T)),A.items.push(l(v,T.value||""));break;case 4:T.value==null&&n(v,gt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Hn(T)),A.items.push(o(v,T.value||""));break;case 6:T.value==null&&n(v,gt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Hn(T)),A.items.push(u(v,T.value||""));break;case 7:{const J=h(v);A.items.push(J.node),L=J.nextConsumeToken||null;break}}}while(w.currentType!==13&&w.currentType!==1);const k=w.currentType===1?w.lastOffset:v.currentOffset(),V=w.currentType===1?w.lastEndLoc:v.currentPosition();return a(A,k,V),A}function _(v,w,S,y){const A=v.context();let L=y.items.length===0;const k=r(1,w,S);k.cases=[],k.cases.push(y);do{const V=f(v);L||(L=V.items.length===0),k.cases.push(V)}while(A.currentType!==13);return L&&n(v,gt.MUST_HAVE_MESSAGES_IN_PLURAL,S,0),a(k,v.currentOffset(),v.currentPosition()),k}function m(v){const w=v.context(),{offset:S,startLoc:y}=w,A=f(v);return w.currentType===13?A:_(v,S,y,A)}function g(v){const w=Tw(v,ui({},e)),S=w.context(),y=r(0,S.offset,S.startLoc);return t&&y.loc&&(y.loc.source=v),y.body=m(w),e.onCacheKey&&(y.cacheKey=e.onCacheKey(v)),S.currentType!==13&&n(w,gt.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,v[S.offset]||""),a(y,w.currentOffset(),w.currentPosition()),y}return{parse:g}}function Hn(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function Dw(e,t={}){const i={ast:e,helpers:new Set};return{context:()=>i,helper:a=>(i.helpers.add(a),a)}}function Rp(e,t){for(let i=0;i<e.length;i++)Pf(e[i],t)}function Pf(e,t){switch(e.type){case 1:Rp(e.cases,t),t.helper("plural");break;case 2:Rp(e.items,t);break;case 6:{Pf(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function Vw(e,t={}){const i=Dw(e);i.helper("normalize"),e.body&&Pf(e.body,i);const n=i.context();e.helpers=Array.from(n.helpers)}function Bw(e){const t=e.body;return t.type===2?Dp(t):t.cases.forEach(i=>Dp(i)),e}function Dp(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let i=0;i<e.items.length;i++){const n=e.items[i];if(!(n.type===3||n.type===9)||n.value==null)break;t.push(n.value)}if(t.length===e.items.length){e.static=Nf(t);for(let i=0;i<e.items.length;i++){const n=e.items[i];(n.type===3||n.type===9)&&delete n.value}}}}function is(e){switch(e.t=e.type,e.type){case 0:{const t=e;is(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,i=t.cases;for(let n=0;n<i.length;n++)is(i[n]);t.c=i,delete t.cases;break}case 2:{const t=e,i=t.items;for(let n=0;n<i.length;n++)is(i[n]);t.i=i,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;is(t.key),t.k=t.key,delete t.key,t.modifier&&(is(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function Zw(e,t){const{filename:i,breakLineCode:n,needIndent:r}=t,a=t.location!==!1,s={filename:i,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:n,needIndent:r,indentLevel:0};a&&e.loc&&(s.source=e.loc.source);const l=()=>s;function o(m,g){s.code+=m}function u(m,g=!0){const v=g?n:"";o(r?v+" ".repeat(m):v)}function c(m=!0){const g=++s.indentLevel;m&&u(g)}function d(m=!0){const g=--s.indentLevel;m&&u(g)}function h(){u(s.indentLevel)}return{context:l,push:o,indent:c,deindent:d,newline:h,helper:m=>`_${m}`,needIndent:()=>s.needIndent}}function Fw(e,t){const{helper:i}=e;e.push(`${i("linked")}(`),vs(e,t.key),t.modifier?(e.push(", "),vs(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function zw(e,t){const{helper:i,needIndent:n}=e;e.push(`${i("normalize")}([`),e.indent(n());const r=t.items.length;for(let a=0;a<r&&(vs(e,t.items[a]),a!==r-1);a++)e.push(", ");e.deindent(n()),e.push("])")}function Uw(e,t){const{helper:i,needIndent:n}=e;if(t.cases.length>1){e.push(`${i("plural")}([`),e.indent(n());const r=t.cases.length;for(let a=0;a<r&&(vs(e,t.cases[a]),a!==r-1);a++)e.push(", ");e.deindent(n()),e.push("])")}}function Ww(e,t){t.body?vs(e,t.body):e.push("null")}function vs(e,t){const{helper:i}=e;switch(t.type){case 0:Ww(e,t);break;case 1:Uw(e,t);break;case 2:zw(e,t);break;case 6:Fw(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${i("interpolate")}(${i("list")}(${t.index}))`,t);break;case 4:e.push(`${i("interpolate")}(${i("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}const jw=(e,t={})=>{const i=Be(t.mode)?t.mode:"normal",n=Be(t.filename)?t.filename:"message.intl";t.sourceMap;const r=t.breakLineCode!=null?t.breakLineCode:i==="arrow"?";":`
|
|
32
|
+
`,a=t.needIndent?t.needIndent:i!=="arrow",s=e.helpers||[],l=Zw(e,{filename:n,breakLineCode:r,needIndent:a});l.push(i==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(a),s.length>0&&(l.push(`const { ${Nf(s.map(c=>`${c}: _${c}`),", ")} } = ctx`),l.newline()),l.push("return "),vs(l,e),l.deindent(a),l.push("}"),delete e.helpers;const{code:o,map:u}=l.context();return{ast:e,code:o,map:u?u.toJSON():void 0}};function Kw(e,t={}){const i=ui({},t),n=!!i.jit,r=!!i.minify,a=i.optimize==null?!0:i.optimize,l=Rw(i).parse(e);return n?(a&&Bw(l),r&&is(l),{ast:l,code:""}):(Vw(l,i),jw(l,i))}/*!
|
|
33
|
+
* core-base v11.3.0
|
|
34
|
+
* (c) 2026 kazuya kawaguchi
|
|
35
|
+
* Released under the MIT License.
|
|
36
|
+
*/function qw(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Pa().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Pa().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Kn(e){return St(e)&&Of(e)===0&&(_n(e,"b")||_n(e,"body"))}const Ig=["b","body"];function Gw(e){return ha(e,Ig)}const Rg=["c","cases"];function Yw(e){return ha(e,Rg,[])}const Dg=["s","static"];function Xw(e){return ha(e,Dg)}const Vg=["i","items"];function Jw(e){return ha(e,Vg,[])}const Bg=["t","type"];function Of(e){return ha(e,Bg)}const Zg=["v","value"];function j0(e,t){const i=ha(e,Zg);if(i!=null)return i;throw n0(t)}const Fg=["m","modifier"];function Qw(e){return ha(e,Fg)}const zg=["k","key"];function e9(e){const t=ha(e,zg);if(t)return t;throw n0(6)}function ha(e,t,i){for(let n=0;n<t.length;n++){const r=t[n];if(_n(e,r)&&e[r]!=null)return e[r]}return i}const Ug=[...Ig,...Rg,...Dg,...Vg,...zg,...Fg,...Zg,...Bg];function n0(e){return new Error(`unhandled node type: ${e}`)}function M1(e){return i=>t9(i,e)}function t9(e,t){const i=Gw(t);if(i==null)throw n0(0);if(Of(i)===1){const a=Yw(i);return e.plural(a.reduce((s,l)=>[...s,Vp(e,l)],[]))}else return Vp(e,i)}function Vp(e,t){const i=Xw(t);if(i!=null)return e.type==="text"?i:e.normalize([i]);{const n=Jw(t).reduce((r,a)=>[...r,Ld(e,a)],[]);return e.normalize(n)}}function Ld(e,t){const i=Of(t);switch(i){case 3:return j0(t,i);case 9:return j0(t,i);case 4:{const n=t;if(_n(n,"k")&&n.k)return e.interpolate(e.named(n.k));if(_n(n,"key")&&n.key)return e.interpolate(e.named(n.key));throw n0(i)}case 5:{const n=t;if(_n(n,"i")&&ii(n.i))return e.interpolate(e.list(n.i));if(_n(n,"index")&&ii(n.index))return e.interpolate(e.list(n.index));throw n0(i)}case 6:{const n=t,r=Qw(n),a=e9(n);return e.linked(Ld(e,a),r?Ld(e,r):void 0,e.type)}case 7:return j0(t,i);case 8:return j0(t,i);default:throw new Error(`unhandled node on format message part: ${i}`)}}const i9=e=>e;let K0=Et();function n9(e,t={}){let i=!1;const n=t.onError||kw;return t.onError=r=>{i=!0,n(r)},{...Kw(e,t),detectError:i}}function r9(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Be(e)){ht(t.warnHtmlMessage)&&t.warnHtmlMessage;const n=(t.onCacheKey||i9)(e),r=K0[n];if(r)return r;const{ast:a,detectError:s}=n9(e,{...t,location:!1,jit:!0}),l=M1(a);return s?l:K0[n]=l}else{const i=e.cacheKey;if(i){const n=K0[i];return n||(K0[i]=M1(e))}else return M1(e)}}let r0=null;function a9(e){r0=e}function s9(e,t,i){r0&&r0.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:i})}const l9=o9("function:translate");function o9(e){return t=>r0&&r0.emit(e,t)}const vr={INVALID_ARGUMENT:Cw,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},u9=24;function gr(e){return Ic(e,null,void 0)}function If(e,t){return t.locale!=null?Bp(t.locale):Bp(e.locale)}let L1;function Bp(e){if(Be(e))return e;if(Ot(e)){if(e.resolvedOnce&&L1!=null)return L1;if(e.constructor.name==="Function"){const t=e();if(yw(t))throw gr(vr.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return L1=t}else throw gr(vr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw gr(vr.NOT_SUPPORT_LOCALE_TYPE)}function c9(e,t,i){return[...new Set([i,...Wt(t)?t:St(t)?Object.keys(t):Be(t)?[t]:[i]])]}function Ed(e,t,i){const n=Be(i)?i:a0,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let a=r.__localeChainCache.get(n);if(!a){a=[];let s=[i];for(;Wt(s);)s=Zp(a,s,t);const l=Wt(t)||!ot(t)?t:t.default?t.default:null;s=Be(l)?[l]:l,Wt(s)&&Zp(a,s,!1),r.__localeChainCache.set(n,a)}return a}function Zp(e,t,i){let n=!0;for(let r=0;r<t.length&&ht(n);r++){const a=t[r];Be(a)&&(n=d9(e,t[r],i))}return n}function d9(e,t,i){let n;const r=t.split("-");do{const a=r.join("-");n=h9(e,a,i),r.splice(-1,1)}while(r.length&&n===!0);return n}function h9(e,t,i){let n=!1;if(!e.includes(t)&&(n=!0,t)){n=t[t.length-1]!=="!";const r=t.replace(/!/g,"");e.push(r),(Wt(i)||ot(i))&&i[r]&&(n=i[r])}return n}const fa=[];fa[0]={w:[0],i:[3,0],"[":[4],o:[7]};fa[1]={w:[1],".":[2],"[":[4],o:[7]};fa[2]={w:[2],i:[3,0],0:[3,0]};fa[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};fa[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};fa[5]={"'":[4,0],o:8,l:[5,0]};fa[6]={'"':[4,0],o:8,l:[6,0]};const f9=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function p9(e){return f9.test(e)}function _9(e){const t=e.charCodeAt(0),i=e.charCodeAt(e.length-1);return t===i&&(t===34||t===39)?e.slice(1,-1):e}function m9(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function v9(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:p9(t)?_9(t):"*"+t}function g9(e){const t=[];let i=-1,n=0,r=0,a,s,l,o,u,c,d;const h=[];h[0]=()=>{s===void 0?s=l:s+=l},h[1]=()=>{s!==void 0&&(t.push(s),s=void 0)},h[2]=()=>{h[0](),r++},h[3]=()=>{if(r>0)r--,n=4,h[0]();else{if(r=0,s===void 0||(s=v9(s),s===!1))return!1;h[1]()}};function f(){const _=e[i+1];if(n===5&&_==="'"||n===6&&_==='"')return i++,l="\\"+_,h[0](),!0}for(;n!==null;)if(i++,a=e[i],!(a==="\\"&&f())){if(o=m9(a),d=fa[n],u=d[o]||d.l||8,u===8||(n=u[0],u[1]!==void 0&&(c=h[u[1]],c&&(l=a,c()===!1))))return;if(n===7)return t}}const Fp=new Map;function b9(e,t){return St(e)?e[t]:null}function y9(e,t){if(!St(e))return null;let i=Fp.get(t);if(i||(i=g9(t),i&&Fp.set(t,i)),!i)return null;const n=i.length;let r=e,a=0;for(;a<n;){const s=i[a];if(Ug.includes(s)&&Kn(r)||!St(r)||!_n(r,s))return null;const l=r[s];if(l===void 0||Ot(r))return null;r=l,a++}return r}const w9="11.3.0",Rc=-1,a0="en-US",Uu="",zp=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function S9(){return{upper:(e,t)=>t==="text"&&Be(e)?e.toUpperCase():t==="vnode"&&St(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Be(e)?e.toLowerCase():t==="vnode"&&St(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Be(e)?zp(e):t==="vnode"&&St(e)&&"__v_isVNode"in e?zp(e.children):e}}let Wg;function C9(e){Wg=e}let jg;function k9(e){jg=e}let Kg;function A9(e){Kg=e}let qg=null;const $9=e=>{qg=e},M9=()=>qg;let Gg=null;const Up=e=>{Gg=e},L9=()=>Gg;let Wp=0;function E9(e={}){const t=Ot(e.onWarn)?e.onWarn:pw,i=Be(e.version)?e.version:w9,n=Be(e.locale)||Ot(e.locale)?e.locale:a0,r=Ot(n)?a0:n,a=Wt(e.fallbackLocale)||ot(e.fallbackLocale)||Be(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r,s=ot(e.messages)?e.messages:E1(r),l=ot(e.datetimeFormats)?e.datetimeFormats:E1(r),o=ot(e.numberFormats)?e.numberFormats:E1(r),u=ui(Et(),e.modifiers,S9()),c=e.pluralRules||Et(),d=Ot(e.missing)?e.missing:null,h=ht(e.missingWarn)||ms(e.missingWarn)?e.missingWarn:!0,f=ht(e.fallbackWarn)||ms(e.fallbackWarn)?e.fallbackWarn:!0,_=!!e.fallbackFormat,m=!!e.unresolving,g=Ot(e.postTranslation)?e.postTranslation:null,v=ot(e.processor)?e.processor:null,w=ht(e.warnHtmlMessage)?e.warnHtmlMessage:!0,S=!!e.escapeParameter,y=Ot(e.messageCompiler)?e.messageCompiler:Wg,A=Ot(e.messageResolver)?e.messageResolver:jg||b9,L=Ot(e.localeFallbacker)?e.localeFallbacker:Kg||c9,k=St(e.fallbackContext)?e.fallbackContext:void 0,V=e,T=St(V.__datetimeFormatters)?V.__datetimeFormatters:new Map,J=St(V.__numberFormatters)?V.__numberFormatters:new Map,x=St(V.__meta)?V.__meta:{};Wp++;const N={version:i,cid:Wp,locale:n,fallbackLocale:a,messages:s,modifiers:u,pluralRules:c,missing:d,missingWarn:h,fallbackWarn:f,fallbackFormat:_,unresolving:m,postTranslation:g,processor:v,warnHtmlMessage:w,escapeParameter:S,messageCompiler:y,messageResolver:A,localeFallbacker:L,fallbackContext:k,onWarn:t,__meta:x};return N.datetimeFormats=l,N.numberFormats=o,N.__datetimeFormatters=T,N.__numberFormatters=J,__INTLIFY_PROD_DEVTOOLS__&&s9(N,i,x),N}const E1=e=>({[e]:Et()});function Rf(e,t,i,n,r){const{missing:a,onWarn:s}=e;if(a!==null){const l=a(e,i,t,r);return Be(l)?l:t}else return t}function fo(e,t,i){const n=e;n.__localeChainCache=new Map,e.localeFallbacker(e,i,t)}function x9(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function T9(e,t){const i=t.indexOf(e);if(i===-1)return!1;for(let n=i+1;n<t.length;n++)if(x9(e,t[n]))return!0;return!1}function jp(e,...t){const{datetimeFormats:i,unresolving:n,fallbackLocale:r,onWarn:a,localeFallbacker:s}=e,{__datetimeFormatters:l}=e;if(!Be(t[0])&&!Pg(t[0])&&!ii(t[0]))return Uu;const[o,u,c,d]=xd(...t),h=ht(c.missingWarn)?c.missingWarn:e.missingWarn;ht(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const f=!!c.part,_=If(e,c),m=s(e,r,_);if(!Be(o)||o==="")return new Intl.DateTimeFormat(_.replace(/!/g,""),d).format(u);let g={},v,w=null;const S="datetime format";for(let L=0;L<m.length&&(v=m[L],g=i[v]||{},w=g[o],!ot(w));L++)Rf(e,o,v,h,S);if(!ot(w)||!Be(v))return n?Rc:o;let y=`${v}__${o}`;Oc(d)||(y=`${y}__${JSON.stringify(d)}`);let A=l.get(y);return A||(A=new Intl.DateTimeFormat(v,ui({},w,d)),l.set(y,A)),f?A.formatToParts(u):A.format(u)}const Yg=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function xd(...e){const[t,i,n,r]=e,a=Et();let s=Et(),l;if(Be(t)){const o=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!o)throw gr(vr.INVALID_ISO_DATE_ARGUMENT);const u=o[3]?o[3].trim().startsWith("T")?`${o[1].trim()}${o[3].trim()}`:`${o[1].trim()}T${o[3].trim()}`:o[1].trim();l=new Date(u);try{l.toISOString()}catch{throw gr(vr.INVALID_ISO_DATE_ARGUMENT)}}else if(Pg(t)){if(isNaN(t.getTime()))throw gr(vr.INVALID_DATE_ARGUMENT);l=t}else if(ii(t))l=t;else throw gr(vr.INVALID_ARGUMENT);return Be(i)?a.key=i:ot(i)&&Object.keys(i).forEach(o=>{Yg.includes(o)?s[o]=i[o]:a[o]=i[o]}),Be(n)?a.locale=n:ot(n)&&(s=n),ot(r)&&(s=r),[a.key||"",l,a,s]}function Kp(e,t,i){const n=e;for(const r in i){const a=`${t}__${r}`;n.__datetimeFormatters.has(a)&&n.__datetimeFormatters.delete(a)}}function qp(e,...t){const{numberFormats:i,unresolving:n,fallbackLocale:r,onWarn:a,localeFallbacker:s}=e,{__numberFormatters:l}=e;if(!ii(t[0]))return Uu;const[o,u,c,d]=Td(...t),h=ht(c.missingWarn)?c.missingWarn:e.missingWarn;ht(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const f=!!c.part,_=If(e,c),m=s(e,r,_);if(!Be(o)||o==="")return new Intl.NumberFormat(_.replace(/!/g,""),d).format(u);let g={},v,w=null;const S="number format";for(let L=0;L<m.length&&(v=m[L],g=i[v]||{},w=g[o],!ot(w));L++)Rf(e,o,v,h,S);if(!ot(w)||!Be(v))return n?Rc:o;let y=`${v}__${o}`;Oc(d)||(y=`${y}__${JSON.stringify(d)}`);let A=l.get(y);return A||(A=new Intl.NumberFormat(v,ui({},w,d)),l.set(y,A)),f?A.formatToParts(u):A.format(u)}const Xg=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Td(...e){const[t,i,n,r]=e,a=Et();let s=Et();if(!ii(t))throw gr(vr.INVALID_ARGUMENT);const l=t;return Be(i)?a.key=i:ot(i)&&Object.keys(i).forEach(o=>{Xg.includes(o)?s[o]=i[o]:a[o]=i[o]}),Be(n)?a.locale=n:ot(n)&&(s=n),ot(r)&&(s=r),[a.key||"",l,a,s]}function Gp(e,t,i){const n=e;for(const r in i){const a=`${t}__${r}`;n.__numberFormatters.has(a)&&n.__numberFormatters.delete(a)}}const H9=e=>e,N9=e=>"",P9="text",O9=e=>e.length===0?"":Nf(e),I9=ww;function x1(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function R9(e){var i,n;const t=ii(e.pluralIndex)?e.pluralIndex:-1;return ii((i=e.named)==null?void 0:i.count)?e.named.count:ii((n=e.named)==null?void 0:n.n)?e.named.n:t}function D9(e={}){var v,w,S,y;const t=e.locale,i=R9(e),n=Be(t)&&Ot((v=e.pluralRules)==null?void 0:v[t])?e.pluralRules[t]:x1,r=n===x1?void 0:x1,a=A=>A[n(i,A.length,r)],s=e.list||[],l=A=>s[A],o=e.named||Et();ii(e.pluralIndex)&&(o.count||(o.count=e.pluralIndex),o.n||(o.n=e.pluralIndex));const u=A=>o[A];function c(A,L){const k=Ot(e.messages)?e.messages(A,!!L):St(e.messages)?e.messages[A]:!1;return k||(e.parent?e.parent.message(A):N9)}const d=A=>e.modifiers?e.modifiers[A]:H9,h=Ot((w=e.processor)==null?void 0:w.normalize)?e.processor.normalize:O9,f=Ot((S=e.processor)==null?void 0:S.interpolate)?e.processor.interpolate:I9,_=Be((y=e.processor)==null?void 0:y.type)?e.processor.type:P9,g={list:l,named:u,plural:a,linked:(A,...L)=>{const[k,V]=L;let T="text",J="";L.length===1?St(k)?(J=k.modifier||J,T=k.type||T):Be(k)&&(J=k||J):L.length===2&&(Be(k)&&(J=k||J),Be(V)&&(T=V||T));const x=c(A,!0)(g),N=x===""||x===void 0?A:x,O=T==="vnode"&&Wt(N)&&J?N[0]:N;return J?d(J)(O,T):O},message:c,type:_,interpolate:f,normalize:h,values:ui(Et(),s,o)};return g}const Yp=()=>"",pn=e=>Ot(e);function Xp(e,...t){const{fallbackFormat:i,postTranslation:n,unresolving:r,messageCompiler:a,fallbackLocale:s,messages:l}=e,[o,u]=Hd(...t),c=ht(u.missingWarn)?u.missingWarn:e.missingWarn,d=ht(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,h=ht(u.escapeParameter)?u.escapeParameter:e.escapeParameter,f=!!u.resolvedMessage,_=Be(u.default)||ht(u.default)?ht(u.default)?a?o:()=>o:u.default:i?a?o:()=>o:null,m=i||_!=null&&(Be(_)||Ot(_)),g=If(e,u);h&&V9(u);let[v,w,S]=f?[o,g,l[g]||Et()]:Jg(e,o,g,s,d,c),y=v,A=o;if(!f&&!(Be(y)||Kn(y)||pn(y))&&m&&(y=_,A=y),!f&&(!(Be(y)||Kn(y)||pn(y))||!Be(w)))return r?Rc:o;let L=!1;const k=()=>{L=!0},V=pn(y)?y:Qg(e,o,w,y,A,k);if(L)return y;const T=F9(e,w,S,u),J=D9(T),x=B9(e,V,J);let N=n?n(x,o):x;if(h&&Be(N)&&(N=gw(N)),__INTLIFY_PROD_DEVTOOLS__){const O={timestamp:Date.now(),key:Be(o)?o:pn(y)?y.key:"",locale:w||(pn(y)?y.locale:""),format:Be(y)?y:pn(y)?y.source:"",message:N};O.meta=ui({},e.__meta,M9()||{}),l9(O)}return N}function V9(e){Wt(e.list)?e.list=e.list.map(t=>Be(t)?Pp(t):t):St(e.named)&&Object.keys(e.named).forEach(t=>{Be(e.named[t])&&(e.named[t]=Pp(e.named[t]))})}function Jg(e,t,i,n,r,a){const{messages:s,onWarn:l,messageResolver:o,localeFallbacker:u}=e,c=u(e,n,i);let d=Et(),h,f=null;const _="translate";for(let m=0;m<c.length&&(h=c[m],d=s[h]||Et(),(f=o(d,t))===null&&(f=d[t]),!(Be(f)||Kn(f)||pn(f)));m++)if(!T9(h,c)){const g=Rf(e,t,h,a,_);g!==t&&(f=g)}return[f,h,d]}function Qg(e,t,i,n,r,a){const{messageCompiler:s,warnHtmlMessage:l}=e;if(pn(n)){const u=n;return u.locale=u.locale||i,u.key=u.key||t,u}if(s==null){const u=()=>n;return u.locale=i,u.key=t,u}const o=s(n,Z9(e,i,r,n,l,a));return o.locale=i,o.key=t,o.source=n,o}function B9(e,t,i){return t(i)}function Hd(...e){const[t,i,n]=e,r=Et();if(!Be(t)&&!ii(t)&&!pn(t)&&!Kn(t))throw gr(vr.INVALID_ARGUMENT);const a=ii(t)?String(t):(pn(t),t);return ii(i)?r.plural=i:Be(i)?r.default=i:ot(i)&&!Oc(i)?r.named=i:Wt(i)&&(r.list=i),ii(n)?r.plural=n:Be(n)?r.default=n:ot(n)&&ui(r,n),[a,r]}function Z9(e,t,i,n,r,a){return{locale:t,key:i,warnHtmlMessage:r,onError:s=>{throw a&&a(s),s},onCacheKey:s=>_w(t,i,s)}}function F9(e,t,i,n){const{modifiers:r,pluralRules:a,messageResolver:s,fallbackLocale:l,fallbackWarn:o,missingWarn:u,fallbackContext:c}=e,h={locale:t,modifiers:r,pluralRules:a,messages:(f,_)=>{let m=s(i,f);if(m==null&&(c||_)){const[,,g]=Jg(c||e,f,t,l,o,u);m=s(g,f)}if(Be(m)||Kn(m)){let g=!1;const w=Qg(e,f,t,m,f,()=>{g=!0});return g?Yp:w}else return pn(m)?m:Yp}};return e.processor&&(h.processor=e.processor),n.list&&(h.list=n.list),n.named&&(h.named=n.named),ii(n.plural)&&(h.pluralIndex=n.plural),h}qw();/*!
|
|
37
|
+
* vue-i18n v11.3.0
|
|
38
|
+
* (c) 2026 kazuya kawaguchi
|
|
39
|
+
* Released under the MIT License.
|
|
40
|
+
*/const z9="11.3.0";function U9(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Pa().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Pa().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Pa().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Pa().__INTLIFY_PROD_DEVTOOLS__=!1)}const Ki={UNEXPECTED_RETURN_TYPE:u9,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function sn(e,...t){return Ic(e,null,void 0)}const Nd=da("__translateVNode"),Pd=da("__datetimeParts"),Od=da("__numberParts"),e4=da("__setPluralRules"),t4=da("__injectWithOption"),Id=da("__dispose");function s0(e){if(!St(e)||Kn(e))return e;for(const t in e)if(_n(e,t))if(!t.includes("."))St(e[t])&&s0(e[t]);else{const i=t.split("."),n=i.length-1;let r=e,a=!1;for(let s=0;s<n;s++){if(i[s]==="__proto__")throw new Error(`unsafe key: ${i[s]}`);if(i[s]in r||(r[i[s]]=Et()),!St(r[i[s]])){a=!0;break}r=r[i[s]]}if(a||(Kn(r)?Ug.includes(i[n])||delete e[t]:(r[i[n]]=e[t],delete e[t])),!Kn(r)){const s=r[i[n]];St(s)&&s0(s)}}return e}function Df(e,t){const{messages:i,__i18n:n,messageResolver:r,flatJson:a}=t,s=ot(i)?i:Wt(n)?Et():{[e]:Et()};if(Wt(n)&&n.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:o,resource:u}=l;o?(s[o]=s[o]||Et(),vu(u,s[o])):vu(u,s)}else Be(l)&&vu(JSON.parse(l),s)}),r==null&&a)for(const l in s)_n(s,l)&&s0(s[l]);return s}function i4(e){return e.type}function n4(e,t,i){let n=St(t.messages)?t.messages:Et();"__i18nGlobal"in i&&(n=Df(e.locale.value,{messages:n,__i18n:i.__i18nGlobal}));const r=Object.keys(n);r.length&&r.forEach(a=>{e.mergeLocaleMessage(a,n[a])});{if(St(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach(s=>{e.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(St(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach(s=>{e.mergeNumberFormat(s,t.numberFormats[s])})}}}function Jp(e){return ee(Lr,null,e,0)}function l0(){return Jt()}const Qp="__INTLIFY_META__",e6=()=>[],W9=()=>!1;let t6=0;function i6(e){return(t,i,n,r)=>e(i,n,l0()||void 0,r)}const j9=()=>{const e=l0();let t=null;return e&&(t=i4(e)[Qp])?{[Qp]:t}:null};function Vf(e={}){const{__root:t,__injectWithOption:i}=e,n=t===void 0,r=e.flatJson,a=zu?X:An;let s=ht(e.inheritLocale)?e.inheritLocale:!0;const l=a(t&&s?t.locale.value:Be(e.locale)?e.locale:a0),o=a(t&&s?t.fallbackLocale.value:Be(e.fallbackLocale)||Wt(e.fallbackLocale)||ot(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),u=a(Df(l.value,e)),c=a(ot(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),d=a(ot(e.numberFormats)?e.numberFormats:{[l.value]:{}});let h=t?t.missingWarn:ht(e.missingWarn)||ms(e.missingWarn)?e.missingWarn:!0,f=t?t.fallbackWarn:ht(e.fallbackWarn)||ms(e.fallbackWarn)?e.fallbackWarn:!0,_=t?t.fallbackRoot:ht(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,g=Ot(e.missing)?e.missing:null,v=Ot(e.missing)?i6(e.missing):null,w=Ot(e.postTranslation)?e.postTranslation:null,S=t?t.warnHtmlMessage:ht(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter;const A=t?t.modifiers:ot(e.modifiers)?e.modifiers:{};let L=e.pluralRules||t&&t.pluralRules,k;k=(()=>{n&&Up(null);const D={version:z9,locale:l.value,fallbackLocale:o.value,messages:u.value,modifiers:A,pluralRules:L,missing:v===null?void 0:v,missingWarn:h,fallbackWarn:f,fallbackFormat:m,unresolving:!0,postTranslation:w===null?void 0:w,warnHtmlMessage:S,escapeParameter:y,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};D.datetimeFormats=c.value,D.numberFormats=d.value,D.__datetimeFormatters=ot(k)?k.__datetimeFormatters:void 0,D.__numberFormatters=ot(k)?k.__numberFormatters:void 0;const oe=E9(D);return n&&Up(oe),oe})(),fo(k,l.value,o.value);function T(){return[l.value,o.value,u.value,c.value,d.value]}const J=H({get:()=>l.value,set:D=>{k.locale=D,l.value=D}}),x=H({get:()=>o.value,set:D=>{k.fallbackLocale=D,o.value=D,fo(k,l.value,D)}}),N=H(()=>u.value),O=H(()=>c.value),R=H(()=>d.value);function j(){return Ot(w)?w:null}function G(D){w=D,k.postTranslation=D}function ae(){return g}function q(D){D!==null&&(v=i6(D)),g=D,k.missing=v}const se=(D,oe,ye,xe,we,Re)=>{T();let Ge;try{__INTLIFY_PROD_DEVTOOLS__,n||(k.fallbackContext=t?L9():void 0),Ge=D(k)}finally{__INTLIFY_PROD_DEVTOOLS__,n||(k.fallbackContext=void 0)}if(ye!=="translate exists"&&ii(Ge)&&Ge===Rc||ye==="translate exists"&&!Ge){const[Ct,qt]=oe();return t&&_?xe(t):we(Ct)}else{if(Re(Ge))return Ge;throw sn(Ki.UNEXPECTED_RETURN_TYPE)}};function me(...D){return se(oe=>Reflect.apply(Xp,null,[oe,...D]),()=>Hd(...D),"translate",oe=>Reflect.apply(oe.t,oe,[...D]),oe=>oe,oe=>Be(oe))}function U(...D){const[oe,ye,xe]=D;if(xe&&!St(xe))throw sn(Ki.INVALID_ARGUMENT);return me(oe,ye,ui({resolvedMessage:!0},xe||{}))}function ve(...D){return se(oe=>Reflect.apply(jp,null,[oe,...D]),()=>xd(...D),"datetime format",oe=>Reflect.apply(oe.d,oe,[...D]),()=>Uu,oe=>Be(oe)||Wt(oe))}function ce(...D){return se(oe=>Reflect.apply(qp,null,[oe,...D]),()=>Td(...D),"number format",oe=>Reflect.apply(oe.n,oe,[...D]),()=>Uu,oe=>Be(oe)||Wt(oe))}function ge(D){return D.map(oe=>Be(oe)||ii(oe)||ht(oe)?Jp(String(oe)):oe)}const pe={normalize:ge,interpolate:D=>D,type:"vnode"};function W(...D){return se(oe=>{let ye;const xe=oe;try{xe.processor=pe,ye=Reflect.apply(Xp,null,[xe,...D])}finally{xe.processor=null}return ye},()=>Hd(...D),"translate",oe=>oe[Nd](...D),oe=>[Jp(oe)],oe=>Wt(oe))}function he(...D){return se(oe=>Reflect.apply(qp,null,[oe,...D]),()=>Td(...D),"number format",oe=>oe[Od](...D),e6,oe=>Be(oe)||Wt(oe))}function te(...D){return se(oe=>Reflect.apply(jp,null,[oe,...D]),()=>xd(...D),"datetime format",oe=>oe[Pd](...D),e6,oe=>Be(oe)||Wt(oe))}function be(D){L=D,k.pluralRules=L}function E(D,oe){return se(()=>{if(!D)return!1;const ye=Be(oe)?oe:l.value,xe=Be(oe)?[ye]:Ed(k,o.value,ye);for(let we=0;we<xe.length;we++){const Re=fe(xe[we]);let Ge=k.messageResolver(Re,D);if(Ge===null&&(Ge=Re[D]),Kn(Ge)||pn(Ge)||Be(Ge))return!0}return!1},()=>[D],"translate exists",ye=>Reflect.apply(ye.te,ye,[D,oe]),W9,ye=>ht(ye))}function F(D){let oe=null;const ye=Ed(k,o.value,l.value);for(let xe=0;xe<ye.length;xe++){const we=u.value[ye[xe]]||{},Re=k.messageResolver(we,D);if(Re!=null){oe=Re;break}}return oe}function ie(D){const oe=F(D);return oe??(t?t.tm(D)||{}:{})}function fe(D){return u.value[D]||{}}function ne(D,oe){if(r){const ye={[D]:oe};for(const xe in ye)_n(ye,xe)&&s0(ye[xe]);oe=ye[D]}u.value[D]=oe,k.messages=u.value}function Z(D,oe){u.value[D]=u.value[D]||{};const ye={[D]:oe};if(r)for(const xe in ye)_n(ye,xe)&&s0(ye[xe]);oe=ye[D],vu(oe,u.value[D]),k.messages=u.value}function re(D){return c.value[D]||{}}function b(D,oe){c.value[D]=oe,k.datetimeFormats=c.value,Kp(k,D,oe)}function C(D,oe){c.value[D]=ui(c.value[D]||{},oe),k.datetimeFormats=c.value,Kp(k,D,oe)}function B(D){return d.value[D]||{}}function de(D,oe){d.value[D]=oe,k.numberFormats=d.value,Gp(k,D,oe)}function z(D,oe){d.value[D]=ui(d.value[D]||{},oe),k.numberFormats=d.value,Gp(k,D,oe)}t6++,t&&zu&&(Pe(t.locale,D=>{s&&(l.value=D,k.locale=D,fo(k,l.value,o.value))}),Pe(t.fallbackLocale,D=>{s&&(o.value=D,k.fallbackLocale=D,fo(k,l.value,o.value))}));const Q={id:t6,locale:J,fallbackLocale:x,get inheritLocale(){return s},set inheritLocale(D){s=D,D&&t&&(l.value=t.locale.value,o.value=t.fallbackLocale.value,fo(k,l.value,o.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:N,get modifiers(){return A},get pluralRules(){return L||{}},get isGlobal(){return n},get missingWarn(){return h},set missingWarn(D){h=D,k.missingWarn=h},get fallbackWarn(){return f},set fallbackWarn(D){f=D,k.fallbackWarn=f},get fallbackRoot(){return _},set fallbackRoot(D){_=D},get fallbackFormat(){return m},set fallbackFormat(D){m=D,k.fallbackFormat=m},get warnHtmlMessage(){return S},set warnHtmlMessage(D){S=D,k.warnHtmlMessage=D},get escapeParameter(){return y},set escapeParameter(D){y=D,k.escapeParameter=D},t:me,getLocaleMessage:fe,setLocaleMessage:ne,mergeLocaleMessage:Z,getPostTranslationHandler:j,setPostTranslationHandler:G,getMissingHandler:ae,setMissingHandler:q,[e4]:be};return Q.datetimeFormats=O,Q.numberFormats=R,Q.rt=U,Q.te=E,Q.tm=ie,Q.d=ve,Q.n=ce,Q.getDateTimeFormat=re,Q.setDateTimeFormat=b,Q.mergeDateTimeFormat=C,Q.getNumberFormat=B,Q.setNumberFormat=de,Q.mergeNumberFormat=z,Q[t4]=i,Q[Nd]=W,Q[Pd]=te,Q[Od]=he,Q}function K9(e){const t=Be(e.locale)?e.locale:a0,i=Be(e.fallbackLocale)||Wt(e.fallbackLocale)||ot(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,n=Ot(e.missing)?e.missing:void 0,r=ht(e.silentTranslationWarn)||ms(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,a=ht(e.silentFallbackWarn)||ms(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,s=ht(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,o=ot(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Ot(e.postTranslation)?e.postTranslation:void 0,d=Be(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=ht(e.sync)?e.sync:!0;let _=e.messages;if(ot(e.sharedMessages)){const A=e.sharedMessages;_=Object.keys(A).reduce((k,V)=>{const T=k[V]||(k[V]={});return ui(T,A[V]),k},_||{})}const{__i18n:m,__root:g,__injectWithOption:v}=e,w=e.datetimeFormats,S=e.numberFormats,y=e.flatJson;return{locale:t,fallbackLocale:i,messages:_,flatJson:y,datetimeFormats:w,numberFormats:S,missing:n,missingWarn:r,fallbackWarn:a,fallbackRoot:s,fallbackFormat:l,modifiers:o,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:f,__i18n:m,__root:g,__injectWithOption:v}}function Rd(e={}){const t=Vf(K9(e)),{__extender:i}=e,n={id:t.id,get locale(){return t.locale.value},set locale(r){t.locale.value=r},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(r){t.fallbackLocale.value=r},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(r){t.setMissingHandler(r)},get silentTranslationWarn(){return ht(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(r){t.missingWarn=ht(r)?!r:r},get silentFallbackWarn(){return ht(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(r){t.fallbackWarn=ht(r)?!r:r},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(r){t.fallbackFormat=r},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(r){t.setPostTranslationHandler(r)},get sync(){return t.inheritLocale},set sync(r){t.inheritLocale=r},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){t.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(r){t.escapeParameter=r},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...r){return Reflect.apply(t.t,t,[...r])},rt(...r){return Reflect.apply(t.rt,t,[...r])},te(r,a){return t.te(r,a)},tm(r){return t.tm(r)},getLocaleMessage(r){return t.getLocaleMessage(r)},setLocaleMessage(r,a){t.setLocaleMessage(r,a)},mergeLocaleMessage(r,a){t.mergeLocaleMessage(r,a)},d(...r){return Reflect.apply(t.d,t,[...r])},getDateTimeFormat(r){return t.getDateTimeFormat(r)},setDateTimeFormat(r,a){t.setDateTimeFormat(r,a)},mergeDateTimeFormat(r,a){t.mergeDateTimeFormat(r,a)},n(...r){return Reflect.apply(t.n,t,[...r])},getNumberFormat(r){return t.getNumberFormat(r)},setNumberFormat(r,a){t.setNumberFormat(r,a)},mergeNumberFormat(r,a){t.mergeNumberFormat(r,a)}};return n.__extender=i,n}function q9(e,t,i){return{beforeCreate(){const n=l0();if(!n)throw sn(Ki.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const a=r.i18n;if(r.__i18n&&(a.__i18n=r.__i18n),a.__root=t,this===this.$root)this.$i18n=n6(e,a);else{a.__injectWithOption=!0,a.__extender=i.__vueI18nExtend,this.$i18n=Rd(a);const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}}else if(r.__i18n)if(this===this.$root)this.$i18n=n6(e,r);else{this.$i18n=Rd({__i18n:r.__i18n,__injectWithOption:!0,__extender:i.__vueI18nExtend,__root:t});const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}else this.$i18n=e;r.__i18nGlobal&&n4(t,r,r),this.$t=(...a)=>this.$i18n.t(...a),this.$rt=(...a)=>this.$i18n.rt(...a),this.$te=(a,s)=>this.$i18n.te(a,s),this.$d=(...a)=>this.$i18n.d(...a),this.$n=(...a)=>this.$i18n.n(...a),this.$tm=a=>this.$i18n.tm(a),i.__setInstance(n,this.$i18n)},mounted(){},unmounted(){const n=l0();if(!n)throw sn(Ki.UNEXPECTED_ERROR);const r=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,r.__disposer&&(r.__disposer(),delete r.__disposer,delete r.__extender),i.__deleteInstance(n),delete this.$i18n}}}function n6(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[e4](t.pluralizationRules||e.pluralizationRules);const i=Df(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(i).forEach(n=>e.mergeLocaleMessage(n,i[n])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}const Bf={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function G9({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((n,r)=>[...n,...r.type===$e?r.children:[r]],[]):t.reduce((i,n)=>{const r=e[n];return r&&(i[n]=r()),i},Et())}function r4(){return $e}const Y9=Ne({name:"i18n-t",props:ui({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>ii(e)||!isNaN(e)}},Bf),setup(e,t){const{slots:i,attrs:n}=t,r=e.i18n||Zf({useScope:e.scope,__useComponent:!0});return()=>{const a=Object.keys(i).filter(d=>d[0]!=="_"),s=Et();e.locale&&(s.locale=e.locale),e.plural!==void 0&&(s.plural=Be(e.plural)?+e.plural:e.plural);const l=G9(t,a),o=r[Nd](e.keypath,l,s),u=ui(Et(),n),c=Be(e.tag)||St(e.tag)?e.tag:r4();return He(c,u,o)}}}),r6=Y9;function X9(e){return Wt(e)&&!Be(e[0])}function a4(e,t,i,n){const{slots:r,attrs:a}=t;return()=>{const s={part:!0};let l=Et();e.locale&&(s.locale=e.locale),Be(e.format)?s.key=e.format:St(e.format)&&(Be(e.format.key)&&(s.key=e.format.key),l=Object.keys(e.format).reduce((h,f)=>i.includes(f)?ui(Et(),h,{[f]:e.format[f]}):h,Et()));const o=n(e.value,s,l);let u=[s.key];Wt(o)?u=o.map((h,f)=>{const _=r[h.type],m=_?_({[h.type]:h.value,index:f,parts:o}):[h.value];return X9(m)&&(m[0].key=`${h.type}-${f}`),m}):Be(o)&&(u=[o]);const c=ui(Et(),a),d=Be(e.tag)||St(e.tag)?e.tag:r4();return He(d,c,u)}}const J9=Ne({name:"i18n-n",props:ui({value:{type:Number,required:!0},format:{type:[String,Object]}},Bf),setup(e,t){const i=e.i18n||Zf({useScope:e.scope,__useComponent:!0});return a4(e,t,Xg,(...n)=>i[Od](...n))}}),a6=J9;function Q9(e,t){const i=e;if(e.mode==="composition")return i.__getInstance(t)||e.global;{const n=i.__getInstance(t);return n!=null?n.__composer:e.global.__composer}}function eS(e){const t=s=>{const{instance:l,value:o}=s;if(!l||!l.$)throw sn(Ki.UNEXPECTED_ERROR);const u=Q9(e,l.$),c=s6(o);return[Reflect.apply(u.t,u,[...l6(c)]),u]};return{created:(s,l)=>{const[o,u]=t(l);zu&&(s.__i18nWatcher=Pe(u.locale,()=>{l.instance&&l.instance.$forceUpdate()})),s.__composer=u,s.textContent=o},unmounted:s=>{zu&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:l})=>{if(s.__composer){const o=s.__composer,u=s6(l);s.textContent=Reflect.apply(o.t,o,[...l6(u)])}},getSSRProps:s=>{const[l]=t(s);return{textContent:l}}}}function s6(e){if(Be(e))return{path:e};if(ot(e)){if(!("path"in e))throw sn(Ki.REQUIRED_VALUE,"path");return e}else throw sn(Ki.INVALID_VALUE)}function l6(e){const{path:t,locale:i,args:n,choice:r,plural:a}=e,s={},l=n||{};return Be(i)&&(s.locale=i),ii(r)&&(s.plural=r),ii(a)&&(s.plural=a),[t,l,s]}function tS(e,t,...i){const n=ot(i[0])?i[0]:{};(ht(n.globalInstall)?n.globalInstall:!0)&&([r6.name,"I18nT"].forEach(a=>e.component(a,r6)),[a6.name,"I18nN"].forEach(a=>e.component(a,a6)),[u6.name,"I18nD"].forEach(a=>e.component(a,u6))),e.directive("t",eS(t))}const iS=da("global-vue-i18n");function nS(e={}){const t=__VUE_I18N_LEGACY_API__&&ht(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,i=ht(e.globalInjection)?e.globalInjection:!0,n=new Map,[r,a]=rS(e,t),s=da("");function l(d){return n.get(d)||null}function o(d,h){n.set(d,h)}function u(d){n.delete(d)}const c={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...h){if(d.__VUE_I18N_SYMBOL__=s,d.provide(d.__VUE_I18N_SYMBOL__,c),ot(h[0])){const m=h[0];c.__composerExtend=m.__composerExtend,c.__vueI18nExtend=m.__vueI18nExtend}let f=null;!t&&i&&(f=hS(d,c.global)),__VUE_I18N_FULL_INSTALL__&&tS(d,c,...h),__VUE_I18N_LEGACY_API__&&t&&d.mixin(q9(a,a.__composer,c));const _=d.unmount;d.unmount=()=>{f&&f(),c.dispose(),_()}},get global(){return a},dispose(){r.stop()},__instances:n,__getInstance:l,__setInstance:o,__deleteInstance:u};return c}function Zf(e={}){const t=l0();if(t==null)throw sn(Ki.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw sn(Ki.NOT_INSTALLED);const i=aS(t),n=lS(i),r=i4(t),a=sS(e,r);if(a==="global")return n4(n,e,r),n;if(a==="parent"){let o=oS(i,t,e.__useComponent);return o==null&&(o=n),o}const s=i;let l=s.__getInstance(t);if(l==null){const o=ui({},e);"__i18n"in r&&(o.__i18n=r.__i18n),n&&(o.__root=n),l=Vf(o),s.__composerExtend&&(l[Id]=s.__composerExtend(l)),cS(s,t,l),s.__setInstance(t,l)}return l}function rS(e,t){const i=hf(),n=__VUE_I18N_LEGACY_API__&&t?i.run(()=>Rd(e)):i.run(()=>Vf(e));if(n==null)throw sn(Ki.UNEXPECTED_ERROR);return[i,n]}function aS(e){const t=At(e.isCE?iS:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw sn(e.isCE?Ki.NOT_INSTALLED_WITH_PROVIDE:Ki.UNEXPECTED_ERROR);return t}function sS(e,t){return Oc(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function lS(e){return e.mode==="composition"?e.global:e.global.__composer}function oS(e,t,i=!1){let n=null;const r=t.root;let a=uS(t,i);for(;a!=null;){const s=e;if(e.mode==="composition")n=s.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){const l=s.__getInstance(a);l!=null&&(n=l.__composer,i&&n&&!n[t4]&&(n=null))}if(n!=null||r===a)break;a=a.parent}return n}function uS(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function cS(e,t,i){et(()=>{},t),Hi(()=>{const n=i;e.__deleteInstance(t);const r=n[Id];r&&(r(),delete n[Id])},t)}const dS=["locale","fallbackLocale","availableLocales"],o6=["t","rt","d","n","tm","te"];function hS(e,t){const i=Object.create(null);return dS.forEach(r=>{const a=Object.getOwnPropertyDescriptor(t,r);if(!a)throw sn(Ki.UNEXPECTED_ERROR);const s=It(a.value)?{get(){return a.value.value},set(l){a.value.value=l}}:{get(){return a.get&&a.get()}};Object.defineProperty(i,r,s)}),e.config.globalProperties.$i18n=i,o6.forEach(r=>{const a=Object.getOwnPropertyDescriptor(t,r);if(!a||!a.value)throw sn(Ki.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${r}`,a)}),()=>{delete e.config.globalProperties.$i18n,o6.forEach(r=>{delete e.config.globalProperties[`$${r}`]})}}const fS=Ne({name:"i18n-d",props:ui({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Bf),setup(e,t){const i=e.i18n||Zf({useScope:e.scope,__useComponent:!0});return a4(e,t,Yg,(...n)=>i[Pd](...n))}}),u6=fS;U9();C9(r9);k9(y9);A9(Ed);if(__INTLIFY_PROD_DEVTOOLS__){const e=Pa();e.__INTLIFY__=!0,a9(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}var s4="(prefers-reduced-motion: reduce)";function Ff(){let e=X(!1);if(typeof window<"u"&&typeof window.matchMedia=="function"){let t=window.matchMedia(s4);e.value=t.matches;let i=n=>{e.value=n.matches};typeof t.addEventListener=="function"?(t.addEventListener("change",i),Ko(()=>t.removeEventListener("change",i))):typeof t.addListener=="function"&&(t.addListener(i),Ko(()=>t.removeListener(i)))}return ia(e)}function Dc(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(s4).matches}var zf=Object.freeze({micro:70,quick:110,short:150,medium:240,long:400,slow:700}),Dd="data-nb-tour-step",pS=Symbol.for("@nubisco/ui:command-palette");function _S(){let e=kr(new Map),t=X(!1),i=X(void 0),n=X(void 0);function r(c){e.set(c.id,c)}function a(c){for(let d of c)e.set(d.id,d)}function s(c){e.delete(c)}function l(c){n.value=c,t.value=!0}function o(){t.value=!1,n.value=void 0}function u(c){i.value=c}return kr({commands:e,isOpen:t,activeContext:i,searchFilter:n,register:r,registerMany:a,unregister:s,open:l,close:o,setContext:u})}var Je=(e,t)=>{let i=e.__vccOpts||e;for(let[n,r]of t)i[n]=r;return i},c6=Object.defineProperty,Vc=(e,t)=>{let i={};for(var n in e)c6(i,n,{get:e[n],enumerable:!0});return c6(i,Symbol.toStringTag,{value:"Module"}),i},mS=Vc({default:()=>vS});function vS(e){e.directive("nb-context-menu",{mounted(t,i){let n=r=>{r.preventDefault(),typeof i.value=="function"&&i.value({x:r.clientX,y:r.clientY})};t.__nbContextMenuHandler__=n,t.addEventListener("contextmenu",n)},updated(t,i){t.__nbContextMenuHandler__&&t.removeEventListener("contextmenu",t.__nbContextMenuHandler__);let n=r=>{r.preventDefault(),typeof i.value=="function"&&i.value({x:r.clientX,y:r.clientY})};t.__nbContextMenuHandler__=n,t.addEventListener("contextmenu",n)},unmounted(t){t.__nbContextMenuHandler__&&(t.removeEventListener("contextmenu",t.__nbContextMenuHandler__),delete t.__nbContextMenuHandler__)}})}var gS=Vc({devWarn:()=>oa,renderTooltipContent:()=>gu}),d6=new Set(["span","div","p","b","strong","em","i","u","s","small","code","kbd","br","ul","ol","li"]),bS=new Set(["br"]),h6=new Set(["class","style","dir","lang"]),yS=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),wS=new Set("color.background-color.font-family.font-size.font-style.font-variant.font-weight.letter-spacing.line-height.text-align.text-decoration.text-transform.white-space.word-break.overflow-wrap.opacity.display.flex-direction.align-items.justify-content.gap.margin.margin-top.margin-right.margin-bottom.margin-left.padding.padding-top.padding-right.padding-bottom.padding-left.max-width.min-width.border-radius".split(".")),SS=/url\(|image-set\(|expression\(|javascript:|@import|\\/i,CS=/^[A-Za-z_-][A-Za-z0-9_-]*$/,kS=e=>e.split(";").map(t=>{let i=t.indexOf(":");if(i<0)return"";let n=t.slice(0,i).trim().toLowerCase(),r=t.slice(i+1).trim();return!n||!r?"":wS.has(n)?SS.test(r)?(oa(`style-value:${n}`,`The value of "${n}" was dropped: tooltip content may not load a resource or call a CSS function that does.`),""):`${n}: ${r}`:(oa(`style:${n}`,`"${n}" is not an allowed tooltip content style property and was dropped.`),"")}).filter(Boolean).join("; "),AS=e=>e.split(/\s+/).filter(t=>t?CS.test(t)?!0:(oa(`class:${t}`,`"${t}" is not a valid class token for tooltip content and was dropped.`),!1):!1).join(" "),$S=(e,t)=>e==="style"?kS(t):e==="class"?AS(t):t,MS=new Set(["b","strong","em","i","u","s","small","code","kbd","br","p"]),LS={"<":"<",">":">",'"':""","'":"'"},f6=e=>e.replace(/&(?!(?:[a-zA-Z][a-zA-Z0-9]{1,10}|#\d{1,7}|#[xX][0-9a-fA-F]{1,6});)/g,"&").replace(/[<>"']/g,t=>LS[t]),l4=e=>e.split(/(<[^<>]*>)/g).map(t=>{var i;if(t.startsWith("<")&&t.endsWith(">")){let n=/^<\s*(\/?)\s*([a-zA-Z][a-zA-Z0-9]*)\s*\/?\s*>$/.exec(t),r=(i=n==null?void 0:n[2])==null?void 0:i.toLowerCase();return r&&MS.has(r)?`<${n[1]}${r}>`:(r&&oa(`string-tag:${r}`,`<${r}> is not allowed in a tooltip string and was shown as text. Use the structured content form for anything richer.`),f6(t))}return f6(t).replace(/\n/g,"<br>")}).join(""),p6=new Set,oa=(e,t)=>{typeof process<"u"||p6.has(e)||(p6.add(e),console.warn(`[nb-tooltip] ${t}`))},Vd=e=>{if(Array.isArray(e))return e.map(c=>Vd(c)).join("");if(!e||typeof e!="object"||!e.component)return"";let{component:t,props:i={},children:n,content:r}=e,a=n===void 0?r:n,s=Array.isArray(a)?Vd(a):a===void 0?"":l4(String(a)),l=String(t).toLowerCase();if(!d6.has(l))return oa(`tag:${l}`,`<${l}> is not allowed in tooltip content and was dropped. Allowed tags: ${[...d6].join(", ")}.`),s;let o=Object.entries(i).filter(([c])=>h6.has(c)?!0:(oa(`prop:${c}`,`"${c}" is not an allowed tooltip content prop and was dropped. Allowed props: ${[...h6].join(", ")}.`),!1)).map(([c,d])=>[c,$S(c,String(d))]).filter(([,c])=>c!=="").map(([c,d])=>`${c}="${yS(d)}"`).join(" "),u=`<${l}${o?` ${o}`:""}>`;return bS.has(l)?u:`${u}${s}</${l}>`},gu=e=>e?typeof e=="string"?l4(e):Array.isArray(e)?Vd(e):"":"",ES=Vc({default:()=>rC,dismissAllTooltips:()=>cC}),Uf=e=>e.status??e.flavor??"default",Wf=e=>e.chipClass??e.classExtra,qn=new Set,xS=0,TS=()=>`nb-tooltip-${++xS}`,HS=900,o4=4e3,NS=500,u4=0,Bd=(e,t)=>{if(!e)return!1;let i=Date.now()-e;return i>=0&&i<t},_6=!1,PS=()=>{if(_6||typeof document>"u")return;_6=!0;let e=t=>{if(qn.size===0)return;let i=t==null?void 0:t.target;i instanceof Element&&i.closest(".nb-tooltip")||uC("dismiss")};document.addEventListener("pointerdown",()=>{u4=Date.now()},!0),document.addEventListener("dragstart",()=>e(),!0),document.addEventListener("keydown",t=>{t.key==="Escape"&&e()},!0),document.addEventListener("pointerdown",e,!0),window.addEventListener("blur",e),document.addEventListener("mouseleave",e)},OS=zf.micro,m6=1e3,IS=2,RS=e=>{let t=e.tooltipElement;if(!t)return!1;if(t.__hovered__)return!0;try{return t.isConnected&&t.matches(":hover")}catch{return!1}},DS=e=>{if(!e.isConnected)return!1;if(RS(e)||e.__trigger__==="focus"&&e.contains(document.activeElement)||e.__trigger__==="touch"&&Bd(e.__lastTouchAt__,o4))return!0;try{return e.matches(":hover")}catch{return!0}},Zd=e=>{clearTimeout(e.__watchdogTimer__),e.__watchdogTimer__=void 0,e.__watchdogMisses__=0},VS=e=>{Zd(e);let t=()=>{var i;if(!((i=e.__chips__)!=null&&i.size)){Zd(e);return}if(DS(e))e.__watchdogMisses__=0;else{if(e.__watchdogMisses__=(e.__watchdogMisses__??0)+1,!e.isConnected){as(e,!0,"program");return}if(e.__watchdogMisses__>=IS){qf(e,"dismiss");return}}e.__watchdogTimer__=setTimeout(t,m6)};e.__watchdogTimer__=setTimeout(t,m6)},Gn=new Set,Jr=null,c4=e=>`${Math.round(e.top)}:${Math.round(e.left)}:${Math.round(e.width)}:${Math.round(e.height)}`,BS=e=>{if(typeof getComputedStyle!="function")return!1;let t;try{t=getComputedStyle(e)}catch{return!1}let i=`${t.overflow} ${t.overflowX} ${t.overflowY}`;return/hidden|scroll|auto|clip|overlay/.test(i)},ZS=e=>{let t=[],i=e.parentElement;for(;i&&i!==document.body&&i!==document.documentElement;)BS(i)&&t.push(i),i=i.parentElement;return t},Fd=e=>!(e.width===0&&e.height===0&&e.top===0&&e.left===0),FS=(e,t)=>{if(!e.isConnected)return!1;if(!Fd(t))return!0;if(t.width===0||t.height===0||!(t.bottom>0&&t.right>0&&t.top<window.innerHeight&&t.left<window.innerWidth))return!1;for(let i of e.__clippers__??[]){if(!i.isConnected)continue;let n=i.getBoundingClientRect();if(Fd(n)&&(t.bottom<=n.top||t.top>=n.bottom||t.right<=n.left||t.left>=n.right))return!1}return!0},d4=e=>{var n;let t=e.tooltipElement;if(!t||!((n=e.__chips__)!=null&&n.size)){Gn.delete(e);return}let i=e.getBoundingClientRect();if(!FS(e,i)){e.__offscreenReported__||(e.__offscreenReported__=!0,qf(e,"dismiss"));return}e.__offscreenReported__=!1,e.__lastRect__=c4(i),e.__side__!=="cursor"&&M0(e,t,e.__requestedSide__??e.__side__)},Wu=()=>{f4();for(let e of Array.from(Gn))d4(e)},zS=100,US=320,v6=0,h4=0,f4=()=>{h4=Date.now()+US},zd=()=>{if(Gn.size===0){Jr=null;return}let e=Date.now();if(e>=h4&&e-v6<zS){Jr=requestAnimationFrame(zd);return}v6=e;for(let t of Array.from(Gn)){if(!t.tooltipElement){Gn.delete(t);continue}c4(t.getBoundingClientRect())!==t.__lastRect__&&(f4(),d4(t))}Jr=requestAnimationFrame(zd)},ju=!1,WS=e=>{Gn.add(e),e.__lastRect__=void 0,e.__clippers__=ZS(e),!(typeof window>"u")&&(ju||(ju=!0,document.addEventListener("scroll",Wu,{capture:!0,passive:!0}),window.addEventListener("resize",Wu,{passive:!0})),Jr===null&&typeof requestAnimationFrame=="function"&&(Jr=requestAnimationFrame(zd)))},jf=e=>{Gn.delete(e),e.__lastRect__=void 0,e.__clippers__=void 0,!(Gn.size>0||typeof window>"u")&&(ju&&(ju=!1,document.removeEventListener("scroll",Wu,{capture:!0}),window.removeEventListener("resize",Wu)),Jr!==null&&typeof cancelAnimationFrame=="function"&&(cancelAnimationFrame(Jr),Jr=null))},jS=(e,t,i)=>{var n;if((n=e.__chips__)==null||n.delete(t),clearTimeout(t.__removeTimer__),t.__removeTimer__=void 0,i||Dc()){t.remove();return}t.style.animation="tooltipDisappear var(--nb-motion-micro) var(--nb-ease-exit) forwards",t.__removeTimer__=setTimeout(()=>{t.__removeTimer__=void 0,t.remove()},OS)},p4=(e,t)=>{if(jf(e),e.__trigger__=void 0,e.__side__=void 0,e.__chips__)for(let i of Array.from(e.__chips__))jS(e,i,t);e.tooltipElement=void 0,e.__lastContent__=void 0,Zd(e)},_4="a[href], button, input, select, textarea, summary, [tabindex]",Ud="data-nb-tooltip-anchor",g6=(e,t)=>{let i=t.target;if(!(i instanceof Element)||i===e)return!0;let n=i.closest(`[${Ud}]`);return n===null||n===e},KS='button, a[href], [role="button"], [role="tab"], [role="menuitem"], input, select, textarea, label',qS=e=>{let t=e.closest(KS);return!t||t.disabled===!0?!1:t.getAttribute("aria-disabled")!=="true"},Bo=e=>{if(!e)return"";if(typeof e=="string")return e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/\s+/g," ").trim();if(Array.isArray(e))return e.map(t=>Bo(t)).filter(Boolean).join(" ");if(typeof e=="object"){let t=e;return Bo(t.children??t.content)}return""},m4=e=>[Bo(e.header),Bo(e.body),Bo(e.tip)].filter(Boolean).join(". "),GS=e=>{if(e.hasAttribute("aria-labelledby")||e.hasAttribute("aria-label")&&!e.__ownsAriaLabel__||e.hasAttribute("title")||(e.textContent??"").trim().length>0)return!0;let t=e.querySelector("img[alt]");return!!t&&(t.getAttribute("alt")??"").trim().length>0},v4=(e,t)=>{let i=t.aria??"auto";return i==="auto"?GS(e)?"description":"label":i},YS=(e,t)=>{if(!t||v4(e,t)!=="label"){e.__ownsAriaLabel__&&(e.__ownsAriaLabel__=(e.removeAttribute("aria-label"),!1)),e.__ownsRole__&&(e.__ownsRole__=(e.removeAttribute("role"),!1));return}let i=m4(t);i&&(e.setAttribute("aria-label",i),e.__ownsAriaLabel__=!0,!e.__ownsRole__&&!e.hasAttribute("role")&&!e.matches(_4)&&(e.setAttribute("role","img"),e.__ownsRole__=!0))},T1=(e,t)=>{let i=!!(t!=null&&t.focusable);if(i&&!e.__ownsTabIndex__){if(e.matches(_4)||e.hasAttribute("tabindex"))return;e.setAttribute("tabindex","0"),e.__ownsTabIndex__=!0;return}!i&&e.__ownsTabIndex__&&(e.removeAttribute("tabindex"),e.__ownsTabIndex__=!1)},XS=(e,t)=>{e.__prevDescribedBy__=e.getAttribute("aria-describedby");let i=[e.__prevDescribedBy__,t].filter(Boolean).join(" ");e.setAttribute("aria-describedby",i)},JS=e=>{e.__prevDescribedBy__!==void 0&&(e.__prevDescribedBy__?e.setAttribute("aria-describedby",e.__prevDescribedBy__):e.removeAttribute("aria-describedby"),e.__prevDescribedBy__=void 0)},QS="nb-tooltip-description",g4=e=>!!e&&!!(e.body||e.header||e.tip),eC=(e,t)=>{if(typeof document>"u")return;let i=t&&g4(t)&&v4(e,t)==="description"?m4(t):"";if(!i){b4(e);return}let n=e.__descNode__;n||(n=document.createElement("span"),n.className=QS,n.id=TS(),n.setAttribute("role","tooltip"),document.body.appendChild(n),e.__descNode__=n,XS(e,n.id)),e.__descText__!==i&&(n.textContent=i,e.__descText__=i)},b4=e=>{e.__descNode__&&(JS(e),e.__descNode__.remove(),e.__descNode__=void 0,e.__descText__=void 0)},tC=(e,t)=>{if(g4(t)){e.__prevTitle__===void 0&&e.hasAttribute("title")&&(e.__prevTitle__=e.getAttribute("title")??"",e.removeAttribute("title"));return}y4(e)},y4=e=>{e.__prevTitle__!==void 0&&(e.hasAttribute("title")||e.setAttribute("title",e.__prevTitle__),e.__prevTitle__=void 0)},H1=(e,t)=>{tC(e,t),YS(e,t),eC(e,t)},iC=e=>{var t,i;return e.disabled===!0?!0:!!((t=e.closest)!=null&&t.call(e,"fieldset[disabled]"))&&!((i=e.closest)!=null&&i.call(e,"fieldset[disabled] > legend:first-of-type"))},nC=(e,t,i)=>t>=e.left&&t<=e.right&&i>=e.top&&i<=e.bottom,w4=e=>{let t=e.__proxyHost__;t&&(e.__proxyMove__&&t.removeEventListener("mousemove",e.__proxyMove__),e.__proxyLeave__&&t.removeEventListener("mouseleave",e.__proxyLeave__),e.__proxyHost__=void 0,e.__proxyMove__=void 0,e.__proxyLeave__=void 0,e.__proxyInside__=!1)},b6=e=>{let t=e.__tooltipBinding__&&iC(e)?e.parentElement:null;e.__proxyHost__!==t&&(w4(e),t&&(e.__proxyMove__=i=>{var a,s,l;let n=i;if(n.buttons)return;let r=e.getBoundingClientRect();if(Fd(r)?nC(r,n.clientX,n.clientY):i.target===e||e.contains(i.target)){e.__mouseX__=n.clientX,e.__mouseY__=n.clientY,e.__proxyInside__?(a=e.__tooltipBinding__)!=null&&a.followCursor&&M0(e,e.tooltipElement,e.__requestedSide__):(e.__proxyInside__=!0,(s=e.__showTooltip__)==null||s.call(e,"pointer"));return}e.__proxyInside__&&(e.__proxyInside__=!1,(l=e.__hideTooltip__)==null||l.call(e,void 0,"pointer"))},e.__proxyLeave__=()=>{var i;e.__proxyInside__&&(e.__proxyInside__=!1,(i=e.__hideTooltip__)==null||i.call(e,void 0,"pointer"))},t.addEventListener("mousemove",e.__proxyMove__),t.addEventListener("mouseleave",e.__proxyLeave__),e.__proxyHost__=t))},y6=e=>{e.onOpenChange||oa("controlled-no-handler","a tooltip was given `open` but no `onOpenChange`, so nothing the user does (hover, blur, Escape) can change it. Either handle `onOpenChange` or drop `open` and let the directive own visibility.")},w6=(e,t)=>{var n,r;if(!t)return;let i=t.open===void 0?e.__openState__===void 0&&t.defaultOpen?!0:void 0:t.open;i!==void 0&&i!==(e.__openState__===!0||!!e.__showTimer__)&&(i?(n=e.__showTooltip__)==null||n.call(e,"program"):(r=e.__hideTooltip__)==null||r.call(e,0,"program"))},rC=e=>{PS();let t=e.config.globalProperties.$router;t&&t.beforeEach(()=>{qn.forEach(i=>{var n;return(n=i==null?void 0:i.__hideTooltip__)==null?void 0:n.call(i,0,"program")}),qn.clear()}),e.directive("nb-tooltip",{mounted(i,n){i.__showTooltip__=(r="pointer")=>{var s;let a=i.__tooltipBinding__;if(a){if(a.open!==void 0&&r!=="program"){y6(a),(s=a.onOpenChange)==null||s.call(a,!0,r);return}clearTimeout(i.__hideTimer__),i.__hideTimer__=void 0,aC(i,a,r)}},i.__hideTooltip__=(r=(s=>(s=i.__tooltipBinding__)==null?void 0:s.hideDelay)()??150,a="dismiss")=>{var o;let l=i.__tooltipBinding__;if((l==null?void 0:l.open)!==void 0&&a!=="program"){y6(l),(o=l.onOpenChange)==null||o.call(l,!1,a);return}if(clearTimeout(i.__hideTimer__),r<=0){i.__hideTimer__=void 0,as(i,!0,a);return}i.__hideTimer__=setTimeout(()=>{i.__hideTimer__=void 0,as(i,r<=0,a)},r)},i.__mouseMove__=r=>{var a,s;i.__mouseX__=r.clientX,i.__mouseY__=r.clientY,(a=i.__tooltipBinding__)!=null&&a.followCursor&&M0(i,i.tooltipElement,(s=i.__tooltipBinding__)==null?void 0:s.position)},i.__tooltipBinding__=n.value,i.__showHandler__=r=>{var s;if(Bd(i.__lastTouchAt__,HS))return;let a=r;a.buttons||(typeof a.clientX=="number"&&(a.clientX||a.clientY)&&(i.__mouseX__=a.clientX,i.__mouseY__=a.clientY),(s=i.__showTooltip__)==null||s.call(i,"pointer"))},i.__hideHandler__=()=>{var r;return(r=i.__hideTooltip__)==null?void 0:r.call(i,void 0,"pointer")},i.__focusHandler__=r=>{var a;Bd(u4,NS)||g6(i,r)&&((a=i.__showTooltip__)==null||a.call(i,"focus"))},i.__blurHandler__=()=>{var r;return(r=i.__hideTooltip__)==null?void 0:r.call(i,void 0,"focus")},i.__touchHandler__=r=>{var a,s,l;((a=i.__tooltipBinding__)==null?void 0:a.touch)!==!1&&g6(i,r)&&(i.__lastTouchAt__=Date.now(),!qS(i)&&((s=i.__showTooltip__)==null||s.call(i,"touch"),(l=i.__hideTooltip__)==null||l.call(i,o4,"touch")))},T1(i,n.value),H1(i,n.value),i.setAttribute(Ud,""),i.addEventListener("mouseenter",i.__showHandler__),i.addEventListener("mouseleave",i.__hideHandler__),i.addEventListener("mousemove",i.__mouseMove__),i.addEventListener("focusin",i.__focusHandler__),i.addEventListener("focusout",i.__blurHandler__),i.addEventListener("touchstart",i.__touchHandler__,{passive:!0}),b6(i),w6(i,n.value)},updated(i,n){let r=i.__tooltipBinding__;if(i.__tooltipBinding__=n.value,!n.value){H1(i,void 0),T1(i,void 0),as(i,!0);return}if(r!==n.value&&(H1(i,n.value),T1(i,n.value)),b6(i),w6(i,n.value),!i.tooltipElement||r===n.value)return;let a=C4(n.value);a!==i.__lastContent__&&(i.__lastContent__=a,sC(i,n.value))},unmounted(i){clearTimeout(i.__showTimer__),i.__showTimer__=void 0,clearTimeout(i.__hideTimer__),i.__hideTimer__=void 0,as(i,!0),qn.delete(i),i.__showHandler__&&i.removeEventListener("mouseenter",i.__showHandler__),i.__hideHandler__&&i.removeEventListener("mouseleave",i.__hideHandler__),i.__focusHandler__&&i.removeEventListener("focusin",i.__focusHandler__),i.__blurHandler__&&i.removeEventListener("focusout",i.__blurHandler__),i.__touchHandler__&&i.removeEventListener("touchstart",i.__touchHandler__),b4(i),y4(i),i.__ownsAriaLabel__&&(i.__ownsAriaLabel__=(i.removeAttribute("aria-label"),!1)),i.__ownsTabIndex__&&(i.__ownsTabIndex__=(i.removeAttribute("tabindex"),!1)),i.__ownsRole__&&(i.__ownsRole__=(i.removeAttribute("role"),!1)),i.removeAttribute(Ud),w4(i),i.__mouseMove__&&i.removeEventListener("mousemove",i.__mouseMove__),jf(i)}})},Kf=({header:e="",body:t="",tip:i=""})=>`<div class="nb-tooltip-content"><div class="nb-tooltip-header">${gu(e)}</div><div class="nb-tooltip-body">${gu(t)}</div><div class="nb-tooltip-tip">${gu(i)}</div></div>`,S4=(e,t,i)=>["nb-tooltip",`nb-tooltip-${e}`,t?`nb-tooltip-flavor-${t}`:"",i||""].filter(Boolean).join(" "),C4=e=>`${e.position??""}|${Uf(e)}|${Wf(e)??""}|${Kf(e)}`,aC=(e,t,i="pointer")=>{let{header:n,body:r,tip:a,delay:s=400,animationTime:l,position:o,overflowOnly:u}=t,c=Uf(t),d=Wf(t);if(clearTimeout(e.__showTimer__),e.__showTimer__=void 0,p4(e,!0),u){let _=e.getBoundingClientRect();if(!(Math.round(_.width)<Math.round(e.scrollWidth)))return}if(!(r||n||a))return;let h=i==="pointer"?s:0,f=Dc();e.__showTimer__=setTimeout(()=>{var v;if(e.__showTimer__=void 0,!e.isConnected)return;let _=i==="pointer"?o??"cursor":o&&o!=="cursor"?o:"top";for(let w of Array.from(Gn))w!==e&&qf(w,"superseded");let m=document.createElement("span");if(m.className=S4(_,c,d),m.innerHTML=Kf({header:n,body:r,tip:a}),m.addEventListener("mouseenter",()=>{m.__hovered__=!0,clearTimeout(e.__hideTimer__),e.__hideTimer__=void 0,e.__watchdogMisses__=0}),m.addEventListener("mouseleave",()=>{var w;m.__hovered__=!1,(w=e.__hideTooltip__)==null||w.call(e)}),f)m.style.opacity="1";else{let w=l===void 0?"var(--nb-motion-quick)":`${l}ms`;m.style.transition=`opacity ${w} ease-in-out`,m.style.animation=`tooltipAppear ${w} var(--nb-ease-enter) forwards`}m.setAttribute("aria-hidden","true"),e.__trigger__=i,e.tooltipElement=m,(e.__chips__??(e.__chips__=new Set)).add(m),e.__lastContent__=C4(t),qn.add(e),document.body.appendChild(m),e.__requestedSide__=_,e.__side__=_,M0(e,m,_),WS(e),VS(e);let g=e.__openState__===!0;e.__openState__=!0,g||((v=t.onOpenChange)==null||v.call(t,!0,i))},h)},qf=(e,t,i=!0)=>{if(e.__hideTooltip__){e.__hideTooltip__(i?0:void 0,t);return}as(e,i,t)},as=(e,t=!1,i="dismiss")=>{var r,a;clearTimeout(e.__showTimer__),e.__showTimer__=void 0;let n=e.__openState__===!0;p4(e,t),qn.delete(e),e.__requestedSide__=void 0,n&&(e.__openState__=!1,(a=(r=e.__tooltipBinding__)==null?void 0:r.onOpenChange)==null||a.call(r,!1,i))},sC=(e,t)=>{let{header:i,body:n,tip:r,position:a}=t,s=Uf(t),l=Wf(t),o=e.__requestedSide__??e.__side__??a,u=e.tooltipElement;u&&(u.innerHTML=Kf({header:i,body:n,tip:r}),u.className=S4(e.__side__??o??"cursor",s,l),M0(e,u,o))};function lC(e,t,i,n,r,a,s){switch(e){case"top":return{top:t.top-(n+r*2),left:t.left+t.width/2-(i/2+r/2)};case"bottom":return{top:t.bottom+r,left:t.left+t.width/2-(i/2+r/2)};case"left":return{top:t.top+t.height/2-n/2,left:t.left-(i+r*2)};case"right":return{top:t.top+t.height/2-n/2,left:t.right+r};default:return{top:s+S6,left:a+S6}}}var S6=14;function C6(e,t,i,n,r){return t>=r&&e>=r&&t+i<=window.innerWidth-r&&e+n<=window.innerHeight-r}var oC={top:["bottom","right","left"],bottom:["top","right","left"],left:["right","top","bottom"],right:["left","top","bottom"],cursor:[]},M0=(e,t,i)=>{if(!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),a=r.width||0,s=r.height||0,l=e.__mouseX__??0,o=e.__mouseY__??0,u=i??"cursor",c=m=>lC(m,n,a,s,4,l,o),d=c(u),h=u;if(a>0&&s>0&&!C6(d.top,d.left,a,s,16))for(let m of oC[u]){let g=c(m);if(C6(g.top,g.left,a,s,16)){d=g,h=m;break}}let{top:f,left:_}=d;if(a>0&&s>0){let m=window.innerWidth-a-16,g=window.innerHeight-s-16;_>m&&(_=m),_<16&&(_=16),f>g&&(f=g),f<16&&(f=16)}if(h!=="cursor"){for(let m of["top","bottom","left","right"])t.classList.remove(`nb-tooltip-${m}`);t.classList.add(`nb-tooltip-${h}`)}if(e.__side__=h,a>0&&s>0&&h!=="cursor"){let m=n.left+n.width/2,g=n.top+n.height/2;if(h==="top"||h==="bottom"){let v=Math.max(8,Math.min(a-8,m-_))/a*100;t.style.setProperty("--nb-tooltip-arrow-offset",`${v}%`)}else{let v=Math.max(8,Math.min(s-8,g-f))/s*100;t.style.setProperty("--nb-tooltip-arrow-offset",`${v}%`)}}t.style.top=`${f}px`,t.style.left=`${_}px`};function uC(e){var i;for(let n of Array.from(qn))(i=n.__hideTooltip__)==null||i.call(n,0,e);let t=new Set;for(let n of Array.from(qn))for(let r of n.__chips__??[])t.add(r);document.querySelectorAll("span.nb-tooltip").forEach(n=>{t.has(n)||n.remove()})}function cC(){var e;for(let t of Array.from(qn))(e=t.__hideTooltip__)==null||e.call(t,0,"program");qn.clear();for(let t of Array.from(Gn))jf(t);document.querySelectorAll("span.nb-tooltip").forEach(t=>t.remove())}var dC=Vc({default:()=>hC});function k6(e,t){let i=t.value;if(i==null||i===""){e.removeAttribute(Dd);return}e.setAttribute(Dd,String(i))}var hC=e=>{e.directive("nb-tour-step",{mounted:k6,updated:k6,unmounted(t){t.removeAttribute(Dd)}})},fC=Object.assign({"./ContextMenu.directive.ts":mS,"./ToolTip.content.ts":gS,"./ToolTip.directive.ts":ES,"./TourStep.directive.ts":dC}),pC={install(e){Object.values(fC).forEach(t=>{typeof t.default=="function"&&t.default(e)})}},_C={install(e){let t=_S();e.provide(pS,t)}},mC={install(e,t={}){if(t.components)for(let[i,n]of Object.entries(t.components))e.component(i,n);e.use(pC),e.use(_C)}};function vC(e){return Symbol.for(`@nubisco/ui:${e}`)}function Bc(e,t){let i=vC(e),n=globalThis;return n[i]===void 0&&(n[i]=t()),n[i]}var k4=Bc("icon-registry",()=>new Map);function gC(e){if(typeof e=="object"&&e&&!("render"in e)&&!("setup"in e)&&!("template"in e)){let t=e;if("thin"in t||"light"in t||"regular"in t||"bold"in t||"fill"in t||"duotone"in t)return t}return{regular:e}}function bC(e){for(let[t,i]of Object.entries(e))k4.set(t,gC(i))}function yC(e,t="regular"){let i=k4.get(e);if(i){if(i[t])return i[t];if(i.regular)return i.regular;for(let n of["bold","fill","duotone","light","thin"])if(i[n])return i[n]}}var wC=e=>Symbol.for(`@nubisco/ui:${e}-catalog`);function SC(e){return globalThis[wC(e)]}var A6=new Map;function CC(e,t,i="regular"){let n=SC(e);if(!n){let o="Icon",u=`${e}s`;throw Error(`[@nubisco/ui] <Nb${o}> was given the runtime-resolved name "${t}", but the ${e} catalogue is not loaded. The name may also have been forwarded from another component's \`${e}\` prop. Three ways out, cheapest first: pass a literal name so the bundler plugin links just that ${e}; register the set the value can actually take with register${o}s() and pay for only those; or, if the value is genuinely open-ended (a picker, a CMS field), import '@nubisco/ui/${u}/all' in the file that needs the whole set.`)}let r=n[t];if(!r)return;let a=`${e}:${t}:${i}`,s=A6.get(a);if(s)return s;let l=$3(async()=>{let o=await r();return o[i]??o.regular??o.default});return A6.set(a,l),l}function kC(e,t="regular"){let i=e;return i&&typeof i=="object"&&("regular"in i||t in i)?i[t]??i.regular??i.default:e}function AC(e){var i;if(!e)return;let t=e;if(typeof t.glyphName=="string")return t.glyphName;if(typeof((i=t.regular)==null?void 0:i.glyphName)=="string")return t.regular.glyphName}function $6(e){return e.replace(new RegExp("(?<=[A-Z0-9])([A-Z])(?=[a-z])","g")," $1").replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()}function rr(e){var i,n;if(e.id)return e.id;let t=$6(((n=(i=Jt())==null?void 0:i.type)==null?void 0:n.__name)??"component");return typeof e.name=="string"&&e.name?`${t}-${$6(e.name)}`:`${t}-${an()}`}var A4=function(e){return e.Hover="hover",e.Always="always",e}(A4||{}),$4=function(e){return e.Thin="thin",e.Light="light",e.Regular="regular",e.Bold="bold",e.Fill="fill",e.Duotone="duotone",e}($4||{}),Wd=function(e){return e[e.XXL=92]="XXL",e[e.XL=32]="XL",e[e.LG=24]="LG",e[e.MD=20]="MD",e[e.SM=16]="SM",e[e.XS=12]="XS",e[e.XXS=8]="XXS",e}(Wd||{}),M6=new Set,L6=!1,E6=["xxs","xs","sm","md","lg","xl","xxl"],Ke=Je(Ne({__name:"Icon",props:{name:{default:void 0},icon:{default:void 0},size:{default:"sm"},animation:{default:null},animationMode:{default:A4.Always},color:{default:void 0},weight:{default:$4.Regular},title:{default:void 0},label:{default:void 0},clickable:{type:Boolean,default:!1},hoverable:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){let i=e,n=t;function r(w){typeof process<"u"||!(w==="xs"||w==="xxs"||typeof w=="number"&&w<16)||M6.has(String(w))||(M6.add(String(w)),console.warn(`[NbIcon] size ${JSON.stringify(w)} is deprecated: icons are drawn for 16px and up, and below that the stroke is under a pixel. Use the scale: sm (16), md (20), lg (24) or xl (32).`))}Pe(()=>i.size,r,{immediate:!0}),Pe(()=>i.clickable,w=>{!w||L6||typeof process<"u"||(L6=!0,console.warn('[NbIcon] `clickable` is deprecated. An icon that does something is a button: use <NbButton variant="ghost" icon="..." /> with v-nb-tooltip naming the action.'))},{immediate:!0});function a(w){i.clickable&&(w.key==="Enter"?(w.preventDefault(),n("click",w)):w.key===" "&&w.preventDefault())}function s(w){i.clickable&&w.key===" "&&n("click",w)}let l=H(()=>i.icon??i.name),o=H(()=>typeof l.value=="string"?l.value:AC(l.value)),u=H(()=>typeof l.value=="string"?void 0:l.value),c=rr({name:o.value}),d=Kv(),h=H(()=>i.label||i.title||void 0),f=H(()=>!!h.value||!!d["aria-label"]||!!d["aria-labelledby"]),_=H(()=>{let w=typeof i.size=="number"?i.size:Wd[String(i.size).toUpperCase()]||Wd.SM;return{id:c,...i.size&&{width:`${w}px`,height:`${w}px`},...i.title&&{title:i.title},...i.clickable?{role:"button",tabindex:0,"aria-label":h.value}:f.value?{role:"img","aria-label":h.value}:{"aria-hidden":"true"}}}),m=H(()=>{let w=u.value;if(w)return kC(w,i.weight);let S=typeof l.value=="string"?l.value:void 0;return S?yC(S,i.weight)||CC("icon",S,i.weight):void 0}),g=H(()=>({"nb-icon":!0,...o.value&&{[o.value]:!0},[`nb-icon-${i.size}`]:E6.includes(String(i.size)),[`nb-icon-animation-${i.animationMode}-${i.animation}`]:i.animation,hoverable:i.hoverable||i.animation&&i.animationMode==="hover","box-clickable":i.clickable})),v=H(()=>({...i.color&&{color:i.color},...typeof i.size=="number"&&{maxWidth:`${i.size}px`,maxHeight:`${i.size}px`,height:`${i.size}px`,width:`${i.size}px`},...typeof i.size=="string"&&!E6.includes(i.size)&&{maxWidth:i.size,maxHeight:i.size,height:i.size,width:i.size}}));return(w,S)=>(p(),$("i",yt({class:g.value,style:v.value},_.value,{onClick:S[0]||(S[0]=y=>e.clickable?n("click",y):void 0),onKeydown:a,onKeyup:s}),[m.value?(p(),le(mi(m.value),{key:0,"aria-hidden":"true",focusable:"false"})):P("",!0)],16))}}),[["__scopeId","data-v-db38800f"]]),M4="data-nb-layer",o0=Symbol.for("@nubisco/ui:layer");function Fa(e){if(!Number.isFinite(e))return 0;let t=Math.round(e);return t<0?0:t>3?3:t}function Ku(e){return`nb-layer-${e}`}function $C(e){let t=null,i=r=>{let a=/^nb-layer-([0-3])$/.exec(r.trim());if(!a)return;let s=Number(a[1]);(t===null||s>t)&&(t=s)},n=r=>{if(typeof r=="string"){for(let a of r.split(/\s+/))i(a);return}if(Array.isArray(r)){for(let a of r)n(a);return}if(r&&typeof r=="object")for(let[a,s]of Object.entries(r))s&&i(a)};return n(e),t}function MC(e){let t=(e==null?void 0:e.parentElement)??null;for(;t;){if(t.hasAttribute("data-nb-layer-context")){t=t.parentElement;continue}let i=t.getAttribute(M4);if(i!==null){let r=Number(i);if(Number.isFinite(r))return{level:Fa(r+1),source:"surface"}}let n=t.classList;if(n){for(let r=3;r>=0;r--)if(n.contains(Ku(r)))return{level:r,source:"class"}}t=t.parentElement}return null}function LC(e){if(!e)return null;if(e instanceof Element)return e;let t=e.$el;return t instanceof Element?t:null}function ua(e={}){let t=Jt(),i=At(o0,null),n=e.el??X(null),r=X(null),a=e.probe??!e.overlay,s=H(()=>{var u;let o=$v(e.level);return o===void 0?$C((u=t==null?void 0:t.attrs)==null?void 0:u.class):Fa(o)}),l=H(()=>{let o=s.value;if(o!==null)return o;if(e.overlay)return 3;let u=r.value;return u&&u.source==="class"?u.level:i?i.value:u?u.level:1});return a&&et(()=>{r.value=MC(LC(n.value)??((t==null?void 0:t.vnode.el)instanceof Element?t.vnode.el:null))}),e.provideContext!==!1&&xi(o0,H(()=>Fa(l.value+1))),{level:l,layerClass:H(()=>Ku(l.value)),layerProps:H(()=>({class:Ku(l.value),[M4]:String(l.value)})),surfaceRef:n}}var EC="(max-width: 671.98px), (pointer: coarse) and (hover: none) and (max-height: 500px)",xC="(max-width: 671.98px) and (pointer: coarse), (pointer: coarse) and (hover: none) and (max-height: 500px)",Ya=null;function x6(e,t){let i=window.matchMedia(e);t.value=i.matches;let n=r=>{t.value=r.matches};typeof i.addEventListener=="function"?i.addEventListener("change",n):typeof i.addListener=="function"&&i.addListener(n)}function ln(){return Ya||(Ya={phone:X(!1),phoneTouch:X(!1)},typeof window<"u"&&typeof window.matchMedia=="function"&&(x6(EC,Ya.phone),x6(xC,Ya.phoneTouch))),{phone:ia(Ya.phone),phoneTouch:ia(Ya.phoneTouch)}}const xs=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},TC=xs("info","0 0 256 256",'<path d="M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"/>'),HC=xs("info","0 0 256 256",'<path d="M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"/>'),jd=xs("info","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"/>'),NC=xs("info","0 0 256 256",'<path d="M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"/>'),PC=xs("info","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"/>'),OC=xs("info","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"/>'),IC="info",Zc=Object.freeze(Object.defineProperty({__proto__:null,bold:NC,default:jd,duotone:OC,fill:PC,glyphName:IC,light:HC,regular:jd,thin:TC},Symbol.toStringTag,{value:"Module"})),RC=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},T6=RC("caret-down","0 0 256 256",'<path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"/>');var DC=function(e){return e.ExtraExtraSmall="xxs",e.ExtraSmall="xs",e.Small="sm",e.Medium="md",e.Large="lg",e.ExtraLarge="xl",e.ExtraExtraLarge="xxl",e}({}),VC=function(e){return e.Small="sm",e.Medium="md",e.Large="lg",e}({});function Gf(){let e=Jt();return H(()=>{let t=e==null?void 0:e.appContext.components;return(t==null?void 0:t.RouterLink)??(t==null?void 0:t["router-link"])??null})}var L4=Symbol.for("@nubisco/ui:primary-action-scope"),E4=function(e){return e.Button="button",e.Submit="submit",e.Reset="reset",e}(E4||{}),BC={key:0,class:"nb-button__decorations"},ZC={key:0,class:"nb-button__spinner","aria-hidden":"true"},H6=new Set;function FC(e){if(typeof e=="string")return e;if(e&&(typeof e=="object"||typeof e=="function")){let t=e;if(typeof t.glyphName=="string")return t.glyphName}return""}var kt=Je(Ne({__name:"Button",props:{variant:{default:void 0},outlined:{type:Boolean,default:!1},size:{default:DC.Medium},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{default:void 0},iconWeight:{default:"regular"},type:{default:E4.Button},href:{default:void 0},target:{default:void 0},rel:{default:void 0},to:{default:void 0}},emits:["click"],setup(e){let t=e,i=H(()=>t.variant==="tertiary"?"primary":t.variant),n=H(()=>t.outlined||t.variant==="tertiary"),r=At(L4,null),a=null;et(()=>{r&&i.value==="primary"&&!n.value&&(a=r.register())}),Tt(()=>a==null?void 0:a());let s=vi(),l=H(()=>!s.default&&!!(t.icon||t.loading)),o=Gf(),u=H(()=>t.to!=null&&!!o.value),c=H(()=>{if(typeof t.to=="string")return t.to;if(t.href)return t.href}),d=H(()=>u.value?o.value:c.value?"a":"button"),h=H(()=>d.value==="a"?{href:c.value,target:t.target,rel:t.rel}:{}),f={xxs:16,xs:16,sm:16,md:16,lg:16,xl:20,xxl:32},_={xxs:16,xs:16,sm:16,md:20,lg:20,xl:24,xxl:32},m=H(()=>(l.value?_:f)[t.size??"md"]??(l.value?20:16)),g=Jt();return et(()=>{typeof process<"u"||l.value&&wt(()=>{var S;let v=(S=g==null?void 0:g.proxy)==null?void 0:S.$el;if(!v||typeof v.getAttribute!="function"||["aria-label","aria-labelledby","title"].some(y=>(v.getAttribute(y)??"").trim().length>0)||(v.textContent??"").trim().length>0)return;let w=FC(t.icon);H6.has(w)||(H6.add(w),console.warn(`[NbButton] An icon-only button${w?` (icon "${w}")`:""} has no accessible name, so a screen reader announces it as "button". Add aria-label, or name it with v-nb-tooltip.`,v))})}),(v,w)=>(p(),le(mi(d.value),yt({class:["nb-button",i.value?`nb-button--${i.value}`:null,`nb-button--${e.size}`,{"nb-button--outlined":n.value},{"nb-button--loading":e.loading},{"nb-button--icon-only":l.value}],to:u.value?e.to:void 0},h.value,{disabled:d.value==="button"?e.disabled||e.loading:void 0,"aria-disabled":d.value!=="button"&&(e.disabled||e.loading)?!0:void 0,type:d.value==="button"?e.type:void 0,onClick:w[0]||(w[0]=S=>e.disabled||e.loading?void 0:v.$emit("click",S))}),{default:I(()=>[Ae(v.$slots,"default",{},void 0,!0),e.loading||e.icon?(p(),$("div",BC,[e.loading?(p(),$("span",ZC)):e.icon?(p(),le(Ke,{key:1,name:e.icon,size:m.value,weight:e.iconWeight,class:"nb-button__icon"},null,8,["name","size","weight"])):P("",!0)])):P("",!0)]),_:3},16,["class","to","disabled","aria-disabled","type"]))}}),[["__scopeId","data-v-a354d1b5"]]),zC=['a[href]:not([tabindex="-1"])','area[href]:not([tabindex="-1"])','button:not([disabled]):not([tabindex="-1"])','input:not([disabled]):not([type="hidden"]):not([tabindex="-1"])','select:not([disabled]):not([tabindex="-1"])','textarea:not([disabled]):not([tabindex="-1"])','summary:not([tabindex="-1"])','audio[controls]:not([tabindex="-1"])','video[controls]:not([tabindex="-1"])','iframe:not([tabindex="-1"])','[contenteditable]:not([contenteditable="false"]):not([tabindex="-1"])','[tabindex]:not([tabindex="-1"])'].map(e=>`${e}:not([hidden]):not([aria-hidden="true"])`).join(",");function UC(e){return e?Array.from(e.querySelectorAll(zC)).filter(t=>t.getAttribute("aria-disabled")!=="true"):[]}function x4(){return typeof document>"u"?[]:Array.from(document.querySelectorAll('[aria-modal="true"]'))}function N6(e){if(!e)return!1;let t=x4();return t.length===0||t[t.length-1]===e}function WC(e){let{container:t,active:i,initialFocus:n,floatingSelector:r}=e;function a(g){let v=r==null?void 0:r();return!v||!g?!1:!!g.closest(v)}function s(g){let v=t();return!!v&&!!g&&v.contains(g)}function l(){return UC(t())}function o(){var g;(g=t())==null||g.focus()}function u(){let g=l()[0];g?g.focus():o()}let c=null;function d(){let g=c;c=null,g!=null&&g.isConnected&&g.focus()}function h(){c=document.activeElement instanceof HTMLElement?document.activeElement:null}function f(g){if(g.key!=="Tab"||!i())return;let v=t();if(!v||!N6(v)||a(document.activeElement))return;let w=l(),S=document.activeElement;if(w.length===0){g.preventDefault(),s(S)||o();return}let y=w[0],A=w[w.length-1];g.shiftKey&&(S===y||!s(S))?(g.preventDefault(),A.focus()):!g.shiftKey&&S===A?(g.preventDefault(),y.focus()):s(S)||(g.preventDefault(),y.focus())}function _(g){if(!i())return;let v=g.relatedTarget;if(v instanceof Element){if(s(v)||a(v))return}else if(v!==null)return;requestAnimationFrame(()=>{if(!i())return;let w=document.activeElement;s(w)||a(w)||w&&w!==document.body&&!w.isConnected||N6(t())&&u()})}typeof document<"u"&&(document.addEventListener("keydown",f,!0),document.addEventListener("focusout",_,!0));async function m(){if(await wt(),!i())return;let g=(n==null?void 0:n())??null;g?g.focus():u()}return Pe(i,(g,v)=>{g!==v&&(g?(h(),m()):d())}),et(()=>{i()&&(h(),m())}),Hi(()=>{typeof document<"u"&&(document.removeEventListener("keydown",f,!0),document.removeEventListener("focusout",_,!0)),d()}),{focusInside:u,restoreFocus:d}}var jC=Ne({__name:"Menu",props:{open:{type:Boolean,default:!1},size:{default:"md"},minWidth:{default:160},maxWidth:{default:288}},emits:["close","update:open"],setup(e,{expose:t,emit:i}){let n=e,r=i,a=X(null),s=X(-1),l=kr([]),{phone:o}=ln();function u(R){return o.value?`min(${R}px, calc(100vw - 16px))`:`${R}px`}let c=H(()=>({position:"fixed",top:`${d.top}px`,left:`${d.left}px`,minWidth:u(n.minWidth),maxWidth:u(n.maxWidth),zIndex:o.value?"var(--nb-zindex-modal-dropdown)":"var(--nb-zindex-menu)"})),d=kr({top:0,left:0});function h(R){d.top=R.bottom,d.left=R.left,_()}function f(R,j){d.top=j,d.left=R,_()}function _(){n.open&&wt(T)}function m(){r("close"),r("update:open",!1)}function g(R){return l.includes(R)||l.push(R),l.indexOf(R)}function v(R){let j=l.indexOf(R);j>=0&&l.splice(j,1)}let w=new Set;function S(R){w.add(R)}function y(R){w.delete(R)}xi("nb-menu",{size:n.size,close:m,highlightedIndex:s.value,registerItem:g,unregisterItem:v,registerSurface:S,unregisterSurface:y});function A(){return a.value?Array.from(a.value.querySelectorAll('[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]')).filter(R=>!R.closest(".nb-submenu")):[]}function L(R){let j=A();R>=0&&R<j.length&&(s.value=R,j[R].focus())}function k(R){if(R.key==="Escape"){if(R.defaultPrevented)return;R.preventDefault(),R.stopPropagation(),m();return}let j=A();if(!j.length)return;let G=j.indexOf(document.activeElement);G>=0&&(s.value=G);let ae=se=>{var me;return((me=j[se])==null?void 0:me.getAttribute("aria-disabled"))!=="true"};function q(se,me){for(let U=1;U<=j.length;U++){let ve=(se+me*U+j.length*U)%j.length;if(ae(ve))return ve}return-1}if(R.key==="ArrowDown"){R.preventDefault(),R.stopPropagation();let se=q(s.value,1);se>=0&&L(se)}else if(R.key==="ArrowUp"){R.preventDefault(),R.stopPropagation();let se=q(s.value<0?0:s.value,-1);se>=0&&L(se)}else if(R.key==="Home"){R.preventDefault(),R.stopPropagation();let se=q(-1,1);se>=0&&L(se)}else if(R.key==="End"){R.preventDefault(),R.stopPropagation();let se=q(j.length,-1);se>=0&&L(se)}else if(R.key==="Tab")m();else if(R.key.length===1&&R.key!==" "&&!R.ctrlKey&&!R.metaKey&&!R.altKey&&!R.target.closest("input, textarea, [contenteditable]")){let se=R.key.toLowerCase();for(let me=1;me<=j.length;me++){let U=(s.value+me+j.length)%j.length,ve=(j[U].textContent??"").trim().toLowerCase();if(ae(U)&&ve.startsWith(se)){R.preventDefault(),R.stopPropagation(),L(U);break}}}}function V(R){let j=R.target;if(!(!a.value||a.value.contains(j))){for(let G of w)if(G.contains(j))return;m()}}function T(){if(!a.value)return;let R=a.value.getBoundingClientRect();R.right>window.innerWidth&&(d.left=Math.max(8,window.innerWidth-R.width-8)),R.bottom>window.innerHeight&&(d.top=Math.max(8,window.innerHeight-R.height-8));let j=window.innerHeight-d.top-8;a.value.style.maxHeight=`${j}px`}let J=null;function x(){J=document.activeElement instanceof HTMLElement&&document.activeElement!==document.body?document.activeElement:null}function N(R){var j;if(!R||R===document.body||!R.isConnected||(j=a.value)!=null&&j.contains(R))return!0;for(let G of w)if(G.contains(R))return!0;return!1}function O(){let R=J;if(J=null,!(R!=null&&R.isConnected))return;let j=x4(),G=j[j.length-1];G&&!G.contains(R)||N(document.activeElement)&&R.focus()}return Pe(()=>n.open,R=>{R?(x(),s.value=-1,document.addEventListener("mousedown",V),wt(()=>{T(),A().length>0&&L(0)})):(s.value=-1,document.removeEventListener("mousedown",V),O())}),Tt(()=>{document.removeEventListener("mousedown",V)}),t({setPosition:h,setPositionXY:f,close:m,el:a}),(R,j)=>(p(),le($r,{to:"body"},[ee(sa,{name:"nb-menu"},{default:I(()=>[e.open?(p(),$("ul",{key:0,ref_key:"menuRef",ref:a,role:"menu",class:Te(["nb-menu",`nb-menu--${e.size}`]),style:ft(c.value),onKeydown:k},[Ae(R.$slots,"default")],38)):P("",!0)]),_:3})]))}});function T4(e){var i,n,r,a;let t=(i=e.name)==null?void 0:i.trim();if(t){let s=t.split(/\s+/);return((((n=s[0])==null?void 0:n[0])??"")+(s.length>1?((r=s[s.length-1])==null?void 0:r[0])??"":"")).toUpperCase()}return(((a=e.email)==null?void 0:a.trim().split("@")[0])??"").slice(0,2).toUpperCase()}var KC=["role","aria-label","aria-hidden","title"],qC=["src"],GC={key:1,class:"nb-avatar__initials","aria-hidden":"true"},qu=Ne({__name:"Avatar",props:{name:{default:void 0},email:{default:void 0},picture:{default:void 0},size:{default:"md"},background:{default:void 0},color:{default:void 0},decorative:{type:Boolean,default:!1}},setup(e){let t=e,i=X(!1);Pe(()=>t.picture,()=>{i.value=!1});let n=H(()=>{let l={};if(typeof t.size=="number"){let o=Math.max(1,t.size),u=Math.min(.42,Math.max(.3,.4-(o-20)*.0025));l.width=`${o}px`,l.height=`${o}px`,l.fontSize=`${Math.round(o*u*100)/100}px`}return t.background&&(l.background=t.background),t.color&&(l.color=t.color),l}),r=H(()=>!!t.picture&&!i.value),a=H(()=>T4(t)),s=H(()=>{var l,o;return((l=t.name)==null?void 0:l.trim())||((o=t.email)==null?void 0:o.trim())||""});return(l,o)=>(p(),$("span",{class:Te(["nb-avatar",[typeof e.size=="number"?null:`nb-avatar--${e.size}`]]),style:ft(n.value),role:e.decorative?void 0:"img","aria-label":e.decorative?void 0:s.value||void 0,"aria-hidden":e.decorative?"true":void 0,title:e.decorative?void 0:s.value||void 0},[r.value?(p(),$("img",{key:0,class:"nb-avatar__picture",src:e.picture??void 0,alt:"",onError:o[0]||(o[0]=u=>i.value=!0)},null,40,qC)):(p(),$("span",GC,K(a.value),1))],14,KC))}});const Ts=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},YC=Ts("check","0 0 256 256",'<path d="M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"/>'),XC=Ts("check","0 0 256 256",'<path d="M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"/>'),$n=Ts("check","0 0 256 256",'<path d="M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"/>'),JC=Ts("check","0 0 256 256",'<path d="M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"/>'),QC=Ts("check","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"/>'),ek=Ts("check","0 0 256 256",'<path d="M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z" opacity="0.2"/><path d="M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"/>'),tk="check",Yf=Object.freeze(Object.defineProperty({__proto__:null,bold:JC,default:$n,duotone:ek,fill:QC,glyphName:tk,light:XC,regular:$n,thin:YC},Symbol.toStringTag,{value:"Module"}));var ik=["role","aria-disabled","aria-checked","onKeydown"],nk={key:1,class:"nb-menu-item__check-placeholder"},rk=["title"],ak={key:2,class:"nb-menu-item__shortcut"},H4=Ne({__name:"MenuItem",props:{icon:{default:void 0},picture:{default:void 0},label:{},shortcut:{default:void 0},disabled:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},radioGroup:{default:void 0}},emits:["select","highlight"],setup(e,{expose:t,emit:i}){let n=e,r=i,a=X(null),s=At("nb-menu",null),l=H(()=>n.radioGroup?"menuitemradio":n.selectable?"menuitemcheckbox":"menuitem"),o=H(()=>["nb-menu-item",{"nb-menu-item--disabled":n.disabled,"nb-menu-item--danger":n.danger,"nb-menu-item--selected":n.selected}]);function u(){n.disabled||(r("select"),s==null||s.close())}return et(()=>{a.value&&s&&s.registerItem(a.value)}),Tt(()=>{a.value&&s&&s.unregisterItem(a.value)}),t({el:a}),(c,d)=>(p(),$("li",{ref_key:"itemRef",ref:a,class:Te(o.value),role:l.value,"aria-disabled":e.disabled||void 0,"aria-checked":e.selectable||e.radioGroup?e.selected:void 0,tabindex:-1,onClick:u,onKeydown:[Bi(Qe(u,["prevent"]),["enter"]),Bi(Qe(u,["prevent"]),["space"])],onMouseenter:d[0]||(d[0]=h=>c.$emit("highlight"))},[e.selectable&&e.selected?(p(),le(Ke,{key:0,name:Y($n),size:16,class:"nb-menu-item__check"},null,8,["name"])):e.selectable?(p(),$("span",nk)):P("",!0),Ae(c.$slots,"leading",{},()=>[e.picture===void 0?e.icon?(p(),le(Ke,{key:1,name:e.icon,size:16,class:"nb-menu-item__icon"},null,8,["name"])):P("",!0):(p(),le(qu,{key:0,class:"nb-menu-item__icon nb-menu-item__picture",name:e.label,picture:e.picture,size:16,decorative:""},null,8,["name","picture"]))]),M("span",{class:"nb-menu-item__label",title:e.label||void 0},K(e.label),9,rk),e.shortcut?(p(),$("kbd",ak,K(e.shortcut),1)):P("",!0),Ae(c.$slots,"trailing")],42,ik))}});function Xf(e){return e.some(t=>t.type===ti?!1:t.type===Lr?typeof t.children=="string"&&t.children.trim().length>0:t.type===$e?Array.isArray(t.children)?Xf(t.children):!1:!0)}function Jf(e,t){var n;let i=(n=e[t])==null?void 0:n.call(e);return i?Xf(i):!1}const sk=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},lk=sk("dots-three","0 0 256 256",'<path d="M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"/>');var ok={class:"nb-action-group"},Qf=Ne({__name:"ActionGroup",props:{items:{},size:{default:"sm"},overflow:{default:"never"},overflowLabel:{default:"More actions"},phoneVisible:{default:1}},emits:["select"],setup(e,{emit:t}){let i=e,n=t,r=vi(),{phone:a}=ln(),s=H(()=>i.overflow==="never"?!1:i.overflow==="always"?!0:a.value),l=H(()=>{let A=Math.max(0,i.phoneVisible),L=i.items.filter(k=>k.priority==="primary");return(L.length?L:i.items).slice(0,A)}),o=H(()=>i.items.filter(A=>!l.value.includes(A))),u=H(()=>o.value.length>0||Jf(r,"menu"));function c(A){return a.value&&!!A.icon}function d(A){return A.variant??(A.danger?"danger":void 0)}function h(A){var L;A.disabled||A.loading||((L=A.onSelect)==null||L.call(A),n("select",A.id))}let f=X(!1),_=X(null),m=X(null);function g(){var A;return((A=m.value)==null?void 0:A.$el)??null}let v=!1;function w(){v=f.value}function S(){var L,k;if(v||f.value){v=!1,f.value=!1;return}let A=(L=g())==null?void 0:L.getBoundingClientRect();A&&((k=_.value)==null||k.setPosition(A)),f.value=!0}function y(A){if(f.value=A,A)return;let L=document.activeElement;(!L||L===document.body||!L.isConnected)&&wt(()=>{var k;return(k=g())==null?void 0:k.focus()})}return(A,L)=>(p(),$("div",ok,[s.value?(p(),$($e,{key:1},[(p(!0),$($e,null,Ue(l.value,k=>(p(),$($e,{key:k.id},[c(k)?(p(),le(kt,{key:0,variant:d(k),outlined:k.outlined,size:e.size,disabled:k.disabled,loading:k.loading,icon:k.icon,"aria-label":k.label,"aria-pressed":k.pressed,onClick:V=>h(k)},null,8,["variant","outlined","size","disabled","loading","icon","aria-label","aria-pressed","onClick"])):(p(),le(kt,{key:1,variant:d(k),outlined:k.outlined,size:e.size,disabled:k.disabled,loading:k.loading,icon:k.icon,"aria-pressed":k.pressed,onClick:V=>h(k)},{default:I(()=>[_e(K(k.label),1)]),_:2},1032,["variant","outlined","size","disabled","loading","icon","aria-pressed","onClick"]))],64))),128)),u.value?(p(),le(kt,{key:0,ref_key:"triggerRef",ref:m,class:"nb-action-group__more",variant:"ghost",size:e.size,icon:Y(lk),"aria-label":e.overflowLabel,"aria-haspopup":"menu","aria-expanded":f.value,onMousedown:w,onClick:S},null,8,["size","icon","aria-label","aria-expanded"])):P("",!0),u.value?(p(),le(jC,{key:1,ref_key:"menuRef",ref:_,open:f.value,"onUpdate:open":y},{default:I(()=>[(p(!0),$($e,null,Ue(o.value,k=>(p(),le(H4,{key:k.id,label:k.label,icon:k.icon,disabled:k.disabled||k.loading,danger:k.danger,selectable:k.pressed!==void 0,selected:k.pressed,onSelect:V=>h(k)},null,8,["label","icon","disabled","danger","selectable","selected","onSelect"]))),128)),Ae(A.$slots,"menu")]),_:3},8,["open"])):P("",!0)],64)):(p(!0),$($e,{key:0},Ue(e.items,k=>(p(),le(kt,{key:k.id,variant:d(k),outlined:k.outlined,size:e.size,disabled:k.disabled,loading:k.loading,icon:k.icon,"aria-pressed":k.pressed,onClick:V=>h(k)},{default:I(()=>[_e(K(k.label),1)]),_:2},1032,["variant","outlined","size","disabled","loading","icon","aria-pressed","onClick"]))),128))]))}}),e2=Ne({__name:"PrimaryActionScope",props:{owner:{}},setup(e){let t=e,i=0,n=!1;function r(){return!(typeof process<"u")}return xi(L4,{register(){i+=1,i>1&&!n&&r()&&(n=!0,console.warn(`[${t.owner}] ${i} filled primary buttons in one header's actions slot. A header carries one primary action: step the others down to \`tertiary\` or \`ghost\`. See https://docs.nubisco.io/ui/principles/hierarchy`));let a=!0;return()=>{a&&(a=!1,--i)}}}),(a,s)=>Ae(a.$slots,"default")}});function t2(e,t){let i=Gf(),n=H(()=>e.to!=null&&!e.disabled&&!!i.value),r=H(()=>typeof e.to=="string"?e.to:e.href||void 0),a=H(()=>!e.disabled&&(n.value||!!r.value)),s=H(()=>(a.value||!!e.clickable)&&!e.disabled),l=H(()=>n.value?i.value:a.value?"a":"div"),o=H(()=>{let h=e.target==="_blank"?"noopener":void 0;return n.value?{to:e.to,target:e.target,rel:h}:a.value?{href:r.value,target:e.target,rel:h}:e.clickable&&!e.disabled?{role:"button",tabindex:0,"aria-pressed":e.selected?!0:void 0}:{}}),u=()=>!!e.clickable&&!e.disabled&&!a.value;function c(h){u()&&t(h)}function d(h){u()&&(h.key!=="Enter"&&h.key!==" "||(h.preventDefault(),t(h)))}return{tag:l,attrs:o,isLink:a,isInteractive:s,onClick:c,onKeydown:d}}const Hs=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},uk=Hs("image","0 0 256 256",'<path d="M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM40,52H216a4,4,0,0,1,4,4V168.4l-32.89-32.89a12,12,0,0,0-17,0l-22.83,22.83-46.82-46.83a12,12,0,0,0-17,0L36,159V56A4,4,0,0,1,40,52ZM36,200V170.34l53.17-53.17a4,4,0,0,1,5.66,0L181.66,204H40A4,4,0,0,1,36,200Zm180,4H193l-40-40,22.83-22.83a4,4,0,0,1,5.66,0L220,179.71V200A4,4,0,0,1,216,204ZM148,100a8,8,0,1,1,8,8A8,8,0,0,1,148,100Z"/>'),ck=Hs("image","0 0 256 256",'<path d="M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM40,54H216a2,2,0,0,1,2,2V163.57L188.53,134.1a14,14,0,0,0-19.8,0l-21.42,21.42L101.9,110.1a14,14,0,0,0-19.8,0L38,154.2V56A2,2,0,0,1,40,54ZM38,200V171.17l52.58-52.58a2,2,0,0,1,2.84,0L176.83,202H40A2,2,0,0,1,38,200Zm178,2H193.8l-38-38,21.41-21.42a2,2,0,0,1,2.83,0l38,38V200A2,2,0,0,1,216,202ZM146,100a10,10,0,1,1,10,10A10,10,0,0,1,146,100Z"/>'),P6=Hs("image","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"/>'),dk=Hs("image","0 0 256 256",'<path d="M144,96a16,16,0,1,1,16,16A16,16,0,0,1,144,96Zm92-40V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56ZM44,60v79.72l33.86-33.86a20,20,0,0,1,28.28,0L147.31,147l17.18-17.17a20,20,0,0,1,28.28,0L212,149.09V60Zm0,136H162.34L92,125.66l-48,48Zm168,0V183l-33.37-33.37L164.28,164l32,32Z"/>'),hk=Hs("image","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM156,88a12,12,0,1,1-12,12A12,12,0,0,1,156,88Zm60,112H40V160.69l46.34-46.35a8,8,0,0,1,11.32,0h0L165,181.66a8,8,0,0,0,11.32-11.32l-17.66-17.65L173,138.34a8,8,0,0,1,11.31,0L216,170.07V200Z"/>'),fk=Hs("image","0 0 256 256",'<path d="M224,56V178.06l-39.72-39.72a8,8,0,0,0-11.31,0L147.31,164,97.66,114.34a8,8,0,0,0-11.32,0L32,168.69V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z" opacity="0.2"/><path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"/>'),pk="image",_k=Object.freeze(Object.defineProperty({__proto__:null,bold:dk,default:P6,duotone:fk,fill:hk,glyphName:pk,light:ck,regular:P6,thin:uk},Symbol.toStringTag,{value:"Module"}));var mk=["src","alt"],vk={key:1,class:"nb-card__icon"},gk={key:0,class:"nb-card__meta"},bk={key:1,class:"nb-card__actions"},yk={key:2,class:"nb-card__subtitle"},wk={key:3,class:"nb-card__body"},Sk={key:4,class:"nb-card__footer"},N4=Je(Ne({__name:"Card",props:{title:{default:""},subtitle:{default:""},description:{default:void 0},headingLevel:{default:"h3"},flat:{type:Boolean,default:!1},icon:{default:void 0},orientation:{default:"vertical"},size:{default:"md"},image:{default:void 0},imageAlt:{default:""},imageRatio:{default:void 0},imageFit:{default:"cover"},href:{default:void 0},to:{default:void 0},target:{default:void 0},clickable:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["select"],setup(e,{emit:t}){let i=e,n=t,r=vi(),a=H(()=>i.image!==void 0||!!r.media),s=X(!1);Pe(()=>i.image,()=>{s.value=!1});let l=H(()=>!i.image||s.value),o=H(()=>({"--nb-card-image-ratio":i.imageRatio,"--nb-card-image-fit":i.imageFit})),{level:u,layerProps:c}=ua({provideContext:!1}),d=H(()=>i.flat?{}:c.value);xi(o0,H(()=>i.flat?u.value:Fa(u.value+1)));let h=H(()=>i.description||i.subtitle),f=H(()=>!i.title&&!r.title||i.clickable&&!i.href&&!i.to?"span":i.headingLevel),_=H(()=>Ku(Fa(u.value+1))),{tag:m,attrs:g,isInteractive:v,onClick:w,onKeydown:S}=t2(i,y=>n("select",y));return(y,A)=>(p(),le(mi(Y(m)),yt({class:["nb-card",{"nb-card--horizontal":e.orientation==="horizontal","nb-card--sm":e.size==="sm","nb-card--interactive":Y(v),"nb-card--selected":e.selected,"nb-card--disabled":e.disabled,"nb-card--decorated":!!y.$slots.decorator,"nb-card--flat":e.flat}]},{...Y(g),...d.value},{onClick:Y(w),onKeydown:Y(S)}),{default:I(()=>[a.value?(p(),$("div",{key:0,class:Te(["nb-card__media",[_.value,{"nb-card__media--empty":l.value&&!y.$slots.media}]]),style:ft(o.value)},[Ae(y.$slots,"media",{},()=>[l.value?(p(),le(Ke,{key:1,class:"nb-card__placeholder",name:_k,size:24,"aria-hidden":"true"})):(p(),$("img",{key:0,class:"nb-card__image",src:e.image,alt:e.imageAlt,loading:"lazy",decoding:"async",onError:A[0]||(A[0]=L=>s.value=!0)},null,40,mk))])],6)):P("",!0),e.icon||y.$slots.icon?(p(),$("div",vk,[Ae(y.$slots,"icon",{},()=>[ee(Ke,{name:e.icon,size:20,"aria-hidden":"true"},null,8,["name"])])])):P("",!0),y.$slots.decorator?(p(),$("div",{key:2,class:"nb-card__decorator",onClick:A[1]||(A[1]=Qe(()=>{},["stop"])),onKeydown:A[2]||(A[2]=Qe(()=>{},["stop"]))},[Ae(y.$slots,"decorator")],32)):P("",!0),M("div",{class:Te(["nb-card__head",{"nb-card__head--bar":y.$slots.meta||y.$slots.actions}])},[(p(),le(mi(f.value),{class:"nb-card__title"},{default:I(()=>[Ae(y.$slots,"title",{},()=>[_e(K(e.title),1)])]),_:3})),y.$slots.meta?(p(),$("span",gk,[Ae(y.$slots,"meta")])):P("",!0),y.$slots.actions?(p(),$("div",bk,[ee(e2,{owner:"NbCard"},{default:I(()=>[Ae(y.$slots,"actions")]),_:3})])):P("",!0),h.value||y.$slots.subtitle?(p(),$("span",yk,[Ae(y.$slots,"subtitle",{},()=>[_e(K(h.value),1)])])):P("",!0)],2),y.$slots.default?(p(),$("div",wk,[Ae(y.$slots,"default")])):P("",!0),y.$slots.footer?(p(),$("div",Sk,[Ae(y.$slots,"footer")])):P("",!0)]),_:3},16,["class","onClick","onKeydown"]))}}),[["__scopeId","data-v-4aacef20"]]),Ck=["data-gap","data-ratio"],i2=Je(Ne({__name:"CardGrid",props:{min:{default:"260px"},gap:{default:"md"},fill:{default:"auto-fill"},ratio:{}},setup(e){let t=e,i=H(()=>({gridTemplateColumns:`repeat(${t.fill}, minmax(min(${t.min}, 100%), 1fr))`}));return(n,r)=>(p(),$("div",{class:"nb-card-grid","data-gap":e.gap,"data-ratio":e.ratio?e.ratio.replace(":","-"):void 0,style:ft(i.value)},[Ae(n.$slots,"default")],12,Ck))}}),[["__scopeId","data-v-bc123fc9"]]);const Ns=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},kk=Ns("copy","0 0 256 256",'<path d="M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"/>'),Ak=Ns("copy","0 0 256 256",'<path d="M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"/>'),O6=Ns("copy","0 0 256 256",'<path d="M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"/>'),$k=Ns("copy","0 0 256 256",'<path d="M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"/>'),Mk=Ns("copy","0 0 256 256",'<path d="M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"/>'),Lk=Ns("copy","0 0 256 256",'<path d="M216,40V168H168V88H88V40Z" opacity="0.2"/><path d="M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"/>'),Ek="copy",xk=Object.freeze(Object.defineProperty({__proto__:null,bold:$k,default:O6,duotone:Lk,fill:Mk,glyphName:Ek,light:Ak,regular:O6,thin:kk},Symbol.toStringTag,{value:"Module"}));var Tk={class:"nb-copy-button"},Hk={class:"nb-copy-button__status",role:"status"},Nk=Ne({__name:"CopyButton",props:{text:{},label:{default:"Copy"},copiedLabel:{default:"Copied"},size:{default:"xs"},duration:{default:1500}},emits:["copied","error"],setup(e,{emit:t}){let i=e,n=t,r=X(!1),a;async function s(o){var d,h;if((d=navigator.clipboard)!=null&&d.writeText)try{await navigator.clipboard.writeText(o);return}catch{}let u=document.createElement("textarea");u.value=o,u.setAttribute("readonly",""),u.style.position="fixed",u.style.opacity="0",document.body.appendChild(u),u.select();let c=((h=document.execCommand)==null?void 0:h.call(document,"copy"))??!1;if(u.remove(),!c)throw Error("The browser did not allow copying.")}async function l(){try{await s(i.text)}catch(o){n("error",o);return}r.value=!0,n("copied",i.text),clearTimeout(a),a=setTimeout(()=>r.value=!1,i.duration)}return Tt(()=>clearTimeout(a)),(o,u)=>{let c=Ln("nb-tooltip");return p(),$("span",Tk,[ut(ee(kt,{"aria-label":r.value?e.copiedLabel:e.label,class:Te(["nb-copy-button__button",{"nb-copy-button__button--copied":r.value}]),variant:"ghost",size:e.size,icon:r.value?Yf:xk,onClick:Qe(l,["stop","prevent"]),onPointerdown:u[0]||(u[0]=Qe(()=>{},["stop"])),onMousedown:u[1]||(u[1]=Qe(()=>{},["stop"])),onDblclick:u[2]||(u[2]=Qe(()=>{},["stop"]))},null,8,["aria-label","class","size","icon"]),[[c,{body:r.value?e.copiedLabel:e.label,aria:"none"}]]),M("span",Hk,K(r.value?e.copiedLabel:""),1)])}}});const Ps=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},Pk=Ps("arrow-up","0 0 256 256",'<path d="M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z"/>'),Ok=Ps("arrow-up","0 0 256 256",'<path d="M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z"/>'),I6=Ps("arrow-up","0 0 256 256",'<path d="M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z"/>'),Ik=Ps("arrow-up","0 0 256 256",'<path d="M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"/>'),Rk=Ps("arrow-up","0 0 256 256",'<path d="M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z"/>'),Dk=Ps("arrow-up","0 0 256 256",'<path d="M200,112H56l72-72Z" opacity="0.2"/><path d="M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z"/>'),Vk="arrow-up",Bk=Object.freeze(Object.defineProperty({__proto__:null,bold:Ik,default:I6,duotone:Dk,fill:Rk,glyphName:Vk,light:Ok,regular:I6,thin:Pk},Symbol.toStringTag,{value:"Module"}));var Zk=["for","title"],Fk={class:"nb-field__control"},zk=["id"],L0=Je(Ne({__name:"Field",props:{label:{default:void 0},hint:{default:void 0},orientation:{default:"row"},align:{default:"center"},control:{default:"fill"},labelFor:{default:void 0}},setup(e){let t=e,i=an(),n=H(()=>t.labelFor??i),r=vi(),a=H(()=>!!t.hint||!!r.hint),s=H(()=>`${n.value}-hint`);return(l,o)=>(p(),$("div",{class:Te(["nb-field",`nb-field--${e.orientation}`,`nb-field--align-${e.align}`,`nb-field--control-${e.control}`])},[l.$slots.label?Ae(l.$slots,"label",{key:0},void 0,!0):e.label?(p(),$("label",{key:1,class:"nb-field__label",for:n.value,title:e.label},K(e.label),9,Zk)):P("",!0),M("div",Fk,[Ae(l.$slots,"default",{id:n.value,describedby:a.value?s.value:void 0},void 0,!0)]),a.value?(p(),$("div",{key:2,id:s.value,class:"nb-field__hint"},[Ae(l.$slots,"hint",{},()=>[_e(K(e.hint),1)],!0)],8,zk)):P("",!0)],2))}}),[["__scopeId","data-v-a37faf77"]]),Uk={key:0,class:"nb-panel__header"},Wk={class:"nb-panel__heading"},jk={key:0,class:"nb-panel__title-row"},Kk={key:1,class:"nb-panel__meta"},qk={key:1,class:"nb-panel__description"},Gk={key:0,class:"nb-panel__actions"},Fc=Je(Ne({__name:"Panel",props:{layer:{default:void 0},title:{default:void 0},description:{default:void 0},headingLevel:{default:"h2"},flat:{type:Boolean,default:!1}},setup(e){let t=e,i=vi(),n=H(()=>!!t.title||!!t.description||!!i.meta||!!i.actions),{level:r,layerProps:a}=ua({level:()=>t.layer,provideContext:!1});return xi(o0,H(()=>t.flat?r.value:Fa(r.value+1))),(s,l)=>(p(),$("div",yt({class:["nb-panel",{"nb-panel--flat":e.flat}]},e.flat?void 0:Y(a)),[n.value?(p(),$("div",Uk,[M("div",Wk,[e.title||s.$slots.meta?(p(),$("div",jk,[e.title?(p(),le(mi(e.headingLevel),{key:0,class:"nb-panel__title"},{default:I(()=>[_e(K(e.title),1)]),_:1})):P("",!0),s.$slots.meta?(p(),$("span",Kk,[Ae(s.$slots,"meta",{},void 0,!0)])):P("",!0)])):P("",!0),e.description?(p(),$("p",qk,K(e.description),1)):P("",!0)]),s.$slots.actions?(p(),$("div",Gk,[ee(e2,{owner:"NbPanel"},{default:I(()=>[Ae(s.$slots,"actions",{},void 0,!0)]),_:3})])):P("",!0)])):P("",!0),Ae(s.$slots,"default",{},void 0,!0)],16))}}),[["__scopeId","data-v-fe110d1d"]]),P4=function(e){return e.Small="sm",e.Medium="md",e}(P4||{}),Yk=["for"],Xk={key:0,class:"nb-label__asterisk","aria-hidden":"true"},Os=Je(Ne({__name:"Label",props:{htmlFor:{default:void 0},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:P4.Medium}},setup(e){return(t,i)=>(p(),$("label",{for:e.htmlFor,class:Te(["nb-label",`nb-label--${e.size}`,{"nb-label--required":e.required,"nb-label--disabled":e.disabled}])},[Ae(t.$slots,"default",{},void 0,!0),e.required?(p(),$("span",Xk,"*")):P("",!0),Ae(t.$slots,"suffix",{},void 0,!0)],10,Yk))}}),[["__scopeId","data-v-ca37c1cf"]]);const Is=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},Jk=Is("warning-circle","0 0 256 256",'<path d="M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z"/>'),Qk=Is("warning-circle","0 0 256 256",'<path d="M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z"/>'),Kd=Is("warning-circle","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"/>'),eA=Is("warning-circle","0 0 256 256",'<path d="M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z"/>'),tA=Is("warning-circle","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"/>'),iA=Is("warning-circle","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"/>'),nA="warning-circle",Rs=Object.freeze(Object.defineProperty({__proto__:null,bold:eA,default:Kd,duotone:iA,fill:tA,glyphName:nA,light:Qk,regular:Kd,thin:Jk},Symbol.toStringTag,{value:"Module"})),Ds=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},rA=Ds("warning","0 0 256 256",'<path d="M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"/>'),aA=Ds("warning","0 0 256 256",'<path d="M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"/>'),cs=Ds("warning","0 0 256 256",'<path d="M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"/>'),sA=Ds("warning","0 0 256 256",'<path d="M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"/>'),lA=Ds("warning","0 0 256 256",'<path d="M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"/>'),oA=Ds("warning","0 0 256 256",'<path d="M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z" opacity="0.2"/><path d="M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"/>'),uA="warning",zc=Object.freeze(Object.defineProperty({__proto__:null,bold:sA,default:cs,duotone:oA,fill:lA,glyphName:uA,light:aA,regular:cs,thin:rA},Symbol.toStringTag,{value:"Module"})),Vs=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},cA=Vs("check-circle","0 0 256 256",'<path d="M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"/>'),dA=Vs("check-circle","0 0 256 256",'<path d="M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"/>'),R6=Vs("check-circle","0 0 256 256",'<path d="M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"/>'),hA=Vs("check-circle","0 0 256 256",'<path d="M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"/>'),fA=Vs("check-circle","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"/>'),pA=Vs("check-circle","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"/>'),_A="check-circle",Bs=Object.freeze(Object.defineProperty({__proto__:null,bold:hA,default:R6,duotone:pA,fill:fA,glyphName:_A,light:dA,regular:R6,thin:cA},Symbol.toStringTag,{value:"Module"}));var Gu=function(e){return e.Error="error",e.Warning="warning",e.Success="success",e.Helper="helper",e}(Gu||{}),mA=["role","aria-live"],vA={class:"nb-message__text"},gA={key:0,class:"nb-message__tooltip","aria-hidden":"true"},_t=Je(Ne({__name:"Message",props:{variant:{default:Gu.Helper},iconOnly:{type:Boolean,default:!1},live:{default:"auto"}},setup(e){let t=e,i=H(()=>{if(t.live!=="off")return t.live==="alert"?"alert":"status"}),n=H(()=>{if(t.live!=="off")return t.live==="alert"?"assertive":t.live==="status"?"polite":t.variant==="error"?"assertive":"polite"}),r={error:Rs,warning:zc,success:Bs,helper:Zc};return(a,s)=>(p(),$("div",{class:Te(["nb-message",`nb-message--${t.variant}`,{"nb-message--icon-only":t.iconOnly}]),role:i.value,"aria-live":n.value},[ee(Ke,{name:r[t.variant],size:"sm",class:"nb-message__icon"},null,8,["name"]),M("span",vA,[Ae(a.$slots,"default",{},void 0,!0)]),t.iconOnly?(p(),$("span",gA,[Ae(a.$slots,"default",{},void 0,!0)])):P("",!0)],10,mA))}}),[["__scopeId","data-v-4d1339fc"]]),bA=["1/3","2/3","1/5","2/5","3/5","4/5","1/6","5/6"],yA=["1:1","2:1","2:3","3:2","4:3","16:9"],Zi=Ne({__name:"Grid",props:{id:{type:String,default:null},is:{type:String,default:"div"},dir:{type:[String,Object,Function],default:"row",validator:e=>typeof e=="function"?!0:typeof e=="string"?["row","col","row-reverse","col-reverse"].includes(e):Object.values(e).every(t=>["row","col","row-reverse","col-reverse"].includes(t))},align:{type:[String,Object,Function],default:null,validator:e=>e==null||typeof e=="function"?!0:typeof e=="string"?["start","end","center","baseline","stretch"].includes(e):Object.values(e).every(t=>["start","end","center","baseline","stretch"].includes(t))},justify:{type:[String,Object,Function],default:null,validator:e=>e==null||typeof e=="function"?!0:typeof e=="string"?["around","between","center","end","evenly","start"].includes(e):Object.values(e).every(t=>["around","between","center","end","evenly","start"].includes(t))},gap:{type:[String,Object,Function],default:null,validator:e=>{if(e==null||typeof e=="function")return!0;let t=["xxs","xs","sm","md","lg","xl","xxl"];return typeof e=="string"?t.includes(e):Object.values(e).every(i=>t.includes(i))}},grid:{type:[Number,String,Object,Function],default:null,validator:e=>{if(e==null||typeof e=="function")return!0;let t=i=>{if(typeof i=="string"&&i.includes("/"))return bA.includes(i);let n=typeof i=="string"?parseInt(i,10):i;return n>=1&&n<=16&&!isNaN(n)};return typeof e=="number"||typeof e=="string"?t(e):Object.values(e).every(t)}},shift:{type:[Number,String,Object,Function],default:null,validator:e=>{if(e==null||typeof e=="function")return!0;let t=i=>{let n=typeof i=="string"?parseInt(i,10):i;return n>=0&&n<=15&&!isNaN(n)};return typeof e=="number"||typeof e=="string"?t(e):Object.values(e).every(t)}},wrap:{type:[String,Object,Function],default:null,validator:e=>e==null||typeof e=="function"?!0:typeof e=="string"?["nowrap","wrap","reverse"].includes(e):Object.values(e).every(t=>["nowrap","wrap","reverse"].includes(t))},first:{type:[Boolean,Array],default:null,validator:e=>{if(e==null||typeof e=="boolean")return!0;let t=["sm","md","lg","xl","xxl"];return e.every(i=>t.includes(i))}},last:{type:[Boolean,Array],default:null,validator:e=>{if(e==null||typeof e=="boolean")return!0;let t=["sm","md","lg","xl","xxl"];return e.every(i=>t.includes(i))}},visible:{type:[Boolean,Object,Function],default:null},reverse:{type:[Boolean,Array],default:!1,validator:e=>{if(e==null||typeof e=="boolean")return!0;let t=["sm","md","lg","xl","xxl"];return e.every(i=>t.includes(i))}},grow:{type:Boolean,default:null},flex:{type:Boolean,default:null},shrink:{type:Boolean,default:null},distributed:{type:Boolean,default:!1},mode:{type:String,default:null,validator:e=>e==null?!0:["wide","narrow","condensed"].includes(e)},hang:{type:Boolean,default:!1},container:{type:Boolean,default:!1},subgrid:{type:Boolean,default:!1},ratio:{type:String,default:null,validator:e=>e==null||yA.includes(e)},tabIndex:{type:String,default:null}},setup(e,{expose:t}){let i=["a","button","input","textarea","select","details","iframe","object","embed","area","audio","video"],n=X();t({getRef:()=>n.value});let r=e,a=S=>S.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function s(S,y){let{collection:A,breakpoint:L}=y,k=L?`${L}-`:"";A[`${k}${S}`]=!0}function l(S,y){let{collection:A,breakpoint:L,classMap:k}=y,V=L?`${L}-`:"",T=(k==null?void 0:k[S])??S;A[`${V}align-${T}`]=!0}function o(S,y){let{collection:A,breakpoint:L,classMap:k}=y,V=L?`${L}-`:"",T=(k==null?void 0:k[S])??S;A[`${V}justify-${T}`]=!0}function u(S,y){let{collection:A,breakpoint:L}=y,k=L?`${L}-`:"";A[`${k}gap-${S}`]=!0}function c(S,y){let{collection:A,breakpoint:L}=y,k=L?`${L}-`:"";A[`${k}grid-${String(S).replace("/","-")}`]=!0}function d(S,y){let{collection:A,breakpoint:L}=y,k=L?`${L}-`:"";A[`${k}shift-${S}`]=!0}function h(S,y){let{collection:A,breakpoint:L}=y,k=L?`${L}-`:"";A[`${k}${S}`]=!0}function f(S,y){if(!S)return;let{collection:A,breakpoint:L}=y,k=L?`${L}-`:"";A[`${k}reverse`]=!0}function _(S,y,A){if(!S)return;let{collection:L,breakpoint:k}=y,V=k?`${k}-`:"";L[`${V}${A}`]=!0}function m(S,y){let{collection:A,breakpoint:L}=y,k=L?`${L}-`:"";A[`${k}${S?"visible":"hidden"}`]=!0}function g(S,y,A){let L={};if(S==null)return L;if(typeof S=="function"){let k=S();return k!=null&&y(k,{collection:L,classMap:A}),L}return typeof S=="string"||typeof S=="number"||typeof S=="boolean"?(y(S,{collection:L,classMap:A}),L):Array.isArray(S)?(S.forEach(k=>{y(!0,{collection:L,breakpoint:a(k),classMap:A})}),L):(typeof S=="object"&&Object.entries(S).forEach(([k,V])=>{V!=null&&y(V,{collection:L,breakpoint:a(k),classMap:A})}),L)}let v=S=>{let y={top:"start",bottom:"end",center:"center",stretch:"stretch",baseline:"base"},A={left:"start",right:"end",center:"center",between:"between",around:"around",evenly:"evenly"};return{"nb-grid":!0,...g(S.dir,s),...g(S.align,l,y),...g(S.justify,o,A),...g(S.gap,u),...g(S.grid,c),...g(S.shift,d),...g(S.wrap,h),...g(S.reverse,f),...g(S.first,(L,k)=>_(L,k,"first")),...g(S.last,(L,k)=>_(L,k,"last")),...g(S.visible,m),...S.flex?{flex:!0}:{},...S.distributed?{distributed:!0}:{},...S.mode?{[`nb-grid--${S.mode}`]:!0}:{},...S.hang?{"nb-grid--hang":!0}:{},...S.container?{"nb-grid--container":!0}:{},...S.subgrid?{"nb-grid--subgrid":!0}:{},...S.ratio?{[`nb-grid--ratio-${S.ratio.replace(":","-")}`]:!0}:{},...S.grow?{grow:!0}:{},...S.shrink!==null&&S.shrink!==void 0?{[`shrink-${S.shrink?"1":"0"}`]:!0}:{}}},w=H(()=>v(r));return(S,y)=>(p(),le(mi(S.is),{id:S.id,ref_key:"root",ref:n,class:Te(w.value),tabindex:S.tabIndex??!i.includes(S.is)?"-1":"0"},{default:I(()=>[Ae(S.$slots,"default")]),_:3},8,["id","class","tabindex"]))}});function Uc(e,t){let i=H(()=>e.error?"error":e.warning?"warning":e.helper?"helper":null),n=H(()=>i.value?String(e[i.value]??""):""),r=H(()=>{let o=$v(t);return{error:`${o}-error`,warning:`${o}-warning`,helper:`${o}-helper`}}),a=H(()=>i.value?r.value[i.value]:void 0),s=H(()=>e.error?"true":void 0),l=X(!1);return Pe(()=>[e.error,e.warning,e.helper],()=>{l.value=!0}),{variant:i,text:n,ids:r,messageId:a,invalid:s,live:H(()=>l.value?i.value==="error"?"alert":i.value==="warning"?"status":"off":"off"),key:H(()=>`${i.value??"none"}:${n.value}`)}}function wA(...e){let t=e.filter(Boolean).flatMap(n=>String(n).split(/\s+/)).filter(Boolean),i=[...new Set(t)];return i.length?i.join(" "):void 0}function SA(e){let t=At("nb-menu",null);t&&(Pe(e,(i,n)=>{n&&t.unregisterSurface(n),i&&t.registerSurface(i)}),Tt(()=>{e.value&&t.unregisterSurface(e.value)}))}const CA=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},D6=CA("caret-up","0 0 256 256",'<path d="M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"/>'),kA=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},ir=kA("x","0 0 256 256",'<path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"/>');var AA=["id","aria-expanded","aria-disabled","aria-required","aria-invalid","aria-describedby","disabled"],$A={key:2,class:"nb-select__clear-space","aria-hidden":"true"},MA=["aria-label"],LA=["id","aria-expanded","aria-disabled","aria-required","aria-invalid","aria-describedby","disabled"],EA={key:1,class:"nb-select__inner-label"},xA={key:0,class:"nb-select__asterisk","aria-hidden":"true"},TA={key:0,class:"nb-select__clear-space","aria-hidden":"true"},HA=["aria-label"],NA=["id","aria-multiselectable"],PA={key:0,class:"nb-select__search"},OA=["placeholder","aria-label","aria-controls","aria-activedescendant"],IA=["aria-labelledby"],RA=["id"],DA=["id","data-index","aria-selected","aria-disabled","onMouseenter","onClick"],VA={key:0,class:"nb-select__option-check","aria-hidden":"true"},BA={key:0,viewBox:"0 0 10 8",fill:"none",width:"10",height:"8"},ZA={class:"nb-select__option-label"},FA={key:1,class:"nb-select__empty"},zA={key:2,class:"nb-select__empty"},UA=["placeholder","onKeydown"],Zs=Ne({__name:"Select",props:{modelValue:{default:null},options:{default:()=>[]},multiple:{type:Boolean,default:!1},creatable:{type:Boolean,default:!1},createPlaceholder:{default:""},clearable:{type:Boolean,default:!1},clearLabel:{default:"Clear selection"},searchable:{type:Boolean,default:!1},searchPlaceholder:{default:"Search"},noResultsLabel:{default:"No results"},anchor:{type:[Function,null],default:null},selectedMark:{default:"fill"},placeholder:{default:"Select…"},name:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},id:{default:void 0},label:{default:""},error:{default:""},warning:{default:""},helper:{default:""},variant:{default:"default"},size:{default:"md"}},emits:["update:modelValue","change","create"],setup(e,{expose:t,emit:i}){let n=e,r=i,a=(ne,{slots:Z})=>{var re,b;return ne.wrap?He("div",{class:"nb-select__control"},(re=Z.default)==null?void 0:re.call(Z)):(b=Z.default)==null?void 0:b.call(Z)};a.props=["wrap"];let s=X(""),l=X(""),o=X(null);function u(){let ne=s.value.trim();ne&&(r("create",ne),s.value="")}let c=X(!1),d=X(!1),h=X(-1),f=X(null),_=X(null),m=vi(),g=()=>(typeof n.anchor=="function"?n.anchor():n.anchor)??_.value??f.value;function v(){var ne,Z;(Z=_.value??((ne=f.value)==null?void 0:ne.querySelector("button, [tabindex]")))==null||Z.focus()}let w=X(null);SA(w);let S=X({position:"fixed",top:"0px",left:"0px",width:"0px",zIndex:"9999"}),y=`nb-select-${an()}`,A=H(()=>n.id??y),{ids:L,messageId:k,invalid:V,live:T,key:J}=Uc(n,A),x=H(()=>`${A.value}-listbox`),N=ne=>`${A.value}-option-${ne}`,O=H(()=>n.modelValue==null?[]:Array.isArray(n.modelValue)?n.modelValue:[n.modelValue]),R=H(()=>{var ne;if(!(n.multiple||O.value.length!==1))return(ne=(n.options??[]).find(Z=>Z.value===O.value[0]))==null?void 0:ne.icon}),j=H(()=>{var Z,re;if(O.value.length===0)return"";let ne=n.options??[];return n.multiple?O.value.length===1?((Z=ne.find(b=>b.value===O.value[0]))==null?void 0:Z.label)??String(O.value[0]):O.value.length===2?O.value.map(b=>{var C;return((C=ne.find(B=>B.value===b))==null?void 0:C.label)??String(b)}).join(", "):`${O.value.length} selected`:((re=ne.find(b=>b.value===O.value[0]))==null?void 0:re.label)??String(O.value[0])});function G(ne){return O.value.includes(ne)}let ae=ne=>ne.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase(),q=H(()=>{let ne=n.options??[],Z=n.searchable?ae(l.value.trim()):"",re=new Set;return ne.forEach((b,C)=>{(!Z||ae(b.label).includes(Z))&&re.add(C)}),re}),se=H(()=>{let ne=[];return(n.options??[]).forEach((Z,re)=>{if(!q.value.has(re))return;let b=ne[ne.length-1];(!b||b.name!==Z.group)&&ne.push({key:`${ne.length}:${Z.group??""}`,name:Z.group,labelId:`${A.value}-group-${ne.length}`,entries:[]}),ne[ne.length-1].entries.push({option:Z,index:re})}),ne});function me(ne,Z){let re=n.options??[];for(let b=ne+Z;b>=0&&b<re.length;b+=Z)if(!re[b].disabled&&q.value.has(b))return b;return ne}function U(ne){if(ne.disabled)return;let Z;if(n.multiple){let re=[...O.value],b=re.indexOf(ne.value);b>=0?re.splice(b,1):re.push(ne.value),Z=re}else Z=ne.value,ge();r("update:modelValue",Z),r("change",Z)}function ve(){var Q;let ne=g();if(!ne)return;let Z=ne.getBoundingClientRect(),re=((Q=w.value)==null?void 0:Q.offsetHeight)??0,b=window.innerHeight-Z.bottom,C=Z.top,B=re>0&&b<re&&C>b,de=m.trigger?Math.max(Z.width,240):Z.width,z=m.trigger?Math.max(8,Math.min(Z.left,window.innerWidth-de-8)):Z.left;S.value={position:"fixed",top:B?`${Z.top-re}px`:`${Z.bottom}px`,left:`${z}px`,width:`${de}px`,zIndex:"9999"}}function ce(){if(n.disabled)return;c.value=!0,ve();let ne=n.options??[];h.value=O.value.length>0?Math.max(0,ne.findIndex(Z=>Z.value===O.value[0])):-1,wt(()=>{var Z;ve(),te(),(Z=o.value)==null||Z.focus({preventScroll:!0})})}function ge(){var Z;let ne=!!((Z=w.value)!=null&&Z.contains(document.activeElement));c.value=!1,h.value=-1,l.value="",ne&&v()}function ue(){c.value?ge():ce()}function pe(ne){var C,B;let Z=ne.target,re=((C=f.value)==null?void 0:C.contains(Z))??!1,b=((B=w.value)==null?void 0:B.contains(Z))??!1;!re&&!b&&ge()}function W(){c.value&&ve()}Pe(c,ne=>{ne?(document.addEventListener("mousedown",pe),window.addEventListener("scroll",W,!0),window.addEventListener("resize",W)):(document.removeEventListener("mousedown",pe),window.removeEventListener("scroll",W,!0),window.removeEventListener("resize",W))}),Tt(()=>{document.removeEventListener("mousedown",pe),window.removeEventListener("scroll",W,!0),window.removeEventListener("resize",W)});function he(ne){let Z=n.options??[];if(!c.value){(ne.key==="Enter"||ne.key===" "||ne.key==="ArrowDown")&&(ne.preventDefault(),ce());return}ne.key==="Escape"?(ge(),ne.preventDefault()):ne.key==="Tab"?ge():ne.key==="ArrowDown"?(ne.preventDefault(),h.value=me(h.value,1),te()):ne.key==="ArrowUp"?(ne.preventDefault(),h.value>0&&(h.value=me(h.value,-1)),te()):(ne.key==="Enter"||ne.key===" ")&&h.value>=0&&(ne.preventDefault(),U(Z[h.value]))}function te(){wt(()=>{var ne;!w.value||h.value<0||((ne=w.value.querySelector(`[data-index="${h.value}"]`))==null||ne.scrollIntoView({block:"nearest"}))})}Pe(l,()=>{if(!c.value)return;let ne=me(-1,1);h.value=ne===-1?-1:ne,te()});function be(ne){if(ne.key===" "){ne.stopPropagation();return}if(ne.key==="Home"||ne.key==="End"){ne.stopPropagation();return}he(ne)}let E=H(()=>({isOpen:c.value,toggle:ue,open:ce,close:ge,attrs:{"aria-expanded":c.value,"aria-haspopup":"listbox","aria-controls":c.value?x.value:void 0,"aria-invalid":V.value,onClick:ue}})),F=H(()=>n.clearable&&!n.disabled&&O.value.length>0);function ie(){let ne=n.multiple?[]:null;ge(),r("update:modelValue",ne),r("change",ne),v()}let fe=H(()=>["nb-select",`nb-select--${n.variant}`,`nb-select--${n.size}`,{"nb-select--open":c.value,"nb-select--focused":d.value&&!c.value,"nb-select--error":!!n.error,"nb-select--warning":!n.error&&!!n.warning,"nb-select--multiple":n.multiple,"nb-select--bare":!!m.trigger}]);return t({open:ce,close:ge}),(ne,Z)=>(p(),$($e,null,[M("div",{ref_key:"rootRef",ref:f,class:Te(fe.value),onKeydown:he},[ne.$slots.trigger?Ae(ne.$slots,"trigger",T5(yt({key:0},E.value))):e.variant==="default"?(p(),$($e,{key:1},[ne.$slots.label?Ae(ne.$slots,"label",{key:0}):e.label?(p(),le(Os,{key:1,for:A.value,required:e.required,disabled:e.disabled},{default:I(()=>[_e(K(e.label),1)]),_:1},8,["for","required","disabled"])):P("",!0),ee(a,{wrap:e.clearable},{default:I(()=>[M("button",{id:A.value,ref_key:"triggerRef",ref:_,type:"button",class:"nb-select__trigger",role:"combobox","aria-expanded":c.value,"aria-haspopup":"listbox","aria-disabled":e.disabled||void 0,"aria-required":e.required||void 0,"aria-invalid":Y(V),"aria-describedby":Y(k),disabled:e.disabled||void 0,onClick:ue,onFocus:Z[0]||(Z[0]=re=>d.value=!0),onBlur:Z[1]||(Z[1]=re=>d.value=!1)},[M("span",{class:Te(["nb-select__value",{"nb-select__value--placeholder":!j.value,"nb-select__value--with-icon":!!R.value}])},[R.value?(p(),le(Ke,{key:0,class:"nb-select__value-icon",name:R.value,size:16},null,8,["name"])):P("",!0),j.value?Ae(ne.$slots,"value",{key:1,values:O.value},()=>[_e(K(j.value),1)]):(p(),$($e,{key:2},[_e(K(e.placeholder),1)],64))],2),e.error?(p(),le(_t,{key:0,variant:"error","icon-only":!0,live:"off","aria-hidden":"true",class:"nb-select__status-icon"},{default:I(()=>[_e(K(e.error),1)]),_:1})):e.warning?(p(),le(_t,{key:1,variant:"warning","icon-only":!0,live:"off","aria-hidden":"true",class:"nb-select__status-icon"},{default:I(()=>[_e(K(e.warning),1)]),_:1})):P("",!0),F.value?(p(),$("span",$A)):P("",!0),ee(Zi,{align:"center",justify:"center",class:"nb-select__caret"},{default:I(()=>[ee(Ke,{name:c.value?Y(D6):Y(T6),size:16},null,8,["name"])]),_:1})],40,AA),F.value?(p(),$("button",{key:0,type:"button",class:"nb-select__clear","aria-label":e.clearLabel,onClick:ie,onKeydown:[Z[2]||(Z[2]=Bi(Qe(()=>{},["stop"]),["enter"])),Z[3]||(Z[3]=Bi(Qe(()=>{},["stop"]),["space"]))]},[ee(Ke,{name:Y(ir),size:16},null,8,["name"])],40,MA)):P("",!0)]),_:3},8,["wrap"]),e.error?(p(),le(_t,{id:Y(L).error,key:Y(J),variant:"error",live:Y(T),class:"nb-select__message"},{default:I(()=>[_e(K(e.error),1)]),_:1},8,["id","live"])):e.warning?(p(),le(_t,{id:Y(L).warning,key:Y(J),variant:"warning",live:Y(T),class:"nb-select__message"},{default:I(()=>[_e(K(e.warning),1)]),_:1},8,["id","live"])):e.helper?(p(),le(_t,{id:Y(L).helper,key:Y(J),variant:"helper",live:Y(T),class:"nb-select__message"},{default:I(()=>[_e(K(e.helper),1)]),_:1},8,["id","live"])):P("",!0)],64)):e.variant==="fluid"?(p(),$($e,{key:2},[ee(a,{wrap:e.clearable},{default:I(()=>[M("button",{id:A.value,ref_key:"triggerRef",ref:_,type:"button",class:"nb-select__trigger",role:"combobox","aria-expanded":c.value,"aria-haspopup":"listbox","aria-disabled":e.disabled||void 0,"aria-required":e.required||void 0,"aria-invalid":Y(V),"aria-describedby":Y(k),disabled:e.disabled||void 0,onClick:ue,onFocus:Z[4]||(Z[4]=re=>d.value=!0),onBlur:Z[5]||(Z[5]=re=>d.value=!1)},[e.label||ne.$slots.label?(p(),le(Zi,{key:0,dir:"row",align:"center",gap:"xs",class:"nb-select__inner-header"},{default:I(()=>[ne.$slots.label?Ae(ne.$slots,"label",{key:0}):(p(),$("label",EA,[_e(K(e.label)+" ",1),e.required?(p(),$("span",xA,"*")):P("",!0)])),e.helper&&!e.error&&!e.warning?(p(),le(_t,{key:2,id:Y(L).helper,variant:"helper","icon-only":!0,live:"off","aria-hidden":"true",class:"nb-select__inner-message"},{default:I(()=>[_e(K(e.helper),1)]),_:1},8,["id"])):P("",!0)]),_:3})):P("",!0),ee(Zi,{dir:"row",align:"end",flex:"",class:"nb-select__value-row"},{default:I(()=>[M("span",{class:Te(["nb-select__value",{"nb-select__value--placeholder":!j.value,"nb-select__value--with-icon":!!R.value}])},[R.value?(p(),le(Ke,{key:0,class:"nb-select__value-icon",name:R.value,size:16},null,8,["name"])):P("",!0),j.value?Ae(ne.$slots,"value",{key:1,values:O.value},()=>[_e(K(j.value),1)]):(p(),$($e,{key:2},[_e(K(e.placeholder),1)],64))],2),F.value?(p(),$("span",TA)):P("",!0),ee(Zi,{align:"center",justify:"center",class:"nb-select__caret"},{default:I(()=>[ee(Ke,{name:c.value?Y(D6):Y(T6),size:16},null,8,["name"])]),_:1})]),_:3})],40,LA),F.value?(p(),$("button",{key:0,type:"button",class:"nb-select__clear","aria-label":e.clearLabel,onClick:ie,onKeydown:[Z[6]||(Z[6]=Bi(Qe(()=>{},["stop"]),["enter"])),Z[7]||(Z[7]=Bi(Qe(()=>{},["stop"]),["space"]))]},[ee(Ke,{name:Y(ir),size:16},null,8,["name"])],40,HA)):P("",!0)]),_:3},8,["wrap"]),e.error?(p(),le(_t,{id:Y(L).error,key:Y(J),variant:"error",live:Y(T),class:"nb-select__fluid-message"},{default:I(()=>[_e(K(e.error),1)]),_:1},8,["id","live"])):e.warning?(p(),le(_t,{id:Y(L).warning,key:Y(J),variant:"warning",live:Y(T),class:"nb-select__fluid-message"},{default:I(()=>[_e(K(e.warning),1)]),_:1},8,["id","live"])):P("",!0)],64)):P("",!0)],34),(p(),le($r,{to:"body"},[ee(sa,{name:"nb-select-pop"},{default:I(()=>[c.value?(p(),$("div",{key:0,id:x.value,ref_key:"dropdownRef",ref:w,class:Te(["nb-select__dropdown",{"nb-select__dropdown--check":e.selectedMark==="check","nb-select__dropdown--anchored":!!ne.$slots.trigger}]),style:ft(S.value),role:"listbox","aria-multiselectable":e.multiple||void 0},[e.searchable?(p(),$("div",PA,[ut(M("input",{ref_key:"searchRef",ref:o,"onUpdate:modelValue":Z[8]||(Z[8]=re=>l.value=re),type:"search",class:"nb-select__search-input",autocomplete:"off",spellcheck:"false",placeholder:e.searchPlaceholder,"aria-label":e.searchPlaceholder,"aria-controls":x.value,"aria-activedescendant":h.value>=0?N(h.value):void 0,onKeydown:be},null,40,OA),[[i0,l.value]])])):P("",!0),(p(!0),$($e,null,Ue(se.value,re=>(p(),$("div",{key:re.key,class:"nb-select__group",role:"group","aria-labelledby":re.name?re.labelId:void 0},[re.name?(p(),$("div",{key:0,id:re.labelId,class:"nb-select__group-label"},K(re.name),9,RA)):P("",!0),(p(!0),$($e,null,Ue(re.entries,b=>(p(),$("div",{id:N(b.index),key:b.option.value,"data-index":b.index,class:Te(["nb-select__option",{"nb-select__option--selected":G(b.option.value),"nb-select__option--highlighted":h.value===b.index,"nb-select__option--disabled":b.option.disabled}]),role:"option","aria-selected":G(b.option.value),"aria-disabled":b.option.disabled||void 0,onMouseenter:C=>h.value=b.index,onClick:C=>U(b.option)},[e.multiple||e.selectedMark==="check"?(p(),$("span",VA,[G(b.option.value)?(p(),$("svg",BA,[...Z[12]||(Z[12]=[M("path",{d:"M1 4l3 3 5-6",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):P("",!0)])):P("",!0),b.option.icon?(p(),le(Ke,{key:1,class:"nb-select__option-icon",name:b.option.icon,size:16},null,8,["name"])):P("",!0),M("span",ZA,[Ae(ne.$slots,"option",{option:b.option},()=>[_e(K(b.option.label),1)])])],42,DA))),128))],8,IA))),128)),!e.options||e.options.length===0?(p(),$("div",FA," No options ")):e.searchable&&q.value.size===0?(p(),$("div",zA,K(e.noResultsLabel),1)):P("",!0),e.creatable?(p(),$("div",{key:3,class:"nb-select__create",onMousedown:Z[11]||(Z[11]=Qe(()=>{},["prevent"]))},[ut(M("input",{"onUpdate:modelValue":Z[9]||(Z[9]=re=>s.value=re),type:"text",class:"nb-select__create-input",placeholder:e.createPlaceholder||"Add new…",onKeydown:[Bi(Qe(u,["prevent"]),["enter"]),Z[10]||(Z[10]=Qe(()=>{},["stop"]))]},null,40,UA),[[i0,s.value]])],32)):P("",!0)],14,NA)):P("",!0)]),_:3})]))],64))}}),WA=new Map,jA=new Map;function V6(e,t,i){let n=e.get(t);return n||(n=i(),e.set(t,n)),n}function ds(e,t,i="en"){let n=t[V6(WA,i,()=>new Intl.PluralRules(i)).select(e)]??t.other;if(!n.includes("{count}"))return n;let r=V6(jA,i,()=>new Intl.NumberFormat(i)).format(e);return n.split("{count}").join(r)}var KA=Object.freeze({paginationLabel:"Pagination",paginationPrevious:"Previous page",paginationNext:"Next page",paginationPageOf:(e,t)=>`Page ${e} of ${t}`,paginationRange:(e,t,i,n)=>`${e}-${t} of ${i} ${n}`,datePickerPreviousYear:"Previous year",datePickerPreviousMonth:"Previous month",datePickerNextMonth:"Next month",datePickerNextYear:"Next year",datePickerChooseDate:"Choose date",datePickerChooseEndDate:"Choose end date",datePickerChangeDate:e=>`Change date, ${e}`,datePickerChangeEndDate:e=>`Change end date, ${e}`,datePickerDialog:"Date picker",datePickerDialogFor:e=>`${e} calendar`,dataTableBatchActions:"Table batch actions",dataTableSelectAll:"Select all rows",dataTableSelectRow:e=>`Select row ${e}`,dataTableEmpty:"No data to display",dataTableError:"Could not load the data",selectionCount:e=>`${e} selected`,modalClose:"Close",textInputCount:(e,t)=>`${e}/${t}`,numberInputDecrease:"Decrease",numberInputIncrease:"Increase",boardSelectionActions:"Actions for the selected cards",boardClearSelection:"Clear selection",boardSelectionCleared:"Selection cleared",boardCardsSelected:e=>ds(e,{one:"{count} card selected",other:"{count} cards selected"}),bottomPanelMinimize:"Minimize",bottomPanelDefault:"Default",bottomPanelHalf:"Half",bottomPanelMaximize:"Maximize",blueprintControls:"Blueprint controls",blueprintZoomIn:"Zoom in",blueprintZoomOut:"Zoom out",blueprintFitToView:"Fit to view",blueprintCenter:"Center",blueprintAutoLayout:"Auto layout",blueprintAlignLeft:"Align left",blueprintAlignHorizontalCenter:"Align horizontal center",blueprintAlignRight:"Align right",blueprintAlignTop:"Align top",blueprintAlignVerticalCenter:"Align vertical center",blueprintAlignBottom:"Align bottom",blueprintDistributeHorizontally:"Distribute horizontally",blueprintDistributeVertically:"Distribute vertically",blueprintMinimap:"Blueprint minimap",blueprintRemoveCard:"Remove",blueprintInputs:e=>ds(e,{one:"{count} input",other:"{count} inputs"}),blueprintOutputs:e=>ds(e,{one:"{count} output",other:"{count} outputs"}),chartBar:"Bar chart",chartLine:"Line chart",chartPie:"Pie chart",chartGantt:"Gantt chart",chartInterpolation:"Interpolation chart",chartSparkline:"Sparkline",chartInput:"Input",chartOutput:"Output",spinnerLabel:"Loading content",toastSuccess:"Success",toastError:"Error",toastWarning:"Warning",toastInfo:"Information"}),qA=Symbol("nb-strings"),GA=X({}),B6=H(()=>({...KA,...YA(GA.value)}));function YA(e){let t={};for(let[i,n]of Object.entries(e))n!==void 0&&(t[i]=n);return t}function ar(){return Jt()?At(qA,B6):B6}var XA=Symbol.for("@nubisco/ui:text-input-context"),JA={key:0,class:"nb-text-input__overlay-wrap"},QA=["innerHTML"],e$=["id","aria-invalid","aria-describedby","value","placeholder","disabled","readonly","name","maxlength"],t$=["id","aria-invalid","aria-describedby","value","placeholder","disabled","readonly","name","maxlength"],i$=["id","aria-invalid","aria-describedby","placeholder","disabled","readonly","name","maxlength","rows"],n$=["id","aria-invalid","aria-describedby","type","placeholder","disabled","readonly","required","name","min","max","step","maxlength"],r$={key:2,class:"nb-text-input__decorator"},a$={key:3,class:"nb-text-input__actions"},s$={key:3,class:"nb-text-input__count"},l$={key:0,class:"nb-text-input__inner-header"},o$=["for","title"],u$={key:0,class:"nb-text-input__asterisk","aria-hidden":"true"},c$={key:3,class:"nb-text-input__count"},d$=["id","aria-invalid","aria-describedby","type","placeholder","disabled","readonly","required","name","min","max","step","maxlength"],pa=Je(Ne({inheritAttrs:!1,__name:"TextInput",props:Gv({type:{default:"text"},min:{default:void 0},max:{default:void 0},step:{default:void 0},maxlength:{default:void 0},showCount:{type:Boolean,default:!1},multiline:{type:Boolean,default:!1},rows:{default:3},highlight:{type:Function,default:void 0},readonly:{type:Boolean,default:!1},placeholder:{default:""},name:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},id:{default:void 0},label:{default:""},error:{default:""},warning:{default:""},helper:{default:""},variant:{default:"default"},size:{default:"md"}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){let i=e,n=Qv(e,"modelValue"),r=ar(),a=H(()=>i.showCount&&typeof i.maxlength=="number"),s=H(()=>r.value.textInputCount((n.value??"").length,i.maxlength??0)),l=X(null),o=X(null);t({focus:()=>{var J;return(J=l.value)==null?void 0:J.focus()},blur:()=>{var J;return(J=l.value)==null?void 0:J.blur()},nativeEl:l}),xi(XA,{field:l});let u=X(!1),c=rr({}),d=H(()=>i.id??c),h=H(()=>!!i.highlight),f=H(()=>{if(!i.highlight)return"";let J=String(n.value??"");return i.highlight(J)+`
|
|
41
|
+
`});function _(){o.value&&l.value&&(o.value.scrollTop=l.value.scrollTop)}Pe(f,()=>wt(_));let{variant:m,text:g,messageId:v,invalid:w,live:S,key:y}=Uc(i,d),A=H(()=>m.value??"helper"),L=H(()=>!!g.value),k=Kv(),V=H(()=>wA(k["aria-describedby"],v.value)),T=H(()=>({"nb-text-input__field-wrapper--focused":u.value,"nb-text-input__field-wrapper--error":!!i.error,"nb-text-input__field-wrapper--warning":!i.error&&!!i.warning,"nb-text-input__field-wrapper--disabled":i.disabled,"nb-text-input__field-wrapper--readonly":i.readonly,"nb-text-input__field-wrapper--overlay":h.value,"nb-text-input__field-wrapper--multiline":i.multiline}));return(J,x)=>(p(),le(Zi,{dir:"col",class:Te(["nb-text-input",`nb-text-input--${e.variant}`,`nb-text-input--${e.size}`,{"nb-text-input--multiline":e.multiline}])},{default:I(()=>[e.variant==="default"?(p(),$($e,{key:0},[J.$slots.label?Ae(J.$slots,"label",{key:0},void 0,!0):e.label?(p(),le(Os,{key:1,for:d.value,required:e.required,disabled:e.disabled},{default:I(()=>[_e(K(e.label),1)]),_:1},8,["for","required","disabled"])):P("",!0),M("div",{class:Te(["nb-text-input__field-wrapper",T.value])},[Ae(J.$slots,"leading",{},void 0,!0),h.value?(p(),$("div",JA,[M("div",{ref_key:"mirrorRef",ref:o,class:"nb-text-input__mirror","aria-hidden":"true",innerHTML:f.value},null,8,QA),e.multiline?(p(),$("textarea",yt({key:0,id:d.value,ref_key:"nativeRef",ref:l},J.$attrs,{"aria-invalid":Y(w),"aria-describedby":V.value,class:"nb-text-input__field--transparent",value:n.value,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,name:e.name,maxlength:e.maxlength,spellcheck:"false",autocomplete:"off",autocorrect:"off",onInput:x[0]||(x[0]=N=>n.value=N.target.value),onFocus:x[1]||(x[1]=N=>u.value=!0),onBlur:x[2]||(x[2]=N=>u.value=!1),onScroll:_}),null,16,e$)):(p(),$("input",yt({key:1,id:d.value,ref_key:"nativeRef",ref:l},J.$attrs,{"aria-invalid":Y(w),"aria-describedby":V.value,type:"text",class:"nb-text-input__field--transparent",value:n.value,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,name:e.name,maxlength:e.maxlength,spellcheck:"false",onInput:x[3]||(x[3]=N=>n.value=N.target.value),onFocus:x[4]||(x[4]=N=>u.value=!0),onBlur:x[5]||(x[5]=N=>u.value=!1)}),null,16,t$))])):(p(),$($e,{key:1},[e.multiline?ut((p(),$("textarea",yt({key:0,id:d.value,ref_key:"nativeRef",ref:l},J.$attrs,{"onUpdate:modelValue":x[6]||(x[6]=N=>n.value=N),"aria-invalid":Y(w),"aria-describedby":V.value,class:"nb-text-input__field",placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,name:e.name,maxlength:e.maxlength,rows:e.rows,onFocus:x[7]||(x[7]=N=>u.value=!0),onBlur:x[8]||(x[8]=N=>u.value=!1)}),null,16,i$)),[[i0,n.value]]):ut((p(),$("input",yt({key:1,id:d.value,ref_key:"nativeRef",ref:l},J.$attrs,{"onUpdate:modelValue":x[9]||(x[9]=N=>n.value=N),"aria-invalid":Y(w),"aria-describedby":V.value,class:"nb-text-input__field",type:e.type,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,required:e.required,name:e.name,min:e.min,max:e.max,step:e.step,maxlength:e.maxlength,onFocus:x[10]||(x[10]=N=>u.value=!0),onBlur:x[11]||(x[11]=N=>u.value=!1)}),null,16,n$)),[[Ep,n.value]])],64)),Ae(J.$slots,"trailing",{},void 0,!0),J.$slots.decorator?(p(),$("div",r$,[Ae(J.$slots,"decorator",{},void 0,!0)])):P("",!0),J.$slots.actions?(p(),$("div",a$,[Ae(J.$slots,"actions",{},void 0,!0)])):P("",!0)],2),L.value?(p(),le(_t,{id:Y(v),key:Y(y),variant:A.value,live:Y(S),class:"nb-text-input__message"},{default:I(()=>[_e(K(Y(g)),1)]),_:1},8,["id","variant","live"])):P("",!0),a.value?(p(),$("span",s$,K(s.value),1)):P("",!0),Ae(J.$slots,"dropdown",{},void 0,!0)],64)):e.variant==="fluid"?(p(),$($e,{key:1},[M("div",{class:Te(["nb-text-input__field-wrapper",T.value])},[e.label||J.$slots.label?(p(),$("div",l$,[J.$slots.label?Ae(J.$slots,"label",{key:0},void 0,!0):(p(),$("label",{key:1,for:d.value,class:Te(["nb-text-input__inner-label",{"nb-text-input__inner-label--required":e.required}]),title:e.label||void 0},[_e(K(e.label)+" ",1),e.required?(p(),$("span",u$,"*")):P("",!0)],10,o$)),L.value?(p(),le(_t,{id:Y(v),key:Y(y),variant:A.value,live:Y(S),"icon-only":"",class:"nb-text-input__inner-message"},{default:I(()=>[_e(K(Y(g)),1)]),_:1},8,["id","variant","live"])):P("",!0),a.value?(p(),$("span",c$,K(s.value),1)):P("",!0)])):P("",!0),ut(M("input",yt({id:d.value,ref_key:"nativeRef",ref:l},J.$attrs,{"onUpdate:modelValue":x[12]||(x[12]=N=>n.value=N),"aria-invalid":Y(w),"aria-describedby":V.value,class:"nb-text-input__field",type:e.type,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,required:e.required,name:e.name,min:e.min,max:e.max,step:e.step,maxlength:e.maxlength,onFocus:x[13]||(x[13]=N=>u.value=!0),onBlur:x[14]||(x[14]=N=>u.value=!1)}),null,16,d$),[[Ep,n.value]])],2),Ae(J.$slots,"dropdown",{},void 0,!0)],64)):P("",!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-f657247a"]]),h$={class:"nb-definition-list__term"},f$={class:"nb-definition-list__value"},p$={key:0,class:"nb-definition-list__empty"},_$="–",n2=Je(Ne({__name:"DefinitionList",props:{items:{default:()=>[]},layout:{default:"columns"},termWidth:{default:"minmax(6rem, 0.38fr)"},dividers:{type:Boolean,default:!1},compact:{type:Boolean,default:!1}},setup(e){function t(i){return i==null||i===""}return(i,n)=>(p(),$("dl",{class:Te(["nb-definition-list",[`nb-definition-list--${e.layout}`,{"nb-definition-list--dividers":e.dividers,"nb-definition-list--compact":e.compact}]]),style:ft({"--nb-definition-list-term-w":e.termWidth})},[e.items.length?(p(!0),$($e,{key:0},Ue(e.items,(r,a)=>(p(),$("div",{key:`${r.term}-${a}`,class:"nb-definition-list__row"},[M("dt",h$,K(r.term),1),M("dd",f$,[t(r.value)?(p(),$("span",p$,K(r.empty??_$),1)):(p(),$($e,{key:1},[_e(K(r.value),1)],64))])]))),128)):Ae(i.$slots,"default",{key:1},void 0,!0)],6))}}),[["__scopeId","data-v-0d87d43b"]]),qd=function(e){return e.Small="sm",e.Medium="md",e.Large="lg",e}(qd||{}),Gd=function(e){return e.Primary="primary",e.Secondary="secondary",e}(Gd||{}),m$=["for"],v$=["id","name","disabled"],Wc=Je(Ne({__name:"Switch",props:Gv({id:{type:String,default:()=>null},label:{type:String,default:""},size:{type:String,default:qd.Medium,validator:e=>Object.values(qd).includes(e)},verbose:Boolean,hideLabel:Boolean,name:{type:String,required:!0},disabled:Boolean,variant:{type:String,default:Gd.Primary,validator:e=>Object.values(Gd).includes(e)}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){let t=Qv(e,"modelValue"),i=e,n=rr(i),r=H(()=>({"aria-disabled":i.disabled})),a=H(()=>({"nb-switch":!0,disabled:i.disabled})),s=H(()=>({"nb-switch-wrapper":!0,verbose:i.verbose,[i.size]:!0,[`nb-${i.variant}`]:!0}));return(l,o)=>(p(),le(Zi,{id:Y(n),class:Te(a.value),align:"center",gap:"sm"},{default:I(()=>[e.label?(p(),le(Os,{key:0,for:`${Y(n)}-input`,disabled:e.disabled,class:Te({"nb-switch__label--hidden":e.hideLabel})},{default:I(()=>[_e(K(e.label),1)]),_:1},8,["for","disabled","class"])):P("",!0),M("label",yt({for:`${Y(n)}-input`,class:s.value},r.value,{onClick:o[1]||(o[1]=Qe(()=>{},["stop"]))}),[ut(M("input",{id:`${Y(n)}-input`,"onUpdate:modelValue":o[0]||(o[0]=u=>t.value=u),name:e.name,type:"checkbox",role:"switch",disabled:e.disabled},null,8,v$),[[Mg,t.value]]),o[2]||(o[2]=M("div",{class:"slider round"},null,-1))],16,m$)]),_:1},8,["id","class"]))}}),[["__scopeId","data-v-8ea7332a"]]),g$={class:"nb-definition-list__row"},b$={class:"nb-definition-list__term"},y$={class:"nb-definition-list__value"},O4=Ne({__name:"DefinitionListItem",props:{term:{default:""}},setup(e){return(t,i)=>(p(),$("div",g$,[M("dt",b$,[Ae(t.$slots,"term",{},()=>[_e(K(e.term),1)])]),M("dd",y$,[Ae(t.$slots,"default")])]))}}),w$=["data-gap"],S$={class:"nb-page-layout__main"},C$={key:0,class:"nb-page-layout__aside"},k$=Je(Ne({__name:"PageLayout",props:{asideWidth:{default:"3:2"},stackBelow:{default:"md"},asideFirst:{type:Boolean,default:!1},gap:{default:"xl"}},setup(e){let t=e,i=/^\s*(\d+(?:\.\d+)?)\s*:\s*(\d+(?:\.\d+)?)\s*$/,n=H(()=>{let a=i.exec(t.asideWidth);return a?`minmax(0, ${a[1]}fr) minmax(0, ${a[2]}fr)`:`minmax(0, 1fr) minmax(0, ${t.asideWidth.trim()})`}),r=H(()=>({"--nb-page-layout-columns":n.value}));return(a,s)=>(p(),$("div",{class:Te(["nb-page-layout",[`nb-page-layout--stack-${e.stackBelow}`,{"nb-page-layout--aside-first":e.asideFirst}]])},[M("div",{class:"nb-page-layout__inner","data-gap":e.gap,style:ft(r.value)},[M("div",S$,[Ae(a.$slots,"default",{},void 0,!0)]),a.$slots.aside?(p(),$("div",C$,[Ae(a.$slots,"aside",{},void 0,!0)])):P("",!0)],12,w$)],2))}}),[["__scopeId","data-v-09a0791b"]]),A$={key:0,class:"nb-page-header__eyebrow"},$$={class:"nb-page-header__title-row"},M$={class:"nb-page-header__heading"},L$={class:"nb-page-header__title"},E$={key:0,class:"nb-page-header__status"},x$={key:0,class:"nb-page-header__actions"},T$={key:1,class:"nb-page-header__description"},H$={key:2,class:"nb-page-header__facts"},N$=Je(Ne({__name:"PageHeader",props:{title:{default:void 0},actions:{default:void 0},sticky:{type:Boolean,default:!1}},setup(e){let t=vi();function i(a){let s=0;for(let l of a)if(l.type!==ti){if(l.type===Lr){typeof l.children=="string"&&l.children.trim()&&s++;continue}if(l.type===$e){Array.isArray(l.children)&&(s+=i(l.children));continue}s++}return s}let n=!1;function r(){var s;if(n||typeof process<"u")return;let a=(s=t.status)==null?void 0:s.call(t);!a||i(a)<=1||(n=!0,console.warn("[NbPageHeader] The status slot holds more than one element. A page header carries exactly one status badge: fold the rest into it, or move them into the facts. See https://docs.nubisco.io/ui/patterns/status-indicators"))}return et(r),Cf(r),(a,s)=>{var l;return p(),$("header",{class:Te(["nb-page-header",{"nb-page-header--sticky":e.sticky}])},[a.$slots.eyebrow?(p(),$("div",A$,[Ae(a.$slots,"eyebrow",{},void 0,!0)])):P("",!0),M("div",$$,[M("div",M$,[M("h1",L$,[Ae(a.$slots,"title",{},()=>[_e(K(e.title),1)],!0)]),a.$slots.status?(p(),$("span",E$,[Ae(a.$slots,"status",{},void 0,!0)])):P("",!0)]),(l=e.actions)!=null&&l.length||a.$slots.actions?(p(),$("div",x$,[ee(e2,{owner:"NbPageHeader"},{default:I(()=>{var o;return[(o=e.actions)!=null&&o.length?(p(),le(Qf,{key:0,items:e.actions,overflow:"phone"},null,8,["items"])):P("",!0),Ae(a.$slots,"actions",{},void 0,!0)]}),_:3})])):P("",!0)]),a.$slots.description?(p(),$("div",T$,[Ae(a.$slots,"description",{},void 0,!0)])):P("",!0),a.$slots.facts?(p(),$("div",H$,[Ae(a.$slots,"facts",{},void 0,!0)])):P("",!0)],2)}}}),[["__scopeId","data-v-7b0d1ed1"]]),P$={key:0,class:"nb-contained-list__header"},O$={key:1,class:"nb-contained-list__meta"},I$={key:2,class:"nb-contained-list__actions"},R$=["aria-labelledby","aria-label"],I4=Je(Ne({__name:"ContainedList",props:{title:{default:void 0},headingLevel:{default:"h3"},size:{default:"md"},maxHeight:{default:void 0},ariaLabel:{default:void 0}},setup(e){let t=e,i=vi(),n=H(()=>!!t.title||!!i.meta||!!i.actions),r=rr({});return(a,s)=>(p(),$("div",{class:Te(["nb-contained-list",[`nb-contained-list--${e.size}`,{"nb-contained-list--scroll":!!e.maxHeight}]]),style:ft(e.maxHeight?{"--nb-contained-list-max-h":e.maxHeight}:void 0)},[n.value?(p(),$("div",P$,[e.title?(p(),le(mi(e.headingLevel),{key:0,id:Y(r),class:"nb-contained-list__title"},{default:I(()=>[_e(K(e.title),1)]),_:1},8,["id"])):P("",!0),a.$slots.meta?(p(),$("span",O$,[Ae(a.$slots,"meta",{},void 0,!0)])):P("",!0),a.$slots.actions?(p(),$("div",I$,[Ae(a.$slots,"actions",{},void 0,!0)])):P("",!0)])):P("",!0),M("ul",{class:"nb-contained-list__items",role:"list","aria-labelledby":e.title?Y(r):void 0,"aria-label":e.title?void 0:e.ariaLabel},[Ae(a.$slots,"default",{},void 0,!0)],8,R$)],6))}}),[["__scopeId","data-v-a7cda3ee"]]),D$={key:0,class:"nb-contained-list-item__leading"},V$={class:"nb-contained-list-item__main"},B$={class:"nb-contained-list-item__title-line"},Z$={key:0,class:"nb-contained-list-item__key"},F$={class:"nb-contained-list-item__title"},z$={key:0,class:"nb-contained-list-item__line"},U$={key:1,class:"nb-contained-list-item__trailing"},R4=Je(Ne({__name:"ContainedListItem",props:{title:{default:void 0},itemKey:{default:void 0},line:{default:void 0},to:{default:void 0},href:{default:void 0},target:{default:void 0},clickable:{type:Boolean,default:!1},current:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["select"],setup(e,{emit:t}){let i=e,n=t,{tag:r,attrs:a,isLink:s,isInteractive:l,onClick:o,onKeydown:u}=t2(i,d=>n("select",d)),c=H(()=>{if(i.current)return s.value?"page":"true"});return(d,h)=>(p(),$("li",{class:Te(["nb-contained-list-item",{"nb-contained-list-item--interactive":Y(l),"nb-contained-list-item--current":e.current,"nb-contained-list-item--disabled":e.disabled}])},[(p(),le(mi(Y(r)),yt({class:"nb-contained-list-item__row"},Y(a),{"aria-current":c.value,"aria-disabled":e.disabled?!0:void 0,onClick:Y(o),onKeydown:Y(u)}),{default:I(()=>[d.$slots.leading?(p(),$("span",D$,[Ae(d.$slots,"leading",{},void 0,!0)])):P("",!0),M("span",V$,[M("span",B$,[e.itemKey?(p(),$("span",Z$,K(e.itemKey),1)):P("",!0),M("span",F$,[Ae(d.$slots,"default",{},()=>[_e(K(e.title),1)],!0)])]),e.line||d.$slots.line?(p(),$("span",z$,[Ae(d.$slots,"line",{},()=>[_e(K(e.line),1)],!0)])):P("",!0)]),d.$slots.trailing?(p(),$("span",U$,[Ae(d.$slots,"trailing",{},void 0,!0)])):P("",!0)]),_:3},16,["aria-current","aria-disabled","onClick","onKeydown"]))],2))}}),[["__scopeId","data-v-a93c44d0"]]);const Fs=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},W$=Fs("tray","0 0 256 256",'<path d="M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H208a4,4,0,0,1,4,4V156H179.31a12,12,0,0,0-8.48,3.51l-19.32,19.32a4,4,0,0,1-2.82,1.17H107.31a4,4,0,0,1-2.82-1.17L85.17,159.51A12,12,0,0,0,76.69,156H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V164H76.69a4,4,0,0,1,2.82,1.17l19.32,19.32a12,12,0,0,0,8.48,3.51h41.38a12,12,0,0,0,8.48-3.51l19.32-19.32a4,4,0,0,1,2.82-1.17H212v44A4,4,0,0,1,208,212Z"/>'),j$=Fs("tray","0 0 256 256",'<path d="M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H208a2,2,0,0,1,2,2V154H179.31a13.94,13.94,0,0,0-9.9,4.1L150.1,177.41a2,2,0,0,1-1.41.59H107.31a2,2,0,0,1-1.41-.58L86.59,158.1a13.94,13.94,0,0,0-9.9-4.1H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V166H76.69a2,2,0,0,1,1.41.58L97.41,185.9a13.94,13.94,0,0,0,9.9,4.1h41.38a13.94,13.94,0,0,0,9.9-4.1l19.31-19.31a2,2,0,0,1,1.41-.59H210v42A2,2,0,0,1,208,210Z"/>'),Z6=Fs("tray","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.69A15.86,15.86,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.31A15.86,15.86,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"/>'),K$=Fs("tray","0 0 256 256",'<path d="M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,24v92H179.31a19.86,19.86,0,0,0-14.14,5.86L147,168H109L90.83,149.86A19.86,19.86,0,0,0,76.69,144H52V52ZM52,204V168H75l18.14,18.14A19.86,19.86,0,0,0,107.31,192h41.38a19.86,19.86,0,0,0,14.14-5.86L181,168h23v36Z"/>'),q$=Fs("tray","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V168H76.69L96,187.32A15.89,15.89,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"/>'),G$=Fs("tray","0 0 256 256",'<path d="M216,48V160H179.31a8,8,0,0,0-5.66,2.34l-19.31,19.32a8,8,0,0,1-5.66,2.34H107.31a8,8,0,0,1-5.66-2.34L82.34,162.34A8,8,0,0,0,76.68,160H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z" opacity="0.2"/><path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.68A15.89,15.89,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.32A15.89,15.89,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"/>'),Y$="tray",X$=Object.freeze(Object.defineProperty({__proto__:null,bold:K$,default:Z6,duotone:G$,fill:q$,glyphName:Y$,light:j$,regular:Z6,thin:W$},Symbol.toStringTag,{value:"Module"})),zs=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},J$=zs("magnifying-glass","0 0 256 256",'<path d="M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"/>'),Q$=zs("magnifying-glass","0 0 256 256",'<path d="M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"/>'),Yd=zs("magnifying-glass","0 0 256 256",'<path d="M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"/>'),eM=zs("magnifying-glass","0 0 256 256",'<path d="M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"/>'),tM=zs("magnifying-glass","0 0 256 256",'<path d="M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"/>'),iM=zs("magnifying-glass","0 0 256 256",'<path d="M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z" opacity="0.2"/><path d="M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"/>'),nM="magnifying-glass",D4=Object.freeze(Object.defineProperty({__proto__:null,bold:eM,default:Yd,duotone:iM,fill:tM,glyphName:nM,light:Q$,regular:Yd,thin:J$},Symbol.toStringTag,{value:"Module"})),Us=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},rM=Us("lock-simple","0 0 256 256",'<path d="M208,84H172V56a44,44,0,0,0-88,0V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84ZM92,56a36,36,0,0,1,72,0V84H92ZM212,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"/>'),aM=Us("lock-simple","0 0 256 256",'<path d="M208,82H174V56a46,46,0,0,0-92,0V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82ZM94,56a34,34,0,0,1,68,0V82H94ZM210,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"/>'),F6=Us("lock-simple","0 0 256 256",'<path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Z"/>'),sM=Us("lock-simple","0 0 256 256",'<path d="M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Z"/>'),lM=Us("lock-simple","0 0 256 256",'<path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96Z"/>'),oM=Us("lock-simple","0 0 256 256",'<path d="M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z" opacity="0.2"/><path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Z"/>'),uM="lock-simple",cM=Object.freeze(Object.defineProperty({__proto__:null,bold:sM,default:F6,duotone:oM,fill:lM,glyphName:uM,light:aM,regular:F6,thin:rM},Symbol.toStringTag,{value:"Module"}));var dM={key:0,class:"nb-empty-state__icon"},hM={key:1,class:"nb-empty-state__title"},fM={key:2,class:"nb-empty-state__description"},pM={key:3,class:"nb-empty-state__actions"},u0=Je(Ne({__name:"EmptyState",props:{title:{default:""},description:{default:""},icon:{default:void 0},kind:{default:"empty"},size:{default:"md"},bordered:{type:Boolean,default:!1}},setup(e){let t=e,i={empty:X$,"no-results":D4,error:Rs,forbidden:cM},n=H(()=>t.icon===null?null:t.icon??i[t.kind]??i.empty);return(r,a)=>(p(),$("div",{class:Te(["nb-empty-state",[`nb-empty-state--${e.size}`,`nb-empty-state--${e.kind}`,{"nb-empty-state--bordered":e.bordered}]])},[n.value||r.$slots.icon?(p(),$("div",dM,[Ae(r.$slots,"icon",{},()=>[ee(Ke,{name:n.value,size:e.size==="sm"?24:32},null,8,["name","size"])],!0)])):P("",!0),e.title||r.$slots.title?(p(),$("div",hM,[Ae(r.$slots,"title",{},()=>[_e(K(e.title),1)],!0)])):P("",!0),e.description||r.$slots.default?(p(),$("div",fM,[Ae(r.$slots,"default",{},()=>[_e(K(e.description),1)],!0)])):P("",!0),r.$slots.actions?(p(),$("div",pM,[Ae(r.$slots,"actions",{},void 0,!0)])):P("",!0)],2))}}),[["__scopeId","data-v-0e2ec916"]]);const Ws=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},_M=Ws("caret-right","0 0 256 256",'<path d="M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"/>'),mM=Ws("caret-right","0 0 256 256",'<path d="M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"/>'),c0=Ws("caret-right","0 0 256 256",'<path d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"/>'),vM=Ws("caret-right","0 0 256 256",'<path d="M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"/>'),gM=Ws("caret-right","0 0 256 256",'<path d="M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"/>'),bM=Ws("caret-right","0 0 256 256",'<path d="M176,128,96,208V48Z" opacity="0.2"/><path d="M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"/>'),yM="caret-right",V4=Object.freeze(Object.defineProperty({__proto__:null,bold:vM,default:c0,duotone:bM,fill:gM,glyphName:yM,light:mM,regular:c0,thin:_M},Symbol.toStringTag,{value:"Module"})),js=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},wM=js("caret-up-down","0 0 256 256",'<path d="M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z"/>'),SM=js("caret-up-down","0 0 256 256",'<path d="M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z"/>'),z6=js("caret-up-down","0 0 256 256",'<path d="M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z"/>'),CM=js("caret-up-down","0 0 256 256",'<path d="M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z"/>'),kM=js("caret-up-down","0 0 256 256",'<path d="M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z"/>'),AM=js("caret-up-down","0 0 256 256",'<path d="M80,176h96l-48,48ZM128,32,80,80h96Z" opacity="0.2"/><path d="M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z"/>'),$M="caret-up-down",MM=Object.freeze(Object.defineProperty({__proto__:null,bold:CM,default:z6,duotone:AM,fill:kM,glyphName:$M,light:SM,regular:z6,thin:wM},Symbol.toStringTag,{value:"Module"}));var LM={key:0,class:"nb-breadcrumbs__brand"},EM={key:0,class:"nb-breadcrumbs__title"},xM={key:1,class:"nb-breadcrumbs__subtitle"},TM={key:2,class:"nb-breadcrumbs__crumbs"},HM={key:1,class:"nb-breadcrumbs__current","aria-current":"page"},NM={key:0,class:"nb-breadcrumbs__code"},PM={key:0,class:"nb-breadcrumbs__code"},OM={key:3,class:"nb-breadcrumbs__parent"},IM={key:0,class:"nb-breadcrumbs__code"},RM={class:"nb-breadcrumbs__option"},DM={class:"nb-breadcrumbs__option-label"},VM=["aria-label"],BM=Je(Ne({__name:"Breadcrumbs",props:{title:{default:void 0},subtitle:{default:void 0},collapse:{default:"none"},items:{default:void 0}},emits:["select","switch"],setup(e,{emit:t}){let i=e,n=t,r=Jt(),a=H(()=>{var V;return!!((V=r==null?void 0:r.vnode.props)!=null&&V.onSelect)}),s=H(()=>{let V=i.items??[],T=V.findIndex(J=>J.current);return T===-1?V.length-1:T});function l(V){return V===s.value}function o(V){return V.to!=null||!!V.href||!!V.onClick||a.value}function u(V,T,J){var x;(x=V.onClick)==null||x.call(V,J),n("select",V,T,J)}let c=[],d=(V,T)=>V.value??T;function h(V){return(V.options??[]).map((T,J)=>({label:T.label,value:d(T,J),icon:T.picture===void 0?T.icon:void 0}))}function f(V){return(V.options??[]).some(T=>T.picture!==void 0)}function _(V,T){let J=V.options??[],x=J.findIndex((N,O)=>d(N,O)===T);return x===-1?void 0:J[x].picture}function m(V){if(V.value!=null)return V.value;let T=V.options??[],J=T.findIndex(x=>x.label===V.label);return J===-1?null:d(T[J],J)}function g(V,T,J){let x=V.options??[],N=x.findIndex((R,j)=>d(R,j)===J);if(N===-1||J===m(V))return;let O=x[N];n("switch",V,O,T),v(O)}function v(V){let T=r==null?void 0:r.appContext.config.globalProperties.$router;V.to==null?V.href&&window.location.assign(V.href):T?T.push(V.to):typeof V.to=="string"&&window.location.assign(V.to)}let w=vi();function S(V){return V.some(T=>T.type===ti?!1:T.type===Lr?String(T.children??"").trim()!=="":T.type===$e?S(T.children??[]):!0)}let y=H(()=>{var V;return S(((V=w.default)==null?void 0:V.call(w))??[])}),A=H(()=>{var V;return!!((V=i.items)!=null&&V.length)||y.value}),{phone:L}=ln(),k=H(()=>i.collapse==="phone"&&L.value&&A.value);return(V,T)=>{var J;return p(),$("nav",{class:Te(["nb-breadcrumbs",{"nb-breadcrumbs--collapsed":k.value}]),"aria-label":"breadcrumb"},[e.title||e.subtitle?(p(),$("span",LM,[e.title?(p(),$("span",EM,K(e.title),1)):P("",!0),e.subtitle?(p(),$("span",xM,K(e.subtitle),1)):P("",!0)])):P("",!0),(e.title||e.subtitle)&&A.value?(p(),le(Ke,{key:1,name:Y(c0),size:"sm",class:"nb-breadcrumbs__sep"},null,8,["name"])):P("",!0),A.value?(p(),$("span",TM,[(J=e.items)!=null&&J.length?(p(!0),$($e,{key:0},Ue(e.items,(x,N)=>{var O;return p(),$("span",{key:N,ref_for:!0,ref:R=>c[N]=R,class:"nb-breadcrumbs__item"},[x.picture===void 0?P("",!0):(p(),le(qu,{key:0,class:"nb-breadcrumbs__picture",name:x.label,picture:x.picture,size:16,decorative:""},null,8,["name","picture"])),l(N)?(p(),$("span",HM,[x.code?(p(),$("code",NM,K(x.label),1)):(p(),$($e,{key:1},[_e(K(x.label),1)],64))])):o(x)?(p(),le(kt,{key:2,class:"nb-breadcrumbs__link",variant:"link",to:x.to,href:x.href,target:x.target,onClick:R=>u(x,N,R)},{default:I(()=>[x.code?(p(),$("code",PM,K(x.label),1)):(p(),$($e,{key:1},[_e(K(x.label),1)],64))]),_:2},1032,["to","href","target","onClick"])):(p(),$("span",OM,[x.code?(p(),$("code",IM,K(x.label),1)):(p(),$($e,{key:1},[_e(K(x.label),1)],64))])),(O=x.options)!=null&&O.length?(p(),le(Zs,{key:4,class:"nb-breadcrumbs__switcher",searchable:"","selected-mark":"check",anchor:()=>c[N],"model-value":m(x),options:h(x),"search-placeholder":x.searchPlaceholder??"Find","no-results-label":x.noResultsLabel??"No results",onChange:R=>g(x,N,R)},tr({trigger:I(({attrs:R})=>[M("button",yt({type:"button",class:"nb-breadcrumbs__switch"},{ref_for:!0},R,{"aria-label":x.switchLabel??`Switch ${x.label}`}),[ee(Ke,{name:MM,size:"sm","aria-hidden":"true"})],16,VM)]),_:2},[f(x)?{name:"option",fn:I(({option:R})=>[M("span",RM,[_(x,R.value)===void 0?P("",!0):(p(),le(qu,{key:0,class:"nb-breadcrumbs__option-picture",name:R.label,picture:_(x,R.value),size:16,decorative:""},null,8,["name","picture"])),M("span",DM,K(R.label),1)])]),key:"0"}:void 0]),1032,["anchor","model-value","options","search-placeholder","no-results-label","onChange"])):P("",!0)])}),128)):Ae(V.$slots,"default",{key:1},void 0,!0)])):P("",!0)],2)}}}),[["__scopeId","data-v-d1d67ac5"]]),B4=function(e){return e.Neutral="neutral",e.Info="info",e.Success="success",e.Warning="warning",e.Danger="danger",e.Primary="primary",e.Grey="grey",e.Blue="blue",e.Orange="orange",e.Green="green",e.Red="red",e.Purple="purple",e}(B4||{}),Z4=function(e){return e.Small="sm",e.Medium="md",e}(Z4||{}),ZM={key:0,class:"nb-badge__dot"},U6=new Set,Er=Je(Ne({__name:"Badge",props:{variant:{default:B4.Neutral},size:{default:Z4.Medium},dot:{type:Boolean,default:!1},icon:{default:void 0},placeholder:{type:Boolean,default:!1},interactive:{type:Boolean,default:!1}},setup(e){let t=e,i={grey:"neutral",blue:"info",green:"success",orange:"warning",red:"danger",purple:"primary"},n=H(()=>i[t.variant]??t.variant);return Pe(()=>t.variant,r=>{let a=i[r];!a||U6.has(r)||typeof process<"u"||(U6.add(r),console.warn(`[NbBadge] variant="${r}" is deprecated and renders as variant="${a}". Badge variants name what the badge means, not its colour.`))},{immediate:!0}),(r,a)=>(p(),le(mi(e.interactive?"button":"span"),{type:e.interactive?"button":void 0,class:Te(["nb-badge",`nb-badge--${n.value}`,`nb-badge--${e.size}`,{"nb-badge--placeholder":e.placeholder,"nb-badge--interactive":e.interactive}])},{default:I(()=>[e.dot?(p(),$("span",ZM)):P("",!0),e.icon?(p(),le(Ke,{key:1,name:e.icon,size:"1.2em",class:"nb-badge__icon"},null,8,["name"])):P("",!0),Ae(r.$slots,"default",{},void 0,!0)]),_:3},8,["type","class"]))}}),[["__scopeId","data-v-de70cd6e"]]);const Ks=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},FM=Ks("x-circle","0 0 256 256",'<path d="M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"/>'),zM=Ks("x-circle","0 0 256 256",'<path d="M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"/>'),W6=Ks("x-circle","0 0 256 256",'<path d="M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"/>'),UM=Ks("x-circle","0 0 256 256",'<path d="M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"/>'),WM=Ks("x-circle","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z"/>'),jM=Ks("x-circle","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"/>'),KM="x-circle",qM=Object.freeze(Object.defineProperty({__proto__:null,bold:UM,default:W6,duotone:jM,fill:WM,glyphName:KM,light:zM,regular:W6,thin:FM},Symbol.toStringTag,{value:"Module"})),qs=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},GM=qs("note","0 0 256 256",'<path d="M92,96a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H96A4,4,0,0,1,92,96Zm4,36h64a4,4,0,0,0,0-8H96a4,4,0,0,0,0,8Zm32,24H96a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8ZM220,48V156.69a11.9,11.9,0,0,1-3.52,8.48l-51.31,51.32a11.93,11.93,0,0,1-8.48,3.51H48a12,12,0,0,1-12-12V48A12,12,0,0,1,48,36H208A12,12,0,0,1,220,48ZM48,212H156V160a4,4,0,0,1,4-4h52V48a4,4,0,0,0-4-4H48a4,4,0,0,0-4,4V208A4,4,0,0,0,48,212Zm158.35-48H164v42.35Z"/>'),YM=qs("note","0 0 256 256",'<path d="M90,96a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H96A6,6,0,0,1,90,96Zm6,38h64a6,6,0,0,0,0-12H96a6,6,0,0,0,0,12Zm32,20H96a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12ZM222,48V156.69a13.94,13.94,0,0,1-4.1,9.9L166.59,217.9a13.94,13.94,0,0,1-9.9,4.1H48a14,14,0,0,1-14-14V48A14,14,0,0,1,48,34H208A14,14,0,0,1,222,48ZM48,210H154V160a6,6,0,0,1,6-6h50V48a2,2,0,0,0-2-2H48a2,2,0,0,0-2,2V208A2,2,0,0,0,48,210Zm153.52-44H166v35.52Z"/>'),j6=qs("note","0 0 256 256",'<path d="M88,96a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,96Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16Zm32,16H96a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16ZM224,48V156.69A15.86,15.86,0,0,1,219.31,168L168,219.31A15.86,15.86,0,0,1,156.69,224H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48ZM48,208H152V160a8,8,0,0,1,8-8h48V48H48Zm120-40v28.7L196.69,168Z"/>'),XM=qs("note","0 0 256 256",'<path d="M84,108A12,12,0,0,1,96,96h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,108Zm32,28H96a12,12,0,0,0,0,24h20a12,12,0,0,0,0-24ZM228,48V156.69a19.86,19.86,0,0,1-5.86,14.14l-51.31,51.31A19.86,19.86,0,0,1,156.69,228H48a20,20,0,0,1-20-20V48A20,20,0,0,1,48,28H208A20,20,0,0,1,228,48ZM52,204h92V156a12,12,0,0,1,12-12h48V52H52Zm139-36H168v23Z"/>'),JM=qs("note","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H156.69A15.92,15.92,0,0,0,168,219.31L219.31,168A15.92,15.92,0,0,0,224,156.69V48A16,16,0,0,0,208,32ZM96,88h64a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16Zm32,80H96a8,8,0,0,1,0-16h32a8,8,0,0,1,0,16ZM96,136a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm64,68.69V160h44.7Z"/>'),QM=qs("note","0 0 256 256",'<path d="M216,160l-56,56V160Z" opacity="0.2"/><path d="M88,96a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,96Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16Zm32,16H96a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16ZM224,48V156.69A15.86,15.86,0,0,1,219.31,168L168,219.31A15.86,15.86,0,0,1,156.69,224H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48ZM48,208H152V160a8,8,0,0,1,8-8h48V48H48Zm120-40v28.7L196.69,168Z"/>'),eL="note",tL=Object.freeze(Object.defineProperty({__proto__:null,bold:XM,default:j6,duotone:QM,fill:JM,glyphName:eL,light:YM,regular:j6,thin:GM},Symbol.toStringTag,{value:"Module"}));var Xd=function(e){return e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e.Neutral="neutral",e}(Xd||{}),Jd=function(e){return e.Inline="inline",e.Callout="callout",e}(Jd||{}),iL=["role","aria-live"],nL={class:"nb-banner__body"},rL={key:0,class:"nb-banner__title"},aL={key:1,class:"nb-banner__text"},sL={key:1,class:"nb-banner__actions"},lL=["aria-label"],xr=Je(Ne({__name:"Banner",props:{status:{default:Xd.Info},variant:{default:Jd.Inline},title:{},dismissible:{type:Boolean,default:!1},icon:{},hideIcon:{type:Boolean,default:!1},flush:{type:Boolean,default:!1},closeLabel:{default:"Close"}},emits:["dismiss"],setup(e,{emit:t}){let i=e,n=t,r=vi(),a=H(()=>!!r.default),s=H(()=>!!r.action),l=H(()=>i.dismissible&&i.variant!==Jd.Callout),o=H(()=>i.status===Xd.Error),u=X(!1);function c(){u.value=!0,n("dismiss")}let d={info:Zc,success:Bs,warning:zc,error:qM,neutral:tL};return(h,f)=>u.value?P("",!0):(p(),$("div",{key:0,class:Te(["nb-banner",`nb-banner--${i.status}`,`nb-banner--${i.variant}`,{"nb-banner--flush":i.flush}]),role:o.value?"alert":"status","aria-live":o.value?"assertive":"polite"},[i.hideIcon?P("",!0):(p(),le(Ke,{key:0,name:i.icon??d[i.status],size:18,weight:"fill",class:"nb-banner__icon","aria-hidden":"true"},null,8,["name"])),M("p",nL,[i.title?(p(),$("strong",rL,K(i.title),1)):P("",!0),a.value?(p(),$("span",aL,[Ae(h.$slots,"default",{},void 0,!0)])):P("",!0)]),s.value?(p(),$("div",sL,[Ae(h.$slots,"action",{},void 0,!0)])):P("",!0),l.value?(p(),$("button",{key:2,type:"button",class:"nb-banner__close","aria-label":i.closeLabel,onClick:c},[ee(Ke,{name:Y(ir),size:"sm"},null,8,["name"])],8,lL)):P("",!0)],10,iL))}}),[["__scopeId","data-v-6e12770e"]]),oL={key:0,class:"nb-chart__header"},uL={key:0,class:"nb-chart__title"},cL={key:1,class:"nb-chart__subtitle"},r2=Je(Ne({__name:"ChartFrame",props:{title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!0}},setup(e,{expose:t}){let i=e,n=X(null),r=H(()=>{let a=i.height;return typeof a=="number"||/^\d+(\.\d+)?$/.test(a)?`${a}px`:a});return t({viewport:n}),(a,s)=>(p(),$("figure",{class:"nb-chart",style:ft({height:r.value})},[e.title||e.subtitle?(p(),$("figcaption",oL,[e.title?(p(),$("h4",uL,K(e.title),1)):P("",!0),e.subtitle?(p(),$("p",cL,K(e.subtitle),1)):P("",!0)])):P("",!0),M("div",{ref_key:"viewport",ref:n,class:"nb-chart__viewport"},[Ae(a.$slots,"default",{},void 0,!0)],512),e.showLegend?Ae(a.$slots,"legend",{key:1},void 0,!0):P("",!0)],4))}}),[["__scopeId","data-v-6b1bfb8f"]]),dL={key:0,class:"nb-chart__tooltip-title"},hL={class:"nb-chart__tooltip-rows"},fL={class:"nb-chart__tooltip-label"},pL={class:"nb-chart__tooltip-value"},a2=Je(Ne({__name:"ChartTooltip",props:{visible:{type:Boolean},x:{},y:{},title:{},rows:{}},setup(e){return(t,i)=>(p(),le(sa,{name:"nb-chart-tooltip"},{default:I(()=>[e.visible?(p(),$("div",{key:0,class:"nb-chart__tooltip",style:ft({transform:`translate(${e.x}px, ${e.y}px)`}),role:"tooltip"},[e.title?(p(),$("div",dL,K(e.title),1)):P("",!0),M("ul",hL,[(p(!0),$($e,null,Ue(e.rows,(n,r)=>(p(),$("li",{key:`${n.label}-${r}`,class:"nb-chart__tooltip-row"},[M("span",{class:"nb-chart__tooltip-swatch",style:ft({background:n.color})},null,4),M("span",fL,K(n.label),1),M("span",pL,K(n.value),1)]))),128))])],4)):P("",!0)]),_:1}))}}),[["__scopeId","data-v-b7e5e28b"]]),Yu=["var(--nb-c-chart-1)","var(--nb-c-chart-2)","var(--nb-c-chart-3)","var(--nb-c-chart-4)","var(--nb-c-chart-5)","var(--nb-c-chart-6)","var(--nb-c-chart-7)","var(--nb-c-chart-8)"],s2=(e,t=Yu)=>{let i=t.length>0?t:Yu;return i[((Number.isFinite(e)?Math.trunc(e):0)%i.length+i.length)%i.length]},_L={class:"nb-chart__legend"},mL={class:"nb-chart__legend-label"},F4=Je(Ne({__name:"ChartLegend",props:{items:{}},setup(e){return(t,i)=>(p(),$("ul",_L,[(p(!0),$($e,null,Ue(e.items,n=>(p(),$("li",{key:n.label,class:"nb-chart__legend-item"},[M("span",{class:"nb-chart__legend-swatch",style:ft({background:n.color})},null,4),M("span",mL,K(n.label),1)]))),128))]))}}),[["__scopeId","data-v-47348343"]]),Xu=(e,t)=>{let[i,n]=e,[r,a]=t,s=n-i||1,l=o=>r+(o-i)/s*(a-r);return l.domain=e,l.range=t,l.ticks=(o=5)=>gL(i,n,o),l},vL=(e,t,i=.2)=>{let[n,r]=t,a=(r-n)/Math.max(e.length,1),s=a*(1-i),l=(a-s)/2,o=new Map(e.map((c,d)=>[c,d])),u=c=>{let d=o.get(c);return d===void 0?n:n+d*a+l};return u.bandwidth=s,u.domain=e,u.range=t,u},gL=(e,t,i=5)=>{if(e===t)return[e];let n=t-e,r=n/Math.max(i,1),a=10**Math.floor(Math.log10(r)),s=[1,2,5,10].map(c=>c*a),l=s.find(c=>n/c<=i*1.5)??s[s.length-1],o=Math.ceil(e/l)*l,u=[];for(let c=o;c<=t+l/2;c+=l)u.push(Number(c.toFixed(10)));return u},l2=(e,t,i=.05)=>{if(e===t){let r=Math.abs(e)||1;return[e-r,t+r]}let n=(t-e)*i;return[e-n,t+n]},o2=(e,t={width:480,height:280})=>{let i=X({...t}),n=null;return et(()=>{!e.value||typeof ResizeObserver>"u"||(n=new ResizeObserver(r=>{let a=r[0];if(!a)return;let{width:s,height:l}=a.contentRect;i.value={width:Math.max(0,Math.round(s)),height:Math.max(0,Math.round(l))}}),n.observe(e.value))}),Tt(()=>{n==null||n.disconnect(),n=null}),i},bL=["width","height","role","aria-label"],yL={key:0},wL=["x1","x2","y1","y2"],SL={key:1,class:"nb-chart__axis"},CL=["x","y","text-anchor","dominant-baseline"],kL={class:"nb-chart__axis"},AL=["x","y","text-anchor","dominant-baseline"],$L=["x1","x2","y1","y2"],ML={key:3,class:"nb-chart__empty-layer","aria-hidden":"true"},LL=["d","fill","tabindex","role","aria-label","onKeydown"],EL=["fill","tabindex","role","aria-label","onKeydown"],xL={class:"nb-chart__hover-layer"},TL=["onMouseenter","onMousemove","onClick"],q0=2,HL=Je(Ne({__name:"BarChart",props:{series:{default:()=>[]},orientation:{default:"vertical"},stacked:{type:Boolean,default:!1},valueFormatter:{},barRadius:{default:0},showEmpty:{type:Boolean,default:!1},showBaseline:{type:Boolean,default:!0},showValueAxis:{type:Boolean,default:!0},categoryLabelEvery:{default:1},title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>Yu}},emits:["select"],setup(e,{emit:t}){let i=ar(),n=e,r=t,a=X(null),s=o2(a,{width:480,height:240}),l=H(()=>n.orientation==="horizontal"),o=H(()=>n.series.map((te,be)=>({name:te.name,data:te.data,color:te.color??s2(be,n.colors)}))),u=H(()=>{var te;return(((te=n.series[0])==null?void 0:te.data)??[]).map(be=>be.x)}),c=(te,be)=>{var E,F;return((F=(E=o.value[be])==null?void 0:E.data[te])==null?void 0:F.y)??0},d=(te,be)=>{let E=c(te,be);if(!n.stacked)return[0,E];let F=0;for(let ie=0;ie<be;ie+=1){let fe=c(te,ie);fe>=0==E>=0&&(F+=fe)}return[F,F+E]},h=H(()=>{let te=[];return u.value.forEach((be,E)=>{o.value.forEach((F,ie)=>{te.push(d(E,ie)[1])})}),te.length?l2(Math.min(0,...te),Math.max(0,...te),.05):[0,1]}),f=H(()=>{if(!l.value)return{top:12,right:16,bottom:28,left:n.showValueAxis?44:16};let te=u.value.reduce((E,F)=>Math.max(E,String(F).length),0),be=Math.max(44,Math.round(s.value.width*.4));return{top:12,right:16,bottom:n.showValueAxis?28:12,left:Math.min(Math.max(44,Math.ceil(te*6.2)+12),be)}}),_=H(()=>({x0:f.value.left,x1:Math.max(f.value.left,s.value.width-f.value.right),y0:f.value.top,y1:Math.max(f.value.top,s.value.height-f.value.bottom)})),m=H(()=>vL(u.value.map(te=>String(te)),l.value?[_.value.y0,_.value.y1]:[_.value.x0,_.value.x1],.2)),g=H(()=>Xu(h.value,l.value?[_.value.x0,_.value.x1]:[_.value.y1,_.value.y0])),v=H(()=>g.value.ticks(5)),w=te=>m.value(String(u.value[te])),S=te=>w(te)+m.value.bandwidth/2,y=H(()=>{let te=o.value.length||1;return n.stacked?m.value.bandwidth:m.value.bandwidth/te}),A=(te,be)=>{let[E,F]=d(te,be),ie=g.value(E),fe=g.value(F),ne=Math.max(0,y.value-2),Z=w(te)+(n.stacked?0:be*y.value),re=Math.max(0,Math.abs(fe-ie));return l.value?{x:Math.min(ie,fe),y:Z,width:re,height:ne}:{x:Z,y:Math.min(ie,fe),width:ne,height:re}},L=H(()=>{let te=Math.floor(n.categoryLabelEvery);return Number.isFinite(te)&&te>1?te:1}),k=H(()=>u.value.map((te,be)=>({cat:te,i:be})).filter(({i:te})=>te%L.value===0)),V=H(()=>n.barRadius>0),T=(te,be)=>{if(!n.stacked)return!0;let E=c(te,be);for(let F=be+1;F<o.value.length;F+=1){let ie=c(te,F);if(ie!==0&&ie>=0==E>=0)return!1}return!0},J=(te,be,E,F,[ie,fe,ne,Z])=>[`M${te+ie},${be}`,`H${te+E-fe}`,`A${fe},${fe} 0 0 1 ${te+E},${be+fe}`,`V${be+F-ne}`,`A${ne},${ne} 0 0 1 ${te+E-ne},${be+F}`,`H${te+Z}`,`A${Z},${Z} 0 0 1 ${te},${be+F-Z}`,`V${be+ie}`,`A${ie},${ie} 0 0 1 ${te+ie},${be}`,"Z"].join(" "),x=(te,be)=>{let{x:E,y:F,width:ie,height:fe}=A(te,be),ne=l.value?fe:ie,Z=l.value?ie:fe,re=T(te,be)?Math.max(0,Math.min(n.barRadius,ne/2,Z)):0,b=c(te,be)>=0,C;return C=l.value?b?[0,re,re,0]:[re,0,0,re]:b?[re,re,0,0]:[0,0,re,re],J(E,F,ie,fe,C)},N=H(()=>u.value.map((te,be)=>be).filter(te=>o.value.every((be,E)=>c(te,E)===0))),O=te=>{let be=g.value(0),E=Math.max(0,m.value.bandwidth-2),F=V.value?Math.min(n.barRadius,q0/2):0;return l.value?{x:be,y:w(te),width:q0,height:E,rx:F}:{x:w(te),y:be-q0,width:E,height:q0,rx:F}},R=te=>{let be=w(te),E=m.value.bandwidth;return l.value?{x:_.value.x0,y:be,width:Math.max(0,_.value.x1-_.value.x0),height:E}:{x:be,y:_.value.y0,width:E,height:Math.max(0,_.value.y1-_.value.y0)}},j=te=>Math.abs(te)>=1e3?`${(te/1e3).toFixed(1)}k`:String(te),G=te=>n.valueFormatter?n.valueFormatter(te):j(te),ae=Jt(),q=()=>{var te;return!!((te=ae==null?void 0:ae.vnode.props)!=null&&te.onSelect)},se=(te,be)=>{let E=o.value[be],F=G(c(te,be));return o.value.length>1?`${u.value[te]}, ${E==null?void 0:E.name}: ${F}`:`${u.value[te]}: ${F}`},me=(te,be)=>{let E=o.value[be],F=E==null?void 0:E.data[te];return{kind:"series",x:(F==null?void 0:F.x)??u.value[te],y:(F==null?void 0:F.y)??0,seriesName:(E==null?void 0:E.name)??"",seriesIndex:be,index:te,point:F??{x:u.value[te],y:0}}},U=te=>{let be=te.currentTarget.ownerSVGElement;if(!be)return null;let E=be.getBoundingClientRect();return{x:te.clientX-E.left,y:te.clientY-E.top}},ve=(te,be)=>{let E=o.value.length;if(E<=1)return 0;let F=U(te);if(!F)return 0;if(n.stacked){let ne=l.value?F.x:F.y;for(let Z=0;Z<E;Z+=1){let[re,b]=d(be,Z),C=g.value(re),B=g.value(b);if(ne>=Math.min(C,B)&&ne<=Math.max(C,B))return Z}return E-1}let ie=(l.value?F.y:F.x)-w(be),fe=Math.floor(ie/(y.value||1));return Math.min(Math.max(fe,0),E-1)},ce=(te,be)=>{q()&&r("select",me(be,ve(te,be)))},ge=(te,be,E)=>{q()&&(te.key!=="Enter"&&te.key!==" "||(te.preventDefault(),r("select",me(be,E))))},ue=X(null),pe=X({x:0,y:0}),W=(te,be)=>{let E=U(te);E&&(pe.value={x:E.x+12,y:E.y+12},ue.value=be)},he=H(()=>ue.value===null?[]:o.value.map(te=>{let be=te.data[ue.value];return{label:te.name,value:(be==null?void 0:be.label)??G((be==null?void 0:be.y)??0),color:te.color}}));return(te,be)=>(p(),le(r2,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":e.showLegend&&o.value.length>0},{legend:I(()=>[ee(F4,{items:o.value.map(E=>({label:E.name,color:E.color}))},null,8,["items"])]),default:I(()=>[M("div",{ref_key:"root",ref:a,class:"nb-bar-chart"},[(p(),$("svg",{width:Y(s).width,height:Y(s).height,class:Te(["nb-chart__svg",{"nb-chart__svg--selectable":q()}]),role:q()?"group":"img","aria-label":e.title||Y(i).chartBar,onMouseleave:be[0]||(be[0]=E=>ue.value=null)},[e.showGrid&&Y(s).width>0?(p(),$("g",yL,[(p(!0),$($e,null,Ue(v.value,E=>(p(),$("line",{key:`grid-${E}`,class:"nb-chart__gridline",x1:l.value?g.value(E):_.value.x0,x2:l.value?g.value(E):_.value.x1,y1:l.value?_.value.y0:g.value(E),y2:l.value?_.value.y1:g.value(E)},null,8,wL))),128))])):P("",!0),e.showValueAxis?(p(),$("g",SL,[(p(!0),$($e,null,Ue(v.value,E=>(p(),$("text",{key:`vt-${E}`,x:l.value?g.value(E):_.value.x0-6,y:l.value?_.value.y1+14:g.value(E),"text-anchor":l.value?"middle":"end","dominant-baseline":l.value?"auto":"middle"},K(G(E)),9,CL))),128))])):P("",!0),M("g",kL,[(p(!0),$($e,null,Ue(k.value,({cat:E,i:F})=>(p(),$("text",{key:`ct-${F}`,x:l.value?_.value.x0-6:S(F),y:l.value?S(F):_.value.y1+14,"text-anchor":l.value?"end":"middle","dominant-baseline":l.value?"middle":"auto"},K(E),9,AL))),128))]),e.showBaseline?(p(),$("line",{key:2,class:"nb-chart__axis-line",x1:l.value?g.value(0):_.value.x0,x2:l.value?g.value(0):_.value.x1,y1:l.value?_.value.y0:g.value(0),y2:l.value?_.value.y1:g.value(0)},null,8,$L)):P("",!0),e.showEmpty?(p(),$("g",ML,[(p(!0),$($e,null,Ue(N.value,E=>(p(),$("rect",yt({key:`empty-${E}`,class:"nb-chart__empty"},{ref_for:!0},O(E)),null,16))),128))])):P("",!0),(p(!0),$($e,null,Ue(u.value,(E,F)=>(p(),$("g",{key:`g-${F}`},[V.value?(p(!0),$($e,{key:0},Ue(o.value,(ie,fe)=>(p(),$("path",{key:`${F}-${fe}`,class:Te(["nb-chart__bar",{"is-dim":ue.value!==null&&ue.value!==F}]),d:x(F,fe),fill:ie.color,tabindex:q()?0:void 0,role:q()?"button":void 0,"aria-label":q()?se(F,fe):void 0,onKeydown:ne=>ge(ne,F,fe)},null,42,LL))),128)):(p(!0),$($e,{key:1},Ue(o.value,(ie,fe)=>(p(),$("rect",yt({key:`${F}-${fe}`,class:["nb-chart__bar",{"is-dim":ue.value!==null&&ue.value!==F}]},{ref_for:!0},A(F,fe),{fill:ie.color,tabindex:q()?0:void 0,role:q()?"button":void 0,"aria-label":q()?se(F,fe):void 0,onKeydown:ne=>ge(ne,F,fe)}),null,16,EL))),128))]))),128)),M("g",xL,[(p(!0),$($e,null,Ue(u.value,(E,F)=>(p(),$("rect",yt({key:`hover-${F}`},{ref_for:!0},R(F),{fill:"transparent",onMouseenter:ie=>ue.value=F,onMousemove:ie=>W(ie,F),onClick:ie=>ce(ie,F)}),null,16,TL))),128))])],42,bL)),ee(a2,{visible:e.showTooltip&&ue.value!==null,x:pe.value.x,y:pe.value.y,title:ue.value===null?"":String(u.value[ue.value]),rows:he.value},null,8,["visible","x","y","title","rows"])],512)]),_:1},8,["title","subtitle","height","show-legend"]))}}),[["__scopeId","data-v-304a305f"]]),Zo=0,zn=null;function Fo(){if(!zn)return;let e=document.documentElement.style;e.setProperty("--nb-vvh",`${zn.height}px`),e.setProperty("--nb-vvt",`${zn.offsetTop}px`)}function NL(){Zo+=1,!(Zo>1)&&(zn=typeof window<"u"?window.visualViewport:null,zn&&(zn.addEventListener("resize",Fo),zn.addEventListener("scroll",Fo),Fo()))}function PL(){if(Zo===0||(--Zo,Zo>0))return;zn&&(zn=(zn.removeEventListener("resize",Fo),zn.removeEventListener("scroll",Fo),null));let e=document.documentElement.style;e.removeProperty("--nb-vvh"),e.removeProperty("--nb-vvt")}function OL(e){let{phone:t}=ln(),i=!1;function n(r){r!==i&&(i=r,r?NL():PL())}Pe(()=>e()&&t.value,n,{immediate:!0}),Ko(()=>n(!1))}const Gs=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},IL=Gs("caret-left","0 0 256 256",'<path d="M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"/>'),RL=Gs("caret-left","0 0 256 256",'<path d="M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"/>'),Qd=Gs("caret-left","0 0 256 256",'<path d="M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"/>'),DL=Gs("caret-left","0 0 256 256",'<path d="M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"/>'),VL=Gs("caret-left","0 0 256 256",'<path d="M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"/>'),BL=Gs("caret-left","0 0 256 256",'<path d="M160,48V208L80,128Z" opacity="0.2"/><path d="M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"/>'),ZL="caret-left",FL=Object.freeze(Object.defineProperty({__proto__:null,bold:DL,default:Qd,duotone:BL,fill:VL,glyphName:ZL,light:RL,regular:Qd,thin:IL},Symbol.toStringTag,{value:"Module"}));var zL=["width","height","role","aria-hidden","aria-labelledby","focusable"],UL=["id"],WL=["id"],jL=["id"],KL=["id"],qL=["id"],GL=["id"],YL=["id"],XL=["id"],JL=["id"],QL=["id"],eE={transform:"matrix(0.924856, 0, 0, 0.924856, -44.998852, -33.191986)"},tE={id:"group-1"},iE=["fill"],nE=["fill"],rE=["fill"],aE={id:"object-1"},sE=["fill"],lE=["fill"],oE=["fill"],uE=["fill"],cE={id:"object-2"},dE=["fill"],hE=["fill"],fE=["fill"],pE=["fill"],_E=["fill"],mE=Ne({__name:"NubiscoMark",props:{size:{default:20},title:{default:void 0}},setup(e){let t=e,i=`nb-nubisco-mark-${an()}`,n=`${i}-title`,r=H(()=>typeof t.size=="number"?`${t.size}px`:t.size);return(a,s)=>(p(),$("svg",{width:r.value,height:r.value,viewBox:"0 0 320 320",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t.title?"img":void 0,"aria-hidden":t.title?void 0:"true","aria-labelledby":t.title?n:void 0,focusable:t.title?void 0:"false"},[t.title?(p(),$("title",{key:0,id:n},K(t.title),1)):P("",!0),M("defs",null,[M("linearGradient",{id:`${i}-g1`,gradientUnits:"userSpaceOnUse",x1:"119.61",y1:"36.855",x2:"119.61",y2:"381.922",spreadMethod:"pad",gradientTransform:"matrix(-0.887141, -0.461497, 0.40987, -0.999167, 140.11236, 473.94595)"},[...s[0]||(s[0]=[M("stop",{offset:"0","stop-color":"rgb(254,216,103)"},null,-1),M("stop",{offset:"0.51","stop-color":"rgb(250,71,78)"},null,-1),M("stop",{offset:"1","stop-color":"rgb(173,55,159)"},null,-1)])],8,UL),M("linearGradient",{id:`${i}-g3`,gradientUnits:"userSpaceOnUse",x1:"143.989",y1:"36.855",x2:"143.989",y2:"179.9",gradientTransform:"matrix(0.887207, 0.461371, -0.426978, 0.821069, 78.224142, -58.961861)"},[...s[1]||(s[1]=[M("stop",{offset:"0","stop-color":"rgb(0,0,0)","stop-opacity":"0.17"},null,-1),M("stop",{offset:"1","stop-color":"rgb(0,0,0)","stop-opacity":"0.03"},null,-1)])],8,WL),M("linearGradient",{id:`${i}-g2`,gradientUnits:"userSpaceOnUse",x1:"91.703",y1:"328.267",x2:"91.703",y2:"381.922",gradientTransform:"matrix(-0.601925, -0.798552, 1.256661, -1.089764, -307.90801, 812.885223)"},[...s[2]||(s[2]=[M("stop",{offset:"0","stop-color":"rgb(0,0,0)","stop-opacity":"0.38"},null,-1),M("stop",{offset:"1","stop-color":"rgb(0,0,0)","stop-opacity":"0.2"},null,-1)])],8,jL),M("linearGradient",{id:`${i}-g8`,gradientUnits:"userSpaceOnUse",x1:"348.688",y1:"35.889",x2:"348.688",y2:"116.548",gradientTransform:"matrix(-0.503716, -0.863869, 1.170135, -0.682295, 434.155647, 419.539108)"},[...s[3]||(s[3]=[M("stop",{offset:"0","stop-color":"rgb(254,171,107)","stop-opacity":"0.56"},null,-1),M("stop",{offset:"0.745","stop-color":"rgb(255,253,207)"},null,-1),M("stop",{offset:"1","stop-color":"rgb(255,253,207)"},null,-1)])],8,KL),M("linearGradient",{id:`${i}-g10`,gradientUnits:"userSpaceOnUse",x1:"338.142",y1:"47.006",x2:"338.142",y2:"121.215",gradientTransform:"matrix(0.75452, 0.656277, -1.016572, 1.16875, 168.120543, -239.018367)"},[...s[4]||(s[4]=[M("stop",{offset:"0","stop-color":"rgb(255,255,255)","stop-opacity":"0.35"},null,-1),M("stop",{offset:"0.611","stop-color":"rgb(255,255,255)","stop-opacity":"0.2"},null,-1),M("stop",{offset:"0.656","stop-color":"rgb(255,255,255)","stop-opacity":"0.09"},null,-1),M("stop",{offset:"1","stop-color":"rgb(255,255,255)","stop-opacity":"0.05"},null,-1)])],8,qL),M("linearGradient",{id:`${i}-g7`,gradientUnits:"userSpaceOnUse",x1:"286.279",y1:"128.145",x2:"286.279",y2:"381.893",gradientTransform:"matrix(0.980122, -0.198399, 0.201333, 0.99503, -34.83682, 58.72465)"},[...s[5]||(s[5]=[M("stop",{offset:"0","stop-color":"rgb(94,33,120)","stop-opacity":"0"},null,-1),M("stop",{offset:"0.23","stop-color":"rgb(94,33,116)","stop-opacity":"0"},null,-1),M("stop",{offset:"1","stop-color":"rgb(94,32,119)","stop-opacity":"0.77"},null,-1)])],8,GL),M("linearGradient",{id:`${i}-g0`,gradientUnits:"userSpaceOnUse",x1:"220.396",y1:"36.815",x2:"220.396",y2:"381.893",gradientTransform:"matrix(0.909593, -0.415502, 0.458149, 0.999272, -61.507814, 91.882297)"},[...s[6]||(s[6]=[M("stop",{offset:"0","stop-color":"rgb(105,187,99)"},null,-1),M("stop",{offset:"0.5","stop-color":"rgb(16,169,164)"},null,-1),M("stop",{offset:"1","stop-color":"rgb(11,130,207)"},null,-1)])],8,YL),M("linearGradient",{id:`${i}-g4`,gradientUnits:"userSpaceOnUse",x1:"197.5",y1:"36.815",x2:"197.5",y2:"132.342",gradientTransform:"matrix(0.419296, -0.90785, 1.050658, 0.485253, 18.526692, 214.196105)"},[...s[7]||(s[7]=[M("stop",{offset:"0","stop-color":"rgb(255,255,255)","stop-opacity":"0.45"},null,-1),M("stop",{offset:"1","stop-color":"rgb(7,226,201)","stop-opacity":"0.85"},null,-1)])],8,XL),M("linearGradient",{id:`${i}-g5`,gradientUnits:"userSpaceOnUse",x1:"197.5",y1:"59.48",x2:"197.5",y2:"132.342",gradientTransform:"matrix(0.450388, -0.892832, 1.886975, 0.951884, -71.46741, 184.345316)"},[...s[8]||(s[8]=[M("stop",{offset:"0","stop-color":"rgb(255,255,255)","stop-opacity":"0.6"},null,-1),M("stop",{offset:"0.461","stop-color":"rgb(255,255,255)","stop-opacity":"0.71"},null,-1),M("stop",{offset:"1","stop-color":"rgb(255,255,255)","stop-opacity":"0.82"},null,-1)])],8,JL),M("linearGradient",{id:`${i}-g6`,gradientUnits:"userSpaceOnUse",x1:"258.091",y1:"319.547",x2:"258.091",y2:"338.393",gradientTransform:"matrix(0.172631, -0.984987, 3.998703, 0.700821, -1101.160809, 355.271073)"},[...s[9]||(s[9]=[M("stop",{offset:"0","stop-color":"rgb(5,219,226)","stop-opacity":"0.96"},null,-1),M("stop",{offset:"0.493","stop-color":"rgb(5,219,226)","stop-opacity":"0.74"},null,-1),M("stop",{offset:"1","stop-color":"rgb(5,219,226)","stop-opacity":"0.34"},null,-1)])],8,QL)]),M("g",eE,[M("g",tE,[M("path",{fill:`url(#${i}-g1)`,d:"M 48.655 381.922 C 119.827 257.14 51.704 41.212 190.566 36.855 C 173.148 402.723 82.723 380.123 48.655 381.922 Z"},null,8,iE),M("path",{fill:`url(#${i}-g3)`,d:"M 177.776 179.9 C 120.488 51.712 97.413 142.969 97.413 142.969 C 107.668 83.266 128.325 38.808 190.566 36.855 C 187.88 93.268 183.459 140.445 177.776 179.9 Z"},null,8,nE),M("path",{fill:`url(#${i}-g2)`,d:"M 48.655 381.922 C 58.078 365.401 65.06 347.282 70.403 328.267 C 88.094 346.662 134.752 331.941 134.752 331.941 C 103.379 387.36 67.445 380.93 48.655 381.922 Z"},null,8,rE),s[10]||(s[10]=M("path",{fill:"rgb(255,254,155)",d:"M 134.752 331.941 C 121.122 337.936 81.551 344.779 70.403 328.267 C 88.094 346.662 134.752 331.941 134.752 331.941 Z"},null,-1))]),M("g",aE,[M("path",{fill:`url(#${i}-g1)`,d:"M 313.875 381.893 C 288.098 381.893 268.627 375.477 253.751 364.466 C 216.182 182.535 312.866 21.948 394.655 36.85 C 335.339 159.09 350.166 381.893 313.875 381.893 Z"},null,8,sE),M("path",{fill:`url(#${i}-g8)`,d:"M 367.694 116.548 C 367.694 116.548 352.527 74.893 302.72 88.001 C 329.996 51.072 363.412 31.158 394.655 36.85 C 383.206 60.444 374.519 87.785 367.694 116.548 Z"},null,8,lE),s[11]||(s[11]=M("path",{fill:"rgb(255,255,255)","fill-opacity":"0.46",d:"M 367.694 116.548 C 367.694 116.548 352.527 74.893 302.72 88.001 C 352.21 71.129 367.694 116.548 367.694 116.548 Z"},null,-1)),M("path",{fill:`url(#${i}-g10)`,d:"M 384.493 47.025 C 335.553 54.802 291.791 121.215 291.791 121.215 C 291.791 121.215 326.809 45.627 384.493 47.025 Z"},null,8,oE),M("path",{fill:`url(#${i}-g7)`,d:"M 313.875 381.893 C 288.098 381.893 268.627 375.477 253.751 364.466 C 235.099 274.144 249.538 189.083 278.815 128.145 C 290.999 161.58 298.453 349.688 327.158 367.997 C 323.596 376.899 319.308 381.893 313.875 381.893 Z"},null,8,uE)]),M("g",cE,[M("path",{fill:`url(#${i}-g0)`,d:"M 313.875 381.893 C 139.653 381.893 253.533 88.786 126.916 65.199 C 141.046 48.182 160.854 37.738 190.253 36.815 C 311.395 48.025 251.672 276.857 313.875 381.893 Z"},null,8,dE),M("path",{fill:`url(#${i}-g4)`,d:"M 268.085 132.342 C 268.085 132.342 206.404 63.594 126.916 65.199 C 141.046 48.182 160.854 37.738 190.253 36.815 C 238.545 41.284 258.095 80.336 268.085 132.342 Z"},null,8,hE),M("path",{fill:`url(#${i}-g5)`,d:"M 268.085 132.342 C 268.085 132.342 206.404 63.594 126.916 65.199 C 183.216 63.321 231.803 93.322 268.085 132.342 Z"},null,8,fE),M("path",{fill:`url(#${i}-g2)`,d:"M 313.875 381.893 C 262.355 381.893 236.028 356.261 221.227 319.547 C 258.674 349.427 294.501 333.052 294.954 334.741 C 299.608 352.085 305.684 368.063 313.875 381.893 Z"},null,8,pE),M("path",{fill:`url(#${i}-g6)`,d:"M 294.954 334.741 C 271.602 341.74 244.333 340.344 221.227 319.547 C 258.674 349.427 294.501 333.052 294.954 334.741 Z"},null,8,_E),s[12]||(s[12]=M("path",{fill:"rgb(255,255,255)","fill-opacity":"0.11",d:"M 164.386 48.742 C 244.371 44.544 268.345 190.719 268.345 190.719 C 249.39 92.792 222.974 38.013 164.386 48.742 Z"},null,-1))])])],8,zL))}}),z4=function(e){return e.Horizontal="horizontal",e.Vertical="vertical",e}(z4||{}),vE=["aria-labelledby","aria-invalid","aria-describedby","aria-disabled"],gE={class:"nb-radio__control"},bE=["name","value","checked","disabled","readonly","onChange"],yE={class:"nb-radio__circle"},wE={key:0,class:"nb-radio__dot"},SE={class:"nb-radio__text"},U4=Je(Ne({__name:"Radio",props:{modelValue:{},options:{},name:{},direction:{default:z4.Vertical},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},required:{type:Boolean},id:{default:"radio"},label:{},error:{default:void 0},warning:{default:void 0},helper:{default:void 0}},emits:["update:modelValue"],setup(e){let t=e,i=rr({}),n=H(()=>t.id&&t.id!=="radio"?t.id:i),r=H(()=>`${n.value}-label`),{variant:a,text:s,messageId:l,invalid:o,live:u,key:c}=Uc(t,n),d=H(()=>["nb-radio",{"nb-radio--error":!!t.error,"nb-radio--warning":!t.error&&!!t.warning,"nb-radio--disabled":t.disabled,"nb-radio--readonly":t.readonly}]);function h(f){return["nb-radio__option",{"nb-radio__option--disabled":t.disabled||f.disabled,"nb-radio__option--readonly":t.readonly}]}return(f,_)=>(p(),$("div",{class:Te(d.value)},[e.label?(p(),le(Os,{key:0,id:r.value},{default:I(()=>[_e(K(e.label),1)]),_:1},8,["id"])):P("",!0),M("div",{class:Te(["nb-radio__group",`nb-radio__group--${e.direction}`]),role:"radiogroup","aria-labelledby":e.label?r.value:void 0,"aria-invalid":Y(o),"aria-describedby":Y(l),"aria-disabled":e.disabled||void 0},[(p(!0),$($e,null,Ue(e.options,m=>(p(),$("label",{key:m.value,class:Te(h(m))},[M("span",gE,[M("input",{type:"radio",name:e.name,value:m.value,checked:e.modelValue===m.value,disabled:e.disabled||m.disabled,readonly:e.readonly,class:"nb-radio__input",onChange:g=>!e.readonly&&f.$emit("update:modelValue",m.value)},null,40,bE),M("span",yE,[e.modelValue===m.value?(p(),$("span",wE)):P("",!0)])]),M("span",SE,K(m.label),1)],2))),128))],10,vE),Y(a)?(p(),le(_t,{id:Y(l),key:Y(c),variant:Y(a),live:Y(u),class:"nb-radio__message"},{default:I(()=>[_e(K(Y(s)),1)]),_:1},8,["id","variant","live"])):P("",!0)],2))}}),[["__scopeId","data-v-6eea4e2a"]]),K6={storageKey:"nubisco.theme",defaultTheme:"system",darkClass:"dark"},W4="(prefers-color-scheme: dark)",li=Bc("theme",()=>({options:{...K6},initialized:!1,detachMedia:null,stopPersisting:null,theme:X(K6.defaultTheme),resolved:X("light")})),{theme:qr,resolved:Ju}=li;function CE(e){return e==="light"||e==="dark"||e==="system"}function kE(){try{if(typeof localStorage>"u")return null;let e=localStorage.getItem(li.options.storageKey);return CE(e)?e:null}catch{return null}}function AE(e){try{if(typeof localStorage>"u")return;localStorage.setItem(li.options.storageKey,e)}catch{}}function $E(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(W4).matches}function eh(){let e=qr.value==="dark"||qr.value==="system"&&$E();Ju.value=e?"dark":"light",!(typeof document>"u")&&(document.documentElement.classList.toggle(li.options.darkClass,e),document.documentElement.style.colorScheme=Ju.value)}function ME(){var i;if((i=li.detachMedia)==null||i.call(li),li.detachMedia=null,typeof window>"u"||typeof window.matchMedia!="function")return;let e=window.matchMedia(W4),t=()=>eh();typeof e.addEventListener=="function"?(e.addEventListener("change",t),li.detachMedia=()=>e.removeEventListener("change",t)):typeof e.addListener=="function"&&(e.addListener(t),li.detachMedia=()=>e.removeListener(t))}function j4(){var e;qr.value=kE()??li.options.defaultTheme,eh(),ME(),(e=li.stopPersisting)==null||e.call(li),li.stopPersisting=Pe(qr,t=>{AE(t),eh()}),li.initialized=!0}function LE(e={}){li.options={...li.options,...e},j4()}function jc(){return li.initialized||j4(),{theme:ia(qr),resolved:ia(Ju),followsSystem:H(()=>qr.value==="system"),setTheme:e=>{qr.value=e},toggle:()=>{qr.value=Ju.value==="dark"?"light":"dark"}}}function EE(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}var q6=typeof window<"u",Wa=(e,t=!1)=>t?Symbol.for(e):Symbol(e),xE=(e,t,i)=>TE({l:e,k:t,s:i}),TE=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),_i=e=>typeof e=="number"&&isFinite(e),K4=e=>u2(e)==="[object Date]",Qu=e=>u2(e)==="[object RegExp]",Kc=e=>Lt(e)&&Object.keys(e).length===0,Fi=Object.assign,HE=Object.create,Xt=(e=null)=>HE(e),NE,Oa=()=>NE||(NE=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Xt());function G6(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function Y6(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function PE(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(t,i,n)=>`${i}="${Y6(n)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(t,i,n)=>`${i}='${Y6(n)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(t=>{e=e.replace(t,"$1javascript:")}),e}var OE=Object.prototype.hasOwnProperty;function mn(e,t){return OE.call(e,t)}var oi=Array.isArray,Ut=e=>typeof e=="function",je=e=>typeof e=="string",Yt=e=>typeof e=="boolean",xt=e=>typeof e=="object"&&!!e,IE=e=>xt(e)&&Ut(e.then)&&Ut(e.catch),q4=Object.prototype.toString,u2=e=>q4.call(e),Lt=e=>u2(e)==="[object Object]",RE=e=>e==null?"":oi(e)||Lt(e)&&e.toString===q4?JSON.stringify(e,null,2):String(e);function c2(e,t=""){return e.reduce((i,n,r)=>r===0?i+n:i+t+n,"")}var G0=e=>!xt(e)||oi(e);function bu(e,t){if(G0(e)||G0(t))throw Error("Invalid value");let i=[{src:e,des:t}];for(;i.length;){let{src:n,des:r}=i.pop();Object.keys(n).forEach(a=>{a!=="__proto__"&&(xt(n[a])&&!xt(r[a])&&(r[a]=Array.isArray(n[a])?[]:Xt()),G0(r[a])||G0(n[a])?r[a]=n[a]:i.push({src:n[a],des:r[a]}))})}}function DE(e,t,i){return{line:e,column:t,offset:i}}function th(e,t,i){return{start:e,end:t}}var bt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14};function qc(e,t,i={}){let{domain:n,messages:r,args:a}=i,s=e,l=SyntaxError(String(s));return l.code=e,t&&(l.location=t),l.domain=n,l}function VE(e){throw e}var Nn=" ",BE="\r",Ri=`
|
|
42
|
+
`,ZE="\u2028",FE="\u2029";function zE(e){let t=e,i=0,n=1,r=1,a=0,s=k=>t[k]===BE&&t[k+1]===Ri,l=k=>t[k]===Ri,o=k=>t[k]===FE,u=k=>t[k]===ZE,c=k=>s(k)||l(k)||o(k)||u(k),d=()=>i,h=()=>n,f=()=>r,_=()=>a,m=k=>s(k)||o(k)||u(k)?Ri:t[k],g=()=>m(i),v=()=>m(i+a);function w(){return a=0,c(i)&&(n++,r=0),s(i)&&i++,i++,r++,t[i]}function S(){return s(i+a)&&a++,a++,t[i+a]}function y(){i=0,n=1,r=1,a=0}function A(k=0){a=k}function L(){let k=i+a;for(;k!==i;)w();a=0}return{index:d,line:h,column:f,peekOffset:_,charAt:m,currentChar:g,currentPeek:v,next:w,peek:S,reset:y,resetPeek:A,skipToPeek:L}}var ur=void 0,X6="'",UE="tokenizer";function WE(e,t={}){let i=t.location!==!1,n=zE(e),r=()=>n.index(),a=()=>DE(n.line(),n.column(),n.index()),s=a(),l=r(),o={currentType:13,offset:l,startLoc:s,endLoc:s,lastType:13,lastOffset:l,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},u=()=>o,{onError:c}=t;function d(b,C,B,...de){let z=u();C.column+=B,C.offset+=B,c&&c(qc(b,i?th(z.startLoc,C):null,{domain:UE,args:de}))}function h(b,C,B){b.endLoc=a(),b.currentType=C;let de={type:C};return i&&(de.loc=th(b.startLoc,b.endLoc)),B!=null&&(de.value=B),de}let f=b=>h(b,13);function _(b,C){return b.currentChar()===C?(b.next(),C):(d(bt.EXPECTED_TOKEN,a(),0,C),"")}function m(b){let C="";for(;b.currentPeek()===Nn||b.currentPeek()===Ri;)C+=b.currentPeek(),b.peek();return C}function g(b){let C=m(b);return b.skipToPeek(),C}function v(b){if(b===ur)return!1;let C=b.charCodeAt(0);return C>=97&&C<=122||C>=65&&C<=90||C===95}function w(b){if(b===ur)return!1;let C=b.charCodeAt(0);return C>=48&&C<=57}function S(b,C){let{currentType:B}=C;if(B!==2)return!1;m(b);let de=v(b.currentPeek());return b.resetPeek(),de}function y(b,C){let{currentType:B}=C;if(B!==2)return!1;m(b);let de=w(b.currentPeek()==="-"?b.peek():b.currentPeek());return b.resetPeek(),de}function A(b,C){let{currentType:B}=C;if(B!==2)return!1;m(b);let de=b.currentPeek()===X6;return b.resetPeek(),de}function L(b,C){let{currentType:B}=C;if(B!==7)return!1;m(b);let de=b.currentPeek()===".";return b.resetPeek(),de}function k(b,C){let{currentType:B}=C;if(B!==8)return!1;m(b);let de=v(b.currentPeek());return b.resetPeek(),de}function V(b,C){let{currentType:B}=C;if(!(B===7||B===11))return!1;m(b);let de=b.currentPeek()===":";return b.resetPeek(),de}function T(b,C){let{currentType:B}=C;if(B!==9)return!1;let de=()=>{let Q=b.currentPeek();return Q==="{"?v(b.peek()):Q==="@"||Q==="|"||Q===":"||Q==="."||Q===Nn||!Q?!1:Q===Ri?(b.peek(),de()):x(b,!1)},z=de();return b.resetPeek(),z}function J(b){m(b);let C=b.currentPeek()==="|";return b.resetPeek(),C}function x(b,C=!0){let B=(z=!1,Q="")=>{let D=b.currentPeek();return D==="{"||D==="@"||!D?z:D==="|"?!(Q===Nn||Q===Ri):D===Nn?(b.peek(),B(!0,Nn)):D===Ri?(b.peek(),B(!0,Ri)):!0},de=B();return C&&b.resetPeek(),de}function N(b,C){let B=b.currentChar();return B===ur?ur:C(B)?(b.next(),B):null}function O(b){let C=b.charCodeAt(0);return C>=97&&C<=122||C>=65&&C<=90||C>=48&&C<=57||C===95||C===36}function R(b){return N(b,O)}function j(b){let C=b.charCodeAt(0);return C>=97&&C<=122||C>=65&&C<=90||C>=48&&C<=57||C===95||C===36||C===45}function G(b){return N(b,j)}function ae(b){let C=b.charCodeAt(0);return C>=48&&C<=57}function q(b){return N(b,ae)}function se(b){let C=b.charCodeAt(0);return C>=48&&C<=57||C>=65&&C<=70||C>=97&&C<=102}function me(b){return N(b,se)}function U(b){let C="",B="";for(;C=q(b);)B+=C;return B}function ve(b){let C="";for(;;){let B=b.currentChar();if(B==="\\"){let de=b.peek();de==="{"||de==="}"||de==="@"||de==="|"||de==="\\"?(C+=B+de,b.next(),b.next()):(b.resetPeek(),C+=B,b.next())}else{if(B==="{"||B==="}"||B==="@"||B==="|"||!B)break;if(B===Nn||B===Ri)if(x(b))C+=B,b.next();else{if(J(b))break;C+=B,b.next()}else C+=B,b.next()}}return C}function ce(b){g(b);let C="",B="";for(;C=G(b);)B+=C;let de=b.currentChar();if(de&&de!=="}"&&de!==ur&&de!==Nn&&de!==Ri&&de!==" "){let z=be(b);return d(bt.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,B+z),B+z}return b.currentChar()===ur&&d(bt.UNTERMINATED_CLOSING_BRACE,a(),0),B}function ge(b){g(b);let C="";return b.currentChar()==="-"?(b.next(),C+=`-${U(b)}`):C+=U(b),b.currentChar()===ur&&d(bt.UNTERMINATED_CLOSING_BRACE,a(),0),C}function ue(b){return b!==X6&&b!==Ri}function pe(b){g(b),_(b,"'");let C="",B="";for(;C=N(b,ue);)C==="\\"?B+=W(b):B+=C;let de=b.currentChar();return de===Ri||de===ur?(d(bt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),de===Ri&&(b.next(),_(b,"'")),B):(_(b,"'"),B)}function W(b){let C=b.currentChar();switch(C){case"\\":case"'":return b.next(),`\\${C}`;case"u":return he(b,C,4);case"U":return he(b,C,6);default:return d(bt.UNKNOWN_ESCAPE_SEQUENCE,a(),0,C),""}}function he(b,C,B){_(b,C);let de="";for(let z=0;z<B;z++){let Q=me(b);if(!Q){d(bt.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${C}${de}${b.currentChar()}`);break}de+=Q}return`\\${C}${de}`}function te(b){return b!=="{"&&b!=="}"&&b!==Nn&&b!==Ri}function be(b){g(b);let C="",B="";for(;C=N(b,te);)B+=C;return B}function E(b){let C="",B="";for(;C=R(b);)B+=C;return B}function F(b){let C=B=>{let de=b.currentChar();return de==="{"||de==="@"||de==="|"||de==="("||de===")"||!de||de===Nn?B:(B+=de,b.next(),C(B))};return C("")}function ie(b){g(b);let C=_(b,"|");return g(b),C}function fe(b,C){let B=null;switch(b.currentChar()){case"{":return C.braceNest>=1&&d(bt.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),b.next(),B=h(C,2,"{"),g(b),C.braceNest++,B;case"}":return C.braceNest>0&&C.currentType===2&&d(bt.EMPTY_PLACEHOLDER,a(),0),b.next(),B=h(C,3,"}"),C.braceNest--,C.braceNest>0&&g(b),C.inLinked&&C.braceNest===0&&(C.inLinked=!1),B;case"@":return C.braceNest>0&&d(bt.UNTERMINATED_CLOSING_BRACE,a(),0),B=ne(b,C)||f(C),C.braceNest=0,B;default:{let de=!0,z=!0,Q=!0;if(J(b))return C.braceNest>0&&d(bt.UNTERMINATED_CLOSING_BRACE,a(),0),B=h(C,1,ie(b)),C.braceNest=0,C.inLinked=!1,B;if(C.braceNest>0&&(C.currentType===4||C.currentType===5||C.currentType===6))return d(bt.UNTERMINATED_CLOSING_BRACE,a(),0),C.braceNest=0,Z(b,C);if(de=S(b,C))return B=h(C,4,ce(b)),g(b),B;if(z=y(b,C))return B=h(C,5,ge(b)),g(b),B;if(Q=A(b,C))return B=h(C,6,pe(b)),g(b),B;if(!de&&!z&&!Q)return B=h(C,12,be(b)),d(bt.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,B.value),g(b),B;break}}return B}function ne(b,C){let{currentType:B}=C,de=null,z=b.currentChar();switch((B===7||B===8||B===11||B===9)&&(z===Ri||z===Nn)&&d(bt.INVALID_LINKED_FORMAT,a(),0),z){case"@":return b.next(),de=h(C,7,"@"),C.inLinked=!0,de;case".":return g(b),b.next(),h(C,8,".");case":":return g(b),b.next(),h(C,9,":");default:return J(b)?(de=h(C,1,ie(b)),C.braceNest=0,C.inLinked=!1,de):L(b,C)||V(b,C)?(g(b),ne(b,C)):k(b,C)?(g(b),h(C,11,E(b))):T(b,C)?(g(b),z==="{"?fe(b,C)||de:h(C,10,F(b))):(B===7&&d(bt.INVALID_LINKED_FORMAT,a(),0),C.braceNest=0,C.inLinked=!1,Z(b,C))}}function Z(b,C){let B={type:13};if(C.braceNest>0)return fe(b,C)||f(C);if(C.inLinked)return ne(b,C)||f(C);switch(b.currentChar()){case"{":return fe(b,C)||f(C);case"}":return d(bt.UNBALANCED_CLOSING_BRACE,a(),0),b.next(),h(C,3,"}");case"@":return ne(b,C)||f(C);default:if(J(b))return B=h(C,1,ie(b)),C.braceNest=0,C.inLinked=!1,B;if(x(b))return h(C,0,ve(b));break}return B}function re(){let{currentType:b,offset:C,startLoc:B,endLoc:de}=o;return o.lastType=b,o.lastOffset=C,o.lastStartLoc=B,o.lastEndLoc=de,o.offset=r(),o.startLoc=a(),n.currentChar()===ur?h(o,13):Z(n,o)}return{nextToken:re,currentOffset:r,currentPosition:a,context:u}}var jE="parser",KE=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,qE=/\\([\\@{}|])/g;function GE(e,t){return t}function YE(e,t,i){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{let n=parseInt(t||i,16);return n<=55295||n>=57344?String.fromCodePoint(n):"�"}}}function XE(e={}){let t=e.location!==!1,{onError:i}=e;function n(v,w,S,y,...A){let L=v.currentPosition();L.offset+=y,L.column+=y,i&&i(qc(w,t?th(S,L):null,{domain:jE,args:A}))}function r(v,w,S){let y={type:v};return t&&(y.start=w,y.end=w,y.loc={start:S,end:S}),y}function a(v,w,S,y){t&&(v.end=w,v.loc&&(v.loc.end=S))}function s(v,w){let S=v.context(),y=r(3,S.offset,S.startLoc);return y.value=w.replace(qE,GE),a(y,v.currentOffset(),v.currentPosition()),y}function l(v,w){let{lastOffset:S,lastStartLoc:y}=v.context(),A=r(5,S,y);return A.index=parseInt(w,10),v.nextToken(),a(A,v.currentOffset(),v.currentPosition()),A}function o(v,w){let{lastOffset:S,lastStartLoc:y}=v.context(),A=r(4,S,y);return A.key=w,v.nextToken(),a(A,v.currentOffset(),v.currentPosition()),A}function u(v,w){let{lastOffset:S,lastStartLoc:y}=v.context(),A=r(9,S,y);return A.value=w.replace(KE,YE),v.nextToken(),a(A,v.currentOffset(),v.currentPosition()),A}function c(v){let w=v.nextToken(),S=v.context(),{lastOffset:y,lastStartLoc:A}=S,L=r(8,y,A);return w.type===11?(w.value??n(v,bt.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,Pn(w)),L.value=w.value||"",a(L,v.currentOffset(),v.currentPosition()),{node:L}):(n(v,bt.UNEXPECTED_EMPTY_LINKED_MODIFIER,S.lastStartLoc,0),L.value="",a(L,y,A),{nextConsumeToken:w,node:L})}function d(v,w){let S=v.context(),y=r(7,S.offset,S.startLoc);return y.value=w,a(y,v.currentOffset(),v.currentPosition()),y}function h(v){let w=v.context(),S=r(6,w.offset,w.startLoc),y=v.nextToken();if(y.type===8){let A=c(v);S.modifier=A.node,y=A.nextConsumeToken||v.nextToken()}switch(y.type!==9&&n(v,bt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Pn(y)),y=v.nextToken(),y.type===2&&(y=v.nextToken()),y.type){case 10:y.value??n(v,bt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Pn(y)),S.key=d(v,y.value||"");break;case 4:y.value??n(v,bt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Pn(y)),S.key=o(v,y.value||"");break;case 5:y.value??n(v,bt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Pn(y)),S.key=l(v,y.value||"");break;case 6:y.value??n(v,bt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Pn(y)),S.key=u(v,y.value||"");break;default:{n(v,bt.UNEXPECTED_EMPTY_LINKED_KEY,w.lastStartLoc,0);let A=v.context(),L=r(7,A.offset,A.startLoc);return L.value="",a(L,A.offset,A.startLoc),S.key=L,a(S,A.offset,A.startLoc),{nextConsumeToken:y,node:S}}}return a(S,v.currentOffset(),v.currentPosition()),{node:S}}function f(v){let w=v.context(),S=r(2,w.currentType===1?v.currentOffset():w.offset,w.currentType===1?w.endLoc:w.startLoc);S.items=[];let y=null;do{let A=y||v.nextToken();switch(y=null,A.type){case 0:A.value??n(v,bt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Pn(A)),S.items.push(s(v,A.value||""));break;case 5:A.value??n(v,bt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Pn(A)),S.items.push(l(v,A.value||""));break;case 4:A.value??n(v,bt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Pn(A)),S.items.push(o(v,A.value||""));break;case 6:A.value??n(v,bt.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Pn(A)),S.items.push(u(v,A.value||""));break;case 7:{let L=h(v);S.items.push(L.node),y=L.nextConsumeToken||null;break}}}while(w.currentType!==13&&w.currentType!==1);return a(S,w.currentType===1?w.lastOffset:v.currentOffset(),w.currentType===1?w.lastEndLoc:v.currentPosition()),S}function _(v,w,S,y){let A=v.context(),L=y.items.length===0,k=r(1,w,S);k.cases=[],k.cases.push(y);do{let V=f(v);L||(L=V.items.length===0),k.cases.push(V)}while(A.currentType!==13);return L&&n(v,bt.MUST_HAVE_MESSAGES_IN_PLURAL,S,0),a(k,v.currentOffset(),v.currentPosition()),k}function m(v){let w=v.context(),{offset:S,startLoc:y}=w,A=f(v);return w.currentType===13?A:_(v,S,y,A)}function g(v){let w=WE(v,Fi({},e)),S=w.context(),y=r(0,S.offset,S.startLoc);return t&&y.loc&&(y.loc.source=v),y.body=m(w),e.onCacheKey&&(y.cacheKey=e.onCacheKey(v)),S.currentType!==13&&n(w,bt.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,v[S.offset]||""),a(y,w.currentOffset(),w.currentPosition()),y}return{parse:g}}function Pn(e){if(e.type===13)return"EOF";let t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function JE(e,t={}){let i={ast:e,helpers:new Set};return{context:()=>i,helper:n=>(i.helpers.add(n),n)}}function J6(e,t){for(let i=0;i<e.length;i++)d2(e[i],t)}function d2(e,t){switch(e.type){case 1:J6(e.cases,t),t.helper("plural");break;case 2:J6(e.items,t);break;case 6:d2(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function QE(e,t={}){let i=JE(e);i.helper("normalize"),e.body&&d2(e.body,i);let n=i.context();e.helpers=Array.from(n.helpers)}function ex(e){let t=e.body;return t.type===2?Q6(t):t.cases.forEach(i=>Q6(i)),e}function Q6(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let i=0;i<e.items.length;i++){let n=e.items[i];if(!(n.type===3||n.type===9)||n.value==null)break;t.push(n.value)}if(t.length===e.items.length){e.static=c2(t);for(let i=0;i<e.items.length;i++){let n=e.items[i];(n.type===3||n.type===9)&&delete n.value}}}}function ns(e){switch(e.t=e.type,e.type){case 0:{let t=e;ns(t.body),t.b=t.body,delete t.body;break}case 1:{let t=e,i=t.cases;for(let n=0;n<i.length;n++)ns(i[n]);t.c=i,delete t.cases;break}case 2:{let t=e,i=t.items;for(let n=0;n<i.length;n++)ns(i[n]);t.i=i,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{let t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{let t=e;ns(t.key),t.k=t.key,delete t.key,t.modifier&&(ns(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{let t=e;t.i=t.index,delete t.index;break}case 4:{let t=e;t.k=t.key,delete t.key;break}}delete e.type}function tx(e,t){let{filename:i,breakLineCode:n,needIndent:r}=t,a=t.location!==!1,s={filename:i,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:n,needIndent:r,indentLevel:0};a&&e.loc&&(s.source=e.loc.source);let l=()=>s;function o(f,_){s.code+=f}function u(f,_=!0){let m=_?n:"";o(r?m+" ".repeat(f):m)}function c(f=!0){let _=++s.indentLevel;f&&u(_)}function d(f=!0){let _=--s.indentLevel;f&&u(_)}function h(){u(s.indentLevel)}return{context:l,push:o,indent:c,deindent:d,newline:h,helper:f=>`_${f}`,needIndent:()=>s.needIndent}}function ix(e,t){let{helper:i}=e;e.push(`${i("linked")}(`),gs(e,t.key),t.modifier?(e.push(", "),gs(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function nx(e,t){let{helper:i,needIndent:n}=e;e.push(`${i("normalize")}([`),e.indent(n());let r=t.items.length;for(let a=0;a<r&&(gs(e,t.items[a]),a!==r-1);a++)e.push(", ");e.deindent(n()),e.push("])")}function rx(e,t){let{helper:i,needIndent:n}=e;if(t.cases.length>1){e.push(`${i("plural")}([`),e.indent(n());let r=t.cases.length;for(let a=0;a<r&&(gs(e,t.cases[a]),a!==r-1);a++)e.push(", ");e.deindent(n()),e.push("])")}}function ax(e,t){t.body?gs(e,t.body):e.push("null")}function gs(e,t){let{helper:i}=e;switch(t.type){case 0:ax(e,t);break;case 1:rx(e,t);break;case 2:nx(e,t);break;case 6:ix(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${i("interpolate")}(${i("list")}(${t.index}))`,t);break;case 4:e.push(`${i("interpolate")}(${i("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}var sx=(e,t={})=>{let i=je(t.mode)?t.mode:"normal",n=je(t.filename)?t.filename:"message.intl";t.sourceMap;let r=t.breakLineCode==null?i==="arrow"?";":`
|
|
43
|
+
`:t.breakLineCode,a=t.needIndent?t.needIndent:i!=="arrow",s=e.helpers||[],l=tx(e,{filename:n,breakLineCode:r,needIndent:a});l.push(i==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(a),s.length>0&&(l.push(`const { ${c2(s.map(c=>`${c}: _${c}`),", ")} } = ctx`),l.newline()),l.push("return "),gs(l,e),l.deindent(a),l.push("}"),delete e.helpers;let{code:o,map:u}=l.context();return{ast:e,code:o,map:u?u.toJSON():void 0}};function lx(e,t={}){let i=Fi({},t),n=!!i.jit,r=!!i.minify,a=i.optimize==null?!0:i.optimize,s=XE(i).parse(e);return n?(a&&ex(s),r&&ns(s),{ast:s,code:""}):(QE(s,i),sx(s,i))}function ox(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Oa().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Oa().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Yn(e){return xt(e)&&h2(e)===0&&(mn(e,"b")||mn(e,"body"))}var G4=["b","body"];function ux(e){return _a(e,G4)}var Y4=["c","cases"];function cx(e){return _a(e,Y4,[])}var X4=["s","static"];function dx(e){return _a(e,X4)}var J4=["i","items"];function hx(e){return _a(e,J4,[])}var Q4=["t","type"];function h2(e){return _a(e,Q4)}var eb=["v","value"];function Y0(e,t){let i=_a(e,eb);if(i!=null)return i;throw d0(t)}var tb=["m","modifier"];function fx(e){return _a(e,tb)}var ib=["k","key"];function px(e){let t=_a(e,ib);if(t)return t;throw d0(6)}function _a(e,t,i){for(let n=0;n<t.length;n++){let r=t[n];if(mn(e,r)&&e[r]!=null)return e[r]}return i}var nb=[...G4,...Y4,...X4,...J4,...ib,...tb,...eb,...Q4];function d0(e){return Error(`unhandled node type: ${e}`)}function N1(e){return t=>_x(t,e)}function _x(e,t){let i=ux(t);if(i==null)throw d0(0);if(h2(i)===1){let n=cx(i);return e.plural(n.reduce((r,a)=>[...r,e8(e,a)],[]))}else return e8(e,i)}function e8(e,t){let i=dx(t);if(i!=null)return e.type==="text"?i:e.normalize([i]);{let n=hx(t).reduce((r,a)=>[...r,ih(e,a)],[]);return e.normalize(n)}}function ih(e,t){let i=h2(t);switch(i){case 3:return Y0(t,i);case 9:return Y0(t,i);case 4:{let n=t;if(mn(n,"k")&&n.k)return e.interpolate(e.named(n.k));if(mn(n,"key")&&n.key)return e.interpolate(e.named(n.key));throw d0(i)}case 5:{let n=t;if(mn(n,"i")&&_i(n.i))return e.interpolate(e.list(n.i));if(mn(n,"index")&&_i(n.index))return e.interpolate(e.list(n.index));throw d0(i)}case 6:{let n=t,r=fx(n),a=px(n);return e.linked(ih(e,a),r?ih(e,r):void 0,e.type)}case 7:return Y0(t,i);case 8:return Y0(t,i);default:throw Error(`unhandled node on format message part: ${i}`)}}var mx=e=>e,X0=Xt();function vx(e,t={}){let i=!1,n=t.onError||VE;return t.onError=r=>{i=!0,n(r)},{...lx(e,t),detectError:i}}function gx(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&je(e)){Yt(t.warnHtmlMessage)&&t.warnHtmlMessage;let i=(t.onCacheKey||mx)(e),n=X0[i];if(n)return n;let{ast:r,detectError:a}=vx(e,{...t,location:!1,jit:!0}),s=N1(r);return a?s:X0[i]=s}else{let i=e.cacheKey;return i?X0[i]||(X0[i]=N1(e)):N1(e)}}var h0=null;function bx(e){h0=e}function yx(e,t,i){h0&&h0.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:i})}var wx=Sx("function:translate");function Sx(e){return t=>h0&&h0.emit(e,t)}var br={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23};function yr(e){return qc(e,null,void 0)}function f2(e,t){return t.locale==null?t8(e.locale):t8(t.locale)}var P1;function t8(e){if(je(e))return e;if(Ut(e)){if(e.resolvedOnce&&P1!=null)return P1;if(e.constructor.name==="Function"){let t=e();if(IE(t))throw yr(br.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return P1=t}else throw yr(br.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw yr(br.NOT_SUPPORT_LOCALE_TYPE)}function Cx(e,t,i){return[...new Set([i,...oi(t)?t:xt(t)?Object.keys(t):je(t)?[t]:[i]])]}function nh(e,t,i){let n=je(i)?i:ec,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let a=r.__localeChainCache.get(n);if(!a){a=[];let s=[i];for(;oi(s);)s=i8(a,s,t);let l=oi(t)||!Lt(t)?t:t.default?t.default:null;s=je(l)?[l]:l,oi(s)&&i8(a,s,!1),r.__localeChainCache.set(n,a)}return a}function i8(e,t,i){let n=!0;for(let r=0;r<t.length&&Yt(n);r++){let a=t[r];je(a)&&(n=kx(e,t[r],i))}return n}function kx(e,t,i){let n,r=t.split("-");do n=Ax(e,r.join("-"),i),r.splice(-1,1);while(r.length&&n===!0);return n}function Ax(e,t,i){let n=!1;if(!e.includes(t)&&(n=!0,t)){n=t[t.length-1]!=="!";let r=t.replace(/!/g,"");e.push(r),(oi(i)||Lt(i))&&i[r]&&(n=i[r])}return n}var zr=[];zr[0]={w:[0],i:[3,0],"[":[4],o:[7]},zr[1]={w:[1],".":[2],"[":[4],o:[7]},zr[2]={w:[2],i:[3,0],0:[3,0]},zr[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},zr[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},zr[5]={"'":[4,0],o:8,l:[5,0]},zr[6]={'"':[4,0],o:8,l:[6,0]};var $x=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Mx(e){return $x.test(e)}function Lx(e){let t=e.charCodeAt(0);return t===e.charCodeAt(e.length-1)&&(t===34||t===39)?e.slice(1,-1):e}function Ex(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function xx(e){let t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:Mx(t)?Lx(t):"*"+t}function Tx(e){let t=[],i=-1,n=0,r=0,a,s,l,o,u,c,d,h=[];h[0]=()=>{s===void 0?s=l:s+=l},h[1]=()=>{s!==void 0&&(t.push(s),s=void 0)},h[2]=()=>{h[0](),r++},h[3]=()=>{if(r>0)r--,n=4,h[0]();else{if(r=0,s===void 0||(s=xx(s),s===!1))return!1;h[1]()}};function f(){let _=e[i+1];if(n===5&&_==="'"||n===6&&_==='"')return i++,l="\\"+_,h[0](),!0}for(;n!==null;)if(i++,a=e[i],!(a==="\\"&&f())){if(o=Ex(a),d=zr[n],u=d[o]||d.l||8,u===8||(n=u[0],u[1]!==void 0&&(c=h[u[1]],c&&(l=a,c()===!1))))return;if(n===7)return t}}var n8=new Map;function Hx(e,t){return xt(e)?e[t]:null}function Nx(e,t){if(!xt(e))return null;let i=n8.get(t);if(i||(i=Tx(t),i&&n8.set(t,i)),!i)return null;let n=i.length,r=e,a=0;for(;a<n;){let s=i[a];if(nb.includes(s)&&Yn(r)||!xt(r)||!mn(r,s))return null;let l=r[s];if(l===void 0||Ut(r))return null;r=l,a++}return r}var Px="11.3.0",ec="en-US",r8=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Ox(){return{upper:(e,t)=>t==="text"&&je(e)?e.toUpperCase():t==="vnode"&&xt(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&je(e)?e.toLowerCase():t==="vnode"&&xt(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&je(e)?r8(e):t==="vnode"&&xt(e)&&"__v_isVNode"in e?r8(e.children):e}}var rb;function Ix(e){rb=e}var ab;function Rx(e){ab=e}var sb;function Dx(e){sb=e}var lb=null,a8=e=>{lb=e},Vx=()=>lb,s8=0;function Bx(e={}){let t=Ut(e.onWarn)?e.onWarn:EE,i=je(e.version)?e.version:Px,n=je(e.locale)||Ut(e.locale)?e.locale:ec,r=Ut(n)?ec:n,a=oi(e.fallbackLocale)||Lt(e.fallbackLocale)||je(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r,s=Lt(e.messages)?e.messages:O1(r),l=Lt(e.datetimeFormats)?e.datetimeFormats:O1(r),o=Lt(e.numberFormats)?e.numberFormats:O1(r),u=Fi(Xt(),e.modifiers,Ox()),c=e.pluralRules||Xt(),d=Ut(e.missing)?e.missing:null,h=Yt(e.missingWarn)||Qu(e.missingWarn)?e.missingWarn:!0,f=Yt(e.fallbackWarn)||Qu(e.fallbackWarn)?e.fallbackWarn:!0,_=!!e.fallbackFormat,m=!!e.unresolving,g=Ut(e.postTranslation)?e.postTranslation:null,v=Lt(e.processor)?e.processor:null,w=Yt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,S=!!e.escapeParameter,y=Ut(e.messageCompiler)?e.messageCompiler:rb,A=Ut(e.messageResolver)?e.messageResolver:ab||Hx,L=Ut(e.localeFallbacker)?e.localeFallbacker:sb||Cx,k=xt(e.fallbackContext)?e.fallbackContext:void 0,V=e,T=xt(V.__datetimeFormatters)?V.__datetimeFormatters:new Map,J=xt(V.__numberFormatters)?V.__numberFormatters:new Map,x=xt(V.__meta)?V.__meta:{};s8++;let N={version:i,cid:s8,locale:n,fallbackLocale:a,messages:s,modifiers:u,pluralRules:c,missing:d,missingWarn:h,fallbackWarn:f,fallbackFormat:_,unresolving:m,postTranslation:g,processor:v,warnHtmlMessage:w,escapeParameter:S,messageCompiler:y,messageResolver:A,localeFallbacker:L,fallbackContext:k,onWarn:t,__meta:x};return N.datetimeFormats=l,N.numberFormats=o,N.__datetimeFormatters=T,N.__numberFormatters=J,__INTLIFY_PROD_DEVTOOLS__&&yx(N,i,x),N}var O1=e=>({[e]:Xt()});function p2(e,t,i,n,r){let{missing:a,onWarn:s}=e;if(a!==null){let l=a(e,i,t,r);return je(l)?l:t}else return t}function po(e,t,i){let n=e;n.__localeChainCache=new Map,e.localeFallbacker(e,i,t)}function Zx(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function Fx(e,t){let i=t.indexOf(e);if(i===-1)return!1;for(let n=i+1;n<t.length;n++)if(Zx(e,t[n]))return!0;return!1}function l8(e,...t){let{datetimeFormats:i,unresolving:n,fallbackLocale:r,onWarn:a,localeFallbacker:s}=e,{__datetimeFormatters:l}=e;if(!je(t[0])&&!K4(t[0])&&!_i(t[0]))return"";let[o,u,c,d]=rh(...t),h=Yt(c.missingWarn)?c.missingWarn:e.missingWarn;Yt(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;let f=!!c.part,_=f2(e,c),m=s(e,r,_);if(!je(o)||o==="")return new Intl.DateTimeFormat(_.replace(/!/g,""),d).format(u);let g={},v,w=null,S="datetime format";for(let L=0;L<m.length&&(v=m[L],g=i[v]||{},w=g[o],!Lt(w));L++)p2(e,o,v,h,S);if(!Lt(w)||!je(v))return n?-1:o;let y=`${v}__${o}`;Kc(d)||(y=`${y}__${JSON.stringify(d)}`);let A=l.get(y);return A||(A=new Intl.DateTimeFormat(v,Fi({},w,d)),l.set(y,A)),f?A.formatToParts(u):A.format(u)}var zx=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function rh(...e){let[t,i,n,r]=e,a=Xt(),s=Xt(),l;if(je(t)){let o=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!o)throw yr(br.INVALID_ISO_DATE_ARGUMENT);let u=o[3]?o[3].trim().startsWith("T")?`${o[1].trim()}${o[3].trim()}`:`${o[1].trim()}T${o[3].trim()}`:o[1].trim();l=new Date(u);try{l.toISOString()}catch{throw yr(br.INVALID_ISO_DATE_ARGUMENT)}}else if(K4(t)){if(isNaN(t.getTime()))throw yr(br.INVALID_DATE_ARGUMENT);l=t}else if(_i(t))l=t;else throw yr(br.INVALID_ARGUMENT);return je(i)?a.key=i:Lt(i)&&Object.keys(i).forEach(o=>{zx.includes(o)?s[o]=i[o]:a[o]=i[o]}),je(n)?a.locale=n:Lt(n)&&(s=n),Lt(r)&&(s=r),[a.key||"",l,a,s]}function o8(e,t,i){let n=e;for(let r in i){let a=`${t}__${r}`;n.__datetimeFormatters.has(a)&&n.__datetimeFormatters.delete(a)}}function u8(e,...t){let{numberFormats:i,unresolving:n,fallbackLocale:r,onWarn:a,localeFallbacker:s}=e,{__numberFormatters:l}=e;if(!_i(t[0]))return"";let[o,u,c,d]=ah(...t),h=Yt(c.missingWarn)?c.missingWarn:e.missingWarn;Yt(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;let f=!!c.part,_=f2(e,c),m=s(e,r,_);if(!je(o)||o==="")return new Intl.NumberFormat(_.replace(/!/g,""),d).format(u);let g={},v,w=null,S="number format";for(let L=0;L<m.length&&(v=m[L],g=i[v]||{},w=g[o],!Lt(w));L++)p2(e,o,v,h,S);if(!Lt(w)||!je(v))return n?-1:o;let y=`${v}__${o}`;Kc(d)||(y=`${y}__${JSON.stringify(d)}`);let A=l.get(y);return A||(A=new Intl.NumberFormat(v,Fi({},w,d)),l.set(y,A)),f?A.formatToParts(u):A.format(u)}var Ux=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function ah(...e){let[t,i,n,r]=e,a=Xt(),s=Xt();if(!_i(t))throw yr(br.INVALID_ARGUMENT);let l=t;return je(i)?a.key=i:Lt(i)&&Object.keys(i).forEach(o=>{Ux.includes(o)?s[o]=i[o]:a[o]=i[o]}),je(n)?a.locale=n:Lt(n)&&(s=n),Lt(r)&&(s=r),[a.key||"",l,a,s]}function c8(e,t,i){let n=e;for(let r in i){let a=`${t}__${r}`;n.__numberFormatters.has(a)&&n.__numberFormatters.delete(a)}}var Wx=e=>e,jx=e=>"",Kx="text",qx=e=>e.length===0?"":c2(e),Gx=RE;function I1(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function Yx(e){var i,n;let t=_i(e.pluralIndex)?e.pluralIndex:-1;return _i((i=e.named)==null?void 0:i.count)?e.named.count:_i((n=e.named)==null?void 0:n.n)?e.named.n:t}function Xx(e={}){var m,g,v,w;let t=e.locale,i=Yx(e),n=je(t)&&Ut((m=e.pluralRules)==null?void 0:m[t])?e.pluralRules[t]:I1,r=n===I1?void 0:I1,a=S=>S[n(i,S.length,r)],s=e.list||[],l=S=>s[S],o=e.named||Xt();_i(e.pluralIndex)&&(o.count||(o.count=e.pluralIndex),o.n||(o.n=e.pluralIndex));let u=S=>o[S];function c(S,y){return(Ut(e.messages)?e.messages(S,!!y):xt(e.messages)?e.messages[S]:!1)||(e.parent?e.parent.message(S):jx)}let d=S=>e.modifiers?e.modifiers[S]:Wx,h=Ut((g=e.processor)==null?void 0:g.normalize)?e.processor.normalize:qx,f=Ut((v=e.processor)==null?void 0:v.interpolate)?e.processor.interpolate:Gx,_={list:l,named:u,plural:a,linked:(S,...y)=>{let[A,L]=y,k="text",V="";y.length===1?xt(A)?(V=A.modifier||V,k=A.type||k):je(A)&&(V=A||V):y.length===2&&(je(A)&&(V=A||V),je(L)&&(k=L||k));let T=c(S,!0)(_),J=T===""||T===void 0?S:T,x=k==="vnode"&&oi(J)&&V?J[0]:J;return V?d(V)(x,k):x},message:c,type:je((w=e.processor)==null?void 0:w.type)?e.processor.type:Kx,interpolate:f,normalize:h,values:Fi(Xt(),s,o)};return _}var d8=()=>"",Sn=e=>Ut(e);function h8(e,...t){let{fallbackFormat:i,postTranslation:n,unresolving:r,messageCompiler:a,fallbackLocale:s,messages:l}=e,[o,u]=sh(...t),c=Yt(u.missingWarn)?u.missingWarn:e.missingWarn,d=Yt(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,h=Yt(u.escapeParameter)?u.escapeParameter:e.escapeParameter,f=!!u.resolvedMessage,_=je(u.default)||Yt(u.default)?Yt(u.default)?a?o:()=>o:u.default:i?a?o:()=>o:null,m=i||_!=null&&(je(_)||Ut(_)),g=f2(e,u);h&&Jx(u);let[v,w,S]=f?[o,g,l[g]||Xt()]:ob(e,o,g,s,d,c),y=v,A=o;if(!f&&!(je(y)||Yn(y)||Sn(y))&&m&&(y=_,A=y),!f&&(!(je(y)||Yn(y)||Sn(y))||!je(w)))return r?-1:o;let L=!1,k=Sn(y)?y:ub(e,o,w,y,A,()=>{L=!0});if(L)return y;let V=Qx(e,k,Xx(tT(e,w,S,u))),T=n?n(V,o):V;if(h&&je(T)&&(T=PE(T)),__INTLIFY_PROD_DEVTOOLS__){let J={timestamp:Date.now(),key:je(o)?o:Sn(y)?y.key:"",locale:w||(Sn(y)?y.locale:""),format:je(y)?y:Sn(y)?y.source:"",message:T};J.meta=Fi({},e.__meta,{}),wx(J)}return T}function Jx(e){oi(e.list)?e.list=e.list.map(t=>je(t)?G6(t):t):xt(e.named)&&Object.keys(e.named).forEach(t=>{je(e.named[t])&&(e.named[t]=G6(e.named[t]))})}function ob(e,t,i,n,r,a){let{messages:s,onWarn:l,messageResolver:o,localeFallbacker:u}=e,c=u(e,n,i),d=Xt(),h,f=null,_="translate";for(let m=0;m<c.length&&(h=c[m],d=s[h]||Xt(),(f=o(d,t))===null&&(f=d[t]),!(je(f)||Yn(f)||Sn(f)));m++)if(!Fx(h,c)){let g=p2(e,t,h,a,_);g!==t&&(f=g)}return[f,h,d]}function ub(e,t,i,n,r,a){let{messageCompiler:s,warnHtmlMessage:l}=e;if(Sn(n)){let u=n;return u.locale=u.locale||i,u.key=u.key||t,u}if(s==null){let u=()=>n;return u.locale=i,u.key=t,u}let o=s(n,eT(e,i,r,n,l,a));return o.locale=i,o.key=t,o.source=n,o}function Qx(e,t,i){return t(i)}function sh(...e){let[t,i,n]=e,r=Xt();if(!je(t)&&!_i(t)&&!Sn(t)&&!Yn(t))throw yr(br.INVALID_ARGUMENT);let a=_i(t)?String(t):t;return _i(i)?r.plural=i:je(i)?r.default=i:Lt(i)&&!Kc(i)?r.named=i:oi(i)&&(r.list=i),_i(n)?r.plural=n:je(n)?r.default=n:Lt(n)&&Fi(r,n),[a,r]}function eT(e,t,i,n,r,a){return{locale:t,key:i,warnHtmlMessage:r,onError:s=>{throw a&&a(s),s},onCacheKey:s=>xE(t,i,s)}}function tT(e,t,i,n){let{modifiers:r,pluralRules:a,messageResolver:s,fallbackLocale:l,fallbackWarn:o,missingWarn:u,fallbackContext:c}=e,d={locale:t,modifiers:r,pluralRules:a,messages:(h,f)=>{let _=s(i,h);if(_==null&&(c||f)){let[,,m]=ob(c||e,h,t,l,o,u);_=s(m,h)}if(je(_)||Yn(_)){let m=!1,g=ub(e,h,t,_,h,()=>{m=!0});return m?d8:g}else return Sn(_)?_:d8}};return e.processor&&(d.processor=e.processor),n.list&&(d.list=n.list),n.named&&(d.named=n.named),_i(n.plural)&&(d.pluralIndex=n.plural),d}ox();var iT="11.3.0";function nT(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Oa().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Oa().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Oa().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Oa().__INTLIFY_PROD_DEVTOOLS__=!1)}var bs={UNEXPECTED_RETURN_TYPE:24,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function f0(e,...t){return qc(e,null,void 0)}var f8=Wa("__translateVNode"),p8=Wa("__datetimeParts"),_8=Wa("__numberParts"),rT=Wa("__setPluralRules"),cb=Wa("__injectWithOption"),lh=Wa("__dispose");function p0(e){if(!xt(e)||Yn(e))return e;for(let t in e)if(mn(e,t))if(!t.includes("."))xt(e[t])&&p0(e[t]);else{let i=t.split("."),n=i.length-1,r=e,a=!1;for(let s=0;s<n;s++){if(i[s]==="__proto__")throw Error(`unsafe key: ${i[s]}`);if(i[s]in r||(r[i[s]]=Xt()),!xt(r[i[s]])){a=!0;break}r=r[i[s]]}if(a||(Yn(r)?nb.includes(i[n])||delete e[t]:(r[i[n]]=e[t],delete e[t])),!Yn(r)){let s=r[i[n]];xt(s)&&p0(s)}}return e}function db(e,t){let{messages:i,__i18n:n,messageResolver:r,flatJson:a}=t,s=Lt(i)?i:oi(n)?Xt():{[e]:Xt()};if(oi(n)&&n.forEach(l=>{if("locale"in l&&"resource"in l){let{locale:o,resource:u}=l;o?(s[o]=s[o]||Xt(),bu(u,s[o])):bu(u,s)}else je(l)&&bu(JSON.parse(l),s)}),r==null&&a)for(let l in s)mn(s,l)&&p0(s[l]);return s}function aT(e){return e.type}function sT(e,t,i){let n=xt(t.messages)?t.messages:Xt();"__i18nGlobal"in i&&(n=db(e.locale.value,{messages:n,__i18n:i.__i18nGlobal}));let r=Object.keys(n);if(r.length&&r.forEach(a=>{e.mergeLocaleMessage(a,n[a])}),xt(t.datetimeFormats)){let a=Object.keys(t.datetimeFormats);a.length&&a.forEach(s=>{e.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(xt(t.numberFormats)){let a=Object.keys(t.numberFormats);a.length&&a.forEach(s=>{e.mergeNumberFormat(s,t.numberFormats[s])})}}function m8(e){return ee(Lr,null,e,0)}function hb(){return Jt()}var v8=()=>[],lT=()=>!1,g8=0;function b8(e){return(t,i,n,r)=>e(i,n,hb()||void 0,r)}function oT(e={}){let{__root:t,__injectWithOption:i}=e,n=t===void 0,r=e.flatJson,a=q6?X:An,s=Yt(e.inheritLocale)?e.inheritLocale:!0,l=a(t&&s?t.locale.value:je(e.locale)?e.locale:ec),o=a(t&&s?t.fallbackLocale.value:je(e.fallbackLocale)||oi(e.fallbackLocale)||Lt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),u=a(db(l.value,e)),c=a(Lt(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),d=a(Lt(e.numberFormats)?e.numberFormats:{[l.value]:{}}),h=t?t.missingWarn:Yt(e.missingWarn)||Qu(e.missingWarn)?e.missingWarn:!0,f=t?t.fallbackWarn:Yt(e.fallbackWarn)||Qu(e.fallbackWarn)?e.fallbackWarn:!0,_=t?t.fallbackRoot:Yt(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,g=Ut(e.missing)?e.missing:null,v=Ut(e.missing)?b8(e.missing):null,w=Ut(e.postTranslation)?e.postTranslation:null,S=t?t.warnHtmlMessage:Yt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter,A=t?t.modifiers:Lt(e.modifiers)?e.modifiers:{},L=e.pluralRules||t&&t.pluralRules,k;k=(()=>{n&&a8(null);let z={version:iT,locale:l.value,fallbackLocale:o.value,messages:u.value,modifiers:A,pluralRules:L,missing:v===null?void 0:v,missingWarn:h,fallbackWarn:f,fallbackFormat:m,unresolving:!0,postTranslation:w===null?void 0:w,warnHtmlMessage:S,escapeParameter:y,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};z.datetimeFormats=c.value,z.numberFormats=d.value,z.__datetimeFormatters=Lt(k)?k.__datetimeFormatters:void 0,z.__numberFormatters=Lt(k)?k.__numberFormatters:void 0;let Q=Bx(z);return n&&a8(Q),Q})(),po(k,l.value,o.value);function V(){return[l.value,o.value,u.value,c.value,d.value]}let T=H({get:()=>l.value,set:z=>{k.locale=z,l.value=z}}),J=H({get:()=>o.value,set:z=>{k.fallbackLocale=z,o.value=z,po(k,l.value,z)}}),x=H(()=>u.value),N=H(()=>c.value),O=H(()=>d.value);function R(){return Ut(w)?w:null}function j(z){w=z,k.postTranslation=z}function G(){return g}function ae(z){z!==null&&(v=b8(z)),g=z,k.missing=v}let q=(z,Q,D,oe,ye,xe)=>{V();let we;try{__INTLIFY_PROD_DEVTOOLS__,n||(k.fallbackContext=t?Vx():void 0),we=z(k)}finally{__INTLIFY_PROD_DEVTOOLS__,n||(k.fallbackContext=void 0)}if(D!=="translate exists"&&_i(we)&&we===-1||D==="translate exists"&&!we){let[Re,Ge]=Q();return t&&_?oe(t):ye(Re)}else{if(xe(we))return we;throw f0(bs.UNEXPECTED_RETURN_TYPE)}};function se(...z){return q(Q=>Reflect.apply(h8,null,[Q,...z]),()=>sh(...z),"translate",Q=>Reflect.apply(Q.t,Q,[...z]),Q=>Q,Q=>je(Q))}function me(...z){let[Q,D,oe]=z;if(oe&&!xt(oe))throw f0(bs.INVALID_ARGUMENT);return se(Q,D,Fi({resolvedMessage:!0},oe||{}))}function U(...z){return q(Q=>Reflect.apply(l8,null,[Q,...z]),()=>rh(...z),"datetime format",Q=>Reflect.apply(Q.d,Q,[...z]),()=>"",Q=>je(Q)||oi(Q))}function ve(...z){return q(Q=>Reflect.apply(u8,null,[Q,...z]),()=>ah(...z),"number format",Q=>Reflect.apply(Q.n,Q,[...z]),()=>"",Q=>je(Q)||oi(Q))}function ce(z){return z.map(Q=>je(Q)||_i(Q)||Yt(Q)?m8(String(Q)):Q)}let ge={normalize:ce,interpolate:z=>z,type:"vnode"};function ue(...z){return q(Q=>{let D,oe=Q;try{oe.processor=ge,D=Reflect.apply(h8,null,[oe,...z])}finally{oe.processor=null}return D},()=>sh(...z),"translate",Q=>Q[f8](...z),Q=>[m8(Q)],Q=>oi(Q))}function pe(...z){return q(Q=>Reflect.apply(u8,null,[Q,...z]),()=>ah(...z),"number format",Q=>Q[_8](...z),v8,Q=>je(Q)||oi(Q))}function W(...z){return q(Q=>Reflect.apply(l8,null,[Q,...z]),()=>rh(...z),"datetime format",Q=>Q[p8](...z),v8,Q=>je(Q)||oi(Q))}function he(z){L=z,k.pluralRules=L}function te(z,Q){return q(()=>{if(!z)return!1;let D=je(Q)?Q:l.value,oe=je(Q)?[D]:nh(k,o.value,D);for(let ye=0;ye<oe.length;ye++){let xe=F(oe[ye]),we=k.messageResolver(xe,z);if(we===null&&(we=xe[z]),Yn(we)||Sn(we)||je(we))return!0}return!1},()=>[z],"translate exists",D=>Reflect.apply(D.te,D,[z,Q]),lT,D=>Yt(D))}function be(z){let Q=null,D=nh(k,o.value,l.value);for(let oe=0;oe<D.length;oe++){let ye=u.value[D[oe]]||{},xe=k.messageResolver(ye,z);if(xe!=null){Q=xe;break}}return Q}function E(z){return be(z)??(t&&t.tm(z)||{})}function F(z){return u.value[z]||{}}function ie(z,Q){if(r){let D={[z]:Q};for(let oe in D)mn(D,oe)&&p0(D[oe]);Q=D[z]}u.value[z]=Q,k.messages=u.value}function fe(z,Q){u.value[z]=u.value[z]||{};let D={[z]:Q};if(r)for(let oe in D)mn(D,oe)&&p0(D[oe]);Q=D[z],bu(Q,u.value[z]),k.messages=u.value}function ne(z){return c.value[z]||{}}function Z(z,Q){c.value[z]=Q,k.datetimeFormats=c.value,o8(k,z,Q)}function re(z,Q){c.value[z]=Fi(c.value[z]||{},Q),k.datetimeFormats=c.value,o8(k,z,Q)}function b(z){return d.value[z]||{}}function C(z,Q){d.value[z]=Q,k.numberFormats=d.value,c8(k,z,Q)}function B(z,Q){d.value[z]=Fi(d.value[z]||{},Q),k.numberFormats=d.value,c8(k,z,Q)}g8++,t&&q6&&(Pe(t.locale,z=>{s&&(l.value=z,k.locale=z,po(k,l.value,o.value))}),Pe(t.fallbackLocale,z=>{s&&(o.value=z,k.fallbackLocale=z,po(k,l.value,o.value))}));let de={id:g8,locale:T,fallbackLocale:J,get inheritLocale(){return s},set inheritLocale(z){s=z,z&&t&&(l.value=t.locale.value,o.value=t.fallbackLocale.value,po(k,l.value,o.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:x,get modifiers(){return A},get pluralRules(){return L||{}},get isGlobal(){return n},get missingWarn(){return h},set missingWarn(z){h=z,k.missingWarn=h},get fallbackWarn(){return f},set fallbackWarn(z){f=z,k.fallbackWarn=f},get fallbackRoot(){return _},set fallbackRoot(z){_=z},get fallbackFormat(){return m},set fallbackFormat(z){m=z,k.fallbackFormat=m},get warnHtmlMessage(){return S},set warnHtmlMessage(z){S=z,k.warnHtmlMessage=z},get escapeParameter(){return y},set escapeParameter(z){y=z,k.escapeParameter=z},t:se,getLocaleMessage:F,setLocaleMessage:ie,mergeLocaleMessage:fe,getPostTranslationHandler:R,setPostTranslationHandler:j,getMissingHandler:G,setMissingHandler:ae,[rT]:he};return de.datetimeFormats=N,de.numberFormats=O,de.rt=me,de.te=te,de.tm=E,de.d=U,de.n=ve,de.getDateTimeFormat=ne,de.setDateTimeFormat=Z,de.mergeDateTimeFormat=re,de.getNumberFormat=b,de.setNumberFormat=C,de.mergeNumberFormat=B,de[cb]=i,de[f8]=ue,de[p8]=W,de[_8]=pe,de}var oh={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};Fi({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>_i(e)||!isNaN(e)}},oh),Fi({value:{type:Number,required:!0},format:{type:[String,Object]}},oh);var uT=Wa("global-vue-i18n");function fb(e={}){let t=hb();if(t==null)throw f0(bs.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw f0(bs.NOT_INSTALLED);let i=cT(t),n=hT(i),r=aT(t),a=dT(e,r);if(a==="global")return sT(n,e,r),n;if(a==="parent"){let o=fT(i,t,e.__useComponent);return o??(o=n),o}let s=i,l=s.__getInstance(t);if(l==null){let o=Fi({},e);"__i18n"in r&&(o.__i18n=r.__i18n),n&&(o.__root=n),l=oT(o),s.__composerExtend&&(l[lh]=s.__composerExtend(l)),_T(s,t,l),s.__setInstance(t,l)}return l}function cT(e){let t=At(e.isCE?uT:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw f0(e.isCE?bs.NOT_INSTALLED_WITH_PROVIDE:bs.UNEXPECTED_ERROR);return t}function dT(e,t){return Kc(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function hT(e){return e.mode==="composition"?e.global:e.global.__composer}function fT(e,t,i=!1){let n=null,r=t.root,a=pT(t,i);for(;a!=null;){let s=e;if(e.mode==="composition")n=s.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){let l=s.__getInstance(a);l!=null&&(n=l.__composer,i&&n&&!n[cb]&&(n=null))}if(n!=null||r===a)break;a=a.parent}return n}function pT(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function _T(e,t,i){et(()=>{},t),Hi(()=>{let n=i;e.__deleteInstance(t);let r=n[lh];r&&(r(),delete n[lh])},t)}if(Fi({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},oh),nT(),Ix(gx),Rx(Nx),Dx(nh),__INTLIFY_PROD_DEVTOOLS__){let e=Oa();e.__INTLIFY__=!0,bx(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const mT=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},vT=mT("shield-star","0 0 256 256",'<path d="M80.57,117A8,8,0,0,1,91,112.57l29,11.61V96a8,8,0,0,1,16,0v28.18l29-11.61A8,8,0,1,1,171,127.43l-30.31,12.12L158.4,163.2a8,8,0,1,1-12.8,9.6L128,149.33,110.4,172.8a8,8,0,1,1-12.8-9.6l17.74-23.65L85,127.43A8,8,0,0,1,80.57,117ZM224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Zm-16,0L48,56l0,56c0,37.3,13.82,67.51,41.07,89.81A128.25,128.25,0,0,0,128,223.62a129.3,129.3,0,0,0,39.41-22.2C194.34,179.16,208,149.07,208,112Z"/>'),gT=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},bT=gT("users","0 0 256 256",'<path d="M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"/>'),yT=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},_0=yT("plus","0 0 256 256",'<path d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"/>'),wT=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},ST=wT("user","0 0 256 256",'<path d="M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"/>'),Ys=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},CT=Ys("sign-out","0 0 256 256",'<path d="M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z"/>'),kT=Ys("sign-out","0 0 256 256",'<path d="M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z"/>'),uh=Ys("sign-out","0 0 256 256",'<path d="M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"/>'),AT=Ys("sign-out","0 0 256 256",'<path d="M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z"/>'),$T=Ys("sign-out","0 0 256 256",'<path d="M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z"/>'),MT=Ys("sign-out","0 0 256 256",'<path d="M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z" opacity="0.2"/><path d="M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"/>'),LT="sign-out",ET=Object.freeze(Object.defineProperty({__proto__:null,bold:AT,default:uh,duotone:MT,fill:$T,glyphName:LT,light:kT,regular:uh,thin:CT},Symbol.toStringTag,{value:"Module"}));var xT=["title","aria-expanded","disabled"],TT={class:"nb-user-menu__avatar","aria-hidden":"true"},HT=["src"],NT={class:"nb-user-menu__identity-text"},PT={class:"nb-user-menu__identity-name"},OT={key:0,class:"nb-user-menu__identity-email"},IT={key:1,class:"nb-user-menu__sr-only"},RT=["title","aria-label","aria-expanded","disabled"],DT=["src"],VT={class:"nb-user-menu__label"},BT={class:"nb-user-menu__email"},ZT={key:0,class:"nb-user-menu__role"},FT=["disabled","onClick"],zT={class:"nb-user-menu__account-main"},UT={class:"nb-user-menu__account-email"},WT={key:0,class:"nb-user-menu__account-name"},jT={class:"nb-user-menu__brand"},KT={key:1,class:"nb-user-menu__brand-name"},qT={key:2},GT=260,R1=8,YT=Ne({__name:"UserMenu",props:{user:{},accounts:{default:void 0},accountsUnknown:{type:Boolean,default:!1},showAccountActions:{type:Boolean,default:!0},showProfile:{type:Boolean,default:!0},brand:{default:"footer"},placement:{default:"right-end"},trigger:{default:"avatar"},showTheme:{type:Boolean,default:!1},roleBadge:{default:void 0},disabled:{type:Boolean,default:!1}},emits:["switch","remove","switch-account","add-account","profile","sign-out","open","close"],setup(e,{expose:t,emit:i}){let n={en:{ACCOUNT_MENU:"Account menu",SIGNED_IN_AS:"Signed in as",SWITCH_ACCOUNT:"Switch account",USE_ANOTHER_ACCOUNT:"Use another account",REMOVE_ACCOUNT:"Sign this account out of this browser",PROFILE:"Profile",SIGN_OUT:"Sign out",APPEARANCE:"Appearance",THEME_LIGHT:"Light",THEME_DARK:"Dark",THEME_SYSTEM:"Match my system",poweredBy:"Accord by Nubisco"},pt:{ACCOUNT_MENU:"Menu de conta",SIGNED_IN_AS:"Sessão iniciada como",SWITCH_ACCOUNT:"Mudar de conta",USE_ANOTHER_ACCOUNT:"Usar outra conta",REMOVE_ACCOUNT:"Terminar a sessão desta conta neste browser",PROFILE:"Perfil",SIGN_OUT:"Terminar sessão",APPEARANCE:"Aspeto",THEME_LIGHT:"Claro",THEME_DARK:"Escuro",THEME_SYSTEM:"Seguir o sistema",poweredBy:"Accord da Nubisco"}},{t:r,te:a,locale:s}=fb({useScope:"global"});function l(ve){var ge;if(a(ve))return r(ve);let ce=ve.slice(9);return((ge=n[String(s.value).toLowerCase().split("-")[0]])==null?void 0:ge[ce])??n.en[ce]??ve}let o=jc(),u=H(()=>[{label:l("userMenu.THEME_LIGHT"),value:"light"},{label:l("userMenu.THEME_DARK"),value:"dark"},{label:l("userMenu.THEME_SYSTEM"),value:"system"}]),c=`nb-user-menu-appearance-${an()}`,d=e,h=At("nb-shell-sidebar-variant",null),f=H(()=>d.trigger==="identity"&&((h==null?void 0:h.value)??"verbose")==="verbose"),_=H(()=>{var ve;return((ve=d.user.name)==null?void 0:ve.trim())||d.user.email}),m=H(()=>{var ce;let ve=(ce=d.user.name)==null?void 0:ce.trim();return ve?ve.toLowerCase()===d.user.email.trim().toLowerCase()?"":d.user.email:""}),g=X(!1);Pe(()=>d.user.picture,()=>{g.value=!1});let v=H(()=>!!d.user.picture&&!g.value),w=/(Accord|Nubisco)/,S=H(()=>{let ve=l("userMenu.poweredBy");if(!w.test(ve))return[{text:ve,name:!0,mark:!0}];let ce=!1;return ve.split(w).filter(ge=>ge!=="").map(ge=>{let ue=ge==="Accord"||ge==="Nubisco",pe=ge==="Nubisco"&&!ce;return pe&&(ce=!0),{text:ge,name:ue,mark:pe}})}),y=i,A=X(null),L=X(null),k=X(!1),V=X({});function T(ve){return T4(ve)}let{phone:J}=ln();function x(){var ce,ge;let ve=(ce=A.value)==null?void 0:ce.getBoundingClientRect();if(ve){if(J.value){let ue=((ge=L.value)==null?void 0:ge.offsetWidth)||GT,pe=Math.max(R1,window.innerWidth-ue-R1);V.value={left:`${Math.round(Math.min(Math.max(ve.left,R1),pe))}px`,bottom:`${Math.round(window.innerHeight-ve.top+8)}px`};return}d.placement==="top-start"?V.value={left:`${Math.round(ve.left)}px`,bottom:`${Math.round(window.innerHeight-ve.top+8)}px`}:V.value={left:`${Math.round(ve.right+12)}px`,bottom:`${Math.round(window.innerHeight-ve.bottom)}px`}}}function N(){d.disabled||(k.value?O():(x(),k.value=!0,y("open"),J.value&&wt(x)))}function O(){k.value&&(k.value=!1,y("close"))}function R(ve){ve.current||(O(),y("switch",ve))}function j(ve){y("remove",ve)}function G(){O(),y("switch-account")}function ae(){O(),y("add-account")}function q(){O(),y("profile")}function se(){O(),y("sign-out")}function me(ve){var ge,ue;if(!k.value)return;let ce=ve.target;(ge=A.value)!=null&&ge.contains(ce)||(ue=L.value)!=null&&ue.contains(ce)||O()}function U(ve){ve.key==="Escape"&&O()}return et(()=>{document.addEventListener("click",me),document.addEventListener("keydown",U)}),Tt(()=>{document.removeEventListener("click",me),document.removeEventListener("keydown",U)}),t({open:k,toggle:N,close:O}),(ve,ce)=>(p(),$("div",{ref_key:"rootRef",ref:A,class:Te(["nb-user-menu",{"nb-user-menu--identity":f.value,"nb-user-menu--elevated":!!d.roleBadge}])},[Ae(ve.$slots,"trigger",{open:k.value,toggle:N},()=>[f.value?(p(),$("button",{key:0,type:"button",class:"nb-user-menu__identity",title:d.user.email,"aria-haspopup":"menu","aria-expanded":k.value,disabled:e.disabled,onClick:N},[M("span",TT,[v.value?(p(),$("img",{key:0,class:"nb-user-menu__picture",src:d.user.picture??void 0,alt:"",onError:ce[0]||(ce[0]=ge=>g.value=!0)},null,40,HT)):(p(),$($e,{key:1},[_e(K(T(d.user)),1)],64))]),M("span",NT,[M("span",PT,K(_.value),1),m.value?(p(),$("span",OT,K(m.value),1)):P("",!0),d.roleBadge?(p(),$("span",IT," ("+K(d.roleBadge)+")",1)):P("",!0)])],8,xT)):(p(),$("button",{key:1,type:"button",class:"nb-user-menu__avatar",title:d.user.email,"aria-label":d.roleBadge?`${l("userMenu.ACCOUNT_MENU")} (${d.roleBadge})`:l("userMenu.ACCOUNT_MENU"),"aria-haspopup":"menu","aria-expanded":k.value,disabled:e.disabled,onClick:N},[v.value?(p(),$("img",{key:0,class:"nb-user-menu__picture",src:d.user.picture??void 0,alt:"",onError:ce[1]||(ce[1]=ge=>g.value=!0)},null,40,DT)):(p(),$($e,{key:1},[_e(K(T(d.user)),1)],64))],8,RT))]),(p(),le($r,{to:"body"},[ee(sa,{name:"nb-user-menu-pop"},{default:I(()=>[k.value?(p(),$("div",{key:0,ref_key:"panelRef",ref:L,class:"nb-user-menu__panel",style:ft(V.value),role:"menu"},[M("p",VT,K(l("userMenu.SIGNED_IN_AS")),1),M("p",BT,K(d.user.email),1),d.roleBadge?(p(),$("p",ZT,[ee(Ke,{name:Y(vT),size:"sm"},null,8,["name"]),_e(" "+K(d.roleBadge),1)])):P("",!0),e.showAccountActions?(p(),$($e,{key:1},[ce[3]||(ce[3]=M("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),d.accounts&&d.accounts.length?(p(!0),$($e,{key:0},Ue(d.accounts,ge=>(p(),$("button",{key:ge.id,type:"button",role:"menuitem",class:Te(["nb-user-menu__account",{"nb-user-menu__account--current":ge.current}]),disabled:ge.current,onClick:ue=>R(ge)},[M("span",zT,[M("span",UT,K(ge.email),1),ge.name?(p(),$("span",WT,K(ge.name),1)):P("",!0)]),ge.current?(p(),le(Ke,{key:0,name:Y($n),size:"sm",class:"nb-user-menu__check"},null,8,["name"])):ge.removable===!1?P("",!0):(p(),le(Ke,{key:1,name:Y(ir),size:"sm",class:"nb-user-menu__remove",title:l("userMenu.REMOVE_ACCOUNT"),onClick:Qe(ue=>j(ge),["stop"])},null,8,["name","title","onClick"]))],10,FT))),128)):d.accountsUnknown?(p(),$("button",{key:1,type:"button",role:"menuitem",class:"nb-user-menu__action",onClick:G},[ee(Ke,{name:Y(bT),size:"sm"},null,8,["name"]),_e(" "+K(l("userMenu.SWITCH_ACCOUNT")),1)])):P("",!0),M("button",{type:"button",role:"menuitem",class:"nb-user-menu__action",onClick:ae},[ee(Ke,{name:Y(_0),size:"sm"},null,8,["name"]),_e(" "+K(l("userMenu.USE_ANOTHER_ACCOUNT")),1)])],64)):P("",!0),d.showTheme?(p(),$($e,{key:2},[ce[4]||(ce[4]=M("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),M("div",{class:"nb-user-menu__appearance",role:"group","aria-labelledby":c},[M("p",{id:c,class:"nb-user-menu__appearance-title"},K(l("userMenu.APPEARANCE")),1),ee(U4,{name:c,options:u.value,"model-value":Y(o).theme.value,"onUpdate:modelValue":ce[2]||(ce[2]=ge=>Y(o).setTheme(ge))},null,8,["options","model-value"])])],64)):P("",!0),ve.$slots.default?(p(),$($e,{key:3},[ce[5]||(ce[5]=M("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),Ae(ve.$slots,"default",{close:O})],64)):P("",!0),ce[7]||(ce[7]=M("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),e.showProfile?(p(),$("button",{key:4,type:"button",role:"menuitem",class:"nb-user-menu__action",onClick:q},[ee(Ke,{name:Y(ST),size:"sm"},null,8,["name"]),_e(" "+K(l("userMenu.PROFILE")),1)])):P("",!0),M("button",{type:"button",role:"menuitem",class:"nb-user-menu__action nb-user-menu__action--danger",onClick:se},[ee(Ke,{name:Y(uh),size:"sm"},null,8,["name"]),_e(" "+K(l("userMenu.SIGN_OUT")),1)]),d.brand==="none"?P("",!0):(p(),$($e,{key:5},[ce[6]||(ce[6]=M("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),Ae(ve.$slots,"brand",{},()=>[M("p",jT,[(p(!0),$($e,null,Ue(S.value,(ge,ue)=>(p(),$($e,{key:ue},[ge.mark?(p(),le(mE,{key:0,size:13,class:"nb-user-menu__mark"})):P("",!0),ge.name?(p(),$("span",KT,K(ge.text),1)):(p(),$("span",qT,K(ge.text),1))],64))),128))])])],64))],4)):P("",!0)]),_:3})]))],2))}}),XT=Symbol.for("@nubisco/ui:checkbox-group-context"),JT={class:"nb-checkbox__control"},QT=["checked","disabled","indeterminate","aria-invalid","aria-describedby"],eH={class:"nb-checkbox__box"},tH={key:0,class:"nb-checkbox__check",viewBox:"0 0 10 8",fill:"none"},iH={key:1,class:"nb-checkbox__dash"},nH={key:0,class:"nb-checkbox__label"},ch=Je(Ne({__name:"Checkbox",props:{modelValue:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},name:{},disabled:{type:Boolean,default:!1},required:{type:Boolean},id:{default:"checkbox"},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){let i=e,n=t,r=At(XT,null),a=H(()=>i.disabled||!!(r!=null&&r.disabled.value));function s(l){a.value||n("update:modelValue",l.target.checked)}return(l,o)=>{var u,c,d,h;return p(),$("label",{class:Te(["nb-checkbox",{"nb-checkbox--disabled":a.value}])},[M("span",JT,[M("input",{type:"checkbox",checked:e.modelValue,disabled:a.value,indeterminate:e.indeterminate,"aria-invalid":(c=(u=Y(r))==null?void 0:u.invalid)==null?void 0:c.value,"aria-describedby":(h=(d=Y(r))==null?void 0:d.describedBy)==null?void 0:h.value,class:"nb-checkbox__input",onChange:s},null,40,QT),M("span",eH,[e.modelValue&&!e.indeterminate?(p(),$("svg",tH,[...o[0]||(o[0]=[M("path",{d:"M1 4l3 3 5-6",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):P("",!0),e.indeterminate?(p(),$("span",iH)):P("",!0)])]),e.label?(p(),$("span",nH,K(e.label),1)):Ae(l.$slots,"default",{key:1},void 0,!0)],2)}}}),[["__scopeId","data-v-d8e431ef"]]);const Xs=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},rH=Xs("arrows-down-up","0 0 256 256",'<path d="M114.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L76,198.34V48a4,4,0,0,1,8,0V198.34l25.17-25.17A4,4,0,0,1,114.83,173.17Zm96-96-32-32a4,4,0,0,0-5.66,0l-32,32a4,4,0,0,0,5.66,5.66L172,57.66V208a4,4,0,0,0,8,0V57.66l25.17,25.17a4,4,0,1,0,5.66-5.66Z"/>'),aH=Xs("arrows-down-up","0 0 256 256",'<path d="M116.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48,0l-32-32a6,6,0,0,1,8.48-8.48L74,193.51V48a6,6,0,0,1,12,0V193.51l21.76-21.75A6,6,0,0,1,116.24,171.76Zm96-96-32-32a6,6,0,0,0-8.48,0l-32,32a6,6,0,0,0,8.48,8.48L170,62.49V208a6,6,0,0,0,12,0V62.49l21.76,21.75a6,6,0,0,0,8.48-8.48Z"/>'),y8=Xs("arrows-down-up","0 0 256 256",'<path d="M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z"/>'),sH=Xs("arrows-down-up","0 0 256 256",'<path d="M120.49,167.51a12,12,0,0,1,0,17l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,1,1,17-17L68,179V48a12,12,0,0,1,24,0V179l11.51-11.52A12,12,0,0,1,120.49,167.51Zm96-96-32-32a12,12,0,0,0-17,0l-32,32a12,12,0,0,0,17,17L164,77V208a12,12,0,0,0,24,0V77l11.51,11.52a12,12,0,0,0,17-17Z"/>'),lH=Xs("arrows-down-up","0 0 256 256",'<path d="M119.39,172.94a8,8,0,0,1-1.73,8.72l-32,32a8,8,0,0,1-11.32,0l-32-32A8,8,0,0,1,48,168H72V48a8,8,0,0,1,16,0V168h24A8,8,0,0,1,119.39,172.94Zm94.27-98.6-32-32a8,8,0,0,0-11.32,0l-32,32A8,8,0,0,0,144,88h24V208a8,8,0,0,0,16,0V88h24a8,8,0,0,0,5.66-13.66Z"/>'),oH=Xs("arrows-down-up","0 0 256 256",'<path d="M176,48V208H80V48Z" opacity="0.2"/><path d="M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z"/>'),uH="arrows-down-up",cH=Object.freeze(Object.defineProperty({__proto__:null,bold:sH,default:y8,duotone:oH,fill:lH,glyphName:uH,light:aH,regular:y8,thin:rH},Symbol.toStringTag,{value:"Module"})),Js=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},dH=Js("arrow-down","0 0 256 256",'<path d="M202.83,146.83l-72,72a4,4,0,0,1-5.66,0l-72-72a4,4,0,0,1,5.66-5.66L124,206.34V40a4,4,0,0,1,8,0V206.34l65.17-65.17a4,4,0,0,1,5.66,5.66Z"/>'),hH=Js("arrow-down","0 0 256 256",'<path d="M204.24,148.24l-72,72a6,6,0,0,1-8.48,0l-72-72a6,6,0,0,1,8.48-8.48L122,201.51V40a6,6,0,0,1,12,0V201.51l61.76-61.75a6,6,0,0,1,8.48,8.48Z"/>'),w8=Js("arrow-down","0 0 256 256",'<path d="M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72a8,8,0,0,1,11.32-11.32L120,196.69V40a8,8,0,0,1,16,0V196.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z"/>'),fH=Js("arrow-down","0 0 256 256",'<path d="M208.49,152.49l-72,72a12,12,0,0,1-17,0l-72-72a12,12,0,0,1,17-17L116,187V40a12,12,0,0,1,24,0V187l51.51-51.52a12,12,0,0,1,17,17Z"/>'),pH=Js("arrow-down","0 0 256 256",'<path d="M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72A8,8,0,0,1,56,136h64V40a8,8,0,0,1,16,0v96h64a8,8,0,0,1,5.66,13.66Z"/>'),_H=Js("arrow-down","0 0 256 256",'<path d="M200,144l-72,72L56,144Z" opacity="0.2"/><path d="M207.39,140.94A8,8,0,0,0,200,136H136V40a8,8,0,0,0-16,0v96H56a8,8,0,0,0-5.66,13.66l72,72a8,8,0,0,0,11.32,0l72-72A8,8,0,0,0,207.39,140.94ZM128,204.69,75.31,152H180.69Z"/>'),mH="arrow-down",vH=Object.freeze(Object.defineProperty({__proto__:null,bold:fH,default:w8,duotone:_H,fill:pH,glyphName:mH,light:hH,regular:w8,thin:dH},Symbol.toStringTag,{value:"Module"}));var gH={key:0,class:"nb-data-table__toolbar"},bH={key:0,class:"nb-data-table__toolbar-heading"},yH={key:0,class:"nb-data-table__title"},wH={key:1,class:"nb-data-table__description"},SH={key:1,class:"nb-data-table__toolbar-row"},CH=["inert","aria-hidden"],kH={key:0,class:"nb-data-table__toolbar-search"},AH=["aria-label"],$H={class:"nb-data-table__batch-count"},MH={class:"nb-data-table__batch-actions"},LH={class:"nb-data-table__scroll"},EH=["role","aria-label","aria-busy"],xH={key:0,class:"nb-data-table__col-expand"},TH={key:1,class:"nb-data-table__col-select"},HH={key:2,class:"nb-data-table__col-actions"},NH=["role"],PH=["role"],OH={key:0,scope:"col",class:"nb-data-table__th nb-data-table__expand-cell"},IH={key:1,scope:"col",class:"nb-data-table__th nb-data-table__select-cell"},RH=["aria-sort"],DH=["onClick"],VH={class:"nb-data-table__th-label"},BH={key:1,class:"nb-data-table__th-label"},ZH={key:2,scope:"col",class:"nb-data-table__th nb-data-table__actions-cell"},FH=["role"],zH={key:0,class:"nb-data-table__td"},UH={key:1,class:"nb-data-table__td"},WH={key:2,class:"nb-data-table__td"},jH={key:1,class:"nb-data-table__state-row"},KH=["colspan"],qH={key:2,class:"nb-data-table__state-row"},GH=["colspan"],YH=["role","aria-selected","tabindex","onClick","onKeydown","onKeyup"],XH=["role"],JH=["aria-expanded","aria-controls","aria-label","onClick"],QH=["checked","aria-label","onChange"],eN=["role","data-label"],tN=["role"],iN=["colspan","role"],nN=["id","aria-label"],rN={key:1,class:"nb-data-table__footer"},_2=Je(Ne({__name:"DataTable",props:{columns:{},rows:{},rowKey:{},size:{default:"lg"},sortState:{default:null},selectable:{default:"none"},selected:{default:()=>[]},loading:{type:Boolean,default:!1},skeletonRows:{default:5},error:{type:[String,Boolean],default:void 0},emptyMessage:{default:void 0},stickyHeader:{type:Boolean,default:!0},zebra:{type:Boolean,default:!1},fill:{type:Boolean,default:!1},title:{default:void 0},description:{default:void 0},ariaLabel:{default:void 0},stackOnPhone:{type:Boolean,default:!1},expanded:{default:()=>[]}},emits:["sort","update:selected","row-click","update:expanded"],setup(e,{emit:t}){let i=ar(),n=e,{layerProps:r}=ua(),a=t,s=vi(),l=`nb-data-table-select-${an()}`,o=H(()=>n.size==="xl"?"lg":n.size),u=H(()=>n.columns.filter(D=>!D.hidden)),c=H(()=>n.selectable!=="none"),d=H(()=>!!s["row-actions"]),h=H(()=>!!s["row-detail"]),f=H(()=>u.value.length+(h.value?1:0)+(c.value?1:0)+(d.value?1:0)),{phone:_}=ln(),m=H(()=>n.stackOnPhone&&_.value),g=H(()=>{var D;return(D=u.value.find(oe=>oe.primary)??u.value.find(oe=>!oe.phoneHidden&&!oe.phoneMeta))==null?void 0:D.key});function v(D){return D.phoneHidden?"nb-data-table__td--phone-hidden":D.key===g.value?"nb-data-table__td--primary":D.phoneMeta?"nb-data-table__td--meta":"nb-data-table__td--field"}let w=H(()=>!n.loading&&!n.error&&n.rows.length>0&&(n.selectable==="multiple"||u.value.some(D=>D.sortable&&!D.phoneHidden)));function S(D){if(D.width!=null)return{width:typeof D.width=="number"?`${D.width}px`:D.width}}function y(D,oe){return oe[D.key]}function A(D){return D==null?"":String(D)}let L=D=>{var oe,ye;return((ye=(oe=D.column).render)==null?void 0:ye.call(oe,D.row,y(D.column,D.row),D.rowIndex))??null};L.props=["column","row","rowIndex"];function k(D){let oe=n.rowKey;return typeof oe=="function"?oe(D):D[oe]}let V=H(()=>new Set(n.selected)),T=H(()=>n.selected),J=H(()=>n.selected.length);function x(D){return V.value.has(k(D))}let N=H(()=>n.rows.map(D=>k(D))),O=H(()=>N.value.length>0&&N.value.every(D=>V.value.has(D))),R=H(()=>!O.value&&N.value.some(D=>V.value.has(D))),j=X(null),G=!1;function ae(D){G=D.shiftKey}Pe(N,()=>{j.value=null});function q(D,oe){let ye=k(D),xe=new Set(n.selected),we=!xe.has(ye),Re=j.value,Ge=Ct=>{we?xe.add(Ct):xe.delete(Ct)};if(G&&Re!==null&&Re!==oe){let Ct=Math.min(Re,oe),qt=Math.max(Re,oe);for(let Dt=Ct;Dt<=qt;Dt++){let rt=n.rows[Dt];rt&&Ge(k(rt))}}else Ge(ye),j.value=oe;G=!1,a("update:selected",[...xe])}function se(D){a("update:selected",[k(D)])}function me(){let D=new Set(n.selected);O.value?N.value.forEach(oe=>D.delete(oe)):N.value.forEach(oe=>D.add(oe)),a("update:selected",[...D])}function U(){a("update:selected",[])}let ve=H(()=>n.selectable!=="none"&&!!s["batch-actions"]),ce=H(()=>ve.value&&J.value>0),ge=`nb-data-table-detail-${an()}`,ue=H(()=>new Set(n.expanded));function pe(D){return h.value&&ue.value.has(k(D))}function W(D){let oe=k(D),ye=n.expanded.filter(xe=>xe!==oe);ye.length===n.expanded.length&&ye.push(oe),a("update:expanded",ye)}function he(D){return`${ge}-${D}`}function te(D,oe){let ye=u.value.find(xe=>xe.key===g.value);return`Details for ${(ye?A(y(ye,D)).trim():"")||`row ${oe+1}`}`}let be=H(()=>!!n.title||!!n.description||!!s.toolbar),E=H(()=>!!s.search||!!s["toolbar-actions"]||ve.value),F=H(()=>be.value||E.value);function ie(D){return!!n.sortState&&n.sortState.key===D.key&&n.sortState.direction!=="none"}function fe(D){return ie(D)?n.sortState.direction==="asc"?"ascending":"descending":"none"}function ne(D){return ie(D)?n.sortState.direction==="asc"?Bk:vH:cH}function Z(D){return D==="asc"?"desc":D==="desc"?"none":"asc"}function re(D){let oe=n.sortState&&n.sortState.key===D.key?n.sortState.direction:"none";a("sort",{key:D.key,direction:Z(oe)})}let b=Jt(),C=H(()=>{var D;return!!((D=b==null?void 0:b.vnode.props)!=null&&D.onRowClick)});function B(D,oe){a("row-click",D,oe)}function de(D){return C.value&&D.target===D.currentTarget&&!D.altKey&&!D.ctrlKey&&!D.metaKey}function z(D,oe,ye){de(D)&&(D.key==="Enter"?(D.preventDefault(),D.repeat||B(oe,ye)):D.key===" "&&D.preventDefault())}function Q(D,oe,ye){!de(D)||D.key!==" "||(D.preventDefault(),B(oe,ye))}return(D,oe)=>(p(),$("div",yt({class:["nb-data-table",`nb-data-table--${e.size}`,{"nb-data-table--zebra":e.zebra},{"nb-data-table--sticky":e.stickyHeader},{"nb-data-table--fill":e.fill},{"nb-data-table--stacked":m.value},{"nb-data-table--stacked-headless":m.value&&!w.value},{"nb-data-table--expandable":h.value}]},Y(r)),[F.value?(p(),$("div",gH,[be.value?(p(),$("div",bH,[Ae(D.$slots,"toolbar",{selectedCount:J.value},()=>[e.title?(p(),$("h2",yH,K(e.title),1)):P("",!0),e.description?(p(),$("p",wH,K(e.description),1)):P("",!0)],!0)])):P("",!0),E.value?(p(),$("div",SH,[D.$slots.search||D.$slots["toolbar-actions"]?(p(),$("div",{key:0,class:Te(["nb-data-table__toolbar-tools",{"nb-data-table__toolbar-tools--search":!!D.$slots.search}]),inert:ce.value||void 0,"aria-hidden":ce.value||void 0},[D.$slots.search?(p(),$("div",kH,[Ae(D.$slots,"search",{},void 0,!0)])):P("",!0),Ae(D.$slots,"toolbar-actions",{},void 0,!0)],10,CH)):P("",!0),ce.value?(p(),$("div",{key:1,class:"nb-data-table__batch",role:"region","aria-label":Y(i).dataTableBatchActions},[M("span",$H,K(Y(i).selectionCount(J.value)),1),M("div",MH,[Ae(D.$slots,"batch-actions",{selectedKeys:T.value,clear:U},void 0,!0)]),ee(kt,{class:"nb-data-table__batch-cancel",variant:"ghost",size:o.value,onClick:U},{default:I(()=>[...oe[3]||(oe[3]=[_e(" Cancel ",-1)])]),_:1},8,["size"])],8,AH)):P("",!0)])):P("",!0)])):P("",!0),M("div",LH,[M("table",{class:"nb-data-table__table",role:m.value?"table":void 0,"aria-label":e.ariaLabel||e.title||void 0,"aria-busy":e.loading||void 0},[M("colgroup",null,[h.value?(p(),$("col",xH)):P("",!0),c.value?(p(),$("col",TH)):P("",!0),(p(!0),$($e,null,Ue(u.value,ye=>(p(),$("col",{key:`col-${ye.key}`,style:ft(S(ye))},null,4))),128)),d.value?(p(),$("col",HH)):P("",!0)]),M("thead",{class:"nb-data-table__head",role:m.value?"rowgroup":void 0},[M("tr",{role:m.value?"row":void 0},[h.value?(p(),$("th",OH,[...oe[4]||(oe[4]=[M("span",{class:"nb-sr-only"},"Row details",-1)])])):P("",!0),c.value?(p(),$("th",IH,[e.selectable==="multiple"?(p(),le(ch,{key:0,"model-value":O.value,indeterminate:R.value,"aria-label":Y(i).dataTableSelectAll,"onUpdate:modelValue":me},null,8,["model-value","indeterminate","aria-label"])):P("",!0)])):P("",!0),(p(!0),$($e,null,Ue(u.value,ye=>(p(),$("th",{key:`th-${ye.key}`,scope:"col",class:Te(["nb-data-table__th",`nb-data-table__th--${ye.align||"left"}`,{"nb-data-table__th--sortable":ye.sortable},{"nb-data-table__th--sorted":ie(ye)},m.value&&ye.phoneHidden&&"nb-data-table__th--phone-hidden"]),"aria-sort":ye.sortable?fe(ye):void 0},[ye.sortable?(p(),$("button",{key:0,type:"button",class:"nb-data-table__sort",onClick:xe=>re(ye)},[M("span",VH,[Ae(D.$slots,`header-${ye.key}`,{column:ye},()=>[_e(K(ye.header),1)],!0)]),ee(Ke,{name:ne(ye),class:"nb-data-table__sort-icon","aria-hidden":"true"},null,8,["name"])],8,DH)):(p(),$("span",BH,[Ae(D.$slots,`header-${ye.key}`,{column:ye},()=>[_e(K(ye.header),1)],!0)]))],10,RH))),128)),d.value?(p(),$("th",ZH,[...oe[5]||(oe[5]=[M("span",{class:"nb-sr-only"},"Row actions",-1)])])):P("",!0)],8,PH)],8,NH),M("tbody",{class:"nb-data-table__body",role:m.value?"rowgroup":void 0},[e.loading?(p(!0),$($e,{key:0},Ue(e.skeletonRows,ye=>(p(),$("tr",{key:`skeleton-${ye}`,class:"nb-data-table__row nb-data-table__row--skeleton"},[h.value?(p(),$("td",zH)):P("",!0),c.value?(p(),$("td",UH,[...oe[6]||(oe[6]=[M("span",{class:"nb-data-table__skeleton nb-data-table__skeleton--box"},null,-1)])])):P("",!0),(p(!0),$($e,null,Ue(u.value,xe=>(p(),$("td",{key:`sk-${ye}-${xe.key}`,class:"nb-data-table__td"},[...oe[7]||(oe[7]=[M("span",{class:"nb-data-table__skeleton"},null,-1)])]))),128)),d.value?(p(),$("td",WH,[...oe[8]||(oe[8]=[M("span",{class:"nb-data-table__skeleton nb-data-table__skeleton--box"},null,-1)])])):P("",!0)]))),128)):e.error?(p(),$("tr",jH,[M("td",{colspan:f.value,class:"nb-data-table__state nb-data-table__state--error"},[Ae(D.$slots,"error",{error:e.error},()=>[ee(Zi,{is:"span",align:"center",justify:"center",gap:"xs",class:"nb-data-table__state-inner"},{default:I(()=>[ee(Ke,{name:"warning-circle-fill","aria-hidden":"true"}),M("span",null,K(e.error===!0?Y(i).dataTableError:e.error),1)]),_:1})],!0)],8,KH)])):e.rows.length?(p(!0),$($e,{key:3},Ue(e.rows,(ye,xe)=>(p(),$($e,{key:k(ye)},[M("tr",{class:Te(["nb-data-table__row",{"nb-data-table__row--selected":x(ye)},{"nb-data-table__row--clickable":C.value},h.value&&{"nb-data-table__row--expanded":pe(ye),"nb-data-table__row--even":xe%2==1}]),role:m.value?"row":void 0,"aria-selected":e.selectable==="none"?void 0:x(ye),tabindex:C.value?0:void 0,onClick:we=>B(ye,xe),onKeydown:we=>z(we,ye,xe),onKeyup:we=>Q(we,ye,xe)},[h.value?(p(),$("td",{key:0,class:"nb-data-table__td nb-data-table__expand-cell",role:m.value?"cell":void 0,onClick:oe[0]||(oe[0]=Qe(()=>{},["stop"]))},[M("button",{type:"button",class:"nb-data-table__expand","aria-expanded":pe(ye),"aria-controls":pe(ye)?he(xe):void 0,"aria-label":te(ye,xe),onClick:we=>W(ye)},[ee(Ke,{name:V4,class:"nb-data-table__expand-icon","aria-hidden":"true"})],8,JH)],8,XH)):P("",!0),c.value?(p(),$("td",{key:1,class:"nb-data-table__td nb-data-table__select-cell",onClick:oe[1]||(oe[1]=Qe(()=>{},["stop"])),onMousedown:ae,onKeydown:ae},[e.selectable==="multiple"?(p(),le(ch,{key:0,"model-value":x(ye),"aria-label":Y(i).dataTableSelectRow(xe+1),"onUpdate:modelValue":we=>q(ye,xe)},null,8,["model-value","aria-label","onUpdate:modelValue"])):(p(),$("input",{key:1,type:"radio",class:"nb-data-table__radio",name:l,checked:x(ye),"aria-label":Y(i).dataTableSelectRow(xe+1),onChange:we=>se(ye)},null,40,QH))],32)):P("",!0),(p(!0),$($e,null,Ue(u.value,we=>(p(),$("td",{key:`td-${k(ye)}-${we.key}`,class:Te(["nb-data-table__td",`nb-data-table__td--${we.align||"left"}`,we.cellClass,m.value&&v(we)]),role:m.value?"cell":void 0,"data-label":e.stackOnPhone?we.header:void 0},[Ae(D.$slots,`cell-${we.key}`,{row:ye,value:y(we,ye),column:we,rowIndex:xe},()=>[we.render?(p(),le(L,{key:0,column:we,row:ye,"row-index":xe},null,8,["column","row","row-index"])):(p(),$($e,{key:1},[_e(K(A(y(we,ye))),1)],64))],!0)],10,eN))),128)),d.value?(p(),$("td",{key:2,class:"nb-data-table__td nb-data-table__actions-cell",onClick:oe[2]||(oe[2]=Qe(()=>{},["stop"]))},[Ae(D.$slots,"row-actions",{row:ye,rowIndex:xe},void 0,!0)])):P("",!0)],42,YH),pe(ye)?(p(),$("tr",{key:0,class:"nb-data-table__detail-row",role:m.value?"row":void 0},[M("td",{colspan:f.value,class:"nb-data-table__detail-cell",role:m.value?"cell":void 0},[M("div",{id:he(xe),class:"nb-data-table__detail",role:"region","aria-label":te(ye,xe)},[Ae(D.$slots,"row-detail",{row:ye,rowIndex:xe},void 0,!0)],8,nN)],8,iN)],8,tN)):P("",!0)],64))),128)):(p(),$("tr",qH,[M("td",{colspan:f.value,class:"nb-data-table__state nb-data-table__state--empty"},[Ae(D.$slots,"empty",{},()=>[M("span",null,K(e.emptyMessage||Y(i).dataTableEmpty),1)],!0)],8,GH)]))],8,FH)],8,EH)]),D.$slots.footer?(p(),$("div",rN,[Ae(D.$slots,"footer",{},void 0,!0)])):P("",!0)],16))}}),[["__scopeId","data-v-099085b4"]]),aN=["width","height","aria-label"],sN={key:0},lN=["x1","x2","y1","y2"],oN={class:"nb-chart__axis"},uN=["x","y"],cN={class:"nb-chart__axis"},dN=["x","y"],hN=["x1","x2","y1","y2"],fN=["y","transform"],pN=["x","y"],_N=["d","fill"],mN=["d","stroke"],vN=["cx","cy","r","fill","onMousedown","onContextmenu"],gN={key:5},bN=["x1","x2","y1","y2"],yN=["x1","x2","y1","y2"],wN="var(--nb-c-surface)",SN=Je(Ne({__name:"InterpolationChart",props:{modelValue:{default:()=>[]},inputLabel:{default:void 0},outputLabel:{default:void 0},inputMin:{default:0},inputMax:{default:100},outputMin:{default:0},outputMax:{default:100},editable:{type:Boolean,default:!0},minPoints:{default:2},inputStep:{default:0},outputStep:{default:0},title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>[]}},emits:["update:modelValue"],setup(e,{emit:t}){let i=ar(),n=e,r=t,a=H(()=>s2(0,n.colors)),s={top:16,right:16,bottom:32,left:48},l=X(null),o=o2(l,{width:480,height:240}),u=H(()=>Math.max(0,o.value.width-s.left-s.right)),c=H(()=>Math.max(0,o.value.height-s.top-s.bottom)),d=H(()=>[...n.modelValue].sort((pe,W)=>pe.input-W.input)),h=H(()=>[n.inputMin,n.inputMax]),f=H(()=>{let pe=d.value.map(W=>W.output);return l2(Math.min(n.outputMin,...pe),Math.max(n.outputMax,...pe),.05)}),_=H(()=>Xu(h.value,[s.left,o.value.width-s.right])),m=H(()=>Xu(f.value,[o.value.height-s.bottom,s.top])),g=H(()=>_.value.ticks(6)),v=H(()=>m.value.ticks(5)),w=pe=>{let[W,he]=h.value,[te,be]=_.value.range;return W+(pe-te)/(be-te)*(he-W)},S=pe=>{let[W,he]=f.value,[te,be]=m.value.range;return W+(pe-te)/(be-te)*(he-W)},y=(pe,W)=>!W||W<=0?pe:Math.round(pe/W)*W,A=(pe,W,he)=>Math.max(W,Math.min(he,pe)),L=(pe,W=1)=>Math.round(pe*10**W)/10**W,k=H(()=>{let pe=d.value;return pe.length<2?"":pe.map((W,he)=>`${he===0?"M":"L"}${_.value(W.input)},${m.value(W.output)}`).join(" ")}),V=H(()=>{let pe=d.value;if(pe.length<2)return"";let W=o.value.height-s.bottom;return`${pe.map((he,te)=>`${te===0?"M":"L"}${_.value(he.input)},${m.value(he.output)}`).join(" ")} L${_.value(pe[pe.length-1].input)},${W} L${_.value(pe[0].input)},${W} Z`}),T=X(null),J=X(null);function x(pe){r("update:modelValue",[...pe].sort((W,he)=>W.input-he.input))}function N(pe,W){n.editable&&(T.value=pe,window.addEventListener("mousemove",R),window.addEventListener("mouseup",j))}function O(pe){var te;let W=(te=l.value)==null?void 0:te.querySelector("svg");if(!W)return null;let he=W.getBoundingClientRect();return{px:pe.clientX-he.left,py:pe.clientY-he.top}}function R(pe){if(T.value===null)return;let W=O(pe);if(!W)return;let he=w(W.px),te=S(W.py),be=[...d.value],E=T.value,F=n.inputStep>0?n.inputStep:.1;be[E]={input:L(y(A(he,E>0?be[E-1].input+F:n.inputMin,E<be.length-1?be[E+1].input-F:n.inputMax),n.inputStep)),output:L(y(A(te,n.outputMin,n.outputMax),n.outputStep))},x(be)}function j(){T.value=null,window.removeEventListener("mousemove",R),window.removeEventListener("mouseup",j)}function G(pe){if(T.value!==null)return;let W=O(pe);if(!W)return;let he=-1,te=1/0;for(let be=0;be<d.value.length;be++){let E=d.value[be],F=_.value(E.input)-W.px,ie=m.value(E.output)-W.py,fe=Math.sqrt(F*F+ie*ie);fe<te&&(te=fe,he=be)}J.value=te<20?he:null,U.value={x:W.px+12,y:W.py-12}}function ae(){T.value===null&&(J.value=null)}function q(){T.value!==null&&(T.value=null,window.removeEventListener("mousemove",R),window.removeEventListener("mouseup",j))}function se(pe){if(!n.editable)return;let W=O(pe);if(!W)return;let he=w(W.px),te=S(W.py);if(he<n.inputMin||he>n.inputMax||te<n.outputMin||te>n.outputMax)return;let be=L(y(A(he,n.inputMin,n.inputMax),n.inputStep)),E=L(y(A(te,n.outputMin,n.outputMax),n.outputStep));x([...d.value,{input:be,output:E}])}function me(pe){n.editable&&(d.value.length<=n.minPoints||x(d.value.filter((W,he)=>he!==pe)))}Tt(()=>{window.removeEventListener("mousemove",R),window.removeEventListener("mouseup",j)});let U=X({x:0,y:0}),ve=H(()=>J.value!==null||T.value!==null),ce=H(()=>{let pe=T.value??J.value;return pe===null?"":`Point ${pe+1}`}),ge=H(()=>{let pe=T.value??J.value;if(pe===null||pe>=d.value.length)return[];let W=d.value[pe];return[{label:n.inputLabel||i.value.chartInput,value:ue(W.input),color:a.value},{label:n.outputLabel||i.value.chartOutput,value:ue(W.output),color:a.value}]}),ue=pe=>Number.isInteger(pe)?String(pe):pe.toFixed(1);return(pe,W)=>(p(),le(r2,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":!1},{default:I(()=>[M("div",{ref_key:"root",ref:l,class:"nb-interpolation-chart"},[(p(),$("svg",{width:Y(o).width,height:Y(o).height,class:"nb-chart__svg",role:"img","aria-label":e.title||Y(i).chartInterpolation,onMousemove:G,onMouseleave:ae,onMouseup:q,onDblclick:se,onContextmenu:W[0]||(W[0]=Qe(()=>{},["prevent"]))},[e.showGrid&&Y(o).width>0?(p(),$("g",sN,[(p(!0),$($e,null,Ue(v.value,he=>(p(),$("line",{key:`grid-${he}`,class:"nb-chart__gridline",x1:s.left,x2:Y(o).width-s.right,y1:m.value(he),y2:m.value(he)},null,8,lN))),128))])):P("",!0),M("g",oN,[(p(!0),$($e,null,Ue(v.value,he=>(p(),$("text",{key:`yt-${he}`,x:s.left-6,y:m.value(he),"text-anchor":"end","dominant-baseline":"middle"},K(ue(he)),9,uN))),128))]),M("g",cN,[(p(!0),$($e,null,Ue(g.value,he=>(p(),$("text",{key:`xt-${he}`,x:_.value(he),y:Y(o).height-s.bottom+14,"text-anchor":"middle"},K(ue(he)),9,dN))),128))]),M("line",{class:"nb-chart__axis-line",x1:s.left,x2:Y(o).width-s.right,y1:Y(o).height-s.bottom,y2:Y(o).height-s.bottom},null,8,hN),e.outputLabel?(p(),$("text",{key:1,class:"nb-chart__axis-label",x:12,y:s.top+c.value/2,"text-anchor":"middle",transform:`rotate(-90, 12, ${s.top+c.value/2})`},K(e.outputLabel),9,fN)):P("",!0),e.inputLabel?(p(),$("text",{key:2,class:"nb-chart__axis-label",x:s.left+u.value/2,y:Y(o).height-2,"text-anchor":"middle"},K(e.inputLabel),9,pN)):P("",!0),d.value.length>=2?(p(),$("path",{key:3,class:"nb-interpolation-chart__area",d:V.value,fill:a.value,opacity:"0.12"},null,8,_N)):P("",!0),d.value.length>=2?(p(),$("path",{key:4,class:"nb-interpolation-chart__line",d:k.value,stroke:a.value,fill:"none","stroke-width":"2","stroke-linejoin":"round","stroke-linecap":"round"},null,8,mN)):P("",!0),(p(!0),$($e,null,Ue(d.value,(he,te)=>(p(),$("circle",{key:`pt-${te}`,class:Te(["nb-interpolation-chart__point",{"nb-interpolation-chart__point--editable":e.editable,"nb-interpolation-chart__point--dragging":T.value===te,"nb-interpolation-chart__point--hover":J.value===te&&T.value===null}]),cx:_.value(he.input),cy:m.value(he.output),r:T.value===te?7:J.value===te?6:5,fill:a.value,stroke:wN,"stroke-width":"2",onMousedown:Qe(be=>N(te,be),["prevent"]),onContextmenu:Qe(be=>me(te),["prevent"])},null,42,vN))),128)),T.value===null?P("",!0):(p(),$("g",gN,[M("line",{class:"nb-interpolation-chart__crosshair",x1:_.value(d.value[T.value].input),x2:_.value(d.value[T.value].input),y1:s.top,y2:Y(o).height-s.bottom},null,8,bN),M("line",{class:"nb-interpolation-chart__crosshair",x1:s.left,x2:Y(o).width-s.right,y1:m.value(d.value[T.value].output),y2:m.value(d.value[T.value].output)},null,8,yN)]))],40,aN)),ee(a2,{visible:e.showTooltip&&ve.value,x:U.value.x,y:U.value.y,title:ce.value,rows:ge.value},null,8,["visible","x","y","title","rows"])],512)]),_:1},8,["title","subtitle","height"]))}}),[["__scopeId","data-v-83de4dce"]]),pb=6,CN=8,kN=(e,t=pb)=>{let i=[];if(e<=0)return i;let n=Math.max(1,Math.ceil(e/t));for(let r=0;r<e;r+=n)i.push(r);return i[i.length-1]!==e-1&&i.push(e-1),i},tc=(e,t,i)=>{for(let n=1;n<e.length;n++){let r=e[n-1],a=e[n],s=r.x+t(r.index)/2;if(a.x-t(a.index)/2-s<i)return!1}return!0},AN=(e,t,i)=>{if(i===void 0||t>=i)return e;let n=t/2;return Math.min(Math.max(e,n),i-n)},S8=(e,t,i,n,r)=>{let a=o=>o.x===i(o.index)?n:r,s=e,l=s[s.length-1];return s.length>2&&!tc(s.slice(-2),t,a(l))&&(s=[...s.slice(0,-2),l]),s.length>2&&!tc(s.slice(0,2),t,a(s[0]))&&(s=[s[0],...s.slice(2)]),s},$N=({count:e,positionOf:t,widthOf:i,width:n,gap:r=CN})=>{let a=kN(e);if(!i)return a.map(c=>({index:c,x:t(c)}));let s=c=>({index:c,x:AN(t(c),i(c),n)}),l=S8(a.map(s),i,t,-1/0,r);if(tc(l,i,0))return l;let o=e-1,u=Math.max(1,Math.ceil(e/pb))+1;for(let c=u;c<=o;c++){let d=[];for(let f=0;f<o;f+=c)d.push(f);let h=S8([...d,o].map(s),i,t,r,r);if(tc(h,i,r))return h}return[s(0)]},MN=["width","height","aria-label"],LN={key:0},EN=["x1","x2","y1","y2"],xN={class:"nb-chart__axis"},TN=["x","y"],HN=["x","y"],NN=["x1","x2","y1","y2"],PN=["d","fill"],ON=["d","stroke"],IN=["cx","cy","r","fill"],RN=["x1","x2","y1","y2"],DN=Je(Ne({__name:"LineChart",props:{series:{default:()=>[]},area:{type:Boolean,default:!1},points:{type:Boolean,default:!1},curve:{default:"smooth"},valueFormatter:{},title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>Yu}},setup(e){let t=ar(),i=e,n={top:12,right:16,bottom:28,left:44},r=X(null),a=o2(r,{width:480,height:240}),s=H(()=>i.series.map((O,R)=>({name:O.name,data:O.data,color:O.color??s2(R,i.colors)}))),l=H(()=>{var O;return(((O=i.series[0])==null?void 0:O.data)??[]).map(R=>R.x)}),o=H(()=>{let O=i.series.flatMap(R=>R.data.map(j=>j.y));return O.length?l2(Math.min(0,...O),Math.max(...O),.1):[0,1]}),u=H(()=>Xu(o.value,[Math.max(n.top,a.value.height-n.bottom),n.top])),c=H(()=>u.value.ticks(5)),d=X(7),h=O=>Math.max(u.value(O),d.value),f=H(()=>Math.max(0,a.value.width-n.left-n.right)),_=O=>{let R=l.value.length;return R<=1?n.left+f.value/2:n.left+O/(R-1)*f.value},m=X(null),g=X(null),v=()=>{let O=m.value;if(!O||typeof document>"u")return;let R=document.createElementNS("http://www.w3.org/2000/svg","text");if(typeof R.getComputedTextLength!="function")return;R.setAttribute("visibility","hidden"),R.setAttribute("aria-hidden","true"),O.appendChild(R);let j=new Map;for(let G of l.value){let ae=K(G);j.has(ae)||(R.textContent=ae,j.set(ae,R.getComputedTextLength()))}if(typeof R.getBBox=="function"){R.setAttribute("dominant-baseline","middle"),R.setAttribute("y","0"),R.textContent="0";let G=-R.getBBox().y;G>0&&(d.value=G)}O.removeChild(R),g.value=j};Pe(l,v,{flush:"post"});let w=typeof document>"u"?void 0:document.fonts;et(()=>{var O;v(),(O=w==null?void 0:w.addEventListener)==null||O.call(w,"loadingdone",v)}),Tt(()=>{var O;(O=w==null?void 0:w.removeEventListener)==null||O.call(w,"loadingdone",v)});let S=H(()=>{let O=l.value,R=g.value;return $N({count:O.length,positionOf:_,widthOf:R?j=>R.get(K(O[j]))??0:void 0,width:a.value.width}).map(j=>({...j,value:O[j.index]}))}),y=O=>O.length?L(O.map((R,j)=>[_(j),u.value(R.y)]),i.curve):"",A=O=>{if(!O.length)return"";let R=O.map((G,ae)=>[_(ae),u.value(G.y)]),j=a.value.height-n.bottom;return`${L(R,i.curve)} L${R[R.length-1][0]},${j} L${R[0][0]},${j} Z`},L=(O,R)=>{if(!O.length)return"";if(O.length===1)return`M${O[0][0]},${O[0][1]}`;if(R==="linear")return O.map((ae,q)=>`${q===0?"M":"L"}${ae[0]},${ae[1]}`).join(" ");if(R==="step"){let ae=`M${O[0][0]},${O[0][1]}`;for(let q=1;q<O.length;q++){let[se,me]=O[q-1],[U,ve]=O[q],ce=(se+U)/2;ae+=` L${ce},${me} L${ce},${ve} L${U},${ve}`}return ae}let j=.2,G=`M${O[0][0]},${O[0][1]}`;for(let ae=0;ae<O.length-1;ae++){let q=O[ae-1]??O[ae],se=O[ae],me=O[ae+1],U=O[ae+2]??me,ve=se[0]+(me[0]-q[0])*j,ce=se[1]+(me[1]-q[1])*j,ge=me[0]-(U[0]-se[0])*j,ue=me[1]-(U[1]-se[1])*j;G+=` C${ve},${ce} ${ge},${ue} ${me[0]},${me[1]}`}return G},k=O=>Math.abs(O)>=1e3?`${(O/1e3).toFixed(1)}k`:Number.isInteger(O)?String(O):O.toFixed(1),V=O=>i.valueFormatter?i.valueFormatter(O):k(O),T=X(null),J=X({x:0,y:0}),x=O=>{let R=O.currentTarget.getBoundingClientRect(),j=O.clientX-R.left,G=l.value.length;if(!G)return;let ae=(j-n.left)/Math.max(1,f.value);T.value=Math.round(Math.min(1,Math.max(0,ae))*(G-1)),J.value={x:O.clientX-R.left+12,y:O.clientY-R.top+12}},N=H(()=>T.value===null?[]:s.value.map(O=>{let R=O.data[T.value];return{label:O.name,value:(R==null?void 0:R.label)??V((R==null?void 0:R.y)??0),color:O.color}}));return(O,R)=>(p(),le(r2,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":e.showLegend&&s.value.length>0},{legend:I(()=>[ee(F4,{items:s.value.map(j=>({label:j.name,color:j.color}))},null,8,["items"])]),default:I(()=>[M("div",{ref_key:"root",ref:r,class:"nb-line-chart"},[(p(),$("svg",{width:Y(a).width,height:Y(a).height,class:"nb-chart__svg",role:"img","aria-label":e.title||Y(t).chartLine,onMouseleave:R[0]||(R[0]=j=>T.value=null),onMousemove:x},[e.showGrid&&Y(a).width>0?(p(),$("g",LN,[(p(!0),$($e,null,Ue(c.value,j=>(p(),$("line",{key:`grid-${j}`,class:"nb-chart__gridline",x1:n.left,x2:Y(a).width-n.right,y1:u.value(j),y2:u.value(j)},null,8,EN))),128))])):P("",!0),M("g",xN,[(p(!0),$($e,null,Ue(c.value,j=>(p(),$("text",{key:`yt-${j}`,x:n.left-6,y:h(j),"text-anchor":"end","dominant-baseline":"middle"},K(V(j)),9,TN))),128))]),M("g",{ref_key:"xAxis",ref:m,class:"nb-chart__axis"},[(p(!0),$($e,null,Ue(S.value,(j,G)=>(p(),$("text",{key:`xt-${G}`,x:j.x,y:Y(a).height-n.bottom+14,"text-anchor":"middle"},K(j.value),9,HN))),128))],512),M("line",{class:"nb-chart__axis-line",x1:n.left,x2:Y(a).width-n.right,y1:Y(a).height-n.bottom,y2:Y(a).height-n.bottom},null,8,NN),(p(!0),$($e,null,Ue(s.value,(j,G)=>(p(),$("g",{key:`s-${G}`},[e.area?(p(),$("path",{key:0,class:"nb-chart__area",d:A(j.data),fill:j.color,opacity:"0.18"},null,8,PN)):P("",!0),M("path",{class:"nb-chart__line",d:y(j.data),stroke:j.color,fill:"none","stroke-width":"2","stroke-linejoin":"round","stroke-linecap":"round"},null,8,ON),e.points?(p(!0),$($e,{key:1},Ue(j.data,(ae,q)=>(p(),$("circle",{key:`p-${G}-${q}`,cx:_(q),cy:u.value(ae.y),r:T.value===q?4:3,fill:j.color,class:"nb-chart__point"},null,8,IN))),128)):P("",!0)]))),128)),T.value===null?P("",!0):(p(),$("line",{key:1,class:"nb-chart__hover-line",x1:_(T.value),x2:_(T.value),y1:n.top,y2:Y(a).height-n.bottom},null,8,RN))],40,MN)),ee(a2,{visible:e.showTooltip&&T.value!==null,x:J.value.x,y:J.value.y,title:T.value===null?"":String(l.value[T.value]),rows:N.value},null,8,["visible","x","y","title","rows"])],512)]),_:1},8,["title","subtitle","height","show-legend"]))}}),[["__scopeId","data-v-76b34be5"]]),Ia=Bc("scroll-lock",()=>({count:0,previousOverflow:""}));function _b(){typeof document>"u"||(Ia.count===0&&(Ia.previousOverflow=document.body.style.overflow,document.body.style.overflow="hidden"),Ia.count+=1)}function mb(){typeof document>"u"||Ia.count!==0&&(--Ia.count,Ia.count===0&&(document.body.style.overflow=Ia.previousOverflow))}var vb=zf.short,VN=["[data-nb-confirm-floating]",".nb-select__dropdown",".nb-menu",".nb-date-picker__calendar",".nb-user-menu__panel",".nb-sidebar-menu-item__flyout"],BN=new Set;function gb(e=[]){return[...VN,...BN,...e].map(t=>t.trim()).filter(Boolean).join(",")}function ZN(e,t){if(!e)return;let i=`${t?0:vb}ms`;e.style.transitionDuration=i;let n=e.parentElement;n instanceof HTMLElement&&(n.style.transitionDuration=i)}var FN=["role","aria-labelledby","aria-describedby","aria-busy"],zN={key:0,class:"nb-modal--header"},UN=["aria-label","disabled","aria-disabled"],WN=["tabindex","role","aria-labelledby"],m2=Je(Ne({__name:"Modal",props:{open:{type:Boolean,default:!1},title:{default:void 0},size:{default:VC.Medium},closeOnOverlay:{type:Boolean,default:!0},role:{default:"dialog"},labelledBy:{default:void 0},describedBy:{default:void 0},busy:{type:Boolean,default:!1},closeDisabled:{type:Boolean,default:!1},closeAppearance:{default:"corner"},closeOnEscape:{type:Boolean,default:!0},trapFocus:{type:Boolean,default:!0},initialFocus:{type:[String,Function],default:void 0},floatingSelectors:{default:void 0}},emits:["close"],setup(e,{expose:t,emit:i}){let n=ar(),r=e,a=i,s=vi(),l=H(()=>!!s.header||!!r.title),o=`nb-modal-title-${an()}`,u=X(null),c=X(null),{layerProps:d}=ua({overlay:!0});function h(){r.closeOnOverlay&&a("close")}function f(){var J;let T=r.initialFocus;return T?typeof T=="function"?T():((J=u.value)==null?void 0:J.querySelector(T))??null:null}WC({container:()=>u.value,active:()=>r.open&&r.trapFocus,initialFocus:f,floatingSelector:()=>gb(r.floatingSelectors)}),OL(()=>r.open);let _=!1;function m(){_||(_=!0,_b())}function g(){_&&(_=!1,mb())}let v=X(!1);function w(){let T=c.value;if(!T)return;let J=T.scrollHeight-T.clientHeight;!v.value&&J>4?v.value=!0:v.value&&J<=0&&(v.value=!1)}let S=null,y=null;function A(){let T=c.value;T&&(L(),typeof ResizeObserver<"u"&&(S=new ResizeObserver(()=>w()),S.observe(T)),typeof MutationObserver<"u"&&(y=new MutationObserver(()=>w()),y.observe(T,{childList:!0,subtree:!0,characterData:!0})),w())}function L(){S==null||S.disconnect(),S=null,y==null||y.disconnect(),y=null}Pe(()=>r.open,async T=>{T?m():g(),await wt(),T?A():(L(),v.value=!1)},{immediate:!0}),Hi(()=>{g(),L()});function k(){let T=u.value;if(!T)return!1;let J=Array.from(document.querySelectorAll('[aria-modal="true"]'));return J.length===0||J[J.length-1]===T}function V(T){T.key==="Escape"&&(T.defaultPrevented||!r.open||!r.closeOnEscape||r.closeDisabled||k()&&a("close"))}return et(()=>{document.addEventListener("keydown",V),r.open&&A()}),Hi(()=>{document.removeEventListener("keydown",V)}),t({dialogEl:()=>u.value,bodyEl:()=>c.value}),(T,J)=>(p(),le($r,{to:"body"},[ee(sa,{name:"nb-modal"},{default:I(()=>[e.open?(p(),$("div",{key:0,class:"nb-modal--overlay",onClick:Qe(h,["self"])},[M("div",yt({ref_key:"contentRef",ref:u,class:["nb-modal--content",`nb-modal--content--${e.size}`]},Y(d),{role:e.role,"aria-modal":"true","aria-labelledby":e.labelledBy??(l.value?o:void 0),"aria-describedby":e.describedBy,"aria-busy":e.busy?"true":void 0,tabindex:"-1",onClick:J[2]||(J[2]=Qe(()=>{},["stop"]))}),[l.value?(p(),$("header",zN,[M("span",{id:o,class:"nb-modal--title"},[Ae(T.$slots,"header",{},()=>[_e(K(e.title),1)],!0)]),e.closeAppearance==="button"?(p(),le(kt,{key:0,class:"nb-modal--close-button",size:"sm",variant:"ghost",icon:Y(ir),"aria-label":Y(n).modalClose,disabled:e.closeDisabled,onClick:J[0]||(J[0]=x=>a("close"))},null,8,["icon","aria-label","disabled"])):(p(),$("button",{key:1,class:"nb-modal--close","aria-label":Y(n).modalClose,disabled:e.closeDisabled,"aria-disabled":e.closeDisabled?"true":void 0,onClick:J[1]||(J[1]=x=>a("close"))},[ee(Ke,{name:Y(ir)},null,8,["name"])],8,UN))])):P("",!0),M("main",{ref_key:"bodyRef",ref:c,class:"nb-modal--body",tabindex:v.value?0:void 0,role:v.value?"region":void 0,"aria-labelledby":v.value?e.labelledBy??(l.value?o:void 0):void 0},[Ae(T.$slots,"default",{},void 0,!0)],8,WN),T.$slots.footer?(p(),le(Zi,{key:1,is:"footer",justify:"end",class:"nb-modal--footer",distributed:""},{default:I(()=>[Ae(T.$slots,"footer",{},void 0,!0)]),_:3})):P("",!0)],16,FN)])):P("",!0)]),_:3})]))}}),[["__scopeId","data-v-ea6f67ce"]]),jN={key:0,class:"nb-confirm__message"},KN={key:0,class:"nb-confirm__subject-kind"},qN={class:"nb-confirm__subject-name"},GN={key:1,class:"nb-confirm__gate"},YN={class:"nb-confirm__live"},XN={key:0,class:"nb-confirm__status",role:"status"},JN={key:1,class:"nb-confirm__status nb-confirm__status--success",role:"status"},QN=Je(Ne({__name:"Confirm",props:{open:{type:Boolean,default:!1},title:{},message:{default:void 0},subject:{default:void 0},subjectLabel:{default:void 0},confirmLabel:{default:"Confirm"},cancelLabel:{default:"Cancel"},tone:{default:"danger"},typeToConfirm:{default:void 0},typeToConfirmLabel:{default:void 0},typeToConfirmHelper:{default:void 0},busy:{type:Boolean,default:!1},busyLabel:{default:"Working"},succeeded:{type:Boolean,default:!1},successLabel:{default:void 0},error:{default:void 0},size:{default:"sm"},floatingSelectors:{default:()=>[]},contentClass:{default:void 0}},emits:["confirm","cancel"],setup(e,{expose:t,emit:i}){let n=e,r=i,a=an(),s=`nb-confirm-title-${a}`,l=`nb-confirm-body-${a}`,o=vi(),u=X(null),c=X(null),d=X(null),h=X(""),f=Ff(),_=H(()=>n.busy||n.succeeded);function m(){return!!n.message||!!n.subject||!!o.default}let g=H(()=>n.tone==="danger"?"danger":"primary"),v=H(()=>n.typeToConfirmLabel??`Type ${n.typeToConfirm} to confirm`),w=H(()=>!n.typeToConfirm||h.value.trim()===n.typeToConfirm),S=H(()=>w.value&&!_.value);function y(){S.value&&r("confirm")}function A(){var he;let W=(he=d.value)==null?void 0:he.$el;return W instanceof HTMLElement?W:null}function L(){var W;return((W=u.value)==null?void 0:W.closest('[role="dialog"],[role="alertdialog"]'))??null}function k(){return typeof document>"u"?[]:Array.from(document.querySelectorAll('[aria-modal="true"]'))}function V(){let W=L();if(!W)return!1;let he=k();return he.length===0||he[he.length-1]===W}let T=['a[href]:not([tabindex="-1"])','area[href]:not([tabindex="-1"])','button:not([disabled]):not([tabindex="-1"])','input:not([disabled]):not([type="hidden"]):not([tabindex="-1"])','select:not([disabled]):not([tabindex="-1"])','textarea:not([disabled]):not([tabindex="-1"])','summary:not([tabindex="-1"])','audio[controls]:not([tabindex="-1"])','video[controls]:not([tabindex="-1"])','iframe:not([tabindex="-1"])','[contenteditable]:not([contenteditable="false"]):not([tabindex="-1"])','[tabindex]:not([tabindex="-1"])'].map(W=>`${W}:not([hidden]):not([aria-hidden="true"])`).join(",");function J(){return gb(n.floatingSelectors)}function x(W){return W instanceof Element?!!W.closest(J()):!1}function N(W){let he=L();return!!he&&!!W&&he.contains(W)}function O(){let W=L();return W?Array.from(W.querySelectorAll(T)).filter(he=>he.getAttribute("aria-disabled")!=="true"):[]}function R(){let W=L();return W?(W.focus(),!0):!1}function j(){let W=O()[0];W?W.focus():R()}let G=null;function ae(){let W=G;G=null,W!=null&&W.isConnected&&W.focus()}function q(){ZN(L(),f.value)}Pe(f,()=>{n.open&&q()}),Pe(()=>[n.busy,n.error],async(W,he)=>{if(!n.open)return;let[te,be]=W,E=(he==null?void 0:he[0])??!1;if(await wt(),te){O().length===0&&R();return}if(E&&be){let ie=c.value;ie?ie.focus():j();return}let F=document.activeElement;!N(F)&&!x(F)&&j()}),Pe(()=>n.open,async W=>{var he;W?(G=document.activeElement instanceof HTMLElement?document.activeElement:null,h.value="",await wt(),q(),A()?(he=A())==null||he.focus():R()):ae()},{immediate:!0});function se(){_.value||r("cancel")}let me=!1,U=!1;function ve(W){let he=W.target;me=N(he)||x(he)}function ce(W){U=N(W.target)}function ge(){let W=me&&!U;me=!1,!W&&se()}function ue(W){if(!n.open||x(document.activeElement))return;if(W.key==="Escape"){if(!V())return;W.preventDefault(),W.stopPropagation(),W.stopImmediatePropagation(),se();return}if(W.key!=="Tab"||!V())return;let he=O();if(he.length===0){W.preventDefault(),N(document.activeElement)||R();return}let te=he[0],be=he[he.length-1],E=document.activeElement;W.shiftKey&&(E===te||!N(E))?(W.preventDefault(),be.focus()):!W.shiftKey&&E===be?(W.preventDefault(),te.focus()):N(E)||(W.preventDefault(),te.focus())}function pe(W){if(!n.open)return;let he=W.relatedTarget;if(he instanceof Element){if(N(he)||x(he))return}else if(he!==null)return;requestAnimationFrame(()=>{if(!n.open)return;let te=document.activeElement;N(te)||x(te)||te&&te!==document.body&&!te.isConnected||V()&&j()})}return typeof document<"u"&&(document.addEventListener("keydown",ue,!0),document.addEventListener("focusout",pe,!0),document.addEventListener("mousedown",ve,!0),document.addEventListener("touchstart",ve,!0),document.addEventListener("click",ce,!0)),et(()=>{var W;n.open&&(q(),A()?(W=A())==null||W.focus():R())}),Hi(()=>{typeof document<"u"&&(document.removeEventListener("keydown",ue,!0),document.removeEventListener("focusout",pe,!0),document.removeEventListener("mousedown",ve,!0),document.removeEventListener("touchstart",ve,!0),document.removeEventListener("click",ce,!0)),ae()}),t({focusCancel:()=>{var W;return(W=A())==null?void 0:W.focus()},restoreFocus:ae,isTopmost:V}),(W,he)=>(p(),le(m2,{open:e.open,size:e.size,role:e.tone==="danger"?"alertdialog":"dialog","labelled-by":s,"described-by":m()?l:void 0,busy:e.busy,"close-on-overlay":!_.value,"close-disabled":_.value,"close-on-escape":!1,"trap-focus":!1,onClose:ge},{header:I(()=>[M("span",{id:s,class:Te(["nb-confirm__heading",`nb-confirm__heading--${e.tone}`])},[e.tone==="danger"?(p(),le(Ke,{key:0,name:Y(cs),size:16,"aria-hidden":"true"},null,8,["name"])):P("",!0),M("span",null,K(e.title),1)],2)]),footer:I(()=>[ee(kt,{ref_key:"cancelRef",ref:d,class:"nb-confirm__action nb-confirm__action--cancel",variant:"ghost",size:"lg",disabled:_.value,"data-nb-confirm":"cancel",onClick:se},{default:I(()=>[_e(K(e.cancelLabel),1)]),_:1},8,["disabled"]),ee(kt,{class:"nb-confirm__action nb-confirm__action--confirm",variant:g.value,size:"lg",disabled:!S.value,loading:e.busy,"data-nb-confirm":"confirm",onClick:y},{default:I(()=>[_e(K(e.confirmLabel),1)]),_:1},8,["variant","disabled","loading"])]),default:I(()=>[M("div",{ref_key:"rootRef",ref:u,class:Te(["nb-confirm",e.contentClass])},[m()?(p(),$("div",{key:0,id:l,class:"nb-confirm__body"},[Ae(W.$slots,"default",{},()=>[e.message?(p(),$("p",jN,K(e.message),1)):P("",!0)],!0),e.subject?(p(),$("p",{key:0,class:Te(["nb-confirm__subject",`nb-confirm__subject--${e.tone}`])},[e.subjectLabel?(p(),$("span",KN,K(e.subjectLabel),1)):P("",!0),M("span",qN,K(e.subject),1)],2)):P("",!0)])):P("",!0),e.typeToConfirm?(p(),$("div",GN,[ee(pa,{modelValue:h.value,"onUpdate:modelValue":he[0]||(he[0]=te=>h.value=te),class:"nb-confirm__gate-field",label:v.value,helper:e.typeToConfirmHelper,disabled:_.value,autocomplete:"off",spellcheck:"false","data-nb-confirm":"gate",onKeydown:he[1]||(he[1]=Bi(Qe(()=>{},["prevent"]),["enter"]))},null,8,["modelValue","label","helper","disabled"])])):P("",!0),M("div",YN,[e.busy?(p(),$("p",XN,K(e.busyLabel),1)):P("",!0),e.succeeded&&e.successLabel?(p(),$("p",JN,[ee(Ke,{name:Y($n),size:"sm","aria-hidden":"true"},null,8,["name"]),M("span",null,K(e.successLabel),1)])):P("",!0),e.error?(p(),$("div",{key:2,ref_key:"errorRef",ref:c,class:"nb-confirm__error",tabindex:"-1"},[ee(_t,{variant:"error"},{default:I(()=>[_e(K(e.error),1)]),_:1})],512)):P("",!0)])],2)]),_:3},8,["open","size","role","described-by","busy","close-on-overlay","close-disabled"]))}}),[["__scopeId","data-v-50d0e1f8"]]),bb=Symbol.for("@nubisco/ui:shell-slots"),eP=0,yb=0;function ys(e,t={}){let i=At(bb,null),n=eP++,r=t.order??0,a=t.claim??"last",s=An(null),l=i?i.elementFor(e):s,o=H(()=>l.value!=null);i&&(i.register({id:n,name:e,order:r,claim:a,seq:yb++,deactivated:!1}),ff()&&Ko(()=>i.unregister(n)),Jt()&&(zv(()=>i.setActive(n,!1)),Fv(()=>i.setActive(n,!0))));let u=i?i.activeIds(e):H(()=>[]),c=H(()=>o.value&&u.value.includes(n));return{id:n,name:e,target:l,ready:o,active:c,Outlet:Ne({name:"NbShellSlotOutlet",inheritAttrs:!1,setup(d,{slots:h}){return()=>{var g;let f=l.value;if(!f||!c.value)return null;let _=((g=h.default)==null?void 0:g.call(h))??[],m=a==="all"?[He("div",{class:"nb-shell-slot-contribution",style:{display:"flex",alignItems:"inherit",gap:"inherit",order:r}},_)]:_;return He($r,{to:f,disabled:!1},{default:()=>m})}}})}}function tP(){let e=X([]),t=new Map,i=new Map;function n(a){let s=t.get(a);return s||(s=An(null),t.set(a,s)),s}function r(a){let s=i.get(a);return s||(s=H(()=>{let l=e.value.filter(o=>o.name===a&&!o.deactivated);if(l.length===0)return[];if(l.some(o=>o.claim==="last")){let o=l[0];for(let u of l)u.seq>o.seq&&(o=u);return[o.id]}return[...l].sort((o,u)=>o.order-u.order||o.seq-u.seq).map(o=>o.id)}),i.set(a,s)),s}return{registry:{register(a){e.value=[...e.value,a]},unregister(a){let s=e.value.filter(l=>l.id!==a);s.length!==e.value.length&&(e.value=s)},elementFor:n,activeIds:r,setActive(a,s){let l=e.value.find(o=>o.id===a);!l||l.deactivated===!s||(l.deactivated=!s,s&&(l.seq=yb++))}},count:a=>e.value.filter(s=>s.name===a&&!s.deactivated).length,sharedCount:a=>e.value.filter(s=>s.name===a&&!s.deactivated&&s.claim==="all").length,setElement:(a,s)=>{n(a).value=s}}}var iP=Symbol.for("@nubisco/ui:shell-layout"),nP=Ne({__name:"SurfaceLayerScope",props:{level:{}},setup(e){let t=e;return xi(o0,H(()=>Fa(t.level))),(i,n)=>Ae(i.$slots,"default")}}),rP=["href"],aP={class:"nb-shell__middle"},sP=["id","aria-label","tabindex","inert","aria-hidden"],lP={class:"nb-shell__sidebar-logo"},oP={class:"nb-shell__sidebar-header-action"},uP={key:1,class:"nb-shell__sidebar-logo"},cP={class:"nb-shell__sidebar-nav"},dP={class:"nb-shell__sidebar-bottom"},hP={class:"nb-shell__right"},fP={key:2,class:"nb-shell__menubar"},pP={key:3,class:"nb-shell__topbar"},_P=["aria-label","aria-expanded","aria-controls"],mP={class:"nb-shell__content-row"},vP=["inert","aria-hidden"],gP={class:"nb-shell__page"},bP=["aria-expanded"],yP={class:"nb-shell__contextbar-toggle-glyph","aria-hidden":"true"},wP={class:"nb-shell__main-row"},SP=["aria-label"],CP=["id"],kP=["aria-label","inert","aria-hidden"],AP=["aria-label"],$P=["aria-label","aria-valuenow","aria-valuemax"],MP="(pointer: coarse) and (hover: none) and (max-height: 500px)",LP='a[href], [role="menuitem"]',_o=288,EP=16,xP=64,TP=Je(Ne({__name:"Shell",props:{inspectorVisible:{type:Boolean,default:!1},inspectorExpanded:{type:Boolean,default:!1},inspectorSize:{default:"md"},resizable:{type:Boolean,default:!1},inspectorWidth:{},mainPadding:{type:Boolean,default:!0},routeTransition:{type:Boolean,default:!1},routeKey:{},sidebarVariant:{default:"compact"},sidebarHeaderActionPosition:{default:"end"},sidebarHeaderActionCompact:{default:"stack"},topbar:{default:"auto"},frame:{default:"attached"},skipToContent:{type:Boolean,default:!0},skipToContentLabel:{default:"Skip to content"},mainId:{},sidebarLabel:{default:"Primary"},inspectorLabel:{default:"Inspector"},contextbarLabel:{default:"Browse"},collapseAt:{default:"md"},sidebarOpen:{type:Boolean},navToggleLabel:{default:"Navigation"},inspectorCloseLabel:{default:"Close inspector"}},emits:["update:inspectorWidth","update:sidebarOpen","update:inspectorVisible"],setup(e,{expose:t,emit:i}){var so,ba;let n=vi();function r(Me){return Jf(n,Me)}let{registry:a,count:s,sharedCount:l,setElement:o}=tP();xi(bb,a);let u=new Map;function c(Me){let Fe=u.get(Me);return Fe||(Fe=Le=>o(Me,Le??null),u.set(Me,Fe)),Fe}function d(Me){return r(Me)||s(Me)>0}function h(Me){return l(Me)>0?"nb-shell__region--ordered":null}let f=H(()=>{for(let Me of["sidebar-logo","sidebar-nav","sidebar-bottom"])if(r(Me))return!0;return!1}),_=e,m=(so=Jt())==null?void 0:so.appContext.config.globalProperties,g=H(()=>{var Me;return _.routeKey===void 0?((Me=m==null?void 0:m.$route)==null?void 0:Me.path)??"":_.routeKey}),v=X(!1),w=i,S={md:672,lg:1056},y=X(typeof window<"u"?window.innerWidth:1/0);function A(Me){let Fe=S[_.collapseAt];return Fe!=null&&Me<Fe}let L=0;function k(){let Me=window.innerWidth;A(Me)!==A(y.value)&&(y.value=Me)}function V(){L||(L=window.requestAnimationFrame(()=>{L=0,y.value=window.innerWidth}))}function T(){typeof window>"u"||(window.removeEventListener("resize",V),L&&(L=(window.cancelAnimationFrame(L),0)))}function J(){typeof window>"u"||(y.value=window.innerWidth,window.addEventListener("resize",V,{passive:!0}))}let x=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(MP):null,N=X((x==null?void 0:x.matches)===!0);function O(Me){N.value=Me.matches}let R=H(()=>A(y.value)||_.collapseAt!=="none"&&N.value),j=((ba=Jt())==null?void 0:ba.vnode.props)??{};function G(Me,Fe){return Me in j||Fe in j}function ae(Me,Fe){if(Me in j)return j[Me];if(Fe in j)return j[Fe]}function q(Me,Fe){return G(Me,Fe)&&ae(Me,Fe)!==void 0}let se=q("sidebarOpen","sidebar-open"),me=X(!1);G("sidebarOpen","sidebar-open")&&!se&&Pe(()=>_.sidebarOpen,Me=>{me.value=Me===!0});let U=H(()=>se?_.sidebarOpen===!0:me.value),ve=an(),ce=H(()=>`nb-shell-sidebar-${ve}`),ge=X(null),ue=X(null),pe=H(()=>f.value&&R.value),W=H(()=>f.value&&R.value&&!U.value);function he(Me){se||(me.value=Me),w("update:sidebarOpen",Me)}function te(Me){if(!Me.defaultPrevented){if(f.value&&R.value&&U.value){he(!1);return}b.value&&C(!1)}}function be(Me,Fe){var lo,F2;let Le=Me.target,st=(lo=Le==null?void 0:Le.closest)==null?void 0:lo.call(Le,LP);if(!st||!(Fe!=null&&Fe.contains(st)))return!1;let $i=st.getAttribute("aria-haspopup");return!($i!=null&&$i!=="false"||st.hasAttribute("aria-expanded")||st.getAttribute("aria-disabled")==="true"||(F2=Le==null?void 0:Le.closest)!=null&&F2.call(Le,"[data-nb-keep-open]"))}function E(Me){!R.value||!U.value||be(Me,ue.value)&&he(!1)}function F(Me){!R.value||!v.value||be(Me,Me.currentTarget)&&(v.value=!1)}function ie(Me){v.value=Me}Pe(U,async Me=>{var Fe,Le,st,$i,lo;R.value&&(await wt(),Me?(st=(Le=((Fe=ue.value)==null?void 0:Fe.querySelector('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])'))??ue.value)==null?void 0:Le.focus)==null||st.call(Le):(lo=($i=ge.value)==null?void 0:$i.focus)==null||lo.call($i))}),Pe(R,Me=>{!Me&&U.value&&he(!1)});let fe=q("inspectorVisible","inspector-visible"),ne=X(_.inspectorVisible===!0);G("inspectorVisible","inspector-visible")&&!fe&&Pe(()=>_.inspectorVisible,Me=>{ne.value=Me===!0});let Z=X(!1),re=H(()=>(fe?_.inspectorVisible===!0:ne.value)?!(R.value&&Z.value):!1),b=H(()=>R.value&&re.value);function C(Me){fe?Z.value=!Me:(ne.value=Me,Z.value=!1),w("update:inspectorVisible",Me)}Pe(()=>_.inspectorVisible,Me=>{Me&&(Z.value=!1)}),Pe(R,Me=>{Me||(Z.value=!1)});let B=X(null),de=X(null);Pe(b,async Me=>{var Fe,Le,st;if(Me)de.value=document.activeElement??null,await wt(),(Le=(Fe=B.value)==null?void 0:Fe.focus)==null||Le.call(Fe);else{let $i=de.value;de.value=null,$i!=null&&$i.isConnected&&(await wt(),(st=$i.focus)==null||st.call($i))}}),Pe(b,Me=>{Me&&f.value&&U.value&&he(!1)});function z(){C(!1)}xi(iP,{collapsed:R,inspectorOverlay:b});let Q=H(()=>b.value),D=X(null),oe=an(),ye=H(()=>_.mainId||`nb-shell-main-${oe}`);function xe(){var Me;(Me=D.value)==null||Me.focus()}let we=H(()=>pe.value||_.topbar==="always"?!0:_.topbar==="never"?!1:r("topbar-left")||r("topbar-right")||s("topbar-left")>0||s("topbar-right")>0),{layerProps:Re}=ua(),{layerProps:Ge}=ua({level:0,probe:!1,provideContext:!1}),Ct=zf.medium,qt=X(_.sidebarVariant),Dt=H(()=>R.value&&r("sidebar-header-action")?"verbose":_.sidebarVariant),rt=X(null),Se,Ie=()=>typeof window>"u"||typeof window.matchMedia!="function"||Dc();Pe(()=>_.sidebarVariant,Me=>{if(clearTimeout(Se),Ie()||R.value){qt.value=Me,rt.value=null;return}if(Me==="verbose"){qt.value=Me,rt.value="expanding",Se=setTimeout(()=>{rt.value=null},Ct);return}rt.value="collapsing",Se=setTimeout(()=>{qt.value=Me,rt.value=null},Ct)}),Tt(()=>clearTimeout(Se));let Ze=H(()=>R.value&&r("sidebar-header-action")?"verbose":qt.value);xi("nb-shell-sidebar-variant",Ze);let at=H(()=>r("sidebar-header-action")&&!R.value);xi("nb-shell-sidebar-header-action-position",Lv(_,"sidebarHeaderActionPosition"));let ki=X(null),Pr=X(!1);et(()=>o("inspector",ki.value)),Pe(ki,Me=>o("inspector",Me));let ro={lg:.5,xl:.75},ao={xs:288,sm:360,md:560},En=H(()=>Number.isFinite(y.value)?y.value:1280),Ka=H(()=>Math.max(_o,En.value*.5));function ke(Me){return Math.round(Math.max(_o,Math.min(Me,Ka.value)))}let Ce=q("inspectorWidth","inspector-width"),De=X(null),qe=H(()=>Ce?_.inspectorWidth??null:De.value);function tt(Me){Ce||(De.value=Me),w("update:inspectorWidth",Me)}let Ai=H(()=>{let Me=qe.value;if(!(!_.resizable||!re.value||Me==null))return{"--nb-shell-inspector-width":`${ke(Me)}px`}}),ct=H(()=>{let Me=qe.value;if(Me!=null)return ke(Me);if(_.inspectorExpanded)return Math.round(En.value*.5);let Fe=ro[_.inspectorSize],Le=Fe==null?ao[_.inspectorSize]??_o:En.value*Fe;return Math.round(_.inspectorSize==="xl"?Le:Math.min(Le,Ka.value))}),Ni=H(()=>Math.round(Math.max(Ka.value,ct.value))),Wi=H(()=>ct.value);function O0(){return ct.value}function I0(Me){let Fe=ki.value;if(!Fe)return;let Le=Fe.getBoundingClientRect().right;tt(ke(Le-Me.clientX))}function ga(){Pr.value=!1,window.removeEventListener("pointermove",I0),window.removeEventListener("pointerup",ga),window.removeEventListener("pointercancel",ga)}function u1(Me){_.resizable&&(Me.preventDefault(),Pr.value=!0,window.addEventListener("pointermove",I0),window.addEventListener("pointerup",ga),window.addEventListener("pointercancel",ga))}function c1(){tt(null)}function d1(Me){if(!_.resizable)return;let Fe=Me.shiftKey?xP:EP,Le;switch(Me.key){case"ArrowLeft":Le=O0()+Fe;break;case"ArrowRight":Le=O0()-Fe;break;case"Home":Le=_o;break;case"End":Le=Ka.value;break;case"Enter":case" ":Le=null;break;default:return}Me.preventDefault(),tt(Le==null?null:ke(Le))}return et(()=>{var Me;typeof window>"u"||(y.value=window.innerWidth,window.addEventListener("resize",k,{passive:!0}),_.resizable&&J(),x&&(N.value=x.matches,typeof x.addEventListener=="function"?x.addEventListener("change",O):(Me=x.addListener)==null||Me.call(x,O)))}),Pe(()=>_.collapseAt,()=>{typeof window<"u"&&(y.value=window.innerWidth)}),Pe(()=>_.resizable,Me=>Me?J():T()),Tt(()=>{var Me;ga(),T(),typeof window<"u"&&window.removeEventListener("resize",k),x&&(typeof x.removeEventListener=="function"?x.removeEventListener("change",O):(Me=x.removeListener)==null||Me.call(x,O))}),t({mainEl:D,sidebarEl:ue,inspectorEl:ki,focusMain:()=>{var Me;return(Me=D.value)==null?void 0:Me.focus()},setSidebarOpen:he,setInspectorVisible:C,collapsed:R,inspectorOverlay:b,setContextbarOpen:ie}),(Me,Fe)=>(p(),$("div",yt({class:"nb-shell"},Y(Re),{class:[{"nb-shell--no-sidebar":!f.value},f.value?`nb-shell--sidebar-${Ze.value}`:null,{"nb-shell--rail-wide":f.value&&Dt.value==="verbose","nb-shell--detached":e.frame==="detached","nb-shell--collapsed":R.value,"nb-shell--drawer-open":R.value&&U.value,"nb-shell--rail-collapsing":rt.value==="collapsing","nb-shell--rail-expanding":rt.value==="expanding"}],onKeydown:Bi(te,["esc"])}),[e.skipToContent?(p(),$("a",{key:0,class:"nb-shell__skip-link",href:`#${ye.value}`,onClick:xe},K(e.skipToContentLabel),9,rP)):P("",!0),d("outer-menu")?(p(),$("div",{key:1,ref:c("outer-menu"),class:Te(["nb-shell__outer-menu",h("outer-menu")])},[Ae(Me.$slots,"outer-menu",{},void 0,!0)],2)):P("",!0),M("div",aP,[f.value?(p(),$("nav",{key:0,id:ce.value,ref_key:"sidebarRef",ref:ue,class:"nb-shell__sidebar","aria-label":e.sidebarLabel,tabindex:R.value?-1:void 0,inert:W.value||void 0,"aria-hidden":W.value||void 0,onClickCapture:E},[at.value?(p(),$("div",{key:0,class:Te(["nb-shell__sidebar-header",[`nb-shell__sidebar-header--${e.sidebarHeaderActionPosition}`,`nb-shell__sidebar-header--compact-${e.sidebarHeaderActionCompact}`]])},[M("div",lP,[Ae(Me.$slots,"sidebar-logo",{},void 0,!0)]),M("div",oP,[Ae(Me.$slots,"sidebar-header-action",{},void 0,!0)])],2)):(p(),$("div",uP,[Ae(Me.$slots,"sidebar-logo",{},void 0,!0)])),M("div",cP,[Ae(Me.$slots,"sidebar-nav",{},void 0,!0)]),Fe[4]||(Fe[4]=M("div",{class:"nb-shell__sidebar-spacer"},null,-1)),M("div",dP,[Ae(Me.$slots,"sidebar-bottom",{},void 0,!0)])],40,sP)):P("",!0),ee(sa,{name:"nb-shell-scrim"},{default:I(()=>[f.value&&R.value&&U.value?(p(),$("div",{key:0,class:"nb-shell__scrim",onClick:Fe[0]||(Fe[0]=Le=>he(!1))})):P("",!0)]),_:1}),M("div",hP,[d("inner-menu")?(p(),$("div",{key:0,ref:c("inner-menu"),class:Te(["nb-shell__inner-menu",h("inner-menu")])},[Ae(Me.$slots,"inner-menu",{},void 0,!0)],2)):P("",!0),d("notification")?(p(),$("div",{key:1,ref:c("notification"),class:Te(["nb-shell__notification",h("notification")])},[Ae(Me.$slots,"notification",{},void 0,!0)],2)):P("",!0),r("menubar")?(p(),$("div",fP,[Ae(Me.$slots,"menubar",{},void 0,!0)])):P("",!0),we.value?(p(),$("div",pP,[pe.value?(p(),$("button",{key:0,ref_key:"navToggleRef",ref:ge,type:"button",class:"nb-shell__nav-toggle","aria-label":e.navToggleLabel,"aria-expanded":U.value,"aria-controls":ce.value,onClick:Fe[1]||(Fe[1]=Le=>he(!U.value))},[...Fe[5]||(Fe[5]=[M("span",{class:"nb-shell__nav-toggle-glyph","aria-hidden":"true"},[M("span"),M("span"),M("span")],-1)])],8,_P)):P("",!0),M("div",{ref:c("topbar-left"),class:"nb-shell__topbar-left"},[Ae(Me.$slots,"topbar-left",{},void 0,!0)],512),M("div",{ref:c("topbar-right"),class:"nb-shell__topbar-right"},[Ae(Me.$slots,"topbar-right",{},void 0,!0)],512)])):P("",!0),M("div",mP,[M("div",{class:"nb-shell__body",inert:Q.value||void 0,"aria-hidden":Q.value||void 0},[M("div",gP,[d("fixedbar")?(p(),$("div",{key:0,ref:c("fixedbar"),class:"nb-shell__fixedbar"},[Ae(Me.$slots,"fixedbar",{},void 0,!0)],512)):P("",!0),R.value&&d("contextbar")?(p(),$("button",{key:1,type:"button",class:"nb-shell__contextbar-toggle","aria-expanded":v.value,onClick:Fe[2]||(Fe[2]=Le=>v.value=!v.value)},[M("span",null,K(e.contextbarLabel),1),M("span",yP,K(v.value?"▾":"▸"),1)],8,bP)):P("",!0),M("div",wP,[d("contextbar")?ut((p(),$("aside",{key:0,ref:c("contextbar"),class:Te(["nb-shell__contextbar",h("contextbar")]),"aria-label":e.contextbarLabel,onClickCapture:F},[Ae(Me.$slots,"contextbar",{},void 0,!0)],42,SP)),[[Tf,!R.value||v.value]]):P("",!0),M("main",yt({id:ye.value,ref_key:"mainRef",ref:D,tabindex:"-1",class:["nb-shell__main",{"nb-shell__main--no-padding":!e.mainPadding}]},Y(Ge)),[ee(nP,{level:1},{default:I(()=>[e.routeTransition?(p(),le(sa,{key:0,name:"nb-shell-route"},{default:I(()=>[(p(),$("div",{key:g.value,class:"nb-shell__route"},[Ae(Me.$slots,"default",{},void 0,!0)]))]),_:3})):Ae(Me.$slots,"default",{key:1},void 0,!0)]),_:3})],16,CP)])]),d("bottom")?(p(),$("div",{key:0,ref:c("bottom"),class:"nb-shell__bottom"},[Ae(Me.$slots,"bottom",{},void 0,!0)],512)):P("",!0)],8,vP),M("aside",{ref_key:"inspectorRef",ref:ki,class:Te(["nb-shell__inspector",{"nb-shell__inspector--visible":re.value,"nb-shell__inspector--expanded":re.value&&e.inspectorExpanded,[`nb-shell__inspector--${e.inspectorSize}`]:re.value,"nb-shell__inspector--resizing":Pr.value,"nb-shell__inspector--overlay":b.value}]),"aria-label":e.inspectorLabel,inert:!re.value||void 0,"aria-hidden":!re.value||void 0,style:ft(Ai.value)},[b.value?(p(),$("button",{key:0,ref_key:"inspectorDismissRef",ref:B,type:"button",class:"nb-shell__inspector-dismiss","aria-label":e.inspectorCloseLabel,onClick:Fe[3]||(Fe[3]=Le=>C(!1))},[...Fe[6]||(Fe[6]=[M("span",{class:"nb-shell__inspector-dismiss-glyph","aria-hidden":"true"},"×",-1)])],8,AP)):P("",!0),e.resizable&&re.value&&!R.value?(p(),$("div",{key:1,class:"nb-shell__inspector-resize",role:"separator",tabindex:"0","aria-orientation":"vertical","aria-label":`Resize ${e.inspectorLabel}`,"aria-valuenow":Wi.value,"aria-valuemin":_o,"aria-valuemax":Ni.value,title:"Drag or use the arrow keys to resize, Enter or double-click to reset",onPointerdown:u1,onDblclick:c1,onKeydown:d1},null,40,$P)):P("",!0),Ae(Me.$slots,"inspector",{overlay:b.value,close:z},void 0,!0)],14,kP)])])])],16))}}),[["__scopeId","data-v-5820928e"]]),HP={key:0,class:"nb-sidebar-brand__icon"},NP={key:1,class:"nb-sidebar-brand__text"},PP={class:"nb-sidebar-brand__title"},OP={key:0,class:"nb-sidebar-brand__subtitle"},IP=Je(Ne({__name:"SidebarBrand",props:{title:{},subtitle:{default:void 0},icon:{default:void 0}},setup(e){let t=At("nb-shell-sidebar-variant",X("verbose")),i=H(()=>t.value);return(n,r)=>(p(),$("div",{class:Te(["nb-sidebar-brand",[`nb-sidebar-brand--${i.value}`]])},[e.icon||n.$slots.icon?(p(),$("div",HP,[Ae(n.$slots,"icon",{},()=>[e.icon?(p(),le(Ke,{key:0,name:e.icon,size:24},null,8,["name"])):P("",!0)],!0)])):P("",!0),i.value==="verbose"?(p(),$("div",NP,[M("span",PP,K(e.title),1),e.subtitle?(p(),$("span",OP,K(e.subtitle),1)):P("",!0)])):P("",!0)],2))}}),[["__scopeId","data-v-56bc7d93"]]),RP=Ne({__name:"SidebarVariantScope",props:{variant:{}},setup(e){return xi("nb-shell-sidebar-variant",Lv(e,"variant")),(t,i)=>Ae(t.$slots,"default")}}),DP={class:"nb-sidebar-menu-item__label"},VP=["title"],BP={key:0,class:"nb-sidebar-menu-item__children",role:"group"},ZP={class:"nb-sidebar-menu-item__flyout-header"},FP={class:"nb-sidebar-menu-item__flyout-label"},zP=["aria-label"],wb=Je(Ne({__name:"SidebarMenuItem",props:{label:{},icon:{default:void 0},picture:{default:void 0},to:{default:void 0},href:{default:void 0},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},defaultExpanded:{type:Boolean,default:!1},badge:{default:void 0},badgeVariant:{default:"neutral"}},emits:["click"],setup(e,{emit:t}){let i=e,n=t,r=At("nb-shell-sidebar-variant",X("verbose")),a=H(()=>r.value),s=vi(),l=H(()=>{let ge=i.badge;if(ge===void 0)return;let ue=typeof ge=="number"?ge:Number(String(ge).trim());if(!(!Number.isFinite(ue)||String(ge).trim()===""))return ue>99?"99+":String(ue)}),o=H(()=>i.badge===void 0?i.label:`${i.label} (${i.badge})`),u=H(()=>{var ue;let ge=(ue=s.default)==null?void 0:ue.call(s);return ge?Xf(ge):!1}),c=X(i.defaultExpanded||i.active),d=Gf(),h=H(()=>{if(typeof i.to=="string")return i.to;if(i.href)return i.href}),f=H(()=>u.value),_=H(()=>i.to!=null&&!f.value&&!!d.value),m=H(()=>f.value?"button":_.value?d.value:h.value?"a":"button"),g=H(()=>m.value==="a"?{href:h.value}:{});function v(ge){if(i.disabled){ge.preventDefault();return}if(f.value&&a.value==="verbose"){c.value=!c.value;return}f.value&&a.value==="compact"&&q(ge),n("click",ge)}let w=X(null),S=X(null),y=X(!1),A=X(!1),L=X({}),k=null;function V(){if(a.value!=="compact")return;k&&(k=(clearTimeout(k),null));let ge=R();if(!ge)return;let ue=ge.getBoundingClientRect();L.value={top:`${ue.top}px`,left:`${ue.right+8}px`},y.value=!0}function T(){A.value||(k&&clearTimeout(k),k=setTimeout(()=>{y.value=!1,k=null},120))}function J(){V()}function x(){T()}function N(){k&&(k=(clearTimeout(k),null))}function O(){T()}function R(){let ge=w.value;return ge?ge instanceof HTMLElement?ge:ge.$el??null:null}function j(ge=!1){var ue;k&&(k=(clearTimeout(k),null)),y.value=!1,A.value=!1,ge&&((ue=R())==null||ue.focus())}function G(){let ge=S.value;return ge?Array.from(ge.querySelectorAll('[role="menuitem"]')).filter(ue=>!ue.hasAttribute("disabled")&&ue.getAttribute("aria-disabled")!=="true"&&!ue.closest('[style*="display: none"]')):[]}async function ae(ge){var ue;V(),A.value=!0,ge&&(await wt(),(ue=G()[0])==null||ue.focus())}function q(ge){if(y.value&&A.value){j();return}ae(ge.detail===0)}function se(ge){!f.value||a.value!=="compact"||(ge.key==="ArrowRight"||ge.key==="ArrowDown"?(ge.preventDefault(),ae(!0)):ge.key==="Escape"&&y.value&&(ge.preventDefault(),j(!0)))}function me(ge){var W,he,te,be;let ue=G(),pe=ue.indexOf(document.activeElement);switch(ge.key){case"Escape":case"ArrowLeft":ge.preventDefault(),ge.stopPropagation(),j(!0);return;case"ArrowDown":ge.preventDefault(),(W=ue[(pe+1)%ue.length])==null||W.focus();return;case"ArrowUp":ge.preventDefault(),(he=ue[(pe-1+ue.length)%ue.length])==null||he.focus();return;case"Home":ge.preventDefault(),(te=ue[0])==null||te.focus();return;case"End":ge.preventDefault(),(be=ue[ue.length-1])==null||be.focus();return;case"Tab":j(!0);return}}function U(ge){var pe,W;let ue=ge.relatedTarget;ue&&((pe=S.value)!=null&&pe.contains(ue)||(W=R())!=null&&W.contains(ue)||j())}function ve(ge){var pe;let ue=(pe=ge.target)==null?void 0:pe.closest('[role="menuitem"]');ue&&!ue.hasAttribute("aria-expanded")&&j()}function ce(ge){var pe,W;let ue=ge.target;ue&&((pe=S.value)!=null&&pe.contains(ue)||(W=R())!=null&&W.contains(ue)||j())}return Pe(y,ge=>{typeof document>"u"||(ge?document.addEventListener("pointerdown",ce,!0):document.removeEventListener("pointerdown",ce,!0))}),Pe(a,()=>j()),Tt(()=>{k&&clearTimeout(k),typeof document<"u"&&document.removeEventListener("pointerdown",ce,!0)}),(ge,ue)=>(p(),$("li",{class:Te(["nb-sidebar-menu-item",[`nb-sidebar-menu-item--${a.value}`]]),role:"none",onMouseenter:J,onMouseleave:x},[(p(),le(mi(m.value),yt({ref_key:"rowRef",ref:w,class:["nb-sidebar-menu-item__row",{"nb-sidebar-menu-item__row--active":e.active,"nb-sidebar-menu-item__row--disabled":e.disabled,"nb-sidebar-menu-item__row--expandable":u.value&&a.value==="verbose","nb-sidebar-menu-item__row--compact":a.value==="compact"}],type:m.value==="button"?"button":void 0,to:_.value?e.to:void 0},g.value,{disabled:m.value==="button"&&!u.value&&e.disabled||void 0,"aria-disabled":e.disabled||void 0,"aria-expanded":u.value?a.value==="verbose"?c.value:y.value:void 0,"aria-haspopup":u.value&&a.value==="compact"?"menu":void 0,"aria-label":a.value==="compact"?o.value:void 0,role:"menuitem",onClick:v,onKeydown:se}),{default:I(()=>[e.picture===void 0?e.icon?(p(),le(Ke,{key:1,class:"nb-sidebar-menu-item__icon",name:e.icon,size:a.value==="compact"?18:16},null,8,["name","size"])):P("",!0):(p(),le(qu,{key:0,class:"nb-sidebar-menu-item__icon nb-sidebar-menu-item__picture",name:e.label,picture:e.picture,size:a.value==="compact"?18:16,decorative:""},null,8,["name","picture","size"])),a.value==="verbose"?(p(),$($e,{key:2},[M("span",DP,K(e.label),1),e.badge===void 0?P("",!0):(p(),$("span",{key:0,class:Te(["nb-sidebar-menu-item__badge",[`nb-sidebar-menu-item__badge--${e.badgeVariant}`]])},K(e.badge),3)),u.value?(p(),le(Ke,{key:1,class:Te(["nb-sidebar-menu-item__caret",{"nb-sidebar-menu-item__caret--expanded":c.value}]),name:Y(c0),size:"sm"},null,8,["class","name"])):P("",!0)],64)):l.value===void 0?e.badge===void 0?P("",!0):(p(),$("span",{key:4,class:Te(["nb-sidebar-menu-item__badge-dot",[`nb-sidebar-menu-item__badge-dot--${e.badgeVariant}`]]),title:String(e.badge)},null,10,VP)):(p(),$("span",{key:3,class:Te(["nb-sidebar-menu-item__badge-count",[`nb-sidebar-menu-item__badge-count--${e.badgeVariant}`]]),"aria-hidden":"true"},K(l.value),3))]),_:1},16,["class","type","to","disabled","aria-disabled","aria-expanded","aria-haspopup","aria-label"])),u.value&&a.value==="verbose"?ut((p(),$("ul",BP,[Ae(ge.$slots,"default",{},void 0,!0)],512)),[[Tf,c.value]]):P("",!0),a.value==="compact"&&y.value?(p(),le($r,{key:1,to:"body"},[M("div",{ref_key:"flyoutRef",ref:S,class:"nb-sidebar-menu-item__flyout",style:ft(L.value),onMouseenter:N,onMouseleave:O,onKeydown:me,onFocusout:U,onClick:ve},[M("div",ZP,[M("span",FP,K(e.label),1),e.badge===void 0?P("",!0):(p(),$("span",{key:0,class:Te(["nb-sidebar-menu-item__badge",[`nb-sidebar-menu-item__badge--${e.badgeVariant}`]])},K(e.badge),3))]),u.value?(p(),le(RP,{key:0,variant:"verbose"},{default:I(()=>[M("ul",{class:"nb-sidebar-menu-item__flyout-children",role:"menu","aria-label":e.label},[Ae(ge.$slots,"default",{},void 0,!0)],8,zP)]),_:3})):P("",!0)],36)])):P("",!0)],34))}}),[["__scopeId","data-v-8d63e3c1"]]);const Qs=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},UP=Qs("sidebar-simple","0 0 256 256",'<path d="M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,200V56a4,4,0,0,1,4-4H84V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H92V52H216a4,4,0,0,1,4,4Z"/>'),WP=Qs("sidebar-simple","0 0 256 256",'<path d="M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,200V56a2,2,0,0,1,2-2H82V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H94V54H216a2,2,0,0,1,2,2Z"/>'),C8=Qs("sidebar-simple","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"/>'),jP=Qs("sidebar-simple","0 0 256 256",'<path d="M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z"/>'),KP=Qs("sidebar-simple","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z"/>'),qP=Qs("sidebar-simple","0 0 256 256",'<path d="M88,48V208H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8Z" opacity="0.2"/><path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"/>'),GP="sidebar-simple",YP=Object.freeze(Object.defineProperty({__proto__:null,bold:jP,default:C8,duotone:qP,fill:KP,glyphName:GP,light:WP,regular:C8,thin:UP},Symbol.toStringTag,{value:"Module"}));var XP=["aria-label","aria-expanded"],JP=Je(Ne({__name:"SidebarHeaderToggle",props:{collapseLabel:{default:void 0},expandLabel:{default:void 0},icon:{default:void 0}},emits:["toggle"],setup(e,{emit:t}){let i=e,n=t,r=At("nb-shell-sidebar-variant",X("verbose")),a=At("nb-shell-sidebar-header-action-position",X("end")),s=H(()=>r.value==="compact"),l=H(()=>a.value==="edge"),o=H(()=>i.icon?i.icon:l.value?s.value?V4:FL:YP),u={en:{COLLAPSE:"Collapse sidebar",EXPAND:"Expand sidebar"},pt:{COLLAPSE:"Recolher barra lateral",EXPAND:"Expandir barra lateral"}};function c(){try{return fb({useScope:"global"})}catch{return null}}let d=c();function h(_){var g;let m=`sidebarCollapseToggle.${_}`;return d!=null&&d.te(m)?d.t(m):((g=u[String((d==null?void 0:d.locale.value)??"en").toLowerCase().split("-")[0]])==null?void 0:g[_])??u.en[_]}let f=H(()=>s.value?i.expandLabel??h("EXPAND"):i.collapseLabel??h("COLLAPSE"));return(_,m)=>{let g=Ln("nb-tooltip");return ut((p(),$("button",{type:"button",class:Te(["nb-sidebar-header-toggle",{"nb-sidebar-header-toggle--edge":l.value}]),"aria-label":f.value,"aria-expanded":!s.value,onClick:m[0]||(m[0]=v=>n("toggle"))},[ee(Ke,{name:o.value,size:l.value?16:18},null,8,["name","size"])],10,XP)),[[g,{body:f.value,aria:"none",position:"right"}]])}}}),[["__scopeId","data-v-84ba2aa1"]]),Sb=Je(Ne({__name:"SidebarMenu",props:{density:{default:"comfortable"}},setup(e){return(t,i)=>(p(),$("ul",{class:Te(["nb-sidebar-menu",[`nb-sidebar-menu--${e.density}`]]),role:"menu"},[Ae(t.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-0f64e16c"]]),QP=["aria-label"],eO={key:0,class:"nb-sidebar-status__label"},tO=Je(Ne({__name:"SidebarStatus",props:{label:{},status:{default:"neutral"}},setup(e){let t=At("nb-shell-sidebar-variant",X("verbose")),i=H(()=>t.value==="compact");return(n,r)=>{let a=Ln("nb-tooltip");return ut((p(),$("div",{class:Te(["nb-sidebar-status",[`nb-sidebar-status--${e.status}`,{"nb-sidebar-status--compact":i.value}]]),role:"status","aria-label":e.label},[r[0]||(r[0]=M("span",{class:"nb-sidebar-status__dot","aria-hidden":"true"},null,-1)),i.value?P("",!0):(p(),$("span",eO,K(e.label),1))],10,QP)),[[a,{body:i.value?e.label:null,aria:"none",position:"right"}]])}}}),[["__scopeId","data-v-d261bc19"]]),iO=["role","aria-live"],nO={class:"nb-toast__icon"},rO={class:"nb-toast__body"},aO={key:0,class:"nb-toast__status"},sO={key:1,class:"nb-toast__title"},lO={class:"nb-toast__message"},oO=["aria-label"],uO=Je(Ne({__name:"Toast",props:{variant:{default:"info"},title:{default:void 0},message:{},duration:{default:4e3},cta:{default:void 0},role:{default:"alert"},ariaLive:{default:void 0},statusLabel:{default:void 0},closeLabel:{default:"Close"},managed:{type:Boolean,default:!1},paused:{type:Boolean,default:!1},cycle:{default:0}},emits:["close","action"],setup(e,{emit:t}){let i=e,n=t,r=X(!1),a=H(()=>i.managed?i.paused:r.value),s={success:Bs,error:Rs,warning:zc,info:Zc},l={success:"Success",error:"Error",warning:"Warning",info:"Information"},o=H(()=>i.statusLabel===void 0?l[i.variant]:i.statusLabel),u=H(()=>i.ariaLive??(i.variant==="error"?"assertive":"polite")),c=null,d=i.duration??0,h=0;function f(){i.managed||!d||(h=Date.now(),c=setTimeout(()=>n("close"),d))}function _(){i.managed||g()}function m(){i.managed||v()}function g(){!d||r.value||(r.value=!0,c&&clearTimeout(c),d-=Date.now()-h)}function v(){!d||!r.value||(r.value=!1,f())}return et(f),Hi(()=>{c&&clearTimeout(c)}),Pe(()=>i.duration,w=>{c&&clearTimeout(c),d=w??0,f()}),(w,S)=>(p(),$("div",{class:Te(["nb-toast",`nb-toast--${e.variant}`]),role:e.role,"aria-live":u.value,onMouseenter:_,onMouseleave:m},[M("div",nO,[ee(Ke,{name:s[e.variant],size:16},null,8,["name"])]),M("div",rO,[o.value?(p(),$("span",aO,K(o.value),1)):P("",!0),e.title?(p(),$("p",sO,K(e.title),1)):P("",!0),M("p",lO,K(e.message),1),e.cta?(p(),$("button",{key:2,class:"nb-toast__cta",type:"button",onClick:S[0]||(S[0]=()=>{e.cta&&e.cta.action(),n("action"),n("close")})},K(e.cta.label),1)):P("",!0)]),M("button",{class:"nb-toast__close",type:"button","aria-label":e.closeLabel,onClick:S[1]||(S[1]=y=>n("close"))},[ee(Ke,{name:Y(ir),size:"sm"},null,8,["name"])],8,oO),e.duration?(p(),$("div",{key:e.cycle,class:"nb-toast__progress",style:ft({animationDuration:`${e.duration}ms`,animationPlayState:a.value?"paused":"running"})},null,4)):P("",!0)],42,iO))}}),[["__scopeId","data-v-eeb6a74f"]]),cO={success:4e3,info:6e3,warning:8e3,error:0},dO=0;function hO(e={}){let t=X(e.max??3),i={...cO,...e.durations},n=ar(),r=e.statusLabels??{},a=(q,se)=>r[q]??n.value[se],s={status:{get success(){return a("success","toastSuccess")},get error(){return a("error","toastError")},get warning(){return a("warning","toastWarning")},get info(){return a("info","toastInfo")}},close:e.closeLabel??"Close"},l=X([]),o=X(!1),u=new Map,c=H(()=>l.value),d=H(()=>l.value.filter(q=>q.visible)),h=H(()=>l.value.filter(q=>!q.visible));function f(q){return l.value.find(se=>se.id===q)}function _(q){let se=u.get(q);se!=null&&se.timer&&clearTimeout(se.timer),u.delete(q)}function m(q){let se=u.get(q.id);!se||se.remaining<=0||o.value||(se.startedAt=Date.now(),se.timer=setTimeout(()=>x(q.id,"timeout"),se.remaining))}function g(q){_(q.id),q.cycle+=1,!(q.duration<=0)&&(u.set(q.id,{timer:null,remaining:q.duration,startedAt:Date.now()}),m(q))}function v(q){q.visible=!0,g(q)}function w(q,se){if(q)try{q(se)}catch(me){console.error("[NbToaster] onDismiss threw",me)}}function S(q,se){_(q);let me=l.value.findIndex(ve=>ve.id===q);if(me===-1)return;let[U]=l.value.splice(me,1);w(U.onDismiss,se)}function y(){for(let q of[...l.value]){if(q.visible)continue;if(d.value.length<t.value){v(q);continue}if(d.value.some(me=>me.duration>0))break;let se=d.value[0];if(!se)break;S(se.id,"replaced"),v(q)}}function A(q,se){se.message!==void 0&&(q.message=se.message),se.title!==void 0&&(q.title=se.title),se.cta!==void 0&&(q.cta=se.cta),se.key!==void 0&&(q.key=se.key),se.retain!==void 0&&(q.retain=se.retain),se.variant!==void 0&&(q.variant=se.variant),se.duration===void 0?se.variant!==void 0&&(q.duration=k(se.variant,q.cta)):q.duration=se.duration,q.visible&&g(q)}function L(q){return{id:q,update:se=>J(q,se),dismiss:(se="user")=>x(q,se),isActive:()=>f(q)!==void 0}}function k(q,se){return se?0:i[q]}function V(q,se){let me=q.onDismiss;q.onDismiss=void 0,me&&me!==se.onDismiss&&w(me,"replaced"),q.onDismiss=se.onDismiss;let U=se.variant??"info";q.title=se.title,q.cta=se.cta,q.retain=se.retain,q.variant=U,q.message=se.message,q.duration=se.duration??k(U,se.cta),q.visible&&g(q)}function T(q){if(q.key){let U=l.value.find(ve=>ve.key===q.key);if(U)return V(U,q),L(U.id)}let se=q.variant??"info",me={...q,id:`nb-toast-${++dO}`,variant:se,duration:q.duration??k(se,q.cta),visible:!1,cycle:0};return l.value.push(me),y(),L(me.id)}function J(q,se){let me=f(q);me&&A(me,se)}function x(q,se="user"){S(q,se),y()}function N(q="cleared"){for(let se of[...l.value])S(se.id,q)}function O(q="navigated"){for(let se of[...l.value])se.retain||S(se.id,q);y()}function R(){if(o.value)return;o.value=!0;let q=Date.now();for(let se of u.values())se.timer&&(clearTimeout(se.timer),se.timer=null,se.remaining=Math.max(0,se.remaining-(q-se.startedAt)))}function j(){if(o.value){o.value=!1;for(let q of d.value)m(q)}}function G(q){let se=u.get(q);return se?o.value||!se.timer?se.remaining:Math.max(0,se.remaining-(Date.now()-se.startedAt)):0}let ae=q=>(se,me={})=>T({...me,message:se,variant:q});return{items:c,visible:d,pending:h,paused:o,max:t,labels:s,push:T,info:ae("info"),success:ae("success"),warning:ae("warning"),error:ae("error"),update:J,dismiss:x,dismissAll:N,dismissTransient:O,pause:R,resume:j,remaining:G}}var J0=Bc("toast-queue.default",()=>({queue:null})),Cb=Symbol.for("@nubisco/ui:toast-queue");function Gc(){if(Jt()){let e=At(Cb,null);if(e)return e}return J0.queue||(J0.queue=hO()),J0.queue}var fO={class:"nb-toaster__announcer"},pO={role:"status","aria-live":"polite","aria-atomic":"true"},_O={role:"alert","aria-live":"assertive","aria-atomic":"true"},mO=["aria-label","data-paused"],vO=["data-toast-id"],D1=new Map;function k8(e,t){let i=(D1.get(e)??0)+t;i<=0?D1.delete(e):D1.set(e,i),!(t<0||i<2)&&(typeof process<"u"||console.warn("[NbToaster] Two hosts are rendering the same queue. Every toast will be shown and announced twice, and both hosts write to queue.max. Mount one NbToaster per application, and give any second host (a demo, a dialog) its own createToastQueue()."))}var gO=Je(Ne({__name:"Toaster",props:{queue:{default:void 0},placement:{default:"bottom-end"},max:{default:void 0},label:{default:"Notifications"},to:{type:[String,Boolean],default:"body"},hotkey:{default:"alt+t"},hotkeyHint:{default:"Press Alt plus T to reach it."}},setup(e,{expose:t}){let i=e,n=At(Cb,null),r=H(()=>i.queue??n??Gc()),a=H(()=>r.value.visible.value),s=H(()=>[...a.value].reverse()),l=X(null),o=H(()=>i.to===!1?"body":i.to),u=null;function c(){u&&(u.queue.max.value=u.previous),u=null}Pe([r,()=>i.max],([ue,pe])=>{u&&(u.queue!==ue||pe===void 0)&&c(),pe!==void 0&&(u||(u={queue:ue,previous:ue.max.value}),ue.max.value=pe)},{immediate:!0});let d=null;function h(ue){d!==ue&&(d&&k8(d,-1),d=ue,ue&&k8(ue,1))}Pe(r,ue=>{d&&h(ue)});function f(ue){return ue.variant==="error"||ue.variant==="warning"}let _=X(""),m=X(""),g={polite:{text:_,buffer:[],draining:!1,handle:null},assertive:{text:m,buffer:[],draining:!1,handle:null}};function v(ue){let pe=[r.value.labels.status[ue.variant],ue.title,ue.message].filter(Boolean).join(". ");if(!ue.cta)return pe;let W=i.hotkey?` ${i.hotkeyHint}`:"";return`${pe}. ${ue.cta.label} action available.${W}`}async function w(ue){let pe=ue.buffer.shift();if(pe===void 0){ue.draining=!1;return}ue.draining=!0,ue.text.value="",await wt(),ue.text.value=pe,ue.handle=setTimeout(()=>{ue.handle=null,w(ue)},500)}function S(ue){let pe=g[f(ue)?"assertive":"polite"];pe.buffer.push(v(ue)),pe.draining||w(pe)}Tt(()=>{for(let ue of Object.values(g))ue.handle&&clearTimeout(ue.handle),ue.handle=null,ue.buffer.length=0,ue.draining=!1});let y=new Set;Pe(a,ue=>{let pe=new Set(ue.map(W=>W.id));for(let W of[...y])pe.has(W.slice(0,W.lastIndexOf(":")))||y.delete(W);for(let W of ue){let he=`${W.id}:${W.cycle}`;y.has(he)||(y.add(he),S(W))}},{deep:!0,immediate:!0});let A=new Set,L=!1;function k(ue){A.size===0&&(L=r.value.paused.value),A.add(ue),r.value.pause()}function V(ue){A.delete(ue)&&A.size===0&&!L&&r.value.resume()}let T=null;function J(ue){var W;let pe=ue.target;!pe||pe===document.body||(W=l.value)!=null&&W.contains(pe)||(T=pe)}function x(){k("focus")}function N(ue){var W;let pe=ue.relatedTarget;pe&&((W=l.value)!=null&&W.contains(pe))||V("focus")}function O(ue){var W,he,te;if(ue.key!=="Escape")return;let pe=((he=(W=document.activeElement)==null?void 0:W.closest(".nb-toaster__item"))==null?void 0:he.dataset.toastId)??((te=s.value[0])==null?void 0:te.id);pe&&(ue.stopPropagation(),ue.preventDefault(),q(pe))}let R=["button:not([disabled])","[href]",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function j(ue){var pe;return((pe=l.value)==null?void 0:pe.querySelector(`[data-toast-id="${ue}"]`))??null}function G(ue){let pe=j(ue);return pe?pe.matches(R)?pe:pe.querySelector(R):null}let ae=new Set;Pe(a,(ue,pe)=>{var fe,ne;if(!pe)return;let W=document.activeElement;if(!W||!((fe=l.value)!=null&&fe.contains(W)))return;let he=(ne=W.closest("[data-toast-id]"))==null?void 0:ne.dataset.toastId;if(!he||ue.some(Z=>Z.id===he))return;let te=[...pe].reverse().map(Z=>Z.id),be=new Set(ue.map(Z=>Z.id)),E=te.indexOf(he),F;for(let Z=E+1;Z<te.length&&!F;Z+=1)be.has(te[Z])&&(F=te[Z]);for(let Z=E-1;Z>=0&&!F;--Z)be.has(te[Z])&&(F=te[Z]);let ie=T;wt(()=>{let Z=F?G(F):null;if(Z){Z.focus();return}ie!=null&&ie.isConnected&&ie.focus(),T=null})});function q(ue,pe){r.value.dismiss(ue,pe??(ae.has(ue)?"action":"user")),ae.delete(ue)}let se={space:"Space",enter:"Enter",escape:"Escape",comma:"Comma",period:"Period",slash:"Slash",backslash:"Backslash",backquote:"Backquote",minus:"Minus",equal:"Equal"};function me(ue){return/^[a-z]$/.test(ue)?`Key${ue.toUpperCase()}`:/^[0-9]$/.test(ue)?`Digit${ue}`:se[ue]??null}function U(ue){if(!i.hotkey)return!1;let pe=i.hotkey.toLowerCase().split("+"),W=pe[pe.length-1],he=me(W);if(he?ue.code!==he:ue.key.toLowerCase()!==W)return!1;let te=be=>pe.includes(be);return ue.altKey===te("alt")&&ue.ctrlKey===te("ctrl")&&ue.shiftKey===te("shift")&&ue.metaKey===te("meta")}function ve(){let ue=document.querySelectorAll('[aria-modal="true"]');for(let pe of ue)if(!(l.value&&pe.contains(l.value)))return pe;return null}function ce(ue){var W,he;if(!U(ue)||s.value.length===0)return;if((W=l.value)!=null&&W.contains(document.activeElement)){ue.preventDefault(),T!=null&&T.isConnected?T.focus():(he=document.activeElement)==null||he.blur();return}if(ve())return;let pe=G(s.value[0].id);pe&&(ue.preventDefault(),pe.focus())}function ge(){document.visibilityState==="hidden"?k("hidden"):V("hidden")}return et(()=>{h(r.value),ge(),document.addEventListener("visibilitychange",ge),document.addEventListener("focusin",J),document.addEventListener("keydown",ce)}),Tt(()=>{document.removeEventListener("visibilitychange",ge),document.removeEventListener("focusin",J),document.removeEventListener("keydown",ce);let ue=A.size>0&&!L;A.clear(),ue&&r.value.resume(),h(null),c()}),Pe(()=>a.value.length,ue=>{if(ue>0)return;let pe=A.delete("pointer"),W=A.delete("focus");!pe&&!W||A.size===0&&!L&&r.value.resume()}),t({queue:r}),(ue,pe)=>(p(),le($r,{to:o.value,disabled:i.to===!1},[M("div",fO,[M("div",pO,K(_.value),1),M("div",_O,K(m.value),1)]),a.value.length>0?(p(),$("div",{key:0,ref_key:"regionRef",ref:l,class:Te(["nb-toaster",`nb-toaster--${i.placement}`]),role:"region","aria-label":i.label,"data-paused":r.value.paused.value?"true":void 0,onMouseenter:pe[0]||(pe[0]=W=>k("pointer")),onMouseleave:pe[1]||(pe[1]=W=>V("pointer")),onFocusin:x,onFocusout:N,onKeydown:O},[ee(F7,{tag:"div",class:"nb-toaster__stack",name:"nb-toaster"},{default:I(()=>[(p(!0),$($e,null,Ue(s.value,W=>(p(),$("div",{key:W.id,class:"nb-toaster__item","data-toast-id":W.id},[Ae(ue.$slots,"toast",{toast:W,paused:r.value.paused.value,dismiss:he=>q(W.id,he),action:()=>Y(ae).add(W.id)},()=>[ee(uO,{message:W.message,title:W.title,variant:W.variant,cta:W.cta,duration:W.duration,cycle:W.cycle,managed:"",paused:r.value.paused.value,role:"none","aria-live":"off","status-label":r.value.labels.status[W.variant],"close-label":r.value.labels.close,onAction:he=>Y(ae).add(W.id),onClose:he=>q(W.id)},null,8,["message","title","variant","cta","duration","cycle","paused","status-label","close-label","onAction","onClose"])],!0)],8,vO))),128))]),_:3})],42,mO)):P("",!0)],8,["to","disabled"]))}}),[["__scopeId","data-v-580432ae"]]),kb=function(e){return e.Small="sm",e.Medium="md",e}(kb||{}),La=function(e){return e.Active="active",e.Finished="finished",e.Error="error",e}(La||{}),bO={key:0,class:"nb-progress-bar__header"},yO=["aria-label","aria-valuemax","aria-valuenow"],Ab=Je(Ne({__name:"ProgressBar",props:{value:{default:void 0},max:{default:100},helper:{default:void 0},size:{default:kb.Medium},status:{default:La.Active},hideLabel:{type:Boolean,default:!1},id:{default:"progress-bar"},label:{}},setup(e){let t=e,i=H(()=>t.value==null&&t.status===La.Active),n=H(()=>t.status===La.Active?t.value==null||t.max<=0?0:Math.min(Math.max(t.value/t.max,0),1):1),r=H(()=>i.value?void 0:n.value*t.max),a=H(()=>["nb-progress-bar",`nb-progress-bar--${t.size}`,`nb-progress-bar--${t.status}`,{"nb-progress-bar--indeterminate":i.value}]),s=H(()=>({transform:`scaleX(${n.value})`})),l=H(()=>t.status===La.Finished?Bs:t.status===La.Error?Rs:null),o=H(()=>t.status===La.Error?Gu.Error:Gu.Helper);return(u,c)=>(p(),$("div",{class:Te(a.value)},[e.label&&!e.hideLabel?(p(),$("div",bO,[ee(Os,null,{default:I(()=>[_e(K(e.label),1)]),_:1}),l.value?(p(),le(Ke,{key:0,name:l.value,size:"sm",class:"nb-progress-bar__status-icon"},null,8,["name"])):P("",!0)])):P("",!0),M("div",{class:"nb-progress-bar__track",role:"progressbar","aria-label":e.label,"aria-valuemin":"0","aria-valuemax":e.max,"aria-valuenow":r.value},[M("div",{class:"nb-progress-bar__bar",style:ft(s.value)},null,4)],8,yO),e.helper?(p(),le(_t,{key:1,variant:o.value,class:"nb-progress-bar__message"},{default:I(()=>[_e(K(e.helper),1)]),_:1},8,["variant"])):P("",!0)],2))}}),[["__scopeId","data-v-e3e26acc"]]),en=X([]),zo=new Map,ss=null,dh=null;function wO(e){return en.value.length>0&&en.value[0].key===e}function SO(){return en.value.length>0?en.value[en.value.length-1].element:null}var $b="data-nb-overlay-exempt",A8=`[${$b}], .nb-toaster, .nb-toaster__announcer, .nb-loading-announcer`,CO=8;function v2(e,t,i=0){if(!e.matches(A8)){if(i<CO&&e.querySelector(A8)){for(let n of Array.from(e.children))n instanceof HTMLElement&&v2(n,t,i+1);return}kO(e,t)}}function kO(e,t){let i=zo.get(e);i===void 0&&e.hasAttribute("inert")||(i===void 0&&e.setAttribute("inert",""),zo.set(e,(i??0)+1),t.push(e))}function Mb(e){for(let t of e){let i=zo.get(t);if(i!==void 0){if(i>1){zo.set(t,i-1);continue}zo.delete(t),t.removeAttribute("inert")}}e.length=0}var Lb='a[href], button, input, select, textarea, summary, [tabindex], [contenteditable=""], [contenteditable="true"]';function $8(e){return!(e instanceof HTMLElement)||e.hasAttribute("disabled")||e.getAttribute("aria-hidden")==="true"?!1:e.matches(Lb)}function AO(e){let t=ss,i=dh;if(ss=null,dh=null,typeof document>"u")return;let n=document.activeElement;if(!(n===null||n===document.body||n===e||e!==null&&e.contains(n))||!t)return;if(t.isConnected){t.focus({preventScroll:!0});return}let r=i;for(;r&&!r.isConnected;)r=r.parentElement;for(;r&&r!==document.body;){if($8(r)){r.focus({preventScroll:!0});return}let a=r.querySelector(Lb);if(a&&$8(a)){a.focus({preventScroll:!0});return}r=r.parentElement}}function $O(e,t){if(typeof document>"u"||en.value.some(n=>n.key===e))return;if(en.value.length===0){let n=document.activeElement;ss=n instanceof HTMLElement?n:null,dh=(ss==null?void 0:ss.parentElement)??null,_b()}let i={key:e,element:t,inerted:[]};for(let n of Array.from(document.body.children))n instanceof HTMLElement&&(n===t||n.contains(t)||v2(n,i.inerted));en.value=[...en.value,i],t.focus({preventScroll:!0})}function MO(e){var i;let t=en.value.find(n=>n.key===e);if(t){if(Mb(t.inerted),en.value=en.value.filter(n=>n.key!==e),en.value.length>0){(i=SO())==null||i.focus({preventScroll:!0});return}mb(),AO(t.element)}}function LO(e,t){EO(e);let i=[],n=e.getAttribute("aria-busy");e.setAttribute("aria-busy","true");for(let a of Array.from(e.children))a instanceof HTMLElement&&(a===t||a.contains(t)||v2(a,i));let r=!1;return()=>{r||(r=!0,Mb(i),n===null?e.removeAttribute("aria-busy"):e.setAttribute("aria-busy",n))}}function EO(e){if(typeof process<"u"||typeof window>"u"||!e.isConnected)return;let t=window.getComputedStyle(e).position;t&&t!=="static"||console.warn(`[NbSpinner] overlay="container" covers the nearest positioned ancestor, and this spinner's parent element is position: static, so the scrim will be drawn over some ancestor further up while only the parent is blocked. Set position: relative on the element you mean to cover.`)}var qi=null,Q0,xO=!1;function TO(){return typeof document>"u"?null:(qi!=null&&qi.isConnected||(qi=document.createElement("div"),qi.setAttribute("role","status"),qi.setAttribute("aria-live","polite"),qi.setAttribute("aria-atomic","true"),qi.className="nb-loading-announcer",qi.setAttribute($b,""),qi.style.cssText="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;white-space:nowrap;border:0;clip-path:inset(50%)",document.body.appendChild(qi)),qi)}function Eb(e){if(!e||xO)return;let t=TO();t&&(t.textContent="",Q0&&clearTimeout(Q0),Q0=setTimeout(()=>{Q0=void 0,t.textContent=e},60))}var xb=function(e){return e.ExtraSmall="xs",e.Small="sm",e.Medium="md",e.Large="lg",e}(xb||{}),yu=function(e){return e.None="none",e.Container="container",e.Page="page",e}(yu||{}),Tb=function(e){return e.Primary="primary",e.Inherit="inherit",e}(Tb||{}),HO=["id","tabindex","role","aria-live","aria-hidden"],NO={key:0,class:"nb-spinner__label","aria-hidden":"true"},PO={key:1,class:"nb-spinner__announcement"},M8=!1,el=Je(Ne({inheritAttrs:!1,__name:"Spinner",props:{size:{default:xb.Medium},label:{default:void 0},showLabel:{type:Boolean,default:!1},overlay:{default:yu.None},tone:{default:Tb.Primary},delay:{default:0},completeLabel:{default:void 0},decorative:{type:Boolean,default:!1},id:{default:void 0}},setup(e){let t=e,i=rr(t),n=ar(),r=H(()=>t.label??n.value.spinnerLabel),a=Symbol("nb-spinner-page-overlay"),s=X(null),l=Ff(),o=H(()=>t.overlay===yu.Page),u=H(()=>t.overlay===yu.Container),c=H(()=>t.decorative&&!o.value),d=H(()=>!c.value),h=X(t.delay<=0),f;function _(){f&&(f=(clearTimeout(f),void 0))}Pe(()=>t.delay,V=>{if(!h.value){if(_(),V<=0){h.value=!0;return}f=setTimeout(()=>{f=void 0,h.value=!0},V)}},{immediate:!0});let m=X(""),g;function v(){g&&(g=(clearTimeout(g),void 0))}Pe([h,d,r],([V,T,J])=>{if(v(),!V||!T){m.value="";return}if(m.value!==""){m.value=J;return}g=setTimeout(()=>{g=void 0,m.value=J},0)},{immediate:!0});function w(){typeof process<"u"||M8||t.label!==void 0||c.value||(M8=!0,console.warn('[nubisco-ui] NbSpinner has no `label`, so it announces "'+r.value+'". Name what is loading ("Loading invoices"), or mark the spinner `decorative` when something else already announces the load.'))}let S=null,y=null;function A(){if(S===null)return;let V=S;S=null,V==="page"&&MO(a),y==null||y(),y=null}function L(){let V=h.value?o.value?"page":u.value?"container":null:null;if(V===S||(A(),V===null))return;let T=s.value;if(!T)return;if(S=V,V==="page"){$O(a,T);return}let J=T.parentElement;J&&(y=LO(J,T))}Pe([h,()=>t.overlay],L,{flush:"post"}),et(L),et(w),Tt(()=>{h.value&&d.value&&Eb(t.completeLabel),_(),v(),A()});let k=H(()=>["nb-spinner",`nb-spinner--${t.size}`,`nb-spinner--tone-${t.tone}`,`nb-spinner--overlay-${t.overlay}`,{"nb-spinner--with-label":t.showLabel&&!c.value,"nb-spinner--reduced-motion":l.value,"nb-spinner--overlay-stacked":o.value&&h.value&&!wO(a)}]);return(V,T)=>(p(),le($r,{to:"body",disabled:!o.value},[h.value?(p(),$("div",yt({key:0},V.$attrs,{id:Y(i),ref_key:"rootEl",ref:s,class:k.value,tabindex:o.value?-1:void 0,role:d.value?"status":void 0,"aria-live":d.value?"polite":void 0,"aria-hidden":c.value?"true":void 0}),[T[1]||(T[1]=M("svg",{class:"nb-spinner__ring",viewBox:"0 0 32 32","aria-hidden":"true",focusable:"false"},[M("circle",{class:"nb-spinner__track",cx:"16",cy:"16",r:"14"}),M("circle",{class:"nb-spinner__arc",cx:"16",cy:"16",r:"14"})],-1)),e.showLabel&&!c.value?(p(),$("span",NO,K(r.value),1)):P("",!0),d.value?(p(),$("span",PO,K(m.value),1)):P("",!0),V.$slots.default?(p(),$("div",{key:2,class:"nb-spinner__actions","aria-live":"off",onClick:T[0]||(T[0]=Qe(()=>{},["stop"]))},[Ae(V.$slots,"default",{},void 0,!0)])):P("",!0)],16,HO)):P("",!0)],8,["disabled"]))}}),[["__scopeId","data-v-833f43a0"]]),Ur=function(e){return e.Text="text",e.Heading="heading",e.Block="block",e.Circle="circle",e}(Ur||{}),OO=["id","role","aria-live","aria-hidden"],IO={key:0,class:"nb-skeleton__label"},RO={class:"nb-skeleton__lines","aria-busy":"true"},g2=Je(Ne({__name:"Skeleton",props:{variant:{default:Ur.Text},type:{default:void 0},lines:{default:1},lastLineWidth:{default:"60%"},width:{default:void 0},height:{default:void 0},radius:{default:"sm"},animated:{type:Boolean,default:!0},label:{default:void 0},completeLabel:{default:void 0},id:{default:void 0}},setup(e){let t=e,i=rr(t),n=Ff(),r=X(""),a;Pe(()=>t.label,_=>{if(a&&(a=(clearTimeout(a),void 0)),!_){r.value="";return}if(r.value!==""){r.value=_;return}a=setTimeout(()=>{a=void 0,r.value=_},0)},{immediate:!0}),Tt(()=>{a&&clearTimeout(a),Eb(t.completeLabel)});let s=["label","label-sm","label-md","label-lg","helper-text","overline","body-sm","body-compact","body-md","body-lg","code-sm","code-md","code-lg","heading-compact","heading-01","heading-02","heading-03","heading-04","heading-05","heading-06"],l=H(()=>t.type&&s.includes(t.type)?t.type:t.variant===Ur.Heading?"heading-02":"body-md"),o=H(()=>t.variant===Ur.Text||t.variant===Ur.Heading),u=H(()=>t.variant===Ur.Text?Math.max(1,Math.floor(t.lines)):1);function c(_){if(_!=null)return typeof _=="number"?`${_}px`:_}let d=H(()=>Array.from({length:u.value},(_,m)=>{let g=m===u.value-1;if(t.variant===Ur.Text&&u.value>1&&g)return{width:t.lastLineWidth}})),h=H(()=>["nb-skeleton",`nb-skeleton--${t.variant}`,`nb-skeleton--radius-${t.radius}`,{"nb-skeleton--static":!t.animated,"nb-skeleton--reduced-motion":n.value}]),f=H(()=>{let _={};if(o.value&&(_["--nb-skeleton-font-size"]=`var(--nb-type-${l.value}-size)`,_["--nb-skeleton-line-height"]=`var(--nb-type-${l.value}-line-height)`),t.variant===Ur.Circle){let v=c(t.height??t.width);return v&&(_.width=v,_["--nb-skeleton-height"]=v),_}let m=c(t.width);m&&(_.width=m);let g=c(t.height);return g&&!o.value&&(_["--nb-skeleton-height"]=g),_});return(_,m)=>(p(),$("div",{id:Y(i),class:Te(h.value),style:ft(f.value),role:e.label?"status":void 0,"aria-live":e.label?"polite":void 0,"aria-hidden":e.label?void 0:"true"},[e.label?(p(),$("span",IO,K(r.value),1)):P("",!0),M("div",RO,[(p(!0),$($e,null,Ue(d.value,(g,v)=>(p(),$("span",{key:v,class:"nb-skeleton__line"},[M("span",{class:"nb-skeleton__fill",style:ft(g)},null,4)]))),128))])],14,OO))}}),[["__scopeId","data-v-bb31df2c"]]);const tl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},DO=tl("arrow-up-right","0 0 256 256",'<path d="M196,64V168a4,4,0,0,1-8,0V73.66L66.83,194.83a4,4,0,0,1-5.66-5.66L182.34,68H88a4,4,0,0,1,0-8H192A4,4,0,0,1,196,64Z"/>'),VO=tl("arrow-up-right","0 0 256 256",'<path d="M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z"/>'),L8=tl("arrow-up-right","0 0 256 256",'<path d="M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z"/>'),BO=tl("arrow-up-right","0 0 256 256",'<path d="M204,64V168a12,12,0,0,1-24,0V93L72.49,200.49a12,12,0,0,1-17-17L163,76H88a12,12,0,0,1,0-24H192A12,12,0,0,1,204,64Z"/>'),ZO=tl("arrow-up-right","0 0 256 256",'<path d="M200,64V168a8,8,0,0,1-13.66,5.66L140,127.31,69.66,197.66a8,8,0,0,1-11.32-11.32L128.69,116,82.34,69.66A8,8,0,0,1,88,56H192A8,8,0,0,1,200,64Z"/>'),FO=tl("arrow-up-right","0 0 256 256",'<path d="M192,64V168L88,64Z" opacity="0.2"/><path d="M192,56H88a8,8,0,0,0-5.66,13.66L128.69,116,58.34,186.34a8,8,0,0,0,11.32,11.32L140,127.31l46.34,46.35A8,8,0,0,0,200,168V64A8,8,0,0,0,192,56Zm-8,92.69-38.34-38.34h0L107.31,72H184Z"/>'),zO="arrow-up-right",UO=Object.freeze(Object.defineProperty({__proto__:null,bold:BO,default:L8,duotone:FO,fill:ZO,glyphName:zO,light:VO,regular:L8,thin:DO},Symbol.toStringTag,{value:"Module"})),il=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},WO=il("arrow-down-right","0 0 256 256",'<path d="M196,88V192a4,4,0,0,1-4,4H88a4,4,0,0,1,0-8h94.34L61.17,66.83a4,4,0,0,1,5.66-5.66L188,182.34V88a4,4,0,0,1,8,0Z"/>'),jO=il("arrow-down-right","0 0 256 256",'<path d="M198,88V192a6,6,0,0,1-6,6H88a6,6,0,0,1,0-12h89.52L59.76,68.24a6,6,0,0,1,8.48-8.48L186,177.52V88a6,6,0,0,1,12,0Z"/>'),E8=il("arrow-down-right","0 0 256 256",'<path d="M200,88V192a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h84.69L58.34,69.66A8,8,0,0,1,69.66,58.34L184,172.69V88a8,8,0,0,1,16,0Z"/>'),KO=il("arrow-down-right","0 0 256 256",'<path d="M204,88V192a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h75L55.51,72.48a12,12,0,0,1,17-17L180,163V88a12,12,0,0,1,24,0Z"/>'),qO=il("arrow-down-right","0 0 256 256",'<path d="M200,88V192a8,8,0,0,1-8,8H88a8,8,0,0,1-5.66-13.66L128.69,140,58.34,69.66A8,8,0,0,1,69.66,58.34L140,128.69l46.34-46.35A8,8,0,0,1,200,88Z"/>'),GO=il("arrow-down-right","0 0 256 256",'<path d="M192,88V192H88Z" opacity="0.2"/><path d="M195.06,80.61a8,8,0,0,0-8.72,1.73L140,128.69,69.66,58.34A8,8,0,0,0,58.34,69.66L128.69,140,82.34,186.34A8,8,0,0,0,88,200H192a8,8,0,0,0,8-8V88A8,8,0,0,0,195.06,80.61ZM184,184H107.31l38.34-38.34h0L184,107.31Z"/>'),YO="arrow-down-right",XO=Object.freeze(Object.defineProperty({__proto__:null,bold:KO,default:E8,duotone:GO,fill:qO,glyphName:YO,light:jO,regular:E8,thin:WO},Symbol.toStringTag,{value:"Module"})),nl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},JO=nl("minus","0 0 256 256",'<path d="M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128Z"/>'),QO=nl("minus","0 0 256 256",'<path d="M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Z"/>'),ic=nl("minus","0 0 256 256",'<path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"/>'),eI=nl("minus","0 0 256 256",'<path d="M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z"/>'),tI=nl("minus","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z"/>'),iI=nl("minus","0 0 256 256",'<path d="M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z" opacity="0.2"/><path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"/>'),nI="minus",rI=Object.freeze(Object.defineProperty({__proto__:null,bold:eI,default:ic,duotone:iI,fill:tI,glyphName:nI,light:QO,regular:ic,thin:JO},Symbol.toStringTag,{value:"Module"}));var aI={class:"nb-stat__label"},sI={class:"nb-stat__value"},lI={key:1},oI={key:2,class:"nb-stat__comparison"},Hb=Je(Ne({__name:"Stat",props:{label:{},value:{default:void 0},status:{default:"neutral"},delta:{default:void 0},trend:{default:void 0},invertTrend:{type:Boolean,default:!1},comparison:{default:void 0},size:{default:"md"},loading:{type:Boolean,default:!1},to:{default:void 0},href:{default:void 0},target:{default:void 0},clickable:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["select"],setup(e,{emit:t}){let i=e,n=t,{layerProps:r}=ua(),{tag:a,attrs:s,isInteractive:l,onClick:o,onKeydown:u}=t2(i,f=>n("select",f)),c=H(()=>i.size==="lg"?36:i.size==="sm"?20:28),d=H(()=>i.trend==="up"?UO:i.trend==="down"?XO:i.trend==="flat"?rI:null),h=H(()=>i.trend==="up"?i.invertTrend?"negative":"positive":i.trend==="down"?i.invertTrend?"positive":"negative":"neutral");return(f,_)=>(p(),le(mi(Y(a)),yt({class:["nb-stat",[`nb-stat--${e.status}`,`nb-stat--${e.size}`,{"nb-stat--interactive":Y(l),"nb-stat--selected":e.selected,"nb-stat--disabled":e.disabled}]]},{...Y(s),...Y(r)},{"aria-busy":e.loading?!0:void 0,onClick:Y(o),onKeydown:Y(u)}),{default:I(()=>[M("span",aI,[Ae(f.$slots,"label",{},()=>[_e(K(e.label),1)],!0)]),M("span",sI,[e.loading?(p(),le(g2,{key:0,variant:"block",height:c.value,width:"4.5ch",radius:"sm"},null,8,["height"])):Ae(f.$slots,"value",{key:1},()=>[_e(K(e.value),1)],!0)]),!e.loading&&(e.delta||e.trend||e.comparison||f.$slots.delta)?(p(),$("span",{key:0,class:Te(["nb-stat__delta",e.trend?`nb-stat__delta--${h.value}`:null])},[Ae(f.$slots,"delta",{},()=>[d.value?(p(),le(Ke,{key:0,name:d.value,size:"sm",class:"nb-stat__trend","aria-hidden":"true"},null,8,["name"])):P("",!0),e.delta?(p(),$("span",lI,K(e.delta),1)):P("",!0),e.comparison?(p(),$("span",oI,K(e.comparison),1)):P("",!0)],!0)],2)):P("",!0)]),_:3},16,["class","aria-busy","onClick","onKeydown"]))}}),[["__scopeId","data-v-f708c9e1"]]),Dn=function(e){return e.Inactive="inactive",e.Active="active",e.Finished="finished",e.Error="error",e}(Dn||{}),uI=["id","aria-live"],cI={class:"nb-inline-loading__text"},Nb=Je(Ne({__name:"InlineLoading",props:{status:{default:Dn.Inactive},label:{default:"Saving"},finishedLabel:{default:"Saved"},errorLabel:{default:"Could not save"},dwell:{default:1600},reserveSpace:{type:Boolean,default:!0},id:{default:void 0}},emits:["success"],setup(e,{emit:t}){let i=e,n=t,r=rr(i),a;function s(){a&&(a=(clearTimeout(a),void 0))}Pe(()=>i.status,h=>{s(),h===Dn.Finished&&(a=setTimeout(()=>{a=void 0,n("success")},i.dwell))},{immediate:!0}),Tt(s);let l=H(()=>{switch(i.status){case Dn.Active:return i.label;case Dn.Finished:return i.finishedLabel;case Dn.Error:return i.errorLabel;default:return""}}),o=H(()=>i.status===Dn.Finished?Bs:i.status===Dn.Error?Rs:null),u=H(()=>i.status===Dn.Inactive?"off":i.status===Dn.Error?"assertive":"polite"),c=H(()=>["nb-inline-loading",`nb-inline-loading--${i.status}`]),d=H(()=>i.reserveSpace?{"--nb-inline-loading-reserve":`${Math.max(i.label.length,i.finishedLabel.length,i.errorLabel.length)+1}ch`}:void 0);return(h,f)=>(p(),$("div",{id:Y(r),class:Te(c.value),style:ft(d.value),role:"status","aria-live":u.value},[e.status==="active"?(p(),le(el,{key:0,class:"nb-inline-loading__spinner",size:"sm",tone:"inherit",decorative:""})):o.value?(p(),le(Ke,{key:1,class:"nb-inline-loading__icon",name:o.value,size:16,"aria-hidden":"true"},null,8,["name"])):P("",!0),M("span",cI,[Ae(h.$slots,"default",{status:e.status,text:l.value},()=>[_e(K(l.value),1)],!0)])],14,uI))}}),[["__scopeId","data-v-6f38f00f"]]);const dI=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},x8=dI("pencil-simple","0 0 256 256",'<path d="M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"/>');var hI={class:"nb-notification-item__sr"},fI={key:0,class:"nb-notification-item__media"},pI={class:"nb-notification-item__main"},_I={class:"nb-notification-item__head"},mI={class:"nb-notification-item__title"},vI=["datetime"],gI=["title"],bI={key:0,class:"nb-notification-item__actions"},Pb=Ne({__name:"NotificationCenterItem",props:{title:{default:""},body:{default:""},time:{default:void 0},timeLabel:{default:void 0},read:{type:Boolean,default:!1},variant:{default:"neutral"},icon:{default:void 0},href:{default:void 0},interactive:{type:Boolean,default:!0},locale:{default:void 0},unreadLabel:{default:"Unread"},readLabel:{default:"Read"}},emits:["select"],setup(e,{emit:t}){let i=e,n=t,r=vi(),a=H(()=>i.href?"a":i.interactive?"button":"div"),s=H(()=>a.value!=="div"),l=H(()=>s.value?{"data-nb-notification-item":"",href:a.value==="a"?i.href:void 0,type:a.value==="button"?"button":void 0,onClick:S}:{}),o={neutral:null,info:Zc,success:Bs,warning:zc,error:Rs},u=H(()=>i.variant==="danger"?"error":i.variant),c=H(()=>i.icon===null?null:i.icon??o[u.value]),d=H(()=>!!(c.value||r.media)),h=H(()=>{if(i.time===void 0||i.time===null)return null;let y=i.time instanceof Date?i.time:new Date(i.time);return Number.isNaN(y.getTime())?null:y}),f=H(()=>{var y;return(y=h.value)==null?void 0:y.toISOString()}),_=[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60],["second",1]];function m(y,A){let L=(y.getTime()-Date.now())/1e3,k=Math.abs(L),V=new Intl.RelativeTimeFormat(A,{numeric:"auto"});for(let[T,J]of _)if(k>=J||T==="second")return V.format(Math.round(L/J),T);return V.format(0,"second")}let g=X(!1);et(()=>{g.value=!0});let v=H(()=>h.value?new Intl.DateTimeFormat(i.locale,{dateStyle:"medium",timeStyle:"short"}).format(h.value):""),w=H(()=>i.timeLabel?i.timeLabel:h.value?g.value?m(h.value,i.locale):v.value:"");function S(y){n("select",y)}return(y,A)=>(p(),$("li",{class:Te(["nb-notification-item",[`nb-notification-item--${u.value}`,{"nb-notification-item--unread":!e.read}]]),role:"listitem"},[(p(),le(mi(a.value),yt({class:["nb-notification-item__row",{"nb-notification-item__row--static":!s.value}]},l.value),{default:I(()=>[A[0]||(A[0]=M("span",{class:"nb-notification-item__marker","aria-hidden":"true"},null,-1)),M("span",hI,K(e.read?e.readLabel:e.unreadLabel),1),d.value?(p(),$("span",fI,[Ae(y.$slots,"media",{},()=>[c.value?(p(),le(Ke,{key:0,name:c.value,size:16},null,8,["name"])):P("",!0)])])):P("",!0),M("span",pI,[M("span",_I,[M("span",mI,[Ae(y.$slots,"title",{},()=>[_e(K(e.title),1)])]),w.value?(p(),$("time",{key:0,class:"nb-notification-item__time",datetime:f.value},K(w.value),9,vI)):P("",!0)]),e.body||y.$slots.default?(p(),$("span",{key:0,class:"nb-notification-item__body","data-nb-notification-body":"",title:e.body||void 0},[Ae(y.$slots,"default",{},()=>[_e(K(e.body),1)])],8,gI)):P("",!0)])]),_:3},16,["class"])),y.$slots.actions?(p(),$("span",bI,[Ae(y.$slots,"actions")])):P("",!0)],2))}});const rl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},yI=rl("bell","0 0 256 256",'<path d="M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"/>'),wI=rl("bell","0 0 256 256",'<path d="M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"/>'),hh=rl("bell","0 0 256 256",'<path d="M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"/>'),SI=rl("bell","0 0 256 256",'<path d="M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"/>'),CI=rl("bell","0 0 256 256",'<path d="M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"/>'),kI=rl("bell","0 0 256 256",'<path d="M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z" opacity="0.2"/><path d="M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"/>'),AI="bell",b2=Object.freeze(Object.defineProperty({__proto__:null,bold:SI,default:hh,duotone:kI,fill:CI,glyphName:AI,light:wI,regular:hh,thin:yI},Symbol.toStringTag,{value:"Module"}));var $I={key:0,class:"nb-notification-center__badge","aria-hidden":"true"},MI=["aria-describedby","aria-busy"],LI={class:"nb-notification-center__header"},EI={class:"nb-notification-center__sr",role:"status"},xI={class:"nb-notification-center__stale-text"},TI={class:"nb-notification-center__sr"},HI=["tabindex"],NI={key:4,class:"nb-notification-center__empty"},PI={key:5,class:"nb-notification-center__footer"},eu=new Set,Ca=8,Gi=8,mo=96,tu=88,OI=200;function II(e,{align:t,side:i,width:n,maxHeight:r,viewport:a}){let s=e.left+e.width;if(i==="right"&&a.width-s-Ca-Gi>=n){let g=e.top+e.height,v=t==="end"?g-Gi:a.height-e.top-Gi,w=Math.max(tu+mo,v),S=Math.min(r+mo,w),y=Math.max(tu,Math.min(r,w-mo));return t==="end"?{top:Math.max(Gi,g-S),bottom:Math.max(Gi,a.height-g),left:s+Ca,side:"right",maxListHeight:y}:{top:Math.max(Gi,Math.min(e.top,a.height-Gi-S)),left:s+Ca,side:"right",maxListHeight:y}}let l=t==="start"?e.left:e.left+e.width-n,o=Math.min(Math.max(l,Gi),Math.max(Gi,a.width-n-Gi)),u=e.top+e.height,c=a.height-u-Ca-Gi,d=e.top-Ca-Gi,h=c<OI&&d>c?"top":"bottom",f=Math.max(tu,h==="top"?d:c),_=Math.max(tu,Math.min(r,f-mo)),m=Math.min(r+mo,f);return{top:h==="top"?Math.max(Gi,e.top-Ca-m):u+Ca,left:o,side:h,maxListHeight:_}}function RI(e,t){return e.left<=t.width&&e.left+e.width>=0&&e.top<=t.height&&e.top+e.height>=0}var DI=Ne({__name:"NotificationCenter",props:{items:{default:()=>[]},unreadCount:{default:void 0},itemCount:{default:void 0},open:{type:Boolean,default:void 0},label:{default:"Notifications"},markAllLabel:{default:"Mark all as read"},markAllPendingLabel:{default:"Marking all as read"},markAllPending:{type:Boolean,default:!1},emptyTitle:{default:"No notifications"},emptyDescription:{default:"New activity shows up here."},loadingLabel:{default:"Loading notifications"},loading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},errorTitle:{default:"Could not load notifications"},errorDescription:{default:"The request failed. Nothing has been lost."},errorStaleLabel:{default:"These may be out of date."},retryLabel:{default:"Try again"},showRetry:{type:Boolean,default:!0},maxCount:{default:99},width:{default:360},closeLabel:{default:"Close notifications"},maxHeight:{default:384},align:{default:"end"},side:{default:"vertical"},showMarkAll:{type:Boolean,default:!0},interactive:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},closeOnNavigate:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},icon:{default:void 0},locale:{default:void 0},unreadLabel:{default:"Unread"},readLabel:{default:"Read"},formatUnread:{type:Function,default:e=>`${e} unread`}},emits:["update:open","open","close","select","mark-all-read","retry"],setup(e,{expose:t,emit:i}){let n=e,r=H(()=>n.icon??b2),a=i,s=vi(),l=`nb-notification-center-${an()}`,o=`${l}-title`,u=`${l}-trigger`,c=`${l}-error`,d=X(null),h=X(null),f=X(null),_=X(null),m=X(!1),g=H(()=>n.open===void 0?m.value:n.open),v=H(()=>typeof n.unreadCount=="number"?Math.max(0,n.unreadCount):n.items.filter(Se=>!Se.read).length),w=H(()=>v.value>n.maxCount?`${n.maxCount}+`:String(v.value)),S=H(()=>v.value>0?`${n.label}, ${n.formatUnread(v.value)}`:n.label),y=H(()=>{if(typeof n.itemCount=="number")return Math.max(0,n.itemCount);if(!s.default)return n.items.length}),A=H(()=>(y.value??0)>0),L=H(()=>{if(n.loading)return"loading";let Se=y.value;return n.error&&(Se===void 0||Se===0)?"error":Se===void 0||Se>0?"list":"empty"}),k=H(()=>n.error&&!n.loading&&L.value==="list"&&A.value);Pe(()=>[g.value,!!s.default,n.itemCount],([Se,Ie,Ze])=>{},{immediate:!0});function V(){a("retry")}let T=H(()=>({id:u,"aria-haspopup":"dialog","aria-expanded":g.value?"true":"false","aria-controls":g.value?l:void 0,"aria-label":S.value,disabled:n.disabled||void 0})),J=H(()=>({type:"button",disabled:v.value===0&&!n.markAllPending,"aria-disabled":n.markAllPending?"true":void 0,"aria-busy":n.markAllPending?"true":void 0,onClick:Q})),x=H(()=>k.value||L.value==="error"?c:void 0);function N(Se){if(!Se){f.value=null;return}let Ie=Se instanceof HTMLElement?Se:Se.$el;f.value=Ie instanceof HTMLElement?Ie:null}let O=X({top:0,left:0,side:"bottom",maxListHeight:n.maxHeight});function R(){return{width:window.innerWidth,height:window.innerHeight}}function j(){var Ie;let Se=(Ie=d.value)==null?void 0:Ie.getBoundingClientRect();Se&&(O.value=II(Se,{align:n.align,side:n.side,width:n.width,maxHeight:n.maxHeight,viewport:R()}))}let{phone:G}=ln(),ae=H(()=>G.value),q=H(()=>{if(!ae.value)return O.value.bottom===void 0?{top:`${Math.round(O.value.top)}px`,left:`${Math.round(O.value.left)}px`,width:`${n.width}px`}:{bottom:`${Math.round(O.value.bottom)}px`,left:`${Math.round(O.value.left)}px`,width:`${n.width}px`}}),se=H(()=>ae.value?void 0:{maxHeight:`${Math.round(O.value.maxListHeight)}px`}),me=H(()=>({"nb-notification-center__panel--sheet":ae.value,"nb-notification-center__panel--start":n.align==="start","nb-notification-center__panel--above":!ae.value&&O.value.side==="top","nb-notification-center__panel--beside":!ae.value&&O.value.side==="right"}));function U(Se){n.open===void 0&&(m.value=Se),a("update:open",Se)}function ve(){n.disabled||g.value||(j(),U(!0),a("open"))}function ce(Se={}){var Ze;if(!g.value)return;let Ie=(Ze=_.value)==null?void 0:Ze.contains(document.activeElement);U(!1),a("close"),(Se.restoreFocus??Ie)&&wt(ge)}function ge(){var Ie,Ze;let Se=f.value;if(Se!=null&&Se.isConnected){Se.focus();return}(Ze=(Ie=d.value)==null?void 0:Ie.querySelector(ne))==null||Ze.focus()}function ue(){g.value?ce({restoreFocus:!0}):ve()}let pe=X(0),W=new Set(["button","link","menuitem","option"]);function he(Se){if(Se.tagName==="BUTTON")return!Se.hasAttribute("disabled");if(Se.tagName==="A")return Se.hasAttribute("href");let Ie=Se.getAttribute("role");return Ie!==null&&W.has(Ie)}function te(){return _.value?Array.from(_.value.querySelectorAll("[data-nb-notification-item]")).filter(Se=>!!he(Se)):[]}let be=X(void 0);function E(Se){let Ie=h.value;be.value=Ie&&Ie.childElementCount>0&&Se.length===0?0:void 0}function F(Se){let Ie=te();E(Ie),Ie.length&&(pe.value=Math.min(Math.max(Se,0),Ie.length-1),Ie.forEach((Ze,at)=>{Ze.setAttribute("tabindex",at===pe.value?"0":"-1")}))}function ie(Se){var at;let Ie=te();if(!Ie.length)return!1;let Ze=Math.min(Math.max(Se,0),Ie.length-1);return F(Ze),(at=Ie[Ze])==null||at.focus(),!0}function fe(Se){var at;let Ie=(at=Se.target)==null?void 0:at.closest("[data-nb-notification-item]");if(!Ie)return;let Ze=te().indexOf(Ie);Ze>=0&&F(Ze)}let ne='a[href]:not([tabindex="-1"]), button:not([disabled]):not([tabindex="-1"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex="0"]';function Z(Se){var Ie;return!!((Ie=Se==null?void 0:Se.closest)!=null&&Ie.call(Se,'input, textarea, select, [contenteditable=""], [contenteditable="true"]'))}function re(Se){var ki;let Ie=te(),Ze=(ki=Se.target)==null?void 0:ki.closest("[data-nb-notification-item]"),at=Ze?Ie.indexOf(Ze):-1;if(Se.key==="Escape"){if(!b(Se))return;Se.preventDefault(),Se.stopPropagation(),ce({restoreFocus:!0});return}if(Se.key==="Tab"){C(Se);return}if(!Z(Se.target))switch(Se.key){case"ArrowDown":ie(at<0?0:at+1)&&Se.preventDefault();break;case"ArrowUp":ie(at<0?Ie.length-1:at-1)&&Se.preventDefault();break;case"Home":at>=0&&(Se.preventDefault(),ie(0));break;case"End":at>=0&&(Se.preventDefault(),ie(Ie.length-1));break}}function b(Se){var Ze,at;if(Se.defaultPrevented)return!1;let Ie=(at=(Ze=Se.target??document.activeElement)==null?void 0:Ze.closest)==null?void 0:at.call(Ze,'[aria-modal="true"]');return!(Ie&&Ie!==_.value)}function C(Se){let Ie=_.value;if(!Ie)return;let Ze=Array.from(Ie.querySelectorAll(ne)),at=document.activeElement,ki=Ze[0],Pr=Ze[Ze.length-1],ro=!Ze.length||at===ki||!Ie.contains(at),ao=!Ze.length||at===Pr;if(Se.shiftKey?!ro:!ao)return;Se.preventDefault();let En=Se.shiftKey?f.value:B();ce({restoreFocus:!1}),wt(()=>{En!=null&&En.isConnected?En.focus():ge()})}function B(){let Se=f.value;if(!Se)return null;let Ie=Array.from(document.querySelectorAll(ne)).filter(at=>{var ki;return!((ki=_.value)!=null&&ki.contains(at))}).filter(at=>at.tabIndex>=0),Ze=Ie.indexOf(Se);return Ze<0?null:Ie[Ze+1]??null}function de(Se,Ie){a("select",Se,Ie),n.closeOnSelect&&ce({restoreFocus:!1})}function z(Se){var Ze;if(!s.default)return;let Ie=(Ze=Se.target)==null?void 0:Ze.closest("[data-nb-notification-item]");if(Ie&&he(Ie)){if(Se.type==="keydown"){let at=Se.key;if(at!=="Enter"&&at!==" "||Ie.tagName==="BUTTON"||Ie.tagName==="A")return;Se.preventDefault()}a("select",null,Se),n.closeOnSelect&&ce({restoreFocus:!1})}}function Q(){n.markAllPending||a("mark-all-read")}function D(Se){var Ze,at;let Ie=Se.target;(Ze=d.value)!=null&&Ze.contains(Ie)||(at=_.value)!=null&&at.contains(Ie)||ce({restoreFocus:!1})}function oe(Se){var Ie,Ze;Se.key==="Escape"&&((Ie=_.value)!=null&&Ie.contains(document.activeElement)||b(Se)&&ce({restoreFocus:((Ze=d.value)==null?void 0:Ze.contains(document.activeElement))??!1}))}let ye=0;function xe(){!g.value||ye||(ye=requestAnimationFrame(()=>{ye=0,Re()}))}function we(){ye&&(ye=(cancelAnimationFrame(ye),0))}function Re(){var Ie;if(!g.value||ae.value)return;let Se=(Ie=d.value)==null?void 0:Ie.getBoundingClientRect();if(Se&&!RI(Se,R())){ce({restoreFocus:!1});return}j()}function Ge(){n.closeOnNavigate&&ce({restoreFocus:!1})}function Ct(){return window.navigation}function qt(){var Se;document.addEventListener("mousedown",D),document.addEventListener("keydown",oe),window.addEventListener("resize",xe),window.addEventListener("scroll",xe,!0),window.addEventListener("popstate",Ge),window.addEventListener("hashchange",Ge),(Se=Ct())==null||Se.addEventListener("navigate",Ge)}function Dt(){var Se;we(),document.removeEventListener("mousedown",D),document.removeEventListener("keydown",oe),window.removeEventListener("resize",xe),window.removeEventListener("scroll",xe,!0),window.removeEventListener("popstate",Ge),window.removeEventListener("hashchange",Ge),(Se=Ct())==null||Se.removeEventListener("navigate",Ge)}let rt=()=>ce({restoreFocus:!1});return Pe(g,Se=>{if(Se){for(let Ie of[...eu])Ie!==rt&&Ie();eu.add(rt),qt(),wt(()=>{var Ie;j(),F(0),ie(0)||((Ie=_.value)==null||Ie.focus())})}else eu.delete(rt),Dt(),pe.value=0}),Pe(()=>[n.items.length,L.value],()=>{g.value&&wt(()=>F(pe.value))}),Tt(()=>{Dt(),eu.delete(rt);let Se=_.value;Se!=null&&Se.isConnected&&Se.remove()}),t({show:ve,close:ce,toggle:ue,isOpen:g,unreadCount:v}),(Se,Ie)=>(p(),$("div",{ref_key:"rootRef",ref:d,class:"nb-notification-center"},[Ae(Se.$slots,"trigger",{open:g.value,toggle:ue,show:ve,close:ce,unreadCount:v.value,badge:w.value,panelId:l,triggerProps:T.value,setTriggerRef:N},()=>[M("button",yt({ref:N,type:"button",class:["nb-notification-center__trigger",{"nb-notification-center__trigger--active":g.value}]},T.value,{onClick:ue}),[ee(Ke,{name:r.value,size:18},null,8,["name"]),v.value>0?(p(),$("span",$I,K(w.value),1)):P("",!0)],16)]),(p(),le($r,{to:"body"},[ee(sa,{name:"nb-notification-center-pop"},{default:I(()=>[g.value?(p(),$("div",{key:0,id:l,ref_key:"panelRef",ref:_,class:Te(["nb-notification-center__panel",me.value]),style:ft(q.value),role:"dialog",tabindex:"-1","aria-labelledby":o,"aria-describedby":x.value,"aria-busy":e.loading?"true":void 0,onKeydown:re,onFocusin:fe},[M("div",LI,[M("h2",{id:o,class:"nb-notification-center__title"},K(e.label),1),Ae(Se.$slots,"header-start",{close:ce,unreadCount:v.value}),Ae(Se.$slots,"header-actions",{close:ce,unreadCount:v.value,markAllRead:Q,markAllPending:e.markAllPending,markAllProps:J.value,markAllText:e.markAllPending?e.markAllPendingLabel:e.markAllLabel},()=>[e.showMarkAll?(p(),$("button",yt({key:0,class:"nb-notification-center__mark-all"},J.value),[e.markAllPending?(p(),le(el,{key:0,size:"xs",tone:"inherit",decorative:""})):P("",!0),_e(" "+K(e.markAllPending?e.markAllPendingLabel:e.markAllLabel),1)],16)):P("",!0)]),ae.value?(p(),le(kt,{key:0,class:"nb-notification-center__close",variant:"ghost",size:"lg",icon:Y(ir),"aria-label":e.closeLabel,onClick:Ie[0]||(Ie[0]=Ze=>ce())},null,8,["icon","aria-label"])):P("",!0)]),M("span",EI,K(e.markAllPending?e.markAllPendingLabel:""),1),k.value?(p(),$("div",{key:0,id:c,class:"nb-notification-center__stale",role:"status"},[ee(Ke,{name:Y(Kd),size:"sm","aria-hidden":"true"},null,8,["name"]),M("span",xI,K(e.errorStaleLabel),1),e.showRetry?(p(),$("button",{key:0,type:"button",class:"nb-notification-center__retry",onClick:V},K(e.retryLabel),1)):P("",!0)])):P("",!0),L.value==="loading"?(p(),$("div",{key:1,class:"nb-notification-center__loading",role:"status",style:ft(se.value)},[M("span",TI,K(e.loadingLabel),1),(p(),$($e,null,Ue(3,Ze=>ee(g2,{key:Ze,variant:"text",type:"body-sm",lines:2,"last-line-width":"60%"})),64))],4)):L.value==="error"?(p(),$("div",{key:2,id:c,class:"nb-notification-center__error",role:"alert"},[Ae(Se.$slots,"error",{retry:V},()=>[ee(u0,{size:"sm",kind:"error",title:e.errorTitle,description:e.errorDescription},tr({_:2},[e.showRetry?{name:"actions",fn:I(()=>[ee(kt,{size:"sm",variant:"secondary",onClick:V},{default:I(()=>[_e(K(e.retryLabel),1)]),_:1})]),key:"0"}:void 0]),1032,["title","description"])])])):L.value==="list"?(p(),$("ul",{key:3,ref_key:"listRef",ref:h,class:"nb-notification-center__list",role:"list",tabindex:be.value,style:ft(se.value),onClick:z,onKeydown:z},[Ae(Se.$slots,"default",{close:ce,items:e.items},()=>[(p(!0),$($e,null,Ue(e.items,Ze=>(p(),le(Pb,{key:Ze.id,title:Ze.title,body:Ze.body,time:Ze.time,"time-label":Ze.timeLabel,read:Ze.read,variant:Ze.variant??"neutral",icon:Ze.icon,href:Ze.href,interactive:Ze.interactive??e.interactive,locale:e.locale,"unread-label":e.unreadLabel,"read-label":e.readLabel,onSelect:at=>de(Ze,at)},null,8,["title","body","time","time-label","read","variant","icon","href","interactive","locale","unread-label","read-label","onSelect"]))),128))])],44,HI)):L.value==="empty"?(p(),$("div",NI,[Ae(Se.$slots,"empty",{},()=>[ee(u0,{size:"sm",icon:r.value,title:e.emptyTitle,description:e.emptyDescription},null,8,["icon","title","description"])])])):P("",!0),Se.$slots.footer?(p(),$("div",PI,[Ae(Se.$slots,"footer",{close:ce})])):P("",!0)],46,MI)):P("",!0)]),_:3})]))],512))}}),VI=["id","aria-invalid","aria-describedby","placeholder","min","max","step","disabled","required"],BI={class:"nb-number-input__steppers"},ZI=["disabled","aria-label"],FI=["disabled","aria-label"],zI={key:0,class:"nb-number-input__inner-header"},UI=["for"],WI={key:0,class:"nb-number-input__asterisk","aria-hidden":"true"},jI={class:"nb-number-input__fluid-row"},KI=["id","aria-invalid","aria-describedby","placeholder","min","max","step","disabled","required"],qI={class:"nb-number-input__steppers"},GI=["disabled","aria-label"],YI=["disabled","aria-label"],y2=Je(Ne({__name:"NumberInput",props:{modelValue:{default:null},min:{default:void 0},max:{default:void 0},step:{default:1},placeholder:{default:""},name:{},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},id:{default:void 0},label:{default:""},error:{default:""},warning:{default:""},helper:{default:""},variant:{default:"default"},size:{default:"md"}},emits:["update:modelValue","change"],setup(e,{expose:t,emit:i}){let n=ar(),r=e,a=i,s=X(null),l=X(!1),o=rr({}),u=H(()=>r.id??o),{ids:c,messageId:d,invalid:h,live:f,key:_}=Uc(r,u),m=H(()=>r.min!==void 0&&r.modelValue!==null&&r.modelValue!==void 0&&r.modelValue<=r.min),g=H(()=>r.max!==void 0&&r.modelValue!==null&&r.modelValue!==void 0&&r.modelValue>=r.max);function v(T){let J=T;return r.min!==void 0&&(J=Math.max(r.min,J)),r.max!==void 0&&(J=Math.min(r.max,J)),J}function w(T){s.value&&(s.value.value=T==null?"":String(T))}et(()=>w(r.modelValue)),Pe(()=>r.modelValue,T=>{l.value||w(T)});function S(){let T=v((r.modelValue??0)+r.step);a("update:modelValue",T),a("change",T),w(T)}function y(){let T=v((r.modelValue??0)-r.step);a("update:modelValue",T),a("change",T),w(T)}function A(){if(!s.value)return;let T=s.value.value;if(T==="")a("update:modelValue",null);else{let J=parseFloat(T);isNaN(J)||a("update:modelValue",J)}}function L(){if(l.value=!1,!s.value)return;let T=s.value.value;if(T===""){a("update:modelValue",null),a("change",null);return}let J=parseFloat(T);if(!isNaN(J)){let x=v(J);a("update:modelValue",x),a("change",x),w(x)}}let k=H(()=>["nb-number-input",`nb-number-input--${r.variant}`,`nb-number-input--${r.size}`,{"nb-number-input--error":!!r.error,"nb-number-input--warning":!r.error&&!!r.warning,"nb-number-input--disabled":r.disabled}]),V=H(()=>({"nb-number-input__field-wrapper--focused":l.value,"nb-number-input__field-wrapper--error":!!r.error,"nb-number-input__field-wrapper--warning":!r.error&&!!r.warning,"nb-number-input__field-wrapper--disabled":r.disabled}));return t({focus:()=>{var T;return(T=s.value)==null?void 0:T.focus()}}),(T,J)=>(p(),$("div",{class:Te(k.value)},[e.variant==="default"?(p(),$($e,{key:0},[e.label?(p(),le(Os,{key:0,for:u.value,required:e.required,disabled:e.disabled},{default:I(()=>[_e(K(e.label),1)]),_:1},8,["for","required","disabled"])):P("",!0),M("div",{class:Te(["nb-number-input__field-wrapper",V.value])},[M("input",{id:u.value,ref_key:"inputRef",ref:s,"aria-invalid":Y(h),"aria-describedby":Y(d),type:"number",class:"nb-number-input__field",placeholder:e.placeholder,min:e.min,max:e.max,step:e.step,disabled:e.disabled,required:e.required,onInput:A,onBlur:L,onKeydown:J[0]||(J[0]=Bi(Qe(()=>{var x;return(x=s.value)==null?void 0:x.blur()},["prevent"]),["enter"])),onFocus:J[1]||(J[1]=x=>l.value=!0)},null,40,VI),e.error?(p(),le(_t,{key:0,variant:"error","icon-only":!0,live:"off","aria-hidden":"true",class:"nb-number-input__status"},{default:I(()=>[_e(K(e.error),1)]),_:1})):e.warning?(p(),le(_t,{key:1,variant:"warning","icon-only":!0,live:"off","aria-hidden":"true",class:"nb-number-input__status"},{default:I(()=>[_e(K(e.warning),1)]),_:1})):P("",!0),M("div",BI,[M("button",{type:"button",class:Te(["nb-number-input__stepper",{"nb-number-input__stepper--at-limit":m.value}]),disabled:e.disabled,"aria-label":Y(n).numberInputDecrease,onMousedown:J[2]||(J[2]=Qe(()=>{},["prevent"])),onClick:y},[ee(Ke,{name:Y(ic),size:16},null,8,["name"])],42,ZI),M("button",{type:"button",class:Te(["nb-number-input__stepper",{"nb-number-input__stepper--at-limit":g.value}]),disabled:e.disabled,"aria-label":Y(n).numberInputIncrease,onMousedown:J[3]||(J[3]=Qe(()=>{},["prevent"])),onClick:S},[ee(Ke,{name:Y(_0),size:16},null,8,["name"])],42,FI)])],2),e.error?(p(),le(_t,{id:Y(c).error,key:Y(_),variant:"error",live:Y(f),class:"nb-number-input__message"},{default:I(()=>[_e(K(e.error),1)]),_:1},8,["id","live"])):e.warning?(p(),le(_t,{id:Y(c).warning,key:Y(_),variant:"warning",live:Y(f),class:"nb-number-input__message"},{default:I(()=>[_e(K(e.warning),1)]),_:1},8,["id","live"])):e.helper?(p(),le(_t,{id:Y(c).helper,key:Y(_),variant:"helper",live:Y(f),class:"nb-number-input__message"},{default:I(()=>[_e(K(e.helper),1)]),_:1},8,["id","live"])):P("",!0)],64)):e.variant==="fluid"?(p(),$($e,{key:1},[M("div",{class:Te(["nb-number-input__field-wrapper",V.value])},[e.label?(p(),$("div",zI,[M("label",{for:u.value,class:"nb-number-input__inner-label"},[_e(K(e.label)+" ",1),e.required?(p(),$("span",WI,"*")):P("",!0)],8,UI),e.helper&&!e.error&&!e.warning?(p(),le(_t,{key:0,id:Y(c).helper,variant:"helper",live:"off","icon-only":!0,class:"nb-number-input__inner-message"},{default:I(()=>[_e(K(e.helper),1)]),_:1},8,["id"])):P("",!0)])):P("",!0),M("div",jI,[M("input",{id:u.value,ref_key:"inputRef",ref:s,"aria-invalid":Y(h),"aria-describedby":Y(d),type:"number",class:"nb-number-input__field",placeholder:e.placeholder,min:e.min,max:e.max,step:e.step,disabled:e.disabled,required:e.required,onInput:A,onBlur:L,onKeydown:J[4]||(J[4]=Bi(Qe(()=>{var x;return(x=s.value)==null?void 0:x.blur()},["prevent"]),["enter"])),onFocus:J[5]||(J[5]=x=>l.value=!0)},null,40,KI),e.error?(p(),le(_t,{key:0,variant:"error","icon-only":!0,live:"off","aria-hidden":"true",class:"nb-number-input__status"},{default:I(()=>[_e(K(e.error),1)]),_:1})):e.warning?(p(),le(_t,{key:1,variant:"warning","icon-only":!0,live:"off","aria-hidden":"true",class:"nb-number-input__status"},{default:I(()=>[_e(K(e.warning),1)]),_:1})):P("",!0),M("div",qI,[M("button",{type:"button",class:Te(["nb-number-input__stepper",{"nb-number-input__stepper--at-limit":m.value}]),disabled:e.disabled,"aria-label":Y(n).numberInputDecrease,onMousedown:J[6]||(J[6]=Qe(()=>{},["prevent"])),onClick:y},[ee(Ke,{name:Y(ic),size:16},null,8,["name"])],42,GI),M("button",{type:"button",class:Te(["nb-number-input__stepper",{"nb-number-input__stepper--at-limit":g.value}]),disabled:e.disabled,"aria-label":Y(n).numberInputIncrease,onMousedown:J[7]||(J[7]=Qe(()=>{},["prevent"])),onClick:S},[ee(Ke,{name:Y(_0),size:16},null,8,["name"])],42,YI)])])],2),e.error?(p(),le(_t,{id:Y(c).error,key:Y(_),variant:"error",live:Y(f),class:"nb-number-input__fluid-message"},{default:I(()=>[_e(K(e.error),1)]),_:1},8,["id","live"])):e.warning?(p(),le(_t,{id:Y(c).warning,key:Y(_),variant:"warning",live:Y(f),class:"nb-number-input__fluid-message"},{default:I(()=>[_e(K(e.warning),1)]),_:1},8,["id","live"])):P("",!0)],64)):P("",!0)],2))}}),[["__scopeId","data-v-abb2bc53"]]),XI=["aria-label"],JI=["stop-color"],QI=["stop-color"],eR=["d","fill"],tR=["d","stroke","stroke-width"],T8=100,Xa=30,iR=Je(Ne({__name:"Sparkline",props:{data:{},color:{default:"var(--nb-c-primary)"},height:{default:40},width:{default:"100%"},strokeWidth:{default:1.5},fill:{type:Boolean,default:!0},smooth:{type:Boolean,default:!0}},setup(e){let t=ar(),i=e,n=`0 0 ${T8} ${Xa}`,r=`nb-sparkline-grad-${an()}`,a=H(()=>({width:typeof i.width=="number"?`${i.width}px`:i.width,height:typeof i.height=="number"?`${i.height}px`:i.height})),s=H(()=>{let l=i.data;if(!l||l.length<2)return{line:"",area:""};let o=Math.max(...l),u=Math.min(...l),c=o-u||1,d=T8/(l.length-1),h=Xa*.08,f=Xa-h*2,_=l.map((w,S)=>({x:S*d,y:Xa-h-(w-u)/c*f})),m=`M ${_[0].x.toFixed(2)} ${_[0].y.toFixed(2)}`;if(i.smooth)for(let w=1;w<_.length;w++){let S=_[w-1],y=_[w],A=S.x+d*.45,L=S.y,k=y.x-d*.45,V=y.y;m+=` C ${A.toFixed(2)} ${L.toFixed(2)}, ${k.toFixed(2)} ${V.toFixed(2)}, ${y.x.toFixed(2)} ${y.y.toFixed(2)}`}else for(let w=1;w<_.length;w++)m+=` L ${_[w].x.toFixed(2)} ${_[w].y.toFixed(2)}`;let g=_[_.length-1],v=`${m} L ${g.x.toFixed(2)} ${Xa} L ${_[0].x.toFixed(2)} ${Xa} Z`;return{line:m,area:v}});return(l,o)=>(p(),$("svg",{class:"nb-sparkline",style:ft(a.value),viewBox:n,preserveAspectRatio:"none",role:"img","aria-label":Y(t).chartSparkline,xmlns:"http://www.w3.org/2000/svg"},[M("defs",null,[M("linearGradient",{id:r,x1:"0",y1:"0",x2:"0",y2:"1"},[M("stop",{offset:"0%","stop-color":e.color,"stop-opacity":"0.3"},null,8,JI),M("stop",{offset:"100%","stop-color":e.color,"stop-opacity":"0"},null,8,QI)])]),e.fill&&s.value.area?(p(),$("path",{key:0,d:s.value.area,fill:`url(#${r})`,stroke:"none"},null,8,eR)):P("",!0),s.value.line?(p(),$("path",{key:1,d:s.value.line,stroke:e.color,"stroke-width":e.strokeWidth,"vector-effect":"non-scaling-stroke",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,8,tR)):P("",!0)],12,XI))}}),[["__scopeId","data-v-1627fc2f"]]),Ob=function(e){return e.Line="line",e.Contained="contained",e}(Ob||{}),fh=function(e){return e.Small="sm",e.Medium="md",e.Large="lg",e}(fh||{}),nR=["aria-label"],rR=["id","data-tab-id","aria-selected","aria-controls","tabindex","disabled","onClick"],aR={class:"nb-tabs__label"},sR=["id","aria-labelledby"],iu=24,Yc=Je(Ne({__name:"Tabs",props:{items:{},ariaLabel:{default:void 0},modelValue:{default:void 0},variant:{default:Ob.Line},size:{default:fh.Medium},disabled:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},id:{default:void 0}},emits:["update:modelValue","change"],setup(e,{emit:t}){var me;let i=e,n=t,r=vi(),a=rr(i),s=X(null),l=H(()=>i.items.filter(U=>!h(U))),o=X(i.modelValue??((me=l.value[0])==null?void 0:me.id));Pe(()=>i.modelValue,U=>{U!=null&&(o.value=U)});let u=H(()=>{var ce;let U=i.modelValue??o.value,ve=i.items.find(ge=>ge.id===U);return ve&&!h(ve)?ve.id:(ce=l.value[0])==null?void 0:ce.id}),c=H(()=>i.size===fh.Large?18:16),d=H(()=>["nb-tabs",`nb-tabs--${i.variant}`,`nb-tabs--${i.size}`,{"nb-tabs--full-width":i.fullWidth,"nb-tabs--disabled":i.disabled,"nb-tabs--overflow":k.value,"nb-tabs--indicator":R.value!==null}]);function h(U){return i.disabled||!!U.disabled}function f(U){return`${a}-tab-${U}`}function _(U){return`${a}-panel-${U}`}function m(U){return Jf(r,U)}function g(U){h(U)||U.id===u.value||(o.value=U.id,n("update:modelValue",U.id),n("change",U.id,U))}function v(U){var ve;return[...((ve=s.value)==null?void 0:ve.querySelectorAll("[data-tab-id]"))??[]].find(ce=>ce.dataset.tabId===U)}function w(U){var ve;(ve=v(U))==null||ve.focus()}function S(U){let ve=l.value;if(!ve.length)return;let ce=ve[(ve.findIndex(ge=>ge.id===u.value)+U+ve.length)%ve.length];g(ce),w(ce.id)}function y(U){U&&(g(U),w(U.id))}let{phone:A}=ln(),L=X(null),k=X(!1),V=H(()=>A.value||k.value);function T(){let U=L.value,ve=s.value;!U||!ve||(k.value=ve.scrollWidth>U.clientWidth+1)}let J=X(!1),x=X(!1);function N(){let U=s.value;if(!V.value||!U)return;let ve=U.scrollWidth-U.clientWidth;J.value=U.scrollLeft>1,x.value=U.scrollLeft<ve-1}function O(){let U=s.value;if(!V.value||!U)return;let ve=v(u.value);if(ve){let ce=U.getBoundingClientRect(),ge=ve.getBoundingClientRect(),ue=ge.left-ce.left+U.scrollLeft,pe=ue+ge.width,W=[...U.querySelectorAll("[data-tab-id]")],he=ve===W[0],te=ve===W[W.length-1];ue<U.scrollLeft+(he?0:iu)?U.scrollLeft=Math.max(0,he?0:ue-iu):pe>U.scrollLeft+U.clientWidth-(te?0:iu)&&(U.scrollLeft=pe-U.clientWidth+(te?0:iu))}N()}let R=X(null);function j(){let U=v(u.value),ve=(U==null?void 0:U.offsetWidth)??0;if(!U||ve===0){R.value=null;return}let ce=U.offsetLeft,ge=R.value;ge&&ge.left===ce&&ge.width===ve||(R.value={left:ce,width:ve})}Pe([u,V],()=>wt(()=>{O(),j()}));function G(){T(),O(),j()}let ae=null;function q(){!ae||!L.value||!s.value||(ae.disconnect(),ae.observe(L.value),s.value.querySelectorAll("[data-tab-id]").forEach(U=>ae==null?void 0:ae.observe(U)))}Pe(()=>i.items,()=>wt(()=>{q(),G()}),{deep:!0}),et(()=>{T(),O(),j(),window.addEventListener("resize",G,{passive:!0}),typeof ResizeObserver<"u"&&(ae=new ResizeObserver(G),q())}),Tt(()=>{window.removeEventListener("resize",G),ae==null||ae.disconnect(),ae=null});function se(U){switch(U.key){case"ArrowRight":S(1);break;case"ArrowLeft":S(-1);break;case"Home":y(l.value[0]);break;case"End":y(l.value[l.value.length-1]);break;default:return}U.preventDefault()}return(U,ve)=>(p(),$("div",{ref_key:"rootRef",ref:L,class:Te(d.value)},[M("div",{ref_key:"listRef",ref:s,class:Te(["nb-tabs__list",{"nb-tabs__list--fade-start":V.value&&J.value,"nb-tabs__list--fade-end":V.value&&x.value}]),role:"tablist","aria-label":e.ariaLabel||void 0,onKeydown:se,onScrollPassive:N},[(p(!0),$($e,null,Ue(e.items,ce=>(p(),$("button",{id:f(ce.id),key:ce.id,"data-tab-id":ce.id,type:"button",role:"tab",class:Te(["nb-tabs__tab",{"nb-tabs__tab--active":ce.id===u.value}]),"aria-selected":ce.id===u.value,"aria-controls":m(ce.id)?_(ce.id):void 0,tabindex:ce.id===u.value?0:-1,disabled:h(ce),onClick:ge=>g(ce)},[ce.icon?(p(),le(Ke,{key:0,name:ce.icon,size:c.value,class:"nb-tabs__icon"},null,8,["name","size"])):P("",!0),M("span",aR,K(ce.label),1),ce.badge==null?P("",!0):(p(),le(Er,{key:1,size:"sm",class:"nb-tabs__badge"},{default:I(()=>[_e(K(ce.badge),1)]),_:2},1024))],10,rR))),128)),R.value?(p(),$("span",{key:0,class:"nb-tabs__indicator","aria-hidden":"true",style:ft({transform:`translateX(${R.value.left}px)`,width:`${R.value.width}px`})},null,4)):P("",!0)],42,nR),(p(!0),$($e,null,Ue(e.items,ce=>(p(),$($e,{key:`panel-${ce.id}`},[ce.id===u.value&&m(ce.id)?(p(),$("div",{key:0,id:_(ce.id),class:"nb-tabs__panel",role:"tabpanel","aria-labelledby":f(ce.id),tabindex:"0"},[Ae(U.$slots,ce.id,{item:ce},void 0,!0)],8,sR)):P("",!0)],64))),128))],2))}}),[["__scopeId","data-v-8b4b9149"]]),lR={class:"nb-shell-panel__header"},oR={class:"nb-shell-panel__header-left"},uR=["title"],cR={class:"nb-shell-panel__header-center"},dR={class:"nb-shell-panel__toolbar"},hR=["aria-label"],fR=["aria-pressed"],pR=["aria-pressed"],_R=["aria-pressed"],mR={key:0,class:"nb-shell-panel__content"},w2=Je(Ne({__name:"ShellPanel",props:{size:{default:"default"},title:{default:""},fluid:{type:Boolean,default:!1},fill:{type:Boolean,default:!1}},emits:["update:size"],setup(e,{expose:t,emit:i}){let n=e,{layerProps:r}=ua(),a=i,s=X(n.size);Pe(()=>n.size,u=>s.value=u);let l=H({get:()=>s.value,set:u=>{s.value=u,a("update:size",u)}});function o(u){l.value=u}return t({setSize:o}),(u,c)=>(p(),$("div",yt({class:"nb-shell-panel"},Y(r),{class:[l.value,{"nb-shell-panel--fluid":e.fluid,"nb-shell-panel--fill":e.fill}]}),[M("div",lR,[M("div",oR,[e.title?(p(),$("span",{key:0,class:"nb-shell-panel__title",title:e.title},K(e.title),9,uR)):P("",!0),Ae(u.$slots,"title",{},void 0,!0)]),M("div",cR,[M("div",dR,[Ae(u.$slots,"toolbar",{},void 0,!0)])]),M("div",{class:"nb-shell-panel__header-right",role:"group","aria-label":e.title?`${e.title} panel size`:"Panel size"},[Ae(u.$slots,"controls",{},()=>[M("button",{type:"button",class:Te(["nb-shell-panel__size-btn",{active:l.value==="collapsed"}]),"aria-pressed":l.value==="collapsed",title:"Minimize","aria-label":"Minimize",onClick:c[0]||(c[0]=d=>o("collapsed"))},[...c[3]||(c[3]=[M("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true"},[M("line",{x1:"2",y1:"10",x2:"10",y2:"10",stroke:"currentColor","stroke-width":"1.5"})],-1)])],10,fR),M("button",{type:"button",class:Te(["nb-shell-panel__size-btn",{active:l.value==="default"}]),"aria-pressed":l.value==="default",title:"Default","aria-label":"Default",onClick:c[1]||(c[1]=d=>o("default"))},[...c[4]||(c[4]=[M("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true"},[M("rect",{x:"1",y:"5",width:"10",height:"6",rx:"1",fill:"none",stroke:"currentColor","stroke-width":"1.2"})],-1)])],10,pR),M("button",{type:"button",class:Te(["nb-shell-panel__size-btn",{active:l.value==="full"}]),"aria-pressed":l.value==="full",title:"Maximize","aria-label":"Maximize",onClick:c[2]||(c[2]=d=>o("full"))},[...c[5]||(c[5]=[M("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true"},[M("rect",{x:"1",y:"1",width:"10",height:"10",rx:"1",fill:"none",stroke:"currentColor","stroke-width":"1.2"}),M("line",{x1:"1",y1:"3.5",x2:"11",y2:"3.5",stroke:"currentColor","stroke-width":"1.2"})],-1)])],10,_R)],!0)],8,hR)]),l.value==="collapsed"?P("",!0):(p(),$("div",mR,[Ae(u.$slots,"default",{},void 0,!0)]))],16))}}),[["__scopeId","data-v-14692e8f"]]);const vR="modulepreload",gR=function(e){return"/"+e},H8={},N8=function(t,i,n){let r=Promise.resolve();if(i&&i.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=Promise.allSettled(i.map(o=>{if(o=gR(o),o in H8)return;H8[o]=!0;const u=o.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":vR,u||(d.as="script"),d.crossOrigin="",d.href=o,l&&d.setAttribute("nonce",l),document.head.appendChild(d),u)return new Promise((h,f)=>{d.addEventListener("load",h),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})}))}function a(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return r.then(s=>{for(const l of s||[])l.status==="rejected"&&a(l.reason);return t().catch(a)})};var bR=Ne({__name:"Form",props:{title:{default:void 0}},setup(e){return(t,i)=>(p(),le(Zi,{is:"form",dir:"col",gap:"md",class:"nb-form"},{default:I(()=>[e.title?(p(),le(Zi,{key:0,is:"h4",class:"nb-form--header"},{default:I(()=>[_e(K(e.title),1)]),_:1})):P("",!0),t.$slots.message?(p(),le(Zi,{key:1,is:"p",class:"nb-form--message"},{default:I(()=>[Ae(t.$slots,"message")]),_:3})):P("",!0),t.$slots.default?(p(),le(Zi,{key:2,is:"div",dir:"col",gap:"sm",class:"nb-form--body"},{default:I(()=>[Ae(t.$slots,"default")]),_:3})):P("",!0),t.$slots.footer?(p(),le(Zi,{key:3,is:"footer",class:"nb-form--footer",justify:"end"},{default:I(()=>[Ae(t.$slots,"footer")]),_:3})):P("",!0)]),_:3}))}});const yR=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},S2=yR("trash","0 0 256 256",'<path d="M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"/>');var wR=900,Ib=class extends Error{constructor(){super("confirm timed out"),this.name="ConfirmTimeout"}},SR="This is taking longer than expected. It may still be running. Check before trying again.",ca=An(null),Xc=X(!1),ls=X(!1),nc=X(!1),rc=X(void 0),Rb=[],Ja=null,nu=null,wu=null,Su=null;function CR(){return Dc()?0:vb}function kR(){Su&&clearTimeout(Su),Su=null}var AR="Could not complete the request. Try again.";function $R(e){return console.error("[nubisco-ui] useConfirm: onConfirm failed",e),AR}function MR(){wu=null;let e=Rb.shift()??null;ca.value=e,Xc.value=!!e}function P8(e,t){return!e.done&&e.attempt===t&&ca.value===e}function Cu(e,t=ca.value){!t||t.done||t===ca.value&&(t.done=!0,kR(),Xc.value=!1,ls.value=!1,nc.value=!1,rc.value=void 0,t.resolve(e),wu&&clearTimeout(wu),wu=setTimeout(MR,CR()))}function LR(e,t){return new Promise((i,n)=>{let r=setTimeout(()=>n(new Ib),t);e.then(a=>{clearTimeout(r),i(a)},a=>{clearTimeout(r),n(a)})})}async function ER(){let e=ca.value;if(!e||e.done||ls.value||nc.value)return;let{onConfirm:t,formatError:i,timeout:n,timeoutMessage:r,successLabel:a}=e.options;if(!t){Cu(!0,e);return}let s=++e.attempt;ls.value=!0,rc.value=void 0;try{let l=Promise.resolve(t());if(await(n&&n>0?LR(l,n):l),!P8(e,s))return;ls.value=!1,a?(nc.value=!0,Su=setTimeout(()=>Cu(!0,e),wR)):Cu(!0,e)}catch(l){if(!P8(e,s))return;ls.value=!1,rc.value=l instanceof Ib?r??SR:(i??$R)(l)}}function xR(e){let t={...e??{title:""}};return delete t.onConfirm,delete t.formatError,delete t.body,t}var TR=Ne({name:"NbConfirmHost",setup(){return()=>{var i;let e=((i=ca.value)==null?void 0:i.options)??null,t=e==null?void 0:e.body;return He(QN,{...xR(e),open:Xc.value,busy:ls.value,succeeded:nc.value,error:rc.value??"",onConfirm:ER,onCancel:()=>Cu(!1)},t?{default:()=>t()}:void 0)}}});function HR(){if(!Ja){if(typeof document>"u")throw Error("[NbConfirm] confirm() needs a DOM. It cannot run during server-side rendering or in a non-browser environment. Call it from an event handler, not from setup().");nu=document.createElement("div"),nu.setAttribute("data-nb-confirm-host",""),document.body.appendChild(nu),Ja=Eg(TR),Ja.component("NbIcon",Ke),Ja.component("NbGrid",Zi),Ja.config.warnHandler=(e,t,i)=>{if(e.includes("Failed to resolve component")){console.error(`[NbConfirm] ${e} The dialog runs in its own Vue app, so a sibling resolved by name has to be registered in useConfirm.composable.ts. Import it in NbConfirm instead where you can.`);return}console.warn(`[NbConfirm] ${e}${i}`)},Ja.mount(nu)}}function NR(e){return HR(),new Promise(t=>{let i={options:e,resolve:t,attempt:0,done:!1};if(ca.value){Rb.push(i);return}ca.value=i,Xc.value=!0})}function C2(){return NR}var Db={storageKey:"nubisco.named-theme",defaultTheme:null,attribute:"data-nb-theme",themes:null,persist:!0},nn={...Db},ph=X(Db.defaultTheme);function Vb(e){return typeof e=="string"&&/^[a-z0-9-]{1,64}$/.test(e)}function Bb(e){return!nn.themes||nn.themes.includes(e)}function PR(){if(!nn.persist)return null;try{if(typeof localStorage>"u")return null;let e=localStorage.getItem(nn.storageKey);return e===null||e===""?null:Vb(e)&&Bb(e)?e:null}catch{return null}}function OR(e){if(nn.persist)try{if(typeof localStorage>"u")return;e===null?localStorage.removeItem(nn.storageKey):localStorage.setItem(nn.storageKey,e)}catch{}}function O8(){if(typeof document>"u")return;let e=ph.value;e===null?document.documentElement.removeAttribute(nn.attribute):document.documentElement.setAttribute(nn.attribute,e)}var ru=null;function IR(){let e=PR(),t=nn.defaultTheme;ph.value=e??(t!==null&&Vb(t)&&Bb(t)?t:null),O8(),ru==null||ru(),ru=Pe(ph,i=>{OR(i),O8()})}function RR(e={}){nn={...nn,...e,themes:e.themes??nn.themes},IR()}var DR=["compact","verbose"];function Zb(e){return typeof e=="string"&&DR.includes(e)}function VR(e){var t;try{let i=(t=globalThis.localStorage)==null?void 0:t.getItem(e);return Zb(i)?i:null}catch{return null}}function BR(e,t){var i;try{(i=globalThis.localStorage)==null||i.setItem(e,t)}catch{}}function ZR(e){let t=X(VR(e.storageKey)??e.defaultVariant??"verbose");return Pe(t,i=>BR(e.storageKey,i)),{variant:t,isCompact:H(()=>t.value==="compact"),toggle:()=>{t.value=t.value==="compact"?"verbose":"compact"},setVariant:i=>{Zb(i)&&(t.value=i)}}}const jt=(e,t)=>{const i=e.__vccOpts||e;for(const[n,r]of t)i[n]=r;return i},FR={};function zR(e,t){const i=Qo("RouterView"),n=gO;return p(),$($e,null,[ee(i),ee(n)],64)}const UR=jt(FR,[["render",zR]]);/*!
|
|
44
|
+
* vue-router v4.6.4
|
|
45
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
46
|
+
* @license MIT
|
|
47
|
+
*/const rs=typeof document<"u";function Fb(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function WR(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Fb(e.default)}const vt=Object.assign;function V1(e,t){const i={};for(const n in t){const r=t[n];i[n]=Mn(r)?r.map(e):e(r)}return i}const Uo=()=>{},Mn=Array.isArray;function I8(e,t){const i={};for(const n in e)i[n]=n in t?t[n]:e[n];return i}const zb=/#/g,jR=/&/g,KR=/\//g,qR=/=/g,GR=/\?/g,Ub=/\+/g,YR=/%5B/g,XR=/%5D/g,Wb=/%5E/g,JR=/%60/g,jb=/%7B/g,QR=/%7C/g,Kb=/%7D/g,eD=/%20/g;function k2(e){return e==null?"":encodeURI(""+e).replace(QR,"|").replace(YR,"[").replace(XR,"]")}function tD(e){return k2(e).replace(jb,"{").replace(Kb,"}").replace(Wb,"^")}function _h(e){return k2(e).replace(Ub,"%2B").replace(eD,"+").replace(zb,"%23").replace(jR,"%26").replace(JR,"`").replace(jb,"{").replace(Kb,"}").replace(Wb,"^")}function iD(e){return _h(e).replace(qR,"%3D")}function nD(e){return k2(e).replace(zb,"%23").replace(GR,"%3F")}function rD(e){return nD(e).replace(KR,"%2F")}function m0(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const aD=/\/$/,sD=e=>e.replace(aD,"");function B1(e,t,i="/"){let n,r={},a="",s="";const l=t.indexOf("#");let o=t.indexOf("?");return o=l>=0&&o>l?-1:o,o>=0&&(n=t.slice(0,o),a=t.slice(o,l>0?l:t.length),r=e(a.slice(1))),l>=0&&(n=n||t.slice(0,l),s=t.slice(l,t.length)),n=cD(n??t,i),{fullPath:n+a+s,path:n,query:r,hash:m0(s)}}function lD(e,t){const i=t.query?e(t.query):"";return t.path+(i&&"?")+i+(t.hash||"")}function R8(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function oD(e,t,i){const n=t.matched.length-1,r=i.matched.length-1;return n>-1&&n===r&&ws(t.matched[n],i.matched[r])&&qb(t.params,i.params)&&e(t.query)===e(i.query)&&t.hash===i.hash}function ws(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function qb(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var i in e)if(!uD(e[i],t[i]))return!1;return!0}function uD(e,t){return Mn(e)?D8(e,t):Mn(t)?D8(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function D8(e,t){return Mn(t)?e.length===t.length&&e.every((i,n)=>i===t[n]):e.length===1&&e[0]===t}function cD(e,t){if(e.startsWith("/"))return e;if(!e)return t;const i=t.split("/"),n=e.split("/"),r=n[n.length-1];(r===".."||r===".")&&n.push("");let a=i.length-1,s,l;for(s=0;s<n.length;s++)if(l=n[s],l!==".")if(l==="..")a>1&&a--;else break;return i.slice(0,a).join("/")+"/"+n.slice(s).join("/")}const Ir={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let mh=function(e){return e.pop="pop",e.push="push",e}({}),Z1=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function dD(e){if(!e)if(rs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),sD(e)}const hD=/^[^#]+#/;function fD(e,t){return e.replace(hD,"#")+t}function pD(e,t){const i=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-i.left-(t.left||0),top:n.top-i.top-(t.top||0)}}const Jc=()=>({left:window.scrollX,top:window.scrollY});function _D(e){let t;if("el"in e){const i=e.el,n=typeof i=="string"&&i.startsWith("#"),r=typeof i=="string"?n?document.getElementById(i.slice(1)):document.querySelector(i):i;if(!r)return;t=pD(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function V8(e,t){return(history.state?history.state.position-t:-1)+e}const vh=new Map;function mD(e,t){vh.set(e,t)}function vD(e){const t=vh.get(e);return vh.delete(e),t}function gD(e){return typeof e=="string"||e&&typeof e=="object"}function Gb(e){return typeof e=="string"||typeof e=="symbol"}let Ft=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const Yb=Symbol("");Ft.MATCHER_NOT_FOUND+"",Ft.NAVIGATION_GUARD_REDIRECT+"",Ft.NAVIGATION_ABORTED+"",Ft.NAVIGATION_CANCELLED+"",Ft.NAVIGATION_DUPLICATED+"";function Ss(e,t){return vt(new Error,{type:e,[Yb]:!0},t)}function cr(e,t){return e instanceof Error&&Yb in e&&(t==null||!!(e.type&t))}const bD=["params","query","hash"];function yD(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const i of bD)i in e&&(t[i]=e[i]);return JSON.stringify(t,null,2)}function wD(e){const t={};if(e===""||e==="?")return t;const i=(e[0]==="?"?e.slice(1):e).split("&");for(let n=0;n<i.length;++n){const r=i[n].replace(Ub," "),a=r.indexOf("="),s=m0(a<0?r:r.slice(0,a)),l=a<0?null:m0(r.slice(a+1));if(s in t){let o=t[s];Mn(o)||(o=t[s]=[o]),o.push(l)}else t[s]=l}return t}function B8(e){let t="";for(let i in e){const n=e[i];if(i=iD(i),n==null){n!==void 0&&(t+=(t.length?"&":"")+i);continue}(Mn(n)?n.map(r=>r&&_h(r)):[n&&_h(n)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+i,r!=null&&(t+="="+r))})}return t}function SD(e){const t={};for(const i in e){const n=e[i];n!==void 0&&(t[i]=Mn(n)?n.map(r=>r==null?null:""+r):n==null?n:""+n)}return t}const CD=Symbol(""),Z8=Symbol(""),Qc=Symbol(""),A2=Symbol(""),gh=Symbol("");function vo(){let e=[];function t(n){return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}function i(){e=[]}return{add:t,list:()=>e.slice(),reset:i}}function jr(e,t,i,n,r,a=s=>s()){const s=n&&(n.enterCallbacks[r]=n.enterCallbacks[r]||[]);return()=>new Promise((l,o)=>{const u=h=>{h===!1?o(Ss(Ft.NAVIGATION_ABORTED,{from:i,to:t})):h instanceof Error?o(h):gD(h)?o(Ss(Ft.NAVIGATION_GUARD_REDIRECT,{from:t,to:h})):(s&&n.enterCallbacks[r]===s&&typeof h=="function"&&s.push(h),l())},c=a(()=>e.call(n&&n.instances[r],t,i,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(h=>o(h))})}function F1(e,t,i,n,r=a=>a()){const a=[];for(const s of e)for(const l in s.components){let o=s.components[l];if(!(t!=="beforeRouteEnter"&&!s.instances[l]))if(Fb(o)){const u=(o.__vccOpts||o)[t];u&&a.push(jr(u,i,n,s,l,r))}else{let u=o();a.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${l}" at "${s.path}"`);const d=WR(c)?c.default:c;s.mods[l]=c,s.components[l]=d;const h=(d.__vccOpts||d)[t];return h&&jr(h,i,n,s,l,r)()}))}}return a}function kD(e,t){const i=[],n=[],r=[],a=Math.max(t.matched.length,e.matched.length);for(let s=0;s<a;s++){const l=t.matched[s];l&&(e.matched.find(u=>ws(u,l))?n.push(l):i.push(l));const o=e.matched[s];o&&(t.matched.find(u=>ws(u,o))||r.push(o))}return[i,n,r]}/*!
|
|
48
|
+
* vue-router v4.6.4
|
|
49
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
50
|
+
* @license MIT
|
|
51
|
+
*/let AD=()=>location.protocol+"//"+location.host;function Xb(e,t){const{pathname:i,search:n,hash:r}=t,a=e.indexOf("#");if(a>-1){let s=r.includes(e.slice(a))?e.slice(a).length:1,l=r.slice(s);return l[0]!=="/"&&(l="/"+l),R8(l,"")}return R8(i,e)+n+r}function $D(e,t,i,n){let r=[],a=[],s=null;const l=({state:h})=>{const f=Xb(e,location),_=i.value,m=t.value;let g=0;if(h){if(i.value=f,t.value=h,s&&s===_){s=null;return}g=m?h.position-m.position:0}else n(f);r.forEach(v=>{v(i.value,_,{delta:g,type:mh.pop,direction:g?g>0?Z1.forward:Z1.back:Z1.unknown})})};function o(){s=i.value}function u(h){r.push(h);const f=()=>{const _=r.indexOf(h);_>-1&&r.splice(_,1)};return a.push(f),f}function c(){if(document.visibilityState==="hidden"){const{history:h}=window;if(!h.state)return;h.replaceState(vt({},h.state,{scroll:Jc()}),"")}}function d(){for(const h of a)h();a=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:o,listen:u,destroy:d}}function F8(e,t,i,n=!1,r=!1){return{back:e,current:t,forward:i,replaced:n,position:window.history.length,scroll:r?Jc():null}}function MD(e){const{history:t,location:i}=window,n={value:Xb(e,i)},r={value:t.state};r.value||a(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(o,u,c){const d=e.indexOf("#"),h=d>-1?(i.host&&document.querySelector("base")?e:e.slice(d))+o:AD()+e+o;try{t[c?"replaceState":"pushState"](u,"",h),r.value=u}catch(f){console.error(f),i[c?"replace":"assign"](h)}}function s(o,u){a(o,vt({},t.state,F8(r.value.back,o,r.value.forward,!0),u,{position:r.value.position}),!0),n.value=o}function l(o,u){const c=vt({},r.value,t.state,{forward:o,scroll:Jc()});a(c.current,c,!0),a(o,vt({},F8(n.value,o,null),{position:c.position+1},u),!1),n.value=o}return{location:n,state:r,push:l,replace:s}}function LD(e){e=dD(e);const t=MD(e),i=$D(e,t.state,t.location,t.replace);function n(a,s=!0){s||i.pauseListeners(),history.go(a)}const r=vt({location:"",base:e,go:n,createHref:fD.bind(null,e)},t,i);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let Ra=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var ai=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(ai||{});const ED={type:Ra.Static,value:""},xD=/[a-zA-Z0-9_]/;function TD(e){if(!e)return[[]];if(e==="/")return[[ED]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(f){throw new Error(`ERR (${i})/"${u}": ${f}`)}let i=ai.Static,n=i;const r=[];let a;function s(){a&&r.push(a),a=[]}let l=0,o,u="",c="";function d(){u&&(i===ai.Static?a.push({type:Ra.Static,value:u}):i===ai.Param||i===ai.ParamRegExp||i===ai.ParamRegExpEnd?(a.length>1&&(o==="*"||o==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),a.push({type:Ra.Param,value:u,regexp:c,repeatable:o==="*"||o==="+",optional:o==="*"||o==="?"})):t("Invalid state to consume buffer"),u="")}function h(){u+=o}for(;l<e.length;){if(o=e[l++],o==="\\"&&i!==ai.ParamRegExp){n=i,i=ai.EscapeNext;continue}switch(i){case ai.Static:o==="/"?(u&&d(),s()):o===":"?(d(),i=ai.Param):h();break;case ai.EscapeNext:h(),i=n;break;case ai.Param:o==="("?i=ai.ParamRegExp:xD.test(o)?h():(d(),i=ai.Static,o!=="*"&&o!=="?"&&o!=="+"&&l--);break;case ai.ParamRegExp:o===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+o:i=ai.ParamRegExpEnd:c+=o;break;case ai.ParamRegExpEnd:d(),i=ai.Static,o!=="*"&&o!=="?"&&o!=="+"&&l--,c="";break;default:t("Unknown state");break}}return i===ai.ParamRegExp&&t(`Unfinished custom RegExp for param "${u}"`),d(),s(),r}const z8="[^/]+?",HD={sensitive:!1,strict:!1,start:!0,end:!0};var Di=function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e}(Di||{});const ND=/[.+*?^${}()[\]/\\]/g;function PD(e,t){const i=vt({},HD,t),n=[];let r=i.start?"^":"";const a=[];for(const u of e){const c=u.length?[]:[Di.Root];i.strict&&!u.length&&(r+="/");for(let d=0;d<u.length;d++){const h=u[d];let f=Di.Segment+(i.sensitive?Di.BonusCaseSensitive:0);if(h.type===Ra.Static)d||(r+="/"),r+=h.value.replace(ND,"\\$&"),f+=Di.Static;else if(h.type===Ra.Param){const{value:_,repeatable:m,optional:g,regexp:v}=h;a.push({name:_,repeatable:m,optional:g});const w=v||z8;if(w!==z8){f+=Di.BonusCustomRegExp;try{`${w}`}catch(y){throw new Error(`Invalid custom RegExp for param "${_}" (${w}): `+y.message)}}let S=m?`((?:${w})(?:/(?:${w}))*)`:`(${w})`;d||(S=g&&u.length<2?`(?:/${S})`:"/"+S),g&&(S+="?"),r+=S,f+=Di.Dynamic,g&&(f+=Di.BonusOptional),m&&(f+=Di.BonusRepeatable),w===".*"&&(f+=Di.BonusWildcard)}c.push(f)}n.push(c)}if(i.strict&&i.end){const u=n.length-1;n[u][n[u].length-1]+=Di.BonusStrict}i.strict||(r+="/?"),i.end?r+="$":i.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const s=new RegExp(r,i.sensitive?"":"i");function l(u){const c=u.match(s),d={};if(!c)return null;for(let h=1;h<c.length;h++){const f=c[h]||"",_=a[h-1];d[_.name]=f&&_.repeatable?f.split("/"):f}return d}function o(u){let c="",d=!1;for(const h of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const f of h)if(f.type===Ra.Static)c+=f.value;else if(f.type===Ra.Param){const{value:_,repeatable:m,optional:g}=f,v=_ in u?u[_]:"";if(Mn(v)&&!m)throw new Error(`Provided param "${_}" is an array but it is not repeatable (* or + modifiers)`);const w=Mn(v)?v.join("/"):v;if(!w)if(g)h.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${_}"`);c+=w}}return c||"/"}return{re:s,score:n,keys:a,parse:l,stringify:o}}function OD(e,t){let i=0;for(;i<e.length&&i<t.length;){const n=t[i]-e[i];if(n)return n;i++}return e.length<t.length?e.length===1&&e[0]===Di.Static+Di.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Di.Static+Di.Segment?1:-1:0}function Jb(e,t){let i=0;const n=e.score,r=t.score;for(;i<n.length&&i<r.length;){const a=OD(n[i],r[i]);if(a)return a;i++}if(Math.abs(r.length-n.length)===1){if(U8(n))return 1;if(U8(r))return-1}return r.length-n.length}function U8(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const ID={strict:!1,end:!0,sensitive:!1};function RD(e,t,i){const n=PD(TD(e.path),i),r=vt(n,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function DD(e,t){const i=[],n=new Map;t=I8(ID,t);function r(d){return n.get(d)}function a(d,h,f){const _=!f,m=j8(d);m.aliasOf=f&&f.record;const g=I8(t,d),v=[m];if("alias"in d){const y=typeof d.alias=="string"?[d.alias]:d.alias;for(const A of y)v.push(j8(vt({},m,{components:f?f.record.components:m.components,path:A,aliasOf:f?f.record:m})))}let w,S;for(const y of v){const{path:A}=y;if(h&&A[0]!=="/"){const L=h.record.path,k=L[L.length-1]==="/"?"":"/";y.path=h.record.path+(A&&k+A)}if(w=RD(y,h,g),f?f.alias.push(w):(S=S||w,S!==w&&S.alias.push(w),_&&d.name&&!K8(w)&&s(d.name)),Qb(w)&&o(w),m.children){const L=m.children;for(let k=0;k<L.length;k++)a(L[k],w,f&&f.children[k])}f=f||w}return S?()=>{s(S)}:Uo}function s(d){if(Gb(d)){const h=n.get(d);h&&(n.delete(d),i.splice(i.indexOf(h),1),h.children.forEach(s),h.alias.forEach(s))}else{const h=i.indexOf(d);h>-1&&(i.splice(h,1),d.record.name&&n.delete(d.record.name),d.children.forEach(s),d.alias.forEach(s))}}function l(){return i}function o(d){const h=ZD(d,i);i.splice(h,0,d),d.record.name&&!K8(d)&&n.set(d.record.name,d)}function u(d,h){let f,_={},m,g;if("name"in d&&d.name){if(f=n.get(d.name),!f)throw Ss(Ft.MATCHER_NOT_FOUND,{location:d});g=f.record.name,_=vt(W8(h.params,f.keys.filter(S=>!S.optional).concat(f.parent?f.parent.keys.filter(S=>S.optional):[]).map(S=>S.name)),d.params&&W8(d.params,f.keys.map(S=>S.name))),m=f.stringify(_)}else if(d.path!=null)m=d.path,f=i.find(S=>S.re.test(m)),f&&(_=f.parse(m),g=f.record.name);else{if(f=h.name?n.get(h.name):i.find(S=>S.re.test(h.path)),!f)throw Ss(Ft.MATCHER_NOT_FOUND,{location:d,currentLocation:h});g=f.record.name,_=vt({},h.params,d.params),m=f.stringify(_)}const v=[];let w=f;for(;w;)v.unshift(w.record),w=w.parent;return{name:g,path:m,params:_,matched:v,meta:BD(v)}}e.forEach(d=>a(d));function c(){i.length=0,n.clear()}return{addRoute:a,resolve:u,removeRoute:s,clearRoutes:c,getRoutes:l,getRecordMatcher:r}}function W8(e,t){const i={};for(const n of t)n in e&&(i[n]=e[n]);return i}function j8(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:VD(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function VD(e){const t={},i=e.props||!1;if("component"in e)t.default=i;else for(const n in e.components)t[n]=typeof i=="object"?i[n]:i;return t}function K8(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function BD(e){return e.reduce((t,i)=>vt(t,i.meta),{})}function ZD(e,t){let i=0,n=t.length;for(;i!==n;){const a=i+n>>1;Jb(e,t[a])<0?n=a:i=a+1}const r=FD(e);return r&&(n=t.lastIndexOf(r,n-1)),n}function FD(e){let t=e;for(;t=t.parent;)if(Qb(t)&&Jb(e,t)===0)return t}function Qb({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function q8(e){const t=At(Qc),i=At(A2),n=H(()=>{const o=Y(e.to);return t.resolve(o)}),r=H(()=>{const{matched:o}=n.value,{length:u}=o,c=o[u-1],d=i.matched;if(!c||!d.length)return-1;const h=d.findIndex(ws.bind(null,c));if(h>-1)return h;const f=G8(o[u-2]);return u>1&&G8(c)===f&&d[d.length-1].path!==f?d.findIndex(ws.bind(null,o[u-2])):h}),a=H(()=>r.value>-1&&KD(i.params,n.value.params)),s=H(()=>r.value>-1&&r.value===i.matched.length-1&&qb(i.params,n.value.params));function l(o={}){if(jD(o)){const u=t[Y(e.replace)?"replace":"push"](Y(e.to)).catch(Uo);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:n,href:H(()=>n.value.href),isActive:a,isExactActive:s,navigate:l}}function zD(e){return e.length===1?e[0]:e}const UD=Ne({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:q8,setup(e,{slots:t}){const i=kr(q8(e)),{options:n}=At(Qc),r=H(()=>({[Y8(e.activeClass,n.linkActiveClass,"router-link-active")]:i.isActive,[Y8(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:i.isExactActive}));return()=>{const a=t.default&&zD(t.default(i));return e.custom?a:He("a",{"aria-current":i.isExactActive?e.ariaCurrentValue:null,href:i.href,onClick:i.navigate,class:r.value},a)}}}),WD=UD;function jD(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function KD(e,t){for(const i in t){const n=t[i],r=e[i];if(typeof n=="string"){if(n!==r)return!1}else if(!Mn(r)||r.length!==n.length||n.some((a,s)=>a.valueOf()!==r[s].valueOf()))return!1}return!0}function G8(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Y8=(e,t,i)=>e??t??i,qD=Ne({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:i}){const n=At(gh),r=H(()=>e.route||n.value),a=At(Z8,0),s=H(()=>{let u=Y(a);const{matched:c}=r.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),l=H(()=>r.value.matched[s.value]);xi(Z8,H(()=>s.value+1)),xi(CD,l),xi(gh,r);const o=X();return Pe(()=>[o.value,l.value,e.name],([u,c,d],[h,f,_])=>{c&&(c.instances[d]=u,f&&f!==c&&u&&u===h&&(c.leaveGuards.size||(c.leaveGuards=f.leaveGuards),c.updateGuards.size||(c.updateGuards=f.updateGuards))),u&&c&&(!f||!ws(c,f)||!h)&&(c.enterCallbacks[d]||[]).forEach(m=>m(u))},{flush:"post"}),()=>{const u=r.value,c=e.name,d=l.value,h=d&&d.components[c];if(!h)return X8(i.default,{Component:h,route:u});const f=d.props[c],_=f?f===!0?u.params:typeof f=="function"?f(u):f:null,g=He(h,vt({},_,t,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(d.instances[c]=null)},ref:o}));return X8(i.default,{Component:g,route:u})||g}}});function X8(e,t){if(!e)return null;const i=e(t);return i.length===1?i[0]:i}const GD=qD;function YD(e){const t=DD(e.routes,e),i=e.parseQuery||wD,n=e.stringifyQuery||B8,r=e.history,a=vo(),s=vo(),l=vo(),o=An(Ir);let u=Ir;rs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=V1.bind(null,W=>""+W),d=V1.bind(null,rD),h=V1.bind(null,m0);function f(W,he){let te,be;return Gb(W)?(te=t.getRecordMatcher(W),be=he):be=W,t.addRoute(be,te)}function _(W){const he=t.getRecordMatcher(W);he&&t.removeRoute(he)}function m(){return t.getRoutes().map(W=>W.record)}function g(W){return!!t.getRecordMatcher(W)}function v(W,he){if(he=vt({},he||o.value),typeof W=="string"){const fe=B1(i,W,he.path),ne=t.resolve({path:fe.path},he),Z=r.createHref(fe.fullPath);return vt(fe,ne,{params:h(ne.params),hash:m0(fe.hash),redirectedFrom:void 0,href:Z})}let te;if(W.path!=null)te=vt({},W,{path:B1(i,W.path,he.path).path});else{const fe=vt({},W.params);for(const ne in fe)fe[ne]==null&&delete fe[ne];te=vt({},W,{params:d(fe)}),he.params=d(he.params)}const be=t.resolve(te,he),E=W.hash||"";be.params=c(h(be.params));const F=lD(n,vt({},W,{hash:tD(E),path:be.path})),ie=r.createHref(F);return vt({fullPath:F,hash:E,query:n===B8?SD(W.query):W.query||{}},be,{redirectedFrom:void 0,href:ie})}function w(W){return typeof W=="string"?B1(i,W,o.value.path):vt({},W)}function S(W,he){if(u!==W)return Ss(Ft.NAVIGATION_CANCELLED,{from:he,to:W})}function y(W){return k(W)}function A(W){return y(vt(w(W),{replace:!0}))}function L(W,he){const te=W.matched[W.matched.length-1];if(te&&te.redirect){const{redirect:be}=te;let E=typeof be=="function"?be(W,he):be;return typeof E=="string"&&(E=E.includes("?")||E.includes("#")?E=w(E):{path:E},E.params={}),vt({query:W.query,hash:W.hash,params:E.path!=null?{}:W.params},E)}}function k(W,he){const te=u=v(W),be=o.value,E=W.state,F=W.force,ie=W.replace===!0,fe=L(te,be);if(fe)return k(vt(w(fe),{state:typeof fe=="object"?vt({},E,fe.state):E,force:F,replace:ie}),he||te);const ne=te;ne.redirectedFrom=he;let Z;return!F&&oD(n,be,te)&&(Z=Ss(Ft.NAVIGATION_DUPLICATED,{to:ne,from:be}),U(be,be,!0,!1)),(Z?Promise.resolve(Z):J(ne,be)).catch(re=>cr(re)?cr(re,Ft.NAVIGATION_GUARD_REDIRECT)?re:me(re):q(re,ne,be)).then(re=>{if(re){if(cr(re,Ft.NAVIGATION_GUARD_REDIRECT))return k(vt({replace:ie},w(re.to),{state:typeof re.to=="object"?vt({},E,re.to.state):E,force:F}),he||ne)}else re=N(ne,be,!0,ie,E);return x(ne,be,re),re})}function V(W,he){const te=S(W,he);return te?Promise.reject(te):Promise.resolve()}function T(W){const he=ge.values().next().value;return he&&typeof he.runWithContext=="function"?he.runWithContext(W):W()}function J(W,he){let te;const[be,E,F]=kD(W,he);te=F1(be.reverse(),"beforeRouteLeave",W,he);for(const fe of be)fe.leaveGuards.forEach(ne=>{te.push(jr(ne,W,he))});const ie=V.bind(null,W,he);return te.push(ie),pe(te).then(()=>{te=[];for(const fe of a.list())te.push(jr(fe,W,he));return te.push(ie),pe(te)}).then(()=>{te=F1(E,"beforeRouteUpdate",W,he);for(const fe of E)fe.updateGuards.forEach(ne=>{te.push(jr(ne,W,he))});return te.push(ie),pe(te)}).then(()=>{te=[];for(const fe of F)if(fe.beforeEnter)if(Mn(fe.beforeEnter))for(const ne of fe.beforeEnter)te.push(jr(ne,W,he));else te.push(jr(fe.beforeEnter,W,he));return te.push(ie),pe(te)}).then(()=>(W.matched.forEach(fe=>fe.enterCallbacks={}),te=F1(F,"beforeRouteEnter",W,he,T),te.push(ie),pe(te))).then(()=>{te=[];for(const fe of s.list())te.push(jr(fe,W,he));return te.push(ie),pe(te)}).catch(fe=>cr(fe,Ft.NAVIGATION_CANCELLED)?fe:Promise.reject(fe))}function x(W,he,te){l.list().forEach(be=>T(()=>be(W,he,te)))}function N(W,he,te,be,E){const F=S(W,he);if(F)return F;const ie=he===Ir,fe=rs?history.state:{};te&&(be||ie?r.replace(W.fullPath,vt({scroll:ie&&fe&&fe.scroll},E)):r.push(W.fullPath,E)),o.value=W,U(W,he,te,ie),me()}let O;function R(){O||(O=r.listen((W,he,te)=>{if(!ue.listening)return;const be=v(W),E=L(be,ue.currentRoute.value);if(E){k(vt(E,{replace:!0,force:!0}),be).catch(Uo);return}u=be;const F=o.value;rs&&mD(V8(F.fullPath,te.delta),Jc()),J(be,F).catch(ie=>cr(ie,Ft.NAVIGATION_ABORTED|Ft.NAVIGATION_CANCELLED)?ie:cr(ie,Ft.NAVIGATION_GUARD_REDIRECT)?(k(vt(w(ie.to),{force:!0}),be).then(fe=>{cr(fe,Ft.NAVIGATION_ABORTED|Ft.NAVIGATION_DUPLICATED)&&!te.delta&&te.type===mh.pop&&r.go(-1,!1)}).catch(Uo),Promise.reject()):(te.delta&&r.go(-te.delta,!1),q(ie,be,F))).then(ie=>{ie=ie||N(be,F,!1),ie&&(te.delta&&!cr(ie,Ft.NAVIGATION_CANCELLED)?r.go(-te.delta,!1):te.type===mh.pop&&cr(ie,Ft.NAVIGATION_ABORTED|Ft.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),x(be,F,ie)}).catch(Uo)}))}let j=vo(),G=vo(),ae;function q(W,he,te){me(W);const be=G.list();return be.length?be.forEach(E=>E(W,he,te)):console.error(W),Promise.reject(W)}function se(){return ae&&o.value!==Ir?Promise.resolve():new Promise((W,he)=>{j.add([W,he])})}function me(W){return ae||(ae=!W,R(),j.list().forEach(([he,te])=>W?te(W):he()),j.reset()),W}function U(W,he,te,be){const{scrollBehavior:E}=e;if(!rs||!E)return Promise.resolve();const F=!te&&vD(V8(W.fullPath,0))||(be||!te)&&history.state&&history.state.scroll||null;return wt().then(()=>E(W,he,F)).then(ie=>ie&&_D(ie)).catch(ie=>q(ie,W,he))}const ve=W=>r.go(W);let ce;const ge=new Set,ue={currentRoute:o,listening:!0,addRoute:f,removeRoute:_,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:m,resolve:v,options:e,push:y,replace:A,go:ve,back:()=>ve(-1),forward:()=>ve(1),beforeEach:a.add,beforeResolve:s.add,afterEach:l.add,onError:G.add,isReady:se,install(W){W.component("RouterLink",WD),W.component("RouterView",GD),W.config.globalProperties.$router=ue,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>Y(o)}),rs&&!ce&&o.value===Ir&&(ce=!0,y(r.location).catch(be=>{}));const he={};for(const be in Ir)Object.defineProperty(he,be,{get:()=>o.value[be],enumerable:!0});W.provide(Qc,ue),W.provide(A2,kv(he)),W.provide(gh,o);const te=W.unmount;ge.add(W),W.unmount=function(){ge.delete(W),ge.size<1&&(u=Ir,O&&O(),O=null,o.value=Ir,ce=!1,ae=!1),te()}}};function pe(W){return W.reduce((he,te)=>he.then(()=>T(te)),Promise.resolve())}return ue}function al(){return At(Qc)}function sl(e){return At(A2)}const $2="/logo.svg",ll=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},XD=ll("book","0 0 256 256",'<path d="M208,28H72A28,28,0,0,0,44,56V224a4,4,0,0,0,4,4H192a4,4,0,0,0,0-8H52v-4a20,20,0,0,1,20-20H208a4,4,0,0,0,4-4V32A4,4,0,0,0,208,28Zm-4,160H72a27.94,27.94,0,0,0-20,8.42V56A20,20,0,0,1,72,36H204Z"/>'),JD=ll("book","0 0 256 256",'<path d="M208,26H72A30,30,0,0,0,42,56V224a6,6,0,0,0,6,6H192a6,6,0,0,0,0-12H54v-2a18,18,0,0,1,18-18H208a6,6,0,0,0,6-6V32A6,6,0,0,0,208,26Zm-6,160H72a29.87,29.87,0,0,0-18,6V56A18,18,0,0,1,72,38H202Z"/>'),J8=ll("book","0 0 256 256",'<path d="M208,24H72A32,32,0,0,0,40,56V224a8,8,0,0,0,8,8H192a8,8,0,0,0,0-16H56a16,16,0,0,1,16-16H208a8,8,0,0,0,8-8V32A8,8,0,0,0,208,24Zm-8,160H72a31.82,31.82,0,0,0-16,4.29V56A16,16,0,0,1,72,40H200Z"/>'),QD=ll("book","0 0 256 256",'<path d="M208,20H72A36,36,0,0,0,36,56V224a12,12,0,0,0,12,12H192a12,12,0,0,0,0-24H60v-4a12,12,0,0,1,12-12H208a12,12,0,0,0,12-12V32A12,12,0,0,0,208,20ZM196,172H72a35.59,35.59,0,0,0-12,2.06V56A12,12,0,0,1,72,44H196Z"/>'),eV=ll("book","0 0 256 256",'<path d="M216,32V192a8,8,0,0,1-8,8H72a16,16,0,0,0-16,16H192a8,8,0,0,1,0,16H48a8,8,0,0,1-8-8V56A32,32,0,0,1,72,24H208A8,8,0,0,1,216,32Z"/>'),tV=ll("book","0 0 256 256",'<path d="M208,32V192H72a24,24,0,0,0-24,24V56A24,24,0,0,1,72,32Z" opacity="0.2"/><path d="M208,24H72A32,32,0,0,0,40,56V224a8,8,0,0,0,8,8H192a8,8,0,0,0,0-16H56a16,16,0,0,1,16-16H208a8,8,0,0,0,8-8V32A8,8,0,0,0,208,24Zm-8,160H72a31.82,31.82,0,0,0-16,4.29V56A16,16,0,0,1,72,40H200Z"/>'),iV="book",nV=Object.freeze(Object.defineProperty({__proto__:null,bold:QD,default:J8,duotone:tV,fill:eV,glyphName:iV,light:JD,regular:J8,thin:XD},Symbol.toStringTag,{value:"Module"})),ol=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},rV=ol("heart","0 0 256 256",'<path d="M178,44c-21.44,0-39.92,10.19-50,27.07C117.92,54.19,99.44,44,78,44a58.07,58.07,0,0,0-58,58c0,28.59,18,58.47,53.4,88.79a333.81,333.81,0,0,0,52.7,36.73,4,4,0,0,0,3.8,0,333.81,333.81,0,0,0,52.7-36.73C218,160.47,236,130.59,236,102A58.07,58.07,0,0,0,178,44ZM128,219.42c-14-8-100-59.35-100-117.42A50.06,50.06,0,0,1,78,52c21.11,0,38.85,11.31,46.3,29.51a4,4,0,0,0,7.4,0C139.15,63.31,156.89,52,178,52a50.06,50.06,0,0,1,50,50C228,160,142,211.46,128,219.42Z"/>'),aV=ol("heart","0 0 256 256",'<path d="M178,42c-21,0-39.26,9.47-50,25.34C117.26,51.47,99,42,78,42a60.07,60.07,0,0,0-60,60c0,29.2,18.2,59.59,54.1,90.31a334.68,334.68,0,0,0,53.06,37,6,6,0,0,0,5.68,0,334.68,334.68,0,0,0,53.06-37C219.8,161.59,238,131.2,238,102A60.07,60.07,0,0,0,178,42ZM128,217.11C111.59,207.64,30,157.72,30,102A48.05,48.05,0,0,1,78,54c20.28,0,37.31,10.83,44.45,28.27a6,6,0,0,0,11.1,0C140.69,64.83,157.72,54,178,54a48.05,48.05,0,0,1,48,48C226,157.72,144.41,207.64,128,217.11Z"/>'),Q8=ol("heart","0 0 256 256",'<path d="M178,40c-20.65,0-38.73,8.88-50,23.89C116.73,48.88,98.65,40,78,40a62.07,62.07,0,0,0-62,62c0,70,103.79,126.66,108.21,129a8,8,0,0,0,7.58,0C136.21,228.66,240,172,240,102A62.07,62.07,0,0,0,178,40ZM128,214.8C109.74,204.16,32,155.69,32,102A46.06,46.06,0,0,1,78,56c19.45,0,35.78,10.36,42.6,27a8,8,0,0,0,14.8,0c6.82-16.67,23.15-27,42.6-27a46.06,46.06,0,0,1,46,46C224,155.61,146.24,204.15,128,214.8Z"/>'),sV=ol("heart","0 0 256 256",'<path d="M178,36c-20.09,0-37.92,7.93-50,21.56C115.92,43.93,98.09,36,78,36a66.08,66.08,0,0,0-66,66c0,72.34,105.81,130.14,110.31,132.57a12,12,0,0,0,11.38,0C138.19,232.14,244,174.34,244,102A66.08,66.08,0,0,0,178,36Zm-5.49,142.36A328.69,328.69,0,0,1,128,210.16a328.69,328.69,0,0,1-44.51-31.8C61.82,159.77,36,131.42,36,102A42,42,0,0,1,78,60c17.8,0,32.7,9.4,38.89,24.54a12,12,0,0,0,22.22,0C145.3,69.4,160.2,60,178,60a42,42,0,0,1,42,42C220,131.42,194.18,159.77,172.51,178.36Z"/>'),lV=ol("heart","0 0 256 256",'<path d="M240,102c0,70-103.79,126.66-108.21,129a8,8,0,0,1-7.58,0C119.79,228.66,16,172,16,102A62.07,62.07,0,0,1,78,40c20.65,0,38.73,8.88,50,23.89C139.27,48.88,157.35,40,178,40A62.07,62.07,0,0,1,240,102Z"/>'),oV=ol("heart","0 0 256 256",'<path d="M232,102c0,66-104,122-104,122S24,168,24,102A54,54,0,0,1,78,48c22.59,0,41.94,12.31,50,32,8.06-19.69,27.41-32,50-32A54,54,0,0,1,232,102Z" opacity="0.2"/><path d="M178,40c-20.65,0-38.73,8.88-50,23.89C116.73,48.88,98.65,40,78,40a62.07,62.07,0,0,0-62,62c0,70,103.79,126.66,108.21,129a8,8,0,0,0,7.58,0C136.21,228.66,240,172,240,102A62.07,62.07,0,0,0,178,40ZM128,214.8C109.74,204.16,32,155.69,32,102A46.06,46.06,0,0,1,78,56c19.45,0,35.78,10.36,42.6,27a8,8,0,0,0,14.8,0c6.82-16.67,23.15-27,42.6-27a46.06,46.06,0,0,1,46,46C224,155.61,146.24,204.15,128,214.8Z"/>'),uV="heart",cV=Object.freeze(Object.defineProperty({__proto__:null,bold:sV,default:Q8,duotone:oV,fill:lV,glyphName:uV,light:aV,regular:Q8,thin:rV},Symbol.toStringTag,{value:"Module"})),ul=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},dV=ul("gear","0 0 256 256",'<path d="M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z"/>'),hV=ul("gear","0 0 256 256",'<path d="M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z"/>'),e_=ul("gear","0 0 256 256",'<path d="M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"/>'),fV=ul("gear","0 0 256 256",'<path d="M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z"/>'),pV=ul("gear","0 0 256 256",'<path d="M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"/>'),_V=ul("gear","0 0 256 256",'<path d="M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z" opacity="0.2"/><path d="M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"/>'),mV="gear",ey=Object.freeze(Object.defineProperty({__proto__:null,bold:fV,default:e_,duotone:_V,fill:pV,glyphName:mV,light:hV,regular:e_,thin:dV},Symbol.toStringTag,{value:"Module"})),cl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},vV=cl("arrow-circle-up","0 0 256 256",'<path d="M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm34.83-102.83a4,4,0,0,1-5.66,5.66L132,97.66V168a4,4,0,0,1-8,0V97.66L98.83,122.83a4,4,0,0,1-5.66-5.66l32-32a4,4,0,0,1,5.66,0Z"/>'),gV=cl("arrow-circle-up","0 0 256 256",'<path d="M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm36.24-102.24a6,6,0,1,1-8.48,8.48L134,102.49V168a6,6,0,0,1-12,0V102.49l-21.76,21.75a6,6,0,0,1-8.48-8.48l32-32a6,6,0,0,1,8.48,0Z"/>'),bh=cl("arrow-circle-up","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm37.66-101.66a8,8,0,0,1-11.32,11.32L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0Z"/>'),bV=cl("arrow-circle-up","0 0 256 256",'<path d="M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm40.49-100.49a12,12,0,0,1-17,17L140,117v51a12,12,0,0,1-24,0V117l-11.51,11.52a12,12,0,0,1-17-17l32-32a12,12,0,0,1,17,0Z"/>'),yV=cl("arrow-circle-up","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,101.66a8,8,0,0,1-11.32,0L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0l32,32A8,8,0,0,1,165.66,125.66Z"/>'),wV=cl("arrow-circle-up","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm37.66-101.66a8,8,0,0,1-11.32,11.32L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0Z"/>'),SV="arrow-circle-up",ty=Object.freeze(Object.defineProperty({__proto__:null,bold:bV,default:bh,duotone:wV,fill:yV,glyphName:SV,light:gV,regular:bh,thin:vV},Symbol.toStringTag,{value:"Module"})),iy="/api";async function Mt(e){const t=await fetch(`${iy}${e}`);if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.json()}async function t_(e,t){try{const i=await e.json(),n=i==null?void 0:i.message;if(typeof n=="string"&&n.trim()!=="")return n}catch{}return`${t}: ${e.status}`}async function z1(e,t,i){const n=await fetch(`${iy}${t}`,{method:e,headers:i===void 0?void 0:{"Content-Type":"application/json"},body:i===void 0?void 0:JSON.stringify(i)});if(!n.ok){let r=`${e} ${t} failed: ${n.status}`;try{const a=await n.json();r=a.error??a.message??r}catch{}throw new Error(r)}return n.json()}const ze={access:{get:()=>Mt("/access"),createToken:(e,t)=>z1("POST","/access/tokens",{name:e,access:t}),revokeToken:e=>z1("DELETE",`/access/tokens/${encodeURIComponent(e)}`),revokeConnection:e=>z1("DELETE",`/access/connections/${encodeURIComponent(e)}`)},health:()=>Mt("/health"),system:()=>Mt("/system"),qr:()=>Mt("/qr"),deviceEvents:(e,t=100)=>Mt(`/devices/${encodeURIComponent(e)}/events?limit=${t}`),deviceObservations:(e,t=50)=>Mt(`/devices/${encodeURIComponent(e)}/observations?limit=${t}`),reportObservation:(e,t)=>fetch(`/api/devices/${encodeURIComponent(e)}/observations`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(async i=>{if(!i.ok)throw new Error((await i.json()).error??`HTTP ${i.status}`);return i.json()}),plugins:()=>Mt("/plugins"),pluginsRefresh:()=>fetch("/api/plugins/refresh",{method:"POST"}).then(e=>e.json()),plugin:e=>Mt(`/plugins/${e}`),setPluginDisabled:(e,t)=>fetch(`/api/plugins/${e}/disabled`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({disabled:t})}).then(i=>{if(!i.ok)throw new Error(`Set disabled failed: ${i.status}`);return i.json()}),bridge:()=>Mt("/bridge"),saveBridge:e=>fetch("/api/bridge",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(t=>{if(!t.ok)throw new Error(`Save failed: ${t.status}`);return t.json()}),accessories:()=>Mt("/accessories"),devices:()=>Mt("/devices"),controlDevice:(e,t,i)=>fetch(`/api/devices/${encodeURIComponent(e)}/control`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({control:t,value:i})}).then(n=>{if(!n.ok)throw new Error(`Control failed: ${n.status}`);return n.json()}),renameDevice:(e,t)=>fetch(`/api/devices/${encodeURIComponent(e)}/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})}).then(i=>{if(!i.ok)throw new Error(`Rename failed: ${i.status}`);return i.json()}),deviceHistory:(e,t,i)=>{const n=new URLSearchParams({period:t});return i&&n.set("date",i),Mt(`/devices/${encodeURIComponent(e)}/history?${n}`)},deviceMetrics:(e,t={})=>{const i=new URLSearchParams;t.metric&&i.set("metric",t.metric),t.from!==void 0&&i.set("from",String(t.from)),t.to!==void 0&&i.set("to",String(t.to)),t.maxPoints!==void 0&&i.set("maxPoints",String(t.maxPoints));const n=i.toString();return Mt(`/devices/${encodeURIComponent(e)}/metrics${n?`?${n}`:""}`)},homekitHidden:()=>Mt("/homekit/hidden"),setHomekitVisibility:(e,t)=>fetch(`/api/homekit/visibility/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({visible:t})}).then(i=>{if(!i.ok)throw new Error(`Visibility change failed: ${i.status}`);return i.json()}),deviceAccessory:e=>Mt(`/devices/${encodeURIComponent(e)}/accessory`),homekitServiceTypes:()=>Mt("/homekit/service-types"),setHomekitServiceType:(e,t,i)=>fetch(`/api/homekit/service-type/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serviceUuid:t,type:i})}).then(async n=>{var r;if(!n.ok)throw new Error(((r=await n.json().catch(()=>null))==null?void 0:r.message)??`Type change failed: ${n.status}`);return n.json()}),setCharacteristic:(e,t,i,n)=>fetch(`/api/accessories/${e}/characteristics`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serviceUuid:t,charUuid:i,value:n})}).then(r=>{if(!r.ok)throw new Error(`Set failed: ${r.status}`);return r.json()}),logs:(e,t=200)=>{const i=new URLSearchParams({limit:String(t)});return e&&i.set("plugin",e),Mt(`/logs?${i}`)},pluginTelemetry:e=>Mt(`/plugins/${encodeURIComponent(e)}/telemetry`),config:{get:()=>Mt("/config"),save:e=>fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e})}).then(t=>{if(!t.ok)throw new Error(`Save failed: ${t.status}`);return t.json()}),getPlatform:e=>Mt(`/config/platform/${encodeURIComponent(e)}`),savePlatform:e=>fetch("/api/config/platform",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({platform:e})}).then(t=>{if(!t.ok)throw new Error(`Save failed: ${t.status}`);return t.json()}),getHbPlugin:(e,t)=>Mt(`/config/hb-plugin/${encodeURIComponent(e)}${t?`?packageName=${encodeURIComponent(t)}`:""}`),saveHbPlugin:(e,t,i)=>fetch("/api/config/hb-plugin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,packageName:i,config:t})}).then(n=>{if(!n.ok)throw new Error(`Save failed: ${n.status}`);return n.json()}),getPlugin:e=>Mt(`/config/plugin/${encodeURIComponent(e)}`),savePlugin:(e,t)=>fetch("/api/config/plugin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,config:t})}).then(i=>{if(!i.ok)throw new Error(`Save failed: ${i.status}`);return i.json()})},pluginInfo:e=>Mt(`/marketplace/plugin-info/${encodeURIComponent(e)}`),daemon:{restart:()=>fetch("/api/daemon/restart",{method:"POST"}).then(e=>{if(!e.ok)throw new Error(`Restart failed: ${e.status}`);return e.json()})},updates:{check:()=>Mt("/updates/check"),apply:()=>fetch("/api/updates/apply",{method:"POST"}).then(async e=>{if(!e.ok)throw new Error(await t_(e,"Update failed"));return e.json()}),rollback:()=>fetch("/api/updates/rollback",{method:"POST"}).then(async e=>{if(!e.ok)throw new Error(await t_(e,"Rollback failed"));return e.json()})},marketplace:{search:(e="",t=0,i=20)=>{const n=new URLSearchParams({q:e,from:String(t),size:String(i)});return Mt(`/marketplace/search?${n}`)},enriched:e=>fetch(`/api/marketplace/enriched/${encodeURIComponent(e)}`).then(t=>t.ok?t.json():Promise.reject(new Error(`Enrichment failed: ${t.status}`))),installed:()=>Mt("/marketplace/installed"),local:()=>Mt("/marketplace/local"),install:e=>fetch("/api/marketplace/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({package:e})}).then(t=>{if(!t.ok)throw new Error(`Install failed: ${t.status}`);return t.json()}),update:e=>fetch(`/api/marketplace/update/${encodeURIComponent(e)}`,{method:"POST"}).then(t=>{if(!t.ok)throw new Error(`Update failed: ${t.status}`);return t.json()}),uninstall:e=>fetch(`/api/marketplace/uninstall/${encodeURIComponent(e)}`,{method:"DELETE"}).then(t=>{if(!t.ok)throw new Error(`Uninstall failed: ${t.status}`);return t.json()})}},Tr=Pc("daemon",()=>{const e=X(null),t=X([]),i=X([]),n=X([]),r=X(!1),a=X(null),s=X(!1),l=H(()=>t.value.filter(g=>g.status==="running").length),o=H(()=>t.value.filter(g=>g.status==="error").length);async function u(){try{e.value=await ze.health(),s.value=!0,a.value=null}catch{s.value=!1,e.value=null}}async function c(){r.value=!0;try{const g=await ze.plugins();t.value=g.plugins}catch(g){a.value=String(g)}finally{r.value=!1}}async function d(){try{const g=await ze.accessories();i.value=g.accessories}catch{}}async function h(g){try{const v=await ze.logs(g);n.value=v.entries}catch(v){a.value=String(v)}}let f=null;function _(){if(f)return;const g=location.protocol==="https:"?"wss:":"ws:";f=new WebSocket(`${g}//${location.host}/ws/logs`),f.onmessage=v=>{if(!document.hidden)try{const w=JSON.parse(v.data);n.value.push(w),n.value.length>500&&n.value.shift()}catch{}},f.onclose=()=>{f=null,setTimeout(_,3e3)}}function m(){f==null||f.close(),f=null}return{health:e,plugins:t,accessories:i,logs:n,loading:r,error:a,connected:s,runningCount:l,errorCount:o,fetchHealth:u,fetchPlugins:c,fetchAccessories:d,fetchLogs:h,connectLiveLogs:_,disconnectLiveLogs:m}}),i_=Object.freeze(Object.defineProperty({__proto__:null,useDaemonStore:Tr},Symbol.toStringTag,{value:"Module"})),dl=Pc("inspector",()=>{const e=X(!1),t=X("plugin"),i=X(null),n=X(null);function r(u){i.value=u,n.value=null,t.value="plugin",e.value=!0}function a(){i.value=null,n.value=null,t.value="marketplace",e.value=!0}function s(u){n.value=u,i.value=null,t.value="device",e.value=!0}function l(u){n.value&&t.value==="device"&&(u.kind==="native"&&n.value.kind==="native"?u.dev.id===n.value.dev.id&&(n.value=u):u.kind==="hap"&&n.value.kind==="hap"&&u.acc.uuid===n.value.acc.uuid&&(n.value=u))}function o(){e.value=!1,i.value=null,n.value=null}return{visible:e,mode:t,selectedPlugin:i,selectedDevice:n,openPlugin:r,openMarketplace:a,openDevice:s,updateDevice:l,close:o}}),ma=Pc("layout",()=>{const e=X(""),t=X([]),i=X(!1);function n(r,a){e.value=r,i.value=(a==null?void 0:a.fullBleed)??!1,t.value=(a==null?void 0:a.crumbs)??[]}return{title:e,crumbs:t,fullBleed:i,setPage:n}});function au(e){return(e==null?void 0:e.authOrigin)??(e==null?void 0:e.issuer)??null}const CV="openbridge_platform_state",n_="openbridge_platform_expected_sub",U1="openbridge_last_account",ka=X(null),Aa=X(null),go=X(!1);function hl(){async function e(){if(Aa.value)return Aa.value;const m=await fetch("/auth/platform/config");if(!m.ok){const v={enabled:!1,issuer:null,appId:null};return Aa.value=v,v}const g=await m.json();return Aa.value=g,g}function t(){try{const m=localStorage.getItem(U1);if(!m)return null;const g=JSON.parse(m);return g.sub&&g.email?g:null}catch{return null}}function i(m){try{localStorage.setItem(U1,JSON.stringify(m))}catch{}}function n(){try{localStorage.removeItem(U1)}catch{}}async function r(){if(!(await e()).enabled)return ka.value=null,go.value=!0,!0;try{const g=await fetch("/auth/me",{credentials:"include"});if(!g.ok)return ka.value=null,go.value=!0,!1;const v=await g.json();return ka.value=v.user,i({sub:v.user.id,email:v.user.email}),go.value=!0,!0}catch{return ka.value=null,go.value=!0,!1}}async function a(m={}){const g=await e(),v=au(g);if(!g.enabled||!v)return;const w=g.appId??"openbridge",S=Array.from(crypto.getRandomValues(new Uint8Array(16))).map(L=>L.toString(16).padStart(2,"0")).join("");sessionStorage.setItem(CV,S),m.expectedSub?sessionStorage.setItem(n_,m.expectedSub):sessionStorage.removeItem(n_);const y=`${window.location.origin}/auth/callback`,A=new URL(`${v}/api/auth/sso`);A.searchParams.set("app_id",w),A.searchParams.set("redirect_uri",y),A.searchParams.set("state",S),m.prompt&&A.searchParams.set("prompt",m.prompt),m.loginHint&&A.searchParams.set("login_hint",m.loginHint),window.location.href=A.toString()}async function s(){const m=t();return m?(await a({loginHint:m.email,expectedSub:m.sub}),!0):!1}async function l(m){await a({loginHint:m})}async function o(){await a({prompt:"login"})}async function u(){await a({prompt:"select_account"})}async function c(){const m=await e(),g=au(m);if(!m.enabled||!g)return[];try{const v=await fetch(`${g}/api/auth/identities`,{credentials:"include"});return v.ok?(await v.json()).identities??[]:[]}catch{return[]}}async function d(m){const g=await e(),v=au(g);if(!g.enabled||!v)return!1;try{return(await fetch(`${v}/api/auth/identities/remove`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({user_id:m})})).ok}catch{return!1}}async function h(){await fetch("/auth/logout",{method:"POST",credentials:"include"}).catch(()=>null),ka.value=null,n(),window.location.href="/login?logged_out=1"}async function f(){await fetch("/auth/logout",{method:"POST",credentials:"include"}).catch(()=>null),ka.value=null,n();const m=Aa.value,g=au(m);if(m!=null&&m.enabled&&g&&m.appId){const v=`${window.location.origin}/login?logged_out=1`,w=new URL("/api/auth/sso/end-session",g);w.searchParams.set("app_id",m.appId),w.searchParams.set("post_logout_redirect_uri",v),window.location.href=w.toString();return}window.location.href="/login?logged_out=1"}const _=H(()=>{var g;const m=(g=Aa.value)==null?void 0:g.issuer;if(!m)return!1;try{const v=new URL(m).hostname;return v==="nubisco.io"||v.endsWith(".nubisco.io")}catch{return!1}});return{user:ka,config:Aa,ready:go,isNubiscoPlatform:_,loadConfig:e,checkAuth:r,startPlatformLogin:a,resumeLastAccount:s,switchAccount:l,addAccount:o,chooseAccount:u,listIdentities:c,removeIdentity:d,getLastAccount:t,clearLastAccount:n,logout:h,logoutEverywhere:f}}const fl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},kV=fl("puzzle-piece","0 0 256 256",'<path d="M218.14,161.93a4,4,0,0,0-3.86-.24,24,24,0,0,1-34.23-23.25,24,24,0,0,1,34.23-20.13A4,4,0,0,0,220,114.7V72a12,12,0,0,0-12-12H167a32,32,0,1,0-62.91-10.33A32.57,32.57,0,0,0,105,60H64A12,12,0,0,0,52,72v37a32,32,0,1,0-10.33,62.91A32.28,32.28,0,0,0,52,171v37a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V165.31A4,4,0,0,0,218.14,161.93ZM212,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V165.31a4,4,0,0,0-1.86-3.38,4,4,0,0,0-3.85-.24,24,24,0,0,1-34.24-20.13,24,24,0,0,1,34.24-23.25A4,4,0,0,0,60,114.7V72a4,4,0,0,1,4-4h46.69a4,4,0,0,0,3.62-5.71,24,24,0,0,1,20.13-34.24,24,24,0,0,1,23.25,34.24A4,4,0,0,0,161.31,68H208a4,4,0,0,1,4,4v37a32.57,32.57,0,0,0-10.33-.94A32,32,0,1,0,212,171Z"/>'),AV=fl("puzzle-piece","0 0 256 256",'<path d="M219.21,160.24a6,6,0,0,0-5.78-.35,22,22,0,1,1-11.05-41.83,22.15,22.15,0,0,1,11.05,2.06A6,6,0,0,0,222,114.7V72a14,14,0,0,0-14-14H169.48a35,35,0,0,0,.52-6,34.1,34.1,0,0,0-10.73-24.78,33.64,33.64,0,0,0-25.45-9.15A34,34,0,0,0,102.54,58H64A14,14,0,0,0,50,72v34.53a34,34,0,0,0-30.79,10.2,34,34,0,0,0,22.31,57.18,34.34,34.34,0,0,0,8.48-.44V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V165.31A6,6,0,0,0,219.21,160.24ZM210,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V165.31a6,6,0,0,0-6-6,5.92,5.92,0,0,0-2.57.58,22,22,0,0,1-31.38-18.46,22,22,0,0,1,31.38-21.31A6,6,0,0,0,62,114.7V72a2,2,0,0,1,2-2h46.69a6,6,0,0,0,5.42-8.57,22.25,22.25,0,0,1-2-11,22,22,0,1,1,41.83,11A6,6,0,0,0,161.3,70H208a2,2,0,0,1,2,2v34.54a34,34,0,0,0-39.93,31.28,33.71,33.71,0,0,0,9.14,25.45A34.15,34.15,0,0,0,210,173.48Z"/>'),Cs=fl("puzzle-piece","0 0 256 256",'<path d="M220.27,158.54a8,8,0,0,0-7.7-.46,20,20,0,1,1,0-36.16A8,8,0,0,0,224,114.69V72a16,16,0,0,0-16-16H171.78a35.36,35.36,0,0,0,.22-4,36.11,36.11,0,0,0-11.36-26.24,36,36,0,0,0-60.55,23.62,36.56,36.56,0,0,0,.14,6.62H64A16,16,0,0,0,48,72v32.22a35.36,35.36,0,0,0-4-.22,36.12,36.12,0,0,0-26.24,11.36,35.7,35.7,0,0,0-9.69,27,36.08,36.08,0,0,0,33.31,33.6,35.68,35.68,0,0,0,6.62-.14V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V165.31A8,8,0,0,0,220.27,158.54ZM208,208H64V165.31a8,8,0,0,0-11.43-7.23,20,20,0,1,1,0-36.16A8,8,0,0,0,64,114.69V72h46.69a8,8,0,0,0,7.23-11.43,20,20,0,1,1,36.16,0A8,8,0,0,0,161.31,72H208v32.23a35.68,35.68,0,0,0-6.62-.14A36,36,0,0,0,204,176a35.36,35.36,0,0,0,4-.22Z"/>'),$V=fl("puzzle-piece","0 0 256 256",'<path d="M222.41,155.16a12,12,0,0,0-11.56-.69A16,16,0,0,1,188,139,16.2,16.2,0,0,1,202.8,124a15.83,15.83,0,0,1,8,1.5A12,12,0,0,0,228,114.7V72a20,20,0,0,0-20-20H176a40.15,40.15,0,0,0-12.62-29.16,39.67,39.67,0,0,0-29.94-10.76,40.08,40.08,0,0,0-37.34,37C96,50.07,96,51,96,52H64A20,20,0,0,0,44,72v28a40.15,40.15,0,0,0-29.16,12.62A40,40,0,0,0,41.1,179.9a28.3,28.3,0,0,0,2.9.1v28a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V165.31A12,12,0,0,0,222.41,155.16ZM204,204H68V165.31a12,12,0,0,0-17.15-10.84A15.9,15.9,0,0,1,42.8,156,16.2,16.2,0,0,1,28,141.06a16,16,0,0,1,22.82-15.52A12,12,0,0,0,68,114.7V76h42.7a12,12,0,0,0,10.83-17.15A15.9,15.9,0,0,1,120,50.8,16.19,16.19,0,0,1,134.94,36a16,16,0,0,1,15.53,22.81A12,12,0,0,0,161.31,76H204v24c-1,0-1.93,0-2.9.11A40,40,0,0,0,204,180h0Z"/>'),MV=fl("puzzle-piece","0 0 256 256",'<path d="M165.78,224H208a16,16,0,0,0,16-16V170.35A8,8,0,0,0,212.94,163a23.37,23.37,0,0,1-8.94,1.77c-13.23,0-24-11.1-24-24.73s10.77-24.73,24-24.73a23.37,23.37,0,0,1,8.94,1.77A8,8,0,0,0,224,109.65V72a16,16,0,0,0-16-16H171.78a35.36,35.36,0,0,0,.22-4,36,36,0,0,0-72,0,35.36,35.36,0,0,0,.22,4H64A16,16,0,0,0,48,72v32.22a35.36,35.36,0,0,0-4-.22,36,36,0,0,0,0,72,35.36,35.36,0,0,0,4-.22V208a16,16,0,0,0,16,16h42.22"/>'),LV=fl("puzzle-piece","0 0 256 256",'<path d="M204,168a28,28,0,0,0,12-2.69V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V165.31a28,28,0,1,1,0-50.62V72a8,8,0,0,1,8-8h46.69a28,28,0,1,1,50.61,0H208a8,8,0,0,1,8,8v42.69A28,28,0,1,0,204,168Z" opacity="0.2"/><path d="M220.27,158.54a8,8,0,0,0-7.7-.46,20,20,0,1,1,0-36.16A8,8,0,0,0,224,114.69V72a16,16,0,0,0-16-16H171.78a35.36,35.36,0,0,0,.22-4,36.15,36.15,0,0,0-11.36-26.25,36,36,0,0,0-60.55,23.63,36.56,36.56,0,0,0,.14,6.62H64A16,16,0,0,0,48,72v32.22a35.36,35.36,0,0,0-4-.22,36.12,36.12,0,0,0-26.24,11.36,35.7,35.7,0,0,0-9.69,27,36.08,36.08,0,0,0,33.31,33.6,36.56,36.56,0,0,0,6.62-.14V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V165.31A8,8,0,0,0,220.27,158.54ZM208,208H64V165.31a8,8,0,0,0-11.43-7.23,20,20,0,1,1,0-36.16A8,8,0,0,0,64,114.69V72h46.69a8,8,0,0,0,7.23-11.43,20,20,0,1,1,36.16,0A8,8,0,0,0,161.31,72H208v32.23a35.68,35.68,0,0,0-6.62-.14A36,36,0,0,0,204,176a35.36,35.36,0,0,0,4-.22Z"/>'),EV="puzzle-piece",ny=Object.freeze(Object.defineProperty({__proto__:null,bold:$V,default:Cs,duotone:LV,fill:MV,glyphName:EV,light:AV,regular:Cs,thin:kV},Symbol.toStringTag,{value:"Module"})),pl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},xV=pl("floppy-disk","0 0 256 256",'<path d="M216.49,74.83,181.17,39.51A11.93,11.93,0,0,0,172.69,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V83.31A11.93,11.93,0,0,0,216.49,74.83ZM172,212H84V152a4,4,0,0,1,4-4h80a4,4,0,0,1,4,4Zm40-4a4,4,0,0,1-4,4H180V152a12,12,0,0,0-12-12H88a12,12,0,0,0-12,12v60H48a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4H172.69a4,4,0,0,1,2.82,1.17l35.32,35.32A4,4,0,0,1,212,83.31ZM156,72a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h56A4,4,0,0,1,156,72Z"/>'),TV=pl("floppy-disk","0 0 256 256",'<path d="M217.9,73.42,182.58,38.1a13.9,13.9,0,0,0-9.89-4.1H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V83.31A13.9,13.9,0,0,0,217.9,73.42ZM170,210H86V152a2,2,0,0,1,2-2h80a2,2,0,0,1,2,2Zm40-2a2,2,0,0,1-2,2H182V152a14,14,0,0,0-14-14H88a14,14,0,0,0-14,14v58H48a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2H172.69a2,2,0,0,1,1.41.58L209.42,81.9a2,2,0,0,1,.58,1.41ZM158,72a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h56A6,6,0,0,1,158,72Z"/>'),ac=pl("floppy-disk","0 0 256 256",'<path d="M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"/>'),HV=pl("floppy-disk","0 0 256 256",'<path d="M222.14,69.17,186.83,33.86A19.86,19.86,0,0,0,172.69,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V83.31A19.86,19.86,0,0,0,222.14,69.17ZM164,204H92V160h72Zm40,0H188V156a20,20,0,0,0-20-20H88a20,20,0,0,0-20,20v48H52V52H171l33,33ZM164,84a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h56A12,12,0,0,1,164,84Z"/>'),NV=pl("floppy-disk","0 0 256 256",'<path d="M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM208,208H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"/>'),PV=pl("floppy-disk","0 0 256 256",'<path d="M216,83.31V208a8,8,0,0,1-8,8H176V152a8,8,0,0,0-8-8H88a8,8,0,0,0-8,8v64H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H172.69a8,8,0,0,1,5.65,2.34l35.32,35.32A8,8,0,0,1,216,83.31Z" opacity="0.2"/><path d="M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"/>'),OV="floppy-disk",IV=Object.freeze(Object.defineProperty({__proto__:null,bold:HV,default:ac,duotone:PV,fill:NV,glyphName:OV,light:TV,regular:ac,thin:xV},Symbol.toStringTag,{value:"Module"})),_l=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},RV=_l("arrows-clockwise","0 0 256 256",'<path d="M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z"/>'),DV=_l("arrows-clockwise","0 0 256 256",'<path d="M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z"/>'),Qr=_l("arrows-clockwise","0 0 256 256",'<path d="M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"/>'),VV=_l("arrows-clockwise","0 0 256 256",'<path d="M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z"/>'),BV=_l("arrows-clockwise","0 0 256 256",'<path d="M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"/>'),ZV=_l("arrows-clockwise","0 0 256 256",'<path d="M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z" opacity="0.2"/><path d="M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"/>'),FV="arrows-clockwise",zV=Object.freeze(Object.defineProperty({__proto__:null,bold:VV,default:Qr,duotone:ZV,fill:BV,glyphName:FV,light:DV,regular:Qr,thin:RV},Symbol.toStringTag,{value:"Module"})),UV=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},WV=UV("download-simple","0 0 256 256",'<path d="M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"/>'),jV=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},KV=jV("upload-simple","0 0 256 256",'<path d="M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z"/>');var ml={},qV=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},ry={},on={};let M2;const GV=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];on.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};on.getSymbolTotalCodewords=function(t){return GV[t]};on.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};on.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');M2=t};on.isKanjiModeEnabled=function(){return typeof M2<"u"};on.toSJIS=function(t){return M2(t)};var e1={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+i)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})(e1);function ay(){this.buffer=[],this.length=0}ay.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let i=0;i<t;i++)this.putBit((e>>>t-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var YV=ay;function E0(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}E0.prototype.set=function(e,t,i,n){const r=e*this.size+t;this.data[r]=i,n&&(this.reservedBit[r]=!0)};E0.prototype.get=function(e,t){return this.data[e*this.size+t]};E0.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i};E0.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var XV=E0,sy={};(function(e){const t=on.getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];const r=Math.floor(n/7)+2,a=t(n),s=a===145?26:Math.ceil((a-13)/(2*r-2))*2,l=[a-7];for(let o=1;o<r-1;o++)l[o]=l[o-1]-s;return l.push(6),l.reverse()},e.getPositions=function(n){const r=[],a=e.getRowColCoords(n),s=a.length;for(let l=0;l<s;l++)for(let o=0;o<s;o++)l===0&&o===0||l===0&&o===s-1||l===s-1&&o===0||r.push([a[l],a[o]]);return r}})(sy);var ly={};const JV=on.getSymbolSize,r_=7;ly.getPositions=function(t){const i=JV(t);return[[0,0],[i-r_,0],[0,i-r_]]};var oy={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},e.from=function(r){return e.isValid(r)?parseInt(r,10):void 0},e.getPenaltyN1=function(r){const a=r.size;let s=0,l=0,o=0,u=null,c=null;for(let d=0;d<a;d++){l=o=0,u=c=null;for(let h=0;h<a;h++){let f=r.get(d,h);f===u?l++:(l>=5&&(s+=t.N1+(l-5)),u=f,l=1),f=r.get(h,d),f===c?o++:(o>=5&&(s+=t.N1+(o-5)),c=f,o=1)}l>=5&&(s+=t.N1+(l-5)),o>=5&&(s+=t.N1+(o-5))}return s},e.getPenaltyN2=function(r){const a=r.size;let s=0;for(let l=0;l<a-1;l++)for(let o=0;o<a-1;o++){const u=r.get(l,o)+r.get(l,o+1)+r.get(l+1,o)+r.get(l+1,o+1);(u===4||u===0)&&s++}return s*t.N2},e.getPenaltyN3=function(r){const a=r.size;let s=0,l=0,o=0;for(let u=0;u<a;u++){l=o=0;for(let c=0;c<a;c++)l=l<<1&2047|r.get(u,c),c>=10&&(l===1488||l===93)&&s++,o=o<<1&2047|r.get(c,u),c>=10&&(o===1488||o===93)&&s++}return s*t.N3},e.getPenaltyN4=function(r){let a=0;const s=r.data.length;for(let o=0;o<s;o++)a+=r.data[o];return Math.abs(Math.ceil(a*100/s/5)-10)*t.N4};function i(n,r,a){switch(n){case e.Patterns.PATTERN000:return(r+a)%2===0;case e.Patterns.PATTERN001:return r%2===0;case e.Patterns.PATTERN010:return a%3===0;case e.Patterns.PATTERN011:return(r+a)%3===0;case e.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(a/3))%2===0;case e.Patterns.PATTERN101:return r*a%2+r*a%3===0;case e.Patterns.PATTERN110:return(r*a%2+r*a%3)%2===0;case e.Patterns.PATTERN111:return(r*a%3+(r+a)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}e.applyMask=function(r,a){const s=a.size;for(let l=0;l<s;l++)for(let o=0;o<s;o++)a.isReserved(o,l)||a.xor(o,l,i(r,o,l))},e.getBestMask=function(r,a){const s=Object.keys(e.Patterns).length;let l=0,o=1/0;for(let u=0;u<s;u++){a(u),e.applyMask(u,r);const c=e.getPenaltyN1(r)+e.getPenaltyN2(r)+e.getPenaltyN3(r)+e.getPenaltyN4(r);e.applyMask(u,r),c<o&&(o=c,l=u)}return l}})(oy);var t1={};const Gr=e1,su=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],lu=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t1.getBlocksCount=function(t,i){switch(i){case Gr.L:return su[(t-1)*4+0];case Gr.M:return su[(t-1)*4+1];case Gr.Q:return su[(t-1)*4+2];case Gr.H:return su[(t-1)*4+3];default:return}};t1.getTotalCodewordsCount=function(t,i){switch(i){case Gr.L:return lu[(t-1)*4+0];case Gr.M:return lu[(t-1)*4+1];case Gr.Q:return lu[(t-1)*4+2];case Gr.H:return lu[(t-1)*4+3];default:return}};var uy={},i1={};const Wo=new Uint8Array(512),sc=new Uint8Array(256);(function(){let t=1;for(let i=0;i<255;i++)Wo[i]=t,sc[t]=i,t<<=1,t&256&&(t^=285);for(let i=255;i<512;i++)Wo[i]=Wo[i-255]})();i1.log=function(t){if(t<1)throw new Error("log("+t+")");return sc[t]};i1.exp=function(t){return Wo[t]};i1.mul=function(t,i){return t===0||i===0?0:Wo[sc[t]+sc[i]]};(function(e){const t=i1;e.mul=function(n,r){const a=new Uint8Array(n.length+r.length-1);for(let s=0;s<n.length;s++)for(let l=0;l<r.length;l++)a[s+l]^=t.mul(n[s],r[l]);return a},e.mod=function(n,r){let a=new Uint8Array(n);for(;a.length-r.length>=0;){const s=a[0];for(let o=0;o<r.length;o++)a[o]^=t.mul(r[o],s);let l=0;for(;l<a.length&&a[l]===0;)l++;a=a.slice(l)}return a},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let a=0;a<n;a++)r=e.mul(r,new Uint8Array([1,t.exp(a)]));return r}})(uy);const cy=uy;function L2(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}L2.prototype.initialize=function(t){this.degree=t,this.genPoly=cy.generateECPolynomial(this.degree)};L2.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(t.length+this.degree);i.set(t);const n=cy.mod(i,this.genPoly),r=this.degree-n.length;if(r>0){const a=new Uint8Array(this.degree);return a.set(n,r),a}return n};var QV=L2,dy={},va={},E2={};E2.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var sr={};const hy="[0-9]+",eB="[A-Z $%*+\\-./:]+";let v0="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";v0=v0.replace(/u/g,"\\u");const tB="(?:(?![A-Z0-9 $%*+\\-./:]|"+v0+`)(?:.|[\r
|
|
52
|
+
]))+`;sr.KANJI=new RegExp(v0,"g");sr.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");sr.BYTE=new RegExp(tB,"g");sr.NUMERIC=new RegExp(hy,"g");sr.ALPHANUMERIC=new RegExp(eB,"g");const iB=new RegExp("^"+v0+"$"),nB=new RegExp("^"+hy+"$"),rB=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");sr.testKanji=function(t){return iB.test(t)};sr.testNumeric=function(t){return nB.test(t)};sr.testAlphanumeric=function(t){return rB.test(t)};(function(e){const t=E2,i=sr;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(a,s){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?a.ccBits[0]:s<27?a.ccBits[1]:a.ccBits[2]},e.getBestModeForData=function(a){return i.testNumeric(a)?e.NUMERIC:i.testAlphanumeric(a)?e.ALPHANUMERIC:i.testKanji(a)?e.KANJI:e.BYTE},e.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},e.isValid=function(a){return a&&a.bit&&a.ccBits};function n(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+r)}}e.from=function(a,s){if(e.isValid(a))return a;try{return n(a)}catch{return s}}})(va);(function(e){const t=on,i=t1,n=e1,r=va,a=E2,s=7973,l=t.getBCHDigit(s);function o(h,f,_){for(let m=1;m<=40;m++)if(f<=e.getCapacity(m,_,h))return m}function u(h,f){return r.getCharCountIndicator(h,f)+4}function c(h,f){let _=0;return h.forEach(function(m){const g=u(m.mode,f);_+=g+m.getBitsLength()}),_}function d(h,f){for(let _=1;_<=40;_++)if(c(h,_)<=e.getCapacity(_,f,r.MIXED))return _}e.from=function(f,_){return a.isValid(f)?parseInt(f,10):_},e.getCapacity=function(f,_,m){if(!a.isValid(f))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=r.BYTE);const g=t.getSymbolTotalCodewords(f),v=i.getTotalCodewordsCount(f,_),w=(g-v)*8;if(m===r.MIXED)return w;const S=w-u(m,f);switch(m){case r.NUMERIC:return Math.floor(S/10*3);case r.ALPHANUMERIC:return Math.floor(S/11*2);case r.KANJI:return Math.floor(S/13);case r.BYTE:default:return Math.floor(S/8)}},e.getBestVersionForData=function(f,_){let m;const g=n.from(_,n.M);if(Array.isArray(f)){if(f.length>1)return d(f,g);if(f.length===0)return 1;m=f[0]}else m=f;return o(m.mode,m.getLength(),g)},e.getEncodedBits=function(f){if(!a.isValid(f)||f<7)throw new Error("Invalid QR Code version");let _=f<<12;for(;t.getBCHDigit(_)-l>=0;)_^=s<<t.getBCHDigit(_)-l;return f<<12|_}})(dy);var fy={};const yh=on,py=1335,aB=21522,a_=yh.getBCHDigit(py);fy.getEncodedBits=function(t,i){const n=t.bit<<3|i;let r=n<<10;for(;yh.getBCHDigit(r)-a_>=0;)r^=py<<yh.getBCHDigit(r)-a_;return(n<<10|r)^aB};var _y={};const sB=va;function ks(e){this.mode=sB.NUMERIC,this.data=e.toString()}ks.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};ks.prototype.getLength=function(){return this.data.length};ks.prototype.getBitsLength=function(){return ks.getBitsLength(this.data.length)};ks.prototype.write=function(t){let i,n,r;for(i=0;i+3<=this.data.length;i+=3)n=this.data.substr(i,3),r=parseInt(n,10),t.put(r,10);const a=this.data.length-i;a>0&&(n=this.data.substr(i),r=parseInt(n,10),t.put(r,a*3+1))};var lB=ks;const oB=va,W1=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function As(e){this.mode=oB.ALPHANUMERIC,this.data=e}As.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};As.prototype.getLength=function(){return this.data.length};As.prototype.getBitsLength=function(){return As.getBitsLength(this.data.length)};As.prototype.write=function(t){let i;for(i=0;i+2<=this.data.length;i+=2){let n=W1.indexOf(this.data[i])*45;n+=W1.indexOf(this.data[i+1]),t.put(n,11)}this.data.length%2&&t.put(W1.indexOf(this.data[i]),6)};var uB=As;const cB=va;function $s(e){this.mode=cB.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}$s.getBitsLength=function(t){return t*8};$s.prototype.getLength=function(){return this.data.length};$s.prototype.getBitsLength=function(){return $s.getBitsLength(this.data.length)};$s.prototype.write=function(e){for(let t=0,i=this.data.length;t<i;t++)e.put(this.data[t],8)};var dB=$s;const hB=va,fB=on;function Ms(e){this.mode=hB.KANJI,this.data=e}Ms.getBitsLength=function(t){return t*13};Ms.prototype.getLength=function(){return this.data.length};Ms.prototype.getBitsLength=function(){return Ms.getBitsLength(this.data.length)};Ms.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let i=fB.toSJIS(this.data[t]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
|
|
53
|
+
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),e.put(i,13)}};var pB=Ms,my={exports:{}};(function(e){var t={single_source_shortest_paths:function(i,n,r){var a={},s={};s[n]=0;var l=t.PriorityQueue.make();l.push(n,0);for(var o,u,c,d,h,f,_,m,g;!l.empty();){o=l.pop(),u=o.value,d=o.cost,h=i[u]||{};for(c in h)h.hasOwnProperty(c)&&(f=h[c],_=d+f,m=s[c],g=typeof s[c]>"u",(g||m>_)&&(s[c]=_,l.push(c,_),a[c]=u))}if(typeof r<"u"&&typeof s[r]>"u"){var v=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(v)}return a},extract_shortest_path_from_predecessor_list:function(i,n){for(var r=[],a=n;a;)r.push(a),i[a],a=i[a];return r.reverse(),r},find_path:function(i,n,r){var a=t.single_source_shortest_paths(i,n,r);return t.extract_shortest_path_from_predecessor_list(a,r)},PriorityQueue:{make:function(i){var n=t.PriorityQueue,r={},a;i=i||{};for(a in n)n.hasOwnProperty(a)&&(r[a]=n[a]);return r.queue=[],r.sorter=i.sorter||n.default_sorter,r},default_sorter:function(i,n){return i.cost-n.cost},push:function(i,n){var r={value:i,cost:n};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(my);var _B=my.exports;(function(e){const t=va,i=lB,n=uB,r=dB,a=pB,s=sr,l=on,o=_B;function u(v){return unescape(encodeURIComponent(v)).length}function c(v,w,S){const y=[];let A;for(;(A=v.exec(S))!==null;)y.push({data:A[0],index:A.index,mode:w,length:A[0].length});return y}function d(v){const w=c(s.NUMERIC,t.NUMERIC,v),S=c(s.ALPHANUMERIC,t.ALPHANUMERIC,v);let y,A;return l.isKanjiModeEnabled()?(y=c(s.BYTE,t.BYTE,v),A=c(s.KANJI,t.KANJI,v)):(y=c(s.BYTE_KANJI,t.BYTE,v),A=[]),w.concat(S,y,A).sort(function(k,V){return k.index-V.index}).map(function(k){return{data:k.data,mode:k.mode,length:k.length}})}function h(v,w){switch(w){case t.NUMERIC:return i.getBitsLength(v);case t.ALPHANUMERIC:return n.getBitsLength(v);case t.KANJI:return a.getBitsLength(v);case t.BYTE:return r.getBitsLength(v)}}function f(v){return v.reduce(function(w,S){const y=w.length-1>=0?w[w.length-1]:null;return y&&y.mode===S.mode?(w[w.length-1].data+=S.data,w):(w.push(S),w)},[])}function _(v){const w=[];for(let S=0;S<v.length;S++){const y=v[S];switch(y.mode){case t.NUMERIC:w.push([y,{data:y.data,mode:t.ALPHANUMERIC,length:y.length},{data:y.data,mode:t.BYTE,length:y.length}]);break;case t.ALPHANUMERIC:w.push([y,{data:y.data,mode:t.BYTE,length:y.length}]);break;case t.KANJI:w.push([y,{data:y.data,mode:t.BYTE,length:u(y.data)}]);break;case t.BYTE:w.push([{data:y.data,mode:t.BYTE,length:u(y.data)}])}}return w}function m(v,w){const S={},y={start:{}};let A=["start"];for(let L=0;L<v.length;L++){const k=v[L],V=[];for(let T=0;T<k.length;T++){const J=k[T],x=""+L+T;V.push(x),S[x]={node:J,lastCount:0},y[x]={};for(let N=0;N<A.length;N++){const O=A[N];S[O]&&S[O].node.mode===J.mode?(y[O][x]=h(S[O].lastCount+J.length,J.mode)-h(S[O].lastCount,J.mode),S[O].lastCount+=J.length):(S[O]&&(S[O].lastCount=J.length),y[O][x]=h(J.length,J.mode)+4+t.getCharCountIndicator(J.mode,w))}}A=V}for(let L=0;L<A.length;L++)y[A[L]].end=0;return{map:y,table:S}}function g(v,w){let S;const y=t.getBestModeForData(v);if(S=t.from(w,y),S!==t.BYTE&&S.bit<y.bit)throw new Error('"'+v+'" cannot be encoded with mode '+t.toString(S)+`.
|
|
54
|
+
Suggested mode is: `+t.toString(y));switch(S===t.KANJI&&!l.isKanjiModeEnabled()&&(S=t.BYTE),S){case t.NUMERIC:return new i(v);case t.ALPHANUMERIC:return new n(v);case t.KANJI:return new a(v);case t.BYTE:return new r(v)}}e.fromArray=function(w){return w.reduce(function(S,y){return typeof y=="string"?S.push(g(y,null)):y.data&&S.push(g(y.data,y.mode)),S},[])},e.fromString=function(w,S){const y=d(w,l.isKanjiModeEnabled()),A=_(y),L=m(A,S),k=o.find_path(L.map,"start","end"),V=[];for(let T=1;T<k.length-1;T++)V.push(L.table[k[T]].node);return e.fromArray(f(V))},e.rawSplit=function(w){return e.fromArray(d(w,l.isKanjiModeEnabled()))}})(_y);const n1=on,j1=e1,mB=YV,vB=XV,gB=sy,bB=ly,wh=oy,Sh=t1,yB=QV,lc=dy,wB=fy,SB=va,K1=_y;function CB(e,t){const i=e.size,n=bB.getPositions(t);for(let r=0;r<n.length;r++){const a=n[r][0],s=n[r][1];for(let l=-1;l<=7;l++)if(!(a+l<=-1||i<=a+l))for(let o=-1;o<=7;o++)s+o<=-1||i<=s+o||(l>=0&&l<=6&&(o===0||o===6)||o>=0&&o<=6&&(l===0||l===6)||l>=2&&l<=4&&o>=2&&o<=4?e.set(a+l,s+o,!0,!0):e.set(a+l,s+o,!1,!0))}}function kB(e){const t=e.size;for(let i=8;i<t-8;i++){const n=i%2===0;e.set(i,6,n,!0),e.set(6,i,n,!0)}}function AB(e,t){const i=gB.getPositions(t);for(let n=0;n<i.length;n++){const r=i[n][0],a=i[n][1];for(let s=-2;s<=2;s++)for(let l=-2;l<=2;l++)s===-2||s===2||l===-2||l===2||s===0&&l===0?e.set(r+s,a+l,!0,!0):e.set(r+s,a+l,!1,!0)}}function $B(e,t){const i=e.size,n=lc.getEncodedBits(t);let r,a,s;for(let l=0;l<18;l++)r=Math.floor(l/3),a=l%3+i-8-3,s=(n>>l&1)===1,e.set(r,a,s,!0),e.set(a,r,s,!0)}function q1(e,t,i){const n=e.size,r=wB.getEncodedBits(t,i);let a,s;for(a=0;a<15;a++)s=(r>>a&1)===1,a<6?e.set(a,8,s,!0):a<8?e.set(a+1,8,s,!0):e.set(n-15+a,8,s,!0),a<8?e.set(8,n-a-1,s,!0):a<9?e.set(8,15-a-1+1,s,!0):e.set(8,15-a-1,s,!0);e.set(n-8,8,1,!0)}function MB(e,t){const i=e.size;let n=-1,r=i-1,a=7,s=0;for(let l=i-1;l>0;l-=2)for(l===6&&l--;;){for(let o=0;o<2;o++)if(!e.isReserved(r,l-o)){let u=!1;s<t.length&&(u=(t[s]>>>a&1)===1),e.set(r,l-o,u),a--,a===-1&&(s++,a=7)}if(r+=n,r<0||i<=r){r-=n,n=-n;break}}}function LB(e,t,i){const n=new mB;i.forEach(function(o){n.put(o.mode.bit,4),n.put(o.getLength(),SB.getCharCountIndicator(o.mode,e)),o.write(n)});const r=n1.getSymbolTotalCodewords(e),a=Sh.getTotalCodewordsCount(e,t),s=(r-a)*8;for(n.getLengthInBits()+4<=s&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const l=(s-n.getLengthInBits())/8;for(let o=0;o<l;o++)n.put(o%2?17:236,8);return EB(n,e,t)}function EB(e,t,i){const n=n1.getSymbolTotalCodewords(t),r=Sh.getTotalCodewordsCount(t,i),a=n-r,s=Sh.getBlocksCount(t,i),l=n%s,o=s-l,u=Math.floor(n/s),c=Math.floor(a/s),d=c+1,h=u-c,f=new yB(h);let _=0;const m=new Array(s),g=new Array(s);let v=0;const w=new Uint8Array(e.buffer);for(let k=0;k<s;k++){const V=k<o?c:d;m[k]=w.slice(_,_+V),g[k]=f.encode(m[k]),_+=V,v=Math.max(v,V)}const S=new Uint8Array(n);let y=0,A,L;for(A=0;A<v;A++)for(L=0;L<s;L++)A<m[L].length&&(S[y++]=m[L][A]);for(A=0;A<h;A++)for(L=0;L<s;L++)S[y++]=g[L][A];return S}function xB(e,t,i,n){let r;if(Array.isArray(e))r=K1.fromArray(e);else if(typeof e=="string"){let u=t;if(!u){const c=K1.rawSplit(e);u=lc.getBestVersionForData(c,i)}r=K1.fromString(e,u||40)}else throw new Error("Invalid data");const a=lc.getBestVersionForData(r,i);if(!a)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=a;else if(t<a)throw new Error(`
|
|
55
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
56
|
+
Minimum version required to store current data is: `+a+`.
|
|
57
|
+
`);const s=LB(t,i,r),l=n1.getSymbolSize(t),o=new vB(l);return CB(o,t),kB(o),AB(o,t),q1(o,i,0),t>=7&&$B(o,t),MB(o,s),isNaN(n)&&(n=wh.getBestMask(o,q1.bind(null,o,i))),wh.applyMask(n,o),q1(o,i,n),{modules:o,version:t,errorCorrectionLevel:i,maskPattern:n,segments:r}}ry.create=function(t,i){if(typeof t>"u"||t==="")throw new Error("No input text");let n=j1.M,r,a;return typeof i<"u"&&(n=j1.from(i.errorCorrectionLevel,j1.M),r=lc.from(i.version),a=wh.from(i.maskPattern),i.toSJISFunc&&n1.setToSJISFunction(i.toSJISFunc)),xB(t,r,n,a)};var vy={},x2={};(function(e){function t(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let n=i.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+i);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(a){return[a,a]}))),n.length===6&&n.push("F","F");const r=parseInt(n.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});const r=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,a=n.width&&n.width>=21?n.width:void 0,s=n.scale||4;return{width:a,scale:a?4:s,margin:r,color:{dark:t(n.color.dark||"#000000ff"),light:t(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,r){return r.width&&r.width>=n+r.margin*2?r.width/(n+r.margin*2):r.scale},e.getImageWidth=function(n,r){const a=e.getScale(n,r);return Math.floor((n+r.margin*2)*a)},e.qrToImageData=function(n,r,a){const s=r.modules.size,l=r.modules.data,o=e.getScale(s,a),u=Math.floor((s+a.margin*2)*o),c=a.margin*o,d=[a.color.light,a.color.dark];for(let h=0;h<u;h++)for(let f=0;f<u;f++){let _=(h*u+f)*4,m=a.color.light;if(h>=c&&f>=c&&h<u-c&&f<u-c){const g=Math.floor((h-c)/o),v=Math.floor((f-c)/o);m=d[l[g*s+v]?1:0]}n[_++]=m.r,n[_++]=m.g,n[_++]=m.b,n[_]=m.a}}})(x2);(function(e){const t=x2;function i(r,a,s){r.clearRect(0,0,a.width,a.height),a.style||(a.style={}),a.height=s,a.width=s,a.style.height=s+"px",a.style.width=s+"px"}function n(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(a,s,l){let o=l,u=s;typeof o>"u"&&(!s||!s.getContext)&&(o=s,s=void 0),s||(u=n()),o=t.getOptions(o);const c=t.getImageWidth(a.modules.size,o),d=u.getContext("2d"),h=d.createImageData(c,c);return t.qrToImageData(h.data,a,o),i(d,u,c),d.putImageData(h,0,0),u},e.renderToDataURL=function(a,s,l){let o=l;typeof o>"u"&&(!s||!s.getContext)&&(o=s,s=void 0),o||(o={});const u=e.render(a,s,o),c=o.type||"image/png",d=o.rendererOpts||{};return u.toDataURL(c,d.quality)}})(vy);var gy={};const TB=x2;function s_(e,t){const i=e.a/255,n=t+'="'+e.hex+'"';return i<1?n+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':n}function G1(e,t,i){let n=e+t;return typeof i<"u"&&(n+=" "+i),n}function HB(e,t,i){let n="",r=0,a=!1,s=0;for(let l=0;l<e.length;l++){const o=Math.floor(l%t),u=Math.floor(l/t);!o&&!a&&(a=!0),e[l]?(s++,l>0&&o>0&&e[l-1]||(n+=a?G1("M",o+i,.5+u+i):G1("m",r,0),r=0,a=!1),o+1<t&&e[l+1]||(n+=G1("h",s),s=0)):r++}return n}gy.render=function(t,i,n){const r=TB.getOptions(i),a=t.modules.size,s=t.modules.data,l=a+r.margin*2,o=r.color.light.a?"<path "+s_(r.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",u="<path "+s_(r.color.dark,"stroke")+' d="'+HB(s,a,r.margin)+'"/>',c='viewBox="0 0 '+l+" "+l+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(r.width?'width="'+r.width+'" height="'+r.width+'" ':"")+c+' shape-rendering="crispEdges">'+o+u+`</svg>
|
|
58
|
+
`;return typeof n=="function"&&n(null,h),h};const NB=qV,Ch=ry,by=vy,PB=gy;function T2(e,t,i,n,r){const a=[].slice.call(arguments,1),s=a.length,l=typeof a[s-1]=="function";if(!l&&!NB())throw new Error("Callback required as last argument");if(l){if(s<2)throw new Error("Too few arguments provided");s===2?(r=i,i=t,t=n=void 0):s===3&&(t.getContext&&typeof r>"u"?(r=n,n=void 0):(r=n,n=i,i=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(i=t,t=n=void 0):s===2&&!t.getContext&&(n=i,i=t,t=void 0),new Promise(function(o,u){try{const c=Ch.create(i,n);o(e(c,t,n))}catch(c){u(c)}})}try{const o=Ch.create(i,n);r(null,e(o,t,n))}catch(o){r(o)}}ml.create=Ch.create;ml.toCanvas=T2.bind(null,by.render);ml.toDataURL=T2.bind(null,by.renderToDataURL);ml.toString=T2.bind(null,function(e,t,i){return PB.render(e,i)});const vl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},OB=vl("sliders","0 0 256 256",'<path d="M60,108.29V40a4,4,0,0,0-8,0v68.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V163.71a28,28,0,0,0,0-55.42ZM56,156a20,20,0,1,1,20-20A20,20,0,0,1,56,156Zm76-95.71V40a4,4,0,0,0-8,0V60.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V115.71a28,28,0,0,0,0-55.42ZM128,108a20,20,0,1,1,20-20A20,20,0,0,1,128,108Zm100,60a28,28,0,0,0-24-27.71V40a4,4,0,0,0-8,0V140.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V195.71A28,28,0,0,0,228,168Zm-28,20a20,20,0,1,1,20-20A20,20,0,0,1,200,188Z"/>'),IB=vl("sliders","0 0 256 256",'<path d="M62,106.6V40a6,6,0,0,0-12,0v66.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V165.4a30,30,0,0,0,0-58.8ZM56,154a18,18,0,1,1,18-18A18,18,0,0,1,56,154Zm78-95.4V40a6,6,0,0,0-12,0V58.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V117.4a30,30,0,0,0,0-58.8ZM128,106a18,18,0,1,1,18-18A18,18,0,0,1,128,106Zm102,62a30.05,30.05,0,0,0-24-29.4V40a6,6,0,0,0-12,0v98.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V197.4A30.05,30.05,0,0,0,230,168Zm-30,18a18,18,0,1,1,18-18A18,18,0,0,1,200,186Z"/>'),l_=vl("sliders","0 0 256 256",'<path d="M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z"/>'),RB=vl("sliders","0 0 256 256",'<path d="M68,102.06V40a12,12,0,0,0-24,0v62.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V169.94a36,36,0,0,0,0-67.88ZM56,148a12,12,0,1,1,12-12A12,12,0,0,1,56,148ZM164,88a36.07,36.07,0,0,0-24-33.94V40a12,12,0,0,0-24,0V54.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V121.94A36.07,36.07,0,0,0,164,88Zm-36,12a12,12,0,1,1,12-12A12,12,0,0,1,128,100Zm108,68a36.07,36.07,0,0,0-24-33.94V40a12,12,0,0,0-24,0v94.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V201.94A36.07,36.07,0,0,0,236,168Zm-36,12a12,12,0,1,1,12-12A12,12,0,0,1,200,180Z"/>'),DB=vl("sliders","0 0 256 256",'<path d="M84,136a28,28,0,0,1-20,26.83V216a8,8,0,0,1-16,0V162.83a28,28,0,0,1,0-53.66V40a8,8,0,0,1,16,0v69.17A28,28,0,0,1,84,136Zm52-74.83V40a8,8,0,0,0-16,0V61.17a28,28,0,0,0,0,53.66V216a8,8,0,0,0,16,0V114.83a28,28,0,0,0,0-53.66Zm72,80V40a8,8,0,0,0-16,0V141.17a28,28,0,0,0,0,53.66V216a8,8,0,0,0,16,0V194.83a28,28,0,0,0,0-53.66Z"/>'),VB=vl("sliders","0 0 256 256",'<path d="M80,136a24,24,0,1,1-24-24A24,24,0,0,1,80,136Zm48-72a24,24,0,1,0,24,24A24,24,0,0,0,128,64Zm72,80a24,24,0,1,0,24,24A24,24,0,0,0,200,144Z" opacity="0.2"/><path d="M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z"/>'),BB="sliders",yy=Object.freeze(Object.defineProperty({__proto__:null,bold:RB,default:l_,duotone:VB,fill:DB,glyphName:BB,light:IB,regular:l_,thin:OB},Symbol.toStringTag,{value:"Module"})),gl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},ZB=gl("brackets-curly","0 0 256 256",'<path d="M35.89,128C52,136.23,52,155.64,52,172c0,24.8,1.35,40,28,40a4,4,0,0,1,0,8c-36,0-36-26.61-36-48,0-24.8-1.35-40-28-40a4,4,0,0,1,0-8c26.65,0,28-15.2,28-40,0-21.39,0-48,36-48a4,4,0,0,1,0,8C53.35,44,52,59.2,52,84,52,100.36,52,119.77,35.89,128ZM240,124c-26.65,0-28-15.2-28-40,0-21.39,0-48-36-48a4,4,0,0,0,0,8c26.65,0,28,15.2,28,40,0,16.36,0,35.77,16.11,44C204,136.23,204,155.64,204,172c0,24.8-1.35,40-28,40a4,4,0,0,0,0,8c36,0,36-26.61,36-48,0-24.8,1.35-40,28-40a4,4,0,0,0,0-8Z"/>'),FB=gl("brackets-curly","0 0 256 256",'<path d="M39.91,128a27.68,27.68,0,0,1,9.49,11.13C54,148.62,54,160.51,54,172c0,24.27,1.21,38,26,38a6,6,0,0,1,0,12c-16.88,0-27.81-5.6-33.4-17.13C42,195.38,42,183.49,42,172c0-24.27-1.21-38-26-38a6,6,0,0,1,0-12c24.79,0,26-13.73,26-38,0-11.49,0-23.38,4.6-32.87C52.19,39.6,63.12,34,80,34a6,6,0,0,1,0,12C55.21,46,54,59.73,54,84c0,11.49,0,23.38-4.6,32.87A27.68,27.68,0,0,1,39.91,128ZM240,122c-24.79,0-26-13.73-26-38,0-11.49,0-23.38-4.6-32.87C203.81,39.6,192.88,34,176,34a6,6,0,0,0,0,12c24.79,0,26,13.73,26,38,0,11.49,0,23.38,4.6,32.87A27.68,27.68,0,0,0,216.09,128a27.68,27.68,0,0,0-9.49,11.13C202,148.62,202,160.51,202,172c0,24.27-1.21,38-26,38a6,6,0,0,0,0,12c16.88,0,27.81-5.6,33.4-17.13,4.6-9.49,4.6-21.38,4.6-32.87,0-24.27,1.21-38,26-38a6,6,0,0,0,0-12Z"/>'),o_=gl("brackets-curly","0 0 256 256",'<path d="M43.18,128a29.78,29.78,0,0,1,8,10.26c4.8,9.9,4.8,22,4.8,33.74,0,24.31,1,36,24,36a8,8,0,0,1,0,16c-17.48,0-29.32-6.14-35.2-18.26-4.8-9.9-4.8-22-4.8-33.74,0-24.31-1-36-24-36a8,8,0,0,1,0-16c23,0,24-11.69,24-36,0-11.72,0-23.84,4.8-33.74C50.68,38.14,62.52,32,80,32a8,8,0,0,1,0,16C57,48,56,59.69,56,84c0,11.72,0,23.84-4.8,33.74A29.78,29.78,0,0,1,43.18,128ZM240,120c-23,0-24-11.69-24-36,0-11.72,0-23.84-4.8-33.74C205.32,38.14,193.48,32,176,32a8,8,0,0,0,0,16c23,0,24,11.69,24,36,0,11.72,0,23.84,4.8,33.74a29.78,29.78,0,0,0,8,10.26,29.78,29.78,0,0,0-8,10.26c-4.8,9.9-4.8,22-4.8,33.74,0,24.31-1,36-24,36a8,8,0,0,0,0,16c17.48,0,29.32-6.14,35.2-18.26,4.8-9.9,4.8-22,4.8-33.74,0-24.31,1-36,24-36a8,8,0,0,0,0-16Z"/>'),zB=gl("brackets-curly","0 0 256 256",'<path d="M54.8,119.49A35.06,35.06,0,0,1,49.05,128a35.06,35.06,0,0,1,5.75,8.51C60,147.24,60,159.83,60,172c0,25.94,1.84,32,20,32a12,12,0,0,1,0,24c-19.14,0-32.2-6.9-38.8-20.51C36,196.76,36,184.17,36,172c0-25.94-1.84-32-20-32a12,12,0,0,1,0-24c18.16,0,20-6.06,20-32,0-12.17,0-24.76,5.2-35.49C47.8,34.9,60.86,28,80,28a12,12,0,0,1,0,24c-18.16,0-20,6.06-20,32C60,96.17,60,108.76,54.8,119.49ZM240,116c-18.16,0-20-6.06-20-32,0-12.17,0-24.76-5.2-35.49C208.2,34.9,195.14,28,176,28a12,12,0,0,0,0,24c18.16,0,20,6.06,20,32,0,12.17,0,24.76,5.2,35.49A35.06,35.06,0,0,0,207,128a35.06,35.06,0,0,0-5.75,8.51C196,147.24,196,159.83,196,172c0,25.94-1.84,32-20,32a12,12,0,0,0,0,24c19.14,0,32.2-6.9,38.8-20.51C220,196.76,220,184.17,220,172c0-25.94,1.84-32,20-32a12,12,0,0,0,0-24Z"/>'),UB=gl("brackets-curly","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM88,155.84c.29,14.26.41,20.16,16,20.16a8,8,0,0,1,0,16c-31.27,0-31.72-22.43-32-35.84C71.71,141.9,71.59,136,56,136a8,8,0,0,1,0-16c15.59,0,15.71-5.9,16-20.16C72.28,86.43,72.73,64,104,64a8,8,0,0,1,0,16c-15.59,0-15.71,5.9-16,20.16-.17,8.31-.41,20.09-8,27.84C87.59,135.75,87.83,147.53,88,155.84ZM200,136c-15.59,0-15.71,5.9-16,20.16-.28,13.41-.73,35.84-32,35.84a8,8,0,0,1,0-16c15.59,0,15.71-5.9,16-20.16.17-8.31.41-20.09,8-27.84-7.6-7.75-7.84-19.53-8-27.84C167.71,85.9,167.59,80,152,80a8,8,0,0,1,0-16c31.27,0,31.72,22.43,32,35.84.29,14.26.41,20.16,16,20.16a8,8,0,0,1,0,16Z"/>'),WB=gl("brackets-curly","0 0 256 256",'<path d="M240,128c-64,0,0,88-64,88H80c-64,0,0-88-64-88,64,0,0-88,64-88h96C240,40,176,128,240,128Z" opacity="0.2"/><path d="M43.18,128a29.78,29.78,0,0,1,8,10.26c4.8,9.9,4.8,22,4.8,33.74,0,24.31,1,36,24,36a8,8,0,0,1,0,16c-17.48,0-29.32-6.14-35.2-18.26-4.8-9.9-4.8-22-4.8-33.74,0-24.31-1-36-24-36a8,8,0,0,1,0-16c23,0,24-11.69,24-36,0-11.72,0-23.84,4.8-33.74C50.68,38.14,62.52,32,80,32a8,8,0,0,1,0,16C57,48,56,59.69,56,84c0,11.72,0,23.84-4.8,33.74A29.78,29.78,0,0,1,43.18,128ZM240,120c-23,0-24-11.69-24-36,0-11.72,0-23.84-4.8-33.74C205.32,38.14,193.48,32,176,32a8,8,0,0,0,0,16c23,0,24,11.69,24,36,0,11.72,0,23.84,4.8,33.74a29.78,29.78,0,0,0,8,10.26,29.78,29.78,0,0,0-8,10.26c-4.8,9.9-4.8,22-4.8,33.74,0,24.31-1,36-24,36a8,8,0,0,0,0,16c17.48,0,29.32-6.14,35.2-18.26,4.8-9.9,4.8-22,4.8-33.74,0-24.31,1-36,24-36a8,8,0,0,0,0-16Z"/>'),jB="brackets-curly",wy=Object.freeze(Object.defineProperty({__proto__:null,bold:zB,default:o_,duotone:WB,fill:UB,glyphName:jB,light:FB,regular:o_,thin:ZB},Symbol.toStringTag,{value:"Module"}));function u_(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function KB(e){if(Array.isArray(e))return e}function qB(e,t,i){return(t=tZ(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function GB(e,t){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var n,r,a,s,l=[],o=!0,u=!1;try{if(a=(i=i.call(e)).next,t!==0)for(;!(o=(n=a.call(i)).done)&&(l.push(n.value),l.length!==t);o=!0);}catch(c){u=!0,r=c}finally{try{if(!o&&i.return!=null&&(s=i.return(),Object(s)!==s))return}finally{if(u)throw r}}return l}}function YB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
59
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c_(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),i.push.apply(i,n)}return i}function d_(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?c_(Object(i),!0).forEach(function(n){qB(e,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):c_(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}function XB(e,t){if(e==null)return{};var i,n,r=JB(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)i=a[n],t.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}function JB(e,t){if(e==null)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;i[n]=e[n]}return i}function QB(e,t){return KB(e)||GB(e,t)||iZ(e,t)||YB()}function eZ(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var n=i.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tZ(e){var t=eZ(e,"string");return typeof t=="symbol"?t:t+""}function iZ(e,t){if(e){if(typeof e=="string")return u_(e,t);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?u_(e,t):void 0}}function nZ(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function h_(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),i.push.apply(i,n)}return i}function f_(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?h_(Object(i),!0).forEach(function(n){nZ(e,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):h_(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}function rZ(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(n){return t.reduceRight(function(r,a){return a(r)},n)}}function Lo(e){return function t(){for(var i=this,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return r.length>=e.length?e.apply(this,r):function(){for(var s=arguments.length,l=new Array(s),o=0;o<s;o++)l[o]=arguments[o];return t.apply(i,[].concat(r,l))}}}function oc(e){return{}.toString.call(e).includes("Object")}function aZ(e){return!Object.keys(e).length}function g0(e){return typeof e=="function"}function sZ(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function lZ(e,t){return oc(t)||ea("changeType"),Object.keys(t).some(function(i){return!sZ(e,i)})&&ea("changeField"),t}function oZ(e){g0(e)||ea("selectorType")}function uZ(e){g0(e)||oc(e)||ea("handlerType"),oc(e)&&Object.values(e).some(function(t){return!g0(t)})&&ea("handlersType")}function cZ(e){e||ea("initialIsRequired"),oc(e)||ea("initialType"),aZ(e)&&ea("initialContent")}function dZ(e,t){throw new Error(e[t]||e.default)}var hZ={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"},ea=Lo(dZ)(hZ),ou={changes:lZ,selector:oZ,handler:uZ,initial:cZ};function fZ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ou.initial(e),ou.handler(t);var i={current:e},n=Lo(mZ)(i,t),r=Lo(_Z)(i),a=Lo(ou.changes)(e),s=Lo(pZ)(i);function l(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(c){return c};return ou.selector(u),u(i.current)}function o(u){rZ(n,r,a,s)(u)}return[l,o]}function pZ(e,t){return g0(t)?t(e.current):t}function _Z(e,t){return e.current=f_(f_({},e.current),t),t}function mZ(e,t,i){return g0(t)?t(e.current):Object.keys(i).forEach(function(n){var r;return(r=t[n])===null||r===void 0?void 0:r.call(t,e.current[n])}),i}var vZ={create:fZ},gZ={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function bZ(e){return function t(){for(var i=this,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return r.length>=e.length?e.apply(this,r):function(){for(var s=arguments.length,l=new Array(s),o=0;o<s;o++)l[o]=arguments[o];return t.apply(i,[].concat(r,l))}}}function yZ(e){return{}.toString.call(e).includes("Object")}function wZ(e){return e||p_("configIsRequired"),yZ(e)||p_("configType"),e.urls?(SZ(),{paths:{vs:e.urls.monacoBase}}):e}function SZ(){console.warn(Sy.deprecation)}function CZ(e,t){throw new Error(e[t]||e.default)}var Sy={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!
|
|
60
|
+
You are using deprecated way of configuration.
|
|
61
|
+
|
|
62
|
+
Instead of using
|
|
63
|
+
monaco.config({ urls: { monacoBase: '...' } })
|
|
64
|
+
use
|
|
65
|
+
monaco.config({ paths: { vs: '...' } })
|
|
66
|
+
|
|
67
|
+
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
68
|
+
`},p_=bZ(CZ)(Sy),kZ={config:wZ},AZ=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return function(r){return i.reduceRight(function(a,s){return s(a)},r)}};function Cy(e,t){return Object.keys(t).forEach(function(i){t[i]instanceof Object&&e[i]&&Object.assign(t[i],Cy(e[i],t[i]))}),d_(d_({},e),t)}var $Z={type:"cancelation",msg:"operation is manually canceled"};function Y1(e){var t=!1,i=new Promise(function(n,r){e.then(function(a){return t?r($Z):n(a)}),e.catch(r)});return i.cancel=function(){return t=!0},i}var MZ=["monaco"],LZ=vZ.create({config:gZ,isInitialized:!1,resolve:null,reject:null,monaco:null}),ky=QB(LZ,2),x0=ky[0],r1=ky[1];function EZ(e){var t=kZ.config(e),i=t.monaco,n=XB(t,MZ);r1(function(r){return{config:Cy(r.config,n),monaco:i}})}function xZ(){var e=x0(function(t){var i=t.monaco,n=t.isInitialized,r=t.resolve;return{monaco:i,isInitialized:n,resolve:r}});if(!e.isInitialized){if(r1({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Y1(X1);if(window.monaco&&window.monaco.editor)return Ay(window.monaco),e.resolve(window.monaco),Y1(X1);AZ(TZ,NZ)(PZ)}return Y1(X1)}function TZ(e){return document.body.appendChild(e)}function HZ(e){var t=document.createElement("script");return e&&(t.src=e),t}function NZ(e){var t=x0(function(n){var r=n.config,a=n.reject;return{config:r,reject:a}}),i=HZ("".concat(t.config.paths.vs,"/loader.js"));return i.onload=function(){return e()},i.onerror=t.reject,i}function PZ(){var e=x0(function(i){var n=i.config,r=i.resolve,a=i.reject;return{config:n,resolve:r,reject:a}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(i){var n=i.m||i;Ay(n),e.resolve(n)},function(i){e.reject(i)})}function Ay(e){x0().monaco||r1({monaco:e})}function OZ(){return x0(function(e){var t=e.monaco;return t})}var X1=new Promise(function(e,t){return r1({resolve:e,reject:t})}),$y={config:EZ,init:xZ,__getMonacoInstance:OZ};const IZ=Ne({__name:"MonacoJsonEditor",props:{modelValue:{},height:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,n=t,{resolved:r}=jc(),a=X(null),s=An(null),l=X(!1);let o=!1;return et(async()=>{const u=await $y.init();a.value&&(Pe(r,c=>u.editor.setTheme(c==="dark"?"vs-dark":"vs")),s.value=u.editor.create(a.value,{value:i.modelValue,language:"json",theme:r.value==="dark"?"vs-dark":"vs",fontSize:12,fontFamily:'"MesloLGS NF", monospace',minimap:{enabled:!1},scrollBeyondLastLine:!1,lineNumbers:"off",wordWrap:"on",automaticLayout:!0,tabSize:2,folding:!1,renderLineHighlight:"none",overviewRulerLanes:0,scrollbar:{verticalScrollbarSize:6}}),s.value.onDidChangeModelContent(()=>{o||n("update:modelValue",s.value.getValue())}),l.value=!0)}),Tt(()=>{var u;(u=s.value)==null||u.dispose()}),Pe(()=>i.modelValue,u=>{if(!s.value)return;s.value.getValue()!==u&&(o=!0,s.value.setValue(u),o=!1)}),(u,c)=>{const d=g2;return p(),$("div",{style:ft({height:`${e.height??220}px`,width:"100%",position:"relative"})},[M("div",{ref_key:"containerEl",ref:a,style:{height:"100%",width:"100%"}},null,512),l.value?P("",!0):(p(),le(d,{key:0,variant:"block",width:"100%",height:"100%",radius:"none",label:"Loading editor",class:"monaco-skeleton"}))],4)}}}),__=jt(IZ,[["__scopeId","data-v-4ca02a18"]]),RZ={class:"pcf-root"},DZ={key:1,class:"pcf-no-schema type-body-sm"},VZ=Ne({__name:"PluginConfigForm",props:{hbSchema:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,n=t;function r(d,h){const f=JSON.parse(JSON.stringify(i.modelValue));let _=f;for(let m=0;m<d.length-1;m++)(_[d[m]]===void 0||typeof _[d[m]]!="object")&&(_[d[m]]={}),_=_[d[m]];_[d[d.length-1]]=h,n("update:modelValue",f)}function a(d){let h=i.modelValue;for(const f of d){if(h==null||typeof h!="object")return;h=h[f]}return h}function s(d){return Array.isArray(d.type)?d.type[0]:d.type??"string"}function l(d,h){const f=a(d)??[],_=h.default??(s(h)==="string"?"":s(h)==="number"?0:"");r(d,[...f,_])}function o(d,h){const f=[...a(d)??[]];f.splice(h,1),r(d,f)}function u(d,h,f){const _=[...a(d)??[]];_[h]=f,r(d,_)}const c=H(()=>i.hbSchema.schema??{type:"object",properties:{}});return(d,h)=>{const f=Qo("PluginConfigField");return p(),$("div",RZ,[c.value.properties?(p(!0),$($e,{key:0},Ue(c.value.properties,(_,m)=>{var g;return p(),le(f,{key:m,"field-key":String(m),field:_,path:[String(m)],required:((g=c.value.required)==null?void 0:g.includes(String(m)))??!1,value:a([String(m)]),onChange:v=>r([String(m)],v),onAddArray:h[0]||(h[0]=(v,w)=>l(v,w)),onRemoveArray:h[1]||(h[1]=(v,w)=>o(v,w)),onUpdateArray:h[2]||(h[2]=(v,w,S)=>u(v,w,S))},null,8,["field-key","field","path","required","value","onChange"])}),128)):(p(),$("p",DZ,"No configurable fields found in schema."))])}}}),BZ=jt(VZ,[["__scopeId","data-v-ac5552bf"]]),ZZ={key:0,class:"inspector"},FZ={class:"inspector-header"},zZ={class:"inspector-avatar"},UZ={class:"inspector-title"},WZ={class:"inspector-name type-heading-01"},jZ={class:"inspector-version type-body-sm tabular"},KZ={class:"inspector-body nb-inspector"},qZ={class:"field-value type-body-compact tabular"},GZ={class:"field-value type-body-compact tabular"},YZ={class:"hap-bridge-info"},XZ={class:"hap-qr"},JZ=["src"],QZ={class:"hap-details"},eF={class:"field-value type-code-md"},tF={class:"field-value type-body-compact tabular"},iF={class:"field-value type-body-compact"},nF={key:1,class:"visual-editor-wrap"},rF={key:0,class:"json-error type-body-sm"},aF={key:1,class:"json-error type-body-sm"},sF={class:"setup-actions"},lF={key:0,class:"json-error type-body-sm"},oF={class:"setup-actions"},uF={class:"import-export-row"},cF={class:"plugin-device-type type-body-sm"},dF={class:"field-value type-body-compact"},hF={class:"field-value type-body-compact tabular"},fF={class:"field-value type-body-compact"},pF={class:"field-value type-body-compact"},_F={class:"error-text type-code-sm"},mF={class:"plog-time tabular"},vF={class:"plog-msg"},m_="openbridge.pluginInspector.sections",gF=Ne({__name:"PluginInspector",setup(e){const t=Tr(),i=X(!1),n=X("");async function r(){if(!i.value){i.value=!0;try{await ze.daemon.restart();let z=0;const Q=setInterval(async()=>{z++;try{await ze.health(),clearInterval(Q),location.reload()}catch{}z>60&&(clearInterval(Q),i.value=!1)},1e3)}catch{i.value=!1}}}const a=dl(),s=[{id:"visual",label:"Visual",icon:yy},{id:"json",label:"JSON",icon:wy}],l={status:"default",hap:"default",update:"default",manage:"collapsed",config:"default",transfer:"collapsed",devices:"default",manifest:"collapsed",error:"default",logs:"default"},o=X({...l});try{const z=JSON.parse(localStorage.getItem(m_)??"{}");o.value={...l,...z}}catch{}Pe(o,z=>localStorage.setItem(m_,JSON.stringify(z)),{deep:!0}),Pe(()=>{var z,Q;return(Q=(z=a.selectedPlugin)==null?void 0:z.hapBridge)==null?void 0:Q.setupURI},async z=>{if(z)try{n.value=await ml.toDataURL(z,{width:160,margin:1})}catch{n.value=""}else n.value=""},{immediate:!0});const u=H(()=>{const z=a.selectedPlugin;return z!=null&&z.devices?Object.values(z.devices):[]}),c={switch:"plugs",light:"lamp",thermostat:"thermometer",dehumidifier:"drop",energy_meter:"lightning",gate:"garage",sensor:"pulse"};function d(z){return c[z]??"cube"}function h(z){return z==="running"?"success":z==="error"?"danger":z==="loading"?"info":"neutral"}const f={idle:"Idle",loading:"Loading",running:"Running",stopped:"Stopped",error:"Error"},_=X(!1);async function m(){if(!(!a.selectedPlugin||_.value)){_.value=!0;try{await ze.marketplace.update(a.selectedPlugin.manifest.name),await t.fetchPlugins(),await r()}catch(z){console.error("Failed to update plugin:",z)}finally{_.value=!1}}}const g=X(!1),v=X(!1);async function w(){if(!(!a.selectedPlugin||v.value)){v.value=!0;try{await ze.marketplace.uninstall(a.selectedPlugin.manifest.name),await t.fetchPlugins(),a.close(),await ze.daemon.restart()}catch(z){console.error("Failed to remove plugin:",z)}finally{v.value=!1,g.value=!1}}}const S=X(!1);async function y(){if(!a.selectedPlugin||S.value)return;const z=!a.selectedPlugin.disabled;S.value=!0;try{const Q=await ze.setPluginDisabled(a.selectedPlugin.id,z);a.selectedPlugin.disabled=Q.disabled}catch(Q){console.error("Failed to toggle plugin disabled state:",Q)}finally{S.value=!1}}const A=X(null),L=X(!1),k=X(""),V=X(""),T=X(!1),J=X(null),x=X(!1),N=X(null),O=X({}),R=X("visual"),j=H(()=>{var z;return((z=N.value)==null?void 0:z.schema)!=null}),G=H(()=>{var z;return((z=a.selectedPlugin)==null?void 0:z.source)==="homebridge"}),ae=H(()=>a.selectedPlugin!=null&&a.selectedPlugin.source!=="homebridge"),q=X(""),se=X(!1),me=X(null),U=X(!1),ve=H(()=>{try{return JSON.parse(q.value),!0}catch{return!1}});Pe(()=>a.selectedPlugin,async z=>{if(q.value="",me.value=null,U.value=!1,!(!z||z.source==="homebridge"))try{const Q=await ze.config.getPlugin(z.manifest.name);q.value=JSON.stringify(Q.config??{},null,2)}catch{q.value="{}"}});const ce=X(null);function ge(){var z;(z=ce.value)==null||z.click()}function ue(){if(!a.selectedPlugin)return;const z=a.selectedPlugin.manifest.name,Q=G.value?V.value:q.value;if(!Q)return;const D=new Blob([Q],{type:"application/json"}),oe=URL.createObjectURL(D),ye=document.createElement("a");ye.href=oe,ye.download=`${z.replace(/[^a-z0-9-]/gi,"-")}-config.json`,ye.click(),URL.revokeObjectURL(oe)}async function pe(z){var D;const Q=(D=z.target.files)==null?void 0:D[0];if(!(!Q||!a.selectedPlugin))try{const oe=await Q.text(),ye=JSON.parse(oe);let xe;if(ye.platform&&typeof ye.platform=="string"){const{plugin:we,...Re}=ye;xe=Re}else xe=ye;await ze.config.savePlugin(a.selectedPlugin.manifest.name,xe),G.value?V.value=JSON.stringify(xe,null,2):q.value=JSON.stringify(xe,null,2),ce.value&&(ce.value.value="")}catch(oe){console.error("Import failed:",oe)}}async function W(){if(se.value||!a.selectedPlugin)return;let z;try{z=JSON.parse(q.value)}catch{me.value="Invalid JSON: fix the syntax first";return}se.value=!0,me.value=null,U.value=!1;try{await ze.config.savePlugin(a.selectedPlugin.manifest.name,z),U.value=!0,setTimeout(()=>{U.value=!1},3e3)}catch(Q){me.value=String(Q)}finally{se.value=!1}}const he=H(()=>{const z=a.selectedPlugin;return!z||z.source!=="homebridge"?"":z.platformName??z.id??z.manifest.name});Pe(()=>a.selectedPlugin,async z=>{if(A.value=null,k.value="",V.value="",N.value=null,O.value={},J.value=null,x.value=!1,!(!z||z.source!=="homebridge")){L.value=!0;try{const Q=await ze.config.getHbPlugin(he.value,z.packageName);if(Q.config){k.value=he.value,V.value=JSON.stringify(Q.config,null,2),O.value=Q.config,await te(z.manifest.name);return}const D=await ze.pluginInfo(z.packageName??z.manifest.name);A.value=D,D.platforms.length>0&&await be(D.platforms[0],D.mainFile),await te(z.manifest.name)}catch{try{const Q=await ze.config.getHbPlugin(he.value,z.packageName);Q.config&&(k.value=he.value,V.value=JSON.stringify(Q.config,null,2),O.value=Q.config)}catch{}}finally{L.value=!1}}});async function te(z){try{const Q=await fetch(`/api/marketplace/plugin-schema/${encodeURIComponent(z)}`);if(Q.ok){const D=await Q.json();N.value=D.schema}}catch{}}async function be(z,Q){var D,oe;k.value=z;try{const ye=await ze.config.getPlatform(z),xe=ye.config?ye.config:{platform:z,plugin:Q??((D=A.value)==null?void 0:D.mainFile)??""};V.value=JSON.stringify(xe,null,2),O.value=xe}catch{const ye={platform:z,plugin:Q??((oe=A.value)==null?void 0:oe.mainFile)??""};V.value=JSON.stringify(ye,null,2),O.value=ye}}function E(z){O.value=z,V.value=JSON.stringify(z,null,2)}function F(z){V.value=z;try{O.value=JSON.parse(z)}catch{}}function ie(){try{return JSON.parse(V.value)}catch{return null}}const fe=H(()=>ie()!==null),ne=H(()=>{const z=ie();return z!==null&&typeof z.platform!="string"}),Z=X([]),re=X(null);let b=null;function C(){if(b&&(b.close(),b=null),!a.selectedPlugin)return;const z=location.protocol==="https:"?"wss:":"ws:";b=new WebSocket(`${z}//${location.host}/ws/logs`),b.onmessage=Q=>{var D,oe;try{const ye=JSON.parse(Q.data);(ye.plugin===((D=a.selectedPlugin)==null?void 0:D.id)||ye.plugin===((oe=a.selectedPlugin)==null?void 0:oe.manifest.name))&&(Z.value=[...Z.value.slice(-199),ye],setTimeout(()=>{re.value&&(re.value.scrollTop=re.value.scrollHeight)},10))}catch{}},b.onclose=()=>{a.selectedPlugin&&setTimeout(C,3e3)}}Pe(()=>a.selectedPlugin,async z=>{if(Z.value=[],b==null||b.close(),b=null,!!z){try{const Q=await ze.logs(z.manifest.name,100);Z.value=Q.entries,setTimeout(()=>{re.value&&(re.value.scrollTop=re.value.scrollHeight)},20)}catch{}C()}}),et(()=>{a.selectedPlugin&&C()}),Tt(()=>{b==null||b.close()});const B={debug:"var(--nb-c-text-muted)",info:"var(--nb-c-info)",warn:"var(--nb-c-warning)",error:"var(--nb-c-danger)"};async function de(){if(T.value||!a.selectedPlugin)return;const z=ie();if(!z){J.value="Invalid JSON: fix the syntax first";return}T.value=!0,J.value=null,x.value=!1;try{const Q=a.selectedPlugin;Q.source==="homebridge"?await ze.config.saveHbPlugin(he.value,z,Q.packageName):await ze.config.savePlugin(Q.manifest.name,z),x.value=!0,setTimeout(()=>{x.value=!1},3e3)}catch(Q){J.value=String(Q)}finally{T.value=!1}}return(z,Q)=>{const D=Ke,oe=Er,ye=L0,xe=Wc,we=w2,Re=kt,Ge=xr,Ct=Nb,qt=Yc,Dt=R4,rt=I4;return Y(a).selectedPlugin?(p(),$("div",ZZ,[M("div",FZ,[M("div",zZ,[ee(D,{name:Y(Cs),size:"lg"},null,8,["name"])]),M("div",UZ,[M("h2",WZ,K(Y(a).selectedPlugin.manifest.name),1),M("span",jZ,"v"+K(Y(a).selectedPlugin.manifest.version),1)]),ee(oe,{class:"inspector-status",variant:h(Y(a).selectedPlugin.status)},{default:I(()=>[_e(K(f[Y(a).selectedPlugin.status]),1)]),_:1},8,["variant"])]),M("div",KZ,[ee(we,{size:o.value.status,"onUpdate:size":Q[0]||(Q[0]=Se=>o.value.status=Se),title:"Status",fluid:""},{default:I(()=>[Y(a).selectedPlugin.startedAt?(p(),le(ye,{key:0,label:"Started"},{default:I(()=>[M("span",qZ,K(new Date(Y(a).selectedPlugin.startedAt).toLocaleString()),1)]),_:1})):P("",!0),Y(a).selectedPlugin.stoppedAt?(p(),le(ye,{key:1,label:"Stopped"},{default:I(()=>[M("span",GZ,K(new Date(Y(a).selectedPlugin.stoppedAt).toLocaleString()),1)]),_:1})):P("",!0),ee(ye,{label:"Disabled",control:"fit"},{default:I(()=>[ee(xe,{name:`plugin-disabled-${Y(a).selectedPlugin.id}`,"model-value":Y(a).selectedPlugin.disabled??!1,disabled:S.value,"onUpdate:modelValue":y},null,8,["name","model-value","disabled"])]),_:1})]),_:1},8,["size"]),Y(a).selectedPlugin.hapBridge?(p(),le(we,{key:0,size:o.value.hap,"onUpdate:size":Q[1]||(Q[1]=Se=>o.value.hap=Se),title:"HomeKit pairing",fluid:""},{default:I(()=>[M("div",YZ,[M("div",XZ,[n.value?(p(),$("img",{key:0,src:n.value,alt:"HomeKit QR Code",class:"hap-qr-img"},null,8,JZ)):P("",!0)]),M("div",QZ,[ee(ye,{label:"PIN"},{default:I(()=>[M("span",eF,K(Y(a).selectedPlugin.hapBridge.pincode),1)]),_:1}),ee(ye,{label:"Port"},{default:I(()=>[M("span",tF,K(Y(a).selectedPlugin.hapBridge.port),1)]),_:1}),ee(ye,{label:"Bridge"},{default:I(()=>[M("span",iF,K(Y(a).selectedPlugin.hapBridge.name),1)]),_:1})])]),Q[16]||(Q[16]=M("p",{class:"hap-hint type-helper-text"}," Scan with the Home app or enter the PIN manually to pair this plugin's devices. ",-1))]),_:1},8,["size"])):P("",!0),Y(a).selectedPlugin.availableUpdate?(p(),le(we,{key:1,size:o.value.update,"onUpdate:size":Q[2]||(Q[2]=Se=>o.value.update=Se),title:"Update",fluid:""},{default:I(()=>[ee(Ge,{status:"info",icon:ty,title:`Version ${Y(a).selectedPlugin.availableUpdate} is available`},{action:I(()=>[ee(Re,{variant:"primary",size:"sm",loading:_.value,disabled:_.value,onClick:m},{default:I(()=>[_e(K(_.value?"Updating...":"Update"),1)]),_:1},8,["loading","disabled"])]),default:I(()=>[_e(" Currently on "+K(Y(a).selectedPlugin.manifest.version)+". ",1)]),_:1},8,["title"])]),_:1},8,["size"])):P("",!0),ee(we,{size:o.value.manage,"onUpdate:size":Q[5]||(Q[5]=Se=>o.value.manage=Se),title:"Manage",fluid:""},{default:I(()=>[g.value?(p(),le(Ge,{key:1,status:"error",title:"This uninstalls the plugin and removes its configuration"},{action:I(()=>[ee(Re,{variant:"secondary",size:"sm",onClick:Q[4]||(Q[4]=Se=>g.value=!1)},{default:I(()=>[...Q[18]||(Q[18]=[_e("Cancel",-1)])]),_:1}),ee(Re,{variant:"danger",size:"sm",loading:v.value,onClick:w},{default:I(()=>[...Q[19]||(Q[19]=[_e("Remove",-1)])]),_:1},8,["loading"])]),default:I(()=>[Q[20]||(Q[20]=_e(" OpenBridge needs a restart afterwards. ",-1))]),_:1})):(p(),le(Re,{key:0,class:"manage-remove",variant:"danger",outlined:"",size:"sm",icon:Y(S2),onClick:Q[3]||(Q[3]=Se=>g.value=!0)},{default:I(()=>[...Q[17]||(Q[17]=[_e(" Remove plugin ",-1)])]),_:1},8,["icon"]))]),_:1},8,["size"]),G.value?(p(),le(we,{key:2,size:o.value.config,"onUpdate:size":Q[8]||(Q[8]=Se=>o.value.config=Se),title:"Platform config",fluid:""},{default:I(()=>[L.value?(p(),le(Ct,{key:0,status:"active",label:"Loading config…"})):(p(),$($e,{key:1},[A.value&&A.value.platforms.length>1?(p(),le(qt,{key:0,"model-value":k.value,items:A.value.platforms.map(Se=>({id:Se,label:Se})),"aria-label":"Platforms",size:"sm","onUpdate:modelValue":Q[6]||(Q[6]=Se=>be(Se))},null,8,["model-value","items"])):A.value&&A.value.platforms.length===0?(p(),le(Ge,{key:1,status:"warning",variant:"callout",title:"No platform detected"},{default:I(()=>[...Q[21]||(Q[21]=[_e(" Add a ",-1),M("code",null,"platforms[]",-1),_e(" entry manually in Config. ",-1)])]),_:1})):P("",!0),!A.value||A.value.platforms.length>0?(p(),$($e,{key:2},[j.value?(p(),le(qt,{key:0,"model-value":R.value,items:s,variant:"contained",size:"sm","onUpdate:modelValue":Q[7]||(Q[7]=Se=>R.value=Se)},null,8,["model-value"])):P("",!0),R.value==="visual"&&j.value?(p(),$("div",nF,[ee(BZ,{"hb-schema":N.value,"model-value":O.value,"onUpdate:modelValue":E},null,8,["hb-schema","model-value"])])):P("",!0),R.value==="json"||!j.value?(p(),$("div",{key:2,class:Te(["config-editor-wrap",{invalid:V.value&&!fe.value}])},[ee(__,{"model-value":V.value,height:220,"onUpdate:modelValue":F},null,8,["model-value"]),V.value&&!fe.value?(p(),$("div",rF,"Invalid JSON")):ne.value?(p(),$("div",aF,'Missing "platform" field')):P("",!0)],2)):P("",!0),J.value?(p(),le(Ge,{key:3,status:"error"},{default:I(()=>[_e(K(J.value),1)]),_:1})):P("",!0),M("div",sF,[ee(Re,{variant:"primary",size:"sm",loading:T.value,disabled:T.value||!fe.value||ne.value,icon:x.value?Y($n):Y(ac),onClick:de},{default:I(()=>[_e(K(x.value?"Saved!":"Save config"),1)]),_:1},8,["loading","disabled","icon"]),x.value?(p(),le(Re,{key:0,variant:"tertiary",size:"sm",loading:i.value,icon:Y(Qr),onClick:r},{default:I(()=>[_e(K(i.value?"Restarting…":"Restart OpenBridge"),1)]),_:1},8,["loading","icon"])):P("",!0)])],64)):P("",!0)],64))]),_:1},8,["size"])):P("",!0),ae.value?(p(),le(we,{key:3,size:o.value.config,"onUpdate:size":Q[10]||(Q[10]=Se=>o.value.config=Se),title:"Plugin config",fluid:""},{default:I(()=>[M("div",{class:Te(["config-editor-wrap",{invalid:q.value&&!ve.value}])},[ee(__,{"model-value":q.value,height:220,"onUpdate:modelValue":Q[9]||(Q[9]=Se=>q.value=Se)},null,8,["model-value"]),q.value&&!ve.value?(p(),$("div",lF,"Invalid JSON")):P("",!0)],2),me.value?(p(),le(Ge,{key:0,status:"error"},{default:I(()=>[_e(K(me.value),1)]),_:1})):P("",!0),M("div",oF,[ee(Re,{variant:"primary",size:"sm",loading:se.value,disabled:se.value||!ve.value,icon:U.value?Y($n):Y(ac),onClick:W},{default:I(()=>[_e(K(U.value?"Saved!":"Save config"),1)]),_:1},8,["loading","disabled","icon"]),U.value?(p(),le(Re,{key:0,variant:"tertiary",size:"sm",loading:i.value,icon:Y(Qr),onClick:r},{default:I(()=>[_e(K(i.value?"Restarting…":"Restart OpenBridge"),1)]),_:1},8,["loading","icon"])):P("",!0)])]),_:1},8,["size"])):P("",!0),ee(we,{size:o.value.transfer,"onUpdate:size":Q[11]||(Q[11]=Se=>o.value.transfer=Se),title:"Import & export",fluid:""},{default:I(()=>[M("div",uF,[ee(Re,{variant:"tertiary",size:"sm",icon:Y(WV),onClick:ue},{default:I(()=>[...Q[22]||(Q[22]=[_e("Export config",-1)])]),_:1},8,["icon"]),ee(Re,{variant:"tertiary",size:"sm",icon:Y(KV),onClick:ge},{default:I(()=>[...Q[23]||(Q[23]=[_e("Import config",-1)])]),_:1},8,["icon"]),M("input",{ref_key:"importInput",ref:ce,type:"file",accept:".json",style:{display:"none"},onChange:pe},null,544)])]),_:1},8,["size"]),u.value.length>0?(p(),le(we,{key:4,size:o.value.devices,"onUpdate:size":Q[12]||(Q[12]=Se=>o.value.devices=Se),title:`Devices (${u.value.length})`,fluid:""},{default:I(()=>[ee(rt,{size:"sm","aria-label":"Devices registered by this plugin"},{default:I(()=>[(p(!0),$($e,null,Ue(u.value,Se=>(p(),le(Dt,{key:Se.id,title:Se.name},{leading:I(()=>[ee(D,{name:d(Se.widgetType),size:"sm"},null,8,["name"])]),trailing:I(()=>[M("span",cF,K(Se.widgetType),1)]),_:2},1032,["title"]))),128))]),_:1})]),_:1},8,["size","title"])):P("",!0),ee(we,{size:o.value.manifest,"onUpdate:size":Q[13]||(Q[13]=Se=>o.value.manifest=Se),title:"Manifest",fluid:""},{default:I(()=>[ee(ye,{label:"Name"},{default:I(()=>[M("span",dF,K(Y(a).selectedPlugin.manifest.name),1)]),_:1}),ee(ye,{label:"Version"},{default:I(()=>[M("span",hF,K(Y(a).selectedPlugin.manifest.version),1)]),_:1}),Y(a).selectedPlugin.manifest.description?(p(),le(ye,{key:0,label:"Description"},{default:I(()=>[M("span",fF,K(Y(a).selectedPlugin.manifest.description),1)]),_:1})):P("",!0),Y(a).selectedPlugin.manifest.author?(p(),le(ye,{key:1,label:"Author"},{default:I(()=>[M("span",pF,K(Y(a).selectedPlugin.manifest.author),1)]),_:1})):P("",!0)]),_:1},8,["size"]),Y(a).selectedPlugin.error?(p(),le(we,{key:5,size:o.value.error,"onUpdate:size":Q[14]||(Q[14]=Se=>o.value.error=Se),title:"Error",fluid:""},{default:I(()=>[ee(Ge,{status:"error"},{default:I(()=>[M("code",_F,K(Y(a).selectedPlugin.error),1)]),_:1})]),_:1},8,["size"])):P("",!0),Z.value.length>0?(p(),le(we,{key:6,size:o.value.logs,"onUpdate:size":Q[15]||(Q[15]=Se=>o.value.logs=Se),title:"Recent logs",fluid:""},{default:I(()=>[M("div",{ref_key:"logsEl",ref:re,class:"plugin-log-terminal type-code-sm"},[(p(!0),$($e,null,Ue(Z.value,(Se,Ie)=>(p(),$("div",{key:Ie,class:"plugin-log-line"},[M("span",mF,K(new Date(Se.timestamp).toLocaleTimeString()),1),M("span",{class:"plog-level",style:ft({color:B[Se.level]})},K(Se.level.toUpperCase()),5),M("span",vF,K(Se.message),1)]))),128))],512)]),_:1},8,["size"])):P("",!0)])])):P("",!0)}}}),bF=jt(gF,[["__scopeId","data-v-f751c475"]]),yF=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},v_=yF("arrow-square-out","0 0 256 256",'<path d="M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"/>'),bl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},wF=bl("diamond","0 0 256 256",'<path d="M232.5,119.55,136.45,23.49a12,12,0,0,0-16.9,0l-96,96.06a12,12,0,0,0,0,16.9l96.05,96.06a12,12,0,0,0,16.9,0l96.05-96.06a12,12,0,0,0,0-16.9Zm-5.66,11.24-96.05,96.06a4,4,0,0,1-5.58,0l-96-96.06a3.94,3.94,0,0,1,0-5.58l96.05-96.06a4,4,0,0,1,5.58,0l96.05,96.06a3.94,3.94,0,0,1,0,5.58Z"/>'),SF=bl("diamond","0 0 256 256",'<path d="M233.92,118.14,137.86,22.08a14,14,0,0,0-19.72,0L22.08,118.14a14,14,0,0,0,0,19.72l96.06,96.06h0a14,14,0,0,0,19.72,0l96-96.06a13.94,13.94,0,0,0,0-19.72Zm-8.49,11.24-96.05,96.06a2,2,0,0,1-2.76,0L30.57,129.38a2,2,0,0,1,0-2.76l96.05-96.06a2,2,0,0,1,2.76,0l96.05,96.06a2,2,0,0,1,0,2.76Z"/>'),Ls=bl("diamond","0 0 256 256",'<path d="M235.33,116.72,139.28,20.66a16,16,0,0,0-22.56,0l-96,96.06a16,16,0,0,0,0,22.56l96.05,96.06h0a16,16,0,0,0,22.56,0l96.05-96.06a16,16,0,0,0,0-22.56ZM128,224h0L32,128,128,32,224,128Z"/>'),CF=bl("diamond","0 0 256 256",'<path d="M238.16,113.89,142.1,17.83a20,20,0,0,0-28.21,0l-96,96.06a20,20,0,0,0,0,28.22l96.05,96.06h0a20,20,0,0,0,28.21,0l96-96.06a20,20,0,0,0,0-28.22ZM128,218.33,37.68,128,128,37.67,218.32,128Z"/>'),kF=bl("diamond","0 0 256 256",'<path d="M240,128a15.85,15.85,0,0,1-4.67,11.28l-96.05,96.06a16,16,0,0,1-22.56,0h0l-96-96.06a16,16,0,0,1,0-22.56l96.05-96.06a16,16,0,0,1,22.56,0l96.05,96.06A15.85,15.85,0,0,1,240,128Z"/>'),AF=bl("diamond","0 0 256 256",'<path d="M229.67,133.62l-96,96a7.94,7.94,0,0,1-11.24,0l-96-96a7.94,7.94,0,0,1,0-11.24l96.05-96a7.94,7.94,0,0,1,11.24,0l96,96.05A7.94,7.94,0,0,1,229.67,133.62Z" opacity="0.2"/><path d="M235.33,116.72,139.28,20.66a16,16,0,0,0-22.56,0l-96,96.06a16,16,0,0,0,0,22.56l96.05,96.06h0a16,16,0,0,0,22.56,0l96.05-96.06a16,16,0,0,0,0-22.56ZM128,224h0L32,128,128,32,224,128Z"/>'),$F="diamond",MF=Object.freeze(Object.defineProperty({__proto__:null,bold:CF,default:Ls,duotone:AF,fill:kF,glyphName:$F,light:SF,regular:Ls,thin:wF},Symbol.toStringTag,{value:"Module"})),yl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},LF=yl("folder","0 0 256 256",'<path d="M216,76H129.66L101.17,47.52A11.9,11.9,0,0,0,92.69,44H40A12,12,0,0,0,28,56V200.62A11.4,11.4,0,0,0,39.38,212H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76ZM36,56a4,4,0,0,1,4-4H92.69a4,4,0,0,1,2.82,1.17L118.34,76H36ZM220,200.89a3.12,3.12,0,0,1-3.11,3.11H39.38A3.39,3.39,0,0,1,36,200.62V84H216a4,4,0,0,1,4,4Z"/>'),EF=yl("folder","0 0 256 256",'<path d="M216,74H130.49l-27.9-27.9a13.94,13.94,0,0,0-9.9-4.1H40A14,14,0,0,0,26,56V200.62A13.39,13.39,0,0,0,39.38,214H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74ZM40,54H92.69a2,2,0,0,1,1.41.59L113.51,74H38V56A2,2,0,0,1,40,54ZM218,200.89a1.11,1.11,0,0,1-1.11,1.11H39.38A1.4,1.4,0,0,1,38,200.62V86H216a2,2,0,0,1,2,2Z"/>'),g_=yl("folder","0 0 256 256",'<path d="M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40ZM216,200H40V88H216Z"/>'),xF=yl("folder","0 0 256 256",'<path d="M216,68H133.39l-26-29.29a20,20,0,0,0-15-6.71H40A20,20,0,0,0,20,52V200.62A19.41,19.41,0,0,0,39.38,220H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68ZM44,56H90.61l10.67,12H44ZM212,196H44V92H212Z"/>'),TF=yl("folder","0 0 256 256",'<path d="M216,72H131.31L104,44.69A15.88,15.88,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.41,15.41,0,0,0,39.39,216h177.5A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40Z"/>'),HF=yl("folder","0 0 256 256",'<path d="M128,80H32V56a8,8,0,0,1,8-8H92.69a8,8,0,0,1,5.65,2.34Z" opacity="0.2"/><path d="M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM92.69,56l16,16H40V56ZM216,200H40V88H216Z"/>'),NF="folder",PF=Object.freeze(Object.defineProperty({__proto__:null,bold:xF,default:g_,duotone:HF,fill:TF,glyphName:NF,light:EF,regular:g_,thin:LF},Symbol.toStringTag,{value:"Module"})),OF={class:"mp-panel"},IF={class:"mp-header"},RF={class:"mp-top"},DF={class:"mp-scroll"},VF={class:"mp-avatar"},BF={class:"mp-detail"},ZF={class:"mp-badges"},FF={class:"tabular"},zF={key:0,class:"mp-desc"},UF={key:1},WF={key:1,class:"mp-loading"},jF={class:"tabular"},KF={class:"mp-avatar"},qF=["src","alt"],GF={class:"mp-detail"},YF={key:0,class:"mp-desc"},XF={class:"mp-meta"},JF={class:"tabular"},QF={key:0},ez={key:1,class:"tabular"},tz={key:2,class:"tabular"},iz={class:"mp-links"},nz={key:3,class:"mp-load-more"},rz="https://marketplace.openbridge.nubisco.io",az=20,sz="https://marketplace.openbridge.nubisco.io/api",lz=Ne({__name:"MarketplacePanel",setup(e){const t=Tr(),i=Gc(),n=X(null),r=X(""),a=X([]),s=X(0),l=X(!1),o=X(null),u=X(null),c=X(new Map),d=X(null),h=X(0),f=X([]);function _(x){return{name:x.name,version:x.version,description:x.description??"",author:x.author?{name:x.author}:void 0,date:x.last_published_at,weeklyDownloads:x.weekly_downloads,githubStars:x.github_stars??void 0,githubSponsorsUrl:x.github_sponsors_url??void 0,documentationUrl:x.homepage??void 0,links:{npm:x.npm_url,homepage:x.homepage??void 0,repository:x.repository_url??void 0}}}function m(x){return x?x>=1e6?`${(x/1e6).toFixed(1)}M`:x>=1e3?`${(x/1e3).toFixed(1)}K`:x.toString():"0"}async function g(x=!0){x&&(h.value=0,a.value=[]),l.value=!0,o.value=null;try{const N=h.value+1,O=new URLSearchParams({q:r.value,page:String(N),limit:String(az)}),R=await fetch(`${sz}/plugins?${O}`);if(!R.ok)throw new Error(`Marketplace API error: ${R.status}`);const j=await R.json(),G=j.plugins.map(_);a.value=x?G:[...a.value,...G],s.value=j.total}catch(N){o.value=String(N)}finally{l.value=!1}}async function v(x){if(!u.value){u.value=x.name,o.value=null;try{const N=await ze.marketplace.install(x.name);c.value.set(x.name,N.mainFile),d.value={name:x.name,mainFile:N.mainFile},await ze.pluginsRefresh(),await t.fetchPlugins(),i.success(`Installed ${x.name}`)}catch(N){o.value=`Failed to install ${x.name}: ${N}`,i.error(`Failed to install ${x.name}`)}finally{u.value=null}}}async function w(x){if(!n.value){n.value=x,o.value=null;try{await ze.marketplace.uninstall(x),c.value.delete(x),await t.fetchPlugins(),i.success(`Removed ${x}`)}catch(N){o.value=`Failed to uninstall ${x}: ${N}`,i.error(`Failed to remove ${x}`)}finally{n.value=null}}}async function S(x){if(!(u.value||!x.platform)){u.value=x.name,o.value=null;try{await ze.config.savePlugin(x.name,{platform:x.platform}),c.value.set(x.name,`${x.path}/dist/index.js`),d.value={name:x.name,mainFile:`${x.path}/dist/index.js`},await t.fetchPlugins(),i.success(`Activated ${x.name}`)}catch(N){o.value=`Failed to activate ${x.name}: ${N}`,i.error(`Failed to activate ${x.name}`)}finally{u.value=null}}}function y(x){var R,j;const O=(((R=x.links)==null?void 0:R.repository)??((j=x.links)==null?void 0:j.homepage)??"").match(/github\.com\/([^/]+)/);return O?`https://github.com/${O[1]}.png?size=48`:null}function A(x){return x.name.includes("openbridge-")||Array.isArray(x.badges)&&x.badges.includes("openbridge-plugin")}function L(x){return x.author?typeof x.author=="string"?x.author:x.author.name??"":""}function k(x){const N=Math.floor((Date.now()-new Date(x).getTime())/864e5);return N===0?"today":N<30?`${N}d ago`:N<365?`${Math.floor(N/30)}mo ago`:`${Math.floor(N/365)}y ago`}function V(){h.value++,g(!1)}let T=null;function J(){T&&clearTimeout(T),T=setTimeout(()=>g(),350)}return et(async()=>{try{const x=await ze.marketplace.installed();for(const N of x.packages)c.value.set(N.name,N.mainFile)}catch{}try{const x=await ze.marketplace.local();f.value=x.plugins}catch{}g()}),(x,N)=>{const O=kt,R=pa,j=xr,G=_t,ae=Ke,q=Er,se=R4,me=I4,U=Nb,ve=Ln("nb-tooltip");return p(),$("div",OF,[M("div",IF,[N[4]||(N[4]=M("h2",{class:"mp-title type-heading-01"},"Browse plugins",-1)),ut((p(),le(O,{variant:"link",size:"xs",icon:Y(v_),href:rz,target:"_blank"},{default:I(()=>[...N[3]||(N[3]=[_e(" Marketplace ",-1)])]),_:1},8,["icon"])),[[ve,{body:"Open the full marketplace in a new tab"}]])]),M("div",RF,[ee(R,{modelValue:r.value,"onUpdate:modelValue":[N[0]||(N[0]=ce=>r.value=ce),J],placeholder:"Search plugins",size:"xs","aria-label":"Search plugins"},null,8,["modelValue"]),d.value?(p(),le(j,{key:0,status:"success",dismissible:"",title:`${d.value.name} installed`,onDismiss:N[1]||(N[1]=ce=>d.value=null)},{default:I(()=>[...N[5]||(N[5]=[_e(" Click it in your plugins list to configure it. ",-1)])]),_:1},8,["title"])):P("",!0),o.value?(p(),le(G,{key:1,variant:"error"},{default:I(()=>[_e(K(o.value),1)]),_:1})):P("",!0)]),M("div",DF,[f.value.length>0?(p(),le(me,{key:0,title:"Local plugins",class:"mp-list"},{default:I(()=>[(p(!0),$($e,null,Ue(f.value,ce=>(p(),le(se,{key:ce.name},{leading:I(()=>[M("span",VF,[ee(ae,{name:Y(Ls),size:"sm"},null,8,["name"])])]),line:I(()=>[M("span",BF,[M("span",ZF,[ee(q,{variant:"neutral",size:"sm",icon:MF},{default:I(()=>[...N[6]||(N[6]=[_e("Native",-1)])]),_:1}),ee(q,{variant:"info",size:"sm",icon:PF},{default:I(()=>[...N[7]||(N[7]=[_e("Local",-1)])]),_:1}),M("span",FF,"v"+K(ce.version),1)]),ce.description?(p(),$("span",zF,K(ce.description),1)):P("",!0),ce.author?(p(),$("span",UF,K(ce.author),1)):P("",!0)])]),trailing:I(()=>[c.value.has(ce.name)?ut((p(),le(O,{key:0,variant:"tertiary",size:"sm",disabled:"",icon:Y($n)},{default:I(()=>[...N[8]||(N[8]=[_e(" Active ",-1)])]),_:1},8,["icon"])),[[ve,{body:"Already active"}]]):ut((p(),le(O,{key:1,variant:"tertiary",size:"sm",loading:u.value===ce.name,disabled:!!u.value||!ce.platform,"aria-label":`Activate ${ce.name}`,onClick:ge=>S(ce)},{default:I(()=>[...N[9]||(N[9]=[_e(" Activate ",-1)])]),_:1},8,["loading","disabled","aria-label","onClick"])),[[ve,ce.platform?{}:{body:"No platform declared in package.json openbridge.platform"}]])]),default:I(()=>[_e(" "+K(ce.name)+" ",1)]),_:2},1024))),128))]),_:1})):P("",!0),l.value&&a.value.length===0?(p(),$("div",WF,[ee(U,{status:"active",label:"Searching npm…"})])):P("",!0),a.value.length>0?(p(),le(me,{key:2,title:"Plugins",class:"mp-list"},tr({default:I(()=>[(p(!0),$($e,null,Ue(a.value,ce=>(p(),le(se,{key:ce.name},{leading:I(()=>[M("span",KF,[y(ce)?(p(),$("img",{key:0,src:y(ce),alt:ce.name,class:"mp-avatar-img",onError:N[2]||(N[2]=ge=>ge.target.style.display="none")},null,40,qF)):P("",!0),ee(ae,{name:A(ce)?Y(Ls):Y(Cs),size:"sm"},null,8,["name"])])]),line:I(()=>[M("span",GF,[ce.description?(p(),$("span",YF,K(ce.description),1)):P("",!0),M("span",XF,[M("span",JF,"v"+K(ce.version),1),L(ce)?(p(),$("span",QF,"· "+K(L(ce)),1)):P("",!0),M("span",null,"· "+K(k(ce.date)),1),ce.weeklyDownloads?(p(),$("span",ez," · "+K(m(ce.weeklyDownloads))+" weekly downloads ",1)):P("",!0),ce.githubStars?(p(),$("span",tz,"· "+K(m(ce.githubStars))+" stars",1)):P("",!0)]),M("span",iz,[ce.githubSponsorsUrl?(p(),le(O,{key:0,variant:"link",size:"xs",href:ce.githubSponsorsUrl,target:"_blank","aria-label":`Sponsor ${ce.name}`},{default:I(()=>[...N[10]||(N[10]=[_e(" Sponsor ",-1)])]),_:1},8,["href","aria-label"])):P("",!0),ce.documentationUrl?(p(),le(O,{key:1,variant:"link",size:"xs",href:ce.documentationUrl,target:"_blank","aria-label":`Docs for ${ce.name}`},{default:I(()=>[...N[11]||(N[11]=[_e(" Docs ",-1)])]),_:1},8,["href","aria-label"])):P("",!0),ee(O,{variant:"link",size:"xs",icon:Y(v_),href:`https://marketplace.openbridge.nubisco.io/plugins/${ce.name}`,target:"_blank","aria-label":`Marketplace page for ${ce.name}`},{default:I(()=>[...N[12]||(N[12]=[_e(" Marketplace ",-1)])]),_:1},8,["icon","href","aria-label"])])])]),trailing:I(()=>[c.value.has(ce.name)?(p(),le(O,{key:0,variant:"danger",size:"sm",outlined:"",loading:n.value===ce.name,disabled:!!n.value,"aria-label":`Remove ${ce.name}`,onClick:ge=>w(ce.name)},{default:I(()=>[...N[13]||(N[13]=[_e(" Remove ",-1)])]),_:1},8,["loading","disabled","aria-label","onClick"])):(p(),le(O,{key:1,variant:"tertiary",size:"sm",loading:u.value===ce.name,disabled:!!u.value,"aria-label":`Install ${ce.name}`,onClick:ge=>v(ce)},{default:I(()=>[...N[14]||(N[14]=[_e(" Install ",-1)])]),_:1},8,["loading","disabled","aria-label","onClick"]))]),default:I(()=>[_e(" "+K(ce.name)+" ",1)]),_:2},1024))),128))]),_:2},[s.value>0?{name:"meta",fn:I(()=>[M("span",jF,K(s.value.toLocaleString())+" found",1)]),key:"0"}:void 0]),1024)):P("",!0),a.value.length>0&&a.value.length<s.value?(p(),$("div",nz,[ee(O,{variant:"tertiary",size:"sm",loading:l.value,disabled:l.value,onClick:V},{default:I(()=>[_e(K(l.value?"Loading…":`Load more (${s.value-a.value.length} remaining)`),1)]),_:1},8,["loading","disabled"])])):P("",!0)])])}}}),oz=jt(lz,[["__scopeId","data-v-f78a6515"]]),uz={key:0,class:"inspector-content nb-inspector"},cz={class:"detail-header"},dz={class:"detail-icon"},hz={class:"detail-heading"},fz={key:0,class:"detail-title-row"},pz={key:1,class:"rename-row"},_z={class:"detail-type type-body-sm"},mz={class:"detail-code type-code-sm"},vz={key:0,class:"widget-energy"},gz={class:"energy-primary"},bz={class:"type-heading-04 tabular"},yz={class:"tabular"},wz={class:"tabular"},Sz={class:"tabular"},Cz={class:"tabular"},kz={class:"tabular"},Az={class:"tabular"},$z={key:0,class:"quiet-note type-body-sm"},Mz={class:"tabular"},Lz={class:"event-list"},Ez=["title"],xz={class:"event-body"},Tz={class:"event-message type-body-compact"},Hz={key:0,class:"event-source type-body-sm"},Nz={key:0,class:"history-nav"},Pz={class:"history-nav-center"},Oz={class:"history-total"},Iz={class:"type-heading-02 tabular"},Rz={class:"history-date type-body-sm tabular"},Dz={key:2,class:"no-history type-body-sm"},Vz={key:3,class:"no-history type-body-sm"},Bz={key:4,class:"no-history type-body-sm"},Zz={class:"obs-help type-body-sm"},Fz={class:"obs-form"},zz={class:"obs-verdicts",role:"group","aria-label":"How it feels"},Uz={class:"obs-submit"},Wz={key:1,class:"obs-list"},jz={class:"obs-list-head type-overline"},Kz={class:"obs-when type-body-sm tabular"},qz={class:"type-body-compact tabular"},Gz={key:0,class:"obs-note type-body-sm"},Yz={class:"calibration-actions"},Xz={class:"tabular"},Jz={class:"homekit-fields"},Qz={key:0,class:"quiet-note type-body-sm"},eU={key:1,class:"quiet-note type-body-sm"},tU={class:"detail-header"},iU={class:"detail-icon"},nU={class:"detail-heading"},rU={key:0,class:"detail-title-row"},aU={key:1,class:"rename-row"},sU={class:"detail-type type-body-sm"},lU={key:1,class:"quiet-note type-body-sm"},oU={key:0,class:"quiet-note type-body-sm"},uU={class:"detail-uuid type-code-sm"},cU=Ne({__name:"DeviceInspector",setup(e){const t=X(new Set),i=X(!1),n=X("");function r(ke){return!t.value.has(ke)}async function a(){try{const{hidden:ke}=await ze.homekitHidden();t.value=new Set(ke)}catch{}}async function s(ke,Ce){i.value=!0,n.value="";try{const De=await ze.setHomekitVisibility(ke,Ce),qe=new Set(t.value);Ce?qe.delete(ke):qe.add(ke),t.value=qe,De.applied||(n.value="Saved. This takes effect after the next OpenBridge restart.")}catch(De){n.value=`Could not change visibility: ${De.message}`}finally{i.value=!1}}const l=X({}),o=X([]),u=X(""),c=H(()=>[{value:"",label:"Default (as published)"},...o.value.map(ke=>({value:ke.key,label:ke.label}))]);function d(ke){return o.value.some(Ce=>Ce.serviceUuid===ke)}function h(ke,Ce){var De;return((De=l.value[ke])==null?void 0:De[Ce])??""}const f=X(null);function _(ke){return ke.homekitType||ke.widgetType}async function m(ke){f.value=null;try{const{accessory:Ce}=await ze.deviceAccessory(ke);f.value=Ce}catch{}}async function g(){try{const{overrides:ke,available:Ce}=await ze.homekitServiceTypes();l.value=ke,o.value=Ce}catch{}}async function v(ke,Ce,De){i.value=!0,u.value="";try{await ze.setHomekitServiceType(ke,Ce,De||null);const qe={...l.value},tt={...qe[ke]??{}};De?tt[Ce]=De:delete tt[Ce],Object.keys(tt).length>0?qe[ke]=tt:delete qe[ke],l.value=qe,u.value="Saved. This takes effect after the next OpenBridge restart."}catch(qe){u.value=`Could not change type: ${qe.message}`}finally{i.value=!1}}et(()=>{a(),g()});const w=dl(),S=C2(),y=X(""),A=X(""),L=X("success"),k=H(()=>{const ke=w.selectedDevice;return!ke||ke.kind!=="native"?null:ke.dev.health??null}),V=H(()=>{var Ce;const ke=(Ce=k.value)==null?void 0:Ce.lastSeen;return ke?`Not responding since ${new Date(ke).toLocaleString()}`:"Not responding"}),T=[{id:"cold",label:"Too cold"},{id:"ok",label:"About right"},{id:"warm",label:"Too warm"}],J=X(null),x=X("ok"),N=X(""),O=X(!1),R=X(""),j=X([]),G=X(0);async function ae(){const ke=w.selectedDevice;if(!ke||ke.kind!=="native"||!ke.dev.observations){j.value=[],G.value=0;return}try{const Ce=await ze.deviceObservations(ke.dev.id,20);j.value=Ce.observations,G.value=Ce.total}catch{}}async function q(){const ke=w.selectedDevice;if(!(!ke||ke.kind!=="native"||J.value===null)){O.value=!0,R.value="";try{await ze.reportObservation(ke.dev.id,{roomTemperature:J.value,comfort:x.value,...N.value.trim()?{note:N.value.trim()}:{}}),N.value="",await ae()}catch(Ce){R.value=Ce instanceof Error?Ce.message:String(Ce)}finally{O.value=!1}}}Pe(()=>w.selectedDevice,()=>{R.value="",N.value="",ae()},{immediate:!0});const se=H(()=>{const ke=w.selectedDevice;return!ke||ke.kind!=="native"?[]:ke.dev.actions??[]});async function me(ke){const Ce=w.selectedDevice;if(!(!Ce||Ce.kind!=="native")&&!(ke.confirm&&!await S({title:ke.label,subjectLabel:"Device",subject:Ce.dev.name,message:ke.confirm,confirmLabel:ke.label}))){y.value=ke.id,A.value="";try{await ze.controlDevice(Ce.dev.id,ke.id,!0),L.value="success",A.value=`${ke.label} sent.`}catch(De){L.value="error",A.value=`${ke.label} failed: ${De.message}`}finally{y.value=""}}}const U=H(()=>w.selectedDevice),ve=H(()=>U.value?U.value.kind==="native"?U.value.dev.id:U.value.acc.uuid:null),ce={1:{label:"Other",icon:"cube"},2:{label:"Bridge",icon:"intersect"},3:{label:"Fan",icon:"fan"},4:{label:"Garage Door",icon:"garage"},5:{label:"Light",icon:"lightbulb"},6:{label:"Lock",icon:"lock"},7:{label:"Outlet",icon:"plugs"},8:{label:"Switch",icon:"toggle-right"},9:{label:"Thermostat",icon:"thermometer"},10:{label:"Sensor",icon:"pulse"},11:{label:"Security",icon:"shield"},12:{label:"Door",icon:"door"},13:{label:"Window",icon:"app-window"},14:{label:"Window Covering",icon:"rows"},15:{label:"Programm. Switch",icon:"sliders"},16:{label:"Range Extender",icon:"broadcast"},17:{label:"Camera",icon:"camera"},18:{label:"Video Doorbell",icon:"bell"},19:{label:"Air Purifier",icon:"wind"},20:{label:"Heater/Cooler",icon:"thermometer-hot"},21:{label:"Air Conditioner",icon:"snowflake"},22:{label:"Humidifier",icon:"drop"},23:{label:"Dehumidifier",icon:"drop"},26:{label:"Speaker",icon:"speaker-high"},28:{label:"Sprinkler",icon:"drop"},29:{label:"Faucet",icon:"drop"},30:{label:"Shower",icon:"drop"},32:{label:"TV",icon:"television"},34:{label:"Router",icon:"broadcast"},36:{label:"Target Control",icon:"game-controller"},38:{label:"Smart Speaker",icon:"speaker-hifi"}};function ge(ke){return ce[ke]??{label:`Category ${ke}`,icon:"cube"}}const ue=new Set(["AccessoryInformation","0000003E-0000-1000-8000-0026BB765291","ProtocolInformation","000000A2-0000-1000-8000-0026BB765291"]);function pe(ke){return ke.services.filter(Ce=>!ue.has(Ce.name)&&!ue.has(Ce.uuid))}function W(ke){return ke.services.find(Ce=>ue.has(Ce.name)||ue.has(Ce.uuid))}function he(ke){const Ce=W(ke);if(!Ce)return null;const De=qe=>{var tt;return(tt=Ce.characteristics.find(Ai=>Ai.name===qe||Ai.name.includes(qe)))==null?void 0:tt.value};return{manufacturer:De("Manufacturer")??De("Manuf"),model:De("Model"),serial:De("SerialNumber")??De("Serial"),firmware:De("FirmwareRevision")??De("Firmware")}}function te(ke){const Ce=he(ke);return Ce?Object.entries(Ce).filter(([,De])=>De!=null&&De!=="").map(([De,qe])=>({term:De.charAt(0).toUpperCase()+De.slice(1),value:String(qe)})):[]}function be(ke){return ke.value===null||ke.value===void 0?"—":ke.format==="bool"?ke.value?"On":"Off":typeof ke.value=="number"?String(Math.round(ke.value*100)/100):String(ke.value)}function E(ke){return ke.perms.includes("pw")}const F=X(!1),ie=X("");function fe(ke){ie.value=ke,F.value=!0}async function ne(ke){var Ce,De;if(ie.value.trim())try{const qe=ie.value.trim();await ze.renameDevice(ke,qe),F.value=!1,((Ce=U.value)==null?void 0:Ce.kind)==="native"?U.value.dev.name=qe:((De=U.value)==null?void 0:De.kind)==="hap"&&(U.value.acc.displayName=qe);const{useDaemonStore:tt}=await N8(async()=>{const{useDaemonStore:ct}=await Promise.resolve().then(()=>i_);return{useDaemonStore:ct}},void 0);await tt().fetchAccessories()}catch(qe){console.error("Rename failed:",qe)}}async function Z(ke,Ce,De,qe){try{await ze.setCharacteristic(ke,Ce,De,qe);const{useDaemonStore:tt}=await N8(async()=>{const{useDaemonStore:ct}=await Promise.resolve().then(()=>i_);return{useDaemonStore:ct}},void 0);await tt().fetchAccessories()}catch(tt){console.error("Failed to set characteristic:",tt)}}const re=X([]);function b(ke){const Ce=new Date(ke);return Number.isNaN(Ce.getTime())?ke:new Date().toDateString()===Ce.toDateString()?Ce.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}):Ce.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}async function C(){const ke=U.value;if((ke==null?void 0:ke.kind)!=="native"){re.value=[];return}try{const Ce=await ze.deviceEvents(ke.dev.id,100);re.value=Ce.events}catch{re.value=[]}}const B={switch:"plugs",light:"lightbulb",thermostat:"thermometer",dehumidifier:"drop",energy_meter:"lightning",gate:"garage",sensor:"pulse",camera:"camera"},de={camera:"Camera",switch:"Switch",light:"Light",thermostat:"Thermostat",dehumidifier:"Dehumidifier",energy_meter:"Energy Meter",gate:"Gate",sensor:"Sensor"};function z(ke){return B[ke]??"cube"}function Q(ke){return de[ke]??ke}function D(ke,Ce=1){if(ke==null)return"—";const De=Number(ke);return isFinite(De)?De.toFixed(Ce):String(ke)}function oe(ke){return Object.entries(ke.telemetry).filter(([Ce])=>!Ce.startsWith("_"))}const ye=X("day"),xe=[{id:"day",label:"Day"},{id:"month",label:"Month"},{id:"year",label:"Year"}],we=X(new Date().toISOString().slice(0,10)),Re=X(null),Ge=X(!1);async function Ct(ke){if(!Ge.value){Ge.value=!0;try{Re.value=await ze.deviceHistory(ke,ye.value,we.value)}catch{}finally{Ge.value=!1}}}function qt(ke){var De;const Ce=new Date(we.value+(we.value.length<=7?"-01":""));ye.value==="day"?(Ce.setDate(Ce.getDate()+ke),we.value=Ce.toISOString().slice(0,10)):ye.value==="month"?(Ce.setMonth(Ce.getMonth()+ke),we.value=Ce.toISOString().slice(0,7)):(Ce.setFullYear(Ce.getFullYear()+ke),we.value=String(Ce.getFullYear())),((De=U.value)==null?void 0:De.kind)==="native"&&Ct(U.value.dev.id)}Pe(ye,()=>{var Ce;const ke=new Date;ye.value==="day"?we.value=ke.toISOString().slice(0,10):ye.value==="month"?we.value=ke.toISOString().slice(0,7):we.value=String(ke.getFullYear()),((Ce=U.value)==null?void 0:Ce.kind)==="native"&&U.value.dev.widgetType==="energy_meter"&&Ct(U.value.dev.id)}),Pe(ve,(ke,Ce)=>{if(ke===Ce&&Re.value)return;const De=U.value;(De==null?void 0:De.kind)==="native"?m(De.dev.id):f.value=null,C(),(De==null?void 0:De.kind)==="native"&&De.dev.widgetType==="energy_meter"&&(we.value=new Date().toISOString().slice(0,10),ye.value="day",Ct(De.dev.id))},{immediate:!0});const Dt=X([]),rt=X([]),Se=X(!1),Ie=X(!1),Ze=X(!1),at=H(()=>JSON.stringify(Dt.value)!==JSON.stringify(rt.value)),ki=H(()=>!U.value||U.value.kind!=="native"?null:U.value.dev);async function Pr(ke){const{plugins:Ce}=await ze.plugins(),De=Ce.find(tt=>tt.id===ke.pluginId);if(!De)return null;if(De.source!=="homebridge"){const{config:tt}=await ze.config.getPlugin(ke.pluginId);return tt?{pluginConfig:tt,isNative:!0,pluginName:ke.pluginId,platformName:void 0}:null}else{const tt=De.platformName??ke.pluginId,{config:Ai}=await ze.config.getPlatform(tt);return Ai?{pluginConfig:Ai,isNative:!1,pluginName:ke.pluginId,platformName:tt}:null}}async function ro(){const ke=ki.value;if(ke!=null&&ke.interpolation){Se.value=!0,Ze.value=!1;try{const Ce=await Pr(ke);if(!Ce)return;const qe=(Ce.pluginConfig.devices??[]).find(Ni=>Ni.id===ke.id);if(!qe)return;const tt=ke.interpolation,ct=(qe[tt.configField]??[]).map(Ni=>({input:Ni[tt.configShape.inputKey]??0,output:Ni[tt.configShape.outputKey]??0}));Dt.value=ct,rt.value=JSON.parse(JSON.stringify(ct))}catch(Ce){console.error("Failed to load interpolation config:",Ce)}finally{Se.value=!1}}}async function ao(){const ke=ki.value;if(ke!=null&&ke.interpolation){Ie.value=!0,Ze.value=!1;try{const Ce=await Pr(ke);if(!Ce)return;const De=ke.interpolation,qe=Ce.pluginConfig.devices??[],tt=qe.findIndex(ct=>ct.id===ke.id);if(tt<0)return;const Ai=Dt.value.map(ct=>({[De.configShape.inputKey]:ct.input,[De.configShape.outputKey]:ct.output}));qe[tt]={...qe[tt],[De.configField]:Ai},Ce.pluginConfig.devices=qe,Ce.isNative?await ze.config.savePlugin(Ce.pluginName,Ce.pluginConfig):await ze.config.savePlatform(Ce.pluginConfig),rt.value=JSON.parse(JSON.stringify(Dt.value)),Ze.value=!0}catch(Ce){console.error("Failed to save interpolation config:",Ce)}finally{Ie.value=!1}}}function En(){Dt.value=JSON.parse(JSON.stringify(rt.value)),Ze.value=!1}Pe(ve,(ke,Ce)=>{var De;ke===Ce&&rt.value.length>0||(Ze.value=!1,((De=U.value)==null?void 0:De.kind)==="native"&&U.value.dev.interpolation?ro():(Dt.value=[],rt.value=[]))},{immediate:!0});const Ka=H(()=>{var Ce;return(Ce=Re.value)!=null&&Ce.buckets?[{name:"kWh",data:Re.value.buckets.map(De=>{let qe=De.label;return ye.value==="day"?qe=parseInt(De.label)%6===0?De.label:"":ye.value==="month"&&(qe=parseInt(De.label)%5===1?De.label:""),{x:qe,y:Math.max(0,Math.round((De.kwh??0)*100)/100)}})}]:[]});return(ke,Ce)=>{const De=Ke,qe=kt,tt=pa,Ai=xr,ct=O4,Ni=n2,Wi=w2,O0=Yc,I0=HL,ga=y2,u1=_t,c1=Er,d1=SN,so=Zs,ba=L0,Me=Wc,Fe=Ln("nb-tooltip");return U.value?(p(),$("div",uz,[U.value.kind==="native"?(p(),$($e,{key:0},[M("div",cz,[M("div",dz,[ee(De,{name:z(_(U.value.dev)),size:"lg"},null,8,["name"])]),M("div",hz,[F.value?(p(),$("div",pz,[ee(tt,{modelValue:ie.value,"onUpdate:modelValue":Ce[2]||(Ce[2]=Le=>ie.value=Le),size:"sm",onKeyup:[Ce[3]||(Ce[3]=Bi(Le=>ne(U.value.dev.id),["enter"])),Ce[4]||(Ce[4]=Bi(Le=>F.value=!1,["escape"]))]},null,8,["modelValue"]),ut(ee(qe,{variant:"primary",size:"sm",icon:Y($n),"aria-label":"Save name",onClick:Ce[5]||(Ce[5]=Le=>ne(U.value.dev.id))},null,8,["icon"]),[[Fe,{body:"Save name"}]]),ut(ee(qe,{variant:"ghost",size:"sm",icon:Y(ir),"aria-label":"Cancel rename",onClick:Ce[6]||(Ce[6]=Le=>F.value=!1)},null,8,["icon"]),[[Fe,{body:"Cancel rename"}]])])):(p(),$("div",fz,[M("h2",{class:"detail-name type-heading-01",title:"Click to rename",onClick:Ce[0]||(Ce[0]=Le=>fe(U.value.dev.name))},K(U.value.dev.name),1),ut(ee(qe,{variant:"ghost",size:"sm",icon:Y(x8),"aria-label":`Rename ${U.value.dev.name}`,onClick:Ce[1]||(Ce[1]=Le=>fe(U.value.dev.name))},null,8,["icon","aria-label"]),[[Fe,{body:"Rename"}]])])),M("div",_z,K(Q(_(U.value.dev))),1)])]),ee(Wi,{title:"Device info",fluid:""},tr({default:I(()=>[k.value&&k.value.status==="stale"?(p(),le(Ai,{key:0,status:"warning",title:V.value,class:"section-banner"},{default:I(()=>[_e(K(k.value.reason),1)]),_:1},8,["title"])):P("",!0),A.value?(p(),le(Ai,{key:1,status:L.value,title:A.value,class:"section-banner"},null,8,["status","title"])):P("",!0),ee(Ni,{compact:""},{default:I(()=>[ee(ct,{term:"Plugin"},{default:I(()=>[_e(K(U.value.dev.pluginId),1)]),_:1}),U.value.dev.manufacturer?(p(),le(ct,{key:0,term:"Manufacturer"},{default:I(()=>[_e(K(U.value.dev.manufacturer),1)]),_:1})):P("",!0),U.value.dev.model?(p(),le(ct,{key:1,term:"Model"},{default:I(()=>[_e(K(U.value.dev.model),1)]),_:1})):P("",!0),ee(ct,{term:"Status"},{default:I(()=>[_e(K(U.value.dev.pluginStatus),1)]),_:1}),ee(ct,{term:"ID"},{default:I(()=>[M("code",mz,K(U.value.dev.id),1)]),_:1})]),_:1})]),_:2},[se.value.length>0?{name:"toolbar",fn:I(()=>[(p(!0),$($e,null,Ue(se.value,Le=>(p(),le(qe,{key:Le.id,size:"xs",variant:Le.danger?"danger":"ghost",outlined:!!Le.danger,disabled:y.value!=="",loading:y.value===Le.id,onClick:st=>me(Le)},{default:I(()=>[_e(K(Le.label),1)]),_:2},1032,["variant","outlined","disabled","loading","onClick"]))),128))]),key:"0"}:void 0]),1024),ee(Wi,{title:"State",fluid:""},{default:I(()=>[U.value.dev.widgetType==="energy_meter"?(p(),$("div",vz,[M("div",gz,[M("span",bz,K(D(U.value.dev.telemetry.power,1)),1),Ce[22]||(Ce[22]=M("span",{class:"reading-unit type-body-md"},"W",-1))]),ee(Ni,{compact:""},{default:I(()=>[U.value.dev.telemetry.voltage!==void 0?(p(),le(ct,{key:0,term:"Voltage"},{default:I(()=>[M("span",yz,K(D(U.value.dev.telemetry.voltage,1))+" V",1)]),_:1})):P("",!0),U.value.dev.telemetry.current!==void 0?(p(),le(ct,{key:1,term:"Current"},{default:I(()=>[M("span",wz,K(D(U.value.dev.telemetry.current,3))+" A",1)]),_:1})):P("",!0)]),_:1})])):U.value.dev.widgetType==="thermostat"?(p(),le(Ni,{key:1,compact:""},{default:I(()=>[ee(ct,{term:"Current"},{default:I(()=>[M("span",Sz,K(D(U.value.dev.telemetry.currentTemperature,1))+"°C",1)]),_:1}),ee(ct,{term:"Target"},{default:I(()=>[M("span",Cz,K(D(U.value.dev.telemetry.targetTemperature,1))+"°C",1)]),_:1}),ee(ct,{term:"Active"},{default:I(()=>[M("span",{class:Te(U.value.dev.telemetry.active?"state-on":"state-off")},K(U.value.dev.telemetry.active?"On":"Off"),3)]),_:1})]),_:1})):U.value.dev.widgetType==="dehumidifier"?(p(),le(Ni,{key:2,compact:""},{default:I(()=>[ee(ct,{term:"Humidity"},{default:I(()=>[M("span",kz,K(D(U.value.dev.telemetry.currentHumidity,0))+"%",1)]),_:1}),ee(ct,{term:"Target"},{default:I(()=>[M("span",Az,K(D(U.value.dev.telemetry.targetHumidity,0))+"%",1)]),_:1}),ee(ct,{term:"Active"},{default:I(()=>[M("span",{class:Te(U.value.dev.telemetry.active?"state-on":"state-off")},K(U.value.dev.telemetry.active?"On":"Off"),3)]),_:1})]),_:1})):(p(),$($e,{key:3},[oe(U.value.dev).length===0?(p(),$("p",$z," No telemetry yet ")):(p(),le(Ni,{key:1,compact:""},{default:I(()=>[(p(!0),$($e,null,Ue(oe(U.value.dev),([Le,st])=>(p(),le(ct,{key:Le,term:Le},{default:I(()=>[M("span",Mz,K(String(st)),1)]),_:2},1032,["term"]))),128))]),_:1}))],64))]),_:1}),re.value.length>0?(p(),le(Wi,{key:0,title:"Recent activity",fluid:""},{default:I(()=>[M("ul",Lz,[(p(!0),$($e,null,Ue(re.value,(Le,st)=>(p(),$("li",{key:`${Le.at}-${st}`,class:"event"},[M("span",{class:"event-time type-body-sm tabular",title:Le.at},K(b(Le.at)),9,Ez),M("span",xz,[M("span",Tz,K(Le.message),1),Le.source?(p(),$("span",Hz,K(Le.source),1)):P("",!0)])]))),128))])]),_:1})):P("",!0),U.value.dev.widgetType==="energy_meter"?(p(),le(Wi,{key:1,title:"Energy history",fluid:""},{default:I(()=>[ee(O0,{"model-value":ye.value,items:xe,variant:"contained",size:"sm","full-width":"","aria-label":"Energy history period",class:"history-tabs","onUpdate:modelValue":Ce[7]||(Ce[7]=Le=>ye.value=Le)},null,8,["model-value"]),Re.value?(p(),$("div",Nz,[ut(ee(qe,{variant:"ghost",size:"sm",icon:Y(Qd),"aria-label":"Previous period",onClick:Ce[8]||(Ce[8]=Le=>qt(-1))},null,8,["icon"]),[[Fe,{body:"Previous period"}]]),M("div",Pz,[M("span",Oz,[M("span",Iz,K(Re.value.totalKwh.toFixed(2)),1),Ce[23]||(Ce[23]=M("span",{class:"reading-unit type-body-sm"},"kWh",-1))]),M("span",Rz,K(Re.value.date),1)]),ut(ee(qe,{variant:"ghost",size:"sm",icon:Y(c0),"aria-label":"Next period",onClick:Ce[9]||(Ce[9]=Le=>qt(1))},null,8,["icon"]),[[Fe,{body:"Next period"}]])])):P("",!0),Re.value&&Re.value.totalKwh>0?(p(),le(I0,{key:1,series:Ka.value,height:120,"show-legend":!1,"show-tooltip":!0},null,8,["series"])):P("",!0),Re.value&&Re.value.totalKwh===0?(p(),$("p",Dz," No consumption recorded for this period. Data accumulates every 5 minutes. ")):P("",!0),!Re.value&&!Ge.value?(p(),$("p",Vz,"No data available for this period.")):P("",!0),Ge.value?(p(),$("p",Bz,"Loading history…")):P("",!0)]),_:1})):P("",!0),U.value.dev.observations?(p(),le(Wi,{key:2,title:"Report",fluid:""},{default:I(()=>[M("p",Zz,K(U.value.dev.observations.help??"Tell the plugin what this device cannot measure itself."),1),M("div",Fz,[ee(ga,{modelValue:J.value,"onUpdate:modelValue":Ce[10]||(Ce[10]=Le=>J.value=Le),size:"sm",min:U.value.dev.observations.min,max:U.value.dev.observations.max,step:.5,label:`${U.value.dev.observations.label} (${U.value.dev.observations.unit})`},null,8,["modelValue","min","max","label"]),M("div",zz,[(p(),$($e,null,Ue(T,Le=>ee(qe,{key:Le.id,size:"sm",variant:x.value===Le.id?"secondary":"ghost","aria-pressed":x.value===Le.id,onClick:st=>x.value=Le.id},{default:I(()=>[_e(K(Le.label),1)]),_:2},1032,["variant","aria-pressed","onClick"])),64))]),ee(tt,{modelValue:N.value,"onUpdate:modelValue":Ce[11]||(Ce[11]=Le=>N.value=Le),size:"sm",placeholder:"Anything worth noting (sunny, window open)"},null,8,["modelValue"]),M("div",Uz,[ee(qe,{size:"sm",variant:"primary",disabled:J.value===null||O.value,onClick:q},{default:I(()=>[...Ce[24]||(Ce[24]=[_e(" Save report ",-1)])]),_:1},8,["disabled"])])]),R.value?(p(),le(u1,{key:0,variant:"error"},{default:I(()=>[_e(K(R.value),1)]),_:1})):P("",!0),j.value.length>0?(p(),$("div",Wz,[M("div",jz,K(G.value)+" report"+K(G.value===1?"":"s")+" so far ",1),(p(!0),$($e,null,Ue(j.value,(Le,st)=>(p(),$("div",{key:st,class:"obs-row"},[M("span",Kz,K(new Date(Le.at).toLocaleString()),1),M("span",qz,K(Le.roomTemperature)+"°",1),ee(c1,{variant:Le.comfort==="ok"?"success":Le.comfort==="cold"?"info":"warning",size:"sm"},{default:I(()=>[_e(K(Le.comfort),1)]),_:2},1032,["variant"]),Le.note?(p(),$("span",Gz,K(Le.note),1)):P("",!0)]))),128))])):P("",!0)]),_:1})):P("",!0),U.value.dev.interpolation&&Dt.value.length>0?(p(),le(Wi,{key:3,title:"Calibration",fluid:""},{default:I(()=>[ee(d1,{modelValue:Dt.value,"onUpdate:modelValue":Ce[12]||(Ce[12]=Le=>Dt.value=Le),height:220,"input-label":U.value.dev.interpolation.inputLabel,"output-label":U.value.dev.interpolation.outputLabel,"input-min":U.value.dev.interpolation.inputMin,"input-max":U.value.dev.interpolation.inputMax,"output-min":U.value.dev.interpolation.outputMin,"output-max":U.value.dev.interpolation.outputMax,"input-step":.5,"output-step":1,"show-grid":!0,"show-tooltip":!0},null,8,["modelValue","input-label","output-label","input-min","input-max","output-min","output-max"]),Ce[27]||(Ce[27]=M("p",{class:"calibration-hint type-helper-text"}," Drag points to adjust. Double-click to add. Right-click to remove. ",-1)),M("div",Yz,[ee(qe,{variant:"secondary",size:"sm",disabled:!at.value,onClick:En},{default:I(()=>[...Ce[25]||(Ce[25]=[_e(" Reset ",-1)])]),_:1},8,["disabled"]),ee(qe,{variant:"primary",size:"sm",disabled:!at.value||Ie.value,onClick:ao},{default:I(()=>[_e(K(Ie.value?"Saving…":"Save"),1)]),_:1},8,["disabled"])]),Ze.value?(p(),le(Ai,{key:0,status:"success",title:"Configuration saved",class:"section-banner-after"},{default:I(()=>[...Ce[26]||(Ce[26]=[_e(" Restart the plugin to apply the new mapping. ",-1)])]),_:1})):P("",!0)]),_:1})):U.value.dev.interpolation&&Se.value?(p(),le(Wi,{key:4,title:"Calibration",fluid:""},{default:I(()=>[...Ce[28]||(Ce[28]=[M("p",{class:"no-history type-body-sm"},"Loading calibration data…",-1)])]),_:1})):P("",!0),oe(U.value.dev).length>0?(p(),le(Wi,{key:5,title:"All telemetry",fluid:""},{default:I(()=>[ee(Ni,{compact:""},{default:I(()=>[(p(!0),$($e,null,Ue(oe(U.value.dev),([Le,st])=>(p(),le(ct,{key:Le,term:Le},{default:I(()=>[M("span",Xz,K(String(st)),1)]),_:2},1032,["term"]))),128))]),_:1})]),_:1})):P("",!0),f.value?(p(),le(Wi,{key:6,title:"HomeKit",fluid:""},{default:I(()=>[M("div",Jz,[(p(!0),$($e,null,Ue(pe(f.value),Le=>ut((p(),le(ba,{key:Le.uuid,label:"Show in HomeKit as",orientation:"stack",hint:"A plugin cannot know what a generic relay drives. Set it here and OpenBridge re-applies it on every restart, so the Home app stops reverting to a switch."},{default:I(()=>[ee(so,{"model-value":h(f.value.uuid,Le.uuid),options:c.value,disabled:i.value,size:"sm","onUpdate:modelValue":st=>v(f.value.uuid,Le.uuid,String(st))},null,8,["model-value","options","disabled","onUpdate:modelValue"])]),_:2},1536)),[[Tf,d(Le.uuid)]])),128)),u.value?(p(),$("p",Qz,K(u.value),1)):P("",!0),M("div",null,[ee(ba,{label:"Expose to HomeKit",control:"fit"},{default:I(()=>[ee(Me,{name:`homekit-visible-${f.value.uuid}`,"model-value":r(f.value.uuid),disabled:i.value,"onUpdate:modelValue":Ce[13]||(Ce[13]=Le=>s(f.value.uuid,!!Le))},null,8,["name","model-value","disabled"])]),_:1}),Ce[29]||(Ce[29]=M("p",{class:"field-hint type-helper-text"}," Hide devices the Home app cannot represent usefully. OpenBridge keeps its telemetry and history either way. ",-1))]),n.value?(p(),$("p",eU,K(n.value),1)):P("",!0)])]),_:1})):P("",!0)],64)):U.value.kind==="hap"?(p(),$($e,{key:1},[M("div",tU,[M("div",iU,[ee(De,{name:ge(U.value.acc.category).icon,size:"lg"},null,8,["name"])]),M("div",nU,[F.value?(p(),$("div",aU,[ee(tt,{modelValue:ie.value,"onUpdate:modelValue":Ce[16]||(Ce[16]=Le=>ie.value=Le),size:"sm",onKeyup:[Ce[17]||(Ce[17]=Bi(Le=>ne(U.value.acc.uuid),["enter"])),Ce[18]||(Ce[18]=Bi(Le=>F.value=!1,["escape"]))]},null,8,["modelValue"]),ut(ee(qe,{variant:"primary",size:"sm",icon:Y($n),"aria-label":"Save name",onClick:Ce[19]||(Ce[19]=Le=>ne(U.value.acc.uuid))},null,8,["icon"]),[[Fe,{body:"Save name"}]]),ut(ee(qe,{variant:"ghost",size:"sm",icon:Y(ir),"aria-label":"Cancel rename",onClick:Ce[20]||(Ce[20]=Le=>F.value=!1)},null,8,["icon"]),[[Fe,{body:"Cancel rename"}]])])):(p(),$("div",rU,[M("h2",{class:"detail-name type-heading-01",title:"Click to rename",onClick:Ce[14]||(Ce[14]=Le=>fe(U.value.acc.displayName))},K(U.value.acc.displayName),1),ut(ee(qe,{variant:"ghost",size:"sm",icon:Y(x8),"aria-label":`Rename ${U.value.acc.displayName}`,onClick:Ce[15]||(Ce[15]=Le=>fe(U.value.acc.displayName))},null,8,["icon","aria-label"]),[[Fe,{body:"Rename"}]])])),M("div",sU,K(ge(U.value.acc.category).label),1)])]),he(U.value.acc)?(p(),le(Wi,{key:0,title:"Device info",fluid:""},{default:I(()=>[ee(Ni,{compact:"",items:te(U.value.acc)},null,8,["items"])]),_:1})):P("",!0),(p(!0),$($e,null,Ue(pe(U.value.acc),Le=>(p(),le(Wi,{key:Le.uuid,title:Le.displayName||Le.name,fluid:""},{default:I(()=>[d(Le.uuid)?(p(),le(ba,{key:0,label:"Show in HomeKit as",orientation:"stack",hint:"A plugin cannot know what a generic relay drives. Set it here and OpenBridge re-applies it on every restart, so the Home app stops reverting to a switch.",class:"service-type"},{default:I(()=>[ee(so,{"model-value":h(U.value.acc.uuid,Le.uuid),options:c.value,disabled:i.value,size:"sm","onUpdate:modelValue":st=>v(U.value.acc.uuid,Le.uuid,String(st))},null,8,["model-value","options","disabled","onUpdate:modelValue"])]),_:2},1024)):P("",!0),u.value?(p(),$("p",lU,K(u.value),1)):P("",!0),ee(Ni,{compact:""},{default:I(()=>[(p(!0),$($e,null,Ue(Le.characteristics,st=>(p(),le(ct,{key:st.uuid,term:st.name},{default:I(()=>[E(st)&&st.format==="bool"?(p(),le(Me,{key:0,name:`hap-char-${Le.uuid}-${st.uuid}`,"model-value":!!st.value,"onUpdate:modelValue":$i=>Z(U.value.acc.uuid,Le.uuid,st.uuid,$i?1:0)},null,8,["name","model-value","onUpdate:modelValue"])):(p(),$("span",{key:1,class:Te(["tabular",{"state-on":st.format==="bool"&&st.value}])},K(be(st)),3))]),_:2},1032,["term"]))),128))]),_:2},1024)]),_:2},1032,["title"]))),128)),ee(Wi,{title:"HomeKit",fluid:""},{default:I(()=>[ee(ba,{label:"Expose to HomeKit",control:"fit"},{default:I(()=>[ee(Me,{name:`homekit-visible-${U.value.acc.uuid}`,"model-value":r(U.value.acc.uuid),disabled:i.value,"onUpdate:modelValue":Ce[21]||(Ce[21]=Le=>s(U.value.acc.uuid,!!Le))},null,8,["name","model-value","disabled"])]),_:1}),Ce[30]||(Ce[30]=M("p",{class:"field-hint type-helper-text"}," Hide devices the Home app cannot represent usefully. OpenBridge keeps its telemetry and history either way. ",-1)),n.value?(p(),$("p",oU,K(n.value),1)):P("",!0)]),_:1}),M("div",uU,"UUID: "+K(U.value.acc.uuid),1)],64)):P("",!0)])):P("",!0)}}}),dU=jt(cU,[["__scopeId","data-v-56b75ee5"]]),hU={class:"logs-filter"},fU={key:0,class:"log-empty type-body-compact"},pU={class:"log-time tabular"},_U={class:"log-plugin"},mU={class:"log-msg"},b_="openbridge.logs.panelSize",vU=Ne({__name:"LiveLogsPanel",setup(e){const t=Tr(),i=["collapsed","default","full"],n=X("collapsed");et(()=>{const u=localStorage.getItem(b_);u&&i.includes(u)&&(n.value=u)}),Pe(n,u=>localStorage.setItem(b_,u));const r=X([]),a=X(null),s=H(()=>[{value:"system",label:"system"},...t.plugins.map(u=>({value:u.manifest.name,label:u.manifest.name}))]),l=H(()=>r.value.length===0?t.logs:t.logs.filter(u=>r.value.includes(u.plugin)));function o(){t.logs.length=0}return Pe(()=>l.value.length,async()=>{const u=a.value;!u||!(u.scrollHeight-u.scrollTop-u.clientHeight<40)||(await wt(),u.scrollTop=u.scrollHeight)}),(u,c)=>{const d=Zs,h=kt,f=w2,_=Ln("nb-tooltip");return p(),le(f,{size:n.value,"onUpdate:size":c[1]||(c[1]=m=>n.value=m),title:"Live logs"},{toolbar:I(()=>[M("div",hU,[ee(d,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=m=>r.value=m),multiple:"",options:s.value,placeholder:"All plugins",size:"xs"},null,8,["modelValue","options"])]),ut(ee(h,{size:"xs",variant:"ghost",icon:Y(S2),"aria-label":"Clear logs",onClick:o},null,8,["icon"]),[[_,{body:"Clear logs"}]])]),default:I(()=>[M("div",{ref_key:"logsEl",ref:a,class:"log-list"},[l.value.length===0?(p(),$("div",fU,"No log entries yet.")):P("",!0),(p(!0),$($e,null,Ue(l.value,(m,g)=>(p(),$("div",{key:g,class:"log-line"},[M("span",pU,K(new Date(m.timestamp).toLocaleTimeString()),1),M("span",{class:Te(["log-level",`log-level--${m.level}`])},K(m.level.toUpperCase()),3),M("span",_U,K(m.plugin),1),M("span",mU,K(m.message),1)]))),128))],512)]),_:1},8,["size"])}}}),gU=jt(vU,[["__scopeId","data-v-1f69907b"]]),wl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},bU=wl("bell-ringing","0 0 256 256",'<path d="M222.13,67.55a3.94,3.94,0,0,1-1.84.45,4,4,0,0,1-3.55-2.16,99.41,99.41,0,0,0-34.87-38.46,4,4,0,1,1,4.26-6.76,107.34,107.34,0,0,1,37.71,41.54A4,4,0,0,1,222.13,67.55ZM39.26,65.84A99.41,99.41,0,0,1,74.13,27.38a4,4,0,0,0-4.26-6.76A107.34,107.34,0,0,0,32.16,62.16a4,4,0,0,0,1.71,5.39,3.94,3.94,0,0,0,1.84.45A4,4,0,0,0,39.26,65.84ZM218.36,178A12,12,0,0,1,208,196H163.77a36,36,0,0,1-71.54,0H48A12,12,0,0,1,37.64,178C47.17,161.56,52,139.37,52,112a76,76,0,0,1,152,0C204,139.36,208.83,161.55,218.36,178ZM155.71,196H100.29a28,28,0,0,0,55.42,0Zm55.73-14C201.19,164.34,196,140.79,196,112a68,68,0,0,0-136,0c0,28.8-5.19,52.34-15.44,70a4,4,0,0,0,0,4A3.89,3.89,0,0,0,48,188H208a3.89,3.89,0,0,0,3.43-2A4,4,0,0,0,211.44,182Z"/>'),yU=wl("bell-ringing","0 0 256 256",'<path d="M223.05,69.33A6,6,0,0,1,215,66.76,96,96,0,0,0,180.8,29.08a6,6,0,0,1,6.4-10.15,109.26,109.26,0,0,1,38.41,42.31A6,6,0,0,1,223.05,69.33ZM41,66.76A96,96,0,0,1,75.2,29.08a6,6,0,0,0-6.4-10.15A109.26,109.26,0,0,0,30.39,61.24,6,6,0,1,0,41,66.76Zm179,110.18A14,14,0,0,1,208,198h-42.5a38,38,0,0,1-75,0H48a14,14,0,0,1-12.06-21.06C45.13,161.09,50,138.63,50,112a78,78,0,0,1,156,0C206,139,210.74,160.86,220.08,176.94ZM153.29,198H102.71a26,26,0,0,0,50.58,0Zm56.42-15C199.29,165,194,141.15,194,112a66,66,0,0,0-132,0c0,29.16-5.29,53-15.71,71a2,2,0,0,0,0,2,1.9,1.9,0,0,0,1.7,1H208a1.9,1.9,0,0,0,1.7-1A2,2,0,0,0,209.71,183Z"/>'),y_=wl("bell-ringing","0 0 256 256",'<path d="M224,71.1a8,8,0,0,1-10.78-3.42,94.13,94.13,0,0,0-33.46-36.91,8,8,0,1,1,8.54-13.54,111.46,111.46,0,0,1,39.12,43.09A8,8,0,0,1,224,71.1ZM35.71,72a8,8,0,0,0,7.1-4.32A94.13,94.13,0,0,1,76.27,30.77a8,8,0,1,0-8.54-13.54A111.46,111.46,0,0,0,28.61,60.32,8,8,0,0,0,35.71,72Zm186.1,103.94A16,16,0,0,1,208,200H167.2a40,40,0,0,1-78.4,0H48a16,16,0,0,1-13.79-24.06C43.22,160.39,48,138.28,48,112a80,80,0,0,1,160,0C208,138.27,212.78,160.38,221.81,175.94ZM150.62,200H105.38a24,24,0,0,0,45.24,0ZM208,184c-10.64-18.27-16-42.49-16-72a64,64,0,0,0-128,0c0,29.52-5.38,53.74-16,72Z"/>'),wU=wl("bell-ringing","0 0 256 256",'<path d="M225.81,74.65A11.86,11.86,0,0,1,220.3,76a12,12,0,0,1-10.67-6.47,90.1,90.1,0,0,0-32-35.38,12,12,0,1,1,12.8-20.29,115.25,115.25,0,0,1,40.54,44.62A12,12,0,0,1,225.81,74.65ZM46.37,69.53a90.1,90.1,0,0,1,32-35.38A12,12,0,1,0,65.6,13.86,115.25,115.25,0,0,0,25.06,58.48a12,12,0,0,0,5.13,16.17A11.86,11.86,0,0,0,35.7,76,12,12,0,0,0,46.37,69.53Zm173.51,98.35A20,20,0,0,1,204,200H171.81a44,44,0,0,1-87.62,0H52a20,20,0,0,1-15.91-32.12c7.17-9.33,15.73-26.62,15.88-55.94A76,76,0,0,1,204,112C204.15,141.26,212.71,158.55,219.88,167.88ZM147.6,200H108.4a20,20,0,0,0,39.2,0Zm48.74-24c-8.16-13-16.19-33.57-16.34-63.94A52,52,0,1,0,76,112c-.15,30.42-8.18,51-16.34,64Z"/>'),SU=wl("bell-ringing","0 0 256 256",'<path d="M224,71.1a8,8,0,0,1-10.78-3.42,94.13,94.13,0,0,0-33.46-36.91,8,8,0,1,1,8.54-13.54,111.46,111.46,0,0,1,39.12,43.09A8,8,0,0,1,224,71.1ZM35.71,72a8,8,0,0,0,7.1-4.32A94.13,94.13,0,0,1,76.27,30.77a8,8,0,1,0-8.54-13.54A111.46,111.46,0,0,0,28.61,60.32,8,8,0,0,0,35.71,72Zm186.1,103.94A16,16,0,0,1,208,200H167.2a40,40,0,0,1-78.4,0H48a16,16,0,0,1-13.79-24.06C43.22,160.39,48,138.28,48,112a80,80,0,0,1,160,0C208,138.27,212.78,160.38,221.81,175.94ZM150.62,200H105.38a24,24,0,0,0,45.24,0Z"/>'),CU=wl("bell-ringing","0 0 256 256",'<path d="M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,147.81,56,112a72,72,0,0,1,144,0c0,35.82,8.3,56.6,14.9,68A8,8,0,0,1,208,192Z" opacity="0.2"/><path d="M224,71.1a8,8,0,0,1-10.78-3.42,94.13,94.13,0,0,0-33.46-36.91,8,8,0,1,1,8.54-13.54,111.46,111.46,0,0,1,39.12,43.09A8,8,0,0,1,224,71.1ZM35.71,72a8,8,0,0,0,7.1-4.32A94.13,94.13,0,0,1,76.27,30.77a8,8,0,1,0-8.54-13.54A111.46,111.46,0,0,0,28.61,60.32,8,8,0,0,0,35.71,72Zm186.1,103.94A16,16,0,0,1,208,200H167.2a40,40,0,0,1-78.4,0H48a16,16,0,0,1-13.79-24.06C43.22,160.39,48,138.28,48,112a80,80,0,0,1,160,0C208,138.27,212.78,160.38,221.81,175.94ZM150.62,200H105.38a24,24,0,0,0,45.24,0ZM208,184c-10.64-18.27-16-42.49-16-72a64,64,0,0,0-128,0c0,29.52-5.38,53.74-16,72Z"/>'),kU="bell-ringing",My=Object.freeze(Object.defineProperty({__proto__:null,bold:wU,default:y_,duotone:CU,fill:SU,glyphName:kU,light:yU,regular:y_,thin:bU},Symbol.toStringTag,{value:"Module"})),AU=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},$U=AU("sliders-horizontal","0 0 256 256",'<path d="M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z"/>');function MU(e){return e.kind==="device.offline"||e.kind==="device.online"?e.body||"A device changed state":e.kind==="plugin.failed"?"A plugin needs attention":"An update is available"}const J1=new Set,Ly=Pc("notifications",()=>{const e=X([]),t=X(0);let i=!1,n=null;const r=H(()=>t.value);async function a(){const S=await Mt("/notifications?limit=50").catch(()=>null);if(!S)return!1;const y=!i;i=!0,e.value=S.notifications;const A=S.notifications.filter(L=>!L.read).length;t.value=typeof S.unread=="number"?Math.max(S.unread,A):A;for(const L of S.notifications)L.read||J1.has(L.id)||(J1.add(L.id),y||u(L));return!0}async function s(S){try{const y=await fetch("/api/notifications/read",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S?{ids:S}:{})});if(y.ok){const A=await y.json();typeof A.unread=="number"&&(t.value=A.unread)}}catch{}}async function l(S){e.value.some(y=>y.id===S&&!y.read)&&(t.value=Math.max(0,t.value-1)),e.value=e.value.map(y=>y.id===S?{...y,read:!0}:y),await s([S])}async function o(){e.value=e.value.map(S=>({...S,read:!0})),t.value=0,await s()}function u(S){if(typeof Notification>"u"||Notification.permission!=="granted")return;const y=new Notification(S.title,{body:MU(S),tag:S.target&&"id"in S.target?`${S.target.kind}:${S.target.id}`:S.id,icon:"/logo.svg"});y.onclick=async()=>{window.focus(),y.close(),await l(S.id),n==null||n(S)}}async function c(){return typeof Notification>"u"?"unsupported":Notification.permission!=="default"?Notification.permission:Notification.requestPermission()}function d(S){n=S}let h=null,f=!1,_=null;function m(){_&&clearTimeout(_),_=setTimeout(()=>{_=null,a()},300)}function g(){if(f=!0,h)return;const S=location.protocol==="https:"?"wss:":"ws:",y=new WebSocket(`${S}//${location.host}/ws/notifications`);h=y,y.onmessage=()=>m(),y.onopen=()=>m(),y.onclose=()=>{h===y&&(h=null),f&&setTimeout(g,3e3)}}function v(){f=!1,h==null||h.close(),h=null}function w(){e.value=[],t.value=0,i=!1,J1.clear()}return{items:e,unread:r,load:a,markRead:l,markAllRead:o,enableDesktopNotifications:c,setOpener:d,connect:g,disconnect:v,reset:w}}),LU={class:"notify"},EU=Ne({__name:"NotificationSettingsModal",props:{open:{type:Boolean}},emits:["close"],setup(e,{emit:t}){const i=e,n=t,r=Ly();function a(){return typeof Notification>"u"?"unsupported":Notification.permission}const s=X(a());Pe(()=>i.open,o=>{o&&(s.value=a())});async function l(){s.value=await r.enableDesktopNotifications()}return(o,u)=>{const c=kt,d=xr,h=m2;return p(),le(h,{"close-appearance":"button",open:e.open,title:"Notifications",size:"sm",onClose:u[0]||(u[0]=f=>n("close"))},{default:I(()=>[M("div",LU,[u[5]||(u[5]=M("p",{class:"type-body-md notify__lede"}," The bell tells you when a device has not answered for ten minutes, when it comes back, when a plugin fails, and when an update is out. Nothing is sent by email. ",-1)),u[6]||(u[6]=M("h3",{class:"type-heading-compact notify__heading"},"This device",-1)),u[7]||(u[7]=M("p",{class:"type-body-md notify__lede"}," A desktop notification arrives the moment something happens, while OpenBridge is open in a tab. It is per browser, so allowing it here says nothing about your phone. ",-1)),s.value==="default"?(p(),le(c,{key:0,variant:"tertiary",icon:Y(hh),onClick:l},{default:I(()=>[...u[1]||(u[1]=[_e(" Allow notifications on this device ",-1)])]),_:1},8,["icon"])):s.value==="granted"?(p(),le(d,{key:1,status:"success",variant:"callout"},{default:I(()=>[...u[2]||(u[2]=[_e(" Allowed on this device. ",-1)])]),_:1})):s.value==="denied"?(p(),le(d,{key:2,status:"info",variant:"callout"},{default:I(()=>[...u[3]||(u[3]=[_e(" Blocked on this device. Browsers only ask once, so turning it back on means changing the site permission in the address bar. ",-1)])]),_:1})):(p(),le(d,{key:3,status:"info",variant:"callout"},{default:I(()=>[...u[4]||(u[4]=[_e(" This browser does not support desktop notifications, or only allows them on a secure (https) address. ",-1)])]),_:1}))])]),_:1},8,["open"])}}}),xU=jt(EU,[["__scopeId","data-v-e95b8eda"]]),TU=Ne({__name:"NotificationBell",setup(e){const t=Ly(),i=Tr(),n=dl(),r=al(),a=hl(),s=X(!1),l=X(!1),o=X(!1),u=X(!1);async function c(){l.value=t.items.length===0,o.value=!1;try{o.value=!await t.load()}finally{l.value=!1}}async function d(_){t.markRead(_.id),await h(_)}async function h(_){const m=_.target;if(!m)return;if(m.kind==="device"){await r.push(`/devices/${encodeURIComponent(m.id)}`);return}if(m.kind==="settings"){await r.push("/settings");return}if(m.kind==="config"){await r.push("/config");return}r.currentRoute.value.name!=="plugins"&&(await r.push("/plugins"),await wt());let g=i.plugins.find(v=>v.id===m.id);g||(await i.fetchPlugins(),g=i.plugins.find(v=>v.id===m.id)),g&&n.openPlugin(g)}function f(){s.value=!1,u.value=!0}return Pe(()=>{var _;return(_=a.user.value)==null?void 0:_.id},(_,m)=>{_!==m&&(t.reset(),c())}),et(()=>{t.setOpener(_=>void h(_)),c(),t.connect()}),Hi(()=>{t.setOpener(null),t.disconnect()}),(_,m)=>{const g=wb,v=Sb,w=kt,S=Pb,y=DI,A=Ln("nb-tooltip");return p(),$($e,null,[ee(y,{open:s.value,"onUpdate:open":m[0]||(m[0]=L=>s.value=L),label:"Notifications","unread-count":Y(t).unread,"item-count":Y(t).items.length,loading:l.value,error:o.value,"error-title":"Could not load notifications","error-description":"The list below may be out of date.","empty-title":"Nothing to report","empty-description":"You hear here when a device stops answering, a plugin fails, or an update is out.",width:360,side:"right",align:"end","close-on-select":"","close-on-navigate":"",onMarkAllRead:m[1]||(m[1]=L=>Y(t).markAllRead()),onRetry:c},{trigger:I(({triggerProps:L,setTriggerRef:k,toggle:V})=>[ee(v,null,{default:I(()=>[ee(g,yt({ref:k},L,{label:"Notifications",icon:Y(t).unread>0?My:b2,active:s.value,badge:Y(t).unread>0?Y(t).unread:void 0,"badge-variant":"danger",onClick:V}),null,16,["icon","active","badge","onClick"])]),_:2},1024)]),"header-actions":I(({markAllProps:L,markAllText:k})=>[ut(ee(w,{size:"xs",variant:"ghost",icon:Y($U),"aria-label":"Notification settings",onClick:f},null,8,["icon"]),[[A,{body:"Notification settings"}]]),Y(t).unread>0?(p(),le(w,yt({key:0,size:"xs",variant:"ghost",outlined:""},L),{default:I(()=>[_e(K(k),1)]),_:2},1040)):P("",!0)]),default:I(()=>[(p(!0),$($e,null,Ue(Y(t).items,L=>(p(),le(S,{key:L.id,title:L.title,body:L.body,time:L.createdAt,read:L.read,variant:L.variant,interactive:L.target!==null,onSelect:k=>d(L)},null,8,["title","body","time","read","variant","interactive","onSelect"]))),128))]),_:1},8,["open","unread-count","item-count","loading","error"]),ee(xU,{open:u.value,onClose:m[2]||(m[2]=L=>u.value=!1)},null,8,["open"])],64)}}}),w_="https://docs.nubisco.io/openbridge/",S_="https://github.com/sponsors/joseporto",HU=Ne({__name:"AppLayout",setup(e){const t=sl(),i=Tr(),n=dl(),r=ma(),a=hl(),s=ZR({storageKey:"openbridge.sidebar"}),l=X(null),{phone:o}=ln();Pe(()=>t.fullPath,()=>{var k;o.value&&((k=l.value)==null||k.setSidebarOpen(!1))});const u=H(()=>i.connected?"Daemon connected":"Daemon offline");function c(k){window.open(k,"_blank","noopener")}async function d(){await a.logout()}function h(){var V;const k=(V=a.config.value)==null?void 0:V.issuer;k&&window.open(`${k}/profile`,"_blank","noopener")}const f=X([]),_=X(!0),m=H(()=>f.value.map(k=>{var V;return{id:k.sub,email:k.email,name:k.name,current:k.sub===((V=a.user.value)==null?void 0:V.id)}}));async function g(){const k=await a.listIdentities();f.value=k,_.value=k.length===0}function v(k){a.switchAccount(k.email)}async function w(k){await a.removeIdentity(k.id),await g()}const S=X(null),y=X(!1);async function A(){try{const k=await fetch("/api/updates/check");if(!k.ok)return;const V=await k.json();V.updateAvailable&&V.latest&&(S.value=V.latest)}catch{}}const L=[{name:"dashboard",icon:"house",label:"Dashboard",href:"/dashboard"},{name:"plugins",icon:"puzzle-piece",label:"Plugins",href:"/plugins"},{name:"devices",icon:"devices",label:"Devices",href:"/devices"},{name:"config",icon:"brackets-curly",label:"Config",href:"/config"},{name:"terminal",icon:"terminal",label:"Terminal",href:"/terminal"}];return Pe(()=>t.name,()=>n.close()),et(async()=>{await i.fetchHealth(),await i.fetchPlugins(),i.fetchLogs(),i.connectLiveLogs();const k=setInterval(()=>i.fetchHealth(),1e4);Hi(()=>clearInterval(k)),A()}),Hi(()=>i.disconnectLiveLogs()),(k,V)=>{const T=IP,J=Qo("RouterLink"),x=JP,N=wb,O=Sb,R=H4,j=YT,G=tO,ae=BM,q=kt,se=xr,me=Qo("RouterView"),U=TP;return p(),le(U,{ref_key:"shell",ref:l,"inspector-visible":Y(n).visible,"main-padding":!Y(r).fullBleed,"sidebar-variant":Y(s).variant.value,"sidebar-header-action-position":"start","sidebar-header-action-compact":"swap"},tr({"sidebar-logo":I(()=>[ee(J,{to:"/dashboard",class:"sidebar-brand-link","aria-label":"OpenBridge, dashboard"},{default:I(()=>[ee(T,{title:"OpenBridge"},{icon:I(()=>[...V[5]||(V[5]=[M("img",{src:$2,width:"28",height:"28",alt:""},null,-1)])]),_:1})]),_:1})]),"sidebar-header-action":I(()=>[ee(x,{onToggle:Y(s).toggle},null,8,["onToggle"])]),"sidebar-nav":I(()=>[ee(O,null,{default:I(()=>[(p(),$($e,null,Ue(L,ve=>ee(N,{key:ve.name,icon:ve.icon,label:ve.label,to:ve.href,active:Y(t).name===ve.name},null,8,["icon","label","to","active"])),64))]),_:1})]),"sidebar-bottom":I(()=>{var ve;return[ee(O,null,{default:I(()=>[ee(N,{icon:nV,label:"Documentation",href:w_,onClick:V[0]||(V[0]=Qe(ce=>c(w_),["prevent"]))}),ee(N,{icon:cV,label:"Sponsor",href:S_,onClick:V[1]||(V[1]=Qe(ce=>c(S_),["prevent"]))})]),_:1}),ee(TU),ee(O,null,{default:I(()=>[ee(N,{icon:ey,label:"Settings",to:"/settings",active:Y(t).name==="settings"},null,8,["active"])]),_:1}),(ve=Y(a).config.value)!=null&&ve.enabled&&Y(a).user.value?(p(),le(j,{key:0,user:{email:Y(a).user.value.email,name:Y(a).user.value.name,picture:Y(a).user.value.picture},trigger:"identity","show-theme":"",accounts:m.value,"accounts-unknown":_.value,"show-account-actions":Y(a).isNubiscoPlatform.value,"show-profile":Y(a).isNubiscoPlatform.value,brand:Y(a).isNubiscoPlatform.value?"footer":void 0,onOpen:g,onSwitch:v,onSwitchAccount:V[2]||(V[2]=ce=>Y(a).chooseAccount()),onAddAccount:V[3]||(V[3]=ce=>Y(a).addAccount()),onRemove:w,onProfile:h,onSignOut:d},{default:I(({close:ce})=>[ee(R,{icon:ET,label:"Sign out of all apps",danger:"",onSelect:ge=>(ce(),Y(a).logoutEverywhere())},null,8,["onSelect"])]),_:1},8,["user","accounts","accounts-unknown","show-account-actions","show-profile","brand"])):P("",!0),ee(G,{label:u.value,status:Y(i).connected?"success":"danger"},null,8,["label","status"])]}),"topbar-left":I(()=>[Y(r).crumbs.length>0?(p(),le(ae,{key:0,items:Y(r).crumbs,collapse:"phone"},null,8,["items"])):(p(),le(ae,{key:1,subtitle:Y(r).title},null,8,["subtitle"]))]),inspector:I(()=>[Y(n).mode==="plugin"?(p(),le(bF,{key:0})):Y(n).mode==="marketplace"?(p(),le(oz,{key:1})):Y(n).mode==="device"?(p(),le(dU,{key:2})):P("",!0)]),bottom:I(()=>[ee(gU)]),default:I(()=>[ee(me)]),_:2},[S.value&&!y.value?{name:"notification",fn:I(()=>[ee(se,{status:"info",icon:ty,flush:"",dismissible:"",title:`OpenBridge v${S.value} is available`,onDismiss:V[4]||(V[4]=ve=>y.value=!0)},{action:I(()=>[ee(q,{variant:"ghost",size:"sm",href:"https://github.com/nubisco/openbridge/releases",target:"_blank",rel:"noopener"},{default:I(()=>[...V[6]||(V[6]=[_e(" See what's new ",-1)])]),_:1})]),_:1},8,["title"])]),key:"0"}:void 0]),1032,["inspector-visible","main-padding","sidebar-variant"])}}}),NU=jt(HU,[["__scopeId","data-v-e07866bc"]]),PU=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},OU=PU("qr-code","0 0 256 256",'<path d="M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm0,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48ZM200,40H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-64,72V144a8,8,0,0,1,16,0v32a8,8,0,0,1-16,0Zm80-16a8,8,0,0,1-8,8H184v40a8,8,0,0,1-8,8H144a8,8,0,0,1,0-16h24V144a8,8,0,0,1,16,0v8h24A8,8,0,0,1,216,160Zm0,32v16a8,8,0,0,1-16,0V192a8,8,0,0,1,16,0Z"/>'),IU={class:"dashboard"},RU={class:"setup"},DU={class:"hk"},VU={key:0,class:"hk__qr"},BU=["src"],ZU={key:1,class:"hk__qr hk__qr--empty type-body-sm"},FU={class:"hk__details"},zU={key:0,class:"hk__pin type-heading-02 tabular"},UU={key:1,class:"metric__sub type-body-sm"},WU={key:2,class:"hk__error type-body-sm"},jU={class:"sys-path type-code-sm"},KU={class:"sys-path type-code-sm"},qU={class:"sys-path type-code-sm"},GU={class:"metrics"},YU={class:"metric__values"},XU={class:"metric__big type-heading-03 tabular"},JU={key:0,class:"metric__sub type-body-sm tabular"},QU={class:"metric__chart"},eW={class:"metric__values"},tW={class:"metric__big type-heading-03 tabular"},iW={class:"metric__sub type-body-sm tabular"},nW={class:"metric__chart"},rW={class:"uptime"},aW={class:"uptime__row"},sW={class:"type-heading-02 tabular"},lW={class:"uptime__row"},oW={class:"type-heading-02 tabular"},uW={class:"metric__chart"},cW={class:"net"},dW={class:"type-heading-compact tabular"},hW={class:"type-heading-compact tabular"},fW={class:"metric__chart net__charts"},pW=Ne({__name:"DashboardView",setup(e){const t=Tr(),i=ma(),n=X(!1),r=X(!1);async function a(){if(!n.value){n.value=!0,r.value=!1;try{await ze.daemon.restart(),r.value=!0;let x=0;const N=setInterval(async()=>{x++;try{await ze.health(),clearInterval(N),location.reload()}catch{}x>60&&(clearInterval(N),n.value=!1)},1e3)}catch{n.value=!1}}}const s=X(null),l=X(""),o=X(""),u=X(""),c=H(()=>t.connected&&u.value?"danger":"neutral"),d=H(()=>t.connected?u.value?"Offline":"Running":"Daemon offline"),h=X([]),f=X([]),_=X([]),m=X([]),g=An(null);let v=null;function w(){v&&(v.onclose=null,v.close(),v=null);const x=location.protocol==="https:"?"wss:":"ws:";v=new WebSocket(`${x}//${location.host}/ws/metrics`),v.onmessage=N=>{if(!document.hidden)try{const O=JSON.parse(N.data);if(O.type==="history"){const R=O.data;h.value=R.map(j=>j.cpu),f.value=R.map(j=>A(j)),_.value=R.map(j=>j.netRxSec),m.value=R.map(j=>j.netTxSec),R.length&&(g.value=R[R.length-1])}else if(O.type==="snapshot"){const R=O.data;g.value=R,y(h,R.cpu),y(f,A(R)),y(_,R.netRxSec),y(m,R.netTxSec)}}catch{}},v.onclose=()=>{v=null,setTimeout(w,3e3)}}function S(){document.hidden||w()}function y(x,N){x.value=[...x.value.slice(-59),N]}function A(x){return x.memTotal?Math.round((x.memTotal-x.memFree)/x.memTotal*100):0}function L(x){return x<1024?`${x} B`:x<1024**2?`${(x/1024).toFixed(1)} KB`:x<1024**3?`${(x/1024**2).toFixed(1)} MB`:`${(x/1024**3).toFixed(1)} GB`}function k(x){const N=Math.floor(x/86400),O=Math.floor(x%86400/3600),R=Math.floor(x%3600/60);return N>0?`${N}d ${O}h`:O>0?`${O}h ${R}m`:`${R}m`}const V=H(()=>g.value?L(g.value.memTotal-g.value.memFree):"—"),T=H(()=>g.value?L(g.value.memTotal):"—"),J=H(()=>g.value?A(g.value):0);return et(async()=>{i.setPage("Dashboard"),t.fetchPlugins();try{s.value=await ze.system()}catch{}try{const x=await ze.qr();u.value=x.error??"",x.setupURI&&(o.value=x.pincode??"",l.value=await ml.toDataURL(x.setupURI,{width:148,margin:1,color:{dark:"#000000",light:"#ffffff"}}))}catch{}w(),document.addEventListener("visibilitychange",S)}),Hi(()=>{v==null||v.close(),v=null,document.removeEventListener("visibilitychange",S)}),(x,N)=>{const O=Hb,R=i2,j=Ke,G=Fc,ae=O4,q=n2,se=el,me=iR,U=Ab,ve=kt;return p(),$("div",IU,[ee(R,{min:"160px",gap:"md"},{default:I(()=>[ee(O,{size:"sm",label:"Plugins running",value:`${Y(t).runningCount} of ${Y(t).plugins.length}`,to:"/plugins"},null,8,["value"]),ee(O,{size:"sm",label:"Plugin errors",to:"/plugins",value:Y(t).errorCount,status:Y(t).errorCount?"danger":"neutral"},null,8,["value","status"]),ee(O,{size:"sm",label:"HomeKit bridge",value:d.value,status:c.value},null,8,["value","status"])]),_:1}),M("div",RU,[ee(G,{title:"HomeKit pairing"},{default:I(()=>[M("div",DU,[l.value?(p(),$("div",VU,[M("img",{src:l.value,alt:"HomeKit QR code",class:"hk__qr-img"},null,8,BU)])):(p(),$("div",ZU,[ee(j,{name:Y(OU),size:"xl"},null,8,["name"]),M("span",null,K(u.value?"HomeKit bridge unavailable":"No HAP bridge configured"),1)])),M("div",FU,[o.value?(p(),$("div",zU,K(o.value),1)):P("",!0),o.value?(p(),$("div",UU,"Scan to add to HomeKit")):P("",!0),u.value?(p(),$("div",WU,K(u.value),1)):P("",!0)])])]),_:1}),ee(G,{flat:"",title:"System information"},{default:I(()=>[s.value?(p(),le(q,{key:0,compact:"","term-width":"6rem"},{default:I(()=>[ee(ae,{term:"OS"},{default:I(()=>[_e(K(s.value.os),1)]),_:1}),ee(ae,{term:"Arch"},{default:I(()=>[_e(K(s.value.arch),1)]),_:1}),ee(ae,{term:"Hostname"},{default:I(()=>[_e(K(s.value.hostname),1)]),_:1}),ee(ae,{term:"IP Address"},{default:I(()=>[_e(K(s.value.ip),1)]),_:1}),ee(ae,{term:"User"},{default:I(()=>[_e(K(s.value.user),1)]),_:1}),ee(ae,{term:"Node.js"},{default:I(()=>[_e(K(s.value.nodeVersion),1)]),_:1}),ee(ae,{term:"OpenBridge"},{default:I(()=>{var ce;return[_e("v"+K(((ce=Y(t).health)==null?void 0:ce.version)??"—"),1)]}),_:1}),ee(ae,{term:"Config"},{default:I(()=>[M("span",jU,K(s.value.configPath),1)]),_:1}),ee(ae,{term:"OB plugins"},{default:I(()=>[M("span",KU,K(s.value.obPluginsDir),1)]),_:1}),ee(ae,{term:"HB plugins"},{default:I(()=>[M("span",qU,K(s.value.hbPluginsDir),1)]),_:1})]),_:1})):(p(),le(se,{key:1,size:"sm","show-label":"",label:"Loading..."}))]),_:1})]),M("div",GU,[ee(G,{flat:"",title:"CPU",class:"metric"},{default:I(()=>{var ce,ge;return[M("div",YU,[M("span",XU,K(((ce=g.value)==null?void 0:ce.cpu)??"—"),1),N[0]||(N[0]=M("span",{class:"metric__unit type-body-sm"},"%",-1)),(ge=g.value)!=null&&ge.cpuTemp&&g.value.cpuTemp>0?(p(),$("span",JU,K(g.value.cpuTemp)+"°C ",1)):P("",!0)]),M("div",QU,[ee(me,{data:h.value,color:"var(--nb-c-primary)",height:40},null,8,["data"])])]}),_:1}),ee(G,{flat:"",title:"Memory",class:"metric"},{default:I(()=>[M("div",eW,[M("span",tW,K(J.value),1),N[1]||(N[1]=M("span",{class:"metric__unit type-body-sm"},"%",-1)),M("span",iW,K(V.value)+" / "+K(T.value),1)]),ee(U,{value:J.value,max:100,size:"sm"},null,8,["value"]),M("div",nW,[ee(me,{data:f.value,color:"var(--nb-c-primary)",height:32},null,8,["data"])])]),_:1}),ee(G,{flat:"",title:"Uptime",class:"metric"},{default:I(()=>[M("div",rW,[M("div",aW,[M("span",sW,K(s.value?k(s.value.uptimeSystem):"—"),1),N[2]||(N[2]=M("span",{class:"metric__sub type-body-sm"},"System",-1))]),M("div",lW,[M("span",oW,K(s.value?k(s.value.uptimeProcess):"—"),1),N[3]||(N[3]=M("span",{class:"metric__sub type-body-sm"},"Process",-1))])]),M("div",uW,[ee(ve,{variant:"tertiary",size:"sm",loading:n.value,icon:r.value?Yf:zV,onClick:a},{default:I(()=>[_e(K(r.value?"Restarted":n.value?"Restarting…":"Restart OpenBridge"),1)]),_:1},8,["loading","icon"])])]),_:1}),ee(G,{flat:"",title:"Network",class:"metric"},{default:I(()=>[M("div",cW,[M("div",null,[M("div",dW,K(g.value?L(g.value.netRxSec)+"/s":"—"),1),N[4]||(N[4]=M("div",{class:"metric__sub type-body-sm"},"↓ Received",-1))]),M("div",null,[M("div",hW,K(g.value?L(g.value.netTxSec)+"/s":"—"),1),N[5]||(N[5]=M("div",{class:"metric__sub type-body-sm"},"↑ Sent",-1))])]),M("div",fW,[ee(me,{data:_.value,color:"var(--nb-c-primary)",height:28},null,8,["data"]),ee(me,{data:m.value,color:"var(--nb-c-text-subtle)",height:28},null,8,["data"])])]),_:1})])])}}}),_W=jt(pW,[["__scopeId","data-v-4267f62f"]]),Sl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},mW=Sl("arrow-clockwise","0 0 256 256",'<path d="M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z"/>'),vW=Sl("arrow-clockwise","0 0 256 256",'<path d="M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z"/>'),kh=Sl("arrow-clockwise","0 0 256 256",'<path d="M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"/>'),gW=Sl("arrow-clockwise","0 0 256 256",'<path d="M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z"/>'),bW=Sl("arrow-clockwise","0 0 256 256",'<path d="M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z"/>'),yW=Sl("arrow-clockwise","0 0 256 256",'<path d="M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z" opacity="0.2"/><path d="M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"/>'),wW="arrow-clockwise",SW=Object.freeze(Object.defineProperty({__proto__:null,bold:gW,default:kh,duotone:yW,fill:bW,glyphName:wW,light:vW,regular:kh,thin:mW},Symbol.toStringTag,{value:"Module"})),CW=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},Ey=CW("cards","0 0 256 256",'<path d="M184,72H40A16,16,0,0,0,24,88V200a16,16,0,0,0,16,16H184a16,16,0,0,0,16-16V88A16,16,0,0,0,184,72Zm0,128H40V88H184V200ZM232,56V176a8,8,0,0,1-16,0V56H64a8,8,0,0,1,0-16H216A16,16,0,0,1,232,56Z"/>'),Cl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},kW=Cl("list","0 0 256 256",'<path d="M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM40,68H216a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8ZM216,188H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z"/>'),AW=Cl("list","0 0 256 256",'<path d="M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM40,70H216a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12ZM216,186H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z"/>'),uc=Cl("list","0 0 256 256",'<path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"/>'),$W=Cl("list","0 0 256 256",'<path d="M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM40,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24ZM216,180H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z"/>'),MW=Cl("list","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM192,184H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z"/>'),LW=Cl("list","0 0 256 256",'<path d="M216,64V192H40V64Z" opacity="0.2"/><path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"/>'),EW="list",xW=Object.freeze(Object.defineProperty({__proto__:null,bold:$W,default:uc,duotone:LW,fill:MW,glyphName:EW,light:AW,regular:uc,thin:kW},Symbol.toStringTag,{value:"Module"})),kl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},TW=kl("squares-four","0 0 256 256",'<path d="M104,44H56A12,12,0,0,0,44,56v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V56A12,12,0,0,0,104,44Zm4,60a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Zm92-60H152a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,60a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4ZM104,140H56a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V152A12,12,0,0,0,104,140Zm4,60a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Zm92-60H152a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V152A12,12,0,0,0,200,140Zm4,60a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Z"/>'),HW=kl("squares-four","0 0 256 256",'<path d="M104,42H56A14,14,0,0,0,42,56v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V56A14,14,0,0,0,104,42Zm2,62a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm94-62H152a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,62a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm-98,34H56a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V152A14,14,0,0,0,104,138Zm2,62a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm94-62H152a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V152A14,14,0,0,0,200,138Zm2,62a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Z"/>'),cc=kl("squares-four","0 0 256 256",'<path d="M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z"/>'),NW=kl("squares-four","0 0 256 256",'<path d="M100,36H56A20,20,0,0,0,36,56v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V56A20,20,0,0,0,100,36ZM96,96H60V60H96ZM200,36H156a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,60H160V60h36Zm-96,40H56a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V156A20,20,0,0,0,100,136Zm-4,60H60V160H96Zm104-60H156a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V156A20,20,0,0,0,200,136Zm-4,60H160V160h36Z"/>'),PW=kl("squares-four","0 0 256 256",'<path d="M120,56v48a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40h48A16,16,0,0,1,120,56Zm80-16H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm-96,96H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm96,0H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Z"/>'),OW=kl("squares-four","0 0 256 256",'<path d="M112,56v48a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8h48A8,8,0,0,1,112,56Zm88-8H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V56A8,8,0,0,0,200,48Zm-96,96H56a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,104,144Zm96,0H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,200,144Z" opacity="0.2"/><path d="M200,136H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48ZM104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Z"/>'),IW="squares-four",RW=Object.freeze(Object.defineProperty({__proto__:null,bold:NW,default:cc,duotone:OW,fill:PW,glyphName:IW,light:HW,regular:cc,thin:TW},Symbol.toStringTag,{value:"Module"})),DW={class:"plugin-avatar"},VW=["src","alt"],BW={class:"plugin-support"},ZW={class:"tabular"},FW={key:0},zW={key:0,class:"plugin-desc"},UW={key:1,class:"plugin-desc"},WW={key:2,class:"plugin-error"},jW={class:"cell-name"},KW={class:"plugin-avatar plugin-avatar--sm"},qW=["src","alt"],GW={class:"cell-name__text"},YW={class:"type-heading-compact"},XW={key:0,class:"type-body-sm cell-muted"},JW={class:"cell-version"},QW={class:"tabular"},ej=Ne({__name:"PluginList",props:{rows:{},view:{},selectedId:{}},emits:["select"],setup(e,{emit:t}){const i=e,n=t;function r(o){return o==="running"?"success":o==="error"?"danger":o==="loading"?"info":"neutral"}const a=X({key:"name",direction:"asc"}),s=[{key:"name",header:"Plugin",sortable:!0,primary:!0},{key:"version",header:"Version",sortable:!0,width:140,phoneMeta:!0},{key:"source",header:"Source",sortable:!0,width:120,phoneMeta:!0},{key:"status",header:"Status",sortable:!0,width:120,phoneMeta:!0},{key:"author",header:"Author",sortable:!0}],l=H(()=>{const o=i.rows.map(d=>({id:d.plugin.id,name:d.plugin.manifest.name,version:`v${d.plugin.manifest.version}`,availableUpdate:d.plugin.availableUpdate,source:d.plugin.source==="homebridge"?"Homebridge":"Native",status:d.plugin.status,author:d.plugin.manifest.author??"—",platform:d.plugin.source==="homebridge"?d.plugin.platformName:void 0,avatarUrl:d.avatarUrl,isOpenBridge:d.isOpenBridge,plugin:d.plugin})),u=a.value;if(!u||u.direction==="none")return o;const c=u.direction==="asc"?1:-1;return[...o].sort((d,h)=>c*String(d[u.key]??"").localeCompare(String(h[u.key]??"")))});return(o,u)=>{const c=Ke,d=Er,h=kt,f=N4,_=i2,m=_2;return e.view==="cards"?(p(),le(_,{key:0,min:"400px",gap:"md"},{default:I(()=>[(p(!0),$($e,null,Ue(e.rows,g=>(p(),le(f,{key:g.plugin.id,flat:"",clickable:"",orientation:"horizontal",class:"plugin-card",title:g.plugin.manifest.name,selected:g.plugin.id===e.selectedId,onSelect:v=>n("select",g.plugin)},tr({icon:I(()=>[M("span",DW,[g.avatarUrl?(p(),$("img",{key:0,src:g.avatarUrl,alt:g.plugin.manifest.name,onError:u[0]||(u[0]=v=>v.target.style.display="none")},null,40,VW)):(p(),le(c,{key:1,name:g.isOpenBridge?Y(Ls):Y(Cs),size:"md"},null,8,["name"]))])]),meta:I(()=>[ee(d,{variant:r(g.plugin.status),size:"sm"},{default:I(()=>[_e(K(g.plugin.status),1)]),_:2},1032,["variant"])]),subtitle:I(()=>[M("span",BW,[M("span",ZW,"v"+K(g.plugin.manifest.version),1),g.plugin.source==="homebridge"&&g.plugin.platformName?(p(),$("span",FW," · Platform: "+K(g.plugin.platformName),1)):P("",!0),g.plugin.availableUpdate?(p(),le(d,{key:1,variant:"info",size:"sm"},{default:I(()=>[_e(" v"+K(g.plugin.availableUpdate)+" available ",1)]),_:2},1024)):P("",!0)])]),default:I(()=>[g.plugin.manifest.description?(p(),$("p",zW,K(g.plugin.manifest.description),1)):P("",!0),g.plugin.manifest.author?(p(),$("p",UW,"by "+K(g.plugin.manifest.author),1)):P("",!0),g.plugin.error?(p(),$("p",WW,K(g.plugin.error),1)):P("",!0)]),_:2},[g.sponsorUrl||g.docsUrl?{name:"footer",fn:I(()=>[M("span",{class:"plugin-links",onClick:u[1]||(u[1]=Qe(()=>{},["stop"])),onKeydown:u[2]||(u[2]=Qe(()=>{},["stop"]))},[g.sponsorUrl?(p(),le(h,{key:0,variant:"link",size:"xs",href:g.sponsorUrl,target:"_blank","aria-label":`Sponsor ${g.plugin.manifest.name}`},{default:I(()=>[...u[6]||(u[6]=[_e(" Sponsor ",-1)])]),_:1},8,["href","aria-label"])):P("",!0),g.docsUrl?(p(),le(h,{key:1,variant:"link",size:"xs",href:g.docsUrl,target:"_blank","aria-label":`Docs for ${g.plugin.manifest.name}`},{default:I(()=>[...u[7]||(u[7]=[_e(" Docs ",-1)])]),_:1},8,["href","aria-label"])):P("",!0)],32)]),key:"0"}:void 0]),1032,["title","selected","onSelect"]))),128))]),_:1})):(p(),le(m,{key:1,columns:s,rows:l.value,"row-key":"id",size:"sm",zebra:"","stack-on-phone":"","sort-state":a.value,onSort:u[4]||(u[4]=g=>a.value=g),onRowClick:u[5]||(u[5]=g=>n("select",g.plugin))},{"cell-name":I(({row:g})=>[M("div",jW,[M("span",KW,[g.avatarUrl?(p(),$("img",{key:0,src:g.avatarUrl,alt:g.name,onError:u[3]||(u[3]=v=>v.target.style.display="none")},null,40,qW)):(p(),le(c,{key:1,name:g.isOpenBridge?Y(Ls):Y(Cs),size:"sm"},null,8,["name"]))]),M("div",GW,[M("div",YW,K(g.name),1),g.platform?(p(),$("div",XW,"Platform: "+K(g.platform),1)):P("",!0)])])]),"cell-version":I(({row:g})=>[M("span",JW,[M("span",QW,K(g.version),1),g.availableUpdate?(p(),le(d,{key:0,variant:"info",size:"sm"},{default:I(()=>[_e("v"+K(g.availableUpdate),1)]),_:2},1024)):P("",!0)])]),"cell-status":I(({row:g})=>[ee(d,{variant:r(g.status)},{default:I(()=>[_e(K(g.status),1)]),_:2},1032,["variant"])]),_:1},8,["rows","sort-state"]))}}}),tj=jt(ej,[["__scopeId","data-v-598d96f3"]]),ij={class:"plugins-view"},nj={class:"list-count type-body-sm tabular"},C_="openbridge.plugins.view",rj=Ne({__name:"PluginsView",setup(e){const t=ys("topbar-right"),i=Tr(),n=dl(),r=ma(),a=Gc(),{phone:s}=ln(),l=X(""),o=X(new Map),u=X(new Set),c=X(!1),d=X(localStorage.getItem(C_)==="table"?"table":"cards");function h(){d.value=d.value==="cards"?"table":"cards",localStorage.setItem(C_,d.value)}const f=H(()=>d.value==="cards"?"Show as table":"Show as cards"),_=H(()=>{const j={id:"browse",label:"Browse plugins",icon:D4,variant:"primary",priority:"primary",onSelect:()=>n.openMarketplace()};return s.value?[j,{id:"refresh",label:"Refresh metadata",icon:SW,loading:c.value,onSelect:()=>void N(!0)},{id:"view",label:f.value,icon:d.value==="cards"?xW:RW,onSelect:h}]:[j]}),m=H(()=>{var j;return n.visible&&n.mode==="plugin"?((j=n.selectedPlugin)==null?void 0:j.id)??null:null}),g=H(()=>S().map(j=>{const G=L(j);return{plugin:j,avatarUrl:J(j),isOpenBridge:A(j),sponsorUrl:G==null?void 0:G.githubSponsorsUrl,docsUrl:G==null?void 0:G.documentationUrl}}));function v(j){if(j.source==="homebridge"){const ae=(j.manifest.description??"").match(/Homebridge platform:\s*([^\s]+)/);if(ae!=null&&ae[1])return ae[1]}return j.manifest.name}function w(j){var se;const ae=(se=(j.manifest.description??"").match(/Homebridge platform:\s*([^\s]+)/))==null?void 0:se[1],q=[v(j),ae,j.manifest.name,j.id];return Array.from(new Set(q.filter(me=>!!me&&me.trim().length>0)))}function S(){const j=l.value.toLowerCase();return i.plugins.filter(G=>G.manifest.name.toLowerCase().includes(j)||(G.manifest.description??"").toLowerCase().includes(j))}function y(j){var G;((G=n.selectedPlugin)==null?void 0:G.id)===j.id&&n.visible&&n.mode==="plugin"?n.close():n.openPlugin(j)}function A(j){return j.manifest.name.includes("openbridge-")||j.source==="native"}function L(j){const G=w(j);for(const ae of G){const q=o.value.get(ae);if(q)return q}if(j.enrichedMetadata)return j.enrichedMetadata}async function k(j,G=!1){var q;const ae=w(j);for(const se of ae)if(!(!G&&o.value.has(se))&&!(!G&&u.value.has(se))){u.value.add(se);try{const me=await ze.marketplace.enriched(se),U=new Map(o.value);if(U.set(se,me),U.set(v(j),me),o.value=U,j.enrichedMetadata=me,me.documentationUrl||me.githubSponsorsUrl||(q=me.links)!=null&&q.repository)return}catch{}finally{const me=new Set(u.value);me.delete(se),u.value=me}}}const V=X(new Map);function T(j){const ae=j.trim().replace(/^github:/,"https://github.com/").replace(/^git\+/,"").replace(/^git@github\.com:/,"https://github.com/").match(/github\.com[/:]([^/]+)/);return ae?`https://github.com/${ae[1]}.png?size=48`:null}function J(j){var se,me;const G=L(j),ae=((se=G==null?void 0:G.links)==null?void 0:se.repository)??((me=G==null?void 0:G.links)==null?void 0:me.homepage)??"";if(ae){const U=T(ae);if(U)return U}const q=w(j);for(const U of q){const ve=V.value.get(U);if(ve)return ve}return null}async function x(j,G=!1){var ae;if(!(!G&&V.value.has(j)))try{const q=await fetch(`https://registry.npmjs.org/${encodeURIComponent(j)}/latest`,{signal:AbortSignal.timeout(5e3)});if(!q.ok){V.value.set(j,"");return}const se=await q.json(),me=((ae=se==null?void 0:se.repository)==null?void 0:ae.url)??(se==null?void 0:se.homepage)??"";V.value.set(j,T(me)??"")}catch{V.value.set(j,"")}}async function N(j=!1){if(!c.value){c.value=!0;try{j&&(o.value=new Map,V.value=new Map);const G=i.plugins;for(const ae of G){const q=w(ae);for(const se of q)await x(se,j);await k(ae,j)}j&&a.success("Plugin metadata refreshed")}catch{a.error("Failed to refresh plugin metadata")}finally{c.value=!1}}}et(async()=>{await i.fetchPlugins()}),r.setPage("Plugins");const O={one:"{count} plugin",other:"{count} plugins"},R=H(()=>g.value.length===i.plugins.length?ds(i.plugins.length,O):`${g.value.length} of ${ds(i.plugins.length,O)}`);return(j,G)=>{const ae=pa,q=kt,se=Qf,me=u0,U=Ln("nb-tooltip");return p(),$("div",ij,[(p(),le(mi(Y(t).Outlet),null,{default:I(()=>[Y(s)?P("",!0):(p(),$($e,{key:0},[ee(ae,{modelValue:l.value,"onUpdate:modelValue":G[0]||(G[0]=ve=>l.value=ve),placeholder:"Search plugins...",size:"sm",class:"plugins-search"},null,8,["modelValue"]),ut(ee(q,{variant:"ghost",size:"sm",icon:Y(kh),"aria-label":"Refresh metadata",loading:c.value,disabled:c.value,onClick:G[1]||(G[1]=ve=>N(!0))},null,8,["icon","loading","disabled"]),[[U,{body:"Refresh metadata"}]]),ut(ee(q,{variant:"ghost",size:"sm",icon:d.value===Y(Ey)?Y(uc):Y(cc),"aria-label":f.value,onClick:h},null,8,["icon","aria-label"]),[[U,{body:f.value}]])],64)),ee(se,{items:_.value,overflow:"phone"},null,8,["items"])]),_:1})),Y(s)?(p(),le(ae,{key:0,modelValue:l.value,"onUpdate:modelValue":G[2]||(G[2]=ve=>l.value=ve),placeholder:"Search plugins...",size:"sm"},null,8,["modelValue"])):P("",!0),g.value.length===0?(p(),le(me,{key:1,kind:l.value?"no-results":"empty",icon:l.value?void 0:ny,title:l.value?`No plugins matching "${l.value}"`:"No plugins loaded yet",bordered:""},tr({_:2},[l.value?void 0:{name:"actions",fn:I(()=>[ee(q,{variant:"tertiary",size:"sm",icon:Y(Yd),onClick:G[3]||(G[3]=ve=>Y(n).openMarketplace())},{default:I(()=>[...G[5]||(G[5]=[_e(" Browse & install plugins ",-1)])]),_:1},8,["icon"])]),key:"0"}]),1032,["kind","icon","title"])):(p(),$("div",{key:2,class:"plugins-body",onClick:G[4]||(G[4]=Qe(ve=>Y(n).close(),["self"]))},[M("p",nj,K(R.value),1),ee(tj,{rows:g.value,view:d.value,"selected-id":m.value,onSelect:y},null,8,["rows","view","selected-id"])]))])}}}),aj=jt(rj,[["__scopeId","data-v-e22be0c2"]]),Al=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},sj=Al("devices","0 0 256 256",'<path d="M224,76H204V64a20,20,0,0,0-20-20H40A20,20,0,0,0,20,64v96a20,20,0,0,0,20,20H156v12a20,20,0,0,0,20,20h48a20,20,0,0,0,20-20V96A20,20,0,0,0,224,76ZM40,172a12,12,0,0,1-12-12V64A12,12,0,0,1,40,52H184a12,12,0,0,1,12,12V76H176a20,20,0,0,0-20,20v76Zm196,20a12,12,0,0,1-12,12H176a12,12,0,0,1-12-12V96a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12ZM132,208a4,4,0,0,1-4,4H88a4,4,0,0,1,0-8h40A4,4,0,0,1,132,208Zm80-96a4,4,0,0,1-4,4H192a4,4,0,0,1,0-8h16A4,4,0,0,1,212,112Z"/>'),lj=Al("devices","0 0 256 256",'<path d="M224,74H206V64a22,22,0,0,0-22-22H40A22,22,0,0,0,18,64v96a22,22,0,0,0,22,22H154v10a22,22,0,0,0,22,22h48a22,22,0,0,0,22-22V96A22,22,0,0,0,224,74ZM40,170a10,10,0,0,1-10-10V64A10,10,0,0,1,40,54H184a10,10,0,0,1,10,10V74H176a22,22,0,0,0-22,22v74Zm194,22a10,10,0,0,1-10,10H176a10,10,0,0,1-10-10V96a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10ZM134,208a6,6,0,0,1-6,6H88a6,6,0,0,1,0-12h40A6,6,0,0,1,134,208Zm80-96a6,6,0,0,1-6,6H192a6,6,0,0,1,0-12h16A6,6,0,0,1,214,112Z"/>'),k_=Al("devices","0 0 256 256",'<path d="M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72ZM40,168a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8v8H176a24,24,0,0,0-24,24v72Zm192,24a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"/>'),oj=Al("devices","0 0 256 256",'<path d="M224,72H212V64a28,28,0,0,0-28-28H40A28,28,0,0,0,12,64v88a28,28,0,0,0,28,28h96v12a28,28,0,0,0,28,28h60a28,28,0,0,0,28-28V100A28,28,0,0,0,224,72ZM40,156a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H184a4,4,0,0,1,4,4v8H164a28,28,0,0,0-28,28v56Zm188,36a4,4,0,0,1-4,4H164a4,4,0,0,1-4-4V100a4,4,0,0,1,4-4h60a4,4,0,0,1,4,4ZM124,208a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h24A12,12,0,0,1,124,208Zm88-84a12,12,0,0,1-12,12H188a12,12,0,0,1,0-24h12A12,12,0,0,1,212,124Z"/>'),uj=Al("devices","0 0 256 256",'<path d="M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72Zm8,120a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"/>'),cj=Al("devices","0 0 256 256",'<path d="M200,64V80H176a16,16,0,0,0-16,16v80H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H184A16,16,0,0,1,200,64Z" opacity="0.2"/><path d="M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72ZM40,168a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8v8H176a24,24,0,0,0-24,24v72Zm192,24a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"/>'),dj="devices",xy=Object.freeze(Object.defineProperty({__proto__:null,bold:oj,default:k_,duotone:cj,fill:uj,glyphName:dj,light:lj,regular:k_,thin:sj},Symbol.toStringTag,{value:"Module"})),hj={class:"devices-view"},fj={class:"list-count type-body-sm tabular"},pj={class:"device-name"},_j=["aria-label","title"],mj={class:"device-summary"},vj={key:0,class:"summary-primary type-heading-02 tabular"},gj={class:"summary-primary type-heading-02 tabular"},bj={key:0,class:"type-body-sm tabular"},yj={key:2,class:"summary-primary type-heading-02 tabular"},wj={class:"device-name"},Sj=["aria-label","title"],Cj={key:0,class:"device-summary"},kj={class:"summary-primary type-heading-02 tabular"},Aj=["title"],$j={key:1},Mj={class:"tabular"},A_="openbridge.devices.view",Lj=Ne({__name:"DevicesView",setup(e){const t=ys("topbar-right"),{phone:i}=ln(),n=Tr(),r=dl(),a=C2(),s=al();function l(Z){var re;return((re=Z.health)==null?void 0:re.status)==="stale"}function o(Z){return Z<90?`${Math.round(Z)} seconds`:Z<5400?`${Math.round(Z/60)} minutes`:Z<172800?`${Math.round(Z/3600)} hours`:`${Math.round(Z/86400)} days`}function u(Z){const re=Z.health;if(!re||re.status!=="stale")return"";const b=["Not responding"];return re.silentForSeconds!==null?b.push(`Silent for ${o(re.silentForSeconds)}.`):re.lastSeen&&b.push(`Last seen ${new Date(re.lastSeen).toLocaleString()}.`),re.reason&&b.push(re.reason),b.push("OpenBridge is running: the device itself is not answering. Check it is powered and reachable at its configured address.","Click to open it for its address, readings and recent events."),b.join(`
|
|
69
|
+
`)}const c=["Not responding","HomeKit reports this accessory as unreachable. Check it is powered and on the network.","Click to open it for its services and characteristics."].join(`
|
|
70
|
+
`);function d(Z){const[re,...b]=Z.split(`
|
|
71
|
+
`);return{header:re,body:b.join(" "),touch:!1}}function h(Z){var b;const re=(b=Z.health)==null?void 0:b.status;return re==="ok"?"online":re==="stale"?"stale":"offline"}function f(Z){var b;const re=(b=Z.health)==null?void 0:b.status;return re==="ok"?"Responding":re==="stale"?"Not responding":"No data yet"}function _(Z){s.push({name:"device-detail",params:{id:Z.id}})}const m=ma(),g=X(!1),v=X([]),w=X(localStorage.getItem(A_)==="table"?"table":"cards"),S=H(()=>w.value==="cards"?"Show as table":"Show as cards");function y(){w.value=w.value==="cards"?"table":"cards",localStorage.setItem(A_,w.value)}const A=X({key:"name",direction:"asc"}),L=[{key:"name",header:"Device",sortable:!0,primary:!0},{key:"type",header:"Type",sortable:!0,width:160,phoneMeta:!0},{key:"source",header:"Source",sortable:!0,width:120,phoneMeta:!0},{key:"state",header:"State",sortable:!0,width:120},{key:"detail",header:"Reading",sortable:!0,width:160}],k=H(()=>{const Z=[...v.value.map(C=>({key:"native:"+C.id,name:C.name,type:q(T(C)),source:"Native",state:C.telemetry.active===void 0?"":C.telemetry.active?"On":"Off",stateOn:!!C.telemetry.active,detail:V(C),icon:ae(T(C)),unhealthy:l(C),healthTooltip:u(C),select:()=>N(C)})),...n.accessories.map(C=>{const B=ve(C);return{key:"hap:"+C.uuid,name:C.displayName,type:R(C.category).label,source:"HomeKit",state:C.reachable?B?B.value?"On":"Off":"":"Not responding",stateOn:C.reachable&&!!(B!=null&&B.value),detail:ce(C)??"",icon:R(C.category).icon,unhealthy:!C.reachable,healthTooltip:C.reachable?"":c,select:()=>x(C)}})],re=A.value;if(!re||re.direction==="none")return Z;const b=re.direction==="asc"?1:-1;return[...Z].sort((C,B)=>b*String(C[re.key]??"").localeCompare(String(B[re.key]??"")))});function V(Z){const re=Z.telemetry;return Z.widgetType==="energy_meter"&&re.power!==void 0?`${ue(re.power,1)} W`:Z.widgetType==="thermostat"&&re.currentTemperature!==void 0?`${ue(re.currentTemperature,1)}°C`:Z.widgetType==="dehumidifier"&&re.currentHumidity!==void 0?`${ue(re.currentHumidity,0)}%`:re.power!==void 0?`${ue(re.power,1)} W`:""}function T(Z){return Z.homekitType||Z.widgetType}const J=H(()=>r.mode!=="device"||!r.selectedDevice?null:r.selectedDevice.kind==="native"?r.selectedDevice.dev.id:r.selectedDevice.acc.uuid);function x(Z){J.value===Z.uuid?r.close():r.openDevice({kind:"hap",acc:Z})}function N(Z){J.value===Z.id?r.close():r.openDevice({kind:"native",dev:Z})}const O={1:{label:"Other",icon:"cube"},2:{label:"Bridge",icon:"intersect"},3:{label:"Fan",icon:"fan"},4:{label:"Garage Door",icon:"garage"},5:{label:"Light",icon:"lightbulb"},6:{label:"Lock",icon:"lock"},7:{label:"Outlet",icon:"plugs"},8:{label:"Switch",icon:"toggle-right"},9:{label:"Thermostat",icon:"thermometer"},10:{label:"Sensor",icon:"pulse"},11:{label:"Security",icon:"shield"},12:{label:"Door",icon:"door"},13:{label:"Window",icon:"app-window"},14:{label:"Window Covering",icon:"rows"},15:{label:"Programm. Switch",icon:"sliders"},16:{label:"Range Extender",icon:"broadcast"},17:{label:"Camera",icon:"camera"},18:{label:"Video Doorbell",icon:"bell"},19:{label:"Air Purifier",icon:"wind"},20:{label:"Heater/Cooler",icon:"thermometer-hot"},21:{label:"Air Conditioner",icon:"snowflake"},22:{label:"Humidifier",icon:"drop"},23:{label:"Dehumidifier",icon:"drop"},26:{label:"Speaker",icon:"speaker-high"},28:{label:"Sprinkler",icon:"drop"},29:{label:"Faucet",icon:"drop"},30:{label:"Shower",icon:"drop"},32:{label:"TV",icon:"television"},34:{label:"Router",icon:"broadcast"},36:{label:"Target Control",icon:"game-controller"},38:{label:"Smart Speaker",icon:"speaker-hifi"}};function R(Z){return O[Z]??{label:`Category ${Z}`,icon:"cube"}}const j={switch:"plugs",light:"lightbulb",thermostat:"thermometer",dehumidifier:"drop",energy_meter:"lightning",gate:"garage",sensor:"pulse",camera:"camera"},G={camera:"Camera",switch:"Switch",light:"Light",thermostat:"Thermostat",dehumidifier:"Dehumidifier",energy_meter:"Energy Meter",gate:"Gate",sensor:"Sensor"};function ae(Z){return j[Z]??"cube"}function q(Z){return G[Z]??Z}const se=new Set(["AccessoryInformation","0000003E-0000-1000-8000-0026BB765291","ProtocolInformation","000000A2-0000-1000-8000-0026BB765291"]),me=new Set(["On","Active","LockTargetState","TargetDoorState"]);function U(Z){return Z.services.find(re=>!se.has(re.name)&&!se.has(re.uuid))}function ve(Z){const re=U(Z);return re?re.characteristics.find(b=>me.has(b.name)&&b.perms.includes("pw"))??null:null}function ce(Z){if(!Z.reachable)return"Not responding";const re=U(Z);if(!re)return null;for(const C of re.characteristics){if(C.name==="CurrentTemperature"&&C.value!=null)return`${Number(C.value).toFixed(1)}°C`;if(C.name==="CurrentRelativeHumidity"&&C.value!=null)return`${Math.round(Number(C.value))}%`;if(C.name==="CurrentPosition"&&C.value!=null)return`${Math.round(Number(C.value))}%`;if(C.name==="Brightness"&&C.value!=null)return`${Math.round(Number(C.value))}%`}const b=re.characteristics.find(C=>C.name==="On");return b?b.value?"On":"Off":null}async function ge(Z,re){const b=U(Z),C=ve(Z);if(!(!b||!C))try{await ze.setCharacteristic(Z.uuid,b.uuid,C.uuid,re?1:0),await n.fetchAccessories()}catch(B){console.error("HAP control failed",B)}}function ue(Z,re=1){if(Z==null)return"—";const b=Number(Z);return isFinite(b)?b.toFixed(re):String(Z)}const pe=H(()=>n.accessories.length+v.value.length);function W(Z){const re=Z.telemetry;return re.active!==void 0||Z.widgetType==="thermostat"&&re.targetTemperature!==void 0||Z.widgetType==="dehumidifier"&&re.targetHumidity!==void 0}async function he(){var Z;try{const re=await ze.devices();if(v.value=re.devices,r.mode==="device"&&((Z=r.selectedDevice)==null?void 0:Z.kind)==="native"){const b=r.selectedDevice.dev.id,C=re.devices.find(B=>B.id===b);C&&r.updateDevice({kind:"native",dev:C})}}catch{}}async function te(){g.value=!0,await Promise.all([n.fetchAccessories(),he()]),g.value=!1}let be=null;function E(Z,re,b){return Z.widgetType==="energy_meter"&&re==="active"?b?{title:"Turn on circuit",message:"This will energise the connected circuit.",confirmLabel:"Turn on",tone:"neutral"}:{title:"Turn off circuit",message:"This will cut power to the connected circuit.",confirmLabel:"Turn off",tone:"danger"}:!1}async function F(Z,re,b){try{await ze.controlDevice(Z,re,b),await he()}catch(C){console.error("Control failed",C)}}async function ie(Z,re,b){const C=E(Z,re,b);C&&!await a({...C,subjectLabel:"Device",subject:Z.name})||F(Z.id,re,b)}async function fe(){var Z;if(await Promise.all([n.fetchAccessories(),he()]),r.mode==="device"&&((Z=r.selectedDevice)==null?void 0:Z.kind)==="hap"){const re=r.selectedDevice.acc.uuid,b=n.accessories.find(C=>C.uuid===re);b&&r.updateDevice({kind:"hap",acc:b})}}m.setPage("Devices");const ne={one:"{count} device",other:"{count} devices"};return et(async()=>{await fe(),be=setInterval(fe,3e3)}),Hi(()=>{be&&clearInterval(be)}),(Z,re)=>{const b=kt,C=u0,B=Ke,de=Er,z=Wc,Q=y2,D=N4,oe=i2,ye=_2,xe=Ln("nb-tooltip");return p(),$("div",hj,[(p(),le(mi(Y(t).Outlet),null,{default:I(()=>[ut(ee(b,{variant:"ghost",size:"sm",icon:w.value===Y(Ey)?Y(uc):Y(cc),"aria-label":S.value,onClick:y},null,8,["icon","aria-label"]),[[xe,{body:S.value}]]),ut(ee(b,{variant:"ghost",size:"sm",icon:Y(Qr),"aria-label":"Refresh devices",loading:g.value,onClick:te},null,8,["icon","loading"]),[[xe,{body:"Refresh devices"}]])]),_:1})),pe.value===0?(p(),le(C,{key:0,icon:xy,bordered:"",title:"No devices registered yet",description:"Devices appear here once a platform plugin registers accessories. This page refreshes every 3 seconds, and discovery can take up to 60 seconds."})):(p(),$("div",{key:1,class:"devices-layout",onClick:re[8]||(re[8]=Qe(we=>Y(r).close(),["self"]))},[M("p",fj,K(Y(ds)(pe.value,ne)),1),w.value==="cards"?(p(),le(oe,{key:0,min:"200px",gap:"md",onClick:re[5]||(re[5]=Qe(we=>Y(r).close(),["self"]))},{default:I(()=>[(p(!0),$($e,null,Ue(v.value,we=>ut((p(),le(D,{key:"native:"+we.id,flat:"",clickable:"",orientation:Y(i)?"horizontal":"vertical",class:Te(["device-card",{unhealthy:l(we)}]),icon:ae(T(we)),description:q(T(we)),selected:J.value===we.id,onSelect:Re=>N(we),onDblclick:Re=>_(we)},tr({title:I(()=>[M("span",pj,[l(we)?(p(),le(B,{key:0,name:Y(cs),size:"sm",class:"name-health-icon"},null,8,["name"])):P("",!0),M("span",null,K(we.name),1)])]),meta:I(()=>{var Re;return[M("span",{class:Te(["device-reachability",h(we)]),role:"img","aria-label":f(we),title:((Re=we.health)==null?void 0:Re.reason)??f(we)},null,10,_j)]}),default:I(()=>[M("div",mj,[we.widgetType==="energy_meter"&&we.telemetry.power!==void 0?(p(),$("span",vj,K(ue(we.telemetry.power,1))+" W",1)):we.widgetType==="thermostat"&&we.telemetry.currentTemperature!==void 0?(p(),$($e,{key:1},[M("span",gj,K(ue(we.telemetry.currentTemperature,1))+"°C ",1),we.telemetry.targetTemperature!==void 0?(p(),$("span",bj," target "+K(ue(we.telemetry.targetTemperature,1))+"°C ",1)):P("",!0)],64)):we.widgetType==="dehumidifier"&&we.telemetry.currentHumidity!==void 0?(p(),$("span",yj,K(ue(we.telemetry.currentHumidity,0))+"% ",1)):we.telemetry.active!==void 0?(p(),le(de,{key:3,size:"sm",variant:we.telemetry.active?"success":"neutral"},{default:I(()=>[_e(K(we.telemetry.active?"On":"Off"),1)]),_:2},1032,["variant"])):P("",!0)])]),_:2},[W(we)?{name:"footer",fn:I(()=>[M("div",{class:"card-controls",onClick:re[0]||(re[0]=Qe(()=>{},["stop"])),onKeydown:re[1]||(re[1]=Qe(()=>{},["stop"])),onDblclick:re[2]||(re[2]=Qe(()=>{},["stop"]))},[we.telemetry.active!==void 0?(p(),le(z,{key:0,name:`device-active-${we.id}`,"model-value":!!we.telemetry.active,label:we.name,"hide-label":"","onUpdate:modelValue":Re=>ie(we,"active",Re)},null,8,["name","model-value","label","onUpdate:modelValue"])):P("",!0),we.widgetType==="thermostat"&&we.telemetry.targetTemperature!==void 0?(p(),le(Q,{key:1,"model-value":Number(we.telemetry.targetTemperature),size:"xs",min:5,max:35,step:1,"onUpdate:modelValue":Re=>Re!==null&&F(we.id,"targetTemperature",Re)},null,8,["model-value","onUpdate:modelValue"])):P("",!0),we.widgetType==="dehumidifier"&&we.telemetry.targetHumidity!==void 0?(p(),le(Q,{key:2,"model-value":Number(we.telemetry.targetHumidity),size:"xs",min:30,max:80,step:5,"onUpdate:modelValue":Re=>Re!==null&&F(we.id,"targetHumidity",Re)},null,8,["model-value","onUpdate:modelValue"])):P("",!0)],32)]),key:"0"}:void 0]),1032,["orientation","class","icon","description","selected","onSelect","onDblclick"])),[[xe,l(we)?d(u(we)):{}]])),128)),(p(!0),$($e,null,Ue(Y(n).accessories,we=>ut((p(),le(D,{key:we.uuid,flat:"",clickable:"",orientation:Y(i)?"horizontal":"vertical",class:Te(["device-card",{unhealthy:!we.reachable}]),icon:R(we.category).icon,description:`${R(we.category).label} · HomeKit`,selected:J.value===we.uuid,onSelect:Re=>x(we)},tr({title:I(()=>[M("span",wj,[we.reachable?P("",!0):(p(),le(B,{key:0,name:Y(cs),size:"sm",class:"name-health-icon"},null,8,["name"])),M("span",null,K(we.displayName),1)])]),meta:I(()=>[M("span",{class:Te(["device-reachability",we.reachable?"online":"stale"]),role:"img","aria-label":we.reachable?"Responding":"Not responding",title:we.reachable?"Responding":Y(c)},null,10,Sj)]),default:I(()=>[ce(we)?(p(),$("div",Cj,[M("span",kj,K(ce(we)),1)])):P("",!0)]),_:2},[ve(we)?{name:"footer",fn:I(()=>{var Re;return[M("div",{class:"card-controls",onClick:re[3]||(re[3]=Qe(()=>{},["stop"])),onKeydown:re[4]||(re[4]=Qe(()=>{},["stop"]))},[ee(z,{name:`hap-on-${we.uuid}`,"model-value":!!((Re=ve(we))!=null&&Re.value),label:we.displayName,"hide-label":"","onUpdate:modelValue":Ge=>ge(we,!!Ge)},null,8,["name","model-value","label","onUpdate:modelValue"])],32)]}),key:"0"}:void 0]),1032,["orientation","class","icon","description","selected","onSelect"])),[[xe,we.reachable?{}:d(Y(c))]])),128))]),_:1})):(p(),le(ye,{key:1,columns:L,rows:k.value,"row-key":"key",size:"sm",zebra:"","stack-on-phone":"","sort-state":A.value,onSort:re[6]||(re[6]=we=>A.value=we),onRowClick:re[7]||(re[7]=we=>we.select())},{"cell-name":I(({row:we})=>[M("div",{class:"cell-name",title:we.healthTooltip||void 0},[ee(B,{name:we.icon,size:"sm"},null,8,["name"]),M("span",null,K(we.name),1),we.unhealthy?(p(),le(B,{key:0,name:Y(cs),size:"sm",class:"cell-health-icon"},null,8,["name"])):P("",!0)],8,Aj)]),"cell-state":I(({row:we})=>[we.state?(p(),le(de,{key:0,variant:we.unhealthy?"warning":we.stateOn?"success":"neutral"},{default:I(()=>[_e(K(we.state),1)]),_:2},1032,["variant"])):(p(),$("span",$j,"—"))]),"cell-detail":I(({row:we})=>[M("span",Mj,K(we.detail),1)]),_:1},8,["rows","sort-state"]))]))])}}}),Ej=jt(Lj,[["__scopeId","data-v-1c7877c5"]]),xj={class:"device-detail"},Tj={class:"summary-row"},Hj={key:1,class:"chart-empty type-body-compact"},Nj={key:2,class:"chart-empty type-body-compact"},Pj={key:3,class:"detail-loading type-body-compact"},Oj=Ne({__name:"DeviceDetailView",setup(e){const t=sl(),{phone:i}=ln(),n=ma(),r=H(()=>String(t.params.id??"")),a=X(null),s=X([]),l=X(""),o=X(!1),u=X(""),c=X(0),d=X([]),h=[{key:"1h",label:"1 hour",seconds:3600},{key:"24h",label:"24 hours",seconds:86400},{key:"7d",label:"7 days",seconds:7*86400},{key:"30d",label:"30 days",seconds:30*86400},{key:"1y",label:"1 year",seconds:365*86400}],f=h.map(G=>({id:G.key,label:G.label})),_=X("24h"),m=H(()=>{var G;return[{label:"Devices",to:{name:"devices"}},{label:((G=a.value)==null?void 0:G.name)??r.value}]});v3(()=>{var G;return n.setPage(((G=a.value)==null?void 0:G.name)??r.value,{crumbs:m.value})});const g=H(()=>s.value.find(G=>G.key===l.value)??null);function v(G){const ae=new Date(G*1e3);return i.value?_.value==="1h"||_.value==="24h"?ae.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):ae.toLocaleDateString(void 0,{month:"short",day:"numeric"}):ae}const w=H(()=>{const G=g.value;if(!G||d.value.length===0)return[];const ae={name:G.label,data:d.value.map(se=>({x:v(se.t),y:se.value??0}))};return d.value.some(se=>se.min!==void 0&&se.min!==null&&se.min!==se.value)?[ae,{name:"Min",data:d.value.map(se=>({x:v(se.t),y:se.min??se.value??0}))},{name:"Max",data:d.value.map(se=>({x:v(se.t),y:se.max??se.value??0}))}]:[ae]}),S=H(()=>{if(!c.value)return"";const G=c.value;return G<60?`${G}s resolution`:G<3600?`${Math.round(G/60)} min resolution`:`${Math.round(G/3600)} h resolution`});function y(G){var se,me;const ae=(me=(se=a.value)==null?void 0:se.telemetry)==null?void 0:me[G.key],q=Number(ae);return Number.isFinite(q)?q:null}function A(G,ae){return G===null?"—":G.toFixed(ae.precision??2)}function L(G){const ae=A(y(G),G);return G.unit?`${ae} ${G.unit}`:ae}const k=H(()=>{var ae,q;const G=(q=(ae=a.value)==null?void 0:ae.health)==null?void 0:q.status;return G==="ok"?"Responding":G==="stale"?"Not responding":"No data yet"}),V=H(()=>{var ae,q;const G=(q=(ae=a.value)==null?void 0:ae.health)==null?void 0:q.status;return G==="ok"?"success":G==="stale"?"warning":"neutral"}),T=H(()=>{var se;const G=a.value;if(!G)return[];const ae=[];G.manufacturer&&ae.push({term:"Manufacturer",value:G.manufacturer}),G.model&&ae.push({term:"Model",value:G.model}),ae.push({term:"Plugin",value:G.pluginId});const q=(se=G.health)==null?void 0:se.lastSeen;return q&&ae.push({term:"Last seen",value:new Date(q).toLocaleString()}),ae});function J(G){l.value!==G&&(l.value=G,O())}function x(G){_.value!==G&&(_.value=G,O())}async function N(){try{const{devices:G}=await ze.devices(),ae=G.find(q=>q.id===r.value);if(!ae){u.value=`Device "${r.value}" was not found. It may have been removed, or its plugin stopped.`;return}a.value=ae,s.value=ae.metrics??[],!l.value&&s.value.length>0&&(l.value=s.value[0].key)}catch(G){u.value=`Could not load device: ${G.message}`}}async function O(){var se,me;if(!l.value)return;const G=h.find(U=>U.key===_.value),ae=Math.floor(Date.now()/1e3),q=ae-G.seconds;o.value=!0;try{const U=await ze.deviceMetrics(r.value,{metric:l.value,from:q,to:ae});d.value=((se=U.series)==null?void 0:se.points)??[],c.value=((me=U.series)==null?void 0:me.resolution)??0}catch(U){u.value=`Could not load history: ${U.message}`}finally{o.value=!1}}let R=null,j=null;return et(async()=>{await N(),await O(),R=setInterval(()=>void N(),5e3),j=setInterval(()=>void O(),3e4)}),Tt(()=>{R&&clearInterval(R),j&&clearInterval(j)}),Pe(r,async()=>{a.value=null,s.value=[],l.value="",d.value=[],u.value="",await N(),await O()}),(G,ae)=>{var pe;const q=Er,se=n2,me=N$,U=_t,ve=Hb,ce=Yc,ge=DN,ue=Fc;return p(),$("div",xj,[a.value?(p(),le(me,{key:0,title:a.value.name,sticky:""},tr({status:I(()=>[ee(q,{variant:V.value},{default:I(()=>[_e(K(k.value),1)]),_:1},8,["variant"])]),_:2},[T.value.length>0?{name:"facts",fn:I(()=>[ee(se,{layout:"auto",compact:"","term-width":"8rem",items:T.value},null,8,["items"])]),key:"0"}:void 0]),1032,["title"])):P("",!0),u.value?(p(),le(U,{key:1,variant:"error"},{default:I(()=>[_e(K(u.value),1)]),_:1})):a.value?(p(),$($e,{key:2},[s.value.length===0?(p(),le(U,{key:0,variant:"helper"},{default:I(()=>[...ae[1]||(ae[1]=[_e(" This device does not declare any metrics, so there is nothing to chart. Plugins opt in by describing their series in the device descriptor. ",-1)])]),_:1})):(p(),$($e,{key:1},[M("div",Tj,[(p(!0),$($e,null,Ue(s.value,W=>(p(),le(ve,{key:W.key,size:"sm",clickable:"",selected:W.key===l.value,label:W.label,value:L(W),onSelect:he=>J(W.key)},null,8,["selected","label","value","onSelect"]))),128))]),ee(ue,{title:(pe=g.value)==null?void 0:pe.label,description:S.value||void 0,class:"chart-panel"},{default:I(()=>[ee(ce,{class:"range-tabs",items:Y(f),"model-value":_.value,variant:"contained",size:"sm","aria-label":"History range","onUpdate:modelValue":ae[0]||(ae[0]=W=>x(W))},null,8,["items","model-value"]),w.value.length>0&&w.value[0].data.length>0?(p(),le(ge,{key:0,series:w.value,height:Y(i)?220:320,"show-legend":w.value.length>1,"show-grid":!0,"show-tooltip":!0,points:!1,curve:"smooth"},null,8,["series","height","show-legend"])):o.value?(p(),$("div",Hj,"Loading…")):(p(),$("div",Nj," No data recorded yet for this range. History starts accumulating once the device reports. "))]),_:1},8,["title","description"])],64))],64)):(p(),$("div",Pj,"Loading…"))])}}}),Ij=jt(Oj,[["__scopeId","data-v-7240323f"]]),$l=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},Rj=$l("magic-wand","0 0 256 256",'<path d="M244,152a4,4,0,0,1-4,4H220v20a4,4,0,0,1-8,0V156H192a4,4,0,0,1,0-8h20V128a4,4,0,0,1,8,0v20h20A4,4,0,0,1,244,152ZM56,68H76V88a4,4,0,0,0,8,0V68h20a4,4,0,0,0,0-8H84V40a4,4,0,0,0-8,0V60H56a4,4,0,0,0,0,8ZM184,196H172V184a4,4,0,0,0-8,0v12H152a4,4,0,0,0,0,8h12v12a4,4,0,0,0,8,0V204h12a4,4,0,0,0,0-8ZM216.48,77.17,77.17,216.49a12,12,0,0,1-17,0L39.51,195.8a12,12,0,0,1,0-17L178.83,39.51a12,12,0,0,1,17,0L216.48,60.2A12,12,0,0,1,216.48,77.17ZM170.34,112,144,85.66,45.17,184.49a4,4,0,0,0,0,5.65l20.68,20.69a4,4,0,0,0,5.66,0Zm40.49-46.14L190.14,45.17a4,4,0,0,0-5.66,0L149.65,80,176,106.34l34.83-34.83A4,4,0,0,0,210.83,65.86Z"/>'),Dj=$l("magic-wand","0 0 256 256",'<path d="M246,152a6,6,0,0,1-6,6H222v18a6,6,0,0,1-12,0V158H192a6,6,0,0,1,0-12h18V128a6,6,0,0,1,12,0v18h18A6,6,0,0,1,246,152ZM56,70H74V88a6,6,0,0,0,12,0V70h18a6,6,0,0,0,0-12H86V40a6,6,0,0,0-12,0V58H56a6,6,0,0,0,0,12ZM184,194H174V184a6,6,0,0,0-12,0v10H152a6,6,0,0,0,0,12h10v10a6,6,0,0,0,12,0V206h10a6,6,0,0,0,0-12ZM217.9,78.59,78.58,217.9a14,14,0,0,1-19.8,0L38.09,197.21a14,14,0,0,1,0-19.8L177.41,38.1a14,14,0,0,1,19.8,0L217.9,58.79A14,14,0,0,1,217.9,78.59ZM167.51,112,144,88.49,46.58,185.9a2,2,0,0,0,0,2.83l20.69,20.68a2,2,0,0,0,2.82,0h0Zm41.9-44.73L188.73,46.59a2,2,0,0,0-2.83,0L152.48,80,176,103.52,209.41,70.1A2,2,0,0,0,209.41,67.27Z"/>'),$_=$l("magic-wand","0 0 256 256",'<path d="M48,64a8,8,0,0,1,8-8H72V40a8,8,0,0,1,16,0V56h16a8,8,0,0,1,0,16H88V88a8,8,0,0,1-16,0V72H56A8,8,0,0,1,48,64ZM184,192h-8v-8a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16Zm56-48H224V128a8,8,0,0,0-16,0v16H192a8,8,0,0,0,0,16h16v16a8,8,0,0,0,16,0V160h16a8,8,0,0,0,0-16ZM219.31,80,80,219.31a16,16,0,0,1-22.62,0L36.68,198.63a16,16,0,0,1,0-22.63L176,36.69a16,16,0,0,1,22.63,0l20.68,20.68A16,16,0,0,1,219.31,80Zm-54.63,32L144,91.31l-96,96L68.68,208ZM208,68.69,187.31,48l-32,32L176,100.69Z"/>'),Vj=$l("magic-wand","0 0 256 256",'<path d="M252,152a12,12,0,0,1-12,12H228v12a12,12,0,0,1-24,0V164H192a12,12,0,0,1,0-24h12V128a12,12,0,0,1,24,0v12h12A12,12,0,0,1,252,152ZM56,76H68V88a12,12,0,0,0,24,0V76h12a12,12,0,1,0,0-24H92V40a12,12,0,0,0-24,0V52H56a12,12,0,0,0,0,24ZM184,188h-4v-4a12,12,0,0,0-24,0v4h-4a12,12,0,0,0,0,24h4v4a12,12,0,0,0,24,0v-4h4a12,12,0,0,0,0-24ZM222.14,82.83,82.82,222.14a20,20,0,0,1-28.28,0L33.85,201.46a20,20,0,0,1,0-28.29L173.17,33.86a20,20,0,0,1,28.28,0l20.69,20.68A20,20,0,0,1,222.14,82.83ZM159,112,144,97,53.65,187.31l15,15Zm43.31-43.31-15-15L161,80l15,15Z"/>'),Bj=$l("magic-wand","0 0 256 256",'<path d="M248,152a8,8,0,0,1-8,8H224v16a8,8,0,0,1-16,0V160H192a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,248,152ZM56,72H72V88a8,8,0,0,0,16,0V72h16a8,8,0,0,0,0-16H88V40a8,8,0,0,0-16,0V56H56a8,8,0,0,0,0,16ZM184,192h-8v-8a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM219.31,80,80,219.31a16,16,0,0,1-22.62,0L36.68,198.63a16,16,0,0,1,0-22.63L176,36.69a16,16,0,0,1,22.63,0l20.68,20.68A16,16,0,0,1,219.31,80ZM208,68.69,187.31,48l-32,32L176,100.69Z"/>'),Zj=$l("magic-wand","0 0 256 256",'<path d="M176,112,74.34,213.66a8,8,0,0,1-11.31,0L42.34,193a8,8,0,0,1,0-11.31L144,80Z" opacity="0.2"/><path d="M248,152a8,8,0,0,1-8,8H224v16a8,8,0,0,1-16,0V160H192a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,248,152ZM56,72H72V88a8,8,0,0,0,16,0V72h16a8,8,0,0,0,0-16H88V40a8,8,0,0,0-16,0V56H56a8,8,0,0,0,0,16ZM184,192h-8v-8a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM219.31,80,80,219.31a16,16,0,0,1-22.62,0L36.68,198.63a16,16,0,0,1,0-22.63L176,36.69a16,16,0,0,1,22.63,0l20.68,20.68A16,16,0,0,1,219.31,80Zm-54.63,32L144,91.31l-96,96L68.68,208ZM208,68.69,187.31,48l-32,32L176,100.69Z"/>'),Fj="magic-wand",zj=Object.freeze(Object.defineProperty({__proto__:null,bold:Vj,default:$_,duotone:Zj,fill:Bj,glyphName:Fj,light:Dj,regular:$_,thin:Rj},Symbol.toStringTag,{value:"Module"})),Uj={class:"config-view"},Wj=Ne({__name:"ConfigView",setup(e){const t=ys("topbar-left"),i=ys("topbar-right"),n=ma(),{resolved:r}=jc(),a=X(null),s=An(null),l=X(!1),o=X(!1),u=X(null),c=X(!0),{phone:d}=ln(),h=H(()=>[{id:"format",label:"Format",icon:zj,variant:"ghost",onSelect:m},{id:"save",label:o.value?"Saved!":l.value?"Saving…":"Save",icon:o.value?Yf:IV,variant:"primary",priority:"primary",loading:l.value,onSelect:_}]),f=g=>({minimap:{enabled:!g},wordWrap:g?"on":"off"});et(async()=>{n.setPage("Config",{fullBleed:!0});let g="{}";try{g=(await ze.config.get()).content}catch(w){u.value=`Failed to load config: ${w}`}finally{c.value=!1}const v=await $y.init();v.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:[{uri:"openbridge://config-schema",fileMatch:["*"],schema:{type:"object",properties:{bridge:{type:"object",description:"Bridge configuration",properties:{name:{type:"string",description:"Bridge display name"},port:{type:"number",description:"HTTP API port (default 8582)"},hapPort:{type:"number",description:"HomeKit HAP port (default 51829)"},pincode:{type:"string",description:"HomeKit pairing PIN (format: XXX-XX-XXX)"},username:{type:"string",description:"HAP username (MAC address format)"},logLevel:{type:"string",enum:["debug","info","warn","error"]}}},platforms:{type:"array",description:"Homebridge-compatible platform plugins",items:{type:"object",required:["platform"],properties:{platform:{type:"string",description:"Platform identifier"},plugin:{type:"string",description:"Absolute path to the plugin JS file"},enabled:{type:"boolean",default:!0}},additionalProperties:!0}},plugins:{type:"array",description:"Native OpenBridge plugins",items:{type:"object",required:["name"],properties:{name:{type:"string"},path:{type:"string"},enabled:{type:"boolean",default:!0},config:{type:"object"}}}}}}}]}),a.value&&(Pe(r,w=>v.editor.setTheme(w==="dark"?"vs-dark":"vs")),s.value=v.editor.create(a.value,{value:g,language:"json",theme:r.value==="dark"?"vs-dark":"vs",fontSize:13,fontFamily:'"MesloLGS NF", monospace',...f(d.value),scrollBeyondLastLine:!1,formatOnPaste:!0,formatOnType:!0,tabSize:2,automaticLayout:!0,bracketPairColorization:{enabled:!0},guides:{bracketPairs:!0},lineNumbers:"on",renderLineHighlight:"all",smoothScrolling:!0}),Pe(d,w=>{var S;return(S=s.value)==null?void 0:S.updateOptions(f(w))}))}),Tt(()=>{var g;(g=s.value)==null||g.dispose()});async function _(){var g;if(!l.value){l.value=!0,u.value=null,o.value=!1;try{const v=((g=s.value)==null?void 0:g.getValue())??"";await ze.config.save(v),o.value=!0,setTimeout(()=>{o.value=!1},2500)}catch(v){u.value=String(v)}finally{l.value=!1}}}function m(){var g,v;(v=(g=s.value)==null?void 0:g.getAction("editor.action.formatDocument"))==null||v.run()}return(g,v)=>{const w=Qf,S=xr,y=el;return p(),$("div",Uj,[(p(),le(mi(Y(t).Outlet),null,{default:I(()=>[...v[0]||(v[0]=[M("span",{class:"config-path"},"~/.openbridge/config.json",-1)])]),_:1})),(p(),le(mi(Y(i).Outlet),null,{default:I(()=>[ee(w,{items:h.value,size:"sm",overflow:"phone"},null,8,["items"])]),_:1})),u.value?(p(),le(S,{key:0,status:"error",title:u.value,flush:""},null,8,["title"])):P("",!0),c.value?(p(),le(y,{key:1,size:"lg",label:"Loading config","show-label":"",class:"loading-state"})):(p(),$("div",{key:2,ref_key:"editorContainer",ref:a,class:"editor-container"},null,512))])}}}),jj=jt(Wj,[["__scopeId","data-v-b0620d6c"]]),Kj=Ne({__name:"NewTokenModal",props:{open:{type:Boolean}},emits:["close","created"],setup(e,{emit:t}){const i=e,n=t,r=X(""),a=X("read"),s=X(!1),l=X(""),o=X(),u=X(null);Pe(()=>i.open,h=>{h&&(r.value="",a.value="read",l.value="",o.value=void 0,requestAnimationFrame(()=>{var f;return(f=u.value)==null?void 0:f.focus()}))});function c(){o.value=r.value.trim()?void 0:"Give the token a name you will recognize later"}async function d(){if(c(),!o.value){s.value=!0,l.value="";try{const{token:h}=await ze.access.createToken(r.value.trim(),a.value);n("created",h)}catch(h){l.value=h.message}finally{s.value=!1}}}return(h,f)=>{const _=xr,m=pa,g=Zs,v=bR,w=kt,S=m2;return p(),le(S,{"close-appearance":"button",open:e.open,title:"New token",size:"sm","close-on-overlay":!r.value,onClose:f[3]||(f[3]=y=>n("close"))},{footer:I(()=>[ee(w,{type:"button",variant:"secondary",onClick:f[2]||(f[2]=y=>n("close"))},{default:I(()=>[...f[4]||(f[4]=[_e("Cancel",-1)])]),_:1}),ee(w,{type:"submit",form:"new-token-form",variant:"primary",loading:s.value},{default:I(()=>[...f[5]||(f[5]=[_e("Create token",-1)])]),_:1},8,["loading"])]),default:I(()=>[ee(v,{id:"new-token-form",onSubmit:Qe(d,["prevent"])},{default:I(()=>[l.value?(p(),le(_,{key:0,status:"error",variant:"inline",title:l.value},null,8,["title"])):P("",!0),ee(m,{id:"new-token-name",ref_key:"nameInput",ref:u,modelValue:r.value,"onUpdate:modelValue":f[0]||(f[0]=y=>r.value=y),label:"Name",placeholder:"Claude on my laptop",error:o.value,onBlur:c},null,8,["modelValue","error"]),ee(g,{id:"new-token-access",modelValue:a.value,"onUpdate:modelValue":f[1]||(f[1]=y=>a.value=y),label:"Access",options:[{label:"Read only: devices, history, events and logs",value:"read"},{label:"Read and control: can also operate devices",value:"control"}]},null,8,["modelValue"])]),_:1})]),_:1},8,["open","close-on-overlay"])}}}),qj={class:"agents"},Gj={class:"agents__section","aria-labelledby":"agents-title"},Yj={class:"agents__reveal"},Xj={class:"agents__reveal"},Jj={class:"agents__reveal"},Qj=Ne({__name:"AgentAccessPanel",setup(e){const t=C2(),i=Gc(),n=X(null),r=X(`${location.origin}/mcp`),a=X([]),s=X([]),l=X(!1),o=X(""),u=X(!1),c=X(""),d=L=>`claude mcp add --transport http openbridge ${r.value} --header "Authorization: Bearer ${L}"`,h=L=>L==="control"?"Read and control":"Read only",f=L=>L?new Date(L).toLocaleString():"Never",_=[{key:"name",header:"Name",primary:!0},{key:"access",header:"Access"},{key:"created",header:"Created",phoneMeta:!0},{key:"lastUsed",header:"Last used"}],m=H(()=>a.value.map(L=>({id:L.id,name:L.owner?`${L.name} (${L.owner})`:L.name,access:h(L.access),created:f(L.createdAt),lastUsed:f(L.lastUsedAt)}))),g=[{key:"name",header:"Application",primary:!0},{key:"access",header:"Access"},{key:"connected",header:"Connected",phoneMeta:!0},{key:"lastUsed",header:"Last used"}],v=H(()=>s.value.map(L=>({clientId:L.clientId,name:L.owners.length?`${L.name} (${L.owners.join(", ")})`:L.name,access:h(L.access),connected:f(L.connectedAt),lastUsed:f(L.lastUsedAt)})));async function w(){l.value=!0;try{const L=await ze.access.get();n.value=L.enabled,L.enabled&&(r.value=L.endpoint,a.value=L.tokens,s.value=L.connections),o.value=""}catch(L){o.value=L.message}finally{l.value=!1}}et(w);function S(L){u.value=!1,c.value=L,w()}async function y(L,k){if(await t({title:"Revoke token",subjectLabel:"Token",subject:k,message:"Anything using this token loses access immediately.",confirmLabel:"Revoke"}))try{await ze.access.revokeToken(L),i.success("Token revoked"),await w()}catch(T){i.error(T.message,{title:"Could not revoke"})}}async function A(L,k){if(await t({title:"Disconnect application",subjectLabel:"Application",subject:k,message:"Every sign-in this application holds stops working, including its refresh tokens.",confirmLabel:"Disconnect"}))try{await ze.access.revokeConnection(L),i.success(`${k} disconnected`),await w()}catch(T){i.error(T.message,{title:"Could not disconnect"})}}return(L,k)=>{const V=_t,T=pa,J=Nk,x=L0,N=xr,O=kt,R=u0,j=_2;return p(),$("div",qj,[M("section",Gj,[k[5]||(k[5]=M("header",null,[M("h2",{id:"agents-title",class:"type-heading-02 agents__title"},"AI agents"),M("p",{class:"type-body-sm agents__lede"}," Let Claude and other MCP clients read your devices and their history, and with control access, operate them. ")],-1)),n.value===!1?(p(),le(V,{key:0,variant:"helper",class:"agents__form"},{default:I(()=>[...k[3]||(k[3]=[_e(" The MCP endpoint is off on this bridge. Start OpenBridge with ",-1),M("code",null,"OPENBRIDGE_MCP=on",-1),_e(" in its environment to turn it on, then create a token here. ",-1),M("a",{href:"https://docs.nubisco.io/openbridge/guide/mcp",target:"_blank",rel:"noopener"},"How to turn it on",-1)])]),_:1})):P("",!0),n.value?(p(),$($e,{key:1},[c.value?(p(),le(N,{key:0,status:"info",variant:"inline",title:"Copy this token now. It is not shown again.",dismissible:"",onClose:k[0]||(k[0]=G=>c.value="")},{default:I(()=>[ee(x,{label:"Token",orientation:"stack"},{default:I(({id:G})=>[M("div",Yj,[ee(T,{id:G,"model-value":c.value,readonly:"",class:"agents__mono"},null,8,["id","model-value"]),ee(J,{text:c.value,label:"Copy","copied-label":"Copied"},null,8,["text"])])]),_:1}),ee(x,{label:"Connect Claude Code",orientation:"stack"},{default:I(({id:G})=>[M("div",Xj,[ee(T,{id:G,"model-value":d(c.value),readonly:"",class:"agents__mono"},null,8,["id","model-value"]),ee(J,{text:d(c.value),label:"Copy","copied-label":"Copied"},null,8,["text"])])]),_:1})]),_:1})):P("",!0),ee(x,{label:"MCP endpoint",orientation:"stack",class:"agents__form"},{default:I(({id:G})=>[M("div",Jj,[ee(T,{id:G,"model-value":r.value,readonly:"",class:"agents__mono"},null,8,["id","model-value"]),ee(J,{text:r.value,label:"Copy","copied-label":"Copied"},null,8,["text"])])]),_:1}),ee(V,{variant:"helper",class:"agents__form"},{default:I(()=>[...k[4]||(k[4]=[_e(" Every request needs a token, even when sign-in is off. Create one below and paste it into your client, or add the endpoint as a connector and approve it in your browser. claude.ai and the Claude app connect from the cloud, so their connectors need this bridge on an https address reachable from the internet. ",-1),M("a",{href:"https://docs.nubisco.io/openbridge/guide/mcp",target:"_blank",rel:"noopener"},"How to connect",-1)])]),_:1})],64)):P("",!0),o.value?(p(),le(V,{key:2,variant:"error",class:"agents__form"},{default:I(()=>[_e(K(o.value),1)]),_:1})):P("",!0)]),n.value?(p(),$($e,{key:0},[ee(j,{"stack-on-phone":"",columns:_,rows:m.value,"row-key":"id",size:"sm",title:"Tokens",description:"Each one lets a client such as Claude Code use this bridge, read only or with control.",loading:l.value},{"toolbar-actions":I(()=>[ee(O,{variant:"primary",icon:Y(_0),onClick:k[1]||(k[1]=G=>u.value=!0)},{default:I(()=>[...k[6]||(k[6]=[_e("New token",-1)])]),_:1},8,["icon"])]),"row-actions":I(({row:G})=>[ee(O,{size:"sm",variant:"ghost","aria-label":`Revoke token ${G.name}`,onClick:ae=>y(String(G.id),String(G.name))},{default:I(()=>[...k[7]||(k[7]=[_e(" Revoke ",-1)])]),_:1},8,["aria-label","onClick"])]),empty:I(()=>[ee(R,{size:"sm",title:"No tokens yet",description:"Create one to connect Claude Code or another MCP client."})]),_:1},8,["rows","loading"]),ee(j,{"stack-on-phone":"",columns:g,rows:v.value,"row-key":"clientId",size:"sm",title:"Connected applications",description:"Applications approved through a connector sign-in. Disconnecting one ends every sign-in it holds.",loading:l.value},{"row-actions":I(({row:G})=>[ee(O,{size:"sm",variant:"ghost","aria-label":`Disconnect ${G.name}`,onClick:ae=>A(String(G.clientId),String(G.name))},{default:I(()=>[...k[8]||(k[8]=[_e(" Disconnect ",-1)])]),_:1},8,["aria-label","onClick"])]),empty:I(()=>[ee(R,{size:"sm",title:"Nothing connected",description:"Applications you approve through a connector sign-in appear here."})]),_:1},8,["rows","loading"])],64)):P("",!0),ee(Kj,{open:u.value,onClose:k[2]||(k[2]=G=>u.value=!1),onCreated:S},null,8,["open"])])}}}),eK=jt(Qj,[["__scopeId","data-v-21e5e234"]]),tK={class:"settings"},iK={class:"settings__section","aria-labelledby":"settings-bridge-title"},nK={class:"settings__pin"},rK={class:"settings__actions"},aK={key:0,class:"type-body-sm settings__hint"},sK={key:1,class:"settings__section","aria-labelledby":"settings-updates-title"},lK={class:"settings__update"},oK={class:"settings__versions"},uK={class:"settings__actions"},cK={class:"settings__command"},dK={key:3,class:"settings__actions"},hK={key:3,class:"settings__section","aria-labelledby":"settings-appearance-title"},fK=Ne({__name:"SettingsView",setup(e){const t=ma(),i=hl(),n=sl(),r=al(),a=ys("fixedbar"),s=H(()=>{var me;return!!((me=i.config.value)!=null&&me.enabled&&i.user.value)}),l=jc(),o=H(()=>[{id:"bridge",label:"Bridge"},{id:"updates",label:"Updates"},{id:"agents",label:"AI agents"},...s.value?[]:[{id:"appearance",label:"Appearance"}]]);function u(me){return typeof me=="string"&&o.value.some(U=>U.id===me)?me:"bridge"}const c=X(u(n.query.tab));Pe([()=>n.query.tab,o],([me])=>c.value=u(me)),Pe(c,me=>{n.query.tab!==me&&r.replace({query:{...n.query,tab:me}})});const d=[{label:"Light",value:"light"},{label:"Dark",value:"dark"},{label:"Match my system",value:"system"}],h=[{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warn",label:"Warn"},{value:"error",label:"Error"}],f=X(!1),_=X(!1),m=X(null),g=X(!1),v=X(null),w=X(!1),S=X(!1),y=X(!1),A=X(null),L=X(""),k=X(0),V=X("");let T=null;async function J(){w.value=!0,A.value=null;try{v.value=await ze.updates.check()}catch(me){A.value=String(me)}finally{w.value=!1}}function x(){const me=location.protocol==="https:"?"wss":"ws";T=new WebSocket(`${me}://${location.host}/ws/updates`),T.onmessage=U=>{try{const ve=JSON.parse(U.data);L.value=ve.stage??"",k.value=Math.round((ve.progress??0)*100),V.value=ve.message??"",ve.stage==="restarting"&&N(),ve.stage==="error"&&(A.value=ve.message,S.value=!1)}catch{}},T.onclose=()=>{S.value&&N()}}function N(){let me=0;const U=setInterval(async()=>{me++;try{await ze.health(),clearInterval(U),S.value=!1,L.value="",V.value="",v.value=null,await J()}catch{}me>60&&(clearInterval(U),S.value=!1,A.value="Timed out waiting for restart")},2e3)}async function O(){if(!S.value){S.value=!0,y.value=!1,A.value=null,L.value="downloading",V.value="Starting update...",k.value=0,x();try{await ze.updates.apply(),y.value=!0}catch(me){A.value=me instanceof Error?me.message:String(me),S.value=!1}}}async function R(){if(!S.value){S.value=!0,A.value=null,V.value="Rolling back...";try{await ze.updates.rollback(),N()}catch(me){A.value=me instanceof Error?me.message:String(me),S.value=!1}}}const j=X({name:"OpenBridge",port:8582,hapPort:51829,pincode:"031-45-154",username:"",logLevel:"info"});et(async()=>{t.setPage("Settings");try{const me=await ze.bridge();me&&typeof me=="object"&&(j.value={name:me.name??"OpenBridge",port:me.port??8582,hapPort:me.hapPort??51829,pincode:me.pincode??"031-45-154",username:me.username??"",logLevel:me.logLevel??"info"})}catch{}J()}),Hi(()=>{T&&(T.close(),T=null)});async function G(){if(!f.value){f.value=!0,m.value=null,_.value=!1;try{const me={name:j.value.name,port:Number(j.value.port),hapPort:Number(j.value.hapPort),pincode:j.value.pincode,logLevel:j.value.logLevel};j.value.username&&(me.username=j.value.username),await ze.saveBridge(me),_.value=!0,setTimeout(()=>{_.value=!1},3e3)}catch(me){m.value=String(me)}finally{f.value=!1}}}async function ae(){g.value||f.value||(await G(),!m.value&&await q())}async function q(){if(!g.value){g.value=!0;try{await ze.daemon.restart();let me=0;const U=setInterval(async()=>{me++;try{await ze.health(),clearInterval(U),location.reload()}catch{}me>60&&(clearInterval(U),g.value=!1)},1e3)}catch{g.value=!1}}}function se(){const me=()=>Math.floor(Math.random()*9)+1,U=()=>`${me()}${Math.floor(Math.random()*10)}${Math.floor(Math.random()*10)}`,ve=()=>`${Math.floor(Math.random()*10)}${Math.floor(Math.random()*10)}`;j.value.pincode=`${U()}-${ve()}-${U()}`}return(me,U)=>{var Z,re;const ve=Yc,ce=pa,ge=L0,ue=y2,pe=kt,W=Zs,he=Zi,te=_t,be=Ke,E=k$,F=Er,ie=Ab,fe=U4,ne=Ln("nb-tooltip");return p(),$("div",tK,[(p(),le(mi(Y(a).Outlet),null,{default:I(()=>[ee(ve,{modelValue:c.value,"onUpdate:modelValue":U[0]||(U[0]=b=>c.value=b),items:o.value,"aria-label":"Settings sections",variant:"line"},null,8,["modelValue","items"])]),_:1})),c.value==="bridge"?(p(),le(E,{key:0,"aside-width":"2:1"},{aside:I(()=>[...U[10]||(U[10]=[M("section",{class:"settings__section","aria-labelledby":"settings-pairing-title"},[M("header",null,[M("h2",{id:"settings-pairing-title",class:"type-heading-02 settings__title"},"Pair with HomeKit")]),M("ol",{class:"type-body-md settings__steps"},[M("li",null,[_e(" Open the "),M("strong",null,"Home"),_e(" app on your iPhone or iPad ")]),M("li",null,[_e(" Tap "),M("strong",null,"+"),_e(" → "),M("strong",null,"Add Accessory")]),M("li",null,[_e(" Scan the QR code from the Dashboard, or tap "),M("strong",null,"More options"),_e(" and enter the PIN code manually ")]),M("li",null,"If you change the PIN or username, unpair first from the Home app, then re-pair")])],-1)])]),default:I(()=>[M("section",iK,[U[9]||(U[9]=M("header",null,[M("h2",{id:"settings-bridge-title",class:"type-heading-02 settings__title"},"Bridge"),M("p",{class:"type-body-sm settings__lede"}," HomeKit bridge identity and network settings. They take effect when OpenBridge restarts. ")],-1)),ee(he,{dir:"col",gap:"md",class:"settings__fields"},{default:I(()=>[ee(ge,{label:"Bridge name",hint:"Displayed in the Home app"},{default:I(()=>[ee(ce,{modelValue:j.value.name,"onUpdate:modelValue":U[1]||(U[1]=b=>j.value.name=b),placeholder:"OpenBridge"},null,8,["modelValue"])]),_:1}),ee(ge,{label:"HTTP port",hint:"OpenBridge web UI & API",control:"fit"},{default:I(()=>[ee(ue,{modelValue:j.value.port,"onUpdate:modelValue":U[2]||(U[2]=b=>j.value.port=b),min:1024,max:65535},null,8,["modelValue"])]),_:1}),ee(ge,{label:"HAP port",hint:"HomeKit accessory protocol port",control:"fit"},{default:I(()=>[ee(ue,{modelValue:j.value.hapPort,"onUpdate:modelValue":U[3]||(U[3]=b=>j.value.hapPort=b),min:1024,max:65535},null,8,["modelValue"])]),_:1}),ee(ge,{label:"PIN code",hint:"Format: XXX-XX-XXX, used to pair with HomeKit"},{default:I(()=>[M("div",nK,[ee(ce,{modelValue:j.value.pincode,"onUpdate:modelValue":U[4]||(U[4]=b=>j.value.pincode=b),class:"tabular",placeholder:"031-45-154"},null,8,["modelValue"]),ut(ee(pe,{variant:"ghost",icon:Y(Qr),"aria-label":"Generate random PIN",onClick:se},null,8,["icon"]),[[ne,{body:"Generate random PIN"}]])])]),_:1}),ee(ge,{label:"Bridge MAC",hint:"Leave empty to auto-generate. Change this only if pairing with HomeKit fails."},{default:I(()=>[ee(ce,{modelValue:j.value.username,"onUpdate:modelValue":U[5]||(U[5]=b=>j.value.username=b),class:"settings__mono",placeholder:"AA:BB:CC:DD:EE:FF"},null,8,["modelValue"])]),_:1}),ee(ge,{label:"Log level",control:"fit"},{default:I(()=>[ee(W,{modelValue:j.value.logLevel,"onUpdate:modelValue":U[6]||(U[6]=b=>j.value.logLevel=b),options:h},null,8,["modelValue"])]),_:1})]),_:1}),m.value?(p(),le(te,{key:0,variant:"error"},{default:I(()=>[_e(K(m.value),1)]),_:1})):P("",!0),M("div",rK,[ee(pe,{variant:"primary",loading:f.value,icon:_.value?Y($n):void 0,onClick:G},{default:I(()=>[_e(K(_.value?"Saved":"Save"),1)]),_:1},8,["loading","icon"]),ee(pe,{variant:"tertiary",loading:g.value,icon:Y(Qr),onClick:ae},{default:I(()=>[_e(K(g.value?"Restarting…":"Save & Restart OpenBridge"),1)]),_:1},8,["loading","icon"]),_.value&&!g.value?(p(),$("span",aK,[ee(be,{name:Y(jd),size:"sm"},null,8,["name"]),U[8]||(U[8]=_e(" Restart the daemon for changes to take effect ",-1))])):P("",!0)])])]),_:1})):c.value==="updates"?(p(),$("section",sK,[U[17]||(U[17]=M("header",null,[M("h2",{id:"settings-updates-title",class:"type-heading-02 settings__title"},"Updates"),M("p",{class:"type-body-sm settings__lede"},"OpenBridge daemon and UI.")],-1)),M("div",lK,[M("div",oK,[ee(F,{variant:"neutral"},{default:I(()=>{var b;return[_e("Current: v"+K(((b=v.value)==null?void 0:b.current)??"…"),1)]}),_:1}),v.value&&!w.value?(p(),$($e,{key:0},[v.value.updateAvailable?(p(),le(F,{key:0,variant:"info"},{default:I(()=>[_e("Available: v"+K(v.value.latest),1)]),_:1})):v.value.latest===null?(p(),le(F,{key:1,variant:"warning"},{default:I(()=>[...U[11]||(U[11]=[_e("Unable to check",-1)])]),_:1})):(p(),le(F,{key:2,variant:"success"},{default:I(()=>[...U[12]||(U[12]=[_e("Up to date",-1)])]),_:1}))],64)):P("",!0),w.value?(p(),le(F,{key:1,variant:"neutral"},{default:I(()=>[...U[13]||(U[13]=[_e("Checking…",-1)])]),_:1})):P("",!0)]),M("div",uK,[ee(pe,{variant:"tertiary",loading:w.value,icon:Y(Qr),onClick:J},{default:I(()=>[...U[14]||(U[14]=[_e(" Check ",-1)])]),_:1},8,["loading","icon"]),(Z=v.value)!=null&&Z.updateAvailable&&v.value.updateMethod==="self"?(p(),le(pe,{key:0,variant:"primary",loading:S.value,icon:Y(bh),onClick:O},{default:I(()=>[_e(K(S.value?"Updating…":"Install update"),1)]),_:1},8,["loading","icon"])):P("",!0)])]),S.value&&L.value?(p(),le(ie,{key:0,label:V.value,value:L.value==="downloading"&&k.value>0?k.value:void 0,max:100,status:"active",size:"sm"},null,8,["label","value"])):P("",!0),S.value&&!L.value?(p(),le(te,{key:1,variant:"helper"},{default:I(()=>[...U[15]||(U[15]=[_e(" Starting update... This page will reconnect automatically. ",-1)])]),_:1})):P("",!0),((re=v.value)==null?void 0:re.updateMethod)==="manual"&&v.value.updateAvailable?(p(),le(te,{key:2,variant:"helper"},{default:I(()=>[v.value.pinnedTo?(p(),$($e,{key:0},[_e(" This deployment is pinned to "+K(v.value.pinnedTo)+". To move version: ",1)],64)):v.value.updateBlockedBy?(p(),$($e,{key:1},[_e(" Self-update is not available here ("+K(v.value.updateBlockedBy)+"). To update: ",1)],64)):(p(),$($e,{key:2},[_e("Self-update is not available for this install. To update:")],64)),M("code",cK,K(v.value.updateCommand),1)]),_:1})):P("",!0),A.value?(p(),$("div",dK,[ee(te,{variant:"error"},{default:I(()=>[_e(K(A.value),1)]),_:1}),y.value?(p(),le(pe,{key:0,variant:"tertiary",onClick:R},{default:I(()=>[...U[16]||(U[16]=[_e("Roll back",-1)])]),_:1})):P("",!0)])):P("",!0)])):c.value==="agents"?(p(),le(eK,{key:2})):c.value==="appearance"&&!s.value?(p(),$("section",hK,[U[18]||(U[18]=M("header",null,[M("h2",{id:"settings-appearance-title",class:"type-heading-02 settings__title"},"Appearance"),M("p",{class:"type-body-sm settings__lede"},"Theme for this browser. A change applies as soon as you make it.")],-1)),ee(he,{dir:"col",gap:"md",class:"settings__fields"},{default:I(()=>[ee(ge,{label:"Theme"},{default:I(()=>[ee(fe,{name:"settings-theme",options:d,"model-value":Y(l).theme.value,"onUpdate:modelValue":U[7]||(U[7]=b=>Y(l).setTheme(b))},null,8,["model-value"])]),_:1})]),_:1})])):P("",!0)])}}}),pK=jt(fK,[["__scopeId","data-v-3b2612d9"]]);/**
|
|
72
|
+
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
73
|
+
* @license MIT
|
|
74
|
+
*
|
|
75
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
76
|
+
* @license MIT
|
|
77
|
+
*
|
|
78
|
+
* Originally forked from (with the author's permission):
|
|
79
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
80
|
+
* http://bellard.org/jslinux/
|
|
81
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
82
|
+
*/var Ty=Object.defineProperty,_K=Object.getOwnPropertyDescriptor,mK=(e,t)=>{for(var i in t)Ty(e,i,{get:t[i],enumerable:!0})},Kt=(e,t,i,n)=>{for(var r=n>1?void 0:n?_K(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Ty(t,i,r),r},Ve=(e,t)=>(i,n)=>t(i,n,e),M_="Terminal input",Ah={get:()=>M_,set:e=>M_=e},L_="Too much output to announce, navigate to rows manually to read",$h={get:()=>L_,set:e=>L_=e};function vK(e){return e.replace(/\r?\n/g,"\r")}function gK(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function bK(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function yK(e,t,i,n){if(e.stopPropagation(),e.clipboardData){let r=e.clipboardData.getData("text/plain");Hy(r,t,i,n)}}function Hy(e,t,i,n){e=vK(e),e=gK(e,i.decPrivateModes.bracketedPasteMode&&n.rawOptions.ignoreBracketedPasteMode!==!0),i.triggerDataEvent(e,!0),t.value=""}function Ny(e,t,i){let n=i.getBoundingClientRect(),r=e.clientX-n.left-10,a=e.clientY-n.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${r}px`,t.style.top=`${a}px`,t.style.zIndex="1000",t.focus()}function E_(e,t,i,n,r){Ny(e,t,i),r&&n.rightClickSelect(e),t.value=n.selectionText,t.select()}function Kr(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function a1(e,t=0,i=e.length){let n="";for(let r=t;r<i;++r){let a=e[r];a>65535?(a-=65536,n+=String.fromCharCode((a>>10)+55296)+String.fromCharCode(a%1024+56320)):n+=String.fromCharCode(a)}return n}var wK=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let i=e.length;if(!i)return 0;let n=0,r=0;if(this._interim){let a=e.charCodeAt(r++);56320<=a&&a<=57343?t[n++]=(this._interim-55296)*1024+a-56320+65536:(t[n++]=this._interim,t[n++]=a),this._interim=0}for(let a=r;a<i;++a){let s=e.charCodeAt(a);if(55296<=s&&s<=56319){if(++a>=i)return this._interim=s,n;let l=e.charCodeAt(a);56320<=l&&l<=57343?t[n++]=(s-55296)*1024+l-56320+65536:(t[n++]=s,t[n++]=l);continue}s!==65279&&(t[n++]=s)}return n}},SK=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let i=e.length;if(!i)return 0;let n=0,r,a,s,l,o=0,u=0;if(this.interim[0]){let h=!1,f=this.interim[0];f&=(f&224)===192?31:(f&240)===224?15:7;let _=0,m;for(;(m=this.interim[++_]&63)&&_<4;)f<<=6,f|=m;let g=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,v=g-_;for(;u<v;){if(u>=i)return 0;if(m=e[u++],(m&192)!==128){u--,h=!0;break}else this.interim[_++]=m,f<<=6,f|=m&63}h||(g===2?f<128?u--:t[n++]=f:g===3?f<2048||f>=55296&&f<=57343||f===65279||(t[n++]=f):f<65536||f>1114111||(t[n++]=f)),this.interim.fill(0)}let c=i-4,d=u;for(;d<i;){for(;d<c&&!((r=e[d])&128)&&!((a=e[d+1])&128)&&!((s=e[d+2])&128)&&!((l=e[d+3])&128);)t[n++]=r,t[n++]=a,t[n++]=s,t[n++]=l,d+=4;if(r=e[d++],r<128)t[n++]=r;else if((r&224)===192){if(d>=i)return this.interim[0]=r,n;if(a=e[d++],(a&192)!==128){d--;continue}if(o=(r&31)<<6|a&63,o<128){d--;continue}t[n++]=o}else if((r&240)===224){if(d>=i)return this.interim[0]=r,n;if(a=e[d++],(a&192)!==128){d--;continue}if(d>=i)return this.interim[0]=r,this.interim[1]=a,n;if(s=e[d++],(s&192)!==128){d--;continue}if(o=(r&15)<<12|(a&63)<<6|s&63,o<2048||o>=55296&&o<=57343||o===65279)continue;t[n++]=o}else if((r&248)===240){if(d>=i)return this.interim[0]=r,n;if(a=e[d++],(a&192)!==128){d--;continue}if(d>=i)return this.interim[0]=r,this.interim[1]=a,n;if(s=e[d++],(s&192)!==128){d--;continue}if(d>=i)return this.interim[0]=r,this.interim[1]=a,this.interim[2]=s,n;if(l=e[d++],(l&192)!==128){d--;continue}if(o=(r&7)<<18|(a&63)<<12|(s&63)<<6|l&63,o<65536||o>1114111)continue;t[n++]=o}}return n}},Py="",Yr=" ",T0=class Oy{constructor(){this.fg=0,this.bg=0,this.extended=new dc}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new Oy;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},dc=class Iy{constructor(t=0,i=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new Iy(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},vn=class Ry extends T0{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new dc,this.combinedData=""}static fromCharData(t){let i=new Ry;return i.setFromCharData(t),i}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Kr(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let i=!1;if(t[1].length>2)i=!0;else if(t[1].length===2){let n=t[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=t[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|t[2]<<22:i=!0}else i=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;i&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},x_="di$target",Mh="di$dependencies",Q1=new Map;function CK(e){return e[Mh]||[]}function gi(e){if(Q1.has(e))return Q1.get(e);let t=function(i,n,r){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");kK(t,i,r)};return t._id=e,Q1.set(e,t),t}function kK(e,t,i){t[x_]===t?t[Mh].push({id:e,index:i}):(t[Mh]=[{id:e,index:i}],t[x_]=t)}var zi=gi("BufferService"),Dy=gi("CoreMouseService"),ja=gi("CoreService"),AK=gi("CharsetService"),H2=gi("InstantiationService"),Vy=gi("LogService"),Ui=gi("OptionsService"),By=gi("OscLinkService"),$K=gi("UnicodeService"),H0=gi("DecorationService"),Lh=class{constructor(e,t,i){this._bufferService=e,this._optionsService=t,this._oscLinkService=i}provideLinks(e,t){var c;let i=this._bufferService.buffer.lines.get(e-1);if(!i){t(void 0);return}let n=[],r=this._optionsService.rawOptions.linkHandler,a=new vn,s=i.getTrimmedLength(),l=-1,o=-1,u=!1;for(let d=0;d<s;d++)if(!(o===-1&&!i.hasContent(d))){if(i.loadCell(d,a),a.hasExtendedAttrs()&&a.extended.urlId)if(o===-1){o=d,l=a.extended.urlId;continue}else u=a.extended.urlId!==l;else o!==-1&&(u=!0);if(u||o!==-1&&d===s-1){let h=(c=this._oscLinkService.getLinkData(l))==null?void 0:c.uri;if(h){let f={start:{x:o+1,y:e},end:{x:d+(!u&&d===s-1?1:0),y:e}},_=!1;if(!(r!=null&&r.allowNonHttpProtocols))try{let m=new URL(h);["http:","https:"].includes(m.protocol)||(_=!0)}catch{_=!0}_||n.push({text:h,range:f,activate:(m,g)=>r?r.activate(m,g,f):MK(m,g),hover:(m,g)=>{var v;return(v=r==null?void 0:r.hover)==null?void 0:v.call(r,m,g,f)},leave:(m,g)=>{var v;return(v=r==null?void 0:r.leave)==null?void 0:v.call(r,m,g,f)}})}u=!1,a.hasExtendedAttrs()&&a.extended.urlId?(o=d,l=a.extended.urlId):(o=-1,l=-1)}}t(n)}};Lh=Kt([Ve(0,zi),Ve(1,Ui),Ve(2,By)],Lh);function MK(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
83
|
+
|
|
84
|
+
WARNING: This link could potentially be dangerous`)){let i=window.open();if(i){try{i.opener=null}catch{}i.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var s1=gi("CharSizeService"),Hr=gi("CoreBrowserService"),N2=gi("MouseService"),Nr=gi("RenderService"),LK=gi("SelectionService"),Zy=gi("CharacterJoinerService"),Ml=gi("ThemeService"),Fy=gi("LinkProviderService"),EK=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?T_.isErrorNoTelemetry(e)?new T_(e.message+`
|
|
85
|
+
|
|
86
|
+
`+e.stack):new Error(e.message+`
|
|
87
|
+
|
|
88
|
+
`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},xK=new EK;function ku(e){TK(e)||xK.onUnexpectedError(e)}var Eh="Canceled";function TK(e){return e instanceof HK?!0:e instanceof Error&&e.name===Eh&&e.message===Eh}var HK=class extends Error{constructor(){super(Eh),this.name=this.message}};function NK(e){return new Error(`Illegal argument: ${e}`)}var T_=class xh extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof xh)return t;let i=new xh;return i.message=t.message,i.stack=t.stack,i}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},Th=class zy extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,zy.prototype)}};function Yi(e,t=0){return e[e.length-(1+t)]}var PK;(e=>{function t(a){return a<0}e.isLessThan=t;function i(a){return a<=0}e.isLessThanOrEqual=i;function n(a){return a>0}e.isGreaterThan=n;function r(a){return a===0}e.isNeitherLessOrGreaterThan=r,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(PK||(PK={}));function OK(e,t){let i=this,n=!1,r;return function(){return n||(n=!0,t||(r=e.apply(i,arguments))),r}}var Uy;(e=>{function t(y){return y&&typeof y=="object"&&typeof y[Symbol.iterator]=="function"}e.is=t;let i=Object.freeze([]);function n(){return i}e.empty=n;function*r(y){yield y}e.single=r;function a(y){return t(y)?y:r(y)}e.wrap=a;function s(y){return y||i}e.from=s;function*l(y){for(let A=y.length-1;A>=0;A--)yield y[A]}e.reverse=l;function o(y){return!y||y[Symbol.iterator]().next().done===!0}e.isEmpty=o;function u(y){return y[Symbol.iterator]().next().value}e.first=u;function c(y,A){let L=0;for(let k of y)if(A(k,L++))return!0;return!1}e.some=c;function d(y,A){for(let L of y)if(A(L))return L}e.find=d;function*h(y,A){for(let L of y)A(L)&&(yield L)}e.filter=h;function*f(y,A){let L=0;for(let k of y)yield A(k,L++)}e.map=f;function*_(y,A){let L=0;for(let k of y)yield*A(k,L++)}e.flatMap=_;function*m(...y){for(let A of y)yield*A}e.concat=m;function g(y,A,L){let k=L;for(let V of y)k=A(k,V);return k}e.reduce=g;function*v(y,A,L=y.length){for(A<0&&(A+=y.length),L<0?L+=y.length:L>y.length&&(L=y.length);A<L;A++)yield y[A]}e.slice=v;function w(y,A=Number.POSITIVE_INFINITY){let L=[];if(A===0)return[L,y];let k=y[Symbol.iterator]();for(let V=0;V<A;V++){let T=k.next();if(T.done)return[L,e.empty()];L.push(T.value)}return[L,{[Symbol.iterator](){return k}}]}e.consume=w;async function S(y){let A=[];for await(let L of y)A.push(L);return Promise.resolve(A)}e.asyncToArray=S})(Uy||(Uy={}));function za(e){if(Uy.is(e)){let t=[];for(let i of e)if(i)try{i.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function IK(...e){return Rt(()=>za(e))}function Rt(e){return{dispose:OK(()=>{e()})}}var Wy=class jy{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{za(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?jy.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),void 0)}};Wy.DISABLE_DISPOSED_WARNING=!1;var ta=Wy,nt=class{constructor(){this._store=new ta,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};nt.None=Object.freeze({dispose(){}});var Es=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)==null||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)==null||e.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e}},wr=typeof window=="object"?window:globalThis,Hh=class Nh{constructor(t){this.element=t,this.next=Nh.Undefined,this.prev=Nh.Undefined}};Hh.Undefined=new Hh(void 0);var Vt=Hh,H_=class{constructor(){this._first=Vt.Undefined,this._last=Vt.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Vt.Undefined}clear(){let e=this._first;for(;e!==Vt.Undefined;){let t=e.next;e.prev=Vt.Undefined,e.next=Vt.Undefined,e=t}this._first=Vt.Undefined,this._last=Vt.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let i=new Vt(e);if(this._first===Vt.Undefined)this._first=i,this._last=i;else if(t){let r=this._last;this._last=i,i.prev=r,r.next=i}else{let r=this._first;this._first=i,i.next=r,r.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==Vt.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Vt.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Vt.Undefined&&e.next!==Vt.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Vt.Undefined&&e.next===Vt.Undefined?(this._first=Vt.Undefined,this._last=Vt.Undefined):e.next===Vt.Undefined?(this._last=this._last.prev,this._last.next=Vt.Undefined):e.prev===Vt.Undefined&&(this._first=this._first.next,this._first.prev=Vt.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Vt.Undefined;)yield e.element,e=e.next}},RK=globalThis.performance&&typeof globalThis.performance.now=="function",DK=class Ky{static create(t){return new Ky(t)}constructor(t){this._now=RK&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},Si;(e=>{e.None=()=>nt.None;function t(N,O){return d(N,()=>{},0,void 0,!0,void 0,O)}e.defer=t;function i(N){return(O,R=null,j)=>{let G=!1,ae;return ae=N(q=>{if(!G)return ae?ae.dispose():G=!0,O.call(R,q)},null,j),G&&ae.dispose(),ae}}e.once=i;function n(N,O,R){return u((j,G=null,ae)=>N(q=>j.call(G,O(q)),null,ae),R)}e.map=n;function r(N,O,R){return u((j,G=null,ae)=>N(q=>{O(q),j.call(G,q)},null,ae),R)}e.forEach=r;function a(N,O,R){return u((j,G=null,ae)=>N(q=>O(q)&&j.call(G,q),null,ae),R)}e.filter=a;function s(N){return N}e.signal=s;function l(...N){return(O,R=null,j)=>{let G=IK(...N.map(ae=>ae(q=>O.call(R,q))));return c(G,j)}}e.any=l;function o(N,O,R,j){let G=R;return n(N,ae=>(G=O(G,ae),G),j)}e.reduce=o;function u(N,O){let R,j={onWillAddFirstListener(){R=N(G.fire,G)},onDidRemoveLastListener(){R==null||R.dispose()}},G=new Oe(j);return O==null||O.add(G),G.event}function c(N,O){return O instanceof Array?O.push(N):O&&O.add(N),N}function d(N,O,R=100,j=!1,G=!1,ae,q){let se,me,U,ve=0,ce,ge={leakWarningThreshold:ae,onWillAddFirstListener(){se=N(pe=>{ve++,me=O(me,pe),j&&!U&&(ue.fire(me),me=void 0),ce=()=>{let W=me;me=void 0,U=void 0,(!j||ve>1)&&ue.fire(W),ve=0},typeof R=="number"?(clearTimeout(U),U=setTimeout(ce,R)):U===void 0&&(U=0,queueMicrotask(ce))})},onWillRemoveListener(){G&&ve>0&&(ce==null||ce())},onDidRemoveLastListener(){ce=void 0,se.dispose()}},ue=new Oe(ge);return q==null||q.add(ue),ue.event}e.debounce=d;function h(N,O=0,R){return e.debounce(N,(j,G)=>j?(j.push(G),j):[G],O,void 0,!0,void 0,R)}e.accumulate=h;function f(N,O=(j,G)=>j===G,R){let j=!0,G;return a(N,ae=>{let q=j||!O(ae,G);return j=!1,G=ae,q},R)}e.latch=f;function _(N,O,R){return[e.filter(N,O,R),e.filter(N,j=>!O(j),R)]}e.split=_;function m(N,O=!1,R=[],j){let G=R.slice(),ae=N(me=>{G?G.push(me):se.fire(me)});j&&j.add(ae);let q=()=>{G==null||G.forEach(me=>se.fire(me)),G=null},se=new Oe({onWillAddFirstListener(){ae||(ae=N(me=>se.fire(me)),j&&j.add(ae))},onDidAddFirstListener(){G&&(O?setTimeout(q):q())},onDidRemoveLastListener(){ae&&ae.dispose(),ae=null}});return j&&j.add(se),se.event}e.buffer=m;function g(N,O){return(R,j,G)=>{let ae=O(new w);return N(function(q){let se=ae.evaluate(q);se!==v&&R.call(j,se)},void 0,G)}}e.chain=g;let v=Symbol("HaltChainable");class w{constructor(){this.steps=[]}map(O){return this.steps.push(O),this}forEach(O){return this.steps.push(R=>(O(R),R)),this}filter(O){return this.steps.push(R=>O(R)?R:v),this}reduce(O,R){let j=R;return this.steps.push(G=>(j=O(j,G),j)),this}latch(O=(R,j)=>R===j){let R=!0,j;return this.steps.push(G=>{let ae=R||!O(G,j);return R=!1,j=G,ae?G:v}),this}evaluate(O){for(let R of this.steps)if(O=R(O),O===v)break;return O}}function S(N,O,R=j=>j){let j=(...se)=>q.fire(R(...se)),G=()=>N.on(O,j),ae=()=>N.removeListener(O,j),q=new Oe({onWillAddFirstListener:G,onDidRemoveLastListener:ae});return q.event}e.fromNodeEventEmitter=S;function y(N,O,R=j=>j){let j=(...se)=>q.fire(R(...se)),G=()=>N.addEventListener(O,j),ae=()=>N.removeEventListener(O,j),q=new Oe({onWillAddFirstListener:G,onDidRemoveLastListener:ae});return q.event}e.fromDOMEventEmitter=y;function A(N){return new Promise(O=>i(N)(O))}e.toPromise=A;function L(N){let O=new Oe;return N.then(R=>{O.fire(R)},()=>{O.fire(void 0)}).finally(()=>{O.dispose()}),O.event}e.fromPromise=L;function k(N,O){return N(R=>O.fire(R))}e.forward=k;function V(N,O,R){return O(R),N(j=>O(j))}e.runAndSubscribe=V;class T{constructor(O,R){this._observable=O,this._counter=0,this._hasChanged=!1;let j={onWillAddFirstListener:()=>{O.addObserver(this)},onDidRemoveLastListener:()=>{O.removeObserver(this)}};this.emitter=new Oe(j),R&&R.add(this.emitter)}beginUpdate(O){this._counter++}handlePossibleChange(O){}handleChange(O,R){this._hasChanged=!0}endUpdate(O){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function J(N,O){return new T(N,O).emitter.event}e.fromObservable=J;function x(N){return(O,R,j)=>{let G=0,ae=!1,q={beginUpdate(){G++},endUpdate(){G--,G===0&&(N.reportChanges(),ae&&(ae=!1,O.call(R)))},handlePossibleChange(){},handleChange(){ae=!0}};N.addObserver(q),N.reportChanges();let se={dispose(){N.removeObserver(q)}};return j instanceof ta?j.add(se):Array.isArray(j)&&j.push(se),se}}e.fromObservableLight=x})(Si||(Si={}));var Ph=class Oh{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${Oh._idPool++}`,Oh.all.add(this)}start(t){this._stopWatch=new DK,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};Ph.all=new Set,Ph._idPool=0;var VK=Ph,BK=-1,qy=class Gy{constructor(t,i,n=(Gy._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=i,this.name=n,this._warnCountdown=0}dispose(){var t;(t=this._stacks)==null||t.clear()}check(t,i){let n=this.threshold;if(n<=0||i<n)return;this._stacks||(this._stacks=new Map);let r=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,r+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[a,s]=this.getMostFrequentStack(),l=`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${s}):`;console.warn(l),console.warn(a);let o=new zK(l,a);this._errorHandler(o)}return()=>{let a=this._stacks.get(t.value)||0;this._stacks.set(t.value,a-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,i=0;for(let[n,r]of this._stacks)(!t||i<r)&&(t=[n,r],i=r);return t}};qy._idPool=1;var ZK=qy,FK=class Yy{constructor(t){this.value=t}static create(){let t=new Error;return new Yy(t.stack??"")}print(){console.warn(this.value.split(`
|
|
89
|
+
`).slice(2).join(`
|
|
90
|
+
`))}},zK=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},UK=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},WK=0,ed=class{constructor(e){this.value=e,this.id=WK++}},jK=2,KK,Oe=class{constructor(e){var t,i,n,r;this._size=0,this._options=e,this._leakageMon=(t=this._options)!=null&&t.leakWarningThreshold?new ZK((e==null?void 0:e.onListenerError)??ku,((i=this._options)==null?void 0:i.leakWarningThreshold)??BK):void 0,this._perfMon=(n=this._options)!=null&&n._profName?new VK(this._options._profName):void 0,this._deliveryQueue=(r=this._options)==null?void 0:r.deliveryQueue}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)==null?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(i=(t=this._options)==null?void 0:t.onDidRemoveLastListener)==null||i.call(t),(n=this._leakageMon)==null||n.dispose())}get event(){return this._event??(this._event=(e,t,i)=>{var s,l,o,u,c;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let d=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(d);let h=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],f=new UK(`${d}. HINT: Stack shows most frequent listener (${h[1]}-times)`,h[0]);return(((s=this._options)==null?void 0:s.onListenerError)||ku)(f),nt.None}if(this._disposed)return nt.None;t&&(e=e.bind(t));let n=new ed(e),r;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=FK.create(),r=this._leakageMon.check(n.stack,this._size+1)),this._listeners?this._listeners instanceof ed?(this._deliveryQueue??(this._deliveryQueue=new qK),this._listeners=[this._listeners,n]):this._listeners.push(n):((o=(l=this._options)==null?void 0:l.onWillAddFirstListener)==null||o.call(l,this),this._listeners=n,(c=(u=this._options)==null?void 0:u.onDidAddFirstListener)==null||c.call(u,this)),this._size++;let a=Rt(()=>{r==null||r(),this._removeListener(n)});return i instanceof ta?i.add(a):Array.isArray(i)&&i.push(a),a}),this._event}_removeListener(e){var r,a,s,l;if((a=(r=this._options)==null?void 0:r.onWillRemoveListener)==null||a.call(r,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(l=(s=this._options)==null?void 0:s.onDidRemoveLastListener)==null||l.call(s,this),this._size=0;return}let t=this._listeners,i=t.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;let n=this._deliveryQueue.current===this;if(this._size*jK<=t.length){let o=0;for(let u=0;u<t.length;u++)t[u]?t[o++]=t[u]:n&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){var n;if(!e)return;let i=((n=this._options)==null?void 0:n.onListenerError)||ku;if(!i){e.value(t);return}try{e.value(t)}catch(r){i(r)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){var t,i,n,r;if((t=this._deliveryQueue)!=null&&t.current&&(this._deliverQueue(this._deliveryQueue),(i=this._perfMon)==null||i.stop()),(n=this._perfMon)==null||n.start(this._size),this._listeners)if(this._listeners instanceof ed)this._deliver(this._listeners,e);else{let a=this._deliveryQueue;a.enqueue(this,e,this._listeners.length),this._deliverQueue(a)}(r=this._perfMon)==null||r.stop()}hasListeners(){return this._size>0}},qK=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Ih=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new Oe,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new Oe,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,i){if(this.getZoomLevel(i)===t)return;let n=this.getWindowId(i);this.mapWindowIdToZoomLevel.set(n,t),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,i){this.mapWindowIdToZoomFactor.set(this.getWindowId(i),t)}setFullscreen(t,i){if(this.isFullscreen(i)===t)return;let n=this.getWindowId(i);this.mapWindowIdToFullScreen.set(n,t),this._onDidChangeFullscreen.fire(n)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};Ih.INSTANCE=new Ih;var P2=Ih;function GK(e,t,i){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",i)}P2.INSTANCE.onDidChangeZoomLevel;function YK(e){return P2.INSTANCE.getZoomFactor(e)}P2.INSTANCE.onDidChangeFullscreen;var Ll=typeof navigator=="object"?navigator.userAgent:"",Rh=Ll.indexOf("Firefox")>=0,XK=Ll.indexOf("AppleWebKit")>=0,O2=Ll.indexOf("Chrome")>=0,JK=!O2&&Ll.indexOf("Safari")>=0;Ll.indexOf("Electron/")>=0;Ll.indexOf("Android")>=0;var td=!1;if(typeof wr.matchMedia=="function"){let e=wr.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=wr.matchMedia("(display-mode: fullscreen)");td=e.matches,GK(wr,e,({matches:i})=>{td&&t.matches||(td=i)})}var os="en",Dh=!1,Vh=!1,Au=!1,Xy=!1,uu,$u=os,N_=os,QK,yn,Za=globalThis,bi,Xm;typeof Za.vscode<"u"&&typeof Za.vscode.process<"u"?bi=Za.vscode.process:typeof process<"u"&&typeof((Xm=process==null?void 0:process.versions)==null?void 0:Xm.node)=="string"&&(bi=process);var Jm,eq=typeof((Jm=bi==null?void 0:bi.versions)==null?void 0:Jm.electron)=="string",tq=eq&&(bi==null?void 0:bi.type)==="renderer",Qm;if(typeof bi=="object"){Dh=bi.platform==="win32",Vh=bi.platform==="darwin",Au=bi.platform==="linux",Au&&bi.env.SNAP&&bi.env.SNAP_REVISION,bi.env.CI||bi.env.BUILD_ARTIFACTSTAGINGDIRECTORY,uu=os,$u=os;let e=bi.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);uu=t.userLocale,N_=t.osLocale,$u=t.resolvedLanguage||os,QK=(Qm=t.languagePack)==null?void 0:Qm.translationsConfigFile}catch{}Xy=!0}else typeof navigator=="object"&&!tq?(yn=navigator.userAgent,Dh=yn.indexOf("Windows")>=0,Vh=yn.indexOf("Macintosh")>=0,(yn.indexOf("Macintosh")>=0||yn.indexOf("iPad")>=0||yn.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Au=yn.indexOf("Linux")>=0,(yn==null?void 0:yn.indexOf("Mobi"))>=0,$u=globalThis._VSCODE_NLS_LANGUAGE||os,uu=navigator.language.toLowerCase(),N_=uu):console.error("Unable to resolve platform.");var Jy=Dh,Xn=Vh,iq=Au,P_=Xy,nr=yn,Rr=$u,nq;(e=>{function t(){return Rr}e.value=t;function i(){return Rr.length===2?Rr==="en":Rr.length>=3?Rr[0]==="e"&&Rr[1]==="n"&&Rr[2]==="-":!1}e.isDefaultVariant=i;function n(){return Rr==="en"}e.isDefault=n})(nq||(nq={}));var rq=typeof Za.postMessage=="function"&&!Za.importScripts;(()=>{if(rq){let e=[];Za.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n<r;n++){let a=e[n];if(a.id===i.data.vscodeScheduleAsyncWork){e.splice(n,1),a.callback();return}}});let t=0;return i=>{let n=++t;e.push({id:n,callback:i}),Za.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})();var aq=!!(nr&&nr.indexOf("Chrome")>=0);nr&&nr.indexOf("Firefox")>=0;!aq&&nr&&nr.indexOf("Safari")>=0;nr&&nr.indexOf("Edg/")>=0;nr&&nr.indexOf("Android")>=0;var Qa=typeof navigator=="object"?navigator:{};P_||document.queryCommandSupported&&document.queryCommandSupported("copy")||Qa&&Qa.clipboard&&Qa.clipboard.writeText,P_||Qa&&Qa.clipboard&&Qa.clipboard.readText;var I2=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},id=new I2,O_=new I2,I_=new I2,sq=new Array(230),Qy;(e=>{function t(l){return id.keyCodeToStr(l)}e.toString=t;function i(l){return id.strToKeyCode(l)}e.fromString=i;function n(l){return O_.keyCodeToStr(l)}e.toUserSettingsUS=n;function r(l){return I_.keyCodeToStr(l)}e.toUserSettingsGeneral=r;function a(l){return O_.strToKeyCode(l)||I_.strToKeyCode(l)}e.fromUserSettings=a;function s(l){if(l>=98&&l<=113)return null;switch(l){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return id.keyCodeToStr(l)}e.toElectronAccelerator=s})(Qy||(Qy={}));var lq=class e5{constructor(t,i,n,r,a){this.ctrlKey=t,this.shiftKey=i,this.altKey=n,this.metaKey=r,this.keyCode=a}equals(t){return t instanceof e5&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",i=this.shiftKey?"1":"0",n=this.altKey?"1":"0",r=this.metaKey?"1":"0";return`K${t}${i}${n}${r}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new oq([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},oq=class{constructor(e){if(e.length===0)throw NK("chords");this.chords=e}getHashCode(){let e="";for(let t=0,i=this.chords.length;t<i;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function uq(e){if(e.charCode){let i=String.fromCharCode(e.charCode).toUpperCase();return Qy.fromString(i)}let t=e.keyCode;if(t===3)return 7;if(Rh)switch(t){case 59:return 85;case 60:if(iq)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(Xn)return 57;break}else if(XK&&(Xn&&t===93||!Xn&&t===92))return 57;return sq[t]||0}var cq=Xn?256:2048,dq=512,hq=1024,fq=Xn?2048:256,R_=class{constructor(e){var i;this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=(i=t.getModifierState)==null?void 0:i.call(t,"AltGraph"),this.keyCode=uq(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=cq),this.altKey&&(t|=dq),this.shiftKey&&(t|=hq),this.metaKey&&(t|=fq),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new lq(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},D_=new WeakMap;function pq(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if(t.origin!=="null"&&i.origin!=="null"&&t.origin!==i.origin)return null}catch{return null}return e.parent}var _q=class{static getSameOriginWindowChain(e){let t=D_.get(e);if(!t){t=[],D_.set(e,t);let i=e,n;do n=pq(i),n?t.push({window:new WeakRef(i),iframeElement:i.frameElement||null}):t.push({window:new WeakRef(i),iframeElement:null}),i=n;while(i)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,r=this.getSameOriginWindowChain(e);for(let a of r){let s=a.window.deref();if(i+=(s==null?void 0:s.scrollY)??0,n+=(s==null?void 0:s.scrollX)??0,s===t||!a.iframeElement)break;let l=a.iframeElement.getBoundingClientRect();i+=l.top,n+=l.left}return{top:i,left:n}}},cu=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let i=_q.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},V_=class{constructor(e,t=0,i=0){var r;this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t;let n=!1;if(O2){let a=navigator.userAgent.match(/Chrome\/(\d+)/);n=(a?parseInt(a[1]):123)<=122}if(e){let a=e,s=e,l=((r=e.view)==null?void 0:r.devicePixelRatio)||1;if(typeof a.wheelDeltaY<"u")n?this.deltaY=a.wheelDeltaY/(120*l):this.deltaY=a.wheelDeltaY/120;else if(typeof s.VERTICAL_AXIS<"u"&&s.axis===s.VERTICAL_AXIS)this.deltaY=-s.detail/3;else if(e.type==="wheel"){let o=e;o.deltaMode===o.DOM_DELTA_LINE?Rh&&!Xn?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof a.wheelDeltaX<"u")JK&&Jy?this.deltaX=-(a.wheelDeltaX/120):n?this.deltaX=a.wheelDeltaX/(120*l):this.deltaX=a.wheelDeltaX/120;else if(typeof s.HORIZONTAL_AXIS<"u"&&s.axis===s.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let o=e;o.deltaMode===o.DOM_DELTA_LINE?Rh&&!Xn?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(n?this.deltaY=e.wheelDelta/(120*l):this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)==null||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)==null||e.stopPropagation()}},t5=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}),mq;(e=>{function t(i){return i===e.None||i===e.Cancelled||i instanceof vq?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Si.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:t5})})(mq||(mq={}));var vq=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?t5:(this._emitter||(this._emitter=new Oe),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},R2=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new Th("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new Th("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},gq=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){var e;(e=this.disposable)==null||e.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){if(this.isDisposed)throw new Th("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let n=i.setInterval(()=>{e()},t);this.disposable=Rt(()=>{i.clearInterval(n),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},bq;(e=>{async function t(n){let r,a=await Promise.all(n.map(s=>s.then(l=>l,l=>{r||(r=l)})));if(typeof r<"u")throw r;return a}e.settled=t;function i(n){return new Promise(async(r,a)=>{try{await n(r,a)}catch(s){a(s)}})}e.withAsyncBody=i})(bq||(bq={}));var B_=class dn{static fromArray(t){return new dn(i=>{i.emitMany(t)})}static fromPromise(t){return new dn(async i=>{i.emitMany(await t)})}static fromPromises(t){return new dn(async i=>{await Promise.all(t.map(async n=>i.emitOne(await n)))})}static merge(t){return new dn(async i=>{await Promise.all(t.map(async n=>{for await(let r of n)i.emitOne(r)}))})}constructor(t,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new Oe,queueMicrotask(async()=>{let n={emitOne:r=>this.emitOne(r),emitMany:r=>this.emitMany(r),reject:r=>this.reject(r)};try{await Promise.resolve(t(n)),this.resolve()}catch(r){this.reject(r)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await Si.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>{var i;return(i=this._onReturn)==null||i.call(this),{done:!0,value:void 0}}}}static map(t,i){return new dn(async n=>{for await(let r of t)n.emitOne(i(r))})}map(t){return dn.map(this,t)}static filter(t,i){return new dn(async n=>{for await(let r of t)i(r)&&n.emitOne(r)})}filter(t){return dn.filter(this,t)}static coalesce(t){return dn.filter(t,i=>!!i)}coalesce(){return dn.coalesce(this)}static async toPromise(t){let i=[];for await(let n of t)i.push(n);return i}toPromise(){return dn.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};B_.EMPTY=B_.fromArray([]);var{getWindow:Un,getWindowId:yq,onDidRegisterWindow:wq}=function(){let e=new Map,t={window:wr,disposables:new ta};e.set(wr.vscodeWindowId,t);let i=new Oe,n=new Oe,r=new Oe;function a(s,l){return(typeof s=="number"?e.get(s):void 0)??(l?t:void 0)}return{onDidRegisterWindow:i.event,onWillUnregisterWindow:r.event,onDidUnregisterWindow:n.event,registerWindow(s){if(e.has(s.vscodeWindowId))return nt.None;let l=new ta,o={window:s,disposables:l.add(new ta)};return e.set(s.vscodeWindowId,o),l.add(Rt(()=>{e.delete(s.vscodeWindowId),n.fire(s)})),l.add(Ye(s,di.BEFORE_UNLOAD,()=>{r.fire(s)})),i.fire(o),l},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(s){return s.vscodeWindowId},hasWindow(s){return e.has(s)},getWindowById:a,getWindow(s){var u;let l=s;if((u=l==null?void 0:l.ownerDocument)!=null&&u.defaultView)return l.ownerDocument.defaultView.window;let o=s;return o!=null&&o.view?o.view.window:wr},getDocument(s){return Un(s).document}}}(),Sq=class{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function Ye(e,t,i,n){return new Sq(e,t,i,n)}var Z_=function(e,t,i,n){return Ye(e,t,i,n)},D2,Cq=class extends gq{constructor(e){super(),this.defaultTarget=e&&Un(e)}cancelAndSet(e,t,i){return super.cancelAndSet(e,t,i??this.defaultTarget)}},F_=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){ku(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,i=new Map,n=new Map,r=a=>{i.set(a,!1);let s=e.get(a)??[];for(t.set(a,s),e.set(a,[]),n.set(a,!0);s.length>0;)s.sort(F_.sort),s.shift().execute();n.set(a,!1)};D2=(a,s,l=0)=>{let o=yq(a),u=new F_(s,l),c=e.get(o);return c||(c=[],e.set(o,c)),c.push(u),i.get(o)||(i.set(o,!0),a.requestAnimationFrame(()=>r(o))),u}})();function kq(e){let t=e.getBoundingClientRect(),i=Un(e);return{left:t.left+i.scrollX,top:t.top+i.scrollY,width:t.width,height:t.height}}var di={CLICK:"click",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",KEY_DOWN:"keydown",KEY_UP:"keyup",BEFORE_UNLOAD:"beforeunload",CHANGE:"change",FOCUS:"focus",BLUR:"blur",INPUT:"input"},Aq=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=ji(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=ji(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=ji(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=ji(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=ji(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=ji(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=ji(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=ji(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=ji(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=ji(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=ji(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=ji(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=ji(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=ji(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function ji(e){return typeof e=="number"?`${e}px`:e}function jo(e){return new Aq(e)}var i5=class{constructor(){this._hooks=new ta,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,n,r){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=n,this._onStopCallback=r;let a=e;try{e.setPointerCapture(t),this._hooks.add(Rt(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{a=Un(e)}this._hooks.add(Ye(a,di.POINTER_MOVE,s=>{if(s.buttons!==i){this.stopMonitoring(!0);return}s.preventDefault(),this._pointerMoveCallback(s)})),this._hooks.add(Ye(a,di.POINTER_UP,s=>this.stopMonitoring(!0)))}};function $q(e,t,i){let n=null,r=null;if(typeof i.value=="function"?(n="value",r=i.value,r.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof i.get=="function"&&(n="get",r=i.get),!r)throw new Error("not supported");let a=`$memoize$${t}`;i[n]=function(...s){return this.hasOwnProperty(a)||Object.defineProperty(this,a,{configurable:!1,enumerable:!1,writable:!1,value:r.apply(this,s)}),this[a]}}var Vn;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(Vn||(Vn={}));var Eo=class Mi extends nt{constructor(){super(),this.dispatched=!1,this.targets=new H_,this.ignoreTargets=new H_,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(Si.runAndSubscribe(wq,({window:t,disposables:i})=>{i.add(Ye(t.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),i.add(Ye(t.document,"touchend",n=>this.onTouchEnd(t,n))),i.add(Ye(t.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:wr,disposables:this._store}))}static addTarget(t){if(!Mi.isTouchDevice())return nt.None;Mi.INSTANCE||(Mi.INSTANCE=new Mi);let i=Mi.INSTANCE.targets.push(t);return Rt(i)}static ignoreTarget(t){if(!Mi.isTouchDevice())return nt.None;Mi.INSTANCE||(Mi.INSTANCE=new Mi);let i=Mi.INSTANCE.ignoreTargets.push(t);return Rt(i)}static isTouchDevice(){return"ontouchstart"in wr||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let i=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,r=t.targetTouches.length;n<r;n++){let a=t.targetTouches.item(n);this.activeTouches[a.identifier]={id:a.identifier,initialTarget:a.target,initialTimeStamp:i,initialPageX:a.pageX,initialPageY:a.pageY,rollingTimestamps:[i],rollingPageX:[a.pageX],rollingPageY:[a.pageY]};let s=this.newGestureEvent(Vn.Start,a.target);s.pageX=a.pageX,s.pageY=a.pageY,this.dispatchEvent(s)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,i){let n=Date.now(),r=Object.keys(this.activeTouches).length;for(let a=0,s=i.changedTouches.length;a<s;a++){let l=i.changedTouches.item(a);if(!this.activeTouches.hasOwnProperty(String(l.identifier))){console.warn("move of an UNKNOWN touch",l);continue}let o=this.activeTouches[l.identifier],u=Date.now()-o.initialTimeStamp;if(u<Mi.HOLD_DELAY&&Math.abs(o.initialPageX-Yi(o.rollingPageX))<30&&Math.abs(o.initialPageY-Yi(o.rollingPageY))<30){let c=this.newGestureEvent(Vn.Tap,o.initialTarget);c.pageX=Yi(o.rollingPageX),c.pageY=Yi(o.rollingPageY),this.dispatchEvent(c)}else if(u>=Mi.HOLD_DELAY&&Math.abs(o.initialPageX-Yi(o.rollingPageX))<30&&Math.abs(o.initialPageY-Yi(o.rollingPageY))<30){let c=this.newGestureEvent(Vn.Contextmenu,o.initialTarget);c.pageX=Yi(o.rollingPageX),c.pageY=Yi(o.rollingPageY),this.dispatchEvent(c)}else if(r===1){let c=Yi(o.rollingPageX),d=Yi(o.rollingPageY),h=Yi(o.rollingTimestamps)-o.rollingTimestamps[0],f=c-o.rollingPageX[0],_=d-o.rollingPageY[0],m=[...this.targets].filter(g=>o.initialTarget instanceof Node&&g.contains(o.initialTarget));this.inertia(t,m,n,Math.abs(f)/h,f>0?1:-1,c,Math.abs(_)/h,_>0?1:-1,d)}this.dispatchEvent(this.newGestureEvent(Vn.End,o.initialTarget)),delete this.activeTouches[l.identifier]}this.dispatched&&(i.preventDefault(),i.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,i){let n=document.createEvent("CustomEvent");return n.initEvent(t,!1,!0),n.initialTarget=i,n.tapCount=0,n}dispatchEvent(t){if(t.type===Vn.Tap){let i=new Date().getTime(),n=0;i-this._lastSetTapCountTime>Mi.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=i,t.tapCount=n}else(t.type===Vn.Change||t.type===Vn.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let n of this.ignoreTargets)if(n.contains(t.initialTarget))return;let i=[];for(let n of this.targets)if(n.contains(t.initialTarget)){let r=0,a=t.initialTarget;for(;a&&a!==n;)r++,a=a.parentElement;i.push([r,n])}i.sort((n,r)=>n[0]-r[0]);for(let[n,r]of i)r.dispatchEvent(t),this.dispatched=!0}}inertia(t,i,n,r,a,s,l,o,u){this.handle=D2(t,()=>{let c=Date.now(),d=c-n,h=0,f=0,_=!0;r+=Mi.SCROLL_FRICTION*d,l+=Mi.SCROLL_FRICTION*d,r>0&&(_=!1,h=a*r*d),l>0&&(_=!1,f=o*l*d);let m=this.newGestureEvent(Vn.Change);m.translationX=h,m.translationY=f,i.forEach(g=>g.dispatchEvent(m)),_||this.inertia(t,i,c,r,a,s+h,l,o,u+f)})}onTouchMove(t){let i=Date.now();for(let n=0,r=t.changedTouches.length;n<r;n++){let a=t.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(a.identifier))){console.warn("end of an UNKNOWN touch",a);continue}let s=this.activeTouches[a.identifier],l=this.newGestureEvent(Vn.Change,s.initialTarget);l.translationX=a.pageX-Yi(s.rollingPageX),l.translationY=a.pageY-Yi(s.rollingPageY),l.pageX=a.pageX,l.pageY=a.pageY,this.dispatchEvent(l),s.rollingPageX.length>3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(a.pageX),s.rollingPageY.push(a.pageY),s.rollingTimestamps.push(i)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};Eo.SCROLL_FRICTION=-.005,Eo.HOLD_DELAY=700,Eo.CLEAR_TAP_COUNT_TIME=400,Kt([$q],Eo,"isTouchDevice",1);var Mq=Eo,V2=class extends nt{onclick(e,t){this._register(Ye(e,di.CLICK,i=>t(new cu(Un(e),i))))}onmousedown(e,t){this._register(Ye(e,di.MOUSE_DOWN,i=>t(new cu(Un(e),i))))}onmouseover(e,t){this._register(Ye(e,di.MOUSE_OVER,i=>t(new cu(Un(e),i))))}onmouseleave(e,t){this._register(Ye(e,di.MOUSE_LEAVE,i=>t(new cu(Un(e),i))))}onkeydown(e,t){this._register(Ye(e,di.KEY_DOWN,i=>t(new R_(i))))}onkeyup(e,t){this._register(Ye(e,di.KEY_UP,i=>t(new R_(i))))}oninput(e,t){this._register(Ye(e,di.INPUT,t))}onblur(e,t){this._register(Ye(e,di.BLUR,t))}onfocus(e,t){this._register(Ye(e,di.FOCUS,t))}onchange(e,t){this._register(Ye(e,di.CHANGE,t))}ignoreGesture(e){return Mq.ignoreTarget(e)}},z_=11,Lq=class extends V2{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=z_+"px",this.domNode.style.height=z_+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new i5),this._register(Z_(this.bgDomNode,di.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(Z_(this.domNode,di.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new Cq),this._pointerdownScheduleRepeatTimer=this._register(new R2)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Un(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},Eq=class Bh{constructor(t,i,n,r,a,s,l){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(i=i|0,n=n|0,r=r|0,a=a|0,s=s|0,l=l|0),this.rawScrollLeft=r,this.rawScrollTop=l,i<0&&(i=0),r+i>n&&(r=n-i),r<0&&(r=0),a<0&&(a=0),l+a>s&&(l=s-a),l<0&&(l=0),this.width=i,this.scrollWidth=n,this.scrollLeft=r,this.height=a,this.scrollHeight=s,this.scrollTop=l}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,i){return new Bh(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,i?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,i?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new Bh(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,i){let n=this.width!==t.width,r=this.scrollWidth!==t.scrollWidth,a=this.scrollLeft!==t.scrollLeft,s=this.height!==t.height,l=this.scrollHeight!==t.scrollHeight,o=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:i,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:r,scrollLeftChanged:a,heightChanged:s,scrollHeightChanged:l,scrollTopChanged:o}}},xq=class extends nt{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new Oe),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new Eq(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var n;let i=this._state.withScrollDimensions(e,t);this._setState(i,!!this._smoothScrolling),(n=this._smoothScrolling)==null||n.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;t?n=new W_(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{let i=this._state.withScrollPosition(e);this._smoothScrolling=W_.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}},U_=class{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}};function nd(e,t){let i=t-e;return function(n){return e+i*Nq(n)}}function Tq(e,t,i){return function(n){return n<i?e(n/i):t((n-i)/(1-i))}}var W_=class Zh{constructor(t,i,n,r){this.from=t,this.to=i,this.duration=r,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,i,n){if(Math.abs(t-i)>2.5*n){let r,a;return t<i?(r=t+.75*n,a=i-.75*n):(r=t-.75*n,a=i+.75*n),Tq(nd(t,r),nd(a,i),.33)}return nd(t,i)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let i=(t-this.startTime)/this.duration;if(i<1){let n=this.scrollLeft(i),r=this.scrollTop(i);return new U_(n,r,!1)}return new U_(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,i,n){return Zh.start(t,i,n)}static start(t,i,n){n=n+10;let r=Date.now()-10;return new Zh(t,i,r,n)}};function Hq(e){return Math.pow(e,3)}function Nq(e){return 1-Hq(1-e)}var Pq=class extends nt{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new R2)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)==null||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)==null||t.setClassName(this._invisibleClassName+(e?" fade":"")))}},Oq=140,n5=class extends V2{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new Pq(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new i5),this._shouldRender=!0,this.domNode=jo(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(Ye(this.domNode.domNode,di.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new Lq(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=jo(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof i=="number"&&this.slider.setWidth(i),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(Ye(this.slider.domNode,di.POINTER_DOWN,r=>{r.button===0&&(r.preventDefault(),this._sliderPointerDown(r))})),this.onclick(this.slider.domNode,r=>{r.leftButton&&r.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderPointerPosition(e);i<=r&&r<=n?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,i=e.offsetY;else{let r=kq(this.domNode.domNode);t=e.pageX-r.left,i=e.pageY-r.top}let n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{let a=this._sliderOrthogonalPointerPosition(r),s=Math.abs(a-i);if(Jy&&s>Oq){this._setDesiredScrollPositionNow(n.getScrollPosition());return}let l=this._sliderPointerPosition(r)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(l))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},r5=class Fh{constructor(t,i,n,r,a,s){this._scrollbarSize=Math.round(i),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(t),this._visibleSize=r,this._scrollSize=a,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new Fh(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let i=Math.round(t);return this._visibleSize!==i?(this._visibleSize=i,this._refreshComputedValues(),!0):!1}setScrollSize(t){let i=Math.round(t);return this._scrollSize!==i?(this._scrollSize=i,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let i=Math.round(t);return this._scrollPosition!==i?(this._scrollPosition=i,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,i,n,r,a){let s=Math.max(0,n-t),l=Math.max(0,s-2*i),o=r>0&&r>n;if(!o)return{computedAvailableSize:Math.round(s),computedIsNeeded:o,computedSliderSize:Math.round(l),computedSliderRatio:0,computedSliderPosition:0};let u=Math.round(Math.max(20,Math.floor(n*l/r))),c=(l-u)/(r-n),d=a*c;return{computedAvailableSize:Math.round(s),computedIsNeeded:o,computedSliderSize:Math.round(u),computedSliderRatio:c,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){let t=Fh._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let i=t-this._arrowSize-this._computedSliderSize/2;return Math.round(i/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let i=t-this._arrowSize,n=this._scrollPosition;return i<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let i=this._computedSliderPosition+t;return Math.round(i/this._computedSliderRatio)}},Iq=class extends n5{constructor(e,t,i){let n=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new r5(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,n.width,n.scrollWidth,r.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},Rq=class extends n5{constructor(e,t,i){let n=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new r5(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,r.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},Dq=500,j_=50,Vq=class{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}},zh=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,i=0,n=1,r=this._rear;do{let a=r===this._front?t:Math.pow(2,-n);if(t-=a,i+=this._memory[r].score*a,r===this._front)break;r=(this._capacity+r-1)%this._capacity,n++}while(!0);return i<=.5}acceptStandardWheelEvent(t){if(O2){let i=Un(t.browserEvent),n=YK(i);this.accept(Date.now(),t.deltaX*n,t.deltaY*n)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,i,n){let r=null,a=new Vq(t,i,n);this._front===-1&&this._rear===-1?(this._memory[0]=a,this._front=0,this._rear=0):(r=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=a),a.score=this._computeScore(a,r)}_computeScore(t,i){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(n+=.25),i){let r=Math.abs(t.deltaX),a=Math.abs(t.deltaY),s=Math.abs(i.deltaX),l=Math.abs(i.deltaY),o=Math.max(Math.min(r,s),1),u=Math.max(Math.min(a,l),1),c=Math.max(r,s),d=Math.max(a,l);c%o===0&&d%u===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};zh.INSTANCE=new zh;var Bq=zh,Zq=class extends V2{constructor(e,t,i){super(),this._onScroll=this._register(new Oe),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new Oe),this.onWillScroll=this._onWillScroll.event,this._options=zq(t),this._scrollable=i,this._register(this._scrollable.onScroll(r=>{this._onWillScroll.fire(r),this._onDidScroll(r),this._onScroll.fire(r)}));let n={onMouseWheel:r=>this._onMouseWheel(r),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new Rq(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new Iq(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=jo(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=jo(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=jo(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,r=>this._onMouseOver(r)),this.onmouseleave(this._listenOnDomNode,r=>this._onMouseLeave(r)),this._hideTimeout=this._register(new R2),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=za(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Xn&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new V_(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=za(this._mouseWheelToDispose),e)){let t=i=>{this._onMouseWheel(new V_(i))};this._mouseWheelToDispose.push(Ye(this._listenOnDomNode,di.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){var r;if((r=e.browserEvent)!=null&&r.defaultPrevented)return;let t=Bq.INSTANCE;t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let a=e.deltaY*this._options.mouseWheelScrollSensitivity,s=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&s+a===0?s=a=0:Math.abs(a)>=Math.abs(s)?s=0:a=0),this._options.flipAxes&&([a,s]=[s,a]);let l=!Xn&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||l)&&!s&&(s=a,a=0),e.browserEvent&&e.browserEvent.altKey&&(s=s*this._options.fastScrollSensitivity,a=a*this._options.fastScrollSensitivity);let o=this._scrollable.getFutureScrollPosition(),u={};if(a){let c=j_*a,d=o.scrollTop-(c<0?Math.floor(c):Math.ceil(c));this._verticalScrollbar.writeScrollPosition(u,d)}if(s){let c=j_*s,d=o.scrollLeft-(c<0?Math.floor(c):Math.ceil(c));this._horizontalScrollbar.writeScrollPosition(u,d)}u=this._scrollable.validateScrollPosition(u),(o.scrollLeft!==u.scrollLeft||o.scrollTop!==u.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(u):this._scrollable.setScrollPositionNow(u),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",r=t?" top":"",a=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${r}`),this._topLeftShadowDomNode.setClassName(`shadow${a}${r}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),Dq)}},Fq=class extends Zq{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function zq(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,Xn&&(t.className+=" mac"),t}var Uh=class extends nt{constructor(e,t,i,n,r,a,s,l){super(),this._bufferService=i,this._optionsService=s,this._renderService=l,this._onRequestScrollLines=this._register(new Oe),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let o=this._register(new xq({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:u=>D2(n.window,u)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{o.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new Fq(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},o)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(r.onProtocolChange(u=>{this._scrollableElement.updateOptions({handleMouseWheel:!(u&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(Si.runAndSubscribe(a.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=a.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(Rt(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=n.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(Rt(()=>this._styleElement.remove())),this._register(Si.runAndSubscribe(a.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${a.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${a.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${a.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
|
|
91
|
+
`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(u=>this._handleScroll(u)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){var e;return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:((e=this._optionsService.rawOptions.overviewRuler)==null?void 0:e.width)||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),i=t-this._bufferService.buffer.ydisp;i!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(i)),this._isHandlingScroll=!1}};Uh=Kt([Ve(2,zi),Ve(3,Hr),Ve(4,Dy),Ve(5,Ml),Ve(6,Ui),Ve(7,Nr)],Uh);var Wh=class extends nt{constructor(e,t,i,n,r){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=i,this._decorationService=n,this._renderService=r,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(a=>this._removeDecoration(a))),this._register(Rt(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){var n;let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",((n=e==null?void 0:e.options)==null?void 0:n.layer)==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let i=e.options.x??0;return i&&i>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let i=this._decorationElements.get(e);i||(i=this._createElement(e),e.element=i,this._decorationElements.set(e,i),this._container.appendChild(i),e.onDispose(()=>{this._decorationElements.delete(e),i.remove()})),i.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(i.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,i.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,i.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,i.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(i)}}_refreshXPosition(e,t=e.element){if(!t)return;let i=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=i?`${i*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=i?`${i*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){var t;(t=this._decorationElements.get(e))==null||t.remove(),this._decorationElements.delete(e),e.dispose()}};Wh=Kt([Ve(1,zi),Ve(2,Hr),Ve(3,H0),Ve(4,Nr)],Wh);var Uq=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,i){return t>=e.startBufferLine-this._linePadding[i||"full"]&&t<=e.endBufferLine+this._linePadding[i||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},On={full:0,left:0,center:0,right:0},Dr={full:0,left:0,center:0,right:0},bo={full:0,left:0,center:0,right:0},hc=class extends nt{constructor(e,t,i,n,r,a,s,l){var u;super(),this._viewportElement=e,this._screenElement=t,this._bufferService=i,this._decorationService=n,this._renderService=r,this._optionsService=a,this._themeService=s,this._coreBrowserService=l,this._colorZoneStore=new Uq,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(u=this._viewportElement.parentElement)==null||u.insertBefore(this._canvas,this._viewportElement),this._register(Rt(()=>{var c;return(c=this._canvas)==null?void 0:c.remove()}));let o=this._canvas.getContext("2d");if(o)this._ctx=o;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){var e;return((e=this._optionsService.options.overviewRuler)==null?void 0:e.width)||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);Dr.full=this._canvas.width,Dr.left=e,Dr.center=t,Dr.right=e,this._refreshDrawHeightConstants(),bo.full=1,bo.left=1,bo.center=1+Dr.left,bo.right=1+Dr.left+Dr.center}_refreshDrawHeightConstants(){On.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);On.left=t,On.center=t,On.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*On.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*On.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*On.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*On.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(bo[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-On[e.position||"full"]/2),Dr[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+On[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};hc=Kt([Ve(2,zi),Ve(3,H0),Ve(4,Nr),Ve(5,Ui),Ve(6,Ml),Ve(7,Hr)],hc);var Ee;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
|
|
92
|
+
`,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""))(Ee||(Ee={}));var Mu;(e=>(e.PAD="",e.HOP="",e.BPH="",e.NBH="",e.IND="",e.NEL="
",e.SSA="",e.ESA="",e.HTS="",e.HTJ="",e.VTS="",e.PLD="",e.PLU="",e.RI="",e.SS2="",e.SS3="",e.DCS="",e.PU1="",e.PU2="",e.STS="",e.CCH="",e.MW="",e.SPA="",e.EPA="",e.SOS="",e.SGCI="",e.SCI="",e.CSI="",e.ST="",e.OSC="",e.PM="",e.APC=""))(Mu||(Mu={}));var a5;(e=>e.ST=`${Ee.ESC}\\`)(a5||(a5={}));var jh=class{constructor(e,t,i,n,r,a){this._textarea=e,this._compositionView=t,this._bufferService=i,this._optionsService=n,this._coreService=r,this._renderService=a,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let i;t.start+=this._dataAlreadySent.length,this._isComposing?i=this._textarea.value.substring(t.start,this._compositionPosition.start):i=this._textarea.value.substring(t.start),i.length>0&&this._coreService.triggerDataEvent(i,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,i=t.replace(e,"");this._dataAlreadySent=i,t.length>e.length?this._coreService.triggerDataEvent(i,!0):t.length<e.length?this._coreService.triggerDataEvent(`${Ee.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),i=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,r=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=r+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=i+"px",this._compositionView.style.lineHeight=i+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let a=this._compositionView.getBoundingClientRect();this._textarea.style.left=r+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(a.width,1)+"px",this._textarea.style.height=Math.max(a.height,1)+"px",this._textarea.style.lineHeight=a.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};jh=Kt([Ve(2,zi),Ve(3,Ui),Ve(4,ja),Ve(5,Nr)],jh);var hi=0,fi=0,pi=0,zt=0,K_={css:"#00000000",rgba:0},ei;(e=>{function t(r,a,s,l){return l!==void 0?`#${$a(r)}${$a(a)}${$a(s)}${$a(l)}`:`#${$a(r)}${$a(a)}${$a(s)}`}e.toCss=t;function i(r,a,s,l=255){return(r<<24|a<<16|s<<8|l)>>>0}e.toRgba=i;function n(r,a,s,l){return{css:e.toCss(r,a,s,l),rgba:e.toRgba(r,a,s,l)}}e.toColor=n})(ei||(ei={}));var Pt;(e=>{function t(o,u){if(zt=(u.rgba&255)/255,zt===1)return{css:u.css,rgba:u.rgba};let c=u.rgba>>24&255,d=u.rgba>>16&255,h=u.rgba>>8&255,f=o.rgba>>24&255,_=o.rgba>>16&255,m=o.rgba>>8&255;hi=f+Math.round((c-f)*zt),fi=_+Math.round((d-_)*zt),pi=m+Math.round((h-m)*zt);let g=ei.toCss(hi,fi,pi),v=ei.toRgba(hi,fi,pi);return{css:g,rgba:v}}e.blend=t;function i(o){return(o.rgba&255)===255}e.isOpaque=i;function n(o,u,c){let d=Lu.ensureContrastRatio(o.rgba,u.rgba,c);if(d)return ei.toColor(d>>24&255,d>>16&255,d>>8&255)}e.ensureContrastRatio=n;function r(o){let u=(o.rgba|255)>>>0;return[hi,fi,pi]=Lu.toChannels(u),{css:ei.toCss(hi,fi,pi),rgba:u}}e.opaque=r;function a(o,u){return zt=Math.round(u*255),[hi,fi,pi]=Lu.toChannels(o.rgba),{css:ei.toCss(hi,fi,pi,zt),rgba:ei.toRgba(hi,fi,pi,zt)}}e.opacity=a;function s(o,u){return zt=o.rgba&255,a(o,zt*u/255)}e.multiplyOpacity=s;function l(o){return[o.rgba>>24&255,o.rgba>>16&255,o.rgba>>8&255]}e.toColorRGB=l})(Pt||(Pt={}));var Bt;(e=>{let t,i;try{let r=document.createElement("canvas");r.width=1,r.height=1;let a=r.getContext("2d",{willReadFrequently:!0});a&&(t=a,t.globalCompositeOperation="copy",i=t.createLinearGradient(0,0,1,1))}catch{}function n(r){if(r.match(/#[\da-f]{3,8}/i))switch(r.length){case 4:return hi=parseInt(r.slice(1,2).repeat(2),16),fi=parseInt(r.slice(2,3).repeat(2),16),pi=parseInt(r.slice(3,4).repeat(2),16),ei.toColor(hi,fi,pi);case 5:return hi=parseInt(r.slice(1,2).repeat(2),16),fi=parseInt(r.slice(2,3).repeat(2),16),pi=parseInt(r.slice(3,4).repeat(2),16),zt=parseInt(r.slice(4,5).repeat(2),16),ei.toColor(hi,fi,pi,zt);case 7:return{css:r,rgba:(parseInt(r.slice(1),16)<<8|255)>>>0};case 9:return{css:r,rgba:parseInt(r.slice(1),16)>>>0}}let a=r.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(a)return hi=parseInt(a[1]),fi=parseInt(a[2]),pi=parseInt(a[3]),zt=Math.round((a[5]===void 0?1:parseFloat(a[5]))*255),ei.toColor(hi,fi,pi,zt);if(!t||!i)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=i,t.fillStyle=r,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[hi,fi,pi,zt]=t.getImageData(0,0,1,1).data,zt!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:ei.toRgba(hi,fi,pi,zt),css:r}}e.toColor=n})(Bt||(Bt={}));var Oi;(e=>{function t(n){return i(n>>16&255,n>>8&255,n&255)}e.relativeLuminance=t;function i(n,r,a){let s=n/255,l=r/255,o=a/255,u=s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4),c=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4),d=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4);return u*.2126+c*.7152+d*.0722}e.relativeLuminance2=i})(Oi||(Oi={}));var Lu;(e=>{function t(s,l){if(zt=(l&255)/255,zt===1)return l;let o=l>>24&255,u=l>>16&255,c=l>>8&255,d=s>>24&255,h=s>>16&255,f=s>>8&255;return hi=d+Math.round((o-d)*zt),fi=h+Math.round((u-h)*zt),pi=f+Math.round((c-f)*zt),ei.toRgba(hi,fi,pi)}e.blend=t;function i(s,l,o){let u=Oi.relativeLuminance(s>>8),c=Oi.relativeLuminance(l>>8);if(dr(u,c)<o){if(c<u){let f=n(s,l,o),_=dr(u,Oi.relativeLuminance(f>>8));if(_<o){let m=r(s,l,o),g=dr(u,Oi.relativeLuminance(m>>8));return _>g?f:m}return f}let d=r(s,l,o),h=dr(u,Oi.relativeLuminance(d>>8));if(h<o){let f=n(s,l,o),_=dr(u,Oi.relativeLuminance(f>>8));return h>_?d:f}return d}}e.ensureContrastRatio=i;function n(s,l,o){let u=s>>24&255,c=s>>16&255,d=s>>8&255,h=l>>24&255,f=l>>16&255,_=l>>8&255,m=dr(Oi.relativeLuminance2(h,f,_),Oi.relativeLuminance2(u,c,d));for(;m<o&&(h>0||f>0||_>0);)h-=Math.max(0,Math.ceil(h*.1)),f-=Math.max(0,Math.ceil(f*.1)),_-=Math.max(0,Math.ceil(_*.1)),m=dr(Oi.relativeLuminance2(h,f,_),Oi.relativeLuminance2(u,c,d));return(h<<24|f<<16|_<<8|255)>>>0}e.reduceLuminance=n;function r(s,l,o){let u=s>>24&255,c=s>>16&255,d=s>>8&255,h=l>>24&255,f=l>>16&255,_=l>>8&255,m=dr(Oi.relativeLuminance2(h,f,_),Oi.relativeLuminance2(u,c,d));for(;m<o&&(h<255||f<255||_<255);)h=Math.min(255,h+Math.ceil((255-h)*.1)),f=Math.min(255,f+Math.ceil((255-f)*.1)),_=Math.min(255,_+Math.ceil((255-_)*.1)),m=dr(Oi.relativeLuminance2(h,f,_),Oi.relativeLuminance2(u,c,d));return(h<<24|f<<16|_<<8|255)>>>0}e.increaseLuminance=r;function a(s){return[s>>24&255,s>>16&255,s>>8&255,s&255]}e.toChannels=a})(Lu||(Lu={}));function $a(e){let t=e.toString(16);return t.length<2?"0"+t:t}function dr(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var Wq=class extends T0{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},fc=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new vn}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let i=[],n=t.translateToString(!0),r=0,a=0,s=0,l=t.getFg(0),o=t.getBg(0);for(let u=0;u<t.getTrimmedLength();u++)if(t.loadCell(u,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==l||this._workCell.bg!==o){if(u-r>1){let c=this._getJoinedRanges(n,s,a,t,r);for(let d=0;d<c.length;d++)i.push(c[d])}r=u,s=a,l=this._workCell.fg,o=this._workCell.bg}a+=this._workCell.getChars().length||Yr.length}if(this._bufferService.cols-r>1){let u=this._getJoinedRanges(n,s,a,t,r);for(let c=0;c<u.length;c++)i.push(u[c])}return i}_getJoinedRanges(e,t,i,n,r){let a=e.substring(t,i),s=[];try{s=this._characterJoiners[0].handler(a)}catch(l){console.error(l)}for(let l=1;l<this._characterJoiners.length;l++)try{let o=this._characterJoiners[l].handler(a);for(let u=0;u<o.length;u++)fc._mergeRanges(s,o[u])}catch(o){console.error(o)}return this._stringRangesToCellRanges(s,n,r),s}_stringRangesToCellRanges(e,t,i){let n=0,r=!1,a=0,s=e[n];if(s){for(let l=i;l<this._bufferService.cols;l++){let o=t.getWidth(l),u=t.getString(l).length||Yr.length;if(o!==0){if(!r&&s[0]<=a&&(s[0]=l,r=!0),s[1]<=a){if(s[1]=l,s=e[++n],!s)break;s[0]<=a?(s[0]=l,r=!0):r=!1}a+=u}}s&&(s[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let i=!1;for(let n=0;n<e.length;n++){let r=e[n];if(i){if(t[1]<=r[0])return e[n-1][1]=t[1],e;if(t[1]<=r[1])return e[n-1][1]=Math.max(t[1],r[1]),e.splice(n,1),e;e.splice(n,1),n--}else{if(t[1]<=r[0])return e.splice(n,0,t),e;if(t[1]<=r[1])return r[0]=Math.min(t[0],r[0]),e;t[0]<r[1]&&(r[0]=Math.min(t[0],r[0]),i=!0);continue}}return i?e[e.length-1][1]=t[1]:e.push(t),e}};fc=Kt([Ve(0,zi)],fc);function jq(e){return 57508<=e&&e<=57558}function Kq(e){return 9472<=e&&e<=9631}function qq(e){return jq(e)||Kq(e)}function Gq(){return{css:{canvas:du(),cell:du()},device:{canvas:du(),cell:du(),char:{width:0,height:0,left:0,top:0}}}}function du(){return{width:0,height:0}}var Kh=class{constructor(e,t,i,n,r,a,s){this._document=e,this._characterJoinerService=t,this._optionsService=i,this._coreBrowserService=n,this._coreService=r,this._decorationService=a,this._themeService=s,this._workCell=new vn,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,i){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=i}createRow(e,t,i,n,r,a,s,l,o,u,c){let d=[],h=this._characterJoinerService.getJoinedCharacters(t),f=this._themeService.colors,_=e.getNoBgTrimmedLength();i&&_<a+1&&(_=a+1);let m,g=0,v="",w=0,S=0,y=0,A=0,L=!1,k=0,V=!1,T=0,J=0,x=[],N=u!==-1&&c!==-1;for(let O=0;O<_;O++){e.loadCell(O,this._workCell);let R=this._workCell.getWidth();if(R===0)continue;let j=!1,G=O>=J,ae=O,q=this._workCell;if(h.length>0&&O===h[0][0]&&G){let ie=h.shift(),fe=this._isCellInSelection(ie[0],t);for(w=ie[0]+1;w<ie[1];w++)G&&(G=fe===this._isCellInSelection(w,t));G&&(G=!i||a<ie[0]||a>=ie[1]),G?(j=!0,q=new Wq(this._workCell,e.translateToString(!0,ie[0],ie[1]),ie[1]-ie[0]),ae=ie[1]-1,R=q.getWidth()):J=ie[1]}let se=this._isCellInSelection(O,t),me=i&&O===a,U=N&&O>=u&&O<=c,ve=!1;this._decorationService.forEachDecorationAtCell(O,t,void 0,ie=>{ve=!0});let ce=q.getChars()||Yr;if(ce===" "&&(q.isUnderline()||q.isOverline())&&(ce=" "),T=R*l-o.get(ce,q.isBold(),q.isItalic()),!m)m=this._document.createElement("span");else if(g&&(se&&V||!se&&!V&&q.bg===S)&&(se&&V&&f.selectionForeground||q.fg===y)&&q.extended.ext===A&&U===L&&T===k&&!me&&!j&&!ve&&G){q.isInvisible()?v+=Yr:v+=ce,g++;continue}else g&&(m.textContent=v),m=this._document.createElement("span"),g=0,v="";if(S=q.bg,y=q.fg,A=q.extended.ext,L=U,k=T,V=se,j&&a>=O&&a<=ae&&(a=O),!this._coreService.isCursorHidden&&me&&this._coreService.isCursorInitialized){if(x.push("xterm-cursor"),this._coreBrowserService.isFocused)s&&x.push("xterm-cursor-blink"),x.push(n==="bar"?"xterm-cursor-bar":n==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(r)switch(r){case"outline":x.push("xterm-cursor-outline");break;case"block":x.push("xterm-cursor-block");break;case"bar":x.push("xterm-cursor-bar");break;case"underline":x.push("xterm-cursor-underline");break}}if(q.isBold()&&x.push("xterm-bold"),q.isItalic()&&x.push("xterm-italic"),q.isDim()&&x.push("xterm-dim"),q.isInvisible()?v=Yr:v=q.getChars()||Yr,q.isUnderline()&&(x.push(`xterm-underline-${q.extended.underlineStyle}`),v===" "&&(v=" "),!q.isUnderlineColorDefault()))if(q.isUnderlineColorRGB())m.style.textDecorationColor=`rgb(${T0.toColorRGB(q.getUnderlineColor()).join(",")})`;else{let ie=q.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&q.isBold()&&ie<8&&(ie+=8),m.style.textDecorationColor=f.ansi[ie].css}q.isOverline()&&(x.push("xterm-overline"),v===" "&&(v=" ")),q.isStrikethrough()&&x.push("xterm-strikethrough"),U&&(m.style.textDecoration="underline");let ge=q.getFgColor(),ue=q.getFgColorMode(),pe=q.getBgColor(),W=q.getBgColorMode(),he=!!q.isInverse();if(he){let ie=ge;ge=pe,pe=ie;let fe=ue;ue=W,W=fe}let te,be,E=!1;this._decorationService.forEachDecorationAtCell(O,t,void 0,ie=>{ie.options.layer!=="top"&&E||(ie.backgroundColorRGB&&(W=50331648,pe=ie.backgroundColorRGB.rgba>>8&16777215,te=ie.backgroundColorRGB),ie.foregroundColorRGB&&(ue=50331648,ge=ie.foregroundColorRGB.rgba>>8&16777215,be=ie.foregroundColorRGB),E=ie.options.layer==="top")}),!E&&se&&(te=this._coreBrowserService.isFocused?f.selectionBackgroundOpaque:f.selectionInactiveBackgroundOpaque,pe=te.rgba>>8&16777215,W=50331648,E=!0,f.selectionForeground&&(ue=50331648,ge=f.selectionForeground.rgba>>8&16777215,be=f.selectionForeground)),E&&x.push("xterm-decoration-top");let F;switch(W){case 16777216:case 33554432:F=f.ansi[pe],x.push(`xterm-bg-${pe}`);break;case 50331648:F=ei.toColor(pe>>16,pe>>8&255,pe&255),this._addStyle(m,`background-color:#${q_((pe>>>0).toString(16),"0",6)}`);break;case 0:default:he?(F=f.foreground,x.push("xterm-bg-257")):F=f.background}switch(te||q.isDim()&&(te=Pt.multiplyOpacity(F,.5)),ue){case 16777216:case 33554432:q.isBold()&&ge<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ge+=8),this._applyMinimumContrast(m,F,f.ansi[ge],q,te,void 0)||x.push(`xterm-fg-${ge}`);break;case 50331648:let ie=ei.toColor(ge>>16&255,ge>>8&255,ge&255);this._applyMinimumContrast(m,F,ie,q,te,be)||this._addStyle(m,`color:#${q_(ge.toString(16),"0",6)}`);break;case 0:default:this._applyMinimumContrast(m,F,f.foreground,q,te,be)||he&&x.push("xterm-fg-257")}x.length&&(m.className=x.join(" "),x.length=0),!me&&!j&&!ve&&G?g++:m.textContent=v,T!==this.defaultSpacing&&(m.style.letterSpacing=`${T}px`),d.push(m),O=ae}return m&&g&&(m.textContent=v),d}_applyMinimumContrast(e,t,i,n,r,a){if(this._optionsService.rawOptions.minimumContrastRatio===1||qq(n.getCode()))return!1;let s=this._getContrastCache(n),l;if(!r&&!a&&(l=s.getColor(t.rgba,i.rgba)),l===void 0){let o=this._optionsService.rawOptions.minimumContrastRatio/(n.isDim()?2:1);l=Pt.ensureContrastRatio(r||t,a||i,o),s.setColor((r||t).rgba,(a||i).rgba,l??null)}return l?(this._addStyle(e,`color:${l.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let i=this._selectionStart,n=this._selectionEnd;return!i||!n?!1:this._columnSelectMode?i[0]<=n[0]?e>=i[0]&&t>=i[1]&&e<n[0]&&t<=n[1]:e<i[0]&&t>=i[1]&&e>=n[0]&&t<=n[1]:t>i[1]&&t<n[1]||i[1]===n[1]&&t===i[1]&&e>=i[0]&&e<n[0]||i[1]<n[1]&&t===n[1]&&e<n[0]||i[1]<n[1]&&t===i[1]&&e>=i[0]}};Kh=Kt([Ve(1,Zy),Ve(2,Ui),Ve(3,Hr),Ve(4,ja),Ve(5,H0),Ve(6,Ml)],Kh);function q_(e,t,i){for(;e.length<i;)e=t+e;return e}var Yq=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let i=e.createElement("span");i.classList.add("xterm-char-measure-element");let n=e.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontWeight="bold";let r=e.createElement("span");r.classList.add("xterm-char-measure-element"),r.style.fontStyle="italic";let a=e.createElement("span");a.classList.add("xterm-char-measure-element"),a.style.fontWeight="bold",a.style.fontStyle="italic",this._measureElements=[i,n,r,a],this._container.appendChild(i),this._container.appendChild(n),this._container.appendChild(r),this._container.appendChild(a),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,i,n){e===this._font&&t===this._fontSize&&i===this._weight&&n===this._weightBold||(this._font=e,this._fontSize=t,this._weight=i,this._weightBold=n,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${i}`,this._measureElements[1].style.fontWeight=`${n}`,this._measureElements[2].style.fontWeight=`${i}`,this._measureElements[3].style.fontWeight=`${n}`,this.clear())}get(e,t,i){let n=0;if(!t&&!i&&e.length===1&&(n=e.charCodeAt(0))<256){if(this._flat[n]!==-9999)return this._flat[n];let s=this._measure(e,0);return s>0&&(this._flat[n]=s),s}let r=e;t&&(r+="B"),i&&(r+="I");let a=this._holey.get(r);if(a===void 0){let s=0;t&&(s|=1),i&&(s|=2),a=this._measure(e,s),a>0&&this._holey.set(r,a)}return a}_measure(e,t){let i=this._measureElements[t];return i.textContent=e.repeat(32),i.offsetWidth/32}},Xq=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,i,n=!1){if(this.selectionStart=t,this.selectionEnd=i,!t||!i||t[0]===i[0]&&t[1]===i[1]){this.clear();return}let r=e.buffers.active.ydisp,a=t[1]-r,s=i[1]-r,l=Math.max(a,0),o=Math.min(s,e.rows-1);if(l>=e.rows||o<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=n,this.viewportStartRow=a,this.viewportEndRow=s,this.viewportCappedStartRow=l,this.viewportCappedEndRow=o,this.startCol=t[0],this.endCol=i[0]}isCellSelected(e,t,i){return this.hasSelection?(i-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&i>=this.viewportCappedStartRow&&t<this.endCol&&i<=this.viewportCappedEndRow:t<this.startCol&&i>=this.viewportCappedStartRow&&t>=this.endCol&&i<=this.viewportCappedEndRow:i>this.viewportStartRow&&i<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol):!1}};function Jq(){return new Xq}var rd="xterm-dom-renderer-owner-",cn="xterm-rows",hu="xterm-fg-",G_="xterm-bg-",yo="xterm-focus",fu="xterm-selection",Qq=1,qh=class extends nt{constructor(e,t,i,n,r,a,s,l,o,u,c,d,h,f){super(),this._terminal=e,this._document=t,this._element=i,this._screenElement=n,this._viewportElement=r,this._helperContainer=a,this._linkifier2=s,this._charSizeService=o,this._optionsService=u,this._bufferService=c,this._coreService=d,this._coreBrowserService=h,this._themeService=f,this._terminalClass=Qq++,this._rowElements=[],this._selectionRenderModel=Jq(),this.onRequestRedraw=this._register(new Oe).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(cn),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(fu),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=Gq(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(_=>this._injectCss(_))),this._injectCss(this._themeService.colors),this._rowFactory=l.createInstance(Kh,document),this._element.classList.add(rd+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(_=>this._handleLinkHover(_))),this._register(this._linkifier2.onHideLinkUnderline(_=>this._handleLinkLeave(_))),this._register(Rt(()=>{this._element.classList.remove(rd+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new Yq(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let i of this._rowElements)i.style.width=`${this.dimensions.css.canvas.width}px`,i.style.height=`${this.dimensions.css.cell.height}px`,i.style.lineHeight=`${this.dimensions.css.cell.height}px`,i.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${cn} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${cn} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${cn} .xterm-dim { color: ${Pt.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let i=`blink_underline_${this._terminalClass}`,n=`blink_bar_${this._terminalClass}`,r=`blink_block_${this._terminalClass}`;t+=`@keyframes ${i} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${n} { 50% { box-shadow: none; }}`,t+=`@keyframes ${r} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${cn}.${yo} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${cn}.${yo} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${cn}.${yo} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${cn} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${cn} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${cn} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${cn} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${cn} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${fu} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${fu} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${fu} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[a,s]of e.ansi.entries())t+=`${this._terminalSelector} .${hu}${a} { color: ${s.css}; }${this._terminalSelector} .${hu}${a}.xterm-dim { color: ${Pt.multiplyOpacity(s,.5).css}; }${this._terminalSelector} .${G_}${a} { background-color: ${s.css}; }`;t+=`${this._terminalSelector} .${hu}257 { color: ${Pt.opaque(e.background).css}; }${this._terminalSelector} .${hu}257.xterm-dim { color: ${Pt.multiplyOpacity(Pt.opaque(e.background),.5).css}; }${this._terminalSelector} .${G_}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let i=this._rowElements.length;i<=t;i++){let n=this._document.createElement("div");this._rowContainer.appendChild(n),this._rowElements.push(n)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(yo),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(yo),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,i){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,i),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,i),!this._selectionRenderModel.hasSelection))return;let n=this._selectionRenderModel.viewportStartRow,r=this._selectionRenderModel.viewportEndRow,a=this._selectionRenderModel.viewportCappedStartRow,s=this._selectionRenderModel.viewportCappedEndRow,l=this._document.createDocumentFragment();if(i){let o=e[0]>t[0];l.appendChild(this._createSelectionElement(a,o?t[0]:e[0],o?e[0]:t[0],s-a+1))}else{let o=n===a?e[0]:0,u=a===r?t[0]:this._bufferService.cols;l.appendChild(this._createSelectionElement(a,o,u));let c=s-a-1;if(l.appendChild(this._createSelectionElement(a+1,0,this._bufferService.cols,c)),a!==s){let d=r===s?t[0]:this._bufferService.cols;l.appendChild(this._createSelectionElement(s,0,d))}}this._selectionContainer.appendChild(l)}_createSelectionElement(e,t,i,n=1){let r=this._document.createElement("div"),a=t*this.dimensions.css.cell.width,s=this.dimensions.css.cell.width*(i-t);return a+s>this.dimensions.css.canvas.width&&(s=this.dimensions.css.canvas.width-a),r.style.height=`${n*this.dimensions.css.cell.height}px`,r.style.top=`${e*this.dimensions.css.cell.height}px`,r.style.left=`${a}px`,r.style.width=`${s}px`,r}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let i=this._bufferService.buffer,n=i.ybase+i.y,r=Math.min(i.x,this._bufferService.cols-1),a=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,s=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,l=this._optionsService.rawOptions.cursorInactiveStyle;for(let o=e;o<=t;o++){let u=o+i.ydisp,c=this._rowElements[o],d=i.lines.get(u);if(!c||!d)break;c.replaceChildren(...this._rowFactory.createRow(d,u,u===n,s,l,r,a,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${rd}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,i,n,r,a){i<0&&(e=0),n<0&&(t=0);let s=this._bufferService.rows-1;i=Math.max(Math.min(i,s),0),n=Math.max(Math.min(n,s),0),r=Math.min(r,this._bufferService.cols);let l=this._bufferService.buffer,o=l.ybase+l.y,u=Math.min(l.x,r-1),c=this._optionsService.rawOptions.cursorBlink,d=this._optionsService.rawOptions.cursorStyle,h=this._optionsService.rawOptions.cursorInactiveStyle;for(let f=i;f<=n;++f){let _=f+l.ydisp,m=this._rowElements[f],g=l.lines.get(_);if(!m||!g)break;m.replaceChildren(...this._rowFactory.createRow(g,_,_===o,d,h,u,c,this.dimensions.css.cell.width,this._widthCache,a?f===i?e:0:-1,a?(f===n?t:r)-1:-1))}}};qh=Kt([Ve(7,H2),Ve(8,s1),Ve(9,Ui),Ve(10,zi),Ve(11,ja),Ve(12,Hr),Ve(13,Ml)],qh);var Gh=class extends nt{constructor(e,t,i){super(),this._optionsService=i,this.width=0,this.height=0,this._onCharSizeChange=this._register(new Oe),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new tG(this._optionsService))}catch{this._measureStrategy=this._register(new eG(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};Gh=Kt([Ve(2,Ui)],Gh);var s5=class extends nt{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},eG=class extends s5{constructor(e,t,i){super(),this._document=e,this._parentElement=t,this._optionsService=i,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},tG=class extends s5{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},iG=class extends nt{constructor(e,t,i){super(),this._textarea=e,this._window=t,this.mainDocument=i,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new nG(this._window)),this._onDprChange=this._register(new Oe),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new Oe),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(n=>this._screenDprMonitor.setWindow(n))),this._register(Si.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(Ye(this._textarea,"focus",()=>this._isFocused=!0)),this._register(Ye(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},nG=class extends nt{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new Es),this._onDprChange=this._register(new Oe),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(Rt(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=Ye(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var e;this._outerListener&&((e=this._resolutionMediaMatchList)==null||e.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},rG=class extends nt{constructor(){super(),this.linkProviders=[],this._register(Rt(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function B2(e,t,i){let n=i.getBoundingClientRect(),r=e.getComputedStyle(i),a=parseInt(r.getPropertyValue("padding-left")),s=parseInt(r.getPropertyValue("padding-top"));return[t.clientX-n.left-a,t.clientY-n.top-s]}function aG(e,t,i,n,r,a,s,l,o){if(!a)return;let u=B2(e,t,i);if(u)return u[0]=Math.ceil((u[0]+(o?s/2:0))/s),u[1]=Math.ceil(u[1]/l),u[0]=Math.min(Math.max(u[0],1),n+(o?1:0)),u[1]=Math.min(Math.max(u[1],1),r),u}var Yh=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,i,n,r){return aG(window,e,t,i,n,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,r)}getMouseReportCoords(e,t){let i=B2(window,e,t);if(this._charSizeService.hasValidSize)return i[0]=Math.min(Math.max(i[0],0),this._renderService.dimensions.css.canvas.width-1),i[1]=Math.min(Math.max(i[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(i[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(i[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(i[0]),y:Math.floor(i[1])}}};Yh=Kt([Ve(0,Nr),Ve(1,s1)],Yh);var sG=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,i){this._rowCount=i,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},l5={};mK(l5,{getSafariVersion:()=>oG,isChromeOS:()=>d5,isFirefox:()=>o5,isIpad:()=>uG,isIphone:()=>cG,isLegacyEdge:()=>lG,isLinux:()=>Z2,isMac:()=>pc,isNode:()=>l1,isSafari:()=>u5,isWindows:()=>c5});var l1=typeof process<"u"&&"title"in process,N0=l1?"node":navigator.userAgent,P0=l1?"node":navigator.platform,o5=N0.includes("Firefox"),lG=N0.includes("Edge"),u5=/^((?!chrome|android).)*safari/i.test(N0);function oG(){if(!u5)return 0;let e=N0.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var pc=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(P0),uG=P0==="iPad",cG=P0==="iPhone",c5=["Windows","Win16","Win32","WinCE"].includes(P0),Z2=P0.indexOf("Linux")>=0,d5=/\bCrOS\b/.test(N0),h5=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,i=0,n=e.timeRemaining(),r=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),i=Math.max(t,i),r=e.timeRemaining(),i*1.5>r){n-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-t))}ms`),this._start();return}n=r}this.clear()}},dG=class extends h5{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},hG=class extends h5{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},_c=!l1&&"requestIdleCallback"in window?hG:dG,fG=class{constructor(){this._queue=new _c}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},Xh=class extends nt{constructor(e,t,i,n,r,a,s,l,o){super(),this._rowCount=e,this._optionsService=i,this._charSizeService=n,this._coreService=r,this._coreBrowserService=l,this._renderer=this._register(new Es),this._pausedResizeTask=new fG,this._observerDisposable=this._register(new Es),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new Oe),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new Oe),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new Oe),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new Oe),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new sG((u,c)=>this._renderRows(u,c),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new pG(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(Rt(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(s.onResize(()=>this._fullRefresh())),this._register(s.buffers.onBufferActivate(()=>{var u;return(u=this._renderer.value)==null?void 0:u.clear()})),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(a.onDecorationRegistered(()=>this._fullRefresh())),this._register(a.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(s.cols,s.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(s.buffer.y,s.buffer.y,!0))),this._register(o.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(u=>this._registerIntersectionObserver(u,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let i=new e.IntersectionObserver(n=>this._handleIntersectionChange(n[n.length-1]),{threshold:0});i.observe(t),this._observerDisposable.value=Rt(()=>i.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,i=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let n=this._syncOutputHandler.flush();n&&(e=Math.min(e,n.start),t=Math.max(t,n.end)),i||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var e,t;this._renderer.value&&((t=(e=this._renderer.value).clearTextureAtlas)==null||t.call(e),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var i;return(i=this._renderer.value)==null?void 0:i.handleResize(e,t)}):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){var e;(e=this._renderer.value)==null||e.handleCharSizeChanged()}handleBlur(){var e;(e=this._renderer.value)==null||e.handleBlur()}handleFocus(){var e;(e=this._renderer.value)==null||e.handleFocus()}handleSelectionChanged(e,t,i){var n;this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=i,(n=this._renderer.value)==null||n.handleSelectionChanged(e,t,i)}handleCursorMove(){var e;(e=this._renderer.value)==null||e.handleCursorMove()}clear(){var e;(e=this._renderer.value)==null||e.clear()}};Xh=Kt([Ve(2,Ui),Ve(3,s1),Ve(4,ja),Ve(5,H0),Ve(6,zi),Ve(7,Hr),Ve(8,Ml)],Xh);var pG=class{constructor(e,t,i){this._coreBrowserService=e,this._coreService=t,this._onTimeout=i,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function _G(e,t,i,n){let r=i.buffer.x,a=i.buffer.y;if(!i.buffer.hasScrollback)return gG(r,a,e,t,i,n)+o1(a,t,i,n)+bG(r,a,e,t,i,n);let s;if(a===t)return s=r>e?"D":"C",y0(Math.abs(r-e),b0(s,n));s=a>t?"D":"C";let l=Math.abs(a-t),o=vG(a>t?e:r,i)+(l-1)*i.cols+1+mG(a>t?r:e);return y0(o,b0(s,n))}function mG(e,t){return e-1}function vG(e,t){return t.cols-e}function gG(e,t,i,n,r,a){return o1(t,n,r,a).length===0?"":y0(p5(e,t,e,t-Ua(t,r),!1,r).length,b0("D",a))}function o1(e,t,i,n){let r=e-Ua(e,i),a=t-Ua(t,i),s=Math.abs(r-a)-yG(e,t,i);return y0(s,b0(f5(e,t),n))}function bG(e,t,i,n,r,a){let s;o1(t,n,r,a).length>0?s=n-Ua(n,r):s=t;let l=n,o=wG(e,t,i,n,r,a);return y0(p5(e,s,i,l,o==="C",r).length,b0(o,a))}function yG(e,t,i){var s;let n=0,r=e-Ua(e,i),a=t-Ua(t,i);for(let l=0;l<Math.abs(r-a);l++){let o=f5(e,t)==="A"?-1:1;(s=i.buffer.lines.get(r+o*l))!=null&&s.isWrapped&&n++}return n}function Ua(e,t){let i=0,n=t.buffer.lines.get(e),r=n==null?void 0:n.isWrapped;for(;r&&e>=0&&e<t.rows;)i++,n=t.buffer.lines.get(--e),r=n==null?void 0:n.isWrapped;return i}function wG(e,t,i,n,r,a){let s;return o1(i,n,r,a).length>0?s=n-Ua(n,r):s=t,e<i&&s<=n||e>=i&&s<n?"C":"D"}function f5(e,t){return e>t?"A":"B"}function p5(e,t,i,n,r,a){let s=e,l=t,o="";for(;(s!==i||l!==n)&&l>=0&&l<a.buffer.lines.length;)s+=r?1:-1,r&&s>a.cols-1?(o+=a.buffer.translateBufferLineToString(l,!1,e,s),s=0,e=0,l++):!r&&s<0&&(o+=a.buffer.translateBufferLineToString(l,!1,0,e+1),s=a.cols-1,e=s,l--);return o+a.buffer.translateBufferLineToString(l,!1,e,s)}function b0(e,t){let i=t?"O":"[";return Ee.ESC+i+e}function y0(e,t){e=Math.floor(e);let i="";for(let n=0;n<e;n++)i+=t;return i}var SG=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function Y_(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var ad=50,CG=15,kG=50,AG=500,$G=" ",MG=new RegExp($G,"g"),Jh=class extends nt{constructor(e,t,i,n,r,a,s,l,o){super(),this._element=e,this._screenElement=t,this._linkifier=i,this._bufferService=n,this._coreService=r,this._mouseService=a,this._optionsService=s,this._renderService=l,this._coreBrowserService=o,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new vn,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new Oe),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new Oe),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new Oe),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new Oe),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=u=>this._handleMouseMove(u),this._mouseUpListener=u=>this._handleMouseUp(u),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(u=>this._handleTrim(u)),this._register(this._bufferService.buffers.onBufferActivate(u=>this._handleBufferActivate(u))),this.enable(),this._model=new SG(this._bufferService),this._activeSelectionMode=0,this._register(Rt(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(u=>{u.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let i=this._bufferService.buffer,n=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let r=e[0]<t[0]?e[0]:t[0],a=e[0]<t[0]?t[0]:e[0];for(let s=e[1];s<=t[1];s++){let l=i.translateBufferLineToString(s,!0,r,a);n.push(l)}}else{let r=e[1]===t[1]?t[0]:void 0;n.push(i.translateBufferLineToString(e[1],!0,e[0],r));for(let a=e[1]+1;a<=t[1]-1;a++){let s=i.lines.get(a),l=i.translateBufferLineToString(a,!0);s!=null&&s.isWrapped?n[n.length-1]+=l:n.push(l)}if(e[1]!==t[1]){let a=i.lines.get(t[1]),s=i.translateBufferLineToString(t[1],!0,0,t[0]);a&&a.isWrapped?n[n.length-1]+=s:n.push(s)}}return n.map(r=>r.replace(MG," ")).join(c5?`\r
|
|
93
|
+
`:`
|
|
94
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),Z2&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),i=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!i||!n||!t?!1:this._areCoordsInSelection(t,i,n)}isCellInSelection(e,t){let i=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!i||!n?!1:this._areCoordsInSelection([e,t],i,n)}_areCoordsInSelection(e,t,i){return e[1]>t[1]&&e[1]<i[1]||t[1]===i[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<i[0]||t[1]<i[1]&&e[1]===i[1]&&e[0]<i[0]||t[1]<i[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){var r,a;let i=(a=(r=this._linkifier.currentLink)==null?void 0:r.link)==null?void 0:a.range;if(i)return this._model.selectionStart=[i.start.x-1,i.start.y-1],this._model.selectionStartLength=Y_(i,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let n=this._getMouseBufferCoords(e);return n?(this._selectWordAt(n,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=B2(this._coreBrowserService.window,e,this._screenElement)[1],i=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=i?0:(t>i&&(t-=i),t=Math.min(Math.max(t,-ad),ad),t/=ad,t/Math.abs(t)+Math.round(t*(CG-1)))}shouldForceSelection(e){return pc?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),kG)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(pc&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let i=this._bufferService.buffer;if(this._model.selectionEnd[1]<i.lines.length){let n=i.lines.get(this._model.selectionEnd[1]);n&&n.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<AG&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let i=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(i&&i[0]!==void 0&&i[1]!==void 0){let n=_G(i[0]-1,i[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(n,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,i=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!i){this._oldHasSelection&&this._fireOnSelectionChange(e,t,i);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,i)}_fireOnSelectionChange(e,t,i){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=i,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let i=t;for(let n=0;t>=n;n++){let r=e.loadCell(n,this._workCell).getChars().length;this._workCell.getWidth()===0?i--:r>1&&t!==n&&(i+=r-1)}return i}setSelection(e,t,i){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=i,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,i=!0,n=!0){if(e[0]>=this._bufferService.cols)return;let r=this._bufferService.buffer,a=r.lines.get(e[1]);if(!a)return;let s=r.translateBufferLineToString(e[1],!1),l=this._convertViewportColToCharacterIndex(a,e[0]),o=l,u=e[0]-l,c=0,d=0,h=0,f=0;if(s.charAt(l)===" "){for(;l>0&&s.charAt(l-1)===" ";)l--;for(;o<s.length&&s.charAt(o+1)===" ";)o++}else{let g=e[0],v=e[0];a.getWidth(g)===0&&(c++,g--),a.getWidth(v)===2&&(d++,v++);let w=a.getString(v).length;for(w>1&&(f+=w-1,o+=w-1);g>0&&l>0&&!this._isCharWordSeparator(a.loadCell(g-1,this._workCell));){a.loadCell(g-1,this._workCell);let S=this._workCell.getChars().length;this._workCell.getWidth()===0?(c++,g--):S>1&&(h+=S-1,l-=S-1),l--,g--}for(;v<a.length&&o+1<s.length&&!this._isCharWordSeparator(a.loadCell(v+1,this._workCell));){a.loadCell(v+1,this._workCell);let S=this._workCell.getChars().length;this._workCell.getWidth()===2?(d++,v++):S>1&&(f+=S-1,o+=S-1),o++,v++}}o++;let _=l+u-c+h,m=Math.min(this._bufferService.cols,o-l+c+d-h-f);if(!(!t&&s.slice(l,o).trim()==="")){if(i&&_===0&&a.getCodePoint(0)!==32){let g=r.lines.get(e[1]-1);if(g&&a.isWrapped&&g.getCodePoint(this._bufferService.cols-1)!==32){let v=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(v){let w=this._bufferService.cols-v.start;_-=w,m+=w}}}if(n&&_+m===this._bufferService.cols&&a.getCodePoint(this._bufferService.cols-1)!==32){let g=r.lines.get(e[1]+1);if(g!=null&&g.isWrapped&&g.getCodePoint(0)!==32){let v=this._getWordAt([0,e[1]+1],!1,!1,!0);v&&(m+=v.length)}}return{start:_,length:m}}}_selectWordAt(e,t){let i=this._getWordAt(e,t);if(i){for(;i.start<0;)i.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[i.start,e[1]],this._model.selectionStartLength=i.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let i=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,i--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,i++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,i]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),i={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=Y_(i,this._bufferService.cols)}};Jh=Kt([Ve(3,zi),Ve(4,ja),Ve(5,N2),Ve(6,Ui),Ve(7,Nr),Ve(8,Hr)],Jh);var X_=class{constructor(){this._data={}}set(e,t,i){this._data[e]||(this._data[e]={}),this._data[e][t]=i}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},J_=class{constructor(){this._color=new X_,this._css=new X_}setCss(e,t,i){this._css.set(e,t,i)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,i){this._color.set(e,t,i)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},ni=Object.freeze((()=>{let e=[Bt.toColor("#2e3436"),Bt.toColor("#cc0000"),Bt.toColor("#4e9a06"),Bt.toColor("#c4a000"),Bt.toColor("#3465a4"),Bt.toColor("#75507b"),Bt.toColor("#06989a"),Bt.toColor("#d3d7cf"),Bt.toColor("#555753"),Bt.toColor("#ef2929"),Bt.toColor("#8ae234"),Bt.toColor("#fce94f"),Bt.toColor("#729fcf"),Bt.toColor("#ad7fa8"),Bt.toColor("#34e2e2"),Bt.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let i=0;i<216;i++){let n=t[i/36%6|0],r=t[i/6%6|0],a=t[i%6];e.push({css:ei.toCss(n,r,a),rgba:ei.toRgba(n,r,a)})}for(let i=0;i<24;i++){let n=8+i*10;e.push({css:ei.toCss(n,n,n),rgba:ei.toRgba(n,n,n)})}return e})()),Ea=Bt.toColor("#ffffff"),xo=Bt.toColor("#000000"),Q_=Bt.toColor("#ffffff"),em=xo,wo={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},LG=Ea,Qh=class extends nt{constructor(e){super(),this._optionsService=e,this._contrastCache=new J_,this._halfContrastCache=new J_,this._onChangeColors=this._register(new Oe),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:Ea,background:xo,cursor:Q_,cursorAccent:em,selectionForeground:void 0,selectionBackgroundTransparent:wo,selectionBackgroundOpaque:Pt.blend(xo,wo),selectionInactiveBackgroundTransparent:wo,selectionInactiveBackgroundOpaque:Pt.blend(xo,wo),scrollbarSliderBackground:Pt.opacity(Ea,.2),scrollbarSliderHoverBackground:Pt.opacity(Ea,.4),scrollbarSliderActiveBackground:Pt.opacity(Ea,.5),overviewRulerBorder:Ea,ansi:ni.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=$t(e.foreground,Ea),t.background=$t(e.background,xo),t.cursor=Pt.blend(t.background,$t(e.cursor,Q_)),t.cursorAccent=Pt.blend(t.background,$t(e.cursorAccent,em)),t.selectionBackgroundTransparent=$t(e.selectionBackground,wo),t.selectionBackgroundOpaque=Pt.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=$t(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=Pt.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?$t(e.selectionForeground,K_):void 0,t.selectionForeground===K_&&(t.selectionForeground=void 0),Pt.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=Pt.opacity(t.selectionBackgroundTransparent,.3)),Pt.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=Pt.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=$t(e.scrollbarSliderBackground,Pt.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=$t(e.scrollbarSliderHoverBackground,Pt.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=$t(e.scrollbarSliderActiveBackground,Pt.opacity(t.foreground,.5)),t.overviewRulerBorder=$t(e.overviewRulerBorder,LG),t.ansi=ni.slice(),t.ansi[0]=$t(e.black,ni[0]),t.ansi[1]=$t(e.red,ni[1]),t.ansi[2]=$t(e.green,ni[2]),t.ansi[3]=$t(e.yellow,ni[3]),t.ansi[4]=$t(e.blue,ni[4]),t.ansi[5]=$t(e.magenta,ni[5]),t.ansi[6]=$t(e.cyan,ni[6]),t.ansi[7]=$t(e.white,ni[7]),t.ansi[8]=$t(e.brightBlack,ni[8]),t.ansi[9]=$t(e.brightRed,ni[9]),t.ansi[10]=$t(e.brightGreen,ni[10]),t.ansi[11]=$t(e.brightYellow,ni[11]),t.ansi[12]=$t(e.brightBlue,ni[12]),t.ansi[13]=$t(e.brightMagenta,ni[13]),t.ansi[14]=$t(e.brightCyan,ni[14]),t.ansi[15]=$t(e.brightWhite,ni[15]),e.extendedAnsi){let i=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let n=0;n<i;n++)t.ansi[n+16]=$t(e.extendedAnsi[n],ni[n+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};Qh=Kt([Ve(0,Ui)],Qh);function $t(e,t){if(e!==void 0)try{return Bt.toColor(e)}catch{}return t}var EG=class{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){let i=this._entries.get(e);return this._entries.set(e,t),i}forEach(e){for(let[t,i]of this._entries.entries())e(t,i)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},xG=class{constructor(){this._services=new EG,this._services.set(H2,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let i=CK(e).sort((a,s)=>a.index-s.index),n=[];for(let a of i){let s=this._services.get(a.id);if(!s)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id._id}.`);n.push(s)}let r=i.length>0?i[0].index:t.length;if(t.length!==r)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);return new e(...t,...n)}},TG={trace:0,debug:1,info:2,warn:3,error:4,off:5},HG="xterm.js: ",ef=class extends nt{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=TG[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":HG)+t,...i)}trace(e,...t){var i;this._logLevel<=0&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.trace.bind(this._optionsService.options.logger))??console.log,e,t)}debug(e,...t){var i;this._logLevel<=1&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.debug.bind(this._optionsService.options.logger))??console.log,e,t)}info(e,...t){var i;this._logLevel<=2&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.info.bind(this._optionsService.options.logger))??console.info,e,t)}warn(e,...t){var i;this._logLevel<=3&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.warn.bind(this._optionsService.options.logger))??console.warn,e,t)}error(e,...t){var i;this._logLevel<=4&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.error.bind(this._optionsService.options.logger))??console.error,e,t)}};ef=Kt([Ve(0,Ui)],ef);var tm=class extends nt{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new Oe),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new Oe),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new Oe),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let i=0;i<Math.min(e,this.length);i++)t[i]=this._array[this._getCyclicIndex(i)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...i){if(t){for(let n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let n=this._length-1;n>=e;n--)this._array[this._getCyclicIndex(n+i.length)]=this._array[this._getCyclicIndex(n)];for(let n=0;n<i.length;n++)this._array[this._getCyclicIndex(e+n)]=i[n];if(i.length&&this.onInsertEmitter.fire({index:e,amount:i.length}),this._length+i.length>this._maxLength){let n=this._length+i.length-this._maxLength;this._startIndex+=n,this._length=this._maxLength,this.onTrimEmitter.fire(n)}else this._length+=i.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,i){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(i>0){for(let r=t-1;r>=0;r--)this.set(e+r+i,this.get(e+r));let n=e+t+i-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let n=0;n<t;n++)this.set(e+n+i,this.get(e+n))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},it=3,Qt=Object.freeze(new T0),pu=0,sd=2,To=class _5{constructor(t,i,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*it);let r=i||vn.fromCharData([0,Py,1,0]);for(let a=0;a<t;++a)this.setCell(a,r);this.length=t}get(t){let i=this._data[t*it+0],n=i&2097151;return[this._data[t*it+1],i&2097152?this._combined[t]:n?Kr(n):"",i>>22,i&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):n]}set(t,i){this._data[t*it+1]=i[0],i[1].length>1?(this._combined[t]=i[1],this._data[t*it+0]=t|2097152|i[2]<<22):this._data[t*it+0]=i[1].charCodeAt(0)|i[2]<<22}getWidth(t){return this._data[t*it+0]>>22}hasWidth(t){return this._data[t*it+0]&12582912}getFg(t){return this._data[t*it+1]}getBg(t){return this._data[t*it+2]}hasContent(t){return this._data[t*it+0]&4194303}getCodePoint(t){let i=this._data[t*it+0];return i&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):i&2097151}isCombined(t){return this._data[t*it+0]&2097152}getString(t){let i=this._data[t*it+0];return i&2097152?this._combined[t]:i&2097151?Kr(i&2097151):""}isProtected(t){return this._data[t*it+2]&536870912}loadCell(t,i){return pu=t*it,i.content=this._data[pu+0],i.fg=this._data[pu+1],i.bg=this._data[pu+2],i.content&2097152&&(i.combinedData=this._combined[t]),i.bg&268435456&&(i.extended=this._extendedAttrs[t]),i}setCell(t,i){i.content&2097152&&(this._combined[t]=i.combinedData),i.bg&268435456&&(this._extendedAttrs[t]=i.extended),this._data[t*it+0]=i.content,this._data[t*it+1]=i.fg,this._data[t*it+2]=i.bg}setCellFromCodepoint(t,i,n,r){r.bg&268435456&&(this._extendedAttrs[t]=r.extended),this._data[t*it+0]=i|n<<22,this._data[t*it+1]=r.fg,this._data[t*it+2]=r.bg}addCodepointToCell(t,i,n){let r=this._data[t*it+0];r&2097152?this._combined[t]+=Kr(i):r&2097151?(this._combined[t]=Kr(r&2097151)+Kr(i),r&=-2097152,r|=2097152):r=i|1<<22,n&&(r&=-12582913,r|=n<<22),this._data[t*it+0]=r}insertCells(t,i,n){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),i<this.length-t){let r=new vn;for(let a=this.length-t-i-1;a>=0;--a)this.setCell(t+i+a,this.loadCell(t+a,r));for(let a=0;a<i;++a)this.setCell(t+a,n)}else for(let r=t;r<this.length;++r)this.setCell(r,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(t,i,n){if(t%=this.length,i<this.length-t){let r=new vn;for(let a=0;a<this.length-t-i;++a)this.setCell(t+a,this.loadCell(t+i+a,r));for(let a=this.length-i;a<this.length;++a)this.setCell(a,n)}else for(let r=t;r<this.length;++r)this.setCell(r,n);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,n)}replaceCells(t,i,n,r=!1){if(r){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,n),i<this.length&&this.getWidth(i-1)===2&&!this.isProtected(i)&&this.setCellFromCodepoint(i,0,1,n);t<i&&t<this.length;)this.isProtected(t)||this.setCell(t,n),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),i<this.length&&this.getWidth(i-1)===2&&this.setCellFromCodepoint(i,0,1,n);t<i&&t<this.length;)this.setCell(t++,n)}resize(t,i){if(t===this.length)return this._data.length*4*sd<this._data.buffer.byteLength;let n=t*it;if(t>this.length){if(this._data.buffer.byteLength>=n*4)this._data=new Uint32Array(this._data.buffer,0,n);else{let r=new Uint32Array(n);r.set(this._data),this._data=r}for(let r=this.length;r<t;++r)this.setCell(r,i)}else{this._data=this._data.subarray(0,n);let r=Object.keys(this._combined);for(let s=0;s<r.length;s++){let l=parseInt(r[s],10);l>=t&&delete this._combined[l]}let a=Object.keys(this._extendedAttrs);for(let s=0;s<a.length;s++){let l=parseInt(a[s],10);l>=t&&delete this._extendedAttrs[l]}}return this.length=t,n*4*sd<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*sd<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,i=!1){if(i){for(let n=0;n<this.length;++n)this.isProtected(n)||this.setCell(n,t);return}this._combined={},this._extendedAttrs={};for(let n=0;n<this.length;++n)this.setCell(n,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let i in t._combined)this._combined[i]=t._combined[i];this._extendedAttrs={};for(let i in t._extendedAttrs)this._extendedAttrs[i]=t._extendedAttrs[i];this.isWrapped=t.isWrapped}clone(){let t=new _5(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let i in this._combined)t._combined[i]=this._combined[i];for(let i in this._extendedAttrs)t._extendedAttrs[i]=this._extendedAttrs[i];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*it+0]&4194303)return t+(this._data[t*it+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*it+0]&4194303||this._data[t*it+2]&50331648)return t+(this._data[t*it+0]>>22);return 0}copyCellsFrom(t,i,n,r,a){let s=t._data;if(a)for(let o=r-1;o>=0;o--){for(let u=0;u<it;u++)this._data[(n+o)*it+u]=s[(i+o)*it+u];s[(i+o)*it+2]&268435456&&(this._extendedAttrs[n+o]=t._extendedAttrs[i+o])}else for(let o=0;o<r;o++){for(let u=0;u<it;u++)this._data[(n+o)*it+u]=s[(i+o)*it+u];s[(i+o)*it+2]&268435456&&(this._extendedAttrs[n+o]=t._extendedAttrs[i+o])}let l=Object.keys(t._combined);for(let o=0;o<l.length;o++){let u=parseInt(l[o],10);u>=i&&(this._combined[u-i+n]=t._combined[u])}}translateToString(t,i,n,r){i=i??0,n=n??this.length,t&&(n=Math.min(n,this.getTrimmedLength())),r&&(r.length=0);let a="";for(;i<n;){let s=this._data[i*it+0],l=s&2097151,o=s&2097152?this._combined[i]:l?Kr(l):Yr;if(a+=o,r)for(let u=0;u<o.length;++u)r.push(i);i+=s>>22||1}return r&&r.push(i),a}};function NG(e,t,i,n,r,a){let s=[];for(let l=0;l<e.length-1;l++){let o=l,u=e.get(++o);if(!u.isWrapped)continue;let c=[e.get(l)];for(;o<e.length&&u.isWrapped;)c.push(u),u=e.get(++o);if(!a&&n>=l&&n<o){l+=c.length-1;continue}let d=0,h=w0(c,d,t),f=1,_=0;for(;f<c.length;){let g=w0(c,f,t),v=g-_,w=i-h,S=Math.min(v,w);c[d].copyCellsFrom(c[f],_,h,S,!1),h+=S,h===i&&(d++,h=0),_+=S,_===g&&(f++,_=0),h===0&&d!==0&&c[d-1].getWidth(i-1)===2&&(c[d].copyCellsFrom(c[d-1],i-1,h++,1,!1),c[d-1].setCell(i-1,r))}c[d].replaceCells(h,i,r);let m=0;for(let g=c.length-1;g>0&&(g>d||c[g].getTrimmedLength()===0);g--)m++;m>0&&(s.push(l+c.length-m),s.push(m)),l+=c.length-1}return s}function PG(e,t){let i=[],n=0,r=t[n],a=0;for(let s=0;s<e.length;s++)if(r===s){let l=t[++n];e.onDeleteEmitter.fire({index:s-a,amount:l}),s+=l-1,a+=l,r=t[++n]}else i.push(s);return{layout:i,countRemoved:a}}function OG(e,t){let i=[];for(let n=0;n<t.length;n++)i.push(e.get(t[n]));for(let n=0;n<i.length;n++)e.set(n,i[n]);e.length=t.length}function IG(e,t,i){let n=[],r=e.map((o,u)=>w0(e,u,t)).reduce((o,u)=>o+u),a=0,s=0,l=0;for(;l<r;){if(r-l<i){n.push(r-l);break}a+=i;let o=w0(e,s,t);a>o&&(a-=o,s++);let u=e[s].getWidth(a-1)===2;u&&a--;let c=u?i-1:i;n.push(c),l+=c}return n}function w0(e,t,i){if(t===e.length-1)return e[t].getTrimmedLength();let n=!e[t].hasContent(i-1)&&e[t].getWidth(i-1)===1,r=e[t+1].getWidth(0)===2;return n&&r?i-1:i}var m5=class v5{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=v5._nextId++,this._onDispose=this.register(new Oe),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),za(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};m5._nextId=1;var RG=m5,ci={},xa=ci.B;ci[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"};ci.A={"#":"£"};ci.B=void 0;ci[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"};ci.C=ci[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};ci.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"};ci.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"};ci.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"};ci.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"};ci.E=ci[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"};ci.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"};ci.H=ci[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};ci["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"};var im=4294967295,nm=class{constructor(e,t,i){this._hasScrollback=e,this._optionsService=t,this._bufferService=i,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=Qt.clone(),this.savedCharset=xa,this.markers=[],this._nullCell=vn.fromCharData([0,Py,1,0]),this._whitespaceCell=vn.fromCharData([0,Yr,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new _c,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new tm(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new dc),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new dc),this._whitespaceCell}getBlankLine(e,t){return new To(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>im?im:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=Qt);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new tm(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let i=this.getNullCell(Qt),n=0,r=this._getCorrectBufferLength(t);if(r>this.lines.maxLength&&(this.lines.maxLength=r),this.lines.length>0){if(this._cols<e)for(let s=0;s<this.lines.length;s++)n+=+this.lines.get(s).resize(e,i);let a=0;if(this._rows<t)for(let s=this._rows;s<t;s++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new To(e,i)):this.ybase>0&&this.lines.length<=this.ybase+this.y+a+1?(this.ybase--,a++,this.ydisp>0&&this.ydisp--):this.lines.push(new To(e,i)));else for(let s=this._rows;s>t;s--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(r<this.lines.maxLength){let s=this.lines.length-r;s>0&&(this.lines.trimStart(s),this.ybase=Math.max(this.ybase-s,0),this.ydisp=Math.max(this.ydisp-s,0),this.savedY=Math.max(this.savedY-s,0)),this.lines.maxLength=r}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),a&&(this.y+=a),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let a=0;a<this.lines.length;a++)n+=+this.lines.get(a).resize(e,i);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),n>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let i=this._optionsService.rawOptions.reflowCursorLine,n=NG(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(Qt),i);if(n.length>0){let r=PG(this.lines,n);OG(this.lines,r.layout),this._reflowLargerAdjustViewport(e,t,r.countRemoved)}}_reflowLargerAdjustViewport(e,t,i){let n=this.getNullCell(Qt),r=i;for(;r-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new To(e,n))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-i,0)}_reflowSmaller(e,t){let i=this._optionsService.rawOptions.reflowCursorLine,n=this.getNullCell(Qt),r=[],a=0;for(let s=this.lines.length-1;s>=0;s--){let l=this.lines.get(s);if(!l||!l.isWrapped&&l.getTrimmedLength()<=e)continue;let o=[l];for(;l.isWrapped&&s>0;)l=this.lines.get(--s),o.unshift(l);if(!i){let S=this.ybase+this.y;if(S>=s&&S<s+o.length)continue}let u=o[o.length-1].getTrimmedLength(),c=IG(o,this._cols,e),d=c.length-o.length,h;this.ybase===0&&this.y!==this.lines.length-1?h=Math.max(0,this.y-this.lines.maxLength+d):h=Math.max(0,this.lines.length-this.lines.maxLength+d);let f=[];for(let S=0;S<d;S++){let y=this.getBlankLine(Qt,!0);f.push(y)}f.length>0&&(r.push({start:s+o.length+a,newLines:f}),a+=f.length),o.push(...f);let _=c.length-1,m=c[_];m===0&&(_--,m=c[_]);let g=o.length-d-1,v=u;for(;g>=0;){let S=Math.min(v,m);if(o[_]===void 0)break;if(o[_].copyCellsFrom(o[g],v-S,m-S,S,!0),m-=S,m===0&&(_--,m=c[_]),v-=S,v===0){g--;let y=Math.max(g,0);v=w0(o,y,this._cols)}}for(let S=0;S<o.length;S++)c[S]<e&&o[S].setCell(c[S],n);let w=d-h;for(;w-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+a)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+d,this.ybase+t-1)}if(r.length>0){let s=[],l=[];for(let m=0;m<this.lines.length;m++)l.push(this.lines.get(m));let o=this.lines.length,u=o-1,c=0,d=r[c];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+a);let h=0;for(let m=Math.min(this.lines.maxLength-1,o+a-1);m>=0;m--)if(d&&d.start>u+h){for(let g=d.newLines.length-1;g>=0;g--)this.lines.set(m--,d.newLines[g]);m++,s.push({index:u+1,amount:d.newLines.length}),h+=d.newLines.length,d=r[++c]}else this.lines.set(m,l[u--]);let f=0;for(let m=s.length-1;m>=0;m--)s[m].index+=f,this.lines.onInsertEmitter.fire(s[m]),f+=s[m].amount;let _=Math.max(0,o+a-this.lines.maxLength);_>0&&this.lines.onTrimEmitter.fire(_)}}translateBufferLineToString(e,t,i=0,n){let r=this.lines.get(e);return r?r.translateToString(t,i,n):""}getWrappedRangeForLine(e){let t=e,i=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;i+1<this.lines.length&&this.lines.get(i+1).isWrapped;)i++;return{first:t,last:i}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new RG(e);return this.markers.push(t),t.register(this.lines.onTrim(i=>{t.line-=i,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(i=>{t.line>=i.index&&(t.line+=i.amount)})),t.register(this.lines.onDelete(i=>{t.line>=i.index&&t.line<i.index+i.amount&&t.dispose(),t.line>i.index&&(t.line-=i.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},DG=class extends nt{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new Oe),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new nm(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new nm(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},g5=2,b5=1,tf=class extends nt{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new Oe),this.onResize=this._onResize.event,this._onScroll=this._register(new Oe),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,g5),this.rows=Math.max(e.rawOptions.rows||0,b5),this.buffers=this._register(new DG(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let i=this.cols!==e,n=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:i,rowsChanged:n})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let i=this.buffer,n;n=this._cachedBlankLine,(!n||n.length!==this.cols||n.getFg(0)!==e.fg||n.getBg(0)!==e.bg)&&(n=i.getBlankLine(e,t),this._cachedBlankLine=n),n.isWrapped=t;let r=i.ybase+i.scrollTop,a=i.ybase+i.scrollBottom;if(i.scrollTop===0){let s=i.lines.isFull;a===i.lines.length-1?s?i.lines.recycle().copyFrom(n):i.lines.push(n.clone()):i.lines.splice(a+1,0,n.clone()),s?this.isUserScrolling&&(i.ydisp=Math.max(i.ydisp-1,0)):(i.ybase++,this.isUserScrolling||i.ydisp++)}else{let s=a-r+1;i.lines.shiftElements(r+1,s-1,-1),i.lines.set(a,n.clone())}this.isUserScrolling||(i.ydisp=i.ybase),this._onScroll.fire(i.ydisp)}scrollLines(e,t){let i=this.buffer;if(e<0){if(i.ydisp===0)return;this.isUserScrolling=!0}else e+i.ydisp>=i.ybase&&(this.isUserScrolling=!1);let n=i.ydisp;i.ydisp=Math.max(Math.min(i.ydisp+e,i.ybase),0),n!==i.ydisp&&(t||this._onScroll.fire(i.ydisp))}};tf=Kt([Ve(0,Ui)],tf);var es={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:pc,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},VG=["normal","bold","100","200","300","400","500","600","700","800","900"],BG=class extends nt{constructor(e){super(),this._onOptionChange=this._register(new Oe),this.onOptionChange=this._onOptionChange.event;let t={...es};for(let i in e)if(i in t)try{let n=e[i];t[i]=this._sanitizeAndValidateOption(i,n)}catch(n){console.error(n)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(Rt(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(i=>{i===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(i=>{e.indexOf(i)!==-1&&t()})}_setupOptions(){let e=i=>{if(!(i in es))throw new Error(`No option with key "${i}"`);return this.rawOptions[i]},t=(i,n)=>{if(!(i in es))throw new Error(`No option with key "${i}"`);n=this._sanitizeAndValidateOption(i,n),this.rawOptions[i]!==n&&(this.rawOptions[i]=n,this._onOptionChange.fire(i))};for(let i in this.rawOptions){let n={get:e.bind(this,i),set:t.bind(this,i)};Object.defineProperty(this.options,i,n)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=es[e]),!ZG(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=es[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=VG.includes(t)?t:es[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function ZG(e){return e==="block"||e==="underline"||e==="bar"}function Ho(e,t=5){if(typeof e!="object")return e;let i=Array.isArray(e)?[]:{};for(let n in e)i[n]=t<=1?e[n]:e[n]&&Ho(e[n],t-1);return i}var rm=Object.freeze({insertMode:!1}),am=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),nf=class extends nt{constructor(e,t,i){super(),this._bufferService=e,this._logService=t,this._optionsService=i,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new Oe),this.onData=this._onData.event,this._onUserInput=this._register(new Oe),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new Oe),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new Oe),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=Ho(rm),this.decPrivateModes=Ho(am)}reset(){this.modes=Ho(rm),this.decPrivateModes=Ho(am)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let i=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&i.ybase!==i.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(n=>n.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};nf=Kt([Ve(0,zi),Ve(1,Vy),Ve(2,Ui)],nf);var sm={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function ld(e,t){let i=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(i|=64,i|=e.action):(i|=e.button&3,e.button&4&&(i|=64),e.button&8&&(i|=128),e.action===32?i|=32:e.action===0&&!t&&(i|=3)),i}var od=String.fromCharCode,lm={DEFAULT:e=>{let t=[ld(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${od(t[0])}${od(t[1])}${od(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${ld(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${ld(e,!0)};${e.x};${e.y}${t}`}},rf=class extends nt{constructor(e,t,i){super(),this._bufferService=e,this._coreService=t,this._optionsService=i,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new Oe),this.onProtocolChange=this._onProtocolChange.event;for(let n of Object.keys(sm))this.addProtocol(n,sm[n]);for(let n of Object.keys(lm))this.addEncoding(n,lm[n]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,i){if(e.deltaY===0||e.shiftKey||t===void 0||i===void 0)return 0;let n=t/i,r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(r/=n+0,Math.abs(e.deltaY)<50&&(r*=.3),this._wheelPartialScroll+=r,r=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._bufferService.rows),r}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,i){if(i){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};rf=Kt([Ve(0,zi),Ve(1,ja),Ve(2,Ui)],rf);var ud=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],FG=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],ri;function zG(e,t){let i=0,n=t.length-1,r;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=i;)if(r=i+n>>1,e>t[r][1])i=r+1;else if(e<t[r][0])n=r-1;else return!0;return!1}var UG=class{constructor(){if(this.version="6",!ri){ri=new Uint8Array(65536),ri.fill(1),ri[0]=0,ri.fill(0,1,32),ri.fill(0,127,160),ri.fill(2,4352,4448),ri[9001]=2,ri[9002]=2,ri.fill(2,11904,42192),ri[12351]=1,ri.fill(2,44032,55204),ri.fill(2,63744,64256),ri.fill(2,65040,65050),ri.fill(2,65072,65136),ri.fill(2,65280,65377),ri.fill(2,65504,65511);for(let e=0;e<ud.length;++e)ri.fill(0,ud[e][0],ud[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?ri[e]:zG(e,FG)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let i=this.wcwidth(e),n=i===0&&t!==0;if(n){let r=Da.extractWidth(t);r===0?n=!1:r>i&&(i=r)}return Da.createPropertyValue(0,i,n)}},Da=class Eu{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new Oe,this.onChange=this._onChange.event;let t=new UG;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,i,n=!1){return(t&16777215)<<3|(i&3)<<1|(n?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let i=0,n=0,r=t.length;for(let a=0;a<r;++a){let s=t.charCodeAt(a);if(55296<=s&&s<=56319){if(++a>=r)return i+this.wcwidth(s);let u=t.charCodeAt(a);56320<=u&&u<=57343?s=(s-55296)*1024+u-56320+65536:i+=this.wcwidth(u)}let l=this.charProperties(s,n),o=Eu.extractWidth(l);Eu.extractShouldJoin(l)&&(o-=Eu.extractWidth(n)),i+=o,n=l}return i}charProperties(t,i){return this._activeProvider.charProperties(t,i)}},WG=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function om(e){var n;let t=(n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1))==null?void 0:n.get(e.cols-1),i=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);i&&t&&(i.isWrapped=t[3]!==0&&t[3]!==32)}var So=2147483647,jG=256,y5=class af{constructor(t=32,i=32){if(this.maxLength=t,this.maxSubParamsLength=i,i>jG)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(i),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let i=new af;if(!t.length)return i;for(let n=Array.isArray(t[0])?1:0;n<t.length;++n){let r=t[n];if(Array.isArray(r))for(let a=0;a<r.length;++a)i.addSubParam(r[a]);else i.addParam(r)}return i}clone(){let t=new af(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let i=0;i<this.length;++i){t.push(this.params[i]);let n=this._subParamsIdx[i]>>8,r=this._subParamsIdx[i]&255;r-n>0&&t.push(Array.prototype.slice.call(this._subParams,n,r))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>So?So:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>So?So:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let i=this._subParamsIdx[t]>>8,n=this._subParamsIdx[t]&255;return n-i>0?this._subParams.subarray(i,n):null}getSubParamsAll(){let t={};for(let i=0;i<this.length;++i){let n=this._subParamsIdx[i]>>8,r=this._subParamsIdx[i]&255;r-n>0&&(t[i]=this._subParams.slice(n,r))}return t}addDigit(t){let i;if(this._rejectDigits||!(i=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let n=this._digitIsSub?this._subParams:this.params,r=n[i-1];n[i-1]=~r?Math.min(r*10+t,So):t}},Co=[],KG=class{constructor(){this._state=0,this._active=Co,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let i=this._handlers[e];return i.push(t),{dispose:()=>{let n=i.indexOf(t);n!==-1&&i.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Co}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=Co,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||Co,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,i){if(!this._active.length)this._handlerFb(this._id,"PUT",a1(e,t,i));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,i)}start(){this.reset(),this._state=1}put(e,t,i){if(this._state!==3){if(this._state===1)for(;t<i;){let n=e[t++];if(n===59){this._state=2,this._start();break}if(n<48||57<n){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+n-48}this._state===2&&i-t>0&&this._put(e,t,i)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let i=!1,n=this._active.length-1,r=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,i=t,r=this._stack.fallThrough,this._stack.paused=!1),!r&&i===!1){for(;n>=0&&(i=this._active[n].end(e),i!==!0);n--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,i;n--}for(;n>=0;n--)if(i=this._active[n].end(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,i}this._active=Co,this._id=-1,this._state=0}}},Xi=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=a1(e,t,i),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(i=>(this._data="",this._hitLimit=!1,i));return this._data="",this._hitLimit=!1,t}},ko=[],qG=class{constructor(){this._handlers=Object.create(null),this._active=ko,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=ko}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let i=this._handlers[e];return i.push(t),{dispose:()=>{let n=i.indexOf(t);n!==-1&&i.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=ko,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||ko,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let i=this._active.length-1;i>=0;i--)this._active[i].hook(t)}put(e,t,i){if(!this._active.length)this._handlerFb(this._ident,"PUT",a1(e,t,i));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,i)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let i=!1,n=this._active.length-1,r=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,i=t,r=this._stack.fallThrough,this._stack.paused=!1),!r&&i===!1){for(;n>=0&&(i=this._active[n].unhook(e),i!==!0);n--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,i;n--}for(;n>=0;n--)if(i=this._active[n].unhook(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,i}this._active=ko,this._ident=0}},No=new y5;No.addParam(0);var um=class{constructor(e){this._handler=e,this._data="",this._params=No,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():No,this._data="",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=a1(e,t,i),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(i=>(this._params=No,this._data="",this._hitLimit=!1,i));return this._params=No,this._data="",this._hitLimit=!1,t}},GG=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,i,n){this.table[t<<8|e]=i<<4|n}addMany(e,t,i,n){for(let r=0;r<e.length;r++)this.table[t<<8|e[r]]=i<<4|n}},fn=160,YG=function(){let e=new GG(4095),t=Array.apply(null,Array(256)).map((l,o)=>o),i=(l,o)=>t.slice(l,o),n=i(32,127),r=i(0,24);r.push(25),r.push.apply(r,i(28,32));let a=i(0,14),s;e.setDefault(1,0),e.addMany(n,0,2,0);for(s in a)e.addMany([24,26,153,154],s,3,0),e.addMany(i(128,144),s,3,0),e.addMany(i(144,152),s,3,0),e.add(156,s,0,0),e.add(27,s,11,1),e.add(157,s,4,8),e.addMany([152,158,159],s,0,7),e.add(155,s,11,3),e.add(144,s,11,9);return e.addMany(r,0,3,0),e.addMany(r,1,3,1),e.add(127,1,0,1),e.addMany(r,8,0,8),e.addMany(r,3,3,3),e.add(127,3,0,3),e.addMany(r,4,3,4),e.add(127,4,0,4),e.addMany(r,6,3,6),e.addMany(r,5,3,5),e.add(127,5,0,5),e.addMany(r,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(n,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(i(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(n,7,0,7),e.addMany(r,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(i(64,127),3,7,0),e.addMany(i(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(i(48,60),4,8,4),e.addMany(i(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(i(32,64),6,0,6),e.add(127,6,0,6),e.addMany(i(64,127),6,0,0),e.addMany(i(32,48),3,9,5),e.addMany(i(32,48),5,9,5),e.addMany(i(48,64),5,0,6),e.addMany(i(64,127),5,7,0),e.addMany(i(32,48),4,9,5),e.addMany(i(32,48),1,9,2),e.addMany(i(32,48),2,9,2),e.addMany(i(48,127),2,10,0),e.addMany(i(48,80),1,10,0),e.addMany(i(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(i(96,127),1,10,0),e.add(80,1,11,9),e.addMany(r,9,0,9),e.add(127,9,0,9),e.addMany(i(28,32),9,0,9),e.addMany(i(32,48),9,9,12),e.addMany(i(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(r,11,0,11),e.addMany(i(32,128),11,0,11),e.addMany(i(28,32),11,0,11),e.addMany(r,10,0,10),e.add(127,10,0,10),e.addMany(i(28,32),10,0,10),e.addMany(i(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(i(32,48),10,9,12),e.addMany(r,12,0,12),e.add(127,12,0,12),e.addMany(i(28,32),12,0,12),e.addMany(i(32,48),12,9,12),e.addMany(i(48,64),12,0,11),e.addMany(i(64,127),12,12,13),e.addMany(i(64,127),10,12,13),e.addMany(i(64,127),9,12,13),e.addMany(r,13,13,13),e.addMany(n,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(fn,0,2,0),e.add(fn,8,5,8),e.add(fn,6,0,6),e.add(fn,11,0,11),e.add(fn,13,13,13),e}(),XG=class extends nt{constructor(e=YG){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new y5,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,i,n)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,i)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(Rt(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new KG),this._dcsParser=this._register(new qG),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let i=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(i=e.prefix.charCodeAt(0),i&&60>i||i>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let r=0;r<e.intermediates.length;++r){let a=e.intermediates.charCodeAt(r);if(32>a||a>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");i<<=8,i|=a}}if(e.final.length!==1)throw new Error("final must be a single byte");let n=e.final.charCodeAt(0);if(t[0]>n||n>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return i<<=8,i|=n,i}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let i=this._identifier(e,[48,126]);this._escHandlers[i]===void 0&&(this._escHandlers[i]=[]);let n=this._escHandlers[i];return n.push(t),{dispose:()=>{let r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let i=this._identifier(e);this._csiHandlers[i]===void 0&&(this._csiHandlers[i]=[]);let n=this._csiHandlers[i];return n.push(t),{dispose:()=>{let r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,i,n,r){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=i,this._parseStack.transition=n,this._parseStack.chunkPos=r}parse(e,t,i){let n=0,r=0,a=0,s;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,a=this._parseStack.chunkPos+1;else{if(i===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let l=this._parseStack.handlers,o=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(i===!1&&o>-1){for(;o>=0&&(s=l[o](this._params),s!==!0);o--)if(s instanceof Promise)return this._parseStack.handlerPos=o,s}this._parseStack.handlers=[];break;case 4:if(i===!1&&o>-1){for(;o>=0&&(s=l[o](),s!==!0);o--)if(s instanceof Promise)return this._parseStack.handlerPos=o,s}this._parseStack.handlers=[];break;case 6:if(n=e[this._parseStack.chunkPos],s=this._dcsParser.unhook(n!==24&&n!==26,i),s)return s;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(n=e[this._parseStack.chunkPos],s=this._oscParser.end(n!==24&&n!==26,i),s)return s;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,a=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let l=a;l<t;++l){switch(n=e[l],r=this._transitions.table[this.currentState<<8|(n<160?n:fn)],r>>4){case 2:for(let h=l+1;;++h){if(h>=t||(n=e[h])<32||n>126&&n<fn){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(n=e[h])<32||n>126&&n<fn){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(n=e[h])<32||n>126&&n<fn){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(n=e[h])<32||n>126&&n<fn){this._printHandler(e,l,h),l=h-1;break}}break;case 3:this._executeHandlers[n]?this._executeHandlers[n]():this._executeHandlerFb(n),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:l,code:n,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let o=this._csiHandlers[this._collect<<8|n],u=o?o.length-1:-1;for(;u>=0&&(s=o[u](this._params),s!==!0);u--)if(s instanceof Promise)return this._preserveStack(3,o,u,r,l),s;u<0&&this._csiHandlerFb(this._collect<<8|n,this._params),this.precedingJoinState=0;break;case 8:do switch(n){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(n-48)}while(++l<t&&(n=e[l])>47&&n<60);l--;break;case 9:this._collect<<=8,this._collect|=n;break;case 10:let c=this._escHandlers[this._collect<<8|n],d=c?c.length-1:-1;for(;d>=0&&(s=c[d](),s!==!0);d--)if(s instanceof Promise)return this._preserveStack(4,c,d,r,l),s;d<0&&this._escHandlerFb(this._collect<<8|n),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|n,this._params);break;case 13:for(let h=l+1;;++h)if(h>=t||(n=e[h])===24||n===26||n===27||n>127&&n<fn){this._dcsParser.put(e,l,h),l=h-1;break}break;case 14:if(s=this._dcsParser.unhook(n!==24&&n!==26),s)return this._preserveStack(6,[],0,r,l),s;n===27&&(r|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let h=l+1;;h++)if(h>=t||(n=e[h])<32||n>127&&n<fn){this._oscParser.put(e,l,h),l=h-1;break}break;case 6:if(s=this._oscParser.end(n!==24&&n!==26),s)return this._preserveStack(5,[],0,r,l),s;n===27&&(r|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=r&15}}},JG=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,QG=/^[\da-f]+$/;function cm(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let i=JG.exec(t);if(i){let n=i[1]?15:i[4]?255:i[7]?4095:65535;return[Math.round(parseInt(i[1]||i[4]||i[7]||i[10],16)/n*255),Math.round(parseInt(i[2]||i[5]||i[8]||i[11],16)/n*255),Math.round(parseInt(i[3]||i[6]||i[9]||i[12],16)/n*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),QG.exec(t)&&[3,6,9,12].includes(t.length))){let i=t.length/3,n=[0,0,0];for(let r=0;r<3;++r){let a=parseInt(t.slice(i*r,i*r+i),16);n[r]=i===1?a<<4:i===2?a:i===3?a>>4:a>>8}return n}}function cd(e,t){let i=e.toString(16),n=i.length<2?"0"+i:i;switch(t){case 4:return i[0];case 8:return n;case 12:return(n+n).slice(0,3);default:return n+n}}function eY(e,t=16){let[i,n,r]=e;return`rgb:${cd(i,t)}/${cd(n,t)}/${cd(r,t)}`}var tY={"(":0,")":1,"*":2,"+":3,"-":1,".":2},Vr=131072,dm=10;function hm(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var fm=5e3,pm=0,iY=class extends nt{constructor(e,t,i,n,r,a,s,l,o=new XG){super(),this._bufferService=e,this._charsetService=t,this._coreService=i,this._logService=n,this._optionsService=r,this._oscLinkService=a,this._coreMouseService=s,this._unicodeService=l,this._parser=o,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new wK,this._utf8Decoder=new SK,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=Qt.clone(),this._eraseAttrDataInternal=Qt.clone(),this._onRequestBell=this._register(new Oe),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new Oe),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new Oe),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new Oe),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new Oe),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new Oe),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new Oe),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new Oe),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new Oe),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new Oe),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new Oe),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new Oe),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new Oe),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new sf(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(u=>this._activeBuffer=u.activeBuffer)),this._parser.setCsiHandlerFallback((u,c)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(u),params:c.toArray()})}),this._parser.setEscHandlerFallback(u=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(u)})}),this._parser.setExecuteHandlerFallback(u=>{this._logService.debug("Unknown EXECUTE code: ",{code:u})}),this._parser.setOscHandlerFallback((u,c,d)=>{this._logService.debug("Unknown OSC code: ",{identifier:u,action:c,data:d})}),this._parser.setDcsHandlerFallback((u,c,d)=>{c==="HOOK"&&(d=d.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(u),action:c,payload:d})}),this._parser.setPrintHandler((u,c,d)=>this.print(u,c,d)),this._parser.registerCsiHandler({final:"@"},u=>this.insertChars(u)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},u=>this.scrollLeft(u)),this._parser.registerCsiHandler({final:"A"},u=>this.cursorUp(u)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},u=>this.scrollRight(u)),this._parser.registerCsiHandler({final:"B"},u=>this.cursorDown(u)),this._parser.registerCsiHandler({final:"C"},u=>this.cursorForward(u)),this._parser.registerCsiHandler({final:"D"},u=>this.cursorBackward(u)),this._parser.registerCsiHandler({final:"E"},u=>this.cursorNextLine(u)),this._parser.registerCsiHandler({final:"F"},u=>this.cursorPrecedingLine(u)),this._parser.registerCsiHandler({final:"G"},u=>this.cursorCharAbsolute(u)),this._parser.registerCsiHandler({final:"H"},u=>this.cursorPosition(u)),this._parser.registerCsiHandler({final:"I"},u=>this.cursorForwardTab(u)),this._parser.registerCsiHandler({final:"J"},u=>this.eraseInDisplay(u,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},u=>this.eraseInDisplay(u,!0)),this._parser.registerCsiHandler({final:"K"},u=>this.eraseInLine(u,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},u=>this.eraseInLine(u,!0)),this._parser.registerCsiHandler({final:"L"},u=>this.insertLines(u)),this._parser.registerCsiHandler({final:"M"},u=>this.deleteLines(u)),this._parser.registerCsiHandler({final:"P"},u=>this.deleteChars(u)),this._parser.registerCsiHandler({final:"S"},u=>this.scrollUp(u)),this._parser.registerCsiHandler({final:"T"},u=>this.scrollDown(u)),this._parser.registerCsiHandler({final:"X"},u=>this.eraseChars(u)),this._parser.registerCsiHandler({final:"Z"},u=>this.cursorBackwardTab(u)),this._parser.registerCsiHandler({final:"`"},u=>this.charPosAbsolute(u)),this._parser.registerCsiHandler({final:"a"},u=>this.hPositionRelative(u)),this._parser.registerCsiHandler({final:"b"},u=>this.repeatPrecedingCharacter(u)),this._parser.registerCsiHandler({final:"c"},u=>this.sendDeviceAttributesPrimary(u)),this._parser.registerCsiHandler({prefix:">",final:"c"},u=>this.sendDeviceAttributesSecondary(u)),this._parser.registerCsiHandler({final:"d"},u=>this.linePosAbsolute(u)),this._parser.registerCsiHandler({final:"e"},u=>this.vPositionRelative(u)),this._parser.registerCsiHandler({final:"f"},u=>this.hVPosition(u)),this._parser.registerCsiHandler({final:"g"},u=>this.tabClear(u)),this._parser.registerCsiHandler({final:"h"},u=>this.setMode(u)),this._parser.registerCsiHandler({prefix:"?",final:"h"},u=>this.setModePrivate(u)),this._parser.registerCsiHandler({final:"l"},u=>this.resetMode(u)),this._parser.registerCsiHandler({prefix:"?",final:"l"},u=>this.resetModePrivate(u)),this._parser.registerCsiHandler({final:"m"},u=>this.charAttributes(u)),this._parser.registerCsiHandler({final:"n"},u=>this.deviceStatus(u)),this._parser.registerCsiHandler({prefix:"?",final:"n"},u=>this.deviceStatusPrivate(u)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},u=>this.softReset(u)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},u=>this.setCursorStyle(u)),this._parser.registerCsiHandler({final:"r"},u=>this.setScrollRegion(u)),this._parser.registerCsiHandler({final:"s"},u=>this.saveCursor(u)),this._parser.registerCsiHandler({final:"t"},u=>this.windowOptions(u)),this._parser.registerCsiHandler({final:"u"},u=>this.restoreCursor(u)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},u=>this.insertColumns(u)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},u=>this.deleteColumns(u)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},u=>this.selectProtected(u)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},u=>this.requestMode(u,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},u=>this.requestMode(u,!1)),this._parser.setExecuteHandler(Ee.BEL,()=>this.bell()),this._parser.setExecuteHandler(Ee.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(Ee.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(Ee.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(Ee.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(Ee.BS,()=>this.backspace()),this._parser.setExecuteHandler(Ee.HT,()=>this.tab()),this._parser.setExecuteHandler(Ee.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(Ee.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(Mu.IND,()=>this.index()),this._parser.setExecuteHandler(Mu.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(Mu.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Xi(u=>(this.setTitle(u),this.setIconName(u),!0))),this._parser.registerOscHandler(1,new Xi(u=>this.setIconName(u))),this._parser.registerOscHandler(2,new Xi(u=>this.setTitle(u))),this._parser.registerOscHandler(4,new Xi(u=>this.setOrReportIndexedColor(u))),this._parser.registerOscHandler(8,new Xi(u=>this.setHyperlink(u))),this._parser.registerOscHandler(10,new Xi(u=>this.setOrReportFgColor(u))),this._parser.registerOscHandler(11,new Xi(u=>this.setOrReportBgColor(u))),this._parser.registerOscHandler(12,new Xi(u=>this.setOrReportCursorColor(u))),this._parser.registerOscHandler(104,new Xi(u=>this.restoreIndexedColor(u))),this._parser.registerOscHandler(110,new Xi(u=>this.restoreFgColor(u))),this._parser.registerOscHandler(111,new Xi(u=>this.restoreBgColor(u))),this._parser.registerOscHandler(112,new Xi(u=>this.restoreCursorColor(u))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let u in ci)this._parser.registerEscHandler({intermediates:"(",final:u},()=>this.selectCharset("("+u)),this._parser.registerEscHandler({intermediates:")",final:u},()=>this.selectCharset(")"+u)),this._parser.registerEscHandler({intermediates:"*",final:u},()=>this.selectCharset("*"+u)),this._parser.registerEscHandler({intermediates:"+",final:u},()=>this.selectCharset("+"+u)),this._parser.registerEscHandler({intermediates:"-",final:u},()=>this.selectCharset("-"+u)),this._parser.registerEscHandler({intermediates:".",final:u},()=>this.selectCharset("."+u)),this._parser.registerEscHandler({intermediates:"/",final:u},()=>this.selectCharset("/"+u));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(u=>(this._logService.error("Parsing error: ",u),u)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new um((u,c)=>this.requestStatusString(u,c)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,i,n){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=i,this._parseStack.position=n}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,i)=>setTimeout(()=>i("#SLOW_TIMEOUT"),fm))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${fm} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let i,n=this._activeBuffer.x,r=this._activeBuffer.y,a=0,s=this._parseStack.paused;if(s){if(i=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(i),i;n=this._parseStack.cursorStartX,r=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>Vr&&(a=this._parseStack.position+Vr)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,u=>String.fromCharCode(u)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(u=>u.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<Vr&&(this._parseBuffer=new Uint32Array(Math.min(e.length,Vr))),s||this._dirtyRowTracker.clearRange(),e.length>Vr)for(let u=a;u<e.length;u+=Vr){let c=u+Vr<e.length?u+Vr:e.length,d=typeof e=="string"?this._stringDecoder.decode(e.substring(u,c),this._parseBuffer):this._utf8Decoder.decode(e.subarray(u,c),this._parseBuffer);if(i=this._parser.parse(this._parseBuffer,d))return this._preserveStack(n,r,d,u),this._logSlowResolvingAsync(i),i}else if(!s){let u=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(i=this._parser.parse(this._parseBuffer,u))return this._preserveStack(n,r,u,0),this._logSlowResolvingAsync(i),i}(this._activeBuffer.x!==n||this._activeBuffer.y!==r)&&this._onCursorMove.fire();let l=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),o=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);o<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(o,this._bufferService.rows-1),end:Math.min(l,this._bufferService.rows-1)})}print(e,t,i){let n,r,a=this._charsetService.charset,s=this._optionsService.rawOptions.screenReaderMode,l=this._bufferService.cols,o=this._coreService.decPrivateModes.wraparound,u=this._coreService.modes.insertMode,c=this._curAttrData,d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&i-t>0&&d.getWidth(this._activeBuffer.x-1)===2&&d.setCellFromCodepoint(this._activeBuffer.x-1,0,1,c);let h=this._parser.precedingJoinState;for(let f=t;f<i;++f){if(n=e[f],n<127&&a){let v=a[String.fromCharCode(n)];v&&(n=v.charCodeAt(0))}let _=this._unicodeService.charProperties(n,h);r=Da.extractWidth(_);let m=Da.extractShouldJoin(_),g=m?Da.extractWidth(h):0;if(h=_,s&&this._onA11yChar.fire(Kr(n)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+r-g>l){if(o){let v=d,w=this._activeBuffer.x-g;for(this._activeBuffer.x=g,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),g>0&&d instanceof To&&d.copyCellsFrom(v,w,0,g,!1);w<l;)v.setCellFromCodepoint(w++,0,1,c)}else if(this._activeBuffer.x=l-1,r===2)continue}if(m&&this._activeBuffer.x){let v=d.getWidth(this._activeBuffer.x-1)?1:2;d.addCodepointToCell(this._activeBuffer.x-v,n,r);for(let w=r-g;--w>=0;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,c);continue}if(u&&(d.insertCells(this._activeBuffer.x,r-g,this._activeBuffer.getNullCell(c)),d.getWidth(l-1)===2&&d.setCellFromCodepoint(l-1,0,1,c)),d.setCellFromCodepoint(this._activeBuffer.x++,n,r,c),r>0)for(;--r;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,c)}this._parser.precedingJoinState=h,this._activeBuffer.x<l&&i-t>0&&d.getWidth(this._activeBuffer.x)===0&&!d.hasContent(this._activeBuffer.x)&&d.setCellFromCodepoint(this._activeBuffer.x,0,1,c),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,i=>hm(i.params[0],this._optionsService.rawOptions.windowOptions)?t(i):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new um(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Xi(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var e;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&e.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);t.hasWidth(this._activeBuffer.x)&&!t.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,i,n=!1,r=!1){let a=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);a.replaceCells(t,i,this._activeBuffer.getNullCell(this._eraseAttrData()),r),n&&(a.isWrapped=!1)}_resetBufferLine(e,t=!1){let i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i&&(i.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),i.isWrapped=!1)}eraseInDisplay(e,t=!1){var n;this._restrictCursor(this._bufferService.cols);let i;switch(e.params[0]){case 0:for(i=this._activeBuffer.y,this._dirtyRowTracker.markDirty(i),this._eraseInBufferLine(i++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);i<this._bufferService.rows;i++)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(i);break;case 1:for(i=this._activeBuffer.y,this._dirtyRowTracker.markDirty(i),this._eraseInBufferLine(i,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(i+1).isWrapped=!1);i--;)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(i=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,i-1);i--&&!((n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i))!=null&&n.getTrimmedLength()););for(;i>=0;i--)this._bufferService.scroll(this._eraseAttrData())}else{for(i=this._bufferService.rows,this._dirtyRowTracker.markDirty(i-1);i--;)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let r=this._activeBuffer.lines.length-this._bufferService.rows;r>0&&(this._activeBuffer.lines.trimStart(r),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-r,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-r,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let i=this._activeBuffer.ybase+this._activeBuffer.y,n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,r=this._bufferService.rows-1+this._activeBuffer.ybase-n+1;for(;t--;)this._activeBuffer.lines.splice(r-1,1),this._activeBuffer.lines.splice(i,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let i=this._activeBuffer.ybase+this._activeBuffer.y,n;for(n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,n=this._bufferService.rows-1+this._activeBuffer.ybase-n;t--;)this._activeBuffer.lines.splice(i,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(Qt));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);n.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);n.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);n.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);n.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let i=e.params[0]||1,n=Da.extractWidth(t),r=this._activeBuffer.x-n,a=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(r),s=new Uint32Array(a.length*i),l=0;for(let u=0;u<a.length;){let c=a.codePointAt(u)||0;s[l++]=c,u+=c>65535?2:1}let o=l;for(let u=1;u<i;++u)s.copyWithin(o,0,l),o+=l;return this.print(s,0,o),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(Ee.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(Ee.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(Ee.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(Ee.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(Ee.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,xa),this._charsetService.setgCharset(1,xa),this._charsetService.setgCharset(2,xa),this._charsetService.setgCharset(3,xa);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){(m=>(m[m.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",m[m.SET=1]="SET",m[m.RESET=2]="RESET",m[m.PERMANENTLY_SET=3]="PERMANENTLY_SET",m[m.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(void 0||(i={}));let n=this._coreService.decPrivateModes,{activeProtocol:r,activeEncoding:a}=this._coreMouseService,s=this._coreService,{buffers:l,cols:o}=this._bufferService,{active:u,alt:c}=l,d=this._optionsService.rawOptions,h=(m,g)=>(s.triggerDataEvent(`${Ee.ESC}[${t?"":"?"}${m};${g}$y`),!0),f=m=>m?1:2,_=e.params[0];return t?_===2?h(_,4):_===4?h(_,f(s.modes.insertMode)):_===12?h(_,3):_===20?h(_,f(d.convertEol)):h(_,0):_===1?h(_,f(n.applicationCursorKeys)):_===3?h(_,d.windowOptions.setWinLines?o===80?2:o===132?1:0:0):_===6?h(_,f(n.origin)):_===7?h(_,f(n.wraparound)):_===8?h(_,3):_===9?h(_,f(r==="X10")):_===12?h(_,f(d.cursorBlink)):_===25?h(_,f(!s.isCursorHidden)):_===45?h(_,f(n.reverseWraparound)):_===66?h(_,f(n.applicationKeypad)):_===67?h(_,4):_===1e3?h(_,f(r==="VT200")):_===1002?h(_,f(r==="DRAG")):_===1003?h(_,f(r==="ANY")):_===1004?h(_,f(n.sendFocus)):_===1005?h(_,4):_===1006?h(_,f(a==="SGR")):_===1015?h(_,4):_===1016?h(_,f(a==="SGR_PIXELS")):_===1048?h(_,1):_===47||_===1047||_===1049?h(_,f(u===c)):_===2004?h(_,f(n.bracketedPasteMode)):_===2026?h(_,f(n.synchronizedOutput)):h(_,0)}_updateAttrColor(e,t,i,n,r){return t===2?(e|=50331648,e&=-16777216,e|=T0.fromColorRGB([i,n,r])):t===5&&(e&=-50331904,e|=33554432|i&255),e}_extractColor(e,t,i){let n=[0,0,-1,0,0,0],r=0,a=0;do{if(n[a+r]=e.params[t+a],e.hasSubParams(t+a)){let s=e.getSubParams(t+a),l=0;do n[1]===5&&(r=1),n[a+l+1+r]=s[l];while(++l<s.length&&l+a+1+r<n.length);break}if(n[1]===5&&a+r>=2||n[1]===2&&a+r>=5)break;n[1]&&(r=1)}while(++a+t<e.length&&a+r<n.length);for(let s=2;s<n.length;++s)n[s]===-1&&(n[s]=0);switch(n[0]){case 38:i.fg=this._updateAttrColor(i.fg,n[1],n[3],n[4],n[5]);break;case 48:i.bg=this._updateAttrColor(i.bg,n[1],n[3],n[4],n[5]);break;case 58:i.extended=i.extended.clone(),i.extended.underlineColor=this._updateAttrColor(i.extended.underlineColor,n[1],n[3],n[4],n[5])}return a}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=Qt.fg,e.bg=Qt.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,i,n=this._curAttrData;for(let r=0;r<t;r++)i=e.params[r],i>=30&&i<=37?(n.fg&=-50331904,n.fg|=16777216|i-30):i>=40&&i<=47?(n.bg&=-50331904,n.bg|=16777216|i-40):i>=90&&i<=97?(n.fg&=-50331904,n.fg|=16777216|i-90|8):i>=100&&i<=107?(n.bg&=-50331904,n.bg|=16777216|i-100|8):i===0?this._processSGR0(n):i===1?n.fg|=134217728:i===3?n.bg|=67108864:i===4?(n.fg|=268435456,this._processUnderline(e.hasSubParams(r)?e.getSubParams(r)[0]:1,n)):i===5?n.fg|=536870912:i===7?n.fg|=67108864:i===8?n.fg|=1073741824:i===9?n.fg|=2147483648:i===2?n.bg|=134217728:i===21?this._processUnderline(2,n):i===22?(n.fg&=-134217729,n.bg&=-134217729):i===23?n.bg&=-67108865:i===24?(n.fg&=-268435457,this._processUnderline(0,n)):i===25?n.fg&=-536870913:i===27?n.fg&=-67108865:i===28?n.fg&=-1073741825:i===29?n.fg&=2147483647:i===39?(n.fg&=-67108864,n.fg|=Qt.fg&16777215):i===49?(n.bg&=-67108864,n.bg|=Qt.bg&16777215):i===38||i===48||i===58?r+=this._extractColor(e,r,n):i===53?n.bg|=1073741824:i===55?n.bg&=-1073741825:i===59?(n.extended=n.extended.clone(),n.extended.underlineColor=-1,n.updateExtended()):i===100?(n.fg&=-67108864,n.fg|=Qt.fg&16777215,n.bg&=-67108864,n.bg|=Qt.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",i);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${Ee.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,i=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${Ee.ESC}[${t};${i}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,i=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${Ee.ESC}[?${t};${i}R`);break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=Qt.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let i=t%2===1;this._coreService.decPrivateModes.cursorBlink=i}return!0}setScrollRegion(e){let t=e.params[0]||1,i;return(e.length<2||(i=e.params[1])>this._bufferService.rows||i===0)&&(i=this._bufferService.rows),i>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=i-1,this._setCursor(0,0)),!0}windowOptions(e){if(!hm(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${Ee.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>dm&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>dm&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],i=e.split(";");for(;i.length>1;){let n=i.shift(),r=i.shift();if(/^\d+$/.exec(n)){let a=parseInt(n);if(_m(a))if(r==="?")t.push({type:0,index:a});else{let s=cm(r);s&&t.push({type:1,index:a,color:s})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let i=e.slice(0,t).trim(),n=e.slice(t+1);return n?this._createHyperlink(i,n):i.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let i=e.split(":"),n,r=i.findIndex(a=>a.startsWith("id="));return r!==-1&&(n=i[r].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:n,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let i=e.split(";");for(let n=0;n<i.length&&!(t>=this._specialColors.length);++n,++t)if(i[n]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let r=cm(i[n]);r&&this._onColor.fire([{type:1,index:this._specialColors[t],color:r}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],i=e.split(";");for(let n=0;n<i.length;++n)if(/^\d+$/.exec(i[n])){let r=parseInt(i[n]);_m(r)&&t.push({type:2,index:r})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,xa),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(tY[e[0]],ci[e[1]]||xa),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=Qt.clone(),this._eraseAttrDataInternal=Qt.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new vn;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let i=this._activeBuffer.ybase+this._activeBuffer.y+t,n=this._activeBuffer.lines.get(i);n&&(n.fill(e),n.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let i=s=>(this._coreService.triggerDataEvent(`${Ee.ESC}${s}${Ee.ESC}\\`),!0),n=this._bufferService.buffer,r=this._optionsService.rawOptions;return i(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${n.scrollTop+1};${n.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[r.cursorStyle]-(r.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},sf=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(pm=e,e=t,t=pm),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};sf=Kt([Ve(0,zi)],sf);function _m(e){return 0<=e&&e<256}var nY=5e7,mm=12,rY=50,aY=class extends nt{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new Oe),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let i;for(;i=this._writeBuffer.shift();){this._action(i);let n=this._callbacks.shift();n&&n()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>nY)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let i=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let n=this._writeBuffer[this._bufferOffset],r=this._action(n,t);if(r){let s=l=>performance.now()-i>=mm?setTimeout(()=>this._innerWrite(0,l)):this._innerWrite(i,l);r.catch(l=>(queueMicrotask(()=>{throw l}),Promise.resolve(!1))).then(s);return}let a=this._callbacks[this._bufferOffset];if(a&&a(),this._bufferOffset++,this._pendingData-=n.length,performance.now()-i>=mm)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>rY&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},lf=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let l=t.addMarker(t.ybase+t.y),o={data:e,id:this._nextId++,lines:[l]};return l.onDispose(()=>this._removeMarkerFromLink(o,l)),this._dataByLinkId.set(o.id,o),o.id}let i=e,n=this._getEntryIdKey(i),r=this._entriesWithId.get(n);if(r)return this.addLineToLink(r.id,t.ybase+t.y),r.id;let a=t.addMarker(t.ybase+t.y),s={id:this._nextId++,key:this._getEntryIdKey(i),data:i,lines:[a]};return a.onDispose(()=>this._removeMarkerFromLink(s,a)),this._entriesWithId.set(s.key,s),this._dataByLinkId.set(s.id,s),s.id}addLineToLink(e,t){let i=this._dataByLinkId.get(e);if(i&&i.lines.every(n=>n.line!==t)){let n=this._bufferService.buffer.addMarker(t);i.lines.push(n),n.onDispose(()=>this._removeMarkerFromLink(i,n))}}getLinkData(e){var t;return(t=this._dataByLinkId.get(e))==null?void 0:t.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let i=e.lines.indexOf(t);i!==-1&&(e.lines.splice(i,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};lf=Kt([Ve(0,zi)],lf);var vm=!1,sY=class extends nt{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new Es),this._onBinary=this._register(new Oe),this.onBinary=this._onBinary.event,this._onData=this._register(new Oe),this.onData=this._onData.event,this._onLineFeed=this._register(new Oe),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new Oe),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new Oe),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new Oe),this._instantiationService=new xG,this.optionsService=this._register(new BG(e)),this._instantiationService.setService(Ui,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(tf)),this._instantiationService.setService(zi,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(ef)),this._instantiationService.setService(Vy,this._logService),this.coreService=this._register(this._instantiationService.createInstance(nf)),this._instantiationService.setService(ja,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(rf)),this._instantiationService.setService(Dy,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(Da)),this._instantiationService.setService($K,this.unicodeService),this._charsetService=this._instantiationService.createInstance(WG),this._instantiationService.setService(AK,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(lf),this._instantiationService.setService(By,this._oscLinkService),this._inputHandler=this._register(new iY(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(Si.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(Si.forward(this._bufferService.onResize,this._onResize)),this._register(Si.forward(this.coreService.onData,this._onData)),this._register(Si.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new aY((t,i)=>this._inputHandler.parse(t,i))),this._register(Si.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new Oe),this._onScroll.event(e=>{var t;(t=this._onScrollApi)==null||t.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!vm&&(this._logService.warn("writeSync is unreliable and will be removed soon."),vm=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,g5),t=Math.max(t,b5),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(om.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(om(this._bufferService),!1))),this._windowsWrappingHeuristics.value=Rt(()=>{for(let t of e)t.dispose()})}}},lY={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};function oY(e,t,i,n){var s;let r={type:0,cancel:!1,key:void 0},a=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?r.key=Ee.ESC+"OA":r.key=Ee.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?r.key=Ee.ESC+"OD":r.key=Ee.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?r.key=Ee.ESC+"OC":r.key=Ee.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?r.key=Ee.ESC+"OB":r.key=Ee.ESC+"[B");break;case 8:r.key=e.ctrlKey?"\b":Ee.DEL,e.altKey&&(r.key=Ee.ESC+r.key);break;case 9:if(e.shiftKey){r.key=Ee.ESC+"[Z";break}r.key=Ee.HT,r.cancel=!0;break;case 13:r.key=e.altKey?Ee.ESC+Ee.CR:Ee.CR,r.cancel=!0;break;case 27:r.key=Ee.ESC,e.altKey&&(r.key=Ee.ESC+Ee.ESC),r.cancel=!0;break;case 37:if(e.metaKey)break;a?r.key=Ee.ESC+"[1;"+(a+1)+"D":t?r.key=Ee.ESC+"OD":r.key=Ee.ESC+"[D";break;case 39:if(e.metaKey)break;a?r.key=Ee.ESC+"[1;"+(a+1)+"C":t?r.key=Ee.ESC+"OC":r.key=Ee.ESC+"[C";break;case 38:if(e.metaKey)break;a?r.key=Ee.ESC+"[1;"+(a+1)+"A":t?r.key=Ee.ESC+"OA":r.key=Ee.ESC+"[A";break;case 40:if(e.metaKey)break;a?r.key=Ee.ESC+"[1;"+(a+1)+"B":t?r.key=Ee.ESC+"OB":r.key=Ee.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(r.key=Ee.ESC+"[2~");break;case 46:a?r.key=Ee.ESC+"[3;"+(a+1)+"~":r.key=Ee.ESC+"[3~";break;case 36:a?r.key=Ee.ESC+"[1;"+(a+1)+"H":t?r.key=Ee.ESC+"OH":r.key=Ee.ESC+"[H";break;case 35:a?r.key=Ee.ESC+"[1;"+(a+1)+"F":t?r.key=Ee.ESC+"OF":r.key=Ee.ESC+"[F";break;case 33:e.shiftKey?r.type=2:e.ctrlKey?r.key=Ee.ESC+"[5;"+(a+1)+"~":r.key=Ee.ESC+"[5~";break;case 34:e.shiftKey?r.type=3:e.ctrlKey?r.key=Ee.ESC+"[6;"+(a+1)+"~":r.key=Ee.ESC+"[6~";break;case 112:a?r.key=Ee.ESC+"[1;"+(a+1)+"P":r.key=Ee.ESC+"OP";break;case 113:a?r.key=Ee.ESC+"[1;"+(a+1)+"Q":r.key=Ee.ESC+"OQ";break;case 114:a?r.key=Ee.ESC+"[1;"+(a+1)+"R":r.key=Ee.ESC+"OR";break;case 115:a?r.key=Ee.ESC+"[1;"+(a+1)+"S":r.key=Ee.ESC+"OS";break;case 116:a?r.key=Ee.ESC+"[15;"+(a+1)+"~":r.key=Ee.ESC+"[15~";break;case 117:a?r.key=Ee.ESC+"[17;"+(a+1)+"~":r.key=Ee.ESC+"[17~";break;case 118:a?r.key=Ee.ESC+"[18;"+(a+1)+"~":r.key=Ee.ESC+"[18~";break;case 119:a?r.key=Ee.ESC+"[19;"+(a+1)+"~":r.key=Ee.ESC+"[19~";break;case 120:a?r.key=Ee.ESC+"[20;"+(a+1)+"~":r.key=Ee.ESC+"[20~";break;case 121:a?r.key=Ee.ESC+"[21;"+(a+1)+"~":r.key=Ee.ESC+"[21~";break;case 122:a?r.key=Ee.ESC+"[23;"+(a+1)+"~":r.key=Ee.ESC+"[23~";break;case 123:a?r.key=Ee.ESC+"[24;"+(a+1)+"~":r.key=Ee.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?r.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?r.key=Ee.NUL:e.keyCode>=51&&e.keyCode<=55?r.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?r.key=Ee.DEL:e.keyCode===219?r.key=Ee.ESC:e.keyCode===220?r.key=Ee.FS:e.keyCode===221&&(r.key=Ee.GS);else if((!i||n)&&e.altKey&&!e.metaKey){let l=(s=lY[e.keyCode])==null?void 0:s[e.shiftKey?1:0];if(l)r.key=Ee.ESC+l;else if(e.keyCode>=65&&e.keyCode<=90){let o=e.ctrlKey?e.keyCode-64:e.keyCode+32,u=String.fromCharCode(o);e.shiftKey&&(u=u.toUpperCase()),r.key=Ee.ESC+u}else if(e.keyCode===32)r.key=Ee.ESC+(e.ctrlKey?Ee.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let o=e.code.slice(3,4);e.shiftKey||(o=o.toLowerCase()),r.key=Ee.ESC+o,r.cancel=!0}}else i&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(r.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?r.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(r.key=Ee.US),e.key==="@"&&(r.key=Ee.NUL));break}return r}var Gt=0,uY=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new _c,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new _c,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((r,a)=>this._getKey(r)-this._getKey(a)),t=0,i=0,n=new Array(this._array.length+this._insertedValues.length);for(let r=0;r<n.length;r++)i>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[i])?(n[r]=e[t],t++):n[r]=this._array[i++];this._array=n,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(Gt=this._search(t),Gt===-1)||this._getKey(this._array[Gt])!==t)return!1;do if(this._array[Gt]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(Gt),!0;while(++Gt<this._array.length&&this._getKey(this._array[Gt])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((r,a)=>r-a),t=0,i=new Array(this._array.length-e.length),n=0;for(let r=0;r<this._array.length;r++)e[t]===r?t++:i[n++]=this._array[r];this._array=i,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Gt=this._search(e),!(Gt<0||Gt>=this._array.length)&&this._getKey(this._array[Gt])===e))do yield this._array[Gt];while(++Gt<this._array.length&&this._getKey(this._array[Gt])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(Gt=this._search(e),!(Gt<0||Gt>=this._array.length)&&this._getKey(this._array[Gt])===e))do t(this._array[Gt]);while(++Gt<this._array.length&&this._getKey(this._array[Gt])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,i=this._array.length-1;for(;i>=t;){let n=t+i>>1,r=this._getKey(this._array[n]);if(r>e)i=n-1;else if(r<e)t=n+1;else{for(;n>0&&this._getKey(this._array[n-1])===e;)n--;return n}}return t}},dd=0,gm=0,cY=class extends nt{constructor(){super(),this._decorations=new uY(e=>e==null?void 0:e.marker.line),this._onDecorationRegistered=this._register(new Oe),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new Oe),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(Rt(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new dY(e);if(t){let i=t.marker.onDispose(()=>t.dispose()),n=t.onDispose(()=>{n.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),i.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,i){let n=0,r=0;for(let a of this._decorations.getKeyIterator(t))n=a.options.x??0,r=n+(a.options.width??1),e>=n&&e<r&&(!i||(a.options.layer??"bottom")===i)&&(yield a)}forEachDecorationAtCell(e,t,i,n){this._decorations.forEachByKey(t,r=>{dd=r.options.x??0,gm=dd+(r.options.width??1),e>=dd&&e<gm&&(!i||(r.options.layer??"bottom")===i)&&n(r)})}},dY=class extends ta{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new Oe),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new Oe),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=Bt.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=Bt.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},hY=1e3,fY=class{constructor(e,t=hY){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,i){this._rowCount=i,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let n=performance.now();if(n-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=n,this._innerRefresh();else if(!this._additionalRefreshRequested){let r=n-this._lastRefreshMs,a=this._debounceThresholdMS-r;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},a)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},bm=20,mc=class extends nt{constructor(e,t,i,n){super(),this._terminal=e,this._coreBrowserService=i,this._renderService=n,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let r=this._coreBrowserService.mainDocument;this._accessibilityContainer=r.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=r.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let a=0;a<this._terminal.rows;a++)this._rowElements[a]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[a]);if(this._topBoundaryFocusListener=a=>this._handleBoundaryFocus(a,0),this._bottomBoundaryFocusListener=a=>this._handleBoundaryFocus(a,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=r.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new fY(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(a=>this._handleResize(a.rows))),this._register(this._terminal.onRender(a=>this._refreshRows(a.start,a.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(a=>this._handleChar(a))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
95
|
+
`))),this._register(this._terminal.onA11yTab(a=>this._handleTab(a))),this._register(this._terminal.onKey(a=>this._handleKey(a.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(Ye(r,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(Rt(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<bm+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
96
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===bm+1&&(this._liveRegion.textContent+=$h.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let i=this._terminal.buffer,n=i.lines.length.toString();for(let r=e;r<=t;r++){let a=i.lines.get(i.ydisp+r),s=[],l=(a==null?void 0:a.translateToString(!0,void 0,void 0,s))||"",o=(i.ydisp+r+1).toString(),u=this._rowElements[r];u&&(l.length===0?(u.textContent=" ",this._rowColumns.set(u,[0,1])):(u.textContent=l,this._rowColumns.set(u,s)),u.setAttribute("aria-posinset",o),u.setAttribute("aria-setsize",n),this._alignRowWidth(u))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let i=e.target,n=this._rowElements[t===0?1:this._rowElements.length-2],r=i.getAttribute("aria-posinset"),a=t===0?"1":`${this._terminal.buffer.lines.length}`;if(r===a||e.relatedTarget!==n)return;let s,l;if(t===0?(s=i,l=this._rowElements.pop(),this._rowContainer.removeChild(l)):(s=this._rowElements.shift(),l=i,this._rowContainer.removeChild(s)),s.removeEventListener("focus",this._topBoundaryFocusListener),l.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let o=this._createAccessibilityTreeNode();this._rowElements.unshift(o),this._rowContainer.insertAdjacentElement("afterbegin",o)}else{let o=this._createAccessibilityTreeNode();this._rowElements.push(o),this._rowContainer.appendChild(o)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var l;if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},i={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(i.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===i.node&&t.offset>i.offset)&&([t,i]=[i,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let n=this._rowElements.slice(-1)[0];if(i.node.compareDocumentPosition(n)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(i={node:n,offset:((l=n.textContent)==null?void 0:l.length)??0}),!this._rowContainer.contains(i.node))return;let r=({node:o,offset:u})=>{let c=o instanceof Text?o.parentNode:o,d=parseInt(c==null?void 0:c.getAttribute("aria-posinset"),10)-1;if(isNaN(d))return console.warn("row is invalid. Race condition?"),null;let h=this._rowColumns.get(c);if(!h)return console.warn("columns is null. Race condition?"),null;let f=u<h.length?h[u]:h.slice(-1)[0]+1;return f>=this._terminal.cols&&(++d,f=0),{row:d,column:f}},a=r(t),s=r(i);if(!(!a||!s)){if(a.row>s.row||a.row===s.row&&a.column>=s.column)throw new Error("invalid range");this._terminal.select(a.column,a.row,(s.row-a.row)*this._terminal.cols-a.column+s.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){var r,a;e.style.transform="";let t=e.getBoundingClientRect().width,i=(a=(r=this._rowColumns.get(e))==null?void 0:r.slice(-1))==null?void 0:a[0];if(!i)return;let n=i*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${n/t})`}};mc=Kt([Ve(1,H2),Ve(2,Hr),Ve(3,Nr)],mc);var of=class extends nt{constructor(e,t,i,n,r){super(),this._element=e,this._mouseService=t,this._renderService=i,this._bufferService=n,this._linkProviderService=r,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new Oe),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new Oe),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(Rt(()=>{var a;za(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,(a=this._activeProviderReplies)==null||a.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(Ye(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(Ye(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(Ye(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(Ye(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let i=e.composedPath();for(let n=0;n<i.length;n++){let r=i[n];if(r.classList.contains("xterm"))break;if(r.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){var n,r;(!this._activeProviderReplies||!t)&&((n=this._activeProviderReplies)==null||n.forEach(a=>{a==null||a.forEach(s=>{s.link.dispose&&s.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let i=!1;for(let[a,s]of this._linkProviderService.linkProviders.entries())t?(r=this._activeProviderReplies)!=null&&r.get(a)&&(i=this._checkLinkProviderResult(a,e,i)):s.provideLinks(e.y,l=>{var u,c;if(this._isMouseOut)return;let o=l==null?void 0:l.map(d=>({link:d}));(u=this._activeProviderReplies)==null||u.set(a,o),i=this._checkLinkProviderResult(a,e,i),((c=this._activeProviderReplies)==null?void 0:c.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let i=new Set;for(let n=0;n<t.size;n++){let r=t.get(n);if(r)for(let a=0;a<r.length;a++){let s=r[a],l=s.link.range.start.y<e?0:s.link.range.start.x,o=s.link.range.end.y>e?this._bufferService.cols:s.link.range.end.x;for(let u=l;u<=o;u++){if(i.has(u)){r.splice(a--,1);break}i.add(u)}}}}_checkLinkProviderResult(e,t,i){var a;if(!this._activeProviderReplies)return i;let n=this._activeProviderReplies.get(e),r=!1;for(let s=0;s<e;s++)(!this._activeProviderReplies.has(s)||this._activeProviderReplies.get(s))&&(r=!0);if(!r&&n){let s=n.find(l=>this._linkAtPosition(l.link,t));s&&(i=!0,this._handleNewLink(s))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!i)for(let s=0;s<this._activeProviderReplies.size;s++){let l=(a=this._activeProviderReplies.get(s))==null?void 0:a.find(o=>this._linkAtPosition(o.link,t));if(l){i=!0,this._handleNewLink(l);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&pY(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,za(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var i,n;return(n=(i=this._currentLink)==null?void 0:i.state)==null?void 0:n.decorations.pointerCursor},set:i=>{var n;(n=this._currentLink)!=null&&n.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",i))}},underline:{get:()=>{var i,n;return(n=(i=this._currentLink)==null?void 0:i.state)==null?void 0:n.decorations.underline},set:i=>{var n,r,a;(n=this._currentLink)!=null&&n.state&&((a=(r=this._currentLink)==null?void 0:r.state)==null?void 0:a.decorations.underline)!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,i))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(i=>{if(!this._currentLink)return;let n=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,r=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=r&&(this._clearCurrentLink(n,r),this._lastMouseEvent)){let a=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);a&&this._askForLink(a,!1)}})))}_linkHover(e,t,i){var n;(n=this._currentLink)!=null&&n.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(i,t.text)}_fireUnderlineEvent(e,t){let i=e.range,n=this._bufferService.buffer.ydisp,r=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-n-1,i.end.x,i.end.y-n-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(r)}_linkLeave(e,t,i){var n;(n=this._currentLink)!=null&&n.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(i,t.text)}_linkAtPosition(e,t){let i=e.range.start.y*this._bufferService.cols+e.range.start.x,n=e.range.end.y*this._bufferService.cols+e.range.end.x,r=t.y*this._bufferService.cols+t.x;return i<=r&&r<=n}_positionFromMouseEvent(e,t,i){let n=i.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(n)return{x:n[0],y:n[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,i,n,r){return{x1:e,y1:t,x2:i,y2:n,cols:this._bufferService.cols,fg:r}}};of=Kt([Ve(1,N2),Ve(2,Nr),Ve(3,zi),Ve(4,Fy)],of);function pY(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var _Y=class extends sY{constructor(e={}){super(e),this._linkifier=this._register(new Es),this.browser=l5,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new Es),this._onCursorMove=this._register(new Oe),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new Oe),this.onKey=this._onKey.event,this._onRender=this._register(new Oe),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new Oe),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new Oe),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new Oe),this.onBell=this._onBell.event,this._onFocus=this._register(new Oe),this._onBlur=this._register(new Oe),this._onA11yCharEmitter=this._register(new Oe),this._onA11yTabEmitter=this._register(new Oe),this._onWillOpen=this._register(new Oe),this._setup(),this._decorationService=this._instantiationService.createInstance(cY),this._instantiationService.setService(H0,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(rG),this._instantiationService.setService(Fy,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(Lh)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh((t==null?void 0:t.start)??0,(t==null?void 0:t.end)??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(Si.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(Si.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(Si.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(Si.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(Rt(()=>{var t,i;this._customKeyEventHandler=void 0,(i=(t=this.element)==null?void 0:t.parentNode)==null||i.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let i,n="";switch(t.index){case 256:i="foreground",n="10";break;case 257:i="background",n="11";break;case 258:i="cursor",n="12";break;default:i="ansi",n="4;"+t.index}switch(t.type){case 0:let r=Pt.toColorRGB(i==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[i]);this.coreService.triggerDataEvent(`${Ee.ESC}]${n};${eY(r)}${a5.ST}`);break;case 1:if(i==="ansi")this._themeService.modifyColors(a=>a.ansi[t.index]=ei.toColor(...t.color));else{let a=i;this._themeService.modifyColors(s=>s[a]=ei.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(mc,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Ee.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var e;return(e=this.textarea)==null?void 0:e.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Ee.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let i=Math.min(this.buffer.x,this.cols-1),n=this._renderService.dimensions.css.cell.height,r=t.getWidth(i),a=this._renderService.dimensions.css.cell.width*r,s=this.buffer.y*this._renderService.dimensions.css.cell.height,l=i*this._renderService.dimensions.css.cell.width;this.textarea.style.left=l+"px",this.textarea.style.top=s+"px",this.textarea.style.width=a+"px",this.textarea.style.height=n+"px",this.textarea.style.lineHeight=n+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(Ye(this.element,"copy",t=>{this.hasSelection()&&bK(t,this._selectionService)}));let e=t=>yK(t,this.textarea,this.coreService,this.optionsService);this._register(Ye(this.textarea,"paste",e)),this._register(Ye(this.element,"paste",e)),o5?this._register(Ye(this.element,"mousedown",t=>{t.button===2&&E_(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(Ye(this.element,"contextmenu",t=>{E_(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),Z2&&this._register(Ye(this.element,"auxclick",t=>{t.button===1&&Ny(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(Ye(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(Ye(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(Ye(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(Ye(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(Ye(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(Ye(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(Ye(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){var r;if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((r=this.element)==null?void 0:r.ownerDocument.defaultView)&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(Ye(this.screenElement,"mousemove",a=>this.updateCursorStyle(a))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let i=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",Ah.get()),d5||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>i.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(iG,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(Hr,this._coreBrowserService),this._register(Ye(this.textarea,"focus",a=>this._handleTextAreaFocus(a))),this._register(Ye(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(Gh,this._document,this._helperContainer),this._instantiationService.setService(s1,this._charSizeService),this._themeService=this._instantiationService.createInstance(Qh),this._instantiationService.setService(Ml,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(fc),this._instantiationService.setService(Zy,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(Xh,this.rows,this.screenElement)),this._instantiationService.setService(Nr,this._renderService),this._register(this._renderService.onRenderedViewportChange(a=>this._onRender.fire(a))),this.onResize(a=>this._renderService.resize(a.cols,a.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(jh,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(Yh),this._instantiationService.setService(N2,this._mouseService);let n=this._linkifier.value=this._register(this._instantiationService.createInstance(of,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(Uh,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(a=>{super.scrollLines(a,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(Jh,this.element,this.screenElement,n)),this._instantiationService.setService(LK,this._selectionService),this._register(this._selectionService.onRequestScrollLines(a=>this.scrollLines(a.amount,a.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(a=>this._renderService.handleSelectionChanged(a.start,a.end,a.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(a=>{this.textarea.value=a,this.textarea.focus(),this.textarea.select()})),this._register(Si.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{var a;this._selectionService.refresh(),(a=this._viewport)==null||a.queueSync()})),this._register(this._instantiationService.createInstance(Wh,this.screenElement)),this._register(Ye(this.element,"mousedown",a=>this._selectionService.handleMouseDown(a))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(mc,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",a=>this._handleScreenReaderModeOptionChange(a))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(hc,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",a=>{!this._overviewRulerRenderer&&a&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(hc,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(qh,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function i(a){var u,c,d,h,f;let s=e._mouseService.getMouseReportCoords(a,e.screenElement);if(!s)return!1;let l,o;switch(a.overrideType||a.type){case"mousemove":o=32,a.buttons===void 0?(l=3,a.button!==void 0&&(l=a.button<3?a.button:3)):l=a.buttons&1?0:a.buttons&4?1:a.buttons&2?2:3;break;case"mouseup":o=0,l=a.button<3?a.button:3;break;case"mousedown":o=1,l=a.button<3?a.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(a)===!1)return!1;let _=a.deltaY;if(_===0||e.coreMouseService.consumeWheelEvent(a,(h=(d=(c=(u=e._renderService)==null?void 0:u.dimensions)==null?void 0:c.device)==null?void 0:d.cell)==null?void 0:h.height,(f=e._coreBrowserService)==null?void 0:f.dpr)===0)return!1;o=_<0?0:1,l=4;break;default:return!1}return o===void 0||l===void 0||l>4?!1:e.coreMouseService.triggerMouseEvent({col:s.col,row:s.row,x:s.x,y:s.y,button:l,action:o,ctrl:a.ctrlKey,alt:a.altKey,shift:a.shiftKey})}let n={mouseup:null,wheel:null,mousedrag:null,mousemove:null},r={mouseup:a=>(i(a),a.buttons||(this._document.removeEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.removeEventListener("mousemove",n.mousedrag)),this.cancel(a)),wheel:a=>(i(a),this.cancel(a,!0)),mousedrag:a=>{a.buttons&&i(a)},mousemove:a=>{a.buttons||i(a)}};this._register(this.coreMouseService.onProtocolChange(a=>{a?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(a)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),a&8?n.mousemove||(t.addEventListener("mousemove",r.mousemove),n.mousemove=r.mousemove):(t.removeEventListener("mousemove",n.mousemove),n.mousemove=null),a&16?n.wheel||(t.addEventListener("wheel",r.wheel,{passive:!1}),n.wheel=r.wheel):(t.removeEventListener("wheel",n.wheel),n.wheel=null),a&2?n.mouseup||(n.mouseup=r.mouseup):(this._document.removeEventListener("mouseup",n.mouseup),n.mouseup=null),a&4?n.mousedrag||(n.mousedrag=r.mousedrag):(this._document.removeEventListener("mousemove",n.mousedrag),n.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(Ye(t,"mousedown",a=>{if(a.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(a)))return i(a),n.mouseup&&this._document.addEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.addEventListener("mousemove",n.mousedrag),this.cancel(a)})),this._register(Ye(t,"wheel",a=>{var s,l,o,u,c;if(!n.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(a)===!1)return!1;if(!this.buffer.hasScrollback){if(a.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(a,(u=(o=(l=(s=e._renderService)==null?void 0:s.dimensions)==null?void 0:l.device)==null?void 0:o.cell)==null?void 0:u.height,(c=e._coreBrowserService)==null?void 0:c.dpr)===0)return this.cancel(a,!0);let d=Ee.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(a.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(d,!0),this.cancel(a,!0)}}},{passive:!1}))}refresh(e,t){var i;(i=this._renderService)==null||i.refreshRows(e,t)}updateCursorStyle(e){var t;(t=this._selectionService)!=null&&t.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){Hy(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,i){this._selectionService.setSelection(e,t,i)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var e;(e=this._selectionService)==null||e.clearSelection()}selectAll(){var e;(e=this._selectionService)==null||e.selectAll()}selectLines(e,t){var i;(i=this._selectionService)==null||i.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let i=oY(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),i.type===3||i.type===2){let n=this.rows-1;return this.scrollLines(i.type===2?-n:n),this.cancel(e,!0)}if(i.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(i.cancel&&this.cancel(e,!0),!i.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((i.key===Ee.ETX||i.key===Ee.CR)&&(this.textarea.value=""),this._onKey.fire({key:i.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(i.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let i=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?i:i&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(mY(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){var i;(i=this._charSizeService)==null||i.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(Qt));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){var t;this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),(t=this._selectionService)==null||t.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){var e;(e=this._renderService)==null||e.clearTextureAtlas()}_reportFocus(){var e;(e=this.element)!=null&&e.classList.contains("focus")?this.coreService.triggerDataEvent(Ee.ESC+"[I"):this.coreService.triggerDataEvent(Ee.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),i=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Ee.ESC}[4;${i};${t}t`);break;case 1:let n=this._renderService.dimensions.css.cell.width.toFixed(0),r=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Ee.ESC}[6;${r};${n}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function mY(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var vY=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let i={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(i),t.dispose=()=>this._wrappedAddonDispose(i),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let i=0;i<this._addons.length;i++)if(this._addons[i]===e){t=i;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},gY=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new vn)}translateToString(e,t,i){return this._line.translateToString(e,t,i)}},ym=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new gY(t)}getNullCell(){return new vn}},bY=class extends nt{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new Oe),this.onBufferChange=this._onBufferChange.event,this._normal=new ym(this._core.buffers.normal,"normal"),this._alternate=new ym(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},yY=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,i=>t(i.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(i,n)=>t(i,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},wY=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},SY=["cols","rows"],In=0,CY=class extends nt{constructor(e){super(),this._core=this._register(new _Y(e)),this._addonManager=this._register(new vY),this._publicOptions={...this._core.options};let t=n=>this._core.options[n],i=(n,r)=>{this._checkReadonlyOptions(n),this._core.options[n]=r};for(let n in this._core.options){let r={get:t.bind(this,n),set:i.bind(this,n)};Object.defineProperty(this._publicOptions,n,r)}}_checkReadonlyOptions(e){if(SY.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new yY(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new wY(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new bY(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,i){this._verifyIntegers(e,t,i),this._core.select(e,t,i)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
|
|
97
|
+
`,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return Ah.get()},set promptLabel(e){Ah.set(e)},get tooMuchOutput(){return $h.get()},set tooMuchOutput(e){$h.set(e)}}}_verifyIntegers(...e){for(In of e)if(In===1/0||isNaN(In)||In%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(In of e)if(In&&(In===1/0||isNaN(In)||In%1!==0||In<0))throw new Error("This API only accepts positive integers")}};/**
|
|
98
|
+
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
99
|
+
* @license MIT
|
|
100
|
+
*
|
|
101
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
102
|
+
* @license MIT
|
|
103
|
+
*
|
|
104
|
+
* Originally forked from (with the author's permission):
|
|
105
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
106
|
+
* http://bellard.org/jslinux/
|
|
107
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
108
|
+
*/var kY=2,AY=1,$Y=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var d;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:((d=this._terminal.options.overviewRuler)==null?void 0:d.width)||14,i=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(i.getPropertyValue("height")),r=Math.max(0,parseInt(i.getPropertyValue("width"))),a=window.getComputedStyle(this._terminal.element),s={top:parseInt(a.getPropertyValue("padding-top")),bottom:parseInt(a.getPropertyValue("padding-bottom")),right:parseInt(a.getPropertyValue("padding-right")),left:parseInt(a.getPropertyValue("padding-left"))},l=s.top+s.bottom,o=s.right+s.left,u=n-l,c=r-o-t;return{cols:Math.max(kY,Math.floor(c/e.css.cell.width)),rows:Math.max(AY,Math.floor(u/e.css.cell.height))}}};const MY={class:"terminal-view"},LY=Ne({__name:"TerminalView",setup(e){const t=ys("topbar-right"),i=ma(),n=X(null),r=An(null),a=An(null);let s=null,l=null;const o=X(!1);function u(){const d=location.protocol==="https:"?"wss:":"ws:";s=new WebSocket(`${d}//${location.host}/ws/shell`),s.onopen=()=>{o.value=!0,c()},s.onmessage=h=>{var f;(f=r.value)==null||f.write(h.data)},s.onclose=()=>{var h;o.value=!1,(h=r.value)==null||h.write(`\r
|
|
109
|
+
\x1B[90m- disconnected -\x1B[0m\r
|
|
110
|
+
`)},s.onerror=()=>s==null?void 0:s.close()}function c(){!s||s.readyState!==s.OPEN||!r.value||s.send(JSON.stringify({type:"resize",cols:r.value.cols,rows:r.value.rows}))}return et(async()=>{i.setPage("Terminal",{fullBleed:!0}),await document.fonts.ready;const d=new CY({theme:{background:"#0d1117",foreground:"#e6edf3",cursor:"#58a6ff",selectionBackground:"rgba(88,166,255,0.3)",black:"#0d1117",brightBlack:"#6e7681",red:"#ff7b72",brightRed:"#ffa198",green:"#3fb950",brightGreen:"#56d364",yellow:"#d29922",brightYellow:"#e3b341",blue:"#58a6ff",brightBlue:"#79c0ff",magenta:"#bc8cff",brightMagenta:"#d2a8ff",cyan:"#39c5cf",brightCyan:"#56d4dd",white:"#b1bac4",brightWhite:"#f0f6fc"},fontFamily:'"MesloLGS NF", monospace',fontSize:13,lineHeight:1.45,cursorStyle:"block",cursorBlink:!0,scrollback:5e3,convertEol:!0,disableStdin:!1,allowTransparency:!1}),h=new $Y;d.loadAddon(h),r.value=d,a.value=h,n.value&&(d.open(n.value),h.fit()),d.onData(f=>{(s==null?void 0:s.readyState)===WebSocket.OPEN&&s.send(JSON.stringify({type:"input",data:f}))}),l=new ResizeObserver(()=>{h.fit(),c()}),n.value&&l.observe(n.value),u()}),Tt(()=>{var d;s==null||s.close(),s=null,l==null||l.disconnect(),(d=r.value)==null||d.dispose()}),(d,h)=>{const f=Er;return p(),$("div",MY,[(p(),le(mi(Y(t).Outlet),null,{default:I(()=>[ee(f,{variant:o.value?"success":"neutral",dot:"",role:"status"},{default:I(()=>[_e(K(o.value?"Connected":"Disconnected"),1)]),_:1},8,["variant"])]),_:1})),M("div",{ref_key:"containerEl",ref:n,class:"terminal-container"},null,512)])}}}),EY=jt(LY,[["__scopeId","data-v-4563c6db"]]),xY={class:"login"},TY={key:0},HY={key:1},wm="openbridge_auto_resume_attempted",NY=Ne({__name:"LoginView",setup(e){const t=sl(),i=al(),{user:n,loadConfig:r,checkAuth:a,startPlatformLogin:s,resumeLastAccount:l,chooseAccount:o}=hl(),u=X(!1),c=X(null),d=H(()=>t.query.logged_out==="1");async function h(){u.value=!0,c.value=null;try{const _=typeof t.query.login_hint=="string"?t.query.login_hint:void 0;await s(_?{loginHint:_}:{})}catch(_){u.value=!1,c.value=_ instanceof Error?_.message:"Unable to start sign-in."}}async function f(){u.value=!0,c.value=null;try{await o()}catch(_){u.value=!1,c.value=_ instanceof Error?_.message:"Unable to start sign-in."}}return et(async()=>{if(!(await r()).enabled){i.replace("/");return}if(t.query.error==="account_changed"){c.value="Your platform account changed. Please sign in again.";return}const m=typeof t.query.login_hint=="string"?t.query.login_hint:"";if(await a()){if(m&&n.value&&n.value.email.toLowerCase()!==m.toLowerCase()){u.value=!0,await s({loginHint:m});return}i.replace("/");return}if(m){u.value=!0,await s({loginHint:m});return}if(!d.value&&!sessionStorage.getItem(wm)){if(sessionStorage.setItem(wm,"1"),u.value=!0,await l())return;u.value=!1}}),(_,m)=>{const g=_t,v=kt,w=Fc;return p(),$("div",xY,[ee(w,{class:"login__panel"},{default:I(()=>[m[2]||(m[2]=M("img",{class:"login__mark",src:$2,alt:"",width:"44",height:"44"},null,-1)),m[3]||(m[3]=M("h1",{class:"type-heading-03"},"OpenBridge",-1)),m[4]||(m[4]=M("p",{class:"login__note"},"Sign in via Nubisco Platform to manage this OpenBridge instance.",-1)),c.value?(p(),le(g,{key:0,variant:"error"},{default:I(()=>[_e(K(c.value),1)]),_:1})):d.value?(p(),le(g,{key:1,variant:"success"},{default:I(()=>[...m[0]||(m[0]=[_e("You have been signed out.",-1)])]),_:1})):P("",!0),ee(v,{variant:"primary",disabled:u.value,onClick:h},{default:I(()=>[u.value?(p(),$("span",TY,"Redirecting…")):(p(),$("span",HY,"Sign in via Nubisco Platform"))]),_:1},8,["disabled"]),ee(v,{variant:"tertiary",disabled:u.value,onClick:f},{default:I(()=>[...m[1]||(m[1]=[_e("Use a different account",-1)])]),_:1},8,["disabled"])]),_:1})])}}}),PY=jt(NY,[["__scopeId","data-v-39aebeb0"]]),OY={class:"callback-page"},IY={key:1,class:"callback-loading"},RY=Ne({__name:"AuthCallbackView",setup(e){const t=sl(),i=al(),{checkAuth:n,clearLastAccount:r}=hl(),a=X(null);return et(async()=>{const s=typeof t.query.token=="string"?t.query.token:"",l=typeof t.query.state=="string"?t.query.state:"",o=typeof t.query.error=="string"?t.query.error:"",u=sessionStorage.getItem("openbridge_platform_state");sessionStorage.removeItem("openbridge_platform_state");const c=sessionStorage.getItem("openbridge_platform_expected_sub");if(sessionStorage.removeItem("openbridge_platform_expected_sub"),o){a.value=o==="not_a_member"?"Your account does not have access to this OpenBridge instance.":o==="domain_not_allowed"?"Your account is not eligible for this OpenBridge instance.":`Sign-in failed: ${o}`;return}if(!u||!l||u!==l){a.value="The sign-in request is no longer valid. Please try again.";return}if(!s){a.value="Platform did not return an OpenBridge access token.";return}const d=await fetch("/auth/platform/callback",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({token:s,...c?{expected_sub:c}:{}})});if(!d.ok){const f=await d.json().catch(()=>null);if((f==null?void 0:f.error)==="subject_mismatch"){r(),i.replace({path:"/login",query:{error:"account_changed"}});return}a.value=(f==null?void 0:f.error)==="invalid_token"?"Your platform sign-in is no longer valid. Please try again.":(f==null?void 0:f.error)==="wrong_app"?"The sign-in was issued for a different application. Please try again.":"Sign-in failed. Please try again.";return}await n(),sessionStorage.removeItem("openbridge_auto_resume_attempted");const h=sessionStorage.getItem("openbridge_return_to");sessionStorage.removeItem("openbridge_return_to"),i.replace(h!=null&&h.startsWith("/oauth/consent?")?h:"/")}),(s,l)=>{const o=_t,u=el;return p(),$("div",OY,[a.value?(p(),le(o,{key:0,variant:"error"},{default:I(()=>[_e(K(a.value),1)]),_:1})):(p(),$("p",IY,[ee(u,{size:"sm"}),l[0]||(l[0]=_e(" Signing you in… ",-1))]))])}}}),DY=jt(RY,[["__scopeId","data-v-9134ed49"]]),VY={class:"consent"},BY={key:0,class:"consent__note"},ZY={class:"consent__note"},FY={class:"consent__title type-heading-03"},zY={class:"consent__note"},UY={class:"consent__row"},WY=Ne({__name:"OAuthConsentView",setup(e){const t=sl(),i=al(),n=["client_id","redirect_uri","response_type","scope","state","code_challenge","code_challenge_method"],r=X("loading"),a=X(""),s=X(""),l=X(""),o=X(""),u=X(!1);function c(){const _=new URLSearchParams;for(const m of n){const g=t.query[m];typeof g=="string"&&g&&_.set(m,g)}return _}async function d(){try{const m=await(await fetch(`/oauth/context?${c().toString()}`)).json();if(!m.ok){o.value=m.reason??"",r.value="invalid";return}a.value=m.clientName||"This application",l.value=m.redirectHost??"",s.value=m.email??"",r.value=m.signedIn?"consent":"signed-out"}catch{r.value="invalid"}}d();function h(){try{sessionStorage.setItem("openbridge_return_to",`/oauth/consent?${c().toString()}`)}catch{}i.push("/login")}function f(_){const m=document.createElement("form");m.method="post",m.action="/oauth/authorize";const g=(v,w)=>{const S=document.createElement("input");S.type="hidden",S.name=v,S.value=w,m.appendChild(S)};for(const[v,w]of c())g(v,w);g("decision",_),g("access",u.value?"control":"read"),document.body.appendChild(m),m.submit()}return(_,m)=>{const g=el,v=xr,w=kt,S=ch,y=_t,A=Fc;return p(),$("div",VY,[ee(A,{class:"consent__panel"},{default:I(()=>[m[13]||(m[13]=M("img",{class:"consent__mark",src:$2,alt:"OpenBridge",width:"44",height:"44"},null,-1)),r.value==="loading"?(p(),$("p",BY,[ee(g,{size:"sm"}),m[3]||(m[3]=_e(" Checking the request… ",-1))])):r.value==="invalid"?(p(),$($e,{key:1},[m[4]||(m[4]=M("h1",{class:"consent__title type-heading-03"},"This request cannot continue",-1)),ee(v,{status:"error",variant:"inline",title:o.value||"The connection request is not valid."},null,8,["title"]),m[5]||(m[5]=M("p",{class:"consent__note"},"Nothing was shared. Start the connection again from your application.",-1))],64)):r.value==="signed-out"?(p(),$($e,{key:2},[m[7]||(m[7]=M("h1",{class:"consent__title type-heading-03"},"Sign in to continue",-1)),M("p",ZY,"Sign in to this bridge to decide whether "+K(a.value)+" may connect.",1),ee(w,{variant:"primary",onClick:h},{default:I(()=>[...m[6]||(m[6]=[_e("Sign in",-1)])]),_:1})],64)):(p(),$($e,{key:3},[M("h1",FY,"Connect "+K(a.value)+" to OpenBridge?",1),M("p",zY,[_e(K(a.value)+" will be able to read your devices, their current readings and recorded history, their events and the bridge logs ",1),s.value?(p(),$($e,{key:0},[_e(", as "+K(s.value),1)],64)):P("",!0),m[8]||(m[8]=_e(" . It will return to ",-1)),M("strong",null,K(l.value),1),m[9]||(m[9]=_e(" . ",-1))]),ee(S,{modelValue:u.value,"onUpdate:modelValue":m[0]||(m[0]=L=>u.value=L),label:"Also allow it to operate devices"},null,8,["modelValue"]),u.value?(p(),le(y,{key:0,variant:"warning"},{default:I(()=>[...m[10]||(m[10]=[_e(" It will be able to switch, open and adjust anything the plugins on this bridge control, including gates and locks. You can disconnect it from Settings at any time. ",-1)])]),_:1})):P("",!0),M("div",UY,[ee(w,{variant:"secondary",onClick:m[1]||(m[1]=L=>f("deny"))},{default:I(()=>[...m[11]||(m[11]=[_e("Cancel",-1)])]),_:1}),ee(w,{variant:"primary",onClick:m[2]||(m[2]=L=>f("approve"))},{default:I(()=>[...m[12]||(m[12]=[_e("Connect",-1)])]),_:1})])],64))]),_:1})])}}}),jY=jt(WY,[["__scopeId","data-v-86c2d31f"]]),w5=YD({history:LD(),routes:[{path:"/login",name:"login",component:PY},{path:"/auth/callback",name:"auth-callback",component:DY},{path:"/oauth/consent",name:"oauth-consent",component:jY},{path:"/",component:NU,redirect:"/dashboard",children:[{path:"dashboard",name:"dashboard",component:_W},{path:"plugins",name:"plugins",component:aj},{path:"devices",name:"devices",component:Ej},{path:"devices/:id",name:"device-detail",component:Ij},{path:"config",name:"config",component:jj},{path:"settings",name:"settings",component:pK},{path:"terminal",name:"terminal",component:EY}]}]});let Sm=!1;w5.beforeEach(async e=>{var s;if(e.name==="login"||e.name==="auth-callback"||e.name==="oauth-consent")return!0;const{config:t,user:i,loadConfig:n,checkAuth:r}=hl();if(t.value||await n(),!((s=t.value)!=null&&s.enabled))return!0;const a=typeof e.query.login_hint=="string"?e.query.login_hint:"";if(Sm){if(!i.value)return a?{path:"/login",query:{login_hint:a}}:"/login"}else{const l=await r();if(Sm=!0,!l)return a?{path:"/login",query:{login_hint:a}}:"/login"}if(a){if(i.value&&i.value.email.toLowerCase()!==a.toLowerCase())return{path:"/login",query:{login_hint:a}};const l={...e.query};return delete l.login_hint,{path:e.path,query:l}}return!0});const El=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},KY=El("app-window","0 0 256 256",'<path d="M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44Zm4,156a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4ZM76,84a8,8,0,1,1-8-8A8,8,0,0,1,76,84Zm40,0a8,8,0,1,1-8-8A8,8,0,0,1,116,84Z"/>'),qY=El("app-window","0 0 256 256",'<path d="M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42Zm2,158a2,2,0,0,1-2,2H40a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H216a2,2,0,0,1,2,2ZM78,84A10,10,0,1,1,68,74,10,10,0,0,1,78,84Zm40,0a10,10,0,1,1-10-10A10,10,0,0,1,118,84Z"/>'),Cm=El("app-window","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H40V56H216V200ZM80,84A12,12,0,1,1,68,72,12,12,0,0,1,80,84Zm40,0a12,12,0,1,1-12-12A12,12,0,0,1,120,84Z"/>'),GY=El("app-window","0 0 256 256",'<path d="M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36Zm-4,160H44V60H212ZM60,92a16,16,0,1,1,16,16A16,16,0,0,1,60,92Zm48,0a16,16,0,1,1,16,16A16,16,0,0,1,108,92Z"/>'),YY=El("app-window","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM68,96A12,12,0,1,1,80,84,12,12,0,0,1,68,96Zm40,0a12,12,0,1,1,12-12A12,12,0,0,1,108,96Z"/>'),XY=El("app-window","0 0 256 256",'<path d="M224,56V200a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z" opacity="0.2"/><path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H40V56H216V200ZM80,84A12,12,0,1,1,68,72,12,12,0,0,1,80,84Zm40,0a12,12,0,1,1-12-12A12,12,0,0,1,120,84Z"/>'),JY="app-window",QY=Object.freeze(Object.defineProperty({__proto__:null,bold:GY,default:Cm,duotone:XY,fill:YY,glyphName:JY,light:qY,regular:Cm,thin:KY},Symbol.toStringTag,{value:"Module"})),xl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},eX=xl("broadcast","0 0 256 256",'<path d="M128,92a36,36,0,1,0,36,36A36,36,0,0,0,128,92Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm76-28a75.74,75.74,0,0,1-19.35,50.67,4,4,0,0,1-6-5.34,67.92,67.92,0,0,0,0-90.66,4,4,0,0,1,6-5.34A75.74,75.74,0,0,1,204,128ZM65.34,101.53a67.92,67.92,0,0,0,12,71.8,4,4,0,0,1-6,5.34,75.93,75.93,0,0,1,0-101.34,4,4,0,1,1,6,5.34A68,68,0,0,0,65.34,101.53ZM244,128a115.68,115.68,0,0,1-33.14,81.18,4,4,0,0,1-5.72-5.6,107.89,107.89,0,0,0,0-151.16,4,4,0,0,1,5.72-5.6A115.68,115.68,0,0,1,244,128ZM50.86,203.58a4,4,0,0,1-5.72,5.6,115.91,115.91,0,0,1,0-162.36,4,4,0,1,1,5.72,5.6,107.89,107.89,0,0,0,0,151.16Z"/>'),tX=xl("broadcast","0 0 256 256",'<path d="M128,90a38,38,0,1,0,38,38A38,38,0,0,0,128,90Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,128,154Zm78-26a77.74,77.74,0,0,1-19.86,52,6,6,0,0,1-8.94-8,65.93,65.93,0,0,0,0-88,6,6,0,1,1,8.94-8A77.74,77.74,0,0,1,206,128ZM67.18,102.31A65.93,65.93,0,0,0,78.8,172a6,6,0,0,1-.47,8.47,6,6,0,0,1-8.47-.47,77.93,77.93,0,0,1,0-104,6,6,0,1,1,8.94,8A66.21,66.21,0,0,0,67.18,102.31ZM246,128a117.71,117.71,0,0,1-33.71,82.58,6,6,0,0,1-8.58-8.4,105.88,105.88,0,0,0,0-148.36,6,6,0,0,1,8.58-8.4A117.71,117.71,0,0,1,246,128ZM52.29,202.18a6,6,0,0,1-8.58,8.4,117.92,117.92,0,0,1,0-165.16,6,6,0,1,1,8.58,8.4,105.88,105.88,0,0,0,0,148.36Z"/>'),km=xl("broadcast","0 0 256 256",'<path d="M128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Zm73.71,7.14a80,80,0,0,1-14.08,22.2,8,8,0,0,1-11.92-10.67,63.95,63.95,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67,80.08,80.08,0,0,1,14.08,84.47ZM69,103.09a64,64,0,0,0,11.26,67.58,8,8,0,0,1-11.92,10.67,79.93,79.93,0,0,1,0-106.67A8,8,0,1,1,80.29,85.34,63.77,63.77,0,0,0,69,103.09ZM248,128a119.58,119.58,0,0,1-34.29,84,8,8,0,1,1-11.42-11.2,103.9,103.9,0,0,0,0-145.56A8,8,0,1,1,213.71,44,119.58,119.58,0,0,1,248,128ZM53.71,200.78A8,8,0,1,1,42.29,212a119.87,119.87,0,0,1,0-168,8,8,0,1,1,11.42,11.2,103.9,103.9,0,0,0,0,145.56Z"/>'),iX=xl("broadcast","0 0 256 256",'<path d="M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Zm77.39,12.7A83.94,83.94,0,0,1,190.61,184a12,12,0,0,1-17.89-16,59.92,59.92,0,0,0,0-80,12,12,0,0,1,17.89-16,84.07,84.07,0,0,1,14.78,88.7ZM83.28,168a12,12,0,0,1-17.89,16,83.94,83.94,0,0,1,0-112A12,12,0,0,1,83.28,88a59.92,59.92,0,0,0,0,80ZM252,128a123.63,123.63,0,0,1-35.43,86.78A12,12,0,1,1,199.43,198a99.88,99.88,0,0,0,0-140,12,12,0,0,1,17.14-16.8A123.63,123.63,0,0,1,252,128ZM56.57,198a12,12,0,0,1-17.14,16.8,123.89,123.89,0,0,1,0-173.56A12,12,0,0,1,56.57,58a99.88,99.88,0,0,0,0,140Z"/>'),nX=xl("broadcast","0 0 256 256",'<path d="M168,128a40,40,0,1,1-40-40A40,40,0,0,1,168,128Zm40,0a79.74,79.74,0,0,0-20.37-53.33,8,8,0,1,0-11.92,10.67,64,64,0,0,1,0,85.33,8,8,0,0,0,11.92,10.67A79.79,79.79,0,0,0,208,128ZM80.29,85.34A8,8,0,1,0,68.37,74.67a79.94,79.94,0,0,0,0,106.67,8,8,0,0,0,11.92-10.67,63.95,63.95,0,0,1,0-85.33Zm158.28-4A119.48,119.48,0,0,0,213.71,44a8,8,0,1,0-11.42,11.2,103.9,103.9,0,0,1,0,145.56A8,8,0,1,0,213.71,212,120.12,120.12,0,0,0,238.57,81.29ZM32.17,168.48A103.9,103.9,0,0,1,53.71,55.22,8,8,0,1,0,42.29,44a119.87,119.87,0,0,0,0,168,8,8,0,1,0,11.42-11.2A103.61,103.61,0,0,1,32.17,168.48Z"/>'),rX=xl("broadcast","0 0 256 256",'<path d="M160,128a32,32,0,1,1-32-32A32,32,0,0,1,160,128Z" opacity="0.2"/><path d="M128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Zm73.71,7.14a80,80,0,0,1-14.08,22.2,8,8,0,0,1-11.92-10.67,63.95,63.95,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67,80.08,80.08,0,0,1,14.08,84.47ZM69,103.09a64,64,0,0,0,11.26,67.58,8,8,0,0,1-11.92,10.67,79.93,79.93,0,0,1,0-106.67A8,8,0,1,1,80.29,85.34,63.77,63.77,0,0,0,69,103.09ZM248,128a119.58,119.58,0,0,1-34.29,84,8,8,0,1,1-11.42-11.2,103.9,103.9,0,0,0,0-145.56A8,8,0,1,1,213.71,44,119.58,119.58,0,0,1,248,128ZM53.71,200.78A8,8,0,1,1,42.29,212a119.87,119.87,0,0,1,0-168,8,8,0,1,1,11.42,11.2,103.9,103.9,0,0,0,0,145.56Z"/>'),aX="broadcast",sX=Object.freeze(Object.defineProperty({__proto__:null,bold:iX,default:km,duotone:rX,fill:nX,glyphName:aX,light:tX,regular:km,thin:eX},Symbol.toStringTag,{value:"Module"})),Tl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},lX=Tl("camera","0 0 256 256",'<path d="M208,60H178.13L163.32,37.78A4,4,0,0,0,160,36H96a4,4,0,0,0-3.32,1.78L77.85,60H48A20,20,0,0,0,28,80V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V80A20,20,0,0,0,208,60Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V80A12,12,0,0,1,48,68H80a4,4,0,0,0,3.33-1.78L98.13,44h59.72l14.82,22.22A4,4,0,0,0,176,68h32a12,12,0,0,1,12,12ZM128,92a40,40,0,1,0,40,40A40,40,0,0,0,128,92Zm0,72a32,32,0,1,1,32-32A32,32,0,0,1,128,164Z"/>'),oX=Tl("camera","0 0 256 256",'<path d="M208,58H179.21L165,36.67A6,6,0,0,0,160,34H96a6,6,0,0,0-5,2.67L76.78,58H48A22,22,0,0,0,26,80V192a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V80A22,22,0,0,0,208,58Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V80A10,10,0,0,1,48,70H80a6,6,0,0,0,5-2.67L99.21,46h57.57L171,67.33A6,6,0,0,0,176,70h32a10,10,0,0,1,10,10ZM128,90a42,42,0,1,0,42,42A42,42,0,0,0,128,90Zm0,72a30,30,0,1,1,30-30A30,30,0,0,1,128,162Z"/>'),Am=Tl("camera","0 0 256 256",'<path d="M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"/>'),uX=Tl("camera","0 0 256 256",'<path d="M208,52H182.42L170,33.34A12,12,0,0,0,160,28H96a12,12,0,0,0-10,5.34L73.57,52H48A28,28,0,0,0,20,80V192a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V80A28,28,0,0,0,208,52Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4H80a12,12,0,0,0,10-5.34L102.42,52h51.15L166,70.66A12,12,0,0,0,176,76h32a4,4,0,0,1,4,4ZM128,84a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,84Zm0,72a24,24,0,1,1,24-24A24,24,0,0,1,128,156Z"/>'),cX=Tl("camera","0 0 256 256",'<path d="M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm-44,76a36,36,0,1,1-36-36A36,36,0,0,1,164,132Z"/>'),dX=Tl("camera","0 0 256 256",'<path d="M208,64H176L160,40H96L80,64H48A16,16,0,0,0,32,80V192a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V80A16,16,0,0,0,208,64ZM128,168a36,36,0,1,1,36-36A36,36,0,0,1,128,168Z" opacity="0.2"/><path d="M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"/>'),hX="camera",fX=Object.freeze(Object.defineProperty({__proto__:null,bold:uX,default:Am,duotone:dX,fill:cX,glyphName:hX,light:oX,regular:Am,thin:lX},Symbol.toStringTag,{value:"Module"})),Hl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},pX=Hl("cube","0 0 256 256",'<path d="M221.76,69.66l-88-48.18a12,12,0,0,0-11.52,0l-88,48.18A12,12,0,0,0,28,80.18v95.64a12,12,0,0,0,6.24,10.52l88,48.18a11.95,11.95,0,0,0,11.52,0l88-48.18A12,12,0,0,0,228,175.82V80.18A12,12,0,0,0,221.76,69.66ZM126.08,28.5a3.94,3.94,0,0,1,3.84,0L216.67,76,128,124.52,39.33,76Zm-88,150.83A4,4,0,0,1,36,175.82V83.29l88,48.16v94.91Zm179.84,0-85.92,47V131.45l88-48.16v92.53A4,4,0,0,1,217.92,179.32Z"/>'),_X=Hl("cube","0 0 256 256",'<path d="M222.72,67.9l-88-48.17a13.9,13.9,0,0,0-13.44,0l-88,48.18A14,14,0,0,0,26,80.18v95.64a14,14,0,0,0,7.28,12.27l88,48.18a13.92,13.92,0,0,0,13.44,0l88-48.18A14,14,0,0,0,230,175.82V80.18A14,14,0,0,0,222.72,67.9ZM127,30.25a2,2,0,0,1,1.92,0L212.51,76,128,122.24,43.49,76ZM39,177.57a2,2,0,0,1-1-1.75V86.66l84,46V223Zm177.92,0L134,223V132.64l84-46v89.16A2,2,0,0,1,217,177.57Z"/>'),$m=Hl("cube","0 0 256 256",'<path d="M223.68,66.15,135.68,18h0a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32h0l80.34,44L128,120,47.66,76ZM40,90l80,43.78v85.79L40,175.82Zm96,129.57V133.82L216,90v85.78Z"/>'),mX=Hl("cube","0 0 256 256",'<path d="M225.6,62.64l-88-48.17a19.91,19.91,0,0,0-19.2,0l-88,48.17A20,20,0,0,0,20,80.19v95.62a20,20,0,0,0,10.4,17.55l88,48.17a19.89,19.89,0,0,0,19.2,0l88-48.17A20,20,0,0,0,236,175.81V80.19A20,20,0,0,0,225.6,62.64ZM128,36.57,200,76,128,115.4,56,76ZM44,96.79l72,39.4v76.67L44,173.44Zm96,116.07V136.19l72-39.4v76.65Z"/>'),vX=Hl("cube","0 0 256 256",'<path d="M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,120,47.65,76,128,32l80.35,44Zm8,99.64V133.83l80-43.78v85.76Z"/>'),gX=Hl("cube","0 0 256 256",'<path d="M128,129.09V232a8,8,0,0,1-3.84-1l-88-48.16a8,8,0,0,1-4.16-7V80.2a8,8,0,0,1,.7-3.27Z" opacity="0.2"/><path d="M223.68,66.15,135.68,18h0a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32h0l80.34,44L128,120,47.66,76ZM40,90l80,43.78v85.79L40,175.82Zm96,129.57V133.82L216,90v85.78Z"/>'),bX="cube",yX=Object.freeze(Object.defineProperty({__proto__:null,bold:mX,default:$m,duotone:gX,fill:vX,glyphName:bX,light:_X,regular:$m,thin:pX},Symbol.toStringTag,{value:"Module"})),Nl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},wX=Nl("door","0 0 256 256",'<path d="M232,220H204V40a12,12,0,0,0-12-12H64A12,12,0,0,0,52,40V220H24a4,4,0,0,0,0,8H232a4,4,0,0,0,0-8ZM60,40a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4V220H60Zm104,92a8,8,0,1,1-8-8A8,8,0,0,1,164,132Z"/>'),SX=Nl("door","0 0 256 256",'<path d="M232,218H206V40a14,14,0,0,0-14-14H64A14,14,0,0,0,50,40V218H24a6,6,0,0,0,0,12H232a6,6,0,0,0,0-12ZM62,40a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2V218H62Zm104,92a10,10,0,1,1-10-10A10,10,0,0,1,166,132Z"/>'),Mm=Nl("door","0 0 256 256",'<path d="M232,216H208V40a16,16,0,0,0-16-16H64A16,16,0,0,0,48,40V216H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16ZM64,40H192V216H64Zm104,92a12,12,0,1,1-12-12A12,12,0,0,1,168,132Z"/>'),CX=Nl("door","0 0 256 256",'<path d="M232,212H212V40a20,20,0,0,0-20-20H64A20,20,0,0,0,44,40V212H24a12,12,0,0,0,0,24H232a12,12,0,0,0,0-24ZM68,44H188V212H68Zm104,88a16,16,0,1,1-16-16A16,16,0,0,1,172,132Z"/>'),kX=Nl("door","0 0 256 256",'<path d="M232,216H208V40a16,16,0,0,0-16-16H64A16,16,0,0,0,48,40V216H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16Zm-68-72a12,12,0,1,1,12-12A12,12,0,0,1,164,144Z"/>'),AX=Nl("door","0 0 256 256",'<path d="M200,40V224H56V40a8,8,0,0,1,8-8H192A8,8,0,0,1,200,40Z" opacity="0.2"/><path d="M232,216H208V40a16,16,0,0,0-16-16H64A16,16,0,0,0,48,40V216H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16ZM64,40H192V216H64Zm104,92a12,12,0,1,1-12-12A12,12,0,0,1,168,132Z"/>'),$X="door",MX=Object.freeze(Object.defineProperty({__proto__:null,bold:CX,default:Mm,duotone:AX,fill:kX,glyphName:$X,light:SX,regular:Mm,thin:wX},Symbol.toStringTag,{value:"Module"})),Pl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},LX=Pl("drop","0 0 256 256",'<path d="M171,50.38a250,250,0,0,0-40.73-37.66,4,4,0,0,0-4.58,0A250,250,0,0,0,85,50.38C58.17,81.21,44,113.58,44,144a84,84,0,0,0,168,0C212,113.58,197.83,81.21,171,50.38ZM128,220a76.08,76.08,0,0,1-76-76c0-35.9,21.15-67.8,38.9-88.24A255,255,0,0,1,128,21a255,255,0,0,1,37.1,34.8C182.85,76.2,204,108.1,204,144A76.08,76.08,0,0,1,128,220Zm51.94-67.33a53.51,53.51,0,0,1-43.28,43.27,3.68,3.68,0,0,1-.66.06,4,4,0,0,1-.66-7.94c18.18-3.06,33.63-18.51,36.72-36.73a4,4,0,0,1,7.88,1.34Z"/>'),EX=Pl("drop","0 0 256 256",'<path d="M172.53,49.06a252.86,252.86,0,0,0-41.09-38,6,6,0,0,0-6.88,0,252.86,252.86,0,0,0-41.09,38C56.34,80.26,42,113.09,42,144a86,86,0,0,0,172,0C214,113.09,199.66,80.26,172.53,49.06ZM128,218a74.09,74.09,0,0,1-74-74c0-59.62,59-108.93,74-120.51C143,35.07,202,84.38,202,144A74.09,74.09,0,0,1,128,218Zm53.92-65A55.58,55.58,0,0,1,137,197.92a7,7,0,0,1-1,.08,6,6,0,0,1-1-11.92c17.38-2.92,32.13-17.68,35.08-35.08a6,6,0,1,1,11.84,2Z"/>'),Lm=Pl("drop","0 0 256 256",'<path d="M174,47.75a254.19,254.19,0,0,0-41.45-38.3,8,8,0,0,0-9.18,0A254.19,254.19,0,0,0,82,47.75C54.51,79.32,40,112.6,40,144a88,88,0,0,0,176,0C216,112.6,201.49,79.32,174,47.75ZM128,216a72.08,72.08,0,0,1-72-72c0-57.23,55.47-105,72-118,16.53,13,72,60.75,72,118A72.08,72.08,0,0,1,128,216Zm55.89-62.66a57.6,57.6,0,0,1-46.56,46.55A8.75,8.75,0,0,1,136,200a8,8,0,0,1-1.32-15.89c16.57-2.79,30.63-16.85,33.44-33.45a8,8,0,0,1,15.78,2.68Z"/>'),xX=Pl("drop","0 0 256 256",'<path d="M134.88,6.17a12,12,0,0,0-13.76,0,259,259,0,0,0-42.18,39C50.85,77.43,36,111.62,36,144a92,92,0,0,0,184,0C220,66.64,138.36,8.6,134.88,6.17ZM128,212a68.07,68.07,0,0,1-68-68c0-33.31,20-63.37,36.7-82.71A249.35,249.35,0,0,1,128,31.11a249.35,249.35,0,0,1,31.3,30.18C176,80.63,196,110.69,196,144A68.07,68.07,0,0,1,128,212Zm49.62-52.4a52,52,0,0,1-34,34,12.2,12.2,0,0,1-3.6.55,12,12,0,0,1-3.6-23.45,28,28,0,0,0,18.32-18.32,12,12,0,0,1,22.9,7.2Z"/>'),TX=Pl("drop","0 0 256 256",'<path d="M174,47.75a254.19,254.19,0,0,0-41.45-38.3,8,8,0,0,0-9.18,0A254.19,254.19,0,0,0,82,47.75C54.51,79.32,40,112.6,40,144a88,88,0,0,0,176,0C216,112.6,201.49,79.32,174,47.75Zm9.85,105.59a57.6,57.6,0,0,1-46.56,46.55A8.75,8.75,0,0,1,136,200a8,8,0,0,1-1.32-15.89c16.57-2.79,30.63-16.85,33.44-33.45a8,8,0,0,1,15.78,2.68Z"/>'),HX=Pl("drop","0 0 256 256",'<path d="M208,144a80,80,0,0,1-160,0c0-72,80-128,80-128S208,72,208,144Z" opacity="0.2"/><path d="M174,47.75a254.19,254.19,0,0,0-41.45-38.3,8,8,0,0,0-9.18,0A254.19,254.19,0,0,0,82,47.75C54.51,79.32,40,112.6,40,144a88,88,0,0,0,176,0C216,112.6,201.49,79.32,174,47.75ZM128,216a72.08,72.08,0,0,1-72-72c0-57.23,55.47-105,72-118,16.53,13,72,60.75,72,118A72.08,72.08,0,0,1,128,216Zm55.89-62.66a57.6,57.6,0,0,1-46.56,46.55A8.75,8.75,0,0,1,136,200a8,8,0,0,1-1.32-15.89c16.57-2.79,30.63-16.85,33.44-33.45a8,8,0,0,1,15.78,2.68Z"/>'),NX="drop",PX=Object.freeze(Object.defineProperty({__proto__:null,bold:xX,default:Lm,duotone:HX,fill:TX,glyphName:NX,light:EX,regular:Lm,thin:LX},Symbol.toStringTag,{value:"Module"})),Ol=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},OX=Ol("fan","0 0 256 256",'<path d="M229.12,136a56,56,0,0,0-86-31.56,28.25,28.25,0,0,0-4.56-2.39l17.27-68.94a4,4,0,0,0-1.72-4.34A56,56,0,1,0,100,126.62c0,.46,0,.92,0,1.38a27.39,27.39,0,0,0,.26,3.76L31.91,151.28A4,4,0,0,0,29,154.94a56,56,0,0,0,41.45,56.62,56.46,56.46,0,0,0,14.59,1.93,56.07,56.07,0,0,0,55.73-60.59,27.93,27.93,0,0,0,4.33-2.77l51.09,49.44A4,4,0,0,0,199,200.7a4.06,4.06,0,0,0,1.84-.45A56,56,0,0,0,229.12,136ZM128,148a20,20,0,1,1,20-20A20,20,0,0,1,128,148ZM76,76a48,48,0,0,1,71.4-41.92l-16.55,66.06c-.94-.09-1.89-.14-2.85-.14a28.06,28.06,0,0,0-26.34,18.49A47.82,47.82,0,0,1,76,76Zm33,123a48,48,0,0,1-72-40.87l65.5-18.7A28,28,0,0,0,128,156a28.81,28.81,0,0,0,4.94-.44A47.81,47.81,0,0,1,109,199ZM216.6,174.54a47.93,47.93,0,0,1-17,17.22l-49-47.37a27.91,27.91,0,0,0-1.3-34.44,48,48,0,0,1,67.22,64.59Z"/>'),IX=Ol("fan","0 0 256 256",'<path d="M231.06,135.52a58,58,0,0,0-88-33.42c-.69-.41-1.41-.8-2.14-1.15l16.86-67.32a6,6,0,0,0-2.58-6.51A58,58,0,1,0,98,127.86V128c0,.77,0,1.54.1,2.3L31.37,149.36A6,6,0,0,0,27,154.85,58,58,0,1,0,142.88,154c.7-.4,1.39-.83,2.06-1.29L194.81,201a6,6,0,0,0,6.94,1,58,58,0,0,0,29.31-66.51ZM110,128a18,18,0,1,1,18,18A18,18,0,0,1,110,128ZM78,76a46,46,0,0,1,67.08-40.9L129.32,98q-.66,0-1.32,0a30,30,0,0,0-27.33,17.66A45.84,45.84,0,0,1,78,76Zm30,121.3a46,46,0,0,1-69-37.64l62.39-17.82A30,30,0,0,0,128,158a29.29,29.29,0,0,0,3-.15A45.85,45.85,0,0,1,108,197.3Zm106.9-23.76a45.91,45.91,0,0,1-15,15.7l-46.63-45.12a29.91,29.91,0,0,0-.93-33.62,46,46,0,0,1,62.52,63Z"/>'),Em=Ol("fan","0 0 256 256",'<path d="M233,135a60,60,0,0,0-89.62-35.45l16.39-65.44a8,8,0,0,0-3.45-8.68A60,60,0,1,0,95.69,128.91L30.82,147.44a8,8,0,0,0-5.8,7.32,60,60,0,0,0,44.42,60.66,60.52,60.52,0,0,0,15.62,2.07,60.07,60.07,0,0,0,59.88-62l48.48,46.92a8,8,0,0,0,9.25,1.35A60,60,0,0,0,233,135Zm-121-7a16,16,0,1,1,16,16A16,16,0,0,1,112,128ZM80,76a44,44,0,0,1,62.75-39.82L127.77,96A32,32,0,0,0,99.85,112.8,43.85,43.85,0,0,1,80,76Zm27,119.57a44,44,0,0,1-65.86-34.43l59.31-16.94A32,32,0,0,0,128,160l.91,0A43.82,43.82,0,0,1,107,195.57Zm106.17-23a43.92,43.92,0,0,1-13,14.14l-44.32-42.89a31.91,31.91,0,0,0-.59-32.57,44,44,0,0,1,57.91,61.32Z"/>'),RX=Ol("fan","0 0 256 256",'<path d="M236.85,134a64,64,0,0,0-87.43-42.11l14.22-56.77a12,12,0,0,0-5.17-13A64,64,0,0,0,86,127.52L29.72,143.59a12,12,0,0,0-8.69,11,64,64,0,0,0,127.56,10l42,40.7a12,12,0,0,0,13.86,2A64,64,0,0,0,236.85,134ZM116,128a12,12,0,1,1,12,12A12,12,0,0,1,116,128Zm8-92a40,40,0,0,1,14,2.53L124.6,92.17a36,36,0,0,0-25.85,14.88A40,40,0,0,1,124,36ZM105,192.1A40,40,0,0,1,45.5,164l53.18-15.19a36,36,0,0,0,25.8,15A39.84,39.84,0,0,1,105,192.1Zm104.7-21.56a39.92,39.92,0,0,1-9.21,10.89L160.73,143a35.9,35.9,0,0,0,.05-29.83,40,40,0,0,1,48.89,57.4Z"/>'),DX=Ol("fan","0 0 256 256",'<path d="M233,135a60,60,0,0,0-89.62-35.45l16.39-65.44a8,8,0,0,0-3.45-8.68A60,60,0,1,0,95.69,128.91L30.82,147.44a8,8,0,0,0-5.8,7.32,60,60,0,0,0,44.42,60.66,60.52,60.52,0,0,0,15.62,2.07,60.07,60.07,0,0,0,59.88-62l48.48,46.92a8,8,0,0,0,9.25,1.35A60,60,0,0,0,233,135ZM130.44,147.85a20,20,0,1,1,17.41-22.29A20,20,0,0,1,130.44,147.85Z"/>'),VX=Ol("fan","0 0 256 256",'<path d="M136.5,150.45A52,52,0,1,1,33,155.13l71.91-20.54h0A24,24,0,0,0,128,152a23.75,23.75,0,0,0,8.5-1.56Zm-32.19-26.31h0a24,24,0,0,1,29.52-19.42h0L152,32.17a52,52,0,1,0-47.69,92ZM201,105.5a52,52,0,0,0-57.84,3.91h0a24,24,0,0,1,2.06,35.26h0l53.74,52a52,52,0,0,0,2-91.2Z" opacity="0.2"/><path d="M233,135a60,60,0,0,0-89.62-35.45l16.39-65.44a8,8,0,0,0-3.45-8.68A60,60,0,1,0,95.69,128.91L30.82,147.44a8,8,0,0,0-5.8,7.32,60,60,0,0,0,44.42,60.66,60.52,60.52,0,0,0,15.62,2.07,60.07,60.07,0,0,0,59.88-62l48.48,46.92a8,8,0,0,0,9.25,1.35A60,60,0,0,0,233,135Zm-121-7a16,16,0,1,1,16,16A16,16,0,0,1,112,128ZM80,76a44,44,0,0,1,62.75-39.82L127.77,96A32,32,0,0,0,99.85,112.8,43.85,43.85,0,0,1,80,76Zm27,119.57a44,44,0,0,1-65.86-34.43l59.31-16.94A32,32,0,0,0,128,160l.91,0A43.82,43.82,0,0,1,107,195.57Zm106.17-23a43.92,43.92,0,0,1-13,14.14l-44.32-42.89a31.91,31.91,0,0,0-.59-32.57,44,44,0,0,1,57.91,61.32Z"/>'),BX="fan",ZX=Object.freeze(Object.defineProperty({__proto__:null,bold:RX,default:Em,duotone:VX,fill:DX,glyphName:BX,light:IX,regular:Em,thin:OX},Symbol.toStringTag,{value:"Module"})),Il=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},FX=Il("game-controller","0 0 256 256",'<path d="M176,108H152a4,4,0,0,1,0-8h24a4,4,0,0,1,0,8Zm-72-8H92V88a4,4,0,0,0-8,0v12H72a4,4,0,0,0,0,8H84v12a4,4,0,0,0,8,0V108h12a4,4,0,0,0,0-8Zm134.21,98.36a32,32,0,0,1-48.84,4.27l-.17-.18L148.29,156H107.72L66.81,202.44l-.18.19A32.08,32.08,0,0,1,44,212a32,32,0,0,1-31.5-37.56L28.87,90.21A55.87,55.87,0,0,1,83.89,44H172a56.07,56.07,0,0,1,55.1,46.1.29.29,0,0,1,0,.1l16.37,84.16A31.86,31.86,0,0,1,238.21,198.36ZM172,148a48,48,0,1,0,0-96H83.9A47.9,47.9,0,0,0,36.74,91.67L20.36,175.9a24,24,0,0,0,19.48,27.73,24,24,0,0,0,21-6.58l42-47.69a4,4,0,0,1,3-1.36Zm63.63,27.83-11-56.66A56.09,56.09,0,0,1,172,156H159l36.16,41.06a24,24,0,0,0,40.52-21.23Z"/>'),zX=Il("game-controller","0 0 256 256",'<path d="M176,110H152a6,6,0,0,1,0-12h24a6,6,0,0,1,0,12ZM104,98H94V88a6,6,0,0,0-12,0V98H72a6,6,0,0,0,0,12H82v10a6,6,0,0,0,12,0V110h10a6,6,0,0,0,0-12ZM239.84,199.5A34,34,0,0,1,212,214,34.11,34.11,0,0,1,188,204.05l-.26-.28L147.38,158H108.62L68.31,203.76,68,204A34,34,0,0,1,44,214a34,34,0,0,1-33.46-39.91s0-.06,0-.1L26.9,89.88A57.89,57.89,0,0,1,83.89,42H172a58.07,58.07,0,0,1,57.05,47.63c0,.07,0,.12,0,.19L245.46,174s0,.07,0,.11A33.75,33.75,0,0,1,239.84,199.5ZM172,146a46,46,0,0,0,0-92H83.89A45.9,45.9,0,0,0,38.71,92a.36.36,0,0,0,0,.1L22.33,176.23a22,22,0,0,0,37.11,19.45l42-47.65a6,6,0,0,1,4.5-2Zm61.67,30.23-9.79-50.35A58.06,58.06,0,0,1,172,158h-8.63l33.19,37.68a22,22,0,0,0,37.11-19.45Z"/>'),xm=Il("game-controller","0 0 256 256",'<path d="M176,112H152a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16ZM104,96H96V88a8,8,0,0,0-16,0v8H72a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM241.48,200.65a36,36,0,0,1-54.94,4.81c-.12-.12-.24-.24-.35-.37L146.48,160h-37L69.81,205.09l-.35.37A36.08,36.08,0,0,1,44,216,36,36,0,0,1,8.56,173.75a.68.68,0,0,1,0-.14L24.93,89.52A59.88,59.88,0,0,1,83.89,40H172a60.08,60.08,0,0,1,59,49.25c0,.06,0,.12,0,.18l16.37,84.17a.68.68,0,0,1,0,.14A35.74,35.74,0,0,1,241.48,200.65ZM172,144a44,44,0,0,0,0-88H83.89A43.9,43.9,0,0,0,40.68,92.37l0,.13L24.3,176.59A20,20,0,0,0,58,194.3l41.92-47.59a8,8,0,0,1,6-2.71Zm59.7,32.59-8.74-45A60,60,0,0,1,172,160h-4.2L198,194.31a20.09,20.09,0,0,0,17.46,5.39,20,20,0,0,0,16.23-23.11Z"/>'),UX=Il("game-controller","0 0 256 256",'<path d="M176,116H152a12,12,0,0,1,0-24h24a12,12,0,0,1,0,24ZM104,92h-4V88a12,12,0,0,0-24,0v4H72a12,12,0,0,0,0,24h4v4a12,12,0,0,0,24,0v-4h4a12,12,0,0,0,0-24ZM244.76,202.94a40,40,0,0,1-61,5.35,7,7,0,0,1-.53-.56L144.67,164H111.33L72.81,207.73c-.17.19-.35.38-.53.56A40,40,0,0,1,4.62,173.05a1.18,1.18,0,0,1,0-.2L21,88.79A63.88,63.88,0,0,1,83.88,36H172a64.08,64.08,0,0,1,62.93,52.48,1.8,1.8,0,0,1,0,.19l16.36,84.17a1.77,1.77,0,0,1,0,.2A39.74,39.74,0,0,1,244.76,202.94ZM172,140a40,40,0,0,0,0-80H83.89A39.9,39.9,0,0,0,44.62,93.06a1.55,1.55,0,0,0,0,.21l-16.34,84a16,16,0,0,0,13,18.44,16.07,16.07,0,0,0,13.86-4.21L96.9,144.07a12,12,0,0,1,9-4.07Zm55.76,37.31-7-35.95a63.84,63.84,0,0,1-44.27,22.46l24.41,27.72a16,16,0,0,0,26.85-14.23Z"/>'),WX=Il("game-controller","0 0 256 256",'<path d="M247.44,173.75a.68.68,0,0,0,0-.14L231.05,89.44c0-.06,0-.12,0-.18A60.08,60.08,0,0,0,172,40H83.89a59.88,59.88,0,0,0-59,49.52L8.58,173.61a.68.68,0,0,0,0,.14,36,36,0,0,0,60.9,31.71l.35-.37L109.52,160h37l39.71,45.09c.11.13.23.25.35.37A36.08,36.08,0,0,0,212,216a36,36,0,0,0,35.43-42.25ZM104,112H96v8a8,8,0,0,1-16,0v-8H72a8,8,0,0,1,0-16h8V88a8,8,0,0,1,16,0v8h8a8,8,0,0,1,0,16Zm40-8a8,8,0,0,1,8-8h24a8,8,0,0,1,0,16H152A8,8,0,0,1,144,104Zm84.37,87.47a19.84,19.84,0,0,1-12.9,8.23A20.09,20.09,0,0,1,198,194.31L167.8,160H172a60,60,0,0,0,51-28.38l8.74,45A19.82,19.82,0,0,1,228.37,191.47Z"/>'),jX=Il("game-controller","0 0 256 256",'<path d="M216.86,207.57a28,28,0,0,1-24.66-7.77L150.09,152H172a51.94,51.94,0,0,0,51.2-61h0l16.36,84.17A28,28,0,0,1,216.86,207.57Z" opacity="0.2"/><path d="M176,112H152a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16ZM104,96H96V88a8,8,0,0,0-16,0v8H72a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM241.48,200.65a36,36,0,0,1-54.94,4.81c-.12-.12-.24-.24-.35-.37L146.48,160h-37L69.81,205.09l-.35.37A36.08,36.08,0,0,1,44,216,36,36,0,0,1,8.56,173.75a.68.68,0,0,1,0-.14L24.93,89.52A59.88,59.88,0,0,1,83.89,40H172a60.08,60.08,0,0,1,59,49.25c0,.06,0,.12,0,.18l16.37,84.17a.68.68,0,0,1,0,.14A35.74,35.74,0,0,1,241.48,200.65ZM172,144a44,44,0,0,0,0-88H83.89A43.9,43.9,0,0,0,40.68,92.37l0,.13L24.3,176.59A20,20,0,0,0,58,194.3l41.92-47.59a8,8,0,0,1,6-2.71Zm59.7,32.59-8.74-45A60,60,0,0,1,172,160h-4.2L198,194.31a20.09,20.09,0,0,0,17.46,5.39,20,20,0,0,0,16.23-23.11Z"/>'),KX="game-controller",qX=Object.freeze(Object.defineProperty({__proto__:null,bold:UX,default:xm,duotone:jX,fill:WX,glyphName:KX,light:zX,regular:xm,thin:FX},Symbol.toStringTag,{value:"Module"})),Rl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},GX=Rl("garage","0 0 256 256",'<path d="M240,196H228V98.67a12,12,0,0,0-5.34-10L134.66,30a12,12,0,0,0-13.32,0l-88,58.67a12,12,0,0,0-5.34,10V196H16a4,4,0,0,0,0,8H240a4,4,0,0,0,0-8ZM36,98.67a4,4,0,0,1,1.78-3.33l88-58.66a4,4,0,0,1,4.44,0l88,58.66A4,4,0,0,1,220,98.67V196H188V136a4,4,0,0,0-4-4H72a4,4,0,0,0-4,4v60H36ZM180,140v24H132V140Zm-56,24H76V140h48Zm-48,8h48v24H76Zm56,0h48v24H132Z"/>'),YX=Rl("garage","0 0 256 256",'<path d="M240,194H230V98.67A14,14,0,0,0,223.77,87l-88-58.66a14,14,0,0,0-15.54,0L32.23,87A14,14,0,0,0,26,98.67V194H16a6,6,0,0,0,0,12H240a6,6,0,0,0,0-12ZM38,98.67A2,2,0,0,1,38.89,97l88-58.67a2,2,0,0,1,2.22,0l88,58.67a2,2,0,0,1,.89,1.66V194H190V136a6,6,0,0,0-6-6H72a6,6,0,0,0-6,6v58H38ZM178,142v20H134V142Zm-56,20H78V142h44ZM78,174h44v20H78Zm56,0h44v20H134Z"/>'),Tm=Rl("garage","0 0 256 256",'<path d="M240,192h-8V98.67a16,16,0,0,0-7.12-13.31l-88-58.67a16,16,0,0,0-17.75,0l-88,58.67A16,16,0,0,0,24,98.67V192H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM40,98.67,128,40l88,58.66V192H192V136a8,8,0,0,0-8-8H72a8,8,0,0,0-8,8v56H40ZM176,144v16H136V144Zm-56,16H80V144h40ZM80,176h40v16H80Zm56,0h40v16H136Z"/>'),XX=Rl("garage","0 0 256 256",'<path d="M240,188h-4V98.67A20,20,0,0,0,227.09,82l-88-58.66a19.94,19.94,0,0,0-22.18,0L28.91,82A20,20,0,0,0,20,98.67V188H16a12,12,0,0,0,0,24H240a12,12,0,0,0,0-24ZM44,100.81l84-56,84,56V188H196V120a12,12,0,0,0-12-12H72a12,12,0,0,0-12,12v68H44ZM172,132v16H140V132Zm-56,16H84V132h32ZM84,172h32v16H84Zm56,0h32v16H140Z"/>'),JX=Rl("garage","0 0 256 256",'<path d="M240,192h-8V98.67a16,16,0,0,0-7.12-13.31l-88-58.67a16,16,0,0,0-17.75,0l-88,58.67A16,16,0,0,0,24,98.67V192H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM136,128h56v24H136Zm-16,24H64V128h56ZM64,168h56v24H64Zm72,0h56v24H136Z"/>'),QX=Rl("garage","0 0 256 256",'<path d="M184,136v64H72V136Z" opacity="0.2"/><path d="M240,192h-8V98.67a16,16,0,0,0-7.12-13.31l-88-58.67a16,16,0,0,0-17.75,0l-88,58.67A16,16,0,0,0,24,98.67V192H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM40,98.67,128,40l88,58.66V192H192V136a8,8,0,0,0-8-8H72a8,8,0,0,0-8,8v56H40ZM176,144v16H136V144Zm-56,16H80V144h40ZM80,176h40v16H80Zm56,0h40v16H136Z"/>'),eJ="garage",tJ=Object.freeze(Object.defineProperty({__proto__:null,bold:XX,default:Tm,duotone:QX,fill:JX,glyphName:eJ,light:YX,regular:Tm,thin:GX},Symbol.toStringTag,{value:"Module"})),Dl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},iJ=Dl("house","0 0 256 256",'<path d="M216.49,111.51l-80-80a12,12,0,0,0-17,0l-80,80A12,12,0,0,0,36,120v96a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V156h40v60a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V120A12,12,0,0,0,216.49,111.51ZM212,212H156V152a4,4,0,0,0-4-4H104a4,4,0,0,0-4,4v60H44V120a4,4,0,0,1,1.17-2.83l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,212,120Z"/>'),nJ=Dl("house","0 0 256 256",'<path d="M217.9,110.1l-80-80a14,14,0,0,0-19.8,0l-80,80A13.92,13.92,0,0,0,34,120v96a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V158h36v58a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V120A13.92,13.92,0,0,0,217.9,110.1ZM210,210H158V152a6,6,0,0,0-6-6H104a6,6,0,0,0-6,6v58H46V120a2,2,0,0,1,.58-1.42l80-80a2,2,0,0,1,2.84,0l80,80A2,2,0,0,1,210,120Z"/>'),Hm=Dl("house","0 0 256 256",'<path d="M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z"/>'),rJ=Dl("house","0 0 256 256",'<path d="M222.14,105.85l-80-80a20,20,0,0,0-28.28,0l-80,80A19.86,19.86,0,0,0,28,120v96a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12V164h24v52a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12V120A19.86,19.86,0,0,0,222.14,105.85ZM204,204H164V152a12,12,0,0,0-12-12H104a12,12,0,0,0-12,12v52H52V121.65l76-76,76,76Z"/>'),aJ=Dl("house","0 0 256 256",'<path d="M224,120v96a8,8,0,0,1-8,8H160a8,8,0,0,1-8-8V164a4,4,0,0,0-4-4H108a4,4,0,0,0-4,4v52a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V120a16,16,0,0,1,4.69-11.31l80-80a16,16,0,0,1,22.62,0l80,80A16,16,0,0,1,224,120Z"/>'),sJ=Dl("house","0 0 256 256",'<path d="M216,120v96H152V152H104v64H40V120a8,8,0,0,1,2.34-5.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,216,120Z" opacity="0.2"/><path d="M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z"/>'),lJ="house",oJ=Object.freeze(Object.defineProperty({__proto__:null,bold:rJ,default:Hm,duotone:sJ,fill:aJ,glyphName:lJ,light:nJ,regular:Hm,thin:iJ},Symbol.toStringTag,{value:"Module"})),Vl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},uJ=Vl("intersect","0 0 256 256",'<path d="M171.17,84.83a76,76,0,1,0-86.34,86.34,76,76,0,1,0,86.34-86.34ZM28,96A68,68,0,0,1,162.93,84.07c-1,0-2-.07-2.93-.07a76.08,76.08,0,0,0-76,76c0,1,0,2,.07,2.93A68.1,68.1,0,0,1,28,96Zm136,0a67.59,67.59,0,0,1-7.45,30.89L129.11,99.45A67.59,67.59,0,0,1,160,92c1.3,0,2.6,0,3.88.12C164,93.4,164,94.7,164,96ZM92,160a67.59,67.59,0,0,1,7.45-30.89l27.44,27.44A67.59,67.59,0,0,1,96,164c-1.3,0-2.6-.05-3.88-.12C92.05,162.6,92,161.3,92,160Zm42-7.64L103.64,122A68.74,68.74,0,0,1,122,103.64L152.36,134A68.74,68.74,0,0,1,134,152.36ZM160,228a68.1,68.1,0,0,1-66.93-56.07c1,0,2,.07,2.93.07a76.08,76.08,0,0,0,76-76c0-1,0-2-.07-2.93A68,68,0,0,1,160,228Z"/>'),cJ=Vl("intersect","0 0 256 256",'<path d="M172.91,83.09a78,78,0,1,0-89.82,89.82,78,78,0,1,0,89.82-89.82ZM30,96A66,66,0,0,1,160.49,82H160a78.09,78.09,0,0,0-78,78c0,.17,0,.33,0,.49A66.1,66.1,0,0,1,30,96Zm64,64a65.62,65.62,0,0,1,6-27.49L123.49,156A65.62,65.62,0,0,1,96,162c-.65,0-1.3,0-2-.05C94,161.3,94,160.65,94,160Zm40.23-10.25-28-28a66.47,66.47,0,0,1,15.52-15.52l28,28A66.47,66.47,0,0,1,134.23,149.75ZM162,96a65.62,65.62,0,0,1-6,27.49L132.51,100A65.62,65.62,0,0,1,160,94c.65,0,1.3,0,1.95,0C162,94.7,162,95.35,162,96Zm-2,130a66.1,66.1,0,0,1-64.49-52H96a78.09,78.09,0,0,0,78-78c0-.17,0-.33,0-.49A66,66,0,0,1,160,226Z"/>'),Nm=Vl("intersect","0 0 256 256",'<path d="M174.63,81.37a80,80,0,1,0-93.26,93.26,80,80,0,1,0,93.26-93.26ZM100.69,136,120,155.31A63.48,63.48,0,0,1,96,160,63.48,63.48,0,0,1,100.69,136Zm33.75,11.13-25.57-25.57a64.65,64.65,0,0,1,12.69-12.69l25.57,25.57A64.65,64.65,0,0,1,134.44,147.13ZM155.31,120,136,100.69A63.48,63.48,0,0,1,160,96,63.48,63.48,0,0,1,155.31,120ZM32,96a64,64,0,0,1,126-16A80.08,80.08,0,0,0,80.05,158,64.11,64.11,0,0,1,32,96ZM160,224A64.11,64.11,0,0,1,98,176,80.08,80.08,0,0,0,176,98,64,64,0,0,1,160,224Z"/>'),dJ=Vl("intersect","0 0 256 256",'<path d="M178,78A84,84,0,1,0,78,178,84,84,0,1,0,178,78Zm-22.19,22.19a59.57,59.57,0,0,1-9.81,28.9L126.94,110A59.57,59.57,0,0,1,155.84,100.16Zm-79.5,52.51a60,60,0,1,1,76.33-76.33A84.11,84.11,0,0,0,76.34,152.67Zm23.82,3.17a59.57,59.57,0,0,1,9.81-28.9L129.06,146A59.57,59.57,0,0,1,100.16,155.84ZM160,220a60.09,60.09,0,0,1-56.67-40.34,84.11,84.11,0,0,0,76.33-76.33A60,60,0,0,1,160,220Z"/>'),hJ=Vl("intersect","0 0 256 256",'<path d="M174.63,81.37a80,80,0,1,0-93.26,93.26,80,80,0,1,0,93.26-93.26ZM32,96a64,64,0,0,1,126-16A80.08,80.08,0,0,0,80.05,158,64.11,64.11,0,0,1,32,96ZM160,224A64.11,64.11,0,0,1,98,176,80.08,80.08,0,0,0,176,98,64,64,0,0,1,160,224Z"/>'),fJ=Vl("intersect","0 0 256 256",'<path d="M168,96a72,72,0,0,1-72,72,73.37,73.37,0,0,1-7.6-.4A73.37,73.37,0,0,1,88,160a72,72,0,0,1,72-72,73.37,73.37,0,0,1,7.6.4A73.37,73.37,0,0,1,168,96Z" opacity="0.2"/><path d="M174.63,81.37a80,80,0,1,0-93.26,93.26,80,80,0,1,0,93.26-93.26ZM32,96a64,64,0,0,1,126-16A80.08,80.08,0,0,0,80.05,158,64.11,64.11,0,0,1,32,96Zm128,0a64.07,64.07,0,0,1-64,64A64.07,64.07,0,0,1,160,96Zm0,128A64.11,64.11,0,0,1,98,176,80.08,80.08,0,0,0,176,98,64,64,0,0,1,160,224Z"/>'),pJ="intersect",_J=Object.freeze(Object.defineProperty({__proto__:null,bold:dJ,default:Nm,duotone:fJ,fill:hJ,glyphName:pJ,light:cJ,regular:Nm,thin:uJ},Symbol.toStringTag,{value:"Module"})),Bl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},mJ=Bl("lamp","0 0 256 256",'<path d="M243.68,150.42l-48-112A4,4,0,0,0,192,36H64a4,4,0,0,0-3.68,2.42l-48,112A4,4,0,0,0,16,156H124v56H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8H132V156h64v36a4,4,0,0,0,8,0V156h36a4,4,0,0,0,3.68-5.58ZM22.07,148,66.64,44H189.36l44.57,104Z"/>'),vJ=Bl("lamp","0 0 256 256",'<path d="M245.51,149.64l-48-112A6,6,0,0,0,192,34H64a6,6,0,0,0-5.51,3.64l-48,112A6,6,0,0,0,16,158H122v52H96a6,6,0,0,0,0,12h64a6,6,0,0,0,0-12H134V158h60v34a6,6,0,0,0,12,0V158h34a6,6,0,0,0,5.51-8.36ZM25.1,146,68,46H188L230.9,146Z"/>'),Pm=Bl("lamp","0 0 256 256",'<path d="M247.35,148.85l-48-112A8,8,0,0,0,192,32H64a8,8,0,0,0-7.35,4.85l-48,112A8,8,0,0,0,16,160H120v48H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16H136V160h56v32a8,8,0,0,0,16,0V160h32a8,8,0,0,0,7.35-11.15ZM28.13,144,69.28,48H186.72l41.15,96Z"/>'),gJ=Bl("lamp","0 0 256 256",'<path d="M251,147.27l-48-112A12,12,0,0,0,192,28H64a12,12,0,0,0-11,7.27l-48,112A12,12,0,0,0,16,164H116v40H96a12,12,0,0,0,0,24h64a12,12,0,0,0,0-24H140V164h48v28a12,12,0,0,0,24,0V164h28a12,12,0,0,0,11-16.73ZM34.2,140,71.91,52H184.09l37.71,88Z"/>'),bJ=Bl("lamp","0 0 256 256",'<path d="M246.68,156.4A8,8,0,0,1,240,160H208v32a8,8,0,0,1-16,0V160H136v48h24a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16h24V160H16a8,8,0,0,1-7.35-11.15l48-112A8,8,0,0,1,64,32H192a8,8,0,0,1,7.35,4.85l48,112A8,8,0,0,1,246.68,156.4Z"/>'),yJ=Bl("lamp","0 0 256 256",'<path d="M240,152H16L64,40H192Z" opacity="0.2"/><path d="M247.35,148.85l-48-112A8,8,0,0,0,192,32H64a8,8,0,0,0-7.35,4.85l-48,112A8,8,0,0,0,16,160H120v48H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16H136V160h56v32a8,8,0,0,0,16,0V160h32a8,8,0,0,0,7.35-11.15ZM28.13,144,69.28,48H186.72l41.15,96Z"/>'),wJ="lamp",SJ=Object.freeze(Object.defineProperty({__proto__:null,bold:gJ,default:Pm,duotone:yJ,fill:bJ,glyphName:wJ,light:vJ,regular:Pm,thin:mJ},Symbol.toStringTag,{value:"Module"})),Zl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},CJ=Zl("lightbulb","0 0 256 256",'<path d="M172,232a4,4,0,0,1-4,4H88a4,4,0,0,1,0-8h80A4,4,0,0,1,172,232Zm40-128a83.59,83.59,0,0,1-32.11,66.06A20.2,20.2,0,0,0,172,186v6a12,12,0,0,1-12,12H96a12,12,0,0,1-12-12v-6a20,20,0,0,0-7.76-15.81A83.58,83.58,0,0,1,44,104.47C43.75,59,80.52,21.09,126,20a84,84,0,0,1,86,84Zm-8,0a76,76,0,0,0-77.83-76C85,29,51.77,63.27,52,104.43a75.62,75.62,0,0,0,29.17,59.43A28,28,0,0,1,92,186v6a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4v-6a28.14,28.14,0,0,1,10.94-22.2A75.62,75.62,0,0,0,204,104ZM136.66,52.06a4,4,0,0,0-1.32,7.88C153.53,63,169,78.45,172.06,96.67A4,4,0,0,0,176,100a3.88,3.88,0,0,0,.67-.06,4,4,0,0,0,3.27-4.61A53.51,53.51,0,0,0,136.66,52.06Z"/>'),kJ=Zl("lightbulb","0 0 256 256",'<path d="M174,232a6,6,0,0,1-6,6H88a6,6,0,0,1,0-12h80A6,6,0,0,1,174,232Zm40-128a85.56,85.56,0,0,1-32.88,67.64A18.23,18.23,0,0,0,174,186v6a14,14,0,0,1-14,14H96a14,14,0,0,1-14-14v-6a18,18,0,0,0-7-14.23h0a85.59,85.59,0,0,1-33-67.24C41.74,57.91,79.39,19.12,125.93,18A86,86,0,0,1,214,104Zm-12,0a74,74,0,0,0-75.79-74C86.17,31,53.78,64.34,54,104.42a73.67,73.67,0,0,0,28.4,57.87A29.92,29.92,0,0,1,94,186v6a2,2,0,0,0,2,2h64a2,2,0,0,0,2-2v-6a30.18,30.18,0,0,1,11.7-23.78A73.59,73.59,0,0,0,202,104Zm-20.08-9A55.58,55.58,0,0,0,137,50.08a6,6,0,1,0-2,11.84C152.38,64.84,167.13,79.6,170.08,97a6,6,0,0,0,5.91,5,6.87,6.87,0,0,0,1-.08A6,6,0,0,0,181.92,95Z"/>'),Om=Zl("lightbulb","0 0 256 256",'<path d="M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-16,0a72,72,0,0,0-73.74-72c-39,.92-70.47,33.39-70.26,72.39a71.65,71.65,0,0,0,27.64,56.3A32,32,0,0,1,96,186v6h64v-6a32.15,32.15,0,0,1,12.47-25.35A71.65,71.65,0,0,0,200,104Zm-16.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"/>'),AJ=Zl("lightbulb","0 0 256 256",'<path d="M180,232a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h80A12,12,0,0,1,180,232Zm40-128a91.51,91.51,0,0,1-35.17,72.35A12.26,12.26,0,0,0,180,186v2a20,20,0,0,1-20,20H96a20,20,0,0,1-20-20v-2a12,12,0,0,0-4.7-9.51A91.57,91.57,0,0,1,36,104.52C35.73,54.69,76,13.2,125.79,12A92,92,0,0,1,220,104Zm-24,0a68,68,0,0,0-69.65-68C89.56,36.88,59.8,67.55,60,104.38a67.71,67.71,0,0,0,26.1,53.19A35.87,35.87,0,0,1,100,184h56.1A36.13,36.13,0,0,1,170,157.49,67.68,67.68,0,0,0,196,104Zm-20.07-5.32a48.5,48.5,0,0,0-31.91-40,12,12,0,0,0-8,22.62,24.31,24.31,0,0,1,16.09,20,12,12,0,0,0,23.86-2.64Z"/>'),$J=Zl("lightbulb","0 0 256 256",'<path d="M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-32.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"/>'),MJ=Zl("lightbulb","0 0 256 256",'<path d="M208,104a79.86,79.86,0,0,1-30.59,62.92A24.29,24.29,0,0,0,168,186v6a8,8,0,0,1-8,8H96a8,8,0,0,1-8-8v-6a24.11,24.11,0,0,0-9.3-19A79.87,79.87,0,0,1,48,104.45C47.76,61.09,82.72,25,126.07,24A80,80,0,0,1,208,104Z" opacity="0.2"/><path d="M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-16,0a72,72,0,0,0-73.74-72c-39,.92-70.47,33.39-70.26,72.39a71.65,71.65,0,0,0,27.64,56.3A32,32,0,0,1,96,186v6h64v-6a32.15,32.15,0,0,1,12.47-25.35A71.65,71.65,0,0,0,200,104Zm-16.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"/>'),LJ="lightbulb",EJ=Object.freeze(Object.defineProperty({__proto__:null,bold:AJ,default:Om,duotone:MJ,fill:$J,glyphName:LJ,light:kJ,regular:Om,thin:CJ},Symbol.toStringTag,{value:"Module"})),Fl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},xJ=Fl("lightning","0 0 256 256",'<path d="M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"/>'),TJ=Fl("lightning","0 0 256 256",'<path d="M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"/>'),Im=Fl("lightning","0 0 256 256",'<path d="M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"/>'),HJ=Fl("lightning","0 0 256 256",'<path d="M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"/>'),NJ=Fl("lightning","0 0 256 256",'<path d="M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"/>'),PJ=Fl("lightning","0 0 256 256",'<path d="M96,240l16-80L48,136,160,16,144,96l64,24Z" opacity="0.2"/><path d="M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"/>'),OJ="lightning",IJ=Object.freeze(Object.defineProperty({__proto__:null,bold:HJ,default:Im,duotone:PJ,fill:NJ,glyphName:OJ,light:TJ,regular:Im,thin:xJ},Symbol.toStringTag,{value:"Module"})),zl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},RJ=zl("lock","0 0 256 256",'<path d="M208,84H172V56a44,44,0,0,0-88,0V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84ZM92,56a36,36,0,0,1,72,0V84H92ZM212,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-76-56a8,8,0,1,1-8-8A8,8,0,0,1,136,152Z"/>'),DJ=zl("lock","0 0 256 256",'<path d="M208,82H174V56a46,46,0,0,0-92,0V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82ZM94,56a34,34,0,0,1,68,0V82H94ZM210,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Zm-72-56a10,10,0,1,1-10-10A10,10,0,0,1,138,152Z"/>'),Rm=zl("lock","0 0 256 256",'<path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"/>'),VJ=zl("lock","0 0 256 256",'<path d="M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Zm-60-52a16,16,0,1,1-16-16A16,16,0,0,1,144,152Z"/>'),BJ=zl("lock","0 0 256 256",'<path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm-80,84a12,12,0,1,1,12-12A12,12,0,0,1,128,164Zm32-84H96V56a32,32,0,0,1,64,0Z"/>'),ZJ=zl("lock","0 0 256 256",'<path d="M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z" opacity="0.2"/><path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"/>'),FJ="lock",zJ=Object.freeze(Object.defineProperty({__proto__:null,bold:VJ,default:Rm,duotone:ZJ,fill:BJ,glyphName:FJ,light:DJ,regular:Rm,thin:RJ},Symbol.toStringTag,{value:"Module"})),Ul=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},UJ=Ul("plugs","0 0 256 256",'<path d="M146.83,141.17a4,4,0,0,0-5.66,0L120,162.34,93.66,136l21.17-21.17a4,4,0,0,0-5.66-5.66L88,130.34,66.83,109.17a4,4,0,0,0-5.66,5.66L70.34,124,44.2,150.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L58.06,203.6l8.2,8.2a28,28,0,0,0,39.6,0L132,185.66l9.17,9.17a4,4,0,0,0,5.66-5.66L125.66,168l21.17-21.17A4,4,0,0,0,146.83,141.17Zm-46.63,65a20,20,0,0,1-28.28,0L49.86,184.08a20,20,0,0,1,0-28.28L76,129.66,126.34,180Zm134.63-185a4,4,0,0,0-5.66,0L197.94,52.4l-8.2-8.2a28,28,0,0,0-39.6,0L124,70.34l-9.17-9.17a4,4,0,0,0-5.66,5.66l80,80a4,4,0,0,0,5.66-5.66L185.66,132l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,31.23-31.23A4,4,0,0,0,234.83,21.17ZM212,86.06a19.86,19.86,0,0,1-5.86,14.14L180,126.34,129.66,76,155.8,49.86a20,20,0,0,1,28.28,0l22.06,22.06A19.85,19.85,0,0,1,212,86.06Z"/>'),WJ=Ul("plugs","0 0 256 256",'<path d="M148.24,139.76a6,6,0,0,0-8.48,0L120,159.51,96.49,136l19.75-19.76a6,6,0,0,0-8.48-8.48L88,127.51,68.24,107.76a6,6,0,0,0-8.48,8.48L67.51,124,42.79,148.73a30,30,0,0,0,0,42.42l6.78,6.79L19.76,227.76a6,6,0,1,0,8.48,8.48l29.82-29.81,6.79,6.78a30,30,0,0,0,42.42,0L132,188.49l7.76,7.75a6,6,0,0,0,8.48-8.48L128.49,168l19.75-19.76A6,6,0,0,0,148.24,139.76Zm-49.45,65a18,18,0,0,1-25.46,0L51.27,182.67a18,18,0,0,1,0-25.46L76,132.49,123.51,180Zm137.45-185a6,6,0,0,0-8.48,0L197.94,49.57l-6.79-6.78a30,30,0,0,0-42.42,0L124,67.51l-7.76-7.75a6,6,0,0,0-8.48,8.48l80,80a6,6,0,0,0,8.48-8.48L188.49,132l24.72-24.73a30,30,0,0,0,0-42.42l-6.78-6.79,29.81-29.82A6,6,0,0,0,236.24,19.76Zm-31.51,79L180,123.51,132.49,76l24.72-24.73a18,18,0,0,1,25.46,0l22.06,22.06a18,18,0,0,1,0,25.46Z"/>'),Dm=Ul("plugs","0 0 256 256",'<path d="M149.66,138.34a8,8,0,0,0-11.32,0L120,156.69,99.31,136l18.35-18.34a8,8,0,0,0-11.32-11.32L88,124.69,69.66,106.34a8,8,0,0,0-11.32,11.32L64.69,124,41.37,147.31a32,32,0,0,0,0,45.26l5.38,5.37-28.41,28.4a8,8,0,0,0,11.32,11.32l28.4-28.41,5.37,5.38a32,32,0,0,0,45.26,0L132,191.31l6.34,6.35a8,8,0,0,0,11.32-11.32L131.31,168l18.35-18.34A8,8,0,0,0,149.66,138.34Zm-52.29,65a16,16,0,0,1-22.62,0L52.69,181.25a16,16,0,0,1,0-22.62L76,135.31,120.69,180Zm140.29-185a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Zm-34.35,79L180,120.69,135.31,76l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,203.31,97.37Z"/>'),jJ=Ul("plugs","0 0 256 256",'<path d="M137,168l11.52-11.51a12,12,0,0,0-17-17L120,151l-15-15,11.52-11.51a12,12,0,0,0-17-17L88,119,72.49,103.51a12,12,0,0,0-17,17L59,124,38.54,144.49a36,36,0,0,0,0,50.91l2.55,2.54L15.51,223.51a12,12,0,0,0,17,17l25.57-25.58,2.54,2.55a36.06,36.06,0,0,0,50.91,0L132,197l3.51,3.52a12,12,0,0,0,17-17ZM94.54,200.49a12,12,0,0,1-17,0L55.51,178.43a12,12,0,0,1,0-17L76,141l39,39Zm146-185a12,12,0,0,0-17,0L197.94,41.09l-2.54-2.55a36.05,36.05,0,0,0-50.91,0L124,59l-3.51-3.52a12,12,0,0,0-17,17l80,80a12,12,0,0,0,17-17L197,132l20.49-20.49a36,36,0,0,0,0-50.91l-2.55-2.54,25.58-25.57A12,12,0,0,0,240.49,15.51Zm-40,79L180,115,141,76l20.49-20.49a12,12,0,0,1,17,0l22.06,22.06a12,12,0,0,1,0,17Z"/>'),KJ=Ul("plugs","0 0 256 256",'<path d="M149.66,149.66,131.31,168l18.35,18.34a8,8,0,0,1-11.32,11.32L132,191.31l-23.31,23.32a32.06,32.06,0,0,1-45.26,0l-5.37-5.38-28.4,28.41a8,8,0,0,1-11.32-11.32l28.41-28.4-5.38-5.37a32,32,0,0,1,0-45.26L64.69,124l-6.35-6.34a8,8,0,0,1,11.32-11.32L88,124.69l18.34-18.35a8,8,0,0,1,11.32,11.32L99.31,136,120,156.69l18.34-18.35a8,8,0,0,1,11.32,11.32Zm88-131.32a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Z"/>'),qJ=Ul("plugs","0 0 256 256",'<path d="M76,124l56,56-29,29a24,24,0,0,1-33.94,0L47,186.91A24,24,0,0,1,47,153ZM209,69.09,186.91,47A24,24,0,0,0,153,47L124,76l56,56,29-29A24,24,0,0,0,209,69.09Z" opacity="0.2"/><path d="M149.66,138.34a8,8,0,0,0-11.32,0L120,156.69,99.31,136l18.35-18.34a8,8,0,0,0-11.32-11.32L88,124.69,69.66,106.34a8,8,0,0,0-11.32,11.32L64.69,124,41.37,147.31a32,32,0,0,0,0,45.26l5.38,5.37-28.41,28.4a8,8,0,0,0,11.32,11.32l28.4-28.41,5.37,5.38a32,32,0,0,0,45.26,0L132,191.31l6.34,6.35a8,8,0,0,0,11.32-11.32L131.31,168l18.35-18.34A8,8,0,0,0,149.66,138.34Zm-52.29,65a16,16,0,0,1-22.62,0L52.69,181.25a16,16,0,0,1,0-22.62L76,135.31,120.69,180Zm140.29-185a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Zm-34.35,79L180,120.69,135.31,76l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,203.31,97.37Z"/>'),GJ="plugs",YJ=Object.freeze(Object.defineProperty({__proto__:null,bold:jJ,default:Dm,duotone:qJ,fill:KJ,glyphName:GJ,light:WJ,regular:Dm,thin:UJ},Symbol.toStringTag,{value:"Module"})),Wl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},XJ=Wl("pulse","0 0 256 256",'<path d="M236,128a4,4,0,0,1-4,4H202.47l-38.89,77.79A4,4,0,0,1,160,212h-.2a4,4,0,0,1-3.54-2.58l-60.59-159-36,79.28A4,4,0,0,1,56,132H24a4,4,0,0,1,0-8H53.42L92.36,38.35a4,4,0,0,1,7.38.23L160.5,198.06l35.92-71.85A4,4,0,0,1,200,124h32A4,4,0,0,1,236,128Z"/>'),JJ=Wl("pulse","0 0 256 256",'<path d="M238,128a6,6,0,0,1-6,6H203.71l-38.34,76.68A6,6,0,0,1,160,214h-.3a6,6,0,0,1-5.31-3.85L95.51,55.57,61.46,130.48A6,6,0,0,1,56,134H24a6,6,0,0,1,0-12H52.14l38.4-84.48a6,6,0,0,1,11.07.34L160.74,193.1l33.89-67.78A6,6,0,0,1,200,122h32A6,6,0,0,1,238,128Z"/>'),Vm=Wl("pulse","0 0 256 256",'<path d="M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"/>'),QJ=Wl("pulse","0 0 256 256",'<path d="M244,128a12,12,0,0,1-12,12H207.42l-36.69,73.37A12,12,0,0,1,160,220h-.6a12,12,0,0,1-10.61-7.72L95,71.15,66.92,133A12,12,0,0,1,56,140H24a12,12,0,0,1,0-24H48.27L85.08,35a12,12,0,0,1,22.13.7l54.28,142.46,27.78-55.56A12,12,0,0,1,200,116h32A12,12,0,0,1,244,128Z"/>'),eQ=Wl("pulse","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-8,96H188.64L159,188a8,8,0,0,1-6.95,4h-.46a8,8,0,0,1-6.89-4.84L103,89.92,79,132a8,8,0,0,1-7,4H48a8,8,0,0,1,0-16H67.36L97.05,68a8,8,0,0,1,14.3.82L153,166.08l24-42.05a8,8,0,0,1,6.95-4h24a8,8,0,0,1,0,16Z"/>'),tQ=Wl("pulse","0 0 256 256",'<path d="M96,40l33.52,88H56Zm104,88H129.52L160,208Z" opacity="0.2"/><path d="M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"/>'),iQ="pulse",nQ=Object.freeze(Object.defineProperty({__proto__:null,bold:QJ,default:Vm,duotone:tQ,fill:eQ,glyphName:iQ,light:JJ,regular:Vm,thin:XJ},Symbol.toStringTag,{value:"Module"})),jl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},rQ=jl("rows","0 0 256 256",'<path d="M208,140H48a12,12,0,0,0-12,12v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V152A12,12,0,0,0,208,140Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4ZM208,52H48A12,12,0,0,0,36,64v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V64A12,12,0,0,0,208,52Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"/>'),aQ=jl("rows","0 0 256 256",'<path d="M208,138H48a14,14,0,0,0-14,14v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V152A14,14,0,0,0,208,138Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2ZM208,50H48A14,14,0,0,0,34,64v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V64A14,14,0,0,0,208,50Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"/>'),Bm=jl("rows","0 0 256 256",'<path d="M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z"/>'),sQ=jl("rows","0 0 256 256",'<path d="M208,136H48a20,20,0,0,0-20,20v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V156A20,20,0,0,0,208,136Zm-4,52H52V160H204Zm4-144H48A20,20,0,0,0,28,64v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm-4,52H52V68H204Z"/>'),lQ=jl("rows","0 0 256 256",'<path d="M224,152v40a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V152a16,16,0,0,1,16-16H208A16,16,0,0,1,224,152ZM208,48H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Z"/>'),oQ=jl("rows","0 0 256 256",'<path d="M216,152v40a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8H208A8,8,0,0,1,216,152Zm-8-96H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V64A8,8,0,0,0,208,56Z" opacity="0.2"/><path d="M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z"/>'),uQ="rows",cQ=Object.freeze(Object.defineProperty({__proto__:null,bold:sQ,default:Bm,duotone:oQ,fill:lQ,glyphName:uQ,light:aQ,regular:Bm,thin:rQ},Symbol.toStringTag,{value:"Module"})),Kl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},dQ=Kl("shield","0 0 256 256",'<path d="M208,44H48A12,12,0,0,0,36,56v56c0,51.16,24.73,82.12,45.47,99.1,22.4,18.32,44.55,24.5,45.48,24.76a4,4,0,0,0,2.1,0c.93-.26,23.08-6.44,45.48-24.76,20.74-17,45.47-47.94,45.47-99.1V56A12,12,0,0,0,208,44Zm4,68c0,38.44-14.23,69.63-42.29,92.71A132.45,132.45,0,0,1,128,227.82a132.23,132.23,0,0,1-41.71-23.11C58.23,181.63,44,150.44,44,112V56a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"/>'),hQ=Kl("shield","0 0 256 256",'<path d="M208,42H48A14,14,0,0,0,34,56v56c0,51.94,25.12,83.4,46.2,100.64,22.73,18.6,45.27,24.89,46.22,25.15a6,6,0,0,0,3.16,0c.95-.26,23.49-6.55,46.22-25.15C196.88,195.4,222,163.94,222,112V56A14,14,0,0,0,208,42Zm2,70c0,37.76-13.94,68.39-41.44,91.06A131.17,131.17,0,0,1,128,225.72a130.94,130.94,0,0,1-40.56-22.66C59.94,180.39,46,149.76,46,112V56a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"/>'),Zm=Kl("shield","0 0 256 256",'<path d="M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0Z"/>'),fQ=Kl("shield","0 0 256 256",'<path d="M208,36H48A20,20,0,0,0,28,56v56c0,54.29,26.32,87.22,48.4,105.29,23.71,19.39,47.44,26,48.44,26.29a12.1,12.1,0,0,0,6.32,0c1-.28,24.73-6.9,48.44-26.29,22.08-18.07,48.4-51,48.4-105.29V56A20,20,0,0,0,208,36Zm-4,76c0,35.71-13.09,64.69-38.91,86.15A126.28,126.28,0,0,1,128,219.38a126.14,126.14,0,0,1-37.09-21.23C65.09,176.69,52,147.71,52,112V60H204Z"/>'),pQ=Kl("shield","0 0 256 256",'<path d="M224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Z"/>'),_Q=Kl("shield","0 0 256 256",'<path d="M216,56v56c0,96-88,120-88,120S40,208,40,112V56a8,8,0,0,1,8-8H208A8,8,0,0,1,216,56Z" opacity="0.2"/><path d="M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0Z"/>'),mQ="shield",vQ=Object.freeze(Object.defineProperty({__proto__:null,bold:fQ,default:Zm,duotone:_Q,fill:pQ,glyphName:mQ,light:hQ,regular:Zm,thin:dQ},Symbol.toStringTag,{value:"Module"})),ql=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},gQ=ql("snowflake","0 0 256 256",'<path d="M219.88,151.05a4,4,0,0,1-2.93,4.83l-28.6,7L195.86,191a4,4,0,0,1-2.83,4.9,3.65,3.65,0,0,1-1,.14,4,4,0,0,1-3.86-3L180,162.64l-48-27.71v55.41l22.83,22.83a4,4,0,0,1-5.66,5.66L128,197.66l-21.17,21.17a4,4,0,0,1-5.66-5.66L124,190.34V134.93L76,162.64,67.86,193A4,4,0,0,1,64,196a3.65,3.65,0,0,1-1-.14,4,4,0,0,1-2.83-4.9l7.51-28.05-28.6-7A4,4,0,1,1,41,148.12l31,7.61L120,128,72,100.27l-31,7.61a4.07,4.07,0,0,1-1,.12,4,4,0,0,1-1-7.88l28.6-7L60.14,65A4,4,0,0,1,67.86,63L76,93.36l48,27.71V65.66L101.17,42.83a4,4,0,0,1,5.66-5.66L128,58.34l21.17-21.17a4,4,0,1,1,5.66,5.66L132,65.66v55.41l48-27.71L188.14,63A4,4,0,0,1,195.86,65l-7.51,28.05,28.6,7A4,4,0,0,1,216,108a4.07,4.07,0,0,1-1-.12l-31-7.61L136,128l48,27.73,31-7.61A4,4,0,0,1,219.88,151.05Z"/>'),bQ=ql("snowflake","0 0 256 256",'<path d="M221.83,150.57a6,6,0,0,1-4.4,7.26l-26.62,6.54,7,26.08a6,6,0,0,1-4.24,7.35,6.4,6.4,0,0,1-1.55.2,6,6,0,0,1-5.8-4.45L178.27,164,134,138.39v51.13l22.24,22.24a6,6,0,1,1-8.48,8.48L128,200.49l-19.76,19.75a6,6,0,0,1-8.48-8.48L122,189.52V138.39L77.73,164l-7.93,29.6A6,6,0,0,1,64,198a6.4,6.4,0,0,1-1.55-.2,6,6,0,0,1-4.24-7.35l7-26.08-26.62-6.54a6,6,0,0,1,2.86-11.66l30.23,7.43L116,128,71.66,102.4l-30.23,7.43A5.88,5.88,0,0,1,40,110a6,6,0,0,1-1.43-11.83l26.62-6.54-7-26.08a6,6,0,1,1,11.59-3.1l7.93,29.6L122,117.61V66.48L99.76,44.24a6,6,0,0,1,8.48-8.48L128,55.51l19.76-19.75a6,6,0,0,1,8.48,8.48L134,66.48v51.13l44.27-25.56,7.93-29.6a6,6,0,1,1,11.59,3.1l-7,26.08,26.62,6.54A6,6,0,0,1,216,110a5.88,5.88,0,0,1-1.43-.17l-30.23-7.43L140,128l44.34,25.6,30.23-7.43A6,6,0,0,1,221.83,150.57Z"/>'),Fm=ql("snowflake","0 0 256 256",'<path d="M223.77,150.09a8,8,0,0,1-5.86,9.68l-24.64,6,6.46,24.11a8,8,0,0,1-5.66,9.8A8.25,8.25,0,0,1,192,200a8,8,0,0,1-7.72-5.93l-7.72-28.8L136,141.86v46.83l21.66,21.65a8,8,0,0,1-11.32,11.32L128,203.31l-18.34,18.35a8,8,0,0,1-11.32-11.32L120,188.69V141.86L79.45,165.27l-7.72,28.8A8,8,0,0,1,64,200a8.25,8.25,0,0,1-2.08-.27,8,8,0,0,1-5.66-9.8l6.46-24.11-24.64-6a8,8,0,0,1,3.82-15.54l29.45,7.23L112,128,71.36,104.54l-29.45,7.23A7.85,7.85,0,0,1,40,112a8,8,0,0,1-1.91-15.77l24.64-6L56.27,66.07a8,8,0,0,1,15.46-4.14l7.72,28.8L120,114.14V67.31L98.34,45.66a8,8,0,0,1,11.32-11.32L128,52.69l18.34-18.35a8,8,0,0,1,11.32,11.32L136,67.31v46.83l40.55-23.41,7.72-28.8a8,8,0,0,1,15.46,4.14l-6.46,24.11,24.64,6A8,8,0,0,1,216,112a7.85,7.85,0,0,1-1.91-.23l-29.45-7.23L144,128l40.64,23.46,29.45-7.23A8,8,0,0,1,223.77,150.09Z"/>'),yQ=ql("snowflake","0 0 256 256",'<path d="M227.65,149.14a12,12,0,0,1-8.79,14.51l-20.67,5.08,5.4,20.16a12,12,0,0,1-23.18,6.22l-7.29-27.2L140,148.78V187l20.48,20.48a12,12,0,0,1-17,17L128,209l-15.51,15.52a12,12,0,0,1-17-17L116,187V148.78L82.88,167.91l-7.29,27.2a12,12,0,0,1-23.18-6.22l5.4-20.16-20.67-5.08a12,12,0,1,1,5.72-23.3l27.89,6.85L104,128,70.75,108.8l-27.89,6.85A11.8,11.8,0,0,1,40,116a12,12,0,0,1-2.85-23.65l20.67-5.08-5.4-20.16a12,12,0,0,1,23.18-6.22l7.29,27.2L116,107.21V69L95.52,48.48a12,12,0,0,1,17-17L128,47l15.51-15.52a12,12,0,1,1,17,17L140,69v38.24l33.12-19.12,7.29-27.2a12,12,0,0,1,23.18,6.22l-5.4,20.16,20.67,5.08A12,12,0,0,1,216,116a11.8,11.8,0,0,1-2.87-.35l-27.89-6.85L152,128l33.25,19.2,27.89-6.85A12,12,0,0,1,227.65,149.14Z"/>'),wQ=ql("snowflake","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm42.37,119.22,18.94-6.76a8,8,0,1,1,5.38,15.08l-15.48,5.52,4.52,16.87a8,8,0,0,1-5.66,9.8A8.23,8.23,0,0,1,176,184a8,8,0,0,1-7.73-5.93l-5.57-20.8L136,141.86v30.83l13.66,13.65a8,8,0,0,1-11.32,11.32L128,187.31l-10.34,10.35a8,8,0,0,1-11.32-11.32L120,172.69V141.86L93.3,157.27l-5.57,20.8A8,8,0,0,1,80,184a8.23,8.23,0,0,1-2.07-.27,8,8,0,0,1-5.66-9.8l4.52-16.87-15.48-5.52a8,8,0,0,1,5.38-15.08l18.94,6.76L112,128,85.63,112.78l-18.94,6.76A8.18,8.18,0,0,1,64,120a8,8,0,0,1-2.69-15.54l15.48-5.52L72.27,82.07a8,8,0,0,1,15.46-4.14l5.57,20.8L120,114.14V83.31L106.34,69.66a8,8,0,0,1,11.32-11.32L128,68.69l10.34-10.35a8,8,0,0,1,11.32,11.32L136,83.31v30.83l26.7-15.41,5.57-20.8a8,8,0,0,1,15.46,4.14l-4.52,16.87,15.48,5.52A8,8,0,0,1,192,120a8.18,8.18,0,0,1-2.69-.46l-18.94-6.76L144,128Z"/>'),SQ=ql("snowflake","0 0 256 256",'<path d="M220,128a92,92,0,1,1-92-92A92.1,92.1,0,0,1,220,128Z" opacity="0.2"/><path d="M223.77,150.09a8,8,0,0,1-5.86,9.68l-24.64,6,6.46,24.11a8,8,0,0,1-5.66,9.8A8.25,8.25,0,0,1,192,200a8,8,0,0,1-7.72-5.93l-7.72-28.8L136,141.86v46.83l21.66,21.65a8,8,0,0,1-11.32,11.32L128,203.31l-18.34,18.35a8,8,0,0,1-11.32-11.32L120,188.69V141.86L79.45,165.27l-7.72,28.8A8,8,0,0,1,64,200a8.25,8.25,0,0,1-2.08-.27,8,8,0,0,1-5.66-9.8l6.46-24.11-24.64-6a8,8,0,0,1,3.82-15.54l29.45,7.23L112,128,71.36,104.54l-29.45,7.23A7.85,7.85,0,0,1,40,112a8,8,0,0,1-1.91-15.77l24.64-6L56.27,66.07a8,8,0,0,1,15.46-4.14l7.72,28.8L120,114.14V67.31L98.34,45.66a8,8,0,0,1,11.32-11.32L128,52.69l18.34-18.35a8,8,0,0,1,11.32,11.32L136,67.31v46.83l40.55-23.41,7.72-28.8a8,8,0,0,1,15.46,4.14l-6.46,24.11,24.64,6A8,8,0,0,1,216,112a7.85,7.85,0,0,1-1.91-.23l-29.45-7.23L144,128l40.64,23.46,29.45-7.23A8,8,0,0,1,223.77,150.09Z"/>'),CQ="snowflake",kQ=Object.freeze(Object.defineProperty({__proto__:null,bold:yQ,default:Fm,duotone:SQ,fill:wQ,glyphName:CQ,light:bQ,regular:Fm,thin:gQ},Symbol.toStringTag,{value:"Module"})),Gl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},AQ=Gl("speaker-hifi","0 0 256 256",'<path d="M192,28H64A12,12,0,0,0,52,40V216a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V40A12,12,0,0,0,192,28Zm4,188a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4ZM120,76a8,8,0,1,1,8,8A8,8,0,0,1,120,76Zm8,40a36,36,0,1,0,36,36A36,36,0,0,0,128,116Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,128,180Z"/>'),$Q=Gl("speaker-hifi","0 0 256 256",'<path d="M192,26H64A14,14,0,0,0,50,40V216a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V40A14,14,0,0,0,192,26Zm2,190a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2ZM118,76a10,10,0,1,1,10,10A10,10,0,0,1,118,76Zm10,38a38,38,0,1,0,38,38A38,38,0,0,0,128,114Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,128,178Z"/>'),zm=Gl("speaker-hifi","0 0 256 256",'<path d="M192,24H64A16,16,0,0,0,48,40V216a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V40A16,16,0,0,0,192,24Zm0,192H64V40H192ZM116,76a12,12,0,1,1,12,12A12,12,0,0,1,116,76Zm12,116a40,40,0,1,0-40-40A40,40,0,0,0,128,192Zm0-64a24,24,0,1,1-24,24A24,24,0,0,1,128,128Z"/>'),MQ=Gl("speaker-hifi","0 0 256 256",'<path d="M192,20H64A20,20,0,0,0,44,40V216a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V40A20,20,0,0,0,192,20Zm-4,192H68V44H188ZM112,76a16,16,0,1,1,16,16A16,16,0,0,1,112,76Zm16,120a44,44,0,1,0-44-44A44.05,44.05,0,0,0,128,196Zm0-64a20,20,0,1,1-20,20A20,20,0,0,1,128,132Z"/>'),LQ=Gl("speaker-hifi","0 0 256 256",'<path d="M152,160a24,24,0,1,1-24-24A24,24,0,0,1,152,160ZM208,40V216a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V40A16,16,0,0,1,64,24H192A16,16,0,0,1,208,40ZM116,68a12,12,0,1,0,12-12A12,12,0,0,0,116,68Zm52,92a40,40,0,1,0-40,40A40,40,0,0,0,168,160Z"/>'),EQ=Gl("speaker-hifi","0 0 256 256",'<path d="M192,32H64a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H192a8,8,0,0,0,8-8V40A8,8,0,0,0,192,32ZM128,184a32,32,0,1,1,32-32A32,32,0,0,1,128,184Z" opacity="0.2"/><path d="M192,24H64A16,16,0,0,0,48,40V216a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V40A16,16,0,0,0,192,24Zm0,192H64V40H192ZM116,76a12,12,0,1,1,12,12A12,12,0,0,1,116,76Zm12,116a40,40,0,1,0-40-40A40,40,0,0,0,128,192Zm0-64a24,24,0,1,1-24,24A24,24,0,0,1,128,128Z"/>'),xQ="speaker-hifi",TQ=Object.freeze(Object.defineProperty({__proto__:null,bold:MQ,default:zm,duotone:EQ,fill:LQ,glyphName:xQ,light:$Q,regular:zm,thin:AQ},Symbol.toStringTag,{value:"Module"})),Yl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},HQ=Yl("speaker-high","0 0 256 256",'<path d="M153.76,28.41a4,4,0,0,0-4.22.43L78.63,84H32A12,12,0,0,0,20,96v64a12,12,0,0,0,12,12H78.63l70.91,55.16A4.07,4.07,0,0,0,152,228a3.92,3.92,0,0,0,1.76-.41A4,4,0,0,0,156,224V32A4,4,0,0,0,153.76,28.41ZM28,160V96a4,4,0,0,1,4-4H76v72H32A4,4,0,0,1,28,160Zm120,55.82L84,166V90l64-49.78Zm47-111.61a36,36,0,0,1,0,47.59,4,4,0,1,1-6-5.3,28,28,0,0,0,0-37,4,4,0,0,1,6-5.28ZM244,128a75.88,75.88,0,0,1-19.35,50.67,4,4,0,0,1-6-5.34,68,68,0,0,0,0-90.66,4,4,0,0,1,6-5.34A75.88,75.88,0,0,1,244,128Z"/>'),NQ=Yl("speaker-high","0 0 256 256",'<path d="M154.64,26.61a6,6,0,0,0-6.32.65L77.94,82H32A14,14,0,0,0,18,96v64a14,14,0,0,0,14,14H77.94l70.38,54.74A6,6,0,0,0,158,224V32A6,6,0,0,0,154.64,26.61ZM30,160V96a2,2,0,0,1,2-2H74v68H32A2,2,0,0,1,30,160Zm116,51.73L86,165.07V90.93l60-46.66Zm50.53-108.85a38,38,0,0,1,0,50.24,6,6,0,1,1-9-7.94,26,26,0,0,0,0-34.37,6,6,0,0,1,9-7.93ZM246,128a77.86,77.86,0,0,1-19.86,52,6,6,0,1,1-8.94-8,66,66,0,0,0,0-88,6,6,0,1,1,8.94-8A77.86,77.86,0,0,1,246,128Z"/>'),Um=Yl("speaker-high","0 0 256 256",'<path d="M155.51,24.81a8,8,0,0,0-8.42.88L77.25,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H77.25l69.84,54.31A8,8,0,0,0,160,224V32A8,8,0,0,0,155.51,24.81ZM32,96H72v64H32ZM144,207.64,88,164.09V91.91l56-43.55Zm54-106.08a40,40,0,0,1,0,52.88,8,8,0,0,1-12-10.58,24,24,0,0,0,0-31.72,8,8,0,0,1,12-10.58ZM248,128a79.9,79.9,0,0,1-20.37,53.34,8,8,0,0,1-11.92-10.67,64,64,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67A79.83,79.83,0,0,1,248,128Z"/>'),PQ=Yl("speaker-high","0 0 256 256",'<path d="M157.27,21.22a12,12,0,0,0-12.64,1.31L75.88,76H32A20,20,0,0,0,12,96v64a20,20,0,0,0,20,20H75.88l68.75,53.47A12,12,0,0,0,164,224V32A12,12,0,0,0,157.27,21.22ZM36,100H68v56H36Zm104,99.46L92,162.13V93.87l48-37.33ZM212,128a44,44,0,0,1-11,29.11,12,12,0,1,1-18-15.88,20,20,0,0,0,0-26.43,12,12,0,0,1,18-15.86A43.94,43.94,0,0,1,212,128Zm40,0a83.87,83.87,0,0,1-21.39,56,12,12,0,0,1-17.89-16,60,60,0,0,0,0-80,12,12,0,1,1,17.88-16A83.87,83.87,0,0,1,252,128Z"/>'),OQ=Yl("speaker-high","0 0 256 256",'<path d="M160,32.25V223.69a8.29,8.29,0,0,1-3.91,7.18,8,8,0,0,1-9-.56l-65.57-51A4,4,0,0,1,80,176.16V79.84a4,4,0,0,1,1.55-3.15l65.57-51a8,8,0,0,1,10,.16A8.27,8.27,0,0,1,160,32.25ZM60,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H60a4,4,0,0,0,4-4V84A4,4,0,0,0,60,80Zm126.77,20.84a8,8,0,0,0-.72,11.3,24,24,0,0,1,0,31.72,8,8,0,1,0,12,10.58,40,40,0,0,0,0-52.88A8,8,0,0,0,186.74,100.84Zm40.89-26.17a8,8,0,1,0-11.92,10.66,64,64,0,0,1,0,85.34,8,8,0,1,0,11.92,10.66,80,80,0,0,0,0-106.66Z"/>'),IQ=Yl("speaker-high","0 0 256 256",'<path d="M80,88v80H32a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8Z" opacity="0.2"/><path d="M155.51,24.81a8,8,0,0,0-8.42.88L77.25,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H77.25l69.84,54.31A8,8,0,0,0,160,224V32A8,8,0,0,0,155.51,24.81ZM32,96H72v64H32ZM144,207.64,88,164.09V91.91l56-43.55Zm54-106.08a40,40,0,0,1,0,52.88,8,8,0,0,1-12-10.58,24,24,0,0,0,0-31.72,8,8,0,0,1,12-10.58ZM248,128a79.9,79.9,0,0,1-20.37,53.34,8,8,0,0,1-11.92-10.67,64,64,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67A79.83,79.83,0,0,1,248,128Z"/>'),RQ="speaker-high",DQ=Object.freeze(Object.defineProperty({__proto__:null,bold:PQ,default:Um,duotone:IQ,fill:OQ,glyphName:RQ,light:NQ,regular:Um,thin:HQ},Symbol.toStringTag,{value:"Module"})),Xl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},VQ=Xl("television","0 0 256 256",'<path d="M216,68H137.66l41.17-41.17a4,4,0,1,0-5.66-5.66L128,66.34,82.83,21.17a4,4,0,0,0-5.66,5.66L118.34,68H40A12,12,0,0,0,28,80V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V80A12,12,0,0,0,216,68ZM36,200V80a4,4,0,0,1,4-4H148V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H156V76h60a4,4,0,0,1,4,4Zm-24-84a8,8,0,1,1-8-8A8,8,0,0,1,196,116Zm0,48a8,8,0,1,1-8-8A8,8,0,0,1,196,164Z"/>'),BQ=Xl("television","0 0 256 256",'<path d="M216,66H142.48l37.76-37.76a6,6,0,0,0-8.48-8.48L128,63.51,84.24,19.76a6,6,0,1,0-8.48,8.48L113.52,66H40A14,14,0,0,0,26,80V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V80A14,14,0,0,0,216,66ZM38,200V80a2,2,0,0,1,2-2H146V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H158V78h58a2,2,0,0,1,2,2Zm-20-84a10,10,0,1,1-10-10A10,10,0,0,1,198,116Zm0,48a10,10,0,1,1-10-10A10,10,0,0,1,198,164Z"/>'),Wm=Xl("television","0 0 256 256",'<path d="M216,64H147.31l34.35-34.34a8,8,0,1,0-11.32-11.32L128,60.69,85.66,18.34A8,8,0,0,0,74.34,29.66L108.69,64H40A16,16,0,0,0,24,80V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64ZM40,80H144V200H40ZM216,200H160V80h56V200Zm-16-84a12,12,0,1,1-12-12A12,12,0,0,1,200,116Zm0,48a12,12,0,1,1-12-12A12,12,0,0,1,200,164Z"/>'),ZQ=Xl("television","0 0 256 256",'<path d="M216,60H157l27.52-27.52a12,12,0,0,0-17-17L128,55,88.49,15.51a12,12,0,0,0-17,17L99,60H40A20,20,0,0,0,20,80V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V80A20,20,0,0,0,216,60ZM44,84h84V196H44ZM212,196H152V84h60Zm-44-80a16,16,0,1,1,16,16A16,16,0,0,1,168,116Zm32,48a16,16,0,1,1-16-16A16,16,0,0,1,200,164Z"/>'),FQ=Xl("television","0 0 256 256",'<path d="M216,64H147.31l34.35-34.34a8,8,0,1,0-11.32-11.32L128,60.69,85.66,18.34A8,8,0,0,0,74.34,29.66L108.69,64H40A16,16,0,0,0,24,80V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64Zm0,136H160V80h56V200Zm-16-84a12,12,0,1,1-12-12A12,12,0,0,1,200,116Zm0,48a12,12,0,1,1-12-12A12,12,0,0,1,200,164Z"/>'),zQ=Xl("television","0 0 256 256",'<path d="M152,72V208H40a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8Z" opacity="0.2"/><path d="M216,64H147.31l34.35-34.34a8,8,0,1,0-11.32-11.32L128,60.69,85.66,18.34A8,8,0,0,0,74.34,29.66L108.69,64H40A16,16,0,0,0,24,80V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64ZM40,80H144V200H40ZM216,200H160V80h56V200Zm-16-84a12,12,0,1,1-12-12A12,12,0,0,1,200,116Zm0,48a12,12,0,1,1-12-12A12,12,0,0,1,200,164Z"/>'),UQ="television",WQ=Object.freeze(Object.defineProperty({__proto__:null,bold:ZQ,default:Wm,duotone:zQ,fill:FQ,glyphName:UQ,light:BQ,regular:Wm,thin:VQ},Symbol.toStringTag,{value:"Module"})),Jl=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},jQ=Jl("terminal","0 0 256 256",'<path d="M116,128a4,4,0,0,1-1.34,3l-72,64a4,4,0,1,1-5.32-6L106,128,37.34,67a4,4,0,0,1,5.32-6l72,64A4,4,0,0,1,116,128Zm100,60H120a4,4,0,0,0,0,8h96a4,4,0,0,0,0-8Z"/>'),KQ=Jl("terminal","0 0 256 256",'<path d="M116,132.48l-72,64a6,6,0,0,1-8-9L103,128,36,68.49a6,6,0,0,1,8-9l72,64a6,6,0,0,1,0,9ZM216,186H120a6,6,0,0,0,0,12h96a6,6,0,0,0,0-12Z"/>'),jm=Jl("terminal","0 0 256 256",'<path d="M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z"/>'),qQ=Jl("terminal","0 0 256 256",'<path d="M120,137,48,201A12,12,0,1,1,32,183l61.91-55L32,73A12,12,0,1,1,48,55l72,64A12,12,0,0,1,120,137Zm96,43H120a12,12,0,0,0,0,24h96a12,12,0,0,0,0-24Z"/>'),GQ=Jl("terminal","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM77.66,173.66a8,8,0,0,1-11.32-11.32L100.69,128,66.34,93.66A8,8,0,0,1,77.66,82.34l40,40a8,8,0,0,1,0,11.32ZM192,176H128a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"/>'),YQ=Jl("terminal","0 0 256 256",'<path d="M216,80V192H40V64H200A16,16,0,0,1,216,80Z" opacity="0.2"/><path d="M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z"/>'),XQ="terminal",JQ=Object.freeze(Object.defineProperty({__proto__:null,bold:qQ,default:jm,duotone:YQ,fill:GQ,glyphName:XQ,light:KQ,regular:jm,thin:jQ},Symbol.toStringTag,{value:"Module"})),Ql=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},QQ=Ql("thermometer","0 0 256 256",'<path d="M212,60a24,24,0,1,0,24,24A24,24,0,0,0,212,60Zm0,40a16,16,0,1,1,16-16A16,16,0,0,1,212,100Zm-88,56.29V88a4,4,0,0,0-8,0v68.29a28,28,0,1,0,8,0ZM120,204a20,20,0,1,1,20-20A20,20,0,0,1,120,204Zm36-68V48a36,36,0,0,0-72,0v88a60,60,0,1,0,72,0ZM120,236a52,52,0,0,1-29.71-94.68A4,4,0,0,0,92,138V48a28,28,0,0,1,56,0v90a4,4,0,0,0,1.71,3.28A52,52,0,0,1,120,236Z"/>'),eee=Ql("thermometer","0 0 256 256",'<path d="M212,58a26,26,0,1,0,26,26A26,26,0,0,0,212,58Zm0,40a14,14,0,1,1,14-14A14,14,0,0,1,212,98Zm-86,56.6V88a6,6,0,0,0-12,0v66.6a30,30,0,1,0,12,0ZM120,202a18,18,0,1,1,18-18A18,18,0,0,1,120,202Zm38-67V48a38,38,0,0,0-76,0v87a62,62,0,1,0,76,0Zm-38,99a50,50,0,0,1-28.57-91A6,6,0,0,0,94,138V48a26,26,0,0,1,52,0v90a6,6,0,0,0,2.57,4.92A50,50,0,0,1,120,234Z"/>'),Km=Ql("thermometer","0 0 256 256",'<path d="M212,56a28,28,0,1,0,28,28A28,28,0,0,0,212,56Zm0,40a12,12,0,1,1,12-12A12,12,0,0,1,212,96Zm-84,57V88a8,8,0,0,0-16,0v65a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,120,200Zm40-66V48a40,40,0,0,0-80,0v86a64,64,0,1,0,80,0Zm-40,98a48,48,0,0,1-27.42-87.4A8,8,0,0,0,96,138V48a24,24,0,0,1,48,0v90a8,8,0,0,0,3.42,6.56A48,48,0,0,1,120,232Z"/>'),tee=Ql("thermometer","0 0 256 256",'<path d="M212,52a32,32,0,1,0,32,32A32,32,0,0,0,212,52Zm0,40a8,8,0,1,1,8-8A8,8,0,0,1,212,92ZM160,56A52,52,0,0,0,56,56v94.69a64,64,0,1,0,104,0ZM108,228a40,40,0,0,1-30.91-65.39A12,12,0,0,0,80,154.78V56a28,28,0,0,1,56,0v98.77a12,12,0,0,0,2.77,7.68A40,40,0,0,1,108,228Zm24-40a24,24,0,1,1-36-20.78V92a12,12,0,0,1,24,0v75.22A24,24,0,0,1,132,188Z"/>'),iee=Ql("thermometer","0 0 256 256",'<path d="M212,56a28,28,0,1,0,28,28A28,28,0,0,0,212,56Zm0,40a12,12,0,1,1,12-12A12,12,0,0,1,212,96Zm-60,50.08V40a32,32,0,0,0-64,0V146.08a56,56,0,1,0,64,0ZM136,104H104V40a16,16,0,0,1,32,0Z"/>'),nee=Ql("thermometer","0 0 256 256",'<path d="M152,138V48a32,32,0,0,0-64,0v90a56,56,0,1,0,64,0Zm-32,70a24,24,0,1,1,24-24A24,24,0,0,1,120,208Z" opacity="0.2"/><path d="M212,56a28,28,0,1,0,28,28A28,28,0,0,0,212,56Zm0,40a12,12,0,1,1,12-12A12,12,0,0,1,212,96Zm-84,57V88a8,8,0,0,0-16,0v65a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,120,200Zm40-66V48a40,40,0,0,0-80,0v86a64,64,0,1,0,80,0Zm-40,98a48,48,0,0,1-27.42-87.4A8,8,0,0,0,96,138V48a24,24,0,0,1,48,0v90a8,8,0,0,0,3.42,6.56A48,48,0,0,1,120,232Z"/>'),ree="thermometer",aee=Object.freeze(Object.defineProperty({__proto__:null,bold:tee,default:Km,duotone:nee,fill:iee,glyphName:ree,light:eee,regular:Km,thin:QQ},Symbol.toStringTag,{value:"Module"})),eo=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},see=eo("thermometer-hot","0 0 256 256",'<path d="M124,156.29V48a4,4,0,0,0-8,0V156.29a28,28,0,1,0,8,0ZM120,204a20,20,0,1,1,20-20A20,20,0,0,1,120,204Zm36-68V48a36,36,0,0,0-72,0v88a60,60,0,1,0,72,0ZM120,236a52,52,0,0,1-29.71-94.68A4,4,0,0,0,92,138V48a28,28,0,0,1,56,0v90a4,4,0,0,0,1.71,3.28A52,52,0,0,1,120,236ZM180.65,78.59a4,4,0,0,1,1.17-5.54c13.24-8.63,23.07-4.43,31.75-.73,8.15,3.48,14.58,6.22,24.25-.07a4,4,0,1,1,4.36,6.7C236.43,82.7,231.32,84,226.67,84c-6.06,0-11.33-2.25-16.24-4.34-8.15-3.47-14.58-6.22-24.25.07A4,4,0,0,1,180.65,78.59Zm62.7,26.82a4,4,0,0,1-1.17,5.54c-5.75,3.75-10.86,5.07-15.51,5.07-6.06,0-11.33-2.25-16.24-4.34-8.15-3.47-14.58-6.22-24.25.07a4,4,0,1,1-4.36-6.7c13.24-8.63,23.07-4.43,31.75-.73,8.15,3.48,14.58,6.22,24.25-.07A4,4,0,0,1,243.35,105.41Z"/>'),lee=eo("thermometer-hot","0 0 256 256",'<path d="M126,154.6V48a6,6,0,0,0-12,0V154.6a30,30,0,1,0,12,0ZM120,202a18,18,0,1,1,18-18A18,18,0,0,1,120,202Zm38-67V48a38,38,0,0,0-76,0v87a62,62,0,1,0,76,0Zm-38,99a50,50,0,0,1-28.57-91A6,6,0,0,0,94,138V48a26,26,0,0,1,52,0v90a6,6,0,0,0,2.57,4.92A50,50,0,0,1,120,234ZM179,79.68a6,6,0,0,1,1.75-8.3c14.14-9.21,24.95-4.61,33.63-.9,7.9,3.37,13.6,5.8,22.37.09a6,6,0,1,1,6.55,10.05c-6.12,4-11.62,5.39-16.59,5.39-6.51,0-12.11-2.39-17-4.49-7.89-3.37-13.59-5.8-22.37-.09A6,6,0,0,1,179,79.68ZM245,104.32a6,6,0,0,1-1.76,8.3c-6.12,4-11.62,5.39-16.59,5.39-6.51,0-12.11-2.39-17-4.49-7.89-3.37-13.59-5.8-22.37-.09a6,6,0,0,1-6.55-10.05c14.14-9.21,24.95-4.6,33.63-.9,7.9,3.37,13.6,5.8,22.37.09A6,6,0,0,1,245,104.32Z"/>'),qm=eo("thermometer-hot","0 0 256 256",'<path d="M128,153V48a8,8,0,0,0-16,0V153a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,120,200Zm40-66V48a40,40,0,0,0-80,0v86a64,64,0,1,0,80,0Zm-40,98a48,48,0,0,1-27.42-87.4A8,8,0,0,0,96,138V48a24,24,0,0,1,48,0v90a8,8,0,0,0,3.42,6.56A48,48,0,0,1,120,232ZM177.3,80.77a8,8,0,0,1,2.33-11.07c15-9.79,26.87-4.75,35.51-1.06C223,72,227.76,74,235.63,68.89a8,8,0,0,1,8.74,13.41C237.88,86.53,232,88,226.69,88c-7,0-12.92-2.54-17.83-4.63C201,80,196.24,78,188.37,83.11A8,8,0,0,1,177.3,80.77Zm69.4,22.46a8,8,0,0,1-2.33,11.07C237.88,118.53,232,120,226.69,120c-7,0-12.92-2.54-17.83-4.63-7.87-3.36-12.62-5.38-20.49-.25a8,8,0,0,1-8.74-13.41c15-9.79,26.87-4.75,35.51-1.06,7.87,3.36,12.62,5.39,20.49.25A8,8,0,0,1,246.7,103.23Z"/>'),oee=eo("thermometer-hot","0 0 256 256",'<path d="M160,56A52,52,0,0,0,56,56v94.69a64,64,0,1,0,104,0ZM108,228a40,40,0,0,1-30.91-65.39A12,12,0,0,0,80,154.78V56a28,28,0,0,1,56,0v98.77a12,12,0,0,0,2.77,7.68A40,40,0,0,1,108,228Zm24-40a24,24,0,1,1-36-20.78V56a12,12,0,0,1,24,0V167.22A24,24,0,0,1,132,188ZM173.94,83a12,12,0,0,1,3.51-16.6c16.82-11,30.32-5.2,39.26-1.39,8.09,3.46,10.93,4.37,16.74.58a12,12,0,0,1,13.1,20.11C239.28,90.38,232.64,92,226.71,92c-7.79,0-14.34-2.8-19.42-5-8.09-3.46-10.93-4.37-16.74-.58A12,12,0,0,1,173.94,83Zm76.11,26.1a12,12,0,0,1-3.5,16.6c-7.27,4.73-13.91,6.35-19.84,6.35-7.79,0-14.34-2.8-19.42-5-8.09-3.46-10.93-4.37-16.74-.58a12,12,0,1,1-13.1-20.11c16.82-11,30.32-5.2,39.26-1.39,8.09,3.46,10.93,4.37,16.74.58A12,12,0,0,1,250.05,109.05Z"/>'),uee=eo("thermometer-hot","0 0 256 256",'<path d="M152,146.08V40a32,32,0,0,0-64,0V146.08a56,56,0,1,0,64,0ZM136,56H104V40a16,16,0,0,1,32,0Zm41.3,24.77a8,8,0,0,1,2.33-11.07c15-9.79,26.87-4.75,35.51-1.06C223,72,227.76,74,235.63,68.89a8,8,0,0,1,8.74,13.41C237.88,86.53,232,88,226.69,88c-7,0-12.92-2.54-17.83-4.63C201,80,196.24,78,188.37,83.11A8,8,0,0,1,177.3,80.77Zm69.4,22.46a8,8,0,0,1-2.33,11.07C237.88,118.53,232,120,226.69,120c-7,0-12.92-2.54-17.83-4.63-7.87-3.36-12.62-5.38-20.49-.25a8,8,0,0,1-8.74-13.41c15-9.79,26.87-4.75,35.51-1.06,7.87,3.36,12.62,5.39,20.49.25A8,8,0,0,1,246.7,103.23Z"/>'),cee=eo("thermometer-hot","0 0 256 256",'<path d="M152,138V48a32,32,0,0,0-64,0v90a56,56,0,1,0,64,0Zm-32,70a24,24,0,1,1,24-24A24,24,0,0,1,120,208Z" opacity="0.2"/><path d="M128,153V48a8,8,0,0,0-16,0V153a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,120,200Zm40-66V48a40,40,0,0,0-80,0v86a64,64,0,1,0,80,0Zm-40,98a48,48,0,0,1-27.42-87.4A8,8,0,0,0,96,138V48a24,24,0,0,1,48,0v90a8,8,0,0,0,3.42,6.56A48,48,0,0,1,120,232ZM177.3,80.77a8,8,0,0,1,2.33-11.07c15-9.79,26.87-4.75,35.51-1.06C223,72,227.76,74,235.63,68.89a8,8,0,0,1,8.74,13.41C237.88,86.53,232,88,226.69,88c-7,0-12.92-2.54-17.83-4.63C201,80,196.24,78,188.37,83.11A8,8,0,0,1,177.3,80.77Zm69.4,22.46a8,8,0,0,1-2.33,11.07C237.88,118.53,232,120,226.69,120c-7,0-12.92-2.54-17.83-4.63-7.87-3.36-12.62-5.38-20.49-.25a8,8,0,0,1-8.74-13.41c15-9.79,26.87-4.75,35.51-1.06,7.87,3.36,12.62,5.39,20.49.25A8,8,0,0,1,246.7,103.23Z"/>'),dee="thermometer-hot",hee=Object.freeze(Object.defineProperty({__proto__:null,bold:oee,default:qm,duotone:cee,fill:uee,glyphName:dee,light:lee,regular:qm,thin:see},Symbol.toStringTag,{value:"Module"})),to=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},fee=to("toggle-right","0 0 256 256",'<path d="M176,60H80a68,68,0,0,0,0,136h96a68,68,0,0,0,0-136Zm0,128H80A60,60,0,0,1,80,68h96a60,60,0,0,1,0,120Zm0-96a36,36,0,1,0,36,36A36,36,0,0,0,176,92Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,176,156Z"/>'),pee=to("toggle-right","0 0 256 256",'<path d="M176,58H80a70,70,0,0,0,0,140h96a70,70,0,0,0,0-140Zm0,128H80A58,58,0,0,1,80,70h96a58,58,0,0,1,0,116Zm0-96a38,38,0,1,0,38,38A38,38,0,0,0,176,90Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,176,154Z"/>'),Gm=to("toggle-right","0 0 256 256",'<path d="M176,56H80a72,72,0,0,0,0,144h96a72,72,0,0,0,0-144Zm0,128H80A56,56,0,0,1,80,72h96a56,56,0,0,1,0,112Zm0-96a40,40,0,1,0,40,40A40,40,0,0,0,176,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,176,152Z"/>'),_ee=to("toggle-right","0 0 256 256",'<path d="M176,52H80a76,76,0,0,0,0,152h96a76,76,0,0,0,0-152Zm0,128H80A52,52,0,0,1,80,76h96a52,52,0,0,1,0,104Zm0-92a40,40,0,1,0,40,40A40,40,0,0,0,176,88Zm0,56a16,16,0,1,1,16-16A16,16,0,0,1,176,144Z"/>'),mee=to("toggle-right","0 0 256 256",'<path d="M176,56H80a72,72,0,0,0,0,144h96a72,72,0,0,0,0-144Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,176,168Z"/>'),vee=to("toggle-right","0 0 256 256",'<path d="M208,128a32,32,0,1,1-32-32A32,32,0,0,1,208,128Z" opacity="0.2"/><path d="M176,56H80a72,72,0,0,0,0,144h96a72,72,0,0,0,0-144Zm0,128H80A56,56,0,0,1,80,72h96a56,56,0,0,1,0,112Zm0-96a40,40,0,1,0,40,40A40,40,0,0,0,176,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,176,152Z"/>'),gee="toggle-right",bee=Object.freeze(Object.defineProperty({__proto__:null,bold:_ee,default:Gm,duotone:vee,fill:mee,glyphName:gee,light:pee,regular:Gm,thin:fee},Symbol.toStringTag,{value:"Module"})),io=(e,t,i)=>{const n=r=>He("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...r,innerHTML:i});return n.displayName="NbGlyph",n.glyphName=e,n},yee=io("wind","0 0 256 256",'<path d="M180,184a28,28,0,0,1-28,28c-12.09,0-23.76-7.83-27.75-18.61a4,4,0,1,1,7.5-2.78C134.58,198.24,143.28,204,152,204a20,20,0,0,0,0-40H40a4,4,0,0,1,0-8H152A28,28,0,0,1,180,184ZM148,72a28,28,0,0,0-28-28c-12.09,0-23.76,7.83-27.75,18.61a4,4,0,0,0,7.5,2.78C102.58,57.76,111.28,52,120,52a20,20,0,0,1,0,40H24a4,4,0,0,0,0,8h96A28,28,0,0,0,148,72Zm60,4c-12.09,0-23.76,7.83-27.75,18.61a4,4,0,1,0,7.5,2.78C190.58,89.76,199.28,84,208,84a20,20,0,0,1,0,40H32a4,4,0,0,0,0,8H208a28,28,0,0,0,0-56Z"/>'),wee=io("wind","0 0 256 256",'<path d="M182,184a30,30,0,0,1-30,30c-12.9,0-25.36-8.38-29.63-19.92a6,6,0,0,1,11.26-4.16C136.13,196.69,144.2,202,152,202a18,18,0,0,0,0-36H40a6,6,0,0,1,0-12H152A30,30,0,0,1,182,184ZM150,72a30,30,0,0,0-30-30c-12.9,0-25.36,8.38-29.63,19.92a6,6,0,1,0,11.26,4.16C104.13,59.31,112.2,54,120,54a18,18,0,0,1,0,36H24a6,6,0,0,0,0,12h96A30,30,0,0,0,150,72Zm58,2c-12.9,0-25.36,8.38-29.63,19.92a6,6,0,1,0,11.26,4.16C192.13,91.31,200.2,86,208,86a18,18,0,0,1,0,36H32a6,6,0,0,0,0,12H208a30,30,0,0,0,0-60Z"/>'),Ym=io("wind","0 0 256 256",'<path d="M184,184a32,32,0,0,1-32,32c-13.7,0-26.95-8.93-31.5-21.22a8,8,0,0,1,15-5.56C137.74,195.27,145,200,152,200a16,16,0,0,0,0-32H40a8,8,0,0,1,0-16H152A32,32,0,0,1,184,184Zm-64-80a32,32,0,0,0,0-64c-13.7,0-26.95,8.93-31.5,21.22a8,8,0,0,0,15,5.56C105.74,60.73,113,56,120,56a16,16,0,0,1,0,32H24a8,8,0,0,0,0,16Zm88-32c-13.7,0-26.95,8.93-31.5,21.22a8,8,0,0,0,15,5.56C193.74,92.73,201,88,208,88a16,16,0,0,1,0,32H32a8,8,0,0,0,0,16H208a32,32,0,0,0,0-64Z"/>'),See=io("wind","0 0 256 256",'<path d="M24,104a12,12,0,0,1,0-24h96a12,12,0,0,0,0-24,15.07,15.07,0,0,0-10.26,4.45,12,12,0,0,1-17-16.9A39.34,39.34,0,0,1,120,32a36,36,0,0,1,0,72ZM208,68a39.34,39.34,0,0,0-27.3,11.55,12,12,0,0,0,17,16.9A15.07,15.07,0,0,1,208,92a12,12,0,0,1,0,24H32a12,12,0,0,0,0,24H208a36,36,0,0,0,0-72Zm-56,84H40a12,12,0,0,0,0,24H152a12,12,0,0,1,0,24,15.11,15.11,0,0,1-10.27-4.45,12,12,0,1,0-17,16.9A39.34,39.34,0,0,0,152,224a36,36,0,0,0,0-72Z"/>'),Cee=io("wind","0 0 256 256",'<path d="M120,104H24a8,8,0,0,1-8-8.53A8.17,8.17,0,0,1,24.27,88H112a8,8,0,0,0,8-8.53A8.17,8.17,0,0,0,111.73,72H92.29a4,4,0,0,1-4-4.58A32,32,0,1,1,120,104Zm119.92-2.29a32,32,0,0,0-63.59-2.29,4,4,0,0,0,4,4.58h19.44a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53H32.27A8.17,8.17,0,0,0,24,127.47,8,8,0,0,0,32,136H208A32,32,0,0,0,239.92,101.71ZM152,152H40.27A8.17,8.17,0,0,0,32,159.47,8,8,0,0,0,40,168H143.73a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53H124.29a4,4,0,0,0-4,4.58A32,32,0,1,0,152,152Z"/>'),kee=io("wind","0 0 256 256",'<path d="M120,96a24,24,0,1,1,24-24A24,24,0,0,1,120,96Zm88-16a24,24,0,1,0,24,24A24,24,0,0,0,208,80Zm-56,80a24,24,0,1,0,24,24A24,24,0,0,0,152,160Z" opacity="0.2"/><path d="M184,184a32,32,0,0,1-32,32c-13.7,0-26.95-8.93-31.5-21.22a8,8,0,0,1,15-5.56C137.74,195.27,145,200,152,200a16,16,0,0,0,0-32H40a8,8,0,0,1,0-16H152A32,32,0,0,1,184,184Zm-64-80a32,32,0,0,0,0-64c-13.7,0-26.95,8.93-31.5,21.22a8,8,0,0,0,15,5.56C105.74,60.73,113,56,120,56a16,16,0,0,1,0,32H24a8,8,0,0,0,0,16Zm88-32c-13.7,0-26.95,8.93-31.5,21.22a8,8,0,0,0,15,5.56C193.74,92.73,201,88,208,88a16,16,0,0,1,0,32H32a8,8,0,0,0,0,16H208a32,32,0,0,0,0-64Z"/>'),Aee="wind",$ee=Object.freeze(Object.defineProperty({__proto__:null,bold:See,default:Ym,duotone:kee,fill:Cee,glyphName:Aee,light:wee,regular:Ym,thin:yee},Symbol.toStringTag,{value:"Module"}));function Mee(){bC({"app-window":QY,bell:b2,"bell-ringing":My,"brackets-curly":wy,broadcast:sX,camera:fX,cube:yX,devices:xy,door:MX,drop:PX,fan:ZX,"game-controller":qX,garage:tJ,gear:ey,house:oJ,intersect:_J,lamp:SJ,lightbulb:EJ,lightning:IJ,lock:zJ,plugs:YJ,pulse:nQ,"puzzle-piece":ny,rows:cQ,shield:vQ,sliders:yy,snowflake:kQ,"speaker-hifi":TQ,"speaker-high":DQ,television:WQ,terminal:JQ,thermometer:aee,"thermometer-hot":hee,"toggle-right":bee,wind:$ee})}const Lee={key:0,class:"pcf-section"},Eee={class:"pcf-section-label type-heading-compact"},xee=["for"],Tee={key:0,class:"pcf-required","aria-hidden":"true"},Hee=["for"],Nee={key:0,class:"pcf-required","aria-hidden":"true"},Pee={class:"pcf-label pcf-label--array type-label"},Oee={key:0,class:"pcf-required","aria-hidden":"true"},Iee={class:"pcf-array"},Ree=["for"],Dee={key:0,class:"pcf-required","aria-hidden":"true"},Vee=["for"],Bee={key:0,class:"pcf-required","aria-hidden":"true"},Zee=Ne({__name:"PluginConfigField",props:{fieldKey:{},field:{},path:{},required:{type:Boolean},value:{}},emits:["change","addArray","removeArray","updateArray"],setup(e,{emit:t}){const i=e,n=t,r=H(()=>`pcf-${i.path.join("-")}`);function a(){return Array.isArray(i.field.type)?i.field.type[0]:i.field.type??"string"}function s(){return i.field.title??i.fieldKey.replace(/([A-Z])/g," $1").replace(/^./,h=>h.toUpperCase())}function l(){return(i.field.enum??[]).map((h,f)=>{var _;return{value:h,label:((_=i.field.enumNames)==null?void 0:_[f])??String(h)}})}function o(){return i.value??i.field.default??""}function u(h){const f=i.value;return f==null?void 0:f[h]}function c(h,f){const _=typeof i.value=="object"&&i.value!==null?{...i.value}:{};_[h]=f,n("change",_)}function d(){return Array.isArray(i.value)?i.value:[]}return(h,f)=>{const _=Qo("PluginConfigField",!0),m=Wc,g=L0,v=Zs,w=pa,S=kt,y=Ln("nb-tooltip");return a()==="object"&&e.field.properties?(p(),$("fieldset",Lee,[M("legend",Eee,K(s()),1),(p(!0),$($e,null,Ue(e.field.properties,(A,L)=>{var k;return p(),le(_,{key:L,"field-key":String(L),field:A,path:[...e.path,String(L)],required:((k=e.field.required)==null?void 0:k.includes(String(L)))??!1,value:u(String(L)),onChange:V=>c(String(L),V),onAddArray:f[0]||(f[0]=(V,T)=>n("addArray",V,T)),onRemoveArray:f[1]||(f[1]=(V,T)=>n("removeArray",V,T)),onUpdateArray:f[2]||(f[2]=(V,T,J)=>n("updateArray",V,T,J))},null,8,["field-key","field","path","required","value","onChange"])}),128))])):a()==="boolean"?(p(),le(g,{key:1,control:"fit","label-for":`${r.value}-input`,hint:e.field.description},{label:I(()=>[M("label",{class:"pcf-label type-label",for:`${r.value}-input`},[_e(K(s())+" ",1),e.required?(p(),$("span",Tee,"*")):P("",!0)],8,xee)]),default:I(()=>[ee(m,{id:r.value,"model-value":!!(e.value??e.field.default??!1),name:r.value,variant:"primary","onUpdate:modelValue":f[3]||(f[3]=A=>n("change",A))},null,8,["id","model-value","name"])]),_:1},8,["label-for","hint"])):e.field.enum?(p(),le(g,{key:2,"label-for":r.value,hint:e.field.description},{label:I(()=>[M("label",{class:"pcf-label type-label",for:r.value},[_e(K(s())+" ",1),e.required?(p(),$("span",Nee,"*")):P("",!0)],8,Hee)]),default:I(()=>[ee(v,{id:r.value,"model-value":o(),options:l(),size:"xs","onUpdate:modelValue":f[4]||(f[4]=A=>n("change",A))},null,8,["id","model-value","options"])]),_:1},8,["label-for","hint"])):a()==="array"?(p(),le(g,{key:3,align:"start",hint:e.field.description},{label:I(()=>[M("span",Pee,[_e(K(s())+" ",1),e.required?(p(),$("span",Oee,"*")):P("",!0)])]),default:I(()=>[M("div",Iee,[(p(!0),$($e,null,Ue(d(),(A,L)=>(p(),$("div",{key:L,class:"pcf-array-row"},[ee(w,{class:"pcf-array-input","model-value":String(A),size:"xs",placeholder:`${s()} ${L+1}`,"aria-label":`${s()} ${L+1}`,"onUpdate:modelValue":k=>n("updateArray",e.path,L,k)},null,8,["model-value","placeholder","aria-label","onUpdate:modelValue"]),ut(ee(S,{variant:"ghost",size:"sm",icon:Y(S2),"aria-label":`Remove ${s()} ${L+1}`,onClick:k=>n("removeArray",e.path,L)},null,8,["icon","aria-label","onClick"]),[[y,{body:`Remove ${s()} ${L+1}`}]])]))),128)),ee(S,{class:"pcf-array-add",variant:"tertiary",size:"sm",icon:Y(_0),onClick:f[5]||(f[5]=A=>n("addArray",e.path,e.field.items??{type:"string"}))},{default:I(()=>[...f[8]||(f[8]=[_e(" Add ",-1)])]),_:1},8,["icon"])])]),_:1},8,["hint"])):a()==="number"||a()==="integer"?(p(),le(g,{key:4,"label-for":r.value,hint:e.field.description},{label:I(()=>[M("label",{class:"pcf-label type-label",for:r.value},[_e(K(s())+" ",1),e.required?(p(),$("span",Dee,"*")):P("",!0)],8,Ree)]),default:I(({describedby:A})=>[ee(w,{id:r.value,"model-value":e.value!==void 0?String(e.value):e.field.default!==void 0?String(e.field.default):"",type:"number",size:"xs",placeholder:e.field.default!==void 0?String(e.field.default):"","aria-describedby":A,"onUpdate:modelValue":f[6]||(f[6]=L=>n("change",Number(L)))},null,8,["id","model-value","placeholder","aria-describedby"])]),_:1},8,["label-for","hint"])):(p(),le(g,{key:5,"label-for":r.value,hint:e.field.description},{label:I(()=>[M("label",{class:"pcf-label type-label",for:r.value},[_e(K(s())+" ",1),e.required?(p(),$("span",Bee,"*")):P("",!0)],8,Vee)]),default:I(({describedby:A})=>[ee(w,{id:r.value,"model-value":e.value!==void 0?String(e.value):e.field.default!==void 0?String(e.field.default):"",size:"xs",placeholder:e.field.default!==void 0?String(e.field.default):"","aria-describedby":A,"onUpdate:modelValue":f[7]||(f[7]=L=>n("change",L))},null,8,["id","model-value","placeholder","aria-describedby"])]),_:1},8,["label-for","hint"]))}}}),Fee=jt(Zee,[["__scopeId","data-v-f143ac29"]]);LE({storageKey:"openbridge.theme"});RR({themes:["openbridge"],defaultTheme:"openbridge"});const no=Eg(UR);no.use(ow());no.use(w5);no.use(nS({legacy:!1,locale:navigator.language,fallbackLocale:"en"}));no.use(mC);Mee();no.component("PluginConfigField",Fee);no.mount("#app");
|