glotfile 0.7.3 → 0.8.0

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.
@@ -0,0 +1,2299 @@
1
+ var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function n(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var r={},i=[],a=()=>{},o=()=>!1,s=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),c=e=>e.startsWith(`onUpdate:`),l=Object.assign,u=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},d=Object.prototype.hasOwnProperty,f=(e,t)=>d.call(e,t),p=Array.isArray,m=e=>w(e)===`[object Map]`,h=e=>w(e)===`[object Set]`,g=e=>w(e)===`[object Date]`,_=e=>w(e)===`[object RegExp]`,v=e=>typeof e==`function`,y=e=>typeof e==`string`,b=e=>typeof e==`symbol`,x=e=>typeof e==`object`&&!!e,S=e=>(x(e)||v(e))&&v(e.then)&&v(e.catch),C=Object.prototype.toString,w=e=>C.call(e),T=e=>w(e).slice(8,-1),E=e=>w(e)===`[object Object]`,D=e=>y(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ee=n(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),te=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ne=/-\w/g,O=te(e=>e.replace(ne,e=>e.slice(1).toUpperCase())),re=/\B([A-Z])/g,ie=te(e=>e.replace(re,`-$1`).toLowerCase()),ae=te(e=>e.charAt(0).toUpperCase()+e.slice(1)),oe=te(e=>e?`on${ae(e)}`:``),k=(e,t)=>!Object.is(e,t),se=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ce=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},le=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ue=e=>{let t=y(e)?Number(e):NaN;return isNaN(t)?e:t},de,fe=()=>de||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{},pe=n(`Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol`);function me(e){if(p(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=y(r)?ve(r):me(r);if(i)for(let e in i)t[e]=i[e]}return t}else if(y(e)||x(e))return e}var he=/;(?![^(]*\))/g,ge=/:([^]+)/,_e=/\/\*[^]*?\*\//g;function ve(e){let t={};return e.replace(_e,``).split(he).forEach(e=>{if(e){let n=e.split(ge);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function A(e){let t=``;if(y(e))t=e;else if(p(e))for(let n=0;n<e.length;n++){let r=A(e[n]);r&&(t+=r+` `)}else if(x(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}function ye(e){if(!e)return null;let{class:t,style:n}=e;return t&&!y(t)&&(e.class=A(t)),n&&(e.style=me(n)),e}var be=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,xe=n(be);be+``;function Se(e){return!!e||e===``}function Ce(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=we(e[r],t[r]);return n}function we(e,t){if(e===t)return!0;let n=g(e),r=g(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=b(e),r=b(t),n||r)return e===t;if(n=p(e),r=p(t),n||r)return n&&r?Ce(e,t):!1;if(n=x(e),r=x(t),n||r){if(!n||!r||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let r=e.hasOwnProperty(n),i=t.hasOwnProperty(n);if(r&&!i||!r&&i||!we(e[n],t[n]))return!1}}return String(e)===String(t)}function Te(e,t){return e.findIndex(e=>we(e,t))}var Ee=e=>!!(e&&e.__v_isRef===!0),j=e=>y(e)?e:e==null?``:p(e)||x(e)&&(e.toString===C||!v(e.toString))?Ee(e)?j(e.value):JSON.stringify(e,De,2):String(e),De=(e,t)=>Ee(t)?De(e,t.value):m(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Oe(t,r)+` =>`]=n,e),{})}:h(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Oe(e))}:b(t)?Oe(t):x(t)&&!p(t)&&!E(t)?String(t):t,Oe=(e,t=``)=>b(e)?`Symbol(${e.description??t})`:e;function ke(e){return e==null?`initial`:typeof e==`string`?e===``?` `:e:String(e)}var Ae,je=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&Ae&&(Ae.active?(this.parent=Ae,this.index=(Ae.scopes||=[]).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=Ae;try{return Ae=this,e()}finally{Ae=t}}}on(){++this._on===1&&(this.prevScope=Ae,Ae=this)}off(){if(this._on>0&&--this._on===0){if(Ae===this)Ae=this.prevScope;else{let e=Ae;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Me(e){return new je(e)}function Ne(){return Ae}function Pe(e,t=!1){Ae&&Ae.cleanups.push(e)}var Fe,Ie=new WeakSet,Le=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ae&&(Ae.active?Ae.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ie.has(this)&&(Ie.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ve(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,nt(this),We(this);let e=Fe,t=Qe;Fe=this,Qe=!0;try{return this.fn()}finally{Ge(this),Fe=e,Qe=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Je(e);this.deps=this.depsTail=void 0,nt(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ie.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ke(this)&&this.run()}get dirty(){return Ke(this)}},Re=0,ze,Be;function Ve(e,t=!1){if(e.flags|=8,t){e.next=Be,Be=e;return}e.next=ze,ze=e}function He(){Re++}function Ue(){if(--Re>0)return;if(Be){let e=Be;for(Be=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ze;){let t=ze;for(ze=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function We(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ge(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Je(r),Ye(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ke(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(qe(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function qe(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===rt)||(e.globalVersion=rt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ke(e))))return;e.flags|=2;let t=e.dep,n=Fe,r=Qe;Fe=e,Qe=!0;try{We(e);let n=e.fn(e._value);(t.version===0||k(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{Fe=n,Qe=r,Ge(e),e.flags&=-3}}function Je(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Je(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ye(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function Xe(e,t){e.effect instanceof Le&&(e=e.effect.fn);let n=new Le(e);t&&l(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r}function Ze(e){e.effect.stop()}var Qe=!0,$e=[];function et(){$e.push(Qe),Qe=!1}function tt(){let e=$e.pop();Qe=e===void 0?!0:e}function nt(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=Fe;Fe=void 0;try{t()}finally{Fe=e}}}var rt=0,it=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},at=class{constructor(e){this.computed=e,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(e){if(!Fe||!Qe||Fe===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Fe)t=this.activeLink=new it(Fe,this),Fe.deps?(t.prevDep=Fe.depsTail,Fe.depsTail.nextDep=t,Fe.depsTail=t):Fe.deps=Fe.depsTail=t,ot(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=Fe.depsTail,t.nextDep=void 0,Fe.depsTail.nextDep=t,Fe.depsTail=t,Fe.deps===t&&(Fe.deps=e)}return t}trigger(e){this.version++,rt++,this.notify(e)}notify(e){He();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ue()}}};function ot(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)ot(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var st=new WeakMap,ct=Symbol(``),lt=Symbol(``),ut=Symbol(``);function dt(e,t,n){if(Qe&&Fe){let t=st.get(e);t||st.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new at),r.map=t,r.key=n),r.track()}}function ft(e,t,n,r,i,a){let o=st.get(e);if(!o){rt++;return}let s=e=>{e&&e.trigger()};if(He(),t===`clear`)o.forEach(s);else{let i=p(e),a=i&&D(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===ut||!b(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(ut)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(ct)),m(e)&&s(o.get(lt)));break;case`delete`:i||(s(o.get(ct)),m(e)&&s(o.get(lt)));break;case`set`:m(e)&&s(o.get(ct));break}}Ue()}function pt(e,t){let n=st.get(e);return n&&n.get(t)}function mt(e){let t=an(e);return t===e?t:(dt(t,`iterate`,ut),nn(e)?t:t.map(sn))}function ht(e){return dt(e=an(e),`iterate`,ut),e}function gt(e,t){return tn(e)?cn(en(e)?sn(t):t):sn(t)}var _t={__proto__:null,[Symbol.iterator](){return vt(this,Symbol.iterator,e=>gt(this,e))},concat(...e){return mt(this).concat(...e.map(e=>p(e)?mt(e):e))},entries(){return vt(this,`entries`,e=>(e[1]=gt(this,e[1]),e))},every(e,t){return bt(this,`every`,e,t,void 0,arguments)},filter(e,t){return bt(this,`filter`,e,t,e=>e.map(e=>gt(this,e)),arguments)},find(e,t){return bt(this,`find`,e,t,e=>gt(this,e),arguments)},findIndex(e,t){return bt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return bt(this,`findLast`,e,t,e=>gt(this,e),arguments)},findLastIndex(e,t){return bt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return bt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return St(this,`includes`,e)},indexOf(...e){return St(this,`indexOf`,e)},join(e){return mt(this).join(e)},lastIndexOf(...e){return St(this,`lastIndexOf`,e)},map(e,t){return bt(this,`map`,e,t,void 0,arguments)},pop(){return Ct(this,`pop`)},push(...e){return Ct(this,`push`,e)},reduce(e,...t){return xt(this,`reduce`,e,t)},reduceRight(e,...t){return xt(this,`reduceRight`,e,t)},shift(){return Ct(this,`shift`)},some(e,t){return bt(this,`some`,e,t,void 0,arguments)},splice(...e){return Ct(this,`splice`,e)},toReversed(){return mt(this).toReversed()},toSorted(e){return mt(this).toSorted(e)},toSpliced(...e){return mt(this).toSpliced(...e)},unshift(...e){return Ct(this,`unshift`,e)},values(){return vt(this,`values`,e=>gt(this,e))}};function vt(e,t,n){let r=ht(e),i=r[t]();return r!==e&&!nn(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var yt=Array.prototype;function bt(e,t,n,r,i,a){let o=ht(e),s=o!==e&&!nn(e),c=o[t];if(c!==yt[t]){let t=c.apply(e,a);return s?sn(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,gt(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function xt(e,t,n,r){let i=ht(e),a=i!==e&&!nn(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=gt(e,t)),n.call(this,t,gt(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?gt(e,c):c}function St(e,t,n){let r=an(e);dt(r,`iterate`,ut);let i=r[t](...n);return(i===-1||i===!1)&&rn(n[0])?(n[0]=an(n[0]),r[t](...n)):i}function Ct(e,t,n=[]){et(),He();let r=an(e)[t].apply(e,n);return Ue(),tt(),r}var wt=n(`__proto__,__v_isRef,__isVue`),Tt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(b));function Et(e){b(e)||(e=String(e));let t=an(this);return dt(t,`has`,e),t.hasOwnProperty(e)}var Dt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?qt:Kt:i?Gt:Wt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=p(e);if(!r){let e;if(a&&(e=_t[t]))return e;if(t===`hasOwnProperty`)return Et}let o=Reflect.get(e,t,ln(e)?e:n);if((b(t)?Tt.has(t):wt(t))||(r||dt(e,`get`,t),i))return o;if(ln(o)){let e=a&&D(t)?o:o.value;return r&&x(e)?Zt(e):e}return x(o)?r?Zt(o):Yt(o):o}},Ot=class extends Dt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=p(e)&&D(t);if(!this._isShallow){let e=tn(i);if(!nn(n)&&!tn(n)&&(i=an(i),n=an(n)),!a&&ln(i)&&!ln(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:f(e,t),s=Reflect.set(e,t,n,ln(e)?e:r);return e===an(r)&&(o?k(n,i)&&ft(e,`set`,t,n,i):ft(e,`add`,t,n)),s}deleteProperty(e,t){let n=f(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&ft(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!b(t)||!Tt.has(t))&&dt(e,`has`,t),n}ownKeys(e){return dt(e,`iterate`,p(e)?`length`:ct),Reflect.ownKeys(e)}},kt=class extends Dt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},At=new Ot,jt=new kt,Mt=new Ot(!0),Nt=new kt(!0),Pt=e=>e,Ft=e=>Reflect.getPrototypeOf(e);function It(e,t,n){return function(...r){let i=this.__v_raw,a=an(i),o=m(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,u=i[e](...r),d=n?Pt:t?cn:sn;return!t&&dt(a,`iterate`,c?lt:ct),l(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:s?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function Lt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Rt(e,t){let n={get(n){let r=this.__v_raw,i=an(r),a=an(n);e||(k(n,a)&&dt(i,`get`,n),dt(i,`get`,a));let{has:o}=Ft(i),s=t?Pt:e?cn:sn;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&dt(an(t),`iterate`,ct),t.size},has(t){let n=this.__v_raw,r=an(n),i=an(t);return e||(k(t,i)&&dt(r,`has`,t),dt(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=an(a),s=t?Pt:e?cn:sn;return!e&&dt(o,`iterate`,ct),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return l(n,e?{add:Lt(`add`),set:Lt(`set`),delete:Lt(`delete`),clear:Lt(`clear`)}:{add(e){let n=an(this),r=Ft(n),i=an(e),a=!t&&!nn(e)&&!tn(e)?i:e;return r.has.call(n,a)||k(e,a)&&r.has.call(n,e)||k(i,a)&&r.has.call(n,i)||(n.add(a),ft(n,`add`,a,a)),this},set(e,n){!t&&!nn(n)&&!tn(n)&&(n=an(n));let r=an(this),{has:i,get:a}=Ft(r),o=i.call(r,e);o||=(e=an(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?k(n,s)&&ft(r,`set`,e,n,s):ft(r,`add`,e,n),this},delete(e){let t=an(this),{has:n,get:r}=Ft(t),i=n.call(t,e);i||=(e=an(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&ft(t,`delete`,e,void 0,a),o},clear(){let e=an(this),t=e.size!==0,n=e.clear();return t&&ft(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=It(r,e,t)}),n}function zt(e,t){let n=Rt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(f(n,r)&&r in t?n:t,r,i)}var Bt={get:zt(!1,!1)},Vt={get:zt(!1,!0)},Ht={get:zt(!0,!1)},Ut={get:zt(!0,!0)},Wt=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,qt=new WeakMap;function Jt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Yt(e){return tn(e)?e:$t(e,!1,At,Bt,Wt)}function Xt(e){return $t(e,!1,Mt,Vt,Gt)}function Zt(e){return $t(e,!0,jt,Ht,Kt)}function Qt(e){return $t(e,!0,Nt,Ut,qt)}function $t(e,t,n,r,i){if(!x(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Jt(T(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function en(e){return tn(e)?en(e.__v_raw):!!(e&&e.__v_isReactive)}function tn(e){return!!(e&&e.__v_isReadonly)}function nn(e){return!!(e&&e.__v_isShallow)}function rn(e){return e?!!e.__v_raw:!1}function an(e){let t=e&&e.__v_raw;return t?an(t):e}function on(e){return!f(e,`__v_skip`)&&Object.isExtensible(e)&&ce(e,`__v_skip`,!0),e}var sn=e=>x(e)?Yt(e):e,cn=e=>x(e)?Zt(e):e;function ln(e){return e?e.__v_isRef===!0:!1}function M(e){return dn(e,!1)}function un(e){return dn(e,!0)}function dn(e,t){return ln(e)?e:new fn(e,t)}var fn=class{constructor(e,t){this.dep=new at,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:an(e),this._value=t?e:sn(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||nn(e)||tn(e);e=n?e:an(e),k(e,t)&&(this._rawValue=e,this._value=n?e:sn(e),this.dep.trigger())}};function pn(e){e.dep&&e.dep.trigger()}function N(e){return ln(e)?e.value:e}function mn(e){return v(e)?e():N(e)}var hn={get:(e,t,n)=>t===`__v_raw`?e:N(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return ln(i)&&!ln(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function gn(e){return en(e)?e:new Proxy(e,hn)}var _n=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new at,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}};function vn(e){return new _n(e)}function yn(e){let t=p(e)?Array(e.length):{};for(let n in e)t[n]=Cn(e,n);return t}var bn=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=b(t)?t:String(t),this._raw=an(e);let r=!0,i=e;if(!p(e)||b(this._key)||!D(this._key))do r=!rn(i)||nn(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=N(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&ln(this._raw[this._key])){let t=this._object[this._key];if(ln(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return pt(this._raw,this._key)}},xn=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function Sn(e,t,n){return ln(e)?e:v(e)?new xn(e):x(e)&&arguments.length>1?Cn(e,t,n):M(e)}function Cn(e,t,n){return new bn(e,t,n)}var wn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new at(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=rt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Fe!==this)return Ve(this,!0),!0}get value(){let e=this.dep.track();return qe(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Tn(e,t,n=!1){let r,i;return v(e)?r=e:(r=e.get,i=e.set),new wn(r,i,n)}var En={GET:`get`,HAS:`has`,ITERATE:`iterate`},Dn={SET:`set`,ADD:`add`,DELETE:`delete`,CLEAR:`clear`},On={},kn=new WeakMap,An=void 0;function jn(){return An}function Mn(e,t=!1,n=An){if(n){let t=kn.get(n);t||kn.set(n,t=[]),t.push(e)}}function Nn(e,t,n=r){let{immediate:i,deep:o,once:s,scheduler:c,augmentJob:l,call:d}=n,f=e=>o?e:nn(e)||o===!1||o===0?Pn(e,1):Pn(e),m,h,g,_,y=!1,b=!1;if(ln(e)?(h=()=>e.value,y=nn(e)):en(e)?(h=()=>f(e),y=!0):p(e)?(b=!0,y=e.some(e=>en(e)||nn(e)),h=()=>e.map(e=>{if(ln(e))return e.value;if(en(e))return f(e);if(v(e))return d?d(e,2):e()})):h=v(e)?t?d?()=>d(e,2):e:()=>{if(g){et();try{g()}finally{tt()}}let t=An;An=m;try{return d?d(e,3,[_]):e(_)}finally{An=t}}:a,t&&o){let e=h,t=o===!0?1/0:o;h=()=>Pn(e(),t)}let x=Ne(),S=()=>{m.stop(),x&&x.active&&u(x.effects,m)};if(s&&t){let e=t;t=(...t)=>{e(...t),S()}}let C=b?Array(e.length).fill(On):On,w=e=>{if(!(!(m.flags&1)||!m.dirty&&!e))if(t){let e=m.run();if(o||y||(b?e.some((e,t)=>k(e,C[t])):k(e,C))){g&&g();let n=An;An=m;try{let n=[e,C===On?void 0:b&&C[0]===On?[]:C,_];C=e,d?d(t,3,n):t(...n)}finally{An=n}}}else m.run()};return l&&l(w),m=new Le(h),m.scheduler=c?()=>c(w,!1):w,_=e=>Mn(e,!1,m),g=m.onStop=()=>{let e=kn.get(m);if(e){if(d)d(e,4);else for(let t of e)t();kn.delete(m)}},t?i?w(!0):C=m.run():c?c(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function Pn(e,t=1/0,n){if(t<=0||!x(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ln(e))Pn(e.value,t,n);else if(p(e))for(let r=0;r<e.length;r++)Pn(e[r],t,n);else if(h(e)||m(e))e.forEach(e=>{Pn(e,t,n)});else if(E(e)){for(let r in e)Pn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Pn(e[r],t,n)}return e}var Fn=[];function In(e){Fn.push(e)}function Ln(){Fn.pop()}function Rn(e,t){}var zn={SETUP_FUNCTION:0,0:`SETUP_FUNCTION`,RENDER_FUNCTION:1,1:`RENDER_FUNCTION`,NATIVE_EVENT_HANDLER:5,5:`NATIVE_EVENT_HANDLER`,COMPONENT_EVENT_HANDLER:6,6:`COMPONENT_EVENT_HANDLER`,VNODE_HOOK:7,7:`VNODE_HOOK`,DIRECTIVE_HOOK:8,8:`DIRECTIVE_HOOK`,TRANSITION_HOOK:9,9:`TRANSITION_HOOK`,APP_ERROR_HANDLER:10,10:`APP_ERROR_HANDLER`,APP_WARN_HANDLER:11,11:`APP_WARN_HANDLER`,FUNCTION_REF:12,12:`FUNCTION_REF`,ASYNC_COMPONENT_LOADER:13,13:`ASYNC_COMPONENT_LOADER`,SCHEDULER:14,14:`SCHEDULER`,COMPONENT_UPDATE:15,15:`COMPONENT_UPDATE`,APP_UNMOUNT_CLEANUP:16,16:`APP_UNMOUNT_CLEANUP`},Bn={sp:`serverPrefetch hook`,bc:`beforeCreate hook`,c:`created hook`,bm:`beforeMount hook`,m:`mounted hook`,bu:`beforeUpdate hook`,u:`updated`,bum:`beforeUnmount hook`,um:`unmounted hook`,a:`activated hook`,da:`deactivated hook`,ec:`errorCaptured hook`,rtc:`renderTracked hook`,rtg:`renderTriggered hook`,0:`setup function`,1:`render function`,2:`watcher getter`,3:`watcher callback`,4:`watcher cleanup function`,5:`native event handler`,6:`component event handler`,7:`vnode hook`,8:`directive hook`,9:`transition hook`,10:`app errorHandler`,11:`app warnHandler`,12:`ref function`,13:`async component loader`,14:`scheduler flush`,15:`component update`,16:`app unmount cleanup function`};function Vn(e,t,n,r){try{return r?e(...r):e()}catch(e){Un(e,t,n)}}function Hn(e,t,n,r){if(v(e)){let i=Vn(e,t,n,r);return i&&S(i)&&i.catch(e=>{Un(e,t,n)}),i}if(p(e)){let i=[];for(let a=0;a<e.length;a++)i.push(Hn(e[a],t,n,r));return i}}function Un(e,t,n,i=!0){let a=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||r;if(t){let r=t.parent,i=t.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(t[n](e,i,a)===!1)return}r=r.parent}if(o){et(),Vn(o,null,10,[e,i,a]),tt();return}}Wn(e,n,a,i,s)}function Wn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var Gn=[],Kn=-1,qn=[],Jn=null,Yn=0,Xn=Promise.resolve(),Zn=null;function Qn(e){let t=Zn||Xn;return e?t.then(this?e.bind(this):e):t}function $n(e){let t=Kn+1,n=Gn.length;for(;t<n;){let r=t+n>>>1,i=Gn[r],a=ar(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function er(e){if(!(e.flags&1)){let t=ar(e),n=Gn[Gn.length-1];!n||!(e.flags&2)&&t>=ar(n)?Gn.push(e):Gn.splice($n(t),0,e),e.flags|=1,tr()}}function tr(){Zn||=Xn.then(or)}function nr(e){p(e)?qn.push(...e):Jn&&e.id===-1?Jn.splice(Yn+1,0,e):e.flags&1||(qn.push(e),e.flags|=1),tr()}function rr(e,t,n=Kn+1){for(;n<Gn.length;n++){let t=Gn[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;Gn.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function ir(e){if(qn.length){let e=[...new Set(qn)].sort((e,t)=>ar(e)-ar(t));if(qn.length=0,Jn){Jn.push(...e);return}for(Jn=e,Yn=0;Yn<Jn.length;Yn++){let e=Jn[Yn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}Jn=null,Yn=0}}var ar=e=>e.id==null?e.flags&2?-1:1/0:e.id;function or(e){try{for(Kn=0;Kn<Gn.length;Kn++){let e=Gn[Kn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),Vn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;Kn<Gn.length;Kn++){let e=Gn[Kn];e&&(e.flags&=-2)}Kn=-1,Gn.length=0,ir(e),Zn=null,(Gn.length||qn.length)&&or(e)}}var sr,cr=[];function lr(e,t){sr=e,sr?(sr.enabled=!0,cr.forEach(({event:e,args:t})=>sr.emit(e,...t)),cr=[]):typeof window<`u`&&window.HTMLElement&&!(window.navigator?.userAgent)?.includes(`jsdom`)?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(e=>{lr(e,t)}),setTimeout(()=>{sr||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,cr=[])},3e3)):cr=[]}var ur=null,dr=null;function fr(e){let t=ur;return ur=e,dr=e&&e.type.__scopeId||null,t}function pr(e){dr=e}function mr(){dr=null}var hr=e=>P;function P(e,t=ur,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&ss(-1);let i=fr(t),a;try{a=e(...n)}finally{fr(i),r._d&&ss(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function gr(e,t){if(ur===null)return e;let n=Us(ur),i=e.dirs||=[];for(let e=0;e<t.length;e++){let[a,o,s,c=r]=t[e];a&&(v(a)&&(a={mounted:a,updated:a}),a.deep&&Pn(o),i.push({dir:a,instance:n,value:o,oldValue:void 0,arg:s,modifiers:c}))}return e}function _r(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(et(),Hn(c,n,8,[e.el,s,e,t]),tt())}}function vr(e,t){if(Ts){let n=Ts.provides,r=Ts.parent&&Ts.parent.provides;r===n&&(n=Ts.provides=Object.create(r)),n[e]=t}}function yr(e,t,n=!1){let r=Es();if(r||Ya){let i=Ya?Ya._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&v(t)?t.call(r&&r.proxy):t}}function br(){return!!(Es()||Ya)}var xr=Symbol.for(`v-scx`),Sr=()=>yr(xr);function Cr(e,t){return Dr(e,null,t)}function wr(e,t){return Dr(e,null,{flush:`post`})}function Tr(e,t){return Dr(e,null,{flush:`sync`})}function Er(e,t,n){return Dr(e,t,n)}function Dr(e,t,n=r){let{immediate:i,deep:o,flush:s,once:c}=n,u=l({},n),d=t&&i||!t&&s!==`post`,f;if(Ms){if(s===`sync`){let e=Sr();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=a,e.resume=a,e.pause=a,e}}let p=Ts;u.call=(e,t,n)=>Hn(e,p,t,n);let m=!1;s===`post`?u.scheduler=e=>{ko(e,p&&p.suspense)}:s!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():er(e)}),u.augmentJob=e=>{t&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=Nn(e,t,u);return Ms&&(f?f.push(h):d&&h()),h}function Or(e,t,n){let r=this.proxy,i=y(e)?e.includes(`.`)?kr(r,e):()=>r[e]:e.bind(r,r),a;v(t)?a=t:(a=t.handler,n=t);let o=ks(this),s=Dr(i,a.bind(r),n);return o(),s}function kr(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var Ar=new WeakMap,jr=Symbol(`_vte`),Mr=e=>e.__isTeleport,Nr=e=>e&&(e.disabled||e.disabled===``),Pr=e=>e&&(e.defer||e.defer===``),Fr=e=>typeof SVGElement<`u`&&e instanceof SVGElement,Ir=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,Lr=(e,t)=>{let n=e&&e.to;return y(n)?t?t(n):null:n},Rr={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=Nr(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=Nr(e.props),r=e.target=Lr(e.props,m),a=Ur(r,e,h,p);r&&(o!==`svg`&&Fr(r)?o=`svg`:o!==`mathml`&&Ir(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),Hr(e,!1)))},S=e=>{let t=()=>{Ar.get(e)===t&&(Ar.delete(e),Nr(e.props)&&(b(e,_(e.el)||n,e.anchor),Hr(e,!0)),x(e))};Ar.set(e,t),ko(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),Pr(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),Hr(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=Ar.get(e);if(u){u.flags|=8,Ar.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=Nr(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||Fr(p)?o=`svg`:(o===`mathml`||Ir(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),Io(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):zr(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=Lr(t.props,m);e&&zr(t,e,null,l,0)}else g&&zr(t,p,h,l,1);Hr(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=a||!Nr(f),m=Ar.get(e);if(m&&(m.flags|=8,Ar.delete(e)),d&&(i(l),i(u)),a&&i(c),!m&&o&16)for(let e=0;e<s.length;e++){let i=s[e];r(i,t,n,p,!!i.dynamicChildren)}},move:zr,hydrate:Br};function zr(e,t,n,{o:{insert:r},m:i},a=2){a===0&&r(e.targetAnchor,t,n);let{el:o,anchor:s,shapeFlag:c,children:l,props:u}=e,d=a===2;if(d&&r(o,t,n),!Ar.has(e)&&(!d||Nr(u))&&c&16)for(let e=0;e<l.length;e++)i(l[e],t,n,2);d&&r(s,t,n)}function Br(e,t,n,r,i,a,{o:{nextSibling:o,parentNode:s,querySelector:c,insert:l,createText:u}},d){function f(e,n){let r=n;for(;r;){if(r&&r.nodeType===8){if(r.data===`teleport start anchor`)t.targetStart=r;else if(r.data===`teleport anchor`){t.targetAnchor=r,e._lpa=t.targetAnchor&&o(t.targetAnchor);break}}r=o(r)}}function p(e,t){t.anchor=d(o(e),t,s(e),n,r,i,a)}let m=t.target=Lr(t.props,c),h=Nr(t.props);if(m){let c=m._lpa||m.firstChild;t.shapeFlag&16&&(h?(p(e,t),f(m,c),t.targetAnchor||Ur(m,t,u,l,s(e)===m?e:null)):(t.anchor=o(e),f(m,c),t.targetAnchor||Ur(m,t,u,l),d(c&&o(c),t,m,n,r,i,a))),Hr(t,h)}else h&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var Vr=Rr;function Hr(e,t){let n=e.ctx;if(n&&n.ut){let r,i;for(t?(r=e.el,i=e.anchor):(r=e.targetStart,i=e.targetAnchor);r&&r!==i;)r.nodeType===1&&r.setAttribute(`data-v-owner`,n.uid),r=r.nextSibling;n.ut()}}function Ur(e,t,n,r,i=null){let a=t.targetStart=n(``),o=t.targetAnchor=n(``);return a[jr]=o,e&&(r(a,e,i),r(o,e,i)),o}var Wr=Symbol(`_leaveCb`),Gr=Symbol(`_enterCb`);function Kr(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Gi(()=>{e.isMounted=!0}),Ji(()=>{e.isUnmounting=!0}),e}var qr=[Function,Array],Jr={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:qr,onEnter:qr,onAfterEnter:qr,onEnterCancelled:qr,onBeforeLeave:qr,onLeave:qr,onAfterLeave:qr,onLeaveCancelled:qr,onBeforeAppear:qr,onAppear:qr,onAfterAppear:qr,onAppearCancelled:qr},Yr=e=>{let t=e.subTree;return t.component?Yr(t.component):t},Xr={name:`BaseTransition`,props:Jr,setup(e,{slots:t}){let n=Es(),r=Kr();return()=>{let i=t.default&&ii(t.default(),!0),a=i&&i.length?Zr(i):n.subTree?G():void 0;if(!a)return;let o=an(e),{mode:s}=o;if(r.isLeaving)return ti(a);let c=ni(a);if(!c)return ti(a);let l=ei(c,o,r,n,e=>l=e);c.type!==ts&&ri(c,l);let u=n.subTree&&ni(n.subTree);if(u&&u.type!==ts&&!us(u,c)&&Yr(n).type!==ts){let e=ei(u,o,r,n);if(ri(u,e),s===`out-in`&&c.type!==ts)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},ti(a);s===`in-out`&&c.type!==ts?e.delayLeave=(e,t,n)=>{let i=$r(r,u);i[String(u.key)]=u,e[Wr]=()=>{t(),e[Wr]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function Zr(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==ts){t=n;break}}return t}var Qr=Xr;function $r(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ei(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:m,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:_,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,x=String(e.key),S=$r(n,e),C=(e,t)=>{e&&Hn(e,r,9,t)},w=(e,t)=>{let n=t[1];C(e,t),p(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},T={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted)if(a)r=_||c;else return;t[Wr]&&t[Wr](!0);let i=S[x];i&&us(e,i)&&i.el[Wr]&&i.el[Wr](),C(r,[t])},enter(t){if(S[x]===e)return;let r=l,i=u,o=d;if(!n.isMounted)if(a)r=v||l,i=y||u,o=b||d;else return;let s=!1;t[Gr]=e=>{s||(s=!0,C(e?o:i,[t]),T.delayedLeave&&T.delayedLeave(),t[Gr]=void 0)};let c=t[Gr].bind(null,!1);r?w(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[Gr]&&t[Gr](!0),n.isUnmounting)return r();C(f,[t]);let a=!1;t[Wr]=n=>{a||(a=!0,r(),C(n?g:h,[t]),t[Wr]=void 0,S[i]===e&&delete S[i])};let o=t[Wr].bind(null,!1);S[i]=e,m?w(m,[t,o]):o()},clone(e){let a=ei(e,t,n,r,i);return i&&i(a),a}};return T}function ti(e){if(Ni(e))return e=gs(e),e.children=null,e}function ni(e){if(!Ni(e))return Mr(e.type)&&e.children?Zr(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&v(n.default))return n.default()}}function ri(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ri(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ii(e,t=!1,n){let r=[],i=0;for(let a=0;a<e.length;a++){let o=e[a],s=n==null?o.key:String(n)+String(o.key==null?a:o.key);o.type===R?(o.patchFlag&128&&i++,r=r.concat(ii(o.children,t,s))):(t||o.type!==ts)&&r.push(s==null?o:gs(o,{key:s}))}if(i>1)for(let e=0;e<r.length;e++)r[e].patchFlag=-2;return r}function F(e,t){return v(e)?l({name:e.name},t,{setup:e}):e}function ai(){let e=Es();return e?(e.appContext.config.idPrefix||`v`)+`-`+e.ids[0]+ e.ids[1]++:``}function oi(e){e.ids=[e.ids[0]+ e.ids[2]+++`-`,0,0]}function si(e){let t=Es(),n=un(null);if(t){let i=t.refs===r?t.refs={}:t.refs;Object.defineProperty(i,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e})}return n}function ci(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var li=new WeakMap;function ui(e,t,n,i,a=!1){if(p(e)){e.forEach((e,r)=>ui(e,t&&(p(t)?t[r]:t),n,i,a));return}if(Ai(i)&&!a){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&ui(e,t,n,i.component.subTree);return}let s=i.shapeFlag&4?Us(i.component):i.el,c=a?null:s,{i:l,r:d}=e,m=t&&t.r,h=l.refs===r?l.refs={}:l.refs,g=l.setupState,_=an(g),b=g===r?o:e=>ci(h,e)?!1:f(_,e),x=(e,t)=>!(t&&ci(h,t));if(m!=null&&m!==d){if(di(t),y(m))h[m]=null,b(m)&&(g[m]=null);else if(ln(m)){let e=t;x(m,e.k)&&(m.value=null),e.k&&(h[e.k]=null)}}if(v(d))Vn(d,l,12,[c,h]);else{let t=y(d),r=ln(d);if(t||r){let i=()=>{if(e.f){let n=t?b(d)?g[d]:h[d]:x(d)||!e.k?d.value:h[e.k];if(a)p(n)&&u(n,s);else if(p(n))n.includes(s)||n.push(s);else if(t)h[d]=[s],b(d)&&(g[d]=h[d]);else{let t=[s];x(d,e.k)&&(d.value=t),e.k&&(h[e.k]=t)}}else t?(h[d]=c,b(d)&&(g[d]=c)):r&&(x(d,e.k)&&(d.value=c),e.k&&(h[e.k]=c))};if(c){let t=()=>{i(),li.delete(e)};t.id=-1,li.set(e,t),ko(t,n)}else di(e),i()}}}function di(e){let t=li.get(e);t&&(t.flags|=8,li.delete(e))}var fi=!1,pi=()=>{fi||=(console.error(`Hydration completed but contains mismatches.`),!0)},mi=e=>e.namespaceURI.includes(`svg`)&&e.tagName!==`foreignObject`,hi=e=>e.namespaceURI.includes(`MathML`),gi=e=>{if(e.nodeType===1){if(mi(e))return`svg`;if(hi(e))return`mathml`}},_i=e=>e.nodeType===8;function vi(e){let{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:a,parentNode:o,remove:c,insert:l,createComment:u}}=e,d=(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),ir(),t._vnode=e;return}f(t.firstChild,e,null,null,null),ir(),t._vnode=e},f=(n,r,s,c,u,d=!1)=>{d||=!!r.dynamicChildren;let b=_i(n)&&n.data===`[`,x=()=>g(n,r,s,c,u,b),{type:S,ref:C,shapeFlag:w,patchFlag:T}=r,E=n.nodeType;r.el=n,T===-2&&(d=!1,r.dynamicChildren=null);let D=null;switch(S){case es:E===3?(n.data!==r.children&&(pi(),n.data=r.children),D=a(n)):r.children===``?(l(r.el=i(``),o(n),n),D=n):D=x();break;case ts:y(n)?(D=a(n),v(r.el=n.content.firstChild,n,s)):D=E!==8||b?x():a(n);break;case ns:if(b&&(n=a(n),E=n.nodeType),E===1||E===3){D=n;let e=!r.children.length;for(let t=0;t<r.staticCount;t++)e&&(r.children+=D.nodeType===1?D.outerHTML:D.data),t===r.staticCount-1&&(r.anchor=D),D=a(D);return b?a(D):D}else x();break;case R:D=b?h(n,r,s,c,u,d):x();break;default:if(w&1)D=(E!==1||r.type.toLowerCase()!==n.tagName.toLowerCase())&&!y(n)?x():p(n,r,s,c,u,d);else if(w&6){r.slotScopeIds=u;let e=o(n);if(D=b?_(n):_i(n)&&n.data===`teleport start`?_(n,n.data,`teleport end`):a(n),t(r,e,null,s,c,gi(e),d),Ai(r)&&!r.type.__asyncResolved){let t;b?(t=U(R),t.anchor=D?D.previousSibling:e.lastChild):t=n.nodeType===3?W(``):U(`div`),t.el=n,r.component.subTree=t}}else w&64?D=E===8?r.type.hydrate(n,r,s,c,u,d,e,m):x():w&128&&(D=r.type.hydrate(n,r,s,c,gi(o(n)),u,d,e,f))}return C!=null&&ui(C,null,c,r),D},p=(e,t,n,i,a,o)=>{o||=!!t.dynamicChildren;let{type:l,props:u,patchFlag:d,shapeFlag:f,dirs:p,transition:h}=t,g=l===`input`||l===`option`;if(g||d!==-1){p&&_r(t,null,n,`created`);let l=!1;if(y(e)){l=Fo(null,h)&&n&&n.vnode.props&&n.vnode.props.appear;let r=e.content.firstChild;if(l){let e=r.getAttribute(`class`);e&&(r.$cls=e),h.beforeEnter(r)}v(r,e,n),t.el=e=r}if(f&16&&!(u&&(u.innerHTML||u.textContent))){let r=m(e.firstChild,t,e,n,i,a,o);for(r&&!xi(e,1)&&pi();r;){let e=r;r=r.nextSibling,c(e)}}else if(f&8){let n=t.children;n[0]===`
2
+ `&&(e.tagName===`PRE`||e.tagName===`TEXTAREA`)&&(n=n.slice(1));let{textContent:r}=e;r!==n&&r!==n.replace(/\r\n|\r/g,`
3
+ `)&&(xi(e,0)||pi(),e.textContent=t.children)}if(u){if(g||!o||d&48){let t=e.tagName.includes(`-`);for(let i in u)(g&&(i.endsWith(`value`)||i===`indeterminate`)||s(i)&&!ee(i)||i[0]===`.`||t&&!ee(i))&&r(e,i,null,u[i],void 0,n)}else if(u.onClick)r(e,`onClick`,null,u.onClick,void 0,n);else if(d&4&&en(u.style))for(let e in u.style)u.style[e]}let _;(_=u&&u.onVnodeBeforeMount)&&xs(_,n,t),p&&_r(t,null,n,`beforeMount`),((_=u&&u.onVnodeMounted)||p||l)&&Zo(()=>{_&&xs(_,n,t),l&&h.enter(e),p&&_r(t,null,n,`mounted`)},i)}return e.nextSibling},m=(e,t,r,o,s,c,u)=>{u||=!!t.dynamicChildren;let d=t.children,p=d.length,m=!1;for(let t=0;t<p;t++){let h=u?d[t]:d[t]=vs(d[t]),g=h.type===es;e?(g&&!u&&t+1<p&&vs(d[t+1]).type===es&&(l(i(e.data.slice(h.children.length)),r,a(e)),e.data=h.children),e=f(e,h,o,s,c,u)):g&&!h.children?l(h.el=i(``),r):(m||(m=!0,xi(r,1)||pi()),n(null,h,r,null,o,s,gi(r),c))}return e},h=(e,t,n,r,i,s)=>{let{slotScopeIds:c}=t;c&&(i=i?i.concat(c):c);let d=o(e),f=m(a(e),t,d,n,r,i,s);return f&&_i(f)&&f.data===`]`?a(t.anchor=f):(pi(),l(t.anchor=u(`]`),d,f),f)},g=(e,t,r,i,s,l)=>{if(xi(e.parentElement,1)||pi(),t.el=null,l){let t=_(e);for(;;){let n=a(e);if(n&&n!==t)c(n);else break}}let u=a(e),d=o(e);return c(e),n(null,t,d,u,r,i,gi(d),s),r&&(r.vnode.el=t.el,lo(r,t.el)),u},_=(e,t=`[`,n=`]`)=>{let r=0;for(;e;)if(e=a(e),e&&_i(e)&&(e.data===t&&r++,e.data===n)){if(r===0)return a(e);r--}return e},v=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>e.nodeType===1&&e.tagName===`TEMPLATE`;return[d,f]}var yi=`data-allow-mismatch`,bi={0:`text`,1:`children`,2:`class`,3:`style`,4:`attribute`};function xi(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(yi);)e=e.parentElement;let n=e&&e.getAttribute(yi);if(n==null)return!1;if(n===``)return!0;{let e=n.split(`,`);return t===0&&e.includes(`children`)?!0:e.includes(bi[t])}}var Si=fe().requestIdleCallback||(e=>setTimeout(e,1)),Ci=fe().cancelIdleCallback||(e=>clearTimeout(e)),wi=(e=1e4)=>t=>{let n=Si(t,{timeout:e});return()=>Ci(n)};function Ti(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window;return(t>0&&t<a||r>0&&r<a)&&(n>0&&n<o||i>0&&i<o)}var Ei=e=>(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(Ti(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},Di=e=>t=>{if(e){let n=matchMedia(e);if(n.matches)t();else return n.addEventListener(`change`,t,{once:!0}),()=>n.removeEventListener(`change`,t)}},Oi=(e=[])=>(t,n)=>{y(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,a(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},a=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),a};function ki(e,t){if(_i(e)&&e.data===`[`){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(_i(r))if(r.data===`]`){if(--n===0)break}else r.data===`[`&&n++;r=r.nextSibling}}else t(e)}var Ai=e=>!!e.type.__asyncLoader;function ji(e){v(e)&&(e={loader:e});let{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:a,timeout:o,suspensible:s=!0,onError:c}=e,l=null,u,d=0,f=()=>(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]===`Module`)&&(t=t.default),u=t,t)))};return F({name:`AsyncComponentWrapper`,__asyncLoader:p,__asyncHydrate(e,t,n){let r=!1;(t.bu||=[]).push(()=>r=!0);let i=()=>{r||n()},o=a?()=>{let n=a(i,t=>ki(e,t));n&&(t.bum||=[]).push(n)}:i;u?o():p().then(()=>!t.isUnmounted&&o())},get __asyncResolved(){return u},setup(){let e=Ts;if(oi(e),u)return()=>Mi(u,e);let t=t=>{l=null,Un(t,e,13,!r)};if(s&&e.suspense||Ms)return p().then(t=>()=>Mi(t,e)).catch(e=>(t(e),()=>r?U(r,{error:e}):null));let a=M(!1),c=M(),d=M(!!i);return i&&setTimeout(()=>{d.value=!1},i),o!=null&&setTimeout(()=>{if(!a.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);t(e),c.value=e}},o),p().then(()=>{a.value=!0,e.parent&&Ni(e.parent.vnode)&&e.parent.update()}).catch(e=>{t(e),c.value=e}),()=>{if(a.value&&u)return Mi(u,e);if(c.value&&r)return U(r,{error:c.value});if(n&&!d.value)return Mi(n,e)}}})}function Mi(e,t){let{ref:n,props:r,children:i,ce:a}=t.vnode,o=U(e,r,i);return o.ref=n,o.ce=a,delete t.vnode.ce,o}var Ni=e=>e.type.__isKeepAlive,Pi={name:`KeepAlive`,__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=Es(),r=n.ctx;if(!r.renderer)return()=>{let e=t.default&&t.default();return e&&e.length===1?e[0]:e};let i=new Map,a=new Set,o=null,s=n.suspense,{renderer:{p:c,m:l,um:u,o:{createElement:d}}}=r,f=d(`div`);r.activate=(e,t,n,r,i)=>{let a=e.component;l(e,t,n,0,s),c(a.vnode,e,t,n,a,s,r,e.slotScopeIds,i),ko(()=>{a.isDeactivated=!1,a.a&&se(a.a);let t=e.props&&e.props.onVnodeMounted;t&&xs(t,a.parent,e)},s)},r.deactivate=e=>{let t=e.component;zo(t.m),zo(t.a),l(e,f,null,1,s),ko(()=>{t.da&&se(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&xs(n,t.parent,e),t.isDeactivated=!0},s)};function p(e){Bi(e),u(e,n,s,!0)}function m(e){i.forEach((t,n)=>{let r=Ws(Ai(t)?t.type.__asyncResolved||{}:t.type);r&&!e(r)&&h(n)})}function h(e){let t=i.get(e);t&&(!o||!us(t,o))?p(t):o&&Bi(o),i.delete(e),a.delete(e)}Er(()=>[e.include,e.exclude],([e,t])=>{e&&m(t=>Fi(e,t)),t&&m(e=>!Fi(t,e))},{flush:`post`,deep:!0});let g=null,_=()=>{g!=null&&(Vo(n.subTree.type)?ko(()=>{i.set(g,Vi(n.subTree))},n.subTree.suspense):i.set(g,Vi(n.subTree)))};return Gi(_),qi(_),Ji(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=Vi(t);if(e.type===i.type&&e.key===i.key){Bi(i);let e=i.component.da;e&&ko(e,r);return}p(e)})}),()=>{if(g=null,!t.default)return o=null;let n=t.default(),r=n[0];if(n.length>1)return o=null,n;if(!ls(r)||!(r.shapeFlag&4)&&!(r.shapeFlag&128))return o=null,r;let s=Vi(r);if(s.type===ts)return o=null,s;let c=s.type,l=Ws(Ai(s)?s.type.__asyncResolved||{}:c),{include:u,exclude:d,max:f}=e;if(u&&(!l||!Fi(u,l))||d&&l&&Fi(d,l))return s.shapeFlag&=-257,o=s,r;let p=s.key==null?c:s.key,m=i.get(p);return s.el&&(s=gs(s),r.shapeFlag&128&&(r.ssContent=s)),g=p,m?(s.el=m.el,s.component=m.component,s.transition&&ri(s,s.transition),s.shapeFlag|=512,a.delete(p),a.add(p)):(a.add(p),f&&a.size>parseInt(f,10)&&h(a.values().next().value)),s.shapeFlag|=256,o=s,Vo(r.type)?r:s}}};function Fi(e,t){return p(e)?e.some(e=>Fi(e,t)):y(e)?e.split(`,`).includes(t):_(e)?(e.lastIndex=0,e.test(t)):!1}function Ii(e,t){Ri(e,`a`,t)}function Li(e,t){Ri(e,`da`,t)}function Ri(e,t,n=Ts){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Hi(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Ni(e.parent.vnode)&&zi(r,t,n,e),e=e.parent}}function zi(e,t,n,r){let i=Hi(t,e,r,!0);Yi(()=>{u(r[t],i)},n)}function Bi(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Vi(e){return e.shapeFlag&128?e.ssContent:e}function Hi(e,t,n=Ts,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{et();let i=ks(n),a=Hn(t,n,e,r);return i(),tt(),a};return r?i.unshift(a):i.push(a),a}}var Ui=e=>(t,n=Ts)=>{(!Ms||e===`sp`)&&Hi(e,(...e)=>t(...e),n)},Wi=Ui(`bm`),Gi=Ui(`m`),Ki=Ui(`bu`),qi=Ui(`u`),Ji=Ui(`bum`),Yi=Ui(`um`),Xi=Ui(`sp`),Zi=Ui(`rtg`),Qi=Ui(`rtc`);function $i(e,t=Ts){Hi(`ec`,e,t)}var ea=`components`,ta=`directives`;function na(e,t){return oa(ea,e,!0,t)||e}var ra=Symbol.for(`v-ndc`);function ia(e){return y(e)?oa(ea,e,!1)||e:e||ra}function aa(e){return oa(ta,e)}function oa(e,t,n=!0,r=!1){let i=ur||Ts;if(i){let n=i.type;if(e===ea){let e=Ws(n,!1);if(e&&(e===t||e===O(t)||e===ae(O(t))))return n}let a=sa(i[e]||n[e],t)||sa(i.appContext[e],t);return!a&&r?n:a}}function sa(e,t){return e&&(e[t]||e[O(t)]||e[ae(O(t))])}function I(e,t,n,r){let i,a=n&&n[r],o=p(e);if(o||y(e)){let n=o&&en(e),r=!1,s=!1;n&&(r=!nn(e),s=tn(e),e=ht(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?cn(sn(e[n])):sn(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(x(e))if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}else i=[];return n&&(n[r]=i),i}function ca(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(p(r))for(let t=0;t<r.length;t++)e[r[t].name]=r[t].fn;else r&&(e[r.name]=r.key?(...e)=>{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function L(e,t,n={},r,i){if(ur.ce||ur.parent&&Ai(ur.parent)&&ur.parent.ce){let e=Object.keys(n).length>0;return t!=="default"&&(n.name=t),z(),V(R,null,[U(`slot`,n,r&&r())],e?-2:64)}let a=e[t];a&&a._c&&(a._d=!1),z();let o=a&&la(a(n)),s=n.key||o&&o.key,c=V(R,{key:(s&&!b(s)?s:`_${t}`)+(!o&&r?`_fb`:``)},o||(r?r():[]),o&&e._===1?64:-2);return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),a&&a._c&&(a._d=!0),c}function la(e){return e.some(e=>ls(e)?!(e.type===ts||e.type===R&&!la(e.children)):!0)?e:null}function ua(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:oe(r)]=e[r];return n}var da=e=>e?js(e)?Us(e):da(e.parent):null,fa=l(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=>da(e.parent),$root:e=>da(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ia(e),$forceUpdate:e=>e.f||=()=>{er(e.update)},$nextTick:e=>e.n||=Qn.bind(e.proxy),$watch:e=>Or.bind(e)}),pa=(e,t)=>e!==r&&!e.__isScriptSetup&&f(e,t),ma={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(t[0]!==`$`){let e=s[t];if(e!==void 0)switch(e){case 1:return i[t];case 2:return a[t];case 4:return n[t];case 3:return o[t]}else if(pa(i,t))return s[t]=1,i[t];else if(a!==r&&f(a,t))return s[t]=2,a[t];else if(f(o,t))return s[t]=3,o[t];else if(n!==r&&f(n,t))return s[t]=4,n[t];else ja&&(s[t]=0)}let u=fa[t],d,p;if(u)return t===`$attrs`&&dt(e.attrs,`get`,``),u(e);if((d=c.__cssModules)&&(d=d[t]))return d;if(n!==r&&f(n,t))return s[t]=4,n[t];if(p=l.config.globalProperties,f(p,t))return p[t]},set({_:e},t,n){let{data:i,setupState:a,ctx:o}=e;return pa(a,t)?(a[t]=n,!0):i!==r&&f(i,t)?(i[t]=n,!0):f(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(n[c]||e!==r&&c[0]!==`$`&&f(e,c)||pa(t,c)||f(o,c)||f(i,c)||f(fa,c)||f(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?f(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}},ha=l({},ma,{get(e,t){if(t!==Symbol.unscopables)return ma.get(e,t,e)},has(e,t){return t[0]!==`_`&&!pe(t)}});function ga(){return null}function _a(){return null}function va(e){}function ya(e){}function ba(){return null}function xa(){}function Sa(e,t){return null}function Ca(){return Ta(`useSlots`).slots}function wa(){return Ta(`useAttrs`).attrs}function Ta(e){let t=Es();return t.setupContext||=Hs(t)}function Ea(e){return p(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function Da(e,t){let n=Ea(e);for(let e in t){if(e.startsWith(`__skip`))continue;let r=n[e];r?p(r)||v(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:r===null&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function Oa(e,t){return!e||!t?e||t:p(e)&&p(t)?e.concat(t):l({},Ea(e),Ea(t))}function ka(e,t){let n={};for(let r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function Aa(e){let t=Es(),n=Ms,r=e();As(),n&&Os(!1);let i=()=>{ks(t),n&&Os(!0)},a=()=>{Es()!==t&&t.scope.off(),As(),n&&Os(!1)};return S(r)&&(r=r.catch(e=>{throw i(),Promise.resolve().then(()=>Promise.resolve().then(a)),e})),[r,()=>{i(),Promise.resolve().then(a)}]}var ja=!0;function Ma(e){let t=Ia(e),n=e.proxy,r=e.ctx;ja=!1,t.beforeCreate&&Pa(t.beforeCreate,e,`bc`);let{data:i,computed:o,methods:s,watch:c,provide:l,inject:u,created:d,beforeMount:f,mounted:m,beforeUpdate:h,updated:g,activated:_,deactivated:y,beforeDestroy:b,beforeUnmount:S,destroyed:C,unmounted:w,render:T,renderTracked:E,renderTriggered:D,errorCaptured:ee,serverPrefetch:te,expose:ne,inheritAttrs:O,components:re,directives:ie,filters:ae}=t;if(u&&Na(u,r,null),s)for(let e in s){let t=s[e];v(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);x(t)&&(e.data=Yt(t))}if(ja=!0,o)for(let e in o){let t=o[e],i=q({get:v(t)?t.bind(n,n):v(t.get)?t.get.bind(n,n):a,set:!v(t)&&v(t.set)?t.set.bind(n):a});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(c)for(let e in c)Fa(c[e],r,n,e);if(l){let e=v(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{vr(t,e[t])})}d&&Pa(d,e,`c`);function oe(e,t){p(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(oe(Wi,f),oe(Gi,m),oe(Ki,h),oe(qi,g),oe(Ii,_),oe(Li,y),oe($i,ee),oe(Qi,E),oe(Zi,D),oe(Ji,S),oe(Yi,w),oe(Xi,te),p(ne))if(ne.length){let t=e.exposed||={};ne.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};T&&e.render===a&&(e.render=T),O!=null&&(e.inheritAttrs=O),re&&(e.components=re),ie&&(e.directives=ie),te&&oi(e)}function Na(e,t,n=a){p(e)&&(e=Va(e));for(let n in e){let r=e[n],i;i=x(r)?`default`in r?yr(r.from||n,r.default,!0):yr(r.from||n):yr(r),ln(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Pa(e,t,n){Hn(p(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Fa(e,t,n,r){let i=r.includes(`.`)?kr(n,r):()=>n[r];if(y(e)){let n=t[e];v(n)&&Er(i,n)}else if(v(e))Er(i,e.bind(n));else if(x(e))if(p(e))e.forEach(e=>Fa(e,t,n,r));else{let r=v(e.handler)?e.handler.bind(n):t[e.handler];v(r)&&Er(i,r,e)}}function Ia(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>La(c,e,o,!0)),La(c,t,o)),x(t)&&a.set(t,c),c}function La(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&La(e,a,n,!0),i&&i.forEach(t=>La(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Ra[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var Ra={data:za,props:Wa,emits:Wa,methods:Ua,computed:Ua,beforeCreate:Ha,created:Ha,beforeMount:Ha,mounted:Ha,beforeUpdate:Ha,updated:Ha,beforeDestroy:Ha,beforeUnmount:Ha,destroyed:Ha,unmounted:Ha,activated:Ha,deactivated:Ha,errorCaptured:Ha,serverPrefetch:Ha,components:Ua,directives:Ua,watch:Ga,provide:za,inject:Ba};function za(e,t){return t?e?function(){return l(v(e)?e.call(this,this):e,v(t)?t.call(this,this):t)}:t:e}function Ba(e,t){return Ua(Va(e),Va(t))}function Va(e){if(p(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ha(e,t){return e?[...new Set([].concat(e,t))]:t}function Ua(e,t){return e?l(Object.create(null),e,t):t}function Wa(e,t){return e?p(e)&&p(t)?[...new Set([...e,...t])]:l(Object.create(null),Ea(e),Ea(t??{})):t}function Ga(e,t){if(!e)return t;if(!t)return e;let n=l(Object.create(null),e);for(let r in t)n[r]=Ha(e[r],t[r]);return n}function Ka(){return{app:null,config:{isNativeTag:o,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}}var qa=0;function Ja(e,t){return function(n,r=null){v(n)||(n=l({},n)),r!=null&&!x(r)&&(r=null);let i=Ka(),a=new WeakSet,o=[],s=!1,c=i.app={_uid:qa++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:Xs,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&v(e.install)?(a.add(e),e.install(c,...t)):v(e)&&(a.add(e),e(c,...t))),c},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),c},component(e,t){return t?(i.components[e]=t,c):i.components[e]},directive(e,t){return t?(i.directives[e]=t,c):i.directives[e]},mount(a,o,l){if(!s){let u=c._ceVNode||U(n,r);return u.appContext=i,l===!0?l=`svg`:l===!1&&(l=void 0),o&&t?t(u,a):e(u,a,l),s=!0,c._container=a,a.__vue_app__=c,Us(u.component)}},onUnmount(e){o.push(e)},unmount(){s&&(Hn(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return i.provides[e]=t,c},runWithContext(e){let t=Ya;Ya=c;try{return e()}finally{Ya=t}}};return c}}var Ya=null;function Xa(e,t,n=r){let i=Es(),a=O(t),o=ie(t),s=Za(e,a),c=vn((s,c)=>{let l,u=r,d;return Tr(()=>{let t=e[a];k(l,t)&&(l=t,c())}),{get(){return s(),n.get?n.get(l):l},set(e){let s=n.set?n.set(e):e;if(!k(s,l)&&!(u!==r&&k(e,u)))return;let f=i.vnode.props;f&&(t in f||a in f||o in f)&&(`onUpdate:${t}`in f||`onUpdate:${a}`in f||`onUpdate:${o}`in f)||(l=e,c()),i.emit(`update:${t}`,s),k(e,s)&&k(e,u)&&!k(s,d)&&c(),u=e,d=s}}});return c[Symbol.iterator]=()=>{let e=0;return{next(){return e<2?{value:e++?s||r:c,done:!1}:{done:!0}}}},c}var Za=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${O(t)}Modifiers`]||e[`${ie(t)}Modifiers`];function Qa(e,t,...n){if(e.isUnmounted)return;let i=e.vnode.props||r,a=n,o=t.startsWith(`update:`),s=o&&Za(i,t.slice(7));s&&(s.trim&&(a=n.map(e=>y(e)?e.trim():e)),s.number&&(a=n.map(le)));let c,l=i[c=oe(t)]||i[c=oe(O(t))];!l&&o&&(l=i[c=oe(ie(t))]),l&&Hn(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,Hn(u,e,6,a)}}var $a=new WeakMap;function eo(e,t,n=!1){let r=n?$a:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!v(e)){let r=e=>{let n=eo(e,t,!0);n&&(s=!0,l(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(x(e)&&r.set(e,null),null):(p(a)?a.forEach(e=>o[e]=null):l(o,a),x(e)&&r.set(e,o),o)}function to(e,t){return!e||!s(t)?!1:(t=t.slice(2).replace(/Once$/,``),f(e,t[0].toLowerCase()+t.slice(1))||f(e,ie(t))||f(e,t))}function no(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=fr(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=vs(u.call(t,e,d,f,m,p,h)),y=s}else{let e=t;v=vs(e.length>1?e(f,{attrs:s,slots:o,emit:l}):e(f,null)),y=t.props?s:io(s)}}catch(t){rs.length=0,Un(t,e,1),v=U(ts)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(c)&&(y=ao(y,a)),b=gs(b,y,!1,!0))}return n.dirs&&(b=gs(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&ri(b,n.transition),v=b,fr(_),v}function ro(e,t=!0){let n;for(let t=0;t<e.length;t++){let r=e[t];if(ls(r)){if(r.type!==ts||r.children===`v-if`){if(n)return;n=r}}else return}return n}var io=e=>{let t;for(let n in e)(n===`class`||n===`style`||s(n))&&((t||={})[n]=e[n]);return t},ao=(e,t)=>{let n={};for(let r in e)(!c(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function oo(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?so(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(co(o,r,n)&&!to(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?o?so(r,o,l):!0:!!o;return!1}function so(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(co(t,e,a)&&!to(n,a))return!0}return!1}function co(e,t,n){let r=e[n],i=t[n];return n===`style`&&x(r)&&x(i)?!we(r,i):r!==i}function lo({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var uo={},fo=()=>Object.create(uo),po=e=>Object.getPrototypeOf(e)===uo;function mo(e,t,n,r=!1){let i={},a=fo();e.propsDefaults=Object.create(null),go(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:Xt(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function ho(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=an(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(to(e.emitsOptions,o))continue;let u=t[o];if(c)if(f(a,o))u!==a[o]&&(a[o]=u,l=!0);else{let t=O(o);i[t]=_o(c,s,t,u,e,!1)}else u!==a[o]&&(a[o]=u,l=!0)}}}else{go(e,t,i,a)&&(l=!0);let r;for(let a in s)(!t||!f(t,a)&&((r=ie(a))===a||!f(t,r)))&&(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=_o(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)(!t||!f(t,e))&&(delete a[e],l=!0)}l&&ft(e.attrs,`set`,``)}function go(e,t,n,i){let[a,o]=e.propsOptions,s=!1,c;if(t)for(let r in t){if(ee(r))continue;let l=t[r],u;a&&f(a,u=O(r))?!o||!o.includes(u)?n[u]=l:(c||={})[u]=l:to(e.emitsOptions,r)||(!(r in i)||l!==i[r])&&(i[r]=l,s=!0)}if(o){let t=an(n),i=c||r;for(let r=0;r<o.length;r++){let s=o[r];n[s]=_o(a,t,s,i[s],e,!f(i,s))}}return s}function _o(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=f(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&v(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=ks(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===ie(n))&&(r=!0))}return r}var vo=new WeakMap;function yo(e,t,n=!1){let a=n?vo:t.propsCache,o=a.get(e);if(o)return o;let s=e.props,c={},u=[],d=!1;if(!v(e)){let r=e=>{d=!0;let[n,r]=yo(e,t,!0);l(c,n),r&&u.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!s&&!d)return x(e)&&a.set(e,i),i;if(p(s))for(let e=0;e<s.length;e++){let t=O(s[e]);bo(t)&&(c[t]=r)}else if(s)for(let e in s){let t=O(e);if(bo(t)){let n=s[e],r=c[t]=p(n)||v(n)?{type:n}:l({},n),i=r.type,a=!1,o=!0;if(p(i))for(let e=0;e<i.length;++e){let t=i[e],n=v(t)&&t.name;if(n===`Boolean`){a=!0;break}else n===`String`&&(o=!1)}else a=v(i)&&i.name===`Boolean`;r[0]=a,r[1]=o,(a||f(r,`default`))&&u.push(t)}}let m=[c,u];return x(e)&&a.set(e,m),m}function bo(e){return e[0]!==`$`&&!ee(e)}var xo=e=>e===`_`||e===`_ctx`||e===`$stable`,So=e=>p(e)?e.map(vs):[vs(e)],Co=(e,t,n)=>{if(t._n)return t;let r=P((...e)=>So(t(...e)),n);return r._c=!1,r},wo=(e,t,n)=>{let r=e._ctx;for(let n in e){if(xo(n))continue;let i=e[n];if(v(i))t[n]=Co(n,i,r);else if(i!=null){let e=So(i);t[n]=()=>e}}},To=(e,t)=>{let n=So(t);e.slots.default=()=>n},Eo=(e,t,n)=>{for(let r in t)(n||!xo(r))&&(e[r]=t[r])},Do=(e,t,n)=>{let r=e.slots=fo();if(e.vnode.shapeFlag&32){let e=t._;e?(Eo(r,t,n),n&&ce(r,`_`,e,!0)):wo(t,r)}else t&&To(e,t)},Oo=(e,t,n)=>{let{vnode:i,slots:a}=e,o=!0,s=r;if(i.shapeFlag&32){let e=t._;e?n&&e===1?o=!1:Eo(a,t,n):(o=!t.$stable,wo(t,a)),s=t}else t&&(To(e,t),s={default:1});if(o)for(let e in a)!xo(e)&&s[e]==null&&delete a[e]},ko=Zo;function Ao(e){return Mo(e)}function jo(e){return Mo(e,vi)}function Mo(e,t){let n=fe();n.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=a,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!us(e,t)&&(r=A(e),me(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case es:y(e,t,n,r);break;case ts:b(e,t,n,r);break;case ns:e??x(t,n,r,o);break;case R:re(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?ie(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,xe)}u!=null&&i?ui(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&ui(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)T(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),te(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},T=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&D(e.children,d,null,r,i,No(e,a),s,u),_&&_r(e,null,r,`created`),E(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!ee(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&xs(f,r,e)}_&&_r(e,null,r,`beforeMount`);let v=Fo(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&ko(()=>{try{f&&xs(f,r,e),v&&g.enter(d),_&&_r(e,null,r,`mounted`)}finally{}},i)},E=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||Vo(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;E(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},D=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++)v(null,e[l]=s?ys(e[l]):vs(e[l]),t,n,r,i,a,o,s)},te=(e,t,n,i,a,o,s)=>{let l=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=e.patchFlag&16;let m=e.props||r,h=t.props||r,g;if(n&&Po(n,!1),(g=h.onVnodeBeforeUpdate)&&xs(g,n,t,e),f&&_r(t,e,n,`beforeUpdate`),n&&Po(n,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?ne(e.dynamicChildren,d,l,n,i,No(t,a),o):s||le(e,t,l,null,n,i,No(t,a),o,!1),u>0){if(u&16)O(l,m,h,n,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],i=m[r],o=h[r];(o!==i||r===`value`)&&c(l,r,i,o,a,n)}}u&1&&e.children!==t.children&&p(l,t.children)}else !s&&d==null&&O(l,m,h,n,a);((g=h.onVnodeUpdated)||f)&&ko(()=>{g&&xs(g,n,t,e),f&&_r(t,e,n,`updated`)},i)},ne=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s];v(c,l,c.el&&(c.type===R||!us(c,l)||c.shapeFlag&198)?m(c.el):n,null,r,i,a,o,!0)}},O=(e,t,n,i,a)=>{if(t!==n){if(t!==r)for(let r in t)!ee(r)&&!(r in n)&&c(e,r,t[r],null,a,i);for(let r in n){if(ee(r))continue;let o=n[r],s=t[r];o!==s&&r!==`value`&&c(e,r,s,o,a,i)}`value`in n&&c(e,`value`,t.value,n.value,a)}},re=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),D(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(ne(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Io(e,t,!0)):le(e,t,n,f,i,a,s,c,l)},ie=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):ae(t,n,r,i,a,o,c):oe(e,t,c)},ae=(e,t,n,r,i,a,o)=>{let s=e.component=ws(e,r,i);if(Ni(e)&&(s.ctx.renderer=xe),Ns(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,k,o),!e.el){let r=s.subTree=U(ts);b(null,r,t,n),e.placeholder=r.el}}else k(s,e,t,n,i,a,o)},oe=(e,t,n)=>{let r=t.component=e.component;if(oo(e,t,n))if(r.asyncDep&&!r.asyncResolved){ce(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},k=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Ro(e);if(n){t&&(t.el=c.el,ce(e,t,o)),n.asyncDep.then(()=>{ko(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;Po(e,!1),t?(t.el=c.el,ce(e,t,o)):t=c,n&&se(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&xs(d,s,t,c),Po(e,!0);let f=no(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),A(p),e,i,a),t.el=f.el,u===null&&lo(e,f.el),r&&ko(r,i),(d=t.props&&t.props.onVnodeUpdated)&&ko(()=>xs(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Ai(t);if(Po(e,!1),l&&se(l),!m&&(o=c&&c.onVnodeBeforeMount)&&xs(o,d,t),Po(e,!0),s&&Ce){let t=()=>{e.subTree=no(e),Ce(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=no(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&ko(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;ko(()=>xs(o,d,e),i)}(t.shapeFlag&256||d&&Ai(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&ko(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Le(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>er(u),Po(e,!0),l()},ce=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,ho(e,t.props,r,n),Oo(e,t.children,n),et(),rr(e),tt()},le=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){de(l,d,n,r,i,a,o,s,c);return}else if(f&256){ue(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&ve(l,i,a),d!==l&&p(n,d)):u&16?m&16?de(l,d,n,r,i,a,o,s,c):ve(l,i,a,!0):(u&8&&p(n,``),m&16&&D(d,n,r,i,a,o,s,c))},ue=(e,t,n,r,a,o,s,c,l)=>{e||=i,t||=i;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;p<f;p++){let r=t[p]=l?ys(t[p]):vs(t[p]);v(e[p],r,n,null,a,o,s,c,l)}u>d?ve(e,a,o,!0,!1,f):D(t,n,r,a,o,s,c,l,f)},de=(e,t,n,r,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let r=e[u],i=t[u]=l?ys(t[u]):vs(t[u]);if(us(r,i))v(r,i,n,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let r=e[f],i=t[p]=l?ys(t[p]):vs(t[p]);if(us(r,i))v(r,i,n,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,i=e<d?t[e].el:r;for(;u<=p;)v(null,t[u]=l?ys(t[u]):vs(t[u]),n,i,a,o,s,c,l),u++}}else if(u>p)for(;u<=f;)me(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?ys(t[u]):vs(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u<b;u++)C[u]=0;for(u=m;u<=f;u++){let r=e[u];if(y>=b){me(r,a,o,!0);continue}let i;if(r.key!=null)i=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&us(r,t[_])){i=_;break}i===void 0?me(r,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(r,t[i],n,null,a,o,s,c,l),y++)}let w=x?Lo(C):i;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,i=t[e],f=t[e+1],p=e+1<d?f.el||Bo(f):r;C[u]===0?v(null,i,n,p,a,o,s,c,l):x&&(_<0||u!==w[_]?pe(i,n,p,2):_--)}}},pe=(e,t,n,r,i=null)=>{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){pe(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,xe);return}if(c===R){o(a,t,n);for(let e=0;e<u.length;e++)pe(u[e],t,n,r);o(e.anchor,t,n);return}if(c===ns){S(e,t,n);return}if(r!==2&&d&1&&l)if(r===0)l.persisted&&!a[Wr]?o(a,t,n):(l.beforeEnter(a),o(a,t,n),ko(()=>l.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[Wr];a._isLeaving&&a[Wr](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}else o(a,t,n)},me=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(et(),ui(s,null,n,e,!0),tt()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Ai(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&xs(_,t,e),u&6)_e(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&_r(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,xe,r):l&&!l.hasOnce&&(a!==R||d>0&&d&64)?ve(l,t,n,!1,!0):(a===R&&d&384||!i&&u&16)&&ve(c,t,n),r&&he(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&ko(()=>{_&&xs(_,t,e),h&&_r(e,null,t,`unmounted`),v&&(e.el=null)},n)},he=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===R){ge(n,r);return}if(t===ns){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},ge=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},_e=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;zo(c),zo(l),r&&se(r),i.stop(),a&&(a.flags|=8,me(o,e,t,n)),s&&ko(s,t),ko(()=>{e.isUnmounted=!0},t)},ve=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)me(e[o],t,n,r,i)},A=e=>{if(e.shapeFlag&6)return A(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[jr];return n?h(n):t},ye=!1,be=(e,t,n)=>{let r;e==null?t._vnode&&(me(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ye||=(ye=!0,rr(r),ir(),!1)},xe={p:v,um:me,m:pe,r:he,mt:ae,mc:D,pc:le,pbc:ne,n:A,o:e},Se,Ce;return t&&([Se,Ce]=t(xe)),{render:be,hydrate:Se,createApp:Ja(be,Se)}}function No({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function Po({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Fo(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Io(e,t,n=!1){let r=e.children,i=t.children;if(p(r)&&p(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=ys(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&Io(t,a)),a.type===es&&(a.patchFlag===-1&&(a=i[e]=ys(a)),a.el=t.el),a.type===ts&&!a.el&&(a.el=t.el)}}function Lo(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function Ro(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ro(t)}function zo(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Bo(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?Bo(t.subTree):null}var Vo=e=>e.__isSuspense,Ho=0,Uo={name:`Suspense`,__isSuspense:!0,process(e,t,n,r,i,a,o,s,c,l){if(e==null)Go(t,n,r,i,a,o,s,c,l);else{if(a&&a.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Ko(e,t,n,r,i,o,s,c,l)}},hydrate:Jo,normalize:Yo};function Wo(e,t){let n=e.props&&e.props[t];v(n)&&n()}function Go(e,t,n,r,i,a,o,s,c){let{p:l,o:{createElement:u}}=c,d=u(`div`),f=e.suspense=qo(e,i,r,t,d,n,a,o,s,c);l(null,f.pendingBranch=e.ssContent,d,null,r,f,a,o),f.deps>0?(Wo(e,`onPending`),Wo(e,`onFallback`),l(null,e.ssFallback,t,n,r,null,a,o),Qo(f,e.ssFallback)):f.resolve(!1,!0)}function Ko(e,t,n,r,i,a,o,s,{p:c,um:l,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let f=t.ssContent,p=t.ssFallback,{activeBranch:m,pendingBranch:h,isInFallback:g,isHydrating:_}=d;if(h)d.pendingBranch=f,us(h,f)?(c(h,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():g&&(_||(c(m,p,n,r,i,null,a,o,s),Qo(d,p)))):(d.pendingId=Ho++,_?(d.isHydrating=!1,d.activeBranch=h):l(h,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u(`div`),g?(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():(c(m,p,n,r,i,null,a,o,s),Qo(d,p))):m&&us(m,f)?(c(m,f,n,r,i,d,a,o,s),d.resolve(!0)):(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0&&d.resolve()));else if(m&&us(m,f))c(m,f,n,r,i,d,a,o,s),Qo(d,f);else if(Wo(t,`onPending`),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=Ho++,c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(p)},e):e===0&&d.fallback(p)}}function qo(e,t,n,r,i,a,o,s,c,l,u=!1){let{p:d,m:f,um:p,n:m,o:{parentNode:h,remove:g}}=l,_,v=$o(e);v&&t&&t.pendingBranch&&(_=t.pendingId,t.deps++);let y=e.props?ue(e.props.timeout):void 0,b=a,x={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:i,deps:0,pendingId:Ho++,timeout:typeof y==`number`?y:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:o,pendingId:s,effects:c,parentComponent:l,container:u,isInFallback:d}=x,g=!1;if(x.isHydrating)x.isHydrating=!1;else if(!e){g=i&&o.transition&&o.transition.mode===`out-in`;let e=!1;g&&(i.transition.afterLeave=()=>{s===x.pendingId&&(f(o,u,a===b&&!e?m(i):a,0),nr(c),d&&r.ssFallback&&(r.ssFallback.el=null))}),i&&!x.isFallbackMountPending&&(h(i.el)===u&&(a=m(i),e=!0),p(i,l,x,!0),!g&&d&&r.ssFallback&&ko(()=>r.ssFallback.el=null,x)),g||f(o,u,a,0)}x.isFallbackMountPending=!1,Qo(x,o),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,S=!1;for(;y;){if(y.pendingBranch){y.effects.push(...c),S=!0;break}y=y.parent}!S&&!g&&nr(c),x.effects=[],v&&t&&t.pendingBranch&&_===t.pendingId&&(t.deps--,t.deps===0&&!n&&t.resolve()),Wo(r,`onResolve`)},fallback(e){if(!x.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:r,container:i,namespace:a}=x;Wo(t,`onFallback`);let o=m(n),l=()=>{x.isFallbackMountPending=!1,x.isInFallback&&(d(null,e,i,o,r,null,a,s,c),Qo(x,e))},u=e.transition&&e.transition.mode===`out-in`;u&&(x.isFallbackMountPending=!0,n.transition.afterLeave=l),x.isInFallback=!0,p(n,r,null,!0),u||l()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next(){return x.activeBranch&&m(x.activeBranch)},registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{Un(t,e,0)}).then(a=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;As(),e.asyncResolved=!0;let{vnode:s}=e;Fs(e,a,!1),i&&(s.el=i);let c=!i&&e.subTree.el;t(e,s,h(i||e.subTree.el),i?null:m(e.subTree),x,o,n),c&&(s.placeholder=null,g(c)),lo(e,s.el),r&&--x.deps===0&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,e,t),x.pendingBranch&&p(x.pendingBranch,n,e,t)}};return x}function Jo(e,t,n,r,i,a,o,s,c){let l=t.suspense=qo(t,r,n,e.parentNode,document.createElement(`div`),null,i,a,o,s,!0),u=c(e,l.pendingBranch=t.ssContent,n,l,a,o);return l.deps===0&&l.resolve(!1,!0),u}function Yo(e){let{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=Xo(r?n.default:n),e.ssFallback=r?Xo(n.fallback):U(ts)}function Xo(e){let t;if(v(e)){let n=os&&e._c;n&&(e._d=!1,z()),e=e(),n&&(e._d=!0,t=is,as())}return p(e)&&(e=ro(e)),e=vs(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function Zo(e,t){t&&t.pendingBranch?p(e)?t.effects.push(...e):t.effects.push(e):nr(e)}function Qo(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,lo(r,i))}function $o(e){let t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var R=Symbol.for(`v-fgt`),es=Symbol.for(`v-txt`),ts=Symbol.for(`v-cmt`),ns=Symbol.for(`v-stc`),rs=[],is=null;function z(e=!1){rs.push(is=e?null:[])}function as(){rs.pop(),is=rs[rs.length-1]||null}var os=1;function ss(e,t=!1){os+=e,e<0&&is&&t&&(is.hasOnce=!0)}function cs(e){return e.dynamicChildren=os>0?is||i:null,as(),os>0&&is&&is.push(e),e}function B(e,t,n,r,i,a){return cs(H(e,t,n,r,i,a,!0))}function V(e,t,n,r,i){return cs(U(e,t,n,r,i,!0))}function ls(e){return e?e.__v_isVNode===!0:!1}function us(e,t){return e.type===t.type&&e.key===t.key}function ds(e){}var fs=({key:e})=>e??null,ps=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:y(e)||ln(e)||v(e)?{i:ur,r:e,k:t,f:!!n}:e);function H(e,t=null,n=null,r=0,i=null,a=e===R?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&fs(t),ref:t&&ps(t),scopeId:dr,slotScopeIds:null,children:n,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:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:ur};return s?(bs(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=y(n)?8:16),os>0&&!o&&is&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&is.push(c),c}var U=ms;function ms(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===ra)&&(e=ts),ls(e)){let r=gs(e,t,!0);return n&&bs(r,n),os>0&&!a&&is&&(r.shapeFlag&6?is[is.indexOf(e)]=r:is.push(r)),r.patchFlag=-2,r}if(Gs(e)&&(e=e.__vccOpts),t){t=hs(t);let{class:e,style:n}=t;e&&!y(e)&&(t.class=A(e)),x(n)&&(rn(n)&&!p(n)&&(n=l({},n)),t.style=me(n))}let o=y(e)?1:Vo(e)?128:Mr(e)?64:x(e)?4:v(e)?2:0;return H(e,t,n,r,i,o,a,!0)}function hs(e){return e?rn(e)||po(e)?l({},e):e:null}function gs(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?K(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&fs(l),ref:t&&t.ref?n&&a?p(a)?a.concat(ps(t)):[a,ps(t)]:ps(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==R?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&gs(e.ssContent),ssFallback:e.ssFallback&&gs(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&ri(u,c.clone(u)),u}function W(e=` `,t=0){return U(es,null,e,t)}function _s(e,t){let n=U(ns,null,e);return n.staticCount=t,n}function G(e=``,t=!1){return t?(z(),V(ts,null,e)):U(ts,null,e)}function vs(e){return e==null||typeof e==`boolean`?U(ts):p(e)?U(R,null,e.slice()):ls(e)?ys(e):U(es,null,String(e))}function ys(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:gs(e)}function bs(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(p(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),bs(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!po(t)?t._ctx=ur:r===3&&ur&&(ur.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else v(t)?(t={default:t,_ctx:ur},n=32):(t=String(t),r&64?(n=16,t=[W(t)]):n=8);e.children=t,e.shapeFlag|=n}function K(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=A([t.class,r.class]));else if(e===`style`)t.style=me([t.style,r.style]);else if(s(e)){let n=t[e],i=r[e];i&&n!==i&&!(p(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!c(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function xs(e,t,n,r=null){Hn(e,t,7,[n,r])}var Ss=Ka(),Cs=0;function ws(e,t,n){let i=e.type,a=(t?t.appContext:e.appContext)||Ss,o={uid:Cs++,vnode:e,type:i,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new je(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:yo(i,a),emitsOptions:eo(i,a),emit:null,emitted:null,propsDefaults:r,inheritAttrs:i.inheritAttrs,ctx:r,data:r,props:r,attrs:r,slots:r,refs:r,setupState:r,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=Qa.bind(null,o),e.ce&&e.ce(o),o}var Ts=null,Es=()=>Ts||ur,Ds,Os;{let e=fe(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Ds=t(`__VUE_INSTANCE_SETTERS__`,e=>Ts=e),Os=t(`__VUE_SSR_SETTERS__`,e=>Ms=e)}var ks=e=>{let t=Ts;return Ds(e),e.scope.on(),()=>{e.scope.off(),Ds(t)}},As=()=>{Ts&&Ts.scope.off(),Ds(null)};function js(e){return e.vnode.shapeFlag&4}var Ms=!1;function Ns(e,t=!1,n=!1){t&&Os(t);let{props:r,children:i}=e.vnode,a=js(e);mo(e,r,a,t),Do(e,i,n||t);let o=a?Ps(e,t):void 0;return t&&Os(!1),o}function Ps(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ma);let{setup:r}=n;if(r){et();let n=e.setupContext=r.length>1?Hs(e):null,i=ks(e),a=Vn(r,e,0,[e.props,n]),o=S(a);if(tt(),i(),(o||e.sp)&&!Ai(e)&&oi(e),o){if(a.then(As,As),t)return a.then(n=>{Fs(e,n,t)}).catch(t=>{Un(t,e,0)});e.asyncDep=a}else Fs(e,a,t)}else Bs(e,t)}function Fs(e,t,n){v(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:x(t)&&(e.setupState=gn(t)),Bs(e,n)}var Is,Ls;function Rs(e){Is=e,Ls=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,ha))}}var zs=()=>!Is;function Bs(e,t,n){let r=e.type;if(!e.render){if(!t&&Is&&!r.render){let t=r.template||Ia(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r,s=l(l({isCustomElement:n,delimiters:a},i),o);r.render=Is(t,s)}}e.render=r.render||a,Ls&&Ls(e)}{let t=ks(e);et();try{Ma(e)}finally{tt(),t()}}}var Vs={get(e,t){return dt(e,`get`,``),e[t]}};function Hs(e){return{attrs:new Proxy(e.attrs,Vs),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Us(e){return e.exposed?e.exposeProxy||=new Proxy(gn(on(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in fa)return fa[n](e)},has(e,t){return t in e||t in fa}}):e.proxy}function Ws(e,t=!0){return v(e)?e.displayName||e.name:e.name||t&&e.__name}function Gs(e){return v(e)&&`__vccOpts`in e}var q=(e,t)=>Tn(e,t,Ms);function Ks(e,t,n){try{ss(-1);let r=arguments.length;return r===2?x(t)&&!p(t)?ls(t)?U(e,null,[t]):U(e,t):U(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&ls(n)&&(n=[n]),U(e,t,n))}finally{ss(1)}}function qs(){return;function e(t,n,r){let i=t[r];if(p(i)&&i.includes(n)||x(i)&&n in i||t.extends&&e(t.extends,n,r)||t.mixins&&t.mixins.some(t=>e(t,n,r)))return!0}}function Js(e,t,n,r){let i=n[r];if(i&&Ys(i,e))return i;let a=t();return a.memo=e.slice(),a.cacheIndex=r,n[r]=a}function Ys(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e<n.length;e++)if(k(n[e],t[e]))return!1;return os>0&&is&&is.push(e),!0}var Xs=`3.5.35`,Zs=a,Qs=Bn,$s=sr,ec=lr,tc={createComponentInstance:ws,setupComponent:Ns,renderComponentRoot:no,setCurrentRenderingInstance:fr,isVNode:ls,normalizeVNode:vs,getComponentPublicInstance:Us,ensureValidVNode:la,pushWarningContext:In,popWarningContext:Ln},nc=void 0,rc=typeof window<`u`&&window.trustedTypes;if(rc)try{nc=rc.createPolicy(`vue`,{createHTML:e=>e})}catch{}var ic=nc?e=>nc.createHTML(e):e=>e,ac=`http://www.w3.org/2000/svg`,oc=`http://www.w3.org/1998/Math/MathML`,sc=typeof document<`u`?document:null,cc=sc&&sc.createElement(`template`),lc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?sc.createElementNS(ac,e):t===`mathml`?sc.createElementNS(oc,e):n?sc.createElement(e,{is:n}):sc.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>sc.createTextNode(e),createComment:e=>sc.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>sc.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{cc.innerHTML=ic(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=cc.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},uc=`transition`,dc=`animation`,fc=Symbol(`_vtc`),pc={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},mc=l({},Jr,pc),hc=(e=>(e.displayName=`Transition`,e.props=mc,e))((e,{slots:t})=>Ks(Qr,vc(e),t)),gc=(e,t=[])=>{p(e)?e.forEach(e=>e(...t)):e&&e(...t)},_c=e=>e?p(e)?e.some(e=>e.length>1):e.length>1:!1;function vc(e){let t={};for(let n in e)n in pc||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:u=o,appearToClass:d=s,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=yc(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,E=(e,t,n,r)=>{e._enterCancelled=r,Sc(e,t?d:s),Sc(e,t?u:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,Sc(e,f),Sc(e,m),Sc(e,p),t&&t()},ee=e=>(t,n)=>{let i=e?w:y,o=()=>E(t,e,n);gc(i,[t,o]),Cc(()=>{Sc(t,e?c:a),xc(t,e?d:s),_c(i)||Tc(t,r,g,o)})};return l(t,{onBeforeEnter(e){gc(v,[e]),xc(e,a),xc(e,o)},onBeforeAppear(e){gc(C,[e]),xc(e,c),xc(e,u)},onEnter:ee(!1),onAppear:ee(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);xc(e,f),e._enterCancelled?(xc(e,p),kc(e)):(kc(e),xc(e,p)),Cc(()=>{e._isLeaving&&(Sc(e,f),xc(e,m),_c(x)||Tc(e,r,_,n))}),gc(x,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),gc(b,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),gc(T,[e])},onLeaveCancelled(e){D(e),gc(S,[e])}})}function yc(e){if(e==null)return null;if(x(e))return[bc(e.enter),bc(e.leave)];{let t=bc(e);return[t,t]}}function bc(e){return ue(e)}function xc(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[fc]||(e[fc]=new Set)).add(t)}function Sc(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[fc];n&&(n.delete(t),n.size||(e[fc]=void 0))}function Cc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var wc=0;function Tc(e,t,n,r){let i=e._endId=++wc,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=Ec(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u<c&&d()},s+1),e.addEventListener(l,f)}function Ec(e,t){let n=window.getComputedStyle(e),r=e=>(n[e]||``).split(`, `),i=r(`${uc}Delay`),a=r(`${uc}Duration`),o=Dc(i,a),s=r(`${dc}Delay`),c=r(`${dc}Duration`),l=Dc(s,c),u=null,d=0,f=0;t===uc?o>0&&(u=uc,d=o,f=a.length):t===dc?l>0&&(u=dc,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?uc:dc:null,f=u?u===uc?a.length:c.length:0);let p=u===uc&&/\b(?:transform|all)(?:,|$)/.test(r(`${uc}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Dc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>Oc(t)+Oc(e[n])))}function Oc(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function kc(e){return(e?e.ownerDocument:document).body.offsetHeight}function Ac(e,t,n){let r=e[fc];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var jc=Symbol(`_vod`),Mc=Symbol(`_vsh`),Nc={name:`show`,beforeMount(e,{value:t},{transition:n}){e[jc]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Pc(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Pc(e,!0),r.enter(e)):r.leave(e,()=>{Pc(e,!1)}):Pc(e,t))},beforeUnmount(e,{value:t}){Pc(e,t)}};function Pc(e,t){e.style.display=t?e[jc]:`none`,e[Mc]=!t}function Fc(){Nc.getSSRProps=({value:e})=>{if(!e)return{style:{display:`none`}}}}var Ic=Symbol(``);function Lc(e){let t=Es();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>zc(e,n))},r=()=>{let r=e(t.proxy);t.ce?zc(t.ce,r):Rc(t.subTree,r),n(r)};Ki(()=>{nr(r)}),Gi(()=>{Er(r,a,{flush:`post`});let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),Yi(()=>e.disconnect())})}function Rc(e,t){if(e.shapeFlag&128){let n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Rc(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)zc(e.el,t);else if(e.type===R)e.children.forEach(e=>Rc(e,t));else if(e.type===ns){let{el:n,anchor:r}=e;for(;n&&(zc(n,t),n!==r);)n=n.nextSibling}}function zc(e,t){if(e.nodeType===1){let n=e.style,r=``;for(let e in t){let i=ke(t[e]);n.setProperty(`--${e}`,i),r+=`--${e}: ${i};`}n[Ic]=r}}var Bc=/(?:^|;)\s*display\s*:/;function Vc(e,t,n){let r=e.style,i=y(n),a=!1;if(n&&!i){if(t)if(y(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Uc(r,t,``)}else for(let e in t)n[e]??Uc(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Uc(r,i,``):qc(e,i,!y(t)&&t?t[i]:void 0,o)||Uc(r,i,o)}}else if(i){if(t!==n){let e=r[Ic];e&&(n+=`;`+e),r.cssText=n,a=Bc.test(n)}}else t&&e.removeAttribute(`style`);jc in e&&(e[jc]=a?r.display:``,e[Mc]&&(r.display=`none`))}var Hc=/\s*!important$/;function Uc(e,t,n){if(p(n))n.forEach(n=>Uc(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Kc(e,t);Hc.test(n)?e.setProperty(ie(r),n.replace(Hc,``),`important`):e[r]=n}}var Wc=[`Webkit`,`Moz`,`ms`],Gc={};function Kc(e,t){let n=Gc[t];if(n)return n;let r=O(t);if(r!==`filter`&&r in e)return Gc[t]=r;r=ae(r);for(let n=0;n<Wc.length;n++){let i=Wc[n]+r;if(i in e)return Gc[t]=i}return t}function qc(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&y(r)&&n===r}var Jc=`http://www.w3.org/1999/xlink`;function Yc(e,t,n,r,i,a=xe(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Jc,t.slice(6,t.length)):e.setAttributeNS(Jc,t,n):n==null||a&&!Se(n)?e.removeAttribute(t):e.setAttribute(t,a?``:b(n)?String(n):n)}function Xc(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?ic(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=Se(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Zc(e,t,n,r){e.addEventListener(t,n,r)}function Qc(e,t,n,r){e.removeEventListener(t,n,r)}var $c=Symbol(`_vei`);function el(e,t,n,r,i=null){let a=e[$c]||(e[$c]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=nl(t);r?Zc(e,n,a[t]=ol(r,i),s):o&&(Qc(e,n,o,s),a[t]=void 0)}}var tl=/(?:Once|Passive|Capture)$/;function nl(e){let t;if(tl.test(e)){t={};let n;for(;n=e.match(tl);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===`:`?e.slice(3):ie(e.slice(2)),t]}var rl=0,il=Promise.resolve(),al=()=>rl||=(il.then(()=>rl=0),Date.now());function ol(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(p(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&Hn(e,t,5,a)}}else Hn(r,t,5,[e])};return n.value=e,n.attached=al(),n}var sl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,cl=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?Ac(e,r,o):t===`style`?Vc(e,n,r):s(t)?c(t)||el(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):ll(e,t,r,o))?(Xc(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Yc(e,t,r,o,a,t!==`value`)):e._isVueCE&&(ul(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!y(r)))?Xc(e,O(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Yc(e,t,r,o))};function ll(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&sl(t)&&v(n));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`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return sl(t)&&y(n)?!1:t in e}function ul(e,t){let n=e._def.props;if(!n)return!1;let r=O(t);return Array.isArray(n)?n.some(e=>O(e)===r):Object.keys(n).some(e=>O(e)===r)}var dl={};function fl(e,t,n){let r=F(e,t);E(r)&&(r=l({},r,t));class i extends hl{constructor(e){super(r,e,n)}}return i.def=r,i}var pl=((e,t)=>fl(e,t,au)),ml=typeof HTMLElement<`u`?HTMLElement:class{},hl=class e extends ml{constructor(e,t={},n=iu){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==iu?this._root=this.shadowRoot:e.shadowRoot===!1?this._root=this:(this.attachShadow(l({},e.shadowRootOptions,{mode:`open`})),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t&&=t.assignedSlot||t.parentNode||t.host;)if(t instanceof e){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,Qn(()=>{this._connected||(this._ob&&=(this._ob.disconnect(),null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&=(this._teleportTargets.clear(),void 0))})}_processMutations(e){for(let t of e)this._setAttr(t.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{this._resolved=!0,this._pendingResolve=void 0;let{props:n,styles:r}=e,i;if(n&&!p(n))for(let e in n){let t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=ue(this._props[e])),(i||=Object.create(null))[O(e)]=!0)}this._numberProps=i,this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>{t.configureApp=this._def.configureApp,e(this._def=t,!0)}):e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)f(this,e)||Object.defineProperty(this,e,{get:()=>N(t[e])})}_resolveProps(e){let{props:t}=e,n=p(t)?t:Object.keys(t||{});for(let e of Object.keys(this))e[0]!==`_`&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(O))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!this._patching)}})}_setAttr(e){if(e.startsWith(`data-v-`))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):dl,r=O(e);t&&this._numberProps&&this._numberProps[r]&&(n=ue(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(this._dirty=!0,t===dl?delete this._props[e]:(this._props[e]=t,e===`key`&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&(this._processMutations(n.takeRecords()),n.disconnect()),t===!0?this.setAttribute(ie(e),``):typeof t==`string`||typeof t==`number`?this.setAttribute(ie(e),t+``):t||this.removeAttribute(ie(e)),n&&n.observe(this,{attributes:!0})}}_update(){let e=this._createVNode();this._app&&(e.appContext=this._app._context),nu(e,this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=U(this._def,l(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,E(t[0])?l({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),ie(e)!==e&&t(ie(e),n)},this._setParent()}),t}_applyStyles(e,t,n){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let r=this._nonce,i=this.shadowRoot,a=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i),o=null;for(let s=e.length-1;s>=0;s--){let c=document.createElement(`style`);r&&c.setAttribute(`nonce`,r),c.textContent=e[s],i.insertBefore(c,o||a),o=c,s===0&&(n||this._styleAnchors.set(this._def,c),t&&this._styleAnchors.set(t,c))}}_getStyleAnchor(e){if(!e)return null;let t=this._styleAnchors.get(e);return t&&t.parentNode===this.shadowRoot?t:(t&&this._styleAnchors.delete(e),null)}_getRootStyleInsertionAnchor(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if(!(n instanceof HTMLStyleElement))return n}return null}_parseSlots(){let e=this._slots={},t;for(;t=this.firstChild;){let n=t.nodeType===1&&t.getAttribute(`slot`)||`default`;(e[n]||(e[n]=[])).push(t),this.removeChild(t)}}_renderSlots(){let e=this._getSlots(),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let r=e[n],i=r.getAttribute(`name`)||`default`,a=this._slots[i],o=r.parentNode;if(a)for(let e of a){if(t&&e.nodeType===1){let n=t+`-s`,r=document.createTreeWalker(e,1);e.setAttribute(n,``);let i;for(;i=r.nextNode();)i.setAttribute(n,``)}o.insertBefore(e,r)}else for(;r.firstChild;)o.insertBefore(r.firstChild,r);o.removeChild(r)}}_getSlots(){let e=[this];this._teleportTargets&&e.push(...this._teleportTargets);let t=new Set;for(let n of e){let e=n.querySelectorAll(`slot`);for(let n=0;n<e.length;n++)t.add(e[n])}return Array.from(t)}_injectChildStyle(e,t){this._applyStyles(e.styles,e,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(e){}};function gl(e){let t=Es();return t&&t.ce||null}function _l(){let e=gl();return e&&e.shadowRoot}function vl(e=`$style`){{let t=Es();if(!t)return r;let n=t.type.__cssModules;return n&&n[e]||r}}var yl=new WeakMap,bl=new WeakMap,xl=Symbol(`_moveCb`),Sl=Symbol(`_enterCb`),Cl=(e=>(delete e.props.mode,e))({name:`TransitionGroup`,props:l({},mc,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=Es(),r=Kr(),i,a;return qi(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!Ol(i[0].el,n.vnode.el,t)){i=[];return}i.forEach(wl),i.forEach(Tl);let r=i.filter(El);kc(n.vnode.el),r.forEach(e=>{let n=e.el,r=n.style;xc(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[xl]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[xl]=null,Sc(n,t))};n.addEventListener(`transitionend`,i)}),i=[]}),()=>{let o=an(e),s=vc(o),c=o.tag||R;if(i=[],a)for(let e=0;e<a.length;e++){let t=a[e];t.el&&t.el instanceof Element&&(i.push(t),ri(t,ei(t,s,r,n)),yl.set(t,Dl(t.el)))}a=t.default?ii(t.default()):[];for(let e=0;e<a.length;e++){let t=a[e];t.key!=null&&ri(t,ei(t,s,r,n))}return U(c,null,a)}}});function wl(e){let t=e.el;t[xl]&&t[xl](),t[Sl]&&t[Sl]()}function Tl(e){bl.set(e,Dl(e.el))}function El(e){let t=yl.get(e),n=bl.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){let t=e.el,n=t.style,a=t.getBoundingClientRect(),o=1,s=1;return t.offsetWidth&&(o=a.width/t.offsetWidth),t.offsetHeight&&(s=a.height/t.offsetHeight),(!Number.isFinite(o)||o===0)&&(o=1),(!Number.isFinite(s)||s===0)&&(s=1),Math.abs(o-1)<.01&&(o=1),Math.abs(s-1)<.01&&(s=1),n.transform=n.webkitTransform=`translate(${r/o}px,${i/s}px)`,n.transitionDuration=`0s`,e}}function Dl(e){let t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function Ol(e,t,n){let r=e.cloneNode(),i=e[fc];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=Ec(r);return a.removeChild(r),o}var kl=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return p(t)?e=>se(t,e):t};function Al(e){e.target.composing=!0}function jl(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var Ml=Symbol(`_assign`);function Nl(e,t,n){return t&&(e=e.trim()),n&&(e=le(e)),e}var Pl={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[Ml]=kl(i);let a=r||i.props&&i.props.type===`number`;Zc(e,t?`change`:`input`,t=>{t.target.composing||e[Ml](Nl(e.value,n,a))}),(n||a)&&Zc(e,`change`,()=>{e.value=Nl(e.value,n,a)}),t||(Zc(e,`compositionstart`,Al),Zc(e,`compositionend`,jl),Zc(e,`change`,jl))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Ml]=kl(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?le(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},Fl={deep:!0,created(e,t,n){e[Ml]=kl(n),Zc(e,`change`,()=>{let t=e._modelValue,n=Bl(e),r=e.checked,i=e[Ml];if(p(t)){let e=Te(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(h(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(Vl(e,r))})},mounted:Il,beforeUpdate(e,t,n){e[Ml]=kl(n),Il(e,t,n)}};function Il(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(p(t))i=Te(t,r.props.value)>-1;else if(h(t))i=t.has(r.props.value);else{if(t===n)return;i=we(t,Vl(e,!0))}e.checked!==i&&(e.checked=i)}var Ll={created(e,{value:t},n){e.checked=we(t,n.props.value),e[Ml]=kl(n),Zc(e,`change`,()=>{e[Ml](Bl(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Ml]=kl(r),t!==n&&(e.checked=we(t,r.props.value))}},Rl={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=h(t);Zc(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?le(Bl(e)):Bl(e));e[Ml](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,Qn(()=>{e._assigning=!1})}),e[Ml]=kl(r)},mounted(e,{value:t}){zl(e,t)},beforeUpdate(e,t,n){e[Ml]=kl(n)},updated(e,{value:t}){e._assigning||zl(e,t)}};function zl(e,t){let n=e.multiple,r=p(t);if(!(n&&!r&&!h(t))){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=Bl(a);if(n)if(r){let e=typeof o;e===`string`||e===`number`?a.selected=t.some(e=>String(e)===String(o)):a.selected=Te(t,o)>-1}else a.selected=t.has(o);else if(we(Bl(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Bl(e){return`_value`in e?e._value:e.value}function Vl(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var Hl={created(e,t,n){Wl(e,t,n,null,`created`)},mounted(e,t,n){Wl(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){Wl(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){Wl(e,t,n,r,`updated`)}};function Ul(e,t){switch(e){case`SELECT`:return Rl;case`TEXTAREA`:return Pl;default:switch(t){case`checkbox`:return Fl;case`radio`:return Ll;default:return Pl}}}function Wl(e,t,n,r,i){let a=Ul(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function Gl(){Pl.getSSRProps=({value:e})=>({value:e}),Ll.getSSRProps=({value:e},t)=>{if(t.props&&we(t.props.value,e))return{checked:!0}},Fl.getSSRProps=({value:e},t)=>{if(p(e)){if(t.props&&Te(e,t.props.value)>-1)return{checked:!0}}else if(h(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Hl.getSSRProps=(e,t)=>{if(typeof t.type!=`string`)return;let n=Ul(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}var Kl=[`ctrl`,`shift`,`alt`,`meta`],ql={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)=>Kl.some(n=>e[`${n}Key`]&&!t.includes(n))},Jl=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=ql[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},Yl={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},Xl=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=ie(n.key);if(t.some(e=>e===r||Yl[e]===r))return e(n)}))},Zl=l({patchProp:cl},lc),Ql,$l=!1;function eu(){return Ql||=Ao(Zl)}function tu(){return Ql=$l?Ql:jo(Zl),$l=!0,Ql}var nu=((...e)=>{eu().render(...e)}),ru=((...e)=>{tu().hydrate(...e)}),iu=((...e)=>{let t=eu().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=su(e);if(!r)return;let i=t._component;!v(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,ou(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t}),au=((...e)=>{let t=tu().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=su(e);if(t)return n(t,!0,ou(t))},t});function ou(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function su(e){return y(e)?document.querySelector(e):e}var cu=!1,lu=()=>{cu||(cu=!0,Gl(),Fc())},uu=t({BaseTransition:()=>Qr,BaseTransitionPropsValidators:()=>Jr,Comment:()=>ts,DeprecationTypes:()=>null,EffectScope:()=>je,ErrorCodes:()=>zn,ErrorTypeStrings:()=>Qs,Fragment:()=>R,KeepAlive:()=>Pi,ReactiveEffect:()=>Le,Static:()=>ns,Suspense:()=>Uo,Teleport:()=>Vr,Text:()=>es,TrackOpTypes:()=>En,Transition:()=>hc,TransitionGroup:()=>Cl,TriggerOpTypes:()=>Dn,VueElement:()=>hl,assertNumber:()=>Rn,callWithAsyncErrorHandling:()=>Hn,callWithErrorHandling:()=>Vn,camelize:()=>O,capitalize:()=>ae,cloneVNode:()=>gs,compatUtils:()=>null,compile:()=>du,computed:()=>q,createApp:()=>iu,createBlock:()=>V,createCommentVNode:()=>G,createElementBlock:()=>B,createElementVNode:()=>H,createHydrationRenderer:()=>jo,createPropsRestProxy:()=>ka,createRenderer:()=>Ao,createSSRApp:()=>au,createSlots:()=>ca,createStaticVNode:()=>_s,createTextVNode:()=>W,createVNode:()=>U,customRef:()=>vn,defineAsyncComponent:()=>ji,defineComponent:()=>F,defineCustomElement:()=>fl,defineEmits:()=>_a,defineExpose:()=>va,defineModel:()=>xa,defineOptions:()=>ya,defineProps:()=>ga,defineSSRCustomElement:()=>pl,defineSlots:()=>ba,devtools:()=>$s,effect:()=>Xe,effectScope:()=>Me,getCurrentInstance:()=>Es,getCurrentScope:()=>Ne,getCurrentWatcher:()=>jn,getTransitionRawChildren:()=>ii,guardReactiveProps:()=>hs,h:()=>Ks,handleError:()=>Un,hasInjectionContext:()=>br,hydrate:()=>ru,hydrateOnIdle:()=>wi,hydrateOnInteraction:()=>Oi,hydrateOnMediaQuery:()=>Di,hydrateOnVisible:()=>Ei,initCustomFormatter:()=>qs,initDirectivesForSSR:()=>lu,inject:()=>yr,isMemoSame:()=>Ys,isProxy:()=>rn,isReactive:()=>en,isReadonly:()=>tn,isRef:()=>ln,isRuntimeOnly:()=>zs,isShallow:()=>nn,isVNode:()=>ls,markRaw:()=>on,mergeDefaults:()=>Da,mergeModels:()=>Oa,mergeProps:()=>K,nextTick:()=>Qn,nodeOps:()=>lc,normalizeClass:()=>A,normalizeProps:()=>ye,normalizeStyle:()=>me,onActivated:()=>Ii,onBeforeMount:()=>Wi,onBeforeUnmount:()=>Ji,onBeforeUpdate:()=>Ki,onDeactivated:()=>Li,onErrorCaptured:()=>$i,onMounted:()=>Gi,onRenderTracked:()=>Qi,onRenderTriggered:()=>Zi,onScopeDispose:()=>Pe,onServerPrefetch:()=>Xi,onUnmounted:()=>Yi,onUpdated:()=>qi,onWatcherCleanup:()=>Mn,openBlock:()=>z,patchProp:()=>cl,popScopeId:()=>mr,provide:()=>vr,proxyRefs:()=>gn,pushScopeId:()=>pr,queuePostFlushCb:()=>nr,reactive:()=>Yt,readonly:()=>Zt,ref:()=>M,registerRuntimeCompiler:()=>Rs,render:()=>nu,renderList:()=>I,renderSlot:()=>L,resolveComponent:()=>na,resolveDirective:()=>aa,resolveDynamicComponent:()=>ia,resolveFilter:()=>null,resolveTransitionHooks:()=>ei,setBlockTracking:()=>ss,setDevtoolsHook:()=>ec,setTransitionHooks:()=>ri,shallowReactive:()=>Xt,shallowReadonly:()=>Qt,shallowRef:()=>un,ssrContextKey:()=>xr,ssrUtils:()=>tc,stop:()=>Ze,toDisplayString:()=>j,toHandlerKey:()=>oe,toHandlers:()=>ua,toRaw:()=>an,toRef:()=>Sn,toRefs:()=>yn,toValue:()=>mn,transformVNodeArgs:()=>ds,triggerRef:()=>pn,unref:()=>N,useAttrs:()=>wa,useCssModule:()=>vl,useCssVars:()=>Lc,useHost:()=>gl,useId:()=>ai,useModel:()=>Xa,useSSRContext:()=>Sr,useShadowRoot:()=>_l,useSlots:()=>Ca,useTemplateRef:()=>si,useTransitionState:()=>Kr,vModelCheckbox:()=>Fl,vModelDynamic:()=>Hl,vModelRadio:()=>Ll,vModelSelect:()=>Rl,vModelText:()=>Pl,vShow:()=>Nc,version:()=>Xs,warn:()=>Zs,watch:()=>Er,watchEffect:()=>Cr,watchPostEffect:()=>wr,watchSyncEffect:()=>Tr,withAsyncContext:()=>Aa,withCtx:()=>P,withDefaults:()=>Sa,withDirectives:()=>gr,withKeys:()=>Xl,withMemo:()=>Js,withModifiers:()=>Jl,withScopeId:()=>hr}),du=()=>{},fu=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},pu=e=>e===``,mu=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),hu=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),gu=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),_u=e=>{let t=gu(e);return t.charAt(0).toUpperCase()+t.slice(1)},vu={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},yu=({name:e,iconNode:t,absoluteStrokeWidth:n,"absolute-stroke-width":r,strokeWidth:i,"stroke-width":a,size:o=vu.width,color:s=vu.stroke,...c},{slots:l})=>Ks(`svg`,{...vu,...c,width:o,height:o,stroke:s,"stroke-width":pu(n)||pu(r)||n===!0||r===!0?Number(i||a||vu[`stroke-width`])*24/Number(o):i||a||vu[`stroke-width`],class:mu(`lucide`,c.class,...e?[`lucide-${hu(_u(e))}-icon`,`lucide-${hu(e)}`]:[`lucide-icon`]),...!l.default&&!fu(c)&&{"aria-hidden":`true`}},[...t.map(e=>Ks(...e)),...l.default?[l.default()]:[]]),J=(e,t)=>(n,{slots:r,attrs:i})=>Ks(yu,{...i,...n,iconNode:t,name:e},r),bu=J(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),xu=J(`asterisk`,[[`path`,{d:`M12 6v12`,key:`1vza4d`}],[`path`,{d:`M17.196 9 6.804 15`,key:`1ah31z`}],[`path`,{d:`m6.804 9 10.392 6`,key:`1b6pxd`}]]),Su=J(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),Cu=J(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),wu=J(`book-plus`,[[`path`,{d:`M12 7v6`,key:`lw1j43`}],[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}]]),Tu=J(`book-text`,[[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}],[`path`,{d:`M8 11h8`,key:`vwpz6n`}],[`path`,{d:`M8 7h6`,key:`1f0q6e`}]]),Eu=J(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),Du=J(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Ou=J(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ku=J(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Au=J(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),ju=J(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Mu=J(`circle-dot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),Nu=J(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Pu=J(`clock-alert`,[[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}],[`path`,{d:`M20 12v5`,key:`12wsvk`}],[`path`,{d:`M20 21h.01`,key:`1p6o6n`}],[`path`,{d:`M21.25 8.2A10 10 0 1 0 16 21.16`,key:`17fp9f`}]]),Fu=J(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),Iu=J(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),Lu=J(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),Ru=J(`eraser`,[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]),zu=J(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Bu=J(`file-braces`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),Vu=J(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),Hu=J(`file-down`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}],[`path`,{d:`m9 15 3 3 3-3`,key:`1npd3o`}]]),Uu=J(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Wu=J(`flag`,[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]),Gu=J(`folder-search`,[[`path`,{d:`M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1`,key:`1bw5m7`}],[`path`,{d:`m21 21-1.9-1.9`,key:`1g2n9r`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}]]),Ku=J(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),qu=J(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Ju=J(`image-off`,[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]),Yu=J(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Xu=J(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Zu=J(`languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),Qu=J(`list-filter`,[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]),$u=J(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ed=J(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),td=J(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),nd=J(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),rd=J(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),id=J(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),ad=J(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),od=J(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),sd=J(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),cd=J(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),ld=J(`ruler`,[[`path`,{d:`M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z`,key:`icamh8`}],[`path`,{d:`m14.5 12.5 2-2`,key:`inckbg`}],[`path`,{d:`m11.5 9.5 2-2`,key:`fmmyf7`}],[`path`,{d:`m8.5 6.5 2-2`,key:`vc6u1g`}],[`path`,{d:`m17.5 15.5 2-2`,key:`wo5hmg`}]]),ud=J(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),dd=J(`scan-search`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`m16 16-1.9-1.9`,key:`1dq9hf`}]]),fd=J(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),pd=J(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),md=J(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),hd=J(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),gd=J(`ship`,[[`path`,{d:`M12 10.189V14`,key:`1p8cqu`}],[`path`,{d:`M12 2v3`,key:`qbqxhf`}],[`path`,{d:`M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6`,key:`qpkstq`}],[`path`,{d:`M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76`,key:`7tigtc`}],[`path`,{d:`M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1`,key:`1924j5`}]]),_d=J(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),vd=J(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),yd=J(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),bd=J(`sticky-note`,[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]),xd=J(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Sd=J(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),Cd=J(`tags`,[[`path`,{d:`M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z`,key:`16rjxf`}],[`path`,{d:`M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193`,key:`178nd4`}],[`circle`,{cx:`10.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`12ikhr`}]]),wd=J(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Td=J(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Ed=J(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),Dd=J(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),Od=J(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),kd=J(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ad=J(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);async function Y(e){if(!e.ok)throw Error((await e.json().catch(()=>({}))).error??e.statusText);return e.json()}var jd=()=>fetch(`/api/state`).then(e=>Y(e)),Md=(e,t,n)=>fetch(`/api/keys`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({key:e,value:t,...n?{plural:n}:{}})}).then(Y),Nd=e=>fetch(`/api/keys/${encodeURIComponent(e)}`,{method:`DELETE`}).then(Y),Pd=(e,t)=>fetch(`/api/keys/bulk-clear`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({keys:e,locales:t})}).then(Y),Fd=e=>fetch(`/api/keys/bulk-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({keys:e})}).then(Y),Id=(e,t,n)=>fetch(`/api/keys/bulk-state`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({keys:e,locales:t,state:n})}).then(Y),Ld=(e,t)=>fetch(`/api/keys/bulk-meta`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({keys:e,...t})}).then(Y),Rd=(e,t)=>fetch(`/api/keys/${encodeURIComponent(e)}`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify(t)}).then(Y),zd=(e,t,n)=>fetch(`/api/keys/${encodeURIComponent(e)}/values/${encodeURIComponent(t)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({value:n})}).then(Y),Bd=(e,t,n)=>fetch(`/api/keys/${encodeURIComponent(e)}/values/${encodeURIComponent(t)}/state`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({state:n})}).then(Y),Vd=(e,t)=>fetch(`/api/keys/${encodeURIComponent(e)}/values/${encodeURIComponent(t)}`,{method:`DELETE`}).then(Y),Hd=(e,t,n)=>fetch(`/api/keys/${encodeURIComponent(e)}/plural/${encodeURIComponent(t)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({forms:n})}).then(Y),Ud=(e,t)=>fetch(`/api/keys/${encodeURIComponent(e)}/plural`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({arg:t})}).then(Y),Wd=e=>fetch(`/api/keys/${encodeURIComponent(e)}/plural`,{method:`DELETE`}).then(Y),Gd=e=>fetch(`/api/translate`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(e=>Y(e)),Kd=e=>fetch(`/api/translate/estimate`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(e=>Y(e)),qd=()=>fetch(`/api/batch/status`).then(e=>Y(e)),Jd=e=>fetch(`/api/batch/translate`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(e=>Y(e)),Yd=()=>fetch(`/api/batch/apply`,{method:`POST`}).then(e=>Y(e)),Xd=()=>fetch(`/api/batch/cancel`,{method:`POST`}).then(e=>Y(e)),Zd=()=>fetch(`/api/context/batch/status`).then(e=>Y(e)),Qd=e=>fetch(`/api/context/batch`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(e=>Y(e)),$d=()=>fetch(`/api/context/batch/apply`,{method:`POST`}).then(e=>Y(e)),ef=()=>fetch(`/api/context/batch/cancel`,{method:`POST`}).then(e=>Y(e));async function*tf(e,t,n){let r,i={};t?.length&&(i.keys=t),n?.length&&(i.locales=n);try{r=await fetch(`/api/translate/stream`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(i),signal:e})}catch(e){if(e.name===`AbortError`)return;throw e}if(!r.ok||!r.body)throw Error(r.statusText);let a=r.body.getReader(),o=new TextDecoder,s=``,c=`message`;try{for(;;){let e;try{e=await a.read()}catch(e){if(e.name===`AbortError`)return;throw e}if(e.done)break;s+=o.decode(e.value,{stream:!0});let t=s.split(`
4
+ `);s=t.pop()??``;for(let e of t){if(e.startsWith(`event:`)){c=e.slice(6).trim();continue}e.startsWith(`data:`)&&(yield{...JSON.parse(e.slice(5).trim()),type:c},c=`message`)}}}finally{a.cancel().catch(()=>{})}}async function*nf(e,t){let n;try{n=await fetch(`/api/context/build`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e),signal:t})}catch(e){if(e.name===`AbortError`)return;throw e}if(!n.ok||!n.body)throw Error(n.statusText);let r=n.body.getReader(),i=new TextDecoder,a=``,o=`message`;try{for(;;){let e;try{e=await r.read()}catch(e){if(e.name===`AbortError`)return;throw e}if(e.done)break;a+=i.decode(e.value,{stream:!0});let t=a.split(`
5
+ `);a=t.pop()??``;for(let e of t){if(e.startsWith(`event:`)){o=e.slice(6).trim();continue}if(e.startsWith(`data:`)){let t=JSON.parse(e.slice(5).trim());if(o===`error`)throw Error(t.error??`Unknown error`);yield{...t,type:o},o=`message`}}}}finally{r.cancel().catch(()=>{})}}var rf=()=>fetch(`/api/scan`,{method:`POST`}).then(e=>Y(e)),af=()=>fetch(`/api/scan`).then(e=>Y(e)),of=e=>fetch(`/api/scan/usage?key=${encodeURIComponent(e)}`).then(e=>Y(e)),sf=()=>fetch(`/api/scan/used`).then(e=>Y(e)),cf=e=>fetch(`/api/config`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(Y),lf=()=>fetch(`/api/ui-prefs`).then(e=>Y(e)),uf=e=>fetch(`/api/ui-prefs`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(Y),df=()=>fetch(`/api/local-settings`).then(e=>Y(e)),ff=e=>fetch(`/api/local-settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(Y),pf=()=>fetch(`/api/ai-profiles`).then(e=>Y(e)),mf=(e,t)=>fetch(`/api/ai-profiles/${encodeURIComponent(e)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(t)}).then(Y),hf=e=>fetch(`/api/ai-profiles/${encodeURIComponent(e)}`,{method:`DELETE`}).then(Y),gf=e=>fetch(`/api/ai-profiles/active`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:e})}).then(Y),_f=e=>fetch(`/api/dictionary`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({word:e})}).then(Y),vf=()=>fetch(`/api/glossary`).then(e=>Y(e)),yf=e=>fetch(`/api/glossary`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(Y),bf=e=>fetch(`/api/glossary/${encodeURIComponent(e)}`,{method:`DELETE`}).then(Y),xf=(e,t)=>{let n=new FormData;return n.append(`file`,t),fetch(`/api/keys/${encodeURIComponent(e)}/screenshot`,{method:`POST`,body:n}).then(Y)},Sf=e=>fetch(`/api/keys/${encodeURIComponent(e)}/screenshot`,{method:`DELETE`}).then(Y),Cf=(e,t)=>fetch(`/api/keys/${encodeURIComponent(e)}/notes`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({text:t})}).then(e=>Y(e)),wf=(e,t,n)=>fetch(`/api/keys/${encodeURIComponent(e)}/notes/${encodeURIComponent(t)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({text:n})}).then(Y),Tf=(e,t)=>fetch(`/api/keys/${encodeURIComponent(e)}/notes/${encodeURIComponent(t)}`,{method:`DELETE`}).then(Y),Ef=()=>fetch(`/api/log`).then(e=>Y(e)),Df=()=>fetch(`/api/export/preview`).then(e=>Y(e)),Of=()=>fetch(`/api/export`,{method:`POST`}).then(e=>Y(e)),kf=()=>fetch(`/api/file`).then(e=>Y(e)),Af=()=>fetch(`/api/files`).then(e=>Y(e)),jf=e=>fetch(`/api/file`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({path:e})}).then(e=>Y(e)),Mf=e=>e.length===0?Promise.resolve({issues:[],spellPending:!1}):fetch(`/api/checks?checks=${e.join(`,`)}`).then(e=>Y(e)),Nf=(e={})=>fetch(`/api/lint${e.includeSuppressed?`?includeSuppressed=1`:``}`).then(e=>Y(e)),Pf=(e,t,n)=>fetch(`/api/keys/${encodeURIComponent(e)}/suppressions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({rule:t,locale:n})}).then(Y),Ff=(e,t,n)=>fetch(`/api/keys/${encodeURIComponent(e)}/suppressions?rule=${encodeURIComponent(t)}&locale=${encodeURIComponent(n)}`,{method:`DELETE`}).then(Y),If=(e={})=>fetch(`/api/lint/accept`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(e=>Y(e)),Lf=()=>fetch(`/api/import/detect`).then(e=>Y(e)),Rf=e=>fetch(`/api/import`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(e=>Y(e)),zf=()=>fetch(`/api/sync`,{method:`POST`,headers:{"content-type":`application/json`},body:`{}`}).then(e=>Y(e)),Bf=e=>fetch(`/api/sync`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({apply:!0,...e})}).then(e=>Y(e));function Vf(e,t,n){let r=Array(e);return new Proxy(r,{get(r,i,a){if(typeof i==`string`){let a=i.charCodeAt(0);if(a>=48&&a<=57){let a=+i;if(Number.isInteger(a)&&a>=0&&a<e){let e=r[a];if(!e){let i=t[a*2];e=r[a]={index:a,key:n(a),start:i,size:t[a*2+1],end:i+t[a*2+1],lane:0}}return e}}if(i===`length`)return e}return Reflect.get(r,i,a)}})}function Hf(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return o.length!==r.length||o.some((e,t)=>r[t]!==e)?(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i):i}return o.updateDeps=e=>{r=e},o}function Uf(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var Wf=(e,t)=>Math.abs(e-t)<1.01,Gf=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},Kf,qf=()=>{if(Kf!==void 0)return Kf;if(typeof navigator>`u`)return Kf=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Kf=!0;let e=navigator.maxTouchPoints;return Kf=navigator.platform===`MacIntel`&&e!==void 0&&e>0},Jf=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Yf=e=>e,Xf=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},Zf=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(Jf(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(Jf(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},Qf={passive:!0},$f=typeof window>`u`?!0:`onscrollend`in window,ep=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&$f,o=0,s=a?null:Gf(i,()=>t(o,!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,Qf),a&&r.addEventListener(`scrollend`,u,Qf),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u)}},tp=(e,t)=>ep(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),np=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},rp=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},ip=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Yf,rangeExtractor:Xf,onChange:()=>{},measureElement:np,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=e>0?s[0]?.key??n.getItemKey(0):null,l=e>0?s[e-1]?.key??n.getItemKey(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==c||t.getItemKey(o-1)!==l)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>e&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==l)&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:i,getItemKey:a}=this.options,c=0;for(;c<i&&a(c)!==e;)c++;if(c<i){let e=n[c];if(e){let n=e.start+t;n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=Hf(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!qf()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,Qf),e.addEventListener(`touchend`,n,Qf),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(qf()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=Hf(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,n,r,i,a,o)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o}),{key:!1}),this.getMeasurements=Hf(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o},s)=>{let c=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let l=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=this.options.gap,a=e*2,o=this._flatMeasurements;if(!o||o.length<a){let e=new Float64Array(a);o&&l>0&&e.set(o.subarray(0,l*2)),o=e,this._flatMeasurements=o}let s;if(l===0)s=t+n;else{let e=l-1;s=o[e*2]+o[e*2+1]+i}for(let t=l;t<e;t++){let e=r(t),n=c.get(e),a=typeof n==`number`?n:this.options.estimateSize(t);o[t*2]=s,o[t*2+1]=a,s+=a+i}let u=Vf(e,o,r);return this.measurementsCache=u,u}let u=this.measurementsCache.slice(0,l),d=Array(a).fill(void 0);for(let e=0;e<l;e++){let t=u[e];t&&(d[t.lane]=e)}for(let i=l;i<e;i++){let e=r(i),a=this.laneAssignments.get(i),s,l,f=o===`estimate`||c.has(e);if(a!==void 0&&this.options.lanes>1){s=a;let e=d[s],r=e===void 0?void 0:u[e];l=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?u[i-1]:this.getFurthestMeasurement(u,i);l=e?e.end+this.options.gap:t+n,s=e?e.lane:i%this.options.lanes,this.options.lanes>1&&f&&this.laneAssignments.set(i,s)}let p=c.get(e),m=typeof p==`number`?p:this.options.estimateSize(i),h=l+m;u[i]={index:i,start:l,size:m,end:h,key:e,lane:s},d[s]=i}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Hf(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?op({measurements:e,outerSize:t,scrollOffset:n,lanes:r,flat:r===1&&this._flatMeasurements!=null?this._flatMeasurements:null}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Hf(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(e<0||e>=this.options.count)return;let n,r,i,a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=t-(this.itemSizeCache.get(i)??n);if(o!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,s=a?this.getTotalSize():0,c=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?r<this.getScrollOffset()+this.scrollAdjustments&&this.scrollDirection!==`backward`:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},o,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++,a?this.applyScrollAdjustment(this.getTotalSize()-s):c&&this.applyScrollAdjustment(o),this.notify(!1)}},this.getVirtualItems=Hf(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._flatMeasurements,r=this.options.lanes===1&&n!=null;return Uf(t[ap(0,t.length-1,r?e=>n[e*2]:e=>Uf(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._flatMeasurements;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){e!==0&&(qf()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&Wf(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},ap=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function op({measurements:e,outerSize:t,scrollOffset:n,lanes:r,flat:i}){let a=e.length-1,o=i?e=>i[e*2]:t=>e[t].start,s=i?e=>i[e*2]+i[e*2+1]:t=>e[t].end;if(e.length<=r)return{startIndex:0,endIndex:a};let c=ap(0,a,o,n),l=c;if(r===1)for(;l<a&&s(l)<n+t;)l++;else if(r>1){let i=Array(r).fill(0);for(;l<a&&i.some(e=>e<n+t);){let t=e[l];i[t.lane]=t.end,l++}let o=Array(r).fill(n+t);for(;c>=0&&o.some(e=>e>=n);){let t=e[c];o[t.lane]=t.start,c--}c=Math.max(0,c-c%r),l=Math.min(a,l+(r-1-l%r))}return{startIndex:c,endIndex:l}}function sp(e){let t=new ip(N(e)),n=un(t),r=t._didMount();return Er(()=>N(e).getScrollElement(),e=>{e&&t._willUpdate()},{immediate:!0}),Er(()=>N(e),e=>{t.setOptions({...e,onChange:(t,r)=>{var i;pn(n),(i=e.onChange)==null||i.call(e,t,r)}}),t._willUpdate(),pn(n)},{immediate:!0}),Pe(r),n}function cp(e){return sp(q(()=>({observeElementRect:Zf,observeElementOffset:tp,scrollToFn:rp,...N(e)})))}function lp(e,t){let n=e.values[t];return n?e.plural?(n.forms?.other??``).trim()===``:(n.value??``).trim()===``:!0}function up(e,t,n,r){return n===`missing`?r?lp(t,r):e.config.locales.some(n=>n!==e.config.sourceLocale&&lp(t,n)):r?t.values[r]?.state===n:Object.values(t.values).some(e=>e.state===n)}function dp(e){try{return new RegExp(e,`i`)}catch{return null}}function fp(e,t,n,r){let i=t.text.trim(),a=i.length>=2&&i.startsWith(`"`)&&i.endsWith(`"`)?i.slice(1,-1).toLowerCase():null,o=a===null&&i.startsWith(`^`)?dp(i):null,s=i.toLowerCase();return Object.keys(e.keys).sort().filter(c=>{let l=e.keys[c];if(t.tag&&!(l.tags??[]).includes(t.tag)||t.needsAttention&&(n?.get(c)?.length??0)===0||t.aiContextUnreviewed&&l.contextSource!==`ai`||t.emptySource&&!lp(l,e.config.sourceLocale)||t.noUsages&&r&&r.has(c)||t.skipTranslate&&!l.skipTranslate)return!1;if(t.plurality?.length){let e=l.plural?`plural`:`single`;if(!t.plurality.includes(e))return!1}if(t.states.length&&!t.states.some(n=>up(e,l,n,t.locale)))return!1;if(t.issues.length){let e=(n?.get(c)??[]).filter(e=>!t.locale||e.locale===t.locale),r=new Set(e.map(e=>e.check));if(!t.issues.some(e=>r.has(e)))return!1}if(i){if(a!==null){if(c.toLowerCase()!==a)return!1}else if(i.startsWith(`^`)){if(!o||!o.test(c))return!1}else if(!(c+` `+(l.context??``)+` `+(l.tags??[]).join(` `)+` `+Object.values(l.values).map(e=>e.value).join(` `)).toLowerCase().includes(s))return!1}return!0})}var pp=[`untranslated`,`placeholder`,`spelling`,`length`,`glossary`],mp=[`untranslated`,`placeholder`,`length`,`glossary`],hp=[`missing`,`machine`,`needs-review`,`reviewed`],gp=[`plural`,`single`],_p={untranslated:`Untranslated`,placeholder:`Placeholder mismatch`,spelling:`Spelling`,length:`Too long`,glossary:`Glossary`},vp={missing:`Missing`,machine:`Machine`,reviewed:`Reviewed`,"needs-review":`Needs review`},yp={plural:`Plural`,single:`Single`};function bp(e){let t=new Map;for(let n of e){let e=t.get(n.key);e?e.push(n):t.set(n.key,[n])}return t}var xp=[`key-asc`,`key-desc`,`created`,`updated`],Sp=[`multilingual`,`bilingual`],Cp={text:``,states:[],issues:[],plurality:[],tag:``,needsAttention:!1,emptySource:!1,aiContextUnreviewed:!1,noUsages:!1,skipTranslate:!1};function wp(e){let t=e.get(`q`)??``,n=e.get(`tag`)??``,r=(e.get(`states`)??``).split(`,`).map(e=>e.trim()).filter(e=>hp.includes(e)),i=(e.get(`issues`)??``).split(`,`).map(e=>e.trim()).filter(e=>pp.includes(e)),a=(e.get(`plurality`)??``).split(`,`).map(e=>e.trim()).filter(e=>gp.includes(e)),o=e.get(`sort`)??``,s=xp.includes(o)?o:`key-asc`,c=e.get(`view`)??``,l=Sp.includes(c)?c:`multilingual`,u=e.get(`locale`)??``;return{filter:{...Cp,text:t,tag:n,states:r,issues:i,plurality:a,needsAttention:e.get(`attention`)===`1`,emptySource:e.get(`emptySource`)===`1`,aiContextUnreviewed:e.get(`aiContext`)===`1`,noUsages:e.get(`noUsages`)===`1`,skipTranslate:e.get(`skipTranslate`)===`1`},sort:s,view:l,locale:u}}function Tp(e){let t=new URLSearchParams,{filter:n,sort:r,view:i,locale:a}=e;return n.text&&t.set(`q`,n.text),n.tag&&t.set(`tag`,n.tag),n.states.length&&t.set(`states`,n.states.join(`,`)),n.issues.length&&t.set(`issues`,n.issues.join(`,`)),n.plurality.length&&t.set(`plurality`,n.plurality.join(`,`)),n.needsAttention&&t.set(`attention`,`1`),n.emptySource&&t.set(`emptySource`,`1`),n.aiContextUnreviewed&&t.set(`aiContext`,`1`),n.noUsages&&t.set(`noUsages`,`1`),n.skipTranslate&&t.set(`skipTranslate`,`1`),r!==`key-asc`&&t.set(`sort`,r),i!==`multilingual`&&t.set(`view`,i),i===`bilingual`&&a&&t.set(`locale`,a),t}var Ep=[`editor`,`analytics`,`glossary`,`screenshots`,`settings`,`activity`,`docs`];function Dp(){let e=location.hash.replace(/^#\/?/,``),t=e.indexOf(`?`),n=t===-1?e:e.slice(0,t),r=t===-1?``:e.slice(t+1);return{route:Ep.includes(n)?n:`editor`,search:r}}var Op=M(Dp().route);window.addEventListener(`hashchange`,()=>{Op.value=Dp().route});var kp=null;function Ap(e){kp=e}function jp(e){kp&&!kp(e)||(location.hash=e)}function Mp(){return Zt(Op)}function Np(){return new URLSearchParams(Dp().search)}function Pp(e){let t=e.toString(),n=`#${Dp().route}${t?`?${t}`:``}`;history.replaceState(null,``,n)}var Fp=M(null);function Ip(e){Fp.value=e,jp(`editor`)}var Lp=M(null);function Rp(e){Lp.value=e,Ip({text:e})}function zp(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=zp(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Bp(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=zp(e))&&(r&&(r+=` `),r+=t);return r}var Vp=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Hp=Bp,Up=(e,t)=>n=>{if(t?.variants==null)return Hp(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Vp(t)||Vp(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Hp(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)};function Wp(e){return typeof e==`string`?`'${e}'`:new Gp().serialize(e)}var Gp=function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?e.localeCompare(t):n===`number`&&r===`number`?e-t:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(r,Object.entries(e))}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t?.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e}();function Kp(e,t){return e===t||Wp(e)===Wp(t)}function qp(e,t,n){let r=e.findIndex(e=>Kp(e,t)),i=e.findIndex(e=>Kp(e,n));if(r===-1||i===-1)return[];let[a,o]=[r,i].sort((e,t)=>e-t);return e.slice(a,o+1)}function Jp(e,t=-1/0,n=1/0){return Math.min(n,Math.max(t,e))}function Yp(e,t){let n=typeof e==`string`&&!t?`${e}Context`:t,r=Symbol(n);return[t=>{let n=yr(r,t);if(n||n===null)return n;throw Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`)},e=>(vr(r,e),e)]}function Xp(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Zp(e,t,n){let r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function Qp(e){return e==null}function $p(e,t){let n=un();return Cr(()=>{n.value=e()},{...t,flush:t?.flush??`sync`}),Zt(n)}function em(e,t){return Ne()?(Pe(e,t),!0):!1}function tm(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return em(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t))),clear:()=>{e.clear()}}}function nm(e){let t=!1,n,r=Me(!0);return((...i)=>(t||=(n=r.run(()=>e(...i)),!0),n))}var rm=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var im=e=>e!==void 0,am=Object.prototype.toString,om=e=>am.call(e)===`[object Object]`,sm=cm();function cm(){var e,t;return rm&&!!(!((e=window)==null||(e=e.navigator)==null)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)==null||(t=t.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function lm(e){return Array.isArray(e)?e:[e]}function um(e){return e||Es()}function dm(e){if(!rm)return e;let t=0,n,r,i=()=>{--t,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return((...a)=>(t+=1,r||(r=Me(!0),n=r.run(()=>e(...a))),em(i),n))}function fm(e){return Yt(ln(e)?new Proxy({},{get(t,n,r){return N(Reflect.get(e.value,n,r))},set(t,n,r){return ln(e.value[n])&&!ln(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}}):e)}function pm(e){return fm(q(e))}function mm(e,...t){let n=t.flat(),r=n[0];return pm(()=>Object.fromEntries(typeof r==`function`?Object.entries(yn(e)).filter(([e,t])=>!r(mn(t),e)):Object.entries(yn(e)).filter(e=>!n.includes(e[0]))))}function hm(e,t=1e4){return vn((n,r)=>{let i=mn(e),a,o=()=>setTimeout(()=>{i=mn(e),r()},mn(t));return em(()=>{clearTimeout(a)}),{get(){return n(),i},set(e){i=e,r(),clearTimeout(a),a=o()}}})}function gm(e,t){um(t)&&Ji(e,t)}function _m(e,t,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=un(!1),o;function s(){o&&=(clearTimeout(o),void 0)}function c(){a.value=!1,s()}function l(...n){i&&e(),s(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=void 0,e(...n)},mn(t))}return r&&(a.value=!0,rm&&l()),em(c),{isPending:Qt(a),start:l,stop:c}}function vm(e,t,n){return Er(e,t,{...n,immediate:!0})}var ym=rm?window:void 0;rm&&window.document,rm&&window.navigator,rm&&window.location;function bm(e){let t=mn(e);return t?.$el??t}function xm(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=q(()=>{let t=lm(mn(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return vm(()=>[n.value?.map(e=>bm(e))??[ym].filter(e=>e!=null),lm(mn(n.value?e[1]:e[0])),lm(N(n.value?e[2]:e[1])),mn(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=om(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function Sm(){let e=un(!1),t=Es();return t&&Gi(()=>{e.value=!0},t),e}function Cm(e){let t=Sm();return q(()=>(t.value,!!e()))}function wm(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Tm(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);let{target:i=ym,eventName:a=`keydown`,passive:o=!1,dedupe:s=!1}=r,c=wm(t);return xm(i,a,e=>{e.repeat&&mn(s)||c(e)&&n(e)},o)}function Em(e){return JSON.parse(JSON.stringify(e))}function Dm(e,t,n={}){let{window:r=ym,...i}=n,a,o=Cm(()=>r&&`ResizeObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=Er(q(()=>{let t=mn(e);return Array.isArray(t)?t.map(e=>bm(e)):[bm(t)]}),e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),l=()=>{s(),c()};return em(l),{isSupported:o,stop:l}}function Om(e,t,n,r={}){var i,a;let{clone:o=!1,passive:s=!1,eventName:c,deep:l=!1,defaultValue:u,shouldEmit:d}=r,f=Es(),p=n||f?.emit||(f==null||(i=f.$emit)==null?void 0:i.bind(f))||(f==null||(a=f.proxy)==null||(a=a.$emit)==null?void 0:a.bind(f?.proxy)),m=c;t||=`modelValue`,m||=`update:${t.toString()}`;let h=e=>o?typeof o==`function`?o(e):Em(e):e,g=()=>im(e[t])?h(e[t]):u,_=e=>{d?d(e)&&p(m,e):p(m,e)};if(s){let n=M(g()),r=!1;return Er(()=>e[t],e=>{r||(r=!0,n.value=h(e),Qn(()=>r=!1))}),Er(n,n=>{!r&&(n!==e[t]||l)&&_(n)},{deep:l}),n}else return q({get(){return g()},set(e){_(e)}})}function km(e){return e?e.flatMap(e=>e.type===R?km(e.children):[e]):[]}var Am=[`INPUT`,`TEXTAREA`];function jm(e,t,n,r={}){if(!t||r.enableIgnoredElement&&Am.includes(t.nodeName))return null;let{arrowKeyOptions:i=`both`,attributeName:a=`[data-reka-collection-item]`,itemsArray:o=[],loop:s=!0,dir:c=`ltr`,preventScroll:l=!0,focus:u=!1}=r,[d,f,p,m,h,g]=[e.key===`ArrowRight`,e.key===`ArrowLeft`,e.key===`ArrowUp`,e.key===`ArrowDown`,e.key===`Home`,e.key===`End`],_=p||m,v=d||f;if(!h&&!g&&(!_&&!v||i===`vertical`&&v||i===`horizontal`&&_))return null;let y=n?Array.from(n.querySelectorAll(a)):o;if(!y.length)return null;l&&e.preventDefault();let b=null;return v||_?b=Mm(y,t,{goForward:_?m:c===`ltr`?d:f,loop:s}):h?b=y.at(0)||null:g&&(b=y.at(-1)||null),u&&b?.focus(),b}function Mm(e,t,n,r=e.includes(t)?e.length:e.length+1){if(--r===0)return null;let i=e.indexOf(t),a;if(a=i===-1?n.goForward?0:e.length-1:n.goForward?i+1:i-1,!n.loop&&(a<0||a>=e.length))return null;let o=e[(a+e.length)%e.length];return o?o.hasAttribute(`disabled`)&&o.getAttribute(`disabled`)!==`false`?Mm(e,o,n,r):o:null}var[Nm,Pm]=Yp(`ConfigProvider`);function Fm(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Im(e,t,n=`.`,r){if(!Fm(t))return Im(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:Fm(a)&&Fm(i[t])?i[t]=Im(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function Lm(e){return(...t)=>t.reduce((t,n)=>Im(t,n,``,e),{})}var Rm=Lm(),zm=dm(()=>{let e=M(new Map),t=M(),n=q(()=>{for(let t of e.value.values())if(t)return!0;return!1}),r=Nm({scrollBody:M(!0)}),i=null,a=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,document.body.style.pointerEvents=``,document.documentElement.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=t.value??``,sm&&i?.(),t.value=void 0};return Er(n,(e,o)=>{if(!rm)return;if(!e){o&&a();return}t.value===void 0&&(t.value=document.body.style.overflow);let s=window.innerWidth-document.documentElement.clientWidth,c={padding:s,margin:0},l=r.scrollBody?.value?typeof r.scrollBody.value==`object`?Rm({padding:r.scrollBody.value.padding===!0?s:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?s:r.scrollBody.value.margin},c):c:{padding:0,margin:0};s>0&&(document.body.style.paddingRight=typeof l.padding==`number`?`${l.padding}px`:String(l.padding),document.body.style.marginRight=typeof l.margin==`number`?`${l.margin}px`:String(l.margin),document.documentElement.style.setProperty(`--scrollbar-width`,`${s}px`),document.body.style.overflow=`hidden`),sm&&(i=xm(document,`touchmove`,e=>Hm(e),{passive:!1})),Qn(()=>{n.value&&(document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`)})},{immediate:!0,flush:`sync`}),e});function Bm(e){let t=Math.random().toString(36).substring(2,7),n=zm();n.value.set(t,e??!1);let r=q({get:()=>n.value.get(t)??!1,set:e=>n.value.set(t,e)});return gm(()=>{n.value.delete(t)}),r}function Vm(e){let t=window.getComputedStyle(e);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&e.clientWidth<e.scrollWidth||t.overflowY===`auto`&&e.clientHeight<e.scrollHeight)return!0;{let t=e.parentNode;return!(t instanceof Element)||t.tagName===`BODY`?!1:Vm(t)}}function Hm(e){let t=e||window.event,n=t.target;return n instanceof Element&&Vm(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function Um(e){let t=M(!1);function n(){t.value=!0}function r(n){Qn(()=>{t.value=!1,e?.(n)})}return{isComposing:t,handleCompositionStart:n,handleCompositionEnd:r}}function Wm(e){let t=Nm({dir:M(`ltr`)});return q(()=>e?.value||t.dir?.value||`ltr`)}function Gm(e){let t=Es(),n=t?.type.emits,r={};return n?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),n?.forEach(t=>{r[oe(O(t))]=(...n)=>e(t,...n)}),r}function Km(e){let t=q(()=>N(e)),n=q(()=>new Intl.Collator(`en`,{usage:`search`,...t.value}));return{startsWith:(e,t)=>t.length===0?!0:(e=e.normalize(`NFC`),t=t.normalize(`NFC`),n.value.compare(e.slice(0,t.length),t)===0),endsWith:(e,t)=>t.length===0?!0:(e=e.normalize(`NFC`),t=t.normalize(`NFC`),n.value.compare(e.slice(-t.length),t)===0),contains:(e,t)=>{if(t.length===0)return!0;e=e.normalize(`NFC`),t=t.normalize(`NFC`);let r=0,i=t.length;for(;r+i<=e.length;r++){let a=e.slice(r,r+i);if(n.value.compare(t,a)===0)return!0}return!1}}}var qm=0;function Jm(){Cr(e=>{if(!rm)return;let t=document.querySelectorAll(`[data-reka-focus-guard]`);document.body.insertAdjacentElement(`afterbegin`,t[0]??Ym()),document.body.insertAdjacentElement(`beforeend`,t[1]??Ym()),qm++,e(()=>{qm===1&&document.querySelectorAll(`[data-reka-focus-guard]`).forEach(e=>e.remove()),qm--})})}function Ym(){let e=document.createElement(`span`);return e.setAttribute(`data-reka-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}function Xm(e){return q(()=>mn(e)?!!bm(e)?.closest(`form`):!0)}function Zm(){let e=Es(),t=M(),n=q(()=>r());qi(()=>{n.value!==r()&&pn(t)});function r(){return t.value&&`$el`in t.value&&[`#text`,`#comment`].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:bm(t)}let i=Object.assign({},e.exposed),a={};for(let t in e.props)Object.defineProperty(a,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(i).length>0)for(let e in i)Object.defineProperty(a,e,{enumerable:!0,configurable:!0,get:()=>i[e]});Object.defineProperty(a,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=a;function o(n){if(t.value=n,n&&(Object.defineProperty(a,"$el",{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),!(n instanceof Element)&&!Object.hasOwn(n,`$el`))){let t=n.$.exposed,r=Object.assign({},a);for(let e in t)Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>t[e]});e.exposed=r}}return{forwardRef:o,currentRef:t,currentElement:n}}function Qm(e){let t=Es(),n=Object.keys(t?.type.props??{}).reduce((e,n)=>{let r=(t?.type.props[n]).default;return r!==void 0&&(e[n]=r),e},{}),r=Sn(e);return q(()=>{let e={},i=t?.vnode.props??{};return Object.keys(i).forEach(t=>{e[O(t)]=i[t]}),Object.keys({...n,...e}).reduce((e,t)=>(r.value[t]!==void 0&&(e[t]=r.value[t]),e),{})})}function $m(e,t){let n=Qm(e),r=t?Gm(t):{};return q(()=>({...n.value,...r}))}function eh(e,t){let n=hm(!1,300);em(()=>{n.value=!1});let r=M(null),i=tm();function a(){r.value=null,n.value=!1}function o(e,t){if(!t)return;let i=e.currentTarget,a={x:e.clientX,y:e.clientY},o=nh(a,th(a,i.getBoundingClientRect()),1),s=rh(t.getBoundingClientRect());r.value=ah([...o,...s]),n.value=!0}return Cr(n=>{if(e.value&&t.value){let r=e=>o(e,t.value),i=t=>o(t,e.value);e.value.addEventListener(`pointerleave`,r),t.value.addEventListener(`pointerleave`,i),n(()=>{e.value?.removeEventListener(`pointerleave`,r),t.value?.removeEventListener(`pointerleave`,i)})}}),Cr(n=>{if(r.value){let o=n=>{if(!r.value||!(n.target instanceof Element))return;let o=n.target,s={x:n.clientX,y:n.clientY},c=e.value?.contains(o)||t.value?.contains(o),l=!ih(s,r.value),u=!!o.closest(`[data-grace-area-trigger]`);c?a():(l||u)&&(a(),i.trigger())};e.value?.ownerDocument.addEventListener(`pointermove`,o),n(()=>e.value?.ownerDocument.removeEventListener(`pointermove`,o))}}),{isPointerInTransit:n,onPointerExit:i.on}}function th(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function nh(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function rh(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function ih(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function ah(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),oh(t)}function oh(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t.at(-1),n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n.at(-1),t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var sh=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},ch=new WeakMap,lh=new WeakMap,uh={},dh=0,fh=function(e){return e&&(e.host||fh(e.parentNode))},ph=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=fh(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},mh=function(e,t,n,r){var i=ph(t,Array.isArray(e)?e:[e]);uh[n]||(uh[n]=new WeakMap);var a=uh[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(ch.get(e)||0)+1,l=(a.get(e)||0)+1;ch.set(e,c),a.set(e,l),o.push(e),c===1&&i&&lh.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),dh++,function(){o.forEach(function(e){var t=ch.get(e)-1,i=a.get(e)-1;ch.set(e,t),a.set(e,i),t||(lh.has(e)||e.removeAttribute(r),lh.delete(e)),i||e.removeAttribute(n)}),dh--,dh||(ch=new WeakMap,ch=new WeakMap,lh=new WeakMap,uh={})}},hh=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||sh(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),mh(r,i,n,`aria-hidden`)):function(){return null}};function gh(e){let t;Er(()=>bm(e),e=>{let n=!1;try{n=!!e?.closest(`[popover]:not(:popover-open)`)}catch{}e&&!n?t=hh(e):t&&t()}),Yi(()=>{t&&t()})}var _h=0;function vh(e,t=`reka`){if(e)return e;let n;return n=`useId`in uu?ai?.():Nm({useId:void 0}).useId?.()??`${++_h}`,t?`${t}-${n}`:n}function yh(){return{ALT:`Alt`,ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,BACKSPACE:`Backspace`,CAPS_LOCK:`CapsLock`,CONTROL:`Control`,DELETE:`Delete`,END:`End`,ENTER:`Enter`,ESCAPE:`Escape`,F1:`F1`,F10:`F10`,F11:`F11`,F12:`F12`,F2:`F2`,F3:`F3`,F4:`F4`,F5:`F5`,F6:`F6`,F7:`F7`,F8:`F8`,F9:`F9`,HOME:`Home`,META:`Meta`,PAGE_DOWN:`PageDown`,PAGE_UP:`PageUp`,SHIFT:`Shift`,SPACE:` `,TAB:`Tab`,CTRL:`Control`,ASTERISK:`*`,SPACE_CODE:`Space`}}function bh(e){let t=M(),n=q(()=>t.value?.width??0),r=q(()=>t.value?.height??0);return Gi(()=>{let n=bm(e);if(n){t.value={width:n.offsetWidth,height:n.offsetHeight};let e=new ResizeObserver(e=>{if(!Array.isArray(e)||!e.length)return;let r=e[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=n.offsetWidth,a=n.offsetHeight;t.value={width:i,height:a}});return e.observe(n,{box:`border-box`}),()=>e.unobserve(n)}else t.value=void 0}),{width:n,height:r}}function xh(e,t){let n=M(e);function r(e){return t[n.value][e]??n.value}return{state:n,dispatch:e=>{n.value=r(e)}}}function Sh(e){let t=hm(``,1e3);return{search:t,handleTypeaheadSearch:(n,r)=>{if(t.value+=n,e)e(n);else{let e=Xp(),n=r.map(e=>({...e,textValue:e.value?.textValue??e.ref.textContent?.trim()??``})),i=n.find(t=>t.ref===e),a=wh(n.map(e=>e.textValue),t.value,i?.textValue),o=n.find(e=>e.textValue===a);return o&&o.ref.focus(),o?.ref}},resetTypeahead:()=>{t.value=``}}}function Ch(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function wh(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Ch(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Th(e,t){let n=M({}),r=M(`none`),i=M(e),a=e.value?`mounted`:`unmounted`,o,s=t.value?.ownerDocument.defaultView??ym,{state:c,dispatch:l}=xh(a,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),u=e=>{if(rm){let n=new CustomEvent(e,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(n)}};Er(e,async(e,i)=>{let a=i!==e;if(await Qn(),a){let a=r.value,o=Eh(t.value);e?(l(`MOUNT`),u(`enter`),o===`none`&&u(`after-enter`)):o===`none`||o===`undefined`||n.value?.display===`none`?(l(`UNMOUNT`),u(`leave`),u(`after-leave`)):i&&a!==o?(l(`ANIMATION_OUT`),u(`leave`)):(l(`UNMOUNT`),u(`after-leave`))}},{immediate:!0});let d=e=>{let n=Eh(t.value),r=n.includes(CSS.escape(e.animationName)),a=c.value===`mounted`?`enter`:`leave`;if(e.target===t.value&&r&&(u(`after-${a}`),l(`ANIMATION_END`),!i.value)){let e=t.value.style.animationFillMode;t.value.style.animationFillMode=`forwards`,o=s?.setTimeout(()=>{t.value?.style.animationFillMode===`forwards`&&(t.value.style.animationFillMode=e)})}e.target===t.value&&n===`none`&&l(`ANIMATION_END`)},f=e=>{e.target===t.value&&(r.value=Eh(t.value))},p=Er(t,(e,t)=>{e?(n.value=getComputedStyle(e),e.addEventListener(`animationstart`,f),e.addEventListener(`animationcancel`,d),e.addEventListener(`animationend`,d)):(l(`ANIMATION_END`),o!==void 0&&s?.clearTimeout(o),t?.removeEventListener(`animationstart`,f),t?.removeEventListener(`animationcancel`,d),t?.removeEventListener(`animationend`,d))},{immediate:!0}),m=Er(c,()=>{let e=Eh(t.value);r.value=c.value===`mounted`?e:`none`});return Yi(()=>{p(),m()}),{isPresent:q(()=>[`mounted`,`unmountSuspended`].includes(c.value))}}function Eh(e){return e&&getComputedStyle(e).animationName||`none`}var Dh=F({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){let{present:r,forceMount:i}=yn(e),a=M(),{isPresent:o}=Th(r,a);n({present:o});let s=t.default({present:o.value});s=km(s||[]);let c=Es();if(s&&s?.length>1){let e=c?.parent?.type.name?`<${c.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${e}\` for \`Presence\` component.`,``,"Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",`You can apply a few solutions:`,["Provide a single child element so that `presence` directive attach correctly.",`Ensure the first child is an actual element instead of a raw text node or comment node.`].map(e=>` - ${e}`).join(`
6
+ `)].join(`
7
+ `))}return()=>i.value||r.value||o.value?Ks(t.default({present:o.value})[0],{ref:e=>{let t=bm(e);return t?.hasAttribute===void 0||(t?.hasAttribute(`data-reka-popper-content-wrapper`)?a.value=t.firstElementChild:a.value=t),t}}):null}}),Oh=F({name:`PrimitiveSlot`,inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;let e=km(n.default()),r=e.findIndex(e=>e.type!==ts);if(r===-1)return e;let i=e[r];delete i.props?.ref;let a=i.props?K(t,i.props):t,o=gs({...i,props:{}},a);return e.length===1?o:(e[r]=o,e)}}}),kh=[`area`,`img`,`input`],Ah=F({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&kh.includes(r)?()=>Ks(r,t):r===`template`?()=>Ks(Oh,t,{default:n.default}):()=>Ks(e.as,t,{default:n.default})}});function jh(){let e=M();return{primitiveElement:e,currentElement:q(()=>[`#text`,`#comment`].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:bm(e))}}var[Mh,Nh]=Yp(`DialogRoot`),Ph=F({inheritAttrs:!1,__name:`DialogRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=Om(n,`open`,t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=M(),a=M(),{modal:o}=yn(n);return Nh({open:r,modal:o,openModal:()=>{r.value=!0},onOpenChange:e=>{r.value=e},onOpenToggle:()=>{r.value=!r.value},contentId:``,titleId:``,descriptionId:``,triggerElement:i,contentElement:a}),(e,t)=>L(e.$slots,`default`,{open:N(r),close:()=>r.value=!1})}}),Fh=F({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;Zm();let n=Mh();return(e,r)=>(z(),V(N(Ah),K(t,{type:e.as===`button`?`button`:void 0,onClick:r[0]||=e=>N(n).onOpenChange(!1)}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`type`]))}}),Ih=`dismissableLayer.pointerDownOutside`,Lh=`dismissableLayer.focusOutside`;function Rh(e,t){if(!(t instanceof Element))return!1;let n=t.closest(`[data-dismissable-layer]`),r=e.dataset.dismissableLayer===``?e:e.querySelector(`[data-dismissable-layer]`),i=Array.from(e.ownerDocument.querySelectorAll(`[data-dismissable-layer]`));return!!(n&&(r===n||i.indexOf(r)<i.indexOf(n)))}function zh(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=M(!1),a=M(()=>{});return Cr(o=>{if(!rm||!mn(n))return;let s=async n=>{let o=n.target;if(!(!t?.value||!o)){if(Rh(t.value,o)){i.value=!1;return}if(n.target&&!i.value){let t={originalEvent:n};function i(){Zp(Ih,e,t)}n.pointerType===`touch`?(r.removeEventListener(`click`,a.value),a.value=i,r.addEventListener(`click`,a.value,{once:!0})):i()}else r.removeEventListener(`click`,a.value);i.value=!1}},c=window.setTimeout(()=>{r.addEventListener(`pointerdown`,s)},0);o(()=>{window.clearTimeout(c),r.removeEventListener(`pointerdown`,s),r.removeEventListener(`click`,a.value)})}),{onPointerDownCapture:()=>{mn(n)&&(i.value=!0)}}}function Bh(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=M(!1);return Cr(a=>{if(!rm||!mn(n))return;let o=async n=>{if(!t?.value)return;await Qn(),await Qn();let r=n.target;!t.value||!r||Rh(t.value,r)||n.target&&!i.value&&Zp(Lh,e,{originalEvent:n})};r.addEventListener(`focusin`,o),a(()=>r.removeEventListener(`focusin`,o))}),{onFocusCapture:()=>{mn(n)&&(i.value=!0)},onBlurCapture:()=>{mn(n)&&(i.value=!1)}}}var Vh=Yt({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set}),Hh=F({__name:`DismissableLayer`,props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`dismiss`],setup(e,{emit:t}){let n=e,r=t,{forwardRef:i,currentElement:a}=Zm(),o=q(()=>a.value?.ownerDocument??globalThis.document),s=q(()=>Vh.layersRoot),c=q(()=>a.value?Array.from(s.value).indexOf(a.value):-1),l=q(()=>Vh.layersWithOutsidePointerEventsDisabled.size>0),u=q(()=>{let e=Array.from(s.value),[t]=[...Vh.layersWithOutsidePointerEventsDisabled].slice(-1),n=e.indexOf(t);return c.value>=n}),d=zh(async e=>{let t=[...Vh.branches].some(t=>t?.contains(e.target));!u.value||t||(r(`pointerDownOutside`,e),r(`interactOutside`,e),await Qn(),e.defaultPrevented||r(`dismiss`))},a),f=Bh(e=>{[...Vh.branches].some(t=>t?.contains(e.target))||(r(`focusOutside`,e),r(`interactOutside`,e),e.defaultPrevented||r(`dismiss`))},a);return Tm(`Escape`,e=>{c.value===s.value.size-1&&(r(`escapeKeyDown`,e),e.defaultPrevented||r(`dismiss`))}),Cr(e=>{a.value&&(n.disableOutsidePointerEvents&&(Vh.layersWithOutsidePointerEventsDisabled.size===0&&(Vh.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents=`none`),Vh.layersWithOutsidePointerEventsDisabled.add(a.value)),s.value.add(a.value),e(()=>{n.disableOutsidePointerEvents&&Vh.layersWithOutsidePointerEventsDisabled.size===1&&!Qp(Vh.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=Vh.originalBodyPointerEvents)}))}),Cr(e=>{e(()=>{a.value&&(s.value.delete(a.value),Vh.layersWithOutsidePointerEventsDisabled.delete(a.value))})}),(e,t)=>(z(),V(N(Ah),{ref:N(i),"as-child":e.asChild,as:e.as,"data-dismissable-layer":``,style:me({pointerEvents:l.value?u.value?`auto`:`none`:void 0}),onFocusCapture:N(f).onFocusCapture,onBlurCapture:N(f).onBlurCapture,onPointerdownCapture:N(d).onPointerDownCapture},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`style`,`onFocusCapture`,`onBlurCapture`,`onPointerdownCapture`]))}}),Uh=nm(()=>M([]));function Wh(){let e=Uh();return{add(t){let n=e.value[0];t!==n&&n?.pause(),e.value=Gh(e.value,t),e.value.unshift(t)},remove(t){e.value=Gh(e.value,t),e.value[0]?.resume()}}}function Gh(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}var Kh=`focusScope.autoFocusOnMount`,qh=`focusScope.autoFocusOnUnmount`,Jh={bubbles:!1,cancelable:!0};function Yh(e,{select:t=!1}={}){let n=Xp();for(let r of e)if(tg(r,{select:t}),Xp()!==n)return!0}function Xh(e){let t=Zh(e);return[Qh(t,e),Qh(t.reverse(),e)]}function Zh(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Qh(e,t){for(let n of e)if(!$h(n,{upTo:t}))return n}function $h(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function eg(e){return e instanceof HTMLInputElement&&`select`in e}function tg(e,{select:t=!1}={}){if(e&&e.focus){let n=Xp();e.focus({preventScroll:!0}),e!==n&&eg(e)&&t&&e.select()}}var ng=F({__name:`FocusScope`,props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`mountAutoFocus`,`unmountAutoFocus`],setup(e,{emit:t}){let n=e,r=t,{currentRef:i,currentElement:a}=Zm(),o=M(null),s=Wh(),c=Yt({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});Cr(e=>{if(!rm)return;let t=a.value;if(!n.trapped)return;function r(e){if(c.paused||!t)return;let n=e.target;t.contains(n)?o.value=n:tg(o.value,{select:!0})}function i(e){if(c.paused||!t)return;let n=e.relatedTarget;n!==null&&(t.contains(n)||tg(o.value,{select:!0}))}function s(e){let n=o.value;n!==null&&e.some(e=>e.removedNodes.length>0)&&(t.contains(n)||tg(t))}document.addEventListener(`focusin`,r),document.addEventListener(`focusout`,i);let l=new MutationObserver(s);t&&l.observe(t,{childList:!0,subtree:!0}),e(()=>{document.removeEventListener(`focusin`,r),document.removeEventListener(`focusout`,i),l.disconnect()})}),Cr(async e=>{let t=a.value;if(await Qn(),!t)return;s.add(c);let n=Xp();if(!t.contains(n)){let e=new CustomEvent(Kh,Jh);t.addEventListener(Kh,e=>r(`mountAutoFocus`,e)),t.dispatchEvent(e),e.defaultPrevented||(Yh(Zh(t),{select:!0}),Xp()===n&&tg(t))}e(()=>{t.removeEventListener(Kh,e=>r(`mountAutoFocus`,e));let e=new CustomEvent(qh,Jh),i=e=>{r(`unmountAutoFocus`,e)};t.addEventListener(qh,i),t.dispatchEvent(e),t.setAttribute(`data-focus-scope-unmounting`,``),setTimeout(()=>{e.defaultPrevented||tg(n??document.body,{select:!0}),t.removeEventListener(qh,i),s.remove(c),t.removeAttribute(`data-focus-scope-unmounting`)},0)})});function l(e){if(!n.loop&&!n.trapped||c.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=Xp();if(t&&r){let t=e.currentTarget,[i,a]=Xh(t);i&&a?!e.shiftKey&&r===a?(e.preventDefault(),n.loop&&tg(i,{select:!0})):e.shiftKey&&r===i&&(e.preventDefault(),n.loop&&tg(a,{select:!0})):r===t&&e.preventDefault()}}return(e,t)=>(z(),V(N(Ah),{ref_key:`currentRef`,ref:i,tabindex:`-1`,"as-child":e.asChild,as:e.as,onKeydown:l},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`as-child`,`as`]))}}),rg=`menu.itemSelect`,ig=[`Enter`,` `],ag=[`ArrowDown`,`PageUp`,`Home`],og=[`ArrowUp`,`PageDown`,`End`],sg=[...ag,...og];[...ig],[...ig];function cg(e){return e?`open`:`closed`}function lg(e){let t=Xp();for(let n of e)if(n===t||(n.focus(),Xp()!==t))return}function ug(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function dg(e,t){return t?ug({x:e.clientX,y:e.clientY},t):!1}function fg(e){return e.pointerType===`mouse`}var pg=F({__name:`DialogContentImpl`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Mh(),{forwardRef:a,currentElement:o}=Zm();return i.titleId||=vh(void 0,`reka-dialog-title`),i.descriptionId||=vh(void 0,`reka-dialog-description`),Gi(()=>{i.contentElement=o,Xp()!==document.body&&(i.triggerElement.value=Xp())}),(e,t)=>(z(),V(N(ng),{"as-child":``,loop:``,trapped:n.trapFocus,onMountAutoFocus:t[5]||=e=>r(`openAutoFocus`,e),onUnmountAutoFocus:t[6]||=e=>r(`closeAutoFocus`,e)},{default:P(()=>[U(N(Hh),K({id:N(i).contentId,ref:N(a),as:e.as,"as-child":e.asChild,"disable-outside-pointer-events":e.disableOutsidePointerEvents,role:`dialog`,"aria-describedby":N(i).descriptionId,"aria-labelledby":N(i).titleId,"data-state":N(cg)(N(i).open.value)},e.$attrs,{onDismiss:t[0]||=e=>N(i).onOpenChange(!1),onEscapeKeyDown:t[1]||=e=>r(`escapeKeyDown`,e),onFocusOutside:t[2]||=e=>r(`focusOutside`,e),onInteractOutside:t[3]||=e=>r(`interactOutside`,e),onPointerDownOutside:t[4]||=e=>r(`pointerDownOutside`,e)}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`id`,`as`,`as-child`,`disable-outside-pointer-events`,`aria-describedby`,`aria-labelledby`,`data-state`])]),_:3},8,[`trapped`]))}}),mg=F({__name:`DialogContentModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Mh(),a=Gm(r),{forwardRef:o,currentElement:s}=Zm();return gh(s),(e,t)=>(z(),V(pg,K({...n,...N(a)},{ref:N(o),"trap-focus":N(i).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(e.preventDefault(),N(i).triggerElement.value?.focus())},onPointerDownOutside:t[1]||=e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()},onFocusOutside:t[2]||=e=>{e.preventDefault()}}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`trap-focus`]))}}),hg=F({__name:`DialogContentNonModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=Gm(t);Zm();let i=Mh(),a=M(!1),o=M(!1);return(e,t)=>(z(),V(pg,K({...n,...N(r)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(a.value||N(i).triggerElement.value?.focus(),e.preventDefault()),a.value=!1,o.value=!1},onInteractOutside:t[1]||=e=>{e.defaultPrevented||(a.value=!0,e.detail.originalEvent.type===`pointerdown`&&(o.value=!0));let t=e.target;N(i).triggerElement.value?.contains(t)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&o.value&&e.preventDefault()}}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),gg=F({__name:`DialogContent`,props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Mh(),a=Gm(r),{forwardRef:o}=Zm();return(e,t)=>(z(),V(N(Dh),{present:e.forceMount||N(i).open.value},{default:P(()=>[N(i).modal.value?(z(),V(mg,K({key:0,ref:N(o)},{...n,...N(a),...e.$attrs}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16)):(z(),V(hg,K({key:1,ref:N(o)},{...n,...N(a),...e.$attrs}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),_g=F({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;Zm();let n=Mh();return(e,r)=>(z(),V(N(Ah),K(t,{id:N(n).descriptionId}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`id`]))}}),vg=F({__name:`DialogOverlayImpl`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=Mh();return Bm(!0),Zm(),(e,n)=>(z(),V(N(Ah),{as:e.as,"as-child":e.asChild,"data-state":N(t).open.value?`open`:`closed`,style:{"pointer-events":`auto`},onPointerdown:n[0]||=Jl(()=>{},[`left`,`self`,`prevent`])},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`]))}}),yg=F({__name:`DialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=Mh(),{forwardRef:n}=Zm();return(e,r)=>N(t)?.modal.value?(z(),V(N(Dh),{key:0,present:e.forceMount||N(t).open.value},{default:P(()=>[U(vg,K(e.$attrs,{ref:N(n),as:e.as,"as-child":e.asChild}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`as`,`as-child`])]),_:3},8,[`present`])):G(`v-if`,!0)}}),bg=F({__name:`Teleport`,props:{to:{type:null,required:!1,default:`body`},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=Sm();return(e,n)=>N(t)||e.forceMount?(z(),V(Vr,{key:0,to:e.to,disabled:e.disabled,defer:e.defer},[L(e.$slots,`default`)],8,[`to`,`disabled`,`defer`])):G(`v-if`,!0)}}),xg=F({__name:`DialogPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(z(),V(N(bg),ye(hs(t)),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),Sg=F({__name:`DialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(e){let t=e,n=Mh();return Zm(),(e,r)=>(z(),V(N(Ah),K(t,{id:N(n).titleId}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`id`]))}}),Cg=`data-reka-collection-item`;function wg(e={}){let{key:t=``,isProvider:n=!1}=e,r=`${t}CollectionProvider`,i;n?(i={collectionRef:M(),itemMap:M(new Map)},vr(r,i)):i=yr(r);let a=(e=!1)=>{let t=i.collectionRef.value;if(!t)return[];let n=Array.from(t.querySelectorAll(`[${Cg}]`)),r=Array.from(i.itemMap.value.values()).sort((e,t)=>n.indexOf(e.ref)-n.indexOf(t.ref));return e?r:r.filter(e=>e.ref.dataset.disabled!==``)},o=F({name:`CollectionSlot`,inheritAttrs:!1,setup(e,{slots:t,attrs:n}){let{primitiveElement:r,currentElement:a}=jh();return Er(a,()=>{i.collectionRef.value=a.value}),()=>Ks(Oh,{ref:r,...n},t)}}),s=F({name:`CollectionItem`,inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(e,{slots:t,attrs:n}){let{primitiveElement:r,currentElement:a}=jh();return Cr(t=>{if(a.value){let n=on(a.value);i.itemMap.value.set(n,{ref:a.value,value:e.value}),t(()=>i.itemMap.value.delete(n))}}),()=>Ks(Oh,{...n,[Cg]:``,ref:r},t)}});return{getItems:a,reactiveItems:q(()=>Array.from(i.itemMap.value.values())),itemMapSize:q(()=>i.itemMap.value.size),CollectionSlot:o,CollectionItem:s}}var Tg=F({__name:`VisuallyHidden`,props:{feature:{type:String,required:!1,default:`focusable`},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){return(e,t)=>(z(),V(N(Ah),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature===`focusable`?`true`:void 0,"data-hidden":e.feature===`fully-hidden`?``:void 0,tabindex:e.feature===`fully-hidden`?`-1`:void 0,style:{position:`absolute`,border:0,width:`1px`,height:`1px`,padding:0,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,clipPath:`inset(50%)`,whiteSpace:`nowrap`,wordWrap:`normal`,top:`-1px`,left:`-1px`}},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-hidden`,`data-hidden`,`tabindex`]))}}),Eg=F({inheritAttrs:!1,__name:`VisuallyHiddenInputBubble`,props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:`fully-hidden`}},setup(e){let t=e,{primitiveElement:n,currentElement:r}=jh();return Er(q(()=>t.checked??t.value),(e,t)=>{if(!r.value)return;let n=r.value,i=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(i,`value`).set;if(a&&e!==t){let t=new Event(`input`,{bubbles:!0}),r=new Event(`change`,{bubbles:!0});a.call(n,e),n.dispatchEvent(t),n.dispatchEvent(r)}}),(e,r)=>(z(),V(Tg,K({ref_key:`primitiveElement`,ref:n},{...t,...e.$attrs},{as:`input`}),null,16))}}),Dg=F({inheritAttrs:!1,__name:`VisuallyHiddenInput`,props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:`fully-hidden`}},setup(e){let t=e,n=q(()=>typeof t.value==`object`&&Array.isArray(t.value)&&t.value.length===0&&t.required),r=q(()=>typeof t.value==`string`||typeof t.value==`number`||typeof t.value==`boolean`||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value==`object`&&Array.isArray(t.value)?t.value.flatMap((e,n)=>typeof e==`object`?Object.entries(e).map(([e,r])=>({name:`${t.name}[${n}][${e}]`,value:r})):{name:`${t.name}[${n}]`,value:e}):t.value!==null&&typeof t.value==`object`&&!Array.isArray(t.value)?Object.entries(t.value).map(([e,n])=>({name:`${t.name}[${e}]`,value:n})):[]);return(e,i)=>(z(),B(R,null,[G(` We render single input if it's required `),n.value?(z(),V(Eg,K({key:e.name},{...t,...e.$attrs},{name:e.name,value:e.value}),null,16,[`name`,`value`])):(z(!0),B(R,{key:1},I(r.value,n=>(z(),V(Eg,K({key:n.name},{ref_for:!0},{...t,...e.$attrs},{name:n.name,value:n.value}),null,16,[`name`,`value`]))),128))],2112))}});function Og(e,t,n){return e===void 0?!1:Array.isArray(e)?e.some(e=>kg(e,t,n)):kg(e,t,n)}function kg(e,t,n){return e===void 0||t===void 0?!1:typeof e==`string`?e===t:typeof n==`function`?n(e,t):typeof n==`string`?e?.[n]===t?.[n]:Kp(e,t)}var Ag=`rovingFocusGroup.onEntryFocus`,jg={bubbles:!1,cancelable:!0},Mg={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Ng(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Pg(e,t,n){let r=Ng(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Mg[r]}function Fg(e,t=!1){let n=Xp();for(let r of e)if(r===n||(r.focus({preventScroll:t}),Xp()!==n))return}function Ig(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var[Lg,Rg]=Yp(`ListboxRoot`),zg=F({__name:`ListboxRoot`,props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:`vertical`},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1,default:`toggle`},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`highlight`,`entryFocus`,`leave`],setup(e,{expose:t,emit:n}){let r=e,i=n,{multiple:a,highlightOnHover:o,orientation:s,disabled:c,selectionBehavior:l,dir:u}=yn(r),{getItems:d}=wg({isProvider:!0}),{handleTypeaheadSearch:f}=Sh(),{primitiveElement:p,currentElement:m}=jh(),h=yh(),g=Wm(u),_=Xm(m),v=M(),y=M(!1),b=M(!0),x=Om(r,`modelValue`,i,{defaultValue:r.defaultValue??(a.value?[]:void 0),passive:r.modelValue===void 0,deep:!0});function S(e){if(y.value=!0,r.multiple){let t=Array.isArray(x.value)?[...x.value]:[],n=t.findIndex(t=>kg(t,e,r.by));r.selectionBehavior===`toggle`?(n===-1?t.push(e):t.splice(n,1),x.value=t):(x.value=[e],v.value=e)}else r.selectionBehavior===`toggle`&&kg(x.value,e,r.by)?x.value=void 0:x.value=e;setTimeout(()=>{y.value=!1},1)}let C=M(null),w=M(null),T=M(!1),E=M(!1),D=tm(),ee=tm(),te=tm();function ne(){return d().map(e=>e.ref).filter(e=>e.dataset.disabled!==``)}function O(e,t=!0,n){e&&(C.value=e,(n??b.value)&&C.value.focus(),t&&C.value.scrollIntoView({block:`nearest`}),i(`highlight`,d().find(t=>t.ref===e)))}function re(e){if(T.value)te.trigger(e);else{let t=d().find(t=>kg(t.value,e,r.by));t&&(C.value=t.ref,O(t.ref))}}function ie(e){C.value&&C.value.isConnected&&(e.preventDefault(),e.stopPropagation(),E.value||C.value.click())}function ae(e){if(b.value){if(y.value=!0,T.value)ee.trigger(e);else{let t=e.altKey||e.ctrlKey||e.metaKey;if(t&&e.key===`a`&&a.value){let t=d();x.value=[...t.map(e=>e.value)],e.preventDefault();let n=t.at(-1);n&&O(n.ref)}else if(!t){let t=f(e.key,d());t&&O(t)}}setTimeout(()=>{y.value=!1},1)}}function oe(){E.value=!0}function k(){Qn(()=>{E.value=!1})}function se(){Qn(()=>{ue(new KeyboardEvent(`keydown`,{key:`PageUp`}))})}function ce(e){let t=C.value;t?.isConnected&&(w.value=t),C.value=null,i(`leave`,e)}function le(e){let t=new CustomEvent(`listbox.entryFocus`,{bubbles:!1,cancelable:!0});if(e.currentTarget?.dispatchEvent(t),i(`entryFocus`,t),!t.defaultPrevented)if(w.value)O(w.value);else{let e=ne()?.[0];O(e)}}function ue(e){let t=Pg(e,s.value,g.value);if(!t)return;let n=ne();if(C.value){if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let e=n.indexOf(C.value);n=n.slice(e+1)}de(e,n[0])}if(n.length){let e=!C.value&&t===`prev`?n.length-1:0;O(n[e])}if(T.value)return ee.trigger(e)}function de(e,t){if(!(T.value||r.selectionBehavior!==`replace`||!a.value||!Array.isArray(x.value))&&!((e.altKey||e.ctrlKey||e.metaKey)&&!e.shiftKey)&&e.shiftKey){let n=d().filter(e=>e.ref.dataset.disabled!==``),r=n.find(e=>e.ref===t)?.value;if(e.key===h.END?r=n.at(-1)?.value:e.key===h.HOME&&(r=n[0]?.value),!r||!v.value)return;x.value=qp(n.map(e=>e.value),v.value,r)}}async function fe(e,t=!0){if(rm)if(await Qn(),T.value)D.trigger(e);else{let e=ne(),n=e.find(e=>e.dataset.state===`checked`),r=t?void 0:!1;n?O(n,t,r):e.length&&O(e[0],t,r)}}let pe=!1;return Er(x,()=>{if(!y.value){let e=pe;pe=!0,Qn(()=>{fe(void 0,e)})}},{immediate:!0,deep:!0}),t({highlightedElement:C,highlightItem:re,highlightFirstItem:se,highlightSelected:fe,getItems:d}),Rg({modelValue:x,onValueChange:S,multiple:a,orientation:s,dir:g,disabled:c,highlightOnHover:o,highlightedElement:C,isVirtual:T,virtualFocusHook:D,virtualKeydownHook:ee,virtualHighlightHook:te,by:r.by,firstValue:v,selectionBehavior:l,focusable:b,onLeave:ce,onEnter:le,changeHighlight:O,onKeydownEnter:ie,onKeydownNavigation:ue,onKeydownTypeAhead:ae,onCompositionStart:oe,onCompositionEnd:k,highlightFirstItem:se}),(e,t)=>(z(),V(N(Ah),{ref_key:`primitiveElement`,ref:p,as:e.as,"as-child":e.asChild,dir:N(g),"data-disabled":N(c)?``:void 0,onPointerleave:ce,onFocusout:t[0]||=async e=>{let t=e.relatedTarget||e.target;await Qn(),C.value&&N(m)&&!N(m).contains(t)&&ce(e)}},{default:P(()=>[L(e.$slots,`default`,{modelValue:N(x)}),N(_)&&e.name?(z(),V(N(Dg),{key:0,name:e.name,value:N(x),disabled:N(c),required:e.required},null,8,[`name`,`value`,`disabled`,`required`])):G(`v-if`,!0)]),_:3},8,[`as`,`as-child`,`dir`,`data-disabled`]))}}),Bg=F({__name:`ListboxContent`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let{CollectionSlot:t}=wg(),n=Lg(),r=hm(!1,10);return(e,i)=>(z(),V(N(t),null,{default:P(()=>[U(N(Ah),{role:`listbox`,as:e.as,"as-child":e.asChild,tabindex:N(n).focusable.value?N(n).highlightedElement.value?`-1`:`0`:`-1`,"aria-orientation":N(n).orientation.value,"aria-multiselectable":!!N(n).multiple.value,"data-orientation":N(n).orientation.value,onMousedown:i[0]||=Jl(e=>r.value=!0,[`left`]),onFocus:i[1]||=e=>{N(r)||N(n).onEnter(e)},onKeydown:[i[2]||=Xl(e=>{N(n).orientation.value===`vertical`&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)||N(n).orientation.value===`horizontal`&&(e.key===`ArrowUp`||e.key===`ArrowDown`)||(e.preventDefault(),N(n).focusable.value&&N(n).onKeydownNavigation(e))},[`down`,`up`,`left`,`right`,`home`,`end`]),Xl(N(n).onKeydownEnter,[`enter`]),N(n).onKeydownTypeAhead]},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`tabindex`,`aria-orientation`,`aria-multiselectable`,`data-orientation`,`onKeydown`])]),_:3}))}}),Vg=F({__name:`ListboxFilter`,props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=Om(n,`modelValue`,t,{defaultValue:``,passive:n.modelValue===void 0}),i=Lg(),{primitiveElement:a,currentElement:o}=jh(),s=q(()=>n.disabled||i.disabled.value||!1),c=M();Tr(()=>c.value=i.highlightedElement.value?.id),Gi(()=>{i.focusable.value=!1,setTimeout(()=>{n.autoFocus&&o.value?.focus()},1)}),Yi(()=>{i.focusable.value=!0});let{isComposing:l,handleCompositionStart:u,handleCompositionEnd:d}=Um(e=>{r.value=e.target.value,i.onCompositionEnd(),i.highlightFirstItem()});function f(){i.onCompositionStart(),u()}function p(e){l.value||(r.value=e.target.value,i.highlightFirstItem())}function m(e){l.value||(e.preventDefault(),i.onKeydownNavigation(e))}function h(e){l.value||i.onKeydownEnter(e)}return(e,t)=>(z(),V(N(Ah),{ref_key:`primitiveElement`,ref:a,as:e.as,"as-child":e.asChild,value:N(r),disabled:s.value?``:void 0,"data-disabled":s.value?``:void 0,"aria-disabled":s.value??void 0,"aria-activedescendant":c.value,type:`text`,onKeydown:[Xl(m,[`down`,`up`,`home`,`end`]),Xl(h,[`enter`])],onInput:p,onCompositionstart:f,onCompositionend:N(d)},{default:P(()=>[L(e.$slots,`default`,{modelValue:N(r)})]),_:3},8,[`as`,`as-child`,`value`,`disabled`,`data-disabled`,`aria-disabled`,`aria-activedescendant`,`onCompositionend`]))}}),Hg=`listbox.select`,[Ug,Wg]=Yp(`ListboxItem`),Gg=F({__name:`ListboxItem`,props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=vh(void 0,`reka-listbox-item`),{CollectionItem:a}=wg(),{forwardRef:o,currentElement:s}=Zm(),c=Lg(),l=q(()=>s.value!=null&&s.value===c.highlightedElement.value),u=q(()=>Og(c.modelValue.value,n.value,c.by)),d=q(()=>c.disabled.value||n.disabled);async function f(e){r(`select`,e),!e?.defaultPrevented&&!d.value&&e&&(c.onValueChange(n.value),c.changeHighlight(s.value))}function p(e){Zp(Hg,f,{originalEvent:e,value:n.value})}return Wg({isSelected:u}),(e,t)=>(z(),V(N(a),{value:e.value},{default:P(()=>[Js([l.value,u.value,d.value,N(c).focusable.value],()=>U(N(Ah),K({id:N(i)},e.$attrs,{ref:N(o),role:`option`,tabindex:N(c).focusable.value?l.value?`0`:`-1`:-1,"aria-selected":u.value,as:e.as,"as-child":e.asChild,disabled:d.value?``:void 0,"data-disabled":d.value?``:void 0,"data-highlighted":l.value?``:void 0,"data-state":u.value?`checked`:`unchecked`,onClick:p,onKeydown:Xl(Jl(p,[`prevent`]),[`space`]),onPointermove:t[0]||=()=>{N(c).highlightedElement.value!==N(s)&&N(c).highlightOnHover.value&&N(c).changeHighlight(N(s),!1,!1)}}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`id`,`tabindex`,`aria-selected`,`as`,`as-child`,`disabled`,`data-disabled`,`data-highlighted`,`data-state`,`onKeydown`]),t,1)]),_:3},8,[`value`]))}}),Kg=F({__name:`ListboxItemIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e;Zm();let n=Ug();return(e,r)=>N(n).isSelected.value?(z(),V(N(Ah),K({key:0,"aria-hidden":`true`},t),{default:P(()=>[L(e.$slots,`default`)]),_:3},16)):G(`v-if`,!0)}}),[qg,Jg]=Yp(`PopperRoot`),Yg=F({inheritAttrs:!1,__name:`PopperRoot`,setup(e){let t=M();return Jg({anchor:t,onAnchorChange:e=>t.value=e}),(e,t)=>L(e.$slots,`default`)}}),Xg=F({__name:`PopperAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{forwardRef:n,currentElement:r}=Zm(),i=qg();return wr(()=>{i.onAnchorChange(t.reference??r.value)}),(e,t)=>(z(),V(N(Ah),{ref:N(n),as:e.as,"as-child":e.asChild},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`as`,`as-child`]))}});function Zg(e){return e!==null}function Qg(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=$g(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function $g(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var e_=[`top`,`right`,`bottom`,`left`],t_=Math.min,n_=Math.max,r_=Math.round,i_=Math.floor,a_=e=>({x:e,y:e}),o_={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function s_(e,t,n){return n_(e,t_(t,n))}function c_(e,t){return typeof e==`function`?e(t):e}function l_(e){return e.split(`-`)[0]}function u_(e){return e.split(`-`)[1]}function d_(e){return e===`x`?`y`:`x`}function f_(e){return e===`y`?`height`:`width`}function p_(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function m_(e){return d_(p_(e))}function h_(e,t,n){n===void 0&&(n=!1);let r=u_(e),i=m_(e),a=f_(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=w_(o)),[o,w_(o)]}function g_(e){let t=w_(e);return[__(e),t,__(t)]}function __(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var v_=[`left`,`right`],y_=[`right`,`left`],b_=[`top`,`bottom`],x_=[`bottom`,`top`];function S_(e,t,n){switch(e){case`top`:case`bottom`:return n?t?y_:v_:t?v_:y_;case`left`:case`right`:return t?b_:x_;default:return[]}}function C_(e,t,n,r){let i=u_(e),a=S_(l_(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(__)))),a}function w_(e){let t=l_(e);return o_[t]+e.slice(t.length)}function T_(e){return{top:0,right:0,bottom:0,left:0,...e}}function E_(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:T_(e)}function D_(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function O_(e,t,n){let{reference:r,floating:i}=e,a=p_(t),o=m_(t),s=f_(o),c=l_(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(u_(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function k_(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=c_(t,e),p=E_(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=D_(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=D_(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var A_=50,j_=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:k_},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=O_(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<A_&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=O_(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},M_=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=c_(e,t)||{};if(l==null)return{};let d=E_(u),f={x:n,y:r},p=m_(i),m=f_(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=t_(d[_],T),D=t_(d[v],T),ee=E,te=C-h[m]-D,ne=C/2-h[m]/2+w,O=s_(ee,ne,te),re=!c.arrow&&u_(i)!=null&&ne!==O&&a.reference[m]/2-(ne<ee?E:D)-h[m]/2<0,ie=re?ne<ee?ne-ee:ne-te:0;return{[p]:f[p]+ie,data:{[p]:O,centerOffset:ne-O-ie,...re&&{alignmentOffset:ie}},reset:re}}}),N_=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=c_(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=l_(r),_=p_(o),v=l_(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[w_(o)]:g_(o)),x=p!==`none`;!d&&x&&b.push(...C_(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=h_(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==p_(t))||T.every(e=>p_(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=p_(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function P_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function F_(e){return e_.some(t=>e[t]>=0)}var I_=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=c_(e,t);switch(i){case`referenceHidden`:{let e=P_(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:F_(e)}}}case`escaped`:{let e=P_(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:F_(e)}}}default:return{}}}}},L_=new Set([`left`,`top`]);async function R_(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=l_(n),s=u_(n),c=p_(n)===`y`,l=L_.has(o)?-1:1,u=a&&c?-1:1,d=c_(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var z_=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await R_(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},B_=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=c_(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=p_(l_(i)),p=d_(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=s_(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=s_(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},V_=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=c_(e,t),u={x:n,y:r},d=p_(i),f=d_(d),p=u[f],m=u[d],h=c_(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=L_.has(l_(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},H_=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=c_(e,t),u=await o.detectOverflow(t,l),d=l_(i),f=u_(i),p=p_(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=t_(h-u[g],v),x=t_(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=n_(u.left,0),t=n_(u.right,0),n=n_(u.top,0),r=n_(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:n_(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:n_(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function U_(){return typeof window<`u`}function W_(e){return q_(e)?(e.nodeName||``).toLowerCase():`#document`}function G_(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function K_(e){return((q_(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function q_(e){return U_()?e instanceof Node||e instanceof G_(e).Node:!1}function J_(e){return U_()?e instanceof Element||e instanceof G_(e).Element:!1}function Y_(e){return U_()?e instanceof HTMLElement||e instanceof G_(e).HTMLElement:!1}function X_(e){return!U_()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof G_(e).ShadowRoot}function Z_(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=cv(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Q_(e){return/^(table|td|th)$/.test(W_(e))}function $_(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ev=/transform|translate|scale|rotate|perspective|filter/,tv=/paint|layout|strict|content/,nv=e=>!!e&&e!==`none`,rv;function iv(e){let t=J_(e)?cv(e):e;return nv(t.transform)||nv(t.translate)||nv(t.scale)||nv(t.rotate)||nv(t.perspective)||!ov()&&(nv(t.backdropFilter)||nv(t.filter))||ev.test(t.willChange||``)||tv.test(t.contain||``)}function av(e){let t=uv(e);for(;Y_(t)&&!sv(t);){if(iv(t))return t;if($_(t))return null;t=uv(t)}return null}function ov(){return rv??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),rv}function sv(e){return/^(html|body|#document)$/.test(W_(e))}function cv(e){return G_(e).getComputedStyle(e)}function lv(e){return J_(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uv(e){if(W_(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||X_(e)&&e.host||K_(e);return X_(t)?t.host:t}function dv(e){let t=uv(e);return sv(t)?e.ownerDocument?e.ownerDocument.body:e.body:Y_(t)&&Z_(t)?t:dv(t)}function fv(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=dv(e),i=r===e.ownerDocument?.body,a=G_(r);if(i){let e=pv(a);return t.concat(a,a.visualViewport||[],Z_(r)?r:[],e&&n?fv(e):[])}else return t.concat(r,fv(r,[],n))}function pv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mv(e){let t=cv(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Y_(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=r_(n)!==a||r_(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function hv(e){return J_(e)?e:e.contextElement}function gv(e){let t=hv(e);if(!Y_(t))return a_(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=mv(t),o=(a?r_(n.width):n.width)/r,s=(a?r_(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var _v=a_(0);function vv(e){let t=G_(e);return!ov()||!t.visualViewport?_v:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==G_(e)?!1:t}function bv(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=hv(e),o=a_(1);t&&(r?J_(r)&&(o=gv(r)):o=gv(e));let s=yv(a,n,r)?vv(a):a_(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=G_(a),t=r&&J_(r)?G_(r):r,n=e,i=pv(n);for(;i&&r&&t!==n;){let e=gv(i),t=i.getBoundingClientRect(),r=cv(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=G_(i),i=pv(n)}}return D_({width:u,height:d,x:c,y:l})}function xv(e,t){let n=lv(e).scrollLeft;return t?t.left+n:bv(K_(e)).left+n}function Sv(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-xv(e,n),y:n.top+t.scrollTop}}function Cv(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=K_(r),s=t?$_(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=a_(1),u=a_(0),d=Y_(r);if((d||!d&&!a)&&((W_(r)!==`body`||Z_(o))&&(c=lv(r)),d)){let e=bv(r);l=gv(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Sv(o,c):a_(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function wv(e){return Array.from(e.getClientRects())}function Tv(e){let t=K_(e),n=lv(e),r=e.ownerDocument.body,i=n_(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=n_(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+xv(e),s=-n.scrollTop;return cv(r).direction===`rtl`&&(o+=n_(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Ev=25;function Dv(e,t){let n=G_(e),r=K_(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=ov();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=xv(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Ev&&(a-=o)}else l<=Ev&&(a+=l);return{width:a,height:o,x:s,y:c}}function Ov(e,t){let n=bv(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Y_(e)?gv(e):a_(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function kv(e,t,n){let r;if(t===`viewport`)r=Dv(e,n);else if(t===`document`)r=Tv(K_(e));else if(J_(t))r=Ov(t,n);else{let n=vv(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return D_(r)}function Av(e,t){let n=uv(e);return n===t||!J_(n)||sv(n)?!1:cv(n).position===`fixed`||Av(n,t)}function jv(e,t){let n=t.get(e);if(n)return n;let r=fv(e,[],!1).filter(e=>J_(e)&&W_(e)!==`body`),i=null,a=cv(e).position===`fixed`,o=a?uv(e):e;for(;J_(o)&&!sv(o);){let t=cv(o),n=iv(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Z_(o)&&!n&&Av(e,o))?r=r.filter(e=>e!==o):i=t,o=uv(o)}return t.set(e,r),r}function Mv(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?$_(t)?[]:jv(t,this._c):[].concat(n),r],o=kv(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=kv(t,a[e],i);s=n_(n.top,s),c=t_(n.right,c),l=t_(n.bottom,l),u=n_(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Nv(e){let{width:t,height:n}=mv(e);return{width:t,height:n}}function Pv(e,t,n){let r=Y_(t),i=K_(t),a=n===`fixed`,o=bv(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=a_(0);function l(){c.x=xv(i)}if(r||!r&&!a)if((W_(t)!==`body`||Z_(i))&&(s=lv(t)),r){let e=bv(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Sv(i,s):a_(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Fv(e){return cv(e).position===`static`}function Iv(e,t){if(!Y_(e)||cv(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return K_(e)===n&&(n=n.ownerDocument.body),n}function Lv(e,t){let n=G_(e);if($_(e))return n;if(!Y_(e)){let t=uv(e);for(;t&&!sv(t);){if(J_(t)&&!Fv(t))return t;t=uv(t)}return n}let r=Iv(e,t);for(;r&&Q_(r)&&Fv(r);)r=Iv(r,t);return r&&sv(r)&&Fv(r)&&!iv(r)?n:r||av(e)||n}var Rv=async function(e){let t=this.getOffsetParent||Lv,n=this.getDimensions,r=await n(e.floating);return{reference:Pv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zv(e){return cv(e).direction===`rtl`}var Bv={convertOffsetParentRelativeRectToViewportRelativeRect:Cv,getDocumentElement:K_,getClippingRect:Mv,getOffsetParent:Lv,getElementRects:Rv,getClientRects:wv,getDimensions:Nv,getScale:gv,isElement:J_,isRTL:zv};function Vv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hv(e,t){let n=null,r,i=K_(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=i_(d),h=i_(i.clientWidth-(u+f)),g=i_(i.clientHeight-(d+p)),_=i_(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:n_(0,t_(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Vv(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Uv(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=hv(e),u=i||a?[...l?fv(l):[],...t?fv(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Hv(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?bv(e):null;c&&g();function g(){let t=bv(e);h&&!Vv(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Wv=z_,Gv=B_,Kv=N_,qv=H_,Jv=I_,Yv=M_,Xv=V_,Zv=(e,t,n)=>{let r=new Map,i={platform:Bv,...n},a={...i.platform,_c:r};return j_(e,t,{...i,platform:a})};function Qv(e){return typeof e==`object`&&!!e&&`$el`in e}function $v(e){if(Qv(e)){let t=e.$el;return q_(t)&&W_(t)===`#comment`?null:t}return e}function ey(e){return typeof e==`function`?e():N(e)}function ty(e){return{name:`arrow`,options:e,fn(t){let n=$v(ey(e.element));return n==null?{}:Yv({element:n,padding:e.padding}).fn(t)}}}function ny(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ry(e,t){let n=ny(e);return Math.round(t*n)/n}function iy(e,t,n){n===void 0&&(n={});let r=n.whileElementsMounted,i=q(()=>ey(n.open)??!0),a=q(()=>ey(n.middleware)),o=q(()=>ey(n.placement)??`bottom`),s=q(()=>ey(n.strategy)??`absolute`),c=q(()=>ey(n.transform)??!0),l=q(()=>$v(e.value)),u=q(()=>$v(t.value)),d=M(0),f=M(0),p=M(s.value),m=M(o.value),h=un({}),g=M(!1),_=q(()=>{let e={position:p.value,left:`0`,top:`0`};if(!u.value)return e;let t=ry(u.value,d.value),n=ry(u.value,f.value);return c.value?{...e,transform:`translate(`+t+`px, `+n+`px)`,...ny(u.value)>=1.5&&{willChange:`transform`}}:{position:p.value,left:t+`px`,top:n+`px`}}),v;function y(){if(l.value==null||u.value==null)return;let e=i.value;Zv(l.value,u.value,{middleware:a.value,placement:o.value,strategy:s.value}).then(t=>{d.value=t.x,f.value=t.y,p.value=t.strategy,m.value=t.placement,h.value=t.middlewareData,g.value=e!==!1})}function b(){typeof v==`function`&&(v(),v=void 0)}function x(){if(b(),r===void 0){y();return}if(l.value!=null&&u.value!=null){v=r(l.value,u.value,y);return}}function S(){i.value||(g.value=!1)}return Er([a,o,s,i],y,{flush:`sync`}),Er([l,u],x,{flush:`sync`}),Er(i,S,{flush:`sync`}),Ne()&&Pe(b),{x:Qt(d),y:Qt(f),strategy:Qt(p),placement:Qt(m),middlewareData:Qt(h),isPositioned:Qt(g),floatingStyles:_,update:y}}var ay={side:`bottom`,sideOffset:0,sideFlip:!0,align:`center`,alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:`partial`,hideWhenDetached:!1,positionStrategy:`fixed`,updatePositionStrategy:`optimized`,prioritizePosition:!1},[oy,sy]=Yp(`PopperContent`),cy=F({inheritAttrs:!1,__name:`PopperContent`,props:Da({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...ay}),emits:[`placed`],setup(e,{emit:t}){let n=e,r=t,i=qg(),{forwardRef:a,currentElement:o}=Zm(),s=M(),c=M(),{width:l,height:u}=bh(c),d=q(()=>n.side+(n.align===`center`?``:`-${n.align}`)),f=q(()=>typeof n.collisionPadding==`number`?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),p=q(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),m=q(()=>({padding:f.value,boundary:p.value.filter(Zg),altBoundary:p.value.length>0})),h=q(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),g=$p(()=>[Wv({mainAxis:n.sideOffset+u.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&Kv({...m.value,...h.value}),n.avoidCollisions&&Gv({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky===`partial`?Xv():void 0,...m.value}),!n.prioritizePosition&&n.avoidCollisions&&Kv({...m.value,...h.value}),qv({...m.value,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--reka-popper-available-width`,`${n}px`),o.setProperty(`--reka-popper-available-height`,`${r}px`),o.setProperty(`--reka-popper-anchor-width`,`${i}px`),o.setProperty(`--reka-popper-anchor-height`,`${a}px`)}}),c.value&&ty({element:c.value,padding:n.arrowPadding}),Qg({arrowWidth:l.value,arrowHeight:u.value}),n.hideWhenDetached&&Jv({strategy:`referenceHidden`,...m.value})]),{floatingStyles:_,placement:v,isPositioned:y,middlewareData:b,update:x}=iy(q(()=>n.reference??i.anchor.value),s,{strategy:n.positionStrategy,placement:d,whileElementsMounted:(...e)=>Uv(...e,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy===`always`}),middleware:g}),S=q(()=>$g(v.value)[0]),C=q(()=>$g(v.value)[1]);wr(()=>{y.value&&r(`placed`)});let w=q(()=>{let e=b.value.arrow?.centerOffset!==0;return n.hideShiftedArrow&&e}),T=M(``);return Cr(()=>{o.value&&(T.value=window.getComputedStyle(o.value).zIndex)}),sy({placedSide:S,onArrowChange:e=>c.value=e,arrowX:q(()=>b.value.arrow?.x??0),arrowY:q(()=>b.value.arrow?.y??0),shouldHideArrow:w}),(e,t)=>(z(),B(`div`,{ref_key:`floatingRef`,ref:s,"data-reka-popper-content-wrapper":``,style:me({...N(_),transform:N(y)?N(_).transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:T.value,"--reka-popper-transform-origin":[N(b).transformOrigin?.x,N(b).transformOrigin?.y].join(` `),...N(b).hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}})},[U(N(Ah),K({ref:N(a)},e.$attrs,{"as-child":n.asChild,as:e.as,"data-side":S.value,"data-align":C.value,style:{animation:N(y)?void 0:`none`}}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`as-child`,`as`,`data-side`,`data-align`,`style`])],4))}}),[ly,uy]=Yp(`ComboboxRoot`),dy=F({__name:`ComboboxRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},openOnFocus:{type:Boolean,required:!1,default:!1},openOnClick:{type:Boolean,required:!1,default:!1},ignoreFilter:{type:Boolean,required:!1},resetModelValueOnClear:{type:Boolean,required:!1,default:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`highlight`,`update:open`],setup(e,{expose:t,emit:n}){let r=e,i=n,{primitiveElement:a,currentElement:o}=jh(),{multiple:s,disabled:c,ignoreFilter:l,resetSearchTermOnSelect:u,openOnFocus:d,openOnClick:f,dir:p,resetModelValueOnClear:m,highlightOnHover:h}=yn(r),g=Wm(p),_=Om(r,`modelValue`,i,{defaultValue:r.defaultValue??(s.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),v=Om(r,`open`,i,{defaultValue:r.defaultOpen,passive:r.open===void 0});async function y(e){v.value=e,te.value=``,e?(await Qn(),a.value?.highlightSelected(),x.value=!0,C.value?.focus()):(x.value=!1,setTimeout(()=>{!e&&r.resetSearchTermOnBlur&&b.trigger()},1))}let b=tm(),x=M(!1),S=M(!1),C=M(),w=M(),T=q(()=>a.value?.highlightedElement??void 0),E=M(new Map),D=M(new Map),{contains:ee}=Km({sensitivity:`base`}),te=M(``),ne=q(e=>{if(!te.value||r.ignoreFilter||S.value)return{count:E.value.size,items:e?.items??new Map,groups:e?.groups??new Set(D.value.keys())};let t=0,n=new Map,i=new Set;for(let[e,r]of E.value){let i=ee(r,te.value);n.set(e,+!!i),i&&t++}for(let[e,t]of D.value)for(let r of t)if(n.get(r)>0){i.add(e);break}return{count:t,items:n,groups:i}}),O=Es();return Gi(()=>{O?.exposed&&(O.exposed.highlightItem=a.value?.highlightItem,O.exposed.highlightFirstItem=a.value?.highlightFirstItem,O.exposed.highlightSelected=a.value?.highlightSelected)}),t({filtered:ne,highlightedElement:T,highlightItem:a.value?.highlightItem,highlightFirstItem:a.value?.highlightFirstItem,highlightSelected:a.value?.highlightSelected}),uy({modelValue:_,multiple:s,disabled:c,open:v,onOpenChange:y,contentId:``,isUserInputted:x,isVirtual:S,inputElement:C,highlightedElement:T,onInputElementChange:e=>C.value=e,triggerElement:w,onTriggerElementChange:e=>w.value=e,parentElement:o,resetSearchTermOnSelect:u,onResetSearchTerm:b.on,allItems:E,allGroups:D,filterSearch:te,filterState:ne,ignoreFilter:l,openOnFocus:d,openOnClick:f,resetModelValueOnClear:m}),(e,t)=>(z(),V(N(Yg),null,{default:P(()=>[U(N(zg),K({ref_key:`primitiveElement`,ref:a},e.$attrs,{modelValue:N(_),"onUpdate:modelValue":t[0]||=e=>ln(_)?_.value=e:null,style:{pointerEvents:N(v)?`auto`:void 0},as:e.as,"as-child":e.asChild,dir:N(g),multiple:N(s),name:e.name,required:e.required,disabled:N(c),"highlight-on-hover":N(h),by:r.by,onHighlight:t[1]||=e=>i(`highlight`,e)}),{default:P(()=>[L(e.$slots,`default`,{open:N(v),modelValue:N(_)})]),_:3},16,[`modelValue`,`style`,`as`,`as-child`,`dir`,`multiple`,`name`,`required`,`disabled`,`highlight-on-hover`,`by`])]),_:3}))}}),fy=F({__name:`ComboboxAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let{forwardRef:t}=Zm();return(e,n)=>(z(),V(N(Xg),{"as-child":``,reference:e.reference},{default:P(()=>[U(N(Ah),K({ref:N(t),"as-child":e.asChild,as:e.as},e.$attrs),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`as-child`,`as`])]),_:3},8,[`reference`]))}}),[py,my]=Yp(`ComboboxContent`),hy=F({__name:`ComboboxContentImpl`,props:{position:{type:String,required:!1,default:`inline`},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(e,{emit:t}){let n=e,r=t,{position:i}=yn(n),a=ly(),o=q(()=>a.ignoreFilter.value?a.allItems.value.size===0:a.filterState.value.count===0),{forwardRef:s,currentElement:c}=Zm();Bm(n.bodyLock),Jm(),gh(a.parentElement);let l=Qm(q(()=>n.position===`popper`?n:{}).value),u={boxSizing:`border-box`,"--reka-combobox-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-combobox-content-available-width":`var(--reka-popper-available-width)`,"--reka-combobox-content-available-height":`var(--reka-popper-available-height)`,"--reka-combobox-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-combobox-trigger-height":`var(--reka-popper-anchor-height)`};my({position:i});let d=M(!1);return Gi(()=>{a.inputElement.value&&(d.value=c.value.contains(a.inputElement.value),d.value&&a.inputElement.value.focus())}),Yi(()=>{let e=Xp();d.value&&(!e||e===document.body)&&a.triggerElement.value?.focus()}),(e,t)=>(z(),V(N(Bg),{"as-child":``},{default:P(()=>[U(N(ng),{"as-child":``,onMountAutoFocus:t[5]||=Jl(()=>{},[`prevent`]),onUnmountAutoFocus:t[6]||=Jl(()=>{},[`prevent`])},{default:P(()=>[U(N(Hh),{"as-child":``,"disable-outside-pointer-events":e.disableOutsidePointerEvents,onDismiss:t[0]||=e=>N(a).onOpenChange(!1),onFocusOutside:t[1]||=e=>{N(a).parentElement.value?.contains(e.target)&&e.preventDefault(),r(`focusOutside`,e)},onInteractOutside:t[2]||=e=>r(`interactOutside`,e),onEscapeKeyDown:t[3]||=e=>r(`escapeKeyDown`,e),onPointerDownOutside:t[4]||=e=>{N(a).parentElement.value?.contains(e.target)&&e.preventDefault(),r(`pointerDownOutside`,e)}},{default:P(()=>[(z(),V(ia(N(i)===`popper`?N(cy):N(Ah)),K({...e.$attrs,...N(l)},{id:N(a).contentId,ref:N(s),"data-state":N(a).open.value?`open`:`closed`,"data-empty":o.value?``:void 0,style:{display:n.hideWhenEmpty&&o.value?`none`:`flex`,flexDirection:`column`,outline:`none`,...N(i)===`popper`?u:{}}}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`id`,`data-state`,`data-empty`,`style`]))]),_:3},8,[`disable-outside-pointer-events`])]),_:3})]),_:3}))}}),gy=F({__name:`ComboboxContent`,props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(e,{emit:t}){let n=$m(e,t),{forwardRef:r}=Zm(),i=ly();return i.contentId||=vh(void 0,`reka-combobox-content`),(e,t)=>(z(),V(N(Dh),{present:e.forceMount||N(i).open.value},{default:P(()=>[U(hy,K({...N(n),...e.$attrs},{ref:N(r)}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16)]),_:3},8,[`present`]))}}),_y=F({__name:`ComboboxEmpty`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=ly(),r=q(()=>n.ignoreFilter.value?n.allItems.value.size===0:n.filterState.value.count===0);return(e,n)=>r.value?(z(),V(N(Ah),ye(K({key:0},t)),{default:P(()=>[L(e.$slots,`default`,{},()=>[n[0]||=W(`No options`)])]),_:3},16)):G(`v-if`,!0)}}),[vy,yy]=Yp(`ComboboxGroup`),by=F({__name:`ComboboxInput`,props:{displayValue:{type:Function,required:!1},modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=ly(),a=Lg(),{primitiveElement:o,currentElement:s}=jh(),c=Om(n,`modelValue`,r,{passive:n.modelValue===void 0});Gi(()=>{s.value&&i.onInputElementChange(s.value)});let{isComposing:l,handleCompositionStart:u,handleCompositionEnd:d}=Um(e=>{let t=e.target;t&&p(t.value)});function f(e){l.value||(e.preventDefault(),i.open.value||i.onOpenChange(!0))}function p(e){i.open.value?i.filterSearch.value=e:(i.onOpenChange(!0),Qn(()=>{e&&(i.filterSearch.value=e,a.highlightFirstItem())}))}function m(e){l.value||p(e.target.value)}function h(){i.openOnFocus.value&&!i.open.value&&i.onOpenChange(!0)}function g(e){if(!i.open.value)return;let t=e.relatedTarget;if(!t)return;let n=i.parentElement.value?.contains(t),r=document.getElementById(i.contentId)?.contains(t);!n&&!r&&requestAnimationFrame(()=>{if(!i.open.value)return;let e=document.activeElement;!i.parentElement.value?.contains(e)&&!document.getElementById(i.contentId)?.contains(e)&&i.onOpenChange(!1)})}function _(){i.openOnClick.value&&!i.open.value&&i.onOpenChange(!0)}function v(){let e=i.modelValue.value;n.displayValue?c.value=n.displayValue(e):!i.multiple.value&&e&&!Array.isArray(e)?typeof e==`object`?c.value=``:c.value=e.toString():c.value=``,Qn(()=>{c.value=c.value})}return i.onResetSearchTerm(()=>{v()}),Er(i.modelValue,async()=>{!i.isUserInputted.value&&i.resetSearchTermOnSelect.value&&v()},{immediate:!0,deep:!0}),Er(i.filterState,(e,t)=>{!i.isVirtual.value&&t.count===0&&a.highlightFirstItem()}),(e,t)=>(z(),V(N(Vg),{ref_key:`primitiveElement`,ref:o,modelValue:N(c),"onUpdate:modelValue":t[0]||=e=>ln(c)?c.value=e:null,as:e.as,"as-child":e.asChild,"auto-focus":e.autoFocus,disabled:e.disabled,"aria-expanded":N(i).open.value,"aria-controls":N(i).contentId,"aria-autocomplete":`list`,role:`combobox`,autocomplete:`off`,onClick:_,onInput:m,onKeydown:Xl(f,[`down`,`up`]),onFocus:h,onBlur:g,onCompositionstart:N(u),onCompositionend:N(d)},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`modelValue`,`as`,`as-child`,`auto-focus`,`disabled`,`aria-expanded`,`aria-controls`,`onCompositionstart`,`onCompositionend`]))}}),xy=F({__name:`ComboboxItem`,props:{textValue:{type:String,required:!1},value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=vh(void 0,`reka-combobox-item`),a=ly(),o=vy(null),{primitiveElement:s,currentElement:c}=jh();if(n.value===``)throw Error(`A <ComboboxItem /> must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder.`);let l=q(()=>{if(a.isVirtual.value||a.ignoreFilter.value||!a.filterSearch.value)return!0;{let e=a.filterState.value.items.get(i);return e===void 0?!0:e>0}});return Gi(()=>{a.allItems.value.set(i,n.textValue||c.value.textContent||c.value.innerText);let e=o?.id;e&&(a.allGroups.value.has(e)?a.allGroups.value.get(e)?.add(i):a.allGroups.value.set(e,new Set([i])))}),Yi(()=>{a.allItems.value.delete(i)}),(e,t)=>l.value?(z(),V(N(Gg),K({key:0},n,{id:N(i),ref_key:`primitiveElement`,ref:s,disabled:N(a).disabled.value||e.disabled,onSelect:t[0]||=t=>{r(`select`,t),!t.defaultPrevented&&(!N(a).multiple.value&&!e.disabled&&!N(a).disabled.value?(t.preventDefault(),N(a).onOpenChange(!1),N(a).modelValue.value=n.value):N(a).multiple.value&&N(a).inputElement.value?.focus())}}),{default:P(()=>[L(e.$slots,`default`,{},()=>[W(j(e.value),1)])]),_:3},16,[`id`,`disabled`])):G(`v-if`,!0)}}),Sy=F({__name:`ComboboxItemIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e;return(e,n)=>(z(),V(N(Kg),ye(hs(t)),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),Cy=F({__name:`ComboboxPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(z(),V(N(bg),ye(hs(t)),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),wy=F({__name:`ComboboxTrigger`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,{forwardRef:n,currentElement:r}=Zm(),i=ly(),a=q(()=>t.disabled||i.disabled.value||!1);return Gi(()=>{r.value&&i.onTriggerElementChange(r.value)}),(e,r)=>(z(),V(N(Ah),K(t,{ref:N(n),type:e.as===`button`?`button`:void 0,tabindex:`-1`,"aria-label":`Show popup`,"aria-haspopup":`listbox`,"aria-expanded":N(i).open.value,"aria-controls":N(i).contentId,"data-state":N(i).open.value?`open`:`closed`,disabled:a.value,"data-disabled":a.value?``:void 0,"aria-disabled":a.value??void 0,onClick:r[0]||=e=>N(i).onOpenChange(!N(i).open.value)}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`type`,`aria-expanded`,`aria-controls`,`data-state`,`disabled`,`data-disabled`,`aria-disabled`]))}});function Ty(e){let t=Nm({nonce:M()});return q(()=>e?.value||t.nonce?.value)}var Ey=F({__name:`ComboboxViewport`,props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{forwardRef:n}=Zm(),{nonce:r}=yn(t),i=Ty(r),a=ly();return(e,r)=>(z(),B(R,null,[U(N(Ah),K({...e.$attrs,...t},{ref:N(n),"data-reka-combobox-viewport":``,role:`presentation`,style:{position:`relative`,flex:N(a).isVirtual.value?void 0:1,overflow:`auto`}}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`style`]),U(N(Ah),{as:`style`,nonce:N(i)},{default:P(()=>r[0]||=[W(` /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-combobox-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-combobox-viewport]::-webkit-scrollbar { display: none; } `)]),_:1,__:[0]},8,[`nonce`])],64))}}),[Dy,Oy]=Yp(`RovingFocusGroup`),ky=F({__name:`RovingFocusGroup`,props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`entryFocus`,`update:currentTabStopId`],setup(e,{expose:t,emit:n}){let r=e,i=n,{loop:a,orientation:o,dir:s}=yn(r),c=Wm(s),l=Om(r,`currentTabStopId`,i,{defaultValue:r.defaultCurrentTabStopId,passive:r.currentTabStopId===void 0}),u=M(!1),d=M(!1),f=M(0),{getItems:p,CollectionSlot:m}=wg({isProvider:!0});function h(e){let t=!d.value;if(e.currentTarget&&e.target===e.currentTarget&&t&&!u.value){let t=new CustomEvent(Ag,jg);if(e.currentTarget.dispatchEvent(t),i(`entryFocus`,t),!t.defaultPrevented){let e=p().map(e=>e.ref).filter(e=>e.dataset.disabled!==``);Fg([e.find(e=>e.getAttribute(`data-active`)===``),e.find(e=>e.getAttribute(`data-highlighted`)===``),e.find(e=>e.id===l.value),...e].filter(Boolean),r.preventScrollOnEntryFocus)}}d.value=!1}function g(){setTimeout(()=>{d.value=!1},1)}return t({getItems:p}),Oy({loop:a,dir:c,orientation:o,currentTabStopId:l,onItemFocus:e=>{l.value=e},onItemShiftTab:()=>{u.value=!0},onFocusableItemAdd:()=>{f.value++},onFocusableItemRemove:()=>{f.value--}}),(e,t)=>(z(),V(N(m),null,{default:P(()=>[U(N(Ah),{tabindex:u.value||f.value===0?-1:0,"data-orientation":N(o),as:e.as,"as-child":e.asChild,dir:N(c),style:{outline:`none`},onMousedown:t[0]||=e=>d.value=!0,onMouseup:g,onFocus:h,onBlur:t[1]||=e=>u.value=!1},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`tabindex`,`data-orientation`,`as`,`as-child`,`dir`])]),_:3}))}}),Ay=F({__name:`RovingFocusItem`,props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,n=Dy(),r=vh(),i=q(()=>t.tabStopId||r),a=q(()=>n.currentTabStopId.value===i.value),{getItems:o,CollectionItem:s}=wg();Gi(()=>{t.focusable&&n.onFocusableItemAdd()}),Yi(()=>{t.focusable&&n.onFocusableItemRemove()});function c(e){if(e.key===`Tab`&&e.shiftKey){n.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let r=Pg(e,n.orientation.value,n.dir.value);if(r!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||!t.allowShiftKey&&e.shiftKey)return;e.preventDefault();let i=[...o().map(e=>e.ref).filter(e=>e.dataset.disabled!==``)];if(r===`last`)i.reverse();else if(r===`prev`||r===`next`){r===`prev`&&i.reverse();let t=i.indexOf(e.currentTarget);i=n.loop.value?Ig(i,t+1):i.slice(t+1)}Qn(()=>Fg(i))}}return(e,t)=>(z(),V(N(s),null,{default:P(()=>[U(N(Ah),{tabindex:a.value?0:-1,"data-orientation":N(n).orientation.value,"data-active":e.active?``:void 0,"data-disabled":e.focusable?void 0:``,as:e.as,"as-child":e.asChild,onMousedown:t[0]||=t=>{e.focusable?N(n).onItemFocus(i.value):t.preventDefault()},onFocus:t[1]||=e=>N(n).onItemFocus(i.value),onKeydown:c},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`tabindex`,`data-orientation`,`data-active`,`data-disabled`,`as`,`as-child`])]),_:3}))}}),jy=F({__name:`MenuAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return(e,n)=>(z(),V(N(Xg),ye(hs(t)),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}});function My(){let e=M(!1);return Gi(()=>{xm(`keydown`,()=>{e.value=!0},{capture:!0,passive:!0}),xm([`pointerdown`,`pointermove`],()=>{e.value=!1},{capture:!0,passive:!0})}),e}var Ny=dm(My),[Py,Fy]=Yp([`MenuRoot`,`MenuSub`],`MenuContext`),[Iy,Ly]=Yp(`MenuRoot`),Ry=F({__name:`MenuRoot`,props:{open:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,{modal:i,dir:a}=yn(n),o=Wm(a),s=Om(n,`open`,r),c=M(),l=Ny();return Fy({open:s,onOpenChange:e=>{s.value=e},content:c,onContentChange:e=>{c.value=e}}),Ly({onClose:()=>{s.value=!1},isUsingKeyboardRef:l,dir:o,modal:i}),(e,t)=>(z(),V(N(Yg),null,{default:P(()=>[L(e.$slots,`default`)]),_:3}))}}),[zy,By]=Yp(`MenuContent`),Vy=F({__name:`MenuContentImpl`,props:Da({loop:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},disableOutsideScroll:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...ay}),emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`,`dismiss`],setup(e,{emit:t}){let n=e,r=t,i=Py(),a=Iy(),{trapFocus:o,disableOutsidePointerEvents:s,loop:c}=yn(n);Jm(),Bm(s.value);let l=M(``),u=M(0),d=M(0),f=M(null),p=M(`right`),m=M(0),h=M(null),g=M(),{forwardRef:_,currentElement:v}=Zm(),{handleTypeaheadSearch:y}=Sh(),b=M();function x(e){let t=jm(e,b.value||Xp(),v.value,{loop:c.value,arrowKeyOptions:`vertical`,dir:a?.dir.value,focus:!1,attributeName:`[data-reka-collection-item]:not([data-disabled])`});t&&(b.value=t,t.scrollIntoView({block:`nearest`}))}function S(){b.value&&b.value.click()}let C=M(),w=M();Er(b,e=>{w.value&&(e===void 0||e!==w.value.trigger.value)&&(w.value.onOpenChange(!1),w.value=void 0)}),Er(v,e=>{i.onContentChange(e)}),Yi(()=>{window.clearTimeout(u.value)});function T(e){return p.value===f.value?.side&&dg(e,f.value?.area)}async function E(e){r(`openAutoFocus`,e),!e.defaultPrevented&&(e.preventDefault(),v.value?.focus({preventScroll:!0}))}function D(e){if(e.defaultPrevented)return;let t=e.target,n=t.closest(`[data-reka-menu-content]`)===e.currentTarget,r=[`input`,`textarea`].includes(t.tagName.toLowerCase()),i=e.ctrlKey||e.altKey||e.metaKey,o=e.key.length===1,s=jm(e,Xp(),v.value,{loop:c.value,arrowKeyOptions:`vertical`,dir:a?.dir.value,focus:!0,attributeName:`[data-reka-collection-item]:not([data-disabled])`});if(s)return s?.focus();if(e.code===`Space`)return;let l=g.value?.getItems()??[];if(n&&(e.key===`Tab`&&e.preventDefault(),!i&&o&&!r&&y(e.key,l)),e.target!==v.value||!sg.includes(e.key))return;e.preventDefault();let u=[...l.map(e=>e.ref)];og.includes(e.key)&&u.reverse(),lg(u)}function ee(e){e?.currentTarget?.contains?.(e.target)||(window.clearTimeout(u.value),l.value=``)}function te(e){if(!fg(e))return;let t=e.target,n=m.value!==e.clientX;(e?.currentTarget)?.contains(t)&&n&&(p.value=e.clientX>m.value?`right`:`left`,m.value=e.clientX)}function ne(e){fg(e)&&C.value&&C.value.focus()}return By({onItemEnter:e=>!!T(e),onItemLeave:e=>T(e)?!0:([`INPUT`,`TEXTAREA`].includes(Xp()?.tagName||``)||v.value?.focus(),h.value=null,!1),onTriggerLeave:e=>!!T(e),searchRef:l,highlightedElement:b,onKeydownNavigation:x,onKeydownEnter:S,filterElement:C,onFilterElementChange:e=>{C.value=e},activeSubmenuContext:w,pointerGraceTimerRef:d,onPointerGraceIntentChange:e=>{f.value=e}}),(e,t)=>(z(),V(N(ng),{"as-child":``,trapped:N(o),onMountAutoFocus:E,onUnmountAutoFocus:t[7]||=e=>r(`closeAutoFocus`,e)},{default:P(()=>[U(N(Hh),{"as-child":``,"disable-outside-pointer-events":N(s),onEscapeKeyDown:t[2]||=e=>r(`escapeKeyDown`,e),onPointerDownOutside:t[3]||=e=>r(`pointerDownOutside`,e),onFocusOutside:t[4]||=e=>r(`focusOutside`,e),onInteractOutside:t[5]||=e=>r(`interactOutside`,e),onDismiss:t[6]||=e=>r(`dismiss`)},{default:P(()=>[U(N(ky),{ref_key:`rovingFocusGroupRef`,ref:g,"current-tab-stop-id":h.value,"onUpdate:currentTabStopId":t[0]||=e=>h.value=e,"as-child":``,orientation:`vertical`,dir:N(a).dir.value,loop:N(c),onEntryFocus:t[1]||=e=>{r(`entryFocus`,e),N(a).isUsingKeyboardRef.value||e.preventDefault()}},{default:P(()=>[U(N(cy),{ref:N(_),role:`menu`,as:e.as,"as-child":e.asChild,"aria-orientation":`vertical`,"data-reka-menu-content":``,"data-state":N(cg)(N(i).open.value),dir:N(a).dir.value,side:e.side,"side-offset":e.sideOffset,align:e.align,"align-offset":e.alignOffset,"avoid-collisions":e.avoidCollisions,"collision-boundary":e.collisionBoundary,"collision-padding":e.collisionPadding,"arrow-padding":e.arrowPadding,"prioritize-position":e.prioritizePosition,"position-strategy":e.positionStrategy,"update-position-strategy":e.updatePositionStrategy,sticky:e.sticky,"hide-when-detached":e.hideWhenDetached,reference:e.reference,onKeydown:D,onBlur:ee,onPointermove:te,onPointerenter:ne},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`,`dir`,`side`,`side-offset`,`align`,`align-offset`,`avoid-collisions`,`collision-boundary`,`collision-padding`,`arrow-padding`,`prioritize-position`,`position-strategy`,`update-position-strategy`,`sticky`,`hide-when-detached`,`reference`])]),_:3},8,[`current-tab-stop-id`,`dir`,`loop`])]),_:3},8,[`disable-outside-pointer-events`])]),_:3},8,[`trapped`]))}}),Hy=F({inheritAttrs:!1,__name:`MenuItemImpl`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=zy(),{forwardRef:r,currentElement:i}=Zm(),{CollectionItem:a}=wg(),o=M(!1),s=q(()=>o.value||i.value!=null&&n.highlightedElement.value===i.value);async function c(e){if(!(e.defaultPrevented||!fg(e))){if(t.disabled)n.onItemLeave(e);else if(!n.onItemEnter(e)){let t=e.currentTarget;n.highlightedElement.value=t,[`INPUT`,`TEXTAREA`].includes(Xp()?.tagName||``)||t.focus({preventScroll:!0})}}}async function l(e){await Qn(),!e.defaultPrevented&&fg(e)&&n.highlightedElement.value===i.value&&!n.onItemLeave(e)&&n.highlightedElement.value===i.value&&(n.highlightedElement.value=void 0)}return(e,t)=>(z(),V(N(a),{value:{textValue:e.textValue}},{default:P(()=>[U(N(Ah),K({ref:N(r),role:`menuitem`,tabindex:`-1`},e.$attrs,{as:e.as,"as-child":e.asChild,"aria-disabled":e.disabled||void 0,"data-disabled":e.disabled?``:void 0,"data-highlighted":s.value?``:void 0,onPointermove:c,onPointerleave:l,onFocus:t[0]||=async t=>{await Qn(),!(t.defaultPrevented||e.disabled)&&(o.value=!0,N(n).highlightedElement.value=t.currentTarget)},onBlur:t[1]||=async e=>{await Qn(),!e.defaultPrevented&&(o.value=!1)}}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`as`,`as-child`,`aria-disabled`,`data-disabled`,`data-highlighted`])]),_:3},8,[`value`]))}}),Uy=F({__name:`MenuItem`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,{forwardRef:i,currentElement:a}=Zm(),o=Iy(),s=zy(),c=M(!1);async function l(){let e=a.value;if(!n.disabled&&e){let e=new CustomEvent(rg,{bubbles:!0,cancelable:!0});r(`select`,e),await Qn(),e.defaultPrevented?c.value=!1:o.onClose()}}return(e,t)=>(z(),V(Hy,K(n,{ref:N(i),onClick:l,onPointerdown:t[0]||=()=>{c.value=!0},onPointerup:t[1]||=async e=>{await Qn(),!e.defaultPrevented&&(c.value||e.currentTarget?.click())},onKeydown:t[2]||=async t=>{let n=N(s).searchRef.value!==``;e.disabled||n&&t.key===` `||N(ig).includes(t.key)&&(t.currentTarget?.click(),t.preventDefault())}}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),Wy=F({__name:`MenuRootContentModal`,props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=$m(n,r),a=Py(),{forwardRef:o,currentElement:s}=Zm();return gh(s),(e,t)=>(z(),V(Vy,K(N(i),{ref:N(o),"trap-focus":N(a).open.value,"disable-outside-pointer-events":N(a).open.value,"disable-outside-scroll":!0,onDismiss:t[0]||=e=>N(a).onOpenChange(!1),onFocusOutside:t[1]||=Jl(e=>r(`focusOutside`,e),[`prevent`])}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`trap-focus`,`disable-outside-pointer-events`]))}}),Gy=F({__name:`MenuRootContentNonModal`,props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=$m(e,t),r=Py();return(e,t)=>(z(),V(Vy,K(N(n),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:t[0]||=e=>N(r).onOpenChange(!1)}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),Ky=F({__name:`MenuContent`,props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=$m(e,t),r=Py(),i=Iy();return(e,t)=>(z(),V(N(Dh),{present:e.forceMount||N(r).open.value},{default:P(()=>[N(i).modal.value?(z(),V(Wy,ye(K({key:0},{...e.$attrs,...N(n)})),{default:P(()=>[L(e.$slots,`default`)]),_:3},16)):(z(),V(Gy,ye(K({key:1},{...e.$attrs,...N(n)})),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),[qy,Jy]=Yp(`MenuGroup`),Yy=F({__name:`MenuLabel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},setup(e){let t=e,n=qy({id:``});return(e,r)=>(z(),V(N(Ah),K(t,{id:N(n).id||void 0}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`id`]))}}),Xy=F({__name:`MenuPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(z(),V(N(bg),ye(hs(t)),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),Zy=F({__name:`MenuSeparator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return(e,n)=>(z(),V(N(Ah),K(t,{role:`separator`,"aria-orientation":`horizontal`}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),[Qy,$y]=Yp(`PopoverRoot`),eb=F({__name:`PopoverRoot`,props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,{modal:i}=yn(n),a=Om(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0});return $y({contentId:``,triggerId:``,modal:i,open:a,onOpenChange:e=>{a.value=e},onOpenToggle:()=>{a.value=!a.value},triggerElement:M(),hasCustomAnchor:M(!1)}),(e,t)=>(z(),V(N(Yg),null,{default:P(()=>[L(e.$slots,`default`,{open:N(a),close:()=>a.value=!1})]),_:3}))}}),tb=F({__name:`PopoverContentImpl`,props:{trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Qm(mm(n,`trapFocus`,`disableOutsidePointerEvents`)),{forwardRef:a}=Zm(),o=Qy();return Jm(),(e,t)=>(z(),V(N(ng),{"as-child":``,loop:``,trapped:e.trapFocus,onMountAutoFocus:t[5]||=e=>r(`openAutoFocus`,e),onUnmountAutoFocus:t[6]||=e=>r(`closeAutoFocus`,e)},{default:P(()=>[U(N(Hh),{"as-child":``,"disable-outside-pointer-events":e.disableOutsidePointerEvents,onPointerDownOutside:t[0]||=e=>r(`pointerDownOutside`,e),onInteractOutside:t[1]||=e=>r(`interactOutside`,e),onEscapeKeyDown:t[2]||=e=>r(`escapeKeyDown`,e),onFocusOutside:t[3]||=e=>r(`focusOutside`,e),onDismiss:t[4]||=e=>N(o).onOpenChange(!1)},{default:P(()=>[U(N(cy),K(N(i),{id:N(o).contentId,ref:N(a),"data-state":N(o).open.value?`open`:`closed`,"aria-labelledby":N(o).triggerId,style:{"--reka-popover-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-popover-content-available-width":`var(--reka-popper-available-width)`,"--reka-popover-content-available-height":`var(--reka-popper-available-height)`,"--reka-popover-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-popover-trigger-height":`var(--reka-popper-anchor-height)`},role:`dialog`}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`id`,`data-state`,`aria-labelledby`])]),_:3},8,[`disable-outside-pointer-events`])]),_:3},8,[`trapped`]))}}),nb=F({__name:`PopoverContentModal`,props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Qy(),a=M(!1);Bm(!0);let o=$m(n,r),{forwardRef:s,currentElement:c}=Zm();return gh(c),(e,t)=>(z(),V(tb,K(N(o),{ref:N(s),"trap-focus":N(i).open.value,"disable-outside-pointer-events":``,onCloseAutoFocus:t[0]||=Jl(e=>{r(`closeAutoFocus`,e),a.value||N(i).triggerElement.value?.focus()},[`prevent`]),onPointerDownOutside:t[1]||=e=>{r(`pointerDownOutside`,e);let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.value=t.button===2||n},onFocusOutside:t[2]||=Jl(()=>{},[`prevent`])}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`trap-focus`]))}}),rb=F({__name:`PopoverContentNonModal`,props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Qy(),a=M(!1),o=M(!1),s=$m(n,r);return(e,t)=>(z(),V(tb,K(N(s),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:t[0]||=e=>{r(`closeAutoFocus`,e),e.defaultPrevented||(a.value||N(i).triggerElement.value?.focus(),e.preventDefault()),a.value=!1,o.value=!1},onInteractOutside:t[1]||=async e=>{r(`interactOutside`,e),e.defaultPrevented||(a.value=!0,e.detail.originalEvent.type===`pointerdown`&&(o.value=!0));let t=e.target;N(i).triggerElement.value?.contains(t)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&o.value&&e.preventDefault()}}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),ib=F({__name:`PopoverContent`,props:{forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Qy(),a=$m(n,r),{forwardRef:o}=Zm();return i.contentId||=vh(void 0,`reka-popover-content`),(e,t)=>(z(),V(N(Dh),{present:e.forceMount||N(i).open.value},{default:P(()=>[N(i).modal.value?(z(),V(nb,K({key:0},N(a),{ref:N(o)}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16)):(z(),V(rb,K({key:1},N(a),{ref:N(o)}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),ab=F({__name:`PopoverPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(z(),V(N(bg),ye(hs(t)),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),ob=F({__name:`PopoverTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=Qy(),{forwardRef:r,currentElement:i}=Zm();return n.triggerId||=vh(void 0,`reka-popover-trigger`),Gi(()=>{n.triggerElement.value=i.value}),(e,i)=>(z(),V(ia(N(n).hasCustomAnchor.value?N(Ah):N(Xg)),{"as-child":``},{default:P(()=>[U(N(Ah),{id:N(n).triggerId,ref:N(r),type:e.as===`button`?`button`:void 0,"aria-haspopup":`dialog`,"aria-expanded":N(n).open.value,"aria-controls":N(n).contentId,"data-state":N(n).open.value?`open`:`closed`,as:e.as,"as-child":t.asChild,onClick:N(n).onOpenToggle},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`id`,`type`,`aria-expanded`,`aria-controls`,`data-state`,`as`,`as-child`,`onClick`])]),_:3}))}}),[sb,cb]=Yp(`DropdownMenuRoot`),lb=F({__name:`DropdownMenuRoot`,props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t;Zm();let i=Om(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),a=M(),{modal:o,dir:s}=yn(n),c=Wm(s);return cb({open:i,onOpenChange:e=>{i.value=e},onOpenToggle:()=>{i.value=!i.value},triggerId:``,triggerElement:a,contentId:``,modal:o,dir:c}),(e,t)=>(z(),V(N(Ry),{open:N(i),"onUpdate:open":t[0]||=e=>ln(i)?i.value=e:null,dir:N(c),modal:N(o)},{default:P(()=>[L(e.$slots,`default`,{open:N(i)})]),_:3},8,[`open`,`dir`,`modal`]))}}),ub=F({__name:`DropdownMenuContent`,props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`closeAutoFocus`],setup(e,{emit:t}){let n=$m(e,t);Zm();let r=sb(),i=M(!1);function a(e){e.defaultPrevented||(i.value||setTimeout(()=>{r.triggerElement.value?.focus()},0),i.value=!1,e.preventDefault())}return r.contentId||=vh(void 0,`reka-dropdown-menu-content`),(e,t)=>(z(),V(N(Ky),K(N(n),{id:N(r).contentId,"aria-labelledby":N(r)?.triggerId,style:{"--reka-dropdown-menu-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-dropdown-menu-content-available-width":`var(--reka-popper-available-width)`,"--reka-dropdown-menu-content-available-height":`var(--reka-popper-available-height)`,"--reka-dropdown-menu-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-dropdown-menu-trigger-height":`var(--reka-popper-anchor-height)`},onCloseAutoFocus:a,onInteractOutside:t[0]||=e=>{if(e.defaultPrevented)return;let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,a=t.button===2||n;(!N(r).modal.value||a)&&(i.value=!0),N(r).triggerElement.value?.contains(e.target)&&e.preventDefault()}}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`id`,`aria-labelledby`]))}}),db=F({__name:`DropdownMenuItem`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=Gm(t);return Zm(),(e,t)=>(z(),V(N(Uy),ye(hs({...n,...N(r)})),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),fb=F({__name:`DropdownMenuLabel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return Zm(),(e,n)=>(z(),V(N(Yy),ye(hs(t)),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),pb=F({__name:`DropdownMenuPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(z(),V(N(Xy),ye(hs(t)),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),mb=F({__name:`DropdownMenuSeparator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return Zm(),(e,n)=>(z(),V(N(Zy),ye(hs(t)),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),hb=F({__name:`DropdownMenuTrigger`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=sb(),{forwardRef:r,currentElement:i}=Zm();return Gi(()=>{n.triggerElement=i}),n.triggerId||=vh(void 0,`reka-dropdown-menu-trigger`),(e,i)=>(z(),V(N(jy),{"as-child":``},{default:P(()=>[U(N(Ah),{id:N(n).triggerId,ref:N(r),type:e.as===`button`?`button`:void 0,"as-child":t.asChild,as:e.as,"aria-haspopup":`menu`,"aria-expanded":N(n).open.value,"aria-controls":N(n).open.value?N(n).contentId:void 0,"data-disabled":e.disabled?``:void 0,disabled:e.disabled,"data-state":N(n).open.value?`open`:`closed`,onClick:i[0]||=async t=>{!e.disabled&&t.button===0&&t.ctrlKey===!1&&(N(n)?.onOpenToggle(),await Qn(),N(n).open.value&&t.preventDefault())},onKeydown:i[1]||=Xl(t=>{e.disabled||([`Enter`,` `].includes(t.key)&&N(n).onOpenToggle(),t.key===`ArrowDown`&&N(n).onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(t.key)&&t.preventDefault())},[`enter`,`space`,`arrow-down`])},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`id`,`type`,`as-child`,`as`,`aria-expanded`,`aria-controls`,`data-disabled`,`disabled`,`data-state`])]),_:3}))}}),gb=F({__name:`Label`,props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`label`}},setup(e){let t=e;return Zm(),(e,n)=>(z(),V(N(Ah),K(t,{onMousedown:n[0]||=e=>{!e.defaultPrevented&&e.detail>1&&e.preventDefault()}}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),_b=[` `,`Enter`,`ArrowUp`,`ArrowDown`],vb=[` `,`Enter`];function yb(e,t,n){return e===void 0?!1:Array.isArray(e)?e.some(e=>bb(e,t,n)):bb(e,t,n)}function bb(e,t,n){return e===void 0||t===void 0?!1:typeof e==`string`?e===t:typeof n==`function`?n(e,t):typeof n==`string`?e?.[n]===t?.[n]:Kp(e,t)}function xb(e){return e==null||e===``||Array.isArray(e)&&e.length===0}var Sb={key:0,value:``},[Cb,wb]=Yp(`SelectRoot`),Tb=F({inheritAttrs:!1,__name:`SelectRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`update:open`],setup(e,{emit:t}){let n=e,r=t,{required:i,disabled:a,multiple:o,dir:s}=yn(n),c=Om(n,`modelValue`,r,{defaultValue:n.defaultValue??(o.value?[]:void 0),passive:n.modelValue===void 0,deep:!0}),l=Om(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),u=M(),d=M(),f=M({x:0,y:0}),p=q(()=>o.value&&Array.isArray(c.value)?c.value?.length===0:Qp(c.value));wg({isProvider:!0});let m=Wm(s),h=Xm(u),g=M(new Set),_=q(()=>Array.from(g.value).map(e=>e.value).join(`;`));function v(e){if(o.value){let t=Array.isArray(c.value)?[...c.value]:[],r=t.findIndex(t=>bb(t,e,n.by));r===-1?t.push(e):t.splice(r,1),c.value=[...t]}else c.value=e}function y(e){return Array.from(g.value).find(t=>yb(e,t.value,n.by))}return wb({triggerElement:u,onTriggerChange:e=>{u.value=e},valueElement:d,onValueElementChange:e=>{d.value=e},contentId:``,modelValue:c,onValueChange:v,by:n.by,open:l,multiple:o,required:i,onOpenChange:e=>{l.value=e},dir:m,triggerPointerDownPosRef:f,disabled:a,isEmptyModelValue:p,optionsSet:g,onOptionAdd:e=>{let t=y(e.value);t&&g.value.delete(t),g.value.add(e)},onOptionRemove:e=>{let t=y(e.value);t&&g.value.delete(t)}}),(e,t)=>(z(),V(N(Yg),null,{default:P(()=>[L(e.$slots,`default`,{modelValue:N(c),open:N(l)}),N(h)&&e.name?(z(),V(Eb,{key:_.value,"aria-hidden":`true`,tabindex:`-1`,multiple:N(o),required:N(i),name:e.name,autocomplete:e.autocomplete,disabled:N(a),value:N(c)},{default:P(()=>[N(Qp)(N(c))?(z(),B(`option`,Sb)):G(`v-if`,!0),(z(!0),B(R,null,I(Array.from(g.value),e=>(z(),B(`option`,K({key:e.value??``},{ref_for:!0},e),null,16))),128))]),_:1},8,[`multiple`,`required`,`name`,`autocomplete`,`disabled`,`value`])):G(`v-if`,!0)]),_:3}))}}),Eb=F({__name:`BubbleSelect`,props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(e){let t=e,n=M(),r=Cb();Er(()=>t.value,(e,t)=>{let r=window.HTMLSelectElement.prototype,i=Object.getOwnPropertyDescriptor(r,`value`).set;if(e!==t&&i&&n.value){let t=new Event(`change`,{bubbles:!0});i.call(n.value,e),n.value.dispatchEvent(t)}});function i(e){r.onValueChange(e.target.value)}return(e,r)=>(z(),V(N(Tg),{"as-child":``},{default:P(()=>[H(`select`,K({ref_key:`selectElement`,ref:n},t,{onInput:i}),[L(e.$slots,`default`)],16)]),_:3}))}}),Db=F({__name:`SelectPopperPosition`,props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:`start`},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:10},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=Qm(e);return(e,n)=>(z(),V(N(cy),K(N(t),{style:{boxSizing:`border-box`,"--reka-select-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-select-content-available-width":`var(--reka-popper-available-width)`,"--reka-select-content-available-height":`var(--reka-popper-available-height)`,"--reka-select-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-select-trigger-height":`var(--reka-popper-anchor-height)`}}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),Ob={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[kb,Ab]=Yp(`SelectContent`),jb=F({__name:`SelectContentImpl`,props:{position:{type:String,required:!1,default:`item-aligned`},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:`start`},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:[`closeAutoFocus`,`escapeKeyDown`,`pointerDownOutside`],setup(e,{emit:t}){let n=e,r=t,i=Cb();Jm(),Bm(n.bodyLock);let{CollectionSlot:a,getItems:o}=wg(),s=M();gh(s);let{search:c,handleTypeaheadSearch:l}=Sh(),u=M(),d=M(),f=M(),p=M(!1),m=M(!1),h=M(!1);function g(){d.value&&s.value&&lg([d.value,s.value])}Er(p,()=>{g()});let{onOpenChange:_,triggerPointerDownPosRef:v}=i;Cr(e=>{if(!s.value)return;let t={x:0,y:0},n=e=>{t={x:Math.abs(Math.round(e.pageX)-(v.value?.x??0)),y:Math.abs(Math.round(e.pageY)-(v.value?.y??0))}},r=e=>{e.pointerType!==`touch`&&(t.x<=10&&t.y<=10?e.preventDefault():s.value?.contains(e.target)||_(!1),document.removeEventListener(`pointermove`,n),v.value=null)};v.value!==null&&(document.addEventListener(`pointermove`,n),document.addEventListener(`pointerup`,r,{capture:!0,once:!0})),e(()=>{document.removeEventListener(`pointermove`,n),document.removeEventListener(`pointerup`,r,{capture:!0})})});function y(e){let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&l(e.key,o()),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=[...o().map(e=>e.ref)];if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>lg(t)),e.preventDefault()}}let b=Qm(q(()=>n.position===`popper`?n:{}).value);return Ab({content:s,viewport:u,onViewportChange:e=>{u.value=e},itemRefCallback:(e,t,n)=>{let r=!m.value&&!n,a=yb(i.modelValue.value,t,i.by);if(i.multiple.value){if(h.value)return;(a||r)&&(d.value=e,a&&(h.value=!0))}else (a||r)&&(d.value=e);r&&(m.value=!0)},selectedItem:d,selectedItemText:f,onItemLeave:()=>{s.value?.focus()},itemTextRefCallback:(e,t,n)=>{let r=!m.value&&!n;(yb(i.modelValue.value,t,i.by)||r)&&(f.value=e)},focusSelectedItem:g,position:n.position,isPositioned:p,searchRef:c}),(e,t)=>(z(),V(N(a),null,{default:P(()=>[U(N(ng),{"as-child":``,onMountAutoFocus:t[6]||=Jl(()=>{},[`prevent`]),onUnmountAutoFocus:t[7]||=e=>{r(`closeAutoFocus`,e),!e.defaultPrevented&&(N(i).triggerElement.value?.focus({preventScroll:!0}),e.preventDefault())}},{default:P(()=>[U(N(Hh),{"as-child":``,"disable-outside-pointer-events":e.disableOutsidePointerEvents,onFocusOutside:t[2]||=Jl(()=>{},[`prevent`]),onDismiss:t[3]||=e=>N(i).onOpenChange(!1),onEscapeKeyDown:t[4]||=e=>r(`escapeKeyDown`,e),onPointerDownOutside:t[5]||=e=>r(`pointerDownOutside`,e)},{default:P(()=>[(z(),V(ia(e.position===`popper`?Db:Pb),K({...e.$attrs,...N(b)},{id:N(i).contentId,ref:e=>{if(!e)return;let t=N(bm)(e);t?.hasAttribute(`data-reka-popper-content-wrapper`)?s.value=t.firstElementChild:s.value=t},role:`listbox`,"data-state":N(i).open.value?`open`:`closed`,dir:N(i).dir.value,style:{display:`flex`,flexDirection:`column`,outline:`none`},onContextmenu:t[0]||=Jl(()=>{},[`prevent`]),onPlaced:t[1]||=e=>p.value=!0,onKeydown:y}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`id`,`data-state`,`dir`,`onKeydown`]))]),_:3},8,[`disable-outside-pointer-events`])]),_:3})]),_:3}))}}),[Mb,Nb]=Yp(`SelectItemAlignedPosition`),Pb=F({inheritAttrs:!1,__name:`SelectItemAlignedPosition`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`placed`],setup(e,{emit:t}){let n=e,r=t,{getItems:i}=wg(),a=Cb(),o=kb(),s=M(!1),c=M(!0),l=M(),{forwardRef:u,currentElement:d}=Zm(),{viewport:f,selectedItem:p,selectedItemText:m,focusSelectedItem:h}=o;function g(){if(a.triggerElement.value&&a.valueElement.value&&l.value&&d.value&&f?.value&&p?.value&&m?.value){let e=a.triggerElement.value.getBoundingClientRect(),t=d.value.getBoundingClientRect(),n=a.valueElement.value.getBoundingClientRect(),o=m.value.getBoundingClientRect();if(a.dir.value!==`rtl`){let r=o.left-t.left,i=n.left-r,a=e.left-i,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-10,d=Jp(i,10,Math.max(10,u-c));l.value.style.minWidth=`${s}px`,l.value.style.left=`${d}px`}else{let r=t.right-o.right,i=window.innerWidth-n.right-r,a=window.innerWidth-e.right-i,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-10,d=Jp(i,10,Math.max(10,u-c));l.value.style.minWidth=`${s}px`,l.value.style.right=`${d}px`}let c=i().map(e=>e.ref),u=window.innerHeight-20,h=f.value.scrollHeight,g=window.getComputedStyle(d.value),_=Number.parseInt(g.borderTopWidth,10),v=Number.parseInt(g.paddingTop,10),y=Number.parseInt(g.borderBottomWidth,10),b=Number.parseInt(g.paddingBottom,10),x=_+v+h+b+y,S=Math.min(p.value.offsetHeight*5,x),C=window.getComputedStyle(f.value),w=Number.parseInt(C.paddingTop,10),T=Number.parseInt(C.paddingBottom,10),E=e.top+e.height/2-10,D=u-E,ee=p.value.offsetHeight/2,te=p.value.offsetTop+ee,ne=_+v+te,O=x-ne;if(ne<=E){let e=p.value===c.at(-1);l.value.style.bottom=`0px`;let t=d.value.clientHeight-f.value.offsetTop-f.value.offsetHeight,n=ne+Math.max(D,ee+(e?T:0)+t+y);l.value.style.height=`${n}px`}else{let e=p.value===c[0];l.value.style.top=`0px`;let t=Math.max(E,_+f.value.offsetTop+(e?w:0)+ee)+O;l.value.style.height=`${t}px`,f.value.scrollTop=ne-E+f.value.offsetTop}l.value.style.margin=`10px 0`,l.value.style.minHeight=`${S}px`,l.value.style.maxHeight=`${u}px`,r(`placed`),requestAnimationFrame(()=>s.value=!0)}}let _=M(``);Gi(async()=>{await Qn(),g(),d.value&&(_.value=window.getComputedStyle(d.value).zIndex)});function v(e){e&&c.value===!0&&(g(),h?.(),c.value=!1)}return Dm(a.triggerElement,()=>{g()}),Nb({contentWrapper:l,shouldExpandOnScrollRef:s,onScrollButtonChange:v}),(e,t)=>(z(),B(`div`,{ref_key:`contentWrapperElement`,ref:l,style:me({display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:_.value})},[U(N(Ah),K({ref:N(u),style:{boxSizing:`border-box`,maxHeight:`100%`}},{...e.$attrs,...n}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16)],4))}}),Fb=F({inheritAttrs:!1,__name:`SelectProvider`,props:{context:{type:Object,required:!0}},setup(e){return wb(e.context),Ab(Ob),(e,t)=>L(e.$slots,`default`)}}),Ib={key:1},Lb=F({inheritAttrs:!1,__name:`SelectContent`,props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`closeAutoFocus`,`escapeKeyDown`,`pointerDownOutside`],setup(e,{emit:t}){let n=e,r=$m(n,t),i=Cb(),a=M();Gi(()=>{a.value=new DocumentFragment});let o=M(),s=q(()=>n.forceMount||i.open.value),c=M(s.value),l;function u(){l&&=(clearTimeout(l),void 0)}return Er(s,(e,t,n)=>{u(),l=setTimeout(()=>{c.value=s.value,l=void 0}),n(u)}),Yi(u),(e,t)=>s.value||c.value||o.value?.present?(z(),V(N(Dh),{key:0,ref_key:`presenceRef`,ref:o,present:s.value},{default:P(()=>[U(jb,ye(hs({...N(r),...e.$attrs})),{default:P(()=>[L(e.$slots,`default`)]),_:3},16)]),_:3},8,[`present`])):a.value?(z(),B(`div`,Ib,[(z(),V(Vr,{to:a.value},[U(Fb,{context:N(i)},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`context`])],8,[`to`]))])):G(`v-if`,!0)}}),Rb=F({__name:`SelectIcon`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){return(e,t)=>(z(),V(N(Ah),{"aria-hidden":`true`,as:e.as,"as-child":e.asChild},{default:P(()=>[L(e.$slots,`default`,{},()=>[t[0]||=W(`▼`)])]),_:3},8,[`as`,`as-child`]))}}),[zb,Bb]=Yp(`SelectItem`),Vb=F({__name:`SelectItem`,props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,{disabled:i}=yn(n),a=Cb(),o=kb(),{forwardRef:s,currentElement:c}=Zm(),{CollectionItem:l}=wg(),u=q(()=>yb(a.modelValue?.value,n.value,a.by)),d=M(!1),f=M(n.textValue??``),p=vh(void 0,`reka-select-item-text`);async function m(e){e.defaultPrevented||Zp(`select.select`,h,{originalEvent:e,value:n.value})}async function h(e){await Qn(),r(`select`,e),!e.defaultPrevented&&(i.value||(a.onValueChange(n.value),a.multiple.value||a.onOpenChange(!1)))}async function g(e){await Qn(),!e.defaultPrevented&&(i.value?o.onItemLeave?.():e.currentTarget?.focus({preventScroll:!0}))}async function _(e){await Qn(),!e.defaultPrevented&&e.currentTarget===Xp()&&o.onItemLeave?.()}async function v(e){await Qn(),!e.defaultPrevented&&(o.searchRef?.value!==``&&e.key===` `||(vb.includes(e.key)&&m(e),e.key===` `&&e.preventDefault()))}if(n.value===``)throw Error(`A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return Gi(()=>{c.value&&o.itemRefCallback(c.value,n.value,n.disabled)}),Bb({value:n.value,disabled:i,textId:p,isSelected:u,onItemTextChange:e=>{f.value=((f.value||e?.textContent)??``).trim()}}),(e,t)=>(z(),V(N(l),{value:{textValue:f.value}},{default:P(()=>[U(N(Ah),{ref:N(s),role:`option`,"aria-labelledby":N(p),"data-highlighted":d.value?``:void 0,"aria-selected":u.value,"data-state":u.value?`checked`:`unchecked`,"aria-disabled":N(i)||void 0,"data-disabled":N(i)?``:void 0,tabindex:N(i)?void 0:-1,as:e.as,"as-child":e.asChild,onFocus:t[0]||=e=>d.value=!0,onBlur:t[1]||=e=>d.value=!1,onPointerup:m,onPointerdown:t[2]||=e=>{e.currentTarget.focus({preventScroll:!0})},onTouchend:t[3]||=Jl(()=>{},[`prevent`,`stop`]),onPointermove:g,onPointerleave:_,onKeydown:v},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`aria-labelledby`,`data-highlighted`,`aria-selected`,`data-state`,`aria-disabled`,`data-disabled`,`tabindex`,`as`,`as-child`])]),_:3},8,[`value`]))}}),Hb=F({__name:`SelectItemIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,n=zb();return(e,r)=>N(n).isSelected.value?(z(),V(N(Ah),K({key:0,"aria-hidden":`true`},t),{default:P(()=>[L(e.$slots,`default`)]),_:3},16)):G(`v-if`,!0)}}),Ub=F({inheritAttrs:!1,__name:`SelectItemText`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,n=Cb(),r=kb(),i=zb(),{forwardRef:a,currentElement:o}=Zm(),s=q(()=>({value:i.value,disabled:i.disabled.value,textContent:o.value?.textContent??i.value?.toString()??``}));return Gi(()=>{o.value&&(i.onItemTextChange(o.value),r.itemTextRefCallback(o.value,i.value,i.disabled.value),n.onOptionAdd(s.value))}),Yi(()=>{n.onOptionRemove(s.value)}),(e,n)=>(z(),V(N(Ah),K({id:N(i).textId,ref:N(a)},{...t,...e.$attrs}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`id`]))}}),Wb=F({__name:`SelectPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(z(),V(N(bg),ye(hs(t)),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),Gb=F({__name:`SelectTrigger`,props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=Cb(),{forwardRef:r,currentElement:i}=Zm(),a=q(()=>n.disabled?.value||t.disabled);n.contentId||=vh(void 0,`reka-select-content`),Gi(()=>{n.onTriggerChange(i.value)});let{getItems:o}=wg(),{search:s,handleTypeaheadSearch:c,resetTypeahead:l}=Sh();function u(){a.value||(n.onOpenChange(!0),l())}function d(e){u(),n.triggerPointerDownPosRef.value={x:Math.round(e.pageX),y:Math.round(e.pageY)}}return(e,t)=>(z(),V(N(Xg),{"as-child":``,reference:e.reference},{default:P(()=>[U(N(Ah),{ref:N(r),role:`combobox`,type:e.as===`button`?`button`:void 0,"aria-controls":N(n).contentId,"aria-expanded":N(n).open.value||!1,"aria-required":N(n).required?.value,"aria-autocomplete":`none`,disabled:a.value,dir:N(n)?.dir.value,"data-state":N(n)?.open.value?`open`:`closed`,"data-disabled":a.value?``:void 0,"data-placeholder":N(xb)(N(n).modelValue?.value)?``:void 0,"as-child":e.asChild,as:e.as,onClick:t[0]||=e=>{(e?.currentTarget)?.focus()},onPointerdown:t[1]||=e=>{if(e.pointerType===`touch`)return e.preventDefault();let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&(d(e),e.preventDefault())},onPointerup:t[2]||=Jl(e=>{e.pointerType===`touch`&&d(e)},[`prevent`]),onKeydown:t[3]||=e=>{let t=N(s)!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&t&&e.key===` `||(N(c)(e.key,N(o)()),N(_b).includes(e.key)&&(u(),e.preventDefault()))}},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`type`,`aria-controls`,`aria-expanded`,`aria-required`,`disabled`,`dir`,`data-state`,`data-disabled`,`data-placeholder`,`as-child`,`as`])]),_:3},8,[`reference`]))}}),Kb=F({__name:`SelectValue`,props:{placeholder:{type:String,required:!1,default:``},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,{forwardRef:n,currentElement:r}=Zm(),i=Cb();Gi(()=>{i.valueElement=r});let a=q(()=>{let e=[],t=Array.from(i.optionsSet.value),n=e=>t.find(t=>yb(e,t.value,i.by));return e=Array.isArray(i.modelValue.value)?i.modelValue.value.map(e=>n(e)?.textContent??``):[n(i.modelValue.value)?.textContent??``],e.filter(Boolean)}),o=q(()=>a.value.length?a.value.join(`, `):t.placeholder);return(e,r)=>(z(),V(N(Ah),{ref:N(n),as:e.as,"as-child":e.asChild,style:{pointerEvents:`none`},"data-placeholder":a.value.length?void 0:t.placeholder},{default:P(()=>[L(e.$slots,`default`,{selectedLabel:a.value,modelValue:N(i).modelValue.value},()=>[W(j(o.value),1)])]),_:3},8,[`as`,`as-child`,`data-placeholder`]))}}),qb=F({__name:`SelectViewport`,props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{nonce:n}=yn(t),r=Ty(n),i=kb(),a=i.position===`item-aligned`?Mb():void 0,{forwardRef:o,currentElement:s}=Zm();Gi(()=>{i?.onViewportChange(s.value)});let c=M(0);function l(e){let t=e.currentTarget,{shouldExpandOnScrollRef:n,contentWrapper:r}=a??{};if(n?.value&&r?.value){let e=Math.abs(c.value-t.scrollTop);if(e>0){let n=window.innerHeight-20,i=Number.parseFloat(r.value.style.minHeight),a=Number.parseFloat(r.value.style.height),o=Math.max(i,a);if(o<n){let i=o+e,a=Math.min(n,i),s=i-a;r.value.style.height=`${a}px`,r.value.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,r.value.style.justifyContent=`flex-end`)}}}c.value=t.scrollTop}return(e,n)=>(z(),B(R,null,[U(N(Ah),K({ref:N(o),"data-reka-select-viewport":``,role:`presentation`},{...e.$attrs,...t},{style:{position:`relative`,flex:1,overflow:`hidden auto`},onScroll:l}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16),U(N(Ah),{as:`style`,nonce:N(r)},{default:P(()=>n[0]||=[W(` /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } `)]),_:1,__:[0]},8,[`nonce`])],64))}}),[Jb,Yb]=Yp(`SwitchRoot`),Xb=F({__name:`SwitchRoot`,props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:`on`},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{disabled:i}=yn(n),a=Om(n,`modelValue`,r,{defaultValue:n.defaultValue??n.falseValue,passive:n.modelValue===void 0}),o=q(()=>a.value===n.trueValue);function s(){i.value||(a.value=o.value?n.falseValue:n.trueValue)}let{forwardRef:c,currentElement:l}=Zm(),u=Xm(l),d=q(()=>n.id&&l.value?document.querySelector(`[for="${n.id}"]`)?.innerText:void 0);return Yb({checked:o,toggleCheck:s,disabled:i}),(e,t)=>(z(),V(N(Ah),K(e.$attrs,{id:e.id,ref:N(c),role:`switch`,type:e.as===`button`?`button`:void 0,value:e.value,"aria-label":e.$attrs[`aria-label`]||d.value,"aria-checked":o.value,"aria-required":e.required,"data-state":o.value?`checked`:`unchecked`,"data-disabled":N(i)?``:void 0,"as-child":e.asChild,as:e.as,disabled:N(i),onClick:s,onKeydown:Xl(Jl(s,[`prevent`]),[`enter`])}),{default:P(()=>[L(e.$slots,`default`,{modelValue:N(a),checked:o.value}),N(u)&&e.name?(z(),V(N(Dg),{key:0,type:`checkbox`,name:e.name,disabled:N(i),required:e.required,value:e.value,checked:o.value},null,8,[`name`,`disabled`,`required`,`value`,`checked`])):G(`v-if`,!0)]),_:3},16,[`id`,`type`,`value`,`aria-label`,`aria-checked`,`aria-required`,`data-state`,`data-disabled`,`as-child`,`as`,`disabled`,`onKeydown`]))}}),Zb=F({__name:`SwitchThumb`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=Jb();return Zm(),(e,n)=>(z(),V(N(Ah),{"data-state":N(t).checked.value?`checked`:`unchecked`,"data-disabled":N(t).disabled.value?``:void 0,"as-child":e.asChild,as:e.as},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`data-state`,`data-disabled`,`as-child`,`as`]))}}),[Qb,$b]=Yp(`TabsRoot`),ex=F({__name:`TabsRoot`,props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:`horizontal`},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:`automatic`},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{orientation:i,unmountOnHide:a,dir:o}=yn(n),s=Wm(o);Zm();let c=Om(n,`modelValue`,r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),l=M(),u=un(new Set);return $b({modelValue:c,changeModelValue:e=>{c.value=e},orientation:i,dir:s,unmountOnHide:a,activationMode:n.activationMode,baseId:vh(void 0,`reka-tabs`),tabsList:l,contentIds:u,registerContent:e=>{u.value=new Set([...u.value,e])},unregisterContent:e=>{let t=new Set(u.value);t.delete(e),u.value=t}}),(e,t)=>(z(),V(N(Ah),{dir:N(s),"data-orientation":N(i),"as-child":e.asChild,as:e.as},{default:P(()=>[L(e.$slots,`default`,{modelValue:N(c)})]),_:3},8,[`dir`,`data-orientation`,`as-child`,`as`]))}});function tx(e,t){return`${e}-trigger-${t}`}function nx(e,t){return`${e}-content-${t}`}var rx=F({__name:`TabsList`,props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let{loop:t}=yn(e),{forwardRef:n,currentElement:r}=Zm(),i=Qb();return i.tabsList=r,(e,r)=>(z(),V(N(ky),{"as-child":``,orientation:N(i).orientation.value,dir:N(i).dir.value,loop:N(t)},{default:P(()=>[U(N(Ah),{ref:N(n),role:`tablist`,"as-child":e.asChild,as:e.as,"aria-orientation":N(i).orientation.value},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`aria-orientation`])]),_:3},8,[`orientation`,`dir`,`loop`]))}}),ix=F({__name:`TabsTrigger`,props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,{forwardRef:n}=Zm(),r=Qb(),i=q(()=>tx(r.baseId,t.value)),a=q(()=>r.contentIds.value.has(t.value)?nx(r.baseId,t.value):void 0),o=q(()=>t.value===r.modelValue.value);return(e,t)=>(z(),V(N(Ay),{"as-child":``,focusable:!e.disabled,active:o.value},{default:P(()=>[U(N(Ah),{id:i.value,ref:N(n),role:`tab`,type:e.as===`button`?`button`:void 0,as:e.as,"as-child":e.asChild,"aria-selected":o.value?`true`:`false`,"aria-controls":a.value,"data-state":o.value?`active`:`inactive`,disabled:e.disabled,"data-disabled":e.disabled?``:void 0,"data-orientation":N(r).orientation.value,onMousedown:t[0]||=Jl(t=>{!e.disabled&&t.ctrlKey===!1?N(r).changeModelValue(e.value):t.preventDefault()},[`left`]),onKeydown:t[1]||=Xl(t=>N(r).changeModelValue(e.value),[`enter`,`space`]),onFocus:t[2]||=()=>{let t=N(r).activationMode!==`manual`;!o.value&&!e.disabled&&t&&N(r).changeModelValue(e.value)}},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`id`,`type`,`as`,`as-child`,`aria-selected`,`aria-controls`,`data-state`,`disabled`,`data-disabled`,`data-orientation`])]),_:3},8,[`focusable`,`active`]))}}),[ax,ox]=Yp(`TooltipProvider`),sx=F({inheritAttrs:!1,__name:`TooltipProvider`,props:{delayDuration:{type:Number,required:!1,default:700},skipDelayDuration:{type:Number,required:!1,default:300},disableHoverableContent:{type:Boolean,required:!1,default:!1},disableClosingTrigger:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:!1},content:{type:Object,required:!1}},setup(e){let{delayDuration:t,skipDelayDuration:n,disableHoverableContent:r,disableClosingTrigger:i,ignoreNonKeyboardFocus:a,disabled:o,content:s}=yn(e);Zm();let c=M(!0),l=M(!1),{start:u,stop:d}=_m(()=>{c.value=!0},n,{immediate:!1});return ox({isOpenDelayed:c,delayDuration:t,onOpen(){d(),c.value=!1},onClose(){u()},isPointerInTransitRef:l,disableHoverableContent:r,disableClosingTrigger:i,disabled:o,ignoreNonKeyboardFocus:a,content:s}),(e,t)=>L(e.$slots,`default`)}}),cx=`tooltip.open`,[lx,ux]=Yp(`TooltipRoot`),dx=F({__name:`TooltipRoot`,props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},delayDuration:{type:Number,required:!1,default:void 0},disableHoverableContent:{type:Boolean,required:!1,default:void 0},disableClosingTrigger:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:void 0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t;Zm();let i=ax(),a=q(()=>n.disableHoverableContent??i.disableHoverableContent.value),o=q(()=>n.disableClosingTrigger??i.disableClosingTrigger.value),s=q(()=>n.disabled??i.disabled.value),c=q(()=>n.delayDuration??i.delayDuration.value),l=q(()=>n.ignoreNonKeyboardFocus??i.ignoreNonKeyboardFocus.value),u=Om(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0});Er(u,e=>{i.onClose&&(e?(i.onOpen(),document.dispatchEvent(new CustomEvent(cx))):i.onClose())});let d=M(!1),f=M(),p=q(()=>u.value?d.value?`delayed-open`:`instant-open`:`closed`),{start:m,stop:h}=_m(()=>{d.value=!0,u.value=!0},c,{immediate:!1});function g(){h(),d.value=!1,u.value=!0}function _(){h(),u.value=!1}function v(){m()}return ux({contentId:``,open:u,stateAttribute:p,trigger:f,onTriggerChange(e){f.value=e},onTriggerEnter(){i.isOpenDelayed.value?v():g()},onTriggerLeave(){a.value?_():h()},onOpen:g,onClose:_,disableHoverableContent:a,disableClosingTrigger:o,disabled:s,ignoreNonKeyboardFocus:l}),(e,t)=>(z(),V(N(Yg),null,{default:P(()=>[L(e.$slots,`default`,{open:N(u)})]),_:3}))}}),fx=F({__name:`TooltipContentImpl`,props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1,default:void 0},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:void 0},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1,default:void 0},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`],setup(e,{emit:t}){let n=e,r=t,i=lx(),a=ax(),{forwardRef:o,currentElement:s}=Zm(),c=q(()=>n.ariaLabel||s.value?.textContent),l=q(()=>{let{ariaLabel:e,...t}=n;return Rm(t,a.content.value??{},{side:`top`,sideOffset:0,align:`center`,avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:`partial`,hideWhenDetached:!1})});return Gi(()=>{xm(window,`scroll`,e=>{e.target?.contains(i.trigger.value)&&i.onClose()},{capture:!0}),xm(window,cx,i.onClose)}),(e,t)=>(z(),V(N(Hh),{"as-child":``,"disable-outside-pointer-events":!1,onEscapeKeyDown:t[0]||=e=>r(`escapeKeyDown`,e),onPointerDownOutside:t[1]||=e=>{N(i).disableClosingTrigger.value&&N(i).trigger.value?.contains(e.target)&&e.preventDefault(),r(`pointerDownOutside`,e)},onFocusOutside:t[2]||=Jl(()=>{},[`prevent`]),onDismiss:t[3]||=e=>N(i).onClose()},{default:P(()=>[U(N(cy),K({ref:N(o),"data-state":N(i).stateAttribute.value},{...e.$attrs,...l.value},{style:{"--reka-tooltip-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-tooltip-content-available-width":`var(--reka-popper-available-width)`,"--reka-tooltip-content-available-height":`var(--reka-popper-available-height)`,"--reka-tooltip-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-tooltip-trigger-height":`var(--reka-popper-anchor-height)`}}),{default:P(()=>[L(e.$slots,`default`),U(N(Tg),{id:N(i).contentId,role:`tooltip`},{default:P(()=>[W(j(c.value),1)]),_:1},8,[`id`])]),_:3},16,[`data-state`])]),_:3}))}}),px=F({__name:`TooltipContentHoverable`,props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},setup(e){let t=Qm(e),{forwardRef:n,currentElement:r}=Zm(),{trigger:i,onClose:a}=lx(),o=ax(),{isPointerInTransit:s,onPointerExit:c}=eh(i,r);return o.isPointerInTransitRef=s,c(()=>{a()}),(e,r)=>(z(),V(fx,K({ref:N(n)},N(t)),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),mx=F({__name:`TooltipContent`,props:{forceMount:{type:Boolean,required:!1},ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`],setup(e,{emit:t}){let n=e,r=t,i=lx(),a=$m(n,r),{forwardRef:o}=Zm();return(e,t)=>(z(),V(N(Dh),{present:e.forceMount||N(i).open.value},{default:P(()=>[(z(),V(ia(N(i).disableHoverableContent.value?fx:px),K({ref:N(o)},N(a)),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),hx=F({__name:`TooltipPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(z(),V(N(bg),ye(hs(t)),{default:P(()=>[L(e.$slots,`default`)]),_:3},16))}}),gx=F({__name:`TooltipTrigger`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=lx(),r=ax();n.contentId||=vh(void 0,`reka-tooltip-content`);let{forwardRef:i,currentElement:a}=Zm(),o=M(!1),s=M(!1),c=q(()=>n.disabled.value?{}:{click:h,focus:p,pointermove:d,pointerleave:f,pointerdown:u,blur:m});Gi(()=>{n.onTriggerChange(a.value)});function l(){setTimeout(()=>{o.value=!1},1)}function u(){n.open&&!n.disableClosingTrigger.value&&n.onClose(),o.value=!0,document.addEventListener(`pointerup`,l,{once:!0})}function d(e){e.pointerType!==`touch`&&!s.value&&!r.isPointerInTransitRef.value&&(n.onTriggerEnter(),s.value=!0)}function f(){n.onTriggerLeave(),s.value=!1}function p(e){o.value||n.ignoreNonKeyboardFocus.value&&!e.target.matches?.(`:focus-visible`)||n.onOpen()}function m(){n.onClose()}function h(){n.disableClosingTrigger.value||n.onClose()}return(e,r)=>(z(),V(N(Xg),{"as-child":``,reference:e.reference},{default:P(()=>[U(N(Ah),K({ref:N(i),"aria-describedby":N(n).open.value?N(n).contentId:void 0,"data-state":N(n).stateAttribute.value,as:e.as,"as-child":t.asChild,"data-grace-area-trigger":``},ua(c.value)),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`aria-describedby`,`data-state`,`as`,`as-child`])]),_:3},8,[`reference`]))}}),_x=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},vx=(e,t)=>({classGroupId:e,validator:t}),yx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),bx=`-`,xx=[],Sx=`arbitrary..`,Cx=e=>{let t=Ex(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Tx(e);let n=e.split(bx);return wx(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?_x(i,t):t:i||xx}return n[e]||xx}}},wx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=wx(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(bx):e.slice(t).join(bx),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Tx=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Sx+r:void 0})(),Ex=e=>{let{theme:t,classGroups:n}=e;return Dx(n,t)},Dx=(e,t)=>{let n=yx();for(let r in e){let i=e[r];Ox(i,n,r,t)}return n},Ox=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];kx(i,t,n,r)}},kx=(e,t,n,r)=>{if(typeof e==`string`){Ax(e,t,n);return}if(typeof e==`function`){jx(e,t,n,r);return}Mx(e,t,n,r)},Ax=(e,t,n)=>{let r=e===``?t:Nx(t,e);r.classGroupId=n},jx=(e,t,n,r)=>{if(Px(e)){Ox(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(vx(n,e))},Mx=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Ox(o,Nx(t,a),n,r)}},Nx=(e,t)=>{let n=e,r=t.split(bx),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=yx(),n.nextPart.set(t,i)),n=i}return n},Px=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Fx=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Ix=`!`,Lx=`:`,Rx=[],zx=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Bx=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Lx){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Ix)?(c=s.slice(0,-1),l=!0):s.startsWith(Ix)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return zx(t,l,c,u)};if(t){let e=t+Lx,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):zx(Rx,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Vx=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Hx=e=>({cache:Fx(e.cacheSize),parseClassName:Bx(e),sortModifiers:Vx(e),postfixLookupClassGroupIds:Ux(e),...Cx(e)}),Ux=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Wx=/\s+/,Gx=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Wx),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Ix:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Kx=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=qx(n))&&(i&&(i+=` `),i+=r);return i},qx=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=qx(e[r]))&&(n&&(n+=` `),n+=t);return n},Jx=(e,...t)=>{let n,r,i,a,o=o=>(n=Hx(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Gx(e,n);return i(e,a),a};return a=o,(...e)=>a(Kx(...e))},Yx=[],Xx=e=>{let t=t=>t[e]||Yx;return t.isThemeGetter=!0,t},Zx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$x=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,eS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tS=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,nS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,aS=e=>$x.test(e),oS=e=>!!e&&!Number.isNaN(Number(e)),sS=e=>!!e&&Number.isInteger(Number(e)),cS=e=>e.endsWith(`%`)&&oS(e.slice(0,-1)),lS=e=>eS.test(e),uS=()=>!0,dS=e=>tS.test(e)&&!nS.test(e),fS=()=>!1,pS=e=>rS.test(e),mS=e=>iS.test(e),hS=e=>!X(e)&&!Z(e),gS=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),_S=e=>MS(e,IS,fS),X=e=>Zx.test(e),vS=e=>MS(e,LS,dS),yS=e=>MS(e,RS,oS),bS=e=>MS(e,BS,uS),xS=e=>MS(e,zS,fS),SS=e=>MS(e,PS,fS),CS=e=>MS(e,FS,mS),wS=e=>MS(e,VS,pS),Z=e=>Qx.test(e),TS=e=>NS(e,LS),ES=e=>NS(e,zS),DS=e=>NS(e,PS),OS=e=>NS(e,IS),kS=e=>NS(e,FS),AS=e=>NS(e,VS,!0),jS=e=>NS(e,BS,!0),MS=(e,t,n)=>{let r=Zx.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},NS=(e,t,n=!1)=>{let r=Qx.exec(e);return r?r[1]?t(r[1]):n:!1},PS=e=>e===`position`||e===`percentage`,FS=e=>e===`image`||e===`url`,IS=e=>e===`length`||e===`size`||e===`bg-size`,LS=e=>e===`length`,RS=e=>e===`number`,zS=e=>e===`family-name`,BS=e=>e===`number`||e===`weight`,VS=e=>e===`shadow`,HS=Jx(()=>{let e=Xx(`color`),t=Xx(`font`),n=Xx(`text`),r=Xx(`font-weight`),i=Xx(`tracking`),a=Xx(`leading`),o=Xx(`breakpoint`),s=Xx(`container`),c=Xx(`spacing`),l=Xx(`radius`),u=Xx(`shadow`),d=Xx(`inset-shadow`),f=Xx(`text-shadow`),p=Xx(`drop-shadow`),m=Xx(`blur`),h=Xx(`perspective`),g=Xx(`aspect`),_=Xx(`ease`),v=Xx(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Z,X],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Z,X,c],T=()=>[aS,`full`,`auto`,...w()],E=()=>[sS,`none`,`subgrid`,Z,X],D=()=>[`auto`,{span:[`full`,sS,Z,X]},sS,Z,X],ee=()=>[sS,`auto`,Z,X],te=()=>[`auto`,`min`,`max`,`fr`,Z,X],ne=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],O=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],re=()=>[`auto`,...w()],ie=()=>[aS,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ae=()=>[aS,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],oe=()=>[aS,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],k=()=>[e,Z,X],se=()=>[...b(),DS,SS,{position:[Z,X]}],ce=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],le=()=>[`auto`,`cover`,`contain`,OS,_S,{size:[Z,X]}],ue=()=>[cS,TS,vS],de=()=>[``,`none`,`full`,l,Z,X],fe=()=>[``,oS,TS,vS],pe=()=>[`solid`,`dashed`,`dotted`,`double`],me=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],he=()=>[oS,cS,DS,SS],ge=()=>[``,`none`,m,Z,X],_e=()=>[`none`,oS,Z,X],ve=()=>[`none`,oS,Z,X],A=()=>[oS,Z,X],ye=()=>[aS,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[lS],breakpoint:[lS],color:[uS],container:[lS],"drop-shadow":[lS],ease:[`in`,`out`,`in-out`],font:[hS],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[lS],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[lS],shadow:[lS],spacing:[`px`,oS],text:[lS],"text-shadow":[lS],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,aS,X,Z,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Z,X]}],"container-named":[gS],columns:[{columns:[oS,X,Z,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[sS,`auto`,Z,X]}],basis:[{basis:[aS,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[oS,aS,`auto`,`initial`,`none`,X]}],grow:[{grow:[``,oS,Z,X]}],shrink:[{shrink:[``,oS,Z,X]}],order:[{order:[sS,`first`,`last`,`none`,Z,X]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ne(),`normal`]}],"justify-items":[{"justify-items":[...O(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...O()]}],"align-content":[{content:[`normal`,...ne()]}],"align-items":[{items:[...O(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...O(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...O(),`baseline`]}],"place-self":[{"place-self":[`auto`,...O()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:re()}],mx:[{mx:re()}],my:[{my:re()}],ms:[{ms:re()}],me:[{me:re()}],mbs:[{mbs:re()}],mbe:[{mbe:re()}],mt:[{mt:re()}],mr:[{mr:re()}],mb:[{mb:re()}],ml:[{ml:re()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ie()}],"inline-size":[{inline:[`auto`,...ae()]}],"min-inline-size":[{"min-inline":[`auto`,...ae()]}],"max-inline-size":[{"max-inline":[`none`,...ae()]}],"block-size":[{block:[`auto`,...oe()]}],"min-block-size":[{"min-block":[`auto`,...oe()]}],"max-block-size":[{"max-block":[`none`,...oe()]}],w:[{w:[s,`screen`,...ie()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ie()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ie()]}],h:[{h:[`screen`,`lh`,...ie()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ie()]}],"max-h":[{"max-h":[`screen`,`lh`,...ie()]}],"font-size":[{text:[`base`,n,TS,vS]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,jS,bS]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,cS,X]}],"font-family":[{font:[ES,xS,t]}],"font-features":[{"font-features":[X]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Z,X]}],"line-clamp":[{"line-clamp":[oS,`none`,Z,yS]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Z,X]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Z,X]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...pe(),`wavy`]}],"text-decoration-thickness":[{decoration:[oS,`from-font`,`auto`,Z,vS]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[oS,`auto`,Z,X]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[sS,Z,X]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Z,X]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Z,X]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:le()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},sS,Z,X],radial:[``,Z,X],conic:[sS,Z,X]},kS,CS]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:de()}],"rounded-s":[{"rounded-s":de()}],"rounded-e":[{"rounded-e":de()}],"rounded-t":[{"rounded-t":de()}],"rounded-r":[{"rounded-r":de()}],"rounded-b":[{"rounded-b":de()}],"rounded-l":[{"rounded-l":de()}],"rounded-ss":[{"rounded-ss":de()}],"rounded-se":[{"rounded-se":de()}],"rounded-ee":[{"rounded-ee":de()}],"rounded-es":[{"rounded-es":de()}],"rounded-tl":[{"rounded-tl":de()}],"rounded-tr":[{"rounded-tr":de()}],"rounded-br":[{"rounded-br":de()}],"rounded-bl":[{"rounded-bl":de()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...pe(),`hidden`,`none`]}],"divide-style":[{divide:[...pe(),`hidden`,`none`]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...pe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[oS,Z,X]}],"outline-w":[{outline:[``,oS,TS,vS]}],"outline-color":[{outline:k()}],shadow:[{shadow:[``,`none`,u,AS,wS]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":[`none`,d,AS,wS]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:fe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[oS,vS]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":[`none`,f,AS,wS]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[oS,Z,X]}],"mix-blend":[{"mix-blend":[...me(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":me()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[oS]}],"mask-image-linear-from-pos":[{"mask-linear-from":he()}],"mask-image-linear-to-pos":[{"mask-linear-to":he()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":he()}],"mask-image-t-to-pos":[{"mask-t-to":he()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":he()}],"mask-image-r-to-pos":[{"mask-r-to":he()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":he()}],"mask-image-b-to-pos":[{"mask-b-to":he()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":he()}],"mask-image-l-to-pos":[{"mask-l-to":he()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":he()}],"mask-image-x-to-pos":[{"mask-x-to":he()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":he()}],"mask-image-y-to-pos":[{"mask-y-to":he()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":he()}],"mask-image-radial-to-pos":[{"mask-radial-to":he()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[oS]}],"mask-image-conic-from-pos":[{"mask-conic-from":he()}],"mask-image-conic-to-pos":[{"mask-conic-to":he()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Z,X]}],filter:[{filter:[``,`none`,Z,X]}],blur:[{blur:ge()}],brightness:[{brightness:[oS,Z,X]}],contrast:[{contrast:[oS,Z,X]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,AS,wS]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:[``,oS,Z,X]}],"hue-rotate":[{"hue-rotate":[oS,Z,X]}],invert:[{invert:[``,oS,Z,X]}],saturate:[{saturate:[oS,Z,X]}],sepia:[{sepia:[``,oS,Z,X]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Z,X]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[oS,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[oS,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,oS,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[oS,Z,X]}],"backdrop-invert":[{"backdrop-invert":[``,oS,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[oS,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[oS,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":[``,oS,Z,X]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Z,X]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[oS,`initial`,Z,X]}],ease:[{ease:[`linear`,`initial`,_,Z,X]}],delay:[{delay:[oS,Z,X]}],animate:[{animate:[`none`,v,Z,X]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Z,X]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":[`scale-3d`],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[Z,X,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":[`translate-none`],zoom:[{zoom:[sS,Z,X]}],accent:[{accent:k()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Z,X]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":k()}],"scrollbar-track-color":[{"scrollbar-track":k()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Z,X]}],fill:[{fill:[`none`,...k()]}],"stroke-w":[{stroke:[oS,TS,vS,yS]}],stroke:[{stroke:[`none`,...k()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function US(...e){return HS(Bp(e))}async function WS(e){if(navigator.clipboard){await navigator.clipboard.writeText(e);return}let t=document.createElement(`textarea`);t.value=e,t.style.cssText=`position:fixed;top:-9999px;left:-9999px;opacity:0`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t)}var Q=F({__name:`Button`,props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:`button`}},setup(e){let t=e;return(n,r)=>(z(),V(N(Ah),{as:e.as,"as-child":e.asChild,class:A(N(US)(N(GS)({variant:e.variant,size:e.size}),t.class))},{default:P(()=>[L(n.$slots,`default`)]),_:3},8,[`as`,`as-child`,`class`]))}}),GS=Up(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,outline:`border border-input bg-background hover:bg-accent hover:text-accent-foreground`,destructive:`bg-destructive text-white hover:bg-destructive/90`},size:{sm:`h-8 rounded-md px-3 text-xs`,default:`h-9 px-4 py-2`,icon:`size-9`}},defaultVariants:{variant:`default`,size:`default`}}),KS=F({__name:`Input`,props:Oa({class:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=Xa(e,`modelValue`);return(e,n)=>gr((z(),B(`input`,{"onUpdate:modelValue":n[0]||=e=>t.value=e,class:A(N(US)(`flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50`,e.$props.class))},null,2)),[[Pl,t.value]])}}),qS=F({__name:`SelectTrigger`,props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e,n=Qm(t);return(e,r)=>(z(),V(N(Gb),K(N(n),{class:N(US)(`flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1`,t.class)}),{default:P(()=>[L(e.$slots,`default`),U(N(Rb),{"as-child":``},{default:P(()=>[U(N(Ou),{class:`size-4 opacity-50`})]),_:1})]),_:3},16,[`class`]))}}),JS=F({__name:`SelectContent`,props:{forceMount:{type:Boolean},position:{default:`popper`},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:[`closeAutoFocus`,`escapeKeyDown`,`pointerDownOutside`],setup(e,{emit:t}){let n=e,r=$m(n,t);return(t,i)=>(z(),V(N(Wb),null,{default:P(()=>[U(N(Lb),K(N(r),{class:N(US)(`relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,e.position===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,n.class)}),{default:P(()=>[U(N(qb),{class:A(N(US)(`p-1`,e.position===`popper`&&`h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)]`))},{default:P(()=>[L(t.$slots,`default`)]),_:3},8,[`class`])]),_:3},16,[`class`])]),_:3}))}}),YS={class:`absolute left-2 flex size-3.5 items-center justify-center`},XS=F({__name:`SelectItem`,props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e,n=Qm(t);return(e,r)=>(z(),V(N(Vb),K(N(n),{class:N(US)(`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,t.class)}),{default:P(()=>[H(`span`,YS,[U(N(Hb),null,{default:P(()=>[U(N(Du),{class:`size-4`})]),_:1})]),U(N(Ub),null,{default:P(()=>[L(e.$slots,`default`)]),_:3})]),_:3},16,[`class`]))}}),ZS=F({__name:`TabsList`,props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e;return(e,n)=>(z(),V(N(rx),K(t,{class:N(US)(`inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground`,t.class)}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`class`]))}}),QS=F({__name:`TabsTrigger`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e,n=Qm(t);return(e,r)=>(z(),V(N(ix),K(N(n),{class:N(US)(`inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow`,t.class)}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`class`]))}}),$S=F({__name:`PopoverContent`,props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{default:`center`},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=$m(n,t);return(e,t)=>(z(),V(N(ab),null,{default:P(()=>[U(N(ib),K(N(r),{class:N(US)(`z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,n.class)}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`class`])]),_:3}))}}),eC=F({__name:`Badge`,props:{variant:{},class:{}},setup(e){return(t,n)=>(z(),B(`span`,{class:A(N(US)(N(tC)({variant:e.variant}),t.$props.class))},[L(t.$slots,`default`)],2))}}),tC=Up(`inline-flex items-center gap-1 rounded-md border px-2 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground`,secondary:`border-transparent bg-secondary text-secondary-foreground`,outline:`text-foreground`,destructive:`border-transparent bg-destructive text-white`,source:`border-transparent bg-state-source/15 text-state-source`,machine:`border-transparent bg-state-machine/15 text-state-machine`,reviewed:`border-transparent bg-state-reviewed/15 text-state-reviewed`,"needs-review":`border-transparent bg-state-needs-review/15 text-state-needs-review`}},defaultVariants:{variant:`default`}}),nC=F({__name:`Switch`,props:{defaultValue:{},modelValue:{},disabled:{type:Boolean},id:{},value:{},trueValue:{},falseValue:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=$m(n,t);return(e,t)=>(z(),V(N(Xb),K(N(r),{class:N(US)(`peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,n.class)}),{default:P(()=>[U(N(Zb),{class:`pointer-events-none block size-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0`})]),_:1},16,[`class`]))}}),rC={class:`flex flex-col gap-3`},iC=[`aria-checked`,`onClick`],aC=[`aria-checked`],oC=[`aria-checked`,`disabled`],sC={key:0,class:`ml-[30px] text-[11px] text-muted-foreground`},cC=[`aria-checked`],lC={class:`border-t pt-2`},uC=[`aria-checked`,`onClick`],dC={class:`border-t pt-2`},fC=[`aria-checked`],pC={class:`border-t pt-2`},mC=[`aria-checked`,`disabled`,`onClick`],hC={class:`truncate`},gC=F({__name:`FilterMenu`,props:{states:{},issues:{},enabled:{},plurality:{},emptySource:{type:Boolean},aiContextUnreviewed:{type:Boolean},noUsages:{type:Boolean},skipTranslate:{type:Boolean},scanIndexed:{type:Boolean}},emits:[`update:states`,`update:issues`,`update:enabled`,`update:plurality`,`update:emptySource`,`update:aiContextUnreviewed`,`update:noUsages`,`update:skipTranslate`],setup(e,{emit:t}){let n=e,r=t,i=q(()=>new Set(n.enabled));function a(e){r(`update:states`,n.states.includes(e)?n.states.filter(t=>t!==e):[...n.states,e])}function o(e){r(`update:plurality`,n.plurality.includes(e)?n.plurality.filter(t=>t!==e):[...n.plurality,e])}function s(e){i.value.has(e)&&r(`update:issues`,n.issues.includes(e)?n.issues.filter(t=>t!==e):[...n.issues,e])}function c(e,t){t?i.value.has(e)||r(`update:enabled`,[...n.enabled,e]):(r(`update:enabled`,n.enabled.filter(t=>t!==e)),n.issues.includes(e)&&r(`update:issues`,n.issues.filter(t=>t!==e)))}return(t,n)=>(z(),B(`div`,rC,[H(`div`,null,[n[7]||=H(`p`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Status`,-1),(z(!0),B(R,null,I(N(hp),t=>(z(),B(`button`,{key:t,type:`button`,role:`checkbox`,"aria-checked":e.states.includes(t),class:`flex w-full items-center gap-2 rounded px-1.5 py-1 text-sm hover:bg-accent`,onClick:e=>a(t)},[H(`span`,{class:A([`flex size-4 items-center justify-center rounded border transition-colors`,e.states.includes(t)?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[e.states.includes(t)?(z(),V(N(Du),{key:0,class:`size-3`})):G(``,!0)],2),W(` `+j(N(vp)[t]),1)],8,iC))),128)),H(`button`,{type:`button`,role:`checkbox`,"aria-checked":e.emptySource,class:`flex w-full items-center gap-2 rounded px-1.5 py-1 text-sm hover:bg-accent`,onClick:n[0]||=t=>r(`update:emptySource`,!e.emptySource)},[H(`span`,{class:A([`flex size-4 items-center justify-center rounded border transition-colors`,e.emptySource?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[e.emptySource?(z(),V(N(Du),{key:0,class:`size-3`})):G(``,!0)],2),n[4]||=W(` Empty source `,-1)],8,aC),H(`button`,{type:`button`,role:`checkbox`,"aria-checked":e.noUsages,disabled:!e.scanIndexed,class:`flex w-full items-center gap-2 rounded px-1.5 py-1 text-sm enabled:hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50`,onClick:n[1]||=t=>r(`update:noUsages`,!e.noUsages)},[H(`span`,{class:A([`flex size-4 items-center justify-center rounded border transition-colors`,e.noUsages?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[e.noUsages?(z(),V(N(Du),{key:0,class:`size-3`})):G(``,!0)],2),n[5]||=W(` Unused `,-1)],8,oC),e.scanIndexed?G(``,!0):(z(),B(`p`,sC,`Run a scan first`)),H(`button`,{type:`button`,role:`checkbox`,"aria-checked":e.skipTranslate,class:`flex w-full items-center gap-2 rounded px-1.5 py-1 text-sm hover:bg-accent`,onClick:n[2]||=t=>r(`update:skipTranslate`,!e.skipTranslate)},[H(`span`,{class:A([`flex size-4 items-center justify-center rounded border transition-colors`,e.skipTranslate?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[e.skipTranslate?(z(),V(N(Du),{key:0,class:`size-3`})):G(``,!0)],2),n[6]||=W(` Skip-translate `,-1)],8,cC)]),H(`div`,lC,[n[8]||=H(`p`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Type`,-1),(z(!0),B(R,null,I(N(gp),t=>(z(),B(`button`,{key:t,type:`button`,role:`checkbox`,"aria-checked":e.plurality.includes(t),class:`flex w-full items-center gap-2 rounded px-1.5 py-1 text-sm hover:bg-accent`,onClick:e=>o(t)},[H(`span`,{class:A([`flex size-4 items-center justify-center rounded border transition-colors`,e.plurality.includes(t)?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[e.plurality.includes(t)?(z(),V(N(Du),{key:0,class:`size-3`})):G(``,!0)],2),W(` `+j(N(yp)[t]),1)],8,uC))),128))]),H(`div`,dC,[n[10]||=H(`p`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Context`,-1),H(`button`,{type:`button`,role:`checkbox`,"aria-checked":e.aiContextUnreviewed,class:`flex w-full items-center gap-2 rounded px-1.5 py-1 text-sm hover:bg-accent`,onClick:n[3]||=t=>r(`update:aiContextUnreviewed`,!e.aiContextUnreviewed)},[H(`span`,{class:A([`flex size-4 items-center justify-center rounded border transition-colors`,e.aiContextUnreviewed?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[e.aiContextUnreviewed?(z(),V(N(Du),{key:0,class:`size-3`})):G(``,!0)],2),U(N(vd),{class:`size-3.5 text-muted-foreground`}),n[9]||=W(` AI context (unreviewed) `,-1)],8,fC)]),H(`div`,pC,[n[11]||=H(`p`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Issues`,-1),n[12]||=H(`p`,{class:`mb-1.5 text-[11px] text-muted-foreground`},`Toggle a check to run it; tick its box to filter by it.`,-1),(z(!0),B(R,null,I(N(pp),t=>(z(),B(`div`,{key:t,class:`flex items-center gap-2 py-0.5`},[H(`button`,{type:`button`,role:`checkbox`,"aria-checked":e.issues.includes(t),class:`flex min-w-0 flex-1 items-center gap-2 rounded px-1.5 py-1 text-sm disabled:opacity-50 enabled:hover:bg-accent`,disabled:!i.value.has(t),onClick:e=>s(t)},[H(`span`,{class:A([`flex size-4 shrink-0 items-center justify-center rounded border transition-colors`,e.issues.includes(t)?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[e.issues.includes(t)?(z(),V(N(Du),{key:0,class:`size-3`})):G(``,!0)],2),H(`span`,hC,j(N(_p)[t]),1)],8,mC),U(N(nC),{"model-value":i.value.has(t),"aria-label":`Enable ${N(_p)[t]} check`,"onUpdate:modelValue":e=>c(t,e)},null,8,[`model-value`,`aria-label`,`onUpdate:modelValue`])]))),128))])]))}}),_C={class:`pointer-events-none fixed bottom-4 right-4 z-[200] flex w-80 flex-col gap-2`},vC=[`onClick`],yC=F({__name:`Toaster`,setup(e){let t=EC();return(e,n)=>(z(),V(Vr,{to:`body`},[H(`div`,_C,[U(Cl,{name:`toast`},{default:P(()=>[(z(!0),B(R,null,I(N(t).toasts,e=>(z(),B(`button`,{key:e.id,type:`button`,class:A(N(US)(`pointer-events-auto flex items-center rounded-md border bg-card px-4 py-3 text-left text-sm text-card-foreground shadow-lg`,e.variant===`success`&&`border-state-reviewed/50 text-state-reviewed`,e.variant===`error`&&`border-destructive/50 text-destructive`)),onClick:t=>N(TC)(e.id)},j(e.message),11,vC))),128))]),_:1})])]))}}),bC=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},xC=bC(yC,[[`__scopeId`,`data-v-e9967100`]]),SC=Yt({toasts:[]}),CC=0;function wC(e,t,n=4e3){let r=CC++;SC.toasts.push({id:r,message:e,variant:t}),window.setTimeout(()=>TC(r),n)}function TC(e){let t=SC.toasts.findIndex(t=>t.id===e);t!==-1&&SC.toasts.splice(t,1)}var $=Object.assign(e=>wC(e,`default`),{success:e=>wC(e,`success`),error:e=>wC(e,`error`),info:e=>wC(e,`default`)});function EC(){return SC}var DC=F({__name:`Label`,props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e;return(e,n)=>(z(),V(N(gb),{for:t.for,class:A(N(US)(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,t.class))},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`for`,`class`]))}}),OC=F({__name:`DialogContent`,props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=$m(n,t);return(e,t)=>(z(),V(N(xg),null,{default:P(()=>[U(N(yg),{class:`fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`}),U(N(gg),K(N(r),{class:N(US)(`fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-card p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg`,n.class)}),{default:P(()=>[L(e.$slots,`default`),U(N(Fh),{class:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`},{default:P(()=>[U(N(kd),{class:`size-4`}),t[0]||=H(`span`,{class:`sr-only`},`Close`,-1)]),_:1})]),_:3},16,[`class`])]),_:3}))}}),kC=F({__name:`DialogHeader`,props:{class:{}},setup(e){return(e,t)=>(z(),B(`div`,{class:A(N(US)(`flex flex-col gap-1.5 text-center sm:text-left`,e.$props.class))},[L(e.$slots,`default`)],2))}}),AC=F({__name:`DialogFooter`,props:{class:{}},setup(e){return(e,t)=>(z(),B(`div`,{class:A(N(US)(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e.$props.class))},[L(e.$slots,`default`)],2))}}),jC=F({__name:`DialogTitle`,props:{asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e;return(e,n)=>(z(),V(N(Sg),{class:A(N(US)(`text-lg font-semibold leading-none tracking-tight`,t.class))},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`class`]))}}),MC=F({__name:`DialogDescription`,props:{asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e;return(e,n)=>(z(),V(N(_g),{class:A(N(US)(`text-sm text-muted-foreground`,t.class))},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`class`]))}}),NC=F({__name:`DropdownMenuContent`,props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=$m(n,t);return(e,t)=>(z(),V(N(pb),null,{default:P(()=>[U(N(ub),K(N(r),{class:N(US)(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,n.class)}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`class`])]),_:3}))}}),PC=F({__name:`DropdownMenuItem`,props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e,n=Qm(t);return(e,r)=>(z(),V(N(db),K(N(n),{class:N(US)(`relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4`,t.class)}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`class`]))}}),FC=F({__name:`DropdownMenuLabel`,props:{asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e;return(e,n)=>(z(),V(N(fb),{class:A(N(US)(`px-2 py-1.5 text-sm font-semibold`,t.class))},{default:P(()=>[L(e.$slots,`default`)]),_:3},8,[`class`]))}}),IC=F({__name:`DropdownMenuSeparator`,props:{asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e;return(e,n)=>(z(),V(N(mb),{class:A(N(US)(`-mx-1 my-1 h-px bg-border`,t.class))},null,8,[`class`]))}}),LC={class:`flex flex-wrap items-center gap-2`},RC={class:`grid gap-2`},zC={class:`flex flex-wrap gap-2`},BC=F({__name:`SelectionBar`,props:{keys:{},locales:{},scopeLabel:{},tagsOnSelection:{}},emits:[`changed`,`clear`,`translate`,`build-context`],setup(e,{emit:t}){let n=e,r=t,i=M(!1),a=M(!1),o=M(!1),s=M(!1),c=M(!1),l=M(``);Er(s,e=>{e||(l.value=``)});async function u(e,t,n=!1){i.value=!0;try{await e(),$.success(t),r(`changed`),n&&r(`clear`),a.value=!1,o.value=!1,s.value=!1,c.value=!1}catch(e){$.error(e.message||`Bulk action failed`)}finally{i.value=!1}}let d=()=>u(()=>Pd(n.keys,n.locales),`Cleared translations for ${n.keys.length} key${n.keys.length===1?``:`s`}`),f=()=>u(()=>Fd(n.keys),`Deleted ${n.keys.length} key${n.keys.length===1?``:`s`}`,!0),p=e=>u(()=>Id(n.keys,n.locales,e),`Marked ${n.keys.length} key${n.keys.length===1?``:`s`} ${e}`),m=e=>u(()=>Ld(n.keys,{skipTranslate:e}),e?`Marked skip-translate`:`Cleared skip-translate`),h=()=>u(()=>Ld(n.keys,{clearContext:!0}),`Cleared context for ${n.keys.length} key${n.keys.length===1?``:`s`}`),g=()=>{let e=l.value.trim();if(!(!e||i.value))return u(()=>Ld(n.keys,{addTags:[e]}),`Added tag "${e}"`).then(()=>l.value=``)},_=e=>u(()=>Ld(n.keys,{removeTags:[e]}),`Removed tag "${e}"`);return(t,n)=>(z(),B(`div`,LC,[U(N(Q),{variant:`ghost`,size:`sm`,class:`h-8 gap-1.5`,"data-testid":`bulk-clear-trigger`,disabled:i.value||!e.keys.length,onClick:n[0]||=e=>a.value=!0},{default:P(()=>[U(N(Ru),{class:`size-4`}),n[19]||=W(` Clear translations `,-1)]),_:1},8,[`disabled`]),U(N(Q),{variant:`ghost`,size:`sm`,class:`h-8 gap-1.5`,"data-testid":`bulk-translate`,disabled:i.value||!e.keys.length,onClick:n[1]||=e=>r(`translate`)},{default:P(()=>[U(N(vd),{class:`size-4`}),n[20]||=W(` Translate `,-1)]),_:1},8,[`disabled`]),U(N(Q),{variant:`ghost`,size:`sm`,class:`h-8 gap-1.5`,"data-testid":`bulk-build-context`,disabled:i.value||!e.keys.length,onClick:n[2]||=e=>r(`build-context`)},{default:P(()=>[U(N(Od),{class:`size-4`}),n[21]||=W(` Build context `,-1)]),_:1},8,[`disabled`]),U(N(lb),null,{default:P(()=>[U(N(hb),{"as-child":``},{default:P(()=>[U(N(Q),{variant:`ghost`,size:`sm`,class:`h-8 gap-1.5`,"data-testid":`bulk-set-trigger`,disabled:i.value||!e.keys.length},{default:P(()=>[n[22]||=W(` Set `,-1),U(N(Ou),{class:`size-4`})]),_:1},8,[`disabled`])]),_:1}),U(N(NC),{align:`end`,class:`w-52`},{default:P(()=>[U(N(FC),null,{default:P(()=>[W(`Status · `+j(e.scopeLabel),1)]),_:1}),U(N(PC),{"data-testid":`bulk-mark-reviewed`,onSelect:n[3]||=e=>p(`reviewed`)},{default:P(()=>[...n[23]||=[W(`Mark reviewed`,-1)]]),_:1}),U(N(PC),{"data-testid":`bulk-mark-needs-review`,onSelect:n[4]||=e=>p(`needs-review`)},{default:P(()=>[...n[24]||=[W(`Mark needs-review`,-1)]]),_:1}),U(N(IC)),U(N(FC),null,{default:P(()=>[...n[25]||=[W(`Tags · key`,-1)]]),_:1}),U(N(PC),{onSelect:n[5]||=e=>s.value=!0},{default:P(()=>[...n[26]||=[W(`Add tag…`,-1)]]),_:1}),U(N(PC),{disabled:!e.tagsOnSelection.length,onSelect:n[6]||=e=>c.value=!0},{default:P(()=>[...n[27]||=[W(`Remove tag…`,-1)]]),_:1},8,[`disabled`]),U(N(IC)),U(N(FC),null,{default:P(()=>[...n[28]||=[W(`Context · key`,-1)]]),_:1}),U(N(PC),{onSelect:h},{default:P(()=>[...n[29]||=[W(`Clear context`,-1)]]),_:1}),U(N(IC)),U(N(FC),null,{default:P(()=>[...n[30]||=[W(`Translation · key`,-1)]]),_:1}),U(N(PC),{onSelect:n[7]||=e=>m(!0)},{default:P(()=>[...n[31]||=[W(`Skip translate`,-1)]]),_:1}),U(N(PC),{onSelect:n[8]||=e=>m(!1)},{default:P(()=>[...n[32]||=[W(`Don't skip`,-1)]]),_:1})]),_:1})]),_:1}),U(N(Q),{variant:`ghost`,size:`sm`,class:`h-8 gap-1.5 text-destructive hover:bg-destructive/10 hover:text-destructive`,"data-testid":`bulk-delete-trigger`,disabled:i.value||!e.keys.length,onClick:n[9]||=e=>o.value=!0},{default:P(()=>[U(N(wd),{class:`size-4`}),n[33]||=W(` Delete `,-1)]),_:1},8,[`disabled`]),U(N(Ph),{open:a.value,"onUpdate:open":n[11]||=e=>a.value=e},{default:P(()=>[U(N(OC),{class:`max-w-md`},{default:P(()=>[U(N(kC),null,{default:P(()=>[U(N(jC),null,{default:P(()=>[...n[34]||=[W(`Clear translations`,-1)]]),_:1}),U(N(MC),null,{default:P(()=>[W(` Clear translations for `+j(e.keys.length)+` `+j(e.keys.length===1?`key`:`keys`)+` in `+j(e.scopeLabel)+`? Source strings are kept. This cannot be undone. `,1)]),_:1})]),_:1}),U(N(AC),null,{default:P(()=>[U(N(Q),{variant:`outline`,disabled:i.value,onClick:n[10]||=e=>a.value=!1},{default:P(()=>[...n[35]||=[W(`Cancel`,-1)]]),_:1},8,[`disabled`]),U(N(Q),{variant:`destructive`,disabled:i.value,"data-testid":`bulk-clear-confirm`,onClick:d},{default:P(()=>[...n[36]||=[W(`Clear translations`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]),U(N(Ph),{open:o.value,"onUpdate:open":n[13]||=e=>o.value=e},{default:P(()=>[U(N(OC),{class:`max-w-md`},{default:P(()=>[U(N(kC),null,{default:P(()=>[U(N(jC),null,{default:P(()=>[...n[37]||=[W(`Delete keys`,-1)]]),_:1}),U(N(MC),null,{default:P(()=>[W(` Delete `+j(e.keys.length)+` `+j(e.keys.length===1?`key`:`keys`)+` and all their translations? This cannot be undone. `,1)]),_:1})]),_:1}),U(N(AC),null,{default:P(()=>[U(N(Q),{variant:`outline`,disabled:i.value,onClick:n[12]||=e=>o.value=!1},{default:P(()=>[...n[38]||=[W(`Cancel`,-1)]]),_:1},8,[`disabled`]),U(N(Q),{variant:`destructive`,disabled:i.value,"data-testid":`bulk-delete-confirm`,onClick:f},{default:P(()=>[...n[39]||=[W(`Delete`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]),U(N(Ph),{open:s.value,"onUpdate:open":n[16]||=e=>s.value=e},{default:P(()=>[U(N(OC),{class:`max-w-md`},{default:P(()=>[U(N(kC),null,{default:P(()=>[U(N(jC),null,{default:P(()=>[...n[40]||=[W(`Add tag`,-1)]]),_:1}),U(N(MC),null,{default:P(()=>[W(`Add a tag to `+j(e.keys.length)+` `+j(e.keys.length===1?`key`:`keys`)+`.`,1)]),_:1})]),_:1}),H(`div`,RC,[U(N(DC),{for:`bulk-add-tag`},{default:P(()=>[...n[41]||=[W(`Tag`,-1)]]),_:1}),U(N(KS),{id:`bulk-add-tag`,modelValue:l.value,"onUpdate:modelValue":n[14]||=e=>l.value=e,disabled:i.value,onKeydown:Xl(Jl(g,[`prevent`]),[`enter`])},null,8,[`modelValue`,`disabled`,`onKeydown`])]),U(N(AC),null,{default:P(()=>[U(N(Q),{variant:`outline`,disabled:i.value,onClick:n[15]||=e=>s.value=!1},{default:P(()=>[...n[42]||=[W(`Cancel`,-1)]]),_:1},8,[`disabled`]),U(N(Q),{disabled:i.value||!l.value.trim(),onClick:g},{default:P(()=>[...n[43]||=[W(`Add`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]),U(N(Ph),{open:c.value,"onUpdate:open":n[18]||=e=>c.value=e},{default:P(()=>[U(N(OC),{class:`max-w-md`},{default:P(()=>[U(N(kC),null,{default:P(()=>[U(N(jC),null,{default:P(()=>[...n[44]||=[W(`Remove tag`,-1)]]),_:1}),U(N(MC),null,{default:P(()=>[...n[45]||=[W(`Remove a tag from the selected keys.`,-1)]]),_:1})]),_:1}),H(`div`,zC,[(z(!0),B(R,null,I(e.tagsOnSelection,e=>(z(),V(N(Q),{key:e,variant:`outline`,size:`sm`,disabled:i.value,onClick:t=>_(e)},{default:P(()=>[W(j(e),1)]),_:2},1032,[`disabled`,`onClick`]))),128))]),U(N(AC),null,{default:P(()=>[U(N(Q),{variant:`outline`,disabled:i.value,onClick:n[17]||=e=>c.value=!1},{default:P(()=>[...n[46]||=[W(`Close`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`])]))}});function VC(){let e=M(new Set),t=null;function n(t){return e.value.has(t)}function r(n){e.value.has(n)?e.value.delete(n):e.value.add(n),t=n}function i(n,i){if(t===null)return r(n);let a=i.indexOf(t),o=i.indexOf(n);if(a===-1||o===-1)return r(n);let[s,c]=a<o?[a,o]:[o,a];for(let t=s;t<=c;t++)e.value.add(i[t]);t=n}function a(n){for(let t of n)e.value.add(t);t=n.length?n[n.length-1]:null}function o(){e.value.clear(),t=null}function s(n){let r=new Set(n);for(let t of[...e.value])r.has(t)||e.value.delete(t);t!==null&&!r.has(t)&&(t=null)}return{has:n,toggle:r,toggleRange:i,selectAll:a,clear:o,pruneTo:s,keys:()=>[...e.value],count:q(()=>e.value.size),allSelected:t=>t.length>0&&t.every(t=>e.value.has(t)),someSelected:t=>t.some(t=>e.value.has(t))}}var HC=F({__name:`TooltipContent`,props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{}},emits:[`escapeKeyDown`,`pointerDownOutside`],setup(e,{emit:t}){let n=e,r=$m(n,t);return(e,t)=>(z(),V(N(hx),null,{default:P(()=>[U(N(mx),K(N(r),{class:N(US)(`z-50 overflow-hidden rounded-md bg-foreground px-3 py-1.5 text-xs text-background shadow-md data-[state=delayed-open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95`,n.class)}),{default:P(()=>[L(e.$slots,`default`)]),_:3},16,[`class`])]),_:3}))}}),UC=[`zero`,`one`,`two`,`few`,`many`,`other`];function WC(e){let t;try{t=new Intl.PluralRules(e.replace(/_/g,`-`),{type:`cardinal`}).resolvedOptions().pluralCategories}catch{t=[`other`]}let n=new Set(t);return UC.filter(e=>n.has(e))}function GC(e,t,n){if(t===n)return!1;let r=e.values[n];if(e.plural){if(!r?.forms?.other)return!1;let n=e.values[t]?.forms??{};return WC(t).some(e=>(n[e]??``)===``)}return r?.value?!e.values[t]?.value:!1}function KC(e,t,n){return t.filter(t=>GC(e,t,n))}function qC(e,t,n){return t.filter(t=>{if(t===n)return!1;let r=e.values[t];return!r||r.state!==`needs-review`?!1:r.value?r.value.length>0:Object.keys(r.forms??{}).length>0})}var JC=new Intl.DisplayNames([`en`],{type:`language`}),YC=new Map;function XC(e){if(!YC.has(e)){let t;try{t=new Intl.DisplayNames([e],{type:`language`}).of(e)??void 0}catch{t=void 0}YC.set(e,t)}return YC.get(e)}function ZC(e){return e.split(`-`).slice(1).some(e=>/^[a-zA-Z]{5,8}$/.test(e)||/^[0-9][a-zA-Z0-9]{3}$/.test(e))}var QC=new Set([`ar`,`he`,`iw`,`fa`,`ur`,`ps`,`sd`,`ug`,`yi`,`dv`,`ckb`,`ks`,`nqo`,`rhg`]);function $C(e){let t=e.split(/[-_]/)[0]?.toLowerCase()??``;return QC.has(t)}function ew(e,t){let n=e.replace(/_/g,`-`),r=n,i=!1;try{r=Intl.getCanonicalLocales(n)[0]??n,ZC(r)&&(i=!0)}catch{i=!0}let a=e;t?.name===void 0?i||(a=JC.of(r)??e):a=t.name;let o;return o=t&&t.flag!==void 0?t.flag:i?null:r===`en`?`en`:new Intl.Locale(r).maximize().region??null,{code:e,bcp47:r,name:a,endonym:i?void 0:XC(r),flagRegion:o,isCustom:i,rtl:$C(e)}}var tw=[`aria-label`],nw=`inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-[11.5px] font-medium leading-none whitespace-nowrap min-w-[132px]`,rw=F({__name:`StateBadge`,props:{state:{},editable:{type:Boolean}},emits:[`setState`],setup(e,{emit:t}){let n=e,r=t,i=[`machine`,`reviewed`,`needs-review`],a={source:`Source`,machine:`Machine`,reviewed:`Reviewed`,"needs-review":`Needs review`},o={source:`bg-accent text-muted-foreground border-border-soft`,machine:`bg-machine-soft text-machine border-transparent`,reviewed:`bg-review-soft text-review border-transparent`,"needs-review":`bg-muted text-muted-foreground border-border`},s={source:`bg-muted-foreground`,machine:`bg-machine`,reviewed:`bg-review`,"needs-review":`bg-muted-foreground`};return(t,c)=>!e.editable||e.state===`source`?(z(),B(`span`,{key:0,class:A(N(US)(nw,o[e.state],`cursor-default`)),"data-testid":`state-badge`},[e.state===`reviewed`?(z(),V(N(Du),{key:0,class:`size-3 shrink-0`})):(z(),B(`span`,{key:1,class:A(N(US)(`size-[7px] shrink-0 rounded-full`,s[e.state]))},null,2)),W(` `+j(a[e.state]),1)],2)):(z(),V(N(lb),{key:1},{default:P(()=>[U(N(hb),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,class:A(N(US)(nw,o[e.state],`transition hover:brightness-95 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`)),"aria-label":`${a[e.state]} — change state`,"data-testid":`state-badge`},[e.state===`reviewed`?(z(),V(N(Du),{key:0,class:`size-3 shrink-0`})):(z(),B(`span`,{key:1,class:A(N(US)(`size-[7px] shrink-0 rounded-full`,s[e.state]))},null,2)),W(` `+j(a[e.state])+` `,1),U(N(Ou),{class:`ml-auto size-3 opacity-50`})],10,tw)]),_:1}),U(N(NC),{align:`end`,class:`min-w-[10rem]`},{default:P(()=>[(z(),B(R,null,I(i,e=>U(N(PC),{key:e,onSelect:t=>r(`setState`,e)},{default:P(()=>[H(`span`,{class:A(N(US)(`size-[7px] shrink-0 rounded-full`,s[e]))},null,2),W(` `+j(a[e])+` `,1),U(N(Du),{class:A(N(US)(`ml-auto size-4`,e===n.state?`opacity-100`:`opacity-0`))},null,8,[`class`])]),_:2},1032,[`onSelect`])),64))]),_:1})]),_:1}))}}),iw=new RegExp([`\\{\\s*[A-Za-z0-9_]+\\s*,\\s*(?:plural|select|selectordinal)\\s*,(?:[^{}]|\\{[^{}]*\\})*\\}`,`\\{\\s*[A-Za-z0-9_.]+\\s*\\}`].join(`|`),`g`);function aw(e){let t=[];if(!e.includes(`'`))return t;for(let n=0;n<e.length;){if(e[n]===`'`){let r=e[n+1];if(r===`'`){n+=2;continue}if(r===`{`||r===`}`||r===`#`||r===`|`){let r=n;for(n+=2;n<e.length&&e[n]!==`'`;)n++;let i=n<e.length?n+1:n;t.push([r,i]),n=i;continue}}n++}return t}function ow(e){if(!e)return[];let t=aw(e),n=e=>t.some(([t,n])=>e>=t&&e<n),r=[],i=0;iw.lastIndex=0;let a;for(;(a=iw.exec(e))!==null;){if(a[0].length===0){iw.lastIndex++;continue}n(a.index)||(a.index>i&&r.push({text:e.slice(i,a.index),placeholder:!1}),r.push({text:a[0],placeholder:!0}),i=a.index+a[0].length)}return i<e.length&&r.push({text:e.slice(i),placeholder:!1}),r}var sw=F({__name:`Textarea`,props:Oa({class:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=Xa(e,`modelValue`);return(e,n)=>gr((z(),B(`textarea`,{"onUpdate:modelValue":n[0]||=e=>t.value=e,class:A(N(US)(`flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50`,e.$props.class))},null,2)),[[Pl,t.value]])}}),cw={class:`min-w-0`},lw={key:0,class:`flex flex-col gap-1`},uw={class:`whitespace-pre-wrap break-words`},dw={key:0,class:`rounded bg-ph-bg px-1 font-mono text-[0.85em] font-semibold text-ph-fg`},fw=F({__name:`ValueEditor`,props:{keyName:{},locale:{},sourceLocale:{},value:{},maxLength:{}},emits:[`changed`],setup(e,{emit:t}){let n=e,r=t,i=M(!1),a=M(``),o=M(!1),s=M(null),c=q(()=>n.locale===n.sourceLocale),l=q(()=>ow(n.value)),u=q(()=>n.maxLength!==void 0&&n.value.length>n.maxLength);function d(e){e&&(e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,160)}px`)}async function f(){a.value=n.value,i.value=!0,await Qn();let e=s.value?.$el;e?.focus(),e?.select(),d(e)}function p(){i.value=!1}async function m(){if(!i.value)return;i.value=!1;let e=a.value;if(e!==n.value){o.value=!0;try{c.value?await Rd(n.keyName,{source:e}):await zd(n.keyName,n.locale,e),r(`changed`)}catch(e){$.error(`Could not save: ${e.message}`),r(`changed`)}finally{o.value=!1}}}return(t,n)=>(z(),B(`div`,cw,[i.value?(z(),B(`div`,lw,[U(N(sw),{ref_key:`textareaEl`,ref:s,modelValue:a.value,"onUpdate:modelValue":n[0]||=e=>a.value=e,rows:`1`,maxlength:e.maxLength,class:`max-w-[560px] resize-none rounded-lg border-2 border-primary text-sm shadow-[0_0_0_3px_var(--ring)]`,onInput:n[1]||=e=>d(e.target),onBlur:m,onKeydown:[Xl(Jl(p,[`prevent`]),[`escape`]),Xl(Jl(m,[`exact`,`prevent`]),[`enter`])]},null,8,[`modelValue`,`maxlength`,`onKeydown`]),n[2]||=H(`span`,{class:`text-[10.5px] text-muted-foreground`},[H(`kbd`,{class:`rounded border border-border-soft bg-accent px-1 font-mono text-[10px]`},`↵`),W(` save · `),H(`kbd`,{class:`rounded border border-border-soft bg-accent px-1 font-mono text-[10px]`},`esc`),W(` cancel `)],-1)])):e.value?(z(),B(`button`,{key:1,type:`button`,class:A(N(US)(`group inline-flex max-w-full items-center gap-1.5 rounded-md px-2 py-1 -mx-2 -my-1 text-left text-sm leading-relaxed hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,u.value&&`text-destructive`)),onClick:Jl(f,[`stop`])},[H(`span`,uw,[(z(!0),B(R,null,I(l.value,(e,t)=>(z(),B(R,{key:t},[e.placeholder?(z(),B(`span`,dw,j(e.text),1)):(z(),B(R,{key:1},[W(j(e.text),1)],64))],64))),128))]),U(N(ad),{"aria-hidden":`true`,class:`size-3 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-60`})],2)):(z(),B(`button`,{key:2,type:`button`,"data-testid":`empty-marker`,class:`group inline-flex items-center gap-1.5 rounded-md border border-dashed border-input px-2.5 py-1 text-[12.5px] font-medium italic text-muted-foreground transition-colors hover:border-border hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:Jl(f,[`stop`])},[n[3]||=W(` Empty `,-1),U(N(ad),{class:`size-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-60`,"aria-hidden":`true`})]))]))}}),pw={class:`flex min-w-0 flex-col gap-2`},mw={class:`min-w-0 flex-1`},hw={key:0,class:`flex flex-col gap-1`},gw={class:`font-mono text-[10px] font-semibold uppercase tracking-wide text-primary`},_w=[`onClick`],vw={class:`whitespace-pre-wrap break-words`},yw={key:0,class:`rounded bg-ph-bg px-1 font-mono text-[0.85em] font-semibold text-ph-fg`},bw=[`onClick`],xw=F({__name:`PluralValueEditor`,props:{keyName:{},locale:{},sourceLocale:{},arg:{},forms:{},sourceForms:{},maxLength:{}},emits:[`changed`],setup(e,{emit:t}){let n=e,r=t,i=q(()=>n.locale===n.sourceLocale),a=q(()=>[...Object.keys(n.forms).filter(e=>/^=\d+$/.test(e)).sort((e,t)=>Number(e.slice(1))-Number(t.slice(1))),...WC(n.locale)]),o=M(null),s=M(``),c=M(!1),l=M(null);function u(e){l.value=e}function d(e){return n.forms[e]??``}function f(e){return ow(d(e))}function p(e){return n.maxLength!==void 0&&d(e).length>n.maxLength}function m(e){e&&(e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,160)}px`)}async function h(e){s.value=d(e),o.value=e,await Qn();let t=l.value?.$el;t?.focus(),t?.select(),m(t)}function g(){o.value=null}async function _(){let e=o.value;if(!e)return;o.value=null;let t=s.value;if(t!==d(e)){c.value=!0;try{let i={};for(let[e,t]of Object.entries(n.forms))i[e]=t??``;i[e]=t,await Hd(n.keyName,n.locale,i),r(`changed`)}catch(e){$.error(`Could not save: ${e.message}`),r(`changed`)}finally{c.value=!1}}}return(t,n)=>(z(),B(`div`,pw,[(z(!0),B(R,null,I(a.value,t=>(z(),B(`div`,{key:t,"data-testid":`plural-field`,class:`flex items-start gap-2.5`},[H(`span`,{class:A(N(US)(`mt-0.5 min-w-[46px] shrink-0 rounded border border-border px-1.5 py-1 text-center font-mono text-[9.5px] font-semibold uppercase tracking-wide text-muted-foreground`,!i.value&&!d(t)&&`opacity-55`))},j(t),3),H(`div`,mw,[o.value===t?(z(),B(`div`,hw,[H(`span`,gw,`Plural: `+j(t),1),U(N(sw),{ref_for:!0,ref:u,modelValue:s.value,"onUpdate:modelValue":n[0]||=e=>s.value=e,rows:`1`,maxlength:e.maxLength,class:`max-w-[560px] resize-none rounded-lg border-2 border-primary text-sm shadow-[0_0_0_3px_var(--ring)]`,onInput:n[1]||=e=>m(e.target),onBlur:_,onKeydown:[Xl(Jl(g,[`prevent`]),[`escape`]),Xl(Jl(_,[`exact`,`prevent`]),[`enter`])]},null,8,[`modelValue`,`maxlength`,`onKeydown`]),n[2]||=H(`span`,{class:`text-[10.5px] text-muted-foreground`},[H(`kbd`,{class:`rounded border border-border-soft bg-accent px-1 font-mono text-[10px]`},`↵`),W(` save · `),H(`kbd`,{class:`rounded border border-border-soft bg-accent px-1 font-mono text-[10px]`},`esc`),W(` cancel `)],-1)])):d(t)?(z(),B(`button`,{key:1,type:`button`,class:A(N(US)(`group inline-flex max-w-full items-center gap-1.5 rounded-md px-2 py-1 -mx-2 -my-1 text-left text-sm leading-relaxed hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,p(t)&&`text-destructive`)),onClick:Jl(e=>h(t),[`stop`])},[H(`span`,vw,[(z(!0),B(R,null,I(f(t),(e,t)=>(z(),B(R,{key:t},[e.placeholder?(z(),B(`span`,yw,j(e.text),1)):(z(),B(R,{key:1},[W(j(e.text),1)],64))],64))),128))]),U(N(ad),{class:`size-3 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-60`,"aria-hidden":`true`})],10,_w)):(z(),B(`button`,{key:2,type:`button`,"data-testid":`empty-marker`,class:`group inline-flex items-center gap-1.5 rounded-md border border-dashed border-input px-2.5 py-1 text-[12.5px] font-medium italic text-muted-foreground transition-colors hover:border-border hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:Jl(e=>h(t),[`stop`])},[n[3]||=W(` Empty `,-1),U(N(ad),{class:`size-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-60`,"aria-hidden":`true`})],8,bw))])]))),128))]))}}),Sw=Object.assign({"./assets/flags/ad.svg":`/assets/ad-B18i8NGa.svg`,"./assets/flags/ae.svg":`/assets/ae-CZRtWSox.svg`,"./assets/flags/af.svg":`/assets/af-C77Rf6cE.svg`,"./assets/flags/ag.svg":`/assets/ag-C8MykuG2.svg`,"./assets/flags/ai.svg":`/assets/ai-Dmedkf4v.svg`,"./assets/flags/al.svg":`/assets/al-10QRkakw.svg`,"./assets/flags/am.svg":`/assets/am-DMt4_dd4.svg`,"./assets/flags/ao.svg":`/assets/ao-tXuRa6vm.svg`,"./assets/flags/aq.svg":`/assets/aq-CF5jO-0h.svg`,"./assets/flags/ar.svg":`/assets/ar-Be8Ju1cG.svg`,"./assets/flags/arab.svg":`/assets/arab-C4CYPgyC.svg`,"./assets/flags/as.svg":`/assets/as-Dekqy8Of.svg`,"./assets/flags/asean.svg":`/assets/asean-WMtZ-US_.svg`,"./assets/flags/at.svg":`/assets/at-DGA_6m5E.svg`,"./assets/flags/au.svg":`/assets/au-DAHDIuPI.svg`,"./assets/flags/aw.svg":`/assets/aw-W0PWLK5p.svg`,"./assets/flags/ax.svg":`/assets/ax-DvLIy84U.svg`,"./assets/flags/az.svg":`/assets/az-Bk-bYNxy.svg`,"./assets/flags/ba.svg":`/assets/ba-WdDiSMvP.svg`,"./assets/flags/bb.svg":`/assets/bb-DJxbaxmT.svg`,"./assets/flags/bd.svg":`/assets/bd-BF9t1-60.svg`,"./assets/flags/be.svg":`/assets/be-CLLkK3PN.svg`,"./assets/flags/bf.svg":`/assets/bf-YclsoDuF.svg`,"./assets/flags/bg.svg":`/assets/bg-GUQenraa.svg`,"./assets/flags/bh.svg":`/assets/bh-BQqEGq6F.svg`,"./assets/flags/bi.svg":`/assets/bi-CRmKY6RQ.svg`,"./assets/flags/bj.svg":`/assets/bj-14PhO9bM.svg`,"./assets/flags/bl.svg":`/assets/bl-4CI2YcwX.svg`,"./assets/flags/bm.svg":`/assets/bm-BeYgB2z9.svg`,"./assets/flags/bn.svg":`/assets/bn-B6T3O78g.svg`,"./assets/flags/bo.svg":`/assets/bo-CcUiMqkJ.svg`,"./assets/flags/bq.svg":`/assets/bq-BYpdxEeT.svg`,"./assets/flags/br.svg":`/assets/br-Cu5YU29T.svg`,"./assets/flags/bs.svg":`/assets/bs-7Gd_oriM.svg`,"./assets/flags/bt.svg":`/assets/bt-BTo4qm10.svg`,"./assets/flags/bv.svg":`/assets/bv-wM9JLv4R.svg`,"./assets/flags/bw.svg":`/assets/bw-n5ZaAnGL.svg`,"./assets/flags/by.svg":`/assets/by-C621sBpd.svg`,"./assets/flags/bz.svg":`/assets/bz-BCKHR4_q.svg`,"./assets/flags/ca.svg":`/assets/ca-PYUrLVUV.svg`,"./assets/flags/cc.svg":`/assets/cc-BNT6Xjzk.svg`,"./assets/flags/cd.svg":`/assets/cd-BGclsrP6.svg`,"./assets/flags/cefta.svg":`/assets/cefta-2dDBYygd.svg`,"./assets/flags/cf.svg":`/assets/cf-DRetLmp-.svg`,"./assets/flags/cg.svg":`/assets/cg-CwIyG6SE.svg`,"./assets/flags/ch.svg":`/assets/ch-sfriZoF1.svg`,"./assets/flags/ci.svg":`/assets/ci-C8Q8IYTn.svg`,"./assets/flags/ck.svg":`/assets/ck-DfXMUOTo.svg`,"./assets/flags/cl.svg":`/assets/cl-BgYYb4qP.svg`,"./assets/flags/cm.svg":`/assets/cm-D4yjdmKT.svg`,"./assets/flags/cn.svg":`/assets/cn-DifnnI3t.svg`,"./assets/flags/co.svg":`/assets/co-DV591zMm.svg`,"./assets/flags/cp.svg":`/assets/cp-K_ay05Q_.svg`,"./assets/flags/cr.svg":`/assets/cr-BlYVN-_Q.svg`,"./assets/flags/cu.svg":`/assets/cu-L6XVZNgo.svg`,"./assets/flags/cv.svg":`/assets/cv-CPsfcOfk.svg`,"./assets/flags/cw.svg":`/assets/cw-BbrnximR.svg`,"./assets/flags/cx.svg":`/assets/cx-DpYD6n6U.svg`,"./assets/flags/cy.svg":`/assets/cy-bZuP8hmf.svg`,"./assets/flags/cz.svg":`/assets/cz-WWBC5Aeb.svg`,"./assets/flags/de.svg":`/assets/de-B-2o-4Z9.svg`,"./assets/flags/dg.svg":`/assets/dg-CJPJrjiZ.svg`,"./assets/flags/dj.svg":`/assets/dj-hp_BwbmO.svg`,"./assets/flags/dk.svg":`/assets/dk-DmS9BCZB.svg`,"./assets/flags/dm.svg":`/assets/dm-Cbhezfe1.svg`,"./assets/flags/do.svg":`/assets/do-B86d445t.svg`,"./assets/flags/dz.svg":`/assets/dz-Dytc1TFu.svg`,"./assets/flags/eac.svg":`/assets/eac-CwGQsyAM.svg`,"./assets/flags/ec.svg":`/assets/ec-CaVOFQ3t.svg`,"./assets/flags/ee.svg":`/assets/ee-DufrxGIR.svg`,"./assets/flags/eg.svg":`/assets/eg-YC70hswZ.svg`,"./assets/flags/eh.svg":`/assets/eh-0awM4TVj.svg`,"./assets/flags/en.svg":`/assets/en-BZRN_IpI.svg`,"./assets/flags/er.svg":`/assets/er-X83uml6t.svg`,"./assets/flags/es-ct.svg":`/assets/es-ct-CVyhLp7O.svg`,"./assets/flags/es-ga.svg":`/assets/es-ga-D9xG2hYr.svg`,"./assets/flags/es-pv.svg":`/assets/es-pv-CO3NM2SE.svg`,"./assets/flags/es.svg":`/assets/es-d5m8M5h8.svg`,"./assets/flags/et.svg":`/assets/et-DwdlzOIx.svg`,"./assets/flags/eu.svg":`/assets/eu-Brdgz8ab.svg`,"./assets/flags/fi.svg":`/assets/fi-DWUIkfjL.svg`,"./assets/flags/fj.svg":`/assets/fj-DEAVMg38.svg`,"./assets/flags/fk.svg":`/assets/fk-nuUF_Ak3.svg`,"./assets/flags/fm.svg":`/assets/fm-B4Z83GL0.svg`,"./assets/flags/fo.svg":`/assets/fo-DFjwyWur.svg`,"./assets/flags/fr.svg":`/assets/fr-DVvUyOqI.svg`,"./assets/flags/ga.svg":`/assets/ga-BklUhLH_.svg`,"./assets/flags/gb-eng.svg":`/assets/gb-eng-C8iDhGHN.svg`,"./assets/flags/gb-nir.svg":`/assets/gb-nir-D4gikpNq.svg`,"./assets/flags/gb-sct.svg":`/assets/gb-sct-fW5q01ek.svg`,"./assets/flags/gb-wls.svg":`/assets/gb-wls-Bxz9hxvX.svg`,"./assets/flags/gb.svg":`/assets/gb-DTXiLQoe.svg`,"./assets/flags/gd.svg":`/assets/gd-CO-whzUe.svg`,"./assets/flags/ge.svg":`/assets/ge-B2RiL-Ih.svg`,"./assets/flags/gf.svg":`/assets/gf-DWl5zcw0.svg`,"./assets/flags/gg.svg":`/assets/gg-jdOQS2nU.svg`,"./assets/flags/gh.svg":`/assets/gh-r3LP_X7q.svg`,"./assets/flags/gi.svg":`/assets/gi-BJKE9SzW.svg`,"./assets/flags/gl.svg":`/assets/gl-CHaBnMib.svg`,"./assets/flags/gm.svg":`/assets/gm-Bu99atwn.svg`,"./assets/flags/gn.svg":`/assets/gn-1dJNy9oQ.svg`,"./assets/flags/gp.svg":`/assets/gp-DNyt_wTA.svg`,"./assets/flags/gq.svg":`/assets/gq-Cag8QTk2.svg`,"./assets/flags/gr.svg":`/assets/gr-C5PU0p9p.svg`,"./assets/flags/gs.svg":`/assets/gs-DiiNa0F5.svg`,"./assets/flags/gt.svg":`/assets/gt-CJo5DI-7.svg`,"./assets/flags/gu.svg":`/assets/gu-Di1JYREk.svg`,"./assets/flags/gw.svg":`/assets/gw-D249VY33.svg`,"./assets/flags/gy.svg":`/assets/gy-CcVYUM2E.svg`,"./assets/flags/hk.svg":`/assets/hk-CUNIaSX0.svg`,"./assets/flags/hm.svg":`/assets/hm-Dh6t_Tj3.svg`,"./assets/flags/hn.svg":`/assets/hn-CRjyS_bm.svg`,"./assets/flags/hr.svg":`/assets/hr-fzLfaANM.svg`,"./assets/flags/ht.svg":`/assets/ht-DIMg4gti.svg`,"./assets/flags/hu.svg":`/assets/hu-7Q5wwIIi.svg`,"./assets/flags/ic.svg":`/assets/ic-CSo4d8tH.svg`,"./assets/flags/id.svg":`/assets/id-DiSP6Fmm.svg`,"./assets/flags/ie.svg":`/assets/ie-ChAXClx3.svg`,"./assets/flags/il.svg":`/assets/il-_56OEGLa.svg`,"./assets/flags/im.svg":`/assets/im--VPIqfkF.svg`,"./assets/flags/in.svg":`/assets/in-Cdwu6Bq7.svg`,"./assets/flags/io.svg":`/assets/io-13HOfeJD.svg`,"./assets/flags/iq.svg":`/assets/iq-Dp8HDzo2.svg`,"./assets/flags/ir.svg":`/assets/ir-cCIgaNf6.svg`,"./assets/flags/is.svg":`/assets/is-CZjefTNV.svg`,"./assets/flags/it.svg":`/assets/it-Br7q0Zh6.svg`,"./assets/flags/je.svg":`/assets/je-DyWbhIiC.svg`,"./assets/flags/jm.svg":`/assets/jm-CItSr3iX.svg`,"./assets/flags/jo.svg":`/assets/jo-BAF1FGbm.svg`,"./assets/flags/jp.svg":`/assets/jp-BIMmfxpO.svg`,"./assets/flags/ke.svg":`/assets/ke-C8foqndp.svg`,"./assets/flags/kg.svg":`/assets/kg-B0FsxZiL.svg`,"./assets/flags/kh.svg":`/assets/kh-BeWfuE30.svg`,"./assets/flags/ki.svg":`/assets/ki-p_fAQGbS.svg`,"./assets/flags/km.svg":`/assets/km-B5tqtGG7.svg`,"./assets/flags/kn.svg":`/assets/kn-DVPxDkNY.svg`,"./assets/flags/kp.svg":`/assets/kp-CrDKzoxe.svg`,"./assets/flags/kr.svg":`/assets/kr-BCXH1Hao.svg`,"./assets/flags/kw.svg":`/assets/kw-fSBzmd30.svg`,"./assets/flags/ky.svg":`/assets/ky-Dpsu1myA.svg`,"./assets/flags/kz.svg":`/assets/kz-CwKXYZ8s.svg`,"./assets/flags/la.svg":`/assets/la-CuJflhIW.svg`,"./assets/flags/lb.svg":`/assets/lb-BSjpYEoo.svg`,"./assets/flags/lc.svg":`/assets/lc-CNvab8Ae.svg`,"./assets/flags/li.svg":`/assets/li-CHdhvNcr.svg`,"./assets/flags/lk.svg":`/assets/lk-DUkgV9Tq.svg`,"./assets/flags/lr.svg":`/assets/lr-B84vu3Ds.svg`,"./assets/flags/ls.svg":`/assets/ls-5Xk3Mxq5.svg`,"./assets/flags/lt.svg":`/assets/lt-DoukV-Sm.svg`,"./assets/flags/lu.svg":`/assets/lu-DOI02Msy.svg`,"./assets/flags/lv.svg":`/assets/lv-C-KfY8Yc.svg`,"./assets/flags/ly.svg":`/assets/ly-BWpTK3ux.svg`,"./assets/flags/ma.svg":`/assets/ma-BTRNTRUj.svg`,"./assets/flags/mc.svg":`/assets/mc-PK078JHl.svg`,"./assets/flags/md.svg":`/assets/md-DRlxvNwm.svg`,"./assets/flags/me.svg":`/assets/me-Cv4Gwqah.svg`,"./assets/flags/mf.svg":`/assets/mf-BaAGWwAq.svg`,"./assets/flags/mg.svg":`/assets/mg-C168LHXW.svg`,"./assets/flags/mh.svg":`/assets/mh-gxuIp6Wk.svg`,"./assets/flags/mk.svg":`/assets/mk-D9SIMr-a.svg`,"./assets/flags/ml.svg":`/assets/ml-DVf6ujpi.svg`,"./assets/flags/mm.svg":`/assets/mm-lwT09MQ0.svg`,"./assets/flags/mn.svg":`/assets/mn-CgXyw0O9.svg`,"./assets/flags/mo.svg":`/assets/mo-BAtCjuYA.svg`,"./assets/flags/mp.svg":`/assets/mp-CrOApEqW.svg`,"./assets/flags/mq.svg":`/assets/mq-BFnJ22KI.svg`,"./assets/flags/mr.svg":`/assets/mr-D6G1wpeZ.svg`,"./assets/flags/ms.svg":`/assets/ms-DxciGbUu.svg`,"./assets/flags/mt.svg":`/assets/mt-YqzKx9xl.svg`,"./assets/flags/mu.svg":`/assets/mu-mcq7cUFl.svg`,"./assets/flags/mv.svg":`/assets/mv-BynAllfM.svg`,"./assets/flags/mw.svg":`/assets/mw-C15nc1xZ.svg`,"./assets/flags/mx.svg":`/assets/mx-Cc8Ccfe8.svg`,"./assets/flags/my.svg":`/assets/my-Co4JeeyE.svg`,"./assets/flags/mz.svg":`/assets/mz-Drlr_USV.svg`,"./assets/flags/na.svg":`/assets/na-D79ffb4Z.svg`,"./assets/flags/nc.svg":`/assets/nc-5j7wEmDR.svg`,"./assets/flags/ne.svg":`/assets/ne-B1jPOYkl.svg`,"./assets/flags/nf.svg":`/assets/nf-Dl00mlk2.svg`,"./assets/flags/ng.svg":`/assets/ng-su4NM9If.svg`,"./assets/flags/ni.svg":`/assets/ni-CcFCSQxm.svg`,"./assets/flags/nl.svg":`/assets/nl-BnOa6UiA.svg`,"./assets/flags/no.svg":`/assets/no-qf2JPO73.svg`,"./assets/flags/np.svg":`/assets/np-CIuq5GKd.svg`,"./assets/flags/nr.svg":`/assets/nr-DERIdzkN.svg`,"./assets/flags/nu.svg":`/assets/nu-BfgWvGcd.svg`,"./assets/flags/nz.svg":`/assets/nz-5vODdBjz.svg`,"./assets/flags/om.svg":`/assets/om-DcqxRdQL.svg`,"./assets/flags/pa.svg":`/assets/pa-BLNN9G2-.svg`,"./assets/flags/pc.svg":`/assets/pc-BJpYiA9b.svg`,"./assets/flags/pe.svg":`/assets/pe-BLqhuu1C.svg`,"./assets/flags/pf.svg":`/assets/pf-C8ahG68q.svg`,"./assets/flags/pg.svg":`/assets/pg-BAYpbp9Z.svg`,"./assets/flags/ph.svg":`/assets/ph-BEzTn62K.svg`,"./assets/flags/pk.svg":`/assets/pk-CWMEc3ad.svg`,"./assets/flags/pl.svg":`/assets/pl-o38JROoc.svg`,"./assets/flags/pm.svg":`/assets/pm-CHiP5UmZ.svg`,"./assets/flags/pn.svg":`/assets/pn-DgxdtieE.svg`,"./assets/flags/pr.svg":`/assets/pr-B4tMV0xm.svg`,"./assets/flags/ps.svg":`/assets/ps-DO8YKYeS.svg`,"./assets/flags/pt.svg":`/assets/pt-DZ2ADgIR.svg`,"./assets/flags/pw.svg":`/assets/pw-CQP52WMX.svg`,"./assets/flags/py.svg":`/assets/py-mNzh0mZC.svg`,"./assets/flags/qa.svg":`/assets/qa-Dkmpc78M.svg`,"./assets/flags/re.svg":`/assets/re-Bk4ipYK1.svg`,"./assets/flags/ro.svg":`/assets/ro-CoSeqKY1.svg`,"./assets/flags/rs.svg":`/assets/rs-BfwKwXtn.svg`,"./assets/flags/ru.svg":`/assets/ru-D-4tNwXt.svg`,"./assets/flags/rw.svg":`/assets/rw-D7nbSYKI.svg`,"./assets/flags/sa.svg":`/assets/sa-Dh79zbT9.svg`,"./assets/flags/sb.svg":`/assets/sb-BDTYjcbk.svg`,"./assets/flags/sc.svg":`/assets/sc-CRNsSLg9.svg`,"./assets/flags/sd.svg":`/assets/sd-ClziNjGr.svg`,"./assets/flags/se.svg":`/assets/se-8C923vhy.svg`,"./assets/flags/sg.svg":`/assets/sg-DGYIMG0G.svg`,"./assets/flags/sh-ac.svg":`/assets/sh-ac-FjwY7RYr.svg`,"./assets/flags/sh-hl.svg":`/assets/sh-hl-CqtQPzWZ.svg`,"./assets/flags/sh-ta.svg":`/assets/sh-ta-CPJublpi.svg`,"./assets/flags/sh.svg":`/assets/sh-DNImvbrE.svg`,"./assets/flags/si.svg":`/assets/si-BMKT-Tec.svg`,"./assets/flags/sj.svg":`/assets/sj-BFFEGknm.svg`,"./assets/flags/sk.svg":`/assets/sk-K9BNIYAO.svg`,"./assets/flags/sl.svg":`/assets/sl-DxLJY5vJ.svg`,"./assets/flags/sm.svg":`/assets/sm-DGBIRFB_.svg`,"./assets/flags/sn.svg":`/assets/sn-S8ipNF1U.svg`,"./assets/flags/so.svg":`/assets/so-DlzA2Fco.svg`,"./assets/flags/sr.svg":`/assets/sr-Co7OKBh3.svg`,"./assets/flags/ss.svg":`/assets/ss-CxVEpdPD.svg`,"./assets/flags/st.svg":`/assets/st-C1Nd1c3V.svg`,"./assets/flags/sv.svg":`/assets/sv-CJIHhYwF.svg`,"./assets/flags/sx.svg":`/assets/sx-nDhIaDNb.svg`,"./assets/flags/sy.svg":`/assets/sy-DwSud114.svg`,"./assets/flags/sz.svg":`/assets/sz-qxMwa2gs.svg`,"./assets/flags/tc.svg":`/assets/tc-dtelpZmc.svg`,"./assets/flags/td.svg":`/assets/td-BsuVhZpT.svg`,"./assets/flags/tf.svg":`/assets/tf-Co33RhQH.svg`,"./assets/flags/tg.svg":`/assets/tg-CP1-sc35.svg`,"./assets/flags/th.svg":`/assets/th-tzq84hgd.svg`,"./assets/flags/tj.svg":`/assets/tj-b-aWfOTb.svg`,"./assets/flags/tk.svg":`/assets/tk-CDucsEss.svg`,"./assets/flags/tl.svg":`/assets/tl-wpo93AGk.svg`,"./assets/flags/tm.svg":`/assets/tm-C_WSgUcv.svg`,"./assets/flags/tn.svg":`/assets/tn-BcKCZULf.svg`,"./assets/flags/to.svg":`/assets/to-D8uVsoxb.svg`,"./assets/flags/tr.svg":`/assets/tr-Cd6FO9Bg.svg`,"./assets/flags/tt.svg":`/assets/tt-CTnr7aY5.svg`,"./assets/flags/tv.svg":`/assets/tv-DDqkVT-n.svg`,"./assets/flags/tw.svg":`/assets/tw-d-Mf-0VT.svg`,"./assets/flags/tz.svg":`/assets/tz-BjLtHeil.svg`,"./assets/flags/ua.svg":`/assets/ua-Bq0XgQqK.svg`,"./assets/flags/ug.svg":`/assets/ug-ByL2ejGl.svg`,"./assets/flags/um.svg":`/assets/um-Bhke9Eic.svg`,"./assets/flags/un.svg":`/assets/un-Bqg4Cbbh.svg`,"./assets/flags/us.svg":`/assets/us-C73uVeEr.svg`,"./assets/flags/uy.svg":`/assets/uy-DD6peej-.svg`,"./assets/flags/uz.svg":`/assets/uz-C2f-Cubn.svg`,"./assets/flags/va.svg":`/assets/va-B9-hqIE-.svg`,"./assets/flags/vc.svg":`/assets/vc-COpmFovN.svg`,"./assets/flags/ve.svg":`/assets/ve-BSqnIB9l.svg`,"./assets/flags/vg.svg":`/assets/vg-C7xY6pic.svg`,"./assets/flags/vi.svg":`/assets/vi-BC_zcciE.svg`,"./assets/flags/vn.svg":`/assets/vn-BEAEijd0.svg`,"./assets/flags/vu.svg":`/assets/vu-D6k0NQlg.svg`,"./assets/flags/wf.svg":`/assets/wf-DrxpOO_G.svg`,"./assets/flags/ws.svg":`/assets/ws-vzJNwdVm.svg`,"./assets/flags/xk.svg":`/assets/xk-Bj15g7cp.svg`,"./assets/flags/xx.svg":`/assets/xx-zm_JmrXl.svg`,"./assets/flags/ye.svg":`/assets/ye-BwST9gXC.svg`,"./assets/flags/yt.svg":`/assets/yt-DIfEG0ex.svg`,"./assets/flags/za.svg":`/assets/za-Jz40JTrv.svg`,"./assets/flags/zm.svg":`/assets/zm-BmsW91ne.svg`,"./assets/flags/zw.svg":`/assets/zw-U0m7oJ5e.svg`}),Cw=new Map;for(let[e,t]of Object.entries(Sw)){let n=e.match(/\/([^/]+)\.svg$/);n&&Cw.set(n[1].toLowerCase(),t)}function ww(e){return Cw.get(e.toLowerCase())}var Tw=[`src`,`alt`,`width`,`height`],Ew=F({__name:`Flag`,props:{code:{},override:{},size:{default:16}},setup(e){let t=e,n=q(()=>ew(t.code,t.override)),r=q(()=>n.value.flagRegion?ww(n.value.flagRegion):void 0),i=q(()=>Math.round(t.size*4/3));return(t,a)=>r.value?(z(),B(`img`,{key:0,src:r.value,alt:n.value.name,width:i.value,height:e.size,class:`inline-block shrink-0 rounded-[2px] object-cover ring-1 ring-black/10`,style:me({width:`${i.value}px`,height:`${e.size}px`})},null,12,Tw)):(z(),V(N(qu),{key:1,class:`inline-block shrink-0 text-muted-foreground`,style:me({width:`${e.size}px`,height:`${e.size}px`}),"aria-hidden":`true`},null,8,[`style`]))}}),Dw={class:`inline-flex min-w-0 items-start gap-2`},Ow={class:`flex min-w-0 flex-col leading-tight`},kw={class:`flex items-center gap-1.5`},Aw={class:`font-mono text-[11.5px] font-semibold tracking-wide`},jw={key:0,class:`truncate text-[11px] text-muted-foreground`},Mw={class:`inline-flex min-w-0 items-center gap-1.5`},Nw={key:0,class:`truncate`},Pw=F({__name:`LanguageLabel`,props:{code:{},override:{},showName:{type:Boolean,default:!1},showCode:{type:Boolean,default:!0},size:{default:16},codeMinChars:{},layout:{default:`inline`}},setup(e){let t=e,n=q(()=>ew(t.code,t.override));return(t,r)=>e.layout===`stacked`?(z(),V(N(dx),{key:0},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`span`,Dw,[U(Ew,{code:e.code,override:e.override,size:e.size,class:`mt-0.5 shrink-0`},null,8,[`code`,`override`,`size`]),H(`span`,Ow,[H(`span`,kw,[H(`span`,Aw,j(e.code.toUpperCase()),1),n.value.rtl?(z(),V(N(dx),{key:0},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[...r[0]||=[H(`span`,{class:`rounded border border-border px-1 text-[9px] font-bold uppercase tracking-wide text-muted-foreground`},`RTL`,-1)]]),_:1}),U(N(HC),null,{default:P(()=>[...r[1]||=[W(`Right-to-left`,-1)]]),_:1})]),_:1})):G(``,!0)]),e.showName?(z(),B(`span`,jw,j(n.value.name),1)):G(``,!0)])])]),_:1}),U(N(HC),null,{default:P(()=>[W(j(n.value.name),1)]),_:1})]),_:1})):(z(),V(N(dx),{key:1},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`span`,Mw,[U(Ew,{code:e.code,override:e.override,size:e.size},null,8,[`code`,`override`,`size`]),e.showName?(z(),B(`span`,Nw,j(n.value.name),1)):G(``,!0),e.showCode?(z(),B(`span`,{key:1,class:`font-mono text-xs`,style:me(e.codeMinChars==null?void 0:{minWidth:`${e.codeMinChars}ch`})},j(e.code.toUpperCase()),5)):G(``,!0)])]),_:1}),U(N(HC),null,{default:P(()=>[W(j(n.value.name),1)]),_:1})]),_:1}))}}),Fw=[`data-state`],Iw={class:`flex flex-wrap items-start gap-2 pt-0.5`},Lw={key:0,class:`rounded-md border border-border-soft bg-accent px-1.5 py-0.5 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground`},Rw=[`dir`],zw={key:0,"data-testid":`filling-hint`,class:`flex items-center gap-1.5 text-sm italic text-muted-foreground`},Bw={key:0,class:`flex items-center justify-end gap-1.5 pt-0.5`},Vw={type:`button`,class:`flex size-7 items-center justify-center rounded-md bg-destructive-soft text-destructive transition hover:brightness-95 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,"aria-label":`Show issues`},Hw={class:`flex flex-col gap-1`},Uw={key:0,class:`mt-2 border-t pt-2`},Ww={class:`flex flex-wrap gap-1`},Gw=[`onClick`],Kw=[`disabled`],qw=F({__name:`TranslationRow`,props:{keyName:{},locale:{},sourceLocale:{},value:{},maxLength:{},issues:{},labelChars:{},plural:{},sourceForms:{},filling:{type:Boolean}},emits:[`changed`],setup(e,{emit:t}){let n=e,r=t,i=q(()=>n.locale===n.sourceLocale),a=q(()=>n.value?.state??(i.value?`source`:`needs-review`)),o=q(()=>n.value?.value??``),s=q(()=>!!n.plural),c=q(()=>n.value?.forms??{}),l=q(()=>$C(n.locale)),u=q(()=>!i.value&&(s.value?Object.keys(c.value).length>0:!!n.value?.value)),d=q(()=>(n.issues?.length??0)>0),f=q(()=>[...new Set((n.issues??[]).filter(e=>e.check===`spelling`).flatMap(e=>e.detail??[]))]);async function p(e){try{await _f(e),$.success(`Added "${e}" to the dictionary`),r(`changed`)}catch(e){$.error(`Could not add word: ${e.message}`)}}let m=M(!1);async function h(){try{await Vd(n.keyName,n.locale),$.success(`Cleared`),r(`changed`)}catch(e){$.error(e.message)}}async function g(e){try{await Bd(n.keyName,n.locale,e),r(`changed`)}catch(e){$.error(`Could not update state: ${e.message}`)}}async function _(){m.value=!0;try{let e=await Gd({onlyMissing:!1,locales:[n.locale],keyGlob:n.keyName,force:!0});e.errors?.length?$.error(e.errors[0]?.error??`Translation failed`):$.success(`Translated ${n.locale.toUpperCase()} (${e.written} written)`),r(`changed`)}catch(e){$.error(`Translate failed: ${e.message}`)}finally{m.value=!1}}return(t,n)=>(z(),B(`div`,{class:A(N(US)(`grid grid-cols-[172px_minmax(0,1fr)_232px] items-start gap-[18px] border-b border-border-soft py-[11px] pl-4 pr-[18px] last:border-b-0 max-[1080px]:grid-cols-[150px_minmax(0,1fr)_200px] max-[1080px]:gap-3`,i.value&&`bg-foreground/[0.015] dark:bg-foreground/[0.025]`)),"data-state":a.value},[H(`div`,Iw,[U(Pw,{code:e.locale,layout:`stacked`,"show-name":``,size:15},null,8,[`code`]),i.value?(z(),B(`span`,Lw,`Source`)):G(``,!0)]),H(`div`,{class:`flex min-w-0 flex-col gap-2`,dir:l.value?`rtl`:`ltr`},[e.filling?(z(),B(`div`,zw,[U(N($u),{class:`size-3.5 shrink-0 animate-spin`}),n[2]||=W(` filling… `,-1)])):s.value?(z(),V(xw,{key:1,"key-name":e.keyName,locale:e.locale,"source-locale":e.sourceLocale,arg:e.plural.arg,forms:c.value,"source-forms":e.sourceForms,"max-length":e.maxLength,onChanged:n[0]||=e=>r(`changed`)},null,8,[`key-name`,`locale`,`source-locale`,`arg`,`forms`,`source-forms`,`max-length`])):(z(),V(fw,{key:2,"key-name":e.keyName,locale:e.locale,"source-locale":e.sourceLocale,value:o.value,"max-length":e.maxLength,onChanged:n[1]||=e=>r(`changed`)},null,8,[`key-name`,`locale`,`source-locale`,`value`,`max-length`]))],8,Rw),i.value?G(``,!0):(z(),B(`div`,Bw,[d.value?(z(),V(N(eb),{key:0},{default:P(()=>[U(N(ob),{"as-child":``},{default:P(()=>[H(`button`,Vw,[U(N(Td),{class:`size-3.5`})])]),_:1}),U(N($S),{align:`end`,class:`w-fit max-w-xs text-xs`},{default:P(()=>[H(`ul`,Hw,[(z(!0),B(R,null,I(e.issues,(e,t)=>(z(),B(`li`,{key:t,class:`whitespace-pre-line text-foreground/80`},j(e.message),1))),128))]),f.value.length?(z(),B(`div`,Uw,[n[3]||=H(`p`,{class:`mb-1 text-[11px] font-medium text-muted-foreground`},`Add to dictionary`,-1),H(`div`,Ww,[(z(!0),B(R,null,I(f.value,e=>(z(),V(N(dx),{key:e},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,class:`inline-flex items-center gap-0.5 rounded border border-amber-500/40 px-1.5 py-0.5 text-[11px] text-amber-700 transition-colors hover:bg-amber-500/10 dark:text-amber-300`,onClick:t=>p(e)},[U(N(od),{class:`size-3`}),W(j(e),1)],8,Gw)]),_:2},1024),U(N(HC),null,{default:P(()=>[W(`Add '`+j(e)+`' to the custom dictionary`,1)]),_:2},1024)]),_:2},1024))),128))])])):G(``,!0)]),_:1})]),_:1})):G(``,!0),u.value?(z(),V(N(dx),{key:1},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,class:`flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,"aria-label":`Clear translation`,onClick:Jl(h,[`stop`])},[U(N(Ru),{class:`size-4`})])]),_:1}),U(N(HC),null,{default:P(()=>[...n[4]||=[W(`Clear translation`,-1)]]),_:1})]),_:1})):G(``,!0),U(N(dx),null,{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,class:`flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-primary-soft hover:text-primary disabled:opacity-50`,disabled:m.value||e.filling,"aria-label":`AI translate this cell`,onClick:Jl(_,[`stop`])},[m.value||e.filling?(z(),V(N($u),{key:0,class:`size-4 animate-spin`})):(z(),V(N(Zu),{key:1,class:`size-4`}))],8,Kw)]),_:1}),U(N(HC),null,{default:P(()=>[...n[5]||=[W(`AI translate`,-1)]]),_:1})]),_:1}),U(rw,{state:a.value,editable:!0,onSetState:g},null,8,[`state`])]))],10,Fw))}}),Jw=[`aria-pressed`],Yw={key:0,class:`pointer-events-none absolute inset-0 z-[3] border-2 border-primary`,"aria-hidden":`true`},Xw={key:1,class:`pointer-events-none absolute inset-y-0 left-0 z-[4] w-1 bg-primary`,"aria-hidden":`true`},Zw={class:`sticky top-3`},Qw=[`aria-checked`],$w={class:`absolute right-0 top-0`},eT=[`disabled`],tT=[`innerHTML`],nT={key:0,class:`mt-1.5 flex flex-wrap items-center gap-1.5 pl-6`},rT={key:0,class:`inline-flex items-center gap-1 rounded-md border border-primary-border bg-primary/[0.09] px-1.5 py-0.5 font-mono text-[10px] font-bold uppercase tracking-wide text-primary`},iT={class:`font-medium normal-case text-muted-foreground`},aT={"data-testid":`issue-badge`,class:`inline-flex items-center gap-1 rounded-md bg-destructive-soft px-1.5 py-0.5 text-[11.5px] font-bold text-destructive`},oT={key:1,class:`mt-2 flex flex-wrap gap-1.5 pl-6`},sT=[`onClick`],cT=[`data-testid`,`disabled`],lT={key:3,"data-testid":`translating-missing`,class:`ml-6 mt-2.5 inline-flex items-center gap-1 text-[11px] text-primary`},uT=[`disabled`],dT={class:`min-w-0 flex-1 [&>*:nth-child(even)]:bg-zebra`},fT={class:`grid gap-2`},pT={class:`break-all rounded bg-muted px-1 py-0.5 font-mono text-sm`},mT=F({__name:`KeyRow`,props:{keyName:{},entry:{},sourceLocale:{},locales:{},selected:{type:Boolean},checked:{type:Boolean},issues:{}},emits:[`changed`,`select`,`toggle-select`,`renamed`,`filter-tag`],setup(e,{emit:t}){let n=e,r=q(()=>n.keyName.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/\./g,`.<wbr>`)),i=q(()=>{let e=new Map;for(let t of n.issues??[]){let n=e.get(t.locale);n?n.push(t):e.set(t.locale,[t])}return e}),a=t,o=M(!1),s=M(``),c=M(!1),l=M(!1),u=M(!1),d=M(!1),f=q(()=>KC(n.entry,n.locales,n.sourceLocale)),p=q(()=>qC(n.entry,n.locales,n.sourceLocale));async function m(){d.value=!0;try{let e=await Gd({onlyMissing:!1,force:!0,keyGlob:n.keyName,locales:p.value});e.errors?.length?$.error(e.errors[0]?.error??`Translation failed`):$.success(`Re-translated ${e.written} stale value${e.written===1?``:`s`}`),a(`changed`)}catch(e){$.error(`Translate failed: ${e.message}`)}finally{d.value=!1}}async function h(){u.value=!0;try{let e=await Gd({onlyMissing:!0,keyGlob:n.keyName});e.errors?.length?$.error(e.errors[0]?.error??`Translation failed`):$.success(`Translated ${e.written} missing value${e.written===1?``:`s`}`),a(`changed`)}catch(e){$.error(`Translate failed: ${e.message}`)}finally{u.value=!1}}function g(e){a(`toggle-select`,{shift:e.shiftKey})}function _(e){e.target?.closest(`button, input, textarea, select, a, [contenteditable="true"]`)||a(`select`)}async function v(){let e=!n.entry.skipTranslate;l.value=!0;try{await Ld([n.keyName],{skipTranslate:e}),$.success(e?`Excluded from translation`:`Included in translation`),a(`changed`)}catch(e){$.error(`Update failed: ${e.message}`)}finally{l.value=!1}}function y(){s.value=n.keyName,o.value=!0}async function b(){let e=s.value.trim();if(!e||e===n.keyName){o.value=!1;return}l.value=!0;try{await Rd(n.keyName,{rename:e}),o.value=!1,$.success(`Renamed to ${e}`),a(`renamed`,e)}catch(e){$.error(`Rename failed: ${e.message}`)}finally{l.value=!1}}async function x(){l.value=!0;try{await Nd(n.keyName),c.value=!1,$.success(`Deleted ${n.keyName}`),a(`changed`)}catch(e){$.error(`Delete failed: ${e.message}`)}finally{l.value=!1}}return(t,n)=>(z(),B(`div`,{class:A(N(US)(`relative flex border-b-2 border-border bg-card`,e.selected&&`z-[1]`)),role:`button`,"aria-pressed":e.selected,"aria-label":`Select key`,onClick:_},[e.selected?(z(),B(`span`,Yw)):G(``,!0),e.selected?(z(),B(`span`,Xw)):G(``,!0),H(`div`,{class:A(N(US)(`relative w-[var(--key-col-width,272px)] shrink-0 border-r border-border-soft p-[14px_16px_14px_18px]`,e.selected&&`bg-primary-soft/60`))},[H(`div`,Zw,[H(`button`,{type:`button`,role:`checkbox`,"aria-checked":!!e.checked,"data-testid":`row-select`,class:A([`absolute left-0 top-0.5 flex size-4 items-center justify-center rounded border transition-colors`,e.checked?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`]),"aria-label":`Select key`,onClick:Jl(g,[`stop`])},[e.checked?(z(),V(N(Du),{key:0,class:`size-3`})):G(``,!0)],10,Qw),H(`div`,$w,[U(N(lb),null,{default:P(()=>[U(N(hb),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,class:`flex size-6 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":`Key actions`,disabled:u.value,onClick:n[0]||=Jl(()=>{},[`stop`])},[U(N(Lu),{class:`size-4`})],8,eT)]),_:1}),U(N(NC),{align:`end`},{default:P(()=>[f.value.length>0?(z(),V(N(PC),{key:0,disabled:u.value,onSelect:h},{default:P(()=>[U(N(vd),{class:`size-4`}),W(` Translate missing (`+j(f.value.length)+`) `,1)]),_:1},8,[`disabled`])):G(``,!0),U(N(PC),{onSelect:y},{default:P(()=>[U(N(ad),{class:`size-4`}),n[9]||=W(` Rename `,-1)]),_:1}),U(N(PC),{"data-testid":`toggle-skip`,disabled:l.value,onSelect:v},{default:P(()=>[U(N(Zu),{class:`size-4`}),W(` `+j(e.entry.skipTranslate?`Include in translation`:`Skip translation`),1)]),_:1},8,[`disabled`]),U(N(PC),{class:`text-destructive data-[highlighted]:bg-destructive/10 data-[highlighted]:text-destructive`,onSelect:n[1]||=e=>c.value=!0},{default:P(()=>[U(N(wd),{class:`size-4`}),n[10]||=W(` Delete `,-1)]),_:1})]),_:1})]),_:1})]),H(`div`,{class:`break-words pl-6 pr-7 font-mono text-[13.5px] font-semibold tracking-tight cursor-pointer`,onClick:n[2]||=Jl(e=>g(e),[`stop`])},[H(`span`,{innerHTML:r.value},null,8,tT),e.entry.screenshot?(z(),V(N(Yu),{key:0,class:`ml-1.5 inline size-3.5 align-[-2px] text-muted-foreground`,"aria-label":`Has screenshot`})):G(``,!0)]),e.entry.plural||e.entry.skipTranslate||(e.issues?.length??0)>0?(z(),B(`div`,nT,[e.entry.plural?(z(),B(`span`,rT,[n[11]||=W(`PLURAL`,-1),H(`span`,iT,`· `+j(e.entry.plural.arg),1)])):G(``,!0),e.entry.skipTranslate?(z(),V(N(dx),{key:1},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[...n[12]||=[H(`span`,{"data-testid":`skip-badge`,class:`inline-flex items-center gap-1 rounded-md border border-warning-border bg-warning-bg px-1.5 py-0.5 font-mono text-[10px] font-bold uppercase tracking-wide text-warning`},`SKIP`,-1)]]),_:1}),U(N(HC),null,{default:P(()=>[...n[13]||=[W(`Excluded from translation`,-1)]]),_:1})]),_:1})):G(``,!0),(e.issues?.length??0)>0?(z(),V(N(dx),{key:2},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`span`,aT,[U(N(Td),{class:`size-3`}),W(j(e.issues.length),1)])]),_:1}),U(N(HC),null,{default:P(()=>[W(j(e.issues.length)+` issue`+j(e.issues.length===1?``:`s`),1)]),_:1})]),_:1})):G(``,!0)])):G(``,!0),(e.entry.tags??[]).length?(z(),B(`div`,oT,[(z(!0),B(R,null,I(e.entry.tags,e=>(z(),V(N(dx),{key:e},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,class:`inline-flex h-[22px] items-center gap-1.5 rounded-full border border-primary-border bg-transparent px-[9px] text-xs font-medium text-foreground transition-colors hover:border-primary hover:bg-primary/[0.07]`,onClick:Jl(t=>a(`filter-tag`,e),[`stop`])},[U(N(Sd),{class:`size-3 text-primary`}),W(j(e),1)],8,sT)]),_:2},1024),U(N(HC),null,{default:P(()=>[W(`Filter by tag: `+j(e),1)]),_:2},1024)]),_:2},1024))),128))])):G(``,!0),f.value.length>0?(z(),V(N(dx),{key:2},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,"data-testid":u.value?`translating-missing`:`translate-missing-btn`,disabled:u.value,class:`ml-6 mt-2.5 inline-flex items-center gap-1.5 rounded-lg border border-primary-border bg-primary-soft px-2.5 py-1.5 text-[11.5px] font-semibold text-primary transition hover:brightness-95 disabled:opacity-80`,onClick:Jl(h,[`stop`])},[u.value?(z(),V(N($u),{key:0,class:`size-3 animate-spin`})):(z(),V(N(vd),{key:1,class:`size-3`})),W(` `+j(u.value?`Translating…`:`Translate ${f.value.length} missing`),1)],8,cT)]),_:1}),U(N(HC),null,{default:P(()=>[W(`Translate the `+j(f.value.length)+` missing language`+j(f.value.length>1?`s`:``)+` for this key`,1)]),_:1})]),_:1})):u.value?(z(),B(`span`,lT,[U(N($u),{class:`size-3 animate-spin`}),n[14]||=W(` Translating… `,-1)])):G(``,!0),p.value.length>0?(z(),V(N(dx),{key:4},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,"data-testid":`retranslate-stale-btn`,disabled:d.value,class:`ml-6 mt-2.5 inline-flex items-center gap-1.5 rounded-lg border border-amber-500/40 bg-amber-500/10 px-2.5 py-1.5 text-[11.5px] font-semibold text-amber-700 transition hover:brightness-95 disabled:opacity-80 dark:text-amber-300`,onClick:Jl(m,[`stop`])},[d.value?(z(),V(N($u),{key:0,class:`size-3 animate-spin`})):(z(),V(N(sd),{key:1,class:`size-3`})),W(` `+j(d.value?`Re-translating…`:`Re-translate ${p.value.length} stale`),1)],8,uT)]),_:1}),U(N(HC),null,{default:P(()=>[W(`Re-translate the `+j(p.value.length)+` stale language`+j(p.value.length>1?`s`:``)+` for this key`,1)]),_:1})]),_:1})):G(``,!0)])],2),H(`div`,dT,[(z(!0),B(R,null,I(e.locales,t=>(z(),V(qw,{key:t,"key-name":e.keyName,locale:t,"source-locale":e.sourceLocale,value:e.entry.values[t],"max-length":e.entry.maxLength,issues:i.value.get(t)??[],plural:e.entry.plural,"source-forms":e.entry.values[e.sourceLocale]?.forms,filling:u.value&&f.value.includes(t)||d.value&&p.value.includes(t),onChanged:n[3]||=e=>a(`changed`)},null,8,[`key-name`,`locale`,`source-locale`,`value`,`max-length`,`issues`,`plural`,`source-forms`,`filling`]))),128))]),U(N(Ph),{open:o.value,"onUpdate:open":n[6]||=e=>o.value=e},{default:P(()=>[U(N(OC),{class:`max-w-md`},{default:P(()=>[U(N(kC),null,{default:P(()=>[U(N(jC),null,{default:P(()=>[...n[15]||=[W(`Rename key`,-1)]]),_:1}),U(N(MC),null,{default:P(()=>[...n[16]||=[W(`Use dot notation, e.g. `,-1),H(`span`,{class:`font-mono`},`home.title`,-1),W(`.`,-1)]]),_:1})]),_:1}),H(`div`,fT,[U(N(DC),{for:`rename-key`},{default:P(()=>[...n[17]||=[W(`New key`,-1)]]),_:1}),U(N(KS),{id:`rename-key`,modelValue:s.value,"onUpdate:modelValue":n[4]||=e=>s.value=e,class:`font-mono`,onKeydown:Xl(Jl(b,[`prevent`]),[`enter`])},null,8,[`modelValue`,`onKeydown`])]),U(N(AC),null,{default:P(()=>[U(N(Q),{variant:`outline`,disabled:l.value,onClick:n[5]||=e=>o.value=!1},{default:P(()=>[...n[18]||=[W(`Cancel`,-1)]]),_:1},8,[`disabled`]),U(N(Q),{disabled:l.value,onClick:b},{default:P(()=>[...n[19]||=[W(`Rename`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]),U(N(Ph),{open:c.value,"onUpdate:open":n[8]||=e=>c.value=e},{default:P(()=>[U(N(OC),{class:`max-w-md`},{default:P(()=>[U(N(kC),null,{default:P(()=>[U(N(jC),null,{default:P(()=>[...n[20]||=[W(`Delete key`,-1)]]),_:1}),U(N(MC),null,{default:P(()=>[n[21]||=W(` Delete `,-1),H(`code`,pT,j(e.keyName),1),n[22]||=W(` and all its translations? This cannot be undone. `,-1)]),_:1})]),_:1}),U(N(AC),null,{default:P(()=>[U(N(Q),{variant:`outline`,disabled:l.value,onClick:n[7]||=e=>c.value=!1},{default:P(()=>[...n[23]||=[W(`Cancel`,-1)]]),_:1},8,[`disabled`]),U(N(Q),{variant:`destructive`,disabled:l.value,onClick:x},{default:P(()=>[...n[24]||=[W(`Delete`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`])],10,Jw))}}),hT=[{id:`phpstorm`,label:`PhpStorm`,buildUrl:e=>`phpstorm://open?file=${encodeURIComponent(e.abs)}&line=${e.line}`},{id:`vscode`,label:`VS Code`,buildUrl:e=>`vscode://file${e.abs}:${e.line}:${e.col}`},{id:`zed`,label:`Zed`,buildUrl:e=>`zed://file${e.abs}:${e.line}:${e.col}`}],gT=`vscode`,_T=e=>hT.some(t=>t.id===e),vT=M(gT);function yT(e){_T(e)&&(vT.value=e,ff({editor:e}).catch(()=>{}))}async function bT(){try{let{editor:e}=await df();_T(e)&&(vT.value=e)}catch{}}function xT(e,t){return(hT.find(e=>e.id===vT.value)??hT[0]).buildUrl(e,t)}function ST(){return{dirs:new Map,files:new Map}}function CT(e){let t=ST();for(let n of e){let e=n.file.split(`/`).filter(Boolean),r=e.pop()??n.file,i=t;for(let t of e){let e=i.dirs.get(t);e||(e=ST(),i.dirs.set(t,e)),i=e}let a=i.files.get(r)??[];a.push({line:n.line,url:n.url}),i.files.set(r,a)}let n=[],r=(e,t)=>{for(let i of[...e.dirs.keys()].sort()){let a=i,o=e.dirs.get(i);for(;o.files.size===0&&o.dirs.size===1;){let e=[...o.dirs.keys()][0];a+=`/`+e,o=o.dirs.get(e)}n.push({kind:`dir`,depth:t,label:a}),r(o,t+1)}for(let r of[...e.files.keys()].sort()){let i=e.files.get(r).slice().sort((e,t)=>e.line-t.line);n.push({kind:`file`,depth:t,name:r,refs:i})}};return r(t,0),n}var wT={class:`flex flex-col gap-2`},TT={class:`flex items-center gap-1.5`},ET={key:0,class:`flex flex-col gap-2`},DT={class:`mt-1 flex gap-2`},OT={class:`flex items-center justify-between`},kT={class:`font-mono text-[10px] text-muted-foreground`},AT={class:`flex gap-1.5`},jT=[`onClick`],MT=[`onClick`],NT={class:`whitespace-pre-wrap break-words text-[12.5px] leading-snug`},PT=F({__name:`NotesEditor`,props:{keyName:{},notes:{}},emits:[`changed`],setup(e,{emit:t}){let n=e,r=t,i=e=>new Date(e).toLocaleString(),a=M(``),o=M(!1);async function s(){let e=a.value.trim();if(e){o.value=!0;try{await Cf(n.keyName,e),a.value=``,r(`changed`)}catch(e){$.error(`Could not add note: ${e.message}`)}finally{o.value=!1}}}let c=M(null),l=M(``),u=M(!1);function d(e){c.value=e.id,l.value=e.text}function f(){c.value=null,l.value=``}async function p(e){let t=l.value.trim();if(t){u.value=!0;try{await wf(n.keyName,e,t),f(),r(`changed`)}catch(e){$.error(`Could not save note: ${e.message}`)}finally{u.value=!1}}}async function m(e){try{await Tf(n.keyName,e),r(`changed`)}catch(e){$.error(`Could not delete note: ${e.message}`)}}return(t,n)=>(z(),B(`div`,wT,[H(`div`,TT,[U(N(bd),{class:`size-3.5 text-muted-foreground`}),n[2]||=H(`p`,{class:`text-[13px] font-semibold`},`Notes`,-1)]),n[6]||=H(`p`,{class:`-mt-1 text-[11.5px] text-muted-foreground`},`Internal notes — never sent to the AI or exported.`,-1),e.notes.length?(z(),B(`ul`,ET,[(z(!0),B(R,null,I(e.notes,e=>(z(),B(`li`,{key:e.id,class:`flex flex-col gap-1 rounded-lg border border-border-soft bg-background p-2.5 text-sm`},[c.value===e.id?(z(),B(R,{key:0},[U(N(sw),{modelValue:l.value,"onUpdate:modelValue":n[0]||=e=>l.value=e,rows:`2`,onKeydown:Xl(Jl(f,[`prevent`]),[`escape`])},null,8,[`modelValue`,`onKeydown`]),H(`div`,DT,[U(N(Q),{size:`sm`,disabled:u.value||!l.value.trim(),onClick:t=>p(e.id)},{default:P(()=>[...n[3]||=[W(`Save`,-1)]]),_:1},8,[`disabled`,`onClick`]),U(N(Q),{size:`sm`,variant:`ghost`,onClick:f},{default:P(()=>[...n[4]||=[W(`Cancel`,-1)]]),_:1})])],64)):(z(),B(R,{key:1},[H(`div`,OT,[H(`span`,kT,j(i(e.at)),1),H(`span`,AT,[H(`button`,{type:`button`,"aria-label":`Edit note`,class:`text-muted-foreground hover:text-foreground`,onClick:t=>d(e)},[U(N(ad),{class:`size-3.5`})],8,jT),H(`button`,{type:`button`,"aria-label":`Delete note`,class:`text-muted-foreground hover:text-destructive`,onClick:t=>m(e.id)},[U(N(wd),{class:`size-3.5`})],8,MT)])]),H(`p`,NT,j(e.text),1)],64))]))),128))])):G(``,!0),U(N(sw),{"data-testid":`new-note`,modelValue:a.value,"onUpdate:modelValue":n[1]||=e=>a.value=e,rows:`2`,placeholder:`Add an internal note…`},null,8,[`modelValue`]),U(N(Q),{"data-testid":`add-note`,variant:`outline`,class:`w-full text-muted-foreground`,disabled:o.value||!a.value.trim(),onClick:s},{default:P(()=>[...n[5]||=[W(` Add note `,-1)]]),_:1},8,[`disabled`])]))}}),FT={class:`flex shrink-0 flex-col overflow-y-auto border-l border-border bg-card max-[1080px]:hidden`},IT={key:0,class:`flex flex-1 flex-col items-center justify-center gap-2.5 p-10 text-center text-muted-foreground`},LT={key:1,class:`flex flex-col gap-4 px-5 pb-10 pt-[18px]`},RT={class:`flex flex-col gap-0.5`},zT=[`innerHTML`],BT={class:`flex flex-wrap items-center gap-2`},VT={key:0,class:`rounded-md border border-primary-border bg-primary-soft px-1.5 py-0.5 font-mono text-[10px] font-bold uppercase tracking-wide text-primary`},HT={key:1,class:`rounded-md border border-border-soft bg-accent px-1.5 py-0.5 font-mono text-[10px] font-bold uppercase tracking-wide text-muted-foreground`},UT=[`disabled`],WT=[`disabled`],GT={key:0,class:`flex flex-col gap-1.5`},KT={class:`flex items-center gap-1.5 text-[11px] font-bold uppercase tracking-wide text-destructive`},qT={class:`font-mono text-[11px] font-semibold`},JT={class:`ml-auto rounded border border-destructive px-1.5 py-0.5 text-[10.5px] font-semibold text-destructive`},YT=[`disabled`,`onClick`],XT={key:1,class:`flex flex-col gap-1.5`},ZT={class:`flex items-center gap-1.5 text-[11px] font-bold uppercase tracking-wide text-muted-foreground`},QT={class:`font-mono text-[11px] font-semibold`},$T={class:`flex flex-col gap-1.5`},eE={class:`flex items-center gap-1.5`},tE={key:0,class:`ml-auto text-[11.5px] text-muted-foreground`},nE={key:0,class:`text-[12px] text-muted-foreground`},rE={key:0,class:`rounded-md border border-border-soft bg-accent px-2 py-1.5 text-[12px] text-muted-foreground`},iE={key:1,class:`flex flex-col gap-0.5 text-[11.5px]`},aE={class:`min-w-0 truncate font-mono`,style:{direction:`rtl`,"text-align":`left`}},oE=[`href`],sE={key:1,class:`min-w-0 shrink truncate font-mono text-foreground`},cE={class:`flex min-w-0 flex-wrap items-baseline gap-x-1.5 gap-y-0.5`},lE=[`href`],uE={key:1,class:`shrink-0 font-mono text-muted-foreground`},dE={key:2,class:`flex flex-col gap-1`},fE={class:`flex items-center gap-1 text-[11px] font-medium text-muted-foreground`},pE={class:`flex flex-col gap-1`},mE={class:`min-w-0 flex-1 truncate font-mono`,style:{direction:`rtl`,"text-align":`left`}},hE={class:`shrink-0 rounded border border-dashed border-border-soft px-1 font-mono text-[10px]`},gE={class:`shrink-0 font-mono`},_E={key:3,class:`flex flex-col gap-1`},vE={class:`flex items-center gap-1 text-[11px] font-medium text-muted-foreground`},yE={class:`flex flex-col gap-1`},bE={class:`min-w-0 flex-1 truncate font-mono`,style:{direction:`rtl`,"text-align":`left`}},xE={class:`shrink-0 rounded border border-dashed border-border-soft px-1 font-mono text-[10px]`},SE={class:`shrink-0 font-mono`},CE={class:`flex flex-col gap-1.5`},wE={class:`flex items-center gap-1.5`},TE={class:`ml-0.5 flex items-center gap-0.5 rounded border border-primary/30 bg-primary/10 px-1 py-0.5 text-[10px] font-semibold text-primary`},EE=[`disabled`],DE={class:`flex flex-col gap-1.5`},OE={class:`flex items-center gap-1.5`},kE={class:`flex flex-col gap-1.5`},AE={class:`flex items-center gap-1.5`},jE={class:`flex flex-col gap-2`},ME={class:`flex items-center gap-1.5`},NE={key:0,class:`flex flex-col gap-2`},PE=[`src`,`alt`],FE={class:`flex gap-2`},IE=[`disabled`],LE={class:`flex flex-col gap-1.5 text-[11.5px] text-muted-foreground`},RE={class:`flex items-center justify-between gap-3`},zE={class:`font-mono text-[11px] text-foreground`},BE={class:`flex items-center justify-between gap-3`},VE={class:`font-mono text-[11px] text-foreground`},HE=F({__name:`DetailPanel`,props:{keyName:{},entry:{},issues:{},locales:{},sourceLocale:{},usageRevision:{}},emits:[`changed`],setup(e,{emit:t}){let n=e,r=t,i=e=>e?new Date(e).toLocaleString():`—`,a=q(()=>n.keyName?n.keyName.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/\./g,`.<wbr>`):``),o=q(()=>{let e=``;for(let t of Object.values(n.entry?.values??{}))t.updatedAt&&t.updatedAt>e&&(e=t.updatedAt);return e||void 0}),s=q(()=>!!n.entry?.plural),c=M(!1),l;function u(){WS(n.keyName).then(()=>{c.value=!0,clearTimeout(l),l=setTimeout(()=>c.value=!1,1500)}).catch(()=>{})}let d={placeholder:`Placeholder`,spelling:`Spelling`,length:`Length`,glossary:`Glossary`},f=q(()=>(n.issues??[]).filter(e=>e.check!==`untranslated`)),p={spelling:`spelling`,length:`max-length`},m=M(!1);async function h(e){let t=p[e.check];if(!(!t||!n.keyName||m.value)){m.value=!0;try{await Pf(n.keyName,t,e.locale),$.success(`Dismissed until the source text changes`),r(`changed`)}catch(e){$.error(e.message)}finally{m.value=!1}}}let g=q(()=>{let e=n.entry,t=n.sourceLocale;return!e||!t?[]:(n.locales??[]).filter(n=>GC(e,n,t))}),_=M(null),v=M(!1),y=M(!1);function b(){_.value?.click()}async function x(e){let t=e.target,i=t.files?.[0];if(t.value=``,!(!i||!n.keyName)){v.value=!0;try{await xf(n.keyName,i),$.success(`Screenshot uploaded`),r(`changed`)}catch(e){$.error(`Upload failed: ${e.message}`)}finally{v.value=!1}}}async function S(){if(n.keyName){y.value=!0;try{await Sf(n.keyName),$.success(`Screenshot removed`),r(`changed`)}catch(e){$.error(`Could not remove: ${e.message}`)}finally{y.value=!1}}}let C=Yt({context:``,tags:``,maxLength:void 0}),w=M(!1),T=M(!1);async function E(){if(n.keyName){T.value=!0;try{let e=0,t=[];for await(let r of nf({keyGlob:n.keyName,all:!0,force:!0}))r.type===`done`&&(e=r.written,t=r.errors);e>0?($.success(`Context suggested and saved — review it below`),r(`changed`)):t.length>0?$.error(t[0].error):$.info(`No usage found — add a code snippet or type context manually`)}catch(e){$.error(`Could not suggest: ${e.message}`)}finally{T.value=!1}}}Er(()=>[n.keyName,n.entry],()=>{C.context=n.entry?.context??``,C.tags=(n.entry?.tags??[]).join(`, `),C.maxLength=n.entry?.maxLength},{immediate:!0});let D=M(null),ee=M(6);async function te(){let e=n.keyName;if(!e){D.value=null;return}try{D.value=await of(e)}catch{D.value=null}}Er(()=>n.keyName,async()=>{D.value=null,ee.value=6,await te()},{immediate:!0}),Er(()=>n.usageRevision,te);let ne=e=>xT(e,D.value?.project??``),O=q(()=>(D.value?.refs??[]).map(e=>({...e,url:ne(e)}))),re=q(()=>(D.value?.prefixRefs??[]).map(e=>({...e,url:ne(e)}))),ie=q(()=>(D.value?.literalRefs??[]).map(e=>({...e,url:xT(e,D.value?.project??``)}))),ae=q(()=>CT(O.value.slice(0,ee.value))),oe=e=>e.find(e=>e.url)?.url??null,k=M(`count`),se=M(!1);Er(()=>[n.keyName,n.entry],()=>{k.value=n.entry?.plural?.arg??`count`},{immediate:!0});async function ce(){if(!n.keyName)return;let e=k.value.trim()||`count`;se.value=!0;try{await Ud(n.keyName,e),$.success(`Converted to plural`),r(`changed`)}catch(e){$.error(`Could not convert: ${e.message}`)}finally{se.value=!1}}async function le(){if(n.keyName){se.value=!0;try{await Wd(n.keyName),$.success(`Converted to a single string`),r(`changed`)}catch(e){$.error(`Could not convert: ${e.message}`)}finally{se.value=!1}}}async function ue(){let e=k.value.trim();if(!(!n.keyName||!e||e===n.entry?.plural?.arg))try{await Rd(n.keyName,{pluralArg:e}),$.success(`Renamed count variable`),r(`changed`)}catch(e){$.error(`Could not rename: ${e.message}`)}}async function de(){if(n.keyName){w.value=!0;try{await Rd(n.keyName,{metadata:{context:C.context.trim(),tags:C.tags.split(`,`).map(e=>e.trim()).filter(Boolean),maxLength:C.maxLength?Number(C.maxLength):null}}),$.success(`Metadata saved`),r(`changed`)}catch(e){$.error(`Could not save: ${e.message}`)}finally{w.value=!1}}}return(t,n)=>(z(),B(`aside`,FT,[!e.keyName||!e.entry?(z(),B(`div`,IT,[U(N(Uu),{class:`size-5`}),n[6]||=H(`p`,{class:`max-w-[200px] text-sm leading-relaxed`},`Select a key to view and edit its details.`,-1)])):(z(),B(`div`,LT,[H(`div`,RT,[n[7]||=H(`span`,{class:`text-[10.5px] font-bold uppercase tracking-wide text-muted-foreground`},`Key`,-1),U(N(dx),{"disable-closing-trigger":``},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`span`,{class:`inline-block w-fit break-words cursor-pointer font-mono text-base font-semibold tracking-tight`,innerHTML:a.value,onClick:u},null,8,zT)]),_:1}),U(N(HC),null,{default:P(()=>[W(j(c.value?`Copied`:`Click to copy`),1)]),_:1})]),_:1})]),H(`div`,BT,[s.value?(z(),B(`span`,VT,`PLURAL`)):(z(),B(`span`,HT,`SINGLE`)),s.value?(z(),B(R,{key:2},[n[8]||=H(`span`,{class:`text-[11.5px] text-muted-foreground`},`arg`,-1),U(N(KS),{modelValue:k.value,"onUpdate:modelValue":n[0]||=e=>k.value=e,class:`h-7 w-24 font-mono text-xs`,"aria-label":`Number variable name`,onBlur:ue,onKeydown:Xl(Jl(ue,[`prevent`]),[`enter`])},null,8,[`modelValue`,`onKeydown`]),H(`button`,{type:`button`,class:`ml-auto rounded-md px-2 py-1 text-[12px] font-semibold text-primary transition-colors hover:bg-primary-soft disabled:opacity-50`,disabled:se.value,onClick:le},`Make single`,8,UT)],64)):(z(),B(`button`,{key:3,type:`button`,class:`ml-auto rounded-md px-2 py-1 text-[12px] font-semibold text-primary transition-colors hover:bg-primary-soft disabled:opacity-50`,disabled:se.value,onClick:ce},`Make plural`,8,WT))]),f.value.length||g.value.length?(z(),B(`div`,{key:0,class:A(N(US)(`flex flex-col gap-3 rounded-xl border border-border bg-background p-3`,f.value.length&&`border-primary-border`))},[f.value.length?(z(),B(`div`,GT,[H(`div`,KT,[U(N(Td),{class:`size-3.5`}),W(` `+j(f.value.length)+` issue`+j(f.value.length===1?``:`s`),1)]),(z(!0),B(R,null,I(f.value,(e,t)=>(z(),B(`div`,{key:t,class:`group flex items-center gap-2 text-[12.5px]`},[U(Ew,{code:e.locale,size:14},null,8,[`code`]),H(`span`,qT,j(e.locale.toUpperCase()),1),H(`span`,JT,j(d[e.check]??e.check),1),p[e.check]?(z(),V(N(dx),{key:0},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,class:`flex size-[20px] items-center justify-center rounded text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover:opacity-100`,disabled:m.value,"aria-label":`Dismiss until the source changes`,onClick:t=>h(e)},[U(N(Su),{class:`size-3`})],8,YT)]),_:2},1024),U(N(HC),null,{default:P(()=>[...n[9]||=[W(`Dismiss until the source text changes`,-1)]]),_:1})]),_:2},1024)):G(``,!0)]))),128))])):G(``,!0),g.value.length?(z(),B(`div`,XT,[H(`div`,ZT,[n[10]||=H(`span`,{class:`size-[7px] rounded-full bg-muted-foreground`},null,-1),W(` `+j(g.value.length)+` untranslated `,1)]),(z(!0),B(R,null,I(g.value,e=>(z(),B(`div`,{key:e,class:`flex items-center gap-2 text-[12.5px]`},[U(Ew,{code:e,size:14},null,8,[`code`]),H(`span`,QT,j(e.toUpperCase()),1),n[11]||=H(`span`,{class:`ml-auto rounded border border-border-soft bg-accent px-1.5 py-0.5 text-[10.5px] font-semibold italic text-muted-foreground`},`Empty`,-1)]))),128))])):G(``,!0)],2)):G(``,!0),H(`div`,$T,[H(`div`,eE,[U(N(Fu),{class:`size-3.5 text-muted-foreground`}),n[12]||=H(`span`,{class:`text-[13px] font-semibold`},`Usage`,-1),D.value?.indexed?(z(),B(`span`,tE,j(D.value.count)+` reference`+j(D.value.count===1?``:`s`),1)):G(``,!0)]),!D.value||!D.value.indexed?(z(),B(`p`,nE,` Run a scan to find where this key is used in your code. `)):(z(),B(R,{key:1},[D.value.count===0&&re.value.length===0&&ie.value.length===0?(z(),B(`p`,rE,` Not referenced in the last scan — this key may be unused. `)):G(``,!0),O.value.length?(z(),B(`div`,iE,[(z(!0),B(R,null,I(ae.value,(e,t)=>(z(),B(R,{key:t},[e.kind===`dir`?(z(),B(`div`,{key:0,class:`flex items-center gap-1 text-muted-foreground`,style:me({paddingLeft:`${e.depth*12}px`})},[U(N(Ku),{class:`size-3 shrink-0`}),U(N(dx),null,{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`span`,aE,j(e.label),1)]),_:2},1024),U(N(HC),{class:`font-mono`},{default:P(()=>[W(j(e.label),1)]),_:2},1024)]),_:2},1024)],4)):(z(),B(`div`,{key:1,class:`flex items-baseline gap-1.5`,style:me({paddingLeft:`${e.depth*12+16}px`})},[U(N(dx),null,{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[oe(e.refs)?(z(),B(`a`,{key:0,href:oe(e.refs),class:`min-w-0 shrink truncate rounded px-0.5 font-mono text-foreground hover:bg-accent hover:text-primary`},j(e.name),9,oE)):(z(),B(`span`,sE,j(e.name),1))]),_:2},1024),U(N(HC),{class:`font-mono`},{default:P(()=>[W(j(oe(e.refs)?`Open ${e.name}`:e.name),1)]),_:2},1024)]),_:2},1024),H(`span`,cE,[(z(!0),B(R,null,I(e.refs,(t,n)=>(z(),B(R,{key:n},[t.url?(z(),V(N(dx),{key:0},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`a`,{href:t.url,class:`shrink-0 rounded px-0.5 font-mono text-muted-foreground hover:bg-accent hover:text-primary`},`:`+j(t.line),9,lE)]),_:2},1024),U(N(HC),{class:`font-mono`},{default:P(()=>[W(`Open `+j(e.name)+`:`+j(t.line),1)]),_:2},1024)]),_:2},1024)):(z(),B(`span`,uE,`:`+j(t.line),1))],64))),128))])],4))],64))),128)),D.value.count>ee.value?(z(),B(`button`,{key:0,type:`button`,class:`mt-0.5 self-start text-[11.5px] text-primary hover:underline`,onClick:n[1]||=e=>ee.value=D.value.count},` + `+j(D.value.count-ee.value)+` more `,1)):G(``,!0)])):G(``,!0),re.value.length?(z(),B(`div`,dE,[H(`p`,fE,[U(N(xu),{class:`size-3`}),n[13]||=W(` Possible usage (dynamic keys) `,-1)]),H(`ul`,pE,[(z(!0),B(R,null,I(re.value,(e,t)=>(z(),B(`li`,{key:t,class:`text-[11.5px]`},[U(N(dx),null,{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[(z(),V(ia(e.url?`a`:`div`),{href:e.url||void 0,class:A([`group flex items-baseline gap-2 text-muted-foreground`,e.url?`hover:text-primary`:``])},{default:P(()=>[H(`span`,mE,j(e.file),1),H(`span`,hE,j(e.prefix)+`*`,1),H(`span`,gE,`:`+j(e.line),1),e.url?(z(),V(N(zu),{key:0,class:`size-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-100`})):G(``,!0)]),_:2},1032,[`href`,`class`]))]),_:2},1024),U(N(HC),{class:`font-mono`},{default:P(()=>[W(j(e.url?`Open ${e.file}:${e.line}`:`${e.file}:${e.line}`),1)]),_:2},1024)]),_:2},1024)]))),128))])])):G(``,!0),ie.value.length?(z(),B(`div`,_E,[H(`p`,vE,[U(N(xu),{class:`size-3`}),n[14]||=W(` Possible usage (string literals) `,-1)]),H(`ul`,yE,[(z(!0),B(R,null,I(ie.value,(e,t)=>(z(),B(`li`,{key:t,class:`text-[11.5px]`},[U(N(dx),null,{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[(z(),V(ia(e.url?`a`:`div`),{href:e.url||void 0,class:A([`group flex items-baseline gap-2 text-muted-foreground`,e.url?`hover:text-primary`:``])},{default:P(()=>[H(`span`,bE,j(e.file),1),H(`span`,xE,`'`+j(e.literal)+`'`,1),H(`span`,SE,`:`+j(e.line),1),e.url?(z(),V(N(zu),{key:0,class:`size-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-100`})):G(``,!0)]),_:2},1032,[`href`,`class`]))]),_:2},1024),U(N(HC),{class:`font-mono`},{default:P(()=>[W(j(e.url?`Open ${e.file}:${e.line}`:`${e.file}:${e.line}`),1)]),_:2},1024)]),_:2},1024)]))),128))])])):G(``,!0)],64))]),H(`div`,CE,[H(`div`,wE,[U(N(Xu),{class:`size-3.5 text-muted-foreground`}),n[16]||=H(`label`,{for:`detail-context`,class:`text-[13px] font-semibold`},`Context`,-1),e.entry.contextSource===`ai`?(z(),V(N(dx),{key:0},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`span`,TE,[U(N(vd),{class:`size-2.5`}),n[15]||=W(` AI `,-1)])]),_:1}),U(N(HC),null,{default:P(()=>[W(j(e.entry.contextAt?`AI-generated ${i(e.entry.contextAt)}`:`AI-generated`),1)]),_:1})]),_:1})):G(``,!0),U(N(dx),null,{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,class:`ml-auto flex items-center gap-1 rounded px-1.5 py-0.5 text-[11.5px] font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-40`,disabled:T.value,onClick:E},[U(N(vd),{class:`size-3`}),W(` `+j(T.value?`Suggesting…`:`Suggest`),1)],8,EE)]),_:1}),U(N(HC),null,{default:P(()=>[W(j(T.value?`Suggesting…`:`Suggest context with AI`),1)]),_:1})]),_:1})]),U(N(sw),{id:`detail-context`,modelValue:C.context,"onUpdate:modelValue":n[2]||=e=>C.context=e,rows:`5`,class:`min-h-28`,placeholder:`Where/how this string is used…`},null,8,[`modelValue`])]),H(`div`,DE,[H(`div`,OE,[U(N(Cd),{class:`size-3.5 text-muted-foreground`}),n[17]||=H(`label`,{for:`detail-tags`,class:`text-[13px] font-semibold`},`Tags`,-1)]),U(N(KS),{id:`detail-tags`,modelValue:C.tags,"onUpdate:modelValue":n[3]||=e=>C.tags=e,placeholder:`comma, separated`},null,8,[`modelValue`])]),H(`div`,kE,[H(`div`,AE,[U(N(ld),{class:`size-3.5 text-muted-foreground`}),n[18]||=H(`label`,{for:`detail-maxlen`,class:`text-[13px] font-semibold`},`Max length`,-1)]),U(N(KS),{id:`detail-maxlen`,modelValue:C.maxLength,"onUpdate:modelValue":n[4]||=e=>C.maxLength=e,modelModifiers:{number:!0},type:`number`,min:`0`,placeholder:`—`,class:`font-mono`},null,8,[`modelValue`])]),U(N(Q),{class:`w-full`,disabled:w.value,onClick:de},{default:P(()=>[...n[19]||=[W(`Save details`,-1)]]),_:1},8,[`disabled`]),n[25]||=H(`div`,{class:`h-px bg-border-soft`},null,-1),e.keyName?(z(),V(PT,{key:1,"key-name":e.keyName,notes:e.entry.notes??[],onChanged:n[5]||=e=>r(`changed`)},null,8,[`key-name`,`notes`])):G(``,!0),n[26]||=H(`div`,{class:`h-px bg-border-soft`},null,-1),H(`div`,jE,[H(`div`,ME,[U(N(Yu),{class:`size-3.5 text-muted-foreground`}),n[20]||=H(`span`,{class:`text-[13px] font-semibold`},`Screenshot`,-1)]),H(`input`,{ref_key:`fileInput`,ref:_,type:`file`,accept:`image/*`,class:`hidden`,onChange:x},null,544),e.entry.screenshot?(z(),B(`div`,NE,[H(`img`,{src:`/`+e.entry.screenshot,alt:`Screenshot for ${e.keyName}`,class:`max-h-48 w-full rounded-lg border border-border object-contain`},null,8,PE),H(`div`,FE,[U(N(Q),{variant:`outline`,size:`sm`,disabled:v.value,onClick:b},{default:P(()=>[U(N(sd),{class:`size-4`}),n[21]||=W(` Replace `,-1)]),_:1},8,[`disabled`]),U(N(Q),{variant:`outline`,size:`sm`,class:`text-muted-foreground hover:text-destructive`,disabled:y.value,onClick:S},{default:P(()=>[U(N(wd),{class:`size-4`}),n[22]||=W(` Remove `,-1)]),_:1},8,[`disabled`])])])):(z(),B(`button`,{key:1,type:`button`,class:`flex w-full flex-col items-center gap-2 rounded-xl border-[1.5px] border-dashed border-input p-[22px] text-center text-[12.5px] font-medium text-muted-foreground transition-colors hover:border-primary-border hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-60`,disabled:v.value,onClick:b},[U(N(Dd),{class:`size-5`}),W(` `+j(v.value?`Uploading…`:`Upload screenshot`),1)],8,IE))]),n[27]||=H(`div`,{class:`h-px bg-border-soft`},null,-1),H(`div`,LE,[H(`div`,RE,[n[23]||=H(`span`,null,`Created`,-1),H(`span`,zE,j(i(e.entry.createdAt)),1)]),H(`div`,BE,[n[24]||=H(`span`,null,`Last updated`,-1),H(`span`,VE,j(i(o.value)),1)])])]))]))}}),UE={class:`grid gap-3`},WE={class:`grid gap-1.5`},GE={class:`grid gap-1.5`},KE={class:`flex items-center justify-between gap-2 rounded-md border p-2.5`},qE={class:`flex flex-col`},JE={key:0,class:`grid gap-1.5`},YE={key:1,class:`text-sm text-destructive`},XE=F({__name:`AddKeyDialog`,props:{open:{type:Boolean,required:!0},openModifiers:{}},emits:Oa([`created`],[`update:open`]),setup(e,{emit:t}){let n=Xa(e,`open`),r=t,i=M(``),a=M(``),o=M(``),s=M(!1),c=M(!1),l=M(`count`);Er(n,e=>{e&&(i.value=``,a.value=``,o.value=``,c.value=!1,l.value=`count`)});async function u(){let e=i.value.trim();if(!e){o.value=`Key is required.`;return}if(!a.value.trim()){o.value=`Source value is required.`;return}s.value=!0,o.value=``;try{c.value?await Md(e,a.value,{arg:l.value.trim()||`count`}):await Md(e,a.value),$.success(`Added ${e}`),n.value=!1,r(`created`,e)}catch(e){o.value=e.message}finally{s.value=!1}}return(e,t)=>(z(),V(N(Ph),{open:n.value,"onUpdate:open":t[5]||=e=>n.value=e},{default:P(()=>[U(N(OC),{class:`max-w-md`},{default:P(()=>[U(N(kC),null,{default:P(()=>[U(N(jC),null,{default:P(()=>[...t[6]||=[W(`Add key`,-1)]]),_:1}),U(N(MC),null,{default:P(()=>[...t[7]||=[W(`Create a new translation key using dot notation.`,-1)]]),_:1})]),_:1}),H(`div`,UE,[H(`div`,WE,[U(N(DC),{for:`add-key`},{default:P(()=>[...t[8]||=[W(`Key `,-1),H(`span`,{class:`text-destructive`},`*`,-1)]]),_:1}),U(N(KS),{id:`add-key`,modelValue:i.value,"onUpdate:modelValue":t[0]||=e=>i.value=e,class:`font-mono`,placeholder:`home.title`,onKeydown:Xl(Jl(u,[`prevent`]),[`enter`])},null,8,[`modelValue`,`onKeydown`])]),H(`div`,GE,[U(N(DC),{for:`add-value`},{default:P(()=>[W(j(c.value?`Source value (other form)`:`Source value`)+` `,1),t[9]||=H(`span`,{class:`text-destructive`},`*`,-1)]),_:1}),U(N(KS),{id:`add-value`,modelValue:a.value,"onUpdate:modelValue":t[1]||=e=>a.value=e,placeholder:c.value?`{count} items`:`Welcome home`,onKeydown:Xl(Jl(u,[`prevent`]),[`enter`])},null,8,[`modelValue`,`placeholder`,`onKeydown`])]),H(`div`,KE,[H(`div`,qE,[U(N(DC),{for:`add-plural`,class:`cursor-pointer`},{default:P(()=>[...t[10]||=[W(`Plural`,-1)]]),_:1}),t[11]||=H(`span`,{class:`text-xs text-muted-foreground`},`One form per CLDR category, by locale.`,-1)]),U(N(nC),{id:`add-plural`,modelValue:c.value,"onUpdate:modelValue":t[2]||=e=>c.value=e},null,8,[`modelValue`])]),c.value?(z(),B(`div`,JE,[U(N(DC),{for:`add-plural-arg`},{default:P(()=>[...t[12]||=[W(`Count argument`,-1)]]),_:1}),U(N(KS),{id:`add-plural-arg`,modelValue:l.value,"onUpdate:modelValue":t[3]||=e=>l.value=e,class:`font-mono`,placeholder:`count`,onKeydown:Xl(Jl(u,[`prevent`]),[`enter`])},null,8,[`modelValue`,`onKeydown`])])):G(``,!0),o.value?(z(),B(`p`,YE,j(o.value),1)):G(``,!0)]),U(N(AC),null,{default:P(()=>[U(N(Q),{variant:`outline`,disabled:s.value,onClick:t[4]||=e=>n.value=!1},{default:P(()=>[...t[13]||=[W(`Cancel`,-1)]]),_:1},8,[`disabled`]),U(N(Q),{disabled:s.value||!i.value.trim()||!a.value.trim(),onClick:u},{default:P(()=>[...t[14]||=[W(`Add key`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),ZE={key:0,class:`flex items-center gap-1.5 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-400`},QE={key:1,class:`text-sm text-destructive`},$E={key:2,class:`flex flex-1 items-center justify-center py-12 text-sm text-muted-foreground`},eD={key:0,class:`flex flex-col gap-1 rounded-md border border-amber-500/30 bg-amber-500/10 p-3 text-sm text-amber-700 dark:text-amber-400`},tD={class:`flex items-center gap-1.5 font-medium`},nD={class:`list-inside list-disc pl-1`},rD={class:`grid min-h-0 flex-1 grid-cols-[16rem_1fr] gap-3 overflow-hidden`},iD={class:`min-h-0 overflow-y-auto rounded-md border`},aD=[`onClick`],oD={key:0,class:`px-3 py-2 text-xs text-muted-foreground`},sD={key:0,class:`min-h-0 overflow-auto rounded-md border bg-muted/30 p-3 font-mono text-xs leading-relaxed [tab-size:2]`},cD={key:1,class:`flex min-h-0 items-center justify-center rounded-md border text-sm text-muted-foreground`},lD=F({__name:`ExportDialog`,props:Oa({exportLocales:{}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:[`update:open`],setup(e){let t=Xa(e,`open`),n=e,r=q(()=>(n.exportLocales?.length??0)>0),i=M(!1),a=M(!1),o=M(``),s=M([]),c=M([]),l=M(null),u=q(()=>s.value.find(e=>e.path===l.value)??null);async function d(){i.value=!0,o.value=``,s.value=[],c.value=[],l.value=null;try{let e=await Df();s.value=[...e.files].sort((e,t)=>e.path.localeCompare(t.path)),c.value=e.warnings,l.value=s.value[0]?.path??null}catch(e){o.value=e.message}finally{i.value=!1}}Er(t,e=>{e&&d()},{immediate:!0});async function f(){a.value=!0;try{let e=await Of();$.success(`Wrote ${e.files} file${e.files===1?``:`s`}`),t.value=!1}catch(e){$.error(`Export failed: ${e.message}`)}finally{a.value=!1}}return(e,d)=>(z(),V(N(Ph),{open:t.value,"onUpdate:open":d[1]||=e=>t.value=e},{default:P(()=>[U(N(OC),{class:`flex max-h-[85vh] w-full max-w-5xl flex-col`},{default:P(()=>[U(N(kC),null,{default:P(()=>[U(N(jC),null,{default:P(()=>[...d[2]||=[W(`Export preview`,-1)]]),_:1}),U(N(MC),null,{default:P(()=>[...d[3]||=[W(`Review the files that will be written to disk.`,-1)]]),_:1})]),_:1}),r.value?(z(),B(`p`,ZE,[U(N(Td),{class:`size-3.5 shrink-0`}),W(` Export is limited to `+j(n.exportLocales.length)+` language`+j(n.exportLocales.length===1?``:`s`)+` (Settings → Export targets). `,1)])):G(``,!0),o.value?(z(),B(`p`,QE,j(o.value),1)):G(``,!0),i.value?(z(),B(`div`,$E,` Generating preview… `)):o.value?G(``,!0):(z(),B(R,{key:3},[c.value.length?(z(),B(`div`,eD,[H(`p`,tD,[U(N(Td),{class:`size-4`}),W(` `+j(c.value.length)+` warning`+j(c.value.length===1?``:`s`),1)]),H(`ul`,nD,[(z(!0),B(R,null,I(c.value,(e,t)=>(z(),B(`li`,{key:t},j(e),1))),128))])])):G(``,!0),H(`div`,rD,[H(`ul`,iD,[(z(!0),B(R,null,I(s.value,e=>(z(),B(`li`,{key:e.path},[U(N(dx),null,{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,class:A(N(US)(`w-full truncate px-3 py-1.5 text-left font-mono text-xs transition-colors`,e.path===l.value?`bg-accent text-accent-foreground`:`hover:bg-muted/60`)),onClick:t=>l.value=e.path},j(e.path),11,aD)]),_:2},1024),U(N(HC),{class:`font-mono`},{default:P(()=>[W(j(e.path),1)]),_:2},1024)]),_:2},1024)]))),128)),s.value.length===0?(z(),B(`li`,oD,` No files to write. `)):G(``,!0)]),u.value?(z(),B(`pre`,sD,j(u.value.contents),1)):(z(),B(`div`,cD,` Select a file to preview its contents. `))])],64)),U(N(AC),null,{default:P(()=>[U(N(Q),{variant:`outline`,disabled:a.value,onClick:d[0]||=e=>t.value=!1},{default:P(()=>[...d[4]||=[W(`Cancel`,-1)]]),_:1},8,[`disabled`]),U(N(Q),{disabled:i.value||a.value||s.value.length===0,onClick:f},{default:P(()=>[U(N(Hu),{class:`size-4`}),W(` `+j(a.value?`Writing…`:`Write ${s.value.length} file${s.value.length===1?``:`s`}`),1)]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),uD={class:`relative h-2 w-full overflow-hidden rounded-full bg-muted`},dD={key:0,class:`gf-progress-indeterminate absolute inset-y-0 w-1/3 rounded-full bg-primary`},fD=bC(F({__name:`Progress`,props:{modelValue:{},indeterminate:{type:Boolean}},setup(e){return(t,n)=>(z(),B(`div`,uD,[e.indeterminate?(z(),B(`div`,dD)):(z(),B(`div`,{key:1,class:`h-full bg-primary transition-all`,style:me({width:`${Math.min(100,Math.max(0,e.modelValue??0))}%`})},null,4))]))}}),[[`__scopeId`,`data-v-558dffb9`]]),pD={key:0,class:`rounded-md border bg-muted/40 px-3 py-2 text-xs text-muted-foreground`},mD={class:`font-medium text-foreground`},hD={key:0,class:`mt-0.5`},gD={key:1,class:`mt-1`},_D={class:`mt-1`},vD={key:1,class:`flex min-h-0 flex-col gap-1.5`},yD={class:`flex justify-between text-xs text-muted-foreground`},bD={key:0},xD={key:0,class:`mt-1 flex max-h-56 min-h-0 flex-col overflow-y-auto rounded-md border text-sm`},SD={key:2,class:`flex flex-col gap-1 rounded-md border border-destructive/30 bg-destructive/10 p-3 text-sm text-destructive`},CD={class:`flex items-center gap-1.5 font-medium`},wD={key:3,class:`flex min-h-0 flex-col gap-1.5`},TD={class:`flex items-center gap-1.5 text-sm font-medium text-amber-700 dark:text-amber-400`},ED={class:`min-h-0 flex-1 overflow-y-auto rounded-md border text-sm`},DD={class:`inline-flex items-center gap-1.5 font-mono text-xs`},OD={class:`text-muted-foreground`},kD=F({__name:`TranslateDialog`,props:Oa({state:{},filteredKeys:{},targetLocale:{}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:Oa([`changed`,`batch-submitted`],[`update:open`]),setup(e,{emit:t}){let n=e,r=Xa(e,`open`),i=t,a=M(!1),o=M(``),s=M([]),c=M(0),l=M(0),u=null,d=M([]),f=e=>d.value.find(t=>t.locale===e),p=q(()=>d.value.filter(e=>e.status===`active`).length),m={active:0,queued:1,done:2},h=q(()=>[...d.value].sort((e,t)=>m[e.status]-m[t.status])),g=e=>e===`active`?$u:e===`done`?Du:Nu,_=q(()=>{let e=n.state;return e?n.targetLocale?[n.targetLocale]:e.config.locales.filter(t=>t!==e.config.sourceLocale):[]}),v=q(()=>{let e=n.state;if(!e)return 0;let t=n.filteredKeys?new Set(n.filteredKeys):null,r=0;for(let[n,i]of Object.entries(e.keys))if(!(t&&!t.has(n))&&!i.skipTranslate)for(let t of _.value)GC(i,t,e.config.sourceLocale)&&r++;return r}),y=M(null),b=q(()=>y.value??v.value),x=M(!1),S=M(!1);async function C(){x.value=!1;try{let e=await qd();x.value=e.supported&&!e.pending}catch{}}async function w(){S.value=!0;try{let e=await Jd({keys:n.filteredKeys?.length?n.filteredKeys:void 0,locales:n.targetLocale?[n.targetLocale]:void 0});$.success(`Batch of ${e.total.toLocaleString()} strings submitted — results apply when processing finishes (usually under an hour).`),i(`batch-submitted`),r.value=!1}catch(e){o.value=e.message}finally{S.value=!1}}let T=M(null),E=e=>e>=1e4?`${Math.round(e/1e3)}k`:e.toLocaleString(),D=e=>e>=.1?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`,ee=q(()=>{let e=T.value?.estimatedCost;return e==null?`Batch (50% off)`:`Batch ≈ ${D(e/2)} (50% off)`});async function te(){T.value=null;try{T.value=await Kd({keys:n.filteredKeys?.length?n.filteredKeys:void 0,locales:n.targetLocale?[n.targetLocale]:void 0})}catch{}}Er(r,e=>{e&&(o.value=``,s.value=[],c.value=0,l.value=0,d.value=[],y.value=null,te(),C())},{immediate:!0});function ne(){u?.abort()}async function O(){u=new AbortController,a.value=!0,o.value=``,s.value=[],c.value=0,d.value=[],y.value=v.value,l.value=y.value;try{let e=u.signal,t=0,a=n.filteredKeys?.length?n.filteredKeys:void 0,o=n.targetLocale?[n.targetLocale]:void 0,p=o?[e,a,o]:a?[e,a]:[e];for await(let e of tf(...p))if(e.type===`start`)l.value=e.total,d.value=e.locales.map(e=>({locale:e.locale,total:e.total,done:0,status:`queued`}));else if(e.type===`locale-start`){let t=f(e.locale);t&&(t.status=`active`)}else if(e.type===`progress`){c.value=e.done,l.value=e.total;let t=f(e.locale);t&&(t.done=e.localeDone,t.status===`queued`&&(t.status=`active`)),i(`changed`)}else if(e.type===`locale-done`){let t=f(e.locale);t&&(t.status=`done`,t.done=t.total)}else e.type===`done`&&(t=e.written,s.value=e.errors,c.value=l.value,i(`changed`));e.aborted||($.success(`Translated ${t} string${t===1?``:`s`}`),s.value.length===0&&(r.value=!1))}catch(e){e.name!==`AbortError`&&(o.value=e.message)}finally{a.value=!1,u=null}}return(e,t)=>(z(),V(N(Ph),{open:r.value,"onUpdate:open":t[1]||=e=>r.value=e},{default:P(()=>[U(N(OC),{class:`flex max-h-[85vh] max-w-lg flex-col`},{default:P(()=>[U(N(kC),null,{default:P(()=>[U(N(jC),null,{default:P(()=>[...t[2]||=[W(`Translate missing strings`,-1)]]),_:1}),U(N(MC),null,{default:P(()=>[b.value===0?(z(),B(R,{key:0},[W(`Nothing missing — all translations are filled.`)],64)):(z(),B(R,{key:1},[W(` Translate `+j(b.value.toLocaleString())+` missing string`+j(b.value===1?``:`s`)+` across `+j(_.value.length)+` language`+j(_.value.length===1?``:`s`)+` with Claude? This sends source strings + context to the AI provider. `,1)],64))]),_:1})]),_:1}),T.value&&T.value.requests>0&&b.value>0&&!a.value&&c.value===0?(z(),B(`div`,pD,[H(`p`,null,[W(` ≈ `+j(T.value.requests.toLocaleString())+` requests · `+j(T.value.batches.toLocaleString())+` batch`+j(T.value.batches===1?``:`es`)+` · ~`+j(E(T.value.inputTokens))+` in / ~`+j(E(T.value.outputTokens))+` out tokens`,1),T.value.estimatedCost===null?G(``,!0):(z(),B(R,{key:0},[t[3]||=W(` · `,-1),H(`span`,mD,`≈ `+j(D(T.value.estimatedCost)),1),t[4]||=W(` (±20%)`,-1)],64))]),T.value.pricing?G(``,!0):(z(),B(`p`,hD,` No pricing known for this model — set a price in Settings → AI for a dollar estimate. `)),T.value.perLocale.length>1?(z(),B(`details`,gD,[t[5]||=H(`summary`,{class:`cursor-pointer select-none`},`Per-language breakdown`,-1),H(`ul`,_D,[(z(!0),B(R,null,I(T.value.perLocale,e=>(z(),B(`li`,{key:e.locale,class:`flex justify-between font-mono tabular-nums`},[H(`span`,null,j(e.locale),1),H(`span`,null,j(e.requests.toLocaleString())+` req · ~`+j(E(e.inputTokens))+` / ~`+j(E(e.outputTokens)),1)]))),128))])])):G(``,!0)])):G(``,!0),a.value||c.value>0?(z(),B(`div`,vD,[H(`div`,yD,[H(`span`,null,j(c.value.toLocaleString())+` / `+j(l.value.toLocaleString())+` translated`,1),a.value&&d.value.length?(z(),B(`span`,bD,j(p.value)+` of `+j(d.value.length)+` language`+j(d.value.length===1?``:`s`)+` active`,1)):G(``,!0)]),U(N(fD),{"model-value":l.value>0?c.value/l.value*100:0},null,8,[`model-value`]),d.value.length?(z(),B(`ul`,xD,[(z(!0),B(R,null,I(h.value,e=>(z(),B(`li`,{key:e.locale,class:A([`flex items-center gap-2 border-b px-3 py-1.5 last:border-b-0`,e.status===`queued`&&`opacity-55`])},[(z(),V(ia(g(e.status)),{class:A([`size-3.5 shrink-0`,e.status===`active`?`animate-spin text-primary`:e.status===`done`?`text-emerald-600 dark:text-emerald-400`:`text-muted-foreground`])},null,8,[`class`])),U(Pw,{code:e.locale,size:14,"show-name":``},null,8,[`code`]),H(`span`,{class:A([`ml-auto font-mono text-xs tabular-nums`,e.status===`active`?`text-foreground`:`text-muted-foreground`])},j(e.done.toLocaleString())+` / `+j(e.total.toLocaleString()),3)],2))),128))])):G(``,!0)])):G(``,!0),o.value?(z(),B(`div`,SD,[H(`p`,CD,[U(N(Td),{class:`size-4`}),t[6]||=W(` Translation failed `,-1)]),H(`p`,null,j(o.value),1)])):G(``,!0),s.value.length?(z(),B(`div`,wD,[H(`p`,TD,[U(N(Td),{class:`size-4`}),W(` `+j(s.value.length)+` string`+j(s.value.length===1?``:`s`)+` could not be translated `,1)]),H(`ul`,ED,[(z(!0),B(R,null,I(s.value,(e,t)=>(z(),B(`li`,{key:`${e.key}-${e.locale}-${t}`,class:`border-b px-3 py-1.5 last:border-b-0`},[H(`span`,DD,[W(j(e.key)+` @ `,1),U(Pw,{code:e.locale,size:12},null,8,[`code`])]),H(`span`,OD,` — `+j(e.error),1)]))),128))])])):G(``,!0),U(N(AC),null,{default:P(()=>[U(N(Q),{variant:`outline`,onClick:t[0]||=e=>a.value?ne():r.value=!1},{default:P(()=>[W(j(a.value?`Cancel`:`Close`),1)]),_:1}),b.value>0&&x.value?(z(),V(N(Q),{key:0,variant:`outline`,disabled:a.value||S.value,onClick:w},{default:P(()=>[W(j(S.value?`Submitting…`:ee.value),1)]),_:1},8,[`disabled`])):G(``,!0),b.value>0?(z(),V(N(Q),{key:1,disabled:a.value,onClick:O},{default:P(()=>[U(N(vd),{class:`size-4`}),W(` `+j(a.value?`Translating…`:`Translate`),1)]),_:1},8,[`disabled`])):G(``,!0)]),_:1})]),_:1})]),_:1},8,[`open`]))}}),AD={key:0,class:`flex flex-col gap-1.5`},jD={class:`flex justify-between text-xs text-muted-foreground`},MD={key:1,class:`flex flex-col gap-1 rounded-md border border-destructive/30 bg-destructive/10 p-3 text-sm text-destructive`},ND={class:`flex items-center gap-1.5 font-medium`},PD={key:2,class:`flex min-h-0 flex-col gap-1.5`},FD={class:`flex items-center gap-1.5 text-sm font-medium text-amber-700 dark:text-amber-400`},ID={class:`min-h-0 flex-1 overflow-y-auto rounded-md border text-sm`},LD={class:`font-mono text-xs`},RD={class:`text-muted-foreground`},zD=F({__name:`ContextDialog`,props:Oa({state:{},keys:{}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:Oa([`changed`,`batch-submitted`],[`update:open`]),setup(e,{emit:t}){let n=e,r=Xa(e,`open`),i=t,a=M(!1),o=M(null),s=M(``),c=M([]),l=M(0),u=M(0),d=q(()=>{let e=n.state;return e?n.keys.filter(t=>e.keys[t]&&!e.keys[t].context).length:0}),f=M(!1),p=M(!1);async function m(){f.value=!1;try{let e=await Zd();f.value=e.supported&&!e.pending}catch{}}async function h(){p.value=!0;try{let e=await Qd({keys:n.keys});$.success(`Context batch of ${e.total.toLocaleString()} keys submitted — results apply when processing finishes (usually under an hour).`),i(`batch-submitted`),r.value=!1}catch(e){s.value=e.message}finally{p.value=!1}}Er(r,e=>{e?(s.value=``,c.value=[],l.value=0,u.value=0,m()):o.value?.abort()});function g(){o.value?.abort()}async function _(){a.value=!0,s.value=``,c.value=[],l.value=0,u.value=0,o.value=new AbortController;let e=!1;try{for await(let t of nf({keys:n.keys},o.value.signal))t.type===`start`?u.value=t.total:t.type===`progress`?(l.value=t.done,u.value=t.total):t.type===`done`&&(e=!0,l.value=u.value,c.value=t.errors,i(`changed`),$.success(`Built context for ${t.written} key${t.written===1?``:`s`}`),t.errors.length===0&&(r.value=!1))}catch(e){s.value=e.message}finally{!e&&o.value?.signal.aborted&&(i(`changed`),$(`Build cancelled after ${l.value} of ${u.value} keys`)),o.value=null,a.value=!1}}return(e,t)=>(z(),V(N(Ph),{open:r.value,"onUpdate:open":t[1]||=e=>r.value=e},{default:P(()=>[U(N(OC),{class:`flex max-h-[85vh] max-w-lg flex-col`},{default:P(()=>[U(N(kC),null,{default:P(()=>[U(N(jC),null,{default:P(()=>[...t[2]||=[W(`Build context`,-1)]]),_:1}),U(N(MC),null,{default:P(()=>[d.value===0?(z(),B(R,{key:0},[W(` All selected keys already have context — nothing to build. `)],64)):(z(),B(R,{key:1},[W(` Build AI context notes for `+j(d.value)+` selected key`+j(d.value===1?``:`s`)+` that currently have none? The AI will scan call-site code snippets to write a short translator hint for each key. `,1)],64))]),_:1})]),_:1}),a.value||l.value>0?(z(),B(`div`,AD,[H(`div`,jD,[H(`span`,null,j(l.value.toLocaleString())+` / `+j(u.value.toLocaleString())+` built`,1)]),U(N(fD),{"model-value":u.value>0?l.value/u.value*100:0},null,8,[`model-value`])])):G(``,!0),s.value?(z(),B(`div`,MD,[H(`p`,ND,[U(N(Td),{class:`size-4`}),t[3]||=W(` Build failed `,-1)]),H(`p`,null,j(s.value),1)])):G(``,!0),c.value.length?(z(),B(`div`,PD,[H(`p`,FD,[U(N(Td),{class:`size-4`}),W(` `+j(c.value.length)+` key`+j(c.value.length===1?``:`s`)+` could not be processed `,1)]),H(`ul`,ID,[(z(!0),B(R,null,I(c.value,(e,t)=>(z(),B(`li`,{key:`${e.key}-${t}`,class:`border-b px-3 py-1.5 last:border-b-0`},[H(`span`,LD,j(e.key),1),H(`span`,RD,` — `+j(e.error),1)]))),128))])])):G(``,!0),U(N(AC),null,{default:P(()=>[a.value?(z(),V(N(Q),{key:0,variant:`outline`,onClick:g},{default:P(()=>[...t[4]||=[W(`Cancel`,-1)]]),_:1})):(z(),V(N(Q),{key:1,variant:`outline`,onClick:t[0]||=e=>r.value=!1},{default:P(()=>[...t[5]||=[W(`Close`,-1)]]),_:1})),d.value>0&&f.value?(z(),V(N(Q),{key:2,variant:`outline`,disabled:a.value||p.value,onClick:h},{default:P(()=>[W(j(p.value?`Submitting…`:`Batch (50% off)`),1)]),_:1},8,[`disabled`])):G(``,!0),d.value>0?(z(),V(N(Q),{key:3,disabled:a.value||p.value,onClick:_},{default:P(()=>[U(N(vd),{class:`size-4`}),W(` `+j(a.value?`Building…`:`Build context`),1)]),_:1},8,[`disabled`])):G(``,!0)]),_:1})]),_:1})]),_:1},8,[`open`]))}}),BD={key:0,class:`flex items-center gap-3 rounded-md border bg-muted/40 px-3 py-2 text-sm`},VD={class:`flex min-w-0 flex-1 flex-col gap-1`},HD={class:`truncate`},UD=F({__name:`BatchBanner`,props:{kind:{default:`translate`}},emits:[`changed`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=M(null),o=M(!1),s;async function c(){try{a.value=(await(r.kind===`context`?Zd():qd())).pending}catch{}}Gi(()=>{c(),s=setInterval(()=>void c(),3e4)}),Yi(()=>clearInterval(s)),t({refresh:c});let l=q(()=>a.value?.status===`ended`);async function u(){o.value=!0;try{if(r.kind===`context`){let e=await $d(),t=[e.retried?`${e.retried} retried`:``,e.errors.length?`${e.errors.length} error(s)`:``].filter(Boolean).join(`, `);$.success(`Context batch applied — wrote ${e.written} context(s)${t?` (${t})`:``}`)}else{let e=await Yd(),t=[e.retried?`${e.retried} retried`:``,e.staleSkipped?`${e.staleSkipped} stale skipped`:``,e.errors.length?`${e.errors.length} error(s)`:``].filter(Boolean).join(`, `);$.success(`Batch applied — wrote ${e.written} translation(s)${t?` (${t})`:``}`)}i(`changed`),await c()}catch(e){$.error(e.message)}finally{o.value=!1}}async function d(){if(window.confirm(`Cancel this batch? Finished entries are discarded.`))try{await(r.kind===`context`?ef():Xd()),await c()}catch(e){$.error(e.message)}}return(e,t)=>a.value?(z(),B(`div`,BD,[(z(),V(ia(l.value?N(Du):N($u)),{class:A([`size-4 shrink-0`,l.value?`text-emerald-600 dark:text-emerald-400`:`animate-spin text-primary`])},null,8,[`class`])),H(`div`,VD,[H(`span`,HD,[W(j(r.kind===`context`?`Batch context build`:`Batch translation`)+` (`+j(a.value.total.toLocaleString())+` `+j(r.kind===`context`?`keys`:`strings`)+`) `,1),l.value?(z(),B(R,{key:0},[W(` — finished, ready to apply`)],64)):(z(),B(R,{key:1},[W(` — processing…`)],64))]),l.value?G(``,!0):(z(),V(N(fD),{key:0,indeterminate:``,class:`h-1`}))]),U(N(Q),{size:`sm`,disabled:!l.value||o.value,onClick:u},{default:P(()=>[W(j(o.value?`Applying…`:l.value?`Apply results`:`Waiting…`),1)]),_:1},8,[`disabled`]),U(N(Q),{size:`sm`,variant:`ghost`,disabled:o.value,onClick:d},{default:P(()=>[U(N(kd),{class:`size-4`})]),_:1},8,[`disabled`])])):G(``,!0)}}),WD={key:1,class:`text-muted-foreground`},GD={class:`flex items-center gap-2 border-b px-3`},KD={class:`absolute left-2 flex size-3.5 items-center justify-center`},qD={class:`flex w-full min-w-0 items-center justify-between gap-2`},JD={class:`shrink-0 font-mono text-xs text-muted-foreground`},YD=F({__name:`LocaleCombobox`,props:Oa({locales:{},placeholder:{},class:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=Xa(e,`modelValue`),r=M(!1),i=M(``),a=q(()=>t.locales.map(e=>({code:e,resolved:ew(e)})).sort((e,t)=>e.resolved.name.localeCompare(t.resolved.name,`en`))),o=q(()=>{let e=i.value.trim().toLowerCase();return e?a.value.filter(({code:t,resolved:n})=>t.toLowerCase().includes(e)||n.bcp47.toLowerCase().includes(e)||n.name.toLowerCase().includes(e)||(n.endonym?.toLowerCase().includes(e)??!1)):a.value});function s(e){r.value=e,e&&(i.value=``)}return(a,c)=>(z(),V(N(dy),{modelValue:n.value,"onUpdate:modelValue":c[1]||=e=>n.value=e,open:r.value,"ignore-filter":``,"onUpdate:open":s},{default:P(()=>[U(N(fy),{"as-child":``},{default:P(()=>[U(N(wy),{class:A(N(US)(`flex h-9 items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,t.class))},{default:P(()=>[n.value?(z(),V(Pw,{key:0,code:n.value,"show-name":``,"show-code":!1,size:14},null,8,[`code`])):(z(),B(`span`,WD,j(e.placeholder??`Locale`),1)),U(N(Ou),{class:`size-4 shrink-0 opacity-50`})]),_:1},8,[`class`])]),_:1}),U(N(Cy),null,{default:P(()=>[U(N(gy),{position:`popper`,align:`start`,"side-offset":4,class:`z-50 max-h-96 w-[260px] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`},{default:P(()=>[H(`div`,GD,[U(N(pd),{class:`size-4 shrink-0 opacity-50`}),U(N(by),{modelValue:i.value,"onUpdate:modelValue":c[0]||=e=>i.value=e,"display-value":()=>``,placeholder:`Search locales…`,class:`h-9 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground`},null,8,[`modelValue`])]),U(N(Ey),{class:`max-h-72 p-1`},{default:P(()=>[U(N(_y),{class:`py-6 text-center text-sm text-muted-foreground`},{default:P(()=>[...c[2]||=[W(` No locales found `,-1)]]),_:1}),(z(!0),B(R,null,I(o.value,({code:e})=>(z(),V(N(xy),{key:e,value:e,class:`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`},{default:P(()=>[H(`span`,KD,[U(N(Sy),null,{default:P(()=>[U(N(Du),{class:`size-4`})]),_:1})]),H(`span`,qD,[U(Pw,{code:e,"show-name":``,"show-code":!1,size:14},null,8,[`code`]),H(`span`,JD,j(e.toUpperCase()),1)])]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1})]),_:1},8,[`modelValue`,`open`]))}}),XD={class:`relative w-0 shrink-0`},ZD=[`aria-valuenow`,`aria-valuemin`,`aria-valuemax`],QD=F({__name:`ResizeHandle`,props:{side:{},width:{},min:{},max:{}},emits:[`update:width`,`commit`,`reset`],setup(e,{emit:t}){let n=e,r=t,i=M(!1);function a(e){if(e.button!==0)return;let t=e.currentTarget,a=e.clientX,o=n.width,s=n.side===`right`?1:-1;i.value=!0,t.setPointerCapture(e.pointerId),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`;let c=e=>Math.min(n.max,Math.max(n.min,Math.round(e))),l=e=>{r(`update:width`,c(o+s*(e.clientX-a)))},u=()=>{t.removeEventListener(`pointermove`,l),t.removeEventListener(`pointerup`,u),t.removeEventListener(`pointercancel`,u),document.body.style.cursor=``,document.body.style.userSelect=``,i.value=!1,r(`commit`)};t.addEventListener(`pointermove`,l),t.addEventListener(`pointerup`,u),t.addEventListener(`pointercancel`,u)}return(t,n)=>(z(),B(`div`,XD,[H(`div`,{class:A(N(US)(`absolute inset-y-0 -left-1 z-10 w-2 cursor-col-resize transition-colors hover:bg-primary/20`,i.value&&`bg-primary/30`)),role:`separator`,"aria-orientation":`vertical`,"aria-valuenow":e.width,"aria-valuemin":e.min,"aria-valuemax":e.max,"aria-label":`Resize panel (double-click to reset)`,onPointerdown:a,onDblclick:n[0]||=e=>r(`reset`)},null,42,ZD)]))}});function $D(e,t,n,r){let i=`glotfile-${e}`,a=e=>Math.min(r,Math.max(n,Math.round(e))),o=M((()=>{let e=Number(localStorage.getItem(i));return Number.isFinite(e)&&e>0?a(e):t})()),s=()=>{localStorage.setItem(i,String(o.value)),uf({[e]:o.value}).catch(()=>{})};return{width:o,min:n,max:r,set:e=>{o.value=a(e)},commit:s,reset:()=>{o.value=t,s()},syncValue:e=>{typeof e==`number`&&Number.isFinite(e)&&(o.value=a(e),localStorage.setItem(i,String(o.value)))}}}var eO=$D(`keyColumnWidth`,272,180,560),tO=$D(`detailPanelWidth`,420,320,720);async function nO(e){try{let t=e??await lf();eO.syncValue(t.keyColumnWidth),tO.syncValue(t.detailPanelWidth)}catch{}}var rO={class:`flex min-h-0 flex-1 flex-col`},iO={class:`flex shrink-0 flex-wrap items-center gap-2 border-b px-4 py-2`},aO={class:`relative`},oO={key:0,class:`rounded bg-primary px-1.5 text-xs text-primary-foreground`},sO=[`aria-label`],cO={class:`ml-auto flex items-center gap-2`},lO={class:`mr-1 text-xs text-muted-foreground tabular-nums`},uO={key:2},dO={key:3},fO={key:4},pO={key:0,class:`flex shrink-0 flex-wrap items-center gap-1.5 border-b px-4 py-1.5`},mO=[`aria-label`,`onClick`],hO=[`aria-label`,`onClick`],gO=[`aria-label`,`onClick`],_O={class:`flex flex-col gap-2 px-4 py-2 empty:hidden`},vO={key:1,class:`sticky top-0 z-20 flex h-11 shrink-0 items-center gap-2 border-b bg-background pl-[18px] pr-4`},yO=[`aria-checked`,`aria-label`],bO={class:`text-sm font-medium tabular-nums`},xO={class:`text-sm text-muted-foreground`},SO={key:1,for:`select-all-checkbox`,class:`cursor-pointer select-none text-sm text-muted-foreground`},CO={class:`relative min-w-0 flex-1 overflow-hidden`},wO={key:0,class:`flex h-full items-center justify-center gap-2 p-8 text-sm text-muted-foreground`},TO={key:1,class:`flex h-full items-center justify-center p-8 text-sm text-muted-foreground`},EO=[`data-index`],DO=`glotfile:enabledChecks`,OO=F({__name:`EditorView`,setup(e){let t=eO.width,n=tO.width,r=un(null),{filter:i,sort:a,view:o,locale:s}=wp(Np()),c=M(i),l=VC();function u(){try{let e=localStorage.getItem(DO);if(e){let t=JSON.parse(e);return pp.filter(e=>t.includes(e))}}catch{}return[...mp]}let d=M(u()),f=M(new Map),p=M(null),m=M(!1),h=M(0);async function g(){try{let e=await sf();m.value=e.indexed,p.value=e.indexed?new Set(e.used):null}catch{m.value=!1,p.value=null}h.value++}let _=M(!1),v=0;async function y(){if(d.value.length===0){f.value=new Map,_.value=!1;return}try{let e=await Mf(d.value);f.value=bp(e.issues),_.value=e.spellPending,e.spellPending&&v<6?(v++,setTimeout(y,800)):v=0}catch{f.value=new Map}}Er(d,e=>{localStorage.setItem(DO,JSON.stringify(e)),v=0,y()},{deep:!0});let b=M(a),x=M(o),S=M(s),C=null;Er([b,x,S,()=>({...c.value,text:void 0})],()=>{Pp(Tp({filter:c.value,sort:b.value,view:x.value,locale:S.value}))},{deep:!0}),Er(()=>c.value.text,()=>{C&&clearTimeout(C),C=setTimeout(()=>{Pp(Tp({filter:c.value,sort:b.value,view:x.value,locale:S.value}))},300)});let w=q(()=>c.value.states.length+c.value.issues.length+c.value.plurality.length+ +!!c.value.emptySource+ +!!c.value.aiContextUnreviewed+ +!!c.value.noUsages+ +!!c.value.skipTranslate),T=q(()=>{let e=0;for(let t of f.value.values())e+=t.length;return e});function E(e){c.value.states=c.value.states.filter(t=>t!==e)}function D(e){c.value.issues=c.value.issues.filter(t=>t!==e)}function ee(e){c.value.plurality=c.value.plurality.filter(t=>t!==e)}if(Fp.value){let e=Fp.value;if(c.value={text:``,states:[],issues:[],plurality:[],tag:``,needsAttention:!1,emptySource:!1,aiContextUnreviewed:!1,noUsages:!1,skipTranslate:!1,...e},e.issues?.length){let t=new Set([...d.value,...e.issues]);d.value=pp.filter(e=>t.has(e))}e.locale&&(x.value=`bilingual`,S.value=e.locale),Fp.value=null}let te=M(null),ne=M(null),O=M(null);Lp.value&&=(te.value=Lp.value,null);let re=M(!1),ie=M(!1),ae=M(!1),oe=M(!1),k=M(!1),se=M(null),ce=M(null),le=M(!0),ue=M(!1);async function de(){r.value=await jd(),y()}let fe=setTimeout(()=>{le.value&&(ue.value=!0)},250);de().finally(()=>{le.value=!1,ue.value=!1,clearTimeout(fe)});let pe=q(()=>r.value?.config.sourceLocale??``),he=q(()=>r.value?.config.locales??[]),ge=q(()=>he.value.filter(e=>e!==pe.value));Er(ge,e=>{!S.value&&e.length>0&&(S.value=e[0])},{immediate:!0});let _e=q(()=>{if(x.value===`bilingual`)return S.value?[pe.value,S.value]:[pe.value];let e=he.value.filter(e=>e!==pe.value);return[pe.value,...e]}),ve=q(()=>{let e=r.value;if(!e)return[];let t=x.value===`bilingual`&&S.value?S.value:void 0;return fp(e,{...c.value,locale:t},f.value,p.value??void 0)}),ye=q(()=>{let e=r.value,t=ve.value;if(b.value===`key-desc`)return[...t].reverse();if(b.value===`created`){let n=t=>{let n=e?.keys[t]?.createdAt;return n?Date.parse(n):0};return[...t].sort((e,t)=>n(t)-n(e))}if(b.value===`updated`){let n=t=>{let n=Object.values(e?.keys[t]?.values??{}),r=0;for(let e of n){let t=e.updatedAt?Date.parse(e.updatedAt):0;t>r&&(r=t)}return r};return[...t].sort((e,t)=>n(t)-n(e))}return t}),be=q(()=>x.value===`bilingual`?S.value?[S.value]:[]:ge.value),xe=q(()=>x.value===`bilingual`?S.value||`—`:`all ${ge.value.length} targets`),Se=q(()=>l.keys()),Ce=q(()=>l.count.value),we=q(()=>l.allSelected(ye.value)),Te=q(()=>l.someSelected(ye.value)),Ee=q(()=>{let e=r.value;if(!e)return[];let t=new Set;for(let n of l.keys())for(let r of e.keys[n]?.tags??[])t.add(r);return[...t].sort()});function De(){l.allSelected(ye.value)?l.clear():l.selectAll(ye.value)}function Oe(e,t){t?l.toggleRange(e,ye.value):l.toggle(e)}Er(ye,e=>l.pruneTo(e));let ke=q(()=>r.value&&te.value?r.value.keys[te.value]??null:null),Ae=cp(q(()=>({count:ye.value.length,getScrollElement:()=>ce.value,estimateSize:()=>56,overscan:8,getItemKey:e=>ye.value[e]??e}))),je=q(()=>Ae.value.getVirtualItems()),Me=q(()=>Ae.value.getTotalSize());function Ne(e){te.value=e}let Pe=M(null);function Fe(){let e=Pe.value?.$el;e?.focus?.(),e?.select?.()}function Ie(e){let t=e.target,n=!!(t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable)),r=!!document.querySelector(`[role="listbox"],[role="menu"],[role="dialog"]`);if(e.key===`/`&&!n&&!r&&!e.metaKey&&!e.ctrlKey&&!e.altKey){e.preventDefault(),Fe();return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`||n||r)return;let i=ye.value;if(i.length===0)return;e.preventDefault();let a=te.value?i.indexOf(te.value):-1,o=Math.max(0,Math.min(i.length-1,e.key===`ArrowDown`?a+1:a-1)),s=i[o];s&&(te.value=s,Ae.value.scrollToIndex(o,{align:`auto`}))}Gi(()=>window.addEventListener(`keydown`,Ie)),Yi(()=>{window.removeEventListener(`keydown`,Ie),C&&clearTimeout(C)}),Gi(async()=>{try{let e=await af();e.indexed&&!se.value&&!k.value&&(se.value=`${e.files.toLocaleString()} files · ${e.refs.toLocaleString()} refs`)}catch{}g()});async function Le(e,t){te.value===e&&(te.value=t),await de()}async function Re(e){await de(),te.value=e,c.value.text=`"${e}"`}async function ze(){k.value=!0,se.value=null;try{let e=await rf();se.value=`${e.files.toLocaleString()} files · ${e.refs.toLocaleString()} refs`,await g()}catch{se.value=`Scan failed`}finally{k.value=!1}}return(e,i)=>(z(),V(N(sx),{"delay-duration":400},{default:P(()=>[H(`div`,rO,[H(`div`,iO,[H(`div`,aO,[U(N(pd),{class:`pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`}),U(N(KS),{ref_key:`searchInput`,ref:Pe,modelValue:c.value.text,"onUpdate:modelValue":i[0]||=e=>c.value.text=e,placeholder:`Search keys, values, context…`,class:`h-8 w-64 pl-8 pr-8`,onKeydown:i[1]||=Xl(e=>c.value.text=``,[`esc`])},null,8,[`modelValue`]),c.value.text?(z(),B(`button`,{key:0,type:`button`,class:`absolute right-1.5 top-1/2 grid size-5 -translate-y-1/2 place-items-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,"aria-label":`Clear search`,onClick:i[2]||=e=>c.value.text=``},[U(N(kd),{class:`size-3.5`})])):G(``,!0)]),U(N(eb),null,{default:P(()=>[U(N(ob),{"as-child":``},{default:P(()=>[U(N(Q),{variant:`outline`,size:`sm`,class:`h-8 gap-1.5`},{default:P(()=>[U(N(Qu),{class:`size-4 opacity-60`}),i[31]||=W(` Filter `,-1),w.value?(z(),B(`span`,oO,j(w.value),1)):G(``,!0)]),_:1})]),_:1}),U(N($S),{align:`start`,class:`w-64`},{default:P(()=>[U(gC,{states:c.value.states,"onUpdate:states":i[3]||=e=>c.value.states=e,issues:c.value.issues,"onUpdate:issues":i[4]||=e=>c.value.issues=e,enabled:d.value,"onUpdate:enabled":i[5]||=e=>d.value=e,plurality:c.value.plurality,"onUpdate:plurality":i[6]||=e=>c.value.plurality=e,"empty-source":c.value.emptySource,"onUpdate:emptySource":i[7]||=e=>c.value.emptySource=e,"ai-context-unreviewed":c.value.aiContextUnreviewed,"onUpdate:aiContextUnreviewed":i[8]||=e=>c.value.aiContextUnreviewed=e,"no-usages":c.value.noUsages,"onUpdate:noUsages":i[9]||=e=>c.value.noUsages=e,"skip-translate":c.value.skipTranslate,"onUpdate:skipTranslate":i[10]||=e=>c.value.skipTranslate=e,"scan-indexed":m.value},null,8,[`states`,`issues`,`enabled`,`plurality`,`empty-source`,`ai-context-unreviewed`,`no-usages`,`skip-translate`,`scan-indexed`])]),_:1})]),_:1}),U(N(Q),{variant:c.value.needsAttention?`default`:`outline`,size:`sm`,class:`h-8 gap-1.5`,role:`switch`,"aria-checked":c.value.needsAttention,onClick:i[11]||=e=>c.value.needsAttention=!c.value.needsAttention},{default:P(()=>[U(N(Td),{class:A([`size-4`,c.value.needsAttention?``:`opacity-60`])},null,8,[`class`]),i[32]||=W(` Needs attention `,-1),T.value?(z(),B(`span`,{key:0,class:`ml-0.5 rounded-full bg-destructive-soft px-1.5 text-[11px] font-bold text-destructive tabular-nums`,"aria-label":`${T.value} issue${T.value===1?``:`s`}`},j(T.value.toLocaleString()),9,sO)):G(``,!0)]),_:1},8,[`variant`,`aria-checked`]),U(N(Tb),{modelValue:b.value,"onUpdate:modelValue":i[12]||=e=>b.value=e},{default:P(()=>[U(N(qS),{class:`h-8 w-[160px]`},{default:P(()=>[U(N(Kb),{placeholder:`Sort`})]),_:1}),U(N(JS),null,{default:P(()=>[U(N(XS),{value:`key-asc`},{default:P(()=>[...i[33]||=[W(`Key A→Z`,-1)]]),_:1}),U(N(XS),{value:`key-desc`},{default:P(()=>[...i[34]||=[W(`Key Z→A`,-1)]]),_:1}),U(N(XS),{value:`created`},{default:P(()=>[...i[35]||=[W(`Recently created`,-1)]]),_:1}),U(N(XS),{value:`updated`},{default:P(()=>[...i[36]||=[W(`Recently updated`,-1)]]),_:1})]),_:1})]),_:1},8,[`modelValue`]),U(N(ex),{modelValue:x.value,"onUpdate:modelValue":i[13]||=e=>x.value=e},{default:P(()=>[U(N(ZS),{class:`h-8`},{default:P(()=>[U(N(QS),{value:`bilingual`,class:`text-xs`},{default:P(()=>[...i[37]||=[W(`Bilingual`,-1)]]),_:1}),U(N(QS),{value:`multilingual`,class:`text-xs`},{default:P(()=>[...i[38]||=[W(`Multilingual`,-1)]]),_:1})]),_:1})]),_:1},8,[`modelValue`]),x.value===`bilingual`?(z(),V(YD,{key:0,modelValue:S.value,"onUpdate:modelValue":i[14]||=e=>S.value=e,locales:ge.value,class:`h-8 w-[170px]`},null,8,[`modelValue`,`locales`])):G(``,!0),H(`div`,cO,[H(`span`,lO,j(ye.value.length.toLocaleString())+` keys`,1),U(N(Q),{size:`sm`,variant:`outline`,onClick:i[15]||=e=>ie.value=!0},{default:P(()=>[U(N(Hu),{class:`size-4`}),i[39]||=W(` Export `,-1)]),_:1}),U(N(Q),{size:`sm`,variant:`outline`,disabled:k.value,onClick:ze},{default:P(()=>[k.value?(z(),V(N($u),{key:0,class:`size-4 animate-spin`})):(z(),V(N(dd),{key:1,class:`size-4`})),k.value?(z(),B(`span`,uO,`Scanning…`)):se.value?(z(),B(`span`,dO,j(se.value),1)):(z(),B(`span`,fO,`Scan`))]),_:1},8,[`disabled`]),U(N(Q),{size:`sm`,onClick:i[16]||=e=>re.value=!0},{default:P(()=>[U(N(od),{class:`size-4`}),i[40]||=W(` Add key `,-1)]),_:1})])]),c.value.states.length||c.value.issues.length||c.value.plurality.length||c.value.emptySource||c.value.aiContextUnreviewed||c.value.noUsages||c.value.skipTranslate?(z(),B(`div`,pO,[(z(!0),B(R,null,I(c.value.states,e=>(z(),V(N(eC),{key:`s-${e}`,variant:`secondary`,class:`gap-1`},{default:P(()=>[W(j(N(vp)[e])+` `,1),H(`button`,{type:`button`,class:`hover:text-foreground`,"aria-label":`Remove ${N(vp)[e]} filter`,onClick:t=>E(e)},[U(N(kd),{class:`size-3`})],8,mO)]),_:2},1024))),128)),(z(!0),B(R,null,I(c.value.plurality,e=>(z(),V(N(eC),{key:`p-${e}`,variant:`secondary`,class:`gap-1`},{default:P(()=>[W(j(N(yp)[e])+` `,1),H(`button`,{type:`button`,class:`hover:text-foreground`,"aria-label":`Remove ${N(yp)[e]} filter`,onClick:t=>ee(e)},[U(N(kd),{class:`size-3`})],8,hO)]),_:2},1024))),128)),c.value.emptySource?(z(),V(N(eC),{key:0,variant:`secondary`,class:`gap-1`},{default:P(()=>[i[41]||=W(` Empty source `,-1),H(`button`,{type:`button`,class:`hover:text-foreground`,"aria-label":`Remove Empty source filter`,onClick:i[17]||=e=>c.value.emptySource=!1},[U(N(kd),{class:`size-3`})])]),_:1})):G(``,!0),(z(!0),B(R,null,I(c.value.issues,e=>(z(),V(N(eC),{key:`i-${e}`,variant:`outline`,class:`gap-1`},{default:P(()=>[W(j(N(_p)[e])+` `,1),H(`button`,{type:`button`,class:`hover:text-foreground`,"aria-label":`Remove ${N(_p)[e]} filter`,onClick:t=>D(e)},[U(N(kd),{class:`size-3`})],8,gO)]),_:2},1024))),128)),c.value.aiContextUnreviewed?(z(),V(N(eC),{key:1,variant:`secondary`,class:`gap-1`},{default:P(()=>[U(N(vd),{class:`size-3`}),i[42]||=W(` AI context (unreviewed) `,-1),H(`button`,{type:`button`,class:`hover:text-foreground`,"aria-label":`Remove AI context filter`,onClick:i[18]||=e=>c.value.aiContextUnreviewed=!1},[U(N(kd),{class:`size-3`})])]),_:1})):G(``,!0),c.value.noUsages?(z(),V(N(eC),{key:2,variant:`secondary`,class:`gap-1`},{default:P(()=>[i[43]||=W(` Unused `,-1),H(`button`,{type:`button`,class:`hover:text-foreground`,"aria-label":`Remove Unused filter`,onClick:i[19]||=e=>c.value.noUsages=!1},[U(N(kd),{class:`size-3`})])]),_:1})):G(``,!0),c.value.skipTranslate?(z(),V(N(eC),{key:3,variant:`secondary`,class:`gap-1`},{default:P(()=>[i[44]||=W(` Skip-translate `,-1),H(`button`,{type:`button`,class:`hover:text-foreground`,"aria-label":`Remove Skip-translate filter`,onClick:i[20]||=e=>c.value.skipTranslate=!1},[U(N(kd),{class:`size-3`})])]),_:1})):G(``,!0)])):G(``,!0),H(`div`,_O,[U(UD,{ref_key:`translateBanner`,ref:ne,onChanged:de},null,512),U(UD,{ref_key:`contextBanner`,ref:O,kind:`context`,onChanged:de},null,512)]),ye.value.length?(z(),B(`div`,vO,[H(`button`,{id:`select-all-checkbox`,type:`button`,role:`checkbox`,"aria-checked":we.value?`true`:Te.value?`mixed`:`false`,"data-testid":`select-all`,class:A([`flex size-4 items-center justify-center rounded border transition-colors`,we.value||Te.value?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`]),"aria-label":we.value?`Deselect all`:`Select all`,onClick:De},[we.value?(z(),V(N(Du),{key:0,class:`size-3`})):Te.value?(z(),V(N(td),{key:1,class:`size-3`})):G(``,!0)],10,yO),Ce.value?(z(),B(R,{key:0},[H(`span`,bO,j(Ce.value.toLocaleString())+` selected`,1),H(`span`,xO,`· `+j(xe.value),1)],64)):(z(),B(`label`,SO,`Select all`)),Ce.value?(z(),V(BC,{key:2,class:`ml-auto`,keys:Se.value,locales:be.value,"scope-label":xe.value,"tags-on-selection":Ee.value,onChanged:de,onClear:i[21]||=e=>N(l).clear(),onTranslate:i[22]||=e=>ae.value=!0,onBuildContext:i[23]||=e=>oe.value=!0},null,8,[`keys`,`locales`,`scope-label`,`tags-on-selection`])):G(``,!0)])):G(``,!0),H(`div`,{class:`flex min-h-0 flex-1 overflow-hidden`,style:me({"--key-col-width":`${N(t)}px`})},[H(`div`,CO,[H(`div`,{ref_key:`parent`,ref:ce,class:`h-full overflow-auto`},[ue.value?(z(),B(`div`,wO,[U(N($u),{class:`size-4 animate-spin`}),i[45]||=W(` Loading… `,-1)])):!le.value&&ye.value.length===0?(z(),B(`div`,TO,` No keys match the current filter. `)):(z(),B(`div`,{key:2,style:me({height:`${Me.value}px`,position:`relative`,width:`100%`})},[(z(!0),B(R,null,I(je.value,e=>(z(),B(`div`,{key:e.key,ref_for:!0,ref:e=>N(Ae).measureElement(e),"data-index":e.index,style:me({position:`absolute`,top:`${e.start}px`,left:`0`,width:`100%`})},[r.value&&ye.value[e.index]?(z(),V(mT,{key:0,"key-name":ye.value[e.index],entry:r.value.keys[ye.value[e.index]],"source-locale":pe.value,locales:_e.value,selected:te.value===ye.value[e.index],issues:f.value.get(ye.value[e.index])??[],checked:N(l).has(ye.value[e.index]),onSelect:t=>Ne(ye.value[e.index]),onChanged:de,onRenamed:t=>Le(ye.value[e.index],t),onFilterTag:i[24]||=e=>c.value.text=e,onToggleSelect:t=>Oe(ye.value[e.index],t.shift)},null,8,[`key-name`,`entry`,`source-locale`,`locales`,`selected`,`issues`,`checked`,`onSelect`,`onRenamed`,`onToggleSelect`])):G(``,!0)],12,EO))),128))],4))],512),ye.value.length?(z(),B(`div`,{key:0,class:`absolute inset-y-0`,style:me({left:`${N(t)}px`})},[U(QD,{side:`right`,class:`h-full`,width:N(t),min:N(eO).min,max:N(eO).max,"onUpdate:width":N(eO).set,onCommit:N(eO).commit,onReset:N(eO).reset},null,8,[`width`,`min`,`max`,`onUpdate:width`,`onCommit`,`onReset`])],4)):G(``,!0)]),U(QD,{side:`left`,class:`max-[1080px]:hidden`,width:N(n),min:N(tO).min,max:N(tO).max,"onUpdate:width":N(tO).set,onCommit:N(tO).commit,onReset:N(tO).reset},null,8,[`width`,`min`,`max`,`onUpdate:width`,`onCommit`,`onReset`]),U(HE,{"key-name":te.value,entry:ke.value,issues:te.value?f.value.get(te.value)??[]:[],locales:he.value,"source-locale":pe.value,"usage-revision":h.value,style:me({width:`${N(n)}px`}),onChanged:de},null,8,[`key-name`,`entry`,`issues`,`locales`,`source-locale`,`usage-revision`,`style`])],4),U(XE,{open:re.value,"onUpdate:open":i[25]||=e=>re.value=e,onCreated:Re},null,8,[`open`]),U(lD,{open:ie.value,"onUpdate:open":i[26]||=e=>ie.value=e,"export-locales":r.value?.config.exportLocales??[]},null,8,[`open`,`export-locales`]),U(kD,{open:ae.value,"onUpdate:open":i[27]||=e=>ae.value=e,state:r.value,"filtered-keys":Se.value,"target-locale":x.value===`bilingual`?S.value:void 0,onChanged:de,onBatchSubmitted:i[28]||=e=>ne.value?.refresh()},null,8,[`open`,`state`,`filtered-keys`,`target-locale`]),U(zD,{open:oe.value,"onUpdate:open":i[29]||=e=>oe.value=e,state:r.value,keys:Se.value,onChanged:de,onBatchSubmitted:i[30]||=e=>O.value?.refresh()},null,8,[`open`,`state`,`keys`])])]),_:1}))}}),kO={"empty-source":`Empty source`,"empty-translation":`Untranslated`,"placeholder-mismatch":`Placeholder mismatch`,"icu-mismatch":`ICU mismatch`,"glossary-violation":`Glossary`,"max-length":`Too long`,"identical-to-source":`Identical to source`,whitespace:`Whitespace`,spelling:`Spelling`,"output-stale":`Outputs out of date`},AO={"empty-translation":`untranslated`,"placeholder-mismatch":`placeholder`,"glossary-violation":`glossary`,"max-length":`length`,spelling:`spelling`};function jO(e){if(e.ruleId===`empty-translation`)return{text:e.key,states:[`missing`]};if(e.ruleId===`output-stale`)return{};let t=AO[e.ruleId],n=e.locale?{locale:e.locale}:{};return t?{...n,issues:[t]}:{...n,text:e.key}}function MO(e,t){let n=e.values[t];return n?e.plural?(n.forms?.other??``).trim()!==``:(n.value??``).trim()!==``:!1}function NO(e,t){if(!MO(e,t))return`missing`;let n=e.values[t].state;return n===`reviewed`?`reviewed`:n===`needs-review`?`needsReview`:`machine`}function PO(e,t){let n=e.values[t];return n?e.plural?n.forms?.other??``:n.value??``:``}function FO(e){let t=e.trim();return t===``?0:t.split(/\s+/).length}function IO(e,t){return`${e} ${t}${e===1?``:`s`}`}function LO(e,t){let{sourceLocale:n,locales:r}=e.config,i=r.filter(e=>e!==n),a=Object.keys(e.keys).filter(t=>!e.keys[t].skipTranslate),o=t.findings.filter(e=>e.locale===``),s=o.filter(e=>e.severity===`error`).length,c=new Map;for(let e of t.findings){if(e.locale===``)continue;let t=c.get(e.locale);t?t.push(e):c.set(e.locale,[e])}let l=i.map(t=>{let n={reviewed:0,needsReview:0,machine:0,missing:0},r=[];for(let i of a){let a=NO(e.keys[i],t);n[a]++,a===`needsReview`&&r.push(i)}let i=c.get(t)??[],o=[...new Set(i.filter(e=>e.ruleId===`empty-translation`).map(e=>e.key))],s=i.filter(e=>e.severity===`error`&&e.ruleId!==`empty-translation`),l=i.filter(e=>e.severity===`warn`),u=a.length,d=n.reviewed+n.needsReview+n.machine,f;f=o.length>0||s.length>0?`blocked`:r.length>0?`almost`:`ready`;let p=[];o.length&&p.push(`${o.length} missing`),s.length&&p.push(`${s.length} breaking`),r.length&&p.push(`${r.length} stale`);let m=[];return l.length&&m.push(IO(l.length,`warning`)),{locale:t,total:u,translated:d,pct:u?Math.round(d/u*100):0,counts:n,missingKeys:o,staleKeys:r,errors:s,warnings:l,breaking:s.length,warning:l.length,verdict:f,blockers:p,notes:m}}),u=a.length*i.length,d=0,f=0;for(let e of l)d+=e.translated,f+=e.counts.reviewed;let p=a.reduce((t,r)=>t+FO(PO(e.keys[r],n)),0),m={breaking:[],warning:[]};for(let e of t.findings)e.ruleId!==`empty-translation`&&m[e.severity===`error`?`breaking`:`warning`].push(e);return{totals:{keys:Object.keys(e.keys).length,locales:i.length,translatedPct:u?Math.round(d/u*1e3)/10:0,reviewedPct:u?Math.round(f/u*1e3)/10:0,sourceWords:p,openIssues:m.breaking.length+m.warning.length,ready:l.filter(e=>e.verdict===`ready`).length,almost:l.filter(e=>e.verdict===`almost`).length,blocked:l.filter(e=>e.verdict===`blocked`).length,breaking:m.breaking.length,missing:l.reduce((e,t)=>e+t.missingKeys.length,0),stale:l.reduce((e,t)=>e+t.staleKeys.length,0)},project:o,projectErrors:s,locales:l,risk:m,worklist:RO(l,m)}}function RO(e,t){let n=[];for(let e of t.breaking)n.push({id:`b:${e.locale}:${e.key}:${e.ruleId}`,priority:`breaking`,title:`Fix ${kO[e.ruleId].toLowerCase()}`,where:e.locale?`${e.locale.toUpperCase()} · ${e.key}`:e.key,detail:e.message,filter:e.ruleId===`output-stale`?void 0:jO(e),count:1});let r=new Map;for(let t of e)for(let e of t.missingKeys){let n=r.get(e);n?n.push(t.locale):r.set(e,[t.locale])}for(let[e,t]of r)n.push({id:`m:${e}`,priority:`missing`,title:`Translate ${IO(t.length,`missing string`)}`,where:e,detail:`Missing in ${t.map(e=>e.toUpperCase()).join(`, `)}`,filter:{text:e,states:[`missing`]},count:t.length});let i=[];for(let t of e)for(let e of t.staleKeys)i.push({locale:t.locale,key:e});i.length&&n.push({id:`s:all`,priority:`stale`,title:`Refresh ${IO(i.length,`stale translation`)}`,where:`source changed since translated`,detail:i.map(e=>`${e.locale.toUpperCase()} · ${e.key}`).join(` · `),filter:{states:[`needs-review`]},count:i.length});let a=new Map;for(let e of t.warning){let t=a.get(e.ruleId);t?t.push(e):a.set(e.ruleId,[e])}for(let[e,t]of a)n.push({id:`w:${e}`,priority:`warning`,title:`Review ${IO(t.length,`${kO[e].toLowerCase()} warning`)}`,where:[...new Set(t.map(e=>e.locale.toUpperCase()||e.key))].join(`, `),detail:t.map(e=>`${e.locale?e.locale.toUpperCase():`—`} · ${e.key}`).join(` · `),filter:jO(t[0]),count:t.length});return n}var zO={class:`min-h-0 flex-1 overflow-y-auto p-6`},BO={key:0,class:`mt-8 text-center text-sm text-muted-foreground`},VO={key:1,class:`mt-8 text-center text-sm text-muted-foreground`},HO={key:2,class:`mx-auto flex max-w-[1080px] flex-col gap-4`},UO={class:`flex flex-wrap divide-x rounded-xl border bg-card px-2 py-3 shadow-sm`},WO={class:`flex flex-col px-5`},GO={class:`text-lg font-semibold tabular-nums`},KO={class:`flex flex-col px-5`},qO={class:`text-lg font-semibold tabular-nums`},JO={class:`flex flex-col px-5`},YO={class:`text-lg font-semibold tabular-nums`},XO={class:`flex flex-col px-5`},ZO={class:`text-lg font-semibold tabular-nums`},QO=[`disabled`],$O={class:`flex flex-col px-5`},ek={class:`text-lg font-semibold tabular-nums`},tk={class:`flex flex-wrap items-start justify-between gap-6`},nk={class:`min-w-0`},rk={class:`mt-1.5 flex items-center gap-2.5 text-2xl font-semibold tracking-tight`},ik={class:`mt-1.5 text-sm text-muted-foreground`},ak={class:`text-emerald-600 dark:text-emerald-400`},ok={class:`text-amber-600 dark:text-amber-400`},sk={class:`text-red-600 dark:text-red-400`},ck={key:0,class:`mt-2 flex flex-col gap-1`},lk={class:`font-semibold`},uk={class:`font-mono text-muted-foreground`},dk={class:`text-muted-foreground`},fk={class:`flex gap-2`},pk={class:`text-[11px] uppercase tracking-wide text-muted-foreground`},mk={class:`mt-4 flex flex-wrap items-center gap-x-4 gap-y-2 border-t pt-3.5`},hk={class:`flex items-center gap-1 text-xs text-muted-foreground`},gk={class:`flex items-center gap-1 text-xs text-muted-foreground`},_k={class:`flex items-center gap-1 text-xs text-muted-foreground`},vk={class:`flex items-center gap-1 text-xs text-muted-foreground`},yk={class:`rounded-2xl border bg-card p-5 shadow-sm`},bk={key:0,class:`flex items-center gap-3 rounded-xl bg-muted p-4`},xk={key:1,class:`grid grid-cols-[repeat(auto-fill,minmax(218px,1fr))] gap-3`},Sk=[`data-test`,`onClick`],Ck={class:`flex items-start justify-between gap-2`},wk={class:`flex min-w-0 flex-col`},Tk={class:`truncate font-mono text-xs font-semibold uppercase`},Ek=[`title`],Dk={class:`text-2xl font-semibold tabular-nums leading-none`},Ok={class:`flex h-[7px] w-full overflow-hidden rounded-full bg-muted`},kk={class:`flex min-h-[20px] items-center gap-1.5 text-xs text-muted-foreground`},Ak={class:`truncate`},jk={class:`rounded-2xl border bg-card p-5 shadow-sm`},Mk={class:`mb-4`},Nk={class:`mt-0.5 text-sm text-muted-foreground`},Pk={key:0,class:`flex items-center gap-3 rounded-xl bg-muted p-4`},Fk={key:1,class:`flex flex-col gap-2`},Ik=[`disabled`,`onClick`],Lk={class:`flex min-w-0 flex-col gap-0.5`},Rk={class:`flex items-center gap-2 text-sm font-semibold`},zk={class:`truncate font-mono text-xs text-muted-foreground`},Bk={key:0,class:`grid grid-cols-1 gap-4 lg:grid-cols-2`},Vk={class:`rounded-2xl border bg-card p-5 shadow-sm`},Hk={key:0,class:`flex items-center gap-3 rounded-xl bg-muted p-4`},Uk={key:1,class:`flex flex-col gap-2.5`},Wk=[`disabled`,`onClick`],Gk={class:`flex flex-1 flex-col`},Kk={class:`text-sm font-semibold`},qk={class:`text-xs text-muted-foreground`},Jk={key:0,class:`border-t`},Yk={class:`flex items-center justify-between gap-2 border-b bg-muted/40 px-3.5 py-1.5`},Xk={class:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`},Zk=[`disabled`,`title`,`onClick`],Qk=[`onClick`,`onKeydown`],$k=[`title`],eA={class:`truncate font-medium`},tA={class:`font-mono text-muted-foreground`},nA={class:`truncate text-muted-foreground`},rA={class:`flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100`},iA=[`disabled`,`title`,`onClick`],aA=[`disabled`,`onClick`],oA={key:2,class:`mt-3 overflow-hidden rounded-xl border`},sA={key:0,class:`border-t`},cA={class:`font-mono font-semibold uppercase`},lA={class:`truncate`},uA={class:`font-mono`},dA={class:`truncate`},fA=[`disabled`,`onClick`],pA={class:`rounded-2xl border bg-card p-5 shadow-sm`},mA=[`onClick`],hA={class:`flex min-w-0 items-center gap-2`},gA={class:`flex min-w-0 flex-col`},_A={class:`whitespace-nowrap font-mono uppercase leading-tight`},vA=[`title`],yA={class:`text-center font-mono tabular-nums`},bA={key:1,class:`rounded-2xl border bg-card p-5 shadow-sm`},xA={class:`flex items-center gap-3 rounded-xl bg-muted p-4`},SA=F({__name:`AnalyticsView`,setup(e){let t=M(null),n=M({findings:[],counts:{error:0,warn:0,suppressed:0},ok:!0}),r=M(!0),i=q(()=>({...n.value,findings:n.value.findings.filter(e=>!e.suppressed)})),a=q(()=>n.value.findings.filter(e=>e.suppressed)),o=q(()=>t.value?LO(t.value,i.value):null),s=q(()=>!!o.value&&(o.value.totals.keys===0||o.value.totals.locales===0)),c=q(()=>!!o.value&&o.value.totals.translatedPct===0);async function l(){let[e,r]=await Promise.all([jd(),Nf({includeSuppressed:!0}).catch(()=>null)]);t.value=e,r&&(n.value=r)}Gi(async()=>{try{await l()}catch(e){$.error(e.message)}finally{r.value=!1}});let u=M(!1),d=M(!1);function f(e){return e.ruleId===`spelling`?/"([^"]+)"/.exec(e.message)?.[1]:void 0}async function p(e,t){if(!d.value){d.value=!0;try{await t(),await l(),$.success(e)}catch(e){$.error(e.message)}finally{d.value=!1}}}let m=e=>p(`Dismissed until the source of ${e.key} changes`,()=>Pf(e.key,e.ruleId,e.locale)),h=e=>p(`Restored ${kO[e.ruleId].toLowerCase()} on ${e.key}`,()=>Ff(e.key,e.ruleId,e.locale)),g=(e,t)=>p(`Dismissed ${t} warning${t===1?``:`s`}`,()=>If({rules:[e]})),_=e=>{let t=f(e);t&&p(`Added "${t}" to the dictionary`,()=>_f(t))};function v(e){let t=new Map;for(let n of o.value.risk[e]){let e=t.get(n.ruleId);e?e.push(n):t.set(n.ruleId,[n])}return[...t.entries()].map(([e,t])=>({ruleId:e,findings:t}))}let y={ready:{label:`Ready`,icon:ju,text:`text-emerald-600 dark:text-emerald-400`,border:`border-l-emerald-500`,bar:`bg-emerald-500`,soft:`bg-emerald-500/10`},almost:{label:`Almost`,icon:Pu,text:`text-amber-600 dark:text-amber-400`,border:`border-l-amber-500`,bar:`bg-amber-500`,soft:`bg-amber-500/10`},blocked:{label:`Blocked`,icon:id,text:`text-red-600 dark:text-red-400`,border:`border-l-red-500`,bar:`bg-red-500`,soft:`bg-red-500/10`},none:{label:`Not started`,icon:gd,text:`text-muted-foreground`,border:`border-l-border`,bar:`bg-muted-foreground/40`,soft:`bg-muted`}},b={breaking:{label:`Breaking`,icon:id,text:`text-red-600 dark:text-red-400`,border:`border-l-red-500`,soft:`bg-red-500/10`},missing:{label:`Missing`,icon:Nu,text:`text-muted-foreground`,border:`border-l-muted-foreground/40`,soft:`bg-muted`},stale:{label:`Stale`,icon:Pu,text:`text-amber-600 dark:text-amber-400`,border:`border-l-amber-500`,soft:`bg-amber-500/10`},warning:{label:`Warning`,icon:Td,text:`text-amber-600 dark:text-amber-400`,border:`border-l-amber-500`,soft:`bg-amber-500/10`}},x=[{key:`breaking`,label:`Breaking`,blurb:"Lint errors — `glotfile check` fails on these. Ship-blocking.",text:`text-red-600 dark:text-red-400`,bar:`bg-red-500`},{key:`warning`,label:`Warning`,blurb:`Lint warnings — worth a look, won't block a release.`,text:`text-amber-600 dark:text-amber-400`,bar:`bg-amber-500`}],S=q(()=>{let e=o.value;return c.value?`none`:e.projectErrors>0?`blocked`:e.totals.ready===e.totals.locales&&e.totals.locales>0?`ready`:`blocked`}),C=q(()=>S.value===`none`?`Nothing to ship yet`:S.value===`ready`?`Ready to ship`:`Not ready to ship`);function w(e){return e.verdict===`ready`?e.notes.length?e.notes.join(` · `):`Clean — clears the gate`:e.blockers.join(` · `)}function T(e){return e.missingKeys.length?{locale:e.locale,states:[`missing`]}:e.errors.length?{locale:e.locale,...jO(e.errors[0])}:e.staleKeys.length?{locale:e.locale,states:[`needs-review`]}:{locale:e.locale}}function E(e){return ew(e).name}function D(e,t){return(t?e/t*100:0)+`%`}function ee(e){let t=[...new Set(o.value.risk[e].flatMap(e=>jO(e).issues??[]))];return t.length?{issues:t}:{needsAttention:!0}}return(e,t)=>(z(),B(`div`,zO,[r.value?(z(),B(`div`,BO,`Loading analytics…`)):s.value?(z(),B(`div`,VO,` No keys yet — add keys in the Editor to see analytics. `)):o.value?(z(),B(`div`,HO,[H(`section`,UO,[H(`div`,WO,[H(`span`,GO,j(o.value.totals.keys),1),t[2]||=H(`span`,{class:`text-xs text-muted-foreground`},`keys`,-1)]),H(`div`,KO,[H(`span`,qO,j(o.value.totals.locales),1),t[3]||=H(`span`,{class:`text-xs text-muted-foreground`},`locales`,-1)]),H(`div`,JO,[H(`span`,YO,j(o.value.totals.translatedPct)+`%`,1),t[4]||=H(`span`,{class:`text-xs text-muted-foreground`},`translated`,-1)]),H(`div`,XO,[H(`span`,ZO,j(o.value.totals.reviewedPct)+`%`,1),t[5]||=H(`span`,{class:`text-xs text-muted-foreground`},`reviewed`,-1)]),H(`button`,{type:`button`,class:`group flex flex-col px-5 text-left`,"data-test":`open-issues`,disabled:!o.value.totals.openIssues,onClick:t[0]||=e=>N(Ip)({needsAttention:!0})},[H(`span`,{class:A([`text-lg font-semibold tabular-nums`,o.value.totals.breaking?`text-red-600 dark:text-red-400`:``])},j(o.value.totals.openIssues),3),t[6]||=H(`span`,{class:`text-xs text-muted-foreground group-hover:text-foreground`},`open issues`,-1)],8,QO),H(`div`,$O,[H(`span`,ek,j(o.value.totals.sourceWords),1),t[7]||=H(`span`,{class:`text-xs text-muted-foreground`},`source words`,-1)])]),H(`section`,{class:A([`rounded-2xl border border-l-4 bg-card p-6 shadow-sm`,y[S.value].border])},[H(`div`,tk,[H(`div`,nk,[t[12]||=H(`div`,{class:`font-mono text-[11px] uppercase tracking-wider text-muted-foreground`},`Can I ship?`,-1),H(`h1`,rk,[(z(),V(ia(y[S.value].icon),{class:A([`size-6`,y[S.value].text])},null,8,[`class`])),W(` `+j(C.value),1)]),H(`p`,ik,[c.value?(z(),B(R,{key:0},[W(`Add translations to get started — run a sync to let the AI fill them in.`)],64)):(z(),B(R,{key:1},[H(`strong`,ak,j(o.value.totals.ready),1),W(` of `+j(o.value.totals.locales)+` locales ready`,1),o.value.totals.almost?(z(),B(R,{key:0},[t[8]||=W(` · `,-1),H(`strong`,ok,j(o.value.totals.almost),1),t[9]||=W(` need a refresh`,-1)],64)):G(``,!0),o.value.totals.blocked?(z(),B(R,{key:1},[t[10]||=W(` · `,-1),H(`strong`,sk,j(o.value.totals.blocked),1),t[11]||=W(` blocked`,-1)],64)):G(``,!0)],64))]),o.value.project.length?(z(),B(`ul`,ck,[(z(!0),B(R,null,I(o.value.project,e=>(z(),B(`li`,{key:`${e.ruleId}:${e.key}`,class:A([`flex items-center gap-1.5 text-xs`,e.severity===`error`?`text-red-600 dark:text-red-400`:`text-amber-600 dark:text-amber-400`])},[e.severity===`error`?(z(),V(N(id),{key:0,class:`size-3 shrink-0`})):(z(),V(N(Td),{key:1,class:`size-3 shrink-0`})),H(`span`,lk,j(N(kO)[e.ruleId]),1),H(`span`,uk,j(e.key),1),H(`span`,dk,j(e.message),1)],2))),128))])):G(``,!0)]),H(`div`,fk,[(z(!0),B(R,null,I([{n:o.value.totals.ready,label:`ready`,cls:`text-emerald-600 dark:text-emerald-400`},{n:o.value.totals.almost,label:`almost`,cls:`text-amber-600 dark:text-amber-400`},{n:o.value.totals.blocked,label:`blocked`,cls:`text-red-600 dark:text-red-400`}],e=>(z(),B(`div`,{key:e.label,class:`flex min-w-[66px] flex-col items-center rounded-xl border px-4 py-2`},[H(`span`,{class:A([`text-2xl font-semibold tabular-nums`,e.n?e.cls:`text-muted-foreground/50`])},j(e.n),3),H(`span`,pk,j(e.label),1)]))),128))])]),H(`div`,mk,[t[17]||=H(`span`,{class:`font-mono text-[10px] uppercase tracking-wider text-muted-foreground`},`Release gate`,-1),H(`span`,hk,[U(N(Du),{class:`size-3 text-emerald-500`}),t[13]||=W(` 100% translated`,-1)]),H(`span`,gk,[U(N(Du),{class:`size-3 text-emerald-500`}),t[14]||=W(` 0 lint errors`,-1)]),H(`span`,_k,[U(N(Du),{class:`size-3 text-emerald-500`}),t[15]||=W(` outputs exported`,-1)]),H(`span`,vk,[U(N(Du),{class:`size-3 text-emerald-500`}),t[16]||=W(` nothing stale`,-1)]),t[18]||=H(`span`,{class:`ml-auto text-[11px] italic text-muted-foreground`},[W(`same rules as `),H(`code`,{class:`font-mono not-italic`},`glotfile check`),W(` · skip via `),H(`code`,{class:`font-mono not-italic`},`config.lint.rules`)],-1)])],2),H(`section`,yk,[t[21]||=H(`header`,{class:`mb-4`},[H(`h2`,{class:`text-base font-semibold`},`Release readiness`),H(`p`,{class:`mt-0.5 text-sm text-muted-foreground`},`Per-locale status against the release gate. Click any locale to drill in.`)],-1),c.value?(z(),B(`div`,bk,[U(N(Wu),{class:`size-5 text-muted-foreground`}),t[19]||=H(`div`,{class:`flex flex-col`},[H(`b`,{class:`text-sm`},`No locale is ready yet.`),H(`span`,{class:`text-sm text-muted-foreground`},`Translate your strings, then locales appear here as they clear the gate.`)],-1)])):(z(),B(`div`,xk,[(z(!0),B(R,null,I(o.value.locales,e=>(z(),B(`button`,{key:e.locale,type:`button`,"data-test":`rcard-${e.locale}`,class:A([`flex flex-col gap-2 rounded-xl border border-l-[3px] p-3.5 text-left transition hover:-translate-y-0.5 hover:bg-muted/50`,y[e.verdict].border]),onClick:t=>N(Ip)(T(e))},[H(`div`,Ck,[H(`span`,wk,[H(`span`,Tk,j(e.locale),1),H(`span`,{class:`truncate text-[11px] text-muted-foreground`,title:E(e.locale)},j(E(e.locale)),9,Ek)]),H(`span`,{class:A([`flex items-center gap-1 text-[11px] font-semibold`,y[e.verdict].text])},[(z(),V(ia(y[e.verdict].icon),{class:`size-3`})),W(j(y[e.verdict].label),1)],2)]),H(`div`,Dk,[W(j(e.pct),1),t[20]||=H(`span`,{class:`ml-0.5 text-xs text-muted-foreground`},`%`,-1)]),H(`div`,Ok,[H(`span`,{class:`h-full bg-emerald-500`,style:me({width:D(e.counts.reviewed,e.total)})},null,4),H(`span`,{class:`h-full bg-amber-500`,style:me({width:D(e.counts.needsReview,e.total)})},null,4),H(`span`,{class:`h-full bg-sky-500`,style:me({width:D(e.counts.machine,e.total)})},null,4)]),H(`div`,kk,[e.verdict===`ready`?G(``,!0):(z(),V(ia(y[e.verdict].icon),{key:0,class:A([`size-3 shrink-0`,y[e.verdict].text])},null,8,[`class`])),H(`span`,Ak,j(w(e)),1)])],10,Sk))),128))]))]),H(`section`,jk,[H(`header`,Mk,[t[22]||=H(`h2`,{class:`text-base font-semibold`},`Needs attention`,-1),H(`p`,Nk,j(c.value?`Your prioritized worklist will fill in as the AI translates.`:`Prioritized — fix the top item first. Each opens the matching strings.`),1)]),o.value.worklist.length?(z(),B(`ol`,Fk,[(z(!0),B(R,null,I(o.value.worklist,(e,t)=>(z(),B(`li`,{key:e.id},[H(`button`,{type:`button`,class:A([`grid w-full grid-cols-[30px_1fr_auto_16px] items-center gap-3 rounded-xl border border-l-[3px] px-3.5 py-3 text-left transition enabled:hover:bg-muted/50`,[b[e.priority].border,t===0?b[e.priority].soft:``]]),disabled:!e.filter,onClick:t=>e.filter&&N(Ip)(e.filter)},[H(`span`,{class:A([`flex size-[30px] items-center justify-center rounded-lg`,[b[e.priority].soft,b[e.priority].text]])},[(z(),V(ia(b[e.priority].icon),{class:`size-4`}))],2),H(`span`,Lk,[H(`span`,Rk,[W(j(e.title)+` `,1),t===0?(z(),B(`span`,{key:0,class:A([`rounded-full px-2 py-0.5 font-mono text-[9.5px] font-semibold uppercase tracking-wide text-white`,b[e.priority].text.includes(`red`)?`bg-red-500`:b[e.priority].text.includes(`amber`)?`bg-amber-500`:`bg-muted-foreground`])},`Start here`,2)):G(``,!0)]),H(`span`,zk,j(e.where),1)]),H(`span`,{class:A([`rounded-full px-2.5 py-1 text-[11px] font-semibold`,[b[e.priority].soft,b[e.priority].text]])},j(b[e.priority].label),3),U(N(ku),{class:`size-4 text-muted-foreground`})],10,Ik)]))),128))])):(z(),B(`div`,Pk,[U(N(ju),{class:`size-5 text-emerald-500`}),t[23]||=H(`div`,{class:`flex flex-col`},[H(`b`,{class:`text-sm`},`Nothing needs attention.`),H(`span`,{class:`text-sm text-muted-foreground`},`Every translated string clears its checks and is up to date.`)],-1)]))]),c.value?(z(),B(`section`,bA,[t[32]||=H(`h2`,{class:`mb-4 text-base font-semibold`},`Quality`,-1),H(`div`,xA,[U(N(Mu),{class:`size-5 text-muted-foreground`}),t[31]||=H(`div`,{class:`flex flex-col`},[H(`b`,{class:`text-sm`},`No checks run yet.`),H(`span`,{class:`text-sm text-muted-foreground`},`Quality checks appear once strings are translated.`)],-1)])])):(z(),B(`div`,Bk,[H(`section`,Vk,[t[29]||=H(`header`,{class:`mb-4`},[H(`h2`,{class:`text-base font-semibold`},`Quality`),H(`p`,{class:`mt-0.5 text-sm text-muted-foreground`},`Grouped by risk — a broken placeholder is not a typo.`)],-1),o.value.totals.openIssues?(z(),B(`div`,Uk,[(z(),B(R,null,I(x,e=>H(`div`,{key:e.key,class:`overflow-hidden rounded-xl border`},[H(`button`,{type:`button`,class:`flex w-full items-center gap-3 px-3.5 py-3 text-left enabled:hover:bg-muted/50`,disabled:!o.value.risk[e.key].length,onClick:t=>N(Ip)(ee(e.key))},[H(`span`,{class:A([`w-1 self-stretch rounded-full`,e.bar])},null,2),H(`span`,{class:A([`min-w-[22px] text-xl font-semibold tabular-nums`,e.text])},j(o.value.risk[e.key].length),3),H(`span`,Gk,[H(`span`,Kk,j(e.label),1),H(`span`,qk,j(e.blurb),1)]),o.value.risk[e.key].length?(z(),V(N(ku),{key:0,class:`size-4 text-muted-foreground`})):G(``,!0)],8,Wk),o.value.risk[e.key].length?(z(),B(`div`,Jk,[(z(!0),B(R,null,I(v(e.key),n=>(z(),B(R,{key:n.ruleId},[H(`div`,Yk,[H(`span`,Xk,j(N(kO)[n.ruleId])+` · `+j(n.findings.length),1),e.key===`warning`?(z(),B(`button`,{key:0,type:`button`,class:`flex items-center gap-1 rounded px-1.5 py-0.5 text-[11px] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,disabled:d.value,title:`Hide all ${n.findings.length} until each key's source changes`,onClick:e=>g(n.ruleId,n.findings.length)},[U(N(Su),{class:`size-3`}),t[25]||=W(` Dismiss all `,-1)],8,Zk)):G(``,!0)]),(z(!0),B(R,null,I(n.findings,(e,n)=>(z(),B(`div`,{key:n,role:`button`,tabindex:`0`,class:`group grid w-full cursor-pointer grid-cols-[42px_minmax(90px,1fr)_1.4fr_auto] items-center gap-2.5 border-b px-3.5 py-2.5 text-left text-xs last:border-b-0 hover:bg-muted/50`,onClick:t=>N(Ip)(N(jO)(e)),onKeydown:Xl(t=>N(Ip)(N(jO)(e)),[`enter`])},[H(`span`,{class:`font-mono font-semibold uppercase text-muted-foreground`,title:e.locale?E(e.locale):`project-wide`},j(e.locale||`—`),9,$k),H(`span`,eA,[H(`span`,tA,j(e.key),1)]),H(`span`,nA,j(e.message),1),H(`span`,rA,[f(e)?(z(),B(`button`,{key:0,type:`button`,class:`flex items-center gap-1 rounded border bg-background px-1.5 py-0.5 text-[11px] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,disabled:d.value,title:`Never flag "${f(e)}" again`,onClick:Jl(t=>_(e),[`stop`])},[U(N(wu),{class:`size-3`}),t[26]||=W(` Add word `,-1)],8,iA)):G(``,!0),e.severity===`warn`?(z(),B(`button`,{key:1,type:`button`,class:`flex items-center gap-1 rounded border bg-background px-1.5 py-0.5 text-[11px] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,disabled:d.value,title:`Hide until this key's source changes`,onClick:Jl(t=>m(e),[`stop`])},[U(N(Su),{class:`size-3`}),t[27]||=W(` Dismiss `,-1)],8,aA)):G(``,!0)])],40,Qk))),128))],64))),128))])):G(``,!0)])),64))])):(z(),B(`div`,Hk,[U(N(ju),{class:`size-5 text-emerald-500`}),t[24]||=H(`div`,{class:`flex flex-col`},[H(`b`,{class:`text-sm`},`No issues found.`),H(`span`,{class:`text-sm text-muted-foreground`},`All translated strings pass their checks.`)],-1)])),a.value.length?(z(),B(`div`,oA,[H(`button`,{type:`button`,class:`flex w-full items-center gap-2 px-3.5 py-2.5 text-left text-xs text-muted-foreground hover:bg-muted/50`,onClick:t[1]||=e=>u.value=!u.value},[(z(),V(ia(u.value?N(Ou):N(ku)),{class:`size-3.5`})),U(N(Su),{class:`size-3.5`}),W(` Suppressed (`+j(a.value.length)+`) — hidden until each key's source changes `,1)]),u.value?(z(),B(`div`,sA,[(z(!0),B(R,null,I(a.value,(e,n)=>(z(),B(`div`,{key:n,class:`grid w-full grid-cols-[42px_minmax(90px,1fr)_1.4fr_auto] items-center gap-2.5 border-b px-3.5 py-2.5 text-left text-xs text-muted-foreground last:border-b-0`},[H(`span`,cA,j(e.locale||`—`),1),H(`span`,lA,[W(j(N(kO)[e.ruleId])+` · `,1),H(`span`,uA,j(e.key),1)]),H(`span`,dA,j(e.message),1),H(`button`,{type:`button`,class:`flex items-center gap-1 rounded border bg-background px-1.5 py-0.5 text-[11px] transition-colors hover:bg-accent hover:text-foreground`,disabled:d.value,onClick:t=>h(e)},[U(N(cd),{class:`size-3`}),t[28]||=W(` Restore `,-1)],8,fA)]))),128))])):G(``,!0)])):G(``,!0)]),H(`section`,pA,[t[30]||=_s(`<header class="mb-4"><h2 class="text-base font-semibold">By locale</h2><p class="mt-0.5 text-sm text-muted-foreground">Full breakdown.</p></header><div class="grid grid-cols-[minmax(96px,1.4fr)_52px_64px_50px_72px_72px_16px] gap-2 border-b pb-2 font-mono text-[11px] uppercase tracking-wide text-muted-foreground"><span>Locale</span><span class="text-center">Done</span><span class="text-center">Missing</span><span class="text-center">Stale</span><span class="text-center">Breaking</span><span class="text-center">Warnings</span><span></span></div>`,2),(z(!0),B(R,null,I(o.value.locales,e=>(z(),B(`button`,{key:e.locale,type:`button`,class:`grid w-full grid-cols-[minmax(96px,1.4fr)_52px_64px_50px_72px_72px_16px] items-center gap-2 border-b py-2.5 text-left text-sm last:border-b-0 hover:bg-muted/50`,onClick:t=>N(Ip)(T(e))},[H(`span`,hA,[H(`span`,{class:A([`size-2 shrink-0 rounded-full`,y[e.verdict].bar])},null,2),H(`span`,gA,[H(`span`,_A,j(e.locale),1),H(`span`,{class:`truncate text-xs leading-tight text-muted-foreground`,title:E(e.locale)},j(E(e.locale)),9,vA)])]),H(`span`,yA,j(e.pct)+`%`,1),H(`span`,{class:A([`text-center font-mono tabular-nums`,e.missingKeys.length?``:`text-muted-foreground`])},j(e.missingKeys.length||`—`),3),H(`span`,{class:A([`text-center font-mono tabular-nums`,e.staleKeys.length?`text-amber-600 dark:text-amber-400`:`text-muted-foreground`])},j(e.staleKeys.length||`—`),3),H(`span`,{class:A([`text-center font-mono tabular-nums`,e.breaking?`text-red-600 dark:text-red-400`:`text-muted-foreground`])},j(e.breaking||`—`),3),H(`span`,{class:A([`text-center font-mono tabular-nums`,e.warning?`text-amber-600 dark:text-amber-400`:`text-muted-foreground`])},j(e.warning||`—`),3),U(N(ku),{class:`size-3.5 text-muted-foreground`})],8,mA))),128))])]))])):G(``,!0)]))}});function CA(e,t){let n=t.trim().toLowerCase();return n===``?e:e.filter(e=>e.term.toLowerCase().includes(n)||(e.notes??``).toLowerCase().includes(n)?!0:Object.entries(e.translations??{}).some(([e,t])=>e.toLowerCase().includes(n)||t.toLowerCase().includes(n)))}var wA={class:`grid gap-4`},TA={class:`grid gap-1.5`},EA={key:0,class:`text-xs text-muted-foreground`},DA={class:`flex items-center justify-between`},OA={class:`flex items-center justify-between`},kA={class:`grid gap-1.5`},AA={key:0,class:`grid gap-2 border-t pt-3`},jA={key:1,class:`text-sm text-destructive`},MA=F({__name:`GlossaryEntryDialog`,props:Oa({entry:{},targetLocales:{}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:Oa([`saved`],[`update:open`]),setup(e,{emit:t}){let n=e,r=Xa(e,`open`),i=t,a=Yt({term:``,doNotTranslate:!1,caseSensitive:!1,notes:``,translations:{}}),o=M(!1),s=M(``),c=M(!1);Er(r,e=>{if(!e)return;let t=n.entry;c.value=t!==null,a.term=t?.term??``,a.doNotTranslate=t?.doNotTranslate??!1,a.caseSensitive=t?.caseSensitive??!1,a.notes=t?.notes??``,a.translations={};for(let e of n.targetLocales)a.translations[e]=t?.translations?.[e]??``;s.value=``},{immediate:!0});async function l(){let e=a.term.trim();if(!e){s.value=`Term is required.`;return}let t={};for(let[e,n]of Object.entries(a.translations)){let r=n.trim();r&&(t[e]=r)}let n={term:e};a.doNotTranslate&&(n.doNotTranslate=!0),a.caseSensitive&&(n.caseSensitive=!0),a.notes.trim()&&(n.notes=a.notes.trim()),Object.keys(t).length>0&&(n.translations=t),o.value=!0,s.value=``;try{await yf(n),$.success(c.value?`Updated ${e}`:`Added ${e}`),r.value=!1,i(`saved`)}catch(e){s.value=e.message}finally{o.value=!1}}return(t,n)=>(z(),V(N(Ph),{open:r.value,"onUpdate:open":n[5]||=e=>r.value=e},{default:P(()=>[U(N(OC),{class:`max-h-[85vh] max-w-lg overflow-y-auto`},{default:P(()=>[U(N(kC),null,{default:P(()=>[U(N(jC),null,{default:P(()=>[W(j(c.value?`Edit term`:`Add term`),1)]),_:1}),U(N(MC),null,{default:P(()=>[...n[6]||=[W(` Guide AI translations with do-not-translate terms and forced translations. `,-1)]]),_:1})]),_:1}),H(`div`,wA,[H(`div`,TA,[U(N(DC),{for:`glossary-term`},{default:P(()=>[...n[7]||=[W(`Term`,-1)]]),_:1}),U(N(KS),{id:`glossary-term`,modelValue:a.term,"onUpdate:modelValue":n[0]||=e=>a.term=e,class:`font-mono`,placeholder:`Sign in`,disabled:c.value,onKeydown:Xl(Jl(l,[`prevent`]),[`enter`])},null,8,[`modelValue`,`disabled`,`onKeydown`]),c.value?(z(),B(`p`,EA,` The term is the entry's identity and can't be changed. `)):G(``,!0)]),H(`div`,DA,[H(`div`,null,[U(N(DC),{for:`glossary-dnt`},{default:P(()=>[...n[8]||=[W(`Do not translate`,-1)]]),_:1}),n[9]||=H(`p`,{class:`text-xs text-muted-foreground`},`Keep this term verbatim in every language.`,-1)]),U(N(nC),{id:`glossary-dnt`,modelValue:a.doNotTranslate,"onUpdate:modelValue":n[1]||=e=>a.doNotTranslate=e},null,8,[`modelValue`])]),H(`div`,OA,[H(`div`,null,[U(N(DC),{for:`glossary-cs`},{default:P(()=>[...n[10]||=[W(`Case sensitive`,-1)]]),_:1}),n[11]||=H(`p`,{class:`text-xs text-muted-foreground`},`Only match the exact casing.`,-1)]),U(N(nC),{id:`glossary-cs`,modelValue:a.caseSensitive,"onUpdate:modelValue":n[2]||=e=>a.caseSensitive=e},null,8,[`modelValue`])]),H(`div`,kA,[U(N(DC),{for:`glossary-notes`},{default:P(()=>[...n[12]||=[W(`Notes`,-1)]]),_:1}),U(N(sw),{id:`glossary-notes`,modelValue:a.notes,"onUpdate:modelValue":n[3]||=e=>a.notes=e,rows:`5`,class:`min-h-24 resize-y`,placeholder:`Optional guidance for translators.`},null,8,[`modelValue`])]),e.targetLocales.length>0?(z(),B(`div`,AA,[n[13]||=H(`p`,{class:`text-sm font-medium`},`Forced translations`,-1),(z(!0),B(R,null,I(e.targetLocales,e=>(z(),B(`div`,{key:e,class:`grid gap-1.5`},[U(N(DC),{for:`glossary-tr-${e}`,class:`text-xs text-muted-foreground`},{default:P(()=>[U(Pw,{code:e,"show-name":``,"show-code":!1,size:12},null,8,[`code`])]),_:2},1032,[`for`]),U(N(KS),{id:`glossary-tr-${e}`,modelValue:a.translations[e],"onUpdate:modelValue":t=>a.translations[e]=t,placeholder:`Forced translation for ${e}`},null,8,[`id`,`modelValue`,`onUpdate:modelValue`,`placeholder`])]))),128))])):G(``,!0),s.value?(z(),B(`p`,jA,j(s.value),1)):G(``,!0)]),U(N(AC),null,{default:P(()=>[U(N(Q),{variant:`outline`,disabled:o.value,onClick:n[4]||=e=>r.value=!1},{default:P(()=>[...n[14]||=[W(`Cancel`,-1)]]),_:1},8,[`disabled`]),U(N(Q),{disabled:o.value,onClick:l},{default:P(()=>[W(j(c.value?`Save`:`Add term`),1)]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),NA={class:`min-h-0 flex-1 overflow-y-auto`},PA={key:0,class:`flex h-full items-center justify-center p-8 text-sm text-muted-foreground`},FA={key:1,class:`mx-auto flex max-w-3xl flex-col gap-4 p-6`},IA={class:`flex items-center justify-between`},LA={class:`relative`},RA={key:0,class:`rounded-lg border border-dashed p-10 text-center text-sm text-muted-foreground`},zA={key:1,class:`rounded-lg border border-dashed p-10 text-center text-sm text-muted-foreground`},BA={key:2,class:`flex flex-col gap-2`},VA={class:`min-w-0 flex-1`},HA={class:`flex flex-wrap items-center gap-2`},UA={class:`font-mono text-sm font-medium`},WA={key:0,class:`mt-1 text-sm text-muted-foreground`},GA={key:1,class:`mt-2 flex flex-wrap gap-1.5`},KA={class:`flex shrink-0 items-center gap-1`},qA={class:`font-mono`},JA=F({__name:`GlossaryView`,setup(e){let t=M([]),n=M(``),r=M([]),i=M(!1),a=M(!1),o=M(null),s=M(null),c=M(!1),l=M(``),u=q(()=>CA(t.value,l.value)),d=q(()=>r.value.filter(e=>e!==n.value));async function f(){let[e,a]=await Promise.all([vf(),jd()]);t.value=e,n.value=a.config.sourceLocale,r.value=a.config.locales,i.value=!0}f();function p(){o.value=null,a.value=!0}function m(e){o.value=e,a.value=!0}function h(e){return Object.entries(e.translations??{}).map(([e,t])=>`${e}: ${t}`)}async function g(){let e=s.value;if(e){c.value=!0;try{await bf(e.term),$.success(`Deleted ${e.term}`),s.value=null,await f()}catch(e){$.error(`Delete failed: ${e.message}`)}finally{c.value=!1}}}return(e,n)=>(z(),B(`div`,NA,[i.value?(z(),B(`div`,FA,[H(`div`,IA,[n[7]||=H(`div`,null,[H(`h2`,{class:`text-base font-semibold`},`Glossary`),H(`p`,{class:`text-sm text-muted-foreground`},`Do-not-translate terms and forced translations.`)],-1),U(N(Q),{onClick:p},{default:P(()=>[U(N(od),{class:`size-4`}),n[6]||=W(` Add term `,-1)]),_:1})]),H(`div`,LA,[U(N(pd),{class:`pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`}),U(N(KS),{modelValue:l.value,"onUpdate:modelValue":n[0]||=e=>l.value=e,placeholder:`Search terms, notes, translations…`,class:`h-8 w-full pl-8 pr-8`,onKeydown:n[1]||=Xl(e=>l.value=``,[`esc`])},null,8,[`modelValue`]),l.value?(z(),B(`button`,{key:0,class:`absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,"aria-label":`Clear search`,onClick:n[2]||=e=>l.value=``},[U(N(kd),{class:`size-4`})])):G(``,!0)]),t.value.length===0?(z(),B(`div`,RA,` No glossary terms yet — add do-not-translate terms and forced translations to guide AI. `)):u.value.length===0?(z(),B(`div`,zA,` No terms match your search. `)):(z(),B(`ul`,BA,[(z(!0),B(R,null,I(u.value,e=>(z(),B(`li`,{key:e.term,class:`flex items-start gap-3 rounded-lg border bg-card p-3 text-card-foreground shadow-sm`},[H(`div`,VA,[H(`div`,HA,[H(`span`,UA,j(e.term),1),e.doNotTranslate?(z(),V(N(eC),{key:0,variant:`secondary`},{default:P(()=>[...n[8]||=[W(`Do-not-translate`,-1)]]),_:1})):G(``,!0),e.caseSensitive?(z(),V(N(eC),{key:1,variant:`outline`},{default:P(()=>[...n[9]||=[W(`Case-sensitive`,-1)]]),_:1})):G(``,!0)]),e.notes?(z(),B(`p`,WA,j(e.notes),1)):G(``,!0),h(e).length?(z(),B(`div`,GA,[(z(!0),B(R,null,I(h(e),e=>(z(),B(`span`,{key:e,class:`inline-flex items-center rounded-md border bg-background px-2 py-0.5 font-mono text-xs`},j(e),1))),128))])):G(``,!0)]),H(`div`,KA,[U(N(Q),{variant:`ghost`,size:`icon`,"aria-label":`Edit ${e.term}`,onClick:t=>m(e)},{default:P(()=>[U(N(ad),{class:`size-4`})]),_:1},8,[`aria-label`,`onClick`]),U(N(Q),{variant:`ghost`,size:`icon`,class:`text-muted-foreground hover:text-destructive`,"aria-label":`Delete ${e.term}`,onClick:t=>s.value=e},{default:P(()=>[U(N(wd),{class:`size-4`})]),_:1},8,[`aria-label`,`onClick`])])]))),128))]))])):(z(),B(`div`,PA,` Loading glossary… `)),U(MA,{open:a.value,"onUpdate:open":n[3]||=e=>a.value=e,entry:o.value,"target-locales":d.value,onSaved:f},null,8,[`open`,`entry`,`target-locales`]),U(N(Ph),{open:s.value!==null,"onUpdate:open":n[5]||=e=>{e||(s.value=null)}},{default:P(()=>[U(N(OC),{class:`max-w-md`},{default:P(()=>[U(N(kC),null,{default:P(()=>[U(N(jC),null,{default:P(()=>[...n[10]||=[W(`Delete term`,-1)]]),_:1}),U(N(MC),null,{default:P(()=>[n[11]||=W(` Delete `,-1),H(`span`,qA,j(s.value?.term),1),n[12]||=W(` from the glossary? This cannot be undone. `,-1)]),_:1})]),_:1}),U(N(AC),null,{default:P(()=>[U(N(Q),{variant:`outline`,disabled:c.value,onClick:n[4]||=e=>s.value=null},{default:P(()=>[...n[13]||=[W(`Cancel`,-1)]]),_:1},8,[`disabled`]),U(N(Q),{variant:`destructive`,disabled:c.value,onClick:g},{default:P(()=>[...n[14]||=[W(`Delete`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`])]))}}),YA=[{id:`empty-source`,label:`Empty source`,description:`The source text itself is empty.`,default:`error`},{id:`empty-translation`,label:`Untranslated`,description:`A target translation is missing or blank.`,default:`error`},{id:`placeholder-mismatch`,label:`Placeholder mismatch`,description:`Placeholders differ between source and translation.`,default:`error`},{id:`icu-mismatch`,label:`ICU mismatch`,description:`ICU plural/select structure differs from the source.`,default:`error`},{id:`glossary-violation`,label:`Glossary`,description:`A glossary term is missing or translated incorrectly.`,default:`error`},{id:`max-length`,label:`Too long`,description:`The translation exceeds the key's maximum length.`,default:`warn`},{id:`identical-to-source`,label:`Identical to source`,description:`The translation is exactly the source text.`,default:`warn`},{id:`whitespace`,label:`Whitespace`,description:`Leading/trailing whitespace differs from the source.`,default:`warn`},{id:`spelling`,label:`Spelling`,description:`A word isn't in the locale's dictionary, the glossary, or your custom dictionary.`,default:`warn`}],XA=Object.fromEntries(YA.map(e=>[e.id,e.default]));function ZA(e,t){if(typeof e==`string`&&e.trim()===``)return t;let n=typeof e==`number`?e:Number(e);return Number.isFinite(n)?n:t}function QA(e){return{sourceLocale:e.sourceLocale,locales:[...e.locales],outputs:e.outputs.map(e=>({adapter:e.adapter,path:e.path,emptyAs:e.emptyAs,style:e.style===`flat`?`flat`:`nested`,indent:e.indent??null,finalNewline:e.finalNewline??null,includeLocale:e.includeLocale??!0,skipSourceLocale:e.skipSourceLocale??!1,localeAliases:e.localeAliases?structuredClone(e.localeAliases):{},localeCase:e.localeCase,localeMap:e.localeMap?structuredClone(e.localeMap):{}})),indent:e.format.indent,sortKeys:e.format.sortKeys,finalNewline:e.format.finalNewline,autoExport:e.autoExport??!0,exportLocales:[...e.exportLocales??[]],customWords:[...e.spelling?.customWords??[]],lintRules:{...XA,...e.lint?.rules},lintIgnore:[...e.lint?.ignore??[]],scanAccessors:[...e.scan?.accessors??[]],scanPatterns:[...e.scan?.patterns??[]],scanInclude:[...e.scan?.include??[]],scanExclude:[...e.scan?.exclude??[]],scanKeep:[...e.scan?.keep??[]]}}function $A(e,t){let n=e.outputs.map(e=>{let t={adapter:e.adapter.trim(),path:e.path.trim()};if(e.style===`flat`&&(t.style=`flat`),e.emptyAs&&(t.emptyAs=e.emptyAs),e.indent!=null&&(t.indent=e.indent),e.finalNewline!=null&&(t.finalNewline=e.finalNewline),e.includeLocale||(t.includeLocale=!1),e.skipSourceLocale&&(t.skipSourceLocale=!0),e.localeAliases&&Object.keys(e.localeAliases).length&&(t.localeAliases=Object.fromEntries(Object.entries(e.localeAliases).filter(([,e])=>e.length>0)),Object.keys(t.localeAliases).length===0&&delete t.localeAliases),e.localeCase&&(t.localeCase=e.localeCase),e.localeMap){let n=Object.fromEntries(Object.entries(e.localeMap).filter(([,e])=>e.trim()!==``));Object.keys(n).length&&(t.localeMap=n)}return t}).filter(e=>e.adapter||e.path),r={};e.scanAccessors.length&&(r.accessors=[...e.scanAccessors]),e.scanPatterns.length&&(r.patterns=[...e.scanPatterns]),e.scanInclude.length&&(r.include=[...e.scanInclude]),e.scanExclude.length&&(r.exclude=[...e.scanExclude]),e.scanKeep.length&&(r.keep=[...e.scanKeep]);let i={sourceLocale:e.sourceLocale,locales:[...e.locales],outputs:n,format:{indent:ZA(e.indent,2),sortKeys:e.sortKeys,finalNewline:e.finalNewline},autoExport:e.autoExport,...e.exportLocales.length?{exportLocales:[...e.exportLocales]}:{},spelling:{customWords:[...e.customWords]},...Object.keys(r).length?{scan:r}:{}},a=Object.fromEntries(Object.entries(e.lintRules).filter(([e,t])=>XA[e]!==void 0&&t!==XA[e])),o={};return Object.keys(a).length&&(o.rules=a),e.lintIgnore.length&&(o.ignore=[...e.lintIgnore]),t?.lint?.spelling!==void 0&&(o.spelling=t.lint.spelling),Object.keys(o).length&&(i.lint=o),t?.storage!==void 0&&(i.storage=t.storage),i}var ej=M(0),tj={class:`flex items-center gap-2 p-2`},nj=[`aria-label`],rj={class:`!flex items-center gap-2`},ij={class:`truncate font-medium`},aj={class:`flex items-center gap-2`},oj={key:0,class:`grid gap-5 border-t border-border p-4`},sj={key:0,class:`grid gap-1.5`},cj={class:`mt-1 inline-flex w-fit rounded-md border border-input p-0.5`},lj=[`onClick`],uj={key:1,class:`grid gap-1.5`},dj={class:`mt-1 inline-flex w-fit rounded-md border border-input p-0.5`},fj=[`onClick`],pj={key:2,class:`grid gap-1.5`},mj={class:`flex items-center gap-2`},hj={key:0,class:`text-xs text-muted-foreground`},gj={class:`flex items-center gap-2`},_j={key:3,class:`grid gap-1.5`},vj={class:`flex items-center gap-2`},yj={key:0,class:`text-xs text-muted-foreground`},bj={class:`flex items-center gap-2`},xj={class:`text-xs text-muted-foreground`},Sj={key:4,class:`grid gap-1.5`},Cj={class:`flex items-center gap-2`},wj={class:`text-xs text-muted-foreground`},Tj={class:`grid gap-1.5`},Ej={class:`flex w-full items-center justify-between gap-4`},Dj={class:`font-mono text-xs text-muted-foreground`},Oj={class:`grid gap-1.5`},kj={class:`mt-1 grid gap-2`},Aj={key:0,class:`text-xs text-muted-foreground`},jj={class:`w-24 shrink-0 font-mono text-xs font-semibold`},Mj={key:1},Nj={class:`!flex items-center gap-1.5`},Pj={class:`border-t border-border pt-4`},Fj={class:`mt-2 grid gap-2`},Ij={key:0,class:`text-xs text-muted-foreground`},Lj={class:`flex h-8 shrink-0 items-center gap-1.5`},Rj={class:`font-mono text-xs font-semibold`},zj={class:`flex flex-1 flex-wrap items-center gap-1.5`},Bj=[`onClick`],Vj={key:1},Hj={class:`!flex items-center gap-1.5`},Uj=F({__name:`OutputEditor`,props:{output:{},formatIndent:{},formatFinalNewline:{type:Boolean},locales:{},adapters:{}},emits:[`update:output`,`remove`],setup(e,{emit:t}){let n=e,r=t,i=M(!1),a=M({}),o={"laravel-php":[`emptyAs`,`indent`,`finalNewline`],"vue-i18n-json":[`emptyAs`,`style`,`indent`,`finalNewline`],"flutter-arb":[`emptyAs`,`indent`,`finalNewline`,`includeLocale`],"angular-xliff":[`emptyAs`],"rails-yaml":[`emptyAs`,`indent`,`finalNewline`],"apple-strings":[`emptyAs`]};function s(e){return o[e]??[`emptyAs`,`indent`,`finalNewline`]}function c(e){return s(n.output.adapter).includes(e)}let l=[{value:`source`,label:`Fill source`},{value:`empty`,label:`Leave empty`},{value:`omit`,label:`Omit`}],u=[{value:`lower-hyphen`,label:`lower-hyphen`,example:`en-us`},{value:`lower-underscore`,label:`lower-underscore`,example:`en_us`},{value:`bcp47-hyphen`,label:`bcp47-hyphen`,example:`en-US`},{value:`bcp47-underscore`,label:`bcp47-underscore`,example:`en_US`}];function d(e){return e===`flutter-arb`?`Default (Flutter: en_US)`:e===`angular-xliff`?`Default (Angular: en-US)`:e===`rails-yaml`?`Default (Rails: en-US)`:e===`apple-strings`?`Default (Apple: en-US)`:`Default (en-us)`}let f=q(()=>n.output.localeCase??`default`);function p(e){y({localeCase:e==="default"?void 0:e})}let m={"laravel-php":`Laravel PHP`,"vue-i18n-json":`Vue i18n JSON`,"flutter-arb":`Flutter ARB`,"angular-xliff":`Angular XLIFF`,"rails-yaml":`Rails YAML`,"apple-strings":`Apple .strings`};function h(e){return m[e]??e}let g=q(()=>[...n.adapters].sort((e,t)=>h(e).localeCompare(h(t)))),_={"laravel-php":Vu,"vue-i18n-json":Bu,"flutter-arb":_d,"angular-xliff":Vu,"rails-yaml":Vu,"apple-strings":_d};function v(e){return _[e]??Uu}function y(e){r(`update:output`,{...n.output,...e})}function b(e){return e===`flutter-arb`?`omit`:`source`}function x(e){y({adapter:e,emptyAs:b(e),style:e===`vue-i18n-json`?`nested`:n.output.style,includeLocale:!0})}let S=q(()=>n.output.emptyAs??b(n.output.adapter)),C=q(()=>n.output.finalNewline??n.formatFinalNewline),w=q(()=>n.output.indent!=null),T=q(()=>n.output.finalNewline!=null),E=q(()=>n.output.localeAliases??{}),D=q(()=>Object.keys(E.value)),ee=q(()=>n.locales.filter(e=>!D.value.includes(e)));function te(e){y({localeAliases:e})}function ne(e){te({...E.value,[e]:[]})}function O(e){let t={...E.value};delete t[e],te(t)}function re(e){let t=(a.value[e]??``).trim();if(!t)return;let n=E.value[e]??[];n.includes(t)||(te({...E.value,[e]:[...n,t]}),a.value={...a.value,[e]:``})}function ie(e,t){te({...E.value,[e]:(E.value[e]??[]).filter(e=>e!==t)})}let ae=q(()=>n.output.localeMap??{}),oe=q(()=>Object.keys(ae.value)),k=q(()=>n.locales.filter(e=>!oe.value.includes(e)));function se(e){y({localeMap:e})}function ce(e){se({...ae.value,[e]:e})}function le(e){let t={...ae.value};delete t[e],se(t)}function ue(e,t){se({...ae.value,[e]:t})}return(t,n)=>(z(),B(`div`,{class:A([`rounded-lg border`,i.value?`border-input`:`border-border`])},[H(`div`,tj,[U(N(dx),null,{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,class:`grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground`,"aria-label":i.value?`Collapse`:`Expand options`,onClick:n[0]||=e=>i.value=!i.value},[U(N(ku),{class:A([`size-4 transition-transform`,i.value?`rotate-90`:``])},null,8,[`class`])],8,nj)]),_:1}),U(N(HC),null,{default:P(()=>[W(j(i.value?`Collapse`:`Expand options`),1)]),_:1})]),_:1}),U(N(Tb),{"model-value":e.output.adapter,"onUpdate:modelValue":x},{default:P(()=>[U(N(qS),{class:`w-44 shrink-0`},{default:P(()=>[H(`span`,rj,[(z(),V(ia(v(e.output.adapter)),{class:`size-3.5 shrink-0 text-primary`})),H(`span`,ij,j(h(e.output.adapter)),1)])]),_:1}),U(N(JS),null,{default:P(()=>[(z(!0),B(R,null,I(g.value,e=>(z(),V(N(XS),{key:e,value:e},{default:P(()=>[H(`span`,aj,[(z(),V(ia(v(e)),{class:`size-3.5 text-primary`})),W(` `+j(h(e)),1)])]),_:2},1032,[`value`]))),128)),e.output.adapter&&!e.adapters.includes(e.output.adapter)?(z(),V(N(XS),{key:0,value:e.output.adapter},{default:P(()=>[W(j(e.output.adapter),1)]),_:1},8,[`value`])):G(``,!0)]),_:1})]),_:1},8,[`model-value`]),U(N(KS),{"model-value":e.output.path,class:`flex-1 font-mono text-sm`,placeholder:`lib/l10n/app_{locale}.arb`,spellcheck:`false`,"aria-label":`Output path`,"onUpdate:modelValue":n[1]||=e=>y({path:String(e)})},null,8,[`model-value`]),U(N(Q),{variant:`ghost`,size:`icon`,class:`shrink-0 text-muted-foreground hover:text-destructive`,"aria-label":`Remove output`,onClick:n[2]||=e=>r(`remove`)},{default:P(()=>[U(N(wd),{class:`size-4`})]),_:1})]),i.value?(z(),B(`div`,oj,[c(`emptyAs`)?(z(),B(`div`,sj,[U(N(DC),null,{default:P(()=>[...n[8]||=[W(`Empty keys`,-1)]]),_:1}),n[9]||=H(`p`,{class:`text-xs text-muted-foreground`},`What to write when a translation is missing.`,-1),H(`div`,cj,[(z(),B(R,null,I(l,e=>H(`button`,{key:e.value,type:`button`,class:A([`rounded-[5px] px-2.5 py-1 text-xs font-medium transition-colors`,S.value===e.value?`bg-primary text-primary-foreground`:`text-muted-foreground hover:text-foreground`]),onClick:t=>y({emptyAs:e.value})},j(e.label),11,lj)),64))])])):G(``,!0),c(`style`)?(z(),B(`div`,uj,[U(N(DC),null,{default:P(()=>[...n[10]||=[W(`Nesting`,-1)]]),_:1}),n[11]||=H(`p`,{class:`text-xs text-muted-foreground`},`Expand dotted keys into nested objects.`,-1),H(`div`,dj,[(z(),B(R,null,I([`nested`,`flat`],t=>H(`button`,{key:t,type:`button`,class:A([`rounded-[5px] px-2.5 py-1 text-xs font-medium capitalize transition-colors`,(e.output.style??`nested`)===t?`bg-primary text-primary-foreground`:`text-muted-foreground hover:text-foreground`]),onClick:e=>y({style:t})},j(t),11,fj)),64))])])):G(``,!0),c(`indent`)?(z(),B(`div`,pj,[H(`div`,mj,[U(N(DC),null,{default:P(()=>[...n[12]||=[W(`Indent`,-1)]]),_:1}),w.value?(z(),B(`button`,{key:1,type:`button`,class:`text-xs text-primary hover:underline`,onClick:n[3]||=e=>y({indent:null})},`Reset`)):(z(),B(`span`,hj,`Inherited · `+j(e.formatIndent),1))]),H(`div`,gj,[U(N(KS),{type:`number`,min:`0`,max:`8`,class:A([`w-20`,w.value?`border-primary`:``]),"model-value":e.output.indent??``,placeholder:String(e.formatIndent),"onUpdate:modelValue":n[4]||=e=>y({indent:e===``?null:Math.max(0,parseInt(String(e),10)||0)})},null,8,[`class`,`model-value`,`placeholder`]),n[13]||=H(`span`,{class:`text-xs text-muted-foreground`},`spaces`,-1)])])):G(``,!0),c(`finalNewline`)?(z(),B(`div`,_j,[H(`div`,vj,[U(N(DC),null,{default:P(()=>[...n[14]||=[W(`Final newline`,-1)]]),_:1}),T.value?(z(),B(`button`,{key:1,type:`button`,class:`text-xs text-primary hover:underline`,onClick:n[5]||=e=>y({finalNewline:null})},`Reset`)):(z(),B(`span`,yj,`Inherited · `+j(e.formatFinalNewline?`on`:`off`),1))]),H(`div`,bj,[U(N(nC),{"model-value":C.value,"onUpdate:modelValue":n[6]||=e=>y({finalNewline:e})},null,8,[`model-value`]),H(`span`,xj,j(C.value?`Enabled`:`Disabled`),1)])])):G(``,!0),c(`includeLocale`)?(z(),B(`div`,Sj,[U(N(DC),{class:`flex items-center gap-1.5`},{default:P(()=>[...n[15]||=[W(`Include `,-1),H(`code`,{class:`font-mono text-xs`},`@@locale`,-1)]]),_:1}),n[16]||=H(`p`,{class:`text-xs text-muted-foreground`},`Write the locale marker into each file. Standard for Flutter.`,-1),H(`div`,Cj,[U(N(nC),{"model-value":e.output.includeLocale??!0,"onUpdate:modelValue":n[7]||=e=>y({includeLocale:e})},null,8,[`model-value`]),H(`span`,wj,j(e.output.includeLocale??!0?`Enabled`:`Disabled`),1)])])):G(``,!0),H(`div`,Tj,[U(N(DC),null,{default:P(()=>[...n[17]||=[W(`Locale code format`,-1)]]),_:1}),n[18]||=H(`p`,{class:`text-xs text-muted-foreground`},[W(`How the `),H(`code`,{class:`font-mono text-xs`},`{locale}`),W(` token is rendered in file names (and the in-file marker for ARB).`)],-1),U(N(Tb),{"model-value":f.value,"onUpdate:modelValue":p},{default:P(()=>[U(N(qS),{class:`w-72`,"aria-label":`Locale code format`},{default:P(()=>[U(N(Kb))]),_:1}),U(N(JS),null,{default:P(()=>[U(N(XS),{value:`default`},{default:P(()=>[W(j(d(e.output.adapter)),1)]),_:1}),(z(),B(R,null,I(u,e=>U(N(XS),{key:e.value,value:e.value},{default:P(()=>[H(`span`,Ej,[H(`span`,null,j(e.label),1),H(`span`,Dj,j(e.example),1)])]),_:2},1032,[`value`])),64))]),_:1})]),_:1},8,[`model-value`])]),H(`div`,Oj,[U(N(DC),null,{default:P(()=>[...n[19]||=[W(`Locale overrides`,-1)]]),_:1}),n[21]||=H(`p`,{class:`text-xs text-muted-foreground`},`Force a specific export code for one locale — wins over the format above.`,-1),H(`div`,kj,[oe.value.length===0?(z(),B(`p`,Aj,`No overrides.`)):G(``,!0),(z(!0),B(R,null,I(oe.value,e=>(z(),B(`div`,{key:e,class:`flex items-center gap-2`},[H(`span`,jj,j(e),1),U(N(bu),{class:`size-3 shrink-0 text-muted-foreground`}),U(N(KS),{class:`h-8 flex-1 font-mono text-xs`,"aria-label":`Export code for `+e,placeholder:`export code`,"model-value":ae.value[e]??``,"onUpdate:modelValue":t=>ue(e,String(t))},null,8,[`aria-label`,`model-value`,`onUpdate:modelValue`]),U(N(Q),{variant:`ghost`,size:`icon`,class:`size-8 shrink-0 text-muted-foreground hover:text-destructive`,"aria-label":`Remove override `+e,onClick:t=>le(e)},{default:P(()=>[U(N(wd),{class:`size-3.5`})]),_:1},8,[`aria-label`,`onClick`])]))),128)),k.value.length>0?(z(),B(`div`,Mj,[U(N(Tb),{"model-value":``,"onUpdate:modelValue":ce},{default:P(()=>[U(N(qS),{class:`w-56 text-muted-foreground`,"aria-label":`Add locale override`},{default:P(()=>[H(`span`,Nj,[U(N(od),{class:`size-3.5`}),n[20]||=W(` Add override…`,-1)])]),_:1}),U(N(JS),null,{default:P(()=>[(z(!0),B(R,null,I(k.value,e=>(z(),V(N(XS),{key:e,value:e},{default:P(()=>[W(j(e),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})])):G(``,!0)])]),H(`div`,Pj,[n[25]||=H(`div`,{class:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Advanced · Locale aliases`,-1),n[26]||=H(`p`,{class:`mt-1.5 text-xs text-muted-foreground`},[W(` Write one catalog locale to additional file codes — e.g. `),H(`span`,{class:`font-mono`},`zh-Hans`),W(` also as `),H(`span`,{class:`font-mono`},`zh, zh_CN`),W(`. `)],-1),H(`div`,Fj,[D.value.length===0?(z(),B(`p`,Ij,`No aliases. The locale's own code is used as the file name.`)):G(``,!0),(z(!0),B(R,null,I(D.value,e=>(z(),B(`div`,{key:e,class:`flex items-start gap-2`},[H(`div`,Lj,[H(`span`,Rj,j(e),1),U(N(bu),{class:`size-3 text-muted-foreground`})]),H(`div`,zj,[(z(!0),B(R,null,I(E.value[e]??[],t=>(z(),B(`span`,{key:t,class:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 font-mono text-xs`},[W(j(t)+` `,1),U(N(dx),null,{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,class:`text-muted-foreground hover:text-destructive`,"aria-label":`Remove`,onClick:n=>ie(e,t)},[U(N(kd),{class:`size-3`})],8,Bj)]),_:2},1024),U(N(HC),null,{default:P(()=>[...n[22]||=[W(`Remove`,-1)]]),_:1})]),_:2},1024)]))),128)),U(N(KS),{class:`h-8 w-28 font-mono text-xs`,placeholder:`add code…`,"model-value":a.value[e]??``,"onUpdate:modelValue":t=>a.value={...a.value,[e]:String(t)},onKeydown:Xl(Jl(t=>re(e),[`prevent`]),[`enter`])},null,8,[`model-value`,`onUpdate:modelValue`,`onKeydown`])]),U(N(dx),null,{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[U(N(Q),{variant:`ghost`,size:`icon`,class:`size-8 shrink-0 text-muted-foreground hover:text-destructive`,"aria-label":`Remove alias`,onClick:t=>O(e)},{default:P(()=>[U(N(wd),{class:`size-3.5`})]),_:1},8,[`onClick`])]),_:2},1024),U(N(HC),null,{default:P(()=>[...n[23]||=[W(`Remove alias`,-1)]]),_:1})]),_:2},1024)]))),128)),ee.value.length>0?(z(),B(`div`,Vj,[U(N(Tb),{"model-value":``,"onUpdate:modelValue":ne},{default:P(()=>[U(N(qS),{class:`w-56 text-muted-foreground`},{default:P(()=>[H(`span`,Hj,[U(N(od),{class:`size-3.5`}),n[24]||=W(` Add locale alias…`,-1)])]),_:1}),U(N(JS),null,{default:P(()=>[(z(!0),B(R,null,I(ee.value,e=>(z(),V(N(XS),{key:e,value:e},{default:P(()=>[W(j(e),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})])):G(``,!0)])])])):G(``,!0)],2))}}),Wj={class:`grid gap-1.5`},Gj={class:`flex flex-wrap gap-2`},Kj=[`aria-label`,`onClick`],qj={key:0,class:`text-sm text-muted-foreground`},Jj={class:`flex max-w-sm gap-2`},Yj={key:0,class:`flex items-center gap-1.5 text-xs text-destructive`},Xj=F({__name:`ScanListField`,props:{label:{},items:{},placeholder:{},mono:{type:Boolean},addLabel:{},validate:{type:Function}},emits:[`update:items`],setup(e,{emit:t}){let n=e,r=t,i=M(``),a=M(``);function o(){let e=i.value.trim();if(!e)return;if(n.items.includes(e)){a.value=`"${e}" is already listed`;return}let t=n.validate?.(e)??null;if(t){a.value=t;return}a.value=``,r(`update:items`,[...n.items,e]),i.value=``}function s(e){r(`update:items`,n.items.filter(t=>t!==e))}return(t,n)=>(z(),B(`div`,Wj,[U(N(DC),null,{default:P(()=>[W(j(e.label),1)]),_:1}),L(t.$slots,`help`),H(`div`,Gj,[(z(!0),B(R,null,I(e.items,t=>(z(),B(`span`,{key:t,class:A([`inline-flex items-center gap-1.5 rounded-lg border bg-accent px-2.5 py-1.5 text-sm`,e.mono&&`font-mono`])},[W(j(t)+` `,1),H(`button`,{type:`button`,class:`flex size-[18px] items-center justify-center rounded text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive`,"aria-label":`Remove ${t}`,onClick:e=>s(t)},[U(N(kd),{class:`size-3`})],8,Kj)],2))),128)),e.items.length===0?(z(),B(`p`,qj,`None — auto-detect.`)):G(``,!0)]),H(`div`,Jj,[U(N(KS),{modelValue:i.value,"onUpdate:modelValue":n[0]||=e=>i.value=e,class:A(e.mono?`font-mono`:void 0),placeholder:e.placeholder,onKeydown:Xl(Jl(o,[`prevent`]),[`enter`]),onInput:n[1]||=e=>a.value=``},null,8,[`modelValue`,`class`,`placeholder`,`onKeydown`]),U(N(Q),{variant:`outline`,onClick:o},{default:P(()=>[U(N(od),{class:`size-4`}),W(` `+j(e.addLabel??`Add`),1)]),_:1})]),a.value?(z(),B(`p`,Yj,[U(N(Td),{class:`size-3.5`}),W(` `+j(a.value),1)])):G(``,!0)]))}}),Zj={class:`flex flex-col items-center justify-center gap-4 p-6 py-10 text-center`},Qj={class:`p-6`},$j={class:`flex items-start gap-3 pr-6`},eM={class:`grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-primary/25 bg-primary/10 text-primary`},tM={class:`min-w-0`},nM={key:0,class:`mt-5 flex items-center gap-3 rounded-lg border border-success-border bg-success-bg/50 px-4 py-3.5`},rM={class:`mt-4 grid grid-cols-4 gap-2`},iM={class:`mt-1.5 text-[17px] font-semibold leading-none tabular-nums`},aM={class:`mt-1 whitespace-nowrap text-[10.5px] text-muted-foreground`},oM={class:`mt-2 text-center text-[11px] text-muted-foreground`},sM={class:`mt-4 divide-y divide-border overflow-hidden rounded-lg border border-border`},cM={key:0},lM=[`onClick`],uM={class:`ml-auto font-mono text-[11px] text-muted-foreground tabular-nums`},dM={key:0,class:`max-h-36 divide-y divide-border/50 overflow-auto border-t border-border bg-muted/20 gf-content-fade`},fM={key:0,class:`mt-4 flex items-center justify-between gap-4 rounded-lg border border-destructive/30 bg-destructive-soft/40 p-3.5`},pM={class:`flex items-start gap-2.5`},mM={class:`text-[13px] font-medium`},hM={class:`flex items-center gap-2 border-t border-border px-6 py-4`},gM={class:`ml-auto`},_M={class:`flex flex-col items-center justify-center gap-4 p-6 py-10 text-center`},vM={class:`p-6`},yM={class:`flex flex-col items-center gap-3 pt-1 text-center`},bM={class:`grid h-12 w-12 place-items-center rounded-full bg-success-bg text-success ring-1 ring-success-border`},xM={class:`font-semibold text-foreground`},SM={class:`font-semibold text-foreground`},CM={class:`font-semibold text-foreground`},wM={key:0,class:`mt-5 overflow-hidden rounded-lg border border-warning-border bg-warning-bg/60`},TM={class:`whitespace-nowrap text-[13px] font-medium text-warning`},EM={key:0,class:`max-h-44 divide-y divide-warning-border/40 overflow-auto border-t border-warning-border/70 gf-content-fade`},DM={class:`flex items-center border-t border-border px-6 py-4`},OM={class:`ml-auto`},kM={class:`p-6`},AM={class:`flex items-start gap-3 pr-6`},jM={class:`grid h-10 w-10 shrink-0 place-items-center rounded-full bg-destructive-soft text-destructive`},MM={class:`min-w-0`},NM={class:`flex items-center border-t border-border px-6 py-4`},PM={class:`ml-auto`},FM=F({__name:`SyncWizard`,emits:[`dismiss`,`synced`],setup(e,{expose:t,emit:n}){let r=n,i=M(!0),a=M(`loading`),o=M(null),s=M([]),c=M(null),l=M(``),u=M(!1),d=M(!1),f=M({});t({init:p});async function p(){a.value=`loading`;try{let e=await zf();o.value=e.plan,s.value=e.warnings,a.value=`review`}catch(e){l.value=e.message,a.value=`error`}}let m=q(()=>{let e=o.value;return e?e.added.length+e.sourceChanged.length+e.adopted.length+e.removed.length:0}),h=q(()=>m.value===0),g=q(()=>{let e=o.value;return e?[{id:`added`,label:`Added`,icon:od,tone:`added`,keys:e.added},{id:`sourceChanged`,label:`Source changed`,icon:ad,tone:`changed`,keys:e.sourceChanged},{id:`adopted`,label:`Adopted`,icon:Du,tone:`adopted`,keys:e.adopted.map(e=>`${e.key} · ${e.locale}`)},{id:`removed`,label:`Removed`,icon:wd,tone:`removed`,keys:e.removed}]:[]}),_={added:`text-success`,changed:`text-amber-600 dark:text-amber-400`,adopted:`text-primary`,removed:`text-destructive`};async function v(){a.value=`applying`;try{c.value=await Bf({prune:u.value}),a.value=`done`}catch(e){l.value=e.message,a.value=`error`}}function y(e){e||a.value!==`applying`&&(a.value===`done`?r(`synced`):r(`dismiss`))}return(e,t)=>(z(),V(N(Ph),{open:i.value,"onUpdate:open":y},{default:P(()=>[U(N(xg),null,{default:P(()=>[U(N(yg),{class:`fixed inset-0 z-50 bg-foreground/40 gf-content-fade`}),U(N(gg),{class:`fixed left-1/2 top-1/2 z-50 w-[30rem] max-w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-card text-card-foreground shadow-2xl focus:outline-none gf-content-fade`,onInteractOutside:t[8]||=Jl(()=>{},[`prevent`])},{default:P(()=>[a.value===`loading`?(z(),B(R,{key:0},[U(N(Sg),{class:`sr-only`},{default:P(()=>[...t[9]||=[W(`Comparing files`,-1)]]),_:1}),H(`div`,Zj,[U(N($u),{class:`size-9 text-primary gf-spin`}),t[10]||=H(`div`,{class:`text-[13px] text-muted-foreground`},`Reading your locale files…`,-1)])],64)):a.value===`review`&&o.value?(z(),B(R,{key:1},[H(`button`,{type:`button`,class:`absolute right-3.5 top-3.5 z-10 grid h-7 w-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,onClick:t[0]||=e=>r(`dismiss`)},[U(N(kd),{class:`size-4`})]),H(`div`,Qj,[H(`div`,$j,[H(`div`,eM,[U(N(sd),{class:`size-5`})]),H(`div`,tM,[U(N(Sg),{class:`text-base font-semibold leading-tight`},{default:P(()=>[...t[11]||=[W(`Sync from files`,-1)]]),_:1}),U(N(_g),{class:`mt-0.5 text-[13px] text-muted-foreground`},{default:P(()=>[...t[12]||=[W(` Re-reads your locale files and merges changes in. Glossary, context and existing translations are kept. `,-1)]]),_:1})])]),h.value?(z(),B(`div`,nM,[U(N(Du),{class:`size-4 shrink-0 text-success`,"stroke-width":2.5}),t[13]||=H(`span`,{class:`text-[13px] text-foreground`},`Already in sync — nothing changed on disk.`,-1)])):(z(),B(R,{key:1},[H(`div`,rM,[(z(!0),B(R,null,I(g.value,e=>(z(),B(`div`,{key:e.id,class:`flex flex-col items-center rounded-lg border border-border bg-muted/40 px-2 py-2.5`},[(z(),V(ia(e.icon),{class:A([`size-3.5`,_[e.tone]])},null,8,[`class`])),H(`span`,iM,j(e.keys.length),1),H(`span`,aM,j(e.label),1)]))),128))]),H(`p`,oM,j(o.value.unchanged.toLocaleString())+` key`+j(o.value.unchanged===1?``:`s`)+` unchanged `,1),H(`div`,sM,[(z(!0),B(R,null,I(g.value,e=>(z(),B(R,{key:e.id},[e.keys.length?(z(),B(`div`,cM,[H(`button`,{type:`button`,class:`flex w-full items-center gap-2 px-3 py-2 text-[12.5px] transition-colors hover:bg-muted/50`,onClick:t=>f.value[e.id]=!f.value[e.id]},[U(N(ku),{class:A([`size-3.5 shrink-0 transition-transform`,f.value[e.id]?`rotate-90`:``])},null,8,[`class`]),(z(),V(ia(e.icon),{class:A([`size-3.5 shrink-0`,_[e.tone]])},null,8,[`class`])),H(`span`,null,j(e.label),1),H(`span`,uM,j(e.keys.length),1)],8,lM),f.value[e.id]?(z(),B(`ul`,dM,[(z(!0),B(R,null,I(e.keys,e=>(z(),B(`li`,{key:e,class:`truncate px-3 py-1.5 font-mono text-[11.5px] text-muted-foreground`},j(e),1))),128))])):G(``,!0)])):G(``,!0)],64))),128))]),o.value.removed.length?(z(),B(`div`,fM,[H(`div`,pM,[U(N(wd),{class:`mt-0.5 size-4 shrink-0 text-destructive`}),H(`div`,null,[H(`div`,mM,`Delete `+j(o.value.removed.length)+` removed `+j(o.value.removed.length===1?`key`:`keys`),1),t[14]||=H(`div`,{class:`mt-0.5 text-[11.5px] text-muted-foreground`},` Keys gone from the source file. Off keeps them — safer if an edited string just changed its id. `,-1)])]),U(N(nC),{"data-testid":`prune-toggle`,modelValue:u.value,"onUpdate:modelValue":t[1]||=e=>u.value=e},null,8,[`modelValue`])])):G(``,!0)],64))]),H(`div`,hM,[U(N(Q),{variant:`ghost`,size:`sm`,onClick:t[2]||=e=>r(`dismiss`)},{default:P(()=>[W(j(h.value?`Close`:`Cancel`),1)]),_:1}),H(`div`,gM,[h.value?(z(),V(N(Q),{key:0,variant:`outline`,onClick:t[3]||=e=>r(`dismiss`)},{default:P(()=>[...t[15]||=[W(`Done`,-1)]]),_:1})):(z(),V(N(Q),{key:1,"data-testid":`apply-btn`,onClick:v},{default:P(()=>[U(N(sd),{class:`size-4`}),W(` Apply `+j(m.value)+` `+j(m.value===1?`change`:`changes`),1)]),_:1}))])])],64)):a.value===`applying`?(z(),B(R,{key:2},[U(N(Sg),{class:`sr-only`},{default:P(()=>[...t[16]||=[W(`Applying changes`,-1)]]),_:1}),H(`div`,_M,[U(N($u),{class:`size-9 text-primary gf-spin`}),t[17]||=H(`div`,{class:`text-[13px] text-muted-foreground`},`Merging changes…`,-1)])],64)):a.value===`done`&&c.value?(z(),B(R,{key:3},[H(`div`,vM,[H(`div`,yM,[H(`div`,bM,[U(N(Du),{class:`size-6`,"stroke-width":2.5})]),H(`div`,null,[U(N(Sg),{class:`text-base font-semibold`},{default:P(()=>[...t[18]||=[W(`Sync complete`,-1)]]),_:1}),U(N(_g),{class:`mt-1 text-[13px] text-muted-foreground`},{default:P(()=>[H(`span`,xM,`+`+j(c.value.plan.added.length),1),t[19]||=W(` added, `,-1),H(`span`,SM,`~`+j(c.value.plan.sourceChanged.length),1),t[20]||=W(` changed, `,-1),H(`span`,CM,j(c.value.plan.removed.length),1),t[21]||=W(` removed. `,-1)]),_:1})])]),c.value.warnings.length?(z(),B(`div`,wM,[H(`button`,{type:`button`,class:`flex w-full items-center gap-2 px-3 py-2.5 text-left`,onClick:t[4]||=e=>d.value=!d.value},[U(N(Td),{class:`size-3.5 shrink-0 text-warning`}),H(`span`,TM,j(c.value.warnings.length)+` `+j(c.value.warnings.length===1?`warning`:`warnings`),1),U(N(ku),{class:A([`ml-auto size-3.5 shrink-0 text-warning transition-transform`,d.value?`rotate-90`:``])},null,8,[`class`])]),d.value?(z(),B(`ul`,EM,[(z(!0),B(R,null,I(c.value.warnings,(e,t)=>(z(),B(`li`,{key:t,class:`px-3 py-2 text-[12px] text-muted-foreground`},j(e),1))),128))])):G(``,!0)])):G(``,!0)]),H(`div`,DM,[H(`div`,OM,[U(N(Q),{onClick:t[5]||=e=>r(`synced`)},{default:P(()=>[t[22]||=W(`Reload editor `,-1),U(N(bu),{class:`size-4`})]),_:1})])])],64)):a.value===`error`?(z(),B(R,{key:4},[H(`button`,{type:`button`,class:`absolute right-3.5 top-3.5 z-10 grid h-7 w-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,onClick:t[6]||=e=>r(`dismiss`)},[U(N(kd),{class:`size-4`})]),H(`div`,kM,[H(`div`,AM,[H(`div`,jM,[U(N(Td),{class:`size-5`})]),H(`div`,MM,[U(N(Sg),{class:`text-base font-semibold`},{default:P(()=>[...t[23]||=[W(`Couldn't sync`,-1)]]),_:1}),U(N(_g),{class:`mt-1 text-[13px] text-muted-foreground`},{default:P(()=>[W(j(l.value),1)]),_:1})])])]),H(`div`,NM,[H(`div`,PM,[U(N(Q),{variant:`outline`,onClick:t[7]||=e=>r(`dismiss`)},{default:P(()=>[...t[24]||=[W(`Dismiss`,-1)]]),_:1})])])],64)):G(``,!0)]),_:1})]),_:1})]),_:1},8,[`open`]))}}),IM={key:0,class:`flex flex-1 items-center justify-center text-sm text-muted-foreground`},LM={key:1,class:`flex min-h-0 flex-1 overflow-hidden`},RM={class:`flex w-60 shrink-0 flex-col gap-1 overflow-y-auto border-r bg-muted p-3`},zM=[`onClick`],BM={class:`min-w-0 flex-1`},VM={class:`block text-[13px] font-[570] leading-tight`},HM={class:`mt-0.5 block truncate text-[11px] opacity-70`},UM={key:0,class:`size-2 shrink-0 rounded-full bg-primary ring-2 ring-primary/25`},WM={key:1,class:`shrink-0 rounded border border-emerald-500/30 bg-emerald-500/10 px-1.5 py-0.5 font-mono text-[9px] font-semibold uppercase tracking-wide text-emerald-600 dark:text-emerald-400`},GM=[`onClick`],KM={class:`min-w-0 flex-1`},qM={class:`block text-[13px] font-[570] leading-tight`},JM={class:`mt-0.5 block truncate text-[11px] opacity-70`},YM={class:`relative flex min-w-0 flex-1 flex-col`},XM={class:`flex-1 overflow-y-auto px-8 pb-28 pt-7`},ZM={class:`max-w-[680px]`},QM={class:`mb-6`},$M={class:`flex items-center gap-2.5 text-[21px] font-bold tracking-tight`},eN={key:0,class:`size-2 rounded-full bg-primary ring-2 ring-primary/25`},tN={key:0,class:`mt-1.5 text-sm text-muted-foreground`},nN={key:1,class:`mt-1.5 text-sm text-muted-foreground`},rN={key:2,class:`mt-1.5 text-sm text-muted-foreground`},iN={key:3,class:`mt-1.5 text-sm text-muted-foreground`},aN={key:4,class:`mt-1.5 text-sm text-muted-foreground`},oN={key:5,class:`mt-1.5 text-sm text-muted-foreground`},sN={key:6,class:`mt-1.5 text-sm text-muted-foreground`},cN={key:7,class:`mt-2 flex items-center gap-1.5 text-sm text-muted-foreground`},lN={key:0,class:`flex flex-col gap-5`},uN={class:`grid max-w-sm gap-1.5`},dN={key:0},fN={class:`grid gap-1.5`},pN={class:`ml-1.5 font-normal text-muted-foreground`},mN={class:`flex flex-wrap gap-2`},hN={key:0,class:`font-mono text-[10px] italic text-muted-foreground`},gN=[`aria-label`,`onClick`],_N={class:`mt-1 flex items-center gap-1.5 text-xs text-destructive`},vN={class:`grid max-w-sm gap-1.5`},yN={class:`flex gap-2`},bN={key:0,class:`flex items-center gap-1.5 text-xs text-muted-foreground`},xN={key:1,class:`flex flex-col gap-6`},SN={class:`flex items-center justify-between gap-4 rounded-lg border p-3.5`},CN={class:`flex items-start gap-2.5`},wN={class:`grid size-8 shrink-0 place-items-center rounded-md border border-primary/25 bg-primary/10 text-primary`},TN={class:`flex items-center justify-between gap-4 rounded-lg border p-3.5`},EN={class:`flex items-start gap-2.5`},DN={class:`grid size-8 shrink-0 place-items-center rounded-md border border-primary/25 bg-primary/10 text-primary`},ON={class:`rounded-lg border p-3.5`},kN={class:`flex items-center justify-between gap-4`},AN={class:`flex items-start gap-2.5`},jN={class:`grid size-8 shrink-0 place-items-center rounded-md border border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400`},MN={key:0,class:`mt-3 border-t pt-3`},NN={class:`flex flex-wrap gap-2`},PN=[`aria-checked`,`onClick`],FN={class:`mt-2 flex items-center gap-1.5 text-xs text-amber-600 dark:text-amber-400`},IN={class:`mt-2 divide-y rounded-lg border`},LN={class:`flex items-center justify-between gap-4 p-3.5`},RN={class:`flex items-center gap-2`},zN={class:`flex items-center justify-between gap-4 p-3.5`},BN={class:`flex items-center gap-2 text-sm font-medium`},VN={class:`inline-flex items-center gap-1 rounded border border-border bg-muted px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`},HN={class:`inline-flex shrink-0 items-center gap-1 rounded-md border border-primary/25 bg-primary/10 px-2 py-1 text-xs font-medium text-primary`},UN={class:`flex items-center justify-between gap-4 p-3.5`},WN={class:`mt-2 flex flex-col gap-2.5`},GN={key:0,class:`text-sm text-muted-foreground`},KN={key:2,class:`flex flex-col gap-4`},qN={class:`flex items-center gap-2 rounded-lg border p-3`},JN={key:1,class:`flex-1 text-sm text-muted-foreground`},YN={class:`grid max-w-sm gap-4`},XN={class:`grid gap-1.5`},ZN={class:`flex items-center gap-2`},QN={key:0,class:`flex items-center gap-1 text-xs leading-none text-emerald-600 dark:text-emerald-400`},$N={class:`text-xs text-muted-foreground`},eP={class:`grid gap-1.5`},tP={key:0,class:`text-xs text-muted-foreground`},nP=[`onClick`],rP={key:0},iP={key:0,class:`grid gap-1.5`},aP={key:1,class:`grid gap-1.5`},oP={key:0,class:`text-xs text-muted-foreground`},sP={key:1,class:`text-xs text-muted-foreground`},cP={class:`grid gap-1.5`},lP={class:`grid gap-1.5`},uP={class:`grid gap-1.5`},dP={class:`grid gap-1.5`},fP={class:`grid gap-1.5`},pP={class:`grid gap-1.5`},mP={key:2,class:`flex items-center gap-3`},hP={class:`grid gap-0.5`},gP={key:3,class:`grid gap-1.5`},_P={key:3,class:`flex flex-col gap-6`},vP={key:4,class:`flex flex-col gap-6`},yP={class:`mt-2 divide-y rounded-lg border`},bP={class:`min-w-0`},xP={class:`flex items-center gap-2 text-sm font-medium`},SP={class:`rounded border bg-muted px-1 py-0.5 font-mono text-[10px] text-muted-foreground`},CP={class:`mt-0.5 text-xs text-muted-foreground`},wP={key:5,class:`flex flex-col gap-4`},TP={class:`flex flex-wrap gap-2`},EP=[`aria-label`,`onClick`],DP={key:0,class:`text-sm text-muted-foreground`},OP={class:`grid max-w-sm gap-1.5`},kP={class:`flex gap-2`},AP={key:6,class:`flex flex-col gap-4`},jP={class:`grid max-w-sm gap-1.5`},MP={class:`flex items-center gap-2`},NP={key:0,class:`flex items-center gap-1 text-xs leading-none text-emerald-600 dark:text-emerald-400`},PP={class:`flex items-center gap-1.5 text-sm text-muted-foreground`},FP={class:`inline-grid h-5 min-w-[20px] shrink-0 place-items-center rounded-full bg-primary px-1.5 text-[11px] font-bold tabular-nums text-primary-foreground`},IP={class:`font-semibold`},LP={class:`relative`},RP={key:0,class:`absolute bottom-full left-1/2 z-50 mb-2.5 w-64 -translate-x-1/2 rounded-xl border bg-card p-3.5 shadow-lg`},zP={class:`mt-1 text-xs leading-relaxed text-muted-foreground`},BP={class:`mt-3 flex justify-end gap-2`},VP={role:`dialog`,"aria-modal":`true`,"aria-labelledby":`leave-warning-title`,class:`w-full max-w-md rounded-2xl border bg-card p-5 shadow-xl`},HP={id:`leave-warning-title`,class:`flex items-center gap-2 text-[15px] font-semibold`},UP={class:`mt-1.5 text-[13px] leading-relaxed text-muted-foreground`},WP={class:`font-medium text-foreground`},GP={class:`block`},KP={class:`mt-4 flex items-center gap-2`},qP={key:0,class:`fixed left-1/2 top-4 z-[80] flex -translate-x-1/2 items-center gap-2 rounded-[11px] bg-foreground px-4 py-2.5 text-[12.5px] font-medium text-background shadow-lg`},JP=F({__name:`SettingsView`,setup(e){let t=[`languages`,`outputs`,`ai`,`scan`,`quality`,`dictionary`,`editor`],n=[`flutter-arb`,`laravel-php`,`vue-i18n-json`,`angular-xliff`,`rails-yaml`,`apple-strings`],r=[{value:`anthropic`,label:`Anthropic`},{value:`bedrock`,label:`AWS Bedrock`},{value:`claude-code`,label:`Claude Code`},{value:`ollama`,label:`Ollama`},{value:`openai`,label:`OpenAI`},{value:`openrouter`,label:`OpenRouter`}],i={anthropic:[`claude-opus-4-8`,`claude-sonnet-4-6`,`claude-haiku-4-5-20251001`],openai:[`gpt-4o-mini`,`gpt-4o`,`gpt-4.1`],bedrock:[`amazon.nova-pro-v1:0`,`anthropic.claude-3-5-sonnet-20241022-v2:0`,`meta.llama3-1-70b-instruct-v1:0`],openrouter:[`anthropic/claude-3.5-haiku`,`openai/gpt-4o-mini`,`google/gemini-2.0-flash-001`],ollama:[`translategemma:4b`,`translategemma:12b`,`qwen3.5:9b`],"claude-code":[`claude-opus-4-8`,`claude-sonnet-4-6`,`claude-haiku-4-5-20251001`]},a={anthropic:`Set ANTHROPIC_API_KEY in your environment (or a .env file).`,openai:`Set OPENAI_API_KEY in your environment (or a .env file).`,bedrock:`Uses your AWS credentials (env vars, AWS_PROFILE, or an instance/SSO role).`,openrouter:`Set OPENROUTER_API_KEY in your environment (or a .env file).`,ollama:`Runs locally — no API key needed. Set OLLAMA_API_KEY only for a secured/remote server.`,"claude-code":`Uses your local Claude Code session — no separate API key needed. Requires the claude CLI to be installed.`},o=M(null),s=M(null),c=Yt({sourceLocale:``,locales:[],outputs:[],indent:2,sortKeys:!0,finalNewline:!0,autoExport:!0,exportLocales:[],customWords:[],lintRules:{},lintIgnore:[],scanAccessors:[],scanPatterns:[],scanInclude:[],scanExclude:[],scanKeep:[]}),l=M(!1),u=M(!1),d=M(p()),f=M(!1);function p(){let e=Np().get(`section`)??``;return t.includes(e)?e:`languages`}function m(e){d.value=e,location.hash=`settings?section=${e}`}function h(){d.value=p()}let g=M(null),_=M(!1),v=null;function y(e){c.sourceLocale=e.sourceLocale,c.locales=[...e.locales],c.outputs=e.outputs.map(e=>({...e})),c.indent=e.indent,c.sortKeys=e.sortKeys,c.finalNewline=e.finalNewline,c.autoExport=e.autoExport,c.exportLocales=[...e.exportLocales],c.customWords=[...e.customWords],c.lintRules={...e.lintRules},c.lintIgnore=[...e.lintIgnore],c.scanAccessors=[...e.scanAccessors],c.scanPatterns=[...e.scanPatterns],c.scanInclude=[...e.scanInclude],c.scanExclude=[...e.scanExclude],c.scanKeep=[...e.scanKeep]}function b(){o.value={sourceLocale:c.sourceLocale,locales:[...c.locales],outputs:c.outputs.map(e=>({...e})),indent:c.indent,sortKeys:c.sortKeys,finalNewline:c.finalNewline,autoExport:c.autoExport,exportLocales:[...c.exportLocales],customWords:[...c.customWords],lintRules:{...c.lintRules},lintIgnore:[...c.lintIgnore],scanAccessors:[...c.scanAccessors],scanPatterns:[...c.scanPatterns],scanInclude:[...c.scanInclude],scanExclude:[...c.scanExclude],scanKeep:[...c.scanKeep]}}async function x(){let e=await jd();s.value=e.config,y(QA(e.config)),b(),await O(),l.value=!0}x();let S=M({}),C=q(()=>Object.keys(S.value).sort((e,t)=>e.localeCompare(t))),w=M(null),T=M(``),E=Yt({provider:`anthropic`,model:``,endpoint:``,region:``,batchSize:25,concurrency:``,contextBatchSize:``,contextConcurrency:``,vision:!1,promptStyle:``,inputPricePerMTok:``,outputPricePerMTok:``}),D=M(!1),ee=null,te=null,ne=``;async function O(){let[e,t]=await Promise.all([df(),pf()]);S.value=t.profiles,w.value=t.activeProfile,T.value=t.activeProfile??``,re(w.value?t.profiles[w.value]??e.ai:e.ai),ne=JSON.stringify(ie())}function re(e){E.provider=e.provider,E.model=e.model,E.endpoint=e.endpoint??``,E.region=e.region??``,E.batchSize=e.batchSize,E.concurrency=e.concurrency??``,E.contextBatchSize=e.contextBatchSize??``,E.contextConcurrency=e.contextConcurrency??``,E.vision=e.vision??!1,E.promptStyle=e.promptStyle??``,E.inputPricePerMTok=e.inputPricePerMTok??``,E.outputPricePerMTok=e.outputPricePerMTok??``,ne=JSON.stringify(ie())}function ie(){let e=String(E.endpoint).trim(),t=String(E.region).trim(),n=Number(E.batchSize),r=Number(E.concurrency),i=Number(E.contextBatchSize),a=Number(E.contextConcurrency),o=Number(E.inputPricePerMTok),s=Number(E.outputPricePerMTok);return{provider:E.provider.trim(),model:E.model.trim(),endpoint:e===``?null:e,region:t===``?null:t,batchSize:Number.isFinite(n)&&n>0?n:25,concurrency:Number.isFinite(r)&&r>0?r:void 0,contextBatchSize:Number.isFinite(i)&&i>0?i:void 0,contextConcurrency:Number.isFinite(a)&&a>0?a:void 0,vision:E.vision||void 0,promptStyle:E.promptStyle||void 0,inputPricePerMTok:E.inputPricePerMTok!==``&&Number.isFinite(o)&&o>=0?o:void 0,outputPricePerMTok:E.outputPricePerMTok!==``&&Number.isFinite(s)&&s>=0?s:void 0}}Er(E,()=>{JSON.stringify(ie())!==ne&&(te&&clearTimeout(te),te=setTimeout(async()=>{let e=ie();try{w.value?(await mf(w.value,e),S.value={...S.value,[w.value]:e}):await ff({ai:e}),ne=JSON.stringify(e),D.value=!0,ee&&clearTimeout(ee),ee=setTimeout(()=>{D.value=!1},1700)}catch(e){$.error(e.message)}},500))},{deep:!0});let ae=[`languages`,`outputs`,`scan`,`quality`,`dictionary`],oe=[`ai`,`editor`];function k(e){if(!o.value)return!0;let t=c,n=o.value;return e===`languages`?JSON.stringify(t.locales)===JSON.stringify(n.locales)&&t.sourceLocale===n.sourceLocale:e===`outputs`?JSON.stringify(t.outputs)===JSON.stringify(n.outputs)&&String(t.indent)===String(n.indent)&&t.finalNewline===n.finalNewline&&t.autoExport===n.autoExport&&JSON.stringify(t.exportLocales)===JSON.stringify(n.exportLocales):e===`scan`?JSON.stringify(t.scanAccessors)===JSON.stringify(n.scanAccessors)&&JSON.stringify(t.scanPatterns)===JSON.stringify(n.scanPatterns)&&JSON.stringify(t.scanInclude)===JSON.stringify(n.scanInclude)&&JSON.stringify(t.scanExclude)===JSON.stringify(n.scanExclude)&&JSON.stringify(t.scanKeep)===JSON.stringify(n.scanKeep):e===`quality`?JSON.stringify(t.lintRules)===JSON.stringify(n.lintRules)&&JSON.stringify(t.lintIgnore)===JSON.stringify(n.lintIgnore):e===`dictionary`?JSON.stringify(t.customWords)===JSON.stringify(n.customWords):!0}let se=q(()=>ae.filter(e=>!k(e))),ce=q(()=>se.value.length),le=q(()=>se.value.map(e=>me[e].title));Er(ce,e=>{ej.value=e},{immediate:!0}),Yi(()=>{ej.value=0});let ue=q(()=>hT.find(e=>e.id===vT.value)?.label??`VS Code`),de=M(!1),fe=null;function pe(e){yT(e),de.value=!0,fe&&clearTimeout(fe),fe=setTimeout(()=>{de.value=!1},1700)}let me={languages:{title:`Languages`},outputs:{title:`Export targets`},ai:{title:`AI`},scan:{title:`Scan`},quality:{title:`Quality checks`},dictionary:{title:`Custom dictionary`},editor:{title:`Editor`}},he=[{id:`languages`,title:`Languages`},{id:`outputs`,title:`Export targets`},{id:`scan`,title:`Scan`},{id:`quality`,title:`Quality checks`},{id:`dictionary`,title:`Custom dictionary`}];function ge(e){if(e===`languages`)return`${c.locales.length} language${c.locales.length===1?``:`s`}`;if(e===`outputs`)return`${c.outputs.length} target${c.outputs.length===1?``:`s`}${c.autoExport?` · auto`:``}${c.exportLocales.length?` · limited`:``}`;if(e===`ai`)return w.value?`${w.value} · ${E.model}`:`${E.provider} · ${E.model}`;if(e===`scan`){let e=c.scanAccessors.length,t=c.scanPatterns.length,n=c.scanKeep.length,r=[e&&`${e} accessor${e===1?``:`s`}`,t&&`${t} pattern${t===1?``:`s`}`,n&&`${n} kept`].filter(Boolean);return r.length?r.join(` · `):`Auto-detect`}if(e===`quality`){let e=Object.entries(c.lintRules).filter(([,e])=>e===`off`).length,t=Object.entries(c.lintRules).filter(([e,t])=>XA[e]!==void 0&&t!==XA[e]).length;return!t&&!c.lintIgnore.length?`Defaults`:[t&&`${t} adjusted${e?` (${e} off)`:``}`,c.lintIgnore.length&&`${c.lintIgnore.length} ignored`].filter(Boolean).join(` · `)}return e===`dictionary`?c.customWords.length?`${c.customWords.length} word${c.customWords.length===1?``:`s`}`:`No custom words`:``}async function _e(){if(ce.value!==0){u.value=!0;try{await cf($A(c,s.value??void 0)),b(),_.value=!0,v&&clearTimeout(v),v=setTimeout(()=>{_.value=!1},1700)}catch(e){$.error(e.message)}finally{u.value=!1}}}function ve(){o.value&&y(o.value),f.value=!1}function ye(e){return e===`settings`||ce.value===0?!0:(g.value=e,!1)}function be(e){g.value=null,jp(e)}function xe(){g.value=null}function Se(){let e=g.value;ve(),e&&be(e)}async function Ce(){let e=g.value;await _e(),e&&ce.value===0&&be(e)}function we(e){ce.value>0&&(e.preventDefault(),e.returnValue=``)}function Te(e){if(e.key===`Escape`&&g.value){e.preventDefault(),xe();return}(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`s`&&(e.preventDefault(),_e())}Gi(()=>{window.addEventListener(`keydown`,Te),window.addEventListener(`beforeunload`,we),window.addEventListener(`hashchange`,h),Ap(ye)}),Yi(()=>{window.removeEventListener(`keydown`,Te),window.removeEventListener(`beforeunload`,we),window.removeEventListener(`hashchange`,h),Ap(null)});let Ee=M(``);function De(){let e=Ee.value.trim().toLowerCase();if(e){if(c.locales.some(t=>t.toLowerCase()===e)){$.error(`${e} is already in the list`);return}c.locales.push(e),Ee.value=``}}function Oe(e){e!==c.sourceLocale&&(c.locales=c.locales.filter(t=>t!==e))}function ke(){c.outputs.push({adapter:`flutter-arb`,path:``,emptyAs:`omit`,style:`nested`,indent:null,finalNewline:null,includeLocale:!0,localeAliases:{}})}function Ae(e){c.outputs.splice(e,1)}let je=q(()=>c.exportLocales.length>0);function Me(e){c.exportLocales=e?[...c.locales]:[]}function Ne(e){c.exportLocales=c.exportLocales.includes(e)?c.exportLocales.filter(t=>t!==e):[...c.exportLocales,e]}let Pe=q(()=>E.provider===`bedrock`),Fe=q(()=>E.provider===`ollama`),Ie=q(()=>a[E.provider]??``),Le=q(()=>i[E.provider]??[]),Re=q(()=>Le.value[0]??``);async function ze(e){w.value=e,T.value=e??``,await gf(e),re(e?S.value[e]??ie():(await df()).ai)}async function Be(){let e=`Profile ${Object.keys(S.value).length+1}`,t=ie();await mf(e,t),S.value={...S.value,[e]:t},await ze(e)}async function Ve(e,t){let n=t.trim();if(!n||n===e){T.value=e;return}if(n in S.value){$.error(`A profile with that name already exists`),T.value=e;return}let r=S.value[e];await mf(n,r),await hf(e);let i={...S.value};delete i[e],i[n]=r,S.value=i,await ze(n)}async function He(){if(!w.value)return;let e=w.value;await hf(e);let t={...S.value};delete t[e],S.value=t,await ze(null)}let Ue=M(``);function We(){let e=Ue.value.trim();if(e){if(c.customWords.includes(e)){$.error(`${e} is already in the dictionary`);return}c.customWords=[...c.customWords,e].sort(),Ue.value=``}}function Ge(e){c.customWords=c.customWords.filter(t=>t!==e)}function Ke(e){try{return new RegExp(e),null}catch(e){return`Invalid regex: ${e.message}`}}let qe=M(!1),Je=M(null);function Ye(){location.reload()}return(e,t)=>(z(),B(R,null,[l.value?(z(),B(`div`,LM,[H(`nav`,RM,[t[33]||=H(`p`,{class:`px-2.5 pb-2 pt-1 text-[10.5px] font-bold uppercase tracking-widest text-muted-foreground`},` Settings `,-1),(z(),B(R,null,I(he,e=>H(`button`,{key:e.id,type:`button`,class:A([`flex w-full items-center gap-2.5 rounded-[10px] border px-2.5 py-2.5 text-left transition-colors`,d.value===e.id?`border-border bg-card text-foreground shadow-sm`:`border-transparent bg-transparent text-muted-foreground hover:bg-accent hover:text-foreground`]),onClick:t=>m(e.id)},[H(`span`,{class:A([`flex size-[30px] shrink-0 items-center justify-center rounded-lg border`,d.value===e.id?`border-primary/30 bg-primary/10 text-primary`:`border-border/60 bg-background text-muted-foreground`])},[e.id===`languages`?(z(),V(N(qu),{key:0,class:`size-4`})):e.id===`outputs`?(z(),V(N(Uu),{key:1,class:`size-4`})):e.id===`ai`?(z(),V(N(Iu),{key:2,class:`size-4`})):e.id===`scan`?(z(),V(N(dd),{key:3,class:`size-4`})):e.id===`quality`?(z(),V(N(hd),{key:4,class:`size-4`})):(z(),V(N(Cu),{key:5,class:`size-4`}))],2),H(`span`,BM,[H(`span`,VM,j(e.title),1),H(`span`,HM,j(ge(e.id)),1)]),!e.autosave&&se.value.includes(e.id)?(z(),B(`span`,UM)):G(``,!0),e.autosave?(z(),B(`span`,WM,`Auto`)):G(``,!0)],10,zM)),64)),t[34]||=H(`p`,{class:`mt-4 border-t px-2.5 pb-2 pt-3 text-[10.5px] font-bold uppercase tracking-widest text-muted-foreground`},` Local (not committed) `,-1),(z(),B(R,null,I(oe,e=>H(`button`,{key:e,type:`button`,class:A([`flex w-full items-center gap-2.5 rounded-[10px] border px-2.5 py-2.5 text-left transition-colors`,d.value===e?`border-border bg-card text-foreground shadow-sm`:`border-transparent bg-transparent text-muted-foreground hover:bg-accent hover:text-foreground`]),onClick:t=>m(e)},[H(`span`,{class:A([`flex size-[30px] shrink-0 items-center justify-center rounded-lg border`,d.value===e?`border-primary/30 bg-primary/10 text-primary`:`border-border/60 bg-background text-muted-foreground`])},[e===`ai`?(z(),V(N(Iu),{key:0,class:`size-4`})):(z(),V(N(Fu),{key:1,class:`size-4`}))],2),H(`span`,KM,[H(`span`,qM,j(me[e].title),1),H(`span`,JM,j(e===`editor`?ue.value:ge(e)),1)])],10,GM)),64))]),H(`div`,YM,[H(`div`,XM,[H(`div`,ZM,[H(`div`,QM,[H(`h2`,$M,[W(j(me[d.value].title)+` `,1),se.value.includes(d.value)?(z(),B(`span`,eN)):G(``,!0)]),d.value===`languages`?(z(),B(`p`,tN,` The source language is translated into every other language. `)):d.value===`outputs`?(z(),B(`p`,nN,[...t[35]||=[W(` Where compiled translation files are written. Use `,-1),H(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-xs`},`{locale}`,-1),W(` and `,-1),H(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-xs`},`{namespace}`,-1),W(` placeholders in the path. `,-1)]])):d.value===`ai`?(z(),B(`p`,rN,[...t[36]||=[W(` The provider and model used for machine translation. Stored locally in `,-1),H(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-xs`},`.glotfile/`,-1),W(`, not shared with your team. `,-1)]])):d.value===`scan`?(z(),B(`p`,iN,` How the usage scanner finds where keys are referenced in code. Auto-detection handles most projects — these settings are for the cases it can't infer. `)):d.value===`quality`?(z(),B(`p`,aN,[...t[37]||=[W(` Which checks run and how severe they are — in the editor, the Analytics release gate, and `,-1),H(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-xs`},`glotfile lint`,-1),W(` alike. Errors block a release; warnings don't. `,-1)]])):d.value===`dictionary`?(z(),B(`p`,oN,` Words the spell checker should never flag. Added here or from a cell's warning. `)):d.value===`editor`?(z(),B(`p`,sN,[...t[38]||=[W(` Which editor opens when you click a key's code usage. Stored locally in `,-1),H(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-xs`},`.glotfile/`,-1),W(`, not shared with your team. `,-1)]])):G(``,!0),oe.includes(d.value)?(z(),B(`p`,cN,[U(N(Ad),{class:`size-3.5`}),t[39]||=W(` Changes here save automatically. `,-1)])):G(``,!0)]),d.value===`languages`?(z(),B(`div`,lN,[H(`div`,uN,[U(N(DC),{for:`source-locale`},{default:P(()=>[...t[40]||=[W(`Source language`,-1)]]),_:1}),U(N(Tb),{modelValue:c.sourceLocale,"onUpdate:modelValue":t[0]||=e=>c.sourceLocale=e},{default:P(()=>[U(N(qS),{id:`source-locale`},{default:P(()=>[c.sourceLocale?(z(),B(`span`,dN,[U(Pw,{code:c.sourceLocale,"show-name":``,size:14},null,8,[`code`])])):(z(),V(N(Kb),{key:1,placeholder:`Select source`}))]),_:1}),U(N(JS),null,{default:P(()=>[(z(!0),B(R,null,I(c.locales,e=>(z(),V(N(XS),{key:e,value:e},{default:P(()=>[U(Pw,{code:e,"show-name":``,size:14},null,8,[`code`])]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`modelValue`])]),H(`div`,fN,[U(N(DC),null,{default:P(()=>[t[41]||=W(` Languages `,-1),H(`span`,pN,j(c.locales.length),1)]),_:1}),H(`div`,mN,[(z(!0),B(R,null,I(c.locales,e=>(z(),B(`span`,{key:e,class:A([`inline-flex items-center gap-1.5 rounded-[9px] border px-2.5 py-1.5 text-sm transition-colors`,e===c.sourceLocale?`border-border/60 bg-accent`:`border-border bg-background`])},[U(Pw,{code:e,"show-name":``,size:14},null,8,[`code`]),e===c.sourceLocale?(z(),B(`span`,hN,`source`)):(z(),B(`button`,{key:1,type:`button`,class:`ml-0.5 flex size-[18px] items-center justify-center rounded text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive`,"aria-label":`Remove ${e}`,onClick:t=>Oe(e)},[U(N(kd),{class:`size-3`})],8,gN))],2))),128))]),H(`p`,_N,[U(N(Td),{class:`size-3.5`}),t[42]||=W(` Removing a language deletes its translations. `,-1)])]),H(`div`,vN,[U(N(DC),{for:`add-locale`},{default:P(()=>[...t[43]||=[W(`Add language`,-1)]]),_:1}),H(`div`,yN,[U(N(KS),{id:`add-locale`,modelValue:Ee.value,"onUpdate:modelValue":t[1]||=e=>Ee.value=e,class:`font-mono`,placeholder:`es`,onKeydown:Xl(Jl(De,[`prevent`]),[`enter`])},null,8,[`modelValue`,`onKeydown`]),U(N(Q),{variant:`outline`,onClick:De},{default:P(()=>[U(N(od),{class:`size-4`}),t[44]||=W(` Add`,-1)]),_:1})]),Ee.value.trim()?(z(),B(`p`,bN,[t[45]||=W(` Preview: `,-1),U(Pw,{code:Ee.value.trim(),"show-name":``,size:14},null,8,[`code`])])):G(``,!0)])])):d.value===`outputs`?(z(),B(`div`,xN,[H(`div`,SN,[H(`div`,CN,[H(`span`,wN,[U(N(Ad),{class:`size-4`})]),t[46]||=H(`div`,null,[H(`div`,{class:`text-sm font-medium`},`Auto-export on save`),H(`div`,{class:`mt-0.5 text-xs text-muted-foreground`},`Write locale files to your project automatically as you edit, so your running app picks them up immediately.`)],-1)]),U(N(nC),{modelValue:c.autoExport,"onUpdate:modelValue":t[2]||=e=>c.autoExport=e},null,8,[`modelValue`])]),H(`div`,TN,[H(`div`,EN,[H(`span`,DN,[U(N(sd),{class:`size-4`})]),t[47]||=H(`div`,null,[H(`div`,{class:`text-sm font-medium`},`Sync from files`),H(`div`,{class:`mt-0.5 text-xs text-muted-foreground`},[W(`Re-read the locale files on disk and merge changes into the catalog — keeping glossary, context and translations. For Angular, run this after `),H(`span`,{class:`font-mono`},`ng extract-i18n`),W(`.`)])],-1)]),U(N(Q),{variant:`outline`,size:`sm`,"data-testid":`open-sync`,class:`shrink-0`,onClick:t[3]||=e=>qe.value=!0},{default:P(()=>[U(N(sd),{class:`size-4`}),t[48]||=W(` Sync `,-1)]),_:1})]),H(`div`,ON,[H(`div`,kN,[H(`div`,AN,[H(`span`,jN,[U(N(Zu),{class:`size-4`})]),t[49]||=H(`div`,null,[H(`div`,{class:`text-sm font-medium`},`Limit export languages`),H(`div`,{class:`mt-0.5 text-xs text-muted-foreground`},`Only the selected languages are written to disk, including auto-export. Off exports all languages.`)],-1)]),U(N(nC),{"model-value":je.value,"onUpdate:modelValue":Me},null,8,[`model-value`])]),je.value?(z(),B(`div`,MN,[H(`div`,NN,[(z(!0),B(R,null,I(c.locales,e=>(z(),B(`button`,{key:e,type:`button`,role:`checkbox`,"aria-checked":c.exportLocales.includes(e),class:A([`inline-flex items-center gap-1.5 rounded-[9px] border px-2.5 py-1.5 text-sm transition-colors`,c.exportLocales.includes(e)?`border-primary/40 bg-primary/10`:`border-border bg-background text-muted-foreground hover:bg-accent`]),onClick:t=>Ne(e)},[H(`span`,{class:A([`flex size-4 items-center justify-center rounded border transition-colors`,c.exportLocales.includes(e)?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[c.exportLocales.includes(e)?(z(),V(N(Du),{key:0,class:`size-3`})):G(``,!0)],2),U(Pw,{code:e,"show-name":``,size:14},null,8,[`code`])],10,PN))),128))]),H(`p`,FN,[U(N(Td),{class:`size-3.5`}),W(` Export limited to `+j(c.exportLocales.length)+` of `+j(c.locales.length)+` languages. `,1)])])):G(``,!0)]),H(`div`,null,[t[57]||=H(`div`,{class:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Format defaults`,-1),t[58]||=H(`p`,{class:`mt-1 text-xs text-muted-foreground`},`Export targets inherit these. Indent and Final newline can be overridden per target.`,-1),H(`div`,IN,[H(`div`,LN,[t[51]||=H(`div`,null,[H(`div`,{class:`text-sm font-medium`},`Indent`),H(`div`,{class:`mt-0.5 text-xs text-muted-foreground`},`Spaces per nesting level.`)],-1),H(`div`,RN,[U(N(KS),{modelValue:c.indent,"onUpdate:modelValue":t[4]||=e=>c.indent=e,modelModifiers:{number:!0},type:`number`,min:`0`,max:`8`,class:`w-20`},null,8,[`modelValue`]),t[50]||=H(`span`,{class:`text-xs text-muted-foreground`},`spaces`,-1)])]),H(`div`,zN,[H(`div`,null,[H(`div`,BN,[t[53]||=W(` Sort keys `,-1),H(`span`,VN,[U(N(ed),{class:`size-2.5`}),t[52]||=W(` Locked`,-1)])]),t[54]||=H(`div`,{class:`mt-0.5 text-xs text-muted-foreground`},`Keys are always written alphabetically so output is deterministic and diffs stay clean.`,-1)]),H(`span`,HN,[U(N(Du),{class:`size-3`}),t[55]||=W(` Always alphabetical`,-1)])]),H(`div`,UN,[t[56]||=H(`div`,null,[H(`div`,{class:`text-sm font-medium`},`Final newline`),H(`div`,{class:`mt-0.5 text-xs text-muted-foreground`},`Append a trailing newline at the end of every file.`)],-1),U(N(nC),{modelValue:c.finalNewline,"onUpdate:modelValue":t[5]||=e=>c.finalNewline=e},null,8,[`modelValue`])])])]),H(`div`,null,[t[60]||=H(`div`,{class:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Export targets`,-1),H(`div`,WN,[(z(!0),B(R,null,I(c.outputs,(e,t)=>(z(),V(Uj,{key:t,output:e,"format-indent":Number(c.indent)||0,"format-final-newline":c.finalNewline,locales:c.locales,adapters:n,"onUpdate:output":e=>c.outputs.splice(t,1,e),onRemove:e=>Ae(t)},null,8,[`output`,`format-indent`,`format-final-newline`,`locales`,`onUpdate:output`,`onRemove`]))),128)),c.outputs.length===0?(z(),B(`p`,GN,`No export targets configured.`)):G(``,!0),H(`div`,null,[U(N(Q),{variant:`ghost`,size:`sm`,class:`mt-1 pl-2`,onClick:ke},{default:P(()=>[U(N(od),{class:`size-4`}),t[59]||=W(` Add export target `,-1)]),_:1})])])])])):d.value===`ai`?(z(),B(`div`,KN,[H(`div`,qN,[U(N(Tb),{"model-value":w.value??`__none__`,"onUpdate:modelValue":t[6]||=e=>ze(e===`__none__`?null:e)},{default:P(()=>[U(N(qS),{class:`w-44`},{default:P(()=>[U(N(Kb),{placeholder:`No profile`})]),_:1}),U(N(JS),null,{default:P(()=>[U(N(XS),{value:`__none__`},{default:P(()=>[...t[61]||=[W(`No profile`,-1)]]),_:1}),(z(!0),B(R,null,I(C.value,e=>(z(),V(N(XS),{key:e,value:e},{default:P(()=>[W(j(e),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`model-value`]),w.value?(z(),V(N(KS),{key:0,modelValue:T.value,"onUpdate:modelValue":t[7]||=e=>T.value=e,class:`flex-1 font-medium`,placeholder:`Profile name`,onBlur:t[8]||=e=>Ve(w.value,T.value),onKeydown:t[9]||=Xl(Jl(e=>Ve(w.value,T.value),[`prevent`]),[`enter`])},null,8,[`modelValue`])):(z(),B(`span`,JN,`Using default settings`)),U(N(Q),{variant:`outline`,size:`sm`,class:`shrink-0`,onClick:Be},{default:P(()=>[U(N(od),{class:`size-4`}),t[62]||=W(` New `,-1)]),_:1}),U(N(Q),{variant:`ghost`,size:`sm`,class:`shrink-0 text-destructive hover:bg-destructive/10 hover:text-destructive`,disabled:!w.value,onClick:He},{default:P(()=>[U(N(kd),{class:`size-4`})]),_:1},8,[`disabled`])]),H(`div`,YN,[H(`div`,XN,[H(`div`,ZN,[U(N(DC),{for:`ai-provider`},{default:P(()=>[...t[63]||=[W(`Provider`,-1)]]),_:1}),U(hc,{"enter-active-class":`transition duration-150 ease-out`,"enter-from-class":`opacity-0 translate-y-0.5`,"enter-to-class":`opacity-100 translate-y-0`,"leave-active-class":`transition duration-300 ease-in`,"leave-from-class":`opacity-100 translate-y-0`,"leave-to-class":`opacity-0`},{default:P(()=>[D.value?(z(),B(`span`,QN,[U(N(Du),{class:`size-3`}),t[64]||=W(` Saved `,-1)])):G(``,!0)]),_:1})]),U(N(Tb),{modelValue:E.provider,"onUpdate:modelValue":t[10]||=e=>E.provider=e},{default:P(()=>[U(N(qS),{id:`ai-provider`},{default:P(()=>[U(N(Kb),{placeholder:`Select provider`})]),_:1}),U(N(JS),null,{default:P(()=>[(z(),B(R,null,I(r,e=>U(N(XS),{key:e.value,value:e.value},{default:P(()=>[W(j(e.label),1)]),_:2},1032,[`value`])),64))]),_:1})]),_:1},8,[`modelValue`]),H(`p`,$N,j(Ie.value),1)]),H(`div`,eP,[U(N(DC),{for:`ai-model`},{default:P(()=>[...t[65]||=[W(`Model`,-1)]]),_:1}),U(N(KS),{id:`ai-model`,modelValue:E.model,"onUpdate:modelValue":t[11]||=e=>E.model=e,class:`font-mono`,placeholder:Re.value},null,8,[`modelValue`,`placeholder`]),Le.value.length?(z(),B(`p`,tP,[t[66]||=W(` Examples: `,-1),(z(!0),B(R,null,I(Le.value,(e,t)=>(z(),B(R,{key:e},[H(`button`,{type:`button`,class:`font-mono underline-offset-2 hover:text-foreground hover:underline`,onClick:t=>E.model=e},j(e),9,nP),t<Le.value.length-1?(z(),B(`span`,rP,` · `)):G(``,!0)],64))),128))])):G(``,!0)]),Pe.value?(z(),B(`div`,iP,[U(N(DC),{for:`ai-region`},{default:P(()=>[...t[67]||=[W(`Region`,-1)]]),_:1}),U(N(KS),{id:`ai-region`,modelValue:E.region,"onUpdate:modelValue":t[12]||=e=>E.region=e,class:`font-mono`,placeholder:`us-east-1`},null,8,[`modelValue`]),t[68]||=H(`p`,{class:`text-xs text-muted-foreground`},[W(`AWS region for Bedrock. Falls back to `),H(`code`,{class:`font-mono`},`AWS_REGION`),W(` if empty.`)],-1)])):(z(),B(`div`,aP,[U(N(DC),{for:`ai-endpoint`},{default:P(()=>[...t[69]||=[W(`Endpoint`,-1)]]),_:1}),U(N(KS),{id:`ai-endpoint`,modelValue:E.endpoint,"onUpdate:modelValue":t[13]||=e=>E.endpoint=e,class:`font-mono`,placeholder:Fe.value?`http://localhost:11434/v1`:`Default (leave empty)`},null,8,[`modelValue`,`placeholder`]),Fe.value?(z(),B(`p`,oP,[...t[70]||=[W(`Defaults to the local Ollama server. Override only for a remote instance — include the `,-1),H(`code`,{class:`font-mono`},`/v1`,-1),W(` suffix.`,-1)]])):(z(),B(`p`,sP,`Optional — for an in-region or self-hosted / OpenAI-compatible gateway.`))])),t[88]||=H(`div`,{class:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Translation`,-1),H(`div`,cP,[U(N(DC),{for:`ai-batch`},{default:P(()=>[...t[71]||=[W(`Batch size`,-1)]]),_:1}),U(N(KS),{id:`ai-batch`,modelValue:E.batchSize,"onUpdate:modelValue":t[14]||=e=>E.batchSize=e,modelModifiers:{number:!0},type:`number`,min:`1`,class:`w-28`},null,8,[`modelValue`]),t[72]||=H(`p`,{class:`text-xs text-muted-foreground`},`Strings sent per request.`,-1)]),H(`div`,lP,[U(N(DC),{for:`ai-concurrency`},{default:P(()=>[...t[73]||=[W(`Parallel locales`,-1)]]),_:1}),U(N(KS),{id:`ai-concurrency`,modelValue:E.concurrency,"onUpdate:modelValue":t[15]||=e=>E.concurrency=e,modelModifiers:{number:!0},type:`number`,min:`1`,placeholder:`3`,class:`w-28`},null,8,[`modelValue`]),t[74]||=H(`p`,{class:`text-xs text-muted-foreground`},`How many locales to translate at once.`,-1)]),H(`div`,uP,[U(N(DC),{for:`ai-price-in`},{default:P(()=>[...t[75]||=[W(`Input price ($ / 1M tokens)`,-1)]]),_:1}),U(N(KS),{id:`ai-price-in`,modelValue:E.inputPricePerMTok,"onUpdate:modelValue":t[16]||=e=>E.inputPricePerMTok=e,modelModifiers:{number:!0},type:`number`,min:`0`,step:`0.01`,placeholder:`Auto for Claude models`,class:`w-44`},null,8,[`modelValue`])]),H(`div`,dP,[U(N(DC),{for:`ai-price-out`},{default:P(()=>[...t[76]||=[W(`Output price ($ / 1M tokens)`,-1)]]),_:1}),U(N(KS),{id:`ai-price-out`,modelValue:E.outputPricePerMTok,"onUpdate:modelValue":t[17]||=e=>E.outputPricePerMTok=e,modelModifiers:{number:!0},type:`number`,min:`0`,step:`0.01`,placeholder:`Auto for Claude models`,class:`w-44`},null,8,[`modelValue`]),t[77]||=H(`p`,{class:`text-xs text-muted-foreground`},`Used for the pre-translate cost estimate. Set both to override the built-in Claude prices or to price other models.`,-1)]),t[89]||=H(`div`,{class:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Context build`,-1),H(`div`,fP,[U(N(DC),{for:`ai-context-batch`},{default:P(()=>[...t[78]||=[W(`Batch size`,-1)]]),_:1}),U(N(KS),{id:`ai-context-batch`,modelValue:E.contextBatchSize,"onUpdate:modelValue":t[18]||=e=>E.contextBatchSize=e,modelModifiers:{number:!0},type:`number`,min:`1`,placeholder:String(E.batchSize||25),class:`w-28`},null,8,[`modelValue`,`placeholder`]),t[79]||=H(`p`,{class:`text-xs text-muted-foreground`},`Keys per request. Defaults to translation batch size.`,-1)]),H(`div`,pP,[U(N(DC),{for:`ai-context-concurrency`},{default:P(()=>[...t[80]||=[W(`Concurrency`,-1)]]),_:1}),U(N(KS),{id:`ai-context-concurrency`,modelValue:E.contextConcurrency,"onUpdate:modelValue":t[19]||=e=>E.contextConcurrency=e,modelModifiers:{number:!0},type:`number`,min:`1`,placeholder:String(E.concurrency||3),class:`w-28`},null,8,[`modelValue`,`placeholder`]),t[81]||=H(`p`,{class:`text-xs text-muted-foreground`},`Parallel context requests. Defaults to parallel locales.`,-1)]),Fe.value?(z(),B(`div`,mP,[U(N(nC),{id:`ai-vision`,modelValue:E.vision,"onUpdate:modelValue":t[20]||=e=>E.vision=e},null,8,[`modelValue`]),H(`div`,hP,[U(N(DC),{for:`ai-vision`},{default:P(()=>[...t[82]||=[W(`Vision`,-1)]]),_:1}),t[83]||=H(`p`,{class:`text-xs text-muted-foreground`},`Enable for models that support image input (e.g. translategemma, llava).`,-1)])])):G(``,!0),Fe.value?(z(),B(`div`,gP,[U(N(DC),{for:`ai-prompt-style`},{default:P(()=>[...t[84]||=[W(`Prompt style`,-1)]]),_:1}),U(N(Tb),{"model-value":E.promptStyle||`__default__`,"onUpdate:modelValue":t[21]||=e=>E.promptStyle=e===`__default__`?``:e},{default:P(()=>[U(N(qS),{id:`ai-prompt-style`},{default:P(()=>[U(N(Kb),{placeholder:`Default`})]),_:1}),U(N(JS),null,{default:P(()=>[U(N(XS),{value:`__default__`},{default:P(()=>[...t[85]||=[W(`Default`,-1)]]),_:1}),U(N(XS),{value:`translategemma`},{default:P(()=>[...t[86]||=[W(`TranslateGemma`,-1)]]),_:1})]),_:1})]),_:1},8,[`model-value`]),t[87]||=H(`p`,{class:`text-xs text-muted-foreground`},`TranslateGemma uses a role-based system prompt and plain-text output instead of JSON batching.`,-1)])):G(``,!0)])])):d.value===`scan`?(z(),B(`div`,_P,[U(Xj,{label:`Flutter accessors`,items:c.scanAccessors,mono:``,placeholder:`translations`,"onUpdate:items":t[22]||=e=>c.scanAccessors=e},{help:P(()=>[...t[90]||=[H(`p`,{class:`text-xs text-muted-foreground`},[W(` Accessors assigned from `),H(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-[11px]`},`AppLocalizations.of(...)`),W(` are detected automatically. Add a name only if yours isn't found. `)],-1)]]),_:1},8,[`items`]),U(Xj,{label:`Custom patterns`,items:c.scanPatterns,mono:``,placeholder:`LocaleKeys\\.(\\w+)\\.tr\\(\\)`,validate:Ke,"onUpdate:items":t[23]||=e=>c.scanPatterns=e},{help:P(()=>[...t[91]||=[H(`p`,{class:`text-xs text-muted-foreground`},` Regex applied to every scanned file — capture group 1 is the key. `,-1)]]),_:1},8,[`items`]),U(Xj,{label:`Include globs`,items:c.scanInclude,mono:``,placeholder:`lib/**`,"onUpdate:items":t[24]||=e=>c.scanInclude=e},{help:P(()=>[...t[92]||=[H(`p`,{class:`text-xs text-muted-foreground`},`Limit the scan to these globs. Empty scans everything.`,-1)]]),_:1},8,[`items`]),U(Xj,{label:`Exclude globs`,items:c.scanExclude,mono:``,placeholder:`**/*.g.dart`,"onUpdate:items":t[25]||=e=>c.scanExclude=e},{help:P(()=>[...t[93]||=[H(`p`,{class:`text-xs text-muted-foreground`},`Skipped on top of always-excluded dirs (node_modules, build, …).`,-1)]]),_:1},8,[`items`]),U(Xj,{label:`Keep keys`,items:c.scanKeep,mono:``,placeholder:`validation.*`,"onUpdate:items":t[26]||=e=>c.scanKeep=e},{help:P(()=>[...t[94]||=[H(`p`,{class:`text-xs text-muted-foreground`},[W(` Key globs always treated as used — for keys consumed by code the scan can't see (framework internals, vendored packages). They never show as unused and are safe from `),H(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-[11px]`},`prune --unused`),W(`. `)],-1)]]),_:1},8,[`items`])])):d.value===`quality`?(z(),B(`div`,vP,[H(`div`,null,[t[96]||=H(`div`,{class:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Rules`,-1),H(`div`,yP,[(z(!0),B(R,null,I(N(YA),e=>(z(),B(`div`,{key:e.id,class:`flex items-center justify-between gap-4 p-3.5`},[H(`div`,bP,[H(`div`,xP,[W(j(e.label)+` `,1),H(`code`,SP,j(e.id),1)]),H(`div`,CP,j(e.description),1)]),U(N(Tb),{"model-value":c.lintRules[e.id]??e.default,"onUpdate:modelValue":t=>c.lintRules={...c.lintRules,[e.id]:t}},{default:P(()=>[U(N(qS),{class:A([`w-32 shrink-0`,c.lintRules[e.id]===`off`?`text-muted-foreground`:``])},{default:P(()=>[U(N(Kb))]),_:1},8,[`class`]),U(N(JS),null,{default:P(()=>[U(N(XS),{value:`error`},{default:P(()=>[W(`Error`+j(e.default===`error`?` ·`:``),1)]),_:2},1024),U(N(XS),{value:`warn`},{default:P(()=>[W(`Warning`+j(e.default===`warn`?` ·`:``),1)]),_:2},1024),U(N(XS),{value:`off`},{default:P(()=>[...t[95]||=[W(`Off`,-1)]]),_:1})]),_:2},1024)]),_:2},1032,[`model-value`,`onUpdate:modelValue`])]))),128))]),t[97]||=H(`p`,{class:`mt-2 text-xs text-muted-foreground`},`· marks the built-in default.`,-1)]),U(Xj,{label:`Ignore keys`,items:c.lintIgnore,mono:``,placeholder:`legacy.*`,"onUpdate:items":t[27]||=e=>c.lintIgnore=e},{help:P(()=>[...t[98]||=[H(`p`,{class:`text-xs text-muted-foreground`},` Key globs excluded from every check — for legacy or generated keys you don't maintain. `,-1)]]),_:1},8,[`items`])])):d.value===`dictionary`?(z(),B(`div`,wP,[H(`div`,TP,[(z(!0),B(R,null,I(c.customWords,e=>(z(),B(`span`,{key:e,class:`inline-flex items-center gap-1.5 rounded-lg border bg-accent px-2.5 py-1.5 font-mono text-sm`},[W(j(e)+` `,1),H(`button`,{type:`button`,class:`flex size-[18px] items-center justify-center rounded text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive`,"aria-label":`Remove ${e}`,onClick:t=>Ge(e)},[U(N(kd),{class:`size-3`})],8,EP)]))),128)),c.customWords.length===0?(z(),B(`p`,DP,`No custom words yet.`)):G(``,!0)]),H(`div`,OP,[U(N(DC),{for:`add-word`},{default:P(()=>[...t[99]||=[W(`Add word`,-1)]]),_:1}),H(`div`,kP,[U(N(KS),{id:`add-word`,modelValue:Ue.value,"onUpdate:modelValue":t[28]||=e=>Ue.value=e,class:`font-mono`,placeholder:`Glotfile`,onKeydown:Xl(Jl(We,[`prevent`]),[`enter`])},null,8,[`modelValue`,`onKeydown`]),U(N(Q),{variant:`outline`,onClick:We},{default:P(()=>[U(N(od),{class:`size-4`}),t[100]||=W(` Add`,-1)]),_:1})])])])):d.value===`editor`?(z(),B(`div`,AP,[H(`div`,jP,[H(`div`,MP,[U(N(DC),{for:`editor-select`},{default:P(()=>[...t[101]||=[W(`Editor`,-1)]]),_:1}),U(hc,{"enter-active-class":`transition duration-150 ease-out`,"enter-from-class":`opacity-0 translate-y-0.5`,"enter-to-class":`opacity-100 translate-y-0`,"leave-active-class":`transition duration-300 ease-in`,"leave-from-class":`opacity-100 translate-y-0`,"leave-to-class":`opacity-0`},{default:P(()=>[de.value?(z(),B(`span`,NP,[U(N(Du),{class:`size-3`}),t[102]||=W(` Saved `,-1)])):G(``,!0)]),_:1})]),U(N(Tb),{"model-value":N(vT),"onUpdate:modelValue":pe},{default:P(()=>[U(N(qS),{id:`editor-select`},{default:P(()=>[U(N(Kb),{placeholder:`Select editor`})]),_:1}),U(N(JS),null,{default:P(()=>[(z(!0),B(R,null,I(N(hT),e=>(z(),V(N(XS),{key:e.id,value:e.id},{default:P(()=>[W(j(e.label),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`model-value`])]),H(`p`,PP,[U(N(ed),{class:`size-3.5`}),t[103]||=W(` Stored locally in `,-1),t[104]||=H(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-xs`},`.glotfile/`,-1),t[105]||=W(` — clicking a usage opens the file via its URL scheme. `,-1)])])):G(``,!0)])]),oe.includes(d.value)?G(``,!0):(z(),B(`div`,{key:0,class:A([`absolute bottom-5 left-1/2 flex min-w-[400px] max-w-[calc(100%-3.5rem)] -translate-x-1/2 items-center gap-3 rounded-[14px] border bg-card px-4 py-2.5 shadow-lg transition-[border-color,box-shadow]`,ce.value>0?`border-primary/40 shadow-primary/10`:`border-border`])},[H(`span`,{class:A([`flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-ellipsis whitespace-nowrap text-[13px]`,ce.value>0?`text-foreground`:`text-muted-foreground`])},[ce.value>0?(z(),B(R,{key:0},[H(`span`,FP,j(ce.value),1),W(` Unsaved `+j(ce.value===1?`change`:`changes`)+` in `,1),H(`strong`,IP,j(le.value.join(`, `)),1)],64)):(z(),B(R,{key:1},[U(N(Du),{class:`size-3.5 shrink-0`}),t[106]||=W(` All changes saved `,-1)],64))],2),H(`div`,LP,[U(N(Q),{variant:`ghost`,size:`sm`,disabled:ce.value===0,onClick:t[29]||=e=>f.value=!f.value},{default:P(()=>[U(N(Ed),{class:`size-4`}),t[107]||=W(` Discard `,-1)]),_:1},8,[`disabled`]),f.value?(z(),B(`div`,RP,[t[110]||=H(`p`,{class:`text-[13px] font-semibold`},`Discard all changes?`,-1),H(`p`,zP,` Reverts every unsaved edit in `+j(le.value.join(`, `))+`. `,1),H(`div`,BP,[U(N(Q),{size:`sm`,variant:`outline`,onClick:t[30]||=e=>f.value=!1},{default:P(()=>[...t[108]||=[W(`Keep editing`,-1)]]),_:1}),U(N(Q),{size:`sm`,variant:`destructive`,onClick:ve},{default:P(()=>[...t[109]||=[W(`Discard`,-1)]]),_:1})])])):G(``,!0)]),U(N(Q),{size:`sm`,disabled:ce.value===0||u.value,onClick:_e},{default:P(()=>[U(N(ud),{class:`size-4`}),t[111]||=W(` Save changes `,-1)]),_:1},8,[`disabled`])],2))])])):(z(),B(`div`,IM,` Loading settings… `)),U(hc,{"enter-active-class":`transition duration-150 ease-out`,"enter-from-class":`opacity-0`,"enter-to-class":`opacity-100`,"leave-active-class":`transition duration-100 ease-in`,"leave-from-class":`opacity-100`,"leave-to-class":`opacity-0`},{default:P(()=>[g.value?(z(),B(`div`,{key:0,class:`fixed inset-0 z-[70] flex items-center justify-center bg-background/70 p-6 backdrop-blur-sm`,onClick:Jl(xe,[`self`])},[H(`div`,VP,[H(`h3`,HP,[U(N(Td),{class:`size-4 text-amber-500`}),t[112]||=W(` Unsaved changes `,-1)]),H(`p`,UP,[W(` You have `+j(ce.value)+` unsaved `+j(ce.value===1?`change`:`changes`)+` in `,1),H(`strong`,WP,j(le.value.join(`, `)),1),t[113]||=W(`. `,-1),H(`span`,GP,`Leaving now discards `+j(ce.value===1?`it`:`them`)+`.`,1)]),H(`div`,KP,[U(N(Q),{size:`sm`,variant:`outline`,class:`mr-auto`,onClick:xe},{default:P(()=>[...t[114]||=[W(`Keep editing`,-1)]]),_:1}),U(N(Q),{size:`sm`,variant:`destructive`,onClick:Se},{default:P(()=>[U(N(Ed),{class:`size-4`}),t[115]||=W(` Discard & leave `,-1)]),_:1}),U(N(Q),{size:`sm`,disabled:u.value,onClick:Ce},{default:P(()=>[U(N(ud),{class:`size-4`}),t[116]||=W(` Save & leave `,-1)]),_:1},8,[`disabled`])])])])):G(``,!0)]),_:1}),U(hc,{"enter-active-class":`transition duration-200 ease-out`,"enter-from-class":`opacity-0 -translate-y-1.5`,"enter-to-class":`opacity-100 translate-y-0`,"leave-active-class":`transition duration-150 ease-in`,"leave-from-class":`opacity-100 translate-y-0`,"leave-to-class":`opacity-0 -translate-y-1.5`},{default:P(()=>[_.value?(z(),B(`div`,qP,[U(N(Du),{class:`size-3.5`}),t[117]||=W(` Settings saved `,-1)])):G(``,!0)]),_:1}),qe.value?(z(),V(FM,{key:2,ref_key:`syncWizardRef`,ref:Je,onVnodeMounted:t[31]||=e=>Je.value?.init(),onDismiss:t[32]||=e=>qe.value=!1,onSynced:Ye},null,512)):G(``,!0)],64))}}),YP={class:`min-h-0 flex-1 overflow-y-auto`},XP={key:0,class:`flex h-full items-center justify-center p-8 text-sm text-muted-foreground`},ZP={key:1,class:`flex h-full items-center justify-center p-8`},QP={class:`flex max-w-md flex-col items-center gap-3 text-center text-muted-foreground`},$P={key:2,class:`grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-3 p-6`},eF=[`onClick`],tF={class:`flex aspect-video items-center justify-center overflow-hidden border-b bg-muted/30`},nF=[`src`,`alt`],rF={class:`flex flex-col gap-0.5 p-2.5`},iF={class:`truncate font-mono text-xs font-medium`},aF={class:`truncate text-xs text-muted-foreground`},oF={key:1,class:`truncate text-xs text-muted-foreground`},sF={class:`flex max-h-[70vh] items-center justify-center overflow-auto rounded-md border bg-muted/30 p-2`},cF=[`src`,`alt`],lF={key:0,class:`text-sm text-muted-foreground`},uF=F({__name:`ScreenshotsView`,setup(e){let t=un(null),n=M(!1),r=M(null);async function i(){t.value=await jd(),n.value=!0}i();let a=q(()=>t.value?.config.sourceLocale??``),o=q(()=>{let e=t.value;return e?Object.entries(e.keys).filter(([,e])=>!!e.screenshot).map(([e,t])=>({key:e,entry:t,screenshot:t.screenshot,source:t.values[a.value]?.value??``})).sort((e,t)=>e.key.localeCompare(t.key)):[]});return(e,t)=>(z(),B(`div`,YP,[n.value?o.value.length===0?(z(),B(`div`,ZP,[H(`div`,QP,[U(N(Ju),{class:`size-8 opacity-60`}),t[2]||=H(`p`,{class:`text-sm`},` No screenshots yet — add one from a key's detail panel in the Editor. `,-1)])])):(z(),B(`div`,$P,[(z(!0),B(R,null,I(o.value,e=>(z(),B(`button`,{key:e.key,type:`button`,class:`group flex flex-col overflow-hidden rounded-lg border bg-card text-left shadow-sm transition-colors hover:border-ring focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:t=>r.value=e},[H(`div`,tF,[H(`img`,{src:`/`+e.screenshot,alt:`Screenshot for ${e.key}`,class:`h-full w-full object-contain`},null,8,nF)]),H(`div`,rF,[U(N(dx),null,{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`span`,iF,j(e.key),1)]),_:2},1024),U(N(HC),{class:`font-mono`},{default:P(()=>[W(j(e.key),1)]),_:2},1024)]),_:2},1024),e.source?(z(),V(N(dx),{key:0},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`span`,aF,j(e.source),1)]),_:2},1024),U(N(HC),null,{default:P(()=>[W(j(e.source),1)]),_:2},1024)]),_:2},1024)):(z(),B(`span`,oF,`—`))])],8,eF))),128))])):(z(),B(`div`,XP,` Loading screenshots… `)),U(N(Ph),{open:r.value!==null,"onUpdate:open":t[1]||=e=>{e||(r.value=null)}},{default:P(()=>[r.value?(z(),V(N(OC),{key:0,class:`max-w-3xl`},{default:P(()=>[U(N(kC),null,{default:P(()=>[U(N(jC),{class:`break-all font-mono text-sm`},{default:P(()=>[W(j(r.value.key),1)]),_:1}),U(N(MC),null,{default:P(()=>[W(j(r.value.source||`—`),1)]),_:1})]),_:1}),H(`div`,sF,[H(`img`,{src:`/`+r.value.screenshot,alt:`Screenshot for ${r.value.key}`,class:`max-h-[65vh] w-auto object-contain`},null,8,cF)]),r.value.entry.context?(z(),B(`p`,lF,[t[3]||=H(`span`,{class:`font-medium text-foreground`},`Context:`,-1),W(` `+j(r.value.entry.context),1)])):G(``,!0),U(N(AC),null,{default:P(()=>[U(N(Q),{size:`sm`,onClick:t[0]||=e=>N(Rp)(r.value.key)},{default:P(()=>[U(N(yd),{class:`size-4`}),t[4]||=W(` Open in editor `,-1)]),_:1})]),_:1})]),_:1})):G(``,!0)]),_:1},8,[`open`])]))}}),dF={class:`min-h-0 flex-1 overflow-y-auto p-4`},fF={key:0,class:`mt-8 text-center text-sm text-muted-foreground`},pF={key:1,class:`mx-auto flex max-w-4xl flex-col gap-4`},mF={key:0,class:`flex flex-wrap gap-1.5`},hF=[`onClick`],gF={class:`flex flex-wrap items-center gap-3 border-b px-4 py-2.5`},_F={class:`text-sm font-medium`},vF={class:`text-sm text-muted-foreground`},yF={class:`border-b`},bF={class:`overflow-x-auto whitespace-pre-wrap break-words bg-muted/40 px-4 py-3 font-mono text-xs leading-relaxed`},xF={class:`divide-y`},SF={class:`flex items-center gap-2`},CF={class:`truncate font-mono text-xs text-muted-foreground`},wF={class:`flex items-start gap-2 text-sm`},TF={class:`min-w-0 flex-1 break-words`},EF={class:`min-w-0 flex-1 break-words`},DF={key:0,class:`text-destructive`},OF={key:1},kF={key:0,class:`text-xs text-muted-foreground`},AF={key:1,class:`flex flex-wrap gap-1`},jF={key:2,class:`flex items-center gap-1.5 text-xs text-muted-foreground`},MF={class:`truncate font-mono`},NF={key:1,class:`flex flex-col gap-1.5 px-4 py-3`},PF={key:0,class:`flex items-center gap-2`},FF={class:`truncate font-mono text-xs text-muted-foreground`},IF={key:1,class:`flex items-start gap-2 text-sm`},LF=F({__name:`ActivityView`,setup(e){let t=M([]),n=M(!0),r=M(`all`);Gi(async()=>{try{t.value=await Ef()}catch(e){$.error(e.message)}finally{n.value=!1}});let i=e=>e.kind===`translate`||e.kind===`context`,a=q(()=>[...new Set(t.value.map(e=>e.kind))]),o=q(()=>r.value===`all`?t.value:t.value.filter(e=>e.kind===r.value)),s=e=>US(`rounded-full border px-2.5 py-0.5 text-xs transition-colors`,r.value===e?`bg-primary text-primary-foreground`:`text-muted-foreground hover:bg-muted`);function c(e,t){return e.results?.find(e=>e.id===t)}function l(e){return e.doNotTranslate?`${e.term} (do-not-translate)`:e.forced?`${e.term} → ${e.forced}`:e.term}function u(e){return e==null||e===``?`∅`:typeof e==`string`?e:JSON.stringify(e)}let d=e=>typeof e==`object`&&!!e;return(e,f)=>(z(),B(`div`,dF,[!n.value&&t.value.length===0?(z(),B(`p`,fF,` No activity yet — edits, translations, and config changes will show up here. `)):(z(),B(`div`,pF,[a.value.length>1?(z(),B(`div`,mF,[H(`button`,{type:`button`,class:A(s(`all`)),onClick:f[0]||=e=>r.value=`all`},`All`,2),(z(!0),B(R,null,I(a.value,e=>(z(),B(`button`,{key:e,type:`button`,class:A(s(e)),onClick:t=>r.value=e},j(e),11,hF))),128))])):G(``,!0),(z(!0),B(R,null,I(o.value,(e,t)=>(z(),B(`article`,{key:`${e.at}-${t}`,class:`rounded-lg border bg-card`},[H(`header`,gF,[H(`span`,_F,j(new Date(e.at).toLocaleString()),1),U(N(eC),{variant:`outline`,class:`font-mono uppercase`},{default:P(()=>[W(j(e.kind),1)]),_:2},1024),H(`span`,vF,j(e.summary),1),e.model?(z(),V(N(eC),{key:0,variant:`secondary`,class:`ml-auto font-mono`},{default:P(()=>[W(j(e.model),1)]),_:2},1024)):G(``,!0)]),i(e)?(z(),B(R,{key:0},[H(`details`,yF,[f[1]||=H(`summary`,{class:`cursor-pointer select-none px-4 py-2 text-xs font-medium text-muted-foreground hover:text-foreground`},` System prompt `,-1),H(`pre`,bF,j(e.system),1)]),H(`ul`,xF,[(z(!0),B(R,null,I(e.items,t=>(z(),B(`li`,{key:t.id,class:`flex flex-col gap-1.5 px-4 py-3`},[H(`div`,SF,[H(`span`,CF,j(t.key),1),t.targetLocale?(z(),V(N(eC),{key:0,variant:`outline`,class:`shrink-0 font-mono uppercase`},{default:P(()=>[W(j(t.targetLocale),1)]),_:2},1024)):G(``,!0)]),H(`div`,wF,[H(`span`,TF,j(t.source),1),U(N(bu),{class:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),H(`span`,EF,[c(e,t.id)?.error?(z(),B(`span`,DF,j(c(e,t.id)?.error),1)):(z(),B(`span`,OF,j(c(e,t.id)?.translation??c(e,t.id)?.value),1))])]),t.context?(z(),B(`p`,kF,j(t.context),1)):G(``,!0),t.glossary?.length?(z(),B(`div`,AF,[(z(!0),B(R,null,I(t.glossary,e=>(z(),B(`span`,{key:e.term,class:`rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground`},j(l(e)),1))),128))])):G(``,!0),t.screenshot?(z(),B(`div`,jF,[U(N(Yu),{class:`size-3.5 shrink-0`}),H(`span`,MF,j(t.screenshot),1)])):G(``,!0)]))),128))])],64)):e.key||e.before!==void 0||e.after!==void 0?(z(),B(`div`,NF,[e.key?(z(),B(`div`,PF,[H(`span`,FF,j(e.key),1),e.locale?(z(),V(N(eC),{key:0,variant:`outline`,class:`shrink-0 font-mono uppercase`},{default:P(()=>[W(j(e.locale),1)]),_:2},1024)):G(``,!0)])):G(``,!0),e.before!==void 0||e.after!==void 0?(z(),B(`div`,IF,[e.before===void 0?G(``,!0):(z(),B(`span`,{key:0,class:A(N(US)(`min-w-0 flex-1 break-words text-muted-foreground`,d(e.before)&&`font-mono text-xs`))},j(u(e.before)),3)),e.before!==void 0&&e.after!==void 0?(z(),V(N(bu),{key:1,class:`mt-0.5 size-4 shrink-0 text-muted-foreground`})):G(``,!0),e.after===void 0?G(``,!0):(z(),B(`span`,{key:2,class:A(N(US)(`min-w-0 flex-1 break-words`,d(e.after)&&`font-mono text-xs`))},j(u(e.after)),3))])):G(``,!0)])):G(``,!0)]))),128))]))]))}}),RF=[{id:`home`,title:`Home`,section:``,html:`<h1>Glotfile</h1>
8
+ <blockquote>
9
+ <p>A <strong>local-first, git-native translation manager</strong>. All of your app&#39;s copy lives in one JSON file you commit to your repo. You edit and AI-translate it through a local web UI, then export to whatever locale formats your apps consume — no SaaS, no hosted database, nothing leaves your machine except the AI calls you choose to make.</p>
10
+ </blockquote>
11
+ <p>This is the home page of the user guide. Everything is linked from here.</p>
12
+ <h2>Start here</h2>
13
+ <ul>
14
+ <li>Installation — requirements and how to run Glotfile</li>
15
+ <li>Quick Start — from zero to translated strings in five minutes</li>
16
+ <li>Translation Workflow — the day-to-day loop, end to end</li>
17
+ </ul>
18
+ <h2>Frameworks</h2>
19
+ <p>How to wire Glotfile into your stack — config, import, and the export the framework consumes:</p>
20
+ <ul>
21
+ <li>Flutter (ARB) · Laravel · Vue I18n · Angular · Rails · Apple (iOS &amp; macOS)</li>
22
+ </ul>
23
+ <h2>Core concepts</h2>
24
+ <ul>
25
+ <li>The State File — <code>glotfile.json</code>, the single source of truth</li>
26
+ <li>Keys and Locales — how strings and languages are organised</li>
27
+ <li>Review States — <code>source</code> → <code>machine</code> → <code>reviewed</code> / <code>needs-review</code></li>
28
+ <li>Plurals — CLDR plural forms</li>
29
+ <li>Glossary — do-not-translate and forced terms</li>
30
+ <li>Key Context and Metadata — context, notes, tags, length limits, screenshots</li>
31
+ </ul>
32
+ <h2>The web UI</h2>
33
+ <ul>
34
+ <li>Web UI Overview — the panels and how they fit together</li>
35
+ <li>Editor · Analytics · Screenshots · Settings · AI Log</li>
36
+ </ul>
37
+ <h2>The command line</h2>
38
+ <ul>
39
+ <li>CLI Overview — every command at a glance</li>
40
+ <li>serve · translate · export · lint and check · import</li>
41
+ </ul>
42
+ <h2>AI translation</h2>
43
+ <ul>
44
+ <li>How Translation Works — what the translator does for you</li>
45
+ <li>AI Providers — Anthropic, OpenAI, AWS Bedrock, and OpenRouter setup</li>
46
+ </ul>
47
+ <h2>Reference</h2>
48
+ <ul>
49
+ <li>Output Formats — the six export adapters</li>
50
+ <li>Checks and Validation — every rule and what it catches</li>
51
+ <li>Configuration Reference — every field in <code>config</code></li>
52
+ <li>Placeholders and ICU — what&#39;s preserved across formats</li>
53
+ </ul>
54
+ <h2>Guides</h2>
55
+ <ul>
56
+ <li>Translation Workflow — author → translate → review → export</li>
57
+ <li>Continuous Integration — gate merges on translation health</li>
58
+ <li>Keeping Translations Fresh — handling source changes</li>
59
+ </ul>
60
+ <h2>Help</h2>
61
+ <ul>
62
+ <li>Troubleshooting and FAQ</li>
63
+ </ul>
64
+ `,text:`Glotfile A local-first, git-native translation manager . All of your app's copy lives in one JSON file you commit to your repo. You edit and AI-translate it through a local web UI, then export to whatever locale formats your apps consume — no SaaS, no hosted database, nothing leaves your machine except the AI calls you choose to make. This is the home page of the user guide. Everything is linked from here. Start here - Installation — requirements and how to run Glotfile - Quick Start — from zero to translated strings in five minutes - Translation Workflow — the day-to-day loop, end to end Frameworks How to wire Glotfile into your stack — config, import, and the export the framework consumes: - Flutter (ARB) · Laravel · Vue I18n · Angular · Rails · Apple (iOS & macOS) Core concepts - The State File — , the single source of truth - Keys and Locales — how strings and languages are organised - Review States — → → / - Plurals — CLDR plural forms - Glossary — do-not-translate and forced terms - Key Context and Metadata — context, notes, tags, length limits, screenshots The web UI - Web UI Overview — the panels and how they fit together - Editor · Analytics · Screenshots · Settings · AI Log The command line - CLI Overview — every command at a glance - serve · translate · export · lint and check · import AI translation - How Translation Works — what the translator does for you - AI Providers — Anthropic, OpenAI, AWS Bedrock, and OpenRouter setup Reference - Output Formats — the six export adapters - Checks and Validation — every rule and what it catches - Configuration Reference — every field in - Placeholders and ICU — what's preserved across formats Guides - Translation Workflow — author → translate → review → export - Continuous Integration — gate merges on translation health - Keeping Translations Fresh — handling source changes Help - Troubleshooting and FAQ`},{id:`getting-started/installation`,title:`Installation`,section:`Getting Started`,html:`<h1>Installation</h1>
65
+ <h2>Requirements</h2>
66
+ <ul>
67
+ <li><strong>Node.js</strong> <code>^20.19.0 || &gt;=22.12.0</code></li>
68
+ </ul>
69
+ <p>That&#39;s the only hard requirement. Everything except AI translation runs fully offline, with no account and no network access.</p>
70
+ <h2>Running Glotfile</h2>
71
+ <p>Glotfile is designed to run with <strong>no install</strong> via <code>npx</code>:</p>
72
+ <pre><code class="language-bash">npx glotfile
73
+ </code></pre>
74
+ <blockquote>
75
+ <p><strong>⚠ Pre-1.0: run from a checkout for now</strong> — Glotfile is pre-1.0 and not yet published to npm. Until it is, run it from a clone of the repo:</p>
76
+ <pre><code class="language-bash">npm install
77
+ npm run build # builds the UI + server into dist/
78
+ node bin/glotfile.js # equivalent to the \`glotfile\` command
79
+ </code></pre>
80
+ </blockquote>
81
+ <p>Once published, <code>npx glotfile &lt;command&gt;</code> and a global install will both work. Throughout these docs, <code>glotfile &lt;command&gt;</code> and <code>node bin/glotfile.js &lt;command&gt;</code> are interchangeable.</p>
82
+ <h2>First run</h2>
83
+ <p>Run Glotfile from the root of the project whose copy you want to manage:</p>
84
+ <pre><code class="language-bash">glotfile # same as: glotfile serve
85
+ </code></pre>
86
+ <p>This starts a local server bound to <code>127.0.0.1</code>, opens your browser, and:</p>
87
+ <ul>
88
+ <li>If a <code>glotfile.json</code> already exists in the current directory, it loads it.</li>
89
+ <li>If not, it starts from sensible defaults and <strong>writes the file as soon as you make your first edit</strong>.</li>
90
+ </ul>
91
+ <blockquote>
92
+ <p><strong>Info:</strong> Already have locale files? — Import an existing project by reading your current <code>.arb</code> / <code>.php</code> / <code>.json</code> files <em>into</em> the catalog with <code>glotfile import</code> — see import.</p>
93
+ </blockquote>
94
+ <h2>Targeting a different file</h2>
95
+ <p>Every command accepts <code>--file</code> (<code>-f</code>) to use a state file other than <code>./glotfile.json</code>:</p>
96
+ <pre><code class="language-bash">glotfile serve --file packages/app/glotfile.json
97
+ </code></pre>
98
+ <h2>Developing Glotfile itself</h2>
99
+ <p>If you&#39;re hacking on Glotfile (not just using it), run the Vite UI with hot-reload alongside the server:</p>
100
+ <pre><code class="language-bash">npm run dev
101
+ </code></pre>
102
+ <h2>Next steps</h2>
103
+ <ul>
104
+ <li>Quick Start — translate your first strings</li>
105
+ <li>The State File — understand what <code>glotfile.json</code> holds</li>
106
+ </ul>
107
+ `,text:`Installation Requirements - Node.js That's the only hard requirement. Everything except AI translation runs fully offline, with no account and no network access. Running Glotfile Glotfile is designed to run with no install via : ⚠ Pre-1.0: run from a checkout for now — Glotfile is pre-1.0 and not yet published to npm. Until it is, run it from a clone of the repo: Once published, and a global install will both work. Throughout these docs, and are interchangeable. First run Run Glotfile from the root of the project whose copy you want to manage: This starts a local server bound to , opens your browser, and: - If a already exists in the current directory, it loads it. - If not, it starts from sensible defaults and writes the file as soon as you make your first edit . Info: Already have locale files? — Import an existing project by reading your current / / files into the catalog with — see import. Targeting a different file Every command accepts ( ) to use a state file other than : Developing Glotfile itself If you're hacking on Glotfile (not just using it), run the Vite UI with hot-reload alongside the server: Next steps - Quick Start — translate your first strings - The State File — understand what holds`},{id:`getting-started/quick-start`,title:`Quick Start`,section:`Getting Started`,html:`<h1>Quick Start</h1>
108
+ <p>This walks you from an empty project to translated, exported strings. It assumes you&#39;ve done Installation.</p>
109
+ <h2>1. Start the UI</h2>
110
+ <p>From your project root:</p>
111
+ <pre><code class="language-bash">glotfile
112
+ </code></pre>
113
+ <p>Your browser opens the Editor. If there&#39;s no <code>glotfile.json</code> yet, Glotfile uses defaults and writes the file on your first edit.</p>
114
+ <h2>2. Add your languages</h2>
115
+ <p>Open Settings and set:</p>
116
+ <ul>
117
+ <li><strong>Source locale</strong> — the language you author in (e.g. <code>en</code>).</li>
118
+ <li><strong>Locales</strong> — every language you want to maintain (e.g. <code>en</code>, <code>fr</code>, <code>de</code>).</li>
119
+ </ul>
120
+ <p>See Keys and Locales for how locales work.</p>
121
+ <h2>3. Add keys and source copy</h2>
122
+ <p>In the Editor, add a key in dot notation and type its source string:</p>
123
+ <table>
124
+ <thead>
125
+ <tr>
126
+ <th>Key</th>
127
+ <th><code>en</code> (source)</th>
128
+ </tr>
129
+ </thead>
130
+ <tbody><tr>
131
+ <td><code>auth.signIn.button</code></td>
132
+ <td><code>Sign in</code></td>
133
+ </tr>
134
+ <tr>
135
+ <td><code>auth.signIn.title</code></td>
136
+ <td><code>Welcome back</code></td>
137
+ </tr>
138
+ </tbody></table>
139
+ <p>The source value is saved with the state <code>source</code>.</p>
140
+ <h2>4. AI-translate the rest</h2>
141
+ <blockquote>
142
+ <p><strong>Info:</strong> One-time setup — AI translation needs an API key in your environment. The default provider is Anthropic — set <code>ANTHROPIC_API_KEY</code> (a local <code>.env</code> file works). See AI Providers for OpenAI and AWS Bedrock.</p>
143
+ </blockquote>
144
+ <p>Fill the empty languages — from the Editor&#39;s translate action, or the CLI:</p>
145
+ <pre><code class="language-bash">glotfile translate
146
+ </code></pre>
147
+ <p>New translations are written as <code>machine</code> state. Glotfile never overwrites a value you&#39;ve marked <code>reviewed</code>. See How Translation Works.</p>
148
+ <h2>5. Review</h2>
149
+ <p>Back in the Editor, filter to <strong>machine</strong> to see unreviewed translations. Promote the good ones to <code>reviewed</code>; flag the rest. See Review States.</p>
150
+ <h2>6. Export to your app&#39;s formats</h2>
151
+ <p>Configure where files go in Settings (or Output Formats), then:</p>
152
+ <pre><code class="language-bash">glotfile export
153
+ </code></pre>
154
+ <p>This writes the locale files for every configured output (Flutter ARB, Laravel PHP, i18next JSON, and more — see Output Formats).</p>
155
+ <h2>7. Commit</h2>
156
+ <p>Commit <code>glotfile.json</code> together with your code. The diff <em>is</em> the review:</p>
157
+ <pre><code class="language-bash">git add glotfile.json lib/l10n/
158
+ git commit -m &quot;Add sign-in copy + translations&quot;
159
+ </code></pre>
160
+ <p>Because the catalog is just a file in your repo, branching, pull-request review, and rollback work exactly the way they already do for code.</p>
161
+ <h2>Where to go next</h2>
162
+ <ul>
163
+ <li>Translation Workflow — the same loop, in depth</li>
164
+ <li>Continuous Integration — keep translations healthy in CI</li>
165
+ <li>The State File — what&#39;s actually in <code>glotfile.json</code></li>
166
+ </ul>
167
+ `,text:`Quick Start This walks you from an empty project to translated, exported strings. It assumes you've done Installation. 1. Start the UI From your project root: Your browser opens the Editor. If there's no yet, Glotfile uses defaults and writes the file on your first edit. 2. Add your languages Open Settings and set: - Source locale — the language you author in (e.g. ). - Locales — every language you want to maintain (e.g. , , ). See Keys and Locales for how locales work. 3. Add keys and source copy In the Editor, add a key in dot notation and type its source string: Key (source) --- --- The source value is saved with the state . 4. AI-translate the rest Info: One-time setup — AI translation needs an API key in your environment. The default provider is Anthropic — set (a local file works). See AI Providers for OpenAI and AWS Bedrock. Fill the empty languages — from the Editor's translate action, or the CLI: New translations are written as state. Glotfile never overwrites a value you've marked . See How Translation Works. 5. Review Back in the Editor, filter to machine to see unreviewed translations. Promote the good ones to ; flag the rest. See Review States. 6. Export to your app's formats Configure where files go in Settings (or Output Formats), then: This writes the locale files for every configured output (Flutter ARB, Laravel PHP, i18next JSON, and more — see Output Formats). 7. Commit Commit together with your code. The diff is the review: Because the catalog is just a file in your repo, branching, pull-request review, and rollback work exactly the way they already do for code. Where to go next - Translation Workflow — the same loop, in depth - Continuous Integration — keep translations healthy in CI - The State File — what's actually in`},{id:`frameworks/angular`,title:`Angular`,section:`Frameworks`,html:`<h1>Angular</h1>
168
+ <p>Glotfile works with Angular&#39;s <code>@angular/localize</code> XLIFF files through the <strong><code>angular-xliff</code></strong> adapter (XLIFF 1.2).</p>
169
+ <h2>Angular owns the source — glotfile syncs from it</h2>
170
+ <p>This is the one framework where your <strong>code</strong> is the source of truth, not <code>glotfile.json</code>. You mark strings with <code>i18n</code> in templates and Angular&#39;s <code>ng extract-i18n</code> generates <code>messages.xlf</code>. Glotfile <strong>syncs from</strong> that file rather than owning the source copy — so the day-to-day command is <code>glotfile sync</code>, not <code>import</code>.</p>
171
+ <p>The loop:</p>
172
+ <pre><code class="language-bash">ng extract-i18n # 1. Angular writes src/locale/messages.xlf (source keys + copy)
173
+ glotfile sync # 2. merge messages.xlf into glotfile.json
174
+ glotfile translate # 3. fill the other locales
175
+ glotfile export # 4. write src/locale/messages.{locale}.xlf
176
+ ng build --localize # 5. Angular builds one bundle per locale
177
+ </code></pre>
178
+ <p><code>glotfile sync</code> merges the re-extracted source into your catalog <strong>preserving</strong> glossary, key context, and reviewed translations, and detects keys you removed from the source. Preview with <code>--dry-run</code>; add <code>--prune</code> to drop keys that no longer appear in <code>messages.xlf</code>. Re-run <code>sync</code> (never <code>import</code>) every time you re-extract.</p>
179
+ <h2>Configure the output</h2>
180
+ <pre><code class="language-json">{ &quot;adapter&quot;: &quot;angular-xliff&quot;, &quot;path&quot;: &quot;src/locale/messages.{locale}.xlf&quot; }
181
+ </code></pre>
182
+ <p>The untranslated <code>messages.xlf</code> stays owned by Angular; glotfile only writes the per-locale <code>messages.{locale}.xlf</code> files.</p>
183
+ <h2>Format notes</h2>
184
+ <ul>
185
+ <li><strong>Placeholders</strong> — <code>{name}</code> ↔ <code>&lt;x id=&quot;INTERPOLATION&quot; equiv-text=&quot;{{name}}&quot;/&gt;</code>.</li>
186
+ <li><strong>Plurals</strong> — native ICU using Angular&#39;s <code>VAR_PLURAL</code> argument.</li>
187
+ <li><strong>Locale codes</strong> — default to BCP-47 hyphen (<code>messages.pt-BR.xlf</code>), written into the <code>target-language</code> attribute. See Output Formats.</li>
188
+ </ul>
189
+ <h2>Related</h2>
190
+ <ul>
191
+ <li>Output Formats · Placeholders and ICU · Plurals · Scan · Translation Workflow</li>
192
+ </ul>
193
+ `,text:`Angular Glotfile works with Angular's XLIFF files through the adapter (XLIFF 1.2). Angular owns the source — glotfile syncs from it This is the one framework where your code is the source of truth, not . You mark strings with in templates and Angular's generates . Glotfile syncs from that file rather than owning the source copy — so the day-to-day command is , not . The loop: merges the re-extracted source into your catalog preserving glossary, key context, and reviewed translations, and detects keys you removed from the source. Preview with ; add to drop keys that no longer appear in . Re-run (never ) every time you re-extract. Configure the output The untranslated stays owned by Angular; glotfile only writes the per-locale files. Format notes - Placeholders — ↔ . - Plurals — native ICU using Angular's argument. - Locale codes — default to BCP-47 hyphen ( ), written into the attribute. See Output Formats. Related - Output Formats · Placeholders and ICU · Plurals · Scan · Translation Workflow`},{id:`frameworks/apple`,title:`Apple (iOS & macOS)`,section:`Frameworks`,html:`<h1>Apple (iOS &amp; macOS)</h1>
194
+ <p>Apple localization splits across two files per locale, so glotfile uses two adapters that both write into <code>{locale}.lproj/</code>:</p>
195
+ <ul>
196
+ <li><strong><code>apple-strings</code></strong> → <code>Localizable.strings</code> — the scalar strings.</li>
197
+ <li><strong><code>apple-stringsdict</code></strong> → <code>Localizable.stringsdict</code> — the plurals.</li>
198
+ </ul>
199
+ <h2>Configure the outputs</h2>
200
+ <p>Add <strong>both</strong> outputs in <code>glotfile.json</code>:</p>
201
+ <pre><code class="language-json">{ &quot;adapter&quot;: &quot;apple-strings&quot;, &quot;path&quot;: &quot;{locale}.lproj/Localizable.strings&quot; },
202
+ { &quot;adapter&quot;: &quot;apple-stringsdict&quot;, &quot;path&quot;: &quot;{locale}.lproj/Localizable.stringsdict&quot; }
203
+ </code></pre>
204
+ <p>The Settings → Output Formats dropdown lists <code>apple-strings</code>; add the <code>apple-stringsdict</code> entry by editing <code>glotfile.json</code>. <code>apple-strings</code> skips plural keys (they would be lossy in a flat <code>.strings</code> table) and <code>apple-stringsdict</code> emits them as <code>NSStringLocalizedFormatKey</code> plist entries — so <strong>without the second output your plurals never ship</strong>.</p>
205
+ <h2>Import existing strings</h2>
206
+ <pre><code class="language-bash">glotfile import
207
+ </code></pre>
208
+ <p>Detection finds <code>*.lproj</code> directories that contain a <code>Localizable.strings</code> (that table only — <code>InfoPlist.strings</code> and other tables are ignored).</p>
209
+ <h2>Wire Xcode to the exports</h2>
210
+ <p>Xcode picks up <code>.lproj</code> resources automatically once they&#39;re in the bundle. Use <code>NSLocalizedString(&quot;greeting&quot;, comment: &quot;&quot;)</code>, <code>String(localized: &quot;greeting&quot;)</code>, or SwiftUI <code>Text(&quot;greeting&quot;)</code>.</p>
211
+ <h2>Format notes</h2>
212
+ <ul>
213
+ <li><strong>Placeholders</strong> — printf style (<code>%@</code>, <code>%d</code>).</li>
214
+ <li><strong>Plurals</strong> — live only in <code>.stringsdict</code>, keyed by CLDR categories (<code>one</code>, <code>other</code>, …) with an <code>NSStringPluralRuleType</code> spec.</li>
215
+ <li><strong>Locale codes</strong> — default to BCP-47 hyphen (<code>en.lproj</code>, <code>pt-BR.lproj</code>). See Output Formats.</li>
216
+ </ul>
217
+ <h2>Related</h2>
218
+ <ul>
219
+ <li>Output Formats · Placeholders and ICU · Plurals · Quick Start · Translation Workflow</li>
220
+ </ul>
221
+ `,text:`Apple (iOS & macOS) Apple localization splits across two files per locale, so glotfile uses two adapters that both write into : - → — the scalar strings. - → — the plurals. Configure the outputs Add both outputs in : The Settings → Output Formats dropdown lists ; add the entry by editing . skips plural keys (they would be lossy in a flat table) and emits them as plist entries — so without the second output your plurals never ship . Import existing strings Detection finds directories that contain a (that table only — and other tables are ignored). Wire Xcode to the exports Xcode picks up resources automatically once they're in the bundle. Use , , or SwiftUI . Format notes - Placeholders — printf style ( , ). - Plurals — live only in , keyed by CLDR categories ( , , …) with an spec. - Locale codes — default to BCP-47 hyphen ( , ). See Output Formats. Related - Output Formats · Placeholders and ICU · Plurals · Quick Start · Translation Workflow`},{id:`frameworks/flutter`,title:`Flutter (ARB)`,section:`Frameworks`,html:`<h1>Flutter (ARB)</h1>
222
+ <p>Glotfile exports your catalog to Flutter&#39;s <code>.arb</code> files with the <strong><code>flutter-arb</code></strong> adapter — one <code>app_{locale}.arb</code> per locale, ready for Flutter&#39;s <code>gen_l10n</code> code generator.</p>
223
+ <h2>Configure the output</h2>
224
+ <p>In Settings → Output Formats (or <code>glotfile.json</code>):</p>
225
+ <pre><code class="language-json">{ &quot;adapter&quot;: &quot;flutter-arb&quot;, &quot;path&quot;: &quot;lib/l10n/app_{locale}.arb&quot; }
226
+ </code></pre>
227
+ <p><code>glotfile export</code> then writes <code>lib/l10n/app_en.arb</code>, <code>app_fr.arb</code>, … each with an <code>@@locale</code> header.</p>
228
+ <h2>Import existing strings</h2>
229
+ <p>If you already have <code>.arb</code> files, pull them into the catalog once:</p>
230
+ <pre><code class="language-bash">glotfile import
231
+ </code></pre>
232
+ <p>Detection finds <code>*.arb</code> under <code>lib/l10n/</code>, <code>l10n/</code>, or <code>lib/src/l10n/</code>, strips the <code>app_</code> prefix, and records the <code>localeCase</code> so a later export reproduces your filenames byte-for-byte.</p>
233
+ <h2>Wire Flutter to the exports</h2>
234
+ <p>Flutter turns ARB into Dart at build time. Add an <code>l10n.yaml</code> at the project root:</p>
235
+ <pre><code class="language-yaml">arb-dir: lib/l10n
236
+ template-arb-file: app_en.arb
237
+ output-localization-file: app_localizations.dart
238
+ </code></pre>
239
+ <p>Set <code>generate: true</code> under <code>flutter:</code> in <code>pubspec.yaml</code>, then <code>flutter gen-l10n</code> (a normal <code>flutter run</code> regenerates too). Use it as <code>AppLocalizations.of(context)!.greeting</code>.</p>
240
+ <h2>Format notes</h2>
241
+ <ul>
242
+ <li><strong>Placeholders</strong> — ICU <code>{name}</code> is preserved as-is. Glotfile writes the <code>@key</code> placeholder metadata that <code>gen_l10n</code> needs to compile typed arguments.</li>
243
+ <li><strong>Plurals</strong> — emitted as native inline ICU: <code>{count, plural, one {1 item} other {# items}}</code>.</li>
244
+ <li><strong>Locale codes</strong> — default to BCP-47 underscore (<code>app_en.arb</code>, <code>app_zh_Hant.arb</code>), written into <code>@@locale</code>. Flutter rejects some script subtags; remap with <code>localeMap</code>, e.g. <code>&quot;localeMap&quot;: { &quot;zh-hant&quot;: &quot;zh_HK&quot; }</code>. See Output Formats.</li>
245
+ </ul>
246
+ <h2>Related</h2>
247
+ <ul>
248
+ <li>Output Formats · Placeholders and ICU · Plurals · Quick Start · Translation Workflow</li>
249
+ </ul>
250
+ `,text:`Flutter (ARB) Glotfile exports your catalog to Flutter's files with the adapter — one per locale, ready for Flutter's code generator. Configure the output In Settings → Output Formats (or ): then writes , , … each with an header. Import existing strings If you already have files, pull them into the catalog once: Detection finds under , , or , strips the prefix, and records the so a later export reproduces your filenames byte-for-byte. Wire Flutter to the exports Flutter turns ARB into Dart at build time. Add an at the project root: Set under in , then (a normal regenerates too). Use it as . Format notes - Placeholders — ICU is preserved as-is. Glotfile writes the placeholder metadata that needs to compile typed arguments. - Plurals — emitted as native inline ICU: . - Locale codes — default to BCP-47 underscore ( , ), written into . Flutter rejects some script subtags; remap with , e.g. . See Output Formats. Related - Output Formats · Placeholders and ICU · Plurals · Quick Start · Translation Workflow`},{id:`frameworks/laravel`,title:`Laravel`,section:`Frameworks`,html:`<h1>Laravel</h1>
251
+ <p>Glotfile exports to Laravel&#39;s PHP array files with the <strong><code>laravel-php</code></strong> adapter — one file per locale <strong>per namespace</strong>, consumed directly by <code>__()</code> / <code>trans()</code>.</p>
252
+ <h2>Configure the output</h2>
253
+ <p>In Settings → Output Formats (or <code>glotfile.json</code>):</p>
254
+ <pre><code class="language-json">{ &quot;adapter&quot;: &quot;laravel-php&quot;, &quot;path&quot;: &quot;lang/{locale}/{namespace}.php&quot; }
255
+ </code></pre>
256
+ <p>Laravel 9 and earlier keep these under <code>resources/lang/{locale}/{namespace}.php</code> — use that path instead.</p>
257
+ <h3>How <code>{namespace}</code> works</h3>
258
+ <p>The first dot-segment of a key becomes its file. <code>auth.signIn.button</code> is written as <code>signIn.button</code> inside <code>lang/fr/auth.php</code>; keys with no dot fall into <code>messages.php</code>. This mirrors how <code>__(&#39;auth.signIn.button&#39;)</code> resolves.</p>
259
+ <h2>Import existing strings</h2>
260
+ <pre><code class="language-bash">glotfile import
261
+ </code></pre>
262
+ <p>Detection finds <code>lang/</code> or <code>resources/lang/</code>. <strong>PHP must be on your <code>PATH</code></strong> — the importer evaluates the array files to read them.</p>
263
+ <h2>Wire Laravel to the exports</h2>
264
+ <p>Nothing to generate: Laravel reads the PHP arrays directly. Use <code>__(&#39;auth.signIn.button&#39;)</code>, <code>trans()</code>, the <code>@lang</code> Blade directive, or <code>trans_choice()</code> for plurals.</p>
265
+ <h2>Format notes</h2>
266
+ <ul>
267
+ <li><strong>Placeholders</strong> — <code>{name}</code> is rendered as Laravel&#39;s <code>:name</code>.</li>
268
+ <li><strong>Plurals</strong> — pipe-separated forms (<code>one|other</code>) consumed by <code>trans_choice()</code>.</li>
269
+ <li><strong>Locale codes</strong> — default to lower-hyphen (<code>lang/pt-br/…</code>). Override per output with <code>localeCase</code>. See Output Formats.</li>
270
+ </ul>
271
+ <h2>Related</h2>
272
+ <ul>
273
+ <li>Output Formats · Placeholders and ICU · Plurals · Quick Start · Translation Workflow</li>
274
+ </ul>
275
+ `,text:`Laravel Glotfile exports to Laravel's PHP array files with the adapter — one file per locale per namespace , consumed directly by / . Configure the output In Settings → Output Formats (or ): Laravel 9 and earlier keep these under — use that path instead. How works The first dot-segment of a key becomes its file. is written as inside ; keys with no dot fall into . This mirrors how resolves. Import existing strings Detection finds or . PHP must be on your — the importer evaluates the array files to read them. Wire Laravel to the exports Nothing to generate: Laravel reads the PHP arrays directly. Use , , the Blade directive, or for plurals. Format notes - Placeholders — is rendered as Laravel's . - Plurals — pipe-separated forms ( ) consumed by . - Locale codes — default to lower-hyphen ( ). Override per output with . See Output Formats. Related - Output Formats · Placeholders and ICU · Plurals · Quick Start · Translation Workflow`},{id:`frameworks/rails`,title:`Rails`,section:`Frameworks`,html:`<h1>Rails</h1>
276
+ <p>Glotfile exports to Rails i18n YAML files with the <strong><code>rails-yaml</code></strong> adapter — one <code>config/locales/{locale}.yml</code> per locale.</p>
277
+ <h2>Configure the output</h2>
278
+ <p>In Settings → Output Formats (or <code>glotfile.json</code>):</p>
279
+ <pre><code class="language-json">{ &quot;adapter&quot;: &quot;rails-yaml&quot;, &quot;path&quot;: &quot;config/locales/{locale}.yml&quot; }
280
+ </code></pre>
281
+ <p>Each file is a nested map under a top-level locale key:</p>
282
+ <pre><code class="language-yaml">en:
283
+ auth:
284
+ sign_in: &quot;Sign in&quot;
285
+ cart:
286
+ items:
287
+ one: &quot;%{count} item&quot;
288
+ other: &quot;%{count} items&quot;
289
+ </code></pre>
290
+ <p>The top-level key (<code>en:</code>) is authoritative for the locale — not the filename.</p>
291
+ <h2>Import existing strings</h2>
292
+ <pre><code class="language-bash">glotfile import
293
+ </code></pre>
294
+ <p>Detection parses <code>config/locales/*.yml</code> by their top-level locale keys. Glotfile reads a safe YAML subset (plain maps and scalar strings); anchors, flow collections, and sequences aren&#39;t supported.</p>
295
+ <h2>Wire Rails to the exports</h2>
296
+ <p>Rails auto-loads <code>config/locales/**/*.yml</code>. Use <code>I18n.t(&#39;auth.sign_in&#39;)</code>, or the relative <code>t(&#39;.sign_in&#39;)</code> form in views; pass <code>count:</code> for plurals.</p>
297
+ <h2>Format notes</h2>
298
+ <ul>
299
+ <li><strong>Placeholders</strong> — <code>{name}</code> is rendered as Rails&#39; <code>%{name}</code>.</li>
300
+ <li><strong>Plurals</strong> — a nested CLDR subtree (<code>one:</code> / <code>other:</code> / …) that Rails pluralises via <code>count:</code>.</li>
301
+ <li><strong>Locale codes</strong> — default to BCP-47 hyphen (<code>pt-BR.yml</code>) and are written as the top-level key. See Output Formats.</li>
302
+ </ul>
303
+ <h2>Related</h2>
304
+ <ul>
305
+ <li>Output Formats · Placeholders and ICU · Plurals · Quick Start · Translation Workflow</li>
306
+ </ul>
307
+ `,text:`Rails Glotfile exports to Rails i18n YAML files with the adapter — one per locale. Configure the output In Settings → Output Formats (or ): Each file is a nested map under a top-level locale key: The top-level key ( ) is authoritative for the locale — not the filename. Import existing strings Detection parses by their top-level locale keys. Glotfile reads a safe YAML subset (plain maps and scalar strings); anchors, flow collections, and sequences aren't supported. Wire Rails to the exports Rails auto-loads . Use , or the relative form in views; pass for plurals. Format notes - Placeholders — is rendered as Rails' . - Plurals — a nested CLDR subtree ( / / …) that Rails pluralises via . - Locale codes — default to BCP-47 hyphen ( ) and are written as the top-level key. See Output Formats. Related - Output Formats · Placeholders and ICU · Plurals · Quick Start · Translation Workflow`},{id:`frameworks/vue-i18n`,title:`Vue I18n`,section:`Frameworks`,html:`<h1>Vue I18n</h1>
308
+ <p>Glotfile exports to Vue I18n&#39;s JSON message files with the <strong><code>vue-i18n-json</code></strong> adapter — one JSON file per locale.</p>
309
+ <h2>Configure the output</h2>
310
+ <p>In Settings → Output Formats (or <code>glotfile.json</code>):</p>
311
+ <pre><code class="language-json">{ &quot;adapter&quot;: &quot;vue-i18n-json&quot;, &quot;path&quot;: &quot;src/locales/{locale}.json&quot;, &quot;style&quot;: &quot;nested&quot; }
312
+ </code></pre>
313
+ <p>The <code>style</code> option controls layout: <strong><code>nested</code></strong> expands dot-segments into nested objects (<code>{ &quot;auth&quot;: { &quot;signIn&quot;: { &quot;button&quot;: … } } }</code>); <strong><code>flat</code></strong> keeps the dotted keys as-is. New outputs default to nested.</p>
314
+ <h2>Import existing strings</h2>
315
+ <pre><code class="language-bash">glotfile import
316
+ </code></pre>
317
+ <p>Detection looks in <code>src/locales/</code>, <code>src/i18n/locales/</code>, <code>locales/</code>, and <code>lang/</code>. It needs at least two locale files, or one named <code>en</code> (or <code>en-*</code>), to recognise the layout with confidence.</p>
318
+ <h2>Wire Vue to the exports</h2>
319
+ <p>Load the JSON into <code>createI18n</code>:</p>
320
+ <pre><code class="language-js">import { createI18n } from &#39;vue-i18n&#39;
321
+ import en from &#39;./locales/en.json&#39;
322
+ import fr from &#39;./locales/fr.json&#39;
323
+
324
+ const i18n = createI18n({ legacy: false, locale: &#39;en&#39;, messages: { en, fr } })
325
+ </code></pre>
326
+ <p>Use <code>t(&#39;auth.signIn.button&#39;)</code> in templates; pass a count for plurals: <code>t(&#39;cart.items&#39;, n)</code>.</p>
327
+ <h2>Format notes</h2>
328
+ <ul>
329
+ <li><strong>Placeholders</strong> — <code>{name}</code> is used verbatim (Vue I18n&#39;s named-interpolation syntax).</li>
330
+ <li><strong>Plurals</strong> — pipe-separated forms (<code>one | other</code>), Vue I18n&#39;s choice format.</li>
331
+ <li><strong>Locale codes</strong> — default to lower-hyphen (<code>fr.json</code>, <code>pt-br.json</code>). See Output Formats.</li>
332
+ </ul>
333
+ <h2>Related</h2>
334
+ <ul>
335
+ <li>Output Formats · Placeholders and ICU · Plurals · Quick Start · Translation Workflow</li>
336
+ </ul>
337
+ `,text:`Vue I18n Glotfile exports to Vue I18n's JSON message files with the adapter — one JSON file per locale. Configure the output In Settings → Output Formats (or ): The option controls layout: expands dot-segments into nested objects ( ); keeps the dotted keys as-is. New outputs default to nested. Import existing strings Detection looks in , , , and . It needs at least two locale files, or one named (or ), to recognise the layout with confidence. Wire Vue to the exports Load the JSON into : Use in templates; pass a count for plurals: . Format notes - Placeholders — is used verbatim (Vue I18n's named-interpolation syntax). - Plurals — pipe-separated forms ( ), Vue I18n's choice format. - Locale codes — default to lower-hyphen ( , ). See Output Formats. Related - Output Formats · Placeholders and ICU · Plurals · Quick Start · Translation Workflow`},{id:`web-ui/ai-log`,title:`AI Log`,section:`Web UI`,html:`<h1>AI Log</h1>
338
+ <p>The AI Log is a record of recent translation runs — what was sent to the provider and what came back. It&#39;s useful for understanding why a translation turned out the way it did, and for auditing what left your machine.</p>
339
+ <h2>What each entry records</h2>
340
+ <p>For every run:</p>
341
+ <ul>
342
+ <li><strong>When</strong> it ran and the <strong>model</strong> used.</li>
343
+ <li>The <strong>system prompt</strong> that framed the request.</li>
344
+ <li>Per string: the <strong>key</strong>, <strong>source</strong>, <strong>target locale</strong>, the <strong>context</strong> and relevant <strong>glossary</strong> hints sent, and whether the key had a <strong>screenshot</strong>.</li>
345
+ <li>The <strong>results</strong> returned (translation or plural forms, or an error).</li>
346
+ </ul>
347
+ <h2>What it deliberately does <em>not</em> record</h2>
348
+ <blockquote>
349
+ <p><strong>⚠ The log is egress-only and credential-free</strong></p>
350
+ <ul>
351
+ <li><strong>No API keys</strong> are ever written to the log (or to <code>glotfile.json</code>).</li>
352
+ <li><strong>No screenshot bytes</strong> — only the fact that a key had one.</li>
353
+ </ul>
354
+ </blockquote>
355
+ <p>In other words: the AI Log shows exactly what crossed the network boundary, and nothing more.</p>
356
+ <h2>Related</h2>
357
+ <ul>
358
+ <li>How Translation Works · AI Providers</li>
359
+ </ul>
360
+ `,text:`AI Log The AI Log is a record of recent translation runs — what was sent to the provider and what came back. It's useful for understanding why a translation turned out the way it did, and for auditing what left your machine. What each entry records For every run: - When it ran and the model used. - The system prompt that framed the request. - Per string: the key , source , target locale , the context and relevant glossary hints sent, and whether the key had a screenshot . - The results returned (translation or plural forms, or an error). What it deliberately does not record ⚠ The log is egress-only and credential-free - No API keys are ever written to the log (or to ). - No screenshot bytes — only the fact that a key had one. In other words: the AI Log shows exactly what crossed the network boundary, and nothing more. Related - How Translation Works · AI Providers`},{id:`web-ui/analytics`,title:`Analytics`,section:`Web UI`,html:`<h1>Analytics</h1>
361
+ <p>The Analytics panel answers one question — <strong>can I ship?</strong> — plus the detail behind the answer: how complete and how reviewed your catalog is per locale, and what&#39;s blocking a release.</p>
362
+ <h2>The release gate</h2>
363
+ <p>The &quot;Ready to ship&quot; verdict is computed from the <strong>same lint report as <code>glotfile check</code></strong>: the lint rules over your catalog plus the output-drift check. If the CLI fails, the panel shows the same blockers, and vice versa — the two can never disagree.</p>
364
+ <p>A locale is <strong>Ready</strong> when it clears the gate:</p>
365
+ <ul>
366
+ <li>100% translated (no <code>empty-translation</code> errors)</li>
367
+ <li>0 lint errors (placeholder mismatches, glossary violations, …)</li>
368
+ <li>Outputs exported (no stale files on disk)</li>
369
+ <li>Nothing stale (no needs-review strings; these mark a locale <strong>Almost</strong> rather than blocked)</li>
370
+ </ul>
371
+ <p>Reviewed state is optional — a fully machine-translated locale can ship.</p>
372
+ <h3>Skipping rules</h3>
373
+ <p>The gate honors <code>config.lint.rules</code> in <code>glotfile.json</code>, exactly like the CLI. Set a rule to <code>&quot;off&quot;</code> to skip it in both places, or change its severity:</p>
374
+ <pre><code class="language-json">{
375
+ &quot;lint&quot;: {
376
+ &quot;rules&quot;: {
377
+ &quot;identical-to-source&quot;: &quot;off&quot;,
378
+ &quot;spelling&quot;: &quot;warn&quot;
379
+ }
380
+ }
381
+ }
382
+ </code></pre>
383
+ <p>Rules at <code>error</code> severity block the release; <code>warn</code> rules surface as warnings only. See <em>Checks and Validation</em> for the full rule list.</p>
384
+ <h2>Totals</h2>
385
+ <p>At the top: total keys, number of locales, overall <strong>translated %</strong> and <strong>reviewed %</strong>, open issues, and the source word count.</p>
386
+ <h2>Per locale</h2>
387
+ <p>For each target locale:</p>
388
+ <ul>
389
+ <li>Verdict against the release gate (<strong>Ready / Almost / Blocked</strong>) with its blockers</li>
390
+ <li><strong>Translated %</strong> and a breakdown of states: reviewed, needs-review, machine, missing</li>
391
+ <li>Breaking and warning counts from the lint report</li>
392
+ </ul>
393
+ <p>Click any locale, issue, or worklist item to drill into the matching strings in the Editor.</p>
394
+ <blockquote>
395
+ <p><strong>Tip:</strong> Reviewed ≠ translated — a locale can be 100% <em>translated</em> (no missing values) but only 40% <em>reviewed</em>. The two percentages together tell you whether you have copy at all, and whether a human has signed off on it.</p>
396
+ </blockquote>
397
+ <h2>Related</h2>
398
+ <ul>
399
+ <li>Review States · Editor · Checks and Validation · Lint and Check (CLI)</li>
400
+ </ul>
401
+ `,text:`Analytics The Analytics panel answers one question — can I ship? — plus the detail behind the answer: how complete and how reviewed your catalog is per locale, and what's blocking a release. The release gate The "Ready to ship" verdict is computed from the same lint report as : the lint rules over your catalog plus the output-drift check. If the CLI fails, the panel shows the same blockers, and vice versa — the two can never disagree. A locale is Ready when it clears the gate: - 100% translated (no errors) - 0 lint errors (placeholder mismatches, glossary violations, …) - Outputs exported (no stale files on disk) - Nothing stale (no needs-review strings; these mark a locale Almost rather than blocked) Reviewed state is optional — a fully machine-translated locale can ship. Skipping rules The gate honors in , exactly like the CLI. Set a rule to to skip it in both places, or change its severity: Rules at severity block the release; rules surface as warnings only. See Checks and Validation for the full rule list. Totals At the top: total keys, number of locales, overall translated % and reviewed % , open issues, and the source word count. Per locale For each target locale: - Verdict against the release gate ( Ready / Almost / Blocked ) with its blockers - Translated % and a breakdown of states: reviewed, needs-review, machine, missing - Breaking and warning counts from the lint report Click any locale, issue, or worklist item to drill into the matching strings in the Editor. Tip: Reviewed ≠ translated — a locale can be 100% translated (no missing values) but only 40% reviewed . The two percentages together tell you whether you have copy at all, and whether a human has signed off on it. Related - Review States · Editor · Checks and Validation · Lint and Check (CLI)`},{id:`web-ui/editor`,title:`Editor`,section:`Web UI`,html:`<h1>Editor</h1>
402
+ <p>The Editor is a table of every key with the source string and each target language side by side. It&#39;s built to stay fast with thousands of keys (only visible rows are rendered).</p>
403
+ <h2>Working with keys</h2>
404
+ <ul>
405
+ <li><strong>Add</strong> a key (dot-notation name + source value).</li>
406
+ <li><strong>Rename</strong> a key inline.</li>
407
+ <li><strong>Delete</strong> a key.</li>
408
+ <li><strong>Edit values inline</strong> — click a cell, type, commit.</li>
409
+ </ul>
410
+ <h2>Editing values</h2>
411
+ <ul>
412
+ <li>Press <strong>Enter</strong> to commit an edit, <strong>Escape</strong> to cancel.</li>
413
+ <li>Use <strong>↑ / ↓</strong> arrow keys to move between rows.</li>
414
+ <li>Plural keys open a dedicated per-category form editor.</li>
415
+ </ul>
416
+ <p>Each value shows a state badge you can toggle as you review (<code>machine</code> → <code>reviewed</code> / <code>needs-review</code>).</p>
417
+ <h2>Filtering and search</h2>
418
+ <p>Free-text search plus state facets let you focus:</p>
419
+ <ul>
420
+ <li><strong>missing</strong> — values with no content</li>
421
+ <li><strong>machine</strong> — AI translations not yet reviewed</li>
422
+ <li><strong>needs-review</strong> — flagged values (e.g. source changed)</li>
423
+ <li><strong>reviewed</strong> — human-approved values</li>
424
+ <li><strong>needs attention</strong> — any key with an open issue</li>
425
+ </ul>
426
+ <p>You can also filter by <strong>tag</strong> and narrow to a single locale.</p>
427
+ <h2>Per-key detail panel</h2>
428
+ <p>Selecting a key opens its detail panel for metadata: <strong>context</strong>, <strong>notes</strong>, <strong>tags</strong>, <strong>max length</strong>, <strong>screenshot</strong>, the <strong>skip-translate</strong> flag, and the plural marker.</p>
429
+ <h2>Translating from the Editor</h2>
430
+ <p>The translate action runs AI translation for the current selection/filter — the same engine as <code>glotfile translate</code>. Results come back as <code>machine</code> and never overwrite <code>reviewed</code> values.</p>
431
+ <h2>Exporting from the Editor</h2>
432
+ <p>The export action opens a <strong>preview</strong> of exactly what <code>glotfile export</code> will write, before any files are touched. See Output Formats.</p>
433
+ <h2>Related</h2>
434
+ <ul>
435
+ <li>Review States · Key Context and Metadata · Analytics · translate</li>
436
+ </ul>
437
+ `,text:`Editor The Editor is a table of every key with the source string and each target language side by side. It's built to stay fast with thousands of keys (only visible rows are rendered). Working with keys - Add a key (dot-notation name + source value). - Rename a key inline. - Delete a key. - Edit values inline — click a cell, type, commit. Editing values - Press Enter to commit an edit, Escape to cancel. - Use ↑ / ↓ arrow keys to move between rows. - Plural keys open a dedicated per-category form editor. Each value shows a state badge you can toggle as you review ( → / ). Filtering and search Free-text search plus state facets let you focus: - missing — values with no content - machine — AI translations not yet reviewed - needs-review — flagged values (e.g. source changed) - reviewed — human-approved values - needs attention — any key with an open issue You can also filter by tag and narrow to a single locale. Per-key detail panel Selecting a key opens its detail panel for metadata: context , notes , tags , max length , screenshot , the skip-translate flag, and the plural marker. Translating from the Editor The translate action runs AI translation for the current selection/filter — the same engine as . Results come back as and never overwrite values. Exporting from the Editor The export action opens a preview of exactly what will write, before any files are touched. See Output Formats. Related - Review States · Key Context and Metadata · Analytics · translate`},{id:`web-ui/screenshots`,title:`Screenshots`,section:`Web UI`,html:`<h1>Screenshots</h1>
438
+ <p>A screenshot attached to a key shows <em>where</em> a string appears in your UI. Vision-capable AI models use it as context, which markedly improves ambiguous strings.</p>
439
+ <h2>Attaching a screenshot</h2>
440
+ <p>Attach an image to a key from its detail panel in the Editor, or manage images across keys in the <strong>Screenshots</strong> panel.</p>
441
+ <h2>How the AI uses them</h2>
442
+ <p>During translation, a key&#39;s screenshot is sent <strong>only to vision-capable models</strong>:</p>
443
+ <ul>
444
+ <li><strong>Supported:</strong> Anthropic, OpenAI (gpt-4o-class), AWS Bedrock (Nova, Claude).</li>
445
+ <li><strong>Not supported:</strong> AWS Bedrock Meta Llama text models — those runs proceed text-only and print a warning noting how many screenshots were skipped.</li>
446
+ </ul>
447
+ <p>So screenshots are always safe to attach: models that can&#39;t see them simply ignore them. See AI Providers for the full support matrix.</p>
448
+ <blockquote>
449
+ <p><strong>Info:</strong> Screenshots never appear in the AI log — the AI Log records what was sent to a provider, but <strong>not</strong> the image bytes themselves — only that a key had a screenshot.</p>
450
+ </blockquote>
451
+ <h2>Related</h2>
452
+ <ul>
453
+ <li>Key Context and Metadata · How Translation Works · AI Providers</li>
454
+ </ul>
455
+ `,text:`Screenshots A screenshot attached to a key shows where a string appears in your UI. Vision-capable AI models use it as context, which markedly improves ambiguous strings. Attaching a screenshot Attach an image to a key from its detail panel in the Editor, or manage images across keys in the Screenshots panel. How the AI uses them During translation, a key's screenshot is sent only to vision-capable models : - Supported: Anthropic, OpenAI (gpt-4o-class), AWS Bedrock (Nova, Claude). - Not supported: AWS Bedrock Meta Llama text models — those runs proceed text-only and print a warning noting how many screenshots were skipped. So screenshots are always safe to attach: models that can't see them simply ignore them. See AI Providers for the full support matrix. Info: Screenshots never appear in the AI log — the AI Log records what was sent to a provider, but not the image bytes themselves — only that a key had a screenshot. Related - Key Context and Metadata · How Translation Works · AI Providers`},{id:`web-ui/settings`,title:`Settings`,section:`Web UI`,html:`<h1>Settings</h1>
456
+ <p>The Settings panel edits the <code>config</code> block of <code>glotfile.json</code>. Every field here is also documented in the Configuration Reference.</p>
457
+ <h2>What you can configure</h2>
458
+ <ul>
459
+ <li><strong>Source locale</strong> — the language you author in.</li>
460
+ <li><strong>Locales</strong> — the languages you maintain (add / remove). See Keys and Locales.</li>
461
+ <li><strong>Outputs</strong> — the export targets: adapter + path template per entry. See Output Formats.</li>
462
+ <li><strong>AI</strong> — provider, model, endpoint, region, and batch size. See AI Providers.</li>
463
+ <li><strong>Formatting</strong> — indent, sort keys, final newline (controls how <code>glotfile.json</code> is written).</li>
464
+ <li><strong>Custom dictionary</strong> — words the spelling check should accept.</li>
465
+ </ul>
466
+ <h2>Save behaviour</h2>
467
+ <p>Most edits across the UI save immediately to <code>glotfile.json</code>. In Settings, some changes are explicit:</p>
468
+ <blockquote>
469
+ <p><strong>⚠ Dictionary changes require an explicit save</strong> — edits to the custom spelling dictionary are staged and only written when you <strong>Save</strong>, so you can add several words without a write (and a git diff) per keystroke.</p>
470
+ </blockquote>
471
+ <h2>Related</h2>
472
+ <ul>
473
+ <li>Configuration Reference · Output Formats · AI Providers · Checks and Validation</li>
474
+ </ul>
475
+ `,text:`Settings The Settings panel edits the block of . Every field here is also documented in the Configuration Reference. What you can configure - Source locale — the language you author in. - Locales — the languages you maintain (add / remove). See Keys and Locales. - Outputs — the export targets: adapter + path template per entry. See Output Formats. - AI — provider, model, endpoint, region, and batch size. See AI Providers. - Formatting — indent, sort keys, final newline (controls how is written). - Custom dictionary — words the spelling check should accept. Save behaviour Most edits across the UI save immediately to . In Settings, some changes are explicit: ⚠ Dictionary changes require an explicit save — edits to the custom spelling dictionary are staged and only written when you Save , so you can add several words without a write (and a git diff) per keystroke. Related - Configuration Reference · Output Formats · AI Providers · Checks and Validation`},{id:`web-ui/web-ui-overview`,title:`Web UI Overview`,section:`Web UI`,html:`<h1>Web UI Overview</h1>
476
+ <p><code>glotfile serve</code> (or just <code>glotfile</code>) opens a single-page app for managing your catalog. It runs locally, bound to <code>127.0.0.1</code>, and writes changes straight back to <code>glotfile.json</code>.</p>
477
+ <h2>The panels</h2>
478
+ <p>A nav rail switches between six panels:</p>
479
+ <table>
480
+ <thead>
481
+ <tr>
482
+ <th>Panel</th>
483
+ <th>What it&#39;s for</th>
484
+ </tr>
485
+ </thead>
486
+ <tbody><tr>
487
+ <td>Editor</td>
488
+ <td>The heart of the app — a searchable, filterable table of every key with the source and each translation side by side.</td>
489
+ </tr>
490
+ <tr>
491
+ <td>Analytics</td>
492
+ <td>Coverage and review progress per locale, namespace, and tag.</td>
493
+ </tr>
494
+ <tr>
495
+ <td>Screenshots</td>
496
+ <td>Attach and review images that give the AI visual context.</td>
497
+ </tr>
498
+ <tr>
499
+ <td><strong>Glossary</strong></td>
500
+ <td>Manage do-not-translate and forced terms — see Glossary.</td>
501
+ </tr>
502
+ <tr>
503
+ <td>Settings</td>
504
+ <td>Edit the <code>config</code> block: locales, outputs, AI provider, formatting, dictionary.</td>
505
+ </tr>
506
+ <tr>
507
+ <td>AI Log</td>
508
+ <td>A record of recent translation runs (egress only).</td>
509
+ </tr>
510
+ </tbody></table>
511
+ <h2>Cross-cutting features</h2>
512
+ <ul>
513
+ <li><strong>Checks</strong> — the UI continuously surfaces issues (missing values, placeholder mismatches, length and glossary violations) so you can fix them as you go.</li>
514
+ <li><strong>Export preview</strong> — before writing files, preview exactly what <code>glotfile export</code> will produce. See Output Formats.</li>
515
+ <li><strong>Save semantics</strong> — most edits save immediately to <code>glotfile.json</code>. A few settings (notably dictionary changes) require an explicit <strong>Save</strong> — see Settings.</li>
516
+ </ul>
517
+ <h2>Privacy</h2>
518
+ <p>Nothing leaves your machine except the AI calls you choose to make. The UI is local; the AI Log never stores your API keys or screenshot bytes.</p>
519
+ <h2>Related</h2>
520
+ <ul>
521
+ <li>CLI Overview — the same operations without the browser</li>
522
+ <li>Quick Start — a guided first run</li>
523
+ </ul>
524
+ `,text:`Web UI Overview (or just ) opens a single-page app for managing your catalog. It runs locally, bound to , and writes changes straight back to . The panels A nav rail switches between six panels: Panel What it's for --- --- Editor The heart of the app — a searchable, filterable table of every key with the source and each translation side by side. Analytics Coverage and review progress per locale, namespace, and tag. Screenshots Attach and review images that give the AI visual context. Glossary Manage do-not-translate and forced terms — see Glossary. Settings Edit the block: locales, outputs, AI provider, formatting, dictionary. AI Log A record of recent translation runs (egress only). Cross-cutting features - Checks — the UI continuously surfaces issues (missing values, placeholder mismatches, length and glossary violations) so you can fix them as you go. - Export preview — before writing files, preview exactly what will produce. See Output Formats. - Save semantics — most edits save immediately to . A few settings (notably dictionary changes) require an explicit Save — see Settings. Privacy Nothing leaves your machine except the AI calls you choose to make. The UI is local; the AI Log never stores your API keys or screenshot bytes. Related - CLI Overview — the same operations without the browser - Quick Start — a guided first run`},{id:`cli/build-context`,title:"`glotfile build-context`",section:`CLI`,html:`<h1><code>glotfile build-context</code></h1>
525
+ <p>AI-generates a short <strong>context</strong> note for each key — what it&#39;s for, where it appears — by reading the code snippets around its usages. Better context produces better translations. Requires a prior <code>glotfile scan</code> so the usage index exists.</p>
526
+ <pre><code class="language-bash">glotfile scan
527
+ glotfile build-context
528
+ </code></pre>
529
+ <p>By default it only fills keys that have <strong>no</strong> context yet. The flags combine to narrow the run.</p>
530
+ <h2>Options</h2>
531
+ <table>
532
+ <thead>
533
+ <tr>
534
+ <th>Option</th>
535
+ <th>Description</th>
536
+ </tr>
537
+ </thead>
538
+ <tbody><tr>
539
+ <td><code>--all</code></td>
540
+ <td>(Re)build context for every key, not just those missing it.</td>
541
+ </tr>
542
+ <tr>
543
+ <td><code>--key &lt;glob&gt;</code></td>
544
+ <td>Only keys matching this glob (e.g. <code>&quot;auth.*&quot;</code>).</td>
545
+ </tr>
546
+ <tr>
547
+ <td><code>--limit &lt;n&gt;</code></td>
548
+ <td>Process at most <code>n</code> keys.</td>
549
+ </tr>
550
+ <tr>
551
+ <td><code>--since &lt;date&gt;</code></td>
552
+ <td>Only keys added or changed since this date.</td>
553
+ </tr>
554
+ <tr>
555
+ <td><code>--file</code>, <code>-f &lt;path&gt;</code></td>
556
+ <td>Target a different state file.</td>
557
+ </tr>
558
+ </tbody></table>
559
+ <p>It uses the same AI provider as <code>translate</code> (configured per-machine — see AI Providers). If no usage index is found it stops and tells you to run <code>scan</code> first.</p>
560
+ <h2>Related</h2>
561
+ <ul>
562
+ <li>scan · translate · Key Context and Metadata · AI Providers</li>
563
+ </ul>
564
+ `,text:`AI-generates a short context note for each key — what it's for, where it appears — by reading the code snippets around its usages. Better context produces better translations. Requires a prior so the usage index exists. By default it only fills keys that have no context yet. The flags combine to narrow the run. Options Option Description --- --- (Re)build context for every key, not just those missing it. Only keys matching this glob (e.g. ). Process at most keys. Only keys added or changed since this date. , Target a different state file. It uses the same AI provider as (configured per-machine — see AI Providers). If no usage index is found it stops and tells you to run first. Related - scan · translate · Key Context and Metadata · AI Providers`},{id:`cli/cli-overview`,title:`CLI Overview`,section:`CLI`,html:`<h1>CLI Overview</h1>
565
+ <p>Run <code>glotfile &lt;command&gt;</code> (or <code>node bin/glotfile.js &lt;command&gt;</code> from a checkout — see Installation).</p>
566
+ <table>
567
+ <thead>
568
+ <tr>
569
+ <th>Command</th>
570
+ <th>What it does</th>
571
+ </tr>
572
+ </thead>
573
+ <tbody><tr>
574
+ <td>serve (default)</td>
575
+ <td>Start the local web UI and open the browser.</td>
576
+ </tr>
577
+ <tr>
578
+ <td>translate</td>
579
+ <td>AI-translate strings, writing results back to <code>glotfile.json</code>.</td>
580
+ </tr>
581
+ <tr>
582
+ <td>export</td>
583
+ <td>Write the locale files for every configured output.</td>
584
+ </tr>
585
+ <tr>
586
+ <td>lint</td>
587
+ <td>Report translation problems (states, placeholders, glossary, spelling…).</td>
588
+ </tr>
589
+ <tr>
590
+ <td>check</td>
591
+ <td>CI gate: lint <strong>and</strong> verify exported files are up to date.</td>
592
+ </tr>
593
+ <tr>
594
+ <td>import</td>
595
+ <td>Create <code>glotfile.json</code> from existing locale files.</td>
596
+ </tr>
597
+ <tr>
598
+ <td>build-context</td>
599
+ <td>AI-generate per-key context to improve translation (needs a prior scan).</td>
600
+ </tr>
601
+ <tr>
602
+ <td>scan</td>
603
+ <td>Index code references to keys (writes <code>.glotfile/usage.json</code>).</td>
604
+ </tr>
605
+ <tr>
606
+ <td>prune</td>
607
+ <td>Remove empty-source or unused keys (dry-run unless <code>--write</code>).</td>
608
+ </tr>
609
+ <tr>
610
+ <td>split</td>
611
+ <td>Convert <code>glotfile.json</code> into a reviewable <code>glotfile/</code> directory.</td>
612
+ </tr>
613
+ <tr>
614
+ <td>skill</td>
615
+ <td>Install the Claude Code skill for managing glotfile.</td>
616
+ </tr>
617
+ </tbody></table>
618
+ <p>Running <code>glotfile</code> with no command is the same as <code>glotfile serve</code>. Run <code>glotfile &lt;command&gt; --help</code> for a command&#39;s options.</p>
619
+ <h2>Global option</h2>
620
+ <p>Every command accepts <code>--file</code> (<code>-f</code>) to target a state file other than <code>./glotfile.json</code>:</p>
621
+ <pre><code class="language-bash">glotfile translate --file packages/app/glotfile.json
622
+ glotfile export -f ./i18n/glotfile.json
623
+ </code></pre>
624
+ <h2>Exit codes</h2>
625
+ <ul>
626
+ <li><code>serve</code>, <code>translate</code>, <code>export</code> exit <code>0</code> on success.</li>
627
+ <li><code>lint</code> exits <code>1</code> when there are errors (or warnings over <code>--max-warnings</code>).</li>
628
+ <li><code>check</code> exits <code>1</code> when there are any errors (including out-of-date exports).</li>
629
+ </ul>
630
+ <p>This is what makes <code>lint</code> and <code>check</code> usable as CI gates — see Continuous Integration.</p>
631
+ <h2>Credentials</h2>
632
+ <p>Only translate needs network access or credentials. Glotfile reads them from the environment, including a local <code>.env</code> file in the project directory. See AI Providers.</p>
633
+ <h2>Related</h2>
634
+ <ul>
635
+ <li>Web UI Overview — the same operations in the browser</li>
636
+ <li>Configuration Reference</li>
637
+ </ul>
638
+ `,text:`CLI Overview Run (or from a checkout — see Installation). Command What it does --- --- serve (default) Start the local web UI and open the browser. translate AI-translate strings, writing results back to . export Write the locale files for every configured output. lint Report translation problems (states, placeholders, glossary, spelling…). check CI gate: lint and verify exported files are up to date. import Create from existing locale files. build-context AI-generate per-key context to improve translation (needs a prior scan). scan Index code references to keys (writes ). prune Remove empty-source or unused keys (dry-run unless ). split Convert into a reviewable directory. skill Install the Claude Code skill for managing glotfile. Running with no command is the same as . Run for a command's options. Global option Every command accepts ( ) to target a state file other than : Exit codes - , , exit on success. - exits when there are errors (or warnings over ). - exits when there are any errors (including out-of-date exports). This is what makes and usable as CI gates — see Continuous Integration. Credentials Only translate needs network access or credentials. Glotfile reads them from the environment, including a local file in the project directory. See AI Providers. Related - Web UI Overview — the same operations in the browser - Configuration Reference`},{id:`cli/export`,title:"`glotfile export`",section:`CLI`,html:`<h1><code>glotfile export</code></h1>
639
+ <p>Writes the locale files for every output configured in <code>config.outputs</code>, using the adapters you&#39;ve set up.</p>
640
+ <pre><code class="language-bash">glotfile export
641
+ </code></pre>
642
+ <pre><code>Exported 8 file(s).
643
+ </code></pre>
644
+ <h2>Options</h2>
645
+ <table>
646
+ <thead>
647
+ <tr>
648
+ <th>Option</th>
649
+ <th>Description</th>
650
+ </tr>
651
+ </thead>
652
+ <tbody><tr>
653
+ <td><code>--adapter &lt;name&gt;</code></td>
654
+ <td>Export only the outputs using this adapter.</td>
655
+ </tr>
656
+ <tr>
657
+ <td><code>--watch</code></td>
658
+ <td>Re-export whenever the state file changes (stays running).</td>
659
+ </tr>
660
+ <tr>
661
+ <td><code>--file</code>, <code>-f &lt;path&gt;</code></td>
662
+ <td>Target a different state file.</td>
663
+ </tr>
664
+ </tbody></table>
665
+ <pre><code class="language-bash">glotfile export --adapter laravel-php # just the Laravel files
666
+ glotfile export --watch # re-export on every change
667
+ </code></pre>
668
+ <h2>Warnings</h2>
669
+ <p>Where a conversion would be lossy (a construct a target format can&#39;t represent), export prints a <strong>warning</strong> and writes the best safe output rather than corrupting the file:</p>
670
+ <pre><code>warning [icu-unsupported] cart.items @ de: plural select not representable; wrote fallback
671
+ </code></pre>
672
+ <p>See Placeholders and ICU.</p>
673
+ <h2>Zero-diff guarantee</h2>
674
+ <p>Because <code>glotfile.json</code> is written deterministically, re-running <code>export</code> with no real changes produces a <strong>zero-line diff</strong>. That makes it safe to run in CI to confirm your locale files are up to date:</p>
675
+ <pre><code class="language-bash">glotfile export
676
+ git diff --exit-code # non-zero if exports drifted
677
+ </code></pre>
678
+ <blockquote>
679
+ <p><strong>Tip:</strong> Prefer <code>check</code> in CI — <code>glotfile check</code> re-exports in memory and fails if any output file is missing or stale — no <code>git diff</code> dance required. See Continuous Integration.</p>
680
+ </blockquote>
681
+ <h2>Related</h2>
682
+ <ul>
683
+ <li>Output Formats · Placeholders and ICU · lint and check · Continuous Integration</li>
684
+ </ul>
685
+ `,text:`Writes the locale files for every output configured in , using the adapters you've set up. Options Option Description --- --- Export only the outputs using this adapter. Re-export whenever the state file changes (stays running). , Target a different state file. Warnings Where a conversion would be lossy (a construct a target format can't represent), export prints a warning and writes the best safe output rather than corrupting the file: See Placeholders and ICU. Zero-diff guarantee Because is written deterministically, re-running with no real changes produces a zero-line diff . That makes it safe to run in CI to confirm your locale files are up to date: Tip: Prefer in CI — re-exports in memory and fails if any output file is missing or stale — no dance required. See Continuous Integration. Related - Output Formats · Placeholders and ICU · lint and check · Continuous Integration`},{id:`cli/import`,title:"`glotfile import`",section:`CLI`,html:`<h1><code>glotfile import</code></h1>
686
+ <p>The inverse of <code>glotfile export</code>: it reads your <strong>existing</strong> locale files and ingests them <em>into</em> a new <code>glotfile.json</code>, so you can onboard a project that already has translations without re-keying everything by hand.</p>
687
+ <pre><code class="language-bash">glotfile import --format laravel-php --source lang/
688
+ </code></pre>
689
+ <p>Glotfile parses each file with the chosen adapter, flattens the keys, and assembles a catalog. Existing translations land as <code>reviewed</code> (not raw machine output) and the source-locale strings as <code>source</code> — ready for review in the Editor.</p>
690
+ <p>Every export adapter can also be imported: <code>laravel-php</code>, <code>vue-i18n-json</code>, <code>flutter-arb</code>, <code>apple-strings</code>, <code>apple-stringsdict</code>, <code>angular-xliff</code>, <code>gettext-po</code>, <code>i18next-json</code>, and <code>rails-yaml</code>. Run <code>glotfile import</code> with no <code>--format</code> to auto-detect the layout.</p>
691
+ <p>Two auto-detection notes:</p>
692
+ <ul>
693
+ <li><strong>iOS projects with both tables</strong>: a project holding <code>Localizable.strings</code> <em>and</em> <code>Localizable.stringsdict</code> auto-detects as <code>apple-strings</code> (the scalar table). Importing the <code>.stringsdict</code> plurals requires an explicit <code>--format apple-stringsdict</code> — and produces its own catalog, so merging both into one state file is currently a manual step.</li>
694
+ <li><strong>i18next flat files</strong>: only the per-locale-directory layout (<code>public/locales/&lt;lng&gt;/&lt;ns&gt;.json</code>) auto-detects as i18next; flat <code>&lt;lng&gt;.json</code> files are indistinguishable from vue-i18n and need an explicit <code>--format i18next-json</code>.</li>
695
+ </ul>
696
+ <h2>Options</h2>
697
+ <table>
698
+ <thead>
699
+ <tr>
700
+ <th>Option</th>
701
+ <th>Description</th>
702
+ </tr>
703
+ </thead>
704
+ <tbody><tr>
705
+ <td><code>--format &lt;name&gt;</code></td>
706
+ <td>Source layout adapter to read (e.g. <code>laravel-php</code>, <code>flutter-arb</code>). Omit to auto-detect.</td>
707
+ </tr>
708
+ <tr>
709
+ <td><code>--source &lt;dir&gt;</code></td>
710
+ <td>Directory to import from. Defaults to the state file&#39;s directory.</td>
711
+ </tr>
712
+ <tr>
713
+ <td><code>--source-locale &lt;code&gt;</code></td>
714
+ <td>Which locale to treat as the source language.</td>
715
+ </tr>
716
+ <tr>
717
+ <td><code>--locales &lt;list&gt;</code></td>
718
+ <td>Comma-separated locales to import (default: every locale found).</td>
719
+ </tr>
720
+ <tr>
721
+ <td><code>--cldr</code></td>
722
+ <td>Expand CLDR plural forms into glotfile plurals.</td>
723
+ </tr>
724
+ <tr>
725
+ <td><code>--force</code></td>
726
+ <td>Overwrite an existing <code>glotfile.json</code>.</td>
727
+ </tr>
728
+ <tr>
729
+ <td><code>--file</code>, <code>-f &lt;path&gt;</code></td>
730
+ <td>Write the catalog to a different state-file path.</td>
731
+ </tr>
732
+ </tbody></table>
733
+ <pre><code class="language-bash">glotfile import --format flutter-arb --source lib/l10n --source-locale en
734
+ glotfile import --format angular-xliff --source src/locale
735
+ </code></pre>
736
+ <h2>Angular XLIFF</h2>
737
+ <p>For <code>angular-xliff</code> the source flow is inverted: <code>ng extract-i18n</code> owns <code>messages.xlf</code> (the source catalog; the locale comes from its <code>source-language</code> attribute), and translations live in <code>messages.&lt;locale&gt;.xlf</code>. Import reads both; the generated output config sets <code>skipSourceLocale</code>, so <code>glotfile export</code> writes only the translation files and never touches <code>messages.xlf</code>. Inline <code>&lt;x/&gt;</code> placeholders become <code>{NAME}</code> tokens with their <code>ctype</code>/<code>equiv-text</code> kept as placeholder metadata, and export reproduces the original elements. Untranslated targets export as the source text marked <code>state=&quot;new&quot;</code>; import ignores <code>state=&quot;new&quot;</code> targets, so an extract → import → translate → export loop never mistakes fallback text for a real translation.</p>
738
+ <h2>Round-trip safety</h2>
739
+ <p>Import records the <code>localeCase</code> and <code>localeMap</code> it inferred from the filenames it found, so a subsequent <code>glotfile export</code> reproduces byte-identical files. Round-trip tests assert <code>import(export(x))</code> fidelity. See Output Formats.</p>
740
+ <h2>Related</h2>
741
+ <ul>
742
+ <li>export · Output Formats · Installation</li>
743
+ </ul>
744
+ `,text:`The inverse of : it reads your existing locale files and ingests them into a new , so you can onboard a project that already has translations without re-keying everything by hand. Glotfile parses each file with the chosen adapter, flattens the keys, and assembles a catalog. Existing translations land as (not raw machine output) and the source-locale strings as — ready for review in the Editor. Every export adapter can also be imported: , , , , , , , , and . Run with no to auto-detect the layout. Two auto-detection notes: - iOS projects with both tables : a project holding and auto-detects as (the scalar table). Importing the plurals requires an explicit — and produces its own catalog, so merging both into one state file is currently a manual step. - i18next flat files : only the per-locale-directory layout ( ) auto-detects as i18next; flat files are indistinguishable from vue-i18n and need an explicit . Options Option Description --- --- Source layout adapter to read (e.g. , ). Omit to auto-detect. Directory to import from. Defaults to the state file's directory. Which locale to treat as the source language. Comma-separated locales to import (default: every locale found). Expand CLDR plural forms into glotfile plurals. Overwrite an existing . , Write the catalog to a different state-file path. Angular XLIFF For the source flow is inverted: owns (the source catalog; the locale comes from its attribute), and translations live in . Import reads both; the generated output config sets , so writes only the translation files and never touches . Inline placeholders become tokens with their / kept as placeholder metadata, and export reproduces the original elements. Untranslated targets export as the source text marked ; import ignores targets, so an extract → import → translate → export loop never mistakes fallback text for a real translation. Round-trip safety Import records the and it inferred from the filenames it found, so a subsequent reproduces byte-identical files. Round-trip tests assert fidelity. See Output Formats. Related - export · Output Formats · Installation`},{id:`cli/lint-and-check`,title:"`glotfile lint` and `glotfile check`",section:`CLI`,html:`<h1><code>glotfile lint</code> and <code>glotfile check</code></h1>
745
+ <p>Two related commands for finding translation problems. Both are designed to run in CI.</p>
746
+ <ul>
747
+ <li><strong><code>lint</code></strong> runs the rule engine against your catalog.</li>
748
+ <li><strong><code>check</code></strong> runs the same rules <strong>and</strong> verifies that your exported locale files are up to date. It&#39;s the all-in-one CI gate.</li>
749
+ </ul>
750
+ <h2><code>glotfile lint</code></h2>
751
+ <pre><code class="language-bash">glotfile lint
752
+ </code></pre>
753
+ <pre><code>auth.signIn.button
754
+ error placeholder-mismatch de placeholders differ from the source
755
+ warn max-length fr length 28 exceeds maxLength 20
756
+
757
+ ✖ 1 error(s), 1 warning(s)
758
+ </code></pre>
759
+ <p>Exits <code>1</code> if there are any <strong>errors</strong>, or if warnings exceed <code>--max-warnings</code>.</p>
760
+ <h3>Options</h3>
761
+ <table>
762
+ <thead>
763
+ <tr>
764
+ <th>Option</th>
765
+ <th>Description</th>
766
+ </tr>
767
+ </thead>
768
+ <tbody><tr>
769
+ <td><code>--format &lt;fmt&gt;</code></td>
770
+ <td>Output format: <code>text</code> (default), <code>json</code>, or <code>sarif</code>.</td>
771
+ </tr>
772
+ <tr>
773
+ <td><code>--rule &lt;list&gt;</code></td>
774
+ <td>Run only these rule ids, comma-separated.</td>
775
+ </tr>
776
+ <tr>
777
+ <td><code>--locale &lt;list&gt;</code></td>
778
+ <td>Restrict to these locales.</td>
779
+ </tr>
780
+ <tr>
781
+ <td><code>--max-warnings &lt;n&gt;</code></td>
782
+ <td>Exit <code>1</code> if warnings exceed <code>n</code> (errors always fail).</td>
783
+ </tr>
784
+ <tr>
785
+ <td><code>--include-suppressed</code></td>
786
+ <td>Also print findings hidden by suppressions, marked <code>(suppressed)</code>.</td>
787
+ </tr>
788
+ <tr>
789
+ <td><code>--accept</code></td>
790
+ <td>Suppress every current <strong>warning</strong> (narrow with <code>--rule</code>/<code>--locale</code>) and write the state file.</td>
791
+ </tr>
792
+ <tr>
793
+ <td><code>--file</code>, <code>-f &lt;path&gt;</code></td>
794
+ <td>Target a different state file.</td>
795
+ </tr>
796
+ </tbody></table>
797
+ <pre><code class="language-bash">glotfile lint --rule placeholder-mismatch,icu-mismatch
798
+ glotfile lint --max-warnings 0 # treat all warnings as failures
799
+ glotfile lint --format sarif &gt; glotfile.sarif
800
+ </code></pre>
801
+ <h3>Suppressions and <code>--accept</code></h3>
802
+ <p>A finding dismissed in the UI (or accepted here) is suppressed for that key + locale <strong>until the key&#39;s source text changes</strong>, then it resurfaces automatically. Adopting glotfile on a project with a noisy backlog:</p>
803
+ <pre><code class="language-bash">glotfile lint --accept --rule identical-to-source # accept the current ones
804
+ glotfile lint --include-suppressed # audit what&#39;s hidden
805
+ </code></pre>
806
+ <p><code>--accept</code> never suppresses errors, and suppressions are committed with the state file so the whole team (and CI) agrees.</p>
807
+ <blockquote>
808
+ <p><strong>Info:</strong> SARIF for code scanning — <code>--format sarif</code> emits SARIF 2.1.0 with each finding located at its line in <code>glotfile.json</code>. Upload it to GitHub code scanning to see findings inline on the PR. See Continuous Integration.</p>
809
+ </blockquote>
810
+ <h2><code>glotfile check</code></h2>
811
+ <pre><code class="language-bash">glotfile check
812
+ </code></pre>
813
+ <p><code>check</code> does everything <code>lint</code> does, <strong>plus</strong> re-exports every output in memory and compares it to what&#39;s on disk. A missing or out-of-date file is reported as an <code>output-stale</code> <strong>error</strong>:</p>
814
+ <pre><code>lib/l10n/app_fr.arb
815
+ error output-stale output file is out of date; run \`glotfile export\`
816
+ </code></pre>
817
+ <p>It exits <code>1</code> on any error (a lint error <em>or</em> a stale export), and accepts <code>--format</code> like <code>lint</code>. If <code>glotfile.json</code> itself can&#39;t be parsed, <code>check</code> reports a single <code>load-error</code> and exits <code>1</code>.</p>
818
+ <blockquote>
819
+ <p><strong>Tip:</strong> Use <code>check</code> as your one CI step — it catches both &quot;the catalog has problems&quot; and &quot;someone forgot to run <code>glotfile export</code>&quot; in a single command.</p>
820
+ </blockquote>
821
+ <h2>Configuring rules</h2>
822
+ <p>Rule severities, ignored keys, and dictionaries are set in <code>config.lint</code>. See Checks and Validation and Configuration Reference.</p>
823
+ <h2>Related</h2>
824
+ <ul>
825
+ <li>Checks and Validation · Continuous Integration · export · Configuration Reference</li>
826
+ </ul>
827
+ `,text:`and Two related commands for finding translation problems. Both are designed to run in CI. - runs the rule engine against your catalog. - runs the same rules and verifies that your exported locale files are up to date. It's the all-in-one CI gate. Exits if there are any errors , or if warnings exceed . Options Option Description --- --- Output format: (default), , or . Run only these rule ids, comma-separated. Restrict to these locales. Exit if warnings exceed (errors always fail). Also print findings hidden by suppressions, marked . Suppress every current warning (narrow with / ) and write the state file. , Target a different state file. Suppressions and A finding dismissed in the UI (or accepted here) is suppressed for that key + locale until the key's source text changes , then it resurfaces automatically. Adopting glotfile on a project with a noisy backlog: never suppresses errors, and suppressions are committed with the state file so the whole team (and CI) agrees. Info: SARIF for code scanning — emits SARIF 2.1.0 with each finding located at its line in . Upload it to GitHub code scanning to see findings inline on the PR. See Continuous Integration. does everything does, plus re-exports every output in memory and compares it to what's on disk. A missing or out-of-date file is reported as an error : It exits on any error (a lint error or a stale export), and accepts like . If itself can't be parsed, reports a single and exits . Tip: Use as your one CI step — it catches both "the catalog has problems" and "someone forgot to run " in a single command. Configuring rules Rule severities, ignored keys, and dictionaries are set in . See Checks and Validation and Configuration Reference. Related - Checks and Validation · Continuous Integration · export · Configuration Reference`},{id:`cli/prune`,title:"`glotfile prune`",section:`CLI`,html:`<h1><code>glotfile prune</code></h1>
828
+ <p>Removes keys you no longer need. It&#39;s a <strong>dry-run by default</strong> — it lists what it would remove and changes nothing until you pass <code>--write</code>.</p>
829
+ <pre><code class="language-bash">glotfile prune --unused # list keys with no code reference
830
+ glotfile prune --unused --write # actually remove them
831
+ </code></pre>
832
+ <h2>Options</h2>
833
+ <table>
834
+ <thead>
835
+ <tr>
836
+ <th>Option</th>
837
+ <th>Description</th>
838
+ </tr>
839
+ </thead>
840
+ <tbody><tr>
841
+ <td><code>--empty-source</code></td>
842
+ <td>Select keys whose source value is empty.</td>
843
+ </tr>
844
+ <tr>
845
+ <td><code>--unused</code></td>
846
+ <td>Select keys with no code reference (runs a scan first).</td>
847
+ </tr>
848
+ <tr>
849
+ <td><code>--write</code></td>
850
+ <td>Remove the selected keys. Without it, prune only lists them.</td>
851
+ </tr>
852
+ <tr>
853
+ <td><code>--file</code>, <code>-f &lt;path&gt;</code></td>
854
+ <td>Target a different state file.</td>
855
+ </tr>
856
+ </tbody></table>
857
+ <p>Pick exactly one of <code>--empty-source</code> or <code>--unused</code>. The <code>--unused</code> selector runs a fresh scan, so its accuracy depends on your <code>config.scan</code> settings — review the dry-run list before writing.</p>
858
+ <p>Keys matching a <code>config.scan.keep</code> glob are never selected by <code>--unused</code> — use it for keys consumed by code the scan can&#39;t see (framework internals, vendored packages). See Scan.</p>
859
+ <h2>Related</h2>
860
+ <ul>
861
+ <li>scan · Keys and Locales · Configuration Reference</li>
862
+ </ul>
863
+ `,text:`Removes keys you no longer need. It's a dry-run by default — it lists what it would remove and changes nothing until you pass . Options Option Description --- --- Select keys whose source value is empty. Select keys with no code reference (runs a scan first). Remove the selected keys. Without it, prune only lists them. , Target a different state file. Pick exactly one of or . The selector runs a fresh scan, so its accuracy depends on your settings — review the dry-run list before writing. Keys matching a glob are never selected by — use it for keys consumed by code the scan can't see (framework internals, vendored packages). See Scan. Related - scan · Keys and Locales · Configuration Reference`},{id:`cli/scan`,title:"`glotfile scan`",section:`CLI`,html:`<h1><code>glotfile scan</code></h1>
864
+ <p>Scans your codebase for places each translation key is used, and writes the result to <code>.glotfile/usage.json</code> (gitignored). This usage index powers the <strong>unused-keys</strong> pruning, the per-key context builder, and the usage tree in the web UI.</p>
865
+ <pre><code class="language-bash">glotfile scan
866
+ </code></pre>
867
+ <pre><code>Scanned 214 file(s), found 1,038 reference(s).
868
+ </code></pre>
869
+ <h2>What it scans</h2>
870
+ <p>The scan walks the project and matches key references. Tune it with the <code>config.scan</code> block — <code>include</code>/<code>exclude</code> globs, extra Flutter accessor names, and custom capture-group regexes. See Configuration Reference.</p>
871
+ <h2>Dynamically-built keys</h2>
872
+ <p>Keys don&#39;t have to sit inside a <code>t()</code>/<code>__()</code> call to be found. Two extra signals count as (lower-confidence) usage:</p>
873
+ <ul>
874
+ <li><strong>Dynamic prefixes</strong> — <code>__(&#39;errors.&#39; . $code)</code> marks every key under <code>errors.</code> as used.</li>
875
+ <li><strong>String literals</strong> — a key-shaped string anywhere in a scanned file matches the catalog even outside a call site: assigned in a ternary (<code>$key = $a ? &#39;sms/arrival.delivery&#39; : &#39;sms/arrival.message&#39;</code>), stored in an array, interpolated (<code>&quot;emails/export.subjects.{$type}&quot;</code> marks everything under <code>emails/export.subjects.</code>), or sprintf-built (<code>&#39;messages.%s.title&#39;</code> — <code>%s</code>/<code>%d</code> match one key segment). A literal also acts as a prefix at a segment boundary, covering <code>__($head . &#39;.title&#39;)</code> where <code>$head</code> holds the literal.</li>
876
+ </ul>
877
+ <p>These show in the key&#39;s usage panel as &quot;Possible usage&quot;, distinct from direct call-site references.</p>
878
+ <h2>Keys used by code the scan can&#39;t see</h2>
879
+ <p>Dependency directories (<code>vendor</code>, <code>node_modules</code>, …) are never scanned, so a key whose only call site lives in a package — or one consumed by the framework itself, like Laravel&#39;s <code>auth.throttle</code> or <code>validation.*</code> — would be reported as unused. List those keys (globs allowed) in <code>config.scan.keep</code> and they&#39;re always treated as used:</p>
880
+ <pre><code class="language-json">&quot;scan&quot;: { &quot;keep&quot;: [&quot;auth.throttle&quot;, &quot;validation.*&quot;, &quot;passwords.*&quot;, &quot;pagination.*&quot;] }
881
+ </code></pre>
882
+ <h2>Related</h2>
883
+ <ul>
884
+ <li>prune · build-context · Key Context and Metadata · Configuration Reference</li>
885
+ </ul>
886
+ `,text:`Scans your codebase for places each translation key is used, and writes the result to (gitignored). This usage index powers the unused-keys pruning, the per-key context builder, and the usage tree in the web UI. What it scans The scan walks the project and matches key references. Tune it with the block — / globs, extra Flutter accessor names, and custom capture-group regexes. See Configuration Reference. Dynamically-built keys Keys don't have to sit inside a / call to be found. Two extra signals count as (lower-confidence) usage: - Dynamic prefixes — marks every key under as used. - String literals — a key-shaped string anywhere in a scanned file matches the catalog even outside a call site: assigned in a ternary ( ), stored in an array, interpolated ( marks everything under ), or sprintf-built ( — / match one key segment). A literal also acts as a prefix at a segment boundary, covering where holds the literal. These show in the key's usage panel as "Possible usage", distinct from direct call-site references. Keys used by code the scan can't see Dependency directories ( , , …) are never scanned, so a key whose only call site lives in a package — or one consumed by the framework itself, like Laravel's or — would be reported as unused. List those keys (globs allowed) in and they're always treated as used: Related - prune · build-context · Key Context and Metadata · Configuration Reference`},{id:`cli/serve`,title:"`glotfile serve`",section:`CLI`,html:`<h1><code>glotfile serve</code></h1>
887
+ <p>Starts the local web UI and opens your browser. This is the <strong>default command</strong> — <code>glotfile</code> on its own does the same thing.</p>
888
+ <pre><code class="language-bash">glotfile
889
+ glotfile serve
890
+ </code></pre>
891
+ <p>It binds a server to <code>127.0.0.1</code>, prints the URL, and opens it. If there&#39;s no <code>glotfile.json</code> in the current directory, it starts from defaults and writes the file on your first edit.</p>
892
+ <h2>Options</h2>
893
+ <table>
894
+ <thead>
895
+ <tr>
896
+ <th>Option</th>
897
+ <th>Description</th>
898
+ </tr>
899
+ </thead>
900
+ <tbody><tr>
901
+ <td><code>--file</code>, <code>-f &lt;path&gt;</code></td>
902
+ <td>Use a state file other than <code>./glotfile.json</code>.</td>
903
+ </tr>
904
+ <tr>
905
+ <td><code>--dev</code></td>
906
+ <td>Developer mode for working on Glotfile itself (used by <code>npm run dev</code>).</td>
907
+ </tr>
908
+ </tbody></table>
909
+ <pre><code class="language-bash">glotfile serve --file packages/app/glotfile.json
910
+ </code></pre>
911
+ <blockquote>
912
+ <p><strong>Note:</strong> Local only — the server binds to <code>127.0.0.1</code> — it is not exposed to your network. Everything stays on your machine except the AI calls you trigger.</p>
913
+ </blockquote>
914
+ <h2>Related</h2>
915
+ <ul>
916
+ <li>Quick Start · Web UI Overview · Installation</li>
917
+ </ul>
918
+ `,text:`Starts the local web UI and opens your browser. This is the default command — on its own does the same thing. It binds a server to , prints the URL, and opens it. If there's no in the current directory, it starts from defaults and writes the file on your first edit. Options Option Description --- --- , Use a state file other than . Developer mode for working on Glotfile itself (used by ). Note: Local only — the server binds to — it is not exposed to your network. Everything stays on your machine except the AI calls you trigger. Related - Quick Start · Web UI Overview · Installation`},{id:`cli/skill`,title:"`glotfile skill`",section:`CLI`,html:`<h1><code>glotfile skill</code></h1>
919
+ <p>Installs the <strong>Claude Code skill</strong> for managing glotfile into <code>./.claude/skills/glotfile/</code>, so Claude Code knows how to drive glotfile in your project — translating, exporting, linting, and editing the catalog.</p>
920
+ <pre><code class="language-bash">glotfile skill
921
+ </code></pre>
922
+ <h2>Options</h2>
923
+ <table>
924
+ <thead>
925
+ <tr>
926
+ <th>Option</th>
927
+ <th>Description</th>
928
+ </tr>
929
+ </thead>
930
+ <tbody><tr>
931
+ <td><code>--print</code></td>
932
+ <td>Write <code>SKILL.md</code> to stdout instead of installing it.</td>
933
+ </tr>
934
+ <tr>
935
+ <td><code>--force</code></td>
936
+ <td>Overwrite an existing installed skill.</td>
937
+ </tr>
938
+ </tbody></table>
939
+ <p>Run it once per project. With the skill installed, you can ask Claude Code to manage translations directly and it will use the glotfile CLI for you.</p>
940
+ <h2>Related</h2>
941
+ <ul>
942
+ <li>CLI Overview · translate</li>
943
+ </ul>
944
+ `,text:`Installs the Claude Code skill for managing glotfile into , so Claude Code knows how to drive glotfile in your project — translating, exporting, linting, and editing the catalog. Options Option Description --- --- Write to stdout instead of installing it. Overwrite an existing installed skill. Run it once per project. With the skill installed, you can ask Claude Code to manage translations directly and it will use the glotfile CLI for you. Related - CLI Overview · translate`},{id:`cli/split`,title:"`glotfile split`",section:`CLI`,html:`<h1><code>glotfile split</code></h1>
945
+ <p>Converts a single <code>glotfile.json</code> into a <code>glotfile/</code> <strong>directory</strong> of smaller files — one per locale plus shared config and key metadata. For large catalogs this keeps <code>git diff</code> fast and reviewable: an AI run on French rewrites only <code>glotfile/locales/fr.json</code>.</p>
946
+ <pre><code class="language-bash">glotfile split
947
+ </code></pre>
948
+ <p>This is a one-time, deliberate operation that produces a clearly-labelled commit and sets <code>config.storage</code> to <code>&quot;split&quot;</code>. After splitting, the CLI, web UI, and every export adapter behave identically — only the on-disk layout changes. Load auto-detects the format, so nothing else needs configuring.</p>
949
+ <p>See The State File for the full directory layout and the trade-offs.</p>
950
+ <h2>Related</h2>
951
+ <ul>
952
+ <li>The State File · Configuration Reference</li>
953
+ </ul>
954
+ `,text:`Converts a single into a directory of smaller files — one per locale plus shared config and key metadata. For large catalogs this keeps fast and reviewable: an AI run on French rewrites only . This is a one-time, deliberate operation that produces a clearly-labelled commit and sets to . After splitting, the CLI, web UI, and every export adapter behave identically — only the on-disk layout changes. Load auto-detects the format, so nothing else needs configuring. See The State File for the full directory layout and the trade-offs. Related - The State File · Configuration Reference`},{id:`cli/translate`,title:"`glotfile translate`",section:`CLI`,html:`<h1><code>glotfile translate</code></h1>
955
+ <p>AI-translates strings and writes the results back to <code>glotfile.json</code> as <code>machine</code> state. It never overwrites a <code>reviewed</code> value.</p>
956
+ <pre><code class="language-bash">glotfile translate
957
+ </code></pre>
958
+ <p>With no flags, only <strong>empty</strong> values are filled — existing translations are left alone. Pass <code>--all</code> to re-translate every string. The flags below <strong>combine</strong> to narrow the run.</p>
959
+ <h2>Options</h2>
960
+ <table>
961
+ <thead>
962
+ <tr>
963
+ <th>Option</th>
964
+ <th>Description</th>
965
+ </tr>
966
+ </thead>
967
+ <tbody><tr>
968
+ <td><code>--all</code></td>
969
+ <td>Re-translate every string, not just empty values (still never overwrites <code>reviewed</code>).</td>
970
+ </tr>
971
+ <tr>
972
+ <td><code>--estimate</code></td>
973
+ <td>Print the batches, token counts and estimated cost without translating.</td>
974
+ </tr>
975
+ <tr>
976
+ <td><code>--locale &lt;list&gt;</code></td>
977
+ <td>Only these target languages, comma-separated (e.g. <code>fr,de</code>). Alias: <code>--locales</code>.</td>
978
+ </tr>
979
+ <tr>
980
+ <td><code>--key &lt;glob&gt;</code></td>
981
+ <td>Only keys matching a glob (e.g. <code>&quot;auth.*&quot;</code>).</td>
982
+ </tr>
983
+ <tr>
984
+ <td><code>--file</code>, <code>-f &lt;path&gt;</code></td>
985
+ <td>Target a different state file.</td>
986
+ </tr>
987
+ </tbody></table>
988
+ <pre><code class="language-bash">glotfile translate # fill the gaps (only empty values)
989
+ glotfile translate --all # redo every non-reviewed value
990
+ glotfile translate --locale fr,de # only French and German
991
+ glotfile translate --key &quot;auth.*&quot; # only the auth namespace
992
+ glotfile translate --all --locale fr --key &quot;checkout.*&quot;
993
+ glotfile translate --estimate # batches, tokens and cost — no API calls
994
+ </code></pre>
995
+ <h2>What it prints</h2>
996
+ <pre><code>Translating 34 string(s)…
997
+ Wrote 34 machine translation(s).
998
+ </code></pre>
999
+ <p>Rejected translations (a dropped placeholder, a busted length limit) are reported and <strong>skipped</strong>, not written:</p>
1000
+ <pre><code>skip checkout.total @ de: placeholder {amount} is missing
1001
+ </code></pre>
1002
+ <p>See How Translation Works for the validation rules and Placeholders and ICU for what&#39;s checked.</p>
1003
+ <h2>Credentials</h2>
1004
+ <p><code>translate</code> is the only command that needs network access. Configure the provider in Settings (stored per-machine), and put credentials in your environment (a local <code>.env</code> works). See AI Providers.</p>
1005
+ <blockquote>
1006
+ <p><strong>Info:</strong> Egress is logged — what&#39;s sent to the provider is recorded in the AI Log.</p>
1007
+ </blockquote>
1008
+ <h2>Related</h2>
1009
+ <ul>
1010
+ <li>How Translation Works · AI Providers · Review States</li>
1011
+ </ul>
1012
+ `,text:`AI-translates strings and writes the results back to as state. It never overwrites a value. With no flags, only empty values are filled — existing translations are left alone. Pass to re-translate every string. The flags below combine to narrow the run. Options Option Description --- --- Re-translate every string, not just empty values (still never overwrites ). Print the batches, token counts and estimated cost without translating. Only these target languages, comma-separated (e.g. ). Alias: . Only keys matching a glob (e.g. ). , Target a different state file. What it prints Rejected translations (a dropped placeholder, a busted length limit) are reported and skipped , not written: See How Translation Works for the validation rules and Placeholders and ICU for what's checked. Credentials is the only command that needs network access. Configure the provider in Settings (stored per-machine), and put credentials in your environment (a local works). See AI Providers. Info: Egress is logged — what's sent to the provider is recorded in the AI Log. Related - How Translation Works · AI Providers · Review States`},{id:`concepts/glossary`,title:`Glossary`,section:`Concepts`,html:`<h1>Glossary</h1>
1013
+ <p>The <strong>glossary</strong> is a list of terms that get special handling during AI translation and validation. It&#39;s stored at the top level of <code>glotfile.json</code> and edited in the Glossary panel.</p>
1014
+ <p>Use it for two things:</p>
1015
+ <ol>
1016
+ <li><strong>Do-not-translate terms</strong> — brand names, product names, code identifiers that must appear verbatim in every language.</li>
1017
+ <li><strong>Forced translations</strong> — a term that must always render a specific way in a given locale.</li>
1018
+ </ol>
1019
+ <h2>Entry shape</h2>
1020
+ <pre><code class="language-json">&quot;glossary&quot;: [
1021
+ { &quot;term&quot;: &quot;Glotfile&quot;, &quot;doNotTranslate&quot;: true, &quot;caseSensitive&quot;: true },
1022
+ {
1023
+ &quot;term&quot;: &quot;dashboard&quot;,
1024
+ &quot;translations&quot;: { &quot;fr&quot;: &quot;tableau de bord&quot;, &quot;de&quot;: &quot;Übersicht&quot; },
1025
+ &quot;notes&quot;: &quot;Always use the product term, not a literal translation.&quot;
1026
+ }
1027
+ ]
1028
+ </code></pre>
1029
+ <table>
1030
+ <thead>
1031
+ <tr>
1032
+ <th>Field</th>
1033
+ <th>Meaning</th>
1034
+ </tr>
1035
+ </thead>
1036
+ <tbody><tr>
1037
+ <td><code>term</code></td>
1038
+ <td>The source-language term to match.</td>
1039
+ </tr>
1040
+ <tr>
1041
+ <td><code>doNotTranslate</code></td>
1042
+ <td>Keep the term verbatim in every translation.</td>
1043
+ </tr>
1044
+ <tr>
1045
+ <td><code>caseSensitive</code></td>
1046
+ <td>Match the term case-sensitively.</td>
1047
+ </tr>
1048
+ <tr>
1049
+ <td><code>translations</code></td>
1050
+ <td>Forced output per locale (<code>{ locale: &quot;translation&quot; }</code>).</td>
1051
+ </tr>
1052
+ <tr>
1053
+ <td><code>notes</code></td>
1054
+ <td>Freeform guidance (also passed to the AI).</td>
1055
+ </tr>
1056
+ </tbody></table>
1057
+ <h2>How it&#39;s used</h2>
1058
+ <ul>
1059
+ <li><strong>During translation:</strong> relevant glossary terms for each string are injected into every AI request, so the model knows what to keep verbatim and what to render a fixed way. See How Translation Works.</li>
1060
+ <li><strong>During validation:</strong> the <code>glossary-violation</code> rule flags any translation that drops a do-not-translate term or doesn&#39;t use the forced translation. See Checks and Validation.</li>
1061
+ </ul>
1062
+ <blockquote>
1063
+ <p><strong>Tip:</strong> Only relevant terms are sent — Glotfile matches glossary terms against each source string and includes just the ones that appear — the AI isn&#39;t handed your entire glossary for every key.</p>
1064
+ </blockquote>
1065
+ <h2>Related</h2>
1066
+ <ul>
1067
+ <li>How Translation Works · Checks and Validation · Key Context and Metadata</li>
1068
+ </ul>
1069
+ `,text:`Glossary The glossary is a list of terms that get special handling during AI translation and validation. It's stored at the top level of and edited in the Glossary panel. Use it for two things: 1. Do-not-translate terms — brand names, product names, code identifiers that must appear verbatim in every language. 2. Forced translations — a term that must always render a specific way in a given locale. Entry shape Field Meaning --- --- The source-language term to match. Keep the term verbatim in every translation. Match the term case-sensitively. Forced output per locale ( ). Freeform guidance (also passed to the AI). How it's used - During translation: relevant glossary terms for each string are injected into every AI request, so the model knows what to keep verbatim and what to render a fixed way. See How Translation Works. - During validation: the rule flags any translation that drops a do-not-translate term or doesn't use the forced translation. See Checks and Validation. Tip: Only relevant terms are sent — Glotfile matches glossary terms against each source string and includes just the ones that appear — the AI isn't handed your entire glossary for every key. Related - How Translation Works · Checks and Validation · Key Context and Metadata`},{id:`concepts/key-context-and-metadata`,title:`Key Context and Metadata`,section:`Concepts`,html:`<h1>Key Context and Metadata</h1>
1070
+ <p>Beyond its values, each key can carry metadata that improves translation quality and helps reviewers. Edit it in the Editor&#39;s per-key detail panel.</p>
1071
+ <table>
1072
+ <thead>
1073
+ <tr>
1074
+ <th>Field</th>
1075
+ <th>What it&#39;s for</th>
1076
+ </tr>
1077
+ </thead>
1078
+ <tbody><tr>
1079
+ <td><strong>Context</strong></td>
1080
+ <td>A note for humans <em>and the AI</em> explaining where/how the string is used. The single highest-leverage field for good machine translation.</td>
1081
+ </tr>
1082
+ <tr>
1083
+ <td><strong>Notes</strong></td>
1084
+ <td>Timestamped freeform notes — a running comment thread on the key.</td>
1085
+ </tr>
1086
+ <tr>
1087
+ <td><strong>Tags</strong></td>
1088
+ <td>Labels for grouping and filtering (e.g. <code>auth</code>, <code>cta</code>, <code>email</code>). Analytics reports coverage per tag.</td>
1089
+ </tr>
1090
+ <tr>
1091
+ <td><strong>Max length</strong></td>
1092
+ <td>A character budget. AI translations that exceed it are rejected, and the <code>max-length</code> check flags any value over the limit.</td>
1093
+ </tr>
1094
+ <tr>
1095
+ <td><strong>Screenshot</strong></td>
1096
+ <td>An image showing where the string appears. Sent to vision-capable models for context. See Screenshots.</td>
1097
+ </tr>
1098
+ <tr>
1099
+ <td><strong>Skip translate</strong></td>
1100
+ <td>Marks a key to be excluded from translation runs (e.g. a code-like token that should never change).</td>
1101
+ </tr>
1102
+ </tbody></table>
1103
+ <h2>Why context matters most</h2>
1104
+ <p>Translators — human or AI — can&#39;t see your UI. A bare string like <code>&quot;Open&quot;</code> could be a verb (open a file) or an adjective (the store is open), and they translate differently. A one-line <strong>context</strong> removes the ambiguity:</p>
1105
+ <blockquote>
1106
+ <p><strong>Example:</strong> Key <code>store.status.open</code> → context: <em>&quot;Adjective. Shown on a badge when the shop is currently accepting orders.&quot;</em></p>
1107
+ </blockquote>
1108
+ <p>AI translation sends the context, the relevant Glossary terms, any max length, and the screenshot along with each string.</p>
1109
+ <h2>A note on <code>description</code></h2>
1110
+ <p>The state file also reserves a <code>description</code> field on keys. It is not yet editable in the UI — prefer <strong>context</strong> (which feeds the AI) and <strong>notes</strong> (for human discussion) today.</p>
1111
+ <h2>Related</h2>
1112
+ <ul>
1113
+ <li>Glossary · Screenshots · How Translation Works · Checks and Validation</li>
1114
+ </ul>
1115
+ `,text:`Key Context and Metadata Beyond its values, each key can carry metadata that improves translation quality and helps reviewers. Edit it in the Editor's per-key detail panel. Field What it's for --- --- Context A note for humans and the AI explaining where/how the string is used. The single highest-leverage field for good machine translation. Notes Timestamped freeform notes — a running comment thread on the key. Tags Labels for grouping and filtering (e.g. , , ). Analytics reports coverage per tag. Max length A character budget. AI translations that exceed it are rejected, and the check flags any value over the limit. Screenshot An image showing where the string appears. Sent to vision-capable models for context. See Screenshots. Skip translate Marks a key to be excluded from translation runs (e.g. a code-like token that should never change). Why context matters most Translators — human or AI — can't see your UI. A bare string like could be a verb (open a file) or an adjective (the store is open), and they translate differently. A one-line context removes the ambiguity: Example: Key → context: "Adjective. Shown on a badge when the shop is currently accepting orders." AI translation sends the context, the relevant Glossary terms, any max length, and the screenshot along with each string. A note on The state file also reserves a field on keys. It is not yet editable in the UI — prefer context (which feeds the AI) and notes (for human discussion) today. Related - Glossary · Screenshots · How Translation Works · Checks and Validation`},{id:`concepts/keys-and-locales`,title:`Keys and Locales`,section:`Concepts`,html:`<h1>Keys and Locales</h1>
1116
+ <h2>Keys</h2>
1117
+ <p>A <strong>key</strong> is a stable identifier for one piece of copy, written in <strong>dot notation</strong>:</p>
1118
+ <pre><code>auth.signIn.button
1119
+ auth.signIn.title
1120
+ settings.profile.heading
1121
+ </code></pre>
1122
+ <p>Keys live in a <strong>flat map</strong> in <code>glotfile.json</code> — the dots are just naming convention, not nesting. The first segment usually acts as a <strong>namespace</strong> (a feature, screen, or file group); some export adapters split files by it (Laravel writes <code>auth.*</code> keys into <code>auth.php</code>).</p>
1123
+ <p>Each key holds:</p>
1124
+ <ul>
1125
+ <li>A <strong>value per locale</strong> (or plural forms).</li>
1126
+ <li>A review state per locale.</li>
1127
+ <li>Optional metadata — context, notes, tags, a max length, a screenshot, and a skip-translation flag.</li>
1128
+ </ul>
1129
+ <p>Create, rename, and delete keys in the Editor.</p>
1130
+ <h2>Locales</h2>
1131
+ <p>A <strong>locale</strong> is a language you maintain, identified by a code like <code>en</code>, <code>fr</code>, <code>de</code>, or <code>pt-BR</code>. Two settings define them (Settings panel or config):</p>
1132
+ <ul>
1133
+ <li><strong><code>sourceLocale</code></strong> — the one language you author in. Its values have the <code>source</code> state and are the basis for every translation.</li>
1134
+ <li><strong><code>locales</code></strong> — the full list of languages you maintain, including the source.</li>
1135
+ </ul>
1136
+ <blockquote>
1137
+ <p><strong>⚠ The source locale must be in the list</strong> — <code>sourceLocale</code> must appear in <code>locales</code>, or the file fails validation.</p>
1138
+ </blockquote>
1139
+ <h3>Adding and removing</h3>
1140
+ <p>Manage locales in Settings. Adding a locale gives every key an empty slot for it (which shows up as <strong>missing</strong> until filled). Languages are shown with their flag and name in the UI.</p>
1141
+ <h2>Missing values</h2>
1142
+ <p>A locale value is <strong>missing</strong> when it has no content for a key. Missing values are:</p>
1143
+ <ul>
1144
+ <li>highlighted in the Editor (filter to <strong>missing</strong>),</li>
1145
+ <li>counted in Analytics,</li>
1146
+ <li>what <code>glotfile translate</code> fills by default (see translate),</li>
1147
+ <li>flagged by the <code>empty-translation</code> rule in Checks and Validation.</li>
1148
+ </ul>
1149
+ <h2>Related</h2>
1150
+ <ul>
1151
+ <li>Review States · Plurals · Key Context and Metadata · The State File</li>
1152
+ </ul>
1153
+ `,text:`Keys and Locales Keys A key is a stable identifier for one piece of copy, written in dot notation : Keys live in a flat map in — the dots are just naming convention, not nesting. The first segment usually acts as a namespace (a feature, screen, or file group); some export adapters split files by it (Laravel writes keys into ). Each key holds: - A value per locale (or plural forms). - A review state per locale. - Optional metadata — context, notes, tags, a max length, a screenshot, and a skip-translation flag. Create, rename, and delete keys in the Editor. Locales A locale is a language you maintain, identified by a code like , , , or . Two settings define them (Settings panel or config): - — the one language you author in. Its values have the state and are the basis for every translation. - — the full list of languages you maintain, including the source. ⚠ The source locale must be in the list — must appear in , or the file fails validation. Adding and removing Manage locales in Settings. Adding a locale gives every key an empty slot for it (which shows up as missing until filled). Languages are shown with their flag and name in the UI. Missing values A locale value is missing when it has no content for a key. Missing values are: - highlighted in the Editor (filter to missing ), - counted in Analytics, - what fills by default (see translate), - flagged by the rule in Checks and Validation. Related - Review States · Plurals · Key Context and Metadata · The State File`},{id:`concepts/plurals`,title:`Plurals`,section:`Concepts`,html:`<h1>Plurals</h1>
1154
+ <p>Some strings change shape with a count — &quot;1 file&quot; vs &quot;5 files&quot;. Glotfile models these as <strong>plural keys</strong> using the <a href="https://cldr.unicode.org/index/cldr-spec/plural-rules">CLDR plural categories</a>.</p>
1155
+ <h2>How a plural key differs</h2>
1156
+ <p>A normal key stores one <code>value</code> per locale. A <strong>plural key</strong> instead stores <strong><code>forms</code></strong> — one entry per category — and is marked with a <code>plural</code> field naming the <strong>count argument</strong>:</p>
1157
+ <pre><code class="language-json">&quot;cart.items&quot;: {
1158
+ &quot;plural&quot;: { &quot;arg&quot;: &quot;count&quot; },
1159
+ &quot;values&quot;: {
1160
+ &quot;en&quot;: {
1161
+ &quot;state&quot;: &quot;source&quot;,
1162
+ &quot;forms&quot;: { &quot;one&quot;: &quot;{count} item&quot;, &quot;other&quot;: &quot;{count} items&quot; }
1163
+ },
1164
+ &quot;pl&quot;: {
1165
+ &quot;state&quot;: &quot;reviewed&quot;,
1166
+ &quot;forms&quot;: {
1167
+ &quot;one&quot;: &quot;{count} przedmiot&quot;,
1168
+ &quot;few&quot;: &quot;{count} przedmioty&quot;,
1169
+ &quot;many&quot;: &quot;{count} przedmiotów&quot;,
1170
+ &quot;other&quot;: &quot;{count} przedmiotu&quot;
1171
+ }
1172
+ }
1173
+ }
1174
+ }
1175
+ </code></pre>
1176
+ <h2>Plural categories</h2>
1177
+ <p>The six CLDR categories are:</p>
1178
+ <p><code>zero</code> · <code>one</code> · <code>two</code> · <code>few</code> · <code>many</code> · <code>other</code></p>
1179
+ <blockquote>
1180
+ <p><strong>⚠ <code>other</code> is always required</strong> — every locale&#39;s plural value <strong>must</strong> include the <code>other</code> form — it&#39;s the fallback every language has. Which of the other categories apply depends on the language (English uses <code>one</code>/<code>other</code>; Polish uses <code>one</code>/<code>few</code>/<code>many</code>/<code>other</code>).</p>
1181
+ </blockquote>
1182
+ <h2>Editing plurals</h2>
1183
+ <p>In the Editor, a plural key shows a dedicated form editor with one field per category that the target language actually uses. AI translation fills every required category at once and validates the result.</p>
1184
+ <h2>Across export formats</h2>
1185
+ <p>Plural and ICU <code>select</code>/<code>plural</code> structure is preserved when exporting, and converted to each format&#39;s native plural mechanism where one exists. Where a target format can&#39;t represent a construct, <code>glotfile export</code> warns rather than producing broken output. See Output Formats and Placeholders and ICU.</p>
1186
+ <h2>Related</h2>
1187
+ <ul>
1188
+ <li>Placeholders and ICU · How Translation Works · Keys and Locales</li>
1189
+ </ul>
1190
+ `,text:`Plurals Some strings change shape with a count — "1 file" vs "5 files". Glotfile models these as plural keys using the CLDR plural categories. How a plural key differs A normal key stores one per locale. A plural key instead stores — one entry per category — and is marked with a field naming the count argument : Plural categories The six CLDR categories are: · · · · · ⚠ is always required — every locale's plural value must include the form — it's the fallback every language has. Which of the other categories apply depends on the language (English uses / ; Polish uses / / / ). Editing plurals In the Editor, a plural key shows a dedicated form editor with one field per category that the target language actually uses. AI translation fills every required category at once and validates the result. Across export formats Plural and ICU / structure is preserved when exporting, and converted to each format's native plural mechanism where one exists. Where a target format can't represent a construct, warns rather than producing broken output. See Output Formats and Placeholders and ICU. Related - Placeholders and ICU · How Translation Works · Keys and Locales`},{id:`concepts/review-states`,title:`Review States`,section:`Concepts`,html:`<h1>Review States</h1>
1191
+ <p>Every locale value carries a <strong>state</strong> that tracks where the translation is in its lifecycle. State is per <em>value</em>, not per key — <code>fr</code> can be <code>reviewed</code> while <code>de</code> is still <code>machine</code>.</p>
1192
+ <table>
1193
+ <thead>
1194
+ <tr>
1195
+ <th>State</th>
1196
+ <th>Meaning</th>
1197
+ </tr>
1198
+ </thead>
1199
+ <tbody><tr>
1200
+ <td><code>source</code></td>
1201
+ <td>The value in your source locale. It&#39;s what everything else is translated <em>from</em>.</td>
1202
+ </tr>
1203
+ <tr>
1204
+ <td><code>machine</code></td>
1205
+ <td>Produced by AI translation and <strong>not yet reviewed by a human</strong>.</td>
1206
+ </tr>
1207
+ <tr>
1208
+ <td><code>reviewed</code></td>
1209
+ <td>A human has checked and approved it. <strong>AI translation never overwrites a <code>reviewed</code> value.</strong></td>
1210
+ </tr>
1211
+ <tr>
1212
+ <td><code>needs-review</code></td>
1213
+ <td>Flagged for attention — typically because the source string changed after this translation was made (see Keeping Translations Fresh).</td>
1214
+ </tr>
1215
+ </tbody></table>
1216
+ <h2>The typical flow</h2>
1217
+ <pre><code>source ──translate──▶ machine ──approve──▶ reviewed
1218
+ ▲ │
1219
+ └── source changed ───┘
1220
+ (needs-review)
1221
+ </code></pre>
1222
+ <ol>
1223
+ <li>You author a string in the source locale → <code>source</code>.</li>
1224
+ <li>AI fills the other languages → <code>machine</code>.</li>
1225
+ <li>You review in the Editor and promote good ones → <code>reviewed</code>.</li>
1226
+ <li>If the source later changes, dependent translations are marked <code>needs-review</code> so they don&#39;t silently drift. See Keeping Translations Fresh.</li>
1227
+ </ol>
1228
+ <h2>Why <code>reviewed</code> is protected</h2>
1229
+ <p>Marking a value <code>reviewed</code> is a promise: a human owns this translation. Glotfile honours that promise — neither <code>glotfile translate</code> nor the UI&#39;s translate action will overwrite it. To re-translate a reviewed value, change it back first.</p>
1230
+ <h2>Filtering by state</h2>
1231
+ <p>In the Editor, filter by <strong>missing</strong>, <strong>machine</strong> (unreviewed), <strong>needs-review</strong>, or <strong>reviewed</strong>, plus a <strong>needs-attention</strong> facet for any key with an open issue. Analytics reports translated vs reviewed percentages per locale.</p>
1232
+ <h2>Related</h2>
1233
+ <ul>
1234
+ <li>How Translation Works · Keeping Translations Fresh</li>
1235
+ </ul>
1236
+ `,text:`Review States Every locale value carries a state that tracks where the translation is in its lifecycle. State is per value , not per key — can be while is still . State Meaning --- --- The value in your source locale. It's what everything else is translated from . Produced by AI translation and not yet reviewed by a human . A human has checked and approved it. AI translation never overwrites a value. Flagged for attention — typically because the source string changed after this translation was made (see Keeping Translations Fresh). The typical flow 1. You author a string in the source locale → . 2. AI fills the other languages → . 3. You review in the Editor and promote good ones → . 4. If the source later changes, dependent translations are marked so they don't silently drift. See Keeping Translations Fresh. Why is protected Marking a value is a promise: a human owns this translation. Glotfile honours that promise — neither nor the UI's translate action will overwrite it. To re-translate a reviewed value, change it back first. Filtering by state In the Editor, filter by missing , machine (unreviewed), needs-review , or reviewed , plus a needs-attention facet for any key with an open issue. Analytics reports translated vs reviewed percentages per locale. Related - How Translation Works · Keeping Translations Fresh`},{id:`concepts/the-state-file`,title:"The State File — `glotfile.json`",section:`Concepts`,html:`<h1>The State File — <code>glotfile.json</code></h1>
1237
+ <p>Everything Glotfile does is derived from one file at the root of your project: <strong><code>glotfile.json</code></strong>. It holds your configuration, your glossary, and every key with its translations. You commit it alongside your code, and versioning, review, and rollback all come from git.</p>
1238
+ <blockquote>
1239
+ <p><strong>Tip:</strong> You normally never edit this file by hand — the web UI writes it for you. The structure below is documented so you can read diffs and understand what&#39;s stored — not so you can hand-edit it.</p>
1240
+ </blockquote>
1241
+ <h2>Anatomy</h2>
1242
+ <p>A fresh file looks like this:</p>
1243
+ <pre><code class="language-json">{
1244
+ &quot;$schema&quot;: &quot;https://glotfile.dev/schema/v1.json&quot;,
1245
+ &quot;version&quot;: 1,
1246
+ &quot;config&quot;: {
1247
+ &quot;sourceLocale&quot;: &quot;en&quot;,
1248
+ &quot;locales&quot;: [&quot;en&quot;],
1249
+ &quot;outputs&quot;: [
1250
+ { &quot;adapter&quot;: &quot;flutter-arb&quot;, &quot;path&quot;: &quot;lib/l10n/app_{locale}.arb&quot; },
1251
+ { &quot;adapter&quot;: &quot;laravel-php&quot;, &quot;path&quot;: &quot;lang/{locale}/{namespace}.php&quot; }
1252
+ ],
1253
+ &quot;format&quot;: { &quot;indent&quot;: 2, &quot;sortKeys&quot;: true, &quot;finalNewline&quot;: true },
1254
+ &quot;spelling&quot;: { &quot;customWords&quot;: [] }
1255
+ },
1256
+ &quot;glossary&quot;: [],
1257
+ &quot;keys&quot;: {}
1258
+ }
1259
+ </code></pre>
1260
+ <table>
1261
+ <thead>
1262
+ <tr>
1263
+ <th>Field</th>
1264
+ <th>Purpose</th>
1265
+ </tr>
1266
+ </thead>
1267
+ <tbody><tr>
1268
+ <td><code>version</code></td>
1269
+ <td>State-file schema version (currently <code>1</code>).</td>
1270
+ </tr>
1271
+ <tr>
1272
+ <td><code>config</code></td>
1273
+ <td>All committed configuration — see Configuration Reference. AI provider settings are <strong>not</strong> here; they live in per-machine local settings (see AI Providers).</td>
1274
+ </tr>
1275
+ <tr>
1276
+ <td><code>glossary</code></td>
1277
+ <td>Do-not-translate terms and forced per-locale translations — see Glossary.</td>
1278
+ </tr>
1279
+ <tr>
1280
+ <td><code>keys</code></td>
1281
+ <td>A flat map of dot-notation keys to their values and metadata — see Keys and Locales.</td>
1282
+ </tr>
1283
+ </tbody></table>
1284
+ <h2>A populated key</h2>
1285
+ <pre><code class="language-json">&quot;keys&quot;: {
1286
+ &quot;auth.signIn.button&quot;: {
1287
+ &quot;context&quot;: &quot;Primary call-to-action on the login screen&quot;,
1288
+ &quot;tags&quot;: [&quot;auth&quot;, &quot;cta&quot;],
1289
+ &quot;maxLength&quot;: 20,
1290
+ &quot;values&quot;: {
1291
+ &quot;en&quot;: { &quot;value&quot;: &quot;Sign in&quot;, &quot;state&quot;: &quot;source&quot; },
1292
+ &quot;fr&quot;: { &quot;value&quot;: &quot;Se connecter&quot;, &quot;state&quot;: &quot;reviewed&quot;, &quot;source&quot;: &quot;Sign in&quot; },
1293
+ &quot;de&quot;: { &quot;value&quot;: &quot;Anmelden&quot;, &quot;state&quot;: &quot;machine&quot;, &quot;source&quot;: &quot;Sign in&quot; }
1294
+ }
1295
+ }
1296
+ }
1297
+ </code></pre>
1298
+ <p>Each locale carries a <code>value</code> (or <code>forms</code> for plural keys), a state, and an optional <code>source</code> recording the source string it was translated from (used to detect stale translations).</p>
1299
+ <h2>Deterministic writes</h2>
1300
+ <p>Glotfile writes the file deterministically — <strong>stable key order, fixed indent, one trailing newline</strong> — so git diffs stay small and reviewable. The <code>config.format</code> block controls this:</p>
1301
+ <ul>
1302
+ <li><code>indent</code> — spaces per level (default <code>2</code>)</li>
1303
+ <li><code>sortKeys</code> — sort keys alphabetically (default <code>true</code>)</li>
1304
+ <li><code>finalNewline</code> — end with a single newline (default <code>true</code>)</li>
1305
+ </ul>
1306
+ <blockquote>
1307
+ <p><strong>Info:</strong> Why this matters — because writes are deterministic, re-running <code>glotfile export</code> with no real changes produces a <strong>zero-line diff</strong>. That&#39;s what makes Glotfile safe to run in CI.</p>
1308
+ </blockquote>
1309
+ <h2>On load</h2>
1310
+ <p>When Glotfile reads the file it validates the structure (see Checks and Validation) and normalises values — for example, trimming surrounding whitespace — so legacy data folds to the same shape the UI produces on save. A malformed file fails loudly with a specific message rather than corrupting silently.</p>
1311
+ <h2>Split storage: the <code>glotfile/</code> directory</h2>
1312
+ <p>For large catalogs, a single <code>glotfile.json</code> can reach several megabytes — making <code>git diff</code> slow, overflowing GitHub&#39;s render limit, and producing noisy conflicts when multiple branches add keys. The <strong>split</strong> layout breaks the catalog into a directory of smaller files, one per locale.</p>
1313
+ <p>Run <code>glotfile split</code> once to convert an existing single file:</p>
1314
+ <pre><code>glotfile/
1315
+ config.json # { $schema, version, config, glossary } — everything except keys
1316
+ keys.json # per-key metadata: tags, notes, context, plurals, screenshots
1317
+ locales/
1318
+ en.json # { &quot;&lt;key&gt;&quot;: { value, state, ... } } for every key present in this locale
1319
+ fr.json
1320
+ ...
1321
+ </code></pre>
1322
+ <ul>
1323
+ <li><strong><code>config.json</code></strong> holds the configuration and glossary — the parts that change rarely.</li>
1324
+ <li><strong><code>keys.json</code></strong> holds per-key metadata (tags, notes, context, plural config, screenshots) but <strong>not</strong> translation values. A tag edit touches only this file.</li>
1325
+ <li><strong><code>locales/&lt;locale&gt;.json</code></strong> holds all translation values for one locale. An AI run on French rewrites only <code>fr.json</code>.</li>
1326
+ </ul>
1327
+ <h3>What controls the layout</h3>
1328
+ <p>A <code>config.storage</code> field in the config selects how the catalog is saved:</p>
1329
+ <table>
1330
+ <thead>
1331
+ <tr>
1332
+ <th>Value</th>
1333
+ <th>Behaviour</th>
1334
+ </tr>
1335
+ </thead>
1336
+ <tbody><tr>
1337
+ <td><code>&quot;single&quot;</code> (or absent)</td>
1338
+ <td>Write a single <code>glotfile.json</code> — the default for new projects.</td>
1339
+ </tr>
1340
+ <tr>
1341
+ <td><code>&quot;split&quot;</code></td>
1342
+ <td>Write the <code>glotfile/</code> directory. Set automatically by <code>glotfile split</code>.</td>
1343
+ </tr>
1344
+ </tbody></table>
1345
+ <p><strong>Load auto-detects:</strong> Glotfile checks for <code>glotfile/config.json</code> first (split), then <code>glotfile.json</code> (single), then starts from defaults. You never need to set this by hand — <code>glotfile split</code> sets it for you.</p>
1346
+ <h3>Promotion is an explicit commit</h3>
1347
+ <p>There is no silent auto-promotion at a size threshold. Running <code>glotfile split</code> is a deliberate, one-time operation that produces a clearly-labelled commit. Once split, the CLI, web UI, and all export adapters work identically to the single-file layout — the in-memory state is unchanged.</p>
1348
+ <h2>Related</h2>
1349
+ <ul>
1350
+ <li>Configuration Reference · Keys and Locales · Review States</li>
1351
+ </ul>
1352
+ `,text:`The State File — Everything Glotfile does is derived from one file at the root of your project: . It holds your configuration, your glossary, and every key with its translations. You commit it alongside your code, and versioning, review, and rollback all come from git. Tip: You normally never edit this file by hand — the web UI writes it for you. The structure below is documented so you can read diffs and understand what's stored — not so you can hand-edit it. Anatomy A fresh file looks like this: Field Purpose --- --- State-file schema version (currently ). All committed configuration — see Configuration Reference. AI provider settings are not here; they live in per-machine local settings (see AI Providers). Do-not-translate terms and forced per-locale translations — see Glossary. A flat map of dot-notation keys to their values and metadata — see Keys and Locales. A populated key Each locale carries a (or for plural keys), a state, and an optional recording the source string it was translated from (used to detect stale translations). Deterministic writes Glotfile writes the file deterministically — stable key order, fixed indent, one trailing newline — so git diffs stay small and reviewable. The block controls this: - — spaces per level (default ) - — sort keys alphabetically (default ) - — end with a single newline (default ) Info: Why this matters — because writes are deterministic, re-running with no real changes produces a zero-line diff . That's what makes Glotfile safe to run in CI. On load When Glotfile reads the file it validates the structure (see Checks and Validation) and normalises values — for example, trimming surrounding whitespace — so legacy data folds to the same shape the UI produces on save. A malformed file fails loudly with a specific message rather than corrupting silently. Split storage: the directory For large catalogs, a single can reach several megabytes — making slow, overflowing GitHub's render limit, and producing noisy conflicts when multiple branches add keys. The split layout breaks the catalog into a directory of smaller files, one per locale. Run once to convert an existing single file: - holds the configuration and glossary — the parts that change rarely. - holds per-key metadata (tags, notes, context, plural config, screenshots) but not translation values. A tag edit touches only this file. - holds all translation values for one locale. An AI run on French rewrites only . What controls the layout A field in the config selects how the catalog is saved: Value Behaviour --- --- (or absent) Write a single — the default for new projects. Write the directory. Set automatically by . Load auto-detects: Glotfile checks for first (split), then (single), then starts from defaults. You never need to set this by hand — sets it for you. Promotion is an explicit commit There is no silent auto-promotion at a size threshold. Running is a deliberate, one-time operation that produces a clearly-labelled commit. Once split, the CLI, web UI, and all export adapters work identically to the single-file layout — the in-memory state is unchanged. Related - Configuration Reference · Keys and Locales · Review States`},{id:`ai-translation/ai-providers`,title:`AI Providers`,section:`AI Translation`,html:`<h1>AI Providers</h1>
1353
+ <p>Glotfile translates via <strong>one provider at a time</strong>, chosen by the <code>ai.provider</code> setting. These AI settings are <strong>per-machine</strong> — they live in <code>.glotfile/settings.json</code> (gitignored), not in the committed <code>glotfile.json</code>, so each developer can use their own provider and model. Edit them in Settings and re-run translate. Credentials are read from the environment, including a local <code>.env</code> file in the project directory.</p>
1354
+ <h2>Supported providers</h2>
1355
+ <table>
1356
+ <thead>
1357
+ <tr>
1358
+ <th>Provider</th>
1359
+ <th><code>provider</code></th>
1360
+ <th>Credentials</th>
1361
+ <th>Region / endpoint</th>
1362
+ <th>SDK</th>
1363
+ </tr>
1364
+ </thead>
1365
+ <tbody><tr>
1366
+ <td><strong>Anthropic</strong> (default)</td>
1367
+ <td><code>anthropic</code></td>
1368
+ <td><code>ANTHROPIC_API_KEY</code></td>
1369
+ <td><code>endpoint</code> (base URL)</td>
1370
+ <td>bundled (<code>@anthropic-ai/sdk</code>)</td>
1371
+ </tr>
1372
+ <tr>
1373
+ <td><strong>OpenAI</strong></td>
1374
+ <td><code>openai</code></td>
1375
+ <td><code>OPENAI_API_KEY</code></td>
1376
+ <td><code>endpoint</code> (base URL; also reaches any OpenAI-compatible gateway)</td>
1377
+ <td>optional — <code>npm i openai</code></td>
1378
+ </tr>
1379
+ <tr>
1380
+ <td><strong>AWS Bedrock</strong></td>
1381
+ <td><code>bedrock</code></td>
1382
+ <td>standard AWS chain: <code>AWS_ACCESS_KEY_ID</code> / <code>AWS_SECRET_ACCESS_KEY</code> (/ <code>AWS_SESSION_TOKEN</code>), or <code>AWS_PROFILE</code>, or an SSO / instance role</td>
1383
+ <td><code>region</code> (falls back to <code>AWS_REGION</code>)</td>
1384
+ <td>optional — <code>npm i @aws-sdk/client-bedrock-runtime</code></td>
1385
+ </tr>
1386
+ <tr>
1387
+ <td><strong>OpenRouter</strong></td>
1388
+ <td><code>openrouter</code></td>
1389
+ <td><code>OPENROUTER_API_KEY</code></td>
1390
+ <td><code>endpoint</code> (base URL; defaults to <code>https://openrouter.ai/api/v1</code>)</td>
1391
+ <td>optional — <code>npm i openai</code> (OpenAI-compatible)</td>
1392
+ </tr>
1393
+ <tr>
1394
+ <td><strong>Ollama</strong> (local)</td>
1395
+ <td><code>ollama</code></td>
1396
+ <td>none for local; <code>OLLAMA_API_KEY</code> only for a secured / remote server</td>
1397
+ <td><code>endpoint</code> (base URL; defaults to <code>http://localhost:11434/v1</code>)</td>
1398
+ <td>optional — <code>npm i openai</code> (OpenAI-compatible)</td>
1399
+ </tr>
1400
+ <tr>
1401
+ <td><strong>Claude Code</strong> (local)</td>
1402
+ <td><code>claude-code</code></td>
1403
+ <td>none — uses your local Claude Code session</td>
1404
+ <td>n/a</td>
1405
+ <td>none — spawns the <code>claude</code> CLI</td>
1406
+ </tr>
1407
+ </tbody></table>
1408
+ <blockquote>
1409
+ <p><strong>Info:</strong> Optional SDKs load on demand — the OpenAI SDK (also used by OpenRouter) and the AWS SDK are optional dependencies, loaded only when their provider is selected — so a default install stays small. If the SDK is missing when you translate, Glotfile tells you exactly what to install.</p>
1410
+ </blockquote>
1411
+ <h2>The <code>ai</code> settings</h2>
1412
+ <p>Stored per-machine in <code>.glotfile/settings.json</code> (gitignored). The default:</p>
1413
+ <pre><code class="language-json">&quot;ai&quot;: { &quot;provider&quot;: &quot;anthropic&quot;, &quot;model&quot;: &quot;claude-sonnet-4-6&quot;, &quot;endpoint&quot;: null, &quot;region&quot;: null, &quot;batchSize&quot;: 25 }
1414
+ </code></pre>
1415
+ <table>
1416
+ <thead>
1417
+ <tr>
1418
+ <th>Field</th>
1419
+ <th>Meaning</th>
1420
+ </tr>
1421
+ </thead>
1422
+ <tbody><tr>
1423
+ <td><code>provider</code></td>
1424
+ <td><code>anthropic</code>, <code>openai</code>, <code>bedrock</code>, <code>openrouter</code>, <code>ollama</code>, or <code>claude-code</code>.</td>
1425
+ </tr>
1426
+ <tr>
1427
+ <td><code>model</code></td>
1428
+ <td>The model id for the chosen provider.</td>
1429
+ </tr>
1430
+ <tr>
1431
+ <td><code>endpoint</code></td>
1432
+ <td>Base URL override (Anthropic / OpenAI / OpenRouter / Ollama). <code>null</code> for the provider default — OpenRouter defaults to <code>https://openrouter.ai/api/v1</code>, Ollama to <code>http://localhost:11434/v1</code>. An overridden Ollama endpoint must include the <code>/v1</code> suffix.</td>
1433
+ </tr>
1434
+ <tr>
1435
+ <td><code>region</code></td>
1436
+ <td>AWS region (Bedrock). Falls back to <code>AWS_REGION</code>.</td>
1437
+ </tr>
1438
+ <tr>
1439
+ <td><code>batchSize</code></td>
1440
+ <td>Strings per request (default <code>25</code>).</td>
1441
+ </tr>
1442
+ </tbody></table>
1443
+ <h2>Examples</h2>
1444
+ <p><strong>OpenAI:</strong></p>
1445
+ <pre><code class="language-json">&quot;ai&quot;: { &quot;provider&quot;: &quot;openai&quot;, &quot;model&quot;: &quot;gpt-4o-mini&quot;, &quot;endpoint&quot;: null, &quot;batchSize&quot;: 25 }
1446
+ </code></pre>
1447
+ <p><strong>OpenRouter</strong> (OpenAI-compatible; uses namespaced model ids):</p>
1448
+ <pre><code class="language-json">&quot;ai&quot;: { &quot;provider&quot;: &quot;openrouter&quot;, &quot;model&quot;: &quot;anthropic/claude-3.5-haiku&quot;, &quot;endpoint&quot;: null, &quot;batchSize&quot;: 25 }
1449
+ </code></pre>
1450
+ <p><strong>Ollama</strong> (local, OpenAI-compatible; no key needed — start Ollama and <code>ollama pull</code> the model first):</p>
1451
+ <pre><code class="language-json">&quot;ai&quot;: { &quot;provider&quot;: &quot;ollama&quot;, &quot;model&quot;: &quot;llama3.2&quot;, &quot;endpoint&quot;: null, &quot;batchSize&quot;: 25 }
1452
+ </code></pre>
1453
+ <p><strong>Claude Code</strong> (uses your local Claude Code session; no API key needed):</p>
1454
+ <pre><code class="language-json">&quot;ai&quot;: { &quot;provider&quot;: &quot;claude-code&quot;, &quot;model&quot;: &quot;claude-sonnet-4-6&quot;, &quot;endpoint&quot;: null, &quot;batchSize&quot;: 25 }
1455
+ </code></pre>
1456
+ <p><strong>AWS Bedrock — Amazon Nova:</strong></p>
1457
+ <pre><code class="language-json">&quot;ai&quot;: { &quot;provider&quot;: &quot;bedrock&quot;, &quot;model&quot;: &quot;amazon.nova-pro-v1:0&quot;, &quot;endpoint&quot;: null, &quot;region&quot;: &quot;eu-west-1&quot;, &quot;batchSize&quot;: 25 }
1458
+ </code></pre>
1459
+ <p><strong>AWS Bedrock — Claude or Meta Llama</strong> (same provider, different model id):</p>
1460
+ <pre><code class="language-json">&quot;ai&quot;: { &quot;provider&quot;: &quot;bedrock&quot;, &quot;model&quot;: &quot;anthropic.claude-3-5-sonnet-20241022-v2:0&quot;, &quot;region&quot;: &quot;us-east-1&quot;, &quot;endpoint&quot;: null, &quot;batchSize&quot;: 25 }
1461
+ &quot;ai&quot;: { &quot;provider&quot;: &quot;bedrock&quot;, &quot;model&quot;: &quot;meta.llama3-1-70b-instruct-v1:0&quot;, &quot;region&quot;: &quot;us-east-1&quot;, &quot;endpoint&quot;: null, &quot;batchSize&quot;: 25 }
1462
+ </code></pre>
1463
+ <h2>Vision (screenshots)</h2>
1464
+ <p>Keys with a screenshot are sent to vision-capable models for context:</p>
1465
+ <table>
1466
+ <thead>
1467
+ <tr>
1468
+ <th>Model family</th>
1469
+ <th>Vision</th>
1470
+ </tr>
1471
+ </thead>
1472
+ <tbody><tr>
1473
+ <td>Anthropic</td>
1474
+ <td>✅</td>
1475
+ </tr>
1476
+ <tr>
1477
+ <td>OpenAI (gpt-4o-class)</td>
1478
+ <td>✅</td>
1479
+ </tr>
1480
+ <tr>
1481
+ <td>Bedrock — Amazon Nova / Claude</td>
1482
+ <td>✅</td>
1483
+ </tr>
1484
+ <tr>
1485
+ <td>Bedrock — Meta Llama (text)</td>
1486
+ <td>❌ — runs text-only, warns how many screenshots were skipped</td>
1487
+ </tr>
1488
+ <tr>
1489
+ <td>OpenRouter</td>
1490
+ <td>✅ for vision-capable models (e.g. <code>anthropic/*</code>, <code>openai/gpt-4o*</code>, <code>google/gemini*</code>); a text-only model ignores the image</td>
1491
+ </tr>
1492
+ <tr>
1493
+ <td>Ollama</td>
1494
+ <td>❌ — runs text-only (most local models can&#39;t see images); screenshots are skipped</td>
1495
+ </tr>
1496
+ <tr>
1497
+ <td>Claude Code</td>
1498
+ <td>❌ — runs text-only via the <code>claude</code> CLI subprocess; screenshots are skipped</td>
1499
+ </tr>
1500
+ </tbody></table>
1501
+ <h2>Data residency</h2>
1502
+ <p>AI translation is the only path by which source strings leave your boundary. To keep strings in-region, <strong>pin AWS Bedrock to a region</strong>, or point the Anthropic / OpenAI <code>endpoint</code> at an in-region or self-hosted gateway. For the strongest guarantee, <strong>run Ollama locally</strong> — strings never leave the machine. Note that <strong>OpenRouter routes your strings through its service</strong> to the upstream model provider you select — avoid it where data residency is a hard requirement. <strong>No credentials are ever written to <code>glotfile.json</code> or logged.</strong></p>
1503
+ <h2>Related</h2>
1504
+ <ul>
1505
+ <li>How Translation Works · translate · Settings · AI Log</li>
1506
+ </ul>
1507
+ `,text:`AI Providers Glotfile translates via one provider at a time , chosen by the setting. These AI settings are per-machine — they live in (gitignored), not in the committed , so each developer can use their own provider and model. Edit them in Settings and re-run translate. Credentials are read from the environment, including a local file in the project directory. Supported providers Provider Credentials Region / endpoint SDK --- --- --- --- --- Anthropic (default) (base URL) bundled ( ) OpenAI (base URL; also reaches any OpenAI-compatible gateway) optional — AWS Bedrock standard AWS chain: / (/ ), or , or an SSO / instance role (falls back to ) optional — OpenRouter (base URL; defaults to ) optional — (OpenAI-compatible) Ollama (local) none for local; only for a secured / remote server (base URL; defaults to ) optional — (OpenAI-compatible) Claude Code (local) none — uses your local Claude Code session n/a none — spawns the CLI Info: Optional SDKs load on demand — the OpenAI SDK (also used by OpenRouter) and the AWS SDK are optional dependencies, loaded only when their provider is selected — so a default install stays small. If the SDK is missing when you translate, Glotfile tells you exactly what to install. The settings Stored per-machine in (gitignored). The default: Field Meaning --- --- , , , , , or . The model id for the chosen provider. Base URL override (Anthropic / OpenAI / OpenRouter / Ollama). for the provider default — OpenRouter defaults to , Ollama to . An overridden Ollama endpoint must include the suffix. AWS region (Bedrock). Falls back to . Strings per request (default ). Examples OpenAI: OpenRouter (OpenAI-compatible; uses namespaced model ids): Ollama (local, OpenAI-compatible; no key needed — start Ollama and the model first): Claude Code (uses your local Claude Code session; no API key needed): AWS Bedrock — Amazon Nova: AWS Bedrock — Claude or Meta Llama (same provider, different model id): Vision (screenshots) Keys with a screenshot are sent to vision-capable models for context: Model family Vision --- --- Anthropic ✅ OpenAI (gpt-4o-class) ✅ Bedrock — Amazon Nova / Claude ✅ Bedrock — Meta Llama (text) ❌ — runs text-only, warns how many screenshots were skipped OpenRouter ✅ for vision-capable models (e.g. , , ); a text-only model ignores the image Ollama ❌ — runs text-only (most local models can't see images); screenshots are skipped Claude Code ❌ — runs text-only via the CLI subprocess; screenshots are skipped Data residency AI translation is the only path by which source strings leave your boundary. To keep strings in-region, pin AWS Bedrock to a region , or point the Anthropic / OpenAI at an in-region or self-hosted gateway. For the strongest guarantee, run Ollama locally — strings never leave the machine. Note that OpenRouter routes your strings through its service to the upstream model provider you select — avoid it where data residency is a hard requirement. No credentials are ever written to or logged. Related - How Translation Works · translate · Settings · AI Log`},{id:`ai-translation/how-translation-works`,title:`How Translation Works`,section:`AI Translation`,html:`<h1>How Translation Works</h1>
1508
+ <p>AI translation is the only feature that needs network access or credentials — everything else in Glotfile works offline. You can trigger it from the Editor or with <code>glotfile translate</code>; both use the same engine.</p>
1509
+ <h2>What gets sent</h2>
1510
+ <p>For each string that needs translating, Glotfile sends the provider:</p>
1511
+ <ul>
1512
+ <li>the <strong>source string</strong> (or plural forms),</li>
1513
+ <li>the key&#39;s <strong>context</strong>,</li>
1514
+ <li>the relevant <strong>Glossary</strong> terms (only those that appear in the string),</li>
1515
+ <li>the <strong>target locale</strong>,</li>
1516
+ <li>any <strong>max length</strong>, and</li>
1517
+ <li>for vision-capable models, the key&#39;s <strong>screenshot</strong>.</li>
1518
+ </ul>
1519
+ <p>Strings are sent in batches (the <code>ai.batchSize</code> setting, default 25).</p>
1520
+ <h2>Validation on the way back</h2>
1521
+ <p>A translation is only written if it passes validation:</p>
1522
+ <ul>
1523
+ <li><strong>Placeholders</strong> must match the source — a translation that drops or renames <code>{name}</code>, <code>%s</code>, <code>:id</code>, etc. is <strong>rejected</strong>. See Placeholders and ICU.</li>
1524
+ <li><strong>ICU plural/select</strong> structure must be preserved.</li>
1525
+ <li><strong>Max length</strong>, if set, must not be exceeded.</li>
1526
+ </ul>
1527
+ <p>Rejected translations are reported and skipped, not written:</p>
1528
+ <pre><code>skip checkout.total @ de: placeholder {amount} is missing
1529
+ </code></pre>
1530
+ <h2>What it writes</h2>
1531
+ <ul>
1532
+ <li>Accepted translations are written as <strong><code>machine</code></strong> state.</li>
1533
+ <li>A <strong><code>reviewed</code></strong> value is <strong>never overwritten</strong> — your human edits are safe.</li>
1534
+ <li>The source string each translation was made from is recorded, so later source edits can flag the translation as stale.</li>
1535
+ </ul>
1536
+ <h2>Vision and model fit</h2>
1537
+ <p>Screenshots are sent only to models that can see them. For models that can&#39;t (e.g. Bedrock Meta Llama text models), the run proceeds <strong>text-only</strong> and prints how many screenshots were skipped — so any model still works. See AI Providers for the support matrix.</p>
1538
+ <h2>Privacy</h2>
1539
+ <blockquote>
1540
+ <p><strong>⚠ What leaves your machine</strong> — AI translation is the <strong>only</strong> path by which your source strings leave your boundary. No credentials are ever written to <code>glotfile.json</code> or the AI Log. To keep strings in-region, pin a Bedrock region or point an Anthropic/OpenAI endpoint at an in-region gateway — see AI Providers.</p>
1541
+ </blockquote>
1542
+ <h2>Batch mode</h2>
1543
+ <p>Batch mode submits translation jobs through the <strong>Anthropic Message Batches API</strong> at <strong>50% of normal token cost</strong>. Results are asynchronous — typically ready well under an hour, with a 24-hour upper bound. Batch mode is only available when <code>ai.provider</code> is <code>anthropic</code>.</p>
1544
+ <h3>CLI</h3>
1545
+ <pre><code>glotfile translate --batch # submit and exit immediately
1546
+ glotfile translate --batch --wait # submit, then stay attached and apply when done
1547
+ glotfile batch # check status; auto-applies results if finished
1548
+ glotfile batch apply # apply finished results now
1549
+ glotfile batch cancel # cancel a pending batch
1550
+ </code></pre>
1551
+ <h3>Web UI</h3>
1552
+ <p>When the Anthropic provider is active, the Translate dialog shows a <strong>Batch (50% cost)</strong> button alongside the normal Translate button. After submission, a banner in the editor tracks progress; when the batch finishes, click <strong>Apply results</strong> to write the translations.</p>
1553
+ <h3>Pending handle</h3>
1554
+ <p>The in-flight batch state is stored in <code>.glotfile/batch.json</code> — project-local and machine-specific. Only one pending batch per project is tracked at a time. The <code>.glotfile/</code> directory is self-ignoring (it writes its own <code>.gitignore</code> entry), so <code>batch.json</code> is never committed.</p>
1555
+ <h3>Staleness and error recovery</h3>
1556
+ <p>When results arrive, Glotfile checks each entry against the current state:</p>
1557
+ <ul>
1558
+ <li>Translations for keys whose <strong>source text changed</strong> (or that were <strong>deleted</strong>) since submission are <strong>skipped</strong>.</li>
1559
+ <li>Entries that the API marks as <strong>failed</strong>, or whose content is <strong>malformed</strong>, are automatically re-run through the normal synchronous translate path during apply.</li>
1560
+ </ul>
1561
+ <h2>Related</h2>
1562
+ <ul>
1563
+ <li>AI Providers · Glossary · Placeholders and ICU · AI Log</li>
1564
+ </ul>
1565
+ `,text:`How Translation Works AI translation is the only feature that needs network access or credentials — everything else in Glotfile works offline. You can trigger it from the Editor or with ; both use the same engine. What gets sent For each string that needs translating, Glotfile sends the provider: - the source string (or plural forms), - the key's context , - the relevant Glossary terms (only those that appear in the string), - the target locale , - any max length , and - for vision-capable models, the key's screenshot . Strings are sent in batches (the setting, default 25). Validation on the way back A translation is only written if it passes validation: - Placeholders must match the source — a translation that drops or renames , , , etc. is rejected . See Placeholders and ICU. - ICU plural/select structure must be preserved. - Max length , if set, must not be exceeded. Rejected translations are reported and skipped, not written: What it writes - Accepted translations are written as state. - A value is never overwritten — your human edits are safe. - The source string each translation was made from is recorded, so later source edits can flag the translation as stale. Vision and model fit Screenshots are sent only to models that can see them. For models that can't (e.g. Bedrock Meta Llama text models), the run proceeds text-only and prints how many screenshots were skipped — so any model still works. See AI Providers for the support matrix. Privacy ⚠ What leaves your machine — AI translation is the only path by which your source strings leave your boundary. No credentials are ever written to or the AI Log. To keep strings in-region, pin a Bedrock region or point an Anthropic/OpenAI endpoint at an in-region gateway — see AI Providers. Batch mode Batch mode submits translation jobs through the Anthropic Message Batches API at 50% of normal token cost . Results are asynchronous — typically ready well under an hour, with a 24-hour upper bound. Batch mode is only available when is . CLI Web UI When the Anthropic provider is active, the Translate dialog shows a Batch (50% cost) button alongside the normal Translate button. After submission, a banner in the editor tracks progress; when the batch finishes, click Apply results to write the translations. Pending handle The in-flight batch state is stored in — project-local and machine-specific. Only one pending batch per project is tracked at a time. The directory is self-ignoring (it writes its own entry), so is never committed. Staleness and error recovery When results arrive, Glotfile checks each entry against the current state: - Translations for keys whose source text changed (or that were deleted ) since submission are skipped . - Entries that the API marks as failed , or whose content is malformed , are automatically re-run through the normal synchronous translate path during apply. Related - AI Providers · Glossary · Placeholders and ICU · AI Log`},{id:`reference/checks-and-validation`,title:`Checks and Validation`,section:`Reference`,html:`<h1>Checks and Validation</h1>
1566
+ <p>Glotfile validates your catalog two ways: <strong>live in the UI</strong> as you edit, and via the <strong><code>lint</code> / <code>check</code></strong> commands for CI. Both look for the same kinds of problem.</p>
1567
+ <h2>Lint rules</h2>
1568
+ <p><code>glotfile lint</code> runs these rules. Each has a default severity you can override in <code>config.lint.rules</code>.</p>
1569
+ <table>
1570
+ <thead>
1571
+ <tr>
1572
+ <th>Rule id</th>
1573
+ <th>Default</th>
1574
+ <th>Catches</th>
1575
+ </tr>
1576
+ </thead>
1577
+ <tbody><tr>
1578
+ <td><code>empty-source</code></td>
1579
+ <td><strong>error</strong></td>
1580
+ <td>A key whose source value is empty.</td>
1581
+ </tr>
1582
+ <tr>
1583
+ <td><code>empty-translation</code></td>
1584
+ <td><strong>error</strong></td>
1585
+ <td>A target value that&#39;s missing or whitespace-only.</td>
1586
+ </tr>
1587
+ <tr>
1588
+ <td><code>placeholder-mismatch</code></td>
1589
+ <td><strong>error</strong></td>
1590
+ <td>Translation placeholders differ from the source.</td>
1591
+ </tr>
1592
+ <tr>
1593
+ <td><code>icu-mismatch</code></td>
1594
+ <td><strong>error</strong></td>
1595
+ <td>One side is an ICU plural/select and the other isn&#39;t.</td>
1596
+ </tr>
1597
+ <tr>
1598
+ <td><code>glossary-violation</code></td>
1599
+ <td><strong>error</strong></td>
1600
+ <td>A do-not-translate term is altered, or a forced Glossary translation is missing.</td>
1601
+ </tr>
1602
+ <tr>
1603
+ <td><code>max-length</code></td>
1604
+ <td>warn</td>
1605
+ <td>A value longer than the key&#39;s max length.</td>
1606
+ </tr>
1607
+ <tr>
1608
+ <td><code>identical-to-source</code></td>
1609
+ <td>warn</td>
1610
+ <td>A translation identical to the source string.</td>
1611
+ </tr>
1612
+ <tr>
1613
+ <td><code>whitespace</code></td>
1614
+ <td>warn</td>
1615
+ <td>Leading/trailing whitespace that differs from the source.</td>
1616
+ </tr>
1617
+ <tr>
1618
+ <td><code>spelling</code></td>
1619
+ <td>warn</td>
1620
+ <td>A word the locale&#39;s dictionary doesn&#39;t recognise.</td>
1621
+ </tr>
1622
+ </tbody></table>
1623
+ <p><code>glotfile check</code> adds one more, by re-exporting and comparing to disk:</p>
1624
+ <table>
1625
+ <thead>
1626
+ <tr>
1627
+ <th>Rule id</th>
1628
+ <th>Default</th>
1629
+ <th>Catches</th>
1630
+ </tr>
1631
+ </thead>
1632
+ <tbody><tr>
1633
+ <td><code>output-stale</code></td>
1634
+ <td><strong>error</strong></td>
1635
+ <td>An exported file is missing or out of date — run <code>glotfile export</code>.</td>
1636
+ </tr>
1637
+ </tbody></table>
1638
+ <h2>Configuring rules — <code>config.lint</code></h2>
1639
+ <p>Editable in <strong>Settings → Quality checks</strong>, or by hand:</p>
1640
+ <pre><code class="language-json">&quot;lint&quot;: {
1641
+ &quot;rules&quot;: { &quot;identical-to-source&quot;: &quot;off&quot;, &quot;max-length&quot;: &quot;error&quot; },
1642
+ &quot;ignore&quot;: [&quot;legal.*&quot;, &quot;debug.*&quot;],
1643
+ &quot;spelling&quot;: { &quot;locales&quot;: { &quot;pt-BR&quot;: &quot;pt&quot; } }
1644
+ }
1645
+ </code></pre>
1646
+ <table>
1647
+ <thead>
1648
+ <tr>
1649
+ <th>Field</th>
1650
+ <th>Meaning</th>
1651
+ </tr>
1652
+ </thead>
1653
+ <tbody><tr>
1654
+ <td><code>rules</code></td>
1655
+ <td>Override a rule&#39;s severity: <code>&quot;error&quot;</code>, <code>&quot;warn&quot;</code>, or <code>&quot;off&quot;</code>.</td>
1656
+ </tr>
1657
+ <tr>
1658
+ <td><code>ignore</code></td>
1659
+ <td>Globs of keys to skip entirely.</td>
1660
+ </tr>
1661
+ <tr>
1662
+ <td><code>spelling.locales</code></td>
1663
+ <td>Map a locale to a different dictionary id (e.g. use the <code>pt</code> dictionary for <code>pt-BR</code>).</td>
1664
+ </tr>
1665
+ </tbody></table>
1666
+ <p>Rule configuration applies everywhere at once: the live editor checks, the Analytics release gate, and <code>glotfile lint</code>/<code>check</code>. The <code>spelling</code> rule accepts Glossary terms and the custom dictionary (<code>config.spelling.customWords</code>) automatically.</p>
1667
+ <blockquote>
1668
+ <p><strong>Note:</strong> Spelling needs a dictionary — the <code>spelling</code> rule only runs for locales that have a dictionary available. Locales without one are skipped with a notice.</p>
1669
+ </blockquote>
1670
+ <h2>Dismissing a single finding</h2>
1671
+ <p>Sometimes a warning is just wrong for one string — &quot;Logo&quot; really is &quot;Logo&quot; in French. Dismiss the finding from Analytics (or the key&#39;s detail panel) and it&#39;s suppressed for that key + locale <strong>until the source text changes</strong>, at which point it resurfaces automatically. Suppressions are stored on the key in the state file, so they&#39;re shared with your team and reviewable in diffs.</p>
1672
+ <ul>
1673
+ <li><code>glotfile lint --accept [--rule &lt;list&gt;] [--locale &lt;list&gt;]</code> bulk-suppresses the current warnings — useful when adopting glotfile on an existing project.</li>
1674
+ <li><code>glotfile lint --include-suppressed</code> shows suppressed findings (marked); Analytics has a matching &quot;Suppressed (n)&quot; drawer with per-finding restore.</li>
1675
+ <li>Errors are never bulk-accepted; fix those instead.</li>
1676
+ </ul>
1677
+ <h2>Severities and exit codes</h2>
1678
+ <ul>
1679
+ <li><strong>error</strong> → fails <code>lint</code>/<code>check</code> (exit <code>1</code>).</li>
1680
+ <li><strong>warn</strong> → reported; fails only if over <code>--max-warnings</code>.</li>
1681
+ <li><strong>off</strong> → not run.</li>
1682
+ </ul>
1683
+ <p>See lint and check for <code>--format</code> (text / json / sarif), <code>--rule</code>, <code>--locale</code>, and <code>--max-warnings</code>, and Continuous Integration for wiring it up.</p>
1684
+ <h2>Live UI checks</h2>
1685
+ <p>The Editor continuously surfaces issues — missing values, placeholder mismatches, length and glossary violations, and spelling — so you fix them as you work. The <strong>needs-attention</strong> filter shows every key with an open issue.</p>
1686
+ <h2>Related</h2>
1687
+ <ul>
1688
+ <li>lint and check · Continuous Integration · Placeholders and ICU · Configuration Reference</li>
1689
+ </ul>
1690
+ `,text:`Checks and Validation Glotfile validates your catalog two ways: live in the UI as you edit, and via the / commands for CI. Both look for the same kinds of problem. Lint rules runs these rules. Each has a default severity you can override in . Rule id Default Catches --- --- --- error A key whose source value is empty. error A target value that's missing or whitespace-only. error Translation placeholders differ from the source. error One side is an ICU plural/select and the other isn't. error A do-not-translate term is altered, or a forced Glossary translation is missing. warn A value longer than the key's max length. warn A translation identical to the source string. warn Leading/trailing whitespace that differs from the source. warn A word the locale's dictionary doesn't recognise. adds one more, by re-exporting and comparing to disk: Rule id Default Catches --- --- --- error An exported file is missing or out of date — run . Configuring rules — Editable in Settings → Quality checks , or by hand: Field Meaning --- --- Override a rule's severity: , , or . Globs of keys to skip entirely. Map a locale to a different dictionary id (e.g. use the dictionary for ). Rule configuration applies everywhere at once: the live editor checks, the Analytics release gate, and / . The rule accepts Glossary terms and the custom dictionary ( ) automatically. Note: Spelling needs a dictionary — the rule only runs for locales that have a dictionary available. Locales without one are skipped with a notice. Dismissing a single finding Sometimes a warning is just wrong for one string — "Logo" really is "Logo" in French. Dismiss the finding from Analytics (or the key's detail panel) and it's suppressed for that key + locale until the source text changes , at which point it resurfaces automatically. Suppressions are stored on the key in the state file, so they're shared with your team and reviewable in diffs. - bulk-suppresses the current warnings — useful when adopting glotfile on an existing project. - shows suppressed findings (marked); Analytics has a matching "Suppressed (n)" drawer with per-finding restore. - Errors are never bulk-accepted; fix those instead. Severities and exit codes - error → fails / (exit ). - warn → reported; fails only if over . - off → not run. See lint and check for (text / json / sarif), , , and , and Continuous Integration for wiring it up. Live UI checks The Editor continuously surfaces issues — missing values, placeholder mismatches, length and glossary violations, and spelling — so you fix them as you work. The needs-attention filter shows every key with an open issue. Related - lint and check · Continuous Integration · Placeholders and ICU · Configuration Reference`},{id:`reference/configuration-reference`,title:`Configuration Reference`,section:`Reference`,html:`<h1>Configuration Reference</h1>
1691
+ <p>Every field in the <code>config</code> block of <code>glotfile.json</code> — the configuration you <strong>commit</strong> alongside your code. Edit these in Settings rather than by hand where you can.</p>
1692
+ <blockquote>
1693
+ <p><strong>Info:</strong> AI provider settings are <strong>not</strong> part of this committed config. They&#39;re per-machine and live in <code>.glotfile/settings.json</code> (gitignored) — see AI Providers.</p>
1694
+ </blockquote>
1695
+ <pre><code class="language-json">&quot;config&quot;: {
1696
+ &quot;sourceLocale&quot;: &quot;en&quot;,
1697
+ &quot;locales&quot;: [&quot;en&quot;, &quot;fr&quot;, &quot;de&quot;],
1698
+ &quot;outputs&quot;: [
1699
+ { &quot;adapter&quot;: &quot;flutter-arb&quot;, &quot;path&quot;: &quot;lib/l10n/app_{locale}.arb&quot; }
1700
+ ],
1701
+ &quot;format&quot;: { &quot;indent&quot;: 2, &quot;sortKeys&quot;: true, &quot;finalNewline&quot;: true },
1702
+ &quot;spelling&quot;: { &quot;customWords&quot;: [] },
1703
+ &quot;lint&quot;: { &quot;rules&quot;: {}, &quot;ignore&quot;: [], &quot;spelling&quot;: { &quot;locales&quot;: {} } }
1704
+ }
1705
+ </code></pre>
1706
+ <h2><code>sourceLocale</code> (string, required)</h2>
1707
+ <p>The language you author in. <strong>Must</strong> be one of <code>locales</code>. See Keys and Locales.</p>
1708
+ <h2><code>locales</code> (string[], required)</h2>
1709
+ <p>Every language you maintain, including the source. See Keys and Locales.</p>
1710
+ <h2><code>outputs</code> (array, required)</h2>
1711
+ <p>Export targets. Each entry:</p>
1712
+ <table>
1713
+ <thead>
1714
+ <tr>
1715
+ <th>Field</th>
1716
+ <th>Type</th>
1717
+ <th>Meaning</th>
1718
+ </tr>
1719
+ </thead>
1720
+ <tbody><tr>
1721
+ <td><code>adapter</code></td>
1722
+ <td>string</td>
1723
+ <td>One of the adapters.</td>
1724
+ </tr>
1725
+ <tr>
1726
+ <td><code>path</code></td>
1727
+ <td>string</td>
1728
+ <td>Path template with <code>{locale}</code> / <code>{namespace}</code>.</td>
1729
+ </tr>
1730
+ <tr>
1731
+ <td><code>style</code></td>
1732
+ <td>string?</td>
1733
+ <td>Adapter-specific layout option (e.g. <code>&quot;flat&quot;</code>).</td>
1734
+ </tr>
1735
+ <tr>
1736
+ <td><code>localeCase</code></td>
1737
+ <td><code>&quot;lower-hyphen&quot;</code> | <code>&quot;lower-underscore&quot;</code> | <code>&quot;bcp47-hyphen&quot;</code> | <code>&quot;bcp47-underscore&quot;</code> | null</td>
1738
+ <td>Locale-code rendering style for this output. Default: the adapter&#39;s own convention (<code>bcp47-underscore</code> for ARB; <code>bcp47-hyphen</code> for <code>angular-xliff</code>, <code>rails-yaml</code> and <code>apple-strings</code>; <code>lower-hyphen</code> for all others). Applies to the <code>{locale}</code> path token and any in-file locale token.</td>
1739
+ </tr>
1740
+ <tr>
1741
+ <td><code>localeMap</code></td>
1742
+ <td><code>{ [canonicalCode]: exportToken }</code> | null</td>
1743
+ <td>Per-locale override that wins over <code>localeCase</code>. Keys are canonical (lowercase-hyphen) codes and must be locales in <code>config.locales</code>. E.g. <code>{ &quot;zh-hant&quot;: &quot;zh_HK&quot; }</code>.</td>
1744
+ </tr>
1745
+ </tbody></table>
1746
+ <blockquote>
1747
+ <p><strong>Info:</strong> AI provider settings — <code>provider</code>, <code>model</code>, <code>endpoint</code>, <code>region</code>, <code>batchSize</code> — are <strong>not</strong> in <code>config</code>. They&#39;re per-machine local settings; see AI Providers.</p>
1748
+ </blockquote>
1749
+ <h2><code>format</code> (object, required)</h2>
1750
+ <p>Controls how <code>glotfile.json</code> is written — keeps diffs small. See The State File.</p>
1751
+ <table>
1752
+ <thead>
1753
+ <tr>
1754
+ <th>Field</th>
1755
+ <th>Type</th>
1756
+ <th>Default</th>
1757
+ </tr>
1758
+ </thead>
1759
+ <tbody><tr>
1760
+ <td><code>indent</code></td>
1761
+ <td>number</td>
1762
+ <td><code>2</code></td>
1763
+ </tr>
1764
+ <tr>
1765
+ <td><code>sortKeys</code></td>
1766
+ <td>boolean</td>
1767
+ <td><code>true</code></td>
1768
+ </tr>
1769
+ <tr>
1770
+ <td><code>finalNewline</code></td>
1771
+ <td>boolean</td>
1772
+ <td><code>true</code></td>
1773
+ </tr>
1774
+ </tbody></table>
1775
+ <h2><code>spelling</code> (object, optional)</h2>
1776
+ <table>
1777
+ <thead>
1778
+ <tr>
1779
+ <th>Field</th>
1780
+ <th>Type</th>
1781
+ <th>Meaning</th>
1782
+ </tr>
1783
+ </thead>
1784
+ <tbody><tr>
1785
+ <td><code>customWords</code></td>
1786
+ <td>string[]</td>
1787
+ <td>Words the spelling check always accepts.</td>
1788
+ </tr>
1789
+ </tbody></table>
1790
+ <h2><code>lint</code> (object, optional)</h2>
1791
+ <p>Tune the validation rules (Settings → Quality checks in the UI). The spelling rule accepts Glossary terms and <code>config.spelling.customWords</code> automatically.</p>
1792
+ <table>
1793
+ <thead>
1794
+ <tr>
1795
+ <th>Field</th>
1796
+ <th>Type</th>
1797
+ <th>Meaning</th>
1798
+ </tr>
1799
+ </thead>
1800
+ <tbody><tr>
1801
+ <td><code>rules</code></td>
1802
+ <td><code>{ [ruleId]: &quot;error&quot; | &quot;warn&quot; | &quot;off&quot; }</code></td>
1803
+ <td>Per-rule severity overrides.</td>
1804
+ </tr>
1805
+ <tr>
1806
+ <td><code>ignore</code></td>
1807
+ <td>string[]</td>
1808
+ <td>Key globs to skip.</td>
1809
+ </tr>
1810
+ <tr>
1811
+ <td><code>spelling.locales</code></td>
1812
+ <td><code>{ [locale]: dictId }</code></td>
1813
+ <td>Use a specific dictionary for a locale.</td>
1814
+ </tr>
1815
+ </tbody></table>
1816
+ <h2><code>scan</code> (object, optional)</h2>
1817
+ <p>Tunes the codebase scan that powers usage detection and unused-key pruning. See scan.</p>
1818
+ <table>
1819
+ <thead>
1820
+ <tr>
1821
+ <th>Field</th>
1822
+ <th>Type</th>
1823
+ <th>Meaning</th>
1824
+ </tr>
1825
+ </thead>
1826
+ <tbody><tr>
1827
+ <td><code>include</code></td>
1828
+ <td>string[]</td>
1829
+ <td>Globs of files to scan.</td>
1830
+ </tr>
1831
+ <tr>
1832
+ <td><code>exclude</code></td>
1833
+ <td>string[]</td>
1834
+ <td>Globs to skip.</td>
1835
+ </tr>
1836
+ <tr>
1837
+ <td><code>accessors</code></td>
1838
+ <td>string[]</td>
1839
+ <td>Extra Flutter accessor names the <code>gen_l10n</code> object is bound to (auto-detection covers most projects; this is the escape hatch).</td>
1840
+ </tr>
1841
+ <tr>
1842
+ <td><code>patterns</code></td>
1843
+ <td>string[]</td>
1844
+ <td>Custom usage-scan regexes (capture group 1 = the key) applied to every file.</td>
1845
+ </tr>
1846
+ <tr>
1847
+ <td><code>keep</code></td>
1848
+ <td>string[]</td>
1849
+ <td>Key globs always treated as used (e.g. <code>auth.throttle</code>, <code>validation.*</code>) — for keys consumed by code the scan can&#39;t see, such as framework internals or vendored packages. They never show as unused and survive <code>prune --unused</code>.</td>
1850
+ </tr>
1851
+ </tbody></table>
1852
+ <h2><code>autoExport</code> (boolean, optional)</h2>
1853
+ <p>When <code>true</code> (the default), <code>glotfile serve</code> re-exports the locale files to disk on every change. Set <code>false</code> to write only on an explicit <code>glotfile export</code>.</p>
1854
+ <h2><code>exportLocales</code> (string[], optional)</h2>
1855
+ <p>An allow-list narrowing which locales every export writes. Empty or absent means export all of <code>locales</code>. Persisted so the serve auto-export hook honours it too.</p>
1856
+ <h2><code>storage</code> (<code>&quot;single&quot;</code> | <code>&quot;split&quot;</code>, optional)</h2>
1857
+ <p>On-disk layout. Absent or <code>&quot;single&quot;</code> keeps the monolithic <code>glotfile.json</code>; <code>&quot;split&quot;</code> persists the catalog as a <code>glotfile/</code> directory of per-locale files. Set automatically by <code>glotfile split</code> — see The State File.</p>
1858
+ <blockquote>
1859
+ <p><strong>⚠ Validation on load</strong> — Glotfile validates the whole file when it loads. A bad <code>sourceLocale</code>, an unknown rule id, a plural key missing its <code>other</code> form, or a malformed value fails with a specific message rather than corrupting data.</p>
1860
+ </blockquote>
1861
+ <h2>Related</h2>
1862
+ <ul>
1863
+ <li>The State File · Output Formats · AI Providers · Checks and Validation</li>
1864
+ </ul>
1865
+ `,text:`Configuration Reference Every field in the block of — the configuration you commit alongside your code. Edit these in Settings rather than by hand where you can. Info: AI provider settings are not part of this committed config. They're per-machine and live in (gitignored) — see AI Providers. (string, required) The language you author in. Must be one of . See Keys and Locales. (string[], required) Every language you maintain, including the source. See Keys and Locales. (array, required) Export targets. Each entry: Field Type Meaning --- --- --- string One of the adapters. string Path template with / . string? Adapter-specific layout option (e.g. ). \\ \\ \\ \\ null Locale-code rendering style for this output. Default: the adapter's own convention ( for ARB; for , and ; for all others). Applies to the path token and any in-file locale token. \\ null Per-locale override that wins over . Keys are canonical (lowercase-hyphen) codes and must be locales in . E.g. . Info: AI provider settings — , , , , — are not in . They're per-machine local settings; see AI Providers. (object, required) Controls how is written — keeps diffs small. See The State File. Field Type Default --- --- --- number boolean boolean (object, optional) Field Type Meaning --- --- --- string[] Words the spelling check always accepts. (object, optional) Tune the validation rules (Settings → Quality checks in the UI). The spelling rule accepts Glossary terms and automatically. Field Type Meaning --- --- --- Per-rule severity overrides. string[] Key globs to skip. Use a specific dictionary for a locale. (object, optional) Tunes the codebase scan that powers usage detection and unused-key pruning. See scan. Field Type Meaning --- --- --- string[] Globs of files to scan. string[] Globs to skip. string[] Extra Flutter accessor names the object is bound to (auto-detection covers most projects; this is the escape hatch). string[] Custom usage-scan regexes (capture group 1 = the key) applied to every file. string[] Key globs always treated as used (e.g. , ) — for keys consumed by code the scan can't see, such as framework internals or vendored packages. They never show as unused and survive . (boolean, optional) When (the default), re-exports the locale files to disk on every change. Set to write only on an explicit . (string[], optional) An allow-list narrowing which locales every export writes. Empty or absent means export all of . Persisted so the serve auto-export hook honours it too. ( , optional) On-disk layout. Absent or keeps the monolithic ; persists the catalog as a directory of per-locale files. Set automatically by — see The State File. ⚠ Validation on load — Glotfile validates the whole file when it loads. A bad , an unknown rule id, a plural key missing its form, or a malformed value fails with a specific message rather than corrupting data. Related - The State File · Output Formats · AI Providers · Checks and Validation`},{id:`reference/output-formats`,title:`Output Formats`,section:`Reference`,html:`<h1>Output Formats</h1>
1866
+ <p>Glotfile exports your catalog to the locale formats your apps consume. You configure outputs in <code>config.outputs</code> (via Settings or the file); each entry names an <strong>adapter</strong> and a <strong>path template</strong>. <code>glotfile export</code> writes them all.</p>
1867
+ <pre><code class="language-json">&quot;outputs&quot;: [
1868
+ { &quot;adapter&quot;: &quot;flutter-arb&quot;, &quot;path&quot;: &quot;lib/l10n/app_{locale}.arb&quot; },
1869
+ { &quot;adapter&quot;: &quot;laravel-php&quot;, &quot;path&quot;: &quot;lang/{locale}/{namespace}.php&quot; },
1870
+ { &quot;adapter&quot;: &quot;i18next-json&quot;, &quot;path&quot;: &quot;public/locales/{locale}/translation.json&quot; }
1871
+ ]
1872
+ </code></pre>
1873
+ <h2>Adapters</h2>
1874
+ <table>
1875
+ <thead>
1876
+ <tr>
1877
+ <th>Adapter</th>
1878
+ <th>Target</th>
1879
+ <th>Placeholder style</th>
1880
+ <th>Files written</th>
1881
+ </tr>
1882
+ </thead>
1883
+ <tbody><tr>
1884
+ <td><code>flutter-arb</code></td>
1885
+ <td>Flutter <code>.arb</code></td>
1886
+ <td>ICU</td>
1887
+ <td>one per locale</td>
1888
+ </tr>
1889
+ <tr>
1890
+ <td><code>laravel-php</code></td>
1891
+ <td>Laravel <code>lang/**/*.php</code> arrays</td>
1892
+ <td><code>:named</code></td>
1893
+ <td>one per locale <strong>per namespace</strong></td>
1894
+ </tr>
1895
+ <tr>
1896
+ <td><code>i18next-json</code></td>
1897
+ <td>i18next / generic JSON</td>
1898
+ <td><code>{{named}}</code></td>
1899
+ <td>one per locale</td>
1900
+ </tr>
1901
+ <tr>
1902
+ <td><code>vue-i18n-json</code></td>
1903
+ <td>Vue I18n JSON</td>
1904
+ <td><code>{named}</code></td>
1905
+ <td>one per locale</td>
1906
+ </tr>
1907
+ <tr>
1908
+ <td><code>gettext-po</code></td>
1909
+ <td>gettext <code>.po</code></td>
1910
+ <td>printf (<code>%s</code>)</td>
1911
+ <td>one per locale</td>
1912
+ </tr>
1913
+ <tr>
1914
+ <td><code>apple-strings</code></td>
1915
+ <td>Apple <code>.strings</code></td>
1916
+ <td>printf</td>
1917
+ <td>one per locale</td>
1918
+ </tr>
1919
+ <tr>
1920
+ <td><code>apple-stringsdict</code></td>
1921
+ <td>Apple <code>.stringsdict</code> (plurals)</td>
1922
+ <td>printf</td>
1923
+ <td>one per locale</td>
1924
+ </tr>
1925
+ <tr>
1926
+ <td><code>angular-xliff</code></td>
1927
+ <td>Angular XLIFF 1.2 (<code>@angular/localize</code>)</td>
1928
+ <td><code>&lt;x id=&quot;INTERPOLATION&quot;/&gt;</code></td>
1929
+ <td>one per locale</td>
1930
+ </tr>
1931
+ <tr>
1932
+ <td><code>rails-yaml</code></td>
1933
+ <td>Rails i18n <code>config/locales/*.yml</code></td>
1934
+ <td><code>%{named}</code></td>
1935
+ <td>one per locale</td>
1936
+ </tr>
1937
+ </tbody></table>
1938
+ <h2>Path templates</h2>
1939
+ <p>Two tokens are substituted in <code>path</code>:</p>
1940
+ <ul>
1941
+ <li><strong><code>{locale}</code></strong> — the locale code (<code>en</code>, <code>fr</code>, …). Used by every adapter.</li>
1942
+ <li><strong><code>{namespace}</code></strong> — the <strong>first dot-segment</strong> of the key. Used by adapters that split files by namespace.</li>
1943
+ </ul>
1944
+ <blockquote>
1945
+ <p><strong>Example:</strong> How <code>{namespace}</code> works — with <code>laravel-php</code> and path <code>lang/{locale}/{namespace}.php</code>, the key <code>auth.signIn.button</code> is written as <code>signIn.button</code> inside <code>lang/fr/auth.php</code>. Keys with no dot fall into a <code>messages</code> namespace.</p>
1946
+ </blockquote>
1947
+ <h2>Locale code rendering</h2>
1948
+ <p>By default each adapter renders locale codes in its own convention: <code>flutter-arb</code> uses BCP-47 with underscores (<code>en_US</code>, <code>zh_Hant_TW</code>); <code>angular-xliff</code>, <code>rails-yaml</code> and <code>apple-strings</code> use BCP-47 with hyphens (<code>en-US</code>, <code>pt-BR</code>); every other adapter uses glotfile&#39;s internal lowercase-hyphen form (<code>en-us</code>).</p>
1949
+ <h3><code>localeCase</code></h3>
1950
+ <p>The optional <code>localeCase</code> field on an output entry overrides the adapter default for <strong>all</strong> locales in that output:</p>
1951
+ <table>
1952
+ <thead>
1953
+ <tr>
1954
+ <th>Value</th>
1955
+ <th>Example</th>
1956
+ </tr>
1957
+ </thead>
1958
+ <tbody><tr>
1959
+ <td><code>lower-hyphen</code></td>
1960
+ <td><code>en-us</code>, <code>zh-hant-tw</code></td>
1961
+ </tr>
1962
+ <tr>
1963
+ <td><code>lower-underscore</code></td>
1964
+ <td><code>en_us</code>, <code>zh_hant_tw</code></td>
1965
+ </tr>
1966
+ <tr>
1967
+ <td><code>bcp47-hyphen</code></td>
1968
+ <td><code>en-US</code>, <code>zh-Hant-TW</code></td>
1969
+ </tr>
1970
+ <tr>
1971
+ <td><code>bcp47-underscore</code></td>
1972
+ <td><code>en_US</code>, <code>zh_Hant_TW</code></td>
1973
+ </tr>
1974
+ </tbody></table>
1975
+ <p><code>localeCase</code> applies to the <code>{locale}</code> filename token <strong>and</strong> any in-file locale token (ARB <code>@@locale</code>, gettext <code>Language:</code>, XLIFF <code>target-language</code>).</p>
1976
+ <h3><code>localeMap</code></h3>
1977
+ <p>The optional <code>localeMap</code> field maps individual canonical locale codes to exact export tokens, overriding <code>localeCase</code> for those locales:</p>
1978
+ <pre><code class="language-json">{ &quot;adapter&quot;: &quot;flutter-arb&quot;, &quot;path&quot;: &quot;lib/l10n/app_{locale}.arb&quot;,
1979
+ &quot;localeMap&quot;: { &quot;zh-hant&quot;: &quot;zh_HK&quot; } }
1980
+ </code></pre>
1981
+ <p>Keys are <strong>canonical</strong> (lowercase-hyphen) codes and must be locales present in <code>config.locales</code>. Use <code>localeMap</code> for semantic remaps that no style can express — for example, Flutter rejects script subtags so <code>zh-hant</code> must ship as <code>zh_HK</code>; Android requires <code>zh-rHK</code>.</p>
1982
+ <blockquote>
1983
+ <p><strong>⚠ Locale collision</strong> — if two locales resolve to the same export token after applying <code>localeCase</code> and <code>localeMap</code>, <code>glotfile export</code> emits a <code>locale-collision</code> warning and writes only the first locale&#39;s file (in config order), skipping the colliding ones rather than silently overwriting.</p>
1984
+ </blockquote>
1985
+ <h3>Round-trip safety</h3>
1986
+ <p><code>glotfile import</code> sets <code>localeCase</code> and <code>localeMap</code> automatically: it inspects the filenames it finds, picks the <code>localeCase</code> that reproduces them, and records only the exceptions in <code>localeMap</code>. A subsequent <code>glotfile export</code> produces byte-identical files.</p>
1987
+ <h2>The <code>style</code> option</h2>
1988
+ <p>Some adapters accept an optional <code>style</code> to tune their output. For example, <code>vue-i18n-json</code> supports a <strong>flat</strong> layout:</p>
1989
+ <pre><code class="language-json">{ &quot;adapter&quot;: &quot;vue-i18n-json&quot;, &quot;path&quot;: &quot;src/locales/{locale}.json&quot;, &quot;style&quot;: &quot;flat&quot; }
1990
+ </code></pre>
1991
+ <p>(Without <code>style</code>, JSON adapters nest keys by their dot segments.)</p>
1992
+ <h2>Lossless where possible, loud where not</h2>
1993
+ <p>Placeholders and ICU <code>plural</code>/<code>select</code> structure are <strong>preserved</strong> and converted to each format&#39;s native mechanism. Where a conversion would be lossy, <code>glotfile export</code> emits a <strong>warning</strong> and writes safe output rather than corrupting the file. See Placeholders and ICU.</p>
1994
+ <h2>Round-tripping (import)</h2>
1995
+ <p><code>glotfile import</code> reads existing files back into the catalog using these same adapters in reverse — inferring <code>localeCase</code>/<code>localeMap</code> from the filenames so a later export reproduces them byte-for-byte. See import.</p>
1996
+ <h2>Related</h2>
1997
+ <ul>
1998
+ <li>export · Placeholders and ICU · Plurals · Configuration Reference</li>
1999
+ </ul>
2000
+ `,text:`Output Formats Glotfile exports your catalog to the locale formats your apps consume. You configure outputs in (via Settings or the file); each entry names an adapter and a path template . writes them all. Adapters Adapter Target Placeholder style Files written --- --- --- --- Flutter ICU one per locale Laravel arrays one per locale per namespace i18next / generic JSON one per locale Vue I18n JSON one per locale gettext printf ( ) one per locale Apple printf one per locale Apple (plurals) printf one per locale Angular XLIFF 1.2 ( ) one per locale Rails i18n one per locale Path templates Two tokens are substituted in : - — the locale code ( , , …). Used by every adapter. - — the first dot-segment of the key. Used by adapters that split files by namespace. Example: How works — with and path , the key is written as inside . Keys with no dot fall into a namespace. Locale code rendering By default each adapter renders locale codes in its own convention: uses BCP-47 with underscores ( , ); , and use BCP-47 with hyphens ( , ); every other adapter uses glotfile's internal lowercase-hyphen form ( ). The optional field on an output entry overrides the adapter default for all locales in that output: Value Example --- --- , , , , applies to the filename token and any in-file locale token (ARB , gettext , XLIFF ). The optional field maps individual canonical locale codes to exact export tokens, overriding for those locales: Keys are canonical (lowercase-hyphen) codes and must be locales present in . Use for semantic remaps that no style can express — for example, Flutter rejects script subtags so must ship as ; Android requires . ⚠ Locale collision — if two locales resolve to the same export token after applying and , emits a warning and writes only the first locale's file (in config order), skipping the colliding ones rather than silently overwriting. Round-trip safety sets and automatically: it inspects the filenames it finds, picks the that reproduces them, and records only the exceptions in . A subsequent produces byte-identical files. The option Some adapters accept an optional to tune their output. For example, supports a flat layout: (Without , JSON adapters nest keys by their dot segments.) Lossless where possible, loud where not Placeholders and ICU / structure are preserved and converted to each format's native mechanism. Where a conversion would be lossy, emits a warning and writes safe output rather than corrupting the file. See Placeholders and ICU. Round-tripping (import) reads existing files back into the catalog using these same adapters in reverse — inferring / from the filenames so a later export reproduces them byte-for-byte. See import. Related - export · Placeholders and ICU · Plurals · Configuration Reference`},{id:`reference/placeholders-and-icu`,title:`Placeholders and ICU`,section:`Reference`,html:`<h1>Placeholders and ICU</h1>
2001
+ <p>Translations must keep the machinery the source string carries: <strong>interpolation placeholders</strong> and <strong>ICU plural/select</strong> structure. Glotfile protects both during translation, validation, and export.</p>
2002
+ <h2>One canonical form, converted on export</h2>
2003
+ <p>Glotfile stores every placeholder in a single <strong>canonical</strong> form — <code>{name}</code> —
2004
+ no matter what style the source file used. Import normalises to it; export
2005
+ converts it to each adapter&#39;s native style. So you edit and validate against one
2006
+ syntax, and each output file still gets the flavour its framework expects.</p>
2007
+ <table>
2008
+ <thead>
2009
+ <tr>
2010
+ <th>Format</th>
2011
+ <th>Native style</th>
2012
+ <th>Example</th>
2013
+ <th>On import → stored</th>
2014
+ <th>On export ← stored</th>
2015
+ </tr>
2016
+ </thead>
2017
+ <tbody><tr>
2018
+ <td>Flutter ARB</td>
2019
+ <td>ICU named</td>
2020
+ <td><code>{name}</code></td>
2021
+ <td><code>{name}</code> (already canonical)</td>
2022
+ <td><code>{name}</code></td>
2023
+ </tr>
2024
+ <tr>
2025
+ <td>Vue I18n</td>
2026
+ <td>single braces</td>
2027
+ <td><code>{name}</code></td>
2028
+ <td><code>{name}</code> (already canonical)</td>
2029
+ <td><code>{name}</code></td>
2030
+ </tr>
2031
+ <tr>
2032
+ <td>Laravel</td>
2033
+ <td>colon</td>
2034
+ <td><code>:name</code></td>
2035
+ <td><code>{name}</code></td>
2036
+ <td><code>:name</code></td>
2037
+ </tr>
2038
+ <tr>
2039
+ <td>Rails YAML</td>
2040
+ <td>percent-brace</td>
2041
+ <td><code>%{name}</code></td>
2042
+ <td><code>{name}</code></td>
2043
+ <td><code>%{name}</code></td>
2044
+ </tr>
2045
+ <tr>
2046
+ <td>i18next</td>
2047
+ <td>double braces</td>
2048
+ <td><code>{{name}}</code></td>
2049
+ <td><code>{name}</code></td>
2050
+ <td><code>{{name}}</code></td>
2051
+ </tr>
2052
+ <tr>
2053
+ <td>Angular XLIFF</td>
2054
+ <td>placeholder element</td>
2055
+ <td><code>&lt;x id=&quot;INTERPOLATION&quot; equiv-text=&quot;{{name}}&quot;/&gt;</code></td>
2056
+ <td><code>{name}</code></td>
2057
+ <td><code>&lt;x id=&quot;INTERPOLATION&quot; equiv-text=&quot;{{name}}&quot;/&gt;</code></td>
2058
+ </tr>
2059
+ </tbody></table>
2060
+ <p>A translation that <strong>drops, renames, or adds</strong> a placeholder relative to the
2061
+ source is:</p>
2062
+ <ul>
2063
+ <li><strong>rejected</strong> by AI translation (not written), and</li>
2064
+ <li>flagged by the <code>placeholder-mismatch</code> rule.</li>
2065
+ </ul>
2066
+ <p>Because everything is canonical internally, the editor and the checks only ever
2067
+ look for <code>{name}</code> — they never mistake an unrelated colon or percent sign (a
2068
+ time like <code>(h:m)</code>, a ratio <code>a:b</code>) for a placeholder.</p>
2069
+ <blockquote>
2070
+ <p><strong>printf formats</strong> (<code>%s</code>, <code>%d</code> in gettext and Apple <code>.stringsdict</code>) are
2071
+ <strong>export-only and lossy</strong> — they sit outside the canonical guarantee. See
2072
+ <em>Lossy conversions</em> below.</p>
2073
+ </blockquote>
2074
+ <h2>Escaping a literal <code>{name}</code></h2>
2075
+ <p>To write text that <em>looks</em> like a placeholder but should be left alone, use
2076
+ <strong>ICU apostrophe quoting</strong>:</p>
2077
+ <table>
2078
+ <thead>
2079
+ <tr>
2080
+ <th>You write</th>
2081
+ <th>You get</th>
2082
+ </tr>
2083
+ </thead>
2084
+ <tbody><tr>
2085
+ <td><code>&#39;{&#39;</code></td>
2086
+ <td>a literal <code>{</code></td>
2087
+ </tr>
2088
+ <tr>
2089
+ <td><code>&#39;{name}&#39;</code></td>
2090
+ <td>the literal text <code>{name}</code> (not a token)</td>
2091
+ </tr>
2092
+ <tr>
2093
+ <td><code>&#39;&#39;</code></td>
2094
+ <td>a literal apostrophe <code>&#39;</code></td>
2095
+ </tr>
2096
+ </tbody></table>
2097
+ <p>Quoted spans are treated as plain text, so <code>&#39;{name}&#39;</code> is never flagged by the
2098
+ checks or altered by AI translation. ARB output (ICU) preserves the quoting on
2099
+ round-trip.</p>
2100
+ <h2>ICU plural and select</h2>
2101
+ <p>ICU constructs like:</p>
2102
+ <pre><code>{count, plural, one {# item} other {# items}}
2103
+ {gender, select, male {he} female {she} other {they}}
2104
+ </code></pre>
2105
+ <p>are preserved structurally. The <code>icu-mismatch</code> rule flags a string where one side (source or translation) is an ICU plural/select and the other isn&#39;t. See also Plurals for the dedicated plural-key model.</p>
2106
+ <h2>Lossy conversions</h2>
2107
+ <p>Not every format can represent every construct. When export hits one it can&#39;t faithfully convert, it <strong>warns and writes safe output</strong> rather than emitting something broken:</p>
2108
+ <pre><code>warning [icu-unsupported] cart.items @ de: not representable in target format; wrote fallback
2109
+ </code></pre>
2110
+ <p>Treat these warnings as a prompt to simplify the string or pick a different adapter for that output.</p>
2111
+ <h2>Related</h2>
2112
+ <ul>
2113
+ <li>Plurals · Output Formats · Checks and Validation · How Translation Works</li>
2114
+ </ul>
2115
+ `,text:`Placeholders and ICU Translations must keep the machinery the source string carries: interpolation placeholders and ICU plural/select structure. Glotfile protects both during translation, validation, and export. One canonical form, converted on export Glotfile stores every placeholder in a single canonical form — — no matter what style the source file used. Import normalises to it; export converts it to each adapter's native style. So you edit and validate against one syntax, and each output file still gets the flavour its framework expects. Format Native style Example On import → stored On export ← stored --- --- --- --- --- Flutter ARB ICU named (already canonical) Vue I18n single braces (already canonical) Laravel colon Rails YAML percent-brace i18next double braces Angular XLIFF placeholder element A translation that drops, renames, or adds a placeholder relative to the source is: - rejected by AI translation (not written), and - flagged by the rule. Because everything is canonical internally, the editor and the checks only ever look for — they never mistake an unrelated colon or percent sign (a time like , a ratio ) for a placeholder. printf formats ( , in gettext and Apple ) are export-only and lossy — they sit outside the canonical guarantee. See Lossy conversions below. Escaping a literal To write text that looks like a placeholder but should be left alone, use ICU apostrophe quoting : You write You get --- --- a literal the literal text (not a token) a literal apostrophe Quoted spans are treated as plain text, so is never flagged by the checks or altered by AI translation. ARB output (ICU) preserves the quoting on round-trip. ICU plural and select ICU constructs like: are preserved structurally. The rule flags a string where one side (source or translation) is an ICU plural/select and the other isn't. See also Plurals for the dedicated plural-key model. Lossy conversions Not every format can represent every construct. When export hits one it can't faithfully convert, it warns and writes safe output rather than emitting something broken: Treat these warnings as a prompt to simplify the string or pick a different adapter for that output. Related - Plurals · Output Formats · Checks and Validation · How Translation Works`},{id:`guides/continuous-integration`,title:`Continuous Integration`,section:`Guides`,html:`<h1>Continuous Integration</h1>
2116
+ <p>Glotfile is built to run in CI so a broken or stale translation state can&#39;t reach <code>main</code>. The key command is <code>glotfile check</code>; <code>glotfile lint</code> gives you finer control.</p>
2117
+ <h2>The one-liner</h2>
2118
+ <p>Add a single step that validates the catalog <strong>and</strong> confirms exports are up to date:</p>
2119
+ <pre><code class="language-bash">glotfile check
2120
+ </code></pre>
2121
+ <p><code>check</code> exits non-zero if there are any errors — a lint error <em>or</em> an <code>output-stale</code> finding (someone changed copy but forgot to run <code>glotfile export</code>). That one command is usually all you need.</p>
2122
+ <blockquote>
2123
+ <p><strong>Tip:</strong> Why <code>check</code> over <code>export</code> + <code>git diff</code> — <code>check</code> re-exports in memory and compares to disk, so you don&#39;t need to write files and diff. It also catches catalog problems (placeholder mismatches, empty translations, glossary violations) that a diff wouldn&#39;t.</p>
2124
+ </blockquote>
2125
+ <h2>What gets gated</h2>
2126
+ <table>
2127
+ <thead>
2128
+ <tr>
2129
+ <th>Failure</th>
2130
+ <th>Caught by</th>
2131
+ <th>Default severity</th>
2132
+ </tr>
2133
+ </thead>
2134
+ <tbody><tr>
2135
+ <td>Empty source / empty translation</td>
2136
+ <td><code>lint</code>, <code>check</code></td>
2137
+ <td>error</td>
2138
+ </tr>
2139
+ <tr>
2140
+ <td>Placeholder or ICU mismatch</td>
2141
+ <td><code>lint</code>, <code>check</code></td>
2142
+ <td>error</td>
2143
+ </tr>
2144
+ <tr>
2145
+ <td>Glossary violation</td>
2146
+ <td><code>lint</code>, <code>check</code></td>
2147
+ <td>error</td>
2148
+ </tr>
2149
+ <tr>
2150
+ <td>Length / identical-to-source / whitespace / spelling</td>
2151
+ <td><code>lint</code>, <code>check</code></td>
2152
+ <td>warn</td>
2153
+ </tr>
2154
+ <tr>
2155
+ <td>Exported file missing or stale</td>
2156
+ <td><code>check</code> only</td>
2157
+ <td>error</td>
2158
+ </tr>
2159
+ </tbody></table>
2160
+ <p>Tune severities in <code>config.lint</code> — see Checks and Validation.</p>
2161
+ <h2>GitHub Actions</h2>
2162
+ <pre><code class="language-yaml">name: i18n
2163
+ on: [pull_request]
2164
+ jobs:
2165
+ glotfile:
2166
+ runs-on: ubuntu-latest
2167
+ steps:
2168
+ - uses: actions/checkout@v4
2169
+ - uses: actions/setup-node@v4
2170
+ with:
2171
+ node-version: 22
2172
+ - run: npx glotfile check
2173
+ </code></pre>
2174
+ <blockquote>
2175
+ <p><strong>Note:</strong> No credentials needed in CI — <code>check</code> and <code>lint</code> are fully offline — only translate needs an API key. Don&#39;t put translation secrets in CI just to validate.</p>
2176
+ </blockquote>
2177
+ <h2>Failing on warnings</h2>
2178
+ <p>By default only errors fail the build. To hold the line on warnings too:</p>
2179
+ <pre><code class="language-bash">glotfile lint --max-warnings 0
2180
+ </code></pre>
2181
+ <p><code>lint</code> exits <code>1</code> when warnings exceed the threshold. Combine with <code>check</code> (run both) if you want stale-export gating <em>and</em> zero warnings.</p>
2182
+ <h2>Code scanning (SARIF)</h2>
2183
+ <p>Emit SARIF and upload it so findings appear inline on the PR, each located at its line in <code>glotfile.json</code>:</p>
2184
+ <pre><code class="language-yaml"> - run: npx glotfile lint --format sarif &gt; glotfile.sarif
2185
+ continue-on-error: true
2186
+ - uses: github/codeql-action/upload-sarif@v3
2187
+ with:
2188
+ sarif_file: glotfile.sarif
2189
+ </code></pre>
2190
+ <p><code>--format json</code> is also available for custom tooling.</p>
2191
+ <h2>Scoping a run</h2>
2192
+ <pre><code class="language-bash">glotfile lint --rule placeholder-mismatch,icu-mismatch # only the critical rules
2193
+ glotfile lint --locale fr,de # only some locales
2194
+ </code></pre>
2195
+ <h2>Related</h2>
2196
+ <ul>
2197
+ <li>lint and check · Checks and Validation · export · Translation Workflow</li>
2198
+ </ul>
2199
+ `,text:`Continuous Integration Glotfile is built to run in CI so a broken or stale translation state can't reach . The key command is ; gives you finer control. The one-liner Add a single step that validates the catalog and confirms exports are up to date: exits non-zero if there are any errors — a lint error or an finding (someone changed copy but forgot to run ). That one command is usually all you need. Tip: Why over + — re-exports in memory and compares to disk, so you don't need to write files and diff. It also catches catalog problems (placeholder mismatches, empty translations, glossary violations) that a diff wouldn't. What gets gated Failure Caught by Default severity --- --- --- Empty source / empty translation , error Placeholder or ICU mismatch , error Glossary violation , error Length / identical-to-source / whitespace / spelling , warn Exported file missing or stale only error Tune severities in — see Checks and Validation. GitHub Actions Note: No credentials needed in CI — and are fully offline — only translate needs an API key. Don't put translation secrets in CI just to validate. Failing on warnings By default only errors fail the build. To hold the line on warnings too: exits when warnings exceed the threshold. Combine with (run both) if you want stale-export gating and zero warnings. Code scanning (SARIF) Emit SARIF and upload it so findings appear inline on the PR, each located at its line in : is also available for custom tooling. Scoping a run Related - lint and check · Checks and Validation · export · Translation Workflow`},{id:`guides/keeping-translations-fresh`,title:`Keeping Translations Fresh`,section:`Guides`,html:`<h1>Keeping Translations Fresh</h1>
2200
+ <p>A translation is only correct relative to the source string it was made from. When you edit a source string, its translations may no longer match — Glotfile tracks this so nothing drifts silently.</p>
2201
+ <h2>How staleness is detected</h2>
2202
+ <p>Each translated value records the <strong>source string it was translated from</strong> (the <code>source</code> field on the value). When you change a source string, any translation whose recorded source no longer matches is flagged <strong><code>needs-review</code></strong>. See Review States.</p>
2203
+ <blockquote>
2204
+ <p><strong>Example:</strong>
2205
+ <code>auth.signIn.button</code> source <code>&quot;Sign in&quot;</code> → <code>fr: &quot;Se connecter&quot;</code> (reviewed, source <code>&quot;Sign in&quot;</code>).
2206
+ You change the source to <code>&quot;Log in&quot;</code>. The French value is now marked <code>needs-review</code> — it was translated from text that no longer exists.</p>
2207
+ </blockquote>
2208
+ <h2>Finding stale translations</h2>
2209
+ <ul>
2210
+ <li>In the Editor, filter to <strong>needs-review</strong>.</li>
2211
+ <li>Analytics counts <code>needs-review</code> per locale.</li>
2212
+ </ul>
2213
+ <h2>Fixing them</h2>
2214
+ <ol>
2215
+ <li>Review the flagged value against the new source.</li>
2216
+ <li>Edit it directly and mark it <code>reviewed</code>, <strong>or</strong></li>
2217
+ <li>Re-translate: a bare <code>glotfile translate</code> only fills <strong>empty</strong> values, so it won&#39;t touch a <code>needs-review</code> value that still has text. To have the AI redo non-empty values, run <code>glotfile translate --all</code> (or clear the stale value first, then <code>glotfile translate</code>). Either way, a value still marked <code>reviewed</code> is protected — unmark it first to have the AI redo it.</li>
2218
+ </ol>
2219
+ <h2>Why not auto-overwrite?</h2>
2220
+ <p>Glotfile flags rather than silently re-translating because a source edit might be cosmetic (a typo fix that doesn&#39;t change meaning) or substantive (a different action entirely). Only you know which — so it surfaces the change and lets you decide.</p>
2221
+ <h2>Related</h2>
2222
+ <ul>
2223
+ <li>Review States · How Translation Works · Translation Workflow</li>
2224
+ </ul>
2225
+ `,text:`Keeping Translations Fresh A translation is only correct relative to the source string it was made from. When you edit a source string, its translations may no longer match — Glotfile tracks this so nothing drifts silently. How staleness is detected Each translated value records the source string it was translated from (the field on the value). When you change a source string, any translation whose recorded source no longer matches is flagged . See Review States. Example: source → (reviewed, source ). You change the source to . The French value is now marked — it was translated from text that no longer exists. Finding stale translations - In the Editor, filter to needs-review . - Analytics counts per locale. Fixing them 1. Review the flagged value against the new source. 2. Edit it directly and mark it , or 3. Re-translate: a bare only fills empty values, so it won't touch a value that still has text. To have the AI redo non-empty values, run (or clear the stale value first, then ). Either way, a value still marked is protected — unmark it first to have the AI redo it. Why not auto-overwrite? Glotfile flags rather than silently re-translating because a source edit might be cosmetic (a typo fix that doesn't change meaning) or substantive (a different action entirely). Only you know which — so it surfaces the change and lets you decide. Related - Review States · How Translation Works · Translation Workflow`},{id:`guides/translation-workflow`,title:`Translation Workflow`,section:`Guides`,html:`<h1>Translation Workflow</h1>
2226
+ <p>The day-to-day loop, end to end. This is the same flow as Quick Start, but with the <em>why</em> behind each step.</p>
2227
+ <h2>The loop</h2>
2228
+ <pre><code>author ──▶ translate ──▶ review ──▶ export ──▶ commit
2229
+ ▲ │
2230
+ └──────────────── next feature ───────────────┘
2231
+ </code></pre>
2232
+ <h3>1. Author source copy as you build</h3>
2233
+ <p>Run <code>glotfile serve</code> and add keys with their source strings in the Editor while you build a feature. Add a one-line context for anything ambiguous — it&#39;s the highest-leverage thing you can do for translation quality. Attach a screenshot for UI-heavy strings.</p>
2234
+ <h3>2. Fill the other languages</h3>
2235
+ <pre><code class="language-bash">glotfile translate
2236
+ </code></pre>
2237
+ <p>This fills only the empty values; pass <code>--all</code> to re-translate everything. Or use the Editor&#39;s translate action. New translations land as <code>machine</code>. See How Translation Works.</p>
2238
+ <h3>3. Review</h3>
2239
+ <p>Filter the Editor to <strong>machine</strong> and check the new translations. Promote good ones to <code>reviewed</code> (which protects them from being overwritten); flag the rest as <code>needs-review</code>. Watch the Analytics panel for reviewed-vs-translated coverage.</p>
2240
+ <h3>4. Export</h3>
2241
+ <pre><code class="language-bash">glotfile export
2242
+ </code></pre>
2243
+ <p>This regenerates your apps&#39; locale files from the catalog. See Output Formats.</p>
2244
+ <h3>5. Commit</h3>
2245
+ <p>Commit <code>glotfile.json</code> together with your code and the regenerated locale files. The diff <em>is</em> the review:</p>
2246
+ <pre><code class="language-bash">git add glotfile.json lib/l10n/
2247
+ git commit -m &quot;Checkout copy + translations&quot;
2248
+ </code></pre>
2249
+ <h2>Why git-native pays off</h2>
2250
+ <p>Because the catalog is just a file in your repo:</p>
2251
+ <ul>
2252
+ <li><strong>Branching</strong> — translations live on the feature branch with the code that needs them.</li>
2253
+ <li><strong>Pull-request review</strong> — reviewers see copy changes as a normal diff.</li>
2254
+ <li><strong>Rollback</strong> — reverting a commit reverts the copy too.</li>
2255
+ <li><strong>No drift</strong> — CI can fail the build if exports are stale or the catalog has problems.</li>
2256
+ </ul>
2257
+ <h2>Related</h2>
2258
+ <ul>
2259
+ <li>Continuous Integration · Keeping Translations Fresh · How Translation Works · Review States</li>
2260
+ </ul>
2261
+ `,text:`Translation Workflow The day-to-day loop, end to end. This is the same flow as Quick Start, but with the why behind each step. The loop 1. Author source copy as you build Run and add keys with their source strings in the Editor while you build a feature. Add a one-line context for anything ambiguous — it's the highest-leverage thing you can do for translation quality. Attach a screenshot for UI-heavy strings. 2. Fill the other languages This fills only the empty values; pass to re-translate everything. Or use the Editor's translate action. New translations land as . See How Translation Works. 3. Review Filter the Editor to machine and check the new translations. Promote good ones to (which protects them from being overwritten); flag the rest as . Watch the Analytics panel for reviewed-vs-translated coverage. 4. Export This regenerates your apps' locale files from the catalog. See Output Formats. 5. Commit Commit together with your code and the regenerated locale files. The diff is the review: Why git-native pays off Because the catalog is just a file in your repo: - Branching — translations live on the feature branch with the code that needs them. - Pull-request review — reviewers see copy changes as a normal diff. - Rollback — reverting a commit reverts the copy too. - No drift — CI can fail the build if exports are stale or the catalog has problems. Related - Continuous Integration · Keeping Translations Fresh · How Translation Works · Review States`},{id:`troubleshooting-and-faq`,title:`Troubleshooting and FAQ`,section:`Help`,html:`<h1>Troubleshooting and FAQ</h1>
2262
+ <h2>Setup</h2>
2263
+ <p><strong><code>glotfile: command not found</code></strong>
2264
+ It&#39;s pre-1.0 and not yet on npm. Run from a checkout: <code>npm install &amp;&amp; npm run build &amp;&amp; node bin/glotfile.js</code>. See Installation.</p>
2265
+ <p><strong>Wrong Node version</strong>
2266
+ Glotfile needs Node <code>^20.19.0 || &gt;=22.12.0</code>. Check with <code>node -v</code>.</p>
2267
+ <h2>Translation</h2>
2268
+ <p><strong>&quot;Install the SDK for this provider&quot;</strong>
2269
+ OpenAI, OpenRouter, and Bedrock need an optional SDK. Install the one for your provider — <code>npm i openai</code> (OpenAI or OpenRouter) or <code>npm i @aws-sdk/client-bedrock-runtime</code> (Bedrock). See AI Providers.</p>
2270
+ <p><strong>No API key / auth errors</strong>
2271
+ Set the provider&#39;s credentials in your environment or a local <code>.env</code>: <code>ANTHROPIC_API_KEY</code>, <code>OPENAI_API_KEY</code>, <code>OPENROUTER_API_KEY</code>, or the AWS chain. See AI Providers.</p>
2272
+ <p><strong>A translation was skipped</strong>
2273
+ The result failed validation — a dropped placeholder, broken ICU, or an over-length value. Glotfile prints the reason and leaves the value untranslated. See Placeholders and ICU and How Translation Works.</p>
2274
+ <p><strong>My reviewed translation didn&#39;t change after <code>translate</code></strong>
2275
+ That&#39;s intentional — <code>reviewed</code> values are protected from being overwritten. Unmark it first to re-translate.</p>
2276
+ <p><strong>Screenshots seem ignored</strong>
2277
+ The selected model may not support vision (e.g. Bedrock Meta Llama text models). The run proceeds text-only and warns how many screenshots were skipped. See Screenshots.</p>
2278
+ <h2>Validation and CI</h2>
2279
+ <p><strong><code>check</code> fails with <code>output-stale</code></strong>
2280
+ Your exported files don&#39;t match the catalog. Run <code>glotfile export</code> and commit the result. See Continuous Integration.</p>
2281
+ <p><strong>Spelling flags real words</strong>
2282
+ Add them to the custom dictionary in Settings (<code>config.spelling.customWords</code>). The same list silences both the editor&#39;s live spell check and the <code>spelling</code> lint rule. Glossary terms are accepted automatically. See Checks and Validation.</p>
2283
+ <p><strong>A rule is too noisy</strong>
2284
+ Override its severity (or turn it off) in <code>config.lint.rules</code>, or <code>ignore</code> certain key globs. See Configuration Reference.</p>
2285
+ <h2>Files and git</h2>
2286
+ <p><strong>Can I edit <code>glotfile.json</code> by hand?</strong>
2287
+ You can, but you rarely need to — the UI writes it for you, deterministically. If you do edit it, keep it valid: it&#39;s validated on load. See The State File.</p>
2288
+ <p><strong>Big diffs on every save</strong>
2289
+ Check <code>config.format</code> (<code>indent</code>, <code>sortKeys</code>, <code>finalNewline</code>). Deterministic formatting keeps diffs minimal. See The State File.</p>
2290
+ <h2>General</h2>
2291
+ <p><strong>Do I already have translations I can import?</strong>
2292
+ Import existing locale files with <code>glotfile import</code> — see import. You can also add keys via the Editor.</p>
2293
+ <p><strong>Does anything leave my machine?</strong>
2294
+ Only the AI calls you trigger. The UI is local-only; no credentials or screenshot bytes are ever logged. See AI Log.</p>
2295
+ <h2>Related</h2>
2296
+ <ul>
2297
+ <li>Home · Installation · AI Providers · Continuous Integration</li>
2298
+ </ul>
2299
+ `,text:`Troubleshooting and FAQ Setup It's pre-1.0 and not yet on npm. Run from a checkout: . See Installation. Wrong Node version Glotfile needs Node . Check with . Translation "Install the SDK for this provider" OpenAI, OpenRouter, and Bedrock need an optional SDK. Install the one for your provider — (OpenAI or OpenRouter) or (Bedrock). See AI Providers. No API key / auth errors Set the provider's credentials in your environment or a local : , , , or the AWS chain. See AI Providers. A translation was skipped The result failed validation — a dropped placeholder, broken ICU, or an over-length value. Glotfile prints the reason and leaves the value untranslated. See Placeholders and ICU and How Translation Works. My reviewed translation didn't change after That's intentional — values are protected from being overwritten. Unmark it first to re-translate. Screenshots seem ignored The selected model may not support vision (e.g. Bedrock Meta Llama text models). The run proceeds text-only and warns how many screenshots were skipped. See Screenshots. Validation and CI fails with Your exported files don't match the catalog. Run and commit the result. See Continuous Integration. Spelling flags real words Add them to the custom dictionary in Settings ( ). The same list silences both the editor's live spell check and the lint rule. Glossary terms are accepted automatically. See Checks and Validation. A rule is too noisy Override its severity (or turn it off) in , or certain key globs. See Configuration Reference. Files and git Can I edit by hand? You can, but you rarely need to — the UI writes it for you, deterministically. If you do edit it, keep it valid: it's validated on load. See The State File. Big diffs on every save Check ( , , ). Deterministic formatting keeps diffs minimal. See The State File. General Do I already have translations I can import? Import existing locale files with — see import. You can also add keys via the Editor. Does anything leave my machine? Only the AI calls you trigger. The UI is local-only; no credentials or screenshot bytes are ever logged. See AI Log. Related - Home · Installation · AI Providers · Continuous Integration`}],zF={class:`flex min-h-0 flex-1 overflow-hidden`},BF={class:`flex w-56 shrink-0 flex-col overflow-hidden border-r bg-muted/30`},VF={class:`relative shrink-0 px-2 py-2`},HF={key:0,class:`flex flex-col gap-1 overflow-y-auto px-2 pb-3`},UF={class:`px-2 py-1 text-xs text-muted-foreground`},WF=[`onClick`],GF={class:`text-sm font-medium`},KF={key:0,class:`text-[10px] uppercase tracking-wider text-muted-foreground`},qF={key:1,class:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`},JF={class:`bg-primary/20 text-foreground`},YF={key:1,class:`flex flex-col gap-1 overflow-y-auto px-2 pb-3`},XF=[`onClick`],ZF={class:`min-w-0 flex-1 overflow-y-auto`},QF=[`innerHTML`],$F=F({__name:`DocsView`,setup(e){let t=[``,`Getting Started`,`Web UI`,`CLI`,`Concepts`,`AI Translation`,`Reference`,`Guides`,`Help`],n=M(RF[0]?.id??``),r=M(``),i=q(()=>{let e=new Map;for(let n of t)e.set(n,[]);for(let t of RF)e.has(t.section)||e.set(t.section,[]),e.get(t.section).push(t);return t.map(t=>({section:t,pages:e.get(t)??[]})).filter(e=>e.pages.length>0)}),a=q(()=>{let e=r.value.trim().toLowerCase();if(!e)return[];let t=[];for(let n of RF){let r=n.text.toLowerCase(),i=n.title.toLowerCase().includes(e),a=r.indexOf(e);if(a===-1&&!i)continue;if(a===-1){t.push({id:n.id,title:n.title,section:n.section,before:``,match:``,after:``});continue}let o=Math.max(0,a-40),s=Math.min(n.text.length,a+e.length+80);t.push({id:n.id,title:n.title,section:n.section,before:(o>0?`…`:``)+n.text.slice(o,a),match:n.text.slice(a,a+e.length),after:n.text.slice(a+e.length,s)+(s<n.text.length?`…`:``)})}return t}),o=q(()=>RF.find(e=>e.id===n.value)??RF[0]);function s(e){n.value=e,r.value=``}return(e,t)=>(z(),B(`div`,zF,[H(`nav`,BF,[H(`div`,VF,[U(N(pd),{class:`pointer-events-none absolute left-4 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),gr(H(`input`,{"onUpdate:modelValue":t[0]||=e=>r.value=e,type:`search`,placeholder:`Search docs…`,class:`w-full rounded-md border bg-background py-1 pl-7 pr-7 text-sm outline-none focus:ring-2 focus:ring-ring`},null,512),[[Pl,r.value]]),r.value?(z(),B(`button`,{key:0,type:`button`,class:`absolute right-4 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:t[1]||=e=>r.value=``},[U(N(kd),{class:`size-3.5`})])):G(``,!0)]),r.value.trim()?(z(),B(`div`,HF,[H(`div`,UF,j(a.value.length)+` result`+j(a.value.length===1?``:`s`),1),(z(!0),B(R,null,I(a.value,e=>(z(),B(`button`,{key:e.id,type:`button`,class:`w-full rounded-md px-2 py-1.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground`,onClick:t=>s(e.id)},[H(`div`,GF,j(e.title),1),e.section?(z(),B(`div`,KF,j(e.section),1)):G(``,!0),e.match?(z(),B(`div`,qF,[W(j(e.before),1),H(`mark`,JF,j(e.match),1),W(j(e.after),1)])):G(``,!0)],8,WF))),128))])):(z(),B(`div`,YF,[(z(!0),B(R,null,I(i.value,(e,t)=>(z(),B(R,{key:e.section},[e.section?(z(),B(`div`,{key:0,class:A([`px-2 pb-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,t>0?`mt-3`:``])},j(e.section),3)):G(``,!0),(z(!0),B(R,null,I(e.pages,e=>(z(),B(`button`,{key:e.id,type:`button`,class:A([`w-full rounded-md px-2 py-1 text-left text-sm transition-colors`,n.value===e.id?`bg-primary text-primary-foreground`:`text-foreground hover:bg-accent hover:text-accent-foreground`]),onClick:t=>n.value=e.id},j(e.title),11,XF))),128))],64))),128))]))]),H(`div`,ZF,[H(`div`,{class:`prose prose-sm dark:prose-invert mx-auto max-w-3xl px-8 py-6`,innerHTML:o.value?.html},null,8,QF)])]))}}),eI={en:`English`,fr:`French`,de:`German`,es:`Spanish`,pt:`Portuguese`,it:`Italian`,nl:`Dutch`,ca:`Catalan`,pl:`Polish`,ru:`Russian`,uk:`Ukrainian`,cs:`Czech`,sk:`Slovak`,sv:`Swedish`,da:`Danish`,no:`Norwegian`,nb:`Norwegian Bokmål`,fi:`Finnish`,tr:`Turkish`,el:`Greek`,ro:`Romanian`,hu:`Hungarian`,bg:`Bulgarian`,hr:`Croatian`,sr:`Serbian`,sl:`Slovenian`,ja:`Japanese`,ko:`Korean`,zh:`Chinese`,ar:`Arabic`,he:`Hebrew`,hi:`Hindi`,th:`Thai`,vi:`Vietnamese`,id:`Indonesian`,ms:`Malay`,fa:`Persian`};function tI(e){let[t=``,n]=e.split(/[-_]/),r=t.toLowerCase(),i=n&&/^[A-Za-z]{2}$/.test(n)?n.toUpperCase():void 0,a=eI[r]??e;return{code:e,name:i?`${a} (${i})`:a}}var nI={class:`p-6`},rI={class:`flex items-start gap-3 pr-6`},iI={class:`grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-primary/25 bg-primary/10 font-mono text-[13px] font-semibold leading-none tracking-tight text-primary`},aI={class:`min-w-0`},oI={class:`font-medium text-foreground`},sI={class:`font-mono text-[12px]`},cI={class:`mt-4 flex items-center gap-4 rounded-lg border border-border bg-muted/40 px-3.5 py-2.5`},lI={class:`flex flex-col`},uI={class:`text-[17px] font-semibold leading-none tabular-nums`},dI={class:`flex flex-col`},fI={class:`text-[17px] font-semibold leading-none tabular-nums`},pI={class:`ml-auto flex items-center gap-1.5 whitespace-nowrap text-[11px] text-muted-foreground`},mI={class:`mt-5`},hI={class:`!flex min-w-0 items-center gap-2`},gI={class:`font-mono text-[13px]`},_I={class:`truncate text-[13px] text-muted-foreground`},vI={class:`flex items-center gap-2`},yI={class:`font-mono text-[13px]`},bI={class:`text-[13px] text-muted-foreground`},xI={class:`mt-4`},SI={class:`flex items-center justify-between`},CI={class:`whitespace-nowrap text-[12px] tabular-nums text-muted-foreground`},wI={class:`mt-1.5 flex flex-wrap gap-1.5 rounded-lg border border-border bg-muted/30 p-2.5`},TI=[`disabled`,`onClick`],EI={class:`font-mono`},DI={key:0,class:`ml-0.5 rounded-sm bg-primary/15 px-1 text-[9px] font-semibold uppercase tracking-wide text-primary`},OI={key:0,class:`mt-4`},kI={class:`overflow-hidden rounded-lg border border-border`},AI={class:`ml-auto font-mono text-[11px] text-muted-foreground/70`},jI={key:0,class:`divide-y divide-border border-t border-border gf-content-fade`},MI={class:`shrink-0 font-mono text-foreground`},NI={class:`ml-auto truncate text-right text-muted-foreground`},PI={key:0,class:`px-3 py-1.5 text-[11px] text-muted-foreground/70`},FI={class:`flex items-center gap-2 border-t border-border px-6 py-4`},II={class:`ml-1 flex cursor-pointer select-none items-center gap-1.5 text-[12px] text-muted-foreground`},LI={class:`ml-auto`},RI={class:`flex flex-col items-center justify-center gap-4 p-6 py-8 text-center`},zI={key:0,class:`mt-1 text-[13px] text-muted-foreground`},BI={class:`p-6`},VI={class:`flex flex-col items-center gap-3 pt-1 text-center`},HI={class:`grid h-12 w-12 place-items-center rounded-full bg-success-bg text-success ring-1 ring-success-border`},UI={class:`font-semibold text-foreground tabular-nums`},WI={class:`font-semibold text-foreground`},GI={key:0,class:`mt-5 overflow-hidden rounded-lg border border-warning-border bg-warning-bg/60`},KI={class:`whitespace-nowrap text-[13px] font-medium text-warning`},qI={key:0,class:`max-h-44 divide-y divide-warning-border/40 overflow-auto border-t border-warning-border/70 gf-content-fade`},JI={class:`flex items-center border-t border-border px-6 py-4`},YI={class:`ml-auto`},XI={class:`p-6`},ZI={class:`flex items-start gap-3 pr-6`},QI={class:`grid h-10 w-10 shrink-0 place-items-center rounded-full bg-destructive-soft text-destructive`},$I={class:`min-w-0`},eL={class:`flex items-center border-t border-border px-6 py-4`},tL={class:`ml-auto`},nL=F({__name:`ImportWizard`,emits:[`dismiss`,`imported`],setup(e,{expose:t,emit:n}){let r=n,i=M(!0),a=M(`confirm`),o=M(null),s=M(``),c=M({}),l=M(!1),u=M(!1),d=M(null),f=M(``),p=M(!0);t({init:m});async function m(){try{let e=await Lf();if(!e.found){r(`dismiss`);return}o.value=e,s.value=e.sourceLocale}catch{r(`dismiss`)}}let h={"laravel-php":{label:`Laravel PHP`,glyph:`</>`,file:`lang/{locale}/*.php`},"vue-i18n-json":{label:`Vue i18n JSON`,glyph:`{ }`,file:`locales/{locale}.json`},"flutter-arb":{label:`Flutter ARB`,glyph:`arb`,file:`lib/l10n/app_{locale}.arb`},"apple-strings":{label:`Apple .strings`,glyph:``,file:`{locale}.lproj/Localizable.strings`}},g=q(()=>h[o.value?.format??``]??{label:o.value?.format??``,glyph:`{}`,file:``});function _(e){return e===s.value||!c.value[e]}function v(e){e!==s.value&&(c.value={...c.value,[e]:!c.value[e]})}let y=q(()=>o.value?o.value.locales.filter(_):[]),b=q(()=>y.value.length),x=q(()=>o.value?Math.max(0,o.value.keyCount-o.value.sampleKeys.length):0);async function S(){if(o.value){a.value=`importing`;try{d.value=await Rf({format:o.value.format,sourceLocale:s.value,locales:y.value,cldr:p.value}),a.value=`done`}catch(e){f.value=e.message,a.value=`error`}}}function C(e){e||a.value!==`importing`&&(a.value===`done`?r(`imported`):r(`dismiss`))}return(e,t)=>(z(),V(N(Ph),{open:i.value,"onUpdate:open":C},{default:P(()=>[U(N(xg),null,{default:P(()=>[U(N(yg),{class:`fixed inset-0 z-50 bg-foreground/40 gf-content-fade`}),U(N(gg),{class:`fixed left-1/2 top-1/2 z-50 w-[28rem] max-w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-card text-card-foreground shadow-2xl focus:outline-none gf-content-fade`,onInteractOutside:t[9]||=Jl(()=>{},[`prevent`])},{default:P(()=>[a.value===`confirm`&&o.value?(z(),B(R,{key:0},[H(`button`,{type:`button`,class:`absolute right-3.5 top-3.5 z-10 grid h-7 w-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,onClick:t[0]||=e=>r(`dismiss`)},[U(N(kd),{class:`size-4`})]),H(`div`,nI,[H(`div`,rI,[H(`div`,iI,j(g.value.glyph),1),H(`div`,aI,[U(N(Sg),{class:`text-base font-semibold leading-tight`},{default:P(()=>[...t[10]||=[W(`Import your translations`,-1)]]),_:1}),U(N(_g),{class:`mt-0.5 text-[13px] text-muted-foreground`},{default:P(()=>[t[11]||=W(` Found a `,-1),H(`span`,oI,j(g.value.label),1),t[12]||=W(` setup in `,-1),H(`span`,sI,j(g.value.file),1),t[13]||=W(`. `,-1)]),_:1})])]),H(`div`,cI,[H(`div`,lI,[H(`span`,uI,j(o.value.keyCount.toLocaleString()),1),t[14]||=H(`span`,{class:`mt-1 whitespace-nowrap text-[11px] text-muted-foreground`},`keys detected`,-1)]),t[17]||=H(`div`,{class:`h-7 w-px bg-border`},null,-1),H(`div`,dI,[H(`span`,fI,j(o.value.locales.length),1),t[15]||=H(`span`,{class:`mt-1 whitespace-nowrap text-[11px] text-muted-foreground`},`locales`,-1)]),H(`div`,pI,[U(N(Gu),{class:`size-3.5 opacity-70`}),t[16]||=W(` Detected automatically `,-1)])]),H(`div`,mI,[U(N(DC),{class:`flex items-center gap-1.5 whitespace-nowrap`},{default:P(()=>[...t[18]||=[W(` Source language `,-1),H(`span`,{class:`text-[12px] font-normal text-muted-foreground`},`· the original text`,-1)]]),_:1}),U(N(Tb),{modelValue:s.value,"onUpdate:modelValue":t[1]||=e=>s.value=e},{default:P(()=>[U(N(qS),{class:`mt-1.5`},{default:P(()=>[H(`span`,hI,[U(Ew,{code:s.value,size:14},null,8,[`code`]),H(`span`,gI,j(s.value),1),H(`span`,_I,j(N(tI)(s.value).name),1)])]),_:1}),U(N(JS),null,{default:P(()=>[(z(!0),B(R,null,I(o.value.locales,e=>(z(),V(N(XS),{key:e,value:e},{default:P(()=>[H(`span`,vI,[U(Ew,{code:e,size:14},null,8,[`code`]),H(`span`,yI,j(e),1),H(`span`,bI,j(N(tI)(e).name),1)])]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`modelValue`])]),H(`div`,xI,[H(`div`,SI,[U(N(DC),{class:`whitespace-nowrap`},{default:P(()=>[...t[19]||=[W(`Locales to import`,-1)]]),_:1}),H(`span`,CI,j(b.value)+` of `+j(o.value.locales.length),1)]),H(`div`,wI,[(z(!0),B(R,null,I(o.value.locales,e=>(z(),V(N(dx),{key:e},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,disabled:e===s.value,class:A([`group inline-flex h-7 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-md border pl-1.5 pr-2 text-[12px] transition-colors`,e===s.value?`border-primary/40 bg-primary/10 cursor-default`:_(e)?`border-input bg-card text-foreground hover:bg-muted`:`border-dashed border-border bg-transparent text-muted-foreground hover:bg-muted/50`]),onClick:t=>v(e)},[U(Ew,{code:e,size:14},null,8,[`code`]),H(`span`,EI,j(e),1),e===s.value?(z(),B(`span`,DI,`src`)):(z(),B(`span`,{key:1,class:A([`grid size-3.5 place-items-center rounded-[3px] border`,_(e)?`border-primary bg-primary text-primary-foreground`:`border-border text-transparent`])},[U(N(Du),{class:`size-2.5`,"stroke-width":3})],2))],10,TI)]),_:2},1024),U(N(HC),null,{default:P(()=>[W(j(e===s.value?`Source language — always imported`:_(e)?`Click to exclude`:`Click to include`),1)]),_:2},1024)]),_:2},1024))),128))])]),o.value.sampleKeys.length?(z(),B(`div`,OI,[H(`div`,kI,[H(`button`,{type:`button`,class:`flex w-full items-center gap-2 px-3 py-2 text-[13px] text-muted-foreground transition-colors hover:bg-muted/50`,onClick:t[2]||=e=>l.value=!l.value},[U(N(ku),{class:A([`size-3.5 shrink-0 transition-transform`,l.value?`rotate-90`:``])},null,8,[`class`]),t[20]||=H(`span`,{class:`whitespace-nowrap`},`Preview sample keys`,-1),H(`span`,AI,j(g.value.glyph),1)]),l.value?(z(),B(`div`,jI,[(z(!0),B(R,null,I(o.value.sampleKeys,e=>(z(),B(`div`,{key:e.key,class:`flex items-baseline gap-3 px-3 py-1.5 text-[12px]`},[H(`span`,MI,j(e.key),1),H(`span`,NI,j(e.value),1)]))),128)),x.value>0?(z(),B(`div`,PI,` + `+j(x.value.toLocaleString())+` more keys `,1)):G(``,!0)])):G(``,!0)])])):G(``,!0)]),H(`div`,FI,[U(N(Q),{variant:`ghost`,size:`sm`,onClick:t[3]||=e=>r(`dismiss`)},{default:P(()=>[...t[21]||=[W(`Skip`,-1)]]),_:1}),U(N(dx),null,{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`label`,II,[gr(H(`input`,{type:`checkbox`,"data-testid":`cldr-toggle`,"onUpdate:modelValue":t[4]||=e=>p.value=e,class:`size-3.5 accent-primary`},null,512),[[Fl,p.value]]),t[22]||=W(` Convert plurals to CLDR categories `,-1)])]),_:1}),U(N(HC),{class:`max-w-xs`},{default:P(()=>[...t[23]||=[W(`Rewrite exact =N plural selectors (e.g. =1) into each language's CLDR plural categories, the way Crowdin does.`,-1)]]),_:1})]),_:1}),H(`div`,LI,[U(N(Q),{"data-testid":`import-btn`,disabled:b.value===0,onClick:S},{default:P(()=>[U(N(Ad),{class:`size-4`}),W(` Import `+j(b.value)+` `+j(b.value===1?`locale`:`locales`),1)]),_:1},8,[`disabled`])])])],64)):a.value===`importing`?(z(),B(R,{key:1},[U(N(Sg),{class:`sr-only`},{default:P(()=>[...t[24]||=[W(`Importing translations`,-1)]]),_:1}),H(`div`,RI,[U(N($u),{class:`size-10 text-primary gf-spin`}),H(`div`,null,[t[25]||=H(`div`,{class:`text-sm font-semibold`},`Importing translations…`,-1),o.value?(z(),B(`div`,zI,` Reading `+j(o.value.keyCount.toLocaleString())+` keys across `+j(b.value)+` locales `,1)):G(``,!0)])])],64)):a.value===`done`&&d.value?(z(),B(R,{key:2},[H(`div`,BI,[H(`div`,VI,[H(`div`,HI,[U(N(Du),{class:`size-6`,"stroke-width":2.5})]),H(`div`,null,[U(N(Sg),{class:`text-base font-semibold`},{default:P(()=>[...t[26]||=[W(`Import complete`,-1)]]),_:1}),U(N(_g),{class:`mt-1 text-[13px] text-muted-foreground`},{default:P(()=>[H(`span`,UI,j(d.value.keyCount.toLocaleString())+` keys`,1),t[27]||=W(` across `,-1),H(`span`,WI,j(d.value.localeCount)+` locales`,1),t[28]||=W(` imported. `,-1)]),_:1})])]),d.value.warnings.length?(z(),B(`div`,GI,[H(`button`,{type:`button`,class:`flex w-full items-center gap-2 px-3 py-2.5 text-left`,onClick:t[5]||=e=>u.value=!u.value},[U(N(Td),{class:`size-3.5 shrink-0 text-warning`}),H(`span`,KI,j(d.value.warnings.length)+` `+j(d.value.warnings.length===1?`warning`:`warnings`),1),t[29]||=H(`span`,{class:`whitespace-nowrap text-[12px] text-warning/70`},`· import still succeeded`,-1),U(N(ku),{class:A([`ml-auto size-3.5 shrink-0 text-warning transition-transform`,u.value?`rotate-90`:``])},null,8,[`class`])]),u.value?(z(),B(`ul`,qI,[(z(!0),B(R,null,I(d.value.warnings,(e,t)=>(z(),B(`li`,{key:t,class:`px-3 py-2 text-[12px] text-muted-foreground`},j(e),1))),128))])):G(``,!0)])):G(``,!0)]),H(`div`,JI,[H(`div`,YI,[U(N(Q),{onClick:t[6]||=e=>r(`imported`)},{default:P(()=>[t[30]||=W(`Open editor `,-1),U(N(bu),{class:`size-4`})]),_:1})])])],64)):a.value===`error`?(z(),B(R,{key:3},[H(`button`,{type:`button`,class:`absolute right-3.5 top-3.5 z-10 grid h-7 w-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,onClick:t[7]||=e=>r(`dismiss`)},[U(N(kd),{class:`size-4`})]),H(`div`,XI,[H(`div`,ZI,[H(`div`,QI,[U(N(Td),{class:`size-5`})]),H(`div`,$I,[U(N(Sg),{class:`text-base font-semibold`},{default:P(()=>[...t[31]||=[W(`Couldn't import translations`,-1)]]),_:1}),U(N(_g),{class:`mt-1 text-[13px] text-muted-foreground`},{default:P(()=>[W(j(f.value),1)]),_:1})])])]),H(`div`,eL,[H(`div`,tL,[U(N(Q),{variant:`outline`,onClick:t[8]||=e=>r(`dismiss`)},{default:P(()=>[...t[32]||=[W(`Dismiss`,-1)]]),_:1})])])],64)):G(``,!0)]),_:1})]),_:1})]),_:1},8,[`open`]))}}),rL=`glotfile-theme`,iL=[`system`,`light`,`dark`],aL=e=>iL.includes(e);function oL(){let e=localStorage.getItem(rL);return aL(e)?e:`system`}var sL=window.matchMedia(`(prefers-color-scheme: dark)`),cL=M(sL.matches);sL.addEventListener(`change`,e=>{cL.value=e.matches});var lL=M(oL()),uL=q(()=>lL.value===`system`?cL.value:lL.value===`dark`);function dL(){document.documentElement.classList.toggle(`dark`,uL.value)}function fL(){Er(uL,dL,{immediate:!0,flush:`sync`})}function pL(e){lL.value=e,localStorage.setItem(rL,e),uf({theme:e}).catch(()=>{})}async function mL(){try{let{theme:e}=await lf();aL(e)&&e!==lL.value&&(lL.value=e,localStorage.setItem(rL,e))}catch{}}var hL={class:`flex flex-col items-center gap-0.5 rounded-lg bg-black/15 p-0.5`},gL=[`data-mode`,`aria-label`,`aria-pressed`,`onClick`],_L=F({__name:`ThemeToggle`,setup(e){let t=[{value:`light`,label:`Light`,icon:xd},{value:`system`,label:`System`,icon:nd},{value:`dark`,label:`Dark`,icon:rd}];return(e,n)=>(z(),B(`div`,hL,[(z(),B(R,null,I(t,e=>U(N(dx),{key:e.value},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,"data-mode":e.value,"aria-label":e.label,"aria-pressed":N(lL)===e.value,class:A(N(US)(`flex size-8 items-center justify-center rounded-md transition-colors`,N(lL)===e.value?`bg-primary text-primary-foreground`:`text-rail-foreground/70 hover:bg-white/10 hover:text-rail-foreground`)),onClick:t=>N(pL)(e.value)},[(z(),V(ia(e.icon),{class:`size-4`}))],10,gL)]),_:2},1024),U(N(HC),{side:`right`},{default:P(()=>[W(j(e.label),1)]),_:2},1024)]),_:2},1024)),64))]))}}),vL=F({__name:`Kbd`,props:{class:{}},setup(e){return(e,t)=>(z(),B(`kbd`,{class:A(N(US)(`inline-flex h-5 min-w-5 items-center justify-center rounded border bg-muted px-1.5 font-mono text-xs font-medium text-muted-foreground`,e.$props.class))},[L(e.$slots,`default`)],2))}}),yL=[{route:`editor`,keys:[`g`,`e`],label:`Editor`},{route:`analytics`,keys:[`g`,`a`],label:`Analytics`},{route:`glossary`,keys:[`g`,`g`],label:`Glossary`},{route:`screenshots`,keys:[`g`,`i`],label:`Screenshots`},{route:`settings`,keys:[`g`,`s`],label:`Settings`},{route:`activity`,keys:[`g`,`l`],label:`Activity`},{route:`docs`,keys:[`g`,`d`],label:`Docs`}];function bL(e,t){if(e.pending===`g`){let e=yL.find(e=>e.keys[1]===t);return{state:{pending:null},action:e?{type:`navigate`,route:e.route}:null}}return t===`g`?{state:{pending:`g`},action:null}:t===`?`?{state:{pending:null},action:{type:`toggleHelp`}}:{state:{pending:null},action:null}}var xL={class:`flex w-14 shrink-0 flex-col items-center gap-1 bg-rail py-3 text-rail-foreground`},SL=[`aria-label`,`onClick`],CL={key:0,class:`flex items-center gap-0.5`},wL={class:`mt-auto flex flex-col items-center gap-1.5`},TL={class:`font-mono text-[10px] text-rail-foreground/50`},EL=F({__name:`NavRail`,setup(e){let t=Mp(),n=[{id:`editor`,label:`Editor`,icon:Zu},{id:`analytics`,label:`Analytics`,icon:Eu},{id:`glossary`,label:`Glossary`,icon:Tu},{id:`screenshots`,label:`Screenshots`,icon:Yu},{id:`settings`,label:`Settings`,icon:md},{id:`activity`,label:`Activity`,icon:fd},{id:`docs`,label:`Docs`,icon:Cu}].map(e=>({...e,keys:yL.find(t=>t.route===e.id)?.keys}));return(e,r)=>(z(),V(N(sx),{"delay-duration":300},{default:P(()=>[H(`nav`,xL,[r[0]||=H(`div`,{class:`mb-3 flex size-9 items-center justify-center rounded-md bg-primary font-mono text-base font-semibold text-primary-foreground`},` G `,-1),(z(!0),B(R,null,I(N(n),e=>(z(),V(N(dx),{key:e.id},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,"aria-label":e.label,class:A(N(US)(`relative flex size-10 items-center justify-center rounded-md transition-colors`,N(t)===e.id?`bg-primary text-primary-foreground`:`text-rail-foreground/70 hover:bg-white/10 hover:text-rail-foreground`)),onClick:t=>N(jp)(e.id)},[(z(),V(ia(e.icon),{class:`size-5`}))],10,SL)]),_:2},1024),U(N(HC),{side:`right`,class:`flex items-center gap-2`},{default:P(()=>[H(`span`,null,j(e.label),1),e.keys?(z(),B(`span`,CL,[(z(!0),B(R,null,I(e.keys,(e,t)=>(z(),V(vL,{key:t},{default:P(()=>[W(j(e),1)]),_:2},1024))),128))])):G(``,!0)]),_:2},1024)]),_:2},1024))),128)),H(`div`,wL,[U(_L),H(`span`,TL,`v`+j(N(`0.8.0`)),1)])])]),_:1}))}}),DL={class:`flex flex-col gap-1`},OL={class:`flex items-center gap-1`},kL={class:`flex items-center justify-between py-1 text-sm`},AL={class:`flex items-center gap-1`},jL=F({__name:`ShortcutsDialog`,props:{open:{type:Boolean,required:!0},openModifiers:{}},emits:[`update:open`],setup(e){let t=Xa(e,`open`);return(e,n)=>(z(),V(N(Ph),{open:t.value,"onUpdate:open":n[0]||=e=>t.value=e},{default:P(()=>[U(N(OC),{class:`max-w-sm`},{default:P(()=>[U(N(kC),null,{default:P(()=>[U(N(jC),null,{default:P(()=>[...n[1]||=[W(`Keyboard shortcuts`,-1)]]),_:1})]),_:1}),H(`ul`,DL,[(z(!0),B(R,null,I(N(yL),e=>(z(),B(`li`,{key:e.route,class:`flex items-center justify-between py-1 text-sm`},[H(`span`,null,j(e.label),1),H(`span`,OL,[(z(!0),B(R,null,I(e.keys,(e,t)=>(z(),V(vL,{key:t},{default:P(()=>[W(j(e),1)]),_:2},1024))),128))])]))),128)),H(`li`,kL,[n[3]||=H(`span`,null,`Search keys`,-1),H(`span`,AL,[U(vL,null,{default:P(()=>[...n[2]||=[W(`/`,-1)]]),_:1})])])])]),_:1})]),_:1},8,[`open`]))}}),ML=M(!1),NL=1e3;function PL(){let e={pending:null},t=null;function n(){t!==null&&(clearTimeout(t),t=null)}function r(r){if(r.metaKey||r.ctrlKey||r.altKey||r.repeat)return;let i=r.target;if(i&&(i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.isContentEditable))return;let a=r.key.toLowerCase(),o=!!document.querySelector(`[role="dialog"],[role="menu"],[role="listbox"]`),s=a===`?`&&ML.value;if(o&&!s)return;let c=bL(e,a);e=c.state,n(),e.pending===`g`&&(t=window.setTimeout(()=>{e={pending:null},t=null},NL));let{action:l}=c;l&&(l.type===`navigate`?jp(l.route):ML.value=!ML.value,r.preventDefault())}Gi(()=>window.addEventListener(`keydown`,r)),Yi(()=>{n(),window.removeEventListener(`keydown`,r)})}var FL={class:`flex h-screen bg-background text-foreground`},IL={class:`flex min-w-0 flex-1 flex-col`},LL={class:`flex h-12 shrink-0 items-center justify-between border-b px-4`},RL={class:`flex min-w-0 items-center gap-3`},zL={key:0,class:`flex min-w-0 items-center gap-1.5`},BL={class:`max-w-[12rem] shrink-0 truncate font-mono text-sm font-medium`},VL={class:`truncate`},HL={key:0,class:`text-muted-foreground`},UL={class:`text-sm font-semibold`},WL={class:`font-mono`},GL={class:`flex min-h-0 flex-1 flex-col overflow-hidden`},KL=F({__name:`App`,setup(e){let t=Mp();PL();let n=un(null),r=M(null),i=M([]),a=q(()=>[...i.value].sort((e,t)=>{let n=e.relDir?`${e.relDir}/${e.name}`:e.name,r=t.relDir?`${t.relDir}/${t.name}`:t.name;return n.localeCompare(r)})),o=M(!1),s=M(null);async function c(){n.value=await jd()}Gi(async()=>{await c();try{[r.value,i.value]=await Promise.all([kf(),Af()]),document.title=r.value.project?`${r.value.project} — Glotfile`:`Glotfile`}catch(e){$.error(e.message)}n.value&&Object.keys(n.value.keys).length===0&&(o.value=!0)});function l(){location.reload()}async function u(e){if(e!==r.value?.path)try{await jf(e),location.reload()}catch(e){$.error(e.message)}}let d=q(()=>({editor:`Editor`,analytics:`Analytics`,glossary:`Glossary`,screenshots:`Screenshots`,settings:`Settings`,activity:`Activity`,docs:`Docs`})[t.value]),f=q(()=>{if(!n.value)return null;let{sourceLocale:e,locales:t}=n.value.config;return{source:e,targets:t.filter(t=>t!==e)}});return(e,n)=>(z(),V(N(sx),{"delay-duration":300},{default:P(()=>[H(`div`,FL,[U(EL),H(`div`,IL,[H(`header`,LL,[H(`div`,RL,[r.value?(z(),B(`div`,zL,[U(N(dx),null,{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`span`,BL,j(r.value.project),1)]),_:1}),U(N(HC),{side:`bottom`,class:`font-mono`},{default:P(()=>[W(j(r.value.dir),1)]),_:1})]),_:1}),U(N(ku),{class:`size-3.5 shrink-0 text-muted-foreground`}),U(N(lb),null,{default:P(()=>[U(N(hb),{"as-child":``},{default:P(()=>[U(N(Q),{variant:`outline`,size:`sm`,class:`max-w-[16rem] gap-1.5 font-mono`},{default:P(()=>[H(`span`,VL,j(r.value.name),1),U(N(Au),{class:`size-3.5 shrink-0 text-muted-foreground`})]),_:1})]),_:1}),U(N(NC),{align:`start`,class:`w-max`},{default:P(()=>[(z(!0),B(R,null,I(a.value,e=>(z(),V(N(PC),{key:e.path,class:`font-mono`,onSelect:t=>u(e.path)},{default:P(()=>[U(N(Du),{class:A([`size-4 shrink-0`,e.path===r.value.path?`opacity-100`:`opacity-0`])},null,8,[`class`]),H(`span`,null,[e.relDir?(z(),B(`span`,HL,j(e.relDir)+`/`,1)):G(``,!0),W(j(e.name),1)])]),_:2},1032,[`onSelect`]))),128))]),_:1})]),_:1})])):G(``,!0),H(`h1`,UL,j(d.value),1)]),f.value?(z(),V(N(dx),{key:0},{default:P(()=>[U(N(gx),{"as-child":``},{default:P(()=>[H(`button`,{type:`button`,class:`shrink-0 font-mono text-xs text-muted-foreground transition-colors hover:text-foreground`,onClick:n[0]||=e=>N(jp)(`settings`)},j(f.value.source)+` → `+j(f.value.targets.length)+` `+j(f.value.targets.length===1?`locale`:`locales`),1)]),_:1}),U(N(HC),{side:`bottom`,class:`max-w-[28rem] leading-relaxed`},{default:P(()=>[H(`div`,WL,j(f.value.targets.join(`, `)||`—`),1),n[4]||=H(`div`,{class:`mt-1 text-background/60`},`Click to manage in Settings`,-1)]),_:1})]),_:1})):G(``,!0)]),H(`main`,GL,[N(t)===`editor`?(z(),V(OO,{key:0})):N(t)===`analytics`?(z(),V(SA,{key:1})):N(t)===`glossary`?(z(),V(JA,{key:2})):N(t)===`screenshots`?(z(),V(uF,{key:3})):N(t)===`settings`?(z(),V(JP,{key:4})):N(t)===`activity`?(z(),V(LF,{key:5})):N(t)===`docs`?(z(),V($F,{key:6})):G(``,!0)])]),U(N(xC)),U(jL,{open:N(ML),"onUpdate:open":n[1]||=e=>ln(ML)?ML.value=e:null},null,8,[`open`]),o.value?(z(),V(nL,{key:0,ref_key:`wizardRef`,ref:s,onVnodeMounted:n[2]||=e=>s.value?.init(),onDismiss:n[3]||=e=>o.value=!1,onImported:l},null,512)):G(``,!0)])]),_:1}))}});fL(),iu(KL).mount(`#app`),mL(),nO(),bT();